From bafef76746e3733c010e22ae3d528162eef2f112 Mon Sep 17 00:00:00 2001 From: shweet Date: Thu, 19 Nov 2026 20:58:28 -0500 Subject: [PATCH] source_tree: STL member layouts, (int) casts that keep pointer width, EntityPtr as a pointer, Ghidra partial fields Container fields use the MSVC layouts ApplyTypes gives Ghidra (vector_X -> std_vector ...); (int)/(uint) casts become GHIDRA_INT/GHIDRA_UINT (32-bit numbers, full-width pointers); EntityPtr behaves as the raw pointer the code treats it as; EXPR._0_4_ partial accesses become explicit offsets; field-less Ghidra placeholders no longer claim 4 bytes. --check: 878/3262 method bodies compile for x86_64 (26.9%). Co-Authored-By: Claude Opus 5.5 --- scripts/source_tree.py | 71 +- src/game/achievement_overlay.cpp | 66 +- src/game/afterbirth_persistent_game_data.cpp | 6 +- src/game/ambush.cpp | 118 +- src/game/animation_data.cpp | 6 +- src/game/animation_layer.cpp | 80 +- src/game/animation_state.cpp | 80 +- src/game/anm2.cpp | 224 +- src/game/anm_cache.cpp | 952 +- src/game/anm_file_data.cpp | 30 +- src/game/backdrop.cpp | 2146 ++-- src/game/backdrop_config.cpp | 24 +- src/game/beam_renderer.cpp | 110 +- src/game/beast_arena.cpp | 44 +- src/game/bit_set128.cpp | 76 +- src/game/boss_overlay.cpp | 12 +- src/game/boss_pool.cpp | 52 +- src/game/camera.cpp | 254 +- src/game/card.cpp | 8 +- src/game/cell_space.cpp | 30 +- src/game/challenge_param.cpp | 2 +- src/game/challenge_params.cpp | 40 +- src/game/checksum.cpp | 22 +- src/game/classes.hpp | 731 +- src/game/color.cpp | 8 +- src/game/command_thread.cpp | 4 +- src/game/completion_widget.cpp | 34 +- src/game/config.cpp | 2 +- src/game/console.cpp | 1984 ++-- src/game/cutscene.cpp | 152 +- src/game/cutscene/anm2_part.cpp | 46 +- src/game/cutscene/temporary_part.cpp | 26 +- src/game/cutscene_entry.cpp | 14 +- src/game/cutscene_part.cpp | 36 +- src/game/daily_challenge.cpp | 70 +- src/game/date_time.cpp | 8 +- src/game/deathmatch_manager.cpp | 10 +- src/game/deathmatch_type_base.cpp | 142 +- src/game/debug_renderer.cpp | 114 +- src/game/emote_wheel.cpp | 22 +- src/game/entity.cpp | 730 +- src/game/entity_bomb.cpp | 488 +- src/game/entity_config.cpp | 1210 +-- src/game/entity_config_entity.cpp | 70 +- src/game/entity_config_player.cpp | 28 +- src/game/entity_dummy.cpp | 2 +- src/game/entity_effect.cpp | 560 +- src/game/entity_effect/extra_data_ref.cpp | 2 +- src/game/entity_factory.cpp | 106 +- src/game/entity_familiar.cpp | 3040 +++--- src/game/entity_knife.cpp | 904 +- src/game/entity_laser.cpp | 2018 ++-- src/game/entity_list.cpp | 360 +- src/game/entity_list_el.cpp | 4 +- src/game/entity_npc.cpp | 1368 +-- src/game/entity_partition.cpp | 30 +- src/game/entity_pickup.cpp | 788 +- src/game/entity_player.cpp | 9656 ++++++++--------- src/game/entity_projectile.cpp | 604 +- src/game/entity_ref.cpp | 2 +- src/game/entity_save_state.cpp | 6 +- src/game/entity_save_state_ref.cpp | 2 +- src/game/entity_slot.cpp | 228 +- src/game/entity_tear.cpp | 2144 ++-- src/game/entity_text.cpp | 16 +- src/game/file_system.cpp | 68 +- src/game/font.cpp | 174 +- src/game/formatted_text.cpp | 68 +- src/game/frame_queue.cpp | 84 +- src/game/friend_entry.cpp | 4 +- src/game/fx_layer.cpp | 8 +- src/game/fx_layers.cpp | 630 +- src/game/fx_params.cpp | 2 +- src/game/game.cpp | 2058 ++-- src/game/game_over.cpp | 220 +- src/game/game_state.cpp | 1122 +- src/game/game_state_player.cpp | 698 +- src/game/game_state_slot.cpp | 18 +- src/game/generic_popup.cpp | 8 +- src/game/generic_prompt.cpp | 50 +- src/game/glitched_item_set.cpp | 10 +- src/game/grid_entity.cpp | 6 +- src/game/grid_entity_decoration.cpp | 118 +- src/game/grid_entity_door.cpp | 298 +- src/game/grid_entity_fire.cpp | 72 +- src/game/grid_entity_gravity.cpp | 58 +- src/game/grid_entity_lock.cpp | 44 +- src/game/grid_entity_pit.cpp | 260 +- src/game/grid_entity_poop.cpp | 164 +- src/game/grid_entity_pressure_plate.cpp | 214 +- src/game/grid_entity_rock.cpp | 168 +- src/game/grid_entity_spikes.cpp | 106 +- src/game/grid_entity_stairs.cpp | 64 +- src/game/grid_entity_statue.cpp | 2 +- src/game/grid_entity_teleporter.cpp | 50 +- src/game/grid_entity_tnt.cpp | 24 +- src/game/grid_entity_trap_door.cpp | 250 +- src/game/grid_entity_wall.cpp | 34 +- src/game/grid_entity_web.cpp | 48 +- src/game/hallucination_overlay.cpp | 8 +- src/game/history.cpp | 86 +- src/game/homing_laser.cpp | 410 +- src/game/hud.cpp | 850 +- src/game/hud_message.cpp | 162 +- src/game/image_base.cpp | 8 +- src/game/image_png.cpp | 32 +- src/game/info_display.cpp | 604 +- src/game/info_display_config.cpp | 292 +- src/game/info_display_entry.cpp | 48 +- src/game/info_display_item.cpp | 16 +- src/game/input_manager.cpp | 20 +- src/game/invite_friends_menu.cpp | 138 +- src/game/item.cpp | 6 +- src/game/item_config.cpp | 2010 ++-- src/game/item_config_card.cpp | 2 +- src/game/item_config_item.cpp | 14 +- src/game/item_overlay.cpp | 42 +- src/game/item_pool.cpp | 1374 +-- src/game/k_color.cpp | 6 +- src/game/kage/eos_manager.cpp | 16 +- src/game/kage/filesys/archived_file.cpp | 74 +- src/game/kage/filesys/buffered_stream.cpp | 14 +- src/game/kage/filesys/file_map.cpp | 32 +- .../kage/graphics/graphics_buffer_object.cpp | 4 +- src/game/kage/graphics/image_base.cpp | 6 +- src/game/kage/graphics/manager.cpp | 12 +- src/game/kage/graphics/shader_base.cpp | 34 +- src/game/kage/input/input_device.cpp | 24 +- src/game/kage/input/input_device_gamepad.cpp | 12 +- src/game/kage/input/input_device_keyboard.cpp | 24 +- .../network/multiplayer/connection_base.cpp | 74 +- .../kage/network/multiplayer/const_lobby.cpp | 4 +- src/game/kage/network/multiplayer/lobby.cpp | 6 +- .../network/multiplayer/lobby_localhost.cpp | 22 +- .../kage/network/multiplayer/lobby_steam.cpp | 8 +- .../kage/network/multiplayer/service_base.cpp | 18 +- .../kage/network/multiplayer/service_eos.cpp | 18 +- .../network/multiplayer/service_localhost.cpp | 44 +- src/game/kage/network/multiplayer_manager.cpp | 134 +- src/game/kage/smart_pointer.cpp | 6 +- src/game/kage/sound/manager_open_al.cpp | 6 +- src/game/kage/system/friend_manager.cpp | 6 +- src/game/kage/system/leaderboard_manager.cpp | 12 +- src/game/kage/system/user_profile.cpp | 36 +- src/game/kage_filesys_file_manager.cpp | 22 +- src/game/kage_graphics.cpp | 64 +- src/game/kage_graphics_image_manager.cpp | 26 +- src/game/key_configs.cpp | 16 +- src/game/l_room_tile_desc.cpp | 22 +- src/game/layer_state.cpp | 22 +- src/game/leaderboard.cpp | 192 +- src/game/level.cpp | 1648 +-- src/game/level_generator.cpp | 376 +- src/game/level_generator_room.cpp | 2 +- src/game/lobby.cpp | 38 +- src/game/lobby_list.cpp | 8 +- src/game/lobby_localhost.cpp | 12 +- src/game/lobby_password_prompt.cpp | 10 +- src/game/lua_engine.cpp | 366 +- src/game/manager.cpp | 952 +- src/game/menu_bestiary.cpp | 532 +- src/game/menu_challenge.cpp | 244 +- src/game/menu_character.cpp | 796 +- src/game/menu_character_entry.cpp | 6 +- src/game/menu_collection.cpp | 288 +- src/game/menu_controller_select.cpp | 42 +- src/game/menu_create_lobby.cpp | 44 +- src/game/menu_custom_challenge.cpp | 128 +- src/game/menu_cutscenes.cpp | 56 +- src/game/menu_daily_challenge.cpp | 126 +- src/game/menu_dialog.cpp | 30 +- src/game/menu_game.cpp | 298 +- src/game/menu_key_config.cpp | 144 +- src/game/menu_lobby_list.cpp | 102 +- src/game/menu_lobby_list_filters.cpp | 12 +- src/game/menu_manager.cpp | 528 +- src/game/menu_mod_challenges.cpp | 6 +- src/game/menu_mods.cpp | 44 +- src/game/menu_online.cpp | 298 +- src/game/menu_online_lobby.cpp | 674 +- src/game/menu_online_lobby_list.cpp | 464 +- src/game/menu_online_mode.cpp | 110 +- src/game/menu_options.cpp | 228 +- src/game/menu_save.cpp | 408 +- src/game/menu_special_seeds.cpp | 344 +- src/game/menu_stats.cpp | 400 +- src/game/menu_title.cpp | 32 +- src/game/message_popup.cpp | 4 +- src/game/minimap.cpp | 472 +- src/game/mod.cpp | 104 +- src/game/mod_entry.cpp | 40 +- src/game/mod_manager.cpp | 1582 +-- src/game/mtrng.cpp | 30 +- src/game/multiplayer.cpp | 74 +- src/game/music.cpp | 404 +- src/game/music_channel.cpp | 10 +- src/game/music_manager.cpp | 18 +- src/game/mutex.cpp | 8 +- src/game/mutex/scope_lock.cpp | 8 +- src/game/net_desync_handler.cpp | 154 +- src/game/net_input_device.cpp | 98 +- src/game/netplay_manager.cpp | 1594 +-- src/game/netplay_text_popup.cpp | 12 +- src/game/network_manager.cpp | 74 +- src/game/nightmare_scene.cpp | 400 +- src/game/npc_helper.cpp | 2156 ++-- src/game/npcai_pathfinder.cpp | 66 +- src/game/online_chat.cpp | 58 +- src/game/online_chat_message.cpp | 2 +- src/game/online_emotes.cpp | 276 +- src/game/online_stats_screen.cpp | 2 +- src/game/options_config.cpp | 144 +- src/game/path_finder.cpp | 166 +- src/game/path_node.cpp | 8 +- src/game/pause_screen.cpp | 528 +- src/game/pause_screen_my_stuff.cpp | 142 +- src/game/persistent_game_data.cpp | 274 +- src/game/persistent_game_data_bestiary.cpp | 12 +- src/game/persistent_game_data_reader.cpp | 12 +- src/game/persistent_game_data_writer.cpp | 16 +- src/game/player_hud.cpp | 420 +- src/game/player_manager.cpp | 838 +- src/game/png_writer.cpp | 8 +- src/game/pocket_item_config.cpp | 10 +- src/game/popup.cpp | 164 +- src/game/popup_buttons.cpp | 34 +- src/game/popup_manager.cpp | 4 +- src/game/popup_queue.cpp | 62 +- src/game/popup_window.cpp | 16 +- src/game/preload_manager.cpp | 2 +- src/game/procedural_effect.cpp | 72 +- src/game/procedural_item_manager.cpp | 2 +- src/game/projectile_params.cpp | 6 +- src/game/rail_manager.cpp | 8 +- src/game/rebirth_save_data.cpp | 70 +- src/game/reference_count_base.cpp | 2 +- src/game/render_batch.cpp | 26 +- src/game/revive_player_menu.cpp | 62 +- src/game/rich_text.cpp | 26 +- src/game/rich_text_icon.cpp | 56 +- src/game/rich_text_span.cpp | 6 +- src/game/rng.cpp | 14 +- src/game/room.cpp | 4152 +++---- src/game/room_config.cpp | 332 +- src/game/room_config_mode.cpp | 22 +- src/game/room_config_room.cpp | 130 +- src/game/room_config_stage.cpp | 30 +- src/game/room_descriptor.cpp | 56 +- src/game/room_grid_path.cpp | 6 +- src/game/room_set.cpp | 6 +- src/game/room_transition.cpp | 578 +- src/game/save_data_manager.cpp | 4 +- src/game/score_sheet.cpp | 276 +- src/game/seeds.cpp | 94 +- src/game/sfx_manager.cpp | 106 +- src/game/shader.cpp | 44 +- src/game/shape.cpp | 32 +- src/game/shared_ptr.cpp | 2 +- src/game/shared_ptr_pair.cpp | 8 +- src/game/sound_effect.cpp | 14 +- src/game/sound_effects.cpp | 40 +- src/game/sound_instance.cpp | 10 +- src/game/sound_manager.cpp | 32 +- src/game/spawn.cpp | 6 +- src/game/special_seed.cpp | 4 +- src/game/sprite.cpp | 14 +- src/game/stage_transition.cpp | 54 +- src/game/stat_hud.cpp | 80 +- src/game/stats_panel.cpp | 60 +- src/game/string_table.cpp | 110 +- src/game/tear_params.cpp | 20 +- src/game/temporary_effects.cpp | 72 +- src/game/video_player.cpp | 30 +- src/game/weapon.cpp | 430 +- src/game/weapon_bone.cpp | 26 +- src/game/weapon_brimstone.cpp | 144 +- src/game/weapon_knife.cpp | 32 +- src/game/weapon_laser.cpp | 18 +- src/game/weapon_monstros_lung.cpp | 46 +- src/game/weapon_rockets.cpp | 2 +- src/game/weapon_urn_of_souls.cpp | 4 +- src/game/weighted_outcome_picker.cpp | 10 +- src/game/wisp_entry.cpp | 4 +- src/game/xml_memory_pool.cpp | 12 +- src/game/xml_node.cpp | 8 +- 285 files changed, 37175 insertions(+), 37199 deletions(-) diff --git a/scripts/source_tree.py b/scripts/source_tree.py index 60a6bb8..814f94e 100644 --- a/scripts/source_tree.py +++ b/scripts/source_tree.py @@ -13,6 +13,7 @@ import collections, concurrent.futures, os, re, subprocess, sys outDir, classesPath, dumpDir, zhlVtablesPath = sys.argv[1:5] isCheck = '--check' in sys.argv CALLING = re.compile(r'^(?P.+?)\s*\b(?:(?P__thiscall|__fastcall|__cdecl|__stdcall)\s+)?(?P[\w:~]+)\((?P.*)\)\s*$') +POINTER_LIKE = {'EntityPtr'} # REPENTOGON's smart pointer, a raw Entity * in the decompiled code 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+)\(') @@ -55,6 +56,19 @@ template inline T ABS(T v) { return v < 0 ? -v : v; } template inline T SQRT(T v) { return __builtin_sqrt(v); } inline code *swi(int) { return 0; } // int3 / int 0x29: a breakpoint or fast-fail inline void halt_baddata() {} +typedef __INTPTR_TYPE__ intptr_t; typedef __UINTPTR_TYPE__ uintptr_t; +// (int)x / (uint)x as decompiled: a number stays 32-bit, a pointer keeps its full width (pointer math on 64-bit) +template inline auto GHIDRA_INT(T v) { if constexpr (__is_pointer(T) || __is_class(T)) return (intptr_t)v; else return (int)v; } +template inline auto GHIDRA_UINT(T v) { if constexpr (__is_pointer(T) || __is_class(T)) return (uintptr_t)(intptr_t)v; else return (uint)v; } +// A smart pointer the decompiled code handles as a raw pointer: built from 0 or a pointer, converts back, compares +#define GHIDRA_POINTER_LIKE(Self) \ + void *_ptr; \ + Self(intptr_t value = 0) : _ptr((void *)value) {} \ + Self(const void *value) : _ptr((void *)value) {} \ + template operator T *() const { return (T *)_ptr; } \ + explicit operator intptr_t() const { return (intptr_t)_ptr; } \ + friend bool operator==(Self a, Self b) { return a._ptr == b._ptr; } \ + friend bool operator!=(Self a, Self b) { return a._ptr != b._ptr; } extern void *ExceptionList; // FS:[0], the SEH chain head extern double __uint_to_double_fixup[2]; // MSVC CRT: +2^32 for a uint whose top bit was set ''' @@ -77,6 +91,13 @@ def classes_load(): return rows +def container_name(typ): # vector_DamageEvent -> std_vector: the MSVC layouts ApplyTypes gives Ghidra (one per kind) + if typ.startswith('std_string'): return 'std_string' + if re.fullmatch(r'(std_)?vector_bool', typ): return 'std_vector_bool' + match = re.fullmatch(r'(?:std_)?(vector|deque|map|set|multiset|multimap|list)_\w+', typ) + return f'std_{match[1]}' if match else typ + + def fields_load(): fields, bases, sizes = collections.defaultdict(dict), {}, {} for line in open(dumpDir + '/zhl_fields.tsv'): @@ -88,7 +109,7 @@ def fields_load(): count = re.search(r'\[(\w+)\]\s*$', decl) if count: decl = decl[:count.start()] typ, name = decl.rsplit(None, 1) if ' ' in decl else (decl, '_unnamed') - fields[cols[0]][int(cols[1], 16)] = (typ.strip(), re.sub(r'\W', '', name), int(count.group(1), 0) if count else 1) + fields[cols[0]][int(cols[1], 16)] = (container_name(typ.strip()), re.sub(r'\W', '', name), int(count.group(1), 0) if count else 1) return fields, bases, sizes @@ -148,9 +169,9 @@ def method_declare(cls, method, ret, cc, params, isVirtual): return f' {prefix}{ret} {method}({args});' -def fields_rewrite(text): # EXPR->field_0x1c / EXPR.field_0x1c (a byte Ghidra had no field for) -> the byte at that offset +def fields_rewrite(text): # bytes Ghidra has no field for, as explicit offsets: EXPR->field_0x1c, EXPR.field_0x1c, EXPR._0_4_ out, pos = [], 0 - for match in re.finditer(r'(->|\.)field_0x([0-9a-f]+)\b', text): + for match in re.finditer(r'(->|\.)(?:field_0x([0-9a-f]+)|_(\d+)_(\d+)_)\b', text): start = match.start() while start > pos: # walk back over the postfix expression: names, (...), [...], -> and . ch = text[start - 1] @@ -164,7 +185,9 @@ def fields_rewrite(text): # EXPR->field_0x1c / EXPR.field_0x1c (a byte Ghidra else: break expr = text[start:match.start()] address = f'(char *)({expr})' if match[1] == '->' else f'(char *)&({expr})' - out.append(text[pos:start] + f'(*(undefined1 *)({address} + 0x{match[2]}))'); pos = match.end() + offset, width = (int(match[2], 16), 1) if match[2] else (int(match[3]), int(match[4])) + typ = {1: 'undefined1', 2: 'undefined2', 4: 'undefined4', 8: 'undefined8'}.get(width, 'undefined1') + out.append(text[pos:start] + f'(*({typ} *)({address} + 0x{offset:x}))'); pos = match.end() return ''.join(out) + text[pos:] @@ -172,6 +195,39 @@ def offsets_rewrite(text): # *(T *)((int)p + 0x10) -> *(T *)((char *)p + 0x10) return re.sub(r'(\*\([\w ]+\*+\)\()\((?:int|uint)\)((?:\w+(?:->|\.))*\w+|\([^()]*\)) \+ ', r'\1(char *)\2 + ', text) +def operand_end(text, i): # end of the unary expression starting at i: prefix ops, casts, a primary, then postfix + n = len(text) + def group(j): # j at an opening bracket: index after its match + depth = 0 + while j < n: + depth += {'(': 1, '[': 1, ')': -1, ']': -1}.get(text[j], 0); j += 1 + if depth == 0: return j + return n + while i < n and text[i] in ' *&-!~': i += 1 + cast = re.match(r'\([\w ]+\*?\s*\)', text[i:]) # a nested cast applies to the operand after it + if cast and not re.fullmatch(r'\(\s*\w+\s*\)', cast[0]) or cast and cast[0][1:-1].strip() in PRIMITIVE: return operand_end(text, i + len(cast[0])) + if i < n and text[i] == '(': i = group(i) + else: + m = re.match(r"[\w.]+|'[^']*'|\"[^\"]*\"", text[i:]) + i += len(m[0]) if m else 0 + while i < n: + if text[i] in '([': i = group(i) + elif text.startswith('->', i): i += 2; i += len(re.match(r'\w*', text[i:])[0]) + elif text[i] == '.' and i + 1 < n and (text[i + 1].isalpha() or text[i + 1] == '_'): i += 1; i += len(re.match(r'\w*', text[i:])[0]) + else: break + return i + + +def int_casts_rewrite(text): # (int)expr -> GHIDRA_INT(expr), (uint)expr -> GHIDRA_UINT(expr) + out, pos = [], 0 + for match in re.finditer(r'\((int|uint)\)', text): + if match.start() < pos: continue + end = operand_end(text, match.end()) + inner = int_casts_rewrite(text[match.end():end]) + out.append(text[pos:match.start()] + f'GHIDRA_{match[1].upper()}({inner})'); pos = end + return ''.join(out) + text[pos:] + + def virtuals_rewrite(text, varTypes): # (**(code **)(*(int *)X + 0x24))(args) -> X->Method(args), X's class from its declaration def slot_call(match): var, offset = match[1], int(match[2], 0) @@ -224,8 +280,8 @@ for t in sorted(wanted & set(ghidraStructs)): name = re.sub(r'\W', '_', fname) or f'field_0x{off:x}' if name in taken: name += f'_0x{off:x}' taken.add(name); fields[t][off] = (typ, name, count) - sizes[t] = ghidraStructs[t][0] - if not ghidraStructs[t][1]: fields[t] # an empty struct still gets its size + if ghidraStructs[t][1]: sizes[t] = ghidraStructs[t][0] # a field-less one is Ghidra's 4-byte placeholder, not a size + else: fields[t] zhlSlots = {(c, int(i)): n for c, i, n in (l.rstrip('\n').split('\t') for l in open(zhlVtablesPath))} QUALIFIED = re.compile(r'^\w+(::\w+)*$') names = set(classes) | set(fields) | set(fieldBases) | {f[0] for f in funcs.values() if f[3] == '__thiscall' and QUALIFIED.match(f[0])} @@ -313,6 +369,7 @@ def class_emit(cls, stack=()): if not decl: continue seen.add(key); used.update(sig_types(ret, params)); defined[addr] = decl.strip() decls.append(decl + f' // {addr:08x}') + if cls in POINTER_LIKE: lines = [f' GHIDRA_POINTER_LIKE({shortName})'] nested = [c.rpartition('::')[2] for c in names if c.rpartition('::')[0] == cls] body = '\n'.join([f' struct {n};' for n in sorted(nested)] + decls + ([''] if decls and lines else []) + lines) head = f'struct {cls if isNested else shortName}' + (f' : {parent}' if parent else '') @@ -401,7 +458,7 @@ for cls in [c for c in done if not LIBRARY.match(c)]: varTypes = {m[2]: m[1] for m in re.finditer(r'^\s+((?:\w+::)*\w+)\s*\*\s*(\w+);', funcs[addr][6], re.M)} varTypes.update({p.rsplit('*', 1)[1].strip(): p.rsplit('*', 1)[0].strip() for p in params if '*' in p}) varTypes['this'] = cls - body = calls_rewrite(virtuals_rewrite(offsets_rewrite(fields_rewrite(funcs[addr][6])), varTypes), members) + body = int_casts_rewrite(calls_rewrite(virtuals_rewrite(offsets_rewrite(fields_rewrite(funcs[addr][6])), varTypes), members)) text = f'\n// {addr:08x}\n{decl.replace(name + "(", cls + "::" + name + "(", 1)}\n{{\n{alias}{body}\n}}\n' spans[cls].append((line + 1, line + text.count('\n'), addr)); line += text.count('\n'); parts.append(text) if len(parts) > 1: diff --git a/src/game/achievement_overlay.cpp b/src/game/achievement_overlay.cpp index 85e411d..564b52b 100644 --- a/src/game/achievement_overlay.cpp +++ b/src/game/achievement_overlay.cpp @@ -35,11 +35,11 @@ void AchievementOverlay::load_graphics() undefined1 *puStack_18; undefined4 local_14; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00af18ad; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; anm2Path._size = 0; anm2Path._capacity = 0xf; @@ -47,19 +47,19 @@ void AchievementOverlay::load_graphics() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x30); anm2Path._size = 0x24; anm2Path._capacity = 0x2f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/achievement/Achievements.anm2",0x25); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/achievement/Achievements.anm2",0x25); local_14 = 0; ((ANM2 *)(&this->_sprite))->ANM2::Load(&anm2Path,1); if (0xf < anm2Path._capacity) { size = anm2Path._capacity + 1; - ptr = (char *)anm2Path._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < size) { - ptr = *(char **)(anm2Path._buf._0_4_ + -4); + ptr = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); size = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)ptr))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(ptr)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -124,7 +124,7 @@ byte AchievementOverlay::load_xml(byte *path) local_14 = (byte ****)0xffffffff; puStack_18 = &LAB_00b0ad43; local_1c = ExceptionList; - uVar3 = __security_cookie ^ (uint)(gfxRoot + 0xb); + uVar3 = __security_cookie ^ GHIDRA_UINT((gfxRoot + 0xb)); ExceptionList = &local_1c; local_24 = uVar3; file = ((FileSystem *)(&PTR_vftable_00c37a10))->FileSystem::Open(path,(int *)0x0); @@ -143,12 +143,12 @@ byte AchievementOverlay::load_xml(byte *path) pbVar6 = text; ((rapidxml::xml_document *)(doc))->rapidxml::xml_document::parse(text); bVar2 = (byte)pbVar6; - node = ((xml_node *)(doc))->xml_node::first_node((byte *)"achievements",(int)pbVar9,bVar2); + node = ((xml_node *)(doc))->xml_node::first_node((byte *)"achievements",GHIDRA_INT(pbVar9),bVar2); gfxRootSize = 0; gfxRootCapacity = 0xf; gfxRoot[0] = (byte *****)0x0; - local_14 = (byte ****)CONCAT31(local_14._1_3_,1); - gfxRootAttribute = ((xml_node *)(node))->xml_node::first_attribute(&DAT_00b6987c,(uint)pbVar9,bVar2); + local_14 = (byte ****)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); + gfxRootAttribute = ((xml_node *)(node))->xml_node::first_attribute(&DAT_00b6987c,GHIDRA_UINT(pbVar9),bVar2); if (gfxRootAttribute != (void *)0x0) { pbVar9 = &g_xmlNullStr; if (*(byte **)((char *)gfxRootAttribute + 4) != (byte *)0x0) { @@ -159,11 +159,11 @@ byte AchievementOverlay::load_xml(byte *path) bVar2 = *pbVar6; pbVar6 = pbVar6 + 1; } while (bVar2 != 0); - uVar3 = (int)pbVar6 - (int)(pbVar9 + 1); + uVar3 = GHIDRA_INT(pbVar6) - GHIDRA_INT((pbVar9 + 1)); ((std::string *)((char *)gfxRoot))->std::string::assign(pbVar9,uVar3); bVar2 = (byte)uVar3; } - for (node = ((xml_node *)(node))->xml_node::first_node((byte *)"achievement",(int)pbVar9,bVar2); + for (node = ((xml_node *)(node))->xml_node::first_node((byte *)"achievement",GHIDRA_INT(pbVar9),bVar2); node != (void *)0x0; node = *(void **)((char *)node + 0x2c)) { textStringSize = 0; textStringCapacity = 0xf; @@ -171,8 +171,8 @@ byte AchievementOverlay::load_xml(byte *path) gfxPathSize = 0; gfxPathCapacity = 0xf; gfxPath = (byte *****)0x0; - local_14._1_3_ = (undefined3)((uint)local_14 >> 8); - local_14 = (byte ****)CONCAT31(local_14._1_3_,2); + (*(undefined1 *)((char *)&(local_14) + 0x1)) = (undefined3)(GHIDRA_UINT(local_14) >> 8); + local_14 = (byte ****)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); for (attribute = *(undefined4 **)((char *)node + 0x20); attribute != (undefined4 *)0x0; attribute = (undefined4 *)attribute[6]) { pbVar9 = (byte *)*attribute; @@ -186,7 +186,7 @@ byte AchievementOverlay::load_xml(byte *path) isLess = bVar2 < *pbVar7; if (bVar2 != *pbVar7) { LAB_00931851: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_00931856; } if (bVar2 == 0) break; @@ -216,7 +216,7 @@ LAB_00931856: isLess = bVar2 < *pbVar7; if (bVar2 != *pbVar7) { LAB_009318b0: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_009318b5; } if (bVar2 == 0) break; @@ -238,7 +238,7 @@ LAB_009318b5: bVar2 = *pbVar6; pbVar6 = pbVar6 + 1; } while (bVar2 != 0); - ((std::string *)((char *)textString))->std::string::assign(pbVar9,(int)pbVar6 - (int)(pbVar9 + 1)); + ((std::string *)((char *)textString))->std::string::assign(pbVar9,GHIDRA_INT(pbVar6) - GHIDRA_INT((pbVar9 + 1))); } else { pbVar7 = &DAT_00b66fec; @@ -251,7 +251,7 @@ LAB_009318b5: isLess = bVar2 < *pbVar7; if (bVar2 != *pbVar7) { LAB_00931920: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_00931925; } if (bVar2 == 0) break; @@ -273,7 +273,7 @@ LAB_00931925: bVar2 = *pbVar6; pbVar6 = pbVar6 + 1; } while (bVar2 != 0); - gfxLength = (std_string *)(pbVar6 + -(int)(pbVar9 + 1)); + gfxLength = (std_string *)(pbVar6 + -GHIDRA_INT((pbVar9 + 1))); if ((std_string *)(0x7fffffff - gfxRootSize) < gfxLength) { /* WARNING: Subroutine does not return */ std::string::_Xlen(); @@ -282,15 +282,15 @@ LAB_00931925: if (0xf < gfxRootCapacity) { pppppbVar5 = gfxRoot[0]; } - ((std::string *)((char *)&fullGfxPath))->std::string::concat((int)this,gfxLength,(byte *)pppppbVar5, - gfxRootSize,pbVar9,(uint)gfxLength); + ((std::string *)((char *)&fullGfxPath))->std::string::concat(GHIDRA_INT(this),gfxLength,(byte *)pppppbVar5, + gfxRootSize,pbVar9,GHIDRA_UINT(gfxLength)); if (0xf < gfxPathCapacity) { uVar3 = gfxPathCapacity + 1; pppppbVar5 = gfxPath; if (0xfff < uVar3) { pppppbVar5 = (byte *****)gfxPath[-1]; uVar3 = gfxPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)gfxPath + (-4 - (int)pppppbVar5))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(gfxPath) + (-4 - GHIDRA_INT(pppppbVar5)))) goto LAB_00931b16; } operator_delete(pppppbVar5,uVar3); @@ -326,14 +326,14 @@ LAB_00931925: } } uVar3 = textStringCapacity; - local_14 = (byte ****)CONCAT31(local_14._1_3_,1); + local_14 = (byte ****)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); if (0xf < gfxPathCapacity) { uVar8 = gfxPathCapacity + 1; pppppbVar5 = gfxPath; if (0xfff < uVar8) { pppppbVar5 = (byte *****)gfxPath[-1]; uVar8 = gfxPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)gfxPath + (-4 - (int)pppppbVar5))) goto LAB_00931b16; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(gfxPath) + (-4 - GHIDRA_INT(pppppbVar5)))) goto LAB_00931b16; } operator_delete(pppppbVar5,uVar8); } @@ -343,20 +343,20 @@ LAB_00931925: if (0xfff < uVar8) { pppppbVar5 = (byte *****)textString[0][-1]; uVar8 = uVar3 + 0x24; - if ((byte *)0x1f < (byte *)((int)textString[0] + (-4 - (int)pppppbVar5))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(textString[0]) + (-4 - GHIDRA_INT(pppppbVar5)))) goto LAB_00931b16; } operator_delete(pppppbVar5,uVar8); } } - local_14 = (byte ****)((uint)local_14 & 0xffffff00); + local_14 = (byte ****)(GHIDRA_UINT(local_14) & 0xffffff00); if (0xf < gfxRootCapacity) { uVar3 = gfxRootCapacity + 1; pppppbVar5 = gfxRoot[0]; if (0xfff < uVar3) { pppppbVar5 = (byte *****)gfxRoot[0][-1]; uVar3 = gfxRootCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)gfxRoot[0] + (-4 - (int)pppppbVar5))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(gfxRoot[0]) + (-4 - GHIDRA_INT(pppppbVar5)))) { LAB_00931b16: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -370,14 +370,14 @@ LAB_00931b16: allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (text != (byte *)0x0) { uVar3 = *(uint *)(text + -4); qVar1 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar3; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar3; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar1 < uVar3); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar3)); free(text + -4); } bVar2 = 1; @@ -417,7 +417,7 @@ void AchievementOverlay::Update() manager = g_manager; local_c[0] = (AchievementOverlay *)&DAT_00000008; seed_fart_sound_override((int *)local_c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_c[0],1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_c[0]),1.0,2,0,1.0,0.0); } } else if (iVar2 == 2) { @@ -438,7 +438,7 @@ void AchievementOverlay::Update() if ((this->_state == 0) && (queueSize = (this->_queue)._size, queueSize != 0)) { queueOffset = (this->_queue)._offset; this->_currentEntry = - *(int *)(*(int *)((int)(this->_queue)._map + + *(int *)(*(int *)(GHIDRA_INT((this->_queue)._map) + (queueOffset >> 2 & (this->_queue)._mapSize - 1) * 4) + (queueOffset & 3) * 4); queueSize = queueSize - 1; diff --git a/src/game/afterbirth_persistent_game_data.cpp b/src/game/afterbirth_persistent_game_data.cpp index d55d720..569bf5e 100644 --- a/src/game/afterbirth_persistent_game_data.cpp +++ b/src/game/afterbirth_persistent_game_data.cpp @@ -30,7 +30,7 @@ byte AfterbirthPersistentGameData::check_header(void *stream) uint local_c; undefined1 auStack_8 [4]; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); saveData = this; (**(code **)(*(int *)stream + 0x14))(local_1c,1,0x10); expectedHeader = &DAT_00b1b98c; @@ -90,12 +90,12 @@ LAB_0041d717: } (**(code **)(*(int *)stream + 0xc))(0x10,0); data = saveData; - (**(code **)(*(int *)stream + 0x14))((int)saveData + 0x6dc,4,1); + (**(code **)(*(int *)stream + 0x14))(GHIDRA_INT(saveData) + 0x6dc,4,1); sectionId = 0; isEof = (**(code **)(*(int *)stream + 0x10))(); joined_r0x0041d798: if (((isEof != '\0') || (sectionId < 0)) || (sectionCount <= sectionId)) { - (**(code **)(*(int *)stream + 0x14))((int)data + 0x6e0,4,1); + (**(code **)(*(int *)stream + 0x14))(GHIDRA_INT(data) + 0x6e0,4,1); return 1; } (**(code **)(*(int *)stream + 0x14))(§ionId,4,1); diff --git a/src/game/ambush.cpp b/src/game/ambush.cpp index 0f218fc..e5cecda 100644 --- a/src/game/ambush.cpp +++ b/src/game/ambush.cpp @@ -25,7 +25,7 @@ void Ambush::shuffle_waves() seed = *(uint *)(iVar1 + 0x5c); } pvVar2 = (this->_bossRushWaves)._begin; - remainingCount = ((int)(this->_bossRushWaves)._end - (int)pvVar2) / 0xc; + remainingCount = (GHIDRA_INT((this->_bossRushWaves)._end) - GHIDRA_INT(pvVar2)) / 0xc; waveIndex = remainingCount - 1; if (0 < waveIndex) { waveOffset = waveIndex * 0xc; @@ -43,16 +43,16 @@ void Ambush::shuffle_waves() if (remainingCount != 0) { swapIndex = seed % remainingCount; } - temp_161c0439608 = (undefined4 *)((int)pvVar2 + swapIndex * 0xc); - if ((undefined4 *)((int)pvVar2 + waveOffset) != temp_161c0439608) { + temp_161c0439608 = (undefined4 *)(GHIDRA_INT(pvVar2) + swapIndex * 0xc); + if ((undefined4 *)(GHIDRA_INT(pvVar2) + waveOffset) != temp_161c0439608) { swapTmp = *(undefined4 *)((char *)pvVar2 + waveOffset); - *(undefined4 *)(waveOffset + (int)pvVar2) = *temp_161c0439608; + *(undefined4 *)(waveOffset + GHIDRA_INT(pvVar2)) = *temp_161c0439608; *temp_161c0439608 = swapTmp; - swapTmp = *(undefined4 *)(waveOffset + 4 + (int)pvVar2); - *(undefined4 *)(waveOffset + 4 + (int)pvVar2) = temp_161c0439608[1]; + swapTmp = *(undefined4 *)(waveOffset + 4 + GHIDRA_INT(pvVar2)); + *(undefined4 *)(waveOffset + 4 + GHIDRA_INT(pvVar2)) = temp_161c0439608[1]; temp_161c0439608[1] = swapTmp; - swapTmp = *(undefined4 *)(waveOffset + 8 + (int)pvVar2); - *(undefined4 *)(waveOffset + 8 + (int)pvVar2) = temp_161c0439608[2]; + swapTmp = *(undefined4 *)(waveOffset + 8 + GHIDRA_INT(pvVar2)); + *(undefined4 *)(waveOffset + 8 + GHIDRA_INT(pvVar2)) = temp_161c0439608[2]; temp_161c0439608[2] = swapTmp; } waveIndex = waveIndex + -1; @@ -97,7 +97,7 @@ void Ambush::StartChallenge() doorSlot = doorSlot + 1; if (doorSlot < 9) { pvVar3 = game->_room; - door = *(GridEntity_Door **)(doorOffset + (int)pvVar3); + door = *(GridEntity_Door **)(doorOffset + GHIDRA_INT(pvVar3)); if (((door != (GridEntity_Door *)0x0) && ((game->_enterDoor != door->_slot || (((currentRoomType < 2 || (*(int *)((char *)pvVar3 + 8) != 0x11)) && @@ -188,7 +188,7 @@ void Ambush::SpawnWave() puStack_18 = &LAB_00b021dd; local_1c = ExceptionList; puStack_20 = (undefined1 *)(difficultyTable + 0xc); - difficultyTable[4] = __security_cookie ^ (uint)(difficultyTable + 9); + difficultyTable[4] = __security_cookie ^ GHIDRA_UINT((difficultyTable + 9)); ExceptionList = &local_1c; difficultyTable[0] = 1; difficultyTable[1] = 5; @@ -196,7 +196,7 @@ void Ambush::SpawnWave() difficultyTable[3] = 0xf; local_54 = g_game; room = g_game->_room; - iVar2 = this->_currentWave - (uint)(g_game->_difficulty != 1); + iVar2 = this->_currentWave - GHIDRA_UINT((g_game->_difficulty != 1)); if (3 < iVar2) { iVar2 = 3; } @@ -212,7 +212,7 @@ void Ambush::SpawnWave() else { local_58 = (uint *)RoomConfig::GetStageID(g_game->_stage,g_game->_stageType,-1); } - local_8c.y = (float)(0xb - (uint)(*(int *)(*(int *)((char *)room->_descriptor + 0x10) + 0x10) != 1)); + local_8c.y = (float)(0xb - GHIDRA_UINT((*(int *)(*(int *)((char *)room->_descriptor + 0x10) + 0x10) != 1))); puVar6 = (uint *)0x0; local_60 = (uint *)0x0; entries = (uint *)0x0; @@ -229,8 +229,8 @@ LAB_00833972: do { puVar6 = local_58; local_68 = (Entity *)local_58[-1]; - local_8c.x = (float)((int)local_68 % room->_gridWidth) * 40.0 + 40.0; - local_8c.y = (float)((int)local_68 / room->_gridWidth) * 40.0 + 120.0; + local_8c.x = (float)(GHIDRA_INT(local_68) % room->_gridWidth) * 40.0 + 40.0; + local_8c.y = (float)(GHIDRA_INT(local_68) / room->_gridWidth) * 40.0 + 120.0; ((Room *)(room))->Room::FindFreeTilePosition(&local_74,&local_8c,0.0); pvVar4 = this[1]._bossRushWaves._capacity; if (*puVar6 - 10 < 0x3de) { @@ -244,7 +244,7 @@ LAB_00833972: } } puVar6 = local_58; - uVar3 = (uint)pvVar4 >> ((byte)this[1]._maxWaves & 0x1f) ^ (uint)pvVar4; + uVar3 = GHIDRA_UINT(pvVar4) >> ((byte)this[1]._maxWaves & 0x1f) ^ GHIDRA_UINT(pvVar4); uVar3 = uVar3 << ((byte)*(undefined4 *)&(*(undefined1 *)((char *)&(this[1]) + 0x1c)) & 0x1f) ^ uVar3; pvVar4 = (void *)(uVar3 >> ((byte)*(undefined4 *)&this[1]._isActive & 0x1f) ^ uVar3); this[1]._bossRushWaves._capacity = pvVar4; @@ -271,13 +271,13 @@ LAB_00833972: } } puVar6 = local_58; - uVar3 = (uint)pvVar4 >> ((byte)this[1]._maxWaves & 0x1f) ^ (uint)pvVar4; + uVar3 = GHIDRA_UINT(pvVar4) >> ((byte)this[1]._maxWaves & 0x1f) ^ GHIDRA_UINT(pvVar4); uVar3 = uVar3 << ((byte)*(undefined4 *)&(*(undefined1 *)((char *)&(this[1]) + 0x1c)) & 0x1f) ^ uVar3; pvVar4 = (void *)(uVar3 >> ((byte)*(undefined4 *)&this[1]._isActive & 0x1f) ^ uVar3); this[1]._bossRushWaves._capacity = pvVar4; - local_68 = ((Game *)(local_54))->Game::Spawn(*local_58,(uint)(ushort)local_58[1],&local_74, - &g_vectorZero,(Entity *)0x0,(uint)*(ushort *)((char *)local_58 + 6), - (uint)pvVar4); + local_68 = ((Game *)(local_54))->Game::Spawn(*local_58,GHIDRA_UINT((ushort)local_58[1]),&local_74, + &g_vectorZero,(Entity *)0x0,GHIDRA_UINT(*(ushort *)((char *)local_58 + 6)), + GHIDRA_UINT(pvVar4)); if (local_68->_type == 1000) { local_68->Update(); } @@ -293,31 +293,31 @@ LAB_00833b32: ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(local_64,1.0,2,0,1.0,0.0); uVar3 = 0; playerManager = &g_game->_playerManager; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar4 = (playerManager->_playerList)._end; - if ((int)pvVar4 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar4) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar4 = (playerManager->_playerList)._end; } playerSlot = (playerManager->_playerList)._begin; - if (uVar3 < (uint)((int)pvVar4 - (int)playerSlot >> 2)) { + if (uVar3 < GHIDRA_UINT((GHIDRA_INT(pvVar4) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + uVar3; } ((Entity_Player *)((Entity_Player *)*playerSlot))->Entity_Player::spawn_locusts(); uVar3 = uVar3 + 1; playerManager = &g_game->_playerManager; - } while (uVar3 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar3 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } if (local_60 != (uint *)0x0) { - uVar3 = (int)entriesCapacity - (int)local_60 & 0xfffffff0; + uVar3 = GHIDRA_INT(entriesCapacity) - GHIDRA_INT(local_60) & 0xfffffff0; puVar6 = local_60; if (0xfff < uVar3) { puVar6 = (uint *)local_60[-1]; uVar3 = uVar3 + 0x23; - if ((undefined1 *)0x1f < (undefined1 *)((int)local_60 + (-4 - (int)puVar6))) { + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(local_60) + (-4 - GHIDRA_INT(puVar6)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -340,13 +340,13 @@ LAB_00833b32: return; } } - uVar3 = (uint)pvVar4 >> ((byte)this[1]._maxWaves & 0x1f) ^ (uint)pvVar4; + uVar3 = GHIDRA_UINT(pvVar4) >> ((byte)this[1]._maxWaves & 0x1f) ^ GHIDRA_UINT(pvVar4); uVar3 = uVar3 << ((byte)*(undefined4 *)&(*(undefined1 *)((char *)&(this[1]) + 0x1c)) & 0x1f) ^ uVar3; pvVar4 = (void *)(uVar3 >> ((byte)*(undefined4 *)&this[1]._isActive & 0x1f) ^ uVar3); this[1]._bossRushWaves._capacity = pvVar4; local_54 = (Game *)RoomConfig::GetRandomRoom - ((RoomConfig *)local_54,(uint)pvVar4,1,(int)local_58,0xb, - (int)local_74.y,0,-1,local_84,local_84,&local_90,(uint)local_8c.y, + ((RoomConfig *)local_54,GHIDRA_UINT(pvVar4),1,GHIDRA_INT(local_58),0xb, + GHIDRA_INT(local_74.y),0,-1,local_84,local_84,&local_90,GHIDRA_UINT(local_8c.y), -1); if (local_54 == (Game *)0x0) { if (local_58 == (uint *)0x0) { @@ -361,7 +361,7 @@ LAB_008337d3: if (*(short *)((char *)local_54 + 0x44) != 0) { local_60 = (uint *)0x0; do { - spawnEntry = (short *)((int)*(void **)((char *)local_54 + 0x40) + (int)local_60); + spawnEntry = (short *)(GHIDRA_INT(*(void **)((char *)local_54 + 0x40)) + GHIDRA_INT(local_60)); pvVar4 = this[1]._bossRushWaves._capacity; if (pvVar4 == (void *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -372,12 +372,12 @@ LAB_008337d3: return; } } - uVar3 = (uint)pvVar4 >> ((byte)this[1]._maxWaves & 0x1f) ^ (uint)pvVar4; + uVar3 = GHIDRA_UINT(pvVar4) >> ((byte)this[1]._maxWaves & 0x1f) ^ GHIDRA_UINT(pvVar4); uVar3 = uVar3 << ((byte)*(undefined4 *)&(*(undefined1 *)((char *)&(this[1]) + 0x1c)) & 0x1f) ^ uVar3; pvVar4 = (void *)(uVar3 >> ((byte)*(undefined4 *)&this[1]._isActive & 0x1f) ^ uVar3); this[1]._bossRushWaves._capacity = pvVar4; - pickedEntry = ((Spawn *)(spawnEntry))->Spawn::PickEntry((float)((double)(int)pvVar4 + - __uint_to_double_fixup[-((int)pvVar4 >> 0x1f)]) * + pickedEntry = ((Spawn *)(spawnEntry))->Spawn::PickEntry((float)((double)GHIDRA_INT(pvVar4) + + __uint_to_double_fixup[-(GHIDRA_INT(pvVar4) >> 0x1f)]) * 2.3283062e-10); entry = *pickedEntry; local_38 = *(uint *)(pickedEntry + 1); @@ -400,17 +400,17 @@ LAB_008337d3: return; } } - uVar5 = (uint)pvVar4 >> ((byte)this[1]._maxWaves & 0x1f) ^ (uint)pvVar4; + uVar5 = GHIDRA_UINT(pvVar4) >> ((byte)this[1]._maxWaves & 0x1f) ^ GHIDRA_UINT(pvVar4); uVar5 = uVar5 << ((byte)*(undefined4 *)&(*(undefined1 *)((char *)&(this[1]) + 0x1c)) & 0x1f) ^ uVar5; pvVar4 = (void *)(uVar5 >> ((byte)*(undefined4 *)&this[1]._isActive & 0x1f) ^ uVar5); this[1]._bossRushWaves._capacity = pvVar4; - ((Room *)(room))->Room::TransformEntry(&entry,uVar3,(uint)pvVar4); + ((Room *)(room))->Room::TransformEntry(&entry,uVar3,GHIDRA_UINT(pvVar4)); if (&(*(undefined1 *)((char *)&(((Entity *)entry)[-1]) + 0x40f)) < (undefined1 *)0x3e7) { entryType = (Entity *)entry; if ((Entity *)entry == (Entity *)0x3e7) { entryType = local_68; } - entry = CONCAT44(entry._4_4_,entryType); + entry = CONCAT44((*(undefined4 *)((char *)&(entry) + 0x4)),entryType); uStack_4c = entry; uStack_44 = local_38; newEntry = uVar3; @@ -420,15 +420,15 @@ LAB_008337d3: } else { *entriesEnd = uVar3; - entriesEnd[1] = (uint)entryType; - entriesEnd[2] = entry._4_4_; + entriesEnd[1] = GHIDRA_UINT(entryType); + entriesEnd[2] = (*(undefined4 *)((char *)&(entry) + 0x4)); entriesEnd[3] = local_38; entriesEnd = entriesEnd + 4; } } - local_74.y = (float)((int)local_74.y + 1); - local_60 = (uint *)((int)local_60 + 0x10); - } while ((uint)local_74.y < (uint)(ushort)*(short *)((char *)local_54 + 0x44)); + local_74.y = (float)(GHIDRA_INT(local_74.y) + 1); + local_60 = (uint *)(GHIDRA_INT(local_60) + 0x10); + } while (GHIDRA_UINT(local_74.y) < GHIDRA_UINT((ushort)*(short *)((char *)local_54 + 0x44))); local_60 = entries; puVar6 = entriesEnd; } @@ -467,13 +467,13 @@ void Ambush::SpawnBossrushWave() puStack_c = &LAB_00b0221d; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (uint)(local_20 + 7); + uVar3 = __security_cookie ^ GHIDRA_UINT((local_20 + 7)); ExceptionList = &local_10; iVar6 = 0; local_8 = 0; if (0 < *(int *)&(*(undefined1 *)((char *)(this) + 0x1c))) { do { - iVar4 = (int)(this->_bossRushWaves)._end - (int)(this->_bossRushWaves)._begin; + iVar4 = GHIDRA_INT((this->_bossRushWaves)._end) - GHIDRA_INT((this->_bossRushWaves)._begin); iVar1 = iVar4 >> 0x1f; if (iVar4 / 0xc + iVar1 == iVar1) break; pvVar5 = (this->_bossRushWaves)._end; @@ -481,7 +481,7 @@ void Ambush::SpawnBossrushWave() (0,*(undefined4 *)((char *)pvVar5 + -0xc),*(undefined4 *)((char *)pvVar5 + -8),local_38); std::vector<12byte>::_Tidy(uVar3); wavesEnd = &(this->_bossRushWaves)._end; - *wavesEnd = (void *)((int)*wavesEnd + -0xc); + *wavesEnd = (void *)(GHIDRA_INT(*wavesEnd) + -0xc); iVar6 = iVar6 + 1; } while (iVar6 < *(int *)&(*(undefined1 *)((char *)(this) + 0x1c))); } @@ -493,23 +493,23 @@ void Ambush::SpawnBossrushWave() ((SoundEffects *)(&pMVar2->_sfxManager))->SoundEffects::Play(local_20[0],1.0,2,0,1.0,0.0); uVar3 = 0; playerManager = &g_game->_playerManager; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> 2 + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar5 = (playerManager->_playerList)._end; - if ((int)pvVar5 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar5) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar5 = (playerManager->_playerList)._end; } playerSlot = (playerManager->_playerList)._begin; - if (uVar3 < (uint)((int)pvVar5 - (int)playerSlot >> 2)) { + if (uVar3 < GHIDRA_UINT((GHIDRA_INT(pvVar5) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + uVar3; } ((Entity_Player *)((Entity_Player *)*playerSlot))->Entity_Player::spawn_locusts(); uVar3 = uVar3 + 1; playerManager = &g_game->_playerManager; - } while (uVar3 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar3 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } ExceptionList = local_10; return; @@ -536,7 +536,7 @@ void Ambush::Update() game = g_game; iVar1 = *(int *)((char *)g_game->_room + 8); if (iVar1 == 0x11) { - iVar3 = (int)(this->_bossRushWaves)._end - (int)(this->_bossRushWaves)._begin; + iVar3 = GHIDRA_INT((this->_bossRushWaves)._end) - GHIDRA_INT((this->_bossRushWaves)._begin); iVar4 = this->_maxWaves; iVar2 = iVar3 >> 0x1f; if (iVar3 / 0xc + iVar2 == iVar2) { @@ -573,13 +573,13 @@ void Ambush::Update() ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::trigger_room_clear(); } playerIndex = 0; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { player = ((Game *)(g_game))->Game::GetPlayer(playerIndex); collectibles = (g_manager->_itemConfig)._collectibles._begin; - if ((0x898 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)collectibles & - 0xfffffffcU)) && + if ((0x898 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(collectibles) & + 0xfffffffcU))) && (iVar1 = *(int *)((char *)collectibles + 0x898), iVar1 != 0)) { tempEffect[2] = *(undefined4 *)(iVar1 + 0x78); tempEffect[1] = 0; @@ -589,8 +589,8 @@ void Ambush::Update() } playerIndex = playerIndex + 1; } while (playerIndex < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); } ((RNG *)((RNG *)&(*(undefined1 *)((char *)&(this[1]) + 0x4))))->RNG::Next(); iVar2 = *(int *)(this + 1); @@ -617,8 +617,8 @@ void Ambush::Update() iVar4 = 0x28; } ((MusicManager *)(&g_manager->_musicManager))->MusicManager::Crossfade(iVar4,0.08); - if (0x25 < ((int)(g_manager->_musicManager)._entries._end - - (int)(g_manager->_musicManager)._entries._begin) / 0x60) { + if (0x25 < (GHIDRA_INT((g_manager->_musicManager)._entries._end) - + GHIDRA_INT((g_manager->_musicManager)._entries._begin)) / 0x60) { (g_manager->_musicManager)._queuedMusicID = 0x25; } ((Room *)(g_game->_room))->Room::SpawnClearAward(); @@ -631,7 +631,7 @@ void Ambush::Update() roomFlags = (uint *)(*(int *)((char *)g_game->_room + 4) + 0x44); *roomFlags = *roomFlags | 1; seed_fart_sound_override((int *)&local_1c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_1c,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_1c),1.0,2,0,1.0,0.0); return; } *(undefined4 *)(this + 1) = 0x1e; diff --git a/src/game/animation_data.cpp b/src/game/animation_data.cpp index 0b2b034..442aacb 100644 --- a/src/game/animation_data.cpp +++ b/src/game/animation_data.cpp @@ -12,10 +12,10 @@ int AnimationData::find_null_index(byte *name) bool isLess; byte ch; - iVar1 = *(int *)((int)&this[2]._layerCount + 2); + iVar1 = *(int *)(GHIDRA_INT(&this[2]._layerCount) + 2); nullIndex = 0; if (0 < iVar1) { - nullName = *(byte **)((int)&this[2]._animLayers + 2); + nullName = *(byte **)(GHIDRA_INT(&this[2]._animLayers) + 2); do { nameChars = nullName; if (0xf < *(uint *)(nullName + 0x14)) { @@ -27,7 +27,7 @@ int AnimationData::find_null_index(byte *name) isLess = ch < *queryChars; if (ch != *queryChars) { LAB_0040b565: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0040b56a; } if (ch == 0) break; diff --git a/src/game/animation_layer.cpp b/src/game/animation_layer.cpp index 7b5279d..1255bd8 100644 --- a/src/game/animation_layer.cpp +++ b/src/game/animation_layer.cpp @@ -71,7 +71,7 @@ void AnimationLayer::RenderFrame() local_14 = 0xffffffff; puStack_18 = &LAB_00b06981; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(textBuffer + 0x58); + local_24 = __security_cookie ^ GHIDRA_UINT((textBuffer + 0x58)); ExceptionList = &local_1c; local_134 = (ANM2 *)(this + 4); AVar3 = this[0x11]; @@ -100,20 +100,20 @@ LAB_008e3e98: bVar6 = bVar2 < *pbVar5; if (bVar2 != *pbVar5) { LAB_008e3e80: - uVar4 = -(uint)bVar6 | 1; + uVar4 = -GHIDRA_UINT(bVar6) | 1; goto LAB_008e3e85; } if (bVar2 == 0) break; bVar2 = *(byte *)((char *)AVar3 + 1); bVar6 = bVar2 < pbVar5[1]; if (bVar2 != pbVar5[1]) goto LAB_008e3e80; - AVar3 = (AnimationLayer)((int)AVar3 + 2); + AVar3 = (AnimationLayer)(GHIDRA_INT(AVar3) + 2); pbVar5 = pbVar5 + 2; } while (bVar2 != 0); uVar4 = 0; LAB_008e3e85: if ((uVar4 != 0) || - ((pbVar5 = textBuffer + 100, *(char *)((int)this[0x11] + 0x34) != '\0' && + ((pbVar5 = textBuffer + 100, *(char *)(GHIDRA_INT(this[0x11]) + 0x34) != '\0' && (pbVar5 = textBuffer + 100, *(char *)(this + 0x15) == '\0')))) goto LAB_008e3e98; } puStack_20 = pbVar5; @@ -150,8 +150,8 @@ LAB_008e3e85: rngShifts = 0x900000005; local_110 = 0.0; local_104 = (AnimationLayer) - (((uint)((*(int *)&(*(undefined1 *)((char *)(g_manager) + 0x2a6c4)) - (int)g_manager->_modManager >> 2) * 0x19 - ) >> 5) + 1); + ((GHIDRA_UINT(((*(int *)&(*(undefined1 *)((char *)(g_manager) + 0x2a6c4)) - GHIDRA_INT(g_manager->_modManager) >> 2) * 0x19 + )) >> 5) + 1); if (local_104 != (AnimationLayer)0x0) { do { if (local_118.y == 0.0) { @@ -160,7 +160,7 @@ LAB_008e3e85: (*pcVar1)(); return; } - uVar4 = (uint)local_118.y >> ((byte)rngShifts & 0x1f) ^ (uint)local_118.y; + uVar4 = GHIDRA_UINT(local_118.y) >> ((byte)rngShifts & 0x1f) ^ GHIDRA_UINT(local_118.y); uVar4 = uVar4 << ((byte)((ulonglong)rngShifts >> 0x20) & 0x1f) ^ uVar4; local_118.y = (float)(uVar4 >> (SUB41(local_10c.y,0) & 0x1f) ^ uVar4); sprintf_s(textBuffer,0x40,(byte *)"Piece%d"); @@ -183,25 +183,25 @@ LAB_008e414c: bVar6 = bVar2 < *pbVar5; if (bVar2 != *pbVar5) { LAB_008e4134: - uVar4 = -(uint)bVar6 | 1; + uVar4 = -GHIDRA_UINT(bVar6) | 1; goto LAB_008e4139; } if (bVar2 == 0) break; bVar2 = *(byte *)((char *)AVar3 + 1); bVar6 = bVar2 < pbVar5[1]; if (bVar2 != pbVar5[1]) goto LAB_008e4134; - AVar3 = (AnimationLayer)((int)AVar3 + 2); + AVar3 = (AnimationLayer)(GHIDRA_INT(AVar3) + 2); pbVar5 = pbVar5 + 2; } while (bVar2 != 0); uVar4 = 0; LAB_008e4139: if ((uVar4 != 0) || - ((*(char *)((int)this[0x11] + 0x34) != '\0' && (*(char *)(this + 0x15) == '\0')))) + ((*(char *)(GHIDRA_INT(this[0x11]) + 0x34) != '\0' && (*(char *)(this + 0x15) == '\0')))) goto LAB_008e414c; } - local_110 = (float)((int)local_110 + 1); + local_110 = (float)(GHIDRA_INT(local_110) + 1); VStack_140.x = originX + 0.0; - VStack_140.y = (float)(int)local_110 * 32.0 + originY; + VStack_140.y = (float)GHIDRA_INT(local_110) * 32.0 + originY; if ((*(undefined1 *)((char *)&(this[0x46]) + 0x1)) != '\0') { if (*(char *)(this + 0x20) == '\0') { AnimationState::Render @@ -215,7 +215,7 @@ LAB_008e4139: } AnimationState::Render(overlayAnim,&VStack_140,&g_vectorZero,&g_vectorZero); } - } while ((int)local_110 < (int)local_104); + } while (GHIDRA_INT(local_110) < GHIDRA_INT(local_104)); } AVar3 = this[0x11]; if (AVar3 != (AnimationLayer)0x0) { @@ -228,20 +228,20 @@ LAB_008e4139: bVar6 = bVar2 < (byte)*cmpName; if (bVar2 != *cmpName) { LAB_008e4255: - uVar4 = -(uint)bVar6 | 1; + uVar4 = -GHIDRA_UINT(bVar6) | 1; goto LAB_008e425a; } if (bVar2 == 0) break; bVar2 = *(byte *)((char *)AVar3 + 1); bVar6 = bVar2 < (byte)cmpName[1]; if (bVar2 != cmpName[1]) goto LAB_008e4255; - AVar3 = (AnimationLayer)((int)AVar3 + 2); + AVar3 = (AnimationLayer)(GHIDRA_INT(AVar3) + 2); cmpName = cmpName + 2; } while (bVar2 != 0); uVar4 = 0; LAB_008e425a: if ((uVar4 == 0) && - ((*(char *)((int)this[0x11] + 0x34) == '\0' || (*(char *)(this + 0x15) != '\0')))) + ((*(char *)(GHIDRA_INT(this[0x11]) + 0x34) == '\0' || (*(char *)(this + 0x15) != '\0')))) goto LAB_008e428b; } bVar2 = ((ANM2 *)((ANM2 *)(this + 4)))->ANM2::SetAnimation((byte *)"Bottom",1); @@ -251,7 +251,7 @@ LAB_008e425a: } LAB_008e428b: local_10c.x = originX + 0.0; - local_10c.y = (float)(int)local_104 * 32.0 + originY; + local_10c.y = (float)GHIDRA_INT(local_104) * 32.0 + originY; if ((*(undefined1 *)((char *)&(this[0x46]) + 0x1)) != '\0') { if (*(char *)(this + 0x20) == '\0') { AnimationState::Render((AnimationState *)(this + 0x10),&local_10c,&g_vectorZero,&g_vectorZero) @@ -266,7 +266,7 @@ LAB_008e428b: AnimationState::Render(overlayAnim,&local_10c,&g_vectorZero,&g_vectorZero); } modIter = gameManager->_modManager; - modCount = *(int *)&(*(undefined1 *)((char *)(gameManager) + 0x2a6c4)) - (int)modIter >> 2; + modCount = *(int *)&(*(undefined1 *)((char *)(gameManager) + 0x2a6c4)) - GHIDRA_INT(modIter) >> 2; if ((g_manager->_optionsConfig)._enableMods == 0) { local_104 = (AnimationLayer)0x0; if (modCount != 0) { @@ -274,7 +274,7 @@ LAB_008e428b: local_118.x = 0.8; local_118.y = 1.0; do { - local_10c.y = (float)((int)local_104 + 1); + local_10c.y = (float)(GHIDRA_INT(local_104) + 1); sprintf_s(textBuffer,0x40,(byte *)"%d.%s"); local_160 = 0x3f008081; uStack_15c = 0x3f008081; @@ -297,13 +297,13 @@ LAB_008e428b: local_184 = 0; local_180 = 0; local_14 = 2; - local_134 = (ANM2 *)((float)((double)(int)local_104 + - __uint_to_double_fixup[-((int)local_104 >> 0x1f)]) * 25.0 + + local_134 = (ANM2 *)((float)((double)GHIDRA_INT(local_104) + + __uint_to_double_fixup[-(GHIDRA_INT(local_104) >> 0x1f)]) * 25.0 + originY); glyphs = Font::measure_string (&g_manager->_font2_TeamMeatEx12,glyphBuffer,textBuffer,&local_198, &local_118); - local_14 = CONCAT31(local_14._1_3_,3); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),3); disabledModColor._green = (float)uStack_15c; disabledModColor._red = (float)local_160; disabledModColor._blue = (float)uStack_158; @@ -314,11 +314,11 @@ LAB_008e428b: disabledModColor,&local_198); std::vector<12byte>::clear(); std::vector<12byte>::_Tidy(); - modIter = (ModManager)((int)modIter + 4); + modIter = (ModManager)(GHIDRA_INT(modIter) + 4); local_14 = 0xffffffff; local_104 = (AnimationLayer)local_10c.y; - } while ((uint)local_10c.y < - (uint)(*(int *)&(*(undefined1 *)((char *)(gameManager) + 0x2a6c4)) - (int)gameManager->_modManager >> 2)); + } while (GHIDRA_UINT(local_10c.y) < + GHIDRA_UINT((*(int *)&(*(undefined1 *)((char *)(gameManager) + 0x2a6c4)) - GHIDRA_INT(gameManager->_modManager) >> 2))); this = menu; } } @@ -329,7 +329,7 @@ LAB_008e428b: local_110 = originX - 90.0; textScale.y = 1.0; do { - local_104 = (AnimationLayer)((int)local_118.y + 1); + local_104 = (AnimationLayer)(GHIDRA_INT(local_118.y) + 1); sprintf_s(textBuffer,0x40,(byte *)"%d.%s"); local_148 = 0; uStack_144 = 0; @@ -357,12 +357,12 @@ LAB_008e428b: local_168 = 0; local_164 = 0; local_14 = 0; - local_10c.y = (float)((double)(int)local_118.y + - __uint_to_double_fixup[-((int)local_118.y >> 0x1f)]) * 25.0 + originY; + local_10c.y = (float)((double)GHIDRA_INT(local_118.y) + + __uint_to_double_fixup[-(GHIDRA_INT(local_118.y) >> 0x1f)]) * 25.0 + originY; glyphs = Font::measure_string (&g_manager->_font2_TeamMeatEx12,&local_160,textBuffer,&local_17c, &textScale); - local_14 = CONCAT31(local_14._1_3_,1); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); modColor._green = (float)uStack_144; modColor._red = (float)local_148; modColor._blue = VStack_140.x; @@ -398,14 +398,14 @@ LAB_008e45d3: bVar6 = bVar2 < (byte)*cmpName; if (bVar2 != *cmpName) { LAB_008e45b0: - uVar4 = -(uint)bVar6 | 1; + uVar4 = -GHIDRA_UINT(bVar6) | 1; goto LAB_008e45b5; } if (bVar2 == 0) break; bVar2 = *(byte *)((char *)AVar3 + 1); bVar6 = bVar2 < (byte)cmpName[1]; if (bVar2 != cmpName[1]) goto LAB_008e45b0; - AVar3 = (AnimationLayer)((int)AVar3 + 2); + AVar3 = (AnimationLayer)(GHIDRA_INT(AVar3) + 2); cmpName = cmpName + 2; } while (bVar2 != 0); uVar4 = 0; @@ -415,8 +415,8 @@ LAB_008e45b5: goto LAB_008e45d3; } iconPos.x = originX - 93.0; - iconPos.y = ((float)((double)(int)local_104 + - __uint_to_double_fixup[-((int)local_104 >> 0x1f)]) * 25.0 - 16.0) + + iconPos.y = ((float)((double)GHIDRA_INT(local_104) + + __uint_to_double_fixup[-(GHIDRA_INT(local_104) >> 0x1f)]) * 25.0 - 16.0) + originY; if ((*(undefined1 *)((char *)&(this[0x46]) + 0x1)) != '\0') { if (*(char *)(this + 0x20) == '\0') { @@ -432,20 +432,20 @@ LAB_008e45b5: AnimationState::Render(overlayAnim,&iconPos,&g_vectorZero,&g_vectorZero); } } - modIter = (ModManager)((int)modIter + 4); + modIter = (ModManager)(GHIDRA_INT(modIter) + 4); local_118.y = (float)local_104; - } while ((uint)local_104 < - (uint)(*(int *)&(*(undefined1 *)((char *)(gameManager) + 0x2a6c4)) - (int)gameManager->_modManager >> 2)); + } while (GHIDRA_UINT(local_104) < + GHIDRA_UINT((*(int *)&(*(undefined1 *)((char *)(gameManager) + 0x2a6c4)) - GHIDRA_INT(gameManager->_modManager) >> 2))); } } menuManager = g_menuManager; AVar3 = *this; viewY = -216.0; - modCount = *(int *)&(*(undefined1 *)((char *)(g_manager) + 0x2a6c4)) - (int)g_manager->_modManager >> 2; - if (4 < (int)AVar3) { + modCount = *(int *)&(*(undefined1 *)((char *)(g_manager) + 0x2a6c4)) - GHIDRA_INT(g_manager->_modManager) >> 2; + if (4 < GHIDRA_INT(AVar3)) { scrollRow = modCount + -7; - if ((int)AVar3 < modCount + -3) { - scrollRow = (int)AVar3 + -4; + if (GHIDRA_INT(AVar3) < modCount + -3) { + scrollRow = GHIDRA_INT(AVar3) + -4; } viewY = -216.0 - (float)(scrollRow * 0x19); } diff --git a/src/game/animation_state.cpp b/src/game/animation_state.cpp index 850778c..dc2dd4c 100644 --- a/src/game/animation_state.cpp +++ b/src/game/animation_state.cpp @@ -24,7 +24,7 @@ AnimationState::AnimationState(void *owner, AnimationState *other) else { allocBytes = (ulonglong)*(uint *)((char *)animData + 0x1c) * 4; animData = operator_new_tracked - (-(uint)((int)((ulonglong)allocBytes >> 0x20) != 0) | (uint)allocBytes); + (-GHIDRA_UINT((GHIDRA_INT(((ulonglong)allocBytes >> 0x20)) != 0)) | GHIDRA_UINT(allocBytes)); this->_layerFrames = animData; memcpy(animData,other->_layerFrames,*(int *)((char *)this->_animData + 0x1c) << 2); animData = this->_animData; @@ -35,7 +35,7 @@ AnimationState::AnimationState(void *owner, AnimationState *other) else { allocBytes = (ulonglong)*(uint *)((char *)animData + 0x24) * 4; animData = operator_new_tracked - (-(uint)((int)((ulonglong)allocBytes >> 0x20) != 0) | (uint)allocBytes); + (-GHIDRA_UINT((GHIDRA_INT(((ulonglong)allocBytes >> 0x20)) != 0)) | GHIDRA_UINT(allocBytes)); this->_nullLayerFrames = animData; memcpy(animData,other->_nullLayerFrames,*(int *)((char *)this->_animData + 0x24) << 2); } @@ -100,7 +100,7 @@ void AnimationState::SetAnimationData(void *animData) allocBytes = (ulonglong)*(uint *)((char *)pvVar1 + 0x1c) * 4; pvVar1 = tracked_alloc(0,(void *)0x0, (ulonglong) - (-(uint)((int)((ulonglong)allocBytes >> 0x20) != 0) | (uint)allocBytes) + (-GHIDRA_UINT((GHIDRA_INT(((ulonglong)allocBytes >> 0x20)) != 0)) | GHIDRA_UINT(allocBytes)) ); this->_layerFrames = pvVar1; memset(pvVar1,0xff,*(int *)((char *)this->_animData + 0x1c) << 2); @@ -111,7 +111,7 @@ void AnimationState::SetAnimationData(void *animData) allocBytes = (ulonglong)*(uint *)((char *)pvVar1 + 0x24) * 4; pvVar1 = tracked_alloc(0,(void *)0x0, (ulonglong) - (-(uint)((int)((ulonglong)allocBytes >> 0x20) != 0) | (uint)allocBytes) + (-GHIDRA_UINT((GHIDRA_INT(((ulonglong)allocBytes >> 0x20)) != 0)) | GHIDRA_UINT(allocBytes)) ); this->_nullLayerFrames = pvVar1; memset(pvVar1,0xff,*(int *)((char *)this->_animData + 0x24) << 2); @@ -172,7 +172,7 @@ void AnimationState::ChangeAnimationKeepFrame(void *animData) newNullLayerCount = *(void **)((char *)newAnimData + 0x24); } if (uVar3 != newLayerCount) { - if ((int)newLayerCount < 1) { + if (GHIDRA_INT(newLayerCount) < 1) { if (this->_layerFrames != (void *)0x0) { local_8 = 0; tracked_alloc(1,this->_layerFrames,0); @@ -183,10 +183,10 @@ void AnimationState::ChangeAnimationKeepFrame(void *animData) else { pvVar2 = tracked_alloc(0,(void *)0x0, (ulonglong) - (-(uint)((int)((ulonglong)newLayerCount * 4 >> 0x20) != 0) | - (uint)((ulonglong)newLayerCount * 4))); + (-GHIDRA_UINT((GHIDRA_INT(((ulonglong)newLayerCount * 4 >> 0x20)) != 0)) | + GHIDRA_UINT(((ulonglong)newLayerCount * 4)))); memset(pvVar2,0xff,newLayerCount * 4); - if (0 < (int)uVar3) { + if (0 < GHIDRA_INT(uVar3)) { memcpy(pvVar2,this->_layerFrames,uVar3 << 2); } temp_5f5450bd6d = this->_layerFrames; @@ -195,21 +195,21 @@ void AnimationState::ChangeAnimationKeepFrame(void *animData) allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar3 = *(uint *)((char *)temp_5f5450bd6d + -4); qVar1 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar3; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar3; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar1 < uVar3); - free((void *)((int)temp_5f5450bd6d + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar3)); + free((void *)(GHIDRA_INT(temp_5f5450bd6d) + -4)); local_8 = 0xffffffff; } this->_layerFrames = pvVar2; } } if (animData != newNullLayerCount) { - if ((int)newNullLayerCount < 1) { + if (GHIDRA_INT(newNullLayerCount) < 1) { if (this->_nullLayerFrames != (void *)0x0) { local_8 = 2; tracked_alloc(1,this->_nullLayerFrames,0); @@ -219,11 +219,11 @@ void AnimationState::ChangeAnimationKeepFrame(void *animData) else { pvVar2 = tracked_alloc(0,(void *)0x0, (ulonglong) - (-(uint)((int)(ZEXT48(newNullLayerCount) * 4 >> 0x20) != 0) | - (uint)(ZEXT48(newNullLayerCount) * 4))); - memset(pvVar2,0xff,(int)newNullLayerCount * 4); - if (0 < (int)animData) { - memcpy(pvVar2,this->_nullLayerFrames,(int)animData << 2); + (-GHIDRA_UINT((GHIDRA_INT((ZEXT48(newNullLayerCount) * 4 >> 0x20)) != 0)) | + GHIDRA_UINT((ZEXT48(newNullLayerCount) * 4)))); + memset(pvVar2,0xff,GHIDRA_INT(newNullLayerCount) * 4); + if (0 < GHIDRA_INT(animData)) { + memcpy(pvVar2,this->_nullLayerFrames,GHIDRA_INT(animData) << 2); } newNullLayerCount = this->_nullLayerFrames; if (newNullLayerCount != (void *)0x0) { @@ -231,14 +231,14 @@ void AnimationState::ChangeAnimationKeepFrame(void *animData) allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar3 = *(uint *)((char *)newNullLayerCount + -4); qVar1 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar3; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar3; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar1 < uVar3); - free((void *)((int)newNullLayerCount + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar3)); + free((void *)(GHIDRA_INT(newNullLayerCount) + -4)); this->_nullLayerFrames = (void *)0x0; } this->_layerFrames = pvVar2; @@ -357,7 +357,7 @@ void AnimationState::AdvancePosition(int targetFrame) currentFrame = this->_animFrame; dVar1 = floor((double)currentFrame); - if (targetFrame < (int)dVar1) { + if (targetFrame < GHIDRA_INT(dVar1)) { KAGE_LogMessage(0x10,(byte *) "Animation::AdvancePosition cannot go backward (new: %d, cur: %d)\n"); currentFrame = this->_animFrame; @@ -410,8 +410,8 @@ void AnimationState::SetFrameFloat(float frame) layer = 0; if (*(int *)((char *)animData + 0x1c) != 0) { do { - if (((animData == (void *)0x0) || ((int)layer < 0)) || - (*(int *)((char *)animData + 0x1c) <= (int)layer)) { + if (((animData == (void *)0x0) || (GHIDRA_INT(layer) < 0)) || + (*(int *)((char *)animData + 0x1c) <= GHIDRA_INT(layer))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } *(undefined4 *)((char *)this->_layerFrames + layer * 4) = 0; @@ -423,8 +423,8 @@ void AnimationState::SetFrameFloat(float frame) layer = 0; if (*(int *)((char *)animData + 0x24) != 0) { do { - if (((animData == (void *)0x0) || ((int)layer < 0)) || - (*(int *)((char *)animData + 0x24) <= (int)layer)) { + if (((animData == (void *)0x0) || (GHIDRA_INT(layer) < 0)) || + (*(int *)((char *)animData + 0x24) <= GHIDRA_INT(layer))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } *(undefined4 *)((char *)this->_nullLayerFrames + layer * 4) = 0; @@ -467,7 +467,7 @@ int AnimationState::GetLayerFrameIdx(int layerId) return 0; } if (layerId < *(int *)((char *)this->_animation + 0x80)) { - return *(int *)((int)this->_layerFrames + + return *(int *)(GHIDRA_INT(this->_layerFrames) + *(int *)((char *)this->_animData + layerId * 4 + 0x38) * 4); } return 0; @@ -502,20 +502,20 @@ void AnimationState::Update() currentFrame = this->_animFrame; nextFrame = currentFrame + *(float *)((char *)this->_animation + 0x104); dVar1 = floor((double)nextFrame); - if (*(int *)((char *)animData + 0x30) <= (int)dVar1) { + if (*(int *)((char *)animData + 0x30) <= GHIDRA_INT(dVar1)) { if (*(char *)((char *)animData + 0x34) != '\0') { Rewind(this); return; } targetFrame = *(int *)((char *)animData + 0x30) + -1; dVar1 = floor((double)currentFrame); - if ((int)dVar1 <= targetFrame) { + if (GHIDRA_INT(dVar1) <= targetFrame) { AdvancePosition(this,targetFrame); } this->_isPlaying = 0; return; } - AdvancePosition(this,(int)dVar1); + AdvancePosition(this,GHIDRA_INT(dVar1)); this->_animFrame = nextFrame; } return; @@ -641,7 +641,7 @@ void * AnimationState::GetNullFrame(byte *nullLayerName) isLess = ch < *nameCursor; if (ch != *nameCursor) { LAB_0040ad50: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0040ad55; } if (ch == 0) break; @@ -665,7 +665,7 @@ LAB_0040ad55: frameIdxPtr = this->_nullLayerFrames; do { if (((*nullTrack == nullLayerIdx) && (frameIdx = *frameIdxPtr, -1 < frameIdx)) && - (frameIdx < (int)nullTrack[3])) { + (frameIdx < GHIDRA_INT(nullTrack[3]))) { return (void *)(frameIdx * 0x54 + nullTrack[2]); } uVar1 = uVar1 + 1; @@ -712,7 +712,7 @@ byte AnimationState::IsEventTriggered(byte *eventName) isLess = ch < *queryChar; if (ch != *queryChar) { LAB_0040ae32: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0040ae37; } if (ch == 0) break; @@ -725,7 +725,7 @@ LAB_0040ae32: compareResult = 0; LAB_0040ae37: if (compareResult == 0) { - if ((int)eventIndex < 0) { + if (GHIDRA_INT(eventIndex) < 0) { return 0; } return (this->_currentlyTriggeredEvents & 1 << ((byte)eventIndex & 0x1f)) != 0; @@ -767,7 +767,7 @@ byte AnimationState::WasEventTriggered(byte *eventName) isLess = nameChar < *wantedName; if (nameChar != *wantedName) { LAB_0040aed2: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0040aed7; } if (nameChar == 0) break; @@ -780,7 +780,7 @@ LAB_0040aed2: compareResult = 0; LAB_0040aed7: if (compareResult == 0) { - if ((int)eventIdx < 0) { + if (GHIDRA_INT(eventIdx) < 0) { return 0; } return (this->_previouslyTriggeredEvents & 1 << ((byte)eventIdx & 0x1f)) != 0; @@ -828,7 +828,7 @@ int AnimationState::NextEventTrigger(byte *eventName) isLess = ch < *wantedName; if (ch != *wantedName) { LAB_0040af74: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0040af79; } if (ch == 0) break; @@ -841,7 +841,7 @@ LAB_0040af74: compareResult = 0; LAB_0040af79: if (compareResult == 0) { - if ((int)eventIndex < 0) { + if (GHIDRA_INT(eventIndex) < 0) { return -1; } nextFrame = -1; @@ -853,7 +853,7 @@ LAB_0040af79: do { if (*(uint *)(*(int *)((char *)animData + 0x28) + uVar1 * 8) == eventIndex) { eventFrame = *(int *)(*(int *)((char *)animData + 0x28) + 4 + uVar1 * 8); - framesUntil = eventFrame - (int)this->_animFrame; + framesUntil = eventFrame - GHIDRA_INT(this->_animFrame); nextFrame = bestFrame; if ((0 < framesUntil) && ((nearestDelta < 0 || (framesUntil < nearestDelta)))) { nearestDelta = framesUntil; diff --git a/src/game/anm2.cpp b/src/game/anm2.cpp index 7607bc1..4711e5e 100644 --- a/src/game/anm2.cpp +++ b/src/game/anm2.cpp @@ -29,12 +29,12 @@ void ANM2::constructor() (this->_animState)._layerFrames = (void *)0x0; (this->_animState)._nullLayerFrames = (void *)0x0; ((AnimationState *)(&this->_animState))->AnimationState::SetAnimationData((void *)0x0); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; (this->_overlayAnimState)._animation = this; (this->_overlayAnimState)._layerFrames = (void *)0x0; (this->_overlayAnimState)._nullLayerFrames = (void *)0x0; ((AnimationState *)(&this->_overlayAnimState))->AnimationState::SetAnimationData((void *)0x0); - local_8 = CONCAT31(local_8._1_3_,3); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); (this->_offset).y = 0.0; (this->_offset).x = 0.0; (this->_scale).y = 0.0; @@ -100,11 +100,11 @@ ANM2::ANM2(ANM2 *other) ((std::string *)((char *)this))->std::string::string(other); local_14 = 0; ((std::string *)((this->_animDefaultName)._buf))->std::string::string(&other->_animDefaultName); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; ((AnimationState *)(&this->_animState))->AnimationState::AnimationState(this,&other->_animState); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; ((AnimationState *)(&this->_overlayAnimState))->AnimationState::AnimationState(this,&other->_overlayAnimState); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; this->_overlayRenderFirst = other->_overlayRenderFirst; this->_animData = other->_animData; this->_animCount = other->_animCount; @@ -167,11 +167,11 @@ ANM2::ANM2(ANM2 *other) } layerCount = other->_layerCount; local_28 = (uint *)0x0; - allocSize = -(uint)((int)((ulonglong)layerCount * 0xa0 >> 0x20) != 0) | - (uint)((ulonglong)layerCount * 0xa0); + allocSize = -GHIDRA_UINT((GHIDRA_INT(((ulonglong)layerCount * 0xa0 >> 0x20)) != 0)) | + GHIDRA_UINT(((ulonglong)layerCount * 0xa0)); local_24 = layerCount; - local_34 = operator_new_tracked(-(uint)(0xfffffffb < allocSize) | allocSize + 4); - local_14._0_1_ = 4; + local_34 = operator_new_tracked(-GHIDRA_UINT((0xfffffffb < allocSize)) | allocSize + 4); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; if (local_34 == (uint *)0x0) { local_28 = (uint *)0x0; } @@ -186,9 +186,9 @@ ANM2::ANM2(ANM2 *other) if (other->_layerCount != 0) { local_28 = (uint *)0x0; do { - local_14._0_1_ = 3; - srcLayer = (LayerState *)((int)other->_layerState + (int)local_28); - dstLayer = (undefined4 *)((int)this->_layerState + (int)local_28); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; + srcLayer = (LayerState *)(GHIDRA_INT(other->_layerState) + GHIDRA_INT(local_28)); + dstLayer = (undefined4 *)(GHIDRA_INT(this->_layerState) + GHIDRA_INT(local_28)); *dstLayer = srcLayer->_layerData; text = &srcLayer->_spriteSheetPath; if ((std_string *)(dstLayer + 2) != text) { @@ -198,9 +198,9 @@ ANM2::ANM2(ANM2 *other) ((std::string *)((char *)(dstLayer + 2)))->std::string::assign((byte *)text,(srcLayer->_spriteSheetPath)._size); } textureRef = ((LayerState *)(srcLayer))->LayerState::GetTexture(tmpTexture); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; ((KAGE::SmartPointer *)(dstLayer + 0x26))->KAGE::SmartPointer::operator_assign(textureRef); - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; if (local_34 != (uint *)0x0) { isLastRef = (**(code **)(*local_34 + 0xc))(); if ((isLastRef != '\0') && (g_imageReleaseFn != (void *)0x0)) { @@ -246,10 +246,10 @@ ANM2::ANM2(ANM2 *other) dstLayer[0x23] = srcLayer->_bitflags; dstLayer[0x24] = (srcLayer->_cropOffset).x; dstLayer[0x25] = (srcLayer->_cropOffset).y; - *(ANM2 **)((char *)local_28 + 4 + (int)self->_layerState) = self; - local_28 = (uint *)((int)local_28 + 0xa0); + *(ANM2 **)((char *)local_28 + 4 + GHIDRA_INT(self->_layerState)) = self; + local_28 = (uint *)(GHIDRA_INT(local_28) + 0xa0); this = self; - } while (local_24 < (uint)other->_layerCount); + } while (local_24 < GHIDRA_UINT(other->_layerCount)); } ExceptionList = local_1c; return this; @@ -314,7 +314,7 @@ void ANM2::Reset() this->_animData = (void *)0x0; this->_animCount = 0; if (layerStates != (void *)0x0) { - ptr = (uint *)((int)layerStates + -4); + ptr = (uint *)(GHIDRA_INT(layerStates) + -4); local_8 = 0; _eh_vector_destructor_iterator_(layerStates,0xa0,*ptr,LayerState::~LayerState); operator_delete(ptr,*ptr * 0xa0 + 4); @@ -430,7 +430,7 @@ void ANM2::Play(byte *anim, byte reset) isLess = bVar1 < *wantedName; if (bVar1 != *wantedName) { LAB_0040a3c1: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0040a3c6; } if (bVar1 == 0) break; @@ -480,7 +480,7 @@ byte ANM2::IsPlaying(byte *name) isLess = nameChar < *name; if (nameChar != *name) { LAB_0040a510: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0040a515; } if (nameChar == 0) break; @@ -526,7 +526,7 @@ byte ANM2::IsFinishedImpl(byte *animName) nameChar = nameChar < *animName; if (nameChar != *animName) { LAB_0040a598: - compareResult = -(uint)nameChar | 1; + compareResult = -GHIDRA_UINT(nameChar) | 1; goto LAB_0040a59d; } if (nameChar == 0) break; @@ -571,7 +571,7 @@ byte ANM2::SetAnimation(byte *anim, byte reset) isBelow = nameChar < *queryNameCursor; if (nameChar != *queryNameCursor) { LAB_0040a620: - compareResult = -(uint)isBelow | 1; + compareResult = -GHIDRA_UINT(isBelow) | 1; goto LAB_0040a625; } if (nameChar == 0) break; @@ -584,7 +584,7 @@ LAB_0040a620: compareResult = 0; LAB_0040a625: if (compareResult == 0) { - animEntry = (byte *)((int)this->_animData + animIndex * 0x13c); + animEntry = (byte *)(GHIDRA_INT(this->_animData) + animIndex * 0x13c); if (reset == 0) { ((AnimationState *)(&this->_animState))->AnimationState::ChangeAnimationKeepFrame(animEntry); return 1; @@ -594,7 +594,7 @@ LAB_0040a625: } animIndex = animIndex + 1; animEntry = animEntry + 0x13c; - } while (animIndex < (uint)this->_animCount); + } while (animIndex < GHIDRA_UINT(this->_animCount)); } KAGE_LogMessage(1,(byte *)"[warn] no animation named %s\n"); return 0; @@ -627,7 +627,7 @@ int ANM2::GetFrame() return -1; } frame = floor((double)(this->_animState)._animFrame); - return (int)frame; + return GHIDRA_INT(frame); } // 0040a7e0 @@ -650,7 +650,7 @@ void ANM2::SetLayerFrame(int layerid, int frame) (*(int *)((char *)animData + 0x1c) <= layerId)) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(this->_animState)._layerFrames + layerId * 4) = 0; + *(undefined4 *)(GHIDRA_INT((this->_animState)._layerFrames) + layerId * 4) = 0; ((AnimationState *)(animState))->AnimationState::AdvanceLayerPosition(layerId,(float)frame); } } @@ -679,7 +679,7 @@ void ANM2::PlayOverlay(byte *animName, byte isForce) isLess = bVar1 < *targetNameCursor; if (bVar1 != *targetNameCursor) { LAB_0040a981: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0040a986; } if (bVar1 == 0) break; @@ -733,7 +733,7 @@ byte ANM2::SetOverlayAnimation(byte *anim, byte reset) isNameLess = nameChar < *wantedNameCursor; if (nameChar != *wantedNameCursor) { LAB_0040ab40: - nameCompare = -(uint)isNameLess | 1; + nameCompare = -GHIDRA_UINT(isNameLess) | 1; goto LAB_0040ab45; } if (nameChar == 0) break; @@ -746,7 +746,7 @@ LAB_0040ab40: nameCompare = 0; LAB_0040ab45: if (nameCompare == 0) { - pbVar1 = (byte *)((int)this->_animData + animIndex * 0x13c); + pbVar1 = (byte *)(GHIDRA_INT(this->_animData) + animIndex * 0x13c); if (reset == 0) { ((AnimationState *)(&this->_overlayAnimState))->AnimationState::ChangeAnimationKeepFrame(pbVar1); return 1; @@ -756,7 +756,7 @@ LAB_0040ab45: } animIndex = animIndex + 1; pbVar1 = pbVar1 + 0x13c; - } while (animIndex < (uint)this->_animCount); + } while (animIndex < GHIDRA_UINT(this->_animCount)); } KAGE_LogMessage(1,(byte *)"[warn] no animation named %s\n"); return 0; @@ -815,7 +815,7 @@ void * ANM2::GetNullFrame(byte *animName, byte *nullLayerName, int frame) if (this->_numNullLayers != 0) { foundIdx = 0xffffffff; do { - layerNameChar = (byte *)((int)this->_nullLayerNames + i * 0x18); + layerNameChar = (byte *)(GHIDRA_INT(this->_nullLayerNames) + i * 0x18); if (0xf < *(uint *)((char *)this->_nullLayerNames + i * 0x18 + 0x14)) { layerNameChar = *(byte **)layerNameChar; } @@ -825,7 +825,7 @@ void * ANM2::GetNullFrame(byte *animName, byte *nullLayerName, int frame) isLess = currentChar < *nullNameChar; if (currentChar != *nullNameChar) { LAB_0040b132: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0040b137; } if (currentChar == 0) break; @@ -843,13 +843,13 @@ LAB_0040b137: } i = i + 1; foundIdx = nullLayerIdx; - } while (i < (uint)this->_numNullLayers); - if (-1 < (int)nullLayerIdx) { + } while (i < GHIDRA_UINT(this->_numNullLayers)); + if (-1 < GHIDRA_INT(nullLayerIdx)) { i = 0; if (*(uint *)((char *)animData + 0x24) != 0) { nullAnim = *(uint **)((char *)animData + 0x20); do { - if (((*nullAnim == nullLayerIdx) && (-1 < frame)) && (frame < (int)nullAnim[3])) { + if (((*nullAnim == nullLayerIdx) && (-1 < frame)) && (frame < GHIDRA_INT(nullAnim[3]))) { return (void *)(frame * 0x54 + nullAnim[2]); } i = i + 1; @@ -886,13 +886,13 @@ LayerState * ANM2::GetLayer(byte *layerName) uStack_8 = 0xffffffff; puStack_c = &LAB_00af0c31; local_10 = ExceptionList; - stackCookie = __security_cookie ^ (int)register0x00000010 - 4U; + stackCookie = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; - if (((-1 < (int)layerName) && ((int)layerName < this->_layerCount)) || - ((KAGE_LogMessage(0x10,(byte *)"%s: No layer with Id %d\n"), -1 < (int)layerName && - ((int)layerName < this->_layerCount)))) { + if (((-1 < GHIDRA_INT(layerName)) && (GHIDRA_INT(layerName) < this->_layerCount)) || + ((KAGE_LogMessage(0x10,(byte *)"%s: No layer with Id %d\n"), -1 < GHIDRA_INT(layerName) && + (GHIDRA_INT(layerName) < this->_layerCount)))) { ExceptionList = local_10; - return (LayerState *)((int)layerName * 0xa0 + (int)this->_layerState); + return (LayerState *)(GHIDRA_INT(layerName) * 0xa0 + GHIDRA_INT(this->_layerState)); } if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < _DAT_00c7f628) && (_Init_thread_header(&DAT_00c7f628,stackCookie), _DAT_00c7f628 == -1)) { @@ -923,12 +923,12 @@ LayerState * ANM2::get_layer_by_string(std_string *name) byte ****layerNameBuffer; uint savedCapacity; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); layerIdx = 0; if (this->_layerCount != 0) { layerOffset = 0; do { - layerData = *(int *)(layerOffset + (int)this->_layerState); + layerData = *(int *)(layerOffset + GHIDRA_INT(this->_layerState)); if (layerData == 0) { layerName[0] = (byte ****)0x0; layerNameCapacity = 0xf; @@ -954,7 +954,7 @@ LayerState * ANM2::get_layer_by_string(std_string *name) if (0xfff < size) { ppppbVar1 = (byte ****)layerNameBuffer[-1]; size = savedCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)layerNameBuffer + (-4 - (int)ppppbVar1))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(layerNameBuffer) + (-4 - GHIDRA_INT(ppppbVar1)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -962,11 +962,11 @@ LayerState * ANM2::get_layer_by_string(std_string *name) operator_delete(ppppbVar1,size); } if (isMatch != 0) { - return (LayerState *)(layerIdx * 0xa0 + (int)this->_layerState); + return (LayerState *)(layerIdx * 0xa0 + GHIDRA_INT(this->_layerState)); } layerIdx = layerIdx + 1; layerOffset = layerOffset + 0xa0; - } while (layerIdx < (uint)this->_layerCount); + } while (layerIdx < GHIDRA_UINT(this->_layerCount)); } return (LayerState *)0x0; } @@ -1021,11 +1021,11 @@ KColor * ANM2::GetTexel(AnimationState *anim, KColor *outColor, int layerId, Vec undefined4 ehState; int layerAnim; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); ehState = 0xffffffff; puStack_18 = &LAB_00af0c80; savedExceptionList = ExceptionList; - stackCookie = __security_cookie ^ (int)register0x00000010 - 0x10U; + stackCookie = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &savedExceptionList; outColorLocal = outColor; alphaThresholdLocal = alphaThreshold; @@ -1149,7 +1149,7 @@ KColor * ANM2::GetTexel(AnimationState *anim, KColor *outColor, int layerId, Vec } ehState = 0xffffffff; if (alphaThresholdLocal <= local_c0) { - ((Color *)(&layerColor))->Color::operator_assign((ColorMod *)((int)animState->_animation + 0xa8)); + ((Color *)(&layerColor))->Color::operator_assign((ColorMod *)(GHIDRA_INT(animState->_animation) + 0xa8)); FUN_004072e0(); layerColor._offset[2] = 5.944584e-39; FUN_004072e0(); @@ -1205,7 +1205,7 @@ void * ANM2::GetAnimationData(byte *name) isLess = bVar1 < *targetNameCursor; if (bVar1 != *targetNameCursor) { LAB_0040bd15: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0040bd1a; } if (bVar1 == 0) break; @@ -1218,11 +1218,11 @@ LAB_0040bd15: cmpResult = 0; LAB_0040bd1a: if (cmpResult == 0) { - return (byte *)((int)this->_animData + animIdx * 0x13c); + return (byte *)(GHIDRA_INT(this->_animData) + animIdx * 0x13c); } animIdx = animIdx + 1; animEntry = animEntry + 0x13c; - } while (animIdx < (uint)this->_animCount); + } while (animIdx < GHIDRA_UINT(this->_animCount)); } return (void *)0x0; } @@ -1267,7 +1267,7 @@ void ANM2::Load(std_string *ANM2Path, byte loadgraphics) if (this->_layerCount != 0) { _loadgraphics = 0; do { - layerState = (int *)((int)this->_layerState + _loadgraphics); + layerState = (int *)(GHIDRA_INT(this->_layerState) + _loadgraphics); iVar3 = *layerState; if (iVar3 == 0) { layerName = &s_empty; @@ -1285,7 +1285,7 @@ void ANM2::Load(std_string *ANM2Path, byte loadgraphics) bVar4 = bVar1 < (byte)*pcVar2; if (bVar1 != *pcVar2) { LAB_0040be20: - compareResult = -(uint)bVar4 | 1; + compareResult = -GHIDRA_UINT(bVar4) | 1; goto LAB_0040be25; } if (bVar1 == 0) break; @@ -1307,7 +1307,7 @@ LAB_0040be25: } layerIdx = layerIdx + 1; _loadgraphics = _loadgraphics + 0xa0; - } while (layerIdx < (uint)this->_layerCount); + } while (layerIdx < GHIDRA_UINT(this->_layerCount)); } iVar3 = this->_numNullLayers; if (iVar3 != 0) { @@ -1375,8 +1375,8 @@ void ANM2::LoadGraphics(byte unk) savedThis = this; do { local_8 = 0xffffffff; - if (*(char *)(layerOffset + 0x30 + (int)this->_layerState) == '\0') { - pbVar2 = (byte *)((int)this->_layerState + layerOffset + 8); + if (*(char *)(layerOffset + 0x30 + GHIDRA_INT(this->_layerState)) == '\0') { + pbVar2 = (byte *)(GHIDRA_INT(this->_layerState) + layerOffset + 8); if (0xf < *(uint *)(pbVar2 + 0x14)) { pbVar2 = *(byte **)pbVar2; } @@ -1397,17 +1397,17 @@ LAB_0040c096: } piVar4 = &oldTexture; pvVar3 = (void *)0x40c0a8; - ((LayerState *)((LayerState *)((int)this->_layerState + layerOffset)))->LayerState::GetTexture(piVar4); - local_8 = CONCAT31(local_8._1_3_,1); + ((LayerState *)((LayerState *)(GHIDRA_INT(this->_layerState) + layerOffset)))->LayerState::GetTexture(piVar4); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); if (oldTexture != 0) { layerStates = this->_layerState; pbVar2 = *(byte **)(oldTexture + 0x44); ((KAGE::SmartPointer *)(auStackY_dc + 0x84))->KAGE::SmartPointer::SmartPointer((void *)0x0); - ((LayerState *)((LayerState *)((int)layerStates + layerOffset)))->LayerState::SetTexture(pvVar3,piVar4); + ((LayerState *)((LayerState *)(GHIDRA_INT(layerStates) + layerOffset)))->LayerState::SetTexture(pvVar3,piVar4); TextureCache::Release(pbVar2); this = savedThis; } - layerState = (LayerState *)((int)this->_layerState + layerOffset); + layerState = (LayerState *)(GHIDRA_INT(this->_layerState) + layerOffset); texture = (undefined4 *)0x0; piVar4 = (int *)0x0; imageRefCountCopy = imageRefCount; @@ -1424,9 +1424,9 @@ LAB_0040c096: } } ((LayerState *)(layerState))->LayerState::SetTexture(texture,piVar4); - *(undefined1 *)(layerOffset + 0x30 + (int)this->_layerState) = isLoaded; - *(undefined1 *)(layerOffset + 0x31 + (int)this->_layerState) = 0; - local_8 = CONCAT31(local_8._1_3_,2); + *(undefined1 *)(layerOffset + 0x30 + GHIDRA_INT(this->_layerState)) = isLoaded; + *(undefined1 *)(layerOffset + 0x31 + GHIDRA_INT(this->_layerState)) = 0; + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); if (((oldTextureRefCount != (int *)0x0) && (cVar1 = (**(code **)(*oldTextureRefCount + 0xc))(), cVar1 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { @@ -1441,7 +1441,7 @@ LAB_0040c096: } layerIdx = layerIdx + 1; layerOffset = layerOffset + 0xa0; - } while (layerIdx < (uint)this->_layerCount); + } while (layerIdx < GHIDRA_UINT(this->_layerCount)); } ExceptionList = local_10; return; @@ -1507,14 +1507,14 @@ void ANM2::LoadDeliriumForm(ANM2 *sprite, int type, int variant, byte isReloadAn undefined1 *puStack_18; undefined4 local_14; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00af305d; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; pAVar8 = sprite; - puVar3 = (undefined1 *)((int)register0x00000010 + -4); + puVar3 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); if (isReloadAnm2 != 0) { entityConfig = ((EntityConfig *)(&g_manager->_entityConfig))->EntityConfig::GetEntity(type,variant,0); pAVar8 = extraout_ECX; @@ -1543,10 +1543,10 @@ void ANM2::LoadDeliriumForm(ANM2 *sprite, int type, int variant, byte isReloadAn psVar6 = *(std_string **)psVar6->_buf; } if (uVar11 < 0x10) { - sheetPath._buf._0_4_ = *(undefined4 *)psVar6->_buf; - sheetPath._buf._4_4_ = *(undefined4 *)(psVar6->_buf + 4); - sheetPath._buf._8_4_ = *(undefined4 *)(psVar6->_buf + 8); - sheetPath._buf._12_4_ = *(undefined4 *)(psVar6->_buf + 0xc); + (*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) = *(undefined4 *)psVar6->_buf; + (*(undefined4 *)((char *)&(sheetPath._buf) + 0x4)) = *(undefined4 *)(psVar6->_buf + 4); + (*(undefined4 *)((char *)&(sheetPath._buf) + 0x8)) = *(undefined4 *)(psVar6->_buf + 8); + (*(undefined4 *)((char *)&(sheetPath._buf) + 0xc)) = *(undefined4 *)(psVar6->_buf + 0xc); uVar10 = 0xf; bVar12 = extraout_CL; } @@ -1555,8 +1555,8 @@ void ANM2::LoadDeliriumForm(ANM2 *sprite, int type, int variant, byte isReloadAn if (0x7fffffff < uVar10) { uVar10 = 0x7fffffff; } - sheetPath._buf._0_4_ = std::_Allocate(uVar10 + 1); - memcpy((void *)sheetPath._buf._0_4_,psVar6,uVar11 + 1); + (*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) = std::_Allocate(uVar10 + 1); + memcpy((*(undefined4 *)((char *)&((void *)sheetPath._buf) + 0x0)),psVar6,uVar11 + 1); bVar12 = extraout_CL_00; } local_14 = 0; @@ -1565,7 +1565,7 @@ void ANM2::LoadDeliriumForm(ANM2 *sprite, int type, int variant, byte isReloadAn if (type != 0x19c) { psVar6 = &sheetPath; if (0xf < uVar10) { - psVar6 = (std_string *)sheetPath._buf._0_4_; + psVar6 = (*(undefined4 *)((char *)&((std_string *)sheetPath._buf) + 0x0)); } iVar5 = _strnicmp(psVar6->_buf + 4,"bosses",6); uVar10 = sheetPath._capacity; @@ -1582,7 +1582,7 @@ void ANM2::LoadDeliriumForm(ANM2 *sprite, int type, int variant, byte isReloadAn if (replacedLen == 0x23) { psVar6 = &sheetPath; if (0xf < sheetPath._capacity) { - psVar6 = (std_string *)sheetPath._buf._0_4_; + psVar6 = (*(undefined4 *)((char *)&((std_string *)sheetPath._buf) + 0x0)); } memmove(psVar6->_buf + 4,"Bosses/AfterbirthPlus/DeliriumForms",0x23); LAB_004a609a: @@ -1593,7 +1593,7 @@ LAB_004a609a: sheetPath._size = (sheetPath._size - replacedLen) + 0x23; psVar6 = &sheetPath; if (0xf < sheetPath._capacity) { - psVar6 = (std_string *)sheetPath._buf._0_4_; + psVar6 = (*(undefined4 *)((char *)&((std_string *)sheetPath._buf) + 0x0)); } memmove(psVar6->_buf + 4,"Bosses/AfterbirthPlus/DeliriumForms",0x23); memmove(psVar6[1]._buf + 0xf,psVar6->_buf + 4 + replacedLen,tailLen); @@ -1603,7 +1603,7 @@ LAB_004a609a: if (uVar9 <= sheetPath._capacity - sheetPath._size) { psVar6 = &sheetPath; if (0xf < sheetPath._capacity) { - psVar6 = (std_string *)sheetPath._buf._0_4_; + psVar6 = (*(undefined4 *)((char *)&((std_string *)sheetPath._buf) + 0x0)); } _Src = psVar6->_buf + replacedLen + 4; _Dst = psVar6->_buf + 4; @@ -1620,9 +1620,9 @@ LAB_004a609a: sheetPath._size = sheetPath._size + uVar9; memmove(_Src + uVar9,_Src,tailLen); memmove(_Dst,"Bosses/AfterbirthPlus/DeliriumForms",(size_t)pbVar7); - memcpy(pbVar7 + (int)_Dst, - pbVar7 + (int)("Bosses/AfterbirthPlus/DeliriumForms" + -replacedLen + 0x23), - 0x23 - (int)pbVar7); + memcpy(pbVar7 + GHIDRA_INT(_Dst), + pbVar7 + GHIDRA_INT(("Bosses/AfterbirthPlus/DeliriumForms" + -replacedLen + 0x23)), + 0x23 - GHIDRA_INT(pbVar7)); goto LAB_004a609a; } if (0x7fffffff - sheetPath._size < uVar9) { @@ -1646,12 +1646,12 @@ LAB_004a609a: newCapacity = 0x7fffffff; } psVar6 = std::_Allocate(newCapacity + 1); - uVar2 = sheetPath._buf._0_4_; + uVar2 = (*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)); tailLen = (uVar11 - replacedLen) - 3; sheetPath._size = uVar9; sheetPath._capacity = newCapacity; if (uVar10 < 0x10) { - *(undefined4 *)psVar6->_buf = sheetPath._buf._0_4_; + *(undefined4 *)psVar6->_buf = (*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)); psVar6->_buf[4] = 'B'; psVar6->_buf[5] = 'o'; psVar6->_buf[6] = 's'; @@ -1668,10 +1668,10 @@ LAB_004a609a: psVar6->_capacity = 0x756c5068; builtin_strncpy(psVar6[1]._buf,"s/DeliriumForms",0xf); memcpy(psVar6[1]._buf + 0xf,sheetPath._buf + replacedLen + 4,tailLen); - sheetPath._buf._0_4_ = psVar6; + (*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) = psVar6; goto LAB_004a609a; } - *(undefined4 *)psVar6->_buf = *(undefined4 *)(char *)sheetPath._buf._0_4_; + *(undefined4 *)psVar6->_buf = *(*(undefined4 *)((char *)&((undefined4 *)(char *)sheetPath._buf) + 0x0)); psVar6->_buf[4] = 'B'; psVar6->_buf[5] = 'o'; psVar6->_buf[6] = 's'; @@ -1687,35 +1687,35 @@ LAB_004a609a: psVar6->_size = 0x74726962; psVar6->_capacity = 0x756c5068; builtin_strncpy(psVar6[1]._buf,"s/DeliriumForms",0xf); - memcpy(psVar6[1]._buf + 0xf,(char *)sheetPath._buf._0_4_ + replacedLen + 4,tailLen); + memcpy(psVar6[1]._buf + 0xf,(*(undefined4 *)((char *)&((char *)sheetPath._buf) + 0x0)) + replacedLen + 4,tailLen); uVar11 = uVar10 + 1; ptr = (std_string *)uVar2; if (0xfff < uVar11) { ptr = (std_string *)((std_string *)(uVar2 + -0x18))->_capacity; uVar11 = uVar10 + 0x24; - if ((byte *)0x1f < (byte *)(uVar2 + (-4 - (int)ptr))) goto LAB_004a622d; + if ((byte *)0x1f < (byte *)(uVar2 + (-4 - GHIDRA_INT(ptr)))) goto LAB_004a622d; } operator_delete(ptr,uVar11); - sheetPath._buf._0_4_ = psVar6; + (*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) = psVar6; } psVar6 = &sheetPath; if (0xf < sheetPath._capacity) { - psVar6 = (std_string *)sheetPath._buf._0_4_; + psVar6 = (*(undefined4 *)((char *)&((std_string *)sheetPath._buf) + 0x0)); } pbVar7 = FileSystem::ResolvePath((byte *)psVar6); bVar12 = pbVar7 != (byte *)0x0; if (pbVar7 != (byte *)0x0) { - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; tracked_alloc(1,pbVar7,0); - local_14 = (uint)local_14._1_3_ << 8; - ((Sprite *)((Sprite *)sprite))->Sprite::ReplaceSpritesheet((int)layerIdx,&sheetPath); + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; + ((Sprite *)((Sprite *)sprite))->Sprite::ReplaceSpritesheet(GHIDRA_INT(layerIdx),&sheetPath); bVar12 = extraout_CL_01; } } else { psVar6 = &sheetPath; if (0xf < sheetPath._capacity) { - psVar6 = (std_string *)sheetPath._buf._0_4_; + psVar6 = (*(undefined4 *)((char *)&((std_string *)sheetPath._buf) + 0x0)); } iVar5 = _strnicmp(psVar6->_buf + 4,"monsters",8); bVar12 = extraout_CL_02; @@ -1724,15 +1724,15 @@ LAB_004a609a: (sheetPath._buf,4,8,(byte *)"Bosses/AfterbirthPlus/DeliriumForms",0x23); psVar6 = &sheetPath; if (0xf < sheetPath._capacity) { - psVar6 = (std_string *)sheetPath._buf._0_4_; + psVar6 = (*(undefined4 *)((char *)&((std_string *)sheetPath._buf) + 0x0)); } pbVar7 = FileSystem::ResolvePath((byte *)psVar6); bVar12 = pbVar7 != (byte *)0x0; if (pbVar7 != (byte *)0x0) { - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; tracked_alloc(1,pbVar7,0); - local_14 = (uint)local_14._1_3_ << 8; - ((Sprite *)((Sprite *)sprite))->Sprite::ReplaceSpritesheet((int)layerIdx,&sheetPath); + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; + ((Sprite *)((Sprite *)sprite))->Sprite::ReplaceSpritesheet(GHIDRA_INT(layerIdx),&sheetPath); bVar12 = extraout_CL_03; } } @@ -1741,11 +1741,11 @@ LAB_004a609a: local_14 = 0xffffffff; if (0xf < sheetPath._capacity) { uVar11 = sheetPath._capacity + 1; - psVar6 = (std_string *)sheetPath._buf._0_4_; + psVar6 = (*(undefined4 *)((char *)&((std_string *)sheetPath._buf) + 0x0)); if (0xfff < uVar11) { - psVar6 = (std_string *)((std_string *)(sheetPath._buf._0_4_ + -0x18))->_capacity; + psVar6 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) + -0x18))->_capacity; uVar11 = sheetPath._capacity + 0x24; - if ((byte *)0x1f < (byte *)(sheetPath._buf._0_4_ + (-4 - (int)psVar6))) { + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar6)))) { LAB_004a622d: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1793,7 +1793,7 @@ void ANM2::copy_animation_to(ANM2 *source, ANM2 *dest) local_8 = (void *)0xffffffff; puStack_c = &LAB_00aff585; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(animNameBuf + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((animNameBuf + 10)); ExceptionList = &local_10; if ((source->_loaded != 0) && (dest->_loaded != 0)) { if (((source->_animState)._animData == (void *)0x0) || ((source->_animState)._isPlaying == 0)) { @@ -1806,9 +1806,9 @@ void ANM2::copy_animation_to(ANM2 *source, ANM2 *dest) allocSize = animNameCapacity + 1; allocBlock = animNameBuf[0]; if (0xfff < allocSize) { - allocBlock = *(void **)((int)animNameBuf[0] + -4); + allocBlock = *(void **)(GHIDRA_INT(animNameBuf[0]) + -4); allocSize = animNameCapacity + 0x24; - if (0x1f < (uint)((int)animNameBuf[0] + (-4 - (int)allocBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(animNameBuf[0]) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1832,9 +1832,9 @@ void ANM2::copy_animation_to(ANM2 *source, ANM2 *dest) allocSize = animNameCapacity + 1; allocBlock = animNameBuf[0]; if (0xfff < allocSize) { - allocBlock = *(void **)((int)animNameBuf[0] + -4); + allocBlock = *(void **)(GHIDRA_INT(animNameBuf[0]) + -4); allocSize = animNameCapacity + 0x24; - if (0x1f < (uint)((int)animNameBuf[0] + (-4 - (int)allocBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(animNameBuf[0]) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1855,14 +1855,14 @@ void ANM2::copy_animation_to(ANM2 *source, ANM2 *dest) overlayFrame = (source->_overlayAnimState)._animFrame; animName = GetAnimation((ANM2 *)&source->_overlayAnimState,(std_string *)overlayNameBuf); local_8 = (void *)0x3; - ((Sprite *)((Sprite *)dest))->Sprite::SetOverlayFrame(animName,(int)overlayFrame); + ((Sprite *)((Sprite *)dest))->Sprite::SetOverlayFrame(animName,GHIDRA_INT(overlayFrame)); if (0xf < overlayNameCapacity) { allocSize = overlayNameCapacity + 1; allocBlock = overlayNameBuf[0]; if (0xfff < allocSize) { - allocBlock = *(void **)((int)overlayNameBuf[0] + -4); + allocBlock = *(void **)(GHIDRA_INT(overlayNameBuf[0]) + -4); allocSize = overlayNameCapacity + 0x24; - if (0x1f < (uint)((int)overlayNameBuf[0] + (-4 - (int)allocBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(overlayNameBuf[0]) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1886,9 +1886,9 @@ void ANM2::copy_animation_to(ANM2 *source, ANM2 *dest) allocSize = animNameCapacity + 1; allocBlock = animNameBuf[0]; if (0xfff < allocSize) { - allocBlock = *(void **)((int)animNameBuf[0] + -4); + allocBlock = *(void **)(GHIDRA_INT(animNameBuf[0]) + -4); allocSize = animNameCapacity + 0x24; - if (0x1f < (uint)((int)animNameBuf[0] + (-4 - (int)allocBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(animNameBuf[0]) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1899,7 +1899,7 @@ void ANM2::copy_animation_to(ANM2 *source, ANM2 *dest) frame = -1; } else { - frame = (int)(source->_overlayAnimState)._animFrame; + frame = GHIDRA_INT((source->_overlayAnimState)._animFrame); } if ((dest->_overlayAnimState)._animData != (void *)0x0) { ((AnimationState *)(&dest->_overlayAnimState))->AnimationState::SetFrameFloat((float)frame); @@ -1937,7 +1937,7 @@ void ANM2::update_appear_then_idle() isLess = nameChar < (byte)*appearName; if (nameChar != *appearName) { LAB_00837272: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_00837277; } if (nameChar == 0) break; @@ -1960,7 +1960,7 @@ LAB_00837277: isLess = nameChar < *idleName; if (nameChar != *idleName) { LAB_008372b0: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_008372b5; } if (nameChar == 0) break; diff --git a/src/game/anm_cache.cpp b/src/game/anm_cache.cpp index 4a39ed2..62c3084 100644 --- a/src/game/anm_cache.cpp +++ b/src/game/anm_cache.cpp @@ -24,7 +24,7 @@ AnmCache::~AnmCache() local_8 = 0xffffffff; puStack_c = &LAB_00af0dd0; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; spritesEnd = DAT_00c78da8; spriteCursor = g_staticSprites; @@ -41,14 +41,14 @@ AnmCache::~AnmCache() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } blockSize = *(uint *)((char *)frameBuffer + -4); prevAllocated = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - blockSize; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - blockSize; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)prevAllocated < blockSize); - free((void *)((int)frameBuffer + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocated) < blockSize)); + free((void *)(GHIDRA_INT(frameBuffer) + -4)); (sprite->_overlayAnimState)._layerFrames = (void *)0x0; } frameBuffer = (sprite->_overlayAnimState)._nullLayerFrames; @@ -57,14 +57,14 @@ AnmCache::~AnmCache() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } blockSize = *(uint *)((char *)frameBuffer + -4); prevAllocated = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - blockSize; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - blockSize; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)prevAllocated < blockSize); - free((void *)((int)frameBuffer + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocated) < blockSize)); + free((void *)(GHIDRA_INT(frameBuffer) + -4)); (sprite->_overlayAnimState)._nullLayerFrames = (void *)0x0; } frameBuffer = (sprite->_animState)._layerFrames; @@ -73,14 +73,14 @@ AnmCache::~AnmCache() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } blockSize = *(uint *)((char *)frameBuffer + -4); prevAllocated = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - blockSize; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - blockSize; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)prevAllocated < blockSize); - free((void *)((int)frameBuffer + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocated) < blockSize)); + free((void *)(GHIDRA_INT(frameBuffer) + -4)); (sprite->_animState)._layerFrames = (void *)0x0; } frameBuffer = (sprite->_animState)._nullLayerFrames; @@ -89,14 +89,14 @@ AnmCache::~AnmCache() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } blockSize = *(uint *)((char *)frameBuffer + -4); prevAllocated = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - blockSize; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - blockSize; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)prevAllocated < blockSize); - free((void *)((int)frameBuffer + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocated) < blockSize)); + free((void *)(GHIDRA_INT(frameBuffer) + -4)); (sprite->_animState)._nullLayerFrames = (void *)0x0; } ((std::string *)((sprite->_animDefaultName)._buf))->std::string::_Tidy_deallocate(); @@ -123,10 +123,10 @@ AnmCache::~AnmCache() } while (local_14 != piVar2); } FUN_00415ae0(sprite,piVar2[1]); - piVar2[1] = (int)piVar2; - imageMap = (int *)((int)sprite + 8); - *piVar2 = (int)piVar2; - piVar2[2] = (int)piVar2; + piVar2[1] = GHIDRA_INT(piVar2); + imageMap = (int *)(GHIDRA_INT(sprite) + 8); + *piVar2 = GHIDRA_INT(piVar2); + piVar2[2] = GHIDRA_INT(piVar2); *(int *)((char *)sprite + 4) = 0; piVar2 = (int *)*imageMap; local_14 = (int *)*piVar2; @@ -149,9 +149,9 @@ AnmCache::~AnmCache() } while (local_14 != piVar2); } std::map::_Erase_tree(imageMap,piVar2[1]); - piVar2[1] = (int)piVar2; - *piVar2 = (int)piVar2; - piVar2[2] = (int)piVar2; + piVar2[1] = GHIDRA_INT(piVar2); + *piVar2 = GHIDRA_INT(piVar2); + piVar2[2] = GHIDRA_INT(piVar2); *(int *)((char *)sprite + 0xc) = 0; ExceptionList = local_10; return; @@ -210,23 +210,23 @@ void AnmCache::LogMemoryUsage() count = *(undefined4 *)(iVar6 + -0x58 + iVar8); i = i + 8; uVar4 = *(undefined4 *)(iVar6 + -0x78 + iVar8); - auVar10._4_4_ = count; - auVar10._0_4_ = uVar4; + (*(undefined4 *)((char *)&(auVar10) + 0x4)) = count; + (*(undefined4 *)((char *)&(auVar10) + 0x0)) = uVar4; uVar5 = *(undefined4 *)(iVar6 + -0x18 + iVar8); - auVar10._8_4_ = count; - auVar10._12_4_ = *puVar1; - auVar9._8_8_ = auVar10._8_8_; - auVar9._4_4_ = *(undefined4 *)(iVar6 + -0x68 + iVar8); - auVar9._0_4_ = uVar4; + (*(undefined4 *)((char *)&(auVar10) + 0x8)) = count; + (*(undefined4 *)((char *)&(auVar10) + 0xc)) = *puVar1; + (*(undefined8 *)((char *)&(auVar9) + 0x8)) = (*(undefined8 *)((char *)&(auVar10) + 0x8)); + (*(undefined4 *)((char *)&(auVar9) + 0x4)) = *(undefined4 *)(iVar6 + -0x68 + iVar8); + (*(undefined4 *)((char *)&(auVar9) + 0x0)) = uVar4; pmulld(auVar9,_DAT_00bab780); count = *(undefined4 *)(iVar6 + -0x38 + iVar8); - auVar12._4_4_ = uVar5; - auVar12._0_4_ = count; - auVar12._8_4_ = uVar5; - auVar12._12_4_ = *(undefined4 *)(iVar6 + -8 + iVar8); - auVar11._8_8_ = auVar12._8_8_; - auVar11._4_4_ = *(undefined4 *)(iVar6 + -0x28 + iVar8); - auVar11._0_4_ = count; + (*(undefined4 *)((char *)&(auVar12) + 0x4)) = uVar5; + (*(undefined4 *)((char *)&(auVar12) + 0x0)) = count; + (*(undefined4 *)((char *)&(auVar12) + 0x8)) = uVar5; + (*(undefined4 *)((char *)&(auVar12) + 0xc)) = *(undefined4 *)(iVar6 + -8 + iVar8); + (*(undefined8 *)((char *)&(auVar11) + 0x8)) = (*(undefined8 *)((char *)&(auVar12) + 0x8)); + (*(undefined4 *)((char *)&(auVar11) + 0x4)) = *(undefined4 *)(iVar6 + -0x28 + iVar8); + (*(undefined4 *)((char *)&(auVar11) + 0x0)) = count; pmulld(auVar11,_DAT_00bab780); } while (i < (count & 0xfffffff8)); } @@ -247,23 +247,23 @@ void AnmCache::LogMemoryUsage() count = *(undefined4 *)(local_1c + -0x54 + iVar8); i = i + 8; uVar4 = *(undefined4 *)(local_1c + -0x74 + iVar8); - auVar14._4_4_ = count; - auVar14._0_4_ = uVar4; + (*(undefined4 *)((char *)&(auVar14) + 0x4)) = count; + (*(undefined4 *)((char *)&(auVar14) + 0x0)) = uVar4; uVar5 = *(undefined4 *)(local_1c + -0x14 + iVar8); - auVar14._8_4_ = count; - auVar14._12_4_ = *puVar1; - auVar13._8_8_ = auVar14._8_8_; - auVar13._4_4_ = *(undefined4 *)(local_1c + -100 + iVar8); - auVar13._0_4_ = uVar4; + (*(undefined4 *)((char *)&(auVar14) + 0x8)) = count; + (*(undefined4 *)((char *)&(auVar14) + 0xc)) = *puVar1; + (*(undefined8 *)((char *)&(auVar13) + 0x8)) = (*(undefined8 *)((char *)&(auVar14) + 0x8)); + (*(undefined4 *)((char *)&(auVar13) + 0x4)) = *(undefined4 *)(local_1c + -100 + iVar8); + (*(undefined4 *)((char *)&(auVar13) + 0x0)) = uVar4; pmulld(auVar13,_DAT_00bab760); count = *(undefined4 *)(local_1c + -0x34 + iVar8); - auVar16._4_4_ = uVar5; - auVar16._0_4_ = count; - auVar16._8_4_ = uVar5; - auVar16._12_4_ = *(undefined4 *)(local_1c + -4 + iVar8); - auVar15._8_8_ = auVar16._8_8_; - auVar15._4_4_ = *(undefined4 *)(local_1c + -0x24 + iVar8); - auVar15._0_4_ = count; + (*(undefined4 *)((char *)&(auVar16) + 0x4)) = uVar5; + (*(undefined4 *)((char *)&(auVar16) + 0x0)) = count; + (*(undefined4 *)((char *)&(auVar16) + 0x8)) = uVar5; + (*(undefined4 *)((char *)&(auVar16) + 0xc)) = *(undefined4 *)(local_1c + -4 + iVar8); + (*(undefined8 *)((char *)&(auVar15) + 0x8)) = (*(undefined8 *)((char *)&(auVar16) + 0x8)); + (*(undefined4 *)((char *)&(auVar15) + 0x4)) = *(undefined4 *)(local_1c + -0x24 + iVar8); + (*(undefined4 *)((char *)&(auVar15) + 0x0)) = count; pmulld(auVar15,_DAT_00bab760); } while (i < (count & 0xfffffff8)); } @@ -345,29 +345,29 @@ void AnmCache::Load(std_string *param_1, std_string *param_2) local_14 = 0xffffffff; puStack_18 = &LAB_00af0e48; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(fullPath + 0x118); + local_24 = __security_cookie ^ GHIDRA_UINT((fullPath + 0x118)); ExceptionList = &local_1c; local_130 = param_1; local_12c = param_2; if (param_1->_size != 0) { startTimeNs = GetTimeNs(); pbVar9 = g_anmCacheMap; - uVar7 = (uint)(startTimeNs >> 0x20); + uVar7 = GHIDRA_UINT((startTimeNs >> 0x20)); uVar12 = (startTimeNs & 0xffffffff) * 0xd7b634db; local_150[0] = (undefined4)uVar12; lVar1 = (startTimeNs & 0xffffffff) * 0x431bde82; local_148 = (byte *)((ulonglong)lVar1 >> 0x20); uVar12 = (ulonglong)uVar7 * 0xd7b634db + (uVar12 >> 0x20); - uVar8 = (uint)(uVar12 >> 0x20); + uVar8 = GHIDRA_UINT((uVar12 >> 0x20)); lVar1 = lVar1 + (uVar12 & 0xffffffff); local_138 = (undefined4)lVar1; - uVar6 = (uint)((ulonglong)lVar1 >> 0x20); + uVar6 = GHIDRA_UINT(((ulonglong)lVar1 >> 0x20)); local_134 = (undefined4 *)0x0; lVar1 = (ulonglong)uVar7 * 0x431bde82 + (ulonglong)CONCAT14(CARRY4(uVar8,uVar6),uVar8 + uVar6); - startMsHigh = (uint)((ulonglong)lVar1 >> 0x20); - startMsLow = (uint)lVar1 >> 0x12 | startMsHigh * 0x4000; + startMsHigh = GHIDRA_UINT(((ulonglong)lVar1 >> 0x20)); + startMsLow = GHIDRA_UINT(lVar1) >> 0x12 | startMsHigh * 0x4000; startMsHigh = startMsHigh >> 0x12; - if ((uint)((int)g_mountPrefixesEnd - (int)g_mountPrefixes) < 4) { + if (GHIDRA_UINT((GHIDRA_INT(g_mountPrefixesEnd) - GHIDRA_INT(g_mountPrefixes))) < 4) { mountPrefixes = FileSystem::GetMountPrefixes(local_150); if (mountPrefixes != &g_mountPrefixes) { FID_conflict__Tidy(&g_mountPrefixes); @@ -406,7 +406,7 @@ void AnmCache::Load(std_string *param_1, std_string *param_2) local_148 = FileSystem::ResolvePath((byte *)psVar4); if ((pbVar9 == g_anmCacheMap) || ((*(char *)((char *)pbVar9 + 0x14) != '\0' && (local_148 != (byte *)0x0)))) { - ParseFile(psVar10,(uint)local_134); + ParseFile(psVar10,GHIDRA_UINT(local_134)); FUN_00416490(local_160,&local_134); if ((*(char *)((char *)local_158 + 0xd) != '\0') || (pbVar9 = local_158, local_134 < *(undefined4 **)((char *)local_158 + 0x10))) { @@ -417,14 +417,14 @@ void AnmCache::Load(std_string *param_1, std_string *param_2) allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (local_148 != (byte *)0x0) { uVar6 = *(uint *)(local_148 + -4); qVar3 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar6; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar6; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar3 < uVar6); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar3) < uVar6)); free(local_148 + -4); } local_14 = 0xffffffff; @@ -435,7 +435,7 @@ void AnmCache::Load(std_string *param_1, std_string *param_2) oldLayerStates = *(void **)(local_12c[5]._buf + 4); psVar4 = local_12c; if (oldLayerStates != (void *)0x0) { - oldLayerBlock = (uint *)((int)oldLayerStates + -4); + oldLayerBlock = (uint *)(GHIDRA_INT(oldLayerStates) + -4); local_14 = 1; _eh_vector_destructor_iterator_(oldLayerStates,0xa0,*oldLayerBlock,LayerState::~LayerState); operator_delete(oldLayerBlock,*oldLayerBlock * 0xa0 + 4); @@ -446,10 +446,10 @@ void AnmCache::Load(std_string *param_1, std_string *param_2) psVar10 = (std_string *)0x0; if (local_12c != (std_string *)0x0) { local_148 = (byte *)0x0; - uVar6 = -(uint)((int)(ZEXT48(local_12c) * 0xa0 >> 0x20) != 0) | - (uint)(ZEXT48(local_12c) * 0xa0); + uVar6 = -GHIDRA_UINT((GHIDRA_INT((ZEXT48(local_12c) * 0xa0 >> 0x20)) != 0)) | + GHIDRA_UINT((ZEXT48(local_12c) * 0xa0)); local_130 = local_12c; - local_134 = operator_new_tracked(-(uint)(0xfffffffb < uVar6) | uVar6 + 4); + local_134 = operator_new_tracked(-GHIDRA_UINT((0xfffffffb < uVar6)) | uVar6 + 4); local_14 = 3; if (local_134 == (undefined4 *)0x0) { pbVar5 = (byte *)0x0; @@ -458,7 +458,7 @@ void AnmCache::Load(std_string *param_1, std_string *param_2) *local_134 = local_12c; local_148 = (byte *)(local_134 + 1); _eh_vector_constructor_iterator_ - (local_148,0xa0,(uint)local_12c,LayerState::LayerState,LayerState::~LayerState); + (local_148,0xa0,GHIDRA_UINT(local_12c),LayerState::LayerState,LayerState::~LayerState); pbVar5 = local_148; } local_14 = 0xffffffff; @@ -469,10 +469,10 @@ void AnmCache::Load(std_string *param_1, std_string *param_2) local_130 = (std_string *)0x0; local_134 = (undefined4 *)0x0; do { - ((LayerState *)((LayerState *)((int)local_130 + *(int *)(psVar4[5]._buf + 4))))->LayerState::Init(*(int *)((char *)pbVar9 + 0x18) + (int)local_134); + ((LayerState *)((LayerState *)(GHIDRA_INT(local_130) + *(int *)(psVar4[5]._buf + 4))))->LayerState::Init(*(int *)((char *)pbVar9 + 0x18) + GHIDRA_INT(local_134)); local_134 = local_134 + 0xe; *(std_string **)((char *)local_130 + 4 + *(int *)(psVar4[5]._buf + 4)) = psVar4; - local_130 = (std_string *)((int)local_130 + 0xa0); + local_130 = (std_string *)(GHIDRA_INT(local_130) + 0xa0); psVar10 = *(std_string **)((char *)pbVar9 + 0x1c); local_12c = (std_string *)(local_12c->_buf + 1); } while (local_12c < psVar10); @@ -484,7 +484,7 @@ void AnmCache::Load(std_string *param_1, std_string *param_2) *(undefined4 *)(psVar4[5]._buf + 0xc) = *(undefined4 *)((char *)pbVar9 + 0x28); psVar4[5]._size = *(uint *)((char *)pbVar9 + 0x2c); psVar4[5]._capacity = *(uint *)((char *)pbVar9 + 0x30); - psVar10 = (std_string *)((int)pbVar9 + 0x38); + psVar10 = (std_string *)(GHIDRA_INT(pbVar9) + 0x38); *(undefined4 *)psVar4[6]._buf = *(undefined4 *)((char *)pbVar9 + 0x34); if (psVar4 + 1 != psVar10) { if (0xf < *(uint *)((char *)pbVar9 + 0x4c)) { @@ -494,20 +494,20 @@ void AnmCache::Load(std_string *param_1, std_string *param_2) } } uVar12 = GetTimeNs(); - uVar7 = (uint)(uVar12 >> 0x20); + uVar7 = GHIDRA_UINT((uVar12 >> 0x20)); lVar1 = (uVar12 & 0xffffffff) * 0x431bde82; lVar2 = (ulonglong)uVar7 * 0xd7b634db + ((uVar12 & 0xffffffff) * 0xd7b634db >> 0x20); - uVar8 = (uint)((ulonglong)lVar2 >> 0x20); - uVar6 = (int)((ulonglong)lVar1 >> 0x20) + (uint)CARRY4((uint)lVar1,(uint)lVar2); + uVar8 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); + uVar6 = GHIDRA_INT(((ulonglong)lVar1 >> 0x20)) + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar1),GHIDRA_UINT(lVar2))); lVar1 = (ulonglong)uVar7 * 0x431bde82 + (ulonglong)CONCAT14(CARRY4(uVar8,uVar6),uVar8 + uVar6); - uVar8 = (uint)((ulonglong)lVar1 >> 0x20); - uVar6 = (uint)lVar1 >> 0x12 | uVar8 * 0x4000; + uVar8 = GHIDRA_UINT(((ulonglong)lVar1 >> 0x20)); + uVar6 = GHIDRA_UINT(lVar1) >> 0x12 | uVar8 * 0x4000; uVar7 = uVar6 - startMsLow; bVar11 = CARRY4(_DAT_00c79c40,uVar7); _DAT_00c79c40 = _DAT_00c79c40 + uVar7; _DAT_00c79c44 = - _DAT_00c79c44 + (((uVar8 >> 0x12) - startMsHigh) - (uint)(uVar6 < startMsLow)) + - (uint)bVar11; + _DAT_00c79c44 + (((uVar8 >> 0x12) - startMsHigh) - GHIDRA_UINT((uVar6 < startMsLow))) + + GHIDRA_UINT(bVar11); } ExceptionList = local_1c; return; @@ -528,9 +528,9 @@ void AnmCache::AddRef(std_string *path) undefined4 local_14; cacheEntry = g_anmCacheMap; - local_14 = __security_cookie ^ (uint)(fullPath + 0x108); + local_14 = __security_cookie ^ GHIDRA_UINT((fullPath + 0x108)); pathLocal = path; - if (((int)g_mountPrefixesEnd - (int)g_mountPrefixes & 0xfffffffcU) == 0) { + if ((GHIDRA_INT(g_mountPrefixesEnd) - GHIDRA_INT(g_mountPrefixes) & 0xfffffffcU) == 0) { mountPrefixes = FileSystem::GetMountPrefixes(local_12c); if (mountPrefixes != &g_mountPrefixes) { FID_conflict__Tidy(&g_mountPrefixes); @@ -588,9 +588,9 @@ void AnmCache::RemoveRef(std_string *path) int refCount; entry = g_anmCacheMap; - local_14 = __security_cookie ^ (uint)(fullPath + 0x108); + local_14 = __security_cookie ^ GHIDRA_UINT((fullPath + 0x108)); savedPath = path; - if (((int)g_mountPrefixesEnd - (int)g_mountPrefixes & 0xfffffffcU) == 0) { + if ((GHIDRA_INT(g_mountPrefixesEnd) - GHIDRA_INT(g_mountPrefixes) & 0xfffffffcU) == 0) { prefixes = FileSystem::GetMountPrefixes(local_12c); if (prefixes != &g_mountPrefixes) { FID_conflict__Tidy(&g_mountPrefixes); @@ -654,14 +654,14 @@ void AnmCache::Clear() node = it; if (*(int *)((char *)it + 0x50) == 0) { KAGE_LogMessage(1,(byte *)"AnmCache: Clear %u.\n"); - ((AnmFileData *)((void *)((int)node + 0x14)))->AnmFileData::Clear(); + ((AnmFileData *)((void *)(GHIDRA_INT(node) + 0x14)))->AnmFileData::Clear(); it = node; std:: _Tree_unchecked_const_iterator_>,std::_Iterator_base0> ::operator++((_Tree_unchecked_const_iterator_>,std::_Iterator_base0> *)&it); pvVar1 = std_tree_extract(&g_anmCacheMap,node); - ((std::string *)((char *)((int)pvVar1 + 0x38)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(pvVar1) + 0x38)))->std::string::_Tidy_deallocate(); operator_delete(pvVar1,0x54); pvVar1 = g_anmCacheMap; } @@ -703,13 +703,13 @@ void AnmCache::Preload(byte *path) local_14 = 0xffffffff; puStack_18 = &LAB_00af0ee0; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(fullPath + 0x118); + local_24 = __security_cookie ^ GHIDRA_UINT((fullPath + 0x118)); ExceptionList = &local_1c; if (*path != 0) { pathHash = 0; pbVar1 = fullPath + 0x124; - if ((uint)((int)g_mountPrefixesEnd - (int)g_mountPrefixes) < 4) { - mountPrefixes = FileSystem::GetMountPrefixes((undefined1 *)((int)&pathLocal + 0xc)); + if (GHIDRA_UINT((GHIDRA_INT(g_mountPrefixesEnd) - GHIDRA_INT(g_mountPrefixes))) < 4) { + mountPrefixes = FileSystem::GetMountPrefixes((undefined1 *)(GHIDRA_INT(&pathLocal) + 0xc)); if (mountPrefixes != &g_mountPrefixes) { FID_conflict__Tidy(&g_mountPrefixes); g_mountPrefixes = *mountPrefixes; @@ -719,7 +719,7 @@ void AnmCache::Preload(byte *path) mountPrefixes[1] = (byte **)0x0; mountPrefixes[2] = (byte **)0x0; } - FID_conflict__Tidy((undefined1 *)((int)&pathLocal + 0xc)); + FID_conflict__Tidy((undefined1 *)(GHIDRA_INT(&pathLocal) + 0xc)); pbVar1 = puStack_20; } puStack_20 = pbVar1; @@ -741,29 +741,29 @@ void AnmCache::Preload(byte *path) } if (puVar2 == g_anmCacheMap) { pathLocal._size = 0; - pathLocal._capacity = (uint)&DAT_0000000f; - pathLocal._buf._0_4_ = (void *)0x0; + pathLocal._capacity = GHIDRA_UINT(&DAT_0000000f); + (*(undefined4 *)((char *)&(pathLocal._buf) + 0x0)) = (void *)0x0; pbVar1 = path; do { isCached = *pbVar1; pbVar1 = pbVar1 + 1; } while (isCached != 0); - ((std::string *)(pathLocal._buf))->std::string::assign(path,(int)pbVar1 - (int)(path + 1)); + ((std::string *)(pathLocal._buf))->std::string::assign(path,GHIDRA_INT(pbVar1) - GHIDRA_INT((path + 1))); local_14 = 0; ParseFile(&pathLocal,pathHash); local_14 = 0xffffffff; if (&DAT_0000000f < pathLocal._capacity) { puVar2 = (undefined1 *)(pathLocal._capacity + 1); - pvVar3 = (void *)pathLocal._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)pathLocal._buf) + 0x0)); if ((undefined1 *)0xfff < puVar2) { - pvVar3 = *(void **)(pathLocal._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(pathLocal._buf) + 0x0)) + -4); puVar2 = (undefined1 *)(pathLocal._capacity + 0x24); - if (0x1f < (uint)(pathLocal._buf._0_4_ + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(pathLocal._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(pvVar3,(uint)puVar2); + operator_delete(pvVar3,GHIDRA_UINT(puVar2)); } FUN_00416490(); if ((*(char *)(pathLocal._capacity + 0xd) != '\0') || @@ -945,14 +945,14 @@ void AnmCache::ParseFile(std_string *path, uint pathHash) local_14 = 0xffffffff; puStack_18 = &LAB_00af118f; local_1c = ExceptionList; - stackCookie = __security_cookie ^ (uint)(resolvedPath + 0x120); + stackCookie = __security_cookie ^ GHIDRA_UINT((resolvedPath + 0x120)); ExceptionList = &local_1c; filePath = path; ((ModManager *)(&g_manager->_modManager))->ModManager::TryRedirectPath(&redirectedPath,path); local_14 = 0; psVar16 = &redirectedPath; if (0xf < redirectedPath._capacity) { - psVar16 = (std_string *)redirectedPath._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)redirectedPath._buf) + 0x0)); } piVar9 = ((FileSystem *)(&PTR_vftable_00c37a10))->FileSystem::Open((byte *)psVar16,(int *)0x0); if (piVar9 == (int *)0x0) { @@ -975,7 +975,7 @@ void AnmCache::ParseFile(std_string *path, uint pathHash) fileBuffer[iVar11] = 0; (**(code **)*piVar9)(1); FUN_00413b90(); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; iVar11 = 0x40ee8f; pbVar18 = fileBuffer; ((rapidxml::xml_document *)(xmlDocument))->rapidxml::xml_document::parse(fileBuffer); @@ -985,7 +985,7 @@ void AnmCache::ParseFile(std_string *path, uint pathHash) pvVar12 = ((xml_node *)(pvStack_266ac))->xml_node::first_node((byte *)"Spritesheets",iVar11,bVar8); _eh_vector_constructor_iterator_ (spritesheetPaths,0x18,0x40,FUN_0040c380,std::string::_Tidy_deallocate); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; pfStack_26678 = *(float **)((char *)pvVar12 + 0x18); pfStack_266a4 = (float *)0x0; while (pfStack_26678 != (float *)0x0) { @@ -1009,7 +1009,7 @@ LAB_0040efb3: isLess = bVar8 < *pbVar17; if (bVar8 != *pbVar17) { LAB_0040ef57: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_0040ef5c; } if (bVar8 == 0) break; @@ -1043,7 +1043,7 @@ LAB_0040ef5c: isLess = bVar8 < *pbVar17; if (bVar8 != *pbVar17) { LAB_0040f120: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_0040f125; } if (bVar8 == 0) break; @@ -1065,7 +1065,7 @@ LAB_0040f125: } } while ((puVar15[4] != 0) && (puVar15 = (undefined4 *)puVar15[6], puVar15 != (undefined4 *)0x0)); - if ((0x3f < (int)pfStack_2669c) || (pfVar26 = pfStack_266a4, pfStack_2669c != pfStack_266a4)) + if ((0x3f < GHIDRA_INT(pfStack_2669c)) || (pfVar26 = pfStack_266a4, pfStack_2669c != pfStack_266a4)) goto LAB_0040efb3; } pbVar18 = resolvedPath; @@ -1073,9 +1073,9 @@ LAB_0040f125: bVar8 = *pbVar18; pbVar18 = pbVar18 + 1; } while (bVar8 != 0); - ((std::string *)((char *)(spritesheetPaths + (int)pfStack_2669c * 0x18)))->std::string::assign(resolvedPath, - (int)pbVar18 - (int)(resolvedPath + 1)); - pfStack_266a4 = (float *)((int)pfVar26 + 1); + ((std::string *)((char *)(spritesheetPaths + GHIDRA_INT(pfStack_2669c) * 0x18)))->std::string::assign(resolvedPath, + GHIDRA_INT(pbVar18) - GHIDRA_INT((resolvedPath + 1))); + pfStack_266a4 = (float *)(GHIDRA_INT(pfVar26) + 1); pfStack_26678 = *(float **)((char *)pfStack_26678 + 0x2c); } bVar8 = 0x70; @@ -1083,9 +1083,9 @@ LAB_0040f125: _eh_vector_constructor_iterator_ (local_24b0,0x38,0x40,(_func_void_void_ptr *)&LAB_0040d140,FUN_0040db70); pfVar26 = (float *)0x0; - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; pfStack_2668c = (float *)0x0; - pvVar12 = ((xml_node *)(pvStack_266ac))->xml_node::first_node((byte *)"Layers",(int)puVar10,bVar8); + pvVar12 = ((xml_node *)(pvStack_266ac))->xml_node::first_node((byte *)"Layers",GHIDRA_INT(puVar10),bVar8); pfStack_26678 = *(float **)((char *)pvVar12 + 0x18); if (pfStack_26678 == (float *)0x0) { LAB_0040f3b5: @@ -1100,7 +1100,7 @@ LAB_0040f3b5: layerName._buf[1] = '\0'; layerName._buf[2] = '\0'; layerName._buf[3] = '\0'; - local_14 = CONCAT31(local_14._1_3_,4); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),4); puVar15 = (undefined4 *)pfStack_26678[8]; pfStack_26680 = (float *)0xffffffff; if (puVar15 == (undefined4 *)0x0) { @@ -1121,7 +1121,7 @@ LAB_0040f26a: isLess = bVar8 < *pbVar17; if (bVar8 != *pbVar17) { LAB_0040f151: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_0040f156; } if (bVar8 == 0) break; @@ -1143,7 +1143,7 @@ LAB_0040f156: bVar8 = *pbVar13; pbVar13 = pbVar13 + 1; } while (bVar8 != 0); - ((std::string *)(layerName._buf))->std::string::assign(pbVar18,(int)pbVar13 - (int)(pbVar18 + 1)); + ((std::string *)(layerName._buf))->std::string::assign(pbVar18,GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar18 + 1))); } else { pbVar17 = &DAT_00b1b324; @@ -1156,7 +1156,7 @@ LAB_0040f156: isLess = bVar8 < *pbVar17; if (bVar8 != *pbVar17) { LAB_0040f1c0: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_0040f1c5; } if (bVar8 == 0) break; @@ -1186,7 +1186,7 @@ LAB_0040f1c5: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_0040f220: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_0040f225; } if (bVar8 == 0) break; @@ -1209,56 +1209,56 @@ LAB_0040f225: } } while ((puVar15[4] != 0) && (puVar15 = (undefined4 *)puVar15[6], puVar15 != (undefined4 *)0x0)); - if ((0x3f < (int)pfStack_2669c) || (pfVar26 = pfStack_2669c, pfStack_2669c != pfStack_2668c) + if ((0x3f < GHIDRA_INT(pfStack_2669c)) || (pfVar26 = pfStack_2669c, pfStack_2669c != pfStack_2668c) ) goto LAB_0040f26a; } pfVar19 = pfStack_26680; - if (((int)pfStack_26680 < 0) || ((int)pfStack_266a4 <= (int)pfStack_26680)) { + if ((GHIDRA_INT(pfStack_26680) < 0) || (GHIDRA_INT(pfStack_266a4) <= GHIDRA_INT(pfStack_26680))) { KAGE_LogMessage(0x10,(byte *)"%s: invalid spritesheet id %d\n"); } - pbVar18 = spritesheetPaths + (int)pfVar19 * 0x18; - if (local_2490 + (int)pfVar26 * 0x38 != pbVar18) { - if (0xf < auStack_16a0[(int)pfVar19 * 6 + 1]) { + pbVar18 = spritesheetPaths + GHIDRA_INT(pfVar19) * 0x18; + if (local_2490 + GHIDRA_INT(pfVar26) * 0x38 != pbVar18) { + if (0xf < auStack_16a0[GHIDRA_INT(pfVar19) * 6 + 1]) { pbVar18 = *(byte **)pbVar18; } - ((std::string *)((char *)(local_2490 + (int)pfVar26 * 0x38)))->std::string::assign(pbVar18, - auStack_16a0[(int)pfVar19 * 6]); + ((std::string *)((char *)(local_2490 + GHIDRA_INT(pfVar26) * 0x38)))->std::string::assign(pbVar18, + auStack_16a0[GHIDRA_INT(pfVar19) * 6]); } - local_24b0[(int)pfVar26 * 0xe] = pfVar26; - psVar16 = (std_string *)((int)&local_24a8 + (int)pfVar26 * 0x38); - local_24b0[(int)pfVar26 * 0xe + 1] = pfStack_26680; + local_24b0[GHIDRA_INT(pfVar26) * 0xe] = pfVar26; + psVar16 = (std_string *)(GHIDRA_INT(&local_24a8) + GHIDRA_INT(pfVar26) * 0x38); + local_24b0[GHIDRA_INT(pfVar26) * 0xe + 1] = pfStack_26680; if (psVar16 != &layerName) { text = &layerName; if (0xf < layerName._capacity) { - text = (std_string *)layerName._buf._0_4_; + text = (*(undefined4 *)((char *)&((std_string *)layerName._buf) + 0x0)); } ((std::string *)((char *)psVar16))->std::string::assign((byte *)text,layerName._size); } - pfVar26 = (float *)((int)pfStack_2668c + 1); - local_14._0_1_ = 3; + pfVar26 = (float *)(GHIDRA_INT(pfStack_2668c) + 1); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; pfStack_2668c = pfVar26; if (0xf < layerName._capacity) { uVar14 = layerName._capacity + 1; - pvVar12 = (void *)layerName._buf._0_4_; + pvVar12 = (*(undefined4 *)((char *)&((void *)layerName._buf) + 0x0)); if (0xfff < uVar14) { - pvVar12 = *(void **)(layerName._buf._0_4_ + -4); + pvVar12 = *(void **)((*(undefined4 *)((char *)&(layerName._buf) + 0x0)) + -4); uVar14 = layerName._capacity + 0x24; - if (0x1f < (layerName._buf._0_4_ - (int)pvVar12) - 4U) goto LAB_00413762; + if (0x1f < ((*(undefined4 *)((char *)&(layerName._buf) + 0x0)) - GHIDRA_INT(pvVar12)) - 4U) goto LAB_00413762; } operator_delete(pvVar12,uVar14); } layerName._size = 0; layerName._capacity = 0xf; - layerName._buf._0_4_ = layerName._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(layerName._buf) + 0x0)) = (*(undefined4 *)((char *)&(layerName._buf) + 0x0)) & 0xffffff00; pfStack_26678 = (float *)pfStack_26678[0xb]; } while (pfStack_26678 != (float *)0x0); if (pfVar26 == (float *)0x0) goto LAB_0040f3b5; } pfStack_26678 = (float *)0x0; - uVar14 = -(uint)((int)(ZEXT48(pfVar26) * 0x38 >> 0x20) != 0) | (uint)(ZEXT48(pfVar26) * 0x38); + uVar14 = -GHIDRA_UINT((GHIDRA_INT((ZEXT48(pfVar26) * 0x38 >> 0x20)) != 0)) | GHIDRA_UINT((ZEXT48(pfVar26) * 0x38)); pfStack_26654 = pfVar26; - pfStack_26678 = operator_new_tracked(-(uint)(0xfffffffb < uVar14) | uVar14 + 4); - local_14._0_1_ = 5; + pfStack_26678 = operator_new_tracked(-GHIDRA_UINT((0xfffffffb < uVar14)) | uVar14 + 4); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; if (pfStack_26678 == (float *)0x0) { pfVar19 = (float *)0x0; pfStack_26680 = (float *)0x0; @@ -1268,18 +1268,18 @@ LAB_0040f225: *pfStack_26678 = (float)pfVar26; pfStack_26680 = pfVar19; _eh_vector_constructor_iterator_ - (pfVar19,0x38,(uint)pfVar26,(_func_void_void_ptr *)&LAB_0040d140,FUN_0040db70); + (pfVar19,0x38,GHIDRA_UINT(pfVar26),(_func_void_void_ptr *)&LAB_0040d140,FUN_0040db70); } - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; pfVar25 = (float *)0x0; if (pfVar26 != (float *)0x0) { pfVar19 = pfVar19 + 8; srcLayer = &local_24a8._capacity; pfStack_26678 = pfStack_2668c; - pfVar26 = (float *)((int)pfStack_26680 - (int)srcLayer); + pfVar26 = (float *)(GHIDRA_INT(pfStack_26680) - GHIDRA_INT(srcLayer)); pfStack_26654 = pfVar26; do { - *(uint *)((char *)pfVar26 + (int)srcLayer) = srcLayer[-7]; + *(uint *)((char *)pfVar26 + GHIDRA_INT(srcLayer)) = srcLayer[-7]; if (pfVar19 != (float *)(srcLayer + 1)) { psVar16 = (std_string *)(srcLayer + -5); if (0xf < *srcLayer) { @@ -1297,7 +1297,7 @@ LAB_0040f225: srcLayer = srcLayer + 0xe; pfVar19[-7] = *pfVar25; pfVar19 = pfVar19 + 0xe; - pfStack_26678 = (float *)((int)pfStack_26678 + -1); + pfStack_26678 = (float *)(GHIDRA_INT(pfStack_26678) + -1); } while (pfStack_26678 != (float *)0x0); pfVar25 = pfStack_2668c; } @@ -1306,9 +1306,9 @@ LAB_0040f225: *(float **)(anmFile + 4) = pfStack_26680; *(float **)(anmFile + 8) = pfVar25; _eh_vector_constructor_iterator_(nullNames,0x18,0x40,FUN_0040c380,std::string::_Tidy_deallocate); - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; pfStack_26684 = (float *)0x0; - pvVar12 = ((xml_node *)(pvStack_266ac))->xml_node::first_node((byte *)"Nulls",(int)pcVar28,bVar8); + pvVar12 = ((xml_node *)(pvStack_266ac))->xml_node::first_node((byte *)"Nulls",GHIDRA_INT(pcVar28),bVar8); pfStack_26678 = *(float **)((char *)pvVar12 + 0x18); pfVar26 = (float *)0x0; pfVar19 = pfStack_26678; @@ -1321,7 +1321,7 @@ LAB_0040f225: nullName._buf[1] = '\0'; nullName._buf[2] = '\0'; nullName._buf[3] = '\0'; - local_14 = CONCAT31(local_14._1_3_,7); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),7); puVar15 = (undefined4 *)pfStack_26678[8]; if (puVar15 == (undefined4 *)0x0) { LAB_0040f664: @@ -1342,7 +1342,7 @@ LAB_0040f664: isLess = bVar8 < *pbVar17; if (bVar8 != *pbVar17) { LAB_0040f5a1: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_0040f5a6; } if (bVar8 == 0) break; @@ -1372,7 +1372,7 @@ LAB_0040f5a6: isLess = bVar8 < *pbVar17; if (bVar8 != *pbVar17) { LAB_0040f600: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_0040f605; } if (bVar8 == 0) break; @@ -1394,45 +1394,45 @@ LAB_0040f605: bVar8 = *pbVar13; pbVar13 = pbVar13 + 1; } while (bVar8 != 0); - ((std::string *)(nullName._buf))->std::string::assign(pbVar18,(int)pbVar13 - (int)(pbVar18 + 1)); + ((std::string *)(nullName._buf))->std::string::assign(pbVar18,GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar18 + 1))); } } } while ((puVar15[4] != 0) && (puVar15 = (undefined4 *)puVar15[6], puVar15 != (undefined4 *)0x0)); - if (0x3f < (int)pfStack_26680) goto LAB_0040f664; + if (0x3f < GHIDRA_INT(pfStack_26680)) goto LAB_0040f664; pfVar26 = pfStack_26684; pfVar19 = pfStack_26680; if (pfStack_26680 != pfStack_26684) goto LAB_0040f664; } - if (nullNames + (int)pfVar19 != &nullName) { + if (nullNames + GHIDRA_INT(pfVar19) != &nullName) { psVar16 = &nullName; if (0xf < nullName._capacity) { - psVar16 = (std_string *)nullName._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)nullName._buf) + 0x0)); } - ((std::string *)(nullNames[(int)pfVar19]._buf))->std::string::assign((byte *)psVar16,nullName._size); + ((std::string *)(nullNames[GHIDRA_INT(pfVar19)]._buf))->std::string::assign((byte *)psVar16,nullName._size); } - pfVar26 = (float *)((int)pfVar26 + 1); - local_14._0_1_ = 6; + pfVar26 = (float *)(GHIDRA_INT(pfVar26) + 1); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; pfStack_26684 = pfVar26; if (0xf < nullName._capacity) { uVar14 = nullName._capacity + 1; - pvVar12 = (void *)nullName._buf._0_4_; + pvVar12 = (*(undefined4 *)((char *)&((void *)nullName._buf) + 0x0)); if (0xfff < uVar14) { - pvVar12 = *(void **)(nullName._buf._0_4_ + -4); + pvVar12 = *(void **)((*(undefined4 *)((char *)&(nullName._buf) + 0x0)) + -4); uVar14 = nullName._capacity + 0x24; - if (0x1f < (nullName._buf._0_4_ - (int)pvVar12) - 4U) goto LAB_00413762; + if (0x1f < ((*(undefined4 *)((char *)&(nullName._buf) + 0x0)) - GHIDRA_INT(pvVar12)) - 4U) goto LAB_00413762; } operator_delete(pvVar12,uVar14); } nullName._size = 0; nullName._capacity = 0xf; - nullName._buf._0_4_ = nullName._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(nullName._buf) + 0x0)) = (*(undefined4 *)((char *)&(nullName._buf) + 0x0)) & 0xffffff00; pfStack_26678 = (float *)pfStack_26678[0xb]; } while (pfStack_26678 != (float *)0x0); pfVar19 = (float *)0x0; if (pfVar26 != (float *)0x0) { - uVar14 = -(uint)((int)(ZEXT48(pfVar26) * 0x18 >> 0x20) != 0) | (uint)(ZEXT48(pfVar26) * 0x18); - puVar15 = operator_new_tracked(-(uint)(0xfffffffb < uVar14) | uVar14 + 4); + uVar14 = -GHIDRA_UINT((GHIDRA_INT((ZEXT48(pfVar26) * 0x18 >> 0x20)) != 0)) | GHIDRA_UINT((ZEXT48(pfVar26) * 0x18)); + puVar15 = operator_new_tracked(-GHIDRA_UINT((0xfffffffb < uVar14)) | uVar14 + 4); if (puVar15 == (undefined4 *)0x0) { pfStack_26680 = (float *)0x0; } @@ -1440,25 +1440,25 @@ LAB_0040f605: *puVar15 = pfVar26; pfStack_26680 = (float *)(puVar15 + 1); _eh_vector_constructor_iterator_ - (pfStack_26680,0x18,(uint)pfVar26,FUN_0040c380,std::string::_Tidy_deallocate); + (pfStack_26680,0x18,GHIDRA_UINT(pfVar26),FUN_0040c380,std::string::_Tidy_deallocate); } pfStack_26678 = pfStack_26684; - iVar11 = -(int)pfStack_26680; - pfVar26 = (float *)((int)nullNames - (int)pfStack_26680); + iVar11 = -GHIDRA_INT(pfStack_26680); + pfVar26 = (float *)(GHIDRA_INT(nullNames) - GHIDRA_INT(pfStack_26680)); pfStack_26654 = pfVar26; pfVar19 = pfStack_26680; do { - pfVar25 = (float *)((int)pfVar26 + (int)pfVar19); + pfVar25 = (float *)(GHIDRA_INT(pfVar26) + GHIDRA_INT(pfVar19)); if (pfVar19 != pfVar25) { - if (0xf < *(uint *)((char *)nullNames + iVar11 + 0x14 + (int)pfVar19)) { + if (0xf < *(uint *)((char *)nullNames + iVar11 + 0x14 + GHIDRA_INT(pfVar19))) { pfVar25 = (float *)*pfVar25; } ((std::string *)((char *)pfVar19))->std::string::assign((byte *)pfVar25, - *(uint *)((char *)nullNames + iVar11 + 0x10 + (int)pfVar19)); + *(uint *)((char *)nullNames + iVar11 + 0x10 + GHIDRA_INT(pfVar19))); pfVar26 = pfStack_26654; } pfVar19 = pfVar19 + 6; - pfStack_26678 = (float *)((int)pfStack_26678 + -1); + pfStack_26678 = (float *)(GHIDRA_INT(pfStack_26678) + -1); } while (pfStack_26678 != (float *)0x0); *(float **)(anmFile + 0x14) = pfStack_26680; pfVar26 = pfStack_26684; @@ -1470,9 +1470,9 @@ LAB_0040f605: pcVar28 = FUN_0040c380; *(float **)(anmFile + 0x18) = pfVar26; _eh_vector_constructor_iterator_(eventNames,0x18,0x10,FUN_0040c380,std::string::_Tidy_deallocate); - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; pfStack_26684 = (float *)0x0; - pvVar12 = ((xml_node *)(pvStack_266ac))->xml_node::first_node((byte *)"Events",(int)pcVar28,bVar8); + pvVar12 = ((xml_node *)(pvStack_266ac))->xml_node::first_node((byte *)"Events",GHIDRA_INT(pcVar28),bVar8); pfStack_26678 = *(float **)((char *)pvVar12 + 0x18); pfVar26 = (float *)0x0; pfVar19 = pfStack_26678; @@ -1485,7 +1485,7 @@ LAB_0040f605: eventName._buf[1] = '\0'; eventName._buf[2] = '\0'; eventName._buf[3] = '\0'; - local_14 = CONCAT31(local_14._1_3_,9); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),9); puVar15 = (undefined4 *)pfStack_26678[8]; if (puVar15 == (undefined4 *)0x0) { LAB_0040f994: @@ -1506,7 +1506,7 @@ LAB_0040f994: isLess = bVar8 < *pbVar17; if (bVar8 != *pbVar17) { LAB_0040f8d1: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_0040f8d6; } if (bVar8 == 0) break; @@ -1536,7 +1536,7 @@ LAB_0040f8d6: isLess = bVar8 < *pbVar17; if (bVar8 != *pbVar17) { LAB_0040f930: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_0040f935; } if (bVar8 == 0) break; @@ -1558,33 +1558,33 @@ LAB_0040f935: bVar8 = *pbVar13; pbVar13 = pbVar13 + 1; } while (bVar8 != 0); - ((std::string *)(eventName._buf))->std::string::assign(pbVar18,(int)pbVar13 - (int)(pbVar18 + 1)); + ((std::string *)(eventName._buf))->std::string::assign(pbVar18,GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar18 + 1))); } } } while ((puVar15[4] != 0) && (puVar15 = (undefined4 *)puVar15[6], puVar15 != (undefined4 *)0x0)); - if (0xf < (int)pfStack_26680) goto LAB_0040f994; + if (0xf < GHIDRA_INT(pfStack_26680)) goto LAB_0040f994; pfVar26 = pfStack_26684; pfVar19 = pfStack_26680; if (pfStack_26680 != pfStack_26684) goto LAB_0040f994; } - if (eventNames + (int)pfVar19 != &eventName) { + if (eventNames + GHIDRA_INT(pfVar19) != &eventName) { psVar16 = &eventName; if (0xf < eventName._capacity) { - psVar16 = (std_string *)eventName._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)eventName._buf) + 0x0)); } - ((std::string *)(eventNames[(int)pfVar19]._buf))->std::string::assign((byte *)psVar16,eventName._size); + ((std::string *)(eventNames[GHIDRA_INT(pfVar19)]._buf))->std::string::assign((byte *)psVar16,eventName._size); } - pfVar26 = (float *)((int)pfVar26 + 1); - local_14._0_1_ = 8; + pfVar26 = (float *)(GHIDRA_INT(pfVar26) + 1); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; pfStack_26684 = pfVar26; if (0xf < eventName._capacity) { uVar14 = eventName._capacity + 1; - pvVar12 = (void *)eventName._buf._0_4_; + pvVar12 = (*(undefined4 *)((char *)&((void *)eventName._buf) + 0x0)); if (0xfff < uVar14) { - pvVar12 = *(void **)(eventName._buf._0_4_ + -4); + pvVar12 = *(void **)((*(undefined4 *)((char *)&(eventName._buf) + 0x0)) + -4); uVar14 = eventName._capacity + 0x24; - if (0x1f < (eventName._buf._0_4_ - (int)pvVar12) - 4U) { + if (0x1f < ((*(undefined4 *)((char *)&(eventName._buf) + 0x0)) - GHIDRA_INT(pvVar12)) - 4U) { LAB_00413762: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1594,13 +1594,13 @@ LAB_00413762: } eventName._size = 0; eventName._capacity = 0xf; - eventName._buf._0_4_ = eventName._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(eventName._buf) + 0x0)) = (*(undefined4 *)((char *)&(eventName._buf) + 0x0)) & 0xffffff00; pfStack_26678 = (float *)pfStack_26678[0xb]; } while (pfStack_26678 != (float *)0x0); pfVar19 = (float *)0x0; if (pfVar26 != (float *)0x0) { - uVar14 = -(uint)((int)(ZEXT48(pfVar26) * 0x18 >> 0x20) != 0) | (uint)(ZEXT48(pfVar26) * 0x18); - puVar15 = operator_new_tracked(-(uint)(0xfffffffb < uVar14) | uVar14 + 4); + uVar14 = -GHIDRA_UINT((GHIDRA_INT((ZEXT48(pfVar26) * 0x18 >> 0x20)) != 0)) | GHIDRA_UINT((ZEXT48(pfVar26) * 0x18)); + puVar15 = operator_new_tracked(-GHIDRA_UINT((0xfffffffb < uVar14)) | uVar14 + 4); if (puVar15 == (undefined4 *)0x0) { pfStack_26680 = (float *)0x0; } @@ -1608,25 +1608,25 @@ LAB_00413762: *puVar15 = pfVar26; pfStack_26680 = (float *)(puVar15 + 1); _eh_vector_constructor_iterator_ - (pfStack_26680,0x18,(uint)pfVar26,FUN_0040c380,std::string::_Tidy_deallocate); + (pfStack_26680,0x18,GHIDRA_UINT(pfVar26),FUN_0040c380,std::string::_Tidy_deallocate); } pfStack_26678 = pfStack_26684; - iVar11 = -(int)pfStack_26680; - pfVar26 = (float *)((int)eventNames - (int)pfStack_26680); + iVar11 = -GHIDRA_INT(pfStack_26680); + pfVar26 = (float *)(GHIDRA_INT(eventNames) - GHIDRA_INT(pfStack_26680)); pfStack_26654 = pfVar26; pfVar19 = pfStack_26680; do { - pfVar25 = (float *)((int)pfVar26 + (int)pfVar19); + pfVar25 = (float *)(GHIDRA_INT(pfVar26) + GHIDRA_INT(pfVar19)); if (pfVar19 != pfVar25) { - if (0xf < *(uint *)((char *)eventNames + iVar11 + 0x14 + (int)pfVar19)) { + if (0xf < *(uint *)((char *)eventNames + iVar11 + 0x14 + GHIDRA_INT(pfVar19))) { pfVar25 = (float *)*pfVar25; } ((std::string *)((char *)pfVar19))->std::string::assign((byte *)pfVar25, - *(uint *)((char *)eventNames + iVar11 + 0x10 + (int)pfVar19)); + *(uint *)((char *)eventNames + iVar11 + 0x10 + GHIDRA_INT(pfVar19))); pfVar26 = pfStack_26654; } pfVar19 = pfVar19 + 6; - pfStack_26678 = (float *)((int)pfStack_26678 + -1); + pfStack_26678 = (float *)(GHIDRA_INT(pfStack_26678) + -1); } while (pfStack_26678 != (float *)0x0); *(float **)(anmFile + 0x1c) = pfStack_26680; pfVar26 = pfStack_26684; @@ -1640,11 +1640,11 @@ LAB_00413762: _eh_vector_constructor_iterator_ (animations,0x13c,0x100,(_func_void_void_ptr *)&LAB_0040bec0, std::string::_Tidy_deallocate); - local_14 = CONCAT31(local_14._1_3_,10); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),10); animIndex = (float *)0x0; pfStack_26678 = - ((xml_node *)(pfStack_2664c))->xml_node::first_node((byte *)"Animations",(int)pbVar18,(byte)pcVar28); - for (puVar15 = ((xml_node *)(pfStack_26678))->xml_node::first_attribute((byte *)0x0,(uint)pbVar18,(byte)pcVar28); + ((xml_node *)(pfStack_2664c))->xml_node::first_node((byte *)"Animations",GHIDRA_INT(pbVar18),(byte)pcVar28); + for (puVar15 = ((xml_node *)(pfStack_26678))->xml_node::first_attribute((byte *)0x0,GHIDRA_UINT(pbVar18),(byte)pcVar28); bVar8 = (byte)pcVar28, puVar15 != (undefined4 *)0x0; puVar15 = (undefined4 *)puVar15[6]) { keyName = "DefaultAnimation"; pbVar13 = &g_xmlNullStr; @@ -1656,7 +1656,7 @@ LAB_00413762: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_0040fbc2: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_0040fbc7; } if (bVar8 == 0) break; @@ -1678,20 +1678,20 @@ LAB_0040fbc7: bVar8 = *pbVar13; pbVar13 = pbVar13 + 1; } while (bVar8 != 0); - pcVar28 = (code *)(pbVar13 + -(int)(pbVar18 + 1)); - ((std::string *)(anmFile + 0x24))->std::string::assign(pbVar18,(uint)pcVar28); + pcVar28 = (code *)(pbVar13 + -GHIDRA_INT((pbVar18 + 1))); + ((std::string *)(anmFile + 0x24))->std::string::assign(pbVar18,GHIDRA_UINT(pcVar28)); } bVar8 = (byte)pcVar28; if (puVar15[4] == 0) break; } - pfStack_26684 = ((xml_node *)(pfStack_26678))->xml_node::first_node((byte *)"Animation",(int)pbVar18,bVar8); + pfStack_26684 = ((xml_node *)(pfStack_26678))->xml_node::first_node((byte *)"Animation",GHIDRA_INT(pbVar18),bVar8); pfStack_26678 = operator_new_tracked(420000); if (pfStack_26678 == (void *)0x0) { rootFrames = (void *)0x0; } else { iVar11 = 5000; - puVar15 = (undefined4 *)((int)pfStack_26678 + 4); + puVar15 = (undefined4 *)(GHIDRA_INT(pfStack_26678) + 4); rootFrames = pfStack_26678; do { *puVar15 = 0; @@ -1704,7 +1704,7 @@ LAB_0040fbc7: iVar11 = iVar11 + -1; } while (iVar11 != 0); } - local_14 = CONCAT31(local_14._1_3_,10); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),10); pfStack_26654 = operator_new_tracked(420000); if (pfStack_26654 == (float *)0x0) { pfStack_26678 = (float *)0x0; @@ -1724,14 +1724,14 @@ LAB_0040fbc7: iVar11 = iVar11 + -1; } while (iVar11 != 0); } - local_14 = CONCAT31(local_14._1_3_,10); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),10); pfStack_26654 = operator_new_tracked(420000); if (pfStack_26654 == (void *)0x0) { pvStack_266ac = (void *)0x0; } else { iVar11 = 5000; - puVar15 = (undefined4 *)((int)pfStack_26654 + 4); + puVar15 = (undefined4 *)(GHIDRA_INT(pfStack_26654) + 4); pvStack_266ac = pfStack_26654; do { *puVar15 = 0; @@ -1744,7 +1744,7 @@ LAB_0040fbc7: iVar11 = iVar11 + -1; } while (iVar11 != 0); } - local_14 = CONCAT31(local_14._1_3_,10); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),10); pfStack_26654 = operator_new_tracked(420000); if (pfStack_26654 == (float *)0x0) { pfStack_266a4 = (float *)0x0; @@ -1764,7 +1764,7 @@ LAB_0040fbc7: iVar11 = iVar11 + -1; } while (iVar11 != 0); } - local_14 = CONCAT31(local_14._1_3_,10); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),10); pfStack_26654 = operator_new_tracked(540000); if (pfStack_26654 == (float *)0x0) { pfStack_26680 = (float *)0x0; @@ -1790,7 +1790,7 @@ LAB_0040fbc7: iVar11 = iVar11 + -1; } while (iVar11 != 0); } - local_14 = CONCAT31(local_14._1_3_,10); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),10); pfStack_2669c = operator_new_tracked(540000); if (pfStack_2669c == (float *)0x0) { pfStack_2669c = (float *)0x0; @@ -1816,7 +1816,7 @@ LAB_0040fbc7: iVar11 = iVar11 + -1; } while (iVar11 != 0); } - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; pfVar19 = animIndex; pfVar26 = pfStack_26684; while (animIndex = pfVar19, pfVar26 != (float *)0x0) { @@ -1826,7 +1826,7 @@ LAB_0040fbc7: animName._buf[1] = '\0'; animName._buf[2] = '\0'; animName._buf[3] = '\0'; - local_14._0_1_ = 0x11; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x11; pfVar26 = (float *)pfVar26[8]; pfStack_2667c = (float *)0x0; isLoop = 0; @@ -1842,7 +1842,7 @@ LAB_0040fbc7: isLess = bVar8 < *pbVar17; if (bVar8 != *pbVar17) { LAB_0040ff91: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_0040ff96; } if (bVar8 == 0) break; @@ -1864,7 +1864,7 @@ LAB_0040ff96: bVar8 = *pbVar13; pbVar13 = pbVar13 + 1; } while (bVar8 != 0); - ((std::string *)(animName._buf))->std::string::assign(pbVar18,(int)pbVar13 - (int)(pbVar18 + 1)); + ((std::string *)(animName._buf))->std::string::assign(pbVar18,GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar18 + 1))); } else { keyName = "FrameNum"; @@ -1877,7 +1877,7 @@ LAB_0040ff96: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00410000: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00410005; } if (bVar8 == 0) break; @@ -1907,7 +1907,7 @@ LAB_00410005: isLess = bVar8 < *pbVar17; if (bVar8 != *pbVar17) { LAB_00410060: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00410065; } if (bVar8 == 0) break; @@ -1935,7 +1935,7 @@ LAB_00410065: bVar8 = *pbVar13; pbVar13 = pbVar13 + 1; } while (bVar8 != 0); - ((std::string *)(loopText._buf))->std::string::assign(pbVar18,(int)pbVar13 - (int)(pbVar18 + 1)); + ((std::string *)(loopText._buf))->std::string::assign(pbVar18,GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar18 + 1))); if (loopText._size == 0) { LAB_0041018f: isLoop = 0; @@ -1943,7 +1943,7 @@ LAB_0041018f: else { psVar16 = &loopText; if (0xf < loopText._capacity) { - psVar16 = (std_string *)loopText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)loopText._buf) + 0x0)); } if (loopText._size == 4) { if ((*(int *)psVar16->_buf == 0x65757274) || @@ -1954,7 +1954,7 @@ LAB_0041018f: uVar14 = 0; } else { - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; } if (uVar14 != 0) goto LAB_0041011b; } @@ -1962,7 +1962,7 @@ LAB_0041018f: LAB_0041011b: psVar16 = &loopText; if (0xf < loopText._capacity) { - psVar16 = (std_string *)loopText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)loopText._buf) + 0x0)); } if (loopText._size == 4) { if ((*(int *)psVar16->_buf == 0x65757254) || @@ -1973,13 +1973,13 @@ LAB_0041011b: uVar14 = 0; } else { - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; } if (uVar14 == 0) goto LAB_00410186; } psVar16 = &loopText; if (0xf < loopText._capacity) { - psVar16 = (std_string *)loopText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)loopText._buf) + 0x0)); } iVar11 = atoi(psVar16->_buf); if (iVar11 == 0) goto LAB_0041018f; @@ -1989,17 +1989,17 @@ LAB_00410186: } if (0xf < loopText._capacity) { uVar14 = loopText._capacity + 1; - pvVar12 = (void *)loopText._buf._0_4_; + pvVar12 = (*(undefined4 *)((char *)&((void *)loopText._buf) + 0x0)); if (0xfff < uVar14) { - pvVar12 = *(void **)(loopText._buf._0_4_ + -4); + pvVar12 = *(void **)((*(undefined4 *)((char *)&(loopText._buf) + 0x0)) + -4); uVar14 = loopText._capacity + 0x24; - if (0x1f < (loopText._buf._0_4_ - (int)pvVar12) - 4U) goto LAB_00413762; + if (0x1f < ((*(undefined4 *)((char *)&(loopText._buf) + 0x0)) - GHIDRA_INT(pvVar12)) - 4U) goto LAB_00413762; } operator_delete(pvVar12,uVar14); } loopText._size = 0; loopText._capacity = 0xf; - loopText._buf._0_4_ = loopText._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(loopText._buf) + 0x0)) = (*(undefined4 *)((char *)&(loopText._buf) + 0x0)) & 0xffffff00; pfVar26 = pfStack_26654; } } @@ -2008,18 +2008,18 @@ LAB_00410186: } pfVar19 = pfStack_2667c; pfVar26 = animIndex; - iVar11 = (int)animIndex * 0x13c; + iVar11 = GHIDRA_INT(animIndex) * 0x13c; curAnimation = (std_string *)(animations + iVar11); - auStack_16378[(int)animIndex * 0x4f] = animIndex; - animIndex = (float *)((int)animIndex + 1); + auStack_16378[GHIDRA_INT(animIndex) * 0x4f] = animIndex; + animIndex = (float *)(GHIDRA_INT(animIndex) + 1); if (curAnimation != &animName) { psVar16 = &animName; if (0xf < animName._capacity) { - psVar16 = (std_string *)animName._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)animName._buf) + 0x0)); } ((std::string *)((char *)curAnimation))->std::string::assign((byte *)psVar16,animName._size); } - afStack_16494[(int)pfVar26 * 0x4f + 5] = (float)pfVar19; + afStack_16494[GHIDRA_INT(pfVar26) * 0x4f + 5] = (float)pfVar19; auStack_1647c[iVar11] = isLoop; keyName = "RootAnimation"; do { @@ -2037,9 +2037,9 @@ LAB_00410186: keyName = (char *)puVar15[2]; } if (keyName == pcVar22 + -0xb1b417) { - pbVar13 = pbVar18 + (int)keyName; + pbVar13 = pbVar18 + GHIDRA_INT(keyName); if (pbVar13 <= pbVar18) goto LAB_004102d1; - iVar11 = (int)"RootAnimation" - (int)pbVar18; + iVar11 = GHIDRA_INT("RootAnimation") - GHIDRA_INT(pbVar18); while (*pbVar18 == pbVar18[iVar11]) { pbVar18 = pbVar18 + 1; if (pbVar13 <= pbVar18) goto LAB_004102d1; @@ -2064,7 +2064,7 @@ LAB_004102d1: pfStack_2665c = (float *)0x3f800000; pfStack_26660 = (float *)0x3f800000; pfStack_26668 = (float *)0x3f800000; - pfStack_26650 = (float *)(uVar14 * 0x54 + (int)rootFrames); + pfStack_26650 = (float *)(uVar14 * 0x54 + GHIDRA_INT(rootFrames)); pfStack_2666c = (float *)0x3f800000; pfStack_26670 = (float *)0x0; pfStack_26674 = (float *)0x0; @@ -2083,7 +2083,7 @@ LAB_004103a0: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_004103d1: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_004103d6; } if (bVar8 == 0) break; @@ -2114,7 +2114,7 @@ LAB_004103d6: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00410430: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00410435; } if (bVar8 == 0) break; @@ -2145,7 +2145,7 @@ LAB_00410435: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00410490: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00410495; } if (bVar8 == 0) break; @@ -2176,7 +2176,7 @@ LAB_00410495: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_004104f0: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_004104f5; } if (bVar8 == 0) break; @@ -2204,7 +2204,7 @@ LAB_004104f5: bVar8 = *pbVar13; pbVar13 = pbVar13 + 1; } while (bVar8 != 0); - ((std::string *)(rootVisibleText._buf))->std::string::assign(pbVar18,(int)pbVar13 - (int)(pbVar18 + 1)); + ((std::string *)(rootVisibleText._buf))->std::string::assign(pbVar18,GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar18 + 1))); textCapacity = rootVisibleText._capacity; uVar14 = rootVisibleText._size; if (rootVisibleText._size == 0) { @@ -2214,19 +2214,19 @@ LAB_004105ca: else { psVar16 = &rootVisibleText; if (0xf < rootVisibleText._capacity) { - psVar16 = (std_string *)rootVisibleText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)rootVisibleText._buf) + 0x0)); } if ((rootVisibleText._size != 4) || (iVar11 = memcmp_eq(psVar16,&DAT_00b64fe8,4), iVar11 != 0)) { psVar16 = &rootVisibleText; if (0xf < textCapacity) { - psVar16 = (std_string *)rootVisibleText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)rootVisibleText._buf) + 0x0)); } if ((uVar14 != 4) || (iVar11 = memcmp_eq(psVar16,&DAT_00b64ff0,4), iVar11 != 0)) { psVar16 = &rootVisibleText; if (0xf < textCapacity) { - psVar16 = (std_string *)rootVisibleText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)rootVisibleText._buf) + 0x0)); } iVar11 = atoi(psVar16->_buf); if (iVar11 == 0) goto LAB_004105ca; @@ -2237,17 +2237,17 @@ LAB_004105ca: *(undefined1 *)(pfStack_26650 + 3) = parsedBool; if (0xf < rootVisibleText._capacity) { uVar14 = rootVisibleText._capacity + 1; - pvVar12 = (void *)rootVisibleText._buf._0_4_; + pvVar12 = (*(undefined4 *)((char *)&((void *)rootVisibleText._buf) + 0x0)); if (0xfff < uVar14) { - pvVar12 = *(void **)(rootVisibleText._buf._0_4_ + -4); + pvVar12 = *(void **)((*(undefined4 *)((char *)&(rootVisibleText._buf) + 0x0)) + -4); uVar14 = rootVisibleText._capacity + 0x24; - if (0x1f < (rootVisibleText._buf._0_4_ - (int)pvVar12) - 4U) goto LAB_00413762; + if (0x1f < ((*(undefined4 *)((char *)&(rootVisibleText._buf) + 0x0)) - GHIDRA_INT(pvVar12)) - 4U) goto LAB_00413762; } operator_delete(pvVar12,uVar14); } rootVisibleText._size = 0; rootVisibleText._capacity = 0xf; - rootVisibleText._buf._0_4_ = rootVisibleText._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(rootVisibleText._buf) + 0x0)) = (*(undefined4 *)((char *)&(rootVisibleText._buf) + 0x0)) & 0xffffff00; } else { keyName = "XScale"; @@ -2260,7 +2260,7 @@ LAB_004105ca: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00410660: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00410665; } if (bVar8 == 0) break; @@ -2292,7 +2292,7 @@ LAB_00410665: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_004106d0: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_004106d5; } if (bVar8 == 0) break; @@ -2324,7 +2324,7 @@ LAB_004106d5: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00410740: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00410745; } if (bVar8 == 0) break; @@ -2356,7 +2356,7 @@ LAB_00410745: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_004107c2: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_004107c7; } if (bVar8 == 0) break; @@ -2388,7 +2388,7 @@ LAB_004107c7: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00410850: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00410855; } if (bVar8 == 0) break; @@ -2420,7 +2420,7 @@ LAB_00410855: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_004108e2: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_004108e7; } if (bVar8 == 0) break; @@ -2452,7 +2452,7 @@ LAB_004108e7: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00410980: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00410985; } if (bVar8 == 0) break; @@ -2484,7 +2484,7 @@ LAB_00410985: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00410a22: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00410a27; } if (bVar8 == 0) break; @@ -2516,7 +2516,7 @@ LAB_00410a27: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00410ad0: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00410ad5; } if (bVar8 == 0) break; @@ -2548,7 +2548,7 @@ LAB_00410ad5: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00410b82: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00410b87; } if (bVar8 == 0) break; @@ -2579,7 +2579,7 @@ LAB_00410b87: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00410be0: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00410be5; } if (bVar8 == 0) break; @@ -2608,7 +2608,7 @@ LAB_00410be5: pbVar13 = pbVar13 + 1; } while (bVar8 != 0); ((std::string *)(rootInterpolatedText._buf))->std::string::assign(pbVar18, - (int)pbVar13 - (int)(pbVar18 + 1)); + GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar18 + 1))); textCapacity = rootInterpolatedText._capacity; uVar14 = rootInterpolatedText._size; if (rootInterpolatedText._size == 0) { @@ -2618,19 +2618,19 @@ LAB_00410cba: else { psVar16 = &rootInterpolatedText; if (0xf < rootInterpolatedText._capacity) { - psVar16 = (std_string *)rootInterpolatedText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)rootInterpolatedText._buf) + 0x0)); } if ((rootInterpolatedText._size != 4) || (iVar11 = memcmp_eq(psVar16,&DAT_00b64fe8,4), iVar11 != 0)) { psVar16 = &rootInterpolatedText; if (0xf < textCapacity) { - psVar16 = (std_string *)rootInterpolatedText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)rootInterpolatedText._buf) + 0x0)); } if ((uVar14 != 4) || (iVar11 = memcmp_eq(psVar16,&DAT_00b64ff0,4), iVar11 != 0)) { psVar16 = &rootInterpolatedText; if (0xf < textCapacity) { - psVar16 = (std_string *)rootInterpolatedText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)rootInterpolatedText._buf) + 0x0)); } iVar11 = atoi(psVar16->_buf); if (iVar11 == 0) goto LAB_00410cba; @@ -2641,18 +2641,18 @@ LAB_00410cba: *(undefined1 *)(pfStack_26650 + 0x12) = parsedBool; if (0xf < rootInterpolatedText._capacity) { uVar14 = rootInterpolatedText._capacity + 1; - pvVar12 = (void *)rootInterpolatedText._buf._0_4_; + pvVar12 = (*(undefined4 *)((char *)&((void *)rootInterpolatedText._buf) + 0x0)); if (0xfff < uVar14) { - pvVar12 = *(void **)(rootInterpolatedText._buf._0_4_ + -4); + pvVar12 = *(void **)((*(undefined4 *)((char *)&(rootInterpolatedText._buf) + 0x0)) + -4); uVar14 = rootInterpolatedText._capacity + 0x24; - if (0x1f < (rootInterpolatedText._buf._0_4_ - (int)pvVar12) - 4U) + if (0x1f < ((*(undefined4 *)((char *)&(rootInterpolatedText._buf) + 0x0)) - GHIDRA_INT(pvVar12)) - 4U) goto LAB_00413762; } operator_delete(pvVar12,uVar14); } rootInterpolatedText._size = 0; rootInterpolatedText._capacity = 0xf; - rootInterpolatedText._buf._0_4_ = rootInterpolatedText._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(rootInterpolatedText._buf) + 0x0)) = (*(undefined4 *)((char *)&(rootInterpolatedText._buf) + 0x0)) & 0xffffff00; } } pfVar26 = pfStack_26688; @@ -2673,7 +2673,7 @@ LAB_00410d81: pfStack_26650[0xf] = (float)pfStack_26674; pfStack_26650[0x10] = (float)pfStack_26664; pfStack_26650[0x13] = (float)pfStack_2667c; - pfStack_2667c = (float *)((int)pfStack_2667c + (int)pfStack_26650[2]); + pfStack_2667c = (float *)(GHIDRA_INT(pfStack_2667c) + GHIDRA_INT(pfStack_26650[2])); pfStack_26650[0x14] = (float)pfStack_2667c; pfVar26 = (float *)pfStack_26654[0xb]; uVar14 = uStack_26690; @@ -2681,7 +2681,7 @@ LAB_00410d81: InterpolateNullFrames(rootFrames,&uStack_26690,pfStack_26678); _eh_vector_constructor_iterator_ (layerAnimations,0x10,0x40,LayerAnimation::LayerAnimation,guard_check_icall); - local_14._0_1_ = 0x12; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x12; pfStack_2668c = (float *)0x0; keyName = "LayerAnimations"; do { @@ -2700,9 +2700,9 @@ LAB_00410d81: pfVar26 = (float *)puVar15[2]; } if (pfVar26 == pfStack_26654) { - pbVar13 = (byte *)((int)pfVar26 + (int)pbVar18); + pbVar13 = (byte *)(GHIDRA_INT(pfVar26) + GHIDRA_INT(pbVar18)); if (pbVar13 <= pbVar18) goto LAB_00410e71; - iVar11 = (int)"LayerAnimations" - (int)pbVar18; + iVar11 = GHIDRA_INT("LayerAnimations") - GHIDRA_INT(pbVar18); while (*pbVar18 == pbVar18[iVar11]) { pbVar18 = pbVar18 + 1; if (pbVar13 <= pbVar18) goto LAB_00410e71; @@ -2725,8 +2725,8 @@ LAB_004122bc: ((std::string *)(filePath->_buf))->std::string::c_str(); KAGE_LogMessage(0x10,(byte *)"%s: too many animation layers\n"); } - pfStack_2668c = (float *)((int)pfVar26 + 1); - pfStack_26688 = (float *)((int)pfVar26 << 4); + pfStack_2668c = (float *)(GHIDRA_INT(pfVar26) + 1); + pfStack_26688 = (float *)(GHIDRA_INT(pfVar26) << 4); pfVar26 = (float *)pfVar19[8]; while (pfVar26 != (float *)0x0) { pbVar18 = (byte *)*pfVar26; @@ -2740,7 +2740,7 @@ LAB_004122bc: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00410f01: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00410f06; } if (bVar8 == 0) break; @@ -2759,7 +2759,7 @@ LAB_00410f06: pbVar18 = (byte *)pfVar26[1]; } iVar11 = atoi((char *)pbVar18); - *(int *)((char *)layerAnimations + (int)pfStack_26688) = iVar11; + *(int *)((char *)layerAnimations + GHIDRA_INT(pfStack_26688)) = iVar11; pfStack_26654 = pfVar26; } else { @@ -2773,7 +2773,7 @@ LAB_00410f06: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00410f62: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00410f67; } if (bVar8 == 0) break; @@ -2802,7 +2802,7 @@ LAB_00410f67: pbVar13 = pbVar13 + 1; } while (bVar8 != 0); ((std::string *)(layerAnimVisibleText._buf))->std::string::assign(pbVar18, - (int)pbVar13 - (int)(pbVar18 + 1)); + GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar18 + 1))); textCapacity = layerAnimVisibleText._capacity; uVar14 = layerAnimVisibleText._size; if (layerAnimVisibleText._size == 0) { @@ -2812,18 +2812,18 @@ LAB_0041103a: else { psVar16 = &layerAnimVisibleText; if (0xf < layerAnimVisibleText._capacity) { - psVar16 = (std_string *)layerAnimVisibleText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)layerAnimVisibleText._buf) + 0x0)); } if ((layerAnimVisibleText._size != 4) || (iVar11 = memcmp_eq(psVar16,&DAT_00b64fe8,4), iVar11 != 0)) { psVar16 = &layerAnimVisibleText; if (0xf < textCapacity) { - psVar16 = (std_string *)layerAnimVisibleText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)layerAnimVisibleText._buf) + 0x0)); } if ((uVar14 != 4) || (iVar11 = memcmp_eq(psVar16,&DAT_00b64ff0,4), iVar11 != 0)) { psVar16 = &layerAnimVisibleText; if (0xf < textCapacity) { - psVar16 = (std_string *)layerAnimVisibleText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)layerAnimVisibleText._buf) + 0x0)); } iVar11 = atoi(psVar16->_buf); if (iVar11 == 0) goto LAB_0041103a; @@ -2831,21 +2831,21 @@ LAB_0041103a: } parsedBool = 1; } - auStack_aa4[(int)pfStack_26688] = parsedBool; + auStack_aa4[GHIDRA_INT(pfStack_26688)] = parsedBool; if (0xf < layerAnimVisibleText._capacity) { uVar14 = layerAnimVisibleText._capacity + 1; - pvVar12 = (void *)layerAnimVisibleText._buf._0_4_; + pvVar12 = (*(undefined4 *)((char *)&((void *)layerAnimVisibleText._buf) + 0x0)); if (0xfff < uVar14) { - pvVar12 = *(void **)(layerAnimVisibleText._buf._0_4_ + -4); + pvVar12 = *(void **)((*(undefined4 *)((char *)&(layerAnimVisibleText._buf) + 0x0)) + -4); uVar14 = layerAnimVisibleText._capacity + 0x24; - if (0x1f < (layerAnimVisibleText._buf._0_4_ - (int)pvVar12) - 4U) + if (0x1f < ((*(undefined4 *)((char *)&(layerAnimVisibleText._buf) + 0x0)) - GHIDRA_INT(pvVar12)) - 4U) goto LAB_00413762; } operator_delete(pvVar12,uVar14); } layerAnimVisibleText._size = 0; layerAnimVisibleText._capacity = 0xf; - layerAnimVisibleText._buf._0_4_ = layerAnimVisibleText._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(layerAnimVisibleText._buf) + 0x0)) = (*(undefined4 *)((char *)&(layerAnimVisibleText._buf) + 0x0)) & 0xffffff00; } } if (pfStack_26654[4] == 0.0) break; @@ -2866,11 +2866,11 @@ LAB_0041103a: KAGE_LogMessage(0x10,(byte *)"%s: too many animation frames\n"); } pfStack_26658 = (float *)pfVar26[8]; - pfStack_2667c = (float *)((int)pfVar19 + 1); + pfStack_2667c = (float *)(GHIDRA_INT(pfVar19) + 1); pfStack_26674 = (float *)0x3f800000; pfStack_26670 = (float *)0x3f800000; pfStack_2666c = (float *)0x3f800000; - pfStack_26664 = pfStack_26680 + (int)pfVar19 * 0x1b; + pfStack_26664 = pfStack_26680 + GHIDRA_INT(pfVar19) * 0x1b; pfStack_26668 = (float *)0x3f800000; pfStack_26660 = (float *)0x0; pfStack_2665c = (float *)0x0; @@ -2889,7 +2889,7 @@ LAB_00411184: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_004111b5: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_004111ba; } if (bVar8 == 0) break; @@ -2920,7 +2920,7 @@ LAB_004111ba: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00411212: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00411217; } if (bVar8 == 0) break; @@ -2951,7 +2951,7 @@ LAB_00411217: isLess = bVar8 < *pbVar17; if (bVar8 != *pbVar17) { LAB_00411270: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00411275; } if (bVar8 == 0) break; @@ -2982,7 +2982,7 @@ LAB_00411275: isLess = bVar8 < *pbVar17; if (bVar8 != *pbVar17) { LAB_004112d0: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_004112d5; } if (bVar8 == 0) break; @@ -3013,7 +3013,7 @@ LAB_004112d5: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00411330: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00411335; } if (bVar8 == 0) break; @@ -3044,7 +3044,7 @@ LAB_00411335: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00411390: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00411395; } if (bVar8 == 0) break; @@ -3075,7 +3075,7 @@ LAB_00411395: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_004113f0: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_004113f5; } if (bVar8 == 0) break; @@ -3107,7 +3107,7 @@ LAB_004113f5: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00411460: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00411465; } if (bVar8 == 0) break; @@ -3139,7 +3139,7 @@ LAB_00411465: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_004114d0: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_004114d5; } if (bVar8 == 0) break; @@ -3170,7 +3170,7 @@ LAB_004114d5: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00411530: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00411535; } if (bVar8 == 0) break; @@ -3199,7 +3199,7 @@ LAB_00411535: pbVar13 = pbVar13 + 1; } while (bVar8 != 0); ((std::string *)(layerFrameVisibleText._buf))->std::string::assign(pbVar18, - (int)pbVar13 - (int)(pbVar18 + 1)); + GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar18 + 1))); textCapacity = layerFrameVisibleText._capacity; uVar14 = layerFrameVisibleText._size; if (layerFrameVisibleText._size == 0) { @@ -3209,20 +3209,20 @@ LAB_00411602: else { psVar16 = &layerFrameVisibleText; if (0xf < layerFrameVisibleText._capacity) { - psVar16 = (std_string *)layerFrameVisibleText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)layerFrameVisibleText._buf) + 0x0)); } bVar8 = str_eq((byte *)psVar16,layerFrameVisibleText._size, &DAT_00b64fe8,4); if (bVar8 == 0) { psVar16 = &layerFrameVisibleText; if (0xf < textCapacity) { - psVar16 = (std_string *)layerFrameVisibleText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)layerFrameVisibleText._buf) + 0x0)); } bVar8 = str_eq((byte *)psVar16,uVar14,&DAT_00b64ff0,4); if (bVar8 == 0) { psVar16 = &layerFrameVisibleText; if (0xf < textCapacity) { - psVar16 = (std_string *)layerFrameVisibleText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)layerFrameVisibleText._buf) + 0x0)); } iVar11 = atoi(psVar16->_buf); if (iVar11 == 0) goto LAB_00411602; @@ -3233,19 +3233,19 @@ LAB_00411602: *(undefined1 *)(pfStack_26664 + 0xb) = parsedBool; if (0xf < layerFrameVisibleText._capacity) { uVar14 = layerFrameVisibleText._capacity + 1; - pvVar12 = (void *)layerFrameVisibleText._buf._0_4_; + pvVar12 = (*(undefined4 *)((char *)&((void *)layerFrameVisibleText._buf) + 0x0)); if (0xfff < uVar14) { - pvVar12 = *(void **)(layerFrameVisibleText._buf._0_4_ + -4); + pvVar12 = *(void **)((*(undefined4 *)((char *)&(layerFrameVisibleText._buf) + 0x0)) + -4); uVar14 = layerFrameVisibleText._capacity + 0x24; - if (0x1f < (layerFrameVisibleText._buf._0_4_ - (int)pvVar12) - + if (0x1f < ((*(undefined4 *)((char *)&(layerFrameVisibleText._buf) + 0x0)) - GHIDRA_INT(pvVar12)) - 4U) goto LAB_00413762; } operator_delete(pvVar12,uVar14); } layerFrameVisibleText._size = 0; layerFrameVisibleText._capacity = 0xf; - layerFrameVisibleText._buf._0_4_ = - layerFrameVisibleText._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(layerFrameVisibleText._buf) + 0x0)) = + (*(undefined4 *)((char *)&(layerFrameVisibleText._buf) + 0x0)) & 0xffffff00; } else { keyName = "XCrop"; @@ -3258,7 +3258,7 @@ LAB_00411602: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00411696: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_0041169b; } if (bVar8 == 0) break; @@ -3289,7 +3289,7 @@ LAB_0041169b: isLess = bVar8 < *pbVar17; if (bVar8 != *pbVar17) { LAB_004116f2: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_004116f7; } if (bVar8 == 0) break; @@ -3320,7 +3320,7 @@ LAB_004116f7: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00411750: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00411755; } if (bVar8 == 0) break; @@ -3352,7 +3352,7 @@ LAB_00411755: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_004117d2: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_004117d7; } if (bVar8 == 0) break; @@ -3384,7 +3384,7 @@ LAB_004117d7: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00411860: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00411865; } if (bVar8 == 0) break; @@ -3416,7 +3416,7 @@ LAB_00411865: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_004118f2: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_004118f7; } if (bVar8 == 0) break; @@ -3448,7 +3448,7 @@ LAB_004118f7: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00411990: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00411995; } if (bVar8 == 0) break; @@ -3480,7 +3480,7 @@ LAB_00411995: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00411a32: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00411a37; } if (bVar8 == 0) break; @@ -3512,7 +3512,7 @@ LAB_00411a37: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00411ae0: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00411ae5; } if (bVar8 == 0) break; @@ -3544,7 +3544,7 @@ LAB_00411ae5: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00411b92: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00411b97; } if (bVar8 == 0) break; @@ -3575,7 +3575,7 @@ LAB_00411b97: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00411bf0: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00411bf5; } if (bVar8 == 0) break; @@ -3604,7 +3604,7 @@ LAB_00411bf5: pbVar13 = pbVar13 + 1; } while (bVar8 != 0); ((std::string *)(layerFrameInterpolatedText._buf))->std::string::assign(pbVar18, - (int)pbVar13 - (int)(pbVar18 + 1)); + GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar18 + 1))); textCapacity = layerFrameInterpolatedText._capacity; uVar14 = layerFrameInterpolatedText._size; if (layerFrameInterpolatedText._size == 0) { @@ -3614,7 +3614,7 @@ LAB_00411cc2: else { psVar16 = &layerFrameInterpolatedText; if (0xf < layerFrameInterpolatedText._capacity) { - psVar16 = (std_string *)layerFrameInterpolatedText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)layerFrameInterpolatedText._buf) + 0x0)); } bVar8 = str_eq((byte *)psVar16,layerFrameInterpolatedText._size, &DAT_00b64fe8,4); @@ -3622,14 +3622,14 @@ LAB_00411cc2: psVar16 = &layerFrameInterpolatedText; if (0xf < textCapacity) { psVar16 = (std_string *) - layerFrameInterpolatedText._buf._0_4_; + (*(undefined4 *)((char *)&(layerFrameInterpolatedText._buf) + 0x0)); } bVar8 = str_eq((byte *)psVar16,uVar14,&DAT_00b64ff0,4); if (bVar8 == 0) { psVar16 = &layerFrameInterpolatedText; if (0xf < textCapacity) { psVar16 = (std_string *) - layerFrameInterpolatedText._buf._0_4_; + (*(undefined4 *)((char *)&(layerFrameInterpolatedText._buf) + 0x0)); } iVar11 = atoi(psVar16->_buf); if (iVar11 == 0) goto LAB_00411cc2; @@ -3640,20 +3640,20 @@ LAB_00411cc2: *(undefined1 *)(pfStack_26664 + 0x18) = parsedBool; if (0xf < layerFrameInterpolatedText._capacity) { uVar14 = layerFrameInterpolatedText._capacity + 1; - pvVar12 = (void *)layerFrameInterpolatedText._buf._0_4_; + pvVar12 = (*(undefined4 *)((char *)&((void *)layerFrameInterpolatedText._buf) + 0x0)); if (0xfff < uVar14) { - pvVar12 = *(void **)(layerFrameInterpolatedText._buf._0_4_ + + pvVar12 = *(void **)((*(undefined4 *)((char *)&(layerFrameInterpolatedText._buf) + 0x0)) + -4); uVar14 = layerFrameInterpolatedText._capacity + 0x24; - if (0x1f < (layerFrameInterpolatedText._buf._0_4_ - - (int)pvVar12) - 4U) goto LAB_00413762; + if (0x1f < ((*(undefined4 *)((char *)&(layerFrameInterpolatedText._buf) + 0x0)) - + GHIDRA_INT(pvVar12)) - 4U) goto LAB_00413762; } operator_delete(pvVar12,uVar14); } layerFrameInterpolatedText._size = 0; layerFrameInterpolatedText._capacity = 0xf; - layerFrameInterpolatedText._buf._0_4_ = - layerFrameInterpolatedText._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(layerFrameInterpolatedText._buf) + 0x0)) = + (*(undefined4 *)((char *)&(layerFrameInterpolatedText._buf) + 0x0)) & 0xffffff00; } } pfVar26 = pfStack_26658; @@ -3681,7 +3681,7 @@ LAB_00411d89: pfStack_26664[0x15] = (float)pfStack_2665c; pfStack_26664[0x16] = (float)pfStack_26650; pfStack_26664[0x19] = (float)pfStack_266a0; - pfStack_266a0 = (float *)((int)pfStack_266a0 + (int)pfStack_26664[10]); + pfStack_266a0 = (float *)(GHIDRA_INT(pfStack_266a0) + GHIDRA_INT(pfStack_26664[10])); pfStack_26664[0x1a] = (float)pfStack_266a0; pfVar26 = (float *)pfStack_26654[0xb]; pfVar19 = pfStack_2667c; @@ -3700,25 +3700,25 @@ LAB_00411d89: pfStack_2667c[0x14] = (float)pfVar21; rootScaleY = pfStack_2667c[5]; pfStack_26658 = (float *)0x0; - if (0 < (int)rootScaleY) { - pfStack_266a0 = pfStack_2669c + (int)pfVar19 * 0x1b; + if (0 < GHIDRA_INT(rootScaleY)) { + pfStack_266a0 = pfStack_2669c + GHIDRA_INT(pfVar19) * 0x1b; pfStack_2665c = pfVar21; pfVar26 = pfVar24; do { - pfStack_2665c = (float *)((int)pfStack_2665c + 1); - iVar11 = (int)pfVar26 + 1; + pfStack_2665c = (float *)(GHIDRA_INT(pfStack_2665c) + 1); + iVar11 = GHIDRA_INT(pfVar26) + 1; pfVar24 = pfVar26; - if (iVar11 < (int)uStack_26690) { - piVar9 = (int *)((int)rootFrames + (int)pfVar26 * 0x54 + 0x50); + if (iVar11 < GHIDRA_INT(uStack_26690)) { + piVar9 = (int *)(GHIDRA_INT(rootFrames) + GHIDRA_INT(pfVar26) * 0x54 + 0x50); do { - if ((int)pfStack_2665c < *piVar9) break; + if (GHIDRA_INT(pfStack_2665c) < *piVar9) break; iVar11 = iVar11 + 1; - pfVar24 = (float *)((int)pfVar24 + 1); + pfVar24 = (float *)(GHIDRA_INT(pfVar24) + 1); piVar9 = piVar9 + 0x15; - } while (iVar11 < (int)uStack_26690); - if ((int)pfVar24 <= (int)pfVar26) goto LAB_00411e9b; + } while (iVar11 < GHIDRA_INT(uStack_26690)); + if (GHIDRA_INT(pfVar24) <= GHIDRA_INT(pfVar26)) goto LAB_00411e9b; LAB_00411eb2: - pfStack_26654 = (float *)((int)pfVar26 * 0x54 + (int)rootFrames); + pfStack_26654 = (float *)(GHIDRA_INT(pfVar26) * 0x54 + GHIDRA_INT(rootFrames)); if ((float *)0x1387 < pfStack_26650) { ((std::string *)(filePath->_buf))->std::string::c_str(); KAGE_LogMessage(0x10,(byte *) @@ -3726,7 +3726,7 @@ LAB_00411eb2: ); } pfVar26 = pfStack_266a0; - pfStack_26650 = (float *)((int)pfStack_26650 + 1); + pfStack_26650 = (float *)(GHIDRA_INT(pfStack_26650) + 1); *pfStack_266a0 = pfStack_2667c[-5]; pfStack_266a0[1] = pfStack_2667c[-4]; pfStack_266a0[2] = pfStack_2667c[-3]; @@ -3767,26 +3767,26 @@ LAB_00411eb2: } else { LAB_00411e9b: - if (pfStack_26658 == (float *)((int)rootScaleY + -1)) goto LAB_00411eb2; + if (pfStack_26658 == (float *)(GHIDRA_INT(rootScaleY) + -1)) goto LAB_00411eb2; pfStack_26654 = pfVar26; } rootScaleY = pfStack_2667c[5]; - pfStack_26658 = (float *)((int)pfStack_26658 + 1); + pfStack_26658 = (float *)(GHIDRA_INT(pfStack_26658) + 1); pfVar26 = pfVar24; - } while ((int)pfStack_26658 < (int)rootScaleY); + } while (GHIDRA_INT(pfStack_26658) < GHIDRA_INT(rootScaleY)); pfVar19 = pfStack_26650; pfVar21 = pfStack_2665c; } pfVar25 = pfStack_26650; pfStack_2667c = pfStack_2667c + 0x1b; - pfStack_26660 = (float *)((int)pfStack_26660 + -1); + pfStack_26660 = (float *)(GHIDRA_INT(pfStack_26660) + -1); } while (pfStack_26660 != (float *)0x0); pfVar26 = (float *)0x0; if (pfVar19 != (float *)0x0) { pfStack_26654 = pfVar19; pfVar26 = operator_new_tracked - (-(uint)((int)(ZEXT48(pfStack_26650) * 0x6c >> 0x20) != 0) | - (uint)(ZEXT48(pfStack_26650) * 0x6c)); + (-GHIDRA_UINT((GHIDRA_INT((ZEXT48(pfStack_26650) * 0x6c >> 0x20)) != 0)) | + GHIDRA_UINT((ZEXT48(pfStack_26650) * 0x6c))); if (pfVar26 == (float *)0x0) { pfVar26 = (float *)0x0; pfStack_26654 = (float *)0x0; @@ -3809,19 +3809,19 @@ LAB_00411e9b: ((Color *)((Color *)(pfVar19 + 7)))->Color::Color(); *(undefined1 *)(extraout_EDX_06 + 0x4c) = 0; pfVar19 = (float *)(extraout_EDX_06 + 0x6c); - pfVar25 = (float *)((int)pfVar25 + -1); + pfVar25 = (float *)(GHIDRA_INT(pfVar25) + -1); } while (pfVar25 != (float *)0x0); } pfVar19 = pfVar26 + 3; - local_14._0_1_ = 0x12; - pfStack_26658 = (float *)((int)pfStack_2669c - (int)pfVar26); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x12; + pfStack_26658 = (float *)(GHIDRA_INT(pfStack_2669c) - GHIDRA_INT(pfVar26)); pfVar26 = pfStack_2669c + 7; pfVar25 = pfStack_26650; do { pfVar19[-3] = pfVar26[-7]; pfVar19[-2] = pfVar26[-6]; pfVar19[-1] = pfVar26[-5]; - *pfVar19 = *(float *)((char *)pfStack_26658 + (int)pfVar19); + *pfVar19 = *(float *)((char *)pfStack_26658 + GHIDRA_INT(pfVar19)); pfVar19[1] = pfVar26[-3]; pfVar19[2] = pfVar26[-2]; pfVar19[3] = pfVar26[-1]; @@ -3836,24 +3836,24 @@ LAB_00411e9b: *(undefined1 *)(extraout_EDX_07 + 0x54) = *(undefined1 *)(pfVar26 + 0x11); *(float *)(extraout_EDX_07 + 0x58) = pfVar26[0x12]; *(float *)(extraout_EDX_07 + 0x5c) = pfVar26[0x13]; - pfVar25 = (float *)((int)pfVar25 + -1); + pfVar25 = (float *)(GHIDRA_INT(pfVar25) + -1); pfVar26 = pfVar26 + 0x1b; } while (pfVar25 != (float *)0x0); - *(float **)((char *)(layerAnimations + 1) + (int)pfStack_26688) = pfStack_26654; + *(float **)((char *)(layerAnimations + 1) + GHIDRA_INT(pfStack_26688)) = pfStack_26654; pfVar26 = pfStack_26650; } } pfVar19 = pfStack_2668c; - *(float **)((char *)(layerAnimations + 2) + (int)pfStack_26688) = pfVar26; + *(float **)((char *)(layerAnimations + 2) + GHIDRA_INT(pfStack_26688)) = pfVar26; pfStack_2664c = (float *)pfStack_2664c[0xb]; } while (pfStack_2664c != (float *)0x0); if (pfStack_2668c == (float *)0x0) goto LAB_004122bc; pfStack_2664c = pfStack_2668c; pfStack_26654 = (float *)0x0; - uVar14 = -(uint)((int)(ZEXT48(pfStack_2668c) * 0x10 >> 0x20) != 0) | - (uint)(ZEXT48(pfStack_2668c) * 0x10); - puStack_266c4 = operator_new_tracked(-(uint)(0xfffffffb < uVar14) | uVar14 + 4); - local_14._0_1_ = 0x14; + uVar14 = -GHIDRA_UINT((GHIDRA_INT((ZEXT48(pfStack_2668c) * 0x10 >> 0x20)) != 0)) | + GHIDRA_UINT((ZEXT48(pfStack_2668c) * 0x10)); + puStack_266c4 = operator_new_tracked(-GHIDRA_UINT((0xfffffffb < uVar14)) | uVar14 + 4); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x14; if (puStack_266c4 == (undefined4 *)0x0) { pfVar26 = (float *)0x0; pfStack_26654 = (float *)0x0; @@ -3863,19 +3863,19 @@ LAB_00411e9b: *puStack_266c4 = pfVar19; pfStack_26654 = pfVar26; _eh_vector_constructor_iterator_ - (pfVar26,0x10,(uint)pfVar19,LayerAnimation::LayerAnimation,guard_check_icall); + (pfVar26,0x10,GHIDRA_UINT(pfVar19),LayerAnimation::LayerAnimation,guard_check_icall); } - local_14._0_1_ = 0x12; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x12; pfVar19 = pfVar26 + 3; pfVar25 = layerAnimations + 2; pfVar21 = pfStack_2668c; do { pfVar19[-3] = pfVar25[-2]; *(undefined1 *)pfVar19 = - *(undefined1 *)((char *)nullNames + (0x5f0 - (int)pfVar26) + (int)(pfVar19 + 4)); + *(undefined1 *)((char *)nullNames + (0x5f0 - GHIDRA_INT(pfVar26)) + GHIDRA_INT((pfVar19 + 4))); pfVar19[-2] = pfVar25[-1]; pfVar19[-1] = *pfVar25; - pfVar21 = (float *)((int)pfVar21 + -1); + pfVar21 = (float *)(GHIDRA_INT(pfVar21) + -1); pfVar19 = pfVar19 + 4; pfVar25 = pfVar25 + 4; } while (pfVar21 != (float *)0x0); @@ -3892,7 +3892,7 @@ LAB_00411e9b: } _eh_vector_constructor_iterator_ (&nullAnimations,0x10,0x40,(_func_void_void_ptr *)&LAB_0040c210,guard_check_icall); - local_14._0_1_ = 0x15; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x15; pfStack_2668c = (float *)0x0; keyName = "NullAnimations"; do { @@ -3910,9 +3910,9 @@ LAB_00411e9b: keyName = (char *)puVar15[2]; } if (keyName == pcVar22 + -0xb1b5af) { - pbVar13 = pbVar18 + (int)keyName; + pbVar13 = pbVar18 + GHIDRA_INT(keyName); if (pbVar13 <= pbVar18) goto LAB_00412352; - iVar11 = (int)"NullAnimations" - (int)pbVar18; + iVar11 = GHIDRA_INT("NullAnimations") - GHIDRA_INT(pbVar18); while (*pbVar18 == pbVar18[iVar11]) { pbVar18 = pbVar18 + 1; if (pbVar13 <= pbVar18) goto LAB_00412352; @@ -3924,7 +3924,7 @@ LAB_00412352: pfStack_26654 = (float *)puVar15[6]; if (pfStack_26654 == (float *)0x0) { LAB_00413466: - local_14._0_1_ = 0x15; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x15; } else { do { @@ -3934,8 +3934,8 @@ LAB_00413466: ((std::string *)(filePath->_buf))->std::string::c_str(); KAGE_LogMessage(0x10,(byte *)"%s: too many null layers\n"); } - pfStack_2668c = (float *)((int)pfVar26 + 1); - pfStack_266a0 = (float *)((int)pfVar26 << 4); + pfStack_2668c = (float *)(GHIDRA_INT(pfVar26) + 1); + pfStack_266a0 = (float *)(GHIDRA_INT(pfVar26) << 4); for (pfVar26 = (float *)pfVar19[8]; pfStack_2664c = pfVar26, pfVar26 != (float *)0x0; pfVar26 = (float *)pfVar26[6]) { pbVar18 = (byte *)*pfVar26; @@ -3949,7 +3949,7 @@ LAB_00413466: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_004123e1: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_004123e6; } if (bVar8 == 0) break; @@ -3967,7 +3967,7 @@ LAB_004123e6: pbVar18 = (byte *)pfVar26[1]; } iVar11 = atoi((char *)pbVar18); - *(int *)((int)&nullAnimations + (int)pfStack_266a0) = iVar11; + *(int *)(GHIDRA_INT(&nullAnimations) + GHIDRA_INT(pfStack_266a0)) = iVar11; } else { keyName = "Visible"; @@ -3980,7 +3980,7 @@ LAB_004123e6: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00412442: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00412447; } if (bVar8 == 0) break; @@ -4008,7 +4008,7 @@ LAB_00412447: bVar8 = *pbVar13; pbVar13 = pbVar13 + 1; } while (bVar8 != 0); - ((std::string *)(nullAnimVisibleText._buf))->std::string::assign(pbVar18,(int)pbVar13 - (int)(pbVar18 + 1)); + ((std::string *)(nullAnimVisibleText._buf))->std::string::assign(pbVar18,GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar18 + 1))); textCapacity = nullAnimVisibleText._capacity; uVar14 = nullAnimVisibleText._size; if (nullAnimVisibleText._size == 0) { @@ -4018,19 +4018,19 @@ LAB_00412512: else { psVar16 = &nullAnimVisibleText; if (0xf < nullAnimVisibleText._capacity) { - psVar16 = (std_string *)nullAnimVisibleText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)nullAnimVisibleText._buf) + 0x0)); } bVar8 = str_eq((byte *)psVar16,nullAnimVisibleText._size,&DAT_00b64fe8,4); if (bVar8 == 0) { psVar16 = &nullAnimVisibleText; if (0xf < textCapacity) { - psVar16 = (std_string *)nullAnimVisibleText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)nullAnimVisibleText._buf) + 0x0)); } bVar8 = str_eq((byte *)psVar16,uVar14,&DAT_00b64ff0,4); if (bVar8 == 0) { psVar16 = &nullAnimVisibleText; if (0xf < textCapacity) { - psVar16 = (std_string *)nullAnimVisibleText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)nullAnimVisibleText._buf) + 0x0)); } iVar11 = atoi(psVar16->_buf); if (iVar11 == 0) goto LAB_00412512; @@ -4038,21 +4038,21 @@ LAB_00412512: } parsedBool = 1; } - *(undefined1 *)((char *)local_6ac + (int)pfStack_266a0) = parsedBool; + *(undefined1 *)((char *)local_6ac + GHIDRA_INT(pfStack_266a0)) = parsedBool; if (0xf < nullAnimVisibleText._capacity) { uVar14 = nullAnimVisibleText._capacity + 1; - pvVar12 = (void *)nullAnimVisibleText._buf._0_4_; + pvVar12 = (*(undefined4 *)((char *)&((void *)nullAnimVisibleText._buf) + 0x0)); if (0xfff < uVar14) { - pvVar12 = *(void **)(nullAnimVisibleText._buf._0_4_ + -4); + pvVar12 = *(void **)((*(undefined4 *)((char *)&(nullAnimVisibleText._buf) + 0x0)) + -4); uVar14 = nullAnimVisibleText._capacity + 0x24; - if (0x1f < (nullAnimVisibleText._buf._0_4_ - (int)pvVar12) - 4U) + if (0x1f < ((*(undefined4 *)((char *)&(nullAnimVisibleText._buf) + 0x0)) - GHIDRA_INT(pvVar12)) - 4U) goto LAB_00413762; } operator_delete(pvVar12,uVar14); } nullAnimVisibleText._size = 0; nullAnimVisibleText._capacity = 0xf; - nullAnimVisibleText._buf._0_4_ = nullAnimVisibleText._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(nullAnimVisibleText._buf) + 0x0)) = (*(undefined4 *)((char *)&(nullAnimVisibleText._buf) + 0x0)) & 0xffffff00; pfVar26 = pfStack_2664c; } } @@ -4073,11 +4073,11 @@ LAB_00412512: KAGE_LogMessage(0x10,(byte *)"%s: too many null frames\n"); } pfStack_2664c = (float *)pfVar26[8]; - pfStack_26688 = (float *)((int)pfVar19 + 1); + pfStack_26688 = (float *)(GHIDRA_INT(pfVar19) + 1); pfStack_2665c = (float *)0x3f800000; pfStack_26660 = (float *)0x3f800000; pfStack_26668 = (float *)0x3f800000; - pfStack_26650 = (float *)((int)pfVar19 * 0x54 + (int)pvStack_266ac); + pfStack_26650 = (float *)(GHIDRA_INT(pfVar19) * 0x54 + GHIDRA_INT(pvStack_266ac)); pfStack_2666c = (float *)0x3f800000; pfStack_26670 = (float *)0x0; pfStack_26674 = (float *)0x0; @@ -4096,7 +4096,7 @@ LAB_00412512: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00412693: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00412698; } if (bVar8 == 0) break; @@ -4127,7 +4127,7 @@ LAB_00412698: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_004126f0: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_004126f5; } if (bVar8 == 0) break; @@ -4158,7 +4158,7 @@ LAB_004126f5: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00412750: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00412755; } if (bVar8 == 0) break; @@ -4189,7 +4189,7 @@ LAB_00412755: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_004127b0: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_004127b5; } if (bVar8 == 0) break; @@ -4218,7 +4218,7 @@ LAB_004127b5: pbVar13 = pbVar13 + 1; } while (bVar8 != 0); ((std::string *)(nullFrameVisibleText._buf))->std::string::assign(pbVar18, - (int)pbVar13 - (int)(pbVar18 + 1)); + GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar18 + 1))); textCapacity = nullFrameVisibleText._capacity; uVar14 = nullFrameVisibleText._size; if (nullFrameVisibleText._size == 0) { @@ -4229,19 +4229,19 @@ LAB_00412898: else { psVar16 = &nullFrameVisibleText; if (0xf < nullFrameVisibleText._capacity) { - psVar16 = (std_string *)nullFrameVisibleText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)nullFrameVisibleText._buf) + 0x0)); } bVar8 = str_eq((byte *)psVar16,nullFrameVisibleText._size,&DAT_00b64fe8,4); if (bVar8 == 0) { psVar16 = &nullFrameVisibleText; if (0xf < textCapacity) { - psVar16 = (std_string *)nullFrameVisibleText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)nullFrameVisibleText._buf) + 0x0)); } bVar8 = str_eq((byte *)psVar16,uVar14,&DAT_00b64ff0,4); if (bVar8 == 0) { psVar16 = &nullFrameVisibleText; if (0xf < textCapacity) { - psVar16 = (std_string *)nullFrameVisibleText._buf._0_4_; + psVar16 = (*(undefined4 *)((char *)&((std_string *)nullFrameVisibleText._buf) + 0x0)); } iVar11 = atoi(psVar16->_buf); if (iVar11 == 0) goto LAB_00412898; @@ -4265,7 +4265,7 @@ LAB_00412f43: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_004128e0: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_004128e5; } if (bVar8 == 0) break; @@ -4297,7 +4297,7 @@ LAB_004128e5: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00412950: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00412955; } if (bVar8 == 0) break; @@ -4329,7 +4329,7 @@ LAB_00412955: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_004129c0: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_004129c5; } if (bVar8 == 0) break; @@ -4361,7 +4361,7 @@ LAB_004129c5: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00412a42: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00412a47; } if (bVar8 == 0) break; @@ -4393,7 +4393,7 @@ LAB_00412a47: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00412ad0: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00412ad5; } if (bVar8 == 0) break; @@ -4425,7 +4425,7 @@ LAB_00412ad5: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00412b62: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00412b67; } if (bVar8 == 0) break; @@ -4457,7 +4457,7 @@ LAB_00412b67: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00412c00: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00412c05; } if (bVar8 == 0) break; @@ -4489,7 +4489,7 @@ LAB_00412c05: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00412ca2: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00412ca7; } if (bVar8 == 0) break; @@ -4521,7 +4521,7 @@ LAB_00412ca7: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00412d50: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00412d55; } if (bVar8 == 0) break; @@ -4553,7 +4553,7 @@ LAB_00412d55: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00412e02: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00412e07; } if (bVar8 == 0) break; @@ -4584,7 +4584,7 @@ LAB_00412e07: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00412e60: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00412e65; } if (bVar8 == 0) break; @@ -4612,8 +4612,8 @@ LAB_00412e65: bVar8 = *pbVar13; pbVar13 = pbVar13 + 1; } while (bVar8 != 0); - ((std::string *)(nullFrameInterpolatedText._buf))->std::string::assign(pbVar18,(int)pbVar13 - - (int)(pbVar18 + 1)); + ((std::string *)(nullFrameInterpolatedText._buf))->std::string::assign(pbVar18,GHIDRA_INT(pbVar13) - + GHIDRA_INT((pbVar18 + 1))); textCapacity = nullFrameInterpolatedText._capacity; uVar14 = nullFrameInterpolatedText._size; if (nullFrameInterpolatedText._size == 0) { @@ -4624,7 +4624,7 @@ LAB_00412f32: psVar16 = &nullFrameInterpolatedText; if (0xf < nullFrameInterpolatedText._capacity) { psVar16 = (std_string *) - nullFrameInterpolatedText._buf._0_4_; + (*(undefined4 *)((char *)&(nullFrameInterpolatedText._buf) + 0x0)); } bVar8 = str_eq((byte *)psVar16, nullFrameInterpolatedText._size, @@ -4633,7 +4633,7 @@ LAB_00412f32: psVar16 = &nullFrameInterpolatedText; if (0xf < textCapacity) { psVar16 = (std_string *) - nullFrameInterpolatedText._buf._0_4_; + (*(undefined4 *)((char *)&(nullFrameInterpolatedText._buf) + 0x0)); } bVar8 = str_eq((byte *)psVar16,uVar14,&DAT_00b64ff0, 4); @@ -4641,7 +4641,7 @@ LAB_00412f32: psVar16 = &nullFrameInterpolatedText; if (0xf < textCapacity) { psVar16 = (std_string *) - nullFrameInterpolatedText._buf._0_4_; + (*(undefined4 *)((char *)&(nullFrameInterpolatedText._buf) + 0x0)); } iVar11 = atoi(psVar16->_buf); if (iVar11 == 0) goto LAB_00412f32; @@ -4678,7 +4678,7 @@ LAB_00412f32: pfStack_26650[0xf] = (float)pfStack_26674; pfStack_26650[0x10] = (float)pfStack_26664; pfStack_26650[0x13] = (float)pfStack_26658; - pfStack_26658 = (float *)((int)pfStack_26658 + (int)pfStack_26650[2]); + pfStack_26658 = (float *)(GHIDRA_INT(pfStack_26658) + GHIDRA_INT(pfStack_26650[2])); pfStack_26650[0x14] = (float)pfStack_26658; pfVar26 = (float *)pfStack_2667c[0xb]; pfVar19 = pfStack_26688; @@ -4692,35 +4692,35 @@ LAB_00412f32: pfVar21 = (float *)0x0; pfVar26 = pfVar19; if (pfStack_26688 != (float *)0x0) { - pfStack_2667c = (float *)((int)pvVar12 + 4); + pfStack_2667c = (float *)(GHIDRA_INT(pvVar12) + 4); do { pfStack_2667c[0x12] = (float)pfVar25; rootScaleY = pfStack_2667c[1]; pfStack_2664c = (float *)0x0; pfVar26 = pfStack_2667c; - if (0 < (int)rootScaleY) { - pfStack_26688 = pfStack_266a4 + (int)pfVar19 * 0x15; + if (0 < GHIDRA_INT(rootScaleY)) { + pfStack_26688 = pfStack_266a4 + GHIDRA_INT(pfVar19) * 0x15; pfStack_26660 = pfVar25; pfVar19 = pfVar21; do { - pfStack_26660 = (float *)((int)pfStack_26660 + 1); - iVar11 = (int)pfVar19 + 1; + pfStack_26660 = (float *)(GHIDRA_INT(pfStack_26660) + 1); + iVar11 = GHIDRA_INT(pfVar19) + 1; pfVar21 = pfVar19; - if (iVar11 < (int)uStack_26690) { - piVar9 = (int *)((int)rootFrames + (int)pfVar19 * 0x54 + 0x50); + if (iVar11 < GHIDRA_INT(uStack_26690)) { + piVar9 = (int *)(GHIDRA_INT(rootFrames) + GHIDRA_INT(pfVar19) * 0x54 + 0x50); do { - if ((int)pfStack_26660 < *piVar9) break; + if (GHIDRA_INT(pfStack_26660) < *piVar9) break; iVar11 = iVar11 + 1; - pfVar21 = (float *)((int)pfVar21 + 1); + pfVar21 = (float *)(GHIDRA_INT(pfVar21) + 1); piVar9 = piVar9 + 0x15; - } while (iVar11 < (int)uStack_26690); - if ((int)pfVar21 <= (int)pfVar19) { + } while (iVar11 < GHIDRA_INT(uStack_26690)); + if (GHIDRA_INT(pfVar21) <= GHIDRA_INT(pfVar19)) { rootScaleY = pfStack_2667c[1]; pfVar26 = pfStack_2667c; goto LAB_004130be; } LAB_004130d3: - pfStack_26658 = (float *)((int)pfVar19 * 0x54 + (int)rootFrames); + pfStack_26658 = (float *)(GHIDRA_INT(pfVar19) * 0x54 + GHIDRA_INT(rootFrames)); if ((float *)0x1387 < pfStack_26650) { ((std::string *)(filePath->_buf))->std::string::c_str(); KAGE_LogMessage(0x10,(byte *) @@ -4728,7 +4728,7 @@ LAB_004130d3: ); } pfVar26 = pfStack_26688; - pfStack_26650 = (float *)((int)pfStack_26650 + 1); + pfStack_26650 = (float *)(GHIDRA_INT(pfStack_26650) + 1); *pfStack_26688 = pfStack_2667c[-1]; pfStack_26688[1] = *pfStack_2667c; pfStack_26688[2] = pfStack_2667c[1]; @@ -4765,25 +4765,25 @@ LAB_004130d3: else { LAB_004130be: pfStack_26658 = pfVar19; - if (pfStack_2664c == (float *)((int)rootScaleY + -1)) goto LAB_004130d3; + if (pfStack_2664c == (float *)(GHIDRA_INT(rootScaleY) + -1)) goto LAB_004130d3; } rootScaleY = pfVar26[1]; - pfStack_2664c = (float *)((int)pfStack_2664c + 1); + pfStack_2664c = (float *)(GHIDRA_INT(pfStack_2664c) + 1); pfVar19 = pfVar21; - } while ((int)pfStack_2664c < (int)rootScaleY); + } while (GHIDRA_INT(pfStack_2664c) < GHIDRA_INT(rootScaleY)); pfVar19 = pfStack_26650; pfVar25 = pfStack_26660; } pfVar24 = pfStack_26650; pfStack_2667c = pfVar26 + 0x15; - pfStack_2665c = (float *)((int)pfStack_2665c + -1); + pfStack_2665c = (float *)(GHIDRA_INT(pfStack_2665c) + -1); } while (pfStack_2665c != (float *)0x0); pfVar26 = (float *)0x0; if (pfVar19 != (float *)0x0) { pfStack_2664c = pfVar19; pfVar26 = operator_new_tracked - (-(uint)((int)(ZEXT48(pfStack_26650) * 0x54 >> 0x20) != 0) | - (uint)(ZEXT48(pfStack_26650) * 0x54)); + (-GHIDRA_UINT((GHIDRA_INT((ZEXT48(pfStack_26650) * 0x54 >> 0x20)) != 0)) | + GHIDRA_UINT((ZEXT48(pfStack_26650) * 0x54))); if (pfVar26 == (float *)0x0) { pfVar26 = (float *)0x0; pfStack_2664c = (float *)0x0; @@ -4800,12 +4800,12 @@ LAB_004130be: ((Color *)((Color *)(pfVar19 + 5)))->Color::Color(); *(undefined1 *)(extraout_EDX_09 + 0x44) = 0; pfVar19 = (float *)(extraout_EDX_09 + 0x54); - pfVar24 = (float *)((int)pfVar24 + -1); + pfVar24 = (float *)(GHIDRA_INT(pfVar24) + -1); } while (pfVar24 != (float *)0x0); } pfVar19 = pfVar26 + 5; - local_14._0_1_ = 0x15; - pfStack_26658 = (float *)((int)pfStack_266a4 - (int)pfVar26); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x15; + pfStack_26658 = (float *)(GHIDRA_INT(pfStack_266a4) - GHIDRA_INT(pfVar26)); pfVar26 = pfStack_266a4 + 2; pfVar25 = pfStack_26650; do { @@ -4814,31 +4814,31 @@ LAB_004130be: pfVar19[-3] = *pfVar26; *(undefined1 *)(pfVar19 + -2) = *(undefined1 *)(pfVar26 + 1); pfVar19[-1] = pfVar26[2]; - *pfVar19 = *(float *)((char *)pfStack_26658 + (int)pfVar19); + *pfVar19 = *(float *)((char *)pfStack_26658 + GHIDRA_INT(pfVar19)); ((Color *)((Color *)(pfVar19 + 1)))->Color::operator_assign((ColorMod *)(pfVar26 + 4)); pfVar19 = (float *)(extraout_EDX_10 + 0x54); *(float *)(extraout_EDX_10 + 0x30) = pfVar26[0xf]; *(undefined1 *)(extraout_EDX_10 + 0x34) = *(undefined1 *)(pfVar26 + 0x10); *(float *)(extraout_EDX_10 + 0x38) = pfVar26[0x11]; *(float *)(extraout_EDX_10 + 0x3c) = pfVar26[0x12]; - pfVar25 = (float *)((int)pfVar25 + -1); + pfVar25 = (float *)(GHIDRA_INT(pfVar25) + -1); pfVar26 = pfVar26 + 0x15; } while (pfVar25 != (float *)0x0); - *(float **)((char *)(local_6ac + 1) + (int)pfStack_266a0) = pfStack_2664c; + *(float **)((char *)(local_6ac + 1) + GHIDRA_INT(pfStack_266a0)) = pfStack_2664c; pfVar26 = pfStack_26650; } } pfVar19 = pfStack_2668c; - *(float **)((char *)(local_6ac + 2) + (int)pfStack_266a0) = pfVar26; + *(float **)((char *)(local_6ac + 2) + GHIDRA_INT(pfStack_266a0)) = pfVar26; pfStack_26654 = (float *)pfStack_26654[0xb]; } while (pfStack_26654 != (float *)0x0); if (pfStack_2668c != (float *)0x0) { pfStack_2664c = pfStack_2668c; pfStack_26654 = (float *)0x0; - uVar14 = -(uint)((int)(ZEXT48(pfStack_2668c) * 0x10 >> 0x20) != 0) | - (uint)(ZEXT48(pfStack_2668c) * 0x10); - pfStack_266c0 = operator_new_tracked(-(uint)(0xfffffffb < uVar14) | uVar14 + 4); - local_14._0_1_ = 0x17; + uVar14 = -GHIDRA_UINT((GHIDRA_INT((ZEXT48(pfStack_2668c) * 0x10 >> 0x20)) != 0)) | + GHIDRA_UINT((ZEXT48(pfStack_2668c) * 0x10)); + pfStack_266c0 = operator_new_tracked(-GHIDRA_UINT((0xfffffffb < uVar14)) | uVar14 + 4); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x17; if (pfStack_266c0 == (float *)0x0) { pfVar26 = (float *)0x0; pfStack_26654 = (float *)0x0; @@ -4848,24 +4848,24 @@ LAB_004130be: *pfStack_266c0 = (float)pfVar19; pfStack_26654 = pfVar26; _eh_vector_constructor_iterator_ - (pfVar26,0x10,(uint)pfVar19,(_func_void_void_ptr *)&LAB_0040c210, + (pfVar26,0x10,GHIDRA_UINT(pfVar19),(_func_void_void_ptr *)&LAB_0040c210, guard_check_icall); } pfVar25 = &nullAnimations; - local_14._0_1_ = 0x15; - pfStack_2664c = (float *)((int)pfVar25 + -(int)pfVar26); - pfStack_26658 = (float *)((int)local_6ac + -(int)pfVar26); - pfStack_26688 = (float *)((int)local_6ac + -(int)pfVar26 + 4); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x15; + pfStack_2664c = (float *)(GHIDRA_INT(pfVar25) + -GHIDRA_INT(pfVar26)); + pfStack_26658 = (float *)(GHIDRA_INT(local_6ac) + -GHIDRA_INT(pfVar26)); + pfStack_26688 = (float *)(GHIDRA_INT(local_6ac) + -GHIDRA_INT(pfVar26) + 4); pfVar21 = pfVar26 + 1; do { rootScaleY = *pfVar25; pfVar25 = pfVar25 + 4; pfVar21[-1] = rootScaleY; pfVar24 = pfVar21 + 4; - *(undefined1 *)pfVar21 = (auStack_aa4 + -(int)pfVar26 + 0x3e4)[(int)pfVar24]; - pfVar21[1] = *(float *)(auStack_aa4 + -(int)pfVar26 + 1000 + (int)pfVar24); - pfVar21[2] = *(float *)(auStack_aa4 + -(int)pfVar26 + 0x3ec + (int)pfVar24); - pfVar19 = (float *)((int)pfVar19 + -1); + *(undefined1 *)pfVar21 = (auStack_aa4 + -GHIDRA_INT(pfVar26) + 0x3e4)[GHIDRA_INT(pfVar24)]; + pfVar21[1] = *(float *)(auStack_aa4 + -GHIDRA_INT(pfVar26) + 1000 + GHIDRA_INT(pfVar24)); + pfVar21[2] = *(float *)(auStack_aa4 + -GHIDRA_INT(pfVar26) + 0x3ec + GHIDRA_INT(pfVar24)); + pfVar19 = (float *)(GHIDRA_INT(pfVar19) + -1); pfVar21 = pfVar24; } while (pfVar19 != (float *)0x0); *(float **)(curAnimation[1]._buf + 8) = pfStack_26654; @@ -4891,9 +4891,9 @@ LAB_004130be: pfVar26 = (float *)puVar15[2]; } if (pfVar26 == pfStack_26654) { - pbVar13 = (byte *)((int)pfVar26 + (int)pbVar18); + pbVar13 = (byte *)(GHIDRA_INT(pfVar26) + GHIDRA_INT(pbVar18)); if (pbVar13 <= pbVar18) goto LAB_004134e1; - iVar11 = (int)"Triggers" - (int)pbVar18; + iVar11 = GHIDRA_INT("Triggers") - GHIDRA_INT(pbVar18); while (*pbVar18 == pbVar18[iVar11]) { pbVar18 = pbVar18 + 1; if (pbVar13 <= pbVar18) goto LAB_004134e1; @@ -4928,7 +4928,7 @@ LAB_004134e1: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_00413581: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_00413586; } if (bVar8 == 0) break; @@ -4959,7 +4959,7 @@ LAB_00413586: isLess = bVar8 < (byte)*keyName; if (bVar8 != *keyName) { LAB_004135d7: - uVar14 = -(uint)isLess | 1; + uVar14 = -GHIDRA_UINT(isLess) | 1; goto LAB_004135dc; } if (bVar8 == 0) break; @@ -4989,37 +4989,37 @@ LAB_004135dc: if (uStack_26690 != 0) { pfStack_26654 = operator_new_tracked - (-(uint)((int)((ulonglong)uStack_26690 * 8 >> 0x20) != 0) | - (uint)((ulonglong)uStack_26690 * 8)); + (-GHIDRA_UINT((GHIDRA_INT(((ulonglong)uStack_26690 * 8 >> 0x20)) != 0)) | + GHIDRA_UINT(((ulonglong)uStack_26690 * 8))); uVar14 = uStack_26690; pfVar26 = pfStack_26654; do { - rootScaleY = *(float *)((char *)auStack_16378 + -(int)pfStack_26654 + 0x13ac4 + - (int)(pfVar26 + 2)); - *pfVar26 = *(float *)((char *)local_28b0 + -(int)pfStack_26654 + (int)pfVar26); + rootScaleY = *(float *)((char *)auStack_16378 + -GHIDRA_INT(pfStack_26654) + 0x13ac4 + + GHIDRA_INT((pfVar26 + 2))); + *pfVar26 = *(float *)((char *)local_28b0 + -GHIDRA_INT(pfStack_26654) + GHIDRA_INT(pfVar26)); pfVar26[1] = rootScaleY; uVar14 = uVar14 - 1; pfVar26 = pfVar26 + 2; } while (uVar14 != 0); - curAnimation[1]._size = (uint)pfStack_26654; + curAnimation[1]._size = GHIDRA_UINT(pfStack_26654); } } curAnimation[1]._capacity = uStack_26690; pfVar26 = (float *)pfStack_26684[0xb]; - local_14._0_1_ = 0x12; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x12; pfStack_26684 = pfVar26; _eh_vector_destructor_iterator_(&nullAnimations,0x10,0x40,guard_check_icall); - local_14._0_1_ = 0x11; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x11; _eh_vector_destructor_iterator_(layerAnimations,0x10,0x40,guard_check_icall); - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; ((std::string *)(animName._buf))->std::string::_Tidy_deallocate(); pfVar19 = animIndex; } pfStack_26654 = (float *)0x0; - uVar14 = -(uint)((int)(ZEXT48(pfVar19) * 0x13c >> 0x20) != 0) | (uint)(ZEXT48(pfVar19) * 0x13c); + uVar14 = -GHIDRA_UINT((GHIDRA_INT((ZEXT48(pfVar19) * 0x13c >> 0x20)) != 0)) | GHIDRA_UINT((ZEXT48(pfVar19) * 0x13c)); pfStack_266c0 = pfVar19; - puStack_266c4 = operator_new_tracked(-(uint)(0xfffffffb < uVar14) | uVar14 + 4); - local_14._0_1_ = 0x18; + puStack_266c4 = operator_new_tracked(-GHIDRA_UINT((0xfffffffb < uVar14)) | uVar14 + 4); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x18; if (puStack_266c4 == (undefined4 *)0x0) { pfStack_2664c = (float *)0x0; } @@ -5027,17 +5027,17 @@ LAB_004135dc: *puStack_266c4 = pfVar19; pfStack_2664c = (float *)(puStack_266c4 + 1); _eh_vector_constructor_iterator_ - (pfStack_2664c,0x13c,(uint)pfVar19,(_func_void_void_ptr *)&LAB_0040bec0, + (pfStack_2664c,0x13c,GHIDRA_UINT(pfVar19),(_func_void_void_ptr *)&LAB_0040bec0, std::string::_Tidy_deallocate); } - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; if (pfVar19 != (float *)0x0) { - pfStack_266a0 = (float *)(animations + -(int)pfStack_2664c); + pfStack_266a0 = (float *)(animations + -GHIDRA_INT(pfStack_2664c)); pfStack_26658 = pfStack_2664c + 0xc; - pfStack_2667c = (float *)(animations + (4 - (int)pfStack_2664c)); + pfStack_2667c = (float *)(animations + (4 - GHIDRA_INT(pfStack_2664c))); pfStack_26654 = afStack_16494; - iVar11 = (int)afStack_267d0 + (-0x38 - (int)pfStack_2664c); - pfStack_2668c = (float *)((int)afStack_163a8 - (int)pfStack_2664c); + iVar11 = GHIDRA_INT(afStack_267d0) + (-0x38 - GHIDRA_INT(pfStack_2664c)); + pfStack_2668c = (float *)(GHIDRA_INT(afStack_163a8) - GHIDRA_INT(pfStack_2664c)); pfStack_26688 = animIndex; do { pfVar19 = pfStack_26658; @@ -5049,18 +5049,18 @@ LAB_004135dc: rootPosY = pfStack_26654[3]; fVar4 = pfStack_26654[4]; fVar23 = 0.0; - fStack_267d8 = *(float *)((char *)pfStack_266a0 + (int)pfVar19); - uStack_267d4 = *(undefined1 *)((char *)pfStack_2667c + (int)pfVar19); - fStack_266d0 = *(float *)((char *)pfStack_2668c + (int)pfVar19); + fStack_267d8 = *(float *)((char *)pfStack_266a0 + GHIDRA_INT(pfVar19)); + uStack_267d4 = *(undefined1 *)((char *)pfStack_2667c + GHIDRA_INT(pfVar19)); + fStack_266d0 = *(float *)((char *)pfStack_2668c + GHIDRA_INT(pfVar19)); pfStack_26684 = pfVar26; if (rootScaleY != 0.0) { iVar20 = 0; do { - piVar9 = (int *)(iVar20 + (int)pfVar26); + piVar9 = (int *)(iVar20 + GHIDRA_INT(pfVar26)); iVar20 = iVar20 + 0x10; afStack_267d0[*piVar9] = fVar23; - fVar23 = (float)((int)fVar23 + 1); - } while ((uint)fVar23 < (uint)rootScaleY); + fVar23 = (float)(GHIDRA_INT(fVar23) + 1); + } while (GHIDRA_UINT(fVar23) < GHIDRA_UINT(rootScaleY)); } fVar23 = pfVar19[-0xc]; fVar5 = pfVar19[-0xb]; @@ -5116,38 +5116,38 @@ LAB_004135dc: pfStack_26658 = pfVar19 + 0x4f; pfStack_26654 = pfStack_26654 + 0x4f; iVar11 = iVar11 + -0x13c; - pfStack_26688 = (float *)((int)pfStack_26688 + -1); + pfStack_26688 = (float *)(GHIDRA_INT(pfStack_26688) + -1); } while (pfStack_26688 != (float *)0x0); pfStack_26688 = (float *)0x0; pfVar19 = animIndex; } *(float **)(anmFile + 0xc) = pfStack_2664c; *(float **)(anmFile + 0x10) = pfVar19; - local_14._0_1_ = 0x19; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x19; tracked_alloc(1,rootFrames,0); - local_14._0_1_ = 0x1a; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1a; tracked_alloc(1,pfStack_26678,0); - local_14._0_1_ = 0x1b; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1b; tracked_alloc(1,pvStack_266ac,0); - local_14._0_1_ = 0x1c; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1c; tracked_alloc(1,pfStack_266a4,0); - local_14._0_1_ = 0x1d; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1d; tracked_alloc(1,pfStack_26680,0); - local_14._0_1_ = 0x1e; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1e; tracked_alloc(1,pfStack_2669c,0); - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; _eh_vector_destructor_iterator_(animations,0x13c,0x100,std::string::_Tidy_deallocate); - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; _eh_vector_destructor_iterator_(eventNames,0x18,0x10,std::string::_Tidy_deallocate); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; _eh_vector_destructor_iterator_(nullNames,0x18,0x40,std::string::_Tidy_deallocate); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; _eh_vector_destructor_iterator_(local_24b0,0x38,0x40,FUN_0040db70); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; _eh_vector_destructor_iterator_(spritesheetPaths,0x18,0x40,std::string::_Tidy_deallocate); - local_14._0_1_ = 0x1f; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1f; ((xml_memory_pool *)(auStack_26618))->xml_memory_pool::clear(); - local_14 = CONCAT31(local_14._1_3_,0x20); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x20); tracked_alloc(1,fileBuffer,0); LAB_00413b0f: ((std::string *)(redirectedPath._buf))->std::string::_Tidy_deallocate(); diff --git a/src/game/anm_file_data.cpp b/src/game/anm_file_data.cpp index c8f74a0..cc343b2 100644 --- a/src/game/anm_file_data.cpp +++ b/src/game/anm_file_data.cpp @@ -24,7 +24,7 @@ void AnmFileData::Clear() ExceptionList = &local_10; pvVar2 = *(void **)((char *)this + 4); if (pvVar2 != (void *)0x0) { - blockHeader = (uint *)((int)pvVar2 + -4); + blockHeader = (uint *)(GHIDRA_INT(pvVar2) + -4); local_8 = 0; _eh_vector_destructor_iterator_(pvVar2,0x38,*blockHeader,FUN_0040db70); operator_delete(blockHeader,*blockHeader * 0x38 + 4); @@ -43,7 +43,7 @@ void AnmFileData::Clear() frameOffset = 0; do { frameData = *(int *)(*(int *)(animOffset + 0x18 + iVar1) + 4 + frameOffset); - allocCounter = (qword *)((int)pvVar2 + 0x30); + allocCounter = (qword *)(GHIDRA_INT(pvVar2) + 0x30); if (pvVar2 == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } @@ -51,9 +51,9 @@ void AnmFileData::Clear() blockHeader = (uint *)(frameData + -4); blockSize = *blockHeader; prevAllocated = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - blockSize; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - blockSize; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)prevAllocated < blockSize); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocated) < blockSize)); free(blockHeader); iVar1 = *(int *)((char *)this + 0xc); pvVar2 = g_mainHeap; @@ -64,7 +64,7 @@ void AnmFileData::Clear() } frameArray = *(void **)(animOffset + 0x18 + iVar1); if (frameArray != (void *)0x0) { - blockHeader = (uint *)((int)frameArray + -4); + blockHeader = (uint *)(GHIDRA_INT(frameArray) + -4); local_8 = 2; _eh_vector_destructor_iterator_(frameArray,0x10,*blockHeader,guard_check_icall); operator_delete(blockHeader,*blockHeader * 0x10 + 4); @@ -76,7 +76,7 @@ void AnmFileData::Clear() frameOffset = 0; do { frameData = *(int *)(*(int *)(animOffset + 0x20 + iVar1) + 8 + frameOffset); - allocCounter = (qword *)((int)pvVar2 + 0x30); + allocCounter = (qword *)(GHIDRA_INT(pvVar2) + 0x30); if (pvVar2 == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } @@ -84,9 +84,9 @@ void AnmFileData::Clear() blockHeader = (uint *)(frameData + -4); blockSize = *blockHeader; prevAllocated = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - blockSize; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - blockSize; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)prevAllocated < blockSize); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocated) < blockSize)); free(blockHeader); iVar1 = *(int *)((char *)this + 0xc); pvVar2 = g_mainHeap; @@ -97,23 +97,23 @@ void AnmFileData::Clear() } frameArray = *(void **)(animOffset + 0x20 + iVar1); if (frameArray != (void *)0x0) { - blockHeader = (uint *)((int)frameArray + -4); + blockHeader = (uint *)(GHIDRA_INT(frameArray) + -4); local_8 = 4; _eh_vector_destructor_iterator_(frameArray,0x10,*blockHeader,guard_check_icall); operator_delete(blockHeader,*blockHeader * 0x10 + 4); pvVar2 = g_mainHeap; } iVar1 = *(int *)(*(int *)((char *)this + 0xc) + 0x28 + animOffset); - allocCounter = (qword *)((int)pvVar2 + 0x30); + allocCounter = (qword *)(GHIDRA_INT(pvVar2) + 0x30); if (pvVar2 == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } if (iVar1 != 0) { blockSize = *(uint *)(iVar1 + -4); prevAllocated = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - blockSize; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - blockSize; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)prevAllocated < blockSize); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocated) < blockSize)); free((void *)(iVar1 + -4)); pvVar2 = g_mainHeap; } @@ -123,7 +123,7 @@ void AnmFileData::Clear() } pvVar2 = *(void **)((char *)this + 0xc); if (pvVar2 != (void *)0x0) { - blockHeader = (uint *)((int)pvVar2 + -4); + blockHeader = (uint *)(GHIDRA_INT(pvVar2) + -4); local_8 = 6; _eh_vector_destructor_iterator_(pvVar2,0x13c,*blockHeader,std::string::_Tidy_deallocate); operator_delete(blockHeader,*blockHeader * 0x13c + 4); @@ -132,7 +132,7 @@ void AnmFileData::Clear() *(undefined4 *)((char *)this + 0xc) = 0; *(undefined4 *)((char *)this + 0x10) = 0; if (pvVar2 != (void *)0x0) { - blockHeader = (uint *)((int)pvVar2 + -4); + blockHeader = (uint *)(GHIDRA_INT(pvVar2) + -4); local_8 = 7; _eh_vector_destructor_iterator_(pvVar2,0x18,*blockHeader,std::string::_Tidy_deallocate); operator_delete(blockHeader,*blockHeader * 0x18 + 4); @@ -141,7 +141,7 @@ void AnmFileData::Clear() *(undefined4 *)((char *)this + 0x14) = 0; *(undefined4 *)((char *)this + 0x18) = 0; if (pvVar2 != (void *)0x0) { - blockHeader = (uint *)((int)pvVar2 + -4); + blockHeader = (uint *)(GHIDRA_INT(pvVar2) + -4); local_8 = 8; _eh_vector_destructor_iterator_(pvVar2,0x18,*blockHeader,std::string::_Tidy_deallocate); operator_delete(blockHeader,*blockHeader * 0x18 + 4); diff --git a/src/game/backdrop.cpp b/src/game/backdrop.cpp index bc13712..11df717 100644 --- a/src/game/backdrop.cpp +++ b/src/game/backdrop.cpp @@ -46,16 +46,16 @@ void Backdrop::constructor() this[7] = (Backdrop)0x0; this[9] = (Backdrop)0x0; this[10] = (Backdrop)0x0; - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; ((KAGE::SmartPointer *)(this + 0xb))->KAGE::SmartPointer::SmartPointer((void *)0x0); this[0xd] = (Backdrop)0x0; this[0xe] = (Backdrop)0x0; - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; ((ANM2 *)((ANM2 *)(this + 0xf)))->ANM2::constructor(); - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; _eh_vector_constructor_iterator_ (this + 0x55,0x13c,0x3f,BackdropConfig::constructor,BackdropConfig::~BackdropConfig); - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; this[0x13c7] = (Backdrop)0x0; this[0x13c6] = (Backdrop)0x0; this[0x13c9] = (Backdrop)0x0; @@ -64,57 +64,57 @@ void Backdrop::constructor() this[0x13ca] = (Backdrop)0xaa17414f; this[0x13cd] = (Backdrop)0x7; ((ANM2 *)((ANM2 *)(this + 0x13cf)))->ANM2::constructor(); - local_8._0_1_ = 9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; ((ANM2 *)((ANM2 *)(this + 0x1414)))->ANM2::constructor(); - local_8._0_1_ = 10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 10; ((ANM2 *)((ANM2 *)(this + 0x1459)))->ANM2::constructor(); - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; ((KColor *)(&clearColorValue))->KColor::SetFromARGB(0); renderTarget = KAGE_Graphics::create_render_target (newTarget,0x30c,0x1d4,(byte *)"Floor Surface",clearColor); - local_8._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc; this->shared_ptr::operator_assign(renderTarget); - local_8._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xd; if (newTargetRefCount != (int *)0x0) { isLastRef = (**(code **)(*newTargetRefCount + 0xc))(); if ((isLastRef != '\0') && (g_renderTargetReleaseFn != (void *)0x0)) { (*g_renderTargetReleaseFn)(newTarget); } } - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; ((KColor *)(&clearColorValue))->KColor::SetFromARGB(0); renderTarget = KAGE_Graphics::create_render_target (newTarget,0x30c,0x1d4,(byte *)"Wall Surface",clearColor_00); - local_8._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xe; ((shared_ptr *)(this + 2))->shared_ptr::operator_assign(renderTarget); - local_8._0_1_ = 0xf; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xf; if (newTargetRefCount != (int *)0x0) { isLastRef = (**(code **)(*newTargetRefCount + 0xc))(); if ((isLastRef != '\0') && (g_renderTargetReleaseFn != (void *)0x0)) { (*g_renderTargetReleaseFn)(newTarget); } } - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; ((KColor *)(&clearColorValue))->KColor::SetFromARGB(0); renderTarget = KAGE_Graphics::create_render_target (newTarget,0x30c,0x1d4,(byte *)"Floor Surface 2",clearColor_01); - local_8._0_1_ = 0x10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x10; ((shared_ptr *)(this + 4))->shared_ptr::operator_assign(renderTarget); - local_8._0_1_ = 0x11; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x11; if (newTargetRefCount != (int *)0x0) { isLastRef = (**(code **)(*newTargetRefCount + 0xc))(); if ((isLastRef != '\0') && (g_renderTargetReleaseFn != (void *)0x0)) { (*g_renderTargetReleaseFn)(newTarget); } } - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; *(undefined1 *)(this + 8) = 0; ((KColor *)(&clearColorValue))->KColor::SetFromARGB(0); renderTarget = KAGE_Graphics::create_render_target (newTarget,0x30c,0x1d4,(byte *)"Temp Backdrop Surface",clearColor_02); - local_8._0_1_ = 0x12; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x12; ((shared_ptr *)(this + 6))->shared_ptr::operator_assign(renderTarget); - local_8 = CONCAT31(local_8._1_3_,0x13); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x13); if (newTargetRefCount != (int *)0x0) { isLastRef = (**(code **)(*newTargetRefCount + 0xc))(); if ((isLastRef != '\0') && (g_renderTargetReleaseFn != (void *)0x0)) { @@ -268,7 +268,7 @@ byte Backdrop::LoadConfig(byte *xmlPath) local_14 = 0xffffffff; puStack_18 = &LAB_00b0b036; local_1c = ExceptionList; - freeSize = __security_cookie ^ (int)register0x00000010 - 0x10U; + freeSize = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; cleanupFlags = 0; isJoinedPathAlive = false; @@ -288,13 +288,13 @@ byte Backdrop::LoadConfig(byte *xmlPath) valueText = text; ((rapidxml::xml_document *)(xmlDoc))->rapidxml::xml_document::parse(text); isJoinedPathAlive = (byte)valueText; - freeBlock = ((xml_node *)(xmlDoc))->xml_node::first_node((byte *)"backdrops",(int)pcVar5,isJoinedPathAlive); + freeBlock = ((xml_node *)(xmlDoc))->xml_node::first_node((byte *)"backdrops",GHIDRA_INT(pcVar5),isJoinedPathAlive); if (freeBlock == (void *)0x0) { pcVar5 = "Could not find root node \'backdrops\' in %s\n"; KAGE_LogMessage(0x10,(byte *)"Could not find root node \'backdrops\' in %s\n"); isJoinedPathAlive = (byte)xmlPath; } - rootAttribute = ((xml_node *)(freeBlock))->xml_node::first_attribute(&DAT_00b6987c,(uint)pcVar5,isJoinedPathAlive); + rootAttribute = ((xml_node *)(freeBlock))->xml_node::first_attribute(&DAT_00b6987c,GHIDRA_UINT(pcVar5),isJoinedPathAlive); gfxRoot._size = 0; gfxRoot._capacity = 0xf; gfxRoot._buf[0] = '\0'; @@ -310,11 +310,11 @@ byte Backdrop::LoadConfig(byte *xmlPath) isJoinedPathAlive = *strCursor; strCursor = strCursor + 1; } while (isJoinedPathAlive != 0); - freeSize = (int)strCursor - (int)(valueText + 1); + freeSize = GHIDRA_INT(strCursor) - GHIDRA_INT((valueText + 1)); ((std::string *)(gfxRoot._buf))->std::string::assign(valueText,freeSize); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; rootAttribute = - ((xml_node *)(freeBlock))->xml_node::first_attribute((byte *)"gridgfxroot",(uint)valueText,(byte)freeSize); + ((xml_node *)(freeBlock))->xml_node::first_attribute((byte *)"gridgfxroot",GHIDRA_UINT(valueText),(byte)freeSize); gridGfxRoot._size = 0; gridGfxRoot._capacity = 0xf; gridGfxRoot._buf[0] = '\0'; @@ -330,12 +330,12 @@ byte Backdrop::LoadConfig(byte *xmlPath) isJoinedPathAlive = *strCursor; strCursor = strCursor + 1; } while (isJoinedPathAlive != 0); - freeSize = (int)strCursor - (int)(valueText + 1); + freeSize = GHIDRA_INT(strCursor) - GHIDRA_INT((valueText + 1)); ((std::string *)(gridGfxRoot._buf))->std::string::assign(valueText,freeSize); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; rootAttribute = xml_node::first_attribute - (freeBlock,(byte *)"effectsgfxroot",(uint)valueText,(byte)freeSize); + (freeBlock,(byte *)"effectsgfxroot",GHIDRA_UINT(valueText),(byte)freeSize); effectsGfxRoot._size = 0; effectsGfxRoot._capacity = 0xf; effectsGfxRoot._buf[0] = '\0'; @@ -351,9 +351,9 @@ byte Backdrop::LoadConfig(byte *xmlPath) isJoinedPathAlive = *strCursor; strCursor = strCursor + 1; } while (isJoinedPathAlive != 0); - ((std::string *)(effectsGfxRoot._buf))->std::string::assign(valueText,(int)strCursor - (int)(valueText + 1)); + ((std::string *)(effectsGfxRoot._buf))->std::string::assign(valueText,GHIDRA_INT(strCursor) - GHIDRA_INT((valueText + 1))); ((BackdropConfig *)(&defaultConfig))->BackdropConfig::constructor(); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; defaultConfig.backdropId = 0; ((std::string *)(&(*(undefined1 *)((char *)&(defaultConfig) + 0x78))))->std::string::assign((byte *)"gfx/grid/props_01_basement.anm2",0x1f); ((std::string *)(&(*(undefined1 *)((char *)&(defaultConfig) + 0x90))))->std::string::assign((byte *)"gfx/grid/rocks_basement.png",0x1b); @@ -369,36 +369,36 @@ byte Backdrop::LoadConfig(byte *xmlPath) for (iVar2 = *(int *)((char *)freeBlock + 0x18); defaultConfig.backdropId = config.backdropId, iVar2 != 0; iVar2 = *(int *)(iVar2 + 0x2c)) { ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0x4))))->std::string::string(&(*(undefined1 *)((char *)&(defaultConfig) + 0x4))); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0x1c))))->std::string::string(&(*(undefined1 *)((char *)&(defaultConfig) + 0x1c))); - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0x34))))->std::string::string(&(*(undefined1 *)((char *)&(defaultConfig) + 0x34))); - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0x4c))))->std::string::string(&(*(undefined1 *)((char *)&(defaultConfig) + 0x4c))); - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; config.walls = defaultConfig.walls; config.wallVariants = defaultConfig.wallVariants; config.floors = defaultConfig.floors; config.floorVariants = defaultConfig.floorVariants; - config.unk1._0_1_ = (undefined1)defaultConfig.unk1; + (*(undefined1 *)((char *)&(config.unk1) + 0x0)) = (undefined1)defaultConfig.unk1; ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0x78))))->std::string::string(&(*(undefined1 *)((char *)&(defaultConfig) + 0x78))); - local_14._0_1_ = 9; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0x90))))->std::string::string(&(*(undefined1 *)((char *)&(defaultConfig) + 0x90))); - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0xa8))))->std::string::string(&(*(undefined1 *)((char *)&(defaultConfig) + 0xa8))); - local_14._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0xc0))))->std::string::string(&(*(undefined1 *)((char *)&(defaultConfig) + 0xc0))); - local_14._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0xd8))))->std::string::string(&(*(undefined1 *)((char *)&(defaultConfig) + 0xd8))); - local_14._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xd; ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0xf0))))->std::string::string(&(*(undefined1 *)((char *)&(defaultConfig) + 0xf0))); - local_14._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xe; ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0x108))))->std::string::string(&(*(undefined1 *)((char *)&(defaultConfig) + 0x108))); - local_14._0_1_ = 0xf; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xf; ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0x120))))->std::string::string(&(*(undefined1 *)((char *)&(defaultConfig) + 0x120))); - config.waterPitsMode._0_1_ = (undefined1)defaultConfig.waterPitsMode; - config.waterPitsMode._1_1_ = defaultConfig.waterPitsMode._1_1_; - local_14._0_1_ = 0x10; + (*(undefined1 *)((char *)&(config.waterPitsMode) + 0x0)) = (undefined1)defaultConfig.waterPitsMode; + (*(undefined1 *)((char *)&(config.waterPitsMode) + 0x1)) = (*(undefined1 *)((char *)&(defaultConfig.waterPitsMode) + 0x1)); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x10; attribute = *(undefined4 **)(iVar2 + 0x20); if (attribute != (undefined4 *)0x0) { do { @@ -413,7 +413,7 @@ byte Backdrop::LoadConfig(byte *xmlPath) isLess = isJoinedPathAlive < *attrNameCursor; if (isJoinedPathAlive != *attrNameCursor) { LAB_00932cc1: - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; goto LAB_00932cc6; } if (isJoinedPathAlive == 0) break; @@ -443,7 +443,7 @@ LAB_00932cc6: isLess = isJoinedPathAlive < *attrNameCursor; if (isJoinedPathAlive != *attrNameCursor) { LAB_00932d21: - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; goto LAB_00932d26; } if (isJoinedPathAlive == 0) break; @@ -465,7 +465,7 @@ LAB_00932d26: isJoinedPathAlive = *strCursor; strCursor = strCursor + 1; } while (isJoinedPathAlive != 0); - appendLength = (int)strCursor - (int)(valueText + 1); + appendLength = GHIDRA_INT(strCursor) - GHIDRA_INT((valueText + 1)); if (0x7fffffff - gfxRoot._size < appendLength) { LAB_00934421: /* WARNING: Subroutine does not return */ @@ -473,29 +473,29 @@ LAB_00934421: } psVar4 = &gfxRoot; if (0xf < gfxRoot._capacity) { - psVar4 = (std_string *)gfxRoot._buf._0_4_; + psVar4 = (*(undefined4 *)((char *)&((std_string *)gfxRoot._buf) + 0x0)); } - ((std::string *)(joinedPath._buf))->std::string::concat((int)this,(std_string *)appendLength, + ((std::string *)(joinedPath._buf))->std::string::concat(GHIDRA_INT(this),(std_string *)appendLength, (byte *)psVar4,gfxRoot._size,valueText,appendLength); ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0x4))))->std::string::_Tidy_deallocate(); - config._4_1_ = joinedPath._buf[0]; - config._5_1_ = joinedPath._buf[1]; - config._6_1_ = joinedPath._buf[2]; - config._7_1_ = joinedPath._buf[3]; - config._8_1_ = joinedPath._buf[4]; - config._9_1_ = joinedPath._buf[5]; - config._10_1_ = joinedPath._buf[6]; - config._11_1_ = joinedPath._buf[7]; - config._12_1_ = joinedPath._buf[8]; - config._13_1_ = joinedPath._buf[9]; - config._14_1_ = joinedPath._buf[10]; - config._15_1_ = joinedPath._buf[0xb]; - config._16_1_ = joinedPath._buf[0xc]; - config._17_1_ = joinedPath._buf[0xd]; - config._18_1_ = joinedPath._buf[0xe]; - config._19_1_ = joinedPath._buf[0xf]; - config._20_4_ = joinedPath._size; - config._24_4_ = joinedPath._capacity; + (*(undefined1 *)((char *)&(config) + 0x4)) = joinedPath._buf[0]; + (*(undefined1 *)((char *)&(config) + 0x5)) = joinedPath._buf[1]; + (*(undefined1 *)((char *)&(config) + 0x6)) = joinedPath._buf[2]; + (*(undefined1 *)((char *)&(config) + 0x7)) = joinedPath._buf[3]; + (*(undefined1 *)((char *)&(config) + 0x8)) = joinedPath._buf[4]; + (*(undefined1 *)((char *)&(config) + 0x9)) = joinedPath._buf[5]; + (*(undefined1 *)((char *)&(config) + 0xa)) = joinedPath._buf[6]; + (*(undefined1 *)((char *)&(config) + 0xb)) = joinedPath._buf[7]; + (*(undefined1 *)((char *)&(config) + 0xc)) = joinedPath._buf[8]; + (*(undefined1 *)((char *)&(config) + 0xd)) = joinedPath._buf[9]; + (*(undefined1 *)((char *)&(config) + 0xe)) = joinedPath._buf[10]; + (*(undefined1 *)((char *)&(config) + 0xf)) = joinedPath._buf[0xb]; + (*(undefined1 *)((char *)&(config) + 0x10)) = joinedPath._buf[0xc]; + (*(undefined1 *)((char *)&(config) + 0x11)) = joinedPath._buf[0xd]; + (*(undefined1 *)((char *)&(config) + 0x12)) = joinedPath._buf[0xe]; + (*(undefined1 *)((char *)&(config) + 0x13)) = joinedPath._buf[0xf]; + (*(undefined4 *)((char *)&(config) + 0x14)) = joinedPath._size; + (*(undefined4 *)((char *)&(config) + 0x18)) = joinedPath._capacity; } else { attrNameCursor = &DAT_00b7b60c; @@ -508,7 +508,7 @@ LAB_00934421: isLess = isJoinedPathAlive < *attrNameCursor; if (isJoinedPathAlive != *attrNameCursor) { LAB_00932de2: - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; goto LAB_00932de7; } if (isJoinedPathAlive == 0) break; @@ -530,33 +530,33 @@ LAB_00932de7: isJoinedPathAlive = *strCursor; strCursor = strCursor + 1; } while (isJoinedPathAlive != 0); - psVar4 = (std_string *)(strCursor + -(int)(valueText + 1)); + psVar4 = (std_string *)(strCursor + -GHIDRA_INT((valueText + 1))); if ((std_string *)(0x7fffffff - gfxRoot._size) < psVar4) goto LAB_00934421; rootText = &gfxRoot; if (0xf < gfxRoot._capacity) { - rootText = (std_string *)gfxRoot._buf._0_4_; + rootText = (*(undefined4 *)((char *)&((std_string *)gfxRoot._buf) + 0x0)); } - ((std::string *)(joinedPath._buf))->std::string::concat((int)this,psVar4,(byte *)rootText,gfxRoot._size, - valueText,(uint)psVar4); + ((std::string *)(joinedPath._buf))->std::string::concat(GHIDRA_INT(this),psVar4,(byte *)rootText,gfxRoot._size, + valueText,GHIDRA_UINT(psVar4)); ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0x34))))->std::string::_Tidy_deallocate(); - config._52_1_ = joinedPath._buf[0]; - config._53_1_ = joinedPath._buf[1]; - config._54_1_ = joinedPath._buf[2]; - config._55_1_ = joinedPath._buf[3]; - config._56_1_ = joinedPath._buf[4]; - config._57_1_ = joinedPath._buf[5]; - config._58_1_ = joinedPath._buf[6]; - config._59_1_ = joinedPath._buf[7]; - config._60_1_ = joinedPath._buf[8]; - config._61_1_ = joinedPath._buf[9]; - config._62_1_ = joinedPath._buf[10]; - config._63_1_ = joinedPath._buf[0xb]; - config._64_1_ = joinedPath._buf[0xc]; - config._65_1_ = joinedPath._buf[0xd]; - config._66_1_ = joinedPath._buf[0xe]; - config._67_1_ = joinedPath._buf[0xf]; - config._68_4_ = joinedPath._size; - config._72_4_ = joinedPath._capacity; + (*(undefined1 *)((char *)&(config) + 0x34)) = joinedPath._buf[0]; + (*(undefined1 *)((char *)&(config) + 0x35)) = joinedPath._buf[1]; + (*(undefined1 *)((char *)&(config) + 0x36)) = joinedPath._buf[2]; + (*(undefined1 *)((char *)&(config) + 0x37)) = joinedPath._buf[3]; + (*(undefined1 *)((char *)&(config) + 0x38)) = joinedPath._buf[4]; + (*(undefined1 *)((char *)&(config) + 0x39)) = joinedPath._buf[5]; + (*(undefined1 *)((char *)&(config) + 0x3a)) = joinedPath._buf[6]; + (*(undefined1 *)((char *)&(config) + 0x3b)) = joinedPath._buf[7]; + (*(undefined1 *)((char *)&(config) + 0x3c)) = joinedPath._buf[8]; + (*(undefined1 *)((char *)&(config) + 0x3d)) = joinedPath._buf[9]; + (*(undefined1 *)((char *)&(config) + 0x3e)) = joinedPath._buf[10]; + (*(undefined1 *)((char *)&(config) + 0x3f)) = joinedPath._buf[0xb]; + (*(undefined1 *)((char *)&(config) + 0x40)) = joinedPath._buf[0xc]; + (*(undefined1 *)((char *)&(config) + 0x41)) = joinedPath._buf[0xd]; + (*(undefined1 *)((char *)&(config) + 0x42)) = joinedPath._buf[0xe]; + (*(undefined1 *)((char *)&(config) + 0x43)) = joinedPath._buf[0xf]; + (*(undefined4 *)((char *)&(config) + 0x44)) = joinedPath._size; + (*(undefined4 *)((char *)&(config) + 0x48)) = joinedPath._capacity; } else { attrNameCursor = &DAT_00b7b600; @@ -569,7 +569,7 @@ LAB_00932de7: isLess = isJoinedPathAlive < *attrNameCursor; if (isJoinedPathAlive != *attrNameCursor) { LAB_00932ea3: - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; goto LAB_00932ea8; } if (isJoinedPathAlive == 0) break; @@ -591,33 +591,33 @@ LAB_00932ea8: isJoinedPathAlive = *strCursor; strCursor = strCursor + 1; } while (isJoinedPathAlive != 0); - psVar4 = (std_string *)(strCursor + -(int)(valueText + 1)); + psVar4 = (std_string *)(strCursor + -GHIDRA_INT((valueText + 1))); if ((std_string *)(0x7fffffff - gfxRoot._size) < psVar4) goto LAB_00934421; rootText = &gfxRoot; if (0xf < gfxRoot._capacity) { - rootText = (std_string *)gfxRoot._buf._0_4_; + rootText = (*(undefined4 *)((char *)&((std_string *)gfxRoot._buf) + 0x0)); } - ((std::string *)(joinedPath._buf))->std::string::concat((int)this,psVar4,(byte *)rootText, - gfxRoot._size,valueText,(uint)psVar4); + ((std::string *)(joinedPath._buf))->std::string::concat(GHIDRA_INT(this),psVar4,(byte *)rootText, + gfxRoot._size,valueText,GHIDRA_UINT(psVar4)); ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0x4c))))->std::string::_Tidy_deallocate(); - config._76_1_ = joinedPath._buf[0]; - config._77_1_ = joinedPath._buf[1]; - config._78_1_ = joinedPath._buf[2]; - config._79_1_ = joinedPath._buf[3]; - config._80_1_ = joinedPath._buf[4]; - config._81_1_ = joinedPath._buf[5]; - config._82_1_ = joinedPath._buf[6]; - config._83_1_ = joinedPath._buf[7]; - config._84_1_ = joinedPath._buf[8]; - config._85_1_ = joinedPath._buf[9]; - config._86_1_ = joinedPath._buf[10]; - config._87_1_ = joinedPath._buf[0xb]; - config._88_1_ = joinedPath._buf[0xc]; - config._89_1_ = joinedPath._buf[0xd]; - config._90_1_ = joinedPath._buf[0xe]; - config._91_1_ = joinedPath._buf[0xf]; - config._92_4_ = joinedPath._size; - config._96_4_ = joinedPath._capacity; + (*(undefined1 *)((char *)&(config) + 0x4c)) = joinedPath._buf[0]; + (*(undefined1 *)((char *)&(config) + 0x4d)) = joinedPath._buf[1]; + (*(undefined1 *)((char *)&(config) + 0x4e)) = joinedPath._buf[2]; + (*(undefined1 *)((char *)&(config) + 0x4f)) = joinedPath._buf[3]; + (*(undefined1 *)((char *)&(config) + 0x50)) = joinedPath._buf[4]; + (*(undefined1 *)((char *)&(config) + 0x51)) = joinedPath._buf[5]; + (*(undefined1 *)((char *)&(config) + 0x52)) = joinedPath._buf[6]; + (*(undefined1 *)((char *)&(config) + 0x53)) = joinedPath._buf[7]; + (*(undefined1 *)((char *)&(config) + 0x54)) = joinedPath._buf[8]; + (*(undefined1 *)((char *)&(config) + 0x55)) = joinedPath._buf[9]; + (*(undefined1 *)((char *)&(config) + 0x56)) = joinedPath._buf[10]; + (*(undefined1 *)((char *)&(config) + 0x57)) = joinedPath._buf[0xb]; + (*(undefined1 *)((char *)&(config) + 0x58)) = joinedPath._buf[0xc]; + (*(undefined1 *)((char *)&(config) + 0x59)) = joinedPath._buf[0xd]; + (*(undefined1 *)((char *)&(config) + 0x5a)) = joinedPath._buf[0xe]; + (*(undefined1 *)((char *)&(config) + 0x5b)) = joinedPath._buf[0xf]; + (*(undefined4 *)((char *)&(config) + 0x5c)) = joinedPath._size; + (*(undefined4 *)((char *)&(config) + 0x60)) = joinedPath._capacity; } else { pcVar5 = "watergfx"; @@ -630,7 +630,7 @@ LAB_00932ea8: isLess = isJoinedPathAlive < (byte)*pcVar5; if (isJoinedPathAlive != *pcVar5) { LAB_00932f64: - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; goto LAB_00932f69; } if (isJoinedPathAlive == 0) break; @@ -652,33 +652,33 @@ LAB_00932f69: isJoinedPathAlive = *strCursor; strCursor = strCursor + 1; } while (isJoinedPathAlive != 0); - psVar4 = (std_string *)(strCursor + -(int)(valueText + 1)); + psVar4 = (std_string *)(strCursor + -GHIDRA_INT((valueText + 1))); if ((std_string *)(0x7fffffff - gfxRoot._size) < psVar4) goto LAB_00934421; rootText = &gfxRoot; if (0xf < gfxRoot._capacity) { - rootText = (std_string *)gfxRoot._buf._0_4_; + rootText = (*(undefined4 *)((char *)&((std_string *)gfxRoot._buf) + 0x0)); } - ((std::string *)(joinedPath._buf))->std::string::concat((int)this,psVar4,(byte *)rootText, - gfxRoot._size,valueText,(uint)psVar4); + ((std::string *)(joinedPath._buf))->std::string::concat(GHIDRA_INT(this),psVar4,(byte *)rootText, + gfxRoot._size,valueText,GHIDRA_UINT(psVar4)); ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0x1c))))->std::string::_Tidy_deallocate(); - config._28_1_ = joinedPath._buf[0]; - config._29_1_ = joinedPath._buf[1]; - config._30_1_ = joinedPath._buf[2]; - config._31_1_ = joinedPath._buf[3]; - config._32_1_ = joinedPath._buf[4]; - config._33_1_ = joinedPath._buf[5]; - config._34_1_ = joinedPath._buf[6]; - config._35_1_ = joinedPath._buf[7]; - config._36_1_ = joinedPath._buf[8]; - config._37_1_ = joinedPath._buf[9]; - config._38_1_ = joinedPath._buf[10]; - config._39_1_ = joinedPath._buf[0xb]; - config._40_1_ = joinedPath._buf[0xc]; - config._41_1_ = joinedPath._buf[0xd]; - config._42_1_ = joinedPath._buf[0xe]; - config._43_1_ = joinedPath._buf[0xf]; - config._44_4_ = joinedPath._size; - config._48_4_ = joinedPath._capacity; + (*(undefined1 *)((char *)&(config) + 0x1c)) = joinedPath._buf[0]; + (*(undefined1 *)((char *)&(config) + 0x1d)) = joinedPath._buf[1]; + (*(undefined1 *)((char *)&(config) + 0x1e)) = joinedPath._buf[2]; + (*(undefined1 *)((char *)&(config) + 0x1f)) = joinedPath._buf[3]; + (*(undefined1 *)((char *)&(config) + 0x20)) = joinedPath._buf[4]; + (*(undefined1 *)((char *)&(config) + 0x21)) = joinedPath._buf[5]; + (*(undefined1 *)((char *)&(config) + 0x22)) = joinedPath._buf[6]; + (*(undefined1 *)((char *)&(config) + 0x23)) = joinedPath._buf[7]; + (*(undefined1 *)((char *)&(config) + 0x24)) = joinedPath._buf[8]; + (*(undefined1 *)((char *)&(config) + 0x25)) = joinedPath._buf[9]; + (*(undefined1 *)((char *)&(config) + 0x26)) = joinedPath._buf[10]; + (*(undefined1 *)((char *)&(config) + 0x27)) = joinedPath._buf[0xb]; + (*(undefined1 *)((char *)&(config) + 0x28)) = joinedPath._buf[0xc]; + (*(undefined1 *)((char *)&(config) + 0x29)) = joinedPath._buf[0xd]; + (*(undefined1 *)((char *)&(config) + 0x2a)) = joinedPath._buf[0xe]; + (*(undefined1 *)((char *)&(config) + 0x2b)) = joinedPath._buf[0xf]; + (*(undefined4 *)((char *)&(config) + 0x2c)) = joinedPath._size; + (*(undefined4 *)((char *)&(config) + 0x30)) = joinedPath._capacity; } else { pcVar5 = "walls"; @@ -691,7 +691,7 @@ LAB_00932f69: isLess = isJoinedPathAlive < (byte)*pcVar5; if (isJoinedPathAlive != *pcVar5) { LAB_00933030: - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; goto LAB_00933035; } if (isJoinedPathAlive == 0) break; @@ -721,7 +721,7 @@ LAB_00933035: isLess = isJoinedPathAlive < (byte)*pcVar5; if (isJoinedPathAlive != *pcVar5) { LAB_00933090: - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; goto LAB_00933095; } if (isJoinedPathAlive == 0) break; @@ -751,7 +751,7 @@ LAB_00933095: isLess = isJoinedPathAlive < (byte)*pcVar5; if (isJoinedPathAlive != *pcVar5) { LAB_009330f0: - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; goto LAB_009330f5; } if (isJoinedPathAlive == 0) break; @@ -781,7 +781,7 @@ LAB_009330f5: isLess = isJoinedPathAlive < (byte)*pcVar5; if (isJoinedPathAlive != *pcVar5) { LAB_00933150: - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; goto LAB_00933155; } if (isJoinedPathAlive == 0) break; @@ -811,7 +811,7 @@ LAB_00933155: isLess = isJoinedPathAlive < (byte)*pcVar5; if (isJoinedPathAlive != *pcVar5) { LAB_009331b0: - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; goto LAB_009331b5; } if (isJoinedPathAlive == 0) break; @@ -840,15 +840,15 @@ LAB_009331b5: strCursor = strCursor + 1; } while (isJoinedPathAlive != 0); ((std::string *)(attrValue._buf))->std::string::assign(valueText, - (int)strCursor - (int)(valueText + 1)); + GHIDRA_INT(strCursor) - GHIDRA_INT((valueText + 1))); if (attrValue._size == 0) { LAB_009332c2: - config.unk1._0_1_ = 0; + (*(undefined1 *)((char *)&(config.unk1) + 0x0)) = 0; } else { psVar4 = &attrValue; if (0xf < attrValue._capacity) { - psVar4 = (std_string *)attrValue._buf._0_4_; + psVar4 = (*(undefined4 *)((char *)&((std_string *)attrValue._buf) + 0x0)); } if (attrValue._size == 4) { if ((*(int *)psVar4->_buf == 0x65757274) || @@ -863,7 +863,7 @@ LAB_009332c2: freeSize = 0; } else { - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; } if (freeSize != 0) goto LAB_0093325c; } @@ -871,7 +871,7 @@ LAB_009332c2: LAB_0093325c: psVar4 = &attrValue; if (0xf < attrValue._capacity) { - psVar4 = (std_string *)attrValue._buf._0_4_; + psVar4 = (*(undefined4 *)((char *)&((std_string *)attrValue._buf) + 0x0)); } if (attrValue._size == 4) { if ((*(int *)psVar4->_buf == 0x65757254) || @@ -886,27 +886,27 @@ LAB_0093325c: freeSize = 0; } else { - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; } if (freeSize == 0) goto LAB_009332b9; } psVar4 = &attrValue; if (0xf < attrValue._capacity) { - psVar4 = (std_string *)attrValue._buf._0_4_; + psVar4 = (*(undefined4 *)((char *)&((std_string *)attrValue._buf) + 0x0)); } iVar3 = atoi(psVar4->_buf); if (iVar3 == 0) goto LAB_009332c2; } LAB_009332b9: - config.unk1._0_1_ = 1; + (*(undefined1 *)((char *)&(config.unk1) + 0x0)) = 1; } if (0xf < attrValue._capacity) { freeSize = attrValue._capacity + 1; - freeBlock = (void *)attrValue._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(attrValue._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(attrValue._buf) + 0x0)) + -4); freeSize = attrValue._capacity + 0x24; - if (0x1f < (attrValue._buf._0_4_ - (int)freeBlock) - 4U) + if (0x1f < ((*(undefined4 *)((char *)&(attrValue._buf) + 0x0)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); @@ -923,7 +923,7 @@ LAB_009332b9: isLess = isJoinedPathAlive < (byte)*pcVar5; if (isJoinedPathAlive != *pcVar5) { LAB_00933337: - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; goto LAB_0093333c; } if (isJoinedPathAlive == 0) break; @@ -961,39 +961,39 @@ LAB_0093333c: isJoinedPathAlive = *valueText; valueText = valueText + 1; } while (isJoinedPathAlive != 0); - psVar4 = (std_string *)(valueText + -(int)(strCursor + 1)); + psVar4 = (std_string *)(valueText + -GHIDRA_INT((strCursor + 1))); if ((std_string *)(0x7fffffff - gridGfxRoot._size) < psVar4) goto LAB_00934421; rootText = &gridGfxRoot; if (0xf < gridGfxRoot._capacity) { - rootText = (std_string *)gridGfxRoot._buf._0_4_; + rootText = (*(undefined4 *)((char *)&((std_string *)gridGfxRoot._buf) + 0x0)); } - ((std::string *)(joinedPath._buf))->std::string::concat((int)this,psVar4, + ((std::string *)(joinedPath._buf))->std::string::concat(GHIDRA_INT(this),psVar4, (byte *)rootText,gridGfxRoot._size,strCursor, - (uint)psVar4); + GHIDRA_UINT(psVar4)); psVar4 = &joinedPath; - local_14._0_1_ = 0x11; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x11; isJoinedPathAlive = true; } ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0x78))))->std::string::_Tidy_deallocate(); - config._120_1_ = psVar4->_buf[0]; - config._121_1_ = psVar4->_buf[1]; - config._122_1_ = psVar4->_buf[2]; - config._123_1_ = psVar4->_buf[3]; - config._124_1_ = psVar4->_buf[4]; - config._125_1_ = psVar4->_buf[5]; - config._126_1_ = psVar4->_buf[6]; - config._127_1_ = psVar4->_buf[7]; - config._128_1_ = psVar4->_buf[8]; - config._129_1_ = psVar4->_buf[9]; - config._130_1_ = psVar4->_buf[10]; - config._131_1_ = psVar4->_buf[0xb]; - config._132_1_ = psVar4->_buf[0xc]; - config._133_1_ = psVar4->_buf[0xd]; - config._134_1_ = psVar4->_buf[0xe]; - config._135_1_ = psVar4->_buf[0xf]; - config._136_4_ = psVar4->_size; - config._140_4_ = psVar4->_capacity; + (*(undefined1 *)((char *)&(config) + 0x78)) = psVar4->_buf[0]; + (*(undefined1 *)((char *)&(config) + 0x79)) = psVar4->_buf[1]; + (*(undefined1 *)((char *)&(config) + 0x7a)) = psVar4->_buf[2]; + (*(undefined1 *)((char *)&(config) + 0x7b)) = psVar4->_buf[3]; + (*(undefined1 *)((char *)&(config) + 0x7c)) = psVar4->_buf[4]; + (*(undefined1 *)((char *)&(config) + 0x7d)) = psVar4->_buf[5]; + (*(undefined1 *)((char *)&(config) + 0x7e)) = psVar4->_buf[6]; + (*(undefined1 *)((char *)&(config) + 0x7f)) = psVar4->_buf[7]; + (*(undefined1 *)((char *)&(config) + 0x80)) = psVar4->_buf[8]; + (*(undefined1 *)((char *)&(config) + 0x81)) = psVar4->_buf[9]; + (*(undefined1 *)((char *)&(config) + 0x82)) = psVar4->_buf[10]; + (*(undefined1 *)((char *)&(config) + 0x83)) = psVar4->_buf[0xb]; + (*(undefined1 *)((char *)&(config) + 0x84)) = psVar4->_buf[0xc]; + (*(undefined1 *)((char *)&(config) + 0x85)) = psVar4->_buf[0xd]; + (*(undefined1 *)((char *)&(config) + 0x86)) = psVar4->_buf[0xe]; + (*(undefined1 *)((char *)&(config) + 0x87)) = psVar4->_buf[0xf]; + (*(undefined4 *)((char *)&(config) + 0x88)) = psVar4->_size; + (*(undefined4 *)((char *)&(config) + 0x8c)) = psVar4->_capacity; psVar4->_size = 0; psVar4->_capacity = 0xf; psVar4->_buf[0] = '\0'; @@ -1001,25 +1001,25 @@ LAB_0093333c: (cleanupFlags = cleanupFlags & 0xfffffffd, 0xf < attrValue._capacity)) { freeSize = attrValue._capacity + 1; - freeBlock = (void *)attrValue._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(attrValue._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(attrValue._buf) + 0x0)) + -4); freeSize = attrValue._capacity + 0x24; - if (0x1f < (attrValue._buf._0_4_ - (int)freeBlock) - 4U) + if (0x1f < ((*(undefined4 *)((char *)&(attrValue._buf) + 0x0)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); } - local_14._0_1_ = 0x10; - local_14._1_3_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x10; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; if ((isJoinedPathAlive) && (isJoinedPathAlive = false, 0xf < joinedPath._capacity)) { freeSize = joinedPath._capacity + 1; - freeBlock = (void *)joinedPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)joinedPath._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(joinedPath._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(joinedPath._buf) + 0x0)) + -4); freeSize = joinedPath._capacity + 0x24; - if (0x1f < (joinedPath._buf._0_4_ - (int)freeBlock) - 4U) + if (0x1f < ((*(undefined4 *)((char *)&(joinedPath._buf) + 0x0)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); @@ -1036,7 +1036,7 @@ LAB_0093333c: isLess = isJoinedPathAlive < (byte)*pcVar5; if (isJoinedPathAlive != *pcVar5) { LAB_009334f4: - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; goto LAB_009334f9; } if (isJoinedPathAlive == 0) break; @@ -1074,39 +1074,39 @@ LAB_009334f9: isJoinedPathAlive = *valueText; valueText = valueText + 1; } while (isJoinedPathAlive != 0); - psVar4 = (std_string *)(valueText + -(int)(strCursor + 1)); + psVar4 = (std_string *)(valueText + -GHIDRA_INT((strCursor + 1))); if ((std_string *)(0x7fffffff - gridGfxRoot._size) < psVar4) goto LAB_00934421; rootText = &gridGfxRoot; if (0xf < gridGfxRoot._capacity) { - rootText = (std_string *)gridGfxRoot._buf._0_4_; + rootText = (*(undefined4 *)((char *)&((std_string *)gridGfxRoot._buf) + 0x0)); } - ((std::string *)(joinedPath._buf))->std::string::concat((int)this,psVar4, + ((std::string *)(joinedPath._buf))->std::string::concat(GHIDRA_INT(this),psVar4, (byte *)rootText,gridGfxRoot._size,strCursor - ,(uint)psVar4); + ,GHIDRA_UINT(psVar4)); psVar4 = &joinedPath; - local_14._0_1_ = 0x12; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x12; cleanupFlags = cleanupFlags | 0x200004; } ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0x90))))->std::string::_Tidy_deallocate(); - config._144_1_ = psVar4->_buf[0]; - config._145_1_ = psVar4->_buf[1]; - config._146_1_ = psVar4->_buf[2]; - config._147_1_ = psVar4->_buf[3]; - config._148_1_ = psVar4->_buf[4]; - config._149_1_ = psVar4->_buf[5]; - config._150_1_ = psVar4->_buf[6]; - config._151_1_ = psVar4->_buf[7]; - config._152_1_ = psVar4->_buf[8]; - config._153_1_ = psVar4->_buf[9]; - config._154_1_ = psVar4->_buf[10]; - config._155_1_ = psVar4->_buf[0xb]; - config._156_1_ = psVar4->_buf[0xc]; - config._157_1_ = psVar4->_buf[0xd]; - config._158_1_ = psVar4->_buf[0xe]; - config._159_1_ = psVar4->_buf[0xf]; - config._160_4_ = psVar4->_size; - config._164_4_ = psVar4->_capacity; + (*(undefined1 *)((char *)&(config) + 0x90)) = psVar4->_buf[0]; + (*(undefined1 *)((char *)&(config) + 0x91)) = psVar4->_buf[1]; + (*(undefined1 *)((char *)&(config) + 0x92)) = psVar4->_buf[2]; + (*(undefined1 *)((char *)&(config) + 0x93)) = psVar4->_buf[3]; + (*(undefined1 *)((char *)&(config) + 0x94)) = psVar4->_buf[4]; + (*(undefined1 *)((char *)&(config) + 0x95)) = psVar4->_buf[5]; + (*(undefined1 *)((char *)&(config) + 0x96)) = psVar4->_buf[6]; + (*(undefined1 *)((char *)&(config) + 0x97)) = psVar4->_buf[7]; + (*(undefined1 *)((char *)&(config) + 0x98)) = psVar4->_buf[8]; + (*(undefined1 *)((char *)&(config) + 0x99)) = psVar4->_buf[9]; + (*(undefined1 *)((char *)&(config) + 0x9a)) = psVar4->_buf[10]; + (*(undefined1 *)((char *)&(config) + 0x9b)) = psVar4->_buf[0xb]; + (*(undefined1 *)((char *)&(config) + 0x9c)) = psVar4->_buf[0xc]; + (*(undefined1 *)((char *)&(config) + 0x9d)) = psVar4->_buf[0xd]; + (*(undefined1 *)((char *)&(config) + 0x9e)) = psVar4->_buf[0xe]; + (*(undefined1 *)((char *)&(config) + 0x9f)) = psVar4->_buf[0xf]; + (*(undefined4 *)((char *)&(config) + 0xa0)) = psVar4->_size; + (*(undefined4 *)((char *)&(config) + 0xa4)) = psVar4->_capacity; psVar4->_size = 0; psVar4->_capacity = 0xf; psVar4->_buf[0] = '\0'; @@ -1114,26 +1114,26 @@ LAB_009334f9: (cleanupFlags = cleanupFlags & 0xfffffff7, 0xf < attrValue._capacity)) { freeSize = attrValue._capacity + 1; - freeBlock = (void *)attrValue._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(attrValue._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(attrValue._buf) + 0x0)) + -4); freeSize = attrValue._capacity + 0x24; - if (0x1f < (attrValue._buf._0_4_ - (int)freeBlock) - 4U) + if (0x1f < ((*(undefined4 *)((char *)&(attrValue._buf) + 0x0)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); } - local_14._0_1_ = 0x10; - local_14._1_3_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x10; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; if (((cleanupFlags & 4) != 0) && (cleanupFlags = cleanupFlags & 0xfffffffb, 0xf < joinedPath._capacity)) { freeSize = joinedPath._capacity + 1; - freeBlock = (void *)joinedPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)joinedPath._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(joinedPath._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(joinedPath._buf) + 0x0)) + -4); freeSize = joinedPath._capacity + 0x24; - if (0x1f < (joinedPath._buf._0_4_ - (int)freeBlock) - 4U) + if (0x1f < ((*(undefined4 *)((char *)&(joinedPath._buf) + 0x0)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); @@ -1150,7 +1150,7 @@ LAB_009334f9: isLess = isJoinedPathAlive < *attrNameCursor; if (isJoinedPathAlive != *attrNameCursor) { LAB_009336b0: - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; goto LAB_009336b5; } if (isJoinedPathAlive == 0) break; @@ -1188,39 +1188,39 @@ LAB_009336b5: isJoinedPathAlive = *valueText; valueText = valueText + 1; } while (isJoinedPathAlive != 0); - psVar4 = (std_string *)(valueText + -(int)(strCursor + 1)); + psVar4 = (std_string *)(valueText + -GHIDRA_INT((strCursor + 1))); if ((std_string *)(0x7fffffff - gridGfxRoot._size) < psVar4) goto LAB_00934421; rootText = &gridGfxRoot; if (0xf < gridGfxRoot._capacity) { - rootText = (std_string *)gridGfxRoot._buf._0_4_; + rootText = (*(undefined4 *)((char *)&((std_string *)gridGfxRoot._buf) + 0x0)); } - ((std::string *)(joinedPath._buf))->std::string::concat((int)this,psVar4, + ((std::string *)(joinedPath._buf))->std::string::concat(GHIDRA_INT(this),psVar4, (byte *)rootText,gridGfxRoot._size, - strCursor,(uint)psVar4); + strCursor,GHIDRA_UINT(psVar4)); psVar4 = &joinedPath; - local_14._0_1_ = 0x13; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x13; cleanupFlags = cleanupFlags | 0x400010; } ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0xa8))))->std::string::_Tidy_deallocate(); - config._168_1_ = psVar4->_buf[0]; - config._169_1_ = psVar4->_buf[1]; - config._170_1_ = psVar4->_buf[2]; - config._171_1_ = psVar4->_buf[3]; - config._172_1_ = psVar4->_buf[4]; - config._173_1_ = psVar4->_buf[5]; - config._174_1_ = psVar4->_buf[6]; - config._175_1_ = psVar4->_buf[7]; - config._176_1_ = psVar4->_buf[8]; - config._177_1_ = psVar4->_buf[9]; - config._178_1_ = psVar4->_buf[10]; - config._179_1_ = psVar4->_buf[0xb]; - config._180_1_ = psVar4->_buf[0xc]; - config._181_1_ = psVar4->_buf[0xd]; - config._182_1_ = psVar4->_buf[0xe]; - config._183_1_ = psVar4->_buf[0xf]; - config._184_4_ = psVar4->_size; - config._188_4_ = psVar4->_capacity; + (*(undefined1 *)((char *)&(config) + 0xa8)) = psVar4->_buf[0]; + (*(undefined1 *)((char *)&(config) + 0xa9)) = psVar4->_buf[1]; + (*(undefined1 *)((char *)&(config) + 0xaa)) = psVar4->_buf[2]; + (*(undefined1 *)((char *)&(config) + 0xab)) = psVar4->_buf[3]; + (*(undefined1 *)((char *)&(config) + 0xac)) = psVar4->_buf[4]; + (*(undefined1 *)((char *)&(config) + 0xad)) = psVar4->_buf[5]; + (*(undefined1 *)((char *)&(config) + 0xae)) = psVar4->_buf[6]; + (*(undefined1 *)((char *)&(config) + 0xaf)) = psVar4->_buf[7]; + (*(undefined1 *)((char *)&(config) + 0xb0)) = psVar4->_buf[8]; + (*(undefined1 *)((char *)&(config) + 0xb1)) = psVar4->_buf[9]; + (*(undefined1 *)((char *)&(config) + 0xb2)) = psVar4->_buf[10]; + (*(undefined1 *)((char *)&(config) + 0xb3)) = psVar4->_buf[0xb]; + (*(undefined1 *)((char *)&(config) + 0xb4)) = psVar4->_buf[0xc]; + (*(undefined1 *)((char *)&(config) + 0xb5)) = psVar4->_buf[0xd]; + (*(undefined1 *)((char *)&(config) + 0xb6)) = psVar4->_buf[0xe]; + (*(undefined1 *)((char *)&(config) + 0xb7)) = psVar4->_buf[0xf]; + (*(undefined4 *)((char *)&(config) + 0xb8)) = psVar4->_size; + (*(undefined4 *)((char *)&(config) + 0xbc)) = psVar4->_capacity; psVar4->_size = 0; psVar4->_capacity = 0xf; psVar4->_buf[0] = '\0'; @@ -1228,22 +1228,22 @@ LAB_009336b5: (cleanupFlags = cleanupFlags & 0xffffffdf, 0xf < attrValue._capacity)) { freeSize = attrValue._capacity + 1; - freeBlock = (void *)attrValue._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(attrValue._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(attrValue._buf) + 0x0)) + -4); freeSize = attrValue._capacity + 0x24; - if (0x1f < (attrValue._buf._0_4_ - (int)freeBlock) - 4U) + if (0x1f < ((*(undefined4 *)((char *)&(attrValue._buf) + 0x0)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); } - local_14._0_1_ = 0x10; - local_14._1_3_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x10; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; if ((cleanupFlags & 0x10) != 0) { cleanupFlags = cleanupFlags & 0xffffffef; LAB_00933f46: - local_14._1_3_ = 0; - local_14._0_1_ = 0x10; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x10; ((std::string *)(joinedPath._buf))->std::string::_Tidy_deallocate(); } } @@ -1258,7 +1258,7 @@ LAB_00933f46: isLess = isJoinedPathAlive < (byte)*pcVar5; if (isJoinedPathAlive != *pcVar5) { LAB_00933820: - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; goto LAB_00933825; } if (isJoinedPathAlive == 0) break; @@ -1296,44 +1296,44 @@ LAB_00933825: isJoinedPathAlive = *valueText; valueText = valueText + 1; } while (isJoinedPathAlive != 0); - psVar4 = (std_string *)(valueText + -(int)(strCursor + 1)); + psVar4 = (std_string *)(valueText + -GHIDRA_INT((strCursor + 1))); if ((std_string *)(0x7fffffff - gridGfxRoot._size) < psVar4) goto LAB_00934421; rootText = &gridGfxRoot; if (0xf < gridGfxRoot._capacity) { - rootText = (std_string *)gridGfxRoot._buf._0_4_; + rootText = (*(undefined4 *)((char *)&((std_string *)gridGfxRoot._buf) + 0x0)); } - ((std::string *)(joinedPath._buf))->std::string::concat((int)this,psVar4, + ((std::string *)(joinedPath._buf))->std::string::concat(GHIDRA_INT(this),psVar4, (byte *)rootText,gridGfxRoot._size, - strCursor,(uint)psVar4); + strCursor,GHIDRA_UINT(psVar4)); psVar4 = &joinedPath; - local_14._0_1_ = 0x14; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x14; cleanupFlags = cleanupFlags | 0x800040; } ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0xc0))))->std::string::_Tidy_deallocate(); - config._192_1_ = psVar4->_buf[0]; - config._193_1_ = psVar4->_buf[1]; - config._194_1_ = psVar4->_buf[2]; - config._195_1_ = psVar4->_buf[3]; - config._196_1_ = psVar4->_buf[4]; - config._197_1_ = psVar4->_buf[5]; - config._198_1_ = psVar4->_buf[6]; - config._199_1_ = psVar4->_buf[7]; - config._200_1_ = psVar4->_buf[8]; - config._201_1_ = psVar4->_buf[9]; - config._202_1_ = psVar4->_buf[10]; - config._203_1_ = psVar4->_buf[0xb]; - config._204_1_ = psVar4->_buf[0xc]; - config._205_1_ = psVar4->_buf[0xd]; - config._206_1_ = psVar4->_buf[0xe]; - config._207_1_ = psVar4->_buf[0xf]; - config._208_4_ = psVar4->_size; - config._212_4_ = psVar4->_capacity; + (*(undefined1 *)((char *)&(config) + 0xc0)) = psVar4->_buf[0]; + (*(undefined1 *)((char *)&(config) + 0xc1)) = psVar4->_buf[1]; + (*(undefined1 *)((char *)&(config) + 0xc2)) = psVar4->_buf[2]; + (*(undefined1 *)((char *)&(config) + 0xc3)) = psVar4->_buf[3]; + (*(undefined1 *)((char *)&(config) + 0xc4)) = psVar4->_buf[4]; + (*(undefined1 *)((char *)&(config) + 0xc5)) = psVar4->_buf[5]; + (*(undefined1 *)((char *)&(config) + 0xc6)) = psVar4->_buf[6]; + (*(undefined1 *)((char *)&(config) + 0xc7)) = psVar4->_buf[7]; + (*(undefined1 *)((char *)&(config) + 0xc8)) = psVar4->_buf[8]; + (*(undefined1 *)((char *)&(config) + 0xc9)) = psVar4->_buf[9]; + (*(undefined1 *)((char *)&(config) + 0xca)) = psVar4->_buf[10]; + (*(undefined1 *)((char *)&(config) + 0xcb)) = psVar4->_buf[0xb]; + (*(undefined1 *)((char *)&(config) + 0xcc)) = psVar4->_buf[0xc]; + (*(undefined1 *)((char *)&(config) + 0xcd)) = psVar4->_buf[0xd]; + (*(undefined1 *)((char *)&(config) + 0xce)) = psVar4->_buf[0xe]; + (*(undefined1 *)((char *)&(config) + 0xcf)) = psVar4->_buf[0xf]; + (*(undefined4 *)((char *)&(config) + 0xd0)) = psVar4->_size; + (*(undefined4 *)((char *)&(config) + 0xd4)) = psVar4->_capacity; psVar4->_size = 0; psVar4->_capacity = 0xf; psVar4->_buf[0] = '\0'; - local_14._0_1_ = 0x10; - local_14._1_3_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x10; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; if ((cleanupFlags & 0x40) != 0) { cleanupFlags = cleanupFlags & 0xffffffbf; goto LAB_00933f46; @@ -1350,7 +1350,7 @@ LAB_00933825: isLess = isJoinedPathAlive < (byte)*pcVar5; if (isJoinedPathAlive != *pcVar5) { LAB_009339a2: - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; goto LAB_009339a7; } if (isJoinedPathAlive == 0) break; @@ -1389,40 +1389,40 @@ LAB_009339a7: isJoinedPathAlive = *valueText; valueText = valueText + 1; } while (isJoinedPathAlive != 0); - psVar4 = (std_string *)(valueText + -(int)(strCursor + 1)) + psVar4 = (std_string *)(valueText + -GHIDRA_INT((strCursor + 1))) ; if ((std_string *)(0x7fffffff - gridGfxRoot._size) < psVar4) goto LAB_00934421; rootText = &gridGfxRoot; if (0xf < gridGfxRoot._capacity) { - rootText = (std_string *)gridGfxRoot._buf._0_4_; + rootText = (*(undefined4 *)((char *)&((std_string *)gridGfxRoot._buf) + 0x0)); } - ((std::string *)(joinedPath._buf))->std::string::concat((int)this,psVar4, + ((std::string *)(joinedPath._buf))->std::string::concat(GHIDRA_INT(this),psVar4, (byte *)rootText,gridGfxRoot._size, - strCursor,(uint)psVar4); + strCursor,GHIDRA_UINT(psVar4)); psVar4 = &joinedPath; - local_14._0_1_ = 0x15; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x15; cleanupFlags = cleanupFlags | 0x1000100; } ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0xd8))))->std::string::_Tidy_deallocate(); - config._216_1_ = psVar4->_buf[0]; - config._217_1_ = psVar4->_buf[1]; - config._218_1_ = psVar4->_buf[2]; - config._219_1_ = psVar4->_buf[3]; - config._220_1_ = psVar4->_buf[4]; - config._221_1_ = psVar4->_buf[5]; - config._222_1_ = psVar4->_buf[6]; - config._223_1_ = psVar4->_buf[7]; - config._224_1_ = psVar4->_buf[8]; - config._225_1_ = psVar4->_buf[9]; - config._226_1_ = psVar4->_buf[10]; - config._227_1_ = psVar4->_buf[0xb]; - config._228_1_ = psVar4->_buf[0xc]; - config._229_1_ = psVar4->_buf[0xd]; - config._230_1_ = psVar4->_buf[0xe]; - config._231_1_ = psVar4->_buf[0xf]; - config._232_4_ = psVar4->_size; - config._236_4_ = psVar4->_capacity; + (*(undefined1 *)((char *)&(config) + 0xd8)) = psVar4->_buf[0]; + (*(undefined1 *)((char *)&(config) + 0xd9)) = psVar4->_buf[1]; + (*(undefined1 *)((char *)&(config) + 0xda)) = psVar4->_buf[2]; + (*(undefined1 *)((char *)&(config) + 0xdb)) = psVar4->_buf[3]; + (*(undefined1 *)((char *)&(config) + 0xdc)) = psVar4->_buf[4]; + (*(undefined1 *)((char *)&(config) + 0xdd)) = psVar4->_buf[5]; + (*(undefined1 *)((char *)&(config) + 0xde)) = psVar4->_buf[6]; + (*(undefined1 *)((char *)&(config) + 0xdf)) = psVar4->_buf[7]; + (*(undefined1 *)((char *)&(config) + 0xe0)) = psVar4->_buf[8]; + (*(undefined1 *)((char *)&(config) + 0xe1)) = psVar4->_buf[9]; + (*(undefined1 *)((char *)&(config) + 0xe2)) = psVar4->_buf[10]; + (*(undefined1 *)((char *)&(config) + 0xe3)) = psVar4->_buf[0xb]; + (*(undefined1 *)((char *)&(config) + 0xe4)) = psVar4->_buf[0xc]; + (*(undefined1 *)((char *)&(config) + 0xe5)) = psVar4->_buf[0xd]; + (*(undefined1 *)((char *)&(config) + 0xe6)) = psVar4->_buf[0xe]; + (*(undefined1 *)((char *)&(config) + 0xe7)) = psVar4->_buf[0xf]; + (*(undefined4 *)((char *)&(config) + 0xe8)) = psVar4->_size; + (*(undefined4 *)((char *)&(config) + 0xec)) = psVar4->_capacity; psVar4->_size = 0; psVar4->_capacity = 0xf; psVar4->_buf[0] = '\0'; @@ -1430,17 +1430,17 @@ LAB_009339a7: (cleanupFlags = cleanupFlags & 0xfffffdff, 0xf < attrValue._capacity)) { freeSize = attrValue._capacity + 1; - freeBlock = (void *)attrValue._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(attrValue._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(attrValue._buf) + 0x0)) + -4); freeSize = attrValue._capacity + 0x24; - if (0x1f < (attrValue._buf._0_4_ - (int)freeBlock) - 4U) + if (0x1f < ((*(undefined4 *)((char *)&(attrValue._buf) + 0x0)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); } - local_14._0_1_ = 0x10; - local_14._1_3_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x10; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; if ((cleanupFlags & 0x100) != 0) { cleanupFlags = cleanupFlags & 0xfffffeff; goto LAB_00933f46; @@ -1457,7 +1457,7 @@ LAB_009339a7: isLess = isJoinedPathAlive < *attrNameCursor; if (isJoinedPathAlive != *attrNameCursor) { LAB_00933b30: - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; goto LAB_00933b35; } if (isJoinedPathAlive == 0) break; @@ -1497,39 +1497,39 @@ LAB_00933b35: valueText = valueText + 1; } while (isJoinedPathAlive != 0); psVar4 = (std_string *) - (valueText + -(int)(strCursor + 1)); + (valueText + -GHIDRA_INT((strCursor + 1))); if ((std_string *)(0x7fffffff - gridGfxRoot._size) < psVar4) goto LAB_00934421; rootText = &gridGfxRoot; if (0xf < gridGfxRoot._capacity) { - rootText = (std_string *)gridGfxRoot._buf._0_4_; + rootText = (*(undefined4 *)((char *)&((std_string *)gridGfxRoot._buf) + 0x0)); } - ((std::string *)(joinedPath._buf))->std::string::concat((int)this,psVar4, + ((std::string *)(joinedPath._buf))->std::string::concat(GHIDRA_INT(this),psVar4, (byte *)rootText,gridGfxRoot._size, - strCursor,(uint)psVar4); + strCursor,GHIDRA_UINT(psVar4)); psVar4 = &joinedPath; - local_14._0_1_ = 0x16; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x16; cleanupFlags = cleanupFlags | 0x2000400; } ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0xf0))))->std::string::_Tidy_deallocate(); - config._240_1_ = psVar4->_buf[0]; - config._241_1_ = psVar4->_buf[1]; - config._242_1_ = psVar4->_buf[2]; - config._243_1_ = psVar4->_buf[3]; - config._244_1_ = psVar4->_buf[4]; - config._245_1_ = psVar4->_buf[5]; - config._246_1_ = psVar4->_buf[6]; - config._247_1_ = psVar4->_buf[7]; - config._248_1_ = psVar4->_buf[8]; - config._249_1_ = psVar4->_buf[9]; - config._250_1_ = psVar4->_buf[10]; - config._251_1_ = psVar4->_buf[0xb]; - config._252_1_ = psVar4->_buf[0xc]; - config._253_1_ = psVar4->_buf[0xd]; - config._254_1_ = psVar4->_buf[0xe]; - config._255_1_ = psVar4->_buf[0xf]; - config._256_4_ = psVar4->_size; - config._260_4_ = psVar4->_capacity; + (*(undefined1 *)((char *)&(config) + 0xf0)) = psVar4->_buf[0]; + (*(undefined1 *)((char *)&(config) + 0xf1)) = psVar4->_buf[1]; + (*(undefined1 *)((char *)&(config) + 0xf2)) = psVar4->_buf[2]; + (*(undefined1 *)((char *)&(config) + 0xf3)) = psVar4->_buf[3]; + (*(undefined1 *)((char *)&(config) + 0xf4)) = psVar4->_buf[4]; + (*(undefined1 *)((char *)&(config) + 0xf5)) = psVar4->_buf[5]; + (*(undefined1 *)((char *)&(config) + 0xf6)) = psVar4->_buf[6]; + (*(undefined1 *)((char *)&(config) + 0xf7)) = psVar4->_buf[7]; + (*(undefined1 *)((char *)&(config) + 0xf8)) = psVar4->_buf[8]; + (*(undefined1 *)((char *)&(config) + 0xf9)) = psVar4->_buf[9]; + (*(undefined1 *)((char *)&(config) + 0xfa)) = psVar4->_buf[10]; + (*(undefined1 *)((char *)&(config) + 0xfb)) = psVar4->_buf[0xb]; + (*(undefined1 *)((char *)&(config) + 0xfc)) = psVar4->_buf[0xc]; + (*(undefined1 *)((char *)&(config) + 0xfd)) = psVar4->_buf[0xd]; + (*(undefined1 *)((char *)&(config) + 0xfe)) = psVar4->_buf[0xe]; + (*(undefined1 *)((char *)&(config) + 0xff)) = psVar4->_buf[0xf]; + (*(undefined4 *)((char *)&(config) + 0x100)) = psVar4->_size; + (*(undefined4 *)((char *)&(config) + 0x104)) = psVar4->_capacity; psVar4->_size = 0; psVar4->_capacity = 0xf; psVar4->_buf[0] = '\0'; @@ -1537,17 +1537,17 @@ LAB_00933b35: (cleanupFlags = cleanupFlags & 0xfffff7ff, 0xf < attrValue._capacity)) { freeSize = attrValue._capacity + 1; - freeBlock = (void *)attrValue._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(attrValue._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(attrValue._buf) + 0x0)) + -4); freeSize = attrValue._capacity + 0x24; - if (0x1f < (attrValue._buf._0_4_ - (int)freeBlock) - + if (0x1f < ((*(undefined4 *)((char *)&(attrValue._buf) + 0x0)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); } - local_14._0_1_ = 0x10; - local_14._1_3_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x10; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; if ((cleanupFlags & 0x400) != 0) { cleanupFlags = cleanupFlags & 0xfffffbff; goto LAB_00933f46; @@ -1564,7 +1564,7 @@ LAB_00933b35: isLess = isJoinedPathAlive < (byte)*pcVar5; if (isJoinedPathAlive != *pcVar5) { LAB_00933cc0: - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; goto LAB_00933cc5; } if (isJoinedPathAlive == 0) break; @@ -1604,39 +1604,39 @@ LAB_00933cc5: valueText = valueText + 1; } while (isJoinedPathAlive != 0); psVar4 = (std_string *) - (valueText + -(int)(strCursor + 1)); + (valueText + -GHIDRA_INT((strCursor + 1))); if ((std_string *)(0x7fffffff - gridGfxRoot._size) < psVar4) goto LAB_00934421; rootText = &gridGfxRoot; if (0xf < gridGfxRoot._capacity) { - rootText = (std_string *)gridGfxRoot._buf._0_4_; + rootText = (*(undefined4 *)((char *)&((std_string *)gridGfxRoot._buf) + 0x0)); } - ((std::string *)(joinedPath._buf))->std::string::concat((int)this,psVar4, + ((std::string *)(joinedPath._buf))->std::string::concat(GHIDRA_INT(this),psVar4, (byte *)rootText,gridGfxRoot._size - ,strCursor,(uint)psVar4); + ,strCursor,GHIDRA_UINT(psVar4)); psVar4 = &joinedPath; - local_14._0_1_ = 0x17; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x17; cleanupFlags = cleanupFlags | 0x4001000; } ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0x108))))->std::string::_Tidy_deallocate(); - config._264_1_ = psVar4->_buf[0]; - config._265_1_ = psVar4->_buf[1]; - config._266_1_ = psVar4->_buf[2]; - config._267_1_ = psVar4->_buf[3]; - config._268_1_ = psVar4->_buf[4]; - config._269_1_ = psVar4->_buf[5]; - config._270_1_ = psVar4->_buf[6]; - config._271_1_ = psVar4->_buf[7]; - config._272_1_ = psVar4->_buf[8]; - config._273_1_ = psVar4->_buf[9]; - config._274_1_ = psVar4->_buf[10]; - config._275_1_ = psVar4->_buf[0xb]; - config._276_1_ = psVar4->_buf[0xc]; - config._277_1_ = psVar4->_buf[0xd]; - config._278_1_ = psVar4->_buf[0xe]; - config._279_1_ = psVar4->_buf[0xf]; - config._280_4_ = psVar4->_size; - config._284_4_ = psVar4->_capacity; + (*(undefined1 *)((char *)&(config) + 0x108)) = psVar4->_buf[0]; + (*(undefined1 *)((char *)&(config) + 0x109)) = psVar4->_buf[1]; + (*(undefined1 *)((char *)&(config) + 0x10a)) = psVar4->_buf[2]; + (*(undefined1 *)((char *)&(config) + 0x10b)) = psVar4->_buf[3]; + (*(undefined1 *)((char *)&(config) + 0x10c)) = psVar4->_buf[4]; + (*(undefined1 *)((char *)&(config) + 0x10d)) = psVar4->_buf[5]; + (*(undefined1 *)((char *)&(config) + 0x10e)) = psVar4->_buf[6]; + (*(undefined1 *)((char *)&(config) + 0x10f)) = psVar4->_buf[7]; + (*(undefined1 *)((char *)&(config) + 0x110)) = psVar4->_buf[8]; + (*(undefined1 *)((char *)&(config) + 0x111)) = psVar4->_buf[9]; + (*(undefined1 *)((char *)&(config) + 0x112)) = psVar4->_buf[10]; + (*(undefined1 *)((char *)&(config) + 0x113)) = psVar4->_buf[0xb]; + (*(undefined1 *)((char *)&(config) + 0x114)) = psVar4->_buf[0xc]; + (*(undefined1 *)((char *)&(config) + 0x115)) = psVar4->_buf[0xd]; + (*(undefined1 *)((char *)&(config) + 0x116)) = psVar4->_buf[0xe]; + (*(undefined1 *)((char *)&(config) + 0x117)) = psVar4->_buf[0xf]; + (*(undefined4 *)((char *)&(config) + 0x118)) = psVar4->_size; + (*(undefined4 *)((char *)&(config) + 0x11c)) = psVar4->_capacity; psVar4->_size = 0; psVar4->_capacity = 0xf; psVar4->_buf[0] = '\0'; @@ -1644,17 +1644,17 @@ LAB_00933cc5: (cleanupFlags = cleanupFlags & 0xffffdfff, 0xf < attrValue._capacity)) { freeSize = attrValue._capacity + 1; - freeBlock = (void *)attrValue._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(attrValue._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(attrValue._buf) + 0x0)) + -4); freeSize = attrValue._capacity + 0x24; - if (0x1f < (attrValue._buf._0_4_ - (int)freeBlock) - + if (0x1f < ((*(undefined4 *)((char *)&(attrValue._buf) + 0x0)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); } - local_14._0_1_ = 0x10; - local_14._1_3_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x10; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; if ((cleanupFlags & 0x1000) != 0) { cleanupFlags = cleanupFlags & 0xffffefff; goto LAB_00933f46; @@ -1671,7 +1671,7 @@ LAB_00933cc5: isLess = isJoinedPathAlive < (byte)*pcVar5; if (isJoinedPathAlive != *pcVar5) { LAB_00933e50: - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; goto LAB_00933e55; } if (isJoinedPathAlive == 0) break; @@ -1706,7 +1706,7 @@ LAB_00933e55: strCursor = valueText; } psVar4 = (std_string *)FUN_00421620(strCursor); - local_14._0_1_ = 0x18; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x18; cleanupFlags = cleanupFlags | 0x4000; } FUN_004215a0(psVar4); @@ -1714,17 +1714,17 @@ LAB_00933e55: (cleanupFlags = cleanupFlags & 0xffff7fff, 0xf < attrValue._capacity)) { freeSize = attrValue._capacity + 1; - freeBlock = (void *)attrValue._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(attrValue._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(attrValue._buf) + 0x0)) + -4); freeSize = attrValue._capacity + 0x24; - if (0x1f < (attrValue._buf._0_4_ - (int)freeBlock) + if (0x1f < ((*(undefined4 *)((char *)&(attrValue._buf) + 0x0)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); } - local_14._0_1_ = 0x10; - local_14._1_3_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x10; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; if ((cleanupFlags & 0x4000) != 0) { cleanupFlags = cleanupFlags & 0xffffbfff; goto LAB_00933f46; @@ -1741,7 +1741,7 @@ LAB_00933e55: isLess = isJoinedPathAlive < (byte)*pcVar5; if (isJoinedPathAlive != *pcVar5) { LAB_00933f94: - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; goto LAB_00933f99; } if (isJoinedPathAlive == 0) break; @@ -1759,7 +1759,7 @@ LAB_00933f99: valueText = (byte *)attribute[1]; } iVar3 = atoi((char *)valueText); - config.waterPitsMode._0_1_ = (undefined1)iVar3; + (*(undefined1 *)((char *)&(config.waterPitsMode) + 0x0)) = (undefined1)iVar3; } else { pcVar5 = "reversewatergfx"; @@ -1772,7 +1772,7 @@ LAB_00933f99: isLess = isJoinedPathAlive < (byte)*pcVar5; if (isJoinedPathAlive != *pcVar5) { LAB_00933ff4: - freeSize = -(uint)isLess | 1; + freeSize = -GHIDRA_UINT(isLess) | 1; goto LAB_00933ff9; } if (isJoinedPathAlive == 0) break; @@ -1791,7 +1791,7 @@ LAB_00933ff9: } std::string::string_from_cstr (joinedPath._buf,valueText); - config.waterPitsMode._1_1_ = + (*(undefined1 *)((char *)&(config.waterPitsMode) + 0x1)) = string_to_bool(&joinedPath); ((std::string *)(joinedPath._buf))->std::string::_Tidy_deallocate(); } @@ -1821,115 +1821,115 @@ LAB_00933ff9: BackdropConfig::operator_assign ((BackdropConfig *)(this + config.backdropId * 0x4f + 0x55),&config); } - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; ((std::string *)(&(*(undefined1 *)((char *)&(config) + 0x120))))->std::string::_Tidy_deallocate(); - if (0xf < (uint)config._284_4_) { - freeSize = config._284_4_ + 1; - freeBlock = (void *)config._264_4_; + if (0xf < (*(undefined4 *)((char *)&(GHIDRA_UINT(config)) + 0x11c))) { + freeSize = (*(undefined4 *)((char *)&(config) + 0x11c)) + 1; + freeBlock = (*(undefined4 *)((char *)&((void *)config) + 0x108)); if (0xfff < freeSize) { - freeBlock = *(void **)(config._264_4_ + -4); - freeSize = config._284_4_ + 0x24; - if (0x1f < (config._264_4_ - (int)freeBlock) - 4U) goto LAB_009343c2; + freeBlock = *(void **)((*(undefined4 *)((char *)&(config) + 0x108)) + -4); + freeSize = (*(undefined4 *)((char *)&(config) + 0x11c)) + 0x24; + if (0x1f < ((*(undefined4 *)((char *)&(config) + 0x108)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); } - if (0xf < (uint)config._260_4_) { - freeSize = config._260_4_ + 1; - freeBlock = (void *)config._240_4_; + if (0xf < (*(undefined4 *)((char *)&(GHIDRA_UINT(config)) + 0x104))) { + freeSize = (*(undefined4 *)((char *)&(config) + 0x104)) + 1; + freeBlock = (*(undefined4 *)((char *)&((void *)config) + 0xf0)); if (0xfff < freeSize) { - freeBlock = *(void **)(config._240_4_ + -4); - freeSize = config._260_4_ + 0x24; - if (0x1f < (config._240_4_ - (int)freeBlock) - 4U) goto LAB_009343c2; + freeBlock = *(void **)((*(undefined4 *)((char *)&(config) + 0xf0)) + -4); + freeSize = (*(undefined4 *)((char *)&(config) + 0x104)) + 0x24; + if (0x1f < ((*(undefined4 *)((char *)&(config) + 0xf0)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); } - if (0xf < (uint)config._236_4_) { - freeSize = config._236_4_ + 1; - freeBlock = (void *)config._216_4_; + if (0xf < (*(undefined4 *)((char *)&(GHIDRA_UINT(config)) + 0xec))) { + freeSize = (*(undefined4 *)((char *)&(config) + 0xec)) + 1; + freeBlock = (*(undefined4 *)((char *)&((void *)config) + 0xd8)); if (0xfff < freeSize) { - freeBlock = *(void **)(config._216_4_ + -4); - freeSize = config._236_4_ + 0x24; - if (0x1f < (config._216_4_ - (int)freeBlock) - 4U) goto LAB_009343c2; + freeBlock = *(void **)((*(undefined4 *)((char *)&(config) + 0xd8)) + -4); + freeSize = (*(undefined4 *)((char *)&(config) + 0xec)) + 0x24; + if (0x1f < ((*(undefined4 *)((char *)&(config) + 0xd8)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); } - if (0xf < (uint)config._212_4_) { - freeSize = config._212_4_ + 1; - freeBlock = (void *)config._192_4_; + if (0xf < (*(undefined4 *)((char *)&(GHIDRA_UINT(config)) + 0xd4))) { + freeSize = (*(undefined4 *)((char *)&(config) + 0xd4)) + 1; + freeBlock = (*(undefined4 *)((char *)&((void *)config) + 0xc0)); if (0xfff < freeSize) { - freeBlock = *(void **)(config._192_4_ + -4); - freeSize = config._212_4_ + 0x24; - if (0x1f < (config._192_4_ - (int)freeBlock) - 4U) goto LAB_009343c2; + freeBlock = *(void **)((*(undefined4 *)((char *)&(config) + 0xc0)) + -4); + freeSize = (*(undefined4 *)((char *)&(config) + 0xd4)) + 0x24; + if (0x1f < ((*(undefined4 *)((char *)&(config) + 0xc0)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); } - if (0xf < (uint)config._188_4_) { - freeSize = config._188_4_ + 1; - freeBlock = (void *)config._168_4_; + if (0xf < (*(undefined4 *)((char *)&(GHIDRA_UINT(config)) + 0xbc))) { + freeSize = (*(undefined4 *)((char *)&(config) + 0xbc)) + 1; + freeBlock = (*(undefined4 *)((char *)&((void *)config) + 0xa8)); if (0xfff < freeSize) { - freeBlock = *(void **)(config._168_4_ + -4); - freeSize = config._188_4_ + 0x24; - if (0x1f < (config._168_4_ - (int)freeBlock) - 4U) goto LAB_009343c2; + freeBlock = *(void **)((*(undefined4 *)((char *)&(config) + 0xa8)) + -4); + freeSize = (*(undefined4 *)((char *)&(config) + 0xbc)) + 0x24; + if (0x1f < ((*(undefined4 *)((char *)&(config) + 0xa8)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); } - if (0xf < (uint)config._164_4_) { - freeSize = config._164_4_ + 1; - freeBlock = (void *)config._144_4_; + if (0xf < (*(undefined4 *)((char *)&(GHIDRA_UINT(config)) + 0xa4))) { + freeSize = (*(undefined4 *)((char *)&(config) + 0xa4)) + 1; + freeBlock = (*(undefined4 *)((char *)&((void *)config) + 0x90)); if (0xfff < freeSize) { - freeBlock = *(void **)(config._144_4_ + -4); - freeSize = config._164_4_ + 0x24; - if (0x1f < (config._144_4_ - (int)freeBlock) - 4U) goto LAB_009343c2; + freeBlock = *(void **)((*(undefined4 *)((char *)&(config) + 0x90)) + -4); + freeSize = (*(undefined4 *)((char *)&(config) + 0xa4)) + 0x24; + if (0x1f < ((*(undefined4 *)((char *)&(config) + 0x90)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); } - if (0xf < (uint)config._140_4_) { - freeSize = config._140_4_ + 1; - freeBlock = (void *)config._120_4_; + if (0xf < (*(undefined4 *)((char *)&(GHIDRA_UINT(config)) + 0x8c))) { + freeSize = (*(undefined4 *)((char *)&(config) + 0x8c)) + 1; + freeBlock = (*(undefined4 *)((char *)&((void *)config) + 0x78)); if (0xfff < freeSize) { - freeBlock = *(void **)(config._120_4_ + -4); - freeSize = config._140_4_ + 0x24; - if (0x1f < (config._120_4_ - (int)freeBlock) - 4U) goto LAB_009343c2; + freeBlock = *(void **)((*(undefined4 *)((char *)&(config) + 0x78)) + -4); + freeSize = (*(undefined4 *)((char *)&(config) + 0x8c)) + 0x24; + if (0x1f < ((*(undefined4 *)((char *)&(config) + 0x78)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); } - if (0xf < (uint)config._96_4_) { - freeSize = config._96_4_ + 1; - freeBlock = (void *)config._76_4_; + if (0xf < (*(undefined4 *)((char *)&(GHIDRA_UINT(config)) + 0x60))) { + freeSize = (*(undefined4 *)((char *)&(config) + 0x60)) + 1; + freeBlock = (*(undefined4 *)((char *)&((void *)config) + 0x4c)); if (0xfff < freeSize) { - freeBlock = *(void **)(config._76_4_ + -4); - freeSize = config._96_4_ + 0x24; - if (0x1f < (config._76_4_ - (int)freeBlock) - 4U) goto LAB_009343c2; + freeBlock = *(void **)((*(undefined4 *)((char *)&(config) + 0x4c)) + -4); + freeSize = (*(undefined4 *)((char *)&(config) + 0x60)) + 0x24; + if (0x1f < ((*(undefined4 *)((char *)&(config) + 0x4c)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); } - if (0xf < (uint)config._72_4_) { - freeSize = config._72_4_ + 1; - freeBlock = (void *)config._52_4_; + if (0xf < (*(undefined4 *)((char *)&(GHIDRA_UINT(config)) + 0x48))) { + freeSize = (*(undefined4 *)((char *)&(config) + 0x48)) + 1; + freeBlock = (*(undefined4 *)((char *)&((void *)config) + 0x34)); if (0xfff < freeSize) { - freeBlock = *(void **)(config._52_4_ + -4); - freeSize = config._72_4_ + 0x24; - if (0x1f < (config._52_4_ - (int)freeBlock) - 4U) goto LAB_009343c2; + freeBlock = *(void **)((*(undefined4 *)((char *)&(config) + 0x34)) + -4); + freeSize = (*(undefined4 *)((char *)&(config) + 0x48)) + 0x24; + if (0x1f < ((*(undefined4 *)((char *)&(config) + 0x34)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); } - if (0xf < (uint)config._48_4_) { - freeSize = config._48_4_ + 1; - freeBlock = (void *)config._28_4_; + if (0xf < (*(undefined4 *)((char *)&(GHIDRA_UINT(config)) + 0x30))) { + freeSize = (*(undefined4 *)((char *)&(config) + 0x30)) + 1; + freeBlock = (*(undefined4 *)((char *)&((void *)config) + 0x1c)); if (0xfff < freeSize) { - freeBlock = *(void **)(config._28_4_ + -4); - freeSize = config._48_4_ + 0x24; - if (0x1f < (config._28_4_ - (int)freeBlock) - 4U) goto LAB_009343c2; + freeBlock = *(void **)((*(undefined4 *)((char *)&(config) + 0x1c)) + -4); + freeSize = (*(undefined4 *)((char *)&(config) + 0x30)) + 0x24; + if (0x1f < ((*(undefined4 *)((char *)&(config) + 0x1c)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); } - if (0xf < (uint)config._24_4_) { - freeSize = config._24_4_ + 1; - freeBlock = (void *)config._4_4_; + if (0xf < (*(undefined4 *)((char *)&(GHIDRA_UINT(config)) + 0x18))) { + freeSize = (*(undefined4 *)((char *)&(config) + 0x18)) + 1; + freeBlock = (*(undefined4 *)((char *)&((void *)config) + 0x4)); if (0xfff < freeSize) { - freeBlock = *(void **)(config._4_4_ + -4); - freeSize = config._24_4_ + 0x24; - if (0x1f < (config._4_4_ - (int)freeBlock) - 4U) goto LAB_009343c2; + freeBlock = *(void **)((*(undefined4 *)((char *)&(config) + 0x4)) + -4); + freeSize = (*(undefined4 *)((char *)&(config) + 0x18)) + 0x24; + if (0x1f < ((*(undefined4 *)((char *)&(config) + 0x4)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); } @@ -1938,36 +1938,36 @@ LAB_00933ff9: } config.backdropId = iVar3; ((BackdropConfig *)(&defaultConfig))->BackdropConfig::~BackdropConfig(); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < effectsGfxRoot._capacity) { freeSize = effectsGfxRoot._capacity + 1; - freeBlock = (void *)effectsGfxRoot._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)effectsGfxRoot._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(effectsGfxRoot._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(effectsGfxRoot._buf) + 0x0)) + -4); freeSize = effectsGfxRoot._capacity + 0x24; - if (0x1f < (effectsGfxRoot._buf._0_4_ - (int)freeBlock) - 4U) goto LAB_009343c2; + if (0x1f < ((*(undefined4 *)((char *)&(effectsGfxRoot._buf) + 0x0)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); } - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (0xf < gridGfxRoot._capacity) { freeSize = gridGfxRoot._capacity + 1; - freeBlock = (void *)gridGfxRoot._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)gridGfxRoot._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(gridGfxRoot._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(gridGfxRoot._buf) + 0x0)) + -4); freeSize = gridGfxRoot._capacity + 0x24; - if (0x1f < (gridGfxRoot._buf._0_4_ - (int)freeBlock) - 4U) goto LAB_009343c2; + if (0x1f < ((*(undefined4 *)((char *)&(gridGfxRoot._buf) + 0x0)) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_009343c2; } operator_delete(freeBlock,freeSize); } - local_14._0_1_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; if (0xf < gfxRoot._capacity) { freeSize = gfxRoot._capacity + 1; - freeBlock = (void *)gfxRoot._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)gfxRoot._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(gfxRoot._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(gfxRoot._buf) + 0x0)) + -4); freeSize = gfxRoot._capacity + 0x24; - if (0x1f < (gfxRoot._buf._0_4_ - (int)freeBlock) - 4U) { + if (0x1f < ((*(undefined4 *)((char *)&(gfxRoot._buf) + 0x0)) - GHIDRA_INT(freeBlock)) - 4U) { LAB_009343c2: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -2044,7 +2044,7 @@ void Backdrop::PreRenderControls() local_14 = (void *)0xffffffff; puStack_18 = &LAB_00b0b138; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(displayName + 0xb); + local_24 = __security_cookie ^ GHIDRA_UINT((displayName + 0xb)); ExceptionList = &local_1c; sprite = (ANM2 *)(this + 0x1414); playerType = g_manager->_startPlayerType; @@ -2066,8 +2066,8 @@ void Backdrop::PreRenderControls() } else { pvVar6 = (g_manager->_entityConfig)._players._begin; - if (((playerType < ((int)(g_manager->_entityConfig)._players._end - (int)pvVar6) / 0x148) && - (local_6c = (EntityConfig_Player *)(playerType * 0x148 + (int)pvVar6), + if (((playerType < (GHIDRA_INT((g_manager->_entityConfig)._players._end) - GHIDRA_INT(pvVar6)) / 0x148) && + (local_6c = (EntityConfig_Player *)(playerType * 0x148 + GHIDRA_INT(pvVar6)), local_6c != (EntityConfig_Player *)0x0)) && (sprite = local_6c->_moddedControlsANM2, sprite != (ANM2 *)0x0)) { anim = EntityConfig_Player::GetDisplayName @@ -2087,9 +2087,9 @@ void Backdrop::PreRenderControls() uVar7 = displayNameCapacity + 1; pvVar6 = displayName[0]; if (0xfff < uVar7) { - pvVar6 = *(void **)((int)displayName[0] + -4); + pvVar6 = *(void **)(GHIDRA_INT(displayName[0]) + -4); uVar7 = displayNameCapacity + 0x24; - if (0x1f < (uint)((int)displayName[0] + (-4 - (int)pvVar6))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(displayName[0]) + (-4 - GHIDRA_INT(pvVar6))))) { LAB_009348c4: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -2099,7 +2099,7 @@ LAB_009348c4: } displayNameSize = 0; displayNameCapacity = 0xf; - displayName[0] = (void *)((uint)displayName[0] & 0xffffff00); + displayName[0] = (void *)(GHIDRA_UINT(displayName[0]) & 0xffffff00); sprite = local_6c->_moddedControlsANM2; if (sprite != (ANM2 *)0x0) { controlsSprite = sprite; @@ -2166,7 +2166,7 @@ LAB_00934952: } game = g_game; piVar5 = (g_game->_playerManager)._playerList._begin; - if ((int)(g_game->_playerManager)._playerList._end - (int)piVar5 >> 2 == 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT(piVar5) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); piVar5 = (game->_playerManager)._playerList._begin; } @@ -2237,7 +2237,7 @@ LAB_00934be2: local_6c = (EntityConfig_Player *)&DAT_00000008; if (playerType == 0x13) { if ((g_manager->_optionsConfig)._jacobEsauControls == 1) { - iconCount = (int)&DAT_00000009; + iconCount = GHIDRA_INT(&DAT_00000009); } local_6c = (EntityConfig_Player *)iconCount; } @@ -2268,17 +2268,17 @@ LAB_00934be2: if (((playerType == 0x13) && ((g_manager->_optionsConfig)._jacobEsauControls == 1)) && (uVar7 == 10)) { cursorX = cursorX - 4.0; - render_control_icon(this,0xb,(byte)(framesEnd - (int)framesBegin >> 2),controllerIndex, + render_control_icon(this,0xb,(byte)(framesEnd - GHIDRA_INT(framesBegin) >> 2),controllerIndex, &local_50,&cursorX,&local_78,&offsetsBegin); uVar7 = 9; - glyphCount = framesEnd - (int)local_78; + glyphCount = framesEnd - GHIDRA_INT(local_78); } else { - glyphCount = framesEnd - (int)framesBegin; + glyphCount = framesEnd - GHIDRA_INT(framesBegin); } render_control_icon(this,uVar7,(byte)(glyphCount >> 2),controllerIndex,&local_50,&cursorX, &local_78,&offsetsBegin); - local_68 = (EntityConfig_Player *)((int)&local_68->_id + 1); + local_68 = (EntityConfig_Player *)(GHIDRA_INT(&local_68->_id) + 1); local_5c = local_5c + 1; framesBegin = local_78; } while (local_68 < local_6c); @@ -2286,7 +2286,7 @@ LAB_00934be2: local_50 = 0.0; local_5c = offsetsBegin; local_78 = framesBegin; - if (framesEnd - (int)framesBegin >> 2 != 0) { + if (framesEnd - GHIDRA_INT(framesBegin) >> 2 != 0) { do { local_68 = (EntityConfig_Player *)(controlsPos.y + nullFrame[1]); if (jitterSeed == (Backdrop)0x0) { @@ -2295,16 +2295,16 @@ LAB_00934be2: (*pcVar1)(); return; } - uVar7 = (uint)jitterSeed >> 5 ^ (uint)jitterSeed; + uVar7 = GHIDRA_UINT(jitterSeed) >> 5 ^ GHIDRA_UINT(jitterSeed); uVar7 = uVar7 << 0xf ^ uVar7; jitterSeed = (Backdrop)(uVar7 >> 0x11 ^ uVar7); - glyphPos.y = (float)local_68 + (float)(int)((uint)jitterSeed % 3 - 1); - glyphPos.x = cursorX + *(float *)((char *)local_5c + (int)local_50 * 4) + + glyphPos.y = (float)local_68 + (float)GHIDRA_INT((GHIDRA_UINT(jitterSeed) % 3 - 1)); + glyphPos.x = cursorX + *(float *)((char *)local_5c + GHIDRA_INT(local_50) * 4) + controlsPos.x + *nullFrame; if (this[0x1466] != (Backdrop)0x0) { AnimationState::SetFrameFloat ((AnimationState *)(this + 0x1465), - (float)*(int *)((char *)framesBegin + (int)local_50 * 4)); + (float)*(int *)((char *)framesBegin + GHIDRA_INT(local_50) * 4)); } if ((*(undefined1 *)((char *)&(this[0x149b]) + 0x1)) != '\0') { if (*(char *)(this + 0x1475) == '\0') { @@ -2319,17 +2319,17 @@ LAB_00934be2: } AnimationState::Render(lastLayer,&glyphPos,&g_vectorZero,&g_vectorZero); } - local_50 = (float)((int)local_50 + 1); - } while ((uint)local_50 < (uint)(glyphCount - (int)framesBegin >> 2)); + local_50 = (float)(GHIDRA_INT(local_50) + 1); + } while (GHIDRA_UINT(local_50) < GHIDRA_UINT((glyphCount - GHIDRA_INT(framesBegin) >> 2))); } - local_14 = (void *)CONCAT31(local_14._1_3_,4); + local_14 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),4); if (local_5c != (void *)0x0) { - uVar7 = (offsetsCapacityEnd - (int)local_5c >> 2) * 4; + uVar7 = (offsetsCapacityEnd - GHIDRA_INT(local_5c) >> 2) * 4; ptr = local_5c; if (0xfff < uVar7) { ptr = *(uint **)((char *)local_5c + -4); uVar7 = uVar7 + 0x23; - if (0x1f < (uint)((int)local_5c + (-4 - (int)ptr))) goto LAB_009348c4; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_5c) + (-4 - GHIDRA_INT(ptr))))) goto LAB_009348c4; } operator_delete(ptr,uVar7); offsetsBegin = (void *)0x0; @@ -2338,12 +2338,12 @@ LAB_00934be2: } local_14 = (void *)0xffffffff; if (framesBegin != (void *)0x0) { - uVar7 = framesCapacityEnd - (int)framesBegin & 0xfffffffc; + uVar7 = framesCapacityEnd - GHIDRA_INT(framesBegin) & 0xfffffffc; pvVar6 = framesBegin; if (0xfff < uVar7) { pvVar6 = *(void **)((char *)framesBegin + -4); uVar7 = uVar7 + 0x23; - if (0x1f < (uint)((int)framesBegin + (-4 - (int)pvVar6))) goto LAB_009348c4; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(framesBegin) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_009348c4; } operator_delete(pvVar6,uVar7); local_78 = (void *)0x0; @@ -2374,11 +2374,11 @@ uint Backdrop::get_random_floor_variant() RNG rng; undefined4 local_8; - local_8 = __security_cookie ^ (int)register0x00000010 - 4U; + local_8 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; BVar1 = this[0x54]; if (BVar1 == (Backdrop)0x2d) { if ((*(uint *)(*(int *)((char *)g_game->_room + 4) + 0x44) & 0x1000) != 0) { - uVar3 = ((RNG *)((RNG *)(this + 0x13ca)))->RNG::RandomInt((int)this[0xe53] - 1); + uVar3 = ((RNG *)((RNG *)(this + 0x13ca)))->RNG::RandomInt(GHIDRA_INT(this[0xe53]) - 1); return uVar3; } } @@ -2387,19 +2387,19 @@ uint Backdrop::get_random_floor_variant() if ((*(uint *)(*(int *)((char *)g_game->_room + 4) + 0x44) & 0x1000) != 0) { return 1; } - max = this[(int)BVar1 * 0x4f + 0x70]; + max = this[GHIDRA_INT(BVar1) * 0x4f + 0x70]; goto LAB_00935378; } if ((((BVar1 == (Backdrop)0x21) || (BVar1 == (Backdrop)0x28)) && (iVar2 = *(int *)((char *)g_game->_room + 4), iVar2 != 0)) && ((iVar2 = *(int *)(iVar2 + 0x10), iVar2 != 0 && (*(int *)(iVar2 + 0x48) != 1)))) { - uVar3 = ((RNG *)((RNG *)(this + 0x13ca)))->RNG::RandomInt((int)this[(int)BVar1 * 0x4f + 0x70] - 1); + uVar3 = ((RNG *)((RNG *)(this + 0x13ca)))->RNG::RandomInt(GHIDRA_INT(this[GHIDRA_INT(BVar1) * 0x4f + 0x70]) - 1); return uVar3; } } - max = this[(int)BVar1 * 0x4f + 0x70]; + max = this[GHIDRA_INT(BVar1) * 0x4f + 0x70]; if (BVar1 != (Backdrop)0x2f) { - uVar3 = ((RNG *)((RNG *)(this + 0x13ca)))->RNG::RandomInt((uint)max); + uVar3 = ((RNG *)((RNG *)(this + 0x13ca)))->RNG::RandomInt(GHIDRA_UINT(max)); return uVar3; } LAB_00935378: @@ -2407,7 +2407,7 @@ LAB_00935378: rng._shift3 = 0x1b; rng._shift1 = 4; rng._shift2 = 3; - uVar3 = ((RNG *)(&rng))->RNG::RandomInt((uint)max); + uVar3 = ((RNG *)(&rng))->RNG::RandomInt(GHIDRA_UINT(max)); return uVar3; } @@ -2475,7 +2475,7 @@ void Backdrop::render_ashpit_ash() targetRefCount_00 = in_ECX + 9; pvVar4 = (void *)0x935602; ((KAGE::SmartPointer *)(auStackY_ec + 0x90))->KAGE::SmartPointer::operator_assign(targetRefCount_00); - local_8 = CONCAT31(local_8._1_3_,0xb); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xb); ((shared_ptr *)(auStackY_ec + 0x88))->shared_ptr::assign(in_ECX); local_8 = 0xffffffff; render_floor_to_target @@ -2489,16 +2489,16 @@ void Backdrop::render_ashpit_ash() local_8 = 0; piVar5 = (int *)0x935430; ((KAGE::SmartPointer *)(&floorImage))->KAGE::SmartPointer::SmartPointer((void *)0x0); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; roomConfigData = *(int *)((char *)g_game->_room + 4); roomConfigData = *(int *)(roomConfigData + 0x10); roomShape = *(int *)(roomConfigData + 0x48); if (roomShape - 9U < 4) { loadedImage = Manager::LoadImage(&lFloorImage,(byte *)"gfx/backdrop/04x_ashpit_ash_Lfloor.png"); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; piVar5 = (int *)0x93546b; ((KAGE::SmartPointer *)(&floorImage))->KAGE::SmartPointer::operator_assign(loadedImage); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; if (local_1c == (int *)0x0) goto LAB_009354f2; loadedImage = (int *)0x93547d; isLastRef = (**(code **)(*local_1c + 0xc))(); @@ -2510,10 +2510,10 @@ void Backdrop::render_ashpit_ash() ((roomShape != 2 && (((roomShape != 3 && (roomShape != 5)) && (roomShape != 7)))))) goto LAB_009354f2; loadedImage = Manager::LoadImage(&nFloorImage,(byte *)"gfx/backdrop/04x_ashpit_ash_Nfloor.png"); - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; piVar5 = (int *)0x9354c6; ((KAGE::SmartPointer *)(&floorImage))->KAGE::SmartPointer::operator_assign(loadedImage); - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; if (nFloorImageRefCount == (int *)0x0) goto LAB_009354f2; loadedImage = (int *)0x9354d8; isLastRef = (**(code **)(*nFloorImageRefCount + 0xc))(); @@ -2523,25 +2523,25 @@ void Backdrop::render_ashpit_ash() piVar5 = (int *)0x9354eb; (*g_imageReleaseFn)(); LAB_009354f2: - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; local_14 = auStack_4a + -10; floorImageRefCount_00 = &floorImage; floorImage_00 = (int *)0x935503; ((KAGE::SmartPointer *)(auStack_4a + -10))->KAGE::SmartPointer::operator_assign(floorImageRefCount_00); local_18 = auStackY_ec + 0x90; - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; targetRefCount = &ashImage; pvVar4 = (void *)0x935518; ((KAGE::SmartPointer *)(auStackY_ec + 0x90))->KAGE::SmartPointer::operator_assign(targetRefCount); - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; ((shared_ptr *)(auStackY_ec + 0x88))->shared_ptr::assign(in_ECX); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; render_floor_to_target (in_ECX,uVar3,(RNG *)(in_ECX + 0x13ca),pvVar4,targetRefCount,floorImage_00, floorImageRefCount_00,piVar5,loadedImage); ((KAGE::SmartPointer *)(&ashImage))->KAGE::SmartPointer::reset((void *)0x0); ((KAGE::SmartPointer *)(&floorImage))->KAGE::SmartPointer::reset((void *)0x0); - local_8 = CONCAT31(local_8._1_3_,8); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),8); if (((floorImageRefCount != (int *)0x0) && (isLastRef = (**(code **)(*floorImageRefCount + 0xc))(), isLastRef != '\0')) && (g_imageReleaseFn != (void *)0x0)) { @@ -2721,14 +2721,14 @@ void Backdrop::pre_render_walls() local_14 = 0xffffffff; puStack_18 = &LAB_00b0b280; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(local_34 + 0x24); - if (in_ECX[(int)in_ECX[0x54] * 0x4f + 0x6e] == (Backdrop)0x0) { + local_24 = __security_cookie ^ GHIDRA_UINT((local_34 + 0x24)); + if (in_ECX[GHIDRA_INT(in_ECX[0x54]) * 0x4f + 0x6e] == (Backdrop)0x0) { return; } ExceptionList = &local_1c; local_1a4 = in_ECX; BackdropConfig::copy_constructor - (&config,(BackdropConfig *)(in_ECX + (int)in_ECX[0x54] * 0x4f + 0x55)); + (&config,(BackdropConfig *)(in_ECX + GHIDRA_INT(in_ECX[0x54]) * 0x4f + 0x55)); local_14 = 0; iVar3 = *(int *)((char *)g_game->_room + 4); if ((iVar3 == 0) || (iVar3 = *(int *)(iVar3 + 0x10), iVar3 == 0)) { @@ -2776,30 +2776,30 @@ void Backdrop::pre_render_walls() case 5: local_1cc = 1.4013e-45; } - pBVar4 = in_ECX + (int)room * 0x4f + 0x6e; + pBVar4 = in_ECX + GHIDRA_INT(room) * 0x4f + 0x6e; LAB_009375b6: room = *pBVar4; rng = (RNG *)(in_ECX + 0x13ca); LAB_0093767c: - local_1ac = (float)((RNG *)(rng))->RNG::RandomInt((uint)room); + local_1ac = (float)((RNG *)(rng))->RNG::RandomInt(GHIDRA_UINT(room)); } else { LAB_009375f3: - local_1a8 = (Backdrop)(in_ECX + (int)room * 0x4f); + local_1a8 = (Backdrop)(in_ECX + GHIDRA_INT(room) * 0x4f); if ((room != (Backdrop)0x2e) && (room != (Backdrop)0x3b)) { pBVar4 = (Backdrop *)(((Room *)local_1a8)->_gridEntities + 0x65); if (room != (Backdrop)0x2f) goto LAB_009375b6; - local_34._0_4_ = in_ECX[0x13ce]; + (*(undefined4 *)((char *)&(local_34) + 0x0)) = in_ECX[0x13ce]; room = *pBVar4; LAB_0093766c: local_28 = 3.78351e-44; rng = (RNG *)local_34; - local_34._4_4_ = 4; - local_34._8_4_ = 3; + (*(undefined4 *)((char *)&(local_34) + 0x4)) = 4; + (*(undefined4 *)((char *)&(local_34) + 0x8)) = 3; goto LAB_0093767c; } if ((*(uint *)(*(int *)((char *)g_game->_room + 4) + 0x44) & 0x1000) == 0) { - local_34._0_4_ = in_ECX[0x13ce]; + (*(undefined4 *)((char *)&(local_34) + 0x0)) = in_ECX[0x13ce]; room = *(Backdrop *)(((Room *)local_1a8)->_gridEntities + 0x65); goto LAB_0093766c; } @@ -2829,11 +2829,11 @@ LAB_0093766c: return; } } - uVar1 = (uint)room >> (SUB41(in_ECX[0x13cb],0) & 0x1f) ^ (uint)room; + uVar1 = GHIDRA_UINT(room) >> (SUB41(in_ECX[0x13cb],0) & 0x1f) ^ GHIDRA_UINT(room); uVar1 = uVar1 << (SUB41(in_ECX[0x13cc],0) & 0x1f) ^ uVar1; room = (Backdrop)(uVar1 >> (SUB41(in_ECX[0x13cd],0) & 0x1f) ^ uVar1); in_ECX[0x13ca] = room; - if (((uint)room & 1) != 0) { + if ((GHIDRA_UINT(room) & 1) != 0) { iVar8 = *(int *)((char *)g_game->_room + 0xc); local_25c.x = (float)(iVar3 % iVar8) * 40.0 + 40.0; local_25c.y = (float)(iVar3 / iVar8) * 40.0 + 120.0; @@ -2870,15 +2870,15 @@ LAB_0093766c: return; } } - uVar1 = (uint)room >> (SUB41(in_ECX[0x13cb],0) & 0x1f) ^ (uint)room; + uVar1 = GHIDRA_UINT(room) >> (SUB41(in_ECX[0x13cb],0) & 0x1f) ^ GHIDRA_UINT(room); uVar1 = uVar1 << (SUB41(in_ECX[0x13cc],0) & 0x1f) ^ uVar1; room = (Backdrop)(uVar1 >> (SUB41(in_ECX[0x13cd],0) & 0x1f) ^ uVar1); in_ECX[0x13ca] = room; - fVar12 = (float)((double)(int)room + __uint_to_double_fixup[-((int)room >> 0x1f)]) * + fVar12 = (float)((double)GHIDRA_INT(room) + __uint_to_double_fixup[-(GHIDRA_INT(room) >> 0x1f)]) * 2.3283062e-10 * 2.5 + 0.5; fVar10 = fVar12 * g_vectorOne.x; - local_1b0[0x3a] = (int)(fVar12 * g_vectorOne.y); - local_1b0[0x39] = (int)fVar10; + local_1b0[0x3a] = GHIDRA_INT((fVar12 * g_vectorOne.y)); + local_1b0[0x39] = GHIDRA_INT(fVar10); (**(code **)(*local_1b0 + 0xc))(); } } @@ -2910,24 +2910,24 @@ LAB_00937981: Room::GetCenterPos(&local_25c); room = local_1a8; local_1b8 = 0.0; - if (0 < (int)local_1b4) { + if (0 < GHIDRA_INT(local_1b4)) { do { - fVar10 = (float)((int)local_1b8 % *(int *)((char *)room + 0xc)) * 40.0 + 40.0; - local_28 = (float)((int)local_1b8 / *(int *)((char *)room + 0xc)) * 40.0 + 120.0; - local_34._8_4_ = fVar10; + fVar10 = (float)(GHIDRA_INT(local_1b8) % *(int *)((char *)room + 0xc)) * 40.0 + 40.0; + local_28 = (float)(GHIDRA_INT(local_1b8) / *(int *)((char *)room + 0xc)) * 40.0 + 120.0; + (*(undefined4 *)((char *)&(local_34) + 0x8)) = fVar10; local_1b0 = (int *)(local_28 - local_25c.y); local_1c8 = (fVar10 - local_25c.x) * 0.6; iVar3 = ((Room *)((Room *)room))->Room::GetRoomShape(); if ((iVar3 == 2) || (((*(void **)((char *)room + 4) != (void *)0x0 && - (iVar3 = *(int *)((int)*(void **)((char *)room + 4) + 0x10), iVar3 != 0)) && + (iVar3 = *(int *)(GHIDRA_INT(*(void **)((char *)room + 4)) + 0x10), iVar3 != 0)) && (*(int *)(iVar3 + 0x48) == 7)))) { local_1b0 = (int *)((float)local_1b0 + (float)local_1b0); } iVar3 = ((Room *)((Room *)room))->Room::GetRoomShape(); if ((iVar3 == 3) || (((*(void **)((char *)room + 4) != (void *)0x0 && - (iVar3 = *(int *)((int)*(void **)((char *)room + 4) + 0x10), iVar3 != 0)) && + (iVar3 = *(int *)(GHIDRA_INT(*(void **)((char *)room + 4)) + 0x10), iVar3 != 0)) && (*(int *)(iVar3 + 0x48) == 5)))) { local_1c8 = local_1c8 + local_1c8; } @@ -2941,11 +2941,11 @@ LAB_00937981: return; } } - uVar1 = (uint)BVar2 >> (SUB41(in_ECX[0x13cb],0) & 0x1f) ^ (uint)BVar2; + uVar1 = GHIDRA_UINT(BVar2) >> (SUB41(in_ECX[0x13cb],0) & 0x1f) ^ GHIDRA_UINT(BVar2); uVar1 = uVar1 << (SUB41(in_ECX[0x13cc],0) & 0x1f) ^ uVar1; BVar2 = (Backdrop)(uVar1 >> (SUB41(in_ECX[0x13cd],0) & 0x1f) ^ uVar1); in_ECX[0x13ca] = BVar2; - if ((((uint)BVar2 & 1) != 0) && + if (((GHIDRA_UINT(BVar2) & 1) != 0) && (fVar10 = sqrtf((float)local_1b0 * (float)local_1b0 + local_1c8 * local_1c8), fVar10 < 100.0)) { uVar1 = Random(); @@ -2962,15 +2962,15 @@ LAB_00937981: return; } } - uVar1 = (uint)BVar2 >> (SUB41(in_ECX[0x13cb],0) & 0x1f) ^ (uint)BVar2; + uVar1 = GHIDRA_UINT(BVar2) >> (SUB41(in_ECX[0x13cb],0) & 0x1f) ^ GHIDRA_UINT(BVar2); uVar1 = uVar1 << (SUB41(in_ECX[0x13cc],0) & 0x1f) ^ uVar1; BVar2 = (Backdrop)(uVar1 >> (SUB41(in_ECX[0x13cd],0) & 0x1f) ^ uVar1); in_ECX[0x13ca] = BVar2; - pvVar11 = (void *)((float)((double)(int)BVar2 + - __uint_to_double_fixup[-((int)BVar2 >> 0x1f)]) * 2.3283062e-10 * + pvVar11 = (void *)((float)((double)GHIDRA_INT(BVar2) + + __uint_to_double_fixup[-(GHIDRA_INT(BVar2) >> 0x1f)]) * 2.3283062e-10 * 2.5 + 0.5); - ((Vector *)((void **)((int)local_1a8 + 0x24) + 0x30))->x = (float)pvVar11; - ((void **)((int)local_1a8 + 0x24))[0x31] = pvVar11; + ((Vector *)((void **)(GHIDRA_INT(local_1a8) + 0x24) + 0x30))->x = (float)pvVar11; + ((void **)(GHIDRA_INT(local_1a8) + 0x24))[0x31] = pvVar11; if (in_ECX[0x54] == (Backdrop)0x27) { local_40 = 0.0; local_50 = 0.0; @@ -2986,8 +2986,8 @@ LAB_00937981: } (**(code **)(*(int *)local_1a8 + 0xc))(); } - local_1b8 = (float)((int)local_1b8 + 1); - } while ((int)local_1b8 < (int)local_1b4); + local_1b8 = (float)(GHIDRA_INT(local_1b8) + 1); + } while (GHIDRA_INT(local_1b8) < GHIDRA_INT(local_1b4)); } LAB_00937cb8: gridWidth = *(int *)((char *)g_game->_room + 0xc); @@ -2998,9 +2998,9 @@ LAB_00937cb8: local_298 = 520.0; local_2a8 = 520.0; local_290 = 1; - local_2ac = (float)((int)local_1ac * 2) * 26.0; + local_2ac = (float)(GHIDRA_INT(local_1ac) * 2) * 26.0; segmentIndex = 0; - local_29c = (float)((int)local_1ac * 2 + 2) * 26.0; + local_29c = (float)(GHIDRA_INT(local_1ac) * 2 + 2) * 26.0; local_2a4 = local_2ac; local_294 = local_29c; wallRng = rng; @@ -3016,11 +3016,11 @@ LAB_00937cb8: return; } } - uVar1 = (uint)room >> ((byte)rng->_shift1 & 0x1f) ^ (uint)room; + uVar1 = GHIDRA_UINT(room) >> ((byte)rng->_shift1 & 0x1f) ^ GHIDRA_UINT(room); uVar1 = uVar1 << (SUB41(in_ECX[0x13cc],0) & 0x1f) ^ uVar1; room = (Backdrop)(uVar1 >> (SUB41(in_ECX[0x13cd],0) & 0x1f) ^ uVar1); in_ECX[0x13ca] = room; - if ((uint)room % (uint)local_1cc == 0) { + if (GHIDRA_UINT(room) % GHIDRA_UINT(local_1cc) == 0) { local_1b8 = (float)config.wallVariants; if (room == (Backdrop)0x0) { local_1a8 = room; @@ -3032,30 +3032,30 @@ LAB_00937cb8: return; } } - uVar1 = (uint)room >> (SUB41(in_ECX[0x13cb],0) & 0x1f) ^ (uint)room; + uVar1 = GHIDRA_UINT(room) >> (SUB41(in_ECX[0x13cb],0) & 0x1f) ^ GHIDRA_UINT(room); uVar1 = uVar1 << (SUB41(in_ECX[0x13cc],0) & 0x1f) ^ uVar1; room = (Backdrop)(uVar1 >> (SUB41(in_ECX[0x13cd],0) & 0x1f) ^ uVar1); in_ECX[0x13ca] = room; if (local_1b8 == 0.0) { - local_1a8 = (Backdrop)((int)local_1ac * config.wallVariants); + local_1a8 = (Backdrop)(GHIDRA_INT(local_1ac) * config.wallVariants); } else { - local_1a8 = (Backdrop)((int)local_1ac * config.wallVariants + (uint)room % (uint)local_1b8); + local_1a8 = (Backdrop)(GHIDRA_INT(local_1ac) * config.wallVariants + GHIDRA_UINT(room) % GHIDRA_UINT(local_1b8)); } } else { - local_1a8 = (Backdrop)((int)local_1ac * config.wallVariants); + local_1a8 = (Backdrop)(GHIDRA_INT(local_1ac) * config.wallVariants); } fVar12 = 26.0; - local_260 = CONCAT31(local_260._1_3_,1); + local_260 = CONCAT31((*(undefined1 *)((char *)&(local_260) + 0x1)),1); local_240 = 0.0; srcRectA = 0.0; local_244 = (int *)0x0; - iVar3 = ((uint)local_1a8 >> 1) * 6; + iVar3 = (GHIDRA_UINT(local_1a8) >> 1) * 6; local_24c = (int *)0x0; local_238 = 1.0; local_248 = 1.0; - iVar8 = ((uint)local_1a8 & 1) * 9; + iVar8 = (GHIDRA_UINT(local_1a8) & 1) * 9; local_234 = (int *)0x3f800000; local_23c = (int *)0x3f800000; local_230 = local_230 & 0xffffff00; @@ -3235,7 +3235,7 @@ LAB_00938a65: else { isFlipX = 0; } - spawn_wall_details(in_ECX,0,0,(int)local_1ac,(int)local_1a8,drawQuad,isFlipX,isPreAscentMomRoom) + spawn_wall_details(in_ECX,0,0,GHIDRA_INT(local_1ac),GHIDRA_INT(local_1a8),drawQuad,isFlipX,isPreAscentMomRoom) ; segmentIndex = segmentIndex + 1; if (3 < segmentIndex) break; @@ -3250,14 +3250,14 @@ LAB_00938a65: if (iVar3 == 9) { local_1b0 = (int *)0x7; LAB_00938ba7: - uVar1 = ((RNG *)(wallRng))->RNG::RandomInt((uint)local_1cc); + uVar1 = ((RNG *)(wallRng))->RNG::RandomInt(GHIDRA_UINT(local_1cc)); if (uVar1 == 0) { local_1c8 = (float)((RNG *)(rng))->RNG::RandomInt(config.wallVariants); } else { local_1c8 = 0.0; } - uVar1 = ((RNG *)(rng))->RNG::RandomInt((uint)fVar10); + uVar1 = ((RNG *)(rng))->RNG::RandomInt(GHIDRA_UINT(fVar10)); if (uVar1 == 0) { local_1b4 = (float)((RNG *)(rng))->RNG::RandomInt(config.wallVariants); } @@ -3265,11 +3265,11 @@ LAB_00938ba7: local_1b4 = 0.0; } fVar10 = 26.0; - uVar1 = (int)local_1c8 + (int)local_1ac * config.wallVariants; + uVar1 = GHIDRA_INT(local_1c8) + GHIDRA_INT(local_1ac) * config.wallVariants; uStack_200 = 1; iVar3 = segmentIndex + (uVar1 & 1) * 9; secondVariantRow = (uVar1 >> 1) * 6; - uVar1 = (int)local_1b4 + (int)local_1ac * config.wallVariants; + uVar1 = GHIDRA_INT(local_1b4) + GHIDRA_INT(local_1ac) * config.wallVariants; iVar8 = segmentIndex + (uVar1 & 1) * 9; fStack_224 = (float)((uVar1 >> 1) * 6); srcRectC = (float)(iVar3 + 2) * 26.0; @@ -3282,16 +3282,16 @@ LAB_00938ba7: fStack_204 = fStack_20c; ((KColor *)(&local_1e4))->KColor::SetFromARGB(0xffffffff); iVar3 = segmentIndex + 2; - local_1a8 = (Backdrop)((float)(int)(segmentIndex + 1) * fVar10); - local_1b8 = (float)(int)segmentIndex * fVar10; + local_1a8 = (Backdrop)((float)GHIDRA_INT((segmentIndex + 1)) * fVar10); + local_1b8 = (float)GHIDRA_INT(segmentIndex) * fVar10; render_quad_set_uniform_color (afStack_498,local_1b8 + (float)local_1a4[0x13c6], - (float)((int)local_1b0 + -2) * fVar10 + (float)local_1a4[0x13c7], + (float)(GHIDRA_INT(local_1b0) + -2) * fVar10 + (float)local_1a4[0x13c7], (float)local_1a4[0x13c6] + (float)local_1a8, - (float)(int)local_1b0 * fVar10 + (float)local_1a4[0x13c7],&local_1e4); + (float)GHIDRA_INT(local_1b0) * fVar10 + (float)local_1a4[0x13c7],&local_1e4); (**(code **)(*(int *)local_1a4[9] + 0x14))(&srcRectC,afStack_498,g_drawRectUnset); - spawn_wall_details(local_1a4,iVar3,0,(int)local_1ac,(int)local_1c8,afStack_498,0,0); - iVar3 = gridHeight + ((int)local_1bc - 2U); + spawn_wall_details(local_1a4,iVar3,0,GHIDRA_INT(local_1ac),GHIDRA_INT(local_1c8),afStack_498,0,0); + iVar3 = gridHeight + (GHIDRA_INT(local_1bc) - 2U); ((KColor *)(&local_1e4))->KColor::SetFromARGB(0xffffffff); fVar10 = 26.0; render_quad_set_uniform_color @@ -3299,18 +3299,18 @@ LAB_00938ba7: (float)iVar3 * 26.0 + (float)local_1a4[0x13c7], (float)local_1a4[0x13c6] + (float)local_1a8, (float)(iVar3 + 2) * 26.0 + (float)local_1a4[0x13c7],color_03); - local_260 = CONCAT31(local_260._1_3_,1); + local_260 = CONCAT31((*(undefined1 *)((char *)&(local_260) + 0x1)),1); srcRectB = (float)(iVar8 + 2) * fVar10; - piStack_27c = (int *)((float)((int)fStack_224 + 2) * fVar10); + piStack_27c = (int *)((float)(GHIDRA_INT(fStack_224) + 2) * fVar10); fStack_278 = (float)(iVar8 + 3) * fVar10; - piStack_26c = (int *)((float)(int)fStack_224 * fVar10); + piStack_26c = (int *)((float)GHIDRA_INT(fStack_224) * fVar10); piStack_274 = piStack_27c; local_270 = srcRectB; fStack_268 = fStack_278; piStack_264 = piStack_26c; (**(code **)(*(int *)local_1a4[9] + 0x14))(&srcRectB,afStack_508,g_drawRectUnset); in_ECX = local_1a4; - spawn_wall_details(local_1a4,segmentIndex + 2,0,(int)local_1ac,(int)local_1b4,afStack_508,0,1) + spawn_wall_details(local_1a4,segmentIndex + 2,0,GHIDRA_INT(local_1ac),GHIDRA_INT(local_1b4),afStack_508,0,1) ; iVar3 = roomShape; } @@ -3325,15 +3325,15 @@ LAB_00938ba7: goto LAB_00938ba7; } if (((iVar3 != 3) && (iVar3 != 5)) || - ((shapeMinX + -1 <= (int)segmentIndex && ((int)segmentIndex <= local_1fc + -1)))) + ((shapeMinX + -1 <= GHIDRA_INT(segmentIndex) && (GHIDRA_INT(segmentIndex) <= local_1fc + -1)))) goto LAB_00938ba7; } segmentIndex = segmentIndex + 1; - } while ((int)segmentIndex < 7); + } while (GHIDRA_INT(segmentIndex) < 7); local_1b0 = (int *)0x7; uVar1 = gridWidth + -8; segmentIndex = uVar1; - if (7 < (int)uVar1) { + if (7 < GHIDRA_INT(uVar1)) { do { fVar10 = local_1cc; rng = wallRng; @@ -3345,14 +3345,14 @@ LAB_00938f84: local_1b4 = 9.80909e-45; } LAB_00938ff9: - uVar1 = ((RNG *)(wallRng))->RNG::RandomInt((uint)local_1cc); + uVar1 = ((RNG *)(wallRng))->RNG::RandomInt(GHIDRA_UINT(local_1cc)); if (uVar1 == 0) { local_1bc = (float)((RNG *)(rng))->RNG::RandomInt(config.wallVariants); } else { local_1bc = 0.0; } - uVar1 = ((RNG *)(rng))->RNG::RandomInt((uint)fVar10); + uVar1 = ((RNG *)(rng))->RNG::RandomInt(GHIDRA_UINT(fVar10)); if (uVar1 == 0) { local_1b8 = (float)((RNG *)(rng))->RNG::RandomInt(config.wallVariants); } @@ -3360,12 +3360,12 @@ LAB_00938ff9: local_1b8 = 0.0; } fVar10 = 26.0; - secondVariant = (uint)local_1b0 & 1; - uVar1 = (int)local_1bc + (int)local_1ac * config.wallVariants; - local_260 = CONCAT31(local_260._1_3_,1); + secondVariant = GHIDRA_UINT(local_1b0) & 1; + uVar1 = GHIDRA_INT(local_1bc) + GHIDRA_INT(local_1ac) * config.wallVariants; + local_260 = CONCAT31((*(undefined1 *)((char *)&(local_260) + 0x1)),1); iVar3 = secondVariant + (uVar1 & 1) * 9; iVar8 = (uVar1 >> 1) * 6; - uVar1 = (int)local_1b8 + (int)local_1ac * config.wallVariants; + uVar1 = GHIDRA_INT(local_1b8) + GHIDRA_INT(local_1ac) * config.wallVariants; local_1a8 = (Backdrop)((uVar1 >> 1) * 6); srcRectB = (float)(iVar3 + 7) * 26.0; fStack_22c = (float)(secondVariant + (uVar1 & 1) * 9 + 7); @@ -3378,17 +3378,17 @@ LAB_00938ff9: piStack_264 = piStack_26c; ((KColor *)(&local_1e4))->KColor::SetFromARGB(0xffffffff); pBVar4 = local_1a4; - fStack_224 = (float)(int)((int)local_1b0 + 1) * fVar10; - fStack_228 = (float)(int)local_1b0 * fVar10; + fStack_224 = (float)GHIDRA_INT((GHIDRA_INT(local_1b0) + 1)) * fVar10; + fStack_228 = (float)GHIDRA_INT(local_1b0) * fVar10; render_quad_set_uniform_color (afStack_578,fStack_228 + (float)local_1a4[0x13c6], - (float)(int)((int)local_1b4 - 2) * fVar10 + (float)local_1a4[0x13c7], + (float)GHIDRA_INT((GHIDRA_INT(local_1b4) - 2)) * fVar10 + (float)local_1a4[0x13c7], (float)local_1a4[0x13c6] + fStack_224, - (float)(int)local_1b4 * fVar10 + (float)local_1a4[0x13c7],&local_1e4); + (float)GHIDRA_INT(local_1b4) * fVar10 + (float)local_1a4[0x13c7],&local_1e4); (**(code **)(*(int *)pBVar4[9] + 0x14))(&srcRectB,afStack_578,g_drawRectUnset); - spawn_wall_details(pBVar4,secondVariant + 7,0,(int)local_1ac,(int)local_1bc,afStack_578,0,0) + spawn_wall_details(pBVar4,secondVariant + 7,0,GHIDRA_INT(local_1ac),GHIDRA_INT(local_1bc),afStack_578,0,0) ; - iVar3 = gridHeight + ((int)local_1c8 - 2U); + iVar3 = gridHeight + (GHIDRA_INT(local_1c8) - 2U); ((KColor *)(&local_1e4))->KColor::SetFromARGB(0xffffffff); fVar10 = 26.0; render_quad_set_uniform_color @@ -3396,18 +3396,18 @@ LAB_00938ff9: (float)iVar3 * 26.0 + (float)local_1a4[0x13c7], (float)local_1a4[0x13c6] + fStack_224, (float)(iVar3 + 2) * 26.0 + (float)local_1a4[0x13c7],color_04); - local_1e4._green = (float)(int)local_1a8 * fVar10; - srcRectD = (float)(int)fStack_22c * fVar10; - fStack_1f0 = (float)(int)((int)local_1a8 + 2) * fVar10; - fStack_1ec = (float)((int)fStack_22c + 1) * fVar10; - local_1e4._unk = CONCAT31(local_1e4._unk._1_3_,1); + local_1e4._green = (float)GHIDRA_INT(local_1a8) * fVar10; + srcRectD = (float)GHIDRA_INT(fStack_22c) * fVar10; + fStack_1f0 = (float)GHIDRA_INT((GHIDRA_INT(local_1a8) + 2)) * fVar10; + fStack_1ec = (float)(GHIDRA_INT(fStack_22c) + 1) * fVar10; + local_1e4._unk = CONCAT31((*(undefined1 *)((char *)&(local_1e4._unk) + 0x1)),1); fStack_1e8 = fStack_1f0; local_1e4._red = srcRectD; local_1e4._blue = fStack_1ec; local_1e4._alpha = local_1e4._green; (**(code **)(*(int *)local_1a4[9] + 0x14))(&srcRectD,afStack_7a8,g_drawRectUnset); in_ECX = local_1a4; - spawn_wall_details(local_1a4,secondVariant + 7,0,(int)local_1ac,(int)local_1b8,afStack_7a8,0 + spawn_wall_details(local_1a4,secondVariant + 7,0,GHIDRA_INT(local_1ac),GHIDRA_INT(local_1b8),afStack_7a8,0 ,1); uVar1 = segmentIndex; iVar3 = roomShape; @@ -3434,93 +3434,93 @@ LAB_00938fa6: goto LAB_00938ff9; } if (((iVar3 != 3) && (iVar3 != 5)) || - ((shapeMinX + -1 <= (int)local_1b0 && ((int)local_1b0 <= local_1fc + -1)))) + ((shapeMinX + -1 <= GHIDRA_INT(local_1b0) && (GHIDRA_INT(local_1b0) <= local_1fc + -1)))) goto LAB_00938ff9; } - local_1b0 = (int *)((int)local_1b0 + 1); - } while ((int)local_1b0 < (int)uVar1); + local_1b0 = (int *)(GHIDRA_INT(local_1b0) + 1); + } while (GHIDRA_INT(local_1b0) < GHIDRA_INT(uVar1)); } - if ((int)uVar1 < gridWidth + -2) { + if (GHIDRA_INT(uVar1) < gridWidth + -2) { local_1b0 = (int *)0x7; local_1a8 = (Backdrop)uVar1; do { fVar10 = local_1cc; rng = wallRng; - local_1a8 = (Backdrop)((int)local_1a8 + 1); + local_1a8 = (Backdrop)(GHIDRA_INT(local_1a8) + 1); local_1b8 = 0.0; local_1bc = 0.0; if (iVar3 == 10) { - if (0xc < (int)uVar1) { + if (0xc < GHIDRA_INT(uVar1)) { local_1b8 = 9.80909e-45; } LAB_00939431: - uVar1 = ((RNG *)(wallRng))->RNG::RandomInt((uint)local_1cc); + uVar1 = ((RNG *)(wallRng))->RNG::RandomInt(GHIDRA_UINT(local_1cc)); if (uVar1 == 0) { local_1b4 = (float)((RNG *)(rng))->RNG::RandomInt(config.wallVariants); } else { local_1b4 = 0.0; } - uVar1 = ((RNG *)(rng))->RNG::RandomInt((uint)fVar10); + uVar1 = ((RNG *)(rng))->RNG::RandomInt(GHIDRA_UINT(fVar10)); if (uVar1 == 0) { local_1c8 = (float)((RNG *)(rng))->RNG::RandomInt(config.wallVariants); } else { local_1c8 = 0.0; } - uVar1 = (int)local_1b4 + (int)local_1ac * config.wallVariants; + uVar1 = GHIDRA_INT(local_1b4) + GHIDRA_INT(local_1ac) * config.wallVariants; iVar3 = (uVar1 >> 1) * 6; iVar8 = gridWidth + -1 + ((uVar1 & 1) * 9 - segmentIndex); - uVar1 = (int)local_1c8 + (int)local_1ac * config.wallVariants; + uVar1 = GHIDRA_INT(local_1c8) + GHIDRA_INT(local_1ac) * config.wallVariants; local_25c.y = (float)((uVar1 >> 1) * 6); fStack_224 = (float)(((uVar1 & 1) * 9 - segmentIndex) + gridWidth + -1); ((KColor *)(&local_1e4))->KColor::SetFromARGB(0xffffffff); fVar10 = 26.0; - fStack_22c = (float)(int)local_1a8 * 26.0; - fStack_228 = (float)(int)segmentIndex * 26.0; + fStack_22c = (float)GHIDRA_INT(local_1a8) * 26.0; + fStack_228 = (float)GHIDRA_INT(segmentIndex) * 26.0; render_quad_set_uniform_color (afStack_5e8,fStack_228 + (float)local_1a4[0x13c6], - (float)(int)((int)local_1b8 - 2) * 26.0 + (float)local_1a4[0x13c7], + (float)GHIDRA_INT((GHIDRA_INT(local_1b8) - 2)) * 26.0 + (float)local_1a4[0x13c7], (float)local_1a4[0x13c6] + fStack_22c, - (float)(int)local_1b8 * 26.0 + (float)local_1a4[0x13c7],color_05); + (float)GHIDRA_INT(local_1b8) * 26.0 + (float)local_1a4[0x13c7],color_05); srcRectD = (float)(iVar8 + 1) * fVar10; fStack_1f0 = (float)iVar3 * fVar10; fStack_1ec = (float)iVar8 * fVar10; local_1e4._green = (float)(iVar3 + 2) * fVar10; - local_1e4._unk._0_1_ = 1; + (*(undefined1 *)((char *)&(local_1e4._unk) + 0x0)) = 1; fStack_1e8 = fStack_1f0; local_1e4._red = srcRectD; local_1e4._blue = fStack_1ec; local_1e4._alpha = local_1e4._green; (**(code **)(*(int *)local_1a4[9] + 0x14))(&srcRectD,afStack_5e8,g_drawRectUnset); pBVar4 = local_1a4; - spawn_wall_details(local_1a4,(int)local_1b0,0,(int)local_1ac,(int)local_1b4,afStack_5e8,1,0) + spawn_wall_details(local_1a4,GHIDRA_INT(local_1b0),0,GHIDRA_INT(local_1ac),GHIDRA_INT(local_1b4),afStack_5e8,1,0) ; - iVar3 = gridHeight + ((int)local_1bc - 2U); + iVar3 = gridHeight + (GHIDRA_INT(local_1bc) - 2U); ((KColor *)(&local_1e4))->KColor::SetFromARGB(0xffffffff); fVar10 = 26.0; render_quad_set_uniform_color (afStack_658,(float)pBVar4[0x13c6] + fStack_228, (float)iVar3 * 26.0 + (float)pBVar4[0x13c7],(float)pBVar4[0x13c6] + fStack_22c, (float)(iVar3 + 2) * 26.0 + (float)pBVar4[0x13c7],color_06); - srcRectD = (float)((int)fStack_224 + 1) * fVar10; - fStack_1f0 = (float)((int)local_25c.y + 2) * fVar10; - fStack_1ec = (float)(int)fStack_224 * fVar10; - local_1e4._green = (float)(int)local_25c.y * fVar10; - local_1e4._unk = CONCAT31(local_1e4._unk._1_3_,1); + srcRectD = (float)(GHIDRA_INT(fStack_224) + 1) * fVar10; + fStack_1f0 = (float)(GHIDRA_INT(local_25c.y) + 2) * fVar10; + fStack_1ec = (float)GHIDRA_INT(fStack_224) * fVar10; + local_1e4._green = (float)GHIDRA_INT(local_25c.y) * fVar10; + local_1e4._unk = CONCAT31((*(undefined1 *)((char *)&(local_1e4._unk) + 0x1)),1); fStack_1e8 = fStack_1f0; local_1e4._red = srcRectD; local_1e4._blue = fStack_1ec; local_1e4._alpha = local_1e4._green; (**(code **)(*(int *)pBVar4[9] + 0x14))(&srcRectD,afStack_658,g_drawRectUnset); - spawn_wall_details(local_1a4,(int)local_1b0,0,(int)local_1ac,(int)local_1c8,afStack_658,1,1) + spawn_wall_details(local_1a4,GHIDRA_INT(local_1b0),0,GHIDRA_INT(local_1ac),GHIDRA_INT(local_1c8),afStack_658,1,1) ; uVar1 = segmentIndex; iVar3 = roomShape; } else { if (iVar3 == 0xc) { - if (0xc < (int)uVar1) { + if (0xc < GHIDRA_INT(uVar1)) { local_1bc = -NAN; } goto LAB_00939431; @@ -3531,13 +3531,13 @@ LAB_00939431: goto LAB_00939431; } if (((iVar3 != 3) && (iVar3 != 5)) || - ((shapeMinX + -1 <= (int)uVar1 && ((int)uVar1 <= local_1fc + -1)))) goto LAB_00939431; + ((shapeMinX + -1 <= GHIDRA_INT(uVar1) && (GHIDRA_INT(uVar1) <= local_1fc + -1)))) goto LAB_00939431; } uVar1 = uVar1 + 1; - local_1b0 = (int *)((int)local_1b0 - 1); + local_1b0 = (int *)(GHIDRA_INT(local_1b0) - 1); in_ECX = local_1a4; segmentIndex = uVar1; - } while ((int)uVar1 < gridWidth + -2); + } while (GHIDRA_INT(uVar1) < gridWidth + -2); } local_1fc = 0; do { @@ -3548,14 +3548,14 @@ LAB_00939431: if (iVar3 == 9) { local_1a8 = (Backdrop)0xd; LAB_00939868: - uVar1 = ((RNG *)(wallRng))->RNG::RandomInt((uint)local_1cc); + uVar1 = ((RNG *)(wallRng))->RNG::RandomInt(GHIDRA_UINT(local_1cc)); if (uVar1 == 0) { local_1b8 = (float)((RNG *)(rng))->RNG::RandomInt(config.wallVariants); } else { local_1b8 = 0.0; } - uVar1 = ((RNG *)(rng))->RNG::RandomInt((uint)fVar10); + uVar1 = ((RNG *)(rng))->RNG::RandomInt(GHIDRA_UINT(fVar10)); if (uVar1 == 0) { local_1bc = (float)((RNG *)(rng))->RNG::RandomInt(config.wallVariants); } @@ -3563,11 +3563,11 @@ LAB_00939868: local_1bc = 0.0; } fVar10 = 26.0; - uVar1 = (int)local_1b8 + (int)local_1ac * config.wallVariants; + uVar1 = GHIDRA_INT(local_1b8) + GHIDRA_INT(local_1ac) * config.wallVariants; uStack_324 = 1; iVar3 = local_1fc + ((uVar1 >> 1) * 3 + 1) * 2; iVar8 = (uVar1 & 1) * 9; - uVar1 = (int)local_1bc + (int)local_1ac * config.wallVariants; + uVar1 = GHIDRA_INT(local_1bc) + GHIDRA_INT(local_1ac) * config.wallVariants; fStack_228 = (float)(local_1fc + 2 + (uVar1 >> 1) * 6); secondVariantRow = (uVar1 & 1) * 9; srcRectE = (float)iVar8 * 26.0; @@ -3583,13 +3583,13 @@ LAB_00939868: local_25c.y = (float)(local_1fc + 1) * fVar10; fStack_22c = (float)local_1fc * fVar10; render_quad_set_uniform_color - (afStack_6c8,(float)((int)local_1a8 + -2) * fVar10 + (float)local_1a4[0x13c6], + (afStack_6c8,(float)(GHIDRA_INT(local_1a8) + -2) * fVar10 + (float)local_1a4[0x13c6], fStack_22c + (float)local_1a4[0x13c7], - (float)(int)local_1a8 * fVar10 + (float)local_1a4[0x13c6], + (float)GHIDRA_INT(local_1a8) * fVar10 + (float)local_1a4[0x13c6], (float)local_1a4[0x13c7] + local_25c.y,&local_1e4); (**(code **)(*(int *)local_1a4[9] + 0x14))(&srcRectE,afStack_6c8,g_drawRectUnset); - spawn_wall_details(local_1a4,0,iVar3,(int)local_1ac,(int)local_1b8,afStack_6c8,0,0); - iVar3 = gridWidth + ((int)local_1b4 - 2U); + spawn_wall_details(local_1a4,0,iVar3,GHIDRA_INT(local_1ac),GHIDRA_INT(local_1b8),afStack_6c8,0,0); + iVar3 = gridWidth + (GHIDRA_INT(local_1b4) - 2U); ((KColor *)(&local_1e4))->KColor::SetFromARGB(0xffffffff); fVar10 = 26.0; render_quad_set_uniform_color @@ -3598,17 +3598,17 @@ LAB_00939868: (float)(iVar3 + 2) * 26.0 + (float)local_1a4[0x13c6], (float)local_1a4[0x13c7] + local_25c.y,color_07); fStack_1ec = (float)secondVariantRow * fVar10; - local_1e4._unk = CONCAT31(local_1e4._unk._1_3_,1); + local_1e4._unk = CONCAT31((*(undefined1 *)((char *)&(local_1e4._unk) + 0x1)),1); srcRectD = (float)(secondVariantRow + 2) * fVar10; - fStack_1f0 = (float)(int)fStack_228 * fVar10; - local_1e4._green = (float)((int)fStack_228 + 1) * fVar10; + fStack_1f0 = (float)GHIDRA_INT(fStack_228) * fVar10; + local_1e4._green = (float)(GHIDRA_INT(fStack_228) + 1) * fVar10; fStack_1e8 = fStack_1f0; local_1e4._red = srcRectD; local_1e4._blue = fStack_1ec; local_1e4._alpha = local_1e4._green; (**(code **)(*(int *)local_1a4[9] + 0x14))(&srcRectD,afStack_738,g_drawRectUnset); in_ECX = local_1a4; - spawn_wall_details(local_1a4,0,local_1fc + 2,(int)local_1ac,(int)local_1bc,afStack_738,1,0); + spawn_wall_details(local_1a4,0,local_1fc + 2,GHIDRA_INT(local_1ac),GHIDRA_INT(local_1bc),afStack_738,1,0); iVar3 = roomShape; } else { @@ -3629,7 +3629,7 @@ LAB_00939868: local_1b0 = (int *)&DAT_00000004; uVar1 = gridHeight + -5; segmentIndex = uVar1; - if (4 < (int)uVar1) { + if (4 < GHIDRA_INT(uVar1)) { do { fVar10 = local_1cc; rng = wallRng; @@ -3641,14 +3641,14 @@ LAB_00939c37: local_1a8 = (Backdrop)0xd; } LAB_00939cac: - uVar1 = ((RNG *)(wallRng))->RNG::RandomInt((uint)local_1cc); + uVar1 = ((RNG *)(wallRng))->RNG::RandomInt(GHIDRA_UINT(local_1cc)); if (uVar1 == 0) { local_1b8 = (float)((RNG *)(rng))->RNG::RandomInt(config.wallVariants); } else { local_1b8 = 0.0; } - uVar1 = ((RNG *)(rng))->RNG::RandomInt((uint)fVar10); + uVar1 = ((RNG *)(rng))->RNG::RandomInt(GHIDRA_UINT(fVar10)); if (uVar1 == 0) { local_1bc = (float)((RNG *)(rng))->RNG::RandomInt(config.wallVariants); } @@ -3656,12 +3656,12 @@ LAB_00939cac: local_1bc = 0.0; } fVar10 = 26.0; - secondVariant = (uint)local_1b0 & 1; - uVar1 = (int)local_1b8 + (int)local_1ac * config.wallVariants; - local_38 = CONCAT31(local_38._1_3_,1); + secondVariant = GHIDRA_UINT(local_1b0) & 1; + uVar1 = GHIDRA_INT(local_1b8) + GHIDRA_INT(local_1ac) * config.wallVariants; + local_38 = CONCAT31((*(undefined1 *)((char *)&(local_38) + 0x1)),1); iVar3 = secondVariant + ((uVar1 >> 1) * 3 + 2) * 2; iVar8 = (uVar1 & 1) * 9; - uVar1 = (int)local_1bc + (int)local_1ac * config.wallVariants; + uVar1 = GHIDRA_INT(local_1bc) + GHIDRA_INT(local_1ac) * config.wallVariants; fStack_58 = (float)iVar8 * 26.0; fStack_224 = (float)(secondVariant + ((uVar1 >> 1) * 3 + 2) * 2); fStack_228 = (float)((uVar1 & 1) * 9); @@ -3674,17 +3674,17 @@ LAB_00939cac: local_3c = piStack_44; ((KColor *)(&local_1e4))->KColor::SetFromARGB(0xffffffff); pBVar4 = local_1a4; - local_25c.y = (float)(int)((int)local_1b0 + 1) * fVar10; - fStack_22c = (float)(int)local_1b0 * fVar10; + local_25c.y = (float)GHIDRA_INT((GHIDRA_INT(local_1b0) + 1)) * fVar10; + fStack_22c = (float)GHIDRA_INT(local_1b0) * fVar10; render_quad_set_uniform_color - (afStack_8f8,(float)((int)local_1a8 + -2) * fVar10 + (float)local_1a4[0x13c6], + (afStack_8f8,(float)(GHIDRA_INT(local_1a8) + -2) * fVar10 + (float)local_1a4[0x13c6], fStack_22c + (float)local_1a4[0x13c7], - (float)(int)local_1a8 * fVar10 + (float)local_1a4[0x13c6], + (float)GHIDRA_INT(local_1a8) * fVar10 + (float)local_1a4[0x13c6], (float)local_1a4[0x13c7] + local_25c.y,&local_1e4); (**(code **)(*(int *)pBVar4[9] + 0x14))(&fStack_58,afStack_8f8,g_drawRectUnset); - spawn_wall_details(pBVar4,0,secondVariant + 4,(int)local_1ac,(int)local_1b8,afStack_8f8,0,0) + spawn_wall_details(pBVar4,0,secondVariant + 4,GHIDRA_INT(local_1ac),GHIDRA_INT(local_1b8),afStack_8f8,0,0) ; - iVar3 = gridWidth + ((int)local_1b4 - 2U); + iVar3 = gridWidth + (GHIDRA_INT(local_1b4) - 2U); ((KColor *)(&local_1e4))->KColor::SetFromARGB(0xffffffff); fVar10 = 26.0; render_quad_set_uniform_color @@ -3692,18 +3692,18 @@ LAB_00939cac: (float)local_1a4[0x13c7] + fStack_22c, (float)(iVar3 + 2) * 26.0 + (float)local_1a4[0x13c6], (float)local_1a4[0x13c7] + local_25c.y,color_08); - local_1e4._unk = CONCAT31(local_1e4._unk._1_3_,1); - srcRectD = (float)((int)fStack_228 + 2) * fVar10; - fStack_1f0 = (float)(int)fStack_224 * fVar10; - fStack_1ec = (float)(int)fStack_228 * fVar10; - local_1e4._green = (float)((int)fStack_224 + 1) * fVar10; + local_1e4._unk = CONCAT31((*(undefined1 *)((char *)&(local_1e4._unk) + 0x1)),1); + srcRectD = (float)(GHIDRA_INT(fStack_228) + 2) * fVar10; + fStack_1f0 = (float)GHIDRA_INT(fStack_224) * fVar10; + fStack_1ec = (float)GHIDRA_INT(fStack_228) * fVar10; + local_1e4._green = (float)(GHIDRA_INT(fStack_224) + 1) * fVar10; fStack_1e8 = fStack_1f0; local_1e4._red = srcRectD; local_1e4._blue = fStack_1ec; local_1e4._alpha = local_1e4._green; (**(code **)(*(int *)local_1a4[9] + 0x14))(&srcRectD,afStack_818,g_drawRectUnset); in_ECX = local_1a4; - spawn_wall_details(local_1a4,0,secondVariant + 4,(int)local_1ac,(int)local_1bc,afStack_818,1 + spawn_wall_details(local_1a4,0,secondVariant + 4,GHIDRA_INT(local_1ac),GHIDRA_INT(local_1bc),afStack_818,1 ,0); uVar1 = segmentIndex; iVar3 = roomShape; @@ -3730,13 +3730,13 @@ LAB_00939c59: goto LAB_00939cac; } if (((iVar3 != 2) && (iVar3 != 7)) || - ((shapeMinY + -1 <= (int)local_1b0 && ((int)local_1b0 <= shapeMaxY + -1)))) + ((shapeMinY + -1 <= GHIDRA_INT(local_1b0) && (GHIDRA_INT(local_1b0) <= shapeMaxY + -1)))) goto LAB_00939cac; } - local_1b0 = (int *)((int)local_1b0 + 1); - } while ((int)local_1b0 < (int)uVar1); + local_1b0 = (int *)(GHIDRA_INT(local_1b0) + 1); + } while (GHIDRA_INT(local_1b0) < GHIDRA_INT(uVar1)); } - if ((int)uVar1 < gridHeight + -2) { + if (GHIDRA_INT(uVar1) < gridHeight + -2) { local_1c8 = (float)(uVar1 + 1); local_1b0 = (int *)&DAT_00000004; do { @@ -3745,54 +3745,54 @@ LAB_00939c59: local_1a8 = (Backdrop)0x0; local_1b4 = 0.0; if (iVar3 == 9) { - if ((int)uVar1 < 7) { + if (GHIDRA_INT(uVar1) < 7) { LAB_0093a067: local_1a8 = (Backdrop)0xd; } LAB_0093a0dc: - uVar1 = ((RNG *)(wallRng))->RNG::RandomInt((uint)local_1cc); + uVar1 = ((RNG *)(wallRng))->RNG::RandomInt(GHIDRA_UINT(local_1cc)); if (uVar1 == 0) { local_1b8 = (float)((RNG *)(rng))->RNG::RandomInt(config.wallVariants); } else { local_1b8 = 0.0; } - uVar1 = ((RNG *)(rng))->RNG::RandomInt((uint)fVar10); + uVar1 = ((RNG *)(rng))->RNG::RandomInt(GHIDRA_UINT(fVar10)); if (uVar1 == 0) { local_1bc = (float)((RNG *)(rng))->RNG::RandomInt(config.wallVariants); } else { local_1bc = 0.0; } - uVar1 = (int)local_1b8 + (int)local_1ac * config.wallVariants; + uVar1 = GHIDRA_INT(local_1b8) + GHIDRA_INT(local_1ac) * config.wallVariants; iVar3 = (uVar1 & 1) * 9; - secondVariant = (int)local_1bc + (int)local_1ac * config.wallVariants; + secondVariant = GHIDRA_INT(local_1bc) + GHIDRA_INT(local_1ac) * config.wallVariants; iVar8 = gridHeight + -1 + ((uVar1 >> 1) * 6 - segmentIndex); fStack_224 = (float)(((secondVariant >> 1) * 6 - segmentIndex) + gridHeight + -1); fStack_228 = (float)((secondVariant & 1) * 9); ((KColor *)(&local_1e4))->KColor::SetFromARGB(0xffffffff); fVar10 = 26.0; - local_25c.y = (float)(int)local_1c8 * 26.0; - fStack_22c = (float)(int)segmentIndex * 26.0; + local_25c.y = (float)GHIDRA_INT(local_1c8) * 26.0; + fStack_22c = (float)GHIDRA_INT(segmentIndex) * 26.0; render_quad_set_uniform_color - (afStack_888,(float)((int)local_1a8 + -2) * 26.0 + (float)local_1a4[0x13c6], + (afStack_888,(float)(GHIDRA_INT(local_1a8) + -2) * 26.0 + (float)local_1a4[0x13c6], fStack_22c + (float)local_1a4[0x13c7], - (float)(int)local_1a8 * 26.0 + (float)local_1a4[0x13c6], + (float)GHIDRA_INT(local_1a8) * 26.0 + (float)local_1a4[0x13c6], (float)local_1a4[0x13c7] + local_25c.y,color_09); srcRectD = (float)iVar3 * fVar10; fStack_1f0 = (float)(iVar8 + 1) * fVar10; fStack_1ec = (float)(iVar3 + 2) * fVar10; local_1e4._green = (float)iVar8 * fVar10; - local_1e4._unk._0_1_ = 1; + (*(undefined1 *)((char *)&(local_1e4._unk) + 0x0)) = 1; fStack_1e8 = fStack_1f0; local_1e4._red = srcRectD; local_1e4._blue = fStack_1ec; local_1e4._alpha = local_1e4._green; (**(code **)(*(int *)local_1a4[9] + 0x14))(&srcRectD,afStack_888,g_drawRectUnset); pBVar4 = local_1a4; - spawn_wall_details(local_1a4,0,(int)local_1b0,(int)local_1ac,(int)local_1b8,afStack_888,0,1) + spawn_wall_details(local_1a4,0,GHIDRA_INT(local_1b0),GHIDRA_INT(local_1ac),GHIDRA_INT(local_1b8),afStack_888,0,1) ; - iVar3 = gridWidth + ((int)local_1b4 - 2U); + iVar3 = gridWidth + (GHIDRA_INT(local_1b4) - 2U); ((KColor *)(&local_1e4))->KColor::SetFromARGB(0xffffffff); fVar10 = 26.0; render_quad_set_uniform_color @@ -3800,34 +3800,34 @@ LAB_0093a0dc: (float)pBVar4[0x13c7] + fStack_22c, (float)(iVar3 + 2) * 26.0 + (float)pBVar4[0x13c6], (float)pBVar4[0x13c7] + local_25c.y,color_10); - local_1e4._unk = CONCAT31(local_1e4._unk._1_3_,1); - srcRectD = (float)((int)fStack_228 + 2) * fVar10; - fStack_1f0 = (float)((int)fStack_224 + 1) * fVar10; - fStack_1ec = (float)(int)fStack_228 * fVar10; - local_1e4._green = (float)(int)fStack_224 * fVar10; + local_1e4._unk = CONCAT31((*(undefined1 *)((char *)&(local_1e4._unk) + 0x1)),1); + srcRectD = (float)(GHIDRA_INT(fStack_228) + 2) * fVar10; + fStack_1f0 = (float)(GHIDRA_INT(fStack_224) + 1) * fVar10; + fStack_1ec = (float)GHIDRA_INT(fStack_228) * fVar10; + local_1e4._green = (float)GHIDRA_INT(fStack_224) * fVar10; fStack_1e8 = fStack_1f0; local_1e4._red = srcRectD; local_1e4._blue = fStack_1ec; local_1e4._alpha = local_1e4._green; (**(code **)(*(int *)pBVar4[9] + 0x14))(&srcRectD,quadBuf,g_drawRectUnset); - spawn_wall_details(local_1a4,0,(int)local_1b0,(int)local_1ac,(int)local_1bc,quadBuf,1,1); + spawn_wall_details(local_1a4,0,GHIDRA_INT(local_1b0),GHIDRA_INT(local_1ac),GHIDRA_INT(local_1bc),quadBuf,1,1); uVar1 = segmentIndex; iVar3 = roomShape; } else { if (iVar3 == 0xb) { - if (6 < (int)uVar1) goto LAB_0093a067; + if (6 < GHIDRA_INT(uVar1)) goto LAB_0093a067; goto LAB_0093a0dc; } if (iVar3 == 10) { - if ((int)uVar1 < 7) { + if (GHIDRA_INT(uVar1) < 7) { LAB_0093a089: local_1b4 = -NAN; } goto LAB_0093a0dc; } if (iVar3 == 0xc) { - if (6 < (int)uVar1) goto LAB_0093a089; + if (6 < GHIDRA_INT(uVar1)) goto LAB_0093a089; goto LAB_0093a0dc; } if ((iVar3 == 3) || (iVar3 == 5)) { @@ -3836,14 +3836,14 @@ LAB_0093a089: goto LAB_0093a0dc; } if (((iVar3 != 2) && (iVar3 != 7)) || - ((shapeMinY + -1 <= (int)uVar1 && ((int)uVar1 <= shapeMaxY + -1)))) goto LAB_0093a0dc; + ((shapeMinY + -1 <= GHIDRA_INT(uVar1) && (GHIDRA_INT(uVar1) <= shapeMaxY + -1)))) goto LAB_0093a0dc; } uVar1 = uVar1 + 1; - local_1c8 = (float)((int)local_1c8 + 1); - local_1b0 = (int *)((int)local_1b0 + -1); + local_1c8 = (float)(GHIDRA_INT(local_1c8) + 1); + local_1b0 = (int *)(GHIDRA_INT(local_1b0) + -1); in_ECX = local_1a4; segmentIndex = uVar1; - } while ((int)uVar1 < gridHeight + -2); + } while (GHIDRA_INT(uVar1) < gridHeight + -2); } if (iVar3 == 9) { pcVar9 = *(code **)(*(int *)in_ECX[9] + 0x14); @@ -3864,7 +3864,7 @@ LAB_0093a644: local_1e4._green = local_294; LAB_0093a621: chosenSrcRect = &srcRectD; - local_1e4._unk = CONCAT31(local_1e4._unk._1_3_,1); + local_1e4._unk = CONCAT31((*(undefined1 *)((char *)&(local_1e4._unk) + 0x1)),1); srcRectD = local_1e4._red; fStack_1f0 = fStack_1e8; fStack_1ec = local_1e4._blue; @@ -3891,7 +3891,7 @@ LAB_0093a609: } } game = g_game; - uVar7 = (ushort)((uint)piVar5 >> 0x10); + uVar7 = (ushort)(GHIDRA_UINT(piVar5) >> 0x10); if ((g_game->_stage == 10) && (g_game->_stageType == 1)) { grid_rect_to_quad(&srcRectB,0,2,2,1); grid_rect_to_quad(&fStack_58,0,2,2,2); @@ -3909,14 +3909,14 @@ LAB_0093a609: *(int *)(*(int *)(*(int *)((char *)game->_room + 4) + 0x10) + 0x48) * 0x20); if ((iVar3 == 2) || (((iVar3 == 7 || (iVar3 == 3)) || (iVar3 == 5)))) { pcVar9 = *(code **)(*(int *)local_1a4[9] + 0x14); - pvVar11 = render_grid_rect(local_1a4,gridQuad,(int)fStack_1f0 + -3,(int)fStack_1ec + -1,2,1); + pvVar11 = render_grid_rect(local_1a4,gridQuad,GHIDRA_INT(fStack_1f0) + -3,GHIDRA_INT(fStack_1ec) + -1,2,1); (*pcVar9)(&srcRectB,pvVar11,g_drawRectUnset); pcVar9 = *(code **)(*(int *)local_1a4[9] + 0x14); - pvVar11 = render_grid_rect(local_1a4,gridQuad,(int)fStack_1f0 + -3,(int)local_1e4._red + -2,2, + pvVar11 = render_grid_rect(local_1a4,gridQuad,GHIDRA_INT(fStack_1f0) + -3,GHIDRA_INT(local_1e4._red) + -2,2, 2); (*pcVar9)(&srcRectC,pvVar11,g_drawRectUnset); pcVar9 = *(code **)(*(int *)local_1a4[9] + 0x14); - pvVar11 = render_grid_rect(local_1a4,gridQuad,(int)fStack_1e8,(int)fStack_1ec + -1,2,1); + pvVar11 = render_grid_rect(local_1a4,gridQuad,GHIDRA_INT(fStack_1e8),GHIDRA_INT(fStack_1ec) + -1,2,1); fStack_48 = fStack_278; fStack_58 = fStack_278; piStack_4c = piStack_27c; @@ -3925,10 +3925,10 @@ LAB_0093a609: local_50 = local_270; local_3c = piStack_264; piStack_44 = piStack_264; - local_38._0_1_ = 1; + (*(undefined1 *)((char *)&(local_38) + 0x0)) = 1; (*pcVar9)(&fStack_58,pvVar11,g_drawRectUnset); pcVar9 = *(code **)(*(int *)local_1a4[9] + 0x14); - pvVar11 = render_grid_rect(local_1a4,gridQuad,(int)fStack_1e8,(int)local_1e4._red + -2,2,2); + pvVar11 = render_grid_rect(local_1a4,gridQuad,GHIDRA_INT(fStack_1e8),GHIDRA_INT(local_1e4._red) + -2,2,2); fStack_48 = fStack_218; fStack_58 = fStack_218; piStack_4c = (int *)fStack_21c; @@ -3937,13 +3937,13 @@ LAB_0093a609: local_50 = fStack_210; local_3c = (int *)fStack_204; piStack_44 = (int *)fStack_204; - local_38._0_1_ = 1; + (*(undefined1 *)((char *)&(local_38) + 0x0)) = 1; (*pcVar9)(&fStack_58,pvVar11,g_drawRectUnset); pcVar9 = *(code **)(*(int *)local_1a4[9] + 0x14); - pvVar11 = render_grid_rect(local_1a4,gridQuad,(int)fStack_1f0 + -1,(int)fStack_1ec + -3,1,2); + pvVar11 = render_grid_rect(local_1a4,gridQuad,GHIDRA_INT(fStack_1f0) + -1,GHIDRA_INT(fStack_1ec) + -3,1,2); (*pcVar9)(&srcRectA,pvVar11,g_drawRectUnset); pcVar9 = *(code **)(*(int *)local_1a4[9] + 0x14); - pvVar11 = render_grid_rect(local_1a4,gridQuad,(int)fStack_1f0 + -1,(int)local_1e4._red,1,2); + pvVar11 = render_grid_rect(local_1a4,gridQuad,GHIDRA_INT(fStack_1f0) + -1,GHIDRA_INT(local_1e4._red),1,2); fStack_48 = srcRectA; fStack_58 = srcRectA; piStack_4c = local_23c; @@ -3952,10 +3952,10 @@ LAB_0093a609: local_50 = local_238; local_3c = local_244; piStack_44 = local_244; - local_38._0_1_ = 1; + (*(undefined1 *)((char *)&(local_38) + 0x0)) = 1; (*pcVar9)(&fStack_58,pvVar11,g_drawRectUnset); pcVar9 = *(code **)(*(int *)local_1a4[9] + 0x14); - pvVar11 = render_grid_rect(local_1a4,gridQuad,(int)fStack_1e8 + -1,(int)fStack_1ec + -3,1,2); + pvVar11 = render_grid_rect(local_1a4,gridQuad,GHIDRA_INT(fStack_1e8) + -1,GHIDRA_INT(fStack_1ec) + -3,1,2); fStack_48 = local_248; fStack_58 = local_248; piStack_4c = local_24c; @@ -3964,21 +3964,21 @@ LAB_0093a609: local_50 = local_240; local_3c = local_234; piStack_44 = local_234; - local_38 = CONCAT31(local_38._1_3_,1); + local_38 = CONCAT31((*(undefined1 *)((char *)&(local_38) + 0x1)),1); (*pcVar9)(&fStack_58,pvVar11,g_drawRectUnset); pcVar9 = *(code **)(*(int *)local_1a4[9] + 0x14); chosenSrcRect = gridQuad; fVar12 = local_1e4._red; fVar10 = fStack_1e8; LAB_0093ad9b: - pvVar11 = render_grid_rect(local_1a4,chosenSrcRect,(int)fVar10 + -1,(int)fVar12,1,2); + pvVar11 = render_grid_rect(local_1a4,chosenSrcRect,GHIDRA_INT(fVar10) + -1,GHIDRA_INT(fVar12),1,2); fStack_48 = local_248; local_40 = local_240; LAB_0093adcd: piStack_44 = local_244; piStack_4c = local_23c; LAB_0093addf: - local_38 = CONCAT31(local_38._1_3_,1); + local_38 = CONCAT31((*(undefined1 *)((char *)&(local_38) + 0x1)),1); chosenSrcRect = &fStack_58; fStack_58 = fStack_48; piStack_54 = piStack_4c; @@ -3988,7 +3988,7 @@ LAB_0093addf: else { if (iVar3 == 0xb) { pcVar9 = *(code **)(*(int *)local_1a4[9] + 0x14); - pvVar11 = render_grid_rect(local_1a4,gridQuad,(int)fStack_1f0 + -3,(int)local_1e4._red + -1, + pvVar11 = render_grid_rect(local_1a4,gridQuad,GHIDRA_INT(fStack_1f0) + -3,GHIDRA_INT(local_1e4._red) + -1, 2,1); fStack_48 = srcRectB; fStack_58 = srcRectB; @@ -3998,17 +3998,17 @@ LAB_0093addf: local_50 = fStack_268; local_3c = piStack_274; piStack_44 = piStack_274; - local_38 = CONCAT31(local_38._1_3_,1); + local_38 = CONCAT31((*(undefined1 *)((char *)&(local_38) + 0x1)),1); (*pcVar9)(&fStack_58,pvVar11,g_drawRectUnset); pcVar9 = *(code **)(*(int *)local_1a4[9] + 0x14); - pvVar11 = render_grid_rect(local_1a4,quadBuf,(int)local_1e4._green + -1,local_1e4._unk,1,2); + pvVar11 = render_grid_rect(local_1a4,quadBuf,GHIDRA_INT(local_1e4._green) + -1,local_1e4._unk,1,2); fStack_48 = srcRectA; local_40 = local_238; goto LAB_0093adcd; } if (iVar3 == 0xc) { pcVar9 = *(code **)(*(int *)local_1a4[9] + 0x14); - pvVar11 = render_grid_rect(local_1a4,gridQuad,(int)fStack_1e8,(int)local_1e4._red + -1,2,1); + pvVar11 = render_grid_rect(local_1a4,gridQuad,GHIDRA_INT(fStack_1e8),GHIDRA_INT(local_1e4._red) + -1,2,1); fStack_48 = fStack_278; fStack_58 = fStack_278; piStack_4c = piStack_26c; @@ -4017,7 +4017,7 @@ LAB_0093addf: local_50 = local_270; local_3c = piStack_274; piStack_44 = piStack_274; - local_38 = CONCAT31(local_38._1_3_,1); + local_38 = CONCAT31((*(undefined1 *)((char *)&(local_38) + 0x1)),1); (*pcVar9)(&fStack_58,pvVar11,g_drawRectUnset); pcVar9 = *(code **)(*(int *)local_1a4[9] + 0x14); chosenSrcRect = quadBuf; @@ -4029,7 +4029,7 @@ LAB_0093addf: uVar7 = extraout_var; if (iVar3 != 10) goto LAB_0093adfb; pcVar9 = *(code **)(*(int *)local_1a4[9] + 0x14); - pvVar11 = render_grid_rect(local_1a4,gridQuad,(int)fStack_1e8 + -1,(int)fStack_1ec + -3,1,2) + pvVar11 = render_grid_rect(local_1a4,gridQuad,GHIDRA_INT(fStack_1e8) + -1,GHIDRA_INT(fStack_1ec) + -3,1,2) ; fStack_48 = local_248; fStack_58 = local_248; @@ -4039,10 +4039,10 @@ LAB_0093addf: local_50 = local_240; local_3c = local_234; piStack_44 = local_234; - local_38 = CONCAT31(local_38._1_3_,1); + local_38 = CONCAT31((*(undefined1 *)((char *)&(local_38) + 0x1)),1); (*pcVar9)(&fStack_58,pvVar11,g_drawRectUnset); pcVar9 = *(code **)(*(int *)local_1a4[9] + 0x14); - pvVar11 = render_grid_rect(local_1a4,quadBuf,(int)local_1e4._alpha,(int)local_1e4._blue + -1 + pvVar11 = render_grid_rect(local_1a4,quadBuf,GHIDRA_INT(local_1e4._alpha),GHIDRA_INT(local_1e4._blue) + -1 ,2,1); fStack_48 = fStack_278; piStack_4c = piStack_27c; @@ -4051,11 +4051,11 @@ LAB_0093addf: goto LAB_0093addf; } pcVar9 = *(code **)(*(int *)local_1a4[9] + 0x14); - pvVar11 = render_grid_rect(local_1a4,gridQuad,(int)fStack_1f0 + -1,(int)fStack_1ec + -3,1,2); + pvVar11 = render_grid_rect(local_1a4,gridQuad,GHIDRA_INT(fStack_1f0) + -1,GHIDRA_INT(fStack_1ec) + -3,1,2); (*pcVar9)(&srcRectA,pvVar11,g_drawRectUnset); pcVar9 = *(code **)(*(int *)local_1a4[9] + 0x14); - pvVar11 = render_grid_rect(local_1a4,quadBuf,(int)local_1e4._green + -3, - (int)local_1e4._blue + -1,2,1); + pvVar11 = render_grid_rect(local_1a4,quadBuf,GHIDRA_INT(local_1e4._green) + -3, + GHIDRA_INT(local_1e4._blue) + -1,2,1); chosenSrcRect = &srcRectB; } (*pcVar9)(chosenSrcRect,pvVar11,g_drawRectUnset); @@ -4076,7 +4076,7 @@ LAB_0093adfb: } if ((roomShape == 3) || (roomShape == 5)) { gridWidth = gridWidth + -4; - iVar8 = (uint)uVar7 << 0x10; + iVar8 = GHIDRA_UINT(uVar7) << 0x10; local_1b8 = 2.8026e-45; } else { @@ -4096,28 +4096,28 @@ LAB_0093aecd: local_1cc = 0.45; } rng = (RNG *)(local_1a4 + 0x13ca); - local_1ac = (float)(CONCAT31((int3)((uint)local_1ac >> 8),isHorizontalNarrow) ^ 1); - isPreAscentMomRoom = (byte)((uint)iVar8 >> 8); - pBVar6 = (Backdrop *)CONCAT31((int3)((uint)iVar8 >> 8),isPreAscentMomRoom); - local_1bc = (float)((int)local_1a8 + 7); - local_1b4 = (float)(int)local_1a8 * 26.0; + local_1ac = (float)(CONCAT31((int3)(GHIDRA_UINT(local_1ac) >> 8),isHorizontalNarrow) ^ 1); + isPreAscentMomRoom = (byte)(GHIDRA_UINT(iVar8) >> 8); + pBVar6 = (Backdrop *)CONCAT31((int3)(GHIDRA_UINT(iVar8) >> 8),isPreAscentMomRoom); + local_1bc = (float)(GHIDRA_INT(local_1a8) + 7); + local_1b4 = (float)GHIDRA_INT(local_1a8) * 26.0; local_28 = local_1b4 + (float)local_1a4[0x13c7]; - local_1c8 = (float)((int)local_1b8 + 0xd); - local_1a8 = (Backdrop)((float)(int)local_1b8 * 26.0); + local_1c8 = (float)(GHIDRA_INT(local_1b8) + 0xd); + local_1a8 = (Backdrop)((float)GHIDRA_INT(local_1b8) * 26.0); if (roomShape == 9) { - local_34._8_4_ = (float)(int)local_1c8 * 26.0 + (float)local_1a4[0x13c6]; + (*(undefined4 *)((char *)&(local_34) + 0x8)) = (float)GHIDRA_INT(local_1c8) * 26.0 + (float)local_1a4[0x13c6]; local_1a4 = pBVar6; render_wall_detail(pBVar4,rng,(Vector *)(local_34 + 8),0,0,isPreAscentMomRoom, SUB41(local_1ac,0),fVar10); - local_34._8_4_ = (float)local_1a8 + (float)pBVar4[0x13c6]; - local_28 = (float)(int)local_1bc * 26.0 + (float)pBVar4[0x13c7]; + (*(undefined4 *)((char *)&(local_34) + 0x8)) = (float)local_1a8 + (float)pBVar4[0x13c6]; + local_28 = (float)GHIDRA_INT(local_1bc) * 26.0 + (float)pBVar4[0x13c7]; render_wall_detail(pBVar4,(RNG *)(pBVar4 + 0x13ca),(Vector *)(local_34 + 8),0,0, (byte)local_1a4,SUB41(local_1ac,0),local_1cc); room = pBVar4[0x13c6]; local_28 = local_1b4 + (float)pBVar4[0x13c7]; local_1b0 = (int *)((float)gridWidth * 26.0); LAB_0093b050: - local_34._8_4_ = (float)local_1b0 + (float)room; + (*(undefined4 *)((char *)&(local_34) + 0x8)) = (float)local_1b0 + (float)room; render_wall_detail(pBVar4,(RNG *)(pBVar4 + 0x13ca),(Vector *)(local_34 + 8),1,0, (byte)local_1a4,SUB41(local_1ac,0),local_1cc); room = pBVar4[0x13c6]; @@ -4125,20 +4125,20 @@ LAB_0093b050: local_1b8 = (float)gridHeight * 26.0; local_28 = local_1b8 + (float)pBVar4[0x13c7]; if (iVar3 != 0xb) goto LAB_0093b34e; - local_34._8_4_ = (float)(int)local_1c8 * 26.0 + (float)room; + (*(undefined4 *)((char *)&(local_34) + 0x8)) = (float)GHIDRA_INT(local_1c8) * 26.0 + (float)room; render_wall_detail(pBVar4,(RNG *)(pBVar4 + 0x13ca),(Vector *)(local_34 + 8),0,1, (byte)local_1a4,SUB41(local_1ac,0),local_1cc); - local_34._8_4_ = (float)local_1a8 + (float)pBVar4[0x13c6]; - local_28 = (float)(int)local_1b4 * 26.0 + (float)pBVar4[0x13c7]; + (*(undefined4 *)((char *)&(local_34) + 0x8)) = (float)local_1a8 + (float)pBVar4[0x13c6]; + local_28 = (float)GHIDRA_INT(local_1b4) * 26.0 + (float)pBVar4[0x13c7]; render_wall_detail(pBVar4,(RNG *)(pBVar4 + 0x13ca),(Vector *)(local_34 + 8),0,1, (byte)local_1a4,SUB41(local_1ac,0),local_1cc); room = pBVar4[0x13c6]; local_28 = local_1b8 + (float)pBVar4[0x13c7]; LAB_0093b198: - local_34._8_4_ = (float)local_1b0 + (float)room; + (*(undefined4 *)((char *)&(local_34) + 0x8)) = (float)local_1b0 + (float)room; } else { - local_34._8_4_ = (float)local_1a8 + (float)local_1a4[0x13c6]; + (*(undefined4 *)((char *)&(local_34) + 0x8)) = (float)local_1a8 + (float)local_1a4[0x13c6]; local_1a4 = pBVar6; render_wall_detail(pBVar4,rng,(Vector *)(local_34 + 8),0,0,isPreAscentMomRoom, SUB41(local_1ac,0),fVar10); @@ -4146,11 +4146,11 @@ LAB_0093b198: local_28 = local_1b4 + (float)pBVar4[0x13c7]; local_1b0 = (int *)((float)gridWidth * 26.0); if (iVar3 != 10) goto LAB_0093b050; - local_34._8_4_ = (float)(gridWidth + -0xd) * 26.0 + (float)room; + (*(undefined4 *)((char *)&(local_34) + 0x8)) = (float)(gridWidth + -0xd) * 26.0 + (float)room; render_wall_detail(pBVar4,(RNG *)(pBVar4 + 0x13ca),(Vector *)(local_34 + 8),1,0, (byte)local_1a4,SUB41(local_1ac,0),local_1cc); - local_34._8_4_ = (float)local_1b0 + (float)pBVar4[0x13c6]; - local_28 = (float)(int)local_1bc * 26.0 + (float)pBVar4[0x13c7]; + (*(undefined4 *)((char *)&(local_34) + 0x8)) = (float)local_1b0 + (float)pBVar4[0x13c6]; + local_28 = (float)GHIDRA_INT(local_1bc) * 26.0 + (float)pBVar4[0x13c7]; render_wall_detail(pBVar4,(RNG *)(pBVar4 + 0x13ca),(Vector *)(local_34 + 8),1,0, (byte)local_1a4,SUB41(local_1ac,0),local_1cc); room = pBVar4[0x13c6]; @@ -4158,17 +4158,17 @@ LAB_0093b198: local_1b8 = (float)gridHeight * 26.0; local_28 = local_1b8 + (float)pBVar4[0x13c7]; LAB_0093b34e: - local_34._8_4_ = (float)local_1a8 + (float)room; + (*(undefined4 *)((char *)&(local_34) + 0x8)) = (float)local_1a8 + (float)room; render_wall_detail(pBVar4,(RNG *)(pBVar4 + 0x13ca),(Vector *)(local_34 + 8),0,1, (byte)local_1a4,SUB41(local_1ac,0),local_1cc); room = pBVar4[0x13c6]; local_28 = local_1b8 + (float)pBVar4[0x13c7]; if (iVar3 != 0xc) goto LAB_0093b198; - local_34._8_4_ = (float)(gridWidth + -0xd) * 26.0 + (float)room; + (*(undefined4 *)((char *)&(local_34) + 0x8)) = (float)(gridWidth + -0xd) * 26.0 + (float)room; render_wall_detail(pBVar4,(RNG *)(pBVar4 + 0x13ca),(Vector *)(local_34 + 8),1,1, (byte)local_1a4,SUB41(local_1ac,0),local_1cc); - local_34._8_4_ = (float)local_1b0 + (float)pBVar4[0x13c6]; - local_28 = (float)(int)local_1b4 * 26.0 + (float)pBVar4[0x13c7]; + (*(undefined4 *)((char *)&(local_34) + 0x8)) = (float)local_1b0 + (float)pBVar4[0x13c6]; + local_28 = (float)GHIDRA_INT(local_1b4) * 26.0 + (float)pBVar4[0x13c7]; } render_wall_detail(pBVar4,(RNG *)(pBVar4 + 0x13ca),(Vector *)(local_34 + 8),1,1,(byte)local_1a4, SUB41(local_1ac,0),local_1cc); @@ -4212,7 +4212,7 @@ void Backdrop::spawn_detail_effects(void *backdrop, Vector *offset, byte isFlipX do { if (((*(int *)((char *)backdrop + 0x34) != 0) && (nullFrame = AnimationState::GetNullFrameById - ((AnimationState *)((int)backdrop + 0x30),nullIdx), + ((AnimationState *)(GHIDRA_INT(backdrop) + 0x30),nullIdx), nullFrame != (float *)0x0)) && (*(char *)(nullFrame + 3) != '\0')) { spawnPos.x = *nullFrame / 0.65; spawnPos.y = nullFrame[1] / 0.65; @@ -4228,9 +4228,9 @@ void Backdrop::spawn_detail_effects(void *backdrop, Vector *offset, byte isFlipX detail = ((Game *)(g_game))->Game::SpawnEx(1000,0x79,&spawnPos,&g_vectorZero,(Entity *)0x0,0,seed,0); flags = detail->_flags; vtable = *(int *)detail; - flagsHighPtr = (uint *)((int)&detail->_flags + 4); + flagsHighPtr = (uint *)(GHIDRA_INT(&detail->_flags) + 4); *flagsHighPtr = *flagsHighPtr | 0x40; - *(int *)&detail->_flags = (int)flags; + *(int *)&detail->_flags = GHIDRA_INT(flags); detail->_renderZOffset = 0x40000000; pAVar1 = &detail[1]._sprite; (pAVar1->_animDefaultName)._buf[8] = '\0'; @@ -4253,7 +4253,7 @@ void Backdrop::Init(uint backdropId, byte LoadGraphics) Game *game; int roomHeight; - if (((int)backdropId < 0) || (0x3e < (int)backdropId)) { + if ((GHIDRA_INT(backdropId) < 0) || (0x3e < GHIDRA_INT(backdropId))) { backdropId = 1; } this[0x54] = (Backdrop)backdropId; @@ -4307,7 +4307,7 @@ void Backdrop::load_details() local_14 = 0xffffffff; puStack_18 = &LAB_00b0b3e5; local_1c = ExceptionList; - stackCookie = __security_cookie ^ (uint)(imageRef + 100); + stackCookie = __security_cookie ^ GHIDRA_UINT((imageRef + 100)); ExceptionList = &local_1c; *(undefined1 *)(this + 8) = 0; ((ANM2 *)((ANM2 *)(this + 0xf)))->ANM2::Reset(); @@ -4319,20 +4319,20 @@ void Backdrop::load_details() tmpString._buf[1] = '\0'; tmpString._buf[2] = '\0'; tmpString._buf[3] = '\0'; - tmpString._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = std::_Allocate(0x20); tmpString._size = 0x1a; tmpString._capacity = 0x1f; - builtin_strncpy((char *)tmpString._buf._0_4_,"gfx/backdrop/controls.anm2",0x1b); + builtin_strncpy((*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)),"gfx/backdrop/controls.anm2",0x1b); local_14 = 0; ((ANM2 *)((ANM2 *)(this + 0x1414)))->ANM2::Load(&tmpString,1); local_14 = 0xffffffff; if (0xf < tmpString._capacity) { uVar7 = tmpString._capacity + 1; - freeBlock = (char *)tmpString._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)); if (0xfff < uVar7) { - freeBlock = *(char **)(tmpString._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar7 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -4347,20 +4347,20 @@ void Backdrop::load_details() tmpString._buf[1] = '\0'; tmpString._buf[2] = '\0'; tmpString._buf[3] = '\0'; - tmpString._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = std::_Allocate(0x30); tmpString._size = 0x22; tmpString._capacity = 0x2f; - builtin_strncpy((char *)tmpString._buf._0_4_,"gfx/backdrop/controls_buttons.anm2",0x23); + builtin_strncpy((*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)),"gfx/backdrop/controls_buttons.anm2",0x23); local_14 = 1; ((ANM2 *)((ANM2 *)(this + 0x1459)))->ANM2::Load(&tmpString,1); local_14 = 0xffffffff; if (0xf < tmpString._capacity) { uVar7 = tmpString._capacity + 1; - freeBlock = (char *)tmpString._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)); if (0xfff < uVar7) { - freeBlock = *(char **)(tmpString._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar7 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -4381,29 +4381,29 @@ void Backdrop::load_details() } BVar5 = this[0x54]; if ((BVar5 == (Backdrop)0x1a) || (BVar5 == (Backdrop)0x12)) { - BVar5 = (Backdrop)(this + (int)BVar5 * 0x4f + 0x56); - if (0xf < (uint)*(Backdrop *)((char *)BVar5 + 0x14)) { + BVar5 = (Backdrop)(this + GHIDRA_INT(BVar5) * 0x4f + 0x56); + if (0xf < GHIDRA_UINT(*(Backdrop *)((char *)BVar5 + 0x14))) { BVar5 = *(Backdrop *)BVar5; } tmpString._size = 0; tmpString._capacity = 0xf; - tmpString._buf._0_4_ = (char *)0x0; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (char *)0x0; BVar6 = BVar5; do { strChar = *(char *)BVar6; - BVar6 = (Backdrop)((int)BVar6 + 1); + BVar6 = (Backdrop)(GHIDRA_INT(BVar6) + 1); } while (strChar != '\0'); - ((std::string *)(tmpString._buf))->std::string::assign((byte *)BVar5,(int)BVar6 - (int)((int)BVar5 + 1)); + ((std::string *)(tmpString._buf))->std::string::assign((byte *)BVar5,GHIDRA_INT(BVar6) - GHIDRA_INT((GHIDRA_INT(BVar5) + 1))); local_14 = 2; ((ANM2 *)((ANM2 *)(this + 0xf)))->ANM2::Load(&tmpString,1); local_14 = 0xffffffff; if (0xf < tmpString._capacity) { uVar7 = tmpString._capacity + 1; - freeBlock = (char *)tmpString._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)); if (0xfff < uVar7) { - freeBlock = *(char **)(tmpString._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar7 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)freeBlock))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) goto LAB_0093e16c; } operator_delete(freeBlock,uVar7); @@ -4426,26 +4426,26 @@ void Backdrop::load_details() g_graphicsManager_blendMode[3] = 1; g_graphicsManager_blendMode[4] = 7; BVar5 = this[0x1c]; - g_graphicsManager_blendMode[0]._0_1_ = (undefined1)iVar8; - g_graphicsManager_blendMode[0]._1_1_ = SUB41(iVar8,1); - g_graphicsManager_blendMode[0]._2_1_ = SUB41(iVar8,2); - g_graphicsManager_blendMode[0]._3_1_ = SUB41(iVar8,3); + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[0]) + 0x0)) = (undefined1)iVar8; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[0]) + 0x1)) = SUB41(iVar8,1); + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[0]) + 0x2)) = SUB41(iVar8,2); + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[0]) + 0x3)) = SUB41(iVar8,3); tmpString._buf[4] = (undefined1)g_graphicsManager_blendMode[0]; - tmpString._buf[5] = g_graphicsManager_blendMode[0]._1_1_; - tmpString._buf[6] = g_graphicsManager_blendMode[0]._2_1_; - tmpString._buf[7] = g_graphicsManager_blendMode[0]._3_1_; + tmpString._buf[5] = (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[0]) + 0x1)); + tmpString._buf[6] = (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[0]) + 0x2)); + tmpString._buf[7] = (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[0]) + 0x3)); tmpString._buf[8] = (undefined1)g_graphicsManager_blendMode[1]; - tmpString._buf[9] = g_graphicsManager_blendMode[1]._1_1_; - tmpString._buf[10] = g_graphicsManager_blendMode[1]._2_1_; - tmpString._buf[0xb] = g_graphicsManager_blendMode[1]._3_1_; - g_graphicsManager_blendMode[2]._0_1_ = (undefined1)savedBlendMode2; - g_graphicsManager_blendMode[2]._1_1_ = SUB41(savedBlendMode2,1); - g_graphicsManager_blendMode[2]._2_1_ = SUB41(savedBlendMode2,2); - g_graphicsManager_blendMode[2]._3_1_ = SUB41(savedBlendMode2,3); + tmpString._buf[9] = (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[1]) + 0x1)); + tmpString._buf[10] = (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[1]) + 0x2)); + tmpString._buf[0xb] = (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[1]) + 0x3)); + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[2]) + 0x0)) = (undefined1)savedBlendMode2; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[2]) + 0x1)) = SUB41(savedBlendMode2,1); + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[2]) + 0x2)) = SUB41(savedBlendMode2,2); + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[2]) + 0x3)) = SUB41(savedBlendMode2,3); tmpString._buf[0xc] = (undefined1)g_graphicsManager_blendMode[2]; - tmpString._buf[0xd] = g_graphicsManager_blendMode[2]._1_1_; - tmpString._buf[0xe] = g_graphicsManager_blendMode[2]._2_1_; - tmpString._buf[0xf] = g_graphicsManager_blendMode[2]._3_1_; + tmpString._buf[0xd] = (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[2]) + 0x1)); + tmpString._buf[0xe] = (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[2]) + 0x2)); + tmpString._buf[0xf] = (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[2]) + 0x3)); g_graphicsManager_blendMode[0] = iVar1; g_graphicsManager_blendMode[1] = newBlendMode1; g_graphicsManager_blendMode[2] = iVar2; @@ -4467,20 +4467,20 @@ LAB_0093e5fc: isLess = bVar3 < *pbVar4; if (bVar3 != *pbVar4) { LAB_0093e5e4: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_0093e5e9; } if (bVar3 == 0) break; bVar3 = *(byte *)((char *)BVar5 + 1); isLess = bVar3 < pbVar4[1]; if (bVar3 != pbVar4[1]) goto LAB_0093e5e4; - BVar5 = (Backdrop)((int)BVar5 + 2); + BVar5 = (Backdrop)(GHIDRA_INT(BVar5) + 2); pbVar4 = pbVar4 + 2; } while (bVar3 != 0); uVar7 = 0; LAB_0093e5e9: if ((uVar7 != 0) || - ((*(char *)((int)this[0x1c] + 0x34) != '\0' && (*(char *)(this + 0x20) == '\0')))) + ((*(char *)(GHIDRA_INT(this[0x1c]) + 0x34) != '\0' && (*(char *)(this + 0x20) == '\0')))) goto LAB_0093e5fc; } g_graphicsManager_flags = g_graphicsManager_flags & 0xfffffffd; @@ -4488,20 +4488,20 @@ LAB_0093e5e9: local_80.x = DAT_00c35e70 + (float)this[0x13c6]; ((ANM2 *)((ANM2 *)(this + 0xf)))->ANM2::Render(&local_80,&g_vectorZero,&g_vectorZero); g_graphicsManager_flags = g_graphicsManager_flags | 2; - g_graphicsManager_blendMode[0]._0_1_ = tmpString._buf[4]; - g_graphicsManager_blendMode[0]._1_1_ = tmpString._buf[5]; - g_graphicsManager_blendMode[0]._2_1_ = tmpString._buf[6]; - g_graphicsManager_blendMode[0]._3_1_ = tmpString._buf[7]; - g_graphicsManager_blendMode[1]._0_1_ = tmpString._buf[8]; - g_graphicsManager_blendMode[1]._1_1_ = tmpString._buf[9]; - g_graphicsManager_blendMode[1]._2_1_ = tmpString._buf[10]; - g_graphicsManager_blendMode[1]._3_1_ = tmpString._buf[0xb]; - g_graphicsManager_blendMode[2]._0_1_ = tmpString._buf[0xc]; - g_graphicsManager_blendMode[2]._1_1_ = tmpString._buf[0xd]; - g_graphicsManager_blendMode[2]._2_1_ = tmpString._buf[0xe]; - g_graphicsManager_blendMode[2]._3_1_ = tmpString._buf[0xf]; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[0]) + 0x0)) = tmpString._buf[4]; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[0]) + 0x1)) = tmpString._buf[5]; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[0]) + 0x2)) = tmpString._buf[6]; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[0]) + 0x3)) = tmpString._buf[7]; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[1]) + 0x0)) = tmpString._buf[8]; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[1]) + 0x1)) = tmpString._buf[9]; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[1]) + 0x2)) = tmpString._buf[10]; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[1]) + 0x3)) = tmpString._buf[0xb]; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[2]) + 0x0)) = tmpString._buf[0xc]; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[2]) + 0x1)) = tmpString._buf[0xd]; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[2]) + 0x2)) = tmpString._buf[0xe]; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[2]) + 0x3)) = tmpString._buf[0xf]; g_graphicsManager_blendMode[3] = tmpString._size; - g_graphicsManager_blendMode[4] = (int)local_70; + g_graphicsManager_blendMode[4] = GHIDRA_INT(local_70); _glfw_context_reset(1); BVar5 = this[0x1c]; if (BVar5 != (Backdrop)0x0) { @@ -4515,14 +4515,14 @@ LAB_0093e5e9: isLess = bVar3 < *pbVar4; if (bVar3 != *pbVar4) { LAB_0093e6e2: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_0093e6e7; } if (bVar3 == 0) break; bVar3 = *(byte *)((char *)BVar6 + 1); isLess = bVar3 < pbVar4[1]; if (bVar3 != pbVar4[1]) goto LAB_0093e6e2; - BVar6 = (Backdrop)((int)BVar6 + 2); + BVar6 = (Backdrop)(GHIDRA_INT(BVar6) + 2); pbVar4 = pbVar4 + 2; } while (bVar3 != 0); uVar7 = 0; @@ -4539,7 +4539,7 @@ LAB_0093e6e7: } if (BVar5 == (Backdrop)0x23) { BVar5 = (Backdrop)(this + 0xb23); - if (0xf < (uint)this[0xb28]) { + if (0xf < GHIDRA_UINT(this[0xb28])) { BVar5 = *(Backdrop *)BVar5; } ((std::string *)(tmpString._buf))->std::string::string_from_cstr((byte *)BVar5); @@ -4548,11 +4548,11 @@ LAB_0093e6e7: local_14 = 0xffffffff; if (0xf < tmpString._capacity) { uVar7 = tmpString._capacity + 1; - freeBlock = (char *)tmpString._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)); if (0xfff < uVar7) { - freeBlock = *(char **)(tmpString._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar7 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -4575,17 +4575,17 @@ LAB_0093e6e7: BVar5 = (Backdrop)0x0; if (this[0x2f] != (Backdrop)0x0) { do { - BVar6 = (Backdrop)((int)BVar5 + 1); + BVar6 = (Backdrop)(GHIDRA_INT(BVar5) + 1); isLayerVisible = BVar6 == local_70; layer = ((ANM2 *)((ANM2 *)(this + 0xf)))->ANM2::GetLayer((byte *)BVar5); layer->_visible = isLayerVisible; BVar5 = BVar6; - } while ((uint)BVar6 < (uint)this[0x2f]); + } while (GHIDRA_UINT(BVar6) < GHIDRA_UINT(this[0x2f])); } goto LAB_0093e713; } if ((BVar5 == (Backdrop)0x34) || (BVar5 == (Backdrop)0x35)) { - BVar5 = (Backdrop)(this + (int)BVar5 * 0x4f + 0x56); + BVar5 = (Backdrop)(this + GHIDRA_INT(BVar5) * 0x4f + 0x56); if (0xf < *(uint *)((char *)BVar5 + 0x14)) { BVar5 = *(Backdrop *)BVar5; } @@ -4595,18 +4595,18 @@ LAB_0093e6e7: local_14 = 0xffffffff; if (0xf < tmpString._capacity) { uVar7 = tmpString._capacity + 1; - freeBlock = (char *)tmpString._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)); if (0xfff < uVar7) { - freeBlock = *(char **)(tmpString._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar7 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)freeBlock))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) goto LAB_0093e16c; } operator_delete(freeBlock,uVar7); } tmpString._size = 0; tmpString._capacity = 0xf; - tmpString._buf._0_4_ = tmpString._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) & 0xffffff00; iVar8 = *(int *)(*(int *)(*(int *)((char *)g_game->_room + 4) + 0x10) + 0x10) + -10; LAB_0093ddb8: ((ANM2 *)((ANM2 *)(this + 0xf)))->ANM2::SetFrame((std_string *)s_Idle,iVar8); @@ -4617,7 +4617,7 @@ LAB_0093ddb8: } if (BVar5 == (Backdrop)0x36) { BVar5 = (Backdrop)(this + 0x1100); - if (0xf < (uint)this[0x1105]) { + if (0xf < GHIDRA_UINT(this[0x1105])) { BVar5 = *(Backdrop *)BVar5; } ((std::string *)(tmpString._buf))->std::string::string_from_cstr((byte *)BVar5); @@ -4626,11 +4626,11 @@ LAB_0093ddb8: local_14 = 0xffffffff; if (0xf < tmpString._capacity) { uVar7 = tmpString._capacity + 1; - freeBlock = (char *)tmpString._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)); if (0xfff < uVar7) { - freeBlock = *(char **)(tmpString._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar7 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -4640,59 +4640,59 @@ LAB_0093ddb8: iVar8 = 0; goto LAB_0093ddb8; } - ((std::string *)(imagePath._buf))->std::string::string(this + (int)BVar5 * 0x4f + 0x56); + ((std::string *)(imagePath._buf))->std::string::string(this + GHIDRA_INT(BVar5) * 0x4f + 0x56); local_14 = 6; if (imagePath._size != 0) { detailsPath = &imagePath; if (0xf < imagePath._capacity) { - detailsPath = (std_string *)imagePath._buf._0_4_; + detailsPath = (*(undefined4 *)((char *)&((std_string *)imagePath._buf) + 0x0)); } loadedImage = Manager::LoadImage(&local_80,(byte *)detailsPath); - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; ((KAGE::SmartPointer *)(this + 9))->KAGE::SmartPointer::operator_assign(loadedImage); - local_14 = CONCAT31(local_14._1_3_,6); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),6); FUN_0040c440(); } BVar5 = this[0x54]; - if (this[(int)BVar5 * 0x4f + 0x60] != (Backdrop)0x0) { - BVar5 = (Backdrop)(this + (int)BVar5 * 0x4f + 0x5c); + if (this[GHIDRA_INT(BVar5) * 0x4f + 0x60] != (Backdrop)0x0) { + BVar5 = (Backdrop)(this + GHIDRA_INT(BVar5) * 0x4f + 0x5c); if (0xf < *(uint *)((char *)BVar5 + 0x14)) { BVar5 = *(Backdrop *)BVar5; } loadedImage = Manager::LoadImage(imageRef,(byte *)BVar5); - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; ((KAGE::SmartPointer *)(this + 0xb))->KAGE::SmartPointer::operator_assign(loadedImage); - local_14 = CONCAT31(local_14._1_3_,6); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),6); FUN_0040c440(); FUN_00a123f0(0,0); BVar5 = this[0x54]; } game = g_game; if ((*(int *)(*(int *)((char *)g_game->_room->_descriptor + 0x10) + 0x48) - 9U < 4) && - (this[(int)BVar5 * 0x4f + 0x66] != (Backdrop)0x0)) { - BVar5 = (Backdrop)(this + (int)BVar5 * 0x4f + 0x62); + (this[GHIDRA_INT(BVar5) * 0x4f + 0x66] != (Backdrop)0x0)) { + BVar5 = (Backdrop)(this + GHIDRA_INT(BVar5) * 0x4f + 0x62); if (0xf < *(uint *)((char *)BVar5 + 0x14)) { BVar5 = *(Backdrop *)BVar5; } loadedImage = Manager::LoadImage(imageRef,(byte *)BVar5); - local_14._0_1_ = 9; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; LAB_0093df32: ((KAGE::SmartPointer *)(this + 0xd))->KAGE::SmartPointer::operator_assign(loadedImage); - local_14 = CONCAT31(local_14._1_3_,6); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),6); FUN_0040c440(); game = g_game; } else { - local_70 = (Backdrop)((int)BVar5 * 0x13c); - if ((*(int *)((byte *)((int)local_70 + 0x1b0) + (int)this) != 0) && + local_70 = (Backdrop)(GHIDRA_INT(BVar5) * 0x13c); + if ((*(int *)((byte *)(GHIDRA_INT(local_70) + 0x1b0) + GHIDRA_INT(this)) != 0) && ((((iVar8 = ((Room *)(g_game->_room))->Room::GetRoomShape(), iVar8 == 2 || (iVar8 == 3)) || (iVar8 == 5)) || (iVar8 == 7)))) { - pbVar4 = (byte *)((int)local_70 + 0x1a0) + (int)this; + pbVar4 = (byte *)(GHIDRA_INT(local_70) + 0x1a0) + GHIDRA_INT(this); if (0xf < *(uint *)(pbVar4 + 0x14)) { pbVar4 = *(byte **)pbVar4; } loadedImage = Manager::LoadImage(imageRef,pbVar4); - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; goto LAB_0093df32; } } @@ -4705,20 +4705,20 @@ LAB_0093df32: tmpString._buf[1] = '\0'; tmpString._buf[2] = '\0'; tmpString._buf[3] = '\0'; - tmpString._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = std::_Allocate(0x30); tmpString._size = 0x24; tmpString._capacity = 0x2f; - builtin_strncpy((char *)tmpString._buf._0_4_,"gfx/backdrop/01x_downpour_pipes.anm2",0x25); - local_14._0_1_ = 0xb; + builtin_strncpy((*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)),"gfx/backdrop/01x_downpour_pipes.anm2",0x25); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; ((ANM2 *)((ANM2 *)(this + 0x13cf)))->ANM2::Load(&tmpString,1); - local_14 = CONCAT31(local_14._1_3_,6); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),6); if (0xf < tmpString._capacity) { uVar7 = tmpString._capacity + 1; - freeBlock = (char *)tmpString._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)); if (0xfff < uVar7) { - freeBlock = *(char **)(tmpString._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar7 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -4726,7 +4726,7 @@ LAB_0093df32: operator_delete(freeBlock,uVar7); } local_70 = (Backdrop)(this + 0x13d5); - if (0xf < (uint)this[0x13da]) { + if (0xf < GHIDRA_UINT(this[0x13da])) { local_70 = *(Backdrop *)local_70; } BVar5 = this[0x13dc]; @@ -4743,14 +4743,14 @@ LAB_0093df32: bVar3 = *(byte *)((char *)BVar5 + 1); isLess = bVar3 < *(byte *)((char *)BVar6 + 1); if (bVar3 != *(byte *)((char *)BVar6 + 1)) goto LAB_0093e060; - BVar5 = (Backdrop)((int)BVar5 + 2); - BVar6 = (Backdrop)((int)BVar6 + 2); + BVar5 = (Backdrop)(GHIDRA_INT(BVar5) + 2); + BVar6 = (Backdrop)(GHIDRA_INT(BVar6) + 2); } while (bVar3 != 0); LAB_0093e05c: uVar7 = 0; LAB_0093e065: if ((uVar7 == 0) && - ((*(char *)((int)this[0x13dc] + 0x34) == '\0' || (*(char *)(this + 0x13e0) != '\0')))) + ((*(char *)(GHIDRA_INT(this[0x13dc]) + 0x34) == '\0' || (*(char *)(this + 0x13e0) != '\0')))) goto switchD_0093df66_caseD_21; } break; @@ -4764,10 +4764,10 @@ LAB_0093e065: tmpString._buf[1] = '\0'; tmpString._buf[2] = '\0'; tmpString._buf[3] = '\0'; - tmpString._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = std::_Allocate(0x30); tmpString._size = 0x23; - builtin_strncpy((char *)tmpString._buf._0_4_,"gfx/backdrop/03x_mines_details.anm2",0x24); - local_14._0_1_ = 0xd; + builtin_strncpy((*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)),"gfx/backdrop/03x_mines_details.anm2",0x24); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xd; } else { tmpString._size = 0; @@ -4776,21 +4776,21 @@ LAB_0093e065: tmpString._buf[1] = '\0'; tmpString._buf[2] = '\0'; tmpString._buf[3] = '\0'; - tmpString._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = std::_Allocate(0x30); tmpString._size = 0x28; - builtin_strncpy((char *)tmpString._buf._0_4_,"gfx/backdrop/03x_mines_details_dark.anm2",0x29); - local_14._0_1_ = 0xc; + builtin_strncpy((*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)),"gfx/backdrop/03x_mines_details_dark.anm2",0x29); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; } tmpString._capacity = 0x2f; ((ANM2 *)((ANM2 *)(this + 0x13cf)))->ANM2::Load(&tmpString,1); - local_14 = CONCAT31(local_14._1_3_,6); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),6); if (0xf < tmpString._capacity) { uVar7 = tmpString._capacity + 1; - freeBlock = (char *)tmpString._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)); if (0xfff < uVar7) { - freeBlock = *(char **)(tmpString._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar7 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { LAB_0093e16c: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -4799,7 +4799,7 @@ LAB_0093e16c: operator_delete(freeBlock,uVar7); } local_70 = (Backdrop)(this + 0x13d5); - if (0xf < (uint)this[0x13da]) { + if (0xf < GHIDRA_UINT(this[0x13da])) { local_70 = *(Backdrop *)local_70; } BVar5 = this[0x13dc]; @@ -4816,8 +4816,8 @@ LAB_0093e16c: bVar3 = *(byte *)((char *)BVar5 + 1); isLess = bVar3 < *(byte *)((char *)BVar6 + 1); if (bVar3 != *(byte *)((char *)BVar6 + 1)) goto LAB_0093e060; - BVar5 = (Backdrop)((int)BVar5 + 2); - BVar6 = (Backdrop)((int)BVar6 + 2); + BVar5 = (Backdrop)(GHIDRA_INT(BVar5) + 2); + BVar6 = (Backdrop)(GHIDRA_INT(BVar6) + 2); } while (bVar3 != 0); uVar7 = 0; goto LAB_0093e065; @@ -4827,7 +4827,7 @@ LAB_0093e16c: goto switchD_0093df66_caseD_21; case (Backdrop)0x2a: ((std::string *)(tmpString._buf))->std::string::string_from_cstr((byte *)"gfx/backdrop/05x_mausoleum_chains.anm2"); - local_14 = CONCAT31(local_14._1_3_,0x10); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x10); ((ANM2 *)((ANM2 *)(this + 0x13cf)))->ANM2::Load(&tmpString,1); detailsPath = &tmpString; goto LAB_0093e391; @@ -4836,9 +4836,9 @@ LAB_0093e16c: if (((*(uint *)(*(int *)((char *)game->_room + 4) + 0x44) >> 9 & 1) == 0) && (BVar5 != (Backdrop)0x3b)) { ((std::string *)(tmpString._buf))->std::string::string_from_cstr((byte *)"gfx/backdrop/04x_ashpit_details.anm2"); - local_14._0_1_ = 0xf; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xf; ((ANM2 *)((ANM2 *)(this + 0x13cf)))->ANM2::Load(&tmpString,1); - local_14 = CONCAT31(local_14._1_3_,6); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),6); ((std::string *)(tmpString._buf))->std::string::_Tidy_deallocate(); } else { @@ -4848,21 +4848,21 @@ LAB_0093e16c: tmpString._buf[1] = '\0'; tmpString._buf[2] = '\0'; tmpString._buf[3] = '\0'; - tmpString._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = std::_Allocate(0x30); tmpString._size = 0x29; tmpString._capacity = 0x2f; - builtin_strncpy((char *)tmpString._buf._0_4_,"gfx/backdrop/04x_ashpit_details_dark.anm2",0x2a) + builtin_strncpy((*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)),"gfx/backdrop/04x_ashpit_details_dark.anm2",0x2a) ; - local_14._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xe; ((ANM2 *)((ANM2 *)(this + 0x13cf)))->ANM2::Load(&tmpString,1); - local_14 = CONCAT31(local_14._1_3_,6); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),6); if (0xf < tmpString._capacity) { uVar7 = tmpString._capacity + 1; - freeBlock = (char *)tmpString._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)); if (0xfff < uVar7) { - freeBlock = *(char **)(tmpString._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar7 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)freeBlock))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) goto LAB_0093e16c; } operator_delete(freeBlock,uVar7); @@ -4871,11 +4871,11 @@ LAB_0093e16c: goto LAB_0093e3a0; case (Backdrop)0x2f: ((std::string *)(gehennaPath._buf))->std::string::string_from_cstr((byte *)"gfx/backdrop/06x_gehenna_details.anm2"); - local_14 = CONCAT31(local_14._1_3_,0x11); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x11); ((ANM2 *)((ANM2 *)(this + 0x13cf)))->ANM2::Load(&gehennaPath,1); detailsPath = &gehennaPath; LAB_0093e391: - local_14 = CONCAT31(local_14._1_3_,6); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),6); ((std::string *)(detailsPath->_buf))->std::string::_Tidy_deallocate(); LAB_0093e3a0: ((Sprite *)((Sprite *)(this + 0x13cf)))->Sprite::Play((std_string *)(this + 0x13d5),0); @@ -4902,7 +4902,7 @@ LAB_0093e713: ExceptionList = local_1c; return; LAB_0093e060: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_0093e065; } @@ -5034,7 +5034,7 @@ void Backdrop::RenderFloor(Vector *param_1, ColorMod param_2) uint local_14; int backdropType; - local_14 = __security_cookie ^ (uint)auStack_148; + local_14 = __security_cookie ^ GHIDRA_UINT(auStack_148); renderOffset = param_1; savedBlendMode0 = g_graphicsManager_blendMode[0]; savedBlendMode1 = g_graphicsManager_blendMode[1]; @@ -5125,7 +5125,7 @@ void Backdrop::RenderFloor(Vector *param_1, ColorMod param_2) local_134.x = ((float)in_ECX[0x13c8] - (float)in_ECX[0x13c6]) + 0.0; local_134.y = ((float)in_ECX[0x13c9] - (float)in_ECX[0x13c7]) + 26.0; g_currentShader = shader; - quad_set_rect(quad,&local_13c,&local_134,(int)unused); + quad_set_rect(quad,&local_13c,&local_134,GHIDRA_INT(unused)); ((KColor *)(&white))->KColor::SetFromARGB(0xffffffff); local_13c.x = param_1->x + 52.0; pVVar6 = &local_134; @@ -5151,7 +5151,7 @@ void Backdrop::RenderFloor(Vector *param_1, ColorMod param_2) isLess = bVar1 < *unused_00; if (bVar1 != *unused_00) { LAB_0093eca2: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0093eca7; } if (bVar1 == 0) break; @@ -5176,7 +5176,7 @@ LAB_0093eca7: local_13c.x = (52.0 - fVar5) + DAT_00c35e70; local_13c.y = (52.0 - fVar3) + DAT_00c35e74; g_currentShader = shader; - quad_set_rect(quad,&local_13c,&local_134,(int)unused_00); + quad_set_rect(quad,&local_13c,&local_134,GHIDRA_INT(unused_00)); ((KColor *)(&white))->KColor::SetFromARGB(0xffffffff); pVVar6 = &local_134; local_13c.x = ((param_1->x + fVar4) - fVar5) + DAT_00c35e70; @@ -5204,7 +5204,7 @@ LAB_0093ef9f: g_graphicsManager_blendMode[2] = savedBlendMode2; g_graphicsManager_blendMode[3] = savedBlendMode3; g_graphicsManager_blendMode[4] = savedBlendMode4; - shader_cache_find((int)unused); + shader_cache_find(GHIDRA_INT(unused)); return; } @@ -5263,7 +5263,7 @@ void Backdrop::render_floor_surface(float *param_1, ColorMod param_2) surfaceSize.y = (*(float *)(in_ECX + 0x4f24) - *(float *)(in_ECX + 0x4f1c)) + 26.0; local_d4 = 0x42500000; local_d0 = 0x42500000; - local_b4 = CONCAT31(local_b4._1_3_,1); + local_b4 = CONCAT31((*(undefined1 *)((char *)&(local_b4) + 0x1)),1); local_cc = surfaceSize.x + 52.0; local_c0 = surfaceSize.y + 52.0; g_currentShader = shader; @@ -5279,8 +5279,8 @@ void Backdrop::render_floor_surface(float *param_1, ColorMod param_2) ((KAGE::SmartPointer *)(auStackY_180 + 0x88))->KAGE::SmartPointer::operator_assign((undefined4 *)(in_ECX + 0x10)); apply_sprite_shader_params(¶m_2,1,size,imageRefCount); (**(code **)(**(int **)(in_ECX + 0x10) + 0x14))(&local_d4); - g_graphicsManager_blendMode[0] = (int)local_bc; - g_graphicsManager_blendMode[1] = (int)local_b8; + g_graphicsManager_blendMode[0] = GHIDRA_INT(local_bc); + g_graphicsManager_blendMode[1] = GHIDRA_INT(local_b8); g_graphicsManager_blendMode[2] = local_b4; g_graphicsManager_blendMode[3] = local_b0; g_graphicsManager_blendMode[4] = iVar1; @@ -5402,7 +5402,7 @@ void Backdrop::RenderWalls(Vector *renderOffset, ColorMod color) if (BVar7 == (Backdrop)0x12) { fVar11 = g_vectorOne.x * 26.0 * 0.5; fVar8 = g_vectorOne.y * 26.0 * 0.5; - auStack_1d8._4_4_ = fVar11 + fVar11 + ((float)this[0x13c8] - (float)this[0x13c6]); + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = fVar11 + fVar11 + ((float)this[0x13c8] - (float)this[0x13c6]); local_1d0 = (undefined1 [4])(((float)this[0x13c9] - (float)this[0x13c7]) + fVar8 + fVar8); local_120[0].x = ((renderOffset->x + 52.0) - fVar11) + DAT_00c35e70; local_120[0].y = ((renderOffset->y + 52.0) - fVar8) + DAT_00c35e74; @@ -5418,24 +5418,24 @@ void Backdrop::RenderWalls(Vector *renderOffset, ColorMod color) if (((BVar7 == (Backdrop)0x34) || (BVar7 == (Backdrop)0x35)) || (BVar7 == (Backdrop)0x36)) { BVar7 = (Backdrop)0x1; DAT_00c33910 = 0; - if (1 < (uint)this[0x2f]) { - local_1cc._8_4_ = 8.40779e-44; + if (1 < GHIDRA_UINT(this[0x2f])) { + (*(undefined4 *)((char *)&(local_1cc) + 0x8)) = 8.40779e-44; do { if ((*(undefined1 *)((char *)&(this[0x51]) + 0x1)) != '\0') { if (*(char *)(this + 0x2b) == '\0') { BVar4 = this[0x1c]; - if (((BVar4 != (Backdrop)0x0) && (-1 < (int)BVar7)) && - (((int)BVar7 < *(int *)((int)this[0x1b] + 0x80) && - (iVar3 = *(int *)(local_1cc._8_4_ + (int)BVar4), -1 < iVar3)))) { + if (((BVar4 != (Backdrop)0x0) && (-1 < GHIDRA_INT(BVar7))) && + ((GHIDRA_INT(BVar7) < *(int *)(GHIDRA_INT(this[0x1b]) + 0x80) && + (iVar3 = *(int *)((*(undefined4 *)((char *)&(local_1cc) + 0x8)) + GHIDRA_INT(BVar4)), -1 < iVar3)))) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar3 * 0x10 + *(int *)((char *)BVar4 + 0x18)),local_138, - *(int *)((int)this[0x1d] + iVar3 * 4),&g_vectorZero,&g_vectorZero, + *(int *)(GHIDRA_INT(this[0x1d]) + iVar3 * 4),&g_vectorZero,&g_vectorZero, (ANM2 *)this[0x1b]); } BVar4 = this[0x24]; - if (((BVar4 != (Backdrop)0x0) && (-1 < (int)BVar7)) && - (((int)BVar7 < *(int *)((int)this[0x23] + 0x80) && - (iVar3 = *(int *)(local_1cc._8_4_ + (int)BVar4), -1 < iVar3)))) { + if (((BVar4 != (Backdrop)0x0) && (-1 < GHIDRA_INT(BVar7))) && + ((GHIDRA_INT(BVar7) < *(int *)(GHIDRA_INT(this[0x23]) + 0x80) && + (iVar3 = *(int *)((*(undefined4 *)((char *)&(local_1cc) + 0x8)) + GHIDRA_INT(BVar4)), -1 < iVar3)))) { animation = this[0x23]; BVar2 = this[0x25]; goto LAB_00940ce6; @@ -5443,18 +5443,18 @@ void Backdrop::RenderWalls(Vector *renderOffset, ColorMod color) } else { BVar4 = this[0x24]; - if ((((BVar4 != (Backdrop)0x0) && (-1 < (int)BVar7)) && - ((int)BVar7 < *(int *)((int)this[0x23] + 0x80))) && - (iVar3 = *(int *)(local_1cc._8_4_ + (int)BVar4), -1 < iVar3)) { + if ((((BVar4 != (Backdrop)0x0) && (-1 < GHIDRA_INT(BVar7))) && + (GHIDRA_INT(BVar7) < *(int *)(GHIDRA_INT(this[0x23]) + 0x80))) && + (iVar3 = *(int *)((*(undefined4 *)((char *)&(local_1cc) + 0x8)) + GHIDRA_INT(BVar4)), -1 < iVar3)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar3 * 0x10 + *(int *)((char *)BVar4 + 0x18)),local_138, - *(int *)((int)this[0x25] + iVar3 * 4),&g_vectorZero,&g_vectorZero, + *(int *)(GHIDRA_INT(this[0x25]) + iVar3 * 4),&g_vectorZero,&g_vectorZero, (ANM2 *)this[0x23]); } BVar4 = this[0x1c]; - if (((BVar4 != (Backdrop)0x0) && (-1 < (int)BVar7)) && - (((int)BVar7 < *(int *)((int)this[0x1b] + 0x80) && - (iVar3 = *(int *)(local_1cc._8_4_ + (int)BVar4), -1 < iVar3)))) { + if (((BVar4 != (Backdrop)0x0) && (-1 < GHIDRA_INT(BVar7))) && + ((GHIDRA_INT(BVar7) < *(int *)(GHIDRA_INT(this[0x1b]) + 0x80) && + (iVar3 = *(int *)((*(undefined4 *)((char *)&(local_1cc) + 0x8)) + GHIDRA_INT(BVar4)), -1 < iVar3)))) { animation = this[0x1b]; BVar2 = this[0x1d]; LAB_00940ce6: @@ -5465,14 +5465,14 @@ LAB_00940ce6: } } } - BVar7 = (Backdrop)((int)BVar7 + 1); - local_1cc._8_4_ = local_1cc._8_4_ + 4; - } while ((uint)BVar7 < (uint)this[0x2f]); + BVar7 = (Backdrop)(GHIDRA_INT(BVar7) + 1); + (*(undefined4 *)((char *)&(local_1cc) + 0x8)) = (*(undefined4 *)((char *)&(local_1cc) + 0x8)) + 4; + } while (GHIDRA_UINT(BVar7) < GHIDRA_UINT(this[0x2f])); } DAT_00c33910 = 1; return; } - if (this[(int)BVar7 * 0x4f + 0x6e] == (Backdrop)0x0) { + if (this[GHIDRA_INT(BVar7) * 0x4f + 0x6e] == (Backdrop)0x0) { return; } savedBlendMode = g_graphicsManager_blendMode[0]; @@ -5483,8 +5483,8 @@ LAB_00940ce6: set_blend_mode(&DAT_00c798e0,1); local_134[0] = (Backdrop *)((float)this[0x13c8] - (float)this[0x13c6]); local_184 = (Backdrop *)((float)this[0x13c9] - (float)this[0x13c7]); - local_1cc._0_4_ = ((Room *)(g_game->_room))->Room::GetRoomShape(); - auStack_1d8._4_4_ = g_vectorOne.x * 52.0 + g_vectorOne.x * 52.0 + (float)local_134[0]; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = ((Room *)(g_game->_room))->Room::GetRoomShape(); + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = g_vectorOne.x * 52.0 + g_vectorOne.x * 52.0 + (float)local_134[0]; local_1d0 = (undefined1 [4])(g_vectorOne.y * 52.0 + g_vectorOne.y * 52.0 + (float)local_184); pVVar14 = renderOffset; render_wall_borders(renderOffset,(Vector *)(auStack_1d8 + 4)); @@ -5494,10 +5494,10 @@ LAB_00940ce6: local_188 = pBVar10; ((KAGE::SmartPointer *)(auStack_1d8 + -0x10))->KAGE::SmartPointer::operator_assign(pBVar10); apply_sprite_shader_params(&color,1,pVVar14,imageRefCount); - uVar1 = local_1cc._0_4_; + uVar1 = (*(undefined4 *)((char *)&(local_1cc) + 0x0)); if (*(int *)(*(int *)(*(int *)((char *)g_game->_room + 4) + 0x10) + 0x48) - 9U < 4) { - if (((Backdrop *)local_1cc._0_4_ == (Backdrop *)0xa) || - ((Backdrop *)local_1cc._0_4_ == (Backdrop *)0xc)) { + if (((*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x0)) == (Backdrop *)0xa) || + ((*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x0)) == (Backdrop *)0xc)) { pBVar10 = (Backdrop *)((float)local_184 + 104.0); local_170 = (Backdrop *)0x0; local_180 = (Backdrop *)0x0; @@ -5505,19 +5505,19 @@ LAB_00940ce6: local_17c = (Vector *)0x0; local_168 = (Backdrop *)0x42500000; local_178 = (Backdrop *)0x42500000; - local_164.y = (float)CONCAT31(local_164.y._1_3_,1); - local_1cc._8_4_ = pBVar10; + local_164.y = (float)CONCAT31((*(undefined1 *)((char *)&(local_164.y) + 0x1)),1); + (*(undefined4 *)((char *)&(local_1cc) + 0x8)) = pBVar10; local_16c = pBVar10; local_164.x = (float)pBVar10; ((KColor *)((KColor *)(local_1cc + 0xc)))->KColor::SetFromARGB(0xffffffff); - auStack_1d8._4_4_ = (Backdrop *)0x42500000; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = (Backdrop *)0x42500000; local_1d0 = (undefined1 [4])pBVar10; render_quad_set_rect(wallQuad,renderOffset,(Vector *)(auStack_1d8 + 4),color_00); (**(code **)(*(int *)*local_188 + 0x14))(); iVar3 = extraout_ECX_00; } else { - local_1cc._8_4_ = (float)local_184 + 104.0; + (*(undefined4 *)((char *)&(local_1cc) + 0x8)) = (float)local_184 + 104.0; iVar3 = extraout_ECX; } fVar8 = 0.0; @@ -5527,18 +5527,18 @@ LAB_00940ce6: pBVar9 = (Backdrop *)((float)local_134[0] + 52.0); local_178 = (Backdrop *)((float)local_134[0] + 104.0); local_17c = (Vector *)0x0; - local_164.y = (float)CONCAT31(local_164.y._1_3_,1); - pBVar10 = (Backdrop *)local_1cc._8_4_; + local_164.y = (float)CONCAT31((*(undefined1 *)((char *)&(local_164.y) + 0x1)),1); + pBVar10 = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); local_180 = pBVar9; local_170 = pBVar9; - local_16c = (Backdrop *)local_1cc._8_4_; + local_16c = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); local_168 = local_178; - local_164.x = (float)local_1cc._8_4_; + local_164.x = (*(undefined4 *)((char *)&((float)local_1cc) + 0x8)); local_144 = pBVar9; ((KColor *)((KColor *)(local_1cc + 0xc)))->KColor::SetFromARGB(0xffffffff); - auStack_1d8._4_4_ = (Backdrop *)0x42500000; - local_1cc._0_4_ = (float)pBVar9 + renderOffset->x; - local_1cc._4_4_ = renderOffset->y + fVar8; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = (Backdrop *)0x42500000; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = (float)pBVar9 + renderOffset->x; + (*(undefined4 *)((char *)&(local_1cc) + 0x4)) = renderOffset->y + fVar8; local_1d0 = (undefined1 [4])pBVar10; render_quad_set_rect(wallQuad,(Vector *)local_1cc,(Vector *)(auStack_1d8 + 4),color_01); (**(code **)(*(int *)*local_188 + 0x14))(); @@ -5551,14 +5551,14 @@ LAB_0093f61d: local_17c = (Vector *)0x0; local_164.x = 52.0; local_16c = (Backdrop *)0x42500000; - local_164.y = (float)CONCAT31(local_164.y._1_3_,1); + local_164.y = (float)CONCAT31((*(undefined1 *)((char *)&(local_164.y) + 0x1)),1); local_178 = local_144; local_168 = local_144; ((KColor *)((KColor *)(local_1cc + 0xc)))->KColor::SetFromARGB(0xffffffff); - auStack_1d8._4_4_ = local_134[0]; - local_1cc._0_4_ = renderOffset->x + 52.0; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = local_134[0]; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = renderOffset->x + 52.0; local_1d0 = (undefined1 [4])0x42500000; - local_1cc._4_4_ = renderOffset->y + 0.0; + (*(undefined4 *)((char *)&(local_1cc) + 0x4)) = renderOffset->y + 0.0; render_quad_set_rect(wallQuad,(Vector *)local_1cc,(Vector *)(auStack_1d8 + 4),color_02); (**(code **)(*(int *)*local_188 + 0x14))(); iVar3 = extraout_ECX_02; @@ -5573,19 +5573,19 @@ LAB_0093f60b: pBVar10 = (Backdrop *)((float)local_184 + 52.0); local_170 = (Backdrop *)0x42500000; local_180 = (Backdrop *)0x42500000; - local_164.x = (float)local_1cc._8_4_; - local_16c = (Backdrop *)local_1cc._8_4_; - local_164.y = (float)CONCAT31(local_164.y._1_3_,1); + local_164.x = (*(undefined4 *)((char *)&((float)local_1cc) + 0x8)); + local_16c = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); + local_164.y = (float)CONCAT31((*(undefined1 *)((char *)&(local_164.y) + 0x1)),1); local_17c = (Vector *)pBVar10; local_178 = local_144; local_174 = pBVar10; local_168 = local_144; local_134[3] = pBVar10; ((KColor *)((KColor *)(local_1cc + 0xc)))->KColor::SetFromARGB(0xffffffff); - auStack_1d8._4_4_ = local_134[0]; - local_1cc._0_4_ = renderOffset->x + 52.0; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = local_134[0]; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = renderOffset->x + 52.0; local_1d0 = (undefined1 [4])0x42500000; - local_1cc._4_4_ = (float)pBVar10 + renderOffset->y; + (*(undefined4 *)((char *)&(local_1cc) + 0x4)) = (float)pBVar10 + renderOffset->y; render_quad_set_rect(wallQuad,(Vector *)local_1cc,(Vector *)(auStack_1d8 + 4),color_03); (**(code **)(*(int *)*local_188 + 0x14))(); if ((Backdrop *)uVar1 == (Backdrop *)&DAT_00000009) { @@ -5594,42 +5594,42 @@ LAB_0093f60b: local_180 = (Backdrop *)0x0; local_168 = (Backdrop *)0x42500000; local_178 = (Backdrop *)0x42500000; - local_164.x = (float)local_1cc._8_4_; - local_16c = (Backdrop *)local_1cc._8_4_; - local_164.y = (float)CONCAT31(local_164.y._1_3_,1); + local_164.x = (*(undefined4 *)((char *)&((float)local_1cc) + 0x8)); + local_16c = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); + local_164.y = (float)CONCAT31((*(undefined1 *)((char *)&(local_164.y) + 0x1)),1); local_184 = (Backdrop *)fVar8; local_17c = (Vector *)fVar8; local_174 = (Backdrop *)fVar8; ((KColor *)((KColor *)(local_1cc + 0xc)))->KColor::SetFromARGB(0xffffffff); - auStack_1d8._4_4_ = 52.0; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = 52.0; local_1d0 = (undefined1 [4])(fVar8 + 104.0); - local_1cc._0_4_ = renderOffset->x + 0.0; - local_1cc._4_4_ = fVar8 + renderOffset->y; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = renderOffset->x + 0.0; + (*(undefined4 *)((char *)&(local_1cc) + 0x4)) = fVar8 + renderOffset->y; render_quad_set_rect(wallQuad,(Vector *)local_1cc,(Vector *)(auStack_1d8 + 4),color_04); (**(code **)(*(int *)*local_188 + 0x14))(); pBVar10 = (Backdrop *)(local_140.x * 0.5); - local_1cc._12_4_ = 0.0; - local_1cc._4_4_ = 0.0; - local_1cc._8_4_ = (float)pBVar10 + 52.0; - pBStack_1ac = (Backdrop *)CONCAT31(pBStack_1ac._1_3_,1); + (*(undefined4 *)((char *)&(local_1cc) + 0xc)) = 0.0; + (*(undefined4 *)((char *)&(local_1cc) + 0x4)) = 0.0; + (*(undefined4 *)((char *)&(local_1cc) + 0x8)) = (float)pBVar10 + 52.0; + pBStack_1ac = (Backdrop *)CONCAT31((*(undefined1 *)((char *)&(pBStack_1ac) + 0x1)),1); local_188 = (Backdrop *)0x0; local_180 = (Backdrop *)0x0; local_16c = pBStack_1ac; - local_1cc._0_4_ = pBVar10; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = pBVar10; pBStack_1bc = pBVar10; pBStack_1b8 = unaff_ESI; - pBStack_1b4 = (Backdrop *)local_1cc._8_4_; + pBStack_1b4 = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); pBStack_1b0 = unaff_ESI; pVStack_18c = (Vector *)pBVar10; - local_184 = (Backdrop *)local_1cc._8_4_; + local_184 = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); local_17c = (Vector *)pBVar10; - local_174 = (Backdrop *)local_1cc._8_4_; + local_174 = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); local_170 = unaff_ESI; local_140.x = (float)pBVar10; - local_134[0] = (Backdrop *)local_1cc._8_4_; + local_134[0] = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); ((KColor *)((KColor *)local_1cc))->KColor::SetFromARGB(0xffffffff); - auStack_1d8._0_4_ = (float)pBVar10 + renderOffset->x; - auStack_1d8._4_4_ = renderOffset->y + 0.0; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x0)) = (float)pBVar10 + renderOffset->x; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = renderOffset->y + 0.0; render_quad_set_rect(auStack_8c,(Vector *)auStack_1d8,(Vector *)(auStack_1d8 + -8),color_05) ; pfVar15 = extraout_EAX; @@ -5640,24 +5640,24 @@ LAB_0093f60b: pfVar17 = pfVar17 + 1; } (**(code **)(*(int *)*pBStack_194 + 0x14))(); - local_1cc._8_4_ = (float)pBStack_19c + 52.0; - auStack_1d8._0_4_ = 52.0; - local_1cc._0_4_ = pBStack_19c; - auStack_1d8._4_4_ = pBStack_19c; + (*(undefined4 *)((char *)&(local_1cc) + 0x8)) = (float)pBStack_19c + 52.0; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x0)) = 52.0; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = pBStack_19c; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = pBStack_19c; local_1d0 = (undefined1 [4])local_140.x; - local_1cc._4_4_ = 52.0; - local_1cc._12_4_ = local_140.x; + (*(undefined4 *)((char *)&(local_1cc) + 0x4)) = 52.0; + (*(undefined4 *)((char *)&(local_1cc) + 0xc)) = local_140.x; pBStack_198 = (Backdrop *)0x42500000; pBStack_194 = pBStack_19c; pBStack_190 = (Backdrop *)local_140.x; pVStack_18c = (Vector *)pBStack_19c; - pBStack_1b8 = (Backdrop *)CONCAT31(pBStack_1b8._1_3_,1); + pBStack_1b8 = (Backdrop *)CONCAT31((*(undefined1 *)((char *)&(pBStack_1b8) + 0x1)),1); local_188 = (Backdrop *)0x42500000; local_180 = (Backdrop *)local_140.x; local_178 = pBStack_1b8; - pBStack_1bc = (Backdrop *)local_1cc._8_4_; - local_184 = (Backdrop *)local_1cc._8_4_; - local_17c = (Vector *)local_1cc._8_4_; + pBStack_1bc = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); + local_184 = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); + local_17c = (*(undefined4 *)((char *)&((Vector *)local_1cc) + 0x8)); ((KColor *)((KColor *)auStack_1d8))->KColor::SetFromARGB(0xffffffff); render_quad_set_rect (&iStack_98,(Vector *)(auStack_1d8 + -0xc),(Vector *)(auStack_1d8 + -0x14), @@ -5670,10 +5670,10 @@ LAB_0093f60b: ppBVar6 = ppBVar6 + 1; } (**(code **)(*(int *)*pBStack_1a0 + 0x14))(&pBStack_198,local_134 + 3,g_drawRectUnset); - auStack_1d8._4_4_ = VStack_14c.x; - auStack_1d8._0_4_ = (Backdrop *)0x0; - local_1cc._0_4_ = local_168; - local_1cc._4_4_ = (Backdrop *)0x42500000; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = VStack_14c.x; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x0)) = (Backdrop *)0x0; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = local_168; + (*(undefined4 *)((char *)&(local_1cc) + 0x4)) = (Backdrop *)0x42500000; local_1d0 = (undefined1 [4])0x42500000; local_1cc[8] = 1; pBStack_1a4 = (Backdrop *)VStack_14c.x; @@ -5684,7 +5684,7 @@ LAB_0093f60b: pBStack_190 = (Backdrop *)0x42500000; pVStack_18c = (Vector *)local_168; local_188 = (Backdrop *)0x42500000; - local_184 = (Backdrop *)local_1cc._8_4_; + local_184 = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); ((KColor *)((KColor *)(auStack_1d8 + -0xc)))->KColor::SetFromARGB(0xffffffff); } else { @@ -5696,44 +5696,44 @@ LAB_0093f60b: fVar8 = (float)local_184 * 0.5; local_170 = local_144; local_180 = local_144; - local_164.x = (float)local_1cc._8_4_; - local_16c = (Backdrop *)local_1cc._8_4_; - local_164.y = (float)CONCAT31(local_164.y._1_3_,1); + local_164.x = (*(undefined4 *)((char *)&((float)local_1cc) + 0x8)); + local_16c = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); + local_164.y = (float)CONCAT31((*(undefined1 *)((char *)&(local_164.y) + 0x1)),1); pBVar10 = local_144; local_184 = (Backdrop *)fVar8; local_17c = (Vector *)fVar8; local_174 = (Backdrop *)fVar8; local_168 = local_178; ((KColor *)((KColor *)(local_1cc + 0xc)))->KColor::SetFromARGB(0xffffffff); - auStack_1d8._4_4_ = 52.0; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = 52.0; local_1d0 = (undefined1 [4])(fVar8 + 104.0); - local_1cc._0_4_ = (float)pBVar10 + renderOffset->x; - local_1cc._4_4_ = fVar8 + renderOffset->y; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = (float)pBVar10 + renderOffset->x; + (*(undefined4 *)((char *)&(local_1cc) + 0x4)) = fVar8 + renderOffset->y; render_quad_set_rect(wallQuad,(Vector *)local_1cc,(Vector *)(auStack_1d8 + 4),color_07); (**(code **)(*(int *)*local_188 + 0x14))(); local_140.x = local_140.x * 0.5; - local_1cc._12_4_ = 0.0; - local_1cc._4_4_ = 0.0; - local_1cc._8_4_ = local_140.x + 104.0; + (*(undefined4 *)((char *)&(local_1cc) + 0xc)) = 0.0; + (*(undefined4 *)((char *)&(local_1cc) + 0x4)) = 0.0; + (*(undefined4 *)((char *)&(local_1cc) + 0x8)) = local_140.x + 104.0; pBVar10 = (Backdrop *)(local_140.x + 52.0); - pBStack_1ac = (Backdrop *)CONCAT31(pBStack_1ac._1_3_,1); + pBStack_1ac = (Backdrop *)CONCAT31((*(undefined1 *)((char *)&(pBStack_1ac) + 0x1)),1); local_188 = (Backdrop *)0x0; local_180 = (Backdrop *)0x0; local_16c = pBStack_1ac; - local_1cc._0_4_ = pBVar10; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = pBVar10; pBStack_1bc = pBVar10; pBStack_1b8 = unaff_ESI; - pBStack_1b4 = (Backdrop *)local_1cc._8_4_; + pBStack_1b4 = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); pBStack_1b0 = unaff_ESI; pVStack_18c = (Vector *)pBVar10; - local_184 = (Backdrop *)local_1cc._8_4_; + local_184 = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); local_17c = (Vector *)pBVar10; - local_174 = (Backdrop *)local_1cc._8_4_; + local_174 = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); local_170 = unaff_ESI; local_134[0] = pBVar10; ((KColor *)((KColor *)local_1cc))->KColor::SetFromARGB(0xffffffff); - auStack_1d8._0_4_ = (float)pBVar10 + renderOffset->x; - auStack_1d8._4_4_ = renderOffset->y + 0.0; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x0)) = (float)pBVar10 + renderOffset->x; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = renderOffset->y + 0.0; render_quad_set_rect(auStack_8c,(Vector *)auStack_1d8,(Vector *)(auStack_1d8 + -8),color_08) ; pfVar15 = extraout_EAX_02; @@ -5744,24 +5744,24 @@ LAB_0093f60b: pfVar17 = pfVar17 + 1; } (**(code **)(*(int *)*pBStack_194 + 0x14))(); - local_1cc._8_4_ = (float)pBStack_19c + 52.0; - auStack_1d8._0_4_ = local_140.x; - local_1cc._0_4_ = pBStack_19c; - auStack_1d8._4_4_ = pBStack_19c; + (*(undefined4 *)((char *)&(local_1cc) + 0x8)) = (float)pBStack_19c + 52.0; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x0)) = local_140.x; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = pBStack_19c; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = pBStack_19c; local_1d0 = (undefined1 [4])pBStack_15c; - local_1cc._4_4_ = local_140.x; - local_1cc._12_4_ = pBStack_15c; + (*(undefined4 *)((char *)&(local_1cc) + 0x4)) = local_140.x; + (*(undefined4 *)((char *)&(local_1cc) + 0xc)) = pBStack_15c; pBStack_198 = (Backdrop *)local_140.x; pBStack_194 = pBStack_19c; pBStack_190 = pBStack_15c; pVStack_18c = (Vector *)pBStack_19c; - pBStack_1b8 = (Backdrop *)CONCAT31(pBStack_1b8._1_3_,1); + pBStack_1b8 = (Backdrop *)CONCAT31((*(undefined1 *)((char *)&(pBStack_1b8) + 0x1)),1); local_188 = (Backdrop *)local_140.x; local_180 = pBStack_15c; local_178 = pBStack_1b8; - pBStack_1bc = (Backdrop *)local_1cc._8_4_; - local_184 = (Backdrop *)local_1cc._8_4_; - local_17c = (Vector *)local_1cc._8_4_; + pBStack_1bc = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); + local_184 = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); + local_17c = (*(undefined4 *)((char *)&((Vector *)local_1cc) + 0x8)); ((KColor *)((KColor *)auStack_1d8))->KColor::SetFromARGB(0xffffffff); render_quad_set_rect (&iStack_98,(Vector *)(auStack_1d8 + -0xc),(Vector *)(auStack_1d8 + -0x14), @@ -5774,10 +5774,10 @@ LAB_0093f60b: ppBVar6 = ppBVar6 + 1; } (**(code **)(*(int *)*pBStack_1a0 + 0x14))(&pBStack_198,local_134 + 3,g_drawRectUnset); - auStack_1d8._4_4_ = (Backdrop *)0x42500000; - auStack_1d8._0_4_ = (Backdrop *)0x0; - local_1cc._0_4_ = VStack_14c.x; - local_1cc._4_4_ = (Backdrop *)0x42500000; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = (Backdrop *)0x42500000; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x0)) = (Backdrop *)0x0; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = VStack_14c.x; + (*(undefined4 *)((char *)&(local_1cc) + 0x4)) = (Backdrop *)0x42500000; local_1d0 = (undefined1 [4])0x42500000; pBStack_1a4 = (Backdrop *)0x42500000; pBStack_1a0 = (Backdrop *)0x0; @@ -5788,7 +5788,7 @@ LAB_0093f60b: pBStack_190 = (Backdrop *)0x42500000; pVStack_18c = (Vector *)VStack_14c.x; local_188 = (Backdrop *)0x42500000; - local_184 = (Backdrop *)local_1cc._8_4_; + local_184 = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); ((KColor *)((KColor *)(auStack_1d8 + -0xc)))->KColor::SetFromARGB(0xffffffff); } color_20 = (KColor *)(auStack_1d8 + -0xc); @@ -5801,10 +5801,10 @@ LAB_0093ff6f: if ((Backdrop *)uVar1 == (Backdrop *)&DAT_0000000b) { pBVar10 = (Backdrop *)((float)local_134[0] * 0.5); fVar8 = (float)local_184 * 0.5; - local_164.y = (float)CONCAT31(local_164.y._1_3_,1); + local_164.y = (float)CONCAT31((*(undefined1 *)((char *)&(local_164.y) + 0x1)),1); local_178 = (Backdrop *)((float)pBVar10 + 52.0); - local_164.x = (float)local_1cc._8_4_; - local_16c = (Backdrop *)local_1cc._8_4_; + local_164.x = (*(undefined4 *)((char *)&((float)local_1cc) + 0x8)); + local_16c = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); local_184 = (Backdrop *)fVar8; local_180 = pBVar10; local_17c = (Vector *)fVar8; @@ -5814,29 +5814,29 @@ LAB_0093ff6f: local_134[0] = pBVar10; local_134[2] = local_178; ((KColor *)((KColor *)(local_1cc + 0xc)))->KColor::SetFromARGB(0xffffffff); - local_1cc._0_4_ = 52.0; - local_1cc._4_4_ = fVar8 + 104.0; - auStack_1d8._4_4_ = (float)pBVar10 + renderOffset->x; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = 52.0; + (*(undefined4 *)((char *)&(local_1cc) + 0x4)) = fVar8 + 104.0; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = (float)pBVar10 + renderOffset->x; local_1d0 = (undefined1 [4])(fVar8 + renderOffset->y); render_quad_set_rect(wallQuad,(Vector *)(auStack_1d8 + 4),(Vector *)local_1cc,color_10); (**(code **)(*(int *)*local_188 + 0x14))(); - local_1cc._0_4_ = 0.0; - local_1cc._12_4_ = 0.0; - local_1cc._4_4_ = 0.0; - local_1cc._8_4_ = 52.0; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = 0.0; + (*(undefined4 *)((char *)&(local_1cc) + 0xc)) = 0.0; + (*(undefined4 *)((char *)&(local_1cc) + 0x4)) = 0.0; + (*(undefined4 *)((char *)&(local_1cc) + 0x8)) = 52.0; pBStack_1bc = (Backdrop *)0x0; pBStack_1b4 = (Backdrop *)0x42500000; - pBStack_1b0 = (Backdrop *)auStack_1d8._4_4_; - pBStack_1b8 = (Backdrop *)auStack_1d8._4_4_; + pBStack_1b0 = (*(undefined4 *)((char *)&((Backdrop *)auStack_1d8) + 0x4)); + pBStack_1b8 = (*(undefined4 *)((char *)&((Backdrop *)auStack_1d8) + 0x4)); pVStack_18c = (Vector *)0x0; local_188 = (Backdrop *)0x0; local_184 = (Backdrop *)0x42500000; local_180 = (Backdrop *)0x0; - pBStack_1ac = (Backdrop *)CONCAT31(pBStack_1ac._1_3_,1); + pBStack_1ac = (Backdrop *)CONCAT31((*(undefined1 *)((char *)&(pBStack_1ac) + 0x1)),1); local_17c = (Vector *)0x0; - local_178 = (Backdrop *)auStack_1d8._4_4_; + local_178 = (*(undefined4 *)((char *)&((Backdrop *)auStack_1d8) + 0x4)); local_174 = (Backdrop *)0x42500000; - local_170 = (Backdrop *)auStack_1d8._4_4_; + local_170 = (*(undefined4 *)((char *)&((Backdrop *)auStack_1d8) + 0x4)); local_16c = pBStack_1ac; ((KColor *)((KColor *)local_1cc))->KColor::SetFromARGB(0xffffffff); VStack_14c.x = renderOffset->x + 0.0; @@ -5852,19 +5852,19 @@ LAB_0093ff6f: } (**(code **)(*(int *)*pBStack_194 + 0x14))(); fVar8 = (float)pBStack_19c + 52.0; - local_1cc._12_4_ = local_144; + (*(undefined4 *)((char *)&(local_1cc) + 0xc)) = local_144; local_1d0 = (undefined1 [4])local_144; - auStack_1d8._0_4_ = 52.0; - local_1cc._4_4_ = 52.0; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x0)) = 52.0; + (*(undefined4 *)((char *)&(local_1cc) + 0x4)) = 52.0; pBStack_198 = (Backdrop *)0x42500000; pBStack_190 = local_144; - pBStack_1b8 = (Backdrop *)CONCAT31(pBStack_1b8._1_3_,1); + pBStack_1b8 = (Backdrop *)CONCAT31((*(undefined1 *)((char *)&(pBStack_1b8) + 0x1)),1); local_188 = (Backdrop *)0x42500000; local_180 = local_144; local_178 = pBStack_1b8; - auStack_1d8._4_4_ = fVar8; - local_1cc._0_4_ = fVar8; - local_1cc._8_4_ = pBVar10; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = fVar8; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = fVar8; + (*(undefined4 *)((char *)&(local_1cc) + 0x8)) = pBVar10; pBStack_1bc = pBVar10; pBStack_194 = (Backdrop *)fVar8; pVStack_18c = (Vector *)fVar8; @@ -5883,9 +5883,9 @@ LAB_0093ff6f: ppBVar6 = ppBVar6 + 1; } (**(code **)(*(int *)*pBStack_1a0 + 0x14))(&pBStack_198,local_134 + 3,g_drawRectUnset); - auStack_1d8._4_4_ = pBStack_150; - auStack_1d8._0_4_ = VStack_14c.x; - local_1cc._0_4_ = local_168; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = pBStack_150; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x0)) = VStack_14c.x; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = local_168; local_1cc[8] = 1; pBStack_1a4 = pBStack_150; pBStack_1a0 = (Backdrop *)VStack_14c.x; @@ -5893,9 +5893,9 @@ LAB_0093ff6f: pBStack_198 = (Backdrop *)VStack_14c.x; pBStack_194 = pBStack_150; pVStack_18c = (Vector *)local_168; - local_184 = (Backdrop *)local_1cc._8_4_; + local_184 = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); local_1d0 = (undefined1 [4])pBVar10; - local_1cc._4_4_ = pBVar10; + (*(undefined4 *)((char *)&(local_1cc) + 0x4)) = pBVar10; pBStack_190 = pBVar10; local_188 = pBVar10; ((KColor *)((KColor *)(auStack_1d8 + -0xc)))->KColor::SetFromARGB(0xffffffff); @@ -5907,13 +5907,13 @@ LAB_0093ff6f: } else { if ((Backdrop *)uVar1 != (Backdrop *)0xc) goto LAB_00940b5f; - local_1cc._0_4_ = (float)local_134[0] * 0.5; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = (float)local_134[0] * 0.5; fVar8 = (float)local_184 * 0.5; - local_164.y = (float)CONCAT31(local_164.y._1_3_,1); - local_178 = (Backdrop *)((float)local_1cc._0_4_ + 104.0); - pBVar10 = (Backdrop *)((float)local_1cc._0_4_ + 52.0); - local_164.x = (float)local_1cc._8_4_; - local_16c = (Backdrop *)local_1cc._8_4_; + local_164.y = (float)CONCAT31((*(undefined1 *)((char *)&(local_164.y) + 0x1)),1); + local_178 = (Backdrop *)((*(undefined4 *)((char *)&((float)local_1cc) + 0x0)) + 104.0); + pBVar10 = (Backdrop *)((*(undefined4 *)((char *)&((float)local_1cc) + 0x0)) + 52.0); + local_164.x = (*(undefined4 *)((char *)&((float)local_1cc) + 0x8)); + local_16c = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); local_184 = (Backdrop *)fVar8; local_180 = pBVar10; local_17c = (Vector *)fVar8; @@ -5922,31 +5922,31 @@ LAB_0093ff6f: local_168 = local_178; local_134[2] = pBVar10; ((KColor *)((KColor *)(local_1cc + 0xc)))->KColor::SetFromARGB(0xffffffff); - auStack_1d8._4_4_ = 52.0; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = 52.0; local_1d0 = (undefined1 [4])(fVar8 + 104.0); local_140.x = (float)pBVar10 + renderOffset->x; local_140.y = fVar8 + renderOffset->y; render_quad_set_rect(wallQuad,&local_140,(Vector *)(auStack_1d8 + 4),color_13); pfVar16 = g_drawRectUnset; (**(code **)(*(int *)*local_188 + 0x14))(); - local_1cc._8_4_ = local_140.x + 104.0; - local_1cc._0_4_ = pBStack_150; - local_1cc._12_4_ = 0.0; - local_1cc._4_4_ = 0.0; + (*(undefined4 *)((char *)&(local_1cc) + 0x8)) = local_140.x + 104.0; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = pBStack_150; + (*(undefined4 *)((char *)&(local_1cc) + 0xc)) = 0.0; + (*(undefined4 *)((char *)&(local_1cc) + 0x4)) = 0.0; pBStack_1bc = pBStack_150; pVStack_18c = (Vector *)pBStack_150; local_188 = (Backdrop *)0x0; local_180 = (Backdrop *)0x0; - pBStack_1ac = (Backdrop *)CONCAT31(pBStack_1ac._1_3_,1); + pBStack_1ac = (Backdrop *)CONCAT31((*(undefined1 *)((char *)&(pBStack_1ac) + 0x1)),1); local_17c = (Vector *)pBStack_150; local_16c = pBStack_1ac; pBVar10 = unaff_ESI; pBVar9 = pBStack_150; pBStack_1b8 = unaff_ESI; - pBStack_1b4 = (Backdrop *)local_1cc._8_4_; + pBStack_1b4 = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); pBStack_1b0 = unaff_ESI; - local_184 = (Backdrop *)local_1cc._8_4_; - local_174 = (Backdrop *)local_1cc._8_4_; + local_184 = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); + local_174 = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); local_170 = unaff_ESI; ((KColor *)((KColor *)local_1cc))->KColor::SetFromARGB(0xffffffff); VStack_14c.x = 52.0; @@ -5964,21 +5964,21 @@ LAB_0093ff6f: } pfVar15 = g_drawRectUnset; (**(code **)(*(int *)*pBStack_194 + 0x14))(); - local_1cc._12_4_ = local_144; + (*(undefined4 *)((char *)&(local_1cc) + 0xc)) = local_144; local_1d0 = (undefined1 [4])local_144; - auStack_1d8._0_4_ = 52.0; - local_1cc._0_4_ = local_140.x; - auStack_1d8._4_4_ = local_140.x; - local_1cc._4_4_ = 52.0; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x0)) = 52.0; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = local_140.x; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = local_140.x; + (*(undefined4 *)((char *)&(local_1cc) + 0x4)) = 52.0; pBStack_198 = (Backdrop *)0x42500000; pBStack_194 = (Backdrop *)local_140.x; pBStack_190 = local_144; pVStack_18c = (Vector *)local_140.x; - pBStack_1b8 = (Backdrop *)CONCAT31(pBStack_1b8._1_3_,1); + pBStack_1b8 = (Backdrop *)CONCAT31((*(undefined1 *)((char *)&(pBStack_1b8) + 0x1)),1); local_188 = (Backdrop *)0x42500000; local_180 = local_144; local_178 = pBStack_1b8; - local_1cc._8_4_ = unaff_ESI; + (*(undefined4 *)((char *)&(local_1cc) + 0x8)) = unaff_ESI; pBStack_1bc = unaff_ESI; local_17c = (Vector *)unaff_ESI; ((KColor *)((KColor *)auStack_1d8))->KColor::SetFromARGB(0xffffffff); @@ -5995,19 +5995,19 @@ LAB_0093ff6f: ppBVar6 = ppBVar6 + 1; } (**(code **)(*(int *)*pBStack_1a0 + 0x14))(&pBStack_198,local_134 + 3,g_drawRectUnset); - auStack_1d8._0_4_ = fStack_1a8 + 52.0; - auStack_1d8._4_4_ = pBStack_150; - local_1cc._0_4_ = local_168; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x0)) = fStack_1a8 + 52.0; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = pBStack_150; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = local_168; pBStack_1a4 = pBStack_150; pBStack_19c = local_168; local_1cc[8] = 1; pBStack_194 = pBStack_150; pVStack_18c = (Vector *)local_168; - local_184 = (Backdrop *)local_1cc._8_4_; + local_184 = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); local_1d0 = (undefined1 [4])pBVar10; - local_1cc._4_4_ = pBVar10; - pBStack_1a0 = (Backdrop *)auStack_1d8._0_4_; - pBStack_198 = (Backdrop *)auStack_1d8._0_4_; + (*(undefined4 *)((char *)&(local_1cc) + 0x4)) = pBVar10; + pBStack_1a0 = (*(undefined4 *)((char *)&((Backdrop *)auStack_1d8) + 0x0)); + pBStack_198 = (*(undefined4 *)((char *)&((Backdrop *)auStack_1d8) + 0x0)); pBStack_190 = pBVar10; local_188 = pBVar10; ((KColor *)((KColor *)(auStack_1d8 + -0xc)))->KColor::SetFromARGB(0xffffffff); @@ -6030,37 +6030,37 @@ LAB_0093ff6f: } else { local_144 = (Backdrop *)g_vectorZero.x; - local_1cc._8_4_ = g_vectorZero.y; - if (((Backdrop *)local_1cc._0_4_ == (Backdrop *)0x2) || - ((Backdrop *)local_1cc._0_4_ == (Backdrop *)&DAT_00000007)) { + (*(undefined4 *)((char *)&(local_1cc) + 0x8)) = g_vectorZero.y; + if (((*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x0)) == (Backdrop *)0x2) || + ((*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x0)) == (Backdrop *)&DAT_00000007)) { local_144 = (Backdrop *)0x0; - local_1cc._8_4_ = (Backdrop *)0x42500000; + (*(undefined4 *)((char *)&(local_1cc) + 0x8)) = (Backdrop *)0x42500000; local_184 = (Backdrop *)((float)local_184 - 104.0); } - else if (((Backdrop *)local_1cc._0_4_ == (Backdrop *)0x3) || - ((Backdrop *)local_1cc._0_4_ == (Backdrop *)&DAT_00000005)) { + else if (((*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x0)) == (Backdrop *)0x3) || + ((*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x0)) == (Backdrop *)&DAT_00000005)) { local_144 = (Backdrop *)0x42d00000; local_134[0] = (Backdrop *)((float)local_134[0] - 208.0); - local_1cc._8_4_ = (Backdrop *)0x0; + (*(undefined4 *)((char *)&(local_1cc) + 0x8)) = (Backdrop *)0x0; } fVar8 = (float)local_184 + 104.0; - local_1cc._0_4_ = (float)local_144 + 52.0; - local_16c = (Backdrop *)((float)local_1cc._8_4_ + fVar8); - local_164.y = (float)CONCAT31(local_164.y._1_3_,1); - pBVar9 = (Backdrop *)local_1cc._8_4_; + (*(undefined4 *)((char *)&(local_1cc) + 0x0)) = (float)local_144 + 52.0; + local_16c = (Backdrop *)((*(undefined4 *)((char *)&((float)local_1cc) + 0x8)) + fVar8); + local_164.y = (float)CONCAT31((*(undefined1 *)((char *)&(local_164.y) + 0x1)),1); + pBVar9 = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); pBVar12 = local_144; local_180 = local_144; - local_17c = (Vector *)local_1cc._8_4_; - local_178 = (Backdrop *)local_1cc._0_4_; - local_174 = (Backdrop *)local_1cc._8_4_; + local_17c = (*(undefined4 *)((char *)&((Vector *)local_1cc) + 0x8)); + local_178 = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x0)); + local_174 = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x8)); local_170 = local_144; - local_168 = (Backdrop *)local_1cc._0_4_; + local_168 = (*(undefined4 *)((char *)&((Backdrop *)local_1cc) + 0x0)); local_164.x = (float)local_16c; local_138 = (Vector *)fVar8; local_134[3] = local_16c; ((KColor *)((KColor *)(local_1cc + 0xc)))->KColor::SetFromARGB(0xffffffff); local_140.x = 52.0; - auStack_1d8._4_4_ = (float)pBVar12 + renderOffset->x; + (*(undefined4 *)((char *)&(auStack_1d8) + 0x4)) = (float)pBVar12 + renderOffset->x; local_1d0 = (undefined1 [4])((float)pBVar9 + renderOffset->y); local_140.y = fVar8; render_quad_set_rect(wallQuad,(Vector *)(auStack_1d8 + 4),&local_140,color_16); @@ -6070,7 +6070,7 @@ LAB_0093ff6f: local_184 = (Backdrop *)(local_140.x + 104.0 + (float)pBStack_150); local_188 = (Backdrop *)local_1d0; pVStack_18c = (Vector *)((float)pBStack_150 + local_140.x + 52.0); - local_16c = (Backdrop *)CONCAT31(local_16c._1_3_,1); + local_16c = (Backdrop *)CONCAT31((*(undefined1 *)((char *)&(local_16c) + 0x1)),1); local_170 = local_134[0]; local_178 = local_134[0]; auVar13 = local_1d0; @@ -6087,7 +6087,7 @@ LAB_0093ff6f: local_184 = (Backdrop *)(fVar8 + 52.0); local_180 = local_144; pBStack_190 = local_144; - local_178 = (Backdrop *)CONCAT31(local_178._1_3_,1); + local_178 = (Backdrop *)CONCAT31((*(undefined1 *)((char *)&(local_178) + 0x1)),1); pBStack_198 = (Backdrop *)pfVar17; pBStack_194 = (Backdrop *)fVar8; pVStack_18c = (Vector *)fVar8; @@ -6100,7 +6100,7 @@ LAB_0093ff6f: render_quad_set_rect(local_134 + 3,(Vector *)(auStack_1d8 + -0x14),&VStack_158,color_18); (**(code **)(*(int *)*pBVar10 + 0x14))(&pBStack_198,local_134 + 3,g_drawRectUnset); pBStack_1a0 = (Backdrop *)(fVar8 + fStack_1a8 + 52.0); - local_184 = (Backdrop *)CONCAT31(local_184._1_3_,1); + local_184 = (Backdrop *)CONCAT31((*(undefined1 *)((char *)&(local_184) + 0x1)),1); pVStack_18c = (Vector *)pBStack_150; pBStack_19c = pBStack_150; local_188 = (Backdrop *)VStack_14c.x; @@ -6121,7 +6121,7 @@ LAB_00940b5f: g_graphicsManager_blendMode[1] = savedBlendMode1; g_graphicsManager_blendMode[2] = iStack_98; g_graphicsManager_blendMode[3] = savedBlendMode3; - g_graphicsManager_blendMode[4] = (int)local_120[0].x; + g_graphicsManager_blendMode[4] = GHIDRA_INT(local_120[0].x); shader_cache_find(iVar3); return; } @@ -6192,7 +6192,7 @@ void Backdrop::RenderWater(Vector *renderOffset) g_graphicsManager_blendMode[2] = 0; g_graphicsManager_blendMode[3] = 1; uvQuad._topLeft.x = (float)g_game->_frameCount * 0.5; - if ((*(undefined1 *)((char *)&(this[(int)this[0x54] * 0x4f + 0xa3]) + 0x1)) != '\0') { + if ((*(undefined1 *)((char *)&(this[GHIDRA_INT(this[0x54]) * 0x4f + 0xa3]) + 0x1)) != '\0') { uvQuad._topLeft.x = uvQuad._topLeft.x * -1.0; } room = g_game->_room; @@ -6207,11 +6207,11 @@ void Backdrop::RenderWater(Vector *renderOffset) savedBlendMode0 = 1; LAB_0094130a: fVar5 = 52.0; - local_5c = (float)((int)fVar3 + -2); + local_5c = (float)(GHIDRA_INT(fVar3) + -2); uvQuad._topRight.y = 0.0; uvQuad._topLeft.y = 0.0; local_38 = 1; - uvQuad._bottomLeft.y = (float)(int)local_5c * 26.0; + uvQuad._bottomLeft.y = (float)GHIDRA_INT(local_5c) * 26.0; uvQuad._topRight.x = 52.0 - uvQuad._topLeft.x; uvQuad._topLeft.x = -uvQuad._topLeft.x; uvQuad._bottomLeft.x = uvQuad._topLeft.x; @@ -6222,10 +6222,10 @@ LAB_0094130a: ((KColor *)(&quadColor))->KColor::SetFromARGB(0xffffffff); fVar7 = renderOffset->x; fVar4 = fVar7 + fVar5; - fVar6 = (float)(int)fVar3 * 26.0 + renderOffset->y; + fVar6 = (float)GHIDRA_INT(fVar3) * 26.0 + renderOffset->y; fVar5 = renderOffset->y + fVar5; LAB_009413ab: - local_1c = (float)(int)fVar3; + local_1c = (float)GHIDRA_INT(fVar3); render_quad_set_uniform_color(quadSource,fVar7,fVar5,fVar4,fVar6,&quadColor); FUN_009426b0(&uvQuad,quadSource); LAB_009413db: @@ -6242,10 +6242,10 @@ LAB_009413db: uvQuad._bottomLeft.y = 78.0; local_38 = 1; ((KColor *)(&quadColor))->KColor::SetFromARGB(0xffffffff); - local_74.y = (float)(int)local_7c.y; + local_74.y = (float)GHIDRA_INT(local_7c.y); render_quad_set_uniform_color (quadSource,local_74.y * 26.0 + renderOffset->x,renderOffset->y + 104.0, - (float)((int)local_7c.y + 2) * 26.0 + renderOffset->x,renderOffset->y + 182.0, + (float)(GHIDRA_INT(local_7c.y) + 2) * 26.0 + renderOffset->x,renderOffset->y + 182.0, color_10); FUN_009426b0(&uvQuad,quadSource); local_5c = local_1c * 26.0; @@ -6257,7 +6257,7 @@ LAB_009413db: uvQuad._topLeft.y = 0.0; local_38 = 1; uvQuad._bottomLeft.x = uvRight; - uvQuad._bottomLeft.y = (float)(int)local_5c * 26.0; + uvQuad._bottomLeft.y = (float)GHIDRA_INT(local_5c) * 26.0; uvQuad._topLeft.x = uvRight; uvQuad._bottomRight.x = uvLeft; uvQuad._topRight.x = uvLeft; @@ -6266,11 +6266,11 @@ LAB_009413db: ((KColor *)(&quadColor))->KColor::SetFromARGB(0xffffffff); local_5c = fVar7 * fVar3; render_quad_set_uniform_color - (quadSource,(float)((int)local_7c.y + -4) * fVar3 + renderOffset->x, - renderOffset->y + 52.0,(float)((int)local_7c.y + -2) * fVar3 + renderOffset->x, + (quadSource,(float)(GHIDRA_INT(local_7c.y) + -4) * fVar3 + renderOffset->x, + renderOffset->y + 52.0,(float)(GHIDRA_INT(local_7c.y) + -2) * fVar3 + renderOffset->x, local_5c + renderOffset->y,color_09); FUN_009426b0(&uvQuad,quadSource); - local_74.y = (float)(int)local_7c.y; + local_74.y = (float)GHIDRA_INT(local_7c.y); } goto LAB_00941bd2; } @@ -6284,8 +6284,8 @@ LAB_009413db: uvQuad._bottomLeft.y = 234.0; local_38 = 1; ((KColor *)(&quadColor))->KColor::SetFromARGB(0xffffffff); - local_74.y = (float)(int)local_7c.y; - local_24.y = (float)((int)local_7c.y + 2) * 26.0; + local_74.y = (float)GHIDRA_INT(local_7c.y); + local_24.y = (float)(GHIDRA_INT(local_7c.y) + 2) * 26.0; local_2c.y = local_74.y * 26.0; render_quad_set_uniform_color (quadSource,local_2c.y + renderOffset->x,renderOffset->y + 52.0, @@ -6295,7 +6295,7 @@ LAB_009413db: uvQuad._topLeft.y = 234.0; local_38 = 1; uvQuad._bottomLeft.x = uvRight; - uvQuad._bottomLeft.y = (float)(int)local_5c * 26.0; + uvQuad._bottomLeft.y = (float)GHIDRA_INT(local_5c) * 26.0; uvQuad._topLeft.x = uvRight; uvQuad._bottomRight.x = uvLeft; uvQuad._topRight.x = uvLeft; @@ -6309,12 +6309,12 @@ LAB_009413db: fVar7 = local_74.y; LAB_00941e21: local_64.x = uvRight; - local_24.y = (float)(2 - (int)local_7c.y); + local_24.y = (float)(2 - GHIDRA_INT(local_7c.y)); local_34.x = uvRight; local_34.y = 0.0; local_74.y = 0.0; local_2c.x = uvLeft; - local_64.y = (float)(int)local_24.y * 26.0; + local_64.y = (float)GHIDRA_INT(local_24.y) * 26.0; local_74.x = uvLeft; local_2c.y = local_64.y; DestinationQuad::DestinationQuad(&uvQuad,&local_74,&local_2c,&local_34,&local_64); @@ -6340,8 +6340,8 @@ LAB_00942022: uvQuad._bottomLeft.y = 182.0; local_38 = 1; ((KColor *)(&quadColor))->KColor::SetFromARGB(0xffffffff); - local_74.y = (float)(int)local_7c.y * 26.0; - local_24.y = (float)((int)local_7c.y + 2) * 26.0; + local_74.y = (float)GHIDRA_INT(local_7c.y) * 26.0; + local_24.y = (float)(GHIDRA_INT(local_7c.y) + 2) * 26.0; render_quad_set_uniform_color (quadSource,(local_74.y + renderOffset->x) - 338.0,renderOffset->y + 52.0, (renderOffset->x + local_24.y) - 338.0,renderOffset->y + 182.0,&quadColor); @@ -6361,7 +6361,7 @@ LAB_00942022: uvQuad._topLeft.y = 182.0; local_38 = 1; uvQuad._bottomLeft.x = uvRight; - uvQuad._bottomLeft.y = (float)(int)local_5c * 26.0; + uvQuad._bottomLeft.y = (float)GHIDRA_INT(local_5c) * 26.0; uvQuad._topLeft.x = uvRight; uvQuad._bottomRight.x = uvLeft; uvQuad._topRight.x = uvLeft; @@ -6398,12 +6398,12 @@ LAB_00942022: renderOffset->y + 52.0,color_05); FUN_009426b0(&uvQuad,quadSource); local_34.x = uvRight; - local_24.y = (float)(2 - (int)local_7c.y); + local_24.y = (float)(2 - GHIDRA_INT(local_7c.y)); local_2c.x = uvRight; local_2c.y = 15.0; local_6c.y = 15.0; local_7c.x = uvLeft; - local_7c.y = (float)(int)local_24.y * 26.0; + local_7c.y = (float)GHIDRA_INT(local_24.y) * 26.0; local_6c.x = uvLeft; local_34.y = local_7c.y; DestinationQuad::DestinationQuad(&uvQuad,&local_6c,&local_7c,&local_2c,&local_34); @@ -6444,18 +6444,18 @@ LAB_00942022: vertexLeft = vertexLeft + -1; } while (vertexLeft != 0); } - local_5c = (float)((int)local_24.y + -2); + local_5c = (float)(GHIDRA_INT(local_24.y) + -2); uvQuad._bottomLeft.x = uvLeft; uvQuad._topLeft.x = uvLeft; uvQuad._topRight.y = 182.0; uvQuad._topLeft.y = 182.0; uvQuad._bottomRight.x = uvRight; - uvQuad._bottomLeft.y = (float)(int)local_5c * 26.0; + uvQuad._bottomLeft.y = (float)GHIDRA_INT(local_5c) * 26.0; local_38 = 1; uvQuad._topRight.x = uvRight; uvQuad._bottomRight.y = uvQuad._bottomLeft.y; ((KColor *)(&quadColor))->KColor::SetFromARGB(0xffffffff); - local_1c = (float)(int)local_24.y; + local_1c = (float)GHIDRA_INT(local_24.y); render_quad_set_uniform_color (quadSource,renderOffset->x,renderOffset->y + 182.0,renderOffset->x + 52.0, local_1c * 26.0 + renderOffset->y,color_00); @@ -6475,11 +6475,11 @@ LAB_00942022: if (savedBlendMode0 != 0xb) { if ((savedBlendMode0 != 2) && (savedBlendMode0 != 7)) { if ((savedBlendMode0 != 3) && (savedBlendMode0 != 5)) goto LAB_0094130a; - local_5c = (float)((int)fVar3 + -2); + local_5c = (float)(GHIDRA_INT(fVar3) + -2); uvQuad._topRight.x = 52.0 - uvQuad._topLeft.x; uvQuad._topRight.y = 0.0; uvQuad._topLeft.y = 0.0; - uvQuad._bottomLeft.y = (float)(int)local_5c * 26.0; + uvQuad._bottomLeft.y = (float)GHIDRA_INT(local_5c) * 26.0; local_38 = 1; uvQuad._topLeft.x = -uvQuad._topLeft.x; uvQuad._bottomLeft.x = uvQuad._topLeft.x; @@ -6490,7 +6490,7 @@ LAB_00942022: ((KColor *)(&quadColor))->KColor::SetFromARGB(0xffffffff); fVar4 = renderOffset->x + 156.0; fVar7 = renderOffset->x + fVar7; - fVar6 = (float)(int)fVar3 * 26.0 + renderOffset->y; + fVar6 = (float)GHIDRA_INT(fVar3) * 26.0 + renderOffset->y; fVar5 = renderOffset->y + 52.0; goto LAB_009413ab; } @@ -6510,8 +6510,8 @@ LAB_00942022: (quadSource,renderOffset->x,renderOffset->y + fVar7,renderOffset->x + 52.0, renderOffset->y + fVar6,color_03); FUN_009426b0(&uvQuad,quadSource); - local_5c = (float)((int)local_24.y + -2); - local_1c = (float)(int)local_24.y; + local_5c = (float)(GHIDRA_INT(local_24.y) + -2); + local_1c = (float)GHIDRA_INT(local_24.y); goto LAB_009413db; } fVar7 = 52.0; @@ -6531,18 +6531,18 @@ LAB_00942022: (quadSource,renderOffset->x,renderOffset->y + fVar7,renderOffset->x + fVar7, renderOffset->y + 234.0,color_01); FUN_009426b0(&uvQuad,quadSource); - local_5c = (float)((int)local_24.y + -2); + local_5c = (float)(GHIDRA_INT(local_24.y) + -2); uvQuad._bottomLeft.x = uvLeft; uvQuad._topLeft.x = uvLeft; uvQuad._topRight.y = 234.0; uvQuad._topLeft.y = 234.0; uvQuad._bottomRight.x = uvRight; - uvQuad._bottomLeft.y = (float)(int)local_5c * 26.0; + uvQuad._bottomLeft.y = (float)GHIDRA_INT(local_5c) * 26.0; local_38 = 1; uvQuad._topRight.x = uvRight; uvQuad._bottomRight.y = uvQuad._bottomLeft.y; ((KColor *)(&quadColor))->KColor::SetFromARGB(0xffffffff); - local_1c = (float)(int)local_24.y; + local_1c = (float)GHIDRA_INT(local_24.y); render_quad_set_uniform_color (quadSource,renderOffset->x + 338.0,renderOffset->y + 234.0, renderOffset->x + 52.0 + 338.0,local_1c * 26.0 + renderOffset->y,color_02); @@ -6554,17 +6554,17 @@ LAB_00941941: uvQuad._topLeft.y = 0.0; local_38 = 1; uvQuad._bottomLeft.x = uvRight; - uvQuad._bottomLeft.y = (float)(int)local_5c * 26.0; + uvQuad._bottomLeft.y = (float)GHIDRA_INT(local_5c) * 26.0; uvQuad._topLeft.x = uvRight; uvQuad._bottomRight.x = uvLeft; uvQuad._topRight.x = uvLeft; uvQuad._bottomRight.y = uvQuad._bottomLeft.y; ((KColor *)(&quadColor))->KColor::SetFromARGB(0xffffffff); local_5c = local_1c * fVar7; - local_74.y = (float)(int)local_7c.y; + local_74.y = (float)GHIDRA_INT(local_7c.y); render_quad_set_uniform_color (quadSource,local_74.y * fVar7 + renderOffset->x,renderOffset->y + 52.0, - (float)((int)local_7c.y + 2) * fVar7 + renderOffset->x,local_5c + renderOffset->y, + (float)(GHIDRA_INT(local_7c.y) + 2) * fVar7 + renderOffset->x,local_5c + renderOffset->y, color_08); FUN_009426b0(&uvQuad,quadSource); LAB_00941bd2: @@ -6573,13 +6573,13 @@ LAB_00941bd2: local_2c.y = local_74.y; if (savedBlendMode0 != 9) { if ((savedBlendMode0 == 2) || (savedBlendMode0 == 7)) { - local_24.y = (float)(2 - (int)local_7c.y); + local_24.y = (float)(2 - GHIDRA_INT(local_7c.y)); local_64.x = uvRight; local_34.x = uvRight; local_34.y = 0.0; local_74.y = 0.0; local_2c.x = uvLeft; - local_64.y = (float)(int)local_24.y * 26.0; + local_64.y = (float)GHIDRA_INT(local_24.y) * 26.0; local_74.x = uvLeft; local_2c.y = local_64.y; DestinationQuad::DestinationQuad(&uvQuad,&local_74,&local_2c,&local_34,&local_64); @@ -6604,10 +6604,10 @@ LAB_00941bd2: ((KColor *)(&quadColor))->KColor::SetFromARGB(0xffffffff); render_quad_set_uniform_color (quadSource,renderOffset->x + 156.0,renderOffset->y, - (float)((int)local_7c.y + -4) * fVar3 + renderOffset->x,renderOffset->y + 52.0, + (float)(GHIDRA_INT(local_7c.y) + -4) * fVar3 + renderOffset->x,renderOffset->y + 52.0, color_13); FUN_009426b0(&uvQuad,quadSource); - local_24.y = (float)(2 - (int)local_7c.y); + local_24.y = (float)(2 - GHIDRA_INT(local_7c.y)); local_74.y = local_2c.y * 26.0; LAB_00942072: fVar7 = 26.0; @@ -6640,7 +6640,7 @@ LAB_00942072: savedBlendMode0 = savedBlendMode0 + -1; } while (savedBlendMode0 != 0); } - local_64.y = (float)(int)local_24.y; + local_64.y = (float)GHIDRA_INT(local_24.y); local_34.y = 13.0; local_24.y = 13.0; local_64.x = uvLeft; @@ -6697,7 +6697,7 @@ LAB_00942072: (quadSource,renderOffset->x + 52.0,fVar3 + renderOffset->y,renderOffset->x + 390.0 ,renderOffset->y + local_1c,color_16); FUN_009426b0(&uvQuad,quadSource); - local_64.y = (float)(int)local_24.y; + local_64.y = (float)GHIDRA_INT(local_24.y); local_34.y = 15.0; local_24.y = 15.0; local_64.x = uvLeft; @@ -6718,7 +6718,7 @@ LAB_00942641: } else { if ((savedBlendMode0 == 2) || (savedBlendMode0 == 7)) { - local_64.y = (float)(int)local_24.y; + local_64.y = (float)GHIDRA_INT(local_24.y); local_34.y = 0.0; local_24.y = 0.0; local_64.x = uvLeft; @@ -6753,7 +6753,7 @@ LAB_00942641: ((KColor *)(&quadColor))->KColor::SetFromARGB(0xffffffff); fVar3 = (local_1c + 2.0) * fVar7 + renderOffset->y; fVar6 = renderOffset->y + fVar6; - fVar5 = (float)((int)local_7c.y + -4) * fVar7 + renderOffset->x; + fVar5 = (float)(GHIDRA_INT(local_7c.y) + -4) * fVar7 + renderOffset->x; fVar4 = renderOffset->x + 156.0; color_18 = extraout_ECX; } @@ -6787,12 +6787,12 @@ LAB_00942641: } while (savedBlendMode0 != 0); } local_64.x = uvRight; - local_24.y = (float)(2 - (int)local_7c.y); + local_24.y = (float)(2 - GHIDRA_INT(local_7c.y)); local_34.x = uvRight; local_34.y = -338.0; local_7c.y = -338.0; local_2c.x = uvLeft; - local_64.y = (float)(int)local_24.y * 26.0; + local_64.y = (float)GHIDRA_INT(local_24.y) * 26.0; local_7c.x = uvLeft; local_2c.y = local_64.y; DestinationQuad::DestinationQuad(&uvQuad,&local_7c,&local_2c,&local_34,&local_64); @@ -6815,7 +6815,7 @@ LAB_00942641: } } LAB_00942444: - local_64.y = (float)(int)local_24.y; + local_64.y = (float)GHIDRA_INT(local_24.y); local_34.y = 0.0; local_24.y = 0.0; local_64.x = uvLeft; diff --git a/src/game/backdrop_config.cpp b/src/game/backdrop_config.cpp index 9a32dea..3721653 100644 --- a/src/game/backdrop_config.cpp +++ b/src/game/backdrop_config.cpp @@ -162,7 +162,7 @@ BackdropConfig * BackdropConfig::operator_assign(BackdropConfig *other) ((std::string *)(&(*(undefined1 *)((char *)(this) + 0x120))))->std::string::assign(srcText,*(uint *)&(*(undefined1 *)((char *)(other) + 0x130))); } *(char *)&this->waterPitsMode = (char)other->waterPitsMode; - *(undefined1 *)((int)&this->waterPitsMode + 1) = *(undefined1 *)((int)&other->waterPitsMode + 1); + *(undefined1 *)(GHIDRA_INT(&this->waterPitsMode) + 1) = *(undefined1 *)(GHIDRA_INT(&other->waterPitsMode) + 1); return this; } @@ -181,33 +181,33 @@ void BackdropConfig::copy_constructor(BackdropConfig *other) ((std::string *)(&(*(undefined1 *)((char *)(this) + 0x4))))->std::string::string(&(*(undefined1 *)((char *)(other) + 0x4))); local_8 = 0; ((std::string *)(&(*(undefined1 *)((char *)(this) + 0x1c))))->std::string::string(&(*(undefined1 *)((char *)(other) + 0x1c))); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((std::string *)(&(*(undefined1 *)((char *)(this) + 0x34))))->std::string::string(&(*(undefined1 *)((char *)(other) + 0x34))); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; ((std::string *)(&(*(undefined1 *)((char *)(this) + 0x4c))))->std::string::string(&(*(undefined1 *)((char *)(other) + 0x4c))); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; this->walls = other->walls; this->wallVariants = other->wallVariants; this->floors = other->floors; this->floorVariants = other->floorVariants; *(char *)&this->unk1 = (char)other->unk1; ((std::string *)(&(*(undefined1 *)((char *)(this) + 0x78))))->std::string::string(&(*(undefined1 *)((char *)(other) + 0x78))); - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; ((std::string *)(&(*(undefined1 *)((char *)(this) + 0x90))))->std::string::string(&(*(undefined1 *)((char *)(other) + 0x90))); - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; ((std::string *)(&(*(undefined1 *)((char *)(this) + 0xa8))))->std::string::string(&(*(undefined1 *)((char *)(other) + 0xa8))); - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; ((std::string *)(&(*(undefined1 *)((char *)(this) + 0xc0))))->std::string::string(&(*(undefined1 *)((char *)(other) + 0xc0))); - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; ((std::string *)(&(*(undefined1 *)((char *)(this) + 0xd8))))->std::string::string(&(*(undefined1 *)((char *)(other) + 0xd8))); - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; ((std::string *)(&(*(undefined1 *)((char *)(this) + 0xf0))))->std::string::string(&(*(undefined1 *)((char *)(other) + 0xf0))); - local_8._0_1_ = 9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; ((std::string *)(&(*(undefined1 *)((char *)(this) + 0x108))))->std::string::string(&(*(undefined1 *)((char *)(other) + 0x108))); - local_8 = CONCAT31(local_8._1_3_,10); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),10); ((std::string *)(&(*(undefined1 *)((char *)(this) + 0x120))))->std::string::string(&(*(undefined1 *)((char *)(other) + 0x120))); *(char *)&this->waterPitsMode = (char)other->waterPitsMode; - *(undefined1 *)((int)&this->waterPitsMode + 1) = *(undefined1 *)((int)&other->waterPitsMode + 1); + *(undefined1 *)(GHIDRA_INT(&this->waterPitsMode) + 1) = *(undefined1 *)(GHIDRA_INT(&other->waterPitsMode) + 1); ExceptionList = local_10; return; } diff --git a/src/game/beam_renderer.cpp b/src/game/beam_renderer.cpp index 4431abf..e48a95d 100644 --- a/src/game/beam_renderer.cpp +++ b/src/game/beam_renderer.cpp @@ -5,8 +5,8 @@ void BeamRenderer::Begin(ANM2 *anm2, uint layer, byte isUseOverlay, byte isUnk) { DAT_00c78ef0 = anm2; DAT_00c78ef4 = layer; - DAT_00c78ef8._0_1_ = isUseOverlay; - DAT_00c78ef8._1_1_ = isUnk; + (*(undefined1 *)((char *)&(DAT_00c78ef8) + 0x0)) = isUseOverlay; + (*(undefined1 *)((char *)&(DAT_00c78ef8) + 0x1)) = isUnk; g_beamRendererPointsEnd = g_beamRendererPoints; return; } @@ -42,7 +42,7 @@ void BeamRenderer::Add(Vector *point, ColorMod *color, float spritesheetCoordina void *pointsEnd; pointsEnd = g_beamRendererPointsEnd; - local_c = __security_cookie ^ (uint)&dirX; + local_c = __security_cookie ^ GHIDRA_UINT(&dirX); newPointPos.x = point->x; newPointPos.y = point->y; local_68 = color->_tint[0]; @@ -55,7 +55,7 @@ void BeamRenderer::Add(Vector *point, ColorMod *color, float spritesheetCoordina fStack_28 = color->_colorize[2]; fStack_24 = color->_colorize[3]; local_70 = *(undefined8 *)color->_offset; - iVar1 = (int)g_beamRendererPointsEnd - (int)g_beamRendererPoints >> 0x1f; + iVar1 = GHIDRA_INT(g_beamRendererPointsEnd) - GHIDRA_INT(g_beamRendererPoints) >> 0x1f; normalX = g_vectorZero.x; normalY = g_vectorZero.y; newPointCoord = spritesheetCoordinate; @@ -65,7 +65,7 @@ void BeamRenderer::Add(Vector *point, ColorMod *color, float spritesheetCoordina fStack_38 = fStack_60; fStack_34 = fStack_5c; local_20 = local_70; - if (((int)g_beamRendererPointsEnd - (int)g_beamRendererPoints) / 0x44 + iVar1 != iVar1) { + if ((GHIDRA_INT(g_beamRendererPointsEnd) - GHIDRA_INT(g_beamRendererPoints)) / 0x44 + iVar1 != iVar1) { dirY = newPointPos.y - *(float *)((char *)g_beamRendererPointsEnd + -0x40); dirX = newPointPos.x - *(float *)((char *)g_beamRendererPointsEnd + -0x44); fVar2 = sqrtf(dirY * dirY + dirX * dirX); @@ -74,11 +74,11 @@ void BeamRenderer::Add(Vector *point, ColorMod *color, float spritesheetCoordina dirY = dirY * (1.0 / fVar2); } fVar2 = cos(1.5707964); - local_70 = CONCAT44(local_70._4_4_,fVar2); + local_70 = CONCAT44((*(undefined4 *)((char *)&(local_70) + 0x4)),fVar2); fVar2 = sin(1.5707964); normalX = (float)local_70 * dirX - fVar2 * dirY; normalY = fVar2 * dirX + (float)local_70 * dirY; - ((Point *)((Point *)((int)pointsEnd + -0x44)))->Point::UpdateNormal(&newPointPos); + ((Point *)((Point *)(GHIDRA_INT(pointsEnd) + -0x44)))->Point::UpdateNormal(&newPointPos); } pointsEnd = g_beamRendererPointsEnd; if (g_beamRendererPointsEnd == DAT_00c78f04) { @@ -101,7 +101,7 @@ void BeamRenderer::Add(Vector *point, ColorMod *color, float spritesheetCoordina *(float *)((char *)pointsEnd + 0x2c) = fStack_2c; *(float *)((char *)pointsEnd + 0x30) = fStack_28; *(float *)((char *)pointsEnd + 0x34) = fStack_24; - g_beamRendererPointsEnd = (void *)((int)g_beamRendererPointsEnd + 0x44); + g_beamRendererPointsEnd = (void *)(GHIDRA_INT(g_beamRendererPointsEnd) + 0x44); return; } @@ -185,20 +185,20 @@ void BeamRenderer::End() local_14 = 0xffffffff; puStack_18 = &LAB_00af1720; local_1c = ExceptionList; - stackCookie = __security_cookie ^ (uint)(coloredQuad + 0x88); + stackCookie = __security_cookie ^ GHIDRA_UINT((coloredQuad + 0x88)); ExceptionList = &local_1c; layer = ((ANM2 *)(DAT_00c78ef0))->ANM2::GetLayer(DAT_00c78ef4); ((LayerState *)(layer))->LayerState::GetTexture(&texture); local_14 = 0; if ((texture != (int *)0x0) && - (1 < (uint)(((int)g_beamRendererPointsEnd - (int)g_beamRendererPoints) / 0x44))) { + (1 < GHIDRA_UINT(((GHIDRA_INT(g_beamRendererPointsEnd) - GHIDRA_INT(g_beamRendererPoints)) / 0x44)))) { if ((char)DAT_00c78ef8 == '\0') { animState = &DAT_00c78ef0->_animState; } else { animState = &DAT_00c78ef0->_overlayAnimState; } - pfVar2 = ((AnimationState *)(animState))->AnimationState::GetLayerFrame((int)DAT_00c78ef4); + pfVar2 = ((AnimationState *)(animState))->AnimationState::GetLayerFrame(GHIDRA_INT(DAT_00c78ef4)); layerFrame = pfVar2; if (pfVar2 != (float *)0x0) { iVar4 = *(int *)ThreadLocalStoragePointer; @@ -217,7 +217,7 @@ void BeamRenderer::End() layerFlipX = layer->_flipX; spriteFlipX = DAT_00c78ef0->_flipX; pfVar5 = g_beamRendererPoints; - if (g_beamRendererPoints != (void *)((int)g_beamRendererPointsEnd + -0x44)) { + if (g_beamRendererPoints != (void *)(GHIDRA_INT(g_beamRendererPointsEnd) + -0x44)) { LAB_0041eac0: local_a0 = pfVar5 + 0x11; fVar7 = pfVar2[2]; @@ -226,7 +226,7 @@ LAB_0041eac0: fVar9 = fVar7 * pfVar5[0x15] * pfVar5[0x13] * 0.5; nextEdgeOffsetY = fVar7 * pfVar5[0x15] * pfVar5[0x14] * 0.5; fVar8 = pfVar5[5]; - cVar1 = (char)((uint)DAT_00c78ef8 >> 8); + cVar1 = (char)(GHIDRA_UINT(DAT_00c78ef8) >> 8); if (cVar1 != '\0') { fVar8 = fVar8 * pfVar2[3]; } @@ -259,8 +259,8 @@ LAB_0041eac0: else { local_168.x = uvLeft; local_168.y = nextUvY; - local_160._0_4_ = fVar7; - local_160._4_4_ = nextUvY; + (*(undefined4 *)((char *)&(local_160) + 0x0)) = fVar7; + (*(undefined4 *)((char *)&(local_160) + 0x4)) = nextUvY; local_128.x = fVar7; local_128.y = (float)piVar6; local_c0.x = uvLeft; @@ -297,7 +297,7 @@ LAB_0041eca3: } else { render_quad_copy(DAT_00c7f6e8,pvVar3); - DAT_00c7f6e8 = (void *)((int)DAT_00c7f6e8 + 0x70); + DAT_00c7f6e8 = (void *)(GHIDRA_INT(DAT_00c7f6e8) + 0x70); } if (isPerVertexColor == '\0') { pointColor._tint[0] = pfVar5[6]; @@ -309,7 +309,7 @@ LAB_0041eca3: pointColor._colorize[1] = pfVar5[0xb]; pointColor._colorize[2] = pfVar5[0xc]; pointColor._colorize[3] = pfVar5[0xd]; - pointColor._offset._0_8_ = *(undefined8 *)(pfVar5 + 0xe); + (*(undefined8 *)((char *)&(pointColor._offset) + 0x0)) = *(undefined8 *)(pfVar5 + 0xe); ((Color *)(&pointColor))->Color::__mul((ColorMod *)(pfVar2 + 0xc)); nextPointColor._tint[0] = local_a0[6]; nextPointColor._tint[1] = local_a0[7]; @@ -319,7 +319,7 @@ LAB_0041eca3: nextPointColor._colorize[1] = local_a0[0xb]; nextPointColor._colorize[2] = local_a0[0xc]; nextPointColor._colorize[3] = local_a0[0xd]; - nextPointColor._offset._0_8_ = *(undefined8 *)(local_a0 + 0xe); + (*(undefined8 *)((char *)&(nextPointColor._offset) + 0x0)) = *(undefined8 *)(local_a0 + 0xe); nextPointColor._offset[2] = local_a0[0x10]; ((Color *)(&nextPointColor))->Color::__mul((ColorMod *)(pfVar2 + 0xc)); local_16c = 0; @@ -368,11 +368,11 @@ LAB_0041eca3: goto LAB_0041ef47; } LAB_0041ef71: - local_1dc._16_4_ = g_graphicsManager_blendMode[0]; + (*(undefined4 *)((char *)&(local_1dc) + 0x10)) = g_graphicsManager_blendMode[0]; fStack_1c8 = (float)g_graphicsManager_blendMode[1]; fStack_1c4 = (float)g_graphicsManager_blendMode[2]; fStack_1c0 = (float)g_graphicsManager_blendMode[3]; - iVar4 = ((int)DAT_00c7f6d8 - (int)DAT_00c7f6d4) / 0x24; + iVar4 = (GHIDRA_INT(DAT_00c7f6d8) - GHIDRA_INT(DAT_00c7f6d4)) / 0x24; local_168.y = (float)g_graphicsManager_blendMode[4]; local_b4 = (float)iVar4; layer = ((ANM2 *)(DAT_00c78ef0))->ANM2::GetLayer(DAT_00c78ef4); @@ -381,7 +381,7 @@ LAB_0041ef71: g_graphicsManager_blendMode[2] = layer->_blendMode[2]; g_graphicsManager_blendMode[3] = layer->_blendMode[3]; g_graphicsManager_blendMode[4] = layer->_blendMode[4]; - local_a0 = (float *)(uint)(isPerVertexColor != '\0'); + local_a0 = (float *)GHIDRA_UINT((isPerVertexColor != '\0')); layer = ((ANM2 *)(DAT_00c78ef0))->ANM2::GetLayer(DAT_00c78ef4); if (((DAT_00c78ef0->_bitflags | layer->_bitflags) & 0x20U) != 0) { if (isPerVertexColor != '\0') { @@ -391,26 +391,26 @@ LAB_0041ef71: } local_a0 = (float *)0x2; } - unusedArg = &g_shaders + (int)local_a0 * 0x50; - if ((unusedArg != (undefined *)0x0) && (((&DAT_00c7911c)[(int)local_a0 * 0x50] & 1) != 0)) { + unusedArg = &g_shaders + GHIDRA_INT(local_a0) * 0x50; + if ((unusedArg != (undefined *)0x0) && (((&DAT_00c7911c)[GHIDRA_INT(local_a0) * 0x50] & 1) != 0)) { g_currentShader = unusedArg; } if (iVar4 != 0) { local_ac = 0.0; - local_160._4_4_ = (float)CONCAT31(local_160._5_3_,local_a0 != (float *)0x1); + (*(undefined4 *)((char *)&(local_160) + 0x4)) = (float)CONCAT31((*(undefined1 *)((char *)&(local_160) + 0x5)),local_a0 != (float *)0x1); local_a8 = 0.0; local_b0 = (undefined *)0x0; do { fVar7 = pfVar2[0x10]; fVar8 = pfVar2[0x11]; fVar9 = pfVar2[0x12]; - pfVar5 = (float *)(local_b0 + 0x28 + (int)g_beamRendererPoints); + pfVar5 = (float *)(local_b0 + 0x28 + GHIDRA_INT(g_beamRendererPoints)); pointColor._colorize[0] = *pfVar5; pointColor._colorize[1] = pfVar5[1]; pointColor._colorize[2] = pfVar5[2]; pointColor._colorize[3] = pfVar5[3]; - pfVar5 = (float *)(local_b0 + 0x18 + (int)g_beamRendererPoints); - pointColor._offset._0_8_ = *(undefined8 *)(local_b0 + 0x38 + (int)g_beamRendererPoints); + pfVar5 = (float *)(local_b0 + 0x18 + GHIDRA_INT(g_beamRendererPoints)); + (*(undefined8 *)((char *)&(pointColor._offset) + 0x0)) = *(undefined8 *)(local_b0 + 0x38 + GHIDRA_INT(g_beamRendererPoints)); local_138.y = pfVar2[0xc]; pointColor._tint[0] = local_138.y * *pfVar5; local_140.y = pfVar2[0xd]; @@ -436,20 +436,20 @@ LAB_0041ef71: } } pointColor._offset[2] = - pfVar2[0x16] + *(float *)(local_b0 + 0x40 + (int)g_beamRendererPoints); - pfVar5 = (float *)(local_b0 + 0x5c + (int)g_beamRendererPoints); + pfVar2[0x16] + *(float *)(local_b0 + 0x40 + GHIDRA_INT(g_beamRendererPoints)); + pfVar5 = (float *)(local_b0 + 0x5c + GHIDRA_INT(g_beamRendererPoints)); shaderColor._offset[1] = pfVar2[0x15] + pointColor._offset[1]; shaderColor._offset[0] = pfVar2[0x14] + pointColor._offset[0]; shaderColor._colorize[0] = pointColor._colorize[0]; shaderColor._colorize[1] = pointColor._colorize[1]; shaderColor._colorize[2] = pointColor._colorize[2]; shaderColor._colorize[3] = pointColor._colorize[3]; - nextPointColorize = (float *)(local_b0 + 0x6c + (int)g_beamRendererPoints); + nextPointColorize = (float *)(local_b0 + 0x6c + GHIDRA_INT(g_beamRendererPoints)); nextPointColor._colorize[0] = *nextPointColorize; nextPointColor._colorize[1] = nextPointColorize[1]; nextPointColor._colorize[2] = nextPointColorize[2]; - nextPointColor._offset._0_8_ = - *(undefined8 *)(local_b0 + 0x7c + (int)g_beamRendererPoints); + (*(undefined8 *)((char *)&(nextPointColor._offset) + 0x0)) = + *(undefined8 *)(local_b0 + 0x7c + GHIDRA_INT(g_beamRendererPoints)); nextPointColor._tint[0] = local_138.y * *pfVar5; nextPointColor._tint[1] = local_140.y * pfVar5[1]; nextPointColor._tint[2] = local_148.y * pfVar5[2]; @@ -470,7 +470,7 @@ LAB_0041ef71: nextPointColor._colorize[2] = fVar9; } nextPointColor._offset[2] = - pfVar2[0x16] + *(float *)(local_b0 + 0x84 + (int)g_beamRendererPoints); + pfVar2[0x16] + *(float *)(local_b0 + 0x84 + GHIDRA_INT(g_beamRendererPoints)); piVar6 = (int *)0x0; imageRefCount = (int *)0x0; endOffsetXY = CONCAT44(pfVar2[0x15] + nextPointColor._offset[1], @@ -503,7 +503,7 @@ LAB_0041ef71: imageRefCount = (int *)local_c0.y; } } - apply_sprite_shader_params(&shaderColor,SUB41(local_160._4_4_,0),piVar6,imageRefCount); + apply_sprite_shader_params(&shaderColor,SUB41((*(undefined4 *)((char *)&(local_160) + 0x4)),0),piVar6,imageRefCount); pvVar3 = DAT_00c7f6e4; local_17c[3] = fStack_48; local_1b8[0xd] = fStack_48; @@ -519,45 +519,45 @@ LAB_0041ef71: local_1b8[1] = shaderColor._tint[1]; local_1b8[2] = shaderColor._tint[2]; local_1b8[5] = shaderColor._tint[0]; - pfVar2 = (float *)((int)local_a8 + 0x20 + (int)DAT_00c7f6e4); + pfVar2 = (float *)(GHIDRA_INT(local_a8) + 0x20 + GHIDRA_INT(DAT_00c7f6e4)); *pfVar2 = shaderColor._tint[0]; pfVar2[1] = shaderColor._tint[1]; pfVar2[2] = shaderColor._tint[2]; pfVar2[3] = shaderColor._tint[3]; - *(undefined4 *)((char *)local_a8 + 0x30 + (int)pvVar3) = 0; + *(undefined4 *)((char *)local_a8 + 0x30 + GHIDRA_INT(pvVar3)) = 0; local_1b8[6] = shaderColor._tint[1]; local_1b8[7] = shaderColor._tint[2]; - pfVar2 = (float *)((int)local_a8 + 0x34 + (int)pvVar3); + pfVar2 = (float *)(GHIDRA_INT(local_a8) + 0x34 + GHIDRA_INT(pvVar3)); *pfVar2 = shaderColor._tint[0]; pfVar2[1] = shaderColor._tint[1]; pfVar2[2] = shaderColor._tint[2]; pfVar2[3] = shaderColor._tint[3]; - *(undefined4 *)((char *)local_a8 + 0x44 + (int)pvVar3) = 0; - pfVar2 = (float *)((int)local_a8 + 0x48 + (int)pvVar3); + *(undefined4 *)((char *)local_a8 + 0x44 + GHIDRA_INT(pvVar3)) = 0; + pfVar2 = (float *)(GHIDRA_INT(local_a8) + 0x48 + GHIDRA_INT(pvVar3)); *pfVar2 = endTint; pfVar2[1] = fStack_50; pfVar2[2] = fStack_4c; pfVar2[3] = fStack_48; - *(undefined4 *)((char *)local_a8 + 0x58 + (int)pvVar3) = 0; - pfVar2 = (float *)((int)local_a8 + 0x5c + (int)pvVar3); + *(undefined4 *)((char *)local_a8 + 0x58 + GHIDRA_INT(pvVar3)) = 0; + pfVar2 = (float *)(GHIDRA_INT(local_a8) + 0x5c + GHIDRA_INT(pvVar3)); *pfVar2 = endTint; pfVar2[1] = fStack_50; pfVar2[2] = fStack_4c; pfVar2[3] = fStack_48; - *(undefined4 *)((char *)local_a8 + 0x6c + (int)pvVar3) = 0; - iVar4 = (**(code **)(*texture + 0x14))((int)&(DAT_00c7f6d4->_topLeft).x + (int)local_ac); + *(undefined4 *)((char *)local_a8 + 0x6c + GHIDRA_INT(pvVar3)) = 0; + iVar4 = (**(code **)(*texture + 0x14))(GHIDRA_INT(&(DAT_00c7f6d4->_topLeft).x) + GHIDRA_INT(local_ac)); if ((iVar4 != 0) && (local_a0 == (float *)0x1)) { *(float *)(iVar4 + 0x24) = shaderColor._colorize[0]; *(float *)(iVar4 + 0x28) = shaderColor._colorize[1]; *(float *)(iVar4 + 0x2c) = shaderColor._colorize[2]; *(float *)(iVar4 + 0x30) = shaderColor._colorize[3]; - *(undefined8 *)(iVar4 + 0x34) = shaderColor._offset._0_8_; + *(undefined8 *)(iVar4 + 0x34) = (*(undefined8 *)((char *)&(shaderColor._offset) + 0x0)); *(float *)(iVar4 + 100) = shaderColor._colorize[0]; *(float *)(iVar4 + 0x68) = shaderColor._colorize[1]; *(float *)(iVar4 + 0x6c) = shaderColor._colorize[2]; *(float *)(iVar4 + 0x70) = shaderColor._colorize[3]; *(float *)(iVar4 + 0x3c) = shaderColor._offset[2]; - *(undefined8 *)(iVar4 + 0x74) = shaderColor._offset._0_8_; + *(undefined8 *)(iVar4 + 0x74) = (*(undefined8 *)((char *)&(shaderColor._offset) + 0x0)); *(float *)(iVar4 + 0x7c) = shaderColor._offset[2]; *(undefined8 *)(iVar4 + 0xb4) = endOffsetXY; *(undefined8 *)(iVar4 + 0xf4) = endOffsetXY; @@ -572,20 +572,20 @@ LAB_0041ef71: *(float *)(iVar4 + 0xf0) = fStack_38; *(float *)(iVar4 + 0xfc) = endOffsetZ; } - local_a8 = (float)((int)local_a8 + 0x70); + local_a8 = (float)(GHIDRA_INT(local_a8) + 0x70); unusedArg = local_b0 + 0x44; - local_ac = (float)((int)local_ac + 0x24); - local_b4 = (float)((int)local_b4 + -1); + local_ac = (float)(GHIDRA_INT(local_ac) + 0x24); + local_b4 = (float)(GHIDRA_INT(local_b4) + -1); pfVar2 = layerFrame; local_b0 = unusedArg; } while (local_b4 != 0.0); } - g_graphicsManager_blendMode[0] = local_1dc._16_4_; - g_graphicsManager_blendMode[1] = (int)fStack_1c8; - g_graphicsManager_blendMode[2] = (int)fStack_1c4; - g_graphicsManager_blendMode[3] = (int)fStack_1c0; - g_graphicsManager_blendMode[4] = (int)local_168.y; - shader_cache_find((int)unusedArg); + g_graphicsManager_blendMode[0] = (*(undefined4 *)((char *)&(local_1dc) + 0x10)); + g_graphicsManager_blendMode[1] = GHIDRA_INT(fStack_1c8); + g_graphicsManager_blendMode[2] = GHIDRA_INT(fStack_1c4); + g_graphicsManager_blendMode[3] = GHIDRA_INT(fStack_1c0); + g_graphicsManager_blendMode[4] = GHIDRA_INT(local_168.y); + shader_cache_find(GHIDRA_INT(unusedArg)); } } local_14 = 1; @@ -602,6 +602,6 @@ LAB_0041ef41: pfVar2 = layerFrame; LAB_0041ef47: pfVar5 = local_a0; - if (local_a0 == (float *)((int)g_beamRendererPointsEnd + -0x44)) goto LAB_0041ef71; + if (local_a0 == (float *)(GHIDRA_INT(g_beamRendererPointsEnd) + -0x44)) goto LAB_0041ef71; goto LAB_0041eac0; } diff --git a/src/game/beast_arena.cpp b/src/game/beast_arena.cpp index 9b71d02..04a8f42 100644 --- a/src/game/beast_arena.cpp +++ b/src/game/beast_arena.cpp @@ -28,19 +28,19 @@ void BeastArena::init() undefined4 uStack_14; int *roomConfig; - iStack_20 = (int)register0x00000010 + -4; + iStack_20 = GHIDRA_INT(register0x00000010) + -4; uStack_14 = 0xffffffff; puStack_18 = &LAB_00af18ad; iStack_1c = *unaff_FS_OFFSET; - uStack_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; - *unaff_FS_OFFSET = (int)&iStack_1c; + uStack_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; + *unaff_FS_OFFSET = GHIDRA_INT(&iStack_1c); roomConfig = *(int **)(*(int *)(*(int *)this + 4) + 0x10); if (((roomConfig == (int *)0x0) || (roomConfig[2] != 0x10)) || (*roomConfig != 0x23)) { *(undefined1 *)((char *)this + 0x118) = 0; } else { *(undefined1 *)((char *)this + 0x118) = 1; - iVar2 = (int)register0x00000010 + -4; + iVar2 = GHIDRA_INT(register0x00000010) + -4; if (*(char *)((char *)this + 0x10d) == '\0') { anm2Path._size = 0; anm2Path._capacity = 0xf; @@ -48,21 +48,21 @@ void BeastArena::init() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x30); anm2Path._size = 0x21; anm2Path._capacity = 0x2f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/backdrop/hell/background.anm2",0x22); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/backdrop/hell/background.anm2",0x22); uStack_14 = 0; - ((ANM2 *)((ANM2 *)((int)this + 4)))->ANM2::Load(&anm2Path,0); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 4)))->ANM2::Load(&anm2Path,0); uStack_14 = 0xffffffff; bVar1 = extraout_CL; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - ptr = (char *)anm2Path._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - ptr = *(char **)(anm2Path._buf._0_4_ + -4); + ptr = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)ptr))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(ptr)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -71,15 +71,15 @@ void BeastArena::init() bVar1 = extraout_CL_00; } *(uint *)((char *)this + 0x114) = *(uint *)((char *)this + 0x114) | 0x200; - ((ANM2 *)((ANM2 *)((int)this + 4)))->ANM2::LoadGraphics(bVar1); - pbVar4 = (byte *)((int)this + 0x1c); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 4)))->ANM2::LoadGraphics(bVar1); + pbVar4 = (byte *)(GHIDRA_INT(this) + 0x1c); if (0xf < *(uint *)((char *)this + 0x30)) { pbVar4 = *(byte **)pbVar4; } - bVar1 = ((ANM2 *)((ANM2 *)((int)this + 4)))->ANM2::SetAnimation(pbVar4,1); + bVar1 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 4)))->ANM2::SetAnimation(pbVar4,1); iVar2 = iStack_20; if (bVar1 != 0) { - ((AnimationState *)((AnimationState *)((int)this + 0x34)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x34)))->AnimationState::Rewind(); *(undefined1 *)((char *)this + 0x48) = 1; iVar2 = iStack_20; } @@ -88,13 +88,13 @@ void BeastArena::init() pbVar4 = (byte *)0x0; if (*(int *)((char *)this + 0x84) != 0) { do { - layer = ((ANM2 *)((ANM2 *)((int)this + 4)))->ANM2::GetLayer(pbVar4); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 4)))->ANM2::GetLayer(pbVar4); pbVar4 = pbVar4 + 1; layer->_wrapSMode = 0; layer->_wrapTMode = 1; } while (pbVar4 < *(byte **)((char *)this + 0x84)); } - pAVar5 = (ANM2 *)((int)this + 4); + pAVar5 = (ANM2 *)(GHIDRA_INT(this) + 4); layer = ((ANM2 *)(pAVar5))->ANM2::GetLayer((byte *)0x0); layer->_blendMode[0] = 0; layer->_blendMode[1] = 1; @@ -155,7 +155,7 @@ void BeastArena::init() layer->_blendMode[2] = 7; layer->_blendMode[3] = 1; layer->_blendMode[4] = 7; - pAVar5 = (ANM2 *)((int)this + 4); + pAVar5 = (ANM2 *)(GHIDRA_INT(this) + 4); layer = ((ANM2 *)(pAVar5))->ANM2::GetLayer(&DAT_00000009); layer->_blendMode[0] = 0; layer->_blendMode[1] = 1; @@ -181,7 +181,7 @@ void BeastArena::init() layer->_blendMode[3] = 1; layer->_blendMode[4] = 0; uVar3 = g_graphicsManager_flags; - layer = ((ANM2 *)((ANM2 *)((int)this + 4)))->ANM2::GetLayer(&DAT_0000000d); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 4)))->ANM2::GetLayer(&DAT_0000000d); if ((uVar3 & 4) == 0) { layer13SrcBlend = 6; } @@ -190,7 +190,7 @@ void BeastArena::init() layer->_blendMode[2] = 1; layer->_blendMode[3] = 1; layer->_blendMode[4] = 1; - layer = ((ANM2 *)((ANM2 *)((int)this + 4)))->ANM2::GetLayer(&DAT_0000000e); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 4)))->ANM2::GetLayer(&DAT_0000000e); layer->_blendMode[0] = 0; layer->_blendMode[1] = 0; layer->_blendMode[2] = 2; @@ -215,8 +215,8 @@ void BeastArena::update() if (*(char *)((char *)this + 0x118) != '\0') { if (*(char *)((char *)this + 0x10d) != '\0') { - ((AnimationState *)((AnimationState *)((int)this + 0x34)))->AnimationState::Update(); - ((AnimationState *)((AnimationState *)((int)this + 0x54)))->AnimationState::Update(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x34)))->AnimationState::Update(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x54)))->AnimationState::Update(); } i = 0; shiftX = *(float *)((char *)this + 0x120) + *(float *)((char *)this + 0x124); @@ -279,7 +279,7 @@ void BeastArena::render_light() local_8 = 0xffffffff; puStack_c = &LAB_00b0266d; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(sourceQuad + 0x60); + uVar2 = __security_cookie ^ GHIDRA_UINT((sourceQuad + 0x60)); ExceptionList = &local_10; g_graphicsManager_blendMode[0] = 0; g_graphicsManager_blendMode[1] = 1; diff --git a/src/game/bit_set128.cpp b/src/game/bit_set128.cpp index f4c53e4..e5ed65a 100644 --- a/src/game/bit_set128.cpp +++ b/src/game/bit_set128.cpp @@ -14,20 +14,20 @@ BitSet128 * BitSet128::operator_and(BitSet128 *outResult, BitSet128 *a, BitSet12 bLow = b->_l; aHigh = a->_h; bHigh = b->_h; - *(uint *)((int)&outResult->_l + 4) = *(uint *)((int)&a->_l + 4) & *(uint *)((int)&b->_l + 4); - aHighUpper = *(uint *)((int)&a->_h + 4); - bHighUpper = *(uint *)((int)&b->_h + 4); - *(uint *)&outResult->_l = (uint)aLow & (uint)bLow; - *(uint *)((int)&outResult->_h + 4) = aHighUpper & bHighUpper; - *(uint *)&outResult->_h = (uint)aHigh & (uint)bHigh; + *(uint *)(GHIDRA_INT(&outResult->_l) + 4) = *(uint *)(GHIDRA_INT(&a->_l) + 4) & *(uint *)(GHIDRA_INT(&b->_l) + 4); + aHighUpper = *(uint *)(GHIDRA_INT(&a->_h) + 4); + bHighUpper = *(uint *)(GHIDRA_INT(&b->_h) + 4); + *(uint *)&outResult->_l = GHIDRA_UINT(aLow) & GHIDRA_UINT(bLow); + *(uint *)(GHIDRA_INT(&outResult->_h) + 4) = aHighUpper & bHighUpper; + *(uint *)&outResult->_h = GHIDRA_UINT(aHigh) & GHIDRA_UINT(bHigh); return outResult; } // 004171b0 byte BitSet128::IsNonZero() { - if (((int)this->_l == 0 && *(int *)((int)&this->_l + 4) == 0) && - ((int)this->_h == 0 && *(int *)((int)&this->_h + 4) == 0)) { + if ((GHIDRA_INT(this->_l) == 0 && *(int *)(GHIDRA_INT(&this->_l) + 4) == 0) && + (GHIDRA_INT(this->_h) == 0 && *(int *)(GHIDRA_INT(&this->_h) + 4) == 0)) { return 0; } return 1; @@ -38,12 +38,12 @@ BitSet128 * BitSet128::operator__(BitSet128 *other) { uint *puVar1; - *(uint *)&this->_l = (uint)this->_l | (uint)other->_l; - puVar1 = (uint *)((int)&this->_l + 4); - *puVar1 = *puVar1 | *(uint *)((int)&other->_l + 4); - *(uint *)&this->_h = (uint)this->_h | (uint)other->_h; - puVar1 = (uint *)((int)&this->_h + 4); - *puVar1 = *puVar1 | *(uint *)((int)&other->_h + 4); + *(uint *)&this->_l = GHIDRA_UINT(this->_l) | GHIDRA_UINT(other->_l); + puVar1 = (uint *)(GHIDRA_INT(&this->_l) + 4); + *puVar1 = *puVar1 | *(uint *)(GHIDRA_INT(&other->_l) + 4); + *(uint *)&this->_h = GHIDRA_UINT(this->_h) | GHIDRA_UINT(other->_h); + puVar1 = (uint *)(GHIDRA_INT(&this->_h) + 4); + *puVar1 = *puVar1 | *(uint *)(GHIDRA_INT(&other->_h) + 4); return this; } @@ -61,12 +61,12 @@ BitSet128 * BitSet128::operator_or(BitSet128 *outResult, BitSet128 *a, BitSet128 bLow = b->_l; aHigh = a->_h; bHigh = b->_h; - *(uint *)((int)&outResult->_l + 4) = *(uint *)((int)&a->_l + 4) | *(uint *)((int)&b->_l + 4); - aHighUpper = *(uint *)((int)&a->_h + 4); - bHighUpper = *(uint *)((int)&b->_h + 4); - *(uint *)&outResult->_l = (uint)aLow | (uint)bLow; - *(uint *)((int)&outResult->_h + 4) = aHighUpper | bHighUpper; - *(uint *)&outResult->_h = (uint)aHigh | (uint)bHigh; + *(uint *)(GHIDRA_INT(&outResult->_l) + 4) = *(uint *)(GHIDRA_INT(&a->_l) + 4) | *(uint *)(GHIDRA_INT(&b->_l) + 4); + aHighUpper = *(uint *)(GHIDRA_INT(&a->_h) + 4); + bHighUpper = *(uint *)(GHIDRA_INT(&b->_h) + 4); + *(uint *)&outResult->_l = GHIDRA_UINT(aLow) | GHIDRA_UINT(bLow); + *(uint *)(GHIDRA_INT(&outResult->_h) + 4) = aHighUpper | bHighUpper; + *(uint *)&outResult->_h = GHIDRA_UINT(aHigh) | GHIDRA_UINT(bHigh); return outResult; } @@ -78,20 +78,20 @@ BitSet128 * BitSet128::__bnot(BitSet128 *out) qword lowBits; lowBits = this->_l; - *(uint *)((int)&out->_l + 4) = ~*(uint *)((int)&this->_l + 4); + *(uint *)(GHIDRA_INT(&out->_l) + 4) = ~*(uint *)(GHIDRA_INT(&this->_l) + 4); highBits = this->_h; - highBitsUpper = *(uint *)((int)&this->_h + 4); - *(uint *)&out->_l = ~(uint)lowBits; - *(uint *)&out->_h = ~(uint)highBits; - *(uint *)((int)&out->_h + 4) = ~highBitsUpper; + highBitsUpper = *(uint *)(GHIDRA_INT(&this->_h) + 4); + *(uint *)&out->_l = ~GHIDRA_UINT(lowBits); + *(uint *)&out->_h = ~GHIDRA_UINT(highBits); + *(uint *)(GHIDRA_INT(&out->_h) + 4) = ~highBitsUpper; return out; } // 00592230 byte BitSet128::IsZero() { - if (((int)this->_l == 0 && *(int *)((int)&this->_l + 4) == 0) && - ((int)this->_h == 0 && *(int *)((int)&this->_h + 4) == 0)) { + if ((GHIDRA_INT(this->_l) == 0 && *(int *)(GHIDRA_INT(&this->_l) + 4) == 0) && + (GHIDRA_INT(this->_h) == 0 && *(int *)(GHIDRA_INT(&this->_h) + 4) == 0)) { return 1; } return 0; @@ -136,10 +136,10 @@ undefined4 BitSet128::__bxor(undefined4 param_1, undefined4 param_2) // 0085e530 byte BitSet128::__eq(BitSet128 *other) { - if (((((int)this->_l == (int)other->_l) && - (*(int *)((int)&this->_l + 4) == *(int *)((int)&other->_l + 4))) && - ((int)this->_h == (int)other->_h)) && - (*(int *)((int)&this->_h + 4) == *(int *)((int)&other->_h + 4))) { + if ((((GHIDRA_INT(this->_l) == GHIDRA_INT(other->_l)) && + (*(int *)(GHIDRA_INT(&this->_l) + 4) == *(int *)(GHIDRA_INT(&other->_l) + 4))) && + (GHIDRA_INT(this->_h) == GHIDRA_INT(other->_h))) && + (*(int *)(GHIDRA_INT(&this->_h) + 4) == *(int *)(GHIDRA_INT(&other->_h) + 4))) { return 1; } return 0; @@ -153,7 +153,7 @@ byte BitSet128::Get(uint bit) uint uVar2; bool isClear; - if ((int)bit < 0x40) { + if (GHIDRA_INT(bit) < 0x40) { uVar2 = 1 << (bit & 0x1f); maskHigh = 0; if (0x1f < bit) { @@ -163,7 +163,7 @@ byte BitSet128::Get(uint bit) if (0x3f < bit) { maskHigh = uVar2; } - isClear = (uVar2 & (uint)this->_l) == 0 && (maskHigh & *(uint *)((int)&this->_l + 4)) == 0; + isClear = (uVar2 & GHIDRA_UINT(this->_l)) == 0 && (maskHigh & *(uint *)(GHIDRA_INT(&this->_l) + 4)) == 0; } else { uVar2 = bit - 0x40; @@ -176,7 +176,7 @@ byte BitSet128::Get(uint bit) if (0x3f < uVar2) { maskHigh = maskHigh; } - isClear = (maskHigh & (uint)this->_h) == 0 && (maskHigh & *(uint *)((int)&this->_h + 4)) == 0; + isClear = (maskHigh & GHIDRA_UINT(this->_h)) == 0 && (maskHigh & *(uint *)(GHIDRA_INT(&this->_h) + 4)) == 0; } if (isClear) { return 0; @@ -207,8 +207,8 @@ void BitSet128::Set(uint bit, byte value) if (0x3f < maskHigh) { uVar3 = maskHigh; } - *(uint *)&this->_h = (uint)this->_h & ~maskHigh; - puVar1 = (uint *)((int)&this->_h + 4); + *(uint *)&this->_h = GHIDRA_UINT(this->_h) & ~maskHigh; + puVar1 = (uint *)(GHIDRA_INT(&this->_h) + 4); *puVar1 = *puVar1 & ~uVar3; return; } @@ -221,8 +221,8 @@ void BitSet128::Set(uint bit, byte value) if (0x3f < bit) { maskHigh = maskHigh; } - *(uint *)&this->_l = (uint)this->_l & ~maskHigh; - puVar1 = (uint *)((int)&this->_l + 4); + *(uint *)&this->_l = GHIDRA_UINT(this->_l) & ~maskHigh; + puVar1 = (uint *)(GHIDRA_INT(&this->_l) + 4); *puVar1 = *puVar1 & ~maskHigh; return; } diff --git a/src/game/boss_overlay.cpp b/src/game/boss_overlay.cpp index 7b52d27..302b40b 100644 --- a/src/game/boss_overlay.cpp +++ b/src/game/boss_overlay.cpp @@ -74,18 +74,18 @@ void BossOverlay::play(int overlayType) byte *animData; ANM2 *sprite; - if (4 < (uint)overlayType) { + if (4 < GHIDRA_UINT(overlayType)) { return; } - sprite = (ANM2 *)((int)sprite + 8); - ((ANM2 *)(sprite))->ANM2::Load((std_string *)((int)sprite + overlayType * 0x38 + 0x120),1); + sprite = (ANM2 *)(GHIDRA_INT(sprite) + 8); + ((ANM2 *)(sprite))->ANM2::Load((std_string *)(GHIDRA_INT(sprite) + overlayType * 0x38 + 0x120),1); ((ANM2 *)(sprite))->ANM2::LoadGraphics(unk); *(int *)((char *)sprite + 4) = overlayType; if ((overlayType == 2) || (overlayType == 3)) { layer = ((ANM2 *)(sprite))->ANM2::GetLayer(&DAT_00000004); layer->_bitflags = layer->_bitflags | 0x20; } - anim = (byte *)((int)sprite + overlayType * 0x38 + 0x138); + anim = (byte *)(GHIDRA_INT(sprite) + overlayType * 0x38 + 0x138); if (0xf < *(uint *)((char *)sprite + overlayType * 0x38 + 0x14c)) { anim = *(byte **)anim; } @@ -101,7 +101,7 @@ void BossOverlay::play(int overlayType) isLess = bVar1 < *targetName; if (bVar1 != *targetName) { LAB_00421555: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0042155a; } if (bVar1 == 0) break; @@ -118,7 +118,7 @@ LAB_0042155a: } bVar1 = ((ANM2 *)(sprite))->ANM2::SetAnimation(anim,1); if (bVar1 != 0) { - ((AnimationState *)((AnimationState *)((int)sprite + 0x38)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(sprite) + 0x38)))->AnimationState::Rewind(); *(undefined1 *)((char *)sprite + 0x4c) = 1; } LAB_00421582: diff --git a/src/game/boss_pool.cpp b/src/game/boss_pool.cpp index 8dab20f..85cc099 100644 --- a/src/game/boss_pool.cpp +++ b/src/game/boss_pool.cpp @@ -32,7 +32,7 @@ void BossPool::init(uint seed) undefined4 lastEntryTail; undefined4 *pickedEntry; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); poolRng = (uint *)&(*(undefined1 *)((char *)(this) + 0x28)); local_9dc = (int *)0x25; do { @@ -50,7 +50,7 @@ void BossPool::init(uint seed) *poolRng = seed; poolRng[3] = 9; poolRng = poolRng + 0xf; - local_9dc = (int *)((int)local_9dc + -1); + local_9dc = (int *)(GHIDRA_INT(local_9dc) + -1); } while (local_9dc != (int *)0x0); vector_bool_resize(&this->_removedBosses,0x68,7); vector_bool_resize(this + 1,0x68,isFillValue); @@ -84,7 +84,7 @@ void BossPool::init(uint seed) ((MTRNG *)(mtRng))->MTRNG::Init(local_9dc[4]); uVar11 = (local_9dc[1] - *local_9dc) / 0x14; uVar13 = uVar11 - 1; - if (0 < (int)uVar13) { + if (0 < GHIDRA_INT(uVar13)) { lastEntryOffset = uVar13 * 0x14; do { uVar12 = ((MTRNG *)(mtRng))->MTRNG::Next(); @@ -120,7 +120,7 @@ void BossPool::init(uint seed) uVar13 = uVar13 - 1; lastEntryOffset = lastEntryOffset + -0x14; uVar11 = uVar11 - 1; - } while (0 < (int)uVar13); + } while (0 < GHIDRA_INT(uVar13)); } } local_9dc = local_9dc + 0xf; @@ -181,7 +181,7 @@ void BossPool::load_xml(byte *param_1, int param_2) local_14 = (byte ******)0xffffffff; puStack_18 = &LAB_00af1814; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(stageName + 0xb); + local_24 = __security_cookie ^ GHIDRA_UINT((stageName + 0xb)); ExceptionList = &local_1c; if (param_2 == 0) { pppppppbVar7 = (byte *******)(stageName + 0xe); @@ -301,8 +301,8 @@ void BossPool::load_xml(byte *param_1, int param_2) stageNameSize = 0; stageNameCapacity = 0xf; stageName[0] = (byte *******)0x0; - local_14._1_3_ = (undefined3)((uint)local_14 >> 8); - local_14 = (byte ******)CONCAT31(local_14._1_3_,2); + (*(undefined1 *)((char *)&(local_14) + 0x1)) = (undefined3)(GHIDRA_UINT(local_14) >> 8); + local_14 = (byte ******)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); poolAttr = *(undefined4 **)(poolNode + 0x20); ppppppbStack_100ac = (byte ******)0x0; if (poolAttr != (undefined4 *)0x0) { @@ -322,14 +322,14 @@ void BossPool::load_xml(byte *param_1, int param_2) bVar9 = bStack_1009d < *pbVar8; if (bStack_1009d != *pbVar8) { LAB_004221a2: - uVar6 = -(uint)bVar9 | 1; + uVar6 = -GHIDRA_UINT(bVar9) | 1; goto LAB_004221a7; } if (bStack_1009d == 0) break; bStack_1009d = *(byte *)((char *)ppppbVar5 + 1); bVar9 = bStack_1009d < pbVar8[1]; if (bStack_1009d != pbVar8[1]) goto LAB_004221a2; - ppppbVar5 = (byte ****)((int)ppppbVar5 + 2); + ppppbVar5 = (byte ****)(GHIDRA_INT(ppppbVar5) + 2); pbVar8 = pbVar8 + 2; } while (bStack_1009d != 0); uVar6 = 0; @@ -341,7 +341,7 @@ LAB_004221a7: pbVar8 = pbVar8 + 1; } while (bVar1 != 0); ((std::string *)((char *)stageName))->std::string::assign(poolAttrValue, - (int)pbVar8 - (int)(poolAttrValue + 1)); + GHIDRA_INT(pbVar8) - GHIDRA_INT((poolAttrValue + 1))); } else { keyCursor = "doubletrouble"; @@ -351,14 +351,14 @@ LAB_004221a7: bVar9 = bVar1 < (byte)*keyCursor; if (bVar1 != *keyCursor) { LAB_004221f0: - uVar6 = -(uint)bVar9 | 1; + uVar6 = -GHIDRA_UINT(bVar9) | 1; goto LAB_004221f5; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)ppppbVar5 + 1); bVar9 = bVar1 < (byte)keyCursor[1]; if (bVar1 != keyCursor[1]) goto LAB_004221f0; - ppppbVar5 = (byte ****)((int)ppppbVar5 + 2); + ppppbVar5 = (byte ****)(GHIDRA_INT(ppppbVar5) + 2); keyCursor = keyCursor + 2; } while (bVar1 != 0); uVar6 = 0; @@ -374,7 +374,7 @@ LAB_004221f5: FUN_00423530(auStack_100cc,stageName); pvVar4 = pvStack_100c4; if (*(char *)((char *)pvStack_100c4 + 0xd) == '\0') { - pbVar8 = (byte *)((int)pvStack_100c4 + 0x10); + pbVar8 = (byte *)(GHIDRA_INT(pvStack_100c4) + 0x10); if (0xf < *(uint *)((char *)pvStack_100c4 + 0x24)) { pbVar8 = *(byte **)pbVar8; } @@ -421,14 +421,14 @@ LAB_004221f5: bVar9 = bStack_1009d < *pbVar8; if (bStack_1009d != *pbVar8) { LAB_00422368: - uVar6 = -(uint)bVar9 | 1; + uVar6 = -GHIDRA_UINT(bVar9) | 1; goto LAB_0042236d; } if (bStack_1009d == 0) break; bStack_1009d = *(byte *)((char *)bossAttrNameCursor + 1); bVar9 = bStack_1009d < pbVar8[1]; if (bStack_1009d != pbVar8[1]) goto LAB_00422368; - bossAttrNameCursor = (byte ****)((int)bossAttrNameCursor + 2); + bossAttrNameCursor = (byte ****)(GHIDRA_INT(bossAttrNameCursor) + 2); pbVar8 = pbVar8 + 2; } while (bStack_1009d != 0); uVar6 = 0; @@ -444,14 +444,14 @@ LAB_0042236d: bVar9 = bStack_1009d < (byte)*keyCursor; if (bStack_1009d != *keyCursor) { LAB_004223d2: - uVar6 = -(uint)bVar9 | 1; + uVar6 = -GHIDRA_UINT(bVar9) | 1; goto LAB_004223d7; } if (bStack_1009d == 0) break; bStack_1009d = *(byte *)((char *)bossAttrNameCursor + 1); bVar9 = bStack_1009d < (byte)keyCursor[1]; if (bStack_1009d != keyCursor[1]) goto LAB_004223d2; - bossAttrNameCursor = (byte ****)((int)bossAttrNameCursor + 2); + bossAttrNameCursor = (byte ****)(GHIDRA_INT(bossAttrNameCursor) + 2); keyCursor = keyCursor + 2; } while (bStack_1009d != 0); uVar6 = 0; @@ -468,14 +468,14 @@ LAB_004223d7: bVar9 = bVar1 < *pbVar8; if (bVar1 != *pbVar8) { LAB_00422410: - uVar6 = -(uint)bVar9 | 1; + uVar6 = -GHIDRA_UINT(bVar9) | 1; goto LAB_00422415; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)bossAttrNameCursor + 1); bVar9 = bVar1 < pbVar8[1]; if (bVar1 != pbVar8[1]) goto LAB_00422410; - bossAttrNameCursor = (byte ****)((int)bossAttrNameCursor + 2); + bossAttrNameCursor = (byte ****)(GHIDRA_INT(bossAttrNameCursor) + 2); pbVar8 = pbVar8 + 2; } while (bVar1 != 0); uVar6 = 0; @@ -489,16 +489,16 @@ LAB_00422415: } pppppbVar2 = bossId; manager = g_manager; - if (((int)bossId < 0) || - (((int)(g_manager->_entityConfig)._bosses._end - - (int)(g_manager->_entityConfig)._bosses._begin) / 100 <= (int)bossId)) { + if ((GHIDRA_INT(bossId) < 0) || + ((GHIDRA_INT((g_manager->_entityConfig)._bosses._end) - + GHIDRA_INT((g_manager->_entityConfig)._bosses._begin)) / 100 <= GHIDRA_INT(bossId))) { KAGE_LogMessage(0x10,(byte *)"BossID out of bounds\n"); } pppppppbVar7 = pppppppbStack_100a4; bossInitialWeight = bossWeight; pppppbStack_10090 = *(byte ******) - ((int)(manager->_entityConfig)._bosses._begin + (int)pppppbVar2 * 100 + 0x54); + (GHIDRA_INT((manager->_entityConfig)._bosses._begin) + GHIDRA_INT(pppppbVar2) * 100 + 0x54); bossesEnd = pppppppbStack_100a4[7]; if (bossesEnd == pppppppbStack_100a4[8]) { std::vector<20byte>::_Emplace_reallocate(bossesEnd,&bossId); @@ -521,14 +521,14 @@ LAB_00422415: LAB_004224fe: KAGE_LogMessage(4,(byte *)"Boss pool: Unknown stage \'%s\'\n"); } - local_14 = (byte ******)CONCAT31(local_14._1_3_,1); + local_14 = (byte ******)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); if (0xf < stageNameCapacity) { uVar6 = stageNameCapacity + 1; pppppppbVar7 = stageName[0]; if (0xfff < uVar6) { pppppppbVar7 = (byte *******)stageName[0][-1]; uVar6 = stageNameCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)stageName[0] + (-4 - (int)pppppppbVar7))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(stageName[0]) + (-4 - GHIDRA_INT(pppppppbVar7)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -537,7 +537,7 @@ LAB_004224fe: } } } - local_14 = (byte ******)CONCAT31(local_14._1_3_,3); + local_14 = (byte ******)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),3); tracked_alloc(1,xmlText,0); local_14 = (byte ******)0x4; ((xml_memory_pool *)(xmlPool))->xml_memory_pool::clear(); diff --git a/src/game/camera.cpp b/src/game/camera.cpp index 5e23475..f5de03d 100644 --- a/src/game/camera.cpp +++ b/src/game/camera.cpp @@ -36,7 +36,7 @@ void Camera::UpdateUltrasmooth(uint *param_2, int *param_3) puStack_20 = local_3c + 0x38; puStack_18 = &LAB_00b0a4c8; local_1c = ExceptionList; - securityCookie = __security_cookie ^ (uint)(local_3c + 0x2c); + securityCookie = __security_cookie ^ GHIDRA_UINT((local_3c + 0x2c)); ExceptionList = &local_1c; local_14 = 0; self = this; @@ -74,7 +74,7 @@ void Camera::UpdateUltrasmooth(uint *param_2, int *param_3) KAGE_LogMessage(0x10,(byte *)"This function should only be called on consolidated messages"); } stream = KAGE::Filesys::BufferedStream::vftable; - local_14 = CONCAT31(local_14._1_3_,1); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); local_30 = 0; memory_stream_read(&stream,&local_30,8,1); local_24 = 0; @@ -106,18 +106,18 @@ void Camera::UpdateUltrasmooth(uint *param_2, int *param_3) securityCookie = extraout_ECX_01; while (match != (byte *)0x0) { bVar1 = *(byte *)(profanityNode + 10); - uVar7 = (uint)bVar1; + uVar7 = GHIDRA_UINT(bVar1); if (match == &DAT_00c93050) { - uVar5 = (uint)CONCAT11((&DAT_00c93050)[uVar7],bVar1); + uVar5 = GHIDRA_UINT(CONCAT11((&DAT_00c93050)[uVar7],bVar1)); LAB_0091ebb0: cVar4 = (char)(uVar5 >> 8); if ((cVar4 == ' ') || (cVar4 == '\0')) { strncpy((char *)match,"********************************",uVar7); - uVar5 = (uint)*(byte *)(profanityNode + 10); + uVar5 = GHIDRA_UINT(*(byte *)(profanityNode + 10)); } } else { - uVar5 = (uint)CONCAT11(match[uVar7],bVar1); + uVar5 = GHIDRA_UINT(CONCAT11(match[uVar7],bVar1)); if (match[-1] == 0x20) goto LAB_0091ebb0; } haystack = haystack + (uVar5 & 0xff); @@ -128,7 +128,7 @@ LAB_0091ebb0: } while (profanityNode != DAT_00c7986c); } } - OnlineChat::add_message(securityCookie,(undefined4)local_30,local_30._4_4_,*param_2,param_2[1]); + OnlineChat::add_message(securityCookie,(undefined4)local_30,(*(undefined4 *)((char *)&(local_30) + 0x4)),*param_2,param_2[1]); FUN_00a58200(); puVar3 = puStack_20; } @@ -167,7 +167,7 @@ void Camera::constructor(Room *room) uint enterDoor; Game *game; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b0b454; local_1c = ExceptionList; @@ -176,15 +176,15 @@ void Camera::constructor(Room *room) CircularBuffer::constructor(0x3c); local_14 = 0; CircularBuffer::constructor(0x5a); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; CircularBuffer::constructor(300); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; CircularBuffer::constructor(0xf); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; CircularBuffer::constructor(4); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; CircularBuffer::constructor(0x78); - local_14 = CONCAT31(local_14._1_3_,5); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),5); (this->_playersCenter).y = 0.0; (this->_playersCenter).x = 0.0; (this->_position).y = 0.0; @@ -209,23 +209,23 @@ void Camera::constructor(Room *room) (this->_unk84).x = g_vectorZero.x; (this->_unk84).y = g_vectorZero.y; fVar3 = *(float *)(this->_aimOffsetBuffer + 8); - while ((int)fVar3 < 0x3c) { + while (GHIDRA_INT(fVar3) < 0x3c) { softClampOut.y = *(float *)(this->_aimOffsetBuffer + 4); if (fVar3 == softClampOut.y) { - if ((int)fVar3 < 1) { + if (GHIDRA_INT(fVar3) < 1) { KAGE_LogMessage(0x10,(byte *)"Cannot erase from empty buffer"); softClampOut.y = *(float *)(this->_aimOffsetBuffer + 4); fVar3 = *(float *)(this->_aimOffsetBuffer + 8); } - iVar2 = (*(int *)(this->_aimOffsetBuffer + 0xc) + 1) % (int)softClampOut.y; - fVar3 = (float)((int)fVar3 + -1); + iVar2 = (*(int *)(this->_aimOffsetBuffer + 0xc) + 1) % GHIDRA_INT(softClampOut.y); + fVar3 = (float)(GHIDRA_INT(fVar3) + -1); *(int *)(this->_aimOffsetBuffer + 0xc) = iVar2; *(float *)(this->_aimOffsetBuffer + 8) = fVar3; } else { iVar2 = *(int *)(this->_aimOffsetBuffer + 0xc); } - writeSlot = ((int)fVar3 + iVar2) % (int)softClampOut.y; + writeSlot = (GHIDRA_INT(fVar3) + iVar2) % GHIDRA_INT(softClampOut.y); iVar2 = *(int *)this->_aimOffsetBuffer; *(float *)(iVar2 + writeSlot * 8) = g_vectorZero.x; *(float *)(iVar2 + 4 + writeSlot * 8) = g_vectorZero.y; @@ -237,20 +237,20 @@ void Camera::constructor(Room *room) do { softClampOut.y = *(float *)(this->_velocityOffsetBuffer + 4); if (local_30.y == softClampOut.y) { - if ((int)local_30.y < 1) { + if (GHIDRA_INT(local_30.y) < 1) { KAGE_LogMessage(0x10,(byte *)"Cannot erase from empty buffer"); softClampOut.y = *(float *)(this->_velocityOffsetBuffer + 4); local_30.y = *(float *)(this->_velocityOffsetBuffer + 8); } - iVar2 = (*(int *)(this->_velocityOffsetBuffer + 0xc) + 1) % (int)softClampOut.y; - local_30.y = (float)((int)local_30.y + -1); + iVar2 = (*(int *)(this->_velocityOffsetBuffer + 0xc) + 1) % GHIDRA_INT(softClampOut.y); + local_30.y = (float)(GHIDRA_INT(local_30.y) + -1); *(int *)(this->_velocityOffsetBuffer + 0xc) = iVar2; *(float *)(this->_velocityOffsetBuffer + 8) = local_30.y; } else { iVar2 = *(int *)(this->_velocityOffsetBuffer + 0xc); } - writeSlot = ((int)local_30.y + iVar2) % (int)softClampOut.y; + writeSlot = (GHIDRA_INT(local_30.y) + iVar2) % GHIDRA_INT(softClampOut.y); iVar2 = *(int *)this->_velocityOffsetBuffer; *(float *)(iVar2 + writeSlot * 8) = g_vectorZero.x; *(float *)(iVar2 + 4 + writeSlot * 8) = g_vectorZero.y; @@ -263,20 +263,20 @@ void Camera::constructor(Room *room) do { softClampOut.y = *(float *)(this->_enemyOffsetBuffer + 4); if (local_30.y == softClampOut.y) { - if ((int)local_30.y < 1) { + if (GHIDRA_INT(local_30.y) < 1) { KAGE_LogMessage(0x10,(byte *)"Cannot erase from empty buffer"); softClampOut.y = *(float *)(this->_enemyOffsetBuffer + 4); local_30.y = *(float *)(this->_enemyOffsetBuffer + 8); } - iVar2 = (*(int *)(this->_enemyOffsetBuffer + 0xc) + 1) % (int)softClampOut.y; - local_30.y = (float)((int)local_30.y + -1); + iVar2 = (*(int *)(this->_enemyOffsetBuffer + 0xc) + 1) % GHIDRA_INT(softClampOut.y); + local_30.y = (float)(GHIDRA_INT(local_30.y) + -1); *(int *)(this->_enemyOffsetBuffer + 0xc) = iVar2; *(float *)(this->_enemyOffsetBuffer + 8) = local_30.y; } else { iVar2 = *(int *)(this->_enemyOffsetBuffer + 0xc); } - writeSlot = ((int)local_30.y + iVar2) % (int)softClampOut.y; + writeSlot = (GHIDRA_INT(local_30.y) + iVar2) % GHIDRA_INT(softClampOut.y); iVar2 = *(int *)this->_enemyOffsetBuffer; *(float *)(iVar2 + writeSlot * 8) = g_vectorZero.x; *(float *)(iVar2 + 4 + writeSlot * 8) = g_vectorZero.y; @@ -289,20 +289,20 @@ void Camera::constructor(Room *room) do { softClampOut.y = *(float *)(this->_playerSpreadBuffer + 4); if (local_30.y == softClampOut.y) { - if ((int)local_30.y < 1) { + if (GHIDRA_INT(local_30.y) < 1) { KAGE_LogMessage(0x10,(byte *)"Cannot erase from empty buffer"); softClampOut.y = *(float *)(this->_playerSpreadBuffer + 4); local_30.y = *(float *)(this->_playerSpreadBuffer + 8); } - iVar2 = (*(int *)(this->_playerSpreadBuffer + 0xc) + 1) % (int)softClampOut.y; - local_30.y = (float)((int)local_30.y + -1); + iVar2 = (*(int *)(this->_playerSpreadBuffer + 0xc) + 1) % GHIDRA_INT(softClampOut.y); + local_30.y = (float)(GHIDRA_INT(local_30.y) + -1); *(int *)(this->_playerSpreadBuffer + 0xc) = iVar2; *(float *)(this->_playerSpreadBuffer + 8) = local_30.y; } else { iVar2 = *(int *)(this->_playerSpreadBuffer + 0xc); } - writeSlot = ((int)local_30.y + iVar2) % (int)softClampOut.y; + writeSlot = (GHIDRA_INT(local_30.y) + iVar2) % GHIDRA_INT(softClampOut.y); iVar2 = *(int *)this->_playerSpreadBuffer; *(float *)(iVar2 + writeSlot * 8) = g_vectorZero.x; *(float *)(iVar2 + 4 + writeSlot * 8) = g_vectorZero.y; @@ -315,26 +315,26 @@ void Camera::constructor(Room *room) do { softClampOut.y = *(float *)(this->_shakeOffsetBuffer + 4); if (fVar3 == softClampOut.y) { - if ((int)fVar3 < 1) { + if (GHIDRA_INT(fVar3) < 1) { KAGE_LogMessage(0x10,(byte *)"Cannot erase from empty buffer"); softClampOut.y = *(float *)(this->_shakeOffsetBuffer + 4); fVar3 = *(float *)(this->_shakeOffsetBuffer + 8); } - iVar2 = (*(int *)(this->_shakeOffsetBuffer + 0xc) + 1) % (int)softClampOut.y; - fVar3 = (float)((int)fVar3 + -1); + iVar2 = (*(int *)(this->_shakeOffsetBuffer + 0xc) + 1) % GHIDRA_INT(softClampOut.y); + fVar3 = (float)(GHIDRA_INT(fVar3) + -1); *(int *)(this->_shakeOffsetBuffer + 0xc) = iVar2; *(float *)(this->_shakeOffsetBuffer + 8) = fVar3; } else { iVar2 = *(int *)(this->_shakeOffsetBuffer + 0xc); } - writeSlot = (iVar2 + (int)fVar3) % (int)softClampOut.y; + writeSlot = (iVar2 + GHIDRA_INT(fVar3)) % GHIDRA_INT(softClampOut.y); iVar2 = *(int *)this->_shakeOffsetBuffer; *(float *)(iVar2 + writeSlot * 8) = g_vectorZero.x; *(float *)(iVar2 + 4 + writeSlot * 8) = g_vectorZero.y; *(int *)(this->_shakeOffsetBuffer + 8) = *(int *)(this->_shakeOffsetBuffer + 8) + 1; fVar3 = *(float *)(this->_shakeOffsetBuffer + 8); - } while ((int)fVar3 < 4); + } while (GHIDRA_INT(fVar3) < 4); } if (*(int *)(this->_focusPositionBuffer + 8) < 0x78) { fVar3 = *(float *)(this->_focusPositionBuffer + 8); @@ -343,26 +343,26 @@ void Camera::constructor(Room *room) softClampOut.y = *(float *)(this->_focusPositionBuffer + 4); local_38.y = -g_vectorOne.y; if (fVar3 == softClampOut.y) { - if ((int)fVar3 < 1) { + if (GHIDRA_INT(fVar3) < 1) { KAGE_LogMessage(0x10,(byte *)"Cannot erase from empty buffer"); softClampOut.y = *(float *)(this->_focusPositionBuffer + 4); fVar3 = *(float *)(this->_focusPositionBuffer + 8); } - iVar2 = (*(int *)(this->_focusPositionBuffer + 0xc) + 1) % (int)softClampOut.y; - fVar3 = (float)((int)fVar3 + -1); + iVar2 = (*(int *)(this->_focusPositionBuffer + 0xc) + 1) % GHIDRA_INT(softClampOut.y); + fVar3 = (float)(GHIDRA_INT(fVar3) + -1); *(int *)(this->_focusPositionBuffer + 0xc) = iVar2; *(float *)(this->_focusPositionBuffer + 8) = fVar3; } else { iVar2 = *(int *)(this->_focusPositionBuffer + 0xc); } - writeSlot = ((int)fVar3 + iVar2) % (int)softClampOut.y; + writeSlot = (GHIDRA_INT(fVar3) + iVar2) % GHIDRA_INT(softClampOut.y); iVar2 = *(int *)this->_focusPositionBuffer; *(float *)(iVar2 + writeSlot * 8) = local_30.y; *(float *)(iVar2 + 4 + writeSlot * 8) = local_38.y; *(int *)(this->_focusPositionBuffer + 8) = *(int *)(this->_focusPositionBuffer + 8) + 1; fVar3 = *(float *)(this->_focusPositionBuffer + 8); - } while ((int)fVar3 < 0x78); + } while (GHIDRA_INT(fVar3) < 0x78); } game = g_game; this->_shouldOverride = 0; @@ -433,7 +433,7 @@ Vector * Camera::get_enemy_focus_offset(Vector *outOffset) fVar4 = g_vectorZero.x; puStack_c = &LAB_00b0b48d; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar3 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; totalWeight = (Vector *)0x0; entityData = *(int *)((char *)this->_room + 0x125c); @@ -722,8 +722,8 @@ void Camera::update_focus_position(byte isSkipFocusBuffer) return; } players_center_position(&g_game->_playerManager,&playersCenter,1); - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 == 1) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 == 1) { spreadOffsetX.y = 35.0; } else { @@ -761,12 +761,12 @@ void Camera::update_focus_position(byte isSkipFocusBuffer) (local_EAX_76->_isPlayingExtraAnimation == 0)) && (local_EAX_76->_isPlayingItemAnimation == 0)))) { EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)local_54,7,-1,-1,0,0); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)local_54,7,-1,-1,0,0); local_14 = 0; if (local_48 != (Entity *)0x0) { uVar8 = 0; do { - iVar3 = __RTDynamicCast(*(undefined4 *)(local_54._4_4_ + uVar8 * 4),0, + iVar3 = __RTDynamicCast(*(undefined4 *)((*(undefined4 *)((char *)&(local_54) + 0x4)) + uVar8 * 4),0, &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Laser::RTTI_Type_Descriptor,0); if ((((iVar3 != 0) && ((*(int *)(iVar3 + 0x2c) == 1 || (*(int *)(iVar3 + 0x2c) == 3)))) && @@ -781,33 +781,33 @@ void Camera::update_focus_position(byte isSkipFocusBuffer) local_14 = 0xffffffff; if (local_54[0] == '\0') { local_14 = 1; - tracked_alloc(1,(void *)local_54._4_4_,0); + tracked_alloc(1,(*(undefined4 *)((char *)&((void *)local_54) + 0x4)),0); local_14 = 0xffffffff; } } spreadOffsetX.y = *(float *)(this->_aimOffsetBuffer + 4); fVar9 = *(float *)(this->_aimOffsetBuffer + 8); if (fVar9 == spreadOffsetX.y) { - if ((int)fVar9 < 1) { + if (GHIDRA_INT(fVar9) < 1) { KAGE_LogMessage(0x10,(byte *)"Cannot erase from empty buffer"); spreadOffsetX.y = *(float *)(this->_aimOffsetBuffer + 4); fVar9 = *(float *)(this->_aimOffsetBuffer + 8); } - iVar3 = (*(int *)(this->_aimOffsetBuffer + 0xc) + 1) % (int)spreadOffsetX.y; - fVar9 = (float)((int)fVar9 + -1); + iVar3 = (*(int *)(this->_aimOffsetBuffer + 0xc) + 1) % GHIDRA_INT(spreadOffsetX.y); + fVar9 = (float)(GHIDRA_INT(fVar9) + -1); *(int *)(this->_aimOffsetBuffer + 0xc) = iVar3; *(float *)(this->_aimOffsetBuffer + 8) = fVar9; } else { iVar3 = *(int *)(this->_aimOffsetBuffer + 0xc); } - iVar7 = (iVar3 + (int)fVar9) % (int)spreadOffsetX.y; + iVar7 = (iVar3 + GHIDRA_INT(fVar9)) % GHIDRA_INT(spreadOffsetX.y); iVar3 = *(int *)this->_aimOffsetBuffer; *(float *)(iVar3 + iVar7 * 8) = local_24; *(float *)(iVar3 + 4 + iVar7 * 8) = local_28; game = g_game; *(int *)(this->_aimOffsetBuffer + 8) = *(int *)(this->_aimOffsetBuffer + 8) + 1; - if ((int)(game->_playerManager)._playerList._end - (int)(game->_playerManager)._playerList._begin + if (GHIDRA_INT((game->_playerManager)._playerList._end) - GHIDRA_INT((game->_playerManager)._playerList._begin) >> 2 == 1) { fVar9 = 4.5; } @@ -865,36 +865,36 @@ void Camera::update_focus_position(byte isSkipFocusBuffer) playerManager = &g_game->_playerManager; local_24 = 0.0; local_44.y = 0.0; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> 2 + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { game = g_game; do { pvVar5 = (playerManager->_playerList)._end; - if ((int)pvVar5 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar5) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar5 = (playerManager->_playerList)._end; game = g_game; } playerSlot = (playerManager->_playerList)._begin; - if ((uint)local_44.y < (uint)((int)pvVar5 - (int)playerSlot >> 2)) { - playerSlot = playerSlot + (int)local_44.y; + if (GHIDRA_UINT(local_44.y) < GHIDRA_UINT((GHIDRA_INT(pvVar5) - GHIDRA_INT(playerSlot) >> 2))) { + playerSlot = playerSlot + GHIDRA_INT(local_44.y); } iVar3 = *playerSlot; if (*(int *)(iVar3 + 0x2c) == 1) { - local_24 = (float)((int)local_24 + 1); + local_24 = (float)(GHIDRA_INT(local_24) + 1); local_28 = (*(float *)(iVar3 + 0x340) - (float)local_48) * 0.25 + local_28; spreadOffsetX.y = - spreadOffsetX.y + (*(float *)(iVar3 + 0x33c) - (float)local_54._8_4_) * 0.25; + spreadOffsetX.y + (*(float *)(iVar3 + 0x33c) - (*(undefined4 *)((char *)&((float)local_54) + 0x8))) * 0.25; } playerManager = &game->_playerManager; - local_44.y = (float)((int)local_44.y + 1); - } while ((uint)local_44.y < - (uint)((int)(game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + local_44.y = (float)(GHIDRA_INT(local_44.y) + 1); + } while (GHIDRA_UINT(local_44.y) < + GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); this = local_34; - if (0 < (int)local_24) { - local_28 = (1.0 / (float)(int)local_24) * local_28; - spreadOffsetX.y = (1.0 / (float)(int)local_24) * spreadOffsetX.y; + if (0 < GHIDRA_INT(local_24)) { + local_28 = (1.0 / (float)GHIDRA_INT(local_24)) * local_28; + spreadOffsetX.y = (1.0 / (float)GHIDRA_INT(local_24)) * spreadOffsetX.y; } } local_24 = *(float *)(this->_playerSpreadBuffer + 4); @@ -905,7 +905,7 @@ void Camera::update_focus_position(byte isSkipFocusBuffer) local_24 = *(float *)(this->_playerSpreadBuffer + 4); iVar3 = *(int *)(this->_playerSpreadBuffer + 8); } - iVar7 = (*(int *)(this->_playerSpreadBuffer + 0xc) + 1) % (int)local_24; + iVar7 = (*(int *)(this->_playerSpreadBuffer + 0xc) + 1) % GHIDRA_INT(local_24); iVar3 = iVar3 + -1; *(int *)(this->_playerSpreadBuffer + 0xc) = iVar7; *(int *)(this->_playerSpreadBuffer + 8) = iVar3; @@ -913,7 +913,7 @@ void Camera::update_focus_position(byte isSkipFocusBuffer) else { iVar7 = *(int *)(this->_playerSpreadBuffer + 0xc); } - iVar7 = (iVar7 + iVar3) % (int)local_24; + iVar7 = (iVar7 + iVar3) % GHIDRA_INT(local_24); iVar3 = *(int *)this->_playerSpreadBuffer; *(float *)(iVar3 + 4 + iVar7 * 8) = local_28; *(float *)(iVar3 + iVar7 * 8) = spreadOffsetX.y; @@ -925,20 +925,20 @@ void Camera::update_focus_position(byte isSkipFocusBuffer) local_44.y = -g_vectorOne.y; fVar9 = *(float *)(this->_focusPositionBuffer + 8); if (fVar9 == spreadOffsetX.y) { - if ((int)fVar9 < 1) { + if (GHIDRA_INT(fVar9) < 1) { KAGE_LogMessage(0x10,(byte *)"Cannot erase from empty buffer"); spreadOffsetX.y = *(float *)(this->_focusPositionBuffer + 4); fVar9 = *(float *)(this->_focusPositionBuffer + 8); } - iVar3 = (*(int *)(this->_focusPositionBuffer + 0xc) + 1) % (int)spreadOffsetX.y; - fVar9 = (float)((int)fVar9 + -1); + iVar3 = (*(int *)(this->_focusPositionBuffer + 0xc) + 1) % GHIDRA_INT(spreadOffsetX.y); + fVar9 = (float)(GHIDRA_INT(fVar9) + -1); *(int *)(this->_focusPositionBuffer + 0xc) = iVar3; *(float *)(this->_focusPositionBuffer + 8) = fVar9; } else { iVar3 = *(int *)(this->_focusPositionBuffer + 0xc); } - iVar7 = (iVar3 + (int)fVar9) % (int)spreadOffsetX.y; + iVar7 = (iVar3 + GHIDRA_INT(fVar9)) % GHIDRA_INT(spreadOffsetX.y); iVar3 = *(int *)this->_focusPositionBuffer; *(Entity **)(iVar3 + iVar7 * 8) = local_48; *(float *)(iVar3 + 4 + iVar7 * 8) = local_44.y; @@ -962,19 +962,19 @@ void Camera::update_focus_position(byte isSkipFocusBuffer) fVar9 = *(float *)(this->_focusPositionBuffer + 4); local_48 = (Entity *) (spreadOffsetX.x + - enemyOffsetX.x + local_44.x + playersCenter.x + (float)local_54._8_4_); + enemyOffsetX.x + local_44.x + playersCenter.x + (*(undefined4 *)((char *)&((float)local_54) + 0x8))); enemyOffsetX.y = spreadOffsetX.y + enemyOffsetX.y + local_44.y + fVar10; local_44.y = fVar9; spreadOffsetX.y = (float)operator_new_tracked - (-(uint)((int)((ulonglong)(uint)fVar9 * 8 >> 0x20) != 0) | - (uint)((ulonglong)(uint)fVar9 * 8)); + (-GHIDRA_UINT((GHIDRA_INT(((ulonglong)GHIDRA_UINT(fVar9) * 8 >> 0x20)) != 0)) | + GHIDRA_UINT(((ulonglong)GHIDRA_UINT(fVar9) * 8))); puVar6 = (undefined4 *)spreadOffsetX.y; if ((undefined4 *)spreadOffsetX.y == (undefined4 *)0x0) { spreadOffsetX.y = 0.0; } else { - for (; fVar9 != 0.0; fVar9 = (float)((int)fVar9 - 1)) { + for (; fVar9 != 0.0; fVar9 = (float)(GHIDRA_INT(fVar9) - 1)) { puVar6[1] = 0; *puVar6 = 0; puVar6 = puVar6 + 2; @@ -990,15 +990,15 @@ void Camera::update_focus_position(byte isSkipFocusBuffer) memcpy((void *)spreadOffsetX.y,*(void **)this->_focusPositionBuffer,focusCopyCapacity * 8); iVar3 = 0; local_14 = 3; - if (0 < (int)local_44.y) { + if (0 < GHIDRA_INT(local_44.y)) { do { - pfVar1 = (float *)((int)spreadOffsetX.y + (((int)local_28 + iVar3) % (int)local_24) * 2 * 4); + pfVar1 = (float *)(GHIDRA_INT(spreadOffsetX.y) + ((GHIDRA_INT(local_28) + iVar3) % GHIDRA_INT(local_24)) * 2 * 4); if ((*pfVar1 == -g_vectorOne.x) && (pfVar1[1] == -g_vectorOne.y)) { *pfVar1 = (float)local_48; pfVar1[1] = enemyOffsetX.y; } iVar3 = iVar3 + 1; - } while (iVar3 < (int)local_44.y); + } while (iVar3 < GHIDRA_INT(local_44.y)); this = local_34; } vector_ring_buffer_weighted_average((Vector *)(local_54 + 8),&focusCopy,0.5); @@ -1006,22 +1006,22 @@ void Camera::update_focus_position(byte isSkipFocusBuffer) allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if ((undefined4 *)spreadOffsetX.y != (undefined4 *)0x0) { uVar8 = *(uint *)((char *)spreadOffsetX.y + -4); qVar2 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar8; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar8; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar2 < uVar8); - free((uint *)((int)spreadOffsetX.y + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < uVar8)); + free((uint *)(GHIDRA_INT(spreadOffsetX.y) + -4)); } local_14 = 0xffffffff; fVar9 = g_screenHeight - 182.0; fVar10 = g_screenHeight * (this->_screenAnchor).y; (this->_position).x = g_screenWidth * (this->_screenAnchor).x - - ((g_screenWidth - 338.0) * 0.5 + ((float)local_54._8_4_ - 60.0) * 0.65); + ((g_screenWidth - 338.0) * 0.5 + ((*(undefined4 *)((char *)&((float)local_54) + 0x8)) - 60.0) * 0.65); (this->_position).y = fVar10 - (fVar9 * 0.5 + ((float)local_48 - 140.0) * 0.65); pVVar4 = soft_clamp_position(this,(Vector *)(local_54 + 8),(this->_position).x,(this->_position).y ); @@ -1032,20 +1032,20 @@ void Camera::update_focus_position(byte isSkipFocusBuffer) spreadOffsetX.y = *(float *)(this->_shakeOffsetBuffer + 4); puVar6 = *(undefined4 **)(this->_shakeOffsetBuffer + 8); if (puVar6 == (undefined4 *)spreadOffsetX.y) { - if ((int)puVar6 < 1) { + if (GHIDRA_INT(puVar6) < 1) { KAGE_LogMessage(0x10,(byte *)"Cannot erase from empty buffer"); spreadOffsetX.y = *(float *)(this->_shakeOffsetBuffer + 4); puVar6 = *(undefined4 **)(this->_shakeOffsetBuffer + 8); } - iVar3 = (*(int *)(this->_shakeOffsetBuffer + 0xc) + 1) % (int)spreadOffsetX.y; - puVar6 = (undefined4 *)((int)puVar6 + -1); + iVar3 = (*(int *)(this->_shakeOffsetBuffer + 0xc) + 1) % GHIDRA_INT(spreadOffsetX.y); + puVar6 = (undefined4 *)(GHIDRA_INT(puVar6) + -1); *(int *)(this->_shakeOffsetBuffer + 0xc) = iVar3; *(undefined4 **)(this->_shakeOffsetBuffer + 8) = puVar6; } else { iVar3 = *(int *)(this->_shakeOffsetBuffer + 0xc); } - iVar7 = (iVar3 + (int)puVar6) % (int)spreadOffsetX.y; + iVar7 = (iVar3 + GHIDRA_INT(puVar6)) % GHIDRA_INT(spreadOffsetX.y); iVar3 = *(int *)shakeBuffer; *(float *)(iVar3 + iVar7 * 8) = g_vectorZero.x; *(float *)(iVar3 + 4 + iVar7 * 8) = g_vectorZero.y; @@ -1054,7 +1054,7 @@ void Camera::update_focus_position(byte isSkipFocusBuffer) else { if (g_game->_frameCount % 3 == 0) { uVar8 = Random(); - fVar9 = (float)((double)(int)uVar8 + __uint_to_double_fixup[-((int)uVar8 >> 0x1f)]) * + fVar9 = (float)((double)GHIDRA_INT(uVar8) + __uint_to_double_fixup[-(GHIDRA_INT(uVar8) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_48 = (Entity *)(fVar9 + fVar9); local_44.x = cos((float)local_48); @@ -1070,14 +1070,14 @@ void Camera::update_focus_position(byte isSkipFocusBuffer) enemyOffsetX.y = *(float *)(*(int *)shakeBuffer + iVar3 * 8); local_34 = *(Camera **)(*(int *)shakeBuffer + iVar3 * 8 + 4); uVar8 = Random(); - fVar9 = (float)((double)(int)uVar8 + __uint_to_double_fixup[-((int)uVar8 >> 0x1f)]) * + fVar9 = (float)((double)GHIDRA_INT(uVar8) + __uint_to_double_fixup[-(GHIDRA_INT(uVar8) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_48 = (Entity *)(fVar9 + fVar9); local_44.y = cos((float)local_48); fVar9 = sin((float)local_48); pVVar4 = (Vector *)(local_54 + 8); local_48 = (Entity *)((fVar9 + fVar9) - (float)local_34); - local_54._8_4_ = (local_44.y + local_44.y) - enemyOffsetX.y; + (*(undefined4 *)((char *)&(local_54) + 0x8)) = (local_44.y + local_44.y) - enemyOffsetX.y; } ring_buffer_push(shakeBuffer,pVVar4); pfVar1 = (float *)(*(int *)shakeBuffer + @@ -1097,18 +1097,18 @@ void Camera::update_focus_position(byte isSkipFocusBuffer) vector_ring_buffer_weighted_average((Vector *)(local_54 + 8),shakeBuffer,0.9); game = g_game; iVar3 = 0x744; - (g_game->_screenShakeOffset).x = (float)local_54._8_4_; + (g_game->_screenShakeOffset).x = (*(undefined4 *)((char *)&((float)local_54) + 0x8)); (game->_screenShakeOffset).y = (float)local_48; uVar8 = 0; do { local_48 = (Entity *)(uVar8 + 1); if (local_48 < 9) { pvVar5 = this->_room; - if (*(int *)(iVar3 + -0x20 + (int)pvVar5) != 0) { + if (*(int *)(iVar3 + -0x20 + GHIDRA_INT(pvVar5)) != 0) { if (uVar8 < 8) { - local_44.y = (float)(*(int *)(iVar3 + (int)pvVar5) / *(int *)((char *)pvVar5 + 0xc)) * 40.0 + + local_44.y = (float)(*(int *)(iVar3 + GHIDRA_INT(pvVar5)) / *(int *)((char *)pvVar5 + 0xc)) * 40.0 + 120.0; - local_44.x = (float)(*(int *)(iVar3 + (int)pvVar5) % *(int *)((char *)pvVar5 + 0xc)) * 40.0 + + local_44.x = (float)(*(int *)(iVar3 + GHIDRA_INT(pvVar5)) % *(int *)((char *)pvVar5 + 0xc)) * 40.0 + 40.0; } else { @@ -1120,11 +1120,11 @@ void Camera::update_focus_position(byte isSkipFocusBuffer) if (fVar9 < 30.0) { auVar11 = ZEXT812(0x3f800000); fVar9 = (fVar9 - 30.0) / -20.0; - if (fVar9 <= auVar11._0_4_) { - auVar11._4_8_ = auVar11._4_8_; - auVar11._0_4_ = fVar9; + if (fVar9 <= (*(undefined4 *)((char *)&(auVar11) + 0x0))) { + (*(undefined8 *)((char *)&(auVar11) + 0x4)) = (*(undefined8 *)((char *)&(auVar11) + 0x4)); + (*(undefined4 *)((char *)&(auVar11) + 0x0)) = fVar9; } - local_48 = auVar11._0_4_; + local_48 = (*(undefined4 *)((char *)&(auVar11) + 0x0)); position.y = local_44.y; position.x = local_44.x; ClampedToRoom(this,&local_44,position); @@ -1135,9 +1135,9 @@ void Camera::update_focus_position(byte isSkipFocusBuffer) } } } - uVar8 = (uint)local_48; + uVar8 = GHIDRA_UINT(local_48); iVar3 = iVar3 + 4; - if (7 < (int)uVar8) { + if (7 < GHIDRA_INT(uVar8)) { LAB_00944696: pvVar5 = this->_room; *(float *)((char *)pvVar5 + 0x1204) = (this->_position).x; @@ -1207,8 +1207,8 @@ void Camera::update_follow() else { if (g_game->_frameCount % 3 == 0) { rngResult = Random(); - shakeAngle = (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * 3.14; + shakeAngle = (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14; shakeAngle = shakeAngle + shakeAngle; local_1c.x = cos(shakeAngle); local_1c.x = local_1c.x * 10.0; @@ -1223,8 +1223,8 @@ void Camera::update_follow() local_14.y = *(float *)(*(int *)shakeBuffer + iVar2 * 8); local_1c.y = *(float *)(*(int *)shakeBuffer + iVar2 * 8 + 4); rngResult = Random(); - shakeAngle = (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * 3.14; + shakeAngle = (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14; shakeAngle = shakeAngle + shakeAngle; shakeCos = cos(shakeAngle); fVar7 = sin(shakeAngle); @@ -1322,16 +1322,16 @@ byte Camera::IsPosVisible(Vector *Pos) fVar3 = (*(float *)((char *)pvVar1 + 0x18) - 80.0) + 207.6923; maxCameraX = (*(float *)((char *)pvVar1 + 0x1c) + 80.0) - 369.23077; maxCameraY = (*(float *)((char *)pvVar1 + 0x20) + 80.0) - 207.6923; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar1 = (playerManager->_playerList)._end; - if ((int)pvVar1 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar1) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar1 = (playerManager->_playerList)._end; } playerSlot = (playerManager->_playerList)._begin; - if (playerIdx < (uint)((int)pvVar1 - (int)playerSlot >> 2)) { + if (playerIdx < GHIDRA_UINT((GHIDRA_INT(pvVar1) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + playerIdx; } fVar4 = *(float *)(*playerSlot + 0x33c); @@ -1376,8 +1376,8 @@ byte Camera::IsPosVisible(Vector *Pos) playerIdx = playerIdx + 1; playerManager = &g_game->_playerManager; } while (playerIdx < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } return 0; @@ -1596,37 +1596,37 @@ void Camera::Update(byte isSnap) if (this->_aimOffsetBuffer[8] != 0) { local_1c = *(float **)(this->_velocityOffsetBuffer + 8); - iVar2 = *(int *)(this->_velocityOffsetBuffer + 0xc) - (int)local_1c; + iVar2 = *(int *)(this->_velocityOffsetBuffer + 0xc) - GHIDRA_INT(local_1c); local_24 = 0; iVar1 = iVar2 >> 0x1f; if (iVar2 / 0x4c + iVar1 != iVar1) { local_2c = 0.0; do { pfVar3 = local_1c; - layerMode = *(char *)((char *)local_1c + 0x39 + (int)local_2c); + layerMode = *(char *)((char *)local_1c + 0x39 + GHIDRA_INT(local_2c)); if (layerMode == '\0') { particleIndex = 0; - if (0 < *(int *)((char *)local_1c + 0x18 + (int)local_2c)) { + if (0 < *(int *)((char *)local_1c + 0x18 + GHIDRA_INT(local_2c))) { local_28 = 0; do { - iVar1 = *(int *)((char *)local_1c + 0xc + (int)local_2c); - iVar2 = *(int *)(*(int *)((char *)local_1c + 4 + (int)local_2c) + 0x10); + iVar1 = *(int *)((char *)local_1c + 0xc + GHIDRA_INT(local_2c)); + iVar2 = *(int *)(*(int *)((char *)local_1c + 4 + GHIDRA_INT(local_2c)) + 0x10); fVar4 = fmodf(*(float *)(local_28 + iVar1) - *(float *)(local_28 + 8 + iVar1), (float)((double)iVar2 + __uint_to_double_fixup[-(iVar2 >> 0x1f)])); *(float *)(local_28 + iVar1) = fVar4; - iVar1 = *(int *)((char *)local_1c + 0xc + (int)local_2c); - iVar2 = *(int *)(*(int *)((char *)local_1c + 4 + (int)local_2c) + 0x14); + iVar1 = *(int *)((char *)local_1c + 0xc + GHIDRA_INT(local_2c)); + iVar2 = *(int *)(*(int *)((char *)local_1c + 4 + GHIDRA_INT(local_2c)) + 0x14); fVar4 = fmodf(*(float *)(local_28 + 0xc + iVar1) + *(float *)(local_28 + 4 + iVar1), (float)((double)iVar2 + __uint_to_double_fixup[-(iVar2 >> 0x1f)])); particleIndex = particleIndex + 1; *(float *)(local_28 + 4 + iVar1) = fVar4; local_28 = local_28 + 0x14; - } while (particleIndex < *(int *)((char *)local_1c + 0x18 + (int)local_2c)); + } while (particleIndex < *(int *)((char *)local_1c + 0x18 + GHIDRA_INT(local_2c))); } } else if ((layerMode == '\x01') && - (local_28 = 0, 0 < *(int *)((char *)local_1c + 0x18 + (int)local_2c))) { - local_1c = (float *)(*(int *)((char *)local_1c + 0xc + (int)local_2c) + 8); + (local_28 = 0, 0 < *(int *)((char *)local_1c + 0x18 + GHIDRA_INT(local_2c)))) { + local_1c = (float *)(*(int *)((char *)local_1c + 0xc + GHIDRA_INT(local_2c)) + 8); do { fVar5 = g_displayPixelRatio * g_screenPointScale; dVar6 = floor((double)(((g_screenWidth - 338.0) * 0.5 + @@ -1637,18 +1637,18 @@ void Camera::Update(byte isSnap) (*(float *)(this->_aimOffsetBuffer + 4) - 140.0) * 0.65) * fVar5 + 0.5)); local_28 = local_28 + 1; - fVar4 = *(float *)((char *)pfVar3 + 0x3c + (int)local_2c); - local_1c[-2] = scratchVec.x * *(float *)((char *)pfVar3 + 0x3c + (int)local_2c) + *local_1c + fVar4 = *(float *)((char *)pfVar3 + 0x3c + GHIDRA_INT(local_2c)); + local_1c[-2] = scratchVec.x * *(float *)((char *)pfVar3 + 0x3c + GHIDRA_INT(local_2c)) + *local_1c ; local_1c[-1] = ((float)dVar6 / fVar5) * fVar4 + local_1c[1]; local_1c = local_1c + 5; - } while (local_28 < *(int *)((char *)pfVar3 + 0x18 + (int)local_2c)); + } while (local_28 < *(int *)((char *)pfVar3 + 0x18 + GHIDRA_INT(local_2c))); } local_1c = *(float **)(this->_velocityOffsetBuffer + 8); - local_2c = (float)((int)local_2c + 0x4c); + local_2c = (float)(GHIDRA_INT(local_2c) + 0x4c); local_24 = local_24 + 1; } while (local_24 < - (uint)((*(int *)(this->_velocityOffsetBuffer + 0xc) - (int)local_1c) / 0x4c)); + GHIDRA_UINT(((*(int *)(this->_velocityOffsetBuffer + 0xc) - GHIDRA_INT(local_1c)) / 0x4c))); } if (0 < *(int *)(this->_playerSpreadBuffer + 4)) { local_1c = (float *)0x0; @@ -1666,10 +1666,10 @@ void Camera::Update(byte isSnap) iVar2 = *(int *)(*(int *)(this->_playerSpreadBuffer + 0xc) + 0x14); fVar4 = fmodf(*(float *)(iVar1 + 0xc + local_24) + *(float *)(iVar1 + 4 + local_24), (float)((double)iVar2 + __uint_to_double_fixup[-(iVar2 >> 0x1f)])); - local_1c = (float *)((int)local_1c + 1); + local_1c = (float *)(GHIDRA_INT(local_1c) + 1); *(float *)(iVar1 + 4 + local_24) = fVar4; local_24 = local_24 + 0x14; - } while ((int)local_1c < *(int *)this->_focusPositionBuffer); + } while (GHIDRA_INT(local_1c) < *(int *)this->_focusPositionBuffer); } } game = g_game; @@ -1739,7 +1739,7 @@ void Camera::Update(byte isSnap) pfVar3[-2] = fVar4 * local_2c * local_2c; FXLayers::update_vein_branch(); pfVar3 = pfVar3 + 0xd; - local_1c = (float *)((int)local_1c + -1); + local_1c = (float *)(GHIDRA_INT(local_1c) + -1); } while (local_1c != (float *)0x0); fxSprite = this[6]._focusPositionBuffer + 9; if (local_2c <= 0.25) { @@ -1753,7 +1753,7 @@ void Camera::Update(byte isSnap) ((AnimationState *)((AnimationState *)(fxSprite + -0xb9)))->AnimationState::Update(); } fxSprite = fxSprite + 0x114; - local_1c = (float *)((int)local_1c + -1); + local_1c = (float *)(GHIDRA_INT(local_1c) + -1); } while (local_1c != (float *)0x0); } if (((*(float *)this->_aimOffsetBuffer != g_vectorZero.x) || diff --git a/src/game/card.cpp b/src/game/card.cpp index 165ea97..696ab64 100644 --- a/src/game/card.cpp +++ b/src/game/card.cpp @@ -44,13 +44,13 @@ uint Card::IsAvailable() } } achievementID = (Entity_Player *)in_ECX[1]; - if (-1 < (int)achievementID) { - isUnlocked = ((PersistentGameData *)(&g_manager->_persistentGameData))->PersistentGameData::Unlocked((int)achievementID); + if (-1 < GHIDRA_INT(achievementID)) { + isUnlocked = ((PersistentGameData *)(&g_manager->_persistentGameData))->PersistentGameData::Unlocked(GHIDRA_INT(achievementID)); achievementID = (Entity_Player *)CONCAT31(extraout_var,isUnlocked); if (isUnlocked == 0) { LAB_00730af6: - return (uint)achievementID & 0xffffff00; + return GHIDRA_UINT(achievementID) & 0xffffff00; } } - return CONCAT31((int3)((uint)achievementID >> 8),1); + return CONCAT31((int3)(GHIDRA_UINT(achievementID) >> 8),1); } diff --git a/src/game/cell_space.cpp b/src/game/cell_space.cpp index 4752234..2826d21 100644 --- a/src/game/cell_space.cpp +++ b/src/game/cell_space.cpp @@ -42,14 +42,14 @@ void CellSpace::insert(Entity *entity) ); } fVar4 = *(float *)((char *)this + 0x14); - cellY = (int)(fVar3 / fVar4); - maxCellY = (int)(fVar5 / fVar4); + cellY = GHIDRA_INT((fVar3 / fVar4)); + maxCellY = GHIDRA_INT((fVar5 / fVar4)); if (((maxCellY < cellY) || (cellY + 1 <= cellY)) || (maxCellY + 1 <= maxCellY)) { KAGE_LogMessage(0x10,(byte *)"CellSpace::insert: y1 > y2\n"); fVar4 = *(float *)((char *)this + 0x14); } - minCellX = (int)(cosAngle / fVar4); - maxCellX = (int)(fVar6 / fVar4); + minCellX = GHIDRA_INT((cosAngle / fVar4)); + maxCellX = GHIDRA_INT((fVar6 / fVar4)); if (((maxCellX < minCellX) || (minCellX + 1 <= minCellX)) || (maxCellX + 1 <= maxCellX)) { KAGE_LogMessage(0x10,(byte *)"CellSpace::insert: x1 > x2\n"); } @@ -102,11 +102,11 @@ void CellSpace::collide_entity(Entity *entity) pairStride = *(int *)(iVar1 + 0xd4); posY = (entity->_pos).y; bottom = radiusY + posY; - row = (int)((posY - radiusY) / cellSize); - if (row <= (int)(bottom / cellSize)) { + row = GHIDRA_INT(((posY - radiusY) / cellSize)); + if (row <= GHIDRA_INT((bottom / cellSize))) { do { - column = (int)((posX - radiusX) / cellSize); - if (column <= (int)(right / cellSize)) { + column = GHIDRA_INT(((posX - radiusX) / cellSize)); + if (column <= GHIDRA_INT((right / cellSize))) { do { iVar3 = column + *(int *)((char *)this + 0xc) * row; if ((-1 < iVar3) && @@ -126,7 +126,7 @@ void CellSpace::collide_entity(Entity *entity) iVar2 = ownIndex; } pairIndex = highIndex * pairStride + iVar2; - if ((this_00 != entity) && ((int)pairIndex < *(int *)(iVar1 + 0xd0))) { + if ((this_00 != entity) && (GHIDRA_INT(pairIndex) < *(int *)(iVar1 + 0xd0))) { pairWord = pairIndex >> 5; if ((*(uint *)(*(int *)(iVar1 + 0xc4) + pairWord * 4) & 1 << (sbyte)(pairIndex & 0x1f)) == 0) { @@ -151,10 +151,10 @@ void CellSpace::collide_entity(Entity *entity) } cellSize = *(float *)((char *)this + 0x14); column = column + 1; - } while (column <= (int)(right / cellSize)); + } while (column <= GHIDRA_INT((right / cellSize))); } row = row + 1; - } while (row <= (int)(bottom / cellSize)); + } while (row <= GHIDRA_INT((bottom / cellSize))); } } return; @@ -216,7 +216,7 @@ void CellSpace::collide(void *entityB) pairStride = iVar1; } pairIndex = maxIndex * pairStride + pairStride; - if ((entityA != entityB) && ((int)pairIndex < *(int *)(owner + 0xd0))) { + if ((entityA != entityB) && (GHIDRA_INT(pairIndex) < *(int *)(owner + 0xd0))) { pairBits = *(uint *)(*(int *)(owner + 0xc4) + (pairIndex >> 5) * 4); if ((pairBits & 1 << (sbyte)(pairIndex & 0x1f)) == 0) { *(uint *)(*(int *)(owner + 0xc4) + (pairIndex >> 5) * 4) = @@ -243,7 +243,7 @@ void CellSpace::collide(void *entityB) cellIndex = cellIndex + 1; cellOffset = cellOffset + 0xa4; pairStride = *(int *)((char *)entityA + 0x18); - } while (cellIndex < (uint)((*(int *)((char *)entityA + 0x1c) - pairStride) / 0xa4)); + } while (cellIndex < GHIDRA_UINT(((*(int *)((char *)entityA + 0x1c) - pairStride) / 0xa4))); } return; } @@ -299,7 +299,7 @@ void CellSpace::collide_self() owner = iVar4; } uVar3 = highIndex * pairStride + owner; - if ((first != other) && ((int)uVar3 < *(int *)(owner + 0xd0))) { + if ((first != other) && (GHIDRA_INT(uVar3) < *(int *)(owner + 0xd0))) { pairWord = *(uint *)(*(int *)(owner + 0xc4) + (uVar3 >> 5) * 4); if ((pairWord & 1 << (sbyte)(uVar3 & 0x1f)) == 0) { *(uint *)(*(int *)(owner + 0xc4) + (uVar3 >> 5) * 4) = @@ -328,7 +328,7 @@ void CellSpace::collide_self() cellOffset = cellOffset + 0xa4; iVar4 = *(int *)((char *)first + 0x18); cellIndex = cellIndex + 1; - } while (cellIndex < (uint)((*(int *)((char *)first + 0x1c) - iVar4) / 0xa4)); + } while (cellIndex < GHIDRA_UINT(((*(int *)((char *)first + 0x1c) - iVar4) / 0xa4))); } return; } diff --git a/src/game/challenge_param.cpp b/src/game/challenge_param.cpp index 1facb59..a7a7df9 100644 --- a/src/game/challenge_param.cpp +++ b/src/game/challenge_param.cpp @@ -9,7 +9,7 @@ void ChallengeParam::Reset() FID_conflict__Erase_tree_>_> (&this->_roomset, (fuzzer_allocator_> *)&this->_roomset, - *(_Tree_node **)((int)pvVar1 + 4)); + *(_Tree_node **)(GHIDRA_INT(pvVar1) + 4)); *(void **)((char *)pvVar1 + 4) = pvVar1; *(void **)pvVar1 = pvVar1; *(void **)((char *)pvVar1 + 8) = pvVar1; diff --git a/src/game/challenge_params.cpp b/src/game/challenge_params.cpp index a3003aa..44e296d 100644 --- a/src/game/challenge_params.cpp +++ b/src/game/challenge_params.cpp @@ -234,7 +234,7 @@ void * ChallengeParams::copy_constructor(ChallengeParam *other) ExceptionList = &local_10; this->std::string::string(other); local_8 = 0; - roomset = (undefined4 *)((int)this + 0x18); + roomset = (undefined4 *)(GHIDRA_INT(this) + 0x18); *roomset = 0; *(undefined4 *)((char *)this + 0x1c) = 0; pvVar1 = operator_new(0x14); @@ -243,30 +243,30 @@ void * ChallengeParams::copy_constructor(ChallengeParam *other) *(void **)((char *)pvVar1 + 8) = pvVar1; *(undefined2 *)((char *)pvVar1 + 0xc) = 0x101; *roomset = pvVar1; - local_8._0_1_ = 1; - std_set_uint_copy(roomset,&other->_roomset,(int)other); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; + std_set_uint_copy(roomset,&other->_roomset,GHIDRA_INT(other)); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; std::vector::copy_constructor(&other->_collectibleList); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; *(undefined4 *)((char *)this + 0x2c) = 0; *(undefined4 *)((char *)this + 0x30) = 0; *(undefined4 *)((char *)this + 0x34) = 0; pvVar1 = (other->_trinketList)._begin; pvVar3 = (other->_trinketList)._end; if (pvVar1 != pvVar3) { - srcBytes = (int)pvVar3 - (int)pvVar1; - uVar2 = (int)srcBytes >> 2; + srcBytes = GHIDRA_INT(pvVar3) - GHIDRA_INT(pvVar1); + uVar2 = GHIDRA_INT(srcBytes) >> 2; if (0x3fffffff < uVar2) goto LAB_0095c2fe; uVar2 = uVar2 * 4; pvVar3 = std::_Allocate(uVar2); *(void **)((char *)this + 0x2c) = pvVar3; *(void **)((char *)this + 0x30) = pvVar3; - *(void **)((char *)this + 0x34) = (void *)((int)pvVar3 + uVar2); + *(void **)((char *)this + 0x34) = (void *)(GHIDRA_INT(pvVar3) + uVar2); pvVar3 = *(void **)((char *)this + 0x2c); memmove(pvVar3,pvVar1,srcBytes); - *(void **)((char *)this + 0x30) = (void *)(uVar2 + (int)pvVar3); + *(void **)((char *)this + 0x30) = (void *)(uVar2 + GHIDRA_INT(pvVar3)); } - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; *(int *)((char *)this + 0x38) = other->_startingPill; *(int *)((char *)this + 0x3c) = other->_startingCard; *(int *)((char *)this + 0x40) = other->_endStage; @@ -277,19 +277,19 @@ void * ChallengeParams::copy_constructor(ChallengeParam *other) pvVar1 = (other->_achievementList)._begin; pvVar3 = (other->_achievementList)._end; if (pvVar1 != pvVar3) { - srcBytes = (int)pvVar3 - (int)pvVar1; - uVar2 = (int)srcBytes >> 2; + srcBytes = GHIDRA_INT(pvVar3) - GHIDRA_INT(pvVar1); + uVar2 = GHIDRA_INT(srcBytes) >> 2; if (0x3fffffff < uVar2) goto LAB_0095c2fe; uVar2 = uVar2 * 4; pvVar3 = std::_Allocate(uVar2); *(void **)((char *)this + 0x48) = pvVar3; *(void **)((char *)this + 0x4c) = pvVar3; - *(void **)((char *)this + 0x50) = (void *)((int)pvVar3 + uVar2); + *(void **)((char *)this + 0x50) = (void *)(GHIDRA_INT(pvVar3) + uVar2); pvVar3 = *(void **)((char *)this + 0x48); memmove(pvVar3,pvVar1,srcBytes); - *(void **)((char *)this + 0x4c) = (void *)(uVar2 + (int)pvVar3); + *(void **)((char *)this + 0x4c) = (void *)(uVar2 + GHIDRA_INT(pvVar3)); } - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; *(int *)((char *)this + 0x54) = other->_soulHearts; *(int *)((char *)this + 0x58) = other->_blackHearts; *(int *)((char *)this + 0x5c) = other->_hearts; @@ -308,15 +308,15 @@ void * ChallengeParams::copy_constructor(ChallengeParam *other) *(int *)((char *)this + 0x84) = other->_getCurse; *(int *)((char *)this + 0x88) = other->_curseFilter; std::vector::copy_constructor(&other->_collectibleTwinList); - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; *(undefined4 *)((char *)this + 0x98) = 0; *(undefined4 *)((char *)this + 0x9c) = 0; *(undefined4 *)((char *)this + 0xa0) = 0; pvVar1 = (other->_seedEffects)._begin; pvVar3 = (other->_seedEffects)._end; if (pvVar1 != pvVar3) { - srcBytes = (int)pvVar3 - (int)pvVar1; - uVar2 = (int)srcBytes >> 2; + srcBytes = GHIDRA_INT(pvVar3) - GHIDRA_INT(pvVar1); + uVar2 = GHIDRA_INT(srcBytes) >> 2; if (0x3fffffff < uVar2) { LAB_0095c2fe: /* WARNING: Subroutine does not return */ @@ -326,10 +326,10 @@ LAB_0095c2fe: pvVar3 = std::_Allocate(uVar2); *(void **)((char *)this + 0x98) = pvVar3; *(void **)((char *)this + 0x9c) = pvVar3; - *(void **)((char *)this + 0xa0) = (void *)((int)pvVar3 + uVar2); + *(void **)((char *)this + 0xa0) = (void *)(GHIDRA_INT(pvVar3) + uVar2); pvVar3 = *(void **)((char *)this + 0x98); memmove(pvVar3,pvVar1,srcBytes); - *(void **)((char *)this + 0x9c) = (void *)((int)pvVar3 + uVar2); + *(void **)((char *)this + 0x9c) = (void *)(GHIDRA_INT(pvVar3) + uVar2); } ExceptionList = local_10; return this; diff --git a/src/game/checksum.cpp b/src/game/checksum.cpp index 1742d89..4d67f8b 100644 --- a/src/game/checksum.cpp +++ b/src/game/checksum.cpp @@ -11,7 +11,7 @@ void Checksum::Update(byte *data, uint size) uVar2 = 0; if (size != 0) { do { - *(byte *)((uint)*(byte *)((char *)this + 4) + (int)this) = data[uVar2]; + *(byte *)(GHIDRA_UINT(*(byte *)((char *)this + 4)) + GHIDRA_INT(this)) = data[uVar2]; *(char *)((char *)this + 4) = *(char *)((char *)this + 4) + '\x01'; if ((3 < *(byte *)((char *)this + 4)) && (*(int *)((char *)this + 0xc) == 0)) { *(undefined1 *)((char *)this + 4) = 0; @@ -28,16 +28,16 @@ void Checksum::Update(byte *data, uint size) if (DAT_00c7e864 == 0) { uVar2 = 0; do { - uVar1 = -(uint)((uVar2 & 1) != 0) & 0xedb88320 ^ uVar2 >> 1; - uVar1 = -(uint)((uVar1 & 1) != 0) & 0xedb88320 ^ (int)uVar1 >> 1; - uVar1 = -(uint)((uVar1 & 1) != 0) & 0xedb88320 ^ (int)uVar1 >> 1; - uVar1 = -(uint)((uVar1 & 1) != 0) & 0xedb88320 ^ (int)uVar1 >> 1; - uVar1 = -(uint)((uVar1 & 1) != 0) & 0xedb88320 ^ (int)uVar1 >> 1; - uVar1 = -(uint)((uVar1 & 1) != 0) & 0xedb88320 ^ (int)uVar1 >> 1; - uVar1 = -(uint)((uVar1 & 1) != 0) & 0xedb88320 ^ (int)uVar1 >> 1; - (&DAT_00c7e860)[uVar2] = -(uint)((uVar1 & 1) != 0) & 0xedb88320 ^ (int)uVar1 >> 1; + uVar1 = -GHIDRA_UINT(((uVar2 & 1) != 0)) & 0xedb88320 ^ uVar2 >> 1; + uVar1 = -GHIDRA_UINT(((uVar1 & 1) != 0)) & 0xedb88320 ^ GHIDRA_INT(uVar1) >> 1; + uVar1 = -GHIDRA_UINT(((uVar1 & 1) != 0)) & 0xedb88320 ^ GHIDRA_INT(uVar1) >> 1; + uVar1 = -GHIDRA_UINT(((uVar1 & 1) != 0)) & 0xedb88320 ^ GHIDRA_INT(uVar1) >> 1; + uVar1 = -GHIDRA_UINT(((uVar1 & 1) != 0)) & 0xedb88320 ^ GHIDRA_INT(uVar1) >> 1; + uVar1 = -GHIDRA_UINT(((uVar1 & 1) != 0)) & 0xedb88320 ^ GHIDRA_INT(uVar1) >> 1; + uVar1 = -GHIDRA_UINT(((uVar1 & 1) != 0)) & 0xedb88320 ^ GHIDRA_INT(uVar1) >> 1; + (&DAT_00c7e860)[uVar2] = -GHIDRA_UINT(((uVar1 & 1) != 0)) & 0xedb88320 ^ GHIDRA_INT(uVar1) >> 1; uVar2 = uVar2 + 1; - } while ((int)uVar2 < 0x100); + } while (GHIDRA_INT(uVar2) < 0x100); } uVar1 = 0; uVar2 = ~*(uint *)((char *)this + 8); @@ -46,7 +46,7 @@ void Checksum::Update(byte *data, uint size) do { bytePtr = data + uVar1; uVar1 = uVar1 + 1; - uVar2 = uVar2 >> 8 ^ (&DAT_00c7e860)[(uint)*bytePtr ^ uVar2 & 0xff]; + uVar2 = uVar2 >> 8 ^ (&DAT_00c7e860)[GHIDRA_UINT(*bytePtr) ^ uVar2 & 0xff]; *(uint *)((char *)this + 8) = uVar2; } while (uVar1 < size); } diff --git a/src/game/classes.hpp b/src/game/classes.hpp index 2e82926..a363316 100644 --- a/src/game/classes.hpp +++ b/src/game/classes.hpp @@ -31,6 +31,12 @@ template inline T ABS(T v) { return v < 0 ? -v : v; } template inline T SQRT(T v) { return __builtin_sqrt(v); } inline code *swi(int) { return 0; } // int3 / int 0x29: a breakpoint or fast-fail inline void halt_baddata() {} +typedef __INTPTR_TYPE__ intptr_t; typedef __UINTPTR_TYPE__ uintptr_t; +// (int)x / (uint)x as decompiled: a number stays 32-bit, a pointer keeps its full width (pointer math on 64-bit) +template inline auto GHIDRA_INT(T v) { if constexpr (__is_pointer(T) || __is_class(T)) return (intptr_t)v; else return (int)v; } +template inline auto GHIDRA_UINT(T v) { if constexpr (__is_pointer(T) || __is_class(T)) return (uintptr_t)(intptr_t)v; else return (uint)v; } +// A smart pointer the decompiled code handles as a raw pointer: built from 0 or a pointer, converts back, compares +#define GHIDRA_POINTER_LIKE(Self) void *_ptr; Self(intptr_t value = 0) : _ptr((void *)value) {} Self(const void *value) : _ptr((void *)value) {} template operator T *() const { return (T *)_ptr; } explicit operator intptr_t() const { return (intptr_t)_ptr; } friend bool operator==(Self a, Self b) { return a._ptr == b._ptr; } friend bool operator!=(Self a, Self b) { return a._ptr != b._ptr; } extern void *ExceptionList; // FS:[0], the SEH chain head extern double __uint_to_double_fixup[2]; // MSVC CRT: +2^32 for a uint whose top bit was set #define CARRY1(a, b) GHIDRA_CARRY(1, a, b) @@ -705,10 +711,8 @@ typedef uint64_t __uint64; typedef void * _onexit_t; typedef int errno_t; typedef longlong fpos_t; -typedef int intptr_t; typedef int ptrdiff_t; typedef size_t rsize_t; -typedef uint uintptr_t; typedef char * va_list; typedef ushort wint_t; @@ -862,9 +866,9 @@ struct ANM2 { int _animCount; LayerState* _layerState; unsigned int _layerCount; - std_string* _nullLayerNames; + uint8_t _nullLayerNames[0x4]; // std_string unsigned int _numNullLayers; - std_string* _eventNames; + uint8_t _eventNames[0x4]; // std_string unsigned int _numEvents; Vector _offset; Vector _scale; @@ -915,9 +919,9 @@ struct EntityPtr { void SetReference(Entity *entity); // 00872050 EntityPtr * clear(); // 00a0fe80 - uint8_t _pad_0x0[0x4]; + GHIDRA_POINTER_LIKE(EntityPtr) }; -LAYOUT32(sizeof(EntityPtr) == 0x4); + struct RNG { static void Shuffle(RNG *rng, int *begin, int *end); // 005cc070 @@ -937,6 +941,16 @@ LAYOUT32(offsetof(RNG, _shift1) == 0x4); LAYOUT32(offsetof(RNG, _shift2) == 0x8); LAYOUT32(offsetof(RNG, _shift3) == 0xc); +struct std_vector { + void * _begin; + void * _end; + void * _capacity; +}; +LAYOUT32(offsetof(std_vector, _begin) == 0x0); +LAYOUT32(offsetof(std_vector, _end) == 0x4); +LAYOUT32(offsetof(std_vector, _capacity) == 0x8); +LAYOUT32(sizeof(std_vector) == 0xc); + struct EntityRef { void constructor(Entity *entity); // 00431310 EntityRef(); // 00435c70 @@ -962,6 +976,14 @@ LAYOUT32(offsetof(EntityRef, _velocity) == 0x18); LAYOUT32(offsetof(EntityRef, _flags) == 0x20); LAYOUT32(offsetof(EntityRef, _entity) == 0x24); +struct std_multiset { + void * _head; + uint _size; +}; +LAYOUT32(offsetof(std_multiset, _head) == 0x0); +LAYOUT32(offsetof(std_multiset, _size) == 0x4); +LAYOUT32(sizeof(std_multiset) == 0x8); + struct Entity { virtual ~Entity(); // 006a8820 slot 0 virtual void Init(int type, int variant, int subType, uint initSeed); // 006a93a0 slot 1 @@ -1146,7 +1168,7 @@ struct Entity { void KillWithSource(); // 008c5cf2 uint8_t _pad_0x4[0x4]; - uint8_t _damageEvents[0xc]; // vector_DamageEvent + std_vector _damageEvents; float _pendingDamage; uint64_t _pendingDamageFlags; unsigned int _index; @@ -1174,7 +1196,7 @@ struct Entity { bool _isInterpolating; bool _isInitFlag176; bool _removedByFactory; - uint8_t _collisionPoints[0xc]; // vector_Vector + std_vector _collisionPoints; int _entityGridCollisionClass; int _entityCollisionClass; bool _collidesWithEntity; @@ -1184,7 +1206,7 @@ struct Entity { Vector _gridCollisionVelocity; Vector _gridCollisionNormal; Vector _renderPosition; - uint8_t _colorParams[0xc]; // vector_ColorParams + std_vector _colorParams; ColorMod _color; uint8_t _pad_0x1dc[0x8]; ColorMod _splatColor; @@ -1216,7 +1238,7 @@ struct Entity { int _iceCountdown; int _brimstoneMarkCountdown; Vector _knockbackDirection; - EntityPtr _iceFrozenEffect; + uint8_t _iceFrozenEffect[0x4]; // EntityPtr Vector _pausePosition; int _pauseTimer; float _poisonTickDamage; @@ -1251,13 +1273,13 @@ struct Entity { uint8_t _pad_0x3b1[0x3]; float _shrinkStatus1; float _shrinkStatus2; - EntityPtr _parent; - EntityPtr _child; - EntityPtr _target; - EntityPtr _spawnerEntity; - uint8_t _entityPtrReferrers[0x8]; // std_multiset_uint - EntityPtr _minecart; - EntityPtr _hitEffect; + uint8_t _parent[0x4]; // EntityPtr + uint8_t _child[0x4]; // EntityPtr + uint8_t _target[0x4]; // EntityPtr + uint8_t _spawnerEntity[0x4]; // EntityPtr + std_multiset _entityPtrReferrers; + uint8_t _minecart[0x4]; // EntityPtr + uint8_t _hitEffect[0x4]; // EntityPtr RNG _dropRNG; uint32_t _initSeed; int _holdCountdown; @@ -1578,10 +1600,10 @@ struct Entity_Familiar : Entity { uint8_t _formationMode; uint8_t _pad_0xda5[0x3]; int _counter; - uint8_t _hitList[0xc]; // std_vector_uint + std_vector _hitList; int _appearTimer; int _chargeLevel; - EntityPtr _linkedEntity; + uint8_t _linkedEntity[0x4]; // EntityPtr Weapon* _weapon; bool _isLilDelirium; uint8_t _pad_0xdc9[0x3]; @@ -1589,7 +1611,7 @@ struct Entity_Familiar : Entity { void* _extraData; uint8_t _pad_0xee4[0x4]; ItemConfig_Item* _item; - EntityPtr _sirenHelper; + uint8_t _sirenHelper[0x4]; // EntityPtr int _sirenCharmFrames; ColorMod _dirtColor; uint8_t _pad_0xf18[0x8]; @@ -1651,6 +1673,20 @@ struct AbyssLocustData : Entity_Familiar::ExtraData { }; LAYOUT32(sizeof(AbyssLocustData) == 0x58); +struct std_deque { + void * _proxy; + void * _map; + uint _mapSize; + uint _offset; + uint _size; +}; +LAYOUT32(offsetof(std_deque, _proxy) == 0x0); +LAYOUT32(offsetof(std_deque, _map) == 0x4); +LAYOUT32(offsetof(std_deque, _mapSize) == 0x8); +LAYOUT32(offsetof(std_deque, _offset) == 0xc); +LAYOUT32(offsetof(std_deque, _size) == 0x10); +LAYOUT32(sizeof(std_deque) == 0x14); + struct AchievementOverlay_Entry { int _id; std_string _name; @@ -1666,7 +1702,7 @@ struct AchievementOverlay { byte load_xml(byte *path); // 00931670 void Update(); // 00931ba0 - uint8_t _queue[0x14]; // std_deque_int + std_deque _queue; int _currentEntry; int _frame; int _state; @@ -1715,7 +1751,7 @@ struct Ambush { void Update(); // 00834350 uint8_t _pad_0x0[0xc]; - uint8_t _bossRushWaves[0xc]; // std_vector_std_vector_BossRushEntry + std_vector _bossRushWaves; int _maxWaves; uint8_t _pad_0x1c[0x4]; bool _isActive; @@ -1781,10 +1817,8 @@ LAYOUT32(sizeof(AnimationFrame) == 0x6c); struct AnimationLayer { void RenderFrame(); // 008e3db0 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(AnimationLayer) == 0x4); + struct AnmCache { ~AnmCache(); // 0040d240 @@ -1820,10 +1854,8 @@ struct Backdrop { static void render_floor_surface(float *param_1, ColorMod param_2); // 0093f000 void RenderWalls(Vector *renderOffset, ColorMod color); // 0093f1d0 void RenderWater(Vector *renderOffset); // 00940d30 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(Backdrop) == 0x4); + struct BackdropConfig { void constructor(); // 00931de0 @@ -1850,6 +1882,14 @@ LAYOUT32(offsetof(BackdropConfig, unk1) == 0x74); LAYOUT32(offsetof(BackdropConfig, waterPitsMode) == 0x138); LAYOUT32(sizeof(BackdropConfig) == 0x13c); +struct std_set { + void * _head; + uint _size; +}; +LAYOUT32(offsetof(std_set, _head) == 0x0); +LAYOUT32(offsetof(std_set, _size) == 0x4); +LAYOUT32(sizeof(std_set) == 0x8); + struct RoomDescriptor { byte Clear(); // 00436010 uint PressurePlatesTriggered(); // 00456560 @@ -1886,10 +1926,11 @@ struct RoomDescriptor { int32_t SpawnSeed; int32_t AwardSeed; uint32_t BossDeathSeed; - uint8_t SavedGridEntities[0xc]; // vector_GridEntityDesc - uint8_t SavedEntities[0xc]; // vector_EntitySaveState - uint8_t RestrictedGridIndexes[0x8]; // std_set_int - uint8_t SavedEffects[0x24]; // vector_EntitySaveState + std_vector SavedGridEntities; + std_vector SavedEntities; + std_set RestrictedGridIndexes; + std_vector SavedEffects; + uint8_t _pad_0x94[0x18]; int16_t ShopItemIdx; int16_t ShopItemDiscountIdx; int32_t DeliriumDistance; @@ -2001,20 +2042,32 @@ struct BossOverlay { }; +struct std_vector_bool { + void * _begin; + void * _end; + void * _capacity; + uint _size; +}; +LAYOUT32(offsetof(std_vector_bool, _begin) == 0x0); +LAYOUT32(offsetof(std_vector_bool, _end) == 0x4); +LAYOUT32(offsetof(std_vector_bool, _capacity) == 0x8); +LAYOUT32(offsetof(std_vector_bool, _size) == 0xc); +LAYOUT32(sizeof(std_vector_bool) == 0x10); + struct BossPool { void init(uint seed); // 004218e0 static void load_xml(byte *param_1, int param_2); // 00421bf0 int GetBossId(int leveltype, int levelvariant, RNG *rng); // 00422830 uint8_t _pad_0x0[0x8ac]; - uint8_t _removedBosses[0x4]; // vector_bool + uint8_t _removedBosses[0x4]; // std_vector_bool }; LAYOUT32(offsetof(BossPool, _removedBosses) == 0x8ac); struct BufferedStream { - uint8_t _pad_0x0[0x1]; + }; -LAYOUT32(sizeof(BufferedStream) == 0x1); + struct CLIENT_ID { void * UniqueProcess; @@ -2075,10 +2128,8 @@ struct Capsule { void constructor2(Vector *Position, Vector *TargetPosition, float size); // 009452e0 void get_bounding_box(Vector *outMin, Vector *outMax); // 00945400 static byte Collide(Capsule *a, Capsule *b, Vector *outHit); // 00945470 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(Capsule) == 0x4); + struct Card { byte IsCard(); // 005b1530 @@ -2099,14 +2150,14 @@ struct ChallengeParam { void Reset(); // 00424440 std_string _name; - uint8_t _roomset[0x8]; // std_set_int - uint8_t _collectibleList[0xc]; // std_vector_int - uint8_t _trinketList[0xc]; // std_vector_int + std_set _roomset; + std_vector _collectibleList; + std_vector _trinketList; int _startingPill; int _startingCard; int _endStage; int _playerType; - uint8_t _achievementList[0xc]; // std_vector_int + std_vector _achievementList; int _soulHearts; int _blackHearts; int _hearts; @@ -2126,8 +2177,8 @@ struct ChallengeParam { int _pathType; unsigned int _getCurse; unsigned int _curseFilter; - uint8_t _collectibleTwinList[0xc]; // std_vector_int - uint8_t _seedEffects[0x4]; // std_vector_int + std_vector _collectibleTwinList; + uint8_t _seedEffects[0x4]; // std_vector }; LAYOUT32(offsetof(ChallengeParam, _name) == 0x0); LAYOUT32(offsetof(ChallengeParam, _roomset) == 0x18); @@ -2250,10 +2301,8 @@ struct CommandThread { struct CompletionWidget { void Render(Vector *pos, Vector *scale); // 004252f0 void Load(); // 008ca2c0 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(CompletionWidget) == 0x4); + struct Config { static int GetPillEffects(); // 0041e460 @@ -2283,15 +2332,13 @@ struct Console { void Print(std_string *text, uint color, uint fadeTime); // 006929e0 void PrintError(std_string *err); // 00692ed0 static void print_format(Console *param_1, undefined4 param_2); // 00693090 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(Console) == 0x4); + struct ConstLobby { - uint8_t _pad_0x0[0x1]; + }; -LAYOUT32(sizeof(ConstLobby) == 0x1); + struct ConsumableData { int coins; @@ -2430,10 +2477,8 @@ struct CutsceneEntry { CutsceneEntry * Constructor(); // 00960750 void Destructor(); // 009607b0 void Unload(); // 00960840 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(CutsceneEntry) == 0x4); + struct CutscenePart { void load_subtitles(); // 0095ed70 @@ -2611,10 +2656,8 @@ LAYOUT32(sizeof(DeathmatchTypeVenom) == 0x2c); struct DebugRenderer { void Render(); // 0042dbb0 void * Get(int Index, byte Unk); // 0042eb10 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(DebugRenderer) == 0x4); + struct DestinationQuad { Vector _topLeft; @@ -2634,6 +2677,14 @@ struct EmoteWheel { }; +struct std_map { + void * _head; + uint _size; +}; +LAYOUT32(offsetof(std_map, _head) == 0x0); +LAYOUT32(offsetof(std_map, _size) == 0x4); +LAYOUT32(sizeof(std_map) == 0x8); + struct EntityConfig { static uint parse_entity_tags(); // 00694680 EntityConfig_Entity * GetEntity(int id, int variant, int subtype); // 00694fb0 @@ -2644,11 +2695,11 @@ struct EntityConfig { void PreloadResources(EntityConfig_Entity *entity); // 0069ba90 void LoadBabies(byte *xmlpath); // 0069bd50 - uint8_t _entities[0x8]; // std_map_uint_EntityConfigEntityEntry - uint8_t _players[0xc]; // vector_EntityConfig_Player - uint8_t _babies[0xc]; // vector_EntityConfig_Baby - uint8_t _bosses[0xc]; // vector_EntityConfig_Boss - uint8_t _edenHair[0x4]; // vector_string + std_map _entities; + std_vector _players; + std_vector _babies; + std_vector _bosses; + uint8_t _edenHair[0x4]; // std_vector }; LAYOUT32(offsetof(EntityConfig, _entities) == 0x0); LAYOUT32(offsetof(EntityConfig, _players) == 0x8); @@ -2687,11 +2738,11 @@ struct EntityConfig_Entity { unsigned int gibsAmount; unsigned int gibFlags; int portrait; - uint8_t _bossColors[0xc]; // std_vector_BossColor + std_vector _bossColors; std_string anm2Path; uint8_t _pad_0x8c[0xc]; - uint8_t preloadSounds[0xc]; // std_vector_int - uint8_t devolve[0xc]; // vector_Devolve + std_vector preloadSounds; + std_vector devolve; bool isPreloaded; uint8_t _pad_0xb1[0x3]; std_string gridCollisionClassString; @@ -2786,7 +2837,7 @@ struct EntityConfig_Player { int _pill; bool _canShoot; uint8_t _pad_0xd1[0x3]; - uint8_t _collectibles[0xc]; // std_vector_int + std_vector _collectibles; int _trinket; int _skinColor; int _achievement; @@ -2927,10 +2978,8 @@ struct EntitySaveState { void constructor(); // 004d3080 void copy(void *other); // 004d3130 static void set_extra_data(undefined4 param_1); // 00827f70 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(EntitySaveState) == 0x4); + struct EntitySaveStateRef { void Set(void *state); // 006eee10 @@ -2971,7 +3020,7 @@ struct Entity_Bomb : Entity { bool _isFetus; uint8_t _pad_0x449[0x3]; float _radiusMultiplier; - EntityPtr _stickyTarget; + uint8_t _stickyTarget[0x4]; // EntityPtr int _bombIndex; int _updateDelay; int _scatterTimer; @@ -2980,7 +3029,8 @@ struct Entity_Bomb : Entity { bool _hasCostumes; bool _loadCostumes; ANM2 _bombCostumesSprites[5]; - uint8_t _hitList[0x10]; // std_vector_uint + std_vector _hitList; + uint8_t _pad_0x9d4[0x4]; }; LAYOUT32(offsetof(Entity_Bomb, _explosionCountdown1) == 0x410); LAYOUT32(offsetof(Entity_Bomb, _explosionDamage) == 0x418); @@ -3067,7 +3117,8 @@ struct Entity_Effect : Entity { float _rotation; float _scale; uint8_t _pad_0x47c[0x2c]; - uint8_t _hitList[0x18]; // std_vector_uint + std_vector _hitList; + uint8_t _pad_0x4b4[0xc]; }; LAYOUT32(offsetof(Entity_Effect, _height) == 0x410); LAYOUT32(offsetof(Entity_Effect, _fallingSpeed) == 0x414); @@ -3115,10 +3166,11 @@ struct HomingLaser { byte truncate_samples(float maxLength); // 009a1520 uint8_t _pad_0x0[0x1c]; - uint8_t _samples[0xc]; // vector_Vector - uint8_t _nonOptimizedSamples[0x1c]; // vector_Vector + std_vector _samples; + std_vector _nonOptimizedSamples; + uint8_t _pad_0x34[0x10]; float _totalLength; - uint8_t _bezier[0x4]; // vector_HomingLaserBezier + uint8_t _bezier[0x4]; // std_vector }; LAYOUT32(offsetof(HomingLaser, _samples) == 0x1c); LAYOUT32(offsetof(HomingLaser, _nonOptimizedSamples) == 0x28); @@ -3188,7 +3240,7 @@ struct Entity_Knife : Entity { float _height; float _fallingSpeed; float _basePosOffsetY; - uint8_t _hitList[0xc]; // std_vector_uint + std_vector _hitList; bool _isDeadEyeHit; bool _prismApplied; bool _multidimensionalApplied; @@ -3314,13 +3366,12 @@ struct Entity_Laser : Entity { bool _disableFollowParent; uint8_t _pad_0x4e5[0x3]; Entity* _bounceLaser; - EntityPtr _childLaser; - uint8_t _pad_0x4f0[0x4]; + uint8_t _childLaser[0x8]; // EntityPtr float _blackHpDropChance; - EntityPtr _multidimensionalLasers[2]; + uint8_t _multidimensionalLasers[0x8]; // EntityPtr[2] bool _multidimensionalTouched; uint8_t _pad_0x501[0x3]; - EntityPtr _prismLasers[4]; + uint8_t _prismLasers[0x10]; // EntityPtr[4] bool _prismTouched; bool _oneHit; bool _isGridHit; @@ -3328,11 +3379,11 @@ struct Entity_Laser : Entity { bool _disableInitSound; uint8_t _pad_0x519[0x3]; float _damageMultiplier; - uint8_t _hitList[0xc]; // std_vector_uint - EntityPtr _parentLaser; - EntityPtr _subLasers[2]; - EntityPtr _continuumLaser; - EntityPtr _tearWaitEffect; + std_vector _hitList; + uint8_t _parentLaser[0x4]; // EntityPtr + uint8_t _subLasers[0x8]; // EntityPtr[2] + uint8_t _continuumLaser[0x4]; // EntityPtr + uint8_t _tearWaitEffect[0x4]; // EntityPtr int _waitFrames; float _impactDistance; Vector _impactPosition; @@ -3499,7 +3550,7 @@ struct Entity_NPC : Entity { Entity* _collisionEntity; int _collisionResult; int _decoyTargetTimer; - uint8_t _killDamageEvents[0xc]; // vector_DamageEvent + std_vector _killDamageEvents; float _killDamage; uint64_t _killDamageFlags; int _projectileCooldown; @@ -3522,10 +3573,10 @@ struct Entity_NPC : Entity { uint32_t _deliriumCycleID; uint32_t _deliriumCycleIDHigh; Entity* _deliriumEntity; - EntityPtr _entityRef; - uint8_t _entityDeque[0x14]; // deque_EntityPtr - uint8_t _vectorDeque1[0x14]; // deque_Vector - uint8_t _vectorDeque2[0x14]; // deque_Vector + uint8_t _entityRef[0x4]; // EntityPtr + std_deque _entityDeque; + std_deque _vectorDeque1; + std_deque _vectorDeque2; Vector _confusionTargetPos; float _aiFloat; float _scale; @@ -3554,15 +3605,15 @@ struct Entity_NPC : Entity { uint8_t _pad_0xcd0[0x8]; ANM2 _statusEffectSprite; ANM2 _chargeBarSprite; - uint8_t _hitList[0xc]; // std_vector_uint - uint8_t _secondaryHitList[0xc]; // std_vector_uint + std_vector _hitList; + std_vector _secondaryHitList; uint32_t _aiCallFlags; int32_t _controllerID; Vector _controllerMovement; void* _aimTargetEffect; uint8_t _pad_0xf2c[0x4]; Vector _forwardVector; - EntityPtr _forcedTarget; + uint8_t _forcedTarget[0x4]; // EntityPtr int _forcedTargetTimer; Entity_Player* _sirenPlayerEntity; float _hitPointsMulti; @@ -3718,7 +3769,7 @@ struct Entity_Pickup : Entity { uint8_t _pad_0x57c[0x8]; uint32_t _state; int _coopDuplicateIndex; - EntityPtr _unkEntityRef; + uint8_t _unkEntityRef[0x4]; // EntityPtr Entity_Effect* _pickupGhost; Entity_Pickup* _megaChestCollectible[2]; int _varData; @@ -3765,7 +3816,7 @@ struct History { void merge(void *other); // 00721c80 void remove_index_refs(int index); // 007220a0 - uint8_t _historyItems[0xc]; // vector_HistoryItem + std_vector _historyItems; bool _isLocked; uint8_t _pad_0xd[0x3]; Entity_Player* _player; @@ -3784,10 +3835,8 @@ struct GameStatePlayer { static void write_block_538(short *block, void *stream); // 009d0440 byte read(void *reader); // 009d05d0 static undefined4 read_part3(); // 009d2656 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(GameStatePlayer) == 0x4); + struct QueueItemData { static byte Touched(); // 007538f0 @@ -3835,7 +3884,7 @@ struct TemporaryEffects { int GetNullEffectNum(int nulleffectid); // 00930ae0 unsigned int _cacheFlags; - uint8_t _effects[0xc]; // vector_TemporaryEffect + std_vector _effects; bool _shouldEvaluateCache; bool _disabled; uint8_t _pad_0x12[0x2]; @@ -3849,14 +3898,12 @@ LAYOUT32(offsetof(TemporaryEffects, _player) == 0x14); struct UserProfile { void find_or_create(); // 00a23ae0 - - uint8_t _pad_0x0[0x1]; }; -LAYOUT32(sizeof(UserProfile) == 0x1); + struct PlayerProceduralItems { Entity_Player* _player; - uint8_t _itemIds[0x4]; // std_set_int + uint8_t _itemIds[0x4]; // std_set }; LAYOUT32(offsetof(PlayerProceduralItems, _player) == 0x0); LAYOUT32(offsetof(PlayerProceduralItems, _itemIds) == 0x4); @@ -4290,7 +4337,7 @@ struct Entity_Player : Entity { ANM2 _bloodGushSprite; ANM2 _heldSprite; ANM2 _statusEffectSprite; - uint8_t _costumeSpriteDescs[0xc]; // vector_CostumeSpriteDesc + std_vector _costumeSpriteDescs; PlayerCostumeMap _playerCostumeMap[15]; uint8_t _pad_0x12ef[0x31]; std_string _headAnim; @@ -4347,8 +4394,7 @@ struct Entity_Player : Entity { uint8_t _pad_0x1420[0x10]; int _tractorBeam; uint8_t _pad_0x1434[0x10]; - EntityPtr _breathOfLifeEffect; - uint8_t _pad_0x1448[0x10]; + uint8_t _breathOfLifeEffect[0x14]; // EntityPtr Entity_Laser* _megaBlastLaser; int _rUaWizardTimer; float _maxfiredelay; @@ -4433,17 +4479,18 @@ struct Entity_Player : Entity { int _totalDamageTaken; uint8_t _pad_0x16b8[0x8]; uint32_t _trinketsID[2]; - uint8_t _collectibleCounts[0xc]; // std_vector_int - uint8_t _pillEffectUses[0x68]; // std_vector_int - uint8_t _levelEffectItems[0xc]; // std_vector_int - uint8_t _smeltedTrinkets[0xc]; // vector_SmeltedTrinketDesc - uint8_t _voidedCollectibles[0xc]; // std_vector_int - uint8_t _voidedPassives[0xc]; // vector_VoidedPassive + std_vector _collectibleCounts; + std_vector _pillEffectUses; + uint8_t _pad_0x16e0[0x5c]; + std_vector _levelEffectItems; + std_vector _smeltedTrinkets; + std_vector _voidedCollectibles; + std_vector _voidedPassives; int _extensionCordIndex; - uint8_t _collectibleRNGs[0xc]; // vector_RNG - uint8_t _trinketRNGs[0xc]; // vector_RNG - uint8_t _pillRNGs[0xc]; // vector_RNG - uint8_t _cardRNGs[0xc]; // vector_RNG + std_vector _collectibleRNGs; + std_vector _trinketRNGs; + std_vector _pillRNGs; + std_vector _cardRNGs; int _pocketSlots[8]; uint32_t _actionHoldDrop; QueueItemData _queuedItem; @@ -4513,7 +4560,7 @@ struct Entity_Player : Entity { int _delayedSfxDelay; int _delayedSfxFrameDelay; uint8_t _pad_0x1b34[0x248]; - uint8_t _movingBoxContents[0xc]; // vector_EntitySaveState + std_vector _movingBoxContents; int _boneHearts; int _boneHeartsMask; int _hallowedGroundCountdown; @@ -4529,20 +4576,19 @@ struct Entity_Player : Entity { uint32_t _urnSouls; int _numGigaBombs; uint8_t _pad_0x1dd8[0x4]; - uint8_t _pendingWisps[0x10]; // std_vector_int + std_vector _pendingWisps; + uint8_t _pad_0x1de8[0x4]; History _history; int _inventory[16]; - uint8_t _contactHitList[0xc]; // std_vector_int - UserProfile _userProfile; - uint8_t _pad_0x1e4d[0x7]; - uint8_t _afterImageFrames[0x14]; // deque_afterImageFrames - EntityPtr _twinPlayer; + std_vector _contactHitList; + uint8_t _userProfile[0x8]; // UserProfile + std_deque _afterImageFrames; + uint8_t _twinPlayer[0x4]; // EntityPtr Entity_Player* _backupPlayer; float _heightVelocity; int _redStewBonusDuration; uint8_t _pad_0x1e78[0x8]; - EntityPtr _salvationEffect; - uint8_t _pad_0x1e84[0x8]; + uint8_t _salvationEffect[0xc]; // EntityPtr int _marsUnk1; int _marsCooldown; int _marsUnk2; @@ -4552,7 +4598,7 @@ struct Entity_Player : Entity { int _marsTapFrames; uint8_t _pad_0x1ea4[0x4]; int _poisonDamageFrames; - EntityPtr _astralProjectionBody; + uint8_t _astralProjectionBody[0x4]; // EntityPtr float _rockBottomMoveSpeed; float _rockBottomMaxFireDelay; float _rockBottomDamage; @@ -4578,7 +4624,7 @@ struct Entity_Player : Entity { int _forgottenBodyRoomIdx; Vector _forgottenBodyPos; uint8_t _pad_0x1f14[0x4]; - uint8_t _echoChamberItems[0x14]; // deque_EchoChamberItem + std_deque _echoChamberItems; int _suplexState; int _suplexAimCountdown; Vector _suplexTargetPos; @@ -4590,33 +4636,34 @@ struct Entity_Player : Entity { uint8_t _pad_0x1f5e[0x1a]; int _bagOfCraftingHoldFrames; int _eveSumptoriumCharge; - uint8_t _itemWispsList[0x8]; // std_map_int_int + std_map _itemWispsList; float _forgottenBHeight; float _forgottenBHeightVelocity; uint8_t _pad_0x1f90[0x14]; - uint8_t _itemCards[0xc]; // std_vector_uint - uint8_t _roomTemporaryCollectibles[0x8]; // std_map_int_int + std_vector _itemCards; + std_map _roomTemporaryCollectibles; int _modelingClayEffect; int _keepersSackBonus; - EntityPtr _darkEsau; + uint8_t _darkEsau[0x4]; // EntityPtr bool _isLevelStartPending; uint8_t _pad_0x1fc5[0x3]; PlayerProceduralItems _proceduralItems; uint8_t _pad_0x1fd0[0x4]; - uint8_t _extraCollectibleCounts[0xc]; // std_vector_uint8 - uint8_t _extraTrinketCounts[0x24]; // std_vector_uint8 + std_vector _extraCollectibleCounts; + std_vector _extraTrinketCounts; + uint8_t _pad_0x1fec[0x18]; bool _darkArtsBlastPending; uint8_t _pad_0x2005[0x3]; float _darkArtsDamage; Entity* _darkArtsLastSnare; - uint8_t _darkArtsHitList[0xc]; // std_vector_int + std_vector _darkArtsHitList; uint8_t _shadowImage[8]; int _grantedCollectibleCountdown; uint32_t _grantedCollectibleFlags; bool _hasCurseMistEffect; uint8_t _pad_0x202d[0x3]; ConsumableData _consumablesBackup; - uint8_t _curseMistFamiliars[0xc]; // vector_FamiliarData + std_vector _curseMistFamiliars; int _curseMistRedHearts; int _curseMistPocketSlots[8]; uint32_t _curseMistTrinkets[2]; @@ -4634,11 +4681,10 @@ struct Entity_Player : Entity { uint32_t _ghostTrinkets[2]; PlayerHUD* _playerHUD; uint8_t _pad_0x20d8[0x4]; - uint8_t _greedResetCollectibles[0xc]; // std_vector_int + std_vector _greedResetCollectibles; bool _hasUnlistedRestoreState; uint8_t _pad_0x20e9[0x3]; - GameStatePlayer _unlistedRestoreState; - uint8_t _pad_0x20f0[0x5d8]; + uint8_t _unlistedRestoreState[0x5dc]; // GameStatePlayer Entity_Player* _replacedPlayer; uint8_t _pad_0x26cc[0x834]; }; @@ -5072,7 +5118,7 @@ struct Entity_Tear : Entity { uint8_t _pad_0x434[0x4]; int _waitFrames; Vector _continueVelocity; - uint8_t _hitList[0xc]; // std_vector_uint + std_vector _hitList; int _tearIdx; float _baseDamage; float _rotation; @@ -5090,13 +5136,12 @@ struct Entity_Tear : Entity { Entity* _stickTarget; Vector _stickDiff; int _stickTimer; - EntityPtr _techZeroLaser; - EntityPtr _techZeroTarget; - EntityPtr _laserShotLaser; - EntityPtr _linkPrev; - EntityPtr _linkNext; - EntityPtr _attachedEffect; - uint8_t _pad_0x4a0[0xc]; + uint8_t _techZeroLaser[0x4]; // EntityPtr + uint8_t _techZeroTarget[0x4]; // EntityPtr + uint8_t _laserShotLaser[0x4]; // EntityPtr + uint8_t _linkPrev[0x4]; // EntityPtr + uint8_t _linkNext[0x4]; // EntityPtr + uint8_t _attachedEffect[0x10]; // EntityPtr ANM2 _tearHaloANM2; ANM2 _tearEffectANM2; ANM2 _deadEyeANM2; @@ -5252,14 +5297,14 @@ LAYOUT32(offsetof(FamiliarData, _dropRNGSeed) == 0x2c); LAYOUT32(sizeof(FamiliarData) == 0x30); struct File { - uint8_t _pad_0x0[0x1]; + }; -LAYOUT32(sizeof(File) == 0x1); + struct FileSymbolInfo { - uint8_t _pad_0x0[0x1]; + }; -LAYOUT32(sizeof(FileSymbolInfo) == 0x1); + struct FileSystem { static void * GetMountPrefixes(void *outPrefixes); // 00a16060 @@ -5332,10 +5377,10 @@ struct Font { uint8_t _pad_0x23[0x1]; uint32_t _numChars; FontCharBlock* _chars; - uint8_t _kerningPairs[0xc]; // vector_KerningPair + std_vector _kerningPairs; uint32_t _numPages; TexturePtr* _pageTextures; - uint8_t _charsBlock[0x8]; // std_map_CharBlocks + std_map _charsBlock; int _missingCharacter; }; LAYOUT32(offsetof(Font, _isLoaded) == 0x0); @@ -5371,10 +5416,8 @@ LAYOUT32(offsetof(Font, _missingCharacter) == 0x48); struct FontSettings { void constructor(); // 00a1a540 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(FontSettings) == 0x4); + struct FormattedText { FormattedText(undefined1 *param_1); // 00a55b70 @@ -5398,7 +5441,7 @@ struct FriendEntry { struct ItemPool_Item { float _totalWeight; - uint8_t _poolList[0xc]; // std_vector_PoolItem + std_vector _poolList; RNG _rng1; RNG _rng2; uint32_t _bibleUpgrade; @@ -5454,9 +5497,10 @@ struct ItemPool { RNG _trinketPoolRNG; float _unkFloat674; float _unkFloat678; - uint8_t _removedCollectibles[0x10]; // vector_bool - uint8_t _roomBlacklistedCollectibles[0x108]; // vector_bool - uint8_t _trinketPoolItems[0xc]; // vector_TrinketPoolItem + std_vector_bool _removedCollectibles; + std_vector_bool _roomBlacklistedCollectibles; + uint8_t _pad_0x69c[0xf8]; + std_vector _trinketPoolItems; int _numAvailableTrinkets; }; LAYOUT32(offsetof(ItemPool, _seed) == 0x0); @@ -5526,14 +5570,15 @@ struct PlayerManager { void revive_player_ghosts(); // 009bfae0 static void ReviveCoopPlayer(uint param_1); // 009bfb20 - uint8_t _playerList[0xc]; // vector_EntityPlayerPtr + std_vector _playerList; CoopJoinSlot _coopSlots[4]; uint8_t _pad_0x50[0x20]; - uint8_t _coopPlayerTypes[0x48]; // std_vector_int + std_vector _coopPlayerTypes; + uint8_t _pad_0x7c[0x3c]; RNG _rng; Entity_Player* _stageTransitionPlayer; Entity_Player* _roomTransitionPlayer; - uint8_t _extraPlayers[0x4]; // std_vector_EntityPlayerPtr + uint8_t _extraPlayers[0x4]; // std_vector }; LAYOUT32(offsetof(PlayerManager, _playerList) == 0x0); LAYOUT32(offsetof(PlayerManager, _coopSlots) == 0xc); @@ -5554,7 +5599,7 @@ struct ItemOverlay { ANM2 _sprite; uint8_t _pad_0x11c[0x1080]; int _delay; - EntityPtr _player; + uint8_t _player[0x4]; // EntityPtr uint8_t _megaMushPlayerSprite[0x4]; // ANM2 }; LAYOUT32(offsetof(ItemOverlay, _state) == 0x0); @@ -5573,19 +5618,15 @@ struct HUD_Message { void set_text_line(short *text, int lineIndex); // 00841000 void UpdateTextImage(); // 008410c0 static void render_text_image(Font *font, short *text, float x, float y, KColor *color, int unused); // 008413a0 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(HUD_Message) == 0x4); + struct StatHUD { static void Render(float *param_1); // 0084c2c0 void RecomputeStats(int playerId, uint flags, byte unk); // 0084ca00 void update_player(Entity_Player *oldPlayer, Entity_Player *newPlayer); // 0084cc40 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(StatHUD) == 0x4); + struct HUD { void SetVisible(byte param_2); // 004aaee0 @@ -5631,12 +5672,9 @@ struct HUD { ANM2 _heartsSprite; ANM2 _pickupHUDSprite; ANM2 _cardsPillsSprite; - HUD_Message _messageMain; - uint8_t _pad_0x3ce0[0x1f0]; - HUD_Message _messageStack[6]; - uint8_t _pad_0x3ee8[0xba0]; - HUD_Message _messagePlayerHUD[4]; - uint8_t _pad_0x4a98[0x7c0]; + uint8_t _messageMain[0x1f4]; // HUD_Message + uint8_t _messageStack[0xbb8]; // HUD_Message[6] + uint8_t _messagePlayerHUD[0x7d0]; // HUD_Message[4] ANM2 _fortuneSprite; uint8_t _pad_0x536c[0x8]; ANM2 _statsSprite; @@ -5657,8 +5695,7 @@ struct HUD { ANM2 _craftingTableSprite; ANM2 _poopSpellsSprite; uint8_t _pad_0x592c[0x78]; - StatHUD _statHUD; - uint8_t _pad_0x59a8[0x2ac]; + uint8_t _statHUD[0x2b0]; // StatHUD uint8_t _historyHUD[0x4]; // HistoryHUD }; LAYOUT32(offsetof(HUD, _playerHUD) == 0x0); @@ -5705,7 +5742,7 @@ struct RoomConfig { RoomConfig_Room * make_generated_room(RoomConfig_Room *source); // 0082dac0 uint8_t _pad_0x0[0x1c54]; - uint8_t _curses[0x4]; // std_vector_RoomConfig_Curse + uint8_t _curses[0x4]; // std_vector }; LAYOUT32(offsetof(RoomConfig, _curses) == 0x1c54); @@ -5906,9 +5943,9 @@ LAYOUT32(offsetof(GlowingHourglassState, _eventCounters) == 0x1fe34); struct ProceduralItemManager { ~ProceduralItemManager(); // 009dc750 - uint8_t _proceduralItems[0xc]; // std_vector_ProceduralItemPtr + std_vector _proceduralItems; uint8_t _renderTarget[0x1c]; // KAGE_SmartPointer_RenderTargetBase - uint8_t _spawnTriggerTargets[0x4]; // std_set_TypeVariant + uint8_t _spawnTriggerTargets[0x4]; // std_set }; LAYOUT32(offsetof(ProceduralItemManager, _proceduralItems) == 0x0); LAYOUT32(offsetof(ProceduralItemManager, _renderTarget) == 0xc); @@ -5953,9 +5990,9 @@ struct RoomTransition { uint8_t _pad_0x28[0x10]; ANM2 _versusScreenSprite; uint8_t _pad_0x14c[0xd8]; - uint8_t _sprites[0x8]; // std_map_RoomTransitionSprite + std_map _sprites; Vector _slideOffset; - EntityPtr _minecart; + uint8_t _minecart[0x4]; // EntityPtr int _bossIntroBossId; }; LAYOUT32(offsetof(RoomTransition, _frame) == 0x4); @@ -6046,17 +6083,15 @@ struct ScoreSheet { void Calculate(); // 009e5d90 void calculate_room_score(); // 009e6780 void * find_stage_entry(int stage, int stageType, byte isFlag); // 009e6940 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(ScoreSheet) == 0x4); + struct OnlineStatsScreen { ~OnlineStatsScreen(); // 008ca220 bool _isActive; uint8_t _pad_0x1[0x567]; - uint8_t _players[0x4]; // std_vector_OnlineStatsPlayer + uint8_t _players[0x4]; // std_vector }; LAYOUT32(offsetof(OnlineStatsScreen, _isActive) == 0x0); LAYOUT32(offsetof(OnlineStatsScreen, _players) == 0x568); @@ -6252,7 +6287,8 @@ struct Game { unsigned int _levelStateFlags; bool _isLevelGenerating; uint8_t _pad_0x183a1[0x3]; - uint8_t _myosotisPickups[0x56c]; // vector_EntitySaveState + std_vector _myosotisPickups; + uint8_t _pad_0x183b0[0x560]; RoomConfig _roomConfig; uint8_t _pad_0x1a568[0x1d0]; uint8_t _preloadManager[0x8]; // PreloadManager @@ -6267,7 +6303,8 @@ struct Game { PlayerManager _playerManager; uint8_t _pad_0x1bb7c[0x8]; Seeds _seedEffects; - uint8_t _onlinePlayerStats[0x454]; // std_vector_OnlinePlayerStats + std_vector _onlinePlayerStats; + uint8_t _pad_0x1bbec[0x448]; ItemOverlay _itemOverlay; uint8_t _pad_0x1d1dc[0x344]; GameOver _gameOver; @@ -6340,8 +6377,7 @@ struct Game { uint8_t _pad_0x26624[0xc]; DailyChallenge _dailyChallenge; uint8_t _pad_0x26644[0xa0]; - ScoreSheet _scoreSheet; - uint8_t _pad_0x266e8[0x8c]; + uint8_t _scoreSheet[0x90]; // ScoreSheet int _victoryLap; GenericPrompt _genericPrompt; uint8_t _pad_0x268a9[0x3]; @@ -6369,8 +6405,7 @@ struct Game { ColorModState _targetColorModifier; ColorModState _lerpColorModifier; uint8_t _pad_0x67700[0x2c]; - DebugRenderer _debugRenderer; - uint8_t _pad_0x67730[0x4]; + uint8_t _debugRenderer[0x8]; // DebugRenderer float _lightningIntensity; float _dizzyIntensity; float _dizzyTargetIntensity; @@ -6378,7 +6413,7 @@ struct Game { bool _isRoomRespawned; uint8_t _pad_0x67745[0x3]; int _magicSkinUses; - uint8_t _erasedEntities[0xc]; // vector_ErasedEntities + std_vector _erasedEntities; ProceduralItemManager _proceduralItemManager; uint8_t _pad_0x67784[0x4]; int _ascentTimer; @@ -6386,7 +6421,7 @@ struct Game { int _deathCertificateExitTimer; bool _isPocketItemRewindSaved; uint8_t _pad_0x68d71[0x7]; - Console _console; + uint8_t _console[0x4]; // Console }; LAYOUT32(offsetof(Game, _stage) == 0x0); LAYOUT32(offsetof(Game, _stageType) == 0x4); @@ -6527,7 +6562,7 @@ LAYOUT32(offsetof(Game, _isPocketItemRewindSaved) == 0x68d70); LAYOUT32(offsetof(Game, _console) == 0x68d78); struct GameStateItemPool { - uint8_t _poolsItemWeights[0x174]; // std_vector_float[31] + std_vector _poolsItemWeights[31]; uint32_t _bibleUpgrades[31]; uint32_t _seed; int _lastPool; @@ -6535,8 +6570,8 @@ struct GameStateItemPool { uint32_t _trinketPoolRNGseed; float _unkFloat674; float _unkFloat678; - uint8_t _removedCollectibles[0x10]; // vector_bool - uint8_t _trinketPoolItems[0x10]; // vector_bool + std_vector_bool _removedCollectibles; + std_vector_bool _trinketPoolItems; int _pillEffects[15]; bool _identifiedPillEffects[15]; uint8_t _pad_0x273[0x1]; @@ -6564,10 +6599,8 @@ struct Game_StateSlot { struct GenericPopup { void Render(); // 008372e0 void destructor(); // 009c6130 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(GenericPopup) == 0x4); + struct GlitchedCollectibleGfx { void * constructor(); // 009dc6e0 @@ -6848,7 +6881,7 @@ struct GridEntity_Rock : GridEntity { std_string _anim; std_string _rubbleAnim; - uint8_t _rubbleOffsets[0xc]; // vector_Vector + std_vector _rubbleOffsets; int _frameCnt; uint8_t _pad_0x194[0x4]; }; @@ -7041,8 +7074,9 @@ struct InfoDisplay { void load_collectibles_xml(void *collectiblesNode, void *idMap); // 00850480 ~InfoDisplay(); // 00950510 - uint8_t _collectibles[0x8]; // std_map_int_InfoDisplayEntry - uint8_t _trinkets[0x18]; // std_map_int_InfoDisplayEntry + std_map _collectibles; + std_map _trinkets; + uint8_t _pad_0x10[0x10]; uint8_t _defaultEntry[0x4]; // InfoDisplayEntry }; LAYOUT32(offsetof(InfoDisplay, _collectibles) == 0x0); @@ -7139,17 +7173,18 @@ struct ItemConfig { static uint trinket_has_tags(uint param_1, uint param_2); // 0072fec0 void * GetTaggedItems(ulonglong tags); // 00730b80 - uint8_t _collectibles[0xc]; // vector_ItemConfigItemPtr - uint8_t _trinkets[0xc]; // vector_ItemConfigItemPtr - uint8_t _nullItems[0xc]; // vector_ItemConfigItemPtr - uint8_t _cards[0xc]; // vector_ItemConfigCardPtr - uint8_t _pillEffects[0xc]; // vector_ItemConfigPillPtr - uint8_t _collectibleNameMap[0x8]; // std_map_string_int - uint8_t _playerForms[0xc]; // vector_ItemConfigPlayerFormPtr + std_vector _collectibles; + std_vector _trinkets; + std_vector _nullItems; + std_vector _cards; + std_vector _pillEffects; + std_map _collectibleNameMap; + std_vector _playerForms; std_string _wispGfxRoot; uint8_t _pad_0x68[0x14]; - uint8_t _locustConfigs[0x88]; // std_map_LocustConfig - uint8_t _availabilityFilters[0x4]; // vector_ItemAvailabilityFn + std_map _locustConfigs; + uint8_t _pad_0x84[0x80]; + uint8_t _availabilityFilters[0x4]; // std_vector }; LAYOUT32(offsetof(ItemConfig, _collectibles) == 0x0); LAYOUT32(offsetof(ItemConfig, _trinkets) == 0xc); @@ -8843,10 +8878,8 @@ struct KAGE_Filesys_FileManager { bool OpenRead(int param_2, int param_3); // 005ca5a0 static uint GetPrimaryFilePathHash(byte *filePath); // 00a159d0 static void LoadArchiveFile(byte *param_1, uint *param_2, ushort param_3); // 00a179c0 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(KAGE_Filesys_FileManager) == 0x4); + struct KAGE_Graphics { static void * create_image(void *outImage, int width, int height, int format, byte *name); // 00a11c70 @@ -8862,10 +8895,8 @@ struct KAGE_Graphics { struct KAGE_Graphics_ImageManager { static void * load_image_file(void *param_1, byte *param_2); // 00a118d0 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(KAGE_Graphics_ImageManager) == 0x4); + struct KAGE_Graphics_ImagePCX { @@ -8904,10 +8935,8 @@ struct KeyConfigs { struct LRoomTileDesc { void * GetRandomTile(void *ret, uint seed); // 0081fb70 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(LRoomTileDesc) == 0x4); + struct LayerAnimation { LayerAnimation(); // 0040c1e0 @@ -9173,25 +9202,19 @@ struct LevelGenerator { void block_cells_near_rooms(void *otherLayout, int unused); // 009b1950 void block_unused_door_cells(void *room, uint *doorMask); // 009b1a00 static void queue_push_front(undefined4 *param_1); // 009b1a90 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(LevelGenerator) == 0x4); + struct LevelGenerator_Room { LevelGenerator_Room * constructor(uint column, uint line, uint shape); // 007381b0 LevelGenerator_Room(void *other); // 007507d0 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(LevelGenerator_Room) == 0x4); + struct Lobby { void refresh_members(); // 00a71c40 - - uint8_t _pad_0x0[0x1]; }; -LAYOUT32(sizeof(Lobby) == 0x1); + struct LobbyList { void clear(); // 0091e730 @@ -9256,10 +9279,8 @@ struct LuaEngine { void destroy(); // 0086e520 static int Isaac_GetItemIdByName(std_string *name); // 0086f640 byte * LuamodCMD(byte *modname); // 008f70f0 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(LuaEngine) == 0x4); + struct LuaRef { void push(void *luaState); // 006a80f0 @@ -9270,10 +9291,8 @@ struct LuaRef { struct MTRNG { void Init(uint seed); // 008fd3c0 uint Next(); // 008fd410 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(MTRNG) == 0x4); + struct PersistentGameData { static void copy_shared_progress(PersistentGameData *dst, PersistentGameData *src); // 0091b720 @@ -9321,9 +9340,11 @@ struct PersistentGameData { int _lastDifficulty; int _characterMenuShown; uint8_t _pad_0xf14[0x50]; - uint8_t _bestiaryEncounters[0x8]; // std_map_int_int - uint8_t _bestiaryKills[0x10]; // std_map_int_int - uint8_t _bestiaryDeaths[0x10]; // std_map_int_int + std_map _bestiaryEncounters; + std_map _bestiaryKills; + uint8_t _pad_0xf74[0x8]; + std_map _bestiaryDeaths; + uint8_t _pad_0xf84[0x8]; bool _isFileLoaded; }; LAYOUT32(offsetof(PersistentGameData, _isReadOnly) == 0x1); @@ -9393,7 +9414,7 @@ struct MusicManager { int _queuedMusicID; float _pitch; float _targetPitch; - uint8_t _entries[0xc]; // vector_MusicEntry + std_vector _entries; bool _isEnabled; }; LAYOUT32(offsetof(MusicManager, _currentChannel) == 0x0); @@ -9409,7 +9430,8 @@ struct SoundEffects { void Play(int ID, float Volume, int FrameDelay, byte Loop, float Pitch, float Pan); // 0092dc30 void ClearVolumeModifier(); // 0092e430 - uint8_t _sounds[0x10]; // vector_SoundEffect + std_vector _sounds; + uint8_t _pad_0xc[0x4]; float _volumeModifier; float _volumeModifierStep; }; @@ -9590,10 +9612,8 @@ struct ModManager { static void RenderCustomCharacterMenu(int characterId, Vector *renderPos, Sprite *defaultSprite); // 008f8d00 void add_mod_entry(std_string *name, std_string *dir, std_string *path); // 008f9f40 void UpdateWorkshopMods(); // 008fa390 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(ModManager) == 0x4); + struct StringTable { static void constructor(); // 00a26710 @@ -9605,7 +9625,7 @@ struct StringTable { static undefined4 load_xml(); // 00a27038 uint8_t _pad_0x0[0xc]; - uint8_t _categories[0x4]; // std_map_cstr_StringTableCategory + uint8_t _categories[0x4]; // std_map }; LAYOUT32(offsetof(StringTable, _categories) == 0xc); @@ -9647,10 +9667,8 @@ struct NetplayManager { void read_player_game_states_message(); // 00918d00 static void load_mute_list(); // 0091f780 void update_text_popup(); // 00923920 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(NetplayManager) == 0x4); + struct PopupButton { ANM2 _sprite; @@ -9752,11 +9770,10 @@ struct Manager { uint8_t _pad_0x2a50c[0x24]; InfoDisplay _infoDisplay; uint8_t _pad_0x2a554[0x110]; - uint8_t _challengeParams[0xc]; // vector_ChallengeParam + std_vector _challengeParams; EntityConfig _entityConfig; uint8_t _pad_0x2a6a0[0x20]; - ModManager _modManager; - uint8_t _pad_0x2a6c4[0x2025c]; + uint8_t _modManager[0x20260]; // ModManager StringTable _stringTable; uint8_t _pad_0x4a930[0x8]; StringTable _stringTablePc; @@ -9800,7 +9817,7 @@ struct Manager { uint8_t _pad_0x4b1d4[0xa0]; bool _networkPlay; uint8_t _pad_0x4b275[0x3]; - uint8_t _lobbyMembers[0xc]; // vector_LobbyMember + std_vector _lobbyMembers; bool _isSaveOnExit; uint8_t _pad_0x4b285[0x3]; bool _isMenuPending; @@ -9816,7 +9833,7 @@ struct Manager { bool _isRenderSurfaceResetPending; bool _isWindowFocused; uint8_t _pad_0x4b3cb[0xd]; - NetplayManager _netplayManager; + uint8_t _netplayManager[0x4]; // NetplayManager }; LAYOUT32(offsetof(Manager, _state) == 0x8); LAYOUT32(offsetof(Manager, _previousState) == 0xc); @@ -9885,10 +9902,8 @@ LAYOUT32(offsetof(Manager, _netplayManager) == 0x4b3d8); struct MemMapBase { void * _scalar_deleting_destructor_(uint param_1); // 008baea0 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(MemMapBase) == 0x4); + struct MenuDialog { void constructor(); // 009c3f30 @@ -9921,10 +9936,8 @@ struct Menu_Save { void replace_slot_graphics(ANM2 *sprite); // 009db2d0 void update_sprites(); // 009db850 void update_save_drawings(); // 009dbdd0 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(Menu_Save) == 0x4); + struct Menu_Game { void destructor(); // 00980b40 @@ -9953,10 +9966,8 @@ struct Menu_DailyChallenge { void Update(); // 008cf610 void Render(); // 008cfd40 void load_graphics(); // 008d0470 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(Menu_DailyChallenge) == 0x4); + struct Menu_Character { std_string * ChangeCharacterPage(std_string *param_2, std_string *param_3); // 006ba840 @@ -10000,8 +10011,7 @@ struct Menu_Character { ANM2 _DifficultyOverlaySprite; ANM2 _GreedDecoOverlaySprite; ANM2 _CharacterMenuBGSprite; - CompletionWidget _completionWidget; - uint8_t _pad_0x494[0x118]; + uint8_t _completionWidget[0x11c]; // CompletionWidget ANM2 _DifficultyPageSprite; ANM2 _SeedPageSprite; ANM2 _WinStreakPageSprite; @@ -10012,8 +10022,8 @@ struct Menu_Character { int _numCharacters_MINUS_SelectedEntry; ANM2 _CharacterPortraitsSprite; float _horizontalScrollPosition; - uint8_t _portraitPositions[0xc]; // vector_Vector - uint8_t _portraitScales[0xc]; // vector_float + std_vector _portraitPositions; + std_vector _portraitScales; ANM2 _SeedEntrySprite; std_string _seedText; int _seedUnlockPageState; @@ -10310,26 +10320,20 @@ struct Menu_Bestiary { void Render(); // 008c66a0 void update_cursor(); // 008c87b0 void LoadPreview(); // 008c8c70 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(Menu_Bestiary) == 0x4); + struct Menu_CustomChallenge { void Update(); // 008ce080 void Render(); // 008ce430 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(Menu_CustomChallenge) == 0x4); + struct Menu_Mods { void Update(); // 0069d290 void reset(); // 008e4970 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(Menu_Mods) == 0x4); + struct Menu_Online { static void render_mode_select(); // 008cc1a0 @@ -10364,7 +10368,7 @@ struct MenuManager { static void push_menu(int menuId, int unused); // 0098ae20 static void scroll_options_menu(int menuId, int selectedRow, int rowCount); // 0098af10 - uint8_t _menuStateHistory[0xc]; // std_vector_uint + std_vector _menuStateHistory; bool _state; bool _fadeOutActive; uint8_t _pad_0xe[0x2]; @@ -10383,12 +10387,10 @@ struct MenuManager { Seeds _seedsObject; Menu_Title _menuTitle; uint8_t _pad_0x2f0[0x4]; - Menu_Save _menuSave; - uint8_t _pad_0x2f8[0x898]; + uint8_t _menuSave[0x89c]; // Menu_Save Menu_Game _menuGame; uint8_t _pad_0xdc8[0xc]; - Menu_DailyChallenge _menuDailyChallenge; - uint8_t _pad_0xdd8[0x75c]; + uint8_t _menuDailyChallenge[0x760]; // Menu_DailyChallenge Menu_Character _menuCharacter; uint8_t _pad_0x2404[0x118]; Menu_SpecialSeeds _menuSpecialSeeds; @@ -10403,12 +10405,9 @@ struct MenuManager { uint8_t _pad_0xd278[0xc]; Menu_KeyConfig _menuKeyConfig; Menu_Cutscenes _menuCutscenes; - Menu_Bestiary _menuBestiary; - uint8_t _pad_0xd4d4[0x374]; - Menu_CustomChallenge _menuCustomChallenge; - uint8_t _pad_0xd84c[0x120]; - Menu_Mods _menuMods; - uint8_t _pad_0xd970[0x128]; + uint8_t _menuBestiary[0x378]; // Menu_Bestiary + uint8_t _menuCustomChallenge[0x124]; // Menu_CustomChallenge + uint8_t _menuMods[0x12c]; // Menu_Mods uint8_t _menuOnline[0x4]; // Menu_Online ANM2 _onlineMenuSprite; uint8_t _pad_0xdbb0[0x1a1c]; @@ -10467,10 +10466,8 @@ LAYOUT32(offsetof(MenuManager, _flySprite) == 0xf818); struct Menu_Character_Entry { byte IsCharacterAvailable(int unused); // 00946cd0 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(Menu_Character_Entry) == 0x4); + struct Menu_CreateLobby { void unload_graphics(); // 008cbaf0 @@ -10595,18 +10592,14 @@ struct Music { void VolumeSlide(float TargetVolume, float FadeRate); // 007e2510 void UpdateVolume(); // 007e2550 void PlayJingle(int musicid, int unusedInt, byte unusedBool); // 007e2580 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(Music) == 0x4); + struct Mutex { struct ScopeLock; void lock(); // 00aaaf50 - - uint8_t _pad_0x0[0x1]; }; -LAYOUT32(sizeof(Mutex) == 0x1); + struct Mutex::ScopeLock { ~ScopeLock(); // 00aaae20 @@ -10854,10 +10847,8 @@ struct PersistentGameDataWriter { struct PersistentGameData_Bestiary { PersistentGameData_Bestiary * constructor(); // 00926020 ~PersistentGameData_Bestiary(); // 00926120 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(PersistentGameData_Bestiary) == 0x4); + struct PickupGhostData : Entity_Effect::ExtraData { virtual ~PickupGhostData(); // 005d23a0 slot 0 ::FUN_005d23a0 @@ -10927,10 +10918,8 @@ struct PocketItemConfig { struct Point { void UpdateNormal(Vector *unk); // 0041e4c0 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(Point) == 0x4); + struct Popup { void * constructor(void *desc); // 009c01d0 @@ -11341,15 +11330,15 @@ struct Room { uint32_t _bossId; int _secondBossID; uint8_t _pad_0x1bb8[0x10]; - Backdrop _backdrop; - uint8_t _pad_0x1bcc[0x14c]; + uint8_t _backdrop[0x150]; // Backdrop int _backdropType; uint8_t _pad_0x1d1c[0x5124]; ANM2 _lightSprite; uint8_t _pad_0x6f54[0x114]; int _shopLevel; int _shopRestockTimer; - uint8_t _shopItemDeque[0x1b9]; // deque_ShopRestockDesc + std_deque _shopItemDeque; + uint8_t _pad_0x7084[0x1a5]; bool _hasTriggerPressurePlates; uint8_t _pad_0x722a[0x2]; int _slowdownDuration; @@ -11383,8 +11372,7 @@ struct Room { Vector _waterCurrent; RailManager _railManager; float _lavaIntensity; - EntityPtr _redDoorOutlines[8]; - uint8_t _pad_0x7764[0x128]; + uint8_t _redDoorOutlines[0x148]; // EntityPtr[8] float _beastBlastForce; uint8_t _pad_0x7890[0x4]; bool _isPickupVisionInvalid; @@ -11510,10 +11498,8 @@ LAYOUT32(sizeof(RoomConfig_Room) == 0x5c); struct RoomConfig_Stage { void unload(); // 00828fe0 void game_destructor(); // 008295e0 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(RoomConfig_Stage) == 0x4); + struct RoomEntry { int _type; @@ -11533,10 +11519,8 @@ struct RoomGridPath { struct RoomSet { void * GetVariantSet(uint type); // 00828e50 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(RoomSet) == 0x4); + struct RoomSpawn { short _x; @@ -11600,17 +11584,15 @@ struct ShockwaveParams { struct SimpleString { - uint8_t _pad_0x0[0x4]; + }; -LAYOUT32(sizeof(SimpleString) == 0x4); + struct SoundEffect { void Load(); // 0092cfb0 static void move_constructor(void *dst, void *src); // 0092e830 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(SoundEffect) == 0x4); + struct SoundInstance { SoundInstance(); // 00a2a990 @@ -11812,9 +11794,9 @@ LAYOUT32(offsetof(TemporaryEffect, _count) == 0x4); LAYOUT32(offsetof(TemporaryEffect, _cooldown) == 0x8); struct Thread { - uint8_t _pad_0x0[0x1]; + }; -LAYOUT32(sizeof(Thread) == 0x1); + struct TypeDescriptor { void * pVFTable; @@ -11883,8 +11865,7 @@ struct Weapon { void TriggerTearEffects(Vector *direction, int count); // 009f7930 Entity* _owner; - EntityPtr _technology2Laser; - uint8_t _pad_0xc[0x28]; + uint8_t _technology2Laser[0x2c]; // EntityPtr uint32_t _modifiers; uint8_t _pad_0x38[0xc]; }; @@ -11937,7 +11918,7 @@ struct Weapon_Brimstone : Weapon { void fire(float Speed, byte IgnoreStatusEffects); // 00a02890 uint8_t _pad_0x44[0x4]; - EntityPtr _mainLaser; + uint8_t _mainLaser[0x4]; // EntityPtr }; LAYOUT32(offsetof(Weapon_Brimstone, _mainLaser) == 0x48); LAYOUT32(sizeof(Weapon_Brimstone) == 0x4c); @@ -12114,10 +12095,8 @@ LAYOUT32(sizeof(Weapon_UrnOfSouls) == 0x54); struct WeightedOutcomePicker { uint PickOutcome(RNG rng); // 0049cbf0 - - uint8_t _pad_0x0[0x4]; }; -LAYOUT32(sizeof(WeightedOutcomePicker) == 0x4); + struct Window { int get_framebuffer_height(); // 00a193c0 @@ -12254,9 +12233,9 @@ LAYOUT32(offsetof(_FLOATING_SAVE_AREA, Cr0NpxState) == 0x6c); LAYOUT32(sizeof(_FLOATING_SAVE_AREA) == 0x70); struct _Facet_base { - uint8_t _pad_0x0[0x4]; + }; -LAYOUT32(sizeof(_Facet_base) == 0x4); + struct _ICONINFO { BOOL fIcon; @@ -12273,9 +12252,9 @@ LAYOUT32(offsetof(_ICONINFO, hbmColor) == 0x10); LAYOUT32(sizeof(_ICONINFO) == 0x14); struct _IMAGE_SECTION_HEADER { - uint8_t _pad_0x0[0x1]; + }; -LAYOUT32(sizeof(_IMAGE_SECTION_HEADER) == 0x1); + struct _LARGE_INTEGER { LONGLONG QuadPart; @@ -12308,14 +12287,14 @@ LAYOUT32(offsetof(_LUID_AND_ATTRIBUTES, Attributes) == 0x8); LAYOUT32(sizeof(_LUID_AND_ATTRIBUTES) == 0xc); struct _Locimp { - uint8_t _pad_0x0[0x1]; + }; -LAYOUT32(sizeof(_Locimp) == 0x1); + struct _Lockit { - uint8_t _pad_0x0[0x1]; + }; -LAYOUT32(sizeof(_Lockit) == 0x1); + struct _MEMORY_BASIC_INFORMATION { PVOID BaseAddress; @@ -12336,9 +12315,9 @@ LAYOUT32(offsetof(_MEMORY_BASIC_INFORMATION, Type) == 0x18); LAYOUT32(sizeof(_MEMORY_BASIC_INFORMATION) == 0x1c); struct _Mbstatet { - uint8_t _pad_0x0[0x1]; + }; -LAYOUT32(sizeof(_Mbstatet) == 0x1); + struct _union_518 { PVOID Pointer; @@ -12795,29 +12774,29 @@ LAYOUT32(offsetof(_union_859, hi) == 0x0); LAYOUT32(sizeof(_union_859) == 0x18); struct codecvt_base { - uint8_t _pad_0x0[0x1]; + }; -LAYOUT32(sizeof(codecvt_base) == 0x1); + struct facet { - uint8_t _pad_0x0[0x1]; + }; -LAYOUT32(sizeof(facet) == 0x1); + struct id { - uint8_t _pad_0x0[0x1]; + }; -LAYOUT32(sizeof(id) == 0x1); + struct ios_base { - uint8_t _pad_0x0[0x1]; + }; -LAYOUT32(sizeof(ios_base) == 0x1); + struct locale { - uint8_t _pad_0x0[0x1]; + }; -LAYOUT32(sizeof(locale) == 0x1); + namespace std { struct exception { @@ -13034,66 +13013,6 @@ struct vector { } -struct std_deque { - void * _proxy; - void * _map; - uint _mapSize; - uint _offset; - uint _size; -}; -LAYOUT32(offsetof(std_deque, _proxy) == 0x0); -LAYOUT32(offsetof(std_deque, _map) == 0x4); -LAYOUT32(offsetof(std_deque, _mapSize) == 0x8); -LAYOUT32(offsetof(std_deque, _offset) == 0xc); -LAYOUT32(offsetof(std_deque, _size) == 0x10); -LAYOUT32(sizeof(std_deque) == 0x14); - -struct std_map { - void * _head; - uint _size; -}; -LAYOUT32(offsetof(std_map, _head) == 0x0); -LAYOUT32(offsetof(std_map, _size) == 0x4); -LAYOUT32(sizeof(std_map) == 0x8); - -struct std_multiset { - void * _head; - uint _size; -}; -LAYOUT32(offsetof(std_multiset, _head) == 0x0); -LAYOUT32(offsetof(std_multiset, _size) == 0x4); -LAYOUT32(sizeof(std_multiset) == 0x8); - -struct std_set { - void * _head; - uint _size; -}; -LAYOUT32(offsetof(std_set, _head) == 0x0); -LAYOUT32(offsetof(std_set, _size) == 0x4); -LAYOUT32(sizeof(std_set) == 0x8); - -struct std_vector { - void * _begin; - void * _end; - void * _capacity; -}; -LAYOUT32(offsetof(std_vector, _begin) == 0x0); -LAYOUT32(offsetof(std_vector, _end) == 0x4); -LAYOUT32(offsetof(std_vector, _capacity) == 0x8); -LAYOUT32(sizeof(std_vector) == 0xc); - -struct std_vector_bool { - void * _begin; - void * _end; - void * _capacity; - uint _size; -}; -LAYOUT32(offsetof(std_vector_bool, _begin) == 0x0); -LAYOUT32(offsetof(std_vector_bool, _end) == 0x4); -LAYOUT32(offsetof(std_vector_bool, _capacity) == 0x8); -LAYOUT32(offsetof(std_vector_bool, _size) == 0xc); -LAYOUT32(sizeof(std_vector_bool) == 0x10); - struct tagBITMAPINFO { uint8_t bmiHeader[0x28]; // BITMAPINFOHEADER uint8_t bmiColors[0x4]; // RGBQUAD diff --git a/src/game/color.cpp b/src/game/color.cpp index 2bb744c..6e2b432 100644 --- a/src/game/color.cpp +++ b/src/game/color.cpp @@ -425,11 +425,11 @@ void * Color::copy_constructor_ext(void *other) this->_colorize[3] = fVar3; *(undefined8 *)this->_offset = *(undefined8 *)((char *)other + 0x20); this->_offset[2] = *(float *)((char *)other + 0x28); - ((std::string *)((char *)(this + 1)))->std::string::string((void *)((int)other + 0x2c)); + ((std::string *)((char *)(this + 1)))->std::string::string((void *)(GHIDRA_INT(other) + 0x2c)); local_8 = 0; - ((std::string *)((char *)(this[1]._colorize + 2)))->std::string::string((void *)((int)other + 0x44)); - local_8 = CONCAT31(local_8._1_3_,1); - ((std::string *)((char *)(this[2]._tint + 1)))->std::string::string((void *)((int)other + 0x5c)); + ((std::string *)((char *)(this[1]._colorize + 2)))->std::string::string((void *)(GHIDRA_INT(other) + 0x44)); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); + ((std::string *)((char *)(this[2]._tint + 1)))->std::string::string((void *)(GHIDRA_INT(other) + 0x5c)); this[2]._colorize[3] = *(float *)((char *)other + 0x74); this[2]._offset[0] = *(float *)((char *)other + 0x78); ExceptionList = local_10; diff --git a/src/game/command_thread.cpp b/src/game/command_thread.cpp index 00ec2fe..0c0d242 100644 --- a/src/game/command_thread.cpp +++ b/src/game/command_thread.cpp @@ -22,7 +22,7 @@ void CommandThread::post_command(void *command) KAGE_LogMessage(0x10,(byte *)"Command thread is not initialized\n"); } commandCopy[0] = *(undefined4 *)command; - FUN_00915d70((int)command + 4); + FUN_00915d70(GHIDRA_INT(command) + 4); local_28 = *(undefined4 *)((char *)command + 0x10); local_24 = *(undefined4 *)((char *)command + 0x14); local_8 = 0; @@ -36,7 +36,7 @@ void CommandThread::post_command(void *command) callbacksEnd[1] = 0; callbacksEnd = callbacksEnd + 2; } - local_1c = (int)this >> 0x1f; + local_1c = GHIDRA_INT(this) >> 0x1f; callbackEntry = this; if (callbacksEnd == callbacksCapacity) { std::vector<8byte>::_Emplace_reallocate(callbacksEnd,&callbackEntry); diff --git a/src/game/completion_widget.cpp b/src/game/completion_widget.cpp index f2b54f7..8edfbf9 100644 --- a/src/game/completion_widget.cpp +++ b/src/game/completion_widget.cpp @@ -41,11 +41,11 @@ void CompletionWidget::Load() undefined4 local_14; CompletionWidget animData; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00af1f85; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; *(undefined1 *)this = 0; menuPath._size = 0; @@ -54,20 +54,20 @@ void CompletionWidget::Load() menuPath._buf[1] = '\0'; menuPath._buf[2] = '\0'; menuPath._buf[3] = '\0'; - menuPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(menuPath._buf) + 0x0)) = std::_Allocate(0x20); menuPath._size = 0x15; menuPath._capacity = 0x1f; - builtin_strncpy((char *)menuPath._buf._0_4_,"gfx/ui/DeedsMenu.anm2",0x16); + builtin_strncpy((*(undefined4 *)((char *)&((char *)menuPath._buf) + 0x0)),"gfx/ui/DeedsMenu.anm2",0x16); local_14 = 0; ((ANM2 *)((ANM2 *)(this + 1)))->ANM2::Load(&menuPath,1); local_14 = 0xffffffff; if (0xf < menuPath._capacity) { uVar3 = menuPath._capacity + 1; - pcVar2 = (char *)menuPath._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)menuPath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(menuPath._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(menuPath._buf) + 0x0)) + -4); uVar3 = menuPath._capacity + 0x24; - if ((char *)0x1f < (char *)(menuPath._buf._0_4_ + (-4 - (int)pcVar2))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(menuPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) { LAB_008ca399: local_14 = 0xffffffff; /* WARNING: Subroutine does not return */ @@ -88,14 +88,14 @@ LAB_008ca399: isLess = bVar1 < *idleName; if (bVar1 != *idleName) { LAB_008ca3e0: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_008ca3e5; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)currentName + 1); isLess = bVar1 < idleName[1]; if (bVar1 != idleName[1]) goto LAB_008ca3e0; - currentName = (CompletionWidget)((int)currentName + 2); + currentName = (CompletionWidget)(GHIDRA_INT(currentName) + 2); idleName = idleName + 2; } while (bVar1 != 0); uVar3 = 0; @@ -122,20 +122,20 @@ LAB_008ca419: characterPath._buf[1] = '\0'; characterPath._buf[2] = '\0'; characterPath._buf[3] = '\0'; - characterPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(characterPath._buf) + 0x0)) = std::_Allocate(0x20); characterPath._size = 0x15; characterPath._capacity = 0x1f; - builtin_strncpy((char *)characterPath._buf._0_4_,"gfx/ui/DeedsMenu.anm2",0x16); + builtin_strncpy((*(undefined4 *)((char *)&((char *)characterPath._buf) + 0x0)),"gfx/ui/DeedsMenu.anm2",0x16); local_14 = 1; ((ANM2 *)((ANM2 *)(characterAnimData + -0xd)))->ANM2::Load(&characterPath,1); local_14 = 0xffffffff; if (0xf < characterPath._capacity) { uVar3 = characterPath._capacity + 1; - pcVar2 = (char *)characterPath._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)characterPath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(characterPath._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(characterPath._buf) + 0x0)) + -4); uVar3 = characterPath._capacity + 0x24; - if ((char *)0x1f < (char *)(characterPath._buf._0_4_ + (-4 - (int)pcVar2))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(characterPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) goto LAB_008ca399; } operator_delete(pcVar2,uVar3); @@ -143,7 +143,7 @@ LAB_008ca419: animData = *characterAnimData; characterPath._size = 0; characterPath._capacity = 0xf; - characterPath._buf._0_4_ = characterPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(characterPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(characterPath._buf) + 0x0)) & 0xffffff00; if (animData == (CompletionWidget)0x0) { LAB_008ca543: bVar1 = ((ANM2 *)((ANM2 *)(characterAnimData + -0xd)))->ANM2::SetAnimation((byte *)"PlayerCharacter",1); @@ -163,14 +163,14 @@ LAB_008ca543: isLess = bVar1 < (byte)*pcVar2; if (bVar1 != *pcVar2) { LAB_008ca530: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_008ca535; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)currentName + 1); isLess = bVar1 < (byte)pcVar2[1]; if (bVar1 != pcVar2[1]) goto LAB_008ca530; - currentName = (CompletionWidget)((int)currentName + 2); + currentName = (CompletionWidget)(GHIDRA_INT(currentName) + 2); pcVar2 = pcVar2 + 2; } while (bVar1 != 0); uVar3 = 0; diff --git a/src/game/config.cpp b/src/game/config.cpp index 01e8fd2..5ef6093 100644 --- a/src/game/config.cpp +++ b/src/game/config.cpp @@ -17,7 +17,7 @@ void Config::GetCollectibles() // 00685d30 void * Config::GetTrinkets() { - return (void *)((int)this + 0xc); + return (void *)(GHIDRA_INT(this) + 0xc); } // 00685d40 diff --git a/src/game/console.cpp b/src/game/console.cpp index a131399..418c5d2 100644 --- a/src/game/console.cpp +++ b/src/game/console.cpp @@ -12,7 +12,7 @@ void Console::destructor() uStack_8 = 0xffffffff; puStack_c = &LAB_00af0a50; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; _eh_vector_destructor_iterator_(this + 0x1d,0x18,6,std::string::_Tidy_deallocate); FUN_006936f0(uVar1); @@ -57,7 +57,7 @@ void Console::LoadCommandHistory() local_14 = 0xffffffff; puStack_18 = &LAB_00af8540; local_1c = ExceptionList; - uVar3 = __security_cookie ^ (uint)(historyPath + 0x118); + uVar3 = __security_cookie ^ GHIDRA_UINT((historyPath + 0x118)); ExceptionList = &local_1c; local_24 = uVar3; sprintf_s(historyPath,0x100,&DAT_00b60c28); @@ -69,11 +69,11 @@ void Console::LoadCommandHistory() file = ((SaveDataManager *)(&PTR_vftable_00c5aa80))->SaveDataManager::open_file_read(historyPath); if (file != (int *)0x0) { uVar3 = (**(code **)(*file + 0x18))(lineBuf,0x400,uVar3); - while (0 < (int)uVar3) { + while (0 < GHIDRA_INT(uVar3)) { do { - iVar4 = isspace((int)line._buf[uVar3 + 0x17]); + iVar4 = isspace(GHIDRA_INT(line._buf[uVar3 + 0x17])); if (iVar4 == 0) { - if ((uint)this[0x19] < 0x40) { + if (GHIDRA_UINT(this[0x19]) < 0x40) { lineEnd = lineBuf; line._size = 0; line._capacity = 0xf; @@ -85,32 +85,32 @@ void Console::LoadCommandHistory() bVar1 = *lineEnd; lineEnd = lineEnd + 1; } while (bVar1 != 0); - ((std::string *)(line._buf))->std::string::assign(lineBuf,(int)lineEnd - (int)(lineBuf + 1)); + ((std::string *)(line._buf))->std::string::assign(lineBuf,GHIDRA_INT(lineEnd) - GHIDRA_INT((lineBuf + 1))); local_14 = 0; historyMap = this[0x19]; CVar6 = this[0x17]; - if ((uint)CVar6 <= (int)historyMap + 1U) { + if (GHIDRA_UINT(CVar6) <= GHIDRA_INT(historyMap) + 1U) { FUN_006937a0(CVar6); CVar6 = this[0x17]; historyMap = this[0x19]; } - CVar5 = (Console)((int)CVar6 - 1U & (uint)this[0x18]); + CVar5 = (Console)(GHIDRA_INT(CVar6) - 1U & GHIDRA_UINT(this[0x18])); this[0x18] = CVar5; - iVar4 = ((int)CVar6 - 1U & (int)CVar5 + (int)historyMap) * 4; + iVar4 = (GHIDRA_INT(CVar6) - 1U & GHIDRA_INT(CVar5) + GHIDRA_INT(historyMap)) * 4; historyMap = this[0x16]; if (*(int *)((char *)historyMap + iVar4) == 0) { newBlock = operator_new(0x18); - *(void **)(iVar4 + (int)this[0x16]) = newBlock; + *(void **)(iVar4 + GHIDRA_INT(this[0x16])) = newBlock; historyMap = this[0x16]; } - entry = *(char **)(iVar4 + (int)historyMap); - *(undefined4 *)entry = line._buf._0_4_; - *(undefined4 *)(entry + 4) = line._buf._4_4_; - *(undefined4 *)(entry + 8) = line._buf._8_4_; - *(undefined4 *)(entry + 0xc) = line._buf._12_4_; + entry = *(char **)(iVar4 + GHIDRA_INT(historyMap)); + *(undefined4 *)entry = (*(undefined4 *)((char *)&(line._buf) + 0x0)); + *(undefined4 *)(entry + 4) = (*(undefined4 *)((char *)&(line._buf) + 0x4)); + *(undefined4 *)(entry + 8) = (*(undefined4 *)((char *)&(line._buf) + 0x8)); + *(undefined4 *)(entry + 0xc) = (*(undefined4 *)((char *)&(line._buf) + 0xc)); *(uint *)(entry + 0x10) = line._size; *(uint *)(entry + 0x14) = line._capacity; - this[0x19] = (Console)((int)this[0x19] + 1); + this[0x19] = (Console)(GHIDRA_INT(this[0x19]) + 1); local_14 = 0xffffffff; } break; @@ -124,7 +124,7 @@ void Console::LoadCommandHistory() } line._buf[uVar3 + 0x17] = '\0'; uVar3 = uVar7; - } while (0 < (int)uVar7); + } while (0 < GHIDRA_INT(uVar7)); uVar3 = (**(code **)(*file + 0x18))(lineBuf,0x400); } (**(code **)*file)(1); @@ -167,11 +167,11 @@ void Console::history_push(std_string line) puStack_c = &LAB_00af858d; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(eraseResult + 0x1c); + local_14 = __security_cookie ^ GHIDRA_UINT((eraseResult + 0x1c)); ExceptionList = &local_10; local_8 = 0; containerProxy = this[0x1c]; - if ((uint)this[0x18] < (uint)containerProxy) { + if (GHIDRA_UINT(this[0x18]) < GHIDRA_UINT(containerProxy)) { frontOffset = this[0x1a]; if (frontOffset == (Console)0x0) { slotOffset = 0; @@ -180,40 +180,40 @@ void Console::history_push(std_string line) slotOffset = *(int *)frontOffset; } a = *(byte **)(*(int *)(slotOffset + 4) + - (*(int *)(slotOffset + 8) - 1U & (int)containerProxy - 1U) * 4); + (*(int *)(slotOffset + 8) - 1U & GHIDRA_INT(containerProxy) - 1U) * 4); CVar3 = (Console)(this + 7); - if (0xf < (uint)this[0xc]) { + if (0xf < GHIDRA_UINT(this[0xc])) { CVar3 = *(Console *)CVar3; } lastEntrySize = (uint *)(a + 0x10); if (0xf < *(uint *)(a + 0x14)) { a = *(byte **)a; } - bVar2 = str_eq(a,*lastEntrySize,(byte *)CVar3,(uint)this[0xb]); + bVar2 = str_eq(a,*lastEntrySize,(byte *)CVar3,GHIDRA_UINT(this[0xb])); if (bVar2 != 0) { - FUN_006938e0(eraseResult,frontOffset,0,(int)containerProxy - 1U,frontOffset,0,containerProxy); + FUN_006938e0(eraseResult,frontOffset,0,GHIDRA_INT(containerProxy) - 1U,frontOffset,0,containerProxy); } } containerProxy = this[0x17]; - if ((uint)containerProxy <= (int)this[0x19] + 1U) { + if (GHIDRA_UINT(containerProxy) <= GHIDRA_INT(this[0x19]) + 1U) { FUN_006937a0(containerProxy); containerProxy = this[0x17]; } - frontOffset = (Console)((int)containerProxy - 1U & (uint)this[0x18]); + frontOffset = (Console)(GHIDRA_INT(containerProxy) - 1U & GHIDRA_UINT(this[0x18])); this[0x18] = frontOffset; if (frontOffset == (Console)0x0) { frontOffset = containerProxy; } CVar3 = this[0x16]; - frontOffset = (Console)((int)frontOffset - 1); - slotOffset = ((int)containerProxy - 1U & (uint)frontOffset) * 4; + frontOffset = (Console)(GHIDRA_INT(frontOffset) - 1); + slotOffset = (GHIDRA_INT(containerProxy) - 1U & GHIDRA_UINT(frontOffset)) * 4; if (*(int *)((char *)CVar3 + slotOffset) == 0) { pvVar4 = operator_new(0x18); - *(void **)(slotOffset + (int)this[0x16]) = pvVar4; + *(void **)(slotOffset + GHIDRA_INT(this[0x16])) = pvVar4; CVar3 = this[0x16]; } ((std::string *)(*(char **)((char *)CVar3 + slotOffset)))->std::string::string(&line); - this[0x19] = (Console)((int)this[0x19] + 1); + this[0x19] = (Console)(GHIDRA_INT(this[0x19]) + 1); this[0x18] = frontOffset; if (this + 0x15 == (Console *)0x0) { containerProxy = (Console)0x0; @@ -224,31 +224,31 @@ void Console::history_push(std_string line) this[0x1a] = containerProxy; this[0x1c] = frontOffset; if ((this[0x14] != (Console)0x0) && - (*(int *)(*(int *)((int)this[0x11] + ((int)this[0x12] - 1U & (uint)this[0x13]) * 4) + 0x10) != + (*(int *)(*(int *)(GHIDRA_INT(this[0x11]) + (GHIDRA_INT(this[0x12]) - 1U & GHIDRA_UINT(this[0x13])) * 4) + 0x10) != 0)) { emptyTextSize = 0; emptyTextCapacity = 0xf; emptyText[0] = (void *)0x0; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((std::string *)(consoleLine))->std::string::string(emptyText); lineFrames = 0x96; lineColor = 0xffd3d3d3; local_34 = 0; local_30 = 1; - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); std::deque::push_front(consoleLine); if (local_34 != 0) { if (g_mainHeap == (void *)0x0) { heapCounter = &g_allocatedBytesNoHeap; } else { - heapCounter = (qword *)((int)g_mainHeap + 0x30); + heapCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar5 = *(uint *)(local_34 + -4); qVar1 = *heapCounter; - *(uint *)heapCounter = (uint)*heapCounter - uVar5; + *(uint *)heapCounter = GHIDRA_UINT(*heapCounter) - uVar5; *(uint *)((char *)heapCounter + 4) = - *(uint *)((char *)heapCounter + 4) - (uint)((uint)qVar1 < uVar5); + *(uint *)((char *)heapCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar5)); free((void *)(local_34 + -4)); } ((std::string *)(consoleLine))->std::string::_Tidy_deallocate(); @@ -257,25 +257,25 @@ void Console::history_push(std_string line) uVar5 = emptyTextCapacity + 1; pvVar4 = emptyText[0]; if (0xfff < uVar5) { - pvVar4 = *(void **)((int)emptyText[0] + -4); + pvVar4 = *(void **)(GHIDRA_INT(emptyText[0]) + -4); uVar5 = emptyTextCapacity + 0x24; - if (0x1f < (uint)((int)emptyText[0] + (-4 - (int)pvVar4))) goto LAB_006866f9; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(emptyText[0]) + (-4 - GHIDRA_INT(pvVar4))))) goto LAB_006866f9; } operator_delete(pvVar4,uVar5); } } containerProxy = (Console)(this + 7); - if (0xf < (uint)this[0xc]) { + if (0xf < GHIDRA_UINT(this[0xc])) { containerProxy = *(Console *)containerProxy; } FUN_00693180(this,0xff808080,&DAT_00b657fc,containerProxy); if (0xf < line._capacity) { uVar5 = line._capacity + 1; - pvVar4 = (void *)line._buf._0_4_; + pvVar4 = (*(undefined4 *)((char *)&((void *)line._buf) + 0x0)); if (0xfff < uVar5) { - pvVar4 = *(void **)(line._buf._0_4_ + -4); + pvVar4 = *(void **)((*(undefined4 *)((char *)&(line._buf) + 0x0)) + -4); uVar5 = line._capacity + 0x24; - if (0x1f < (line._buf._0_4_ - (int)pvVar4) - 4U) { + if (0x1f < ((*(undefined4 *)((char *)&(line._buf) + 0x0)) - GHIDRA_INT(pvVar4)) - 4U) { LAB_006866f9: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -322,19 +322,19 @@ void Console::get_visible_line_range(uint *outRange) LAB_00686833: local_10 = this[0x13]; lineOffset = 0; - linesLeft = (int)(g_screenHeight / ((float)linesLeft + 0.0)) + -7; - resultOffset = (Console)((int)this[0x14] + (int)local_10); + linesLeft = GHIDRA_INT((g_screenHeight / ((float)linesLeft + 0.0))) + -7; + resultOffset = (Console)(GHIDRA_INT(this[0x14]) + GHIDRA_INT(local_10)); do { - firstLine = (Console)((int)firstLine + -1); + firstLine = (Console)(GHIDRA_INT(firstLine) + -1); if (resultOffset == local_10) { lineOffset = 0; LAB_006868b5: local_14 = 0; - local_18._1_3_ = 0; - local_18._0_1_ = - *(int *)(*(int *)((int)this[0x11] + ((int)this[0x12] - 1U & (uint)this[0x13]) * 4) + 0x10 + (*(undefined1 *)((char *)&(local_18) + 0x1)) = 0; + (*(undefined1 *)((char *)&(local_18) + 0x0)) = + *(int *)(*(int *)(GHIDRA_INT(this[0x11]) + (GHIDRA_INT(this[0x12]) - 1U & GHIDRA_UINT(this[0x13])) * 4) + 0x10 ) == 0; - if (((int)firstLine < (int)local_18) || ((firstLine == local_18 && (lineOffset < 0)))) { + if ((GHIDRA_INT(firstLine) < GHIDRA_INT(local_18)) || ((firstLine == local_18 && (lineOffset < 0)))) { isClampToStart = true; } else { @@ -345,7 +345,7 @@ LAB_006868b5: result = &firstLine; } resultOffset = result[1]; - *outRange = (uint)*result; + *outRange = GHIDRA_UINT(*result); *(Console *)(outRange + 1) = resultOffset; return; } @@ -356,13 +356,13 @@ LAB_006868b5: iVar1 = *(int *)this[0x10]; } lineOffset = *(int *)(*(int *)(*(int *)(iVar1 + 4) + - (*(int *)(iVar1 + 8) - 1U & (int)resultOffset - 1U) * 4) + 0x24); + (*(int *)(iVar1 + 8) - 1U & GHIDRA_INT(resultOffset) - 1U) * 4) + 0x24); if (linesLeft <= lineOffset) { lineOffset = lineOffset - linesLeft; goto LAB_006868b5; } linesLeft = linesLeft - lineOffset; - resultOffset = (Console)((int)resultOffset + -1); + resultOffset = (Console)(GHIDRA_INT(resultOffset) + -1); } while( true ); } @@ -380,8 +380,8 @@ void Console::Close() Manager *manager; manager = g_manager; - local_8 = __security_cookie ^ (uint)(historyPath + 0x108); - if (1 < (uint)*this) { + local_8 = __security_cookie ^ GHIDRA_UINT((historyPath + 0x108)); + if (1 < GHIDRA_UINT(*this)) { *this = (Console)0x4; this[1] = (Console)0x0; manager->_isHotkeysEnabled = 1; @@ -398,8 +398,8 @@ void Console::Close() historyFile = ((SaveDataManager *)(&PTR_vftable_00c5aa80))->SaveDataManager::open_file_write(historyPath,0); if (historyFile != (int *)0x0) { historyProxy = this[0x15]; - for (lineIndex = this[0x18]; lineIndex != (Console)((int)this[0x19] + (int)this[0x18]); - lineIndex = (Console)((int)lineIndex + 1)) { + for (lineIndex = this[0x18]; lineIndex != (Console)(GHIDRA_INT(this[0x19]) + GHIDRA_INT(this[0x18])); + lineIndex = (Console)(GHIDRA_INT(lineIndex) + 1)) { if (historyProxy == (Console)0x0) { historyDeque = 0; } @@ -413,15 +413,15 @@ void Console::Close() historyDequeCopy = *(int *)historyProxy; } historyLine = *(int **)(*(int *)(historyDequeCopy + 4) + - (*(int *)(historyDequeCopy + 8) - 1U & (uint)lineIndex) * 4); - if (0xf < (uint)historyLine[5]) { + (*(int *)(historyDequeCopy + 8) - 1U & GHIDRA_UINT(lineIndex)) * 4); + if (0xf < GHIDRA_UINT(historyLine[5])) { historyLine = (int *)*historyLine; } (*(code *)((undefined4 *)*historyFile)[7]) (historyLine,1, *(undefined4 *) (*(int *)(*(int *)(historyDeque + 4) + - (*(int *)(historyDeque + 8) - 1U & (uint)lineIndex) * 4) + 0x10)); + (*(int *)(historyDeque + 8) - 1U & GHIDRA_UINT(lineIndex)) * 4) + 0x10)); (**(code **)(*historyFile + 0x1c))(&DAT_00b657f8,1,2); } (**(code **)*historyFile)(1); @@ -469,21 +469,21 @@ void Console::submit_input(int unused) local_14 = 0xffffffff; puStack_18 = &LAB_00af85cd; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(command + 0x2c); + local_24 = __security_cookie ^ GHIDRA_UINT((command + 0x2c)); ExceptionList = &local_1c; inputText = (Console)(this + 7); - if ((uint)this[0xc] < 0x10) { - inputEnd = (Console)((int)this[0xb] + (int)inputText); + if (GHIDRA_UINT(this[0xc]) < 0x10) { + inputEnd = (Console)(GHIDRA_INT(this[0xb]) + GHIDRA_INT(inputText)); cursor = inputText; } else { - inputEnd = (Console)((int)*(Console *)inputText + (int)this[0xb]); + inputEnd = (Console)(GHIDRA_INT(*(Console *)inputText) + GHIDRA_INT(this[0xb])); cursor = *(Console *)inputText; } inputSize = this + 0xb; CVar2 = (Console)0x0; - for (; cursor != inputEnd; cursor = (Console)((int)cursor + 1)) { - CVar3 = (Console)((int)CVar2 + 1); + for (; cursor != inputEnd; cursor = (Console)(GHIDRA_INT(cursor) + 1)) { + CVar3 = (Console)(GHIDRA_INT(CVar2) + 1); if (*(char *)cursor != ' ') { CVar3 = CVar2; } @@ -492,9 +492,9 @@ void Console::submit_input(int unused) if (CVar2 != this[0xb]) { ((std::string *)(acStackY_f0 + 0x84))->std::string::string((void *)inputText); line._buf[8] = (char)in_stack_ffffff9c; - line._buf[9] = (char)((uint)in_stack_ffffff9c >> 8); - line._buf[10] = (char)((uint)in_stack_ffffff9c >> 0x10); - line._buf[0xb] = (char)((uint)in_stack_ffffff9c >> 0x18); + line._buf[9] = (char)(GHIDRA_UINT(in_stack_ffffff9c) >> 8); + line._buf[10] = (char)(GHIDRA_UINT(in_stack_ffffff9c) >> 0x10); + line._buf[0xb] = (char)(GHIDRA_UINT(in_stack_ffffff9c) >> 0x18); line._buf[0] = (char)in_stack_ffffff94; line._buf[1] = (char)((ulonglong)in_stack_ffffff94 >> 8); line._buf[2] = (char)((ulonglong)in_stack_ffffff94 >> 0x10); @@ -504,31 +504,31 @@ void Console::submit_input(int unused) line._buf[6] = (char)((ulonglong)in_stack_ffffff94 >> 0x30); line._buf[7] = (char)((ulonglong)in_stack_ffffff94 >> 0x38); line._buf[0xc] = (char)in_stack_ffffffa0; - line._buf[0xd] = (char)((uint)in_stack_ffffffa0 >> 8); - line._buf[0xe] = (char)((uint)in_stack_ffffffa0 >> 0x10); - line._buf[0xf] = (char)((uint)in_stack_ffffffa0 >> 0x18); + line._buf[0xd] = (char)(GHIDRA_UINT(in_stack_ffffffa0) >> 8); + line._buf[0xe] = (char)(GHIDRA_UINT(in_stack_ffffffa0) >> 0x10); + line._buf[0xf] = (char)(GHIDRA_UINT(in_stack_ffffffa0) >> 0x18); line._size = in_stack_ffffffa4; line._capacity = in_stack_ffffffa8; history_push(this,line); local_14 = 0; - command._0_4_ = *(undefined4 *)inputText; + (*(undefined4 *)((char *)&(command) + 0x0)) = *(undefined4 *)inputText; cursor = this[8]; inputEnd = this[9]; CVar2 = this[10]; local_2c = *(undefined8 *)(this + 0xb); *(undefined4 *)inputText = 0; - this[8] = (Console)command._4_4_; + this[8] = (*(undefined4 *)((char *)&((Console)command) + 0x4)); this[9] = CStack_34; this[10] = CStack_30; *(undefined8 *)(this + 0xb) = 0xf00000000; this[0xe] = this[0xd]; - if (0xf < (uint)this[0xc]) { + if (0xf < GHIDRA_UINT(this[0xc])) { inputText = *(Console *)inputText; } - this[0x42] = (Console)((int)*inputSize + (int)inputText); + this[0x42] = (Console)(GHIDRA_INT(*inputSize) + GHIDRA_INT(inputText)); manager = g_manager; netPlayers = g_manager->_netplayManager; - command._4_4_ = cursor; + (*(undefined4 *)((char *)&(command) + 0x4)) = cursor; CStack_34 = inputEnd; CStack_30 = CVar2; if (netPlayers == *(NetplayManager *)(g_manager + 1)) { @@ -536,7 +536,7 @@ void Console::submit_input(int unused) } else { uVar4 = 0; - if ((int)*(NetplayManager *)(g_manager + 1) - (int)netPlayers >> 2 != 0) { + if (GHIDRA_INT(*(NetplayManager *)(g_manager + 1)) - GHIDRA_INT(netPlayers) >> 2 != 0) { do { iVar1 = *(int *)((char *)netPlayers + uVar4 * 4); isLocalPlayer = (**(code **)(*(int *)(iVar1 + 0x370) + 0x14))(); @@ -553,11 +553,11 @@ void Console::submit_input(int unused) } uVar4 = uVar4 + 1; netPlayers = manager->_netplayManager; - } while (uVar4 < (uint)(*(int *)(manager + 1) - (int)netPlayers >> 2)); + } while (uVar4 < GHIDRA_UINT((*(int *)(manager + 1) - GHIDRA_INT(netPlayers) >> 2))); } } if ((this[0x14] == (Console)0x0) || - (*(int *)(*(int *)((int)this[0x11] + ((int)this[0x12] - 1U & (uint)this[0x13]) * 4) + 0x10) + (*(int *)(*(int *)(GHIDRA_INT(this[0x11]) + (GHIDRA_INT(this[0x12]) - 1U & GHIDRA_UINT(this[0x13])) * 4) + 0x10) != 0)) { inputText = (Console)0x0; } @@ -568,11 +568,11 @@ void Console::submit_input(int unused) this[3] = (Console)0x0; if (0xf < uStack_28) { uVar4 = uStack_28 + 1; - ptr = (void *)command._0_4_; + ptr = (*(undefined4 *)((char *)&((void *)command) + 0x0)); if (0xfff < uVar4) { - ptr = *(void **)(command._0_4_ + -4); + ptr = *(void **)((*(undefined4 *)((char *)&(command) + 0x0)) + -4); uVar4 = uStack_28 + 0x24; - if (0x1f < (uint)(command._0_4_ + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(command) + 0x0)) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -690,7 +690,7 @@ void Console::FillOmnicomplete() local_8 = 0xffffffff; puStack_c = &LAB_00af8e99; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(roomIdText + 0x20); + local_14 = __security_cookie ^ GHIDRA_UINT((roomIdText + 0x20)); ExceptionList = &local_10; cleanupFlags = 0; local_1c4 = *(ItemConfig_Item **)ThreadLocalStoragePointer; @@ -700,133 +700,133 @@ void Console::FillOmnicomplete() _DAT_00c5cab8 = 0x77617073; DAT_00c5cabc = 0x6e; DAT_00c5cae8 = 's'; - DAT_00c5cae8_1._0_1_ = 't'; - DAT_00c5cae8_1._1_1_ = 'a'; - DAT_00c5cae8_1._2_1_ = 'g'; + (*(undefined1 *)((char *)&(DAT_00c5cae8_1) + 0x0)) = 't'; + (*(undefined1 *)((char *)&(DAT_00c5cae8_1) + 0x1)) = 'a'; + (*(undefined1 *)((char *)&(DAT_00c5cae8_1) + 0x2)) = 'g'; DAT_00c5caec = 0x65; _DAT_00c5cb00 = 0x7761707364697267; DAT_00c5cb08 = 0x6e; DAT_00c5cb18 = 'd'; - DAT_00c5cb18_1._0_1_ = 'e'; - DAT_00c5cb18_1._1_1_ = 'b'; - DAT_00c5cb18_1._2_1_ = 'u'; + (*(undefined1 *)((char *)&(DAT_00c5cb18_1) + 0x0)) = 'e'; + (*(undefined1 *)((char *)&(DAT_00c5cb18_1) + 0x1)) = 'b'; + (*(undefined1 *)((char *)&(DAT_00c5cb18_1) + 0x2)) = 'u'; DAT_00c5cb1c = 0x67; DAT_00c5cb30 = 'g'; - DAT_00c5cb30_1._0_1_ = 'i'; - DAT_00c5cb30_1._1_1_ = 'v'; - DAT_00c5cb30_1._2_1_ = 'e'; + (*(undefined1 *)((char *)&(DAT_00c5cb30_1) + 0x0)) = 'i'; + (*(undefined1 *)((char *)&(DAT_00c5cb30_1) + 0x1)) = 'v'; + (*(undefined1 *)((char *)&(DAT_00c5cb30_1) + 0x2)) = 'e'; DAT_00c5cb34 = 'i'; - DAT_00c5cb34_1._0_1_ = 't'; - DAT_00c5cb34_1._1_1_ = 'e'; - DAT_00c5cb34_1._2_1_ = 'm'; + (*(undefined1 *)((char *)&(DAT_00c5cb34_1) + 0x0)) = 't'; + (*(undefined1 *)((char *)&(DAT_00c5cb34_1) + 0x1)) = 'e'; + (*(undefined1 *)((char *)&(DAT_00c5cb34_1) + 0x2)) = 'm'; DAT_00c5cb48 = 'r'; - DAT_00c5cb48_1._0_1_ = 'e'; - DAT_00c5cb48_1._1_1_ = 'm'; - DAT_00c5cb48_1._2_1_ = 'o'; + (*(undefined1 *)((char *)&(DAT_00c5cb48_1) + 0x0)) = 'e'; + (*(undefined1 *)((char *)&(DAT_00c5cb48_1) + 0x1)) = 'm'; + (*(undefined1 *)((char *)&(DAT_00c5cb48_1) + 0x2)) = 'o'; _DAT_00c5cb4c = 0x6576; local_8 = 6; ((std::string *)(&DAT_00c5cb60))->std::string::assign((byte *)"costumetest",0xb); - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; _DAT_00c5cb88 = 0; _DAT_00c5cb8c = 0xf; _DAT_00c5cb78 = 0; ((std::string *)(&DAT_00c5cb78))->std::string::assign(&DAT_00b65858,4); - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; _DAT_00c5cba0 = 0; _DAT_00c5cba4 = 0xf; _DAT_00c5cb90 = 0; ((std::string *)(&DAT_00c5cb90))->std::string::assign((byte *)"restart",7); - local_8._0_1_ = 9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; _DAT_00c5cbb8 = 0; _DAT_00c5cbbc = 0xf; _DAT_00c5cba8 = 0; ((std::string *)(&DAT_00c5cba8))->std::string::assign((byte *)"listcollectibles",0x10); - local_8._0_1_ = 10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 10; _DAT_00c5cbd0 = 0; _DAT_00c5cbd4 = 0xf; _DAT_00c5cbc0 = 0; ((std::string *)(&DAT_00c5cbc0))->std::string::assign((byte *)"repeat",6); - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; _DAT_00c5cbe8 = 0; _DAT_00c5cbec = 0xf; _DAT_00c5cbd8 = 0; ((std::string *)(&DAT_00c5cbd8))->std::string::assign((byte *)"clearseeds",10); - local_8._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc; _DAT_00c5cc00 = 0; _DAT_00c5cc04 = 0xf; _DAT_00c5cbf0 = 0; ((std::string *)(&DAT_00c5cbf0))->std::string::assign(&DAT_00b658e4,4); - local_8._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xd; _DAT_00c5cc18 = 0; _DAT_00c5cc1c = 0xf; _DAT_00c5cc08 = 0; ((std::string *)(&DAT_00c5cc08))->std::string::assign((byte *)"challenge",9); - local_8._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xe; _DAT_00c5cc30 = 0; _DAT_00c5cc34 = 0xf; _DAT_00c5cc20 = 0; ((std::string *)(&DAT_00c5cc20))->std::string::assign((byte *)"combo",5); - local_8._0_1_ = 0xf; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xf; _DAT_00c5cc48 = 0; _DAT_00c5cc4c = 0xf; _DAT_00c5cc38 = 0; ((std::string *)(&DAT_00c5cc38))->std::string::assign((byte *)"cutscene",8); - local_8._0_1_ = 0x10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x10; _DAT_00c5cc60 = 0; _DAT_00c5cc64 = 0xf; _DAT_00c5cc50 = 0; ((std::string *)(&DAT_00c5cc50))->std::string::assign((byte *)"clearcache",10); - local_8._0_1_ = 0x11; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x11; _DAT_00c5cc78 = 0; _DAT_00c5cc7c = 0xf; _DAT_00c5cc68 = 0; ((std::string *)(&DAT_00c5cc68))->std::string::assign((byte *)"macro",5); - local_8._0_1_ = 0x12; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x12; _DAT_00c5cc90 = 0; _DAT_00c5cc94 = 0xf; _DAT_00c5cc80 = 0; ((std::string *)(&DAT_00c5cc80))->std::string::assign((byte *)"playsfx",7); - local_8._0_1_ = 0x13; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x13; _DAT_00c5cca8 = 0; _DAT_00c5ccac = 0xf; _DAT_00c5cc98 = 0; ((std::string *)(&DAT_00c5cc98))->std::string::assign(&DAT_00b6591c,4); - local_8._0_1_ = 0x14; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x14; _DAT_00c5ccc0 = 0; _DAT_00c5ccc4 = 0xf; _DAT_00c5ccb0 = 0; ((std::string *)(&DAT_00c5ccb0))->std::string::assign((byte *)"profstop",8); - local_8._0_1_ = 0x15; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x15; _DAT_00c5ccd8 = 0; _DAT_00c5ccdc = 0xf; _DAT_00c5ccc8 = 0; ((std::string *)(&DAT_00c5ccc8))->std::string::assign((byte *)"curse",5); - local_8._0_1_ = 0x16; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x16; _DAT_00c5ccf0 = 0; _DAT_00c5ccf4 = 0xf; _DAT_00c5cce0 = 0; ((std::string *)(&DAT_00c5cce0))->std::string::assign((byte *)"reseed",6); - local_8._0_1_ = 0x17; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x17; _DAT_00c5cd08 = 0; _DAT_00c5cd0c = 0xf; _DAT_00c5ccf8 = 0; ((std::string *)(&DAT_00c5ccf8))->std::string::assign(&DAT_00b658fc,4); - local_8._0_1_ = 0x18; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x18; _DAT_00c5cd20 = 0; _DAT_00c5cd24 = 0xf; _DAT_00c5cd10 = 0; ((std::string *)(&DAT_00c5cd10))->std::string::assign(&DAT_00b65904,4); - local_8._0_1_ = 0x19; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x19; _DAT_00c5cd38 = 0; _DAT_00c5cd3c = 0xf; _DAT_00c5cd28 = 0; ((std::string *)(&DAT_00c5cd28))->std::string::assign((byte *)"clear",5); - local_8._0_1_ = 0x1a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1a; _DAT_00c5cd50 = 0; _DAT_00c5cd54 = 0xf; _DAT_00c5cd40 = 0; ((std::string *)(&DAT_00c5cd40))->std::string::assign((byte *)"metro",5); - local_8 = CONCAT31(local_8._1_3_,0x1b); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x1b); _DAT_00c5cd68 = 0; _DAT_00c5cd6c = 0xf; _DAT_00c5cd58 = 0; @@ -841,16 +841,16 @@ void Console::FillOmnicomplete() tmpStringCapacity = 0xf; tmpString[0] = (SimpleString)0x0; ((std::string *)((char *)tmpString))->std::string::assign((byte *)"luarun",6); - local_8._0_1_ = 0x1d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1d; list_string_push_back_move(tmpString); - local_8._0_1_ = 0x1c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1c; if (0xf < tmpStringCapacity) { uVar12 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar12) { - freeBlock = *(SimpleString *)((int)tmpString[0] + -4); + freeBlock = *(SimpleString *)(GHIDRA_INT(tmpString[0]) + -4); uVar12 = tmpStringCapacity + 0x24; - if (0x1f < ((int)tmpString[0] - (int)freeBlock) - 4U) goto LAB_006874b3; + if (0x1f < (GHIDRA_INT(tmpString[0]) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_006874b3; } operator_delete((void *)freeBlock,uVar12); } @@ -858,16 +858,16 @@ void Console::FillOmnicomplete() tmpStringCapacity = 0xf; tmpString[0] = (SimpleString)0x0; ((std::string *)((char *)tmpString))->std::string::assign((byte *)"luamem",6); - local_8._0_1_ = 0x1e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1e; list_string_push_back_move(tmpString); - local_8._0_1_ = 0x1c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1c; if (0xf < tmpStringCapacity) { uVar12 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar12) { - freeBlock = *(SimpleString *)((int)tmpString[0] + -4); + freeBlock = *(SimpleString *)(GHIDRA_INT(tmpString[0]) + -4); uVar12 = tmpStringCapacity + 0x24; - if (0x1f < ((int)tmpString[0] - (int)freeBlock) - 4U) goto LAB_006874b3; + if (0x1f < (GHIDRA_INT(tmpString[0]) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_006874b3; } operator_delete((void *)freeBlock,uVar12); } @@ -875,16 +875,16 @@ void Console::FillOmnicomplete() tmpStringCapacity = 0xf; tmpString[0] = (SimpleString)0x0; ((std::string *)((char *)tmpString))->std::string::assign((byte *)"luamod",6); - local_8._0_1_ = 0x1f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1f; list_string_push_back_move(tmpString); - local_8._0_1_ = 0x1c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1c; if (0xf < tmpStringCapacity) { uVar12 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar12) { - freeBlock = *(SimpleString *)((int)tmpString[0] + -4); + freeBlock = *(SimpleString *)(GHIDRA_INT(tmpString[0]) + -4); uVar12 = tmpStringCapacity + 0x24; - if (0x1f < ((int)tmpString[0] - (int)freeBlock) - 4U) goto LAB_006874b3; + if (0x1f < (GHIDRA_INT(tmpString[0]) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_006874b3; } operator_delete((void *)freeBlock,uVar12); } @@ -892,16 +892,16 @@ void Console::FillOmnicomplete() tmpStringCapacity = 0xf; tmpString[0] = (SimpleString)0x0; ((std::string *)((char *)tmpString))->std::string::assign((byte *)"reloadshaders",0xd); - local_8._0_1_ = 0x20; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x20; list_string_push_back_move(tmpString); - local_8._0_1_ = 0x1c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1c; if (0xf < tmpStringCapacity) { uVar12 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar12) { - freeBlock = *(SimpleString *)((int)tmpString[0] + -4); + freeBlock = *(SimpleString *)(GHIDRA_INT(tmpString[0]) + -4); uVar12 = tmpStringCapacity + 0x24; - if (0x1f < ((int)tmpString[0] - (int)freeBlock) - 4U) goto LAB_006874b3; + if (0x1f < (GHIDRA_INT(tmpString[0]) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_006874b3; } operator_delete((void *)freeBlock,uVar12); } @@ -909,16 +909,16 @@ void Console::FillOmnicomplete() tmpStringCapacity = 0xf; tmpString[0] = (SimpleString)0x0; ((std::string *)((char *)tmpString))->std::string::assign((byte *)"reloadfx",8); - local_8._0_1_ = 0x21; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x21; list_string_push_back_move(tmpString); - local_8._0_1_ = 0x1c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1c; if (0xf < tmpStringCapacity) { uVar12 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar12) { - freeBlock = *(SimpleString *)((int)tmpString[0] + -4); + freeBlock = *(SimpleString *)(GHIDRA_INT(tmpString[0]) + -4); uVar12 = tmpStringCapacity + 0x24; - if (0x1f < ((int)tmpString[0] - (int)freeBlock) - 4U) goto LAB_006874b3; + if (0x1f < (GHIDRA_INT(tmpString[0]) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_006874b3; } operator_delete((void *)freeBlock,uVar12); } @@ -926,28 +926,28 @@ void Console::FillOmnicomplete() tmpStringCapacity = 0xf; tmpString[0] = (SimpleString)0x0; ((std::string *)((char *)tmpString))->std::string::assign(&DAT_00b659d8,3); - local_8._0_1_ = 0x22; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x22; list_string_push_back_move(tmpString); - local_8._0_1_ = 0x1c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1c; if (0xf < tmpStringCapacity) { uVar12 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar12) { - freeBlock = *(SimpleString *)((int)tmpString[0] + -4); + freeBlock = *(SimpleString *)(GHIDRA_INT(tmpString[0]) + -4); uVar12 = tmpStringCapacity + 0x24; - if (0x1f < ((int)tmpString[0] - (int)freeBlock) - 4U) goto LAB_006874b3; + if (0x1f < (GHIDRA_INT(tmpString[0]) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_006874b3; } operator_delete((void *)freeBlock,uVar12); } roomTypeNames = (int *)0x0; roomTypeNameCount = 0; roomTypeNames = operator_new(0x20); - *roomTypeNames = (int)roomTypeNames; - roomTypeNames[1] = (int)roomTypeNames; - local_8._0_1_ = 0x23; + *roomTypeNames = GHIDRA_INT(roomTypeNames); + roomTypeNames[1] = GHIDRA_INT(roomTypeNames); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x23; uVar12 = 1; do { - if (((int)uVar12 < 0) || (0x1d < uVar12)) { + if ((GHIDRA_INT(uVar12) < 0) || (0x1d < uVar12)) { pbVar11 = &s_empty; } else { @@ -962,15 +962,15 @@ void Console::FillOmnicomplete() bVar1 = *nameEnd; nameEnd = nameEnd + 1; } while (bVar1 != 0); - ((std::string *)((char *)tmpString))->std::string::assign(pbVar11,(int)nameEnd - (int)(pbVar11 + 1)); + ((std::string *)((char *)tmpString))->std::string::assign(pbVar11,GHIDRA_INT(nameEnd) - GHIDRA_INT((pbVar11 + 1))); listNode = roomTypeNames; - local_8 = CONCAT31(local_8._1_3_,0x24); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x24); if (roomTypeNameCount == 0x7ffffff) { /* WARNING: Subroutine does not return */ std::_Xlength_error("list too long"); } local_1ec = &roomTypeNames; - local_8._0_1_ = 0x25; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x25; local_1e8 = 0; newNode = operator_new(0x20); FUN_00417100(tmpString); @@ -978,17 +978,17 @@ void Console::FillOmnicomplete() puVar6 = (undefined4 *)listNode[1]; *newNode = listNode; newNode[1] = puVar6; - local_8._0_1_ = 0x23; - listNode[1] = (int)newNode; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x23; + listNode[1] = GHIDRA_INT(newNode); local_1e8 = 0; *puVar6 = newNode; if (0xf < tmpStringCapacity) { uVar13 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar13) { - freeBlock = *(SimpleString *)((int)tmpString[0] + -4); + freeBlock = *(SimpleString *)(GHIDRA_INT(tmpString[0]) + -4); uVar13 = tmpStringCapacity + 0x24; - if (0x1f < ((int)tmpString[0] - (int)freeBlock) - 4U) goto LAB_006874b3; + if (0x1f < (GHIDRA_INT(tmpString[0]) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_006874b3; } operator_delete((void *)freeBlock,uVar13); } @@ -999,144 +999,144 @@ void Console::FillOmnicomplete() if ((*(int *)((local_1c4->name)._buf + 4) < DAT_00c80254) && (_Init_thread_header(&DAT_00c80254), DAT_00c80254 == -1)) { ((std::string *)(&DAT_00c5cd70))->std::string::assign((byte *)"1000:Rock",9); - local_8._0_1_ = 0x26; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x26; _DAT_00c5cd98 = 0; _DAT_00c5cd9c = 0xf; _DAT_00c5cd88 = 0; ((std::string *)(&DAT_00c5cd88))->std::string::assign((byte *)"1001:Rock Bomb",0xe); - local_8._0_1_ = 0x27; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x27; _DAT_00c5cdb0 = 0; _DAT_00c5cdb4 = 0xf; _DAT_00c5cda0 = 0; ((std::string *)(&DAT_00c5cda0))->std::string::assign((byte *)"1002:Alt Rock",0xd); - local_8._0_1_ = 0x28; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x28; _DAT_00c5cdc8 = 0; _DAT_00c5cdcc = 0xf; _DAT_00c5cdb8 = 0; ((std::string *)(&DAT_00c5cdb8))->std::string::assign((byte *)"1003:Tainted Rock",0x11); - local_8._0_1_ = 0x29; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x29; _DAT_00c5cde0 = 0; _DAT_00c5cde4 = 0xf; _DAT_00c5cdd0 = 0; ((std::string *)(&DAT_00c5cdd0))->std::string::assign((byte *)"1004:Super Tainted Rock",0x17); - local_8._0_1_ = 0x2a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2a; _DAT_00c5cdf8 = 0; _DAT_00c5cdfc = 0xf; _DAT_00c5cde8 = 0; ((std::string *)(&DAT_00c5cde8))->std::string::assign((byte *)"1300:TNT",8); - local_8._0_1_ = 0x2b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2b; _DAT_00c5ce10 = 0; _DAT_00c5ce14 = 0xf; _DAT_00c5ce00 = 0; ((std::string *)(&DAT_00c5ce00))->std::string::assign((byte *)"1400:Fireplace1498:White Poop",0x1d); - local_8._0_1_ = 0x2c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2c; _DAT_00c5ce28 = 0; _DAT_00c5ce2c = 0xf; _DAT_00c5ce18 = 0; ((std::string *)(&DAT_00c5ce18))->std::string::assign((byte *)"1497:Black Poop",0xf); - local_8._0_1_ = 0x2d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2d; _DAT_00c5ce40 = 0; _DAT_00c5ce44 = 0xf; _DAT_00c5ce30 = 0; ((std::string *)(&DAT_00c5ce30))->std::string::assign((byte *)"1496:Golden Poop",0x10); - local_8._0_1_ = 0x2e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2e; _DAT_00c5ce58 = 0; _DAT_00c5ce5c = 0xf; _DAT_00c5ce48 = 0; ((std::string *)(&DAT_00c5ce48))->std::string::assign((byte *)"1495:Chunky Poop",0x10); - local_8._0_1_ = 0x2f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2f; _DAT_00c5ce70 = 0; _DAT_00c5ce74 = 0xf; _DAT_00c5ce60 = 0; ((std::string *)(&DAT_00c5ce60))->std::string::assign((byte *)"1494:Rainbow Poop",0x11); - local_8._0_1_ = 0x30; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x30; _DAT_00c5ce88 = 0; _DAT_00c5ce8c = 0xf; _DAT_00c5ce78 = 0; ((std::string *)(&DAT_00c5ce78))->std::string::assign((byte *)"1490:Red Poop",0xd); - local_8._0_1_ = 0x31; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x31; _DAT_00c5cea0 = 0; _DAT_00c5cea4 = 0xf; _DAT_00c5ce90 = 0; ((std::string *)(&DAT_00c5ce90))->std::string::assign((byte *)"1500:Brown Poop",0xf); - local_8._0_1_ = 0x32; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x32; _DAT_00c5ceb8 = 0; _DAT_00c5cebc = 0xf; _DAT_00c5cea8 = 0; ((std::string *)(&DAT_00c5cea8))->std::string::assign((byte *)"1900:Block",10); - local_8._0_1_ = 0x33; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x33; _DAT_00c5ced0 = 0; _DAT_00c5ced4 = 0xf; _DAT_00c5cec0 = 0; ((std::string *)(&DAT_00c5cec0))->std::string::assign((byte *)"1930:Spikes",0xb); - local_8._0_1_ = 0x34; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x34; _DAT_00c5cee8 = 0; _DAT_00c5ceec = 0xf; _DAT_00c5ced8 = 0; ((std::string *)(&DAT_00c5ced8))->std::string::assign((byte *)"1931:On/Off Spikes",0x12); - local_8._0_1_ = 0x35; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x35; _DAT_00c5cf00 = 0; _DAT_00c5cf04 = 0xf; _DAT_00c5cef0 = 0; ((std::string *)(&DAT_00c5cef0))->std::string::assign((byte *)"1940:Spider Web",0xf); - local_8._0_1_ = 0x36; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x36; _DAT_00c5cf18 = 0; _DAT_00c5cf1c = 0xf; _DAT_00c5cf08 = 0; ((std::string *)(&DAT_00c5cf08))->std::string::assign((byte *)"3000:Pit",8); - local_8._0_1_ = 0x37; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x37; _DAT_00c5cf30 = 0; _DAT_00c5cf34 = 0xf; _DAT_00c5cf20 = 0; ((std::string *)(&DAT_00c5cf20))->std::string::assign((byte *)"4000:Lock",9); - local_8._0_1_ = 0x38; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x38; _DAT_00c5cf48 = 0; _DAT_00c5cf4c = 0xf; _DAT_00c5cf38 = 0; ((std::string *)(&DAT_00c5cf38))->std::string::assign((byte *)"4500:Pressure Plate",0x13); - local_8._0_1_ = 0x39; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x39; _DAT_00c5cf60 = 0; _DAT_00c5cf64 = 0xf; _DAT_00c5cf50 = 0; ((std::string *)(&DAT_00c5cf50))->std::string::assign((byte *)"4500.1:Reward Plate",0x13); - local_8._0_1_ = 0x3a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x3a; _DAT_00c5cf78 = 0; _DAT_00c5cf7c = 0xf; _DAT_00c5cf68 = 0; ((std::string *)(&DAT_00c5cf68))->std::string::assign((byte *)"5000:Devil Statue",0x11); - local_8._0_1_ = 0x3b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x3b; _DAT_00c5cf90 = 0; _DAT_00c5cf94 = 0xf; _DAT_00c5cf80 = 0; ((std::string *)(&DAT_00c5cf80))->std::string::assign((byte *)"5001:Angel Statue",0x11); - local_8._0_1_ = 0x3c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x3c; _DAT_00c5cfa8 = 0; _DAT_00c5cfac = 0xf; _DAT_00c5cf98 = 0; ((std::string *)(&DAT_00c5cf98))->std::string::assign((byte *)"9000:Trap Door",0xe); - local_8._0_1_ = 0x3d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x3d; _DAT_00c5cfc0 = 0; _DAT_00c5cfc4 = 0xf; _DAT_00c5cfb0 = 0; ((std::string *)(&DAT_00c5cfb0))->std::string::assign((byte *)"9100:Staircase",0xe); - local_8._0_1_ = 0x3e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x3e; _DAT_00c5cfd8 = 0; _DAT_00c5cfdc = 0xf; _DAT_00c5cfc8 = 0; ((std::string *)(&DAT_00c5cfc8))->std::string::assign((byte *)"10000:Gravity",0xd); - local_8._0_1_ = 0x23; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x23; _atexit(FUN_00b15670); _Init_thread_footer(&DAT_00c80254); } FUN_00693f00(&DAT_00c5cd70,&DAT_00c5cfe0); - local_8._0_1_ = 0x3f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x3f; uVar17 = 0x20; debugFlagNames = (int *)0x0; debugFlagNameCount = 0; debugFlagNames = operator_new(0x20); - *debugFlagNames = (int)debugFlagNames; - debugFlagNames[1] = (int)debugFlagNames; - local_8._0_1_ = 0x40; + *debugFlagNames = GHIDRA_INT(debugFlagNames); + debugFlagNames[1] = GHIDRA_INT(debugFlagNames); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x40; std::list::resize(uVar17); sprintf_s(debugFlagText,0x20,(byte *)"%d:Entity Positions"); pbVar11 = debugFlagText; @@ -1147,17 +1147,17 @@ void Console::FillOmnicomplete() bVar1 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar1 != 0); - ((std::string *)((char *)tmpString))->std::string::assign(debugFlagText,(int)pbVar11 - (int)(debugFlagText + 1)); - local_8._0_1_ = 0x41; + ((std::string *)((char *)tmpString))->std::string::assign(debugFlagText,GHIDRA_INT(pbVar11) - GHIDRA_INT((debugFlagText + 1))); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x41; list_string_push_back_move(tmpString); - local_8._0_1_ = 0x40; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x40; if (0xf < tmpStringCapacity) { uVar12 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar12) { - freeBlock = *(SimpleString *)((int)tmpString[0] + -4); + freeBlock = *(SimpleString *)(GHIDRA_INT(tmpString[0]) + -4); uVar12 = tmpStringCapacity + 0x24; - if (0x1f < ((int)tmpString[0] - (int)freeBlock) - 4U) goto LAB_006874b3; + if (0x1f < (GHIDRA_INT(tmpString[0]) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_006874b3; } operator_delete((void *)freeBlock,uVar12); } @@ -1170,17 +1170,17 @@ void Console::FillOmnicomplete() bVar1 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar1 != 0); - ((std::string *)((char *)tmpString))->std::string::assign(debugFlagText,(int)pbVar11 - (int)(debugFlagText + 1)); - local_8._0_1_ = 0x42; + ((std::string *)((char *)tmpString))->std::string::assign(debugFlagText,GHIDRA_INT(pbVar11) - GHIDRA_INT((debugFlagText + 1))); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x42; list_string_push_back_move(tmpString); - local_8._0_1_ = 0x40; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x40; if (0xf < tmpStringCapacity) { uVar12 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar12) { - freeBlock = *(SimpleString *)((int)tmpString[0] + -4); + freeBlock = *(SimpleString *)(GHIDRA_INT(tmpString[0]) + -4); uVar12 = tmpStringCapacity + 0x24; - if (0x1f < ((int)tmpString[0] - (int)freeBlock) - 4U) goto LAB_006874b3; + if (0x1f < (GHIDRA_INT(tmpString[0]) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_006874b3; } operator_delete((void *)freeBlock,uVar12); } @@ -1193,17 +1193,17 @@ void Console::FillOmnicomplete() bVar1 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar1 != 0); - ((std::string *)((char *)tmpString))->std::string::assign(debugFlagText,(int)pbVar11 - (int)(debugFlagText + 1)); - local_8._0_1_ = 0x43; + ((std::string *)((char *)tmpString))->std::string::assign(debugFlagText,GHIDRA_INT(pbVar11) - GHIDRA_INT((debugFlagText + 1))); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x43; list_string_push_back_move(tmpString); - local_8._0_1_ = 0x40; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x40; if (0xf < tmpStringCapacity) { uVar12 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar12) { - freeBlock = *(SimpleString *)((int)tmpString[0] + -4); + freeBlock = *(SimpleString *)(GHIDRA_INT(tmpString[0]) + -4); uVar12 = tmpStringCapacity + 0x24; - if (0x1f < ((int)tmpString[0] - (int)freeBlock) - 4U) goto LAB_006874b3; + if (0x1f < (GHIDRA_INT(tmpString[0]) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_006874b3; } operator_delete((void *)freeBlock,uVar12); } @@ -1216,17 +1216,17 @@ void Console::FillOmnicomplete() bVar1 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar1 != 0); - ((std::string *)((char *)tmpString))->std::string::assign(debugFlagText,(int)pbVar11 - (int)(debugFlagText + 1)); - local_8._0_1_ = 0x44; + ((std::string *)((char *)tmpString))->std::string::assign(debugFlagText,GHIDRA_INT(pbVar11) - GHIDRA_INT((debugFlagText + 1))); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x44; list_string_push_back_move(tmpString); - local_8._0_1_ = 0x40; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x40; if (0xf < tmpStringCapacity) { uVar12 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar12) { - freeBlock = *(SimpleString *)((int)tmpString[0] + -4); + freeBlock = *(SimpleString *)(GHIDRA_INT(tmpString[0]) + -4); uVar12 = tmpStringCapacity + 0x24; - if (0x1f < ((int)tmpString[0] - (int)freeBlock) - 4U) { + if (0x1f < (GHIDRA_INT(tmpString[0]) - GHIDRA_INT(freeBlock)) - 4U) { LAB_006874b3: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1243,94 +1243,94 @@ LAB_006874b3: bVar1 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar1 != 0); - ((std::string *)((char *)tmpString))->std::string::assign(debugFlagText,(int)pbVar11 - (int)(debugFlagText + 1)); - local_8._0_1_ = 0x45; + ((std::string *)((char *)tmpString))->std::string::assign(debugFlagText,GHIDRA_INT(pbVar11) - GHIDRA_INT((debugFlagText + 1))); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x45; list_string_push_back_move(tmpString); - local_8._0_1_ = 0x40; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x40; if (0xf < tmpStringCapacity) { FUN_0040d000(tmpString[0],tmpStringCapacity + 1); } sprintf_s(debugFlagText,0x20,(byte *)"%d:Show Hitspheres"); ((std::string *)((char *)entryText))->std::string::string_from_cstr(debugFlagText); - local_8._0_1_ = 0x46; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x46; list_string_push_back_move(entryText); - local_8._0_1_ = 0x40; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x40; ((std::string *)((char *)entryText))->std::string::_Tidy_deallocate(); sprintf_s(debugFlagText,0x20,(byte *)"%d:Show Damage Values"); ((std::string *)((char *)entryText))->std::string::string_from_cstr(debugFlagText); - local_8._0_1_ = 0x47; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x47; list_string_push_back_move(entryText); - local_8._0_1_ = 0x40; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x40; ((std::string *)((char *)entryText))->std::string::_Tidy_deallocate(); sprintf_s(debugFlagText,0x20,(byte *)"%d:Infinite Item Charges"); ((std::string *)((char *)entryText))->std::string::string_from_cstr(debugFlagText); - local_8._0_1_ = 0x48; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x48; list_string_push_back_move(entryText); - local_8._0_1_ = 0x40; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x40; ((std::string *)((char *)entryText))->std::string::_Tidy_deallocate(); sprintf_s(debugFlagText,0x20,(byte *)"%d:High Luck"); ((std::string *)((char *)entryText))->std::string::string_from_cstr(debugFlagText); - local_8._0_1_ = 0x49; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x49; list_string_push_back_move(entryText); - local_8._0_1_ = 0x40; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x40; ((std::string *)((char *)entryText))->std::string::_Tidy_deallocate(); sprintf_s(debugFlagText,0x20,(byte *)"%d:Quick Kill"); ((std::string *)((char *)entryText))->std::string::string_from_cstr(debugFlagText); - local_8._0_1_ = 0x4a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x4a; list_string_push_back_move(entryText); - local_8._0_1_ = 0x40; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x40; ((std::string *)((char *)entryText))->std::string::_Tidy_deallocate(); sprintf_s(debugFlagText,0x20,(byte *)"%d:Grid Info"); ((std::string *)((char *)entryText))->std::string::string_from_cstr(debugFlagText); - local_8._0_1_ = 0x4b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x4b; list_string_push_back_move(entryText); - local_8._0_1_ = 0x40; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x40; ((std::string *)((char *)entryText))->std::string::_Tidy_deallocate(); sprintf_s(debugFlagText,0x20,(byte *)"%d:Player Item Info"); ((std::string *)((char *)entryText))->std::string::string_from_cstr(debugFlagText); - local_8._0_1_ = 0x4c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x4c; list_string_push_back_move(entryText); - local_8._0_1_ = 0x40; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x40; ((std::string *)((char *)entryText))->std::string::_Tidy_deallocate(); sprintf_s(debugFlagText,0x20,(byte *)"%d:Show Grid Collision Points"); ((std::string *)((char *)entryText))->std::string::string_from_cstr(debugFlagText); - local_8._0_1_ = 0x4d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x4d; list_string_push_back_move(entryText); - local_8._0_1_ = 0x40; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x40; ((std::string *)((char *)entryText))->std::string::_Tidy_deallocate(); sprintf_s(debugFlagText,0x20,(byte *)"%d:Show Lua Memory Usage"); ((std::string *)((char *)entryText))->std::string::string_from_cstr(debugFlagText); - local_8._0_1_ = 0x4e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x4e; list_string_push_back_move(entryText); - local_8._0_1_ = 0x40; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x40; ((std::string *)((char *)entryText))->std::string::_Tidy_deallocate(); if ((*(int *)((pIVar14->name)._buf + 4) < DAT_00c80258) && (_Init_thread_header(&DAT_00c80258), DAT_00c80258 == -1)) { ((std::string *)(&DAT_00c80260))->std::string::string_from_cstr((byte *)"0:None"); - local_8._0_1_ = 0x4f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x4f; ((std::string *)(&DAT_00c80278))->std::string::string_from_cstr((byte *)"1:Darkness"); - local_8._0_1_ = 0x50; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x50; ((std::string *)(&DAT_00c80290))->std::string::string_from_cstr((byte *)"2:Labyrinth"); - local_8._0_1_ = 0x51; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x51; ((std::string *)(&DAT_00c802a8))->std::string::string_from_cstr((byte *)"4:Lost"); - local_8._0_1_ = 0x52; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x52; ((std::string *)(&DAT_00c802c0))->std::string::string_from_cstr((byte *)"8:Unknown"); - local_8._0_1_ = 0x53; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x53; ((std::string *)(&DAT_00c802d8))->std::string::string_from_cstr((byte *)"16:Cursed"); - local_8._0_1_ = 0x54; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x54; ((std::string *)(&DAT_00c802f0))->std::string::string_from_cstr((byte *)"32:Maze"); - local_8._0_1_ = 0x55; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x55; ((std::string *)(&DAT_00c80308))->std::string::string_from_cstr((byte *)"64:Blind"); - local_8._0_1_ = 0x40; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x40; _atexit(FUN_00b15650); _Init_thread_footer(&DAT_00c80258); } FUN_00693f00(&DAT_00c80260,&DAT_00c80320); - local_8._0_1_ = 0x56; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x56; ((std::string *)((char *)entryText))->std::string::string_from_cstr((byte *)"128:Giant"); - local_8._0_1_ = 0x57; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x57; list_string_push_back_move(entryText); - local_8._0_1_ = 0x56; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x56; ((std::string *)((char *)entryText))->std::string::_Tidy_deallocate(); uVar17 = extraout_ECX; if (*(int *)((pIVar14->name)._buf + 4) < DAT_00c80320) { @@ -1338,173 +1338,173 @@ LAB_006874b3: uVar17 = extraout_ECX_05; if (DAT_00c80320 == -1) { ((std::string *)(&DAT_00c80328))->std::string::string_from_cstr((byte *)"0: None"); - local_8._0_1_ = 0x58; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x58; ((std::string *)(&DAT_00c80340))->std::string::string_from_cstr((byte *)"1: Monstro"); - local_8._0_1_ = 0x59; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x59; ((std::string *)(&DAT_00c80358))->std::string::string_from_cstr((byte *)"2: LarryJr"); - local_8._0_1_ = 0x5a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x5a; ((std::string *)(&DAT_00c80370))->std::string::string_from_cstr((byte *)"3: Chub"); - local_8._0_1_ = 0x5b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x5b; ((std::string *)(&DAT_00c80388))->std::string::string_from_cstr((byte *)"4: Gurdy"); - local_8._0_1_ = 0x5c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x5c; ((std::string *)(&DAT_00c803a0))->std::string::string_from_cstr((byte *)"5: Monstro 2"); - local_8._0_1_ = 0x5d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x5d; ((std::string *)(&DAT_00c803b8))->std::string::string_from_cstr((byte *)"6: Scolex"); - local_8._0_1_ = 0x5e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x5e; ((std::string *)(&DAT_00c803d0))->std::string::string_from_cstr((byte *)"7: Famine"); - local_8._0_1_ = 0x5f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x5f; ((std::string *)(&DAT_00c803e8))->std::string::string_from_cstr((byte *)"8: Pestilence"); - local_8._0_1_ = 0x60; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x60; ((std::string *)(&DAT_00c80400))->std::string::string_from_cstr((byte *)"9: War"); - local_8._0_1_ = 0x61; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x61; ((std::string *)(&DAT_00c80418))->std::string::string_from_cstr((byte *)"10: Death"); - local_8._0_1_ = 0x62; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x62; ((std::string *)(&DAT_00c80430))->std::string::string_from_cstr((byte *)"11: Duke"); - local_8._0_1_ = 99; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 99; ((std::string *)(&DAT_00c80448))->std::string::string_from_cstr((byte *)"12: Peep"); - local_8._0_1_ = 100; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 100; ((std::string *)(&DAT_00c80460))->std::string::string_from_cstr((byte *)"13: Loki"); - local_8._0_1_ = 0x65; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x65; ((std::string *)(&DAT_00c80478))->std::string::string_from_cstr((byte *)"14: Blastocyst"); - local_8._0_1_ = 0x66; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x66; ((std::string *)(&DAT_00c80490))->std::string::string_from_cstr((byte *)"15: Gemini"); - local_8._0_1_ = 0x67; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x67; ((std::string *)(&DAT_00c804a8))->std::string::string_from_cstr((byte *)"16: Fistula"); - local_8._0_1_ = 0x68; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x68; ((std::string *)(&DAT_00c804c0))->std::string::string_from_cstr((byte *)"17: Gish"); - local_8._0_1_ = 0x69; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x69; ((std::string *)(&DAT_00c804d8))->std::string::string_from_cstr((byte *)"18: Steven"); - local_8._0_1_ = 0x6a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x6a; ((std::string *)(&DAT_00c804f0))->std::string::string_from_cstr((byte *)"19: Chad"); - local_8._0_1_ = 0x6b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x6b; ((std::string *)(&DAT_00c80508))->std::string::string_from_cstr((byte *)"20: Headless Horseman"); - local_8._0_1_ = 0x6c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x6c; ((std::string *)(&DAT_00c80520))->std::string::string_from_cstr((byte *)"21: Fallen"); - local_8._0_1_ = 0x6d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x6d; ((std::string *)(&DAT_00c80538))->std::string::string_from_cstr((byte *)"22: Hollow"); - local_8._0_1_ = 0x6e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x6e; ((std::string *)(&DAT_00c80550))->std::string::string_from_cstr((byte *)"23: Carrion queen"); - local_8._0_1_ = 0x6f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x6f; ((std::string *)(&DAT_00c80568))->std::string::string_from_cstr((byte *)"24: Gurdy Jr."); - local_8._0_1_ = 0x70; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x70; ((std::string *)(&DAT_00c80580))->std::string::string_from_cstr((byte *)"25: Husk"); - local_8._0_1_ = 0x71; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x71; ((std::string *)(&DAT_00c80598))->std::string::string_from_cstr((byte *)"26: Bloat"); - local_8._0_1_ = 0x72; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x72; ((std::string *)(&DAT_00c805b0))->std::string::string_from_cstr((byte *)"27: Lokii"); - local_8._0_1_ = 0x73; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x73; ((std::string *)(&DAT_00c805c8))->std::string::string_from_cstr((byte *)"28: Blighted Ovum"); - local_8._0_1_ = 0x74; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x74; ((std::string *)(&DAT_00c805e0))->std::string::string_from_cstr((byte *)"29: Teratoma"); - local_8._0_1_ = 0x75; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x75; ((std::string *)(&DAT_00c805f8))->std::string::string_from_cstr((byte *)"30: The Widow"); - local_8._0_1_ = 0x76; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x76; ((std::string *)(&DAT_00c80610))->std::string::string_from_cstr((byte *)"31: Mask of Infamy"); - local_8._0_1_ = 0x77; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x77; ((std::string *)(&DAT_00c80628))->std::string::string_from_cstr((byte *)"32: Wretched"); - local_8._0_1_ = 0x78; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x78; ((std::string *)(&DAT_00c80640))->std::string::string_from_cstr((byte *)"33: Pin"); - local_8._0_1_ = 0x79; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x79; ((std::string *)(&DAT_00c80658))->std::string::string_from_cstr((byte *)"34: Conquest"); - local_8._0_1_ = 0x7a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x7a; ((std::string *)(&DAT_00c80670))->std::string::string_from_cstr((byte *)"35: Daddy Long Legs"); - local_8._0_1_ = 0x7b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x7b; ((std::string *)(&DAT_00c80688))->std::string::string_from_cstr((byte *)"36: Triachnid"); - local_8._0_1_ = 0x7c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x7c; ((std::string *)(&DAT_00c806a0))->std::string::string_from_cstr((byte *)"37: The Haunt"); - local_8._0_1_ = 0x7d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x7d; ((std::string *)(&DAT_00c806b8))->std::string::string_from_cstr((byte *)"38: Dingle"); - local_8._0_1_ = 0x7e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x7e; ((std::string *)(&DAT_00c806d0))->std::string::string_from_cstr((byte *)"39: Mega Maw"); - local_8._0_1_ = 0x7f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x7f; ((std::string *)(&DAT_00c806e8))->std::string::string_from_cstr((byte *)"40: Gate"); - local_8._0_1_ = 0x80; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x80; ((std::string *)(&DAT_00c80700))->std::string::string_from_cstr((byte *)"41: Mega Fatty"); - local_8._0_1_ = 0x81; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x81; ((std::string *)(&DAT_00c80718))->std::string::string_from_cstr((byte *)"42: Cage"); - local_8._0_1_ = 0x82; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x82; ((std::string *)(&DAT_00c80730))->std::string::string_from_cstr((byte *)"43: Mama Gurdy"); - local_8._0_1_ = 0x83; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x83; ((std::string *)(&DAT_00c80748))->std::string::string_from_cstr((byte *)"44: Dark One"); - local_8._0_1_ = 0x84; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x84; ((std::string *)(&DAT_00c80760))->std::string::string_from_cstr((byte *)"45: Adversary"); - local_8._0_1_ = 0x85; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x85; ((std::string *)(&DAT_00c80778))->std::string::string_from_cstr((byte *)"46: Polycephalus"); - local_8._0_1_ = 0x86; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x86; ((std::string *)(&DAT_00c80790))->std::string::string_from_cstr((byte *)"47: Mr. Fred"); - local_8._0_1_ = 0x87; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x87; ((std::string *)(&DAT_00c807a8))->std::string::string_from_cstr((byte *)"48: Mega Satan"); - local_8._0_1_ = 0x88; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x88; ((std::string *)(&DAT_00c807c0))->std::string::string_from_cstr((byte *)"49: Gurgling"); - local_8._0_1_ = 0x89; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x89; ((std::string *)(&DAT_00c807d8))->std::string::string_from_cstr((byte *)"50: Stain"); - local_8._0_1_ = 0x8a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x8a; ((std::string *)(&DAT_00c807f0))->std::string::string_from_cstr((byte *)"51: Brownie"); - local_8._0_1_ = 0x8b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x8b; ((std::string *)(&DAT_00c80808))->std::string::string_from_cstr((byte *)"52: Forsaken"); - local_8._0_1_ = 0x8c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x8c; ((std::string *)(&DAT_00c80820))->std::string::string_from_cstr((byte *)"53: Little Horn"); - local_8._0_1_ = 0x8d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x8d; ((std::string *)(&DAT_00c80838))->std::string::string_from_cstr((byte *)"54: Rag Man"); - local_8._0_1_ = 0x8e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x8e; ((std::string *)(&DAT_00c80850))->std::string::string_from_cstr((byte *)"55: Hush"); - local_8._0_1_ = 0x8f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x8f; ((std::string *)(&DAT_00c80868))->std::string::string_from_cstr((byte *)"56: Dangle"); - local_8._0_1_ = 0x90; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x90; ((std::string *)(&DAT_00c80880))->std::string::string_from_cstr((byte *)"57: Turdling"); - local_8._0_1_ = 0x91; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x91; ((std::string *)(&DAT_00c80898))->std::string::string_from_cstr((byte *)"58: Frail"); - local_8._0_1_ = 0x92; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x92; ((std::string *)(&DAT_00c808b0))->std::string::string_from_cstr((byte *)"59: Rag Mega"); - local_8._0_1_ = 0x93; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x93; ((std::string *)(&DAT_00c808c8))->std::string::string_from_cstr((byte *)"60: Sisters Vis"); - local_8._0_1_ = 0x94; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x94; ((std::string *)(&DAT_00c808e0))->std::string::string_from_cstr((byte *)"61: Big Horn"); - local_8._0_1_ = 0x56; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x56; _atexit(FUN_00b15630); _Init_thread_footer(&DAT_00c80320); uVar17 = extraout_ECX_06; } } FUN_00694040(&DAT_00c80328,&DAT_00c808f8,uVar17); - local_8._0_1_ = 0x95; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x95; uVar17 = extraout_ECX_00; if (*(int *)((pIVar14->name)._buf + 4) < DAT_00c808f8) { _Init_thread_header(&DAT_00c808f8); uVar17 = extraout_ECX_07; if (DAT_00c808f8 == -1) { ((std::string *)(&DAT_00c80900))->std::string::string_from_cstr((byte *)"0:Treasure"); - local_8._0_1_ = 0x96; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x96; ((std::string *)(&DAT_00c80918))->std::string::string_from_cstr((byte *)"1:Shop"); - local_8._0_1_ = 0x97; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x97; ((std::string *)(&DAT_00c80930))->std::string::string_from_cstr((byte *)"2:Boss"); - local_8._0_1_ = 0x98; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x98; ((std::string *)(&DAT_00c80948))->std::string::string_from_cstr((byte *)"3:Devil"); - local_8._0_1_ = 0x99; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x99; ((std::string *)(&DAT_00c80960))->std::string::string_from_cstr((byte *)"4:Angel"); - local_8._0_1_ = 0x9a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x9a; ((std::string *)(&DAT_00c80978))->std::string::string_from_cstr((byte *)"5:Secret"); - local_8._0_1_ = 0x9b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x9b; ((std::string *)(&DAT_00c80990))->std::string::string_from_cstr((byte *)"6:Library"); - local_8._0_1_ = 0x9c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x9c; ((std::string *)(&DAT_00c809a8))->std::string::string_from_cstr((byte *)"7:Challenge"); - local_8._0_1_ = 0x9d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x9d; ((std::string *)(&DAT_00c809c0))->std::string::string_from_cstr((byte *)"8:Golden_Chest"); - local_8._0_1_ = 0x9e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x9e; ((std::string *)(&DAT_00c809d8))->std::string::string_from_cstr((byte *)"9:Red_Chest"); - local_8._0_1_ = 0x9f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x9f; ((std::string *)(&DAT_00c809f0))->std::string::string_from_cstr((byte *)"10:Beggar"); - local_8._0_1_ = 0xa0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xa0; ((std::string *)(&DAT_00c80a08))->std::string::string_from_cstr((byte *)"11:Demon_Beggar"); - local_8._0_1_ = 0xa1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xa1; ((std::string *)(&DAT_00c80a20))->std::string::string_from_cstr((byte *)"12:Curse"); - local_8._0_1_ = 0xa2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xa2; ((std::string *)(&DAT_00c80a38))->std::string::string_from_cstr((byte *)"13:Key_Master"); - local_8._0_1_ = 0xa3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xa3; ((std::string *)(&DAT_00c80a50))->std::string::string_from_cstr((byte *)"14:Boss_Rush"); - local_8._0_1_ = 0xa4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xa4; ((std::string *)(&DAT_00c80a68))->std::string::string_from_cstr((byte *)"15:Dungeon"); - local_8._0_1_ = 0x95; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x95; _atexit(FUN_00b15610); _Init_thread_footer(&DAT_00c808f8); uVar17 = extraout_ECX_08; @@ -1512,14 +1512,14 @@ LAB_006874b3: } FUN_00694040(&DAT_00c80900,&DAT_00c80a80,uVar17); pEVar15 = local_1bc; - local_8._0_1_ = 0xa5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xa5; omnicompleteText = (basic_string,std::allocator_> *)&local_1bc->anm2Path; do { FUN_0040c2f0(); } while (extraout_EDX != 1); string_split(words,(std_string *)&(pEVar15->name)._size,0x20); - local_8 = CONCAT31(local_8._1_3_,0xa6); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa6); iVar3 = FUN_00414410(); if ((*(int *)&local_1bc->isBoss == 0) || (pcVar4 = (char *)FUN_004170e0(*(int *)&local_1bc->isBoss + -1), *pcVar4 == ' ')) { @@ -1574,9 +1574,9 @@ LAB_00687925: std::vector::_Tidy(); } local_1e4 = (EntityConfig_Entity *)0x0; - if (0 < (int)pIVar14) { + if (0 < GHIDRA_INT(pIVar14)) { do { - if (((int)pIVar14 < 2) && (pEVar15->subtype == 0)) { + if ((GHIDRA_INT(pIVar14) < 2) && (pEVar15->subtype == 0)) { sprintf_s(entryIdText,0x20,(byte *)"%d.%d"); } else { @@ -1586,7 +1586,7 @@ LAB_00687925: tmpStringSize = 0; tmpStringCapacity = 0xf; tmpString[0] = (SimpleString)0x0; - local_8 = CONCAT31(local_8._1_3_,0xa8); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa8); uVar12 = FUN_00414410(); if (1 < uVar12) { uVar17 = FUN_004143f0(1); @@ -1599,11 +1599,11 @@ LAB_00687925: do { uVar17 = FUN_004143f0(uVar13); FUN_00421620(&DAT_00b656ec); - local_8._0_1_ = 0xa9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xa9; uVar17 = FUN_00651d50(uVar17); FUN_004215a0(uVar17); ((std::string *)(local_1ac))->std::string::_Tidy_deallocate(); - local_8 = CONCAT31(local_8._1_3_,0xa8); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa8); ((std::string *)(displayName._buf))->std::string::_Tidy_deallocate(); uVar13 = uVar13 + 1; uVar12 = FUN_00414410(); @@ -1617,19 +1617,19 @@ LAB_00687925: ((basic_string,std::allocator_> *) tmpString); uVar16 = FUN_00684e50(local_1fc); - FUN_00693eb0(*(undefined4 *)uVar16,(int)((ulonglong)uVar16 >> 0x20),uVar17); + FUN_00693eb0(*(undefined4 *)uVar16,GHIDRA_INT(((ulonglong)uVar16 >> 0x20)),uVar17); } ((EntityConfig_Entity *)(pEVar15))->EntityConfig_Entity::GetName(&local_6c,0); - local_8._0_1_ = 0xaa; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xaa; ((std::string *)((char *)entryText))->std::string::string(&local_6c); - local_8 = CONCAT31(local_8._1_3_,0xab); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xab); puVar6 = (undefined4 *)FUN_00684e50(local_1f4); uVar17 = *puVar6; std::basic_string,std::allocator_>::end ((basic_string,std::allocator_> *) &local_6c); uVar16 = FUN_00684e50(local_1d0); - FUN_00693eb0(*(undefined4 *)uVar16,(int)((ulonglong)uVar16 >> 0x20),uVar17); + FUN_00693eb0(*(undefined4 *)uVar16,GHIDRA_INT(((ulonglong)uVar16 >> 0x20)),uVar17); uVar12 = FUN_00414410(); if (uVar12 < 2) { LAB_00687c54: @@ -1648,11 +1648,11 @@ LAB_00687c54: ((std::string *)((char *)entryText))->std::string::_Tidy_deallocate(); ((std::string *)(local_6c._buf))->std::string::_Tidy_deallocate(); ((std::string *)((char *)tmpString))->std::string::_Tidy_deallocate(); - local_8 = CONCAT31(local_8._1_3_,0xa6); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa6); ((std::string *)(local_194._buf))->std::string::_Tidy_deallocate(); - local_1e4 = (EntityConfig_Entity *)((int)&local_1e4->id + 1); + local_1e4 = (EntityConfig_Entity *)(GHIDRA_INT(&local_1e4->id) + 1); pIVar14 = local_1dc; - } while ((int)local_1e4 < (int)local_1dc); + } while (GHIDRA_INT(local_1e4) < GHIDRA_INT(local_1dc)); } } std:: @@ -1676,16 +1676,16 @@ LAB_00689a90: if (bVar1 != 0) { itemConfig = &g_manager->_itemConfig; local_1bc = (EntityConfig_Entity *)0x0; - if ((int)(g_manager->_itemConfig)._collectibles._end - - (int)(itemConfig->_collectibles)._begin >> 2 != 0) { + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((itemConfig->_collectibles)._begin) >> 2 != 0) { do { pEVar15 = local_1bc; - pMVar9 = (Manager *)((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible((int)local_1bc); + pMVar9 = (Manager *)((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(GHIDRA_INT(local_1bc)); local_1e0 = pMVar9; if (pMVar9 != (Manager *)0x0) { sprintf_s(idText,0x20,&DAT_00b66204); ((std::string *)((char *)entryText))->std::string::string_from_cstr(idText); - local_8._0_1_ = 0xd4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xd4; uVar12 = FUN_00414410(); if (uVar12 < 2) { LAB_00689d47: @@ -1704,7 +1704,7 @@ LAB_00689d47: if (iVar3 == 0) goto LAB_00689d47; pvVar10 = (void *)FUN_004143f0(1); ((std::string *)((char *)tmpString))->std::string::string(pvVar10); - local_8 = CONCAT31(local_8._1_3_,0xd5); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xd5); uVar12 = FUN_00414410(); if (2 < uVar12) { uVar13 = 2; @@ -1713,11 +1713,11 @@ LAB_00689d47: do { uVar17 = FUN_004143f0(uVar13); FUN_00421620(&DAT_00b656ec); - local_8._0_1_ = 0xd6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xd6; uVar17 = FUN_00651d50(uVar17); FUN_004215a0(uVar17); ((std::string *)(displayName._buf))->std::string::_Tidy_deallocate(); - local_8 = CONCAT31(local_8._1_3_,0xd5); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xd5); ((std::string *)((char *)local_164))->std::string::_Tidy_deallocate(); uVar13 = uVar13 + 1; uVar12 = FUN_00414410(); @@ -1731,18 +1731,18 @@ LAB_00689d47: ((basic_string,std::allocator_> *) tmpString); uVar16 = FUN_00684e50(local_1f0); - FUN_00693eb0(*(undefined4 *)uVar16,(int)((ulonglong)uVar16 >> 0x20),uVar17); + FUN_00693eb0(*(undefined4 *)uVar16,GHIDRA_INT(((ulonglong)uVar16 >> 0x20)),uVar17); ((ItemConfig_Item *)((ItemConfig_Item *)local_1e0))->ItemConfig_Item::GetLocalizedName(&local_194,0); - local_8._0_1_ = 0xd7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xd7; ((std::string *)(local_1ac))->std::string::string(&local_194); - local_8._0_1_ = 0xd8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xd8; puVar6 = (undefined4 *)FUN_00684e50(local_1f8); uVar17 = *puVar6; std::basic_string,std::allocator_>::end ((basic_string,std::allocator_> *) &local_194); uVar16 = FUN_00684e50(local_200); - FUN_00693eb0(*(undefined4 *)uVar16,(int)((ulonglong)uVar16 >> 0x20),uVar17); + FUN_00693eb0(*(undefined4 *)uVar16,GHIDRA_INT(((ulonglong)uVar16 >> 0x20)),uVar17); iVar3 = FUN_00693650(tmpString,0); if (iVar3 != -1) { ((std::string *)(local_1ac))->std::string::c_str(); @@ -1755,15 +1755,15 @@ LAB_00689d47: ((std::string *)(local_194._buf))->std::string::_Tidy_deallocate(); ((std::string *)((char *)tmpString))->std::string::_Tidy_deallocate(); } - local_8 = CONCAT31(local_8._1_3_,0xa6); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa6); ((std::string *)((char *)entryText))->std::string::_Tidy_deallocate(); } - local_1bc = (EntityConfig_Entity *)((int)&pEVar15->id + 1); + local_1bc = (EntityConfig_Entity *)(GHIDRA_INT(&pEVar15->id) + 1); itemConfig = &g_manager->_itemConfig; } while (local_1bc < (EntityConfig_Entity *) - ((int)(g_manager->_itemConfig)._collectibles._end - - (int)(itemConfig->_collectibles)._begin >> 2)); + (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((itemConfig->_collectibles)._begin) >> 2)); } } } @@ -1815,7 +1815,7 @@ LAB_00688ee4: bVar1 = 0x2e; psVar5 = (std_string *)FUN_004143f0(1); string_split(&rooms,psVar5,bVar1); - local_8 = CONCAT31(local_8._1_3_,0xd2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xd2); iVar3 = FUN_00414410(); if (((iVar3 != 0) && (uVar12 = FUN_00414410(), uVar12 < 2)) && (iVar3 = FUN_004143f0(0), *(int *)(iVar3 + 0x10) != 0)) { @@ -1828,7 +1828,7 @@ LAB_00688ee4: SimpleString::operator=((SimpleString *)omnicompleteText,"#"); } } - local_8 = CONCAT31(local_8._1_3_,0xa6); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa6); std::vector::_Tidy(); } goto LAB_00689dd6; @@ -1841,7 +1841,7 @@ LAB_00688ee4: do { sprintf_s(idText,0x20,&DAT_00b66130); ((std::string *)(local_1ac))->std::string::string_from_cstr(idText); - local_8 = CONCAT31(local_8._1_3_,0xd3); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xd3); uVar13 = FUN_00414410(); if (uVar13 < 2) { LAB_00689197: @@ -1857,7 +1857,7 @@ LAB_00689197: iVar3 = FUN_00693650(uVar17,uVar18); if (iVar3 == 0) goto LAB_00689197; } - local_8 = CONCAT31(local_8._1_3_,0xa6); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa6); ((std::string *)(local_1ac))->std::string::_Tidy_deallocate(); uVar12 = uVar12 + 1; pcVar4 = pcVar4 + 0x4c; @@ -1876,15 +1876,15 @@ LAB_00689197: itemConfig = &g_manager->_itemConfig; local_1bc = (EntityConfig_Entity *)0x0; pMVar9 = g_manager; - if ((int)(g_manager->_itemConfig)._collectibles._end - - (int)(itemConfig->_collectibles)._begin >> 2 != 0) { + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((itemConfig->_collectibles)._begin) >> 2 != 0) { do { pEVar15 = local_1bc; - local_1c4 = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible((int)local_1bc); + local_1c4 = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(GHIDRA_INT(local_1bc)); if (local_1c4 != (ItemConfig_Item *)0x0) { sprintf_s(entryIdText,0x20,&DAT_00b66204); ((std::string *)((char *)entryText))->std::string::string_from_cstr(entryIdText); - local_8._0_1_ = 0xc4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc4; uVar12 = FUN_00414410(); if (uVar12 < 2) { LAB_006894b9: @@ -1902,7 +1902,7 @@ LAB_006894b9: if (iVar3 == 0) goto LAB_006894b9; pvVar10 = (void *)FUN_004143f0(1); ((std::string *)((char *)tmpString))->std::string::string(pvVar10); - local_8 = CONCAT31(local_8._1_3_,0xc5); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xc5); uVar12 = FUN_00414410(); if (2 < uVar12) { uVar13 = 2; @@ -1911,11 +1911,11 @@ LAB_006894b9: do { uVar17 = FUN_004143f0(uVar13); FUN_00421620(&DAT_00b656ec); - local_8._0_1_ = 0xc6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc6; uVar17 = FUN_00651d50(uVar17); FUN_004215a0(uVar17); ((std::string *)(displayName._buf))->std::string::_Tidy_deallocate(); - local_8 = CONCAT31(local_8._1_3_,0xc5); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xc5); ((std::string *)((char *)local_164))->std::string::_Tidy_deallocate(); uVar13 = uVar13 + 1; uVar12 = FUN_00414410(); @@ -1929,22 +1929,22 @@ LAB_006894b9: ((basic_string,std::allocator_> *) tmpString); uVar16 = FUN_00684e50(local_1f0); - FUN_00693eb0(*(undefined4 *)uVar16,(int)((ulonglong)uVar16 >> 0x20),uVar17); + FUN_00693eb0(*(undefined4 *)uVar16,GHIDRA_INT(((ulonglong)uVar16 >> 0x20)),uVar17); psVar5 = ((ItemConfig_Item *)(local_1c4))->ItemConfig_Item::GetLocalizedName(&displayName,0); - local_8._0_1_ = 199; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 199; pbVar11 = ((std::string *)(psVar5->_buf))->std::string::c_str(); ((std::string *)(local_194._buf))->std::string::string_from_cstr(pbVar11); - local_8._0_1_ = 0xc9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc9; ((std::string *)(displayName._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_1ac))->std::string::string(&local_194); - local_8._0_1_ = 0xca; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xca; puVar6 = (undefined4 *)FUN_00684e50(local_1f8); uVar17 = *puVar6; std::basic_string,std::allocator_>::end ((basic_string,std::allocator_> *) &local_194); uVar16 = FUN_00684e50(local_200); - FUN_00693eb0(*(undefined4 *)uVar16,(int)((ulonglong)uVar16 >> 0x20),uVar17); + FUN_00693eb0(*(undefined4 *)uVar16,GHIDRA_INT(((ulonglong)uVar16 >> 0x20)),uVar17); iVar3 = FUN_00693650(tmpString,0); if (iVar3 != -1) { ((std::string *)(local_1ac))->std::string::c_str(); @@ -1956,26 +1956,26 @@ LAB_006894b9: ((std::string *)(local_194._buf))->std::string::_Tidy_deallocate(); ((std::string *)((char *)tmpString))->std::string::_Tidy_deallocate(); } - local_8 = CONCAT31(local_8._1_3_,0xa6); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa6); ((std::string *)((char *)entryText))->std::string::_Tidy_deallocate(); pMVar9 = g_manager; } itemConfig = &pMVar9->_itemConfig; - local_1bc = (EntityConfig_Entity *)((int)pEVar15 + 1); + local_1bc = (EntityConfig_Entity *)(GHIDRA_INT(pEVar15) + 1); } while (local_1bc < - (uint)((int)(pMVar9->_itemConfig)._collectibles._end - - (int)(itemConfig->_collectibles)._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((pMVar9->_itemConfig)._collectibles._end) - + GHIDRA_INT((itemConfig->_collectibles)._begin) >> 2))); } local_1bc = (EntityConfig_Entity *)0x0; - if ((int)(pMVar9->_itemConfig)._trinkets._end - (int)(pMVar9->_itemConfig)._trinkets._begin + if (GHIDRA_INT((pMVar9->_itemConfig)._trinkets._end) - GHIDRA_INT((pMVar9->_itemConfig)._trinkets._begin) >> 2 != 0) { do { pEVar15 = local_1bc; - local_1c4 = ((ItemConfig *)(&pMVar9->_itemConfig))->ItemConfig::GetTrinket((uint)local_1bc); + local_1c4 = ((ItemConfig *)(&pMVar9->_itemConfig))->ItemConfig::GetTrinket(GHIDRA_UINT(local_1bc)); if (local_1c4 != (ItemConfig_Item *)0x0) { sprintf_s(idText,0x20,&DAT_00b66208); ((std::string *)((char *)local_164))->std::string::string_from_cstr(idText); - local_8._0_1_ = 0xcb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xcb; uVar12 = FUN_00414410(); if (uVar12 < 2) { LAB_006897e1: @@ -1993,7 +1993,7 @@ LAB_006897e1: if (iVar3 == 0) goto LAB_006897e1; pvVar10 = (void *)FUN_004143f0(1); ((std::string *)((char *)tmpString))->std::string::string(pvVar10); - local_8 = CONCAT31(local_8._1_3_,0xcc); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xcc); uVar12 = FUN_00414410(); if (2 < uVar12) { uVar13 = 2; @@ -2002,11 +2002,11 @@ LAB_006897e1: do { uVar17 = FUN_004143f0(uVar13); FUN_00421620(&DAT_00b656ec); - local_8._0_1_ = 0xcd; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xcd; uVar17 = FUN_00651d50(uVar17); FUN_004215a0(uVar17); ((std::string *)(displayName._buf))->std::string::_Tidy_deallocate(); - local_8 = CONCAT31(local_8._1_3_,0xcc); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xcc); ((std::string *)(local_6c._buf))->std::string::_Tidy_deallocate(); uVar13 = uVar13 + 1; uVar12 = FUN_00414410(); @@ -2020,18 +2020,18 @@ LAB_006897e1: ((basic_string,std::allocator_> *) tmpString); uVar16 = FUN_00684e50(local_1f0); - FUN_00693eb0(*(undefined4 *)uVar16,(int)((ulonglong)uVar16 >> 0x20),uVar17); + FUN_00693eb0(*(undefined4 *)uVar16,GHIDRA_INT(((ulonglong)uVar16 >> 0x20)),uVar17); ((ItemConfig_Item *)(local_1c4))->ItemConfig_Item::GetLocalizedName(&local_194,0); - local_8._0_1_ = 0xce; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xce; ((std::string *)(local_1ac))->std::string::string(&local_194); - local_8._0_1_ = 0xcf; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xcf; puVar6 = (undefined4 *)FUN_00684e50(local_1f8); uVar17 = *puVar6; std::basic_string,std::allocator_>::end ((basic_string,std::allocator_> *) &local_194); uVar16 = FUN_00684e50(local_200); - FUN_00693eb0(*(undefined4 *)uVar16,(int)((ulonglong)uVar16 >> 0x20),uVar17); + FUN_00693eb0(*(undefined4 *)uVar16,GHIDRA_INT(((ulonglong)uVar16 >> 0x20)),uVar17); iVar3 = FUN_00693650(tmpString,0); if (iVar3 != -1) { ((std::string *)(local_1ac))->std::string::c_str(); @@ -2043,23 +2043,23 @@ LAB_006897e1: ((std::string *)(local_194._buf))->std::string::_Tidy_deallocate(); ((std::string *)((char *)tmpString))->std::string::_Tidy_deallocate(); } - local_8 = CONCAT31(local_8._1_3_,0xa6); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa6); ((std::string *)((char *)local_164))->std::string::_Tidy_deallocate(); pMVar9 = g_manager; } - local_1bc = (EntityConfig_Entity *)((int)&pEVar15->id + 1); + local_1bc = (EntityConfig_Entity *)(GHIDRA_INT(&pEVar15->id) + 1); } while (local_1bc < (EntityConfig_Entity *) - ((int)(pMVar9->_itemConfig)._trinkets._end - - (int)(pMVar9->_itemConfig)._trinkets._begin >> 2)); + (GHIDRA_INT((pMVar9->_itemConfig)._trinkets._end) - + GHIDRA_INT((pMVar9->_itemConfig)._trinkets._begin) >> 2)); } uVar12 = 0; - if ((int)(pMVar9->_itemConfig)._pillEffects._end - - (int)(pMVar9->_itemConfig)._pillEffects._begin >> 2 != 0) { + if (GHIDRA_INT((pMVar9->_itemConfig)._pillEffects._end) - + GHIDRA_INT((pMVar9->_itemConfig)._pillEffects._begin) >> 2 != 0) { do { sprintf_s(pillIdText,0x20,&DAT_00b6620c); ((std::string *)(local_1ac))->std::string::string_from_cstr(pillIdText); - local_8 = CONCAT31(local_8._1_3_,0xd0); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xd0); uVar13 = FUN_00414410(); if (uVar13 < 2) { LAB_006898e4: @@ -2077,20 +2077,20 @@ LAB_006898e4: iVar3 = FUN_00693650(uVar17,uVar18); if (iVar3 == 0) goto LAB_006898e4; } - local_8 = CONCAT31(local_8._1_3_,0xa6); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa6); ((std::string *)(local_1ac))->std::string::_Tidy_deallocate(); uVar12 = uVar12 + 1; pMVar9 = g_manager; - } while (uVar12 < (uint)((int)(g_manager->_itemConfig)._pillEffects._end - - (int)(g_manager->_itemConfig)._pillEffects._begin >> 2)); + } while (uVar12 < GHIDRA_UINT((GHIDRA_INT((g_manager->_itemConfig)._pillEffects._end) - + GHIDRA_INT((g_manager->_itemConfig)._pillEffects._begin) >> 2))); } uVar12 = 0; - if ((int)(pMVar9->_itemConfig)._cards._end - (int)(pMVar9->_itemConfig)._cards._begin >> 2 + if (GHIDRA_INT((pMVar9->_itemConfig)._cards._end) - GHIDRA_INT((pMVar9->_itemConfig)._cards._begin) >> 2 != 0) { do { sprintf_s(cardIdText,0x20,&DAT_00b66210); ((std::string *)(local_194._buf))->std::string::string_from_cstr(cardIdText); - local_8 = CONCAT31(local_8._1_3_,0xd1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xd1); uVar13 = FUN_00414410(); if (uVar13 < 2) { LAB_006899ea: @@ -2108,11 +2108,11 @@ LAB_006899ea: iVar3 = FUN_00693650(uVar17,uVar18); if (iVar3 == 0) goto LAB_006899ea; } - local_8 = CONCAT31(local_8._1_3_,0xa6); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa6); ((std::string *)(local_194._buf))->std::string::_Tidy_deallocate(); uVar12 = uVar12 + 1; - } while (uVar12 < (uint)((int)(g_manager->_itemConfig)._cards._end - - (int)(g_manager->_itemConfig)._cards._begin >> 2)); + } while (uVar12 < GHIDRA_UINT((GHIDRA_INT((g_manager->_itemConfig)._cards._end) - + GHIDRA_INT((g_manager->_itemConfig)._cards._begin) >> 2))); } } goto LAB_00689dd6; @@ -2132,7 +2132,7 @@ LAB_006899ea: do { sprintf_s(stageIdText,0x10,&DAT_00b66130); ((std::string *)((char *)entryText))->std::string::string_from_cstr(stageIdText); - local_8 = CONCAT31(local_8._1_3_,0xbd); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xbd); uVar13 = FUN_00414410(); if (uVar13 < 2) { LAB_006883e6: @@ -2142,9 +2142,9 @@ LAB_006883e6: uVar13 = RoomConfig::GetStageID(uVar12,0,-1); psVar5 = RoomConfig::GetStageDisplayName (&game->_roomConfig,&displayName,uVar13,language_00); - local_8._0_1_ = 0xbe; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xbe; FUN_00651af0(psVar5); - local_8 = CONCAT31(local_8._1_3_,0xbd); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xbd); ((std::string *)(displayName._buf))->std::string::_Tidy_deallocate(); SimpleString::operator=((SimpleString *)omnicompleteText,"#"); } @@ -2156,7 +2156,7 @@ LAB_006883e6: } sprintf_s(stageIdText,0x10,&DAT_00b66138); ((std::string *)((char *)tmpString))->std::string::string_from_cstr(stageIdText); - local_8 = CONCAT31(local_8._1_3_,0xbf); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xbf); uVar13 = FUN_00414410(); if (uVar13 < 2) { LAB_006884a9: @@ -2165,9 +2165,9 @@ LAB_006884a9: game = g_game; uVar13 = RoomConfig::GetStageID(uVar12,1,-1); psVar5 = ((RoomConfig *)(&game->_roomConfig))->RoomConfig::GetStageDisplayName(&displayName,uVar13,0); - local_8._0_1_ = 0xc0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc0; FUN_00651af0(psVar5); - local_8 = CONCAT31(local_8._1_3_,0xbf); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xbf); ((std::string *)(displayName._buf))->std::string::_Tidy_deallocate(); SimpleString::operator=((SimpleString *)omnicompleteText,"#"); } @@ -2189,9 +2189,9 @@ LAB_0068855f: uVar13 = RoomConfig::GetStageID(uVar12,2,-1); psVar5 = ((RoomConfig *)(&game->_roomConfig))->RoomConfig::GetStageDisplayName(&displayName,uVar13,0) ; - local_8._0_1_ = 0xc1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc1; FUN_00651af0(psVar5); - local_8 = CONCAT31(local_8._1_3_,0xbf); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xbf); ((std::string *)(displayName._buf))->std::string::_Tidy_deallocate(); SimpleString::operator=((SimpleString *)omnicompleteText,"#"); } @@ -2214,9 +2214,9 @@ LAB_0068861a: uVar13 = RoomConfig::GetStageID(uVar12,4,-1); psVar5 = ((RoomConfig *)(&game->_roomConfig))->RoomConfig::GetStageDisplayName(&displayName,uVar13,0) ; - local_8._0_1_ = 0xc2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc2; FUN_00651af0(psVar5); - local_8 = CONCAT31(local_8._1_3_,0xbf); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xbf); ((std::string *)(displayName._buf))->std::string::_Tidy_deallocate(); SimpleString::operator=((SimpleString *)omnicompleteText,"#"); } @@ -2239,9 +2239,9 @@ LAB_006886d5: uVar13 = RoomConfig::GetStageID(uVar12,5,-1); psVar5 = ((RoomConfig *)(&game->_roomConfig))->RoomConfig::GetStageDisplayName(&displayName,uVar13,0) ; - local_8._0_1_ = 0xc3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc3; FUN_00651af0(psVar5); - local_8 = CONCAT31(local_8._1_3_,0xbf); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xbf); ((std::string *)(displayName._buf))->std::string::_Tidy_deallocate(); SimpleString::operator=((SimpleString *)omnicompleteText,"#"); } @@ -2253,7 +2253,7 @@ LAB_006886d5: if (iVar3 == 0) goto LAB_006886d5; } ((std::string *)((char *)tmpString))->std::string::_Tidy_deallocate(); - local_8 = CONCAT31(local_8._1_3_,0xa6); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa6); ((std::string *)((char *)entryText))->std::string::_Tidy_deallocate(); uVar12 = uVar12 + 1; } while (uVar12 < 0xe); @@ -2262,7 +2262,7 @@ LAB_006886d5: do { sprintf_s(stageIdText,0x10,&DAT_00b66130); ((std::string *)((char *)entryText))->std::string::string_from_cstr(stageIdText); - local_8 = CONCAT31(local_8._1_3_,0xb8); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xb8); uVar13 = FUN_00414410(); if (uVar13 < 2) { LAB_00688186: @@ -2272,9 +2272,9 @@ LAB_00688186: uVar13 = RoomConfig::GetStageID(uVar12,0,-1); psVar5 = RoomConfig::GetStageDisplayName (&game->_roomConfig,&displayName,uVar13,language); - local_8._0_1_ = 0xb9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb9; FUN_00651af0(psVar5); - local_8 = CONCAT31(local_8._1_3_,0xb8); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xb8); ((std::string *)(displayName._buf))->std::string::_Tidy_deallocate(); SimpleString::operator=((SimpleString *)omnicompleteText,"#"); } @@ -2286,7 +2286,7 @@ LAB_00688186: } sprintf_s(stageIdText,0x10,&DAT_00b66138); ((std::string *)((char *)tmpString))->std::string::string_from_cstr(stageIdText); - local_8 = CONCAT31(local_8._1_3_,0xba); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xba); uVar13 = FUN_00414410(); if (uVar13 < 2) { LAB_00688244: @@ -2295,9 +2295,9 @@ LAB_00688244: game = g_game; uVar13 = RoomConfig::GetStageID(uVar12,1,-1); psVar5 = ((RoomConfig *)(&game->_roomConfig))->RoomConfig::GetStageDisplayName(&displayName,uVar13,0); - local_8._0_1_ = 0xbb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xbb; FUN_00651af0(psVar5); - local_8 = CONCAT31(local_8._1_3_,0xba); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xba); ((std::string *)(displayName._buf))->std::string::_Tidy_deallocate(); SimpleString::operator=((SimpleString *)omnicompleteText,"#"); } @@ -2317,9 +2317,9 @@ LAB_006882ff: game = g_game; uVar13 = RoomConfig::GetStageID(uVar12,2,-1); psVar5 = ((RoomConfig *)(&game->_roomConfig))->RoomConfig::GetStageDisplayName(&displayName,uVar13,0); - local_8._0_1_ = 0xbc; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xbc; FUN_00651af0(psVar5); - local_8 = CONCAT31(local_8._1_3_,0xba); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xba); ((std::string *)(displayName._buf))->std::string::_Tidy_deallocate(); SimpleString::operator=((SimpleString *)omnicompleteText,"#"); } @@ -2330,7 +2330,7 @@ LAB_006882ff: if ((iVar3 == 0) && (uVar12 < 6)) goto LAB_006882ff; } ((std::string *)((char *)tmpString))->std::string::_Tidy_deallocate(); - local_8 = CONCAT31(local_8._1_3_,0xa6); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa6); ((std::string *)((char *)entryText))->std::string::_Tidy_deallocate(); uVar12 = uVar12 + 1; } while (uVar12 < 8); @@ -2414,7 +2414,7 @@ LAB_006888c6: bVar1 = 0x2e; psVar5 = (std_string *)FUN_004143f0(1); string_split(local_6c._buf + 0xc,psVar5,bVar1); - local_8._0_1_ = 0xb1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb1; iVar3 = FUN_00414410(); FUN_004143f0(1); iVar8 = FUN_004143f0(1); @@ -2431,7 +2431,7 @@ LAB_006888c6: uVar12 = ((Game *)((Game *)((ulonglong)uVar16 >> 0x20)))->Game::GetStageID(unused); RoomConfig::CollectRooms (roomConfig,&rooms,uVar12,1,0xd,0,0xffffffff,1,10,(uint *)uVar16,-1,-1); - local_8._0_1_ = 0xb2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb2; pIVar14 = (ItemConfig_Item *)0xffffffff; maxRoomVariant = (ItemConfig_Item *)0x0; local_1c4 = (ItemConfig_Item *)0xffffffff; @@ -2483,7 +2483,7 @@ LAB_00688ad6: } listNode = (int *)*listNode; } while (listNode != roomTypeNames); - local_8 = CONCAT31(local_8._1_3_,0xa6); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa6); std::vector::_Tidy(); goto LAB_00689dd6; } @@ -2509,16 +2509,16 @@ LAB_00688ad6: uVar12 = ((Game *)(g_game))->Game::GetStageID(unused_00); } RoomConfig::CollectRooms - (&game->_roomConfig,&rooms,uVar12,(int)local_1e0,0xd,0,0xffffffff,1,10,doorMask,-1, + (&game->_roomConfig,&rooms,uVar12,GHIDRA_INT(local_1e0),0xd,0,0xffffffff,1,10,doorMask,-1, -1); - local_8._0_1_ = 0xb3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb3; local_1bc = rooms; pEVar15 = rooms; if (rooms != roomsEnd) { do { sprintf_s(roomIdText,0x10,&DAT_00b66130); ((std::string *)(local_1ac))->std::string::string_from_cstr(roomIdText); - local_8._0_1_ = 0xb4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb4; uVar12 = FUN_00414410(); uVar17 = extraout_ECX_01; if (uVar12 < 3) { @@ -2534,21 +2534,21 @@ LAB_00688d78: if (iVar3 == 0) goto LAB_00688d78; pvVar10 = (void *)FUN_004143f0(2); ((std::string *)((char *)entryText))->std::string::string(pvVar10); - local_8._0_1_ = 0xb5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb5; puVar6 = (undefined4 *)FUN_00684e50(local_1d0); uVar17 = *puVar6; std::basic_string,std::allocator_>::end(entryText); uVar16 = FUN_00684e50(local_1f4); - FUN_00693eb0(*(undefined4 *)uVar16,(int)((ulonglong)uVar16 >> 0x20),uVar17); + FUN_00693eb0(*(undefined4 *)uVar16,GHIDRA_INT(((ulonglong)uVar16 >> 0x20)),uVar17); ((std::string *)(local_194._buf))->std::string::string((void *)(pEVar15->id + 0x14)); - local_8._0_1_ = 0xb6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb6; puVar6 = (undefined4 *)FUN_00684e50(local_1fc); uVar17 = *puVar6; std::basic_string,std::allocator_>::end ((basic_string,std::allocator_> *)&local_194 ); uVar16 = FUN_00684e50(local_204); - FUN_00693eb0(*(undefined4 *)uVar16,(int)((ulonglong)uVar16 >> 0x20),uVar17); + FUN_00693eb0(*(undefined4 *)uVar16,GHIDRA_INT(((ulonglong)uVar16 >> 0x20)),uVar17); iVar3 = FUN_00693650(entryText,0); if (iVar3 == -1) { puVar6 = (undefined4 *) @@ -2563,23 +2563,23 @@ LAB_00688d78: ((std::string *)(local_194._buf))->std::string::_Tidy_deallocate(); ((std::string *)((char *)entryText))->std::string::_Tidy_deallocate(); } - local_8._0_1_ = 0xb3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb3; ((std::string *)(local_1ac))->std::string::_Tidy_deallocate(); } while (pEVar15 != roomsEnd); } - iVar3 = (int)roomsEnd - (int)rooms; + iVar3 = GHIDRA_INT(roomsEnd) - GHIDRA_INT(rooms); local_194._size = 0; local_194._capacity = 0xf; local_194._buf[0] = '\0'; local_194._buf[1] = '\0'; local_194._buf[2] = '\0'; local_194._buf[3] = '\0'; - local_8._0_1_ = 0xb7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb7; local_1bc = rooms; if (rooms != roomsEnd) { do { pEVar15 = local_1bc; - if ((((uint)(iVar3 >> 2) < 8) || (*(int *)(local_1bc->id + 0x24) == 0)) || + if (((GHIDRA_UINT((iVar3 >> 2)) < 8) || (*(int *)(local_1bc->id + 0x24) == 0)) || (cVar2 = FUN_0040c790(), cVar2 == '\0')) { FUN_0040c310(pEVar15->id + 0x14); sprintf_s(roomIdText,0x10,&DAT_00b66130); @@ -2604,7 +2604,7 @@ LAB_00688ec2: FID_conflict__Tidy(&rooms); } LAB_00688ecd: - local_8 = CONCAT31(local_8._1_3_,0xa6); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa6); std::vector::_Tidy(); goto LAB_00689dd6; } @@ -2616,7 +2616,7 @@ LAB_00688ecd: tmpStringSize = 0; tmpStringCapacity = 0xf; tmpString[0] = (SimpleString)0x0; - local_8 = CONCAT31(local_8._1_3_,0xad); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xad); uVar12 = FUN_00414410(); if (1 < uVar12) { uVar17 = FUN_004143f0(1); @@ -2629,11 +2629,11 @@ LAB_00688ecd: do { uVar17 = FUN_004143f0(uVar13); FUN_00421620(&DAT_00b656ec); - local_8._0_1_ = 0xae; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xae; uVar17 = FUN_00651d50(uVar17); FUN_004215a0(uVar17); ((std::string *)(displayName._buf))->std::string::_Tidy_deallocate(); - local_8 = CONCAT31(local_8._1_3_,0xad); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xad); ((std::string *)(local_1ac))->std::string::_Tidy_deallocate(); uVar13 = uVar13 + 1; uVar12 = FUN_00414410(); @@ -2646,26 +2646,26 @@ LAB_00688ecd: std::basic_string,std::allocator_>::end ((basic_string,std::allocator_> *)tmpString); uVar16 = FUN_00684e50(local_1f0); - FUN_00693eb0(*(undefined4 *)uVar16,(int)((ulonglong)uVar16 >> 0x20),uVar17); + FUN_00693eb0(*(undefined4 *)uVar16,GHIDRA_INT(((ulonglong)uVar16 >> 0x20)),uVar17); } entityConfigEntry = EntityConfig::GetEntity (&g_manager->_entityConfig,*(int *)&(*(undefined1 *)((char *)&(pEVar15[0x8ad6]) + 0x90)), *(int *)&(*(undefined1 *)((char *)&(pEVar15[0x8ad6]) + 0x94)),0); ((std::string *)((char *)local_164))->std::string::string_from_cstr((byte *)"unknown"); - local_8._0_1_ = 0xaf; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xaf; if (entityConfigEntry != (EntityConfig_Entity *)0x0) { psVar5 = ((EntityConfig_Entity *)(entityConfigEntry))->EntityConfig_Entity::GetName(&displayName,0); FUN_004215a0(psVar5); ((std::string *)(displayName._buf))->std::string::_Tidy_deallocate(); } ((std::string *)((char *)entryText))->std::string::string(local_164); - local_8 = CONCAT31(local_8._1_3_,0xb0); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xb0); puVar6 = (undefined4 *)FUN_00684e50(local_1f8); uVar17 = *puVar6; std::basic_string,std::allocator_>::end(local_164); uVar16 = FUN_00684e50(local_200); - FUN_00693eb0(*(undefined4 *)uVar16,(int)((ulonglong)uVar16 >> 0x20),uVar17); + FUN_00693eb0(*(undefined4 *)uVar16,GHIDRA_INT(((ulonglong)uVar16 >> 0x20)),uVar17); uVar12 = FUN_00414410(); if (uVar12 < 2) { LAB_00687f92: @@ -2683,7 +2683,7 @@ LAB_00687f92: ((std::string *)((char *)entryText))->std::string::_Tidy_deallocate(); ((std::string *)((char *)local_164))->std::string::_Tidy_deallocate(); ((std::string *)((char *)tmpString))->std::string::_Tidy_deallocate(); - local_8 = CONCAT31(local_8._1_3_,0xa6); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa6); ((std::string *)(local_194._buf))->std::string::_Tidy_deallocate(); local_1bc = (EntityConfig_Entity *)((pEVar15->name)._buf + 4); } while (local_1bc < (EntityConfig_Entity *)0x3b0); @@ -2710,7 +2710,7 @@ LAB_00688069: LAB_00689dd6: font = (Font *)FUN_006867b0(); string_split(omnicompleteEntries,(std_string *)omnicompleteText,0x23); - local_8 = CONCAT31(local_8._1_3_,0xd9); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xd9); uVar12 = 0; local_1d1 = 0x20; local_1d2 = 0x23; @@ -2740,16 +2740,16 @@ LAB_00689e7f: FUN_004143f0(uVar12); uVar12 = uVar12 + 1; uVar17 = FUN_00421620(&DAT_00b66110); - local_8._0_1_ = 0xda; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xda; FUN_00651af0(uVar17); - local_8 = CONCAT31(local_8._1_3_,0xd9); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xd9); ((std::string *)(displayName._buf))->std::string::_Tidy_deallocate(); } while( true ); std::basic_string,std::allocator_>::end(omnicompleteText); uVar16 = FUN_00684e50(local_1d0); - FUN_006851c0(*(undefined4 *)uVar16,(int)((ulonglong)uVar16 >> 0x20)); + FUN_006851c0(*(undefined4 *)uVar16,GHIDRA_INT(((ulonglong)uVar16 >> 0x20))); omnicompleteText = omnicompleteText + 0x18; - local_1c4 = (ItemConfig_Item *)((int)&local_1c4[-1]._initCharge + 3); + local_1c4 = (ItemConfig_Item *)(GHIDRA_INT(&local_1c4[-1]._initCharge) + 3); if (local_1c4 == (ItemConfig_Item *)0x0) { std::vector::_Tidy(); std::vector::_Tidy(); @@ -2809,7 +2809,7 @@ void Console::Update() ExceptionList = &local_10; local_28 = (Console)0x155; cVar1 = (**(code **)(PTR_vftable_00c57b18 + 0x74)) - (0,FUN_00a20730,&local_28,0,0,__security_cookie ^ (int)register0x00000010 - 4U); + (0,FUN_00a20730,&local_28,0,0,__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); local_28 = (Console)0x15a; isRightAltDown = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0,FUN_00a20730,&local_28,0,0); if ((((DAT_00c7ec61 != '\0') && (DAT_00c7ec60 != '\0')) && (cVar1 != '\0')) && @@ -2877,7 +2877,7 @@ void Console::Update() *this = (Console)0x1; this[1] = (Console)0x0; if ((this[0x14] == (Console)0x0) || - (*(int *)(*(int *)((int)this[0x11] + ((int)this[0x12] - 1U & (uint)this[0x13]) * 4) + 0x10) + (*(int *)(*(int *)(GHIDRA_INT(this[0x11]) + (GHIDRA_INT(this[0x12]) - 1U & GHIDRA_UINT(this[0x13])) * 4) + 0x10) != 0)) { CVar2 = (Console)0x0; } @@ -2915,19 +2915,19 @@ LAB_0068b552: cVar1 = FUN_00686ad0(0x10b); if (cVar1 != '\0') { pCVar3 = this + 3; - *pCVar3 = (Console)((int)*pCVar3 + -1); - if ((int)*pCVar3 < 0) { - CVar2 = (Console)((int)this[2] + -1); + *pCVar3 = (Console)(GHIDRA_INT(*pCVar3) + -1); + if (GHIDRA_INT(*pCVar3) < 0) { + CVar2 = (Console)(GHIDRA_INT(this[2]) + -1); this[2] = CVar2; - if ((-1 < (int)CVar2) && ((int)CVar2 < (int)this[0x14])) { + if ((-1 < GHIDRA_INT(CVar2)) && (GHIDRA_INT(CVar2) < GHIDRA_INT(this[0x14]))) { local_28 = this[0x13]; - this[3] = (Console)(*(int *)(*(int *)((int)this[0x11] + - ((int)CVar2 + (int)local_28 & (int)this[0x12] - 1U) * + this[3] = (Console)(*(int *)(*(int *)(GHIDRA_INT(this[0x11]) + + (GHIDRA_INT(CVar2) + GHIDRA_INT(local_28) & GHIDRA_INT(this[0x12]) - 1U) * 4) + 0x24) + -1); } } pCVar3 = (Console *)FUN_00686910(&visibleRange); - if (((int)this[2] < (int)*pCVar3) || ((this[2] == *pCVar3 && ((int)this[3] < (int)pCVar3[1]))) + if ((GHIDRA_INT(this[2]) < GHIDRA_INT(*pCVar3)) || ((this[2] == *pCVar3 && (GHIDRA_INT(this[3]) < GHIDRA_INT(pCVar3[1])))) ) { isPastRange = true; } @@ -2943,17 +2943,17 @@ LAB_0068b552: } else { CVar2 = this[3]; - this[3] = (Console)((int)CVar2 + 1); - if (((int)this[2] < (int)this[0x14]) && + this[3] = (Console)(GHIDRA_INT(CVar2) + 1); + if ((GHIDRA_INT(this[2]) < GHIDRA_INT(this[0x14])) && (local_28 = this[0x13], - *(int *)(*(int *)((int)this[0x11] + ((int)this[2] + (int)local_28 & (int)this[0x12] - 1U) * 4 - ) + 0x24) <= (int)CVar2 + 1)) { - this[2] = (Console)((int)this[2] + 1); + *(int *)(*(int *)(GHIDRA_INT(this[0x11]) + (GHIDRA_INT(this[2]) + GHIDRA_INT(local_28) & GHIDRA_INT(this[0x12]) - 1U) * 4 + ) + 0x24) <= GHIDRA_INT(CVar2) + 1)) { + this[2] = (Console)(GHIDRA_INT(this[2]) + 1); this[3] = (Console)0x0; } get_visible_line_range(this,&visibleRange); - if (((int)*scrollPos < (int)this[2]) || - ((*scrollPos == this[2] && ((int)scrollPos[1] < (int)this[3])))) { + if ((GHIDRA_INT(*scrollPos) < GHIDRA_INT(this[2])) || + ((*scrollPos == this[2] && (GHIDRA_INT(scrollPos[1]) < GHIDRA_INT(this[3]))))) { pCVar5 = scrollPos; } else { @@ -2967,22 +2967,22 @@ LAB_0068b639: cVar1 = FUN_00686ad0(0x107); if (cVar1 != '\0') { CVar2 = (Console)(this + 7); - if (0xf < (uint)this[0xc]) { + if (0xf < GHIDRA_UINT(this[0xc])) { CVar2 = *(Console *)CVar2; } - if ((uint)CVar2 < (uint)this[0x42]) { - this[0x42] = (Console)((int)this[0x42] + -1); + if (GHIDRA_UINT(CVar2) < GHIDRA_UINT(this[0x42])) { + this[0x42] = (Console)(GHIDRA_INT(this[0x42]) + -1); this[0x43] = (Console)0x0; } } cVar1 = FUN_00686ad0(0x106); if (cVar1 != '\0') { CVar2 = (Console)(this + 7); - if (0xf < (uint)this[0xc]) { + if (0xf < GHIDRA_UINT(this[0xc])) { CVar2 = this[7]; } - if ((uint)this[0x42] < (uint)((int)this[0xb] + (int)CVar2)) { - this[0x42] = (Console)((int)this[0x42] + 1); + if (GHIDRA_UINT(this[0x42]) < GHIDRA_UINT((GHIDRA_INT(this[0xb]) + GHIDRA_INT(CVar2)))) { + this[0x42] = (Console)(GHIDRA_INT(this[0x42]) + 1); this[0x43] = (Console)0x0; } } @@ -2997,7 +2997,7 @@ LAB_0068b639: else { if (!isCtrlHeld) { CVar2 = (Console)(this + 7); - if (0xf < (uint)this[0xc]) { + if (0xf < GHIDRA_UINT(this[0xc])) { CVar2 = *(Console *)CVar2; } goto LAB_0068b713; @@ -3027,7 +3027,7 @@ LAB_0068b7bc: } else { uVar7 = (g_manager->_optionsConfig)._consoleFont - 1; - (g_manager->_optionsConfig)._consoleFont = -(uint)(uVar7 != 0) & uVar7; + (g_manager->_optionsConfig)._consoleFont = -GHIDRA_UINT((uVar7 != 0)) & uVar7; FUN_00692960(); } goto LAB_0068bb4f; @@ -3040,7 +3040,7 @@ LAB_0068b7bc: cVar1 = *textEnd; textEnd = textEnd + 1; } while (cVar1 != '\0'); - uVar6 = (int)textEnd - (int)(pasteBase + 1); + uVar6 = GHIDRA_INT(textEnd) - GHIDRA_INT((pasteBase + 1)); historyContainer = 0; lineStart = 0; uVar7 = 0; @@ -3051,10 +3051,10 @@ LAB_0068b7bc: LAB_0068b825: if (uVar7 != 0) { CVar2 = (Console)(this + 7); - if (0xf < (uint)this[0xc]) { + if (0xf < GHIDRA_UINT(this[0xc])) { CVar2 = this[7]; } - std_string_insert(this + 7,(int)this[0x42] - (int)CVar2, + std_string_insert(this + 7,GHIDRA_INT(this[0x42]) - GHIDRA_INT(CVar2), (byte *)(clipboardText + lineStart),uVar7 - lineStart); submit_input(this,unused); if (*(char *)local_28 == '\r') { @@ -3072,22 +3072,22 @@ LAB_0068b825: } while (uVar7 < uVar6); } CVar2 = (Console)(this + 7); - if ((uint)this[0xc] < 0x10) { + if (GHIDRA_UINT(this[0xc]) < 0x10) { local_24 = CVar2; } else { pasteBase = clipboardText; local_24 = *(Console *)CVar2; } - local_28 = (Console)((int)this[0x42] - (int)local_24); - std_string_insert((void *)CVar2,(int)this[0x42] - (int)local_24, + local_28 = (Console)(GHIDRA_INT(this[0x42]) - GHIDRA_INT(local_24)); + std_string_insert((void *)CVar2,GHIDRA_INT(this[0x42]) - GHIDRA_INT(local_24), (byte *)(pasteBase + historyContainer),uVar6 - historyContainer); FUN_006924d0(); - if (0xf < (uint)this[0xc]) { + if (0xf < GHIDRA_UINT(this[0xc])) { CVar2 = *(Console *)CVar2; } this[0x43] = (Console)0x0; - this[0x42] = (Console)(((int)CVar2 - lineStart) + (int)local_28 + uVar6); + this[0x42] = (Console)((GHIDRA_INT(CVar2) - lineStart) + GHIDRA_INT(local_28) + uVar6); goto LAB_0068bb4f; } } @@ -3100,10 +3100,10 @@ LAB_0068b825: goto LAB_0068b7bc; } CVar2 = (Console)(this + 7); - if (0xf < (uint)this[0xc]) { + if (0xf < GHIDRA_UINT(this[0xc])) { CVar2 = this[7]; } - CVar2 = (Console)((int)this[0xb] + (int)CVar2); + CVar2 = (Console)(GHIDRA_INT(this[0xb]) + GHIDRA_INT(CVar2)); LAB_0068b713: this[0x42] = CVar2; LAB_0068b719: @@ -3129,8 +3129,8 @@ LAB_0068b719: if (cVar1 != '\0') { CVar2 = this[0x1c]; if ((CVar2 == this[0x18]) || - (this[0x1c] = (Console)((int)CVar2 + -1), - (Console)((int)CVar2 + -1) == this[0x18])) { + (this[0x1c] = (Console)(GHIDRA_INT(CVar2) + -1), + (Console)(GHIDRA_INT(CVar2) + -1) == this[0x18])) { FUN_0040c2f0(); } else { @@ -3142,26 +3142,26 @@ LAB_0068b719: } FUN_0040c310(*(undefined4 *) (*(int *)(historyContainer + 4) + - (*(int *)(historyContainer + 8) - 1U & (int)CVar2 - 2U) * 4)); + (*(int *)(historyContainer + 8) - 1U & GHIDRA_INT(CVar2) - 2U) * 4)); } CVar2 = (Console)(this + 7); FUN_006924d0(); - if (0xf < (uint)this[0xc]) { + if (0xf < GHIDRA_UINT(this[0xc])) { CVar2 = *(Console *)CVar2; } - this[0x42] = (Console)((int)this[0xb] + (int)CVar2); + this[0x42] = (Console)(GHIDRA_INT(this[0xb]) + GHIDRA_INT(CVar2)); } } - else if (this[0x1c] != (Console)((int)this[0x19] + (int)this[0x18])) { + else if (this[0x1c] != (Console)(GHIDRA_INT(this[0x19]) + GHIDRA_INT(this[0x18]))) { uVar4 = FUN_0060c420(); FUN_0040c310(uVar4); CVar2 = (Console)(this + 7); - if (0xf < (uint)this[0xc]) { + if (0xf < GHIDRA_UINT(this[0xc])) { CVar2 = this[7]; } - this[0x42] = (Console)((int)this[0xb] + (int)CVar2); + this[0x42] = (Console)(GHIDRA_INT(this[0xb]) + GHIDRA_INT(CVar2)); FUN_006924d0(); - this[0x1c] = (Console)((int)this[0x1c] + 1); + this[0x1c] = (Console)(GHIDRA_INT(this[0x1c]) + 1); } goto LAB_0068bb4f; } @@ -3171,23 +3171,23 @@ LAB_0068b719: } else if (this[0xb] != (Console)0x0) { CVar8 = (Console)(this + 7); - if (0xf < (uint)this[0xc]) { + if (0xf < GHIDRA_UINT(this[0xc])) { CVar8 = *(Console *)CVar8; } CVar2 = this[0x42]; - if (CVar2 == (Console)((int)this[0xb] + (int)CVar8)) { - CVar2 = (Console)((int)CVar2 + -1); + if (CVar2 == (Console)(GHIDRA_INT(this[0xb]) + GHIDRA_INT(CVar8))) { + CVar2 = (Console)(GHIDRA_INT(CVar2) + -1); } goto LAB_0068b9c7; } } else if (this[0xb] != (Console)0x0) { CVar2 = (Console)(this + 7); - if (0xf < (uint)this[0xc]) { + if (0xf < GHIDRA_UINT(this[0xc])) { CVar2 = *(Console *)CVar2; } - if ((uint)CVar2 < (uint)this[0x42]) { - CVar2 = (Console)((int)this[0x42] + -1); + if (GHIDRA_UINT(CVar2) < GHIDRA_UINT(this[0x42])) { + CVar2 = (Console)(GHIDRA_INT(this[0x42]) + -1); LAB_0068b9c7: pCVar3 = (Console *)FUN_00684e70(&local_28,CVar2); this[0x42] = *pCVar3; @@ -3227,15 +3227,15 @@ byte Console::update_state() void *room; messageDeque = pickup[0x10]; - for (messageIndex = pickup[0x13]; messageIndex != (Console)((int)pickup[0x14] + (int)pickup[0x13]); - messageIndex = (Console)((int)messageIndex + 1)) { + for (messageIndex = pickup[0x13]; messageIndex != (Console)(GHIDRA_INT(pickup[0x14]) + GHIDRA_INT(pickup[0x13])); + messageIndex = (Console)(GHIDRA_INT(messageIndex) + 1)) { if (messageDeque == (Console)0x0) { iVar1 = 0; } else { iVar1 = *(int *)messageDeque; } - if (*(int *)(*(int *)(*(int *)(iVar1 + 4) + (*(int *)(iVar1 + 8) - 1U & (uint)messageIndex) * 4) + if (*(int *)(*(int *)(*(int *)(iVar1 + 4) + (*(int *)(iVar1 + 8) - 1U & GHIDRA_UINT(messageIndex)) * 4) + 0x18) == 0) break; if (messageDeque == (Console)0x0) { iVar1 = 0; @@ -3244,7 +3244,7 @@ byte Console::update_state() iVar1 = *(int *)messageDeque; } messageTtl = (int *)(*(int *)(*(int *)(iVar1 + 4) + - (*(int *)(iVar1 + 8) - 1U & (uint)messageIndex) * 4) + 0x18); + (*(int *)(iVar1 + 8) - 1U & GHIDRA_UINT(messageIndex)) * 4) + 0x18); *messageTtl = *messageTtl + -1; } if (*pickup != (Console)0x0) { @@ -3272,8 +3272,8 @@ byte Console::update_state() *pickup = (Console)0x2; messageIndex = (Console)0x2; case (Console)0x2: - if ((0xe < (int)pickup[1]) || - (easedHeight = 1.0 - (float)(int)pickup[1] / 14.0, + if ((0xe < GHIDRA_INT(pickup[1])) || + (easedHeight = 1.0 - (float)GHIDRA_INT(pickup[1]) / 14.0, CVar2 = (Console)((1.0 - easedHeight * easedHeight) * (float)messageDeque), pickup[4] = CVar2 , (float)messageDeque <= (float)CVar2)) { pickup[4] = messageDeque; @@ -3284,19 +3284,19 @@ byte Console::update_state() messageIndex = (Console)0x2; break; case (Console)0x4: - messageDeque = (Console)((1.0 - (float)(int)pickup[1] / 14.0) * (float)messageDeque); + messageDeque = (Console)((1.0 - (float)GHIDRA_INT(pickup[1]) / 14.0) * (float)messageDeque); pickup[4] = messageDeque; if ((float)messageDeque <= 0.0) { *pickup = (Console)0x0; messageIndex = (Console)0x0; } } - pickup[0x43] = (Console)((int)pickup[0x43] + 1); - pickup[1] = (Console)((int)pickup[1] + 1); - pickup[0x43] = (Console)(-(uint)((uint)pickup[0x43] < 0x1e) & (uint)pickup[0x43]); + pickup[0x43] = (Console)(GHIDRA_INT(pickup[0x43]) + 1); + pickup[1] = (Console)(GHIDRA_INT(pickup[1]) + 1); + pickup[0x43] = (Console)(-GHIDRA_UINT((GHIDRA_UINT(pickup[0x43]) < 0x1e)) & GHIDRA_UINT(pickup[0x43])); if (messageIndex != (Console)0x0) { if ((g_manager->_netplayManager == *(NetplayManager *)(g_manager + 1)) || - (((int)*(NetplayManager *)(g_manager + 1) - (int)g_manager->_netplayManager & 0xfffffffcU) + ((GHIDRA_INT(*(NetplayManager *)(g_manager + 1)) - GHIDRA_INT(g_manager->_netplayManager) & 0xfffffffcU) == 4)) { return 1; } @@ -3356,22 +3356,22 @@ void * Console::RenderHistory(Font *font, float unk, float unk2, byte unk3) local_8 = 0xffffffff; puStack_c = &LAB_00af8f28; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(glyphBuffer + 0x8c); + local_14 = __security_cookie ^ GHIDRA_UINT((glyphBuffer + 0x8c)); renderFont = font; pCVar5 = &local_44; - if ((int)this[2] < (int)this[0x14] + -1) { + if (GHIDRA_INT(this[2]) < GHIDRA_INT(this[0x14]) + -1) { pCVar5 = this + 2; } - local_44 = (Console)((int)this[0x14] + -1); + local_44 = (Console)(GHIDRA_INT(this[0x14]) + -1); fadeMult = 1.0; local_3c = *pCVar5; local_44 = (Console)(this + 0x10); pCVar5 = this + 3; - local_40 = (Console)(*(int *)(*(int *)((int)this[0x11] + - ((int)this[0x12] - 1U & (int)local_3c + (int)this[0x13]) * 4 + local_40 = (Console)(*(int *)(*(int *)(GHIDRA_INT(this[0x11]) + + (GHIDRA_INT(this[0x12]) - 1U & GHIDRA_INT(local_3c) + GHIDRA_INT(this[0x13])) * 4 ) + 0x24) + -1); pCVar6 = &local_40; - if ((int)*pCVar5 < (int)local_40) { + if (GHIDRA_INT(*pCVar5) < GHIDRA_INT(local_40)) { pCVar6 = pCVar5; } historyProxy = *pCVar6; @@ -3381,7 +3381,7 @@ void * Console::RenderHistory(Font *font, float unk, float unk2, byte unk3) else { historyProxy = *(Console *)local_44; } - historyIndex = (void *)((int)local_3c + (int)this[0x13]); + historyIndex = (void *)(GHIDRA_INT(local_3c) + GHIDRA_INT(this[0x13])); if (in_XMM3_Da + unk <= 0.0) { return pCVar5; } @@ -3389,7 +3389,7 @@ void * Console::RenderHistory(Font *font, float unk, float unk2, byte unk3) textX = in_XMM2_Da; textY = in_XMM3_Da; LAB_0068be32: - pvVar1 = (void *)((int)*(Console *)((char *)local_44 + 0x10) + (int)*(Console *)((char *)local_44 + 0xc) + pvVar1 = (void *)(GHIDRA_INT(*(Console *)((char *)local_44 + 0x10)) + GHIDRA_INT(*(Console *)((char *)local_44 + 0xc)) ); if (historyIndex == pvVar1) { ExceptionList = local_10; @@ -3403,7 +3403,7 @@ LAB_0068be32: } local_28._unk = 0; uVar8 = *(uint *)(*(int *)(*(int *)(iVar3 + 4) + - (*(int *)(iVar3 + 8) - 1U & (uint)historyIndex) * 4) + 0x1c); + (*(int *)(iVar3 + 8) - 1U & GHIDRA_UINT(historyIndex)) * 4) + 0x1c); red = ((float)(uVar8 >> 0x10 & 0xff) + 0.0) / 255.0; green = ((float)(uVar8 >> 8 & 0xff) + 0.0) / 255.0; blue = ((float)(uVar8 & 0xff) + 0.0) / 255.0; @@ -3418,7 +3418,7 @@ LAB_0068be32: iVar3 = *(int *)historyProxy; } iVar3 = *(int *)(*(int *)(*(int *)(iVar3 + 4) + - (*(int *)(iVar3 + 8) - 1U & (uint)historyIndex) * 4) + 0x18); + (*(int *)(iVar3 + 8) - 1U & GHIDRA_UINT(historyIndex)) * 4) + 0x18); ageFade = (float)((double)iVar3 + __uint_to_double_fixup[-(iVar3 >> 0x1f)]) / 90.0; if (ageFade <= 0.0) { ageFade = 0.0; @@ -3438,7 +3438,7 @@ LAB_0068be32: local_28._red = red; local_28._green = green; local_28._blue = blue; - if (*(int *)(*(int *)(*(int *)(iVar3 + 4) + (*(int *)(iVar3 + 8) - 1U & (uint)historyIndex) * 4) + + if (*(int *)(*(int *)(*(int *)(iVar3 + 4) + (*(int *)(iVar3 + 8) - 1U & GHIDRA_UINT(historyIndex)) * 4) + 0x20) != 0) { if (historyProxy == (Console)0x0) { iVar3 = 0; @@ -3447,9 +3447,9 @@ LAB_0068be32: iVar3 = *(int *)historyProxy; } puVar7 = *(undefined4 **) - (*(int *)(iVar3 + 4) + (*(int *)(iVar3 + 8) - 1U & (uint)historyIndex) * 4); + (*(int *)(iVar3 + 4) + (*(int *)(iVar3 + 8) - 1U & GHIDRA_UINT(historyIndex)) * 4); puVar2 = puVar7; - if (0xf < (uint)puVar7[5]) { + if (0xf < GHIDRA_UINT(puVar7[5])) { puVar2 = (undefined4 *)*puVar7; } if (historyProxy == (Console)0x0) { @@ -3459,9 +3459,9 @@ LAB_0068be32: iVar3 = *(int *)historyProxy; } local_40 = (Console)(*(int *)(*(int *)(*(int *)(iVar3 + 4) + - (*(int *)(iVar3 + 8) - 1U & (uint)historyIndex) * 4) + - 0x20) + (int)historyProxy * 2); - lineEnd = (byte *)(puVar7[4] + (int)puVar2); + (*(int *)(iVar3 + 8) - 1U & GHIDRA_UINT(historyIndex)) * 4) + + 0x20) + GHIDRA_INT(historyProxy) * 2); + lineEnd = (byte *)(puVar7[4] + GHIDRA_INT(puVar2)); do { if (historyProxy == (Console)0x0) { iVar3 = 0; @@ -3470,16 +3470,16 @@ LAB_0068be32: iVar3 = *(int *)historyProxy; } puVar7 = *(undefined4 **) - (*(int *)(iVar3 + 4) + (*(int *)(iVar3 + 8) - 1U & (uint)historyIndex) * 4); - if (0xf < (uint)puVar7[5]) { + (*(int *)(iVar3 + 4) + (*(int *)(iVar3 + 8) - 1U & GHIDRA_UINT(historyIndex)) * 4); + if (0xf < GHIDRA_UINT(puVar7[5])) { puVar7 = (undefined4 *)*puVar7; } - text = (byte *)((uint)*(ushort *)local_40 + (int)puVar7); + text = (byte *)(GHIDRA_UINT(*(ushort *)local_40) + GHIDRA_INT(puVar7)); local_28._alpha = 0.0; local_28._unk = 0xf; local_2c = (byte *******)0x0; if (text != lineEnd) { - ((std::string *)((char *)&local_2c))->std::string::assign(text,(int)lineEnd - (int)text); + ((std::string *)((char *)&local_2c))->std::string::assign(text,GHIDRA_INT(lineEnd) - GHIDRA_INT(text)); } fontSettings = 0; local_68 = 0xffff; @@ -3490,12 +3490,12 @@ LAB_0068be32: local_54 = 0; local_8 = 1; pppppppbVar4 = (byte *******)&local_2c; - if (0xf < (uint)local_28._unk) { + if (0xf < GHIDRA_UINT(local_28._unk)) { pppppppbVar4 = local_2c; } pvVar1 = Font::measure_string (renderFont,glyphBuffer,(byte *)pppppppbVar4,&fontSettings,&g_vectorOne); - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); color._green = green; color._red = red; color._blue = blue; @@ -3513,17 +3513,17 @@ LAB_0068be32: } local_8 = 0xffffffff; if (*(ushort *)local_40 == 0) goto LAB_0068c183; - if (0xf < (uint)local_28._unk) { + if (0xf < GHIDRA_UINT(local_28._unk)) { uVar8 = local_28._unk + 1; pppppppbVar4 = local_2c; if (0xfff < uVar8) { pppppppbVar4 = (byte *******)local_2c[-1]; uVar8 = local_28._unk + 0x24; - if ((byte *)0x1f < (byte *)((int)local_2c + (-4 - (int)pppppppbVar4))) goto LAB_0068c2aa; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(local_2c) + (-4 - GHIDRA_INT(pppppppbVar4)))) goto LAB_0068c2aa; } operator_delete(pppppppbVar4,uVar8); } - local_40 = (Console)((int)historyProxy + 2); + local_40 = (Console)(GHIDRA_INT(historyProxy) + 2); lineEnd = text; } while( true ); } @@ -3541,7 +3541,7 @@ LAB_0068be32: else { iVar3 = *(int *)historyProxy; } - lineEnd = *(byte **)(*(int *)(iVar3 + 4) + (*(int *)(iVar3 + 8) - 1U & (uint)historyIndex) * 4); + lineEnd = *(byte **)(*(int *)(iVar3 + 4) + (*(int *)(iVar3 + 8) - 1U & GHIDRA_UINT(historyIndex)) * 4); if (0xf < *(uint *)(lineEnd + 0x14)) { lineEnd = *(byte **)lineEnd; } @@ -3557,13 +3557,13 @@ LAB_0068be32: goto LAB_0068c27f; LAB_0068c183: local_8 = 0xffffffff; - if (0xf < (uint)local_28._unk) { + if (0xf < GHIDRA_UINT(local_28._unk)) { uVar8 = local_28._unk + 1; pppppppbVar4 = local_2c; if (0xfff < uVar8) { pppppppbVar4 = (byte *******)local_2c[-1]; uVar8 = local_28._unk + 0x24; - if ((byte *)0x1f < (byte *)((int)local_2c + (-4 - (int)pppppppbVar4))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(local_2c) + (-4 - GHIDRA_INT(pppppppbVar4)))) { LAB_0068c2aa: local_8 = 0xffffffff; /* WARNING: Subroutine does not return */ @@ -3583,7 +3583,7 @@ LAB_0068c277: } } LAB_0068c27f: - historyIndex = (void *)((int)historyIndex + 1); + historyIndex = (void *)(GHIDRA_INT(historyIndex) + 1); if (textY + unk <= 0.0) { ExceptionList = local_10; return pvVar1; @@ -3650,7 +3650,7 @@ void Console::Render() local_14 = (byte ***)0xffffffff; puStack_18 = &LAB_00af8fae; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(segmentText + 0x14); + local_24 = __security_cookie ^ GHIDRA_UINT((segmentText + 0x14)); ExceptionList = &local_1c; iVar7 = (g_manager->_optionsConfig)._consoleFont; if (iVar7 == 0) { @@ -3730,7 +3730,7 @@ LAB_0068c393: pvVar1 = render_quad_set_uniform_color (quadBuf,0.0,(float)this[4] - 2.0,g_screenWidth,(float)this[4],&quadColor); render_color_shader_pass(pvVar1); - iVar7 = 5 - ((int)this[0xe] - (int)this[0xd] >> 1); + iVar7 = 5 - (GHIDRA_INT(this[0xe]) - GHIDRA_INT(this[0xd]) >> 1); lineY = ((float)this[4] - lineHeight) - 3.0; if (-1 < iVar7) { CVar6 = (Console)(this + iVar7 * 6 + 0x1d); @@ -3744,12 +3744,12 @@ LAB_0068c393: local_28 = 0; local_14 = (byte ***)0x0; CVar2 = CVar6; - if (0xf < (uint)*(Console *)((char *)CVar6 + 0x14)) { + if (0xf < GHIDRA_UINT(*(Console *)((char *)CVar6 + 0x14))) { CVar2 = *(Console *)CVar6; } pvVar1 = ((Font *)(local_80))->Font::measure_string(&quadColor._green,(byte *)CVar2,&local_40,&g_vectorOne) ; - local_14 = (byte ***)CONCAT31(local_14._1_3_,1); + local_14 = (byte ***)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); color._blue = 0.8862745; color._red = 0.5411765; color._green = 0.16862746; @@ -3758,7 +3758,7 @@ LAB_0068c393: Font::render_glyph_quads(local_80,pvVar1,10.0,lineY + fontOffsetY,1.0,1.0,color,&local_40); std::vector<12byte>::clear(); std::vector<12byte>::_Tidy(); - CVar6 = (Console)((int)CVar6 + -0x18); + CVar6 = (Console)(GHIDRA_INT(CVar6) + -0x18); iVar7 = iVar7 + -1; local_14 = (byte ***)0xffffffff; lineY = lineY - lineHeight; @@ -3768,10 +3768,10 @@ LAB_0068c393: cursorX = (float)&DAT_bf800000; local_98 = (Console)(this + 7); CVar6 = local_98; - if (0xf < (uint)this[0xc]) { + if (0xf < GHIDRA_UINT(this[0xc])) { CVar6 = *(Console *)local_98; } - CVar6 = (Console)((int)this[0xb] + (int)CVar6); + CVar6 = (Console)(GHIDRA_INT(this[0xb]) + GHIDRA_INT(CVar6)); local_90 = local_8c[0xe]; CVar2 = CVar6; if (local_90 != local_8c[0xd]) { @@ -3780,12 +3780,12 @@ LAB_0068c393: if (0xf < *(uint *)((char *)local_98 + 0x14)) { CVar6 = *(Console *)local_98; } - CVar6 = (Console)((uint)*(ushort *)((char *)local_90 + -2) + (int)CVar6); + CVar6 = (Console)(GHIDRA_UINT(*(ushort *)((char *)local_90 + -2)) + GHIDRA_INT(CVar6)); local_50 = 0; segmentTextCapacity = 0xf; segmentText[0] = (byte ****)0x0; if (CVar6 != CVar2) { - ((std::string *)((char *)segmentText))->std::string::assign((byte *)CVar6,(int)CVar2 - (int)CVar6); + ((std::string *)((char *)segmentText))->std::string::assign((byte *)CVar6,GHIDRA_INT(CVar2) - GHIDRA_INT(CVar6)); } local_40 = 0; local_3c = (byte ****)0xffff; @@ -3801,7 +3801,7 @@ LAB_0068c393: } pvVar1 = Font::measure_string (local_80,&quadColor._green,(byte *)ppppbVar3,&local_40,&g_vectorOne); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; color_00._blue = 0.18431373; color_00._red = 0.6784314; color_00._green = 1.0; @@ -3810,14 +3810,14 @@ LAB_0068c393: Font::render_glyph_quads(local_80,pvVar1,10.0,lineY + fontOffsetY,1.0,1.0,color_00,&local_40); std::vector<12byte>::clear(); std::vector<12byte>::_Tidy(); - local_14 = (byte ***)CONCAT31(local_14._1_3_,2); - if (((cursorX < 0.0) && (CVar4 = local_8c[0x42], (uint)CVar6 <= (uint)CVar4)) && - ((uint)CVar4 <= (uint)CVar2)) { + local_14 = (byte ***)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); + if (((cursorX < 0.0) && (CVar4 = local_8c[0x42], GHIDRA_UINT(CVar6) <= GHIDRA_UINT(CVar4))) && + (GHIDRA_UINT(CVar4) <= GHIDRA_UINT(CVar2))) { local_3c = (byte ****)0x0; local_2c = 0; local_28 = 0xf; if (CVar6 != CVar4) { - ((std::string *)((char *)&local_3c))->std::string::assign((byte *)CVar6,(int)CVar4 - (int)CVar6); + ((std::string *)((char *)&local_3c))->std::string::assign((byte *)CVar6,GHIDRA_INT(CVar4) - GHIDRA_INT(CVar6)); } ppppbVar3 = (byte ****)&local_3c; if (0xf < local_28) { @@ -3831,7 +3831,7 @@ LAB_0068c393: if (0xfff < uVar5) { ppppbVar3 = (byte ****)local_3c[-1]; uVar5 = local_28 + 0x24; - if ((byte *)0x1f < (byte *)((int)local_3c + (-4 - (int)ppppbVar3))) goto LAB_0068c97e; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(local_3c) + (-4 - GHIDRA_INT(ppppbVar3)))) goto LAB_0068c97e; } operator_delete(ppppbVar3,uVar5); } @@ -3845,12 +3845,12 @@ LAB_0068c393: if (0xfff < uVar5) { ppppbVar3 = (byte ****)segmentText[0][-1]; uVar5 = segmentTextCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)segmentText[0] + (-4 - (int)ppppbVar3))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(segmentText[0]) + (-4 - GHIDRA_INT(ppppbVar3)))) goto LAB_0068c97e; } operator_delete(ppppbVar3,uVar5); } - local_90 = (Console)((int)local_90 + -2); + local_90 = (Console)(GHIDRA_INT(local_90) + -2); CVar2 = CVar6; } while (local_90 != local_8c[0xd]); CVar2 = local_98; @@ -3865,7 +3865,7 @@ LAB_0068c393: local_3c = (byte ****)0x0; local_2c = 0; if (CVar4 != local_8c[0x42]) { - ((std::string *)((char *)&local_3c))->std::string::assign((byte *)CVar4,(int)local_8c[0x42] - (int)CVar4); + ((std::string *)((char *)&local_3c))->std::string::assign((byte *)CVar4,GHIDRA_INT(local_8c[0x42]) - GHIDRA_INT(CVar4)); } ppppbVar3 = (byte ****)&local_3c; if (0xf < local_28) { @@ -3879,7 +3879,7 @@ LAB_0068c393: if (0xfff < uVar5) { ppppbVar3 = (byte ****)local_3c[-1]; uVar5 = local_28 + 0x24; - if ((byte *)0x1f < (byte *)((int)local_3c + (-4 - (int)ppppbVar3))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(local_3c) + (-4 - GHIDRA_INT(ppppbVar3)))) { LAB_0068c97e: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3896,7 +3896,7 @@ LAB_0068c99b: lineTextCapacity = 0xf; lineText[0] = (byte ****)0x0; if (CVar2 != CVar6) { - ((std::string *)((char *)lineText))->std::string::assign((byte *)CVar2,(int)CVar6 - (int)CVar2); + ((std::string *)((char *)lineText))->std::string::assign((byte *)CVar2,GHIDRA_INT(CVar6) - GHIDRA_INT(CVar2)); } this_01 = local_80; local_40 = 0; @@ -3913,7 +3913,7 @@ LAB_0068c99b: } pvVar1 = ((Font *)(local_80))->Font::measure_string(&quadColor._green,(byte *)ppppbVar3,&local_40,&g_vectorOne) ; - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; color_01._blue = 0.18431373; color_01._red = 0.6784314; color_01._green = 1.0; @@ -3924,8 +3924,8 @@ LAB_0068c99b: std::vector<12byte>::_Tidy(); this_00 = local_8c; lineY = lineY - lineHeight; - local_14 = (byte ***)CONCAT31(local_14._1_3_,5); - if ((uint)local_8c[0x43] < 0xf) { + local_14 = (byte ***)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),5); + if (GHIDRA_UINT(local_8c[0x43]) < 0xf) { CVar6 = (Console)(cursorY + lineHeight); quadColor._unk = 0; right = (Console *)(cursorX + 3.0); @@ -4008,7 +4008,7 @@ LAB_0068c99b: if (0xfff < uVar5) { ppppbVar3 = (byte ****)lineText[0][-1]; uVar5 = lineTextCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)lineText[0] + (-4 - (int)ppppbVar3))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(lineText[0]) + (-4 - GHIDRA_INT(ppppbVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -4140,24 +4140,24 @@ void Console::RunCommand(std_string *command, std_string *output, Entity_Player local_8 = 0xffffffff; puStack_c = &LAB_00af9745; local_10 = ExceptionList; - stackCookie = __security_cookie ^ (uint)&(&local_2c)[1]._size; + stackCookie = __security_cookie ^ GHIDRA_UINT(&(&local_2c)[1]._size); ExceptionList = &local_10; local_208 = player; local_21c = (EntityList *)0x0; local_20c = (Entity *)entityConfig; string_split(&tokensBegin,command,0x20); - local_8._0_1_ = 0; - local_8._1_3_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0; if (player == (Entity_Player *)0x0) { player = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::GetPlayer(0); local_208 = player; } cVar1 = FUN_004561f0(); iVar16 = tokensBegin; - if ((cVar1 == '\0') || ((uint)((tokensEnd - tokensBegin) / 0x18) < 2)) { + if ((cVar1 == '\0') || (GHIDRA_UINT(((tokensEnd - tokensBegin) / 0x18)) < 2)) { cVar1 = FUN_004561f0(); if (cVar1 != '\0') { - if ((1 < (uint)((tokensEnd - tokensBegin) / 0x18)) && (cVar1 = FUN_004561f0(), cVar1 != '\0')) + if ((1 < GHIDRA_UINT(((tokensEnd - tokensBegin) / 0x18))) && (cVar1 = FUN_004561f0(), cVar1 != '\0')) { local_7c[8] = '\0'; local_7c[9] = '\0'; @@ -4173,12 +4173,12 @@ void Console::RunCommand(std_string *command, std_string *output, Entity_Player uVar5 = Random(); pEVar13 = (Entity_NPC *)(&DAT_00c33d80 + (uVar5 % 0x3b) * 4); local_204 = pEVar13; - if (1 < (uint)((tokensEnd - tokensBegin) / 0x18)) { + if (1 < GHIDRA_UINT(((tokensEnd - tokensBegin) / 0x18))) { cVar1 = FUN_004561f0(); if (cVar1 == '\0') { pvVar8 = (void *)FUN_004143f0(); ((std::string *)(local_c4))->std::string::string(pvVar8); - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; uVar5 = FUN_00414410(); if (2 < uVar5) { uVar20 = 2; @@ -4187,11 +4187,11 @@ void Console::RunCommand(std_string *command, std_string *output, Entity_Player do { FUN_004143f0(); FUN_00421620(); - local_8._0_1_ = 9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; FUN_00651d50(); FUN_004215a0(); ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; ((std::string *)(local_2c._buf))->std::string::_Tidy_deallocate(); uVar20 = uVar20 + 1; uVar5 = FUN_00414410(); @@ -4209,20 +4209,20 @@ void Console::RunCommand(std_string *command, std_string *output, Entity_Player pEVar13 = local_1fc; sprintf_s(entityIdText,0x20,(byte *)"%d.%d"); ((std::string *)(local_ac._buf))->std::string::string_from_cstr(entityIdText); - local_8._0_1_ = 10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 10; entityConfig = (EntityConfig *)FUN_00417910(); entityConfigEntry = EntityConfig::GetEntity - (entityConfig,(int)*(void **)pEVar13,*(uint *)&(*(undefined1 *)((char *)(pEVar13) + 0x4)),0); + (entityConfig,GHIDRA_INT(*(void **))pEVar13,*(uint *)&(*(undefined1 *)((char *)(pEVar13) + 0x4)),0); ((std::string *)(local_7c))->std::string::string_from_cstr((byte *)"unknown"); - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; if (entityConfigEntry != (EntityConfig_Entity *)0x0) { ((EntityConfig_Entity *)(entityConfigEntry))->EntityConfig_Entity::GetName((std_string *)(local_5c + 0x10),0); FUN_004215a0(); ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); } ((std::string *)(local_94._buf))->std::string::string(local_7c); - local_8._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc; FUN_00684e50(); std::basic_string,std::allocator_>::end ((basic_string,std::allocator_> *)local_7c); @@ -4239,14 +4239,14 @@ void Console::RunCommand(std_string *command, std_string *output, Entity_Player } ((std::string *)(local_94._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_7c))->std::string::_Tidy_deallocate(); - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; ((std::string *)(local_ac._buf))->std::string::_Tidy_deallocate(); local_200 = local_200 + 1; local_1fc = (Entity_NPC *)&(local_1fc->_damageEvents)._capacity; } while (local_200 < 0x3b); pEVar13 = local_204; LAB_0068d936: - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; ((std::string *)(local_c4))->std::string::_Tidy_deallocate(); } else { @@ -4265,14 +4265,14 @@ LAB_0068d936: std::string::string_from_cstr (local_94._buf, (byte *)"Failed to spawn delirious boss: unsupported ID or Variant.\n"); - local_8._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xd; } else { playerManager = (PlayerManager *)((Game *)(g_game))->Game::GetPlayerManager(); pEVar18 = ((PlayerManager *)(playerManager))->PlayerManager::GetPlayer(0); ((Entity_Player *)(pEVar18))->Entity_Player::console_spawn((int *)pEVar13,1); ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"Spawned delirious boss.\n"); - local_8._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xe; } goto LAB_0068d95d; } @@ -4285,7 +4285,7 @@ LAB_0068d936: uVar5 = FUN_00414410(); if (uVar5 < 2) { ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"Cleared forced room.\n"); - local_8._0_1_ = 0x16; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x16; Print(entityConfig,&local_94,0xffd3d3d3,0x96); ((std::string *)(local_94._buf))->std::string::_Tidy_deallocate(); DAT_00bf9428 = 0xffffffff; @@ -4302,16 +4302,16 @@ LAB_0068d936: if ((local_1e5 == 0x73) || (local_1e5 == 0x78)) { FUN_004143f0(); FUN_00651a90(); - local_8._0_1_ = 0x17; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x17; string_split(local_c4 + 0xc,&local_ac,0x2e); - local_8._0_1_ = 0x18; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x18; psVar9 = (std_string *)FUN_004143f0(); iVar16 = RoomConfig::GetStageIdByName(psVar9); - local_8._0_1_ = 0x17; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x17; std::vector::_Tidy(); iVar4 = 0; string_split(&local_70,&local_ac,0x2e); - local_8._0_1_ = 0x19; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x19; uVar5 = FUN_00414410(); if (1 < uVar5) { pRVar11 = (Room *)FUN_004143f0(); @@ -4332,7 +4332,7 @@ LAB_0068d936: DAT_00bf9424 = iVar16; DAT_00c71668 = iVar4; std::vector::_Tidy(); - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; ((std::string *)(local_ac._buf))->std::string::_Tidy_deallocate(); } else if (local_1e5 == 100) { @@ -4351,7 +4351,7 @@ LAB_0068d936: roomConfigs = (RoomConfig *)FUN_00421790(); psVar9 = RoomConfig::GetStageDisplayName (roomConfigs,(std_string *)(local_5c + 0x10),DAT_00bf9428,0); - local_8._0_1_ = 0x1a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1a; ((std::string *)(psVar9->_buf))->std::string::c_str(); print_format(); ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); @@ -4365,7 +4365,7 @@ LAB_0068d936: bVar2 = 0x2e; psVar9 = (std_string *)FUN_004143f0(); string_split(&local_70,psVar9,bVar2); - local_8._0_1_ = 0x1b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1b; local_1fc = (Entity_NPC *)0x0; iVar16 = FUN_00414410(); if (iVar16 != 0) { @@ -4469,7 +4469,7 @@ LAB_0068d936: playerManager = (PlayerManager *)((Game *)(g_game))->Game::GetPlayerManager(); ((PlayerManager *)(playerManager))->PlayerManager::trigger_new_room_effects(); ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"Changed stage.\n"); - local_8._0_1_ = 0x1c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1c; goto LAB_0068d95d; } psVar9 = (std_string *)FUN_004143f0(); @@ -4484,17 +4484,17 @@ LAB_0068d936: bVar2 = ((Game *)(g_game))->Game::GetDebugFlag(uVar5); if (bVar2 == 0) { ((std::string *)(local_ac._buf))->std::string::string_from_cstr((byte *)"Disabled debug flag.\n"); - local_8._0_1_ = 0x1e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1e; Print(entityConfig,&local_ac,0xffd3d3d3,0x96); psVar9 = &local_ac; } else { ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"Enabled debug flag.\n"); - local_8._0_1_ = 0x1d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1d; Print(entityConfig,&local_94,0xffd3d3d3,0x96); psVar9 = &local_94; } - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; ((std::string *)(psVar9->_buf))->std::string::_Tidy_deallocate(); } if (uVar5 == 8) { @@ -4575,12 +4575,12 @@ LAB_0068e674: itemCount = (Entity *)((std::vector *)(pvVar8))->std::vector::size(); if (pEVar19 < itemCount) { itemConfig = Isaac::GetItemConfig(); - configItem = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible((int)pEVar19); + configItem = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(GHIDRA_INT(pEVar19)); if (configItem != (ItemConfig_Item *)0x0) { if (local_1f5 == '\0') { iVar16 = ((Game *)(g_game))->Game::Challenge(); if (iVar16 == 0x2b) { - ((Entity_Player *)(player))->Entity_Player::AddItemCard((uint)pEVar19); + ((Entity_Player *)(player))->Entity_Player::AddItemCard(GHIDRA_UINT(pEVar19)); } else { iVar16 = ((Entity_Player *)(player))->Entity_Player::GetBatteryCharge(0); @@ -4600,11 +4600,11 @@ LAB_0068e674: } pEVar19 = local_20c; } - Entity_Player::AddCollectible(player,(int)pEVar19,-1,1,0,0,0); + Entity_Player::AddCollectible(player,GHIDRA_INT(pEVar19),-1,1,0,0,0); } } else { - ((Entity_Player *)(player))->Entity_Player::RemoveCollectible((uint)pEVar19,0,0,1); + ((Entity_Player *)(player))->Entity_Player::RemoveCollectible(GHIDRA_UINT(pEVar19),0,0,1); } } goto LAB_0069249e; @@ -4618,7 +4618,7 @@ LAB_0068e674: itemCount = (Entity *)((std::vector *)(pvVar8))->std::vector::size(); if (pEVar19 < itemCount) { itemConfig = Isaac::GetItemConfig(); - configItem = ((ItemConfig *)(itemConfig))->ItemConfig::GetTrinket((uint)pEVar19); + configItem = ((ItemConfig *)(itemConfig))->ItemConfig::GetTrinket(GHIDRA_UINT(pEVar19)); if (configItem != (ItemConfig_Item *)0x0) { if (local_1f5 == '\0') { iVar16 = ((Entity_Player *)(player))->Entity_Player::GetMaxTrinkets(); @@ -4628,12 +4628,12 @@ LAB_0068e674: ((Entity_Player *)(player))->Entity_Player::TryRemoveTrinket(uVar5); } if (local_1e5 == 0x54) { - pEVar19 = (Entity *)((uint)pEVar19 | 0x8000); + pEVar19 = (Entity *)(GHIDRA_UINT(pEVar19) | 0x8000); } - ((Entity_Player *)(player))->Entity_Player::AddTrinket((int)pEVar19,1); + ((Entity_Player *)(player))->Entity_Player::AddTrinket(GHIDRA_INT(pEVar19),1); } else { - ((Entity_Player *)(player))->Entity_Player::TryRemoveTrinket((uint)pEVar19); + ((Entity_Player *)(player))->Entity_Player::TryRemoveTrinket(GHIDRA_UINT(pEVar19)); } } goto LAB_0069249e; @@ -4647,7 +4647,7 @@ LAB_0068e674: if (pEVar19 < itemCount) { if (local_1f5 == '\0') { itemPool = (ItemPool *)((Game *)(g_game))->Game::GetItemPool(); - uVar5 = ((ItemPool *)(itemPool))->ItemPool::ForceAddPillEffect((int)pEVar19); + uVar5 = ((ItemPool *)(itemPool))->ItemPool::ForceAddPillEffect(GHIDRA_INT(pEVar19)); if (local_1e5 == 0x50) { uVar5 = uVar5 | 0x800; } @@ -4656,7 +4656,7 @@ LAB_0068e674: } std::string::string_from_cstr (local_94._buf,(byte *)"Removing pills has not been implemented.\n"); - local_8._0_1_ = 0x22; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x22; goto LAB_0068d95d; } } @@ -4668,27 +4668,27 @@ LAB_0068e674: itemCount = (Entity *)((std::vector *)(pvVar8))->std::vector::size(); if (itemCount <= pEVar19) goto LAB_0068e806; if (local_1f5 == '\0') { - ((Entity_Player *)(player))->Entity_Player::AddCard((int)pEVar19); + ((Entity_Player *)(player))->Entity_Player::AddCard(GHIDRA_INT(pEVar19)); goto LAB_0069249e; } std::string::string_from_cstr (local_94._buf,(byte *)"Removing cards has not been implemented.\n"); - local_8._0_1_ = 0x21; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x21; goto LAB_0068d95d; } if (local_1f5 == '\0') { ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"What are you trying to do?\n"); - local_8._0_1_ = 0x20; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x20; Print(entityConfig,&local_94,0xffd3d3d3,0x96); - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; ((std::string *)(local_94._buf))->std::string::_Tidy_deallocate(); } else { std::string::string_from_cstr (local_94._buf,(byte *)"Restoring player to zero collectibles/trinkets.\n"); - local_8._0_1_ = 0x1f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1f; Print(entityConfig,&local_94,0xffd3d3d3,0x96); - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; ((std::string *)(local_94._buf))->std::string::_Tidy_deallocate(); uVar20 = 1; Isaac::GetItemConfig(); @@ -4723,7 +4723,7 @@ LAB_0068e674: LAB_0068e806: pvVar8 = (void *)FUN_004143f0(); ((std::string *)(local_7c))->std::string::string(pvVar8); - local_8._0_1_ = 0x23; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x23; uVar5 = FUN_00414410(); if (2 < uVar5) { uVar20 = 2; @@ -4732,11 +4732,11 @@ LAB_0068e806: do { FUN_004143f0(); FUN_00421620(); - local_8._0_1_ = 0x24; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x24; FUN_00651d50(); FUN_004215a0(); ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); - local_8._0_1_ = 0x23; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x23; ((std::string *)(local_2c._buf))->std::string::_Tidy_deallocate(); uVar20 = uVar20 + 1; uVar5 = FUN_00414410(); @@ -4764,7 +4764,7 @@ LAB_0068e806: configItem = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(uVar5); if (configItem != (ItemConfig_Item *)0x0) { ((ItemConfig_Item *)(configItem))->ItemConfig_Item::GetLocalizedName((std_string *)local_c4,0); - local_8._0_1_ = 0x25; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x25; FUN_00684e50(); std::basic_string,std::allocator_>::end ((basic_string,std::allocator_> *)local_c4 @@ -4813,7 +4813,7 @@ LAB_0068e806: } goto LAB_0069249e; } - local_8._0_1_ = 0x23; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x23; ((std::string *)(local_c4))->std::string::_Tidy_deallocate(); } uVar5 = uVar5 + 1; @@ -4832,7 +4832,7 @@ LAB_0068e806: configItem = ((ItemConfig *)(itemConfig))->ItemConfig::GetTrinket(uVar5); if (configItem != (ItemConfig_Item *)0x0) { ((ItemConfig_Item *)(configItem))->ItemConfig_Item::GetLocalizedName(&local_ac,0); - local_8._0_1_ = 0x26; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x26; FUN_00684e50(); std::basic_string,std::allocator_>::end ((basic_string,std::allocator_> *) @@ -4858,7 +4858,7 @@ LAB_0068e806: ((std::string *)(local_ac._buf))->std::string::_Tidy_deallocate(); goto LAB_0068ef6d; } - local_8._0_1_ = 0x23; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x23; ((std::string *)(local_ac._buf))->std::string::_Tidy_deallocate(); } uVar5 = uVar5 + 1; @@ -4918,7 +4918,7 @@ LAB_0068ef7a: } pvVar8 = (void *)FUN_004143f0(); ((std::string *)(local_7c))->std::string::string(pvVar8); - local_8._0_1_ = 0x27; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x27; uVar5 = FUN_00414410(); if (2 < uVar5) { uVar20 = 2; @@ -4927,11 +4927,11 @@ LAB_0068ef7a: do { FUN_004143f0(); FUN_00421620(); - local_8._0_1_ = 0x28; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x28; FUN_00651d50(); FUN_004215a0(); ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); - local_8._0_1_ = 0x27; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x27; ((std::string *)(local_2c._buf))->std::string::_Tidy_deallocate(); uVar20 = uVar20 + 1; uVar5 = FUN_00414410(); @@ -4959,7 +4959,7 @@ LAB_0068ef7a: configItem = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(uVar5); if (configItem != (ItemConfig_Item *)0x0) { ((ItemConfig_Item *)(configItem))->ItemConfig_Item::GetLocalizedName(&local_ac,0); - local_8._0_1_ = 0x29; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x29; FUN_00684e50(); std::basic_string,std::allocator_>::end ((basic_string,std::allocator_> *) @@ -4973,7 +4973,7 @@ LAB_0068ef7a: ((std::string *)(local_7c))->std::string::_Tidy_deallocate(); goto LAB_0069249e; } - local_8._0_1_ = 0x27; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x27; ((std::string *)(local_ac._buf))->std::string::_Tidy_deallocate(); } uVar5 = uVar5 + 1; @@ -5000,7 +5000,7 @@ LAB_0068ef7a: local_1fc = pEVar13; } ((Entity_Player *)(player))->Entity_Player::ClearCostumes(); - if (0 < (int)pEVar13) { + if (0 < GHIDRA_INT(pEVar13)) { iVar16 = 0; do { do { @@ -5012,7 +5012,7 @@ LAB_0068ef7a: } while (configItem->type != 1); ((Entity_Player *)(player))->Entity_Player::AddCostume(configItem,0); iVar16 = iVar16 + 1; - } while (iVar16 < (int)local_1fc); + } while (iVar16 < GHIDRA_INT(local_1fc)); } goto LAB_00692495; } @@ -5065,10 +5065,10 @@ LAB_0068f438: if (uVar5 < 2) { seeds = (Seeds *)((Game *)(g_game))->Game::GetSeeds(); ((Seeds *)(seeds))->Seeds::GetStartSeedString(&local_ac); - local_8._0_1_ = 0x35; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x35; Print(entityConfig,&local_ac,0xffd3d3d3,0x96); ((std::string *)(local_94._buf))->std::string::string_from_cstr(&DAT_00b66310); - local_8._0_1_ = 0x36; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x36; Print(entityConfig,&local_94,0xffd3d3d3,0x96); ((std::string *)(local_94._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_ac._buf))->std::string::_Tidy_deallocate(); @@ -5076,24 +5076,24 @@ LAB_0068f438: else { pvVar8 = (void *)FUN_004143f0(); ((std::string *)(local_7c))->std::string::string(pvVar8); - local_8._0_1_ = 0x2f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2f; uVar5 = FUN_00414410(); if (2 < uVar5) { FUN_004143f0(); FUN_004143f0(); FUN_00694170(); - local_8._0_1_ = 0x30; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x30; in_stack_fffffd98 = 0x68f7e0; FUN_00651d50(); FUN_004215a0(); ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); - local_8._0_1_ = 0x2f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2f; ((std::string *)(local_2c._buf))->std::string::_Tidy_deallocate(); } bVar2 = Seeds::IsStringValidSeed((std_string *)local_7c); if (bVar2 == 0) { ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"Invalid seed.\n"); - local_8._0_1_ = 0x34; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x34; } else { ((Game *)(g_game))->Game::GetSeeds(); @@ -5105,18 +5105,18 @@ LAB_0068f438: uStack_27c = 0x68f84a; ((std::string *)(auStack_2c0 + 0x4c))->std::string::string(local_7c); seed._buf[4] = (char)in_stack_fffffd90; - seed._buf[5] = (char)((uint)in_stack_fffffd90 >> 8); - seed._buf[6] = (char)((uint)in_stack_fffffd90 >> 0x10); - seed._buf[7] = (char)((uint)in_stack_fffffd90 >> 0x18); + seed._buf[5] = (char)(GHIDRA_UINT(in_stack_fffffd90) >> 8); + seed._buf[6] = (char)(GHIDRA_UINT(in_stack_fffffd90) >> 0x10); + seed._buf[7] = (char)(GHIDRA_UINT(in_stack_fffffd90) >> 0x18); seed._buf[0] = (char)in_stack_fffffd8c; - seed._buf[1] = (char)((uint)in_stack_fffffd8c >> 8); - seed._buf[2] = (char)((uint)in_stack_fffffd8c >> 0x10); - seed._buf[3] = (char)((uint)in_stack_fffffd8c >> 0x18); - seed._buf._8_4_ = in_stack_fffffd94; + seed._buf[1] = (char)(GHIDRA_UINT(in_stack_fffffd8c) >> 8); + seed._buf[2] = (char)(GHIDRA_UINT(in_stack_fffffd8c) >> 0x10); + seed._buf[3] = (char)(GHIDRA_UINT(in_stack_fffffd8c) >> 0x18); + (*(undefined4 *)((char *)&(seed._buf) + 0x8)) = in_stack_fffffd94; seed._buf[0xc] = (char)in_stack_fffffd98; - seed._buf[0xd] = (char)((uint)in_stack_fffffd98 >> 8); - seed._buf[0xe] = (char)((uint)in_stack_fffffd98 >> 0x10); - seed._buf[0xf] = (char)((uint)in_stack_fffffd98 >> 0x18); + seed._buf[0xd] = (char)(GHIDRA_UINT(in_stack_fffffd98) >> 8); + seed._buf[0xe] = (char)(GHIDRA_UINT(in_stack_fffffd98) >> 0x10); + seed._buf[0xf] = (char)(GHIDRA_UINT(in_stack_fffffd98) >> 0x18); seed._size = uVar23; seed._capacity = uVar5; ((Seeds *)(seeds))->Seeds::SetStartSeed(seed); @@ -5137,20 +5137,20 @@ LAB_0068f438: std::string::string_from_cstr (local_94._buf, (byte *)"Special seed conflicts with the current stack.\n"); - local_8._0_1_ = 0x32; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x32; } else { ((Game *)(g_game))->Game::GetSeeds(); FUN_009eba40(); ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"Removed special seed.\n"); - local_8._0_1_ = 0x31; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x31; } } else { ((Game *)(g_game))->Game::GetSeeds(); FUN_009eba00(); ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"Added special seed.\n"); - local_8._0_1_ = 0x33; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x33; } } Print(entityConfig,&local_94,0xffd3d3d3,0x96); @@ -5177,7 +5177,7 @@ LAB_0068f438: pcVar10 = (char *)FUN_004143f0(); pbVar3 = ((std::string *)(pcVar10))->std::string::c_str(); uVar5 = atoi((char *)pbVar3); - if ((-1 < (int)uVar5) && (uVar20 = FUN_00685f70(), uVar5 <= uVar20)) { + if ((-1 < GHIDRA_INT(uVar5)) && (uVar20 = FUN_00685f70(), uVar5 <= uVar20)) { challengeParams = ((Manager *)(g_manager))->Manager::GetChallengeParams(uVar5); manager = g_manager; g_manager->_startChallenge = uVar5; @@ -5190,12 +5190,12 @@ LAB_0068f438: goto LAB_0069249e; } ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"Invalid challenge ID.\n"); - local_8._0_1_ = 0x37; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x37; goto LAB_0068d95d; } } ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"Invalid challenge ID.\n"); - local_8._0_1_ = 0x38; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x38; goto LAB_0068d95d; } psVar9 = (std_string *)FUN_004143f0(); @@ -5241,27 +5241,27 @@ LAB_0068fda9: bVar2 = str_eq_cstr(psVar9,&DAT_00b664c0); if (bVar2 != 0) { ((std::string *)(local_dc._buf))->std::string::string_from_cstr((byte *)"goto s.boss.5000"); - local_8._0_1_ = 0x43; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x43; RunCommand(entityConfig,&local_dc,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_dc._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_10c._buf))->std::string::string_from_cstr((byte *)"giveitem Soy"); - local_8._0_1_ = 0x44; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x44; RunCommand(entityConfig,&local_10c,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_10c._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"giveitem Mutant"); - local_8._0_1_ = 0x45; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x45; RunCommand(entityConfig,&local_94,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_94._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_ac._buf))->std::string::string_from_cstr((byte *)"debug 3"); - local_8._0_1_ = 0x46; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x46; RunCommand(entityConfig,&local_ac,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_ac._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_7c))->std::string::string_from_cstr((byte *)"debug 4"); - local_8._0_1_ = 0x47; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x47; RunCommand(entityConfig,(std_string *)local_7c,(std_string *)0x0, (Entity_Player *)0x0); ((std::string *)(local_7c))->std::string::_Tidy_deallocate(); @@ -5271,12 +5271,12 @@ LAB_0068fda9: bVar2 = str_eq_cstr(psVar9,&DAT_00b66558); if (bVar2 != 0) { ((std::string *)(local_dc._buf))->std::string::string_from_cstr((byte *)"stage 11a"); - local_8._0_1_ = 0x48; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x48; RunCommand(entityConfig,&local_dc,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_dc._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_10c._buf))->std::string::string_from_cstr((byte *)"goto s.boss.6000"); - local_8._0_1_ = 0x49; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x49; LAB_00690100: RunCommand(entityConfig,&local_10c,(std_string *)0x0,(Entity_Player *)0x0); ((std::string *)(local_10c._buf))->std::string::_Tidy_deallocate(); @@ -5286,54 +5286,54 @@ LAB_00690100: bVar2 = str_eq_cstr(psVar9,&DAT_00b6657c); if (bVar2 != 0) { ((std::string *)(local_dc._buf))->std::string::string_from_cstr((byte *)"stage 11a"); - local_8._0_1_ = 0x4a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x4a; RunCommand(entityConfig,&local_dc,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_dc._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_10c._buf))->std::string::string_from_cstr((byte *)"goto s.boss.6000"); - local_8._0_1_ = 0x4b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x4b; RunCommand(entityConfig,&local_10c,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_10c._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"giveitem Sad Onion"); - local_8._0_1_ = 0x4c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x4c; RunCommand(entityConfig,&local_94,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_94._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_ac._buf))->std::string::string_from_cstr((byte *)"giveitem Sad Onion"); - local_8._0_1_ = 0x4d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x4d; RunCommand(entityConfig,&local_ac,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_ac._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_7c))->std::string::string_from_cstr((byte *)"giveitem Torn"); - local_8._0_1_ = 0x4e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x4e; RunCommand(entityConfig,(std_string *)local_7c,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_7c))->std::string::_Tidy_deallocate(); ((std::string *)(local_c4))->std::string::string_from_cstr((byte *)"giveitem Torn"); - local_8._0_1_ = 0x4f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x4f; RunCommand(entityConfig,(std_string *)local_c4,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_c4))->std::string::_Tidy_deallocate(); ((std::string *)(local_154._buf))->std::string::string_from_cstr((byte *)"giveitem Mutant"); - local_8._0_1_ = 0x50; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x50; RunCommand(entityConfig,&local_154,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_154._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_13c._buf))->std::string::string_from_cstr((byte *)"giveitem A Dollar"); - local_8._0_1_ = 0x51; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x51; RunCommand(entityConfig,&local_13c,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_13c._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_124._buf))->std::string::string_from_cstr((byte *)"giveitem Pyro"); - local_8._0_1_ = 0x52; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x52; RunCommand(entityConfig,&local_124,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_124._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_f4._buf))->std::string::string_from_cstr((byte *)"debug 3"); - local_8._0_1_ = 0x53; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x53; RunCommand(entityConfig,&local_f4,(std_string *)0x0,(Entity_Player *)0x0); ((std::string *)(local_f4._buf))->std::string::_Tidy_deallocate(); goto LAB_0069249e; @@ -5350,11 +5350,11 @@ LAB_00690100: macroCommands[0] = "stage 10a"; uVar5 = 0; macroCommands[1] = "g Polaroid"; - local_5c._0_4_ = "g Negative"; - local_5c._4_4_ = "debug 3"; - local_5c._8_4_ = "debug 4"; - local_5c._12_4_ = "g Mutant"; - local_5c._16_4_ = "g Soy"; + (*(undefined4 *)((char *)&(local_5c) + 0x0)) = "g Negative"; + (*(undefined4 *)((char *)&(local_5c) + 0x4)) = "debug 3"; + (*(undefined4 *)((char *)&(local_5c) + 0x8)) = "debug 4"; + (*(undefined4 *)((char *)&(local_5c) + 0xc)) = "g Mutant"; + (*(undefined4 *)((char *)&(local_5c) + 0x10)) = "g Soy"; local_48 = "giveitem Belt"; local_44 = "repeat 5"; local_40 = "giveitem Lord of the Pit"; @@ -5363,9 +5363,9 @@ LAB_00690100: do { std::string::string_from_cstr (local_f4._buf,(byte *)macroCommands[uVar5]); - local_8._0_1_ = 0x5e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x5e; RunCommand(entityConfig,&local_f4,(std_string *)0x0,(Entity_Player *)0x0); - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; ((std::string *)(local_f4._buf))->std::string::_Tidy_deallocate(); uVar5 = uVar5 + 1; } while (uVar5 < 0xc); @@ -5404,7 +5404,7 @@ LAB_00690100: (uVar5 = FUN_00414410(), 2 < uVar5)) { FUN_004143f0(); psVar9 = (std_string *)FUN_006941b0(); - local_8._0_1_ = 0x9d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x9d; RunCommand(entityConfig,psVar9,(std_string *)0x0, (Entity_Player *)0x0); ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); @@ -5415,7 +5415,7 @@ LAB_00690100: if (2 < uVar5) { FUN_004143f0(); psVar9 = (std_string *)FUN_006941b0(); - local_8._0_1_ = 0x9c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x9c; RunCommand(entityConfig,psVar9,(std_string *)0x0, (Entity_Player *)0x0); ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); @@ -5427,14 +5427,14 @@ LAB_00690100: if (3 < uVar5) { FUN_004143f0(); psVar9 = (std_string *)FUN_006941b0(); - local_8._0_1_ = 0x9a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x9a; RunCommand(entityConfig,psVar9,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); FUN_004143f0(); psVar9 = (std_string *)FUN_006941b0(); - local_8._0_1_ = 0x9b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x9b; RunCommand(entityConfig,psVar9,(std_string *)0x0, (Entity_Player *)0x0); ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); @@ -5444,14 +5444,14 @@ LAB_00690100: else { std::string::string_from_cstr (local_5c + 0x10,(byte *)"debug 16"); - local_8._0_1_ = 0x98; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x98; RunCommand(entityConfig,(std_string *)(local_5c + 0x10), (std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_2c._buf,(byte *)"twitch_init"); - local_8._0_1_ = 0x99; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x99; RunCommand(entityConfig,&local_2c,(std_string *)0x0, (Entity_Player *)0x0); ((std::string *)(local_2c._buf))->std::string::_Tidy_deallocate(); @@ -5460,43 +5460,43 @@ LAB_00690100: else { std::string::string_from_cstr (local_5c + 0x10,(byte *)"giveitem Belt"); - local_8._0_1_ = 0x92; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x92; RunCommand(entityConfig,(std_string *)(local_5c + 0x10), (std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_2c._buf,(byte *)"giveitem Lord of the Pit") ; - local_8._0_1_ = 0x93; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x93; RunCommand(entityConfig,&local_2c,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_2c._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_16c._buf,(byte *)"giveitem Treasure Map"); - local_8._0_1_ = 0x94; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x94; RunCommand(entityConfig,&local_16c,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_16c._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_19c._buf,(byte *)"giveitem Blue Map"); - local_8._0_1_ = 0x95; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x95; RunCommand(entityConfig,&local_19c,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_19c._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_1b4._buf,(byte *)"giveitem Compass"); - local_8._0_1_ = 0x96; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x96; RunCommand(entityConfig,&local_1b4,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_1b4._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_1cc._buf,(byte *)"debug 3"); - local_8._0_1_ = 0x97; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x97; RunCommand(entityConfig,&local_1cc,(std_string *)0x0, (Entity_Player *)0x0); ((std::string *)(local_1cc._buf))->std::string::_Tidy_deallocate(); @@ -5505,106 +5505,106 @@ LAB_00690100: else { std::string::string_from_cstr (local_5c + 0x10,(byte *)"giveitem Belt"); - local_8._0_1_ = 0x83; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x83; RunCommand(entityConfig,(std_string *)(local_5c + 0x10), (std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_2c._buf,(byte *)"repeat 5"); - local_8._0_1_ = 0x84; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x84; RunCommand(entityConfig,&local_2c,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_2c._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_16c._buf,(byte *)"giveitem Lord of the Pit"); - local_8._0_1_ = 0x85; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x85; RunCommand(entityConfig,&local_16c,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_16c._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_19c._buf,(byte *)"giveitem Treasure Map"); - local_8._0_1_ = 0x86; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x86; RunCommand(entityConfig,&local_19c,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_19c._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_1b4._buf,(byte *)"giveitem Blue Map"); - local_8._0_1_ = 0x87; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x87; RunCommand(entityConfig,&local_1b4,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_1b4._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_1cc._buf,(byte *)"giveitem Compass"); - local_8._0_1_ = 0x88; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x88; RunCommand(entityConfig,&local_1cc,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_1cc._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_1e4._buf,(byte *)"giveitem Black Candle"); - local_8._0_1_ = 0x89; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x89; RunCommand(entityConfig,&local_1e4,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_1e4._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_f4._buf,(byte *)"giveitem X-Ray"); - local_8._0_1_ = 0x8a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x8a; RunCommand(entityConfig,&local_f4,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_f4._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_124._buf, (byte *)"giveitem We Need to Go Deeper"); - local_8._0_1_ = 0x8b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x8b; RunCommand(entityConfig,&local_124,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_124._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_13c._buf,(byte *)"debug 8"); - local_8._0_1_ = 0x8c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x8c; RunCommand(entityConfig,&local_13c,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_13c._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_154._buf,(byte *)"giveitem Dollar"); - local_8._0_1_ = 0x8d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x8d; RunCommand(entityConfig,&local_154,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_154._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_dc._buf,(byte *)"giveitem Pyro"); - local_8._0_1_ = 0x8e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x8e; RunCommand(entityConfig,&local_dc,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_dc._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_10c._buf,(byte *)"giveitem Skeleton Key"); - local_8._0_1_ = 0x8f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x8f; RunCommand(entityConfig,&local_10c,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_10c._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"debug 3") ; - local_8._0_1_ = 0x90; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x90; RunCommand(entityConfig,&local_94,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_94._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_ac._buf,(byte *)"debug 10"); - local_8._0_1_ = 0x91; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x91; RunCommand(entityConfig,&local_ac,(std_string *)0x0, (Entity_Player *)0x0); ((std::string *)(local_ac._buf))->std::string::_Tidy_deallocate(); @@ -5613,120 +5613,120 @@ LAB_00690100: else { std::string::string_from_cstr (local_f4._buf,(byte *)"giveitem Dead Cat"); - local_8._0_1_ = 0x72; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x72; RunCommand(entityConfig,&local_f4,(std_string *)0x0,(Entity_Player *)0x0 ); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_f4._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_124._buf))->std::string::string_from_cstr((byte *)"repeat 2") ; - local_8._0_1_ = 0x73; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x73; RunCommand(entityConfig,&local_124,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_124._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_13c._buf,(byte *)"giveitem Guppy\'s Collar"); - local_8._0_1_ = 0x74; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x74; RunCommand(entityConfig,&local_13c,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_13c._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_154._buf,(byte *)"giveitem Holy Mantle"); - local_8._0_1_ = 0x75; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x75; RunCommand(entityConfig,&local_154,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_154._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_dc._buf,(byte *)"giveitem Schoolbag"); - local_8._0_1_ = 0x76; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x76; RunCommand(entityConfig,&local_dc,(std_string *)0x0,(Entity_Player *)0x0 ); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_dc._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_10c._buf,(byte *)"giveitem MEAT!"); - local_8._0_1_ = 0x77; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x77; RunCommand(entityConfig,&local_10c,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_10c._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"repeat 12") ; - local_8._0_1_ = 0x78; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x78; RunCommand(entityConfig,&local_94,(std_string *)0x0,(Entity_Player *)0x0 ); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_94._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_ac._buf,(byte *)"giveitem Compass"); - local_8._0_1_ = 0x79; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x79; RunCommand(entityConfig,&local_ac,(std_string *)0x0,(Entity_Player *)0x0 ); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_ac._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_7c,(byte *)"giveitem Blue Map"); - local_8._0_1_ = 0x7a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x7a; RunCommand(entityConfig,(std_string *)local_7c,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_7c))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_c4,(byte *)"giveitem Treasure Map"); - local_8._0_1_ = 0x7b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x7b; RunCommand(entityConfig,(std_string *)local_c4,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_c4))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_1e4._buf,(byte *)"giveitem Baggy"); - local_8._0_1_ = 0x7c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x7c; RunCommand(entityConfig,&local_1e4,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_1e4._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_1cc._buf,(byte *)"giveitem p2"); - local_8._0_1_ = 0x7d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x7d; RunCommand(entityConfig,&local_1cc,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_1cc._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_1b4._buf,(byte *)"giveitem p3"); - local_8._0_1_ = 0x7e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x7e; RunCommand(entityConfig,&local_1b4,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_1b4._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_19c._buf,(byte *)"giveitem Purse"); - local_8._0_1_ = 0x7f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x7f; RunCommand(entityConfig,&local_19c,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_19c._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_16c._buf,(byte *)"giveitem Paper Clip"); - local_8._0_1_ = 0x80; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x80; RunCommand(entityConfig,&local_16c,(std_string *)0x0, (Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_16c._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_2c._buf,(byte *)"giveitem Petrified"); - local_8._0_1_ = 0x81; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x81; RunCommand(entityConfig,&local_2c,(std_string *)0x0,(Entity_Player *)0x0 ); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_2c._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_5c + 0x10,(byte *)"giveitem My Little Unicorn") ; - local_8._0_1_ = 0x82; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x82; RunCommand(entityConfig,(std_string *)(local_5c + 0x10), (std_string *)0x0,(Entity_Player *)0x0); ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); @@ -5734,190 +5734,190 @@ LAB_00690100: } else { ((std::string *)(local_f4._buf))->std::string::string_from_cstr((byte *)"stage 13"); - local_8._0_1_ = 0x6b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x6b; RunCommand(entityConfig,&local_f4,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_f4._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_124._buf,(byte *)"goto x.itemdungeon.666"); - local_8._0_1_ = 0x6c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x6c; RunCommand(entityConfig,&local_124,(std_string *)0x0,(Entity_Player *)0x0) ; - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_124._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_13c._buf))->std::string::string_from_cstr((byte *)"combo 0.8"); - local_8._0_1_ = 0x6d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x6d; RunCommand(entityConfig,&local_13c,(std_string *)0x0,(Entity_Player *)0x0) ; - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_13c._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_154._buf))->std::string::string_from_cstr((byte *)"combo 2.8"); - local_8._0_1_ = 0x6e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x6e; RunCommand(entityConfig,&local_154,(std_string *)0x0,(Entity_Player *)0x0) ; - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_154._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_dc._buf))->std::string::string_from_cstr((byte *)"combo 1.3"); - local_8._0_1_ = 0x6f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x6f; RunCommand(entityConfig,&local_dc,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_dc._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_10c._buf))->std::string::string_from_cstr((byte *)"combo 4.3"); - local_8._0_1_ = 0x70; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x70; RunCommand(entityConfig,&local_10c,(std_string *)0x0,(Entity_Player *)0x0) ; - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_10c._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"debug 3"); - local_8._0_1_ = 0x71; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x71; RunCommand(entityConfig,&local_94,(std_string *)0x0,(Entity_Player *)0x0); ((std::string *)(local_94._buf))->std::string::_Tidy_deallocate(); } goto LAB_0069249e; } ((std::string *)(local_f4._buf))->std::string::string_from_cstr((byte *)"combo 0.12"); - local_8._0_1_ = 0x65; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x65; RunCommand(entityConfig,&local_f4,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_f4._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_124._buf))->std::string::string_from_cstr((byte *)"combo 2.12"); - local_8._0_1_ = 0x66; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x66; RunCommand(entityConfig,&local_124,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_124._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_13c._buf))->std::string::string_from_cstr((byte *)"combo 1.3"); - local_8._0_1_ = 0x67; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x67; RunCommand(entityConfig,&local_13c,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_13c._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_154._buf))->std::string::string_from_cstr((byte *)"combo 4.3"); - local_8._0_1_ = 0x68; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x68; RunCommand(entityConfig,&local_154,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_154._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_dc._buf))->std::string::string_from_cstr((byte *)"debug 3"); - local_8._0_1_ = 0x69; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x69; RunCommand(entityConfig,&local_dc,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_dc._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_10c._buf,(byte *)"goto s.boss.3414"); - local_8._0_1_ = 0x6a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x6a; } else { ((std::string *)(local_f4._buf))->std::string::string_from_cstr((byte *)"stage 9"); - local_8._0_1_ = 0x5f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x5f; RunCommand(entityConfig,&local_f4,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_f4._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_124._buf))->std::string::string_from_cstr(&DAT_00b665bc); - local_8._0_1_ = 0x60; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x60; RunCommand(entityConfig,&local_124,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_124._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_13c._buf))->std::string::string_from_cstr((byte *)"combo 0.8"); - local_8._0_1_ = 0x61; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x61; RunCommand(entityConfig,&local_13c,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_13c._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_154._buf))->std::string::string_from_cstr((byte *)"combo 2.8"); - local_8._0_1_ = 0x62; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x62; RunCommand(entityConfig,&local_154,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_154._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_dc._buf))->std::string::string_from_cstr((byte *)"combo 1.3"); - local_8._0_1_ = 99; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 99; RunCommand(entityConfig,&local_dc,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_dc._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_10c._buf))->std::string::string_from_cstr((byte *)"combo 4.3"); - local_8._0_1_ = 100; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 100; } goto LAB_00690100; } ((std::string *)(local_f4._buf))->std::string::string_from_cstr((byte *)"stage 8"); - local_8._0_1_ = 0x59; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x59; RunCommand(entityConfig,&local_f4,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_f4._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_124._buf))->std::string::string_from_cstr((byte *)"g Bible"); - local_8._0_1_ = 0x5a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x5a; RunCommand(entityConfig,&local_124,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_124._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_13c._buf))->std::string::string_from_cstr(&DAT_00b665bc); - local_8._0_1_ = 0x5b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x5b; RunCommand(entityConfig,&local_13c,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_13c._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_154._buf))->std::string::string_from_cstr((byte *)"debug 3"); - local_8._0_1_ = 0x5c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x5c; RunCommand(entityConfig,&local_154,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_154._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_dc._buf))->std::string::string_from_cstr((byte *)"debug 4"); - local_8._0_1_ = 0x5d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x5d; } else { ((std::string *)(local_f4._buf))->std::string::string_from_cstr((byte *)"stage 6"); - local_8._0_1_ = 0x54; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x54; RunCommand(entityConfig,&local_f4,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_f4._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_124._buf))->std::string::string_from_cstr((byte *)"g Bible"); - local_8._0_1_ = 0x55; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x55; RunCommand(entityConfig,&local_124,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_124._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_13c._buf))->std::string::string_from_cstr(&DAT_00b665bc); - local_8._0_1_ = 0x56; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x56; RunCommand(entityConfig,&local_13c,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_13c._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_154._buf))->std::string::string_from_cstr((byte *)"debug 3"); - local_8._0_1_ = 0x57; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x57; RunCommand(entityConfig,&local_154,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_154._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_dc._buf))->std::string::string_from_cstr((byte *)"debug 4"); - local_8._0_1_ = 0x58; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x58; } } else { ((std::string *)(local_dc._buf))->std::string::string_from_cstr((byte *)"goto s.boss.5000"); - local_8._0_1_ = 0x42; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x42; } } else { ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"debug 3"); - local_8._0_1_ = 0x3c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x3c; RunCommand(entityConfig,&local_94,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_94._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_ac._buf))->std::string::string_from_cstr((byte *)"debug 8"); - local_8._0_1_ = 0x3d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x3d; RunCommand(entityConfig,&local_ac,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_ac._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_7c))->std::string::string_from_cstr((byte *)"debug 9"); - local_8._0_1_ = 0x3e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x3e; RunCommand(entityConfig,(std_string *)local_7c,(std_string *)0x0,(Entity_Player *)0x0) ; - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_7c))->std::string::_Tidy_deallocate(); ((std::string *)(local_c4))->std::string::string_from_cstr((byte *)"giveitem Soy"); - local_8._0_1_ = 0x3f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x3f; RunCommand(entityConfig,(std_string *)local_c4,(std_string *)0x0,(Entity_Player *)0x0) ; - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_c4))->std::string::_Tidy_deallocate(); ((std::string *)(local_10c._buf))->std::string::string_from_cstr((byte *)"giveitem Bar"); - local_8._0_1_ = 0x40; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x40; RunCommand(entityConfig,&local_10c,(std_string *)0x0,(Entity_Player *)0x0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_10c._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_dc._buf))->std::string::string_from_cstr((byte *)"giveitem Pad"); - local_8._0_1_ = 0x41; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x41; } RunCommand(entityConfig,&local_dc,(std_string *)0x0,(Entity_Player *)0x0); ((std::string *)(local_dc._buf))->std::string::_Tidy_deallocate(); @@ -5973,7 +5973,7 @@ LAB_00690100: playerManager = (PlayerManager *)((Game *)(g_game))->Game::GetPlayerManager(); ((PlayerManager *)(playerManager))->PlayerManager::trigger_new_room_effects(); ((std::string *)(local_5c + 0x10))->std::string::string_from_cstr((byte *)"Changed stage.\n"); - local_8._0_1_ = 0x9e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x9e; LAB_00691611: Print(entityConfig,(std_string *)(local_5c + 0x10),0xffd3d3d3,0x96); ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); @@ -5990,19 +5990,19 @@ LAB_00691611: } while (iVar16 < 0x50); std::string::string_from_cstr (local_5c + 0x10,(byte *)"All easter eggs unlocked in main menu.\n"); - local_8._0_1_ = 0x9f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x9f; Print(entityConfig,(std_string *)(local_5c + 0x10),0xffd3d3d3,0x96); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_2c._buf,(byte *)"On the easter eggs menu press Q+E+Tab\n"); - local_8._0_1_ = 0xa0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xa0; Print(entityConfig,&local_2c,0xffd3d3d3,0x96); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_2c._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (local_16c._buf,(byte *)"or LB+RB+X to remove one from the list.\n"); - local_8._0_1_ = 0xa1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xa1; Print(entityConfig,&local_16c,0xffd3d3d3,0x96); ((std::string *)(local_16c._buf))->std::string::_Tidy_deallocate(); goto LAB_0069249e; @@ -6014,22 +6014,22 @@ LAB_00691611: pbVar3 = ((std::string *)(pcVar10))->std::string::c_str(); local_204 = (Entity_NPC *)atoi((char *)pbVar3); ((std::string *)(local_ac._buf))->std::string::string_from_cstr(&s_empty); - local_8 = CONCAT31(local_8._1_3_,0xa2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa2); ((Room *)((Room *)(entityConfig + 0x15)))->Room::GetGridHeight(); piVar15 = (int *)std::min(); for (iVar16 = *piVar15; 0 < iVar16; iVar16 = iVar16 + -1) { FUN_0060c530(); FUN_00694170(); - local_8._0_1_ = 0xa3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xa3; FUN_00651af0(); - local_8 = CONCAT31(local_8._1_3_,0xa2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa2); ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); } ((std::string *)(local_ac._buf))->std::string::c_str(); FUN_00a19440(); FUN_00a26620(); ((std::string *)(local_5c + 0x10))->std::string::string_from_cstr((byte *)"Copied.\n"); - local_8._0_1_ = 0xa4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xa4; Print(entityConfig,(std_string *)(local_5c + 0x10),0xffd3d3d3,0x96); ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); ((std::string *)(local_ac._buf))->std::string::_Tidy_deallocate(); @@ -6056,7 +6056,7 @@ LAB_006918d8: if (1 < uVar5) { pvVar8 = (void *)FUN_004143f0(); ((std::string *)(local_ac._buf))->std::string::string(pvVar8); - local_8 = CONCAT31(local_8._1_3_,0xa5); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa5); uVar5 = FUN_00414410(); if (2 < uVar5) { uVar20 = 2; @@ -6065,11 +6065,11 @@ LAB_006918d8: do { FUN_004143f0(); FUN_00421620(); - local_8._0_1_ = 0xa6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xa6; FUN_00651d50(); FUN_004215a0(); ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); - local_8 = CONCAT31(local_8._1_3_,0xa5); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa5); ((std::string *)(local_2c._buf))->std::string::_Tidy_deallocate(); uVar20 = uVar20 + 1; uVar5 = FUN_00414410(); @@ -6077,7 +6077,7 @@ LAB_006918d8: } } FUN_00865660(); - local_8._0_1_ = 0xa7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xa7; cVar1 = FUN_0040c2d0(); if (cVar1 == '\0') { PrintError(entityConfig,(std_string *)local_7c); @@ -6092,7 +6092,7 @@ LAB_006918d8: if ((bVar2 != 0) && (uVar5 = FUN_00414410(), 1 < uVar5)) { pvVar8 = (void *)FUN_004143f0(); ((std::string *)(local_7c))->std::string::string(pvVar8); - local_8 = CONCAT31(local_8._1_3_,0xa8); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa8); uVar5 = FUN_00414410(); if (2 < uVar5) { uVar20 = 2; @@ -6101,11 +6101,11 @@ LAB_006918d8: do { FUN_004143f0(); FUN_00421620(); - local_8._0_1_ = 0xa9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xa9; FUN_00651d50(); FUN_004215a0(); ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); - local_8 = CONCAT31(local_8._1_3_,0xa8); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xa8); ((std::string *)(local_2c._buf))->std::string::_Tidy_deallocate(); uVar20 = uVar20 + 1; uVar5 = FUN_00414410(); @@ -6122,11 +6122,11 @@ LAB_006918d8: pbVar3 = ((LuaEngine *)(luaEngine))->LuaEngine::LuamodCMD(local_7c); if ((char)pbVar3 == '\0') { ((std::string *)(local_5c + 0x10))->std::string::string_from_cstr((byte *)"Failed to run mod!\n"); - local_8._0_1_ = 0xab; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xab; } else { ((std::string *)(local_5c + 0x10))->std::string::string_from_cstr((byte *)"Success!\n"); - local_8._0_1_ = 0xaa; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xaa; } Print(entityConfig,(std_string *)(local_5c + 0x10),0xffd3d3d3,0x96); ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); @@ -6155,7 +6155,7 @@ LAB_006918d8: bVar2 = str_eq_cstr(psVar9,(byte *)"testbosspool"); if (bVar2 != 0) { FUN_005cba40(); - local_8._0_1_ = 0xac; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xac; iVar16 = 10000; do { bossPool = (BossPool *)FUN_00685ef0(); @@ -6227,25 +6227,25 @@ LAB_00691de8: itemConfig = Isaac::GetItemConfig(); modManager = (ModManager *)FUN_0040d210(); ((std::string *)(local_5c + 0x10))->std::string::string_from_cstr((byte *)"wisps.xml"); - local_8._0_1_ = 0xaf; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xaf; ModManager::TryRedirectPath (modManager,&local_16c,(std_string *)(local_5c + 0x10)); - local_8._0_1_ = 0xb0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb0; pbVar3 = ((std::string *)(luaEngine))->std::string::c_str(); ((ItemConfig *)(itemConfig))->ItemConfig::load_wisps_xml(pbVar3,(void *)0x0); ((std::string *)(local_16c._buf))->std::string::_Tidy_deallocate(); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); itemConfig = Isaac::GetItemConfig(); modManager = (ModManager *)FUN_0040d210(); ((std::string *)(local_2c._buf))->std::string::string_from_cstr((byte *)"locusts.xml"); - local_8._0_1_ = 0xb1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb1; ((ModManager *)(modManager))->ModManager::TryRedirectPath(&local_19c,&local_2c); - local_8._0_1_ = 0xb2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb2; pbVar3 = ((std::string *)(bossPool))->std::string::c_str(); ((ItemConfig *)(itemConfig))->ItemConfig::LoadLocustConfig(pbVar3,(ModEntry *)0x0); ((std::string *)(local_19c._buf))->std::string::_Tidy_deallocate(); - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; ((std::string *)(local_2c._buf))->std::string::_Tidy_deallocate(); pRVar11 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); local_21c = ((Room *)(pRVar11))->Room::GetEntities(); @@ -6315,7 +6315,7 @@ LAB_00691de8: if (pbVar3 == (byte *)0x0) { std::string::string_from_cstr (local_5c + 0x10,(byte *)"Successfully fixed history log.\n"); - local_8._0_1_ = 0xb3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb3; goto LAB_00691611; } } @@ -6356,8 +6356,8 @@ LAB_00691ed6: if (0x3f < controllerIndex) { uVar7 = uVar20; } - fVar17 = (float)((uint)fVar17 | uVar20); - fVar21 = (float)((uint)fVar21 | uVar7); + fVar17 = (float)(GHIDRA_UINT(fVar17) | uVar20); + fVar21 = (float)(GHIDRA_UINT(fVar21) | uVar7); uVar5 = uVar5 + 1; uVar20 = ((Game *)(g_game))->Game::GetNumPlayers(); } while (uVar5 < uVar20); @@ -6368,7 +6368,7 @@ LAB_00691ed6: do { KAGE::Input::Manager::get_device ((Manager *)&PTR_vftable_00c57b18,&local_218,uVar5); - local_8._0_1_ = 0xad; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xad; iVar16 = EntityPtr::Ref(); if (iVar16 != 0) { uVar20 = 1 << (uVar5 & 0x1f); @@ -6380,7 +6380,7 @@ LAB_00691ed6: if (0x3f < uVar5) { uVar7 = uVar20; } - if ((uVar20 & (uint)fVar17) == 0 && (uVar7 & (uint)fVar21) == 0) { + if ((uVar20 & GHIDRA_UINT(fVar17)) == 0 && (uVar7 & GHIDRA_UINT(fVar21)) == 0) { piVar15 = (int *)EntityPtr::Ref(); _MaxCount = 8; _Str2 = "Wireless"; @@ -6389,13 +6389,13 @@ LAB_00691ed6: if (iVar16 != 0) { entityConfigEntry = (EntityList *)EntityPtr::Ref(); uVar5 = ((EntityList *)(entityConfigEntry))->EntityList::Size(); - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; FUN_004242b0(); goto LAB_00691fe7; } } } - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; FUN_004242b0(); uVar5 = uVar5 + 1; uVar20 = KAGE::Input::Manager::get_device_count @@ -6404,7 +6404,7 @@ LAB_00691ed6: } uVar5 = local_200; LAB_00691fe7: - if ((int)uVar5 < 0) { + if (GHIDRA_INT(uVar5) < 0) { uVar5 = 0; } } @@ -6413,24 +6413,24 @@ LAB_00691fe7: pbVar3 = ((std::string *)(pcVar10))->std::string::c_str(); uVar5 = atoi((char *)pbVar3); local_200 = uVar5; - if ((int)uVar5 < 0) goto LAB_00691ed6; + if (GHIDRA_INT(uVar5) < 0) goto LAB_00691ed6; } if (g_game != (Game *)0x0) { FUN_00685ed0(); ((InputManager *)(&PTR_vftable_00c57b18))->InputManager::get_device(local_c4 + 0x10,uVar5); - local_8 = CONCAT31(local_8._1_3_,0xae); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xae); local_21c = (EntityList *)0x1; piVar15 = (int *)EntityPtr::Ref(); (**(code **)(*piVar15 + 0xc))(); print_format(); } - local_8._0_1_ = 0; - local_8._1_3_ = 0; - if (((uint)local_21c & 1) != 0) { + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0; + if ((GHIDRA_UINT(local_21c) & 1) != 0) { FUN_004242b0(); } playerManager = (PlayerManager *)((Game *)(g_game))->Game::GetPlayerManager(); - pEVar18 = ((PlayerManager *)(playerManager))->PlayerManager::SpawnCoPlayer2((int)local_1fc); + pEVar18 = ((PlayerManager *)(playerManager))->PlayerManager::SpawnCoPlayer2(GHIDRA_INT(local_1fc)); ((Entity_Player *)(pEVar18))->Entity_Player::SetControllerIndex(uVar5,0); tmpPlayer = ((Game *)(g_game))->Game::GetPlayer(0); posResult = ((Entity *)((Entity *)tmpPlayer))->Entity::Position((Vector *)(local_c4 + 0x10)); @@ -6447,7 +6447,7 @@ LAB_00691fe7: pRVar11 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); ((Room *)(pRVar11))->Room::ShopRestockFull(); ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"Shop is fully restocked.\n"); - local_8._0_1_ = 0x3b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x3b; } else { pcVar10 = (char *)FUN_004143f0(); @@ -6458,14 +6458,14 @@ LAB_00691fe7: goto LAB_0069249e; } ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"Invalid cutscene ID.\n"); - local_8._0_1_ = 0x3a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x3a; } goto LAB_0068d95d; } bVar2 = 0x2e; psVar9 = (std_string *)FUN_004143f0(); string_split(&local_70,psVar9,bVar2); - local_8._0_1_ = 0x39; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x39; iVar4 = 1; local_200 = 0; iVar16 = FUN_00414410(); @@ -6477,7 +6477,7 @@ LAB_00691fe7: pcVar10 = (char *)FUN_004143f0(); pbVar3 = ((std::string *)(pcVar10))->std::string::c_str(); local_200 = atoi((char *)pbVar3); - if (((int)local_200 < 0) || (0x1e < (int)local_200)) { + if ((GHIDRA_INT(local_200) < 0) || (0x1e < GHIDRA_INT(local_200))) { local_200 = 0; } atoiFn = atoi_exref; @@ -6510,7 +6510,7 @@ LAB_0068fc25: pbVar3 = ((std::string *)(pcVar10))->std::string::c_str(); local_20c = (Entity *)atoi((char *)pbVar3); uVar5 = 1; - if ((int)local_20c < 1) goto LAB_0069249e; + if (GHIDRA_INT(local_20c) < 1) goto LAB_0069249e; local_204 = (Entity_NPC *)0x2710; puVar14 = (undefined4 *)std::min(); local_20c = (Entity *)*puVar14; @@ -6533,21 +6533,21 @@ LAB_0068fc25: FUN_00693560(); pvVar8 = (void *)FUN_0060c420(); ((std::string *)(local_ac._buf))->std::string::string(pvVar8); - local_8._0_1_ = 0x2e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2e; ((std::string *)(local_ac._buf))->std::string::c_str(); print_format(); iVar16 = 0; - if (0 < (int)local_20c) { + if (0 < GHIDRA_INT(local_20c)) { do { RunCommand(entityConfig,&local_ac,(std_string *)0x0,player); iVar16 = iVar16 + 1; - } while (iVar16 < (int)local_20c); + } while (iVar16 < GHIDRA_INT(local_20c)); } ((std::string *)(local_ac._buf))->std::string::_Tidy_deallocate(); goto LAB_0069249e; } ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"Nothing to repeat.\n"); - local_8._0_1_ = 0x2d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2d; } else { uVar5 = 1; @@ -6562,9 +6562,9 @@ LAB_0068fc25: if (bVar2 != 0) { if (local_1e5 == 0) { ((std::string *)(local_94._buf))->std::string::string_from_cstr(&DAT_00b66304); - local_8._0_1_ = 0x2a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2a; Print(entityConfig,&local_94,0xffd3d3d3,0x96); - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; ((std::string *)(local_94._buf))->std::string::_Tidy_deallocate(); } ((Entity_Player *)(player))->Entity_Player::GetCollectibleNum(uVar5,0); @@ -6572,10 +6572,10 @@ LAB_0068fc25: configItem = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(local_200); psVar9 = ItemConfig_Item::GetLocalizedName (configItem,(std_string *)(local_5c + 0x10),0); - local_8._0_1_ = 0x2b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2b; ((std::string *)(psVar9->_buf))->std::string::c_str(); print_format(); - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); local_1e5 = 0; uVar5 = local_200; @@ -6585,10 +6585,10 @@ LAB_0068fc25: Isaac::GetItemConfig(); pvVar8 = (void *)Config::GetCollectibles(); iVar16 = ((std::vector *)(pvVar8))->std::vector::size(); - } while ((int)uVar5 < iVar16); + } while (GHIDRA_INT(uVar5) < iVar16); } ((std::string *)(local_94._buf))->std::string::string_from_cstr(&DAT_00b66310); - local_8._0_1_ = 0x2c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2c; } } else { @@ -6612,17 +6612,17 @@ LAB_0068fc25: if (((local_21c < (EntityList *)&DAT_0000000d) && (local_1fc < (Entity_NPC *)&DAT_0000000d)) && (uVar5 < 3)) { level = (Level *)Config::GetCollectibles(); - local_204 = (Entity_NPC *)(&(*(undefined1 *)((char *)(local_21c) + 0x0)) + (int)local_1fc * 0xd); - roomDesc = ((Level *)(level))->Level::GetRoomByIdx((int)local_204,uVar5); + local_204 = (Entity_NPC *)(&(*(undefined1 *)((char *)(local_21c) + 0x0)) + GHIDRA_INT(local_1fc) * 0xd); + roomDesc = ((Level *)(level))->Level::GetRoomByIdx(GHIDRA_INT(local_204),uVar5); if (roomDesc->Data != (void *)0x0) { - Game::StartRoomTransition(g_game,(int)local_204,-1,1,player,uVar5); + Game::StartRoomTransition(g_game,GHIDRA_INT(local_204),-1,1,player,uVar5); ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"Changed room.\n"); - local_8._0_1_ = 0xf; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xf; goto LAB_0068d95d; } } ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"Error changing room.\n"); - local_8._0_1_ = 0x10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x10; goto LAB_0068d95d; } iVar16 = FUN_00414410(); @@ -6636,16 +6636,16 @@ LAB_0068fc25: if ((local_1e5 == 0x73) || (local_1e5 == 0x78)) { FUN_004143f0(); FUN_00651a90(); - local_8._0_1_ = 0x11; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x11; string_split(local_c4 + 0xc,&local_ac,0x2e); - local_8._0_1_ = 0x12; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x12; psVar9 = (std_string *)FUN_004143f0(); local_204 = (Entity_NPC *)RoomConfig::GetStageIdByName(psVar9); - local_8._0_1_ = 0x11; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x11; std::vector::_Tidy(); uVar20 = 0; string_split(&local_70,&local_ac,0x2e); - local_8._0_1_ = 0x13; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x13; uVar5 = FUN_00414410(); if (1 < uVar5) { pRVar11 = (Room *)FUN_004143f0(); @@ -6665,16 +6665,16 @@ LAB_0068fc25: uVar5 = 0; } roomConfig = RoomConfig::GetRoomByStageTypeAndVariant - (roomConfigs,uVar5,(uint)local_204,uVar20,-1); + (roomConfigs,uVar5,GHIDRA_UINT(local_204),uVar20,-1); std::vector::_Tidy(); - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; ((std::string *)(local_ac._buf))->std::string::_Tidy_deallocate(); LAB_0068dccb: if (roomConfig != (RoomConfig_Room *)0x0) { level = (Level *)Config::GetCollectibles(); ((Level *)(level))->Level::DEBUG_goto_room(roomConfig); ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"Changed room.\n"); - local_8._0_1_ = 0x14; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x14; goto LAB_0068d95d; } } @@ -6691,17 +6691,17 @@ LAB_0068dccb: goto LAB_0068dccb; } ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"Error changing room.\n"); - local_8._0_1_ = 0x15; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x15; } LAB_0068d95d: Print(entityConfig,&local_94,0xffd3d3d3,0x96); ((std::string *)(local_94._buf))->std::string::_Tidy_deallocate(); goto LAB_0069249e; } - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; FUN_00424510(); local_21c = (EntityList *)&DAT_00000004; - string_split((void *)(iVar16 + 0x18),(std_string *)CONCAT31((int3)((uint)extraout_EDX >> 8),0x2e), + string_split((void *)(iVar16 + 0x18),(std_string *)CONCAT31((int3)(GHIDRA_UINT(extraout_EDX) >> 8),0x2e), (byte)&local_70); local_22c = 0; local_1fc = (Entity_NPC *)0x0; @@ -6709,20 +6709,20 @@ LAB_0068d95d: local_1f5 = '\0'; local_1e5 = 0; local_200 = 0xffffffff; - iVar16 = (int)(local_6c - (int)local_70) >> 0x1f; - if ((int)(local_6c - (int)local_70) / 0x18 + iVar16 != iVar16) { + iVar16 = GHIDRA_INT((local_6c - GHIDRA_INT(local_70))) >> 0x1f; + if (GHIDRA_INT((local_6c - GHIDRA_INT(local_70))) / 0x18 + iVar16 != iVar16) { pbVar3 = ((std::string *)(local_70))->std::string::c_str(); local_22c = atoi((char *)pbVar3); } - if (1 < (uint)((int)(local_6c - (int)local_70) / 0x18)) { + if (1 < GHIDRA_UINT((GHIDRA_INT((local_6c - GHIDRA_INT(local_70))) / 0x18))) { pbVar3 = ((std::string *)(local_70 + 0x18))->std::string::c_str(); local_1fc = (Entity_NPC *)atoi((char *)pbVar3); } - if (2 < (uint)((int)(local_6c - (int)local_70) / 0x18)) { + if (2 < GHIDRA_UINT((GHIDRA_INT((local_6c - GHIDRA_INT(local_70))) / 0x18))) { pbVar3 = ((std::string *)(local_70 + 0x30))->std::string::c_str(); local_230 = atoi((char *)pbVar3); } - if (3 < (uint)((int)(local_6c - (int)local_70) / 0x18)) { + if (3 < GHIDRA_UINT((GHIDRA_INT((local_6c - GHIDRA_INT(local_70))) / 0x18))) { iVar16 = 0; while( true ) { while( true ) { @@ -6730,7 +6730,7 @@ LAB_0068d95d: if (0xf < *(uint *)(local_70 + 0x5c)) { pcVar10 = *(char **)pcVar10; } - iVar4 = tolower((int)pcVar10[iVar16]); + iVar4 = tolower(GHIDRA_INT(pcVar10[iVar16])); entityConfig = (Console *)local_20c; if ((char)iVar4 != 'f') break; iVar16 = iVar16 + 1; @@ -6775,12 +6775,12 @@ LAB_0068d95d: uVar5 = Random(); uStack_27c = 0x68d123; pEVar18 = (Entity_Player *) - ((Game *)(g_game))->Game::Spawn(local_22c,(uint)local_1fc,(Vector *)(local_c4 + 0x10),&g_vectorZero + ((Game *)(g_game))->Game::Spawn(local_22c,GHIDRA_UINT(local_1fc),(Vector *)(local_c4 + 0x10),&g_vectorZero ,(Entity *)0x0,local_230,uVar5); local_208 = pEVar18; } local_1fc = (Entity_NPC *)__RTDynamicCast(); - if ((local_1fc != (Entity_NPC *)0x0) && (-1 < (int)local_200)) { + if ((local_1fc != (Entity_NPC *)0x0) && (-1 < GHIDRA_INT(local_200))) { ((Entity_NPC *)(local_1fc))->Entity_NPC::Morph(local_1fc->_type,local_1fc->_variant,local_1fc->_subtype,local_200); } if (local_1e5 != 0) { @@ -6804,29 +6804,29 @@ LAB_0068d95d: ((*(int *)(local_200 + 0x1c) != 300 || (*(int *)(local_200 + 0x20) == 0)))) { FUN_0040cca0(); FUN_0040cfe0(); - local_8._0_1_ = 3; - if (1 < (uint)((tokensEnd - tokensBegin) / 0x18)) { + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; + if (1 < GHIDRA_UINT(((tokensEnd - tokensBegin) / 0x18))) { if (local_184 != (basic_string,std::allocator_> *) (tokensBegin + 0x18)) { local_230 = local_230 & 0xffffff00; FUN_0040c720(); } - if (2 < (uint)((tokensEnd - tokensBegin) / 0x18)) { + if (2 < GHIDRA_UINT(((tokensEnd - tokensBegin) / 0x18))) { uVar5 = 2; do { FUN_00421620(); - local_8 = CONCAT31(local_8._1_3_,4); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),4); pbVar6 = (basic_string,std::allocator_> *) FUN_00651d50(); if (local_184 != pbVar6) { FUN_004215e0(); } ((std::string *)(local_5c + 0x10))->std::string::_Tidy_deallocate(); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; ((std::string *)(local_2c._buf))->std::string::_Tidy_deallocate(); uVar5 = uVar5 + 1; - } while (uVar5 < (uint)((tokensEnd - tokensBegin) / 0x18)); + } while (uVar5 < GHIDRA_UINT(((tokensEnd - tokensBegin) / 0x18))); entityConfig = (Console *)local_20c; } FUN_00684e50(); @@ -6835,7 +6835,7 @@ LAB_0068d95d: FUN_00693eb0(); } ((EntityConfig_Entity *)((EntityConfig_Entity *)local_1fc))->EntityConfig_Entity::GetName(&local_ac,0); - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; FUN_00684e50(); std::basic_string,std::allocator_>::end ((basic_string,std::allocator_> *)&local_ac); @@ -6853,16 +6853,16 @@ LAB_0068d95d: uStack_27c = 0x68d46b; pEVar18 = (Entity_Player *) ((Game *)(g_game))->Game::Spawn(uVar5,uVar20,(Vector *)(local_c4 + 0x10),&g_vectorZero, - (Entity *)0x0,(uint)pvVar8,uVar7); + (Entity *)0x0,GHIDRA_UINT(pvVar8),uVar7); local_208 = pEVar18; ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"Spawned entity.\n"); entityConfig = (Console *)local_20c; - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; Print((Console *)local_20c,&local_94,0xffd3d3d3,0x96); ((std::string *)(local_94._buf))->std::string::_Tidy_deallocate(); } ((std::string *)(local_ac._buf))->std::string::_Tidy_deallocate(); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((std::string *)((char *)local_184))->std::string::_Tidy_deallocate(); } std:: @@ -6874,17 +6874,17 @@ LAB_0068d95d: } if ((pEVar18 != (Entity_Player *)0x0) && (pEVar18->_type != 0)) goto LAB_0068d54c; ((std::string *)(local_94._buf))->std::string::string_from_cstr((byte *)"Error spawning entity.\n"); - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; Print(entityConfig,&local_94,0xffd3d3d3,0x96); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((std::string *)(local_94._buf))->std::string::_Tidy_deallocate(); if (pEVar18 != (Entity_Player *)0x0) goto LAB_0068d54c; } else { ((std::string *)(local_ac._buf))->std::string::string_from_cstr((byte *)"Spawned entity.\n"); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; Print(entityConfig,&local_ac,0xffd3d3d3,0x96); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((std::string *)(local_ac._buf))->std::string::_Tidy_deallocate(); LAB_0068d54c: if (local_1f5 != '\0') { @@ -6939,7 +6939,7 @@ void Console::wrap_line(undefined4 *param_1, char param_2) ptr = (ushort *)param_1[8]; if (ptr != (ushort *)0x0) { if (param_2 == '\0') { - charIndex = (char *)(uint)*ptr; + charIndex = (char *)GHIDRA_UINT(*ptr); } else { local_8 = 1; @@ -6965,18 +6965,18 @@ LAB_006926e9: local_18 = &g_manager->_font8_LuaMiniOutlined; } lineText = param_1; - if (0xf < (uint)param_1[5]) { + if (0xf < GHIDRA_UINT(param_1[5])) { lineText = (undefined4 *)*param_1; } - cursor = charIndex + (int)lineText; + cursor = charIndex + GHIDRA_INT(lineText); lineStart = charIndex; while( true ) { - uVar3 = (uint)charIndex & 0xffff; + uVar3 = GHIDRA_UINT(charIndex) & 0xffff; lineText = param_1; - if (0xf < (uint)param_1[5]) { + if (0xf < GHIDRA_UINT(param_1[5])) { lineText = (undefined4 *)*param_1; } - if (cursor == (char *)(param_1[4] + (int)lineText)) break; + if (cursor == (char *)(param_1[4] + GHIDRA_INT(lineText))) break; charText[0] = *cursor; iVar4 = ((Font *)(local_18))->Font::get_string_width_n(charText,-1); lineWidth = lineWidth + iVar4; @@ -6987,14 +6987,14 @@ LAB_006926e9: charIndex = charIndex + 0xffff; cursor = cursor + -1; if ((ushort)charIndex <= (ushort)lineStart) break; - iVar4 = isspace((int)*cursor); - if ((iVar4 != 0) || (iVar4 = ispunct((int)*cursor), iVar4 != 0)) goto LAB_006927ad; + iVar4 = isspace(GHIDRA_INT(*cursor)); + if ((iVar4 != 0) || (iVar4 = ispunct(GHIDRA_INT(*cursor)), iVar4 != 0)) goto LAB_006927ad; } charIndex = (char *)(uVar3 - 1 & 0xffff); cursor = local_28; LAB_006927ad: lineWidth = 0; - local_28 = (char *)((uint)(charIndex + 1) & 0xffff); + local_28 = (char *)(GHIDRA_UINT((charIndex + 1)) & 0xffff); lineStart = local_28; if (breaksEnd == local_24) { FUN_0042f580(breaksEnd,&local_28); @@ -7019,12 +7019,12 @@ LAB_006927f2: ExceptionList = local_10; return; } - iVar4 = (int)breaksEnd >> 1; + iVar4 = GHIDRA_INT(breaksEnd) >> 1; if (param_1[8] != 0) { if (param_2 == '\0') { - allocSize = (ulonglong)(uint)(param_1[9] + iVar4) * 2; + allocSize = (ulonglong)GHIDRA_UINT((param_1[9] + iVar4)) * 2; breakDest = operator_new_tracked - (-(uint)((int)((ulonglong)allocSize >> 0x20) != 0) | (uint)allocSize); + (-GHIDRA_UINT((GHIDRA_INT(((ulonglong)allocSize >> 0x20)) != 0)) | GHIDRA_UINT(allocSize)); memcpy(breakDest + iVar4,(void *)param_1[8],param_1[9] * 2); oldBreaks = param_1[8]; if (oldBreaks != 0) { @@ -7032,13 +7032,13 @@ LAB_006927f2: allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar3 = *(uint *)(oldBreaks + -4); qVar2 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar3; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar3; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar2 < uVar3); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < uVar3)); free((void *)(oldBreaks + -4)); } param_1[9] = param_1[9] + iVar4; @@ -7049,20 +7049,20 @@ LAB_006927f2: allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } _Memory = (uint *)(param_1[8] + -4); uVar3 = *_Memory; qVar2 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar3; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar3; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar2 < uVar3); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < uVar3)); free(_Memory); local_8 = local_8 & 0xffffff00; } allocSize = (ulonglong)(iVar4 + 1U) * 2; newBreaks = operator_new_tracked - (-(uint)((int)((ulonglong)allocSize >> 0x20) != 0) | (uint)allocSize); + (-GHIDRA_UINT((GHIDRA_INT(((ulonglong)allocSize >> 0x20)) != 0)) | GHIDRA_UINT(allocSize)); param_1[8] = newBreaks; *(undefined2 *)((char *)newBreaks + iVar4 * 2) = 0; param_1[9] = iVar4 + 1U; @@ -7119,7 +7119,7 @@ void Console::Print(std_string *text, uint color, uint fadeTime) local_8 = (Console)0xffffffff; puStack_c = &LAB_00af97c5; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(emptyText + 0xb); + local_18 = __security_cookie ^ GHIDRA_UINT((emptyText + 0xb)); ExceptionList = &local_10; local_6c = (Console)text; if (this[0x41] != (Console)0x0) { @@ -7133,7 +7133,7 @@ void Console::Print(std_string *text, uint color, uint fadeTime) } CVar5 = this[0x14]; if ((CVar5 == (Console)0x0) || - (*(int *)(*(int *)((int)this[0x11] + ((int)this[0x12] - 1U & (uint)this[0x13]) * 4) + 0x10) != + (*(int *)(*(int *)(GHIDRA_INT(this[0x11]) + (GHIDRA_INT(this[0x12]) - 1U & GHIDRA_UINT(this[0x13])) * 4) + 0x10) != 0)) { CVar2 = (Console)0x0; } @@ -7155,20 +7155,20 @@ void Console::Print(std_string *text, uint color, uint fadeTime) newLineColor = 0xffd3d3d3; newLineWrapped = 0; newLineRowCount = 1; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; std::deque::push_front(newLine); if (newLineWrapped != 0) { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } freeSize = *(uint *)(newLineWrapped + -4); qVar1 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - freeSize; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - freeSize; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar1 < freeSize); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < freeSize)); free((void *)(newLineWrapped + -4)); } ((std::string *)(newLine))->std::string::_Tidy_deallocate(); @@ -7177,9 +7177,9 @@ void Console::Print(std_string *text, uint color, uint fadeTime) freeSize = emptyTextCapacity + 1; pvVar3 = emptyText[0]; if (0xfff < freeSize) { - pvVar3 = *(void **)((int)emptyText[0] + -4); + pvVar3 = *(void **)(GHIDRA_INT(emptyText[0]) + -4); freeSize = emptyTextCapacity + 0x24; - if (0x1f < (uint)((int)emptyText[0] + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(emptyText[0]) + (-4 - GHIDRA_INT(pvVar3))))) { LAB_00692d88: local_8 = (Console)0xffffffff; /* WARNING: Subroutine does not return */ @@ -7201,28 +7201,28 @@ LAB_00692d88: if (0xf < *(uint *)((char *)text + 0x14)) { CVar5 = *(Console *)text; } - if (cursor == (std_string *)((int)CVar5 + *(uint *)((char *)text + 0x10))) { + if (cursor == (std_string *)(GHIDRA_INT(CVar5) + *(uint *)((char *)text + 0x10))) { CVar5 = (Console)text; if (0xf < *(uint *)((char *)text + 0x14)) { CVar5 = *(Console *)text; } - textSize = (uint *)((int)text + 0x10); - if (segmentStart < (std_string *)((int)CVar5 + *textSize)) { + textSize = (uint *)(GHIDRA_INT(text) + 0x10); + if (segmentStart < (std_string *)(GHIDRA_INT(CVar5) + *textSize)) { if (0xf < *(uint *)((char *)text + 0x14)) { text = *(std_string **)text; } - ((std::string *)(*(char **)((int)this[0x11] + - ((int)this[0x12] - 1U & (uint)this[0x13]) * 4)))->std::string::append((byte *)segmentStart,((int)text - (int)segmentStart) + *textSize); - *(uint *)(*(int *)((int)this[0x11] + ((int)this[0x12] - 1U & (uint)this[0x13]) * 4) + 0x1c + ((std::string *)(*(char **)(GHIDRA_INT(this[0x11]) + + (GHIDRA_INT(this[0x12]) - 1U & GHIDRA_UINT(this[0x13])) * 4)))->std::string::append((byte *)segmentStart,(GHIDRA_INT(text) - GHIDRA_INT(segmentStart)) + *textSize); + *(uint *)(*(int *)(GHIDRA_INT(this[0x11]) + (GHIDRA_INT(this[0x12]) - 1U & GHIDRA_UINT(this[0x13])) * 4) + 0x1c ) = color; - *(uint *)(*(int *)((int)this[0x11] + ((int)this[0x12] - 1U & (uint)this[0x13]) * 4) + 0x18 + *(uint *)(*(int *)(GHIDRA_INT(this[0x11]) + (GHIDRA_INT(this[0x12]) - 1U & GHIDRA_UINT(this[0x13])) * 4) + 0x18 ) = fadeTime; - wrap_line(*(undefined4 *)((int)this[0x11] + ((int)this[0x12] - 1U & (uint)this[0x13]) * 4) + wrap_line(*(undefined4 *)(GHIDRA_INT(this[0x11]) + (GHIDRA_INT(this[0x12]) - 1U & GHIDRA_UINT(this[0x13])) * 4) ,0); } if (isScrolledToEnd != '\0') { if ((this[0x14] == (Console)0x0) || - (*(int *)(*(int *)((int)this[0x11] + ((int)this[0x12] - 1U & (uint)this[0x13]) * 4) + + (*(int *)(*(int *)(GHIDRA_INT(this[0x11]) + (GHIDRA_INT(this[0x12]) - 1U & GHIDRA_UINT(this[0x13])) * 4) + 0x10) != 0)) { this[2] = (Console)0x0; this[3] = (Console)0x0; @@ -7238,10 +7238,10 @@ LAB_00692d88: ExceptionList = local_10; return; } - this[2] = (Console)((int)this[2] + addedLineCount); + this[2] = (Console)(GHIDRA_INT(this[2]) + addedLineCount); get_visible_line_range(this,&visibleRange); - if (((int)*extraout_EAX < (int)this[2]) || - ((*extraout_EAX == this[2] && ((int)extraout_EAX[1] < (int)this[3])))) { + if ((GHIDRA_INT(*extraout_EAX) < GHIDRA_INT(this[2])) || + ((*extraout_EAX == this[2] && (GHIDRA_INT(extraout_EAX[1]) < GHIDRA_INT(this[3]))))) { isPastVisible = true; } else { @@ -7255,15 +7255,15 @@ LAB_00692d88: this[3] = pCVar4[1]; this[2] = CVar5; pCVar6 = this + 3; - local_6c = (Console)(*(int *)(*(int *)((int)this[0x11] + - ((int)CVar5 + (int)this[0x13] & (int)this[0x12] - 1U) + local_6c = (Console)(*(int *)(*(int *)(GHIDRA_INT(this[0x11]) + + (GHIDRA_INT(CVar5) + GHIDRA_INT(this[0x13]) & GHIDRA_INT(this[0x12]) - 1U) * 4) + 0x24) + -1); pCVar4 = &local_6c; - if ((int)*pCVar6 < (int)local_6c) { + if (GHIDRA_INT(*pCVar6) < GHIDRA_INT(local_6c)) { pCVar4 = pCVar6; } CVar5 = *pCVar4; - if ((int)CVar5 < 0) { + if (GHIDRA_INT(CVar5) < 0) { CVar5 = (Console)0x0; } *pCVar6 = CVar5; @@ -7274,36 +7274,36 @@ LAB_00692d88: cursor = (std_string *)(cursor->_buf + 1); } if (segmentStart < cursor) { - ((std::string *)(*(char **)((int)this[0x11] + ((int)this[0x12] - 1U & (uint)this[0x13]) * 4 - )))->std::string::append((byte *)segmentStart,(int)cursor - (int)segmentStart); - *(uint *)(*(int *)((int)this[0x11] + ((int)this[0x12] - 1U & (uint)this[0x13]) * 4) + 0x1c) = + ((std::string *)(*(char **)(GHIDRA_INT(this[0x11]) + (GHIDRA_INT(this[0x12]) - 1U & GHIDRA_UINT(this[0x13])) * 4 + )))->std::string::append((byte *)segmentStart,GHIDRA_INT(cursor) - GHIDRA_INT(segmentStart)); + *(uint *)(*(int *)(GHIDRA_INT(this[0x11]) + (GHIDRA_INT(this[0x12]) - 1U & GHIDRA_UINT(this[0x13])) * 4) + 0x1c) = color; - *(uint *)(*(int *)((int)this[0x11] + ((int)this[0x12] - 1U & (uint)this[0x13]) * 4) + 0x18) = + *(uint *)(*(int *)(GHIDRA_INT(this[0x11]) + (GHIDRA_INT(this[0x12]) - 1U & GHIDRA_UINT(this[0x13])) * 4) + 0x18) = fadeTime; - wrap_line(*(undefined4 *)((int)this[0x11] + ((int)this[0x12] - 1U & (uint)this[0x13]) * 4),0); + wrap_line(*(undefined4 *)(GHIDRA_INT(this[0x11]) + (GHIDRA_INT(this[0x12]) - 1U & GHIDRA_UINT(this[0x13])) * 4),0); } CVar5 = this[0x14]; do { - if ((uint)CVar5 < 0x400) goto LAB_00692c3a; - line = *(char **)((int)this[0x11] + - ((int)this[0x12] - 1U & (int)this[0x13] + -1 + (int)CVar5) * 4); + if (GHIDRA_UINT(CVar5) < 0x400) goto LAB_00692c3a; + line = *(char **)(GHIDRA_INT(this[0x11]) + + (GHIDRA_INT(this[0x12]) - 1U & GHIDRA_INT(this[0x13]) + -1 + GHIDRA_INT(CVar5)) * 4); wrappedLines = *(int *)(line + 0x20); if (wrappedLines != 0) { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } freeSize = *(uint *)(wrappedLines + -4); qVar1 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - freeSize; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - freeSize; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar1 < freeSize); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < freeSize)); free((void *)(wrappedLines + -4)); } ((std::string *)(line))->std::string::_Tidy_deallocate(); - CVar5 = (Console)((int)this[0x14] - 1); + CVar5 = (Console)(GHIDRA_INT(this[0x14]) - 1); this[0x14] = CVar5; } while (CVar5 != (Console)0x0); this[0x13] = (Console)0x0; @@ -7317,23 +7317,23 @@ LAB_00692c3a: newLineColor = 0xffd3d3d3; newLineWrapped = 0; newLineRowCount = 1; - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; CVar5 = this[0x12]; - if ((uint)CVar5 <= (int)this[0x14] + 1U) { + if (GHIDRA_UINT(CVar5) <= GHIDRA_INT(this[0x14]) + 1U) { FUN_00693be0(extraout_ECX); CVar5 = this[0x12]; } - frontIndex = (Console)((int)CVar5 - 1U & (uint)this[0x13]); + frontIndex = (Console)(GHIDRA_INT(CVar5) - 1U & GHIDRA_UINT(this[0x13])); this[0x13] = frontIndex; if (frontIndex == (Console)0x0) { frontIndex = CVar5; } - frontIndex = (Console)((int)frontIndex - 1); + frontIndex = (Console)(GHIDRA_INT(frontIndex) - 1); CVar2 = this[0x11]; - slotOffset = ((uint)frontIndex & (int)CVar5 - 1U) * 4; - if (*(int *)(slotOffset + (int)CVar2) == 0) { + slotOffset = (GHIDRA_UINT(frontIndex) & GHIDRA_INT(CVar5) - 1U) * 4; + if (*(int *)(slotOffset + GHIDRA_INT(CVar2)) == 0) { pvVar3 = operator_new(0x28); - *(void **)(slotOffset + (int)this[0x11]) = pvVar3; + *(void **)(slotOffset + GHIDRA_INT(this[0x11])) = pvVar3; CVar2 = this[0x11]; } line = *(char **)((char *)CVar2 + slotOffset); @@ -7342,20 +7342,20 @@ LAB_00692c3a: *(undefined4 *)(line + 0x1c) = newLineColor; *(undefined4 *)(line + 0x24) = newLineRowCount; *(int *)(line + 0x20) = newLineWrapped; - this[0x14] = (Console)((int)this[0x14] + 1); + this[0x14] = (Console)(GHIDRA_INT(this[0x14]) + 1); this[0x13] = frontIndex; if (newLineWrapped != 0) { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } freeSize = *(uint *)(newLineWrapped + -4); qVar1 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - freeSize; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - freeSize; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar1 < freeSize); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < freeSize)); free((void *)(newLineWrapped + -4)); } ((std::string *)(newLine))->std::string::_Tidy_deallocate(); @@ -7364,9 +7364,9 @@ LAB_00692c3a: freeSize = emptyTextCapacity + 1; pvVar3 = emptyText[0]; if (0xfff < freeSize) { - pvVar3 = *(void **)((int)emptyText[0] + -4); + pvVar3 = *(void **)(GHIDRA_INT(emptyText[0]) + -4); freeSize = emptyTextCapacity + 0x24; - if (0x1f < (uint)((int)emptyText[0] + (-4 - (int)pvVar3))) goto LAB_00692d88; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(emptyText[0]) + (-4 - GHIDRA_INT(pvVar3))))) goto LAB_00692d88; } operator_delete(pvVar3,freeSize); } @@ -7399,10 +7399,10 @@ void Console::PrintError(std_string *err) local_8 = 0xffffffff; puStack_c = &LAB_00af980d; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(consoleLine + 0x54); + local_18 = __security_cookie ^ GHIDRA_UINT((consoleLine + 0x54)); ExceptionList = &local_10; if ((this[0x14] != (Console)0x0) && - (*(int *)(*(int *)((int)this[0x11] + ((int)this[0x12] - 1U & (uint)this[0x13]) * 4) + 0x10) != + (*(int *)(*(int *)(GHIDRA_INT(this[0x11]) + (GHIDRA_INT(this[0x12]) - 1U & GHIDRA_UINT(this[0x13])) * 4) + 0x10) != 0)) { lineTextSize = 0; lineTextCapacity = 0xf; @@ -7413,20 +7413,20 @@ void Console::PrintError(std_string *err) lineColor = 0xffd3d3d3; local_38 = 0; local_34 = 1; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); std::deque::push_front(consoleLine); if (local_38 != 0) { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } allocSize = *(uint *)(local_38 + -4); oldAllocated = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - allocSize; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - allocSize; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)oldAllocated < allocSize); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocated) < allocSize)); free((void *)(local_38 + -4)); } ((std::string *)(consoleLine))->std::string::_Tidy_deallocate(); @@ -7435,9 +7435,9 @@ void Console::PrintError(std_string *err) allocSize = lineTextCapacity + 1; pvVar1 = lineText[0]; if (0xfff < allocSize) { - pvVar1 = *(void **)((int)lineText[0] + -4); + pvVar1 = *(void **)(GHIDRA_INT(lineText[0]) + -4); allocSize = lineTextCapacity + 0x24; - if (0x1f < (uint)((int)lineText[0] + (-4 - (int)pvVar1))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(lineText[0]) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -7455,9 +7455,9 @@ void Console::PrintError(std_string *err) allocSize = lineTextCapacity + 1; pvVar1 = lineText[0]; if (0xfff < allocSize) { - pvVar1 = *(void **)((int)lineText[0] + -4); + pvVar1 = *(void **)(GHIDRA_INT(lineText[0]) + -4); allocSize = lineTextCapacity + 0x24; - if (0x1f < (uint)((int)lineText[0] + (-4 - (int)pvVar1))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(lineText[0]) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -7484,27 +7484,27 @@ void Console::print_format(Console *param_1, undefined4 param_2) local_8 = 0xffffffff; puStack_c = &LAB_00af984d; local_10 = ExceptionList; - local_14 = __security_cookie ^ (int)&local_2c + 0x28U; + local_14 = __security_cookie ^ GHIDRA_INT(&local_2c) + 0x28U; ExceptionList = &local_10; FUN_0041d4d0(param_2); local_2c._size = 0; local_2c._capacity = 0xf; - local_2c._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) = (void *)0x0; nextChar = &DAT_00c79c68; do { cursor = nextChar; nextChar = cursor + 1; } while (*cursor != '\0'); - ((std::string *)(local_2c._buf))->std::string::assign(&DAT_00c79c68,(uint)(cursor + -0xc79c68)); + ((std::string *)(local_2c._buf))->std::string::assign(&DAT_00c79c68,GHIDRA_UINT((cursor + -0xc79c68))); local_8 = 0; Print(param_1,&local_2c,0xffd3d3d3,0x96); if (0xf < local_2c._capacity) { size = local_2c._capacity + 1; - ptr = (void *)local_2c._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((void *)local_2c._buf) + 0x0)); if (0xfff < size) { - ptr = *(void **)(local_2c._buf._0_4_ + -4); + ptr = *(void **)((*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) + -4); size = local_2c._capacity + 0x24; - if (0x1f < (uint)(local_2c._buf._0_4_ + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } diff --git a/src/game/cutscene.cpp b/src/game/cutscene.cpp index 79ae200..0fc553a 100644 --- a/src/game/cutscene.cpp +++ b/src/game/cutscene.cpp @@ -61,7 +61,7 @@ byte Cutscene::load_xml(byte *path) local_14 = (byte ****)0xffffffff; puStack_18 = &LAB_00b0c69e; local_1c = ExceptionList; - uVar4 = __security_cookie ^ (uint)(rootPath + 0x11); + uVar4 = __security_cookie ^ GHIDRA_UINT((rootPath + 0x11)); ExceptionList = &local_1c; *(undefined4 *)this = 0; local_24 = uVar4; @@ -101,10 +101,10 @@ byte Cutscene::load_xml(byte *path) bVar3 = *pbVar10; pbVar10 = pbVar10 + 1; } while (bVar3 != 0); - uVar4 = (int)pbVar10 - (int)(pbVar14 + 1); + uVar4 = GHIDRA_INT(pbVar10) - GHIDRA_INT((pbVar14 + 1)); ((std::string *)((char *)rootPath))->std::string::assign(pbVar14,uVar4); for (cutsceneNode = xml_node::first_node - (cutsceneNode,(byte *)"cutscene",(int)pbVar14,(byte)uVar4); + (cutsceneNode,(byte *)"cutscene",GHIDRA_INT(pbVar14),(byte)uVar4); cutsceneNode != (void *)0x0; cutsceneNode = *(void **)((char *)cutsceneNode + 0x2c)) { entry = (CutsceneEntry)0x0; entryNameSize = 0; @@ -119,12 +119,12 @@ byte Cutscene::load_xml(byte *path) fadeColor._green = 0.0; fadeColor._blue = 0.0; fadeColor._alpha = 1.0; - local_14._1_3_ = (undefined3)((uint)local_14 >> 8); - local_14 = (byte ****)CONCAT31(local_14._1_3_,2); + (*(undefined1 *)((char *)&(local_14) + 0x1)) = (undefined3)(GHIDRA_UINT(local_14) >> 8); + local_14 = (byte ****)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); puVar16 = *(undefined4 **)((char *)cutsceneNode + 0x20); if (puVar16 == (undefined4 *)0x0) { LAB_0095d00e: - iVar5 = (int)entry * 0x4c; + iVar5 = GHIDRA_INT(entry) * 0x4c; *(CutsceneEntry *)(&(*(undefined1 *)((char *)(this) + 0x4)) + iVar5) = entry; if ((byte ******)(&(*(undefined1 *)((char *)(this) + 0x8)) + iVar5) != entryName) { pppppbVar7 = (byte *****)entryName; @@ -135,18 +135,18 @@ LAB_0095d00e: } destParts = (void **)(&(*(undefined1 *)((char *)(this) + 0x20)) + iVar5); if (destParts != &entryPartsBegin) { - pbStack_100f8 = (byte *)(entryPartsEnd - (int)entryPartsBegin); + pbStack_100f8 = (byte *)(entryPartsEnd - GHIDRA_INT(entryPartsBegin)); destPartsBegin = *destParts; - if ((uint)((int)destParts[2] - (int)destPartsBegin >> 2) < (uint)((int)pbStack_100f8 >> 2) + if (GHIDRA_UINT((GHIDRA_INT(destParts[2]) - GHIDRA_INT(destPartsBegin) >> 2)) < GHIDRA_UINT((GHIDRA_INT(pbStack_100f8) >> 2)) ) { - std::vector::reserve_clear((int)pbStack_100f8 >> 2); + std::vector::reserve_clear(GHIDRA_INT(pbStack_100f8) >> 2); destPartsBegin = *destParts; } memmove(destPartsBegin,entryPartsBegin,(size_t)pbStack_100f8); - destParts[1] = pbStack_100f8 + (int)destPartsBegin; + destParts[1] = pbStack_100f8 + GHIDRA_INT(destPartsBegin); } (&(*(undefined1 *)((char *)(this) + 0x2c)))[iVar5] = (undefined1)uStack_100c8; - (&(*(undefined1 *)((char *)(this) + 0x2d)))[iVar5] = uStack_100c8._1_1_; + (&(*(undefined1 *)((char *)(this) + 0x2d)))[iVar5] = (*(undefined1 *)((char *)&(uStack_100c8) + 0x1)); destFadeColor = (float *)(&(*(undefined1 *)((char *)(this) + 0x30)) + iVar5); *destFadeColor = fadeColor._red; destFadeColor[1] = fadeColor._green; @@ -156,7 +156,7 @@ LAB_0095d00e: *(undefined4 *)(&(*(undefined1 *)((char *)(this) + 0x44)) + iVar5) = 0xffffffff; (&(*(undefined1 *)((char *)(this) + 0x4c)))[iVar5] = uStack_100a8; (&(*(undefined1 *)((char *)(this) + 0x4d)))[iVar5] = 0; - iVar6 = (int)entry * 0x4c; + iVar6 = GHIDRA_INT(entry) * 0x4c; *(undefined4 *)(&(*(undefined1 *)((char *)(this) + 0x48)) + iVar5) = uStack_100ac; for (puVar16 = *(undefined4 **)((char *)cutsceneNode + 0x18); puVar16 != (undefined4 *)0x0; puVar16 = (undefined4 *)puVar16[0xb]) { @@ -171,7 +171,7 @@ LAB_0095d00e: bVar17 = bVar3 < (byte)*pcVar12; if (bVar3 != *pcVar12) { LAB_0095d168: - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0095d16d; } if (bVar3 == 0) break; @@ -250,7 +250,7 @@ LAB_0095d16d: pbStack_10114[0x6e] = 0; pbStack_10114[0x6f] = 0; pbStack_10114[0x58] = 0; - local_14 = (byte ****)CONCAT31(local_14._1_3_,6); + local_14 = (byte ****)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),6); pbStack_10114[0x70] = 0; pbStack_10114[0x71] = 0; pbStack_10114[0x72] = 0; @@ -278,7 +278,7 @@ LAB_0095d16d: part[0x19a] = 0; part[0x19b] = 0; } - local_14 = (byte ****)CONCAT31(local_14._1_3_,2); + local_14 = (byte ****)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); for (puVar1 = (undefined4 *)puVar16[8]; puVar1 != (undefined4 *)0x0; puVar1 = (undefined4 *)puVar1[6]) { pbVar14 = (byte *)*puVar1; @@ -292,7 +292,7 @@ LAB_0095d16d: bVar17 = bVar3 < *pbVar11; if (bVar3 != *pbVar11) { LAB_0095d2a1: - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0095d2a6; } if (bVar3 == 0) break; @@ -314,24 +314,24 @@ LAB_0095d2a6: bVar3 = *pbVar10; pbVar10 = pbVar10 + 1; } while (bVar3 != 0); - valueLength = (int)pbVar10 - (int)(pbVar14 + 1); + valueLength = GHIDRA_INT(pbVar10) - GHIDRA_INT((pbVar14 + 1)); if (0x7fffffff - rootPathSize < valueLength) goto LAB_0095decb; pppppbVar7 = (byte *****)rootPath; if (0xf < rootPathCapacity) { pppppbVar7 = rootPath[0]; } - ((std::string *)((char *)&fullPath))->std::string::concat((int)pbStack_10114,(std_string *)valueLength, + ((std::string *)((char *)&fullPath))->std::string::concat(GHIDRA_INT(pbStack_10114),(std_string *)valueLength, (byte *)pppppbVar7,rootPathSize,pbVar14,valueLength); pbVar14 = part; pppppiVar8 = (int *****)(part + 0x40); if ((int ******)pppppiVar8 == &fullPath) { - if (0xf < (uint)KStack_38._unk) { + if (0xf < GHIDRA_UINT(KStack_38._unk)) { uVar4 = KStack_38._unk + 1; pppppiVar8 = fullPath; if (0xfff < uVar4) { pppppiVar8 = (int *****)fullPath[-1]; uVar4 = KStack_38._unk + 0x24; - if (0x1f < (uint)((int)fullPath + (-4 - (int)pppppiVar8))) goto LAB_0095dbaf; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(fullPath) + (-4 - GHIDRA_INT(pppppiVar8))))) goto LAB_0095dbaf; } operator_delete(pppppiVar8,uVar4); } @@ -357,7 +357,7 @@ LAB_0095d2a6: bVar17 = bVar3 < *pbVar11; if (bVar3 != *pbVar11) { LAB_0095d3f0: - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0095d3f5; } if (bVar3 == 0) break; @@ -380,7 +380,7 @@ LAB_0095d3f5: pbVar10 = pbVar10 + 1; } while (bVar3 != 0); ((std::string *)((char *)(part + 0x58)))->std::string::assign(pbVar14, - (int)pbVar10 - (int)(pbVar14 + 1)); + GHIDRA_INT(pbVar10) - GHIDRA_INT((pbVar14 + 1))); } else { pcVar12 = "music"; @@ -393,7 +393,7 @@ LAB_0095d3f5: bVar17 = bVar3 < (byte)*pcVar12; if (bVar3 != *pcVar12) { LAB_0095d460: - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0095d465; } if (bVar3 == 0) break; @@ -424,7 +424,7 @@ LAB_0095d465: bVar17 = bVar3 < (byte)*pcVar12; if (bVar3 != *pcVar12) { LAB_0095d4c0: - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0095d4c5; } if (bVar3 == 0) break; @@ -455,7 +455,7 @@ LAB_0095d4c5: bVar17 = bVar3 < (byte)*pcVar12; if (bVar3 != *pcVar12) { LAB_0095d520: - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0095d525; } if (bVar3 == 0) break; @@ -486,7 +486,7 @@ LAB_0095d525: bVar17 = bVar3 < (byte)*pcVar12; if (bVar3 != *pcVar12) { LAB_0095d580: - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0095d585; } if (bVar3 == 0) break; @@ -538,7 +538,7 @@ LAB_0095d9e0: bVar17 = bVar3 < (byte)*pcVar12; if (bVar3 != *pcVar12) { LAB_0095da28: - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0095da2d; } if (bVar3 == 0) break; @@ -563,7 +563,7 @@ LAB_0095da2d: bVar3 = *pbVar14; pbVar14 = pbVar14 + 1; } while (bVar3 != 0); - ((std::string *)((char *)&fullPath))->std::string::assign(pbVar10,(int)pbVar14 - (int)(pbVar10 + 1)); + ((std::string *)((char *)&fullPath))->std::string::assign(pbVar10,GHIDRA_INT(pbVar14) - GHIDRA_INT((pbVar10 + 1))); uVar4 = KStack_38._unk; pppppiVar8 = fullPath; if (KStack_38._alpha == 0.0) { @@ -574,7 +574,7 @@ LAB_0095dae4: } else { pppppiVar9 = (int *****)&fullPath; - if (0xf < (uint)KStack_38._unk) { + if (0xf < GHIDRA_UINT(KStack_38._unk)) { pppppiVar9 = fullPath; } if (KStack_38._alpha == 5.60519e-45) { @@ -610,7 +610,7 @@ LAB_0095dae0: if (0xfff < deleteSize) { pppppiVar9 = (int *****)pppppiVar8[-1]; deleteSize = uVar4 + 0x24; - if (0x1f < (uint)((int)pppppiVar8 + (-4 - (int)pppppiVar9))) goto LAB_0095dbaf; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pppppiVar8) + (-4 - GHIDRA_INT(pppppiVar9))))) goto LAB_0095dbaf; } operator_delete(pppppiVar9,deleteSize); } @@ -627,7 +627,7 @@ LAB_0095dae0: bVar17 = bVar3 < (byte)*pcVar12; if (bVar3 != *pcVar12) { LAB_0095dbe4: - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0095dbe9; } if (bVar3 == 0) break; @@ -649,7 +649,7 @@ LAB_0095dbe9: bVar3 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar3 != 0); - psVar15 = (std_string *)(pbVar11 + -(int)(pbVar10 + 1)); + psVar15 = (std_string *)(pbVar11 + -GHIDRA_INT((pbVar10 + 1))); if ((std_string *)(0x7fffffff - rootPathSize) < psVar15) { LAB_0095decb: /* WARNING: Subroutine does not return */ @@ -659,14 +659,14 @@ LAB_0095decb: if (0xf < rootPathCapacity) { pppppbVar7 = rootPath[0]; } - ((std::string *)((char *)&fullPath))->std::string::concat((int)pbStack_10114,psVar15, - (byte *)pppppbVar7,rootPathSize,pbVar10,(uint)psVar15); + ((std::string *)((char *)&fullPath))->std::string::concat(GHIDRA_INT(pbStack_10114),psVar15, + (byte *)pppppbVar7,rootPathSize,pbVar10,GHIDRA_UINT(psVar15)); pbVar10 = part; pppppiVar8 = (int *****)(part + 0xc); if ((int ******)pppppiVar8 != &fullPath) { ((std::string *)((char *)pppppiVar8))->std::string::_Tidy_deallocate(); pppppiVar9 = fullPath; - fullPath = (int *****)((uint)fullPath & 0xffffff00); + fullPath = (int *****)(GHIDRA_UINT(fullPath) & 0xffffff00); *pppppiVar8 = (int ****)pppppiVar9; *(float *)(pbVar10 + 0x10) = KStack_38._red; *(float *)(pbVar10 + 0x14) = KStack_38._green; @@ -690,7 +690,7 @@ LAB_0095decb: bVar17 = bVar3 < (byte)*pcVar12; if (bVar3 != *pcVar12) { LAB_0095d5f0: - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0095d5f5; } if (bVar3 == 0) break; @@ -772,7 +772,7 @@ LAB_0095d5f5: bVar17 = bVar3 < *pbVar13; if (bVar3 != *pbVar13) { LAB_0095d6e1: - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0095d6e6; } if (bVar3 == 0) break; @@ -795,24 +795,24 @@ LAB_0095d6e6: bVar3 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar3 != 0); - psVar15 = (std_string *)(pbVar11 + -(int)(pbVar10 + 1)); + psVar15 = (std_string *)(pbVar11 + -GHIDRA_INT((pbVar10 + 1))); if ((std_string *)(0x7fffffff - rootPathSize) < psVar15) goto LAB_0095decb; pppppbVar7 = (byte *****)rootPath; if (0xf < rootPathCapacity) { pppppbVar7 = rootPath[0]; } - ((std::string *)((char *)&fullPath))->std::string::concat((int)pbStack_10114,psVar15, - (byte *)pppppbVar7,rootPathSize,pbVar10,(uint)psVar15); + ((std::string *)((char *)&fullPath))->std::string::concat(GHIDRA_INT(pbStack_10114),psVar15, + (byte *)pppppbVar7,rootPathSize,pbVar10,GHIDRA_UINT(psVar15)); pbVar10 = part; pppppiVar8 = (int *****)(part + 0x40); if ((int ******)pppppiVar8 == &fullPath) { - if (0xf < (uint)KStack_38._unk) { + if (0xf < GHIDRA_UINT(KStack_38._unk)) { uVar4 = KStack_38._unk + 1; pppppiVar8 = fullPath; if (0xfff < uVar4) { pppppiVar8 = (int *****)fullPath[-1]; uVar4 = KStack_38._unk + 0x24; - if (0x1f < (uint)((int)fullPath + (-4 - (int)pppppiVar8))) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(fullPath) + (-4 - GHIDRA_INT(pppppiVar8))))) goto LAB_0095dbaf; } operator_delete(pppppiVar8,uVar4); @@ -827,7 +827,7 @@ LAB_0095d6e6: if (0xfff < deleteSize) { ptr = (int ****)ppppiVar2[-1]; deleteSize = uVar4 + 0x24; - if (0x1f < (uint)((int)ppppiVar2 + (-4 - (int)ptr))) goto LAB_0095dbaf; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(ppppiVar2) + (-4 - GHIDRA_INT(ptr))))) goto LAB_0095dbaf; } operator_delete(ptr,deleteSize); } @@ -860,7 +860,7 @@ LAB_0095d7a6: bVar17 = bVar3 < (byte)*pcVar12; if (bVar3 != *pcVar12) { LAB_0095d865: - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0095d86a; } if (bVar3 == 0) break; @@ -885,14 +885,14 @@ LAB_0095d86a: bVar3 = *pbVar14; pbVar14 = pbVar14 + 1; } while (bVar3 != 0); - ((std::string *)((char *)&fullPath))->std::string::assign(pbVar10,(int)pbVar14 - (int)(pbVar10 + 1)); + ((std::string *)((char *)&fullPath))->std::string::assign(pbVar10,GHIDRA_INT(pbVar14) - GHIDRA_INT((pbVar10 + 1))); if (KStack_38._alpha == 0.0) { LAB_0095d96c: bVar3 = 0; } else { pppppiVar8 = (int *****)&fullPath; - if (0xf < (uint)KStack_38._unk) { + if (0xf < GHIDRA_UINT(KStack_38._unk)) { pppppiVar8 = fullPath; } if (KStack_38._alpha == 5.60519e-45) { @@ -907,14 +907,14 @@ LAB_0095d96c: uVar4 = 0; } else { - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; } if (uVar4 != 0) goto LAB_0095d909; } else { LAB_0095d909: pppppiVar8 = (int *****)&fullPath; - if (0xf < (uint)KStack_38._unk) { + if (0xf < GHIDRA_UINT(KStack_38._unk)) { pppppiVar8 = fullPath; } if (KStack_38._alpha == 5.60519e-45) { @@ -929,12 +929,12 @@ LAB_0095d909: uVar4 = 0; } else { - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; } if (uVar4 == 0) goto LAB_0095d968; } pppppiVar8 = (int *****)&fullPath; - if (0xf < (uint)KStack_38._unk) { + if (0xf < GHIDRA_UINT(KStack_38._unk)) { pppppiVar8 = fullPath; } iVar5 = atoi((char *)pppppiVar8); @@ -944,13 +944,13 @@ LAB_0095d968: bVar3 = 1; } part[0x58] = bVar3; - if (0xf < (uint)KStack_38._unk) { + if (0xf < GHIDRA_UINT(KStack_38._unk)) { uVar4 = KStack_38._unk + 1; pppppiVar8 = fullPath; if (0xfff < uVar4) { pppppiVar8 = (int *****)fullPath[-1]; uVar4 = KStack_38._unk + 0x24; - if (0x1f < (uint)((int)fullPath + (-4 - (int)pppppiVar8))) goto LAB_0095dbaf; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(fullPath) + (-4 - GHIDRA_INT(pppppiVar8))))) goto LAB_0095dbaf; } operator_delete(pppppiVar8,uVar4); pbVar14 = pbStack_100f8; @@ -984,7 +984,7 @@ LAB_0095d968: bVar17 = bVar3 < (byte)*pcVar12; if (bVar3 != *pcVar12) { LAB_0095dcb1: - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0095dcb6; } if (bVar3 == 0) break; @@ -1036,12 +1036,12 @@ LAB_0095dcb6: pbVar14[0x35] = 0; pbVar14[0x36] = 0x80; pbVar14[0x37] = 0x3f; - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; *(undefined ***)pbVar14 = IsaacRepentancePlus::Cutscene::TemporaryPart::vftable; ((Font *)((Font *)(pbVar14 + 0x40)))->Font::Font(); - local_14._0_1_ = 9; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; ((Font *)((Font *)(pbVar14 + 0x8c)))->Font::Font(); - local_14 = (byte ****)CONCAT31(local_14._1_3_,10); + local_14 = (byte ****)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),10); ((std::string *)((char *)(pbVar14 + 0xd8)))->std::string::string(&(*(undefined1 *)((char *)(this) + 0x8)) + iVar6); pbVar14[0xf0] = 0; pbVar14[0xf1] = 0; @@ -1057,7 +1057,7 @@ LAB_0095dcb6: pbVar14[0x107] = 0; pbVar14[0xf0] = 0; } - local_14 = (byte ****)CONCAT31(local_14._1_3_,2); + local_14 = (byte ****)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); for (puVar1 = (undefined4 *)puVar16[8]; puVar1 != (undefined4 *)0x0; puVar1 = (undefined4 *)puVar1[6]) { pbVar10 = &g_xmlNullStr; @@ -1070,7 +1070,7 @@ LAB_0095dcb6: bVar17 = bVar3 < *pbVar11; if (bVar3 != *pbVar11) { LAB_0095ddd1: - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0095ddd6; } if (bVar3 == 0) break; @@ -1094,7 +1094,7 @@ LAB_0095ddd6: pbVar11 = pbVar11 + 1; } while (bVar3 != 0); ((std::string *)((char *)(pbVar14 + 0xf0)))->std::string::assign(pbVar10, - (int)pbVar11 - (int)pbStack_100f8); + GHIDRA_INT(pbVar11) - GHIDRA_INT(pbStack_100f8)); } if (puVar1[4] == 0) break; } @@ -1127,7 +1127,7 @@ LAB_0095ddd6: bVar17 = bVar3 < *pbVar11; if (bVar3 != *pbVar11) { LAB_0095ce26: - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0095ce2b; } if (bVar3 == 0) break; @@ -1157,7 +1157,7 @@ LAB_0095ce2b: bVar17 = bVar3 < *pbVar11; if (bVar3 != *pbVar11) { LAB_0095ce80: - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0095ce85; } if (bVar3 == 0) break; @@ -1179,7 +1179,7 @@ LAB_0095ce85: bVar3 = *pbVar10; pbVar10 = pbVar10 + 1; } while (bVar3 != 0); - ((std::string *)((char *)entryName))->std::string::assign(pbVar14,(int)pbVar10 - (int)(pbVar14 + 1)); + ((std::string *)((char *)entryName))->std::string::assign(pbVar14,GHIDRA_INT(pbVar10) - GHIDRA_INT((pbVar14 + 1))); } else { pcVar12 = "fadeout"; @@ -1192,7 +1192,7 @@ LAB_0095ce85: bVar17 = bVar3 < (byte)*pcVar12; if (bVar3 != *pcVar12) { LAB_0095cef0: - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0095cef5; } if (bVar3 == 0) break; @@ -1205,7 +1205,7 @@ LAB_0095cef0: uVar4 = 0; LAB_0095cef5: if (uVar4 == 0) { - uStack_100c8 = CONCAT11(uStack_100c8._1_1_,1); + uStack_100c8 = CONCAT11((*(undefined1 *)((char *)&(uStack_100c8) + 0x1)),1); } else { pcVar12 = "fadecolor"; @@ -1218,7 +1218,7 @@ LAB_0095cef5: bVar17 = bVar3 < (byte)*pcVar12; if (bVar3 != *pcVar12) { LAB_0095cf34: - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0095cf39; } if (bVar3 == 0) break; @@ -1242,7 +1242,7 @@ LAB_0095cf39: bVar17 = bVar3 < (byte)*pcVar12; if (bVar3 != *pcVar12) { LAB_0095cf73: - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0095cf78; } if (bVar3 == 0) break; @@ -1268,7 +1268,7 @@ LAB_0095cf78: bVar17 = bVar3 < (byte)*pcVar12; if (bVar3 != *pcVar12) { LAB_0095cfb0: - uVar4 = -(uint)bVar17 | 1; + uVar4 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0095cfb5; } if (bVar3 == 0) break; @@ -1296,18 +1296,18 @@ LAB_0095cfb5: LAB_0095cfe0: } while ((puVar16[4] != 0) && (puVar16 = (undefined4 *)puVar16[6], puVar16 != (undefined4 *)0x0)); - if ((-1 < (int)entry) && ((int)entry < 0x1b)) goto LAB_0095d00e; + if ((-1 < GHIDRA_INT(entry)) && (GHIDRA_INT(entry) < 0x1b)) goto LAB_0095d00e; } ((CutsceneEntry *)(&entry))->CutsceneEntry::Destructor(); } - local_14 = (byte ****)((uint)local_14 & 0xffffff00); + local_14 = (byte ****)(GHIDRA_UINT(local_14) & 0xffffff00); if (0xf < rootPathCapacity) { uVar4 = rootPathCapacity + 1; pppppbVar7 = rootPath[0]; if (0xfff < uVar4) { pppppbVar7 = (byte *****)rootPath[0][-1]; uVar4 = rootPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)rootPath[0] + (-4 - (int)pppppbVar7))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(rootPath[0]) + (-4 - GHIDRA_INT(pppppbVar7)))) { LAB_0095dbaf: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1344,7 +1344,7 @@ void Cutscene::Show(int cutsceneid) Game *temp_3fc05bfd86; manager = g_manager; - if (0x1a < (uint)cutsceneid) { + if (0x1a < GHIDRA_UINT(cutsceneid)) { KAGE_LogMessage(8,(byte *)"Invalid cutscene ID \"%d\" \n"); return; } @@ -1383,14 +1383,14 @@ void Cutscene::Show(int cutsceneid) do { (**(code **)(**(int **)(*(int *)(&(*(undefined1 *)((char *)(this) + 0x20)) + iVar3) + uVar2 * 4) + 4))(); uVar2 = uVar2 + 1; - } while (uVar2 < (uint)(*(int *)(&(*(undefined1 *)((char *)(this) + 0x24)) + iVar3) - - *(int *)(&(*(undefined1 *)((char *)(this) + 0x20)) + iVar3) >> 2)); + } while (uVar2 < GHIDRA_UINT((*(int *)(&(*(undefined1 *)((char *)(this) + 0x24)) + iVar3) - + *(int *)(&(*(undefined1 *)((char *)(this) + 0x20)) + iVar3) >> 2))); } *(undefined4 *)this = 1; if (cutsceneid == 2) { uVar2 = Random(); rngShifts = 0x900000005; - cutsceneid._0_1_ = 7; + (*(undefined1 *)((char *)&(cutsceneid) + 0x0)) = 7; iVar3 = rand(); temp_3fc05bfd86 = g_game; *(int *)&(*(undefined1 *)((char *)(this) + 0x828)) = iVar3 % 6000 + 6000; @@ -1398,7 +1398,7 @@ void Cutscene::Show(int cutsceneid) { uVar2 = ((Seeds *)(&temp_3fc05bfd86->_seedEffects))->Seeds::GetStartSeed(); rngShifts = 0xf00000002; - cutsceneid._0_1_ = 0x11; + (*(undefined1 *)((char *)&(cutsceneid) + 0x0)) = 0x11; } if ((*(undefined1 *)((char *)(this) + 0xe5)) == '\0') { iVar3 = *(int *)&(*(undefined1 *)((char *)(this) + 0xb8)); @@ -1438,7 +1438,7 @@ void Cutscene::Show(int cutsceneid) } iVar3 = *(int *)&(*(undefined1 *)((char *)(this) + 0xb8)); partIndex = partIndex + 1; - } while (partIndex < (uint)(*(int *)&(*(undefined1 *)((char *)(this) + 0xbc)) - iVar3 >> 2)); + } while (partIndex < GHIDRA_UINT((*(int *)&(*(undefined1 *)((char *)(this) + 0xbc)) - iVar3 >> 2))); } } } diff --git a/src/game/cutscene/anm2_part.cpp b/src/game/cutscene/anm2_part.cpp index b4a73fe..83f35d9 100644 --- a/src/game/cutscene/anm2_part.cpp +++ b/src/game/cutscene/anm2_part.cpp @@ -21,13 +21,13 @@ void Cutscene::ANM2Part::vfunc_3() *(undefined4 *)((char *)musicManager + 0x2c) = 0; *(undefined4 *)((char *)musicManager + 0x28) = 0; } - anim = (byte *)((int)musicManager + 0x58); + anim = (byte *)(GHIDRA_INT(musicManager) + 0x58); if (0xf < *(uint *)((char *)musicManager + 0x6c)) { anim = *(byte **)anim; } - isAnimSet = ((ANM2 *)((ANM2 *)((int)musicManager + 0x80)))->ANM2::SetAnimation(anim,1); + isAnimSet = ((ANM2 *)((ANM2 *)(GHIDRA_INT(musicManager) + 0x80)))->ANM2::SetAnimation(anim,1); if (isAnimSet != 0) { - ((AnimationState *)((AnimationState *)((int)musicManager + 0xb0)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(musicManager) + 0xb0)))->AnimationState::Rewind(); *(undefined1 *)((char *)musicManager + 0xc4) = 1; } manager = g_manager; @@ -56,8 +56,8 @@ void Cutscene::ANM2Part::vfunc_3() musicid = 0x47; } musicManager = &manager->_musicManager; - if (musicid < ((int)(manager->_musicManager)._entries._end - - (int)(manager->_musicManager)._entries._begin) / 0x60) { + if (musicid < (GHIDRA_INT((manager->_musicManager)._entries._end) - + GHIDRA_INT((manager->_musicManager)._entries._begin)) / 0x60) { ((Music *)((Music *)musicManager))->Music::Play(musicid,0.0); musicManager->_channels[musicManager->_currentChannel]._volume = 0.0; musicManager->_channels[musicManager->_currentChannel]._targetVolume = musicVolume; @@ -71,14 +71,14 @@ void Cutscene::ANM2Part::vfunc_3() } LAB_0095f67a: timeNs = GetTimeNs(); - uVar4 = (uint)(timeNs >> 0x20); + uVar4 = GHIDRA_UINT((timeNs >> 0x20)); lVar1 = (timeNs & 0xffffffff) * 0x431bde82; lVar2 = (ulonglong)uVar4 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); - uVar5 = (uint)((ulonglong)lVar2 >> 0x20); - uVar3 = (int)((ulonglong)lVar1 >> 0x20) + (uint)CARRY4((uint)lVar1,(uint)lVar2); + uVar5 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); + uVar3 = GHIDRA_INT(((ulonglong)lVar1 >> 0x20)) + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar1),GHIDRA_UINT(lVar2))); lVar1 = (ulonglong)uVar4 * 0x431bde82 + (ulonglong)CONCAT14(CARRY4(uVar5,uVar3),uVar5 + uVar3); - uVar3 = (uint)((ulonglong)lVar1 >> 0x20); - *(uint *)((char *)musicManager + 0x38) = (uint)lVar1 >> 0x12 | uVar3 * 0x4000; + uVar3 = GHIDRA_UINT(((ulonglong)lVar1 >> 0x20)); + *(uint *)((char *)musicManager + 0x38) = GHIDRA_UINT(lVar1) >> 0x12 | uVar3 * 0x4000; *(uint *)((char *)musicManager + 0x3c) = uVar3 >> 0x12; return; } @@ -101,15 +101,15 @@ void Cutscene::ANM2Part::vfunc_4() return; } timeNs = GetTimeNs(); - uVar3 = (uint)(timeNs >> 0x20); + uVar3 = GHIDRA_UINT((timeNs >> 0x20)); lVar1 = (timeNs & 0xffffffff) * 0x431bde82; lVar2 = (ulonglong)uVar3 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); lVar1 = (ulonglong)uVar3 * 0x431bde82 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar2 >> 0x20), - (int)((ulonglong)lVar1 >> 0x20) + (uint)CARRY4((uint)lVar1,(uint)lVar2)), - (int)((ulonglong)(lVar2 + lVar1) >> 0x20)); - uVar3 = (((((uint)lVar1 >> 0x12 | (int)((ulonglong)lVar1 >> 0x20) * 0x4000) - + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)), + GHIDRA_INT(((ulonglong)lVar1 >> 0x20)) + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar1),GHIDRA_UINT(lVar2)))), + GHIDRA_INT(((ulonglong)(lVar2 + lVar1) >> 0x20))); + uVar3 = ((((GHIDRA_UINT(lVar1) >> 0x12 | GHIDRA_INT(((ulonglong)lVar1 >> 0x20)) * 0x4000) - *(int *)((char *)this + 0x198)) - *(int *)((char *)this + 0x38)) * 0x1e) / 1000; if (*(int *)((char *)this + 0xb4) == 0) { animFrameCount = 0; @@ -118,20 +118,20 @@ void Cutscene::ANM2Part::vfunc_4() else { animFrameCount = *(int *)(*(int *)((char *)this + 0xb4) + 0x30); dVar4 = floor((double)*(float *)((char *)this + 0xc0)); - currentFrame = (int)dVar4; + currentFrame = GHIDRA_INT(dVar4); } - diffSign = (int)(currentFrame - uVar3) >> 0x1f; - if (((int)((currentFrame - uVar3 ^ diffSign) - diffSign) < 3) || (animFrameCount <= (int)uVar3)) { + diffSign = GHIDRA_INT((currentFrame - uVar3)) >> 0x1f; + if ((GHIDRA_INT(((currentFrame - uVar3 ^ diffSign) - diffSign)) < 3) || (animFrameCount <= GHIDRA_INT(uVar3))) { if (*(char *)((char *)this + 0x189) != '\0') { - ((AnimationState *)((AnimationState *)((int)this + 0xb0)))->AnimationState::Update(); - ((AnimationState *)((AnimationState *)((int)this + 0xd0)))->AnimationState::Update(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0xb0)))->AnimationState::Update(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0xd0)))->AnimationState::Update(); } } else { - ((ANM2 *)((ANM2 *)((int)this + 0x80)))->ANM2::GetFrame(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x80)))->ANM2::GetFrame(); KAGE_LogMessage(1,(byte *)"Cutscene: correct anm2 timing: f%d -> f%d\n"); if (*(int *)((char *)this + 0xb4) == 0) goto LAB_0095f882; - ((AnimationState *)((AnimationState *)((int)this + 0xb0)))->AnimationState::SetFrameFloat((float)uVar3); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0xb0)))->AnimationState::SetFrameFloat((float)uVar3); } if (*(int *)((char *)this + 0xb4) != 0) { floor((double)*(float *)((char *)this + 0xc0)); @@ -145,7 +145,7 @@ LAB_0095f882: } else { dVar4 = floor((double)*(float *)((char *)this + 0xc0)); - currentFrame = (int)dVar4; + currentFrame = GHIDRA_INT(dVar4); } if (musicStartFrame <= currentFrame) { if ((g_manager->_musicManager)._isEnabled == 0) { diff --git a/src/game/cutscene/temporary_part.cpp b/src/game/cutscene/temporary_part.cpp index 150431b..4e65e75 100644 --- a/src/game/cutscene/temporary_part.cpp +++ b/src/game/cutscene/temporary_part.cpp @@ -28,7 +28,7 @@ void Cutscene::TemporaryPart::vfunc_1() local_8 = (char *)0xffffffff; puStack_c = &LAB_00b0c7f5; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(pathText + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((pathText + 10)); ExceptionList = &local_10; pathText[0] = std::_Allocate(0x20); pathTextSize = 0x1b; @@ -37,34 +37,34 @@ void Cutscene::TemporaryPart::vfunc_1() local_8 = (char *)0x0; ModManager::TryRedirectPath (&manager->_modManager,(std_string *)redirectedPath,(std_string *)pathText); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; fontPath = extraout_EAX; if (0xf < *(uint *)(extraout_EAX + 0x14)) { fontPath = *(byte **)extraout_EAX; } - ((Font *)((Font *)((int)this + 0x40)))->Font::Load(fontPath,0); - local_8 = (char *)((uint)local_8._1_3_ << 8); + ((Font *)((Font *)(GHIDRA_INT(this) + 0x40)))->Font::Load(fontPath,0); + local_8 = (char *)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8); if (0xf < redirectedPathCapacity) { uVar2 = redirectedPathCapacity + 1; ptr = redirectedPath[0]; if (0xfff < uVar2) { - ptr = *(void **)((int)redirectedPath[0] + -4); + ptr = *(void **)(GHIDRA_INT(redirectedPath[0]) + -4); uVar2 = redirectedPathCapacity + 0x24; - if (0x1f < (uint)((int)redirectedPath[0] + (-4 - (int)ptr))) goto LAB_0095fe96; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPath[0]) + (-4 - GHIDRA_INT(ptr))))) goto LAB_0095fe96; } operator_delete(ptr,uVar2); } local_8 = (char *)0xffffffff; redirectedPathSize = 0; redirectedPathCapacity = 0xf; - redirectedPath[0] = (void *)((uint)redirectedPath[0] & 0xffffff00); + redirectedPath[0] = (void *)(GHIDRA_UINT(redirectedPath[0]) & 0xffffff00); if (0xf < pathTextCapacity) { uVar2 = pathTextCapacity + 1; pcVar1 = pathText[0]; if (0xfff < uVar2) { pcVar1 = *(char **)(pathText[0] + -4); uVar2 = pathTextCapacity + 0x24; - if ((char *)0x1f < pathText[0] + (-4 - (int)pcVar1)) { + if ((char *)0x1f < pathText[0] + (-4 - GHIDRA_INT(pcVar1))) { LAB_0095fe96: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -80,32 +80,32 @@ LAB_0095fe96: local_8 = (char *)0x2; ModManager::TryRedirectPath (&manager->_modManager,(std_string *)pathText,(std_string *)terminusPath); - local_8 = (char *)CONCAT31(local_8._1_3_,3); + local_8 = (char *)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); fontPath = extraout_EAX_00; if (0xf < *(uint *)(extraout_EAX_00 + 0x14)) { fontPath = *(byte **)extraout_EAX_00; } - ((Font *)((Font *)((int)this + 0x8c)))->Font::Load(fontPath,0); + ((Font *)((Font *)(GHIDRA_INT(this) + 0x8c)))->Font::Load(fontPath,0); if (0xf < pathTextCapacity) { uVar2 = pathTextCapacity + 1; pcVar1 = pathText[0]; if (0xfff < uVar2) { pcVar1 = *(char **)(pathText[0] + -4); uVar2 = pathTextCapacity + 0x24; - if ((char *)0x1f < pathText[0] + (-4 - (int)pcVar1)) goto LAB_0095ff7d; + if ((char *)0x1f < pathText[0] + (-4 - GHIDRA_INT(pcVar1))) goto LAB_0095ff7d; } operator_delete(pcVar1,uVar2); } pathTextSize = 0; pathTextCapacity = 0xf; - pathText[0] = (char *)((uint)pathText[0] & 0xffffff00); + pathText[0] = (char *)(GHIDRA_UINT(pathText[0]) & 0xffffff00); if (0xf < terminusPathCapacity) { uVar2 = terminusPathCapacity + 1; pcVar1 = terminusPath[0]; if (0xfff < uVar2) { pcVar1 = *(char **)(terminusPath[0] + -4); uVar2 = terminusPathCapacity + 0x24; - if ((char *)0x1f < terminusPath[0] + (-4 - (int)pcVar1)) { + if ((char *)0x1f < terminusPath[0] + (-4 - GHIDRA_INT(pcVar1))) { LAB_0095ff7d: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); diff --git a/src/game/cutscene_entry.cpp b/src/game/cutscene_entry.cpp index 945ed16..ff9b38e 100644 --- a/src/game/cutscene_entry.cpp +++ b/src/game/cutscene_entry.cpp @@ -27,7 +27,7 @@ void CutsceneEntry::Destructor() uVar1 = 0; elementsBegin = this[7]; - if ((int)this[8] - (int)elementsBegin >> 2 != 0) { + if (GHIDRA_INT(this[8]) - GHIDRA_INT(elementsBegin) >> 2 != 0) { do { element = *(undefined4 **)((char *)elementsBegin + uVar1 * 4); if (element != (undefined4 *)0x0) { @@ -35,15 +35,15 @@ void CutsceneEntry::Destructor() } uVar1 = uVar1 + 1; elementsBegin = this[7]; - } while (uVar1 < (uint)((int)this[8] - (int)elementsBegin >> 2)); + } while (uVar1 < GHIDRA_UINT((GHIDRA_INT(this[8]) - GHIDRA_INT(elementsBegin) >> 2))); } if (elementsBegin != (CutsceneEntry)0x0) { - uVar1 = (int)this[9] - (int)elementsBegin & 0xfffffffc; + uVar1 = GHIDRA_INT(this[9]) - GHIDRA_INT(elementsBegin) & 0xfffffffc; ptr = elementsBegin; if (0xfff < uVar1) { ptr = *(CutsceneEntry *)((char *)elementsBegin + -4); uVar1 = uVar1 + 0x23; - if (0x1f < ((int)elementsBegin - (int)ptr) - 4U) { + if (0x1f < (GHIDRA_INT(elementsBegin) - GHIDRA_INT(ptr)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -64,11 +64,11 @@ void CutsceneEntry::Unload() layerIndex = 0; this[0x10] = (CutsceneEntry)0xffffffff; - if ((int)this[8] - (int)this[7] >> 2 != 0) { + if (GHIDRA_INT(this[8]) - GHIDRA_INT(this[7]) >> 2 != 0) { do { - (**(code **)(**(int **)((int)this[7] + layerIndex * 4) + 8))(); + (**(code **)(**(int **)(GHIDRA_INT(this[7]) + layerIndex * 4) + 8))(); layerIndex = layerIndex + 1; - } while (layerIndex < (uint)((int)this[8] - (int)this[7] >> 2)); + } while (layerIndex < GHIDRA_UINT((GHIDRA_INT(this[8]) - GHIDRA_INT(this[7]) >> 2))); } return; } diff --git a/src/game/cutscene_part.cpp b/src/game/cutscene_part.cpp index 7519e19..b55280b 100644 --- a/src/game/cutscene_part.cpp +++ b/src/game/cutscene_part.cpp @@ -42,7 +42,7 @@ void CutscenePart::load_subtitles() puStack_c = &LAB_00b0c76b; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(endTimestamp + 0x30); + uVar1 = __security_cookie ^ GHIDRA_UINT((endTimestamp + 0x30)); ExceptionList = &local_10; part = this; if (*(void **)((char *)this + 0x24) != (void *)0x0) { @@ -51,7 +51,7 @@ void CutscenePart::load_subtitles() *(undefined4 *)((char *)this + 0x24) = 0; } local_8 = 0xffffffff; - pbVar3 = (byte *)((int)this + 0xc); + pbVar3 = (byte *)(GHIDRA_INT(this) + 0xc); *(undefined4 *)((char *)this + 0x28) = 0; *(undefined4 *)((char *)this + 0x2c) = 0; *(undefined4 *)((char *)this + 0x30) = 0; @@ -85,7 +85,7 @@ void CutscenePart::load_subtitles() ch = *pbVar3; pbVar3 = pbVar3 + 1; } while (ch != 0); - if (0x1c < (uint)((int)pbVar3 - (int)(lineBuf + 1))) { + if (0x1c < GHIDRA_UINT((GHIDRA_INT(pbVar3) - GHIDRA_INT((lineBuf + 1))))) { newCue = 0; uStack_178 = 0; uStack_174 = 0; @@ -114,7 +114,7 @@ void CutscenePart::load_subtitles() local_160 = 0; local_15c = 0; local_158 = 0; - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); (**(code **)(*file + 0x18))(lineBuf,0x100); FUN_00684450(); textLineCount = 0; @@ -136,7 +136,7 @@ void CutscenePart::load_subtitles() textLineCount = iVar5; } puVar4[-1] = textLineCount; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); } } isEof = (**(code **)(*file + 0x10))(); @@ -148,7 +148,7 @@ void CutscenePart::load_subtitles() puVar2 = (undefined4 *)0x0; } savedPart = part; - uVar1 = ((int)puVar4 - (int)puVar2) / 0x1c; + uVar1 = (GHIDRA_INT(puVar4) - GHIDRA_INT(puVar2)) / 0x1c; iVar5 = *(int *)((char *)part + 0x24); *(uint *)((char *)part + 0x30) = uVar1; if (iVar5 != 0) { @@ -156,32 +156,32 @@ void CutscenePart::load_subtitles() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar1 = *(uint *)(iVar5 + -4); prevAllocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar1; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar1; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)prevAllocatedBytes < uVar1); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar1)); free((void *)(iVar5 + -4)); uVar1 = *(uint *)((char *)savedPart + 0x30); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); *(undefined4 *)((char *)savedPart + 0x24) = 0; } cueArray = operator_new_tracked - (-(uint)((int)((ulonglong)uVar1 * 0x1c >> 0x20) != 0) | - (uint)((ulonglong)uVar1 * 0x1c)); + (-GHIDRA_UINT((GHIDRA_INT(((ulonglong)uVar1 * 0x1c >> 0x20)) != 0)) | + GHIDRA_UINT(((ulonglong)uVar1 * 0x1c))); puVar4 = local_138; *(void **)((char *)savedPart + 0x24) = cueArray; memcpy(cueArray,local_138,*(int *)((char *)savedPart + 0x30) * 0x1c); (**(code **)*file)(1); if (puVar4 != (undefined4 *)0x0) { - uVar1 = (((int)cuesCapacityCache - (int)puVar4) / 0x1c) * 0x1c; + uVar1 = ((GHIDRA_INT(cuesCapacityCache) - GHIDRA_INT(puVar4)) / 0x1c) * 0x1c; puVar2 = puVar4; if (0xfff < uVar1) { puVar2 = (undefined4 *)puVar4[-1]; uVar1 = uVar1 + 0x23; - if (0x1f < (uint)((int)puVar4 + (-4 - (int)puVar2))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(puVar4) + (-4 - GHIDRA_INT(puVar2))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -258,11 +258,11 @@ void CutscenePart::render_subtitles() dVar6 = floor((double)local_20); fVar1 = local_14; centerX = (float)dVar6; - iVar2 = *(int *)((char *)local_24 + 0x18 + (int)local_14 * 4); + iVar2 = *(int *)((char *)local_24 + 0x18 + GHIDRA_INT(local_14) * 4); local_20 = 0.0; if (0 < iVar2) { lineHeight = textScale * 12.0; - lineText = (undefined4 *)((int)local_24 + ((int)local_14 + 2) * 4); + lineText = (undefined4 *)(GHIDRA_INT(local_24) + (GHIDRA_INT(local_14) + 2) * 4); local_14 = g_screenHeight - (float)(iVar2 + 1) * 12.0 * textScale; do { fVar5 = textScale; @@ -286,9 +286,9 @@ void CutscenePart::render_subtitles() ; lineText = lineText + 1; local_14 = lineHeight + local_14; - local_20 = (float)((int)local_20 + 1); + local_20 = (float)(GHIDRA_INT(local_20) + 1); local_8 = 0xffffffff; - } while ((int)local_20 < *(int *)((char *)local_24 + 0x18 + (int)fVar1 * 4)); + } while (GHIDRA_INT(local_20) < *(int *)((char *)local_24 + 0x18 + GHIDRA_INT(fVar1) * 4)); uVar3 = g_graphicsManager_flags; } g_graphicsManager_flags = uVar3 | 2; diff --git a/src/game/daily_challenge.cpp b/src/game/daily_challenge.cpp index d69a043..b07dbe4 100644 --- a/src/game/daily_challenge.cpp +++ b/src/game/daily_challenge.cpp @@ -16,7 +16,7 @@ void DailyChallenge::Init(uint dailyDate) uint local_c; undefined1 auStack_8 [4]; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); this->_id = 0; this->_seed = 0; this->_specialDailyId = 0; @@ -47,10 +47,10 @@ void DailyChallenge::Init(uint dailyDate) (*pcVar1)(); return; } - rng._seed = (uint)rng._seed >> 10 ^ rng._seed; + rng._seed = GHIDRA_UINT(rng._seed) >> 10 ^ rng._seed; rng._seed = rng._seed << 9 ^ rng._seed; - rng._seed = (uint)rng._seed >> 0x15 ^ rng._seed; - rolledPlayerType = (uint)rng._seed % 0x14; + rng._seed = GHIDRA_UINT(rng._seed) >> 0x15 ^ rng._seed; + rolledPlayerType = GHIDRA_UINT(rng._seed) % 0x14; (this->_params)._playerType = rolledPlayerType; uVar3 = rng._seed; } while ((((rolledPlayerType == 0xc) || (rolledPlayerType == 0xb)) || (rolledPlayerType == 0x11)) @@ -61,9 +61,9 @@ void DailyChallenge::Init(uint dailyDate) (*pcVar1)(); return; } - rng._seed = (uint)rng._seed >> 10 ^ rng._seed; + rng._seed = GHIDRA_UINT(rng._seed) >> 10 ^ rng._seed; rng._seed = rng._seed << 9 ^ rng._seed; - rng._seed = (uint)rng._seed >> 0x15 ^ rng._seed; + rng._seed = GHIDRA_UINT(rng._seed) >> 0x15 ^ rng._seed; switch(rng._seed & 3) { case 0: (this->_params)._endStage = 6; @@ -88,9 +88,9 @@ LAB_00426bde: (*pcVar1)(); return; } - rng._seed = (uint)rng._seed >> 10 ^ rng._seed; + rng._seed = GHIDRA_UINT(rng._seed) >> 10 ^ rng._seed; rng._seed = rng._seed << 9 ^ rng._seed; - rng._seed = (uint)rng._seed >> 0x15 ^ rng._seed; + rng._seed = GHIDRA_UINT(rng._seed) >> 0x15 ^ rng._seed; if ((rng._seed & 1U) != 0) goto LAB_00426bde; iVar2 = 0; } @@ -122,10 +122,10 @@ LAB_00426bde: (*pcVar1)(); return; } - rng._seed = (uint)rng._seed >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; + rng._seed = GHIDRA_UINT(rng._seed) >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; rng._seed = rng._seed << ((byte)rng._shift2 & 0x1f) ^ rng._seed; - rng._seed = (uint)rng._seed >> ((byte)rng._shift3 & 0x1f) ^ rng._seed; - if (rng._seed != ((uint)rng._seed / 6) * 6) goto LAB_00427185; + rng._seed = GHIDRA_UINT(rng._seed) >> ((byte)rng._shift3 & 0x1f) ^ rng._seed; + if (rng._seed != (GHIDRA_UINT(rng._seed) / 6) * 6) goto LAB_00427185; LAB_0042717b: (this->_params)._difficulty = 1; goto LAB_00427185; @@ -199,10 +199,10 @@ LAB_0042717b: (*pcVar1)(); return; } - rng._seed = (uint)rng._seed >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; + rng._seed = GHIDRA_UINT(rng._seed) >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; rng._seed = rng._seed << ((byte)rng._shift2 & 0x1f) ^ rng._seed; - rng._seed = (uint)rng._seed >> ((byte)rng._shift3 & 0x1f) ^ rng._seed; - uVar3 = (uint)rng._seed % 100; + rng._seed = GHIDRA_UINT(rng._seed) >> ((byte)rng._shift3 & 0x1f) ^ rng._seed; + uVar3 = GHIDRA_UINT(rng._seed) % 100; if (uVar3 < 0x14) { (this->_params)._endStage = 6; goto LAB_00427185; @@ -215,7 +215,7 @@ LAB_0042717b: if (0x40 < uVar3) { if (0x4f < uVar3) { (this->_params)._endStage = 0xb; - (this->_params)._pathType = (uint)(0x59 < uVar3); + (this->_params)._pathType = GHIDRA_UINT((0x59 < uVar3)); goto LAB_00427185; } goto LAB_00426e6e; @@ -227,13 +227,13 @@ LAB_0042717b: if ((char)dateTm.tm_wday == '\x03') { (this->_params)._endStage = 0xc; uVar3 = ((RNG *)(&rng))->RNG::RandomInt(2); - (this->_params)._pathType = (uint)(uVar3 == 0); + (this->_params)._pathType = GHIDRA_UINT((uVar3 == 0)); uVar3 = ((RNG *)(&rng))->RNG::RandomInt(100); - if ((int)uVar3 < 0x14) { + if (GHIDRA_INT(uVar3) < 0x14) { (this->_params)._endStage = 6; goto LAB_00427185; } - if ((int)uVar3 < 0x28) { + if (GHIDRA_INT(uVar3) < 0x28) { (this->_params)._endStage = 8; goto LAB_00427185; } @@ -247,34 +247,34 @@ LAB_0042717b: if ((char)dateTm.tm_wday != '\x05') { if ((char)dateTm.tm_wday != '\x06') goto LAB_00427185; uVar3 = ((RNG *)(&rng))->RNG::RandomInt(100); - if ((int)uVar3 < 0xf) { + if (GHIDRA_INT(uVar3) < 0xf) { (this->_params)._endStage = 6; } - else if ((int)uVar3 < 0x1e) { + else if (GHIDRA_INT(uVar3) < 0x1e) { (this->_params)._endStage = 8; } - else if ((int)uVar3 < 0x28) { + else if (GHIDRA_INT(uVar3) < 0x28) { (this->_params)._endStage = 0xc; uVar3 = ((RNG *)(&rng))->RNG::RandomInt(2); - (this->_params)._pathType = (uint)(uVar3 == 0); + (this->_params)._pathType = GHIDRA_UINT((uVar3 == 0)); } - else if ((int)uVar3 < 0x32) { + else if (GHIDRA_INT(uVar3) < 0x32) { (this->_params)._endStage = 10; (this->_params)._pathType = 0; } - else if ((int)uVar3 < 0x3c) { + else if (GHIDRA_INT(uVar3) < 0x3c) { (this->_params)._endStage = 10; (this->_params)._pathType = 1; } - else if ((int)uVar3 < 0x46) { + else if (GHIDRA_INT(uVar3) < 0x46) { (this->_params)._endStage = 0xb; (this->_params)._pathType = 0; } - else if ((int)uVar3 < 0x50) { + else if (GHIDRA_INT(uVar3) < 0x50) { (this->_params)._endStage = 0xb; (this->_params)._pathType = 1; } - else if ((int)uVar3 < 0x5a) { + else if (GHIDRA_INT(uVar3) < 0x5a) { (this->_params)._pathType = 3; (this->_params)._endStage = 0xd; } @@ -344,20 +344,20 @@ LAB_0042717b: } (this->_params)._difficulty = 1; uVar3 = ((RNG *)(&rng))->RNG::RandomInt(100); - if ((int)uVar3 < 0x14) { + if (GHIDRA_INT(uVar3) < 0x14) { (this->_params)._endStage = 6; goto LAB_00427185; } - if ((int)uVar3 < 0x28) { + if (GHIDRA_INT(uVar3) < 0x28) { (this->_params)._endStage = 8; goto LAB_00427185; } } - if (0x31 < (int)uVar3) { - if (0x40 < (int)uVar3) { - if (0x4f < (int)uVar3) { + if (0x31 < GHIDRA_INT(uVar3)) { + if (0x40 < GHIDRA_INT(uVar3)) { + if (0x4f < GHIDRA_INT(uVar3)) { (this->_params)._endStage = 0xb; - (this->_params)._pathType = (uint)(0x59 < (int)uVar3); + (this->_params)._pathType = GHIDRA_UINT((0x59 < GHIDRA_INT(uVar3))); goto LAB_00427185; } LAB_00426e6e: @@ -373,7 +373,7 @@ LAB_00426e53: } (this->_params)._endStage = 0xc; uVar3 = ((RNG *)(&rng))->RNG::RandomInt(2); - (this->_params)._pathType = (uint)(uVar3 == 0); + (this->_params)._pathType = GHIDRA_UINT((uVar3 == 0)); LAB_00427185: if (rng._seed == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -381,7 +381,7 @@ LAB_00427185: (*pcVar1)(); return; } - uVar3 = (uint)rng._seed >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; + uVar3 = GHIDRA_UINT(rng._seed) >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; uVar3 = uVar3 << ((byte)rng._shift2 & 0x1f) ^ uVar3; this->_seed = uVar3 >> ((byte)rng._shift3 & 0x1f) ^ uVar3; FUN_00427290(this->_specialDailyId); diff --git a/src/game/date_time.cpp b/src/game/date_time.cpp index 9d887d6..38ec24d 100644 --- a/src/game/date_time.cpp +++ b/src/game/date_time.cpp @@ -13,9 +13,9 @@ void DateTime::set_from_yyyymmdd(void *dateTime, int yyyymmdd) *(undefined4 *)((char *)dateTime + 0x2c) = 0; *(undefined4 *)((char *)dateTime + 0x30) = 0; *(byte *)dateTime = *(byte *)dateTime | 2; - *(uint *)((char *)dateTime + 0x20) = ((uint)yyyymmdd % 10000) / 100 - 1; - *(uint *)((char *)dateTime + 0x1c) = ((uint)yyyymmdd % 10000) % 100; - *(uint *)((char *)dateTime + 0x24) = (uint)yyyymmdd / 10000 - 0x76c; + *(uint *)((char *)dateTime + 0x20) = (GHIDRA_UINT(yyyymmdd) % 10000) / 100 - 1; + *(uint *)((char *)dateTime + 0x1c) = (GHIDRA_UINT(yyyymmdd) % 10000) % 100; + *(uint *)((char *)dateTime + 0x24) = GHIDRA_UINT(yyyymmdd) / 10000 - 0x76c; return; } @@ -30,7 +30,7 @@ void DateTime::constructor(byte isNow) tm *utcTime; __time64_t _Var5; - _Time = (__time64_t *)((int)this + 8); + _Time = (__time64_t *)(GHIDRA_INT(this) + 8); *(undefined4 *)_Time = 0; *(undefined1 *)this = 0; *(undefined4 *)((char *)this + 0xc) = 0; diff --git a/src/game/deathmatch_manager.cpp b/src/game/deathmatch_manager.cpp index 5be8170..4a887a2 100644 --- a/src/game/deathmatch_manager.cpp +++ b/src/game/deathmatch_manager.cpp @@ -139,7 +139,7 @@ void DeathmatchManager::set_type(int type) local_10 = ExceptionList; ExceptionList = &local_10; if (this->_type != (undefined4 *)0x0) { - (*(code *)**(undefined4 **)this->_type)(1,__security_cookie ^ (uint)(imageResult + 0x18)); + (*(code *)**(undefined4 **)this->_type)(1,__security_cookie ^ GHIDRA_UINT((imageResult + 0x18))); this->_type = (void *)0x0; } switch(type) { @@ -180,20 +180,20 @@ void DeathmatchManager::set_type(int type) *deathmatchType = IsaacRepentancePlus::DeathmatchTypeLudovico::vftable; deathmatchType[0xb] = 0; deathmatchType[0xc] = 0; - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; loadedImage = Manager::LoadImage(imageResult, (byte *) "gfx/Items/Collectibles/collectibles_329_theludovicotechnique.png" ); - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; ((KAGE::SmartPointer *)(deathmatchType + 0xb))->KAGE::SmartPointer::operator_assign(loadedImage); - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; if (((imageResultRefCount != (int *)0x0) && (isLastRef = (**(code **)(*imageResultRefCount + 0xc))(), isLastRef != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(imageResult); } - local_8 = CONCAT31(local_8._1_3_,5); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),5); ludovicoImage = (int *)deathmatchType[0xb]; if ((ludovicoImage[0xc] != 1) || (ludovicoImage[0xd] != 1)) { (**(code **)(*ludovicoImage + 0x44))(1,1); diff --git a/src/game/deathmatch_type_base.cpp b/src/game/deathmatch_type_base.cpp index 5e432d2..715593a 100644 --- a/src/game/deathmatch_type_base.cpp +++ b/src/game/deathmatch_type_base.cpp @@ -25,17 +25,17 @@ byte DeathmatchTypeBase::Init() local_1c = camera; ItemPool::remove_deathmatch_pill_effects(); uVar2 = 0; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { game = g_game; playerListEnd = (g_game->_playerManager)._playerList._end; - if ((int)playerListEnd - (int)(g_game->_playerManager)._playerList._begin >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (game->_playerManager)._playerList._end; } piVar3 = (game->_playerManager)._playerList._begin; - if (uVar2 < (uint)((int)playerListEnd - (int)piVar3 >> 2)) { + if (uVar2 < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(piVar3) >> 2))) { piVar3 = piVar3 + uVar2; } lobbyMembersBytes = 4; @@ -48,28 +48,28 @@ byte DeathmatchTypeBase::Init() lobbyMembersBytes = lobbyMembersBytes + -1; } while (lobbyMembersBytes != 0); uVar2 = uVar2 + 1; - } while (uVar2 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (uVar2 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); } FUN_009b9150(); piVar3 = local_1c; uVar2 = 0; pMStack_20 = g_manager; - lobbyMembersBytes = (int)(g_manager->_lobbyMembers)._end - (int)(g_manager->_lobbyMembers)._begin; + lobbyMembersBytes = GHIDRA_INT((g_manager->_lobbyMembers)._end) - GHIDRA_INT((g_manager->_lobbyMembers)._begin); lobbyMembersBytes = lobbyMembersBytes >> 0x1f; if (lobbyMembersBytes / 0x14 + lobbyMembersBytes != lobbyMembersBytes) { do { pMStack_20 = (Manager *) (**(code **)(*piVar3 + 0x7c)) (*(undefined4 *) - ((int)(pMStack_20->_lobbyMembers)._begin + uVar2 * 0x14 + 0xc)); + (GHIDRA_INT((pMStack_20->_lobbyMembers)._begin) + uVar2 * 0x14 + 0xc)); game = g_game; lobbyMembersBytes = *(int *)(*(int *)(iStack_24 + 0x4b278) + 4 + uVar2 * 0x14); if (lobbyMembersBytes == 0) { uStack_14 = 0; - uStack_14._4_4_ = 0; - uStack_14._0_4_ = (int *)0x0; - memberIdHigh = uStack_14._4_4_; + (*(undefined4 *)((char *)&(uStack_14) + 0x4)) = 0; + (*(undefined4 *)((char *)&(uStack_14) + 0x0)) = (int *)0x0; + memberIdHigh = (*(undefined4 *)((char *)&(uStack_14) + 0x4)); local_1c = (int *)uStack_14; } else { @@ -81,23 +81,23 @@ byte DeathmatchTypeBase::Init() KAGE_LogMessage(0x10,(byte *)"Error: Game Start Seed was not set.\n"); } PlayerManager::init_main_player - (&game->_playerManager,(int)pMStack_20,(game->_seedEffects)._playerInitSeed); + (&game->_playerManager,GHIDRA_INT(pMStack_20),(game->_seedEffects)._playerInitSeed); game = g_game; pMStack_20 = *(Manager **)(*piVar3 + 0x78); - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 == 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); } (*(code *)pMStack_20)(*(undefined4 *)(game->_playerManager)._playerList._begin,&local_1c); } else { assignPlayerFn = *(code **)(*piVar3 + 0x78); - pEVar1 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::SpawnCoPlayer2((int)pMStack_20); + pEVar1 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::SpawnCoPlayer2(GHIDRA_INT(pMStack_20)); (*assignPlayerFn)(pEVar1,&local_1c); } uVar2 = uVar2 + 1; - } while (uVar2 < (uint)(((int)(pMStack_20->_lobbyMembers)._end - - (int)(pMStack_20->_lobbyMembers)._begin) / 0x14)); + } while (uVar2 < GHIDRA_UINT(((GHIDRA_INT((pMStack_20->_lobbyMembers)._end) - + GHIDRA_INT((pMStack_20->_lobbyMembers)._begin)) / 0x14))); } game = g_game; (g_game->_playerManager)._coopSlots[0]._controllerIndex = -1; @@ -181,7 +181,7 @@ void DeathmatchTypeBase::Update() local_8 = 0xffffffff; puStack_c = &LAB_00af1d27; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; iVar5 = *(int *)((char *)room + 8) + -1; *(int *)((char *)room + 8) = iVar5; @@ -191,12 +191,12 @@ void DeathmatchTypeBase::Update() self = room; if (iVar5 < 0) { if (iVar5 % 0x1e == 0) { - iVar5 = (int)((ulonglong)((longlong)iVar5 * 0x77777777) >> 0x20) - iVar5; + iVar5 = GHIDRA_INT(((ulonglong)((longlong)iVar5 * 0x77777777) >> 0x20)) - iVar5; uVar2 = Random(); tilePos = ((Room *)(g_game->_room))->Room::GetRandomPosition(&flyBombPos,0.0); ((Game *)(g_game))->Game::SpawnEx(0x333,0,tilePos,&g_vectorZero,(Entity *)0x0,0,uVar2,0); uVar2 = (iVar5 >> 4) - (iVar5 >> 0x1f) & 0x80000003; - if ((int)uVar2 < 0) { + if (GHIDRA_INT(uVar2) < 0) { uVar2 = (uVar2 - 1 | 0xfffffffc) + 1; } if (uVar2 == 0) { @@ -204,7 +204,7 @@ void DeathmatchTypeBase::Update() game = g_game; do { room = game->_room; - local_20 = (GridEntity *)((int)&local_20[-1]._sprite._bitflags + 3); + local_20 = (GridEntity *)(GHIDRA_INT(&local_20[-1]._sprite._bitflags) + 3); tilePos = ((Room *)(room))->Room::GetRandomPosition(&randomTilePos,0.0); tilePos = ((Room *)(room))->Room::FindFreeTilePosition(&freeTilePos,tilePos,0.0); uVar2 = 0; @@ -214,12 +214,12 @@ void DeathmatchTypeBase::Update() game = g_game; savedTileY = tileY; local_18 = fVar6; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { LAB_0042aa81: pvVar4 = game->_room; - iVar5 = (int)((tileY - 120.0) / 40.0 + 0.5); - gridX = (int)((fVar6 - 40.0) / 40.0 + 0.5); + iVar5 = GHIDRA_INT(((tileY - 120.0) / 40.0 + 0.5)); + gridX = GHIDRA_INT(((fVar6 - 40.0) / 40.0 + 0.5)); if ((((gridX < 0) || (*(int *)((char *)pvVar4 + 0xc) <= gridX)) || (iVar5 < 0)) || (*(int *)((char *)pvVar4 + 0x10) <= iVar5)) { uVar2 = 0xffffffff; @@ -230,7 +230,7 @@ LAB_0042ab07: else { uVar2 = *(int *)((char *)pvVar4 + 0xc) * iVar5 + gridX; local_18 = (float)Random(); - if (((int)uVar2 < 0) || (0x1bf < (int)uVar2)) goto LAB_0042ab07; + if ((GHIDRA_INT(uVar2) < 0) || (0x1bf < GHIDRA_INT(uVar2))) goto LAB_0042ab07; } room = self; if ((uVar2 < 0x1c0) && (*(int *)((char *)pvVar4 + uVar2 * 4 + 0x76c) < 0x385)) { @@ -254,7 +254,7 @@ LAB_0042ab07: (**(code **)*oldGridEntity)(1); } *(GridEntity **)((char *)pvVar4 + uVar2 * 4 + 0x24) = spikes; - (spikes->_desc)._spawnSeed = (int)local_18; + (spikes->_desc)._spawnSeed = GHIDRA_INT(local_18); iVar5 = *(int *)spikes; (spikes->_desc)._variant = 0; (spikes->_desc)._varData = 0; @@ -272,7 +272,7 @@ LAB_0042ab07: } while( true ) { pvVar4 = (playerManager->_playerList)._end; - if ((int)pvVar4 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar4) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar4 = (playerManager->_playerList)._end; game = g_game; @@ -280,7 +280,7 @@ LAB_0042ab07: tileY = savedTileY; } piVar3 = (playerManager->_playerList)._begin; - if (uVar2 < (uint)((int)pvVar4 - (int)piVar3 >> 2)) { + if (uVar2 < GHIDRA_UINT((GHIDRA_INT(pvVar4) - GHIDRA_INT(piVar3) >> 2))) { piVar3 = piVar3 + uVar2; } dx = fVar6 - *(float *)(*piVar3 + 0x33c); @@ -288,22 +288,22 @@ LAB_0042ab07: if (dy * dy + dx * dx < 144.0) break; playerManager = &game->_playerManager; uVar2 = uVar2 + 1; - if ((uint)((int)(game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2) <= uVar2) goto LAB_0042aa81; + if (GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2)) <= uVar2) goto LAB_0042aa81; } } while (local_20 != (GridEntity *)0x0); } } iVar5 = *(int *)((char *)room + 8); fVar6 = (float)(-iVar5 % 0xf) / 15.0; - iVar5 = (int)((ulonglong)((longlong)iVar5 * 0x77777777) >> 0x20) - iVar5; + iVar5 = GHIDRA_INT(((ulonglong)((longlong)iVar5 * 0x77777777) >> 0x20)) - iVar5; *(float *)((char *)room + 0xc) = fVar6; if ((~((char)(iVar5 >> 3) - (char)(iVar5 >> 0x1f)) & 1U) != 0) { *(float *)((char *)room + 0xc) = 1.0 - fVar6; } } if ((*(byte *)((char *)room + 4) & 1) != 0) { - piVar3 = (int *)((int)room + 0x28); + piVar3 = (int *)(GHIDRA_INT(room) + 0x28); *piVar3 = *piVar3 + -1; if (*piVar3 == 0) { (**(code **)(*(int *)room + 0x80))(uVar1); @@ -339,7 +339,7 @@ void DeathmatchTypeBase::StoreGameState(void *gameState) storedEnd = *(undefined4 **)((char *)gameStateLocal + 0x1fde4); if (storedEnd == *(undefined4 **)((char *)gameStateLocal + 0x1fde8)) { std::vector::_Emplace_reallocate - (storedEnd,(undefined4 *)((int)gameState + 0x10)); + (storedEnd,(undefined4 *)(GHIDRA_INT(gameState) + 0x10)); } else { *storedEnd = *(undefined4 *)((char *)gameState + 0x10); @@ -381,7 +381,7 @@ void DeathmatchTypeBase::RestoreGameState(int param_1) local_8 = 0xffffffff; puStack_c = &LAB_00af1dcd; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; iVar1 = *(int *)(in_ECX + 0x20); idSet = (int *)(in_ECX + 0x20); @@ -419,24 +419,24 @@ void DeathmatchTypeBase::RestoreGameState(int param_1) *(undefined2 *)(node + 3) = 0; treeHead = (int *)*idSetSaved; idSetSaved[1] = idSetSaved[1] + 1; - node[1] = (int)insertParent; + node[1] = GHIDRA_INT(insertParent); if (insertParent == treeHead) { - *treeHead = (int)node; - treeHead[1] = (int)node; - treeHead[2] = (int)node; + *treeHead = GHIDRA_INT(node); + treeHead[1] = GHIDRA_INT(node); + treeHead[2] = GHIDRA_INT(node); *(undefined1 *)(node + 3) = 1; } else { if (isInsertLeft == 0) { - insertParent[2] = (int)node; + insertParent[2] = GHIDRA_INT(node); if (insertParent == (int *)treeHead[2]) { - treeHead[2] = (int)node; + treeHead[2] = GHIDRA_INT(node); } } else { - *insertParent = (int)node; + *insertParent = GHIDRA_INT(node); if (insertParent == (int *)*treeHead) { - *treeHead = (int)node; + *treeHead = GHIDRA_INT(node); } } fixNode = node; @@ -463,21 +463,21 @@ void DeathmatchTypeBase::RestoreGameState(int param_1) iVar1 = *idSet; if (node == *(int **)(iVar1 + 4)) { *(int **)(iVar1 + 4) = piVar3; - piVar3[2] = (int)node; + piVar3[2] = GHIDRA_INT(node); } else { rotateParent = (int *)node[1]; if (node == (int *)rotateParent[2]) { - rotateParent[2] = (int)piVar3; - piVar3[2] = (int)node; + rotateParent[2] = GHIDRA_INT(piVar3); + piVar3[2] = GHIDRA_INT(node); } else { - *rotateParent = (int)piVar3; - piVar3[2] = (int)node; + *rotateParent = GHIDRA_INT(piVar3); + piVar3[2] = GHIDRA_INT(node); } } LAB_0042c01a: - node[1] = (int)piVar3; + node[1] = GHIDRA_INT(piVar3); } else { if ((char)piVar3[3] != '\0') { @@ -501,13 +501,13 @@ LAB_0042c01a: else { rotateParent = (int *)node[1]; if (node == (int *)*rotateParent) { - *rotateParent = (int)piVar3; + *rotateParent = GHIDRA_INT(piVar3); } else { - rotateParent[2] = (int)piVar3; + rotateParent[2] = GHIDRA_INT(piVar3); } } - *piVar3 = (int)node; + *piVar3 = GHIDRA_INT(node); goto LAB_0042c01a; } LAB_0042bfa6: @@ -561,22 +561,22 @@ Entity * DeathmatchTypeBase::spawn_random_pickup() local_8 = 0xffffffff; puStack_c = &LAB_00af1df0; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(local_24 + 0x20); + uVar1 = __security_cookie ^ GHIDRA_UINT((local_24 + 0x20)); ExceptionList = &local_10; EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)local_24,5,-1,-1,0,0); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)local_24,5,-1,-1,0,0); uVar4 = 0; modeValue = 0; uVar3 = uVar4; if (local_18 != 0.0) { do { uVar4 = uVar3 + 1; - if (*(int *)(*(int *)(local_24._4_4_ + modeValue * 4) + 0x2c) == 100) { + if (*(int *)(*(int *)((*(undefined4 *)((char *)&(local_24) + 0x4)) + modeValue * 4) + 0x2c) == 100) { uVar4 = uVar3; } modeValue = modeValue + 1; uVar3 = uVar4; - } while (modeValue < (uint)local_18); + } while (modeValue < GHIDRA_UINT(local_18)); } roomShape = *(int *)((char *)g_game->_room + 4); if (roomShape != 0) { @@ -604,7 +604,7 @@ LAB_0042c24b: LAB_0042c250: if (local_24[0] == '\0') { local_8 = 0; - tracked_alloc(1,(void *)local_24._4_4_,0); + tracked_alloc(1,(*(undefined4 *)((char *)&((void *)local_24) + 0x4)),0); } ExceptionList = local_10; return (Entity *)0x0; @@ -615,15 +615,15 @@ LAB_0042c281: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } - if ((void *)local_24._4_4_ != (void *)0x0) { - uVar4 = *(uint *)(local_24._4_4_ + -4); + if ((*(undefined4 *)((char *)&((void *)local_24) + 0x4)) != (void *)0x0) { + uVar4 = *(uint *)((*(undefined4 *)((char *)&(local_24) + 0x4)) + -4); oldBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar4; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar4; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)oldBytes < uVar4); - free((void *)(local_24._4_4_ + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(oldBytes) < uVar4)); + free((void *)((*(undefined4 *)((char *)&(local_24) + 0x4)) + -4)); } local_8 = 0xffffffff; } @@ -654,17 +654,17 @@ LAB_0042c281: uVar4 = 0; playerManager = &g_game->_playerManager; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { playerListEnd = (playerManager->_playerList)._end; - if ((int)playerListEnd - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (playerManager->_playerList)._end; game = g_game; } playerSlot = (playerManager->_playerList)._begin; - if (uVar4 < (uint)((int)playerListEnd - (int)playerSlot >> 2)) { + if (uVar4 < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + uVar4; } if (*(int *)(*playerSlot + 0x1580) != 0) { @@ -673,8 +673,8 @@ LAB_0042c281: } playerManager = &game->_playerManager; uVar4 = uVar4 + 1; - } while (uVar4 < (uint)((int)(game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar4 < GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } uVar4 = Random(); uVar4 = 0x46 - ((uVar4 & 1) != 0); @@ -706,12 +706,12 @@ LAB_0042c436: if (roomHeight <= local_18) { maxDimension = local_18; } - local_24._8_4_ = local_18 * 0.5; + (*(undefined4 *)((char *)&(local_24) + 0x8)) = local_18 * 0.5; local_18 = roomHeight * 0.5 + (this_00->_topLeftPos).y; - local_24._8_4_ = (float)local_24._8_4_ + (this_00->_topLeftPos).x; + (*(undefined4 *)((char *)&(local_24) + 0x8)) = (*(undefined4 *)((char *)&((float)local_24) + 0x8)) + (this_00->_topLeftPos).x; Room::FindFreePickupSpawnPosition (this_00,&spawnPos,(Vector *)(local_24 + 8), - (float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283064e-10 * maxDimension,0,0,0); pickup = ((Game *)(g_game))->Game::SpawnEx(5,uVar4,&spawnPos,&g_vectorZero,(Entity *)0x0,0,uVar3,0); ExceptionList = local_10; diff --git a/src/game/debug_renderer.cpp b/src/game/debug_renderer.cpp index 4659c32..c83bee8 100644 --- a/src/game/debug_renderer.cpp +++ b/src/game/debug_renderer.cpp @@ -67,7 +67,7 @@ void DebugRenderer::Render() undefined4 local_14; ushort *cmdLast; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00af1e50; local_1c = ExceptionList; @@ -92,12 +92,12 @@ void DebugRenderer::Render() switch(*cmd) { case 0xfff9: cmdLast = cmd + 2; - local_28 = (byte *)(*(int *)((char *)DVar3 + 0x34) + (uint)*cmdLast * 0x18); + local_28 = (byte *)(*(int *)((char *)DVar3 + 0x34) + GHIDRA_UINT(*cmdLast) * 0x18); local_24 = g_displayPixelRatio * g_screenPointScale; - local_40 = (*(float *)(*(int *)((char *)DVar3 + 0x28) + 4 + (uint)cmd[1] * 8) - 140.0) * + local_40 = (*(float *)(*(int *)((char *)DVar3 + 0x28) + 4 + GHIDRA_UINT(cmd[1]) * 8) - 140.0) * 0.65 + (g_screenHeight - 182.0) * 0.5; local_44 = local_24 * - ((*(float *)(*(int *)((char *)DVar3 + 0x28) + (uint)cmd[1] * 8) - 60.0) * 0.65 + ((*(float *)(*(int *)((char *)DVar3 + 0x28) + GHIDRA_UINT(cmd[1]) * 8) - 60.0) * 0.65 + (g_screenWidth - 338.0) * 0.5) + 0.5; dVar6 = floor((double)local_44); local_2c = (float)dVar6 / local_24; @@ -121,41 +121,41 @@ void DebugRenderer::Render() local_14 = 0xffffffff; break; case 0xfffa: - local_24 = (float)(uint)cmd[2]; - local_30 = (float)(uint)cmd[1]; + local_24 = (float)GHIDRA_UINT(cmd[2]); + local_30 = (float)GHIDRA_UINT(cmd[1]); cmdLast = cmd + 3; iVar2 = *(int *)((char *)DVar3 + 0x28); - pointIndex = (uint)*cmdLast; + pointIndex = GHIDRA_UINT(*cmdLast); capsuleOffsetX = - *(float *)(iVar2 + 4 + pointIndex * 8) * *(float *)(iVar2 + (int)local_24 * 8); + *(float *)(iVar2 + 4 + pointIndex * 8) * *(float *)(iVar2 + GHIDRA_INT(local_24) * 8); fVar4 = (*(float *)(iVar2 + pointIndex * 8) * 6.2831855) / 10.0; if (fVar4 <= 2.0) { fVar4 = 2.0; } capsuleOffsetY = - *(float *)(iVar2 + 4 + (int)local_24 * 8) * + *(float *)(iVar2 + 4 + GHIDRA_INT(local_24) * 8) * *(float *)(iVar2 + 4 + pointIndex * 8); if (12.0 <= fVar4) { fVar4 = 12.0; } - local_2c = (float)((int)fVar4 * 2); + local_2c = (float)(GHIDRA_INT(fVar4) * 2); local_38 = cmdLast; local_28 = (byte *)cos(1.5707964); sinQuarterTurn = sin(1.5707964); DVar3 = node; iVar2 = *(int *)((char *)node + 0x28); - fVar4 = *(float *)(iVar2 + (int)local_24 * 8); - fVar5 = *(float *)(iVar2 + 4 + (int)local_24 * 8); + fVar4 = *(float *)(iVar2 + GHIDRA_INT(local_24) * 8); + fVar5 = *(float *)(iVar2 + 4 + GHIDRA_INT(local_24) * 8); local_34 = (fVar4 * (float)local_28 - sinQuarterTurn * fVar5) * - *(float *)(iVar2 + (uint)*cmdLast * 8); + *(float *)(iVar2 + GHIDRA_UINT(*cmdLast) * 8); local_3c = g_displayPixelRatio * g_screenPointScale; capsuleAxisY = (sinQuarterTurn * fVar4 + fVar5 * (float)local_28) * - *(float *)(iVar2 + (uint)*cmdLast * 8); + *(float *)(iVar2 + GHIDRA_UINT(*cmdLast) * 8); local_24 = ((g_screenWidth - 338.0) * 0.5 + - (*(float *)(iVar2 + (int)local_30 * 8) - 60.0) * 0.65) * local_3c + 0.5; + (*(float *)(iVar2 + GHIDRA_INT(local_30) * 8) - 60.0) * 0.65) * local_3c + 0.5; dVar6 = floor((double)local_24); local_28 = (byte *)((float)dVar6 / local_3c); - local_24 = ((*(float *)(*(int *)((char *)DVar3 + 0x28) + 4 + (int)local_30 * 8) - 140.0) + local_24 = ((*(float *)(*(int *)((char *)DVar3 + 0x28) + 4 + GHIDRA_INT(local_30) * 8) - 140.0) * 0.65 + (g_screenHeight - 182.0) * 0.5) * local_3c + 0.5; dVar6 = floor((double)local_24); capsuleCenterY = roomOffsetY + (float)dVar6 / local_3c; @@ -181,10 +181,10 @@ void DebugRenderer::Render() arcStartB.x = local_3c; arcStartB.y = local_40; local_40 = 1.4013e-45; - if (0 < (int)local_2c) { + if (0 < GHIDRA_INT(local_2c)) { iVar2 = 1; prevStep = -1; - local_24 = (float)(int)local_2c; + local_24 = (float)GHIDRA_INT(local_2c); do { local_40 = (((float)prevStep * 180.0) / local_24) * 0.017453292; local_3c = cos(local_40); @@ -212,15 +212,15 @@ void DebugRenderer::Render() arcStartA.y = local_3c; arcStartB.x = local_40; arcStartB.y = local_30; - } while (iVar2 <= (int)local_2c); + } while (iVar2 <= GHIDRA_INT(local_2c)); cmdLast = local_38; DVar3 = node; } break; case 0xfffb: - local_2c = (float)(uint)cmd[1]; + local_2c = (float)GHIDRA_UINT(cmd[1]); cmdLast = cmd + 2; - local_34 = *(float *)(*(int *)((char *)DVar3 + 0x28) + (uint)*cmdLast * 8); + local_34 = *(float *)(*(int *)((char *)DVar3 + 0x28) + GHIDRA_UINT(*cmdLast) * 8); fVar4 = (local_34 * 6.2831855) / 10.0; local_30 = g_displayPixelRatio * g_screenPointScale; if (fVar4 <= 2.0) { @@ -229,15 +229,15 @@ void DebugRenderer::Render() if (12.0 <= fVar4) { fVar4 = 12.0; } - local_48 = (float)((int)fVar4 * 2); + local_48 = (float)(GHIDRA_INT(fVar4) * 2); local_24 = ((g_screenWidth - 338.0) * 0.5 + - (*(float *)(*(int *)((char *)DVar3 + 0x28) + (int)local_2c * 8) - 60.0) * 0.65 + (*(float *)(*(int *)((char *)DVar3 + 0x28) + GHIDRA_INT(local_2c) * 8) - 60.0) * 0.65 ) * local_30 + 0.5; local_38 = cmdLast; dVar6 = floor((double)local_24); local_28 = (byte *)((float)dVar6 / local_30); local_24 = ((g_screenHeight - 182.0) * 0.5 + - (*(float *)(*(int *)((char *)DVar3 + 0x28) + 4 + (int)local_2c * 8) - 140.0) * + (*(float *)(*(int *)((char *)DVar3 + 0x28) + 4 + GHIDRA_INT(local_2c) * 8) - 140.0) * 0.65) * local_30 + 0.5; dVar6 = floor((double)local_24); local_24 = (float)dVar6; @@ -246,12 +246,12 @@ void DebugRenderer::Render() fVar4 = cos(0.0); circlePrev.x = fVar4 * local_34 * 0.65 + local_30; fVar5 = sin(0.0); - fVar4 = (float)((int)local_48 * 2); + fVar4 = (float)(GHIDRA_INT(local_48) * 2); circlePrev.y = fVar5 * local_34 * 0.65 + local_3c; local_2c = fVar4; - if (0 < (int)fVar4) { + if (0 < GHIDRA_INT(fVar4)) { iVar2 = 1; - local_28 = (byte *)(float)(int)local_48; + local_28 = (byte *)(float)GHIDRA_INT(local_48); do { local_24 = (((float)iVar2 * 180.0) / (float)local_28) * 0.017453292; fVar5 = cos(local_24); @@ -264,26 +264,26 @@ void DebugRenderer::Render() iVar2 = iVar2 + 1; circlePrev.x = local_2c; circlePrev.y = local_24; - } while (iVar2 <= (int)fVar4); + } while (iVar2 <= GHIDRA_INT(fVar4)); cmdLast = local_38; DVar3 = node; } break; case 0xfffc: - local_2c = (float)(uint)cmd[1]; + local_2c = (float)GHIDRA_UINT(cmd[1]); iVar2 = *(int *)((char *)DVar3 + 0x28); local_38 = (ushort *)(g_displayPixelRatio * g_screenPointScale); - pointIndex = (uint)cmd[2]; - fVar4 = *(float *)(iVar2 + (int)local_2c * 8); + pointIndex = GHIDRA_UINT(cmd[2]); + fVar4 = *(float *)(iVar2 + GHIDRA_INT(local_2c) * 8); rectSize.x = (*(float *)(iVar2 + pointIndex * 8) - fVar4) * 0.65; rectSize.y = (*(float *)(iVar2 + 4 + pointIndex * 8) - - *(float *)(iVar2 + 4 + (int)local_2c * 8)) * 0.65; + *(float *)(iVar2 + 4 + GHIDRA_INT(local_2c) * 8)) * 0.65; local_24 = ((g_screenWidth - 338.0) * 0.5 + (fVar4 - 60.0) * 0.65) * (float)local_38 + 0.5; dVar6 = floor((double)local_24); local_48 = (float)dVar6 / (float)local_38; local_24 = ((g_screenHeight - 182.0) * 0.5 + - (*(float *)(*(int *)((char *)DVar3 + 0x28) + 4 + (int)local_2c * 8) - 140.0) * + (*(float *)(*(int *)((char *)DVar3 + 0x28) + 4 + GHIDRA_INT(local_2c) * 8) - 140.0) * 0.65) * (float)local_38 + 0.5; dVar6 = floor((double)local_24); local_24 = (float)dVar6; @@ -294,20 +294,20 @@ void DebugRenderer::Render() cmdLast = cmd + 2; break; case 0xfffd: - local_2c = (float)(uint)cmd[1]; + local_2c = (float)GHIDRA_UINT(cmd[1]); iVar2 = *(int *)((char *)DVar3 + 0x28); local_38 = (ushort *)(g_displayPixelRatio * g_screenPointScale); - pointIndex = (uint)cmd[2]; - fVar4 = *(float *)(iVar2 + (int)local_2c * 8); + pointIndex = GHIDRA_UINT(cmd[2]); + fVar4 = *(float *)(iVar2 + GHIDRA_INT(local_2c) * 8); lineSize.x = (*(float *)(iVar2 + pointIndex * 8) - fVar4) * 0.65; lineSize.y = (*(float *)(iVar2 + 4 + pointIndex * 8) - - *(float *)(iVar2 + 4 + (int)local_2c * 8)) * 0.65; + *(float *)(iVar2 + 4 + GHIDRA_INT(local_2c) * 8)) * 0.65; local_24 = ((g_screenWidth - 338.0) * 0.5 + (fVar4 - 60.0) * 0.65) * (float)local_38 + 0.5; dVar6 = floor((double)local_24); local_48 = (float)dVar6 / (float)local_38; local_24 = ((g_screenHeight - 182.0) * 0.5 + - (*(float *)(*(int *)((char *)DVar3 + 0x28) + 4 + (int)local_2c * 8) - 140.0) * + (*(float *)(*(int *)((char *)DVar3 + 0x28) + 4 + GHIDRA_INT(local_2c) * 8) - 140.0) * 0.65) * (float)local_38 + 0.5; dVar6 = floor((double)local_24); local_24 = (float)dVar6; @@ -318,25 +318,25 @@ void DebugRenderer::Render() cmdLast = cmd + 2; break; case 0xfffe: - local_38 = (ushort *)(uint)cmd[1]; + local_38 = (ushort *)GHIDRA_UINT(cmd[1]); cmdLast = cmd + 2; local_34 = g_displayPixelRatio * g_screenPointScale; local_30 = (g_screenHeight - 182.0) * 0.5; local_28 = (byte *)((g_screenWidth - 338.0) * 0.5); - local_24 = ((*(float *)(*(int *)((char *)DVar3 + 0x28) + (uint)*cmdLast * 8) - 60.0) * + local_24 = ((*(float *)(*(int *)((char *)DVar3 + 0x28) + GHIDRA_UINT(*cmdLast) * 8) - 60.0) * 0.65 + (float)local_28) * local_34 + 0.5; dVar6 = floor((double)local_24); local_2c = (float)dVar6 / local_34; - local_24 = ((*(float *)(*(int *)((char *)DVar3 + 0x28) + 4 + (uint)*cmdLast * 8) - 140.0) + local_24 = ((*(float *)(*(int *)((char *)DVar3 + 0x28) + 4 + GHIDRA_UINT(*cmdLast) * 8) - 140.0) * 0.65 + local_30) * local_34 + 0.5; dVar6 = floor((double)local_24); segmentStart.x = local_2c + roomOffsetX; segmentStart.y = roomOffsetY + (float)dVar6 / local_34; - local_24 = ((*(float *)(*(int *)((char *)DVar3 + 0x28) + (int)local_38 * 8) - 60.0) * + local_24 = ((*(float *)(*(int *)((char *)DVar3 + 0x28) + GHIDRA_INT(local_38) * 8) - 60.0) * 0.65 + (float)local_28) * local_34 + 0.5; dVar6 = floor((double)local_24); local_2c = (float)dVar6 / local_34; - local_24 = ((*(float *)(*(int *)((char *)DVar3 + 0x28) + 4 + (int)local_38 * 8) - 140.0) + local_24 = ((*(float *)(*(int *)((char *)DVar3 + 0x28) + 4 + GHIDRA_INT(local_38) * 8) - 140.0) * 0.65 + local_30) * local_34 + 0.5; dVar6 = floor((double)local_24); local_24 = (float)dVar6; @@ -345,12 +345,12 @@ void DebugRenderer::Render() render_color_quad(&segmentEnd,&segmentStart,&color,&color,1.0); break; case 0xffff: - pfVar1 = (float *)(*(int *)((char *)DVar3 + 0x1c) + (uint)cmd[1] * 0x14); + pfVar1 = (float *)(*(int *)((char *)DVar3 + 0x1c) + GHIDRA_UINT(cmd[1]) * 0x14); color._red = *pfVar1; color._green = pfVar1[1]; color._blue = pfVar1[2]; color._alpha = pfVar1[3]; - color._unk = *(int *)(*(int *)((char *)DVar3 + 0x1c) + 0x10 + (uint)cmd[1] * 0x14); + color._unk = *(int *)(*(int *)((char *)DVar3 + 0x1c) + 0x10 + GHIDRA_UINT(cmd[1]) * 0x14); cmdLast = cmd + 1; } cmd = cmdLast + 1; @@ -426,7 +426,7 @@ void * DebugRenderer::Get(int Index, byte Unk) *(undefined4 *)((char *)node + 0xc) = 5; } ExceptionList = local_10; - return (undefined4 *)((int)node + 8); + return (undefined4 *)(GHIDRA_INT(node) + 8); } } } @@ -458,7 +458,7 @@ void * DebugRenderer::Get(int Index, byte Unk) ((Shape *)(newNode + 2))->Shape::Shape(&tmpShape); tmpTextsEnd = piStack_24; tmpTextsBegin = piStack_28; - this[1] = (DebugRenderer)((int)this[1] + 1); + this[1] = (DebugRenderer)(GHIDRA_INT(this[1]) + 1); prevNode = *(DebugRenderer *)((char *)node + 4); *newNode = node; newNode[1] = prevNode; @@ -475,7 +475,7 @@ void * DebugRenderer::Get(int Index, byte Unk) if (0xfff < size) { ptr = *(void **)((char *)pvVar2 + -4); size = uVar1 + 0x24; - if (0x1f < (uint)((int)pvVar2 + (-4 - (int)ptr))) goto LAB_0042ed75; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar2) + (-4 - GHIDRA_INT(ptr))))) goto LAB_0042ed75; } operator_delete(ptr,size); } @@ -483,44 +483,44 @@ void * DebugRenderer::Get(int Index, byte Unk) piVar3[5] = 0xf; *(undefined1 *)piVar3 = 0; } - uVar1 = ((local_20 - (int)tmpTextsBegin) / 0x18) * 0x18; + uVar1 = ((local_20 - GHIDRA_INT(tmpTextsBegin)) / 0x18) * 0x18; piVar3 = tmpTextsBegin; if (0xfff < uVar1) { piVar3 = (int *)tmpTextsBegin[-1]; uVar1 = uVar1 + 0x23; - if ((undefined1 *)0x1f < (undefined1 *)((int)tmpTextsBegin + (-4 - (int)piVar3))) + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(tmpTextsBegin) + (-4 - GHIDRA_INT(piVar3)))) goto LAB_0042ed75; } operator_delete(piVar3,uVar1); this = self; } if (pvStack_34 != (void *)0x0) { - uVar1 = iStack_2c - (int)pvStack_34 & 0xfffffff8; + uVar1 = iStack_2c - GHIDRA_INT(pvStack_34) & 0xfffffff8; pvVar2 = pvStack_34; if (0xfff < uVar1) { pvVar2 = *(void **)((char *)pvStack_34 + -4); uVar1 = uVar1 + 0x23; - if (0x1f < (uint)((int)pvStack_34 + (-4 - (int)pvVar2))) goto LAB_0042ed75; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvStack_34) + (-4 - GHIDRA_INT(pvVar2))))) goto LAB_0042ed75; } operator_delete(pvVar2,uVar1); } if (local_40 != (void *)0x0) { - uVar1 = ((iStack_38 - (int)local_40) / 0x14) * 0x14; + uVar1 = ((iStack_38 - GHIDRA_INT(local_40)) / 0x14) * 0x14; pvVar2 = local_40; if (0xfff < uVar1) { pvVar2 = *(void **)((char *)local_40 + -4); uVar1 = uVar1 + 0x23; - if (0x1f < (uint)((int)local_40 + (-4 - (int)pvVar2))) goto LAB_0042ed75; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_40) + (-4 - GHIDRA_INT(pvVar2))))) goto LAB_0042ed75; } operator_delete(pvVar2,uVar1); } if (pvStack_4c != (void *)0x0) { - uVar1 = iStack_44 - (int)pvStack_4c & 0xfffffffe; + uVar1 = iStack_44 - GHIDRA_INT(pvStack_4c) & 0xfffffffe; pvVar2 = pvStack_4c; if (0xfff < uVar1) { pvVar2 = *(void **)((char *)pvStack_4c + -4); uVar1 = uVar1 + 0x23; - if (0x1f < (uint)((int)pvStack_4c + (-4 - (int)pvVar2))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvStack_4c) + (-4 - GHIDRA_INT(pvVar2))))) { LAB_0042ed75: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -529,5 +529,5 @@ LAB_0042ed75: operator_delete(pvVar2,uVar1); } ExceptionList = local_10; - return (void *)(*(int *)((int)*this + 4) + 8); + return (void *)(*(int *)(GHIDRA_INT(*this) + 4) + 8); } diff --git a/src/game/emote_wheel.cpp b/src/game/emote_wheel.cpp index 96e7d36..d2cc0cd 100644 --- a/src/game/emote_wheel.cpp +++ b/src/game/emote_wheel.cpp @@ -20,7 +20,7 @@ void EmoteWheel::Update() local_8 = 0xffffffff; puStack_c = &LAB_00b05cad; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (uint)(local_1c + 6); + uVar3 = __security_cookie ^ GHIDRA_UINT((local_1c + 6)); ExceptionList = &local_10; iVar4 = *(int *)((char *)this + 4); if (iVar4 == 1) { @@ -31,7 +31,7 @@ void EmoteWheel::Update() if (fVar5 <= openProgress) { *(undefined4 *)((char *)this + 4) = 2; *(float *)((char *)this + 0x840) = fVar5; - *(int *)((char *)this + 0x834) = (int)(270.0 / *(float *)((char *)this + 0x838)); + *(int *)((char *)this + 0x834) = GHIDRA_INT((270.0 / *(float *)((char *)this + 0x838))); iVar4 = 2; openProgress = fVar5; } @@ -83,14 +83,14 @@ void EmoteWheel::Update() if (cVar2 != '\0') { *(uint *)((char *)this + 0x834) = (*(int *)((char *)this + 0x834) + 1U) % - (uint)(*(int *)(*(int *)((char *)this + 0x7cc) + 4 + *(int *)((char *)this + 0x7d8) * 0xc + GHIDRA_UINT((*(int *)(*(int *)((char *)this + 0x7cc) + 4 + *(int *)((char *)this + 0x7d8) * 0xc ) - *(int *)(*(int *)((char *)this + 0x7cc) + *(int *)((char *)this + 0x7d8) * 0xc) >> - 2); + 2)); } } else { - piVar1 = (int *)((int)this + 0x834); + piVar1 = (int *)(GHIDRA_INT(this) + 0x834); *piVar1 = *piVar1 + -1; if (*piVar1 < 0) { *(int *)((char *)this + 0x834) = @@ -119,7 +119,7 @@ void EmoteWheel::Update() if (fVar5 < 0.0) { fVar5 = fVar5 + 360.0; } - *(int *)((char *)this + 0x834) = (int)(fVar5 / *(float *)((char *)this + 0x838)); + *(int *)((char *)this + 0x834) = GHIDRA_INT((fVar5 / *(float *)((char *)this + 0x838))); } local_8 = 0xffffffff; FUN_004242b0(); @@ -135,7 +135,7 @@ void EmoteWheel::Update() (0xffffffff,FUN_00a209e0,local_1c + 1,0,0); if (cVar2 != '\0') { FUN_008d26c0((*(int *)((char *)this + 0x7d8) + 1U) % - (uint)((*(int *)((char *)this + 2000) - *(int *)((char *)this + 0x7cc)) / 0xc),0) + GHIDRA_UINT(((*(int *)((char *)this + 2000) - *(int *)((char *)this + 0x7cc)) / 0xc)),0) ; ExceptionList = local_10; return; @@ -224,19 +224,19 @@ void EmoteWheel::Render() FUN_00430750(*(undefined4 *)(emotes + emoteIdx * 4),0); ItemUseAnim::update(); local_34 = *(float *)((char *)this + 0x804) - 20.0; - fVar1 = ((float)((double)(int)emoteIdx + __uint_to_double_fixup[-((int)emoteIdx >> 0x1f)]) + fVar1 = ((float)((double)GHIDRA_INT(emoteIdx) + __uint_to_double_fixup[-(GHIDRA_INT(emoteIdx) >> 0x1f)]) * *(float *)((char *)this + 0x838) + *(float *)((char *)this + 0x838) * 0.5) * 0.017453292; fVar2 = cos(fVar1); fVar1 = sin(fVar1); emotePos.x = (fVar2 * local_34 - fVar1 * 0.0) + centerX; emotePos.y = fVar1 * local_34 + fVar2 * 0.0 + centerY; - ((Game *)((Game *)((int)this + 8)))->Game::Update(&emotePos); + ((Game *)((Game *)(GHIDRA_INT(this) + 8)))->Game::Update(&emotePos); emoteIdx = emoteIdx + 1; emotes = *(int *)(*(int *)((char *)this + 0x7cc) + *(int *)((char *)this + 0x7d8) * 0xc); } while (emoteIdx < - (uint)(*(int *)(*(int *)((char *)this + 0x7cc) + 4 + *(int *)((char *)this + 0x7d8) * 0xc - ) - emotes >> 2)); + GHIDRA_UINT((*(int *)(*(int *)((char *)this + 0x7cc) + 4 + *(int *)((char *)this + 0x7d8) * 0xc + ) - emotes >> 2))); return; } } diff --git a/src/game/entity.cpp b/src/game/entity.cpp index 7f262a0..fa915e4 100644 --- a/src/game/entity.cpp +++ b/src/game/entity.cpp @@ -111,9 +111,9 @@ void Entity::AddEntityFlags(ulonglong flags) { uint *flagsHigh; - *(uint *)&this->_flags = (uint)this->_flags | (uint)flags; - flagsHigh = (uint *)((int)&this->_flags + 4); - *flagsHigh = *flagsHigh | flags._4_4_; + *(uint *)&this->_flags = GHIDRA_UINT(this->_flags) | GHIDRA_UINT(flags); + flagsHigh = (uint *)(GHIDRA_INT(&this->_flags) + 4); + *flagsHigh = *flagsHigh | (*(undefined4 *)((char *)&(flags) + 0x4)); return; } @@ -122,9 +122,9 @@ void Entity::ClearEntityFlags(ulonglong flags) { uint *flagsHigh; - *(uint *)&this->_flags = (uint)this->_flags & ~(uint)flags; - flagsHigh = (uint *)((int)&this->_flags + 4); - *flagsHigh = *flagsHigh & ~flags._4_4_; + *(uint *)&this->_flags = GHIDRA_UINT(this->_flags) & ~GHIDRA_UINT(flags); + flagsHigh = (uint *)(GHIDRA_INT(&this->_flags) + 4); + *flagsHigh = *flagsHigh & ~(*(undefined4 *)((char *)&(flags) + 0x4)); return; } @@ -137,8 +137,8 @@ qword Entity::GetEntityFlags() // 00417430 byte Entity::HasEntityFlags(ulonglong flags) { - if (((uint)flags & (uint)this->_flags) == 0 && - (*(uint *)((int)&this->_flags + 4) & flags._4_4_) == 0) { + if ((GHIDRA_UINT(flags) & GHIDRA_UINT(this->_flags)) == 0 && + (*(uint *)(GHIDRA_INT(&this->_flags) + 4) & (*(undefined4 *)((char *)&(flags) + 0x4))) == 0) { return 0; } return 1; @@ -328,7 +328,7 @@ bool Entity::is_slot() // 00435db0 int Entity::GetHitPointsLost() { - return (int)this->_updateTime - (int)this->_prevUpdateTime; + return GHIDRA_INT(this->_updateTime) - GHIDRA_INT(this->_prevUpdateTime); } // 00435dd0 @@ -491,7 +491,7 @@ void Entity::AddFlagsLow(uint param_2) float *flagsLow; flagsLow = (this->_sprite)._color._offset; - *flagsLow = (float)((uint)*flagsLow | param_2); + *flagsLow = (float)(GHIDRA_UINT(*flagsLow) | param_2); return; } @@ -520,7 +520,7 @@ Entity * Entity::AddFear(int param_2, int param_3, EntityPtr param_4) float parentX; float parentY; - local_c = __security_cookie ^ (uint)local_3c; + local_c = __security_cookie ^ GHIDRA_UINT(local_3c); seed = Random(); effect = ((Game *)(g_game))->Game::SpawnEx(1000,0x79,(Vector *)this,&g_vectorZero,(Entity *)0x0,0,seed,0); local_18 = 0; @@ -560,8 +560,8 @@ Entity * Entity::AddFear(int param_2, int param_3, EntityPtr param_4) parentX = *(float *)((char *)param_4 + 0x33c); parentY = *(float *)((char *)param_4 + 0x340); effect[1]._sprite._filename._buf[0xc] = '\x01'; - effect[1]._sprite._filename._size = (uint)(parentY - parentX); - effect[1]._sprite._filename._capacity = (uint)(parentX - parentY); + effect[1]._sprite._filename._size = GHIDRA_UINT((parentY - parentX)); + effect[1]._sprite._filename._capacity = GHIDRA_UINT((parentX - parentY)); } return effect; } @@ -586,7 +586,7 @@ void Entity::convert_shot_for_enemy_owner(Entity *shot) if ((((this->_flags & 0x100) != 0) && (spawner = *(EntityPtr *)(*(int *)(this + 1) + 0x3c8), spawner != (EntityPtr)0x0)) && - (((local_20.x = (float)((int)spawner + 0x28), 1 < *(int *)&g_game->_deathmatchManager && + (((local_20.x = (float)(GHIDRA_INT(spawner) + 0x28), 1 < *(int *)&g_game->_deathmatchManager && (*(int *)local_20.x == 1)) || (*(int *)local_20.x - 10U < 0x3de)))) { iVar2 = shot->_type; local_18.x = (float)this; @@ -614,16 +614,16 @@ void Entity::convert_shot_for_enemy_owner(Entity *shot) local_10.x = (shot->_pos).x; local_10.y = (shot->_pos).y; pEVar3 = ((Game *)(g_game))->Game::SpawnEx(0x12,0,&local_10,&local_20,(Entity *)spawner,0,seed,0); - flagsHigh = *(undefined4 *)((int)&pEVar3->_flags + 4); + flagsHigh = *(undefined4 *)(GHIDRA_INT(&pEVar3->_flags) + 4); fVar5 = pEVar3->_maxHitPoints + pEVar3->_maxHitPoints; - *(uint *)&pEVar3->_flags = (uint)pEVar3->_flags & 0xfffffffb; - *(undefined4 *)((int)&pEVar3->_flags + 4) = flagsHigh; + *(uint *)&pEVar3->_flags = GHIDRA_UINT(pEVar3->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&pEVar3->_flags) + 4) = flagsHigh; pEVar3->_maxHitPoints = fVar5; pEVar3->_health = fVar5; shot->Remove(); if (*(int *)((char *)local_18.x + 0x2c) == 0x36) { - pbVar1 = &((Entity *)((int)local_18.x + 0xc30))->_collidesWithGrid; - if (*(int *)&((Entity *)((int)local_18.x + 0xc30))->_collidesWithGrid != 0) { + pbVar1 = &((Entity *)(GHIDRA_INT(local_18.x) + 0xc30))->_collidesWithGrid; + if (*(int *)&((Entity *)(GHIDRA_INT(local_18.x) + 0xc30))->_collidesWithGrid != 0) { local_18.x = (float)pbVar1; std::multiset::erase(&local_18); } @@ -653,10 +653,10 @@ void Entity::convert_shot_for_enemy_owner(Entity *shot) pEVar4 = (Entity_NPC *) ((Game *)(g_game))->Game::SpawnEx(0x55,0,&local_18,&local_10,(Entity *)spawner,0,seed,0); } - flagsHigh = *(undefined4 *)((int)&pEVar4->_flags + 4); + flagsHigh = *(undefined4 *)(GHIDRA_INT(&pEVar4->_flags) + 4); fVar5 = pEVar4->_maxHitPoints + pEVar4->_maxHitPoints; - *(uint *)&pEVar4->_flags = (uint)pEVar4->_flags & 0xfffffffb; - *(undefined4 *)((int)&pEVar4->_flags + 4) = flagsHigh; + *(uint *)&pEVar4->_flags = GHIDRA_UINT(pEVar4->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&pEVar4->_flags) + 4) = flagsHigh; pEVar4->_maxHitPoints = fVar5; pEVar4->_health = fVar5; shot->Remove(); @@ -769,7 +769,7 @@ void Entity::constructor() (this->_colorParams)._begin = (void *)0x0; (this->_colorParams)._end = (void *)0x0; (this->_colorParams)._capacity = (void *)0x0; - local_8 = CONCAT31(local_8._1_3_,3); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); (this->_color)._tint[0] = 1.0; (this->_color)._tint[1] = 1.0; (this->_color)._tint[2] = 1.0; @@ -894,7 +894,7 @@ void Entity::destructor() local_8 = 0xffffffff; puStack_c = &LAB_00afa3c0; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; *(undefined ***)this = IsaacRepentancePlus::Entity::vftable; if (this->_exists != 0) { @@ -921,7 +921,7 @@ void Entity::destructor() referrers = &this->_entityPtrReferrers; FID_conflict__Erase_tree_>_> (referrers,(fuzzer_allocator_> *)referrers, - *(_Tree_node **)((int)(this->_entityPtrReferrers)._head + 4)); + *(_Tree_node **)(GHIDRA_INT((this->_entityPtrReferrers)._head) + 4)); operator_delete(referrers->_head,0x14); vector_0x3c_tidy(); std::vector::_Tidy(); @@ -1013,9 +1013,9 @@ void Entity::CopyStatusEffects() for (child = this->_child; child != (EntityPtr)0x0; child = *(EntityPtr *)((char *)child + 0x3c0)) { *(int *)((char *)child + 0x218) = this->_freezeCountdown; - flagsHigh = *(uint *)((int)&this->_flags + 4); + flagsHigh = *(uint *)(GHIDRA_INT(&this->_flags) + 4); *(uint *)((char *)child + 0x168) = - *(uint *)((char *)child + 0x168) & 0xdeffe01f | (uint)this->_flags & 0x21001fe0; + *(uint *)((char *)child + 0x168) & 0xdeffe01f | GHIDRA_UINT(this->_flags) & 0x21001fe0; *(uint *)((char *)child + 0x16c) = *(uint *)((char *)child + 0x16c) & 0xfea27fff | flagsHigh & 0x15d8000; *(int *)((char *)child + 0x21c) = this->_poisonCountdown; @@ -1275,7 +1275,7 @@ byte Entity::IsDescendantOf(Entity *ancestor) if (current == (EntityPtr)pEVar1) goto LAB_006a9133; _Find_lower_bound<>(findResult,&ancestor); if (((*(char *)((char *)foundNode + 0xd) == '\0') && - ((uint)*(EntityPtr *)((char *)foundNode + 0x10) <= (uint)current)) && (foundNode != visitedSet) + (GHIDRA_UINT(*(EntityPtr *)((char *)foundNode + 0x10)) <= GHIDRA_UINT(current))) && (foundNode != visitedSet) ) break; visitedFlag = (undefined1 *)_Entity::GetAncestorField(&ancestor); *visitedFlag = 1; @@ -1284,7 +1284,7 @@ byte Entity::IsDescendantOf(Entity *ancestor) pvVar2 = visitedSet; FID_conflict__Erase_tree_>_> (&visitedSet,(fuzzer_allocator_> *)&visitedSet, - *(_Tree_node **)((int)visitedSet + 4)); + *(_Tree_node **)(GHIDRA_INT(visitedSet) + 4)); *(void **)((char *)pvVar2 + 4) = pvVar2; *(void **)pvVar2 = pvVar2; *(void **)((char *)pvVar2 + 8) = pvVar2; @@ -1294,7 +1294,7 @@ byte Entity::IsDescendantOf(Entity *ancestor) if (current == (EntityPtr)pEVar1) goto LAB_006a9133; _Find_lower_bound<>(findResult,&ancestor); if (((*(char *)((char *)foundNode + 0xd) == '\0') && - ((uint)*(EntityPtr *)((char *)foundNode + 0x10) <= (uint)current)) && (foundNode != visitedSet) + (GHIDRA_UINT(*(EntityPtr *)((char *)foundNode + 0x10)) <= GHIDRA_UINT(current))) && (foundNode != visitedSet) ) break; visitedFlag = (undefined1 *)_Entity::GetAncestorField(&ancestor); *visitedFlag = 1; @@ -1304,7 +1304,7 @@ byte Entity::IsDescendantOf(Entity *ancestor) LAB_006a90ff: FID_conflict__Erase_tree_>_> (&visitedSet,(fuzzer_allocator_> *)&visitedSet, - *(_Tree_node **)((int)visitedSet + 4)); + *(_Tree_node **)(GHIDRA_INT(visitedSet) + 4)); operator_delete(visitedSet,0x18); ExceptionList = local_10; return isDescendant; @@ -1347,7 +1347,7 @@ Entity * Entity::GetPlayerAncestor() if (*(int *)((char *)current + 0x28) == 1) goto LAB_006a926c; _Find_lower_bound<>(findResult,¤t); if (((*(char *)((char *)foundNode + 0xd) == '\0') && - ((uint)*(EntityPtr *)((char *)foundNode + 0x10) <= (uint)ancestor)) && (foundNode != visited) + (GHIDRA_UINT(*(EntityPtr *)((char *)foundNode + 0x10)) <= GHIDRA_UINT(ancestor))) && (foundNode != visited) ) break; visitedFlag = (undefined1 *)_Entity::GetAncestorField(¤t); *visitedFlag = 1; @@ -1357,7 +1357,7 @@ Entity * Entity::GetPlayerAncestor() visitedHead = visited; FID_conflict__Erase_tree_>_> (&visited,(fuzzer_allocator_> *)&visited, - *(_Tree_node **)((int)visited + 4)); + *(_Tree_node **)(GHIDRA_INT(visited) + 4)); *(void **)((char *)visitedHead + 4) = visitedHead; *(void **)visitedHead = visitedHead; *(void **)((char *)visitedHead + 8) = visitedHead; @@ -1369,7 +1369,7 @@ Entity * Entity::GetPlayerAncestor() if (*(int *)((char *)current + 0x28) == 1) goto LAB_006a926c; _Find_lower_bound<>(findResult,¤t); if (((*(char *)((char *)foundNode + 0xd) == '\0') && - ((uint)*(EntityPtr *)((char *)foundNode + 0x10) <= (uint)ancestor)) && (foundNode != visited) + (GHIDRA_UINT(*(EntityPtr *)((char *)foundNode + 0x10)) <= GHIDRA_UINT(ancestor))) && (foundNode != visited) ) break; visitedFlag = (undefined1 *)_Entity::GetAncestorField(¤t); *visitedFlag = 1; @@ -1380,7 +1380,7 @@ Entity * Entity::GetPlayerAncestor() LAB_006a926c: FID_conflict__Erase_tree_>_> (&visited,(fuzzer_allocator_> *)&visited, - *(_Tree_node **)((int)visited + 4)); + *(_Tree_node **)(GHIDRA_INT(visited) + 4)); operator_delete(visited,0x18); ExceptionList = local_10; return (Entity *)ancestor; @@ -1578,11 +1578,11 @@ void Entity::Init(int type, int variant, int subType, uint initSeed) this->_iceFrozenEffect = (EntityPtr)0x0; this->_bossStatusEffectCooldown = 0; *(undefined4 *)&this->_flags = 0; - *(undefined4 *)((int)&this->_flags + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = 0; (this->_damageEvents)._end = damageEventsBegin; this->_pendingDamage = 0.0; *(undefined4 *)&this->_pendingDamageFlags = 0; - *(undefined4 *)((int)&this->_pendingDamageFlags + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&this->_pendingDamageFlags) + 4) = 0; this->_isInvicible = 0; this->_isInterpolating = 0; this->_holdCountdown = 0; @@ -1592,12 +1592,12 @@ void Entity::Init(int type, int variant, int subType, uint initSeed) this->_child = (EntityPtr)0x0; this->_target = (EntityPtr)0x0; if (*minecartRef != (EntityPtr)0x0) { - type = (int)minecartRef; + type = GHIDRA_INT(minecartRef); std::multiset::erase(&type); *minecartRef = (EntityPtr)0x0; } if (this->_hitEffect != (EntityPtr)0x0) { - type = (int)&this->_hitEffect; + type = GHIDRA_INT(&this->_hitEffect); std::multiset::erase(&type); this->_hitEffect = (EntityPtr)0x0; } @@ -1613,11 +1613,11 @@ void Entity::Init(int type, int variant, int subType, uint initSeed) (**(code **)(vtable + 0x60))(); this->_scoreMultiplier = 1.0; if (this->_type == 0x110) { - noScoreFlag = (uint)g_game->_gameStateFlags & 0x4000000; + noScoreFlag = GHIDRA_UINT(g_game->_gameStateFlags) & 0x4000000; } else { if (this->_type != 0x10f) goto LAB_006a986e; - noScoreFlag = (uint)g_game->_gameStateFlags & 0x2000000; + noScoreFlag = GHIDRA_UINT(g_game->_gameStateFlags) & 0x2000000; } if (noScoreFlag != 0) { this->_scoreMultiplier = 0.0; @@ -1701,12 +1701,12 @@ void Entity::LoadEntityConfig() this->_baseFriction = *(float *)((char *)pvVar1 + 0x4c); if (*(int *)((char *)pvVar1 + 0xc4) == 0) { this->_entityGridCollisionClass = - (-(uint)((int)(this->_collisionPoints)._end - (int)(this->_collisionPoints)._begin >> 3 != - 0) & 2) + 3; + (-GHIDRA_UINT((GHIDRA_INT((this->_collisionPoints)._end) - GHIDRA_INT((this->_collisionPoints)._begin) >> 3 != + 0)) & 2) + 3; return; } gridCollisionCapacity = *(uint *)((char *)pvVar1 + 200); - gridCollisionString = (byte *)((int)pvVar1 + 0xb4); + gridCollisionString = (byte *)(GHIDRA_INT(pvVar1) + 0xb4); gridCollisionLength = *(uint *)((char *)pvVar1 + 0xc4); gridCollisionText = gridCollisionString; if (0xf < gridCollisionCapacity) { @@ -1990,7 +1990,7 @@ LAB_006a9f87: if (pvVar1 == collisionPointsEnd) { return; } - uVar5 = (int)collisionPointsEnd - (int)pvVar1 >> 3; + uVar5 = GHIDRA_INT(collisionPointsEnd) - GHIDRA_INT(pvVar1) >> 3; local_6c = g_vectorZero.x; local_38.x = g_vectorZero.x; local_70 = g_vectorZero.y; @@ -2001,8 +2001,8 @@ LAB_006a9f87: do { fVar10 = *(float *)((char *)pvVar1 + uVar7 * 8); fVar11 = *(float *)((char *)pvVar1 + uVar7 * 8 + 4); - iVar3 = (int)((((this->_pos).y + fVar11) - 120.0) / 40.0 + 0.5); - iVar6 = (int)(((fVar10 + (this->_pos).x) - 40.0) / 40.0 + 0.5); + iVar3 = GHIDRA_INT(((((this->_pos).y + fVar11) - 120.0) / 40.0 + 0.5)); + iVar6 = GHIDRA_INT((((fVar10 + (this->_pos).x) - 40.0) / 40.0 + 0.5)); if ((((iVar6 < 0) || (room->_gridWidth <= iVar6)) || (iVar3 < 0)) || (room->_gridHeight <= iVar3)) { iVar6 = -1; @@ -2027,8 +2027,8 @@ LAB_006a9f87: do { fVar10 = *(float *)((char *)pvVar1 + uVar7 * 8); fVar11 = *(float *)((char *)pvVar1 + uVar7 * 8 + 4); - iVar3 = (int)((((this->_pos).y + fVar11) - 120.0) / 40.0 + 0.5); - iVar6 = (int)(((fVar10 + (this->_pos).x) - 40.0) / 40.0 + 0.5); + iVar3 = GHIDRA_INT(((((this->_pos).y + fVar11) - 120.0) / 40.0 + 0.5)); + iVar6 = GHIDRA_INT((((fVar10 + (this->_pos).x) - 40.0) / 40.0 + 0.5)); if (((iVar6 < 0) || (room->_gridWidth <= iVar6)) || ((iVar3 < 0 || (room->_gridHeight <= iVar3)))) { iVar6 = -1; @@ -2052,10 +2052,10 @@ LAB_006a9f87: if (uVar5 != 0) { do { pvVar1 = (this->_collisionPoints)._begin; - iVar6 = (int)((((this->_pos).x + *(float *)((char *)pvVar1 + pointIndex * 8)) - 40.0) / 40.0 + - 0.5); - iVar3 = (int)(((*(float *)((char *)pvVar1 + pointIndex * 8 + 4) + (this->_pos).y) - 120.0) / - 40.0 + 0.5); + iVar6 = GHIDRA_INT(((((this->_pos).x + *(float *)((char *)pvVar1 + pointIndex * 8)) - 40.0) / 40.0 + + 0.5)); + iVar3 = GHIDRA_INT((((*(float *)((char *)pvVar1 + pointIndex * 8 + 4) + (this->_pos).y) - 120.0) / + 40.0 + 0.5)); if (((iVar6 < 0) || (room->_gridWidth <= iVar6)) || ((iVar3 < 0 || (room->_gridHeight <= iVar3)))) { local_48 = ((Room *)(room))->Room::GetGridCollision(-1); @@ -2096,7 +2096,7 @@ LAB_006aa40c: hitVelY = (this->_velocity).y; hitSourceType = 3; hitSourceVariant = 0x4b; - local_48 = (uint)((this->_flags & 0x100) != 0); + local_48 = GHIDRA_UINT(((this->_flags & 0x100) != 0)); if ((this->_flags & 0x20000000) == 0) { uVar7 = 0; } @@ -2137,9 +2137,9 @@ LAB_006aa40c: sign = &DAT_bf800000; } } - iVar6 = (int)((((float)sign * 40.0 + fVar9) - 40.0) / 40.0 + 0.5); + iVar6 = GHIDRA_INT(((((float)sign * 40.0 + fVar9) - 40.0) / 40.0 + 0.5)); if ((((-1 < iVar6) && (iVar6 < iVar3)) && - (neighborRow = (int)((((float)signY * 40.0 + fVar12) - 120.0) / 40.0 + 0.5), + (neighborRow = GHIDRA_INT(((((float)signY * 40.0 + fVar12) - 120.0) / 40.0 + 0.5)), -1 < neighborRow)) && ((neighborRow < curRoom->_gridHeight && (iVar6 = neighborRow * iVar3 + iVar6, -1 < iVar6)))) { @@ -2169,8 +2169,8 @@ LAB_006aa782: do { fVar10 = *(float *)((char *)pvVar1 + uVar7 * 8); fVar11 = *(float *)((char *)pvVar1 + uVar7 * 8 + 4); - iVar6 = (int)((((this->_pos).x + fVar10) - 40.0) / 40.0 + 0.5); - iVar3 = (int)((((this->_pos).y + fVar11) - 120.0) / 40.0 + 0.5); + iVar6 = GHIDRA_INT(((((this->_pos).x + fVar10) - 40.0) / 40.0 + 0.5)); + iVar3 = GHIDRA_INT(((((this->_pos).y + fVar11) - 120.0) / 40.0 + 0.5)); if (((iVar6 < 0) || (room->_gridWidth <= iVar6)) || ((iVar3 < 0 || (room->_gridHeight <= iVar3)))) { iVar6 = -1; @@ -2283,7 +2283,7 @@ LAB_006aac90: uVar5 = Random(); fVar11 = (this->_velocity).y; fVar12 = (this->_velocity).x; - fVar13 = (float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) * + fVar13 = (float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 0.9; bVar2 = 0; iVar6 = 2; @@ -2322,8 +2322,8 @@ LAB_006aad6f: local_44 = 1.68156e-44; do { fVar13 = (local_6c - local_70) * 0.5 + local_70; - iVar6 = (int)(((fVar13 * local_38.x + fVar11) - 40.0) / 40.0 + 0.5); - iVar3 = (int)(((fVar13 * local_38.y + (this->_pos).y) - 120.0) / 40.0 + 0.5); + iVar6 = GHIDRA_INT((((fVar13 * local_38.x + fVar11) - 40.0) / 40.0 + 0.5)); + iVar3 = GHIDRA_INT((((fVar13 * local_38.y + (this->_pos).y) - 120.0) / 40.0 + 0.5)); if ((((iVar6 < 0) || (room->_gridWidth <= iVar6)) || (iVar3 < 0)) || (room->_gridHeight <= iVar3)) { iVar6 = -1; @@ -2338,15 +2338,15 @@ LAB_006aad6f: else { local_6c = fVar13; } - local_44 = (float)((int)local_44 + -1); + local_44 = (float)(GHIDRA_INT(local_44) + -1); } while (local_44 != 0.0); } else if (gridCollisionClass == 7) { local_44 = 8.40779e-45; do { fVar13 = (local_6c - local_70) * 0.5 + local_70; - iVar6 = (int)(((fVar13 * local_38.x + fVar11) - 40.0) / 40.0 + 0.5); - iVar3 = (int)(((fVar13 * local_38.y + (this->_pos).y) - 120.0) / 40.0 + 0.5); + iVar6 = GHIDRA_INT((((fVar13 * local_38.x + fVar11) - 40.0) / 40.0 + 0.5)); + iVar3 = GHIDRA_INT((((fVar13 * local_38.y + (this->_pos).y) - 120.0) / 40.0 + 0.5)); if (((iVar6 < 0) || (room->_gridWidth <= iVar6)) || ((iVar3 < 0 || (room->_gridHeight <= iVar3)))) { iVar6 = -1; @@ -2361,7 +2361,7 @@ LAB_006aad6f: else { local_6c = fVar13; } - local_44 = (float)((int)local_44 + -1); + local_44 = (float)(GHIDRA_INT(local_44) + -1); } while (local_44 != 0.0); } else { @@ -2370,8 +2370,8 @@ LAB_006aad6f: local_44 = (float)gridCollisionClass; do { fVar8 = (local_6c - local_70) * 0.5 + local_70; - iVar6 = (int)(((fVar8 * local_38.x + fVar11) - 40.0) / 40.0 + 0.5); - iVar3 = (int)(((fVar8 * local_38.y + fVar13) - 120.0) / 40.0 + 0.5); + iVar6 = GHIDRA_INT((((fVar8 * local_38.x + fVar11) - 40.0) / 40.0 + 0.5)); + iVar3 = GHIDRA_INT((((fVar8 * local_38.y + fVar13) - 120.0) / 40.0 + 0.5)); if (((iVar6 < 0) || (room->_gridWidth <= iVar6)) || ((iVar3 < 0 || (room->_gridHeight <= iVar3)))) { iVar6 = -1; @@ -2386,15 +2386,15 @@ LAB_006aad6f: else { local_6c = fVar8; } - local_44 = (float)((int)local_44 + -1); + local_44 = (float)(GHIDRA_INT(local_44) + -1); } while (local_44 != 0.0); } else { local_44 = 8.40779e-45; do { fVar8 = (local_6c - local_70) * 0.5 + local_70; - iVar6 = (int)(((fVar8 * local_38.x + fVar11) - 40.0) / 40.0 + 0.5); - iVar3 = (int)(((fVar8 * local_38.y + fVar13) - 120.0) / 40.0 + 0.5); + iVar6 = GHIDRA_INT((((fVar8 * local_38.x + fVar11) - 40.0) / 40.0 + 0.5)); + iVar3 = GHIDRA_INT((((fVar8 * local_38.y + fVar13) - 120.0) / 40.0 + 0.5)); if ((((iVar6 < 0) || (room->_gridWidth <= iVar6)) || (iVar3 < 0)) || (room->_gridHeight <= iVar3)) { iVar6 = -1; @@ -2409,7 +2409,7 @@ LAB_006aad6f: else { local_70 = fVar8; } - local_44 = (float)((int)local_44 + -1); + local_44 = (float)(GHIDRA_INT(local_44) + -1); } while (local_44 != 0.0); } } @@ -2452,7 +2452,7 @@ byte Entity::is_grid_collision_at(Vector *position) pvVar2 = (this->_collisionPoints)._end; if (pointsBegin != pvVar2) { i = 0; - pointCount = (int)pvVar2 - (int)pointsBegin >> 3; + pointCount = GHIDRA_INT(pvVar2) - GHIDRA_INT(pointsBegin) >> 3; room = g_game->_room; hitSumX = g_vectorZero.x; hitSumY = g_vectorZero.y; @@ -2465,9 +2465,9 @@ byte Entity::is_grid_collision_at(Vector *position) do { pointX = *(float *)((char *)pointsBegin + i * 8); pointY = *(float *)((char *)pointsBegin + i * 8 + 4); - iVar1 = (int)(((pointX + offsetX + posX) - 40.0) / 40.0 + 0.5); + iVar1 = GHIDRA_INT((((pointX + offsetX + posX) - 40.0) / 40.0 + 0.5)); if ((((-1 < iVar1) && (iVar1 < room->_gridWidth)) && - (gridY = (int)(((pointY + posY + offsetY) - 120.0) / 40.0 + 0.5), -1 < gridY)) && + (gridY = GHIDRA_INT((((pointY + posY + offsetY) - 120.0) / 40.0 + 0.5)), -1 < gridY)) && ((gridY < room->_gridHeight && (iVar1 = room->_gridWidth * gridY + iVar1, -1 < iVar1))) ) { if (iVar1 < 0x1c0) { @@ -2590,7 +2590,7 @@ void Entity::PlayerCollideWithGrid(byte isSimulated) player = (Entity_Player *) __RTDynamicCast(this,0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Player::RTTI_Type_Descriptor,0, - __security_cookie ^ (int)register0x00000010 - 0x10U); + __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U); if (player == (Entity_Player *)0x0) { KAGE_LogMessage(0x10,(byte *)"Called PlayerCollideWithGrid with Entity type != Entity_Player\n") ; @@ -2656,7 +2656,7 @@ void Entity::PlayerCollideWithGrid(byte isSimulated) (this->_pos).y = local_5c.y; } LAB_006ab679: - local_5c.y = (float)((int)(this->_collisionPoints)._end - (int)(this->_collisionPoints)._begin >> + local_5c.y = (float)(GHIDRA_INT((this->_collisionPoints)._end) - GHIDRA_INT((this->_collisionPoints)._begin) >> 3); normalX = g_vectorZero.x; normalY = g_vectorZero.y; @@ -2668,8 +2668,8 @@ LAB_006ab679: collisionPoints = (this->_collisionPoints)._begin; pointPos.x = (this->_pos).x + *(float *)((char *)collisionPoints + pointIndex * 8); pointPos.y = *(float *)((char *)collisionPoints + pointIndex * 8 + 4) + (this->_pos).y; - iVar6 = (int)((pointPos.x - 40.0) / 40.0 + 0.5); - iVar5 = (int)((pointPos.y - 120.0) / 40.0 + 0.5); + iVar6 = GHIDRA_INT(((pointPos.x - 40.0) / 40.0 + 0.5)); + iVar5 = GHIDRA_INT(((pointPos.y - 120.0) / 40.0 + 0.5)); if (-1 < iVar6) { iVar8 = *(int *)((char *)g_game->_room + 0xc); if (iVar6 < iVar8) { @@ -2747,7 +2747,7 @@ LAB_006ab679: local_7c = this->_spawnerVariant; local_70 = (this->_velocity).x; local_6c = (this->_velocity).y; - isCharmed = (uint)((this->_flags & 0x100) != 0); + isCharmed = GHIDRA_UINT(((this->_flags & 0x100) != 0)); if ((this->_flags & 0x20000000) == 0) { uVar2 = 0; } @@ -2788,7 +2788,7 @@ LAB_006ab679: else { uVar4 = 4; } - local_90 = uVar4 | uVar3 | (uint)((this->_flags & 0x100) != 0); + local_90 = uVar4 | uVar3 | GHIDRA_UINT(((this->_flags & 0x100) != 0)); local_8c = this; gridEntity->Destroy(0,&webCollideInfo); } @@ -2841,7 +2841,7 @@ LAB_006abbad: else { uVar3 = 4; } - local_e0 = uVar3 | uVar2 | (uint)((this->_flags & 0x100) != 0); + local_e0 = uVar3 | uVar2 | GHIDRA_UINT(((this->_flags & 0x100) != 0)); local_dc = this; if ((iVar6 < 0x1c0) && (piVar7 = *(int **)((char *)g_game->_room + iVar6 * 4 + 0x24), @@ -2861,7 +2861,7 @@ LAB_006abbad: local_cc = this->_spawnerVariant; local_c0 = (this->_velocity).x; local_bc = (this->_velocity).y; - isCharmed = (uint)((this->_flags & 0x100) != 0); + isCharmed = GHIDRA_UINT(((this->_flags & 0x100) != 0)); if ((this->_flags & 0x20000000) == 0) { uVar3 = 0; } @@ -2903,11 +2903,11 @@ LAB_006abbad: } } fVar9 = ((bridgeDirX * 40.0 + fVar10) - 40.0) / 40.0 + 0.5; - iVar8 = (int)fVar9; - iVar5 = (int)(((bridgeDirY * 40.0 + gridCenterY) - 120.0) / 40.0 + 0.5); + iVar8 = GHIDRA_INT(fVar9); + iVar5 = GHIDRA_INT((((bridgeDirY * 40.0 + gridCenterY) - 120.0) / 40.0 + 0.5)); if ((((-1 < iVar8) && (iVar8 < iVar6)) && (-1 < iVar5)) && ((iVar5 < temp_5fd03f2348->_gridHeight && - (iVar6 = iVar6 * iVar5 + (int)fVar9, -1 < iVar6)))) { + (iVar6 = iVar6 * iVar5 + GHIDRA_INT(fVar9), -1 < iVar6)))) { if (iVar6 < 0x1c0) { ((Room *)(temp_5fd03f2348))->Room::TryMakeBridge(gridEntity->_gridEntities[iVar6], (GridEntity *)gridEntity); @@ -2947,7 +2947,7 @@ LAB_006ab9e8: } LAB_006aba00: pointIndex = pointIndex + 1; - } while ((uint)pointIndex < (uint)local_5c.y); + } while (GHIDRA_UINT(pointIndex) < GHIDRA_UINT(local_5c.y)); } fVar9 = fVar9 * fVar9 + fVar11 * fVar11; if (0.001 <= fVar9) { @@ -3071,7 +3071,7 @@ void Entity::SetSize(float size, Vector sizeMulti, int numGridCollisionPoints) *pointSlot = pointX; pointSlot[1] = point.y; collisionPointsEnd = &(this->_collisionPoints)._end; - *collisionPointsEnd = (void *)((int)*collisionPointsEnd + 8); + *collisionPointsEnd = (void *)(GHIDRA_INT(*collisionPointsEnd) + 8); } evenPointIdx = evenPointIdx + 2; } while (evenPointIdx < numGridCollisionPoints); @@ -3095,7 +3095,7 @@ void Entity::SetSize(float size, Vector sizeMulti, int numGridCollisionPoints) *pointSlot = pointX; pointSlot[1] = point.y; collisionPointsEnd = &(this->_collisionPoints)._end; - *collisionPointsEnd = (void *)((int)*collisionPointsEnd + 8); + *collisionPointsEnd = (void *)(GHIDRA_INT(*collisionPointsEnd) + 8); } oddPointIdx = oddPointIdx + 2; } while (oddPointIdx < numGridCollisionPoints); @@ -3223,8 +3223,8 @@ int Entity::GetIntervalTicks(float interval, float offset) if ((this->_flags & 0x4000) == 0) { isPaused = ((Game *)(g_game))->Game::IsPaused(); if (isPaused == 0) { - return (int)((offset + this->_updateTime) / interval) - - (int)((offset + this->_prevUpdateTime) / interval); + return GHIDRA_INT(((offset + this->_updateTime) / interval)) - + GHIDRA_INT(((offset + this->_prevUpdateTime) / interval)); } } return 0; @@ -3253,7 +3253,7 @@ int Entity::CountRelatedEntities(int type, int variant, int unused, void *outEnt count = 0; self = this; EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&local_24,type,variant,-1,0,0); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&local_24,type,variant,-1,0,0); local_8 = 0; variant = local_24._size; if (local_24._size != 0) { @@ -3274,20 +3274,20 @@ int Entity::CountRelatedEntities(int type, int variant, int unused, void *outEnt variant = variant + -1; } while (variant != 0); } - if (local_24._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_24) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (local_24._data != (undefined4 *)0x0) { allocSize = *(uint *)((char *)local_24._data + -4); oldAllocated = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - allocSize; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - allocSize; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)oldAllocated < allocSize); - free((uint *)((int)local_24._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocated) < allocSize)); + free((uint *)(GHIDRA_INT(local_24._data) + -4)); } } ExceptionList = local_10; @@ -3310,7 +3310,7 @@ int Entity::get_velocity_direction() } return direction; } - return (uint)(0.0 <= vy) * 2 + 1; + return GHIDRA_UINT((0.0 <= vy)) * 2 + 1; } // 006ac920 @@ -3324,7 +3324,7 @@ void Entity::Kill(EntityRef *source) Color explosionColor; uint local_c; - local_c = __security_cookie ^ (uint)&explosionColor; + local_c = __security_cookie ^ GHIDRA_UINT(&explosionColor); if (this->_dead == 0) { this->_dead = 1; if (source->_entity != (Entity *)0x0) { @@ -3498,7 +3498,7 @@ byte Entity::IsDamageSourceFriendly(EntityRef *source) } if (((((source->_spawnerType == 1) || (iVar1 = source->_type, iVar1 == 1)) || (iVar1 == 8)) || ((source->_spawnerType == 3 || (iVar1 == 3)))) || - ((((uint)source->_flags >> 1 & 1) != 0 || + (((GHIDRA_UINT(source->_flags) >> 1 & 1) != 0 || ((iVar1 == 1000 && (isDescendant = Entity_Effect::IsPlayerCreep(source->_variant), isDescendant != 0)))))) { isPlayerSource = true; @@ -3551,7 +3551,7 @@ byte Entity::TakeDamage(float damage, ulonglong damageFlags, EntityRef *source, if (this->_type == 1) { KAGE_LogMessage(0x10,(byte *)"Entity TakeDamage should not be called for Entity Player!"); } - uVar7 = (uint)damageFlags & 0x2000; + uVar7 = GHIDRA_UINT(damageFlags) & 0x2000; if (((damageFlags & 0x2000) == 0) && (bVar2 = IsDamageSourceFriendly(this,source), bVar2 != 0)) { return 0; } @@ -3586,9 +3586,9 @@ joined_r0x006acf5a: } } } - local_44 = (EntityPtr *)CONCAT31(local_44._1_3_,1); + local_44 = (EntityPtr *)CONCAT31((*(undefined1 *)((char *)&(local_44) + 0x1)),1); if ((this->_flags & 0x20000000) == 0) { - local_44 = (EntityPtr *)((uint)local_44._1_3_ << 8); + local_44 = (EntityPtr *)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_44)) + 0x1)) << 8); } EVar4 = (EntityPtr)find_nearest_enemy(&this->_pos,(float *)&local_44,(byte)local_44); if (EVar4 == (EntityPtr)0x0) { @@ -3607,8 +3607,8 @@ LAB_006ad14f: } if ((((damageFlags & 0x2000) == 0) && (cVar3 = this->IsBoss(), cVar3 != '\0')) && - (1 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2))) { + (1 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2)))) { iVar6 = 0; do { EVar5 = (EntityPtr)((Game *)(g_game))->Game::GetPlayer(uVar7); @@ -3619,13 +3619,13 @@ LAB_006ad14f: iVar6 = iVar6 + 1; } uVar7 = uVar7 + 1; - } while (uVar7 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (uVar7 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); if (1 < iVar6) { damage = damage * 0.8; } } - this_00 = (LuaEngine *)(*(uint *)((int)&this->_flags + 4) & 0x400000); + this_00 = (LuaEngine *)(*(uint *)(GHIDRA_INT(&this->_flags) + 4) & 0x400000); if (this_00 != (LuaEngine *)0x0) { damage = damage + damage; } @@ -3634,14 +3634,14 @@ LAB_006ad14f: bVar2 != 0)) { ((DamageInfo *)(damageInfo))->DamageInfo::DamageInfo(); damageInfo[0] = damage; - damageFlagsHigh = damageFlags._4_4_; - damageFlagsLow = (uint)damageFlags; + damageFlagsHigh = (*(undefined4 *)((char *)&(damageFlags) + 0x4)); + damageFlagsLow = GHIDRA_UINT(damageFlags); ((EntityRef *)(&damageSource))->EntityRef::operator_(source); FUN_006b7db0(damageInfo); fVar1 = this->_pendingDamage; - *(uint *)&this->_pendingDamageFlags = (uint)this->_pendingDamageFlags | (uint)damageFlags; - pendingFlagsHigh = (uint *)((int)&this->_pendingDamageFlags + 4); - *pendingFlagsHigh = *pendingFlagsHigh | damageFlags._4_4_; + *(uint *)&this->_pendingDamageFlags = GHIDRA_UINT(this->_pendingDamageFlags) | GHIDRA_UINT(damageFlags); + pendingFlagsHigh = (uint *)(GHIDRA_INT(&this->_pendingDamageFlags) + 4); + *pendingFlagsHigh = *pendingFlagsHigh | (*(undefined4 *)((char *)&(damageFlags) + 0x4)); this->_pendingDamage = damage + fVar1; if (source->_entity == (Entity *)0x0) { player = (Entity_Player *)0x0; @@ -3664,7 +3664,7 @@ LAB_006acf96: manager = g_manager; local_44 = (EntityPtr *)0x1f5; seed_fart_sound_override((int *)&local_44); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_44,1.0,10,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_44),1.0,10,0,1.0,0.0); if (this->_hitEffect != (EntityPtr)0x0) { (**(code **)(*(int *)this->_hitEffect + 0x28))(); } @@ -3672,14 +3672,14 @@ LAB_006acf96: EVar5 = (EntityPtr) ((Game *)(g_game))->Game::SpawnEx(1000,0xa0,&this->_pos,&g_vectorZero,(Entity *)EVar4,0,uVar7,0); if (*(EntityPtr *)((char *)EVar5 + 0x3bc) != (EntityPtr)0x0) { - local_44 = (EntityPtr *)((int)EVar5 + 0x3bc); + local_44 = (EntityPtr *)(GHIDRA_INT(EVar5) + 0x3bc); std::multiset::erase(&local_44); } *(EntityPtr *)((char *)EVar5 + 0x3bc) = EVar4; if (EVar4 != (EntityPtr)0x0) { - std::multiset::insert((EntityPtr *)((int)EVar5 + 0x3bc)); + std::multiset::insert((EntityPtr *)(GHIDRA_INT(EVar5) + 0x3bc)); } - entityRefSlot = (EntityPtr *)((int)EVar5 + 0x3c4); + entityRefSlot = (EntityPtr *)(GHIDRA_INT(EVar5) + 0x3c4); if (*(EntityPtr *)((char *)EVar5 + 0x3c4) != (EntityPtr)0x0) { local_44 = entityRefSlot; std::multiset::erase(&local_44); @@ -3694,7 +3694,7 @@ LAB_006acf96: overlayNull != (float *)0x0)) { fVar1 = overlayNull[1]; posOffsetY = (this->_posOffset).y; - ((Vector *)((int)EVar5 + 0x34c))->x = ((*overlayNull - 0.0) * 0.5) / 0.65 + (this->_posOffset).x + ((Vector *)(GHIDRA_INT(EVar5) + 0x34c))->x = ((*overlayNull - 0.0) * 0.5) / 0.65 + (this->_posOffset).x ; *(float *)((char *)EVar5 + 0x350) = ((fVar1 - 4.0) * 0.5) / 0.65 + posOffsetY; } @@ -3767,7 +3767,7 @@ void Entity::AddFreeze(EntityRef *ref, int duration, byte ignoreBossStatusCooldo uint flagsLow; EntityPtr nextParent; - local_c = __security_cookie ^ (uint)auStack_3c; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_3c); bVar1 = IsDamageSourceFriendly(this,ref); if (bVar1 == 0) { apply_second_hand_duration(this,duration,ref); @@ -3779,7 +3779,7 @@ void Entity::AddFreeze(EntityRef *ref, int duration, byte ignoreBossStatusCooldo nextParent = *(EntityPtr *)((char *)ancestor + 0x3bc); } } - if (((extraout_EDX != 0) && (flagsLow = (uint)this->_flags, (flagsLow & 1) == 0)) && + if (((extraout_EDX != 0) && (flagsLow = GHIDRA_UINT(this->_flags), (flagsLow & 1) == 0)) && ((this->_bossStatusEffectCooldown < 1 || (ignoreBossStatusCooldown != 0)))) { currentCountdown = this->_freezeCountdown; if (extraout_EDX < 1) { @@ -3795,7 +3795,7 @@ void Entity::AddFreeze(EntityRef *ref, int duration, byte ignoreBossStatusCooldo } } this->_freezeCountdown = newCountdown; - *(undefined4 *)((int)&this->_flags + 4) = *(undefined4 *)((int)&this->_flags + 4); + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); local_28 = 0; uStack_24 = 0; uStack_20 = 0; @@ -3872,7 +3872,7 @@ LAB_006ad5b4: nextParent = *(EntityPtr *)((char *)parent + 0x3bc); } } - if (((extraout_EDX != 0) && (flags = (uint)this->_flags, (flags & 1) == 0)) && + if (((extraout_EDX != 0) && (flags = GHIDRA_UINT(this->_flags), (flags & 1) == 0)) && ((this->_bossStatusEffectCooldown < 1 || (ignoreBossStatusCooldown != 0)))) { oldCountdown = this->_poisonCountdown; if (extraout_EDX < 1) { @@ -3898,7 +3898,7 @@ LAB_006ad5b4: poisonColor._tint[1] = 1.0; poisonColor._tint[3] = 1.0; this->_poisonTickDamage = tickDamage; - *(undefined4 *)((int)&this->_flags + 4) = *(undefined4 *)((int)&this->_flags + 4); + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); *(uint *)&this->_flags = flags | 0x40; poisonColor._offset[0] = 0.0; poisonColor._offset[2] = 0.0; @@ -3910,7 +3910,7 @@ LAB_006ad5b4: if (poisonColor._tint[0] <= 0.6) { poisonColor._tint[0] = 0.6; } - poisonColor._offset[1] = (float)(int)((1.0 - poisonColor._tint[0]) * 90.0) * 0.003921569; + poisonColor._offset[1] = (float)GHIDRA_INT(((1.0 - poisonColor._tint[0]) * 90.0)) * 0.003921569; poisonColor._tint[2] = poisonColor._tint[0]; this->SetColor(&poisonColor,newCountdown,0xff,0,1); if ((ignoreBossStatusCooldown == 0) && (cVar2 = FUN_006ae7a0(), cVar2 != '\0')) { @@ -3946,24 +3946,24 @@ void Entity::AddSlowing(EntityRef *ref, int duration, float amount, ColorMod col } if (extraout_EDX < 1) { if (extraout_EDX < 0) { - flagsLow = (uint)this->_flags; - flagsHigh = *(undefined4 *)((int)&this->_flags + 4); + flagsLow = GHIDRA_UINT(this->_flags); + flagsHigh = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); if ((flagsLow & 1) == 0) { this->_slowingCountdown = 2; *(uint *)&this->_flags = flagsLow | 0x80; - *(undefined4 *)((int)&this->_flags + 4) = flagsHigh; + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = flagsHigh; } } } else { - flagsLow = (uint)this->_flags; - flagsHigh = *(undefined4 *)((int)&this->_flags + 4); + flagsLow = GHIDRA_UINT(this->_flags); + flagsHigh = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); if (((flagsLow & 1) == 0) && ((this->_bossStatusEffectCooldown < 1 || (ignoreBossStatusCooldown != 0)))) { vtable = *(int *)this; this->_slowingCountdown = this->_slowingCountdown + extraout_EDX; *(uint *)&this->_flags = flagsLow | 0x80; - *(undefined4 *)((int)&this->_flags + 4) = flagsHigh; + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = flagsHigh; (**(code **)(vtable + 0x3c))(&color,extraout_EDX,0xff,0,1); if ((ignoreBossStatusCooldown == 0) && (isBoss = FUN_006ae7a0(), isBoss != '\0')) { this->_bossStatusEffectCooldown = 0xf0; @@ -4023,7 +4023,7 @@ void Entity::AddCharmed(EntityRef *ref, int duration, byte ignoreBossStatusCoold Entity *roomEntity; int *typePtr; - local_c = __security_cookie ^ (uint)auStack_54; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_54); local_44 = ref; if ((this->_flags & 0x20000000) != 0) { return; @@ -4040,7 +4040,7 @@ void Entity::AddCharmed(EntityRef *ref, int duration, byte ignoreBossStatusCoold nextParent = *(EntityPtr *)((char *)parentIt + 0x3bc); } } - uVar6 = (uint)statusOwner->_flags; + uVar6 = GHIDRA_UINT(statusOwner->_flags); isAlreadyCharmed = (uVar6 & 0x20000100) != 0; if (extraout_EDX < 1) { if (extraout_EDX < 0) { @@ -4049,15 +4049,15 @@ void Entity::AddCharmed(EntityRef *ref, int duration, byte ignoreBossStatusCoold (*typePtr - 10U < 0x3de)) && ((!(bool)isAlreadyCharmed && (addEnemyKillScore != 0)))) { award_fly_kill_points(&g_game->_scoreSheet,this); } - flagsHigh = *(undefined4 *)((int)&statusOwner->_flags + 4); - *(uint *)&statusOwner->_flags = (uint)statusOwner->_flags | 0x20000100; - *(undefined4 *)((int)&statusOwner->_flags + 4) = flagsHigh; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&statusOwner->_flags) + 4); + *(uint *)&statusOwner->_flags = GHIDRA_UINT(statusOwner->_flags) | 0x20000100; + *(undefined4 *)(GHIDRA_INT(&statusOwner->_flags) + 4) = flagsHigh; statusOwner->_charmedCountdown = 0; cVar3 = this->IsBoss(); if ((((cVar3 == '\0') && (bVar2 = IsActiveEnemy(this,0), bVar2 != 0)) && ((*typePtr != 0x17 || ((this->_variant != 0 || (this->_subtype != 1)))))) && (bVar2 = HasEntityFlags(this,0x1000000000000000), bVar2 == 0)) { - ((EntityList *)((EntityList *)((int)g_game->_room + 0x1218)))->EntityList::AddPersistentEntity(this); + ((EntityList *)((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218)))->EntityList::AddPersistentEntity(this); } game = g_game; if ((g_game->_seedEffects)._isCustomRun == 0) { @@ -4111,7 +4111,7 @@ void Entity::AddCharmed(EntityRef *ref, int duration, byte ignoreBossStatusCoold } local_14 = 0x3e20a0a1; statusOwner->_charmedCountdown = iVar5; - *(undefined4 *)((int)&statusOwner->_flags + 4) = *(undefined4 *)((int)&statusOwner->_flags + 4); + *(undefined4 *)(GHIDRA_INT(&statusOwner->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&statusOwner->_flags) + 4); local_28 = 0; uStack_24 = 0; uStack_20 = 0; @@ -4173,8 +4173,8 @@ LAB_006adc7e: uVar4 = 0; LAB_006adc99: (this->_charmSource)._type = uStack_4c; - (this->_charmSource)._variant = (int)local_44; - (this->_charmSource)._spawnerType = (int)local_40; + (this->_charmSource)._variant = GHIDRA_INT(local_44); + (this->_charmSource)._spawnerType = GHIDRA_INT(local_40); (this->_charmSource)._spawnerVariant = sourceSpawnerVariant; (this->_charmSource)._position.x = sourcePosX; (this->_charmSource)._position.y = sourcePosY; @@ -4227,7 +4227,7 @@ void Entity::AddConfusion(EntityRef *ref, int duration, byte ignoreBossStatusCoo nextParent = *(EntityPtr *)((char *)ancestor + 0x3bc); } } - flagsLow = (uint)this->_flags; + flagsLow = GHIDRA_UINT(this->_flags); confusedFlagBefore = flagsLow & 0x200; if (((adjustedDuration != 0) && ((flagsLow & 1) == 0)) && ((this->_bossStatusEffectCooldown < 1 || (ignoreBossStatusCooldown != 0)))) { @@ -4245,12 +4245,12 @@ void Entity::AddConfusion(EntityRef *ref, int duration, byte ignoreBossStatusCoo if (newCountdown < cappedCountdown) { newCountdown = cappedCountdown; } - flagsLow = (uint)this->_flags; + flagsLow = GHIDRA_UINT(this->_flags); } this->_confusionCountdown = newCountdown; - flagsHigh = *(undefined4 *)((int)&this->_flags + 4); + flagsHigh = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); *(uint *)&this->_flags = flagsLow | 0x200; - *(undefined4 *)((int)&this->_flags + 4) = flagsHigh; + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = flagsHigh; confusionColor._colorize[0] = 0.0; confusionColor._colorize[1] = 0.0; confusionColor._colorize[2] = 0.0; @@ -4310,9 +4310,9 @@ void Entity::AddMidasFreeze(EntityRef *ref, int duration, byte ignoreBossStatusC } bVar1 = HasEntityFlags(this,1); if (bVar1 == 0) { - flagsHigh = *(undefined4 *)((int)&this->_flags + 4); - *(uint *)&this->_flags = (uint)this->_flags | 0x420; - *(undefined4 *)((int)&this->_flags + 4) = flagsHigh; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); + *(uint *)&this->_flags = GHIDRA_UINT(this->_flags) | 0x420; + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = flagsHigh; midasColor._colorize[0] = 0.0; midasColor._colorize[1] = 0.0; midasColor._colorize[2] = 0.0; @@ -4356,7 +4356,7 @@ void Entity::AddFear(EntityRef *ref, int duration, byte ignoreBossStatusCooldown int oldFearCountdown; EntityPtr parent; - local_c = __security_cookie ^ (uint)auStack_44; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_44); sourceRef = ref; bVar1 = IsDamageSourceFriendly(this,ref); if ((bVar1 == 0) && @@ -4393,8 +4393,8 @@ void Entity::AddFear(EntityRef *ref, int duration, byte ignoreBossStatusCooldown this->_fearCountdown = newFearCountdown; ::((Color *)(&fearColor))->Color::Color(); this->SetColor(extraout_EAX,newFearCountdown,0xff,0,1); - *(uint *)&this->_flags = (uint)this->_flags | 0x800; - *(undefined4 *)((int)&this->_flags + 4) = *(undefined4 *)((int)&this->_flags + 4); + *(uint *)&this->_flags = GHIDRA_UINT(this->_flags) | 0x800; + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); if ((((ignoreBossStatusCooldown == 0) && (isBoss = FUN_006ae7a0(), game = g_game, isBoss != '\0')) && (this->_bossStatusEffectCooldown = 0xf0, game->_challenge == 0x1e)) && @@ -4560,9 +4560,9 @@ void Entity::AddBleeding(EntityRef *ref, int duration, byte unused) } } statusOwner->_bleedingCountdown = newCountdown; - flagsHigh = (uint *)((int)&statusOwner->_flags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&statusOwner->_flags) + 4); *flagsHigh = *flagsHigh | 4; - *(int *)&statusOwner->_flags = (int)statusOwner->_flags; + *(int *)&statusOwner->_flags = GHIDRA_INT(statusOwner->_flags); sourceRef._entity = ref->_entity; if (sourceRef._entity == (void *)0x0) { sourceRef._type = 0; @@ -4625,8 +4625,8 @@ void Entity::RemoveStatusEffects() qword oldFlags; (this->_colorParams)._end = (this->_colorParams)._begin; - *(uint *)&this->_flags = (uint)this->_flags & 0xdeffe01f; - *(undefined4 *)((int)&this->_flags + 4) = *(undefined4 *)((int)&this->_flags + 4); + *(uint *)&this->_flags = GHIDRA_UINT(this->_flags) & 0xdeffe01f; + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); this->_freezeCountdown = 0; this->_poisonCountdown = 0; this->_slowingCountdown = 0; @@ -4639,9 +4639,9 @@ void Entity::RemoveStatusEffects() SetSize(this,*(float *)((char *)this->_config + 0x38), (Vector)(CONCAT44(g_vectorOne.y,g_vectorOne.x) ^ 0x8000000080000000),-1); oldFlags = this->_flags; - flagsHigh = (uint *)((int)&this->_flags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&this->_flags) + 4); *flagsHigh = *flagsHigh & 0xfea27ffb; - *(int *)&this->_flags = (int)oldFlags; + *(int *)&this->_flags = GHIDRA_INT(oldFlags); this->_shrinkStatus2 = 1.0; this->_bleedingCountdown = 0; this->_bleedDamageAccumulator = 0.0; @@ -4816,14 +4816,14 @@ void Entity::Update() qword oldFlags; std_set *spawnTriggerTargets; - local_14 = __security_cookie ^ (uint)auStack_328; + local_14 = __security_cookie ^ GHIDRA_UINT(auStack_328); local_320 = *(ItemPool **)&this->_flags; - uVar14 = *(uint *)((int)&this->_flags + 4); + uVar14 = *(uint *)(GHIDRA_INT(&this->_flags) + 4); self = this; - if (((uint)local_320 & 0x4000) == 0) { + if ((GHIDRA_UINT(local_320) & 0x4000) == 0) { this->_prevUpdateTime = this->_updateTime; this->_updateTime = this->_speedMultiplier + this->_updateTime; - if ((((((uint)local_320 & 0x20) == 0) && (this->_holdCountdown < 1)) || (this->_dead != 0)) && + if (((((GHIDRA_UINT(local_320) & 0x20) == 0) && (this->_holdCountdown < 1)) || (this->_dead != 0)) && ((uVar14 & 1) == 0)) { local_310 = (float *)(this->_sprite)._playbackSpeed; (this->_sprite)._playbackSpeed = (float)local_310 * this->_speedMultiplier; @@ -4831,7 +4831,7 @@ void Entity::Update() ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::Update(); ((AnimationState *)(&(this->_sprite)._overlayAnimState))->AnimationState::Update(); local_320 = *(ItemPool **)&this->_flags; - uVar14 = *(uint *)((int)&this->_flags + 4); + uVar14 = *(uint *)(GHIDRA_INT(&this->_flags) + 4); } (this->_sprite)._playbackSpeed = (float)local_310; } @@ -4863,7 +4863,7 @@ LAB_006ae9c3: (this->_knockbackDirection).y = (float)local_308; bVar6 = this->_collidesWithGrid; local_2c8.x = *(float *)&this->_flags; - uVar14 = *(uint *)((int)&this->_flags + 4); + uVar14 = *(uint *)(GHIDRA_INT(&this->_flags) + 4); } else { local_308 = (EntityPtr)(this->_knockbackDirection).y; @@ -4883,9 +4883,9 @@ LAB_006ae9c3: sourceRef = ((EntityRef *)((EntityRef *)local_1f8))->EntityRef::EntityRef(); (*extraout_EDX)(fVar19,0,0,sourceRef,0x1e); oldFlags = this->_flags; - flagsHiPtr = (uint *)((int)&this->_flags + 4); + flagsHiPtr = (uint *)(GHIDRA_INT(&this->_flags) + 4); *flagsHiPtr = *flagsHiPtr & 0xfffeffff; - *(int *)&this->_flags = (int)oldFlags; + *(int *)&this->_flags = GHIDRA_INT(oldFlags); } this->_knockbackCountdown = this->_knockbackCountdown / 2; } @@ -4895,7 +4895,7 @@ LAB_006ae9c3: } } *(ItemPool **)&this->_flags = local_320; - *(uint *)((int)&this->_flags + 4) = uVar14 & 0xfffe7fff; + *(uint *)(GHIDRA_INT(&this->_flags) + 4) = uVar14 & 0xfffe7fff; this->_knockbackCountdown = 0; } LAB_006aeb95: @@ -4914,9 +4914,9 @@ LAB_006aeb95: (this->_pos).y = fVar19 * fVar21 + (this->_pos).y; local_2e4->x = fVar19 * newVelocityX + local_2e4->x; local_318 = *(float **)&this->_flags; - pfVar17 = *(float **)((int)&this->_flags + 4); + pfVar17 = *(float **)(GHIDRA_INT(&this->_flags) + 4); this->_friction = this->_baseFriction; - if (((uint)local_318 & 0x4000) == 0) { + if ((GHIDRA_UINT(local_318) & 0x4000) == 0) { pvVar16 = (this->_colorParams)._begin; bVar18 = false; if (pvVar16 != (this->_colorParams)._end) { @@ -4926,12 +4926,12 @@ LAB_006aeb95: if (*(char *)((char *)pvVar16 + 0x38) != '\0') { bVar18 = true; } - nextColorParam = (void *)((int)pvVar16 + 0x3c); + nextColorParam = (void *)(GHIDRA_INT(pvVar16) + 0x3c); if (iVar8 == 0) { FUN_004b6ec0(pvVar16); bVar18 = true; ppvVar1 = &(this->_colorParams)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + -0x3c); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + -0x3c); nextColorParam = pvVar16; } colorParamsEnd = (this->_colorParams)._end; @@ -4939,18 +4939,18 @@ LAB_006aeb95: } while (nextColorParam != colorParamsEnd); if (bVar18) { pvVar16 = (this->_colorParams)._begin; - iVar15 = (int)colorParamsEnd - (int)pvVar16; + iVar15 = GHIDRA_INT(colorParamsEnd) - GHIDRA_INT(pvVar16); iVar8 = iVar15 >> 0x1f; iVar15 = iVar15 / 0x3c + iVar8; if (iVar15 == iVar8) { this->ResetColor(); } else { - color = (ColorMod *)((int)pvVar16 + 0x40); - if ((uint)(iVar15 - iVar8) < 2) { + color = (ColorMod *)(GHIDRA_INT(pvVar16) + 0x40); + if (GHIDRA_UINT((iVar15 - iVar8)) < 2) { color = &this->_color; } - blendedColor._tint[0] = ((ColorMod *)((int)pvVar16 + 4))->_tint[0]; + blendedColor._tint[0] = ((ColorMod *)(GHIDRA_INT(pvVar16) + 4))->_tint[0]; blendedColor._tint[1] = *(float *)((char *)pvVar16 + 8); blendedColor._tint[2] = *(float *)((char *)pvVar16 + 0xc); blendedColor._tint[3] = *(float *)((char *)pvVar16 + 0x10); @@ -4959,9 +4959,9 @@ LAB_006aeb95: blendedColor._colorize[1] = *(float *)((char *)pvVar16 + 0x18); blendedColor._colorize[2] = *(float *)((char *)pvVar16 + 0x1c); blendedColor._colorize[3] = *(float *)((char *)pvVar16 + 0x20); - blendedColor._offset._0_8_ = *(undefined8 *)((char *)pvVar16 + 0x24); + (*(undefined8 *)((char *)&(blendedColor._offset) + 0x0)) = *(undefined8 *)((char *)pvVar16 + 0x24); if (*(char *)((char *)pvVar16 + 0x38) != '\0') { - color = ::Color::Lerp(&lerpedColor,(ColorMod *)((int)pvVar16 + 4),color, + color = ::Color::Lerp(&lerpedColor,(ColorMod *)(GHIDRA_INT(pvVar16) + 4),color, fVar22 - (float)*(int *)((char *)pvVar16 + 0x34) / (float)*(int *)((char *)pvVar16 + 0x30)); ::((Color *)(&blendedColor))->Color::operator_assign(color); @@ -4971,7 +4971,7 @@ LAB_006aeb95: } } flagsLo = *(uint *)&this->_flags; - local_318 = *(float **)((int)&this->_flags + 4); + local_318 = *(float **)(GHIDRA_INT(&this->_flags) + 4); pfVar17 = local_318; if (((flagsLo & 1) == 0) && (((1 < *(int *)&g_game->_deathmatchManager && (this->_type == 1)) || @@ -4981,7 +4981,7 @@ LAB_006aeb95: flagsLo = flagsLo | 0x100; this->_charmedCountdown = 2; *(uint *)&this->_flags = flagsLo; - *(float **)((int)&this->_flags + 4) = local_318; + *(float **)(GHIDRA_INT(&this->_flags) + 4) = local_318; } local_310 = (float *)flagsLo; local_304 = local_318; @@ -4991,7 +4991,7 @@ LAB_006aeb95: this->_confusionCountdown = 2; local_318 = local_304; *(uint *)&this->_flags = flagsLo; - *(float **)((int)&this->_flags + 4) = local_304; + *(float **)(GHIDRA_INT(&this->_flags) + 4) = local_304; } local_310 = (float *)flagsLo; local_304 = local_318; @@ -5002,10 +5002,10 @@ LAB_006aeb95: if ((bVar6 == 0) || (((g_game->_frameCount - this->_spawnFrame) / 0x3c & 1U) != 0)) goto LAB_006aeed2; } - flagsLo = (uint)local_310 | 0x800; + flagsLo = GHIDRA_UINT(local_310) | 0x800; this->_fearCountdown = 2; *(uint *)&this->_flags = flagsLo; - *(float **)((int)&this->_flags + 4) = local_304; + *(float **)(GHIDRA_INT(&this->_flags) + 4) = local_304; pfVar17 = local_304; } LAB_006aeed2: @@ -5019,12 +5019,12 @@ LAB_006aeed2: (iVar8 = this->_freezeCountdown + -1, this->_freezeCountdown = iVar8, iVar8 < 1)) { flagsLo = flagsLo & 0xffffffdf; *(uint *)&this->_flags = flagsLo; - *(float **)((int)&this->_flags + 4) = pfVar17; + *(float **)(GHIDRA_INT(&this->_flags) + 4) = pfVar17; } if ((0 < this->_poisonCountdown) && (iVar8 = this->_poisonCountdown + -1, this->_poisonCountdown = iVar8, iVar8 < 1)) { flagsLo = flagsLo & 0xffffffbf; - *(float **)((int)&this->_flags + 4) = pfVar17; + *(float **)(GHIDRA_INT(&this->_flags) + 4) = pfVar17; *(uint *)&this->_flags = flagsLo; this->_poisonTickDamage = 2.0; } @@ -5032,13 +5032,13 @@ LAB_006aeed2: (iVar8 = this->_slowingCountdown + -1, this->_slowingCountdown = iVar8, iVar8 < 1)) { flagsLo = flagsLo & 0xffffff7f; *(uint *)&this->_flags = flagsLo; - *(float **)((int)&this->_flags + 4) = pfVar17; + *(float **)(GHIDRA_INT(&this->_flags) + 4) = pfVar17; } local_314 = pfVar17; if ((0 < this->_charmedCountdown) && (iVar8 = this->_charmedCountdown + -1, this->_charmedCountdown = iVar8, iVar8 < 1)) { EVar20 = this->_target; - *(float **)((int)&this->_flags + 4) = pfVar17; + *(float **)(GHIDRA_INT(&this->_flags) + 4) = pfVar17; flagsLo = flagsLo & 0xfffffeff; *(uint *)&this->_flags = flagsLo; if (EVar20 != (EntityPtr)0x0) { @@ -5046,7 +5046,7 @@ LAB_006aeed2: targetSlot = &this->_target; std::multiset::erase(&targetSlot); flagsLo = *(uint *)&this->_flags; - pfVar17 = *(float **)((int)&this->_flags + 4); + pfVar17 = *(float **)(GHIDRA_INT(&this->_flags) + 4); this->_target = (EntityPtr)0x0; } } @@ -5054,12 +5054,12 @@ LAB_006aeed2: (iVar8 = this->_confusionCountdown + -1, this->_confusionCountdown = iVar8, iVar8 < 1)) { flagsLo = flagsLo & 0xfffffdff; *(uint *)&this->_flags = flagsLo; - *(float **)((int)&this->_flags + 4) = pfVar17; + *(float **)(GHIDRA_INT(&this->_flags) + 4) = pfVar17; } if ((0 < this->_fearCountdown) && (iVar8 = this->_fearCountdown + -1, this->_fearCountdown = iVar8, iVar8 < 1)) { flagsLo = flagsLo & 0xfffff7ff; - *(float **)((int)&this->_flags + 4) = pfVar17; + *(float **)(GHIDRA_INT(&this->_flags) + 4) = pfVar17; *(uint *)&this->_flags = flagsLo; } fVar19 = this->_shrinkStatus1; @@ -5071,13 +5071,13 @@ LAB_006aeed2: (iVar8 = this->_shrinkCountdown + -1, this->_shrinkCountdown = iVar8, iVar8 < 1)) { FUN_006b5f40(); flagsLo = *(uint *)&this->_flags; - pfVar17 = *(float **)((int)&this->_flags + 4); + pfVar17 = *(float **)(GHIDRA_INT(&this->_flags) + 4); } if (0 < this->_burnCountdown) { iVar8 = this->_burnCountdown + -1; this->_burnCountdown = iVar8; if (iVar8 < 1) { - *(float **)((int)&this->_flags + 4) = pfVar17; + *(float **)(GHIDRA_INT(&this->_flags) + 4) = pfVar17; *(uint *)&this->_flags = flagsLo & 0xffffefff; this->_burnTickDamage = 2.0; } @@ -5154,14 +5154,14 @@ LAB_006aeed2: (**(code **)(*(int *)this + 0x3c)) (&DAT_00c80aa0 + ((g_game->_frameCount - this->_spawnFrame) % 6) * 0x2c,1,0xff,0,1); flagsLo = *(uint *)&this->_flags; - pfVar17 = *(float **)((int)&this->_flags + 4); + pfVar17 = *(float **)(GHIDRA_INT(&this->_flags) + 4); } if ((this->_midasFreezeCountdown < 1) || (iVar8 = this->_midasFreezeCountdown + -1, this->_midasFreezeCountdown = iVar8, 0 < iVar8)) { pfStack_30c = (float *)flagsLo; } else { - *(float **)((int)&this->_flags + 4) = pfVar17; + *(float **)(GHIDRA_INT(&this->_flags) + 4) = pfVar17; *(float **)&this->_flags = (float *)(flagsLo & 0xfffffbff); pfStack_30c = (float *)(flagsLo & 0xfffffbff); } @@ -5171,7 +5171,7 @@ LAB_006aeed2: this->_bleedingCountdown = iVar8; if (iVar8 < 1) { *(float **)&this->_flags = pfStack_30c; - *(uint *)((int)&this->_flags + 4) = (uint)pfVar17 & 0xfffffffb; + *(uint *)(GHIDRA_INT(&this->_flags) + 4) = GHIDRA_UINT(pfVar17) & 0xfffffffb; this->_bleedDamageAccumulator = 0.0; } if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < DAT_00c80ba8) && @@ -5255,31 +5255,31 @@ LAB_006aeed2: fVar19 = 1.0; } color = (ColorMod *) - (&DAT_00c80bb0 + ((uint)(g_game->_frameCount - this->_spawnFrame) % 6) * 0x2c); + (&DAT_00c80bb0 + (GHIDRA_UINT((g_game->_frameCount - this->_spawnFrame)) % 6) * 0x2c); ::((Color *)(&defaultColor))->Color::Color(); color = ::Color::Lerp(&bleedFlashColor,from,color,fVar19); this->SetColor(color,1,0xff,0,1); pfStack_30c = *(float **)&this->_flags; - pfVar17 = *(float **)((int)&this->_flags + 4); + pfVar17 = *(float **)(GHIDRA_INT(&this->_flags) + 4); } if ((0 < this->_magnetizedCountdown) && (iVar8 = this->_magnetizedCountdown + -1, this->_magnetizedCountdown = iVar8, iVar8 < 1)) { - pfVar17 = (float *)((uint)pfVar17 & 0xfff7ffff); + pfVar17 = (float *)(GHIDRA_UINT(pfVar17) & 0xfff7ffff); *(float **)&this->_flags = pfStack_30c; - *(float **)((int)&this->_flags + 4) = pfVar17; + *(float **)(GHIDRA_INT(&this->_flags) + 4) = pfVar17; } local_320 = (ItemPool *)pfStack_30c; if ((0 < this->_baitedCountdown) && (iVar8 = this->_baitedCountdown + -1, this->_baitedCountdown = iVar8, iVar8 < 1)) { - pfVar17 = (float *)((uint)pfVar17 & 0xffefffff); + pfVar17 = (float *)(GHIDRA_UINT(pfVar17) & 0xffefffff); *(float **)&this->_flags = pfStack_30c; game = g_game; fVar19 = 0.0; - *(float **)((int)&this->_flags + 4) = pfVar17; + *(float **)(GHIDRA_INT(&this->_flags) + 4) = pfVar17; local_304 = game->_room; if (local_304[0x499] != 0.0) { do { - iVar8 = *(int *)((int)local_304[0x497] + (int)fVar19 * 4); + iVar8 = *(int *)(GHIDRA_INT(local_304[0x497]) + GHIDRA_INT(fVar19) * 4); if (((1 < *(int *)&g_game->_deathmatchManager) && (*(int *)(iVar8 + 0x28) == 1)) || (*(int *)(iVar8 + 0x28) - 10U < 0x3de)) { local_310 = (float *)(iVar8 + 0x3c4); @@ -5292,42 +5292,42 @@ LAB_006aeed2: *local_310 = 0.0; } } - fVar19 = (float)((int)fVar19 + 1); - } while ((uint)fVar19 < (uint)local_304[0x499]); + fVar19 = (float)(GHIDRA_INT(fVar19) + 1); + } while (GHIDRA_UINT(fVar19) < GHIDRA_UINT(local_304[0x499])); local_320 = *(ItemPool **)&this->_flags; - pfVar17 = *(float **)((int)&this->_flags + 4); + pfVar17 = *(float **)(GHIDRA_INT(&this->_flags) + 4); } } if ((0 < this->_weaknessCountdown) && (iVar8 = this->_weaknessCountdown + -1, this->_weaknessCountdown = iVar8, iVar8 < 1)) { - pfVar17 = (float *)((uint)pfVar17 & 0xffbfffff); + pfVar17 = (float *)(GHIDRA_UINT(pfVar17) & 0xffbfffff); *(ItemPool **)&this->_flags = local_320; - *(float **)((int)&this->_flags + 4) = pfVar17; + *(float **)(GHIDRA_INT(&this->_flags) + 4) = pfVar17; } local_2c8.x = (float)local_320; - if ((this->_iceFrozenEffect != (EntityPtr)0x0) && (((uint)pfVar17 & 0x80000) == 0)) { + if ((this->_iceFrozenEffect != (EntityPtr)0x0) && ((GHIDRA_UINT(pfVar17) & 0x80000) == 0)) { (**(code **)(*(int *)this->_iceFrozenEffect + 0x28))(); local_320 = *(ItemPool **)&this->_flags; - pfVar17 = *(float **)((int)&this->_flags + 4); + pfVar17 = *(float **)(GHIDRA_INT(&this->_flags) + 4); } if ((0 < this->_knockbackCountdown) && (iVar8 = this->_knockbackCountdown + -1, this->_knockbackCountdown = iVar8, iVar8 < 1)) { - pfVar17 = (float *)((uint)pfVar17 & 0xfffe7fff); + pfVar17 = (float *)(GHIDRA_UINT(pfVar17) & 0xfffe7fff); *(ItemPool **)&this->_flags = local_320; - *(float **)((int)&this->_flags + 4) = pfVar17; + *(float **)(GHIDRA_INT(&this->_flags) + 4) = pfVar17; } if ((0 < this->_iceCountdown) && (iVar8 = this->_iceCountdown + -1, this->_iceCountdown = iVar8, iVar8 < 1)) { - pfVar17 = (float *)((uint)pfVar17 & 0xfffbffff); + pfVar17 = (float *)(GHIDRA_UINT(pfVar17) & 0xfffbffff); *(ItemPool **)&this->_flags = local_320; - *(float **)((int)&this->_flags + 4) = pfVar17; + *(float **)(GHIDRA_INT(&this->_flags) + 4) = pfVar17; } if ((0 < this->_brimstoneMarkCountdown) && (iVar8 = this->_brimstoneMarkCountdown + -1, this->_brimstoneMarkCountdown = iVar8, iVar8 < 1 )) { - pfVar17 = (float *)((uint)pfVar17 & 0xfeffffff); + pfVar17 = (float *)(GHIDRA_UINT(pfVar17) & 0xfeffffff); *(ItemPool **)&this->_flags = local_320; - *(float **)((int)&this->_flags + 4) = pfVar17; + *(float **)(GHIDRA_INT(&this->_flags) + 4) = pfVar17; } if (0 < this->_bossStatusEffectCooldown) { this->_bossStatusEffectCooldown = this->_bossStatusEffectCooldown + -1; @@ -5338,7 +5338,7 @@ LAB_006aeed2: this->_holdCountdown = this->_holdCountdown + -1; } } - if (((uint)local_318 & 0x4000) == 0) { + if ((GHIDRA_UINT(local_318) & 0x4000) == 0) { if (this->_isInvicible == 0) { pfVar17 = (this->_damageEvents)._begin; local_319 = 0; @@ -5356,14 +5356,14 @@ LAB_006aeed2: local_320 = (ItemPool *)(pfVar17 + 0xb); do { if (0.0 < *pfVar17) { - if (((uint)g_game->_debugFlags >> 6 & 1) != 0) { + if ((GHIDRA_UINT(g_game->_debugFlags) >> 6 & 1) != 0) { ((KColor *)(&debugTextColor))->KColor::SetFromARGB(0xff90ee90); spawn_debug_damage_text(); } manager = g_manager; local_2c8.y = *(float *)((char *)local_320 + -0x20); - if ((((uint)*(float *)((char *)local_320 + -0x24) & 0x202) != 0) && - (((uint)*(float *)((char *)local_320 + -0x24) & 4) == 0)) { + if (((GHIDRA_UINT(*(float *)((char *)local_320 + -0x24)) & 0x202) != 0) && + ((GHIDRA_UINT(*(float *)((char *)local_320 + -0x24)) & 4) == 0)) { hitSoundId = 0x2b; seed_fart_sound_override(&hitSoundId); ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(hitSoundId,1.0,2,0,1.0,0.0); @@ -5371,7 +5371,7 @@ LAB_006aeed2: } fVar19 = *(float *)((char *)this + 0x380) - *pfVar17; *(float *)((char *)this + 0x380) = fVar19; - if ((0.0 < fVar19) || (((uint)*(float *)((char *)local_320 + -0x24) & 1) != 0)) { + if ((0.0 < fVar19) || ((GHIDRA_UINT(*(float *)((char *)local_320 + -0x24)) & 1) != 0)) { if ((*(uint *)((char *)this + 0x168) & 0x2000000) == 0) { if (fVar19 < 0.0) { *(int *)((char *)this + 0x380) = 0; @@ -5389,7 +5389,7 @@ LAB_006aeed2: uStack_bc = 0x3ea8f5c3; uStack_b8 = 0x3f800000; uStack_9c = 0; - iVar8 = ((int)(*pfVar17 + 0.5) + 2) / 3; + iVar8 = (GHIDRA_INT((*pfVar17 + 0.5)) + 2) / 3; iVar15 = 6; if (iVar8 < 6) { iVar15 = iVar8; @@ -5411,7 +5411,7 @@ LAB_006aeed2: uStack_e8 = 0x3f000000; uStack_e4 = 0x3f800000; uStack_c8 = 0; - iVar8 = ((int)(*pfVar17 + 0.5) + 2) / 3; + iVar8 = (GHIDRA_INT((*pfVar17 + 0.5)) + 2) / 3; iVar15 = 6; if (iVar8 < 6) { iVar15 = iVar8; @@ -5439,7 +5439,7 @@ LAB_006aeed2: } } pfVar17 = pfVar17 + 0xe; - local_320 = (ItemPool *)((int)local_320 + 0x38); + local_320 = (ItemPool *)(GHIDRA_INT(local_320) + 0x38); } while (pfVar17 != *(float **)((char *)this + 0xc)); if (local_319 != 0) { this->Kill(&fatalDamage); @@ -5453,11 +5453,11 @@ LAB_006aeed2: local_318 = *(float **)((char *)this + 0x168); pfVar17 = *(float **)((char *)this + 0x16c); } - if (((uint)local_318 & 0x4000) == 0) { + if ((GHIDRA_UINT(local_318) & 0x4000) == 0) { if (((1 < *(int *)&g_game->_deathmatchManager) && (*(int *)((char *)this + 0x28) == 1)) || (*(int *)((char *)this + 0x28) - 10U < 0x3de)) { local_308 = (EntityPtr)0x14; - if ((((uint)local_318 & 0x40) != 0) && + if (((GHIDRA_UINT(local_318) & 0x40) != 0) && (iVar8 = *(int *)((char *)this + 0x2e0), *(int *)((char *)this + 0x2e0) = iVar8 + 1, iVar8 % 0x14 == 1)) { uStack_78 = 0; @@ -5478,10 +5478,10 @@ LAB_006aeed2: pfVar17 = *(float **)((char *)this + 0x16c); } VStack_2d8.x = (float)local_318; - if (((uint)local_318 & 0x1000) != 0) { + if ((GHIDRA_UINT(local_318) & 0x1000) != 0) { iVar8 = *(int *)((char *)this + 0x2e4); *(int *)((char *)this + 0x2e4) = iVar8 + 1; - if (iVar8 % (int)local_308 == 1) { + if (iVar8 % GHIDRA_INT(local_308) == 1) { uStack_4c = 0x3f000000; uStack_5c = 0; uStack_58 = 0; @@ -5500,7 +5500,7 @@ LAB_006aeed2: pfVar17 = *(float **)((char *)this + 0x16c); } } - if ((((uint)pfVar17 & 4) != 0) && + if (((GHIDRA_UINT(pfVar17) & 4) != 0) && (bVar6 = IsDescendantOf(this,*(Entity **)((char *)this + 0x28c)), bVar6 == 0)) { fVar19 = *(float *)((char *)this + 0x340) - *(float *)((char *)this + 0x390); fVar21 = *(float *)((char *)this + 0x33c) - *(float *)((char *)this + 0x38c); @@ -5566,7 +5566,7 @@ LAB_006b0194: if (spawnVariant < 0x12d) { if (spawnVariant == 300) { while ((local_320 = (ItemPool *)local_318, local_318 == (float *)0x0 || - (cVar7 = (**(code **)((int)*pfStack_30c + 0x24))(local_318), + (cVar7 = (**(code **)(GHIDRA_INT(*pfStack_30c) + 0x24))(local_318), cVar7 != '\0'))) { if (uStack_300 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -5589,13 +5589,13 @@ LAB_006b0194: } else { if (spawnVariant == 0x46) { - uStack_2d0 = (uint)local_318 >> 0xb; + uStack_2d0 = GHIDRA_UINT(local_318) >> 0xb; do { if (local_318 != (float *)0x0) { - pcVar3 = *(code **)((int)*pfStack_30c + 0x28); + pcVar3 = *(code **)(GHIDRA_INT(*pfStack_30c) + 0x28); local_320 = (ItemPool *)local_318; iVar8 = ItemPool::GetPillEffect - (&g_game->_itemPool,(uint)local_318,(Entity_Player *)0x0 + (&g_game->_itemPool,GHIDRA_UINT(local_318),(Entity_Player *)0x0 ); cVar7 = (*pcVar3)(iVar8); if (cVar7 == '\0') goto LAB_006b019c; @@ -5626,12 +5626,12 @@ LAB_006affca: pfStack_2b8 = local_318; std::set::find_node(auStack_24c,&pfStack_2b8); if (((*(char *)((char *)fStack_244 + 0xd) == '\0') && - (*(int *)((char *)fStack_244 + 0x10) <= (int)pfVar17)) && + (*(int *)((char *)fStack_244 + 0x10) <= GHIDRA_INT(pfVar17))) && (fStack_244 != pfStack_30c[8])) goto LAB_006affca; bVar18 = true; } if ((pfVar17 == (float *)0x0) || (bVar18)) { - local_320 = (ItemPool *)(**(code **)((int)*pfStack_30c + 0x84))(0); + local_320 = (ItemPool *)(**(code **)(GHIDRA_INT(*pfStack_30c) + 0x84))(0); local_318 = (float *)local_320; } } @@ -5639,14 +5639,14 @@ LAB_006affca: else { if (spawnVariant != 0x15e) goto LAB_006b0194; while ((local_320 = (ItemPool *)local_318, local_318 == (float *)0x0 || - (cVar7 = (**(code **)((int)*pfStack_30c + 0x2c))(local_318), cVar7 != '\0') + (cVar7 = (**(code **)(GHIDRA_INT(*pfStack_30c) + 0x2c))(local_318), cVar7 != '\0') )) { local_318 = (float *)((ItemPool *)(&g_game->_itemPool))->ItemPool::GetTrinket(0); } } } LAB_006b019c: - pEStack_2fc = ((EntityFactory *)(pGStack_2f8->_entityFactory))->EntityFactory::Create((uint)local_314,0); + pEStack_2fc = ((EntityFactory *)(pGStack_2f8->_entityFactory))->EntityFactory::Create(GHIDRA_UINT(local_314),0); lVar4 = CONCAT44(pGStack_2f8,pfStack_2f4); if (pEStack_2fc == (Entity *)0x0) { tmpEntity = (Entity *)0x0; @@ -5654,19 +5654,19 @@ LAB_006b019c: else { uVar23 = GetTimeNs(); tmpEntity = pEStack_2fc; - uVar11 = (uint)(uVar23 >> 0x20); + uVar11 = GHIDRA_UINT((uVar23 >> 0x20)); lVar4 = (uVar23 & 0xffffffff) * 0x431bde82; apEStack_2f0[0] = (EntityPtr *)((ulonglong)lVar4 >> 0x20); uVar23 = (ulonglong)uVar11 * 0xd7b634db + ((uVar23 & 0xffffffff) * 0xd7b634db >> 0x20); - uVar12 = (uint)(uVar23 >> 0x20); + uVar12 = GHIDRA_UINT((uVar23 >> 0x20)); lVar4 = lVar4 + (uVar23 & 0xffffffff); - uStack_2d0 = (uint)lVar4; - uVar14 = (uint)((ulonglong)lVar4 >> 0x20); + uStack_2d0 = GHIDRA_UINT(lVar4); + uVar14 = GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)); lVar4 = (ulonglong)uVar11 * 0x431bde82 + (ulonglong)CONCAT14(CARRY4(uVar12,uVar14),uVar12 + uVar14); - uVar14 = (uint)((ulonglong)lVar4 >> 0x20); - uStack_300 = (uint)lVar4 >> 0x12 | uVar14 * 0x4000; + uVar14 = GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)); + uStack_300 = GHIDRA_UINT(lVar4) >> 0x12 | uVar14 * 0x4000; pfStack_30c = (float *)(uVar14 >> 0x12); pEVar2 = &pEStack_2fc->_spawnerEntity; pEStack_2fc->_spawnerType = 0; @@ -5686,7 +5686,7 @@ LAB_006b019c: iVar8 = *(int *)((char *)pvVar16 + 0x1214); *(int *)((char *)pvVar16 + 0x1214) = iVar8 + 1; tmpEntity->_index = iVar8; - ((EntityList *)((EntityList *)((int)pvVar16 + 0x1218)))->EntityList::AddEntity(tmpEntity); + ((EntityList *)((EntityList *)(GHIDRA_INT(pvVar16) + 0x1218)))->EntityList::AddEntity(tmpEntity); bVar6 = Game::ShouldEraseEnemy(tmpEntity); if (bVar6 != 0) { RemoveWithPoof(tmpEntity,unusedArg); @@ -5708,18 +5708,18 @@ LAB_006b019c: } uVar14 = 0; playerManager = &g_game->_playerManager; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar16 = (playerManager->_playerList)._end; - if ((int)pvVar16 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar16) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *) "((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n" ); pvVar16 = (playerManager->_playerList)._end; } piVar10 = (playerManager->_playerList)._begin; - if (uVar14 < (uint)((int)pvVar16 - (int)piVar10 >> 2)) { + if (uVar14 < GHIDRA_UINT((GHIDRA_INT(pvVar16) - GHIDRA_INT(piVar10) >> 2))) { piVar10 = piVar10 + uVar14; } trigger_set_dispatch @@ -5727,32 +5727,32 @@ LAB_006b019c: ); uVar14 = uVar14 + 1; playerManager = &g_game->_playerManager; - } while (uVar14 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar14 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } LAB_006b0415: uVar23 = GetTimeNs(); - uVar14 = (uint)(uVar23 >> 0x20); + uVar14 = GHIDRA_UINT((uVar23 >> 0x20)); lVar5 = (uVar23 & 0xffffffff) * 0x431bde82; - uStack_2d0 = (uint)((ulonglong)lVar5 >> 0x20); + uStack_2d0 = GHIDRA_UINT(((ulonglong)lVar5 >> 0x20)); lVar4 = (ulonglong)uVar14 * 0x431bde82; uVar23 = (ulonglong)uVar14 * 0xd7b634db + ((uVar23 & 0xffffffff) * 0xd7b634db >> 0x20); - uVar11 = (uint)(uVar23 >> 0x20); + uVar11 = GHIDRA_UINT((uVar23 >> 0x20)); lVar5 = lVar5 + (uVar23 & 0xffffffff); apEStack_2f0[0] = (EntityPtr *)lVar5; - uVar14 = (uint)((ulonglong)lVar5 >> 0x20); + uVar14 = GHIDRA_UINT(((ulonglong)lVar5 >> 0x20)); lVar5 = lVar4 + (ulonglong)CONCAT14(CARRY4(uVar11,uVar14),uVar11 + uVar14); - uVar12 = (uint)((ulonglong)lVar5 >> 0x20); - uVar14 = (uint)lVar5 >> 0x12 | uVar12 * 0x4000; + uVar12 = GHIDRA_UINT(((ulonglong)lVar5 >> 0x20)); + uVar14 = GHIDRA_UINT(lVar5) >> 0x12 | uVar12 * 0x4000; uVar11 = uVar14 - uStack_300; - bVar18 = CARRY4((uint)g_entitySpawnTimeMs,uVar11); - g_entitySpawnTimeMs._0_4_ = (uint)g_entitySpawnTimeMs + uVar11; - g_entitySpawnTimeMs._4_4_ = - g_entitySpawnTimeMs._4_4_ + - (((uVar12 >> 0x12) - (int)pfStack_30c) - (uint)(uVar14 < uStack_300)) + - (uint)bVar18; + bVar18 = CARRY4(GHIDRA_UINT(g_entitySpawnTimeMs),uVar11); + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x0)) = GHIDRA_UINT(g_entitySpawnTimeMs) + uVar11; + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) = + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) + + (((uVar12 >> 0x12) - GHIDRA_INT(pfStack_30c)) - GHIDRA_UINT((uVar14 < uStack_300))) + + GHIDRA_UINT(bVar18); tmpEntity = pEStack_2fc; this = self; } @@ -5762,7 +5762,7 @@ LAB_006b0415: sorted_vector_insert_unique(&tmpEntity[1]._sprite._overlayAnimState,uVar14); uVar14 = Random(); iVar8 = *(int *)tmpEntity; - fVar21 = (float)((double)(int)uVar14 + __uint_to_double_fixup[-((int)uVar14 >> 0x1f)]) + fVar21 = (float)((double)GHIDRA_INT(uVar14) + __uint_to_double_fixup[-(GHIDRA_INT(uVar14) >> 0x1f)]) * 2.3283064e-10 * 0.5 + 0.2; fVar19 = fVar21 * g_vectorOne.x; (tmpEntity->_sprite)._scale.y = fVar21 * g_vectorOne.y; @@ -5775,7 +5775,7 @@ LAB_006b0415: uVar14 = Random(); uVar11 = Random(); uVar12 = Random(); - fVar19 = (float)((double)(int)uVar12 + __uint_to_double_fixup[-((int)uVar12 >> 0x1f)]) + fVar19 = (float)((double)GHIDRA_INT(uVar12) + __uint_to_double_fixup[-(GHIDRA_INT(uVar12) >> 0x1f)]) * 2.3283064e-10 * 3.14; apEStack_2f0[0] = (EntityPtr *)(fVar19 + fVar19); particleVelocity.x = cos((float)apEStack_2f0[0]); @@ -5783,7 +5783,7 @@ LAB_006b0415: fVar19 = sin((float)apEStack_2f0[0]); particleVelocity.y = fVar19 * 0.5 * 5.0; uVar12 = Random(); - fVar19 = (float)((double)(int)uVar12 + __uint_to_double_fixup[-((int)uVar12 >> 0x1f)]) + fVar19 = (float)((double)GHIDRA_INT(uVar12) + __uint_to_double_fixup[-(GHIDRA_INT(uVar12) >> 0x1f)]) * 2.3283064e-10 * 3.14; apEStack_2f0[0] = (EntityPtr *)(fVar19 + fVar19); fVar19 = cos((float)apEStack_2f0[0]); @@ -5817,7 +5817,7 @@ LAB_006b0415: pGStack_2f8 = (Game *)fVar19; if (*(int *)((char *)pvStack_2bc + 0x1264) != 0) { do { - EVar20 = *(EntityPtr *)(*(int *)((char *)pvStack_2bc + 0x125c) + (int)local_304 * 4); + EVar20 = *(EntityPtr *)(*(int *)((char *)pvStack_2bc + 0x125c) + GHIDRA_INT(local_304) * 4); local_308 = EVar20; bVar6 = DoesEntityShareStatus((Entity *)EVar20); if (bVar6 != 0) { @@ -5922,30 +5922,30 @@ LAB_006b0415: fVar21 = (float)*ppEVar13 * *(float *)((char *)EVar20 + 0x360); *(float *)((char *)EVar20 + 0x364) = fVar19; *(float *)((char *)EVar20 + 0x360) = fVar21; - local_320 = (ItemPool *)g_tearFlagOrbit._l._4_4_; + local_320 = (*(undefined4 *)((char *)&((ItemPool *)g_tearFlagOrbit._l) + 0x4)); apEStack_2e0[0] = - (EntityPtr *)(*(uint *)((char *)EVar20 + 0x430) & (uint)g_tearFlagOrbit._h); + (EntityPtr *)(*(uint *)((char *)EVar20 + 0x430) & GHIDRA_UINT(g_tearFlagOrbit._h)); apEStack_2f0[0] = (EntityPtr *) - (*(uint *)((char *)EVar20 + 0x434) & (uint)g_tearFlagOrbit._h._4_4_); - pfStack_2b8 = g_tearFlagOrbit._h._4_4_; - uStack_2d0 = (uint)g_tearFlagOrbit._l; + (*(uint *)((char *)EVar20 + 0x434) & (*(undefined4 *)((char *)&(GHIDRA_UINT(g_tearFlagOrbit._h)) + 0x4))); + pfStack_2b8 = (*(undefined4 *)((char *)&(g_tearFlagOrbit._h) + 0x4)); + uStack_2d0 = GHIDRA_UINT(g_tearFlagOrbit._l); this = tmpEntity; - if ((((*(uint *)((char *)EVar20 + 0x428) & (uint)g_tearFlagOrbit._l) != 0 || - (*(uint *)((char *)EVar20 + 0x42c) & (uint)g_tearFlagOrbit._l._4_4_) != 0) || + if ((((*(uint *)((char *)EVar20 + 0x428) & GHIDRA_UINT(g_tearFlagOrbit._l)) != 0 || + (*(uint *)((char *)EVar20 + 0x42c) & (*(undefined4 *)((char *)&(GHIDRA_UINT(g_tearFlagOrbit._l)) + 0x4))) != 0) || (apEStack_2e0[0] != (EntityPtr *)0x0 || apEStack_2f0[0] != (EntityPtr *)0x0) ) && (fVar19 * fVar19 + fVar21 * fVar21 < 1.0)) { - newTearFlagsLo = ~(uint)g_tearFlagOrbit._l & *(uint *)((char *)EVar20 + 0x428); + newTearFlagsLo = ~GHIDRA_UINT(g_tearFlagOrbit._l) & *(uint *)((char *)EVar20 + 0x428); local_320 = (ItemPool *) - (~(uint)g_tearFlagOrbit._l._4_4_ & *(uint *)((char *)EVar20 + 0x42c)) + (~(*(undefined4 *)((char *)&(GHIDRA_UINT(g_tearFlagOrbit._l)) + 0x4)) & *(uint *)((char *)EVar20 + 0x42c)) ; - uVar14 = ~(uint)g_tearFlagOrbit._h & *(uint *)((char *)EVar20 + 0x430); + uVar14 = ~GHIDRA_UINT(g_tearFlagOrbit._h) & *(uint *)((char *)EVar20 + 0x430); uStack_2ac = CONCAT44(uVar14,local_320); - uStack_2a4 = ~(uint)g_tearFlagOrbit._h._4_4_ & *(uint *)((char *)EVar20 + 0x434); - flags._l._4_4_ = (float *)local_320; - flags._l._0_4_ = newTearFlagsLo; - flags._h._0_4_ = uVar14; - flags._h._4_4_ = uStack_2a4; + uStack_2a4 = ~(*(undefined4 *)((char *)&(GHIDRA_UINT(g_tearFlagOrbit._h)) + 0x4)) & *(uint *)((char *)EVar20 + 0x434); + (*(undefined4 *)((char *)&(flags._l) + 0x4)) = (float *)local_320; + (*(undefined4 *)((char *)&(flags._l) + 0x0)) = newTearFlagsLo; + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = uVar14; + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = uStack_2a4; ((Entity_Tear *)((Entity_Tear *)EVar20))->Entity_Tear::SetTearFlags(flags); } } @@ -5958,7 +5958,7 @@ LAB_006b0415: } } } - local_304 = (float *)((int)local_304 + 1); + local_304 = (float *)(GHIDRA_INT(local_304) + 1); } while (local_304 < *(float **)((char *)pvStack_2bc + 0x1264)); } *(float *)((char *)this + 0x364) = (float)pGStack_2f8 * *(float *)((char *)this + 0x364); @@ -5970,18 +5970,18 @@ LAB_006b0a5d: (0.0 < *(float *)((char *)g_game->_room + 0x7240))) && ((((g_manager->_optionsConfig)._enableWaterSurface != 0 && (((get_water_splash_variant(this,(int *)&local_2c8), *(int *)((char *)this + 0x188) != 0 && - (*(int *)((char *)this + 0x184) == 5)) || (((uint)local_2c8.x & 0x80) != 0)))) && + (*(int *)((char *)this + 0x184) == 5)) || ((GHIDRA_UINT(local_2c8.x) & 0x80) != 0)))) && (fVar19 = sqrtf(*(float *)((char *)this + 0x360) * *(float *)((char *)this + 0x360) + *(float *)((char *)this + 0x364) * *(float *)((char *)this + 0x364)), 0.01 < fVar19) ))) { iVar8 = 1; - if (1 < (int)(20.0 / fVar19)) { - iVar8 = (int)(20.0 / fVar19); + if (1 < GHIDRA_INT((20.0 / fVar19))) { + iVar8 = GHIDRA_INT((20.0 / fVar19)); } iVar8 = GetIntervalTicks(this,(float)iVar8,0.0); if (iVar8 != 0) { uVar14 = Random(); - ((Game *)(g_game))->Game::SpawnEx(1000,0x85,(Vector *)((int)this + 0x33c),&g_vectorZero,(Entity *)0x0,0, + ((Game *)(g_game))->Game::SpawnEx(1000,0x85,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero,(Entity *)0x0,0, uVar14,0); } } @@ -6004,9 +6004,9 @@ void Entity::Interpolate() float velocityX; float velocityY; - flagsLow = (uint)this->_flags; + flagsLow = GHIDRA_UINT(this->_flags); if ((flagsLow & 2) != 0) { - *(undefined4 *)((int)&this->_flags + 4) = *(undefined4 *)((int)&this->_flags + 4); + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); *(uint *)&this->_flags = flagsLow & 0xfffffffd; return; } @@ -6188,7 +6188,7 @@ void Entity::PostRender() render_color_quad(&lineFrom,&lineTo,fromColor_00,fromColor_00,1.0); } game = g_game; - if (((uint)g_game->_debugFlags >> 0xc & 1) != 0) { + if ((GHIDRA_UINT(g_game->_debugFlags) >> 0xc & 1) != 0) { fVar3 = g_screenHeight - 182.0; fVar4 = g_displayPixelRatio * g_screenPointScale; dVar8 = floor((double)((((this->_pos).x - 60.0) * 0.65 + (g_screenWidth - 338.0) * 0.5) * fVar4 @@ -6210,7 +6210,7 @@ void Entity::PostRender() _Init_thread_footer(); } uVar2 = this->_entityGridCollisionClass; - if (((int)uVar2 < 1) || (7 < uVar2)) { + if ((GHIDRA_INT(uVar2) < 1) || (7 < uVar2)) { collisionColor = (KColor *)&DAT_00c80cc0; } else { @@ -6218,7 +6218,7 @@ void Entity::PostRender() } uVar2 = 0; pvVar1 = (this->_collisionPoints)._begin; - if ((int)(this->_collisionPoints)._end - (int)pvVar1 >> 3 != 0) { + if (GHIDRA_INT((this->_collisionPoints)._end) - GHIDRA_INT(pvVar1) >> 3 != 0) { lineTo.x = 1.0; lineTo.y = 1.0; fVar5 = fVar3; @@ -6238,12 +6238,12 @@ void Entity::PostRender() } uVar2 = uVar2 + 1; pvVar1 = (this->_collisionPoints)._begin; - } while (uVar2 < (uint)((int)(this->_collisionPoints)._end - (int)pvVar1 >> 3)); + } while (uVar2 < GHIDRA_UINT((GHIDRA_INT((this->_collisionPoints)._end) - GHIDRA_INT(pvVar1) >> 3))); } game = g_game; } } - if (((uint)game->_debugFlags >> 5 & 1) != 0) { + if ((GHIDRA_UINT(game->_debugFlags) >> 5 & 1) != 0) { fVar3 = g_screenHeight - 182.0; fVar4 = g_displayPixelRatio * g_screenPointScale; dVar8 = floor((double)((((this->_pos).x - 60.0) * 0.65 + (g_screenWidth - 338.0) * 0.5) * fVar4 @@ -6263,7 +6263,7 @@ void Entity::PostRender() _Init_thread_footer(); } uVar2 = this->_entityCollisionClass; - if (((int)uVar2 < 1) || (4 < uVar2)) { + if ((GHIDRA_INT(uVar2) < 1) || (4 < uVar2)) { collisionColor = (KColor *)&DAT_00c80d68; } else { @@ -6278,13 +6278,13 @@ void Entity::PostRender() if (12.0 <= fVar5) { fVar5 = 12.0; } - halfSegmentCount = (int)fVar5 * 2; + halfSegmentCount = GHIDRA_INT(fVar5) * 2; if ((fVar4 == g_vectorOne.x) && ((this->_sizeMulti).y == g_vectorOne.y)) { fVar4 = cos(0.0); local_c0.x = fVar4 * this->_size * 0.65 + screenX; fVar4 = sin(0.0); segment = 1; - segmentCount = (int)fVar5 << 2; + segmentCount = GHIDRA_INT(fVar5) << 2; if (0 < segmentCount) { local_c0.y = fVar4 * this->_size * 0.65 + fVar3; do { @@ -6402,7 +6402,7 @@ byte Entity::RenderShadowLayer(Vector *offset) undefined4 local_6c [26]; ColorMod *spriteColor; - local_c0 = CONCAT44(local_c0._4_4_,g_displayPixelRatio * g_screenPointScale); + local_c0 = CONCAT44((*(undefined4 *)((char *)&(local_c0) + 0x4)),g_displayPixelRatio * g_screenPointScale); renderPos.x = ((((this->_shadowOffset).x + (this->_pos).x) - 60.0) * 0.65 + (g_screenWidth - 338.0) * 0.5) * g_displayPixelRatio * g_screenPointScale + 0.5; dVar4 = floor((double)renderPos.x); @@ -6698,8 +6698,8 @@ byte Entity::push_apart_circle(Entity *other) } SoundEffects::PlayWithFartOverride2 (0x1e7,unused,2,0, - (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * 0.2 + (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 0.9,fVar3); } beastDamping = 0.25; @@ -6814,7 +6814,7 @@ void Entity::SetColor(ColorMod *color, int duration, int priority, byte isFadeou ColorMod *spriteColor; void *topParams; - local_c = __security_cookie ^ (uint)auStack_5c; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_5c); colorLocal = color; if (duration < 1) { if (&this->_color != color) { @@ -6851,7 +6851,7 @@ void Entity::SetColor(ColorMod *color, int duration, int priority, byte isFadeou local_20 = (float)duration; local_1c = duration; insertPos = (this->_colorParams)._begin; - local_18._0_2_ = CONCAT11(isShare,isFadeout); + (*(undefined2 *)((char *)&(local_18) + 0x0)) = CONCAT11(isShare,isFadeout); paramsEnd = (this->_colorParams)._end; local_50 = (std_vector *)priority; local_2c = (float)colorOffsetXY; @@ -6865,21 +6865,21 @@ void Entity::SetColor(ColorMod *color, int duration, int priority, byte isFadeou else if (insertPos == paramsEnd) { *paramsEnd = priority; *(undefined8 *)(paramsEnd + 9) = colorOffsetXY; - paramsEnd[0xb] = (int)colorOffsetZ; - paramsEnd[1] = (int)local_4c; - paramsEnd[2] = (int)fStack_48; - paramsEnd[3] = (int)fStack_44; - paramsEnd[4] = (int)fStack_40; - paramsEnd[5] = (int)local_3c; - paramsEnd[6] = (int)fStack_38; - paramsEnd[7] = (int)fStack_34; - paramsEnd[8] = (int)fStack_30; + paramsEnd[0xb] = GHIDRA_INT(colorOffsetZ); + paramsEnd[1] = GHIDRA_INT(local_4c); + paramsEnd[2] = GHIDRA_INT(fStack_48); + paramsEnd[3] = GHIDRA_INT(fStack_44); + paramsEnd[4] = GHIDRA_INT(fStack_40); + paramsEnd[5] = GHIDRA_INT(local_3c); + paramsEnd[6] = GHIDRA_INT(fStack_38); + paramsEnd[7] = GHIDRA_INT(fStack_34); + paramsEnd[8] = GHIDRA_INT(fStack_30); *(byte *)(paramsEnd + 0xe) = isFadeout; paramsEnd[0xc] = duration; paramsEnd[0xd] = duration; *(byte *)((char *)paramsEnd + 0x39) = isShare; colorParamsEnd = &(this->_colorParams)._end; - *colorParamsEnd = (void *)((int)*colorParamsEnd + 0x3c); + *colorParamsEnd = (void *)(GHIDRA_INT(*colorParamsEnd) + 0x3c); } else { fStack_48 = color->_tint[0]; @@ -6900,14 +6900,14 @@ void Entity::SetColor(ColorMod *color, int duration, int priority, byte isFadeou local_13 = isShare; FUN_004b7020(paramsEnd + -0xf); colorParamsEnd = &(this->_colorParams)._end; - *colorParamsEnd = (void *)((int)*colorParamsEnd + 0x3c); + *colorParamsEnd = (void *)(GHIDRA_INT(*colorParamsEnd) + 0x3c); FUN_004b6e40(extraout_EDX); FUN_004b6fc0(&local_4c); color = colorLocal; } topParams = (this->_colorParams)._begin; spriteColor = &(this->_sprite)._color; - if (spriteColor != (ColorMod *)((int)topParams + 4)) { + if (spriteColor != (ColorMod *)(GHIDRA_INT(topParams) + 4)) { fVar1 = *(float *)((char *)topParams + 8); fVar2 = *(float *)((char *)topParams + 0xc); fVar3 = *(float *)((char *)topParams + 0x10); @@ -6967,7 +6967,7 @@ void Entity::BloodExplode() uint local_c; code *setColorFn; - local_c = __security_cookie ^ (uint)auStack_98; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_98); if ((this->_flags & 0x4000000000000) != 0) { cVar3 = this->IsBoss(); if ((cVar3 == '\0') && (*(char *)((char *)this->_config + 0x2c) == '\0')) { @@ -6975,7 +6975,7 @@ void Entity::BloodExplode() manager = g_manager; iStack_94 = 0x1f0; pEStack_90 = (Entity *) - ((float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 0.9); seed_fart_sound_override(&iStack_94); ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(iStack_94,1.0,2,0,(float)pEStack_90,0.0); @@ -6992,7 +6992,7 @@ void Entity::BloodExplode() tmpColor._offset[2] = 0.8; uVar5 = Random(); pEStack_90 = (Entity *) - ((float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283064e-10); uVar5 = Random(); Game::SpawnParticles @@ -7006,7 +7006,7 @@ void Entity::BloodExplode() manager = g_manager; iStack_94 = 0x1f2; pEStack_90 = (Entity *) - ((float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 0.9); seed_fart_sound_override(&iStack_94); ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(iStack_94,1.0,2,0,(float)pEStack_90,0.0); @@ -7159,7 +7159,7 @@ LAB_006b4a6a: iStack_94 = *(int *)((char *)this->_config + 0x5c); if (iStack_94 < 1) { VStack_78.x = *(float *)&this->_flags; - uVar5 = *(uint *)((int)&this->_flags + 4); + uVar5 = *(uint *)(GHIDRA_INT(&this->_flags) + 4); LAB_006b4d1e: pEStack_90 = (Entity *)(uVar5 & 0x800000); if (pEStack_90 == (Entity *)0x0) goto LAB_006b4cca; @@ -7168,12 +7168,12 @@ LAB_006b4d45: uVar5 = *(uint *)((char *)this->_config + 0x60); } else { - uVar5 = *(uint *)((int)&this->_flags + 4); + uVar5 = *(uint *)(GHIDRA_INT(&this->_flags) + 4); if ((uVar5 & 0x800) == 0) { VStack_78.x = *(float *)&this->_flags; goto LAB_006b4d1e; } - iVar7 = (int)(iStack_94 + (iStack_94 >> 0x1f & 3U)) >> 2; + iVar7 = GHIDRA_INT((iStack_94 + (iStack_94 >> 0x1f & 3U))) >> 2; iStack_94 = 1; if (1 < iVar7) { iStack_94 = iVar7; @@ -7224,24 +7224,24 @@ LAB_006b4d65: } else { uVar5 = Random(); - uVar5 = uVar5 % (uint)fStack_88; + uVar5 = uVar5 % GHIDRA_UINT(fStack_88); } - fStack_88 = (float)((int)fStack_88 + uVar5); + fStack_88 = (float)(GHIDRA_INT(fStack_88) + uVar5); baseBloodColor._unk = 0; baseBloodColor._red = 0.61960787; baseBloodColor._green = 0.043137256; baseBloodColor._blue = 0.05882353; baseBloodColor._alpha = 1.0; ::Color::apply_to_kcolor(&bloodColor,&this->_splatColor,&baseBloodColor); - if (0 < (int)fStack_88) { + if (0 < GHIDRA_INT(fStack_88)) { do { uVar5 = Random(); - fVar9 = (float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) * + fVar9 = (float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283064e-10 * 3.14; pEStack_8c = (Entity *)(fVar9 + fVar9); uVar5 = Random(); pEStack_90 = (Entity *) - ((float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283064e-10 * 10.0); dropVelX = cos((float)pEStack_8c); dropVelX = dropVelX * (float)pEStack_90; @@ -7251,13 +7251,13 @@ LAB_006b4d65: dropVelocity.y = dropVelY; uVar5 = Random(); rngValue = Random(); - fVar9 = (float)((double)(int)rngValue + __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + fVar9 = (float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 3.14; pEStack_90 = (Entity *)(fVar9 + fVar9); rngValue = Random(); pEStack_8c = (Entity *) - ((float)((double)(int)rngValue + - __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * 2.3283064e-10 * + ((float)((double)GHIDRA_INT(rngValue) + + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 20.0); fVar9 = cos((float)pEStack_90); VStack_78.x = fVar9 * (float)pEStack_8c + (this->_pos).x; @@ -7273,7 +7273,7 @@ LAB_006b4d65: uVar5 = Random(); iVar7 = *(int *)pEVar6; *(float *)(pEVar6[1]._sprite._animDefaultName._buf + 4) = - ((float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283064e-10 * 10.0 + 2.0) * (float)pEStack_90; setColorFn = *(code **)(iVar7 + 0x3c); uVar5 = Random(); @@ -7288,7 +7288,7 @@ LAB_006b4d65: tmpColor._tint[1] = bloodColor._green; tmpColor._tint[2] = bloodColor._blue; tmpColor._tint[3] = - ((float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283064e-10 * 0.25 + 0.1) * bloodColor._alpha; (*setColorFn)(&tmpColor,0xffffffff,0xff,0,1); if ((*(uint *)((char *)this->_config + 0x60) >> 0xd & 1) == 0) { @@ -7299,21 +7299,21 @@ LAB_006b4d65: } else { uVar5 = Random(); - fVar9 = (float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) * + fVar9 = (float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283064e-10; fVar8 = fVar9 + fVar9 + 2.0; fVar9 = fVar8 * g_vectorOne.x; - unaff_EDI[0x3a] = (int)(fVar8 * g_vectorOne.y); - unaff_EDI[0x39] = (int)fVar9; + unaff_EDI[0x3a] = GHIDRA_INT((fVar8 * g_vectorOne.y)); + unaff_EDI[0x39] = GHIDRA_INT(fVar9); uVar5 = Random(); iVar7 = uVar5 % 0x1e + 0x14; unaff_EDI[0x117] = iVar7; unaff_EDI[0x118] = iVar7; - unaff_EDI[0xd8] = (int)((float)unaff_EDI[0xd8] * 4.0); - unaff_EDI[0xd9] = (int)((float)unaff_EDI[0xd9] * 4.0); + unaff_EDI[0xd8] = GHIDRA_INT(((float)unaff_EDI[0xd8] * 4.0)); + unaff_EDI[0xd9] = GHIDRA_INT(((float)unaff_EDI[0xd9] * 4.0)); } (**(code **)(*unaff_EDI + 0xc))(); - fStack_88 = (float)((int)fStack_88 + -1); + fStack_88 = (float)(GHIDRA_INT(fStack_88) + -1); } while (fStack_88 != 0.0); fStack_88 = 0.0; iVar7 = iStack_94; @@ -7321,7 +7321,7 @@ LAB_006b4d65: } fVar9 = gibSpeed; LAB_006b523c: - spawn_gibs(&this->_pos,iVar7,this->_size,(uint *)((int)this->_config + 0x60),this, + spawn_gibs(&this->_pos,iVar7,this->_size,(uint *)(GHIDRA_INT(this->_config) + 0x60),this, &this->_splatColor,&gibVelocity,fVar9); if (((this->_type != 4) && (this->_type != 5)) && ((this->_flags & 0x10000) == 0)) { uVar5 = Random(); @@ -7426,11 +7426,11 @@ void Entity::AddShrink(EntityRef *ref, int duration, byte ignoreBossStatusCooldo } } statusOwner->_shrinkCountdown = newCountdown; - flagsLow = (uint)statusOwner->_flags; + flagsLow = GHIDRA_UINT(statusOwner->_flags); if ((flagsLow & 0x1000000) == 0) { - flagsHigh = *(undefined4 *)((int)&statusOwner->_flags + 4); + flagsHigh = *(undefined4 *)(GHIDRA_INT(&statusOwner->_flags) + 4); *(uint *)&statusOwner->_flags = flagsLow | 0x1000000; - *(undefined4 *)((int)&statusOwner->_flags + 4) = flagsHigh; + *(undefined4 *)(GHIDRA_INT(&statusOwner->_flags) + 4) = flagsHigh; statusOwner->_shrinkStatus2 = 0.333; SetSize(this,*(float *)((char *)this->_config + 0x38) * this->_shrinkStatus1, (Vector)(CONCAT44(g_vectorOne.y,g_vectorOne.x) ^ 0x8000000080000000),-1); @@ -7911,7 +7911,7 @@ LAB_006b6f7a: else if ((((this->_type == 5) && (this->_variant == 100)) && (this[1]._sprite._championColor._tint[2] == 0.0)) && (((this->_sprite)._overlayAnimState._animData == (void *)0x0 || - ((int)(this->_sprite)._overlayAnimState._animFrame != 0)))) { + (GHIDRA_INT((this->_sprite)._overlayAnimState._animFrame) != 0)))) { outSplash[1] = -0x3f600000; *outSplash = 0x19; return outSplash; @@ -7995,9 +7995,9 @@ void Entity::AddMagnetized(EntityRef *ref, int duration, byte unused) statusOwner->SetColor(&magnetColor,statusOwner->_magnetizedCountdown,0xff,0,1) ; qVar2 = statusOwner->_flags; - puVar1 = (uint *)((int)&statusOwner->_flags + 4); + puVar1 = (uint *)(GHIDRA_INT(&statusOwner->_flags) + 4); *puVar1 = *puVar1 | 0x80000; - *(int *)&statusOwner->_flags = (int)qVar2; + *(int *)&statusOwner->_flags = GHIDRA_INT(qVar2); cVar4 = FUN_006ae7a0(); if (cVar4 != '\0') { statusOwner->_bossStatusEffectCooldown = 0xf0; @@ -8009,7 +8009,7 @@ void Entity::AddMagnetized(EntityRef *ref, int duration, byte unused) ((Game *)(g_game))->Game::SpawnEx(1000,0x39,&statusOwner->_pos,&g_vectorZero,(Entity *)0x0,0, uVar5,0); statusOwner->_iceFrozenEffect = statusEffect; - effectParentSlot = (EntityPtr *)((int)statusEffect + 0x3bc); + effectParentSlot = (EntityPtr *)(GHIDRA_INT(statusEffect) + 0x3bc); if (*(EntityPtr *)((char *)statusEffect + 0x3bc) != (EntityPtr)0x0) { pEStack_68 = effectParentSlot; std::multiset::erase(&pEStack_68); @@ -8098,7 +8098,7 @@ void Entity::AddBaited(EntityRef *ref, int duration, byte unused) qword oldFlags; EntityPtr parent; - local_c = __security_cookie ^ (uint)auStack_64; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_64); bVar1 = IsDamageSourceFriendly(this,ref); if (bVar1 != 0) { return; @@ -8150,9 +8150,9 @@ void Entity::AddBaited(EntityRef *ref, int duration, byte unused) (**(code **)(*(int *)statusTarget + 0x3c)) (&local_38,((Entity *)statusTarget)->_baitedCountdown,0xff,0,1); oldFlags = ((Entity *)statusTarget)->_flags; - flagsHigh = (uint *)((int)&((Entity *)statusTarget)->_flags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&((Entity *)statusTarget)->_flags) + 4); *flagsHigh = *flagsHigh | 0x100000; - *(int *)&((Entity *)statusTarget)->_flags = (int)oldFlags; + *(int *)&((Entity *)statusTarget)->_flags = GHIDRA_INT(oldFlags); cVar2 = FUN_006ae7a0(); if (cVar2 != '\0') { ((Entity *)statusTarget)->_bossStatusEffectCooldown = 0xf0; @@ -8260,9 +8260,9 @@ void Entity::AddWeakness(EntityRef *ref, int duration) weaknessColor._offset[2] = 0.0; this->SetColor(&weaknessColor,this->_weaknessCountdown,0xff,0,1); oldFlags = this->_flags; - flagsHigh = (uint *)((int)&this->_flags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&this->_flags) + 4); *flagsHigh = *flagsHigh | 0x400000; - *(int *)&this->_flags = (int)oldFlags; + *(int *)&this->_flags = GHIDRA_INT(oldFlags); CopyStatusEffects(this); } } @@ -8291,7 +8291,7 @@ void Entity::AddBrimstoneMark(EntityRef *ref, int duration) int currentCountdown; EntityPtr nextParent; - local_8 = __security_cookie ^ (int)register0x00000010 - 4U; + local_8 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; bVar1 = IsDamageSourceFriendly(this,ref); if (bVar1 == 0) { apply_second_hand_duration(this,duration,ref); @@ -8454,18 +8454,18 @@ byte Entity::IsPlayerInRadius(Vector *position, float radius, int unused1, int u game = g_game; queryRadius = radius; savedRadiusSq = radiusSq; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { playerListEnd = (playerManager->_playerList)._end; - if ((int)playerListEnd - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (playerManager->_playerList)._end; game = g_game; radiusSq = savedRadiusSq; } playerSlot = (playerManager->_playerList)._begin; - if (uVar1 < (uint)((int)playerListEnd - (int)playerSlot >> 2)) { + if (uVar1 < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + uVar1; } dy = position->y - *(float *)(*playerSlot + 0x340); @@ -8476,18 +8476,18 @@ byte Entity::IsPlayerInRadius(Vector *position, float radius, int unused1, int u } playerManager = &game->_playerManager; uVar1 = uVar1 + 1; - } while (uVar1 < (uint)((int)(game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar1 < GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } EntityList::QueryRadius - ((EntityList *)((int)game->_room + 0x1218),&nearbyEntities,position,queryRadius,1); + ((EntityList *)(GHIDRA_INT(game->_room) + 0x1218),&nearbyEntities,position,queryRadius,1); uVar1 = 0; if (nearbyEntities._size != 0) { do { nearbyEntity = *(int *)((char *)nearbyEntities._data + uVar1 * 4); if (((nearbyEntity != 0) && (*(int *)(nearbyEntity + 0x28) == 3)) && (*(int *)(nearbyEntity + 0x2c) == 0x3e)) { - if (nearbyEntities._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(nearbyEntities) + 0x0)) == '\0') { local_8 = 0; tracked_alloc(1,nearbyEntities._data,0); } @@ -8495,22 +8495,22 @@ byte Entity::IsPlayerInRadius(Vector *position, float radius, int unused1, int u return 1; } uVar1 = uVar1 + 1; - } while (uVar1 < (uint)nearbyEntities._size); + } while (uVar1 < GHIDRA_UINT(nearbyEntities._size)); } - if (nearbyEntities._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(nearbyEntities) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (nearbyEntities._data != (void *)0x0) { uVar1 = *(uint *)((char *)nearbyEntities._data + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar1; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar1; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar1); - free((void *)((int)nearbyEntities._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar1)); + free((void *)(GHIDRA_INT(nearbyEntities._data) + -4)); } } } @@ -8738,7 +8738,7 @@ void Entity::DestroyRockGridAt(Vector *position, GridEntityDesc *desc, Entity *s local_8 = -NAN; puStack_c = &LAB_00afc780; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(&local_40)[1]._colorize; + local_14 = __security_cookie ^ GHIDRA_UINT((&local_40)[1]._colorize); GridEntityType = desc->_type; poopVariant = desc->_variant; positionLocal = position; @@ -8780,14 +8780,14 @@ void Entity::DestroyRockGridAt(Vector *position, GridEntityDesc *desc, Entity *s rubbleLeft = 4; do { uVar4 = Random(); - local_58 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + local_58 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 360.0 * 0.017453292; local_4c = sin(local_58); local_60 = cos(local_58); local_58 = local_60 * 12.0; local_5c = (Entity *)(local_4c * 12.0); uVar4 = Random(); - spreadFactor = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + spreadFactor = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10; rubblePos.y = spreadFactor * (float)local_5c + position->y; rubblePos.x = spreadFactor * local_58 + position->x; @@ -8819,14 +8819,14 @@ void Entity::DestroyRockGridAt(Vector *position, GridEntityDesc *desc, Entity *s } else { uVar4 = Random(); - local_4c = (float)(uVar4 % (uint)local_60); + local_4c = (float)(uVar4 % GHIDRA_UINT(local_60)); } if (0xf < *(uint *)(anim + 0x14)) { anim = *(byte **)anim; } isAnimSet = ((ANM2 *)(&pEVar2->_sprite))->ANM2::SetAnimation(anim,1); if (((isAnimSet != 0) && ((pEVar2->_sprite)._animState._animData != (void *)0x0)) && - (((AnimationState *)(&(pEVar2->_sprite)._animState))->AnimationState::SetFrameFloat((float)(int)local_4c), + (((AnimationState *)(&(pEVar2->_sprite)._animState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(local_4c)), (pEVar2->_sprite)._animState._animData != (void *)0x0)) { (pEVar2->_sprite)._animState._isPlaying = 0; } @@ -8882,7 +8882,7 @@ LAB_0070c1f8: if ((source->_flags & 0x20000000) == 0) goto LAB_0070c213; local_48 = 2; LAB_0070c21e: - pVVar3 = (Vector *)(*(uint *)((int)&source->_flags + 4) & 0x400000); + pVVar3 = (Vector *)(*(uint *)(GHIDRA_INT(&source->_flags) + 4) & 0x400000); if (pVVar3 != (Vector *)0x0) { uVar1 = 4; goto LAB_0070c239; @@ -8986,7 +8986,7 @@ undefined4 Entity::IsVulnerableEnemy_lua(void *param_1) puStack_c = &LAB_00b03acd; local_10 = ExceptionList; ExceptionList = &local_10; - lua_pushvalue(param_1,2,__security_cookie ^ (int)register0x00000010 - 4U); + lua_pushvalue(param_1,2,__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); sourceLuaRef = param_1; sourceRef = luaL_ref(param_1,0xfff0b9d8); local_8 = 0; @@ -9025,7 +9025,7 @@ void Entity::ReleaseLuaRef(Entity *entity) puStack_c = &LAB_00b04530; local_10 = ExceptionList; - uStack_40 = __security_cookie ^ (int)register0x00000010 - 4U; + uStack_40 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; local_14 = (undefined1 *)&uStack_40; ExceptionList = &local_10; callbackId = 0x43; diff --git a/src/game/entity_bomb.cpp b/src/game/entity_bomb.cpp index 0f5b1e4..8866e6b 100644 --- a/src/game/entity_bomb.cpp +++ b/src/game/entity_bomb.cpp @@ -21,13 +21,13 @@ BitSet128 * Entity_Bomb::Flags(BitSet128 *outResult) undefined4 uVar2; qword qVar3; - uVar1 = *(undefined4 *)((int)&(this->_tearFlags)._l + 4); + uVar1 = *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); qVar3 = (this->_tearFlags)._h; - uVar2 = *(undefined4 *)((int)&(this->_tearFlags)._h + 4); - *(int *)&outResult->_l = (int)(this->_tearFlags)._l; - *(undefined4 *)((int)&outResult->_l + 4) = uVar1; - *(int *)&outResult->_h = (int)qVar3; - *(undefined4 *)((int)&outResult->_h + 4) = uVar2; + uVar2 = *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); + *(int *)&outResult->_l = GHIDRA_INT((this->_tearFlags)._l); + *(undefined4 *)(GHIDRA_INT(&outResult->_l) + 4) = uVar1; + *(int *)&outResult->_h = GHIDRA_INT(qVar3); + *(undefined4 *)(GHIDRA_INT(&outResult->_h) + 4) = uVar2; return outResult; } @@ -108,16 +108,16 @@ void Entity_Bomb::Init(int type, int variant, int subType, uint initSeed) this->_parentCollisionCooldown = 4; this->_isFetus = 0; *(undefined4 *)&(this->_tearFlags)._l = 0; - *(undefined4 *)((int)&(this->_tearFlags)._l + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) = 0; *(undefined4 *)&(this->_tearFlags)._h = 0; - *(undefined4 *)((int)&(this->_tearFlags)._h + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) = 0; this->_prismTouched = 0; this->_bounceCount = 0; this->_fallSpeed = 0.0; this->_radiusMultiplier = 1.0; this->_stickyTarget = (EntityPtr)0x0; if (this->_config != (void *)0x0) { - ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)((int)this->_config + 0x74),1); + ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)(GHIDRA_INT(this->_config) + 0x74),1); } (this->_hitList)._end = (this->_hitList)._begin; variantLocal = this->_variant; @@ -136,7 +136,7 @@ void Entity_Bomb::Init(int type, int variant, int subType, uint initSeed) isLess = bVar2 < *expectedAnimName; if (bVar2 != *expectedAnimName) { LAB_006a2260: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_006a2265; } if (bVar2 == 0) break; @@ -182,13 +182,13 @@ LAB_006a2265: layerName._size = 0; } else { - ((std::string *)(layerName._buf))->std::string::string((void *)((int)pLVar4->_layerData + 8)); + ((std::string *)(layerName._buf))->std::string::string((void *)(GHIDRA_INT(pLVar4->_layerData) + 8)); } uVar3 = layerName._capacity; - flagsHi = layerName._buf._0_4_; + flagsHi = (*(undefined4 *)((char *)&(layerName._buf) + 0x0)); a = &layerName; if (0xf < layerName._capacity) { - a = (std_string *)layerName._buf._0_4_; + a = (*(undefined4 *)((char *)&((std_string *)layerName._buf) + 0x0)); } bVar2 = str_eq((byte *)a,layerName._size,&DAT_00b1d57c,4); if (0xf < uVar3) { @@ -197,7 +197,7 @@ LAB_006a2265: if (0xfff < size) { ptr = *(void **)(flagsHi + -4); size = uVar3 + 0x24; - if (0x1f < (flagsHi - (int)ptr) - 4U) { + if (0x1f < (flagsHi - GHIDRA_INT(ptr)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -236,9 +236,9 @@ LAB_006a2468: this->_rocketAngle = 0.0; this->_isSkipNextUpdate = 0; if ((this->_variant == 0x13) || (this->_variant == 0x14)) { - flagsHi = *(undefined4 *)((int)&this->_flags + 4); - *(uint *)&this->_flags = (uint)this->_flags | 0x4000000; - *(undefined4 *)((int)&this->_flags + 4) = flagsHi; + flagsHi = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); + *(uint *)&this->_flags = GHIDRA_UINT(this->_flags) | 0x4000000; + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = flagsHi; (this->_posOffset).y = -14.0; } FUN_00861ea0(this); @@ -323,18 +323,18 @@ void Entity_Bomb::Update() code *takeDamage; EntityPtr tmpEntity; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00afa186; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; if (this->_isSkipNextUpdate != 0) { this->_isSkipNextUpdate = 0; return; } ExceptionList = &local_1c; bomb = this; - puVar3 = (undefined1 *)((int)register0x00000010 + -4); + puVar3 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); if (this->_loadCostumes != 0) { update_sparks(this,local_24); puVar3 = puStack_20; @@ -343,8 +343,8 @@ void Entity_Bomb::Update() local_80 = (Entity_Player *)&this->_tearFlags; pBVar5 = BitSet128::operator_and ((BitSet128 *)&local_c0,(BitSet128 *)local_80,&g_tearFlagHydrobounce); - if (((int)pBVar5->_l == 0 && *(int *)((int)&pBVar5->_l + 4) == 0) && - ((int)pBVar5->_h == 0 && *(int *)((int)&pBVar5->_h + 4) == 0)) { + if ((GHIDRA_INT(pBVar5->_l) == 0 && *(int *)(GHIDRA_INT(&pBVar5->_l) + 4) == 0) && + (GHIDRA_INT(pBVar5->_h) == 0 && *(int *)(GHIDRA_INT(&pBVar5->_h) + 4) == 0)) { isBouncy = '\0'; } else { @@ -573,7 +573,7 @@ LAB_006a2afe: bVar4 = ((BitSet128 *)(maskedFlags))->BitSet128::IsNonZero(); if (bVar4 != 0) { VStack_98.x = (this->_velocity).y; - VStack_98.y = (float)((uint)(this->_velocity).x ^ uVar6); + VStack_98.y = (float)(GHIDRA_UINT((this->_velocity).x) ^ uVar6); ((Vector *)(&VStack_98))->Vector::Normalize(); local_80 = (Entity_Player *) sin((float)g_game->_frameCount * 0.7 + @@ -667,17 +667,17 @@ LAB_006a2afe: } } pBVar5 = BitSet128::operator_and((BitSet128 *)&local_c0,pBVar5,&g_tearFlagBurn); - if (((int)pBVar5->_l != 0 || *(int *)((int)&pBVar5->_l + 4) != 0) || - ((int)pBVar5->_h != 0 || *(int *)((int)&pBVar5->_h + 4) != 0)) { + if ((GHIDRA_INT(pBVar5->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_l) + 4) != 0) || + (GHIDRA_INT(pBVar5->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_h) + 4) != 0)) { if (this->_spawnerType == 1) { EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)&local_c0,&this->_pos, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)&local_c0,&this->_pos, this->_size,8); local_14 = 0; local_84 = (undefined1 *)0x0; if ((undefined1 *)local_c0._shift3 != (undefined1 *)0x0) { do { - spawned = *(Entity_Player **)(local_c0._shift1 + (int)local_84 * 4); + spawned = *(Entity_Player **)(local_c0._shift1 + GHIDRA_INT(local_84) * 4); local_80 = spawned; bVar4 = ((Entity *)((Entity *)spawned))->Entity::IsVulnerableEnemy((Entity *)0x0); if ((bVar4 != 0) && @@ -689,17 +689,17 @@ LAB_006a2afe: (*takeDamage)(0x41800000,2,0,&sourceRef,0x1e); } local_84 = local_84 + 1; - } while (local_84 < (uint)local_c0._shift3); + } while (local_84 < GHIDRA_UINT(local_c0._shift3)); } local_14 = 0xffffffff; ((EntityList_Query *)(&local_c0))->EntityList_Query::~EntityList_Query(); } else { local_84 = (undefined1 *)0x0; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { - local_80 = ((Game *)(g_game))->Game::GetPlayer((uint)local_84); + local_80 = ((Game *)(g_game))->Game::GetPlayer(GHIDRA_UINT(local_84)); if ((local_80 != (Entity_Player *)0x0) && (fVar16 = (local_80->_pos).y - (this->_pos).y, fVar10 = (local_80->_pos).x - (this->_pos).x, @@ -712,15 +712,15 @@ LAB_006a2afe: local_84 = local_84 + 1; } while (local_84 < (undefined1 *) - ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2)); } } } pBVar5 = &this->_tearFlags; maskedFlags = BitSet128::operator_and((BitSet128 *)&local_c0,pBVar5,&g_tearFlagOccult); - if (((((int)maskedFlags->_l == 0 && *(int *)((int)&maskedFlags->_l + 4) == 0) && - ((int)maskedFlags->_h == 0 && *(int *)((int)&maskedFlags->_h + 4) == 0)) || + if ((((GHIDRA_INT(maskedFlags->_l) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) == 0) && + (GHIDRA_INT(maskedFlags->_h) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) == 0)) || (local_88 = this->_parent, local_88 == (EntityPtr)0x0)) || (*(int *)((char *)local_88 + 0x28) != 1)) { LAB_006a34c6: @@ -756,11 +756,11 @@ LAB_006a34c6: } maskedFlags = BitSet128::operator_and((BitSet128 *)&local_c0,pBVar5,&g_tearFlagBoomerang); bVar4 = ((BitSet128 *)(maskedFlags))->BitSet128::IsNonZero(); - fVar10 = auVar13._0_4_; + fVar10 = (*(undefined4 *)((char *)&(auVar13) + 0x0)); if (bVar4 == 0) { maskedFlags = BitSet128::operator_and((BitSet128 *)&local_c0,pBVar5,&g_tearFlagHoming); bVar4 = ((BitSet128 *)(maskedFlags))->BitSet128::IsNonZero(); - fVar10 = auVar13._0_4_; + fVar10 = (*(undefined4 *)((char *)&(auVar13) + 0x0)); if (bVar4 == 0) { this->_friction = 0.8; } @@ -814,26 +814,26 @@ LAB_006a34c6: ((Entity *)((Entity *)this))->Entity::Update(); if ((this->_variant == 0x13) || (this->_variant == 0x14)) { maskedFlags = BitSet128::operator_and((BitSet128 *)&local_c0,pBVar5,&g_tearFlagBoomerang); - if ((((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) && + if (((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) && (tmpEntity = this->_parent, tmpEntity != (EntityPtr)0x0)) { fVar10 = atan2f(*(float *)((char *)tmpEntity + 0x340) - (this->_pos).y, *(float *)((char *)tmpEntity + 0x33c) - (this->_pos).x); fVar10 = normalize_angle_degrees(fVar10 * 57.295776 - this->_rocketAngle); fVar16 = (this->_rocketSpeed - 1.0) / 9.0; - auVar13 = ZEXT416((uint)fVar16); + auVar13 = ZEXT416(GHIDRA_UINT(fVar16)); if (fVar16 <= 0.0) { auVar13 = ZEXT816(0); } - if (1.0 <= auVar13._0_4_) { - auVar13._0_4_ = 0x3f800000; + if (1.0 <= (*(undefined4 *)((char *)&(auVar13) + 0x0))) { + (*(undefined4 *)((char *)&(auVar13) + 0x0)) = 0x3f800000; } this->_rocketAngle = - (auVar13._0_4_ * 0.5 + 0.0) * fVar10 * this->_speedMultiplier + this->_rocketAngle; + ((*(undefined4 *)((char *)&(auVar13) + 0x0)) * 0.5 + 0.0) * fVar10 * this->_speedMultiplier + this->_rocketAngle; } pBVar5 = BitSet128::operator_and((BitSet128 *)&local_c0,pBVar5,&g_tearFlagHoming); - if (((int)pBVar5->_l != 0 || *(int *)((int)&pBVar5->_l + 4) != 0) || - ((int)pBVar5->_h != 0 || *(int *)((int)&pBVar5->_h + 4) != 0)) { + if ((GHIDRA_INT(pBVar5->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_l) + 4) != 0) || + (GHIDRA_INT(pBVar5->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_h) + 4) != 0)) { ((RNG *)(&local_c0))->RNG::game_constructor(this->_initSeed,0xe); fVar10 = ((RNG *)(&local_c0))->RNG::RandomFloat(); local_88 = (EntityPtr)this->_rocketSpeed; @@ -852,7 +852,7 @@ LAB_006a34c6: local_88 = (EntityPtr)(fVar10 + 0.0); if ((this->_target == (EntityPtr)0x0) || (*(char *)((char *)this->_target + 0x173) != '\0')) { EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)&local_c0, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)&local_c0, &this->_pos,256.0,0xffffffff); local_14 = 1; local_ac = (EntityPtr)0x0; @@ -860,7 +860,7 @@ LAB_006a34c6: local_80 = (Entity_Player *)0x0; if ((undefined1 *)local_c0._shift3 != (undefined1 *)0x0) { do { - tmpEntity = *(EntityPtr *)(local_c0._shift1 + (int)local_80 * 4); + tmpEntity = *(EntityPtr *)(local_c0._shift1 + GHIDRA_INT(local_80) * 4); bVar4 = ((Entity *)((Entity *)tmpEntity))->Entity::IsVulnerableEnemy((Entity *)0x0); if (bVar4 != 0) { if (this->_spawnerEntity != (EntityPtr)0x0) { @@ -868,7 +868,7 @@ LAB_006a34c6: if (bVar4 != 0) goto LAB_006a39af; } local_cc.y = (this->_pos).x; - local_8c = ((Vector *)((int)tmpEntity + 0x33c))->x - local_cc.y; + local_8c = ((Vector *)(GHIDRA_INT(tmpEntity) + 0x33c))->x - local_cc.y; VStack_98.y = (this->_pos).y; local_84 = (undefined1 *)(*(float *)((char *)tmpEntity + 0x340) - VStack_98.y); fVar10 = sqrtf((float)local_84 * (float)local_84 + local_8c * local_8c); @@ -882,7 +882,7 @@ LAB_006a34c6: local_dc = (undefined1 *)(fVar10 * local_8c + (float)local_dc * (float)local_84); if (0.2 < (float)local_dc) { fVar10 = VStack_98.y - *(float *)((char *)tmpEntity + 0x340); - fVar16 = local_cc.y - ((Vector *)((int)tmpEntity + 0x33c))->x; + fVar16 = local_cc.y - ((Vector *)(GHIDRA_INT(tmpEntity) + 0x33c))->x; fVar10 = sqrtf(fVar10 * fVar10 + fVar16 * fVar16); fVar10 = fVar10 * (1.0 - (float)local_dc); if (fVar10 < local_a4) { @@ -894,7 +894,7 @@ LAB_006a34c6: LAB_006a39af: tmpEntity = local_ac; local_80 = (Entity_Player *)&(*(undefined1 *)((char *)(local_80) + 0x1)); - } while (local_80 < (uint)local_c0._shift3); + } while (local_80 < GHIDRA_UINT(local_c0._shift3)); if (local_ac != (EntityPtr)0x0) { if (this->_target != (EntityPtr)0x0) { VStack_98.y = (float)&this->_target; @@ -919,16 +919,16 @@ LAB_006a39af: } } } - auVar11._0_12_ = ZEXT812(0xbf800000); - auVar11._12_4_ = 0; - local_ac = auVar11._0_4_; + (*(undefined1 *)((char *)&(auVar11) + 0x0)) = ZEXT812(0xbf800000); + (*(undefined4 *)((char *)&(auVar11) + 0xc)) = 0; + local_ac = (*(undefined4 *)((char *)&(auVar11) + 0x0)); if (((this->_isFetus != 0) && (this->_parent != (EntityPtr)0x0)) && ((pBVar5 = BitSet128::operator_and((BitSet128 *)&local_c0,&this->_tearFlags,&g_tearFlagOrbit), - (int)pBVar5->_l != 0 || *(int *)((int)&pBVar5->_l + 4) != 0 || - ((int)pBVar5->_h != 0 || *(int *)((int)&pBVar5->_h + 4) != 0)))) { + GHIDRA_INT(pBVar5->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_l) + 4) != 0 || + (GHIDRA_INT(pBVar5->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_h) + 4) != 0)))) { bVar4 = IsRocket(this); if (bVar4 == 0) { - local_88 = (EntityPtr)auVar11._0_4_; + local_88 = (*(undefined4 *)((char *)&((EntityPtr)auVar11) + 0x0)); if ((this->_bombIndex & 1) == 0) { local_88 = (EntityPtr)0x3f800000; } @@ -958,30 +958,30 @@ LAB_006a39af: fVar10 = 5.0; if (this->_spawnerType == 1) { pBVar5 = BitSet128::operator_and((BitSet128 *)&local_c0,&this->_tearFlags,&g_tearFlagHoming); - if (((int)pBVar5->_l != 0 || *(int *)((int)&pBVar5->_l + 4) != 0) || - ((int)pBVar5->_h != 0 || *(int *)((int)&pBVar5->_h + 4) != 0)) { + if ((GHIDRA_INT(pBVar5->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_l) + 4) != 0) || + (GHIDRA_INT(pBVar5->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_h) + 4) != 0)) { if (this->_target == (EntityPtr)0x0) { VStack_98.x = (this->_velocity).x * fVar10 + (this->_pos).x; VStack_98.y = (this->_velocity).y * fVar10 + (this->_pos).y; EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)local_e8,&VStack_98, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)local_e8,&VStack_98, 150.0,8); local_14 = 3; local_84 = (undefined1 *)0x0; if (local_dc != (undefined1 *)0x0) { do { - tmpEntity = *(EntityPtr *)(local_e8._4_4_ + (int)local_84 * 4); + tmpEntity = *(EntityPtr *)((*(undefined4 *)((char *)&(local_e8) + 0x4)) + GHIDRA_INT(local_84) * 4); bVar4 = ((Entity *)((Entity *)tmpEntity))->Entity::IsVulnerableEnemy((Entity *)0x0); if (((bVar4 != 0) && (((this->_spawnerEntity == (EntityPtr)0x0 || (bVar4 = Entity::IsDescendantOf ((Entity *)this->_spawnerEntity, - *(Entity **)(local_e8._4_4_ + (int)local_84 * 4)), bVar4 == 0) + *(Entity **)((*(undefined4 *)((char *)&(local_e8) + 0x4)) + GHIDRA_INT(local_84) * 4)), bVar4 == 0) ) && ((*(uint *)((char *)tmpEntity + 0x168) & 0x20000010) == 0)))) && ((uVar6 = Random(), (uVar6 & 1) != 0 && (bVar4 = ((Entity *)((Entity *)this))->Entity::IsFrame(5,this->_index), bVar4 != 0)))) { local_cc.y = *(float *)((char *)tmpEntity + 0x340); - local_cc.x = ((Vector *)((int)tmpEntity + 0x33c))->x; + local_cc.x = ((Vector *)(GHIDRA_INT(tmpEntity) + 0x33c))->x; bVar4 = ((Room *)(g_game->_room))->Room::CheckLine(&this->_pos,&local_cc,1,0,0,0,(Vector *)0x0); if (bVar4 != 0) { if (this->_target != (EntityPtr)0x0) { @@ -998,7 +998,7 @@ LAB_006a39af: local_14 = 0xffffffff; if (local_e8[0] == '\0') { local_14 = 4; - tracked_alloc(1,(void *)local_e8._4_4_,0); + tracked_alloc(1,(*(undefined4 *)((char *)&((void *)local_e8) + 0x4)),0); local_14 = 0xffffffff; } } @@ -1017,17 +1017,17 @@ LAB_006a39af: if ((this->_dead == 0) && (((pBVar5 = BitSet128::operator_and ((BitSet128 *)&local_c0,&this->_tearFlags,&g_tearFlagCreepTrail), - (int)pBVar5->_l != 0 || *(int *)((int)&pBVar5->_l + 4) != 0 || - ((int)pBVar5->_h != 0 || *(int *)((int)&pBVar5->_h + 4) != 0)) && + GHIDRA_INT(pBVar5->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_l) + 4) != 0 || + (GHIDRA_INT(pBVar5->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_h) + 4) != 0)) && (bVar4 = ((Entity *)((Entity *)this))->Entity::IsFrame(7,0), bVar4 != 0)))) { if (*(int *)&g_game->_deathmatchManager < 2) { auVar12 = ZEXT812(0x40c00000); fVar10 = (this->_explosionDamage - 30.0) / 3.0; - if (auVar12._0_4_ <= fVar10) { - auVar12._4_8_ = auVar12._4_8_; - auVar12._0_4_ = fVar10; + if ((*(undefined4 *)((char *)&(auVar12) + 0x0)) <= fVar10) { + (*(undefined8 *)((char *)&(auVar12) + 0x4)) = (*(undefined8 *)((char *)&(auVar12) + 0x4)); + (*(undefined4 *)((char *)&(auVar12) + 0x0)) = fVar10; } - local_80 = auVar12._0_4_; + local_80 = (*(undefined4 *)((char *)&(auVar12) + 0x0)); } else { local_80 = (Entity_Player *)0x40a00000; @@ -1041,11 +1041,11 @@ LAB_006a39af: (Entity *)this->_spawnerEntity,0,uVar6); effect = (int *)__RTDynamicCast(spawned,uVar17,pTVar18,pTVar19,uVar20); uVar6 = Random(); - fVar16 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar16 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 0.6 + 0.3; fVar10 = fVar16 * g_vectorOne.x; - effect[0x3a] = (int)(fVar16 * g_vectorOne.y); - effect[0x39] = (int)fVar10; + effect[0x3a] = GHIDRA_INT((fVar16 * g_vectorOne.y)); + effect[0x39] = GHIDRA_INT(fVar10); uVar17 = ((Color *)(0x3f800000))->Color::Color(0,100,0); (**(code **)(*effect + 0x3c))(uVar17,0xffffffff,0xff,0,1); (**(code **)(*effect + 0x40))(local_80); @@ -1057,11 +1057,11 @@ LAB_006a39af: if (2 < iVar7) { iVar7 = effect[0x117]; fVar10 = 2.0; - effect[0x117] = (int)((float)iVar7 * 1.5); - effect[0x118] = (int)((float)iVar7 * 1.5); + effect[0x117] = GHIDRA_INT(((float)iVar7 * 1.5)); + effect[0x118] = GHIDRA_INT(((float)iVar7 * 1.5)); } - effect[0x3a] = (int)(fVar10 * (float)effect[0x3a]); - effect[0x39] = (int)(fVar10 * (float)effect[0x39]); + effect[0x3a] = GHIDRA_INT((fVar10 * (float)effect[0x3a])); + effect[0x39] = GHIDRA_INT((fVar10 * (float)effect[0x39])); } effect[0xd] = this->_spawnerType; effect[0xe] = this->_spawnerVariant; @@ -1081,14 +1081,14 @@ LAB_006a39af: } pBVar5 = &this->_tearFlags; maskedFlags = BitSet128::operator_and((BitSet128 *)&local_c0,pBVar5,&g_tearFlagSticky); - if ((((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) && + if (((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) && (tmpEntity = this->_stickyTarget, tmpEntity != (EntityPtr)0x0)) { *(float *)((char *)tmpEntity + 0x360) = *(float *)((char *)tmpEntity + 0x360) * 0.9; *(float *)((char *)tmpEntity + 0x364) = *(float *)((char *)tmpEntity + 0x364) * 0.9; } if (this->_explosionCountdown1 < 1) { - local_80 = (Entity_Player *)((int)spawner + 0x1508); + local_80 = (Entity_Player *)(GHIDRA_INT(spawner) + 0x1508); LAB_006a4412: if (((this->_isFetus != 0) || (spawner == (EntityPtr)0x0)) || ((bVar4 = ((Entity_Player *)((Entity_Player *)spawner))->Entity_Player::HasCollectible(0x89,0), bVar4 == 0 || @@ -1096,14 +1096,14 @@ LAB_006a4412: bVar4 != 0 || (this->_spawnerType != 1)))))) { BVar1 = *pBVar5; if ((this->_variant == 0x11) || (_local_a0 = BVar1, this->_variant == 0x14)) { - local_a0._0_4_ = BVar1._l._0_4_; - local_a0._4_4_ = BVar1._l._4_4_; - local_a0._4_4_ = local_a0._4_4_ | g_tearFlagGigaBomb._l._4_4_; - local_a0._0_4_ = local_a0._0_4_ | (uint)g_tearFlagGigaBomb._l; + (*(undefined4 *)((char *)&(local_a0) + 0x0)) = (*(undefined4 *)((char *)&(BVar1._l) + 0x0)); + (*(undefined4 *)((char *)&(local_a0) + 0x4)) = (*(undefined4 *)((char *)&(BVar1._l) + 0x4)); + (*(undefined4 *)((char *)&(local_a0) + 0x4)) = (*(undefined4 *)((char *)&(local_a0) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagGigaBomb._l) + 0x4)); + (*(undefined4 *)((char *)&(local_a0) + 0x0)) = (*(undefined4 *)((char *)&(local_a0) + 0x0)) | GHIDRA_UINT(g_tearFlagGigaBomb._l); VStack_98.x = (float)BVar1._h; - VStack_98.y = BVar1._h._4_4_; - VStack_98.x = (float)((uint)VStack_98.x | (uint)g_tearFlagGigaBomb._h); - VStack_98.y = (float)((uint)VStack_98.y | g_tearFlagGigaBomb._h._4_4_); + VStack_98.y = (*(undefined4 *)((char *)&(BVar1._h) + 0x4)); + VStack_98.x = (float)(GHIDRA_UINT(VStack_98.x) | GHIDRA_UINT(g_tearFlagGigaBomb._h)); + VStack_98.y = (float)(GHIDRA_UINT(VStack_98.y) | (*(undefined4 *)((char *)&(g_tearFlagGigaBomb._h) + 0x4))); this->_updateDelay = 5; } uVar6 = 4; @@ -1122,13 +1122,13 @@ LAB_006a4412: local_88 = (EntityPtr)0x0; } maskedFlags = BitSet128::operator_and((BitSet128 *)&local_c0,pBVar5,&g_tearFlagScatterBomb); - if (((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) { + if ((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) { uVar6 = Random(); local_84 = (undefined1 *)((uVar6 & 1) + 4); do { uVar6 = Random(); - fVar10 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar10 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 3.14; fVar10 = fVar10 + fVar10; VStack_98.y = fVar10; @@ -1137,8 +1137,8 @@ LAB_006a4412: uVar6 = Random(); tmpEntity = this->_spawnerEntity; rngResult = Random(); - scratchVec.x = (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * + scratchVec.x = (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 7.0 + 3.0; scratchVec.y = scratchVec.x * local_a4; scratchVec.x = scratchVec.x * (float)local_80; @@ -1148,11 +1148,11 @@ LAB_006a4412: pTVar19 = &IsaacRepentancePlus::Entity_Bomb::RTTI_Type_Descriptor; pTVar18 = &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor; uVar17 = 0; - fVar10 = (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * 15.0; + fVar10 = (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 15.0; scratchVec2.x = fVar10 * (float)local_80 + *(float *)local_cc.y; scratchVec2.y = fVar10 * local_a4 + (bomb->_pos).y; - spawned = ((Game *)(g_game))->Game::Spawn(bomb->_type,(uint)local_88,&scratchVec2,&scratchVec, + spawned = ((Game *)(g_game))->Game::Spawn(bomb->_type,GHIDRA_UINT(local_88),&scratchVec2,&scratchVec, (Entity *)tmpEntity,0,uVar6); spawned = (Entity *)__RTDynamicCast(spawned,uVar17,pTVar18,pTVar19,uVar20); *(byte *)&spawned[1]._spawnerVariant = this->_isFetus; @@ -1161,40 +1161,40 @@ LAB_006a4412: pBVar5 = ((BitSet128 *)(&g_tearFlagScatterBomb))->BitSet128::__bnot((BitSet128 *)&local_c0); pBVar5 = BitSet128::operator_and(&local_100,&this->_tearFlags,pBVar5); flagsLow = pBVar5->_l; - iVar7 = *(int *)((int)&pBVar5->_l + 4); + iVar7 = *(int *)(GHIDRA_INT(&pBVar5->_l) + 4); flagsHigh = pBVar5->_h; - iVar8 = *(int *)((int)&pBVar5->_h + 4); + iVar8 = *(int *)(GHIDRA_INT(&pBVar5->_h) + 4); spawned[1]._sprite._filename._buf[0xb] = '\x01'; - spawned[1]._type = (int)flagsLow; + spawned[1]._type = GHIDRA_INT(flagsLow); spawned[1]._variant = iVar7; - spawned[1]._subtype = (int)flagsHigh; + spawned[1]._subtype = GHIDRA_INT(flagsHigh); spawned[1]._spawnerType = iVar8; - spawned[1]._collisionIndex = (int)(this->_scale * 0.5); + spawned[1]._collisionIndex = GHIDRA_INT((this->_scale * 0.5)); spawned[1]._damageEvents._begin = (void *)(this->_explosionDamage * 0.5); *(float *)&(*(undefined1 *)((char *)&(spawned[1]) + 0x3c)) = this->_radiusMultiplier * 0.65; - local_dc = (undefined1 *)((uint)g_vectorOne.y ^ 0x80000000); - local_e8._8_4_ = -g_vectorOne.x; + local_dc = (undefined1 *)(GHIDRA_UINT(g_vectorOne.y) ^ 0x80000000); + (*(undefined4 *)((char *)&(local_e8) + 0x8)) = -g_vectorOne.x; ((Entity *)(spawned))->Entity::SetSize(spawned->_size * 0.5, (Vector)(CONCAT44(g_vectorOne.y,g_vectorOne.x) ^ 0x8000000080000000),-1); if ((spawned->_variant == 0x13) || (spawned->_variant == 0x14)) { uVar6 = Random(); spawned[1]._damageEvents._capacity = (void *)0x3fa66666; - fVar10 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar10 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 10.0; } else { uVar6 = Random(); - fVar10 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar10 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 5.0; } spawned[1]._damageEvents._end = (void *)(-3.0 - fVar10); (spawned->_posOffset).x = 0.0; (spawned->_posOffset).y = -3.0; uVar6 = ((RNG *)(&spawned->_dropRNG))->RNG::RandomInt(0xe); - *(uint *)&spawned->_flags = (uint)spawned->_flags | 0x4000000; - entityFlagsHi = (uint *)((int)&spawned->_flags + 4); + *(uint *)&spawned->_flags = GHIDRA_UINT(spawned->_flags) | 0x4000000; + entityFlagsHi = (uint *)(GHIDRA_INT(&spawned->_flags) + 4); *entityFlagsHi = *entityFlagsHi | 0x400; - local_84 = (undefined1 *)((int)local_84 + -1); + local_84 = (undefined1 *)(GHIDRA_INT(local_84) + -1); *(uint *)(spawned + 1) = uVar6 + 10; *(uint *)&(*(undefined1 *)((char *)&(spawned[1]) + 0x4)) = uVar6 + 10; } while (local_84 != (undefined1 *)0x0); @@ -1202,16 +1202,16 @@ LAB_006a4412: local_84 = (undefined1 *)0x0; } pBVar5 = BitSet128::operator_and(&local_100,pBVar5,&g_tearFlagGhostBomb); - if (((int)pBVar5->_l != 0 || *(int *)((int)&pBVar5->_l + 4) != 0) || - ((int)pBVar5->_h != 0 || *(int *)((int)&pBVar5->_h + 4) != 0)) { + if ((GHIDRA_INT(pBVar5->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_l) + 4) != 0) || + (GHIDRA_INT(pBVar5->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_h) + 4) != 0)) { if (0.75 < this->_scale) { uVar6 = Random(); manager = g_manager; local_80 = (Entity_Player *)&DAT_0000002c; - VStack_98.y = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) + VStack_98.y = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 0.4 + 2.0; seed_fart_sound_override((int *)&local_80); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_80,0.7,2,0,VStack_98.y,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_80),0.7,2,0,VStack_98.y,0.0); local_c0._seed = this->_initSeed; local_c0._shift1 = 2; local_c0._shift2 = 7; @@ -1243,7 +1243,7 @@ LAB_006a4412: if ((spawned->_sprite)._animState._animData != (void *)0x0) { AnimationState::AdvancePosition (&(spawned->_sprite)._animState, - *(int *)((int)(spawned->_sprite)._animState._animData + 0x30) + -1); + *(int *)(GHIDRA_INT((spawned->_sprite)._animState._animData) + 0x30) + -1); } fVar10 = this->_scale + this->_scale; } @@ -1260,8 +1260,8 @@ LAB_006a4412: if (this->_isFetus == 0) { pBVar5 = BitSet128::operator_and(&local_110,&this->_tearFlags,&g_tearFlagSticky); tmpEntity = spawner; - if ((((int)pBVar5->_l != 0 || *(int *)((int)&pBVar5->_l + 4) != 0) || - ((int)pBVar5->_h != 0 || *(int *)((int)&pBVar5->_h + 4) != 0)) && + if (((GHIDRA_INT(pBVar5->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_l) + 4) != 0) || + (GHIDRA_INT(pBVar5->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_h) + 4) != 0)) && (stickyTarget = this->_stickyTarget, stickyTarget != (EntityPtr)0x0)) { *(uint *)((char *)stickyTarget + 0x168) = *(uint *)((char *)stickyTarget + 0x168) | 0x400000; *(undefined4 *)((char *)stickyTarget + 0x16c) = *(undefined4 *)((char *)stickyTarget + 0x16c); @@ -1270,7 +1270,7 @@ LAB_006a4412: (bVar4 = ((Entity_Player *)((Entity_Player *)spawner))->Entity_Player::HasTrinket(0x49,0), bVar4 != 0)) { trinketRng = ((Entity_Player *)((Entity_Player *)tmpEntity))->Entity_Player::GetTrinketRNG(0x49); iVar7 = ((Entity_Player *)((Entity_Player *)spawner))->Entity_Player::GetTrinketMultiplier(0x49); - uVar6 = ((RNG *)(trinketRng))->RNG::RandomInt((uint)(10 / (longlong)iVar7)); + uVar6 = ((RNG *)(trinketRng))->RNG::RandomInt(GHIDRA_UINT((10 / (longlong)iVar7))); if (uVar6 == 0) { uVar6 = Random(); ((Game *)(g_game))->Game::Spawn(5,0x28,&this->_pos,&g_vectorZero,(Entity *)0x0,1,uVar6); @@ -1279,8 +1279,8 @@ LAB_006a4412: } else { pBVar5 = BitSet128::operator_and(&local_100,&this->_tearFlags,&g_tearFlagPersistent); - if (((int)pBVar5->_l != 0 || *(int *)((int)&pBVar5->_l + 4) != 0) || - ((int)pBVar5->_h != 0 || *(int *)((int)&pBVar5->_h + 4) != 0)) { + if ((GHIDRA_INT(pBVar5->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_l) + 4) != 0) || + (GHIDRA_INT(pBVar5->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_h) + 4) != 0)) { uVar6 = Random(); uVar20 = 0; pTVar19 = &IsaacRepentancePlus::Entity_Bomb::RTTI_Type_Descriptor; @@ -1310,8 +1310,8 @@ LAB_006a4412: *(uint *)(iVar7 + 0x16c) = *(uint *)(iVar7 + 0x16c) | 0x400; } pBVar5 = BitSet128::operator_and(&local_100,&this->_tearFlags,&g_tearFlagSplit); - if (((int)pBVar5->_l != 0 || *(int *)((int)&pBVar5->_l + 4) != 0) || - ((int)pBVar5->_h != 0 || *(int *)((int)&pBVar5->_h + 4) != 0)) { + if ((GHIDRA_INT(pBVar5->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_l) + 4) != 0) || + (GHIDRA_INT(pBVar5->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_h) + 4) != 0)) { local_84 = (undefined1 *)(this->_velocity).y; local_8c = -(this->_velocity).x; fVar10 = sqrtf((float)local_84 * (float)local_84 + local_8c * local_8c); @@ -1329,7 +1329,7 @@ LAB_006a4412: scratchVec2.y = (float)local_ac * local_8c * 5.0; VStack_98.x = this->_size * (float)local_84 * (float)local_ac + (this->_pos).x; VStack_98.y = this->_size * local_8c * (float)local_ac + (this->_pos).y; - spawned = ((Game *)(g_game))->Game::Spawn(4,(uint)local_88,&VStack_98,&scratchVec2, + spawned = ((Game *)(g_game))->Game::Spawn(4,GHIDRA_UINT(local_88),&VStack_98,&scratchVec2, (Entity *)this->_spawnerEntity,0,uVar6); iVar7 = __RTDynamicCast(spawned,uVar17,pTVar18,pTVar19,uVar20); *(int *)(iVar7 + 0x34) = this->_spawnerType; @@ -1338,14 +1338,14 @@ LAB_006a4412: pBVar5 = ((BitSet128 *)(&g_tearFlagSplit))->BitSet128::__bnot(&local_100); pBVar5 = BitSet128::operator_and((BitSet128 *)&local_c0,&this->_tearFlags,pBVar5); flagsLow = pBVar5->_l; - uVar17 = *(undefined4 *)((int)&pBVar5->_l + 4); + uVar17 = *(undefined4 *)(GHIDRA_INT(&pBVar5->_l) + 4); flagsHigh = pBVar5->_h; - uVar20 = *(undefined4 *)((int)&pBVar5->_h + 4); + uVar20 = *(undefined4 *)(GHIDRA_INT(&pBVar5->_h) + 4); *(uint *)(iVar7 + 0x168) = *(uint *)(iVar7 + 0x168) | 0x4000000; *(uint *)(iVar7 + 0x16c) = *(uint *)(iVar7 + 0x16c) | 0x400; - *(int *)(iVar7 + 0x438) = (int)flagsLow; + *(int *)(iVar7 + 0x438) = GHIDRA_INT(flagsLow); *(undefined4 *)(iVar7 + 0x43c) = uVar17; - *(int *)(iVar7 + 0x440) = (int)flagsHigh; + *(int *)(iVar7 + 0x440) = GHIDRA_INT(flagsHigh); *(undefined4 *)(iVar7 + 0x444) = uVar20; *(undefined1 *)(iVar7 + 0x463) = 1; *(undefined4 *)(iVar7 + 0x410) = 0xf; @@ -1355,10 +1355,10 @@ LAB_006a4412: } while ((float)local_ac <= 1.0); } pBVar5 = BitSet128::operator_and(&local_100,&this->_tearFlags,&g_tearFlagQuadsplit); - if (((int)pBVar5->_l != 0 || *(int *)((int)&pBVar5->_l + 4) != 0) || - ((int)pBVar5->_h != 0 || *(int *)((int)&pBVar5->_h + 4) != 0)) { + if ((GHIDRA_INT(pBVar5->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_l) + 4) != 0) || + (GHIDRA_INT(pBVar5->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_h) + 4) != 0)) { uVar6 = Random(); - fVar10 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar10 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 3.14; fVar10 = fVar10 + fVar10; VStack_98.y = fVar10; @@ -1377,7 +1377,7 @@ LAB_006a4412: uVar17 = 0; scratchVec.y = this->_size * local_8c + (this->_pos).y; scratchVec.x = this->_size * (float)local_84 + (this->_pos).x; - spawned = ((Game *)(g_game))->Game::Spawn(this->_type,(uint)local_88,&scratchVec,&scratchVec2, + spawned = ((Game *)(g_game))->Game::Spawn(this->_type,GHIDRA_UINT(local_88),&scratchVec,&scratchVec2, (Entity *)this->_spawnerEntity,0,uVar6); spawned = (Entity *)__RTDynamicCast(spawned,uVar17,pTVar18,pTVar19,uVar20); spawned->_spawnerType = this->_spawnerType; @@ -1386,25 +1386,25 @@ LAB_006a4412: pBVar5 = ((BitSet128 *)(&g_tearFlagQuadsplit))->BitSet128::__bnot((BitSet128 *)&local_c0); pBVar5 = BitSet128::operator_and(&local_110,&this->_tearFlags,pBVar5); flagsLow = pBVar5->_l; - iVar7 = *(int *)((int)&pBVar5->_l + 4); + iVar7 = *(int *)(GHIDRA_INT(&pBVar5->_l) + 4); flagsHigh = pBVar5->_h; - iVar8 = *(int *)((int)&pBVar5->_h + 4); + iVar8 = *(int *)(GHIDRA_INT(&pBVar5->_h) + 4); spawned[1]._sprite._filename._buf[0xb] = '\x01'; - spawned[1]._type = (int)flagsLow; + spawned[1]._type = GHIDRA_INT(flagsLow); spawned[1]._variant = iVar7; - spawned[1]._subtype = (int)flagsHigh; + spawned[1]._subtype = GHIDRA_INT(flagsHigh); spawned[1]._spawnerType = iVar8; - spawned[1]._collisionIndex = (int)(this->_scale * 0.5); + spawned[1]._collisionIndex = GHIDRA_INT((this->_scale * 0.5)); spawned[1]._damageEvents._begin = (void *)((float)spawned[1]._damageEvents._begin * 0.35); *(float *)&(*(undefined1 *)((char *)&(spawned[1]) + 0x3c)) = this->_radiusMultiplier * 0.5; - local_dc = (undefined1 *)((uint)g_vectorOne.y ^ 0x80000000); - local_e8._8_4_ = -g_vectorOne.x; + local_dc = (undefined1 *)(GHIDRA_UINT(g_vectorOne.y) ^ 0x80000000); + (*(undefined4 *)((char *)&(local_e8) + 0x8)) = -g_vectorOne.x; ((Entity *)(spawned))->Entity::SetSize(spawned->_size * 0.5, (Vector)(CONCAT44(g_vectorOne.y,g_vectorOne.x) ^ 0x8000000080000000),-1) ; - *(uint *)&spawned->_flags = (uint)spawned->_flags | 0x4000000; - entityFlagsHi = (uint *)((int)&spawned->_flags + 4); + *(uint *)&spawned->_flags = GHIDRA_UINT(spawned->_flags) | 0x4000000; + entityFlagsHi = (uint *)(GHIDRA_INT(&spawned->_flags) + 4); *entityFlagsHi = *entityFlagsHi | 0x400; *(undefined4 *)(spawned + 1) = 7; *(undefined4 *)&(*(undefined1 *)((char *)&(spawned[1]) + 0x4)) = 7; @@ -1444,7 +1444,7 @@ LAB_006a4412: (this->_spawnerEntity == spawner)) && ((this->_isFetus == 0 && (bVar4 = TemporaryEffects::HasCollectibleEffect - ((TemporaryEffects *)((int)spawner + 0x1508),0x89), bVar4 != 0)))) && + ((TemporaryEffects *)(GHIDRA_INT(spawner) + 0x1508),0x89), bVar4 != 0)))) && (bVar4 = ((Entity_Player *)((Entity_Player *)tmpEntity))->Entity_Player::HasCollectible(0x248,0), bVar4 != 0)) { Entity_Player::AddWisp((Entity_Player *)tmpEntity,0x89,&this->_pos,0,0); } @@ -1452,7 +1452,7 @@ LAB_006a4412: } else { if ((this->_spawnerType == 1) && (spawner != (EntityPtr)0x0)) { - local_80 = (Entity_Player *)((int)spawner + 0x1508); + local_80 = (Entity_Player *)(GHIDRA_INT(spawner) + 0x1508); bVar4 = ((TemporaryEffects *)((TemporaryEffects *)local_80))->TemporaryEffects::HasCollectibleEffect(0x89); if (bVar4 != 0) goto LAB_006a4412; } @@ -1461,8 +1461,8 @@ LAB_006a4412: this->_explosionCountdown1 = this->_explosionCountdown1 + -1; } pBVar5 = BitSet128::operator_and((BitSet128 *)&local_c0,pBVar5,&g_tearFlagAttractor); - if (((int)pBVar5->_l != 0 || *(int *)((int)&pBVar5->_l + 4) != 0) || - ((int)pBVar5->_h != 0 || *(int *)((int)&pBVar5->_h + 4) != 0)) { + if ((GHIDRA_INT(pBVar5->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_l) + 4) != 0) || + (GHIDRA_INT(pBVar5->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar5->_h) + 4) != 0)) { Game::AttractEntities(g_game,&this->_pos,(void *)0x0,(void *)0x0,10.0,250.0); } bVar4 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(0x3f); @@ -1558,7 +1558,7 @@ LAB_006a4412: if (bVar4 != 0) { local_80 = (Entity_Player *)0xab; seed_fart_sound_override((int *)&local_80); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_80,1.0,2,0,1.5,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_80),1.0,2,0,1.5,0.0); } } } @@ -1663,7 +1663,7 @@ LAB_006a4412: spawned->SetColor(extraout_EAX,0xffffffff,0xff,0,1); uVar6 = Random(); *(float *)(spawned[1]._sprite._animDefaultName._buf + 4) = - (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 10.0 + 2.0; uVar6 = Random(); iVar7 = uVar6 % 0xf + 0xf; @@ -1757,7 +1757,7 @@ void Entity_Bomb::Render(Vector *offset) costumeColor._colorize[3] = (this->_sprite)._color._colorize[3]; costumeColor._offset[0] = (this->_sprite)._color._offset[0]; costumeColor._offset[1] = (this->_sprite)._color._offset[1]; - ((Color *)(&costumeColor))->Color::__mul((ColorMod *)((int)layerFrame + 0x30)); + ((Color *)(&costumeColor))->Color::__mul((ColorMod *)(GHIDRA_INT(layerFrame) + 0x30)); costumeIndex = 0; do { if ((this->_bombCostumesSprites[costumeIndex]._loaded != 0) && @@ -1909,7 +1909,7 @@ void Entity_Bomb::update_sparks() ehState = 0xffffffff; puStack_18 = &LAB_00afa2e9; savedExceptionList = ExceptionList; - stackCookie = __security_cookie ^ (uint)(searchDir1 + 0x2c); + stackCookie = __security_cookie ^ GHIDRA_UINT((searchDir1 + 0x2c)); ExceptionList = &savedExceptionList; costumeSprite = this->_bombCostumesSprites; this->_hasCostumes = 0; @@ -1929,7 +1929,7 @@ void Entity_Bomb::update_sparks() local_1c0 = fVar15; std::set::find_node(local_1e0 + 4,&local_1c0); pEVar9 = bomb; - if ((local_1d4->_buf[0xd] != '\0') || (psVar8 = local_1d4, (int)fVar15 < (int)local_1d4->_size)) { + if ((local_1d4->_buf[0xd] != '\0') || (psVar8 = local_1d4, GHIDRA_INT(fVar15) < GHIDRA_INT(local_1d4->_size))) { psVar8 = *(std_string **)&(*(undefined1 *)((char *)(manager) + 0x2a514)); } if ((psVar8 == *(std_string **)&(*(undefined1 *)((char *)(manager) + 0x2a514))) || @@ -1975,7 +1975,7 @@ void Entity_Bomb::update_sparks() else { bVar3 = 0x31; } - sizeSuffix[0] = (byte ******)(uint)bVar3; + sizeSuffix[0] = (byte ******)GHIDRA_UINT(bVar3); } else { sizeSuffix[0] = (byte ******)0x30; @@ -1989,9 +1989,9 @@ void Entity_Bomb::update_sparks() spritePath = (void *)0x0; ehState = 2; _eh_vector_constructor_iterator_(costumePaths,0x18,5,FUN_0040c380,std::string::_Tidy_deallocate); - ehState._0_1_ = 3; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 3; _eh_vector_constructor_iterator_(&searchDirs,0x18,2,FUN_0040c380,std::string::_Tidy_deallocate); - ehState._0_1_ = 4; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 4; costumeEntryIdx = 0; costumeListBytes = *(int *)(local_1cc->_filename)._buf; costumeListBytes = *(int *)((local_1cc->_filename)._buf + 4) - costumeListBytes; @@ -2002,26 +2002,26 @@ void Entity_Bomb::update_sparks() pBVar14 = (BitSet128 *)(costumeEntryIdx * 0xe0 + costumeListBytes); costumeEntry = pBVar14; pBVar4 = BitSet128::operator_and((BitSet128 *)local_1e0,(BitSet128 *)local_1bc,pBVar14); - if ((((int)pBVar4->_l == (int)pBVar14->_l) && - (*(int *)((int)&pBVar4->_l + 4) == *(int *)((int)&pBVar14->_l + 4))) && - (((int)pBVar4->_h == (int)pBVar14->_h && - (((*(int *)((int)&pBVar4->_h + 4) == *(int *)((int)&pBVar14->_h + 4) && + if (((GHIDRA_INT(pBVar4->_l) == GHIDRA_INT(pBVar14->_l)) && + (*(int *)(GHIDRA_INT(&pBVar4->_l) + 4) == *(int *)(GHIDRA_INT(&pBVar14->_l) + 4))) && + ((GHIDRA_INT(pBVar4->_h) == GHIDRA_INT(pBVar14->_h) && + (((*(int *)(GHIDRA_INT(&pBVar4->_h) + 4) == *(int *)(GHIDRA_INT(&pBVar14->_h) + 4) && (pBVar4 = BitSet128::operator_and(&maskAnd,(BitSet128 *)local_1bc,pBVar14 + 1), - (int)pBVar4->_l == 0 && *(int *)((int)&pBVar4->_l + 4) == 0)) && - ((int)pBVar4->_h == 0 && *(int *)((int)&pBVar4->_h + 4) == 0)))))) { - if ((int)pBVar14[3]._l != 0) { + GHIDRA_INT(pBVar4->_l) == 0 && *(int *)(GHIDRA_INT(&pBVar4->_l) + 4) == 0)) && + (GHIDRA_INT(pBVar4->_h) == 0 && *(int *)(GHIDRA_INT(&pBVar4->_h) + 4) == 0)))))) { + if (GHIDRA_INT(pBVar14[3]._l) != 0) { local_1b8 = (std_string *)(pBVar14 + 2); srcLength = *(uint **)&pBVar14[3]._l; - if (0xf < *(uint *)((int)&pBVar14[3]._l + 4)) { + if (0xf < *(uint *)(GHIDRA_INT(&pBVar14[3]._l) + 4)) { local_1b8 = *(std_string **)local_1b8->_buf; } if (&DAT_0000000f < srcLength) { - uVar12 = (uint)srcLength | 0xf; + uVar12 = GHIDRA_UINT(srcLength) | 0xf; if (0x7fffffff < uVar12) { uVar12 = 0x7fffffff; } srcCopy = std::_Allocate(uVar12 + 1); - memcpy(srcCopy,local_1b8,(size_t)((int)srcLength + 1)); + memcpy(srcCopy,local_1b8,(size_t)(GHIDRA_INT(srcLength) + 1)); } else { srcCopy = *(byte *******)local_1b8->_buf; @@ -2031,10 +2031,10 @@ void Entity_Bomb::update_sparks() uVar12 = 0xf; } ppppppbVar6 = srcCopy; - ehState._0_1_ = 5; - local_1b4 = (uint *)((int)srcLength + -5); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; + local_1b4 = (uint *)(GHIDRA_INT(srcLength) + -5); tmpString._capacity = 0xf; - tmpString._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (void *)0x0; srcCopySize = srcLength; srcCopyCapacity = uVar12; if (srcLength < local_1b4) { @@ -2053,9 +2053,9 @@ LAB_006a7eb2: ppppppbVar5 = srcCopy; } tmpString._size = 5; - memmove(&tmpString,(byte *)((int)local_1b4 + (int)ppppppbVar5),5); + memmove(&tmpString,(byte *)(GHIDRA_INT(local_1b4) + GHIDRA_INT(ppppppbVar5)),5); tmpString._buf[5] = '\0'; - ehState._0_1_ = 6; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 6; ppppppbVar5 = (byte ******)&srcCopy; if (0xf < uVar12) { ppppppbVar5 = ppppppbVar6; @@ -2063,8 +2063,8 @@ LAB_006a7eb2: baseNameSize = 0; baseNameCapacity = 0xf; baseName[0] = (void *)0x0; - ((std::string *)((char *)baseName))->std::string::assign((byte *)ppppppbVar5,(uint)local_1b4); - ehState._0_1_ = 7; + ((std::string *)((char *)baseName))->std::string::assign((byte *)ppppppbVar5,GHIDRA_UINT(local_1b4)); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 7; ppppppbVar6 = (byte ******)sizeSuffix; if (0xf < sizeSuffixCapacity) { ppppppbVar6 = sizeSuffix[0]; @@ -2078,19 +2078,19 @@ LAB_006a7eb2: appendResult[4] = 0; appendResult[5] = 0xf; *(undefined1 *)appendResult = 0; - ehState._0_1_ = 8; - ((std::string *)(joinedPath._buf))->std::string::concat_move((int)local_1c0,&nameWithSuffix,&tmpString); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 8; + ((std::string *)(joinedPath._buf))->std::string::concat_move(GHIDRA_INT(local_1c0),&nameWithSuffix,&tmpString); if (0xf < spritePathCapacity) { uVar12 = spritePathCapacity + 1; pvVar7 = spritePath; if (0xfff < uVar12) { pvVar7 = *(void **)((char *)spritePath + -4); uVar12 = spritePathCapacity + 0x24; - if (0x1f < (uint)((int)spritePath + (-4 - (int)pvVar7))) goto LAB_006a7e25; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(spritePath) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_006a7e25; } operator_delete(pvVar7,uVar12); } - spritePath = (void *)joinedPath._buf._0_4_; + spritePath = (*(undefined4 *)((char *)&((void *)joinedPath._buf) + 0x0)); acStack_144[0] = joinedPath._buf[4]; acStack_144[1] = joinedPath._buf[5]; acStack_144[2] = joinedPath._buf[6]; @@ -2103,52 +2103,52 @@ LAB_006a7eb2: acStack_13c[1] = joinedPath._buf[0xd]; acStack_13c[2] = joinedPath._buf[0xe]; acStack_13c[3] = joinedPath._buf[0xf]; - ehState._0_1_ = 7; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 7; spritePathSize = joinedPath._size; spritePathCapacity = joinedPath._capacity; - if (0xf < nameWithSuffixSizeCapacity._4_4_) { - uVar12 = nameWithSuffixSizeCapacity._4_4_ + 1; + if (0xf < (*(undefined4 *)((char *)&(nameWithSuffixSizeCapacity) + 0x4))) { + uVar12 = (*(undefined4 *)((char *)&(nameWithSuffixSizeCapacity) + 0x4)) + 1; pvVar7 = nameWithSuffix; if (0xfff < uVar12) { pvVar7 = *(void **)((char *)nameWithSuffix + -4); - uVar12 = nameWithSuffixSizeCapacity._4_4_ + 0x24; - if (0x1f < (uint)((int)nameWithSuffix + (-4 - (int)pvVar7))) goto LAB_006a7e25; + uVar12 = (*(undefined4 *)((char *)&(nameWithSuffixSizeCapacity) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(nameWithSuffix) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_006a7e25; } operator_delete(pvVar7,uVar12); } - ehState._0_1_ = 6; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 6; if (0xf < baseNameCapacity) { uVar12 = baseNameCapacity + 1; pvVar7 = baseName[0]; if (0xfff < uVar12) { - pvVar7 = *(void **)((int)baseName[0] + -4); + pvVar7 = *(void **)(GHIDRA_INT(baseName[0]) + -4); uVar12 = baseNameCapacity + 0x24; - if (0x1f < (uint)((int)baseName[0] + (-4 - (int)pvVar7))) goto LAB_006a7e25; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(baseName[0]) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_006a7e25; } operator_delete(pvVar7,uVar12); } - ehState._0_1_ = 5; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; baseNameSize = 0; baseNameCapacity = 0xf; - baseName[0] = (void *)((uint)baseName[0] & 0xffffff00); + baseName[0] = (void *)(GHIDRA_UINT(baseName[0]) & 0xffffff00); if (0xf < tmpString._capacity) { uVar12 = tmpString._capacity + 1; - pvVar7 = (void *)tmpString._buf._0_4_; + pvVar7 = (*(undefined4 *)((char *)&((void *)tmpString._buf) + 0x0)); if (0xfff < uVar12) { - pvVar7 = *(void **)(tmpString._buf._0_4_ + -4); + pvVar7 = *(void **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar12 = tmpString._capacity + 0x24; - if (0x1f < (uint)(tmpString._buf._0_4_ + (-4 - (int)pvVar7))) goto LAB_006a7e25; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_006a7e25; } operator_delete(pvVar7,uVar12); } - ehState._0_1_ = 4; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 4; if (0xf < srcCopyCapacity) { uVar12 = srcCopyCapacity + 1; ppppppbVar6 = srcCopy; if (0xfff < uVar12) { ppppppbVar6 = (byte ******)srcCopy[-1]; uVar12 = srcCopyCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)srcCopy + (-4 - (int)ppppppbVar6))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(srcCopy) + (-4 - GHIDRA_INT(ppppppbVar6)))) goto LAB_006a7e25; } operator_delete(ppppppbVar6,uVar12); @@ -2157,7 +2157,7 @@ LAB_006a7eb2: } local_1b8 = costumePaths; slot = 0; - entryPathCapacity = (uint *)((int)&pBVar14[4]._h + 4); + entryPathCapacity = (uint *)(GHIDRA_INT(&pBVar14[4]._h) + 4); do { srcLength = (uint *)entryPathCapacity[-1]; if (srcLength != (uint *)0x0) { @@ -2166,12 +2166,12 @@ LAB_006a7eb2: local_1b4 = (uint *)*local_1b4; } if (&DAT_0000000f < srcLength) { - uVar12 = (uint)srcLength | 0xf; + uVar12 = GHIDRA_UINT(srcLength) | 0xf; if (0x7fffffff < uVar12) { uVar12 = 0x7fffffff; } srcCopy = std::_Allocate(uVar12 + 1); - memcpy(srcCopy,local_1b4,(size_t)((int)srcLength + 1)); + memcpy(srcCopy,local_1b4,(size_t)(GHIDRA_INT(srcLength) + 1)); } else { srcCopy = (byte ******)*local_1b4; @@ -2180,20 +2180,20 @@ LAB_006a7eb2: uStack_10c = local_1b4[3]; uVar12 = 0xf; } - ehState._0_1_ = 9; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 9; tmpString._capacity = 0xf; - tmpString._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (void *)0x0; srcCopySize = srcLength; srcCopyCapacity = uVar12; - if (srcLength < (uint *)((int)srcLength + -5)) goto LAB_006a7eb2; + if (srcLength < (uint *)(GHIDRA_INT(srcLength) + -5)) goto LAB_006a7eb2; ppppppbVar6 = (byte ******)&srcCopy; if (0xf < uVar12) { ppppppbVar6 = srcCopy; } tmpString._size = 5; - memmove(&tmpString,(byte *)((int)srcLength + -5 + (int)ppppppbVar6),5); + memmove(&tmpString,(byte *)(GHIDRA_INT(srcLength) + -5 + GHIDRA_INT(ppppppbVar6)),5); tmpString._buf[5] = '\0'; - ehState._0_1_ = 10; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 10; baseNameSize = 0; ppppppbVar6 = (byte ******)&srcCopy; if (0xf < uVar12) { @@ -2201,25 +2201,25 @@ LAB_006a7eb2: } baseNameCapacity = 0xf; baseName[0] = (void *)0x0; - ((std::string *)((char *)baseName))->std::string::assign((byte *)ppppppbVar6,(uint)((int)srcLength + -5)); - ehState._0_1_ = 0xb; + ((std::string *)((char *)baseName))->std::string::assign((byte *)ppppppbVar6,GHIDRA_UINT((GHIDRA_INT(srcLength) + -5))); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xb; ppppppbVar6 = (byte ******)sizeSuffix; if (0xf < sizeSuffixCapacity) { ppppppbVar6 = sizeSuffix[0]; } pvVar7 = ((std::string *)((char *)baseName))->std::string::append((byte *)ppppppbVar6,sizeSuffixSize); FUN_00417100(pvVar7); - ehState = CONCAT31(ehState._1_3_,0xc); - ((std::string *)(joinedPath._buf))->std::string::concat_move((int)local_1c0,&tmpPath,&tmpString); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),0xc); + ((std::string *)(joinedPath._buf))->std::string::concat_move(GHIDRA_INT(local_1c0),&tmpPath,&tmpString); psVar8 = local_1b8; if (local_1b8 != &joinedPath) { ((std::string *)(local_1b8->_buf))->std::string::_Tidy_deallocate(); - uVar2 = joinedPath._buf._0_4_; - joinedPath._buf._0_4_ = joinedPath._buf._0_4_ & 0xffffff00; + uVar2 = (*(undefined4 *)((char *)&(joinedPath._buf) + 0x0)); + (*(undefined4 *)((char *)&(joinedPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(joinedPath._buf) + 0x0)) & 0xffffff00; *(undefined4 *)psVar8->_buf = uVar2; - *(undefined4 *)(psVar8->_buf + 4) = joinedPath._buf._4_4_; - *(undefined4 *)(psVar8->_buf + 8) = joinedPath._buf._8_4_; - *(undefined4 *)(psVar8->_buf + 0xc) = joinedPath._buf._12_4_; + *(undefined4 *)(psVar8->_buf + 4) = (*(undefined4 *)((char *)&(joinedPath._buf) + 0x4)); + *(undefined4 *)(psVar8->_buf + 8) = (*(undefined4 *)((char *)&(joinedPath._buf) + 0x8)); + *(undefined4 *)(psVar8->_buf + 0xc) = (*(undefined4 *)((char *)&(joinedPath._buf) + 0xc)); psVar8->_size = joinedPath._size; psVar8->_capacity = joinedPath._capacity; joinedPath._size = 0; @@ -2227,39 +2227,39 @@ LAB_006a7eb2: } ((std::string *)(joinedPath._buf))->std::string::_Tidy_deallocate(); ((std::string *)(tmpPath._buf))->std::string::_Tidy_deallocate(); - ehState._0_1_ = 10; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 10; if (0xf < baseNameCapacity) { uVar12 = baseNameCapacity + 1; pvVar7 = baseName[0]; if (0xfff < uVar12) { - pvVar7 = *(void **)((int)baseName[0] + -4); + pvVar7 = *(void **)(GHIDRA_INT(baseName[0]) + -4); uVar12 = baseNameCapacity + 0x24; - if (0x1f < (uint)((int)baseName[0] + (-4 - (int)pvVar7))) goto LAB_006a7e25; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(baseName[0]) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_006a7e25; } operator_delete(pvVar7,uVar12); } - ehState._0_1_ = 9; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 9; baseNameSize = 0; baseNameCapacity = 0xf; - baseName[0] = (void *)((uint)baseName[0] & 0xffffff00); + baseName[0] = (void *)(GHIDRA_UINT(baseName[0]) & 0xffffff00); if (0xf < tmpString._capacity) { uVar12 = tmpString._capacity + 1; - pvVar7 = (void *)tmpString._buf._0_4_; + pvVar7 = (*(undefined4 *)((char *)&((void *)tmpString._buf) + 0x0)); if (0xfff < uVar12) { - pvVar7 = *(void **)(tmpString._buf._0_4_ + -4); + pvVar7 = *(void **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar12 = tmpString._capacity + 0x24; - if (0x1f < (uint)(tmpString._buf._0_4_ + (-4 - (int)pvVar7))) goto LAB_006a7e25; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_006a7e25; } operator_delete(pvVar7,uVar12); } - ehState._0_1_ = 4; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 4; if (0xf < srcCopyCapacity) { uVar12 = srcCopyCapacity + 1; ppppppbVar6 = srcCopy; if (0xfff < uVar12) { ppppppbVar6 = (byte ******)srcCopy[-1]; uVar12 = srcCopyCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)srcCopy + (-4 - (int)ppppppbVar6))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(srcCopy) + (-4 - GHIDRA_INT(ppppppbVar6)))) goto LAB_006a7e25; } operator_delete(ppppppbVar6,uVar12); @@ -2274,27 +2274,27 @@ LAB_006a7eb2: pBVar4 = costumeEntry + 0xb; local_1b4 = (uint *)0x2; do { - uVar12 = (uint)pBVar4[1]._l; + uVar12 = GHIDRA_UINT(pBVar4[1]._l); if ((uVar12 != 0) && (pBVar14 != pBVar4)) { text = pBVar4; - if (0xf < *(uint *)((int)&pBVar4[1]._l + 4)) { + if (0xf < *(uint *)(GHIDRA_INT(&pBVar4[1]._l) + 4)) { text = *(BitSet128 **)&pBVar4->_l; } ((std::string *)((char *)pBVar14))->std::string::assign((byte *)text,uVar12); } pBVar4 = (BitSet128 *)&pBVar4[1]._h; pBVar14 = (BitSet128 *)&pBVar14[1]._h; - local_1b4 = (uint *)((int)local_1b4 + -1); + local_1b4 = (uint *)(GHIDRA_INT(local_1b4) + -1); } while (local_1b4 != (uint *)0x0); } costumeEntryIdx = costumeEntryIdx + 1; costumeListBytes = *(int *)(local_1cc->_filename)._buf; - } while (costumeEntryIdx < (uint)((*(int *)((local_1cc->_filename)._buf + 4) - costumeListBytes) / 0xe0)); + } while (costumeEntryIdx < GHIDRA_UINT(((*(int *)((local_1cc->_filename)._buf + 4) - costumeListBytes) / 0xe0))); } - local_1e0._4_4_ = 0; + (*(undefined4 *)((char *)&(local_1e0) + 0x4)) = 0; searchPathsEnd = (std_string *)0x0; local_1d4 = (std_string *)0x0; - ehState._0_1_ = 0xd; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xd; if (searchDir0Size == 0) { LAB_006a794a: psVar8 = local_1d4; @@ -2314,9 +2314,9 @@ LAB_006a794a: psVar8 = (std_string *)0x0; if (searchDir1Size != 0) { psVar8 = (std_string *)FUN_00694120(searchDir1); - ehState._0_1_ = 0xe; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xe; vector_string_emplace_reallocate_move(local_1e0 + 4,(std_string *)0x0,psVar8); - ehState._0_1_ = 0xd; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xd; ((std::string *)(tmpPath._buf))->std::string::_Tidy_deallocate(); goto LAB_006a794a; } @@ -2342,27 +2342,27 @@ LAB_006a794a: if (layer->_layerData == (void *)0x0) { tmpString._size = 0; tmpString._capacity = 0xf; - tmpString._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (void *)0x0; ((std::string *)(tmpString._buf))->std::string::assign(&s_empty,0); } else { - ((std::string *)(tmpString._buf))->std::string::string((void *)((int)layer->_layerData + 0x20)); + ((std::string *)(tmpString._buf))->std::string::string((void *)(GHIDRA_INT(layer->_layerData) + 0x20)); } - ehState._0_1_ = 0xf; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xf; resolve_resource_path(&tmpPath,&tmpString,local_1e0 + 4); - ehState._0_1_ = 0x11; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x11; if (0xf < tmpString._capacity) { uVar12 = tmpString._capacity + 1; - pvVar7 = (void *)tmpString._buf._0_4_; + pvVar7 = (*(undefined4 *)((char *)&((void *)tmpString._buf) + 0x0)); if (0xfff < uVar12) { - pvVar7 = *(void **)(tmpString._buf._0_4_ + -4); + pvVar7 = *(void **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar12 = tmpString._capacity + 0x24; - if (0x1f < (uint)(tmpString._buf._0_4_ + (-4 - (int)pvVar7))) goto LAB_006a7e25; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_006a7e25; } operator_delete(pvVar7,uVar12); } - ((Sprite *)((Sprite *)&pEVar9->_sprite))->Sprite::ReplaceSpritesheet((int)layerIdx,&tmpPath); - ehState._0_1_ = 0xd; + ((Sprite *)((Sprite *)&pEVar9->_sprite))->Sprite::ReplaceSpritesheet(GHIDRA_INT(layerIdx),&tmpPath); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xd; ((std::string *)(tmpPath._buf))->std::string::_Tidy_deallocate(); layerIdx = layerIdx + 1; bVar3 = extraout_CL_00; @@ -2391,30 +2391,30 @@ LAB_006a794a: if (layer->_layerData == (void *)0x0) { tmpString._size = 0; tmpString._capacity = 0xf; - tmpString._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (void *)0x0; ((std::string *)(tmpString._buf))->std::string::assign(&s_empty,0); } else { - ((std::string *)(tmpString._buf))->std::string::string((void *)((int)layer->_layerData + 0x20)); + ((std::string *)(tmpString._buf))->std::string::string((void *)(GHIDRA_INT(layer->_layerData) + 0x20)); } - ehState._0_1_ = 0x12; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x12; resolve_resource_path(&tmpPath,&tmpString,local_1e0 + 4); - ehState._0_1_ = 0x14; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x14; if (0xf < tmpString._capacity) { uVar12 = tmpString._capacity + 1; - pvVar7 = (void *)tmpString._buf._0_4_; + pvVar7 = (*(undefined4 *)((char *)&((void *)tmpString._buf) + 0x0)); if (0xfff < uVar12) { - pvVar7 = *(void **)(tmpString._buf._0_4_ + -4); + pvVar7 = *(void **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar12 = tmpString._capacity + 0x24; - if (0x1f < (uint)(tmpString._buf._0_4_ + (-4 - (int)pvVar7))) goto LAB_006a7e25; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_006a7e25; } operator_delete(pvVar7,uVar12); } - ((Sprite *)(local_1cc))->Sprite::ReplaceSpritesheet((int)layerIdx,&tmpPath); - ehState._0_1_ = 0xd; + ((Sprite *)(local_1cc))->Sprite::ReplaceSpritesheet(GHIDRA_INT(layerIdx),&tmpPath); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xd; ((std::string *)(tmpPath._buf))->std::string::_Tidy_deallocate(); layerIdx = layerIdx + 1; - pEVar9 = (Entity_Bomb *)((&bomb->_sprite)[(int)(layerIdx + -1)]._color._offset + 1); + pEVar9 = (Entity_Bomb *)((&bomb->_sprite)[GHIDRA_INT((layerIdx + -1))]._color._offset + 1); } while (layerIdx < (byte *)pEVar9->_bombCostumesSprites[0]._layerCount); pEVar11 = bomb; psVar8 = local_1bc; @@ -2466,9 +2466,9 @@ LAB_006a794a: } } std::vector::_Tidy(); - ehState._0_1_ = 3; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 3; _eh_vector_destructor_iterator_(&searchDirs,0x18,2,std::string::_Tidy_deallocate); - ehState._0_1_ = 2; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; _eh_vector_destructor_iterator_(costumePaths,0x18,5,std::string::_Tidy_deallocate); if (0xf < spritePathCapacity) { uVar12 = spritePathCapacity + 1; @@ -2476,20 +2476,20 @@ LAB_006a794a: if (0xfff < uVar12) { pvVar7 = *(void **)((char *)spritePath + -4); uVar12 = spritePathCapacity + 0x24; - if (0x1f < (uint)((int)spritePath + (-4 - (int)pvVar7))) goto LAB_006a7e25; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(spritePath) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_006a7e25; } operator_delete(pvVar7,uVar12); } spritePathSize = 0; spritePathCapacity = 0xf; - spritePath = (void *)((uint)spritePath & 0xffffff00); + spritePath = (void *)(GHIDRA_UINT(spritePath) & 0xffffff00); if (0xf < sizeSuffixCapacity) { uVar12 = sizeSuffixCapacity + 1; ppppppbVar6 = sizeSuffix[0]; if (0xfff < uVar12) { ppppppbVar6 = (byte ******)sizeSuffix[0][-1]; uVar12 = sizeSuffixCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)sizeSuffix[0] + (-4 - (int)ppppppbVar6))) goto LAB_006a7e25; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(sizeSuffix[0]) + (-4 - GHIDRA_INT(ppppppbVar6)))) goto LAB_006a7e25; } operator_delete(ppppppbVar6,uVar12); } @@ -2499,7 +2499,7 @@ LAB_006a794a: if (0xfff < uVar12) { ppppppbVar6 = (byte ******)savedAnimName[0][-1]; uVar12 = savedAnimNameCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)savedAnimName[0] + (-4 - (int)ppppppbVar6))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(savedAnimName[0]) + (-4 - GHIDRA_INT(ppppppbVar6)))) { LAB_006a7e25: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); diff --git a/src/game/entity_config.cpp b/src/game/entity_config.cpp index 581d0ea..d1a27d4 100644 --- a/src/game/entity_config.cpp +++ b/src/game/entity_config.cpp @@ -30,7 +30,7 @@ uint EntityConfig::parse_entity_tags() local_8 = 0xffffffff; puStack_c = &LAB_00af99d9; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(local_20 + 0x1c); + local_14 = __security_cookie ^ GHIDRA_UINT((local_20 + 0x1c)); ExceptionList = &local_10; if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < DAT_00c80a80) && (_Init_thread_header(&DAT_00c80a80,local_14), DAT_00c80a80 == -1)) { @@ -53,12 +53,12 @@ uint EntityConfig::parse_entity_tags() local_8 = 0xffffffff; *tagValue = 1; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; pvVar1 = tagName; if (0xfff < uVar2) { pvVar1 = *(void **)((char *)tagName + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)tagName + (-4 - (int)pvVar1))) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tagName) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -75,12 +75,12 @@ uint EntityConfig::parse_entity_tags() local_8 = 0xffffffff; *tagValue = 2; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; pvVar1 = tagName; if (0xfff < uVar2) { pvVar1 = *(void **)((char *)tagName + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)tagName + (-4 - (int)pvVar1))) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tagName) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -96,12 +96,12 @@ uint EntityConfig::parse_entity_tags() local_8 = 0xffffffff; *tagValue = 4; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; pvVar1 = tagName; if (0xfff < uVar2) { pvVar1 = *(void **)((char *)tagName + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)tagName + (-4 - (int)pvVar1))) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tagName) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -117,12 +117,12 @@ uint EntityConfig::parse_entity_tags() local_8 = 0xffffffff; *tagValue = 8; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; pvVar1 = tagName; if (0xfff < uVar2) { pvVar1 = *(void **)((char *)tagName + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)tagName + (-4 - (int)pvVar1))) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tagName) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -138,12 +138,12 @@ uint EntityConfig::parse_entity_tags() local_8 = 0xffffffff; *tagValue = 0x10; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; pvVar1 = tagName; if (0xfff < uVar2) { pvVar1 = *(void **)((char *)tagName + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)tagName + (-4 - (int)pvVar1))) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tagName) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -159,12 +159,12 @@ uint EntityConfig::parse_entity_tags() local_8 = 0xffffffff; *tagValue = 0x20; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; pvVar1 = tagName; if (0xfff < uVar2) { pvVar1 = *(void **)((char *)tagName + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)tagName + (-4 - (int)pvVar1))) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tagName) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -180,12 +180,12 @@ uint EntityConfig::parse_entity_tags() local_8 = 0xffffffff; *tagValue = 0x40; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; pvVar1 = tagName; if (0xfff < uVar2) { pvVar1 = *(void **)((char *)tagName + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)tagName + (-4 - (int)pvVar1))) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tagName) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -201,12 +201,12 @@ uint EntityConfig::parse_entity_tags() local_8 = 0xffffffff; *tagValue = 0x80; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; pvVar1 = tagName; if (0xfff < uVar2) { pvVar1 = *(void **)((char *)tagName + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)tagName + (-4 - (int)pvVar1))) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tagName) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -222,12 +222,12 @@ uint EntityConfig::parse_entity_tags() local_8 = 0xffffffff; *tagValue = 0x100; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; pvVar1 = tagName; if (0xfff < uVar2) { pvVar1 = *(void **)((char *)tagName + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)tagName + (-4 - (int)pvVar1))) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tagName) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -248,12 +248,12 @@ uint EntityConfig::parse_entity_tags() if ((undefined1 *)0xfff < tagValue) { pvVar1 = *(void **)((char *)tagName + -4); tagValue = local_18 + 0x24; - if (0x1f < (uint)((int)tagName + (-4 - (int)pvVar1))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tagName) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(pvVar1,(uint)tagValue); + operator_delete(pvVar1,GHIDRA_UINT(tagValue)); } } uVar2 = 0; @@ -281,7 +281,7 @@ LAB_00694c37: tokenIdx = tokenIdx + 1; tokenOffset = tokenOffset + 0x18; tagFlags = uVar2; - } while (tokenIdx < (uint)((tokensEnd - tokensBegin) / 0x18)); + } while (tokenIdx < GHIDRA_UINT(((tokensEnd - tokensBegin) / 0x18))); } std::vector::_Tidy(); ExceptionList = local_10; @@ -316,7 +316,7 @@ EntityConfig_Entity * EntityConfig::GetEntity(int id, int variant, int subtype) lookupSubtype = 0; } } - return (EntityConfig_Entity *)((int)foundNode + 0x18); + return (EntityConfig_Entity *)(GHIDRA_INT(foundNode) + 0x18); } // 00695030 @@ -339,7 +339,7 @@ EntityConfig_Entity * EntityConfig::GetBestiaryConfig(int id, int variant) if (((*(char *)((char *)lowerBoundNode + 0xd) == '\0') && (*(uint *)((char *)lowerBoundNode + 0x10) <= entityKey)) && (lowerBoundNode != (this->_entities)._head)) { - config = (EntityConfig_Entity *)((int)lowerBoundNode + 0x18); + config = (EntityConfig_Entity *)(GHIDRA_INT(lowerBoundNode) + 0x18); } else { if (parentVariant == 0) { @@ -447,7 +447,7 @@ byte EntityConfig::LoadEntities(byte *path, void *mod) local_14 = (byte ******)0xffffffff; puStack_18 = &LAB_00af9b90; local_1c = ExceptionList; - uVar4 = __security_cookie ^ (uint)(anm2Root + 0x14); + uVar4 = __security_cookie ^ GHIDRA_UINT((anm2Root + 0x14)); ExceptionList = &local_1c; modLocal = mod; pbStack_10230 = path; @@ -471,19 +471,19 @@ byte EntityConfig::LoadEntities(byte *path, void *mod) pbVar13 = fileBuffer; ((rapidxml::xml_document *)(xmlDocument))->rapidxml::xml_document::parse(fileBuffer); bVar3 = (byte)pbVar13; - pvVar7 = ((xml_node *)(xmlDocument))->xml_node::first_node((byte *)"entities",(int)pcVar23,bVar3); + pvVar7 = ((xml_node *)(xmlDocument))->xml_node::first_node((byte *)"entities",GHIDRA_INT(pcVar23),bVar3); if (pvVar7 == (void *)0x0) { pcVar23 = "Could not find root node \'entities\' in %s\n"; pbVar13 = pbStack_10230; KAGE_LogMessage(0x10,(byte *)"Could not find root node \'entities\' in %s\n"); bVar3 = (byte)pbVar13; } - pvVar8 = ((xml_node *)(pvVar7))->xml_node::first_attribute((byte *)"version",(uint)pcVar23,bVar3); + pvVar8 = ((xml_node *)(pvVar7))->xml_node::first_attribute((byte *)"version",GHIDRA_UINT(pcVar23),bVar3); psVar15 = (std_string *)&g_xmlNullStr; if (*(std_string **)((char *)pvVar8 + 4) != (std_string *)0x0) { psVar15 = *(std_string **)((char *)pvVar8 + 4); } - pvVar8 = ((xml_node *)(pvVar7))->xml_node::first_attribute((byte *)"anm2root",(uint)pcVar23,bVar3); + pvVar8 = ((xml_node *)(pvVar7))->xml_node::first_attribute((byte *)"anm2root",GHIDRA_UINT(pcVar23),bVar3); anm2RootSize = 0; anm2RootCapacity = 0xf; anm2Root[0] = (byte *******)0x0; @@ -497,10 +497,10 @@ byte EntityConfig::LoadEntities(byte *path, void *mod) pcVar23 = textCursor->_buf; textCursor = (std_string *)(textCursor->_buf + 1); } while (*pcVar23 != 0); - uVar4 = (int)textCursor - (int)pcStack_10240; + uVar4 = GHIDRA_INT(textCursor) - GHIDRA_INT(pcStack_10240); ((std::string *)((char *)anm2Root))->std::string::assign((byte *)text,uVar4); bVar3 = (byte)uVar4; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; pbVar13 = &DAT_00b63160; textCursor = psVar15; do { @@ -508,7 +508,7 @@ byte EntityConfig::LoadEntities(byte *path, void *mod) isLess = textChar < *pbVar13; if (textChar != *pbVar13) { LAB_00695272: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00695277; } if (textChar == 0) break; @@ -529,7 +529,7 @@ LAB_00695277: pvVar8 = modLocal; isPortraitModded = 0; if ((modLocal != (void *)0x0) && - (deathAnm2Attr = ((xml_node *)(pvVar7))->xml_node::first_attribute((byte *)"deathanm2",(uint)text,bVar3), + (deathAnm2Attr = ((xml_node *)(pvVar7))->xml_node::first_attribute((byte *)"deathanm2",GHIDRA_UINT(text),bVar3), deathAnm2Attr != (void *)0x0)) { pbVar13 = &g_xmlNullStr; if (*(byte **)((char *)deathAnm2Attr + 4) != (byte *)0x0) { @@ -537,18 +537,18 @@ LAB_00695277: } ((std::string *)(scratchString._buf))->std::string::string_from_cstr(pbVar13); psVar15 = &scratchString; - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; text = (std_string *)0xc; ((Mod *)(pvVar8))->Mod::load_content_anm2(0xc,psVar15); bVar3 = (byte)psVar15; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (0xf < scratchString._capacity) { uVar4 = scratchString._capacity + 1; - text = (std_string *)scratchString._buf._0_4_; + text = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); if (0xfff < uVar4) { - text = (std_string *)((std_string *)(scratchString._buf._0_4_ + -0x18))->_capacity; + text = (std_string *)((std_string *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + -0x18))->_capacity; uVar4 = scratchString._capacity + 0x24; - if ((byte *)0x1f < (byte *)(scratchString._buf._0_4_ + (-4 - (int)text))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + (-4 - GHIDRA_INT(text)))) goto LAB_006989c8; } operator_delete(text,uVar4); @@ -556,12 +556,12 @@ LAB_00695277: } isPortraitModded = *(byte *)((char *)pvVar8 + 0xef9); } - entityNode = ((xml_node *)(pvVar7))->xml_node::first_node((byte *)"entity",(int)text,bVar3); + entityNode = ((xml_node *)(pvVar7))->xml_node::first_node((byte *)"entity",GHIDRA_INT(text),bVar3); if (entityNode != (void *)0x0) { LAB_0069533f: atoiFn = atoi_exref; ((EntityConfig_Entity *)(&parsedEntity))->EntityConfig_Entity::EntityConfig_Entity(); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; puStack_1022c = *(undefined4 **)((char *)extraout_EDX + 0x20); pvVar7 = extraout_EDX; if (puStack_1022c != (undefined4 *)0x0) { @@ -578,7 +578,7 @@ LAB_00695376: pbVar12 = (byte *)*puStack_1022c; if (compareChar != *literalCursor) { LAB_006953ca: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_006953cf; } if (compareChar == 0) break; @@ -610,7 +610,7 @@ LAB_006953cf: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_0069543a: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069543f; } if (compareChar == 0) break; @@ -642,7 +642,7 @@ LAB_0069543f: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_006954aa: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_006954af; } if (compareChar == 0) break; @@ -674,7 +674,7 @@ LAB_006954af: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_0069551a: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069551f; } if (compareChar == 0) break; @@ -707,7 +707,7 @@ LAB_0069551f: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pbVar12) { LAB_0069559a: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069559f; } if (compareChar == 0) break; @@ -730,7 +730,7 @@ LAB_0069559f: bVar3 = *literalCursor; literalCursor = literalCursor + 1; } while (bVar3 != 0); - uVar4 = (int)literalCursor - (int)(pbVar13 + 1); + uVar4 = GHIDRA_INT(literalCursor) - GHIDRA_INT((pbVar13 + 1)); psVar15 = &parsedEntity.name; goto LAB_006955c6; } @@ -745,7 +745,7 @@ LAB_0069559f: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_0069566b: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00695670; } if (compareChar == 0) break; @@ -778,7 +778,7 @@ LAB_00695670: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pbVar12) { LAB_006956da: - psVar15 = (std_string *)(-(uint)isLess | 1); + psVar15 = (std_string *)(-GHIDRA_UINT(isLess) | 1); goto LAB_006956df; } if (compareChar == 0) break; @@ -802,9 +802,9 @@ LAB_006956df: bVar3 = *literalCursor; literalCursor = literalCursor + 1; } while (bVar3 != 0); - scratchString._buf._0_4_ = psVar15; - scratchString._size = (uint)psVar15; - ((std::string *)(scratchString._buf))->std::string::assign(pbVar13,(int)literalCursor - (int)(pbVar13 + 1)); + (*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) = psVar15; + scratchString._size = GHIDRA_UINT(psVar15); + ((std::string *)(scratchString._buf))->std::string::assign(pbVar13,GHIDRA_INT(literalCursor) - GHIDRA_INT((pbVar13 + 1))); if ((std_string *)scratchString._size == (std_string *)0x0) { LAB_006957d8: parsedEntity.isBoss = 0; @@ -812,7 +812,7 @@ LAB_006957d8: else { psVar15 = &scratchString; if (0xf < scratchString._capacity) { - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); } if ((std_string *)scratchString._size == (std_string *)&DAT_00000004) { if ((*(std_string **)psVar15->_buf == (std_string *)0x65757274) || @@ -824,7 +824,7 @@ LAB_006957d8: uVar4 = 0; } else { - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; } if (uVar4 != 0) goto LAB_0069576f; } @@ -832,7 +832,7 @@ LAB_006957d8: LAB_0069576f: psVar15 = &scratchString; if (0xf < scratchString._capacity) { - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); } if ((std_string *)scratchString._size == (std_string *)&DAT_00000004) { if ((*(std_string **)psVar15->_buf == (std_string *)0x65757254) || @@ -845,13 +845,13 @@ LAB_0069576f: uVar4 = 0; } else { - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; } if (uVar4 == 0) goto LAB_006957cf; } psVar15 = &scratchString; if (0xf < scratchString._capacity) { - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); } iVar6 = atoi(psVar15->_buf); if (iVar6 == 0) goto LAB_006957d8; @@ -861,12 +861,12 @@ LAB_006957cf: } if (0xf < scratchString._capacity) { uVar4 = scratchString._capacity + 1; - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); if (0xfff < uVar4) { psVar15 = (std_string *) - ((std_string *)(scratchString._buf._0_4_ + -0x18))->_capacity; + ((std_string *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + -0x18))->_capacity; uVar4 = scratchString._capacity + 0x24; - if ((byte *)0x1f < (byte *)(scratchString._buf._0_4_ + (-4 - (int)psVar15))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar15)))) goto LAB_006989c8; } operator_delete(psVar15,uVar4); @@ -884,7 +884,7 @@ LAB_006957cf: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_0069586a: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069586f; } if (compareChar == 0) break; @@ -916,7 +916,7 @@ LAB_0069586f: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_006958da: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_006958df; } if (compareChar == 0) break; @@ -940,7 +940,7 @@ LAB_006958df: isLess = bVar3 < *literalCursor; if (bVar3 != *literalCursor) { LAB_00695921: - parsedEntity.canBeChampion = (-(uint)isLess | 1) == 0; + parsedEntity.canBeChampion = (-GHIDRA_UINT(isLess) | 1) == 0; goto LAB_006955d1; } if (bVar3 == 0) break; @@ -964,7 +964,7 @@ LAB_00695921: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_0069597a: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069597f; } if (compareChar == 0) break; @@ -997,7 +997,7 @@ LAB_0069597f: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_006959ea: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_006959ef; } if (compareChar == 0) break; @@ -1030,7 +1030,7 @@ LAB_006959ef: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_00695a5a: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00695a5f; } if (compareChar == 0) break; @@ -1063,7 +1063,7 @@ LAB_00695a5f: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_00695aca: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00695acf; } if (compareChar == 0) break; @@ -1096,7 +1096,7 @@ LAB_00695acf: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_00695b3a: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00695b3f; } if (compareChar == 0) break; @@ -1128,7 +1128,7 @@ LAB_00695b3f: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_00695baa: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00695baf; } if (compareChar == 0) break; @@ -1161,7 +1161,7 @@ LAB_00695baf: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pbVar12) { LAB_00695c1a: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00695c1f; } if (compareChar == 0) break; @@ -1194,7 +1194,7 @@ LAB_00695c1f: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pbVar12) { LAB_00695c8a: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00695c8f; } if (compareChar == 0) break; @@ -1227,7 +1227,7 @@ LAB_00695c8f: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pbVar12) { LAB_00695cfa: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00695cff; } if (compareChar == 0) break; @@ -1256,14 +1256,14 @@ LAB_00695cff: bVar3 = *pbVar13; pbVar13 = pbVar13 + 1; } while (bVar3 != 0); - psVar15 = (std_string *)(pbVar13 + -(int)(literalCursor + 1)); + psVar15 = (std_string *)(pbVar13 + -GHIDRA_INT((literalCursor + 1))); if (psVar15 <= (std_string *)(0x7fffffff - anm2RootSize)) { textData = (byte *******)anm2Root; if (0xf < anm2RootCapacity) { textData = anm2Root[0]; } - ((std::string *)(scratchString._buf))->std::string::concat((int)modLocal,psVar15,(byte *)textData, - anm2RootSize,literalCursor,(uint)psVar15); + ((std::string *)(scratchString._buf))->std::string::concat(GHIDRA_INT(modLocal),psVar15,(byte *)textData, + anm2RootSize,literalCursor,GHIDRA_UINT(psVar15)); tempDtorFlags = tempDtorFlags | 1; ((std::string *)(parsedEntity.anm2Path._buf))->std::string::_Tidy_deallocate(); parsedEntity.anm2Path._buf[0] = scratchString._buf[0]; @@ -1299,7 +1299,7 @@ LAB_00695cff: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_00695dea: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00695def; } if (compareChar == 0) break; @@ -1338,7 +1338,7 @@ LAB_00695def: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_00695e7a: - psVar15 = (std_string *)(-(uint)isLess | 1); + psVar15 = (std_string *)(-GHIDRA_UINT(isLess) | 1); goto LAB_00695e7f; } if (compareChar == 0) break; @@ -1362,9 +1362,9 @@ LAB_00695e7f: bVar3 = *literalCursor; literalCursor = literalCursor + 1; } while (bVar3 != 0); - scratchString._buf._0_4_ = psVar15; - scratchString._size = (uint)psVar15; - ((std::string *)(scratchString._buf))->std::string::assign(pbVar13,(int)literalCursor - (int)(pbVar13 + 1)); + (*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) = psVar15; + scratchString._size = GHIDRA_UINT(psVar15); + ((std::string *)(scratchString._buf))->std::string::assign(pbVar13,GHIDRA_INT(literalCursor) - GHIDRA_INT((pbVar13 + 1))); if ((std_string *)scratchString._size == (std_string *)0x0) { LAB_00695f7c: parsedEntity.shutDoors = 0; @@ -1372,7 +1372,7 @@ LAB_00695f7c: else { psVar15 = &scratchString; if (0xf < scratchString._capacity) { - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); } if ((std_string *)scratchString._size == (std_string *)&DAT_00000004) { if ((*(std_string **)psVar15->_buf == (std_string *)0x65757274) || @@ -1385,7 +1385,7 @@ LAB_00695f7c: uVar4 = 0; } else { - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; } if (uVar4 != 0) goto LAB_00695f13; } @@ -1393,7 +1393,7 @@ LAB_00695f7c: LAB_00695f13: psVar15 = &scratchString; if (0xf < scratchString._capacity) { - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); } if ((std_string *)scratchString._size == (std_string *)&DAT_00000004) { if ((*(std_string **)psVar15->_buf == (std_string *)0x65757254) || @@ -1406,13 +1406,13 @@ LAB_00695f13: uVar4 = 0; } else { - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; } if (uVar4 == 0) goto LAB_00695f73; } psVar15 = &scratchString; if (0xf < scratchString._capacity) { - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); } iVar6 = atoi(psVar15->_buf); if (iVar6 == 0) goto LAB_00695f7c; @@ -1422,12 +1422,12 @@ LAB_00695f73: } if (0xf < scratchString._capacity) { uVar4 = scratchString._capacity + 1; - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); if (0xfff < uVar4) { psVar15 = (std_string *) - ((std_string *)(scratchString._buf._0_4_ + -0x18))->_capacity; + ((std_string *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + -0x18))->_capacity; uVar4 = scratchString._capacity + 0x24; - if ((byte *)0x1f < (byte *)(scratchString._buf._0_4_ + (-4 - (int)psVar15))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar15)))) goto LAB_006989c8; } operator_delete(psVar15,uVar4); @@ -1445,7 +1445,7 @@ LAB_00695f73: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_0069600a: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069600f; } if (compareChar == 0) break; @@ -1468,7 +1468,7 @@ LAB_0069600f: bVar3 = *literalCursor; literalCursor = literalCursor + 1; } while (bVar3 != 0); - uVar4 = (int)literalCursor - (int)(pbVar13 + 1); + uVar4 = GHIDRA_INT(literalCursor) - GHIDRA_INT((pbVar13 + 1)); psVar15 = &parsedEntity.gridCollisionClassString; goto LAB_006955c6; } @@ -1483,7 +1483,7 @@ LAB_0069600f: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_0069608a: - psVar15 = (std_string *)(-(uint)isLess | 1); + psVar15 = (std_string *)(-GHIDRA_UINT(isLess) | 1); goto LAB_0069608f; } if (compareChar == 0) break; @@ -1507,10 +1507,10 @@ LAB_0069608f: bVar3 = *literalCursor; literalCursor = literalCursor + 1; } while (bVar3 != 0); - scratchString._buf._0_4_ = psVar15; - scratchString._size = (uint)psVar15; + (*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) = psVar15; + scratchString._size = GHIDRA_UINT(psVar15); ((std::string *)(scratchString._buf))->std::string::assign(pbVar13, - (int)literalCursor - (int)(pbVar13 + 1)); + GHIDRA_INT(literalCursor) - GHIDRA_INT((pbVar13 + 1))); if ((std_string *)scratchString._size == (std_string *)0x0) { LAB_0069618c: parsedEntity.reroll = 0; @@ -1518,7 +1518,7 @@ LAB_0069618c: else { psVar15 = &scratchString; if (0xf < scratchString._capacity) { - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); } if ((std_string *)scratchString._size == (std_string *)&DAT_00000004) { if ((*(std_string **)psVar15->_buf == (std_string *)0x65757274) || @@ -1531,7 +1531,7 @@ LAB_0069618c: uVar4 = 0; } else { - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; } if (uVar4 != 0) goto LAB_00696123; } @@ -1539,7 +1539,7 @@ LAB_0069618c: LAB_00696123: psVar15 = &scratchString; if (0xf < scratchString._capacity) { - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); } if ((std_string *)scratchString._size == (std_string *)&DAT_00000004) { if ((*(std_string **)psVar15->_buf == (std_string *)0x65757254) || @@ -1553,13 +1553,13 @@ LAB_00696123: uVar4 = 0; } else { - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; } if (uVar4 == 0) goto LAB_00696183; } psVar15 = &scratchString; if (0xf < scratchString._capacity) { - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); } iVar6 = atoi(psVar15->_buf); if (iVar6 == 0) goto LAB_0069618c; @@ -1569,13 +1569,13 @@ LAB_00696183: } if (0xf < scratchString._capacity) { uVar4 = scratchString._capacity + 1; - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); if (0xfff < uVar4) { psVar15 = (std_string *) - ((std_string *)(scratchString._buf._0_4_ + -0x18))->_capacity; + ((std_string *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + -0x18))->_capacity; uVar4 = scratchString._capacity + 0x24; if ((byte *)0x1f < - (byte *)(scratchString._buf._0_4_ + (-4 - (int)psVar15))) + (byte *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar15)))) goto LAB_006989c8; } operator_delete(psVar15,uVar4); @@ -1593,7 +1593,7 @@ LAB_00696183: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_0069621a: - psVar15 = (std_string *)(-(uint)isLess | 1); + psVar15 = (std_string *)(-GHIDRA_UINT(isLess) | 1); goto LAB_0069621f; } if (compareChar == 0) break; @@ -1617,10 +1617,10 @@ LAB_0069621f: bVar3 = *literalCursor; literalCursor = literalCursor + 1; } while (bVar3 != 0); - scratchString._buf._0_4_ = psVar15; - scratchString._size = (uint)psVar15; + (*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) = psVar15; + scratchString._size = GHIDRA_UINT(psVar15); ((std::string *)(scratchString._buf))->std::string::assign(pbVar13, - (int)literalCursor - (int)(pbVar13 + 1)); + GHIDRA_INT(literalCursor) - GHIDRA_INT((pbVar13 + 1))); if ((std_string *)scratchString._size == (std_string *)0x0) { LAB_0069631c: parsedEntity.hasFloorAlts = 0; @@ -1628,7 +1628,7 @@ LAB_0069631c: else { psVar15 = &scratchString; if (0xf < scratchString._capacity) { - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); } if ((std_string *)scratchString._size == (std_string *)&DAT_00000004) { if ((*(std_string **)psVar15->_buf == (std_string *)0x65757274) || @@ -1642,7 +1642,7 @@ LAB_0069631c: uVar4 = 0; } else { - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; } if (uVar4 != 0) goto LAB_006962b3; } @@ -1650,7 +1650,7 @@ LAB_0069631c: LAB_006962b3: psVar15 = &scratchString; if (0xf < scratchString._capacity) { - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); } if ((std_string *)scratchString._size == (std_string *)&DAT_00000004) { if ((*(std_string **)psVar15->_buf == (std_string *)0x65757254) || @@ -1664,13 +1664,13 @@ LAB_006962b3: uVar4 = 0; } else { - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; } if (uVar4 == 0) goto LAB_00696313; } psVar15 = &scratchString; if (0xf < scratchString._capacity) { - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); } iVar6 = atoi(psVar15->_buf); if (iVar6 == 0) goto LAB_0069631c; @@ -1680,13 +1680,13 @@ LAB_00696313: } if (scratchString._capacity < 0x10) goto LAB_006955cb; uVar4 = scratchString._capacity + 1; - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); if (0xfff < uVar4) { psVar15 = (std_string *) - ((std_string *)(scratchString._buf._0_4_ + -0x18))->_capacity; + ((std_string *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + -0x18))->_capacity; uVar4 = scratchString._capacity + 0x24; if ((byte *)0x1f < - (byte *)(scratchString._buf._0_4_ + (-4 - (int)psVar15))) + (byte *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar15)))) goto LAB_006989c8; } operator_delete(psVar15,uVar4); @@ -1703,7 +1703,7 @@ LAB_00696313: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_006963aa: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_006963af; } if (compareChar == 0) break; @@ -1735,7 +1735,7 @@ LAB_006963af: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_0069641a: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069641f; } if (compareChar == 0) break; @@ -1768,7 +1768,7 @@ LAB_0069641f: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_0069648a: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069648f; } if (compareChar == 0) break; @@ -1800,7 +1800,7 @@ LAB_0069648f: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pbVar12) { LAB_006964fa: - psVar15 = (std_string *)(-(uint)isLess | 1); + psVar15 = (std_string *)(-GHIDRA_UINT(isLess) | 1); goto LAB_006964ff; } if (compareChar == 0) break; @@ -1818,30 +1818,30 @@ LAB_006964ff: if ((byte *)puStack_1022c[1] != (byte *)0x0) { pbVar13 = (byte *)puStack_1022c[1]; } - scratchString._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) = (std_string *)0x0; scratchString._capacity = 0xf; literalCursor = pbVar13; do { bVar3 = *literalCursor; literalCursor = literalCursor + 1; } while (bVar3 != 0); - scratchString._size = (uint)psVar15; + scratchString._size = GHIDRA_UINT(psVar15); ((std::string *)(scratchString._buf))->std::string::assign(pbVar13, - (int)literalCursor - (int)(pbVar13 + 1)); - local_14._0_1_ = 4; + GHIDRA_INT(literalCursor) - GHIDRA_INT((pbVar13 + 1))); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; parsedEntity.tags = parse_entity_tags(); - local_14._0_1_ = 3; - parsedEntity._220_4_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; + (*(undefined4 *)((char *)&(parsedEntity) + 0xdc)) = 0; if (0xf < scratchString._capacity) { uVar4 = scratchString._capacity + 1; - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); if (0xfff < uVar4) { psVar15 = (std_string *) - ((std_string *)(scratchString._buf._0_4_ + -0x18))-> + ((std_string *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + -0x18))-> _capacity; uVar4 = scratchString._capacity + 0x24; if ((byte *)0x1f < - (byte *)(scratchString._buf._0_4_ + (-4 - (int)psVar15))) + (byte *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar15)))) goto LAB_006989c8; } operator_delete(psVar15,uVar4); @@ -1859,7 +1859,7 @@ LAB_006964ff: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_006965ea: - psVar15 = (std_string *)(-(uint)isLess | 1); + psVar15 = (std_string *)(-GHIDRA_UINT(isLess) | 1); goto LAB_006965ef; } if (compareChar == 0) break; @@ -1883,10 +1883,10 @@ LAB_006965ef: bVar3 = *literalCursor; literalCursor = literalCursor + 1; } while (bVar3 != 0); - scratchString._buf._0_4_ = psVar15; - scratchString._size = (uint)psVar15; + (*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) = psVar15; + scratchString._size = GHIDRA_UINT(psVar15); ((std::string *)(scratchString._buf))->std::string::assign(pbVar13, - (int)literalCursor - (int)(pbVar13 + 1)); + GHIDRA_INT(literalCursor) - GHIDRA_INT((pbVar13 + 1))); if ((std_string *)scratchString._size == (std_string *)0x0) { LAB_006966ec: parsedEntity.bestiary = 0; @@ -1894,7 +1894,7 @@ LAB_006966ec: else { psVar15 = &scratchString; if (0xf < scratchString._capacity) { - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); } if ((std_string *)scratchString._size == (std_string *)&DAT_00000004) { @@ -1910,7 +1910,7 @@ LAB_006966ec: uVar4 = 0; } else { - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; } if (uVar4 != 0) goto LAB_00696683; } @@ -1918,7 +1918,7 @@ LAB_006966ec: LAB_00696683: psVar15 = &scratchString; if (0xf < scratchString._capacity) { - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); } if ((std_string *)scratchString._size == (std_string *)&DAT_00000004 ) { @@ -1934,13 +1934,13 @@ LAB_00696683: uVar4 = 0; } else { - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; } if (uVar4 == 0) goto LAB_006966e3; } psVar15 = &scratchString; if (0xf < scratchString._capacity) { - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); } iVar6 = atoi(psVar15->_buf); if (iVar6 == 0) goto LAB_006966ec; @@ -1950,14 +1950,14 @@ LAB_006966e3: } if (0xf < scratchString._capacity) { uVar4 = scratchString._capacity + 1; - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); if (0xfff < uVar4) { psVar15 = (std_string *) - ((std_string *)(scratchString._buf._0_4_ + -0x18))-> + ((std_string *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + -0x18))-> _capacity; uVar4 = scratchString._capacity + 0x24; if ((byte *)0x1f < - (byte *)(scratchString._buf._0_4_ + (-4 - (int)psVar15))) + (byte *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar15)))) goto LAB_006989c8; } operator_delete(psVar15,uVar4); @@ -1975,7 +1975,7 @@ LAB_006966e3: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_0069677a: - psVar15 = (std_string *)(-(uint)isLess | 1); + psVar15 = (std_string *)(-GHIDRA_UINT(isLess) | 1); goto LAB_0069677f; } if (compareChar == 0) break; @@ -2000,7 +2000,7 @@ LAB_0069677f: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_006969ea: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_006969ef; } if (compareChar == 0) break; @@ -2023,7 +2023,7 @@ LAB_006969ef: bVar3 = *literalCursor; literalCursor = literalCursor + 1; } while (bVar3 != 0); - uVar4 = (int)literalCursor - (int)(pbVar13 + 1); + uVar4 = GHIDRA_INT(literalCursor) - GHIDRA_INT((pbVar13 + 1)); psVar15 = &parsedEntity.bestiaryAnim; } else { @@ -2038,7 +2038,7 @@ LAB_006969ef: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_00696a6a: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00696a6f; } if (compareChar == 0) break; @@ -2063,7 +2063,7 @@ LAB_00696a6f: literalCursor = (byte *)*puStack_1022c; if (compareChar != *pcVar23) { LAB_00696aea: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00696aef; } if (compareChar == 0) break; @@ -2094,7 +2094,7 @@ LAB_00696aef: isLess = bVar3 < (byte)*pcVar23; if (bVar3 != *pcVar23) { LAB_00696b40: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00696b45; } if (bVar3 == 0) break; @@ -2110,109 +2110,109 @@ LAB_00696b45: if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < DAT_00c80a8c) && (_Init_thread_header(&DAT_00c80a8c), DAT_00c80a8c == -1)) { - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; FUN_0069d650(); _atexit(FUN_00b156e0); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; _Init_thread_footer(&DAT_00c80a8c); } if (DAT_00c80a94 == 0) { std::string::string_from_cstr (scratchString._buf,(byte *)"blood"); - local_14._0_1_ = 9; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; puVar10 = (undefined4 *)FUN_0069d630(&scratchString); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; *puVar10 = 0; ((std::string *)(scratchString._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (scratchString._buf,&DAT_00b66d98); - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; puVar10 = (undefined4 *)FUN_0069d630(&scratchString); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; *puVar10 = 1; ((std::string *)(scratchString._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (scratchString._buf,&DAT_00b66da0); - local_14._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; puVar10 = (undefined4 *)FUN_0069d630(&scratchString); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; *puVar10 = 2; ((std::string *)(scratchString._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (scratchString._buf,&DAT_00b66da4); - local_14._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; puVar10 = (undefined4 *)FUN_0069d630(&scratchString); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; *puVar10 = 3; ((std::string *)(scratchString._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (scratchString._buf,(byte *)"large"); - local_14._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xd; puVar10 = (undefined4 *)FUN_0069d630(&scratchString); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; *puVar10 = 4; ((std::string *)(scratchString._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (scratchString._buf,&DAT_00b66afc); - local_14._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xe; puVar10 = (undefined4 *)FUN_0069d630(&scratchString); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; *puVar10 = 5; ((std::string *)(scratchString._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (scratchString._buf,&DAT_00b66d74); - local_14._0_1_ = 0xf; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xf; puVar10 = (undefined4 *)FUN_0069d630(&scratchString); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; *puVar10 = 6; ((std::string *)(scratchString._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (scratchString._buf,&DAT_00b66d7c); - local_14._0_1_ = 0x10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x10; puVar10 = (undefined4 *)FUN_0069d630(&scratchString); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; *puVar10 = 7; ((std::string *)(scratchString._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (scratchString._buf,(byte *)"rock_small"); - local_14._0_1_ = 0x11; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x11; puVar10 = (undefined4 *)FUN_0069d630(&scratchString); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; *puVar10 = 8; ((std::string *)(scratchString._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (scratchString._buf,(byte *)"sound_baby"); - local_14._0_1_ = 0x12; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x12; puVar10 = (undefined4 *)FUN_0069d630(&scratchString); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; *puVar10 = 9; ((std::string *)(scratchString._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (scratchString._buf,(byte *)"sound_bone"); - local_14._0_1_ = 0x13; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x13; puVar10 = (undefined4 *)FUN_0069d630(&scratchString); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; *puVar10 = 10; ((std::string *)(scratchString._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (scratchString._buf,(byte *)"chain"); - local_14._0_1_ = 0x14; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x14; puVar10 = (undefined4 *)FUN_0069d630(&scratchString); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; *puVar10 = 0xb; ((std::string *)(scratchString._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (scratchString._buf,&DAT_00b66dfc); - local_14._0_1_ = 0x15; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x15; puVar10 = (undefined4 *)FUN_0069d630(&scratchString); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; *puVar10 = 0xc; ((std::string *)(scratchString._buf))->std::string::_Tidy_deallocate(); std::string::string_from_cstr (scratchString._buf,&DAT_00b66da8); - local_14._0_1_ = 0x16; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x16; puVar10 = (undefined4 *)FUN_0069d630(&scratchString); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; *puVar10 = 0xd; ((std::string *)(scratchString._buf))->std::string::_Tidy_deallocate(); } @@ -2221,9 +2221,9 @@ LAB_00696b45: pbVar13 = (byte *)puVar20[1]; } ((std::string *)(scratchString._buf))->std::string::string_from_cstr(pbVar13); - local_14._0_1_ = 0x17; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x17; string_split(splitParts,&scratchString,0x20); - local_14 = (byte ******)CONCAT31(local_14._1_3_,0x19); + local_14 = (byte ******)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x19); ((std::string *)(scratchString._buf))->std::string::_Tidy_deallocate(); pbStack_10230 = (byte *)0x0; iVar6 = FUN_00414410(); @@ -2249,7 +2249,7 @@ LAB_00696b45: } while (literalCursor < pbVar13); puVar20 = puStack_1022c; } - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; std::vector::_Tidy(); } } @@ -2264,7 +2264,7 @@ LAB_00696b45: bVar3 = *literalCursor; literalCursor = literalCursor + 1; } while (bVar3 != 0); - uVar4 = (int)literalCursor - (int)(pbVar13 + 1); + uVar4 = GHIDRA_INT(literalCursor) - GHIDRA_INT((pbVar13 + 1)); psVar15 = &parsedEntity.bestiaryOverlay; } LAB_006955c6: @@ -2275,65 +2275,65 @@ LAB_006955c6: if ((byte *)puStack_1022c[1] != (byte *)0x0) { pbVar13 = (byte *)puStack_1022c[1]; } - scratchString._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) = (std_string *)0x0; scratchString._capacity = 0xf; literalCursor = pbVar13; do { bVar3 = *literalCursor; literalCursor = literalCursor + 1; } while (bVar3 != 0); - scratchString._size = (uint)psVar15; + scratchString._size = GHIDRA_UINT(psVar15); ((std::string *)(scratchString._buf))->std::string::assign(pbVar13, - (int)literalCursor - (int)(pbVar13 + 1)); + GHIDRA_INT(literalCursor) - GHIDRA_INT((pbVar13 + 1))); uVar4 = tempDtorFlags; - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; uStack_10228 = tempDtorFlags | 2; bestiaryTransformAttrParts = (int *)0x0; bestiaryTransformAttrPartsEnd = (int *)0x0; bestiaryTransformAttrPartsCapacity = 0; string_split(&scratchString, (std_string *) - CONCAT31((int3)((uint)extraout_EDX_00 >> 8),0x2c), + CONCAT31((int3)(GHIDRA_UINT(extraout_EDX_00) >> 8),0x2c), (byte)&bestiaryTransformAttrParts); - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; if (0xf < scratchString._capacity) { uVar11 = scratchString._capacity + 1; - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); if (0xfff < uVar11) { psVar15 = (std_string *) - ((std_string *)(scratchString._buf._0_4_ + -0x18))-> + ((std_string *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + -0x18))-> _capacity; uVar11 = scratchString._capacity + 0x24; if ((byte *)0x1f < - (byte *)(scratchString._buf._0_4_ + (-4 - (int)psVar15))) + (byte *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar15)))) goto LAB_006989c8; } operator_delete(psVar15,uVar11); } piVar5 = bestiaryTransformAttrParts; - if (((int)bestiaryTransformAttrPartsEnd - - (int)bestiaryTransformAttrParts) / 0x18 == 3) { + if ((GHIDRA_INT(bestiaryTransformAttrPartsEnd) - + GHIDRA_INT(bestiaryTransformAttrParts)) / 0x18 == 3) { piVar9 = bestiaryTransformAttrParts; - if (0xf < (uint)bestiaryTransformAttrParts[5]) { + if (0xf < GHIDRA_UINT(bestiaryTransformAttrParts[5])) { piVar9 = (int *)*bestiaryTransformAttrParts; } dVar22 = atof((char *)piVar9); parsedEntity.bestiaryOffset.x = (float)dVar22; piVar9 = piVar5 + 6; - if (0xf < (uint)piVar5[0xb]) { + if (0xf < GHIDRA_UINT(piVar5[0xb])) { piVar9 = (int *)*piVar9; } dVar22 = atof((char *)piVar9); parsedEntity.bestiaryOffset.y = (float)dVar22; piVar9 = piVar5 + 0xc; - if (0xf < (uint)piVar5[0x11]) { + if (0xf < GHIDRA_UINT(piVar5[0x11])) { piVar9 = (int *)*piVar9; } dVar22 = atof((char *)piVar9); parsedEntity.bestiaryScale = (float)dVar22; } tempDtorFlags = uVar4 & 0xfffffffd; - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; if (piVar5 != (int *)0x0) { piVar9 = bestiaryTransformAttrPartsEnd; piVar19 = piVar5; @@ -2347,7 +2347,7 @@ LAB_006955c6: if (0xfff < uVar11) { pvVar8 = *(void **)((char *)pvVar7 + -4); uVar11 = uVar4 + 0x24; - if (0x1f < (uint)((int)pvVar7 + (-4 - (int)pvVar8))) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar7) + (-4 - GHIDRA_INT(pvVar8))))) goto LAB_006989c8; } operator_delete(pvVar8,uVar11); @@ -2359,14 +2359,14 @@ LAB_006955c6: piVar19 = piVar19 + 6; } while (piVar19 != piVar9); } - uVar4 = ((bestiaryTransformAttrPartsCapacity - (int)piVar5) / 0x18) * + uVar4 = ((bestiaryTransformAttrPartsCapacity - GHIDRA_INT(piVar5)) / 0x18) * 0x18; piVar9 = piVar5; if (0xfff < uVar4) { piVar9 = (int *)piVar5[-1]; uVar4 = uVar4 + 0x23; if ((undefined1 *)0x1f < - (undefined1 *)((int)piVar5 + (-4 - (int)piVar9))) + (undefined1 *)(GHIDRA_INT(piVar5) + (-4 - GHIDRA_INT(piVar9)))) goto LAB_006989c8; } operator_delete(piVar9,uVar4); @@ -2397,14 +2397,14 @@ LAB_006955d1: } pEVar21 = entityConfig; LAB_0069899e: - local_14._0_1_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; if (0xf < anm2RootCapacity) { uVar4 = anm2RootCapacity + 1; textData = anm2Root[0]; if (0xfff < uVar4) { textData = (byte *******)anm2Root[0][-1]; uVar4 = anm2RootCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)anm2Root[0] + (-4 - (int)textData))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(anm2Root[0]) + (-4 - GHIDRA_INT(textData)))) { LAB_006989c8: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -2444,7 +2444,7 @@ LAB_006955ee: literalCursor = (byte *)puVar20[2]; } if (literalCursor == pbStack_10230) { - literalCursor = pbVar13 + (int)literalCursor; + literalCursor = pbVar13 + GHIDRA_INT(literalCursor); if (literalCursor <= pbVar13) { LAB_00696f40: puVar20 = (undefined4 *)puVar20[8]; @@ -2454,7 +2454,7 @@ LAB_00696f40: } break; } - iVar6 = (int)&DAT_00b66dcc - (int)pbVar13; + iVar6 = GHIDRA_INT(&DAT_00b66dcc) - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar6]) { pbVar13 = pbVar13 + 1; if (literalCursor <= pbVar13) goto LAB_00696f40; @@ -2482,14 +2482,14 @@ LAB_0069789c: pcVar23 = (char *)puVar20[2]; } if (pcVar23 == charCursor + -0xb66d4b) { - literalCursor = (byte *)(pcVar23 + (int)pbVar13); + literalCursor = (byte *)(pcVar23 + GHIDRA_INT(pbVar13)); if (literalCursor <= pbVar13) { LAB_006978f0: pbVar13 = (byte *)puVar20[8]; parsedEntity.bestiary = 1; goto joined_r0x00697902; } - iVar6 = (int)"bestiary" - (int)pbVar13; + iVar6 = GHIDRA_INT("bestiary") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar6]) { pbVar13 = pbVar13 + 1; if (literalCursor <= pbVar13) goto LAB_006978f0; @@ -2517,9 +2517,9 @@ LAB_00697958: literalCursor = (byte *)puStack_1022c[2]; } if (literalCursor == pbStack_10230) { - literalCursor = literalCursor + (int)pbVar13; + literalCursor = literalCursor + GHIDRA_INT(pbVar13); if (literalCursor <= pbVar13) goto joined_r0x00697ee4; - iVar6 = (int)"preload" - (int)pbVar13; + iVar6 = GHIDRA_INT("preload") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar6]) { pbVar13 = pbVar13 + 1; if (literalCursor <= pbVar13) goto joined_r0x00697ee4; @@ -2534,8 +2534,8 @@ joined_r0x00697ee4: preloadSubtype = 0; scratchString._size = 0; scratchString._capacity = 0xf; - scratchString._buf._0_4_ = (std_string *)0x0; - local_14 = (byte ******)CONCAT31(local_14._1_3_,0x20); + (*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) = (std_string *)0x0; + local_14 = (byte ******)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x20); for (puVar20 = (undefined4 *)puStack_1022c[8]; puVar20 != (undefined4 *)0x0; puVar20 = (undefined4 *)puVar20[6]) { pbVar13 = (byte *)*puVar20; @@ -2549,7 +2549,7 @@ joined_r0x00697ee4: isLess = bVar3 < *pbVar12; if (bVar3 != *pbVar12) { LAB_00697f61: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00697f66; } if (bVar3 == 0) break; @@ -2579,7 +2579,7 @@ LAB_00697f66: isLess = bVar3 < (byte)*pcVar23; if (bVar3 != *pcVar23) { LAB_00697fb8: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00697fbd; } if (bVar3 == 0) break; @@ -2609,7 +2609,7 @@ LAB_00697fbd: isLess = bVar3 < (byte)*pcVar23; if (bVar3 != *pcVar23) { LAB_00698010: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00698015; } if (bVar3 == 0) break; @@ -2639,7 +2639,7 @@ LAB_00698015: isLess = bVar3 < *pbVar12; if (bVar3 != *pbVar12) { LAB_00698067: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069806c; } if (bVar3 == 0) break; @@ -2661,32 +2661,32 @@ LAB_0069806c: bVar3 = *literalCursor; literalCursor = literalCursor + 1; } while (bVar3 != 0); - ((std::string *)(scratchString._buf))->std::string::assign(pbVar13,(int)literalCursor - (int)(pbVar13 + 1)); + ((std::string *)(scratchString._buf))->std::string::assign(pbVar13,GHIDRA_INT(literalCursor) - GHIDRA_INT((pbVar13 + 1))); } } } } if (puVar20[4] == 0) break; } - uVar14 = parsedEntity._144_4_; - if (parsedEntity._144_4_ == parsedEntity._148_4_) { - std::vector<36byte>::_Emplace_reallocate(parsedEntity._144_4_,&preloadId); + uVar14 = (*(undefined4 *)((char *)&(parsedEntity) + 0x90)); + if ((*(undefined4 *)((char *)&(parsedEntity) + 0x90)) == (*(undefined4 *)((char *)&(parsedEntity) + 0x94))) { + std::vector<36byte>::_Emplace_reallocate((*(undefined4 *)((char *)&(parsedEntity) + 0x90)),&preloadId); } else { - *(int *)parsedEntity._144_4_ = preloadId; - *(int *)(parsedEntity._144_4_ + 4) = preloadVariant; - *(int *)(parsedEntity._144_4_ + 8) = preloadSubtype; - ((std::string *)((char *)(parsedEntity._144_4_ + 0xc)))->std::string::string(&scratchString); - parsedEntity._144_4_ = uVar14 + 0x24; + *(*(undefined4 *)((char *)&((int *)parsedEntity) + 0x90)) = preloadId; + *(int *)((*(undefined4 *)((char *)&(parsedEntity) + 0x90)) + 4) = preloadVariant; + *(int *)((*(undefined4 *)((char *)&(parsedEntity) + 0x90)) + 8) = preloadSubtype; + ((std::string *)((char *)((*(undefined4 *)((char *)&(parsedEntity) + 0x90)) + 0xc)))->std::string::string(&scratchString); + (*(undefined4 *)((char *)&(parsedEntity) + 0x90)) = uVar14 + 0x24; } - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; if (0xf < scratchString._capacity) { uVar4 = scratchString._capacity + 1; - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); if (0xfff < uVar4) { - psVar15 = (std_string *)((std_string *)(scratchString._buf._0_4_ + -0x18))->_capacity; + psVar15 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + -0x18))->_capacity; uVar4 = scratchString._capacity + 0x24; - if ((byte *)0x1f < (byte *)(scratchString._buf._0_4_ + (-4 - (int)psVar15))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar15)))) goto LAB_006989c8; } operator_delete(psVar15,uVar4); @@ -2707,9 +2707,9 @@ LAB_0069806c: pcVar23 = (char *)puStack_1022c[2]; } if (pcVar23 == charCursor + -0xb66e03) { - literalCursor = pbVar13 + (int)pcVar23; + literalCursor = pbVar13 + GHIDRA_INT(pcVar23); if (literalCursor <= pbVar13) goto joined_r0x00697ee4; - iVar6 = (int)"preload" - (int)pbVar13; + iVar6 = GHIDRA_INT("preload") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar6]) { pbVar13 = pbVar13 + 1; if (literalCursor <= pbVar13) goto joined_r0x00697ee4; @@ -2736,7 +2736,7 @@ LAB_0069806c: literalCursor = (byte *)puVar20[2]; } if (literalCursor == pbStack_10230) { - literalCursor = literalCursor + (int)pbVar13; + literalCursor = literalCursor + GHIDRA_INT(pbVar13); if (literalCursor <= pbVar13) { LAB_00698210: puVar10 = (undefined4 *)puVar20[8]; @@ -2752,7 +2752,7 @@ LAB_00698210: isLess = compareChar < *literalCursor; if (compareChar != *literalCursor) { LAB_0069828c: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00698291; } if (compareChar == 0) break; @@ -2778,7 +2778,7 @@ LAB_00698291: } else { *(undefined4 **)parsedEntity.preloadSounds._end = puStack_1022c; - parsedEntity.preloadSounds._end = (void *)((int)parsedEntity.preloadSounds._end + 4); + parsedEntity.preloadSounds._end = (void *)(GHIDRA_INT(parsedEntity.preloadSounds._end) + 4); } pcVar23 = "preload-snd"; do { @@ -2798,9 +2798,9 @@ LAB_00698291: literalCursor = (byte *)puVar20[2]; } if (literalCursor == pbStack_10230) { - literalCursor = literalCursor + (int)pbVar13; + literalCursor = literalCursor + GHIDRA_INT(pbVar13); if (literalCursor <= pbVar13) goto LAB_00698210; - iVar6 = (int)"preload-snd" - (int)pbVar13; + iVar6 = GHIDRA_INT("preload-snd") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar6]) { pbVar13 = pbVar13 + 1; if (literalCursor <= pbVar13) goto LAB_00698210; @@ -2809,7 +2809,7 @@ LAB_00698291: puVar20 = (undefined4 *)puVar20[0xb]; } while( true ); } - iVar6 = (int)"preload-snd" - (int)pbVar13; + iVar6 = GHIDRA_INT("preload-snd") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar6]) { pbVar13 = pbVar13 + 1; if (literalCursor <= pbVar13) goto LAB_00698210; @@ -2833,9 +2833,9 @@ LAB_0069835c: pcVar23 = (char *)puStack_1022c[2]; } if (pcVar23 == charCursor + -0xb66e1f) { - literalCursor = pbVar13 + (int)pcVar23; + literalCursor = pbVar13 + GHIDRA_INT(pcVar23); if (literalCursor <= pbVar13) goto LAB_006983c0; - iVar6 = (int)"devolve" - (int)pbVar13; + iVar6 = GHIDRA_INT("devolve") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar6]) { pbVar13 = pbVar13 + 1; if (literalCursor <= pbVar13) goto LAB_006983c0; @@ -2880,22 +2880,22 @@ LAB_00698436: if ((parsedEntity.isBoss == 0) && (parsedEntity.reroll != 0)) { psVar15 = &parsedEntity.gridCollisionClassString; if (0xf < parsedEntity.gridCollisionClassString._capacity) { - psVar15 = (std_string *)parsedEntity.gridCollisionClassString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)parsedEntity.gridCollisionClassString._buf) + 0x0)); } scratchString._buf[4] = (undefined1)parsedEntity.id; - scratchString._buf[5] = parsedEntity.id._1_1_; - scratchString._buf[6] = parsedEntity.id._2_1_; - scratchString._buf[7] = parsedEntity.id._3_1_; + scratchString._buf[5] = (*(undefined1 *)((char *)&(parsedEntity.id) + 0x1)); + scratchString._buf[6] = (*(undefined1 *)((char *)&(parsedEntity.id) + 0x2)); + scratchString._buf[7] = (*(undefined1 *)((char *)&(parsedEntity.id) + 0x3)); scratchString._buf[8] = (undefined1)parsedEntity.variant; - scratchString._buf[9] = parsedEntity.variant._1_1_; - scratchString._buf[10] = parsedEntity.variant._2_1_; - scratchString._buf[0xb] = parsedEntity.variant._3_1_; - scratchString._size = (uint)parsedEntity.baseHP; + scratchString._buf[9] = (*(undefined1 *)((char *)&(parsedEntity.variant) + 0x1)); + scratchString._buf[10] = (*(undefined1 *)((char *)&(parsedEntity.variant) + 0x2)); + scratchString._buf[0xb] = (*(undefined1 *)((char *)&(parsedEntity.variant) + 0x3)); + scratchString._size = GHIDRA_UINT(parsedEntity.baseHP); scratchString._buf[0xc] = (undefined1)parsedEntity.subtype; - scratchString._buf[0xd] = parsedEntity.subtype._1_1_; - scratchString._buf[0xe] = parsedEntity.subtype._2_1_; - scratchString._buf[0xf] = parsedEntity.subtype._3_1_; - scratchString._capacity = (uint)parsedEntity.stageHP; + scratchString._buf[0xd] = (*(undefined1 *)((char *)&(parsedEntity.subtype) + 0x1)); + scratchString._buf[0xe] = (*(undefined1 *)((char *)&(parsedEntity.subtype) + 0x2)); + scratchString._buf[0xf] = (*(undefined1 *)((char *)&(parsedEntity.subtype) + 0x3)); + scratchString._capacity = GHIDRA_UINT(parsedEntity.stageHP); bVar3 = str_eq((byte *)psVar15,parsedEntity.gridCollisionClassString._size,(byte *)"ground",6); if ((bVar3 == 0) && ((uVar4 != 0 || (parsedEntity.gridCollisionPoints < 1)))) { pEVar16 = (EntityConfig *)&pEVar21[1]._players._end; @@ -2908,49 +2908,49 @@ LAB_00698436: std::vector<20byte>::_Emplace_reallocate(piVar5,scratchString._buf + 4); } else { - *piVar5 = scratchString._buf._4_4_; - piVar5[1] = scratchString._buf._8_4_; - piVar5[2] = scratchString._buf._12_4_; + *piVar5 = (*(undefined4 *)((char *)&(scratchString._buf) + 0x4)); + piVar5[1] = (*(undefined4 *)((char *)&(scratchString._buf) + 0x8)); + piVar5[2] = (*(undefined4 *)((char *)&(scratchString._buf) + 0xc)); piVar5[3] = scratchString._size; piVar5[4] = scratchString._capacity; ppvVar1 = (void **)&(pEVar16->_entities)._size; - *ppvVar1 = (void *)((int)*ppvVar1 + 0x14); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 0x14); } } - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; ((std::string *)(parsedEntity.bestiaryFloorAlt._buf))->std::string::_Tidy_deallocate(); ((std::string *)(parsedEntity.bestiaryOverlay._buf))->std::string::_Tidy_deallocate(); ((std::string *)(parsedEntity.bestiaryAnim._buf))->std::string::_Tidy_deallocate(); if (0xf < parsedEntity.bestiaryAnm2Path._capacity) { uVar4 = parsedEntity.bestiaryAnm2Path._capacity + 1; - pvVar7 = (void *)parsedEntity.bestiaryAnm2Path._buf._0_4_; + pvVar7 = (*(undefined4 *)((char *)&((void *)parsedEntity.bestiaryAnm2Path._buf) + 0x0)); if (0xfff < uVar4) { - pvVar7 = *(void **)(parsedEntity.bestiaryAnm2Path._buf._0_4_ + -4); + pvVar7 = *(void **)((*(undefined4 *)((char *)&(parsedEntity.bestiaryAnm2Path._buf) + 0x0)) + -4); uVar4 = parsedEntity.bestiaryAnm2Path._capacity + 0x24; - if (0x1f < (parsedEntity.bestiaryAnm2Path._buf._0_4_ - (int)pvVar7) - 4U) goto LAB_006989c8; + if (0x1f < ((*(undefined4 *)((char *)&(parsedEntity.bestiaryAnm2Path._buf) + 0x0)) - GHIDRA_INT(pvVar7)) - 4U) goto LAB_006989c8; } operator_delete(pvVar7,uVar4); } parsedEntity.bestiaryAnm2Path._size = 0; parsedEntity.bestiaryAnm2Path._capacity = 0xf; - parsedEntity.bestiaryAnm2Path._buf._0_4_ = parsedEntity.bestiaryAnm2Path._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(parsedEntity.bestiaryAnm2Path._buf) + 0x0)) = (*(undefined4 *)((char *)&(parsedEntity.bestiaryAnm2Path._buf) + 0x0)) & 0xffffff00; ((std::string *)(parsedEntity.gridCollisionClassString._buf))->std::string::_Tidy_deallocate(); std::vector<12byte>::_Tidy(); FID_conflict__Tidy(&parsedEntity.preloadSounds); FUN_0069db30(); if (0xf < parsedEntity.anm2Path._capacity) { uVar4 = parsedEntity.anm2Path._capacity + 1; - pvVar7 = (void *)parsedEntity.anm2Path._buf._0_4_; + pvVar7 = (*(undefined4 *)((char *)&((void *)parsedEntity.anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - pvVar7 = *(void **)(parsedEntity.anm2Path._buf._0_4_ + -4); + pvVar7 = *(void **)((*(undefined4 *)((char *)&(parsedEntity.anm2Path._buf) + 0x0)) + -4); uVar4 = parsedEntity.anm2Path._capacity + 0x24; - if (0x1f < (parsedEntity.anm2Path._buf._0_4_ - (int)pvVar7) - 4U) goto LAB_006989c8; + if (0x1f < ((*(undefined4 *)((char *)&(parsedEntity.anm2Path._buf) + 0x0)) - GHIDRA_INT(pvVar7)) - 4U) goto LAB_006989c8; } operator_delete(pvVar7,uVar4); } parsedEntity.anm2Path._size = 0; parsedEntity.anm2Path._capacity = 0xf; - parsedEntity.anm2Path._buf._0_4_ = parsedEntity.anm2Path._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(parsedEntity.anm2Path._buf) + 0x0)) = (*(undefined4 *)((char *)&(parsedEntity.anm2Path._buf) + 0x0)) & 0xffffff00; FUN_0069dbc0(); ((std::string *)(parsedEntity.name._buf))->std::string::_Tidy_deallocate(); entityNode = *(void **)((char *)entityNode + 0x2c); @@ -2969,7 +2969,7 @@ LAB_00696f51: literalCursor = (byte *)*puVar20; if (compareChar != *pcVar23) { LAB_00696fb2: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_00696fb7; } if (compareChar == 0) break; @@ -3001,7 +3001,7 @@ LAB_00696fb7: literalCursor = (byte *)*puVar20; if (compareChar != *pcVar23) { LAB_0069702a: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069702f; } if (compareChar == 0) break; @@ -3025,7 +3025,7 @@ LAB_0069702f: isLess = bVar3 < *literalCursor; if (bVar3 != *literalCursor) { LAB_00697065: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069706a; } if (bVar3 == 0) break; @@ -3055,7 +3055,7 @@ LAB_0069787f: literalCursor = (byte *)*puVar20; if (compareChar != *pbVar12) { LAB_006970ca: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_006970cf; } if (compareChar == 0) break; @@ -3079,7 +3079,7 @@ LAB_006970cf: isLess = bVar3 < *literalCursor; if (bVar3 != *literalCursor) { LAB_00697105: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069710a; } if (bVar3 == 0) break; @@ -3108,7 +3108,7 @@ LAB_0069710a: literalCursor = (byte *)*puVar20; if (compareChar != *pbVar12) { LAB_0069716a: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069716f; } if (compareChar == 0) break; @@ -3132,7 +3132,7 @@ LAB_0069716f: isLess = bVar3 < *literalCursor; if (bVar3 != *literalCursor) { LAB_006971a5: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_006971aa; } if (bVar3 == 0) break; @@ -3161,7 +3161,7 @@ LAB_006971aa: literalCursor = (byte *)*puVar20; if (compareChar != *pbVar12) { LAB_0069720a: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069720f; } if (compareChar == 0) break; @@ -3185,7 +3185,7 @@ LAB_0069720f: isLess = bVar3 < *literalCursor; if (bVar3 != *literalCursor) { LAB_00697245: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069724a; } if (bVar3 == 0) break; @@ -3214,7 +3214,7 @@ LAB_0069724a: literalCursor = (byte *)*puVar20; if (compareChar != *pcVar23) { LAB_006972aa: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_006972af; } if (compareChar == 0) break; @@ -3238,7 +3238,7 @@ LAB_006972af: isLess = bVar3 < *literalCursor; if (bVar3 != *literalCursor) { LAB_006972e5: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_006972ea; } if (bVar3 == 0) break; @@ -3267,7 +3267,7 @@ LAB_006972ea: literalCursor = (byte *)*puVar20; if (compareChar != *pbVar12) { LAB_0069734a: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069734f; } if (compareChar == 0) break; @@ -3291,7 +3291,7 @@ LAB_0069734f: isLess = bVar3 < *literalCursor; if (bVar3 != *literalCursor) { LAB_00697385: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069738a; } if (bVar3 == 0) break; @@ -3320,7 +3320,7 @@ LAB_0069738a: literalCursor = (byte *)*puVar20; if (compareChar != *pbVar12) { LAB_006973ea: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_006973ef; } if (compareChar == 0) break; @@ -3344,7 +3344,7 @@ LAB_006973ef: isLess = bVar3 < *literalCursor; if (bVar3 != *literalCursor) { LAB_00697425: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069742a; } if (bVar3 == 0) break; @@ -3373,7 +3373,7 @@ LAB_0069742a: literalCursor = (byte *)*puVar20; if (compareChar != *pbVar12) { LAB_0069748a: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069748f; } if (compareChar == 0) break; @@ -3397,7 +3397,7 @@ LAB_0069748f: isLess = bVar3 < *literalCursor; if (bVar3 != *literalCursor) { LAB_006974c5: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_006974ca; } if (bVar3 == 0) break; @@ -3426,7 +3426,7 @@ LAB_006974ca: literalCursor = (byte *)*puVar20; if (compareChar != *pcVar23) { LAB_0069752a: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069752f; } if (compareChar == 0) break; @@ -3450,7 +3450,7 @@ LAB_0069752f: isLess = bVar3 < *literalCursor; if (bVar3 != *literalCursor) { LAB_00697565: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069756a; } if (bVar3 == 0) break; @@ -3479,7 +3479,7 @@ LAB_0069756a: literalCursor = (byte *)*puVar20; if (compareChar != *pcVar23) { LAB_006975ca: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_006975cf; } if (compareChar == 0) break; @@ -3503,7 +3503,7 @@ LAB_006975cf: isLess = bVar3 < *literalCursor; if (bVar3 != *literalCursor) { LAB_00697605: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069760a; } if (bVar3 == 0) break; @@ -3532,7 +3532,7 @@ LAB_0069760a: literalCursor = (byte *)*puVar20; if (compareChar != *pcVar23) { LAB_0069766a: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069766f; } if (compareChar == 0) break; @@ -3556,7 +3556,7 @@ LAB_0069766f: isLess = bVar3 < *literalCursor; if (bVar3 != *literalCursor) { LAB_006976a5: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_006976aa; } if (bVar3 == 0) break; @@ -3585,7 +3585,7 @@ LAB_006976aa: literalCursor = (byte *)*puVar20; if (compareChar != *pcVar23) { LAB_0069770a: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069770f; } if (compareChar == 0) break; @@ -3609,7 +3609,7 @@ LAB_0069770f: isLess = bVar3 < *literalCursor; if (bVar3 != *literalCursor) { LAB_00697745: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069774a; } if (bVar3 == 0) break; @@ -3638,7 +3638,7 @@ LAB_0069774a: literalCursor = (byte *)*puVar20; if (compareChar != *pbVar12) { LAB_006977aa: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_006977af; } if (compareChar == 0) break; @@ -3662,7 +3662,7 @@ LAB_006977af: isLess = bVar3 < *literalCursor; if (bVar3 != *literalCursor) { LAB_006977e5: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_006977ea; } if (bVar3 == 0) break; @@ -3690,7 +3690,7 @@ LAB_006977ea: isLess = bVar3 < *literalCursor; if (bVar3 != *literalCursor) { LAB_00697830: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_00697835; } if (bVar3 == 0) break; @@ -3713,7 +3713,7 @@ LAB_00697835: isLess = bVar3 < *literalCursor; if (bVar3 != *literalCursor) { LAB_00697870: - uVar11 = -(uint)isLess | 1; + uVar11 = -GHIDRA_UINT(isLess) | 1; goto LAB_00697875; } if (bVar3 == 0) break; @@ -3761,7 +3761,7 @@ joined_r0x00697902: isLess = bVar3 < (byte)*pcVar23; if (bVar3 != *pcVar23) { LAB_00697994: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00697999; } if (bVar3 == 0) break; @@ -3781,35 +3781,35 @@ LAB_00697999: literalCursor = *(byte **)((char *)pbVar13 + 4); } scratchString._capacity = 0xf; - scratchString._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) = (std_string *)0x0; pbVar12 = literalCursor; do { bVar3 = *pbVar12; pbVar12 = pbVar12 + 1; } while (bVar3 != 0); - ((std::string *)(scratchString._buf))->std::string::assign(literalCursor,(int)pbVar12 - (int)(literalCursor + 1)); - local_14._0_1_ = 0x1b; + ((std::string *)(scratchString._buf))->std::string::assign(literalCursor,GHIDRA_INT(pbVar12) - GHIDRA_INT((literalCursor + 1))); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1b; tempDtorFlags = tempDtorFlags | 4; bestiaryTransformParts = (char *)0x0; bestiaryTransformPartsEnd = 0; bestiaryTransformPartsCapacity = 0; uStack_10228 = tempDtorFlags; - string_split(&scratchString,(std_string *)CONCAT31((int3)((uint)extraout_EDX_01 >> 8),0x2c), + string_split(&scratchString,(std_string *)CONCAT31((int3)(GHIDRA_UINT(extraout_EDX_01) >> 8),0x2c), (byte)&bestiaryTransformParts); - local_14._0_1_ = 0x1c; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1c; if (0xf < scratchString._capacity) { uVar4 = scratchString._capacity + 1; - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); if (0xfff < uVar4) { - psVar15 = (std_string *)((std_string *)(scratchString._buf._0_4_ + -0x18))->_capacity; + psVar15 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + -0x18))->_capacity; uVar4 = scratchString._capacity + 0x24; - if ((byte *)0x1f < (byte *)(scratchString._buf._0_4_ + (-4 - (int)psVar15))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar15)))) goto LAB_006989c8; } operator_delete(psVar15,uVar4); } pcVar23 = bestiaryTransformParts; - if ((bestiaryTransformPartsEnd - (int)bestiaryTransformParts) / 0x18 == 3) { + if ((bestiaryTransformPartsEnd - GHIDRA_INT(bestiaryTransformParts)) / 0x18 == 3) { charCursor = bestiaryTransformParts; if (0xf < *(uint *)(bestiaryTransformParts + 0x14)) { charCursor = *(char **)bestiaryTransformParts; @@ -3830,7 +3830,7 @@ LAB_00697999: parsedEntity.bestiaryScale = (float)dVar22; } tempDtorFlags = tempDtorFlags & 0xfffffffb; - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; std::vector::_Tidy(); } else { @@ -3844,7 +3844,7 @@ LAB_00697999: isLess = bVar3 < (byte)*pcVar23; if (bVar3 != *pcVar23) { LAB_00697b24: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00697b29; } if (bVar3 == 0) break; @@ -3863,43 +3863,43 @@ LAB_00697b29: literalCursor = *(byte **)((char *)pbVar13 + 4); } scratchString._capacity = 0xf; - scratchString._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) = (std_string *)0x0; pbVar13 = literalCursor; do { bVar3 = *pbVar13; pbVar13 = pbVar13 + 1; } while (bVar3 != 0); - ((std::string *)(scratchString._buf))->std::string::assign(literalCursor,(int)pbVar13 - (int)(literalCursor + 1)); - local_14._0_1_ = 0x1e; + ((std::string *)(scratchString._buf))->std::string::assign(literalCursor,GHIDRA_INT(pbVar13) - GHIDRA_INT((literalCursor + 1))); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1e; tempDtorFlags = tempDtorFlags | 8; bestiaryParentParts = (char *)0x0; bestiaryParentPartsEnd = 0; bestiaryParentPartsCapacity = 0; uStack_10228 = tempDtorFlags; - string_split(&scratchString,(std_string *)CONCAT31((int3)((uint)extraout_EDX_02 >> 8),0x2e), + string_split(&scratchString,(std_string *)CONCAT31((int3)(GHIDRA_UINT(extraout_EDX_02) >> 8),0x2e), (byte)&bestiaryParentParts); - local_14._0_1_ = 0x1f; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1f; if (0xf < scratchString._capacity) { uVar4 = scratchString._capacity + 1; - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); if (0xfff < uVar4) { - psVar15 = (std_string *)((std_string *)(scratchString._buf._0_4_ + -0x18))->_capacity; + psVar15 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + -0x18))->_capacity; uVar4 = scratchString._capacity + 0x24; - if ((byte *)0x1f < (byte *)(scratchString._buf._0_4_ + (-4 - (int)psVar15))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar15)))) goto LAB_006989c8; } operator_delete(psVar15,uVar4); } pcVar23 = bestiaryParentParts; - iVar6 = bestiaryParentPartsEnd - (int)bestiaryParentParts >> 0x1f; - iVar18 = (bestiaryParentPartsEnd - (int)bestiaryParentParts) / 0x18 + iVar6; + iVar6 = bestiaryParentPartsEnd - GHIDRA_INT(bestiaryParentParts) >> 0x1f; + iVar18 = (bestiaryParentPartsEnd - GHIDRA_INT(bestiaryParentParts)) / 0x18 + iVar6; if (iVar18 != iVar6) { charCursor = bestiaryParentParts; if (0xf < *(uint *)(bestiaryParentParts + 0x14)) { charCursor = *(char **)bestiaryParentParts; } parsedEntity.bestiaryParentType = atoi(charCursor); - if (1 < (uint)(iVar18 - iVar6)) { + if (1 < GHIDRA_UINT((iVar18 - iVar6))) { charCursor = pcVar23 + 0x18; if (0xf < *(uint *)(pcVar23 + 0x2c)) { charCursor = *(char **)charCursor; @@ -3908,7 +3908,7 @@ LAB_00697b29: } } tempDtorFlags = tempDtorFlags & 0xfffffff7; - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; std::vector::_Tidy(); pbVar13 = pbStack_10230; } @@ -3923,7 +3923,7 @@ LAB_00697b29: isLess = bVar3 < *literalCursor; if (bVar3 != *literalCursor) { LAB_00697ca4: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00697ca9; } if (bVar3 == 0) break; @@ -3945,7 +3945,7 @@ LAB_00697ca9: bVar3 = *pbVar12; pbVar12 = pbVar12 + 1; } while (bVar3 != 0); - psVar15 = (std_string *)(pbVar12 + -(int)(literalCursor + 1)); + psVar15 = (std_string *)(pbVar12 + -GHIDRA_INT((literalCursor + 1))); if ((std_string *)(0x7fffffff - anm2RootSize) < psVar15) { LAB_00698aa1: /* WARNING: Subroutine does not return */ @@ -3956,12 +3956,12 @@ LAB_00698aa1: textData = anm2Root[0]; } ((std::string *)(scratchString._buf))->std::string::concat(iStack_10250,psVar15,(byte *)textData,anm2RootSize, - literalCursor,(uint)psVar15); + literalCursor,GHIDRA_UINT(psVar15)); tempDtorFlags = tempDtorFlags | 0x10; ((std::string *)(parsedEntity.bestiaryAnm2Path._buf))->std::string::_Tidy_deallocate(); - uVar14 = scratchString._buf._0_4_; - scratchString._buf._0_4_ = scratchString._buf._0_4_ & 0xffffff00; - uVar2 = scratchString._buf._0_4_; + uVar14 = (*(undefined4 *)((char *)&(scratchString._buf) + 0x0)); + (*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) = (*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) & 0xffffff00; + uVar2 = (*(undefined4 *)((char *)&(scratchString._buf) + 0x0)); scratchString._buf[0] = (char)uVar14; scratchString._buf[1] = SUB41(uVar14,1); scratchString._buf[2] = SUB41(uVar14,2); @@ -3986,7 +3986,7 @@ LAB_00698aa1: parsedEntity.bestiaryAnm2Path._capacity = scratchString._capacity; scratchString._size = 0; scratchString._capacity = 0xf; - scratchString._buf._0_4_ = uVar2; + (*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) = uVar2; ((std::string *)(scratchString._buf))->std::string::_Tidy_deallocate(); } else { @@ -4000,7 +4000,7 @@ LAB_00698aa1: isLess = bVar3 < *literalCursor; if (bVar3 != *literalCursor) { LAB_00697d74: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00697d79; } if (bVar3 == 0) break; @@ -4022,7 +4022,7 @@ LAB_00697d79: bVar3 = *pbVar12; pbVar12 = pbVar12 + 1; } while (bVar3 != 0); - uVar4 = (int)pbVar12 - (int)(literalCursor + 1); + uVar4 = GHIDRA_INT(pbVar12) - GHIDRA_INT((literalCursor + 1)); psVar15 = &parsedEntity.bestiaryAnim; } else { @@ -4036,7 +4036,7 @@ LAB_00697d79: isLess = bVar3 < (byte)*pcVar23; if (bVar3 != *pcVar23) { LAB_00697dd4: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00697dd9; } if (bVar3 == 0) break; @@ -4058,7 +4058,7 @@ LAB_00697dd9: bVar3 = *pbVar12; pbVar12 = pbVar12 + 1; } while (bVar3 != 0); - uVar4 = (int)pbVar12 - (int)(literalCursor + 1); + uVar4 = GHIDRA_INT(pbVar12) - GHIDRA_INT((literalCursor + 1)); psVar15 = &parsedEntity.bestiaryOverlay; } else { @@ -4072,7 +4072,7 @@ LAB_00697dd9: isLess = bVar3 < *literalCursor; if (bVar3 != *literalCursor) { LAB_00697e31: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00697e36; } if (bVar3 == 0) break; @@ -4094,7 +4094,7 @@ LAB_00697e36: bVar3 = *pbVar12; pbVar12 = pbVar12 + 1; } while (bVar3 != 0); - uVar4 = (int)pbVar12 - (int)(literalCursor + 1); + uVar4 = GHIDRA_INT(pbVar12) - GHIDRA_INT((literalCursor + 1)); psVar15 = &parsedEntity.bestiaryFloorAlt; } } @@ -4129,7 +4129,7 @@ LAB_006983c0: isLess = bVar3 < *pbVar12; if (bVar3 != *pbVar12) { LAB_006984b5: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_006984ba; } if (bVar3 == 0) break; @@ -4148,16 +4148,16 @@ LAB_006984ba: pbVar13 = (byte *)puVar20[1]; } scratchString._capacity = 0xf; - scratchString._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) = (std_string *)0x0; literalCursor = pbVar13; do { bVar3 = *literalCursor; literalCursor = literalCursor + 1; } while (bVar3 != 0); - ((std::string *)(scratchString._buf))->std::string::assign(pbVar13,(int)literalCursor - (int)(pbVar13 + 1)); - local_14 = (byte ******)CONCAT31(local_14._1_3_,0x21); + ((std::string *)(scratchString._buf))->std::string::assign(pbVar13,GHIDRA_INT(literalCursor) - GHIDRA_INT((pbVar13 + 1))); + local_14 = (byte ******)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x21); string_split(&devolveIdParts,&scratchString,0x2e); - if ((devolveIdPartsEnd - (int)devolveIdParts) / 0x18 == 3) { + if ((devolveIdPartsEnd - GHIDRA_INT(devolveIdParts)) / 0x18 == 3) { pcVar23 = devolveIdParts; if (0xf < *(uint *)(devolveIdParts + 0x14)) { pcVar23 = *(char **)devolveIdParts; @@ -4175,14 +4175,14 @@ LAB_006984ba: uStack_10228 = atoi(pcVar23); } std::vector::_Tidy(); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; if (0xf < scratchString._capacity) { uVar4 = scratchString._capacity + 1; - psVar15 = (std_string *)scratchString._buf._0_4_; + psVar15 = (*(undefined4 *)((char *)&((std_string *)scratchString._buf) + 0x0)); if (0xfff < uVar4) { - psVar15 = (std_string *)((std_string *)(scratchString._buf._0_4_ + -0x18))->_capacity; + psVar15 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + -0x18))->_capacity; uVar4 = scratchString._capacity + 0x24; - if ((byte *)0x1f < (byte *)(scratchString._buf._0_4_ + (-4 - (int)psVar15))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar15)))) goto LAB_006989c8; } operator_delete(psVar15,uVar4); @@ -4199,7 +4199,7 @@ LAB_006984ba: isLess = bVar3 < (byte)*pcVar23; if (bVar3 != *pcVar23) { LAB_00698610: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00698615; } if (bVar3 == 0) break; @@ -4232,7 +4232,7 @@ LAB_00698615: *(byte **)parsedEntity.devolve._end = pbStack_10230; *(undefined4 *)((char *)parsedEntity.devolve._end + 4) = devolveVariantSubtype; *(undefined4 *)((char *)parsedEntity.devolve._end + 8) = 0x3f800000; - parsedEntity.devolve._end = (void *)((int)parsedEntity.devolve._end + 0xc); + parsedEntity.devolve._end = (void *)(GHIDRA_INT(parsedEntity.devolve._end) + 0xc); } pcVar23 = "devolve"; do { @@ -4251,9 +4251,9 @@ LAB_00698615: pcVar23 = (char *)puStack_1022c[2]; } if (pcVar23 == charCursor + -0xb66e1f) { - literalCursor = (byte *)(pcVar23 + (int)pbVar13); + literalCursor = (byte *)(pcVar23 + GHIDRA_INT(pbVar13)); if (literalCursor <= pbVar13) goto LAB_006983c0; - iVar6 = (int)"devolve" - (int)pbVar13; + iVar6 = GHIDRA_INT("devolve") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar6]) { pbVar13 = pbVar13 + 1; if (literalCursor <= pbVar13) goto LAB_006983c0; @@ -4314,7 +4314,7 @@ byte EntityConfig::load_boss_colors(byte *path) local_14 = 0xffffffff; puStack_18 = &LAB_00af9beb; local_1c = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 0x10U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; file = ((FileSystem *)(&PTR_vftable_00c37a10))->FileSystem::Open(path,(int *)0x0); if (file == (int *)0x0) { @@ -4332,14 +4332,14 @@ byte EntityConfig::load_boss_colors(byte *path) pbVar6 = text; ((rapidxml::xml_document *)(doc))->rapidxml::xml_document::parse(text); bVar1 = (byte)pbVar6; - xmlNode = ((xml_node *)(doc))->xml_node::first_node((byte *)"bosscolors",(int)pcVar10,bVar1); + xmlNode = ((xml_node *)(doc))->xml_node::first_node((byte *)"bosscolors",GHIDRA_INT(pcVar10),bVar1); if (xmlNode == (void *)0x0) { pcVar10 = "Could not find root node \'bosscolors\' in %s\n"; pbVar6 = path; KAGE_LogMessage(0x10,(byte *)"Could not find root node \'bosscolors\' in %s\n"); bVar1 = (byte)pbVar6; } - pvVar4 = ((xml_node *)(xmlNode))->xml_node::first_attribute((byte *)"version",(uint)pcVar10,bVar1); + pvVar4 = ((xml_node *)(xmlNode))->xml_node::first_attribute((byte *)"version",GHIDRA_UINT(pcVar10),bVar1); pbVar6 = &g_xmlNullStr; if (*(byte **)((char *)pvVar4 + 4) != (byte *)0x0) { pbVar6 = *(byte **)((char *)pvVar4 + 4); @@ -4365,9 +4365,9 @@ byte EntityConfig::load_boss_colors(byte *path) portraitRoot._buf[1] = '\0'; portraitRoot._buf[2] = '\0'; portraitRoot._buf[3] = '\0'; - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0 < iVar3) { - pvVar4 = ((xml_node *)(xmlNode))->xml_node::first_attribute((byte *)"anm2root",(uint)pbVar11,bVar1); + pvVar4 = ((xml_node *)(xmlNode))->xml_node::first_attribute((byte *)"anm2root",GHIDRA_UINT(pbVar11),bVar1); pbVar6 = &g_xmlNullStr; if (*(byte **)((char *)pvVar4 + 4) != (byte *)0x0) { pbVar6 = *(byte **)((char *)pvVar4 + 4); @@ -4377,9 +4377,9 @@ byte EntityConfig::load_boss_colors(byte *path) bVar1 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar1 != 0); - uVar2 = (int)pbVar11 - (int)(pbVar6 + 1); + uVar2 = GHIDRA_INT(pbVar11) - GHIDRA_INT((pbVar6 + 1)); ((std::string *)(anm2Root._buf))->std::string::assign(pbVar6,uVar2); - pvVar4 = ((xml_node *)(xmlNode))->xml_node::first_attribute((byte *)"portraitroot",(uint)pbVar6,(byte)uVar2); + pvVar4 = ((xml_node *)(xmlNode))->xml_node::first_attribute((byte *)"portraitroot",GHIDRA_UINT(pbVar6),(byte)uVar2); pbVar11 = &g_xmlNullStr; if (*(byte **)((char *)pvVar4 + 4) != (byte *)0x0) { pbVar11 = *(byte **)((char *)pvVar4 + 4); @@ -4389,11 +4389,11 @@ byte EntityConfig::load_boss_colors(byte *path) bVar1 = *pbVar6; pbVar6 = pbVar6 + 1; } while (bVar1 != 0); - uVar2 = (int)pbVar6 - (int)(pbVar11 + 1); + uVar2 = GHIDRA_INT(pbVar6) - GHIDRA_INT((pbVar11 + 1)); ((std::string *)(portraitRoot._buf))->std::string::assign(pbVar11,uVar2); bVar1 = (byte)uVar2; } - for (xmlNode = ((xml_node *)(xmlNode))->xml_node::first_node(&DAT_00b66bc8,(int)pbVar11,bVar1); + for (xmlNode = ((xml_node *)(xmlNode))->xml_node::first_node(&DAT_00b66bc8,GHIDRA_INT(pbVar11),bVar1); xmlNode != (void *)0x0; xmlNode = *(void **)((char *)xmlNode + 0x2c)) { for (attr = *(undefined4 **)((char *)xmlNode + 0x20); attr != (undefined4 *)0x0; attr = (undefined4 *)attr[6]) { @@ -4408,7 +4408,7 @@ byte EntityConfig::load_boss_colors(byte *path) bVar9 = bVar1 < *pbVar7; if (bVar1 != *pbVar7) { LAB_006990e1: - uVar2 = -(uint)bVar9 | 1; + uVar2 = -GHIDRA_UINT(bVar9) | 1; goto LAB_006990e6; } if (bVar1 == 0) break; @@ -4438,7 +4438,7 @@ LAB_006990e6: bVar9 = bVar1 < (byte)*pcVar10; if (bVar1 != *pcVar10) { LAB_00699135: - uVar2 = -(uint)bVar9 | 1; + uVar2 = -GHIDRA_UINT(bVar9) | 1; goto LAB_0069913a; } if (bVar1 == 0) break; @@ -4484,9 +4484,9 @@ LAB_0069913a: pcVar10 = (char *)colorNode[2]; } if (pcVar10 == colorTagLast + -0xb66e47) { - pbVar11 = pbVar6 + (int)pcVar10; + pbVar11 = pbVar6 + GHIDRA_INT(pcVar10); if (pbVar11 <= pbVar6) goto LAB_00699233; - iVar8 = (int)"color" - (int)pbVar6; + iVar8 = GHIDRA_INT("color") - GHIDRA_INT(pbVar6); while (*pbVar6 == pbVar6[iVar8]) { pbVar6 = pbVar6 + 1; if (pbVar11 <= pbVar6) goto LAB_00699233; @@ -4522,7 +4522,7 @@ LAB_00699233: portraitPath._buf[1] = '\0'; portraitPath._buf[2] = '\0'; portraitPath._buf[3] = '\0'; - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; attr = (undefined4 *)colorNode[8]; if (attr != (undefined4 *)0x0) { do { @@ -4537,7 +4537,7 @@ LAB_00699233: bVar9 = bVar1 < *pbVar7; if (bVar1 != *pbVar7) { LAB_00699322: - uVar2 = -(uint)bVar9 | 1; + uVar2 = -GHIDRA_UINT(bVar9) | 1; goto LAB_00699327; } if (bVar1 == 0) break; @@ -4583,7 +4583,7 @@ LAB_00699327: bVar9 = bVar1 < (byte)*pcVar10; if (bVar1 != *pcVar10) { LAB_006993c4: - uVar2 = -(uint)bVar9 | 1; + uVar2 = -GHIDRA_UINT(bVar9) | 1; goto LAB_006993c9; } if (bVar1 == 0) break; @@ -4605,7 +4605,7 @@ LAB_006993c9: bVar1 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar1 != 0); - ((std::string *)((char *)local_ac))->std::string::assign(pbVar6,(int)pbVar11 - (int)(pbVar6 + 1)); + ((std::string *)((char *)local_ac))->std::string::assign(pbVar6,GHIDRA_INT(pbVar11) - GHIDRA_INT((pbVar6 + 1))); } else { pbVar7 = &DAT_00b66cc8; @@ -4618,7 +4618,7 @@ LAB_006993c9: bVar9 = bVar1 < *pbVar7; if (bVar1 != *pbVar7) { LAB_00699430: - uVar2 = -(uint)bVar9 | 1; + uVar2 = -GHIDRA_UINT(bVar9) | 1; goto LAB_00699435; } if (bVar1 == 0) break; @@ -4640,7 +4640,7 @@ LAB_00699435: bVar1 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar1 != 0); - valueLength = (std_string *)(pbVar11 + -(int)(pbVar6 + 1)); + valueLength = (std_string *)(pbVar11 + -GHIDRA_INT((pbVar6 + 1))); if ((std_string *)(0x7fffffff - anm2Root._size) < valueLength) { LAB_00699898: /* WARNING: Subroutine does not return */ @@ -4648,17 +4648,17 @@ LAB_00699898: } psVar5 = &anm2Root; if (0xf < anm2Root._capacity) { - psVar5 = (std_string *)anm2Root._buf._0_4_; + psVar5 = (*(undefined4 *)((char *)&((std_string *)anm2Root._buf) + 0x0)); } - ((std::string *)(joinedPath._buf))->std::string::concat((int)bossColorsEnd,valueLength,(byte *)psVar5, - anm2Root._size,pbVar6,(uint)valueLength); + ((std::string *)(joinedPath._buf))->std::string::concat(GHIDRA_INT(bossColorsEnd),valueLength,(byte *)psVar5, + anm2Root._size,pbVar6,GHIDRA_UINT(valueLength)); if (0xf < anm2Path._capacity) { uVar2 = anm2Path._capacity + 1; - pvVar4 = (void *)anm2Path._buf._0_4_; + pvVar4 = (*(undefined4 *)((char *)&((void *)anm2Path._buf) + 0x0)); if (0xfff < uVar2) { - pvVar4 = *(void **)(anm2Path._buf._0_4_ + -4); + pvVar4 = *(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar2 = anm2Path._capacity + 0x24; - if (0x1f < (anm2Path._buf._0_4_ - (int)pvVar4) - 4U) goto LAB_00699821; + if (0x1f < ((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) - GHIDRA_INT(pvVar4)) - 4U) goto LAB_00699821; } operator_delete(pvVar4,uVar2); } @@ -4692,7 +4692,7 @@ LAB_00699898: bVar9 = bVar1 < (byte)*pcVar10; if (bVar1 != *pcVar10) { LAB_00699530: - uVar2 = -(uint)bVar9 | 1; + uVar2 = -GHIDRA_UINT(bVar9) | 1; goto LAB_00699535; } if (bVar1 == 0) break; @@ -4714,22 +4714,22 @@ LAB_00699535: bVar1 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar1 != 0); - valueLength = (std_string *)(pbVar11 + -(int)(pbVar6 + 1)); + valueLength = (std_string *)(pbVar11 + -GHIDRA_INT((pbVar6 + 1))); if ((std_string *)(0x7fffffff - portraitRoot._size) < valueLength) goto LAB_00699898; psVar5 = &portraitRoot; if (0xf < portraitRoot._capacity) { - psVar5 = (std_string *)portraitRoot._buf._0_4_; + psVar5 = (*(undefined4 *)((char *)&((std_string *)portraitRoot._buf) + 0x0)); } - ((std::string *)(joinedPath._buf))->std::string::concat((int)bossColorsEnd,valueLength,(byte *)psVar5, - portraitRoot._size,pbVar6,(uint)valueLength); + ((std::string *)(joinedPath._buf))->std::string::concat(GHIDRA_INT(bossColorsEnd),valueLength,(byte *)psVar5, + portraitRoot._size,pbVar6,GHIDRA_UINT(valueLength)); if (0xf < portraitPath._capacity) { uVar2 = portraitPath._capacity + 1; - pvVar4 = (void *)portraitPath._buf._0_4_; + pvVar4 = (*(undefined4 *)((char *)&((void *)portraitPath._buf) + 0x0)); if (0xfff < uVar2) { - pvVar4 = *(void **)(portraitPath._buf._0_4_ + -4); + pvVar4 = *(void **)((*(undefined4 *)((char *)&(portraitPath._buf) + 0x0)) + -4); uVar2 = portraitPath._capacity + 0x24; - if (0x1f < (portraitPath._buf._0_4_ - (int)pvVar4) - 4U) + if (0x1f < ((*(undefined4 *)((char *)&(portraitPath._buf) + 0x0)) - GHIDRA_INT(pvVar4)) - 4U) goto LAB_00699821; } operator_delete(pvVar4,uVar2); @@ -4751,7 +4751,7 @@ LAB_00699535: bVar9 = bVar1 < (byte)*pcVar10; if (bVar1 != *pcVar10) { LAB_00699625: - uVar2 = -(uint)bVar9 | 1; + uVar2 = -GHIDRA_UINT(bVar9) | 1; goto LAB_0069962a; } if (bVar1 == 0) break; @@ -4781,7 +4781,7 @@ LAB_0069962a: bVar9 = bVar1 < *pbVar7; if (bVar1 != *pbVar7) { LAB_00699676: - uVar2 = -(uint)bVar9 | 1; + uVar2 = -GHIDRA_UINT(bVar9) | 1; goto LAB_0069967b; } if (bVar1 == 0) break; @@ -4814,26 +4814,26 @@ LAB_0069967b: else { ((Color *)(bossColorsEnd))->Color::copy_constructor_ext(&bossColor); bossColorsEndPtr = &(entityConfig->_bossColors)._end; - *bossColorsEndPtr = (void *)((int)*bossColorsEndPtr + 0x7c); + *bossColorsEndPtr = (void *)(GHIDRA_INT(*bossColorsEndPtr) + 0x7c); } - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < portraitPath._capacity) { uVar2 = portraitPath._capacity + 1; - pvVar4 = (void *)portraitPath._buf._0_4_; + pvVar4 = (*(undefined4 *)((char *)&((void *)portraitPath._buf) + 0x0)); if (0xfff < uVar2) { - pvVar4 = *(void **)(portraitPath._buf._0_4_ + -4); + pvVar4 = *(void **)((*(undefined4 *)((char *)&(portraitPath._buf) + 0x0)) + -4); uVar2 = portraitPath._capacity + 0x24; - if (0x1f < (portraitPath._buf._0_4_ - (int)pvVar4) - 4U) goto LAB_00699821; + if (0x1f < ((*(undefined4 *)((char *)&(portraitPath._buf) + 0x0)) - GHIDRA_INT(pvVar4)) - 4U) goto LAB_00699821; } operator_delete(pvVar4,uVar2); } if (0xf < anm2Path._capacity) { uVar2 = anm2Path._capacity + 1; - pvVar4 = (void *)anm2Path._buf._0_4_; + pvVar4 = (*(undefined4 *)((char *)&((void *)anm2Path._buf) + 0x0)); if (0xfff < uVar2) { - pvVar4 = *(void **)(anm2Path._buf._0_4_ + -4); + pvVar4 = *(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar2 = anm2Path._capacity + 0x24; - if (0x1f < (anm2Path._buf._0_4_ - (int)pvVar4) - 4U) goto LAB_00699821; + if (0x1f < ((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) - GHIDRA_INT(pvVar4)) - 4U) goto LAB_00699821; } operator_delete(pvVar4,uVar2); } @@ -4841,9 +4841,9 @@ LAB_0069967b: uVar2 = suffixCapacity + 1; pvVar4 = local_ac[0]; if (0xfff < uVar2) { - pvVar4 = *(void **)((int)local_ac[0] + -4); + pvVar4 = *(void **)(GHIDRA_INT(local_ac[0]) + -4); uVar2 = suffixCapacity + 0x24; - if (0x1f < (uint)((int)local_ac[0] + (-4 - (int)pvVar4))) goto LAB_00699821; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_ac[0]) + (-4 - GHIDRA_INT(pvVar4))))) goto LAB_00699821; } operator_delete(pvVar4,uVar2); } @@ -4852,25 +4852,25 @@ LAB_0069967b: } } } - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (0xf < portraitRoot._capacity) { uVar2 = portraitRoot._capacity + 1; - xmlNode = (void *)portraitRoot._buf._0_4_; + xmlNode = (*(undefined4 *)((char *)&((void *)portraitRoot._buf) + 0x0)); if (0xfff < uVar2) { - xmlNode = *(void **)(portraitRoot._buf._0_4_ + -4); + xmlNode = *(void **)((*(undefined4 *)((char *)&(portraitRoot._buf) + 0x0)) + -4); uVar2 = portraitRoot._capacity + 0x24; - if (0x1f < (uint)(portraitRoot._buf._0_4_ + (-4 - (int)xmlNode))) goto LAB_00699821; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(portraitRoot._buf) + 0x0)) + (-4 - GHIDRA_INT(xmlNode))))) goto LAB_00699821; } operator_delete(xmlNode,uVar2); } - local_14._0_1_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; if (0xf < anm2Root._capacity) { uVar2 = anm2Root._capacity + 1; - xmlNode = (void *)anm2Root._buf._0_4_; + xmlNode = (*(undefined4 *)((char *)&((void *)anm2Root._buf) + 0x0)); if (0xfff < uVar2) { - xmlNode = *(void **)(anm2Root._buf._0_4_ + -4); + xmlNode = *(void **)((*(undefined4 *)((char *)&(anm2Root._buf) + 0x0)) + -4); uVar2 = anm2Root._capacity + 0x24; - if (0x1f < (anm2Root._buf._0_4_ - (int)xmlNode) - 4U) { + if (0x1f < ((*(undefined4 *)((char *)&(anm2Root._buf) + 0x0)) - GHIDRA_INT(xmlNode)) - 4U) { LAB_00699821: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -4884,14 +4884,14 @@ LAB_00699821: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (text != (byte *)0x0) { uVar2 = *(uint *)(text + -4); prevAllocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)prevAllocatedBytes < uVar2); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar2)); free(text + -4); } bVar1 = 1; @@ -4989,7 +4989,7 @@ byte EntityConfig::load_players_xml(byte *path, void *modEntry) local_14 = (byte ****)0xffffffff; puStack_18 = &LAB_00af9c92; local_1c = ExceptionList; - uVar2 = __security_cookie ^ (uint)(portraitRoot + 0x11); + uVar2 = __security_cookie ^ GHIDRA_UINT((portraitRoot + 0x11)); ExceptionList = &local_1c; pbStack_10224 = path; modEntryLocal = modEntry; @@ -5007,32 +5007,32 @@ byte EntityConfig::load_players_xml(byte *path, void *modEntry) do { in_stack_fffefda0 = 0x69995e; FUN_0069b7b0(uVar2); - pvVar14 = (void *)((int)pvVar14 + 0x148); + pvVar14 = (void *)(GHIDRA_INT(pvVar14) + 0x148); } while (pvVar14 != pbStack_10230); pvVar14 = psVar10->_begin; pppppbVar7 = (byte *****)puStack_20; } puStack_20 = (undefined1 *)pppppbVar7; (this->_players)._end = pvVar14; - pvStack_10238 = (void *)(((int)pvVar14 - (int)psVar10->_begin) / 0x148); + pvStack_10238 = (void *)((GHIDRA_INT(pvVar14) - GHIDRA_INT(psVar10->_begin)) / 0x148); if (pvStack_10238 < 0x2a) { if (pvStack_10238 < 0x29) { - if ((uint)(((int)(this->_players)._capacity - (int)psVar10->_begin) / 0x148) < 0x29) { + if (GHIDRA_UINT(((GHIDRA_INT((this->_players)._capacity) - GHIDRA_INT(psVar10->_begin)) / 0x148)) < 0x29) { FUN_006a03a0(in_stack_fffefd9c,in_stack_fffefda0); } else { - pvVar14 = (void *)FUN_0069fbd0(pvVar14,0x29 - (int)pvStack_10238,piStack_10234); + pvVar14 = (void *)FUN_0069fbd0(pvVar14,0x29 - GHIDRA_INT(pvStack_10238),piStack_10234); (this->_players)._end = pvVar14; } } } else { - pvVar3 = (void *)((int)psVar10->_begin + 0x3488); + pvVar3 = (void *)(GHIDRA_INT(psVar10->_begin) + 0x3488); pbStack_10230 = pvVar3; if (pvVar3 != pvVar14) { do { FUN_0069b7b0(uVar2); - pvVar3 = (void *)((int)pvVar3 + 0x148); + pvVar3 = (void *)(GHIDRA_INT(pvVar3) + 0x148); } while (pvVar3 != pvVar14); } (config->_players)._end = pbStack_10230; @@ -5054,14 +5054,14 @@ byte EntityConfig::load_players_xml(byte *path, void *modEntry) pbVar13 = pbStack_10230; ((rapidxml::xml_document *)(xmlDoc))->rapidxml::xml_document::parse(pbStack_10230); bVar1 = (byte)pbVar13; - pvVar14 = ((xml_node *)(xmlDoc))->xml_node::first_node((byte *)"players",(int)pcVar18,bVar1); + pvVar14 = ((xml_node *)(xmlDoc))->xml_node::first_node((byte *)"players",GHIDRA_INT(pcVar18),bVar1); if (pvVar14 == (void *)0x0) { pcVar18 = "Could not find root node \'players\' in %s\n"; pbVar13 = pbStack_10224; KAGE_LogMessage(0x10,(byte *)"Could not find root node \'players\' in %s\n"); bVar1 = (byte)pbVar13; } - pvVar3 = ((xml_node *)(pvVar14))->xml_node::first_attribute(&DAT_00b66f40,(uint)pcVar18,bVar1); + pvVar3 = ((xml_node *)(pvVar14))->xml_node::first_attribute(&DAT_00b66f40,GHIDRA_UINT(pcVar18),bVar1); skinRootSize = 0; skinRootCapacity = 0xf; skinRoot[0] = (byte *****)0x0; @@ -5074,10 +5074,10 @@ byte EntityConfig::load_players_xml(byte *path, void *modEntry) bVar1 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar1 != 0); - uVar2 = (int)pbVar11 - (int)(pbVar13 + 1); + uVar2 = GHIDRA_INT(pbVar11) - GHIDRA_INT((pbVar13 + 1)); ((std::string *)((char *)skinRoot))->std::string::assign(pbVar13,uVar2); - local_14._0_1_ = 1; - pvVar3 = ((xml_node *)(pvVar14))->xml_node::first_attribute((byte *)"portraitroot",(uint)pbVar13,(byte)uVar2); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; + pvVar3 = ((xml_node *)(pvVar14))->xml_node::first_attribute((byte *)"portraitroot",GHIDRA_UINT(pbVar13),(byte)uVar2); portraitRootSize = 0; portraitRootCapacity = 0xf; portraitRoot[0] = (byte *****)0x0; @@ -5090,10 +5090,10 @@ byte EntityConfig::load_players_xml(byte *path, void *modEntry) bVar1 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar1 != 0); - uVar2 = (int)pbVar11 - (int)(pbVar13 + 1); + uVar2 = GHIDRA_INT(pbVar11) - GHIDRA_INT((pbVar13 + 1)); ((std::string *)((char *)portraitRoot))->std::string::assign(pbVar13,uVar2); - local_14._0_1_ = 2; - pvVar3 = ((xml_node *)(pvVar14))->xml_node::first_attribute((byte *)"nameimageroot",(uint)pbVar13,(byte)uVar2); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; + pvVar3 = ((xml_node *)(pvVar14))->xml_node::first_attribute((byte *)"nameimageroot",GHIDRA_UINT(pbVar13),(byte)uVar2); nameImageRootSize = 0; nameImageRootCapacity = 0xf; nameImageRoot[0] = (byte *****)0x0; @@ -5106,13 +5106,13 @@ byte EntityConfig::load_players_xml(byte *path, void *modEntry) bVar1 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar1 != 0); - uVar2 = (int)pbVar11 - (int)(pbVar13 + 1); + uVar2 = GHIDRA_INT(pbVar11) - GHIDRA_INT((pbVar13 + 1)); ((std::string *)((char *)nameImageRoot))->std::string::assign(pbVar13,uVar2); - pvStack_10238 = ((xml_node *)(pvVar14))->xml_node::first_node((byte *)"player",(int)pbVar13,(byte)uVar2); + pvStack_10238 = ((xml_node *)(pvVar14))->xml_node::first_node((byte *)"player",GHIDRA_INT(pbVar13),(byte)uVar2); joined_r0x00699bbe: if (pvStack_10238 != (void *)0x0) { ((EntityConfig_Player *)(&playerEntry))->EntityConfig_Player::EntityConfig_Player(); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; pbVar13 = *(byte **)(extraout_EDX + 0x20); joined_r0x00699bde: pbStack_10224 = pbVar13; @@ -5128,7 +5128,7 @@ joined_r0x00699bde: bVar17 = bVar1 < *pbVar12; if (bVar1 != *pbVar12) { LAB_00699c15: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_00699c1a; } if (bVar1 == 0) break; @@ -5158,7 +5158,7 @@ LAB_00699c1a: bVar17 = bVar1 < *pbVar12; if (bVar1 != *pbVar12) { LAB_00699c70: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_00699c75; } if (bVar1 == 0) break; @@ -5180,7 +5180,7 @@ LAB_00699c75: bVar1 = *pbVar6; pbVar6 = pbVar6 + 1; } while (bVar1 != 0); - ((std::string *)(playerEntry._name._buf))->std::string::assign(pbVar11,(int)pbVar6 - (int)(pbVar11 + 1)); + ((std::string *)(playerEntry._name._buf))->std::string::assign(pbVar11,GHIDRA_INT(pbVar6) - GHIDRA_INT((pbVar11 + 1))); } else { pbVar12 = &DAT_00b66ef4; @@ -5193,7 +5193,7 @@ LAB_00699c75: bVar17 = bVar1 < *pbVar12; if (bVar1 != *pbVar12) { LAB_00699ce0: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_00699ce5; } if (bVar1 == 0) break; @@ -5215,14 +5215,14 @@ LAB_00699ce5: bVar1 = *pbVar6; pbVar6 = pbVar6 + 1; } while (bVar1 != 0); - psVar9 = (std_string *)(pbVar6 + -(int)(pbVar11 + 1)); + psVar9 = (std_string *)(pbVar6 + -GHIDRA_INT((pbVar11 + 1))); if ((std_string *)(0x7fffffff - skinRootSize) < psVar9) goto LAB_0069b79c; pppppbVar7 = (byte *****)skinRoot; if (0xf < skinRootCapacity) { pppppbVar7 = skinRoot[0]; } - ((std::string *)(tmpString._buf))->std::string::concat((int)piStack_10234,psVar9,(byte *)pppppbVar7, - skinRootSize,pbVar11,(uint)psVar9); + ((std::string *)(tmpString._buf))->std::string::concat(GHIDRA_INT(piStack_10234),psVar9,(byte *)pppppbVar7, + skinRootSize,pbVar11,GHIDRA_UINT(psVar9)); cleanupFlags = cleanupFlags | 0x400; ((std::string *)(playerEntry._skinPath._buf))->std::string::_Tidy_deallocate(); playerEntry._skinPath._buf[0] = tmpString._buf[0]; @@ -5255,7 +5255,7 @@ LAB_00699ce5: bVar17 = bVar1 < (byte)*pcVar18; if (bVar1 != *pcVar18) { LAB_00699da0: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_00699da5; } if (bVar1 == 0) break; @@ -5277,14 +5277,14 @@ LAB_00699da5: bVar1 = *pbVar6; pbVar6 = pbVar6 + 1; } while (bVar1 != 0); - psVar9 = (std_string *)(pbVar6 + -(int)(pbVar11 + 1)); + psVar9 = (std_string *)(pbVar6 + -GHIDRA_INT((pbVar11 + 1))); if ((std_string *)(0x7fffffff - nameImageRootSize) < psVar9) goto LAB_0069b79c; pppppbVar7 = (byte *****)nameImageRoot; if (0xf < nameImageRootCapacity) { pppppbVar7 = nameImageRoot[0]; } - ((std::string *)(tmpString._buf))->std::string::concat((int)piStack_10234,psVar9,(byte *)pppppbVar7, - nameImageRootSize,pbVar11,(uint)psVar9); + ((std::string *)(tmpString._buf))->std::string::concat(GHIDRA_INT(piStack_10234),psVar9,(byte *)pppppbVar7, + nameImageRootSize,pbVar11,GHIDRA_UINT(psVar9)); cleanupFlags = cleanupFlags | 0x800; ((std::string *)(playerEntry._nameImagePath._buf))->std::string::_Tidy_deallocate(); playerEntry._nameImagePath._buf[0] = tmpString._buf[0]; @@ -5317,7 +5317,7 @@ LAB_00699da5: bVar17 = bVar1 < (byte)*pcVar18; if (bVar1 != *pcVar18) { LAB_00699e60: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_00699e65; } if (bVar1 == 0) break; @@ -5339,14 +5339,14 @@ LAB_00699e65: bVar1 = *pbVar6; pbVar6 = pbVar6 + 1; } while (bVar1 != 0); - psVar9 = (std_string *)(pbVar6 + -(int)(pbVar11 + 1)); + psVar9 = (std_string *)(pbVar6 + -GHIDRA_INT((pbVar11 + 1))); if ((std_string *)(0x7fffffff - portraitRootSize) < psVar9) goto LAB_0069b79c; pppppbVar7 = (byte *****)portraitRoot; if (0xf < portraitRootCapacity) { pppppbVar7 = portraitRoot[0]; } - ((std::string *)(tmpString._buf))->std::string::concat((int)piStack_10234,psVar9,(byte *)pppppbVar7, - portraitRootSize,pbVar11,(uint)psVar9); + ((std::string *)(tmpString._buf))->std::string::concat(GHIDRA_INT(piStack_10234),psVar9,(byte *)pppppbVar7, + portraitRootSize,pbVar11,GHIDRA_UINT(psVar9)); cleanupFlags = cleanupFlags | 0x1000; ((std::string *)(playerEntry._portraitPath._buf))->std::string::_Tidy_deallocate(); playerEntry._portraitPath._buf[0] = tmpString._buf[0]; @@ -5379,7 +5379,7 @@ LAB_00699e65: bVar17 = bVar1 < (byte)*pcVar18; if (bVar1 != *pcVar18) { LAB_00699f20: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_00699f25; } if (bVar1 == 0) break; @@ -5401,14 +5401,14 @@ LAB_00699f25: bVar1 = *pbVar6; pbVar6 = pbVar6 + 1; } while (bVar1 != 0); - psVar9 = (std_string *)(pbVar6 + -(int)(pbVar11 + 1)); + psVar9 = (std_string *)(pbVar6 + -GHIDRA_INT((pbVar11 + 1))); if ((std_string *)(0x7fffffff - portraitRootSize) < psVar9) goto LAB_0069b79c; pppppbVar7 = (byte *****)portraitRoot; if (0xf < portraitRootCapacity) { pppppbVar7 = portraitRoot[0]; } - ((std::string *)(tmpString._buf))->std::string::concat((int)piStack_10234,psVar9,(byte *)pppppbVar7, - portraitRootSize,pbVar11,(uint)psVar9); + ((std::string *)(tmpString._buf))->std::string::concat(GHIDRA_INT(piStack_10234),psVar9,(byte *)pppppbVar7, + portraitRootSize,pbVar11,GHIDRA_UINT(psVar9)); cleanupFlags = cleanupFlags | 0x2000; ((std::string *)(playerEntry._extraPortraitPath._buf))->std::string::_Tidy_deallocate(); playerEntry._extraPortraitPath._buf[0] = tmpString._buf[0]; @@ -5441,7 +5441,7 @@ LAB_00699f25: bVar17 = bVar1 < (byte)*pcVar18; if (bVar1 != *pcVar18) { LAB_00699fe0: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_00699fe5; } if (bVar1 == 0) break; @@ -5471,7 +5471,7 @@ LAB_00699fe5: bVar17 = bVar1 < *pbVar12; if (bVar1 != *pbVar12) { LAB_0069a040: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0069a045; } if (bVar1 == 0) break; @@ -5501,7 +5501,7 @@ LAB_0069a045: bVar17 = bVar1 < (byte)*pcVar18; if (bVar1 != *pcVar18) { LAB_0069a0a0: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0069a0a5; } if (bVar1 == 0) break; @@ -5531,7 +5531,7 @@ LAB_0069a0a5: bVar17 = bVar1 < (byte)*pcVar18; if (bVar1 != *pcVar18) { LAB_0069a100: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0069a105; } if (bVar1 == 0) break; @@ -5561,7 +5561,7 @@ LAB_0069a105: bVar17 = bVar1 < (byte)*pcVar18; if (bVar1 != *pcVar18) { LAB_0069a160: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0069a165; } if (bVar1 == 0) break; @@ -5591,7 +5591,7 @@ LAB_0069a165: bVar17 = bVar1 < *pbVar12; if (bVar1 != *pbVar12) { LAB_0069a1c0: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0069a1c5; } if (bVar1 == 0) break; @@ -5621,7 +5621,7 @@ LAB_0069a1c5: bVar17 = bVar1 < *pbVar12; if (bVar1 != *pbVar12) { LAB_0069a220: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0069a225; } if (bVar1 == 0) break; @@ -5651,7 +5651,7 @@ LAB_0069a225: bVar17 = bVar1 < *pbVar12; if (bVar1 != *pbVar12) { LAB_0069a280: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0069a285; } if (bVar1 == 0) break; @@ -5681,7 +5681,7 @@ LAB_0069a285: bVar17 = bVar1 < *pbVar12; if (bVar1 != *pbVar12) { LAB_0069a2e0: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0069a2e5; } if (bVar1 == 0) break; @@ -5711,7 +5711,7 @@ LAB_0069a2e5: bVar17 = bVar1 < *pbVar12; if (bVar1 != *pbVar12) { LAB_0069a340: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0069a345; } if (bVar1 == 0) break; @@ -5730,15 +5730,15 @@ LAB_0069a345: pbVar11 = *(byte **)(pbVar13 + 4); } tmpString._capacity = 0xf; - tmpString._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (std_string *)0x0; pbVar13 = pbVar11; do { bVar1 = *pbVar13; pbVar13 = pbVar13 + 1; } while (bVar1 != 0); ((std::string *)(tmpString._buf))->std::string::assign(pbVar11, - (int)pbVar13 - (int)(pbVar11 + 1)); - local_14._0_1_ = 6; + GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar11 + 1))); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; uStack_10248 = cleanupFlags | 0x4000; itemTokens = (int *)0x0; itemTokensEnd = (int *)0x0; @@ -5746,31 +5746,31 @@ LAB_0069a345: cleanupFlags = uStack_10248; string_split(&tmpString, (std_string *) - CONCAT31((int3)((uint)extraout_EDX_00 >> 8),0x2c) + CONCAT31((int3)(GHIDRA_UINT(extraout_EDX_00) >> 8),0x2c) ,(byte)&itemTokens); - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; if (0xf < tmpString._capacity) { uVar2 = tmpString._capacity + 1; - psVar9 = (std_string *)tmpString._buf._0_4_; + psVar9 = (*(undefined4 *)((char *)&((std_string *)tmpString._buf) + 0x0)); if (0xfff < uVar2) { psVar9 = (std_string *) - ((std_string *)(tmpString._buf._0_4_ + -0x18))-> + ((std_string *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -0x18))-> _capacity; uVar2 = tmpString._capacity + 0x24; if ((char *)0x1f < - (char *)(tmpString._buf._0_4_ + (-4 - (int)psVar9))) + (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar9)))) goto LAB_0069b73d; } operator_delete(psVar9,uVar2); } uVar16 = 0; piStack_10234 = itemTokens; - uVar2 = ((int)itemTokensEnd - (int)itemTokens) / 0x18; + uVar2 = (GHIDRA_INT(itemTokensEnd) - GHIDRA_INT(itemTokens)) / 0x18; piVar4 = itemTokens; if (uVar2 != 0) { do { piVar8 = piVar4; - if (0xf < (uint)piVar4[5]) { + if (0xf < GHIDRA_UINT(piVar4[5])) { piVar8 = (int *)*piVar4; } itemId = atoi((char *)piVar8); @@ -5782,7 +5782,7 @@ LAB_0069a345: else { *(int *)playerEntry._collectibles._end = itemId; playerEntry._collectibles._end = - (void *)((int)playerEntry._collectibles._end + 4); + (void *)(GHIDRA_INT(playerEntry._collectibles._end) + 4); } uVar16 = uVar16 + 1; piVar4 = piVar4 + 6; @@ -5790,7 +5790,7 @@ LAB_0069a345: } piVar4 = piStack_10234; cleanupFlags = cleanupFlags & 0xffffbfff; - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; if (piStack_10234 != (int *)0x0) { piVar8 = itemTokensEnd; tokenIter = piStack_10234; @@ -5804,7 +5804,7 @@ LAB_0069a345: if (0xfff < uVar16) { pvVar3 = *(void **)((char *)pvVar14 + -4); uVar16 = uVar2 + 0x24; - if (0x1f < (uint)((int)pvVar14 + (-4 - (int)pvVar3)) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar14) + (-4 - GHIDRA_INT(pvVar3)))) ) goto LAB_0069b73d; } operator_delete(pvVar3,uVar16); @@ -5816,13 +5816,13 @@ LAB_0069a345: tokenIter = tokenIter + 6; } while (tokenIter != piVar8); } - uVar2 = ((itemTokensCapacity - (int)piVar4) / 0x18) * 0x18; + uVar2 = ((itemTokensCapacity - GHIDRA_INT(piVar4)) / 0x18) * 0x18; piVar8 = piVar4; if (0xfff < uVar2) { piVar8 = (int *)piVar4[-1]; uVar2 = uVar2 + 0x23; if ((char *)0x1f < - (char *)((int)piVar4 + (-4 - (int)piVar8))) + (char *)(GHIDRA_INT(piVar4) + (-4 - GHIDRA_INT(piVar8)))) goto LAB_0069b73d; } operator_delete(piVar8,uVar2); @@ -5842,7 +5842,7 @@ LAB_0069a345: bVar17 = bVar1 < (byte)*pcVar18; if (bVar1 != *pcVar18) { LAB_0069a5a7: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0069a5ac; } if (bVar1 == 0) break; @@ -5872,7 +5872,7 @@ LAB_0069a5ac: bVar17 = bVar1 < (byte)*pcVar18; if (bVar1 != *pcVar18) { LAB_0069a601: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0069a606; } if (bVar1 == 0) break; @@ -5902,7 +5902,7 @@ LAB_0069a606: bVar17 = bVar1 < (byte)*pcVar18; if (bVar1 != *pcVar18) { LAB_0069a660: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0069a665; } if (bVar1 == 0) break; @@ -5925,7 +5925,7 @@ LAB_0069a665: bVar17 = bVar1 < (byte)*pcVar18; if (bVar1 != *pcVar18) { LAB_0069a7a3: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0069a7a8; } if (bVar1 == 0) break; @@ -5947,8 +5947,8 @@ LAB_0069a7a8: bVar1 = *pbVar6; pbVar6 = pbVar6 + 1; } while (bVar1 != 0); - ((std::string *)(playerEntry._costumeSuffixName._buf))->std::string::assign(pbVar11,(int)pbVar6 - - (int)(pbVar11 + 1)); + ((std::string *)(playerEntry._costumeSuffixName._buf))->std::string::assign(pbVar11,GHIDRA_INT(pbVar6) - + GHIDRA_INT((pbVar11 + 1))); } else { pcVar18 = "achievement"; @@ -5961,7 +5961,7 @@ LAB_0069a7a8: bVar17 = bVar1 < (byte)*pcVar18; if (bVar1 != *pcVar18) { LAB_0069a810: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0069a815; } if (bVar1 == 0) break; @@ -5991,7 +5991,7 @@ LAB_0069a815: bVar17 = bVar1 < (byte)*pcVar18; if (bVar1 != *pcVar18) { LAB_0069a870: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0069a875; } if (bVar1 == 0) break; @@ -6014,7 +6014,7 @@ LAB_0069a875: bVar17 = bVar1 < (byte)*pcVar18; if (bVar1 != *pcVar18) { LAB_0069a8d0: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0069a8d5; } if (bVar1 == 0) break; @@ -6044,7 +6044,7 @@ LAB_0069a8d5: bVar17 = bVar1 < (byte)*pcVar18; if (bVar1 != *pcVar18) { LAB_0069a930: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0069a935; } if (bVar1 == 0) break; @@ -6067,8 +6067,8 @@ LAB_0069a935: pbVar6 = pbVar6 + 1; } while (bVar1 != 0); ((std::string *)(playerEntry. - _birthrightDescription._buf))->std::string::assign(pbVar11,(int)pbVar6 - - (int)(pbVar11 + 1)); + _birthrightDescription._buf))->std::string::assign(pbVar11,GHIDRA_INT(pbVar6) - + GHIDRA_INT((pbVar11 + 1))); goto LAB_0069ab58; } pcVar18 = "bSkinParent"; @@ -6081,7 +6081,7 @@ LAB_0069a935: bVar17 = bVar1 < (byte)*pcVar18; if (bVar1 != *pcVar18) { LAB_0069a9a0: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0069a9a5; } if (bVar1 == 0) break; @@ -6105,7 +6105,7 @@ LAB_0069a9a5: } while (bVar1 != 0); ((std::string *)(playerEntry._bSkinParentName. _buf))->std::string::assign(pbVar11, - (int)pbVar6 - (int)(pbVar11 + 1)); + GHIDRA_INT(pbVar6) - GHIDRA_INT((pbVar11 + 1))); goto LAB_0069ab58; } pcVar18 = "hidden"; @@ -6118,7 +6118,7 @@ LAB_0069a9a5: bVar17 = bVar1 < (byte)*pcVar18; if (bVar1 != *pcVar18) { LAB_0069aa10: - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0069aa15; } if (bVar1 == 0) break; @@ -6131,7 +6131,7 @@ LAB_0069aa10: uVar2 = 0; LAB_0069aa15: if (uVar2 != 0) goto LAB_0069ab58; - tmpString._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (std_string *)0x0; tmpString._size = 0; pbVar11 = &g_xmlNullStr; if (*(byte **)(pbVar13 + 4) != (byte *)0x0) { @@ -6144,7 +6144,7 @@ LAB_0069aa15: pbVar13 = pbVar13 + 1; } while (bVar1 != 0); ((std::string *)(tmpString._buf))->std::string::assign(pbVar11, - (int)pbVar13 - (int)(pbVar11 + 1)) + GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar11 + 1))) ; if (tmpString._size == 0) { LAB_0069ab15: @@ -6153,7 +6153,7 @@ LAB_0069ab15: else { psVar9 = &tmpString; if (0xf < tmpString._capacity) { - psVar9 = (std_string *)tmpString._buf._0_4_; + psVar9 = (*(undefined4 *)((char *)&((std_string *)tmpString._buf) + 0x0)); } if (tmpString._size == 4) { if ((*(std_string **)psVar9->_buf == @@ -6169,7 +6169,7 @@ LAB_0069ab15: uVar2 = 0; } else { - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; } if (uVar2 != 0) goto LAB_0069aaad; } @@ -6177,7 +6177,7 @@ LAB_0069ab15: LAB_0069aaad: psVar9 = &tmpString; if (0xf < tmpString._capacity) { - psVar9 = (std_string *)tmpString._buf._0_4_; + psVar9 = (*(undefined4 *)((char *)&((std_string *)tmpString._buf) + 0x0)); } if (tmpString._size == 4) { if ((*(std_string **)psVar9->_buf == @@ -6194,13 +6194,13 @@ LAB_0069aaad: uVar2 = 0; } else { - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; } if (uVar2 == 0) goto LAB_0069ab0c; } psVar9 = &tmpString; if (0xf < tmpString._capacity) { - psVar9 = (std_string *)tmpString._buf._0_4_; + psVar9 = (*(undefined4 *)((char *)&((std_string *)tmpString._buf) + 0x0)); } iVar5 = atoi(psVar9->_buf); if (iVar5 == 0) goto LAB_0069ab15; @@ -6219,7 +6219,7 @@ LAB_0069ab0c: } goto LAB_0069ab58; } - tmpString._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (std_string *)0x0; tmpString._size = 0; pbVar11 = &g_xmlNullStr; if (*(byte **)(pbVar13 + 4) != (byte *)0x0) { @@ -6232,7 +6232,7 @@ LAB_0069ab0c: pbVar13 = pbVar13 + 1; } while (bVar1 != 0); ((std::string *)(tmpString._buf))->std::string::assign(pbVar11, - (int)pbVar13 - (int)(pbVar11 + 1)); + GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar11 + 1))); if (tmpString._size == 0) { LAB_0069a768: playerEntry._canShoot = 0; @@ -6240,7 +6240,7 @@ LAB_0069a768: else { psVar9 = &tmpString; if (0xf < tmpString._capacity) { - psVar9 = (std_string *)tmpString._buf._0_4_; + psVar9 = (*(undefined4 *)((char *)&((std_string *)tmpString._buf) + 0x0)); } if (tmpString._size == 4) { if ((*(std_string **)psVar9->_buf == @@ -6256,7 +6256,7 @@ LAB_0069a768: uVar2 = 0; } else { - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; } if (uVar2 != 0) goto LAB_0069a6fd; } @@ -6264,7 +6264,7 @@ LAB_0069a768: LAB_0069a6fd: psVar9 = &tmpString; if (0xf < tmpString._capacity) { - psVar9 = (std_string *)tmpString._buf._0_4_; + psVar9 = (*(undefined4 *)((char *)&((std_string *)tmpString._buf) + 0x0)); } if (tmpString._size == 4) { if ((*(std_string **)psVar9->_buf == @@ -6280,13 +6280,13 @@ LAB_0069a6fd: uVar2 = 0; } else { - uVar2 = -(uint)bVar17 | 1; + uVar2 = -GHIDRA_UINT(bVar17) | 1; } if (uVar2 == 0) goto LAB_0069a75c; } psVar9 = &tmpString; if (0xf < tmpString._capacity) { - psVar9 = (std_string *)tmpString._buf._0_4_; + psVar9 = (*(undefined4 *)((char *)&((std_string *)tmpString._buf) + 0x0)); } iVar5 = atoi(psVar9->_buf); if (iVar5 == 0) goto LAB_0069a768; @@ -6297,14 +6297,14 @@ LAB_0069a75c: LAB_0069ab22: if (0xf < tmpString._capacity) { uVar2 = tmpString._capacity + 1; - psVar9 = (std_string *)tmpString._buf._0_4_; + psVar9 = (*(undefined4 *)((char *)&((std_string *)tmpString._buf) + 0x0)); if (0xfff < uVar2) { psVar9 = (std_string *) - ((std_string *)(tmpString._buf._0_4_ + -0x18))-> + ((std_string *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -0x18))-> _capacity; uVar2 = tmpString._capacity + 0x24; if ((char *)0x1f < - (char *)(tmpString._buf._0_4_ + (-4 - (int)psVar9))) + (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar9)))) goto LAB_0069b73d; } operator_delete(psVar9,uVar2); @@ -6331,38 +6331,38 @@ LAB_0069ab58: pbVar13 = *(byte **)(pbVar13 + 0x18); goto joined_r0x00699bde; } - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < nameImageRootCapacity) { uVar2 = nameImageRootCapacity + 1; pppppbVar7 = nameImageRoot[0]; if (0xfff < uVar2) { pppppbVar7 = (byte *****)nameImageRoot[0][-1]; uVar2 = nameImageRootCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)nameImageRoot[0] + (-4 - (int)pppppbVar7))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(nameImageRoot[0]) + (-4 - GHIDRA_INT(pppppbVar7)))) goto LAB_0069b73d; } operator_delete(pppppbVar7,uVar2); } - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (0xf < portraitRootCapacity) { uVar2 = portraitRootCapacity + 1; pppppbVar7 = portraitRoot[0]; if (0xfff < uVar2) { pppppbVar7 = (byte *****)portraitRoot[0][-1]; uVar2 = portraitRootCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)portraitRoot[0] + (-4 - (int)pppppbVar7))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(portraitRoot[0]) + (-4 - GHIDRA_INT(pppppbVar7)))) goto LAB_0069b73d; } operator_delete(pppppbVar7,uVar2); } - local_14._0_1_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; if (0xf < skinRootCapacity) { uVar2 = skinRootCapacity + 1; pppppbVar7 = skinRoot[0]; if (0xfff < uVar2) { pppppbVar7 = (byte *****)skinRoot[0][-1]; uVar2 = skinRootCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)skinRoot[0] + (-4 - (int)pppppbVar7))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(skinRoot[0]) + (-4 - GHIDRA_INT(pppppbVar7)))) { LAB_0069b73d: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -6385,17 +6385,17 @@ LAB_0069ab6f: if (-1 < playerEntry._id) { playerEntry._moddedTaintedPlayerID = playerEntry._id; EntityConfig_Player::operator_assign - ((EntityConfig_Player *)(playerEntry._id * 0x148 + (int)(config->_players)._begin), + ((EntityConfig_Player *)(playerEntry._id * 0x148 + GHIDRA_INT((config->_players)._begin)), &playerEntry); goto LAB_0069b2cf; } } else { - pvVar14 = (void *)((int)(config->_players)._end - (int)(config->_players)._begin); - playerEntry._id = (int)pvVar14 / 0x148; + pvVar14 = (void *)(GHIDRA_INT((config->_players)._end) - GHIDRA_INT((config->_players)._begin)); + playerEntry._id = GHIDRA_INT(pvVar14) / 0x148; playerEntry._moddedTaintedPlayerID = playerEntry._id; if (playerEntry._bSkinParentName._size != 0) { - menuAnm2 = (ANM2 *)((int)modEntryLocal + 0x550); + menuAnm2 = (ANM2 *)(GHIDRA_INT(modEntryLocal) + 0x550); if (*(char *)((char *)modEntryLocal + 0x659) == '\0') { LAB_0069abfa: isAnimFound = '\0'; @@ -6414,11 +6414,11 @@ LAB_0069abfa: if (((cleanupFlags & 1) != 0) && (cleanupFlags = cleanupFlags & 0xfffffffe, 0xf < tmpString._capacity)) { uVar2 = tmpString._capacity + 1; - psVar9 = (std_string *)tmpString._buf._0_4_; + psVar9 = (*(undefined4 *)((char *)&((std_string *)tmpString._buf) + 0x0)); if (0xfff < uVar2) { - psVar9 = (std_string *)((std_string *)(tmpString._buf._0_4_ + -0x18))->_capacity; + psVar9 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -0x18))->_capacity; uVar2 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)psVar9))) goto LAB_0069b73d; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar9)))) goto LAB_0069b73d; } operator_delete(psVar9,uVar2); pvVar14 = extraout_ECX_00; @@ -6426,7 +6426,7 @@ LAB_0069abfa: if (isAnimFound != '\0') { playerEntry._moddedMenuBackgroundANM2 = menuAnm2; } - menuAnm2 = (ANM2 *)((int)modEntryLocal + 0x664); + menuAnm2 = (ANM2 *)(GHIDRA_INT(modEntryLocal) + 0x664); if (*(char *)((char *)modEntryLocal + 0x76d) == '\0') { LAB_0069aca5: isAnimFound = '\0'; @@ -6445,11 +6445,11 @@ LAB_0069aca5: if (((cleanupFlags & 2) != 0) && (cleanupFlags = cleanupFlags & 0xfffffffd, 0xf < tmpString._capacity)) { uVar2 = tmpString._capacity + 1; - psVar9 = (std_string *)tmpString._buf._0_4_; + psVar9 = (*(undefined4 *)((char *)&((std_string *)tmpString._buf) + 0x0)); if (0xfff < uVar2) { - psVar9 = (std_string *)((std_string *)(tmpString._buf._0_4_ + -0x18))->_capacity; + psVar9 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -0x18))->_capacity; uVar2 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)psVar9))) goto LAB_0069b73d; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar9)))) goto LAB_0069b73d; } operator_delete(psVar9,uVar2); pvVar14 = extraout_ECX_02; @@ -6457,7 +6457,7 @@ LAB_0069aca5: if (isAnimFound != '\0') { playerEntry._moddedMenuPortraitANM2 = menuAnm2; } - menuAnm2 = (ANM2 *)((int)modEntryLocal + 0x778); + menuAnm2 = (ANM2 *)(GHIDRA_INT(modEntryLocal) + 0x778); if (*(char *)((char *)modEntryLocal + 0x881) == '\0') { LAB_0069ad50: isAnimFound = '\0'; @@ -6476,11 +6476,11 @@ LAB_0069ad50: if (((cleanupFlags & 4) != 0) && (cleanupFlags = cleanupFlags & 0xfffffffb, 0xf < tmpString._capacity)) { uVar2 = tmpString._capacity + 1; - psVar9 = (std_string *)tmpString._buf._0_4_; + psVar9 = (*(undefined4 *)((char *)&((std_string *)tmpString._buf) + 0x0)); if (0xfff < uVar2) { - psVar9 = (std_string *)((std_string *)(tmpString._buf._0_4_ + -0x18))->_capacity; + psVar9 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -0x18))->_capacity; uVar2 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)psVar9))) goto LAB_0069b73d; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar9)))) goto LAB_0069b73d; } operator_delete(psVar9,uVar2); pvVar14 = extraout_ECX_04; @@ -6488,7 +6488,7 @@ LAB_0069ad50: if (isAnimFound != '\0') { playerEntry._moddedGameOverANM2 = menuAnm2; } - menuAnm2 = (ANM2 *)((int)modEntryLocal + 0x88c); + menuAnm2 = (ANM2 *)(GHIDRA_INT(modEntryLocal) + 0x88c); if (*(char *)((char *)modEntryLocal + 0x995) == '\0') { LAB_0069adfb: isAnimFound = '\0'; @@ -6507,11 +6507,11 @@ LAB_0069adfb: if (((cleanupFlags & 8) != 0) && (cleanupFlags = cleanupFlags & 0xfffffff7, 0xf < tmpString._capacity)) { uVar2 = tmpString._capacity + 1; - psVar9 = (std_string *)tmpString._buf._0_4_; + psVar9 = (*(undefined4 *)((char *)&((std_string *)tmpString._buf) + 0x0)); if (0xfff < uVar2) { - psVar9 = (std_string *)((std_string *)(tmpString._buf._0_4_ + -0x18))->_capacity; + psVar9 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -0x18))->_capacity; uVar2 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)psVar9))) goto LAB_0069b73d; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar9)))) goto LAB_0069b73d; } operator_delete(psVar9,uVar2); pvVar14 = extraout_ECX_06; @@ -6519,7 +6519,7 @@ LAB_0069adfb: if (isAnimFound != '\0') { playerEntry._moddedCoopMenuANM2 = menuAnm2; } - menuAnm2 = (ANM2 *)((int)modEntryLocal + 0xbc8); + menuAnm2 = (ANM2 *)(GHIDRA_INT(modEntryLocal) + 0xbc8); if (*(char *)((char *)modEntryLocal + 0xcd1) == '\0') { LAB_0069aea6: isAnimFound = '\0'; @@ -6538,11 +6538,11 @@ LAB_0069aea6: if (((cleanupFlags & 0x10) != 0) && (cleanupFlags = cleanupFlags & 0xffffffef, 0xf < tmpString._capacity)) { uVar2 = tmpString._capacity + 1; - psVar9 = (std_string *)tmpString._buf._0_4_; + psVar9 = (*(undefined4 *)((char *)&((std_string *)tmpString._buf) + 0x0)); if (0xfff < uVar2) { - psVar9 = (std_string *)((std_string *)(tmpString._buf._0_4_ + -0x18))->_capacity; + psVar9 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -0x18))->_capacity; uVar2 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)psVar9))) goto LAB_0069b73d; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar9)))) goto LAB_0069b73d; } operator_delete(psVar9,uVar2); pvVar14 = extraout_ECX_08; @@ -6551,7 +6551,7 @@ LAB_0069aea6: playerEntry._moddedControlsANM2 = menuAnm2; } } - menuAnm2 = (ANM2 *)((int)modEntryLocal + 0x100); + menuAnm2 = (ANM2 *)(GHIDRA_INT(modEntryLocal) + 0x100); if ((playerEntry._moddedMenuBackgroundANM2 == (void *)0x0) && (*(char *)((char *)modEntryLocal + 0x209) != '\0')) { psVar9 = ((EntityConfig_Player *)(&playerEntry))->EntityConfig_Player::GetDisplayName(&tmpString,pvVar14); @@ -6571,11 +6571,11 @@ LAB_0069af5a: if (((cleanupFlags & 0x20) != 0) && (cleanupFlags = cleanupFlags & 0xffffffdf, 0xf < tmpString._capacity)) { uVar2 = tmpString._capacity + 1; - psVar9 = (std_string *)tmpString._buf._0_4_; + psVar9 = (*(undefined4 *)((char *)&((std_string *)tmpString._buf) + 0x0)); if (0xfff < uVar2) { - psVar9 = (std_string *)((std_string *)(tmpString._buf._0_4_ + -0x18))->_capacity; + psVar9 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -0x18))->_capacity; uVar2 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)psVar9))) goto LAB_0069b73d; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar9)))) goto LAB_0069b73d; } operator_delete(psVar9,uVar2); pvVar14 = extraout_ECX_10; @@ -6583,7 +6583,7 @@ LAB_0069af5a: if (isAnimFound != '\0') { playerEntry._moddedMenuBackgroundANM2 = menuAnm2; } - menuAnm2 = (ANM2 *)((int)modEntryLocal + 0x214); + menuAnm2 = (ANM2 *)(GHIDRA_INT(modEntryLocal) + 0x214); if ((playerEntry._moddedMenuPortraitANM2 == (void *)0x0) && (*(char *)((char *)modEntryLocal + 0x31d) != '\0')) { psVar9 = ((EntityConfig_Player *)(&playerEntry))->EntityConfig_Player::GetDisplayName(&tmpString,pvVar14); @@ -6608,7 +6608,7 @@ LAB_0069b00e: if (isAnimFound != '\0') { playerEntry._moddedMenuPortraitANM2 = menuAnm2; } - menuAnm2 = (ANM2 *)((int)modEntryLocal + 0x328); + menuAnm2 = (ANM2 *)(GHIDRA_INT(modEntryLocal) + 0x328); if ((playerEntry._moddedGameOverANM2 == (void *)0x0) && (*(char *)((char *)modEntryLocal + 0x431) != '\0')) { psVar9 = ((EntityConfig_Player *)(&playerEntry))->EntityConfig_Player::GetDisplayName(&tmpString,pvVar14); @@ -6633,7 +6633,7 @@ LAB_0069b099: if (isAnimFound != '\0') { playerEntry._moddedGameOverANM2 = menuAnm2; } - menuAnm2 = (ANM2 *)((int)modEntryLocal + 0x43c); + menuAnm2 = (ANM2 *)(GHIDRA_INT(modEntryLocal) + 0x43c); if ((playerEntry._moddedCoopMenuANM2 == (void *)0x0) && (*(char *)((char *)modEntryLocal + 0x545) != '\0')) { psVar9 = ((EntityConfig_Player *)(&playerEntry))->EntityConfig_Player::GetDisplayName(&tmpString,pvVar14); @@ -6658,7 +6658,7 @@ LAB_0069b126: if (isAnimFound != '\0') { playerEntry._moddedCoopMenuANM2 = menuAnm2; } - menuAnm2 = (ANM2 *)((int)modEntryLocal + 0xab4); + menuAnm2 = (ANM2 *)(GHIDRA_INT(modEntryLocal) + 0xab4); if ((playerEntry._moddedControlsANM2 == (void *)0x0) && (*(char *)((char *)modEntryLocal + 0xbbd) != '\0')) { psVar9 = ((EntityConfig_Player *)(&playerEntry))->EntityConfig_Player::GetDisplayName(&tmpString,pvVar14); @@ -6687,17 +6687,17 @@ LAB_0069b1b6: if (playerEntry._moddedMenuBackgroundANM2 != (void *)0x0) { psVar9 = ((EntityConfig_Player *)(&playerEntry))->EntityConfig_Player::GetDisplayName(&tmpString,pvVar14); pvVar14 = playerEntry._moddedMenuBackgroundANM2; - local_14 = (byte ****)CONCAT31(local_14._1_3_,8); + local_14 = (byte ****)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),8); if (0xf < psVar9->_capacity) { psVar9 = *(std_string **)psVar9->_buf; } bVar1 = ((ANM2 *)(playerEntry._moddedMenuBackgroundANM2))->ANM2::SetAnimation((byte *)psVar9,1); if (((bVar1 != 0) && (*(int *)((char *)pvVar14 + 0x34) != 0)) && - (((AnimationState *)((AnimationState *)((int)pvVar14 + 0x30)))->AnimationState::SetFrameFloat(0.0), + (((AnimationState *)((AnimationState *)(GHIDRA_INT(pvVar14) + 0x30)))->AnimationState::SetFrameFloat(0.0), *(int *)((char *)pvVar14 + 0x34) != 0)) { *(undefined1 *)((char *)pvVar14 + 0x44) = 0; } - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; ((std::string *)(tmpString._buf))->std::string::_Tidy_deallocate(); pvVar14 = playerEntry._moddedMenuBackgroundANM2; backgroundLayer = ((ANM2 *)(playerEntry._moddedMenuBackgroundANM2))->ANM2::GetLayer((byte *)"Background"); @@ -6708,7 +6708,7 @@ LAB_0069b1b6: else { iVar5 = *(int *)backgroundLayer->_layerData; } - pvVar14 = ((AnimationState *)((AnimationState *)((int)pvVar14 + 0x30)))->AnimationState::GetLayerFrame(iVar5); + pvVar14 = ((AnimationState *)((AnimationState *)(GHIDRA_INT(pvVar14) + 0x30)))->AnimationState::GetLayerFrame(iVar5); if (pvVar14 != (void *)0x0) { if (*(char *)((char *)pvVar14 + 0x2c) != '\0') { playerEntry._renderCustomBackground = 1; @@ -6723,7 +6723,7 @@ LAB_0069b1b6: else { EntityConfig_Player::copy_constructor(dst,&playerEntry); playersEnd = &(entityConfig->_players)._end; - *playersEnd = (void *)((int)*playersEnd + 0x148); + *playersEnd = (void *)(GHIDRA_INT(*playersEnd) + 0x148); } } entityConfig = config; @@ -6741,8 +6741,8 @@ LAB_0069b2cf: psVar10 = &config->_edenHair; } psVar10->_end = pcVar15; - iVar5 = (int)psVar10->_capacity - (int)psVar10->_begin; - if ((uint)(iVar5 / 0x18) < 0x80) { + iVar5 = GHIDRA_INT(psVar10->_capacity) - GHIDRA_INT(psVar10->_begin); + if (GHIDRA_UINT((iVar5 / 0x18)) < 0x80) { FUN_0069da00(iVar5); } pcVar18 = "hair"; @@ -6761,9 +6761,9 @@ LAB_0069b2cf: pcVar18 = *(char **)(pbStack_10224 + 8); } if (pcVar18 == pcVar15 + -0xb66fe3) { - pbVar11 = (byte *)(pcVar18 + (int)pbVar13); + pbVar11 = (byte *)(pcVar18 + GHIDRA_INT(pbVar13)); if (pbVar11 <= pbVar13) goto LAB_0069b3e3; - iVar5 = (int)&DAT_00b66fe4 - (int)pbVar13; + iVar5 = GHIDRA_INT(&DAT_00b66fe4) - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar5]) { pbVar13 = pbVar13 + 1; if (pbVar11 <= pbVar13) goto LAB_0069b3e3; @@ -6791,9 +6791,9 @@ LAB_0069b3e3: piVar4 = (int *)hairAttr[2]; } if (piVar4 == piStack_10234) { - pbVar11 = pbVar13 + (int)piVar4; + pbVar11 = pbVar13 + GHIDRA_INT(piVar4); if (pbVar11 <= pbVar13) goto LAB_0069b451; - iVar5 = (int)&DAT_00b66fec - (int)pbVar13; + iVar5 = GHIDRA_INT(&DAT_00b66fec) - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar5]) { pbVar13 = pbVar13 + 1; if (pbVar11 <= pbVar13) goto LAB_0069b451; @@ -6811,7 +6811,7 @@ LAB_0069b451: bVar1 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar1 != 0); - psVar9 = (std_string *)(pbVar11 + -(int)(pbVar13 + 1)); + psVar9 = (std_string *)(pbVar11 + -GHIDRA_INT((pbVar13 + 1))); if ((std_string *)(0x7fffffff - skinRootSize) < psVar9) { LAB_0069b79c: /* WARNING: Subroutine does not return */ @@ -6821,10 +6821,10 @@ LAB_0069b79c: if (0xf < skinRootCapacity) { pppppbVar7 = skinRoot[0]; } - ((std::string *)(tmpString._buf))->std::string::concat((int)piStack_10234,psVar9,(byte *)pppppbVar7,skinRootSize - ,pbVar13,(uint)psVar9); + ((std::string *)(tmpString._buf))->std::string::concat(GHIDRA_INT(piStack_10234),psVar9,(byte *)pppppbVar7,skinRootSize + ,pbVar13,GHIDRA_UINT(psVar9)); cleanupFlags = cleanupFlags | 0x8000; - local_14 = (byte ****)CONCAT31(local_14._1_3_,9); + local_14 = (byte ****)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),9); psVar9 = (config->_edenHair)._end; if (psVar9 == (config->_edenHair)._capacity) { vector_string_emplace_reallocate_move(&config->_edenHair,psVar9,&tmpString); @@ -6833,71 +6833,71 @@ LAB_0069b79c: FUN_0042f2b0(); *(int *)(extraout_ECX_19 + 4) = *(int *)(extraout_ECX_19 + 4) + 0x18; } - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; ((std::string *)(tmpString._buf))->std::string::_Tidy_deallocate(); pbStack_10224 = *(byte **)(pbStack_10224 + 0x2c); } while (pbStack_10224 != (byte *)0x0); } } - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; ((std::string *)(playerEntry._bSkinParentName._buf))->std::string::_Tidy_deallocate(); ((std::string *)(playerEntry._birthrightDescription._buf))->std::string::_Tidy_deallocate(); FID_conflict__Tidy(&playerEntry._collectibles); ((std::string *)(playerEntry._costumeSuffixName._buf))->std::string::_Tidy_deallocate(); if (0xf < playerEntry._extraPortraitPath._capacity) { uVar2 = playerEntry._extraPortraitPath._capacity + 1; - pvVar14 = (void *)playerEntry._extraPortraitPath._buf._0_4_; + pvVar14 = (*(undefined4 *)((char *)&((void *)playerEntry._extraPortraitPath._buf) + 0x0)); if (0xfff < uVar2) { - pvVar14 = *(void **)(playerEntry._extraPortraitPath._buf._0_4_ + -4); + pvVar14 = *(void **)((*(undefined4 *)((char *)&(playerEntry._extraPortraitPath._buf) + 0x0)) + -4); uVar2 = playerEntry._extraPortraitPath._capacity + 0x24; - if (0x1f < (playerEntry._extraPortraitPath._buf._0_4_ - (int)pvVar14) - 4U) goto LAB_0069b73d; + if (0x1f < ((*(undefined4 *)((char *)&(playerEntry._extraPortraitPath._buf) + 0x0)) - GHIDRA_INT(pvVar14)) - 4U) goto LAB_0069b73d; } operator_delete(pvVar14,uVar2); } playerEntry._extraPortraitPath._size = 0; playerEntry._extraPortraitPath._capacity = 0xf; - playerEntry._extraPortraitPath._buf._0_4_ = playerEntry._extraPortraitPath._buf._0_4_ & 0xffffff00 + (*(undefined4 *)((char *)&(playerEntry._extraPortraitPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(playerEntry._extraPortraitPath._buf) + 0x0)) & 0xffffff00 ; ((std::string *)(playerEntry._unkString._buf))->std::string::_Tidy_deallocate(); if (0xf < playerEntry._portraitPath._capacity) { uVar2 = playerEntry._portraitPath._capacity + 1; - pvVar14 = (void *)playerEntry._portraitPath._buf._0_4_; + pvVar14 = (*(undefined4 *)((char *)&((void *)playerEntry._portraitPath._buf) + 0x0)); if (0xfff < uVar2) { - pvVar14 = *(void **)(playerEntry._portraitPath._buf._0_4_ + -4); + pvVar14 = *(void **)((*(undefined4 *)((char *)&(playerEntry._portraitPath._buf) + 0x0)) + -4); uVar2 = playerEntry._portraitPath._capacity + 0x24; - if (0x1f < (playerEntry._portraitPath._buf._0_4_ - (int)pvVar14) - 4U) goto LAB_0069b73d; + if (0x1f < ((*(undefined4 *)((char *)&(playerEntry._portraitPath._buf) + 0x0)) - GHIDRA_INT(pvVar14)) - 4U) goto LAB_0069b73d; } operator_delete(pvVar14,uVar2); } playerEntry._portraitPath._size = 0; playerEntry._portraitPath._capacity = 0xf; - playerEntry._portraitPath._buf._0_4_ = playerEntry._portraitPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(playerEntry._portraitPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(playerEntry._portraitPath._buf) + 0x0)) & 0xffffff00; if (0xf < playerEntry._nameImagePath._capacity) { uVar2 = playerEntry._nameImagePath._capacity + 1; - pvVar14 = (void *)playerEntry._nameImagePath._buf._0_4_; + pvVar14 = (*(undefined4 *)((char *)&((void *)playerEntry._nameImagePath._buf) + 0x0)); if (0xfff < uVar2) { - pvVar14 = *(void **)(playerEntry._nameImagePath._buf._0_4_ + -4); + pvVar14 = *(void **)((*(undefined4 *)((char *)&(playerEntry._nameImagePath._buf) + 0x0)) + -4); uVar2 = playerEntry._nameImagePath._capacity + 0x24; - if (0x1f < (playerEntry._nameImagePath._buf._0_4_ - (int)pvVar14) - 4U) goto LAB_0069b73d; + if (0x1f < ((*(undefined4 *)((char *)&(playerEntry._nameImagePath._buf) + 0x0)) - GHIDRA_INT(pvVar14)) - 4U) goto LAB_0069b73d; } operator_delete(pvVar14,uVar2); } playerEntry._nameImagePath._size = 0; playerEntry._nameImagePath._capacity = 0xf; - playerEntry._nameImagePath._buf._0_4_ = playerEntry._nameImagePath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(playerEntry._nameImagePath._buf) + 0x0)) = (*(undefined4 *)((char *)&(playerEntry._nameImagePath._buf) + 0x0)) & 0xffffff00; if (0xf < playerEntry._skinPath._capacity) { uVar2 = playerEntry._skinPath._capacity + 1; - pvVar14 = (void *)playerEntry._skinPath._buf._0_4_; + pvVar14 = (*(undefined4 *)((char *)&((void *)playerEntry._skinPath._buf) + 0x0)); if (0xfff < uVar2) { - pvVar14 = *(void **)(playerEntry._skinPath._buf._0_4_ + -4); + pvVar14 = *(void **)((*(undefined4 *)((char *)&(playerEntry._skinPath._buf) + 0x0)) + -4); uVar2 = playerEntry._skinPath._capacity + 0x24; - if (0x1f < (playerEntry._skinPath._buf._0_4_ - (int)pvVar14) - 4U) goto LAB_0069b73d; + if (0x1f < ((*(undefined4 *)((char *)&(playerEntry._skinPath._buf) + 0x0)) - GHIDRA_INT(pvVar14)) - 4U) goto LAB_0069b73d; } operator_delete(pvVar14,uVar2); } playerEntry._skinPath._size = 0; playerEntry._skinPath._capacity = 0xf; - playerEntry._skinPath._buf._0_4_ = playerEntry._skinPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(playerEntry._skinPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(playerEntry._skinPath._buf) + 0x0)) & 0xffffff00; ((std::string *)(playerEntry._name._buf))->std::string::_Tidy_deallocate(); pvStack_10238 = *(void **)((char *)pvStack_10238 + 0x2c); goto joined_r0x00699bbe; @@ -6932,8 +6932,8 @@ void EntityConfig::PreloadResources(EntityConfig_Entity *entity) soundId = *piVar1; if (((soundId != 0) && (-1 < soundId)) && (pvVar2 = (g_manager->_sfxManager)._sounds._begin, - soundId < ((int)(g_manager->_sfxManager)._sounds._end - (int)pvVar2) / 0x1b8)) { - this_00 = (SoundEffect *)(soundId * 0x1b8 + (int)pvVar2); + soundId < (GHIDRA_INT((g_manager->_sfxManager)._sounds._end) - GHIDRA_INT(pvVar2)) / 0x1b8)) { + this_00 = (SoundEffect *)(soundId * 0x1b8 + GHIDRA_INT(pvVar2)); if (*(char *)(this_00 + 0x66) == '\0') { KAGE_LogMessage(1,(byte *)"Preload sound %d.\n"); ((SoundEffect *)(this_00))->SoundEffect::Load(); @@ -6950,7 +6950,7 @@ void EntityConfig::PreloadResources(EntityConfig_Entity *entity) do { if (piVar1[7] != 0) { path_00 = (byte *)(piVar1 + 3); - if (0xf < (uint)piVar1[8]) { + if (0xf < GHIDRA_UINT(piVar1[8])) { path_00 = *(byte **)path_00; } pvVar2 = (void *)0x69bb8e; @@ -7037,7 +7037,7 @@ void EntityConfig::LoadBabies(byte *xmlpath) local_14 = (void *)0xffffffff; puStack_18 = &LAB_00af9d07; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(babyName + 0x12); + local_24 = __security_cookie ^ GHIDRA_UINT((babyName + 0x12)); ExceptionList = &local_1c; iStack_10120 = 0; FUN_0069d780(local_24); @@ -7049,19 +7049,19 @@ void EntityConfig::LoadBabies(byte *xmlpath) text[iVar4] = 0; (**(code **)*piVar3)(1); FUN_00413b90(); - local_14._0_1_ = 0; - local_14._1_3_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; pcVar9 = (char *)0x69be2f; strCursor = text; ((rapidxml::xml_document *)(xmlDocument))->rapidxml::xml_document::parse(text); bVar10 = (byte)strCursor; - xmlNode = ((xml_node *)(xmlDocument))->xml_node::first_node((byte *)"babies",(int)pcVar9,bVar10); + xmlNode = ((xml_node *)(xmlDocument))->xml_node::first_node((byte *)"babies",GHIDRA_INT(pcVar9),bVar10); if (xmlNode == (void *)0x0) { pcVar9 = "Could not find root node \'babies\' in %s\n"; KAGE_LogMessage(0x10,(byte *)"Could not find root node \'babies\' in %s\n"); bVar10 = (byte)xmlpath; } - xmlNode = ((xml_node *)(xmlNode))->xml_node::first_attribute(&DAT_00b66f40,(uint)pcVar9,bVar10); + xmlNode = ((xml_node *)(xmlNode))->xml_node::first_attribute(&DAT_00b66f40,GHIDRA_UINT(pcVar9),bVar10); rootPathSize = 0; rootPathCapacity = 0xf; rootPath[0] = (byte ****)0x0; @@ -7074,9 +7074,9 @@ void EntityConfig::LoadBabies(byte *xmlpath) bVar10 = *strCursor; strCursor = strCursor + 1; } while (bVar10 != 0); - uVar7 = (int)strCursor - (int)(strCursor + 1); + uVar7 = GHIDRA_INT(strCursor) - GHIDRA_INT((strCursor + 1)); ((std::string *)((char *)rootPath))->std::string::assign(strCursor,uVar7); - for (xmlNode = ((xml_node *)(xmlNode))->xml_node::first_node(&DAT_00b67088,(int)strCursor,(byte)uVar7); + for (xmlNode = ((xml_node *)(xmlNode))->xml_node::first_node(&DAT_00b67088,GHIDRA_INT(strCursor),(byte)uVar7); xmlNode != (void *)0x0; xmlNode = *(void **)((char *)xmlNode + 0x2c)) { babyId = -1; babyNameSize = 0; @@ -7086,7 +7086,7 @@ void EntityConfig::LoadBabies(byte *xmlpath) babySkinCapacity = 0xf; babySkin = (void *)0x0; babyAchievement = -1; - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; attr = *(undefined4 **)((char *)xmlNode + 0x20); if (attr != (undefined4 *)0x0) { do { @@ -7101,7 +7101,7 @@ void EntityConfig::LoadBabies(byte *xmlpath) isLess = bVar10 < *keyCursor; if (bVar10 != *keyCursor) { LAB_0069bf51: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069bf56; } if (bVar10 == 0) break; @@ -7131,7 +7131,7 @@ LAB_0069bf56: isLess = bVar10 < *keyCursor; if (bVar10 != *keyCursor) { LAB_0069bfa8: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069bfad; } if (bVar10 == 0) break; @@ -7153,7 +7153,7 @@ LAB_0069bfad: bVar10 = *strCursor; strCursor = strCursor + 1; } while (bVar10 != 0); - ((std::string *)((char *)babyName))->std::string::assign(strCursor,(int)strCursor - (int)(strCursor + 1)); + ((std::string *)((char *)babyName))->std::string::assign(strCursor,GHIDRA_INT(strCursor) - GHIDRA_INT((strCursor + 1))); } else { keyCursor = &DAT_00b66ef4; @@ -7166,7 +7166,7 @@ LAB_0069bfad: isLess = bVar10 < *keyCursor; if (bVar10 != *keyCursor) { LAB_0069c010: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069c015; } if (bVar10 == 0) break; @@ -7188,7 +7188,7 @@ LAB_0069c015: bVar10 = *strCursor; strCursor = strCursor + 1; } while (bVar10 != 0); - allocSource = (std_string *)(strCursor + -(int)(strCursor + 1)); + allocSource = (std_string *)(strCursor + -GHIDRA_INT((strCursor + 1))); if ((std_string *)(0x7fffffff - rootPathSize) < allocSource) { /* WARNING: Subroutine does not return */ std::string::_Xlen(); @@ -7198,7 +7198,7 @@ LAB_0069c015: ppppbVar6 = rootPath[0]; } ((std::string *)((char *)&skinPathConcat))->std::string::concat(iStack_10120,allocSource, - (byte *)ppppbVar6,rootPathSize,strCursor,(uint)allocSource); + (byte *)ppppbVar6,rootPathSize,strCursor,GHIDRA_UINT(allocSource)); iStack_10120 = 1; if (0xf < babySkinCapacity) { uVar7 = babySkinCapacity + 1; @@ -7206,7 +7206,7 @@ LAB_0069c015: if (0xfff < uVar7) { xmlNode = *(void **)((char *)babySkin + -4); uVar7 = babySkinCapacity + 0x24; - if (0x1f < (uint)((int)babySkin + (-4 - (int)xmlNode))) goto LAB_0069c39c; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(babySkin) + (-4 - GHIDRA_INT(xmlNode))))) goto LAB_0069c39c; } operator_delete(xmlNode,uVar7); } @@ -7228,7 +7228,7 @@ LAB_0069c015: isLess = bVar10 < (byte)*pcVar9; if (bVar10 != *pcVar9) { LAB_0069c0f2: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_0069c0f7; } if (bVar10 == 0) break; @@ -7254,7 +7254,7 @@ LAB_0069c0f7: } while ((attr[4] != 0) && (attr = (undefined4 *)attr[6], attr != (undefined4 *)0x0)); if (-1 < babyId) { piVar3 = (this->_babies)._end; - babiesByteSize = (int)piVar3 - (int)(this->_babies)._begin; + babiesByteSize = GHIDRA_INT(piVar3) - GHIDRA_INT((this->_babies)._begin); while (babiesByteSize / 0x38 < iVar4) { fillerBabyId = 0xffffffff; fillerBabyNameSize = 0; @@ -7263,7 +7263,7 @@ LAB_0069c0f7: fillerBabySkinSize = 0; fillerBabySkinCapacity = 0xf; fillerBabySkin[0] = (void *)0x0; - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; fillerBabyAchievement = 0; if (piVar3 == (this->_babies)._capacity) { std::vector<56byte>::_Emplace_reallocate(piVar3,&fillerBabyId); @@ -7271,20 +7271,20 @@ LAB_0069c0f7: else { *piVar3 = -1; ((std::string *)((char *)(piVar3 + 1)))->std::string::string(fillerBabyName); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; ((std::string *)((char *)(piVar3 + 7)))->std::string::string(fillerBabySkin); piVar3[0xd] = fillerBabyAchievement; ppvVar1 = &(this->_babies)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 0x38); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 0x38); } - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < fillerBabySkinCapacity) { uVar7 = fillerBabySkinCapacity + 1; xmlNode = fillerBabySkin[0]; if (0xfff < uVar7) { - xmlNode = *(void **)((int)fillerBabySkin[0] + -4); + xmlNode = *(void **)(GHIDRA_INT(fillerBabySkin[0]) + -4); uVar7 = fillerBabySkinCapacity + 0x24; - if (0x1f < (uint)((int)fillerBabySkin[0] + (-4 - (int)xmlNode))) goto LAB_0069c39c; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(fillerBabySkin[0]) + (-4 - GHIDRA_INT(xmlNode))))) goto LAB_0069c39c; } operator_delete(xmlNode,uVar7); } @@ -7292,14 +7292,14 @@ LAB_0069c0f7: uVar7 = fillerBabyNameCapacity + 1; xmlNode = fillerBabyName[0]; if (0xfff < uVar7) { - xmlNode = *(void **)((int)fillerBabyName[0] + -4); + xmlNode = *(void **)(GHIDRA_INT(fillerBabyName[0]) + -4); uVar7 = fillerBabyNameCapacity + 0x24; - if (0x1f < (uint)((int)fillerBabyName[0] + (-4 - (int)xmlNode))) goto LAB_0069c39c; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(fillerBabyName[0]) + (-4 - GHIDRA_INT(xmlNode))))) goto LAB_0069c39c; } operator_delete(xmlNode,uVar7); } piVar3 = (this->_babies)._end; - babiesByteSize = (int)piVar3 - (int)(this->_babies)._begin; + babiesByteSize = GHIDRA_INT(piVar3) - GHIDRA_INT((this->_babies)._begin); } if (piVar3 == (this->_babies)._capacity) { std::vector<56byte>::_Emplace_reallocate(piVar3,&babyId); @@ -7307,22 +7307,22 @@ LAB_0069c0f7: else { *piVar3 = iVar4; ((std::string *)((char *)(piVar3 + 1)))->std::string::string(babyName); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; ((std::string *)((char *)(piVar3 + 7)))->std::string::string(&babySkin); piVar3[0xd] = babyAchievement; ppvVar1 = &(this->_babies)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 0x38); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 0x38); } } } - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (0xf < babySkinCapacity) { uVar7 = babySkinCapacity + 1; xmlNode = babySkin; if (0xfff < uVar7) { xmlNode = *(void **)((char *)babySkin + -4); uVar7 = babySkinCapacity + 0x24; - if (0x1f < (uint)((int)babySkin + (-4 - (int)xmlNode))) goto LAB_0069c39c; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(babySkin) + (-4 - GHIDRA_INT(xmlNode))))) goto LAB_0069c39c; } operator_delete(xmlNode,uVar7); } @@ -7330,21 +7330,21 @@ LAB_0069c0f7: uVar7 = babyNameCapacity + 1; xmlNode = babyName[0]; if (0xfff < uVar7) { - xmlNode = *(void **)((int)babyName[0] + -4); + xmlNode = *(void **)(GHIDRA_INT(babyName[0]) + -4); uVar7 = babyNameCapacity + 0x24; - if (0x1f < (uint)((int)babyName[0] + (-4 - (int)xmlNode))) goto LAB_0069c39c; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(babyName[0]) + (-4 - GHIDRA_INT(xmlNode))))) goto LAB_0069c39c; } operator_delete(xmlNode,uVar7); } } - local_14._0_1_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; if (0xf < rootPathCapacity) { uVar7 = rootPathCapacity + 1; ppppbVar6 = rootPath[0]; if (0xfff < uVar7) { ppppbVar6 = (byte ****)rootPath[0][-1]; uVar7 = rootPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)rootPath[0] + (-4 - (int)ppppbVar6))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(rootPath[0]) + (-4 - GHIDRA_INT(ppppbVar6)))) { LAB_0069c39c: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -7358,14 +7358,14 @@ LAB_0069c39c: allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (text != (byte *)0x0) { uVar7 = *(uint *)(text + -4); qVar2 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar7; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar7; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar2 < uVar7); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < uVar7)); free(text + -4); } } diff --git a/src/game/entity_config_entity.cpp b/src/game/entity_config_entity.cpp index 0d04d4f..b9134fa 100644 --- a/src/game/entity_config_entity.cpp +++ b/src/game/entity_config_entity.cpp @@ -122,12 +122,12 @@ std_string * EntityConfig_Entity::GetName(std_string *outName, uint language) language = language & 0xffffff; StringTable::get_string (stringTable,(byte *)"Entities",resolvedLanguage, - (byte *)(((std_string *)text)->_buf + 1),(byte *)((int)&language + 3)); - if (language._3_1_ == '\0') { + (byte *)(((std_string *)text)->_buf + 1),(byte *)(GHIDRA_INT(&language) + 3)); + if ((*(undefined1 *)((char *)&(language) + 0x3)) == '\0') { language = language & 0xffffff; text = StringTable::get_string (stringTable,(byte *)"Entities",resolvedLanguage, - (byte *)(((std_string *)text)->_buf + 1),(byte *)((int)&language + 3)); + (byte *)(((std_string *)text)->_buf + 1),(byte *)(GHIDRA_INT(&language) + 3)); } } } @@ -143,7 +143,7 @@ std_string * EntityConfig_Entity::GetName(std_string *outName, uint language) ch = textEnd->_buf; textEnd = (std_string *)(textEnd->_buf + 1); } while (*ch != '\0'); - ((std::string *)(outName->_buf))->std::string::assign(text,(int)textEnd - (int)(((std_string *)text)->_buf + 1)); + ((std::string *)(outName->_buf))->std::string::assign(text,GHIDRA_INT(textEnd) - GHIDRA_INT((((std_string *)text)->_buf + 1))); return outName; } @@ -219,28 +219,28 @@ EntityConfig_Entity * EntityConfig_Entity::operator_assign(EntityConfig_Entity * dstVector = &this->preloadSounds; if (dstVector != &other->preloadSounds) { srcBegin = (other->preloadSounds)._begin; - byteCount = (int)(other->preloadSounds)._end - (int)srcBegin; + byteCount = GHIDRA_INT((other->preloadSounds)._end) - GHIDRA_INT(srcBegin); dstBegin = dstVector->_begin; - if ((uint)((int)(this->preloadSounds)._capacity - (int)dstBegin >> 2) < - (uint)((int)byteCount >> 2)) { - std::vector::reserve_clear((int)byteCount >> 2); + if (GHIDRA_UINT((GHIDRA_INT((this->preloadSounds)._capacity) - GHIDRA_INT(dstBegin) >> 2)) < + GHIDRA_UINT((GHIDRA_INT(byteCount) >> 2))) { + std::vector::reserve_clear(GHIDRA_INT(byteCount) >> 2); dstBegin = dstVector->_begin; } memmove(dstBegin,srcBegin,byteCount); - (this->preloadSounds)._end = (void *)(byteCount + (int)dstBegin); + (this->preloadSounds)._end = (void *)(byteCount + GHIDRA_INT(dstBegin)); } dstVector = &this->devolve; if (dstVector != &other->devolve) { srcBegin = (other->devolve)._begin; - byteCount = (int)(other->devolve)._end - (int)srcBegin; + byteCount = GHIDRA_INT((other->devolve)._end) - GHIDRA_INT(srcBegin); other = dstVector->_begin; - if ((uint)(((int)(this->devolve)._capacity - (int)other) / 0xc) < (uint)((int)byteCount / 0xc)) + if (GHIDRA_UINT(((GHIDRA_INT((this->devolve)._capacity) - GHIDRA_INT(other)) / 0xc)) < GHIDRA_UINT((GHIDRA_INT(byteCount) / 0xc))) { - FUN_006a0dc0((int)byteCount / 0xc); + FUN_006a0dc0(GHIDRA_INT(byteCount) / 0xc); other = dstVector->_begin; } memmove(other,srcBegin,byteCount); - (this->devolve)._end = (void *)((int)other + byteCount); + (this->devolve)._end = (void *)(GHIDRA_INT(other) + byteCount); } this->isPreloaded = src->isPreloaded; srcChars = &src->gridCollisionClassString; @@ -322,14 +322,14 @@ EntityConfig_Entity::EntityConfig_Entity(int *param_2) local_8 = 0xffffffff; puStack_c = &LAB_00afa03f; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar3 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; this->id = *param_2; this->variant = param_2[1]; this->subtype = param_2[2]; ((std::string *)((this->name)._buf))->std::string::string(param_2 + 3); - local_8._0_1_ = 0; - local_8._1_3_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0; bossColors = &this->_bossColors; this->shadowSize = (float)param_2[9]; this->collisionDamage = (float)param_2[10]; @@ -359,14 +359,14 @@ EntityConfig_Entity::EntityConfig_Entity(int *param_2) pvVar4 = std::_Allocate(uVar6); bossColors->_begin = pvVar4; (this->_bossColors)._end = pvVar4; - (this->_bossColors)._capacity = (void *)((int)pvVar4 + uVar6); - local_8._0_1_ = 1; + (this->_bossColors)._capacity = (void *)(GHIDRA_INT(pvVar4) + uVar6); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; pvVar4 = (void *)FUN_006a0c40(bossColors->_begin,bossColors,uVar3); (this->_bossColors)._end = pvVar4; } - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; ((std::string *)((this->anm2Path)._buf))->std::string::string(param_2 + 0x1d); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; field8cVector = &(*(undefined1 *)((char *)(this) + 0x8c)); *(undefined4 *)field8cVector = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x90)) = 0; @@ -380,25 +380,25 @@ EntityConfig_Entity::EntityConfig_Entity(int *param_2) pvVar4 = std::_Allocate(uVar3); *(void **)field8cVector = pvVar4; *(void **)&(*(undefined1 *)((char *)(this) + 0x90)) = pvVar4; - *(void **)&(*(undefined1 *)((char *)(this) + 0x94)) = (void *)((int)pvVar4 + uVar3); - local_8._0_1_ = 4; + *(void **)&(*(undefined1 *)((char *)(this) + 0x94)) = (void *)(GHIDRA_INT(pvVar4) + uVar3); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; uVar5 = FUN_006a0bb0(iVar2,srcRecordsEnd,*(undefined4 *)field8cVector); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x90)) = uVar5; } - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; (this->preloadSounds)._begin = (void *)0x0; (this->preloadSounds)._end = (void *)0x0; (this->preloadSounds)._capacity = (void *)0x0; srcSoundsEnd = (undefined4 *)param_2[0x27]; srcSound = (undefined4 *)param_2[0x26]; if (srcSound != srcSoundsEnd) { - uVar3 = (int)srcSoundsEnd - (int)srcSound >> 2; + uVar3 = GHIDRA_INT(srcSoundsEnd) - GHIDRA_INT(srcSound) >> 2; if (0x3fffffff < uVar3) goto LAB_0069f984; uVar3 = uVar3 * 4; pvVar4 = std::_Allocate(uVar3); (this->preloadSounds)._begin = pvVar4; (this->preloadSounds)._end = pvVar4; - (this->preloadSounds)._capacity = (void *)((int)pvVar4 + uVar3); + (this->preloadSounds)._capacity = (void *)(GHIDRA_INT(pvVar4) + uVar3); dstSound = (this->preloadSounds)._begin; do { uVar5 = *srcSound; @@ -408,14 +408,14 @@ EntityConfig_Entity::EntityConfig_Entity(int *param_2) } while (srcSound != srcSoundsEnd); (this->preloadSounds)._end = dstSound; } - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; (this->devolve)._begin = (void *)0x0; (this->devolve)._end = (void *)0x0; (this->devolve)._capacity = (void *)0x0; pvVar4 = (void *)param_2[0x29]; if (pvVar4 != (void *)param_2[0x2a]) { - devolveBytes = param_2[0x2a] - (int)pvVar4; - uVar3 = (int)devolveBytes / 0xc; + devolveBytes = param_2[0x2a] - GHIDRA_INT(pvVar4); + uVar3 = GHIDRA_INT(devolveBytes) / 0xc; if (0x15555555 < uVar3) { LAB_0069f984: /* WARNING: Subroutine does not return */ @@ -425,15 +425,15 @@ LAB_0069f984: devolveBuffer = std::_Allocate(uVar3); (this->devolve)._begin = devolveBuffer; (this->devolve)._end = devolveBuffer; - (this->devolve)._capacity = (void *)((int)devolveBuffer + uVar3); + (this->devolve)._capacity = (void *)(GHIDRA_INT(devolveBuffer) + uVar3); devolveBuffer = (this->devolve)._begin; memmove(devolveBuffer,pvVar4,devolveBytes); - (this->devolve)._end = (void *)(uVar3 + (int)devolveBuffer); + (this->devolve)._end = (void *)(uVar3 + GHIDRA_INT(devolveBuffer)); } - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; this->isPreloaded = *(byte *)(param_2 + 0x2c); ((std::string *)((this->gridCollisionClassString)._buf))->std::string::string(param_2 + 0x2d); - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; this->reroll = *(byte *)(param_2 + 0x33); this->hasFloorAlts = *(byte *)((char *)param_2 + 0xcd); this->collisionInterval = param_2[0x34]; @@ -448,11 +448,11 @@ LAB_0069f984: (this->bestiaryOffset).y = fVar1; this->bestiaryScale = (float)param_2[0x3d]; ((std::string *)((this->bestiaryAnm2Path)._buf))->std::string::string(param_2 + 0x3e); - local_8._0_1_ = 9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; ((std::string *)((this->bestiaryAnim)._buf))->std::string::string(param_2 + 0x44); - local_8._0_1_ = 10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 10; ((std::string *)((this->bestiaryOverlay)._buf))->std::string::string(param_2 + 0x4a); - local_8 = CONCAT31(local_8._1_3_,0xb); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xb); ((std::string *)((this->bestiaryFloorAlt)._buf))->std::string::string(param_2 + 0x50); this->bestiaryParentType = param_2[0x56]; this->bestiaryParentVariant = param_2[0x57]; diff --git a/src/game/entity_config_player.cpp b/src/game/entity_config_player.cpp index aadd9e5..22ad9b9 100644 --- a/src/game/entity_config_player.cpp +++ b/src/game/entity_config_player.cpp @@ -133,7 +133,7 @@ std_string * EntityConfig_Player::GetDisplayName(std_string *outName, void *unus textChar = textEnd->_buf; textEnd = (std_string *)(textEnd->_buf + 1); } while (*textChar != '\0'); - ((std::string *)(outName->_buf))->std::string::assign(text,(int)textEnd - (int)(((std_string *)text)->_buf + 1)); + ((std::string *)(outName->_buf))->std::string::assign(text,GHIDRA_INT(textEnd) - GHIDRA_INT((((std_string *)text)->_buf + 1))); return outName; } @@ -215,15 +215,15 @@ EntityConfig_Player * EntityConfig_Player::operator_assign(EntityConfig_Player * this->_canShoot = other->_canShoot; if (collectibles != &other->_collectibles) { pvVar1 = (other->_collectibles)._begin; - collectiblesBytes = (int)(other->_collectibles)._end - (int)pvVar1; + collectiblesBytes = GHIDRA_INT((other->_collectibles)._end) - GHIDRA_INT(pvVar1); other = collectibles->_begin; - if ((uint)((int)(this->_collectibles)._capacity - (int)other >> 2) < - (uint)((int)collectiblesBytes >> 2)) { - std::vector::reserve_clear((int)collectiblesBytes >> 2); + if (GHIDRA_UINT((GHIDRA_INT((this->_collectibles)._capacity) - GHIDRA_INT(other) >> 2)) < + GHIDRA_UINT((GHIDRA_INT(collectiblesBytes) >> 2))) { + std::vector::reserve_clear(GHIDRA_INT(collectiblesBytes) >> 2); other = collectibles->_begin; } memmove(other,pvVar1,collectiblesBytes); - (this->_collectibles)._end = (void *)((int)other + collectiblesBytes); + (this->_collectibles)._end = (void *)(GHIDRA_INT(other) + collectiblesBytes); } this->_trinket = pEVar3->_trinket; this->_skinColor = pEVar3->_skinColor; @@ -283,17 +283,17 @@ void EntityConfig_Player::copy_constructor(EntityConfig_Player *dst, EntityConfi ((std::string *)((dst->_name)._buf))->std::string::string(&src->_name); local_8 = 0; ((std::string *)((dst->_skinPath)._buf))->std::string::string(&src->_skinPath); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((std::string *)((dst->_nameImagePath)._buf))->std::string::string(&src->_nameImagePath); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; ((std::string *)((dst->_portraitPath)._buf))->std::string::string(&src->_portraitPath); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; ((std::string *)((dst->_unkString)._buf))->std::string::string(&src->_unkString); - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; ((std::string *)((dst->_extraPortraitPath)._buf))->std::string::string(&src->_extraPortraitPath); - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; ((std::string *)((dst->_costumeSuffixName)._buf))->std::string::string(&src->_costumeSuffixName); - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; dst->_costumeID = src->_costumeID; dst->_heart = src->_heart; dst->_armor = src->_armor; @@ -305,14 +305,14 @@ void EntityConfig_Player::copy_constructor(EntityConfig_Player *dst, EntityConfi dst->_pill = src->_pill; dst->_canShoot = src->_canShoot; std::vector::copy_constructor(&src->_collectibles); - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; dst->_trinket = src->_trinket; dst->_skinColor = src->_skinColor; dst->_achievement = src->_achievement; dst->_brokenHeart = src->_brokenHeart; dst->_pocketActiveID = src->_pocketActiveID; ((std::string *)((dst->_birthrightDescription)._buf))->std::string::string(&src->_birthrightDescription); - local_8 = CONCAT31(local_8._1_3_,8); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),8); ((std::string *)((dst->_bSkinParentName)._buf))->std::string::string(&src->_bSkinParentName); dst->_moddedTaintedPlayerID = src->_moddedTaintedPlayerID; dst->_hidden = src->_hidden; diff --git a/src/game/entity_dummy.cpp b/src/game/entity_dummy.cpp index dc5a2bf..0e3bd1b 100644 --- a/src/game/entity_dummy.cpp +++ b/src/game/entity_dummy.cpp @@ -39,7 +39,7 @@ void Entity_Dummy::Render(Vector *offset) local_8 = 0xffffffff; puStack_c = &LAB_00afa330; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(text + 0x110); + local_14 = __security_cookie ^ GHIDRA_UINT((text + 0x110)); ExceptionList = &local_10; this->Entity::Render(offset); sprintf_s(text,0x100,(byte *)"e%d.%d"); diff --git a/src/game/entity_effect.cpp b/src/game/entity_effect.cpp index bee6320..a9e3257 100644 --- a/src/game/entity_effect.cpp +++ b/src/game/entity_effect.cpp @@ -58,11 +58,11 @@ void Entity_Effect::render_player_target(Vector *offset, int segmentMode) if (i < endIndex) { DAT_00c78ef0 = umbilicalData + 0x18; DAT_00c78ef4 = 2; - DAT_00c78ef8._0_2_ = 0x100; + (*(undefined2 *)((char *)&(DAT_00c78ef8) + 0x0)) = 0x100; g_beamRendererPointsEnd = g_beamRendererPoints; do { ringStart = *(int *)(umbilicalData + 0x10); - dVar1 = __uint_to_double_fixup[-((int)i >> 0x1f)]; + dVar1 = __uint_to_double_fixup[-(GHIDRA_INT(i) >> 0x1f)]; lastIndex = *(int *)(umbilicalData + 0x14) + -1; fVar3 = g_displayPixelRatio * g_screenPointScale; dVar2 = __uint_to_double_fixup[-(lastIndex >> 0x1f)]; @@ -79,7 +79,7 @@ void Entity_Effect::render_player_target(Vector *offset, int segmentMode) renderPos.x = (float)dVar4 / fVar3 + offset->x; renderPos.y = (float)dVar5 / fVar3 + offset->y; BeamRenderer::Add(&renderPos,(ColorMod *)beamColor,1.0, - (float)((double)(int)i + dVar1) / (float)((double)lastIndex + dVar2)); + (float)((double)GHIDRA_INT(i) + dVar1) / (float)((double)lastIndex + dVar2)); i = i + 1; } while (i <= endIndex); BeamRenderer::End(); @@ -307,7 +307,7 @@ void Entity_Effect::Init(int type, int variant, int subType, uint initSeed) local_8 = 0xffffffff; puStack_c = &LAB_00af61a2; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(local_28 + 0x24); + local_14 = __security_cookie ^ GHIDRA_UINT((local_28 + 0x24)); ExceptionList = &local_10; effect = this; FUN_0060c800(0); @@ -315,7 +315,7 @@ void Entity_Effect::Init(int type, int variant, int subType, uint initSeed) ((std::vector *)(&this->_hitList))->std::vector::clear(1); this->_maxHitPoints = 0.0; if (this->_config != (void *)0x0) { - ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)((int)this->_config + 0x74),0); + ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)(GHIDRA_INT(this->_config) + 0x74),0); pbVar2 = ((std::string *)((this->_sprite)._animDefaultName._buf))->std::string::c_str(); ((ANM2 *)(&this->_sprite))->ANM2::Play(pbVar2,0); } @@ -331,9 +331,9 @@ void Entity_Effect::Init(int type, int variant, int subType, uint initSeed) this->_maxRadius = 0.0; this->_damageSource = 0; *(undefined4 *)&(this->_varData)._l = 0; - *(undefined4 *)((int)&(this->_varData)._l + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_varData)._l) + 4) = 0; *(undefined4 *)&(this->_varData)._h = 0; - *(undefined4 *)((int)&(this->_varData)._h + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_varData)._h) + 4) = 0; if (*(int *)((char *)g_game->_room + 8) == 0x10) { switch(this->_variant) { case 7: @@ -421,7 +421,7 @@ void Entity_Effect::Init(int type, int variant, int subType, uint initSeed) pvVar10 = (this->_sprite)._animState._animData; } if (pvVar10 != (void *)0x0) { - ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)(int)uVar13); + ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(uVar13)); } ((Color *)(&faintColor))->Color::Reset(); ((Color *)(&faintColor))->Color::SetTint(1.0,1.0,1.0,0.3); @@ -450,9 +450,9 @@ void Entity_Effect::Init(int type, int variant, int subType, uint initSeed) } iVar3 = this->_variant; if ((iVar3 != 7) && (iVar3 != 0x12)) { - uVar17 = *(undefined4 *)((int)&this->_flags + 4); - *(uint *)&this->_flags = (uint)this->_flags | 8; - *(undefined4 *)((int)&this->_flags + 4) = uVar17; + uVar17 = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); + *(uint *)&this->_flags = GHIDRA_UINT(this->_flags) | 8; + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = uVar17; } this->_sortingLayer = 0; } @@ -516,7 +516,7 @@ LAB_005ce0c2: (this->_posOffset).y = -23.0; iVar3 = this->_variant; this->_fallingSpeed = - -5.0 - (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + -5.0 - (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 10.0; if ((iVar3 == 0x1b) || (iVar3 == 0xa3)) { uVar4 = Random(); @@ -540,7 +540,7 @@ LAB_005ce0c2: this->_height = -23.0; uVar4 = Random(); local_2b8 = (LayerState *) - ((float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 360.0); layer = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer((byte *)0x0); layer->_rotation = (float)local_2b8; @@ -548,7 +548,7 @@ LAB_005ce0c2: ((ANM2 *)(&this->_sprite))->ANM2::Play((&PTR_s_Gib01_00b63b94)[uVar4 % 5],0); uVar4 = Random(); this->_fallingSpeed = - 5.0 - (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + 5.0 - (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 30.0; goto LAB_005d03cf; } @@ -564,12 +564,12 @@ LAB_005ce0c2: uVar4 = Random(); (this->_sprite)._flipX = ((byte)uVar4 ^ 0xff) & 1; manager = g_manager; - if (((uint)this->_subtype < 10) && + if ((GHIDRA_UINT(this->_subtype) < 10) && ((this->_spawnerEntity == (EntityPtr)0x0 || (*(int *)((char *)this->_spawnerEntity + 0x28) != 0x108)))) { local_2b4 = (Entity_Familiar *)0x25; seed_fart_sound_override((int *)&local_2b4); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_2b4,1.0,0x14,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_2b4),1.0,0x14,0,1.0,0.0); } this->_renderZOffset = 1000; goto LAB_005d03cf; @@ -621,11 +621,11 @@ LAB_005d0198: this->_sortingLayer = 0; this->_renderZOffset = 5000; uVar4 = Random(); - local_2c0.y = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + local_2c0.y = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 10000.0; uVar4 = Random(); (this->_targetPosition).x = - (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 40.0; (this->_targetPosition).y = local_2c0.y; } @@ -670,13 +670,13 @@ LAB_005d03c8: } else { if (iVar3 == 0x42) { - local_28._4_4_ = this->_initSeed; - local_20._0_4_ = 1.4013e-45; - local_20._4_4_ = 1.54143e-44; + (*(undefined4 *)((char *)&(local_28) + 0x4)) = this->_initSeed; + (*(undefined4 *)((char *)&(local_20) + 0x0)) = 1.4013e-45; + (*(undefined4 *)((char *)&(local_20) + 0x4)) = 1.54143e-44; local_18 = 6; local_8 = 1; ((RNG *)((RNG *)(local_28 + 4)))->RNG::Next(); - ((ANM2 *)(&this->_sprite))->ANM2::Play((&PTR_s_Poof0_00b63b34)[(uint)local_28._4_4_ % 3],0); + ((ANM2 *)(&this->_sprite))->ANM2::Play((&PTR_s_Poof0_00b63b34)[(*(undefined4 *)((char *)&(GHIDRA_UINT(local_28)) + 0x4)) % 3],0); local_8 = 0xffffffff; } else { @@ -707,15 +707,15 @@ LAB_005d03c8: } else { uVar4 = Random(); - local_2b4 = (Entity_Familiar *)(uVar4 % (uint)local_2b8); + local_2b4 = (Entity_Familiar *)(uVar4 % GHIDRA_UINT(local_2b8)); } psVar7 = (std_string *)((std::string *)(pcVar6))->std::string::c_str(); - ((ANM2 *)(&this->_sprite))->ANM2::SetFrame(psVar7,(int)local_2b4); + ((ANM2 *)(&this->_sprite))->ANM2::SetFrame(psVar7,GHIDRA_INT(local_2b4)); uVar4 = Random(); (this->_sprite)._flipX = ((byte)uVar4 ^ 0xff) & 1; uVar4 = Random(); (this->_sprite)._rotation = - (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 360.0 - 180.0; (this->_sprite)._scale.x = 0.5; (this->_sprite)._scale.y = 0.5; @@ -739,7 +739,7 @@ LAB_005d03c8: (this->_posOffset).y = -20.0; local_2b8 = (LayerState *)0x345; seed_fart_sound_override((int *)&local_2b8); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_2b8,1.0,2,1,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_2b8),1.0,2,1,1.0,0.0); goto LAB_005d03cf; } if (iVar3 == 0x3d) { @@ -781,7 +781,7 @@ LAB_005ceb44: if (uVar4 % 3 == 0) { ((ANM2 *)(&this->_sprite))->ANM2::Play((byte *)"LargeDrop",0); uVar4 = Random(); - scale = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + scale = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 0.5 + 0.5; fVar16 = scale * g_vectorOne.x; (this->_sprite)._scale.y = scale * g_vectorOne.y; @@ -871,13 +871,13 @@ LAB_005ceeab: if (this->_subtype == 1) { SetTimeout(this,0x3c); fVar16 = random_float(); - SoundEffects::PlayWithFartOverride2(0x22d,(int)&this->_pos,2,0,fVar16 * 0.2 + 0.9,1.0) + SoundEffects::PlayWithFartOverride2(0x22d,GHIDRA_INT(&this->_pos),2,0,fVar16 * 0.2 + 0.9,1.0) ; } else { SetTimeout(this,0x5a); fVar16 = random_float(); - SoundEffects::PlayWithFartOverride2(0x110,(int)&this->_pos,2,0,fVar16 * 0.3 + 2.7,0.6) + SoundEffects::PlayWithFartOverride2(0x110,GHIDRA_INT(&this->_pos),2,0,fVar16 * 0.3 + 2.7,0.6) ; } } @@ -970,8 +970,8 @@ LAB_005cf2a4: pvVar10 = layer->_layerData; game = (Game *)Config::GetCollectibles(); currentRoomDesc = ((Game *)(game))->Game::GetCurrentRoomDesc(); - linkedRoomDesc = ((Level *)(local_2e4))->Level::GetRoomByIdx((int)pvVar10,-1); - if ((-1 < (int)local_2b8->_layerData) || + linkedRoomDesc = ((Level *)(local_2e4))->Level::GetRoomByIdx(GHIDRA_INT(pvVar10),-1); + if ((-1 < GHIDRA_INT(local_2b8->_layerData)) || (isOpened = false, linkedRoomDesc == currentRoomDesc)) { isOpened = true; } @@ -1287,19 +1287,19 @@ LAB_005d00d8: else if (iVar3 == 0x77) { this->_visible = 0; *(undefined4 *)&(this->_varData)._l = 0; - *(undefined4 *)((int)&(this->_varData)._l + 4) = 1; + *(undefined4 *)(GHIDRA_INT(&(this->_varData)._l) + 4) = 1; *(undefined4 *)&(this->_varData)._h = 1; ((Entity *)((Entity *)this))->Entity::AddEntityFlags(0x200000); } else if (iVar3 == 0x78) { this->_visible = 0; *(undefined4 *)&(this->_varData)._l = 0; - *(undefined4 *)((int)&(this->_varData)._l + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_varData)._l) + 4) = 0; this->_state = -1; ((Entity *)((Entity *)this))->Entity::AddEntityFlags(0x200000); } else if (iVar3 == 0x31) { - if ((uint)this->_subtype < 6) { + if (GHIDRA_UINT(this->_subtype) < 6) { ((ANM2 *)(&this->_sprite))->ANM2::Play((&PTR_s_Heart_00b63af4)[this->_subtype],0); } } @@ -1411,7 +1411,7 @@ LAB_005d00d8: (this->_splatColor)._colorize[1] = splatTint._colorize[1]; (this->_splatColor)._colorize[2] = splatTint._colorize[2]; (this->_splatColor)._colorize[3] = splatTint._colorize[3]; - *(undefined8 *)(this->_splatColor)._offset = splatTint._offset._0_8_; + *(undefined8 *)(this->_splatColor)._offset = (*(undefined8 *)((char *)&(splatTint._offset) + 0x0)); (this->_splatColor)._offset[2] = splatTint._offset[2]; } goto code_r0x005cede7; @@ -1528,7 +1528,7 @@ LAB_005ceaae: local_8 = 0xffffffff; ((std::string *)(psVar7->_buf))->std::string::_Tidy_deallocate(); ((RNG *)(&this->_dropRNG))->RNG::Next(); - ((ANM2 *)(&this->_sprite))->ANM2::Play((&PTR_s_WombBreak1_00b63b88)[(uint)(this->_dropRNG)._seed % 3],0); + ((ANM2 *)(&this->_sprite))->ANM2::Play((&PTR_s_WombBreak1_00b63b88)[GHIDRA_UINT((this->_dropRNG)._seed) % 3],0); break; case 0x2e: std::string::string_from_cstr @@ -1957,10 +1957,10 @@ LAB_005d10c7: *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x430)) = 0x40600000; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x434)) = 0x3f800000; FUN_00435bc0(0,0); - *(undefined4 *)&(this->_varData)._l = local_28._4_4_; - *(float *)((int)&(this->_varData)._l + 4) = (float)local_20; - *(float *)&(this->_varData)._h = local_20._4_4_; - *(int *)((int)&(this->_varData)._h + 4) = local_18; + *(undefined4 *)&(this->_varData)._l = (*(undefined4 *)((char *)&(local_28) + 0x4)); + *(float *)(GHIDRA_INT(&(this->_varData)._l) + 4) = (float)local_20; + *(float *)&(this->_varData)._h = (*(undefined4 *)((char *)&(local_20) + 0x4)); + *(int *)(GHIDRA_INT(&(this->_varData)._h) + 4) = local_18; goto LAB_005d11c7; case 0xa8: this->_sortingLayer = 0; @@ -2071,7 +2071,7 @@ LAB_005d130a: if (iVar3 == 0) { LAB_005d1763: ((RNG *)((RNG *)(local_28 + 4)))->RNG::game_constructor(this->_initSeed,0x12); - local_8 = CONCAT31(local_8._1_3_,0x1b); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x1b); uVar4 = ((RNG *)(seedRng))->RNG::Next(); tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,7,&this->_pos,&g_vectorZero,(Entity *)0x0,0,uVar4); tmpEntity->Update(); @@ -2168,7 +2168,7 @@ LAB_005d0681: uVar13 = ((RNG *)((RNG *)(local_28 + 4)))->RNG::RandomInt(2); ((Sprite *)((Sprite *)&this->_sprite))->Sprite::set_flip_x(uVar13 != 0); sprite = &this->_sprite; - local_2b8 = (LayerState *)((float)(int)uVar4 * 64.0); + local_2b8 = (LayerState *)((float)GHIDRA_INT(uVar4) * 64.0); layer = ((Sprite *)((Sprite *)sprite))->Sprite::GetLayer((byte *)0x0); (layer->_cropOffset).y = (float)local_2b8; layer = ((Sprite *)((Sprite *)sprite))->Sprite::GetLayer((byte *)0x1); @@ -2267,7 +2267,7 @@ LAB_005d1317: iVar3 = effect->_variant; } if ((iVar3 == 0x1e) || (iVar3 == 0x99)) { - *(undefined4 *)((int)&(effect->_varData)._l + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(effect->_varData)._l) + 4) = 0; *(undefined4 *)&(effect->_varData)._h = 0; layer = ((Sprite *)((Sprite *)sprite))->Sprite::GetLayer((byte *)0x1); layer->_wrapSMode = 0; @@ -2469,7 +2469,7 @@ LAB_005d2702: (((*(int *)((char *)linkedEntity + 0x28) == 1 || (isEnemy = ((Entity *)((Entity *)linkedEntity))->Entity::IsEnemy(), isEnemy != 0)) && (this->_lifespan == 0)))) { - scratchVec.x = ((Vector *)((int)linkedEntity + 0x33c))->x - (this->_pos).x; + scratchVec.x = ((Vector *)(GHIDRA_INT(linkedEntity) + 0x33c))->x - (this->_pos).x; fVar1 = *(float *)((char *)linkedEntity + 0x340) - (this->_pos).y; fVar2 = atan2f(fVar1,scratchVec.x); layer = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer((byte *)0x1); @@ -2633,8 +2633,8 @@ void Entity_Effect::update_mr_me() fVar28 = *(float *)((char *)pvVar20 + 0x33c) - (float)targetEffect[0xcf]; targetEffect[0xd5] = 100; } - targetEffect[0xd8] = (int)fVar28; - targetEffect[0xd9] = (int)fVar24; + targetEffect[0xd8] = GHIDRA_INT(fVar28); + targetEffect[0xd9] = GHIDRA_INT(fVar24); (**(code **)(*targetEffect + 0x3c))(); fVar24 = *(float *)((char *)this->_target + 0x340); (this->_targetPosition).x = *(float *)((char *)this->_target + 0x33c); @@ -2662,8 +2662,8 @@ void Entity_Effect::update_mr_me() if (0 < *(int *)((char *)pvVar20 + 0x10) * *(int *)((char *)pvVar20 + 0xc)) { local_70 = 5.04467e-44; do { - if ((uint)local_5c < 0x1c0) { - iVar14 = *(int *)((char *)pvVar20 + (int)local_70); + if (GHIDRA_UINT(local_5c) < 0x1c0) { + iVar14 = *(int *)((char *)pvVar20 + GHIDRA_INT(local_70)); if (iVar14 == 0) goto LAB_005d2e6b; uVar16 = *(uint *)(iVar14 + 0xc); fVar26 = local_48; @@ -2743,10 +2743,10 @@ LAB_005d2e6e: *(float *)(mrMeData + 0x120) = local_44; bestDistSq = fVar25; } - local_5c = (EntityPtr)((int)local_5c + 1); - local_70 = (float)((int)local_70 + 4); + local_5c = (EntityPtr)(GHIDRA_INT(local_5c) + 1); + local_70 = (float)(GHIDRA_INT(local_70) + 4); pvVar20 = g_game->_room; - } while ((int)local_5c < *(int *)((char *)pvVar20 + 0x10) * *(int *)((char *)pvVar20 + 0xc)); + } while (GHIDRA_INT(local_5c) < *(int *)((char *)pvVar20 + 0x10) * *(int *)((char *)pvVar20 + 0xc)); } local_50 = 0.0; pvVar20 = g_game->_room; @@ -2758,7 +2758,7 @@ LAB_005d2e6e: fVar28 = g_vectorZero.y; if (*(int *)((char *)pvVar20 + 0x1264) != 0) { do { - EVar22 = *(EntityPtr *)(*(int *)((char *)pvVar20 + 0x125c) + (int)local_60 * 4); + EVar22 = *(EntityPtr *)(*(int *)((char *)pvVar20 + 0x125c) + GHIDRA_INT(local_60) * 4); iVar14 = *(int *)((char *)EVar22 + 0x28); if (iVar14 == 0x21) { if ((*(float *)((char *)EVar22 + 0x380) <= 1.0) || (*(uint *)((char *)EVar22 + 0x2c) < 2)) @@ -2793,7 +2793,7 @@ LAB_005d3260: isLess = curChar < (byte)*literalCursor; if (curChar != *literalCursor) { LAB_005d3386: - uVar16 = -(uint)isLess | 1; + uVar16 = -GHIDRA_UINT(isLess) | 1; goto LAB_005d338b; } if (curChar == 0) break; @@ -2880,8 +2880,8 @@ LAB_005d33d8: bestDistSq = fVar26; } else if (fVar26 < bestDistSq) goto LAB_005d33d8; - local_60 = (float)((int)local_60 + 1); - } while ((uint)local_60 < *(uint *)((char *)pvVar20 + 0x1264)); + local_60 = (float)(GHIDRA_INT(local_60) + 1); + } while (GHIDRA_UINT(local_60) < *(uint *)((char *)pvVar20 + 0x1264)); } if (*(int *)(mrMeData + 4) != 0) { this->_state = 1; @@ -2937,7 +2937,7 @@ LAB_005d33d8: if ((EVar22 == (EntityPtr)0x0) || (*(char *)((char *)EVar22 + 0x171) != '\0')) goto LAB_005d3f7c; } - else if ((int)uVar16 < 0) { + else if (GHIDRA_INT(uVar16) < 0) { if (EVar22 != (EntityPtr)0x0) { if (*(int *)((char *)EVar22 + 0x28) != 5) goto LAB_005d3f7c; pickup = (Entity_Pickup *)__RTDynamicCast(); @@ -3023,7 +3023,7 @@ LAB_005d33d8: fVar28 = (this->_pos).y - fVar28; if (1600.0 <= fVar28 * fVar28 + fVar24 * fVar24) goto LAB_005d3f7c; uVar16 = *(uint *)(mrMeData + 0x120); - if (((((((-1 < (int)uVar16) && (uVar16 < 0x1c0)) && + if (((((((-1 < GHIDRA_INT(uVar16)) && (uVar16 < 0x1c0)) && (iVar14 = *(int *)((char *)g_game->_room + uVar16 * 4 + 0x24), iVar14 != 0)) && ((*(int *)(iVar14 + 4) == 0x10 && (door = (GridEntity_Door *)__RTDynamicCast(), (door->_desc)._state != 2)))) && @@ -3151,7 +3151,7 @@ void Entity_Effect::update_wave_chain() *(BitSet128 **)&(*(undefined1 *)((char *)(this) + 0x430)) = *clampedStep; *(float *)&(*(undefined1 *)((char *)(this) + 0x434)) = *(float *)&(*(undefined1 *)((char *)(this) + 0x434)) + 0.1; } - else if ((waveMode == 2) && ((int)(this->_varData)._h == 1)) { + else if ((waveMode == 2) && (GHIDRA_INT((this->_varData)._h) == 1)) { *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x434)) = 0x3fe00000; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x43c)) = 0x3c; } @@ -3160,16 +3160,16 @@ void Entity_Effect::update_wave_chain() local_14 = (BitSet128 *)cos((float)local_10); fVar3 = sin((float)local_10); fVar1 = *(float *)&(this->_varData)._l; - fVar2 = *(float *)((int)&(this->_varData)._l + 4); + fVar2 = *(float *)(GHIDRA_INT(&(this->_varData)._l) + 4); *(float *)&(this->_varData)._l = fVar1 * (float)local_14 - fVar2 * fVar3; - *(float *)((int)&(this->_varData)._l + 4) = fVar2 * (float)local_14 + fVar1 * fVar3; + *(float *)(GHIDRA_INT(&(this->_varData)._l) + 4) = fVar2 * (float)local_14 + fVar1 * fVar3; } fVar1 = *(float *)&(this->_varData)._l; local_14 = &this->_varData; - fVar2 = *(float *)((int)&(this->_varData)._l + 4); + fVar2 = *(float *)(GHIDRA_INT(&(this->_varData)._l) + 4); fVar2 = sqrtf(fVar1 * fVar1 + fVar2 * fVar2); - fVar1 = *(float *)((int)&(this->_varData)._h + 4); - spawnY = *(float *)((int)&local_14->_l + 4); + fVar1 = *(float *)(GHIDRA_INT(&(this->_varData)._h) + 4); + spawnY = *(float *)(GHIDRA_INT(&local_14->_l) + 4); if (fVar2 <= 0.0) { fVar3 = *(float *)&local_14->_l; } @@ -3180,7 +3180,7 @@ void Entity_Effect::update_wave_chain() } local_10 = (BitSet128 *)(fVar3 + (this->_pos).x); spawnY = spawnY + (this->_pos).y; - FUN_006395e0(&local_10,local_14,(int)(this->_varData)._h,fVar1,*(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x430)) + FUN_006395e0(&local_10,local_14,GHIDRA_INT((this->_varData)._h),fVar1,*(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x430)) ,*(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x434)),waveDelay,*(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x43c)), *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x444)),*(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x448))); } @@ -3212,7 +3212,7 @@ void Entity_Effect::moonlight_timer_callback(int param_1) uint local_c; pMVar3 = g_manager; - local_c = __security_cookie ^ (uint)auStack_50; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_50); this = *(Entity_Player **)(param_1 + 0x3bc); if (((this != (Entity_Player *)0x0) && (this->_type == 1)) && (this->_dead == 0)) { local_4c = 0x84; @@ -3231,7 +3231,7 @@ void Entity_Effect::moonlight_timer_callback(int param_1) uStack_1c = 0; this->SetColor(&local_38,3,0xffffffff,1,1); pvVar1 = (g_manager->_itemConfig)._nullItems._begin; - if ((0x128 < (int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar1 & 0xfffffffcU)) + if ((0x128 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar1) & 0xfffffffcU))) && (iVar2 = *(int *)((char *)pvVar1 + 0x128), iVar2 != 0)) { aiStack_48[2] = *(undefined4 *)(iVar2 + 0x78); aiStack_48[1] = 0; @@ -3320,7 +3320,7 @@ void Entity_Effect::Render(Vector *offset) Game *game; EntityPtr *trailPoint; - local_8 = (float)(__security_cookie ^ (uint)((&parentColor)[1]._tint + 1)); + local_8 = (float)(__security_cookie ^ GHIDRA_UINT(((&parentColor)[1]._tint + 1))); renderOffset = offset; if (this->_variant == 0x79) { return; @@ -3355,7 +3355,7 @@ void Entity_Effect::Render(Vector *offset) if ((iVar1 == 0x7a) || (iVar1 == 0xb8)) { local_154 = this->_parent; if (local_154 == (EntityPtr)0x0) goto LAB_0060ab8d; - layerSprite = (ANM2 *)((int)local_154 + 0x48); + layerSprite = (ANM2 *)(GHIDRA_INT(local_154) + 0x48); layer = ((ANM2 *)(layerSprite))->ANM2::GetLayer((byte *)this->_state); fVar10 = g_displayPixelRatio; layer->_visible = 1; @@ -3402,10 +3402,10 @@ void Entity_Effect::Render(Vector *offset) else if (iVar1 == 0x27) { if ((this->_subtype == 1) && (EVar13 = this->_parent, EVar13 != (EntityPtr)0x0)) { if (*(uint *)((char *)EVar13 + 200) < 3) goto LAB_0060ab8d; - layer = ((ANM2 *)((ANM2 *)((int)EVar13 + 0x48)))->ANM2::GetLayer((byte *)0x2); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(EVar13) + 0x48)))->ANM2::GetLayer((byte *)0x2); layer->_visible = 1; - ((Sprite *)((Sprite *)((int)this->_parent + 0x48)))->Sprite::RenderLayer(2,pVVar3,&g_vectorZero,&g_vectorZero); - layerSprite = (ANM2 *)((int)this->_parent + 0x48); + ((Sprite *)((Sprite *)(GHIDRA_INT(this->_parent) + 0x48)))->Sprite::RenderLayer(2,pVVar3,&g_vectorZero,&g_vectorZero); + layerSprite = (ANM2 *)(GHIDRA_INT(this->_parent) + 0x48); layerName = (byte *)0x2; LAB_0060ab84: layer = ((ANM2 *)(layerSprite))->ANM2::GetLayer(layerName); @@ -3416,7 +3416,7 @@ LAB_0060ab84: else { if (iVar1 == 0x8b) { uVar4 = this->_state; - if (((((int)uVar4 < 0) || (0x1bf < uVar4)) || + if ((((GHIDRA_INT(uVar4) < 0) || (0x1bf < uVar4)) || (iVar1 = *(int *)((char *)g_game->_room + uVar4 * 4 + 0x24), iVar1 == 0)) || ((*(int *)(iVar1 + 4) != 0x11 || (*(uint *)(iVar1 + 0xc0) < 2)))) goto LAB_0060ab8d; layerSprite = (ANM2 *)(iVar1 + 0x40); @@ -3433,7 +3433,7 @@ LAB_0060ab84: (1 < *(uint *)((char *)local_190 + 0x14))) { DAT_00c78ef0 = &this->_sprite; DAT_00c78ef4 = 0; - DAT_00c78ef8._0_2_ = 0; + (*(undefined2 *)((char *)&(DAT_00c78ef8) + 0x0)) = 0; g_beamRendererPointsEnd = g_beamRendererPoints; local_1ac = *(int **)((char *)local_190 + 4); local_170 = (float)(*(int *)((char *)local_190 + 0x14) + -1 + *(int *)((char *)local_190 + 0x10)); @@ -3444,8 +3444,8 @@ LAB_0060ab84: trail = local_1ac; LAB_00607b21: do { - if ((int)local_170 + 1U == *(int *)((char *)fVar10 + 0x10)) goto LAB_00607e4b; - if (0 < (int)local_194) { + if (GHIDRA_INT(local_170) + 1U == *(int *)((char *)fVar10 + 0x10)) goto LAB_00607e4b; + if (0 < GHIDRA_INT(local_194)) { if (trail == (int *)0x0) { iVar1 = 0; } @@ -3453,7 +3453,7 @@ LAB_00607b21: iVar1 = *trail; } pfVar5 = *(float **) - (*(int *)(iVar1 + 4) + (*(int *)(iVar1 + 8) - 1U & (uint)local_170) * 4); + (*(int *)(iVar1 + 4) + (*(int *)(iVar1 + 8) - 1U & GHIDRA_UINT(local_170)) * 4); fVar11 = *pfVar5 - (float)local_158; fVar12 = pfVar5[1] - (float)local_18c; fVar12 = sqrtf(fVar12 * fVar12 + fVar11 * fVar11); @@ -3464,9 +3464,9 @@ LAB_00607b21: iVar1 = *trail; } if (fVar12 < *(float *)(*(int *)(*(int *)(iVar1 + 4) + - (*(int *)(iVar1 + 8) - 1U & (uint)local_170) * 4) + 0x34 + (*(int *)(iVar1 + 8) - 1U & GHIDRA_UINT(local_170)) * 4) + 0x34 ) * 0.4) { - local_170 = (float)((int)local_170 - 1); + local_170 = (float)(GHIDRA_INT(local_170) - 1); goto LAB_00607b21; } } @@ -3476,7 +3476,7 @@ LAB_00607b21: else { iVar1 = *trail; } - iVar1 = *(int *)(*(int *)(iVar1 + 4) + (*(int *)(iVar1 + 8) - 1U & (uint)local_170) * 4); + iVar1 = *(int *)(*(int *)(iVar1 + 4) + (*(int *)(iVar1 + 8) - 1U & GHIDRA_UINT(local_170)) * 4); beamColor._tint[0] = *(float *)(iVar1 + 8); beamColor._tint[1] = *(float *)(iVar1 + 0xc); beamColor._tint[2] = *(float *)(iVar1 + 0x10); @@ -3484,7 +3484,7 @@ LAB_00607b21: beamColor._colorize[1] = *(float *)(iVar1 + 0x1c); beamColor._colorize[2] = *(float *)(iVar1 + 0x20); beamColor._colorize[3] = *(float *)(iVar1 + 0x24); - beamColor._offset._0_8_ = *(undefined8 *)(iVar1 + 0x28); + (*(undefined8 *)((char *)&(beamColor._offset) + 0x0)) = *(undefined8 *)(iVar1 + 0x28); beamColor._offset[2] = *(float *)(iVar1 + 0x30); if (trail == (int *)0x0) { trailDeque = 0; @@ -3495,25 +3495,25 @@ LAB_00607b21: beamColor._tint[3] = *(float *)(iVar1 + 0x14) * *(float *)(*(int *)(*(int *)(trailDeque + 4) + - (*(int *)(trailDeque + 8) - 1U & (uint)local_170) * 4) + 0x3c); + (*(int *)(trailDeque + 8) - 1U & GHIDRA_UINT(local_170)) * 4) + 0x3c); if (trail == (int *)0x0) { iVar1 = 0; } else { iVar1 = *trail; } - iVar1 = *(int *)(*(int *)(iVar1 + 4) + (*(int *)(iVar1 + 8) - 1U & (uint)local_170) * 4); + iVar1 = *(int *)(*(int *)(iVar1 + 4) + (*(int *)(iVar1 + 8) - 1U & GHIDRA_UINT(local_170)) * 4); if (trail == (int *)0x0) { - local_158 = *(EntityPtr *)(_DAT_00000004 + (_DAT_00000008 - 1U & (uint)local_170) * 4); + local_158 = *(EntityPtr *)(_DAT_00000004 + (_DAT_00000008 - 1U & GHIDRA_UINT(local_170)) * 4); trailDeque = 0; } else { local_158 = *(EntityPtr *) - (*(int *)(*trail + 4) + (*(int *)(*trail + 8) - 1U & (uint)local_170) * 4); + (*(int *)(*trail + 4) + (*(int *)(*trail + 8) - 1U & GHIDRA_UINT(local_170)) * 4); trailDeque = *trail; } local_1b4.y = *(float *)(*(int *)(*(int *)(trailDeque + 4) + - (*(int *)(trailDeque + 8) - 1U & (uint)local_170) * 4) + + (*(int *)(trailDeque + 8) - 1U & GHIDRA_UINT(local_170)) * 4) + 0x34) * *(float *)((char *)local_158 + 0x3c); if (trail == (int *)0x0) { trailDeque = 0; @@ -3524,7 +3524,7 @@ LAB_00607b21: local_158 = (EntityPtr)(g_displayPixelRatio * g_screenPointScale); pfVar5 = *(float **) (*(int *)(trailDeque + 4) + - (*(int *)(trailDeque + 8) - 1U & (uint)local_170) * 4); + (*(int *)(trailDeque + 8) - 1U & GHIDRA_UINT(local_170)) * 4); local_154 = (EntityPtr) (((g_screenWidth - 338.0) * 0.5 + (*pfVar5 - 60.0) * 0.65) * (float)local_158 + 0.5); @@ -3545,9 +3545,9 @@ LAB_00607b21: iVar1 = *local_1ac; } trailPoint = *(EntityPtr **) - (*(int *)(iVar1 + 4) + (*(int *)(iVar1 + 8) - 1U & (uint)local_170) * 4); - local_194 = (float)((int)local_194 + 1); - local_170 = (float)((int)local_170 - 1); + (*(int *)(iVar1 + 4) + (*(int *)(iVar1 + 8) - 1U & GHIDRA_UINT(local_170)) * 4); + local_194 = (float)(GHIDRA_INT(local_194) + 1); + local_170 = (float)(GHIDRA_INT(local_170) - 1); local_158 = *trailPoint; local_18c = trailPoint[1]; fVar10 = local_190; @@ -3563,8 +3563,8 @@ LAB_00607b21: local_1a4 = (this->_posOffset).y + (this->_pos).y; } else { - local_1a8 = (int *)(((Vector *)((int)EVar13 + 0x33c))->x + - ((Vector *)((int)EVar13 + 0x34c))->x); + local_1a8 = (int *)(((Vector *)(GHIDRA_INT(EVar13) + 0x33c))->x + + ((Vector *)(GHIDRA_INT(EVar13) + 0x34c))->x); local_1a4 = *(float *)((char *)EVar13 + 0x340) + *(float *)((char *)EVar13 + 0x350); isLocalPlayerOwned = ((Entity *)((Entity *)EVar13))->Entity::IsEnemy(); if (isLocalPlayerOwned != 0) { @@ -3675,7 +3675,7 @@ LAB_00607b21: local_190 = local_190 * this->_updateTime; DAT_00c78ef0 = &this->_sprite; g_beamRendererPointsEnd = g_beamRendererPoints; - DAT_00c78ef8._0_2_ = 0; + (*(undefined2 *)((char *)&(DAT_00c78ef8) + 0x0)) = 0; beamColor._tint[3] = 0.0; DAT_00c78ef4 = iVar1; BeamRenderer::Add(&local_1bc,&beamColor,local_170,local_190 + 0.0); @@ -3730,7 +3730,7 @@ LAB_00607b21: ((Color *)(&parentColor))->Color::Color(); fVar10 = 0.0; if (this->_parent != (EntityPtr)0x0) { - ((Color *)(player))->Color::operator_assign((ColorMod *)((int)this->_parent + 0xf0)); + ((Color *)(player))->Color::operator_assign((ColorMod *)(GHIDRA_INT(this->_parent) + 0xf0)); iVar1 = *(int *)(extraout_EDX_00 + 0x3c4); if (iVar1 == 0) { local_178.x = *(float *)(extraout_EDX_00 + 0x33c); @@ -3776,7 +3776,7 @@ LAB_00607b21: DAT_00c78ef0 = &this->_sprite; local_170 = local_170 / (float)local_154; DAT_00c78ef4 = 1; - DAT_00c78ef8._0_2_ = 0; + (*(undefined2 *)((char *)&(DAT_00c78ef8) + 0x0)) = 0; g_beamRendererPointsEnd = g_beamRendererPoints; local_15c = local_15c / (float)local_154; local_158 = (EntityPtr)0x0; @@ -3817,11 +3817,11 @@ LAB_00607b21: scratchColor._offset[0] = beamColor._offset[0]; scratchColor._offset[1] = beamColor._offset[1]; auVar7 = ZEXT812(0x3f800000); - if ((float)local_158 / 40.0 <= auVar7._0_4_) { - auVar7._4_8_ = auVar7._4_8_; - auVar7._0_4_ = (float)local_158 / 40.0; + if ((float)local_158 / 40.0 <= (*(undefined4 *)((char *)&(auVar7) + 0x0))) { + (*(undefined8 *)((char *)&(auVar7) + 0x4)) = (*(undefined8 *)((char *)&(auVar7) + 0x4)); + (*(undefined4 *)((char *)&(auVar7) + 0x0)) = (float)local_158 / 40.0; } - scratchColor._tint[3] = auVar7._0_4_; + scratchColor._tint[3] = (*(undefined4 *)((char *)&(auVar7) + 0x0)); local_178.x = local_170 * (float)local_158 + local_1b4.y; local_178.y = local_15c * (float)local_158 + (float)local_1ac; BeamRenderer::Add(&local_178,(ColorMod *)&scratchColor,1.0,local_164.y); @@ -3841,11 +3841,11 @@ LAB_00607b21: ((Color *)((Color *)auStack_1f0))->Color::operator_assign((ColorMod *)&parentColor); FUN_004072e0(); auVar8 = ZEXT812(0x3f800000); - if ((float)local_154 / 40.0 <= auVar8._0_4_) { - auVar8._4_8_ = auVar8._4_8_; - auVar8._0_4_ = (float)local_154 / 40.0; + if ((float)local_154 / 40.0 <= (*(undefined4 *)((char *)&(auVar8) + 0x0))) { + (*(undefined8 *)((char *)&(auVar8) + 0x4)) = (*(undefined8 *)((char *)&(auVar8) + 0x4)); + (*(undefined4 *)((char *)&(auVar8) + 0x0)) = (float)local_154 / 40.0; } - scratchColor._tint[3] = auVar8._0_4_; + scratchColor._tint[3] = (*(undefined4 *)((char *)&(auVar8) + 0x0)); BeamRenderer::Add(&local_184,(ColorMod *)&scratchColor,1.0,0.0); BeamRenderer::End(); } @@ -3876,7 +3876,7 @@ LAB_00607b21: local_170 = -local_170; local_15c = -local_15c; do { - local_178.y = sqrtf((float)(int)uVar4); + local_178.y = sqrtf((float)GHIDRA_INT(uVar4)); local_178.y = local_178.y * 1.5; fVar12 = sin(local_178.y + local_164.y); fVar10 = local_1bc.y; @@ -3888,51 +3888,51 @@ LAB_00607b21: local_158 = (EntityPtr)0x0; do { pvVar6 = (void *)0x0; - if ((((ANM2 *)((int)fVar10 + 0x48))->_animState)._animData != (void *)0x0) { + if ((((ANM2 *)(GHIDRA_INT(fVar10) + 0x48))->_animState)._animData != (void *)0x0) { AnimationState::SetFrameFloat - (&((ANM2 *)((int)fVar10 + 0x48))->_animState,(float)(int)local_158); - pvVar6 = (((ANM2 *)((int)fVar10 + 0x48))->_animState)._animData; + (&((ANM2 *)(GHIDRA_INT(fVar10) + 0x48))->_animState,(float)GHIDRA_INT(local_158)); + pvVar6 = (((ANM2 *)(GHIDRA_INT(fVar10) + 0x48))->_animState)._animData; } - local_164.x = beamColor._tint[(int)local_158 * 2 + 1] + - ((Vector *)((int)fVar10 + 0x1a4))->x; - local_164.y = beamColor._tint[(int)local_158 * 2 + 2] + - ((Vector *)((int)fVar10 + 0x1a4))->y; + local_164.x = beamColor._tint[GHIDRA_INT(local_158) * 2 + 1] + + ((Vector *)(GHIDRA_INT(fVar10) + 0x1a4))->x; + local_164.y = beamColor._tint[GHIDRA_INT(local_158) * 2 + 2] + + ((Vector *)(GHIDRA_INT(fVar10) + 0x1a4))->y; if (((pvVar6 != (void *)0x0) && - (1 < *(int *)((int)(((ANM2 *)((int)fVar10 + 0x48))->_animState)._animation + 0x80))) + (1 < *(int *)(GHIDRA_INT((((ANM2 *)(GHIDRA_INT(fVar10) + 0x48))->_animState)._animation) + 0x80))) && (iVar1 = *(int *)((char *)pvVar6 + 0x3c), -1 < iVar1)) { fStack_1dc = 8.868798e-39; AnimationLayer::RenderFrame ((AnimationLayer *)(iVar1 * 0x10 + *(int *)((char *)pvVar6 + 0x18)),&local_164, - *(int *)((int)(((ANM2 *)((int)fVar10 + 0x48))->_animState)._layerFrames + + *(int *)(GHIDRA_INT((((ANM2 *)(GHIDRA_INT(fVar10) + 0x48))->_animState)._layerFrames) + iVar1 * 4),&g_vectorZero,&g_vectorZero, - (((ANM2 *)((int)fVar10 + 0x48))->_animState)._animation); + (((ANM2 *)(GHIDRA_INT(fVar10) + 0x48))->_animState)._animation); } - local_158 = (EntityPtr)((int)local_158 + 1); - } while ((int)local_158 < 5); + local_158 = (EntityPtr)(GHIDRA_INT(local_158) + 1); + } while (GHIDRA_INT(local_158) < 5); local_158 = (EntityPtr)0x0; do { pvVar6 = (void *)0x0; - if ((((ANM2 *)((int)fVar10 + 0x48))->_animState)._animData != (void *)0x0) { + if ((((ANM2 *)(GHIDRA_INT(fVar10) + 0x48))->_animState)._animData != (void *)0x0) { AnimationState::SetFrameFloat - (&((ANM2 *)((int)fVar10 + 0x48))->_animState,(float)(int)local_158); - pvVar6 = (((ANM2 *)((int)fVar10 + 0x48))->_animState)._animData; + (&((ANM2 *)(GHIDRA_INT(fVar10) + 0x48))->_animState,(float)GHIDRA_INT(local_158)); + pvVar6 = (((ANM2 *)(GHIDRA_INT(fVar10) + 0x48))->_animState)._animData; } - local_164.x = beamColor._tint[(int)local_158 * 2 + 1] + - ((Vector *)((int)fVar10 + 0x1a4))->x; - local_164.y = beamColor._tint[(int)local_158 * 2 + 2] + - ((Vector *)((int)fVar10 + 0x1a4))->y; + local_164.x = beamColor._tint[GHIDRA_INT(local_158) * 2 + 1] + + ((Vector *)(GHIDRA_INT(fVar10) + 0x1a4))->x; + local_164.y = beamColor._tint[GHIDRA_INT(local_158) * 2 + 2] + + ((Vector *)(GHIDRA_INT(fVar10) + 0x1a4))->y; if (((pvVar6 != (void *)0x0) && - (0 < *(int *)((int)(((ANM2 *)((int)fVar10 + 0x48))->_animState)._animation + 0x80))) + (0 < *(int *)(GHIDRA_INT((((ANM2 *)(GHIDRA_INT(fVar10) + 0x48))->_animState)._animation) + 0x80))) && (iVar1 = *(int *)((char *)pvVar6 + 0x38), -1 < iVar1)) { fStack_1dc = 8.869034e-39; AnimationLayer::RenderFrame ((AnimationLayer *)(iVar1 * 0x10 + *(int *)((char *)pvVar6 + 0x18)),&local_164, - *(int *)((int)(((ANM2 *)((int)fVar10 + 0x48))->_animState)._layerFrames + + *(int *)(GHIDRA_INT((((ANM2 *)(GHIDRA_INT(fVar10) + 0x48))->_animState)._layerFrames) + iVar1 * 4),&g_vectorZero,&g_vectorZero, - (((ANM2 *)((int)fVar10 + 0x48))->_animState)._animation); + (((ANM2 *)(GHIDRA_INT(fVar10) + 0x48))->_animState)._animation); } - local_158 = (EntityPtr)((int)local_158 + 1); - } while ((int)local_158 < 5); + local_158 = (EntityPtr)(GHIDRA_INT(local_158) + 1); + } while (GHIDRA_INT(local_158) < 5); } else { pfVar5 = parentColor._tint + 1; @@ -3960,52 +3960,52 @@ LAB_00607b21: iVar1 = 5; } else { - iVar1 = 4 - (int)local_158; + iVar1 = 4 - GHIDRA_INT(local_158); } pvVar6 = (void *)0x0; if ((this->_sprite)._animState._animData != (void *)0x0) { ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)iVar1); pvVar6 = (this->_sprite)._animState._animData; } - local_164.x = parentColor._tint[(int)local_158 * 2 + 1] + (this->_renderPosition).x; - local_164.y = parentColor._tint[(int)local_158 * 2 + 2] + (this->_renderPosition).y; + local_164.x = parentColor._tint[GHIDRA_INT(local_158) * 2 + 1] + (this->_renderPosition).x; + local_164.y = parentColor._tint[GHIDRA_INT(local_158) * 2 + 2] + (this->_renderPosition).y; if (((pvVar6 != (void *)0x0) && - (1 < *(int *)((int)(this->_sprite)._animState._animation + 0x80))) && + (1 < *(int *)(GHIDRA_INT((this->_sprite)._animState._animation) + 0x80))) && (iVar1 = *(int *)((char *)pvVar6 + 0x3c), -1 < iVar1)) { fStack_1dc = 8.867977e-39; AnimationLayer::RenderFrame ((AnimationLayer *)(iVar1 * 0x10 + *(int *)((char *)pvVar6 + 0x18)),&local_164, - *(int *)((int)(this->_sprite)._animState._layerFrames + iVar1 * 4), + *(int *)(GHIDRA_INT((this->_sprite)._animState._layerFrames) + iVar1 * 4), &g_vectorZero,&g_vectorZero,(this->_sprite)._animState._animation); } - local_158 = (EntityPtr)((int)local_158 + 1); - } while ((int)local_158 < 5); + local_158 = (EntityPtr)(GHIDRA_INT(local_158) + 1); + } while (GHIDRA_INT(local_158) < 5); local_158 = (EntityPtr)0x0; do { if (local_158 == (EntityPtr)0x0) { iVar1 = 5; } else { - iVar1 = 4 - (int)local_158; + iVar1 = 4 - GHIDRA_INT(local_158); } pvVar6 = (void *)0x0; if ((this->_sprite)._animState._animData != (void *)0x0) { ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)iVar1); pvVar6 = (this->_sprite)._animState._animData; } - local_164.x = (this->_renderPosition).x + parentColor._tint[(int)local_158 * 2 + 1]; - local_164.y = parentColor._tint[(int)local_158 * 2 + 2] + (this->_renderPosition).y; + local_164.x = (this->_renderPosition).x + parentColor._tint[GHIDRA_INT(local_158) * 2 + 1]; + local_164.y = parentColor._tint[GHIDRA_INT(local_158) * 2 + 2] + (this->_renderPosition).y; if (((pvVar6 != (void *)0x0) && - (0 < *(int *)((int)(this->_sprite)._animState._animation + 0x80))) && + (0 < *(int *)(GHIDRA_INT((this->_sprite)._animState._animation) + 0x80))) && (iVar1 = *(int *)((char *)pvVar6 + 0x38), -1 < iVar1)) { fStack_1dc = 8.868238e-39; AnimationLayer::RenderFrame ((AnimationLayer *)(iVar1 * 0x10 + *(int *)((char *)pvVar6 + 0x18)),&local_164, - *(int *)((int)(this->_sprite)._animState._layerFrames + iVar1 * 4), + *(int *)(GHIDRA_INT((this->_sprite)._animState._layerFrames) + iVar1 * 4), &g_vectorZero,&g_vectorZero,(this->_sprite)._animState._animation); } - local_158 = (EntityPtr)((int)local_158 + 1); - } while ((int)local_158 < 5); + local_158 = (EntityPtr)(GHIDRA_INT(local_158) + 1); + } while (GHIDRA_INT(local_158) < 5); } goto LAB_0060ab8d; } @@ -4032,7 +4032,7 @@ LAB_00607b21: } else { local_154 = (EntityPtr) - ((AnimationState *)((AnimationState *)((int)EVar13 + 0x78)))->AnimationState::GetLayerFrame(0); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(EVar13) + 0x78)))->AnimationState::GetLayerFrame(0); if ((local_154 == (EntityPtr)0x0) || (*(char *)((char *)local_154 + 0x2c) == '\0')) { EVar13 = this->_parent; isParentFrameVisible = '\0'; @@ -4047,14 +4047,14 @@ LAB_00607b21: local_15c = *(float *)((char *)EVar13 + 0xe8); LAB_00609482: if ((*(int *)((char *)EVar13 + 0x28) == 5) && (*(int *)((char *)EVar13 + 0x2c) == 0x45)) { - layer = ((ANM2 *)((ANM2 *)((int)EVar13 + 0x48)))->ANM2::GetLayer((byte *)0x0); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(EVar13) + 0x48)))->ANM2::GetLayer((byte *)0x0); EVar13 = this->_parent; local_158 = (EntityPtr) ((float)local_158 + (layer->_pos).x + *(float *)((char *)local_154 + 0x10)); local_18c = (EntityPtr) ((float)local_18c + (layer->_pos).y + *(float *)((char *)local_154 + 0x14)); } - layer = ((ANM2 *)((ANM2 *)((int)EVar13 + 0x48)))->ANM2::GetLayer((byte *)0x0); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(EVar13) + 0x48)))->ANM2::GetLayer((byte *)0x0); EVar13 = this->_parent; local_170 = local_170 * (layer->_size).x * *(float *)((char *)local_154 + 0x18); local_15c = local_15c * (layer->_size).y * *(float *)((char *)local_154 + 0x1c); @@ -4071,10 +4071,10 @@ LAB_00609482: local_154 = (EntityPtr)0x0; iVar1 = *(int *)((char *)local_190 + 0x454); if (0 < iVar1) { - local_17c = (EntityPtr)((int)&DAT_00c5c928 + (((iVar1 + -1) * iVar1) / 2) * 8); + local_17c = (EntityPtr)(GHIDRA_INT(&DAT_00c5c928) + (((iVar1 + -1) * iVar1) / 2) * 8); local_164.y = local_170 * 0.5; local_178.y = local_15c * 0.5; - pfVar5 = (float *)((int)local_190 + 0xa4); + pfVar5 = (float *)(GHIDRA_INT(local_190) + 0xa4); do { *(EntityPtr *)(pfVar5 + -3) = local_158; *(EntityPtr *)(pfVar5 + -2) = local_18c; @@ -4085,9 +4085,9 @@ LAB_00609482: (this->_renderPosition).y; ((ANM2 *)((ANM2 *)(pfVar5 + -0x28)))->ANM2::Render(&local_184,&g_vectorZero,&g_vectorZero); pfVar5 = pfVar5 + 0x45; - local_154 = (EntityPtr)((int)local_154 + 1); - local_17c = (EntityPtr)((int)local_17c + 8); - } while ((int)local_154 < *(int *)((char *)local_190 + 0x454)); + local_154 = (EntityPtr)(GHIDRA_INT(local_154) + 1); + local_17c = (EntityPtr)(GHIDRA_INT(local_17c) + 8); + } while (GHIDRA_INT(local_154) < *(int *)((char *)local_190 + 0x454)); } goto LAB_0060ab8d; } @@ -4135,7 +4135,7 @@ LAB_00609482: local_168 = &overlayFrameCopy; local_164.x = 1.4013e-45; overlayLayer = (AnimationLayer)0x1; - local_164.y = (float)CONCAT31(local_164.y._1_3_,1); + local_164.y = (float)CONCAT31((*(undefined1 *)((char *)&(local_164.y) + 0x1)),1); local_124 = 1; fStack_1dc = 8.871164e-39; ((AnimationLayer *)(&overlayLayer))->AnimationLayer::RenderFrame(pVVar3,0,&g_vectorZero,&g_vectorZero,&this->_sprite) @@ -4194,8 +4194,8 @@ LAB_00609482: local_17c = (EntityPtr)0x0; local_158 = (EntityPtr)((float)local_158 - local_15c); do { - fVar11 = (float)((double)(int)local_17c + - __uint_to_double_fixup[-((int)local_17c >> 0x1f)]) / 10.0; + fVar11 = (float)((double)GHIDRA_INT(local_17c) + + __uint_to_double_fixup[-(GHIDRA_INT(local_17c) >> 0x1f)]) / 10.0; fVar10 = local_194 * fVar11 + local_170; fVar12 = (float)local_158 * fVar11 + local_15c; EVar13 = (EntityPtr)(((local_1bc.y * fVar11 + local_170) - fVar10) * fVar11 + fVar10); @@ -4218,8 +4218,8 @@ LAB_00609482: scratchColor._tint[2] = 1.0; scratchColor._tint[3] = (float)local_154; BeamRenderer::Add(&local_164,(ColorMod *)&scratchColor,0.9,local_190); - local_17c = (EntityPtr)((int)local_17c + 1); - } while ((uint)local_17c < 0xb); + local_17c = (EntityPtr)(GHIDRA_INT(local_17c) + 1); + } while (GHIDRA_UINT(local_17c) < 0xb); BeamRenderer::End(); } } @@ -4380,11 +4380,11 @@ LAB_0060a8e9: local_164.y = pVVar3->y + renderOffset->y; BeamRenderer::Add(&local_164,(ColorMod *)&scratchColor,(float)local_158,1.0); auVar9 = ZEXT812(0x42700000); - if ((float)local_154 * 0.5 <= auVar9._0_4_) { - auVar9._4_8_ = auVar9._4_8_; - auVar9._0_4_ = (float)local_154 * 0.5; + if ((float)local_154 * 0.5 <= (*(undefined4 *)((char *)&(auVar9) + 0x0))) { + (*(undefined8 *)((char *)&(auVar9) + 0x4)) = (*(undefined8 *)((char *)&(auVar9) + 0x4)); + (*(undefined4 *)((char *)&(auVar9) + 0x0)) = (float)local_154 * 0.5; } - pVVar3 = ((Vector *)(&local_178))->Vector::Resized(&local_184,auVar9._0_4_); + pVVar3 = ((Vector *)(&local_178))->Vector::Resized(&local_184,(*(undefined4 *)((char *)&(auVar9) + 0x0))); local_164.x = (this->_posOffset).x + (this->_pos).x + pVVar3->x; local_164.y = (this->_posOffset).y + (this->_pos).y + pVVar3->y; pVVar3 = Isaac::GetRenderPosition(&local_19c,&local_164,1); @@ -4440,7 +4440,7 @@ LAB_0060a8e9: pfVar5 != (float *)0x0)))) { local_178.x = *pfVar5 + (this->_renderPosition).x; local_178.y = (this->_renderPosition).y + pfVar5[1]; - ((ANM2 *)((ANM2 *)((int)local_164.y + 8)))->ANM2::Render(&local_178,&g_vectorZero,&g_vectorZero); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(local_164.y) + 8)))->ANM2::Render(&local_178,&g_vectorZero,&g_vectorZero); } } LAB_0060ab8d: @@ -4497,13 +4497,13 @@ Entity_Effect * Entity_Effect::CreateTimer(void *fn, uint delay, uint times, byt timer = (Entity_Effect *) ((Game *)(g_game))->Game::SpawnEx(1000,0x77,&g_vectorZero,&g_vectorZero,(Entity *)0x0,0,seed,0); *(void **)&(timer->_varData)._l = fn; - *(uint *)((int)&(timer->_varData)._l + 4) = delay; + *(uint *)(GHIDRA_INT(&(timer->_varData)._l) + 4) = delay; *(uint *)&(timer->_varData)._h = times; if (isPersistent != 0) { flags = timer->_flags; - flagsHigh = (uint *)((int)&timer->_flags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&timer->_flags) + 4); *flagsHigh = *flagsHigh | 0x20; - *(int *)&timer->_flags = (int)flags; + *(int *)&timer->_flags = GHIDRA_INT(flags); } return timer; } @@ -4552,7 +4552,7 @@ void Entity_Effect::update_variant178_shooter(byte isPositionOnly) local_14 = (byte ******)0xffffffff; puStack_18 = &DAT_00af6605; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(joinedAnimName + 0xb); + local_24 = __security_cookie ^ GHIDRA_UINT((joinedAnimName + 0xb)); EVar2 = this->_parent; if (EVar2 == (EntityPtr)0x0) { if (isPositionOnly == 0) { @@ -4687,19 +4687,19 @@ switchD_0060b3c2_caseD_0: if (0xf < *(uint *)(currentAnimName + 0x14)) { currentAnimName = *(char **)currentAnimName; } - iVar4 = strncmp((char *)pbVar9,currentAnimName,(int)pbVar6 - (int)(pbVar9 + 1)); + iVar4 = strncmp((char *)pbVar9,currentAnimName,GHIDRA_INT(pbVar6) - GHIDRA_INT((pbVar9 + 1))); if (iVar4 == 0) { ((std::string *)((char *)local_54))->std::string::string_from_cstr(pbVar9); local_14 = (byte ******)0x0; FUN_0060c790(directionName); - local_14 = (byte ******)CONCAT31(local_14._1_3_,2); + local_14 = (byte ******)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); if (0xf < local_40) { uVar8 = local_40 + 1; freeBlock = local_54[0]; if (0xfff < uVar8) { - freeBlock = *(void **)((int)local_54[0] + -4); + freeBlock = *(void **)(GHIDRA_INT(local_54[0]) + -4); uVar8 = local_40 + 0x24; - if (0x1f < (uint)((int)local_54[0] + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_54[0]) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -4709,7 +4709,7 @@ switchD_0060b3c2_caseD_0: pppppppbVar10 = joinedAnimName[0]; local_44 = 0; local_40 = 0xf; - local_54[0] = (void *)((uint)local_54[0] & 0xffffff00); + local_54[0] = (void *)(GHIDRA_UINT(local_54[0]) & 0xffffff00); uVar15 = _string_holder_c_str(); do { pbVar6 = (byte *)((ulonglong)uVar15 >> 0x20); @@ -4718,7 +4718,7 @@ switchD_0060b3c2_caseD_0: bVar11 = bVar3 < *pbVar9; if (bVar3 != *pbVar9) { LAB_0060b567: - uVar8 = -(uint)bVar11 | 1; + uVar8 = -GHIDRA_UINT(bVar11) | 1; goto LAB_0060b56c; } if (bVar3 == 0) break; @@ -4744,7 +4744,7 @@ LAB_0060b56c: if (0xfff < uVar8) { pppppppbVar5 = (byte *******)pppppppbVar10[-1]; uVar8 = local_28 + 0x24; - if ((byte *)0x1f < (byte *)((int)pppppppbVar10 + (-4 - (int)pppppppbVar5))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(pppppppbVar10) + (-4 - GHIDRA_INT(pppppppbVar5)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -4757,7 +4757,7 @@ LAB_0060b56c: ((std::string *)((char *)local_84))->std::string::string_from_cstr(pbVar9); local_14 = (byte ******)0x3; fullAnimName = (byte *)FUN_0060c790(directionName); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; if (0xf < *(uint *)(fullAnimName + 0x14)) { fullAnimName = *(byte **)fullAnimName; } @@ -4781,7 +4781,7 @@ LAB_0060b64b: bVar11 = bVar3 < *pbVar7; if (bVar3 != *pbVar7) { LAB_0060b632: - uVar8 = -(uint)bVar11 | 1; + uVar8 = -GHIDRA_UINT(bVar11) | 1; goto LAB_0060b637; } if (bVar3 == 0) break; @@ -4796,28 +4796,28 @@ LAB_0060b637: if ((uVar8 != 0) || ((pbVar9[0x34] != 0 && ((this->_sprite)._animState._isPlaying == 0)))) goto LAB_0060b64b; } - local_14 = (byte ******)CONCAT31(local_14._1_3_,3); + local_14 = (byte ******)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),3); if (0xf < local_58) { uVar8 = local_58 + 1; freeBlock = local_6c; if (0xfff < uVar8) { freeBlock = *(void **)((char *)local_6c + -4); uVar8 = local_58 + 0x24; - if (0x1f < (uint)((int)local_6c + (-4 - (int)freeBlock))) goto LAB_0060b6dc; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_6c) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_0060b6dc; } operator_delete(freeBlock,uVar8); } local_14 = (byte ******)0xffffffff; local_5c = 0; local_58 = 0xf; - local_6c = (void *)((uint)local_6c & 0xffffff00); + local_6c = (void *)(GHIDRA_UINT(local_6c) & 0xffffff00); if (0xf < local_70) { uVar8 = local_70 + 1; freeBlock = local_84[0]; if (0xfff < uVar8) { - freeBlock = *(void **)((int)local_84[0] + -4); + freeBlock = *(void **)(GHIDRA_INT(local_84[0]) + -4); uVar8 = local_70 + 0x24; - if (0x1f < (uint)((int)local_84[0] + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_84[0]) + (-4 - GHIDRA_INT(freeBlock))))) { LAB_0060b6dc: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -4827,7 +4827,7 @@ LAB_0060b6dc: } local_74 = 0; local_70 = 0xf; - local_84[0] = (void *)((uint)local_84[0] & 0xffffff00); + local_84[0] = (void *)(GHIDRA_UINT(local_84[0]) & 0xffffff00); switchD_0060b3c2_default: iVar4 = this->_state; if (iVar4 == 1) { @@ -4954,7 +4954,7 @@ void Entity_Effect::setup_loot_preview(void *lootQueue) local_14 = 0xffffffff; puStack_18 = &LAB_00af6655; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(local_3c + 0x2c); + local_24 = __security_cookie ^ GHIDRA_UINT((local_3c + 0x2c)); ExceptionList = &local_1c; ghostData = __RTDynamicCast(*(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x4b4)),0, &IsaacRepentancePlus::Entity_Effect::ExtraData::RTTI_Type_Descriptor, @@ -5004,8 +5004,8 @@ void Entity_Effect::setup_loot_preview(void *lootQueue) if (isPicked != 0) { local_58 = local_78; local_60 = lootType; - uVar5 = (uint)uStack_80; - uVar12 = uStack_80._4_4_; + uVar5 = GHIDRA_UINT(uStack_80); + uVar12 = (*(undefined4 *)((char *)&(uStack_80) + 0x4)); goto LAB_0060bc31; } } @@ -5014,45 +5014,45 @@ LAB_0060bc31: uVar4 = lootVariant; if (g_game->_challenge == 0x2b) { if (lootVariant != 300) goto LAB_0060bcab; - uStack_80 = CONCAT44(uStack_80._4_4_,0x10); + uStack_80 = CONCAT44((*(undefined4 *)((char *)&(uStack_80) + 0x4)),0x10); uVar2 = uStack_80; - uStack_80._0_4_ = 0x10; + (*(undefined4 *)((char *)&(uStack_80) + 0x0)) = 0x10; preventedCurses = 0x10; - uVar5 = (uint)uStack_80; - uVar12 = uStack_80._4_4_; + uVar5 = GHIDRA_UINT(uStack_80); + uVar12 = (*(undefined4 *)((char *)&(uStack_80) + 0x4)); uStack_80 = uVar2; } else if (lootVariant == 300) { - if ((((int)(uint)uStack_80 < 0) || + if (((GHIDRA_INT(GHIDRA_UINT(uStack_80)) < 0) || (configTable = (g_manager->_itemConfig)._cards._begin, - (int)(g_manager->_itemConfig)._cards._end - (int)configTable >> 2 <= - (int)(uint)uStack_80)) || - (iVar8 = *(int *)((char *)configTable + (uint)uStack_80 * 4), iVar8 == 0)) { + GHIDRA_INT((g_manager->_itemConfig)._cards._end) - GHIDRA_INT(configTable) >> 2 <= + GHIDRA_INT(GHIDRA_UINT(uStack_80)))) || + (iVar8 = *(int *)((char *)configTable + GHIDRA_UINT(uStack_80) * 4), iVar8 == 0)) { preventedCurses = 2; - uStack_80 = CONCAT44(uStack_80._4_4_,2); + uStack_80 = CONCAT44((*(undefined4 *)((char *)&(uStack_80) + 0x4)),2); uVar2 = uStack_80; - uStack_80._0_4_ = 2; - uVar5 = (uint)uStack_80; - uVar12 = uStack_80._4_4_; + (*(undefined4 *)((char *)&(uStack_80) + 0x0)) = 2; + uVar5 = GHIDRA_UINT(uStack_80); + uVar12 = (*(undefined4 *)((char *)&(uStack_80) + 0x4)); uStack_80 = uVar2; } else { preventedCurses = *(uint *)(iVar8 + 0x54); - uStack_80 = CONCAT44(uStack_80._4_4_,preventedCurses); + uStack_80 = CONCAT44((*(undefined4 *)((char *)&(uStack_80) + 0x4)),preventedCurses); uVar5 = preventedCurses; - uVar12 = uStack_80._4_4_; + uVar12 = (*(undefined4 *)((char *)&(uStack_80) + 0x4)); } } else { LAB_0060bcab: - preventedCurses = (uint)uStack_80; + preventedCurses = GHIDRA_UINT(uStack_80); } pAVar10 = local_60; uVar11 = lootVariant; lootType = local_60; local_78 = local_58; entityConfig = EntityConfig::GetEntity - (&g_manager->_entityConfig,(int)local_60,lootVariant, + (&g_manager->_entityConfig,GHIDRA_INT(local_60),lootVariant, preventedCurses); if (entityConfig != (EntityConfig_Entity *)0x0) { if (local_60 == (ANM2 *)&DAT_00000005) { @@ -5061,10 +5061,10 @@ LAB_0060bcab: if (((preventedCurses == 4) || (preventedCurses == 6)) || (preventedCurses == 7)) { LAB_0060bd04: - local_3c._0_4_ = (byte *)0x1f4; + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = (byte *)0x1f4; } else { - local_3c._0_4_ = (byte *)0xa; + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = (byte *)0xa; } } else if (uVar4 == 10) { @@ -5072,41 +5072,41 @@ LAB_0060bd04: ) goto LAB_0060bd04; if ((((preventedCurses == 6) || (preventedCurses == 10)) || (preventedCurses == 3) ) || (preventedCurses == 8)) { - local_3c._0_4_ = (byte *)0xc8; + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = (byte *)0xc8; } else { - local_3c._0_4_ = (byte *)0xa; + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = (byte *)0xa; } } else if (uVar4 == 0x14) { if ((preventedCurses == 3) || (preventedCurses == 5)) goto LAB_0060bd04; - local_3c._0_4_ = (byte *)0xa; + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = (byte *)0xa; if (preventedCurses == 2) { - local_3c._0_4_ = (byte *)0xc8; + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = (byte *)0xc8; } } else { if (uVar4 != 0x1e) goto LAB_0060bd7e; if ((preventedCurses == 2) || (preventedCurses == 4)) goto LAB_0060bd04; - local_3c._0_4_ = (byte *)0xa; + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = (byte *)0xa; } } else if (uVar4 == 100) { - local_3c._0_4_ = (byte *)0x2710; + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = (byte *)0x2710; } else if (uVar4 == 0x15e) { - local_3c._0_4_ = (byte *)0x3e8; + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = (byte *)0x3e8; } else { LAB_0060bd7e: - local_3c._0_4_ = (byte *)0x32; + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = (byte *)0x32; } } else { - local_3c._0_4_ = (byte *)0x0; + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = (byte *)0x0; } local_28 = local_58; - local_3c._4_4_ = pAVar10; + (*(undefined4 *)((char *)&(local_3c) + 0x4)) = pAVar10; uStack_34 = uVar11; uStack_30 = uVar5; uStack_2c = uVar12; @@ -5128,7 +5128,7 @@ LAB_0060bd7e: local_58 = *(undefined4 **)((local_60->_animDefaultName)._buf + 4); pbVar3 = *(byte **)((local_60->_animDefaultName)._buf + 8); entityConfig = EntityConfig::GetEntity - (&g_manager->_entityConfig,(int)local_68,local_64,(int)local_58); + (&g_manager->_entityConfig,GHIDRA_INT(local_68),local_64,GHIDRA_INT(local_58)); if (entityConfig != (EntityConfig_Entity *)0x0) { *(int *)(ghostData + 0x454) = *(int *)(ghostData + 0x454) + 1; pAVar10 = (ANM2 *)(ghostData + 4 + iVar8 * 0x114); @@ -5140,9 +5140,9 @@ LAB_0060bd7e: if (local_68 == &DAT_00000005) { if (local_64 == 0x15e) { configTable = (g_manager->_itemConfig)._trinkets._begin; - if ((int)((uint)local_58 & 0x7fff) < - (int)(g_manager->_itemConfig)._trinkets._end - (int)configTable >> 2) { - iVar8 = *(int *)((char *)configTable + ((uint)local_58 & 0x7fff) * 4); + if (GHIDRA_INT((GHIDRA_UINT(local_58) & 0x7fff)) < + GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(configTable) >> 2) { + iVar8 = *(int *)((char *)configTable + (GHIDRA_UINT(local_58) & 0x7fff) * 4); } else { iVar8 = 0; @@ -5154,30 +5154,30 @@ LAB_0060bd7e: } if (local_64 < 0x10) { local_5c = (byte *)*local_58; - local_3c._4_4_ = local_58[1]; + (*(undefined4 *)((char *)&(local_3c) + 0x4)) = local_58[1]; uStack_34 = local_58[2]; uStack_30 = local_58[3]; puVar6 = (undefined4 *)&DAT_0000000f; - local_3c._0_4_ = local_5c; + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = local_5c; } else { puVar6 = (undefined4 *)(local_64 | 0xf); if ((undefined4 *)0x7fffffff < puVar6) { puVar6 = (undefined4 *)0x7fffffff; } - local_5c = std::_Allocate((uint)((int)puVar6 + 1)); - local_3c._0_4_ = local_5c; + local_5c = std::_Allocate(GHIDRA_UINT((GHIDRA_INT(puVar6) + 1))); + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = local_5c; memcpy(local_5c,local_58,local_64 + 1); } sprite = local_60; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; uStack_2c = local_64; local_28 = puVar6; if (0 < pAVar10->_layerCount) { local_58 = pAVar10->_layerState; local_8c = local_58[6]; local_68 = (byte *)(local_58 + 2); - if (0xf < (uint)local_58[7]) { + if (0xf < GHIDRA_UINT(local_58[7])) { local_68 = *(byte **)local_68; } pbVar3 = local_3c; @@ -5196,24 +5196,24 @@ LAB_0060bd7e: pbVar3 = local_5c; } ((std::string *)((char *)(local_58 + 2)))->std::string::assign(pbVar3,local_64); - local_5c = (byte *)local_3c._0_4_; + local_5c = (*(undefined4 *)((char *)&((byte *)local_3c) + 0x0)); puVar7 = sprite->_layerState; puVar6 = local_28; } *(undefined1 *)(puVar7 + 0xc) = 0; } } - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (&DAT_0000000f < puVar6) { - puVar7 = (undefined4 *)((int)puVar6 + 1); + puVar7 = (undefined4 *)(GHIDRA_INT(puVar6) + 1); ptr = local_5c; if ((undefined4 *)0xfff < puVar7) { ptr = *(byte **)(local_5c + -4); puVar7 = puVar6 + 9; - if ((byte *)0x1f < local_5c + (-4 - (int)ptr)) goto LAB_0060c2e6; + if ((byte *)0x1f < local_5c + (-4 - GHIDRA_INT(ptr))) goto LAB_0060c2e6; } LAB_0060c216: - operator_delete(ptr,(uint)puVar7); + operator_delete(ptr,GHIDRA_UINT(puVar7)); } } else if (local_64 == 100) { @@ -5226,9 +5226,9 @@ LAB_0060c216: uVar4 = Seeds::GetForcedCurses(); preventedCurses = Seeds::GetPreventedCurses(); if ((~preventedCurses & (uVar4 | uVar5 | uVar12) & 0x40) == 0) { - item = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible((int)local_58); + item = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(GHIDRA_INT(local_58)); ((std::string *)(itemGfxPath._buf))->std::string::string(&item->gfxFilename); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; if (g_game->_challenge == 0x20) { uStack_80 = 0x150000000b; local_8c = 0xd; @@ -5241,19 +5241,19 @@ LAB_0060c216: (*pcVar1)(); return; } - uVar5 = (uint)pbVar3 >> ((byte)uStack_80 & 0x1f) ^ (uint)pbVar3; + uVar5 = GHIDRA_UINT(pbVar3) >> ((byte)uStack_80 & 0x1f) ^ GHIDRA_UINT(pbVar3); uVar5 = uVar5 << ((byte)((ulonglong)uStack_80 >> 0x20) & 0x1f) ^ uVar5; local_5c = (byte *)(uVar5 >> ((byte)local_8c & 0x1f) ^ uVar5); - iVar8 = (uint)local_5c % 0x2dc + 1; + iVar8 = GHIDRA_UINT(local_5c) % 0x2dc + 1; if ((((iVar8 != 0) && - (iVar8 < (int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2)) && + (iVar8 < GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2)) && (iVar8 != 0xeb)) && (((iVar8 != 0x2b && (iVar8 != 0x3d)) && (item = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(iVar8), item != (ItemConfig_Item *)0x0)))) break; local_68 = local_68 + 1; - if (0xe < (int)local_68) goto LAB_0060c1d7; + if (0xe < GHIDRA_INT(local_68)) goto LAB_0060c1d7; pbVar3 = local_5c; } item = ((ItemConfig *)(&manager->_itemConfig))->ItemConfig::GetCollectible(iVar8); @@ -5269,71 +5269,71 @@ LAB_0060c216: LAB_0060c1d7: pAVar10 = local_60; ((Sprite *)((Sprite *)local_60))->Sprite::ReplaceSpritesheet(1,&itemGfxPath); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (&DAT_0000000f < itemGfxPath._capacity) { - pbVar3 = (byte *)itemGfxPath._buf._0_4_; + pbVar3 = (*(undefined4 *)((char *)&((byte *)itemGfxPath._buf) + 0x0)); puVar6 = (undefined4 *)itemGfxPath._capacity; goto LAB_0060c1f6; } } else { - local_3c._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = std::_Allocate(0x30); pAVar10 = local_60; uStack_2c = 0x27; local_28 = (undefined4 *)&DAT_0000002f; - *(char *)(local_3c._0_4_ + 0) = 'g'; - *(char *)(local_3c._0_4_ + 1) = 'f'; - *(char *)(local_3c._0_4_ + 2) = 'x'; - *(char *)(local_3c._0_4_ + 3) = '/'; - *(char *)(local_3c._0_4_ + 4) = 'I'; - *(char *)(local_3c._0_4_ + 5) = 't'; - *(char *)(local_3c._0_4_ + 6) = 'e'; - *(char *)(local_3c._0_4_ + 7) = 'm'; - *(char *)(local_3c._0_4_ + 8) = 's'; - *(char *)(local_3c._0_4_ + 9) = '/'; - *(char *)(local_3c._0_4_ + 10) = 'C'; - *(char *)(local_3c._0_4_ + 0xb) = 'o'; - *(char *)(local_3c._0_4_ + 0xc) = 'l'; - *(char *)(local_3c._0_4_ + 0xd) = 'l'; - *(char *)(local_3c._0_4_ + 0xe) = 'e'; - *(char *)(local_3c._0_4_ + 0xf) = 'c'; - *(char *)(local_3c._0_4_ + 0x10) = 't'; - *(char *)(local_3c._0_4_ + 0x11) = 'i'; - *(char *)(local_3c._0_4_ + 0x12) = 'b'; - *(char *)(local_3c._0_4_ + 0x13) = 'l'; - *(char *)(local_3c._0_4_ + 0x14) = 'e'; - *(char *)(local_3c._0_4_ + 0x15) = 's'; - *(char *)(local_3c._0_4_ + 0x16) = '/'; - *(char *)(local_3c._0_4_ + 0x17) = 'q'; - *(char *)(local_3c._0_4_ + 0x18) = 'u'; - *(char *)(local_3c._0_4_ + 0x19) = 'e'; - *(char *)(local_3c._0_4_ + 0x1a) = 's'; - *(char *)(local_3c._0_4_ + 0x1b) = 't'; - *(char *)(local_3c._0_4_ + 0x1c) = 'i'; - *(char *)(local_3c._0_4_ + 0x1d) = 'o'; - *(char *)(local_3c._0_4_ + 0x1e) = 'n'; - *(char *)(local_3c._0_4_ + 0x1f) = 'm'; - *(char *)(local_3c._0_4_ + 0x20) = 'a'; - *(char *)(local_3c._0_4_ + 0x21) = 'r'; - *(char *)(local_3c._0_4_ + 0x22) = 'k'; - *(char *)(local_3c._0_4_ + 0x23) = '.'; - *(byte *)(local_3c._0_4_ + 0x24) = 0x70; - *(byte *)(local_3c._0_4_ + 0x25) = 0x6e; - *(byte *)(local_3c._0_4_ + 0x26) = 0x67; - *(byte *)(local_3c._0_4_ + 0x27) = 0; - local_14._0_1_ = 2; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0) = 'g'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 1) = 'f'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 2) = 'x'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 3) = '/'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 4) = 'I'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 5) = 't'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 6) = 'e'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 7) = 'm'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 8) = 's'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 9) = '/'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 10) = 'C'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0xb) = 'o'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0xc) = 'l'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0xd) = 'l'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0xe) = 'e'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0xf) = 'c'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x10) = 't'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x11) = 'i'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x12) = 'b'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x13) = 'l'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x14) = 'e'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x15) = 's'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x16) = '/'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x17) = 'q'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x18) = 'u'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x19) = 'e'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x1a) = 's'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x1b) = 't'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x1c) = 'i'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x1d) = 'o'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x1e) = 'n'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x1f) = 'm'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x20) = 'a'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x21) = 'r'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x22) = 'k'; + *(char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x23) = '.'; + *(byte *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x24) = 0x70; + *(byte *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x25) = 0x6e; + *(byte *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x26) = 0x67; + *(byte *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x27) = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; ((Sprite *)((Sprite *)local_60))->Sprite::ReplaceSpritesheet(1,(std_string *)local_3c); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (&DAT_0000000f < local_28) { - pbVar3 = (byte *)local_3c._0_4_; + pbVar3 = (*(undefined4 *)((char *)&((byte *)local_3c) + 0x0)); puVar6 = local_28; LAB_0060c1f6: - puVar7 = (undefined4 *)((int)puVar6 + 1); + puVar7 = (undefined4 *)(GHIDRA_INT(puVar6) + 1); ptr = pbVar3; if ((undefined4 *)0xfff < puVar7) { ptr = *(byte **)(pbVar3 + -4); puVar7 = puVar6 + 9; - if ((byte *)0x1f < pbVar3 + (-4 - (int)ptr)) { + if ((byte *)0x1f < pbVar3 + (-4 - GHIDRA_INT(ptr))) { LAB_0060c2e6: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -5420,7 +5420,7 @@ void Entity_Effect::guard_check_icall() isLess = bVar1 < *idleCursor; if (bVar1 != *idleCursor) { LAB_0060c3c0: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0060c3c5; } if (bVar1 == 0) break; diff --git a/src/game/entity_effect/extra_data_ref.cpp b/src/game/entity_effect/extra_data_ref.cpp index 4a83d67..18a6274 100644 --- a/src/game/entity_effect/extra_data_ref.cpp +++ b/src/game/entity_effect/extra_data_ref.cpp @@ -14,7 +14,7 @@ void Entity_Effect::ExtraDataRef::Set(void *extraData) local_8 = 0xffffffff; puStack_c = &LAB_00af6694; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; refCount = operator_new(0x18); local_8 = 0; diff --git a/src/game/entity_factory.cpp b/src/game/entity_factory.cpp index 70d9773..e9e8710 100644 --- a/src/game/entity_factory.cpp +++ b/src/game/entity_factory.cpp @@ -9,13 +9,13 @@ Entity * EntityFactory::Create(uint type, byte force) undefined *npcPool; bool isRetrying; - if ((int)type < 0x3e9) { + if (GHIDRA_INT(type) < 0x3e9) { if (type == 1000) { tries = 0; do { slot = *(int *)((char *)this + 0x130000) + 1U & 0x3ff; *(uint *)((char *)this + 0x130000) = slot; - cVar1 = *(char *)(slot * 0x4c0 + 0x170 + (int)this); + cVar1 = *(char *)(slot * 0x4c0 + 0x170 + GHIDRA_INT(this)); if (cVar1 == '\0') goto LAB_006f0d18; isRetrying = tries < 0x401; tries = tries + 1; @@ -24,18 +24,18 @@ Entity * EntityFactory::Create(uint type, byte force) if (force != 0) { return (Entity *)0x0; } - cVar1 = (**(code **)(*(int *)(slot * 0x4c0 + (int)this) + 0x38))(); + cVar1 = (**(code **)(*(int *)(slot * 0x4c0 + GHIDRA_INT(this)) + 0x38))(); if (cVar1 == '\0') { tries = 0; do { slot = *(int *)((char *)this + 0x130000) + 1U & 0x3ff; *(uint *)((char *)this + 0x130000) = slot; - cVar1 = (**(code **)(*(int *)(slot * 0x4c0 + (int)this) + 0x38))(); + cVar1 = (**(code **)(*(int *)(slot * 0x4c0 + GHIDRA_INT(this)) + 0x38))(); if (cVar1 != '\0') break; isRetrying = tries < 0x400; tries = tries + 1; } while (isRetrying); - cVar1 = (**(code **)(*(int *)(*(int *)((char *)this + 0x130000) * 0x4c0 + (int)this) + 0x38)) + cVar1 = (**(code **)(*(int *)(*(int *)((char *)this + 0x130000) * 0x4c0 + GHIDRA_INT(this)) + 0x38)) (); if (cVar1 == '\0') { KAGE_LogMessage(4,(byte *) @@ -46,14 +46,14 @@ Entity * EntityFactory::Create(uint type, byte force) KAGE_LogMessage(4,(byte *) "Entity pool array %s is full, overwriting at index %d! (frame count: %d)\n" ); - *(undefined1 *)(*(int *)((char *)this + 0x130000) * 0x4c0 + 0x177 + (int)this) = 1; - (**(code **)(*(int *)(*(int *)((char *)this + 0x130000) * 0x4c0 + (int)this) + 0x28))(); - (**(code **)(*(int *)(*(int *)((char *)this + 0x130000) * 0x4c0 + (int)this) + 0x44))(); - *(undefined1 *)(*(int *)((char *)this + 0x130000) * 0x4c0 + 0x177 + (int)this) = 0; + *(undefined1 *)(*(int *)((char *)this + 0x130000) * 0x4c0 + 0x177 + GHIDRA_INT(this)) = 1; + (**(code **)(*(int *)(*(int *)((char *)this + 0x130000) * 0x4c0 + GHIDRA_INT(this)) + 0x28))(); + (**(code **)(*(int *)(*(int *)((char *)this + 0x130000) * 0x4c0 + GHIDRA_INT(this)) + 0x44))(); + *(undefined1 *)(*(int *)((char *)this + 0x130000) * 0x4c0 + 0x177 + GHIDRA_INT(this)) = 0; slot = *(uint *)((char *)this + 0x130000); } LAB_006f0d18: - return (Entity *)(slot * 0x4c0 + (int)this); + return (Entity *)(slot * 0x4c0 + GHIDRA_INT(this)); } switch(type) { case 1: @@ -84,7 +84,7 @@ LAB_006f0d18: isRetrying = tries < 0x200; tries = tries + 1; } while (isRetrying); - cVar1 = (**(code **)(*(int *)((int)this + + cVar1 = (**(code **)(*(int *)(GHIDRA_INT(this) + *(int *)((char *)this + 0x32c820) * 0x848 + 0x223820) + 0x38))() ; if (cVar1 == '\0') { @@ -105,7 +105,7 @@ LAB_006f0d18: slot = *(uint *)((char *)this + 0x32c820); } LAB_006f0638: - return (Entity *)((int)this + slot * 0x848 + 0x223820); + return (Entity *)(GHIDRA_INT(this) + slot * 0x848 + 0x223820); case 3: tries = 0; do { @@ -131,7 +131,7 @@ LAB_006f0638: isRetrying = tries < 0x40; tries = tries + 1; } while (isRetrying); - cVar1 = (**(code **)(*(int *)((int)this + + cVar1 = (**(code **)(*(int *)(GHIDRA_INT(this) + *(int *)((char *)this + 0x16d208) * 0xf48 + 0x130008) + 0x38))() ; if (cVar1 == '\0') { @@ -152,7 +152,7 @@ LAB_006f0638: slot = *(uint *)((char *)this + 0x16d208); } LAB_006f021a: - return (Entity *)((int)this + slot * 0xf48 + 0x130008); + return (Entity *)(GHIDRA_INT(this) + slot * 0xf48 + 0x130008); case 4: tries = 0; do { @@ -178,7 +178,7 @@ LAB_006f021a: isRetrying = tries < 0x40; tries = tries + 1; } while (isRetrying); - cVar1 = (**(code **)(*(int *)((int)this + + cVar1 = (**(code **)(*(int *)(GHIDRA_INT(this) + *(int *)((char *)this + 0x194810) * 0x9d8 + 0x16d210) + 0x38))() ; if (cVar1 == '\0') { @@ -199,7 +199,7 @@ LAB_006f021a: slot = *(uint *)((char *)this + 0x194810); } LAB_006f0374: - return (Entity *)((int)this + slot * 0x9d8 + 0x16d210); + return (Entity *)(GHIDRA_INT(this) + slot * 0x9d8 + 0x16d210); case 5: tries = 0; do { @@ -225,7 +225,7 @@ LAB_006f0374: isRetrying = tries < 0x200; tries = tries + 1; } while (isRetrying); - cVar1 = (**(code **)(*(int *)((int)this + + cVar1 = (**(code **)(*(int *)(GHIDRA_INT(this) + *(int *)((char *)this + 0x435c30) * 0x6f0 + 0x357c30) + 0x38))() ; if (cVar1 == '\0') { @@ -246,17 +246,17 @@ LAB_006f0374: slot = *(uint *)((char *)this + 0x435c30); } LAB_006f08f8: - return (Entity *)((int)this + slot * 0x6f0 + 0x357c30); + return (Entity *)(GHIDRA_INT(this) + slot * 0x6f0 + 0x357c30); case 6: tries = 0; do { slot = *(int *)((char *)this + 0x460438) + 1U & 0x7f; *(uint *)((char *)this + 0x460438) = slot; - if (*(char *)((char *)this + (int)(&UNK_00435da8 + slot * 0x550)) == '\0') goto LAB_006f0a56; + if (*(char *)((char *)this + GHIDRA_INT((&UNK_00435da8 + slot * 0x550))) == '\0') goto LAB_006f0a56; isRetrying = tries < 0x81; tries = tries + 1; } while (isRetrying); - if (*(char *)((char *)this + (int)(&UNK_00435da8 + slot * 0x550)) != '\0') { + if (*(char *)((char *)this + GHIDRA_INT((&UNK_00435da8 + slot * 0x550))) != '\0') { if (force != 0) { return (Entity *)0x0; } @@ -271,7 +271,7 @@ LAB_006f08f8: isRetrying = tries < 0x80; tries = tries + 1; } while (isRetrying); - cVar1 = (**(code **)(*(int *)((int)this + + cVar1 = (**(code **)(*(int *)(GHIDRA_INT(this) + *(int *)((char *)this + 0x460438) * 0x550 + 0x435c38) + 0x38))() ; if (cVar1 == '\0') { @@ -283,18 +283,18 @@ LAB_006f08f8: KAGE_LogMessage(4,(byte *) "Entity pool array %s is full, overwriting at index %d! (frame count: %d)\n" ); - *(undefined1 *)((char *)this + (int)(&UNK_00435daf + *(int *)((char *)this + 0x460438) * 0x550)) = + *(undefined1 *)((char *)this + GHIDRA_INT((&UNK_00435daf + *(int *)((char *)this + 0x460438) * 0x550))) = 1; (**(code **)(*(int *)((char *)this + *(int *)((char *)this + 0x460438) * 0x550 + 0x435c38) + 0x28) )(); (**(code **)(*(int *)((char *)this + *(int *)((char *)this + 0x460438) * 0x550 + 0x435c38) + 0x44) )(); - *(undefined1 *)((char *)this + (int)(&UNK_00435daf + *(int *)((char *)this + 0x460438) * 0x550)) = + *(undefined1 *)((char *)this + GHIDRA_INT((&UNK_00435daf + *(int *)((char *)this + 0x460438) * 0x550))) = 0; slot = *(uint *)((char *)this + 0x460438); } LAB_006f0a56: - return (Entity *)((int)this + slot * 0x550 + 0x435c38); + return (Entity *)(GHIDRA_INT(this) + slot * 0x550 + 0x435c38); case 7: tries = 0; do { @@ -320,7 +320,7 @@ LAB_006f0a56: isRetrying = tries < 0x80; tries = tries + 1; } while (isRetrying); - cVar1 = (**(code **)(*(int *)((int)this + + cVar1 = (**(code **)(*(int *)(GHIDRA_INT(this) + *(int *)((char *)this + 0x357c28) * 0x568 + 0x32c828) + 0x38))() ; if (cVar1 == '\0') { @@ -341,7 +341,7 @@ LAB_006f0a56: slot = *(uint *)((char *)this + 0x357c28); } LAB_006f0796: - return (Entity *)((int)this + slot * 0x568 + 0x32c828); + return (Entity *)(GHIDRA_INT(this) + slot * 0x568 + 0x32c828); case 8: tries = 0; do { @@ -367,7 +367,7 @@ LAB_006f0796: isRetrying = tries < 0x40; tries = tries + 1; } while (isRetrying); - cVar1 = (**(code **)(*(int *)((int)this + + cVar1 = (**(code **)(*(int *)(GHIDRA_INT(this) + *(int *)((char *)this + 0x6aac58) * 0x520 + 0x696458) + 0x38))() ; if (cVar1 == '\0') { @@ -388,7 +388,7 @@ LAB_006f0796: slot = *(uint *)((char *)this + 0x6aac58); } LAB_006f0bb4: - return (Entity *)((int)this + slot * 0x520 + 0x696458); + return (Entity *)(GHIDRA_INT(this) + slot * 0x520 + 0x696458); case 9: tries = 0; do { @@ -414,7 +414,7 @@ LAB_006f0bb4: isRetrying = tries < 0x200; tries = tries + 1; } while (isRetrying); - cVar1 = (**(code **)(*(int *)((int)this + + cVar1 = (**(code **)(*(int *)(GHIDRA_INT(this) + *(int *)((char *)this + 0x223818) * 0x478 + 0x194818) + 0x38))() ; if (cVar1 == '\0') { @@ -435,7 +435,7 @@ LAB_006f0bb4: slot = *(uint *)((char *)this + 0x223818); } LAB_006f04d8: - return (Entity *)((int)this + slot * 0x478 + 0x194818); + return (Entity *)(GHIDRA_INT(this) + slot * 0x478 + 0x194818); } } else if (type == 0x2329) { @@ -483,9 +483,9 @@ LAB_006f04d8: slot = *(uint *)((char *)this + 0x675c48); } LAB_006f0fe6: - return (Entity *)((int)this + slot * 0x530 + 0x64c448); + return (Entity *)(GHIDRA_INT(this) + slot * 0x530 + 0x64c448); } - npcPool = &DAT_00460440 + (int)this; + npcPool = &DAT_00460440 + GHIDRA_INT(this); tries = 0; do { slot = *(int *)((char *)this + 0x64c440) + 1U & 0x1ff; @@ -543,54 +543,54 @@ void EntityFactory::constructor() *(undefined4 *)((char *)this + 0x130000) = 0; local_8 = 0; _eh_vector_constructor_iterator_ - ((void *)((int)this + 0x130008),0xf48,0x40,Entity_Familiar::Constructor,FUN_0060d400); + ((void *)(GHIDRA_INT(this) + 0x130008),0xf48,0x40,Entity_Familiar::Constructor,FUN_0060d400); *(undefined4 *)((char *)this + 0x16d208) = 0; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; _eh_vector_constructor_iterator_ - ((void *)((int)this + 0x16d210),0x9d8,0x40,FUN_006a1e80,FUN_006a1fc0); + ((void *)(GHIDRA_INT(this) + 0x16d210),0x9d8,0x40,FUN_006a1e80,FUN_006a1fc0); *(undefined4 *)((char *)this + 0x194810) = 0; - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; _eh_vector_constructor_iterator_ - ((void *)((int)this + 0x194818),0x478,0x200,Entity_Projectile::Constructor, + ((void *)(GHIDRA_INT(this) + 0x194818),0x478,0x200,Entity_Projectile::Constructor, (_func_void_void_ptr *)&LAB_00652b80); *(undefined4 *)((char *)this + 0x223818) = 0; - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; _eh_vector_constructor_iterator_ - ((void *)((int)this + 0x223820),0x848,0x200,Entity_Tear::Constructor, + ((void *)(GHIDRA_INT(this) + 0x223820),0x848,0x200,Entity_Tear::Constructor, Entity_Tear::~Entity_Tear); *(undefined4 *)((char *)this + 0x32c820) = 0; - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; _eh_vector_constructor_iterator_ - ((void *)((int)this + 0x32c828),0x568,0x80,Entity_Laser::Constructor, + ((void *)(GHIDRA_INT(this) + 0x32c828),0x568,0x80,Entity_Laser::Constructor, Entity_Laser::destructor); *(undefined4 *)((char *)this + 0x357c28) = 0; - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; _eh_vector_constructor_iterator_ - ((void *)((int)this + 0x357c30),0x6f0,0x200,Entity_Pickup::Constructor, + ((void *)(GHIDRA_INT(this) + 0x357c30),0x6f0,0x200,Entity_Pickup::Constructor, Entity_Pickup::~Entity_Pickup); *(undefined4 *)((char *)this + 0x435c30) = 0; - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; _eh_vector_constructor_iterator_ - ((void *)((int)this + 0x435c38),0x550,0x80,FUN_0065d0c0,FUN_0065d160); + ((void *)(GHIDRA_INT(this) + 0x435c38),0x550,0x80,FUN_0065d0c0,FUN_0065d160); *(undefined4 *)((char *)this + 0x460438) = 0; - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; _eh_vector_constructor_iterator_ - ((void *)((int)this + 0x460440),0xf60,0x200,Entity_NPC::Constructor, + ((void *)(GHIDRA_INT(this) + 0x460440),0xf60,0x200,Entity_NPC::Constructor, Entity_NPC::~Entity_NPC); *(undefined4 *)((char *)this + 0x64c440) = 0; - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; _eh_vector_constructor_iterator_ - ((void *)((int)this + 0x64c448),0x530,0x80,FUN_005ccc30, + ((void *)(GHIDRA_INT(this) + 0x64c448),0x530,0x80,FUN_005ccc30, (_func_void_void_ptr *)&LAB_005ccc90); *(undefined4 *)((char *)this + 0x675c48) = 0; - local_8._0_1_ = 9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; _eh_vector_constructor_iterator_ - ((void *)((int)this + 0x675c50),0x410,0x80,FUN_006a7ec0, + ((void *)(GHIDRA_INT(this) + 0x675c50),0x410,0x80,FUN_006a7ec0, (_func_void_void_ptr *)&LAB_006a7f10); *(undefined4 *)((char *)this + 0x696450) = 0; - local_8 = CONCAT31(local_8._1_3_,10); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),10); _eh_vector_constructor_iterator_ - ((void *)((int)this + 0x696458),0x520,0x40,Entity_Knife::Constructor,FUN_00960bc0); + ((void *)(GHIDRA_INT(this) + 0x696458),0x520,0x40,Entity_Knife::Constructor,FUN_00960bc0); *(undefined4 *)((char *)this + 0x6aac58) = 0; ExceptionList = local_10; return; diff --git a/src/game/entity_familiar.cpp b/src/game/entity_familiar.cpp index 27b54a4..d493411 100644 --- a/src/game/entity_familiar.cpp +++ b/src/game/entity_familiar.cpp @@ -110,7 +110,7 @@ void Entity_Familiar::ai_umbilical_baby(byte isInterpolated) ehState = -1; puStack_18 = &LAB_00af2166; savedExceptionList = ExceptionList; - stackCookie = __security_cookie ^ (uint)(cordCapsule + 0x10); + stackCookie = __security_cookie ^ GHIDRA_UINT((cordCapsule + 0x10)); if (*(char *)((char *)sprite->_player + 0x173) != '\0') { return; } @@ -143,7 +143,7 @@ void Entity_Familiar::ai_umbilical_baby(byte isInterpolated) listHead[1] = 0; *puVar1 = listHead; *listHead = puVar1; - ehState = CONCAT31(ehState._1_3_,2); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),2); ((ANM2 *)((ANM2 *)(puVar3 + 6)))->ANM2::constructor(); puVar3[0x4c] = 0; puVar3[0x4d] = 0; @@ -161,11 +161,11 @@ void Entity_Familiar::ai_umbilical_baby(byte isInterpolated) ehState = -1; if (0xf < anm2Path._capacity) { uVar10 = anm2Path._capacity + 1; - pvVar8 = (void *)anm2Path._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)anm2Path._buf) + 0x0)); if (0xfff < uVar10) { - pvVar8 = *(void **)(anm2Path._buf._0_4_ + -4); + pvVar8 = *(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar10 = anm2Path._capacity + 0x24; - if (0x1f < (uint)(anm2Path._buf._0_4_ + (-4 - (int)pvVar8))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar8))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -181,9 +181,9 @@ void Entity_Familiar::ai_umbilical_baby(byte isInterpolated) sprite->_collisionDamage = tearHitParams._tearDamage; *(undefined2 *)(puVar3 + 0x50) = 0; puVar3[0x4c] = (undefined4)tearHitParams._flags._l; - puVar3[0x4d] = tearHitParams._flags._l._4_4_; + puVar3[0x4d] = (*(undefined4 *)((char *)&(tearHitParams._flags._l) + 0x4)); puVar3[0x4e] = (undefined4)tearHitParams._flags._h; - puVar3[0x4f] = tearHitParams._flags._h._4_4_; + puVar3[0x4f] = (*(undefined4 *)((char *)&(tearHitParams._flags._h) + 0x4)); std::deque<120byte>::resize(); puVar3[0x51] = 0x40a00000; puVar3[0x52] = g_vectorZero.x; @@ -233,7 +233,7 @@ LAB_00431f23: local_f8 = (Vector *)player->_fireDirection; aimDirection.x = (player->_aimDirection).x; aimDirection.y = (player->_aimDirection).y; - local_cc = (float *)CONCAT31(local_cc._1_3_,local_f8 != (Vector *)0xffffffff); + local_cc = (float *)CONCAT31((*(undefined1 *)((char *)&(local_cc) + 0x1)),local_f8 != (Vector *)0xffffffff); local_d0 = (player->_pos).x; local_d8 = (Vector *)(player->_pos).y; local_e0 = (std_vector *)aimDirection.x; @@ -248,7 +248,7 @@ LAB_00431f23: local_12c.y = 0.0; local_c8 = (ANM2 *)0x0; local_12c.x = 0.0; - PickEnemyTarget(sprite,800.0,-(uint)(sprite->_target != (EntityPtr)0x0) & 8,0x13,&g_vectorZero,15.0) + PickEnemyTarget(sprite,800.0,-GHIDRA_UINT((sprite->_target != (EntityPtr)0x0)) & 8,0x13,&g_vectorZero,15.0) ; if ((local_dc != 0.0) && (sprite->_weapon != (void *)0x0)) { TryAimAtMarkedTarget(sprite,&aimDirection,(int *)&local_d4,&local_12c); @@ -275,7 +275,7 @@ LAB_00431f23: local_11c.y = *(float *)(iVar4 + 0x340) - (sprite->_pos).y; pVVar5 = (Vector *)vector_to_direction(&local_11c); } - sprite->_shootDirection = (int)pVVar5; + sprite->_shootDirection = GHIDRA_INT(pVVar5); fVar15 = atan2f(aimDirection.y,aimDirection.x); puVar3[0x54] = fVar15 * 57.295776; } @@ -325,11 +325,11 @@ LAB_00431f23: } local_cc = (float *)(fVar15 / 45.0 + 0.5); dVar20 = floor((double)(float)local_cc); - local_cc = (float *)((int)dVar20 + 8U & 0x80000007); - if ((int)local_cc < 0) { - local_cc = (float *)(((uint)((int)local_cc + -1) | 0xfffffff8) + 1); + local_cc = (float *)(GHIDRA_INT(dVar20) + 8U & 0x80000007); + if (GHIDRA_INT(local_cc) < 0) { + local_cc = (float *)((GHIDRA_UINT((GHIDRA_INT(local_cc) + -1)) | 0xfffffff8) + 1); } - animName = (&PTR_s_BodySide_00b1d240)[(int)local_cc]; + animName = (&PTR_s_BodySide_00b1d240)[GHIDRA_INT(local_cc)]; local_c8 = &sprite->_sprite; (sprite->_sprite)._overlayRenderFirst = local_cc != (float *)&DAT_00000006; ((ANM2 *)(local_c8))->ANM2::PlayOverlay(animName,0); @@ -352,7 +352,7 @@ LAB_00431f23: (layer->_pos).y = (float)local_fc; if ((sprite->_sprite)._flipX != 0) { layer = ((ANM2 *)(local_c8))->ANM2::GetLayer((byte *)0x0); - local_cc = (float *)((uint)(layer->_pos).x ^ 0x80000000); + local_cc = (float *)(GHIDRA_UINT((layer->_pos).x) ^ 0x80000000); layer = ((ANM2 *)(local_c8))->ANM2::GetLayer((byte *)0x0); (layer->_pos).x = (float)local_cc; } @@ -370,7 +370,7 @@ LAB_00431f23: copyLayer = ((ANM2 *)(sprite))->ANM2::GetLayer(*(byte **)((char *)local_c0 + 0xb1d238)); (copyLayer->_size).x = (layer->_size).x; (copyLayer->_size).y = (layer->_size).y; - local_c0 = (Entity_Projectile *)((int)local_c0 + 4); + local_c0 = (Entity_Projectile *)(GHIDRA_INT(local_c0) + 4); } while (local_c0 < &DAT_00000008); sprite = local_e8; puVar3 = local_ec; @@ -449,10 +449,10 @@ LAB_00431f23: uVar10 = puVar3[5]; if (1 < uVar10) { do { - dVar20 = (double)(int)uVar11; - iVar4 = (int)uVar11 >> 0x1f; + dVar20 = (double)GHIDRA_INT(uVar11); + iVar4 = GHIDRA_INT(uVar11) >> 0x1f; local_f4.y = (float)puVar3[4]; - uVar10 = (int)local_f4.y + uVar11; + uVar10 = GHIDRA_INT(local_f4.y) + uVar11; uVar11 = uVar11 + 1; ropePointCount = *(float **)(puVar3[2] + (puVar3[3] - 1 & uVar10) * 4); local_c8 = (ANM2 *)((float)(dVar20 + __uint_to_double_fixup[-iVar4]) / @@ -476,10 +476,10 @@ LAB_00431f23: if (1 < uVar10) { uVar10 = puVar3[5]; do { - ropePointCount = *(float **)(puVar3[2] + (puVar3[3] - 1 & puVar3[4] + (int)local_d8) * 4); + ropePointCount = *(float **)(puVar3[2] + (puVar3[3] - 1 & puVar3[4] + GHIDRA_INT(local_d8)) * 4); local_f4.y = (float)puVar3[4]; pfVar6 = *(float **) - (puVar3[2] + ((int)local_f4.y + ((int)local_d8 - 1U) & puVar3[3] - 1) * 4); + (puVar3[2] + (GHIDRA_INT(local_f4.y) + (GHIDRA_INT(local_d8) - 1U) & puVar3[3] - 1) * 4); VStack_108.y = *ropePointCount - *pfVar6; local_e0 = (std_vector *)(ropePointCount[1] - pfVar6[1]); if ((VStack_108.y != g_vectorZero.x) || ((float)local_e0 != g_vectorZero.y)) { @@ -503,26 +503,26 @@ LAB_00431f23: if (VStack_108.y <= 0.0) { pfVar6 = (float *)&local_e0; } - fVar15 = ((float)((double)(int)(uVar10 - (int)local_d8) + - __uint_to_double_fixup[-((int)(uVar10 - (int)local_d8) >> 0x1f)]) * + fVar15 = ((float)((double)GHIDRA_INT((uVar10 - GHIDRA_INT(local_d8))) + + __uint_to_double_fixup[-(GHIDRA_INT((uVar10 - GHIDRA_INT(local_d8))) >> 0x1f)]) * (*ropePointCount + (float)*ropePointCount)) / - (float)((double)(int)uVar10 + __uint_to_double_fixup[-((int)uVar10 >> 0x1f)]); + (float)((double)GHIDRA_INT(uVar10) + __uint_to_double_fixup[-(GHIDRA_INT(uVar10) >> 0x1f)]); local_c0 = (Entity_Projectile *)((float)local_c0 * fVar15); local_d0 = local_d0 * fVar15; - fVar15 = (float)((double)(int)local_d8 + __uint_to_double_fixup[-((int)local_d8 >> 0x1f)]) + fVar15 = (float)((double)GHIDRA_INT(local_d8) + __uint_to_double_fixup[-(GHIDRA_INT(local_d8) >> 0x1f)]) * (float)*pfVar6 * 0.4; fVar15 = sin(((fVar15 + fVar15) * 3.1415927) / - (float)((double)(int)uVar10 + __uint_to_double_fixup[-((int)uVar10 >> 0x1f)]) + (float)((double)GHIDRA_INT(uVar10) + __uint_to_double_fixup[-(GHIDRA_INT(uVar10) >> 0x1f)]) ); local_f4.y = (float)puVar3[4]; ropePointCount = - *(float **)(puVar3[2] + (puVar3[3] - 1 & (int)local_f4.y + (int)local_d8) * 4); + *(float **)(puVar3[2] + (puVar3[3] - 1 & GHIDRA_INT(local_f4.y) + GHIDRA_INT(local_d8)) * 4); ropePointCount[1] = fVar15 * local_d0 + ropePointCount[1]; *ropePointCount = fVar15 * (float)local_c0 + *ropePointCount; ropePointCount[2] = ropePointCount[2] + 0.0; uVar10 = puVar3[5]; } - local_d8 = (Vector *)((int)local_d8 + 1); + local_d8 = (Vector *)(GHIDRA_INT(local_d8) + 1); } while (local_d8 < uVar10); sprite = local_e8; } @@ -565,7 +565,7 @@ LAB_00431f23: local_d0 = local_d0 * 1.5; } ((Capsule *)(cordCapsule))->Capsule::constructor2(&local_154,&local_124,local_d0); - if (((uint)g_game->_debugFlags >> 5 & 1) != 0) { + if ((GHIDRA_UINT(g_game->_debugFlags) >> 5 & 1) != 0) { pvVar8 = ((DebugRenderer *)(&g_game->_debugRenderer))->DebugRenderer::Get(sprite->_index,1); ((Capsule *)((Capsule *)&local_20c))->Capsule::constructor2(&local_154,&local_124,local_d0); push_shape_points(pvVar8,capsule); @@ -578,49 +578,49 @@ LAB_00431f23: VStack_108.y = 0.0; ((Capsule *)(cordCapsule))->Capsule::get_bounding_box(&local_124,&VStack_108); baby = local_e8; - fVar15 = (float)(int)((local_124.x - 40.0) / 40.0 + 0.5); + fVar15 = (float)GHIDRA_INT(((local_124.x - 40.0) / 40.0 + 0.5)); local_dc = 0.0; - if (0 < (int)fVar15) { + if (0 < GHIDRA_INT(fVar15)) { local_dc = fVar15; } - piVar9 = (int *)(int)((local_124.y - 120.0) / 40.0 + 0.5); + piVar9 = (int *)GHIDRA_INT(((local_124.y - 120.0) / 40.0 + 0.5)); local_f8 = (Vector *)(int *)0x0; - if (0 < (int)piVar9) { + if (0 < GHIDRA_INT(piVar9)) { local_f8 = (Vector *)piVar9; } - local_e0 = (std_vector *)((int)(local_c0->_damageEvents)._end + -1); - psVar12 = (std_vector *)(int)((VStack_108.x - 40.0) / 40.0 + 0.5); - if ((int)psVar12 < (int)local_e0) { + local_e0 = (std_vector *)(GHIDRA_INT((local_c0->_damageEvents)._end) + -1); + psVar12 = (std_vector *)GHIDRA_INT(((VStack_108.x - 40.0) / 40.0 + 0.5)); + if (GHIDRA_INT(psVar12) < GHIDRA_INT(local_e0)) { local_e0 = psVar12; } - fVar15 = (float)((int)(local_c0->_damageEvents)._capacity + -1); - fVar14 = (float)(int)((VStack_108.y - 120.0) / 40.0 + 0.5); - if ((int)fVar14 < (int)fVar15) { + fVar15 = (float)(GHIDRA_INT((local_c0->_damageEvents)._capacity) + -1); + fVar14 = (float)GHIDRA_INT(((VStack_108.y - 120.0) / 40.0 + 0.5)); + if (GHIDRA_INT(fVar14) < GHIDRA_INT(fVar15)) { fVar15 = fVar14; } VStack_108.y = fVar15; pEVar13 = local_c0; - if ((int)local_dc <= (int)local_e0) { + if (GHIDRA_INT(local_dc) <= GHIDRA_INT(local_e0)) { do { local_e4 = (int *)local_f8; fVar14 = local_dc; pVVar5 = local_f8; - if ((int)local_f8 <= (int)fVar15) { + if (GHIDRA_INT(local_f8) <= GHIDRA_INT(fVar15)) { do { - if (((((int)fVar14 < 0) || - (pvVar8 = (pEVar13->_damageEvents)._end, (int)pvVar8 <= (int)fVar14)) || - ((int)pVVar5 < 0)) || - (((int)(pEVar13->_damageEvents)._capacity <= (int)pVVar5 || - (iVar4 = (int)pvVar8 * (int)pVVar5 + (int)fVar14, iVar4 < 0)))) { + if ((((GHIDRA_INT(fVar14) < 0) || + (pvVar8 = (pEVar13->_damageEvents)._end, GHIDRA_INT(pvVar8) <= GHIDRA_INT(fVar14))) || + (GHIDRA_INT(pVVar5) < 0)) || + ((GHIDRA_INT((pEVar13->_damageEvents)._capacity) <= GHIDRA_INT(pVVar5) || + (iVar4 = GHIDRA_INT(pvVar8) * GHIDRA_INT(pVVar5) + GHIDRA_INT(fVar14), iVar4 < 0)))) { local_c4 = (Vector *)0x0; } else { - local_c4 = *(Vector **)((int)(&(pEVar13->_sprite)._filename + -2) + 0xc + iVar4 * 4); + local_c4 = *(Vector **)(GHIDRA_INT((&(pEVar13->_sprite)._filename + -2)) + 0xc + iVar4 * 4); } if (local_c4 != (Vector *)0x0) { iVar4 = *(int *)((char *)g_game->_room + 0xc); - local_124.x = (float)((int)local_c4[4].y % iVar4) * 40.0 + 40.0; - local_124.y = (float)((int)local_c4[4].y / iVar4) * 40.0 + 120.0; + local_124.x = (float)(GHIDRA_INT(local_c4[4].y) % iVar4) * 40.0 + 40.0; + local_124.y = (float)(GHIDRA_INT(local_c4[4].y) / iVar4) * 40.0 + 120.0; local_e4 = (int *)pVVar5; ((Capsule *)(gridCapsule))->Capsule::constructor(&local_124,&g_vectorOne,0.0,20.0); bVar2 = Capsule::Collide(gridCapsule,cordCapsule,(Vector *)0x0); @@ -633,20 +633,20 @@ LAB_00431f23: fVar14 = local_dc; pEVar13 = local_c0; } - pVVar5 = (Vector *)((int)pVVar5 + 1); + pVVar5 = (Vector *)(GHIDRA_INT(pVVar5) + 1); fVar15 = VStack_108.y; local_e4 = (int *)pVVar5; - } while ((int)pVVar5 <= (int)VStack_108.y); + } while (GHIDRA_INT(pVVar5) <= GHIDRA_INT(VStack_108.y)); } - local_dc = (float)((int)fVar14 + 1); - } while ((int)local_dc <= (int)local_e0); + local_dc = (float)(GHIDRA_INT(fVar14) + 1); + } while (GHIDRA_INT(local_dc) <= GHIDRA_INT(local_e0)); } local_124.y = (float)(local_ec + 0x4c); maskedFlags = BitSet128::operator_and ((BitSet128 *)shieldedMask,(BitSet128 *)local_124.y,&g_tearFlagShielded) ; - if (((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - (uVar10 = 0x1c, (int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) { + if ((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (uVar10 = 0x1c, GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) { uVar10 = 0x1e; } local_cc = (float *)0x49742400; @@ -654,12 +654,12 @@ LAB_00431f23: local_11c.x = 0.0; local_b9 = '\0'; EntityList::query_player_capsule_hits - ((EntityList *)((int)g_game->_room + 0x1218),&capsuleHits,cordCapsule,uVar10); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&capsuleHits,cordCapsule,uVar10); ehState = 4; local_c4 = (Vector *)0x0; if (capsuleHits._size != 0) { do { - pEVar13 = *(Entity_Projectile **)((char *)capsuleHits._data + (int)local_c4 * 4); + pEVar13 = *(Entity_Projectile **)((char *)capsuleHits._data + GHIDRA_INT(local_c4) * 4); local_c0 = pEVar13; if ((pEVar13->_size == 0.0) || (pEVar13->_entityCollisionClass == 0)) goto LAB_004345ff; cordSegment = local_e8->_child; @@ -688,8 +688,8 @@ LAB_00434a9f: puVar1 = (baby->_hitList)._end; puVar3 = psVar12->_begin; VStack_108.y = (float)puVar1; - uVar10 = (int)puVar1 - (int)puVar3 >> 2; - if (0 < (int)uVar10) { + uVar10 = GHIDRA_INT(puVar1) - GHIDRA_INT(puVar3) >> 2; + if (0 < GHIDRA_INT(uVar10)) { do { uVar11 = uVar10 >> 1; if ((undefined1 *)puVar3[uVar11] < local_e4) { @@ -697,7 +697,7 @@ LAB_00434a9f: uVar11 = uVar10 + (-1 - uVar11); } uVar10 = uVar11; - } while (0 < (int)uVar11); + } while (0 < GHIDRA_INT(uVar11)); pEVar13 = local_c0; } if ((puVar3 == puVar1) || ((int *)*puVar3 != local_e4)) { @@ -751,7 +751,7 @@ LAB_00434c47: VStack_108.x = pEVar13->_orbitDistance; VStack_108.y = *(float *)&(*(undefined1 *)((char *)(pEVar13) + 0x434)); maskedFlags = BitSet128::operator_and - ((BitSet128 *)((int)&anm2Path + 8),(BitSet128 *)&tearFlags0, + ((BitSet128 *)(GHIDRA_INT(&anm2Path) + 8),(BitSet128 *)&tearFlags0, &g_tearFlagLudovico); bVar2 = ((BitSet128 *)(maskedFlags))->BitSet128::IsNonZero(); if ((bVar2 != 0) && @@ -779,8 +779,8 @@ LAB_004344ed: local_e4 = (int *)((Entity *)((Entity *)pEVar13))->Entity::GetHitListIndex(); local_e0 = (baby->_hitList)._end; puVar3 = (baby->_hitList)._begin; - uVar10 = (int)local_e0 - (int)puVar3 >> 2; - if (0 < (int)uVar10) { + uVar10 = GHIDRA_INT(local_e0) - GHIDRA_INT(puVar3) >> 2; + if (0 < GHIDRA_INT(uVar10)) { do { uVar11 = uVar10 >> 1; puVar1 = puVar3 + uVar11; @@ -791,7 +791,7 @@ LAB_004344ed: } VStack_108.y = (float)puVar1; uVar10 = uVar11; - } while (0 < (int)uVar11); + } while (0 < GHIDRA_INT(uVar11)); baby = local_e8; pEVar13 = local_c0; } @@ -844,7 +844,7 @@ LAB_00434715: } bVar2 = ((Entity *)((Entity *)baby))->Entity::HasEntityFlags(0x400000000); if (bVar2 != 0) { - local_dc = (float)((uint)local_dc | 0x20000000); + local_dc = (float)(GHIDRA_UINT(local_dc) | 0x20000000); } vfn = *(code **)(*(int *)pEVar13 + 0x20); ((EntityRef *)(&local_20c))->EntityRef::constructor(local_e8->_player); @@ -859,7 +859,7 @@ LAB_004349aa: if (bVar2 == 0) goto LAB_004349aa; local_e4 = (int *)0x4d; seed_fart_sound_override((int *)&local_e4); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_e4,1.0,10,0,1.5,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_e4),1.0,10,0,1.5,0.0); pVVar5 = local_d8; Entity_Tear::ApplyTearFlagEffects ((Entity *)pEVar13,local_d8,*(BitSet128 *)local_124.y, @@ -904,8 +904,8 @@ LAB_004349aa: } } LAB_004345ff: - local_c4 = (Vector *)((int)local_c4 + 1); - } while (local_c4 < (uint)capsuleHits._size); + local_c4 = (Vector *)(GHIDRA_INT(local_c4) + 1); + } while (local_c4 < GHIDRA_UINT(capsuleHits._size)); if ((local_b9 != '\0') && (*(char *)((char *)local_ec + 0x141) == '\0')) { *(undefined1 *)((char *)local_ec + 0x141) = 1; play_sound_with_fart_seed(0x1ef,1.0,2,0,1.0); @@ -974,12 +974,12 @@ LAB_004345ff: local_c0 = (Entity_Projectile *) Math::timescale_factor(1.0 - (float)local_fc * 0.8,local_e8->_speedMultiplier); local_d4 = (Vector *)0x1; - if (1 < (uint)puVar3[5]) { + if (1 < GHIDRA_UINT(puVar3[5])) { local_fc = (float *)((5.0 - (float)local_c8) * 4.0); local_dc = fVar19 - (float)local_c0; do { local_d8 = (Vector *) - ((float)((double)(int)local_d4 + __uint_to_double_fixup[-((int)local_d4 >> 0x1f)] + ((float)((double)GHIDRA_INT(local_d4) + __uint_to_double_fixup[-(GHIDRA_INT(local_d4) >> 0x1f)] ) / (float)((double)(puVar3[5] + -1) + __uint_to_double_fixup[-(puVar3[5] + -1 >> 0x1f)])); @@ -992,9 +992,9 @@ LAB_004345ff: fVar15 = sin(((float)local_d8 * (float)local_c8 + (float)local_d8 * (float)local_c8) * 3.1415927); ropePointCount = &local_d4->x; - local_d4 = (Vector *)((int)&local_d4->x + 1); + local_d4 = (Vector *)(GHIDRA_INT(&local_d4->x) + 1); ropePointCount = - *(float **)(puVar3[2] + (puVar3[3] - 1 & (int)ropePointCount + puVar3[4]) * 4); + *(float **)(puVar3[2] + (puVar3[3] - 1 & GHIDRA_INT(ropePointCount) + puVar3[4]) * 4); fVar19 = 1.0; *ropePointCount = (fVar15 * (float)local_cc * (float)local_fc + (float)local_f8) * (float)local_c0 + @@ -1028,15 +1028,15 @@ LAB_004345ff: ropePointCount = (float *)0x0; if (iVar4 != 0) { do { - ropePointCount = *(float **)(puVar3[2] + (puVar3[4] + (int)local_c8 & puVar3[3] - 1) * 4); + ropePointCount = *(float **)(puVar3[2] + (puVar3[4] + GHIDRA_INT(local_c8) & puVar3[3] - 1) * 4); local_13c = *(undefined1 (*) [8])(ropePointCount + 3); local_134 = ropePointCount[5]; - ropePointCount[6] = (float)local_13c._0_4_; - ropePointCount[7] = (float)local_13c._4_4_; + ropePointCount[6] = (*(undefined4 *)((char *)&((float)local_13c) + 0x0)); + ropePointCount[7] = (*(undefined4 *)((char *)&((float)local_13c) + 0x4)); ropePointCount[8] = local_134; iVar4 = puVar3[4]; if (local_c8 < (float *)(puVar3[5] - 1)) { - local_d4 = *(Vector **)(puVar3[2] + (iVar4 + 1 + (int)local_c8 & puVar3[3] - 1) * 4); + local_d4 = *(Vector **)(puVar3[2] + (iVar4 + 1 + GHIDRA_INT(local_c8) & puVar3[3] - 1) * 4); iVar4 = puVar3[4]; } else { @@ -1046,12 +1046,12 @@ LAB_004345ff: pVVar5 = &DAT_00c79c58; } else { - pVVar5 = *(Vector **)(puVar3[2] + (iVar4 + -1 + (int)local_c8 & puVar3[3] - 1) * 4); + pVVar5 = *(Vector **)(puVar3[2] + (iVar4 + -1 + GHIDRA_INT(local_c8) & puVar3[3] - 1) * 4); } pfVar6 = umbilical_rope_force (&local_14c,ropePointCount,ropePointCount + 3,&pVVar5->x,&local_d4->x, (float)local_ec); - local_c8 = (ANM2 *)((int)local_c8 + 1); + local_c8 = (ANM2 *)(GHIDRA_INT(local_c8) + 1); ropePointCount[0x12] = *pfVar6; ropePointCount[0x13] = pfVar6[1]; ropePointCount[0x14] = pfVar6[2]; @@ -1062,32 +1062,32 @@ LAB_004345ff: uVar10 = 0; if (ropePointCount != (float *)0x0) { do { - ropePointCount = *(float **)(puVar3[2] + (puVar3[4] + (int)local_c0 & puVar3[3] - 1) * 4); + ropePointCount = *(float **)(puVar3[2] + (puVar3[4] + GHIDRA_INT(local_c0) & puVar3[3] - 1) * 4); ropePointCount[9] = (float)local_c4 * ropePointCount[0x12] * 0.5 + ropePointCount[3]; ropePointCount[10] = (float)local_c4 * ropePointCount[0x13] * 0.5 + ropePointCount[4]; ropePointCount[0xb] = (float)local_c4 * ropePointCount[0x14] * 0.5 + ropePointCount[5]; if (local_c0 < puVar3[5] - 1) { - pfVar6 = *(float **)(puVar3[2] + ((int)local_c0 + 1U + puVar3[4] & puVar3[3] - 1) * 4); - iVar4 = *(int *)(puVar3[2] + (puVar3[4] + (int)local_c0 + 1U & puVar3[3] - 1) * 4); + pfVar6 = *(float **)(puVar3[2] + (GHIDRA_INT(local_c0) + 1U + puVar3[4] & puVar3[3] - 1) * 4); + iVar4 = *(int *)(puVar3[2] + (puVar3[4] + GHIDRA_INT(local_c0) + 1U & puVar3[3] - 1) * 4); local_d4 = (Vector *)local_13c; - local_13c._4_4_ = (float)local_c4 * *(float *)(iVar4 + 0x1c) * 0.5 + pfVar6[1]; - local_13c._0_4_ = (float)local_c4 * *(float *)(iVar4 + 0x18) * 0.5 + *pfVar6; + (*(undefined4 *)((char *)&(local_13c) + 0x4)) = (float)local_c4 * *(float *)(iVar4 + 0x1c) * 0.5 + pfVar6[1]; + (*(undefined4 *)((char *)&(local_13c) + 0x0)) = (float)local_c4 * *(float *)(iVar4 + 0x18) * 0.5 + *pfVar6; local_134 = (float)local_c4 * *(float *)(iVar4 + 0x20) * 0.5 + pfVar6[2]; } else { local_d4 = (Vector *)local_178; - local_178._0_4_ = DAT_00c79c58.x; - local_178._4_4_ = DAT_00c79c58.y; + (*(undefined4 *)((char *)&(local_178) + 0x0)) = DAT_00c79c58.x; + (*(undefined4 *)((char *)&(local_178) + 0x4)) = DAT_00c79c58.y; local_170 = DAT_00c79c60; } if (local_c0 == (Entity_Projectile *)0x0) { - local_184._0_4_ = DAT_00c79c58.x; - local_184._4_4_ = DAT_00c79c58.y; + (*(undefined4 *)((char *)&(local_184) + 0x0)) = DAT_00c79c58.x; + (*(undefined4 *)((char *)&(local_184) + 0x4)) = DAT_00c79c58.y; pfVar6 = (float *)local_184; local_17c = DAT_00c79c60; } else { - uVar10 = (int)local_c0 + puVar3[4] + -1; + uVar10 = GHIDRA_INT(local_c0) + puVar3[4] + -1; prevPoint = *(float **)(puVar3[2] + (puVar3[3] - 1 & uVar10) * 4); iVar4 = *(int *)(puVar3[2] + (puVar3[3] - 1 & uVar10) * 4); local_148.x = (float)local_c4 * *(float *)(iVar4 + 0x1c) * 0.5 + prevPoint[1]; @@ -1104,7 +1104,7 @@ LAB_004345ff: local_cc = ropePointCount; pfVar6 = umbilical_rope_force (&ropeForce,&midPosX,&midVelX,pfVar6,&local_d4->x,(float)local_ec); - local_c0 = (Entity_Projectile *)((int)local_c0 + 1); + local_c0 = (Entity_Projectile *)(GHIDRA_INT(local_c0) + 1); ropePointCount[0x15] = *pfVar6; ropePointCount[0x16] = pfVar6[1]; ropePointCount[0x17] = pfVar6[2]; @@ -1115,7 +1115,7 @@ LAB_004345ff: uVar11 = 0; if (uVar10 != 0) { do { - pVVar5 = *(Vector **)(puVar3[2] + (puVar3[3] - 1 & puVar3[4] + (int)local_c0) * 4); + pVVar5 = *(Vector **)(puVar3[2] + (puVar3[3] - 1 & puVar3[4] + GHIDRA_INT(local_c0)) * 4); fVar15 = pVVar5[0xb].y; fVar14 = pVVar5[2].y; pVVar5[6].x = (float)local_c4 * pVVar5[10].y * 0.5 + pVVar5[1].y; @@ -1123,27 +1123,27 @@ LAB_004345ff: pVVar5[7].x = (float)local_c4 * fVar15 * 0.5 + fVar14; if (local_c0 < puVar3[5] - 1) { ropePointCount = - *(float **)(puVar3[2] + (puVar3[3] - 1 & puVar3[4] + (int)local_c0 + 1U) * 4); - iVar4 = *(int *)(puVar3[2] + (puVar3[3] - 1 & (int)local_c0 + 1U + puVar3[4]) * 4); + *(float **)(puVar3[2] + (puVar3[3] - 1 & puVar3[4] + GHIDRA_INT(local_c0) + 1U) * 4); + iVar4 = *(int *)(puVar3[2] + (puVar3[3] - 1 & GHIDRA_INT(local_c0) + 1U + puVar3[4]) * 4); local_c8 = (ANM2 *)local_13c; - local_13c._4_4_ = (float)local_c4 * *(float *)(iVar4 + 0x28) * 0.5 + ropePointCount[1]; - local_13c._0_4_ = (float)local_c4 * *(float *)(iVar4 + 0x24) * 0.5 + *ropePointCount; + (*(undefined4 *)((char *)&(local_13c) + 0x4)) = (float)local_c4 * *(float *)(iVar4 + 0x28) * 0.5 + ropePointCount[1]; + (*(undefined4 *)((char *)&(local_13c) + 0x0)) = (float)local_c4 * *(float *)(iVar4 + 0x24) * 0.5 + *ropePointCount; local_134 = (float)local_c4 * *(float *)(iVar4 + 0x2c) * 0.5 + ropePointCount[2]; } else { local_c8 = (ANM2 *)local_178; - local_178._0_4_ = DAT_00c79c58.x; - local_178._4_4_ = DAT_00c79c58.y; + (*(undefined4 *)((char *)&(local_178) + 0x0)) = DAT_00c79c58.x; + (*(undefined4 *)((char *)&(local_178) + 0x4)) = DAT_00c79c58.y; local_170 = DAT_00c79c60; } if (local_c0 == (Entity_Projectile *)0x0) { - local_184._0_4_ = DAT_00c79c58.x; - local_184._4_4_ = DAT_00c79c58.y; + (*(undefined4 *)((char *)&(local_184) + 0x0)) = DAT_00c79c58.x; + (*(undefined4 *)((char *)&(local_184) + 0x4)) = DAT_00c79c58.y; ropePointCount = (float *)local_184; local_17c = DAT_00c79c60; } else { - uVar10 = (int)local_c0 + puVar3[4] + -1; + uVar10 = GHIDRA_INT(local_c0) + puVar3[4] + -1; pfVar6 = *(float **)(puVar3[2] + (puVar3[3] - 1 & uVar10) * 4); iVar4 = *(int *)(puVar3[2] + (puVar3[3] - 1 & uVar10) * 4); local_148.x = (float)local_c4 * *(float *)(iVar4 + 0x28) * 0.5 + pfVar6[1]; @@ -1162,7 +1162,7 @@ LAB_004345ff: umbilical_rope_force (&ropeForce,&midPosX,&midVelX,ropePointCount,(float *)local_c8,(float)local_ec) ; - local_c0 = (Entity_Projectile *)((int)local_c0 + 1); + local_c0 = (Entity_Projectile *)(GHIDRA_INT(local_c0) + 1); pVVar5[0xc].x = *ropePointCount; pVVar5[0xc].y = ropePointCount[1]; pVVar5[0xd].x = ropePointCount[2]; @@ -1173,7 +1173,7 @@ LAB_004345ff: uVar10 = 0; if (uVar11 != 0) { do { - pVVar5 = *(Vector **)(puVar3[2] + (puVar3[3] - 1 & puVar3[4] + (int)local_c0) * 4); + pVVar5 = *(Vector **)(puVar3[2] + (puVar3[3] - 1 & puVar3[4] + GHIDRA_INT(local_c0)) * 4); fVar15 = pVVar5[0xd].x; fVar14 = pVVar5[2].x; fVar16 = pVVar5[2].y; @@ -1182,27 +1182,27 @@ LAB_004345ff: pVVar5[8].y = (float)local_c4 * fVar15 + fVar16; if (local_c0 < puVar3[5] - 1) { ropePointCount = - *(float **)(puVar3[2] + (puVar3[3] - 1 & puVar3[4] + (int)local_c0 + 1U) * 4); - iVar4 = *(int *)(puVar3[2] + (puVar3[3] - 1 & (int)local_c0 + 1U + puVar3[4]) * 4); + *(float **)(puVar3[2] + (puVar3[3] - 1 & puVar3[4] + GHIDRA_INT(local_c0) + 1U) * 4); + iVar4 = *(int *)(puVar3[2] + (puVar3[3] - 1 & GHIDRA_INT(local_c0) + 1U + puVar3[4]) * 4); local_c8 = (ANM2 *)local_13c; - local_13c._4_4_ = (float)local_c4 * *(float *)(iVar4 + 0x34) + ropePointCount[1]; - local_13c._0_4_ = (float)local_c4 * *(float *)(iVar4 + 0x30) + *ropePointCount; + (*(undefined4 *)((char *)&(local_13c) + 0x4)) = (float)local_c4 * *(float *)(iVar4 + 0x34) + ropePointCount[1]; + (*(undefined4 *)((char *)&(local_13c) + 0x0)) = (float)local_c4 * *(float *)(iVar4 + 0x30) + *ropePointCount; local_134 = (float)local_c4 * *(float *)(iVar4 + 0x38) + ropePointCount[2]; } else { local_c8 = (ANM2 *)local_178; - local_178._0_4_ = DAT_00c79c58.x; - local_178._4_4_ = DAT_00c79c58.y; + (*(undefined4 *)((char *)&(local_178) + 0x0)) = DAT_00c79c58.x; + (*(undefined4 *)((char *)&(local_178) + 0x4)) = DAT_00c79c58.y; local_170 = DAT_00c79c60; } if (local_c0 == (Entity_Projectile *)0x0) { - local_184._0_4_ = DAT_00c79c58.x; - local_184._4_4_ = DAT_00c79c58.y; + (*(undefined4 *)((char *)&(local_184) + 0x0)) = DAT_00c79c58.x; + (*(undefined4 *)((char *)&(local_184) + 0x4)) = DAT_00c79c58.y; ropePointCount = (float *)local_184; local_17c = DAT_00c79c60; } else { - uVar10 = (int)local_c0 + puVar3[4] + -1; + uVar10 = GHIDRA_INT(local_c0) + puVar3[4] + -1; pfVar6 = *(float **)(puVar3[2] + (puVar3[3] - 1 & uVar10) * 4); iVar4 = *(int *)(puVar3[2] + (puVar3[3] - 1 & uVar10) * 4); local_148.x = (float)local_c4 * *(float *)(iVar4 + 0x34) + pfVar6[1]; @@ -1221,7 +1221,7 @@ LAB_004345ff: umbilical_rope_force (&ropeForce,&midPosX,&midVelX,ropePointCount,(float *)local_c8,(float)local_ec) ; - local_c0 = (Entity_Projectile *)((int)local_c0 + 1); + local_c0 = (Entity_Projectile *)(GHIDRA_INT(local_c0) + 1); pVVar5[0xd].y = *ropePointCount; pVVar5[0xe].x = ropePointCount[1]; pVVar5[0xe].y = ropePointCount[2]; @@ -1260,7 +1260,7 @@ LAB_004345ff: (ropePointCount[0x17] + ropePointCount[0x17] + ropePointCount[0x14] + ropePointCount[0x1a] + ropePointCount[0x1a] + ropePointCount[0x1d]) * (float)local_c4 + ropePointCount[5]; - } while (uVar11 < (uint)puVar3[5]); + } while (uVar11 < GHIDRA_UINT(puVar3[5])); } ropePointCount = *(float **)(puVar3[2] + (puVar3[3] - 1 & puVar3[4]) * 4); *ropePointCount = local_d0; @@ -1285,15 +1285,15 @@ LAB_004345ff: } ropePointCount = *ppfVar7; if (fVar15 != 1.0) { - fVar16 = auVar17._0_4_; - auVar17._4_8_ = auVar17._4_8_; - auVar17._0_4_ = fVar16 / ((fVar15 + fVar16) - fVar15 * fVar16); + fVar16 = (*(undefined4 *)((char *)&(auVar17) + 0x0)); + (*(undefined8 *)((char *)&(auVar17) + 0x4)) = (*(undefined8 *)((char *)&(auVar17) + 0x4)); + (*(undefined4 *)((char *)&(auVar17) + 0x0)) = fVar16 / ((fVar15 + fVar16) - fVar15 * fVar16); } fVar16 = fVar15 * (float)ropePointCount * (float)local_114 * 0.2 + - auVar17._0_4_ * (baby->_velocity).x; + (*(undefined4 *)((char *)&(auVar17) + 0x0)) * (baby->_velocity).x; (baby->_velocity).x = fVar16; (baby->_velocity).y = - auVar17._0_4_ * (baby->_velocity).y + + (*(undefined4 *)((char *)&(auVar17) + 0x0)) * (baby->_velocity).y + fVar15 * (float)ropePointCount * (float)local_e4 * 0.2; if (local_f8 == (Vector *)0xffffffff) { if (baby->_isNotCountedAsFollower != 0) goto LAB_00433767; @@ -1354,7 +1354,7 @@ void Entity_Familiar::set_extra_data(void *extraDataPtr, void *extraData) local_8 = 0xffffffff; puStack_c = &LAB_00af0d44; local_10 = ExceptionList; - stackCookie = __security_cookie ^ (int)register0x00000010 - 4U; + stackCookie = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; extraDataRef = operator_new(0x18); local_8 = 0; @@ -1449,11 +1449,11 @@ void Entity_Familiar::WispInit() } } if ((this->_variant == 0xce) && ((local_58 == (float *)0x203 || (local_58 == (float *)0x1ea)))) { - this->_wispCollectibleType = (int)local_58; + this->_wispCollectibleType = GHIDRA_INT(local_58); local_58 = (float *)GetRandomWisp(&this->_dropRNG); - this->_subtype = (int)local_58; + this->_subtype = GHIDRA_INT(local_58); } - wispSubtype = (uint)local_58; + wispSubtype = GHIDRA_UINT(local_58); if (local_58 < 0x1e5) { if (local_58 == (float *)0x1e4) goto switchD_00436422_caseD_6f; if (0x121 < local_58) { @@ -1513,7 +1513,7 @@ switchD_00436422_caseD_6f: case (float *)0x2d9: goto switchD_00436422_caseD_6f; case (float *)0x22d: - playerFlagWord = (uint *)((int)this->_player + 0x1574); + playerFlagWord = (uint *)(GHIDRA_INT(this->_player) + 0x1574); *playerFlagWord = *playerFlagWord | 0x400; *(undefined1 *)((char *)this->_player + 0x1518) = 1; break; @@ -1529,9 +1529,9 @@ switchD_00436422_caseD_11a: wispsByAge = (int *)0x0; wispsByAgeSize = 0; wispsByAge = operator_new(0x18); - *wispsByAge = (int)wispsByAge; - wispsByAge[1] = (int)wispsByAge; - wispsByAge[2] = (int)wispsByAge; + *wispsByAge = GHIDRA_INT(wispsByAge); + wispsByAge[1] = GHIDRA_INT(wispsByAge); + wispsByAge[2] = GHIDRA_INT(wispsByAge); *(undefined2 *)(wispsByAge + 3) = 0x101; local_14 = 0; i = (EntityPtr)0x0; @@ -1539,18 +1539,18 @@ switchD_00436422_caseD_11a: game = g_game; if (local_54[0x499] != (EntityPtr)0x0) { do { - fVar8 = *(float *)((int)local_54[0x497] + (int)i * 4); + fVar8 = *(float *)(GHIDRA_INT(local_54[0x497]) + GHIDRA_INT(i) * 4); if ((((fVar8 != 0.0) && (*(int *)((char *)fVar8 + 0x28) == 3)) && (*(int *)((char *)fVar8 + 0x2c) == 0xce)) && ((*(void **)((char *)fVar8 + 0x410) == this->_player && (*(uint *)((char *)fVar8 + 0x30) == wispSubtype)))) { local_7c.x = (float)(*(int *)((char *)fVar8 + 0x328) - game->_frameCount); local_7c.y = fVar8; - FUN_0043ed20((int)&local_6c + 4,&local_7c); + FUN_0043ed20(GHIDRA_INT(&local_6c) + 4,&local_7c); game = g_game; } - i = (EntityPtr)((int)i + 1); - } while ((uint)i < (uint)local_54[0x499]); + i = (EntityPtr)(GHIDRA_INT(i) + 1); + } while (GHIDRA_UINT(i) < GHIDRA_UINT(local_54[0x499])); } if (5 < wispsByAgeSize) { do { @@ -1574,7 +1574,7 @@ switchD_00436422_caseD_11a: pvVar6 = std_tree_extract(&wispsByAge,node); operator_delete(pvVar6,0x18); } while (5 < wispsByAgeSize); - wispSubtype = (uint)local_58; + wispSubtype = GHIDRA_UINT(local_58); } local_14 = 0xffffffff; FID_conflict__Erase_tree_>_> @@ -1726,7 +1726,7 @@ LAB_0043680d: uVar7 = uVar7 << 0xb ^ uVar7; uVar7 = uVar7 >> 0x13 ^ uVar7; local_54 = (EntityPtr *) - ((float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283062e-10); if (uVar7 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -1738,7 +1738,7 @@ LAB_0043680d: uVar7 = uVar7 << 0xb ^ uVar7; uVar7 = uVar7 >> 0x13 ^ uVar7; local_54 = (EntityPtr *) - ((((float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + ((((float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283062e-10 + (float)local_54) - 1.0) * 0.2 + 0.8); if (uVar7 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -1750,7 +1750,7 @@ LAB_0043680d: uVar7 = uVar7 << 0xb ^ uVar7; uVar7 = uVar7 >> 0x13 ^ uVar7; hsv_to_rgb(&local_90, - (float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283062e-10 * 360.0,(float)local_54,0.8,1.0); wispColor._tint[0] = local_90._red * 2.0; wispColor._offset[0] = 0.0; @@ -1785,7 +1785,7 @@ LAB_0043680d: rngShift3 = (byte)local_58; uVar7 = uVar7 >> (rngShift3 & 0x1f) ^ uVar7; local_54 = (EntityPtr *) - ((float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283062e-10); if (uVar7 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -1797,7 +1797,7 @@ LAB_0043680d: uVar7 = uVar7 << (rngShift2 & 0x1f) ^ uVar7; uVar7 = uVar7 >> (rngShift3 & 0x1f) ^ uVar7; local_54 = (EntityPtr *) - ((((float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + ((((float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283062e-10 + (float)local_54) - 1.0) * 0.2 + 0.8); if (uVar7 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -1809,7 +1809,7 @@ LAB_0043680d: uVar7 = uVar7 << (rngShift2 & 0x1f) ^ uVar7; uVar7 = uVar7 >> (rngShift3 & 0x1f) ^ uVar7; rgbColor = hsv_to_rgb(&local_90, - (float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)] + (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)] ) * 2.3283062e-10 * 360.0,(float)local_54,0.8,1.0); wispColor._offset[0] = 0.0; wispColor._offset[1] = 0.0; @@ -1915,7 +1915,7 @@ undefined4 Entity_Familiar::wisp_kill() uStack_14 = 0xffffffff; puStack_18 = &LAB_00af21fd; local_1c = ExceptionList; - uVar7 = __security_cookie ^ (uint)(auStack_34 + 0x24); + uVar7 = __security_cookie ^ GHIDRA_UINT((auStack_34 + 0x24)); ExceptionList = &local_1c; if (this->_variant == 0xed) { iVar17 = this->_wispCollectibleType; @@ -1958,7 +1958,7 @@ undefined4 Entity_Familiar::wisp_kill() uVar12 = 0x115; } spawned = ((Game *)(g_game))->Game::Spawn(uVar12,0,(Vector *)VStack_94.y,&g_vectorZero, - (Entity *)VStack_88.y,0,(uint)apEStack_74[0]); + (Entity *)VStack_88.y,0,GHIDRA_UINT(apEStack_74[0])); if ((spawned == (Entity *)0x0) || (((*(int *)&g_game->_deathmatchManager < 2 || (spawned->_type != 1)) && (0x3dd < spawned->_type - 10U)))) { @@ -1986,7 +1986,7 @@ undefined4 Entity_Familiar::wisp_kill() room = g_game->_room; pVVar8 = MusicManager::RandomVector((Vector *)(auStack_34 + 8)); uVar7 = Random(); - fVar14 = (float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + fVar14 = (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 * 80.0 + 40.0; VStack_88.y = fVar14 * pVVar8->y + (uStack_64->_pos).y; VStack_88.x = fVar14 * pVVar8->x + (uStack_64->_pos).x; @@ -2015,7 +2015,7 @@ undefined4 Entity_Familiar::wisp_kill() ((float)(iVar17 + -1) * *(float *)((char *)EVar9 + 8) + *(float *)((char *)EVar9 + 4)); do { laser = Entity_Laser::ShootAngle - (1,&this->_pos,(float)(int)VStack_6c.y * 90.0,0x14,&this->_posOffset, + (1,&this->_pos,(float)GHIDRA_INT(VStack_6c.y) * 90.0,0x14,&this->_posOffset, (Entity *)this,0); laser->_disableFollowParent = 1; (**(code **)(*(int *)laser + 0x40)) @@ -2023,8 +2023,8 @@ undefined4 Entity_Familiar::wisp_kill() laser->_scale = 0.5; ((Entity_Laser *)(laser))->Entity_Laser::ResetSpriteScale(); laser->Update(); - VStack_6c.y = (float)((int)VStack_6c.y + 1); - } while ((int)VStack_6c.y < 4); + VStack_6c.y = (float)(GHIDRA_INT(VStack_6c.y) + 1); + } while (GHIDRA_INT(VStack_6c.y) < 4); break; case (Entity_Player *)0x127: uVar7 = ((RNG *)(&this->_dropRNG))->RNG::RandomInt(10); @@ -2039,13 +2039,13 @@ LAB_0043785e: break; case (Entity_Player *)0x15c: EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)auStack_80,3,-1,-1,1 + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)auStack_80,3,-1,-1,1 ,0); uVar7 = 0; uStack_14 = 2; if (apEStack_74[0] != (Entity_Player *)0x0) { do { - if (*(void **)(*(int *)(auStack_80._4_4_ + uVar7 * 4) + 0x410) == this->_player) { + if (*(void **)(*(int *)((*(undefined4 *)((char *)&(auStack_80) + 0x4)) + uVar7 * 4) + 0x410) == this->_player) { farting_baby_fart(); } uVar7 = uVar7 + 1; @@ -2072,13 +2072,13 @@ LAB_0043785e: ((Game *)(g_game))->Game::Fart(pVVar8,160.0,this->_player,0.5,0,color_00); Game::ButterBeanFart(g_game,pVVar8,200.0,this->_player,0,0); EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)auStack_34,pVVar8, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)auStack_34,pVVar8, 180.0,8); uVar7 = 0; uStack_14 = 0; if (queryCount != (undefined1 *)0x0) { do { - apEStack_74[0] = *(Entity_Player **)(auStack_34._4_4_ + uVar7 * 4); + apEStack_74[0] = *(Entity_Player **)((*(undefined4 *)((char *)&(auStack_34) + 0x4)) + uVar7 * 4); bVar6 = ((Entity *)((Entity *)apEStack_74[0]))->Entity::IsVulnerableEnemy((Entity *)0x0); if (bVar6 != 0) { ((EntityRef *)((EntityRef *)(auStack_60 + 4)))->EntityRef::constructor(this->_player); @@ -2094,16 +2094,16 @@ LAB_0043785e: if (DAT_00c7e83c == '\0') { DAT_00c7e83c = 1; EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)auStack_34,3,0xce, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)auStack_34,3,0xce, 0x160,0,0); uStack_14 = 1; VStack_6c.y = 0.0; if (queryCount != (undefined1 *)0x0) { - uVar11 = auStack_34._4_4_; + uVar11 = (*(undefined4 *)((char *)&(auStack_34) + 0x4)); do { - queriedEnemy = *(int **)(uVar11 + (int)VStack_6c.y * 4); + queriedEnemy = *(int **)(uVar11 + GHIDRA_INT(VStack_6c.y) * 4); if (*(char *)((char *)queriedEnemy + 0x173) == '\0') { - auStack_60._4_4_ = 0.0; + (*(undefined4 *)((char *)&(auStack_60) + 0x4)) = 0.0; fStack_58 = 0.0; fStack_48 = g_vectorZero.y; fStack_40 = g_vectorZero.y; @@ -2116,7 +2116,7 @@ LAB_0043785e: (**(code **)(*queriedEnemy + 0x24))(auStack_60 + 4); } VStack_6c.y = (float)&(*(undefined1 *)((char *)(((Entity_Familiar *)VStack_6c.y)) + 0x1)); - } while ((uint)VStack_6c.y < queryCount); + } while (GHIDRA_UINT(VStack_6c.y) < queryCount); this = uStack_64; } DAT_00c7e83c = '\0'; @@ -2125,10 +2125,10 @@ LAB_0043785e: } break; case (Entity_Player *)0x17f: - Entity_Player::UseActiveItem(this->_player,(short *)((int)&uStack_64 + 2),0x17f,9,-1,0); + Entity_Player::UseActiveItem(this->_player,(short *)(GHIDRA_INT(&uStack_64) + 2),0x17f,9,-1,0); uVar7 = Random(); uStack_64 = (Entity_Familiar *)0x0; - VStack_88.y = (float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + VStack_88.y = (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 * 360.0 - 180.0; do { pEVar10 = this->_player; @@ -2157,7 +2157,7 @@ LAB_0043785e: Game::CharmFart(&this->_pos,80.0,(Entity *)this); break; case (Entity_Player *)0x1b5: - Entity_Player::UseActiveItem(this->_player,(short *)((int)&uStack_64 + 2),0x1b5,9,-1,0); + Entity_Player::UseActiveItem(this->_player,(short *)(GHIDRA_INT(&uStack_64) + 2),0x1b5,9,-1,0); pEVar10 = (Entity_Player *)this->_subtype; goto code_r0x00437e10; case (Entity_Player *)0x1de: @@ -2215,18 +2215,18 @@ LAB_0043785e: uVar12 = ((RNG *)(&this->_dropRNG))->RNG::RandomInt(2); if (uVar12 == 0) { EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)auStack_34,3, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)auStack_34,3, 0xce,-1,0,0); uVar7 = 0; uStack_14 = 3; if (queryCount != (undefined1 *)0x0) { do { - if (*(char *)(*(int *)(auStack_34._4_4_ + uVar7 * 4) + 0x173) == '\0') { + if (*(char *)(*(int *)((*(undefined4 *)((char *)&(auStack_34) + 0x4)) + uVar7 * 4) + 0x173) == '\0') { pEVar10 = this->_player; - auStack_80._8_4_ = (pEVar10->_pos).x; + (*(undefined4 *)((char *)&(auStack_80) + 0x8)) = (pEVar10->_pos).x; apEStack_74[0] = (Entity_Player *)(pEVar10->_pos).y; Entity_Player::AddWisp - (pEVar10,*(int *)(*(int *)(auStack_34._4_4_ + uVar7 * 4) + 0x30), + (pEVar10,*(int *)(*(int *)((*(undefined4 *)((char *)&(auStack_34) + 0x4)) + uVar7 * 4) + 0x30), (Vector *)(auStack_80 + 8),0,0); } uVar7 = uVar7 + 1; @@ -2235,13 +2235,13 @@ LAB_0043785e: } else { EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)auStack_34,3, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)auStack_34,3, 0xce,-1,0,0); uStack_14 = 4; if (queryCount != (undefined1 *)0x0) { uVar12 = 0; do { - auStack_60._4_4_ = 0.0; + (*(undefined4 *)((char *)&(auStack_60) + 0x4)) = 0.0; fStack_58 = 0.0; fStack_54 = 0.0; fStack_48 = g_vectorZero.y; @@ -2251,7 +2251,7 @@ LAB_0043785e: fStack_44 = g_vectorZero.x; fStack_3c = 0.0; fStack_38 = 0.0; - (**(code **)(**(int **)(auStack_34._4_4_ + uVar12 * 4) + 0x24)) + (**(code **)(**(int **)((*(undefined4 *)((char *)&(auStack_34) + 0x4)) + uVar12 * 4) + 0x24)) (auStack_60 + 4,uVar7); uVar12 = uVar12 + 1; } while (uVar12 < queryCount); @@ -2291,7 +2291,7 @@ code_r0x00437e10: } switch(pEVar10) { case (Entity_Player *)0x23: - Entity_Player::UseActiveItem(this->_player,(short *)((int)&uStack_64 + 2),0x23,9,-1,0); + Entity_Player::UseActiveItem(this->_player,(short *)(GHIDRA_INT(&uStack_64) + 2),0x23,9,-1,0); break; case (Entity_Player *)0x25: case (Entity_Player *)0x41: @@ -2310,19 +2310,19 @@ code_r0x00437e10: uVar7 = 3; } spawned = ((Game *)(g_game))->Game::Spawn(4,uVar7,&uStack_64->_pos,&VStack_6c,(Entity *)VStack_88.y,0, - (uint)VStack_94.y); + GHIDRA_UINT(VStack_94.y)); ((Entity_Player *)(this->_player))->Entity_Player::GetBombFlags((BitSet128 *)auStack_80,0); if (this->_subtype == 0x25) { - auStack_80._4_4_ = auStack_80._4_4_ | g_tearFlagHoming._l._4_4_; - auStack_80._8_4_ = auStack_80._8_4_ | (uint)g_tearFlagHoming._h; - auStack_80._0_4_ = auStack_80._0_4_ | (uint)g_tearFlagHoming._l; - apEStack_74[0] = (Entity_Player *)((uint)apEStack_74[0] | g_tearFlagHoming._h._4_4_); + (*(undefined4 *)((char *)&(auStack_80) + 0x4)) = (*(undefined4 *)((char *)&(auStack_80) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagHoming._l) + 0x4)); + (*(undefined4 *)((char *)&(auStack_80) + 0x8)) = (*(undefined4 *)((char *)&(auStack_80) + 0x8)) | GHIDRA_UINT(g_tearFlagHoming._h); + (*(undefined4 *)((char *)&(auStack_80) + 0x0)) = (*(undefined4 *)((char *)&(auStack_80) + 0x0)) | GHIDRA_UINT(g_tearFlagHoming._l); + apEStack_74[0] = (Entity_Player *)(GHIDRA_UINT(apEStack_74[0]) | (*(undefined4 *)((char *)&(g_tearFlagHoming._h) + 0x4))); } spawned[1]._sprite._filename._buf[0xb] = '\x01'; - spawned[1]._type = auStack_80._0_4_; - spawned[1]._variant = auStack_80._4_4_; - spawned[1]._subtype = auStack_80._8_4_; - spawned[1]._spawnerType = (int)apEStack_74[0]; + spawned[1]._type = (*(undefined4 *)((char *)&(auStack_80) + 0x0)); + spawned[1]._variant = (*(undefined4 *)((char *)&(auStack_80) + 0x4)); + spawned[1]._subtype = (*(undefined4 *)((char *)&(auStack_80) + 0x8)); + spawned[1]._spawnerType = GHIDRA_INT(apEStack_74[0]); if (this->_subtype == 0x25) { spawned[1]._collisionIndex = 0x3f266666; *(undefined4 *)&(*(undefined1 *)((char *)&(spawned[1]) + 0x3c)) = 0x3f400000; @@ -2330,13 +2330,13 @@ code_r0x00437e10: (spawned->_posOffset).x = 0.0; (spawned->_posOffset).y = -3.0; spawned[1]._damageEvents._end = - (void *)(-3.0 - (float)((double)(int)uVar7 + - __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * 2.3283064e-10 * + (void *)(-3.0 - (float)((double)GHIDRA_INT(uVar7) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 * 5.0); } - uVar11 = *(undefined4 *)((int)&spawned->_flags + 4); - *(uint *)&spawned->_flags = (uint)spawned->_flags | 0x4000000; - *(undefined4 *)((int)&spawned->_flags + 4) = uVar11; + uVar11 = *(undefined4 *)(GHIDRA_INT(&spawned->_flags) + 4); + *(uint *)&spawned->_flags = GHIDRA_UINT(spawned->_flags) | 0x4000000; + *(undefined4 *)(GHIDRA_INT(&spawned->_flags) + 4) = uVar11; spawned->Update(); break; case (Entity_Player *)0x28: @@ -2360,24 +2360,24 @@ code_r0x00437e10: break; case (Entity_Player *)0x42: pvVar2 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar2 & 0xfffffffcU) < 0x109) + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar2) & 0xfffffffcU)) < 0x109) { - auStack_34._0_4_ = 0; + (*(undefined4 *)((char *)&(auStack_34) + 0x0)) = 0; } else { - auStack_34._0_4_ = *(uint *)((char *)pvVar2 + 0x108); + (*(undefined4 *)((char *)&(auStack_34) + 0x0)) = *(uint *)((char *)pvVar2 + 0x108); } queryCount = (undefined1 *)0x0; - auStack_34._4_4_ = 0; - auStack_34._8_4_ = 0x5a; - ((TemporaryEffects *)((TemporaryEffects *)((int)g_game->_room + 0x7310)))->TemporaryEffects::AddEffect(auStack_34,1,1); + (*(undefined4 *)((char *)&(auStack_34) + 0x4)) = 0; + (*(undefined4 *)((char *)&(auStack_34) + 0x8)) = 0x5a; + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(g_game->_room) + 0x7310)))->TemporaryEffects::AddEffect(auStack_34,1,1); manager = g_manager; fVar14 = ((Room *)(g_game->_room))->Room::time_scale_update(); (manager->_musicManager)._targetPitch = fVar14; break; case (Entity_Player *)0x4e: TemporaryEffects::AddCollectibleEffect - ((TemporaryEffects *)((int)this->_player + 0x1508),0x20e,1,1); + ((TemporaryEffects *)(GHIDRA_INT(this->_player) + 0x1508),0x20e,1,1); uVar7 = Random(); spawned = ((Game *)(g_game))->Game::Spawn(3,0x7a,&this->_pos,&g_vectorZero,this->_player,0,uVar7); if ((spawned == (Entity *)0x0) || (spawned->_type != 3)) { @@ -2390,7 +2390,7 @@ code_r0x00437e10: seed_fart_sound_override(&uStack_64); pEVar13 = uStack_64; code_r0x00437295: - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)pEVar13,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(pEVar13),1.0,2,0,1.0,0.0); break; case (Entity_Player *)0x55: uVar7 = ((RNG *)(&this->_dropRNG))->RNG::Next(); @@ -2423,7 +2423,7 @@ code_r0x00437295: *(undefined4 *)(iVar17 + 0xd88) = 0xf; pVVar8 = MusicManager::RandomVector((Vector *)(auStack_34 + 8)); uVar7 = Random(); - fVar15 = (float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + fVar15 = (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10; fVar14 = pVVar8->y; fVar1 = pVVar8->x; @@ -2441,9 +2441,9 @@ code_r0x00437295: bVar6 = 0; LAB_004372ff: queryCount = &DAT_00000007; - auStack_34._4_4_ = 5; - auStack_34._8_4_ = 9; - auStack_34._0_4_ = uVar7; + (*(undefined4 *)((char *)&(auStack_34) + 0x4)) = 5; + (*(undefined4 *)((char *)&(auStack_34) + 0x8)) = 9; + (*(undefined4 *)((char *)&(auStack_34) + 0x0)) = uVar7; uVar7 = lua_callback_run_get_card((RNG *)auStack_34,iVar17,bVar6,bVar18,isOnlyRunes); uVar12 = ((RNG *)(&uStack_64->_dropRNG))->RNG::Next(); pVVar8 = Room::FindFreePickupSpawnPosition @@ -2461,7 +2461,7 @@ LAB_004372a0: std::vector::_Emplace_reallocate(itemListEnd,apEStack_74); } else { - *itemListEnd = (uint)pEVar10; + *itemListEnd = GHIDRA_UINT(pEVar10); *(int *)((char *)pvVar2 + 0x1de0) = *(int *)((char *)pvVar2 + 0x1de0) + 4; } } @@ -2471,7 +2471,7 @@ LAB_004372a0: spawnedColor = &(spawned->_sprite)._color; (spawned->_posOffset).y = -6.0; if (0.0 < *(float *)((char *)wispConfig + 0x110) || *(float *)((char *)wispConfig + 0x110) == 0.0) { - if (spawnedColor != (ColorMod *)((int)wispConfig + 0x104)) { + if (spawnedColor != (ColorMod *)(GHIDRA_INT(wispConfig) + 0x104)) { fVar14 = *(float *)((char *)wispConfig + 0x108); fVar1 = *(float *)((char *)wispConfig + 0x10c); fVar15 = *(float *)((char *)wispConfig + 0x110); @@ -2507,7 +2507,7 @@ LAB_004372a0: (spawned->_sprite)._color._colorize[1] = layer1Color._colorize[1]; (spawned->_sprite)._color._colorize[2] = layer1Color._colorize[2]; (spawned->_sprite)._color._colorize[3] = layer1Color._colorize[3]; - *(undefined8 *)(spawned->_sprite)._color._offset = layer1Color._offset._0_8_; + *(undefined8 *)(spawned->_sprite)._color._offset = (*(undefined8 *)((char *)&(layer1Color._offset) + 0x0)); LAB_00438335: (spawned->_sprite)._color._offset[2] = layer1Color._offset[2]; } @@ -2518,7 +2518,7 @@ LAB_00438335: spawnedColor = &(spawned->_sprite)._color; (spawned->_posOffset).y = -6.0; if (0.0 < *(float *)((char *)wispConfig + 0x13c) || *(float *)((char *)wispConfig + 0x13c) == 0.0) { - if (spawnedColor == (ColorMod *)((int)wispConfig + 0x130)) goto LAB_0043842f; + if (spawnedColor == (ColorMod *)(GHIDRA_INT(wispConfig) + 0x130)) goto LAB_0043842f; fVar14 = *(float *)((char *)wispConfig + 0x134); fVar1 = *(float *)((char *)wispConfig + 0x138); fVar15 = *(float *)((char *)wispConfig + 0x13c); @@ -2552,14 +2552,14 @@ LAB_00438335: (spawned->_sprite)._color._colorize[1] = layer0Color._colorize[1]; (spawned->_sprite)._color._colorize[2] = layer0Color._colorize[2]; (spawned->_sprite)._color._colorize[3] = layer0Color._colorize[3]; - *(undefined8 *)(spawned->_sprite)._color._offset = layer0Color._offset._0_8_; + *(undefined8 *)(spawned->_sprite)._color._offset = (*(undefined8 *)((char *)&(layer0Color._offset) + 0x0)); } (spawned->_sprite)._color._offset[2] = layer0Color._offset[2]; LAB_0043842f: manager = g_manager; wispConfig = (void *)0x105; seed_fart_sound_override((int *)&wispConfig); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)wispConfig,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(wispConfig),1.0,2,0,1.0,0.0); ExceptionList = local_1c; return 1; } @@ -2620,7 +2620,7 @@ Entity_Tear * Entity_Familiar::fire_wisp_projectile(Vector velocity) float local_14; RNG *dropRng; - local_14 = (float)(__security_cookie ^ (uint)((&tmpColor)[1]._tint + 1)); + local_14 = (float)(__security_cookie ^ GHIDRA_UINT(((&tmpColor)[1]._tint + 1))); if (dropRng->_variant == 0xed) { iVar5 = dropRng->_wispCollectibleType; } @@ -2667,7 +2667,7 @@ LAB_00438842: PlayShootAnim(dropRng,iVar5); return (Entity_Tear *)0x0; } - PlayShootAnim(dropRng,(uint)(0.0 <= local_84) * 2 + 1); + PlayShootAnim(dropRng,GHIDRA_UINT((0.0 <= local_84)) * 2 + 1); return (Entity_Tear *)0x0; } if (iVar5 == 0x10011) { @@ -2837,10 +2837,10 @@ LAB_00438842: local_a0 = (EntityPtr *) ((float)(iVar5 + -1) * *(float *)((char *)pvVar4 + 8) + *(float *)((char *)pvVar4 + 4)); uVar6 = Random(); - tearStats = (float *)((int)pvVar4 + 0x60); + tearStats = (float *)(GHIDRA_INT(pvVar4) + 0x60); if (*(float *)((char *)pvVar4 + 0xa8) <= - (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * 2.3283064e-10) { - tearStats = (float *)((int)pvVar4 + 0x18); + (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10) { + tearStats = (float *)(GHIDRA_INT(pvVar4) + 0x18); } tearDamage = *(float *)&(*(undefined1 *)((char *)(dropRng) + 0xf30)) * *tearStats * *(float *)&(*(undefined1 *)((char *)(dropRng) + 0xf34)) * (float)local_a0; @@ -2850,14 +2850,14 @@ LAB_00438842: spectralFlags = BitSet128::operator_or ((BitSet128 *)&local_e0,&g_tearFlagSpectral,(BitSet128 *)(tearStats + 0xe)); - local_a4 = (uint)spectralFlags->_l; - local_98._l._4_4_ = *(uint *)((int)&spectralFlags->_l + 4); - local_98._h._0_4_ = (uint)spectralFlags->_h; - local_98._h._4_4_ = *(uint *)((int)&spectralFlags->_h + 4); - local_98._l._0_4_ = local_a4; - local_80 = local_98._l._4_4_; - local_7c = (float)(uint)local_98._h; - local_70 = (Entity *)local_98._h._4_4_; + local_a4 = GHIDRA_UINT(spectralFlags->_l); + (*(undefined4 *)((char *)&(local_98._l) + 0x4)) = *(uint *)(GHIDRA_INT(&spectralFlags->_l) + 4); + (*(undefined4 *)((char *)&(local_98._h) + 0x0)) = GHIDRA_UINT(spectralFlags->_h); + (*(undefined4 *)((char *)&(local_98._h) + 0x4)) = *(uint *)(GHIDRA_INT(&spectralFlags->_h) + 4); + (*(undefined4 *)((char *)&(local_98._l) + 0x0)) = local_a4; + local_80 = (*(undefined4 *)((char *)&(local_98._l) + 0x4)); + local_7c = (float)GHIDRA_UINT(local_98._h); + local_70 = (*(undefined4 *)((char *)&((Entity *)local_98._h) + 0x4)); ((Color *)(&tearColor))->Color::operator_assign((ColorMod *)(tearStats + 3)); local_a0 = (EntityPtr *)tearStats[2]; velocity.x = velocity.x * *(float *)((char *)local_b0 + 0xc); @@ -2930,7 +2930,7 @@ LAB_00438842: case 0x26: uVar6 = Random(); local_a0 = (EntityPtr *) - (((float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + (((float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 40.0 - 20.0) * 0.017453292); local_ac = cos((float)local_a0); fVar8 = sin((float)local_a0); @@ -2941,14 +2941,14 @@ LAB_00438842: case 0x28: uVar6 = Random(); local_a8 = (EntityPtr *) - ((float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 + 1.0 + 0.0); break; case 0x2a: fallingAccel = 0.6; uVar6 = Random(); local_a8 = (EntityPtr *) - (0.0 - ((float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) + (0.0 - ((float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 + 5.0)); break; case 0x2f: @@ -2964,7 +2964,7 @@ LAB_00438842: local_c4 = (Entity_Familiar *)(dropRng->_pos).x; fVar8 = (dropRng->_pos).y; fallingAccel = 1.2; - fVar10 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar10 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10; scratchVec.y = fVar10 * vecResult->y * 120.0 + local_ac; local_b8.y = fVar10 * vecResult->x * 120.0 + (float)local_a0; @@ -2985,11 +2985,11 @@ LAB_00438842: local_a8 = (EntityPtr *)((15.0 / fVar8) * (float)local_a0); } } - local_98._l._0_4_ = local_a4 | (uint)g_tearFlagExplosive._l; + (*(undefined4 *)((char *)&(local_98._l) + 0x0)) = local_a4 | GHIDRA_UINT(g_tearFlagExplosive._l); tearDamage = tearDamage * 4.0 + 8.0; - local_98._l._4_4_ = local_80 | g_tearFlagExplosive._l._4_4_; - local_98._h._0_4_ = (uint)local_7c | (uint)g_tearFlagExplosive._h; - local_98._h._4_4_ = (uint)local_70 | g_tearFlagExplosive._h._4_4_; + (*(undefined4 *)((char *)&(local_98._l) + 0x4)) = local_80 | (*(undefined4 *)((char *)&(g_tearFlagExplosive._l) + 0x4)); + (*(undefined4 *)((char *)&(local_98._h) + 0x0)) = GHIDRA_UINT(local_7c) | GHIDRA_UINT(g_tearFlagExplosive._h); + (*(undefined4 *)((char *)&(local_98._h) + 0x4)) = GHIDRA_UINT(local_70) | (*(undefined4 *)((char *)&(g_tearFlagExplosive._h) + 0x4)); tearScale = tearScale * 1.5; velocity.x = (float)local_a8; velocity.y = (float)local_b0; @@ -3050,32 +3050,32 @@ switchD_00438fa0_caseD_4d: tmpColor._offset[2] = tmpColor._offset[2] * 0.25; ((Color *)(&tearColor))->Color::operator_assign(&tmpColor); uVar6 = Random(); - if ((float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + if ((float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 < 0.15) { switch(dropRng->_coins) { case 1: - local_98._l._0_4_ = local_a4 | (uint)g_tearFlagPoison._l; - local_98._l._4_4_ = local_80 | g_tearFlagPoison._l._4_4_; - local_98._h._0_4_ = (uint)local_7c | (uint)g_tearFlagPoison._h; - local_98._h._4_4_ = (uint)local_70 | g_tearFlagPoison._h._4_4_; + (*(undefined4 *)((char *)&(local_98._l) + 0x0)) = local_a4 | GHIDRA_UINT(g_tearFlagPoison._l); + (*(undefined4 *)((char *)&(local_98._l) + 0x4)) = local_80 | (*(undefined4 *)((char *)&(g_tearFlagPoison._l) + 0x4)); + (*(undefined4 *)((char *)&(local_98._h) + 0x0)) = GHIDRA_UINT(local_7c) | GHIDRA_UINT(g_tearFlagPoison._h); + (*(undefined4 *)((char *)&(local_98._h) + 0x4)) = GHIDRA_UINT(local_70) | (*(undefined4 *)((char *)&(g_tearFlagPoison._h) + 0x4)); break; case 2: - local_98._l._0_4_ = local_a4 | (uint)g_tearFlagFreeze._l; - local_98._l._4_4_ = local_80 | g_tearFlagFreeze._l._4_4_; - local_98._h._0_4_ = (uint)local_7c | (uint)g_tearFlagFreeze._h; - local_98._h._4_4_ = (uint)local_70 | g_tearFlagFreeze._h._4_4_; + (*(undefined4 *)((char *)&(local_98._l) + 0x0)) = local_a4 | GHIDRA_UINT(g_tearFlagFreeze._l); + (*(undefined4 *)((char *)&(local_98._l) + 0x4)) = local_80 | (*(undefined4 *)((char *)&(g_tearFlagFreeze._l) + 0x4)); + (*(undefined4 *)((char *)&(local_98._h) + 0x0)) = GHIDRA_UINT(local_7c) | GHIDRA_UINT(g_tearFlagFreeze._h); + (*(undefined4 *)((char *)&(local_98._h) + 0x4)) = GHIDRA_UINT(local_70) | (*(undefined4 *)((char *)&(g_tearFlagFreeze._h) + 0x4)); break; case 3: - local_98._l._0_4_ = local_a4 | (uint)g_tearFlagConfusion._l; - local_98._l._4_4_ = local_80 | g_tearFlagConfusion._l._4_4_; - local_98._h._0_4_ = (uint)local_7c | (uint)g_tearFlagConfusion._h; - local_98._h._4_4_ = (uint)local_70 | g_tearFlagConfusion._h._4_4_; + (*(undefined4 *)((char *)&(local_98._l) + 0x0)) = local_a4 | GHIDRA_UINT(g_tearFlagConfusion._l); + (*(undefined4 *)((char *)&(local_98._l) + 0x4)) = local_80 | (*(undefined4 *)((char *)&(g_tearFlagConfusion._l) + 0x4)); + (*(undefined4 *)((char *)&(local_98._h) + 0x0)) = GHIDRA_UINT(local_7c) | GHIDRA_UINT(g_tearFlagConfusion._h); + (*(undefined4 *)((char *)&(local_98._h) + 0x4)) = GHIDRA_UINT(local_70) | (*(undefined4 *)((char *)&(g_tearFlagConfusion._h) + 0x4)); break; case 4: - local_98._l._0_4_ = local_a4 | (uint)g_tearFlagBurn._l; - local_98._l._4_4_ = local_80 | g_tearFlagBurn._l._4_4_; - local_98._h._0_4_ = (uint)local_7c | (uint)g_tearFlagBurn._h; - local_98._h._4_4_ = (uint)local_70 | g_tearFlagBurn._h._4_4_; + (*(undefined4 *)((char *)&(local_98._l) + 0x0)) = local_a4 | GHIDRA_UINT(g_tearFlagBurn._l); + (*(undefined4 *)((char *)&(local_98._l) + 0x4)) = local_80 | (*(undefined4 *)((char *)&(g_tearFlagBurn._l) + 0x4)); + (*(undefined4 *)((char *)&(local_98._h) + 0x0)) = GHIDRA_UINT(local_7c) | GHIDRA_UINT(g_tearFlagBurn._h); + (*(undefined4 *)((char *)&(local_98._h) + 0x4)) = GHIDRA_UINT(local_70) | (*(undefined4 *)((char *)&(g_tearFlagBurn._h) + 0x4)); break; case 5: dropRng = &dropRng->_dropRNG; @@ -3088,7 +3088,7 @@ switchD_00438fa0_caseD_4d: scratchVec.y = scratchVec.x * vecResult->y; scratchVec.x = scratchVec.x * vecResult->x; laser = ((Game *)(g_game))->Game::Spawn(4,3,&local_c4->_pos,&scratchVec,(Entity *)0x0,0, - (uint)local_b8.y); + GHIDRA_UINT(local_b8.y)); laser->Update(); } } @@ -3099,10 +3099,10 @@ switchD_00438fa0_caseD_4d: local_e0._shift1 = 2; local_e0._shift2 = 0x15; familiar_wisp_pick_tear_color(&local_e0,(int *)&local_a0,&local_98); - local_98._l._0_4_ = (uint)local_98._l | (uint)g_tearFlagSpectral._l; - local_98._l._4_4_ = local_98._l._4_4_ | g_tearFlagSpectral._l._4_4_; - local_98._h._0_4_ = (uint)local_98._h | (uint)g_tearFlagSpectral._h; - local_98._h._4_4_ = local_98._h._4_4_ | g_tearFlagSpectral._h._4_4_; + (*(undefined4 *)((char *)&(local_98._l) + 0x0)) = GHIDRA_UINT(local_98._l) | GHIDRA_UINT(g_tearFlagSpectral._l); + (*(undefined4 *)((char *)&(local_98._l) + 0x4)) = (*(undefined4 *)((char *)&(local_98._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagSpectral._l) + 0x4)); + (*(undefined4 *)((char *)&(local_98._h) + 0x0)) = GHIDRA_UINT(local_98._h) | GHIDRA_UINT(g_tearFlagSpectral._h); + (*(undefined4 *)((char *)&(local_98._h) + 0x4)) = (*(undefined4 *)((char *)&(local_98._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagSpectral._h) + 0x4)); scratchVec.y = ((RNG *)(&local_e0))->RNG::RandomFloat(); tearDamage = (scratchVec.y * 0.4 + 0.8) * tearDamage; fVar8 = ((RNG *)(&local_e0))->RNG::RandomFloat(); @@ -3139,9 +3139,9 @@ switchD_00438fa0_caseD_4d: if (uVar6 == 0x246) { pvVar4 = dropRng->_player; iVar5 = TemporaryEffects::GetCollectibleEffectNum - ((TemporaryEffects *)((int)pvVar4 + 0x1508),0x246); + ((TemporaryEffects *)(GHIDRA_INT(pvVar4) + 0x1508),0x246); scratchVec.y = (float)iVar5 * 0.75; - iVar5 = ((TemporaryEffects *)((TemporaryEffects *)((int)pvVar4 + 0x1508)))->TemporaryEffects::GetNullEffectNum(0x47); + iVar5 = ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(pvVar4) + 0x1508)))->TemporaryEffects::GetNullEffectNum(0x47); local_84 = (float)iVar5 * 0.3 + scratchVec.y + local_84; fVar8 = sqrtf(local_84); tearScale = fVar8 * 0.23 + local_84 * 0.01 + 0.55; @@ -3156,7 +3156,7 @@ switchD_00438fa0_caseD_4d: LAB_00439c27: vecResult = MusicManager::RandomVector(&scratchVec); uVar6 = Random(); - fVar8 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar8 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10; fVar10 = fVar8 * vecResult->y; fVar8 = fVar8 * vecResult->x; @@ -3164,17 +3164,17 @@ LAB_00439c27: velocity.x = fVar8 + fVar8 + velocity.x; uVar6 = Random(); fallingAccel = 0.5; - fVar8 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar8 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 0.5 + 0.25; velocity.y = fVar8 * velocity.y; velocity.x = fVar8 * velocity.x; uVar6 = Random(); rngResult = Random(); - tearScale = ((float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) + tearScale = ((float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 0.05 + ((float)(uVar6 & 1) + 0.0) * 0.4 + 0.9) * tearScale; uVar6 = Random(); local_a8 = (EntityPtr *) - (0.0 - ((float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + (0.0 - ((float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 15.0 + 5.0)); goto switchD_00438fa0_caseD_27; } @@ -3204,17 +3204,17 @@ LAB_00439c27: uVar6 = Random(); switch(uVar6 % 9) { case 1: - local_98._l._0_4_ = local_a4 | (uint)g_tearFlagBurn._l; - local_98._l._4_4_ = local_80 | g_tearFlagBurn._l._4_4_; - local_98._h._0_4_ = (uint)local_7c | (uint)g_tearFlagBurn._h; - local_98._h._4_4_ = (uint)local_70 | g_tearFlagBurn._h._4_4_; + (*(undefined4 *)((char *)&(local_98._l) + 0x0)) = local_a4 | GHIDRA_UINT(g_tearFlagBurn._l); + (*(undefined4 *)((char *)&(local_98._l) + 0x4)) = local_80 | (*(undefined4 *)((char *)&(g_tearFlagBurn._l) + 0x4)); + (*(undefined4 *)((char *)&(local_98._h) + 0x0)) = GHIDRA_UINT(local_7c) | GHIDRA_UINT(g_tearFlagBurn._h); + (*(undefined4 *)((char *)&(local_98._h) + 0x4)) = GHIDRA_UINT(local_70) | (*(undefined4 *)((char *)&(g_tearFlagBurn._h) + 0x4)); local_9c = (EntityPtr *)0x5; break; case 2: - local_98._l._0_4_ = local_a4 | (uint)g_tearFlagCharm._l; - local_98._l._4_4_ = local_80 | g_tearFlagCharm._l._4_4_; - local_98._h._0_4_ = (uint)local_7c | (uint)g_tearFlagCharm._h; - local_98._h._4_4_ = (uint)local_70 | g_tearFlagCharm._h._4_4_; + (*(undefined4 *)((char *)&(local_98._l) + 0x0)) = local_a4 | GHIDRA_UINT(g_tearFlagCharm._l); + (*(undefined4 *)((char *)&(local_98._l) + 0x4)) = local_80 | (*(undefined4 *)((char *)&(g_tearFlagCharm._l) + 0x4)); + (*(undefined4 *)((char *)&(local_98._h) + 0x0)) = GHIDRA_UINT(local_7c) | GHIDRA_UINT(g_tearFlagCharm._h); + (*(undefined4 *)((char *)&(local_98._h) + 0x4)) = GHIDRA_UINT(local_70) | (*(undefined4 *)((char *)&(g_tearFlagCharm._h) + 0x4)); tearColor._tint[0] = 1.0; tearColor._tint[1] = 0.0; tearColor._tint[2] = 1.0; @@ -3224,20 +3224,20 @@ LAB_00439c27: tearColor._offset[2] = 0.0; break; case 3: - local_98._l._0_4_ = local_a4 | (uint)g_tearFlagConfusion._l; - local_98._l._4_4_ = local_80 | g_tearFlagConfusion._l._4_4_; - local_98._h._0_4_ = (uint)local_7c | (uint)g_tearFlagConfusion._h; - local_98._h._4_4_ = (uint)local_70 | g_tearFlagConfusion._h._4_4_; + (*(undefined4 *)((char *)&(local_98._l) + 0x0)) = local_a4 | GHIDRA_UINT(g_tearFlagConfusion._l); + (*(undefined4 *)((char *)&(local_98._l) + 0x4)) = local_80 | (*(undefined4 *)((char *)&(g_tearFlagConfusion._l) + 0x4)); + (*(undefined4 *)((char *)&(local_98._h) + 0x0)) = GHIDRA_UINT(local_7c) | GHIDRA_UINT(g_tearFlagConfusion._h); + (*(undefined4 *)((char *)&(local_98._h) + 0x4)) = GHIDRA_UINT(local_70) | (*(undefined4 *)((char *)&(g_tearFlagConfusion._h) + 0x4)); tearColor._tint[0] = 0.5; tearColor._tint[1] = 0.5; tearColor._tint[2] = 0.5; tearColor._tint[3] = 1.0; break; case 4: - local_98._l._0_4_ = local_a4 | (uint)g_tearFlagFear._l; - local_98._l._4_4_ = local_80 | g_tearFlagFear._l._4_4_; - local_98._h._0_4_ = (uint)local_7c | (uint)g_tearFlagFear._h; - local_98._h._4_4_ = (uint)local_70 | g_tearFlagFear._h._4_4_; + (*(undefined4 *)((char *)&(local_98._l) + 0x0)) = local_a4 | GHIDRA_UINT(g_tearFlagFear._l); + (*(undefined4 *)((char *)&(local_98._l) + 0x4)) = local_80 | (*(undefined4 *)((char *)&(g_tearFlagFear._l) + 0x4)); + (*(undefined4 *)((char *)&(local_98._h) + 0x0)) = GHIDRA_UINT(local_7c) | GHIDRA_UINT(g_tearFlagFear._h); + (*(undefined4 *)((char *)&(local_98._h) + 0x4)) = GHIDRA_UINT(local_70) | (*(undefined4 *)((char *)&(g_tearFlagFear._h) + 0x4)); tearColor._tint[0] = 1.0; tearColor._tint[1] = 1.0; tearColor._tint[2] = 0.455; @@ -3250,34 +3250,34 @@ LAB_00439c27: tearColor._tint[0] = 1.25; tearColor._tint[1] = 0.05; tearColor._tint[2] = 0.15; - local_98._h._4_4_ = g_tearFlagFreeze._h._4_4_; - local_98._l._0_4_ = (uint)g_tearFlagFreeze._l; - local_98._l._4_4_ = g_tearFlagFreeze._l._4_4_; - local_98._h._0_4_ = (uint)g_tearFlagFreeze._h; + (*(undefined4 *)((char *)&(local_98._h) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagFreeze._h) + 0x4)); + (*(undefined4 *)((char *)&(local_98._l) + 0x0)) = GHIDRA_UINT(g_tearFlagFreeze._l); + (*(undefined4 *)((char *)&(local_98._l) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagFreeze._l) + 0x4)); + (*(undefined4 *)((char *)&(local_98._h) + 0x0)) = GHIDRA_UINT(g_tearFlagFreeze._h); goto LAB_00439f99; case 6: tearColor._tint[0] = 0.4; tearColor._tint[1] = 0.97; tearColor._tint[2] = 0.5; - local_98._h._4_4_ = g_tearFlagPoison._h._4_4_; - local_98._l._0_4_ = (uint)g_tearFlagPoison._l; - local_98._l._4_4_ = g_tearFlagPoison._l._4_4_; - local_98._h._0_4_ = (uint)g_tearFlagPoison._h; + (*(undefined4 *)((char *)&(local_98._h) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagPoison._h) + 0x4)); + (*(undefined4 *)((char *)&(local_98._l) + 0x0)) = GHIDRA_UINT(g_tearFlagPoison._l); + (*(undefined4 *)((char *)&(local_98._l) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagPoison._l) + 0x4)); + (*(undefined4 *)((char *)&(local_98._h) + 0x0)) = GHIDRA_UINT(g_tearFlagPoison._h); LAB_00439f99: - local_98._h._0_4_ = (uint)local_7c | (uint)local_98._h; - local_98._l._4_4_ = local_80 | local_98._l._4_4_; - local_98._l._0_4_ = local_a4 | (uint)local_98._l; - local_98._h._4_4_ = (uint)local_70 | local_98._h._4_4_; + (*(undefined4 *)((char *)&(local_98._h) + 0x0)) = GHIDRA_UINT(local_7c) | GHIDRA_UINT(local_98._h); + (*(undefined4 *)((char *)&(local_98._l) + 0x4)) = local_80 | (*(undefined4 *)((char *)&(local_98._l) + 0x4)); + (*(undefined4 *)((char *)&(local_98._l) + 0x0)) = local_a4 | GHIDRA_UINT(local_98._l); + (*(undefined4 *)((char *)&(local_98._h) + 0x4)) = GHIDRA_UINT(local_70) | (*(undefined4 *)((char *)&(local_98._h) + 0x4)); tearColor._tint[3] = 1.0; tearColor._offset[0] = 0.0; tearColor._offset[1] = 0.0; tearColor._offset[2] = 0.0; break; case 7: - local_98._l._0_4_ = local_a4 | (uint)g_tearFlagSlow._l; - local_98._l._4_4_ = local_80 | g_tearFlagSlow._l._4_4_; - local_98._h._0_4_ = (uint)local_7c | (uint)g_tearFlagSlow._h; - local_98._h._4_4_ = (uint)local_70 | g_tearFlagSlow._h._4_4_; + (*(undefined4 *)((char *)&(local_98._l) + 0x0)) = local_a4 | GHIDRA_UINT(g_tearFlagSlow._l); + (*(undefined4 *)((char *)&(local_98._l) + 0x4)) = local_80 | (*(undefined4 *)((char *)&(g_tearFlagSlow._l) + 0x4)); + (*(undefined4 *)((char *)&(local_98._h) + 0x0)) = GHIDRA_UINT(local_7c) | GHIDRA_UINT(g_tearFlagSlow._h); + (*(undefined4 *)((char *)&(local_98._h) + 0x4)) = GHIDRA_UINT(local_70) | (*(undefined4 *)((char *)&(g_tearFlagSlow._h) + 0x4)); tearColor._tint[0] = 2.0; tearColor._tint[1] = 2.0; tearColor._tint[2] = 2.0; @@ -3287,10 +3287,10 @@ LAB_00439f99: tearColor._offset[2] = 0.19607845; break; case 8: - local_98._l._0_4_ = local_a4 | (uint)g_tearFlagShrink._l; - local_98._l._4_4_ = local_80 | g_tearFlagShrink._l._4_4_; - local_98._h._0_4_ = (uint)local_7c | (uint)g_tearFlagShrink._h; - local_98._h._4_4_ = (uint)local_70 | g_tearFlagShrink._h._4_4_; + (*(undefined4 *)((char *)&(local_98._l) + 0x0)) = local_a4 | GHIDRA_UINT(g_tearFlagShrink._l); + (*(undefined4 *)((char *)&(local_98._l) + 0x4)) = local_80 | (*(undefined4 *)((char *)&(g_tearFlagShrink._l) + 0x4)); + (*(undefined4 *)((char *)&(local_98._h) + 0x0)) = GHIDRA_UINT(local_7c) | GHIDRA_UINT(g_tearFlagShrink._h); + (*(undefined4 *)((char *)&(local_98._h) + 0x4)) = GHIDRA_UINT(local_70) | (*(undefined4 *)((char *)&(g_tearFlagShrink._h) + 0x4)); tearColor._colorize[0] = 0.3; tearColor._colorize[1] = 0.4; tearColor._colorize[2] = 1.0; @@ -3309,17 +3309,17 @@ switchD_00438fa0_caseD_27: scratchVec.x = (float)local_70 + (dropRng->_pos).x; scratchVec.y = local_7c + (dropRng->_pos).y; shot = (Entity_Tear *) - ((Game *)(g_game))->Game::Spawn(2,(uint)local_9c,&scratchVec,&velocity,(Entity *)dropRng,0,uVar6); + ((Game *)(g_game))->Game::Spawn(2,GHIDRA_UINT(local_9c),&scratchVec,&velocity,(Entity *)dropRng,0,uVar6); uVar6 = Random(); shot->_fallingSpeed = - (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * 2.3283064e-10 + (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 0.2 + (float)local_a8; shot->_fallingAccel = fallingAccel; shot->SetCollisionDamage(tearDamage * local_84); - flags._l._4_4_ = local_98._l._4_4_; - flags._l._0_4_ = (uint)local_98._l; - flags._h._0_4_ = (uint)local_98._h; - flags._h._4_4_ = local_98._h._4_4_; + (*(undefined4 *)((char *)&(flags._l) + 0x4)) = (*(undefined4 *)((char *)&(local_98._l) + 0x4)); + (*(undefined4 *)((char *)&(flags._l) + 0x0)) = GHIDRA_UINT(local_98._l); + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = GHIDRA_UINT(local_98._h); + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = (*(undefined4 *)((char *)&(local_98._h) + 0x4)); ((Entity_Tear *)(shot))->Entity_Tear::SetTearFlags(flags); ((Entity_Tear *)(shot))->Entity_Tear::SetScale(tearScale); ((Entity *)((Entity *)shot))->Entity::SetParent((Entity *)dropRng); @@ -3337,17 +3337,17 @@ switchD_00438fa0_caseD_27: scratchVec.x = (float)local_70 + (dropRng->_pos).x; scratchVec.y = local_7c + (dropRng->_pos).y; shot = (Entity_Tear *) - ((Game *)(g_game))->Game::Spawn(2,(uint)local_9c,&scratchVec,&velocity,(Entity *)dropRng,0,uVar6); + ((Game *)(g_game))->Game::Spawn(2,GHIDRA_UINT(local_9c),&scratchVec,&velocity,(Entity *)dropRng,0,uVar6); uVar6 = Random(); shot->_fallingSpeed = - (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * 2.3283064e-10 * + (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 0.2 + (float)local_a8; shot->_fallingAccel = fallingAccel; shot->SetCollisionDamage(tearDamage * local_84); - flags_00._l._4_4_ = local_98._l._4_4_; - flags_00._l._0_4_ = (uint)local_98._l; - flags_00._h._0_4_ = (uint)local_98._h; - flags_00._h._4_4_ = local_98._h._4_4_; + (*(undefined4 *)((char *)&(flags_00._l) + 0x4)) = (*(undefined4 *)((char *)&(local_98._l) + 0x4)); + (*(undefined4 *)((char *)&(flags_00._l) + 0x0)) = GHIDRA_UINT(local_98._l); + (*(undefined4 *)((char *)&(flags_00._h) + 0x0)) = GHIDRA_UINT(local_98._h); + (*(undefined4 *)((char *)&(flags_00._h) + 0x4)) = (*(undefined4 *)((char *)&(local_98._h) + 0x4)); ((Entity_Tear *)(shot))->Entity_Tear::SetTearFlags(flags_00); ((Entity_Tear *)(shot))->Entity_Tear::SetScale(tearScale); ((Entity *)((Entity *)shot))->Entity::SetParent((Entity *)dropRng); @@ -3416,7 +3416,7 @@ undefined4 Entity_Familiar::wisp_take_damage(float *param_2, uint *param_3, int std::multiset::insert(parentSlot); } spawnedEffect->SetCollisionDamage(0x41400000); - local_3c = (Entity_Familiar *)((uint)g_vectorOne.x ^ 0x80000000); + local_3c = (Entity_Familiar *)(GHIDRA_UINT(g_vectorOne.x) ^ 0x80000000); local_38 = (EntityPtr)-g_vectorOne.y; ((Entity *)((Entity *)spawnedEffect))->Entity::SetSize(80.0, (Vector)(CONCAT44(g_vectorOne.y,g_vectorOne.x) ^ 0x8000000080000000),-1); @@ -3459,14 +3459,14 @@ undefined4 Entity_Familiar::wisp_take_damage(float *param_2, uint *param_3, int else { uVar4 = 2; } - local_3c = (Entity_Familiar *)(*(uint *)((int)&this->_flags + 4) & 0x400000); + local_3c = (Entity_Familiar *)(*(uint *)(GHIDRA_INT(&this->_flags) + 4) & 0x400000); if (local_3c == (Entity_Familiar *)0x0) { uVar3 = 0; } else { uVar3 = 4; } - selfRef._flags = uVar3 | uVar4 | (uint)((this->_flags & 0x100) != 0); + selfRef._flags = uVar3 | uVar4 | GHIDRA_UINT(((this->_flags & 0x100) != 0)); selfRef._entity = this; ((Entity *)((Entity *)fearTarget))->Entity::AddFear(&selfRef,2,0); bVar1 = ((Entity *)((Entity *)fearTarget))->Entity::HasEntityFlags(0x800); @@ -3521,7 +3521,7 @@ undefined4 Entity_Familiar::wisp_take_damage(float *param_2, uint *param_3, int if (bVar6) { local_3c = (Entity_Familiar *)0xed; seed_fart_sound_override((int *)&local_3c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_3c,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_3c),1.0,2,0,1.0,0.0); } } pEVar5 = ((EntityRef *)(&selfRef))->EntityRef::EntityRef(); @@ -3676,7 +3676,7 @@ void Entity_Familiar::ai_wisp() ehState = -NAN; puStack_c = &LAB_00af2261; prevExceptionList = ExceptionList; - uVar6 = __security_cookie ^ (uint)(&lemonadeSplatColor)[1]._offset; + uVar6 = __security_cookie ^ GHIDRA_UINT((&lemonadeSplatColor)[1]._offset); ExceptionList = &prevExceptionList; if (this->_variant == 0xed) { iVar10 = this->_wispCollectibleType; @@ -3690,8 +3690,8 @@ void Entity_Familiar::ai_wisp() local_1b4 = (Room *)this; stackCookie = uVar6; local_1c8 = (EntityPtr)ItemConfig::get_wisp_config(iVar10); - isFiring = *(char *)&((Vector *)((int)local_1c8 + 0x10))->y; - updateSteps = (int)this->_updateTime - (int)this->_prevUpdateTime; + isFiring = *(char *)&((Vector *)(GHIDRA_INT(local_1c8) + 0x10))->y; + updateSteps = GHIDRA_INT(this->_updateTime) - GHIDRA_INT(this->_prevUpdateTime); if ((this->_variant == 0xce) && (this->_subtype == 0x28a)) { EVar9 = this->_target; if ((EVar9 == (EntityPtr)0x0) || @@ -3851,7 +3851,7 @@ LAB_0043ac23: local_1cc = 0.0; local_1c4 = 0.0; this->_collisionDamage = (float)local_1bc; - local_1d0 = (float)(int)((Vector *)((int)local_1c8 + 0x10))->x; + local_1d0 = (float)GHIDRA_INT(((Vector *)(GHIDRA_INT(local_1c8) + 0x10))->x); if (this->_variant != 0xce) goto LAB_0043cdfe; uVar6 = this->_subtype; if (uVar6 < 299) { @@ -3872,14 +3872,14 @@ LAB_0043bfef: bVar5 == 0)) { local_1c0 = (Entity *)0x3e99999a; local_1bc = (Entity *)0x3f333333; - local_1b4 = (Room *)(((float)((uint)((g_game->_frameCount - this->_spawnFrame) + - this->_initSeed) % 0x3c) + 0.0) / 60.0); + local_1b4 = (Room *)(((float)(GHIDRA_UINT(((g_game->_frameCount - this->_spawnFrame) + + this->_initSeed)) % 0x3c) + 0.0) / 60.0); } else { local_1c0 = local_1e0; local_1bc = local_1e0; - local_1b4 = (Room *)(((float)((uint)((g_game->_frameCount - this->_spawnFrame) + - this->_initSeed) % 0x1e) + 0.0) / 30.0); + local_1b4 = (Room *)(((float)(GHIDRA_UINT(((g_game->_frameCount - this->_spawnFrame) + + this->_initSeed)) % 0x1e) + 0.0) / 30.0); } hsv_to_rgb(&primaryHueColor,(float)local_1b4 * 360.0,(float)local_1c0,(float)local_1bc,1.0); ::((Color *)(&rainbowPrimaryColor))->Color::Color(); @@ -3935,13 +3935,13 @@ LAB_0043bfef: ((TemporaryEffects *)(&player->_temporaryeffects))->TemporaryEffects::GetCollectibleEffect(0x28); if ((player->_dead == 0) && (local_1c8 != (EntityPtr)0x0)) { pvVar1 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar1 >> 2 < 0x29) { + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar1) >> 2 < 0x29) { iVar10 = 0; } else { iVar10 = *(int *)((char *)pvVar1 + 0xa0); } - if (((std_multiset *)((int)local_1c8 + 8))->_head == + if (((std_multiset *)(GHIDRA_INT(local_1c8) + 8))->_head == (void *)(*(int *)(iVar10 + 0x78) + -1)) { local_1b4 = (Room *)((this->_pos).x - (player->_pos).x); local_1bc = (Entity *)((this->_pos).y - (player->_pos).y); @@ -4102,8 +4102,8 @@ LAB_0043c942: uVar6 = Random(); splat = Entity_NPC::MakeSplat ((Entity_NPC *)this, - (float)((double)(int)uVar6 + - __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * 2.3283064e-10 + (float)((double)GHIDRA_INT(uVar6) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 0.5 + 0.2); orbitDistance = MusicManager::RandomVector(&lemonSplatOffset); lemonSplatColor._offset[0] = 0.7843138; @@ -4157,7 +4157,7 @@ code_r0x0043bfeb: break; case 0x66: if (g_game->_frameCount == this->_spawnFrame) { - if ((0 < this->_coins) && ((uint)this->_coins < 7)) { + if ((0 < this->_coins) && (GHIDRA_UINT(this->_coins) < 7)) { local_1c0 = (Entity *)((Seeds *)(&g_game->_seedEffects))->Seeds::GetStartSeed(); if (local_1c0 != pERam00c7e838) { uRam00c7e820 = 0; @@ -4177,18 +4177,18 @@ code_r0x0043bfeb: (*pcVar2)(); return; } - uVar6 = (uint)pEVar8 >> 2 ^ (uint)pEVar8; + uVar6 = GHIDRA_UINT(pEVar8) >> 2 ^ GHIDRA_UINT(pEVar8); uVar6 = uVar6 << 9 ^ uVar6; pEVar8 = (Entity *)(uVar6 >> 0xf ^ uVar6); - if (6U - (int)local_1bc == 0) { + if (6U - GHIDRA_INT(local_1bc) == 0) { uVar6 = 0; } else { - uVar6 = (uint)pEVar8 % (6U - (int)local_1bc); + uVar6 = GHIDRA_UINT(pEVar8) % (6U - GHIDRA_INT(local_1bc)); } - swapValue = *(undefined4 *)((int)local_1bc * 4 + 0xc7e820); - iVar10 = (int)(&(local_1bc->_sprite)._filename + -3) + uVar6; - *(undefined4 *)((int)local_1bc * 4 + 0xc7e820) = + swapValue = *(undefined4 *)(GHIDRA_INT(local_1bc) * 4 + 0xc7e820); + iVar10 = GHIDRA_INT((&(local_1bc->_sprite)._filename + -3)) + uVar6; + *(undefined4 *)(GHIDRA_INT(local_1bc) * 4 + 0xc7e820) = *(undefined4 *)(iVar10 * 4 + 0xc7e820); local_1bc = (Entity *)&(*(undefined1 *)((char *)(local_1bc) + 0x1)); *(undefined4 *)(iVar10 * 4 + 0xc7e820) = swapValue; @@ -4227,7 +4227,7 @@ code_r0x0043bfeb: } if (((-1 < cooldown) && (this->_isInvicible != 0)) && (orbitDistance = - GetOrbitPosition(this,&ponyOrbitPos,(Vector *)((int)this->_player + 0x33c)), + GetOrbitPosition(this,&ponyOrbitPos,(Vector *)(GHIDRA_INT(this->_player) + 0x33c)), fVar12 = (this->_pos).x - orbitDistance->x, fVar16 = (this->_pos).y - orbitDistance->y, fVar16 * fVar16 + fVar12 * fVar12 < 50.0)) { this->_isInvicible = 0; @@ -4275,17 +4275,17 @@ code_r0x0043bfeb: case 0xaf: local_1b4 = g_game->_room; local_1bc = (Entity *)((Room *)(local_1b4))->Room::GetGridIndex(&this->_pos); - if ((-1 < (int)local_1bc) && ((int)local_1bc < 0x1c0)) { - local_1c8 = (EntityPtr)((Room *)(local_1b4))->Room::GetGridCollision((int)local_1bc); - pickup = local_1b4->_gridEntities[(int)local_1bc]; + if ((-1 < GHIDRA_INT(local_1bc)) && (GHIDRA_INT(local_1bc) < 0x1c0)) { + local_1c8 = (EntityPtr)((Room *)(local_1b4))->Room::GetGridCollision(GHIDRA_INT(local_1bc)); + pickup = local_1b4->_gridEntities[GHIDRA_INT(local_1bc)]; if (pickup != (GridEntity_Door *)0x0) { iVar10 = (pickup->_desc)._type; if (iVar10 == 0x10) { if ((((local_1c8 == (EntityPtr)&DAT_00000004) && (bVar5 = ((GridEntity_Door *)(pickup))->GridEntity_Door::IsLocked(), bVar5 != 0)) && - ((local_1b4->_gridEntities[(int)local_1bc]->_doorFlags & 1) == 0)) && + ((local_1b4->_gridEntities[GHIDRA_INT(local_1bc)]->_doorFlags & 1) == 0)) && (bVar5 = GridEntity_Door::TryUnlock - (local_1b4->_gridEntities[(int)local_1bc],player,1), bVar5 != 0) + (local_1b4->_gridEntities[GHIDRA_INT(local_1bc)],player,1), bVar5 != 0) ) { killSource = &doorUnlockKillSource; goto LAB_0043bc25; @@ -4427,8 +4427,8 @@ LAB_0043cc72: uVar6 = Random(); splat = Entity_NPC::MakeSplat ((Entity_NPC *)this, - (float)((double)(int)uVar6 + - __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * 2.3283064e-10 * + (float)((double)GHIDRA_INT(uVar6) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 0.5 + 0.2); orbitDistance = MusicManager::RandomVector(&lemonadeSplatOffset); lemonadeSplatColor._offset[0] = 0.7843138; @@ -4485,7 +4485,7 @@ LAB_0043cc72: case 0x196: ((RNG *)(&rng))->RNG::game_constructor((this->_dropRNG)._seed,0xd); uVar6 = ((RNG *)(&rng))->RNG::RandomInt(5); - local_1d0 = (float)((int)local_1d0 + -2 + uVar6); + local_1d0 = (float)(GHIDRA_INT(local_1d0) + -2 + uVar6); break; case 0x1a3: goto LAB_0043c942; @@ -4502,7 +4502,7 @@ LAB_0043cc72: if (EVar9 == (EntityPtr)0x0) { if (this->_orbitLayer < 0) { this->_friction = 0.9; - orbitDistance = GetOrbitDistance(&layerOrbitDistance,(int)local_1c8); + orbitDistance = GetOrbitDistance(&layerOrbitDistance,GHIDRA_INT(local_1c8)); local_1b4 = (Room *)(this->_pos).x; local_1bc = (Entity *)(this->_pos).y; fVar12 = (float)local_1b4 - *(float *)((char *)this->_player + 0x33c); @@ -4516,14 +4516,14 @@ LAB_0043cc72: ((Entity *)((Entity *)this))->Entity::AddVelocity_divided(orbitDistance,bVar5); } else { - AddToOrbit(this,(int)local_1c8); + AddToOrbit(this,GHIDRA_INT(local_1c8)); } } else { this->_friction = 1.0; } EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),&nearbyEnemies,&this->_pos,100.0,8); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&nearbyEnemies,&this->_pos,100.0,8); uVar6 = 0; ehState = 5.60519e-45; if (nearbyEnemies._size == 0) { @@ -4550,7 +4550,7 @@ LAB_0043c7c6: goto LAB_0043c7c6; } uVar6 = uVar6 + 1; - } while (uVar6 < (uint)nearbyEnemies._size); + } while (uVar6 < GHIDRA_UINT(nearbyEnemies._size)); ehState = -NAN; ((EntityList_Query *)(&nearbyEnemies))->EntityList_Query::~EntityList_Query(); } @@ -4601,14 +4601,14 @@ LAB_0043c7c6: aimDirection.x = g_vectorZero.x; aimDirection.y = g_vectorZero.y; EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),nuggetTargets,(Vector *)local_1c8,150.0,8 + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),nuggetTargets,(Vector *)local_1c8,150.0,8 ); ehState = 4.2039e-45; local_1c0 = (Entity *)0x0; if ((undefined1 *)nuggetTargets[0]._size != (undefined1 *)0x0) { pEVar8 = (Entity *)0x0; do { - pEVar15 = *(Entity **)((int)nuggetTargets[0]._data + (int)local_1c0 * 4); + pEVar15 = *(Entity **)(GHIDRA_INT(nuggetTargets[0]._data) + GHIDRA_INT(local_1c0) * 4); bVar5 = ((Entity *)(pEVar15))->Entity::IsVulnerableEnemy((Entity *)0x0); if ((bVar5 != 0) && ((pEVar15->_flags & 0x20000010) == 0)) { enemyPos.y = (pEVar15->_pos).y; @@ -4621,7 +4621,7 @@ LAB_0043c7c6: } this = (Entity_Familiar *)local_1b4; local_1c0 = (Entity *)&(*(undefined1 *)((char *)(local_1c0) + 0x1)); - } while (local_1c0 < (uint)nuggetTargets[0]._size); + } while (local_1c0 < GHIDRA_UINT(nuggetTargets[0]._size)); local_1c0 = pEVar8; if (pEVar8 != (Entity *)0x0) { toEnemy.x = (pEVar8->_pos).x - ((Vector *)(local_1b4->_gridEntities + 0xc6))->x; @@ -4632,7 +4632,7 @@ LAB_0043c7c6: } } bVar5 = ((Vector *)(&aimDirection))->Vector::operator_ne(&g_vectorZero); - if ((bVar5 == 0) || ((float)(int)local_1d0 <= 0.0)) { + if ((bVar5 == 0) || ((float)GHIDRA_INT(local_1d0) <= 0.0)) { if ((-1 < ((Room *)this)->_gridPaths[0x179]) && (iVar10 = ((Room *)this)->_gridPaths[0x179] + -1, ((Room *)this)->_gridPaths[0x179] = iVar10, iVar10 < 0)) { @@ -4645,7 +4645,7 @@ LAB_0043c7c6: iVar10 = vector_to_direction(vec); if (((Room *)this)->_gridPaths[0x178] < 1) { FireProjectile(this,&aimDirection,0); - ((Room *)this)->_gridPaths[0x178] = (int)local_1d0; + ((Room *)this)->_gridPaths[0x178] = GHIDRA_INT(local_1d0); ((Room *)this)->_gridPaths[0x179] = 0xc; PlayShootAnim(this,iVar10); ((Room *)this)->_gridPaths[0x179] = ((Room *)this)->_gridPaths[0x179] + -1; @@ -4723,21 +4723,21 @@ LAB_0043ce03: manager = g_manager; uVar6 = ((Room *)this)->_gridPaths[0x178] & 0x80000003; bVar11 = uVar6 == 0; - if ((int)uVar6 < 0) { + if (GHIDRA_INT(uVar6) < 0) { bVar11 = (uVar6 - 1 | 0xfffffffc) == 0xffffffff; } if (bVar11) { local_1c0 = (Entity *)0xb9; seed_fart_sound_override((int *)&local_1c0); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_1c0,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_1c0),1.0,2,0,1.0,0.0); uVar6 = Random(); - fVar12 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar12 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 0.9; local_1c0 = (Entity *)(-local_1c4 * 5.0 * fVar12); local_1b4 = (Room *)(-local_1cc * 5.0 * fVar12); uVar6 = Random(); local_1dc = (EntityPtr *) - (((float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) + (((float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 60.0 - 30.0) * 0.017453292); local_1c8 = (EntityPtr)cos((float)local_1dc); fVar12 = sin((float)local_1dc); @@ -4747,7 +4747,7 @@ LAB_0043ce03: tearVelocity.y = (float)local_1c8 * (float)local_1b4 + fVar12 * (float)local_1c0; uVar6 = Random(); local_1dc = (EntityPtr *) - ((float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10); uVar6 = Random(); tear = (Entity_Tear *) @@ -4788,9 +4788,9 @@ LAB_0043ce03: if (0 < ((Room *)this)->_gridPaths[0x178]) { ((Room *)this)->_gridPaths[0x178] = ((Room *)this)->_gridPaths[0x178] + -1; } - local_1b4 = *(Room **)((int)((Room *)this)->_gridEntities[0xfb] + 0x162c); + local_1b4 = *(Room **)(GHIDRA_INT(((Room *)this)->_gridEntities[0xfb]) + 0x162c); if ((((local_1b4 == (Room *)0xffffffff) && (local_1d8 == g_vectorZero.x)) && - ((float)local_1d4 == g_vectorZero.y)) || ((float)(int)local_1d0 <= 0.0)) { + ((float)local_1d4 == g_vectorZero.y)) || ((float)GHIDRA_INT(local_1d0) <= 0.0)) { if (((Room *)this)->_gridPaths[0x179] < 0) { ExceptionList = prevExceptionList; return; @@ -4805,7 +4805,7 @@ LAB_0043ce03: ExceptionList = prevExceptionList; return; } - Isaac::GetAxisAlignedUnitVectorFromDir(&shotDirection,(int)local_1b4); + Isaac::GetAxisAlignedUnitVectorFromDir(&shotDirection,GHIDRA_INT(local_1b4)); TryAimAtMarkedTarget(this,&shotDirection,(int *)&local_1b4,(Vector *)0x0); if ((local_1d8 == g_vectorZero.x) && ((float)local_1d4 == g_vectorZero.y)) { local_1d4 = (Entity *)shotDirection.y; @@ -4829,15 +4829,15 @@ LAB_0043ce03: iVar10 = iVar10 + -1; } while (iVar10 != 0); } - ((Room *)this)->_gridPaths[0x178] = (int)local_1d0; + ((Room *)this)->_gridPaths[0x178] = GHIDRA_INT(local_1d0); ((Room *)this)->_gridPaths[0x179] = 0xc; } else if (((Room *)this)->_gridPaths[0x179] < 9) { - PlayFloatAnim(this,(int)local_1b4); + PlayFloatAnim(this,GHIDRA_INT(local_1b4)); ((Room *)this)->_gridPaths[0x179] = 8; goto LAB_0043d0b0; } - PlayShootAnim(this,(int)local_1b4); + PlayShootAnim(this,GHIDRA_INT(local_1b4)); ((Room *)this)->_gridPaths[0x179] = ((Room *)this)->_gridPaths[0x179] + -1; LAB_0043d0b0: if (((Room *)this)->_gridEntities[3] == (void *)0x31) { @@ -4883,7 +4883,7 @@ void Entity_Familiar::ai_mr_me_wisp() local_8 = 0xffffffff; puStack_c = &LAB_00af22cd; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar3 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; iVar5 = this->_keys; if (iVar5 == 0) { @@ -4911,14 +4911,14 @@ void Entity_Familiar::ai_mr_me_wisp() (this->_targetPosition).y = (float)(iVar5 / iVar1) * 40.0 + 120.0; } if (this->_keys == 0) { - EntityList::QuerySublist((EntityList *)((int)game->_room + 0x1218),&pickups,5,0x3c,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(game->_room) + 0x1218),&pickups,5,0x3c,-1,0,0); local_8 = 0; local_18 = 0.0; if (pickups._size != 0) { uVar3 = pickups._size; pvVar6 = pickups._data; do { - target = *(EntityPtr *)((char *)pvVar6 + (int)local_18 * 4); + target = *(EntityPtr *)((char *)pvVar6 + GHIDRA_INT(local_18) * 4); if (target != (EntityPtr)0x0) { if (*(int *)((char *)target + 0x28) == 5) { if (*(int *)((char *)target + 0x30) != 0) { @@ -4937,11 +4937,11 @@ void Entity_Familiar::ai_mr_me_wisp() } } } - local_18 = (float)((int)local_18 + 1); - } while ((uint)local_18 < uVar3); + local_18 = (float)(GHIDRA_INT(local_18) + 1); + } while (GHIDRA_UINT(local_18) < uVar3); } local_8 = 0xffffffff; - if (pickups._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(pickups) + 0x0)) == '\0') { local_8 = 1; tracked_alloc(1,pickups._data,0); local_8 = 0xffffffff; @@ -4949,7 +4949,7 @@ void Entity_Familiar::ai_mr_me_wisp() } iVar5 = this->_keys; if (iVar5 == 0) { - fVar4 = (float)((int)g_game->_room + 0x724); + fVar4 = (float)(GHIDRA_INT(g_game->_room) + 0x724); uVar3 = 0; local_18 = fVar4; do { @@ -4976,7 +4976,7 @@ void Entity_Familiar::ai_mr_me_wisp() } while (uVar3 < 8); iVar5 = this->_keys; if (iVar5 == 0) { - fVar4 = (float)((int)g_game->_room + 0x724); + fVar4 = (float)(GHIDRA_INT(g_game->_room) + 0x724); uVar3 = 0; local_18 = fVar4; do { @@ -4997,7 +4997,7 @@ void Entity_Familiar::ai_mr_me_wisp() if (*(int *)(iVar5 + 0x394) == g_game->_lastRoomIdx) { local_1c = g_manager->_netplayManager; if (((local_1c != *(NetplayManager *)(g_manager + 1)) && - (1 < (uint)((int)*(NetplayManager *)(g_manager + 1) - (int)local_1c >> 2)) + (1 < GHIDRA_UINT((GHIDRA_INT(*(NetplayManager *)(g_manager + 1)) - GHIDRA_INT(local_1c) >> 2))) ) && (*(uint *)(iVar5 + 0x154) < 0x1f)) goto LAB_0043df18; } local_14->_keys = 4; @@ -5047,11 +5047,11 @@ LAB_0043df18: pvVar6 = this->_player; local_1c = (NetplayManager)(*(short *)((char *)wispConfig + 0x18c) + 7); orbitLevelLow = local_1c; - if ((int)local_1c < 1) { + if (GHIDRA_INT(local_1c) < 1) { orbitLevelLow = (NetplayManager)0x0; } orbitLevel = (NetplayManager)0xa; - if ((int)orbitLevelLow < 10) { + if (GHIDRA_INT(orbitLevelLow) < 10) { orbitLevel = orbitLevelLow; } posY = (local_14->_pos).y; @@ -5059,7 +5059,7 @@ LAB_0043df18: fVar4 = posY - *(float *)((char *)pvVar6 + 0x340); dx = local_18 - *(float *)((char *)pvVar6 + 0x33c); fVar4 = sqrtf(fVar4 * fVar4 + dx * dx); - if ((float)(&DAT_00c34130)[(int)orbitLevel * 5] <= fVar4) { + if ((float)(&DAT_00c34130)[GHIDRA_INT(orbitLevel) * 5] <= fVar4) { local_1c = (NetplayManager)(*(float *)((char *)pvVar6 + 0x340) - posY); local_18 = *(float *)((char *)pvVar6 + 0x33c) - local_18; fVar4 = sqrtf((float)local_1c * (float)local_1c + local_18 * local_18); @@ -5073,7 +5073,7 @@ LAB_0043df18: ExceptionList = local_10; return; } - AddToOrbit(local_14,(int)local_1c); + AddToOrbit(local_14,GHIDRA_INT(local_1c)); ExceptionList = local_10; return; } @@ -5083,7 +5083,7 @@ LAB_0043df18: local_18 = (this->_targetPosition).x; fVar4 = (this->_targetPosition).y; if (target != (EntityPtr)0x0) { - local_18 = ((Vector *)((int)target + 0x33c))->x; + local_18 = ((Vector *)(GHIDRA_INT(target) + 0x33c))->x; fVar4 = *(float *)((char *)target + 0x340); } local_14 = (Entity_Familiar *)(fVar4 - (this->_pos).y); @@ -5103,7 +5103,7 @@ LAB_0043e26e: } } else if (iVar5 == 1) { - if ((((uint)this->_coins < 0x1c0) && + if (((GHIDRA_UINT(this->_coins) < 0x1c0) && (iVar5 = *(int *)((char *)g_game->_room + this->_coins * 4 + 0x24), iVar5 != 0)) && (*(int *)(iVar5 + 0xc) != 2)) { nearestPlayer = ((Game *)(g_game))->Game::GetNearestPlayer(pos); @@ -5179,7 +5179,7 @@ LAB_0043e460: this->_keys = 0; goto LAB_0043e46a; } - if (((0x1bf < (uint)this->_coins) || + if (((0x1bf < GHIDRA_UINT(this->_coins)) || (iVar1 = *(int *)((char *)g_game->_room + this->_coins * 4 + 0x24), iVar1 == 0)) || (*(int *)(iVar1 + 0xc) == 2)) { this->_keys = 0; @@ -5292,7 +5292,7 @@ void Entity_Familiar::ai_mega_blast_wisp() _DAT_00c5c554 = local_18.x * 7.0; awayDirY = local_18.y; DAT_00c5c558 = local_18.y * 5.0 - 18.0; - ((Vector *)((int)local_10.x + 0x34c))->x = _DAT_00c5c554; + ((Vector *)(GHIDRA_INT(local_10.x) + 0x34c))->x = _DAT_00c5c554; *(float *)((char *)local_10.x + 0x350) = DAT_00c5c558; *(int *)((char *)local_10.x + 0x458) = *(int *)((char *)this->_player + 0x18f4); (**(code **)(*(int *)local_10.x + 0xc))(); @@ -5369,7 +5369,7 @@ int Entity_Familiar::GetRandomWisp(RNG *rng) local_24 = (int *)0x0; local_20 = (int *)0x0; local_8 = 1; - itemsLeft = taggedItemsEnd - (int)taggedItemIt >> 2; + itemsLeft = taggedItemsEnd - GHIDRA_INT(taggedItemIt) >> 2; if (itemsLeft != 0) { if (0x3fffffff < itemsLeft) { /* WARNING: Subroutine does not return */ @@ -5398,7 +5398,7 @@ int Entity_Familiar::GetRandomWisp(RNG *rng) itemsLeft = 0; } pRVar2 = local_1c; - uVar4 = (int)wispItemsEnd - (int)wispItemsBegin >> 2; + uVar4 = GHIDRA_INT(wispItemsEnd) - GHIDRA_INT(wispItemsBegin) >> 2; wispItems = wispItemsBegin; if (uVar4 == 0) { wispItemId = 0x248; @@ -5421,12 +5421,12 @@ int Entity_Familiar::GetRandomWisp(RNG *rng) wispItemId = *(int *)(*(int *)((char *)wispItemsBegin + (nextSeed % uVar4) * 4) + 4); } if (wispItemsBegin != (void *)0x0) { - uVar4 = (int)wispItemsCapacityEnd - (int)wispItemsBegin & 0xfffffffc; + uVar4 = GHIDRA_INT(wispItemsCapacityEnd) - GHIDRA_INT(wispItemsBegin) & 0xfffffffc; pvVar3 = wispItemsBegin; if (0xfff < uVar4) { pvVar3 = *(void **)((char *)wispItemsBegin + -4); uVar4 = uVar4 + 0x23; - if (0x1f < (uint)((int)wispItemsBegin + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(wispItemsBegin) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -5466,7 +5466,7 @@ void Entity_Familiar::ai_buddy_inbox() int headState; EntityPtr parent; - securityCookie = (float)(__security_cookie ^ (uint)&(&projParams)[1].CircleAngle); + securityCookie = (float)(__security_cookie ^ GHIDRA_UINT(&(&projParams)[1].CircleAngle)); switch(this->_subtype) { case 0: backAnimOffset = 0; @@ -5476,13 +5476,13 @@ void Entity_Familiar::ai_buddy_inbox() } if (headState != 1) { if (headState == 2) { - ((ANM2 *)(&this->_sprite))->ANM2::Play(*(byte **)((int)&PTR_s_HeadFrontWiggleOpen_00b62994 + backAnimOffset),0); + ((ANM2 *)(&this->_sprite))->ANM2::Play(*(byte **)(GHIDRA_INT(&PTR_s_HeadFrontWiggleOpen_00b62994) + backAnimOffset),0); return; } - ((ANM2 *)(&this->_sprite))->ANM2::Play(*(byte **)((int)&PTR_s_HeadFrontWiggleClosed_00b6299c + backAnimOffset),0); + ((ANM2 *)(&this->_sprite))->ANM2::Play(*(byte **)(GHIDRA_INT(&PTR_s_HeadFrontWiggleClosed_00b6299c) + backAnimOffset),0); return; } - VStack_c0.y = *(float *)((int)&PTR_s_HeadFrontWiggleTransition_00b6298c + backAnimOffset); + VStack_c0.y = *(float *)(GHIDRA_INT(&PTR_s_HeadFrontWiggleTransition_00b6298c) + backAnimOffset); uVar8 = _string_holder_c_str(); pbVar5 = (byte *)uVar8; do { @@ -5492,7 +5492,7 @@ void Entity_Familiar::ai_buddy_inbox() isLess = bVar1 < *pbVar6; if (bVar1 != *pbVar6) { LAB_005ae518: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_005ae51d; } if (bVar1 == 0) break; @@ -5511,7 +5511,7 @@ LAB_005ae551: isLess = bVar1 < (byte)*pcVar7; if (bVar1 != *pcVar7) { LAB_005ae576: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_005ae57b; } if (bVar1 == 0) break; @@ -5534,7 +5534,7 @@ LAB_005ae57b: isLess = bVar1 < (byte)*pcVar7; if (bVar1 != *pcVar7) { LAB_005ae548: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_005ae54d; } if (bVar1 == 0) break; @@ -5675,12 +5675,12 @@ void Entity_Familiar::Constructor() (this->_hitList)._begin = (void *)0x0; (this->_hitList)._end = (void *)0x0; (this->_hitList)._capacity = (void *)0x0; - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; ((ANM2 *)(&this->_chargeBarSprite))->ANM2::constructor(); this->_extraData = (void *)0x0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xee4)) = 0; this->_sirenHelper = (EntityPtr)0x0; - local_8 = CONCAT31(local_8._1_3_,5); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),5); this->_sirenCharmFrames = 0; (this->_dirtColor)._tint[0] = 1.0; (this->_dirtColor)._tint[1] = 1.0; @@ -5856,10 +5856,10 @@ LAB_0060d954: } if (iVar1 == 0xe7) { pvVar2 = get_item_config_entry(this); - itemTags._l._4_4_ = *(uint *)((char *)pvVar2 + 0xc) & g_tearFlagShielded._l._4_4_; - itemTags._l._0_4_ = *(uint *)((char *)pvVar2 + 8) & (uint)g_tearFlagShielded._l; - itemTags._h._0_4_ = *(uint *)((char *)pvVar2 + 0x10) & (uint)g_tearFlagShielded._h; - itemTags._h._4_4_ = *(uint *)((char *)pvVar2 + 0x14) & g_tearFlagShielded._h._4_4_; + (*(undefined4 *)((char *)&(itemTags._l) + 0x4)) = *(uint *)((char *)pvVar2 + 0xc) & (*(undefined4 *)((char *)&(g_tearFlagShielded._l) + 0x4)); + (*(undefined4 *)((char *)&(itemTags._l) + 0x0)) = *(uint *)((char *)pvVar2 + 8) & GHIDRA_UINT(g_tearFlagShielded._l); + (*(undefined4 *)((char *)&(itemTags._h) + 0x0)) = *(uint *)((char *)pvVar2 + 0x10) & GHIDRA_UINT(g_tearFlagShielded._h); + (*(undefined4 *)((char *)&(itemTags._h) + 0x4)) = *(uint *)((char *)pvVar2 + 0x14) & (*(undefined4 *)((char *)&(g_tearFlagShielded._h) + 0x4)); isHasTag = ((BitSet128 *)(&itemTags))->BitSet128::IsNonZero(); if (isHasTag == 0) { return 0; @@ -5914,7 +5914,7 @@ float Entity_Familiar::apply_tear_modifiers() if ((((isOwned == 0) || (this->_variant == 0x2b)) || (this->_variant == 0x49)) && (((isOwned = ((Entity_Player *)(this->_player))->Entity_Player::HasCollectible(0xf8,0), isOwned == 0 && (isOwned = TemporaryEffects::HasCollectibleEffect - ((TemporaryEffects *)((int)this->_player + 0x1508),0xf8), isOwned == 0)) + ((TemporaryEffects *)(GHIDRA_INT(this->_player) + 0x1508),0xf8), isOwned == 0)) || (((familiarFlags & 1) == 0 && (((familiarFlags & 2) == 0 && (iVar1 != 0xe7)))))))) { multiplier = 1.0; } @@ -5979,7 +5979,7 @@ void Entity_Familiar::set_locust_config_index(int param_2) } locustEntry = ItemConfig::get_wisp_entry(iVar1,param_2); anm2_apply_gfx_overrides - ((std_string *)((int)locustEntry + 0x84),(std_string *)((int)locustEntry + 0x9c), + ((std_string *)(GHIDRA_INT(locustEntry) + 0x84),(std_string *)(GHIDRA_INT(locustEntry) + 0x9c), &this->_sprite); this->_size = *(float *)((char *)this->_config + 0x38) * *(float *)((char *)locustEntry + 0x78); locustScale = *(float *)((char *)locustEntry + 0x78); @@ -6005,12 +6005,12 @@ void Entity_Familiar::Remove() RemoveFromDelayed(this); if (this->_variant == 0x2b) { if (this->_subtype == 0) { - playerCounter = (int *)((int)this->_player + 0x136c); + playerCounter = (int *)(GHIDRA_INT(this->_player) + 0x136c); *playerCounter = *playerCounter + -1; } } else if (this->_variant == 0x49) { - playerCounter = (int *)((int)this->_player + 0x1370); + playerCounter = (int *)(GHIDRA_INT(this->_player) + 0x1370); *playerCounter = *playerCounter + -1; } zeroY = g_vectorZero.y; @@ -6136,16 +6136,16 @@ void Entity_Familiar::Kill(EntityRef *source) uVar8 = Random(); Game::SpawnParticles (g_game,&this->_pos,0x23,8, - (float)((double)(int)uVar8 + __uint_to_double_fixup[-((int)uVar8 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar8) + __uint_to_double_fixup[-(GHIDRA_INT(uVar8) >> 0x1f)]) * 2.3283064e-10 * 3.0 + 2.0,color,-12.0,0); uVar8 = Random(); manager = g_manager; local_120 = CONCAT44(0xb5,(float)local_120); local_124 = (Entity_Familiar *) - ((float)((double)(int)uVar8 + __uint_to_double_fixup[-((int)uVar8 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar8) + __uint_to_double_fixup[-(GHIDRA_INT(uVar8) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 1.0); - seed_fart_sound_override((int *)((int)&local_120 + 4)); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_120._4_4_,0.5,2,0,(float)local_124,0.0); + seed_fart_sound_override((int *)(GHIDRA_INT(&local_120) + 4)); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((*(undefined4 *)((char *)&(GHIDRA_INT(local_120)) + 0x4)),0.5,2,0,(float)local_124,0.0); } else if ((iVar13 == 0xd8) || (iVar13 == 0xd9)) { soundId = 0x1e; @@ -6175,27 +6175,27 @@ void Entity_Familiar::Kill(EntityRef *source) for (local_124 = (Entity_Familiar *)(uVar8 % 5 + 3); local_124 != (Entity_Familiar *)0x0; local_124 = (Entity_Familiar *)&(*(undefined1 *)((char *)&(local_124[-1]) + 0xf47))) { uVar8 = Random(); - fVar16 = (float)((double)(int)uVar8 + __uint_to_double_fixup[-((int)uVar8 >> 0x1f)]) * + fVar16 = (float)((double)GHIDRA_INT(uVar8) + __uint_to_double_fixup[-(GHIDRA_INT(uVar8) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_134 = (Entity *)(fVar16 + fVar16); fVar16 = cos((float)local_134); pickupPos.x = fVar16 * 0.5 * *(float *)((char *)this + 0x370) + - ((Vector *)((int)this + 0x33c))->x; + ((Vector *)(GHIDRA_INT(this) + 0x33c))->x; fVar16 = sin((float)local_134); pickupPos.y = fVar16 * 0.5 * *(float *)((char *)this + 0x370) + *(float *)((char *)this + 0x340); uVar8 = Random(); - fVar16 = (float)((double)(int)uVar8 + __uint_to_double_fixup[-((int)uVar8 >> 0x1f)]) * + fVar16 = (float)((double)GHIDRA_INT(uVar8) + __uint_to_double_fixup[-(GHIDRA_INT(uVar8) >> 0x1f)]) * 2.3283064e-10 * 3.14; - local_120._4_4_ = (Entity_Familiar *)(fVar16 + fVar16); + (*(undefined4 *)((char *)&(local_120) + 0x4)) = (Entity_Familiar *)(fVar16 + fVar16); uVar8 = Random(); - local_120 = CONCAT44(local_120._4_4_, - (float)((double)(int)uVar8 + - __uint_to_double_fixup[-((int)uVar8 >> 0x1f)]) * 2.3283064e-10 * + local_120 = CONCAT44((*(undefined4 *)((char *)&(local_120) + 0x4)), + (float)((double)GHIDRA_INT(uVar8) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar8) >> 0x1f)]) * 2.3283064e-10 * 4.0 + 2.0); - pickupVelocity.x = cos((float)local_120._4_4_); + pickupVelocity.x = cos((*(undefined4 *)((char *)&((float)local_120) + 0x4))); pickupVelocity.x = pickupVelocity.x * (float)local_120; local_150.y = pickupVelocity.x; - fVar16 = sin((float)local_120._4_4_); + fVar16 = sin((*(undefined4 *)((char *)&((float)local_120) + 0x4))); pickupVelocity.y = fVar16 * (float)local_120; local_13c = (EntityPtr *)pickupVelocity.y; pickupSeed = Random(); @@ -6253,7 +6253,7 @@ LAB_00611aa8: (&g_game->_itemPool,pickupSubtype,(Entity_Player *)0x0); cVar6 = (*pcVar1)(iVar13); if (cVar6 == '\0') goto LAB_00611ab4; - uVar11 = (uint)local_120._4_4_; + uVar11 = (*(undefined4 *)((char *)&(GHIDRA_UINT(local_120)) + 0x4)); } if (uVar11 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -6266,7 +6266,7 @@ LAB_00611aa8: uVar11 = uVar11 >> ((byte)local_120 & 0x1f) ^ uVar11; local_120 = CONCAT44(uVar11,(float)local_120); pickupSubtype = ItemPool::GetPill(uVar11); - pickupSubtype = pickupSubtype | ((uint)local_134 & 1) << 0xb; + pickupSubtype = pickupSubtype | (GHIDRA_UINT(local_134) & 1) << 0xb; } while( true ); } if (uVar8 != 100) goto LAB_00611aa8; @@ -6279,7 +6279,7 @@ LAB_006118d4: collectibleKey = pickupSubtype; std::set::find_node(itemFindResult,&collectibleKey); if (((*(char *)(itemNode + 0xd) == '\0') && - (*(int *)(itemNode + 0x10) <= (int)uVar10)) && (itemNode != pEVar14->_index)) + (*(int *)(itemNode + 0x10) <= GHIDRA_INT(uVar10))) && (itemNode != pEVar14->_index)) goto LAB_006118d4; bVar15 = true; } @@ -6309,17 +6309,17 @@ LAB_00611ab4: lVar3 = (uVar17 >> 0x20) * 0xd7b634db; local_118 = (Entity_Familiar *)((ulonglong)lVar3 >> 0x20); uVar18 = lVar3 + ((uVar17 & 0xffffffff) * 0xd7b634db >> 0x20); - uVar10 = (uint)(uVar18 >> 0x20); + uVar10 = GHIDRA_UINT((uVar18 >> 0x20)); lVar2 = lVar2 + (uVar18 & 0xffffffff); local_190.x = (float)lVar2; - uVar8 = (uint)((ulonglong)lVar2 >> 0x20); + uVar8 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); lVar2 = (uVar17 >> 0x20) * 0x431bde82 + (ulonglong)CONCAT14(CARRY4(uVar10,uVar8),uVar10 + uVar8); local_134->_spawnerType = 0; - uVar8 = (uint)((ulonglong)lVar2 >> 0x20); + uVar8 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); local_134->_spawnerVariant = 0; ptrSlot = &local_134->_spawnerEntity; - local_120 = CONCAT44(uVar8 >> 0x12,(uint)lVar2 >> 0x12 | uVar8 * 0x4000); + local_120 = CONCAT44(uVar8 >> 0x12,GHIDRA_UINT(lVar2) >> 0x12 | uVar8 * 0x4000); if (*ptrSlot != (EntityPtr)0x0) { spawnerPtr = ptrSlot; std::multiset::erase(&spawnerPtr); @@ -6336,7 +6336,7 @@ LAB_00611ab4: iVar13 = *(int *)((char *)pvVar12 + 0x1214); *(int *)((char *)pvVar12 + 0x1214) = iVar13 + 1; tmpEntity->_index = iVar13; - ((EntityList *)((EntityList *)((int)pvVar12 + 0x1218)))->EntityList::AddEntity(tmpEntity); + ((EntityList *)((EntityList *)(GHIDRA_INT(pvVar12) + 0x1218)))->EntityList::AddEntity(tmpEntity); bVar7 = Game::ShouldEraseEnemy(tmpEntity); if (bVar7 != 0) { Entity::RemoveWithPoof(tmpEntity,unusedArg); @@ -6357,18 +6357,18 @@ LAB_00611ab4: } playerManager = &g_game->_playerManager; local_118 = (Entity_Familiar *)0x0; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar12 = (playerManager->_playerList)._end; - if ((int)pvVar12 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar12) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *) "((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar12 = (playerManager->_playerList)._end; } piVar9 = (playerManager->_playerList)._begin; - if (local_118 < (Entity_Familiar *)((int)pvVar12 - (int)piVar9 >> 2)) { - piVar9 = piVar9 + (int)local_118; + if (local_118 < (Entity_Familiar *)(GHIDRA_INT(pvVar12) - GHIDRA_INT(piVar9) >> 2)) { + piVar9 = piVar9 + GHIDRA_INT(local_118); } trigger_set_dispatch ((void *)(*piVar9 + 0x1fc8),6,tmpEntity,&pickupPos,&pickupVelocity); @@ -6376,33 +6376,33 @@ LAB_00611ab4: local_118 = (Entity_Familiar *)&(*(undefined1 *)((char *)(local_118) + 0x1)); } while (local_118 < (undefined1 *) - ((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2)); } } LAB_00611d87: uVar18 = GetTimeNs(); - uVar8 = (uint)(uVar18 >> 0x20); + uVar8 = GHIDRA_UINT((uVar18 >> 0x20)); lVar3 = (uVar18 & 0xffffffff) * 0x431bde82; local_150.y = (float)((ulonglong)lVar3 >> 0x20); lVar4 = (ulonglong)uVar8 * 0xd7b634db; local_13c = (EntityPtr *)((ulonglong)lVar4 >> 0x20); lVar2 = (ulonglong)uVar8 * 0x431bde82; uVar18 = lVar4 + ((uVar18 & 0xffffffff) * 0xd7b634db >> 0x20); - uVar10 = (uint)(uVar18 >> 0x20); + uVar10 = GHIDRA_UINT((uVar18 >> 0x20)); lVar3 = lVar3 + (uVar18 & 0xffffffff); local_190.x = (float)lVar3; - uVar8 = (uint)((ulonglong)lVar3 >> 0x20); + uVar8 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); lVar3 = lVar2 + (ulonglong)CONCAT14(CARRY4(uVar10,uVar8),uVar10 + uVar8); - uVar11 = (uint)((ulonglong)lVar3 >> 0x20); - uVar8 = (uint)lVar3 >> 0x12 | uVar11 * 0x4000; - uVar10 = uVar8 - (int)(float)local_120; - bVar15 = CARRY4((uint)g_entitySpawnTimeMs,uVar10); - g_entitySpawnTimeMs._0_4_ = (uint)g_entitySpawnTimeMs + uVar10; - g_entitySpawnTimeMs._4_4_ = - g_entitySpawnTimeMs._4_4_ + - (((uVar11 >> 0x12) - (int)local_120._4_4_) - (uint)(uVar8 < (uint)(float)local_120)) - + (uint)bVar15; + uVar11 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); + uVar8 = GHIDRA_UINT(lVar3) >> 0x12 | uVar11 * 0x4000; + uVar10 = uVar8 - GHIDRA_INT((float)local_120); + bVar15 = CARRY4(GHIDRA_UINT(g_entitySpawnTimeMs),uVar10); + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x0)) = GHIDRA_UINT(g_entitySpawnTimeMs) + uVar10; + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) = + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) + + (((uVar11 >> 0x12) - (*(undefined4 *)((char *)&(GHIDRA_INT(local_120)) + 0x4))) - GHIDRA_UINT((uVar8 < GHIDRA_UINT((float)local_120)))) + + GHIDRA_UINT(bVar15); } tmpEntity = local_134; local_138 = (Game *)((ulonglong)lVar2 >> 0x20); @@ -6425,7 +6425,7 @@ LAB_00611d87: this = (Entity_Familiar *)local_12c; } if (*(int *)((char *)this + 0x2c) == 0xd8) { - layer = ((ANM2 *)((ANM2 *)((int)this + 0x48)))->ANM2::GetLayer((byte *)0x0); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x48)))->ANM2::GetLayer((byte *)0x0); (layer->_size).x = g_vectorZero.x; (layer->_size).y = g_vectorZero.y; *(int *)((char *)this + 0xd88) = 0x1c2; @@ -6440,11 +6440,11 @@ LAB_00611d87: do { uVar8 = Random(); uVar10 = Random(); - fVar16 = (float)((double)(int)uVar10 + __uint_to_double_fixup[-((int)uVar10 >> 0x1f)]) * + fVar16 = (float)((double)GHIDRA_INT(uVar10) + __uint_to_double_fixup[-(GHIDRA_INT(uVar10) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_13c = (EntityPtr *)(fVar16 + fVar16); fVar16 = cos((float)local_13c); - spawnPos.x = fVar16 * 10.0 + ((Vector *)((int)this + 0x33c))->x; + spawnPos.x = fVar16 * 10.0 + ((Vector *)(GHIDRA_INT(this) + 0x33c))->x; fVar16 = sin((float)local_13c); spawnPos.y = fVar16 * 10.0 + *(float *)((char *)this + 0x340); tmpEntity = ((Game *)(g_game))->Game::SpawnEx(3,0xd9,&spawnPos,&g_vectorZero,(Entity *)local_150.y,0, @@ -6457,7 +6457,7 @@ LAB_00611d87: } *ptrSlot = (EntityPtr)this; std::multiset::insert(ptrSlot); - local_124 = (Entity_Familiar *)((int)local_124 + -1); + local_124 = (Entity_Familiar *)(GHIDRA_INT(local_124) + -1); } while (local_124 != (Entity_Familiar *)0x0); nullKillSource._type = 0; nullKillSource._variant = 0; @@ -6481,8 +6481,8 @@ LAB_00611d87: do { tmpEntity = *(void **)((char *)this + 0x410); spiderCount = &tmpEntity[4]._config; - *spiderCount = (void *)((int)*spiderCount + 1); - spawn_blue_spider((Vector *)((int)this + 0x33c),tmpEntity,&g_vectorZero); + *spiderCount = (void *)(GHIDRA_INT(*spiderCount) + 1); + spawn_blue_spider((Vector *)(GHIDRA_INT(this) + 0x33c),tmpEntity,&g_vectorZero); iVar13 = iVar13 + -1; } while (iVar13 != 0); } @@ -6497,13 +6497,13 @@ LAB_00611d87: } } else if (iVar13 == 0xce) { - cVar6 = wisp_kill(this,__security_cookie ^ (uint)((&splatColor)[1]._colorize + 1)); + cVar6 = wisp_kill(this,__security_cookie ^ GHIDRA_UINT(((&splatColor)[1]._colorize + 1))); if (cVar6 == '\0') { ExceptionList = local_1c; return; } local_140 = this->_orbitLayer; - if (-1 < (int)local_140) { + if (-1 < GHIDRA_INT(local_140)) { if (this->_isSubtype55555 == 0) { if ((this->_type == 3) && (((this->_variant == 0xce && (this->_subtype == 0x4d)) || @@ -6514,42 +6514,42 @@ LAB_00611d87: isUnicornWisp = '\0'; } EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&wispQuery,3,-1,-1,0,0); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&wispQuery,3,-1,-1,0,0); iVar13 = wispQuery._size; local_14 = 0.0; buffer_init(wispMates,wispQuery._size + 1); - local_14 = (float)CONCAT31(local_14._1_3_,1); - local_120._0_4_ = 0.0; + local_14 = (float)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); + (*(undefined4 *)((char *)&(local_120) + 0x0)) = 0.0; pEVar14 = wispMatesCount; if (iVar13 != 0) { local_118 = wispMatesCount; pvVar12 = wispQuery._data; uVar8 = wispQuery._size; do { - otherFamiliar = *(Entity_Familiar **)((char *)pvVar12 + (int)(float)local_120 * 4); + otherFamiliar = *(Entity_Familiar **)((char *)pvVar12 + GHIDRA_INT((float)local_120) * 4); if (otherFamiliar->_exists != 0) { if (otherFamiliar != this) { - local_120._4_4_ = + (*(undefined4 *)((char *)&(local_120) + 0x4)) = (Entity_Familiar *) __RTDynamicCast(otherFamiliar,0, &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Familiar::RTTI_Type_Descriptor,0 ); - if ((local_120._4_4_)->_orbitLayer == local_140) { + if (((*(undefined4 *)((char *)&(local_120) + 0x4)))->_orbitLayer == local_140) { tmpEntity = get_orbit_parent(this); - orbitParent = get_orbit_parent(local_120._4_4_); - pEVar14 = local_120._4_4_; + orbitParent = get_orbit_parent((*(undefined4 *)((char *)&(local_120) + 0x4))); + pEVar14 = (*(undefined4 *)((char *)&(local_120) + 0x4)); if (orbitParent == tmpEntity) { - if ((((local_120._4_4_)->_type == 3) && ((local_120._4_4_)->_variant == 0xce)) - && (((local_120._4_4_)->_subtype == 0x4d || - ((local_120._4_4_)->_subtype == 0x12a)))) { + if (((((*(undefined4 *)((char *)&(local_120) + 0x4)))->_type == 3) && (((*(undefined4 *)((char *)&(local_120) + 0x4)))->_variant == 0xce)) + && ((((*(undefined4 *)((char *)&(local_120) + 0x4)))->_subtype == 0x4d || + (((*(undefined4 *)((char *)&(local_120) + 0x4)))->_subtype == 0x12a)))) { isUnicornWisp = '\x01'; } local_124 = (Entity_Familiar *)&(*(undefined1 *)((char *)(local_118) + 0x1)); if (wispMatesCapacity < local_124) { KAGE_LogMessage(0x10,(byte *)"EL: not enough space for push_back\n"); } - *(Entity_Familiar **)(wispMatesData + (int)local_118 * 4) = pEVar14; + *(Entity_Familiar **)(wispMatesData + GHIDRA_INT(local_118) * 4) = pEVar14; local_118 = local_124; wispMatesCount = local_124; pEVar14 = local_124; @@ -6562,8 +6562,8 @@ LAB_00611d87: uVar8 = wispQuery._size; } } - local_120._0_4_ = (float)((int)(float)local_120 + 1); - } while ((uint)(float)local_120 < uVar8); + (*(undefined4 *)((char *)&(local_120) + 0x0)) = (float)(GHIDRA_INT((float)local_120) + 1); + } while (GHIDRA_UINT((float)local_120) < uVar8); } local_12c = (EntityPtr)0x3f800000; if (isUnicornWisp != '\0') { @@ -6574,36 +6574,36 @@ LAB_00611d87: local_12c = (EntityPtr)0x3eaaaaab; } uVar8 = local_140; - if ((int)local_140 < 1) { + if (GHIDRA_INT(local_140) < 1) { uVar8 = 0; } uVar10 = 10; - if ((int)uVar8 < 10) { + if (GHIDRA_INT(uVar8) < 10) { uVar10 = uVar8; } local_118 = (Entity_Familiar *)0x0; - local_120 = CONCAT44(local_120._4_4_,uVar10 * 0x14); + local_120 = CONCAT44((*(undefined4 *)((char *)&(local_120) + 0x4)),uVar10 * 0x14); if (pEVar14 != (Entity_Familiar *)0x0) { local_134 = (Entity *) - (float)((double)(int)pEVar14 + - __uint_to_double_fixup[-((int)pEVar14 >> 0x1f)]); + (float)((double)GHIDRA_INT(pEVar14) + + __uint_to_double_fixup[-(GHIDRA_INT(pEVar14) >> 0x1f)]); local_138 = (Game *)0x40400000; local_124 = (Entity_Familiar *)0x40c90fdb; do { local_148 = (void *)__RTDynamicCast(*(undefined4 *) - (wispMatesData + (int)local_118 * 4),0, + (wispMatesData + GHIDRA_INT(local_118) * 4),0, &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor ,&IsaacRepentancePlus::Entity_Familiar:: RTTI_Type_Descriptor,0); *(float *)((char *)local_148 + 0xd60) = - ((float)(int)local_118 * (float)local_124) / (float)local_134; + ((float)GHIDRA_INT(local_118) * (float)local_124) / (float)local_134; bVar7 = ((Entity_Player *)(this->_player))->Entity_Player::HasCollectible(0x70,0); if (bVar7 == 0) { - fVar16 = *(float *)(&DAT_00c34138 + (int)(float)local_120); + fVar16 = *(float *)(&DAT_00c34138 + GHIDRA_INT((float)local_120)); } else { - fVar16 = *(float *)(&DAT_00c3413c + (int)(float)local_120) * - *(float *)(&DAT_00c34138 + (int)(float)local_120); + fVar16 = *(float *)(&DAT_00c3413c + GHIDRA_INT((float)local_120)) * + *(float *)(&DAT_00c34138 + GHIDRA_INT((float)local_120)); } *(float *)((char *)local_148 + 0xd6c) = fVar16 * (float)local_12c; if (*(int *)((char *)local_148 + 0x2c) == 0x3c) { @@ -6613,32 +6613,32 @@ LAB_00611d87: } while (local_118 < pEVar14); } if (wispMates[0] == '\0') { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } if (wispMatesData != 0) { uVar8 = *(uint *)(wispMatesData + -4); oldAllocated = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar8; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar8; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)oldAllocated < uVar8); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocated) < uVar8)); free((uint *)(wispMatesData + -4)); } } local_14 = -NAN; - if (wispQuery._0_1_ == '\0') { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + if ((*(undefined1 *)((char *)&(wispQuery) + 0x0)) == '\0') { + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } if (wispQuery._data != (void *)0x0) { uVar8 = *(uint *)((char *)wispQuery._data + -4); oldAllocated = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar8; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar8; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)oldAllocated < uVar8); - free((uint *)((int)wispQuery._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocated) < uVar8)); + free((uint *)(GHIDRA_INT(wispQuery._data) + -4)); } local_14 = -NAN; } @@ -6666,7 +6666,7 @@ LAB_00611d87: local_128 = 0x105; seed_fart_sound_override((int *)&local_128); ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(local_128,1.0,2,0,1.0,0.0); - local_120 = CONCAT44(local_120._4_4_,this->_orbitLayer); + local_120 = CONCAT44((*(undefined4 *)((char *)&(local_120) + 0x4)),this->_orbitLayer); if (-1 < this->_orbitLayer) { if (this->_isSubtype55555 == 0) { if ((this->_type == 3) && @@ -6678,12 +6678,12 @@ LAB_00611d87: isUnicornWisp = '\0'; } EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&itemWispQuery,3,-1,-1,0,0); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&itemWispQuery,3,-1,-1,0,0); iVar13 = itemWispQuery._size; local_14 = 5.60519e-45; buffer_init(itemWispMates,itemWispQuery._size + 1); uVar8 = 0; - local_14 = (float)CONCAT31(local_14._1_3_,5); + local_14 = (float)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),5); local_120 = local_120 & 0xffffffff; pEVar14 = itemWispMatesCount; if (iVar13 != 0) { @@ -6712,7 +6712,7 @@ LAB_00611d87: if (itemWispMatesCapacity < local_124) { KAGE_LogMessage(0x10,(byte *)"EL: not enough space for push_back\n"); } - *(Entity_Familiar **)(itemWispMatesData + (int)local_118 * 4) = pEVar14; + *(Entity_Familiar **)(itemWispMatesData + GHIDRA_INT(local_118) * 4) = pEVar14; local_118 = local_124; itemWispMatesCount = local_124; pEVar14 = local_124; @@ -6725,7 +6725,7 @@ LAB_00611d87: uVar10 = itemWispQuery._size; } } - uVar8 = (int)local_120._4_4_ + 1; + uVar8 = (*(undefined4 *)((char *)&(GHIDRA_INT(local_120)) + 0x4)) + 1; local_120 = CONCAT44(uVar8,(float)local_120); } while (uVar8 < uVar10); } @@ -6736,8 +6736,8 @@ LAB_00611d87: if (bVar7 != 0) { local_12c = (EntityPtr)0x3eaaaaab; } - iVar13 = (int)(float)local_120; - if ((int)(float)local_120 < 1) { + iVar13 = GHIDRA_INT((float)local_120); + if (GHIDRA_INT((float)local_120) < 1) { iVar13 = 0; } orbitLayerClamped = 10; @@ -6745,26 +6745,26 @@ LAB_00611d87: orbitLayerClamped = iVar13; } local_118 = (Entity_Familiar *)0x0; - local_120 = CONCAT44(local_120._4_4_,orbitLayerClamped * 0x14); + local_120 = CONCAT44((*(undefined4 *)((char *)&(local_120) + 0x4)),orbitLayerClamped * 0x14); if (pEVar14 != (Entity_Familiar *)0x0) { local_124 = (Entity_Familiar *) - (float)((double)(int)pEVar14 + - __uint_to_double_fixup[-((int)pEVar14 >> 0x1f)]); + (float)((double)GHIDRA_INT(pEVar14) + + __uint_to_double_fixup[-(GHIDRA_INT(pEVar14) >> 0x1f)]); do { local_134 = (Entity *) - __RTDynamicCast(*(undefined4 *)(itemWispMatesData + (int)local_118 * 4), + __RTDynamicCast(*(undefined4 *)(itemWispMatesData + GHIDRA_INT(local_118) * 4), 0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Familiar:: RTTI_Type_Descriptor,0); local_134[3]._sprite._championColor._colorize[1] = - ((float)(int)local_118 * 6.2831855) / (float)local_124; + ((float)GHIDRA_INT(local_118) * 6.2831855) / (float)local_124; bVar7 = ((Entity_Player *)(this->_player))->Entity_Player::HasCollectible(0x70,0); if (bVar7 == 0) { - fVar16 = *(float *)(&DAT_00c34138 + (int)(float)local_120); + fVar16 = *(float *)(&DAT_00c34138 + GHIDRA_INT((float)local_120)); } else { - fVar16 = *(float *)(&DAT_00c3413c + (int)(float)local_120) * - *(float *)(&DAT_00c34138 + (int)(float)local_120); + fVar16 = *(float *)(&DAT_00c3413c + GHIDRA_INT((float)local_120)) * + *(float *)(&DAT_00c34138 + GHIDRA_INT((float)local_120)); } local_134[3]._sprite._championColor._offset[0] = fVar16 * (float)local_12c; if (local_134->_variant == 0x3c) { @@ -6774,32 +6774,32 @@ LAB_00611d87: } while (local_118 < pEVar14); } if (itemWispMates[0] == '\0') { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } if (itemWispMatesData != 0) { uVar8 = *(uint *)(itemWispMatesData + -4); oldAllocated = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar8; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar8; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)oldAllocated < uVar8); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocated) < uVar8)); free((uint *)(itemWispMatesData + -4)); } } local_14 = -NAN; - if (itemWispQuery._0_1_ == '\0') { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + if ((*(undefined1 *)((char *)&(itemWispQuery) + 0x0)) == '\0') { + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } if (itemWispQuery._data != (void *)0x0) { uVar8 = *(uint *)((char *)itemWispQuery._data + -4); oldAllocated = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar8; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar8; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)oldAllocated < uVar8); - free((uint *)((int)itemWispQuery._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocated) < uVar8)); + free((uint *)(GHIDRA_INT(itemWispQuery._data) + -4)); } local_14 = -NAN; } @@ -6816,12 +6816,12 @@ LAB_00611d87: uVar8 = Random(); Game::SpawnParticles (g_game,&this->_pos,0x23,8, - (float)((double)(int)uVar8 + __uint_to_double_fixup[-((int)uVar8 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar8) + __uint_to_double_fixup[-(GHIDRA_INT(uVar8) >> 0x1f)]) * 2.3283064e-10 * 3.0 + 2.0,color_02,-12.0,0); uVar8 = Random(); SoundEffects::PlayWithFartOverride (0xb5,0.5,2,0, - (float)((double)(int)uVar8 + __uint_to_double_fixup[-((int)uVar8 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar8) + __uint_to_double_fixup[-(GHIDRA_INT(uVar8) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 1.0); } else if (iVar13 == 0xc9) { @@ -6849,7 +6849,7 @@ LAB_00611d87: do { uVar8 = ((RNG *)(&this->_dropRNG))->RNG::Next(); uVar10 = Random(); - fVar16 = (float)((double)(int)uVar10 + __uint_to_double_fixup[-((int)uVar10 >> 0x1f)]) * + fVar16 = (float)((double)GHIDRA_INT(uVar10) + __uint_to_double_fixup[-(GHIDRA_INT(uVar10) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_124 = (Entity_Familiar *)(fVar16 + fVar16); local_198.x = cos((float)local_124); @@ -6857,7 +6857,7 @@ LAB_00611d87: fVar16 = sin((float)local_124); local_198.y = fVar16 * 5.0; ((Game *)(g_game))->Game::SpawnEx(5,0x14,&this->_pos,&local_198,(Entity *)this,0,uVar8,0); - iVar13 = (int)local_120._4_4_ + -1; + iVar13 = (*(undefined4 *)((char *)&(GHIDRA_INT(local_120)) + 0x4)) + -1; local_120 = CONCAT44(iVar13,(float)local_120); } while (iVar13 != 0); break; @@ -6868,7 +6868,7 @@ LAB_00611d87: while (iVar13 != 0) { uVar8 = ((RNG *)(&this->_dropRNG))->RNG::Next(); uVar10 = Random(); - fVar16 = (float)((double)(int)uVar10 + __uint_to_double_fixup[-((int)uVar10 >> 0x1f)]) * + fVar16 = (float)((double)GHIDRA_INT(uVar10) + __uint_to_double_fixup[-(GHIDRA_INT(uVar10) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_124 = (Entity_Familiar *)(fVar16 + fVar16); local_150.x = cos((float)local_124); @@ -6876,7 +6876,7 @@ LAB_00611d87: fVar16 = sin((float)local_124); local_150.y = fVar16 * 5.0; ((Game *)(g_game))->Game::SpawnEx(5,10,&this->_pos,&local_150,(Entity *)this,2,uVar8,0); - iVar13 = (int)local_120._4_4_ + -1; + iVar13 = (*(undefined4 *)((char *)&(GHIDRA_INT(local_120)) + 0x4)) + -1; local_120 = CONCAT44(iVar13,(float)local_120); } break; @@ -6934,11 +6934,11 @@ LAB_00611d87: posPtr = MusicManager::RandomVector(&local_190); uVar10 = Random(); this = (Entity_Familiar *)local_12c; - local_158.x = (float)((double)(int)uVar10 + __uint_to_double_fixup[-((int)uVar10 >> 0x1f)] + local_158.x = (float)((double)GHIDRA_INT(uVar10) + __uint_to_double_fixup[-(GHIDRA_INT(uVar10) >> 0x1f)] ) * 2.3283064e-10 * 3.0 + 2.0; local_158.y = local_158.x * posPtr->y; local_158.x = local_158.x * posPtr->x; - tmpEntity = ((Game *)(g_game))->Game::Spawn(5,10,(Vector *)((int)local_12c + 0x33c),&local_158, + tmpEntity = ((Game *)(g_game))->Game::Spawn(5,10,(Vector *)(GHIDRA_INT(local_12c) + 0x33c),&local_158, (Entity *)local_12c,2,uVar8); iVar13 = *(int *)tmpEntity; tmpEntity[1]._sprite._championColor._colorize[1] = 8.40779e-44; @@ -6999,7 +6999,7 @@ LAB_0061221c: if (variant != 0xce) goto LAB_00612223; } if (this->_subtype == 0x22d) { - playerFlags = (uint *)((int)this->_player + 0x1574); + playerFlags = (uint *)(GHIDRA_INT(this->_player) + 0x1574); *playerFlags = *playerFlags | 0x400; *(undefined1 *)((char *)this->_player + 0x1518) = 1; variant = this->_variant; @@ -7022,12 +7022,12 @@ LAB_00612253: (this->_hitList)._end = (void *)0x0; (this->_hitList)._capacity = (void *)0x0; if (hitListBegin != (void *)0x0) { - size = (int)pvVar1 - (int)hitListBegin & 0xfffffffc; + size = GHIDRA_INT(pvVar1) - GHIDRA_INT(hitListBegin) & 0xfffffffc; pvVar1 = hitListBegin; if (0xfff < size) { pvVar1 = *(void **)((char *)hitListBegin + -4); size = size + 0x23; - if (0x1f < (uint)((int)hitListBegin + (-4 - (int)pvVar1))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(hitListBegin) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -7068,17 +7068,17 @@ Entity * Entity_Familiar::get_orbit_parent() isHasItem = ((Entity_Player *)(this->_player))->Entity_Player::HasCollectible(0x2d8,0); if (isHasItem != 0) { EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&queryResult,3,0xf0,-1,1,0); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&queryResult,3,0xf0,-1,1,0); if (queryResult._size != 0) { foundEntity = *(Entity **)queryResult._data; - if (queryResult._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(queryResult) + 0x0)) == '\0') { local_8 = 0; tracked_alloc(1,queryResult._data,0); } ExceptionList = local_10; return foundEntity; } - if (queryResult._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(queryResult) + 0x0)) == '\0') { local_8 = 1; tracked_alloc(1,queryResult._data,0); } @@ -7123,7 +7123,7 @@ int Entity_Familiar::RecalculateOrbitOffset(int layer, byte isAdd) local_8 = 0xffffffff; puStack_c = &LAB_00af6945; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(orbiterBuffer + 0x30); + uVar2 = __security_cookie ^ GHIDRA_UINT((orbiterBuffer + 0x30)); if ((this->_isSubtype55555 != 0) || (layer < 0)) { return 0; } @@ -7136,11 +7136,11 @@ int Entity_Familiar::RecalculateOrbitOffset(int layer, byte isAdd) } ExceptionList = &local_10; local_1c = this; - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&familiarQuery,3,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&familiarQuery,3,-1,-1,0,0); iVar3 = familiarQuery._size; local_8 = 0; buffer_init(orbiterBuffer,familiarQuery._size + 1); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); local_24 = 0; familiarData = familiarQuery._data; orbiters = local_30; @@ -7203,19 +7203,19 @@ int Entity_Familiar::RecalculateOrbitOffset(int layer, byte isAdd) layer = 0; } uVar2 = 10; - if ((uint)layer < 10) { + if (GHIDRA_UINT(layer) < 10) { uVar2 = layer; } uVar4 = 0; iVar3 = uVar2 * 0x14; if (orbiterCount != 0) { - dVar1 = __uint_to_double_fixup[-((int)orbiterCount >> 0x1f)]; + dVar1 = __uint_to_double_fixup[-(GHIDRA_INT(orbiterCount) >> 0x1f)]; do { local_24 = __RTDynamicCast(*(undefined4 *)(orbiters + uVar4 * 4),0, &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Familiar::RTTI_Type_Descriptor,0); *(float *)(local_24 + 0xd60) = - ((float)(int)uVar4 * 6.2831855) / (float)((double)(int)orbiterCount + dVar1); + ((float)GHIDRA_INT(uVar4) * 6.2831855) / (float)((double)GHIDRA_INT(orbiterCount) + dVar1); isHasCollectible = ((Entity_Player *)(this->_player))->Entity_Player::HasCollectible(0x70,0); if (isHasCollectible == 0) { orbitDistance = *(float *)(&DAT_00c34138 + iVar3); @@ -7231,33 +7231,33 @@ int Entity_Familiar::RecalculateOrbitOffset(int layer, byte isAdd) } while (uVar4 < orbiterCount); } if (orbiterBuffer[0] == '\0') { - heapBytes = (qword *)((int)g_mainHeap + 0x30); + heapBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); if (g_mainHeap == (void *)0x0) { heapBytes = &g_allocatedBytesNoHeap; } if (orbiters != 0) { uVar2 = *(uint *)(orbiters + -4); prevBytes = *heapBytes; - *(uint *)heapBytes = (uint)*heapBytes - uVar2; + *(uint *)heapBytes = GHIDRA_UINT(*heapBytes) - uVar2; *(uint *)((char *)heapBytes + 4) = - *(uint *)((char *)heapBytes + 4) - (uint)((uint)prevBytes < uVar2); + *(uint *)((char *)heapBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevBytes) < uVar2)); free((void *)(orbiters + -4)); } } - if (familiarQuery._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(familiarQuery) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { heapBytes = &g_allocatedBytesNoHeap; } else { - heapBytes = (qword *)((int)g_mainHeap + 0x30); + heapBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (familiarData != (void *)0x0) { uVar2 = *(uint *)((char *)familiarData + -4); prevBytes = *heapBytes; - *(uint *)heapBytes = (uint)*heapBytes - uVar2; + *(uint *)heapBytes = GHIDRA_UINT(*heapBytes) - uVar2; *(uint *)((char *)heapBytes + 4) = - *(uint *)((char *)heapBytes + 4) - (uint)((uint)prevBytes < uVar2); - free((void *)((int)familiarData + -4)); + *(uint *)((char *)heapBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevBytes) < uVar2)); + free((void *)(GHIDRA_INT(familiarData) + -4)); } } ExceptionList = local_10; @@ -7543,7 +7543,7 @@ void Entity_Familiar::FollowParent() local_14 = 0xffffffff; puStack_18 = &LAB_00af697d; local_1c = ExceptionList; - uVar4 = __security_cookie ^ (uint)(query + 0x34); + uVar4 = __security_cookie ^ GHIDRA_UINT((query + 0x34)); if (this->_isSubtype55555 != 0) { (this->_pos).x = (this->_formationOffset).x; (this->_pos).y = (this->_formationOffset).y; @@ -7588,7 +7588,7 @@ void Entity_Familiar::FollowParent() (*pcVar1)(); return; } - uVar4 = (uint)local_30 >> 5 ^ (uint)local_30; + uVar4 = GHIDRA_UINT(local_30) >> 5 ^ GHIDRA_UINT(local_30); uVar4 = uVar4 << 9 ^ uVar4; local_38 = (float)(uVar4 >> (SUB41(local_38,0) & 0x1f) ^ uVar4); local_34 = (EntityPtr)0xe; @@ -7598,11 +7598,11 @@ void Entity_Familiar::FollowParent() (*pcVar1)(); return; } - uVar4 = (uint)local_38 >> 3 ^ (uint)local_38; + uVar4 = GHIDRA_UINT(local_38) >> 3 ^ GHIDRA_UINT(local_38); uVar4 = uVar4 << 1 ^ uVar4; uVar4 = uVar4 >> 0xe ^ uVar4; local_34 = (EntityPtr)(umbilicalWhip->_size * 0.3); - local_38 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + local_38 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283062e-10 * 3.14; local_30 = (float)local_34 + local_2c; local_38 = local_38 + local_38; @@ -7677,10 +7677,10 @@ void Entity_Familiar::FollowParent() isOverrideParent = '\0'; if ((g_game->_challenge == 0x1e) && (this->_variant == 0x3e)) { EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)query,3,0x43,-1,0,0); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)query,3,0x43,-1,0,0); if (local_38 != 0.0) { isOverrideParent = '\x01'; - EVar6 = *(EntityPtr *)query._4_4_; + EVar6 = *(*(undefined4 *)((char *)&((EntityPtr *)query) + 0x4)); } ((EntityList_Query *)(query))->EntityList_Query::~EntityList_Query(); } @@ -7727,7 +7727,7 @@ void Entity_Familiar::FollowParent() EVar6 = extraout_ECX_01; fVar8 = extraout_EDX_03; if ((0 < iVar5) && (*(char *)((char *)extraout_ECX_01 + 0xd76) == '\0')) { - fVar8 = (float)((int)extraout_EDX_03 + 1); + fVar8 = (float)(GHIDRA_INT(extraout_EDX_03) + 1); } } } @@ -7736,8 +7736,8 @@ void Entity_Familiar::FollowParent() local_30 = fVar8; } playerRaw = this->_player; - local_48 = (EntityPtr)(iVar7 + (int)fVar8); - iVar7 = (int)local_48 + 1; + local_48 = (EntityPtr)(iVar7 + GHIDRA_INT(fVar8)); + iVar7 = GHIDRA_INT(local_48) + 1; local_28 = *(float *)((char *)playerRaw + 0x1630); local_2c = *(float *)((char *)playerRaw + 0x1634); if ((local_28 == g_vectorZero.x) && (local_2c == g_vectorZero.y)) { @@ -7753,11 +7753,11 @@ void Entity_Familiar::FollowParent() if (fVar10 <= 179.0) { fVar9 = fVar10; } - if (((uint)local_30 & 1) != 0) { + if ((GHIDRA_UINT(local_30) & 1) != 0) { fVar9 = -fVar9; } - local_30 = ((fVar9 * (float)(int)((iVar7 - ((int)fVar8 - ((int)fVar8 >> 0x1f) & 0xfffffffeU) - ) + -1)) / (float)(int)local_48) * 0.017453292; + local_30 = ((fVar9 * (float)GHIDRA_INT(((iVar7 - (GHIDRA_INT(fVar8) - (GHIDRA_INT(fVar8) >> 0x1f) & 0xfffffffeU) + ) + -1))) / (float)GHIDRA_INT(local_48)) * 0.017453292; local_48 = (EntityPtr)cos(local_30); fVar8 = sin(local_30); fVar9 = fVar8 * local_28; @@ -7801,7 +7801,7 @@ void Entity_Familiar::FollowParent() EVar6 = (EntityPtr)extraout_ECX_02; if ((0 < iVar5) && (extraout_ECX_02->_isNotCountedAsFollower == 0)) goto LAB_00613385; } - local_30 = (float)((int)local_30 + 1); + local_30 = (float)(GHIDRA_INT(local_30) + 1); } } LAB_00613385: @@ -7809,7 +7809,7 @@ LAB_00613385: EVar6 = this->_child; do { if (EVar6 == (EntityPtr)0x0) { - local_48 = (EntityPtr)((int)local_30 + 1 + iVar7); + local_48 = (EntityPtr)(GHIDRA_INT(local_30) + 1 + iVar7); this->_orbitSpeed = 3.5; iVar5 = ((Entity_Player *)(this->_player))->Entity_Player::GetTrinketMultiplier(0x94); fVar8 = this->_orbitSpeed; @@ -7820,7 +7820,7 @@ LAB_00613385: iVar5 = g_game->_frameCount; (this->_orbitDistance).x = 65.0; (this->_orbitDistance).y = 60.0; - local_30 = (((float)iVar7 * 360.0) / (float)(int)local_48 + (float)iVar5 * fVar8) - + local_30 = (((float)iVar7 * 360.0) / (float)GHIDRA_INT(local_48) + (float)iVar5 * fVar8) - this->_orbitAngleOffset; bVar2 = ((Entity_Player *)(this->_player))->Entity_Player::HasTrinket(0x59,0); if (bVar2 != 0) { @@ -7898,18 +7898,18 @@ LAB_006133c6: LAB_00613692: if (this->_variant != 0x6d) { EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)query,3,0x6d,-1,1,0); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)query,3,0x6d,-1,1,0); local_14 = 0; local_30 = 0.0; if (local_38 != 0.0) { LAB_006136d5: - iVar7 = __RTDynamicCast(*(EntityPtr *)(query._4_4_ + local_30 * 4),0, + iVar7 = __RTDynamicCast(*(EntityPtr *)((*(undefined4 *)((char *)&(query) + 0x4)) + local_30 * 4),0, &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Familiar::RTTI_Type_Descriptor,0); if (((*(char *)(iVar7 + 0x172) == '\0') || (*(void **)(iVar7 + 0x410) != this->_player)) || (*(EntityPtr *)(iVar7 + 0x3bc) != this->_parent)) goto LAB_00613716; - EVar6 = *(EntityPtr *)(query._4_4_ + local_30 * 4); - for (chainNext = *(EntityPtr *)((int)*(EntityPtr *)(query._4_4_ + local_30 * 4) + 0x3c0); + EVar6 = *(EntityPtr *)((*(undefined4 *)((char *)&(query) + 0x4)) + local_30 * 4); + for (chainNext = *(EntityPtr *)(GHIDRA_INT(*(EntityPtr *)((*(undefined4 *)((char *)&(query) + 0x4)) + local_30 * 4)) + 0x3c0); ((chainNext != (EntityPtr)0x0 && (*(int *)((char *)chainNext + 0x28) == 3)) && (*(int *)((char *)chainNext + 0x2c) == 0x6d)); chainNext = *(EntityPtr *)((char *)chainNext + 0x3c0)) { @@ -7965,8 +7965,8 @@ LAB_006138df: ExceptionList = local_1c; return; LAB_00613716: - local_30 = (float)((int)local_30 + 1); - if ((uint)local_38 <= (uint)local_30) goto LAB_0061375a; + local_30 = (float)(GHIDRA_INT(local_30) + 1); + if (GHIDRA_UINT(local_38) <= GHIDRA_UINT(local_30)) goto LAB_0061375a; goto LAB_006136d5; } @@ -8027,11 +8027,11 @@ Vector * Entity_Familiar::GetOrbitPosition(Vector *outPosition, Vector *offset) reset_follow_target(this); } framePhase = g_manager->_framecount & 0x80000001; - if ((int)framePhase < 0) { + if (GHIDRA_INT(framePhase) < 0) { framePhase = (framePhase - 1 | 0xfffffffe) + 1; } fVar3 = fmodf(this->_orbitAngleOffset - - ((float)(int)framePhase * 0.5 + (float)g_game->_frameCount) * this->_orbitSpeed * + ((float)GHIDRA_INT(framePhase) * 0.5 + (float)g_game->_frameCount) * this->_orbitSpeed * 3.1415927 * 0.5,6.2831855); iVar2 = this->_variant; if (iVar2 == 0x23) { @@ -8087,7 +8087,7 @@ Entity_Laser * Entity_Familiar::fire_robo_baby_laser(Vector *direction) uint local_c; undefined1 auStack_8 [4]; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); if (*(char *)((char *)this->_player + 0x173) != '\0') { return (Entity_Laser *)0x0; } @@ -8110,7 +8110,7 @@ Entity_Laser * Entity_Familiar::fire_robo_baby_laser(Vector *direction) tear = (Entity_Tear *) Entity_Laser::ShootAngle (2,&this->_pos,fVar2 * 57.295776,timeout,posOffset,(Entity *)source,bVar1); - *(undefined1 *)((int)&(tear->_tearHaloANM2)._overlayAnimState._currentlyTriggeredEvents + 1) = 1; + *(undefined1 *)(GHIDRA_INT(&(tear->_tearHaloANM2)._overlayAnimState._currentlyTriggeredEvents) + 1) = 1; *(undefined1 *)&(tear->_tearHaloANM2)._animState._layerFrames = 1; fVar2 = apply_tear_modifiers(this); tear->SetCollisionDamage(fVar2 * 3.5); @@ -8168,7 +8168,7 @@ void Entity_Familiar::PlayFloatAnim(int direction) local_8 = 0xffffffff; puStack_c = &LAB_00af69ad; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(textureRef + 0x18); + uVar2 = __security_cookie ^ GHIDRA_UINT((textureRef + 0x18)); variant = this->_variant; if (variant == 0x58) { return; @@ -8297,7 +8297,7 @@ void Entity_Familiar::AddToDelayed() local_8 = 0xffffffff; puStack_c = &LAB_00af69dd; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; if (this->_isSubtype55555 != 0) { return; } @@ -8323,7 +8323,7 @@ void Entity_Familiar::AddToDelayed() LAB_00614095: game = g_game; this->_isDelayed = 1; - EntityList::QuerySublist((EntityList *)((int)game->_room + 0x1218),&familiars,3,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(game->_room) + 0x1218),&familiars,3,-1,-1,0,0); i = 0; local_8 = 0; if (familiars._size != 0) { @@ -8338,7 +8338,7 @@ LAB_00614095: &IsaacRepentancePlus::Entity_Familiar::RTTI_Type_Descriptor,0,uVar1); if (((otherFamiliar != (Entity_Familiar *)0x0) && (otherFamiliar->_isDelayed != 0)) && ((this->_player == otherFamiliar->_player && (otherFamiliar != this)))) { - parentSlot = (EntityPtr *)((int)tmpEntity + 0x3c0); + parentSlot = (EntityPtr *)(GHIDRA_INT(tmpEntity) + 0x3c0); if (*(int *)((char *)tmpEntity + 0x3c0) != 0) { erasedSlot = parentSlot; std::multiset::erase(&erasedSlot); @@ -8357,22 +8357,22 @@ LAB_00614095: familiarData = familiars._data; } i = i + 1; - } while (i < (uint)familiars._size); + } while (i < GHIDRA_UINT(familiars._size)); } - if (familiars._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(familiars) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (familiars._data != (void *)0x0) { uVar1 = *(uint *)((char *)familiars._data + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar1; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar1; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar1); - free((uint *)((int)familiars._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar1)); + free((uint *)(GHIDRA_INT(familiars._data) + -4)); } } ExceptionList = local_10; @@ -8394,7 +8394,7 @@ void Entity_Familiar::RemoveFromDelayed() EVar1 = this->_parent; parentSlot = &this->_parent; if (EVar1 != (EntityPtr)0x0) { - parentChildSlot = (EntityPtr)((int)EVar1 + 0x3c0); + parentChildSlot = (EntityPtr)(GHIDRA_INT(EVar1) + 0x3c0); local_c = this->_child; if (*(int *)((char *)EVar1 + 0x3c0) != 0) { local_8 = parentChildSlot; @@ -8408,7 +8408,7 @@ void Entity_Familiar::RemoveFromDelayed() EVar1 = this->_child; childSlot = &this->_child; if (EVar1 != (EntityPtr)0x0) { - local_8 = (EntityPtr)((int)EVar1 + 0x3bc); + local_8 = (EntityPtr)(GHIDRA_INT(EVar1) + 0x3bc); local_10 = *parentSlot; if (*(int *)((char *)EVar1 + 0x3bc) != 0) { local_c = local_8; @@ -8463,7 +8463,7 @@ void Entity_Familiar::PlayChargeAnim(int direction) byte *****animNameBuf; Game *game; - local_c = __security_cookie ^ (uint)auStack_44; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_44); fireCooldown = &this->_fireCooldown; (this->_sprite)._flipX = 0; animData = (this->_sprite)._animState._animData; @@ -8479,7 +8479,7 @@ void Entity_Familiar::PlayChargeAnim(int direction) ((std::string *)((char *)&local_38))->std::string::string(animData); } animNameBuf = local_38; - chargeFrame = (int)chargeFrameFloat; + chargeFrame = GHIDRA_INT(chargeFrameFloat); animNameBuf = (byte *****)&local_38; if (0xf < uStack_24) { animNameBuf = local_38; @@ -8491,7 +8491,7 @@ void Entity_Familiar::PlayChargeAnim(int direction) if (0xfff < size) { animNameBuf = (byte *****)animNameBuf[-1]; size = uStack_24 + 0x24; - if ((byte *)0x1f < (byte *)((int)animNameBuf + (-4 - (int)animNameBuf))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(animNameBuf) + (-4 - GHIDRA_INT(animNameBuf)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -8503,7 +8503,7 @@ void Entity_Familiar::PlayChargeAnim(int direction) if (chargeNamePos == 0xffffffff) { chargeFrame = 0; } - local_38 = (byte *****)((uint)local_38 & 0xffffff00); + local_38 = (byte *****)(GHIDRA_UINT(local_38) & 0xffffff00); switch(direction) { case 0: (this->_sprite)._flipX = 1; @@ -8572,7 +8572,7 @@ void Entity_Familiar::PlayShootAnim(int direction) local_8 = 0xffffffff; puStack_c = &LAB_00af69ad; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(textureRef + 0x18); + uVar2 = __security_cookie ^ GHIDRA_UINT((textureRef + 0x18)); variant = this->_variant; if (variant == 0xce) { ExceptionList = &local_10; @@ -8704,7 +8704,7 @@ void Entity_Familiar::Shoot() local_14 = 0xffffffff; puStack_18 = &LAB_00af6a0d; local_1c = ExceptionList; - uVar2 = __security_cookie ^ (uint)(texture + 0x24); + uVar2 = __security_cookie ^ GHIDRA_UINT((texture + 0x24)); if (this->_player->_dead != 0) { return; } @@ -8728,7 +8728,7 @@ void Entity_Familiar::Shoot() fireDelay = 0x2c; } if ((this->_flags & 0x100) != 0) { - fireDelay = (int)((float)fireDelay * 1.4); + fireDelay = GHIDRA_INT(((float)fireDelay * 1.4)); } local_2c = -NAN; if (iVar5 == 0xf4) { @@ -8794,7 +8794,7 @@ void Entity_Familiar::Shoot() local_4c.y = *(float *)((char *)player + 0x340) - (this->_pos).y; if ((iVar5 == 8) || (iVar5 == 0xf4)) { if (ABS(local_4c.x) <= ABS(local_4c.y)) { - fireDirection = (uint)(0.0 <= local_4c.y) * 2 + 1; + fireDirection = GHIDRA_UINT((0.0 <= local_4c.y)) * 2 + 1; } else { fireDirection = 2; @@ -8805,7 +8805,7 @@ void Entity_Familiar::Shoot() } Isaac::GetAxisAlignedUnitVectorFromDir(&aimDir,fireDirection); bVar1 = TryAimAtMarkedTarget(this,&aimDir,&fireDirection,(Vector *)0x0); - local_30._0_1_ = bVar1; + (*(undefined1 *)((char *)&(local_30) + 0x0)) = bVar1; (this->_sprite)._flipX = fireDirection == 0; if (0 < this->_fireCooldown) goto LAB_00614e92; iVar5 = this->_variant; @@ -8817,7 +8817,7 @@ void Entity_Familiar::Shoot() sinAngle = sin(local_2c); local_4c.x = aimDir.x * local_3c.y - aimDir.y * sinAngle; local_4c.y = aimDir.y * local_3c.y + aimDir.x * sinAngle; - FireProjectile(this,&local_4c,local_30._0_1_); + FireProjectile(this,&local_4c,(*(undefined1 *)((char *)&(local_30) + 0x0))); iVar5 = iVar5 + 1; } while (iVar5 < 4); iVar3 = fireDelay; @@ -8834,7 +8834,7 @@ LAB_00614e78: if ((iVar5 == 8) || (iVar5 == 0xf4)) { EVar4 = local_30; AimDirection = ((Vector *)(&local_4c))->Vector::Normalized(&local_3c); - FireProjectile(this,AimDirection,EVar4._0_1_); + FireProjectile(this,AimDirection,(*(undefined1 *)((char *)&(EVar4) + 0x0))); } else { FireProjectile(this,&aimDir,bVar1); @@ -9016,7 +9016,7 @@ void Entity_Familiar::ai_walker() EVar7 = this->_parent; if (EVar7 == (EntityPtr)0x0) { EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&sameVariantList,this->_type,0x38,-1,0, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&sameVariantList,this->_type,0x38,-1,0, 0); local_8 = 0; uVar8 = 0; @@ -9048,13 +9048,13 @@ void Entity_Familiar::ai_walker() break; } uVar8 = uVar8 + 1; - } while (uVar8 < (uint)sameVariantList._size); + } while (uVar8 < GHIDRA_UINT(sameVariantList._size)); } if ((this->_parent == (EntityPtr)0x0) && (this->_parent = (EntityPtr)this->_player, (EntityPtr)this->_player != (EntityPtr)0x0)) { std::multiset::insert(&this->_parent); } - if (sameVariantList._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(sameVariantList) + 0x0)) == '\0') { local_8 = 1; tracked_alloc(1,sameVariantList._data,0); } @@ -9067,10 +9067,10 @@ void Entity_Familiar::ai_walker() local_8 = 0xffffffff; if ((1 < *(int *)&g_game->_deathmatchManager) && (this->_target != (EntityPtr)0x0)) { local_1c = *(EntityPtr *)((char *)this->_target + 0x20); - piVar3 = map_find_value(&(*(undefined1 *)((char *)(this) + 0xf3c)),(uint)&local_1c); + piVar3 = map_find_value(&(*(undefined1 *)((char *)(this) + 0xf3c)),GHIDRA_UINT(&local_1c)); if (0x1c1 < *piVar3) { targetIndex = *(undefined4 *)((char *)this->_target + 0x20); - puVar4 = map_find_value(&(*(undefined1 *)((char *)(this) + 0xf3c)),(uint)&targetIndex); + puVar4 = map_find_value(&(*(undefined1 *)((char *)(this) + 0xf3c)),GHIDRA_UINT(&targetIndex)); *puVar4 = 0xfffffc7c; } } @@ -9111,10 +9111,10 @@ void Entity_Familiar::ai_walker() bloodSplat = ((Game *)(g_game))->Game::Spawn(1000,7,&this->_pos,&g_vectorZero,(Entity *)0x0,0,uVar8); piVar3 = (int *)__RTDynamicCast(bloodSplat,uVar12,pTVar13,pTVar14,uVar15); uVar8 = Random(); - fVar11 = (float)((double)(int)uVar8 + __uint_to_double_fixup[-((int)uVar8 >> 0x1f)]) * + fVar11 = (float)((double)GHIDRA_INT(uVar8) + __uint_to_double_fixup[-(GHIDRA_INT(uVar8) >> 0x1f)]) * 2.3283064e-10 * 0.3 + 0.1; - piVar3[0x39] = (int)fVar11; - piVar3[0x3a] = (int)fVar11; + piVar3[0x39] = GHIDRA_INT(fVar11); + piVar3[0x3a] = GHIDRA_INT(fVar11); (**(code **)(*piVar3 + 0xc))(); } local_1c = (EntityPtr)this->_variant; @@ -9144,7 +9144,7 @@ void Entity_Familiar::ai_walker() bVar9 = bVar2 < *animNameChar; if (bVar2 != *animNameChar) { LAB_00617225: - uVar8 = -(uint)bVar9 | 1; + uVar8 = -GHIDRA_UINT(bVar9) | 1; goto LAB_0061722a; } if (bVar2 == 0) break; @@ -9188,7 +9188,7 @@ LAB_0061722a: bVar9 = bVar2 < *(byte *)EVar7; if (bVar2 != *(byte *)EVar7) { LAB_006172c4: - uVar8 = -(uint)bVar9 | 1; + uVar8 = -GHIDRA_UINT(bVar9) | 1; goto LAB_006172c9; } if (bVar2 == 0) break; @@ -9196,12 +9196,12 @@ LAB_006172c4: bVar9 = bVar2 < *(byte *)((char *)EVar7 + 1); if (bVar2 != *(byte *)((char *)EVar7 + 1)) goto LAB_006172c4; pbVar5 = pbVar5 + 2; - EVar7 = (EntityPtr)((int)EVar7 + 2); + EVar7 = (EntityPtr)(GHIDRA_INT(EVar7) + 2); } while (bVar2 != 0); uVar8 = 0; LAB_006172c9: if ((uVar8 == 0) && - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) == '\0' || + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) == '\0' || ((this->_sprite)._animState._isPlaying != 0)))) goto LAB_00617356; } local_18 = (EntityPtr)animName; @@ -9218,7 +9218,7 @@ LAB_006172c9: bVar9 = bVar2 < (byte)*animName; if (bVar2 != *animName) { LAB_00617320: - uVar8 = -(uint)bVar9 | 1; + uVar8 = -GHIDRA_UINT(bVar9) | 1; goto LAB_00617325; } if (bVar2 == 0) break; @@ -9231,7 +9231,7 @@ LAB_00617320: uVar8 = 0; LAB_00617325: if ((uVar8 == 0) && - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) == '\0' || + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) == '\0' || ((this->_sprite)._animState._isPlaying != 0)))) goto LAB_00617356; } animName = "WalkHori"; @@ -9259,7 +9259,7 @@ LAB_00617356: bVar9 = bVar2 < (byte)*animName; if (bVar2 != *animName) { LAB_00617473: - uVar8 = -(uint)bVar9 | 1; + uVar8 = -GHIDRA_UINT(bVar9) | 1; goto LAB_00617478; } if (bVar2 == 0) break; @@ -9305,7 +9305,7 @@ LAB_00617478: bVar9 = bVar2 < *(byte *)((char *)EVar7 + 1); if (bVar2 != *(byte *)((char *)EVar7 + 1)) goto LAB_006173d2; animNameChar = animNameChar + 2; - EVar7 = (EntityPtr)((int)EVar7 + 2); + EVar7 = (EntityPtr)(GHIDRA_INT(EVar7) + 2); } while (bVar2 != 0); uVar8 = 0; goto LAB_006173d7; @@ -9331,7 +9331,7 @@ LAB_00617478: bVar9 = bVar2 < *(byte *)((char *)EVar7 + 1); if (bVar2 != *(byte *)((char *)EVar7 + 1)) goto LAB_006173d2; animNameChar = animNameChar + 2; - EVar7 = (EntityPtr)((int)EVar7 + 2); + EVar7 = (EntityPtr)(GHIDRA_INT(EVar7) + 2); } while (bVar2 != 0); LAB_006173ce: uVar8 = 0; @@ -9358,7 +9358,7 @@ LAB_0061748d: ExceptionList = local_10; return; LAB_006173d2: - uVar8 = -(uint)bVar9 | 1; + uVar8 = -GHIDRA_UINT(bVar9) | 1; goto LAB_006173d7; } @@ -9458,13 +9458,13 @@ LAB_006189fb: this->_visible = 1; this->_state = 0; local_24 = *(EntityPtr *)((char *)this->_player + 0x162c); - Isaac::GetAxisAlignedUnitVectorFromDir(&local_1c,(int)local_24); + Isaac::GetAxisAlignedUnitVectorFromDir(&local_1c,GHIDRA_INT(local_24)); TryAimAtMarkedTarget(this,&local_1c,(int *)&local_24,(Vector *)0x0); if (this->_fireCooldown < 0) { if (((isLilithIncubus != 0) && (umbilicalWhip = get_incubus_umbilical_whip(this), umbilicalWhip != (Entity *)0x0)) && (fVar10 = umbilicalWhip[3]._sprite._championColor._tint[3], fVar10 != -NAN)) { - pVVar3 = Isaac::GetAxisAlignedUnitVectorFromDir(&scratchVec,(int)fVar10); + pVVar3 = Isaac::GetAxisAlignedUnitVectorFromDir(&scratchVec,GHIDRA_INT(fVar10)); (this->_velocity).x = pVVar3->x; (this->_velocity).y = pVVar3->y; } @@ -9477,31 +9477,31 @@ LAB_006189fb: local_30 = (EntityPtr)0x0; local_24 = (EntityPtr)0x3; uVar4 = (g_game->_stage + 1) * 100; - if (0x4b0 < (int)uVar4) { + if (0x4b0 < GHIDRA_INT(uVar4)) { uVar4 = 0x4b0; } - local_2c.y = (float)(this->_coins / (int)(uVar4 >> 2)); + local_2c.y = (float)(this->_coins / GHIDRA_INT((uVar4 >> 2))); nonNegativeLevelPtr = &local_30; - if (-1 < (int)local_2c.y) { + if (-1 < GHIDRA_INT(local_2c.y)) { nonNegativeLevelPtr = (EntityPtr *)&local_2c.y; } chargeLevelPtr = &local_24; - if ((int)*nonNegativeLevelPtr < 4) { + if (GHIDRA_INT(*nonNegativeLevelPtr) < 4) { chargeLevelPtr = nonNegativeLevelPtr; } EVar12 = *chargeLevelPtr; - ((ANM2 *)(&this->_sprite))->ANM2::Play((&PTR_s_Charge0_00b648f0)[(int)EVar12],0); - fVar10 = (float)(int)EVar12; + ((ANM2 *)(&this->_sprite))->ANM2::Play((&PTR_s_Charge0_00b648f0)[GHIDRA_INT(EVar12)],0); + fVar10 = (float)GHIDRA_INT(EVar12); this->SetCollisionDamage(fVar10 + fVar10 + 2.0); EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),&entityList,&this->_pos,this->_size, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&entityList,&this->_pos,this->_size, 0x10); local_8 = 0; local_30 = (EntityPtr)0x0; if ((undefined1 *)entityList._size != (undefined1 *)0x0) { iVar6 = g_forceCollideDepth; do { - queriedEntity = *(int **)((char *)entityList._data + (int)local_30 * 4); + queriedEntity = *(int **)((char *)entityList._data + GHIDRA_INT(local_30) * 4); if (((queriedEntity != (int *)0x0) && (queriedEntity[10] == 5)) && ((((iVar8 = queriedEntity[0xb], iVar8 == 10 || (((((iVar8 == 0x14 || (iVar8 == 0x5a)) || (iVar8 == 0x28)) || @@ -9514,11 +9514,11 @@ LAB_006189fb: iVar6 = g_forceCollideDepth + -1; g_forceCollideDepth = iVar6; } - local_30 = (EntityPtr)((int)local_30 + 1); - } while ((uint)local_30 < (uint)entityList._size); + local_30 = (EntityPtr)(GHIDRA_INT(local_30) + 1); + } while (GHIDRA_UINT(local_30) < GHIDRA_UINT(entityList._size)); } local_8 = 0xffffffff; - if (entityList._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(entityList) + 0x0)) == '\0') { local_8 = 1; tracked_alloc(1,entityList._data,0); local_8 = 0xffffffff; @@ -9551,14 +9551,14 @@ LAB_006177c3: local_30 = EVar12; if (EVar13 == (EntityPtr)0x0) { EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)local_40,pVVar3, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)local_40,pVVar3, this->_size,0x10); EVar13 = local_30; local_8 = 2; local_24 = (EntityPtr)0x0; if (local_34 != (EntityPtr)0x0) { do { - EVar12 = *(EntityPtr *)(local_40._4_4_ + (int)local_24 * 4); + EVar12 = *(EntityPtr *)((*(undefined4 *)((char *)&(local_40) + 0x4)) + GHIDRA_INT(local_24) * 4); local_1c.y = (float)EVar12; if ((((EVar12 != (EntityPtr)0x0) && (*(int *)((char *)EVar12 + 0x28) == 5)) && (((((iVar6 = *(int *)((char *)EVar12 + 0x2c), iVar6 == 10 || @@ -9579,7 +9579,7 @@ LAB_006177c3: bVar9 = bVar2 < (byte)*animName; if (bVar2 != *animName) { LAB_00617920: - uVar4 = -(uint)bVar9 | 1; + uVar4 = -GHIDRA_UINT(bVar9) | 1; goto LAB_00617925; } if (bVar2 == 0) break; @@ -9593,14 +9593,14 @@ LAB_00617920: LAB_00617925: if (uVar4 == 0) goto LAB_006179e0; } - local_2c.y = (float)((int)EVar12 + 0x48); + local_2c.y = (float)(GHIDRA_INT(EVar12) + 0x48); currentAnimName = *(byte **)((char *)EVar12 + 0x7c); if (currentAnimName == (byte *)0x0) { LAB_00617990: - bVar2 = ((ANM2 *)((ANM2 *)((int)EVar12 + 0x48)))->ANM2::SetAnimation((byte *)"Touched",1); + bVar2 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(EVar12) + 0x48)))->ANM2::SetAnimation((byte *)"Touched",1); fVar10 = local_2c.y; if (bVar2 != 0) { - ((AnimationState *)((AnimationState *)((int)local_2c.y + 0x30)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(local_2c.y) + 0x30)))->AnimationState::Rewind(); *(undefined1 *)((char *)fVar10 + 0x44) = 1; EVar12 = (EntityPtr)local_1c.y; } @@ -9615,7 +9615,7 @@ LAB_00617990: bVar9 = bVar2 < (byte)*animName; if (bVar2 != *animName) { LAB_00617970: - uVar4 = -(uint)bVar9 | 1; + uVar4 = -GHIDRA_UINT(bVar9) | 1; goto LAB_00617975; } if (bVar2 == 0) break; @@ -9643,17 +9643,17 @@ LAB_00617975: } } LAB_006179e0: - local_24 = (EntityPtr)((int)local_24 + 1); - } while ((uint)local_24 < (uint)local_34); + local_24 = (EntityPtr)(GHIDRA_INT(local_24) + 1); + } while (GHIDRA_UINT(local_24) < GHIDRA_UINT(local_34)); EVar12 = local_30; this = (Entity_Familiar *)local_20; } if (local_40[0] == '\0') { local_8 = 3; - tracked_alloc(1,(void *)local_40._4_4_,0); + tracked_alloc(1,(*(undefined4 *)((char *)&((void *)local_40) + 0x4)),0); } local_8 = 0xffffffff; - pVVar3 = (Vector *)((int)this + 0x33c); + pVVar3 = (Vector *)(GHIDRA_INT(this) + 0x33c); } else { *(float *)((char *)EVar13 + 0x33c) = pVVar3->x; @@ -9661,11 +9661,11 @@ LAB_006179e0: EVar13 = *(EntityPtr *)EVar12; *(float *)((char *)EVar13 + 0x360) = (this->_velocity).x; *(float *)((char *)EVar13 + 0x364) = (this->_velocity).y; - *(undefined4 *)((int)*(EntityPtr *)EVar12 + 0x184) = 0; + *(undefined4 *)(GHIDRA_INT(*(EntityPtr *)EVar12) + 0x184) = 0; } if (*(int *)((char *)this + 0xd4c) == -2) { - local_2c.y = *(float *)((int)*(void **)((char *)this + 0x410) + 0x340) - pVVar3->y; - local_30 = (EntityPtr)(*(float *)((int)*(void **)((char *)this + 0x410) + 0x33c) - pVVar3->x); + local_2c.y = *(float *)(GHIDRA_INT(*(void **)((char *)this + 0x410)) + 0x340) - pVVar3->y; + local_30 = (EntityPtr)(*(float *)(GHIDRA_INT(*(void **)((char *)this + 0x410)) + 0x33c) - pVVar3->x); local_24 = (EntityPtr)(local_2c.y * local_2c.y + (float)local_30 * (float)local_30); if ((float)local_24 < 1600.0) { uVar4 = *(uint *)EVar12; @@ -9683,7 +9683,7 @@ LAB_006179e0: *(uint *)EVar12 = 0; } iVar6 = ((Entity *)((Entity *)this))->Entity::get_velocity_direction(); - sprite = (ANM2 *)((int)this + 0x48); + sprite = (ANM2 *)(GHIDRA_INT(this) + 0x48); if (iVar6 == 3) { ((ANM2 *)(sprite))->ANM2::Play((byte *)"FloatDown",0); } @@ -9702,7 +9702,7 @@ LAB_006179e0: EVar12 = (EntityPtr)((float)local_30 * (1.0 / fVar10)); EVar13 = (EntityPtr)(local_2c.y * (1.0 / fVar10)); } - ((Vector *)((int)this + 0x360))->x = (float)EVar12 * 10.0; + ((Vector *)(GHIDRA_INT(this) + 0x360))->x = (float)EVar12 * 10.0; *(float *)((char *)this + 0x364) = (float)EVar13 * 10.0; *(int *)((char *)this + 0x188) = 4; } @@ -9711,7 +9711,7 @@ LAB_006179e0: (bVar2 = ((Room *)(g_game->_room))->Room::IsPositionInRoom(pVVar3,-100.0), bVar2 == 0)) || (*(uint *)EVar12 != 0)) && (bVar2 = IsLilithBirthrightIncubus(this), bVar2 == 0)) { *(int *)((char *)this + 0x184) = 0; - ((Vector *)((int)this + 0x360))->x = ((Vector *)((int)this + 0x360))->x * 0.5; + ((Vector *)(GHIDRA_INT(this) + 0x360))->x = ((Vector *)(GHIDRA_INT(this) + 0x360))->x * 0.5; *(float *)((char *)this + 0x364) = *(float *)((char *)this + 0x364) * 0.5; *(int *)((char *)this + 0xd4c) = -2; } @@ -9729,8 +9729,8 @@ LAB_006179e0: if (fVar10 <= 0.0) { this->Remove(); uVar4 = 0; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { player = ((Game *)(g_game))->Game::GetPlayer(uVar4); if (player->_variant == 0) { @@ -9738,8 +9738,8 @@ LAB_006179e0: (player->_temporaryeffects)._shouldEvaluateCache = 1; } uVar4 = uVar4 + 1; - } while (uVar4 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (uVar4 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); } } } @@ -9759,10 +9759,10 @@ LAB_006179e0: if (isLilithIncubus != 0) { iVar6 = 0x360; } - local_40._8_4_ = *(EntityPtr *)((int)(&(this->_sprite)._filename + -3) + iVar6); + (*(undefined4 *)((char *)&(local_40) + 0x8)) = *(EntityPtr *)(GHIDRA_INT((&(this->_sprite)._filename + -3)) + iVar6); local_34 = *(EntityPtr *)((this->_sprite)._filename._buf + iVar6 + -0x44); local_30 = local_34; - local_24 = (EntityPtr)local_40._8_4_; + local_24 = (*(undefined4 *)((char *)&((EntityPtr)local_40) + 0x8)); if ((isLilithIncubus == 0) && ((this->_collidesWithGrid == 0 || (pVVar3 = ((Vector *)((Vector *)(local_40 + 8)))->Vector::Normalized(&local_2c), @@ -9786,21 +9786,21 @@ LAB_006179e0: } EVar12 = local_20; collisionPoint = (this->_collisionPoints)._begin; - local_34 = (EntityPtr)((int)(this->_collisionPoints)._end - (int)collisionPoint >> 3); + local_34 = (EntityPtr)(GHIDRA_INT((this->_collisionPoints)._end) - GHIDRA_INT(collisionPoint) >> 3); local_1c.y = 0.0; if (local_34 != (EntityPtr)0x0) { pVVar7 = &this->_pos; pVVar3 = &this->_pos; local_2c.y = (float)g_game->_room; do { - iVar8 = (int)((((float)local_24 + pVVar3->x + *collisionPoint) - 40.0) / 40.0 + 0.5); - iVar6 = (int)((((float)local_30 + pVVar7->y + collisionPoint[1]) - 120.0) / 40.0 + 0.5); + iVar8 = GHIDRA_INT(((((float)local_24 + pVVar3->x + *collisionPoint) - 40.0) / 40.0 + 0.5)); + iVar6 = GHIDRA_INT(((((float)local_30 + pVVar7->y + collisionPoint[1]) - 120.0) / 40.0 + 0.5)); if (-1 < iVar8) { - if (((((iVar8 < (int)*(void **)((char *)local_2c.y + 0xc)) && (-1 < iVar6)) && + if (((((iVar8 < GHIDRA_INT(*(void **)((char *)local_2c.y + 0xc))) && (-1 < iVar6)) && (this = (Entity_Familiar *)local_20, - iVar6 < (int)*(void **)((char *)local_2c.y + 0x10))) && - ((uVar4 = (int)*(void **)((char *)local_2c.y + 0xc) * iVar6 + iVar8, uVar4 < 0x1c0 && - (door = (GridEntity_Door *)((int *)((int)local_2c.y + 0x24))[uVar4], + iVar6 < GHIDRA_INT(*(void **)((char *)local_2c.y + 0x10)))) && + ((uVar4 = GHIDRA_INT(*(void **)((char *)local_2c.y + 0xc)) * iVar6 + iVar8, uVar4 < 0x1c0 && + (door = (GridEntity_Door *)((int *)(GHIDRA_INT(local_2c.y) + 0x24))[uVar4], door != (GridEntity_Door *)0x0)))) && ((door->_desc)._type == 0x10)) { this = (Entity_Familiar *)EVar12; if ((((door->_desc)._variant == 3) && @@ -9808,14 +9808,14 @@ LAB_006179e0: (bVar2 = ((GridEntity_Door *)(door))->GridEntity_Door::TryBlowOpen(0,(Entity *)EVar12), bVar2 != 0)) { *(int *)((char *)EVar12 + 0x184) = 0; *(int *)((char *)EVar12 + 0xd4c) = -3; - ((Vector *)((int)EVar12 + 0x360))->x = (float)local_24; + ((Vector *)(GHIDRA_INT(EVar12) + 0x360))->x = (float)local_24; *(EntityPtr *)((char *)EVar12 + 0x364) = local_30; - fVar10 = ((Vector *)((int)EVar12 + 0x360))->x; - fVar11 = ((Vector *)((int)EVar12 + 0x33c))->x; + fVar10 = ((Vector *)(GHIDRA_INT(EVar12) + 0x360))->x; + fVar11 = ((Vector *)(GHIDRA_INT(EVar12) + 0x33c))->x; *(float *)((char *)EVar12 + 0x340) = (float)local_30 * *(float *)((char *)EVar12 + 0x39c) + *(float *)((char *)EVar12 + 0x340); - ((Vector *)((int)EVar12 + 0x33c))->x = + ((Vector *)(GHIDRA_INT(EVar12) + 0x33c))->x = *(float *)((char *)EVar12 + 0x39c) * fVar10 + fVar11; bVar2 = ((Entity_Player *)(*(void **)((char *)EVar12 + 0x410)))->Entity_Player::HasCollectible(0x272,0); if (bVar2 == 0) { @@ -9846,18 +9846,18 @@ LAB_006179e0: break; } } - local_1c.y = (float)((int)local_1c.y + 1); + local_1c.y = (float)(GHIDRA_INT(local_1c.y) + 1); collisionPoint = collisionPoint + 2; - } while ((uint)local_1c.y < (uint)local_34); + } while (GHIDRA_UINT(local_1c.y) < GHIDRA_UINT(local_34)); } bVar2 = IsLilithBirthrightIncubus(this); if (bVar2 == 0) { *(int *)((char *)this + 0x188) = 0; *(int *)((char *)this + 0x184) = 0; - bVar2 = ((Vector *)((Vector *)((int)this + 0x19c)))->Vector::operator_eq(&g_vectorZero); + bVar2 = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x19c)))->Vector::operator_eq(&g_vectorZero); if (bVar2 == 0) { if (ABS((float)local_30) < ABS((float)local_24)) { - ((ANM2 *)((ANM2 *)((int)this + 0x48)))->ANM2::Play((byte *)"HitSide",0); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x48)))->ANM2::Play((byte *)"HitSide",0); *(bool *)((char *)this + 0x148) = (float)local_24 < 0.0; } else { @@ -9865,16 +9865,16 @@ LAB_006179e0: if ((float)local_30 < 0.0) { animName = "HitUp"; } - ((ANM2 *)((ANM2 *)((int)this + 0x48)))->ANM2::Play((byte *)animName,0); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x48)))->ANM2::Play((byte *)animName,0); } manager = g_manager; - ((Vector *)((int)this + 0x334))->x = ((Vector *)((int)this + 0x33c))->x; + ((Vector *)(GHIDRA_INT(this) + 0x334))->x = ((Vector *)(GHIDRA_INT(this) + 0x33c))->x; *(float *)((char *)this + 0x338) = *(float *)((char *)this + 0x340); - ((Vector *)((int)this + 0x360))->x = g_vectorZero.x; + ((Vector *)(GHIDRA_INT(this) + 0x360))->x = g_vectorZero.x; *(float *)((char *)this + 0x364) = g_vectorZero.y; local_30 = (EntityPtr)0xcd; seed_fart_sound_override((int *)&local_30); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_30,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_30),1.0,2,0,1.0,0.0); *(int *)((char *)this + 0xd4c) = -2; } else { @@ -9891,10 +9891,10 @@ LAB_006179e0: if (bVar2 == 0) { this->_entityGridCollisionClass = 0; room = game->_room; - iVar6 = ((Room *)(room))->Room::GetGridIndex((Vector *)((int)local_20 + 0x33c)); + iVar6 = ((Room *)(room))->Room::GetGridIndex((Vector *)(GHIDRA_INT(local_20) + 0x33c)); ((EntityRef *)(&sourceRef))->EntityRef::constructor(*(void **)((char *)local_20 + 0x410)); ((Room *)(room))->Room::DamageGridWithSource(iVar6,1,&sourceRef); - ((Vector *)((int)local_20 + 0x360))->x = ((Vector *)((int)local_20 + 0x360))->x * 0.5; + ((Vector *)(GHIDRA_INT(local_20) + 0x360))->x = ((Vector *)(GHIDRA_INT(local_20) + 0x360))->x * 0.5; *(float *)((char *)local_20 + 0x364) = *(float *)((char *)local_20 + 0x364) * 0.5; *(int *)((char *)local_20 + 0xd4c) = *(int *)((char *)local_20 + 0xd4c) - 1; this = (Entity_Familiar *)local_20; @@ -9957,19 +9957,19 @@ LAB_00618228: uVar4 = g_game->_stage * 200; local_34 = (EntityPtr)0x0; local_2c.y = 4.2039e-45; - if (0x4b0 < (int)uVar4) { + if (0x4b0 < GHIDRA_INT(uVar4)) { uVar4 = 0x4b0; } - local_30 = (EntityPtr)(this->_coins / (int)(uVar4 >> 2)); + local_30 = (EntityPtr)(this->_coins / GHIDRA_INT((uVar4 >> 2))); nonNegativeLevelPtr = &local_34; - if (-1 < (int)local_30) { + if (-1 < GHIDRA_INT(local_30)) { nonNegativeLevelPtr = &local_30; } chargeLevelPtr = (EntityPtr *)&local_2c.y; - if ((int)*nonNegativeLevelPtr < 4) { + if (GHIDRA_INT(*nonNegativeLevelPtr) < 4) { chargeLevelPtr = nonNegativeLevelPtr; } - ((ANM2 *)(&this->_sprite))->ANM2::Play((&PTR_DAT_00b648e0)[(int)*chargeLevelPtr],0); + ((ANM2 *)(&this->_sprite))->ANM2::Play((&PTR_DAT_00b648e0)[GHIDRA_INT(*chargeLevelPtr)],0); } } else { @@ -9984,7 +9984,7 @@ LAB_00618228: this->_coins = 0; local_30 = (EntityPtr)0x10c; seed_fart_sound_override((int *)&local_30); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_30,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_30),1.0,2,0,1.0,0.0); game = g_game; if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1 @@ -9996,7 +9996,7 @@ LAB_00618228: _Init_thread_footer(&g_invalidRoomDescriptorGuard); } roomDesc = &g_roomDescriptorDummy; - if ((uint)game->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(game->_currentDimensionIdx) < 3) { roomDesc = game->_roomList + 0x20e; } roomDesc->Flags = roomDesc->Flags | 0x20000; @@ -10020,7 +10020,7 @@ LAB_00618228: ((ANM2 *)(&this->_sprite))->ANM2::Play(s_Idle,0); fVar10 = (this->_velocity).x; FUN_0058e210(); - if (in_XMM0._0_8_ != 0.0) { + if ((*(undefined8 *)((char *)&(in_XMM0) + 0x0)) != 0.0) { bVar9 = fVar10 < 0.0; LAB_006185e8: (this->_sprite)._flipX = bVar9; @@ -10046,7 +10046,7 @@ LAB_006185e8: isNoOtherCharging = '\x01'; if (iVar6 == 0x3b) { EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&entityList,3,0x3b,-1,1,0); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&entityList,3,0x3b,-1,1,0); uVar4 = 0; local_8 = 5; if ((undefined1 *)entityList._size != (undefined1 *)0x0) { @@ -10060,9 +10060,9 @@ LAB_006185e8: break; } uVar4 = uVar4 + 1; - } while (uVar4 < (uint)entityList._size); + } while (uVar4 < GHIDRA_UINT(entityList._size)); } - if (entityList._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(entityList) + 0x0)) == '\0') { local_8 = 6; tracked_alloc(1,entityList._data,0); } @@ -10147,14 +10147,14 @@ LAB_006185e8: if (iVar6 == 0x68) { local_30 = (EntityPtr)0x343; seed_fart_sound_override((int *)&local_30); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_30,1.0,0x1c2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_30),1.0,0x1c2,0,1.0,0.0); iVar6 = this->_variant; } manager = g_manager; if (iVar6 == 3) { local_30 = (EntityPtr)0x351; seed_fart_sound_override((int *)&local_30); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_30,1.0,0x1c2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_30),1.0,0x1c2,0,1.0,0.0); } } } @@ -10207,12 +10207,12 @@ void Entity_Familiar::ai_auto_shooter() if (bVar3 != 0) { local_14 = (Entity *)0x0; EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),&enemyList,&this->_pos,150.0,8); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&enemyList,&this->_pos,150.0,8); local_8 = 0; local_1c.y = 0.0; if ((float)enemyList._size != 0.0) { do { - pEVar6 = *(Entity **)((char *)enemyList._data + (int)local_1c.y * 4); + pEVar6 = *(Entity **)((char *)enemyList._data + GHIDRA_INT(local_1c.y) * 4); bVar3 = ((Entity *)(pEVar6))->Entity::IsVulnerableEnemy((Entity *)0x0); if ((bVar3 != 0) && (((this->_spawnerEntity == (EntityPtr)0x0 || @@ -10225,14 +10225,14 @@ void Entity_Familiar::ai_auto_shooter() local_14 = pEVar6; } } - local_1c.y = (float)((int)local_1c.y + 1); - } while ((uint)local_1c.y < (uint)enemyList._size); + local_1c.y = (float)(GHIDRA_INT(local_1c.y) + 1); + } while (GHIDRA_UINT(local_1c.y) < GHIDRA_UINT(enemyList._size)); if (local_14 != (Entity *)0x0) { iVar4 = 0; local_1c.y = (local_14->_pos).x - (this->_pos).x; local_14 = (Entity *)((local_14->_pos).y - (this->_pos).y); if (ABS(local_1c.y) <= ABS((float)local_14)) { - iVar4 = (uint)(0.0 < (float)local_14) * 2 + 1; + iVar4 = GHIDRA_UINT((0.0 < (float)local_14)) * 2 + 1; } else if (0.0 < local_1c.y) { iVar4 = 2; @@ -10252,7 +10252,7 @@ void Entity_Familiar::ai_auto_shooter() pTVar9 = &IsaacRepentancePlus::Entity_Tear::RTTI_Type_Descriptor; pTVar8 = &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor; uVar7 = 0; - pEVar6 = ((Game *)(g_game))->Game::Spawn(2,1,&this->_pos,&local_1c,(Entity *)this,0,(uint)local_24.y); + pEVar6 = ((Game *)(g_game))->Game::Spawn(2,1,&this->_pos,&local_1c,(Entity *)this,0,GHIDRA_UINT(local_24.y)); tear = (Entity_Tear *)__RTDynamicCast(pEVar6,uVar7,pTVar8,pTVar9,uVar10); tear->_fallingSpeed = 1.2; local_24.y = apply_tear_modifiers(this); @@ -10275,20 +10275,20 @@ void Entity_Familiar::ai_auto_shooter() } mongo_baby_pick_next_mimic(this); local_8 = 0xffffffff; - if (enemyList._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(enemyList) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (enemyList._data != (void *)0x0) { blockSize = *(uint *)((char *)enemyList._data + -4); qVar2 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - blockSize; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - blockSize; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar2 < blockSize); - free((void *)((int)enemyList._data + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < blockSize)); + free((void *)(GHIDRA_INT(enemyList._data) + -4)); } local_8 = 0xffffffff; } @@ -10476,7 +10476,7 @@ void Entity_Familiar::ai_pickup_sack() local_18 = *(EntityPtr **)((char *)this->_player + 0x33c); local_14 = *(EntityPtr **)((char *)this->_player + 0x340); local_1c = 80.0; - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&familiars,3,-1,-1,1,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&familiars,3,-1,-1,1,0); local_8 = 0.0; uVar5 = 0; if (familiars._size != 0) { @@ -10494,7 +10494,7 @@ void Entity_Familiar::ai_pickup_sack() else if (otherFamiliar == this) break; } uVar5 = uVar5 + 1; - } while (uVar5 < (uint)familiars._size); + } while (uVar5 < GHIDRA_UINT(familiars._size)); } local_28[0] = (this->_pos).y; local_14 = (EntityPtr *)((float)local_14 - local_28[0]); @@ -10523,7 +10523,7 @@ void Entity_Familiar::ai_pickup_sack() bVar9 = bVar3 < (byte)*targetAnimNameChar; if (bVar3 != *targetAnimNameChar) { LAB_0061a861: - uVar5 = -(uint)bVar9 | 1; + uVar5 = -GHIDRA_UINT(bVar9) | 1; goto LAB_0061a866; } if (bVar3 == 0) break; @@ -10542,20 +10542,20 @@ LAB_0061a866: } } local_8 = -NAN; - if (familiars._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(familiars) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (familiars._data != (void *)0x0) { uVar5 = *(uint *)((char *)familiars._data + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar5; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar5; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar5); - free((uint *)((int)familiars._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar5)); + free((uint *)(GHIDRA_INT(familiars._data) + -4)); } local_8 = -NAN; } @@ -10580,7 +10580,7 @@ LAB_0061a925: (this->_velocity).y = (float)dirY * 1.1 + (this->_velocity).y; goto LAB_0061a925; } - ((Entity *)((Entity *)this))->Entity::collide_with_entity(__security_cookie ^ (uint)(local_28 + 9)); + ((Entity *)((Entity *)this))->Entity::collide_with_entity(__security_cookie ^ GHIDRA_UINT((local_28 + 9))); target = *pEVar6; if (*(byte *)((char *)target + 0x173) == 0) { if ((((target != (EntityPtr)0x0) && (*(int *)((char *)target + 0x28) == 5)) && @@ -10605,12 +10605,12 @@ LAB_0061a950: if (this->_target == (EntityPtr)0x0) { local_1c = 40000.0; EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),&nearbyPickups,&this->_pos,200.0,0x10); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&nearbyPickups,&this->_pos,200.0,0x10); local_8 = 2.8026e-45; local_14 = (EntityPtr *)0x0; if ((undefined1 *)nearbyPickups._size != (undefined1 *)0x0) { do { - iVar8 = *(int *)((char *)nearbyPickups._data + (int)local_14 * 4); + iVar8 = *(int *)((char *)nearbyPickups._data + GHIDRA_INT(local_14) * 4); if (*(int *)(iVar8 + 0x28) == 5) { pEVar4 = (Entity *) __RTDynamicCast(iVar8,0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, @@ -10639,23 +10639,23 @@ LAB_0061a950: } } local_14 = (EntityPtr *)&(*(undefined1 *)((char *)(local_14) + 0x1)); - } while (local_14 < (uint)nearbyPickups._size); + } while (local_14 < GHIDRA_UINT(nearbyPickups._size)); } local_8 = -NAN; - if (nearbyPickups._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(nearbyPickups) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (nearbyPickups._data != (void *)0x0) { uVar5 = *(uint *)((char *)nearbyPickups._data + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar5; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar5; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar5); - free((void *)((int)nearbyPickups._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar5)); + free((void *)(GHIDRA_INT(nearbyPickups._data) + -4)); } local_8 = -NAN; } @@ -10676,7 +10676,7 @@ LAB_0061b7e0: bVar9 = bVar3 < *spawnAnimNameChar; if (bVar3 != *spawnAnimNameChar) { LAB_0061b827: - uVar5 = -(uint)bVar9 | 1; + uVar5 = -GHIDRA_UINT(bVar9) | 1; goto LAB_0061b82c; } if (bVar3 == 0) break; @@ -10699,7 +10699,7 @@ LAB_0061b82c: bVar9 = bVar3 < (byte)*targetAnimNameChar; if (bVar3 != *targetAnimNameChar) { LAB_0061b860: - uVar5 = -(uint)bVar9 | 1; + uVar5 = -GHIDRA_UINT(bVar9) | 1; goto LAB_0061b865; } if (bVar3 == 0) break; @@ -10731,7 +10731,7 @@ LAB_0061b865: bVar9 = bVar3 < (byte)*targetAnimNameChar; if (bVar3 != *targetAnimNameChar) { LAB_0061ab77: - uVar5 = -(uint)bVar9 | 1; + uVar5 = -GHIDRA_UINT(bVar9) | 1; goto LAB_0061ab7c; } if (bVar3 == 0) break; @@ -10875,7 +10875,7 @@ LAB_0061b0d0: manager = g_manager; local_28[0] = 1.19531e-42; seed_fart_sound_override((int *)local_28); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_28[0],1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_28[0]),1.0,2,0,1.0,0.0); uVar5 = dropRng->_seed; if (uVar5 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -10889,7 +10889,7 @@ LAB_0061b0d0: uVar5 = uVar5 >> ((byte)(this->_dropRNG)._shift1 & 0x1f) ^ uVar5; uVar5 = uVar5 << ((byte)(this->_dropRNG)._shift2 & 0x1f) ^ uVar5; local_20 = (ItemPool *)(uVar5 >> ((byte)(this->_dropRNG)._shift3 & 0x1f)); - uVar5 = (uint)local_20 ^ uVar5; + uVar5 = GHIDRA_UINT(local_20) ^ uVar5; dropRng->_seed = uVar5; uVar5 = uVar5 % 5; if (uVar5 != 0) { @@ -10958,7 +10958,7 @@ LAB_0061b0d0: if ((uVar5 & 1) == 0) { pEVar4 = this->_player; ppvVar1 = &pEVar4[4]._config; - *ppvVar1 = (void *)((int)*ppvVar1 + 1); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 1); spawn_blue_spider(&local_30,pEVar4,&g_vectorZero); ((Entity *)((Entity *)this))->Entity::convert_shot_for_enemy_owner(shot); ExceptionList = local_10; @@ -11021,9 +11021,9 @@ LAB_0061acb1: uVar5 = uVar5 >> ((byte)(this->_dropRNG)._shift1 & 0x1f) ^ uVar5; uVar5 = uVar5 << ((byte)(this->_dropRNG)._shift2 & 0x1f) ^ uVar5; pEVar6 = (EntityPtr *)(uVar5 >> ((byte)(this->_dropRNG)._shift3 & 0x1f) ^ uVar5); - dropRng->_seed = (int)pEVar6; + dropRng->_seed = GHIDRA_INT(pEVar6); local_14 = pEVar6; - if (((uint)pEVar6 & 1) == 0) { + if ((GHIDRA_UINT(pEVar6) & 1) == 0) { if (pEVar6 == (EntityPtr *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pEVar6 = (EntityPtr *)dropRng->_seed; @@ -11033,7 +11033,7 @@ LAB_0061acb1: return; } } - uVar5 = (uint)pEVar6 >> ((byte)(this->_dropRNG)._shift1 & 0x1f) ^ (uint)pEVar6; + uVar5 = GHIDRA_UINT(pEVar6) >> ((byte)(this->_dropRNG)._shift1 & 0x1f) ^ GHIDRA_UINT(pEVar6); uVar5 = uVar5 << ((byte)(this->_dropRNG)._shift2 & 0x1f) ^ uVar5; uVar5 = uVar5 >> ((byte)(this->_dropRNG)._shift3 & 0x1f) ^ uVar5; dropRng->_seed = uVar5; @@ -11072,7 +11072,7 @@ LAB_0061acb1: return; } } - uVar5 = (uint)local_14 >> ((byte)(this->_dropRNG)._shift1 & 0x1f) ^ (uint)local_14; + uVar5 = GHIDRA_UINT(local_14) >> ((byte)(this->_dropRNG)._shift1 & 0x1f) ^ GHIDRA_UINT(local_14); uVar5 = uVar5 << ((byte)(this->_dropRNG)._shift2 & 0x1f) ^ uVar5; uVar5 = uVar5 >> ((byte)(this->_dropRNG)._shift3 & 0x1f) ^ uVar5; dropRng->_seed = uVar5; @@ -11146,11 +11146,11 @@ LAB_0061acb1: this->_subtype = 1; local_1c = 3.75548e-43; seed_fart_sound_override((int *)&local_1c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_1c,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_1c),1.0,2,0,1.0,0.0); fVar11 = local_30.y; LAB_0061af9a: dropRng = &this->_dropRNG; - iVar7 = this->_coins - (int)local_18; + iVar7 = this->_coins - GHIDRA_INT(local_18); iVar8 = 0; if (0 < iVar7) { iVar8 = iVar7; @@ -11176,9 +11176,9 @@ LAB_0061af9a: uVar5 = uVar5 << ((byte)(this->_dropRNG)._shift2 & 0x1f) ^ uVar5; uVar5 = uVar5 >> ((byte)(this->_dropRNG)._shift3 & 0x1f) ^ uVar5; dropRng->_seed = uVar5; - ((Game *)(game))->Game::Spawn(5,(uint)fVar11,&pickupPos,&g_vectorZero,(Entity *)this,(uint)local_28[0],uVar5) + ((Game *)(game))->Game::Spawn(5,GHIDRA_UINT(fVar11),&pickupPos,&g_vectorZero,(Entity *)this,GHIDRA_UINT(local_28[0]),uVar5) ; - local_1c = (float)((int)local_1c + -1); + local_1c = (float)(GHIDRA_INT(local_1c) + -1); } while (local_1c != 0.0); ExceptionList = local_10; return; @@ -11232,7 +11232,7 @@ LAB_0061b99b: if (this->_variant == 0x3f) { local_44[0] = 1.20372e-42; seed_fart_sound_override((int *)local_44); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_44[0],1.0,0x1c2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_44[0]),1.0,0x1c2,0,1.0,0.0); goto LAB_0061b99b; } } @@ -11284,7 +11284,7 @@ LAB_0061bb14: isLess = bVar1 < (byte)*animName; if (bVar1 != *animName) { LAB_0061bcd3: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0061bcd8; } if (bVar1 == 0) break; @@ -11314,7 +11314,7 @@ LAB_0061bcd8: isLess = bVar1 < (byte)*animName; if (bVar1 != *animName) { LAB_0061bb92: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0061bb97; } if (bVar1 == 0) break; @@ -11363,7 +11363,7 @@ LAB_0061bb97: isLess = bVar1 < *idleAnimName; if (bVar1 != *idleAnimName) { LAB_0061bbf7: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0061bbfc; } if (bVar1 == 0) break; @@ -11444,7 +11444,7 @@ void Entity_Familiar::ai_daddy_longlegs() bVar6 = bVar1 < *pbVar5; if (bVar1 != *pbVar5) { LAB_0061bee3: - uVar3 = -(uint)bVar6 | 1; + uVar3 = -GHIDRA_UINT(bVar6) | 1; goto LAB_0061bee8; } if (bVar1 == 0) break; @@ -11497,7 +11497,7 @@ LAB_0061bee8: bVar6 = bVar1 < *idleName; if (bVar1 != *idleName) { LAB_0061c020: - uVar3 = -(uint)bVar6 | 1; + uVar3 = -GHIDRA_UINT(bVar6) | 1; goto LAB_0061c025; } if (bVar1 == 0) break; @@ -11524,7 +11524,7 @@ LAB_0061c058: } if ((this->_sprite)._animState._animData != (void *)0x0) { dVar10 = floor((double)(this->_sprite)._animState._animFrame); - if ((9 < (int)dVar10) && ((int)dVar10 < 0x20)) { + if ((9 < GHIDRA_INT(dVar10)) && (GHIDRA_INT(dVar10) < 0x20)) { if ((*(int *)&g_game->_deathmatchManager < 2) || (iVar4 = ((ANM2 *)(&this->_sprite))->ANM2::GetFrame(), iVar4 < 0x11)) { iVar4 = 3; @@ -11682,7 +11682,7 @@ void Entity_Familiar::ai_key_full() isLess = bVar4 < (byte)*floatNameChar; if (bVar4 != *floatNameChar) { LAB_0061d9bd: - uVar5 = -(uint)isLess | 1; + uVar5 = -GHIDRA_UINT(isLess) | 1; goto LAB_0061d9c2; } if (bVar4 == 0) break; @@ -11717,7 +11717,7 @@ LAB_0061d784: isLess = bVar4 < *pbVar7; if (bVar4 != *pbVar7) { LAB_0061d7a4: - uVar5 = -(uint)isLess | 1; + uVar5 = -GHIDRA_UINT(isLess) | 1; goto LAB_0061d7a9; } if (bVar4 == 0) break; @@ -11725,7 +11725,7 @@ LAB_0061d7a4: uVar5 = 0; LAB_0061d7a9: if ((uVar5 != 0) || - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) != '\0' && + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) != '\0' && ((this->_sprite)._animState._isPlaying == 0)))) { LAB_0061d7bc: bVar4 = ((ANM2 *)(&this->_sprite))->ANM2::SetAnimation(s_Idle,1); @@ -11758,15 +11758,15 @@ LAB_0061d7bc: } local_18 = 2.85865e-43; seed_fart_sound_override((int *)&local_18); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_18,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_18),1.0,2,0,1.0,0.0); game = g_game; iVar2 = (this_00->_desc)._variant; if (iVar2 != 4) { if (iVar2 == 5) { qVar3 = g_game->_gameStateFlags; - puVar1 = (uint *)((int)&g_game->_gameStateFlags + 4); + puVar1 = (uint *)(GHIDRA_INT(&g_game->_gameStateFlags) + 4); *puVar1 = *puVar1 | 0x20000; - *(int *)&game->_gameStateFlags = (int)qVar3; + *(int *)&game->_gameStateFlags = GHIDRA_INT(qVar3); } (this_00->_desc)._variant = 8; ((GridEntity_Door *)(this_00))->GridEntity_Door::UpdateAnimation(); @@ -11920,7 +11920,7 @@ void Entity_Familiar::Update() local_14 = -NAN; puStack_18 = &LAB_00af6c90; local_1c = ExceptionList; - local_24 = (void *)(__security_cookie ^ (uint)((&local_54)[1]._colorize + 2)); + local_24 = (void *)(__security_cookie ^ GHIDRA_UINT(((&local_54)[1]._colorize + 2))); ExceptionList = &local_1c; self = this; pfVar10 = (&local_54)[1]._offset + 1; @@ -11942,7 +11942,7 @@ void Entity_Familiar::Update() bVar1 = (byte)piVar11[0x30]; } if (bVar1 < 5) { - fVar13 = *(float *)((int)(&(g_manager->_itemConfig)._wispGfxRoot + 1) + (uint)bVar1 * 4); + fVar13 = *(float *)(GHIDRA_INT((&(g_manager->_itemConfig)._wispGfxRoot + 1)) + GHIDRA_UINT(bVar1) * 4); } else { fVar13 = 1.0; @@ -11973,24 +11973,24 @@ void Entity_Familiar::Update() in_stack_fffffd28 = (void *)0x3; in_stack_fffffd20 = 0x61dbab; EntityList::QuerySublist - ((EntityList *)((int)game->_room + 0x1218),in_stack_fffffd24,3,-1,-1,1,0); + ((EntityList *)(GHIDRA_INT(game->_room) + 0x1218),in_stack_fffffd24,3,-1,-1,1,0); local_14 = 0.0; local_118 = (Entity_Player *)0x0; if (local_5c != (char *)0x0) { do { - in_stack_fffffd28 = *(void **)(local_68._4_4_ + (int)local_118 * 4); + in_stack_fffffd28 = *(void **)((*(undefined4 *)((char *)&(local_68) + 0x4)) + GHIDRA_INT(local_118) * 4); in_stack_fffffd24 = (EntityList_EL *)0x61dbd9; otherFamiliar = (int *)__RTDynamicCast(); if (((otherFamiliar != (int *)0x0) && ((void *)otherFamiliar[0x104] == this->_player)) && ((*(char *)((char *)otherFamiliar + 0x172) != '\0' && (otherFamiliar[0x35c] == 0)))) { - local_130.y = (float)((int)local_130.y + 1); + local_130.y = (float)(GHIDRA_INT(local_130.y) + 1); if ((piVar11 == (int *)0x0) && (otherFamiliar[0xb] == 0x21)) { piVar11 = otherFamiliar; } } local_118 = (Entity_Player *)&(*(undefined1 *)((char *)(local_118) + 0x1)); } while (local_118 < local_5c); - if (3 < (int)local_130.y) { + if (3 < GHIDRA_INT(local_130.y)) { if (this->_variant == 0x21) { iVar9 = *(int *)this; } @@ -12006,7 +12006,7 @@ LAB_0061dc46: ((Entity *)((Entity *)this))->Entity::Update(); if (local_68[0] == '\0') { local_14 = 1.4013e-45; - tracked_alloc(1,(void *)local_68._4_4_,0); + tracked_alloc(1,(*(undefined4 *)((char *)&((void *)local_68) + 0x4)),0); ExceptionList = local_1c; return; } @@ -12015,7 +12015,7 @@ LAB_0061dc46: } if (local_68[0] == '\0') { local_14 = 2.8026e-45; - tracked_alloc(1,(void *)local_68._4_4_,0); + tracked_alloc(1,(*(undefined4 *)((char *)&((void *)local_68) + 0x4)),0); } local_14 = -NAN; game = g_game; @@ -12244,12 +12244,12 @@ switchD_0061ddf2_caseD_2: ((Vector *)(&this->_pos))->Vector::__sub(&local_140,scratchVec); local_128.y = ((Vector *)(&local_140))->Vector::LengthSquared(); if (local_128.y <= 900.0) { - local_130.y = (float)((double)(int)tmpEntity + __uint_to_double_fixup[-((int)tmpEntity >> 0x1f)]); + local_130.y = (float)((double)GHIDRA_INT(tmpEntity) + __uint_to_double_fixup[-(GHIDRA_INT(tmpEntity) >> 0x1f)]); } else { scratchVec = ((Vector *)(&local_140))->Vector::Normalized(&local_158); - local_130.y = (float)((double)(int)local_11c + - __uint_to_double_fixup[-((int)local_11c >> 0x1f)]); + local_130.y = (float)((double)GHIDRA_INT(local_11c) + + __uint_to_double_fixup[-(GHIDRA_INT(local_11c) >> 0x1f)]); local_128.y = local_130.y + local_130.y + 15.0; fVar13 = ((Vector *)(&local_140))->Vector::Length(); local_16c.y = local_128.y - fVar13; @@ -12321,7 +12321,7 @@ LAB_0061f2a8: bVar1 = ((ANM2 *)(&this->_sprite))->ANM2::IsFinishedImpl(&DAT_00b1d3b0); if (bVar1 != 0) { ((ANM2 *)(&this->_sprite))->ANM2::Play(s_Idle,0); - Entity_Player::UseActiveItem(this->_player,(short *)((int)&local_134 + 2),0x23,1,-1,0); + Entity_Player::UseActiveItem(this->_player,(short *)(GHIDRA_INT(&local_134) + 2),0x23,1,-1,0); itemOverlay = (ItemOverlay *)((Game *)(g_game))->Game::GetItemOverlay(); ((ItemOverlay *)(itemOverlay))->ItemOverlay::Show(1,0,(Entity_Player *)0x0); } @@ -12521,7 +12521,7 @@ LAB_0061dea4: ((Vector *)(&local_140))->Vector::__div_assign((float *)&local_118); floatResult = (float10)((Entity *)((Entity *)tmpEntity))->Entity::Mass(); sourceRef = (Entity_Player *)(float)floatResult; - if (local_134._3_1_ != '\0') { + if ((*(undefined1 *)((char *)&(local_134) + 0x3)) != '\0') { local_130.y = (float)sourceRef; FUN_00431260(); } @@ -12537,7 +12537,7 @@ LAB_0061dea4: ((EntityRef *)((EntityRef *)(local_a8 + 4)))->EntityRef::constructor((Entity *)self); Entity::AddKnockback ((Entity *)local_11c,(EntityRef *)(local_a8 + 4),scratchVec, - (int)fVar13,1); + GHIDRA_INT(fVar13),1); this = self; } } @@ -12554,9 +12554,9 @@ LAB_0061dea4: SoundEffects::PlayWithFartOverride(0xb2,1.0,2,0,1.0); uVar4 = Random(); tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,2,scratchVec,&g_vectorZero,(Entity *)this, - (local_134._3_1_ != '\0') + 3,uVar4); + ((*(undefined1 *)((char *)&(local_134) + 0x3)) != '\0') + 3,uVar4); tmpEntity->Update(); - if (local_134._3_1_ != '\0') { + if ((*(undefined1 *)((char *)&(local_134) + 0x3)) != '\0') { local_118 = (Entity_Player *)0x3; do { MusicManager::RandomVector(&local_140); @@ -12580,7 +12580,7 @@ LAB_0061dea4: effect = (Entity_Effect *) ((Game *)(g_game))->Game::Spawn(1000,0x2e,scratchVec,&g_vectorZero,(Entity *)this,0,uVar4) ; - if (local_134._3_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_134) + 0x3)) == '\0') { local_128.y = 1.2; } else { @@ -12593,8 +12593,8 @@ LAB_0061dea4: local_118 = (Entity_Player *)0x0; do { Vector::FromAngle(&local_140, - (float)((double)(int)local_118 + - __uint_to_double_fixup[-((int)local_118 >> 0x1f)]) * 360.0 + (float)((double)GHIDRA_INT(local_118) + + __uint_to_double_fixup[-(GHIDRA_INT(local_118) >> 0x1f)]) * 360.0 * 0.125); uVar4 = Random(); local_128.y = 12.0; @@ -12604,7 +12604,7 @@ LAB_0061dea4: tmpEntity->Update(); local_118 = (Entity_Player *)&(*(undefined1 *)((char *)(local_118) + 0x1)); } while (local_118 < &DAT_00000008); - if (local_134._3_1_ != '\0') { + if ((*(undefined1 *)((char *)&(local_134) + 0x3)) != '\0') { local_118 = (Entity_Player *)0xa; do { MusicManager::RandomVector(&local_140); @@ -13204,7 +13204,7 @@ LAB_0061f886: ai_lil_monstro(this); goto switchD_0061ddf2_caseD_62; case 100: - if ((uint)this->_subtype < *(uint *)&(*(undefined1 *)((char *)(this) + 0xf38))) { + if (GHIDRA_UINT(this->_subtype) < *(uint *)&(*(undefined1 *)((char *)(this) + 0xf38))) { FollowParent(this); } else { @@ -13306,7 +13306,7 @@ LAB_0061f886: local_17c.x = scratchVec->x; local_17c.y = scratchVec->y; local_128.y = 1.333; - if (local_134._3_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_134) + 0x3)) == '\0') { scratchVec = ((Vector *)(&local_17c))->Vector::__mul(&local_184,&local_128.y); ((Entity *)((Entity *)tear))->Entity::SetVelocity(scratchVec); } @@ -13402,7 +13402,7 @@ LAB_00620f26: this->_visible = 0; iVar9 = Isaac::Random(2); local_118 = (Entity_Player *)(iVar9 + 3); - if (0 < (int)local_118) { + if (0 < GHIDRA_INT(local_118)) { do { uVar4 = Random(); room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); @@ -13424,11 +13424,11 @@ LAB_00620f26: this->_friction = this->_friction * 0.7; break; } - local_68._4_4_ = "WalkDown"; - local_68._8_4_ = &DAT_00b1e020; + (*(undefined4 *)((char *)&(local_68) + 0x4)) = "WalkDown"; + (*(undefined4 *)((char *)&(local_68) + 0x8)) = &DAT_00b1e020; local_5c = "WalkHori"; - local_78._4_4_ = "FlyDown"; - local_78._8_4_ = &DAT_00b1ddc0; + (*(undefined4 *)((char *)&(local_78) + 0x4)) = "FlyDown"; + (*(undefined4 *)((char *)&(local_78) + 0x8)) = &DAT_00b1ddc0; pcStack_6c = "FlyHori"; bVar1 = ((Entity *)(this->_player))->Entity::IsFlying(); gridIndexCounts = local_78; @@ -13448,7 +13448,7 @@ LAB_00620f26: ((ANM2 *)(sprite))->ANM2::Play(*(byte **)((char *)local_130.y + 4),0); } else { - ((ANM2 *)(sprite))->ANM2::Play(((std_vector *)((int)local_130.y + 8))->_begin,0); + ((ANM2 *)(sprite))->ANM2::Play(((std_vector *)(GHIDRA_INT(local_130.y) + 8))->_begin,0); ((Sprite *)((Sprite *)&this->_sprite))->Sprite::set_flip_x(local_120 == (Entity_Familiar *)0x0); } } @@ -13613,7 +13613,7 @@ LAB_00620f26: local_128.y = (float)floatResult; local_134 = (Entity_Tear *)CONCAT13(1.0 < local_128.y,(undefined3)local_134); layer = ((Sprite *)((Sprite *)&this->_sprite))->Sprite::GetLayer((byte *)0x0); - layer->_flipX = local_134._3_1_; + layer->_flipX = (*(undefined1 *)((char *)&(local_134) + 0x3)); ((Game *)(g_game))->Game::GetField26614(); cVar2 = DeathmatchManager::is_active(); iVar9 = 3; @@ -13743,7 +13743,7 @@ LAB_00620f26: fVar13 = ((Vector *)(&local_140))->Vector::GetAngleDegrees(); local_128.y = fVar13 + 45.0; fVar13 = normalize_angle_degrees(local_128.y); - local_134 = (Entity_Tear *)(int)((1.0 - (fVar13 + 180.0) / 360.0) * 8.0); + local_134 = (Entity_Tear *)GHIDRA_INT(((1.0 - (fVar13 + 180.0) / 360.0) * 8.0)); if (0 < this->_fireCooldown) { this->_fireCooldown = this->_fireCooldown + -1; } @@ -13809,11 +13809,11 @@ LAB_00621e31: entityList = local_164; } local_14 = -NAN; - this->_fireCooldown = (int)entityList; + this->_fireCooldown = GHIDRA_INT(entityList); ((EntityList_Query *)(local_78))->EntityList_Query::~EntityList_Query(); scratchVec = &this->_pos; } - ((Sprite *)((Sprite *)&this->_sprite))->Sprite::SetFrame_1((int)local_134); + ((Sprite *)((Sprite *)&this->_sprite))->Sprite::SetFrame_1(GHIDRA_INT(local_134)); scratchVec2 = ((Entity *)(this->_player))->Entity::Position(&local_158); scratchVec2 = GetOrbitPosition(this,&local_174,scratchVec2); goto LAB_0061ec34; @@ -13896,7 +13896,7 @@ LAB_00621e31: scratchVec2 = ((Entity *)((Entity *)tmpEntity))->Entity::Position(&local_184); uVar4 = ((Entity *)((Entity *)local_120))->Entity::Variant(); ((Game *)(g_game))->Game::Spawn(2,uVar4,scratchVec2,scratchVec,(Entity *)local_150.y, - (uint)local_160.y,(uint)local_16c.y); + GHIDRA_UINT(local_160.y),GHIDRA_UINT(local_16c.y)); tear = (Entity_Tear *)__RTDynamicCast(); tmpEntity = local_120; floatResult = (float10)((Entity_Tear *)((Entity_Tear *)local_120))->Entity_Tear::Height(); @@ -13938,8 +13938,8 @@ LAB_00621e31: ((Entity *)((Entity *)tear))->Entity::SetParent(tmpEntity); tmpEntity = (Entity *)((Entity *)((Entity *)tmpEntity))->Entity::SpawnerEntity(); ((Entity *)((Entity *)tear))->Entity::SetSpawnerEntity(tmpEntity); - local_16c.y = (float)(int)local_118; - if (local_134._3_1_ == '\0') { + local_16c.y = (float)GHIDRA_INT(local_118); + if ((*(undefined1 *)((char *)&(local_134) + 0x3)) == '\0') { scratchVec = ((Entity *)((Entity *)tear))->Entity::Velocity(&local_1c8); scratchVec = ((Vector *)(scratchVec))->Vector::Rotated(&local_1c0,30.0 - local_16c.y * 20.0); } @@ -13957,7 +13957,7 @@ LAB_00621e31: local_118 = (Entity_Player *)&(*(undefined1 *)((char *)(local_118) + 0x1)); local_11c = (Entity_Familiar *)&tmpEntity->_variant; tmpEntity = local_120; - } while ((int)local_11c < 0xc7fd10); + } while (GHIDRA_INT(local_11c) < 0xc7fd10); LAB_006223ae: this = self; goto LAB_006223b4; @@ -13990,7 +13990,7 @@ LAB_006223d9: uVar4 = ((Entity *)((Entity *)local_120))->Entity::Variant(); uVar6 = ((Entity *)((Entity *)local_120))->Entity::Type(); ((Game *)(g_game))->Game::Spawn(uVar6,uVar4,scratchVec,(Vector *)local_16c.y,(Entity *)local_11c, - (uint)local_160.y,(uint)local_150.y); + GHIDRA_UINT(local_160.y),GHIDRA_UINT(local_150.y)); bomb = (Entity_Bomb *)__RTDynamicCast(); tmpEntity = local_120; ((Entity_Bomb *)((Entity_Bomb *)local_120))->Entity_Bomb::IsFetus(); @@ -14007,7 +14007,7 @@ LAB_006223d9: ((Entity_Bomb *)(bomb))->Entity_Bomb::SetExplosionCountdown(iVar9); ((Entity_Bomb *)((Entity_Bomb *)tmpEntity))->Entity_Bomb::RadiusMultiplier(); FUN_00435e70(); - local_11c = (Entity_Familiar *)(30.0 - (float)(int)local_118 * 20.0); + local_11c = (Entity_Familiar *)(30.0 - (float)GHIDRA_INT(local_118) * 20.0); scratchVec = ((Entity *)((Entity *)bomb))->Entity::Velocity(&local_210); scratchVec = ((Vector *)(scratchVec))->Vector::Rotated(&local_218,(float)local_11c); ((Entity *)((Entity *)bomb))->Entity::SetVelocity(scratchVec); @@ -14017,8 +14017,8 @@ LAB_006223d9: FUN_0060ce10(); bomb->SetColor(); local_118 = (Entity_Player *)&(*(undefined1 *)((char *)(local_118) + 0x1)); - local_134 = (Entity_Tear *)((int)local_134 + 0x2c); - } while ((int)local_134 < 0xc7fd10); + local_134 = (Entity_Tear *)(GHIDRA_INT(local_134) + 0x2c); + } while (GHIDRA_INT(local_134) < 0xc7fd10); goto LAB_006223ae; } LAB_006223b4: @@ -14051,7 +14051,7 @@ LAB_00622760: scratchVec2 = ((Entity *)((Entity *)tear))->Entity::Position((Vector *)(local_1a4 + 8)); uVar4 = ((Entity *)((Entity *)local_134))->Entity::Variant(); ((Game *)(g_game))->Game::Spawn(7,uVar4,scratchVec2,scratchVec,(Entity *)local_11c, - (uint)local_160.y,(uint)local_150.y); + GHIDRA_UINT(local_160.y),GHIDRA_UINT(local_150.y)); tmpEntity = (Entity_Familiar *)__RTDynamicCast(); local_120 = tmpEntity; scratchVec = (Vector *)((Entity *)((Entity *)local_134))->Entity::PositionOffset(); @@ -14109,7 +14109,7 @@ LAB_00622ab7: FUN_005cd5a0(); tmpEntity->Update(); local_118 = (Entity_Player *)&(*(undefined1 *)((char *)(local_118) + 0x1)); - if (3 < (int)local_118) goto LAB_00622b6f; + if (3 < GHIDRA_INT(local_118)) goto LAB_00622b6f; tear = local_134; goto LAB_00622760; } @@ -14217,7 +14217,7 @@ LAB_006223ba: local_148.y = (float)floatResult; local_134 = (Entity_Tear *)CONCAT13(1.0 < local_148.y,(undefined3)local_134); layer = ((Sprite *)((Sprite *)&this->_sprite))->Sprite::GetLayer((byte *)0x0); - layer->_flipX = local_134._3_1_; + layer->_flipX = (*(undefined1 *)((char *)&(local_134) + 0x3)); bVar1 = ((Entity *)((Entity *)this))->Entity::IsFrame(7,0); if (bVar1 != 0) { room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); @@ -14291,7 +14291,7 @@ LAB_0061e4de: tmpEntity = (Entity_Familiar *)((Room *)(room))->Room::GetGridIndex(&this->_pos); local_148.y = (float)tmpEntity; room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); - gridEntity = ((Room *)(room))->Room::GetGridEntity((uint)tmpEntity); + gridEntity = ((Room *)(room))->Room::GetGridEntity(GHIDRA_UINT(tmpEntity)); if (((gridEntity == (GridEntity *)0x0) || (iVar9 = ((GridEntity *)(gridEntity))->GridEntity::GetType(), iVar9 == 1)) || (iVar9 = ((GridEntity *)(gridEntity))->GridEntity::GetType(), iVar9 == 10)) { @@ -14300,7 +14300,7 @@ LAB_0061e4de: if (bVar1 == 0) { room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); uVar4 = ((RNG *)(&this->_dropRNG))->RNG::Next(); - ((Room *)(room))->Room::SpawnGridEntity((int)local_148.y,0xe,6,uVar4,0); + ((Room *)(room))->Room::SpawnGridEntity(GHIDRA_INT(local_148.y),0xe,6,uVar4,0); Game::ButterBeanFart(g_game,&this->_pos,120.0,this->_player,0,0); } } @@ -14359,7 +14359,7 @@ LAB_00623343: local_16c.y = (float)(iVar9 + 4); fVar13 = apply_tear_modifiers(this); local_11c = (Entity_Familiar *)(fVar13 * 3.5); - if (0 < (int)(iVar9 + 4)) { + if (0 < GHIDRA_INT((iVar9 + 4))) { do { MusicManager::RandomVector(&local_140); local_148.y = 10.0; @@ -14380,10 +14380,10 @@ LAB_00623343: ((Entity_Projectile *)((Entity_Projectile *)tear))->Entity_Projectile::set_falling_accel(0.8); random_float(); FUN_00444c70(); - flags._l._4_4_ = local_78._4_4_; - flags._l._0_4_ = local_78._0_4_; - flags._h._0_4_ = local_78._8_4_; - flags._h._4_4_ = pcStack_6c; + (*(undefined4 *)((char *)&(flags._l) + 0x4)) = (*(undefined4 *)((char *)&(local_78) + 0x4)); + (*(undefined4 *)((char *)&(flags._l) + 0x0)) = (*(undefined4 *)((char *)&(local_78) + 0x0)); + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = (*(undefined4 *)((char *)&(local_78) + 0x8)); + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = pcStack_6c; ((Entity_Tear *)(tear))->Entity_Tear::SetTearFlags(flags); tear->SetColor(); iVar9 = Isaac::Random(2); @@ -14415,7 +14415,7 @@ LAB_00623343: FUN_004508a0(); } tear->Update(); - local_16c.y = (float)&(*(undefined1 *)((char *)(((Entity_Tear *)((int)local_16c.y + -0x848))) + 0x847)); + local_16c.y = (float)&(*(undefined1 *)((char *)(((Entity_Tear *)(GHIDRA_INT(local_16c.y) + -0x848))) + 0x847)); } while ((undefined1 *)local_16c.y != (undefined1 *)0x0); local_16c.y = 0.0; } @@ -14456,11 +14456,11 @@ LAB_00623343: bVar1 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x100); if ((bVar1 == 0) && (bVar1 = ((Entity *)(tmpEntity))->Entity::IsVulnerableEnemy((Entity *)0x0), bVar1 != 0)) { - local_130.y = (float)((int)local_130.y + 1); + local_130.y = (float)(GHIDRA_INT(local_130.y) + 1); } } else { - local_130.y = (float)((int)local_130.y + 1); + local_130.y = (float)(GHIDRA_INT(local_130.y) + 1); } } sourceRef = (Entity_Player *)local_130.y; @@ -14469,7 +14469,7 @@ LAB_00623343: } while (local_118 < listSize); } iVar9 = 5; - if ((int)sourceRef < 1) { + if (GHIDRA_INT(sourceRef) < 1) { iVar9 = 0x14; } iVar9 = Isaac::Random(iVar9); @@ -14639,7 +14639,7 @@ LAB_00623343: local_148.y = 26.0; scratchVec = Vector::operator_mul((Vector *)(local_68 + 8),&local_148.y,scratchVec); ((Vector *)(&local_160))->Vector::operator_assign(scratchVec); - if (local_134._3_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_134) + 0x3)) == '\0') { room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); iVar9 = ((Room *)(room))->Room::GetFrameCount(); if (0x1e < iVar9) { @@ -14749,7 +14749,7 @@ LAB_00623343: ((Entity *)((Entity *)this))->Entity::ClearEntityFlags(0x400000000000000); uVar4 = this->_state & 0x80000003; isEveryFourthState = uVar4 == 0; - if ((int)uVar4 < 0) { + if (GHIDRA_INT(uVar4) < 0) { isEveryFourthState = (uVar4 - 1 | 0xfffffffc) == 0xffffffff; } if (isEveryFourthState) { @@ -14925,7 +14925,7 @@ LAB_0062442e: gridIndexCounts = &(*(undefined1 *)((char *)(self) + 0xf3c)); if (self->_target != (EntityPtr)0x0) { local_148.y = (float)((PathFinder *)((PathFinder *)self->_target))->PathFinder::GetGridIndex(); - piVar11 = map_find_value(gridIndexCounts,(uint)&local_148.y); + piVar11 = map_find_value(gridIndexCounts,GHIDRA_UINT(&local_148.y)); *piVar11 = *piVar11 + 1; } FUN_0042c770(); @@ -15019,11 +15019,11 @@ void Entity_Familiar::Interpolate() if (orbitLayer == 8) { player = this->_player; isEffectActive = - ((TemporaryEffects *)((TemporaryEffects *)((int)player + 0x1508)))->TemporaryEffects::HasCollectibleEffect(0x4d); + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(player) + 0x1508)))->TemporaryEffects::HasCollectibleEffect(0x4d); if ((isEffectActive != 0) || (isEffectActive = TemporaryEffects::HasCollectibleEffect - ((TemporaryEffects *)((int)player + 0x1508),0x12a), isEffectActive != 0)) { + ((TemporaryEffects *)(GHIDRA_INT(player) + 0x1508),0x12a), isEffectActive != 0)) { baseFriction = baseFriction - this->_orbitSpeed * 0.25; if (360.0 < ABS(baseFriction)) { baseFriction = fmodf(baseFriction,360.0); @@ -15154,7 +15154,7 @@ void Entity_Familiar::Render(Vector *offset) local_8 = -NAN; puStack_c = &LAB_00af6cd1; local_10 = ExceptionList; - stackCookie = __security_cookie ^ (uint)(&tmpColor)[1]._colorize; + stackCookie = __security_cookie ^ GHIDRA_UINT((&tmpColor)[1]._colorize); ExceptionList = &local_10; renderOffset = offset; bVar3 = IsLilithBirthrightIncubus(this); @@ -15206,7 +15206,7 @@ void Entity_Familiar::Render(Vector *offset) fadedColor._colorize[1] = savedColorizeG; fadedColor._colorize[2] = savedColorizeB; fadedColor._colorize[3] = savedColorizeA; - fadedColor._offset._0_8_ = savedOffsetXY; + (*(undefined8 *)((char *)&(fadedColor._offset) + 0x0)) = savedOffsetXY; if (spriteColor != &fadedColor) { *(float (*) [2])(this->_sprite)._color._offset = savedOffsetXY; spriteColor->_tint[0] = savedTintR; @@ -15259,7 +15259,7 @@ LAB_00624ff9: tmpColor._colorize[2] = 0.0; tmpColor._colorize[3] = 0.0; tmpColor._tint[3] = - (float)((double)(int)DAT_00c5c978 + __uint_to_double_fixup[-((int)DAT_00c5c978 >> 0x1f)]) * + (float)((double)GHIDRA_INT(DAT_00c5c978) + __uint_to_double_fixup[-(GHIDRA_INT(DAT_00c5c978) >> 0x1f)]) * 2.3283062e-10 * 0.15 + 0.05; render_color_stack_push(&tmpColor); } @@ -15286,7 +15286,7 @@ LAB_00624ff9: } layerId = (byte *)0x1; do { - fVar7 = (float)((double)(int)layerId + __uint_to_double_fixup[-((int)layerId >> 0x1f)]); + fVar7 = (float)((double)GHIDRA_INT(layerId) + __uint_to_double_fixup[-(GHIDRA_INT(layerId) >> 0x1f)]); fVar6 = 1.0 - fVar7 * 0.125; local_d4 = (this->_sprite)._scale.x; iconPosX.y = (fVar7 * local_d0 * 0.125 + 0.0) / local_d4; @@ -15326,7 +15326,7 @@ LAB_0062578c: local_d8 = (int *)(*(float *)((char *)this->_player + 0x14f4) * -1.0); iconScaleX.y = -16.0 - (float)local_d8; do { - fVar7 = (float)((double)(int)layerId + __uint_to_double_fixup[-((int)layerId >> 0x1f)]); + fVar7 = (float)((double)GHIDRA_INT(layerId) + __uint_to_double_fixup[-(GHIDRA_INT(layerId) >> 0x1f)]); fVar6 = 1.0 - fVar7 / 9.0; local_d4 = (this->_sprite)._scale.x; iconPosX.y = ((fVar7 * local_d0) / 9.0 + 0.0) / local_d4; @@ -15357,9 +15357,9 @@ LAB_0062578c: iconScaleX.y = (float)flooredCoord; fVar7 = iconScaleX.y / (float)local_d8; local_f0 = 5.60519e-45; - local_d8 = (int *)((int)local_d0 + 0x568); + local_d8 = (int *)(GHIDRA_INT(local_d0) + 0x568); fVar6 = offset->y; - layerColor = (float *)((int)local_d0 + 0x1c0); + layerColor = (float *)(GHIDRA_INT(local_d0) + 0x1c0); (this->_renderPosition).x = iconPosX.y + offset->x; (this->_renderPosition).y = fVar7 + fVar6; do { @@ -15392,9 +15392,9 @@ LAB_0062578c: } local_d8 = local_d8 + 1; layerColor = layerColor + 0x45; - local_f0 = (float)((int)local_f0 + -1); + local_f0 = (float)(GHIDRA_INT(local_f0) + -1); } while (local_f0 != 0.0); - ((Sprite *)((Sprite *)((int)local_d0 + 4)))->Sprite::RenderLayer(0,&this->_renderPosition,&g_vectorZero, + ((Sprite *)((Sprite *)(GHIDRA_INT(local_d0) + 4)))->Sprite::RenderLayer(0,&this->_renderPosition,&g_vectorZero, &g_vectorZero); break; } @@ -15435,7 +15435,7 @@ LAB_0062578c: tmpColor._colorize[1] = fStack_84; tmpColor._colorize[2] = fStack_80; tmpColor._colorize[3] = fStack_7c; - tmpColor._offset._0_8_ = afStack_78; + (*(undefined8 *)((char *)&(tmpColor._offset) + 0x0)) = afStack_78; tmpColor._offset[2] = fStack_70; (**(code **)(*player + 0x3c))(&tmpColor,0xffffffff,0xff,0); ((Entity_Player *)(this->_player))->Entity_Player::RenderGlow(renderPos); @@ -15754,7 +15754,7 @@ void Entity_Familiar::TriggerRoomClear() Room::FindFreePickupSpawnPosition(g_game->_room,&spiderPos,&this->_pos,0.0,0,0,0); playerEntity = this->_player; spiderCounter = &playerEntity[4]._config; - *spiderCounter = (void *)((int)*spiderCounter + 1); + *spiderCounter = (void *)(GHIDRA_INT(*spiderCounter) + 1); spawn_blue_spider(&spiderPos,playerEntity,&g_vectorZero); ((Entity *)((Entity *)this))->Entity::convert_shot_for_enemy_owner(shot); iVar3 = iVar3 + -1; @@ -15852,10 +15852,10 @@ void Entity_Familiar::TriggerRoomClear() } uVar4 = ((RNG *)(&this->_dropRNG))->RNG::RandomInt(uVar4); if (*(int *)((char *)this->_player + 0x13c0) == 0x24) { - uVar4 = (int)(uVar4 << 2) / 3; + uVar4 = GHIDRA_INT((uVar4 << 2)) / 3; } dropChance = local_c.y; - if ((int)uVar4 < 0x21) { + if (GHIDRA_INT(uVar4) < 0x21) { this->_counter = this->_counter + 1; } goto LAB_0062acdf; @@ -15878,9 +15878,9 @@ void Entity_Familiar::TriggerRoomClear() local_c.y = 0.0; uVar4 = ((RNG *)(&this->_dropRNG))->RNG::RandomInt(uVar4); if (*(int *)((char *)this->_player + 0x13c0) == 0x24) { - uVar4 = (int)(uVar4 << 2) / 3; + uVar4 = GHIDRA_INT((uVar4 << 2)) / 3; } - if ((int)uVar4 < 10) { + if (GHIDRA_INT(uVar4) < 10) { uVar4 = ((RNG *)(&this->_dropRNG))->RNG::RandomInt(3); if (uVar4 == 0) { uVar4 = Random(); @@ -15889,7 +15889,7 @@ void Entity_Familiar::TriggerRoomClear() else { playerEntity = this->_player; spiderCounter = &playerEntity[4]._config; - *spiderCounter = (void *)((int)*spiderCounter + 1); + *spiderCounter = (void *)(GHIDRA_INT(*spiderCounter) + 1); spawn_blue_spider(&this->_pos,playerEntity,&g_vectorZero); ((Entity *)((Entity *)this))->Entity::convert_shot_for_enemy_owner(shot_00); } @@ -15922,12 +15922,12 @@ LAB_0062acdf: dropChance = dropChance * 0.75; } uVar4 = this->_roomClearCount & 0x800003ff; - if ((int)uVar4 < 0) { + if (GHIDRA_INT(uVar4) < 0) { uVar4 = (uVar4 - 1 | 0xfffffc00) + 1; } if ((pickupVariant != 0) && (0.0 < dropChance)) { if (dropChance < 1.0) { - if ((int)((float)(int)(uVar4 + 1) * dropChance) <= (int)((float)(int)uVar4 * dropChance)) + if (GHIDRA_INT(((float)GHIDRA_INT((uVar4 + 1)) * dropChance)) <= GHIDRA_INT(((float)GHIDRA_INT(uVar4) * dropChance))) goto LAB_0062ae77; playerEntity = this->_player; } @@ -15953,7 +15953,7 @@ LAB_0062acdf: if (this->_variant == 0x16) { local_10 = 3.06884e-43; seed_fart_sound_override((int *)&local_10); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_10,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_10),1.0,2,0,1.0,0.0); } } } @@ -15971,7 +15971,7 @@ LAB_0062ae77: local_10 = 6.60012e-43; this->_hearts = this->_hearts + 1; seed_fart_sound_override((int *)&local_10); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_10,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_10),1.0,2,0,1.0,0.0); paschal_candle_sync_effects(this); return; } @@ -16034,7 +16034,7 @@ LAB_0062b3e6: bVar8 = bVar3 < *pbVar7; if (bVar3 != *pbVar7) { LAB_0062b3d0: - uVar5 = -(uint)bVar8 | 1; + uVar5 = -GHIDRA_UINT(bVar8) | 1; goto LAB_0062b3d5; } if (bVar3 == 0) break; @@ -16050,18 +16050,18 @@ LAB_0062b3d5: goto LAB_0062b3e6; } pvVar1 = (g_manager->_itemConfig)._collectibles._begin; - if ((0x6d0 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar1 & 0xfffffffcU)) + if ((0x6d0 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar1) & 0xfffffffcU))) && (fVar2 = *(float *)((char *)pvVar1 + 0x6d0), fVar2 != 0.0)) { local_10 = *(undefined4 *)((char *)fVar2 + 0x78); local_18.y = 0.0; local_c = 0; local_18.x = fVar2; - ((TemporaryEffects *)((TemporaryEffects *)((int)this->_player + 0x1508)))->TemporaryEffects::RemoveEffect(&local_18,1); + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this->_player) + 0x1508)))->TemporaryEffects::RemoveEffect(&local_18,1); } LAB_0062b462: iVar6 = this->_variant; if (iVar6 == 0x2a) { - this->_subtype = (uint)this->_subtype >> 1; + this->_subtype = GHIDRA_UINT(this->_subtype) >> 1; } else if ((iVar6 == 0x77) || (iVar6 == 0x18)) { this->_subtype = 0; @@ -16070,7 +16070,7 @@ LAB_0062b462: if (g_game->_isStartingFromState == 0) { this->_hearts = 0; iVar6 = ((Entity_Player *)(this->_player))->Entity_Player::GetHealthType(); - if ((int)(2 - (uint)(iVar6 != 3)) < *(int *)(extraout_ECX + 0x1344)) { + if (GHIDRA_INT((2 - GHIDRA_UINT((iVar6 != 3)))) < *(int *)(extraout_ECX + 0x1344)) { this->_state = 4; fVar2 = *(float *)(extraout_ECX + 0x340); (this->_pos).x = *(float *)(extraout_ECX + 0x33c); @@ -16237,11 +16237,11 @@ LAB_0062c604: (this->_targetPosition).x = local_50.x; (this->_targetPosition).y = *(float *)((char *)pvVar3 + 0x18); uVar6 = Random(); - local_60.x = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + local_60.x = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * (fVar8 - local_60.x); uVar6 = Random(); (this->_targetPosition).x = - (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * 2.3283064e-10 + (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * (local_58.x - local_50.x) + (this->_targetPosition).x; (this->_targetPosition).y = local_60.x + (this->_targetPosition).y; uVar6 = Random(); @@ -16397,7 +16397,7 @@ LAB_0062c09b: } else { uVar6 = game->_enterDoor + 2U & 0x80000003; - if ((int)uVar6 < 0) { + if (GHIDRA_INT(uVar6) < 0) { uVar6 = (uVar6 - 1 | 0xfffffffc) + 1; } tmpVec = Isaac::GetAxisAlignedUnitVectorFromDir(&enterDirection,uVar6); @@ -16418,13 +16418,13 @@ switchD_0062bba7_caseD_11: uVar4 = 0; if (uVar6 != 0) { do { - local_50.x = (float)((double)(int)(uVar6 - 1) + - __uint_to_double_fixup[-((int)(uVar6 - 1) >> 0x1f)]); + local_50.x = (float)((double)GHIDRA_INT((uVar6 - 1)) + + __uint_to_double_fixup[-(GHIDRA_INT((uVar6 - 1)) >> 0x1f)]); if (local_50.x == 0.0) { KAGE_LogMessage(0x10,(byte *)"Start and End parameters cannot be the same!"); } playerPosY = *(undefined4 *)((char *)this->_player + 0x340); - fVar8 = ((float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) - 0.0 + fVar8 = ((float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) - 0.0 ) / (local_50.x - 0.0); if (fVar8 <= 0.0) { fVar8 = 0.0; @@ -16442,7 +16442,7 @@ switchD_0062bba7_caseD_11: uVar4 = uVar4 + 1; segment = *(int *)(*(int *)(iVar5 + 8) + (uVar6 & *(int *)(iVar5 + 0xc) - 1U) * 4); *(undefined4 *)(segment + 0xc) = (undefined4)DAT_00c79c58; - *(undefined4 *)(segment + 0x10) = DAT_00c79c58._4_4_; + *(undefined4 *)(segment + 0x10) = (*(undefined4 *)((char *)&(DAT_00c79c58) + 0x4)); *(undefined4 *)(segment + 0x14) = DAT_00c79c60; uVar6 = *(uint *)(iVar5 + 0x14); } while (uVar4 < uVar6); @@ -16463,7 +16463,7 @@ switchD_0062bba7_caseD_11: } else { uVar4 = Random(); - local_50.x = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) + local_50.x = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_50.x = local_50.x + local_50.x; fVar8 = cos(local_50.x); @@ -16571,7 +16571,7 @@ void Entity_Familiar::farting_baby_fart() int entityType; Manager *manager; - local_c = __security_cookie ^ (uint)&local_4c; + local_c = __security_cookie ^ GHIDRA_UINT(&local_4c); if (this->_variant != 0x70) { if (this->_variant == 0x7d) { uVar6 = this->_state; @@ -16639,7 +16639,7 @@ LAB_0062c990: local_38._tint[1] = (float)this->_variant; local_38._tint[2] = (float)this->_spawnerType; local_38._tint[3] = (float)this->_spawnerVariant; - local_4c = (uint)((this->_flags & 0x100) != 0); + local_4c = GHIDRA_UINT(((this->_flags & 0x100) != 0)); if ((this->_flags & 0x20000000) == 0) { uVar5 = 0; } @@ -16676,7 +16676,7 @@ LAB_0062c990: else { uVar3 = 4; } - local_38._offset[0] = (float)(uVar3 | uVar5 | (uint)((this->_flags & 0x100) != 0)); + local_38._offset[0] = (float)(uVar3 | uVar5 | GHIDRA_UINT(((this->_flags & 0x100) != 0))); local_38._offset[1] = (float)this; ((Entity *)(local_48))->Entity::AddPoison((EntityRef *)&local_38,0x96,0.0,0); room = (void *)local_44.x; @@ -16698,7 +16698,7 @@ LAB_0062cb69: bVar7 = bVar2 < *cmpAnimChar; if (bVar2 != *cmpAnimChar) { LAB_0062cbb0: - uVar6 = -(uint)bVar7 | 1; + uVar6 = -GHIDRA_UINT(bVar7) | 1; goto LAB_0062cbb5; } if (bVar2 == 0) break; @@ -16730,7 +16730,7 @@ LAB_0062cbe8: local_38._colorize[1] = 1.0; local_38._colorize[2] = 0.0; local_38._colorize[3] = 1.0; - ((Game *)((Game *)((int)g_game->_room + 0x1618)))->Game::start_poop_cloud_screen_effect(&local_38); + ((Game *)((Game *)(GHIDRA_INT(g_game->_room) + 0x1618)))->Game::start_poop_cloud_screen_effect(&local_38); local_38._tint[0] = 1.0; local_38._tint[1] = 1.0; local_38._tint[2] = 1.0; @@ -16759,7 +16759,7 @@ void Entity_Familiar::mongo_baby_pick_next_mimic() tries = 0; this->_subtype = 0; while( true ) { - iVar1 = (int)((ulonglong)((longlong)(mimicIndex + 1) * -0x2aaaaaab) >> 0x20); + iVar1 = GHIDRA_INT(((ulonglong)((longlong)(mimicIndex + 1) * -0x2aaaaaab) >> 0x20)); mimicIndex = mimicIndex + 1 + ((iVar1 >> 1) - (iVar1 >> 0x1f)) * 0xc; isOwned = Entity_Player::HasCollectible (this->_player,*(int *)(&DAT_00b648b0 + mimicIndex * 4),0); @@ -16810,7 +16810,7 @@ void Entity_Familiar::RemoveFromFollowers() EVar2 = *parentRef; if ((EVar2 != (EntityPtr)0x0) && (*(int *)((char *)EVar2 + 0x28) == 3)) { local_10 = this->_child; - EVar2 = (EntityPtr)((int)EVar2 + 0x3c0); + EVar2 = (EntityPtr)(GHIDRA_INT(EVar2) + 0x3c0); if (*(int *)EVar2 != 0) { local_14 = EVar2; std::multiset::erase(&local_14); @@ -16822,7 +16822,7 @@ void Entity_Familiar::RemoveFromFollowers() } EVar2 = this->_child; if (EVar2 != (EntityPtr)0x0) { - EVar1 = (EntityPtr)((int)EVar2 + 0x3bc); + EVar1 = (EntityPtr)(GHIDRA_INT(EVar2) + 0x3bc); local_10 = *parentRef; if (*(int *)((char *)EVar2 + 0x3bc) != 0) { local_14 = EVar1; @@ -16840,11 +16840,11 @@ void Entity_Familiar::RemoveFromFollowers() *parentRef = (EntityPtr)0x0; } else { - EVar1 = (EntityPtr)((int)leadBaby + 0x3bc); + EVar1 = (EntityPtr)(GHIDRA_INT(leadBaby) + 0x3bc); EVar3 = *(EntityPtr *)EVar1; if ((EVar3 != (EntityPtr)0x0) && (*(int *)((char *)EVar3 + 0x28) == 3)) { local_10 = *(EntityPtr *)((char *)EVar2 + 0x3c0); - EVar3 = (EntityPtr)((int)EVar3 + 0x3c0); + EVar3 = (EntityPtr)(GHIDRA_INT(EVar3) + 0x3c0); if (*(int *)EVar3 != 0) { local_c = EVar3; std::multiset::erase(&local_c); @@ -16856,7 +16856,7 @@ void Entity_Familiar::RemoveFromFollowers() } EVar3 = *(EntityPtr *)((char *)EVar2 + 0x3c0); if (EVar3 != (EntityPtr)0x0) { - local_c = (EntityPtr)((int)EVar3 + 0x3bc); + local_c = (EntityPtr)(GHIDRA_INT(EVar3) + 0x3bc); local_14 = *(EntityPtr *)EVar1; if (*(int *)((char *)EVar3 + 0x3bc) != 0) { local_10 = local_c; @@ -16872,12 +16872,12 @@ void Entity_Familiar::RemoveFromFollowers() std::multiset::erase(&local_14); } *(EntityPtr *)EVar1 = (EntityPtr)0x0; - EVar1 = (EntityPtr)((int)leadBaby + 0x3c0); + EVar1 = (EntityPtr)(GHIDRA_INT(leadBaby) + 0x3c0); if (*(EntityPtr *)EVar1 != (EntityPtr)0x0) { local_14 = EVar1; std::multiset::erase(&local_14); } - EVar3 = (EntityPtr)((int)EVar2 + 0x3bc); + EVar3 = (EntityPtr)(GHIDRA_INT(EVar2) + 0x3bc); *(EntityPtr *)EVar1 = (EntityPtr)0x0; if (*(EntityPtr *)EVar3 != (EntityPtr)0x0) { local_14 = EVar3; @@ -16886,7 +16886,7 @@ void Entity_Familiar::RemoveFromFollowers() *(EntityPtr *)EVar3 = (EntityPtr)0x0; this = (Entity_Familiar *)EVar2; } - EVar2 = (EntityPtr)((int)this + 0x3c0); + EVar2 = (EntityPtr)(GHIDRA_INT(this) + 0x3c0); if (*(EntityPtr *)EVar2 != (EntityPtr)0x0) { local_14 = EVar2; std::multiset::erase(&local_14); @@ -16899,7 +16899,7 @@ void Entity_Familiar::RemoveFromFollowers() EVar2 = this->_parent; parentRef = &this->_parent; if (EVar2 != (EntityPtr)0x0) { - EVar1 = (EntityPtr)((int)EVar2 + 0x3c0); + EVar1 = (EntityPtr)(GHIDRA_INT(EVar2) + 0x3c0); local_10 = this->_child; if (*(int *)((char *)EVar2 + 0x3c0) != 0) { local_14 = EVar1; @@ -16913,7 +16913,7 @@ void Entity_Familiar::RemoveFromFollowers() EVar2 = this->_child; childRef = &this->_child; if (EVar2 != (EntityPtr)0x0) { - local_10 = (EntityPtr)((int)EVar2 + 0x3bc); + local_10 = (EntityPtr)(GHIDRA_INT(EVar2) + 0x3bc); local_c = *parentRef; if (*(int *)((char *)EVar2 + 0x3bc) != 0) { local_14 = local_10; @@ -16976,7 +16976,7 @@ void Entity_Familiar::AddToFollowers() if (*(int *)((char *)chainEntity + 0x28) == 3) { iVar4 = __RTDynamicCast(chainEntity,0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Familiar::RTTI_Type_Descriptor,0, - __security_cookie ^ (int)register0x00000010 - 4U); + __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); if (((iVar4 != 0) && (*(char *)(iVar4 + 0xd74) != '\0')) && (this->_player == *(void **)(iVar4 + 0x410))) { KAGE_LogMessage(1,(byte *)"[warn] Tried to add familiar %d to followers again!\n"); @@ -16993,7 +16993,7 @@ void Entity_Familiar::AddToFollowers() } this->_isFollower = 1; iVar4 = GetFollowerPriority(this); - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&familiars,3,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&familiars,3,-1,-1,0,0); local_8 = 2; uVar3 = 0; if (familiars._size != 0) { @@ -17022,7 +17022,7 @@ LAB_0062de40: } pEVar1 = &this->_parent; local_18 = *(EntityPtr *)((char *)chainEntity + 0x3bc); - EVar5 = (EntityPtr)((int)chainEntity + 0x3bc); + EVar5 = (EntityPtr)(GHIDRA_INT(chainEntity) + 0x3bc); if (this->_parent != (EntityPtr)0x0) { local_14 = (EntityPtr)pEVar1; std::multiset::erase(&local_14); @@ -17032,7 +17032,7 @@ LAB_0062de40: std::multiset::insert(pEVar1); chainEntity = *pEVar1; if ((chainEntity != (EntityPtr)0x0) && (*(int *)((char *)chainEntity + 0x28) == 3)) { - childField = (EntityPtr)((int)chainEntity + 0x3c0); + childField = (EntityPtr)(GHIDRA_INT(chainEntity) + 0x3c0); if (*(int *)((char *)chainEntity + 0x3c0) != 0) { local_18 = childField; std::multiset::erase(&local_18); @@ -17054,7 +17054,7 @@ LAB_0062df8a: if (EVar5 == (EntityPtr)0x0) { LAB_0062dfde: *(EntityPtr *)((char *)chainEntity + 0x3c0) = (EntityPtr)this; - std::multiset::insert((EntityPtr *)((int)chainEntity + 0x3c0)); + std::multiset::insert((EntityPtr *)(GHIDRA_INT(chainEntity) + 0x3c0)); EVar5 = (EntityPtr)&this->_parent; if (this->_parent != (EntityPtr)0x0) { local_14 = EVar5; @@ -17064,7 +17064,7 @@ LAB_0062dfde: goto LAB_0062df8a; } if (*(int *)((char *)EVar5 + 0x28) != 3) { - local_14 = (EntityPtr)((int)chainEntity + 0x3c0); + local_14 = (EntityPtr)(GHIDRA_INT(chainEntity) + 0x3c0); std::multiset::erase(&local_14); goto LAB_0062dfde; } @@ -17073,7 +17073,7 @@ LAB_0062dfde: } while( true ); } LAB_0062df8f: - if (familiars._0_1_ != '\0') { + if ((*(undefined1 *)((char *)&(familiars) + 0x0)) != '\0') { ExceptionList = local_10; return; } @@ -17089,7 +17089,7 @@ LAB_0062df8f: if ((EntityPtr)this->_player != (EntityPtr)0x0) { std::multiset::insert(pEVar1); } - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&familiars,3,0xeb,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&familiars,3,0xeb,-1,0,0); local_8 = 0; uVar3 = 0; if (familiars._size != 0) { @@ -17104,11 +17104,11 @@ LAB_0062dbc5: chainEntity = EVar5; } if (*(int *)((char *)chainEntity + 0x3c0) != 0) { - local_14 = (EntityPtr)((int)chainEntity + 0x3c0); + local_14 = (EntityPtr)(GHIDRA_INT(chainEntity) + 0x3c0); std::multiset::erase(&local_14); } *(undefined4 *)((char *)chainEntity + 0x3c0) = this; - std::multiset::insert((undefined4 *)((int)chainEntity + 0x3c0)); + std::multiset::insert((undefined4 *)(GHIDRA_INT(chainEntity) + 0x3c0)); if (*pEVar1 != (EntityPtr)0x0) { local_14 = (EntityPtr)pEVar1; std::multiset::erase(&local_14); @@ -17144,7 +17144,7 @@ LAB_0062dbfb: isLess = bVar2 < (byte)expectedName->_buf[0]; if (bVar2 != expectedName->_buf[0]) { LAB_0062dd02: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0062dd07; } if (bVar2 == 0) break; @@ -17166,7 +17166,7 @@ LAB_0062dd07: } } LAB_0062dd2f: - if (familiars._0_1_ != '\0') { + if ((*(undefined1 *)((char *)&(familiars) + 0x0)) != '\0') { ExceptionList = local_10; return; } @@ -17177,11 +17177,11 @@ LAB_0062dfa3: return; LAB_0062de6b: uVar3 = uVar3 + 1; - if ((uint)familiars._size <= uVar3) goto LAB_0062df8f; + if (GHIDRA_UINT(familiars._size) <= uVar3) goto LAB_0062df8f; goto LAB_0062de40; LAB_0062dbf4: uVar3 = uVar3 + 1; - if ((uint)familiars._size <= uVar3) goto LAB_0062dbf9; + if (GHIDRA_UINT(familiars._size) <= uVar3) goto LAB_0062dbf9; goto LAB_0062dbc5; } @@ -17257,7 +17257,7 @@ void Entity_Familiar::ai_samsons_chains() Entity_Familiar *otherChain; Room *room; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); uStack_14 = 0xffffffff; puStack_18 = &LAB_00af3a60; local_1c = ExceptionList; @@ -17315,7 +17315,7 @@ void Entity_Familiar::ai_samsons_chains() iVar5 = this->_variant; (this->_velocity).x = (this->_velocity).x * 0.8836; (this->_velocity).y = (this->_velocity).y * 0.8836; - EntityList::QuerySublist((EntityList *)((int)game->_room + 0x1218),&chainList,3,iVar5,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(game->_room) + 0x1218),&chainList,3,iVar5,-1,0,0); uVar8 = 0; if (chainList._size != 0) { do { @@ -17343,7 +17343,7 @@ void Entity_Familiar::ai_samsons_chains() (this->_velocity).y = fVar10 + (this->_velocity).y; } uVar8 = uVar8 + 1; - } while (uVar8 < (uint)chainList._size); + } while (uVar8 < GHIDRA_UINT(chainList._size)); } if (14400.0 < local_3c) { if (local_40 <= 0.0) { @@ -17357,8 +17357,8 @@ void Entity_Familiar::ai_samsons_chains() local_40 = *(float *)((char *)this->_player + 0x33c) - fVar9; local_3c = *(float *)((char *)this->_player + 0x340) - local_3c; room = g_game->_room; - iVar7 = (int)((local_40 - 40.0) / 40.0 + 0.5); - iVar5 = (int)((local_3c - 120.0) / 40.0 + 0.5); + iVar7 = GHIDRA_INT(((local_40 - 40.0) / 40.0 + 0.5)); + iVar5 = GHIDRA_INT(((local_3c - 120.0) / 40.0 + 0.5)); if ((((iVar7 < 0) || (room->_gridWidth <= iVar7)) || (iVar5 < 0)) || (room->_gridHeight <= iVar5)) { iVar7 = -1; @@ -17390,20 +17390,20 @@ void Entity_Familiar::ai_samsons_chains() (this->_velocity).y = fVar9; } LAB_0062e5c3: - if (chainList._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(chainList) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (chainList._data != (void *)0x0) { uVar8 = *(uint *)((char *)chainList._data + -4); qVar3 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar8; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar8; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar3 < uVar8); - free((uint *)((int)chainList._data + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar3) < uVar8)); + free((uint *)(GHIDRA_INT(chainList._data) + -4)); } } ExceptionList = local_1c; @@ -17469,14 +17469,14 @@ LAB_0062e6b0: shootDirection = local_28; if (this->_variant == 0x4c) { rngResult = Random(); - local_28 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) + local_28 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_28 = local_28 + local_28; local_24.x = cos(local_28); aimDirection.y = sin(local_28); aimDirection.x = local_24.x; if (ABS(local_24.x) <= ABS(aimDirection.y)) { - shootDirection = (float)((uint)(0.0 <= aimDirection.y) * 2 + 1); + shootDirection = (float)(GHIDRA_UINT((0.0 <= aimDirection.y)) * 2 + 1); local_24.x = shootDirection; } else { @@ -17498,7 +17498,7 @@ LAB_0062e6b0: local_24.y = *(float *)(weaponTarget + 0x340) - (this->_pos).y; shootDirection = (float)vector_to_direction(&local_24); } - this->_shootDirection = (int)shootDirection; + this->_shootDirection = GHIDRA_INT(shootDirection); } if ((playerWeapon != 0) && (pvVar1 = this->_weapon, pvVar1 != (void *)0x0)) { *(float *)((char *)pvVar1 + 0x28) = markedAim.x; @@ -17673,7 +17673,7 @@ LAB_0062f0b9: local_44 = (this->_gridCollisionVelocity).y; local_38.y = local_44 + (this->_pos).y; local_38.x = (float)((Room *)((Room *)local_40.x))->Room::GetGridIndex(&local_38); - if ((int)local_38.x < 0) { + if (GHIDRA_INT(local_38.x) < 0) { fVar6 = local_44; } else { @@ -17717,7 +17717,7 @@ LAB_0062f36f: } fVar6 = (this->_gridCollisionVelocity).y; fVar10 = (this->_gridCollisionVelocity).x; - damageSource._flags = uVar3 | (uint)local_44 | damageSource._flags; + damageSource._flags = uVar3 | GHIDRA_UINT(local_44) | damageSource._flags; source = &damageSource; fVar6 = sqrtf(fVar10 * fVar10 + fVar6 * fVar6); fVar6 = fVar6 / 10.0; @@ -17727,7 +17727,7 @@ LAB_0062f36f: if (4.0 <= fVar6) { fVar6 = 4.0; } - ((Room *)((Room *)local_40.x))->Room::DamageGridWithSource((int)local_38.x,(int)fVar6,source); + ((Room *)((Room *)local_40.x))->Room::DamageGridWithSource(GHIDRA_INT(local_38.x),GHIDRA_INT(fVar6),source); fVar6 = (this->_gridCollisionVelocity).y; } fVar10 = (this->_gridCollisionVelocity).x; @@ -17783,7 +17783,7 @@ LAB_0062f36f: else { local_38.x = 3.92364e-44; seed_fart_sound_override((int *)&local_38); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_38.x,0.8,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_38.x),0.8,2,0,1.0,0.0); } } local_40.x = (this->_velocity).x; @@ -17836,7 +17836,7 @@ LAB_0062f36f: uVar3 = Random(); Entity_NPC::MakeSplat ((Entity_NPC *)this, - (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 0.5 + 0.2); } LAB_0062f7c8: @@ -17894,7 +17894,7 @@ void Entity_Familiar::store_backup(void *backup) iVar1 = __RTDynamicCast(this->_extraData,0, &IsaacRepentancePlus::Entity_Familiar::ExtraData::RTTI_Type_Descriptor, &IsaacRepentancePlus::AbyssLocustData::RTTI_Type_Descriptor,0); - *(uint *)((char *)backup + 0x1c) = (uint)*(byte *)(iVar1 + 0x50); + *(uint *)((char *)backup + 0x1c) = GHIDRA_UINT(*(byte *)(iVar1 + 0x50)); } return; } @@ -18030,7 +18030,7 @@ void Entity_Familiar::MoveDiagonally(float speed) fVar2 = (this->_velocity).x; if ((fVar2 == g_vectorZero.x) && ((this->_velocity).y == g_vectorZero.y)) { rngResult = Random(); - local_10.x = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) + local_10.x = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_10.x = local_10.x + local_10.x; fVar2 = cos(local_10.x); @@ -18097,10 +18097,10 @@ void Entity_Familiar::MoveDiagonally(float speed) effect = (int *)__RTDynamicCast(spawned,0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Effect::RTTI_Type_Descriptor,0); rngResult = Random(); - fVar2 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + fVar2 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 0.3 + 0.1; - effect[0x39] = (int)fVar2; - effect[0x3a] = (int)fVar2; + effect[0x39] = GHIDRA_INT(fVar2); + effect[0x3a] = GHIDRA_INT(fVar2); (**(code **)(*effect + 0xc))(); } game = g_game; @@ -18113,11 +18113,11 @@ void Entity_Familiar::MoveDiagonally(float speed) effect = (int *)__RTDynamicCast(spawned,0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Effect::RTTI_Type_Descriptor,0); rngResult = Random(); - fVar3 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + fVar3 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 0.5 + 0.2; fVar2 = fVar3 * g_vectorOne.x; - effect[0x3a] = (int)(fVar3 * g_vectorOne.y); - effect[0x39] = (int)fVar2; + effect[0x3a] = GHIDRA_INT((fVar3 * g_vectorOne.y)); + effect[0x39] = GHIDRA_INT(fVar2); (**(code **)(*effect + 0xc))(); } if (!isFixedAngle) { @@ -18231,11 +18231,11 @@ void Entity_Familiar::delirium_morph() ExceptionList = &savedExceptionList; local_58 = (char *)this->_variant; uVar8 = this->_initSeed; - local_38._0_1_ = '\x05'; - local_38._1_1_ = '\0'; - local_38._2_1_ = '\0'; - local_38._3_1_ = '\0'; - local_38._4_4_ = 3; + (*(undefined1 *)((char *)&(local_38) + 0x0)) = '\x05'; + (*(undefined1 *)((char *)&(local_38) + 0x1)) = '\0'; + (*(undefined1 *)((char *)&(local_38) + 0x2)) = '\0'; + (*(undefined1 *)((char *)&(local_38) + 0x3)) = '\0'; + (*(undefined4 *)((char *)&(local_38) + 0x4)) = 3; local_54 = (ANM2 *)0x15; local_50 = (EntityPtr)0x0; do { @@ -18250,9 +18250,9 @@ void Entity_Familiar::delirium_morph() uVar8 = uVar8 >> 5 ^ uVar8; uVar8 = uVar8 << 3 ^ uVar8; uVar8 = uVar8 >> 0x15 ^ uVar8; - local_50 = (EntityPtr)((int)local_50 + 1); + local_50 = (EntityPtr)(GHIDRA_INT(local_50) + 1); local_58 = *(char **)(&DAT_00b64820 + (uVar8 % 0x16) * 4); - } while ((uint)local_50 < 10); + } while (GHIDRA_UINT(local_50) < 10); local_4c = (EntityPtr)this->_player; fVar12 = (this->_pos).x; local_5c = this->_child; @@ -18265,7 +18265,7 @@ void Entity_Familiar::delirium_morph() oldVelocityY = (this->_velocity).y; oldSirenHelper = this->_sirenHelper; if (this->_weapon != (int *)0x0) { - (**(code **)(*(int *)this->_weapon + 0x14))(__security_cookie ^ (uint)&(&sheetPath)[1]._size); + (**(code **)(*(int *)this->_weapon + 0x14))(__security_cookie ^ GHIDRA_UINT(&(&sheetPath)[1]._size)); if (this->_weapon != (undefined4 *)0x0) { (*(code *)**(undefined4 **)this->_weapon)(1); } @@ -18312,7 +18312,7 @@ void Entity_Familiar::delirium_morph() *refSlot = local_50; if (local_50 != (EntityPtr)0x0) { std::multiset::insert(refSlot); - EVar10 = (EntityPtr)((int)local_50 + 0x3c0); + EVar10 = (EntityPtr)(GHIDRA_INT(local_50) + 0x3c0); if (*(EntityPtr *)EVar10 != (EntityPtr)0x0) { local_4c = EVar10; std::multiset::erase(&local_4c); @@ -18328,7 +18328,7 @@ void Entity_Familiar::delirium_morph() *refSlot = local_5c; if (local_5c != (EntityPtr)0x0) { std::multiset::insert(refSlot); - EVar10 = (EntityPtr)((int)local_5c + 0x3bc); + EVar10 = (EntityPtr)(GHIDRA_INT(local_5c) + 0x3bc); if (*(EntityPtr *)EVar10 != (EntityPtr)0x0) { local_4c = EVar10; std::multiset::erase(&local_4c); @@ -18341,7 +18341,7 @@ void Entity_Familiar::delirium_morph() (this->_pos).y = oldPosY; (this->_velocity).x = oldVelocityX; this->_spawnerType = iVar4; - this->_spawnerVariant = (int)local_60; + this->_spawnerVariant = GHIDRA_INT(local_60); (this->_velocity).y = oldVelocityY; this->_appearTimer = 0; local_45 = '\0'; @@ -18359,7 +18359,7 @@ void Entity_Familiar::delirium_morph() sheetPath._buf[3] = '\0'; } else { - ((std::string *)(sheetPath._buf))->std::string::string((void *)((int)layer->_layerData + 0x20)); + ((std::string *)(sheetPath._buf))->std::string::string((void *)(GHIDRA_INT(layer->_layerData) + 0x20)); } uVar8 = sheetPath._size; ehState = 0; @@ -18389,13 +18389,13 @@ void Entity_Familiar::delirium_morph() uVar11 = 0x7fffffff; } local_58 = std::_Allocate(uVar11 + 1); - uVar7 = sheetPath._buf._0_4_; + uVar7 = (*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)); EVar10 = local_5c; sheetPath._size = uVar8 + 0x12; local_60 = (std_string *)(uVar8 - 3); sheetPath._capacity = uVar11; - if ((uint)local_5c < 0x10) { - *(undefined4 *)local_58 = sheetPath._buf._0_4_; + if (GHIDRA_UINT(local_5c) < 0x10) { + *(undefined4 *)local_58 = (*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)); local_58[4] = 'f'; local_58[5] = 'a'; local_58[6] = 'm'; @@ -18417,7 +18417,7 @@ void Entity_Familiar::delirium_morph() memcpy(local_58 + 0x16,sheetPath._buf + 4,(size_t)local_60); } else { - *(undefined4 *)local_58 = *(undefined4 *)sheetPath._buf._0_4_; + *(undefined4 *)local_58 = *(*(undefined4 *)((char *)&((undefined4 *)sheetPath._buf) + 0x0)); local_58[4] = 'f'; local_58[5] = 'a'; local_58[6] = 'm'; @@ -18436,22 +18436,22 @@ void Entity_Familiar::delirium_morph() local_58[0x13] = 'u'; local_58[0x14] = 'm'; local_58[0x15] = '/'; - memcpy(local_58 + 0x16,(void *)(sheetPath._buf._0_4_ + 4),(size_t)local_60); - uVar8 = (int)EVar10 + 1; + memcpy(local_58 + 0x16,(void *)((*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) + 4),(size_t)local_60); + uVar8 = GHIDRA_INT(EVar10) + 1; pvVar9 = (void *)uVar7; if (0xfff < uVar8) { pvVar9 = *(void **)(uVar7 + -4); - uVar8 = (int)EVar10 + 0x24; - if (0x1f < (uVar7 - (int)pvVar9) - 4U) goto LAB_006321d1; + uVar8 = GHIDRA_INT(EVar10) + 0x24; + if (0x1f < (uVar7 - GHIDRA_INT(pvVar9)) - 4U) goto LAB_006321d1; } operator_delete(pvVar9,uVar8); } - sheetPath._buf._0_4_ = local_58; + (*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) = local_58; } else { local_60 = &sheetPath; if (0xf < sheetPath._capacity) { - local_60 = (std_string *)sheetPath._buf._0_4_; + local_60 = (*(undefined4 *)((char *)&((std_string *)sheetPath._buf) + 0x0)); } pcVar1 = local_60->_buf + 4; if (("/" < pcVar1) || (local_60->_buf + sheetPath._size < "familiar/delirium/")) { @@ -18465,27 +18465,27 @@ void Entity_Familiar::delirium_morph() } _Size = sheetPath._size - 3; sheetPath._size = sheetPath._size + 0x12; - memmove((void *)((int)&local_60->_capacity + 2),pcVar1,_Size); + memmove((void *)(GHIDRA_INT(&local_60->_capacity) + 2),pcVar1,_Size); pcVar1 = local_60->_buf; memcpy(pcVar1 + 4,"familiar/delirium/",(size_t)_Size_00); - memcpy(_Size_00 + (int)(pcVar1 + 4),_Size_00 + 0xb6403e,0x12 - (int)_Size_00); + memcpy(_Size_00 + GHIDRA_INT((pcVar1 + 4)),_Size_00 + 0xb6403e,0x12 - GHIDRA_INT(_Size_00)); } ((ModManager *)(&g_manager->_modManager))->ModManager::TryRedirectPath((std_string *)redirectedPath,&sheetPath); if (&sheetPath != extraout_EAX) { if (0xf < sheetPath._capacity) { uVar8 = sheetPath._capacity + 1; - pvVar9 = (void *)sheetPath._buf._0_4_; + pvVar9 = (*(undefined4 *)((char *)&((void *)sheetPath._buf) + 0x0)); if (0xfff < uVar8) { - pvVar9 = *(void **)(sheetPath._buf._0_4_ + -4); + pvVar9 = *(void **)((*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) + -4); uVar8 = sheetPath._capacity + 0x24; - if (0x1f < (sheetPath._buf._0_4_ - (int)pvVar9) - 4U) goto LAB_006321d1; + if (0x1f < ((*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) - GHIDRA_INT(pvVar9)) - 4U) goto LAB_006321d1; } operator_delete(pvVar9,uVar8); } - sheetPath._buf._0_4_ = *(undefined4 *)extraout_EAX->_buf; - sheetPath._buf._4_4_ = *(undefined4 *)(extraout_EAX->_buf + 4); - sheetPath._buf._8_4_ = *(undefined4 *)(extraout_EAX->_buf + 8); - sheetPath._buf._12_4_ = *(undefined4 *)(extraout_EAX->_buf + 0xc); + (*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) = *(undefined4 *)extraout_EAX->_buf; + (*(undefined4 *)((char *)&(sheetPath._buf) + 0x4)) = *(undefined4 *)(extraout_EAX->_buf + 4); + (*(undefined4 *)((char *)&(sheetPath._buf) + 0x8)) = *(undefined4 *)(extraout_EAX->_buf + 8); + (*(undefined4 *)((char *)&(sheetPath._buf) + 0xc)) = *(undefined4 *)(extraout_EAX->_buf + 0xc); sheetPath._size = extraout_EAX->_size; sheetPath._capacity = extraout_EAX->_capacity; extraout_EAX->_size = 0; @@ -18496,15 +18496,15 @@ void Entity_Familiar::delirium_morph() uVar8 = local_30 + 1; pvVar9 = redirectedPath[0]; if (0xfff < uVar8) { - pvVar9 = *(void **)((int)redirectedPath[0] + -4); + pvVar9 = *(void **)(GHIDRA_INT(redirectedPath[0]) + -4); uVar8 = local_30 + 0x24; - if (0x1f < (uint)((int)redirectedPath[0] + (-4 - (int)pvVar9))) goto LAB_006321d1; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPath[0]) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_006321d1; } operator_delete(pvVar9,uVar8); } path = &sheetPath; if (0xf < sheetPath._capacity) { - path = (std_string *)sheetPath._buf._0_4_; + path = (*(undefined4 *)((char *)&((std_string *)sheetPath._buf) + 0x0)); } resolvedPath = FileSystem::ResolvePath((byte *)path); local_46 = resolvedPath != (byte *)0x0; @@ -18513,31 +18513,31 @@ void Entity_Familiar::delirium_morph() heapCounter = &g_allocatedBytesNoHeap; } else { - heapCounter = (qword *)((int)g_mainHeap + 0x30); + heapCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar8 = *(uint *)(resolvedPath + -4); qVar6 = *heapCounter; - *(uint *)heapCounter = (uint)*heapCounter - uVar8; + *(uint *)heapCounter = GHIDRA_UINT(*heapCounter) - uVar8; *(uint *)((char *)heapCounter + 4) = - *(uint *)((char *)heapCounter + 4) - (uint)((uint)qVar6 < uVar8); + *(uint *)((char *)heapCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar6) < uVar8)); free(resolvedPath + -4); ehState = ehState & 0xffffff00; } EVar10 = local_50; unk = 0; if (local_46 != 0) { - ((Sprite *)((Sprite *)local_54))->Sprite::ReplaceSpritesheet((int)local_50,&sheetPath); + ((Sprite *)((Sprite *)local_54))->Sprite::ReplaceSpritesheet(GHIDRA_INT(local_50),&sheetPath); local_45 = '\x01'; unk = extraout_CL; } ehState = 0xffffffff; if (0xf < sheetPath._capacity) { uVar8 = sheetPath._capacity + 1; - pvVar9 = (void *)sheetPath._buf._0_4_; + pvVar9 = (*(undefined4 *)((char *)&((void *)sheetPath._buf) + 0x0)); if (0xfff < uVar8) { - pvVar9 = *(void **)(sheetPath._buf._0_4_ + -4); + pvVar9 = *(void **)((*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) + -4); uVar8 = sheetPath._capacity + 0x24; - if (0x1f < (sheetPath._buf._0_4_ - (int)pvVar9) - 4U) { + if (0x1f < ((*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) - GHIDRA_INT(pvVar9)) - 4U) { LAB_006321d1: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -18547,8 +18547,8 @@ LAB_006321d1: unk = extraout_CL_00; } this = local_64; - local_50 = (EntityPtr)((int)EVar10 + 1); - } while ((uint)local_50 < (byte *)(local_64->_sprite)._layerCount); + local_50 = (EntityPtr)(GHIDRA_INT(EVar10) + 1); + } while (GHIDRA_UINT(local_50) < (byte *)(local_64->_sprite)._layerCount); if (local_45 != '\0') { ((ANM2 *)(&local_64->_sprite))->ANM2::LoadGraphics(unk); } @@ -18576,7 +18576,7 @@ LAB_006321d1: } this->_sirenOriginalPlayer = (void *)local_68; if (EVar10 != (EntityPtr)0x0) { - EVar2 = (EntityPtr)((int)EVar10 + 0x3c4); + EVar2 = (EntityPtr)(GHIDRA_INT(EVar10) + 0x3c4); if (*(int *)((char *)EVar10 + 0x3c4) != 0) { local_68 = EVar2; std::multiset::erase(&local_68); @@ -18612,14 +18612,14 @@ void Entity_Familiar::init_lil_harbinger_sprite() local_8 = 0xffffffff; puStack_c = &LAB_00af6ebd; local_10 = ExceptionList; - local_14 = __security_cookie ^ (int)&sheetPath + 0x28U; + local_14 = __security_cookie ^ GHIDRA_INT(&sheetPath) + 0x28U; ExceptionList = &local_10; uVar3 = this->_subtype; if (4 < uVar3) { KAGE_LogMessage(0x10,(byte *)"[err] Wrong Harbinger subtype %u!\n"); uVar3 = this->_subtype; } - uVar3 = -(uint)(uVar3 != 0) & uVar3; + uVar3 = -GHIDRA_UINT((uVar3 != 0)) & uVar3; uVar4 = 4; if (uVar3 < 4) { uVar4 = uVar3; @@ -18630,8 +18630,8 @@ void Entity_Familiar::init_lil_harbinger_sprite() do { sheetPath._size = 0; sheetPath._capacity = 0xf; - uVar4 = -(uint)(this->_subtype != 0) & this->_subtype; - sheetPath._buf._0_4_ = (void *)0x0; + uVar4 = -GHIDRA_UINT((this->_subtype != 0)) & this->_subtype; + (*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) = (void *)0x0; uVar3 = 4; if (uVar4 < 4) { uVar3 = uVar4; @@ -18642,18 +18642,18 @@ void Entity_Familiar::init_lil_harbinger_sprite() bVar2 = *pbVar5; pbVar5 = pbVar5 + 1; } while (bVar2 != 0); - ((std::string *)(sheetPath._buf))->std::string::assign(pbVar1,(int)pbVar5 - (int)(pbVar1 + 1)); + ((std::string *)(sheetPath._buf))->std::string::assign(pbVar1,GHIDRA_INT(pbVar5) - GHIDRA_INT((pbVar1 + 1))); local_8 = 0; ((Sprite *)((Sprite *)&this->_sprite))->Sprite::ReplaceSpritesheet(layerId,&sheetPath); local_8 = 0xffffffff; uVar3 = extraout_ECX; if (0xf < sheetPath._capacity) { uVar3 = sheetPath._capacity + 1; - ptr = (void *)sheetPath._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((void *)sheetPath._buf) + 0x0)); if (0xfff < uVar3) { - ptr = *(void **)(sheetPath._buf._0_4_ + -4); + ptr = *(void **)((*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) + -4); uVar3 = sheetPath._capacity + 0x24; - if (0x1f < (uint)(sheetPath._buf._0_4_ + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -18662,7 +18662,7 @@ void Entity_Familiar::init_lil_harbinger_sprite() uVar3 = extraout_ECX_00; } layerId = layerId + 1; - } while (layerId < (uint)(this->_sprite)._layerCount); + } while (layerId < GHIDRA_UINT((this->_sprite)._layerCount)); } ((ANM2 *)(&this->_sprite))->ANM2::LoadGraphics((byte)uVar3); pbVar1 = (this->_sprite)._animState._animData; @@ -18677,7 +18677,7 @@ void Entity_Familiar::init_lil_harbinger_sprite() isLess = bVar2 < (byte)*wantedAnimName; if (bVar2 != *wantedAnimName) { LAB_00632450: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_00632455; } if (bVar2 == 0) break; @@ -18698,7 +18698,7 @@ LAB_00632455: (this->_sprite)._animState._isPlaying = 1; } LAB_00632488: - uVar4 = -(uint)(this->_subtype != 0) & this->_subtype; + uVar4 = -GHIDRA_UINT((this->_subtype != 0)) & this->_subtype; uVar3 = 4; if (uVar4 < 4) { uVar3 = uVar4; @@ -18792,7 +18792,7 @@ LAB_006326c8: chargePercent = 100.0; } LAB_006326d0: - iVar3 = (int)chargePercent; + iVar3 = GHIDRA_INT(chargePercent); if (iVar3 == 0) goto LAB_0063263a; if (iVar3 == 100) { chargeAnimData = (this->_chargeBarSprite)._animState._animData; @@ -18889,7 +18889,7 @@ void Entity_Familiar::ai_lil_monstro() local_8 = -NAN; puStack_c = &LAB_00af6f00; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)((&tearHitParams)[1]._tearColor._colorize + 3); + local_14 = __security_cookie ^ GHIDRA_UINT(((&tearHitParams)[1]._tearColor._colorize + 3)); ExceptionList = &local_10; self = this; frequency = apply_forgotten_lullaby(this,0x1e); @@ -18897,7 +18897,7 @@ void Entity_Familiar::ai_lil_monstro() if (bVar4 != 0) { local_90.y = 0.0; EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),&nearbyEnemies,&this->_pos,150.0,8); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&nearbyEnemies,&this->_pos,150.0,8); uVar6 = 0; local_8 = 0.0; if (nearbyEnemies._size != 0) { @@ -18908,16 +18908,16 @@ void Entity_Familiar::ai_lil_monstro() (bVar4 = ((Entity *)((Entity *)this))->Entity::IsDescendantOf((Entity *)EVar1), bVar4 == 0)) && ((*(uint *)((char *)EVar1 + 0x168) & 0x20000010) == 0)) { local_88.y = *(float *)((char *)EVar1 + 0x340); - local_88.x = ((Vector *)((int)EVar1 + 0x33c))->x; + local_88.x = ((Vector *)(GHIDRA_INT(EVar1) + 0x33c))->x; bVar4 = ((Room *)(g_game->_room))->Room::CheckLine(&this->_pos,&local_88,3,0,0,0,(Vector *)0x0); if (bVar4 != 0) { local_90.y = (float)EVar1; } } uVar6 = uVar6 + 1; - } while (uVar6 < (uint)nearbyEnemies._size); + } while (uVar6 < GHIDRA_UINT(nearbyEnemies._size)); if ((EntityPtr)local_90.y != (EntityPtr)0x0) { - local_88.y = ((Vector *)((int)local_90.y + 0x33c))->x - (this->_pos).x; + local_88.y = ((Vector *)(GHIDRA_INT(local_90.y) + 0x33c))->x - (this->_pos).x; local_80 = *(float *)((char *)local_90.y + 0x340) - (this->_pos).y; this->_headFrameDelay = 0xc; animData = (this->_sprite)._animState._animData; @@ -18940,7 +18940,7 @@ LAB_006329dd: isLess = bVar4 < (byte)*attackAnimName; if (bVar4 != *attackAnimName) { LAB_006329c7: - uVar6 = -(uint)isLess | 1; + uVar6 = -GHIDRA_UINT(isLess) | 1; goto LAB_006329cc; } if (bVar4 == 0) break; @@ -18976,20 +18976,20 @@ LAB_006329cc: } } local_8 = -NAN; - if (nearbyEnemies._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(nearbyEnemies) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (nearbyEnemies._data != (void *)0x0) { uVar6 = *(uint *)((char *)nearbyEnemies._data + -4); qVar3 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar6; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar6; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar3 < uVar6); - free((void *)((int)nearbyEnemies._data + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar3) < uVar6)); + free((void *)(GHIDRA_INT(nearbyEnemies._data) + -4)); } local_8 = -NAN; } @@ -19009,7 +19009,7 @@ LAB_006329cc: isLess = bVar4 < *flyAnimName; if (bVar4 != *flyAnimName) { LAB_00632b48: - uVar6 = -(uint)isLess | 1; + uVar6 = -GHIDRA_UINT(isLess) | 1; goto LAB_00632b4d; } if (bVar4 == 0) break; @@ -19131,12 +19131,12 @@ void Entity_Familiar::ai_variant_111() local_2c = (float *)0x0; local_8 = 0; local_18 = (void *)0x0; - pfVar4 = (float *)((int)g_game->_room + 0x724); + pfVar4 = (float *)(GHIDRA_INT(g_game->_room) + 0x724); game = g_game; local_1c = this; local_14 = pfVar4; do { - iVar3 = *(int *)((char *)pfVar4 + (int)local_18 * 4); + iVar3 = *(int *)((char *)pfVar4 + GHIDRA_INT(local_18) * 4); if (iVar3 != 0) { if (*(int *)(iVar3 + 0xc) != 2) { if (*(int *)(iVar3 + 0x160) == 7) { @@ -19145,7 +19145,7 @@ LAB_00632e6b: game = g_game; pfVar4 = local_14; if (doorTargetRoom->VisitedCount != 0) goto LAB_00632f15; - iVar3 = *(int *)(*(int *)((char *)local_14 + (int)local_18 * 4) + 0x24); + iVar3 = *(int *)(*(int *)((char *)local_14 + GHIDRA_INT(local_18) * 4) + 0x24); iVar1 = *(int *)((char *)g_game->_room + 0xc); scratchVec.x = (float)(iVar3 % iVar1) * 40.0 + 40.0; scratchVec.y = (float)(iVar3 / iVar1) * 40.0 + 120.0; @@ -19170,7 +19170,7 @@ LAB_00632f15: pfVar5 = (float *)0x0; fVar7 = 40.0; fVar8 = 120.0; - local_18 = (void *)((int)local_18 + 1); + local_18 = (void *)(GHIDRA_INT(local_18) + 1); } while (local_18 < 8); local_14 = pfVar5; if (((((game->_levelStateFlags & 0x2000U) == 0) && @@ -19226,7 +19226,7 @@ LAB_00632f15: } LAB_0063308e: manager = g_manager; - rngResult = (int)candidatesEnd >> 3; + rngResult = GHIDRA_INT(candidatesEnd) >> 3; local_18 = (void *)0x0; if (rngResult == 0) { this->_state = 2; @@ -19237,22 +19237,22 @@ LAB_0063308e: else { local_1c = (Entity_Familiar *)0x392; seed_fart_sound_override((int *)&local_1c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_1c,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_1c),1.0,2,0,1.0,0.0); rngResult = Random(); - pfVar4 = (float *)((int)local_18 + (rngResult % rngResult) * 8); + pfVar4 = (float *)(GHIDRA_INT(local_18) + (rngResult % rngResult) * 8); (this->_targetPosition).x = *pfVar4; (this->_targetPosition).y = pfVar4[1]; - this->_state = (uint)(rngResult == 1); + this->_state = GHIDRA_UINT((rngResult == 1)); } this->_fireCooldown = 0x96; local_8 = 0xffffffff; if (local_18 != (void *)0x0) { - rngResult = (int)local_14 - (int)local_18 & 0xfffffff8; + rngResult = GHIDRA_INT(local_14) - GHIDRA_INT(local_18) & 0xfffffff8; freePtr = local_18; if (0xfff < rngResult) { freePtr = *(void **)((char *)local_18 + -4); rngResult = rngResult + 0x23; - if (0x1f < (uint)((int)local_18 + (-4 - (int)freePtr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_18) + (-4 - GHIDRA_INT(freePtr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -19267,7 +19267,7 @@ LAB_00633192: if (1.0 <= (float)local_18 * (float)local_18 + fVar7 * fVar7) { local_1c = (Entity_Familiar *)((this->_targetPosition).y - (this->_pos).y); rngResult = Random(); - local_18 = (void *)((float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)] + local_18 = (void *)((float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)] ) * 2.3283064e-10 * 0.2 + 0.1); scratchVec.y = atan2f((float)local_1c,(float)local_14); scratchVec.y = scratchVec.y * 57.295776; @@ -19418,7 +19418,7 @@ LAB_0063363b: } else { *puVar5 = *local_14; - entityList._capacity = (int)(puVar5 + 1); + entityList._capacity = GHIDRA_INT((puVar5 + 1)); puVar5 = (undefined4 *)entityList._capacity; } } @@ -19428,7 +19428,7 @@ LAB_00633662: } while (uVar7 < *(uint *)((char *)room + 0x1264)); } candidatesData = entityList._data; - uVar7 = (int)puVar5 - (int)entityList._data >> 2; + uVar7 = GHIDRA_INT(puVar5) - GHIDRA_INT(entityList._data) >> 2; if (uVar7 != 0) { rngResult = Random(); newTarget = *(EntityPtr *)((char *)candidatesData + (rngResult % uVar7) * 4); @@ -19443,12 +19443,12 @@ LAB_00633662: } local_8 = 0xffffffff; if (candidatesData != (void *)0x0) { - uVar7 = (entityList._size - (int)candidatesData >> 2) * 4; + uVar7 = (entityList._size - GHIDRA_INT(candidatesData) >> 2) * 4; ptr = candidatesData; if (0xfff < uVar7) { ptr = *(void **)((char *)candidatesData + -4); uVar7 = uVar7 + 0x23; - if (0x1f < (uint)((int)candidatesData + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(candidatesData) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -19461,7 +19461,7 @@ LAB_00633702: KAGE_LogMessage(0x10,(byte *)"[err] Angry Fly - Got a null target!\n"); } EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&entityList,this->_type,this->_variant,-1,1 + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&entityList,this->_type,this->_variant,-1,1 ,0); local_8 = 1; puVar5 = (undefined4 *)0x0; @@ -19469,17 +19469,17 @@ LAB_00633702: iVar6 = 1; if ((undefined4 *)entityList._size != (undefined4 *)0x0) { do { - otherFly = *(Entity_Familiar **)((char *)entityList._data + (int)puVar5 * 4); + otherFly = *(Entity_Familiar **)((char *)entityList._data + GHIDRA_INT(puVar5) * 4); if (otherFly == this) { local_14 = puVar5; } else if (otherFly->_target == *targetSlot) { iVar6 = iVar6 + 1; } - puVar5 = (undefined4 *)((int)puVar5 + 1); - } while (puVar5 < (uint)entityList._size); + puVar5 = (undefined4 *)(GHIDRA_INT(puVar5) + 1); + } while (puVar5 < GHIDRA_UINT(entityList._size)); } - fVar8 = ((float)(int)local_14 * 360.0) / (float)iVar6; + fVar8 = ((float)GHIDRA_INT(local_14) * 360.0) / (float)iVar6; if (360.0 < ABS(fVar8)) { fVar8 = fmodf(fVar8,360.0); } @@ -19514,20 +19514,20 @@ LAB_00633702: (this->_velocity).x = (float)local_24 * (10.0 / fVar8); (this->_velocity).y = (float)local_14 * (10.0 / fVar8); } - if (entityList._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(entityList) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (entityList._data != (void *)0x0) { uVar7 = *(uint *)((char *)entityList._data + -4); qVar1 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar7; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar7; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar1 < uVar7); - free((uint *)((int)entityList._data + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar7)); + free((uint *)(GHIDRA_INT(entityList._data) + -4)); } } ExceptionList = local_10; @@ -19574,10 +19574,10 @@ byte Entity_Familiar::TryFireTear(Entity_Tear *tear) return isFiring; } LAB_00634064: - tearFlags._l._0_4_ = (undefined4)(tear->_tearFlags)._l; - tearFlags._l._4_4_ = *(undefined4 *)((int)&(tear->_tearFlags)._l + 4); - tearFlags._h._0_4_ = (undefined4)(tear->_tearFlags)._h; - tearFlags._h._4_4_ = *(undefined4 *)((int)&(tear->_tearFlags)._h + 4); + (*(undefined4 *)((char *)&(tearFlags._l) + 0x0)) = (undefined4)(tear->_tearFlags)._l; + (*(undefined4 *)((char *)&(tearFlags._l) + 0x4)) = *(undefined4 *)(GHIDRA_INT(&(tear->_tearFlags)._l) + 4); + (*(undefined4 *)((char *)&(tearFlags._h) + 0x0)) = (undefined4)(tear->_tearFlags)._h; + (*(undefined4 *)((char *)&(tearFlags._h) + 0x4)) = *(undefined4 *)(GHIDRA_INT(&(tear->_tearFlags)._h) + 4); tearColor._offset[2] = (tear->_sprite)._color._offset[2]; tearColor._tint[0] = (tear->_sprite)._color._tint[0]; tearColor._tint[1] = (tear->_sprite)._color._tint[1]; @@ -19587,15 +19587,15 @@ LAB_00634064: tearColor._colorize[1] = (tear->_sprite)._color._colorize[1]; tearColor._colorize[2] = (tear->_sprite)._color._colorize[2]; tearColor._colorize[3] = (tear->_sprite)._color._colorize[3]; - tearColor._offset._0_8_ = *(undefined8 *)(tear->_sprite)._color._offset; + (*(undefined8 *)((char *)&(tearColor._offset) + 0x0)) = *(undefined8 *)(tear->_sprite)._color._offset; tearHeight = tear->_height; fallingSpeed = tear->_fallingSpeed; tearRange = tear->_tearRange; apply_baby_bender_tear_params(this,&tearFlags,&tearColor,&tearHeight,&fallingSpeed,&tearRange,0); - flags._l._4_4_ = tearFlags._l._4_4_; - flags._l._0_4_ = (undefined4)tearFlags._l; - flags._h._0_4_ = (undefined4)tearFlags._h; - flags._h._4_4_ = tearFlags._h._4_4_; + (*(undefined4 *)((char *)&(flags._l) + 0x4)) = (*(undefined4 *)((char *)&(tearFlags._l) + 0x4)); + (*(undefined4 *)((char *)&(flags._l) + 0x0)) = (undefined4)tearFlags._l; + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = (undefined4)tearFlags._h; + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = (*(undefined4 *)((char *)&(tearFlags._h) + 0x4)); ((Entity_Tear *)(tear))->Entity_Tear::SetTearFlags(flags); tear->SetColor(&tearColor,0xffffffff,0xff,0,1); tear->_height = tearHeight; @@ -19624,10 +19624,10 @@ byte Entity_Familiar::apply_baby_bender(Entity_Tear *tear) isHasBabyBender = ((Entity_Player *)(this->_player))->Entity_Player::HasTrinket(0x7f,0); if (isHasBabyBender != 0) { - tearFlags._l._0_4_ = (undefined4)(tear->_tearFlags)._l; - tearFlags._l._4_4_ = *(undefined4 *)((int)&(tear->_tearFlags)._l + 4); - tearFlags._h._0_4_ = (undefined4)(tear->_tearFlags)._h; - tearFlags._h._4_4_ = *(undefined4 *)((int)&(tear->_tearFlags)._h + 4); + (*(undefined4 *)((char *)&(tearFlags._l) + 0x0)) = (undefined4)(tear->_tearFlags)._l; + (*(undefined4 *)((char *)&(tearFlags._l) + 0x4)) = *(undefined4 *)(GHIDRA_INT(&(tear->_tearFlags)._l) + 4); + (*(undefined4 *)((char *)&(tearFlags._h) + 0x0)) = (undefined4)(tear->_tearFlags)._h; + (*(undefined4 *)((char *)&(tearFlags._h) + 0x4)) = *(undefined4 *)(GHIDRA_INT(&(tear->_tearFlags)._h) + 4); tearColor._offset[2] = (tear->_sprite)._color._offset[2]; tearColor._tint[0] = (tear->_sprite)._color._tint[0]; tearColor._tint[1] = (tear->_sprite)._color._tint[1]; @@ -19637,14 +19637,14 @@ byte Entity_Familiar::apply_baby_bender(Entity_Tear *tear) tearColor._colorize[1] = (tear->_sprite)._color._colorize[1]; tearColor._colorize[2] = (tear->_sprite)._color._colorize[2]; tearColor._colorize[3] = (tear->_sprite)._color._colorize[3]; - tearColor._offset._0_8_ = *(undefined8 *)(tear->_sprite)._color._offset; + (*(undefined8 *)((char *)&(tearColor._offset) + 0x0)) = *(undefined8 *)(tear->_sprite)._color._offset; apply_baby_bender_tear_params (this,&tearFlags,&tearColor,unusedHeight,unusedFallingSpeed,unusedRange,1); tearVtable = *(int *)tear; *(undefined4 *)&(tear->_tearFlags)._l = (undefined4)tearFlags._l; - *(undefined4 *)((int)&(tear->_tearFlags)._l + 4) = tearFlags._l._4_4_; + *(undefined4 *)(GHIDRA_INT(&(tear->_tearFlags)._l) + 4) = (*(undefined4 *)((char *)&(tearFlags._l) + 0x4)); *(undefined4 *)&(tear->_tearFlags)._h = (undefined4)tearFlags._h; - *(undefined4 *)((int)&(tear->_tearFlags)._h + 4) = tearFlags._h._4_4_; + *(undefined4 *)(GHIDRA_INT(&(tear->_tearFlags)._h) + 4) = (*(undefined4 *)((char *)&(tearFlags._h) + 0x4)); (**(code **)(tearVtable + 0x3c))(&tearColor,0xffffffff,0xff,0,1); } return isHasBabyBender; @@ -19684,12 +19684,12 @@ Vector * Entity_Familiar::UpdateFollowPosition(Vector *outOffset) local_14 = 0xffffffff; puStack_18 = &LAB_00af6f85; local_1c = ExceptionList; - uVar4 = __security_cookie ^ (uint)(priority + 10); + uVar4 = __security_cookie ^ GHIDRA_UINT((priority + 10)); ExceptionList = &local_1c; cVar3 = FUN_00634920(uVar4); if (cVar3 == '\0') { pvVar6 = this->_player; - if (*(uint *)((char *)pvVar6 + 0x1ef0) != (uint)this->_formationMode) { + if (*(uint *)((char *)pvVar6 + 0x1ef0) != GHIDRA_UINT(this->_formationMode)) { (this->_formationTargetOffset).x = g_vectorZero.x; (this->_formationTargetOffset).y = g_vectorZero.y; } @@ -19707,10 +19707,10 @@ Vector * Entity_Familiar::UpdateFollowPosition(Vector *outOffset) local_24 = 0.0; prioritySetHead = puVar5; if (this->_formationMode != 0) { - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&familiars,3,-1,-1,0,0) + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&familiars,3,-1,-1,0,0) ; listIndex = 0; - local_14 = CONCAT31(local_14._1_3_,1); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); if (familiars._size != 0) { pvVar6 = familiars._data; do { @@ -19725,7 +19725,7 @@ Vector * Entity_Familiar::UpdateFollowPosition(Vector *outOffset) pvVar6 = familiars._data; } listIndex = listIndex + 1; - } while (listIndex < (uint)familiars._size); + } while (listIndex < GHIDRA_UINT(familiars._size)); } puVar5 = prioritySetHead; local_28 = (undefined4 *)*prioritySetHead; @@ -19734,52 +19734,52 @@ Vector * Entity_Familiar::UpdateFollowPosition(Vector *outOffset) _Tree_unchecked_const_iterator_>,std::_Iterator_base0> ::operator++((_Tree_unchecked_const_iterator_>,std::_Iterator_base0> *)&local_28); - local_24 = (float)((int)local_24 + 1); + local_24 = (float)(GHIDRA_INT(local_24) + 1); } - if (familiars._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(familiars) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (familiars._data != (void *)0x0) { uVar4 = *(uint *)((char *)familiars._data + -4); qVar2 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar4; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar4; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar2 < uVar4); - free((uint *)((int)familiars._data + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < uVar4)); + free((uint *)(GHIDRA_INT(familiars._data) + -4)); puVar5 = prioritySetHead; } } } formationMode = this->_formationMode; if (formationMode == 1) { - if (((uint)local_24 & 1) == 0) { + if ((GHIDRA_UINT(local_24) & 1) == 0) { sideSign = (undefined1 *)0x3f800000; } else { sideSign = &DAT_bf800000; } (this->_formationTargetOffset).y = 0.0; - (this->_formationTargetOffset).x = (float)((int)local_24 / 2 + 1) * 32.0 * (float)sideSign; + (this->_formationTargetOffset).x = (float)(GHIDRA_INT(local_24) / 2 + 1) * 32.0 * (float)sideSign; } else if (formationMode == 2) { (this->_formationTargetOffset).x = 0.0; (this->_formationTargetOffset).y = (float)&DAT_42000000; fVar7 = local_24; if (prioritySetSize != 2) { - fVar7 = (float)((int)local_24 - 1); + fVar7 = (float)(GHIDRA_INT(local_24) - 1); } - if (-1 < (int)fVar7) { - if (((uint)fVar7 & 1) == 0) { + if (-1 < GHIDRA_INT(fVar7)) { + if ((GHIDRA_UINT(fVar7) & 1) == 0) { sideSign = &DAT_bf800000; } else { sideSign = (undefined1 *)0x3f800000; } - fVar7 = (float)((int)fVar7 / 2 + 1) * 24.0 * (float)sideSign + 0.0; + fVar7 = (float)(GHIDRA_INT(fVar7) / 2 + 1) * 24.0 * (float)sideSign + 0.0; (this->_formationTargetOffset).x = fVar7; (this->_formationTargetOffset).y = (this->_formationTargetOffset).y - ABS(fVar7); } @@ -19788,7 +19788,7 @@ Vector * Entity_Familiar::UpdateFollowPosition(Vector *outOffset) local_28 = (undefined4 *) ((360.0 / (float)((double)prioritySetSize + __uint_to_double_fixup[-(prioritySetSize >> 0x1f)])) * - (float)(int)local_24 * 0.017453292); + (float)GHIDRA_INT(local_24) * 0.017453292); local_24 = cos((float)local_28); fVar7 = sin((float)local_28); (this->_formationTargetOffset).x = local_24 * 0.0 - fVar7 * 54.0; @@ -19830,7 +19830,7 @@ Vector * Entity_Familiar::UpdateFollowPosition(Vector *outOffset) puVar5 = (undefined4 *)this->_formationAngle; puVar9 = puVar5; if ((float)puVar5 < 0.0) { - puVar9 = (undefined4 *)((uint)puVar5 ^ 0x80000000); + puVar9 = (undefined4 *)(GHIDRA_UINT(puVar5) ^ 0x80000000); } if (360.0 < (float)puVar9) { puVar5 = (undefined4 *)fmodf((float)puVar5,360.0); @@ -19934,12 +19934,12 @@ void Entity_Familiar::ResolveOrbitConflict() local_8 = 0xffffffff; puStack_c = &LAB_00af3860; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; if (this->_formationMode != 0) { cVar1 = FUN_00634920(uVar2); if (cVar1 == '\0') { - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&familiars,3,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&familiars,3,-1,-1,0,0); familiarIndex = 0; if (familiars._size != 0) { do { @@ -19951,9 +19951,9 @@ void Entity_Familiar::ResolveOrbitConflict() } } familiarIndex = familiarIndex + 1; - } while (familiarIndex < (uint)familiars._size); + } while (familiarIndex < GHIDRA_UINT(familiars._size)); } - if (familiars._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(familiars) + 0x0)) == '\0') { local_8 = 0; tracked_alloc(1,familiars._data,0); } @@ -20013,7 +20013,7 @@ void Entity_Familiar::ai_lil_spewer() undefined4 local_8; void *babiesBegin; - local_8 = __security_cookie ^ (int)register0x00000010 - 4U; + local_8 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; if (this->_subtype == 0) { uVar6 = this->_initSeed ^ g_game->_dungeonPlacementSeed; local_3c = &(g_manager->_entityConfig)._babies; @@ -20022,7 +20022,7 @@ void Entity_Familiar::ai_lil_spewer() local_44 = (std_string *)&DAT_00000014; local_40 = 0; do { - uVar5 = ((int)(g_manager->_entityConfig)._babies._end - (int)local_3c->_begin) / 0x38; + uVar5 = (GHIDRA_INT((g_manager->_entityConfig)._babies._end) - GHIDRA_INT(local_3c->_begin)) / 0x38; if (uVar6 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar1 = (code *)swi(3); @@ -20037,10 +20037,10 @@ void Entity_Familiar::ai_lil_spewer() babyIdx = uVar6 % uVar5; } babiesBegin = local_3c->_begin; - local_5c.y = (float)((int)babiesBegin + babyIdx * 0x38); + local_5c.y = (float)(GHIDRA_INT(babiesBegin) + babyIdx * 0x38); uVar5 = *(uint *)((char *)local_5c.y + 0x34); pvVar4 = (void *)local_5c.y; - if (((int)uVar5 < 0) || + if ((GHIDRA_INT(uVar5) < 0) || ((uVar5 < 0x282 && (((uVar5 == 0 || ((g_manager->_persistentGameData)._achievements[uVar5] != 0)) || (((g_manager->_state == 2 && (g_game != (Game *)0x0)) && @@ -20048,7 +20048,7 @@ void Entity_Familiar::ai_lil_spewer() goto LAB_00634ca6; local_40 = local_40 + 1; } while (local_40 < 10); - local_40 = ((int)(g_manager->_entityConfig)._babies._end - (int)babiesBegin) / 0x38 - 0x47; + local_40 = (GHIDRA_INT((g_manager->_entityConfig)._babies._end) - GHIDRA_INT(babiesBegin)) / 0x38 - 0x47; if (uVar6 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar1 = (code *)swi(3); @@ -20061,16 +20061,16 @@ void Entity_Familiar::ai_lil_spewer() if (local_40 != 0) { uVar5 = (uVar6 >> 0x14 ^ uVar6) % local_40; } - pvVar4 = (void *)((int)babiesBegin + (uVar5 + 0x47) * 0x38); + pvVar4 = (void *)(GHIDRA_INT(babiesBegin) + (uVar5 + 0x47) * 0x38); LAB_00634ca6: uVar6 = 0; if ((this->_sprite)._layerCount != 0) { - local_44 = (std_string *)((int)pvVar4 + 0x1c); + local_44 = (std_string *)(GHIDRA_INT(pvVar4) + 0x1c); do { ((Sprite *)((Sprite *)&this->_sprite))->Sprite::ReplaceSpritesheet(uVar6,local_44); uVar6 = uVar6 + 1; pvVar4 = extraout_ECX; - } while (uVar6 < (uint)(this->_sprite)._layerCount); + } while (uVar6 < GHIDRA_UINT((this->_sprite)._layerCount)); } ((ANM2 *)(&this->_sprite))->ANM2::LoadGraphics((byte)pvVar4); this->_subtype = 1; @@ -20115,12 +20115,12 @@ LAB_00634ca6: return; } bVar2 = (byte)rng._shift1; - uVar5 = (uint)rng._seed >> (bVar2 & 0x1f) ^ rng._seed; + uVar5 = GHIDRA_UINT(rng._seed) >> (bVar2 & 0x1f) ^ rng._seed; rngShift2 = (byte)rng._shift2; uVar5 = uVar5 << (rngShift2 & 0x1f) ^ uVar5; rngShift3 = (byte)rng._shift3; uVar5 = uVar5 >> (rngShift3 & 0x1f) ^ uVar5; - baseDamage = (float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) * + baseDamage = (float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283062e-10 * 4.0 + 2.0; if (uVar5 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -20132,7 +20132,7 @@ LAB_00634ca6: uVar5 = uVar5 << (rngShift2 & 0x1f) ^ uVar5; uVar5 = uVar5 >> (rngShift3 & 0x1f) ^ uVar5; baseFallingSpeed = - (float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283062e-10 * 0.4 - 0.2; if (uVar5 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -20144,7 +20144,7 @@ LAB_00634ca6: uVar5 = uVar5 << (rngShift2 & 0x1f) ^ uVar5; uVar5 = uVar5 >> (rngShift3 & 0x1f) ^ uVar5; local_3c = (std_vector *) - ((float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283062e-10); if (uVar5 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -20155,7 +20155,7 @@ LAB_00634ca6: uVar5 = uVar5 >> (bVar2 & 0x1f) ^ uVar5; uVar5 = uVar5 << (rngShift2 & 0x1f) ^ uVar5; uVar5 = uVar5 >> (rngShift3 & 0x1f) ^ uVar5; - local_5c.y = (float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) * + local_5c.y = (float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283062e-10; if (uVar5 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -20174,8 +20174,8 @@ LAB_00634ca6: uStack_20 = 0; uStack_1c = 0; uStack_18 = 0; - tearColor = (float)((double)(int)local_68.y + - __uint_to_double_fixup[-((int)local_68.y >> 0x1f)]) * 2.3283062e-10; + tearColor = (float)((double)GHIDRA_INT(local_68.y) + + __uint_to_double_fixup[-(GHIDRA_INT(local_68.y) >> 0x1f)]) * 2.3283062e-10; local_30 = local_5c.y; local_2c = (float)local_3c; Isaac::GetAxisAlignedUnitVectorFromDir(&fireDir,uVar6); @@ -20188,10 +20188,10 @@ LAB_00634ca6: (*pcVar1)(); return; } - uVar6 = (uint)local_68.y >> ((byte)rng._shift1 & 0x1f) ^ (uint)local_68.y; + uVar6 = GHIDRA_UINT(local_68.y) >> ((byte)rng._shift1 & 0x1f) ^ GHIDRA_UINT(local_68.y); uVar6 = uVar6 << (rngShift2 & 0x1f) ^ uVar6; uVar6 = uVar6 >> ((byte)rng._shift3 & 0x1f) ^ uVar6; - local_68.y = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + local_68.y = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283062e-10 * 0.6 + 0.7; local_68.x = local_5c.y * local_68.y; local_68.y = (float)local_3c * local_68.y; @@ -20208,17 +20208,17 @@ LAB_00634ca6: pTVar11 = &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor; uVar10 = 0; local_5c.y = fireDir.y * 10.0 + (this->_pos).y; - spawned = ((Game *)(g_game))->Game::Spawn(2,(uint)local_44,&local_5c,&local_68,(Entity *)this,0,uVar5); + spawned = ((Game *)(g_game))->Game::Spawn(2,GHIDRA_UINT(local_44),&local_5c,&local_68,(Entity *)this,0,uVar5); tear = (Entity_Tear *)__RTDynamicCast(spawned,uVar10,pTVar11,pTVar12,uVar13); uVar5 = Random(); tear->_fallingAccel = 0.0; tear->_fallingSpeed = - (float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283064e-10 * 0.2 + baseFallingSpeed; tear->SetCollisionDamage(baseDamage * tearModifier); - flags._h._0_4_ = (undefined4)tearFlagsLo._h; + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = (undefined4)tearFlagsLo._h; flags._l = tearFlagsLo._l; - flags._h._4_4_ = tearFlagsLo._h._4_4_; + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = (*(undefined4 *)((char *)&(tearFlagsLo._h) + 0x4)); ((Entity_Tear *)(tear))->Entity_Tear::SetTearFlags(flags); pEVar8 = local_60; if ((float)local_60 <= 0.01) { @@ -20315,7 +20315,7 @@ void Entity_Familiar::ai_lil_harbingers() fStack_14 = -NAN; puStack_18 = &LAB_00af6ff0; local_1c = ExceptionList; - uVar4 = __security_cookie ^ (uint)(maxSpeedBySubtype + 10); + uVar4 = __security_cookie ^ GHIDRA_UINT((maxSpeedBySubtype + 10)); ExceptionList = &local_1c; iVar10 = this->_state; local_24 = uVar4; @@ -20394,7 +20394,7 @@ void Entity_Familiar::ai_lil_harbingers() local_64.y = *(float *)&game->_deathmatchManager; do { pEVar6 = *(Entity **)(*(int *)((char *)local_5c + 0x125c) + entityIndex * 4); - if (((int)local_64.y < 2) || (pEVar6->_type != 1)) { + if ((GHIDRA_INT(local_64.y) < 2) || (pEVar6->_type != 1)) { entityType = pEVar6->_type; uVar4 = entityCount; if (entityType - 10U < 0x3de) goto LAB_00637d3b; @@ -20491,7 +20491,7 @@ LAB_00637be3: fVar12 = (this->_velocity).x; local_64.y = (this->_velocity).y; fVar12 = sqrtf(fVar12 * fVar12 + local_64.y * local_64.y); - subtypeIndex = -(uint)(uVar4 != 0) & uVar4; + subtypeIndex = -GHIDRA_UINT((uVar4 != 0)) & uVar4; uVar5 = 4; if (subtypeIndex < 4) { uVar5 = subtypeIndex; @@ -20510,7 +20510,7 @@ LAB_00637be3: } iVar10 = this->_fireCooldown + 1; this->_fireCooldown = iVar10; - uVar4 = -(uint)(uVar4 != 0) & uVar4; + uVar4 = -GHIDRA_UINT((uVar4 != 0)) & uVar4; uVar5 = 4; if (uVar4 < 4) { uVar5 = uVar4; @@ -20557,7 +20557,7 @@ LAB_00637be3: bVar11 = bVar3 < (byte)*expectedName; if (bVar3 != *expectedName) { LAB_006380a0: - uVar4 = -(uint)bVar11 | 1; + uVar4 = -GHIDRA_UINT(bVar11) | 1; goto LAB_006380a5; } if (bVar3 == 0) break; @@ -20582,7 +20582,7 @@ LAB_006380a5: bVar11 = bVar3 < (byte)*expectedName; if (bVar3 != *expectedName) { LAB_006380e0: - uVar4 = -(uint)bVar11 | 1; + uVar4 = -GHIDRA_UINT(bVar11) | 1; goto LAB_006380e5; } if (bVar3 == 0) break; @@ -20634,7 +20634,7 @@ Entity_Laser * Entity_Familiar::FireBrimstone(Vector *AimDirection, byte Unk) undefined4 local_18; undefined4 local_14; - local_14 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_14 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; aimDirection = AimDirection; if (*(char *)((char *)this->_player + 0x173) == '\0') { fVar1 = AimDirection->x; @@ -20680,7 +20680,7 @@ Entity_Laser * Entity_Familiar::FireBrimstone(Vector *AimDirection, byte Unk) std::multiset::insert(&this->_linkedEntity); this->_headFrameDelay = 0x1e; if (ABS(aimDirection->x) <= ABS(aimDirection->y)) { - direction = (uint)(0.0 <= aimDirection->y) * 2 + 1; + direction = GHIDRA_UINT((0.0 <= aimDirection->y)) * 2 + 1; } else { direction = 2; @@ -20731,7 +20731,7 @@ Entity * Entity_Familiar::ThrowDip(int subType, Vector *position, Entity *spawne puStack_20 = (undefined1 *)(local_60 + 0x17); puStack_18 = &LAB_00af702d; local_1c = ExceptionList; - uVar2 = __security_cookie ^ (uint)(local_60 + 0x14); + uVar2 = __security_cookie ^ GHIDRA_UINT((local_60 + 0x14)); ExceptionList = &local_1c; savedSpawner = spawner; local_24 = uVar2; @@ -20741,7 +20741,7 @@ Entity * Entity_Familiar::ThrowDip(int subType, Vector *position, Entity *spawne bestScore = 1e+10; local_64 = (int *)0x0; EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)(local_7c + 4),3,0xc9,-1 + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)(local_7c + 4),3,0xc9,-1 ,0,0); dipListData = local_74; local_14 = 0.0; @@ -20766,7 +20766,7 @@ Entity * Entity_Familiar::ThrowDip(int subType, Vector *position, Entity *spawne local_60[9] = 0.0; local_60[10] = 0.0; local_60[0xb] = 0.0; - if ((uint)piVar1[0xc] < 0xf) { + if (GHIDRA_UINT(piVar1[0xc]) < 0xf) { score = local_60[piVar1[0xc]]; } else { @@ -20777,7 +20777,7 @@ Entity * Entity_Familiar::ThrowDip(int subType, Vector *position, Entity *spawne oldestDip = piVar1; bestScore = score; } - local_64 = (int *)((int)local_64 + 1); + local_64 = (int *)(GHIDRA_INT(local_64) + 1); } uVar4 = uVar4 + 1; } while (uVar4 < dipCount); @@ -20807,15 +20807,15 @@ Entity * Entity_Familiar::ThrowDip(int subType, Vector *position, Entity *spawne heapBytes = &g_allocatedBytesNoHeap; } else { - heapBytes = (qword *)((int)g_mainHeap + 0x30); + heapBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (dipListData != 0.0) { uVar4 = *(uint *)((char *)dipListData + -4); prevBytes = *heapBytes; - *(uint *)heapBytes = (uint)*heapBytes - uVar4; + *(uint *)heapBytes = GHIDRA_UINT(*heapBytes) - uVar4; *(uint *)((char *)heapBytes + 4) = - *(uint *)((char *)heapBytes + 4) - (uint)((uint)prevBytes < uVar4); - free((void *)((int)dipListData + -4)); + *(uint *)((char *)heapBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevBytes) < uVar4)); + free((void *)(GHIDRA_INT(dipListData) + -4)); } } } @@ -20826,25 +20826,25 @@ joined_r0x0063923f: heapBytes = &g_allocatedBytesNoHeap; } else { - heapBytes = (qword *)((int)g_mainHeap + 0x30); + heapBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (dipListData != 0.0) { uVar2 = *(uint *)((char *)dipListData + -4); prevBytes = *heapBytes; - *(uint *)heapBytes = (uint)*heapBytes - uVar2; + *(uint *)heapBytes = GHIDRA_UINT(*heapBytes) - uVar2; *(uint *)((char *)heapBytes + 4) = - *(uint *)((char *)heapBytes + 4) - (uint)((uint)prevBytes < uVar2); - free((void *)((int)dipListData + -4)); + *(uint *)((char *)heapBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevBytes) < uVar2)); + free((void *)(GHIDRA_INT(dipListData) + -4)); } } local_14 = -NAN; uVar2 = Random(); owner = savedSpawner; pEVar3 = ((Game *)(g_game))->Game::Spawn(3,0xc9,position,&g_vectorZero,savedSpawner, - -(uint)(4 < subType - 7U) & subType,uVar2); - flagsHigh = *(undefined4 *)((int)&pEVar3->_flags + 4); - *(uint *)&pEVar3->_flags = (uint)pEVar3->_flags & 0xfffffffb; - *(undefined4 *)((int)&pEVar3->_flags + 4) = flagsHigh; + -GHIDRA_UINT((4 < subType - 7U)) & subType,uVar2); + flagsHigh = *(undefined4 *)(GHIDRA_INT(&pEVar3->_flags) + 4); + *(uint *)&pEVar3->_flags = GHIDRA_UINT(pEVar3->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&pEVar3->_flags) + 4) = flagsHigh; if (((1 < *(int *)&g_game->_deathmatchManager) && (owner != (Entity *)0x0)) && (owner->_type == 1) ) { playerColor = 0; @@ -20863,12 +20863,12 @@ LAB_006392f7: (pEVar3->_sprite)._color._colorize[1] = 0.0; (pEVar3->_sprite)._color._colorize[2] = 0.0; (pEVar3->_sprite)._color._colorize[3] = 0.0; - dipColor->_tint[0] = (float)local_7c._0_4_; - (pEVar3->_sprite)._color._tint[1] = (float)local_7c._4_4_; + dipColor->_tint[0] = (*(undefined4 *)((char *)&((float)local_7c) + 0x0)); + (pEVar3->_sprite)._color._tint[1] = (*(undefined4 *)((char *)&((float)local_7c) + 0x4)); (pEVar3->_sprite)._color._tint[2] = local_74; (pEVar3->_sprite)._color._tint[3] = 1.0; *(ulonglong *)(pEVar3->_sprite)._color._offset = - CONCAT44((float)local_7c._4_4_ * 0.25,(float)local_7c._0_4_ * 0.25); + CONCAT44((*(undefined4 *)((char *)&((float)local_7c) + 0x4)) * 0.25,(*(undefined4 *)((char *)&((float)local_7c) + 0x0)) * 0.25); (pEVar3->_sprite)._color._offset[2] = local_74 * 0.25; } } @@ -20928,7 +20928,7 @@ Entity_Tear * Entity_Familiar::FireProjectile(Vector *AimDirection, byte Unk) TearParams hitParams; uint local_14; - local_14 = __security_cookie ^ (uint)&tearDamage; + local_14 = __security_cookie ^ GHIDRA_UINT(&tearDamage); fallingSpeed = 0.0; velocityX = AimDirection->x * 10.0; velocityY = AimDirection->y * 10.0; @@ -21013,9 +21013,9 @@ Entity_Tear * Entity_Familiar::FireProjectile(Vector *AimDirection, byte Unk) tearDamage = 3.5; local_10c = (EntityPtr *)0x0; afVar9[0] = (fVar8 * 0.25 + 0.75) * 0.8; - afVar9[1] = (float)extraout_var._0_4_; - afVar9[2] = (float)extraout_var._4_4_; - afVar9[3] = (float)extraout_var._8_4_; + afVar9[1] = (*(undefined4 *)((char *)&((float)extraout_var) + 0x0)); + afVar9[2] = (*(undefined4 *)((char *)&((float)extraout_var) + 0x4)); + afVar9[3] = (*(undefined4 *)((char *)&((float)extraout_var) + 0x8)); tearScale = afVar9[0]; ((Color *)(&tearColor))->Color::Color(); uVar4 = this->_variant; @@ -21030,7 +21030,7 @@ LAB_00639ad8: if (uVar4 != 0xb) goto LAB_00639ad8; LAB_00639ae3: rngResult = Random(); - afVar9 = (float [4])ZEXT416((uint)tearScale); + afVar9 = (float [4])ZEXT416(GHIDRA_UINT(tearScale)); fVar12 = 0.8; uVar4 = this->_variant; local_128 = (float)(rngResult % 10 + 1); @@ -21038,34 +21038,34 @@ LAB_00639ae3: afVar10 = afVar9; if (uVar4 == 0xc) { local_140 = (float)g_tearFlagPiercing._l; - fStack_13c = g_tearFlagPiercing._l._4_4_; + fStack_13c = (*(undefined4 *)((char *)&(g_tearFlagPiercing._l) + 0x4)); local_138 = (float)g_tearFlagPiercing._h; - fStack_134 = g_tearFlagPiercing._h._4_4_; + fStack_134 = (*(undefined4 *)((char *)&(g_tearFlagPiercing._h) + 0x4)); if (this->_player != (Entity_Player *)0x0) { iVar2 = ((Entity_Player *)(this->_player))->Entity_Player::GetTrinketMultiplier(0x36); afVar10 = afVar9; if (1 < iVar2) { tearDamage = *(float *)((char *)this->_player + 0x1470); if (2 < iVar2) { - afVar10._0_8_ = (double)tearDamage * 1.5; + (*(undefined8 *)((char *)&(afVar10) + 0x0)) = (double)tearDamage * 1.5; afVar10[2] = 0.0; afVar10[3] = 0.0; - tearDamage = (float)afVar10._0_8_; + tearDamage = (*(undefined8 *)((char *)&((float)afVar10) + 0x0)); } } } goto LAB_0063a552; } - afVar10._4_12_ = afVar9._4_12_; + (*(undefined1 *)((char *)&(afVar10) + 0x4)) = (*(undefined1 *)((char *)&(afVar9) + 0x4)); if (((uVar4 == 9) || (local_128 == 1.4013e-45)) || (local_100 == 8.40779e-45)) { local_140 = (float)g_tearFlagSpectral._l; - fStack_13c = g_tearFlagSpectral._l._4_4_; + fStack_13c = (*(undefined4 *)((char *)&(g_tearFlagSpectral._l) + 0x4)); tearColor._tint[0] = _DAT_00babc50; tearColor._tint[1] = _UNK_00babc54; tearColor._tint[2] = _UNK_00babc58; tearColor._tint[3] = _UNK_00babc5c; local_138 = (float)g_tearFlagSpectral._h; - fStack_134 = g_tearFlagSpectral._h._4_4_; + fStack_134 = (*(undefined4 *)((char *)&(g_tearFlagSpectral._h) + 0x4)); afVar10 = _DAT_00babc50; } else { @@ -21074,7 +21074,7 @@ LAB_00639ae3: tearScale = fVar8 * 0.9; uVar7 = 1; local_12c = 1.4013e-45; - afVar10._0_12_ = ZEXT812(0x40800000); + (*(undefined1 *)((char *)&(afVar10) + 0x0)) = ZEXT812(0x40800000); afVar10[3] = 0.0; tearDamage = afVar10[0]; goto LAB_0063a552; @@ -21100,10 +21100,10 @@ LAB_00639ae3: goto LAB_0063a552; } if (((uVar4 == 4) || (local_128 == 7.00649e-45)) || (local_100 == 2.8026e-45)) { - local_140 = (float)((uint)g_tearFlagSlow._l | (uint)g_tearFlagGish._l); - fStack_13c = (float)(g_tearFlagSlow._l._4_4_ | g_tearFlagGish._l._4_4_); - local_138 = (float)((uint)g_tearFlagSlow._h | (uint)g_tearFlagGish._h); - fStack_134 = (float)(g_tearFlagSlow._h._4_4_ | g_tearFlagGish._h._4_4_); + local_140 = (float)(GHIDRA_UINT(g_tearFlagSlow._l) | GHIDRA_UINT(g_tearFlagGish._l)); + fStack_13c = (float)((*(undefined4 *)((char *)&(g_tearFlagSlow._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagGish._l) + 0x4))); + local_138 = (float)(GHIDRA_UINT(g_tearFlagSlow._h) | GHIDRA_UINT(g_tearFlagGish._h)); + fStack_134 = (float)((*(undefined4 *)((char *)&(g_tearFlagSlow._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagGish._h) + 0x4))); tearColor._tint[0] = _DAT_00bac560; tearColor._tint[1] = _UNK_00bac564; tearColor._tint[2] = _UNK_00bac568; @@ -21117,18 +21117,18 @@ LAB_00639ae3: if (((uVar4 == 5) || (local_128 == 8.40779e-45)) || (local_100 == 4.2039e-45)) { uVar7 = 0x15; local_140 = (float)g_tearFlagHoming._l; - fStack_13c = g_tearFlagHoming._l._4_4_; + fStack_13c = (*(undefined4 *)((char *)&(g_tearFlagHoming._l) + 0x4)); fallingSpeed = -3.0; local_12c = 2.94273e-44; local_138 = (float)g_tearFlagHoming._h; - fStack_134 = g_tearFlagHoming._h._4_4_; + fStack_134 = (*(undefined4 *)((char *)&(g_tearFlagHoming._h) + 0x4)); goto LAB_0063a54a; } if ((uVar4 == 0xd) || (local_128 == 9.80909e-45)) { - local_140 = (float)((uint)(float)g_tearFlagSpectral._l | (uint)(float)g_tearFlagHoming._l); - fStack_13c = (float)((uint)g_tearFlagSpectral._l._4_4_ | (uint)g_tearFlagHoming._l._4_4_); - local_138 = (float)((uint)(float)g_tearFlagSpectral._h | (uint)(float)g_tearFlagHoming._h); - fStack_134 = (float)((uint)g_tearFlagSpectral._h._4_4_ | (uint)g_tearFlagHoming._h._4_4_); + local_140 = (float)(GHIDRA_UINT((float)g_tearFlagSpectral._l) | GHIDRA_UINT((float)g_tearFlagHoming._l)); + fStack_13c = (float)((*(undefined4 *)((char *)&(GHIDRA_UINT(g_tearFlagSpectral._l)) + 0x4)) | (*(undefined4 *)((char *)&(GHIDRA_UINT(g_tearFlagHoming._l)) + 0x4))); + local_138 = (float)(GHIDRA_UINT((float)g_tearFlagSpectral._h) | GHIDRA_UINT((float)g_tearFlagHoming._h)); + fStack_134 = (float)((*(undefined4 *)((char *)&(GHIDRA_UINT(g_tearFlagSpectral._h)) + 0x4)) | (*(undefined4 *)((char *)&(GHIDRA_UINT(g_tearFlagHoming._h)) + 0x4))); fallingSpeed = -3.0; tearColor._tint[0] = _DAT_00babc50; tearColor._tint[1] = _UNK_00babc54; @@ -21146,9 +21146,9 @@ LAB_00639ae3: uVar4 = Random(); if ((uVar4 % 10 == 0) || (local_128 == 1.12104e-44)) { local_140 = (float)g_tearFlagCharm._l; - fStack_13c = g_tearFlagCharm._l._4_4_; + fStack_13c = (*(undefined4 *)((char *)&(g_tearFlagCharm._l) + 0x4)); local_138 = (float)g_tearFlagCharm._h; - fStack_134 = g_tearFlagCharm._h._4_4_; + fStack_134 = (*(undefined4 *)((char *)&(g_tearFlagCharm._h) + 0x4)); } tearColor._tint[0] = _DAT_00bac6e0; tearColor._tint[1] = _UNK_00bac6e4; @@ -21159,10 +21159,10 @@ LAB_00639ae3: tearColor._offset[2] = 0.0; afVar10 = _DAT_00bac6e0; if (this->_variant == 0x48) { - local_140 = (float)((uint)local_140 | (uint)g_tearFlagHpDrop._l); - fStack_13c = (float)((uint)fStack_13c | g_tearFlagHpDrop._l._4_4_); - local_138 = (float)((uint)local_138 | (uint)g_tearFlagHpDrop._h); - fStack_134 = (float)((uint)fStack_134 | g_tearFlagHpDrop._h._4_4_); + local_140 = (float)(GHIDRA_UINT(local_140) | GHIDRA_UINT(g_tearFlagHpDrop._l)); + fStack_13c = (float)(GHIDRA_UINT(fStack_13c) | (*(undefined4 *)((char *)&(g_tearFlagHpDrop._l) + 0x4))); + local_138 = (float)(GHIDRA_UINT(local_138) | GHIDRA_UINT(g_tearFlagHpDrop._h)); + fStack_134 = (float)(GHIDRA_UINT(fStack_134) | (*(undefined4 *)((char *)&(g_tearFlagHpDrop._h) + 0x4))); } goto LAB_0063a552; } @@ -21205,14 +21205,14 @@ LAB_00639ae3: Entity_Player::GetTearHitParams (this_00,&hitParams,1,(float)local_124,(uVar4 & 1) * 2 + -1,(Entity *)0x0); ((Color *)(&tearColor))->Color::operator_assign(&hitParams._tearColor); - local_fc = (float)(~((uint)g_tearFlagMulligan._h | (uint)g_tearFlagLudovico._h | - (uint)g_tearFlagHpDrop._h) & (uint)hitParams._flags._h); - local_108.x = (float)(~(g_tearFlagMulligan._l._4_4_ | g_tearFlagLudovico._l._4_4_ | - g_tearFlagHpDrop._l._4_4_) & hitParams._flags._l._4_4_); - local_f8.x = (float)(~(g_tearFlagMulligan._h._4_4_ | g_tearFlagLudovico._h._4_4_ | - g_tearFlagHpDrop._h._4_4_) & hitParams._flags._h._4_4_); - fVar8 = (float)(~((uint)g_tearFlagMulligan._l | (uint)g_tearFlagLudovico._l | - (uint)g_tearFlagHpDrop._l) & (uint)hitParams._flags._l); + local_fc = (float)(~(GHIDRA_UINT(g_tearFlagMulligan._h) | GHIDRA_UINT(g_tearFlagLudovico._h) | + GHIDRA_UINT(g_tearFlagHpDrop._h)) & GHIDRA_UINT(hitParams._flags._h)); + local_108.x = (float)(~((*(undefined4 *)((char *)&(g_tearFlagMulligan._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagLudovico._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagHpDrop._l) + 0x4))) & (*(undefined4 *)((char *)&(hitParams._flags._l) + 0x4))); + local_f8.x = (float)(~((*(undefined4 *)((char *)&(g_tearFlagMulligan._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagLudovico._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagHpDrop._h) + 0x4))) & (*(undefined4 *)((char *)&(hitParams._flags._h) + 0x4))); + fVar8 = (float)(~(GHIDRA_UINT(g_tearFlagMulligan._l) | GHIDRA_UINT(g_tearFlagLudovico._l) | + GHIDRA_UINT(g_tearFlagHpDrop._l)) & GHIDRA_UINT(hitParams._flags._l)); tearDamage = hitParams._tearDamage; local_140 = fVar8; fStack_13c = local_108.x; @@ -21220,10 +21220,10 @@ LAB_00639ae3: fStack_134 = local_f8.x; bVar1 = ((Entity_Player *)(this->_player))->Entity_Player::HasCollectible(0x95,0); if (bVar1 != 0) { - fStack_13c = (float)((uint)local_108.x | g_tearFlagExplosive._l._4_4_); - local_140 = (float)((uint)fVar8 | (uint)g_tearFlagExplosive._l); - local_138 = (float)((uint)local_fc | (uint)g_tearFlagExplosive._h); - fStack_134 = (float)((uint)local_f8.x | g_tearFlagExplosive._h._4_4_); + fStack_13c = (float)(GHIDRA_UINT(local_108.x) | (*(undefined4 *)((char *)&(g_tearFlagExplosive._l) + 0x4))); + local_140 = (float)(GHIDRA_UINT(fVar8) | GHIDRA_UINT(g_tearFlagExplosive._l)); + local_138 = (float)(GHIDRA_UINT(local_fc) | GHIDRA_UINT(g_tearFlagExplosive._h)); + fStack_134 = (float)(GHIDRA_UINT(local_f8.x) | (*(undefined4 *)((char *)&(g_tearFlagExplosive._h) + 0x4))); } tearScale = hitParams._tearScale; fallingSpeed = -*(float *)((char *)this->_player + 0x1478); @@ -21238,17 +21238,17 @@ LAB_00639ae3: afVar10 = afVar9; if (uVar4 % 10 == 0) { local_140 = (float)g_tearFlagCoinDrop._l; - fStack_13c = g_tearFlagCoinDrop._l._4_4_; + fStack_13c = (*(undefined4 *)((char *)&(g_tearFlagCoinDrop._l) + 0x4)); local_138 = (float)g_tearFlagCoinDrop._h; - fStack_134 = g_tearFlagCoinDrop._h._4_4_; + fStack_134 = (*(undefined4 *)((char *)&(g_tearFlagCoinDrop._h) + 0x4)); goto LAB_0063a54a; } } iVar2 = this->_variant; if (iVar2 == 0x5c) { - fStack_13c = g_tearFlagHoming._l._4_4_; + fStack_13c = (*(undefined4 *)((char *)&(g_tearFlagHoming._l) + 0x4)); local_140 = (float)g_tearFlagHoming._l; - fStack_134 = g_tearFlagHoming._h._4_4_; + fStack_134 = (*(undefined4 *)((char *)&(g_tearFlagHoming._h) + 0x4)); local_138 = (float)g_tearFlagHoming._h; ((Color *)((Color *)&tmpColor))->Color::Color(); ((Color *)(&tearColor))->Color::operator_assign(other); @@ -21262,7 +21262,7 @@ LAB_00639ae3: velocityX = velocityX * 0.75; fallingSpeed = -0.75; velocityY = velocityY * 0.75; - afVar10 = (float [4])ZEXT416((uint)velocityY); + afVar10 = (float [4])ZEXT416(GHIDRA_UINT(velocityY)); velocity.x = velocityX; velocity.y = velocityY; goto LAB_0063a552; @@ -21275,7 +21275,7 @@ LAB_00639ae3: local_12c = 1.4013e-45; pVVar3 = MusicManager::RandomVector(&local_108); uVar4 = Random(); - fVar8 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + fVar8 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10; fVar12 = fVar8 * pVVar3->y; fVar8 = fVar8 * pVVar3->x; @@ -21287,12 +21287,12 @@ LAB_00639ae3: uVar7 = Random(); local_10c = (EntityPtr *)0x3f000000; tearScale = tearScale * - ((float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 * 0.05 + ((float)(uVar4 & 1) + 0.0) * 0.4 + 0.9); uVar4 = Random(); - fallingSpeed = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + fallingSpeed = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 15.0 + 5.0; - afVar10 = (float [4])ZEXT416((uint)fallingSpeed); + afVar10 = (float [4])ZEXT416(GHIDRA_UINT(fallingSpeed)); fallingSpeed = 0.0 - fallingSpeed; uVar7 = 1; goto LAB_0063a552; @@ -21335,7 +21335,7 @@ LAB_0063a061: FUN_0067af30(); fallingSpeed = 0.0; tearScale = fVar8 * 1.25 * tearScale; - afVar10._0_12_ = ZEXT812(0xbccccccd); + (*(undefined1 *)((char *)&(afVar10) + 0x0)) = ZEXT812(0xbccccccd); afVar10[3] = 0.0; local_10c = afVar10[0]; goto LAB_0063a552; @@ -21344,22 +21344,22 @@ LAB_0063a061: } uVar7 = 0x29; tearScale = tearScale * 1.1; - afVar10 = (float [4])ZEXT416((uint)tearScale); + afVar10 = (float [4])ZEXT416(GHIDRA_UINT(tearScale)); local_dc = (float)g_tearFlagIce._l; - local_f8.x = g_tearFlagIce._l._4_4_; + local_f8.x = (*(undefined4 *)((char *)&(g_tearFlagIce._l) + 0x4)); local_140 = (float)g_tearFlagIce._l; - fStack_13c = g_tearFlagIce._l._4_4_; + fStack_13c = (*(undefined4 *)((char *)&(g_tearFlagIce._l) + 0x4)); local_12c = 5.74532e-44; local_fc = (float)g_tearFlagIce._h; - local_108.x = g_tearFlagIce._h._4_4_; + local_108.x = (*(undefined4 *)((char *)&(g_tearFlagIce._h) + 0x4)); local_138 = (float)g_tearFlagIce._h; - fStack_134 = g_tearFlagIce._h._4_4_; + fStack_134 = (*(undefined4 *)((char *)&(g_tearFlagIce._h) + 0x4)); uVar4 = Random(); if (uVar4 % 10 != 0) goto LAB_0063a552; - local_140 = (float)((uint)local_dc | (uint)g_tearFlagFreeze._l); - fStack_13c = (float)((uint)local_f8.x | g_tearFlagFreeze._l._4_4_); - local_138 = (float)((uint)local_fc | (uint)g_tearFlagFreeze._h); - fStack_134 = (float)((uint)local_108.x | g_tearFlagFreeze._h._4_4_); + local_140 = (float)(GHIDRA_UINT(local_dc) | GHIDRA_UINT(g_tearFlagFreeze._l)); + fStack_13c = (float)(GHIDRA_UINT(local_f8.x) | (*(undefined4 *)((char *)&(g_tearFlagFreeze._l) + 0x4))); + local_138 = (float)(GHIDRA_UINT(local_fc) | GHIDRA_UINT(g_tearFlagFreeze._h)); + fStack_134 = (float)(GHIDRA_UINT(local_108.x) | (*(undefined4 *)((char *)&(g_tearFlagFreeze._h) + 0x4))); } LAB_0063a54a: LAB_0063a552: @@ -21374,22 +21374,22 @@ LAB_0063a552: afVar10 = _DAT_00bac940; local_12c = (float)uVar7; } - local_108.x = (float)((uint)fStack_134 & g_tearFlagBurstsplit._h._4_4_); - if (((((uint)local_140 & (uint)g_tearFlagBurstsplit._l) != 0 || - ((uint)fStack_13c & g_tearFlagBurstsplit._l._4_4_) != 0) || - (((uint)local_138 & (uint)g_tearFlagBurstsplit._h) != 0 || + local_108.x = (float)(GHIDRA_UINT(fStack_134) & (*(undefined4 *)((char *)&(g_tearFlagBurstsplit._h) + 0x4))); + if ((((GHIDRA_UINT(local_140) & GHIDRA_UINT(g_tearFlagBurstsplit._l)) != 0 || + (GHIDRA_UINT(fStack_13c) & (*(undefined4 *)((char *)&(g_tearFlagBurstsplit._l) + 0x4))) != 0) || + ((GHIDRA_UINT(local_138) & GHIDRA_UINT(g_tearFlagBurstsplit._h)) != 0 || (EntityPtr *)local_108.x != (EntityPtr *)0x0)) && (bVar1 = ((Entity_Player *)(this->_player))->Entity_Player::HasCollectible(0xe9,0), bVar1 == 0)) { fVar8 = *(float *)((char *)this->_player + 0x1474); fallingSpeed = ((fVar8 * 0.75) / *(float *)((char *)this->_player + 0x1464)) * (23.75 / -fVar8); - afVar10._0_12_ = ZEXT812(0x3fa66666); + (*(undefined1 *)((char *)&(afVar10) + 0x0)) = ZEXT812(0x3fa66666); afVar10[3] = 0.0; local_10c = afVar10[0]; } if (this->_player != (Entity_Player *)0x0) { bVar1 = ((Entity_Player *)(this->_player))->Entity_Player::IsHologram(); if (bVar1 != 0) { - afVar10 = (float [4])ZEXT416((uint)(tearColor._tint[3] * 0.25)); + afVar10 = (float [4])ZEXT416(GHIDRA_UINT((tearColor._tint[3] * 0.25))); tearColor._tint[3] = tearColor._tint[3] * 0.25; } if ((g_manager->_netplayManager != *(NetplayManager *)(g_manager + 1)) && @@ -21415,17 +21415,17 @@ LAB_0063a552: pVVar3 = local_124; uVar4 = Random(); tear = (Entity_Tear *) - ((Game *)(g_game))->Game::SpawnEx(2,(uint)local_12c,&this->_pos,pVVar3,(Entity *)this,0,uVar4,0); + ((Game *)(g_game))->Game::SpawnEx(2,GHIDRA_UINT(local_12c),&this->_pos,pVVar3,(Entity *)this,0,uVar4,0); uVar4 = Random(); tear->_fallingSpeed = - (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 0.2 + fallingSpeed; tear->_fallingAccel = (float)local_10c; tear->SetCollisionDamage(tearDamage); - flags_01._l._4_4_ = local_140; - flags_01._l._0_4_ = tearScale; - flags_01._h._0_4_ = fStack_13c; - flags_01._h._4_4_ = local_138; + (*(undefined4 *)((char *)&(flags_01._l) + 0x4)) = local_140; + (*(undefined4 *)((char *)&(flags_01._l) + 0x0)) = tearScale; + (*(undefined4 *)((char *)&(flags_01._h) + 0x0)) = fStack_13c; + (*(undefined4 *)((char *)&(flags_01._h) + 0x4)) = local_138; ((Entity_Tear *)(tear))->Entity_Tear::SetTearFlags(flags_01); tear->_baseScale = tearDamage; tear->_fScale = tearDamage; @@ -21442,7 +21442,7 @@ LAB_0063a552: TryFireTear(this,tear); ((Entity *)((Entity *)this))->Entity::convert_shot_for_enemy_owner((Entity *)tear); local_124 = local_124 + 1; - local_128 = (float)((int)local_128 + -1); + local_128 = (float)(GHIDRA_INT(local_128) + -1); } while (local_128 != 0.0); return tear; } @@ -21456,14 +21456,14 @@ LAB_0063a552: ((Game *)(g_game))->Game::SpawnEx(2,uVar7,&this->_pos,&velocity,(Entity *)this,0,uVar4,0); uVar4 = Random(); tear->_fallingSpeed = - (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * 2.3283064e-10 + (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 0.2 + fallingSpeed; tear->_fallingAccel = (float)local_10c; tear->SetCollisionDamage(tearDamage); - flags_00._l._4_4_ = local_140; - flags_00._l._0_4_ = tearScale; - flags_00._h._0_4_ = fStack_13c; - flags_00._h._4_4_ = local_138; + (*(undefined4 *)((char *)&(flags_00._l) + 0x4)) = local_140; + (*(undefined4 *)((char *)&(flags_00._l) + 0x0)) = tearScale; + (*(undefined4 *)((char *)&(flags_00._h) + 0x0)) = fStack_13c; + (*(undefined4 *)((char *)&(flags_00._h) + 0x4)) = local_138; ((Entity_Tear *)(tear))->Entity_Tear::SetTearFlags(flags_00); tear->_baseScale = tearDamage; tear->_fScale = tearDamage; @@ -21483,8 +21483,8 @@ LAB_0063a552: } local_124 = (Vector *)0x0; do { - local_128 = ((float)(int)local_124 / 3.0) * 10.0 - 5.0; - local_108.x = (((float)(int)local_124 / 3.0) * 180.0 - 90.0) * 0.017453292; + local_128 = ((float)GHIDRA_INT(local_124) / 3.0) * 10.0 - 5.0; + local_108.x = (((float)GHIDRA_INT(local_124) / 3.0) * 180.0 - 90.0) * 0.017453292; local_fc = cos(local_108.x); fVar8 = sin(local_108.x); local_128 = local_128 * 0.017453292; @@ -21496,10 +21496,10 @@ LAB_0063a552: velocity.y = velocityY * local_108.x + velocityX * fVar8; uVar4 = Random(); tear = (Entity_Tear *) - ((Game *)(g_game))->Game::SpawnEx(2,(uint)local_12c,&local_f8,&velocity,(Entity *)this,0,uVar4,0); + ((Game *)(g_game))->Game::SpawnEx(2,GHIDRA_UINT(local_12c),&local_f8,&velocity,(Entity *)this,0,uVar4,0); uVar4 = Random(); tear->_fallingSpeed = - (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * 2.3283064e-10 + (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 0.2 + fallingSpeed; tear->_fallingAccel = (float)local_10c; tear->SetCollisionDamage(tearDamage); @@ -21511,19 +21511,19 @@ LAB_0063a552: fVar5 = local_138; } else { - fVar8 = (float)((uint)tearScale | (uint)g_tearFlagSlow._l); - fVar12 = (float)((uint)local_140 | g_tearFlagSlow._l._4_4_); - fVar6 = (float)((uint)fStack_13c | (uint)g_tearFlagSlow._h); - fVar5 = (float)((uint)local_138 | g_tearFlagSlow._h._4_4_); + fVar8 = (float)(GHIDRA_UINT(tearScale) | GHIDRA_UINT(g_tearFlagSlow._l)); + fVar12 = (float)(GHIDRA_UINT(local_140) | (*(undefined4 *)((char *)&(g_tearFlagSlow._l) + 0x4))); + fVar6 = (float)(GHIDRA_UINT(fStack_13c) | GHIDRA_UINT(g_tearFlagSlow._h)); + fVar5 = (float)(GHIDRA_UINT(local_138) | (*(undefined4 *)((char *)&(g_tearFlagSlow._h) + 0x4))); local_f8.y = fVar8; local_f0.x = fVar12; local_f0.y = fVar6; local_e8 = fVar5; } - flags._l._4_4_ = fVar12; - flags._l._0_4_ = fVar8; - flags._h._0_4_ = fVar6; - flags._h._4_4_ = fVar5; + (*(undefined4 *)((char *)&(flags._l) + 0x4)) = fVar12; + (*(undefined4 *)((char *)&(flags._l) + 0x0)) = fVar8; + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = fVar6; + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = fVar5; ((Entity_Tear *)(tear))->Entity_Tear::SetTearFlags(flags); tear->_baseScale = tearDamage; tear->_fScale = tearDamage; @@ -21539,8 +21539,8 @@ LAB_0063a552: tear->_tearIdx = uVar4 & 1; TryFireTear(this,tear); ((Entity *)((Entity *)this))->Entity::convert_shot_for_enemy_owner((Entity *)tear); - local_124 = (Vector *)((int)local_124 + 1); - } while ((int)local_124 < 4); + local_124 = (Vector *)(GHIDRA_INT(local_124) + 1); + } while (GHIDRA_INT(local_124) < 4); return tear; } @@ -21561,7 +21561,7 @@ Entity_Laser * Entity_Familiar::sprinkler_shoot_laser(float angle, float distanc uint local_c; bool isSpectral; - local_c = __security_cookie ^ (uint)auStack_90; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_90); angleRad = angle * 0.017453292; distanceLocal = distance; local_84 = angle; @@ -21576,15 +21576,15 @@ Entity_Laser * Entity_Familiar::sprinkler_shoot_laser(float angle, float distanc Entity_Player::GetTearHitParams(this_00,&tearParams,3,1.0,(rngResult & 1) * 2 + -1,(Entity *)0x0); iVar2 = *(int *)pEVar1; *(undefined4 *)&(pEVar1->_tearFlags)._l = (undefined4)tearParams._flags._l; - *(undefined4 *)((int)&(pEVar1->_tearFlags)._l + 4) = tearParams._flags._l._4_4_; + *(undefined4 *)(GHIDRA_INT(&(pEVar1->_tearFlags)._l) + 4) = (*(undefined4 *)((char *)&(tearParams._flags._l) + 0x4)); *(undefined4 *)&(pEVar1->_tearFlags)._h = (undefined4)tearParams._flags._h; - *(undefined4 *)((int)&(pEVar1->_tearFlags)._h + 4) = tearParams._flags._h._4_4_; + *(undefined4 *)(GHIDRA_INT(&(pEVar1->_tearFlags)._h) + 4) = (*(undefined4 *)((char *)&(tearParams._flags._h) + 0x4)); (**(code **)(iVar2 + 0x3c))(&tearParams._tearColor,0xffffffff,0xff,0,1); - pEVar1->SetCollisionDamage(tearParams._52_4_); - if ((((uint)tearParams._tearColor._colorize[2] & (uint)g_tearFlagSpectral._l) == 0 && - ((uint)tearParams._tearColor._colorize[3] & g_tearFlagSpectral._l._4_4_) == 0) && - (((uint)tearParams._tearColor._offset[0] & (uint)g_tearFlagSpectral._h) == 0 && - ((uint)tearParams._tearColor._offset[1] & g_tearFlagSpectral._h._4_4_) == 0)) { + pEVar1->SetCollisionDamage((*(undefined4 *)((char *)&(tearParams) + 0x34))); + if (((GHIDRA_UINT(tearParams._tearColor._colorize[2]) & GHIDRA_UINT(g_tearFlagSpectral._l)) == 0 && + (GHIDRA_UINT(tearParams._tearColor._colorize[3]) & (*(undefined4 *)((char *)&(g_tearFlagSpectral._l) + 0x4))) == 0) && + ((GHIDRA_UINT(tearParams._tearColor._offset[0]) & GHIDRA_UINT(g_tearFlagSpectral._h)) == 0 && + (GHIDRA_UINT(tearParams._tearColor._offset[1]) & (*(undefined4 *)((char *)&(g_tearFlagSpectral._h) + 0x4))) == 0)) { isSpectral = false; } else { @@ -21615,7 +21615,7 @@ void Entity_Familiar::update_idle_anim_by_size() byte *animData; float baseSize; - local_c = __security_cookie ^ (uint)targetSize; + local_c = __security_cookie ^ GHIDRA_UINT(targetSize); targetSize[0] = *(float *)((char *)this->_player + 0x15c) * *(float *)((char *)this->_player + 0xe4) * 100.0; if (this->_orbitSpeed == targetSize[0]) { @@ -21639,7 +21639,7 @@ void Entity_Familiar::update_idle_anim_by_size() isLess = bVar1 < *wantedName; if (bVar1 != *wantedName) { LAB_0063b402: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0063b407; } if (bVar1 == 0) break; @@ -21696,7 +21696,7 @@ void Entity_Familiar::RemoveFromPlayer(byte UnusedRemoveFamiliar) uint *levelItemsEnd; Manager *manager; - local_18[4] = __security_cookie ^ (uint)(local_18 + 5); + local_18[4] = __security_cookie ^ GHIDRA_UINT((local_18 + 5)); this->Remove(); manager = g_manager; item = this->_item; @@ -21708,9 +21708,9 @@ void Entity_Familiar::RemoveFromPlayer(byte UnusedRemoveFamiliar) goto LAB_0063b918; case 0x41: pvVar3 = this->_player; - bVar4 = ((TemporaryEffects *)((TemporaryEffects *)((int)pvVar3 + 0x1508)))->TemporaryEffects::HasNullEffect(0x6b); + bVar4 = ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(pvVar3) + 0x1508)))->TemporaryEffects::HasNullEffect(0x6b); if (bVar4 != 0) { - ((TemporaryEffects *)((TemporaryEffects *)((int)pvVar3 + 0x1508)))->TemporaryEffects::RemoveNullEffect(0x6b,1); + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(pvVar3) + 0x1508)))->TemporaryEffects::RemoveNullEffect(0x6b,1); goto LAB_0063bcad; } break; @@ -21744,7 +21744,7 @@ LAB_0063b918: ((Entity_Player *)(this->_player))->Entity_Player::IncrementPlayerFormCounter(0xc,-iVar8); return; case 0xf4: - ((TemporaryEffects *)((TemporaryEffects *)((int)this->_player + 0x1508)))->TemporaryEffects::RemoveNullEffect(0x6b,1); + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this->_player) + 0x1508)))->TemporaryEffects::RemoveNullEffect(0x6b,1); goto LAB_0063bcad; } if (item != (ItemConfig_Item *)0x0) { @@ -21804,12 +21804,12 @@ LAB_0063bbd4: } goto LAB_0063bc53; } - psVar1 = (short *)((int)this->_player + 0x1384); + psVar1 = (short *)(GHIDRA_INT(this->_player) + 0x1384); *psVar1 = *psVar1 + -1; } } else { - if ((int)uVar5 < 0x114) { + if (GHIDRA_INT(uVar5) < 0x114) { if (uVar5 == 0x113) { familiarFlagBit = 0x10; } @@ -21901,7 +21901,7 @@ LAB_0063bca7: return; } LAB_0063bcad: - puVar7 = (uint *)((int)this->_player + 0x1574); + puVar7 = (uint *)(GHIDRA_INT(this->_player) + 0x1574); *puVar7 = *puVar7 | 0x200; ((Entity_Player *)(this->_player))->Entity_Player::EvaluateItems(); return; @@ -21912,23 +21912,23 @@ LAB_0063bd00: if (_Src == levelItemsEnd) goto LAB_0063bc8b; goto LAB_0063bd00; } - memmove(puVar7,_Src,(int)levelItemsEnd - (int)_Src); + memmove(puVar7,_Src,GHIDRA_INT(levelItemsEnd) - GHIDRA_INT(_Src)); ppvVar2 = &(this_00->_levelEffectItems)._end; - *ppvVar2 = (void *)((int)*ppvVar2 + -4); + *ppvVar2 = (void *)(GHIDRA_INT(*ppvVar2) + -4); uVar5 = *(uint *)(*(int *)((char *)this->_player + 0x173c) + removeIndex * 4); if (g_game == (Game *)0x0) { - if ((int)uVar5 < 0) goto LAB_0063bdc5; + if (GHIDRA_INT(uVar5) < 0) goto LAB_0063bdc5; LAB_0063bd84: pvVar3 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar3 >> 2 <= (int)uVar5) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar3) >> 2 <= GHIDRA_INT(uVar5)) goto LAB_0063bdc5; iVar8 = *(int *)((char *)pvVar3 + uVar5 * 4); } else { - if (-1 < (int)uVar5) goto LAB_0063bd84; - if (((int)uVar5 < 0) && + if (-1 < GHIDRA_INT(uVar5)) goto LAB_0063bd84; + if ((GHIDRA_INT(uVar5) < 0) && (pvVar3 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)~uVar5 < (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar3 >> 2) + GHIDRA_INT(~uVar5) < GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar3) >> 2) ) { iVar8 = **(int **)((char *)pvVar3 + ~uVar5 * 4); } @@ -21941,13 +21941,13 @@ LAB_0063bd84: local_18[1] = 0; local_18[3] = 0; local_18[0] = iVar8; - ((TemporaryEffects *)((TemporaryEffects *)((int)this->_player + 0x1508)))->TemporaryEffects::RemoveEffect(local_18,1); + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this->_player) + 0x1508)))->TemporaryEffects::RemoveEffect(local_18,1); } LAB_0063bdc5: - local_38._4_8_ = (ulonglong)(uint)item->maxCooldown << 0x20; + (*(undefined8 *)((char *)&(local_38) + 0x4)) = (ulonglong)GHIDRA_UINT(item->maxCooldown) << 0x20; local_38._shift3 = 0; - local_38._seed = (int)item; - ((TemporaryEffects *)((TemporaryEffects *)((int)this->_player + 0x1508)))->TemporaryEffects::RemoveEffect(&local_38,1); + local_38._seed = GHIDRA_INT(item); + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this->_player) + 0x1508)))->TemporaryEffects::RemoveEffect(&local_38,1); LAB_0063bc9b: removeIndex = removeIndex + 1; if (removeCount <= removeIndex) goto LAB_0063bca7; @@ -22049,7 +22049,7 @@ void Entity_Familiar::ai_minisaac() targetY = (this->_targetPosition).x; targetY = (this->_targetPosition).y; if (ABS(targetY) <= ABS(targetY)) { - iVar7 = (uint)(0.0 <= targetY) * 2 + 1; + iVar7 = GHIDRA_UINT((0.0 <= targetY)) * 2 + 1; } else { iVar7 = 2; @@ -22087,13 +22087,13 @@ void Entity_Familiar::ai_minisaac() fVar17 = 0.0; } (this->_posOffset).y = fVar17; - local_d0 = (uint)(6 < this->_fireCooldown); + local_d0 = GHIDRA_UINT((6 < this->_fireCooldown)); if (this->_shootDirection != -1) { iVar7 = this->_shootDirection; } bVar5 = ((ANM2 *)(&this->_sprite))->ANM2::SetOverlayAnimation((byte *)dirAnims[iVar7 + 8],1); if ((bVar5 != 0) && ((this->_sprite)._overlayAnimState._animData != (void *)0x0)) { - ((AnimationState *)(&(this->_sprite)._overlayAnimState))->AnimationState::SetFrameFloat((float)(int)local_d0); + ((AnimationState *)(&(this->_sprite)._overlayAnimState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(local_d0)); } FamiliarHelper::fly_head_pathfind_move(this); minisaac_find_target(); @@ -22162,7 +22162,7 @@ void Entity_Familiar::ai_minisaac() uVar8 = Random(); for (local_d0 = (uVar8 & 1) + 1; local_d0 != 0; local_d0 = local_d0 + -1) { uVar8 = Random(); - local_d8 = (float)((double)(int)uVar8 + __uint_to_double_fixup[-((int)uVar8 >> 0x1f)]) * + local_d8 = (float)((double)GHIDRA_INT(uVar8) + __uint_to_double_fixup[-(GHIDRA_INT(uVar8) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_d8 = local_d8 + local_d8; fVar17 = cos(local_d8); @@ -22170,11 +22170,11 @@ void Entity_Familiar::ai_minisaac() fVar17 = sin(local_d8); particlePos.y = fVar17 * this->_size * 0.5 + (this->_pos).y; uVar8 = Random(); - fVar17 = (float)((double)(int)uVar8 + __uint_to_double_fixup[-((int)uVar8 >> 0x1f)]) * + fVar17 = (float)((double)GHIDRA_INT(uVar8) + __uint_to_double_fixup[-(GHIDRA_INT(uVar8) >> 0x1f)]) * 2.3283064e-10 * 3.14; fVar17 = fVar17 + fVar17; uVar8 = Random(); - targetY = (float)((double)(int)uVar8 + __uint_to_double_fixup[-((int)uVar8 >> 0x1f)]) * + targetY = (float)((double)GHIDRA_INT(uVar8) + __uint_to_double_fixup[-(GHIDRA_INT(uVar8) >> 0x1f)]) * 2.3283064e-10 * 3.0 + 1.0; local_c4 = cos(fVar17); local_c4 = local_c4 * targetY; @@ -22258,7 +22258,7 @@ LAB_0063c921: subTypeKey = spawnSubType; std::set::find_node(itemFindResult,&subTypeKey); if (((*(char *)(itemNode + 0xd) == '\0') && - (*(int *)(itemNode + 0x10) <= (int)uVar12)) && (itemNode != piVar10[8])) + (*(int *)(itemNode + 0x10) <= GHIDRA_INT(uVar12))) && (itemNode != piVar10[8])) goto LAB_0063c921; bVar16 = true; } @@ -22287,14 +22287,14 @@ LAB_0063cae7: lVar3 = (timeNs & 0xffffffff) * 0x431bde82; local_98 = (undefined4)((ulonglong)lVar3 >> 0x20); uVar18 = (timeNs >> 0x20) * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); - uVar12 = (uint)(uVar18 >> 0x20); + uVar12 = GHIDRA_UINT((uVar18 >> 0x20)); lVar3 = lVar3 + (uVar18 & 0xffffffff); - local_c0 = (uint)lVar3; - uVar8 = (uint)((ulonglong)lVar3 >> 0x20); + local_c0 = GHIDRA_UINT(lVar3); + uVar8 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); lVar3 = (timeNs >> 0x20) * 0x431bde82 + (ulonglong)CONCAT14(CARRY4(uVar12,uVar8),uVar12 + uVar8); - uVar8 = (uint)((ulonglong)lVar3 >> 0x20); - uVar12 = (uint)lVar3 >> 0x12 | uVar8 * 0x4000; + uVar8 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); + uVar12 = GHIDRA_UINT(lVar3) >> 0x12 | uVar8 * 0x4000; spawnerSlot = &pEVar9->_spawnerEntity; pEVar9->_spawnerType = 0; pEVar9->_spawnerVariant = 0; @@ -22313,7 +22313,7 @@ LAB_0063cae7: iVar7 = *(int *)((char *)pvVar11 + 0x1214); *(int *)((char *)pvVar11 + 0x1214) = iVar7 + 1; pEVar9->_index = iVar7; - ((EntityList *)((EntityList *)((int)pvVar11 + 0x1218)))->EntityList::AddEntity(pEVar9); + ((EntityList *)((EntityList *)(GHIDRA_INT(pvVar11) + 0x1218)))->EntityList::AddEntity(pEVar9); bVar5 = Game::ShouldEraseEnemy(pEVar9); if (bVar5 != 0) { Entity::RemoveWithPoof(pEVar9,unusedArg); @@ -22336,25 +22336,25 @@ LAB_0063cae7: } uVar15 = 0; playerManager = &g_game->_playerManager; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar11 = (playerManager->_playerList)._end; - if ((int)pvVar11 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar11) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *) "((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar11 = (playerManager->_playerList)._end; } piVar10 = (playerManager->_playerList)._begin; - if (uVar15 < (uint)((int)pvVar11 - (int)piVar10 >> 2)) { + if (uVar15 < GHIDRA_UINT((GHIDRA_INT(pvVar11) - GHIDRA_INT(piVar10) >> 2))) { piVar10 = piVar10 + uVar15; } trigger_set_dispatch ((void *)(*piVar10 + 0x1fc8),6,pEVar9,&particlePos,&particleVelocity); uVar15 = uVar15 + 1; playerManager = &g_game->_playerManager; - } while (uVar15 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar15 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } LAB_0063cd56: @@ -22362,24 +22362,24 @@ LAB_0063cd56: local_d8 = (float)(uVar18 >> 0x20); lVar4 = (uVar18 & 0xffffffff) * 0x431bde82; local_c4 = (float)((ulonglong)lVar4 >> 0x20); - lVar3 = (ulonglong)(uint)local_d8 * 0x431bde82; - uVar18 = (ulonglong)(uint)local_d8 * 0xd7b634db + + lVar3 = (ulonglong)GHIDRA_UINT(local_d8) * 0x431bde82; + uVar18 = (ulonglong)GHIDRA_UINT(local_d8) * 0xd7b634db + ((uVar18 & 0xffffffff) * 0xd7b634db >> 0x20); - uVar13 = (uint)(uVar18 >> 0x20); + uVar13 = GHIDRA_UINT((uVar18 >> 0x20)); lVar4 = lVar4 + (uVar18 & 0xffffffff); local_a8 = (float)lVar4; - uVar15 = (uint)((ulonglong)lVar4 >> 0x20); + uVar15 = GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)); lVar4 = lVar3 + (ulonglong)CONCAT14(CARRY4(uVar13,uVar15),uVar13 + uVar15); - uVar14 = (uint)((ulonglong)lVar4 >> 0x20); - uVar15 = (uint)lVar4 >> 0x12 | uVar14 * 0x4000; + uVar14 = GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)); + uVar15 = GHIDRA_UINT(lVar4) >> 0x12 | uVar14 * 0x4000; uVar13 = uVar15 - uVar12; - bVar16 = CARRY4((uint)g_entitySpawnTimeMs,uVar13); - g_entitySpawnTimeMs._0_4_ = (uint)g_entitySpawnTimeMs + uVar13; - g_entitySpawnTimeMs._4_4_ = - g_entitySpawnTimeMs._4_4_ + - (((uVar14 >> 0x12) - (uVar8 >> 0x12)) - (uint)(uVar15 < uVar12)) + (uint)bVar16; + bVar16 = CARRY4(GHIDRA_UINT(g_entitySpawnTimeMs),uVar13); + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x0)) = GHIDRA_UINT(g_entitySpawnTimeMs) + uVar13; + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) = + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) + + (((uVar14 >> 0x12) - (uVar8 >> 0x12)) - GHIDRA_UINT((uVar15 < uVar12))) + GHIDRA_UINT(bVar16); } - local_c0 = (uint)((ulonglong)lVar3 >> 0x20); + local_c0 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); local_98 = (undefined4)lVar3; pEVar9->Update(); position = &savedFamiliar->_pos; @@ -22449,7 +22449,7 @@ void Entity_Familiar::minisaac_fire() this_00->Update(); manager = g_manager; this->_fireCooldown = 0x14; - seed_fart_sound_override((int *)((int)register0x00000010 + -0x38)); + seed_fart_sound_override((int *)(GHIDRA_INT(register0x00000010) + -0x38)); Pitch = 1.5; Volume = 0.6; fVar3 = 3.53127e-43; @@ -22511,7 +22511,7 @@ void Entity_Familiar::minisaac_fire() Volume = 1.0; fVar3 = local_24; } - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)fVar3,Volume,2,0,Pitch,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(fVar3),Volume,2,0,Pitch,0.0); } if (0 < this->_fireCooldown) { this->_fireCooldown = this->_fireCooldown + -1; @@ -22558,7 +22558,7 @@ void Entity_Familiar::minisaac_find_target() if (bVar1 == 0) { frameMod = game->_frameCount + in_ECX->_index & 0x80000003; isUpdateFrame = frameMod == 0; - if ((int)frameMod < 0) { + if (GHIDRA_INT(frameMod) < 0) { isUpdateFrame = (frameMod - 1 | 0xfffffffc) == 0xffffffff; } if (isUpdateFrame) { @@ -22588,7 +22588,7 @@ void Entity_Familiar::minisaac_find_target() local_28 = g_game->_room; if (local_28[0x499] != (EntityPtr)0x0) { do { - target = *(EntityPtr *)((int)local_28[0x497] + (int)local_20 * 4); + target = *(EntityPtr *)(GHIDRA_INT(local_28[0x497]) + GHIDRA_INT(local_20) * 4); if ((*(int *)&g_game->_deathmatchManager < 2) || (*(int *)((char *)target + 0x28) != 1)) { candidateType = *(int *)((char *)target + 0x28); @@ -22606,7 +22606,7 @@ LAB_0063dfb5: ((bVar1 = ((Entity *)((Entity *)local_24))->Entity::IsDescendantOf((Entity *)target), bVar1 == 0 && ((*(uint *)((char *)target + 0x168) & 0x20000010) == 0)))) { candidatePos.y = *(float *)((char *)target + 0x340); - candidatePos.x = ((Vector *)((int)target + 0x33c))->x; + candidatePos.x = ((Vector *)(GHIDRA_INT(target) + 0x33c))->x; bVar1 = ((Room *)(g_game->_room))->Room::CheckLine(&familiar->_pos,&candidatePos,3,0,0,0, (Vector *)0x0); if (bVar1 != 0) { @@ -22615,7 +22615,7 @@ LAB_0063dfb5: score = 100.0; } fVar2 = *(float *)((char *)target + 0x340) - (familiar->_pos).y; - dx = ((Vector *)((int)target + 0x33c))->x - (familiar->_pos).x; + dx = ((Vector *)(GHIDRA_INT(target) + 0x33c))->x - (familiar->_pos).x; fVar2 = sqrtf(fVar2 * fVar2 + dx * dx); fVar2 = 100.0 - fVar2; if (fVar2 <= 0.0) { @@ -22633,8 +22633,8 @@ LAB_0063dfb5: } } } - local_20 = (EntityPtr)((int)local_20 + 1); - } while ((uint)local_20 < (uint)local_28[0x499]); + local_20 = (EntityPtr)(GHIDRA_INT(local_20) + 1); + } while (GHIDRA_UINT(local_20) < GHIDRA_UINT(local_28[0x499])); } target = bestTarget; if (*targetSlot != (EntityPtr)0x0) { @@ -22678,7 +22678,7 @@ LAB_0063dfb5: } target = (EntityPtr)((Entity_NPC *)(ownerParent))->Entity_NPC::GetPlayerTarget(); fVar2 = (in_ECX->_pos).y - *(float *)((char *)target + 0x340); - dx = (in_ECX->_pos).x - ((Vector *)((int)target + 0x33c))->x; + dx = (in_ECX->_pos).x - ((Vector *)(GHIDRA_INT(target) + 0x33c))->x; fVar2 = sqrtf(fVar2 * fVar2 + dx * dx); if (300.0 < fVar2) { ExceptionList = local_10; @@ -22733,7 +22733,7 @@ void Entity_Familiar::ai_blood_oath() float playerY; float posY; - local_c = __security_cookie ^ (uint)&pcStack_74; + local_c = __security_cookie ^ GHIDRA_UINT(&pcStack_74); local_2c.x = (float)s_Idle; local_1c.x = 0.0; local_1c.y = 0.0; @@ -22763,11 +22763,11 @@ void Entity_Familiar::ai_blood_oath() case 3: ((ANM2 *)(&animState->_sprite))->ANM2::Play((byte *)(&local_2c.x)[iVar4],0); fVar6 = (&local_1c.x)[iVar4]; - if ((fVar6 != 0.0) && (uVar3 = Random(), uVar3 % (uint)fVar6 == 0)) { + if ((fVar6 != 0.0) && (uVar3 = Random(), uVar3 % GHIDRA_UINT(fVar6) == 0)) { uVar3 = Random(); Entity_NPC::MakeSplat ((Entity_NPC *)animState, - (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 0.5 + 0.2); } break; @@ -22799,7 +22799,7 @@ void Entity_Familiar::ai_blood_oath() } pcStack_74 = (code *)0x4d; seed_fart_sound_override((int *)&pcStack_74); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)pcStack_74,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(pcStack_74),1.0,2,0,1.0,0.0); bVar1 = ((Entity_Player *)(animState->_player))->Entity_Player::HasInvincibility(0,(EntityRef *)0x0); if (bVar1 != 0) { return; @@ -22807,14 +22807,14 @@ void Entity_Familiar::ai_blood_oath() iVar4 = ((Entity_Player *)(animState->_player))->Entity_Player::GetHealthType(); VStack_70.x = 0.0; if (extraout_EDX < 1) { - VStack_70.x = (float)(2 - (uint)(iVar4 != 3)); + VStack_70.x = (float)(2 - GHIDRA_UINT((iVar4 != 3))); } - fStack_68 = (float)(*(int *)(extraout_ECX + 0x1344) - (int)VStack_70.x); + fStack_68 = (float)(*(int *)(extraout_ECX + 0x1344) - GHIDRA_INT(VStack_70.x)); iVar4 = 0; animState->_hearts = 0; - if (0 < (int)fStack_68) { + if (0 < GHIDRA_INT(fStack_68)) { do { - if (*(int *)((char *)animState->_player + 0x1344) <= (int)VStack_70.x) break; + if (*(int *)((char *)animState->_player + 0x1344) <= GHIDRA_INT(VStack_70.x)) break; *(undefined4 *)((char *)animState->_player + 0x13bc) = 0; damageSource._position.x = (animState->_pos).x; damageSource._position.y = (animState->_pos).y; @@ -22837,13 +22837,13 @@ void Entity_Familiar::ai_blood_oath() else { uVar2 = 4; } - damageSource._flags = uVar2 | uVar3 | (uint)((animState->_flags & 0x100) != 0); + damageSource._flags = uVar2 | uVar3 | GHIDRA_UINT(((animState->_flags & 0x100) != 0)); damageSource._entity = animState; isDamaged = (*pcStack_74)(0x3f800000,0x2042821,0,&damageSource,0x1e); if (isDamaged == '\0') break; animState->_hearts = animState->_hearts + 1; iVar4 = iVar4 + 1; - } while (iVar4 < (int)fStack_68); + } while (iVar4 < GHIDRA_INT(fStack_68)); } if (0 < animState->_hearts) { VStack_64.x = *(float *)((char *)animState->_player + 0x33c); @@ -22864,12 +22864,12 @@ void Entity_Familiar::ai_blood_oath() if (VStack_64.x != 0.0) { do { uVar2 = Random(); - VStack_70.x = ((float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) + VStack_70.x = ((float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10 * 20.0 - 10.0) * 0.017453292; pcStack_74 = (code *)cos(VStack_70.x); VStack_70.x = sin(VStack_70.x); uVar2 = Random(); - local_1c.y = (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + local_1c.y = (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10; local_1c.x = (fStack_68 * (float)pcStack_74 - pickupVelocity.x * VStack_70.x) * local_1c.y ; @@ -22879,14 +22879,14 @@ void Entity_Familiar::ai_blood_oath() local_2c.y = local_1c.y + *(float *)((char *)animState->_player + 0x340); uVar2 = Random(); subType = 99; - if (iVar4 < (int)(uVar3 % 3 + 2)) { + if (iVar4 < GHIDRA_INT((uVar3 % 3 + 2))) { subType = 0; } bloodParticle = ((Game *)(g_game))->Game::SpawnEx(1000,5,&local_2c,&local_1c,(Entity *)0x0,subType,uVar2,0); bloodParticle->Update(); iVar4 = iVar4 + 1; - } while (iVar4 < (int)VStack_64.x); + } while (iVar4 < GHIDRA_INT(VStack_64.x)); } bVar1 = ((Entity_Player *)(animState->_player))->Entity_Player::HasCollectible(0xf7,0); if (bVar1 != 0) { @@ -22908,7 +22908,7 @@ void Entity_Familiar::ai_blood_oath() bVar5 = bVar1 < *stabAnimName; if (bVar1 != *stabAnimName) { LAB_00640002: - uVar3 = -(uint)bVar5 | 1; + uVar3 = -GHIDRA_UINT(bVar5) | 1; goto LAB_00640007; } if (bVar1 == 0) break; @@ -22940,8 +22940,8 @@ void Entity_Familiar::paschal_candle_sync_effects() collectiblesBegin = (g_manager->_itemConfig)._collectibles._begin; this_00 = this->_player; - if ((0x8dc < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)collectiblesBegin & - 0xfffffffcU)) && + if ((0x8dc < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(collectiblesBegin) & + 0xfffffffcU))) && (candleEffect[0] = *(int *)((char *)collectiblesBegin + 0x8dc), candleEffect[0] != 0)) { candleEffect[2] = *(undefined4 *)(candleEffect[0] + 0x78); candleEffect[1] = 0; @@ -22950,7 +22950,7 @@ void Entity_Familiar::paschal_candle_sync_effects() this_00 = this->_player; } collectiblesBegin = (g_manager->_itemConfig)._collectibles._begin; - if ((int)((int)(g_manager->_itemConfig)._collectibles._end - (int)collectiblesBegin & 0xfffffffcU) + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(collectiblesBegin) & 0xfffffffcU)) < 0x8dd) { candleEffect[0] = 0; } @@ -22964,7 +22964,7 @@ void Entity_Familiar::paschal_candle_sync_effects() if (1 < this->_hearts) { do { TemporaryEffects::AddEffect - ((TemporaryEffects *)((int)this->_player + 0x1508),candleEffect,1,1); + ((TemporaryEffects *)(GHIDRA_INT(this->_player) + 0x1508),candleEffect,1,1); i = i + 1; } while (i < this->_hearts); this_00 = this->_player; @@ -23081,7 +23081,7 @@ LAB_00641000: bVar7 = bVar2 < (byte)*shootAnimChar; if (bVar2 != *shootAnimChar) { LAB_00641020: - uVar6 = -(uint)bVar7 | 1; + uVar6 = -GHIDRA_UINT(bVar7) | 1; goto LAB_00641025; } if (bVar2 == 0) break; @@ -23199,7 +23199,7 @@ LAB_00640f80: bVar7 = bVar2 < *wantedAnimChar; if (bVar2 != *wantedAnimChar) { LAB_00640fa0: - uVar6 = -(uint)bVar7 | 1; + uVar6 = -GHIDRA_UINT(bVar7) | 1; goto LAB_00640fa5; } if (bVar2 == 0) break; @@ -23290,7 +23290,7 @@ void Entity_Familiar::zhl_misfit_006414c0() for (damageEvent = (this->_damageEvents)._begin; damageEvent != damageEventsEnd; damageEvent = damageEvent + 0xe) { fVar8 = *damageEvent; - if (((uint)damageEvent[2] & 4) != 0) { + if ((GHIDRA_UINT(damageEvent[2]) & 4) != 0) { if (3.5 < fVar8) { fVar8 = 3.5; } @@ -23327,11 +23327,11 @@ void Entity_Familiar::zhl_misfit_006414c0() (game->_frameCount % 3 == 0)) { local_48.x = 0.0; playerIdx = (EntityPtr)0x0; - if ((int)(game->_playerManager)._playerList._end - - (int)(game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((game->_playerManager)._playerList._begin) >> 2 != 0) { do { local_48.x = (float)playerIdx; - player = ((Game *)(g_game))->Game::GetPlayer((uint)local_48.x); + player = ((Game *)(g_game))->Game::GetPlayer(GHIDRA_UINT(local_48.x)); if (((*(int *)&g_game->_deathmatchManager < 2) || (bVar2 = ((Entity *)((Entity *)this))->Entity::IsDescendantOf((Entity *)player), bVar2 != 0)) && (fVar8 = (this->_pos).y - (player->_pos).y, fVar9 = (this->_pos).x - (player->_pos).x, @@ -23347,11 +23347,11 @@ void Entity_Familiar::zhl_misfit_006414c0() ((Entity_Player *)(player))->Entity_Player::EvaluateItems(); } } - local_48.x = (float)((int)local_48.x + 1); + local_48.x = (float)(GHIDRA_INT(local_48.x) + 1); playerIdx = (EntityPtr)local_48.x; - } while ((uint)local_48.x < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (GHIDRA_UINT(local_48.x) < + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); } } pEVar10 = &this->_child; @@ -23359,27 +23359,27 @@ void Entity_Familiar::zhl_misfit_006414c0() uVar3 = Random(); local_48.x = (float)((Game *)(g_game))->Game::SpawnEx(1000,0x70,&this->_pos,&g_vectorZero,(Entity *)0x0,0, uVar3,0); - local_3c = (EntityPtr *)((int)local_48.x + 0x3bc); + local_3c = (EntityPtr *)(GHIDRA_INT(local_48.x) + 0x3bc); if (*(EntityPtr *)((char *)local_48.x + 0x3bc) != (EntityPtr)0x0) { local_4c = local_3c; std::multiset::erase(&local_4c); } *local_3c = (EntityPtr)this; std::multiset::insert(local_3c); - fVar8 = ((Vector *)((int)local_48.x + 0x33c))->x; + fVar8 = ((Vector *)(GHIDRA_INT(local_48.x) + 0x33c))->x; fVar9 = *(float *)((char *)local_48.x + 0x340); dipX = (this->_pos).x; dipY = (this->_pos).y; oldHallowedCountdown = *(int *)local_48.x; *(char *)((char *)local_48.x + 0x464) = '\x01'; - ((Vector *)((int)local_48.x + 0xdc))->x = 0.0; + ((Vector *)(GHIDRA_INT(local_48.x) + 0xdc))->x = 0.0; *(float *)((char *)local_48.x + 0x468) = fVar8 - dipX; *(float *)((char *)local_48.x + 0x46c) = fVar9 - dipY; *(float *)((char *)local_48.x + 0xe0) = -8.0; fVar8 = g_vectorOne.y; fVar9 = g_vectorOne.x * 0.33; *(int *)((char *)local_48.x + 0x354) = 10000; - ((Vector *)((int)local_48.x + 0xe4))->x = fVar9; + ((Vector *)(GHIDRA_INT(local_48.x) + 0xe4))->x = fVar9; *(float *)((char *)local_48.x + 0xe8) = fVar8 * 0.33; (**(code **)(oldHallowedCountdown + 0xc))(); if (*pEVar10 != (EntityPtr)0x0) { @@ -23418,7 +23418,7 @@ LAB_00641d0e: bVar7 = bVar2 < *expectedNameCh; if (bVar2 != *expectedNameCh) { LAB_00641cf0: - uVar3 = -(uint)bVar7 | 1; + uVar3 = -GHIDRA_UINT(bVar7) | 1; goto LAB_00641cf5; } if (bVar2 == 0) break; @@ -23483,7 +23483,7 @@ LAB_00641cf5: if ((void *)fVar8 == this->_player) { randomDir = MusicManager::RandomVector(&local_38); uVar3 = Random(); - fVar8 = (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + fVar8 = (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 80.0; fVar9 = local_48.x + fVar8 * randomDir->y; pEVar10 = (EntityPtr *)((float)local_4c + fVar8 * randomDir->x); @@ -23495,7 +23495,7 @@ LAB_00641cf5: fVar8 = (this->_pos).x; if ((fVar8 == (float)pEVar10) && ((this->_pos).y == fVar9)) { uVar3 = Random(); - local_38.x = (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + local_38.x = (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_38.x = local_38.x + local_38.x; local_48.x = sin(local_38.x); @@ -23512,7 +23512,7 @@ LAB_00641cf5: } uVar3 = Random(); fVar8 = this->_friction; - fVar9 = (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + fVar9 = (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 5.0 + 5.0; (this->_velocity).y = (fVar9 * local_48.x * local_40) / fVar8 + (this->_velocity).y; (this->_velocity).x = (fVar9 * (float)local_4c * local_40) / fVar8 + (this->_velocity).x; @@ -23544,7 +23544,7 @@ LAB_00641c4e: bVar7 = bVar2 < *expectedNameCh; if (bVar2 != *expectedNameCh) { LAB_00641c30: - uVar3 = -(uint)bVar7 | 1; + uVar3 = -GHIDRA_UINT(bVar7) | 1; goto LAB_00641c35; } if (bVar2 == 0) break; @@ -23587,7 +23587,7 @@ LAB_00641976: bVar7 = bVar2 < *pbVar6; if (bVar2 != *pbVar6) { LAB_00641956: - uVar3 = -(uint)bVar7 | 1; + uVar3 = -GHIDRA_UINT(bVar7) | 1; goto LAB_0064195b; } if (bVar2 == 0) break; @@ -23600,7 +23600,7 @@ LAB_00641956: uVar3 = 0; LAB_0064195b: if ((uVar3 != 0) || - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) != '\0' && + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) != '\0' && ((this->_sprite)._animState._isPlaying == 0)))) goto LAB_00641976; } if (((this->_targetPosition).x == g_vectorZero.x) && @@ -23656,7 +23656,7 @@ LAB_0064195b: local_40 = 3.61535e-43; } seed_fart_sound_override((int *)&local_40); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_40,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_40),1.0,2,0,1.0,0.0); } } } @@ -23665,7 +23665,7 @@ LAB_0064195b: uVar3 = Random(); splat = Entity_NPC::MakeSplat ((Entity_NPC *)this, - (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 0.5 + 0.2); splat->SetColor(&this->_splatColor,0xffffffff,0xff,0,1); } @@ -23701,7 +23701,7 @@ LAB_0064195b: goto LAB_0064243e; uVar3 = game->_frameCount + this->_index & 0x80000003; bVar7 = uVar3 == 0; - if ((int)uVar3 < 0) { + if (GHIDRA_INT(uVar3) < 0) { bVar7 = (uVar3 - 1 | 0xfffffffc) == 0xffffffff; } if ((!bVar7) || (uVar3 = Random(), (uVar3 & 1) != 0)) goto LAB_0064243e; @@ -23709,7 +23709,7 @@ LAB_0064195b: spawnedEffect = ((Game *)(g_game))->Game::SpawnEx(1000,0x2d,&this->_pos,&g_vectorZero,(Entity *)this,0,uVar3,0); uVar3 = Random(); - fVar8 = (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + fVar8 = (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 0.4; fVar9 = fVar8 * g_vectorOne.y; fVar8 = fVar8 * g_vectorOne.x; @@ -23731,7 +23731,7 @@ LAB_0064195b: (bVar2 = ((Game *)(g_game))->Game::IsPaused(), bVar2 != 0)) goto LAB_0064243e; uVar3 = game->_frameCount + this->_index & 0x80000007; bVar7 = uVar3 == 0; - if ((int)uVar3 < 0) { + if (GHIDRA_INT(uVar3) < 0) { bVar7 = (uVar3 - 1 | 0xfffffff8) == 0xffffffff; } if ((!bVar7) || (uVar3 = Random(), uVar3 % 3 != 0)) goto LAB_0064243e; @@ -23739,7 +23739,7 @@ LAB_0064195b: spawnedEffect = ((Game *)(g_game))->Game::SpawnEx(1000,0x8d,&this->_pos,&g_vectorZero,this->_player,0,uVar3,0); uVar3 = Random(); - fVar8 = (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + fVar8 = (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 0.5; fVar9 = fVar8 * g_vectorOne.y; fVar8 = fVar8 * g_vectorOne.x; @@ -23841,7 +23841,7 @@ void Entity_Familiar::ai_bird_cage() isLess = bVar1 < (byte)*expectedAnimName; if (bVar1 != *expectedAnimName) { LAB_006425d0: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_006425d5; } if (bVar1 == 0) break; @@ -23888,7 +23888,7 @@ LAB_00642686: isLess = bVar1 < (byte)*expectedAnimName; if (bVar1 != *expectedAnimName) { LAB_00642670: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_00642675; } if (bVar1 == 0) break; @@ -23934,7 +23934,7 @@ LAB_00642bca: if (bVar1 == 0) goto LAB_00642bca; local_18 = 7.28675e-44; seed_fart_sound_override((int *)&local_18); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_18,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_18),1.0,2,0,1.0,0.0); ((Game *)(g_game))->Game::BombDamage(pVVar3,45.0,24.0,1,this->_player,(BitSet128)ZEXT816(0),4,0); uVar2 = Random(); local_3c = ((Game *)(g_game))->Game::SpawnEx(1000,0x48,pVVar3,&g_vectorZero,this->_player,0,uVar2,0); @@ -24014,12 +24014,12 @@ LAB_006428f9: do { uVar2 = Random(); local_3c = (Entity *) - ((float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10 * 360.0 * 0.017453292); local_20 = (Entity *)cos((float)local_3c); local_1c = (undefined4 *)sin((float)local_3c); uVar2 = Random(); - fVar6 = (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + fVar6 = (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10; local_30.y = fVar6 * (float)local_1c * 12.0 + (this->_pos).y; local_30.x = fVar6 * (float)local_20 * 12.0 + (this->_pos).x; @@ -24048,7 +24048,7 @@ LAB_006428f9: targetRef = &local_3c; break; case 3: - ai_flying_bird(this,__security_cookie ^ (int)register0x00000010 - 4U); + ai_flying_bird(this,__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); default: ExceptionList = local_10; return; @@ -24106,7 +24106,7 @@ void Entity_Familiar::ai_bot_fly() isLess = bVar1 < (byte)*pcVar4; if (bVar1 != *pcVar4) { LAB_00643230: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_00643235; } if (bVar1 == 0) break; @@ -24119,11 +24119,11 @@ LAB_00643230: uVar3 = 0; LAB_00643235: if (uVar3 == 0) { - target_threatening_projectile(this,128.0,(int)pcVar4,1); + target_threatening_projectile(this,128.0,GHIDRA_INT(pcVar4),1); targetRef = &this->_target; if (this->_target != (EntityPtr)0x0) { fVar6 = (this->_pos).x; - targetPosX = (float *)((int)this->_target + 0x33c); + targetPosX = (float *)(GHIDRA_INT(this->_target) + 0x33c); (this->_sprite)._flipX = *targetPosX <= fVar6 && fVar6 != *targetPosX; } if ((this->_sprite)._animState._animData == (void *)0x0) { @@ -24200,19 +24200,19 @@ LAB_00643235: tear = (Entity_Tear *) ((Game *)(g_game))->Game::SpawnEx(2,10,&this->_pos,&local_30,(Entity *)this,0,uVar3,0); tear->SetCollisionDamage(0x40400000); - local_30.x = (float)(g_tearFlagShielded._l._4_4_ | g_tearFlagSpectral._l._4_4_ | - g_tearFlagHoming._l._4_4_); - uStack_28 = g_tearFlagShielded._h._4_4_ | g_tearFlagSpectral._h._4_4_ | - g_tearFlagHoming._h._4_4_; + local_30.x = (float)((*(undefined4 *)((char *)&(g_tearFlagShielded._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagSpectral._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagHoming._l) + 0x4))); + uStack_28 = (*(undefined4 *)((char *)&(g_tearFlagShielded._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagSpectral._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagHoming._h) + 0x4)); local_34 = (EntityPtr *) - ((uint)g_tearFlagShielded._l | (uint)g_tearFlagSpectral._l | - (uint)g_tearFlagHoming._l); - local_30.y = (float)((uint)g_tearFlagShielded._h | (uint)g_tearFlagSpectral._h | - (uint)g_tearFlagHoming._h); - flags._l._4_4_ = local_30.x; - flags._l._0_4_ = local_34; - flags._h._0_4_ = local_30.y; - flags._h._4_4_ = uStack_28; + (GHIDRA_UINT(g_tearFlagShielded._l) | GHIDRA_UINT(g_tearFlagSpectral._l) | + GHIDRA_UINT(g_tearFlagHoming._l)); + local_30.y = (float)(GHIDRA_UINT(g_tearFlagShielded._h) | GHIDRA_UINT(g_tearFlagSpectral._h) | + GHIDRA_UINT(g_tearFlagHoming._h)); + (*(undefined4 *)((char *)&(flags._l) + 0x4)) = local_30.x; + (*(undefined4 *)((char *)&(flags._l) + 0x0)) = local_34; + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = local_30.y; + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = uStack_28; ((Entity_Tear *)(tear))->Entity_Tear::SetTearFlags(flags); tear->_baseScale = 0.8; tear->_fScale = 0.8; @@ -24254,7 +24254,7 @@ LAB_00643235: return; } } - target_threatening_projectile(this,128.0,(int)pcVar4,0); + target_threatening_projectile(this,128.0,GHIDRA_INT(pcVar4),0); pbVar2 = (this->_sprite)._animState._animData; if (pbVar2 != (byte *)0x0) { if (0xf < *(uint *)(pbVar2 + 0x14)) { @@ -24266,7 +24266,7 @@ LAB_00643235: isLess = bVar1 < *pbVar5; if (bVar1 != *pbVar5) { LAB_006436f0: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_006436f5; } if (bVar1 == 0) break; @@ -24279,7 +24279,7 @@ LAB_006436f0: uVar3 = 0; LAB_006436f5: if ((uVar3 == 0) && - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) == '\0' || + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) == '\0' || ((this->_sprite)._animState._isPlaying != 0)))) goto LAB_00643729; } bVar1 = ((ANM2 *)(&this->_sprite))->ANM2::SetAnimation(s_Fly,1); @@ -24301,7 +24301,7 @@ LAB_00643729: isLess = bVar1 < (byte)*pcVar4; if (bVar1 != *pcVar4) { LAB_00643768: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0064376d; } if (bVar1 == 0) break; @@ -24382,7 +24382,7 @@ void Entity_Familiar::ai_stitches() Entity_Player *player; Vector *pos; - local_c = __security_cookie ^ (uint)&local_70; + local_c = __security_cookie ^ GHIDRA_UINT(&local_70); this->_entityGridCollisionClass = 3; local_5c = this; switch(this->_state) { @@ -24394,9 +24394,9 @@ LAB_0064423d: case 1: uVar4 = Random(); iVar13 = 0; - uVar12._0_1_ = 0; - uVar12._1_1_ = 0; - uVar12._2_2_ = 0; + (*(undefined1 *)((char *)&(uVar12) + 0x0)) = 0; + (*(undefined1 *)((char *)&(uVar12) + 0x1)) = 0; + (*(undefined2 *)((char *)&(uVar12) + 0x2)) = 0; fVar9 = 0.0; pVVar11 = &g_vectorZero; pos = &this->_pos; @@ -24404,7 +24404,7 @@ LAB_0064423d: fVar6 = 1.4013e-42; fVar7 = 9.203692e-39; effect = ((Game *)(g_game))->Game::SpawnEx(1000,0xf,pos,&g_vectorZero,(Entity *)0x0,0,uVar4,0); - ((ANM2 *)((ANM2 *)((int)register0x00000010 + -0x18c)))->ANM2::ANM2(&local_5c->_sprite); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(register0x00000010) + -0x18c)))->ANM2::ANM2(&local_5c->_sprite); other._championColor._colorize[0] = in_stack_ffffff58; other._filename._buf[0] = in_stack_fffffe74[0]; other._filename._buf[1] = in_stack_fffffe74[1]; @@ -24422,8 +24422,8 @@ LAB_0064423d: other._filename._buf[0xd] = in_stack_fffffe74[0xd]; other._filename._buf[0xe] = in_stack_fffffe74[0xe]; other._filename._buf[0xf] = in_stack_fffffe74[0xf]; - other._filename._size = in_stack_fffffe74._16_4_; - other._filename._capacity = in_stack_fffffe74._20_4_; + other._filename._size = (*(undefined4 *)((char *)&(in_stack_fffffe74) + 0x10)); + other._filename._capacity = (*(undefined4 *)((char *)&(in_stack_fffffe74) + 0x14)); other._animDefaultName._buf[0] = in_stack_fffffe74[0x18]; other._animDefaultName._buf[1] = in_stack_fffffe74[0x19]; other._animDefaultName._buf[2] = in_stack_fffffe74[0x1a]; @@ -24440,67 +24440,67 @@ LAB_0064423d: other._animDefaultName._buf[0xd] = in_stack_fffffe74[0x25]; other._animDefaultName._buf[0xe] = in_stack_fffffe74[0x26]; other._animDefaultName._buf[0xf] = in_stack_fffffe74[0x27]; - other._animDefaultName._size = in_stack_fffffe74._40_4_; - other._animDefaultName._capacity = in_stack_fffffe74._44_4_; - other._animState._animation = (void *)in_stack_fffffe74._48_4_; - other._animState._animData = (void *)in_stack_fffffe74._52_4_; - other._animState._layerFrames = (void *)in_stack_fffffe74._56_4_; - other._animState._nullLayerFrames = (void *)in_stack_fffffe74._60_4_; - other._animState._animFrame = (float)in_stack_fffffe74._64_4_; + other._animDefaultName._size = (*(undefined4 *)((char *)&(in_stack_fffffe74) + 0x28)); + other._animDefaultName._capacity = (*(undefined4 *)((char *)&(in_stack_fffffe74) + 0x2c)); + other._animState._animation = (*(undefined4 *)((char *)&((void *)in_stack_fffffe74) + 0x30)); + other._animState._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffe74) + 0x34)); + other._animState._layerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffe74) + 0x38)); + other._animState._nullLayerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffe74) + 0x3c)); + other._animState._animFrame = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0x40)); other._animState._isPlaying = in_stack_fffffe74[0x44]; - other._animState._21_3_ = in_stack_fffffe74._69_3_; - other._animState._currentlyTriggeredEvents = in_stack_fffffe74._72_4_; - other._animState._previouslyTriggeredEvents = in_stack_fffffe74._76_4_; - other._overlayAnimState._animation = (void *)in_stack_fffffe74._80_4_; - other._overlayAnimState._animData = (void *)in_stack_fffffe74._84_4_; - other._overlayAnimState._layerFrames = (void *)in_stack_fffffe74._88_4_; - other._overlayAnimState._nullLayerFrames = (void *)in_stack_fffffe74._92_4_; - other._overlayAnimState._animFrame = (float)in_stack_fffffe74._96_4_; + (*(undefined1 *)((char *)&(other._animState) + 0x15)) = (*(undefined1 *)((char *)&(in_stack_fffffe74) + 0x45)); + other._animState._currentlyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffe74) + 0x48)); + other._animState._previouslyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffe74) + 0x4c)); + other._overlayAnimState._animation = (*(undefined4 *)((char *)&((void *)in_stack_fffffe74) + 0x50)); + other._overlayAnimState._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffe74) + 0x54)); + other._overlayAnimState._layerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffe74) + 0x58)); + other._overlayAnimState._nullLayerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffe74) + 0x5c)); + other._overlayAnimState._animFrame = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0x60)); other._overlayAnimState._isPlaying = in_stack_fffffe74[100]; - other._overlayAnimState._21_3_ = in_stack_fffffe74._101_3_; - other._overlayAnimState._currentlyTriggeredEvents = in_stack_fffffe74._104_4_; - other._overlayAnimState._previouslyTriggeredEvents = in_stack_fffffe74._108_4_; + (*(undefined1 *)((char *)&(other._overlayAnimState) + 0x15)) = (*(undefined1 *)((char *)&(in_stack_fffffe74) + 0x65)); + other._overlayAnimState._currentlyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffe74) + 0x68)); + other._overlayAnimState._previouslyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffe74) + 0x6c)); other._overlayRenderFirst = in_stack_fffffe74[0x70]; - other._113_3_ = in_stack_fffffe74._113_3_; - other._animData = (void *)in_stack_fffffe74._116_4_; - other._animCount = in_stack_fffffe74._120_4_; - other._layerState = (void *)in_stack_fffffe74._124_4_; - other._layerCount = in_stack_fffffe74._128_4_; - other._nullLayerNames = (void *)in_stack_fffffe74._132_4_; - other._numNullLayers = in_stack_fffffe74._136_4_; - other._eventNames = (void *)in_stack_fffffe74._140_4_; - other._numEvents = in_stack_fffffe74._144_4_; - other._offset.x = (float)in_stack_fffffe74._148_4_; - other._offset.y = (float)in_stack_fffffe74._152_4_; - other._scale.x = (float)in_stack_fffffe74._156_4_; - other._scale.y = (float)in_stack_fffffe74._160_4_; - other._rotation = (float)in_stack_fffffe74._164_4_; - other._color._tint[0] = (float)in_stack_fffffe74._168_4_; - other._color._tint[1] = (float)in_stack_fffffe74._172_4_; - other._color._tint[2] = (float)in_stack_fffffe74._176_4_; - other._color._tint[3] = (float)in_stack_fffffe74._180_4_; - other._color._colorize[0] = (float)in_stack_fffffe74._184_4_; - other._color._colorize[1] = (float)in_stack_fffffe74._188_4_; - other._color._colorize[2] = (float)in_stack_fffffe74._192_4_; - other._color._colorize[3] = (float)in_stack_fffffe74._196_4_; - other._color._offset[0] = (float)in_stack_fffffe74._200_4_; - other._color._offset[1] = (float)in_stack_fffffe74._204_4_; - other._color._offset[2] = (float)in_stack_fffffe74._208_4_; - other._championColor._tint[0] = (float)in_stack_fffffe74._212_4_; - other._championColor._tint[1] = (float)in_stack_fffffe74._216_4_; - other._championColor._tint[2] = (float)in_stack_fffffe74._220_4_; - other._championColor._tint[3] = (float)in_stack_fffffe74._224_4_; + (*(undefined1 *)((char *)&(other) + 0x71)) = (*(undefined1 *)((char *)&(in_stack_fffffe74) + 0x71)); + other._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffe74) + 0x74)); + other._animCount = (*(undefined4 *)((char *)&(in_stack_fffffe74) + 0x78)); + other._layerState = (*(undefined4 *)((char *)&((void *)in_stack_fffffe74) + 0x7c)); + other._layerCount = (*(undefined4 *)((char *)&(in_stack_fffffe74) + 0x80)); + other._nullLayerNames = (*(undefined4 *)((char *)&((void *)in_stack_fffffe74) + 0x84)); + other._numNullLayers = (*(undefined4 *)((char *)&(in_stack_fffffe74) + 0x88)); + other._eventNames = (*(undefined4 *)((char *)&((void *)in_stack_fffffe74) + 0x8c)); + other._numEvents = (*(undefined4 *)((char *)&(in_stack_fffffe74) + 0x90)); + other._offset.x = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0x94)); + other._offset.y = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0x98)); + other._scale.x = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0x9c)); + other._scale.y = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0xa0)); + other._rotation = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0xa4)); + other._color._tint[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0xa8)); + other._color._tint[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0xac)); + other._color._tint[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0xb0)); + other._color._tint[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0xb4)); + other._color._colorize[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0xb8)); + other._color._colorize[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0xbc)); + other._color._colorize[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0xc0)); + other._color._colorize[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0xc4)); + other._color._offset[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0xc8)); + other._color._offset[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0xcc)); + other._color._offset[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0xd0)); + other._championColor._tint[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0xd4)); + other._championColor._tint[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0xd8)); + other._championColor._tint[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0xdc)); + other._championColor._tint[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffe74) + 0xe0)); other._championColor._colorize[1] = in_stack_ffffff5c; other._championColor._colorize[2] = in_stack_ffffff60; other._championColor._colorize[3] = fVar7; other._championColor._offset[0] = fVar6; other._championColor._offset[1] = fVar8; other._championColor._offset[2] = (float)pos; - other._256_4_ = pVVar11; + (*(undefined4 *)((char *)&(other) + 0x100)) = pVVar11; other._playbackSpeed = fVar9; - other._264_1_ = (char)uVar12; + (*(undefined1 *)((char *)&(other) + 0x108)) = (char)uVar12; other._loaded = SUB41(uVar12,1); - other._266_2_ = SUB42(uVar12,2); + (*(undefined2 *)((char *)&(other) + 0x10a)) = SUB42(uVar12,2); other._shadowLayerIndex = uVar4; other._bitflags = iVar13; ((ANM2 *)(&effect->_sprite))->ANM2::operator_assign(other); @@ -24516,7 +24516,7 @@ LAB_0064423d: pos->x = (float)local_70; (this->_pos).y = local_60; pvVar1 = (manager->_itemConfig)._collectibles._begin; - if ((int)((int)(manager->_itemConfig)._collectibles._end - (int)pvVar1 & 0xfffffffcU) < 0x9ed) { + if (GHIDRA_INT((GHIDRA_INT((manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar1) & 0xfffffffcU)) < 0x9ed) { local_58.x = 0.0; } else { @@ -24525,7 +24525,7 @@ LAB_0064423d: uStack_4c = 0; uStack_50 = 0xc; local_58.y = 1.4013e-45; - ((TemporaryEffects *)((TemporaryEffects *)((int)this->_player + 0x1508)))->TemporaryEffects::AddEffect(&local_58,0,1); + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this->_player) + 0x1508)))->TemporaryEffects::AddEffect(&local_58,0,1); fStack_68 = 30.0; local_70 = (EntityPtr *)(this->_player->_meleeDamage * 3.0 + 40.0); isBffs = ((Entity_Player *)(this->_player))->Entity_Player::HasCollectible(0xf7,0); @@ -24543,21 +24543,21 @@ LAB_0064423d: effect->Update(); local_58.x = *(float *)((char *)this->_player + 0x33c); local_58.y = *(float *)((char *)this->_player + 0x340); - Game::DamageRadius(&local_58,(Entity *)this,4,0,(int)pVVar11,50.0,g_tearFlagsNone, + Game::DamageRadius(&local_58,(Entity *)this,4,0,GHIDRA_INT(pVVar11),50.0,g_tearFlagsNone, (float)local_70,fStack_68); fVar7 = *(float *)((char *)this->_player + 0x157c); if (isBffs != 0) { fVar7 = fVar7 + fVar7 + 3.0; } - Game::DamageRadius(pos,(Entity *)this,4,0,(int)pVVar11,50.0,g_tearFlagsNone,fVar7,fStack_68); + Game::DamageRadius(pos,(Entity *)this,4,0,GHIDRA_INT(pVVar11),50.0,g_tearFlagsNone,fVar7,fStack_68); if (isBffs != 0) { fStack_68 = 0.0; do { player = this->_player; pEStack_64 = (Entity *)(player->_shotspeed * 10.0); local_70 = (EntityPtr *) - ((float)((double)(int)fStack_68 + - __uint_to_double_fixup[-((int)fStack_68 >> 0x1f)]) * 360.0 * 0.125 * + ((float)((double)GHIDRA_INT(fStack_68) + + __uint_to_double_fixup[-(GHIDRA_INT(fStack_68) >> 0x1f)]) * 360.0 * 0.125 * 0.017453292); fVar7 = cos((float)local_70); local_58.x = fVar7 * (float)pEStack_64; @@ -24566,8 +24566,8 @@ LAB_0064423d: velocity.y = local_58.y; velocity.x = local_58.x; Entity_Player::FireTear(player,&this->_pos,velocity,0,(Entity *)0x0,1.0); - fStack_68 = (float)((int)fStack_68 + 1); - } while ((uint)fStack_68 < 8); + fStack_68 = (float)(GHIDRA_INT(fStack_68) + 1); + } while (GHIDRA_UINT(fStack_68) < 8); } bVar3 = ((Entity_Player *)(this->_player))->Entity_Player::HasCollectible(0x3b,0); if (bVar3 != 0) { @@ -24645,7 +24645,7 @@ LAB_0064423d: local_5c = pEVar10; if (*(int *)((char *)local_58.x + 0x1264) != 0) { do { - entity = *(int **)(*(int *)((char *)local_58.x + 0x125c) + (int)local_70 * 4); + entity = *(int **)(*(int *)((char *)local_58.x + 0x125c) + GHIDRA_INT(local_70) * 4); if ((entity[0x62] != 0) && ((((1 < *(int *)&game->_deathmatchManager && (entity[10] == 1)) || (entity[10] - 10U < 0x3de)) && ((entity[0x5a] & 0x20000000U) == 0)))) { @@ -24680,27 +24680,27 @@ LAB_00643ff4: uVar4 = 0; } else { - CStack_38._tint[0] = *(float *)((int)CStack_38._offset[1] + 0x28); - CStack_38._tint[1] = *(float *)((int)CStack_38._offset[1] + 0x2c); - CStack_38._tint[2] = *(float *)((int)CStack_38._offset[1] + 0x34); - CStack_38._tint[3] = *(float *)((int)CStack_38._offset[1] + 0x38); - CStack_38._colorize[0] = *(float *)((int)CStack_38._offset[1] + 0x33c); - CStack_38._colorize[1] = *(float *)((int)CStack_38._offset[1] + 0x340); - CStack_38._colorize[2] = *(float *)((int)CStack_38._offset[1] + 0x360); - CStack_38._colorize[3] = *(float *)((int)CStack_38._offset[1] + 0x364); - if ((*(uint *)((int)CStack_38._offset[1] + 0x168) & 0x100) == 0) + CStack_38._tint[0] = *(float *)(GHIDRA_INT(CStack_38._offset[1]) + 0x28); + CStack_38._tint[1] = *(float *)(GHIDRA_INT(CStack_38._offset[1]) + 0x2c); + CStack_38._tint[2] = *(float *)(GHIDRA_INT(CStack_38._offset[1]) + 0x34); + CStack_38._tint[3] = *(float *)(GHIDRA_INT(CStack_38._offset[1]) + 0x38); + CStack_38._colorize[0] = *(float *)(GHIDRA_INT(CStack_38._offset[1]) + 0x33c); + CStack_38._colorize[1] = *(float *)(GHIDRA_INT(CStack_38._offset[1]) + 0x340); + CStack_38._colorize[2] = *(float *)(GHIDRA_INT(CStack_38._offset[1]) + 0x360); + CStack_38._colorize[3] = *(float *)(GHIDRA_INT(CStack_38._offset[1]) + 0x364); + if ((*(uint *)(GHIDRA_INT(CStack_38._offset[1]) + 0x168) & 0x100) == 0) goto LAB_00643fa1; pEStack_64 = (Entity *)0x1; LAB_00643fad: - if ((*(uint *)((int)CStack_38._offset[1] + 0x168) & 0x20000000) == 0) + if ((*(uint *)(GHIDRA_INT(CStack_38._offset[1]) + 0x168) & 0x20000000) == 0) goto LAB_00643fcf; local_60 = 2.8026e-45; LAB_00643fdb: - if ((*(uint *)((int)CStack_38._offset[1] + 0x16c) & 0x400000) == 0) + if ((*(uint *)(GHIDRA_INT(CStack_38._offset[1]) + 0x16c) & 0x400000) == 0) goto LAB_00643ff4; uVar4 = 4; } - CStack_38._offset[0] = (float)(uVar4 | (uint)local_60 | (uint)pEStack_64); + CStack_38._offset[0] = (float)(uVar4 | GHIDRA_UINT(local_60) | GHIDRA_UINT(pEStack_64)); (*pcStack_48)(); } game = g_game; @@ -24714,10 +24714,10 @@ LAB_00643fdb: uVar4 = Random(); manager = g_manager; local_70 = (EntityPtr *)0x1fa; - local_58.x = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + local_58.x = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 1.5; seed_fart_sound_override((int *)&local_70); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_70,1.0,1,0,local_58.x,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_70),1.0,1,0,local_58.x,0.0); ((Game *)(g_game))->Game::ShakeScreen(6); } iVar13 = *(int *)((char *)this->_player + 0x13bc); @@ -24750,7 +24750,7 @@ LAB_0064418e: bVar5 = bVar3 < (byte)*wantedAnimChar; if (bVar3 != *wantedAnimChar) { LAB_00644170: - uVar4 = -(uint)bVar5 | 1; + uVar4 = -GHIDRA_UINT(bVar5) | 1; goto LAB_00644175; } if (bVar3 == 0) break; @@ -24788,7 +24788,7 @@ LAB_00644210: bVar5 = bVar3 < (byte)*wantedAnimChar; if (bVar3 != *wantedAnimChar) { LAB_006441f2: - uVar4 = -(uint)bVar5 | 1; + uVar4 = -GHIDRA_UINT(bVar5) | 1; goto LAB_006441f7; } if (bVar3 == 0) break; @@ -24921,7 +24921,7 @@ Entity * Entity_Familiar::aim_reflected_projectile() ((((tmpEntity->_flags & 0x10) == 0 || (enemyType == 0x322)) || (enemyType == 0x362)))))) { if (fVar1 * fVar1 + velocityYSq <= 1e-05) { rngResult = Random(); - fVar2 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)] + fVar2 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)] ) * 2.3283064e-10; game = g_game; } @@ -25027,7 +25027,7 @@ void Entity_Familiar::ai_shadow_intruder_damocles(byte isInterpolating) Entity_Familiar *spawnVariant; EntityPtr *spawnerSlot; - local_c = __security_cookie ^ (uint)auStack_12c; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_12c); fVar13 = *(float *)((char *)this->_player + 0x340); (this->_pos).x = *(float *)((char *)this->_player + 0x33c); (this->_pos).y = fVar13; @@ -25048,7 +25048,7 @@ void Entity_Familiar::ai_shadow_intruder_damocles(byte isInterpolating) if (((this->_sprite)._animState._animData == (void *)0x0) || ((this->_sprite)._animState._isPlaying == 0)) { uVar7 = Random(); - fVar13 = (float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + fVar13 = (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10; if (0.1 <= fVar13) { if (0.5 <= fVar13) { @@ -25077,7 +25077,7 @@ void Entity_Familiar::ai_shadow_intruder_damocles(byte isInterpolating) } uVar7 = game->_frameCount & 0x80000003; bVar12 = uVar7 == 0; - if ((int)uVar7 < 0) { + if (GHIDRA_INT(uVar7) < 0) { bVar12 = (uVar7 - 1 | 0xfffffffc) == 0xffffffff; } if (bVar12) { @@ -25087,7 +25087,7 @@ void Entity_Familiar::ai_shadow_intruder_damocles(byte isInterpolating) } uVar7 = Random(); manager = g_manager; - if ((int)(uVar7 % 10000) < iVar9) { + if (GHIDRA_INT((uVar7 % 10000)) < iVar9) { local_114 = 0x1fd; seed_fart_sound_override(&local_114); ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(local_114,1.0,0,0,1.0,0.0); @@ -25114,7 +25114,7 @@ void Entity_Familiar::ai_shadow_intruder_damocles(byte isInterpolating) bVar12 = bVar5 < *wantedAnimChar; if (bVar5 != *wantedAnimChar) { LAB_00644f50: - uVar7 = -(uint)bVar12 | 1; + uVar7 = -GHIDRA_UINT(bVar12) | 1; goto LAB_00644f55; } if (bVar5 == 0) break; @@ -25165,8 +25165,8 @@ LAB_00644f81: else { uVar8 = 4; } - damageSourceFlags = uVar8 | uVar7 | (uint)((savedFamiliar->_flags & 0x100) != 0); - local_58._type = (int)savedFamiliar; + damageSourceFlags = uVar8 | uVar7 | GHIDRA_UINT(((savedFamiliar->_flags & 0x100) != 0)); + local_58._type = GHIDRA_INT(savedFamiliar); (**(code **)(*(int *)this->_player + 0x20))(0x3f800000,0x2002800,0,&damageSourceType,0x1e); this = pEStack_11c; sourceRef = ((EntityRef *)(&local_58))->EntityRef::EntityRef(); @@ -25178,12 +25178,12 @@ LAB_00644f81: local_114 = 3; do { uVar7 = Random(); - fVar13 = (float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + fVar13 = (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 * 3.14; piStack_120 = (int *)(fVar13 + fVar13); uVar7 = Random(); pEStack_11c = (Entity_Familiar *) - ((float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) + ((float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 * 15.0 + 6.0); burstX = cos((float)piStack_120); burstX = burstX * (float)pEStack_11c; @@ -25199,13 +25199,13 @@ LAB_00644f81: if (particleCount != 0) { do { uVar8 = Random(); - pGStack_100 = (Game *)(((float)((double)(int)uVar8 + - __uint_to_double_fixup[-((int)uVar8 >> 0x1f)]) * + pGStack_100 = (Game *)(((float)((double)GHIDRA_INT(uVar8) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar8) >> 0x1f)]) * 2.3283064e-10 * 10.0 - 5.0) * 0.017453292); fStack_104 = cos((float)pGStack_100); pGStack_100 = (Game *)sin((float)pGStack_100); uVar8 = Random(); - fStack_e0 = (float)((double)(int)uVar8 + __uint_to_double_fixup[-((int)uVar8 >> 0x1f)] + fStack_e0 = (float)((double)GHIDRA_INT(uVar8) + __uint_to_double_fixup[-(GHIDRA_INT(uVar8) >> 0x1f)] ) * 2.3283064e-10; particleVelX = (burstX * fStack_104 - burstY * (float)pGStack_100) * fStack_e0; fStack_e0 = (burstX * (float)pGStack_100 + burstY * fStack_104) * fStack_e0; @@ -25218,7 +25218,7 @@ LAB_00644f81: slowVelocity.x = particleVelX * 0.2; slowVelocity.y = fStack_e0 * 0.2; spawned = ((Game *)(g_game))->Game::SpawnEx(1000,5,&particlePos,&slowVelocity,(Entity *)0x0,0, - (uint)fVar13,0); + GHIDRA_UINT(fVar13),0); spawned->Update(); savedParticleIndex = particleIndex; } @@ -25304,7 +25304,7 @@ LAB_006454c5: itemKey = spawnSubType; std::set::find_node(&local_58._spawnerType,&itemKey); if (((*(char *)((char *)local_58._position.x + 0xd) == '\0') && - (*(int *)((char *)local_58._position.x + 0x10) <= (int)uVar7)) && + (*(int *)((char *)local_58._position.x + 0x10) <= GHIDRA_INT(uVar7))) && (local_58._position.x != (float)piVar10[8])) goto LAB_006454c5; bVar12 = true; } @@ -25327,18 +25327,18 @@ LAB_0064567d: if (pEStack_118 != (Entity *)0x0) { timeNs = GetTimeNs(); spawned = pEStack_118; - uStack_f0 = (uint)(timeNs >> 0x20); + uStack_f0 = GHIDRA_UINT((timeNs >> 0x20)); lVar2 = (timeNs & 0xffffffff) * 0x431bde82; - iStack_110 = (int)((ulonglong)lVar2 >> 0x20); + iStack_110 = GHIDRA_INT(((ulonglong)lVar2 >> 0x20)); lVar3 = (ulonglong)uStack_f0 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); - uVar8 = (uint)((ulonglong)lVar3 >> 0x20); - uVar7 = iStack_110 + (uint)CARRY4((uint)lVar2,(uint)lVar3); + uVar8 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); + uVar7 = iStack_110 + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar2),GHIDRA_UINT(lVar3))); lVar2 = (ulonglong)uStack_f0 * 0x431bde82 + (ulonglong)CONCAT14(CARRY4(uVar8,uVar7),uVar8 + uVar7); - uStack_c8 = (uint)((ulonglong)lVar2 >> 0x20); + uStack_c8 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); spawnerSlot = &pEStack_118->_spawnerEntity; - piStack_120 = (int *)((uint)lVar2 >> 0x12 | uStack_c8 * 0x4000); + piStack_120 = (int *)(GHIDRA_UINT(lVar2) >> 0x12 | uStack_c8 * 0x4000); uStack_c8 = uStack_c8 >> 0x12; pEStack_118->_spawnerType = 0; pEStack_118->_spawnerVariant = 0; @@ -25358,7 +25358,7 @@ LAB_0064567d: iVar9 = *(int *)((char *)pvVar11 + 0x1214); *(int *)((char *)pvVar11 + 0x1214) = iVar9 + 1; spawned->_index = iVar9; - ((EntityList *)((EntityList *)((int)pvVar11 + 0x1218)))->EntityList::AddEntity(spawned); + ((EntityList *)((EntityList *)(GHIDRA_INT(pvVar11) + 0x1218)))->EntityList::AddEntity(spawned); bVar5 = Game::ShouldEraseEnemy(spawned); if (bVar5 != 0) { Entity::RemoveWithPoof(spawned,unusedArg); @@ -25381,18 +25381,18 @@ LAB_0064567d: } uVar7 = 0; playerManager = &g_game->_playerManager; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar11 = (playerManager->_playerList)._end; - if ((int)pvVar11 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar11) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *) "((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n" ); pvVar11 = (playerManager->_playerList)._end; } piVar10 = (playerManager->_playerList)._begin; - if (uVar7 < (uint)((int)pvVar11 - (int)piVar10 >> 2)) { + if (uVar7 < GHIDRA_UINT((GHIDRA_INT(pvVar11) - GHIDRA_INT(piVar10) >> 2))) { piVar10 = piVar10 + uVar7; } trigger_set_dispatch @@ -25400,33 +25400,33 @@ LAB_0064567d: &particleVelocity); uVar7 = uVar7 + 1; playerManager = &g_game->_playerManager; - } while (uVar7 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar7 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } LAB_006458e9: timeNs = GetTimeNs(); - uVar7 = (uint)(timeNs >> 0x20); + uVar7 = GHIDRA_UINT((timeNs >> 0x20)); lVar2 = (timeNs & 0xffffffff) * 0x431bde82; - uStack_f0 = (uint)((ulonglong)lVar2 >> 0x20); + uStack_f0 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); lVar3 = (ulonglong)uVar7 * 0x431bde82; - iStack_110 = (int)lVar3; + iStack_110 = GHIDRA_INT(lVar3); lVar4 = (ulonglong)uVar7 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); pGStack_100 = (Game *)(lVar4 + lVar2); lVar3 = lVar3 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar4 >> 0x20), - uStack_f0 + CARRY4((uint)lVar2,(uint)lVar4)), - (int)((ulonglong)(lVar4 + lVar2) >> 0x20)); - uVar8 = (uint)((ulonglong)lVar3 >> 0x20); - piVar10 = (int *)((uint)lVar3 >> 0x12 | uVar8 * 0x4000); - uVar7 = (int)piVar10 - (int)piStack_120; - bVar12 = CARRY4((uint)g_entitySpawnTimeMs,uVar7); - g_entitySpawnTimeMs._0_4_ = (uint)g_entitySpawnTimeMs + uVar7; - g_entitySpawnTimeMs._4_4_ = - g_entitySpawnTimeMs._4_4_ + - (((uVar8 >> 0x12) - uStack_c8) - (uint)(piVar10 < piStack_120)) + - (uint)bVar12; + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)), + uStack_f0 + CARRY4(GHIDRA_UINT(lVar2),GHIDRA_UINT(lVar4))), + GHIDRA_INT(((ulonglong)(lVar4 + lVar2) >> 0x20))); + uVar8 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); + piVar10 = (int *)(GHIDRA_UINT(lVar3) >> 0x12 | uVar8 * 0x4000); + uVar7 = GHIDRA_INT(piVar10) - GHIDRA_INT(piStack_120); + bVar12 = CARRY4(GHIDRA_UINT(g_entitySpawnTimeMs),uVar7); + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x0)) = GHIDRA_UINT(g_entitySpawnTimeMs) + uVar7; + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) = + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) + + (((uVar8 >> 0x12) - uStack_c8) - GHIDRA_UINT((piVar10 < piStack_120))) + + GHIDRA_UINT(bVar12); } spawned = pEStack_118; pEStack_118->Update(); @@ -25436,7 +25436,7 @@ LAB_006458e9: } particleIndex = savedParticleIndex + 1; savedParticleIndex = particleIndex; - } while ((int)particleIndex < particleCount); + } while (GHIDRA_INT(particleIndex) < particleCount); } local_114 = local_114 + -1; } while (local_114 != 0); @@ -25499,7 +25499,7 @@ byte Entity_Familiar::abyss_locust_eat() local_8 = 0xffffffff; puStack_c = &LAB_00af7125; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(fileName + 0x30); + uVar1 = __security_cookie ^ GHIDRA_UINT((fileName + 0x30)); ExceptionList = &local_10; local_14 = uVar1; if (this->_variant != 0xe7) { @@ -25512,7 +25512,7 @@ byte Entity_Familiar::abyss_locust_eat() if (*(byte *)(locustData + 0x50) < 0x19) { bVar2 = *(byte *)(locustData + 0x50) + 1; *(byte *)(locustData + 0x50) = bVar2; - if ((uint)bVar2 % 5 == 1) { + if (GHIDRA_UINT(bVar2) % 5 == 1) { sprintf(fileName,(byte *)"hungry_%d.png"); ((std::string *)((char *)gfxRoot))->std::string::string(&(g_manager->_itemConfig)._wispGfxRoot); cursor = fileName; @@ -25521,19 +25521,19 @@ byte Entity_Familiar::abyss_locust_eat() bVar2 = *cursor; cursor = cursor + 1; } while (bVar2 != 0); - appendResult = ((std::string *)((char *)gfxRoot))->std::string::append(fileName,(int)cursor - (int)(fileName + 1)) + appendResult = ((std::string *)((char *)gfxRoot))->std::string::append(fileName,GHIDRA_INT(cursor) - GHIDRA_INT((fileName + 1))) ; spritesheetPath = (void *)*appendResult; acStack_60 = (char [4])appendResult[1]; acStack_5c = (char [4])appendResult[2]; - acStack_58._0_4_ = appendResult[3]; + (*(undefined4 *)((char *)&(acStack_58) + 0x0)) = appendResult[3]; unique0x0000a400 = *(undefined8 *)(appendResult + 4); appendResult[4] = 0; appendResult[5] = 0xf; *(undefined1 *)appendResult = 0; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((Sprite *)((Sprite *)&this->_sprite))->Sprite::ReplaceSpritesheet(0,(std_string *)&spritesheetPath); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; bVar2 = extraout_CL; if (0xf < uStack_50) { uVar1 = uStack_50 + 1; @@ -25541,7 +25541,7 @@ byte Entity_Familiar::abyss_locust_eat() if (0xfff < uVar1) { pvVar3 = *(void **)((char *)spritesheetPath + -4); uVar1 = uStack_50 + 0x24; - if (0x1f < (uint)((int)spritesheetPath + (-4 - (int)pvVar3))) goto LAB_006472d2; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(spritesheetPath) + (-4 - GHIDRA_INT(pvVar3))))) goto LAB_006472d2; } operator_delete(pvVar3,uVar1); bVar2 = extraout_CL_00; @@ -25551,9 +25551,9 @@ byte Entity_Familiar::abyss_locust_eat() uVar1 = local_38 + 1; pvVar3 = gfxRoot[0]; if (0xfff < uVar1) { - pvVar3 = *(void **)((int)gfxRoot[0] + -4); + pvVar3 = *(void **)(GHIDRA_INT(gfxRoot[0]) + -4); uVar1 = local_38 + 0x24; - if (0x1f < (uint)((int)gfxRoot[0] + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(gfxRoot[0]) + (-4 - GHIDRA_INT(pvVar3))))) { LAB_006472d2: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -25564,7 +25564,7 @@ LAB_006472d2: } local_3c = 0; local_38 = 0xf; - gfxRoot[0] = (void *)((uint)gfxRoot[0] & 0xffffff00); + gfxRoot[0] = (void *)(GHIDRA_UINT(gfxRoot[0]) & 0xffffff00); ((ANM2 *)(&this->_sprite))->ANM2::LoadGraphics(bVar2); } bVar2 = 1; @@ -25620,9 +25620,9 @@ byte Entity_Familiar::break_grid_ahead() fVar5 = (this->_velocity).x; local_58.x = (float)((10.0 < this->_collisionDamage) + 1); local_60.x = (float)&this->_velocity; - iVar6 = (int)(((fVar5 + fVar5 + (this->_pos).x) - 40.0) / 40.0 + 0.5); + iVar6 = GHIDRA_INT((((fVar5 + fVar5 + (this->_pos).x) - 40.0) / 40.0 + 0.5)); if ((((iVar6 < 0) || (gridY = *(int *)((char *)g_game->_room + 0xc), gridY <= iVar6)) || - (gridY = (int)(((fVar1 + fVar1 + (this->_pos).y) - 120.0) / 40.0 + 0.5), gridY < 0)) || + (gridY = GHIDRA_INT((((fVar1 + fVar1 + (this->_pos).y) - 120.0) / 40.0 + 0.5)), gridY < 0)) || ((*(int *)((char *)g_game->_room + 0x10) <= gridY || (iVar6 = gridY * gridY + iVar6, iVar6 < 0)))) { return 0; @@ -25668,46 +25668,46 @@ byte Entity_Familiar::break_grid_ahead() if (((uVar7 & uVar8) == 0) && (0.0 < *tearEffectEntry)) { rngValue = Random(); uVar7 = rolledEffectMask; - if ((float)((double)(int)rngValue + __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + if ((float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 < *tearEffectEntry) { - tearFlags0 = tearFlags0 | (uint)tearEffectEntry[2]; - tearFlags1 = tearFlags1 | (uint)tearEffectEntry[3]; - tearFlags2 = tearFlags2 | (uint)tearEffectEntry[4]; - tearFlags3 = tearFlags3 | (uint)tearEffectEntry[5]; - rolledEffectMask = rolledEffectMask | (uint)tearEffectEntry[7]; + tearFlags0 = tearFlags0 | GHIDRA_UINT(tearEffectEntry[2]); + tearFlags1 = tearFlags1 | GHIDRA_UINT(tearEffectEntry[3]); + tearFlags2 = tearFlags2 | GHIDRA_UINT(tearEffectEntry[4]); + tearFlags3 = tearFlags3 | GHIDRA_UINT(tearEffectEntry[5]); + rolledEffectMask = rolledEffectMask | GHIDRA_UINT(tearEffectEntry[7]); uVar7 = rolledEffectMask; } } tearEffectEntry = tearEffectEntry + 0x1a; - uVar8 = uVar8 << 1 | (uint)((int)uVar8 < 0); + uVar8 = uVar8 << 1 | GHIDRA_UINT((GHIDRA_INT(uVar8) < 0)); } while (tearEffectEntry != *(float **)((char *)pvVar4 + 0x6c)); } cVar2 = gridEntity->CanTakeDamageFromTearEffects(); fVar1 = local_68.x; if (cVar2 != '\0') { - if (((tearFlags0 & (uint)g_tearFlagAcid._l) == 0 && (tearFlags1 & g_tearFlagAcid._l._4_4_) == 0) - && ((tearFlags2 & (uint)g_tearFlagAcid._h) == 0 && - (tearFlags3 & g_tearFlagAcid._h._4_4_) == 0)) { - if (((tearFlags0 & (uint)g_tearFlagRock._l) == 0 && - (tearFlags1 & g_tearFlagRock._l._4_4_) == 0) && - ((tearFlags2 & (uint)g_tearFlagRock._h) == 0 && (tearFlags3 & g_tearFlagRock._h._4_4_) == 0 + if (((tearFlags0 & GHIDRA_UINT(g_tearFlagAcid._l)) == 0 && (tearFlags1 & (*(undefined4 *)((char *)&(g_tearFlagAcid._l) + 0x4))) == 0) + && ((tearFlags2 & GHIDRA_UINT(g_tearFlagAcid._h)) == 0 && + (tearFlags3 & (*(undefined4 *)((char *)&(g_tearFlagAcid._h) + 0x4))) == 0)) { + if (((tearFlags0 & GHIDRA_UINT(g_tearFlagRock._l)) == 0 && + (tearFlags1 & (*(undefined4 *)((char *)&(g_tearFlagRock._l) + 0x4))) == 0) && + ((tearFlags2 & GHIDRA_UINT(g_tearFlagRock._h)) == 0 && (tearFlags3 & (*(undefined4 *)((char *)&(g_tearFlagRock._h) + 0x4))) == 0 )) goto LAB_0064a73c; } - fStack_28 = ((Vector *)((int)local_68.x + 0x33c))->x; - fStack_24 = ((Vector *)((int)local_68.x + 0x33c))->y; - fStack_20 = ((Vector *)((int)local_68.x + 0x360))->x; + fStack_28 = ((Vector *)(GHIDRA_INT(local_68.x) + 0x33c))->x; + fStack_24 = ((Vector *)(GHIDRA_INT(local_68.x) + 0x33c))->y; + fStack_20 = ((Vector *)(GHIDRA_INT(local_68.x) + 0x360))->x; sourceRef = *(int *)((char *)local_68.x + 0x28); iStack_34 = *(int *)((char *)local_68.x + 0x2c); iStack_30 = *(int *)((char *)local_68.x + 0x34); iStack_2c = *(int *)((char *)local_68.x + 0x38); - fStack_1c = ((Vector *)((int)local_68.x + 0x360))->y; + fStack_1c = ((Vector *)(GHIDRA_INT(local_68.x) + 0x360))->y; if ((*(qword *)((char *)local_68.x + 0x168) & 0x20000000) == 0) { uVar7 = 0; } else { uVar7 = 2; } - fVar5 = (float)(*(uint *)((int)((int)local_68.x + 0x168) + 4) & 0x400000); + fVar5 = (float)(*(uint *)(GHIDRA_INT((GHIDRA_INT(local_68.x) + 0x168)) + 4) & 0x400000); if (fVar5 == 0.0) { uVar8 = 0; } @@ -25715,7 +25715,7 @@ byte Entity_Familiar::break_grid_ahead() uVar8 = 4; } pEStack_14 = (Entity_Familiar *)local_68.x; - uStack_18 = uVar8 | uVar7 | (uint)((*(qword *)((char *)local_68.x + 0x168) & 0x100) != 0); + uStack_18 = uVar8 | uVar7 | GHIDRA_UINT(((*(qword *)((char *)local_68.x + 0x168) & 0x100) != 0)); local_68.x = fVar5; cVar2 = gridEntity->Destroy(0,&sourceRef); if (cVar2 != '\0') { @@ -25740,22 +25740,22 @@ byte Entity_Familiar::break_grid_ahead() } } LAB_0064a73c: - fStack_28 = ((Vector *)((int)fVar1 + 0x33c))->x; - fStack_24 = ((Vector *)((int)fVar1 + 0x33c))->y; + fStack_28 = ((Vector *)(GHIDRA_INT(fVar1) + 0x33c))->x; + fStack_24 = ((Vector *)(GHIDRA_INT(fVar1) + 0x33c))->y; local_68.x = *(float *)(*(int *)gridEntity + 0x10); sourceRef = *(int *)((char *)fVar1 + 0x28); iStack_34 = *(int *)((char *)fVar1 + 0x2c); iStack_30 = *(int *)((char *)fVar1 + 0x34); iStack_2c = *(int *)((char *)fVar1 + 0x38); - fStack_20 = ((Vector *)((int)fVar1 + 0x360))->x; - fStack_1c = ((Vector *)((int)fVar1 + 0x360))->y; + fStack_20 = ((Vector *)(GHIDRA_INT(fVar1) + 0x360))->x; + fStack_1c = ((Vector *)(GHIDRA_INT(fVar1) + 0x360))->y; if ((*(qword *)((char *)fVar1 + 0x168) & 0x20000000) == 0) { uVar7 = 0; } else { uVar7 = 2; } - local_60.x = (float)(*(uint *)((int)((int)fVar1 + 0x168) + 4) & 0x400000); + local_60.x = (float)(*(uint *)(GHIDRA_INT((GHIDRA_INT(fVar1) + 0x168)) + 4) & 0x400000); if (local_60.x == 0.0) { uVar8 = 0; } @@ -25763,7 +25763,7 @@ LAB_0064a73c: uVar8 = 4; } pEStack_14 = (Entity_Familiar *)fVar1; - uStack_18 = uVar8 | uVar7 | (uint)((*(qword *)((char *)fVar1 + 0x168) & 0x100) != 0); + uStack_18 = uVar8 | uVar7 | GHIDRA_UINT(((*(qword *)((char *)fVar1 + 0x168) & 0x100) != 0)); (*(code *)local_68.x)(local_58.x,&sourceRef); return 1; } @@ -25805,7 +25805,7 @@ void Entity_Familiar::load_config_graphics() local_14 = -1; puStack_18 = &LAB_00af7285; local_1c = ExceptionList; - uVar2 = __security_cookie ^ (uint)(sheetFileName + 0x34); + uVar2 = __security_cookie ^ GHIDRA_UINT((sheetFileName + 0x34)); ExceptionList = &local_1c; if (this->_variant == 0xe7) { iVar4 = this->_coins; @@ -25818,7 +25818,7 @@ void Entity_Familiar::load_config_graphics() local_24 = uVar2; wispEntry = ItemConfig::get_wisp_entry(collectibleId,iVar4); if (this->_config == (void *)0x0) goto LAB_0064aa74; - ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)((int)this->_config + 0x74),1); + ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)(GHIDRA_INT(this->_config) + 0x74),1); defaultAnim = &(this->_sprite)._animDefaultName; if (0xf < (this->_sprite)._animDefaultName._capacity) { defaultAnim = *(std_string **)defaultAnim->_buf; @@ -25842,7 +25842,7 @@ LAB_0064a90e: isLess = bVar1 < (byte)animNameCursor->_buf[0]; if (bVar1 != animNameCursor->_buf[0]) { LAB_0064a8f6: - animCompare = -(uint)isLess | 1; + animCompare = -GHIDRA_UINT(isLess) | 1; goto LAB_0064a8fb; } if (bVar1 == 0) break; @@ -25855,7 +25855,7 @@ LAB_0064a8f6: animCompare = 0; LAB_0064a8fb: if ((animCompare != 0) || - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) != '\0' && + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) != '\0' && ((this->_sprite)._animState._isPlaying == 0)))) goto LAB_0064a90e; } iVar4 = __RTDynamicCast(this->_extraData,0, @@ -25871,18 +25871,18 @@ LAB_0064a8fb: pbVar3 = pbVar3 + 1; } while (bVar1 != 0); appendedPath = ((std::string *)((char *)basePath))->std::string::append(sheetFileName, - (int)pbVar3 - (int)(sheetFileName + 1)); + GHIDRA_INT(pbVar3) - GHIDRA_INT((sheetFileName + 1))); sheetPath = (void *)*appendedPath; acStack_70 = (char [4])appendedPath[1]; acStack_6c = (char [4])appendedPath[2]; - acStack_68._0_4_ = appendedPath[3]; + (*(undefined4 *)((char *)&(acStack_68) + 0x0)) = appendedPath[3]; unique0x0000a400 = *(undefined8 *)(appendedPath + 4); appendedPath[4] = 0; appendedPath[5] = 0xf; *(undefined1 *)appendedPath = 0; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; ((Sprite *)((Sprite *)&this->_sprite))->Sprite::ReplaceSpritesheet(0,(std_string *)&sheetPath); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; bVar1 = extraout_CL; if (0xf < sheetPathCapacity) { uVar2 = sheetPathCapacity + 1; @@ -25890,7 +25890,7 @@ LAB_0064a8fb: if (0xfff < uVar2) { freeBlock = *(void **)((char *)sheetPath + -4); uVar2 = sheetPathCapacity + 0x24; - if (0x1f < (uint)((int)sheetPath + (-4 - (int)freeBlock))) goto LAB_0064aa4a; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(sheetPath) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_0064aa4a; } operator_delete(freeBlock,uVar2); bVar1 = extraout_CL_00; @@ -25900,9 +25900,9 @@ LAB_0064a8fb: uVar2 = basePathCapacity + 1; freeBlock = basePath[0]; if (0xfff < uVar2) { - freeBlock = *(void **)((int)basePath[0] + -4); + freeBlock = *(void **)(GHIDRA_INT(basePath[0]) + -4); uVar2 = basePathCapacity + 0x24; - if (0x1f < (uint)((int)basePath[0] + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(basePath[0]) + (-4 - GHIDRA_INT(freeBlock))))) { LAB_0064aa4a: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -25913,12 +25913,12 @@ LAB_0064aa4a: } basePathSize = 0; basePathCapacity = 0xf; - basePath[0] = (void *)((uint)basePath[0] & 0xffffff00); + basePath[0] = (void *)(GHIDRA_UINT(basePath[0]) & 0xffffff00); ((ANM2 *)(&this->_sprite))->ANM2::LoadGraphics(bVar1); } LAB_0064aa74: anm2_apply_gfx_overrides - ((std_string *)((int)wispEntry + 0x84),(std_string *)((int)wispEntry + 0x9c), + ((std_string *)(GHIDRA_INT(wispEntry) + 0x84),(std_string *)(GHIDRA_INT(wispEntry) + 0x9c), &this->_sprite); ExceptionList = local_1c; return; @@ -26014,29 +26014,29 @@ void Entity_Familiar::siren_charm(Entity *siren, Entity_Player *player) sirenHelper = (EntityPtr) ((Game *)(g_game))->Game::SpawnEx(0x3c6,0,&this->_pos,&g_vectorZero,(Entity *)0x0,0,seed,0); if (*(EntityPtr *)((char *)sirenHelper + 0x3bc) != (EntityPtr)0x0) { - local_c[0] = (Entity_Familiar *)((int)sirenHelper + 0x3bc); + local_c[0] = (Entity_Familiar *)(GHIDRA_INT(sirenHelper) + 0x3bc); std::multiset::erase(local_c); } *(EntityPtr *)((char *)sirenHelper + 0x3bc) = (EntityPtr)siren; if (siren != (Entity *)0x0) { - std::multiset::insert((EntityPtr *)((int)sirenHelper + 0x3bc)); + std::multiset::insert((EntityPtr *)(GHIDRA_INT(sirenHelper) + 0x3bc)); } if (*(EntityPtr *)((char *)sirenHelper + 0x3c4) != (EntityPtr)0x0) { - local_c[0] = (Entity_Familiar *)((int)sirenHelper + 0x3c4); + local_c[0] = (Entity_Familiar *)(GHIDRA_INT(sirenHelper) + 0x3c4); std::multiset::erase(local_c); } *(EntityPtr *)((char *)sirenHelper + 0x3c4) = (EntityPtr)this; - std::multiset::insert((EntityPtr *)((int)sirenHelper + 0x3c4)); + std::multiset::insert((EntityPtr *)(GHIDRA_INT(sirenHelper) + 0x3c4)); *(uint *)((char *)sirenHelper + 0x168) = *(uint *)((char *)sirenHelper + 0x168) & 0xfffffffb; *(undefined4 *)((char *)sirenHelper + 0x16c) = *(undefined4 *)((char *)sirenHelper + 0x16c); *(float *)((char *)sirenHelper + 0x380) = *(float *)((char *)sirenHelper + 900); (**(code **)(*(int *)sirenHelper + 0xc))(); if (this->_variant == 0x41) { - collectibleCount = (int *)((int)(player->_collectibleCounts)._begin + 0x45c); + collectibleCount = (int *)(GHIDRA_INT((player->_collectibleCounts)._begin) + 0x45c); *collectibleCount = *collectibleCount + 1; } else if (this->_variant == 0x20) { - collectibleCount = (int *)((int)(player->_collectibleCounts)._begin + 0x1c0); + collectibleCount = (int *)(GHIDRA_INT((player->_collectibleCounts)._begin) + 0x1c0); *collectibleCount = *collectibleCount + 1; } this->_sirenCharmFrames = 1; @@ -26130,7 +26130,7 @@ void Entity_Familiar::UpdateDirtColor(byte Immediate) local_14 = (byte ****)0xffffffff; puStack_18 = &LAB_00af739e; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(layerName + 0x11); + local_24 = __security_cookie ^ GHIDRA_UINT((layerName + 0x11)); ExceptionList = &local_1c; local_64 = 0; cleanupFlags = 0; @@ -26157,7 +26157,7 @@ void Entity_Familiar::UpdateDirtColor(byte Immediate) layerName[0] = (byte *****)0x0; } else { - ((std::string *)((char *)layerName))->std::string::string((void *)((int)layer->_layerData + 8)); + ((std::string *)((char *)layerName))->std::string::string((void *)(GHIDRA_INT(layer->_layerData) + 8)); } local_14 = (byte ****)0x0; local_64 = cleanupFlags | 1; @@ -26176,16 +26176,16 @@ void Entity_Familiar::UpdateDirtColor(byte Immediate) local_38._alpha = 0.0; } else { - ((std::string *)((char *)&layerNameCopy))->std::string::string((void *)((int)layer->_layerData + 8)); + ((std::string *)((char *)&layerNameCopy))->std::string::string((void *)(GHIDRA_INT(layer->_layerData) + 8)); } uVar7 = local_38._unk; pppppbVar6 = layerNameCopy; cleanupFlags = cleanupFlags | 2; pppppbVar5 = (byte *****)&layerNameCopy; - if (0xf < (uint)local_38._unk) { + if (0xf < GHIDRA_UINT(local_38._unk)) { pppppbVar5 = layerNameCopy; } - bVar4 = str_eq((byte *)pppppbVar5,(uint)local_38._alpha,&DAT_00b1d57c,4); + bVar4 = str_eq((byte *)pppppbVar5,GHIDRA_UINT(local_38._alpha),&DAT_00b1d57c,4); if (bVar4 != 0) goto LAB_0064cbdf; isDirtLayer = '\0'; } @@ -26201,7 +26201,7 @@ LAB_0064cbdf: if (0xfff < freeSize) { pppppbVar5 = (byte *****)pppppbVar6[-1]; freeSize = uVar7 + 0x24; - if ((byte *)0x1f < (byte *)((int)pppppbVar6 + (-4 - (int)pppppbVar5))) goto LAB_0064ccc7; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(pppppbVar6) + (-4 - GHIDRA_INT(pppppbVar5)))) goto LAB_0064ccc7; } operator_delete(pppppbVar5,freeSize); } @@ -26213,7 +26213,7 @@ LAB_0064cbdf: if (0xfff < uVar7) { pppppbVar6 = (byte *****)layerNameBuf[-1]; uVar7 = layerNameCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)layerNameBuf + (-4 - (int)pppppbVar6))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(layerNameBuf) + (-4 - GHIDRA_INT(pppppbVar6)))) { LAB_0064ccc7: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -26266,7 +26266,7 @@ void Entity_Familiar::update_star_of_bethlehem_speed(byte isForce) short roomDistances [194]; undefined4 stackCookie; - stackCookie = __security_cookie ^ (uint)(roomDistances + 0xc4); + stackCookie = __security_cookie ^ GHIDRA_UINT((roomDistances + 0xc4)); if ((isForce == 0) && ((fVar1 = (this->_formationOffset).x, fVar1 != g_vectorZero.x || ((this->_formationOffset).y != g_vectorZero.y)))) { @@ -26281,16 +26281,16 @@ LAB_0064d32e: if (-1 < fromRoomIdx) { starPathLength = Level::compute_room_distances - (roomDistances,(int)(fVar2 + 0.5) * 0xd + (int)(fVar1 + 0.5),toRoomIdx, + (roomDistances,GHIDRA_INT((fVar2 + 0.5)) * 0xd + GHIDRA_INT((fVar1 + 0.5)),toRoomIdx, (uint *)0x0); playerPathLength = Level::compute_room_distances(roomDistances,fromRoomIdx,toRoomIdx,(uint *)0x0); - if (starPathLength + 9 < (int)playerPathLength) goto LAB_0064d32e; + if (starPathLength + 9 < GHIDRA_INT(playerPathLength)) goto LAB_0064d32e; if (starPathLength < playerPathLength) { this->_orbitAngleOffset = 0.5; return; } - if (playerPathLength + 9 < (int)starPathLength) { + if (playerPathLength + 9 < GHIDRA_INT(starPathLength)) { this->_orbitAngleOffset = 8.0; return; } @@ -26364,7 +26364,7 @@ void Entity_Familiar::ai_blood_clot(byte isPostMove) local_14 = (char *)0xffffffff; puStack_18 = &LAB_00af741d; local_1c = ExceptionList; - uVar4 = __security_cookie ^ (uint)(walkAnims + 9); + uVar4 = __security_cookie ^ GHIDRA_UINT((walkAnims + 9)); iVar10 = this->_state; walkAnims[0] = "WalkLeft"; walkAnims[1] = "WalkUp"; @@ -26390,7 +26390,7 @@ void Entity_Familiar::ai_blood_clot(byte isPostMove) if ((iVar10 == -1000) && ((ppcVar2 = walkAnims + 0xc, this->_player == (void *)0x0 || (bVar3 = TemporaryEffects::HasCollectibleEffect - ((TemporaryEffects *)((int)this->_player + 0x1508),0x2c9), + ((TemporaryEffects *)(GHIDRA_INT(this->_player) + 0x1508),0x2c9), ppcVar2 = (char **)puStack_20, bVar3 == 0)))) { puStack_20 = (undefined1 *)ppcVar2; this->_state = 0; @@ -26405,7 +26405,7 @@ void Entity_Familiar::ai_blood_clot(byte isPostMove) { fVar11 = 4.2039e-45; } - this->_entityGridCollisionClass = (int)fVar11; + this->_entityGridCollisionClass = GHIDRA_INT(fVar11); local_38 = (Entity *)player->_movespeed; local_4c = 1.0; local_50 = fVar11; @@ -26424,7 +26424,7 @@ void Entity_Familiar::ai_blood_clot(byte isPostMove) } } bVar3 = input_is_action_pressed - (0xb,(int)this->_player[5]._color._colorize[0],this->_player,(int)player); + (0xb,GHIDRA_INT(this->_player[5]._color._colorize[0]),this->_player,GHIDRA_INT(player)); if (bVar3 == 0) { pEVar6 = local_3c; } @@ -26462,12 +26462,12 @@ void Entity_Familiar::ai_blood_clot(byte isPostMove) } this->_moveDirection = iVar10; LAB_0064eea4: - uVar4 = (uint)this->_flags; - local_60._8_4_ = local_44; + uVar4 = GHIDRA_UINT(this->_flags); + (*(undefined4 *)((char *)&(local_60) + 0x8)) = local_44; local_54 = (float)local_3c; if ((((float)local_40 != 0.0) || (local_68 != 0.0)) && (((uVar4 & 0x8000) == 0 || (local_50 != 7.00649e-45)))) { - local_80._size = (int)(this->_velocity).y; + local_80._size = GHIDRA_INT((this->_velocity).y); local_8c.y = (this->_velocity).x; local_6c = local_68 * (float)local_80._size + (float)local_40 * local_8c.y; local_84 = (float)local_40 * local_6c; @@ -26475,16 +26475,16 @@ LAB_0064eea4: fVar11 = sqrtf(0.8); (this->_velocity).y = ((float)local_80._size - local_6c) * fVar11 + local_6c; (this->_velocity).x = (local_8c.y - local_84) * fVar11 + local_84; - uVar4 = (uint)this->_flags; + uVar4 = GHIDRA_UINT(this->_flags); } local_6c = 0.0; local_80._size = - (int)((local_68 * (this->_velocity).y + (float)local_40 * (this->_velocity).x) * -0.2); + GHIDRA_INT(((local_68 * (this->_velocity).y + (float)local_40 * (this->_velocity).x) * -0.2)); piVar9 = &local_80._size; if ((float)local_80._size <= 0.0) { piVar9 = (int *)&local_6c; } - local_80._size = (int)(((float)*piVar9 / (float)local_38 + 3.0) * 0.4); + local_80._size = GHIDRA_INT((((float)*piVar9 / (float)local_38 + 3.0) * 0.4)); fVar11 = sqrtf(0.775); fVar13 = ((float)local_80._size * 0.25 - (float)local_80._size) * 0.0 + (float)local_80._size; fVar12 = local_68 * 0.5 * fVar13 + (this->_velocity).y; @@ -26520,7 +26520,7 @@ LAB_0064eea4: local_40 = (Entity *)0xb1d4d0; } fVar13 = 24.0; - uVar5 = -(uint)(this->_subtype != 0) & this->_subtype; + uVar5 = -GHIDRA_UINT((this->_subtype != 0)) & this->_subtype; uVar4 = 7; if (uVar5 < 7) { uVar4 = uVar5; @@ -26530,7 +26530,7 @@ LAB_0064eea4: if (8 < this->_headFrameDelay) { local_3c = (Entity *)((float)local_3c + 24.0); } - local_80._size = (int)fVar14; + local_80._size = GHIDRA_INT(fVar14); bVar3 = CanPlayerFire(this); if (((bVar3 == 0) || (*(int *)((char *)this->_player + 0x162c) == -1)) || (this->_shootDirection == -1)) { @@ -26557,7 +26557,7 @@ LAB_0064eea4: ((ANM2 *)(&this->_sprite))->ANM2::Play((byte *)local_40,0); fVar11 = local_4c; if (((isMoving != 0) && - (local_80._size = (int)local_4c, (this->_sprite)._animState._animData != (void *)0x0)) && + (local_80._size = GHIDRA_INT(local_4c), (this->_sprite)._animState._animData != (void *)0x0)) && ((this->_sprite)._animState._isPlaying != 0)) { fVar11 = (this->_velocity).y; fVar12 = (this->_velocity).x; @@ -26591,7 +26591,7 @@ LAB_0064eea4: (this->_sprite)._playbackSpeed = fVar11; pVVar8 = &this->_pos; EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)local_60,pVVar8,8.0, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)local_60,pVVar8,8.0, 0x21); fVar11 = 0.0; fVar12 = 0.0; @@ -26600,7 +26600,7 @@ LAB_0064eea4: local_40 = (Entity *)0x0; if (local_54 != 0.0) { do { - nearbyEntity = *(void **)(local_60._4_4_ + (int)fVar11 * 4); + nearbyEntity = *(void **)((*(undefined4 *)((char *)&(local_60) + 0x4)) + GHIDRA_INT(fVar11) * 4); if ((nearbyEntity == (void *)0x0) || (nearbyPlayer = nearbyEntity, *(int *)((char *)nearbyEntity + 0x28) != 1)) { if (nearbyEntity == (void *)0x0) { @@ -26631,8 +26631,8 @@ LAB_0064f39d: fVar12 = fVar12 + (fVar14 * 0.5) / distSq; } } - fVar11 = (float)((int)fVar11 + 1); - } while ((uint)fVar11 < (uint)local_54); + fVar11 = (float)(GHIDRA_INT(fVar11) + 1); + } while (GHIDRA_UINT(fVar11) < GHIDRA_UINT(local_54)); local_40 = (Entity *)fVar13; local_3c = (Entity *)fVar12; } @@ -26648,7 +26648,7 @@ LAB_0064f39d: (this->_velocity).x = fVar11 * (float)pEVar15 + (this->_velocity).x; if (local_60[0] == '\0') { local_14 = (char *)0x2; - tracked_alloc(1,(void *)local_60._4_4_,0); + tracked_alloc(1,(*(undefined4 *)((char *)&((void *)local_60) + 0x4)),0); local_14 = (char *)0xffffffff; } } @@ -26661,7 +26661,7 @@ LAB_0064f39d: uVar4 = Random(); pEVar6 = ((Game *)(g_game))->Game::Spawn(1000,2,&this->_pos,&g_vectorZero,(Entity *)0x0,2,uVar4); (**(code **)(*(int *)pEVar6 + 0x3c)) - ((ColorMod *)((int)selfFamiliar + 0x1e4),0xffffffff,0xff,0,1); + ((ColorMod *)(GHIDRA_INT(selfFamiliar) + 0x1e4),0xffffffff,0xff,0,1); iVar10 = *(int *)pEVar6; (pEVar6->_sprite)._offset.x = 0.0; (pEVar6->_sprite)._offset.y = -6.0; @@ -26669,22 +26669,22 @@ LAB_0064f39d: (**(code **)(iVar10 + 0xc))(); *(int *)((char *)selfFamiliar + 0x188) = 0; *(int *)((char *)selfFamiliar + 0x184) = 0; - local_60._8_4_ = - (this->_pos).x - *(float *)((int)*(void **)((char *)selfFamiliar + 0x410) + 0x33c); - local_54 = (this->_pos).y - *(float *)((int)*(void **)((char *)selfFamiliar + 0x410) + 0x340); + (*(undefined4 *)((char *)&(local_60) + 0x8)) = + (this->_pos).x - *(float *)(GHIDRA_INT(*(void **)((char *)selfFamiliar + 0x410)) + 0x33c); + local_54 = (this->_pos).y - *(float *)(GHIDRA_INT(*(void **)((char *)selfFamiliar + 0x410)) + 0x340); pVVar8 = ((Vector *)((Vector *)(local_60 + 8)))->Vector::Resized(&local_8c,6.0); uVar4 = Random(); local_80._size = - (int)(((float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * - 2.3283064e-10 * 40.0 - 20.0) * 0.017453292); + GHIDRA_INT((((float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * + 2.3283064e-10 * 40.0 - 20.0) * 0.017453292)); local_6c = cos((float)local_80._size); fVar13 = sin((float)local_80._size); fVar11 = pVVar8->x; fVar12 = pVVar8->y; - ((Vector *)((int)selfFamiliar + 0x360))->x = fVar11 * local_6c - fVar12 * fVar13; - ((Vector *)((int)selfFamiliar + 0x360))->y = fVar12 * local_6c + fVar11 * fVar13; - ((std_vector *)((int)selfFamiliar + 0xdac))->_end = - ((std_vector *)((int)selfFamiliar + 0xdac))->_begin; + ((Vector *)(GHIDRA_INT(selfFamiliar) + 0x360))->x = fVar11 * local_6c - fVar12 * fVar13; + ((Vector *)(GHIDRA_INT(selfFamiliar) + 0x360))->y = fVar12 * local_6c + fVar11 * fVar13; + ((std_vector *)(GHIDRA_INT(selfFamiliar) + 0xdac))->_end = + ((std_vector *)(GHIDRA_INT(selfFamiliar) + 0xdac))->_begin; this = (Entity_Familiar *)selfFamiliar; } if ((char)local_38 == '\0') { @@ -26766,16 +26766,16 @@ LAB_0064f39d: if (bVar3 != 0) { uVar5 = Random(); rngResult = Random(); - fVar11 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + fVar11 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 0.25 + 0.25; local_54 = fVar11 * (this->_velocity).y; - local_60._8_4_ = fVar11 * (this->_velocity).x; + (*(undefined4 *)((char *)&(local_60) + 0x8)) = fVar11 * (this->_velocity).x; pEVar6 = ((Game *)(g_game))->Game::Spawn(1000,0x6f,&this->_pos,(Vector *)(local_60 + 8),(Entity *)0x0,0,uVar5); pEVar6->SetColor(&this->_splatColor,0xffffffff,0xff,0,1,uVar4); local_44 = (Entity *)g_vectorOne.x; local_68 = g_vectorOne.y; uVar4 = Random(); - fVar11 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + fVar11 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 0.3 + 0.3; (pEVar6->_sprite)._scale.y = fVar11 * local_68; (pEVar6->_sprite)._scale.x = fVar11 * (float)local_44; @@ -26783,23 +26783,23 @@ LAB_0064f39d: (pEVar6->_posOffset).x = (this->_posOffset).x + 0.0; (pEVar6->_posOffset).y = fVar11 - 8.0; } - EntityList::QueryRadius((EntityList *)((int)g_game->_room + 0x1218),&local_80,&this->_pos,20.0,8); + EntityList::QueryRadius((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&local_80,&this->_pos,20.0,8); local_14 = (char *)0x0; local_38 = (Entity *)0x0; if ((undefined1 *)local_80._size != (undefined1 *)0x0) { do { pEVar6 = local_38; bVar3 = Entity::IsVulnerableEnemy - (*(Entity **)((char *)local_80._data + (int)local_38 * 4),(Entity *)0x0); + (*(Entity **)((char *)local_80._data + GHIDRA_INT(local_38) * 4),(Entity *)0x0); if ((bVar3 != 0) && - (pEVar15 = *(Entity **)((char *)local_80._data + (int)pEVar6 * 4), + (pEVar15 = *(Entity **)((char *)local_80._data + GHIDRA_INT(pEVar6) * 4), (pEVar15->_flags & 0x20000000) == 0)) { - local_44 = (Entity *)((int)this + 0xdac); + local_44 = (Entity *)(GHIDRA_INT(this) + 0xdac); bVar3 = ((EntityList *)((EntityList *)local_44))->EntityList::HitListContains(pEVar15); if (bVar3 == 0) { - uVar4 = ((Entity *)(*(Entity **)((char *)local_80._data + (int)pEVar6 * 4)))->Entity::GetHitListIndex(); + uVar4 = ((Entity *)(*(Entity **)((char *)local_80._data + GHIDRA_INT(pEVar6) * 4)))->Entity::GetHitListIndex(); sorted_vector_insert_unique(local_44,uVar4); - takeDamageFn = *(code **)(**(int **)((char *)local_80._data + (int)pEVar6 * 4) + 0x20); + takeDamageFn = *(code **)(**(int **)((char *)local_80._data + GHIDRA_INT(pEVar6) * 4) + 0x20); ((EntityRef *)(&sourceRef))->EntityRef::constructor((Entity *)selfFamiliar); (*takeDamageFn)(*(float *)(*(int *)((char *)selfFamiliar + 0x410) + 0x157c) * 3.0,0,0, &sourceRef,0x1e); @@ -26808,7 +26808,7 @@ LAB_0064f39d: } } local_38 = (Entity *)&(*(undefined1 *)((char *)(pEVar6) + 0x1)); - } while (local_38 < (uint)local_80._size); + } while (local_38 < GHIDRA_UINT(local_80._size)); } iVar10 = *(int *)((char *)this + 0xd88); *(int *)((char *)this + 0xd88) = iVar10 + 1; @@ -26846,7 +26846,7 @@ LAB_0064f39d: fVar11 = *(float *)((char *)this + 0x340) - local_50; local_3c = local_44; fVar11 = sqrtf(fVar11 * fVar11 + fVar12 * fVar12); - ppEVar1 = (Entity **)((int)this + 0xd88); + ppEVar1 = (Entity **)(GHIDRA_INT(this) + 0xd88); ppEVar7 = &local_44; if ((float)local_3c <= 10.0) { ppEVar7 = &local_38; @@ -26854,7 +26854,7 @@ LAB_0064f39d: if (fVar11 <= (float)*ppEVar7) { local_44 = (Entity *)0x59; ppEVar7 = &local_44; - if (0x58 < (int)*ppEVar1) { + if (0x58 < GHIDRA_INT(*ppEVar1)) { ppEVar7 = ppEVar1; } *ppEVar1 = *ppEVar7; @@ -26866,7 +26866,7 @@ LAB_0064f39d: if (bVar3 == 0) goto switchD_0064e588_default; local_38 = (Entity *)0xb9; seed_fart_sound_override((int *)&local_38); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_38,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_38),1.0,2,0,1.0,0.0); ((Entity_Player *)(*(Entity_Player **)((char *)this + 0x410)))->Entity_Player::AddHearts(1,1,0); this->Remove(); break; @@ -26878,24 +26878,24 @@ LAB_0064f39d: (bVar3 = ((Entity_Player *)(*(Entity_Player **)((char *)this + 0x410)))->Entity_Player::IsBlackHeart(uVar4), bVar3 != 0)) { EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)local_60,3, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)local_60,3, *(int *)((char *)this + 0x2c),-1,0,0); fVar11 = 0.0; if (local_54 != 0.0) { do { - iVar10 = *(int *)(local_60._4_4_ + (int)fVar11 * 4); + iVar10 = *(int *)((*(undefined4 *)((char *)&(local_60) + 0x4)) + GHIDRA_INT(fVar11) * 4); if (((iVar10 != 0) && (*(int *)(iVar10 + 0x28) == 3)) && ((*(int *)(iVar10 + 0x410) == *(int *)((char *)this + 0x410) && (*(int *)(iVar10 + 0x30) == 2)))) goto LAB_0064e7f1; - fVar11 = (float)((int)fVar11 + 1); - } while ((uint)fVar11 < (uint)local_54); + fVar11 = (float)(GHIDRA_INT(fVar11) + 1); + } while (GHIDRA_UINT(fVar11) < GHIDRA_UINT(local_54)); } ((EntityList_Query *)(local_60))->EntityList_Query::~EntityList_Query(); } manager = g_manager; local_38 = (Entity *)0x36; seed_fart_sound_override((int *)&local_38); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_38,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_38),1.0,2,0,1.0,0.0); ((Entity_Player *)(*(Entity_Player **)((char *)this + 0x410)))->Entity_Player::AddSoulHearts(1,0); this->Remove(); break; @@ -26907,31 +26907,31 @@ LAB_0064f39d: (bVar3 = ((Entity_Player *)(*(Entity_Player **)((char *)this + 0x410)))->Entity_Player::IsBlackHeart(uVar4), bVar3 == 0)) { EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)local_60,3, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)local_60,3, *(int *)((char *)this + 0x2c),-1,0,0); fVar11 = 0.0; if (local_54 != 0.0) { do { - iVar10 = *(int *)(local_60._4_4_ + (int)fVar11 * 4); + iVar10 = *(int *)((*(undefined4 *)((char *)&(local_60) + 0x4)) + GHIDRA_INT(fVar11) * 4); if ((((iVar10 != 0) && (*(int *)(iVar10 + 0x28) == 3)) && (*(int *)(iVar10 + 0x410) == *(int *)((char *)this + 0x410))) && (*(int *)(iVar10 + 0x30) == 1)) goto LAB_0064e7f1; - fVar11 = (float)((int)fVar11 + 1); - } while ((uint)fVar11 < (uint)local_54); + fVar11 = (float)(GHIDRA_INT(fVar11) + 1); + } while (GHIDRA_UINT(fVar11) < GHIDRA_UINT(local_54)); } ((EntityList_Query *)(local_60))->EntityList_Query::~EntityList_Query(); } manager = g_manager; local_38 = (Entity *)0x1d4; seed_fart_sound_override((int *)&local_38); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_38,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_38),1.0,2,0,1.0,0.0); ((Entity_Player *)(*(Entity_Player **)((char *)this + 0x410)))->Entity_Player::AddBlackHearts(1); this->Remove(); break; case 3: local_38 = (Entity *)0x10a; seed_fart_sound_override((int *)&local_38); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_38,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_38),1.0,2,0,1.0,0.0); ((Entity_Player *)(*(Entity_Player **)((char *)this + 0x410)))->Entity_Player::AddEternalHearts(1); this->Remove(); break; @@ -26941,7 +26941,7 @@ LAB_0064f39d: if (bVar3 == 0) goto switchD_0064e588_default; local_38 = (Entity *)0x1d1; seed_fart_sound_override((int *)&local_38); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_38,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_38),1.0,2,0,1.0,0.0); ((Entity_Player *)(*(Entity_Player **)((char *)this + 0x410)))->Entity_Player::AddGoldenHearts(1,0); this->Remove(); break; @@ -26951,7 +26951,7 @@ LAB_0064f39d: if (bVar3 == 0) goto switchD_0064e588_default; local_38 = (Entity *)0x1cd; seed_fart_sound_override((int *)&local_38); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_38,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_38),1.0,2,0,1.0,0.0); ((Entity_Player *)(*(Entity_Player **)((char *)this + 0x410)))->Entity_Player::AddBoneHearts(1); this->Remove(); break; @@ -26962,7 +26962,7 @@ LAB_0064f39d: if (isRottenHeartsPickable == '\0') goto switchD_0064e588_default; local_38 = (Entity *)0x1f1; seed_fart_sound_override((int *)&local_38); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_38,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_38),1.0,2,0,1.0,0.0); ((Entity_Player *)(*(Entity_Player **)((char *)this + 0x410)))->Entity_Player::AddRottenHearts(2,0); this->Remove(); break; @@ -26988,9 +26988,9 @@ switchD_0064e588_default: } if ((*(int *)((char *)this + 0x3c0) == 0) && (1 < *(int *)((char *)this + 0xd88))) { uVar4 = Random(); - local_38 = ((Game *)(g_game))->Game::Spawn(1000,0xa6,(Vector *)((int)this + 0x33c),&g_vectorZero, + local_38 = ((Game *)(g_game))->Game::Spawn(1000,0xa6,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero, (Entity *)this,0,uVar4); - uVar5 = -(uint)(*(int *)((char *)this + 0x30) != 0) & *(uint *)((char *)this + 0x30); + uVar5 = -GHIDRA_UINT((*(int *)((char *)this + 0x30) != 0)) & *(uint *)((char *)this + 0x30); uVar4 = 7; if (uVar5 < 7) { uVar4 = uVar5; @@ -27045,13 +27045,13 @@ switchD_0064e588_default: std::multiset::insert(&pEVar6->_parent); pEVar6->Update(); if (*(int *)((char *)this + 0x3c0) != 0) { - local_44 = (Entity *)((int)this + 0x3c0); + local_44 = (Entity *)(GHIDRA_INT(this) + 0x3c0); std::multiset::erase(&local_44); } *(undefined4 *)((char *)this + 0x3c0) = pEVar6; - std::multiset::insert((undefined4 *)((int)this + 0x3c0)); + std::multiset::insert((undefined4 *)(GHIDRA_INT(this) + 0x3c0)); } - if (local_80._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_80) + 0x0)) == '\0') { local_14 = (char *)0x1; tracked_alloc(1,local_80._data,0); } @@ -27112,7 +27112,7 @@ void Entity_Familiar::predict_player_movement() } isDropPressed = input_is_action_pressed - (0xb,(int)this->_player[5]._color._colorize[0],this->_player,(int)this_00); + (0xb,GHIDRA_INT(this->_player[5]._color._colorize[0]),this->_player,GHIDRA_INT(this_00)); if (isDropPressed != 0) { local_20 = g_vectorZero.x; local_1c = g_vectorZero.y; @@ -27130,7 +27130,7 @@ void Entity_Familiar::predict_player_movement() do { if (*(int *)((char *)chainFamiliar + 0x28) != 3) break; fVar1 = (this->_pos).x; - fVar3 = fVar1 - ((Vector *)((int)chainFamiliar + 0x33c))->x; + fVar3 = fVar1 - ((Vector *)(GHIDRA_INT(chainFamiliar) + 0x33c))->x; fVar2 = (this->_pos).y - *(float *)((char *)chainFamiliar + 0x340); if ((fVar3 != g_vectorZero.x) || (fVar2 != g_vectorZero.y)) { distanceSq = fVar2 * fVar2 + fVar3 * fVar3; @@ -27217,7 +27217,7 @@ byte Entity_Familiar::multidimensional_baby_copy_knife(Entity_Knife *knife, Enti *(float *)&(*(undefined1 *)((char *)(knife) + 0x514)) = knife->_knifeDistance; knife->_multidimensionalApplied = 1; rootParent = ((Entity_Knife *)(knife))->Entity_Knife::GetRootParent(); - rootParent[1]._spawnerVariant = (int)((float)rootParent[1]._spawnerVariant + 5.0); + rootParent[1]._spawnerVariant = GHIDRA_INT(((float)rootParent[1]._spawnerVariant + 5.0)); i = 0; do { if (i == 0) { @@ -27246,7 +27246,7 @@ byte Entity_Familiar::multidimensional_baby_copy_knife(Entity_Knife *knife, Enti (copyKnife->_pos).x = (local_14 * 0.0 - sinAngle * sideOffset) + (knife->_pos).x; (copyKnife->_pos).y = local_14 * sideOffset + sinAngle * 0.0 + knifeY; rngResult = Random(); - uintFixup = __uint_to_double_fixup[-((int)rngResult >> 0x1f)]; + uintFixup = __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]; local_14 = knife->_rotation * 0.017453292; local_18 = (EntityPtr *)cos(local_14); homingDirY = sin(local_14); @@ -27255,7 +27255,7 @@ byte Entity_Familiar::multidimensional_baby_copy_knife(Entity_Knife *knife, Enti direction.x = (float)local_18; Entity_Knife::InitHomingPath (copyKnife,direction,(Entity *)knife, - (float)((double)(int)rngResult + uintFixup) * 2.3283064e-10 * 50.0 - 25.0); + (float)((double)GHIDRA_INT(rngResult) + uintFixup) * 2.3283064e-10 * 50.0 - 25.0); } else { *(float *)&(*(undefined1 *)((char *)(copyKnife) + 0x504)) = knife->_knifeDistance; diff --git a/src/game/entity_knife.cpp b/src/game/entity_knife.cpp index c0771fc..bf077ba 100644 --- a/src/game/entity_knife.cpp +++ b/src/game/entity_knife.cpp @@ -32,13 +32,13 @@ BitSet128 * Entity_Knife::TearFlags(BitSet128 *outFlags) undefined4 uVar2; qword qVar3; - uVar1 = *(undefined4 *)((int)&(this->_tearFlags)._l + 4); + uVar1 = *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); qVar3 = (this->_tearFlags)._h; - uVar2 = *(undefined4 *)((int)&(this->_tearFlags)._h + 4); - *(int *)&outFlags->_l = (int)(this->_tearFlags)._l; - *(undefined4 *)((int)&outFlags->_l + 4) = uVar1; - *(int *)&outFlags->_h = (int)qVar3; - *(undefined4 *)((int)&outFlags->_h + 4) = uVar2; + uVar2 = *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); + *(int *)&outFlags->_l = GHIDRA_INT((this->_tearFlags)._l); + *(undefined4 *)(GHIDRA_INT(&outFlags->_l) + 4) = uVar1; + *(int *)&outFlags->_h = GHIDRA_INT(qVar3); + *(undefined4 *)(GHIDRA_INT(&outFlags->_h) + 4) = uVar2; return outFlags; } @@ -79,13 +79,13 @@ void Entity_Knife::Constructor() ((Entity *)((Entity *)this))->Entity::constructor(); *(undefined ***)this = IsaacRepentancePlus::Entity_Knife::vftable; *(undefined4 *)&(this->_tearFlags)._l = 0; - *(undefined4 *)((int)&(this->_tearFlags)._l + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) = 0; *(undefined4 *)&(this->_tearFlags)._h = 0; - *(undefined4 *)((int)&(this->_tearFlags)._h + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) = 0; *(undefined4 *)&(this->_usedTearFlags)._l = 0; - *(undefined4 *)((int)&(this->_usedTearFlags)._l + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_usedTearFlags)._l) + 4) = 0; *(undefined4 *)&(this->_usedTearFlags)._h = 0; - *(undefined4 *)((int)&(this->_usedTearFlags)._h + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_usedTearFlags)._h) + 4) = 0; (this->_anchorPosition).y = 0.0; (this->_anchorPosition).x = 0.0; (this->_initPosition).y = 0.0; @@ -128,7 +128,7 @@ void Entity_Knife::Init(int type, int variant, int subType, uint initSeed) local_8 = 0xffffffff; puStack_c = &LAB_00b0c8bf; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&anm2Path)[1]._size; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&anm2Path)[1]._size); ExceptionList = &local_10; if (DAT_00c72214 == (ANM2 *)0x0) { local_34 = operator_new(0x114); @@ -155,20 +155,20 @@ void Entity_Knife::Init(int type, int variant, int subType, uint initSeed) anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; DAT_00c72214 = local_34; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1a; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/DeadEyeTearEffect.anm2",0x1b); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/DeadEyeTearEffect.anm2",0x1b); local_8 = 1; ((ANM2 *)(DAT_00c72214))->ANM2::Load(&anm2Path,1); local_8 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar7 = anm2Path._capacity + 1; - ptr = (char *)anm2Path._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar7) { - ptr = *(char **)(anm2Path._buf._0_4_ + -4); + ptr = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar7 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)ptr))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(ptr)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -178,7 +178,7 @@ void Entity_Knife::Init(int type, int variant, int subType, uint initSeed) uVar7 = g_graphicsManager_flags; anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = anm2Path._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) & 0xffffff00; layer = ((ANM2 *)(DAT_00c72214))->ANM2::GetLayer((byte *)0x0); pAVar6 = DAT_00c72214; iVar5 = 1; @@ -203,7 +203,7 @@ void Entity_Knife::Init(int type, int variant, int subType, uint initSeed) isLess = bVar4 < *cmpName; if (bVar4 != *cmpName) { LAB_00960df0: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_00960df5; } if (bVar4 == 0) break; @@ -227,7 +227,7 @@ LAB_00960df5: LAB_00960e29: ((Entity *)((Entity *)this))->Entity::Init(type,variant,subType,initSeed); if (this->_config != (void *)0x0) { - ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)((int)this->_config + 0x74),1); + ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)(GHIDRA_INT(this->_config) + 0x74),1); local_34 = (ANM2 *)&(this->_sprite)._animDefaultName; if (0xf < (this->_sprite)._animDefaultName._capacity) { local_34 = *(ANM2 **)((std_string *)local_34)->_buf; @@ -245,7 +245,7 @@ LAB_00960e29: isLess = bVar4 < cmpChar; if (bVar4 != cmpChar) { LAB_00960ea0: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_00960ea5; } if (bVar4 == 0) break; @@ -274,9 +274,9 @@ LAB_00960eda: this->_displayRotation = 0.0; this->_knifeDepthOffset = 0.0; *(undefined4 *)&(this->_tearFlags)._l = 0; - *(undefined4 *)((int)&(this->_tearFlags)._l + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) = 0; *(undefined4 *)&(this->_tearFlags)._h = 0; - *(undefined4 *)((int)&(this->_tearFlags)._h + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) = 0; this->_rotationOffset = 0.0; this->_entityGridCollisionClass = 0; this->_knifeDistance = 0.0; @@ -301,7 +301,7 @@ LAB_00960eda: *(undefined2 *)&this->_isSwinging = 0; *(undefined2 *)&(*(undefined1 *)((char *)(this) + 0x4e8)) = 0; this->_isSpinAttack = 0; - dVar1 = __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]; + dVar1 = __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]; *(undefined1 **)&(*(undefined1 *)((char *)(this) + 0x504)) = &DAT_bf800000; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x4ec)) = 0; *(undefined2 *)&(*(undefined1 *)((char *)(this) + 0x4f0)) = 0; @@ -310,15 +310,15 @@ LAB_00960eda: *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x4f4)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x4f8)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x508)) = 0; - this->_pathOffset = (float)((double)(int)uVar7 + dVar1) * 2.3283064e-10 * 50.0 - 25.0; + this->_pathOffset = (float)((double)GHIDRA_INT(uVar7) + dVar1) * 2.3283064e-10 * 50.0 - 25.0; *(float *)&(*(undefined1 *)((char *)(this) + 0x50c)) = g_vectorZero.x; fVar3 = g_vectorZero.y; - *(uint *)&this->_flags = (uint)this->_flags | 0x4000000; + *(uint *)&this->_flags = GHIDRA_UINT(this->_flags) | 0x4000000; this->_isPrimaryClub = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x518)) = 0; - uVar2 = *(undefined4 *)((int)&this->_flags + 4); + uVar2 = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); *(float *)&(*(undefined1 *)((char *)(this) + 0x510)) = fVar3; - *(undefined4 *)((int)&this->_flags + 4) = uVar2; + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = uVar2; *(undefined1 **)&(*(undefined1 *)((char *)(this) + 0x514)) = &DAT_bf800000; (this->_hitList)._end = (this->_hitList)._begin; iVar5 = this->_variant; @@ -372,7 +372,7 @@ void Entity_Knife::ClearReferences() if ((parent != (EntityPtr)0x0) && (*(int *)((char *)parent + 0x28) == 2)) { if ((*(Entity_Knife **)((char *)parent + 0x49c) == this) && (*(Entity_Knife **)((char *)parent + 0x49c) != (Entity_Knife *)0x0)) { - erasedRef = (Entity_Knife *)((int)parent + 0x49c); + erasedRef = (Entity_Knife *)(GHIDRA_INT(parent) + 0x49c); std::multiset::erase(&erasedRef); *(undefined4 *)((char *)parent + 0x49c) = 0; } @@ -424,7 +424,7 @@ void * Entity_Knife::GetHitEntities() isUsingParentHitList = *(byte *)((char *)parent + 0x4e7); this = (Entity_Knife *)parent; } - return (void *)((int)this + 0x4d8); + return (void *)(GHIDRA_INT(this) + 0x4d8); } // 00961320 @@ -450,20 +450,20 @@ void Entity_Knife::InitHomingPath(Vector direction, Entity *source, float pathOf *(float *)&(*(undefined1 *)((char *)&((this->_homingLaser)) + 0x8)) = (this->_pos).y; *(float *)&(*(undefined1 *)((char *)&((this->_homingLaser)) + 0xc)) = direction.x * 200.0 + local_10.x; *(float *)&(*(undefined1 *)((char *)&((this->_homingLaser)) + 0x10)) = direction.y * 200.0 + local_10.y; - tearFlagsWord3 = *(uint *)((int)&(this->_tearFlags)._h + 4); - local_10.x = (float)(tearFlagsWord3 & g_tearFlagOrbit._h._4_4_); - tearFlagsWord2 = (uint)(this->_tearFlags)._h; - if ((!(((uint)(this->_tearFlags)._l & (uint)g_tearFlagOrbit._l) == 0 && - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagOrbit._l._4_4_) == 0)) || - (!((tearFlagsWord2 & (uint)g_tearFlagOrbit._h) == 0 && local_10.x == 0.0))) { + tearFlagsWord3 = *(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); + local_10.x = (float)(tearFlagsWord3 & (*(undefined4 *)((char *)&(g_tearFlagOrbit._h) + 0x4))); + tearFlagsWord2 = GHIDRA_UINT((this->_tearFlags)._h); + if ((!((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagOrbit._l)) == 0 && + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagOrbit._l) + 0x4))) == 0)) || + (!((tearFlagsWord2 & GHIDRA_UINT(g_tearFlagOrbit._h)) == 0 && local_10.x == 0.0))) { ((HomingLaser *)(&this->_homingLaser))->HomingLaser::build_curl_path(60.0); - tearFlagsWord2 = (uint)(this->_tearFlags)._h; - tearFlagsWord3 = *(uint *)((int)&(this->_tearFlags)._h + 4); + tearFlagsWord2 = GHIDRA_UINT((this->_tearFlags)._h); + tearFlagsWord3 = *(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); } - if ((((uint)(this->_tearFlags)._l & (uint)g_tearFlagHoming._l) == 0 && - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagHoming._l._4_4_) == 0) && - ((tearFlagsWord2 & (uint)g_tearFlagHoming._h) == 0 && - (tearFlagsWord3 & g_tearFlagHoming._h._4_4_) == 0)) { + if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagHoming._l)) == 0 && + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagHoming._l) + 0x4))) == 0) && + ((tearFlagsWord2 & GHIDRA_UINT(g_tearFlagHoming._h)) == 0 && + (tearFlagsWord3 & (*(undefined4 *)((char *)&(g_tearFlagHoming._h) + 0x4))) == 0)) { ((HomingLaser *)(&this->_homingLaser))->HomingLaser::build_bezier_path(0,source); return; } @@ -484,14 +484,14 @@ void Entity_Knife::copy_parent_state(Entity_Knife *source) (this->_posOffset).x = (source->_posOffset).x; (this->_posOffset).y = (source->_posOffset).y; (**(code **)(iVar1 + 0x3c))(&source->_color,0xffffffff,0xff,0,1); - tearFlagsLowHigh = *(undefined4 *)((int)&(source->_tearFlags)._l + 4); + tearFlagsLowHigh = *(undefined4 *)(GHIDRA_INT(&(source->_tearFlags)._l) + 4); tearFlagsHigh = (source->_tearFlags)._h; - tearFlagsHighHigh = *(undefined4 *)((int)&(source->_tearFlags)._h + 4); + tearFlagsHighHigh = *(undefined4 *)(GHIDRA_INT(&(source->_tearFlags)._h) + 4); iVar1 = *(int *)this; - *(int *)&(this->_tearFlags)._l = (int)(source->_tearFlags)._l; - *(undefined4 *)((int)&(this->_tearFlags)._l + 4) = tearFlagsLowHigh; - *(int *)&(this->_tearFlags)._h = (int)tearFlagsHigh; - *(undefined4 *)((int)&(this->_tearFlags)._h + 4) = tearFlagsHighHigh; + *(int *)&(this->_tearFlags)._l = GHIDRA_INT((source->_tearFlags)._l); + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) = tearFlagsLowHigh; + *(int *)&(this->_tearFlags)._h = GHIDRA_INT(tearFlagsHigh); + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) = tearFlagsHighHigh; (**(code **)(iVar1 + 0x40))(source->_collisionDamage); x = source->_rotationOffset; if (360.0 < ABS(x)) { @@ -537,7 +537,7 @@ undefined4 Entity_Knife::spawn_child_knife() rootParent = GetRootParent(this); local_24 = &DAT_00c5d2c8; local_20 = 0.0; - rootParent[1]._spawnerVariant = (int)((float)rootParent[1]._spawnerVariant + 2.0); + rootParent[1]._spawnerVariant = GHIDRA_INT(((float)rootParent[1]._spawnerVariant + 2.0)); do { rngResult = Random(); childKnife = (Entity_Knife *) @@ -556,23 +556,23 @@ undefined4 Entity_Knife::spawn_child_knife() angle = (float)((double)iVar2 + __uint_to_double_fixup[-(iVar2 >> 0x1f)]) * 20.0; if (this->_subtype == 1) { rngResult = Random(); - dVar1 = __uint_to_double_fixup[-((int)rngResult >> 0x1f)]; + dVar1 = __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]; angle = ((this->_rotation - 30.0) + angle) * 0.017453292; local_24 = (undefined *)cos(angle); local_20 = sin(angle); direction.y = local_20; direction.x = (float)local_24; InitHomingPath(childKnife,direction,(Entity *)this, - (float)((double)(int)rngResult + dVar1) * 2.3283064e-10 * 50.0 - 25.0); + (float)((double)GHIDRA_INT(rngResult) + dVar1) * 2.3283064e-10 * 50.0 - 25.0); } else { *(float *)&(*(undefined1 *)((char *)(childKnife) + 0x504)) = this->_knifeDistance; *(float *)&(*(undefined1 *)((char *)(childKnife) + 0x508)) = angle - 30.0; } childKnife->Update(); - local_20 = (float)((int)local_20 + 0x2c); + local_20 = (float)(GHIDRA_INT(local_20) + 0x2c); local_24 = local_24 + 0x2c; - } while ((uint)local_20 < 0xb0); + } while (GHIDRA_UINT(local_20) < 0xb0); if (this->_subtype == 1) { this->Remove(); } @@ -685,7 +685,7 @@ void Entity_Knife::Update() ehState = -1; puStack_18 = &LAB_00b0c913; savedExceptionList = ExceptionList; - uVar10 = __security_cookie ^ (uint)(local_40 + 0xc); + uVar10 = __security_cookie ^ GHIDRA_UINT((local_40 + 0xc)); ExceptionList = &savedExceptionList; if (this->_isInterpolating == 0) { this->_friction = this->_friction * 0.7; @@ -764,16 +764,16 @@ LAB_009652a6: tearFlagsTmp = &this->_tearFlags; local_140.y = (float)tearFlagsTmp; pBVar11 = BitSet128::operator_and(&local_1d0,tearFlagsTmp,&g_tearFlagLudovico); - if (((int)pBVar11->_l == 0 && *(int *)((int)&pBVar11->_l + 4) == 0) && - ((int)pBVar11->_h == 0 && *(int *)((int)&pBVar11->_h + 4) == 0)) { + if ((GHIDRA_INT(pBVar11->_l) == 0 && *(int *)(GHIDRA_INT(&pBVar11->_l) + 4) == 0) && + (GHIDRA_INT(pBVar11->_h) == 0 && *(int *)(GHIDRA_INT(&pBVar11->_h) + 4) == 0)) { EVar12 = (EntityPtr)GetRootParent(this); fadeFrames = this->_variant; local_15c = *(EntityPtr *)((char *)EVar12 + 0x3bc); - local_170._12_4_ = EVar12; + (*(undefined4 *)((char *)&(local_170) + 0xc)) = EVar12; if ((fadeFrames != 9) && ((fadeFrames != 8 && (fadeFrames != 4)))) { if (local_15c == (EntityPtr)0x0) goto LAB_00961f38; if (*(int *)((char *)local_15c + 0x28) == 1) { - bVar8 = ((Entity_Player *)((Entity_Player *)local_15c))->Entity_Player::HasWeaponType((int)local_134.y); + bVar8 = ((Entity_Player *)((Entity_Player *)local_15c))->Entity_Player::HasWeaponType(GHIDRA_INT(local_134.y)); } else { if ((*(int *)((char *)local_15c + 0x28) != 3) || @@ -784,7 +784,7 @@ LAB_009652a6: RTTI_Type_Descriptor,0,0), local_134.y == 5.60519e-45)) && (*(int *)(fadeFrames + 0x4c) != 0)))) goto LAB_00961e18; - bVar8 = *(byte *)(*(int *)((char *)local_15c + 0x410) + 0x13f0 + (int)local_134.y); + bVar8 = *(byte *)(*(int *)((char *)local_15c + 0x410) + 0x13f0 + GHIDRA_INT(local_134.y)); } if (bVar8 == 0) goto LAB_00961f38; } @@ -793,9 +793,9 @@ LAB_00961e18: if (((isSwingWeapon != '\0') || (isSword != '\0')) && (g_game->_frameCount - this->_spawnFrame < 2)) { local_120.y = (float)&this->_sprite; - local_108.y = (float)((ANM2 *)((ANM2 *)((int)EVar12 + 0x78)))->ANM2::GetAnimation((std_string *)local_40); + local_108.y = (float)((ANM2 *)((ANM2 *)(GHIDRA_INT(EVar12) + 0x78)))->ANM2::GetAnimation((std_string *)local_40); ehState = 0; - if (0xf < (uint)*(float *)((char *)local_108.y + 0x14)) { + if (0xf < GHIDRA_UINT(*(float *)((char *)local_108.y + 0x14))) { local_108.y = *(float *)local_108.y; } pfVar13 = *(float **)((char *)local_120.y + 0x34); @@ -805,11 +805,11 @@ LAB_00961f64: if (bVar8 != 0) { ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::Rewind(); (this->_sprite)._animState._isPlaying = 1; - EVar12 = (EntityPtr)local_170._12_4_; + EVar12 = (*(undefined4 *)((char *)&((EntityPtr)local_170) + 0xc)); } } else { - if (0xf < (uint)pfVar13[5]) { + if (0xf < GHIDRA_UINT(pfVar13[5])) { pfVar13 = (float *)*pfVar13; } EVar17 = (EntityPtr)local_108.y; @@ -818,39 +818,39 @@ LAB_00961f64: bVar19 = bVar8 < *(byte *)EVar17; if (bVar8 != *(byte *)EVar17) { LAB_00961f44: - uVar10 = -(uint)bVar19 | 1; + uVar10 = -GHIDRA_UINT(bVar19) | 1; goto LAB_00961f49; } if (bVar8 == 0) break; bVar8 = *(byte *)((char *)pfVar13 + 1); bVar19 = bVar8 < *(byte *)((char *)EVar17 + 1); if (bVar8 != *(byte *)((char *)EVar17 + 1)) goto LAB_00961f44; - pfVar13 = (float *)((int)pfVar13 + 2); - EVar17 = (EntityPtr)((int)EVar17 + 2); + pfVar13 = (float *)(GHIDRA_INT(pfVar13) + 2); + EVar17 = (EntityPtr)(GHIDRA_INT(EVar17) + 2); } while (bVar8 != 0); uVar10 = 0; LAB_00961f49: if ((uVar10 != 0) || - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) != '\0' && + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) != '\0' && ((this->_sprite)._animState._isPlaying == 0)))) goto LAB_00961f64; } ehState = -1; - if (0xf < local_38._h._4_4_) { - uVar10 = local_38._h._4_4_ + 1; + if (0xf < (*(undefined4 *)((char *)&(local_38._h) + 0x4))) { + uVar10 = (*(undefined4 *)((char *)&(local_38._h) + 0x4)) + 1; pvVar18 = local_40[0]; if (0xfff < uVar10) { - pvVar18 = *(void **)((int)local_40[0] + -4); - uVar10 = local_38._h._4_4_ + 0x24; - if (0x1f < (uint)((int)local_40[0] + (-4 - (int)pvVar18))) { + pvVar18 = *(void **)(GHIDRA_INT(local_40[0]) + -4); + uVar10 = (*(undefined4 *)((char *)&(local_38._h) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_40[0]) + (-4 - GHIDRA_INT(pvVar18))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar18,uVar10); } - local_38._h._0_4_ = 0; - local_38._h._4_4_ = 0xf; - local_40[0] = (void *)((uint)local_40[0] & 0xffffff00); + (*(undefined4 *)((char *)&(local_38._h) + 0x0)) = 0; + (*(undefined4 *)((char *)&(local_38._h) + 0x4)) = 0xf; + local_40[0] = (void *)(GHIDRA_UINT(local_40[0]) & 0xffffff00); } this->_rotation = *(float *)((char *)EVar12 + 0x438); this->_displayRotation = @@ -880,38 +880,38 @@ LAB_00961f49: bVar8 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x400000); if ((bVar8 != 0) || (this->_isSpinAttack != 0)) { local_120.y = this->_displayRotation * 0.017453292; - colorOffsetXY = *(undefined4 *)((int)&this->_flags + 4); - *(uint *)&this->_flags = (uint)this->_flags & 0xffbfffff; - *(undefined4 *)((int)&this->_flags + 4) = colorOffsetXY; + colorOffsetXY = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); + *(uint *)&this->_flags = GHIDRA_UINT(this->_flags) & 0xffbfffff; + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = colorOffsetXY; local_108.y = sin(local_120.y); fVar20 = cos(local_120.y); ownerPlayer = player; local_120.y = fVar20 * 10.0; local_108.y = local_108.y * 10.0; - local_100._8_4_ = local_120.y; + (*(undefined4 *)((char *)&(local_100) + 0x8)) = local_120.y; local_f4[0] = (EntityPtr)local_108.y; if (player != (Entity_Player *)0x0) { Entity_Player::GetTearMovementInheritance (player,&local_e8,(Vector *)(local_100 + 8),0); - local_100._8_4_ = (local_120.y + *extraout_EAX) * ownerPlayer->_shotspeed; + (*(undefined4 *)((char *)&(local_100) + 0x8)) = (local_120.y + *extraout_EAX) * ownerPlayer->_shotspeed; local_f4[0] = (EntityPtr)((local_108.y + extraout_EAX[1]) * ownerPlayer->_shotspeed) ; } if (this->_isSpinAttack != 0) { - local_100._8_4_ = (float)local_100._8_4_ + (float)local_100._8_4_; + (*(undefined4 *)((char *)&(local_100) + 0x8)) = (*(undefined4 *)((char *)&((float)local_100) + 0x8)) + (*(undefined4 *)((char *)&((float)local_100) + 0x8)); local_f4[0] = (EntityPtr)((float)local_f4[0] + (float)local_f4[0]); } fadeFrames = this->_variant; uVar10 = Random(); spawnedTear = (Entity_Tear *) - ((Game *)(g_game))->Game::Spawn(2,(uint)(fadeFrames == 0xb) * 2 + 0x2f,&this->_pos, + ((Game *)(g_game))->Game::Spawn(2,GHIDRA_UINT((fadeFrames == 0xb)) * 2 + 0x2f,&this->_pos, (Vector *)(local_100 + 8),(Entity *)this->_spawnerEntity,0, uVar10); if (player != (Entity_Player *)0x0) { spawnedTear->_fallingAccel = player->_tearfallaccel; uVar10 = Random(); spawnedTear->_fallingSpeed = - (float)((double)(int)uVar10 + __uint_to_double_fixup[-((int)uVar10 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar10) + __uint_to_double_fixup[-(GHIDRA_INT(uVar10) >> 0x1f)]) * 2.3283064e-10 * 0.2 - player->_tearfallspeed; ((Entity_Projectile *)((Entity_Projectile *)spawnedTear))->Entity_Projectile::SetHeight(player->_tearheight); } @@ -927,10 +927,10 @@ LAB_00961f49: tearFlagsTmp = ((BitSet128 *)(&g_tearFlagFetus))->BitSet128::__bnot((BitSet128 *)&local_158); tearFlagsTmp = BitSet128::operator_and ((BitSet128 *)local_100,&this->_tearFlags,tearFlagsTmp); - flags._h._1_1_ = (char)(tearFlagsTmp->_h >> 8); - flags._0_9_ = *(unkbyte9 *)tearFlagsTmp; - flags._h._2_2_ = (short)(tearFlagsTmp->_h >> 0x10); - flags._h._4_4_ = *(undefined4 *)((int)&tearFlagsTmp->_h + 4); + (*(undefined1 *)((char *)&(flags._h) + 0x1)) = (char)(tearFlagsTmp->_h >> 8); + (*(undefined1 *)((char *)&(flags) + 0x0)) = *(unkbyte9 *)tearFlagsTmp; + (*(undefined2 *)((char *)&(flags._h) + 0x2)) = (short)(tearFlagsTmp->_h >> 0x10); + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = *(undefined4 *)(GHIDRA_INT(&tearFlagsTmp->_h) + 4); ((Entity_Tear *)(spawnedTear))->Entity_Tear::SetTearFlags(flags); pcVar2 = *(code **)(*(int *)spawnedTear + 0x3c); spawnedTear->_isFireSoundMuted = 1; @@ -953,7 +953,7 @@ LAB_00961f49: spawnedTear->_fScale = fVar20; ((Entity_Tear *)(spawnedTear))->Entity_Tear::ResetSpriteScale(); (**(code **)(*(int *)spawnedTear + 0xc))(); - EVar12 = (EntityPtr)local_170._12_4_; + EVar12 = (*(undefined4 *)((char *)&((EntityPtr)local_170) + 0xc)); if ((this->_isSpinAttack != 0) && (spinsLeft = *(short *)&(*(undefined1 *)((char *)(this) + 0x4f0)), 1 < spinsLeft)) { if (*(int **)&(*(undefined1 *)((char *)(this) + 0x4f8)) != (int *)0x0) { @@ -976,7 +976,7 @@ LAB_00961f49: if (*(char *)((char *)EVar12 + 0x466) != '\0') { local_108.y = this->_displayRotation * 0.017453292; local_120.y = sin(local_108.y); - local_100._8_4_ = cos(local_108.y); + (*(undefined4 *)((char *)&(local_100) + 0x8)) = cos(local_108.y); bVar8 = 0; local_f4[0] = (EntityPtr)local_120.y; fadeFrames = vector_to_direction((Vector *)(local_100 + 8)); @@ -1033,14 +1033,14 @@ LAB_00961f49: fVar20 = cos((float)local_f4[0]); (this->_pos).x = local_e8.y + fVar20 * local_12c; (this->_pos).y = local_108.y + local_120.y * local_12c; - fVar20 = ((Vector *)((int)EVar12 + 0x33c))->x; + fVar20 = ((Vector *)(GHIDRA_INT(EVar12) + 0x33c))->x; (this->_anchorPosition).y = *(float *)((char *)EVar12 + 0x340); (this->_anchorPosition).x = fVar20; local_120.y = (this->_pos).x; local_12c = (this->_pos).y; this->_basePosOffsetY = (this->_posOffset).y; local_ec = atan2f((this->_pos).y - *(float *)((char *)EVar12 + 0x340), - local_120.y - ((Vector *)((int)EVar12 + 0x33c))->x); + local_120.y - ((Vector *)(GHIDRA_INT(EVar12) + 0x33c))->x); local_ec = local_ec * 57.295776; } else { @@ -1126,7 +1126,7 @@ LAB_00962723: fadeFrames = ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::GetAnimationLength(); fadeFrames = Isaac::Random(fadeFrames); ((Sprite *)((Sprite *)&this->_sprite))->Sprite::SetFrame_1(fadeFrames); - EVar12 = (EntityPtr)local_170._12_4_; + EVar12 = (*(undefined4 *)((char *)&((EntityPtr)local_170) + 0xc)); } ((std::vector *)(&this->_hitList))->std::vector::clear(0); } @@ -1140,7 +1140,7 @@ LAB_00962723: pVVar14 = &this->_anchorPosition; if (bVar8 != 0) { fVar21 = *(float *)((char *)local_15c + 0x340); - pVVar14->x = ((Vector *)((int)local_15c + 0x33c))->x; + pVVar14->x = ((Vector *)(GHIDRA_INT(local_15c) + 0x33c))->x; (this->_anchorPosition).y = fVar21; } if (EVar12 == (EntityPtr)this) { @@ -1168,7 +1168,7 @@ LAB_00962723: fVar20 = 1.0 - fVar22 * fVar23 * 0.8; local_e0 = (*(float *)((char *)local_15c + 0x340) - (this->_anchorPosition).y) * fVar20 + (this->_anchorPosition).y; - local_108.y = fVar20 * (((Vector *)((int)local_15c + 0x33c))->x - pVVar14->x) + pVVar14->x + local_108.y = fVar20 * (((Vector *)(GHIDRA_INT(local_15c) + 0x33c))->x - pVVar14->x) + pVVar14->x ; (this->_anchorPosition).y = local_e0; pVVar14->x = local_108.y; @@ -1202,16 +1202,16 @@ LAB_00962723: } fVar20 = pVVar14->y; local_f4[0] = (EntityPtr)(local_120.y / fVar20); - local_100._8_4_ = local_e8.y / fVar20; - sizeMulti.y._0_1_ = local_f4[0]._0_1_; - sizeMulti.x = (float)local_100._8_4_; - sizeMulti.y._1_1_ = local_f4[0]._1_1_; - sizeMulti.y._2_2_ = local_f4[0]._2_2_; + (*(undefined4 *)((char *)&(local_100) + 0x8)) = local_e8.y / fVar20; + (*(undefined1 *)((char *)&(sizeMulti.y) + 0x0)) = (*(undefined1 *)((char *)&(local_f4[0]) + 0x0)); + sizeMulti.x = (*(undefined4 *)((char *)&((float)local_100) + 0x8)); + (*(undefined1 *)((char *)&(sizeMulti.y) + 0x1)) = (*(undefined1 *)((char *)&(local_f4[0]) + 0x1)); + (*(undefined2 *)((char *)&(sizeMulti.y) + 0x2)) = (*(undefined2 *)((char *)&(local_f4[0]) + 0x2)); ((Entity *)((Entity *)this))->Entity::SetSize(fVar20 * *(float *)((char *)this->_config + 0x38),sizeMulti, -1); } fVar20 = atan2f((this->_pos).y - *(float *)((char *)local_15c + 0x340), - (this->_pos).x - ((Vector *)((int)local_15c + 0x33c))->x); + (this->_pos).x - ((Vector *)(GHIDRA_INT(local_15c) + 0x33c))->x); fVar20 = fVar20 * 57.295776; local_ec = fVar20; local_e0 = fVar20; @@ -1242,8 +1242,8 @@ LAB_00961f38: tearFlagsTmp = BitSet128::operator_and ((BitSet128 *)&local_158,&this->_tearFlags,&g_tearFlagOrbit ); - if (((int)tearFlagsTmp->_l == 0 && *(int *)((int)&tearFlagsTmp->_l + 4) == 0) && - ((int)tearFlagsTmp->_h == 0 && *(int *)((int)&tearFlagsTmp->_h + 4) == 0)) { + if ((GHIDRA_INT(tearFlagsTmp->_l) == 0 && *(int *)(GHIDRA_INT(&tearFlagsTmp->_l) + 4) == 0) && + (GHIDRA_INT(tearFlagsTmp->_h) == 0 && *(int *)(GHIDRA_INT(&tearFlagsTmp->_h) + 4) == 0)) { local_120.y = this->_displayRotation * 0.017453292; local_134.y = sin(local_120.y); } @@ -1281,7 +1281,7 @@ LAB_00961f38: if (((EntityPtr)local_108.y == (EntityPtr)0x0) || (*(float *)((char *)local_108.y + 0x28) != 1.12104e-44)) break; } - EVar12 = (EntityPtr)local_170._12_4_; + EVar12 = (*(undefined4 *)((char *)&((EntityPtr)local_170) + 0xc)); } } fVar20 = *(float *)&(*(undefined1 *)((char *)(this) + 0x514)); @@ -1454,34 +1454,34 @@ LAB_0096357e: local_108.y = (float)EVar12; if (EVar12 != (EntityPtr)0x0) { fadeFrames = *(int *)EVar12; - ((Vector *)((int)EVar12 + 0x34c))->x = 0.0; + ((Vector *)(GHIDRA_INT(EVar12) + 0x34c))->x = 0.0; *(float *)((char *)EVar12 + 0x350) = -10.0; (**(code **)(fadeFrames + 0x40))(this->_collisionDamage * 0.4); (**(code **)(*(int *)EVar12 + 0x3c))(&(this->_sprite)._color,0xffffffff,0xff,0,1); HomingLaser::operator_assign - ((HomingLaser *)((int)EVar12 + 0x468),&this->_homingLaser); + ((HomingLaser *)(GHIDRA_INT(EVar12) + 0x468),&this->_homingLaser); ((Entity *)((Entity *)EVar12))->Entity::SetParent((Entity *)this); - colorOffsetXY = *(undefined4 *)((int)&(this->_tearFlags)._l + 4); + colorOffsetXY = *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); pvVar18 = *(void **)&(this->_tearFlags)._h; - pvVar4 = *(void **)((int)&(this->_tearFlags)._h + 4); - *(int *)((char *)local_108.y + 0x410) = (int)(this->_tearFlags)._l; + pvVar4 = *(void **)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); + *(int *)((char *)local_108.y + 0x410) = GHIDRA_INT((this->_tearFlags)._l); *(undefined4 *)((char *)local_108.y + 0x414) = colorOffsetXY; - ((std_vector *)((int)local_108.y + 0x418))->_begin = pvVar18; + ((std_vector *)(GHIDRA_INT(local_108.y) + 0x418))->_begin = pvVar18; *(void **)((char *)local_108.y + 0x41c) = pvVar4; uVar10 = Random(); - local_e0 = (float)((double)(int)uVar10 + - __uint_to_double_fixup[-((int)uVar10 >> 0x1f)]) * 2.3283064e-10 + local_e0 = (float)((double)GHIDRA_INT(uVar10) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar10) >> 0x1f)]) * 2.3283064e-10 * 50.0 - 25.0; local_f4[0] = (EntityPtr)(this->_rotation * 0.017453292); local_e8.y = sin((float)local_f4[0]); - local_100._8_4_ = cos((float)local_f4[0]); + (*(undefined4 *)((char *)&(local_100) + 0x8)) = cos((float)local_f4[0]); local_f4[0] = (EntityPtr)local_e8.y; direction.y = local_e8.y; - direction.x = (float)local_100._8_4_; + direction.x = (*(undefined4 *)((char *)&((float)local_100) + 0x8)); InitHomingPath((Entity_Knife *)local_108.y,direction,(Entity *)this,local_e0); - ((Vector *)((int)local_108.y + 0xe4))->x = (this->_sprite)._scale.x; + ((Vector *)(GHIDRA_INT(local_108.y) + 0xe4))->x = (this->_sprite)._scale.x; *(float *)((char *)local_108.y + 0xe8) = (this->_sprite)._scale.y; - (**(code **)((int)*(float *)local_108.y + 0xc))(); + (**(code **)(GHIDRA_INT(*(float *)local_108.y) + 0xc))(); } } } @@ -1508,7 +1508,7 @@ LAB_00963b53: } } fVar20 = atan2f(local_12c - *(float *)((char *)local_15c + 0x340), - local_120.y - ((Vector *)((int)local_15c + 0x33c))->x); + local_120.y - ((Vector *)(GHIDRA_INT(local_15c) + 0x33c))->x); fVar20 = normalize_angle_degrees(fVar20 * 57.295776 - 90.0); (this->_sprite)._rotation = fVar20; local_e8.y = (float)((ANM2 *)(&this->_sprite))->ANM2::GetLayerFrame(0); @@ -1558,11 +1558,11 @@ LAB_00963c34: (**(code **)(fadeFrames + 0xc))(); } } - if ((((((Entity_Knife *)local_170._12_4_ != this) || (this->_variant == 8)) || + if ((((((*(undefined4 *)((char *)&((Entity_Knife *)local_170) + 0xc)) != this) || (this->_variant == 8)) || (this->_variant == 4)) && - ((*(byte *)(local_170._12_4_ + 0x464) == 0 && - (*(char *)(local_170._12_4_ + 0x466) == '\0')))) && - (*(byte *)(local_170._12_4_ + 0x465) == 0)) { + ((*(byte *)((*(undefined4 *)((char *)&(local_170) + 0xc)) + 0x464) == 0 && + (*(char *)((*(undefined4 *)((char *)&(local_170) + 0xc)) + 0x466) == '\0')))) && + (*(byte *)((*(undefined4 *)((char *)&(local_170) + 0xc)) + 0x465) == 0)) { this->Remove(); } } @@ -1570,7 +1570,7 @@ LAB_00963c34: ownerPlayer = (Entity_Player *) __RTDynamicCast(this->_parent,0, &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor,0xdc,0); - bVar8 = ((Entity_Player *)(ownerPlayer))->Entity_Player::HasWeaponType((int)local_134.y); + bVar8 = ((Entity_Player *)(ownerPlayer))->Entity_Player::HasWeaponType(GHIDRA_INT(local_134.y)); if (bVar8 == 0) { this->Remove(); } @@ -1603,16 +1603,16 @@ LAB_00963c34: local_120.y = 22500.0; local_108.y = (float)EVar12; EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)&local_158, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)&local_158, &this->_pos,150.0,8); ehState = 1; local_e8.y = 0.0; if ((EntityPtr)local_158._shift3 != (EntityPtr)0x0) { do { - EVar12 = *(EntityPtr *)(local_158._shift1 + (int)local_e8.y * 4); + EVar12 = *(EntityPtr *)(local_158._shift1 + GHIDRA_INT(local_e8.y) * 4); bVar8 = ((Entity *)((Entity *)EVar12))->Entity::IsVulnerableEnemy((Entity *)0x0); if (bVar8 != 0) { - fVar20 = (this->_pos).x - ((Vector *)((int)EVar12 + 0x33c))->x; + fVar20 = (this->_pos).x - ((Vector *)(GHIDRA_INT(EVar12) + 0x33c))->x; fVar21 = (this->_pos).y - *(float *)((char *)EVar12 + 0x340); EVar17 = (EntityPtr)(fVar21 * fVar21 + fVar20 * fVar20); if (*(float *)((char *)EVar12 + 0x14) < *(float *)((char *)EVar12 + 0x380)) { @@ -1622,14 +1622,14 @@ LAB_00963c34: } } } - local_e8.y = (float)((int)local_e8.y + 1); - } while ((uint)local_e8.y < (uint)local_158._shift3); + local_e8.y = (float)(GHIDRA_INT(local_e8.y) + 1); + } while (GHIDRA_UINT(local_e8.y) < GHIDRA_UINT(local_158._shift3)); } ((Entity *)((Entity *)this))->Entity::SetTarget((Entity *)local_108.y); ((EntityList_Query *)(&local_158))->EntityList_Query::~EntityList_Query(); } else { - local_100._8_4_ = (this->_pos).x - ((Vector *)((int)EVar12 + 0x33c))->x; + (*(undefined4 *)((char *)&(local_100) + 0x8)) = (this->_pos).x - ((Vector *)(GHIDRA_INT(EVar12) + 0x33c))->x; local_f4[0] = (EntityPtr)((this->_pos).y - *(float *)((char *)EVar12 + 0x340)); pVVar14 = ((Vector *)((Vector *)(local_100 + 8)))->Vector::Normalized(&local_120); fVar20 = pVVar14->y; @@ -1645,10 +1645,10 @@ LAB_00963c34: } tearFlagsTmp = BitSet128::operator_and ((BitSet128 *)&local_158,&this->_tearFlags,&g_tearFlagWiggle); - if (((int)tearFlagsTmp->_l != 0 || *(int *)((int)&tearFlagsTmp->_l + 4) != 0) || - ((int)tearFlagsTmp->_h != 0 || *(int *)((int)&tearFlagsTmp->_h + 4) != 0)) { + if ((GHIDRA_INT(tearFlagsTmp->_l) != 0 || *(int *)(GHIDRA_INT(&tearFlagsTmp->_l) + 4) != 0) || + (GHIDRA_INT(tearFlagsTmp->_h) != 0 || *(int *)(GHIDRA_INT(&tearFlagsTmp->_h) + 4) != 0)) { local_e8.x = (this->_velocity).y; - local_e8.y = (float)((uint)(this->_velocity).x ^ 0x80000000); + local_e8.y = (float)(GHIDRA_UINT((this->_velocity).x) ^ 0x80000000); ((Vector *)(&local_e8))->Vector::Normalize(); fVar20 = (this->_velocity).y; fVar21 = (this->_velocity).x; @@ -1666,8 +1666,8 @@ LAB_00963c34: } tearFlagsTmp = BitSet128::operator_and (&continuumMask,&this->_tearFlags,&g_tearFlagContinuum); - if (((int)tearFlagsTmp->_l == 0 && *(int *)((int)&tearFlagsTmp->_l + 4) == 0) && - ((int)tearFlagsTmp->_h == 0 && *(int *)((int)&tearFlagsTmp->_h + 4) == 0)) { + if ((GHIDRA_INT(tearFlagsTmp->_l) == 0 && *(int *)(GHIDRA_INT(&tearFlagsTmp->_l) + 4) == 0) && + (GHIDRA_INT(tearFlagsTmp->_h) == 0 && *(int *)(GHIDRA_INT(&tearFlagsTmp->_h) + 4) == 0)) { pVVar14 = ((Room *)(g_game->_room))->Room::GetClampedPosition(&local_134,&this->_pos,0.0); (this->_pos).x = pVVar14->x; (this->_pos).y = pVVar14->y; @@ -1689,7 +1689,7 @@ LAB_00963c34: *(float *)local_158._shift2 = local_108.y; local_158._shift2 = local_158._shift2 + 4; } - local_108.y = *(float *)&(*(undefined1 *)((char *)(((EntityPtr *)((int)local_108.y + 0x3c0))) + 0x0)); + local_108.y = *(float *)&(*(undefined1 *)((char *)(((EntityPtr *)(GHIDRA_INT(local_108.y) + 0x3c0))) + 0x0)); } while ((EntityPtr)local_108.y != (EntityPtr)0x0); local_108.y = 0.0; local_118.y = (float)EVar12; @@ -1704,20 +1704,20 @@ LAB_00963c34: if (EVar12 != (EntityPtr)0x0) { local_12c = local_e0 * 6.0; do { - local_170._12_4_ = *(EntityPtr *)(local_158._shift1 + (int)local_e8.y * 4); - ((Vector *)(local_170._12_4_ + 0x360))->x = (this->_velocity).x; - *(float *)(local_170._12_4_ + 0x364) = (this->_velocity).y; + (*(undefined4 *)((char *)&(local_170) + 0xc)) = *(EntityPtr *)(local_158._shift1 + GHIDRA_INT(local_e8.y) * 4); + ((Vector *)((*(undefined4 *)((char *)&(local_170) + 0xc)) + 0x360))->x = (this->_velocity).x; + *(float *)((*(undefined4 *)((char *)&(local_170) + 0xc)) + 0x364) = (this->_velocity).y; local_108.y = this->_size * 5.0; EVar17 = (EntityPtr) - (((float)((double)(int)local_e8.y + - __uint_to_double_fixup[-((int)local_e8.y >> 0x1f)]) * 360.0) / - (float)((double)(int)EVar12 + __uint_to_double_fixup[-(fadeFrames >> 0x1f)]) + + (((float)((double)GHIDRA_INT(local_e8.y) + + __uint_to_double_fixup[-(GHIDRA_INT(local_e8.y) >> 0x1f)]) * 360.0) / + (float)((double)GHIDRA_INT(EVar12) + __uint_to_double_fixup[-(fadeFrames >> 0x1f)]) + local_12c); fVar20 = local_e0; local_120.y = (float)EVar17; tearFlagsTmp = BitSet128::operator_and(&local_1c0,&this->_tearFlags,&g_tearFlagPulse); - if (((int)tearFlagsTmp->_l != 0 || *(int *)((int)&tearFlagsTmp->_l + 4) != 0) || - ((int)tearFlagsTmp->_h != 0 || *(int *)((int)&tearFlagsTmp->_h + 4) != 0)) { + if ((GHIDRA_INT(tearFlagsTmp->_l) != 0 || *(int *)(GHIDRA_INT(&tearFlagsTmp->_l) + 4) != 0) || + (GHIDRA_INT(tearFlagsTmp->_h) != 0 || *(int *)(GHIDRA_INT(&tearFlagsTmp->_h) + 4) != 0)) { fVar20 = sin(fVar20 * 0.3); local_108.y = ((fVar20 + 1.0) * 0.5 * 0.5 + 1.0) * local_108.y; EVar17 = (EntityPtr)local_120.y; @@ -1726,9 +1726,9 @@ LAB_00963c34: local_15c = (EntityPtr)sin((float)local_f4[0]); fVar21 = cos((float)local_f4[0]); fVar20 = (this->_pos).y; - ((Vector *)(local_170._12_4_ + 0x33c))->x = fVar21 * local_108.y + (this->_pos).x; + ((Vector *)((*(undefined4 *)((char *)&(local_170) + 0xc)) + 0x33c))->x = fVar21 * local_108.y + (this->_pos).x; fVar21 = local_120.y - 90.0; - *(float *)(local_170._12_4_ + 0x340) = (float)local_15c * local_108.y + fVar20; + *(float *)((*(undefined4 *)((char *)&(local_170) + 0xc)) + 0x340) = (float)local_15c * local_108.y + fVar20; if (360.0 < ABS(fVar21)) { fVar21 = fmodf(fVar21,360.0); } @@ -1740,31 +1740,31 @@ LAB_00963c34: else { fVar21 = fVar21 - 360.0; } - *(float *)(local_170._12_4_ + 0xec) = fVar21; - (**(code **)((int)*(float *)local_170._12_4_ + 0x3c)) + *(float *)((*(undefined4 *)((char *)&(local_170) + 0xc)) + 0xec) = fVar21; + (**(code **)(GHIDRA_INT(*(*(undefined4 *)((char *)&((float *)local_170) + 0xc))) + 0x3c)) (&(this->_sprite)._color,0xffffffff,0xff,0,1); - fVar21 = *(float *)((int)&(this->_tearFlags)._l + 4); + fVar21 = *(float *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); pvVar18 = *(void **)&(this->_tearFlags)._h; - pvVar4 = *(void **)((int)&(this->_tearFlags)._h + 4); - fVar20 = *(float *)local_170._12_4_; - *(float *)(local_170._12_4_ + 0x410) = *(float *)&(this->_tearFlags)._l; - *(float *)(local_170._12_4_ + 0x414) = fVar21; - ((std_vector *)(local_170._12_4_ + 0x418))->_begin = pvVar18; - *(void **)(local_170._12_4_ + 0x41c) = pvVar4; + pvVar4 = *(void **)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); + fVar20 = *(*(undefined4 *)((char *)&((float *)local_170) + 0xc)); + *(float *)((*(undefined4 *)((char *)&(local_170) + 0xc)) + 0x410) = *(float *)&(this->_tearFlags)._l; + *(float *)((*(undefined4 *)((char *)&(local_170) + 0xc)) + 0x414) = fVar21; + ((std_vector *)((*(undefined4 *)((char *)&(local_170) + 0xc)) + 0x418))->_begin = pvVar18; + *(void **)((*(undefined4 *)((char *)&(local_170) + 0xc)) + 0x41c) = pvVar4; (**(code **)((char *)fVar20 + 0x40))(this->_collisionDamage); - local_e8.y = (float)((int)local_e8.y + 1); - } while ((uint)local_e8.y < (uint)EVar12); + local_e8.y = (float)(GHIDRA_INT(local_e8.y) + 1); + } while (GHIDRA_UINT(local_e8.y) < GHIDRA_UINT(EVar12)); } ehState = -1; if ((void *)local_158._shift1 != (void *)0x0) { - deallocate((void *)local_158._shift1,(int)local_118.y - local_158._shift1 >> 2); + deallocate((void *)local_158._shift1,GHIDRA_INT(local_118.y) - local_158._shift1 >> 2); } } if ((this->_isFlying != 0) && ((tearFlagsTmp = BitSet128::operator_and (&local_1c0,&this->_tearFlags,&g_tearFlagHydrobounce), - (int)tearFlagsTmp->_l != 0 || *(int *)((int)&tearFlagsTmp->_l + 4) != 0 || - ((int)tearFlagsTmp->_h != 0 || *(int *)((int)&tearFlagsTmp->_h + 4) != 0)))) { + GHIDRA_INT(tearFlagsTmp->_l) != 0 || *(int *)(GHIDRA_INT(&tearFlagsTmp->_l) + 4) != 0 || + (GHIDRA_INT(tearFlagsTmp->_h) != 0 || *(int *)(GHIDRA_INT(&tearFlagsTmp->_h) + 4) != 0)))) { fVar20 = this->_height; EVar12 = (EntityPtr)&this->_fallingSpeed; if ((fVar20 < 0.0) || (*(float *)EVar12 <= 0.0 && *(float *)EVar12 != 0.0)) { @@ -1802,11 +1802,11 @@ LAB_00963c34: (*pcVar2)(&(knife->_sprite)._color,0xffffffff,0xff,0,1); tmpEntity->Update(); SoundEffects::PlayWithFartOverride(0x96,0.5,2,0,1.0); - pvVar18 = ((std_vector *)((int)local_140.y + 8))->_begin; - flags_00._h._1_1_ = (char)((uint)pvVar18 >> 8); - flags_00._0_9_ = *(unkbyte9 *)local_140.y; - flags_00._h._2_2_ = (short)((uint)pvVar18 >> 0x10); - flags_00._h._4_4_ = *(void **)((char *)local_140.y + 0xc); + pvVar18 = ((std_vector *)(GHIDRA_INT(local_140.y) + 8))->_begin; + (*(undefined1 *)((char *)&(flags_00._h) + 0x1)) = (char)(GHIDRA_UINT(pvVar18) >> 8); + (*(undefined1 *)((char *)&(flags_00) + 0x0)) = *(unkbyte9 *)local_140.y; + (*(undefined2 *)((char *)&(flags_00._h) + 0x2)) = (short)(GHIDRA_UINT(pvVar18) >> 0x10); + (*(undefined4 *)((char *)&(flags_00._h) + 0x4)) = *(void **)((char *)local_140.y + 0xc); tear_flags_area_apply(&this->_pos,(Entity *)knife,30.0,knife->_collisionDamage,flags_00) ; fVar20 = knife->_height; @@ -1854,7 +1854,7 @@ LAB_00963c34: laser = *(Entity_NPC **)&(*(undefined1 *)((char *)(this) + 0x500)); local_d9 = 0; if (laser == (Entity_NPC *)0x0) { - local_100._8_4_ = (player->_pos).x; + (*(undefined4 *)((char *)&(local_100) + 0x8)) = (player->_pos).x; local_f4[0] = (EntityPtr)(player->_pos).y; local_140.x = (player->_posOffset).x + 0.0; local_140.y = (player->_posOffset).y - 8.0; @@ -1877,13 +1877,13 @@ LAB_00963c34: tearFlagsTmp = BitSet128::operator_or(&excludedMask,tearFlagsTmp,b); tearFlagsTmp = ((BitSet128 *)(tearFlagsTmp))->BitSet128::__bnot(&flagsScratch); tearFlagsTmp = BitSet128::operator_and(&local_38,&this->_tearFlags,tearFlagsTmp); - colorOffsetXY = *(undefined4 *)((int)&tearFlagsTmp->_l + 4); + colorOffsetXY = *(undefined4 *)(GHIDRA_INT(&tearFlagsTmp->_l) + 4); qVar7 = tearFlagsTmp->_h; - uVar5 = *(undefined4 *)((int)&tearFlagsTmp->_h + 4); - *(int *)&(techLaser->_tearFlags)._l = (int)tearFlagsTmp->_l; - *(undefined4 *)((int)&(techLaser->_tearFlags)._l + 4) = colorOffsetXY; - *(int *)&(techLaser->_tearFlags)._h = (int)qVar7; - *(undefined4 *)((int)&(techLaser->_tearFlags)._h + 4) = uVar5; + uVar5 = *(undefined4 *)(GHIDRA_INT(&tearFlagsTmp->_h) + 4); + *(int *)&(techLaser->_tearFlags)._l = GHIDRA_INT(tearFlagsTmp->_l); + *(undefined4 *)(GHIDRA_INT(&(techLaser->_tearFlags)._l) + 4) = colorOffsetXY; + *(int *)&(techLaser->_tearFlags)._h = GHIDRA_INT(qVar7); + *(undefined4 *)(GHIDRA_INT(&(techLaser->_tearFlags)._h) + 4) = uVar5; color = ((Entity_Player *)(player))->Entity_Player::get_laser_color_copy((ColorMod *)local_6c); (*extraout_EDX_00)(color,0xffffffff,0xff,0,1); techLaser->SetCollisionDamage(this->_charge * this->_collisionDamage); @@ -1925,15 +1925,15 @@ LAB_0096499b: EVar12 = (EntityPtr)this->_pathSegment; local_118.y = 0.0; local_120.y = 1e+07; - if ((uint)EVar12 < - (uint)(((int)(this->_homingLaser)._bezier._end - (int)(this->_homingLaser)._bezier._begin) - / 0x18 + -1)) { - local_170._12_4_ = (int)EVar12 * 0x18; + if (GHIDRA_UINT(EVar12) < + GHIDRA_UINT(((GHIDRA_INT((this->_homingLaser)._bezier._end) - GHIDRA_INT((this->_homingLaser)._bezier._begin)) + / 0x18 + -1))) { + (*(undefined4 *)((char *)&(local_170) + 0xc)) = GHIDRA_INT(EVar12) * 0x18; do { - pvVar18 = (void *)(local_170._12_4_ + (int)(this->_homingLaser)._bezier._begin); + pvVar18 = (void *)((*(undefined4 *)((char *)&(local_170) + 0xc)) + GHIDRA_INT((this->_homingLaser)._bezier._begin)); EVar17 = (EntityPtr) bezier_closest_point - (&this->_pos,pvVar18,(void *)((int)pvVar18 + 0x18),&local_140.y); + (&this->_pos,pvVar18,(void *)(GHIDRA_INT(pvVar18) + 0x18),&local_140.y); if ((float)EVar17 < local_120.y) { if (EVar12 == (EntityPtr)this->_pathSegment) { if (!(this->_pathProgress <= local_140.y && local_140.y != this->_pathProgress)) @@ -1944,21 +1944,21 @@ LAB_0096499b: local_118.y = (float)EVar12; } LAB_00964bdf: - EVar12 = (EntityPtr)((int)EVar12 + 1); - local_170._12_4_ = local_170._12_4_ + 0x18; - } while ((uint)EVar12 < - (uint)(((int)(this->_homingLaser)._bezier._end - - (int)(this->_homingLaser)._bezier._begin) / 0x18 + -1)); + EVar12 = (EntityPtr)(GHIDRA_INT(EVar12) + 1); + (*(undefined4 *)((char *)&(local_170) + 0xc)) = (*(undefined4 *)((char *)&(local_170) + 0xc)) + 0x18; + } while (GHIDRA_UINT(EVar12) < + GHIDRA_UINT(((GHIDRA_INT((this->_homingLaser)._bezier._end) - + GHIDRA_INT((this->_homingLaser)._bezier._begin)) / 0x18 + -1))); } EVar12 = (EntityPtr)&this->_tearFlags; local_140.y = (float)EVar12; tearFlagsTmp = BitSet128::operator_and(&local_38,(BitSet128 *)EVar12,&g_tearFlagHydrobounce); - if (((int)tearFlagsTmp->_l != 0 || *(int *)((int)&tearFlagsTmp->_l + 4) != 0) || - ((int)tearFlagsTmp->_h != 0 || *(int *)((int)&tearFlagsTmp->_h + 4) != 0)) { + if ((GHIDRA_INT(tearFlagsTmp->_l) != 0 || *(int *)(GHIDRA_INT(&tearFlagsTmp->_l) + 4) != 0) || + (GHIDRA_INT(tearFlagsTmp->_h) != 0 || *(int *)(GHIDRA_INT(&tearFlagsTmp->_h) + 4) != 0)) { if (g_game->_frameCount - this->_spawnFrame == 1) { uVar10 = Random(); this->_fallingSpeed = - -5.0 - (float)((double)(int)uVar10 + __uint_to_double_fixup[-((int)uVar10 >> 0x1f)]) + -5.0 - (float)((double)GHIDRA_INT(uVar10) + __uint_to_double_fixup[-(GHIDRA_INT(uVar10) >> 0x1f)]) * 2.3283064e-10 * 3.0; } fVar20 = this->_height; @@ -1986,11 +1986,11 @@ LAB_00964bdf: tmpEntity->Update(); SoundEffects::PlayWithFartOverride(0x96,0.5,2,0,1.0); EVar12 = (EntityPtr)local_140.y; - pvVar18 = ((std_vector *)((int)local_140.y + 8))->_begin; - flags_01._h._1_1_ = (char)((uint)pvVar18 >> 8); - flags_01._0_9_ = *(unkbyte9 *)local_140.y; - flags_01._h._2_2_ = (short)((uint)pvVar18 >> 0x10); - flags_01._h._4_4_ = *(void **)((char *)local_140.y + 0xc); + pvVar18 = ((std_vector *)(GHIDRA_INT(local_140.y) + 8))->_begin; + (*(undefined1 *)((char *)&(flags_01._h) + 0x1)) = (char)(GHIDRA_UINT(pvVar18) >> 8); + (*(undefined1 *)((char *)&(flags_01) + 0x0)) = *(unkbyte9 *)local_140.y; + (*(undefined2 *)((char *)&(flags_01._h) + 0x2)) = (short)(GHIDRA_UINT(pvVar18) >> 0x10); + (*(undefined4 *)((char *)&(flags_01._h) + 0x4)) = *(void **)((char *)local_140.y + 0xc); tear_flags_area_apply(&this->_pos,(Entity *)knife,30.0,knife->_collisionDamage,flags_01) ; fVar20 = knife->_height; @@ -2009,32 +2009,32 @@ LAB_00964bdf: fVar21 = fVar20 * fVar20 * 3.0 * local_108.y; bezierB2 = fVar20 * 3.0 * local_108.y * local_108.y; bezierB3 = local_108.y * local_108.y * local_108.y; - local_170._12_4_ = - bezierB2 * *(float *)((char *)pvVar18 + (int)local_118.y * 0x18 + 0x24) + - fVar23 * *(float *)((char *)pvVar18 + (int)local_118.y * 0x18 + 4) + - fVar21 * *(float *)((char *)pvVar18 + (int)local_118.y * 0x18 + 0x14) + - bezierB3 * *(float *)((char *)pvVar18 + (int)local_118.y * 0x18 + 0x1c); + (*(undefined4 *)((char *)&(local_170) + 0xc)) = + bezierB2 * *(float *)((char *)pvVar18 + GHIDRA_INT(local_118.y) * 0x18 + 0x24) + + fVar23 * *(float *)((char *)pvVar18 + GHIDRA_INT(local_118.y) * 0x18 + 4) + + fVar21 * *(float *)((char *)pvVar18 + GHIDRA_INT(local_118.y) * 0x18 + 0x14) + + bezierB3 * *(float *)((char *)pvVar18 + GHIDRA_INT(local_118.y) * 0x18 + 0x1c); fVar20 = local_108.y + this->_pathFollowSpeed; fVar22 = 1.0 - fVar20; nextBezierB0 = fVar22 * fVar22 * fVar22; fVar24 = fVar22 * 3.0 * fVar20 * fVar20; nextBezierB3 = fVar20 * fVar20 * fVar20; fVar20 = fVar22 * fVar22 * 3.0 * fVar20; - local_e0 = nextBezierB3 * *(float *)((char *)pvVar18 + (int)local_118.y * 0x18 + 0x1c) + - nextBezierB0 * *(float *)((char *)pvVar18 + (int)local_118.y * 0x18 + 4) + - fVar20 * *(float *)((char *)pvVar18 + (int)local_118.y * 0x18 + 0x14) + - fVar24 * *(float *)((char *)pvVar18 + (int)local_118.y * 0x18 + 0x24); + local_e0 = nextBezierB3 * *(float *)((char *)pvVar18 + GHIDRA_INT(local_118.y) * 0x18 + 0x1c) + + nextBezierB0 * *(float *)((char *)pvVar18 + GHIDRA_INT(local_118.y) * 0x18 + 4) + + fVar20 * *(float *)((char *)pvVar18 + GHIDRA_INT(local_118.y) * 0x18 + 0x14) + + fVar24 * *(float *)((char *)pvVar18 + GHIDRA_INT(local_118.y) * 0x18 + 0x24); local_f4[0] = (EntityPtr) - (nextBezierB0 * *(float *)((char *)pvVar18 + (int)local_118.y * 0x18) + - fVar20 * *(float *)((char *)pvVar18 + (int)local_118.y * 0x18 + 0x10) + - fVar24 * *(float *)((char *)pvVar18 + (int)local_118.y * 0x18 + 0x20) + - nextBezierB3 * *(float *)((char *)pvVar18 + (int)local_118.y * 0x18 + 0x18)); - local_140.y = local_e0 - (float)local_170._12_4_; + (nextBezierB0 * *(float *)((char *)pvVar18 + GHIDRA_INT(local_118.y) * 0x18) + + fVar20 * *(float *)((char *)pvVar18 + GHIDRA_INT(local_118.y) * 0x18 + 0x10) + + fVar24 * *(float *)((char *)pvVar18 + GHIDRA_INT(local_118.y) * 0x18 + 0x20) + + nextBezierB3 * *(float *)((char *)pvVar18 + GHIDRA_INT(local_118.y) * 0x18 + 0x18)); + local_140.y = local_e0 - (*(undefined4 *)((char *)&((float)local_170) + 0xc)); local_140.x = (float)local_f4[0] - - (bezierB2 * *(float *)((char *)pvVar18 + (int)local_118.y * 0x18 + 0x20) + - fVar21 * *(float *)((char *)pvVar18 + (int)local_118.y * 0x18 + 0x10) + - fVar23 * *(float *)((char *)pvVar18 + (int)local_118.y * 0x18) + - bezierB3 * *(float *)((char *)pvVar18 + (int)local_118.y * 0x18 + 0x18)); + (bezierB2 * *(float *)((char *)pvVar18 + GHIDRA_INT(local_118.y) * 0x18 + 0x20) + + fVar21 * *(float *)((char *)pvVar18 + GHIDRA_INT(local_118.y) * 0x18 + 0x10) + + fVar23 * *(float *)((char *)pvVar18 + GHIDRA_INT(local_118.y) * 0x18) + + bezierB3 * *(float *)((char *)pvVar18 + GHIDRA_INT(local_118.y) * 0x18 + 0x18)); ((Vector *)(&local_140))->Vector::Normalized(&local_120); bVar8 = 0; local_140.x = (local_120.y * this->_pathOffset + (float)local_f4[0]) - (this->_pos).x; @@ -2047,7 +2047,7 @@ LAB_00964bdf: local_d9 = 0.0 < fVar20; layer = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer((byte *)0x0); layer->_flipX = local_d9; - this->_pathSegment = (int)local_118.y; + this->_pathSegment = GHIDRA_INT(local_118.y); this->_pathProgress = local_108.y; } Room::GetClampedPositionImpl(g_game->_room,&local_140,&this->_pos,-200.0,-200.0,-200.0,-200.0) @@ -2056,8 +2056,8 @@ LAB_00964bdf: fVar21 = (this->_pos).x - local_140.x; if (1.0 < fVar20 * fVar20 + fVar21 * fVar21) { tearFlagsTmp = BitSet128::operator_and(&local_38,(BitSet128 *)EVar12,&g_tearFlagContinuum); - if (((int)tearFlagsTmp->_l == 0 && *(int *)((int)&tearFlagsTmp->_l + 4) == 0) && - ((int)tearFlagsTmp->_h == 0 && *(int *)((int)&tearFlagsTmp->_h + 4) == 0)) { + if ((GHIDRA_INT(tearFlagsTmp->_l) == 0 && *(int *)(GHIDRA_INT(&tearFlagsTmp->_l) + 4) == 0) && + (GHIDRA_INT(tearFlagsTmp->_h) == 0 && *(int *)(GHIDRA_INT(&tearFlagsTmp->_h) + 4) == 0)) { this->Remove(); } else { @@ -2066,33 +2066,33 @@ LAB_00964bdf: (this->_pos).y = pVVar14->y; tearFlagsTmp = ((BitSet128 *)(&g_tearFlagContinuum))->BitSet128::__bnot(&local_38); tearFlagsTmp = BitSet128::operator_and(&flagsScratch,(BitSet128 *)EVar12,tearFlagsTmp); - colorOffsetXY = *(undefined4 *)((int)&tearFlagsTmp->_l + 4); + colorOffsetXY = *(undefined4 *)(GHIDRA_INT(&tearFlagsTmp->_l) + 4); pvVar18 = *(void **)&tearFlagsTmp->_h; - pvVar4 = *(void **)((int)&tearFlagsTmp->_h + 4); - *(int *)EVar12 = (int)tearFlagsTmp->_l; + pvVar4 = *(void **)(GHIDRA_INT(&tearFlagsTmp->_h) + 4); + *(int *)EVar12 = GHIDRA_INT(tearFlagsTmp->_l); *(undefined4 *)((char *)EVar12 + 4) = colorOffsetXY; - ((std_vector *)((int)EVar12 + 8))->_begin = pvVar18; + ((std_vector *)(GHIDRA_INT(EVar12) + 8))->_begin = pvVar18; *(void **)((char *)EVar12 + 0xc) = pvVar4; tearFlagsTmp = ((BitSet128 *)(&g_tearFlagOrbit))->BitSet128::__bnot(&local_38); tearFlagsTmp = BitSet128::operator_and(&flagsScratch,(BitSet128 *)EVar12,tearFlagsTmp); - colorOffsetXY = *(undefined4 *)((int)&tearFlagsTmp->_l + 4); + colorOffsetXY = *(undefined4 *)(GHIDRA_INT(&tearFlagsTmp->_l) + 4); pvVar18 = *(void **)&tearFlagsTmp->_h; - pvVar4 = *(void **)((int)&tearFlagsTmp->_h + 4); + pvVar4 = *(void **)(GHIDRA_INT(&tearFlagsTmp->_h) + 4); EVar17 = this->_parent; - *(int *)EVar12 = (int)tearFlagsTmp->_l; + *(int *)EVar12 = GHIDRA_INT(tearFlagsTmp->_l); *(undefined4 *)((char *)EVar12 + 4) = colorOffsetXY; - ((std_vector *)((int)EVar12 + 8))->_begin = pvVar18; + ((std_vector *)(GHIDRA_INT(EVar12) + 8))->_begin = pvVar18; *(void **)((char *)EVar12 + 0xc) = pvVar4; tmpEntity = *(Entity **)((char *)EVar17 + 0x3bc); uVar10 = Random(); - local_140.y = (float)((double)(int)uVar10 + __uint_to_double_fixup[-((int)uVar10 >> 0x1f)] + local_140.y = (float)((double)GHIDRA_INT(uVar10) + __uint_to_double_fixup[-(GHIDRA_INT(uVar10) >> 0x1f)] ) * 2.3283064e-10 * 50.0 - 25.0; pVVar14 = ((Vector *)(&this->_velocity))->Vector::Normalized(&local_120); - local_100._8_4_ = pVVar14->x; + (*(undefined4 *)((char *)&(local_100) + 0x8)) = pVVar14->x; local_f4[0] = (EntityPtr)pVVar14->y; - direction_00.y._1_1_ = local_f4[0]._1_1_; - direction_00._0_5_ = *(undefined5 *)pVVar14; - direction_00.y._2_2_ = local_f4[0]._2_2_; + (*(undefined1 *)((char *)&(direction_00.y) + 0x1)) = (*(undefined1 *)((char *)&(local_f4[0]) + 0x1)); + (*(undefined1 *)((char *)&(direction_00) + 0x0)) = *(undefined5 *)pVVar14; + (*(undefined2 *)((char *)&(direction_00.y) + 0x2)) = (*(undefined2 *)((char *)&(local_f4[0]) + 0x2)); InitHomingPath(this,direction_00,tmpEntity,local_140.y); } } @@ -2127,7 +2127,7 @@ LAB_00964bdf: } fVar20 = 0.017453292; local_f4[0] = *(EntityPtr *)((char *)EVar12 + 0x33c); - local_170._12_4_ = *(EntityPtr *)((char *)EVar12 + 0x340); + (*(undefined4 *)((char *)&(local_170) + 0xc)) = *(EntityPtr *)((char *)EVar12 + 0x340); tearFlagsTmp = BitSet128::operator_and(&local_38,&this->_tearFlags,&g_tearFlagWait); bVar8 = ((BitSet128 *)(tearFlagsTmp))->BitSet128::IsZero(); if (((bVar8 == 0) && (4 < g_game->_frameCount - this->_spawnFrame)) || @@ -2158,15 +2158,15 @@ LAB_00964bdf: fVar21 = cos(local_108.y); fVar20 = (this->_targetPosition).x; fVar21 = (((float)local_f4[0] + fVar21 * fVar20) - (this->_pos).x) / this->_friction; - fVar20 = (((float)local_170._12_4_ + fVar20 * local_140.y) - (this->_pos).y) / + fVar20 = (((*(undefined4 *)((char *)&((float)local_170) + 0xc)) + fVar20 * local_140.y) - (this->_pos).y) / this->_friction; } else { - local_170._12_4_ = EVar12; + (*(undefined4 *)((char *)&(local_170) + 0xc)) = EVar12; fVar21 = cos(local_108.y); fVar20 = (this->_targetPosition).x; fVar21 = (fVar21 * fVar20 + *(float *)(fadeFrames + 0x33c)) - (this->_pos).x; - fVar20 = ((float)local_170._12_4_ * fVar20 + *(float *)(fadeFrames + 0x340)) - + fVar20 = ((*(undefined4 *)((char *)&((float)local_170) + 0xc)) * fVar20 + *(float *)(fadeFrames + 0x340)) - (this->_pos).y; } (this->_velocity).x = fVar21; @@ -2206,15 +2206,15 @@ LAB_00964bdf: FUN_004072e0((knife->_color)._tint[0],(knife->_color)._tint[1],(knife->_color)._tint[2], (knife->_color)._tint[3],(knife->_color)._colorize[0], (knife->_color)._colorize[1],(knife->_color)._colorize[2], - (knife->_color)._colorize[3],(int)colorOffsetXY, + (knife->_color)._colorize[3],GHIDRA_INT(colorOffsetXY), (char)((ulonglong)colorOffsetXY >> 0x20),(knife->_color)._offset[2]); ((Sprite *)((Sprite *)&this->_sprite))->Sprite::SetColor(color); local_d9 = knife->_isInterpolating; this = knife; } tearFlagsTmp = BitSet128::operator_and(&local_38,&this->_tearFlags,&g_tearFlagAttractor); - if ((((int)tearFlagsTmp->_l != 0 || *(int *)((int)&tearFlagsTmp->_l + 4) != 0) || - ((int)tearFlagsTmp->_h != 0 || *(int *)((int)&tearFlagsTmp->_h + 4) != 0)) && (local_d9 == 0)) + if (((GHIDRA_INT(tearFlagsTmp->_l) != 0 || *(int *)(GHIDRA_INT(&tearFlagsTmp->_l) + 4) != 0) || + (GHIDRA_INT(tearFlagsTmp->_h) != 0 || *(int *)(GHIDRA_INT(&tearFlagsTmp->_h) + 4) != 0)) && (local_d9 == 0)) { if (this->_subtype == 4) { fVar20 = 20.0; @@ -2238,7 +2238,7 @@ LAB_00964bdf: LAB_009658dd: bVar8 = 3; LAB_009658e1: - bVar8 = ((Entity *)((Entity *)this))->Entity::IsFrame((uint)bVar8,0); + bVar8 = ((Entity *)((Entity *)this))->Entity::IsFrame(GHIDRA_UINT(bVar8),0); if (bVar8 != 0) { ((std::vector *)(&this->_hitList))->std::vector::clear(0); } @@ -2252,8 +2252,8 @@ LAB_009658e1: } else if (this->_variant == 2) { tearFlagsTmp = BitSet128::operator_and(&flagsScratch,&this->_tearFlags,&g_tearFlagWait); - if (((int)tearFlagsTmp->_l == 0 && *(int *)((int)&tearFlagsTmp->_l + 4) == 0) && - ((int)tearFlagsTmp->_h == 0 && *(int *)((int)&tearFlagsTmp->_h + 4) == 0)) { + if ((GHIDRA_INT(tearFlagsTmp->_l) == 0 && *(int *)(GHIDRA_INT(&tearFlagsTmp->_l) + 4) == 0) && + (GHIDRA_INT(tearFlagsTmp->_h) == 0 && *(int *)(GHIDRA_INT(&tearFlagsTmp->_h) + 4) == 0)) { bVar19 = false; } else { @@ -2275,43 +2275,43 @@ LAB_009658e1: (this->_visible != 0)) { room = g_game->_room; local_140.y = (float)((Room *)(room))->Room::GetGridIndex(&this->_pos); - if (-1 < (int)local_140.y) { - if ((int)local_140.y < 0x1c0) { - EVar12 = *(EntityPtr *)(room->_gridEntities + (int)local_140.y); + if (-1 < GHIDRA_INT(local_140.y)) { + if (GHIDRA_INT(local_140.y) < 0x1c0) { + EVar12 = *(EntityPtr *)(room->_gridEntities + GHIDRA_INT(local_140.y)); local_120.y = (float)EVar12; if (((EVar12 != (EntityPtr)0x0) && (*(float *)((char *)EVar12 + 0x3c) != 1.4013e-45)) && ((*(float *)((char *)EVar12 + 0x3c) != 0.0 && (uVar10 = Random(), (uVar10 & 3) == 0)))) { - local_158._seed = (int)(this->_tearFlags)._l; - local_158._shift1 = *(uint *)((int)&(this->_tearFlags)._l + 4); + local_158._seed = GHIDRA_INT((this->_tearFlags)._l); + local_158._shift1 = *(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); local_158._shift2 = *(int *)&(this->_tearFlags)._h; - local_158._shift3 = *(int *)((int)&(this->_tearFlags)._h + 4); + local_158._shift3 = *(int *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); if (player != (Entity_Player *)0x0) { pTVar16 = Entity_Player::GetTearHitParams (player,&tearHitParams,4,1.0,0,(Entity *)this->_spawnerEntity); - local_158._seed = local_158._seed | (uint)(pTVar16->_flags)._l; - local_158._shift1 = local_158._shift1 | *(uint *)((int)&(pTVar16->_flags)._l + 4); - local_158._shift2 = local_158._shift2 | (uint)(pTVar16->_flags)._h; - local_158._shift3 = local_158._shift3 | *(uint *)((int)&(pTVar16->_flags)._h + 4); + local_158._seed = local_158._seed | GHIDRA_UINT((pTVar16->_flags)._l); + local_158._shift1 = local_158._shift1 | *(uint *)(GHIDRA_INT(&(pTVar16->_flags)._l) + 4); + local_158._shift2 = local_158._shift2 | GHIDRA_UINT((pTVar16->_flags)._h); + local_158._shift3 = local_158._shift3 | *(uint *)(GHIDRA_INT(&(pTVar16->_flags)._h) + 4); } tearFlagsTmp = BitSet128::operator_or(&local_38,&g_tearFlagAcid,&g_tearFlagRock); tearFlagsTmp = BitSet128::operator_and(&flagsScratch,(BitSet128 *)&local_158,tearFlagsTmp) ; bVar8 = ((BitSet128 *)(tearFlagsTmp))->BitSet128::IsNonZero(); - if ((bVar8 != 0) && (cVar9 = (**(code **)((int)*(float *)EVar12 + 0x1c))(), cVar9 != '\0') + if ((bVar8 != 0) && (cVar9 = (**(code **)(GHIDRA_INT(*(float *)EVar12) + 0x1c))(), cVar9 != '\0') ) { - pcVar2 = *(code **)((int)*(float *)EVar12 + 0x14); + pcVar2 = *(code **)(GHIDRA_INT(*(float *)EVar12) + 0x14); ((EntityRef *)((EntityRef *)(local_6c + 4)))->EntityRef::constructor((Entity *)this); cVar9 = (*pcVar2)(0,local_6c + 4); if (cVar9 != '\0') { local_140.y = ((this->_sprite)._rotation + 90.0) * 0.017453292; - local_100._8_4_ = cos(local_140.y); + (*(undefined4 *)((char *)&(local_100) + 0x8)) = cos(local_140.y); local_f4[0] = (EntityPtr)sin(local_140.y); Vector::ToCardinal(&local_140,(Vector *)(local_100 + 8)); bVar8 = ((Vector *)(cardinalDir))->Vector::operator_ne(&g_vectorZero); fVar20 = local_120.y; if (bVar8 != 0) { pVVar14 = ((GridEntity *)((GridEntity *)local_120.y))->GridEntity::Position(&local_e8); - local_100._8_4_ = local_140.x * 40.0 + pVVar14->x; + (*(undefined4 *)((char *)&(local_100) + 0x8)) = local_140.x * 40.0 + pVVar14->x; local_f4[0] = (EntityPtr)(local_140.y * 40.0 + pVVar14->y); local_120.y = (float)g_game->_room; fadeFrames = ((Room *)((Room *)local_120.y))->Room::GetGridIndex((Vector *)(local_100 + 8)); @@ -2332,7 +2332,7 @@ LAB_009658e1: } room = g_game->_room; ((EntityRef *)((EntityRef *)(local_1ac + 4)))->EntityRef::constructor((Entity *)this); - ((Room *)(room))->Room::DamageGridWithSource((int)local_140.y,1,(EntityRef *)(local_1ac + 4)); + ((Room *)(room))->Room::DamageGridWithSource(GHIDRA_INT(local_140.y),1,(EntityRef *)(local_1ac + 4)); } } LAB_00965b8b: @@ -2391,15 +2391,15 @@ void Entity_Knife::Render(Vector *offset) Sprite *deadEyeSprite; ColorMod *spriteColor; - local_c = __security_cookie ^ (uint)&local_e8; + local_c = __security_cookie ^ GHIDRA_UINT(&local_e8); if (this->_visible != 0) { player = GetPlayer(this); if ((player == (Entity_Player *)0x0) || (*(int *)&g_game->_stageTransition == 0)) { fVar2 = 0.5; - if (((((uint)g_tearFlagOrbit._l & (uint)(this->_tearFlags)._l) != 0 || - (g_tearFlagOrbit._l._4_4_ & *(uint *)((int)&(this->_tearFlags)._l + 4)) != 0) || - (((uint)(this->_tearFlags)._h & (uint)g_tearFlagOrbit._h) != 0 || - (*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagOrbit._h._4_4_) != 0)) && + if ((((GHIDRA_UINT(g_tearFlagOrbit._l) & GHIDRA_UINT((this->_tearFlags)._l)) != 0 || + ((*(undefined4 *)((char *)&(g_tearFlagOrbit._l) + 0x4)) & *(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4)) != 0) || + ((GHIDRA_UINT((this->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagOrbit._h)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagOrbit._h) + 0x4))) != 0)) && ((this->_isFlying != 0 && (this->_subtype == 0)))) { savedTintR = (this->_sprite)._color._tint[0]; savedTintG = (this->_sprite)._color._tint[1]; @@ -2695,11 +2695,11 @@ void Entity_Knife::Shoot(float charge, float range) gravity = -2.0; savedGravity = -2.0; this->_maxDistance = charge * range; - uVar2 = (uint)(this->_tearFlags)._h; - if ((((uint)(this->_tearFlags)._l & (uint)g_tearFlagOrbit._l) != 0 || - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagOrbit._l._4_4_) != 0) || - ((uVar2 & (uint)g_tearFlagOrbit._h) != 0 || - (*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagOrbit._h._4_4_) != 0)) { + uVar2 = GHIDRA_UINT((this->_tearFlags)._h); + if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagOrbit._l)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagOrbit._l) + 0x4))) != 0) || + ((uVar2 & GHIDRA_UINT(g_tearFlagOrbit._h)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagOrbit._h) + 0x4))) != 0)) { gravity = (float)&DAT_bf800000; savedGravity = (float)&DAT_bf800000; } @@ -2720,10 +2720,10 @@ switchD_00966f89_caseD_2: default: if (variant == 1) goto switchD_00966f89_caseD_2; } - if ((((uint)(this->_tearFlags)._l & (uint)g_tearFlagHydrobounce._l) != 0 || - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagHydrobounce._l._4_4_) != 0) || - ((uVar2 & (uint)g_tearFlagHydrobounce._h) != 0 || - (*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagHydrobounce._h._4_4_) != 0)) { + if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagHydrobounce._l)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagHydrobounce._l) + 0x4))) != 0) || + ((uVar2 & GHIDRA_UINT(g_tearFlagHydrobounce._h)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagHydrobounce._h) + 0x4))) != 0)) { gravity = gravity * 0.75; this->_height = 0.0; this->_fallingSpeed = -10.0; @@ -2776,7 +2776,7 @@ LAB_009670ee: bVar3 = bVar1 < *wantAnimChar; if (bVar1 != *wantAnimChar) { LAB_009670d0: - uVar2 = -(uint)bVar3 | 1; + uVar2 = -GHIDRA_UINT(bVar3) | 1; goto LAB_009670d5; } if (bVar1 == 0) break; @@ -2801,7 +2801,7 @@ LAB_009670d5: curAnimData = (this->_sprite)._animState._animData; } if (curAnimData != (void *)0x0) { - ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)(int)startFrame); + ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(startFrame)); } switchD_00967064_caseD_5: UpdateHomingPath(this); @@ -2840,9 +2840,9 @@ void Entity_Knife::UpdateHomingPath() ColorMod laserColor; *(undefined4 *)&(this->_usedTearFlags)._l = 0; - *(undefined4 *)((int)&(this->_usedTearFlags)._l + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_usedTearFlags)._l) + 4) = 0; *(undefined4 *)&(this->_usedTearFlags)._h = 0; - *(undefined4 *)((int)&(this->_usedTearFlags)._h + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_usedTearFlags)._h) + 4) = 0; player = GetPlayer(this); if (player != (Entity_Player *)0x0) { iVar8 = GetBaseVariant(this); @@ -2850,16 +2850,16 @@ void Entity_Knife::UpdateHomingPath() ((bVar7 = ((Entity_Player *)(player))->Entity_Player::HasCollectible(0xe5,0), bVar7 != 0 && (0.25 < this->_charge)) )) { rngResult = Random(); - knifeCount = (int)(((float)(rngResult % 3 + 3) + 0.0) * this->_charge); + knifeCount = GHIDRA_INT((((float)(rngResult % 3 + 3) + 0.0) * this->_charge)); local_5c = (EntityPtr)this; if (0 < knifeCount) { do { rngResult = Random(); - dVar1 = __uint_to_double_fixup[-((int)rngResult >> 0x1f)]; + dVar1 = __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]; seed = Random(); iVar8 = *(int *)((char *)this + 0x3bc); fVar13 = *(float *)(iVar8 + 0x340); - fVar9 = ((float)((double)(int)rngResult + dVar1) * 2.3283064e-10 * 360.0 - 180.0) * + fVar9 = ((float)((double)GHIDRA_INT(rngResult) + dVar1) * 2.3283064e-10 * 360.0 - 180.0) * 0.017453292; fVar10 = cos(fVar9); spawnPos.x = fVar10 * 30.0 + *(float *)(iVar8 + 0x33c); @@ -2872,9 +2872,9 @@ void Entity_Knife::UpdateHomingPath() (spawnedKnife->_posOffset).y = -10.0; (**(code **)(iVar8 + 0x40))(); fVar13 = 1.4013e-45; - spawnedKnife->SetColor((int)local_5c + 0xf0,0xffffffff,0xff); + spawnedKnife->SetColor(GHIDRA_INT(local_5c) + 0xf0,0xffffffff,0xff); HomingLaser::operator_assign - (&spawnedKnife->_homingLaser,(HomingLaser *)((int)local_5c + 0x468)); + (&spawnedKnife->_homingLaser,(HomingLaser *)(GHIDRA_INT(local_5c) + 0x468)); if (spawnedKnife->_parent != (EntityPtr)0x0) { std::multiset::erase(auStack_5e + -0xe); } @@ -2884,9 +2884,9 @@ void Entity_Knife::UpdateHomingPath() uVar3 = *(undefined4 *)((char *)local_5c + 0x418); uVar4 = *(undefined4 *)((char *)local_5c + 0x41c); *(undefined4 *)&(spawnedKnife->_tearFlags)._l = *(undefined4 *)((char *)local_5c + 0x410); - *(undefined4 *)((int)&(spawnedKnife->_tearFlags)._l + 4) = uVar2; + *(undefined4 *)(GHIDRA_INT(&(spawnedKnife->_tearFlags)._l) + 4) = uVar2; *(undefined4 *)&(spawnedKnife->_tearFlags)._h = uVar3; - *(undefined4 *)((int)&(spawnedKnife->_tearFlags)._h + 4) = uVar4; + *(undefined4 *)(GHIDRA_INT(&(spawnedKnife->_tearFlags)._h) + 4) = uVar4; fVar9 = cos(fVar13); EVar11 = (EntityPtr)sin(fVar13); direction.y = (float)EVar11; @@ -2906,7 +2906,7 @@ void Entity_Knife::UpdateHomingPath() (**(code **)(**(int **)((char *)this + 0x4fc) + 0x28))(); } rngResult = Random(); - spawned = ((Game *)(g_game))->Game::SpawnEx(7,2,(Vector *)((int)this + 0x33c),&g_vectorZero, + spawned = ((Game *)(g_game))->Game::SpawnEx(7,2,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero, (Entity *)player,3,rngResult,0); laser = (int *)__RTDynamicCast(spawned,0); laserColor._tint[0] = (player->_laserColor)._tint[0]; @@ -2917,7 +2917,7 @@ void Entity_Knife::UpdateHomingPath() laserColor._colorize[1] = (player->_laserColor)._colorize[1]; laserColor._colorize[2] = (player->_laserColor)._colorize[2]; laserColor._colorize[3] = (player->_laserColor)._colorize[3]; - laserColor._offset._0_8_ = *(undefined8 *)(player->_laserColor)._offset; + (*(undefined8 *)((char *)&(laserColor._offset) + 0x0)) = *(undefined8 *)(player->_laserColor)._offset; laserColor._offset[2] = (player->_laserColor)._offset[2]; (**(code **)(*laser + 0x3c))(&laserColor,0xffffffff); laser[0xd3] = *(int *)((char *)this + 0x34c); @@ -2936,11 +2936,11 @@ void Entity_Knife::UpdateHomingPath() laser[0x10c] = iVar5; laser[0x10d] = iVar6; auVar12 = ZEXT812(0x3ea8f5c3); - if (auVar12._0_4_ < *(float *)((char *)this + 0x460)) { - auVar12._4_8_ = auVar12._4_8_; - auVar12._0_4_ = *(float *)((char *)this + 0x460); + if ((*(undefined4 *)((char *)&(auVar12) + 0x0)) < *(float *)((char *)this + 0x460)) { + (*(undefined8 *)((char *)&(auVar12) + 0x4)) = (*(undefined8 *)((char *)&(auVar12) + 0x4)); + (*(undefined4 *)((char *)&(auVar12) + 0x0)) = *(float *)((char *)this + 0x460); } - (**(code **)(*laser + 0x40))(auVar12._0_4_ * *(float *)((char *)this + 0x388)); + (**(code **)(*laser + 0x40))((*(undefined4 *)((char *)&(auVar12) + 0x0)) * *(float *)((char *)this + 0x388)); laser[0x116] = 600; fVar13 = *(float *)((char *)this + 0x460); if (fVar13 <= 0.0) { @@ -2949,7 +2949,7 @@ void Entity_Knife::UpdateHomingPath() if (1.0 <= fVar13) { fVar13 = 1.0; } - laser[0x12f] = (int)(fVar13 * 60.0 + 20.0); + laser[0x12f] = GHIDRA_INT((fVar13 * 60.0 + 20.0)); if (laser[0xf2] != 0) { std::multiset::erase(auStack_5e + -0x16); } @@ -2959,7 +2959,7 @@ void Entity_Knife::UpdateHomingPath() if (*(int *)((char *)this + 0x4fc) != 0) { std::multiset::erase(); } - *(int *)((char *)this + 0x4fc) = (int)laser; + *(int *)((char *)this + 0x4fc) = GHIDRA_INT(laser); std::multiset::insert(); } } @@ -3018,7 +3018,7 @@ void Entity_Knife::update_target(float *outAngle) bVar2 = true; } if (((isVulnerable != '\0') || (bVar2)) && - ((fVar3 = (this->_pos).x - ((Vector *)((int)targetEntity + 0x33c))->x, + ((fVar3 = (this->_pos).x - ((Vector *)(GHIDRA_INT(targetEntity) + 0x33c))->x, fVar5 = (this->_pos).y - *(float *)((char *)targetEntity + 0x340), fVar3 = fVar5 * fVar5 + fVar3 * fVar3, *(float *)((char *)targetEntity + 0x14) < *(float *)((char *)targetEntity + 0x380) && @@ -3027,7 +3027,7 @@ void Entity_Knife::update_target(float *outAngle) local_18 = targetEntity; } entityIndex = entityIndex + 1; - } while (entityIndex < (uint)local_20); + } while (entityIndex < GHIDRA_UINT(local_20)); if (this->_target != (EntityPtr)0x0) { local_24 = &this->_target; std::multiset::erase(&local_24); @@ -3155,8 +3155,8 @@ LAB_00967b6b: wigglePhase = 0.0; perpX = local_8; maskedFlags = BitSet128::operator_and(&local_24,&this->_tearFlags,&g_tearFlagOrbit); - if (((int)maskedFlags->_l == 0 && *(int *)((int)&maskedFlags->_l + 4) == 0) && - ((int)maskedFlags->_h == 0 && *(int *)((int)&maskedFlags->_h + 4) == 0)) { + if ((GHIDRA_INT(maskedFlags->_l) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) == 0) && + (GHIDRA_INT(maskedFlags->_h) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) == 0)) { perpX = -fVar2; } else { @@ -3165,14 +3165,14 @@ LAB_00967b6b: rootKnife = (EntityPtr)this; do { if (*(int *)((char *)ancestor + 0x28) != 8) break; - parentSlot = (EntityPtr *)((int)ancestor + 0x3bc); + parentSlot = (EntityPtr *)(GHIDRA_INT(ancestor) + 0x3bc); rootKnife = ancestor; ancestor = *parentSlot; } while (*parentSlot != (EntityPtr)0x0); local_10.y = perpX; if (rootKnife != (EntityPtr)this) { rngState = this->_initSeed; - local_24._4_8_ = 0x900000005; + (*(undefined8 *)((char *)&(local_24) + 0x4)) = 0x900000005; local_14 = 9.80909e-45; if (rngState == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -3183,7 +3183,7 @@ LAB_00967b6b: rngState = rngState >> 5 ^ rngState; rngState = rngState << 9 ^ rngState; rngState = rngState >> 7 ^ rngState; - fVar2 = (float)((double)(int)rngState + __uint_to_double_fixup[-((int)rngState >> 0x1f)]) * + fVar2 = (float)((double)GHIDRA_INT(rngState) + __uint_to_double_fixup[-(GHIDRA_INT(rngState) >> 0x1f)]) * 2.3283062e-10; wigglePhase = (fVar2 + fVar2) * 3.1415927; local_14 = wigglePhase; @@ -3240,10 +3240,10 @@ void Entity_Knife::Interpolate() subtype = this->_subtype; if (subtype == 0) { - if ((((uint)(this->_tearFlags)._l & (uint)g_tearFlagLudovico._l) == 0 && - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagLudovico._l._4_4_) == 0) && - (((uint)(this->_tearFlags)._h & (uint)g_tearFlagLudovico._h) == 0 && - (*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagLudovico._h._4_4_) == 0)) { + if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagLudovico._l)) == 0 && + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagLudovico._l) + 0x4))) == 0) && + ((GHIDRA_UINT((this->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagLudovico._h)) == 0 && + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagLudovico._h) + 0x4))) == 0)) { this->_isInterpolating = 1; this->Update(); (this->_preInterpolatePos).x = (this->_pos).x; @@ -3337,7 +3337,7 @@ void Entity_Knife::Reset() isLess = ch < *idleCursor; if (ch != *idleCursor) { LAB_00968090: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_00968095; } if (ch == 0) break; @@ -3385,7 +3385,7 @@ void Entity_Knife::SetAttackAnimation() local_14 = (byte ****)0xffffffff; puStack_18 = &LAB_00af85cd; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(curAnim + 0xb); + local_24 = __security_cookie ^ GHIDRA_UINT((curAnim + 0xb)); ExceptionList = &local_1c; if (g_game->_frameCount == this->_spawnFrame) { this->_displayRotation = this->_rotation; @@ -3457,7 +3457,7 @@ LAB_00968177: if (0xfff < size) { pppppbVar1 = (byte *****)curAnim[0][-1]; size = curAnimCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)curAnim[0] + (-4 - (int)pppppbVar1))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(curAnim[0]) + (-4 - GHIDRA_INT(pppppbVar1)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -3561,10 +3561,10 @@ switchD_0096846e_caseD_b: local_c = 0.5; } local_10 = 7.53899e-43; - local_c = ((float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + local_c = ((float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 0.9) * local_c; seed_fart_sound_override((int *)&local_10); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_10,1.0,2,0,local_c,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_10),1.0,2,0,local_c,0.0); this->_isDeadEyeHit = 0; *(undefined2 *)&this->_isSwinging = 1; this->_isSpinAttack = 1; @@ -3591,7 +3591,7 @@ byte Entity_Knife::drain_notched_axe(int charge) uint local_c; Manager *manager; - local_c = __security_cookie ^ (uint)&local_3c; + local_c = __security_cookie ^ GHIDRA_UINT(&local_3c); player = GetPlayer(player); if ((((player == (Entity_Player *)0x0) || (iVar3 = *(int *)&(*(undefined1 *)((char *)(player) + 0x4f4)), iVar3 == 0)) || (*(int *)(iVar3 + 0x28) != 8)) || (*(char *)(iVar3 + 0x171) == '\0')) { @@ -3602,7 +3602,7 @@ byte Entity_Knife::drain_notched_axe(int charge) return 0; } uVar2 = ((Entity_Player *)(player))->Entity_Player::GetActiveItemSlot(0x93); - if (-1 < (int)uVar2) { + if (-1 < GHIDRA_INT(uVar2)) { Entity_Player::AddActiveCharge(player,-charge,uVar2,0,0,0); iVar3 = ((Entity_Player *)(player))->Entity_Player::GetActiveItem(uVar2); if (0 < iVar3) { @@ -3614,20 +3614,20 @@ byte Entity_Knife::drain_notched_axe(int charge) manager = g_manager; local_3c = 6.474e-43; seed_fart_sound_override((int *)&local_3c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_3c,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_3c),1.0,2,0,1.0,0.0); manager = g_manager; local_3c = 1.93379e-43; seed_fart_sound_override((int *)&local_3c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_3c,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_3c),1.0,2,0,1.0,0.0); ((Color *)(&particleColor))->Color::Color(); uVar2 = Random(); Game::SpawnParticles (g_game,&player->_pos,0x1b,2, - (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10 * 4.0 + 3.0,color,100000.0,0); ((Color *)(&particleColor))->Color::Color(); uVar2 = Random(); - local_3c = (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + local_3c = (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10 * 3.0 + 2.0; uVar2 = Random(); Game::SpawnParticles(g_game,&player->_pos,0x56,(uVar2 & 1) + 2,local_3c,color_00,100000.0,0); @@ -3748,7 +3748,7 @@ void Entity_Knife::UpdateSwingHits() ehState = 0xffffffff; puStack_18 = &LAB_00b0c980; savedExceptionList = ExceptionList; - stackCookie = __security_cookie ^ (uint)(local_50 + 0x40); + stackCookie = __security_cookie ^ GHIDRA_UINT((local_50 + 0x40)); local_e8 = 0.0; if (this->_isInterpolating != 0) { return; @@ -3812,8 +3812,8 @@ LAB_00968980: } if ((this->_subtype == 4) || (local_7d != '\0')) { maskedFlags = BitSet128::operator_and(&hitTearFlags,&this->_tearFlags,&g_tearFlagWait); - if ((((int)maskedFlags->_l == 0 && *(int *)((int)&maskedFlags->_l + 4) == 0) && - ((int)maskedFlags->_h == 0 && *(int *)((int)&maskedFlags->_h + 4) == 0)) || + if (((GHIDRA_INT(maskedFlags->_l) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) == 0) && + (GHIDRA_INT(maskedFlags->_h) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) == 0)) || ((iVar6 = ((ANM2 *)(&this->_sprite))->ANM2::GetFrame(), iVar6 < 5 || (0x1d < g_game->_frameCount - this->_spawnFrame)))) { LAB_00968b38: @@ -3821,8 +3821,8 @@ LAB_00968b38: local_c0 = (Entity_Knife *)(this->_sprite)._animState._animFrame; dVar18 = floor((double)(float)local_c0); local_c0 = (Entity_Knife *)(float)dVar18; - local_a8 = CONCAT44((int)dVar18,(GridEntity *)local_a8); - if (5 < (int)dVar18 - 2U) goto LAB_00968b48; + local_a8 = CONCAT44(GHIDRA_INT(dVar18),(GridEntity *)local_a8); + if (5 < GHIDRA_INT(dVar18) - 2U) goto LAB_00968b48; isHitFrame = true; } else { @@ -3847,10 +3847,10 @@ LAB_00968b6e: } damage = damage * this->_collisionDamage; isHitAnything = isHitAnything & 0xffffff00; - hitTearFlags._l._0_4_ = (uint)(this->_tearFlags)._l; - hitTearFlags._l._4_4_ = *(uint *)((int)&(this->_tearFlags)._l + 4); - hitTearFlags._h._0_4_ = (uint)(this->_tearFlags)._h; - hitTearFlags._h._4_4_ = *(uint *)((int)&(this->_tearFlags)._h + 4); + (*(undefined4 *)((char *)&(hitTearFlags._l) + 0x0)) = GHIDRA_UINT((this->_tearFlags)._l); + (*(undefined4 *)((char *)&(hitTearFlags._l) + 0x4)) = *(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); + (*(undefined4 *)((char *)&(hitTearFlags._h) + 0x0)) = GHIDRA_UINT((this->_tearFlags)._h); + (*(undefined4 *)((char *)&(hitTearFlags._h) + 0x4)) = *(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); if (ownerPlayer == (Entity_Player *)0x0) { local_f8.x = (this->_pos).x; local_f8.y = (this->_pos).y; @@ -3861,10 +3861,10 @@ LAB_00968b6e: } local_84 = this->_displayRotation * 0.017453292; knockbackOrigin = &local_f8; - tearFlagsCopy._l._0_4_ = (uint)hitTearFlags._l; - tearFlagsCopy._l._4_4_ = hitTearFlags._l._4_4_; - tearFlagsCopy._h._0_4_ = (uint)hitTearFlags._h; - tearFlagsCopy._h._4_4_ = hitTearFlags._h._4_4_; + (*(undefined4 *)((char *)&(tearFlagsCopy._l) + 0x0)) = GHIDRA_UINT(hitTearFlags._l); + (*(undefined4 *)((char *)&(tearFlagsCopy._l) + 0x4)) = (*(undefined4 *)((char *)&(hitTearFlags._l) + 0x4)); + (*(undefined4 *)((char *)&(tearFlagsCopy._h) + 0x0)) = GHIDRA_UINT(hitTearFlags._h); + (*(undefined4 *)((char *)&(tearFlagsCopy._h) + 0x4)) = (*(undefined4 *)((char *)&(hitTearFlags._h) + 0x4)); local_c0 = (Entity_Knife *)&this->_pos; local_100.y = sin(local_84); fVar14 = cos(local_84); @@ -3876,14 +3876,14 @@ LAB_00968b6e: ((Capsule *)((Capsule *)&extraCapsule))->Capsule::constructor(&g_vectorZero,&g_vectorZero,0.0,0.0); if ((*(int *)&g_game->_deathmatchManager < 2) || (this->_variant != 3)) { if (this->_variant == 0xb) { - hitTearFlags._l._0_4_ = (uint)tearFlagsCopy._l | (uint)g_tearFlagShielded._l; - hitTearFlags._l._4_4_ = tearFlagsCopy._l._4_4_ | g_tearFlagShielded._l._4_4_; - hitTearFlags._h._0_4_ = (uint)tearFlagsCopy._h | (uint)g_tearFlagShielded._h; - hitTearFlags._h._4_4_ = tearFlagsCopy._h._4_4_ | g_tearFlagShielded._h._4_4_; - tearFlagsCopy._l._0_4_ = (uint)hitTearFlags._l; - tearFlagsCopy._l._4_4_ = hitTearFlags._l._4_4_; - tearFlagsCopy._h._0_4_ = (uint)hitTearFlags._h; - tearFlagsCopy._h._4_4_ = hitTearFlags._h._4_4_; + (*(undefined4 *)((char *)&(hitTearFlags._l) + 0x0)) = GHIDRA_UINT(tearFlagsCopy._l) | GHIDRA_UINT(g_tearFlagShielded._l); + (*(undefined4 *)((char *)&(hitTearFlags._l) + 0x4)) = (*(undefined4 *)((char *)&(tearFlagsCopy._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagShielded._l) + 0x4)); + (*(undefined4 *)((char *)&(hitTearFlags._h) + 0x0)) = GHIDRA_UINT(tearFlagsCopy._h) | GHIDRA_UINT(g_tearFlagShielded._h); + (*(undefined4 *)((char *)&(hitTearFlags._h) + 0x4)) = (*(undefined4 *)((char *)&(tearFlagsCopy._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagShielded._h) + 0x4)); + (*(undefined4 *)((char *)&(tearFlagsCopy._l) + 0x0)) = GHIDRA_UINT(hitTearFlags._l); + (*(undefined4 *)((char *)&(tearFlagsCopy._l) + 0x4)) = (*(undefined4 *)((char *)&(hitTearFlags._l) + 0x4)); + (*(undefined4 *)((char *)&(tearFlagsCopy._h) + 0x0)) = GHIDRA_UINT(hitTearFlags._h); + (*(undefined4 *)((char *)&(tearFlagsCopy._h) + 0x4)) = (*(undefined4 *)((char *)&(hitTearFlags._h) + 0x4)); } } else { @@ -3917,19 +3917,19 @@ LAB_00968b6e: (void *)(((float)extraCapsule._flags + (float)extraCapsule._entity) * local_98 - (float)extraCapsule._flags); tipCapsule._spawnerType = - (int)((float)tipCapsule._type - (float)tipCapsule._entity * tipCapsule._velocity.x); + GHIDRA_INT(((float)tipCapsule._type - (float)tipCapsule._entity * tipCapsule._velocity.x)); tipCapsule._spawnerVariant = - (int)((float)tipCapsule._variant - (float)tipCapsule._entity * tipCapsule._velocity.y); + GHIDRA_INT(((float)tipCapsule._variant - (float)tipCapsule._entity * tipCapsule._velocity.y)); tipCapsule._position.x = (float)tipCapsule._type + (float)tipCapsule._entity * tipCapsule._velocity.x; tipCapsule._position.y = (float)tipCapsule._variant + (float)tipCapsule._entity * tipCapsule._velocity.y; extraCapsule._spawnerType = - (int)((float)extraCapsule._type - - (float)extraCapsule._entity * extraCapsule._velocity.x); + GHIDRA_INT(((float)extraCapsule._type - + (float)extraCapsule._entity * extraCapsule._velocity.x)); extraCapsule._spawnerVariant = - (int)((float)extraCapsule._variant - - (float)extraCapsule._entity * extraCapsule._velocity.y); + GHIDRA_INT(((float)extraCapsule._variant - + (float)extraCapsule._entity * extraCapsule._velocity.y)); extraCapsule._position.x = (float)extraCapsule._type + (float)extraCapsule._entity * extraCapsule._velocity.x; extraCapsule._position.y = @@ -3937,7 +3937,7 @@ LAB_00968b6e: } LAB_00968f51: pvVar9 = local_94; - if (((uint)g_game->_debugFlags >> 5 & 1) != 0) { + if ((GHIDRA_UINT(g_game->_debugFlags) >> 5 & 1) != 0) { if (0.0 < (float)tipCapsule._flags) { push_shape_points(local_94,(Capsule *)&tipCapsule); } @@ -3977,42 +3977,42 @@ LAB_00968f51: if (-1 < iVar6) { local_94 = (void *)room->_gridWidth; local_84 = local_98 / 40.0; - iVar7 = iVar6 / (int)local_94; - iVar6 = iVar6 % (int)local_94; + iVar7 = iVar6 / GHIDRA_INT(local_94); + iVar6 = iVar6 % GHIDRA_INT(local_94); dVar18 = ceil((double)local_84); - iVar13 = (int)dVar18; + iVar13 = GHIDRA_INT(dVar18); uVar8 = iVar6 - iVar13; loopIndex = 0; - if (0 < (int)uVar8) { + if (0 < GHIDRA_INT(uVar8)) { loopIndex = uVar8; } fVar15 = (float)(iVar7 - iVar13); fVar14 = 0.0; - if (0 < (int)fVar15) { + if (0 < GHIDRA_INT(fVar15)) { fVar14 = fVar15; } pvVar9 = (void *)(iVar13 + iVar6); - if ((int)pvVar9 < (int)local_94) { + if (GHIDRA_INT(pvVar9) < GHIDRA_INT(local_94)) { local_94 = pvVar9; } fVar15 = (float)(iVar13 + iVar7); fVar16 = (float)local_9c->_gridHeight; - if ((int)fVar15 < local_9c->_gridHeight) { + if (GHIDRA_INT(fVar15) < local_9c->_gridHeight) { fVar16 = fVar15; } local_100.y = fVar16; local_84 = fVar14; - if ((int)loopIndex <= (int)local_94) { + if (GHIDRA_INT(loopIndex) <= GHIDRA_INT(local_94)) { room = local_9c; do { uVar8 = loopIndex; local_128.y = fVar14; - if ((int)fVar14 <= (int)fVar16) { + if (GHIDRA_INT(fVar14) <= GHIDRA_INT(fVar16)) { do { - if (((((int)uVar8 < 0) || (room->_gridWidth <= (int)uVar8)) || - ((int)local_128.y < 0)) || - ((room->_gridHeight <= (int)local_128.y || - (iVar6 = room->_gridWidth * (int)local_128.y + uVar8, iVar6 < 0)))) { + if ((((GHIDRA_INT(uVar8) < 0) || (room->_gridWidth <= GHIDRA_INT(uVar8))) || + (GHIDRA_INT(local_128.y) < 0)) || + ((room->_gridHeight <= GHIDRA_INT(local_128.y) || + (iVar6 = room->_gridWidth * GHIDRA_INT(local_128.y) + uVar8, iVar6 < 0)))) { gridEntity = (GridEntity *)0x0; } else { @@ -4040,9 +4040,9 @@ LAB_00968f51: fVar14 = sin(local_15c.y); local_b8 = CONCAT44(fVar14,(undefined4)local_b8); fVar14 = cos(local_15c.y); - if (ABS(fVar14) <= ABS(local_b8._4_4_)) { + if (ABS(fVar14) <= ABS((*(undefined4 *)((char *)&(local_b8) + 0x4)))) { bridgeDirX = 0.0; - if (0.0 <= local_b8._4_4_) { + if (0.0 <= (*(undefined4 *)((char *)&(local_b8) + 0x4))) { bridgeDirY = 1.0; } else { @@ -4062,14 +4062,14 @@ LAB_00968f51: room = g_game->_room; fVar14 = (((float)(local_bc->_gridIndex % room->_gridWidth) * 40.0 + 40.0 + bridgeDirX * 40.0) - 40.0) / 40.0 + 0.5; - iVar7 = (int)fVar14; - iVar6 = (int)((((float)(local_bc->_gridIndex / room->_gridWidth) * 40.0 - + 120.0 + bridgeDirY * 40.0) - 120.0) / 40.0 + 0.5); + iVar7 = GHIDRA_INT(fVar14); + iVar6 = GHIDRA_INT(((((float)(local_bc->_gridIndex / room->_gridWidth) * 40.0 + + 120.0 + bridgeDirY * 40.0) - 120.0) / 40.0 + 0.5)); local_b8 = CONCAT44(iVar7,(undefined4)local_b8); if (((-1 < iVar7) && (((iVar7 < room->_gridWidth && (-1 < iVar6)) && (iVar6 < room->_gridHeight)))) && - (iVar6 = iVar6 * room->_gridWidth + (int)fVar14, -1 < iVar6)) { + (iVar6 = iVar6 * room->_gridWidth + GHIDRA_INT(fVar14), -1 < iVar6)) { if (iVar6 < 0x1c0) { gridEntity = room->_gridEntities[iVar6]; } @@ -4089,7 +4089,7 @@ LAB_00968f51: ExceptionList = savedExceptionList; return; } - isHitAnything = CONCAT31(isHitAnything._1_3_,1); + isHitAnything = CONCAT31((*(undefined1 *)((char *)&(isHitAnything) + 0x1)),1); } } } @@ -4098,8 +4098,8 @@ LAB_00968f51: local_74 = 0; local_70 = 0; local_6c = 0; - local_68._0_4_ = g_vectorZero.x; - local_68._4_4_ = g_vectorZero.y; + (*(undefined4 *)((char *)&(local_68) + 0x0)) = g_vectorZero.x; + (*(undefined4 *)((char *)&(local_68) + 0x4)) = g_vectorZero.y; local_60 = g_vectorZero.x; local_5c = g_vectorZero.y; local_58 = 0; @@ -4114,27 +4114,27 @@ LAB_00968f51: room = local_9c; uVar8 = loopIndex; } - local_128.y = (float)((int)local_128.y + 1); - } while ((int)local_128.y <= (int)local_100.y); + local_128.y = (float)(GHIDRA_INT(local_128.y) + 1); + } while (GHIDRA_INT(local_128.y) <= GHIDRA_INT(local_100.y)); fVar16 = local_100.y; fVar14 = local_84; } loopIndex = uVar8 + 1; - } while ((int)loopIndex <= (int)local_94); + } while (GHIDRA_INT(loopIndex) <= GHIDRA_INT(local_94)); } this = knife; } uVar8 = 0x1d; maskedFlags = BitSet128::operator_and ((BitSet128 *)maskResult,&tearFlagsCopy,&g_tearFlagShielded); - if ((((((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) || + if (((((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) || ((this->_variant == 4 || (this->_variant == 3)))) || - ((baseVariant == 10 && (this->_isSpinAttack != 0)))) && ((int)local_a8._4_4_ < 5)) { + ((baseVariant == 10 && (this->_isSpinAttack != 0)))) && ((*(undefined4 *)((char *)&(GHIDRA_INT(local_a8)) + 0x4)) < 5)) { uVar8 = 0x1f; } EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),&queryResults,&local_e0,local_98,uVar8) + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&queryResults,&local_e0,local_98,uVar8) ; ehState = 0; loopIndex = 0; @@ -4156,7 +4156,7 @@ LAB_00968f51: if (bVar4 == 0) goto LAB_0096a6af; } } - piVar10 = (int *)((int)EVar12 + 0x28); + piVar10 = (int *)(GHIDRA_INT(EVar12) + 0x28); if (*(int *)&g_game->_deathmatchManager < 2) { LAB_00969714: iVar6 = *piVar10; @@ -4178,25 +4178,25 @@ LAB_00969f92: pvVar9 = GetHitEntities(this); uVar8 = ((Entity *)((Entity *)EVar12))->Entity::GetHitListIndex(); sorted_vector_insert_unique(pvVar9,uVar8); - fVar14 = ((Vector *)((int)EVar12 + 0x33c))->x - knockbackOrigin->x; + fVar14 = ((Vector *)(GHIDRA_INT(EVar12) + 0x33c))->x - knockbackOrigin->x; local_84 = *(float *)((char *)EVar12 + 0x340) - knockbackOrigin->y; local_a8 = CONCAT44(fVar14,(GridEntity *)local_a8); fVar15 = sqrtf(fVar14 * fVar14 + local_84 * local_84); fVar14 = 0.0; if (fVar15 <= 0.0) { - fVar16 = (float)local_a8._4_4_; + fVar16 = (*(undefined4 *)((char *)&((float)local_a8) + 0x4)); fVar15 = local_84; } else { - fVar16 = (float)local_a8._4_4_ * (1.0 / fVar15); + fVar16 = (*(undefined4 *)((char *)&((float)local_a8) + 0x4)) * (1.0 / fVar15); fVar15 = (1.0 / fVar15) * local_84; } fVar2 = *(float *)((char *)EVar12 + 0x36c); if (fVar2 != 0.0) { targetVelocityY = *(float *)((char *)EVar12 + 0x364); - ((Vector *)((int)EVar12 + 0x360))->x = + ((Vector *)(GHIDRA_INT(EVar12) + 0x360))->x = (fVar16 * knockbackStrength) / fVar2 + - ((Vector *)((int)EVar12 + 0x360))->x; + ((Vector *)(GHIDRA_INT(EVar12) + 0x360))->x; *(float *)((char *)EVar12 + 0x364) = (fVar15 * knockbackStrength) / fVar2 + targetVelocityY; } @@ -4217,7 +4217,7 @@ LAB_0096a33e: pvVar9 = GetHitEntities(this); uVar8 = ((Entity *)((Entity *)EVar12))->Entity::GetHitListIndex(); sorted_vector_insert_unique(pvVar9,uVar8); - fVar14 = ((Vector *)((int)EVar12 + 0x33c))->x - *(float *)local_c0; + fVar14 = ((Vector *)(GHIDRA_INT(EVar12) + 0x33c))->x - *(float *)local_c0; local_84 = *(float *)((char *)EVar12 + 0x340) - *(float *)&(*(undefined1 *)((char *)(local_c0) + 0x4)); local_a8 = CONCAT44(fVar14,(GridEntity *)local_a8); @@ -4225,18 +4225,18 @@ LAB_0096a33e: fVar14 = 0.0; if (fVar15 <= 0.0) { fVar16 = local_84; - fVar15 = (float)local_a8._4_4_; + fVar15 = (*(undefined4 *)((char *)&((float)local_a8) + 0x4)); } else { fVar16 = local_84 * (1.0 / fVar15); - fVar15 = (float)local_a8._4_4_ * (1.0 / fVar15); + fVar15 = (*(undefined4 *)((char *)&((float)local_a8) + 0x4)) * (1.0 / fVar15); } fVar2 = *(float *)((char *)EVar12 + 0x36c); if (fVar2 != 0.0) { targetVelocityY = *(float *)((char *)EVar12 + 0x364); - ((Vector *)((int)EVar12 + 0x360))->x = + ((Vector *)(GHIDRA_INT(EVar12) + 0x360))->x = (fVar15 * knockbackStrength) / fVar2 + - ((Vector *)((int)EVar12 + 0x360))->x; + ((Vector *)(GHIDRA_INT(EVar12) + 0x360))->x; *(float *)((char *)EVar12 + 0x364) = (fVar16 * knockbackStrength) / fVar2 + targetVelocityY; } @@ -4273,22 +4273,22 @@ LAB_0096a33e: EntityRef::constructor ((EntityRef *)(local_50 + 4), *(Entity **)(extraout_EDX + 0x3bc)); - (*virtualFn)(damage,local_84,local_a8._4_4_,local_50 + 4,0x1e); + (*virtualFn)(damage,local_84,(*(undefined4 *)((char *)&(local_a8) + 0x4)),local_50 + 4,0x1e); goto LAB_0096a6a9; } } } } else if (*(EntityPtr *)((char *)EVar12 + 0x3bc) == (EntityPtr)player) { - tearFlagsCopy._l._0_4_ = *(uint *)((std_string *)((int)EVar12 + 0x428))->_buf; - tearFlagsCopy._l._4_4_ = *(uint *)((char *)EVar12 + 0x42c); - tearFlagsCopy._h._0_4_ = *(uint *)((char *)EVar12 + 0x430); - tearFlagsCopy._h._4_4_ = *(uint *)((char *)EVar12 + 0x434); + (*(undefined4 *)((char *)&(tearFlagsCopy._l) + 0x0)) = *(uint *)((std_string *)(GHIDRA_INT(EVar12) + 0x428))->_buf; + (*(undefined4 *)((char *)&(tearFlagsCopy._l) + 0x4)) = *(uint *)((char *)EVar12 + 0x42c); + (*(undefined4 *)((char *)&(tearFlagsCopy._h) + 0x0)) = *(uint *)((char *)EVar12 + 0x430); + (*(undefined4 *)((char *)&(tearFlagsCopy._h) + 0x4)) = *(uint *)((char *)EVar12 + 0x434); maskedFlags = BitSet128::operator_and ((BitSet128 *)&local_60,&tearFlagsCopy, &g_tearFlagLudovico); - if (((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) { + if ((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) { hitList = GetHitEntities(this); bVar4 = ((EntityList *)(hitList))->EntityList::HitListContains((Entity *)EVar12); if (bVar4 == 0) { @@ -4296,19 +4296,19 @@ LAB_0096a33e: uVar8 = ((Entity *)((Entity *)EVar12))->Entity::GetHitListIndex(); sorted_vector_insert_unique(pvVar9,uVar8); fVar14 = *(float *)((char *)EVar12 + 0x340) - *(float *)&(*(undefined1 *)((char *)(local_c0) + 0x4)); - local_84 = ((Vector *)((int)EVar12 + 0x33c))->x - *(float *)local_c0; + local_84 = ((Vector *)(GHIDRA_INT(EVar12) + 0x33c))->x - *(float *)local_c0; local_a8 = CONCAT44(fVar14,(GridEntity *)local_a8); fVar15 = sqrtf(fVar14 * fVar14 + local_84 * local_84); fVar14 = 0.0; if (fVar15 <= 0.0) { fVar16 = local_84; - fVar15 = (float)local_a8._4_4_; + fVar15 = (*(undefined4 *)((char *)&((float)local_a8) + 0x4)); } else { fVar16 = local_84 * (1.0 / fVar15); - fVar15 = (float)local_a8._4_4_ * (1.0 / fVar15); + fVar15 = (*(undefined4 *)((char *)&((float)local_a8) + 0x4)) * (1.0 / fVar15); } - ((Vector *)((int)EVar12 + 0x360))->x = fVar16 * knockbackStrength * 1.25; + ((Vector *)(GHIDRA_INT(EVar12) + 0x360))->x = fVar16 * knockbackStrength * 1.25; *(float *)((char *)EVar12 + 0x364) = fVar15 * knockbackStrength * 1.25; } } @@ -4323,31 +4323,31 @@ LAB_0096a33e: pvVar9 = GetHitEntities(this); uVar8 = ((Entity *)((Entity *)EVar12))->Entity::GetHitListIndex(); sorted_vector_insert_unique(pvVar9,uVar8); - local_84 = ((Vector *)((int)EVar12 + 0x33c))->x - knockbackOrigin->x; + local_84 = ((Vector *)(GHIDRA_INT(EVar12) + 0x33c))->x - knockbackOrigin->x; fVar14 = *(float *)((char *)EVar12 + 0x340) - knockbackOrigin->y; - local_a8._4_4_ = (Room *)fVar14; + (*(undefined4 *)((char *)&(local_a8) + 0x4)) = (Room *)fVar14; fVar15 = sqrtf(local_84 * local_84 + fVar14 * fVar14); fVar14 = local_84; if (0.0 < fVar15) { - local_a8._4_4_ = (Room *)((float)local_a8._4_4_ * (1.0 / fVar15)); + (*(undefined4 *)((char *)&(local_a8) + 0x4)) = (Room *)((*(undefined4 *)((char *)&((float)local_a8) + 0x4)) * (1.0 / fVar15)); fVar14 = local_84 * (1.0 / fVar15); } fVar15 = *(float *)((char *)EVar12 + 0x364); - fVar16 = ((Vector *)((int)EVar12 + 0x360))->x * 0.25; - ((Vector *)((int)EVar12 + 0x360))->x = fVar16; + fVar16 = ((Vector *)(GHIDRA_INT(EVar12) + 0x360))->x * 0.25; + ((Vector *)(GHIDRA_INT(EVar12) + 0x360))->x = fVar16; *(float *)((char *)EVar12 + 0x364) = fVar15 * 0.25; fVar15 = *(float *)((char *)EVar12 + 0x36c); if (fVar15 != 0.0) { fVar2 = *(float *)((char *)EVar12 + 0x364); - ((Vector *)((int)EVar12 + 0x360))->x = + ((Vector *)(GHIDRA_INT(EVar12) + 0x360))->x = fVar16 + (fVar14 * knockbackStrength) / fVar15; *(float *)((char *)EVar12 + 0x364) = - ((float)local_a8._4_4_ * knockbackStrength) / fVar15 + fVar2; + ((*(undefined4 *)((char *)&((float)local_a8) + 0x4)) * knockbackStrength) / fVar15 + fVar2; } manager = g_manager; local_a8 = CONCAT44(0x354,(GridEntity *)local_a8); - seed_fart_sound_override((int *)((int)&local_a8 + 4)); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_a8._4_4_,1.0,2,0,1.0,0.0); + seed_fart_sound_override((int *)(GHIDRA_INT(&local_a8) + 4)); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((*(undefined4 *)((char *)&(GHIDRA_INT(local_a8)) + 0x4)),1.0,2,0,1.0,0.0); goto LAB_0096a6a9; } } @@ -4355,18 +4355,18 @@ LAB_0096a33e: else { if (iVar6 != 9) goto LAB_0096a33e; if (((player != (Entity_Player *)0x0) && (*(byte *)((char *)EVar12 + 0x173) == 0)) && - (-50.0 < *(float *)(((ANM2 *)((int)EVar12 + 0x410))->_filename)._buf)) { + (-50.0 < *(float *)(((ANM2 *)(GHIDRA_INT(EVar12) + 0x410))->_filename)._buf)) { local_84 = *(float *)((char *)EVar12 + 0x340) - knockbackOrigin->y; - fVar14 = ((Vector *)((int)EVar12 + 0x33c))->x - knockbackOrigin->x; + fVar14 = ((Vector *)(GHIDRA_INT(EVar12) + 0x33c))->x - knockbackOrigin->x; local_a8 = CONCAT44(fVar14,(GridEntity *)local_a8); fVar15 = sqrtf(local_84 * local_84 + fVar14 * fVar14); fVar14 = 0.0; if (fVar15 <= 0.0) { - fVar16 = (float)local_a8._4_4_; + fVar16 = (*(undefined4 *)((char *)&((float)local_a8) + 0x4)); fVar15 = local_84; } else { - fVar16 = (float)local_a8._4_4_ * (1.0 / fVar15); + fVar16 = (*(undefined4 *)((char *)&((float)local_a8) + 0x4)) * (1.0 / fVar15); fVar15 = local_84 * (1.0 / fVar15); } if (this->_variant != 4) { @@ -4393,7 +4393,7 @@ LAB_0096973b: hitList = GetHitEntities(this); bVar4 = ((EntityList *)(hitList))->EntityList::HitListContains((Entity *)EVar12); if (bVar4 != 0) goto LAB_0096a6af; - iVar6 = *(int *)local_a8._4_4_; + iVar6 = *(*(undefined4 *)((char *)&((int *)local_a8) + 0x4)); if ((iVar6 != 0xf5) && (iVar6 != 0x124)) { pvVar9 = GetHitEntities(this); uVar8 = ((Entity *)((Entity *)EVar12))->Entity::GetHitListIndex(); @@ -4407,7 +4407,7 @@ LAB_0096973b: virtualFn = *(code **)(*(int *)EVar12 + 0x20); ((EntityRef *)((EntityRef *)(local_50 + 4)))->EntityRef::constructor((Entity *)knife->_parent); (*virtualFn)(0x447a0000,0,0,local_50 + 4,0x1e); - isHitAnything = CONCAT31(isHitAnything._1_3_,1); + isHitAnything = CONCAT31((*(undefined1 *)((char *)&(isHitAnything) + 0x1)),1); } else if (iVar6 == 0x3c3) { g_forceCollideDepth = g_forceCollideDepth + 1; @@ -4425,7 +4425,7 @@ LAB_0096973b: *(undefined4 *)((char *)EVar12 + 0xb64) = 0x10; if (EVar3 == (EntityPtr)0x0) { pushDelta = &local_e0; - local_e0.x = ((Vector *)((int)EVar12 + 0x33c))->x - (this->_pos).x; + local_e0.x = ((Vector *)(GHIDRA_INT(EVar12) + 0x33c))->x - (this->_pos).x; local_e0.y = *(float *)((char *)EVar12 + 0x340) - (this->_pos).y; } else { @@ -4445,23 +4445,23 @@ LAB_0096973b: fVar15 = local_98 * (18.0 / fVar14); pvVar9 = (void *)((float)local_94 * (18.0 / fVar14)); } - ((Vector *)((int)EVar12 + 0x360))->x = (float)pvVar9; + ((Vector *)(GHIDRA_INT(EVar12) + 0x360))->x = (float)pvVar9; *(float *)((char *)EVar12 + 0x364) = fVar15; - fVar14 = ((Vector *)((int)EVar12 + 0x334))->x; + fVar14 = ((Vector *)(GHIDRA_INT(EVar12) + 0x334))->x; fVar15 = sqrtf(fVar14 * fVar14 + *(float *)((char *)EVar12 + 0x338) * *(float *)((char *)EVar12 + 0x338)); fVar14 = 0.0; - if (local_b8._4_4_ <= 0.0) { + if ((*(undefined4 *)((char *)&(local_b8) + 0x4)) <= 0.0) { pvVar9 = local_94; fVar15 = local_98; } else { - fVar15 = (fVar15 + 0.1) / local_b8._4_4_; + fVar15 = (fVar15 + 0.1) / (*(undefined4 *)((char *)&(local_b8) + 0x4)); pvVar9 = (void *)((float)local_94 * fVar15); fVar15 = local_98 * fVar15; } - ((Vector *)((int)EVar12 + 0x334))->x = (float)pvVar9; + ((Vector *)(GHIDRA_INT(EVar12) + 0x334))->x = (float)pvVar9; *(float *)((char *)EVar12 + 0x338) = fVar15; *(float *)((char *)EVar12 + 0x37c) = *(float *)((char *)EVar12 + 0x37c) + 1.0; } @@ -4471,7 +4471,7 @@ LAB_0096973b: else if (iVar6 == 0x11) goto LAB_0096a6a9; LAB_009699e7: if (*(byte *)((char *)EVar12 + 0x173) == 0) { - local_98 = ((Vector *)((int)EVar12 + 0x33c))->x - knockbackOrigin->x; + local_98 = ((Vector *)(GHIDRA_INT(EVar12) + 0x33c))->x - knockbackOrigin->x; local_94 = (void *)(*(float *)((char *)EVar12 + 0x340) - knockbackOrigin->y); fVar14 = sqrtf(local_98 * local_98 + (float)local_94 * (float)local_94); if (0.0 < fVar14) { @@ -4490,11 +4490,11 @@ LAB_009699e7: fVar14 = *(float *)((char *)EVar12 + 0x36c); fVar15 = (knockbackStrength * 50.0) / (*(float *)((char *)EVar12 + 0x37c) + 50.0); if (fVar14 != 0.0) { - fVar16 = ((Vector *)((int)EVar12 + 0x360))->x; + fVar16 = ((Vector *)(GHIDRA_INT(EVar12) + 0x360))->x; *(float *)((char *)EVar12 + 0x364) = (*(float *)((char *)EVar12 + 0x39c) * (float)local_94 * fVar15) / fVar14 + *(float *)((char *)EVar12 + 0x364); - ((Vector *)((int)EVar12 + 0x360))->x = + ((Vector *)(GHIDRA_INT(EVar12) + 0x360))->x = (*(float *)((char *)EVar12 + 0x39c) * local_98 * fVar15) / fVar14 + fVar16; } if (isBurningAxe != '\0') { @@ -4513,18 +4513,18 @@ LAB_009699e7: local_b8 = CONCAT44((float)dVar18,(undefined4)local_b8); ((EntityRef *)((EntityRef *)(local_50 + 4)))->EntityRef::constructor((Entity *)player); Entity::AddKnockback - ((Entity *)EVar12,(EntityRef *)(local_50 + 4),&local_15c,(int)dVar18 + ((Entity *)EVar12,(EntityRef *)(local_50 + 4),&local_15c,GHIDRA_INT(dVar18) ,1); this = knife; } } local_a8 = 0; - local_b8 = CONCAT44((uint)(*(int *)&g_game->_deathmatchManager < 2) * 2 + 4, + local_b8 = CONCAT44(GHIDRA_UINT((*(int *)&g_game->_deathmatchManager < 2)) * 2 + 4, (undefined4)local_b8); bVar4 = ((Entity *)((Entity *)EVar12))->Entity::IsVulnerableEnemy((Entity *)0x0); if ((bVar4 == 0) || (player == (Entity_Player *)0x0)) { LAB_00969c8e: - local_9c = local_a8._4_4_; + local_9c = (*(undefined4 *)((char *)&(local_a8) + 0x4)); local_bc = (GridEntity *)local_a8; } else { @@ -4533,7 +4533,7 @@ LAB_00969c8e: bVar4 = ((Entity_Player *)(player))->Entity_Player::HasCollectible(0x97,0); if (bVar4 != 0) { uVar8 = Random(); - if (uVar8 % (uint)local_b8._4_4_ == 0) goto LAB_00969c7c; + if (uVar8 % (*(undefined4 *)((char *)&(GHIDRA_UINT(local_b8)) + 0x4)) == 0) goto LAB_00969c7c; } goto LAB_00969c8e; } @@ -4543,13 +4543,13 @@ LAB_00969c7c: local_bc = (GridEntity *)0x4000; } if (this->_variant == 9) { - local_bc = (GridEntity *)((uint)local_bc | 0x1000000); + local_bc = (GridEntity *)(GHIDRA_UINT(local_bc) | 0x1000000); } if ((this->_flags & 0x400000000) != 0) { - local_bc = (GridEntity *)((uint)local_bc | 0x20000000); + local_bc = (GridEntity *)(GHIDRA_UINT(local_bc) | 0x20000000); } if (isBurningAxe != '\0') { - local_9c = (Room *)((uint)local_9c | 2); + local_9c = (Room *)(GHIDRA_UINT(local_9c) | 2); } virtualFn = *(code **)(*(int *)EVar12 + 0x20); ((EntityRef *)((EntityRef *)(local_50 + 4)))->EntityRef::constructor((Entity *)knife->_parent); @@ -4565,26 +4565,26 @@ LAB_00969c7c: } else { local_a8 = CONCAT44(0x4d,(GridEntity *)local_a8); - seed_fart_sound_override((int *)((int)&local_a8 + 4)); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_a8._4_4_,1.0,10,0,1.5,0.0) + seed_fart_sound_override((int *)(GHIDRA_INT(&local_a8) + 4)); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((*(undefined4 *)((char *)&(GHIDRA_INT(local_a8)) + 0x4)),1.0,10,0,1.5,0.0) ; pEVar11 = knife; - flags._l._4_4_ = hitTearFlags._l._4_4_; - flags._l._0_4_ = (uint)hitTearFlags._l; - flags._h._0_4_ = (uint)hitTearFlags._h; - flags._h._4_4_ = hitTearFlags._h._4_4_; + (*(undefined4 *)((char *)&(flags._l) + 0x4)) = (*(undefined4 *)((char *)&(hitTearFlags._l) + 0x4)); + (*(undefined4 *)((char *)&(flags._l) + 0x0)) = GHIDRA_UINT(hitTearFlags._l); + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = GHIDRA_UINT(hitTearFlags._h); + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = (*(undefined4 *)((char *)&(hitTearFlags._h) + 0x4)); Entity_Tear::ApplyTearFlagEffects ((Entity *)EVar12,&knife->_pos,flags,(Entity *)knife,damage); if (pEVar11->_variant == 3) { iVar6 = player->_damageCooldown; if (iVar6 < 1) { - *(int *)&player->_flags = (int)player->_flags; - puVar1 = (uint *)((int)&player->_flags + 4); + *(int *)&player->_flags = GHIDRA_INT(player->_flags); + puVar1 = (uint *)(GHIDRA_INT(&player->_flags) + 4); *puVar1 = *puVar1 | 0x10; pEVar11 = knife; } local_b8 = CONCAT44(0xf,(undefined4)local_b8); - piVar10 = (int *)((int)&local_b8 + 4); + piVar10 = (int *)(GHIDRA_INT(&local_b8) + 4); if (0xe < iVar6) { piVar10 = &player->_damageCooldown; } @@ -4602,7 +4602,7 @@ LAB_00969c7c: ExceptionList = savedExceptionList; return; } - local_100.x = ((Vector *)((int)EVar12 + 0x33c))->x; + local_100.x = ((Vector *)(GHIDRA_INT(EVar12) + 0x33c))->x; local_100.y = *(float *)((char *)EVar12 + 0x340); apply_hit_effects(pEVar11,&tipPos,(Entity *)EVar12,&local_100, *(float *)((char *)EVar12 + 0x370),damage, @@ -4623,12 +4623,12 @@ LAB_00969c7c: (*(undefined1 *)((char *)(pEVar11) + 0x4e9)) = 1; if ((local_7d != '\0') && (*(int *)((char *)local_d4 + 0x28) != 2)) { (*(undefined1 *)((char *)(pEVar11) + 0x466)) = 0; - isHitAnything = CONCAT31(isHitAnything._1_3_,1); + isHitAnything = CONCAT31((*(undefined1 *)((char *)&(isHitAnything) + 0x1)),1); goto LAB_0096a6af; } } fVar14 = 0.0; - isHitAnything = CONCAT31(isHitAnything._1_3_,1); + isHitAnything = CONCAT31((*(undefined1 *)((char *)&(isHitAnything) + 0x1)),1); goto LAB_0096a6af; } } @@ -4638,7 +4638,7 @@ LAB_0096a6a9: } LAB_0096a6af: loopIndex = loopIndex + 1; - if ((uint)queryResults._size <= loopIndex) break; + if (GHIDRA_UINT(queryResults._size) <= loopIndex) break; this = knife; } while( true ); } @@ -4662,7 +4662,7 @@ LAB_0096a6af: if (this->_variant == 9) { DAT_00c7ac6c = (Entity_Player *)0x0; } - if (queryResults._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(queryResults) + 0x0)) == '\0') { ehState = 1; tracked_alloc(1,queryResults._data,0); ehState = 0xffffffff; @@ -4672,13 +4672,13 @@ LAB_0096a6af: if (this->_subtype == 4) goto LAB_0096ae0c; if (0 < *(short *)&(*(undefined1 *)((char *)(this) + 0x4ec))) { swingIndex = *(short *)&(*(undefined1 *)((char *)(this) + 0x4ee)); - if (((int)swingIndex & 1U) == 0) { + if ((GHIDRA_INT(swingIndex) & 1U) == 0) { local_d0 = this->_parent; if ((local_d0 != (EntityPtr)0x0) && (*(int *)((char *)local_d0 + 0x28) == 8)) { local_d0 = *(EntityPtr *)((char *)local_d0 + 0x3bc); } EVar12 = local_d0; - local_d4 = (EntityPtr)((int)swingIndex / 2 & 0xffffff01); + local_d4 = (EntityPtr)(GHIDRA_INT(swingIndex) / 2 & 0xffffff01); if (baseVariant == 1) { curAnimName = ((ANM2 *)((ANM2 *)&(this->_sprite)._animState))->ANM2::GetAnimation((std_string *)local_68) ; @@ -4695,11 +4695,11 @@ LAB_0096a6af: LAB_0096a80d: local_7d = '\0'; } - if (((uint)local_e8 & 1) != 0) { + if ((GHIDRA_UINT(local_e8) & 1) != 0) { ((std::string *)(local_68))->std::string::_Tidy_deallocate(); } if (local_7d != '\0') { - local_d4 = (EntityPtr)((uint)local_d4 ^ 1); + local_d4 = (EntityPtr)(GHIDRA_UINT(local_d4) ^ 1); } if (EVar12 != (EntityPtr)0x0) { if (*(int *)((char *)EVar12 + 0x28) == 1) { @@ -4715,11 +4715,11 @@ LAB_0096a80d: } if (this->_variant == 3) { auVar17 = ZEXT812(0x41a00000); - if (auVar17._0_4_ <= local_e8) { - auVar17._4_8_ = auVar17._4_8_; - auVar17._0_4_ = local_e8; + if ((*(undefined4 *)((char *)&(auVar17) + 0x0)) <= local_e8) { + (*(undefined8 *)((char *)&(auVar17) + 0x4)) = (*(undefined8 *)((char *)&(auVar17) + 0x4)); + (*(undefined4 *)((char *)&(auVar17) + 0x0)) = local_e8; } - swingDistance = auVar17._0_4_; + swingDistance = (*(undefined4 *)((char *)&(auVar17) + 0x0)); local_e8 = swingDistance; } local_b8 = CONCAT44((this->_sprite)._scale.x,(undefined4)local_b8); @@ -4749,15 +4749,15 @@ LAB_0096a80d: pEVar11->_rotation = this->_rotation + this->_rotationOffset; } else { - (pEVar11->_targetPosition).x = local_b8._4_4_ * 5.0 * (float)(int)swingIndex + local_e8; + (pEVar11->_targetPosition).x = (*(undefined4 *)((char *)&(local_b8) + 0x4)) * 5.0 * (float)GHIDRA_INT(swingIndex) + local_e8; uVar8 = Random(); pEVar11->_rotation = - ((float)((double)(int)uVar8 + __uint_to_double_fixup[-((int)uVar8 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar8) + __uint_to_double_fixup[-(GHIDRA_INT(uVar8) >> 0x1f)]) * 2.3283064e-10 * 30.0 - 15.0) + this->_rotation + this->_rotationOffset; uVar8 = Random(); SoundEffects::PlayWithFartOverride (0xfc,1.0,1,0, - (float)((double)(int)uVar8 + __uint_to_double_fixup[-((int)uVar8 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar8) + __uint_to_double_fixup[-(GHIDRA_INT(uVar8) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 0.9); } pEVar11->_mass = this->_mass; @@ -4766,20 +4766,20 @@ LAB_0096a80d: pEVar11->SetColor(&(this->_sprite)._color,0xffffffff,0xff,0,1); (pEVar11->_sprite)._scale.x = (this->_sprite)._scale.x; (pEVar11->_sprite)._scale.y = (this->_sprite)._scale.y; - uVar19 = *(undefined4 *)((int)&(this->_tearFlags)._l + 4); + uVar19 = *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); tearFlagsHigh = (this->_tearFlags)._h; - uVar20 = *(undefined4 *)((int)&(this->_tearFlags)._h + 4); + uVar20 = *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); iVar6 = *(int *)pEVar11; - *(int *)&(pEVar11->_tearFlags)._l = (int)(this->_tearFlags)._l; - *(undefined4 *)((int)&(pEVar11->_tearFlags)._l + 4) = uVar19; - *(int *)&(pEVar11->_tearFlags)._h = (int)tearFlagsHigh; - *(undefined4 *)((int)&(pEVar11->_tearFlags)._h + 4) = uVar20; + *(int *)&(pEVar11->_tearFlags)._l = GHIDRA_INT((this->_tearFlags)._l); + *(undefined4 *)(GHIDRA_INT(&(pEVar11->_tearFlags)._l) + 4) = uVar19; + *(int *)&(pEVar11->_tearFlags)._h = GHIDRA_INT(tearFlagsHigh); + *(undefined4 *)(GHIDRA_INT(&(pEVar11->_tearFlags)._h) + 4) = uVar20; (**(code **)(iVar6 + 0x40))(this->_collisionDamage); ((EntityPtr *)((EntityPtr *)&(*(undefined1 *)((char *)(pEVar11) + 0x4f4))))->EntityPtr::SetReference((Entity *)this); ((EntityPtr *)((EntityPtr *)&(*(undefined1 *)((char *)(this) + 0x4f8))))->EntityPtr::SetReference((Entity *)pEVar11); if (baseVariant == 1) { anim = "Swing"; - if (local_d4._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_d4) + 0x0)) == '\0') { anim = "Swing2"; } ((ANM2 *)(&pEVar11->_sprite))->ANM2::Play((byte *)anim,1); @@ -4826,28 +4826,28 @@ LAB_0096a80d: ((Entity *)(ownerPlayer))->Entity::SetParent((Entity *)local_c0); iVar6 = *(int *)ownerPlayer; ownerPlayer->_renderDepthOffset = 3000.0; - uVar19 = *(undefined4 *)((int)&(this->_tearFlags)._l + 4); + uVar19 = *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); tearFlagsHigh = (this->_tearFlags)._h; - iVar7 = *(int *)((int)&(this->_tearFlags)._h + 4); - *(int *)&ownerPlayer[1]._pendingDamageFlags = (int)(this->_tearFlags)._l; - *(undefined4 *)((int)&ownerPlayer[1]._pendingDamageFlags + 4) = uVar19; - ownerPlayer[1]._index = (int)tearFlagsHigh; + iVar7 = *(int *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); + *(int *)&ownerPlayer[1]._pendingDamageFlags = GHIDRA_INT((this->_tearFlags)._l); + *(undefined4 *)(GHIDRA_INT(&ownerPlayer[1]._pendingDamageFlags) + 4) = uVar19; + ownerPlayer[1]._index = GHIDRA_INT(tearFlagsHigh); ownerPlayer[1]._collisionIndex = iVar7; (**(code **)(iVar6 + 0x40))(this->_collisionDamage); - *(undefined1 *)((int)ownerPlayer[1]._sprite._color._colorize + 5) = 1; + *(undefined1 *)(GHIDRA_INT(ownerPlayer[1]._sprite._color._colorize) + 5) = 1; spawnedEntity = ownerPlayer + 1; (spawnedEntity->_sprite)._filename._buf[0] = '\x03'; (spawnedEntity->_sprite)._filename._buf[1] = '\0'; (spawnedEntity->_sprite)._filename._buf[2] = '\0'; (spawnedEntity->_sprite)._filename._buf[3] = '\0'; - *(float *)&ownerPlayer[1]._sprite._overlayAnimState._isPlaying = local_b8._4_4_; + *(float *)&ownerPlayer[1]._sprite._overlayAnimState._isPlaying = (*(undefined4 *)((char *)&(local_b8) + 0x4)); ((Entity *)(ownerPlayer))->Entity::SetSpawnerEntity((Entity *)player); ownerPlayer->Update(); pEVar11 = local_c0; } if ((((EntityPtr)player == local_d0) && (isToolVariant == '\0')) && (bVar4 = ((Entity_Player *)(player))->Entity_Player::HasCollectible(0x19a,0), bVar4 != 0)) { - iVar7 = 0xf - (int)player->_luck; + iVar7 = 0xf - GHIDRA_INT(player->_luck); iVar6 = 5; if (5 < iVar7) { iVar6 = iVar7; @@ -4859,7 +4859,7 @@ LAB_0096a80d: local_b8 = CONCAT44(fVar14,(undefined4)local_b8); local_f8.x = cos(fVar14); local_f8.x = local_f8.x * 3.0; - local_f8.y = sin(local_b8._4_4_); + local_f8.y = sin((*(undefined4 *)((char *)&(local_b8) + 0x4))); this = knife; local_f0.x = (pEVar11->_pos).x; local_f8.y = local_f8.y * 3.0; diff --git a/src/game/entity_laser.cpp b/src/game/entity_laser.cpp index f40da76..3cf7d38 100644 --- a/src/game/entity_laser.cpp +++ b/src/game/entity_laser.cpp @@ -96,17 +96,17 @@ void Entity_Laser::Constructor() (this->_parentOffset).y = 0.0; (this->_parentOffset).x = 0.0; *(undefined4 *)&(this->_tearFlags)._l = 0; - *(undefined4 *)((int)&(this->_tearFlags)._l + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) = 0; *(undefined4 *)&(this->_tearFlags)._h = 0; - *(undefined4 *)((int)&(this->_tearFlags)._h + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) = 0; *(undefined4 *)&(this->_activeTearFlags)._l = 0; - *(undefined4 *)((int)&(this->_activeTearFlags)._l + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_activeTearFlags)._l) + 4) = 0; *(undefined4 *)&(this->_activeTearFlags)._h = 0; - *(undefined4 *)((int)&(this->_activeTearFlags)._h + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_activeTearFlags)._h) + 4) = 0; *(undefined4 *)&(this->_heldTearFlags)._l = 0; - *(undefined4 *)((int)&(this->_heldTearFlags)._l + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_heldTearFlags)._l) + 4) = 0; *(undefined4 *)&(this->_heldTearFlags)._h = 0; - *(undefined4 *)((int)&(this->_heldTearFlags)._h + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_heldTearFlags)._h) + 4) = 0; ((HomingLaser *)(&this->_homingLaser))->HomingLaser::HomingLaser(); (this->_endPoint).y = 0.0; (this->_endPoint).x = 0.0; @@ -114,7 +114,7 @@ void Entity_Laser::Constructor() (this->_hitList)._end = (void *)0x0; (this->_hitList)._capacity = (void *)0x0; this->_parentLaser = (EntityPtr)0x0; - local_8 = CONCAT31(local_8._1_3_,3); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); _eh_vector_constructor_iterator_(this->_subLasers,4,2,FUN_0042a020,FUN_00579700); (this->_impactPosition).y = 0.0; (this->_impactPosition).x = 0.0; @@ -252,7 +252,7 @@ LAB_0096cfc9: hitList = (EntityList *)&this->_hitList; } else if (*(int *)((char *)EVar1 + 0x52c) == 0) { - hitList = (EntityList *)((int)EVar1 + 0x520); + hitList = (EntityList *)(GHIDRA_INT(EVar1) + 0x520); } else { hitList = (EntityList *)FUN_0096ce70(); @@ -382,7 +382,7 @@ void Entity_Laser::impact_tear_flag_effects(Vector *position, Vector *direction) Manager *manager; EntityPtr *spawnerSlot; - local_14 = __security_cookie ^ (uint)auStack_188; + local_14 = __security_cookie ^ GHIDRA_UINT(auStack_188); impactPos = position; local_13c = 1.0; spawnerIter = this->_spawnerEntity; @@ -405,10 +405,10 @@ void Entity_Laser::impact_tear_flag_effects(Vector *position, Vector *direction) } } pGVar6 = g_game; - uStack_164 = *(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagExplosive._h._4_4_; - if (((((uint)(this->_tearFlags)._l & (uint)g_tearFlagExplosive._l) == 0 && - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagExplosive._l._4_4_) == 0) && - (((uint)(this->_tearFlags)._h & (uint)g_tearFlagExplosive._h) == 0 && uStack_164 == 0)) || + uStack_164 = *(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagExplosive._h) + 0x4)); + if ((((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagExplosive._l)) == 0 && + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagExplosive._l) + 0x4))) == 0) && + ((GHIDRA_UINT((this->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagExplosive._h)) == 0 && uStack_164 == 0)) || ((this->_isFirstUpdate == 0 && (iVar9 = ((Entity *)((Entity *)this))->Entity::GetIntervalTicks(4.0,0.0), iVar9 == 0)))) goto LAB_0096e506; iVar9 = this->_subtype; @@ -441,10 +441,10 @@ LAB_0096d590: (pGVar6,&VStack_134,(float)piStack_180,this->_tearFlags,(Entity *)this,1.0); ((Game *)(g_game))->Game::BombDamage(&VStack_134,this->_collisionDamage + this->_collisionDamage + 10.0, (float)piStack_180,1,(Entity *)this,this->_tearFlags,4,0); - if ((((uint)(this->_tearFlags)._l & (uint)g_tearFlagPoison._l) != 0 || - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagPoison._l._4_4_) != 0) || - (((uint)(this->_tearFlags)._h & (uint)g_tearFlagPoison._h) != 0 || - (*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagPoison._h._4_4_) != 0)) { + if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagPoison._l)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagPoison._l) + 0x4))) != 0) || + ((GHIDRA_UINT((this->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagPoison._h)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagPoison._h) + 0x4))) != 0)) { uStack_120 = Random(); pGStack_138 = g_game; spawnGame[0] = 0; @@ -479,10 +479,10 @@ LAB_0096d990: (*pcVar2)(); return; } - uVar12 = (uint)piVar10 >> ((byte)uStack_dc & 0x1f) ^ (uint)piVar10; + uVar12 = GHIDRA_UINT(piVar10) >> ((byte)uStack_dc & 0x1f) ^ GHIDRA_UINT(piVar10); uVar12 = uVar12 << ((byte)((ulonglong)uStack_dc >> 0x20) & 0x1f) ^ uVar12; piVar10 = (int *)(uVar12 >> ((byte)spawnGame[1] & 0x1f) ^ uVar12); - iVar9 = ItemPool::GetCardEx((int)piVar10,0x19,10,10,1); + iVar9 = ItemPool::GetCardEx(GHIDRA_INT(piVar10),0x19,10,10,1); explosionColor._tint[1] = 7.00649e-45; explosionColor._tint[2] = 1.26117e-44; explosionColor._tint[3] = 9.80909e-45; @@ -509,11 +509,11 @@ LAB_0096d990: (*pcVar2)(); return; } - uVar12 = (uint)piVar10 >> ((byte)uStack_dc & 0x1f) ^ (uint)piVar10; + uVar12 = GHIDRA_UINT(piVar10) >> ((byte)uStack_dc & 0x1f) ^ GHIDRA_UINT(piVar10); uVar12 = uVar12 << ((byte)((ulonglong)uStack_dc >> 0x20) & 0x1f) ^ uVar12; piVar10 = (int *)(uVar12 >> ((byte)spawnGame[1] & 0x1f) ^ uVar12); piStack_180 = piVar10; - spawnGame[0] = ItemPool::GetPill((uint)piVar10); + spawnGame[0] = ItemPool::GetPill(GHIDRA_UINT(piVar10)); spawnGame[0] = spawnGame[0] | (uStack_12c & 1) << 0xb; } while( true ); } @@ -526,14 +526,14 @@ LAB_0096d7d2: else { uStack_12c = spawnGame[0]; std::set::find_node(&iStack_d0,&uStack_12c); - if (((*(char *)((int)CStack_cc._tint[1] + 0xd) == '\0') && - (*(int *)((int)CStack_cc._tint[1] + 0x10) <= (int)uVar14)) && + if (((*(char *)(GHIDRA_INT(CStack_cc._tint[1]) + 0xd) == '\0') && + (*(int *)(GHIDRA_INT(CStack_cc._tint[1]) + 0x10) <= GHIDRA_INT(uVar14))) && (CStack_cc._tint[1] != (float)pGVar6->_roomList[0].Dimension)) goto LAB_0096d7d2; bVar16 = true; } if ((uVar14 == 0) || (bVar16)) { pEStack_178 = (Entity *)(**(code **)(pGVar6->_stage + 0x84))(0); - spawnGame[0] = (uint)pEStack_178; + spawnGame[0] = GHIDRA_UINT(pEStack_178); } } } @@ -555,17 +555,17 @@ LAB_0096d998: piStack_180 = (int *)(timeNs >> 0x20); lVar3 = (timeNs & 0xffffffff) * 0x431bde82; fStack_168 = (float)((ulonglong)lVar3 >> 0x20); - uStack_164 = (uint)(ZEXT48(piStack_180) * 0xd7b634db >> 0x20); + uStack_164 = GHIDRA_UINT((ZEXT48(piStack_180) * 0xd7b634db >> 0x20)); timeNs = ZEXT48(piStack_180) * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); - uVar14 = (uint)(timeNs >> 0x20); + uVar14 = GHIDRA_UINT((timeNs >> 0x20)); lVar3 = lVar3 + (timeNs & 0xffffffff); VStack_148.x = (float)lVar3; - uVar12 = (uint)((ulonglong)lVar3 >> 0x20); + uVar12 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); lVar3 = ZEXT48(piStack_180) * 0x431bde82 + (ulonglong)CONCAT14(CARRY4(uVar14,uVar12),uVar14 + uVar12); - uVar12 = (uint)((ulonglong)lVar3 >> 0x20); + uVar12 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); spawnerSlot = (EntityPtr *)pGStack_17c->_roomList[5]._doors; - _uStack_170 = CONCAT44(uVar12 >> 0x12,(uint)lVar3 >> 0x12 | uVar12 * 0x4000); + _uStack_170 = CONCAT44(uVar12 >> 0x12,GHIDRA_UINT(lVar3) >> 0x12 | uVar12 * 0x4000); spawnerIter = *spawnerSlot; pGStack_17c->_roomList[0]._doors[1] = 0; pGStack_17c->_roomList[0]._doors[2] = 0; @@ -576,7 +576,7 @@ LAB_0096d998: iVar9 = pGVar6->_stage; *spawnerSlot = (EntityPtr)0x0; ((Vector *)&pGVar6->_roomList[4].TotalMoneySpent)->x = VStack_134.x; - pGVar6->_roomList[4].GreedSubType = (int)VStack_134.y; + pGVar6->_roomList[4].GreedSubType = GHIDRA_INT(VStack_134.y); ((Vector *)&pGVar6->_roomList[4].SavedGridEntities._end)->x = g_vectorZero.x; pGVar6->_roomList[4].SavedGridEntities._capacity = (void *)g_vectorZero.y; (**(code **)(iVar9 + 4))(uStack_118,uStack_114,pEStack_178,uStack_120); @@ -585,7 +585,7 @@ LAB_0096d998: iVar9 = *(int *)((char *)pvVar13 + 0x1214); *(int *)((char *)pvVar13 + 0x1214) = iVar9 + 1; pGVar6->_roomList[0].Dimension = iVar9; - ((EntityList *)((EntityList *)((int)pvVar13 + 0x1218)))->EntityList::AddEntity((Entity *)pGVar6); + ((EntityList *)((EntityList *)(GHIDRA_INT(pvVar13) + 0x1218)))->EntityList::AddEntity((Entity *)pGVar6); bVar8 = Game::ShouldEraseEnemy((Entity *)pGVar6); if (bVar8 != 0) { Entity::RemoveWithPoof((Entity *)pGVar6,unusedArg); @@ -606,17 +606,17 @@ LAB_0096d998: } uVar12 = 0; playerManager = &g_game->_playerManager; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar13 = (playerManager->_playerList)._end; - if ((int)pvVar13 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar13) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n" ); pvVar13 = (playerManager->_playerList)._end; } piVar10 = (playerManager->_playerList)._begin; - if (uVar12 < (uint)((int)pvVar13 - (int)piVar10 >> 2)) { + if (uVar12 < GHIDRA_UINT((GHIDRA_INT(pvVar13) - GHIDRA_INT(piVar10) >> 2))) { piVar10 = piVar10 + uVar12; } trigger_set_dispatch @@ -624,32 +624,32 @@ LAB_0096d998: &g_vectorZero); uVar12 = uVar12 + 1; playerManager = &g_game->_playerManager; - } while (uVar12 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar12 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } LAB_0096dc14: timeNs = GetTimeNs(); - uVar12 = (uint)(timeNs >> 0x20); + uVar12 = GHIDRA_UINT((timeNs >> 0x20)); lVar4 = (timeNs & 0xffffffff) * 0x431bde82; fStack_168 = (float)((ulonglong)lVar4 >> 0x20); lVar5 = (ulonglong)uVar12 * 0xd7b634db; - uStack_164 = (uint)((ulonglong)lVar5 >> 0x20); + uStack_164 = GHIDRA_UINT(((ulonglong)lVar5 >> 0x20)); lVar3 = (ulonglong)uVar12 * 0x431bde82; timeNs = lVar5 + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); - uVar14 = (uint)(timeNs >> 0x20); + uVar14 = GHIDRA_UINT((timeNs >> 0x20)); lVar4 = lVar4 + (timeNs & 0xffffffff); VStack_148.x = (float)lVar4; - uVar12 = (uint)((ulonglong)lVar4 >> 0x20); + uVar12 = GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)); lVar4 = lVar3 + (ulonglong)CONCAT14(CARRY4(uVar14,uVar12),uVar14 + uVar12); - uVar15 = (uint)((ulonglong)lVar4 >> 0x20); - uVar12 = (uint)lVar4 >> 0x12 | uVar15 * 0x4000; + uVar15 = GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)); + uVar12 = GHIDRA_UINT(lVar4) >> 0x12 | uVar15 * 0x4000; uVar14 = uVar12 - uStack_170; - bVar16 = CARRY4((uint)g_entitySpawnTimeMs,uVar14); - g_entitySpawnTimeMs._0_4_ = (uint)g_entitySpawnTimeMs + uVar14; - g_entitySpawnTimeMs._4_4_ = - g_entitySpawnTimeMs._4_4_ + - (((uVar15 >> 0x12) - effectVariant) - (uint)(uVar12 < uStack_170)) + (uint)bVar16; + bVar16 = CARRY4(GHIDRA_UINT(g_entitySpawnTimeMs),uVar14); + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x0)) = GHIDRA_UINT(g_entitySpawnTimeMs) + uVar14; + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) = + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) + + (((uVar15 >> 0x12) - effectVariant) - GHIDRA_UINT((uVar12 < uStack_170))) + GHIDRA_UINT(bVar16); } piStack_180 = (int *)((ulonglong)lVar3 >> 0x20); fStack_150 = (float)lVar3; @@ -659,10 +659,10 @@ LAB_0096dc14: uVar12 = Random(); uStack_98 = 0x3eaaaaab00000000; auStack_90 = (undefined1 [4])0x0; - fVar17 = ((float)((double)(int)uVar12 + __uint_to_double_fixup[-((int)uVar12 >> 0x1f)]) * + fVar17 = ((float)((double)GHIDRA_INT(uVar12) + __uint_to_double_fixup[-(GHIDRA_INT(uVar12) >> 0x1f)]) * 2.3283064e-10 + 1.0) * fStack_15c; - piVar10[0x39] = (int)fVar17; - piVar10[0x3a] = (int)fVar17; + piVar10[0x39] = GHIDRA_INT(fVar17); + piVar10[0x3a] = GHIDRA_INT(fVar17); CStack_cc._offset[1] = 0.0; CStack_cc._offset[2] = 0.0; fStack_a0 = 0.0; @@ -702,10 +702,10 @@ LAB_0096dc14: (*pcVar2)(); return; } - uVar12 = (uint)seed >> (VStack_110.x._0_1_ & 0x1f) ^ (uint)seed; - uVar12 = uVar12 << (VStack_110.y._0_1_ & 0x1f) ^ uVar12; + uVar12 = GHIDRA_UINT(seed) >> ((*(undefined1 *)((char *)&(VStack_110.x) + 0x0)) & 0x1f) ^ GHIDRA_UINT(seed); + uVar12 = uVar12 << ((*(undefined1 *)((char *)&(VStack_110.y) + 0x0)) & 0x1f) ^ uVar12; seed = (float)(uVar12 >> (SUB41(fStack_168,0) & 0x1f) ^ uVar12); - iVar9 = ItemPool::GetCardEx((int)seed,0x19,10,10,1); + iVar9 = ItemPool::GetCardEx(GHIDRA_INT(seed),0x19,10,10,1); explosionColor._tint[0] = 7.00649e-45; explosionColor._tint[1] = 1.26117e-44; explosionColor._tint[2] = 9.80909e-45; @@ -721,7 +721,7 @@ LAB_0096dc14: if (fVar17 != 0.0) { pcVar2 = *(code **)(*piStack_180 + 0x28); iVar9 = ItemPool::GetPillEffect - (&g_game->_itemPool,(uint)fVar17,(Entity_Player *)0x0); + (&g_game->_itemPool,GHIDRA_UINT(fVar17),(Entity_Player *)0x0); seed = fVar18; isRejected = (*pcVar2)(iVar9); if (isRejected == '\0') goto LAB_0096e030; @@ -732,17 +732,17 @@ LAB_0096dc14: (*pcVar2)(); return; } - uVar12 = (uint)seed >> (VStack_110.x._0_1_ & 0x1f) ^ (uint)seed; - uVar12 = uVar12 << (VStack_110.y._0_1_ & 0x1f) ^ uVar12; + uVar12 = GHIDRA_UINT(seed) >> ((*(undefined1 *)((char *)&(VStack_110.x) + 0x0)) & 0x1f) ^ GHIDRA_UINT(seed); + uVar12 = uVar12 << ((*(undefined1 *)((char *)&(VStack_110.y) + 0x0)) & 0x1f) ^ uVar12; seed = (float)(uVar12 >> (SUB41(fStack_168,0) & 0x1f) ^ uVar12); fVar18 = seed; - uVar12 = ItemPool::GetPill((uint)seed); - fVar17 = (float)(uVar12 | ((uint)fStack_160 & 1) << 0xb); + uVar12 = ItemPool::GetPill(GHIDRA_UINT(seed)); + fVar17 = (float)(uVar12 | (GHIDRA_UINT(fStack_160) & 1) << 0xb); } while( true ); } if (uVar12 == 100) { fStack_160 = fVar17; - std::set::find_node((int)&uStack_dc + 4,&fStack_160); + std::set::find_node(GHIDRA_INT(&uStack_dc) + 4,&fStack_160); if (((*(char *)(iStack_d0 + 0xd) == '\0') && (*(int *)(iStack_d0 + 0x10) < 5)) && (iStack_d0 != piVar10[8])) { bVar16 = false; @@ -765,27 +765,27 @@ LAB_0096dc14: } } LAB_0096e030: - pEStack_178 = ((EntityFactory *)(pGStack_17c->_entityFactory))->EntityFactory::Create((uint)fStack_184,0); + pEStack_178 = ((EntityFactory *)(pGStack_17c->_entityFactory))->EntityFactory::Create(GHIDRA_UINT(fStack_184),0); lVar3 = CONCAT44(poisonEffectSeed,local_13c); if (pEStack_178 != (Entity *)0x0) { timeNs = GetTimeNs(); spawnedEntity = pEStack_178; - uVar14 = (uint)(timeNs >> 0x20); + uVar14 = GHIDRA_UINT((timeNs >> 0x20)); lVar3 = (timeNs & 0xffffffff) * 0x431bde82; local_174 = (Entity_Laser *)((ulonglong)lVar3 >> 0x20); lVar4 = (ulonglong)uVar14 * 0xd7b634db; piStack_180 = (int *)((ulonglong)lVar4 >> 0x20); timeNs = lVar4 + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); - uVar15 = (uint)(timeNs >> 0x20); + uVar15 = GHIDRA_UINT((timeNs >> 0x20)); lVar3 = lVar3 + (timeNs & 0xffffffff); fStack_15c = (float)lVar3; - uVar12 = (uint)((ulonglong)lVar3 >> 0x20); + uVar12 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); lVar3 = (ulonglong)uVar14 * 0x431bde82 + (ulonglong)CONCAT14(CARRY4(uVar15,uVar12),uVar15 + uVar12); pEStack_178->_spawnerType = 0; - uVar12 = (uint)((ulonglong)lVar3 >> 0x20); + uVar12 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); pEStack_178->_spawnerVariant = 0; - fStack_168 = (float)((uint)lVar3 >> 0x12 | uVar12 * 0x4000); + fStack_168 = (float)(GHIDRA_UINT(lVar3) >> 0x12 | uVar12 * 0x4000); uVar12 = uVar12 >> 0x12; spawnerSlot = &pEStack_178->_spawnerEntity; if (*spawnerSlot != (EntityPtr)0x0) { @@ -804,7 +804,7 @@ LAB_0096e030: iVar9 = *(int *)((char *)pvVar13 + 0x1214); *(int *)((char *)pvVar13 + 0x1214) = iVar9 + 1; spawnedEntity->_index = iVar9; - ((EntityList *)((EntityList *)((int)pvVar13 + 0x1218)))->EntityList::AddEntity(spawnedEntity); + ((EntityList *)((EntityList *)(GHIDRA_INT(pvVar13) + 0x1218)))->EntityList::AddEntity(spawnedEntity); bVar8 = Game::ShouldEraseEnemy(spawnedEntity); if (bVar8 != 0) { Entity::RemoveWithPoof(spawnedEntity,unusedArg_00); @@ -825,26 +825,26 @@ LAB_0096e030: } playerManager = &g_game->_playerManager; piStack_180 = (int *)0x0; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar13 = (playerManager->_playerList)._end; - if ((int)pvVar13 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar13) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n" ); pvVar13 = (playerManager->_playerList)._end; } piVar10 = (playerManager->_playerList)._begin; - if (piStack_180 < (int *)((int)pvVar13 - (int)piVar10 >> 2)) { - piVar10 = piVar10 + (int)piStack_180; + if (piStack_180 < (int *)(GHIDRA_INT(pvVar13) - GHIDRA_INT(piVar10) >> 2)) { + piVar10 = piVar10 + GHIDRA_INT(piStack_180); } trigger_set_dispatch ((void *)(*piVar10 + 0x1fc8),6,spawnedEntity,&VStack_148,&g_vectorZero); playerManager = &g_game->_playerManager; - piStack_180 = (int *)((int)piStack_180 + 1); + piStack_180 = (int *)(GHIDRA_INT(piStack_180) + 1); } while (piStack_180 < - (int *)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + (int *)(GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2)); } } LAB_0096e2b2: @@ -855,19 +855,19 @@ LAB_0096e2b2: local_174 = (Entity_Laser *)(ZEXT48(pGStack_17c) * 0xd7b634db >> 0x20); lVar3 = ZEXT48(pGStack_17c) * 0x431bde82; timeNs = ZEXT48(pGStack_17c) * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); - uVar15 = (uint)(timeNs >> 0x20); + uVar15 = GHIDRA_UINT((timeNs >> 0x20)); lVar4 = lVar4 + (timeNs & 0xffffffff); fStack_15c = (float)lVar4; - uVar14 = (uint)((ulonglong)lVar4 >> 0x20); + uVar14 = GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)); lVar4 = lVar3 + (ulonglong)CONCAT14(CARRY4(uVar15,uVar14),uVar15 + uVar14); - uVar15 = (uint)((ulonglong)lVar4 >> 0x20); - fVar17 = (float)((uint)lVar4 >> 0x12 | uVar15 * 0x4000); - uVar14 = (int)fVar17 - (int)fStack_168; - bVar16 = CARRY4((uint)g_entitySpawnTimeMs,uVar14); - g_entitySpawnTimeMs._0_4_ = (uint)g_entitySpawnTimeMs + uVar14; - g_entitySpawnTimeMs._4_4_ = - g_entitySpawnTimeMs._4_4_ + - (((uVar15 >> 0x12) - uVar12) - (uint)((uint)fVar17 < (uint)fStack_168)) + (uint)bVar16; + uVar15 = GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)); + fVar17 = (float)(GHIDRA_UINT(lVar4) >> 0x12 | uVar15 * 0x4000); + uVar14 = GHIDRA_INT(fVar17) - GHIDRA_INT(fStack_168); + bVar16 = CARRY4(GHIDRA_UINT(g_entitySpawnTimeMs),uVar14); + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x0)) = GHIDRA_UINT(g_entitySpawnTimeMs) + uVar14; + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) = + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) + + (((uVar15 >> 0x12) - uVar12) - GHIDRA_UINT((GHIDRA_UINT(fVar17) < GHIDRA_UINT(fStack_168)))) + GHIDRA_UINT(bVar16); } spawnedEntity = pEStack_178; poisonEffectSeed = (undefined4)((ulonglong)lVar3 >> 0x20); @@ -894,36 +894,36 @@ LAB_0096e2b2: &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Effect::RTTI_Type_Descriptor,0); if (fStack_15c != 1.0) { - piVar10[0x3a] = (int)(fStack_15c * (float)piVar10[0x3a]); - piVar10[0x39] = (int)(fStack_15c * (float)piVar10[0x39]); + piVar10[0x3a] = GHIDRA_INT((fStack_15c * (float)piVar10[0x3a])); + piVar10[0x39] = GHIDRA_INT((fStack_15c * (float)piVar10[0x39])); } explosionColor._offset[0] = (this->_sprite)._color._tint[0]; explosionColor._offset[1] = (this->_sprite)._color._tint[1]; explosionColor._offset[2] = (this->_sprite)._color._tint[2]; fStack_44 = (this->_sprite)._color._offset[2]; (**(code **)(*piVar10 + 0x3c))(explosionColor._offset,0xffffffff,0xff,0,1); - uVar12 = g_tearFlagExplosive._h._4_4_; - uVar15 = ~(uint)g_tearFlagExplosive._h; - uVar14 = ~g_tearFlagExplosive._l._4_4_; + uVar12 = (*(undefined4 *)((char *)&(g_tearFlagExplosive._h) + 0x4)); + uVar15 = ~GHIDRA_UINT(g_tearFlagExplosive._h); + uVar14 = ~(*(undefined4 *)((char *)&(g_tearFlagExplosive._l) + 0x4)); *(uint *)&(this->_activeTearFlags)._l = - (uint)(this->_activeTearFlags)._l & ~(uint)g_tearFlagExplosive._l; - puVar11 = (uint *)((int)&(this->_activeTearFlags)._l + 4); + GHIDRA_UINT((this->_activeTearFlags)._l) & ~GHIDRA_UINT(g_tearFlagExplosive._l); + puVar11 = (uint *)(GHIDRA_INT(&(this->_activeTearFlags)._l) + 4); *puVar11 = *puVar11 & uVar14; pqVar1 = &(this->_activeTearFlags)._h; - *(uint *)pqVar1 = (uint)*pqVar1 & uVar15; - puVar11 = (uint *)((int)&(this->_activeTearFlags)._h + 4); + *(uint *)pqVar1 = GHIDRA_UINT(*pqVar1) & uVar15; + puVar11 = (uint *)(GHIDRA_INT(&(this->_activeTearFlags)._h) + 4); *puVar11 = *puVar11 & ~uVar12; } LAB_0096e506: - local_174 = (Entity_Laser *)((uint)g_tearFlagSplit._h | (uint)g_tearFlagQuadsplit._h); - uVar12 = (uint)(this->_tearFlags)._h; - fVar17 = *(float *)((int)&(this->_tearFlags)._h + 4); - fStack_160 = (float)(g_tearFlagSplit._h._4_4_ | g_tearFlagQuadsplit._h._4_4_); - if ((!((((uint)g_tearFlagSplit._l | (uint)(void *)g_tearFlagQuadsplit._l) & - (uint)(this->_tearFlags)._l) == 0 && - ((g_tearFlagSplit._l._4_4_ | (uint)g_tearFlagQuadsplit._l._4_4_) & - *(uint *)((int)&(this->_tearFlags)._l + 4)) == 0)) || - (!((uVar12 & (uint)local_174) == 0 && ((uint)fVar17 & (uint)fStack_160) == 0))) { + local_174 = (Entity_Laser *)(GHIDRA_UINT(g_tearFlagSplit._h) | GHIDRA_UINT(g_tearFlagQuadsplit._h)); + uVar12 = GHIDRA_UINT((this->_tearFlags)._h); + fVar17 = *(float *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); + fStack_160 = (float)((*(undefined4 *)((char *)&(g_tearFlagSplit._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagQuadsplit._h) + 0x4))); + if ((!(((GHIDRA_UINT(g_tearFlagSplit._l) | GHIDRA_UINT((void *)g_tearFlagQuadsplit._l)) & + GHIDRA_UINT((this->_tearFlags)._l)) == 0 && + (((*(undefined4 *)((char *)&(g_tearFlagSplit._l) + 0x4)) | (*(undefined4 *)((char *)&(GHIDRA_UINT(g_tearFlagQuadsplit._l)) + 0x4))) & + *(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4)) == 0)) || + (!((uVar12 & GHIDRA_UINT(local_174)) == 0 && (GHIDRA_UINT(fVar17) & GHIDRA_UINT(fStack_160)) == 0))) { fStack_15c = fVar17; if ((this->_isFirstUpdate == 0) && (iVar9 = ((Entity *)((Entity *)this))->Entity::GetIntervalTicks(4.0,0.0), iVar9 == 0)) { @@ -932,7 +932,7 @@ LAB_0096e506: else { Room::GetClampedPositionImpl(g_game->_room,&VStack_148,impactPos,1.0,1.0,1.0,1.0); uVar12 = Random(); - fVar17 = (float)((double)(int)uVar12 + __uint_to_double_fixup[-((int)uVar12 >> 0x1f)]) * + fVar17 = (float)((double)GHIDRA_INT(uVar12) + __uint_to_double_fixup[-(GHIDRA_INT(uVar12) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_174 = (Entity_Laser *)(fVar17 + fVar17); fStack_168 = cos((float)local_174); @@ -940,46 +940,46 @@ LAB_0096e506: VStack_110.x = fStack_168; fStack_150 = sin((float)local_174); splitFlagsLow = - ~((uint)g_tearFlagFetus._l | (uint)g_tearFlagLasershot._l | - (uint)g_tearFlagHydrobounce._l | (uint)g_tearFlagAbsorb._l | (uint)g_tearFlagBone._l | - (uint)g_tearFlagLudovico._l | (uint)g_tearFlagSplit._l | - (uint)(void *)g_tearFlagQuadsplit._l) & - ((uint)(this->_tearFlags)._l | (uint)g_tearFlagPiercing._l); + ~(GHIDRA_UINT(g_tearFlagFetus._l) | GHIDRA_UINT(g_tearFlagLasershot._l) | + GHIDRA_UINT(g_tearFlagHydrobounce._l) | GHIDRA_UINT(g_tearFlagAbsorb._l) | GHIDRA_UINT(g_tearFlagBone._l) | + GHIDRA_UINT(g_tearFlagLudovico._l) | GHIDRA_UINT(g_tearFlagSplit._l) | + GHIDRA_UINT((void *)g_tearFlagQuadsplit._l)) & + (GHIDRA_UINT((this->_tearFlags)._l) | GHIDRA_UINT(g_tearFlagPiercing._l)); fStack_150 = fStack_150 * 10.0; - uStack_fc = ~(g_tearFlagFetus._l._4_4_ | g_tearFlagLasershot._l._4_4_ | - g_tearFlagHydrobounce._l._4_4_ | g_tearFlagAbsorb._l._4_4_ | - g_tearFlagBone._l._4_4_ | g_tearFlagLudovico._l._4_4_ | g_tearFlagSplit._l._4_4_ - | (uint)g_tearFlagQuadsplit._l._4_4_) & - (*(uint *)((int)&(this->_tearFlags)._l + 4) | g_tearFlagPiercing._l._4_4_); - uStack_f8 = ~((uint)g_tearFlagFetus._h | (uint)g_tearFlagLasershot._h | - (uint)g_tearFlagHydrobounce._h | (uint)g_tearFlagAbsorb._h | - (uint)g_tearFlagBone._h | (uint)g_tearFlagLudovico._h | (uint)g_tearFlagSplit._h - | (uint)g_tearFlagQuadsplit._h) & - ((uint)(this->_tearFlags)._h | (uint)g_tearFlagPiercing._h); + uStack_fc = ~((*(undefined4 *)((char *)&(g_tearFlagFetus._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagLasershot._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagHydrobounce._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagAbsorb._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagBone._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagLudovico._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagSplit._l) + 0x4)) + | (*(undefined4 *)((char *)&(GHIDRA_UINT(g_tearFlagQuadsplit._l)) + 0x4))) & + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) | (*(undefined4 *)((char *)&(g_tearFlagPiercing._l) + 0x4))); + uStack_f8 = ~(GHIDRA_UINT(g_tearFlagFetus._h) | GHIDRA_UINT(g_tearFlagLasershot._h) | + GHIDRA_UINT(g_tearFlagHydrobounce._h) | GHIDRA_UINT(g_tearFlagAbsorb._h) | + GHIDRA_UINT(g_tearFlagBone._h) | GHIDRA_UINT(g_tearFlagLudovico._h) | GHIDRA_UINT(g_tearFlagSplit._h) + | GHIDRA_UINT(g_tearFlagQuadsplit._h)) & + (GHIDRA_UINT((this->_tearFlags)._h) | GHIDRA_UINT(g_tearFlagPiercing._h)); VStack_110.y = fStack_150; - uStack_f4 = ~(g_tearFlagFetus._h._4_4_ | g_tearFlagLasershot._h._4_4_ | - g_tearFlagHydrobounce._h._4_4_ | g_tearFlagAbsorb._h._4_4_ | - g_tearFlagBone._h._4_4_ | g_tearFlagLudovico._h._4_4_ | g_tearFlagSplit._h._4_4_ - | g_tearFlagQuadsplit._h._4_4_) & - (*(uint *)((int)&(this->_tearFlags)._h + 4) | g_tearFlagPiercing._h._4_4_); + uStack_f4 = ~((*(undefined4 *)((char *)&(g_tearFlagFetus._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagLasershot._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagHydrobounce._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagAbsorb._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagBone._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagLudovico._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagSplit._h) + 0x4)) + | (*(undefined4 *)((char *)&(g_tearFlagQuadsplit._h) + 0x4))) & + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) | (*(undefined4 *)((char *)&(g_tearFlagPiercing._h) + 0x4))); get_tear_spawn_color(this,&splitTearColor); - uVar12 = *(uint *)((int)&(this->_tearFlags)._l + 4); + uVar12 = *(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); splitTearColor._tint[3] = splitTearColor._tint[3] * local_13c; pvStack_11c = (void *)g_tearFlagQuadsplit._l; - pEStack_128 = g_tearFlagQuadsplit._l._4_4_; - uStack_164 = (uint)g_tearFlagSplit._h | (uint)g_tearFlagQuadsplit._h; - uStack_120 = (uint)g_tearFlagQuadsplit._h; - fStack_160 = (float)(g_tearFlagSplit._h._4_4_ | g_tearFlagQuadsplit._h._4_4_); - uStack_14c = g_tearFlagQuadsplit._h._4_4_; - fStack_15c = (float)(uVar12 & (g_tearFlagSplit._l._4_4_ | (uint)g_tearFlagQuadsplit._l._4_4_)) + pEStack_128 = (*(undefined4 *)((char *)&(g_tearFlagQuadsplit._l) + 0x4)); + uStack_164 = GHIDRA_UINT(g_tearFlagSplit._h) | GHIDRA_UINT(g_tearFlagQuadsplit._h); + uStack_120 = GHIDRA_UINT(g_tearFlagQuadsplit._h); + fStack_160 = (float)((*(undefined4 *)((char *)&(g_tearFlagSplit._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagQuadsplit._h) + 0x4))); + uStack_14c = (*(undefined4 *)((char *)&(g_tearFlagQuadsplit._h) + 0x4)); + fStack_15c = (float)(uVar12 & ((*(undefined4 *)((char *)&(g_tearFlagSplit._l) + 0x4)) | (*(undefined4 *)((char *)&(GHIDRA_UINT(g_tearFlagQuadsplit._l)) + 0x4)))) ; - uVar14 = (uint)(this->_tearFlags)._h; - if ((((((uint)(this->_tearFlags)._l & - ((uint)g_tearFlagSplit._l | (uint)(void *)g_tearFlagQuadsplit._l)) == - ((uint)g_tearFlagSplit._l | (uint)(void *)g_tearFlagQuadsplit._l)) && - (fStack_15c == (float)(g_tearFlagSplit._l._4_4_ | (uint)g_tearFlagQuadsplit._l._4_4_))) + uVar14 = GHIDRA_UINT((this->_tearFlags)._h); + if (((((GHIDRA_UINT((this->_tearFlags)._l) & + (GHIDRA_UINT(g_tearFlagSplit._l) | GHIDRA_UINT((void *)g_tearFlagQuadsplit._l))) == + (GHIDRA_UINT(g_tearFlagSplit._l) | GHIDRA_UINT((void *)g_tearFlagQuadsplit._l))) && + (fStack_15c == (float)((*(undefined4 *)((char *)&(g_tearFlagSplit._l) + 0x4)) | (*(undefined4 *)((char *)&(GHIDRA_UINT(g_tearFlagQuadsplit._l)) + 0x4))))) && ((uVar14 & uStack_164) == uStack_164)) && - ((float)(*(uint *)((int)&(this->_tearFlags)._h + 4) & (uint)fStack_160) == fStack_160)) { + ((float)(*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & GHIDRA_UINT(fStack_160)) == fStack_160)) { fVar17 = 60.0; _uStack_170 = CONCAT44(effectVariant,6); LAB_0096e8c5: @@ -1000,10 +1000,10 @@ LAB_0096e8c5: if (*(int *)((char *)pGVar6->_room + 8) == 0x10) { (splitTear->_posOffset).y = -18.0; } - flags._l._4_4_ = uStack_fc; - flags._l._0_4_ = splitFlagsLow; - flags._h._0_4_ = uStack_f8; - flags._h._4_4_ = uStack_f4; + (*(undefined4 *)((char *)&(flags._l) + 0x4)) = uStack_fc; + (*(undefined4 *)((char *)&(flags._l) + 0x0)) = splitFlagsLow; + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = uStack_f8; + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = uStack_f4; ((Entity_Tear *)(splitTear))->Entity_Tear::SetTearFlags(flags); splitTear->SetCollisionDamage(this->_collisionDamage * 0.5); fVar17 = this->_scale * 0.6; @@ -1025,42 +1025,42 @@ LAB_0096e8c5: } while (iVar9 != 0); } else { - if ((((uint)(this->_tearFlags)._l & (uint)g_tearFlagSplit._l) != 0 || - (uVar12 & g_tearFlagSplit._l._4_4_) != 0) || - ((uVar14 & (uint)g_tearFlagSplit._h) != 0 || - (*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagSplit._h._4_4_) != 0)) { + if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagSplit._l)) != 0 || + (uVar12 & (*(undefined4 *)((char *)&(g_tearFlagSplit._l) + 0x4))) != 0) || + ((uVar14 & GHIDRA_UINT(g_tearFlagSplit._h)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagSplit._h) + 0x4))) != 0)) { fVar17 = 180.0; _uStack_170 = CONCAT44(effectVariant,2); goto LAB_0096e8c5; } - _uStack_170 = CONCAT44(effectVariant,uVar12 & (uint)g_tearFlagQuadsplit._l._4_4_); - if ((((uint)(this->_tearFlags)._l & (uint)(void *)g_tearFlagQuadsplit._l) != 0 || - (uVar12 & (uint)g_tearFlagQuadsplit._l._4_4_) != 0) || - ((uVar14 & (uint)g_tearFlagQuadsplit._h) != 0 || - (*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagQuadsplit._h._4_4_) != 0)) { + _uStack_170 = CONCAT44(effectVariant,uVar12 & (*(undefined4 *)((char *)&(GHIDRA_UINT(g_tearFlagQuadsplit._l)) + 0x4))); + if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT((void *)g_tearFlagQuadsplit._l)) != 0 || + (uVar12 & (*(undefined4 *)((char *)&(GHIDRA_UINT(g_tearFlagQuadsplit._l)) + 0x4))) != 0) || + ((uVar14 & GHIDRA_UINT(g_tearFlagQuadsplit._h)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagQuadsplit._h) + 0x4))) != 0)) { fVar17 = 90.0; _uStack_170 = CONCAT44(effectVariant,4); goto LAB_0096e8c5; } } - spawnerSlot = g_tearFlagQuadsplit._l._4_4_; + spawnerSlot = (*(undefined4 *)((char *)&(g_tearFlagQuadsplit._l) + 0x4)); pvVar13 = (void *)g_tearFlagQuadsplit._l; - uVar12 = ~g_tearFlagQuadsplit._h._4_4_; + uVar12 = ~(*(undefined4 *)((char *)&(g_tearFlagQuadsplit._h) + 0x4)); pqVar1 = &(this->_activeTearFlags)._h; - *(uint *)pqVar1 = (uint)*pqVar1 & ~(uint)g_tearFlagQuadsplit._h; - *(uint *)&(this->_activeTearFlags)._l = (uint)(this->_activeTearFlags)._l & ~(uint)pvVar13; - puVar11 = (uint *)((int)&(this->_activeTearFlags)._l + 4); - *puVar11 = *puVar11 & ~(uint)spawnerSlot; - puVar11 = (uint *)((int)&(this->_activeTearFlags)._h + 4); + *(uint *)pqVar1 = GHIDRA_UINT(*pqVar1) & ~GHIDRA_UINT(g_tearFlagQuadsplit._h); + *(uint *)&(this->_activeTearFlags)._l = GHIDRA_UINT((this->_activeTearFlags)._l) & ~GHIDRA_UINT(pvVar13); + puVar11 = (uint *)(GHIDRA_INT(&(this->_activeTearFlags)._l) + 4); + *puVar11 = *puVar11 & ~GHIDRA_UINT(spawnerSlot); + puVar11 = (uint *)(GHIDRA_INT(&(this->_activeTearFlags)._h) + 4); *puVar11 = *puVar11 & uVar12; - uVar12 = (uint)(this->_tearFlags)._h; - fVar17 = *(float *)((int)&(this->_tearFlags)._h + 4); + uVar12 = GHIDRA_UINT((this->_tearFlags)._h); + fVar17 = *(float *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); } } - local_174 = (Entity_Laser *)(uVar12 & (uint)g_tearFlagJacobs._h); - fStack_160 = (float)(g_tearFlagJacobs._h._4_4_ & (uint)fVar17); - if ((((uint)(this->_tearFlags)._l & (uint)g_tearFlagJacobs._l) != 0 || - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagJacobs._l._4_4_) != 0) || + local_174 = (Entity_Laser *)(uVar12 & GHIDRA_UINT(g_tearFlagJacobs._h)); + fStack_160 = (float)((*(undefined4 *)((char *)&(g_tearFlagJacobs._h) + 0x4)) & GHIDRA_UINT(fVar17)); + if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagJacobs._l)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagJacobs._l) + 0x4))) != 0) || (local_174 != (Entity_Laser *)0x0 || fStack_160 != 0.0)) { if (this->_isFirstUpdate == 0) { fStack_15c = fVar17; @@ -1085,13 +1085,13 @@ LAB_0096e8c5: auStack_90 = (undefined1 [4])(spawnedEntity->_sprite)._color._offset[2]; spawnedEntity->SetColor(CStack_cc._colorize + 1,0xffffffff,0xff,0,1); spawnedEntity->Update(); - uVar12 = (uint)(this->_tearFlags)._h; - fVar17 = *(float *)((int)&(this->_tearFlags)._h + 4); + uVar12 = GHIDRA_UINT((this->_tearFlags)._h); + fVar17 = *(float *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); } LAB_0096ec0c: - if (((((uint)(this->_tearFlags)._l & (uint)g_tearFlagRift._l) != 0 || - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagRift._l._4_4_) != 0) || - ((uVar12 & (uint)g_tearFlagRift._h) != 0 || ((uint)fVar17 & g_tearFlagRift._h._4_4_) != 0)) && + if ((((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagRift._l)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagRift._l) + 0x4))) != 0) || + ((uVar12 & GHIDRA_UINT(g_tearFlagRift._h)) != 0 || (GHIDRA_UINT(fVar17) & (*(undefined4 *)((char *)&(g_tearFlagRift._h) + 0x4))) != 0)) && ((this->_isFirstUpdate != 0 || (iVar9 = ((Entity *)((Entity *)this))->Entity::GetIntervalTicks(2.0,0.0), iVar9 != 0)))) { pGVar6 = g_game; @@ -1116,16 +1116,16 @@ LAB_0096ec0c: *(undefined4 *)(spawnedEntity[1]._sprite._filename._buf + 4) = riftTimeout; *(undefined4 *)(spawnedEntity[1]._sprite._filename._buf + 8) = riftTimeout; (**(code **)(iVar9 + 0xc))(); - uVar12 = g_tearFlagRift._l._4_4_; - uVar15 = ~(uint)g_tearFlagRift._h; - uVar14 = ~g_tearFlagRift._h._4_4_; + uVar12 = (*(undefined4 *)((char *)&(g_tearFlagRift._l) + 0x4)); + uVar15 = ~GHIDRA_UINT(g_tearFlagRift._h); + uVar14 = ~(*(undefined4 *)((char *)&(g_tearFlagRift._h) + 0x4)); *(uint *)&(this->_activeTearFlags)._l = - (uint)(this->_activeTearFlags)._l & ~(uint)g_tearFlagRift._l; + GHIDRA_UINT((this->_activeTearFlags)._l) & ~GHIDRA_UINT(g_tearFlagRift._l); pqVar1 = &(this->_activeTearFlags)._h; - *(uint *)pqVar1 = (uint)*pqVar1 & uVar15; - puVar11 = (uint *)((int)&(this->_activeTearFlags)._l + 4); + *(uint *)pqVar1 = GHIDRA_UINT(*pqVar1) & uVar15; + puVar11 = (uint *)(GHIDRA_INT(&(this->_activeTearFlags)._l) + 4); *puVar11 = *puVar11 & ~uVar12; - puVar11 = (uint *)((int)&(this->_activeTearFlags)._h + 4); + puVar11 = (uint *)(GHIDRA_INT(&(this->_activeTearFlags)._h) + 4); *puVar11 = *puVar11 & uVar14; manager = g_manager; uStack_164 = 0x440; @@ -1155,7 +1155,7 @@ ColorMod * Entity_Laser::get_tear_spawn_color(ColorMod *outColor) float colorizeAmount; int variant; - local_8 = (float)(__security_cookie ^ (uint)((&tintedColor)[1]._tint + 1)); + local_8 = (float)(__security_cookie ^ GHIDRA_UINT(((&tintedColor)[1]._tint + 1))); variant = this->_variant; if ((variant == 3) || (variant == 10)) { colorizeAmount = (this->_sprite)._color._colorize[3]; @@ -1212,7 +1212,7 @@ ColorMod * Entity_Laser::get_tear_spawn_color(ColorMod *outColor) laserColor._colorize[1] = (this->_sprite)._color._colorize[1]; laserColor._colorize[2] = (this->_sprite)._color._colorize[2]; laserColor._colorize[3] = (this->_sprite)._color._colorize[3]; - laserColor._offset._0_8_ = *(undefined8 *)(this->_sprite)._color._offset; + (*(undefined8 *)((char *)&(laserColor._offset) + 0x0)) = *(undefined8 *)(this->_sprite)._color._offset; ((Color *)(&laserColor))->Color::__mul(&tintedColor); tintedColor._offset[2] = laserColor._offset[2]; tintedColor._tint[0] = laserColor._tint[0]; @@ -1259,16 +1259,16 @@ void Entity_Laser::copy_from_parent(Entity_Laser *parent, byte isCopySpawnData) if (*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < DAT_00c94298) { _Init_thread_header(&DAT_00c94298); if (DAT_00c94298 == -1) { - DAT_00c942a0 = ~((uint)g_tearFlagPop._l | (uint)g_tearFlagAbsorb._l | (uint)g_tearFlagSplit._l - | (uint)g_tearFlagTurnHorizontal._l); + DAT_00c942a0 = ~(GHIDRA_UINT(g_tearFlagPop._l) | GHIDRA_UINT(g_tearFlagAbsorb._l) | GHIDRA_UINT(g_tearFlagSplit._l) + | GHIDRA_UINT(g_tearFlagTurnHorizontal._l)); _DAT_00c942a4 = - ~(g_tearFlagPop._l._4_4_ | g_tearFlagAbsorb._l._4_4_ | g_tearFlagSplit._l._4_4_ | - g_tearFlagTurnHorizontal._l._4_4_); - DAT_00c942a8 = ~((uint)g_tearFlagPop._h | (uint)g_tearFlagAbsorb._h | (uint)g_tearFlagSplit._h - | (uint)g_tearFlagTurnHorizontal._h); + ~((*(undefined4 *)((char *)&(g_tearFlagPop._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagAbsorb._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagSplit._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagTurnHorizontal._l) + 0x4))); + DAT_00c942a8 = ~(GHIDRA_UINT(g_tearFlagPop._h) | GHIDRA_UINT(g_tearFlagAbsorb._h) | GHIDRA_UINT(g_tearFlagSplit._h) + | GHIDRA_UINT(g_tearFlagTurnHorizontal._h)); _DAT_00c942ac = - ~(g_tearFlagPop._h._4_4_ | g_tearFlagAbsorb._h._4_4_ | g_tearFlagSplit._h._4_4_ | - g_tearFlagTurnHorizontal._h._4_4_); + ~((*(undefined4 *)((char *)&(g_tearFlagPop._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagAbsorb._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagSplit._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagTurnHorizontal._h) + 0x4))); _Init_thread_footer(&DAT_00c94298); } } @@ -1298,13 +1298,13 @@ void Entity_Laser::copy_from_parent(Entity_Laser *parent, byte isCopySpawnData) this->_chainedLasers = parent->_chainedLasers; } this->SetColor(&(parent->_sprite)._color,0xffffffff,0xff,0,1); - tearFlagsWord1 = *(uint *)((int)&(parent->_activeTearFlags)._l + 4) & _DAT_00c942a4; - tearFlagsWord2 = DAT_00c942a8 & (uint)(parent->_activeTearFlags)._h; - tearFlagsWord3 = *(uint *)((int)&(parent->_activeTearFlags)._h + 4) & _DAT_00c942ac; - *(uint *)&(this->_tearFlags)._l = DAT_00c942a0 & (uint)(parent->_activeTearFlags)._l; - *(uint *)((int)&(this->_tearFlags)._l + 4) = tearFlagsWord1; + tearFlagsWord1 = *(uint *)(GHIDRA_INT(&(parent->_activeTearFlags)._l) + 4) & _DAT_00c942a4; + tearFlagsWord2 = DAT_00c942a8 & GHIDRA_UINT((parent->_activeTearFlags)._h); + tearFlagsWord3 = *(uint *)(GHIDRA_INT(&(parent->_activeTearFlags)._h) + 4) & _DAT_00c942ac; + *(uint *)&(this->_tearFlags)._l = DAT_00c942a0 & GHIDRA_UINT((parent->_activeTearFlags)._l); + *(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) = tearFlagsWord1; *(uint *)&(this->_tearFlags)._h = tearFlagsWord2; - *(uint *)((int)&(this->_tearFlags)._h + 4) = tearFlagsWord3; + *(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) = tearFlagsWord3; this->SetCollisionDamage(parent->_collisionDamage); this->_blackHpDropChance = parent->_blackHpDropChance; this->_maxDistance = parent->_maxDistance; @@ -1391,7 +1391,7 @@ void Entity_Laser::Init(int type, int variant, int subType, uint initSeed) ((Entity *)((Entity *)this))->Entity::Init(type,variant,subType,initSeed); if (this->_config != (void *)0x0) { - ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)((int)this->_config + 0x74),1); + ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)(GHIDRA_INT(this->_config) + 0x74),1); defaultAnimName = &(this->_sprite)._animDefaultName; if (0xf < (this->_sprite)._animDefaultName._capacity) { defaultAnimName = *(std_string **)defaultAnimName->_buf; @@ -1408,7 +1408,7 @@ void Entity_Laser::Init(int type, int variant, int subType, uint initSeed) bVar5 = bVar1 < (byte)psVar4->_buf[0]; if (bVar1 != psVar4->_buf[0]) { LAB_0096f610: - uVar3 = -(uint)bVar5 | 1; + uVar3 = -GHIDRA_UINT(bVar5) | 1; goto LAB_0096f615; } if (bVar1 == 0) break; @@ -1441,17 +1441,17 @@ LAB_0096f648: this->_lastAngleDegrees = 0.0; this->_renderDepthOffset = 0.0; *(undefined4 *)&(this->_tearFlags)._l = 0; - *(undefined4 *)((int)&(this->_tearFlags)._l + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) = 0; *(undefined4 *)&(this->_tearFlags)._h = 0; - *(undefined4 *)((int)&(this->_tearFlags)._h + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) = 0; *(undefined4 *)&(this->_activeTearFlags)._l = 0; - *(undefined4 *)((int)&(this->_activeTearFlags)._l + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_activeTearFlags)._l) + 4) = 0; *(undefined4 *)&(this->_activeTearFlags)._h = 0; - *(undefined4 *)((int)&(this->_activeTearFlags)._h + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_activeTearFlags)._h) + 4) = 0; *(undefined4 *)&(this->_heldTearFlags)._l = 0; - *(undefined4 *)((int)&(this->_heldTearFlags)._l + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_heldTearFlags)._l) + 4) = 0; *(undefined4 *)&(this->_heldTearFlags)._h = 0; - *(undefined4 *)((int)&(this->_heldTearFlags)._h + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_heldTearFlags)._h) + 4) = 0; this->_multidimensionalLasers[1] = (EntityPtr)0x0; this->_multidimensionalLasers[0] = (EntityPtr)0x0; this->_timeout = 0; @@ -1540,7 +1540,7 @@ LAB_0096f92b: } if (this->_subtype == 2) { SoundEffects::PlayWithFartOverride(((float)local_8 < 0.75) + 5,0.6,2,0,1.0); - SoundEffects::PlayWithFartOverride((uint)(0.75 <= (float)local_8) * 2 + 0x10f,1.0,2,0,1.0); + SoundEffects::PlayWithFartOverride(GHIDRA_UINT((0.75 <= (float)local_8)) * 2 + 0x10f,1.0,2,0,1.0); return; } return; @@ -1591,7 +1591,7 @@ LAB_0096fb3b: } SoundEffects::PlayWithFartOverride (spawnerType,volume,1,0, - (float)((double)(int)pitchRoll + __uint_to_double_fixup[-((int)pitchRoll >> 0x1f)]) * + (float)((double)GHIDRA_INT(pitchRoll) + __uint_to_double_fixup[-(GHIDRA_INT(pitchRoll) >> 0x1f)]) * 2.3283064e-10 * 0.3 + 0.85); return; case 3: @@ -1612,7 +1612,7 @@ switchD_0096f8c9_caseD_3: pitchRoll = Random(); SoundEffects::PlayWithFartOverride (0x86,0.6,2,0, - (float)((double)(int)pitchRoll + __uint_to_double_fixup[-((int)pitchRoll >> 0x1f)]) * + (float)((double)GHIDRA_INT(pitchRoll) + __uint_to_double_fixup[-(GHIDRA_INT(pitchRoll) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 0.9); return; case 0xb: @@ -1620,7 +1620,7 @@ switchD_0096f8c9_caseD_3: if (this->_subtype == 2) { local_8 = (Entity_Laser *)0xa; seed_fart_sound_override((int *)&local_8); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_8,0.6,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_8),0.6,2,0,1.0,0.0); local_8 = (Entity_Laser *)0x111; } else { @@ -1637,7 +1637,7 @@ switchD_0096f8c9_caseD_3: seed_fart_sound_override((int *)&local_8); isLoop = 0; LAB_0096fc15: - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_8,1.0,2,isLoop,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_8),1.0,2,isLoop,1.0,0.0); switchD_0096f8c9_caseD_4: return; } @@ -1650,20 +1650,20 @@ Vector * Entity_Laser::calc_end_point(Vector *outEndPoint, Vector *start, Vector uint tearFlagsWord2; margin = 20.0; - tearFlagsWord0 = (uint)(this->_tearFlags)._l; - tearFlagsWord2 = (uint)(this->_tearFlags)._h; - if (((tearFlagsWord0 & (uint)g_tearFlagContinuum._l) != 0 || - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagContinuum._l._4_4_) != 0) || - ((tearFlagsWord2 & (uint)g_tearFlagContinuum._h) != 0 || - (*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagContinuum._h._4_4_) != 0)) { + tearFlagsWord0 = GHIDRA_UINT((this->_tearFlags)._l); + tearFlagsWord2 = GHIDRA_UINT((this->_tearFlags)._h); + if (((tearFlagsWord0 & GHIDRA_UINT(g_tearFlagContinuum._l)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagContinuum._l) + 0x4))) != 0) || + ((tearFlagsWord2 & GHIDRA_UINT(g_tearFlagContinuum._h)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagContinuum._h) + 0x4))) != 0)) { margin = 140.0; } if (((*(uint *)(*(int *)((char *)g_game->_room + 4) + 0x44) >> 0xf & 1) != 0) || (this->_variant == 5)) { - if (((tearFlagsWord0 & (uint)g_tearFlagOccult._l) == 0 && - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagOccult._l._4_4_) == 0) && - ((tearFlagsWord2 & (uint)g_tearFlagOccult._h) == 0 && - (*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagOccult._h._4_4_) == 0)) { + if (((tearFlagsWord0 & GHIDRA_UINT(g_tearFlagOccult._l)) == 0 && + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagOccult._l) + 0x4))) == 0) && + ((tearFlagsWord2 & GHIDRA_UINT(g_tearFlagOccult._h)) == 0 && + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagOccult._h) + 0x4))) == 0)) { margin = INFINITY; } else { @@ -1739,7 +1739,7 @@ void Entity_Laser::update_first_frame() if (ABS(local_30.y) < 0.0001) { local_30.y = 0.0; } - (room->_sprite)._flipX = (byte)((uint)room->_initSeed >> 8) & 1; + (room->_sprite)._flipX = (byte)(GHIDRA_UINT(room->_initSeed) >> 8) & 1; ResetSpriteScale(room); spawn_impact_effect(room,unused); isCircleLaser = room->_sampleLaser; @@ -1761,11 +1761,11 @@ LAB_00970730: LAB_009706c5: if ((room->_isActiveRotating == 0) && (isCircleLaser = IsCircleLaser(room), isCircleLaser == 0)) { - local_18._0_4_ = (uint)(room->_tearFlags)._l & (uint)g_tearFlagOccult._l; - local_18._4_4_ = - *(uint *)((int)&(room->_tearFlags)._l + 4) & g_tearFlagOccult._l._4_4_; - local_10 = (uint)(room->_tearFlags)._h & (uint)g_tearFlagOccult._h; - local_c = *(uint *)((int)&(room->_tearFlags)._h + 4) & g_tearFlagOccult._h._4_4_; + (*(undefined4 *)((char *)&(local_18) + 0x0)) = GHIDRA_UINT((room->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagOccult._l); + (*(undefined4 *)((char *)&(local_18) + 0x4)) = + *(uint *)(GHIDRA_INT(&(room->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagOccult._l) + 0x4)); + local_10 = GHIDRA_UINT((room->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagOccult._h); + local_c = *(uint *)(GHIDRA_INT(&(room->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagOccult._h) + 0x4)); isCircleLaser = ((BitSet128 *)((BitSet128 *)local_18))->BitSet128::IsNonZero(); if (isCircleLaser == 0) goto LAB_00970730; } @@ -1774,11 +1774,11 @@ LAB_009706c5: else { if (stepY != 3) goto LAB_009706c5; if ((*(int *)((char *)parent + 0x2c) != 0x50) && (*(int *)((char *)parent + 0x2c) != 0x78)) { - local_18._0_4_ = (uint)(room->_tearFlags)._l & (uint)g_tearFlagHoming._l; - local_18._4_4_ = - *(uint *)((int)&(room->_tearFlags)._l + 4) & g_tearFlagHoming._l._4_4_; - local_10 = (uint)(room->_tearFlags)._h & (uint)g_tearFlagHoming._h; - local_c = *(uint *)((int)&(room->_tearFlags)._h + 4) & g_tearFlagHoming._h._4_4_; + (*(undefined4 *)((char *)&(local_18) + 0x0)) = GHIDRA_UINT((room->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagHoming._l); + (*(undefined4 *)((char *)&(local_18) + 0x4)) = + *(uint *)(GHIDRA_INT(&(room->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagHoming._l) + 0x4)); + local_10 = GHIDRA_UINT((room->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagHoming._h); + local_c = *(uint *)(GHIDRA_INT(&(room->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagHoming._h) + 0x4)); isCircleLaser = ((BitSet128 *)((BitSet128 *)local_18))->BitSet128::IsNonZero(); if (isCircleLaser == 0) goto LAB_009706c5; } @@ -1804,20 +1804,20 @@ LAB_009706c5: local_20.x = fVar11; local_20.y = fVar7; if (room->_entityGridCollisionClass == 6) { - local_18._0_4_ = local_30.x * 10000.0 + fVar11; + (*(undefined4 *)((char *)&(local_18) + 0x0)) = local_30.x * 10000.0 + fVar11; fVar10 = fVar11 - local_30.x * 4.0; room = g_game->_room; - local_18._4_4_ = local_30.y * 10000.0 + fVar7; + (*(undefined4 *)((char *)&(local_18) + 0x4)) = local_30.y * 10000.0 + fVar7; fVar9 = fVar7 - local_30.y * 4.0; hitX = fVar10; - fVar4 = (float)local_18._0_4_ - fVar10; - fVar3 = (float)local_18._4_4_ - fVar9; + fVar4 = (*(undefined4 *)((char *)&((float)local_18) + 0x0)) - fVar10; + fVar3 = (*(undefined4 *)((char *)&((float)local_18) + 0x4)) - fVar9; hitY = fVar9; - gridX = (int)((fVar10 - 40.0) / 40.0 + 0.5); - gridY = (int)((fVar9 - 120.0) / 40.0 + 0.5); - stepY = (uint)(0.0 < fVar4) * 2 + -1; + gridX = GHIDRA_INT(((fVar10 - 40.0) / 40.0 + 0.5)); + gridY = GHIDRA_INT(((fVar9 - 120.0) / 40.0 + 0.5)); + stepY = GHIDRA_UINT((0.0 < fVar4)) * 2 + -1; rayT = 0.0; - stepY = (uint)(0.0 < fVar3) * 2 + -1; + stepY = GHIDRA_UINT((0.0 < fVar3)) * 2 + -1; if ((fVar4 != g_vectorZero.x) || (fVar8 = 0.0, fVar3 != g_vectorZero.y)) { cellY = gridY * 0x28; cellX = gridX * 0x28; @@ -1906,8 +1906,8 @@ LAB_00970af5: fVar3 = fVar11 - pVVar2->x; fVar4 = fVar7 - fVar10; if (fVar9 * fVar9 < fVar4 * fVar4 + fVar3 * fVar3) { - local_18._0_4_ = pVVar2->x - fVar11; - local_18._4_4_ = fVar10 - fVar7; + (*(undefined4 *)((char *)&(local_18) + 0x0)) = pVVar2->x - fVar11; + (*(undefined4 *)((char *)&(local_18) + 0x4)) = fVar10 - fVar7; clampedOffset = ((Vector *)((Vector *)local_18))->Vector::Resized(&local_20,fVar9); fVar9 = clampedOffset->y; pVVar2->x = fVar11 + clampedOffset->x; @@ -1921,11 +1921,11 @@ LAB_00970af5: if ((room->_variant == 6) || (room->_variant == 0xf)) { if (room->_spawnerType == 0x19a) { auVar6 = ZEXT812(0x42b00000); - if (auVar6._0_4_ <= fVar7) { - auVar6._4_8_ = auVar6._4_8_; - auVar6._0_4_ = fVar7; + if ((*(undefined4 *)((char *)&(auVar6) + 0x0)) <= fVar7) { + (*(undefined8 *)((char *)&(auVar6) + 0x4)) = (*(undefined8 *)((char *)&(auVar6) + 0x4)); + (*(undefined4 *)((char *)&(auVar6) + 0x0)) = fVar7; } - room->_laserLength = auVar6._0_4_; + room->_laserLength = (*(undefined4 *)((char *)&(auVar6) + 0x0)); } else { room->_laserLength = fVar7 + 100.0; @@ -2005,7 +2005,7 @@ void Entity_Laser::find_nearest_grid_hit(int unusedFlag, Vector *offset) EntityPtr parent; float *samples; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b0ca6d; local_1c = ExceptionList; @@ -2013,15 +2013,15 @@ void Entity_Laser::find_nearest_grid_hit(int unusedFlag, Vector *offset) if (this->_sampleLaser != 0) { hitGridSet = (Room *)0x0; local_3c = 0; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); hitGridSet = operator_new(0x1c); *(Room **)hitGridSet = hitGridSet; hitGridSet->_descriptor = hitGridSet; - hitGridSet->_roomType = (int)hitGridSet; + hitGridSet->_roomType = GHIDRA_INT(hitGridSet); *(undefined2 *)&hitGridSet->_gridWidth = 0x101; local_14 = 0; samples = (this->_homingLaser)._nonOptimizedSamples._begin; - uVar5 = (int)(this->_homingLaser)._nonOptimizedSamples._end - (int)samples >> 3; + uVar5 = GHIDRA_INT((this->_homingLaser)._nonOptimizedSamples._end) - GHIDRA_INT(samples) >> 3; sampleCount = uVar5; if (1 < uVar5) { lastInRoomDirY = 0.0; @@ -2092,9 +2092,9 @@ void Entity_Laser::find_nearest_grid_hit(int unusedFlag, Vector *offset) if (isInRoom == 0) { maskedFlags = BitSet128::operator_and (&local_d0,&this->_tearFlags,&g_tearFlagContinuum); - pRVar2 = (Room *)((uint)maskedFlags->_l | *(uint *)((int)&maskedFlags->_l + 4)); + pRVar2 = (Room *)(GHIDRA_UINT(maskedFlags->_l) | *(uint *)(GHIDRA_INT(&maskedFlags->_l) + 4)); if ((pRVar2 != (Room *)0x0) || - (pRVar2 = (Room *)((uint)maskedFlags->_h | *(uint *)((int)&maskedFlags->_h + 4)), + (pRVar2 = (Room *)(GHIDRA_UINT(maskedFlags->_h) | *(uint *)(GHIDRA_INT(&maskedFlags->_h) + 4)), pRVar2 != (Room *)0x0)) { LAB_00971074: if (travelled < this->_impactDistance) { @@ -2108,8 +2108,8 @@ LAB_00971074: } else { pRVar2 = game->_room; - iVar4 = (int)((local_48 - 40.0) / 40.0 + 0.5); - iVar1 = (int)((local_44 - 120.0) / 40.0 + 0.5); + iVar4 = GHIDRA_INT(((local_48 - 40.0) / 40.0 + 0.5)); + iVar1 = GHIDRA_INT(((local_44 - 120.0) / 40.0 + 0.5)); if (((-1 < iVar4) && (((iVar4 < pRVar2->_gridWidth && (-1 < iVar1)) && (iVar1 < pRVar2->_gridHeight)))) && (iVar4 = pRVar2->_gridWidth * iVar1 + iVar4, -1 < iVar4)) { @@ -2135,9 +2135,9 @@ LAB_00971074: if (isInRoom == 0) { maskedFlags = BitSet128::operator_and (&local_e0,&this->_tearFlags,&g_tearFlagContinuum); - pRVar2 = (Room *)((uint)maskedFlags->_l | *(uint *)((int)&maskedFlags->_l + 4)); + pRVar2 = (Room *)(GHIDRA_UINT(maskedFlags->_l) | *(uint *)(GHIDRA_INT(&maskedFlags->_l) + 4)); if ((pRVar2 != (Room *)0x0) || - (pRVar2 = (Room *)((uint)maskedFlags->_h | *(uint *)((int)&maskedFlags->_h + 4)), + (pRVar2 = (Room *)(GHIDRA_UINT(maskedFlags->_h) | *(uint *)(GHIDRA_INT(&maskedFlags->_h) + 4)), pRVar2 != (Room *)0x0)) { LAB_009711e5: if (travelled < this->_impactDistance) { @@ -2151,8 +2151,8 @@ LAB_009711e5: } else { pRVar2 = game->_room; - iVar4 = (int)((local_44 - 40.0) / 40.0 + 0.5); - iVar1 = (int)((local_48 - 120.0) / 40.0 + 0.5); + iVar4 = GHIDRA_INT(((local_44 - 40.0) / 40.0 + 0.5)); + iVar1 = GHIDRA_INT(((local_48 - 120.0) / 40.0 + 0.5)); if (((-1 < iVar4) && (((iVar4 < pRVar2->_gridWidth && (-1 < iVar1)) && (iVar1 < pRVar2->_gridHeight)) )) && (iVar4 = pRVar2->_gridWidth * iVar1 + iVar4, -1 < iVar4)) { @@ -2183,24 +2183,24 @@ LAB_009711e5: node = *(Room **)hitGridSet; if (node != hitGridSet) { do { - damage_grid_entity(this,node->_gridHeight,(int)pRVar2,&node->_topLeftPos); + damage_grid_entity(this,node->_gridHeight,GHIDRA_INT(pRVar2),&node->_topLeftPos); pRVar2 = (Room *)node->_roomType; - if (*(char *)((int)&pRVar2->_gridWidth + 1) == '\0') { - isNil = *(char *)((int)&(*(Room **)pRVar2)->_gridWidth + 1); + if (*(char *)(GHIDRA_INT(&pRVar2->_gridWidth) + 1) == '\0') { + isNil = *(char *)(GHIDRA_INT(&(*(Room **)pRVar2)->_gridWidth) + 1); node = pRVar2; pRVar2 = *(Room **)pRVar2; while (isNil == '\0') { - isNil = *(char *)((int)&(*(Room **)pRVar2)->_gridWidth + 1); + isNil = *(char *)(GHIDRA_INT(&(*(Room **)pRVar2)->_gridWidth) + 1); node = pRVar2; pRVar2 = *(Room **)pRVar2; } } else { - isNil = *(char *)((int)&node->_descriptor->_gridWidth + 1); + isNil = *(char *)(GHIDRA_INT(&node->_descriptor->_gridWidth) + 1); nextNode = node->_descriptor; pRVar2 = node; while ((node = nextNode, isNil == '\0' && (pRVar2 == (Room *)node->_roomType))) { - isNil = *(char *)((int)&node->_descriptor->_gridWidth + 1); + isNil = *(char *)(GHIDRA_INT(&node->_descriptor->_gridWidth) + 1); nextNode = node->_descriptor; pRVar2 = node; } @@ -2255,10 +2255,10 @@ LAB_0097143e: local_30 = 5.04467e-44; local_54.y = dirY; do { - if ((uVar5 < 0x1c0) && (*(int *)((char *)pvVar3 + (int)local_30) != 0)) { - relX = (((float)((int)uVar5 % *(int *)((char *)pvVar3 + 0xc)) * 40.0 + 40.0) - (this->_pos).x) + if ((uVar5 < 0x1c0) && (*(int *)((char *)pvVar3 + GHIDRA_INT(local_30)) != 0)) { + relX = (((float)(GHIDRA_INT(uVar5) % *(int *)((char *)pvVar3 + 0xc)) * 40.0 + 40.0) - (this->_pos).x) + offset->x; - relY = (((float)((int)uVar5 / *(int *)((char *)pvVar3 + 0xc)) * 40.0 + 120.0) - (this->_pos).y) + relY = (((float)(GHIDRA_INT(uVar5) / *(int *)((char *)pvVar3 + 0xc)) * 40.0 + 120.0) - (this->_pos).y) + offset->y; if (0.0 < this->_maxDistance) { maxReach = this->_size + this->_maxDistance; @@ -2269,14 +2269,14 @@ LAB_0097143e: alongDistance = relY * dirY + relX * local_54.x; if (((ABS(relY * local_54.x + relX * dirY) < this->_size + 15.0) && (0.0 < alongDistance)) && (alongDistance <= maxReach)) { - damage_grid_entity(this,uVar5,(int)offset,&local_54); + damage_grid_entity(this,uVar5,GHIDRA_INT(offset),&local_54); dirY = local_54.y; } } uVar5 = uVar5 + 1; - local_30 = (float)((int)local_30 + 4); + local_30 = (float)(GHIDRA_INT(local_30) + 4); pvVar3 = g_game->_room; - } while ((int)uVar5 < *(int *)((char *)pvVar3 + 0x10) * *(int *)((char *)pvVar3 + 0xc)); + } while (GHIDRA_INT(uVar5) < *(int *)((char *)pvVar3 + 0x10) * *(int *)((char *)pvVar3 + 0xc)); } ExceptionList = local_1c; return; @@ -2309,8 +2309,8 @@ byte Entity_Laser::damage_grid_entity(int gridIndex, int unused, Vector *directi code *gridVfunc; Room *room; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); - if ((0x1bf < (uint)gridIndex) || + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); + if ((0x1bf < GHIDRA_UINT(gridIndex)) || (gridEntity = *(GridEntity **)((char *)g_game->_room + gridIndex * 4 + 0x24), gridEntity == (GridEntity *)0x0)) { return 0; @@ -2318,10 +2318,10 @@ byte Entity_Laser::damage_grid_entity(int gridIndex, int unused, Vector *directi if ((gridEntity->_collisionClass == 1) || (gridEntity->_collisionClass == 0)) goto LAB_009717bb; rngResult = Random(); if ((rngResult & 3) != 0) goto LAB_009717bb; - tearFlagsLow._0_4_ = SUB84((gridEntity->_tearFlags)._l,0); - tearFlagsLow._4_4_ = *(uint *)((int)&(gridEntity->_tearFlags)._l + 4); + (*(undefined4 *)((char *)&(tearFlagsLow) + 0x0)) = SUB84((gridEntity->_tearFlags)._l,0); + (*(undefined4 *)((char *)&(tearFlagsLow) + 0x4)) = *(uint *)(GHIDRA_INT(&(gridEntity->_tearFlags)._l) + 4); VStack_80.x = *(float *)&(gridEntity->_tearFlags)._h; - VStack_80.y = *(float *)((int)&(gridEntity->_tearFlags)._h + 4); + VStack_80.y = *(float *)(GHIDRA_INT(&(gridEntity->_tearFlags)._h) + 4); source = gridEntity->_spawnerEntity; if (source != (EntityPtr)0x0) { if (*(int *)((char *)source + 0x28) == 1) { @@ -2333,10 +2333,10 @@ byte Entity_Laser::damage_grid_entity(int gridIndex, int unused, Vector *directi goto LAB_00971660; pTVar2 = Entity_Player::GetTearHitParams ((Entity_Player *)room,&tearParams,3,1.0,0,(Entity *)source); - tearFlagsLow._0_4_ = tearFlagsLow._0_4_ | (uint)(pTVar2->_flags)._l; - tearFlagsLow._4_4_ = tearFlagsLow._4_4_ | *(uint *)((int)&(pTVar2->_flags)._l + 4); - VStack_80.x = (float)((uint)VStack_80.x | (uint)(pTVar2->_flags)._h); - VStack_80.y = (float)((uint)VStack_80.y | *(uint *)((int)&(pTVar2->_flags)._h + 4)); + (*(undefined4 *)((char *)&(tearFlagsLow) + 0x0)) = (*(undefined4 *)((char *)&(tearFlagsLow) + 0x0)) | GHIDRA_UINT((pTVar2->_flags)._l); + (*(undefined4 *)((char *)&(tearFlagsLow) + 0x4)) = (*(undefined4 *)((char *)&(tearFlagsLow) + 0x4)) | *(uint *)(GHIDRA_INT(&(pTVar2->_flags)._l) + 4); + VStack_80.x = (float)(GHIDRA_UINT(VStack_80.x) | GHIDRA_UINT((pTVar2->_flags)._h)); + VStack_80.y = (float)(GHIDRA_UINT(VStack_80.y) | *(uint *)(GHIDRA_INT(&(pTVar2->_flags)._h) + 4)); } LAB_00971660: pBVar3 = BitSet128::operator_or((BitSet128 *)breakFlagMask,&g_tearFlagAcid,&g_tearFlagRock); @@ -2483,7 +2483,7 @@ void Entity_Laser::update_line_hits() local_14 = -NAN; puStack_18 = &LAB_00b0caa0; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)((&scratchColor2)[1]._colorize + 3); + local_24 = __security_cookie ^ GHIDRA_UINT(((&scratchColor2)[1]._colorize + 3)); ExceptionList = &local_1c; laser = this; if (this->_sampleLaser == 0) { @@ -2494,7 +2494,7 @@ void Entity_Laser::update_line_hits() local_a8 = g_game->_room; if (*(int *)((char *)local_a8 + 0x1264) != 0) { do { - pEVar10 = *(Entity **)(*(int *)((char *)local_a8 + 0x125c) + (int)local_a0 * 4); + pEVar10 = *(Entity **)(*(int *)((char *)local_a8 + 0x125c) + GHIDRA_INT(local_a0) * 4); bVar2 = CanDamageEntity(this,pEVar10); if (bVar2 != 0) { fVar12 = (pEVar10->_pos).x - (this->_pos).x; @@ -2538,8 +2538,8 @@ LAB_009736b9: maskedFlags = BitSet128::operator_and (&knockbackFlagTest,&this->_tearFlags,&g_tearFlagKnockback ); - if (((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) { + if ((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) { fVar13 = fVar13 + fVar13; fVar12 = fVar12 + fVar12; } @@ -2585,7 +2585,7 @@ LAB_00973251: scratchColor._colorize[1] = (this->_sprite)._color._colorize[1]; scratchColor._colorize[2] = (this->_sprite)._color._colorize[2]; scratchColor._colorize[3] = (this->_sprite)._color._colorize[3]; - scratchColor._offset._0_8_ = *(undefined8 *)(this->_sprite)._color._offset; + (*(undefined8 *)((char *)&(scratchColor._offset) + 0x0)) = *(undefined8 *)(this->_sprite)._color._offset; ((Color *)(&scratchColor))->Color::__mul(&layer->_color); scratchColor2._tint[0] = scratchColor._tint[0]; scratchColor2._tint[1] = scratchColor._tint[1]; @@ -2598,7 +2598,7 @@ LAB_00973251: scratchColor2._colorize[3] = scratchColor._colorize[3]; scratchColor2._offset[0] = scratchColor._offset[0]; scratchColor2._offset[1] = scratchColor._offset[1]; - ((Color *)(&scratchColor2))->Color::__mul((ColorMod *)((int)pvVar4 + 0x30)); + ((Color *)(&scratchColor2))->Color::__mul((ColorMod *)(GHIDRA_INT(pvVar4) + 0x30)); splashColor._offset[2] = scratchColor2._offset[2]; splashColor._tint[0] = scratchColor2._tint[0]; splashColor._tint[1] = scratchColor2._tint[1]; @@ -2621,12 +2621,12 @@ LAB_00973251: do { rngResult = Random(); rngValue = Random(); - local_d0 = (float *)((float)((double)(int)rngValue + - __uint_to_double_fixup[-((int)rngValue >> 0x1f)] + local_d0 = (float *)((float)((double)GHIDRA_INT(rngValue) + + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)] ) * 2.3283064e-10 * 6.0 + 4.0); rngValue = Random(); - fVar6 = (float)((double)(int)rngValue + - __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + fVar6 = (float)((double)GHIDRA_INT(rngValue) + + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_ac = (ColorMod *)(fVar6 + fVar6); local_104.x = cos((float)local_ac); @@ -2636,12 +2636,12 @@ LAB_00973251: rngValue = Random(); local_ac = (ColorMod *) (local_b8 * - (float)((double)(int)rngValue + - __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + (float)((double)GHIDRA_INT(rngValue) + + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 + local_bc); rngValue = Random(); - fVar6 = (float)((double)(int)rngValue + - __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + fVar6 = (float)((double)GHIDRA_INT(rngValue) + + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10; local_fc.x = (float)local_ac * (float)local_90 + (float)local_d4 + (float)local_a4 * fVar6; @@ -2658,7 +2658,7 @@ LAB_00973251: (pEVar10->_posOffset).x = 0.0; (pEVar10->_posOffset).y = local_d8; pEVar10->Update(); - fVar13 = (float)((int)fVar13 - 1); + fVar13 = (float)(GHIDRA_INT(fVar13) - 1); } while (fVar13 != 0.0); this = laser; } @@ -2668,7 +2668,7 @@ LAB_00973251: } } } - local_a0 = (Entity *)((int)local_a0 + 1); + local_a0 = (Entity *)(GHIDRA_INT(local_a0) + 1); } while (local_a0 < *(uint *)((char *)local_a8 + 0x1264)); } } @@ -2682,9 +2682,9 @@ LAB_00973251: std::vector::_Reallocate(10); tearFlags = &this->_tearFlags; maskedFlags = BitSet128::operator_and(&flagResult,tearFlags,&g_tearFlagShielded); - if (((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || + if ((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || (isHitsProjectiles = '\0', - (int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) { + GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) { isHitsProjectiles = '\x01'; } local_b0 = (Entity_Tear *)0x0; @@ -2692,7 +2692,7 @@ LAB_00973251: candidatesCursor = candidatesEnd; if (local_a0[4]._charmedCountdown != 0) { do { - local_98 = *(Entity_Tear **)(local_a0[4]._poisonCountdown + (int)local_b0 * 4); + local_98 = *(Entity_Tear **)(local_a0[4]._poisonCountdown + GHIDRA_INT(local_b0) * 4); local_90 = local_98; if (((local_98->_type == 1000) && ((((iVar3 = local_98->_variant, iVar3 == 0x15 || (iVar3 == 0x21)) || (iVar3 == 0x3f)) || @@ -2749,15 +2749,15 @@ LAB_00971b90: } } maskedFlags = BitSet128::operator_and(&flagResult,&this->_tearFlags,&g_tearFlagAttractor); - if ((((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) && + if (((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) && ((bVar2 = ((Entity *)((Entity *)local_98))->Entity::IsVulnerableEnemy((Entity *)0x0), bVar2 != 0 || (local_98->_type == 5)))) { pEVar9 = local_98; if ((local_98 == (Entity_Tear *)0x0) || (local_98->_type != 5)) { LAB_009719f7: - local_bc = (float)(((int)(this->_homingLaser)._samples._end - - (int)(this->_homingLaser)._samples._begin >> 3) + -1); + local_bc = (float)((GHIDRA_INT((this->_homingLaser)._samples._end) - + GHIDRA_INT((this->_homingLaser)._samples._begin) >> 3) + -1); local_b8 = 1e+06; local_88 = (Entity_Tear *)g_vectorZero.x; local_94 = (Entity_Tear *)g_vectorZero.y; @@ -2765,7 +2765,7 @@ LAB_009719f7: if (local_bc != 0.0) { scratchPoint.y = (pEVar9->_pos).y; scratchPoint.x = (pEVar9->_pos).x; - local_9c = (Vector *)((int)(this->_homingLaser)._samples._begin + 8); + local_9c = (Vector *)(GHIDRA_INT((this->_homingLaser)._samples._begin) + 8); do { segment_project_point(&scratchPoint,local_9c + -1,local_9c,(float *)&local_d0); fVar13 = 40000.0; @@ -2815,8 +2815,8 @@ LAB_009719f7: break; } local_9c = local_9c + 1; - local_a8 = (void *)((int)local_a8 + 1); - } while (local_a8 < (uint)local_bc); + local_a8 = (void *)(GHIDRA_INT(local_a8) + 1); + } while (local_a8 < GHIDRA_UINT(local_bc)); } } else if ((local_98->_tearHaloANM2)._numNullLayers == 0) { @@ -2835,9 +2835,9 @@ LAB_009719f7: candidateIt = candidates; do { local_88 = (laserRef->_homingLaser)._samples._begin; - local_bc = (float)((int)(laserRef->_homingLaser)._samples._end - (int)local_88 >> 3); + local_bc = (float)(GHIDRA_INT((laserRef->_homingLaser)._samples._end) - GHIDRA_INT(local_88) >> 3); local_9c = (Vector *)0x0; - local_a4 = (ColorMod *)((int)local_bc - 1); + local_a4 = (ColorMod *)(GHIDRA_INT(local_bc) - 1); local_a8 = (void *)fVar13; if (local_a4 != (ColorMod *)0x0) { local_94 = (Entity_Tear *)*candidateIt; @@ -2847,20 +2847,20 @@ LAB_009719f7: local_d0 = candidateIt; LAB_00971e12: scratchPoint.x = - *(float *)((local_88->_sprite)._filename._buf + (int)local_9c * 8 + -0x40); - pEVar9 = *(Entity_Tear **)((local_88->_sprite)._filename._buf + (int)local_9c * 8 + -0x3c) + *(float *)((local_88->_sprite)._filename._buf + GHIDRA_INT(local_9c) * 8 + -0x40); + pEVar9 = *(Entity_Tear **)((local_88->_sprite)._filename._buf + GHIDRA_INT(local_9c) * 8 + -0x3c) ; scratchPoint.y = (float)pEVar9; local_98 = pEVar9; local_90 = (Entity_Tear *)scratchPoint.x; bVar2 = IsCircleLaser(laserRef); if (bVar2 == 0) { - if (local_9c == (Vector *)((int)local_bc - 2U)) { + if (local_9c == (Vector *)(GHIDRA_INT(local_bc) - 2U)) { if (laser->_isGridHit == 0) { pEVar9 = (Entity_Tear *)0x0; if (laser->_maxDistance <= 0.0) { - samplePoint = (float *)((int)(&(local_88->_sprite)._filename + -3) + - (int)local_9c * 8); + samplePoint = (float *)(GHIDRA_INT((&(local_88->_sprite)._filename + -3)) + + GHIDRA_INT(local_9c) * 8); local_a0 = (Entity *)((float)local_98 - samplePoint[1]); local_b0 = (Entity_Tear *)((float)local_90 - *samplePoint); fVar13 = sqrtf((float)local_a0 * (float)local_a0 + @@ -2884,7 +2884,7 @@ LAB_00971e12: } segment_project_point (&candidatePosX, - (Vector *)((int)(&(local_88->_sprite)._filename + -3) + (int)local_9c * 8), + (Vector *)(GHIDRA_INT((&(local_88->_sprite)._filename + -3)) + GHIDRA_INT(local_9c) * 8), &scratchPoint,&local_b8); local_b0 = pEVar9; local_a0 = (Entity *) @@ -2932,7 +2932,7 @@ LAB_00971e12: else { fVar13 = sqrtf((float)local_a4 - fVar13); } - samplePoint = (float *)((int)(&(local_88->_sprite)._filename + -3) + (int)local_9c * 8); + samplePoint = (float *)(GHIDRA_INT((&(local_88->_sprite)._filename + -3)) + GHIDRA_INT(local_9c) * 8); pEVar10 = (Entity *)((float)local_a0 * local_b8 + (float)local_a8); fVar6 = (float)local_a0 * local_b8 - fVar13; local_90 = (Entity_Tear *)(((float)local_90 - *samplePoint) / (float)local_a0); @@ -2952,8 +2952,8 @@ LAB_00971e12: local_88 = pEVar9; maskedFlags = BitSet128::operator_and (&creepFlagTest,tearFlags,&g_tearFlagMysteriousLiquidCreep); - if (((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) { + if ((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) { if (laser->_isFirstUpdate == 0) { iVar3 = ((Entity *)((Entity *)laser))->Entity::GetIntervalTicks(4.0,0.0); if (iVar3 == 0) goto LAB_00972346; @@ -2975,8 +2975,8 @@ LAB_00971e12: (Entity *)laser->_spawnerEntity,0,rngResult); impactEffect = (int *)__RTDynamicCast(pEVar10,uVar14,pTVar15,pTVar16,uVar17); fVar13 = g_vectorOne.y * 0.4; - impactEffect[0x39] = (int)(g_vectorOne.x * 0.4); - impactEffect[0x3a] = (int)fVar13; + impactEffect[0x39] = GHIDRA_INT((g_vectorOne.x * 0.4)); + impactEffect[0x3a] = GHIDRA_INT(fVar13); (**(code **)(*impactEffect + 0xc))(); } LAB_00972346: @@ -3003,25 +3003,25 @@ LAB_009723bd: (&stickyBoogerMask,&g_tearFlagSticky,&g_tearFlagBooger); maskedFlags = BitSet128::operator_or(&stickyBoogerSporeMask,maskedFlags,pBVar18); maskedFlags = BitSet128::operator_and(&fluidFlagTest,tearFlags,maskedFlags); - if ((((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) && + if (((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) && ((laser->_isFirstUpdate != 0 || (iVar3 = ((Entity *)((Entity *)laser))->Entity::GetIntervalTicks(4.0,0.0), iVar3 != 0)))) { - local_94 = (Entity_Tear *)((float)local_94 - *(float *)((int)*candidateIt + 0x340)); - local_88 = (Entity_Tear *)((float)local_88 - *(float *)((int)*candidateIt + 0x33c)); + local_94 = (Entity_Tear *)((float)local_94 - *(float *)(GHIDRA_INT(*candidateIt) + 0x340)); + local_88 = (Entity_Tear *)((float)local_88 - *(float *)(GHIDRA_INT(*candidateIt) + 0x33c)); fVar13 = sqrtf((float)local_94 * (float)local_94 + (float)local_88 * (float)local_88 ); - if ((*(float *)((int)*candidateIt + 0x370) < fVar13) && (0.0 < fVar13)) { - fVar13 = *(float *)((int)*candidateIt + 0x370) / fVar13; + if ((*(float *)(GHIDRA_INT(*candidateIt) + 0x370) < fVar13) && (0.0 < fVar13)) { + fVar13 = *(float *)(GHIDRA_INT(*candidateIt) + 0x370) / fVar13; local_88 = (Entity_Tear *)((float)local_88 * fVar13); local_94 = (Entity_Tear *)((float)local_94 * fVar13); } maskedFlags = BitSet128::operator_and(&boogerFlagTest,tearFlags,&g_tearFlagBooger); - if (((int)maskedFlags->_l == 0 && *(int *)((int)&maskedFlags->_l + 4) == 0) && - ((int)maskedFlags->_h == 0 && *(int *)((int)&maskedFlags->_h + 4) == 0)) { + if ((GHIDRA_INT(maskedFlags->_l) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) == 0) && + (GHIDRA_INT(maskedFlags->_h) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) == 0)) { maskedFlags = BitSet128::operator_and(&sporeFlagTest,tearFlags,&g_tearFlagSpore); - if (((int)maskedFlags->_l == 0 && *(int *)((int)&maskedFlags->_l + 4) == 0) && - ((int)maskedFlags->_h == 0 && *(int *)((int)&maskedFlags->_h + 4) == 0)) { + if ((GHIDRA_INT(maskedFlags->_l) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) == 0) && + (GHIDRA_INT(maskedFlags->_h) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) == 0)) { local_a8 = (void *)0x13; } else { @@ -3046,16 +3046,16 @@ LAB_009723bd: maskedFlags = ((BitSet128 *)(maskedFlags))->BitSet128::__bnot(&keptFlagsMask); BitSet128::operator_and(&flagResult,tearFlags,maskedFlags); rngResult = Random(); - tearSpawnPos.x = (float)local_88 + *(float *)((int)*candidateIt + 0x33c); - tearSpawnPos.y = (float)local_94 + *(float *)((int)*candidateIt + 0x340); + tearSpawnPos.x = (float)local_88 + *(float *)(GHIDRA_INT(*candidateIt) + 0x33c); + tearSpawnPos.y = (float)local_94 + *(float *)(GHIDRA_INT(*candidateIt) + 0x340); local_88 = (Entity_Tear *) - ((Game *)(g_game))->Game::Spawn(2,(uint)local_a8,&tearSpawnPos,&g_vectorZero, + ((Game *)(g_game))->Game::Spawn(2,GHIDRA_UINT(local_a8),&tearSpawnPos,&g_vectorZero, (Entity *)laser->_spawnerEntity,0,rngResult); local_88->Update(); - flags._l._4_4_ = flagResult._l._4_4_; - flags._l._0_4_ = (undefined4)flagResult._l; - flags._h._0_4_ = (undefined4)flagResult._h; - flags._h._4_4_ = flagResult._h._4_4_; + (*(undefined4 *)((char *)&(flags._l) + 0x4)) = (*(undefined4 *)((char *)&(flagResult._l) + 0x4)); + (*(undefined4 *)((char *)&(flags._l) + 0x0)) = (undefined4)flagResult._l; + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = (undefined4)flagResult._h; + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = (*(undefined4 *)((char *)&(flagResult._h) + 0x4)); ((Entity_Tear *)(local_88))->Entity_Tear::SetTearFlags(flags); local_88->SetCollisionDamage(laser->_collisionDamage); fVar13 = laser->_scale; @@ -3067,7 +3067,7 @@ LAB_009723bd: ((Entity_Tear *)(local_88))->Entity_Tear::ResetSpriteScale(); local_a4 = (ColorMod *)*candidateIt; g_forceCollideDepth = g_forceCollideDepth + 1; - (**(code **)((int)*(float *)local_88 + 0x5c))(local_a4,1); + (**(code **)(GHIDRA_INT(*(float *)local_88) + 0x5c))(local_a4,1); (**(code **)(*(int *)local_a4 + 0x5c))(local_88,0); g_forceCollideDepth = g_forceCollideDepth + -1; } @@ -3119,15 +3119,15 @@ LAB_00972846: fVar6 = laser->_mass * 1.8000001; fVar12 = fVar6 * (float)pEVar11; fVar6 = fVar6 * (float)pEVar9; - if ((*(int *)((int)*candidateIt + 0x28) == 1) || - (*(int *)((int)*candidateIt + 0x28) == 3)) { + if ((*(int *)(GHIDRA_INT(*candidateIt) + 0x28) == 1) || + (*(int *)(GHIDRA_INT(*candidateIt) + 0x28) == 3)) { fVar6 = fVar6 * 0.2; fVar12 = fVar12 * 0.2; } maskedFlags = BitSet128::operator_and(&knockbackFlagTest,tearFlags,&g_tearFlagKnockback) ; - if (((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) { + if ((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) { fVar6 = fVar6 + fVar6; fVar12 = fVar12 + fVar12; } @@ -3152,13 +3152,13 @@ LAB_009729ca: fVar6 = *candidateIt; local_94 = (Entity_Tear *)-(float)local_90; pVVar7 = (Vector *) - ((*(float *)((char *)pvVar4 + (int)local_9c * 8 + 0xc) - - *(float *)((char *)pvVar4 + (int)local_9c * 8 + 4)) * local_b8 + - *(float *)((char *)pvVar4 + (int)local_9c * 8 + 4)); + ((*(float *)((char *)pvVar4 + GHIDRA_INT(local_9c) * 8 + 0xc) - + *(float *)((char *)pvVar4 + GHIDRA_INT(local_9c) * 8 + 4)) * local_b8 + + *(float *)((char *)pvVar4 + GHIDRA_INT(local_9c) * 8 + 4)); local_88 = (Entity_Tear *) - ((*(float *)((char *)pvVar4 + (int)local_9c * 8 + 8) - - *(float *)((char *)pvVar4 + (int)local_9c * 8)) * local_b8 + - *(float *)((char *)pvVar4 + (int)local_9c * 8)); + ((*(float *)((char *)pvVar4 + GHIDRA_INT(local_9c) * 8 + 8) - + *(float *)((char *)pvVar4 + GHIDRA_INT(local_9c) * 8)) * local_b8 + + *(float *)((char *)pvVar4 + GHIDRA_INT(local_9c) * 8)); pEVar9 = (Entity_Tear *)laser->_size; fVar12 = (*(float *)((char *)fVar6 + 0x340) - (float)pVVar7) * (float)local_94 + (*(float *)((char *)fVar6 + 0x33c) - (float)local_88) * (float)local_98; @@ -3174,7 +3174,7 @@ LAB_009729ca: local_9c = pVVar7; if ((float)local_a8 + 2.0 < (float)local_b0) { pvVar4 = ((AnimationState *)(&(laser->_sprite)._animState))->AnimationState::GetLayerFrame(0); - local_a4 = (ColorMod *)((int)pvVar4 + 0x30); + local_a4 = (ColorMod *)(GHIDRA_INT(pvVar4) + 0x30); layer = ((ANM2 *)(&laser->_sprite))->ANM2::GetLayer((byte *)0x0); local_ac = &(laser->_sprite)._color; scratchColor2._tint[0] = local_ac->_tint[0]; @@ -3185,7 +3185,7 @@ LAB_009729ca: scratchColor2._colorize[1] = (laser->_sprite)._color._colorize[1]; scratchColor2._colorize[2] = (laser->_sprite)._color._colorize[2]; scratchColor2._colorize[3] = (laser->_sprite)._color._colorize[3]; - scratchColor2._offset._0_8_ = *(undefined8 *)(laser->_sprite)._color._offset; + (*(undefined8 *)((char *)&(scratchColor2._offset) + 0x0)) = *(undefined8 *)(laser->_sprite)._color._offset; scratchColor2._offset[2] = (laser->_sprite)._color._offset[2]; ((Color *)(&scratchColor2))->Color::__mul(&layer->_color); scratchColor._tint[0] = scratchColor2._tint[0]; @@ -3223,12 +3223,12 @@ LAB_009729ca: local_d4 = (Entity *)Random(); rngResult = Random(); local_a0 = (Entity *) - ((float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + ((float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 6.0 + 4.0); rngResult = Random(); - fVar13 = (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 + fVar13 = (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_a4 = (ColorMod *)(fVar13 + fVar13); splashVelocity.x = cos((float)local_a4); @@ -3238,19 +3238,19 @@ LAB_009729ca: rngResult = Random(); local_a4 = (ColorMod *) (local_e0 * - (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 + (float)local_a8); rngResult = Random(); - fVar13 = (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 + fVar13 = (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 ; splashPos.y = (float)local_a4 * (float)local_94 + (float)local_9c + fVar13 * local_d8; splashPos.x = (float)local_a4 * (float)local_98 + (float)local_88 + fVar13 * local_dc; local_d4 = ((Game *)(g_game))->Game::Spawn(1000,99,&splashPos,&splashVelocity,(Entity *)0x0,1, - (uint)local_d4); + GHIDRA_UINT(local_d4)); fVar13 = (local_d4->_sprite)._scale.x; fVar6 = (local_d4->_sprite)._scale.y; iVar3 = *(int *)local_d4; @@ -3260,11 +3260,11 @@ LAB_009729ca: (local_d4->_posOffset).x = 0.0; (local_d4->_posOffset).y = local_bc; local_d4->Update(); - pVVar7 = (Vector *)((int)&pVVar7[-1].y + 3); + pVVar7 = (Vector *)(GHIDRA_INT(&pVVar7[-1].y) + 3); } while (pVVar7 != (Vector *)0x0); candidateIt = local_d0; } - if ((*(uint *)((int)*candidateIt + 0x16c) & 0x1000000) != 0) { + if ((*(uint *)(GHIDRA_INT(*candidateIt) + 0x16c) & 0x1000000) != 0) { ((Color *)(&scratchColor))->Color::Reset(); scratchColor._tint[0] = 2.0; scratchColor._tint[1] = 1.0; @@ -3284,12 +3284,12 @@ LAB_009729ca: scratchColor2._offset[1] = scratchColor._offset[1]; local_d4 = (Entity *)Random(); rngResult = Random(); - fVar13 = (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10; + fVar13 = (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10; local_a0 = (Entity *)(fVar13 + fVar13 + 2.0); rngResult = Random(); - fVar13 = (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * + fVar13 = (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_ac = (ColorMod *)(fVar13 + fVar13); local_fc.x = cos((float)local_ac); @@ -3298,21 +3298,21 @@ LAB_009729ca: local_fc.y = local_fc.y + (float)local_a0 * (float)local_98; rngResult = Random(); fVar13 = ((float)local_b0 - (float)local_a8) * - (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 + + (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 + (float)local_a8; local_104.y = fVar13 * (float)local_94 + (float)local_9c; local_104.x = fVar13 * (float)local_98 + (float)local_88; local_a0 = ((Game *)(g_game))->Game::Spawn(1000,2,&local_104,&local_fc,(Entity *)0x0,2, - (uint)local_d4); + GHIDRA_UINT(local_d4)); local_a0->SetColor(&scratchColor2,0xffffffff,0xff,0,1); (local_a0->_posOffset).x = 0.0; (local_a0->_posOffset).y = local_bc; rngResult = Random(); iVar3 = *(int *)local_a0; *(float *)(local_a0[1]._sprite._animDefaultName._buf + 4) = - (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * + (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 360.0; (**(code **)(iVar3 + 0xc))(); } @@ -3328,14 +3328,14 @@ LAB_00973073: } while (candidateIt != candidatesCursor); } if (candidates != (float *)0x0) { - deallocate(candidates,(int)candidatesCapacity - (int)candidates >> 2); + deallocate(candidates,GHIDRA_INT(candidatesCapacity) - GHIDRA_INT(candidates) >> 2); } } ExceptionList = local_1c; return; code_r0x0097207c: local_a8 = (void *)((float)local_a0 + (float)local_a8); - local_9c = (Vector *)((int)&local_9c->x + 1); + local_9c = (Vector *)(GHIDRA_INT(&local_9c->x) + 1); laserRef = laser; if (local_a4 <= local_9c) goto LAB_00973073; goto LAB_00971e12; @@ -3359,11 +3359,11 @@ void Entity_Laser::update_endpoint_and_hits() this->_impactDistance = INFINITY; samples = (this->_homingLaser)._samples._begin; - uVar1 = (int)(this->_homingLaser)._samples._end - (int)samples >> 3; + uVar1 = GHIDRA_INT((this->_homingLaser)._samples._end) - GHIDRA_INT(samples) >> 3; if (1 < uVar1) { (this->_impactPosition).x = *(float *)((char *)samples + uVar1 * 8 + -8); (this->_impactPosition).y = *(float *)((char *)samples + uVar1 * 8 + -4); - sampleCount = (int)(this->_homingLaser)._samples._end - (int)samples >> 3; + sampleCount = GHIDRA_INT((this->_homingLaser)._samples._end) - GHIDRA_INT(samples) >> 3; dirX = *(float *)((char *)samples + sampleCount * 8 + -8) - *(float *)((char *)samples + sampleCount * 8 + -0x10); fVar3 = *(float *)((char *)samples + sampleCount * 8 + -4) - @@ -3386,16 +3386,16 @@ void Entity_Laser::update_endpoint_and_hits() if ((playerSpawner != (EntityPtr)0x0) && (*(int *)((char *)playerSpawner + 0x28) != 1)) { playerSpawner = (EntityPtr)0x0; } - maskedFlags1 = *(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagShrink._l._4_4_; - maskedFlags0 = (uint)(this->_tearFlags)._l & (uint)g_tearFlagShrink._l; - uVar1 = (uint)(this->_tearFlags)._h; - maskedFlags2 = uVar1 & (uint)g_tearFlagShrink._h; - maskedFlags3 = *(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagShrink._h._4_4_; + maskedFlags1 = *(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagShrink._l) + 0x4)); + maskedFlags0 = GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagShrink._l); + uVar1 = GHIDRA_UINT((this->_tearFlags)._h); + maskedFlags2 = uVar1 & GHIDRA_UINT(g_tearFlagShrink._h); + maskedFlags3 = *(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagShrink._h) + 0x4)); if ((maskedFlags0 == 0 && maskedFlags1 == 0) && (maskedFlags2 == 0 && maskedFlags3 == 0)) { - if ((((uint)(this->_tearFlags)._l & (uint)g_tearFlagGrow._l) == 0 && - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagGrow._l._4_4_) == 0) && - ((uVar1 & (uint)g_tearFlagGrow._h) == 0 && - (*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagGrow._h._4_4_) == 0)) + if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagGrow._l)) == 0 && + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagGrow._l) + 0x4))) == 0) && + ((uVar1 & GHIDRA_UINT(g_tearFlagGrow._h)) == 0 && + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagGrow._h) + 0x4))) == 0)) goto LAB_00973a3a; } if ((this->_subtype == 1) || (this->_subtype == 2)) { @@ -3433,7 +3433,7 @@ void Entity_Laser::refresh_tear_params() qword heldFlagsHigh; qword heldFlagsLow; - local_14 = __security_cookie ^ (uint)auStack_98; + local_14 = __security_cookie ^ GHIDRA_UINT(auStack_98); if ((((*(undefined1 *)((char *)(this) + 0x517)) != '\0') && (this->_oneHit == 0)) && (this->_isInterpolating == 0)) { if ((this->_isFirstUpdate == 0) && (iVar3 = ((Entity *)((Entity *)this))->Entity::GetIntervalTicks(2.0,0.0), iVar3 == 0)) { @@ -3464,37 +3464,37 @@ void Entity_Laser::refresh_tear_params() Entity_Player::GetTearHitParams ((Entity_Player *)local_94,&hitParams,3,this->_damageMultiplier,(uVar4 & 1) * 2 + -1 ,(Entity *)source); - uVar4 = ~g_tearFlagWait._l._4_4_; - uVar6 = ~(uint)g_tearFlagWait._h; - uVar5 = ~g_tearFlagWait._h._4_4_; + uVar4 = ~(*(undefined4 *)((char *)&(g_tearFlagWait._l) + 0x4)); + uVar6 = ~GHIDRA_UINT(g_tearFlagWait._h); + uVar5 = ~(*(undefined4 *)((char *)&(g_tearFlagWait._h) + 0x4)); iVar3 = this->_timeout; - *(uint *)&(this->_tearFlags)._l = ~(uint)g_tearFlagWait._l & (uint)hitParams._flags._l; - *(uint *)((int)&(this->_tearFlags)._l + 4) = uVar4 & hitParams._flags._l._4_4_; - *(uint *)&(this->_tearFlags)._h = uVar6 & (uint)hitParams._flags._h; - *(uint *)((int)&(this->_tearFlags)._h + 4) = uVar5 & hitParams._flags._h._4_4_; - uVar4 = g_tearFlagExplosive._h._4_4_; + *(uint *)&(this->_tearFlags)._l = ~GHIDRA_UINT(g_tearFlagWait._l) & GHIDRA_UINT(hitParams._flags._l); + *(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) = uVar4 & (*(undefined4 *)((char *)&(hitParams._flags._l) + 0x4)); + *(uint *)&(this->_tearFlags)._h = uVar6 & GHIDRA_UINT(hitParams._flags._h); + *(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) = uVar5 & (*(undefined4 *)((char *)&(hitParams._flags._h) + 0x4)); + uVar4 = (*(undefined4 *)((char *)&(g_tearFlagExplosive._h) + 0x4)); if (iVar3 < 0) { - uVar6 = ~(uint)g_tearFlagExplosive._h; - uVar5 = ~g_tearFlagExplosive._l._4_4_; + uVar6 = ~GHIDRA_UINT(g_tearFlagExplosive._h); + uVar5 = ~(*(undefined4 *)((char *)&(g_tearFlagExplosive._l) + 0x4)); *(uint *)&(this->_tearFlags)._l = - (uint)(this->_tearFlags)._l & ~(uint)g_tearFlagExplosive._l; - puVar1 = (uint *)((int)&(this->_tearFlags)._l + 4); + GHIDRA_UINT((this->_tearFlags)._l) & ~GHIDRA_UINT(g_tearFlagExplosive._l); + puVar1 = (uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); *puVar1 = *puVar1 & uVar5; pqVar2 = &(this->_tearFlags)._h; - *(uint *)pqVar2 = (uint)*pqVar2 & uVar6; - puVar1 = (uint *)((int)&(this->_tearFlags)._h + 4); + *(uint *)pqVar2 = GHIDRA_UINT(*pqVar2) & uVar6; + puVar1 = (uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); *puVar1 = *puVar1 & ~uVar4; } heldFlagsHigh = (this->_heldTearFlags)._h; - uVar4 = *(uint *)((int)&(this->_heldTearFlags)._h + 4); + uVar4 = *(uint *)(GHIDRA_INT(&(this->_heldTearFlags)._h) + 4); heldFlagsLow = (this->_heldTearFlags)._l; - puVar1 = (uint *)((int)&(this->_tearFlags)._l + 4); - *puVar1 = *puVar1 & ~*(uint *)((int)&(this->_heldTearFlags)._l + 4); + puVar1 = (uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); + *puVar1 = *puVar1 & ~*(uint *)(GHIDRA_INT(&(this->_heldTearFlags)._l) + 4); game = g_game; - *(uint *)&(this->_tearFlags)._l = (uint)(this->_tearFlags)._l & ~(uint)heldFlagsLow; + *(uint *)&(this->_tearFlags)._l = GHIDRA_UINT((this->_tearFlags)._l) & ~GHIDRA_UINT(heldFlagsLow); pqVar2 = &(this->_tearFlags)._h; - *(uint *)pqVar2 = (uint)*pqVar2 & ~(uint)heldFlagsHigh; - puVar1 = (uint *)((int)&(this->_tearFlags)._h + 4); + *(uint *)pqVar2 = GHIDRA_UINT(*pqVar2) & ~GHIDRA_UINT(heldFlagsHigh); + puVar1 = (uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); *puVar1 = *puVar1 & ~uVar4; if ((*(int *)&game->_deathmatchManager < 2) || (this->_subtype != 2)) { damageScale = 1.0; @@ -3627,19 +3627,19 @@ void Entity_Laser::update_laser() local_14 = 0xffffffff; puStack_18 = &LAB_00b0cae8; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(local_58 + 0x48); + local_24 = __security_cookie ^ GHIDRA_UINT((local_58 + 0x48)); ExceptionList = &local_1c; local_150.y = (float)this; refresh_tear_params(); bVar6 = this->_isFirstUpdate; if ((bVar6 != 0) || (this->_oneHit == 0)) { - uVar26 = *(undefined4 *)((int)&(this->_tearFlags)._l + 4); + uVar26 = *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); qVar4 = (this->_tearFlags)._h; - uVar3 = *(undefined4 *)((int)&(this->_tearFlags)._h + 4); - *(int *)&(this->_activeTearFlags)._l = (int)(this->_tearFlags)._l; - *(undefined4 *)((int)&(this->_activeTearFlags)._l + 4) = uVar26; - *(int *)&(this->_activeTearFlags)._h = (int)qVar4; - *(undefined4 *)((int)&(this->_activeTearFlags)._h + 4) = uVar3; + uVar3 = *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); + *(int *)&(this->_activeTearFlags)._l = GHIDRA_INT((this->_tearFlags)._l); + *(undefined4 *)(GHIDRA_INT(&(this->_activeTearFlags)._l) + 4) = uVar26; + *(int *)&(this->_activeTearFlags)._h = GHIDRA_INT(qVar4); + *(undefined4 *)(GHIDRA_INT(&(this->_activeTearFlags)._h) + 4) = uVar3; } if ((((this->_variant == 7) || (this->_isInterpolating != 0)) || (this->_dead != 0)) || ((bVar6 == 0 && (iVar8 = ((Entity *)((Entity *)this))->Entity::GetIntervalTicks(2.0,0.0), iVar8 == 0)))) { @@ -3666,11 +3666,11 @@ void Entity_Laser::update_laser() (this->_pos).y = fVar21; (this->_pos).x = fVar18; } - local_fc = (float)((uint)EVar17 & 0xffffff00); + local_fc = (float)(GHIDRA_UINT(EVar17) & 0xffffff00); isSamplesRebuilt = '\0'; isRedirected = '\0'; - local_104.y = (float)((uint)local_104.y & 0xffffff00); - local_114.y = (float)((uint)local_114.y & 0xffffff00); + local_104.y = (float)(GHIDRA_UINT(local_104.y) & 0xffffff00); + local_114.y = (float)(GHIDRA_UINT(local_114.y) & 0xffffff00); if ((this->_isInterpolating == 0) && (this->_timeout != 0)) { iVar8 = this->_variant; if ((iVar8 == 6) || (iVar8 == 0xf)) { @@ -3785,7 +3785,7 @@ LAB_0097663d: local_f0.y = 0.0; local_f0.x = 0.0; EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&local_160,1000,0xbc,-1,0,0); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&local_160,1000,0xbc,-1,0,0); local_14 = 0; local_c0.y = 0.0; if ((EntityPtr)local_160._size == (EntityPtr)0x0) { @@ -3823,8 +3823,8 @@ LAB_00976cc2: } } fVar18 = local_130.y; - local_c0.y = (float)((int)local_c0.y + 1); - } while ((uint)local_c0.y < (uint)local_160._size); + local_c0.y = (float)(GHIDRA_INT(local_c0.y) + 1); + } while (GHIDRA_UINT(local_c0.y) < GHIDRA_UINT(local_160._size)); if ((EntityPtr)local_130.y == (EntityPtr)0x0) goto LAB_00976cc2; ((Vector *)((Vector *)local_b4))->Vector::__sub(&local_cc,&local_120); local_d4[0] = (EntityPtr)0x40000000; @@ -3861,7 +3861,7 @@ LAB_00976cc2: spawnedLaser->Update(); ((EntityPtr *)((EntityPtr *)&this->_bounceLaser))->EntityPtr::SetReference((Entity *)spawnedLaser); isRedirected = '\x01'; - local_104.y = (float)CONCAT31(local_104.y._1_3_,1); + local_104.y = (float)CONCAT31((*(undefined1 *)((char *)&(local_104.y) + 0x1)),1); } else { bounceLaser = (Entity_Laser *)__RTDynamicCast(); @@ -3882,7 +3882,7 @@ LAB_00976cc2: (bounceLaser->_pos).y = pVVar14->y; LAB_00976cb2: isRedirected = '\x01'; - local_104.y = (float)CONCAT31(local_104.y._1_3_,1); + local_104.y = (float)CONCAT31((*(undefined1 *)((char *)&(local_104.y) + 0x1)),1); } } local_14 = 0xffffffff; @@ -3892,7 +3892,7 @@ LAB_00976cb2: fVar18 = ((Vector *)(&local_140))->Vector::Length(); this->_laserLength = fVar18; update_sample_points(this); - local_fc = (float)CONCAT31(local_fc._1_3_,isRedirected); + local_fc = (float)CONCAT31((*(undefined1 *)((char *)&(local_fc) + 0x1)),isRedirected); } } else { @@ -3919,7 +3919,7 @@ LAB_00976cb2: local_f0.y = local_c0.y; local_10c.y = g_vectorZero.x; local_104.y = g_vectorZero.y; - if ((1 < (uint)(this->_sprite)._layerCount) && + if ((1 < GHIDRA_UINT((this->_sprite)._layerCount)) && (pvVar9 = ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::GetLayerFrame(0), pvVar9 != (void *)0x0)) { fVar21 = *(float *)((char *)pvVar9 + 0x14) + *(float *)((char *)pvVar9 + 0xc); @@ -3995,14 +3995,14 @@ LAB_009743d3: *(float *)&(*(undefined1 *)((char *)&((this->_homingLaser)) + 0xc)) = (this->_endPoint).x; *(float *)&(*(undefined1 *)((char *)&((this->_homingLaser)) + 0x10)) = (this->_endPoint).y; pBVar13 = BitSet128::operator_and((BitSet128 *)&local_160,&this->_tearFlags,&g_tearFlagOrbit); - if (((int)pBVar13->_l != 0 || *(int *)((int)&pBVar13->_l + 4) != 0) || - ((int)pBVar13->_h != 0 || *(int *)((int)&pBVar13->_h + 4) != 0)) { + if ((GHIDRA_INT(pBVar13->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar13->_l) + 4) != 0) || + (GHIDRA_INT(pBVar13->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar13->_h) + 4) != 0)) { ((HomingLaser *)(&this->_homingLaser))->HomingLaser::build_curl_path(60.0); } pBVar13 = BitSet128::operator_and ((BitSet128 *)&local_160,&this->_tearFlags,&g_tearFlagBoomerang); - if (((int)pBVar13->_l != 0 || *(int *)((int)&pBVar13->_l + 4) != 0) || - ((int)pBVar13->_h != 0 || *(int *)((int)&pBVar13->_h + 4) != 0)) { + if ((GHIDRA_INT(pBVar13->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar13->_l) + 4) != 0) || + (GHIDRA_INT(pBVar13->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar13->_h) + 4) != 0)) { HomingLaser::build_wiggle_bezier(); pvVar9 = (this->_homingLaser)._bezier._end; if ((this->_homingLaser)._bezier._begin != pvVar9) { @@ -4012,9 +4012,9 @@ LAB_009743d3: } pBVar13 = BitSet128::operator_and ((BitSet128 *)&local_160,&this->_tearFlags,&g_tearFlagTurnHorizontal); - uVar15 = (uint)pBVar13->_l | *(uint *)((int)&pBVar13->_l + 4); + uVar15 = GHIDRA_UINT(pBVar13->_l) | *(uint *)(GHIDRA_INT(&pBVar13->_l) + 4); if ((uVar15 != 0) || - (uVar15 = (uint)pBVar13->_h | *(uint *)((int)&pBVar13->_h + 4), uVar15 != 0)) { + (uVar15 = GHIDRA_UINT(pBVar13->_h) | *(uint *)(GHIDRA_INT(&pBVar13->_h) + 4), uVar15 != 0)) { laser_sample_trace_entities(&this->_homingLaser,uVar15); pvVar9 = (this->_homingLaser)._bezier._end; if ((this->_homingLaser)._bezier._begin != pvVar9) { @@ -4024,8 +4024,8 @@ LAB_009743d3: } pBVar13 = BitSet128::operator_and((BitSet128 *)&local_160,&this->_tearFlags,&g_tearFlagHoming) ; - if (((int)pBVar13->_l == 0 && *(int *)((int)&pBVar13->_l + 4) == 0) && - ((int)pBVar13->_h == 0 && *(int *)((int)&pBVar13->_h + 4) == 0)) { + if ((GHIDRA_INT(pBVar13->_l) == 0 && *(int *)(GHIDRA_INT(&pBVar13->_l) + 4) == 0) && + (GHIDRA_INT(pBVar13->_h) == 0 && *(int *)(GHIDRA_INT(&pBVar13->_h) + 4) == 0)) { if (this->_homingType == 1) { iVar8 = 4; } @@ -4055,12 +4055,12 @@ LAB_009743d3: ((HomingLaser *)(&this->_homingLaser))->HomingLaser::CalculateSamples(fVar18); pBVar13 = BitSet128::operator_and((BitSet128 *)&local_160,&this->_tearFlags,&g_tearFlagSquare) ; - if (((((int)pBVar13->_l != 0 || *(int *)((int)&pBVar13->_l + 4) != 0) || - ((int)pBVar13->_h != 0 || *(int *)((int)&pBVar13->_h + 4) != 0)) && + if ((((GHIDRA_INT(pBVar13->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar13->_l) + 4) != 0) || + (GHIDRA_INT(pBVar13->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar13->_h) + 4) != 0)) && (pBVar13 = BitSet128::operator_and ((BitSet128 *)&local_160,&this->_tearFlags,&g_tearFlagOrbit), - (int)pBVar13->_l == 0 && *(int *)((int)&pBVar13->_l + 4) == 0)) && - ((int)pBVar13->_h == 0 && *(int *)((int)&pBVar13->_h + 4) == 0)) { + GHIDRA_INT(pBVar13->_l) == 0 && *(int *)(GHIDRA_INT(&pBVar13->_l) + 4) == 0)) && + (GHIDRA_INT(pBVar13->_h) == 0 && *(int *)(GHIDRA_INT(&pBVar13->_h) + 4) == 0)) { local_d4[0] = (EntityPtr) (float)((double)this->_index + __uint_to_double_fixup[-(this->_index >> 0x1f)] ); @@ -4074,8 +4074,8 @@ LAB_009743d3: } pBVar13 = BitSet128::operator_and((BitSet128 *)&local_160,&this->_tearFlags,&g_tearFlagWiggle) ; - if (((int)pBVar13->_l != 0 || *(int *)((int)&pBVar13->_l + 4) != 0) || - ((int)pBVar13->_h != 0 || *(int *)((int)&pBVar13->_h + 4) != 0)) { + if ((GHIDRA_INT(pBVar13->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar13->_l) + 4) != 0) || + (GHIDRA_INT(pBVar13->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar13->_h) + 4) != 0)) { local_d4[0] = (EntityPtr) (float)((double)this->_index + __uint_to_double_fixup[-(this->_index >> 0x1f)] ); @@ -4089,12 +4089,12 @@ LAB_009743d3: } pBVar13 = BitSet128::operator_and ((BitSet128 *)&local_160,&this->_tearFlags,&g_tearFlagBigSpiral); - if (((int)pBVar13->_l == 0 && *(int *)((int)&pBVar13->_l + 4) == 0) && - ((int)pBVar13->_h == 0 && *(int *)((int)&pBVar13->_h + 4) == 0)) { + if ((GHIDRA_INT(pBVar13->_l) == 0 && *(int *)(GHIDRA_INT(&pBVar13->_l) + 4) == 0) && + (GHIDRA_INT(pBVar13->_h) == 0 && *(int *)(GHIDRA_INT(&pBVar13->_h) + 4) == 0)) { pBVar13 = BitSet128::operator_and ((BitSet128 *)&local_160,&this->_tearFlags,&g_tearFlagSpiral); - if (((int)pBVar13->_l != 0 || *(int *)((int)&pBVar13->_l + 4) != 0) || - ((int)pBVar13->_h != 0 || *(int *)((int)&pBVar13->_h + 4) != 0)) { + if ((GHIDRA_INT(pBVar13->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar13->_l) + 4) != 0) || + (GHIDRA_INT(pBVar13->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar13->_h) + 4) != 0)) { local_d4[0] = (EntityPtr) (float)((double)this->_index + __uint_to_double_fixup[-(this->_index >> 0x1f)]); @@ -4123,26 +4123,26 @@ LAB_009747b1: } pBVar13 = BitSet128::operator_or(&local_170,&g_tearFlagPop,&g_tearFlagAbsorb); pBVar13 = BitSet128::operator_and(&local_1b0,&this->_tearFlags,pBVar13); - if (((int)pBVar13->_l != 0 || *(int *)((int)&pBVar13->_l + 4) != 0) || - ((int)pBVar13->_h != 0 || *(int *)((int)&pBVar13->_h + 4) != 0)) { + if ((GHIDRA_INT(pBVar13->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar13->_l) + 4) != 0) || + (GHIDRA_INT(pBVar13->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar13->_h) + 4) != 0)) { bVar6 = ((HomingLaser *)(&this->_homingLaser))->HomingLaser::truncate_samples(120.0); local_fc = (float)CONCAT31(extraout_var,bVar6); - local_114.y = (float)CONCAT31(local_114.y._1_3_,bVar6); + local_114.y = (float)CONCAT31((*(undefined1 *)((char *)&(local_114.y) + 0x1)),bVar6); } if (((this->_entityGridCollisionClass != 0) && (pBVar13 = BitSet128::operator_and(&local_1a0,&this->_tearFlags,&g_tearFlagSpectral), - (int)pBVar13->_l == 0 && *(int *)((int)&pBVar13->_l + 4) == 0)) && - ((int)pBVar13->_h == 0 && *(int *)((int)&pBVar13->_h + 4) == 0)) { + GHIDRA_INT(pBVar13->_l) == 0 && *(int *)(GHIDRA_INT(&pBVar13->_l) + 4) == 0)) && + (GHIDRA_INT(pBVar13->_h) == 0 && *(int *)(GHIDRA_INT(&pBVar13->_h) + 4) == 0)) { local_f0.x = (this->_posOffset).x * 0.4; local_f0.y = (this->_posOffset).y * 0.4; bVar6 = HomingLaser::clip_samples_to_grid (&this->_homingLaser,&local_f0,this->_entityGridCollisionClass); - local_fc = (float)((uint)local_fc & 0xff); + local_fc = (float)(GHIDRA_UINT(local_fc) & 0xff); this->_isGridHit = bVar6; if (bVar6 != 0) { local_fc = 0.0; } - local_114.y = (float)CONCAT31(local_114.y._1_3_,SUB41(local_fc,0)); + local_114.y = (float)CONCAT31((*(undefined1 *)((char *)&(local_114.y) + 0x1)),SUB41(local_fc,0)); if (this->_homingType == 2) { ((HomingLaser *)(&this->_homingLaser))->HomingLaser::truncate_samples_at_obstacle(&this->_posOffset); } @@ -4169,7 +4169,7 @@ LAB_009747b1: (**(code **)(*(int *)*pEVar10 + 0x28))(); } pEVar10 = pEVar10 + 1; - local_c0.y = (float)((int)local_c0.y + -1); + local_c0.y = (float)(GHIDRA_INT(local_c0.y) + -1); } while ((EntityPtr)local_c0.y != (EntityPtr)0x0); EVar17 = this->_child; iVar8 = 0; @@ -4184,7 +4184,7 @@ LAB_009747b1: spawn_impact_effect(this,iVar8); } else { - EVar17 = (EntityPtr)((uint)local_cc.x ^ 0x80000000); + EVar17 = (EntityPtr)(GHIDRA_UINT(local_cc.x) ^ 0x80000000); local_b4 = (EntityPtr)local_cc.y; local_130.y = (float)EVar17; if ((*pEVar10 == (EntityPtr)0x0) || (this->_multidimensionalLasers[1] == (EntityPtr)0x0)) @@ -4205,22 +4205,22 @@ LAB_009747b1: spawnedLaser->_disableFollowParent = 1; copy_from_parent(spawnedLaser,this,1); pBVar13 = ((BitSet128 *)(&g_tearFlagLaser))->BitSet128::__bnot((BitSet128 *)local_148); - local_160._0_4_ = *(undefined4 *)&(this->_tearFlags)._l; - local_160._data = *(void **)((int)&(this->_tearFlags)._l + 4); - local_160._capacity = (int)(this->_tearFlags)._h; - local_160._size = *(int *)((int)&(this->_tearFlags)._h + 4); + (*(undefined4 *)((char *)&(local_160) + 0x0)) = *(undefined4 *)&(this->_tearFlags)._l; + local_160._data = *(void **)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); + local_160._capacity = GHIDRA_INT((this->_tearFlags)._h); + local_160._size = *(int *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); pBVar13 = BitSet128::operator_and ((BitSet128 *)local_190,(BitSet128 *)&local_160,pBVar13); EVar17 = spawnedLaser->_parent; qVar4 = pBVar13->_l; - uVar26 = *(undefined4 *)((int)&pBVar13->_l + 4); + uVar26 = *(undefined4 *)(GHIDRA_INT(&pBVar13->_l) + 4); qVar5 = pBVar13->_h; - uVar3 = *(undefined4 *)((int)&pBVar13->_h + 4); + uVar3 = *(undefined4 *)(GHIDRA_INT(&pBVar13->_h) + 4); spawnedLaser->_multidimensionalTouched = 1; - *(int *)&(spawnedLaser->_tearFlags)._l = (int)qVar4; - *(undefined4 *)((int)&(spawnedLaser->_tearFlags)._l + 4) = uVar26; - *(int *)&(spawnedLaser->_tearFlags)._h = (int)qVar5; - *(undefined4 *)((int)&(spawnedLaser->_tearFlags)._h + 4) = uVar3; + *(int *)&(spawnedLaser->_tearFlags)._l = GHIDRA_INT(qVar4); + *(undefined4 *)(GHIDRA_INT(&(spawnedLaser->_tearFlags)._l) + 4) = uVar26; + *(int *)&(spawnedLaser->_tearFlags)._h = GHIDRA_INT(qVar5); + *(undefined4 *)(GHIDRA_INT(&(spawnedLaser->_tearFlags)._h) + 4) = uVar3; if (EVar17 != (EntityPtr)0x0) { local_d4[0] = (EntityPtr)&spawnedLaser->_parent; std::multiset::erase(); @@ -4235,15 +4235,15 @@ LAB_009747b1: *(Entity_Laser **)local_104.y = spawnedLaser; std::multiset::insert(); } - EVar19 = (EntityPtr)((uint)local_b4 ^ 0x80000000); - EVar17 = (EntityPtr)((uint)local_130.y ^ 0x80000000); + EVar19 = (EntityPtr)(GHIDRA_UINT(local_b4) ^ 0x80000000); + EVar17 = (EntityPtr)(GHIDRA_UINT(local_130.y) ^ 0x80000000); EVar22 = (EntityPtr)local_cc.x; EVar12 = (EntityPtr)local_cc.y; local_130.y = (float)EVar17; local_b4 = EVar19; } - local_104.y = (float)((int)local_104.y + 4); - local_c0.y = (float)((int)local_c0.y + -1); + local_104.y = (float)(GHIDRA_INT(local_104.y) + 4); + local_c0.y = (float)(GHIDRA_INT(local_c0.y) + -1); } while (local_c0.y != 0.0); this->_chainedLasers = 0; } @@ -4261,14 +4261,14 @@ LAB_009747b1: copy_from_parent((Entity_Laser *)EVar17,this,0); fVar21 = local_130.y * 5.0; *(undefined4 *)((char *)EVar17 + 0x420) = *(undefined4 *)((char *)EVar17 + 0x41c); - local_130.y = (float)((uint)local_130.y ^ 0x80000000); - local_c0.y = (float)((int)local_c0.y + 4); - local_104.y = (float)((int)local_104.y + -1); + local_130.y = (float)(GHIDRA_UINT(local_130.y) ^ 0x80000000); + local_c0.y = (float)(GHIDRA_INT(local_c0.y) + 4); + local_104.y = (float)(GHIDRA_INT(local_104.y) + -1); *(EntityPtr *)((char *)EVar17 + 0x418) = local_d4[0]; *(EntityPtr *)((char *)EVar17 + 0x41c) = local_d4[0]; *(float *)((char *)EVar17 + 0xec) = local_fc; fVar18 = (float)local_b4 * 5.0; - local_b4 = (EntityPtr)((uint)local_b4 ^ 0x80000000); + local_b4 = (EntityPtr)(GHIDRA_UINT(local_b4) ^ 0x80000000); *(float *)((char *)EVar17 + 0x33c) = local_120.x + fVar18; *(float *)((char *)EVar17 + 0x340) = local_120.y + fVar21; } while (local_104.y != 0.0); @@ -4283,23 +4283,23 @@ LAB_009747b1: } if (EVar17 != (EntityPtr)0x0) { uVar15 = g_game->_frameCount - this->_spawnFrame & 0x8000000f; - if ((int)uVar15 < 0) { + if (GHIDRA_INT(uVar15) < 0) { uVar15 = (uVar15 - 1 | 0xfffffff0) + 1; } fStack_3c = 1.0; - local_58._0_4_ = 1.0; - local_58._4_4_ = 1.0; - local_58._8_4_ = 1.0; - local_58._12_4_ = 1.0; + (*(undefined4 *)((char *)&(local_58) + 0x0)) = 1.0; + (*(undefined4 *)((char *)&(local_58) + 0x4)) = 1.0; + (*(undefined4 *)((char *)&(local_58) + 0x8)) = 1.0; + (*(undefined4 *)((char *)&(local_58) + 0xc)) = 1.0; pulseFrame = 0x10 - uVar15; - if ((int)uVar15 < 8) { + if (GHIDRA_INT(uVar15) < 8) { pulseFrame = uVar15; } - fVar18 = (float)(int)pulseFrame * 0.125; + fVar18 = (float)GHIDRA_INT(pulseFrame) * 0.125; local_38 = fVar18 * 0.4 - 0.2; - local_58._16_4_ = fVar18 + fVar18 + 0.3; - local_58._20_4_ = local_58._16_4_; - fStack_40 = (float)local_58._16_4_; + (*(undefined4 *)((char *)&(local_58) + 0x10)) = fVar18 + fVar18 + 0.3; + (*(undefined4 *)((char *)&(local_58) + 0x14)) = (*(undefined4 *)((char *)&(local_58) + 0x10)); + fStack_40 = (*(undefined4 *)((char *)&((float)local_58) + 0x10)); local_34 = local_38; local_30 = local_38; (**(code **)(*(int *)EVar17 + 0x3c))(); @@ -4310,13 +4310,13 @@ LAB_009747b1: (**(code **)(**(int **)((char *)EVar17 + 0x53c) + 0x3c))(); } } - pEVar10 = (EntityPtr *)((int)local_10c.y + 4); - local_c0.y = (float)((int)local_c0.y + -1); + pEVar10 = (EntityPtr *)(GHIDRA_INT(local_10c.y) + 4); + local_c0.y = (float)(GHIDRA_INT(local_c0.y) + -1); local_10c.y = (float)pEVar10; } while (local_c0.y != 0.0); isRedirected = '\x01'; local_fc = 0.0; - local_114.y = (float)((uint)local_114.y & 0xffffff00); + local_114.y = (float)(GHIDRA_UINT(local_114.y) & 0xffffff00); local_c0.y = 0.0; } } @@ -4349,12 +4349,12 @@ LAB_00974ed9: ((Color *)(&bounceLaserColor))->Color::Color(); iVar8 = this->_variant; if ((iVar8 != 5) && (iVar8 != 10)) { - local_58._0_4_ = 1.0; - local_58._4_4_ = 1.0; - local_58._8_4_ = 1.0; - local_58._12_4_ = 1.0; - local_58._16_4_ = 5.0; - local_58._20_4_ = 5.0; + (*(undefined4 *)((char *)&(local_58) + 0x0)) = 1.0; + (*(undefined4 *)((char *)&(local_58) + 0x4)) = 1.0; + (*(undefined4 *)((char *)&(local_58) + 0x8)) = 1.0; + (*(undefined4 *)((char *)&(local_58) + 0xc)) = 1.0; + (*(undefined4 *)((char *)&(local_58) + 0x10)) = 5.0; + (*(undefined4 *)((char *)&(local_58) + 0x14)) = 5.0; fStack_40 = 4.0; fStack_3c = 1.0; local_38 = 0.0; @@ -4393,7 +4393,7 @@ LAB_00974ed9: piVar16 = (int *)__RTDynamicCast(); (**(code **)(*piVar16 + 0x3c))(); (**(code **)(*piVar16 + 0x40))(); - piVar16[0xd6] = (int)(this->_renderDepthOffset + 100.0); + piVar16[0xd6] = GHIDRA_INT((this->_renderDepthOffset + 100.0)); piVar16[0x116] = this->_timeout; if ((this->_shrink == 0) && (this->_dead == 0)) { isFading = 0; @@ -4406,23 +4406,23 @@ LAB_00974ed9: *(EntityPtr *)(piVar16 + 0x106) = local_d4[0]; *(EntityPtr *)(piVar16 + 0x107) = local_d4[0]; piVar16[0x108] = iVar8; - piVar16[0x3b] = (int)((float)local_d4[0] - 90.0); + piVar16[0x3b] = GHIDRA_INT(((float)local_d4[0] - 90.0)); *(float *)(piVar16 + 0xcf) = local_f0.x; *(float *)(piVar16 + 0xd0) = local_f0.y; } - EVar17 = (EntityPtr)(g_game->_frameCount - (int)*(EntityPtr *)((char *)local_b4 + 0x328)); - if ((int)EVar17 < 0x96) { + EVar17 = (EntityPtr)(g_game->_frameCount - GHIDRA_INT(*(EntityPtr *)((char *)local_b4 + 0x328))); + if (GHIDRA_INT(EVar17) < 0x96) { EVar17 = *(EntityPtr *)((char *)local_b4 + 0x45c); EVar22 = (EntityPtr)0x1e; - if (0x1e < (int)EVar17) { + if (0x1e < GHIDRA_INT(EVar17)) { EVar22 = EVar17; } *(EntityPtr *)((char *)local_b4 + 0x45c) = EVar22; *(EntityPtr *)((char *)local_b4 + 0x460) = EVar22; } - local_fc = (float)CONCAT31(EVar17._1_3_,1); + local_fc = (float)CONCAT31((*(undefined1 *)((char *)&(EVar17) + 0x1)),1); isRedirected = '\x01'; - local_114.y = (float)CONCAT31(local_114.y._1_3_,1); + local_114.y = (float)CONCAT31((*(undefined1 *)((char *)&(local_114.y) + 0x1)),1); local_c1 = true; } } @@ -4442,7 +4442,7 @@ LAB_00974ed9: (**(code **)(*(int *)*pEVar10 + 0x28))(); } pEVar10 = pEVar10 + 1; - local_c0.y = (float)((int)local_c0.y + -1); + local_c0.y = (float)(GHIDRA_INT(local_c0.y) + -1); } while ((EntityPtr)local_c0.y != (EntityPtr)0x0); EVar17 = this->_child; iVar8 = 0; @@ -4461,9 +4461,9 @@ LAB_00974ed9: local_c0.y = 0.0; do { fVar18 = local_c0.y; - EVar17 = (EntityPtr)(this->_prismLasers + (int)local_c0.y); + EVar17 = (EntityPtr)(this->_prismLasers + GHIDRA_INT(local_c0.y)); local_b4 = EVar17; - if (this->_prismLasers[(int)local_c0.y] == (EntityPtr)0x0) { + if (this->_prismLasers[GHIDRA_INT(local_c0.y)] == (EntityPtr)0x0) { fVar21 = atan2f(local_cc.y,local_cc.x); fVar21 = fVar21 * 57.295776; if ((EntityPtr)fVar18 == (EntityPtr)0x0) { @@ -4495,29 +4495,29 @@ LAB_00974ed9: EVar17 = (EntityPtr)std::multiset::insert(); } } - local_c0.y = (float)((int)local_c0.y + 1); - } while ((int)local_c0.y < 4); - local_fc = (float)((uint)EVar17 & 0xffffff00); + local_c0.y = (float)(GHIDRA_INT(local_c0.y) + 1); + } while (GHIDRA_INT(local_c0.y) < 4); + local_fc = (float)(GHIDRA_UINT(EVar17) & 0xffffff00); this->_chainedLasers = 0; isRedirected = '\x01'; - local_114.y = (float)((uint)local_114.y & 0xffffff00); + local_114.y = (float)(GHIDRA_UINT(local_114.y) & 0xffffff00); } else { EVar17 = (EntityPtr)0x0; local_c0.y = 0.0; fVar18 = atan2f(local_cc.y,local_cc.x); - auVar23._4_4_ = extraout_var_00._0_4_; - auVar23._0_4_ = fVar18; - auVar23._8_4_ = extraout_var_00._4_4_; - auVar23._12_4_ = extraout_var_00._8_4_; - auVar20._4_12_ = auVar23._4_12_; - auVar20._0_4_ = (EntityPtr)(fVar18 * 57.295776); - local_d4[0] = auVar20._0_4_; + (*(undefined4 *)((char *)&(auVar23) + 0x4)) = (*(undefined4 *)((char *)&(extraout_var_00) + 0x0)); + (*(undefined4 *)((char *)&(auVar23) + 0x0)) = fVar18; + (*(undefined4 *)((char *)&(auVar23) + 0x8)) = (*(undefined4 *)((char *)&(extraout_var_00) + 0x4)); + (*(undefined4 *)((char *)&(auVar23) + 0xc)) = (*(undefined4 *)((char *)&(extraout_var_00) + 0x8)); + (*(undefined1 *)((char *)&(auVar20) + 0x4)) = (*(undefined1 *)((char *)&(auVar23) + 0x4)); + (*(undefined4 *)((char *)&(auVar20) + 0x0)) = (EntityPtr)(fVar18 * 57.295776); + local_d4[0] = (*(undefined4 *)((char *)&(auVar20) + 0x0)); do { fVar21 = 30.0; - local_b4 = auVar20._0_4_; + local_b4 = (*(undefined4 *)((char *)&(auVar20) + 0x0)); ((Color *)(&prismLaserColor))->Color::Color(); - fVar18 = auVar20._0_4_; + fVar18 = (*(undefined4 *)((char *)&(auVar20) + 0x0)); if (EVar17 == (EntityPtr)0x0) { local_b4 = (EntityPtr)(fVar18 - fVar21); } @@ -4576,26 +4576,26 @@ LAB_0097548c: copy_from_parent(spawnedLaser,this,0); spawnedLaser->SetColor(); fVar18 = spawnedLaser->_angleDegrees; - auVar20 = ZEXT416((uint)local_d4[0]); + auVar20 = ZEXT416(GHIDRA_UINT(local_d4[0])); spawnedLaser->_startAngleDegrees = (float)local_b4; spawnedLaser->_angleDegrees = (float)local_b4; spawnedLaser->_lastAngleDegrees = fVar18; (spawnedLaser->_sprite)._rotation = (float)local_b4 - 90.0; (spawnedLaser->_pos).x = local_f0.x; (spawnedLaser->_pos).y = local_f0.y; - EVar17 = (EntityPtr)((int)local_c0.y + 1); + EVar17 = (EntityPtr)(GHIDRA_INT(local_c0.y) + 1); local_c0.y = (float)EVar17; - } while ((int)EVar17 < 4); - local_fc = (float)((uint)fVar18 & 0xffffff00); + } while (GHIDRA_INT(EVar17) < 4); + local_fc = (float)(GHIDRA_UINT(fVar18) & 0xffffff00); isRedirected = '\x01'; - local_114.y = (float)((uint)local_114.y & 0xffffff00); + local_114.y = (float)(GHIDRA_UINT(local_114.y) & 0xffffff00); } } LAB_00975711: pBVar13 = &this->_tearFlags; pBVar24 = BitSet128::operator_and((BitSet128 *)&local_160,pBVar13,&g_tearFlagContinuum); - if (((((int)pBVar24->_l == 0 && *(int *)((int)&pBVar24->_l + 4) == 0) && - ((int)pBVar24->_h == 0 && *(int *)((int)&pBVar24->_h + 4) == 0)) || + if ((((GHIDRA_INT(pBVar24->_l) == 0 && *(int *)(GHIDRA_INT(&pBVar24->_l) + 4) == 0) && + (GHIDRA_INT(pBVar24->_h) == 0 && *(int *)(GHIDRA_INT(&pBVar24->_h) + 4) == 0)) || (isRedirected != '\0')) || (this->_isGridHit != 0)) { if (this->_continuumLaser != (EntityPtr)0x0) { (**(code **)(*(int *)this->_continuumLaser + 0x28))(); @@ -4604,7 +4604,7 @@ LAB_00975711: else { pfVar1 = (this->_homingLaser)._samples._begin; pvVar9 = *(void **)((char *)local_150.y + 0x4b0); - iVar8 = (int)*(void **)((char *)local_150.y + 0x484) - (int)pfVar1 >> 3; + iVar8 = GHIDRA_INT(*(void **)((char *)local_150.y + 0x484)) - GHIDRA_INT(pfVar1) >> 3; local_cc.x = *(float *)((char *)pvVar9 + -8) - *(float *)((char *)pvVar9 + -0x10); local_cc.y = *(float *)((char *)pvVar9 + -4) - *(float *)((char *)pvVar9 + -0xc); local_120.x = pfVar1[iVar8 * 2 + -2]; @@ -4612,7 +4612,7 @@ LAB_00975711: local_c0.y = sqrtf((pfVar1[1] - local_120.y) * (pfVar1[1] - local_120.y) + (*pfVar1 - local_120.x) * (*pfVar1 - local_120.x)); game = g_game; - local_d4[0] = (EntityPtr)((int)local_150.y + 0x34c); + local_d4[0] = (EntityPtr)(GHIDRA_INT(local_150.y) + 0x34c); local_f0.x = pfVar1[iVar8 * 2 + -2] + *(float *)local_d4[0]; local_f0.y = pfVar1[iVar8 * 2 + -1] + *(float *)((char *)local_150.y + 0x350); Room::GetClampedPositionImpl(g_game->_room,&local_130,&local_f0,-131.0,-131.0,-131.0,-131.0) @@ -4639,9 +4639,9 @@ LAB_00975711: else if (spawnedLaser == (Entity_Laser *)0x0) { local_d4[0] = (EntityPtr)((Vector *)(&local_cc))->Vector::GetAngleDegrees(); spawnedLaser = ShootAngle(*(int *)((char *)this + 0x2c),&local_130,(float)local_d4[0], - *(int *)((char *)this + 0x458),(Vector *)((int)this + 0x34c), + *(int *)((char *)this + 0x458),(Vector *)(GHIDRA_INT(this) + 0x34c), *(Entity **)((char *)this + 0x3bc),1); - ((EntityPtr *)((EntityPtr *)((int)this + 0x538)))->EntityPtr::Set((Entity *)spawnedLaser); + ((EntityPtr *)((EntityPtr *)(GHIDRA_INT(this) + 0x538)))->EntityPtr::Set((Entity *)spawnedLaser); if (*(int *)((char *)this + 0x538) != 0) { *(undefined1 *)(*(int *)((char *)this + 0x538) + 0x518) = 1; *(undefined1 *)(*(int *)((char *)this + 0x538) + 0x4e4) = 1; @@ -4665,19 +4665,19 @@ LAB_009759d5: pBVar13 = ((BitSet128 *)(&g_tearFlagContinuum))->BitSet128::__bnot((BitSet128 *)&local_160); iVar8 = *(int *)((char *)this + 0x538); pBVar13 = BitSet128::operator_and(&local_170,(BitSet128 *)(iVar8 + 0x428),pBVar13); - uVar26 = *(undefined4 *)((int)&pBVar13->_l + 4); + uVar26 = *(undefined4 *)(GHIDRA_INT(&pBVar13->_l) + 4); qVar4 = pBVar13->_h; - uVar3 = *(undefined4 *)((int)&pBVar13->_h + 4); - *(int *)(iVar8 + 0x428) = (int)pBVar13->_l; + uVar3 = *(undefined4 *)(GHIDRA_INT(&pBVar13->_h) + 4); + *(int *)(iVar8 + 0x428) = GHIDRA_INT(pBVar13->_l); *(undefined4 *)(iVar8 + 0x42c) = uVar26; - *(int *)(iVar8 + 0x430) = (int)qVar4; + *(int *)(iVar8 + 0x430) = GHIDRA_INT(qVar4); *(undefined4 *)(iVar8 + 0x434) = uVar3; iVar8 = *(int *)((char *)this + 0x538); *(float *)(iVar8 + 0x33c) = local_130.x; *(float *)(iVar8 + 0x340) = local_130.y; local_d4[0] = (EntityPtr)((Vector *)(&local_cc))->Vector::GetAngleDegrees(); ((Entity_NPC *)(*(Entity_NPC **)((char *)this + 0x538)))->Entity_NPC::SetAimAngle((float)local_d4[0]); - pEVar10 = (EntityPtr *)((int)this + 0x538); + pEVar10 = (EntityPtr *)(GHIDRA_INT(this) + 0x538); EVar17 = *pEVar10; if (*(float *)((char *)this + 0x4d0) <= 0.0) { EVar22 = (EntityPtr)0x0; @@ -4700,11 +4700,11 @@ LAB_009759d5: if ((char)(*(int **)((char *)this + 0x538))[0x117] != '\0') { pEVar10 = (EntityPtr *)(**(code **)(**(int **)((char *)this + 0x538) + 0xc))(); } - local_fc = (float)((uint)pEVar10 & 0xffffff00); + local_fc = (float)(GHIDRA_UINT(pEVar10) & 0xffffff00); isRedirected = '\x01'; - local_114.y = (float)((uint)local_114.y & 0xffffff00); + local_114.y = (float)(GHIDRA_UINT(local_114.y) & 0xffffff00); } - pBVar13 = (BitSet128 *)((int)this + 0x428); + pBVar13 = (BitSet128 *)(GHIDRA_INT(this) + 0x428); } if (local_c1 == false) { pBVar13 = BitSet128::operator_and((BitSet128 *)&local_160,pBVar13,&g_tearFlagBounce); @@ -4719,10 +4719,10 @@ LAB_009759d5: } else { local_d4[0] = (EntityPtr)0x3ecccccd; - ((Vector *)((Vector *)((int)this + 0x34c)))->Vector::__mul(&local_140,(float *)local_d4); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x34c)))->Vector::__mul(&local_140,(float *)local_d4); local_c0.y = (float)__RTDynamicCast(); - pVVar14 = ((std_vector *)((int)this + 0x480))->_begin; - iVar8 = (int)*(void **)((char *)this + 0x484) - (int)pVVar14 >> 3; + pVVar14 = ((std_vector *)(GHIDRA_INT(this) + 0x480))->_begin; + iVar8 = GHIDRA_INT(*(void **)((char *)this + 0x484)) - GHIDRA_INT(pVVar14) >> 3; local_cc.x = pVVar14[iVar8 + -1].x; local_cc.y = pVVar14[iVar8 + -1].y; local_130.y = ((Vector *)(&local_cc))->Vector::Distance(pVVar14); @@ -4734,8 +4734,8 @@ LAB_009759d5: do { pVVar14 = Vector::FromAngle(&local_188,(float)iVar8); ((Vector *)(pVVar14))->Vector::__mul(&local_10c,(float *)local_d4); - pvVar9 = ((std_vector *)((int)this + 0x480))->_begin; - iVar11 = (int)*(void **)((char *)this + 0x484) - (int)pvVar9 >> 3; + pvVar9 = ((std_vector *)(GHIDRA_INT(this) + 0x480))->_begin; + iVar11 = GHIDRA_INT(*(void **)((char *)this + 0x484)) - GHIDRA_INT(pvVar9) >> 3; local_f0.x = *(float *)((char *)pvVar9 + iVar11 * 8 + -8); local_f0.y = *(float *)((char *)pvVar9 + iVar11 * 8 + -4); pVVar14 = ((Room *)(*(Room **)local_b4))->Room::GetClampedPosition(&local_178,&local_f0,0.0); @@ -4753,17 +4753,17 @@ LAB_009759d5: } iVar8 = iVar8 + 6; } while (iVar8 < 0x168); - pvVar9 = ((std_vector *)((int)this + 0x480))->_begin; - iVar8 = (int)*(void **)((char *)this + 0x484) - (int)pvVar9 >> 3; - ((Vector *)((Vector *)((int)pvVar9 + (iVar8 + -1) * 8)))->Vector::__sub(&local_f0, - (Vector *)((int)pvVar9 + iVar8 * 8 + -0x10)); + pvVar9 = ((std_vector *)(GHIDRA_INT(this) + 0x480))->_begin; + iVar8 = GHIDRA_INT(*(void **)((char *)this + 0x484)) - GHIDRA_INT(pvVar9) >> 3; + ((Vector *)((Vector *)(GHIDRA_INT(pvVar9) + (iVar8 + -1) * 8)))->Vector::__sub(&local_f0, + (Vector *)(GHIDRA_INT(pvVar9) + iVar8 * 8 + -0x10)); ((Vector *)(&local_120))->Vector::Normalize(); EVar22 = (EntityPtr)local_c0.y; EVar17 = *(EntityPtr *)((char *)this + 0x3bc); local_b4 = (EntityPtr)0x40000000; if (((EVar17 != (EntityPtr)0x0) && (*(int *)((char *)EVar17 + 0x28) == 0x104)) && (*(int *)((char *)EVar17 + 0x30) == 2)) { - local_d4[0] = (EntityPtr)((Vector *)((Vector *)((int)this + 0x33c)))->Vector::Distance(&local_cc); + local_d4[0] = (EntityPtr)((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::Distance(&local_cc); fVar21 = 250.0; fVar18 = Math::clamp(0.0,250.0,(float)local_d4[0]); local_b4 = (EntityPtr)(2.0 - (1.0 - fVar18 / fVar21)); @@ -4778,11 +4778,11 @@ LAB_009759d5: if (bVar6 != 0) { EVar22 = (EntityPtr) ShootAngle(*(int *)((char *)this + 0x2c),&local_cc,(float)local_b4, - *(int *)((char *)this + 0x458),(Vector *)((int)this + 0x34c), + *(int *)((char *)this + 0x458),(Vector *)(GHIDRA_INT(this) + 0x34c), (Entity *)*(EntityPtr *)((char *)this + 0x3bc),1); local_c0.y = (float)EVar22; if (EVar22 != (EntityPtr)0x0) { - ((EntityPtr *)((EntityPtr *)((int)this + 0x4e8)))->EntityPtr::SetReference((Entity *)EVar22); + ((EntityPtr *)((EntityPtr *)(GHIDRA_INT(this) + 0x4e8)))->EntityPtr::SetReference((Entity *)EVar22); *(undefined1 *)((char *)EVar22 + 0x4e4) = 1; *(undefined1 *)((char *)EVar22 + 0x518) = 1; copy_from_parent((Entity_Laser *)EVar22,this,1); @@ -4803,15 +4803,15 @@ LAB_009759d5: LAB_00975f41: copy_from_parent((Entity_Laser *)EVar22,this,0); pBVar13 = ((BitSet128 *)(&g_tearFlagBounce))->BitSet128::__bnot((BitSet128 *)&local_160); - pBVar13 = BitSet128::operator_and(&local_170,(BitSet128 *)((int)EVar22 + 0x428),pBVar13) + pBVar13 = BitSet128::operator_and(&local_170,(BitSet128 *)(GHIDRA_INT(EVar22) + 0x428),pBVar13) ; fVar18 = local_c0.y; - uVar26 = *(undefined4 *)((int)&pBVar13->_l + 4); + uVar26 = *(undefined4 *)(GHIDRA_INT(&pBVar13->_l) + 4); qVar4 = pBVar13->_h; - uVar3 = *(undefined4 *)((int)&pBVar13->_h + 4); - *(int *)((char *)EVar22 + 0x428) = (int)pBVar13->_l; + uVar3 = *(undefined4 *)(GHIDRA_INT(&pBVar13->_h) + 4); + *(int *)((char *)EVar22 + 0x428) = GHIDRA_INT(pBVar13->_l); *(undefined4 *)((char *)EVar22 + 0x42c) = uVar26; - *(int *)((char *)EVar22 + 0x430) = (int)qVar4; + *(int *)((char *)EVar22 + 0x430) = GHIDRA_INT(qVar4); *(undefined4 *)((char *)EVar22 + 0x434) = uVar3; *(float *)((char *)local_c0.y + 0x33c) = local_cc.x; *(float *)((char *)local_c0.y + 0x340) = local_cc.y; @@ -4840,11 +4840,11 @@ LAB_00975f41: } } if (*(char *)((char *)this + 0x516) == '\0') { - local_fc = (float)((uint)local_fc & 0xff); + local_fc = (float)(GHIDRA_UINT(local_fc) & 0xff); if (0 < *(int *)((char *)this + 0x560)) { local_fc = 1.4013e-45; } - local_114.y = (float)CONCAT31(local_114.y._1_3_,SUB41(local_fc,0)); + local_114.y = (float)CONCAT31((*(undefined1 *)((char *)&(local_114.y) + 0x1)),SUB41(local_fc,0)); } else { *(undefined4 *)((char *)this + 0x560) = 0; @@ -4877,15 +4877,15 @@ LAB_00975f41: uVar15 = Random(); local_d4[0] = (EntityPtr) normalize_angle_degrees - (((float)((double)(int)uVar15 + - __uint_to_double_fixup[-((int)uVar15 >> 0x1f)]) * + (((float)((double)GHIDRA_INT(uVar15) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar15) >> 0x1f)]) * 2.3283064e-10 * 180.0 + (float)local_d4[0]) - 90.0); local_c0.y = (float)Random(); pVVar14 = Vector::FromAngle(&local_140,(float)local_d4[0]); uVar15 = Random(); local_d4[0] = (EntityPtr) - ((float)((double)(int)uVar15 + - __uint_to_double_fixup[-((int)uVar15 >> 0x1f)]) * 2.3283064e-10 * + ((float)((double)GHIDRA_INT(uVar15) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar15) >> 0x1f)]) * 2.3283064e-10 * 10.0 + 1.0); local_b4 = (EntityPtr)((Vector *)(pVVar14))->Vector::__mul(&local_188,(float *)local_d4); iVar8 = *(int *)((char *)this + 0x484); @@ -4893,16 +4893,16 @@ LAB_00975f41: pVVar14 = MusicManager::RandomVector(&local_178); uVar15 = Random(); local_d4[0] = (EntityPtr) - ((float)((double)(int)uVar15 + - __uint_to_double_fixup[-((int)uVar15 >> 0x1f)]) * 2.3283064e-10 * + ((float)((double)GHIDRA_INT(uVar15) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar15) >> 0x1f)]) * 2.3283064e-10 * 20.0); pVVar14 = ((Vector *)(pVVar14))->Vector::__mul(&local_f0,(float *)local_d4); pVVar14 = ((Vector *)((Vector *)(iVar11 + (iVar8 - iVar11 >> 3) * 8 + -8)))->Vector::__add(&local_cc, pVVar14); iVar8 = 0; - uVar26._0_1_ = 0; - uVar26._1_1_ = 0; - uVar26._2_2_ = 0; + (*(undefined1 *)((char *)&(uVar26) + 0x0)) = 0; + (*(undefined1 *)((char *)&(uVar26) + 0x1)) = 0; + (*(undefined2 *)((char *)&(uVar26) + 0x2)) = 0; fVar25 = 9.80909e-44; fVar21 = 1.4013e-42; fVar18 = 1.3902761e-38; @@ -4910,11 +4910,11 @@ LAB_00975f41: EVar22 = (EntityPtr)local_c0.y; EVar12 = (EntityPtr) ((Game *)(g_game))->Game::Spawn(1000,0x46,pVVar14,(Vector *)local_b4,(Entity *)0x0,0, - (uint)local_c0.y); + GHIDRA_UINT(local_c0.y)); this = (Entity_Laser *)local_150.y; local_d4[0] = EVar12; if (*(EntityPtr *)((char *)local_150.y + 0x3c0) != (EntityPtr)0x0) { - ((ANM2 *)((ANM2 *)((int)register0x00000010 + -0x3b8)))->ANM2::ANM2((ANM2 *)((int)*(EntityPtr *)((char *)local_150.y + 0x3c0) + 0x48)); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(register0x00000010) + -0x3b8)))->ANM2::ANM2((ANM2 *)(GHIDRA_INT(*(EntityPtr *)((char *)local_150.y + 0x3c0)) + 0x48)); other._championColor._colorize[0] = in_stack_fffffd2c; other._filename._buf[0] = in_stack_fffffc48[0]; other._filename._buf[1] = in_stack_fffffc48[1]; @@ -4932,8 +4932,8 @@ LAB_00975f41: other._filename._buf[0xd] = in_stack_fffffc48[0xd]; other._filename._buf[0xe] = in_stack_fffffc48[0xe]; other._filename._buf[0xf] = in_stack_fffffc48[0xf]; - other._filename._size = in_stack_fffffc48._16_4_; - other._filename._capacity = in_stack_fffffc48._20_4_; + other._filename._size = (*(undefined4 *)((char *)&(in_stack_fffffc48) + 0x10)); + other._filename._capacity = (*(undefined4 *)((char *)&(in_stack_fffffc48) + 0x14)); other._animDefaultName._buf[0] = in_stack_fffffc48[0x18]; other._animDefaultName._buf[1] = in_stack_fffffc48[0x19]; other._animDefaultName._buf[2] = in_stack_fffffc48[0x1a]; @@ -4950,74 +4950,74 @@ LAB_00975f41: other._animDefaultName._buf[0xd] = in_stack_fffffc48[0x25]; other._animDefaultName._buf[0xe] = in_stack_fffffc48[0x26]; other._animDefaultName._buf[0xf] = in_stack_fffffc48[0x27]; - other._animDefaultName._size = in_stack_fffffc48._40_4_; - other._animDefaultName._capacity = in_stack_fffffc48._44_4_; - other._animState._animation = (void *)in_stack_fffffc48._48_4_; - other._animState._animData = (void *)in_stack_fffffc48._52_4_; - other._animState._layerFrames = (void *)in_stack_fffffc48._56_4_; - other._animState._nullLayerFrames = (void *)in_stack_fffffc48._60_4_; - other._animState._animFrame = (float)in_stack_fffffc48._64_4_; + other._animDefaultName._size = (*(undefined4 *)((char *)&(in_stack_fffffc48) + 0x28)); + other._animDefaultName._capacity = (*(undefined4 *)((char *)&(in_stack_fffffc48) + 0x2c)); + other._animState._animation = (*(undefined4 *)((char *)&((void *)in_stack_fffffc48) + 0x30)); + other._animState._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffc48) + 0x34)); + other._animState._layerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffc48) + 0x38)); + other._animState._nullLayerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffc48) + 0x3c)); + other._animState._animFrame = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0x40)); other._animState._isPlaying = in_stack_fffffc48[0x44]; - other._animState._21_3_ = in_stack_fffffc48._69_3_; - other._animState._currentlyTriggeredEvents = in_stack_fffffc48._72_4_; - other._animState._previouslyTriggeredEvents = in_stack_fffffc48._76_4_; - other._overlayAnimState._animation = (void *)in_stack_fffffc48._80_4_; - other._overlayAnimState._animData = (void *)in_stack_fffffc48._84_4_; - other._overlayAnimState._layerFrames = (void *)in_stack_fffffc48._88_4_; - other._overlayAnimState._nullLayerFrames = (void *)in_stack_fffffc48._92_4_; - other._overlayAnimState._animFrame = (float)in_stack_fffffc48._96_4_; + (*(undefined1 *)((char *)&(other._animState) + 0x15)) = (*(undefined1 *)((char *)&(in_stack_fffffc48) + 0x45)); + other._animState._currentlyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffc48) + 0x48)); + other._animState._previouslyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffc48) + 0x4c)); + other._overlayAnimState._animation = (*(undefined4 *)((char *)&((void *)in_stack_fffffc48) + 0x50)); + other._overlayAnimState._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffc48) + 0x54)); + other._overlayAnimState._layerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffc48) + 0x58)); + other._overlayAnimState._nullLayerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffc48) + 0x5c)); + other._overlayAnimState._animFrame = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0x60)); other._overlayAnimState._isPlaying = in_stack_fffffc48[100]; - other._overlayAnimState._21_3_ = in_stack_fffffc48._101_3_; - other._overlayAnimState._currentlyTriggeredEvents = in_stack_fffffc48._104_4_; - other._overlayAnimState._previouslyTriggeredEvents = in_stack_fffffc48._108_4_; + (*(undefined1 *)((char *)&(other._overlayAnimState) + 0x15)) = (*(undefined1 *)((char *)&(in_stack_fffffc48) + 0x65)); + other._overlayAnimState._currentlyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffc48) + 0x68)); + other._overlayAnimState._previouslyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffc48) + 0x6c)); other._overlayRenderFirst = in_stack_fffffc48[0x70]; - other._113_3_ = in_stack_fffffc48._113_3_; - other._animData = (void *)in_stack_fffffc48._116_4_; - other._animCount = in_stack_fffffc48._120_4_; - other._layerState = (void *)in_stack_fffffc48._124_4_; - other._layerCount = in_stack_fffffc48._128_4_; - other._nullLayerNames = (void *)in_stack_fffffc48._132_4_; - other._numNullLayers = in_stack_fffffc48._136_4_; - other._eventNames = (void *)in_stack_fffffc48._140_4_; - other._numEvents = in_stack_fffffc48._144_4_; - other._offset.x = (float)in_stack_fffffc48._148_4_; - other._offset.y = (float)in_stack_fffffc48._152_4_; - other._scale.x = (float)in_stack_fffffc48._156_4_; - other._scale.y = (float)in_stack_fffffc48._160_4_; - other._rotation = (float)in_stack_fffffc48._164_4_; - other._color._tint[0] = (float)in_stack_fffffc48._168_4_; - other._color._tint[1] = (float)in_stack_fffffc48._172_4_; - other._color._tint[2] = (float)in_stack_fffffc48._176_4_; - other._color._tint[3] = (float)in_stack_fffffc48._180_4_; - other._color._colorize[0] = (float)in_stack_fffffc48._184_4_; - other._color._colorize[1] = (float)in_stack_fffffc48._188_4_; - other._color._colorize[2] = (float)in_stack_fffffc48._192_4_; - other._color._colorize[3] = (float)in_stack_fffffc48._196_4_; - other._color._offset[0] = (float)in_stack_fffffc48._200_4_; - other._color._offset[1] = (float)in_stack_fffffc48._204_4_; - other._color._offset[2] = (float)in_stack_fffffc48._208_4_; - other._championColor._tint[0] = (float)in_stack_fffffc48._212_4_; - other._championColor._tint[1] = (float)in_stack_fffffc48._216_4_; - other._championColor._tint[2] = (float)in_stack_fffffc48._220_4_; - other._championColor._tint[3] = (float)in_stack_fffffc48._224_4_; + (*(undefined1 *)((char *)&(other) + 0x71)) = (*(undefined1 *)((char *)&(in_stack_fffffc48) + 0x71)); + other._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffc48) + 0x74)); + other._animCount = (*(undefined4 *)((char *)&(in_stack_fffffc48) + 0x78)); + other._layerState = (*(undefined4 *)((char *)&((void *)in_stack_fffffc48) + 0x7c)); + other._layerCount = (*(undefined4 *)((char *)&(in_stack_fffffc48) + 0x80)); + other._nullLayerNames = (*(undefined4 *)((char *)&((void *)in_stack_fffffc48) + 0x84)); + other._numNullLayers = (*(undefined4 *)((char *)&(in_stack_fffffc48) + 0x88)); + other._eventNames = (*(undefined4 *)((char *)&((void *)in_stack_fffffc48) + 0x8c)); + other._numEvents = (*(undefined4 *)((char *)&(in_stack_fffffc48) + 0x90)); + other._offset.x = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0x94)); + other._offset.y = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0x98)); + other._scale.x = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0x9c)); + other._scale.y = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0xa0)); + other._rotation = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0xa4)); + other._color._tint[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0xa8)); + other._color._tint[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0xac)); + other._color._tint[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0xb0)); + other._color._tint[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0xb4)); + other._color._colorize[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0xb8)); + other._color._colorize[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0xbc)); + other._color._colorize[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0xc0)); + other._color._colorize[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0xc4)); + other._color._offset[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0xc8)); + other._color._offset[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0xcc)); + other._color._offset[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0xd0)); + other._championColor._tint[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0xd4)); + other._championColor._tint[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0xd8)); + other._championColor._tint[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0xdc)); + other._championColor._tint[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffc48) + 0xe0)); other._championColor._colorize[1] = in_stack_fffffd30; other._championColor._colorize[2] = in_stack_fffffd34; other._championColor._colorize[3] = in_stack_fffffd38; other._championColor._offset[0] = fVar18; other._championColor._offset[1] = fVar21; other._championColor._offset[2] = fVar25; - other._256_4_ = pVVar14; + (*(undefined4 *)((char *)&(other) + 0x100)) = pVVar14; other._playbackSpeed = (float)EVar17; - other._264_1_ = (char)uVar26; + (*(undefined1 *)((char *)&(other) + 0x108)) = (char)uVar26; other._loaded = SUB41(uVar26,1); - other._266_2_ = SUB42(uVar26,2); + (*(undefined2 *)((char *)&(other) + 0x10a)) = SUB42(uVar26,2); other._shadowLayerIndex = iVar8; - other._bitflags = (int)EVar22; - ((ANM2 *)((ANM2 *)((int)EVar12 + 0x48)))->ANM2::operator_assign(other); + other._bitflags = GHIDRA_INT(EVar22); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(EVar12) + 0x48)))->ANM2::operator_assign(other); iVar8 = Isaac::Random(3); - ((ANM2 *)((ANM2 *)((int)EVar12 + 0x48)))->ANM2::SetFrame((std_string *)"Droplets",iVar8); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(EVar12) + 0x48)))->ANM2::SetFrame((std_string *)"Droplets",iVar8); } - *(float *)((char *)EVar12 + 0x34c) = ((Vector *)((int)this + 0x34c))->x; + *(float *)((char *)EVar12 + 0x34c) = ((Vector *)(GHIDRA_INT(this) + 0x34c))->x; *(float *)((char *)EVar12 + 0x350) = *(float *)((char *)this + 0x350); (**(code **)(*(int *)EVar12 + 0x3c))(); (**(code **)(*(int *)EVar12 + 0xc))(); @@ -5026,13 +5026,13 @@ LAB_00975f41: } if (*(byte *)((char *)this + 0x45d) != 0) { pBVar13 = BitSet128::operator_and - (&creepFlagTest,(BitSet128 *)((int)this + 0x428), + (&creepFlagTest,(BitSet128 *)(GHIDRA_INT(this) + 0x428), &g_tearFlagMysteriousLiquidCreep); bVar6 = ((BitSet128 *)(pBVar13))->BitSet128::IsNonZero(); if ((bVar6 != 0) && (bVar6 = ((Entity *)((Entity *)this))->Entity::IsFrame(5,*(int *)((char *)this + 0x20)), bVar6 != 0)) { - local_cc.x = *(float *)((int)*(void **)((char *)this + 0x484) + -8); - local_cc.y = *(float *)((int)*(void **)((char *)this + 0x484) + -4); + local_cc.x = *(float *)(GHIDRA_INT(*(void **)((char *)this + 0x484)) + -8); + local_cc.y = *(float *)(GHIDRA_INT(*(void **)((char *)this + 0x484)) + -4); pVVar14 = ((Room *)(g_game->_room))->Room::GetClampedPosition(&local_140,&local_cc,15.0); local_cc.x = pVVar14->x; local_cc.y = pVVar14->y; @@ -5042,8 +5042,8 @@ LAB_00975f41: piVar16 = (int *)__RTDynamicCast(); local_d4[0] = (EntityPtr)0x3ecccccd; pVVar14 = ((Vector *)(&g_vectorOne))->Vector::__mul(&local_140,(float *)local_d4); - piVar16[0x39] = (int)pVVar14->x; - piVar16[0x3a] = (int)pVVar14->y; + piVar16[0x39] = GHIDRA_INT(pVVar14->x); + piVar16[0x3a] = GHIDRA_INT(pVVar14->y); (**(code **)(*piVar16 + 0xc))(); } } @@ -5057,22 +5057,22 @@ LAB_00975f41: if ((*(char *)((char *)this + 0x173) != '\0') || (*(char *)((char *)this + 0x45e) != '\0')) { iVar8 = *(int *)((char *)this + 0x2c); if (iVar8 == 2) { - bVar6 = ((AnimationState *)((AnimationState *)((int)this + 0x78)))->AnimationState::IsLoopingAnimation(); + bVar6 = ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x78)))->AnimationState::IsLoopingAnimation(); if (bVar6 != 0) { ((ANM2 *)(this_02))->ANM2::GetAnimation((std_string *)(local_58 + 0x14)); local_14 = 1; SimpleString::operator=((SimpleString *)(local_58 + 0x14),"Fade"); - ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::Play((std_string *)(local_58 + 0x14),0); + ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::Play((std_string *)(local_58 + 0x14),0); if (*(int *)((char *)this + 0x3c0) != 0) { ((ANM2 *)((ANM2 *)(*(int *)((char *)this + 0x3c0) + 0x48)))->ANM2::Play(&DAT_00b1c00c,0); } if ((*(uint *)((char *)this + 0x3ec) & 0x1000) != 0) { - ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::SetFrame_1(1); + ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::SetFrame_1(1); } local_14 = 0xffffffff; ((std::string *)(local_58 + 0x14))->std::string::_Tidy_deallocate(); } - bVar6 = ((ANM2 *)((ANM2 *)((int)this + 0x48)))->ANM2::IsFinishedImpl(&s_empty); + bVar6 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x48)))->ANM2::IsFinishedImpl(&s_empty); if (bVar6 == 0) goto LAB_00976e53; } else if ((iVar8 != 10) && (iVar8 != 4)) { @@ -5085,7 +5085,7 @@ LAB_00975f41: } LAB_00976e53: if (isSamplesRebuilt != '\0') { - ((HomingLaser *)((HomingLaser *)((int)this + 0x464)))->HomingLaser::remove_collinear_samples(0.001); + ((HomingLaser *)((HomingLaser *)(GHIDRA_INT(this) + 0x464)))->HomingLaser::remove_collinear_samples(0.001); } if (local_e1 != 0) { update_endpoint_and_hits(this); @@ -5106,18 +5106,18 @@ LAB_00976e53: } if (local_e1 != 0) { if (local_c1 != false) { - impact_tear_flag_effects(this,(Vector *)((int)this + 0x548),(Vector *)((int)this + 0x550)); + impact_tear_flag_effects(this,(Vector *)(GHIDRA_INT(this) + 0x548),(Vector *)(GHIDRA_INT(this) + 0x550)); } cVar7 = FUN_007dd460(); if (((cVar7 != '\0') || (*(char *)((char *)this + 0x516) != '\0')) || (*(int *)((char *)this + 0x560) == 0)) { pBVar13 = BitSet128::operator_or(&popAbsorbMask,&g_tearFlagPop,&g_tearFlagAbsorb); pBVar13 = BitSet128::operator_and - ((BitSet128 *)&fStack_40,(BitSet128 *)((int)this + 0x438),pBVar13); + ((BitSet128 *)&fStack_40,(BitSet128 *)(GHIDRA_INT(this) + 0x438),pBVar13); bVar6 = ((BitSet128 *)(pBVar13))->BitSet128::IsNonZero(); if (((bVar6 != 0) && (isRedirected == '\0')) && (*(char *)((char *)this + 0x516) == '\0')) { iVar11 = *(int *)((char *)this + 0x480); - sampleCount = (int)*(void **)((char *)local_150.y + 0x484) - iVar11 >> 3; + sampleCount = GHIDRA_INT(*(void **)((char *)local_150.y + 0x484)) - iVar11 >> 3; iVar8 = sampleCount + -1; local_140.x = *(float *)(iVar11 + iVar8 * 8); pVVar14 = (Vector *)(iVar11 + iVar8 * 8); @@ -5132,13 +5132,13 @@ LAB_00976e53: bVar6 = is_thick_variant((Entity_Laser *)fVar18); if (bVar6 != 0) { uVar15 = Random(); - local_c0.y = ((float)((double)(int)uVar15 + - __uint_to_double_fixup[-((int)uVar15 >> 0x1f)]) * 2.3283064e-10 * + local_c0.y = ((float)((double)GHIDRA_INT(uVar15) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar15) >> 0x1f)]) * 2.3283064e-10 * 1.1 + 0.9) * local_c0.y; uVar15 = Random(); local_d4[0] = (EntityPtr) - ((float)((double)(int)uVar15 + - __uint_to_double_fixup[-((int)uVar15 >> 0x1f)]) * 2.3283064e-10 * + ((float)((double)GHIDRA_INT(uVar15) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar15) >> 0x1f)]) * 2.3283064e-10 * 0.3 + 0.8); ((Vector *)(&local_f0))->Vector::operator_mul_assign((float *)local_d4); } @@ -5153,11 +5153,11 @@ LAB_00976e53: pBVar13 = BitSet128::operator_or((BitSet128 *)local_128,pBVar13,b_01); pBVar13 = ((BitSet128 *)(pBVar13))->BitSet128::__bnot((BitSet128 *)local_e0); pBVar24 = BitSet128::operator_or - ((BitSet128 *)local_138,(BitSet128 *)((int)fVar18 + 0x438), + ((BitSet128 *)local_138,(BitSet128 *)(GHIDRA_INT(fVar18) + 0x438), &g_tearFlagPiercing); BitSet128::operator_and((BitSet128 *)&local_160,pBVar24,pBVar13); pBVar13 = BitSet128::operator_and - (&local_170,(BitSet128 *)((int)fVar18 + 0x438),&g_tearFlagAbsorb); + (&local_170,(BitSet128 *)(GHIDRA_INT(fVar18) + 0x438),&g_tearFlagAbsorb); local_e1 = ((BitSet128 *)(pBVar13))->BitSet128::IsNonZero(); local_130.y = (float)Random(); local_114.y = *(float *)((char *)fVar18 + 0x3c8); @@ -5167,8 +5167,8 @@ LAB_00976e53: randomOffset = MusicManager::RandomVector(&local_188); uVar15 = Random(); local_d4[0] = (EntityPtr) - ((float)((double)(int)uVar15 + - __uint_to_double_fixup[-((int)uVar15 >> 0x1f)]) * 2.3283064e-10); + ((float)((double)GHIDRA_INT(uVar15) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar15) >> 0x1f)]) * 2.3283064e-10); randomOffset = ((Vector *)(randomOffset))->Vector::__mul(&local_178,(float *)local_d4); local_b4 = (EntityPtr)0x0; local_d4[0] = (EntityPtr)(*(float *)((char *)local_150.y + 0x370) - 6.0); @@ -5184,11 +5184,11 @@ LAB_00976e53: } EVar17 = (EntityPtr) ((Game *)(g_game))->Game::Spawn(2,uVar15,pVVar14,&local_f0,(Entity *)local_114.y,0, - (uint)local_130.y); - flags._l._4_4_ = local_160._data; - flags._l._0_4_ = local_160._0_4_; - flags._h._0_4_ = local_160._capacity; - flags._h._4_4_ = local_160._size; + GHIDRA_UINT(local_130.y)); + (*(undefined4 *)((char *)&(flags._l) + 0x4)) = local_160._data; + (*(undefined4 *)((char *)&(flags._l) + 0x0)) = (*(undefined4 *)((char *)&(local_160) + 0x0)); + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = local_160._capacity; + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = local_160._size; local_b4 = EVar17; ((Entity_Tear *)((Entity_Tear *)EVar17))->Entity_Tear::SetTearFlags(flags); this = (Entity_Laser *)local_150.y; @@ -5203,11 +5203,11 @@ LAB_00976e53: local_d4[0] = (EntityPtr)FUN_0096ce70(); EVar22 = local_b4; EVar17 = *(EntityPtr *)local_d4[0]; - if (EVar17 != *(EntityPtr *)((int)local_d4[0] + 4)) { + if (EVar17 != *(EntityPtr *)(GHIDRA_INT(local_d4[0]) + 4)) { do { - sorted_vector_insert_unique((EntityPtr *)((int)EVar22 + 0x444),*(uint *)EVar17); - EVar17 = (EntityPtr)((int)EVar17 + 4); - } while (EVar17 != *(EntityPtr *)((int)local_d4[0] + 4)); + sorted_vector_insert_unique((EntityPtr *)(GHIDRA_INT(EVar22) + 0x444),*(uint *)EVar17); + EVar17 = (EntityPtr)(GHIDRA_INT(EVar17) + 4); + } while (EVar17 != *(EntityPtr *)(GHIDRA_INT(local_d4[0]) + 4)); this = (Entity_Laser *)local_150.y; } } @@ -5215,19 +5215,19 @@ LAB_00976e53: } if (local_c1 == false) { LAB_0097777a: - piVar16 = (int *)((int)this + 0x530); + piVar16 = (int *)(GHIDRA_INT(this) + 0x530); local_c0.y = 2.8026e-45; do { if ((int *)*piVar16 != (int *)0x0) { (**(code **)(*(int *)*piVar16 + 0x28))(); } piVar16 = piVar16 + 1; - local_c0.y = (float)((int)local_c0.y + -1); + local_c0.y = (float)(GHIDRA_INT(local_c0.y) + -1); } while ((EntityPtr)local_c0.y != (EntityPtr)0x0); } else { pBVar13 = BitSet128::operator_and - ((BitSet128 *)&local_160,(BitSet128 *)((int)this + 0x438),&g_tearFlagSplit + ((BitSet128 *)&local_160,(BitSet128 *)(GHIDRA_INT(this) + 0x438),&g_tearFlagSplit ); bVar6 = ((BitSet128 *)(pBVar13))->BitSet128::IsNonZero(); if (bVar6 == 0) goto LAB_0097777a; @@ -5247,20 +5247,20 @@ LAB_00977554: pVVar14 = Vector::FromAngle((Vector *)&local_170._h,(float)EVar17); local_d4[0] = (EntityPtr)0x3e800000; pVVar14 = ((Vector *)(pVVar14))->Vector::__mul((Vector *)&local_1b0._h,(float *)local_d4); - pVVar14 = ((Vector *)(pVVar14))->Vector::__mul(&local_188,(float *)((int)this + 0x370)); + pVVar14 = ((Vector *)(pVVar14))->Vector::__mul(&local_188,(float *)(GHIDRA_INT(this) + 0x370)); ((Vector *)(&local_120))->Vector::operator__(pVVar14); local_c0.y = 0.0; do { - EVar17 = *(EntityPtr *)((char *)this + ((int)local_c0.y + 0x14c) * 4); - pEVar10 = (EntityPtr *)((int)this + (int)((int)local_c0.y + 0x14c) * 4); + EVar17 = *(EntityPtr *)((char *)this + (GHIDRA_INT(local_c0.y) + 0x14c) * 4); + pEVar10 = (EntityPtr *)(GHIDRA_INT(this) + GHIDRA_INT((GHIDRA_INT(local_c0.y) + 0x14c)) * 4); if (EVar17 == (EntityPtr)0x0) { spawnedLaser = ShootAngle(*(int *)((char *)this + 0x2c),&local_120,0.0, - *(int *)((char *)this + 0x458),(Vector *)((int)this + 0x34c), + *(int *)((char *)this + 0x458),(Vector *)(GHIDRA_INT(this) + 0x34c), *(Entity **)((char *)this + 0x3bc),1); ((EntityPtr *)(pEVar10))->EntityPtr::Set((Entity *)spawnedLaser); if (*pEVar10 != (EntityPtr)0x0) { - *(undefined1 *)((int)*pEVar10 + 0x518) = 1; - *(undefined1 *)((int)*pEVar10 + 0x4e4) = 1; + *(undefined1 *)(GHIDRA_INT(*pEVar10) + 0x518) = 1; + *(undefined1 *)(GHIDRA_INT(*pEVar10) + 0x4e4) = 1; copy_from_parent((Entity_Laser *)*pEVar10,this,1); FUN_0096d120(); if (*(char *)((char *)this + 0x515) == '\0') { @@ -5286,16 +5286,16 @@ LAB_00977677: pBVar13 = ((BitSet128 *)(pBVar13))->BitSet128::__bnot((BitSet128 *)local_180); EVar17 = *pEVar10; pBVar13 = BitSet128::operator_and - ((BitSet128 *)local_f8,(BitSet128 *)((int)EVar17 + 0x428),pBVar13); + ((BitSet128 *)local_f8,(BitSet128 *)(GHIDRA_INT(EVar17) + 0x428),pBVar13); EVar22 = (EntityPtr)local_c0.y; - uVar26 = *(undefined4 *)((int)&pBVar13->_l + 4); + uVar26 = *(undefined4 *)(GHIDRA_INT(&pBVar13->_l) + 4); qVar4 = pBVar13->_h; - uVar3 = *(undefined4 *)((int)&pBVar13->_h + 4); - *(int *)((char *)EVar17 + 0x428) = (int)pBVar13->_l; + uVar3 = *(undefined4 *)(GHIDRA_INT(&pBVar13->_h) + 4); + *(int *)((char *)EVar17 + 0x428) = GHIDRA_INT(pBVar13->_l); *(undefined4 *)((char *)EVar17 + 0x42c) = uVar26; - *(int *)((char *)EVar17 + 0x430) = (int)qVar4; + *(int *)((char *)EVar17 + 0x430) = GHIDRA_INT(qVar4); *(undefined4 *)((char *)EVar17 + 0x434) = uVar3; - iVar8 = *(int *)((char *)this + 0x530 + (int)local_c0.y * 4); + iVar8 = *(int *)((char *)this + 0x530 + GHIDRA_INT(local_c0.y) * 4); *(float *)(iVar8 + 0x33c) = local_120.x; *(float *)(iVar8 + 0x340) = local_120.y; if ((EntityPtr)local_c0.y == (EntityPtr)0x0) { @@ -5305,19 +5305,19 @@ LAB_00977677: fVar18 = 90.0; } Entity_NPC::SetAimAngle - (*(Entity_NPC **)((char *)this + 0x530 + (int)local_c0.y * 4), + (*(Entity_NPC **)((char *)this + 0x530 + GHIDRA_INT(local_c0.y) * 4), fVar18 + (float)local_b4); if (*(char *)((char *)this + 0x515) != '\0') { - *(undefined4 *)(*(int *)((char *)this + 0x530 + (int)EVar22 * 4) + 0x540) = 2; - *(undefined1 *)(*(int *)((char *)this + 0x530 + (int)EVar22 * 4) + 0x171) = 0; + *(undefined4 *)(*(int *)((char *)this + 0x530 + GHIDRA_INT(EVar22) * 4) + 0x540) = 2; + *(undefined1 *)(*(int *)((char *)this + 0x530 + GHIDRA_INT(EVar22) * 4) + 0x171) = 0; } - piVar16 = *(int **)((char *)this + 0x530 + (int)EVar22 * 4); + piVar16 = *(int **)((char *)this + 0x530 + GHIDRA_INT(EVar22) * 4); if ((char)piVar16[0x117] != '\0') { (**(code **)(*piVar16 + 0xc))(); } } - local_c0.y = (float)((int)EVar22 + 1); - } while ((uint)local_c0.y < 2); + local_c0.y = (float)(GHIDRA_INT(EVar22) + 1); + } while (GHIDRA_UINT(local_c0.y) < 2); goto LAB_009777b9; } cVar7 = FUN_007dd460(); @@ -5338,14 +5338,14 @@ LAB_00977677: approach_angle(*(float *)((char *)this + 0x55c),(float)local_b4,fVar18 * 0.4); goto LAB_00977554; } - piVar16 = (int *)((int)this + 0x530); + piVar16 = (int *)(GHIDRA_INT(this) + 0x530); local_c0.y = 2.8026e-45; do { if ((int *)*piVar16 != (int *)0x0) { (**(code **)(*(int *)*piVar16 + 0x28))(); } piVar16 = piVar16 + 1; - local_c0.y = (float)((int)local_c0.y + -1); + local_c0.y = (float)(GHIDRA_INT(local_c0.y) + -1); } while (local_c0.y != 0.0); local_c0.y = 0.0; } @@ -5367,13 +5367,13 @@ LAB_009777b9: randomOffset = MusicManager::RandomVector(&local_178); uVar15 = Random(); local_d4[0] = (EntityPtr) - ((float)((double)(int)uVar15 + __uint_to_double_fixup[-((int)uVar15 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar15) + __uint_to_double_fixup[-(GHIDRA_INT(uVar15) >> 0x1f)]) * 2.3283064e-10 * 39.0); randomOffset = Vector::operator_mul(&local_c0,(float *)local_d4,randomOffset); ((Vector *)(pVVar14))->Vector::__add(&local_f0,randomOffset); this = (Entity_Laser *)local_150.y; pBVar13 = BitSet128::operator_and - ((BitSet128 *)local_148,(BitSet128 *)((int)local_150.y + 0x428), + ((BitSet128 *)local_148,(BitSet128 *)(GHIDRA_INT(local_150.y) + 0x428), &g_tearFlagHoming); bVar6 = ((BitSet128 *)(pBVar13))->BitSet128::IsNonZero(); if (bVar6 != 0) { @@ -5385,7 +5385,7 @@ LAB_009777b9: if (*(EntityPtr *)((char *)local_130.y + 0x1264) != (EntityPtr)0x0) { do { pEVar27 = *(Entity **) - ((int)*(EntityPtr *)((char *)local_130.y + 0x125c) + (int)local_b4 * 4); + (GHIDRA_INT(*(EntityPtr *)((char *)local_130.y + 0x125c)) + GHIDRA_INT(local_b4) * 4); bVar6 = ((Entity *)(pEVar27))->Entity::IsVulnerableEnemy((Entity *)0x0); if (((bVar6 != 0) && (bVar6 = ((Entity *)(pEVar27))->Entity::HasEntityFlags(0x20000010), bVar6 == 0)) && (pEVar27 != *(Entity **)((char *)this + 0x3bc))) { @@ -5400,8 +5400,8 @@ LAB_009777b9: local_c0.y = (float)local_d4[0]; } } - local_b4 = (EntityPtr)((int)local_b4 + 1); - } while ((uint)local_b4 < (uint)*(EntityPtr *)((char *)local_130.y + 0x1264)); + local_b4 = (EntityPtr)(GHIDRA_INT(local_b4) + 1); + } while (GHIDRA_UINT(local_b4) < GHIDRA_UINT(*(EntityPtr *)((char *)local_130.y + 0x1264))); } bVar6 = ((Vector *)(&local_114))->Vector::operator_ne(&g_vectorZero); if (bVar6 != 0) { @@ -5415,10 +5415,10 @@ LAB_009777b9: } bVar6 = 1; pEVar27 = *(Entity **)((char *)this + 0x3bc); - pVVar14 = (Vector *)((int)this + 0x34c); + pVVar14 = (Vector *)(GHIDRA_INT(this) + 0x34c); fVar21 = 4.2039e-45; fVar18 = ((Vector *)(&local_f0))->Vector::GetAngleDegrees(); - spawnedLaser = ShootAngle(*(int *)((char *)this + 0x2c),&local_104,fVar18,(int)fVar21,pVVar14, + spawnedLaser = ShootAngle(*(int *)((char *)this + 0x2c),&local_104,fVar18,GHIDRA_INT(fVar21),pVVar14, pEVar27,bVar6); if (spawnedLaser != (Entity_Laser *)0x0) { spawnedLaser->_disableFollowParent = 1; @@ -5428,16 +5428,16 @@ LAB_009777b9: pBVar13 = BitSet128::operator_or(&orbitMask,&g_tearFlagOrbit,&g_tearFlagOrbitAdvanced); pBVar13 = BitSet128::operator_or(&orbitBoomerangMask,pBVar13,pBVar24); pBVar13 = ((BitSet128 *)(pBVar13))->BitSet128::__bnot(¬OrbitBoomerangMask); - pBVar13 = BitSet128::operator_and(&inheritedFlags,(BitSet128 *)((int)this + 0x438),pBVar13); + pBVar13 = BitSet128::operator_and(&inheritedFlags,(BitSet128 *)(GHIDRA_INT(this) + 0x438),pBVar13); qVar4 = pBVar13->_l; - uVar26 = *(undefined4 *)((int)&pBVar13->_l + 4); + uVar26 = *(undefined4 *)(GHIDRA_INT(&pBVar13->_l) + 4); qVar5 = pBVar13->_h; - uVar3 = *(undefined4 *)((int)&pBVar13->_h + 4); + uVar3 = *(undefined4 *)(GHIDRA_INT(&pBVar13->_h) + 4); spawnedLaser->_timeout = 3; - *(int *)&(spawnedLaser->_tearFlags)._l = (int)qVar4; - *(undefined4 *)((int)&(spawnedLaser->_tearFlags)._l + 4) = uVar26; - *(int *)&(spawnedLaser->_tearFlags)._h = (int)qVar5; - *(undefined4 *)((int)&(spawnedLaser->_tearFlags)._h + 4) = uVar3; + *(int *)&(spawnedLaser->_tearFlags)._l = GHIDRA_INT(qVar4); + *(undefined4 *)(GHIDRA_INT(&(spawnedLaser->_tearFlags)._l) + 4) = uVar26; + *(int *)&(spawnedLaser->_tearFlags)._h = GHIDRA_INT(qVar5); + *(undefined4 *)(GHIDRA_INT(&(spawnedLaser->_tearFlags)._h) + 4) = uVar3; ((Entity *)((Entity *)spawnedLaser))->Entity::SetParent(*(Entity **)((char *)this + 0x3bc)); fVar18 = ((Vector *)(&local_f0))->Vector::Length(); spawnedLaser->_maxDistance = fVar18; @@ -5512,30 +5512,30 @@ void Entity_Laser::Update() local_8 = 0xffffffff; puStack_c = &LAB_00b0cb35; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(local_28 + 0x24); + local_14 = __security_cookie ^ GHIDRA_UINT((local_28 + 0x24)); ExceptionList = &local_10; pBVar8 = &this->_tearFlags; maskedFlags = BitSet128::operator_and((BitSet128 *)(local_28 + 4),pBVar8,&g_tearFlagWait); - if (((((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) && + if ((((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) && (iVar9 = this->_subtype, iVar9 != 1)) && (((iVar9 != 2 && (iVar9 != 3)) && (0 < this->_timeout)))) { maskedFlags = ((BitSet128 *)(&g_tearFlagWait))->BitSet128::__bnot((BitSet128 *)(local_28 + 4)); local_44 = (std_string *)this->_scale; - *(uint *)&pBVar8->_l = (uint)pBVar8->_l & (uint)maskedFlags->_l; - puVar1 = (uint *)((int)&(this->_tearFlags)._l + 4); - *puVar1 = *puVar1 & *(uint *)((int)&maskedFlags->_l + 4); + *(uint *)&pBVar8->_l = GHIDRA_UINT(pBVar8->_l) & GHIDRA_UINT(maskedFlags->_l); + puVar1 = (uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); + *puVar1 = *puVar1 & *(uint *)(GHIDRA_INT(&maskedFlags->_l) + 4); pqVar2 = &(this->_tearFlags)._h; - *(uint *)pqVar2 = (uint)*pqVar2 & (uint)maskedFlags->_h; - puVar1 = (uint *)((int)&(this->_tearFlags)._h + 4); - *puVar1 = *puVar1 & *(uint *)((int)&maskedFlags->_h + 4); - *(uint *)&(this->_heldTearFlags)._l = (uint)(this->_heldTearFlags)._l | (uint)g_tearFlagWait._l; - puVar1 = (uint *)((int)&(this->_heldTearFlags)._l + 4); - *puVar1 = *puVar1 | g_tearFlagWait._l._4_4_; + *(uint *)pqVar2 = GHIDRA_UINT(*pqVar2) & GHIDRA_UINT(maskedFlags->_h); + puVar1 = (uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); + *puVar1 = *puVar1 & *(uint *)(GHIDRA_INT(&maskedFlags->_h) + 4); + *(uint *)&(this->_heldTearFlags)._l = GHIDRA_UINT((this->_heldTearFlags)._l) | GHIDRA_UINT(g_tearFlagWait._l); + puVar1 = (uint *)(GHIDRA_INT(&(this->_heldTearFlags)._l) + 4); + *puVar1 = *puVar1 | (*(undefined4 *)((char *)&(g_tearFlagWait._l) + 0x4)); pqVar2 = &(this->_heldTearFlags)._h; - *(uint *)pqVar2 = (uint)*pqVar2 | (uint)g_tearFlagWait._h; - puVar1 = (uint *)((int)&(this->_heldTearFlags)._h + 4); - *puVar1 = *puVar1 | g_tearFlagWait._h._4_4_; + *(uint *)pqVar2 = GHIDRA_UINT(*pqVar2) | GHIDRA_UINT(g_tearFlagWait._h); + puVar1 = (uint *)(GHIDRA_INT(&(this->_heldTearFlags)._h) + 4); + *puVar1 = *puVar1 | (*(undefined4 *)((char *)&(g_tearFlagWait._h) + 0x4)); iVar9 = this->_variant; if ((iVar9 == 0xb) || (iVar9 == 0xe)) { local_44 = (std_string *)((float)local_44 + (float)local_44); @@ -5568,7 +5568,7 @@ void Entity_Laser::Update() tmpEntity = this->_tearWaitEffect; } } - local_48 = (EntityPtr)((int)tmpEntity + 0x3c0); + local_48 = (EntityPtr)(GHIDRA_INT(tmpEntity) + 0x3c0); if (*(EntityPtr *)local_48 != (EntityPtr)0x0) { local_4c = local_48; std::multiset::erase(&local_4c); @@ -5585,15 +5585,15 @@ void Entity_Laser::Update() (**(code **)(*(int *)*pEVar3 + 0x3c))(&this->_color,0xffffffff,0xff,0,1); (**(code **)(*(int *)*pEVar3 + 0x40))(this->_collisionDamage); tmpEntity = *pEVar3; - uVar4 = *(undefined4 *)((int)&(this->_tearFlags)._l + 4); + uVar4 = *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); qVar6 = (this->_tearFlags)._h; - uVar5 = *(undefined4 *)((int)&(this->_tearFlags)._h + 4); - *(int *)((char *)tmpEntity + 0x420) = (int)(this->_tearFlags)._l; + uVar5 = *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); + *(int *)((char *)tmpEntity + 0x420) = GHIDRA_INT((this->_tearFlags)._l); *(undefined4 *)((char *)tmpEntity + 0x424) = uVar4; - *(int *)((char *)tmpEntity + 0x428) = (int)qVar6; + *(int *)((char *)tmpEntity + 0x428) = GHIDRA_INT(qVar6); *(undefined4 *)((char *)tmpEntity + 0x42c) = uVar5; if ((this->_parent != (EntityPtr)0x0) && (*(int *)((char *)this->_parent + 0x28) == 7)) { - *(undefined1 *)((int)*pEVar3 + 0x171) = 0; + *(undefined1 *)(GHIDRA_INT(*pEVar3) + 0x171) = 0; } (**(code **)(*(int *)*pEVar3 + 0xc))(); local_48 = *pEVar3; @@ -5621,67 +5621,67 @@ void Entity_Laser::Update() nextLaser = *(EntityPtr *)((char *)chainLaser + 0x52c); } pBVar8 = BitSet128::operator_and - ((BitSet128 *)(local_28 + 4),(BitSet128 *)((int)tmpEntity + 0x428), + ((BitSet128 *)(local_28 + 4),(BitSet128 *)(GHIDRA_INT(tmpEntity) + 0x428), &g_tearFlagRainbow); - if (((int)pBVar8->_l == 0 && *(int *)((int)&pBVar8->_l + 4) == 0) && - ((int)pBVar8->_h == 0 && *(int *)((int)&pBVar8->_h + 4) == 0)) { + if ((GHIDRA_INT(pBVar8->_l) == 0 && *(int *)(GHIDRA_INT(&pBVar8->_l) + 4) == 0) && + (GHIDRA_INT(pBVar8->_h) == 0 && *(int *)(GHIDRA_INT(&pBVar8->_h) + 4) == 0)) { pBVar8 = BitSet128::operator_and - ((BitSet128 *)(local_28 + 4),(BitSet128 *)((int)tmpEntity + 0x428), + ((BitSet128 *)(local_28 + 4),(BitSet128 *)(GHIDRA_INT(tmpEntity) + 0x428), &g_tearFlagContinuum); - if (((int)pBVar8->_l != 0 || *(int *)((int)&pBVar8->_l + 4) != 0) || - ((int)pBVar8->_h != 0 || *(int *)((int)&pBVar8->_h + 4) != 0)) { + if ((GHIDRA_INT(pBVar8->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar8->_l) + 4) != 0) || + (GHIDRA_INT(pBVar8->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar8->_h) + 4) != 0)) { ((Color *)((Color *)local_40))->Color::Color(); uVar10 = extraout_EDX & 0x80000007; - if ((int)uVar10 < 0) { + if (GHIDRA_INT(uVar10) < 0) { uVar10 = (uVar10 - 1 | 0xfffffff8) + 1; } switch(uVar10) { case 0: - local_40._16_4_ = 2.5; - local_40._20_4_ = (char *)0x0; - local_28._0_4_ = 2.5; - local_28._4_4_ = 1.0; + (*(undefined4 *)((char *)&(local_40) + 0x10)) = 2.5; + (*(undefined4 *)((char *)&(local_40) + 0x14)) = (char *)0x0; + (*(undefined4 *)((char *)&(local_28) + 0x0)) = 2.5; + (*(undefined4 *)((char *)&(local_28) + 0x4)) = 1.0; break; case 1: case 7: - local_40._16_4_ = 2.5; - local_40._20_4_ = (char *)0x3f200000; - local_28._0_4_ = 2.5; - local_28._4_4_ = 1.0; + (*(undefined4 *)((char *)&(local_40) + 0x10)) = 2.5; + (*(undefined4 *)((char *)&(local_40) + 0x14)) = (char *)0x3f200000; + (*(undefined4 *)((char *)&(local_28) + 0x0)) = 2.5; + (*(undefined4 *)((char *)&(local_28) + 0x4)) = 1.0; break; case 2: case 6: - local_40._16_4_ = 2.5; - local_40._20_4_ = (char *)0x3fa00000; - local_28._0_4_ = 2.5; - local_28._4_4_ = 1.0; + (*(undefined4 *)((char *)&(local_40) + 0x10)) = 2.5; + (*(undefined4 *)((char *)&(local_40) + 0x14)) = (char *)0x3fa00000; + (*(undefined4 *)((char *)&(local_28) + 0x0)) = 2.5; + (*(undefined4 *)((char *)&(local_28) + 0x4)) = 1.0; break; case 3: case 5: - local_40._16_4_ = 2.5; - local_40._20_4_ = (char *)0x3ff00000; - local_28._0_4_ = 2.5; - local_28._4_4_ = 1.0; + (*(undefined4 *)((char *)&(local_40) + 0x10)) = 2.5; + (*(undefined4 *)((char *)&(local_40) + 0x14)) = (char *)0x3ff00000; + (*(undefined4 *)((char *)&(local_28) + 0x0)) = 2.5; + (*(undefined4 *)((char *)&(local_28) + 0x4)) = 1.0; break; case 4: - local_40._16_4_ = 2.5; - local_40._20_4_ = (char *)0x40200000; - local_28._0_4_ = 2.5; - local_28._4_4_ = 1.0; + (*(undefined4 *)((char *)&(local_40) + 0x10)) = 2.5; + (*(undefined4 *)((char *)&(local_40) + 0x14)) = (char *)0x40200000; + (*(undefined4 *)((char *)&(local_28) + 0x0)) = 2.5; + (*(undefined4 *)((char *)&(local_28) + 0x4)) = 1.0; } goto LAB_00978138; } } else { hsv_to_rgb((KColor *)local_28,((float)(g_game->_frameCount % 0x1e) * 360.0) / 30.0,0.9,1.0,1.0); - local_40._16_4_ = (float)local_28._0_4_ * 4.0; - local_40._20_4_ = (float)local_28._4_4_ * 4.0; - local_28._0_4_ = fStack_20 * 4.0; - local_40._0_4_ = 1.0; - local_40._4_4_ = 1.0; - local_40._8_4_ = 1.0; - local_40._12_4_ = 1.0; - local_28._4_4_ = 1.0; + (*(undefined4 *)((char *)&(local_40) + 0x10)) = (*(undefined4 *)((char *)&((float)local_28) + 0x0)) * 4.0; + (*(undefined4 *)((char *)&(local_40) + 0x14)) = (*(undefined4 *)((char *)&((float)local_28) + 0x4)) * 4.0; + (*(undefined4 *)((char *)&(local_28) + 0x0)) = fStack_20 * 4.0; + (*(undefined4 *)((char *)&(local_40) + 0x0)) = 1.0; + (*(undefined4 *)((char *)&(local_40) + 0x4)) = 1.0; + (*(undefined4 *)((char *)&(local_40) + 0x8)) = 1.0; + (*(undefined4 *)((char *)&(local_40) + 0xc)) = 1.0; + (*(undefined4 *)((char *)&(local_28) + 0x4)) = 1.0; fStack_20 = 0.0; fStack_1c = 0.0; fStack_18 = 0.0; @@ -5719,7 +5719,7 @@ LAB_00978138: if (bVar7 == 0) { local_44 = (std_string *)0x3cb; seed_fart_sound_override((int *)&local_44); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_44,1.0,2,1,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_44),1.0,2,1,1.0,0.0); } } else { @@ -5746,21 +5746,21 @@ LAB_00978138: if ((iVar9 != 0x3b6) || (this->_variant != 1)) goto LAB_009784c5; fStack_1c = 0.0; fStack_18 = 2.10195e-44; - local_40._20_4_ = 0.0; - local_40._20_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_40) + 0x14)) = 0.0; + (*(undefined4 *)((char *)&(local_40) + 0x14)) = std::_Allocate(0x20); fStack_1c = 4.06377e-44; fStack_18 = 4.34403e-44; - builtin_strncpy((char *)local_40._20_4_,"gfx/007.001_Static Laser.anm2",0x1e); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_40) + 0x14)),"gfx/007.001_Static Laser.anm2",0x1e); local_8 = 1; ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)(local_40 + 0x14),1); local_8 = 0xffffffff; - if (0xf < (uint)fStack_18) { - uVar10 = (int)fStack_18 + 1; - freePtr = (char *)local_40._20_4_; + if (0xf < GHIDRA_UINT(fStack_18)) { + uVar10 = GHIDRA_INT(fStack_18) + 1; + freePtr = (*(undefined4 *)((char *)&((char *)local_40) + 0x14)); if (0xfff < uVar10) { - freePtr = *(char **)(local_40._20_4_ + -4); - uVar10 = (int)fStack_18 + 0x24; - if ((char *)0x1f < (char *)(local_40._20_4_ + (-4 - (int)freePtr))) { + freePtr = *(char **)((*(undefined4 *)((char *)&(local_40) + 0x14)) + -4); + uVar10 = GHIDRA_INT(fStack_18) + 0x24; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_40) + 0x14)) + (-4 - GHIDRA_INT(freePtr)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -5791,7 +5791,7 @@ LAB_009784a4: isLess = bVar7 < (byte)defaultAnimChar->_buf[0]; if (bVar7 != defaultAnimChar->_buf[0]) { LAB_00978480: - uVar10 = -(uint)isLess | 1; + uVar10 = -GHIDRA_UINT(isLess) | 1; goto LAB_00978485; } if (bVar7 == 0) break; @@ -5817,21 +5817,21 @@ LAB_00978485: } fStack_1c = 0.0; fStack_18 = 2.10195e-44; - local_40._20_4_ = 0.0; - local_40._20_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_40) + 0x14)) = 0.0; + (*(undefined4 *)((char *)&(local_40) + 0x14)) = std::_Allocate(0x20); fStack_1c = 4.06377e-44; fStack_18 = 4.34403e-44; - builtin_strncpy((char *)local_40._20_4_,"gfx/007.006_CageVisLaser.anm2",0x1e); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_40) + 0x14)),"gfx/007.006_CageVisLaser.anm2",0x1e); local_8 = 0; ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)(local_40 + 0x14),1); local_8 = 0xffffffff; - if (0xf < (uint)fStack_18) { - uVar10 = (int)fStack_18 + 1; - freePtr = (char *)local_40._20_4_; + if (0xf < GHIDRA_UINT(fStack_18)) { + uVar10 = GHIDRA_INT(fStack_18) + 1; + freePtr = (*(undefined4 *)((char *)&((char *)local_40) + 0x14)); if (0xfff < uVar10) { - freePtr = *(char **)(local_40._20_4_ + -4); - uVar10 = (int)fStack_18 + 0x24; - if ((char *)0x1f < (char *)(local_40._20_4_ + (-4 - (int)freePtr))) { + freePtr = *(char **)((*(undefined4 *)((char *)&(local_40) + 0x14)) + -4); + uVar10 = GHIDRA_INT(fStack_18) + 0x24; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_40) + 0x14)) + (-4 - GHIDRA_INT(freePtr)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -5854,7 +5854,7 @@ LAB_00978485: isLess = bVar7 < (byte)defaultAnimChar->_buf[0]; if (bVar7 != defaultAnimChar->_buf[0]) { LAB_00978314: - uVar10 = -(uint)isLess | 1; + uVar10 = -GHIDRA_UINT(isLess) | 1; goto LAB_00978319; } if (bVar7 == 0) break; @@ -6011,7 +6011,7 @@ void Entity_Laser::Render(Vector *offset) local_8 = -NAN; puStack_c = &LAB_00b0cb9c; local_10 = ExceptionList; - securityCookie = __security_cookie ^ (uint)(&shaderColor)[1]._colorize; + securityCookie = __security_cookie ^ GHIDRA_UINT((&shaderColor)[1]._colorize); if (this->_visible == 0) { return; } @@ -6063,12 +6063,12 @@ void Entity_Laser::Render(Vector *offset) if (local_120 == 0.0) { warnMessage = "[warn] Laser::Render sprite sheet is not loaded\n"; KAGE_LogMessage(1,(byte *)"[warn] Laser::Render sprite sheet is not loaded\n"); - shader_cache_find((int)warnMessage); + shader_cache_find(GHIDRA_INT(warnMessage)); ExceptionList = local_10; return; } uVar5 = (this->_sprite)._layerCount; - shaderMode = ((uint)(this->_sprite)._bitflags >> 5 & 1) * 2; + shaderMode = (GHIDRA_UINT((this->_sprite)._bitflags) >> 5 & 1) * 2; if (this->_sampleLaser == 0) { if ((uVar5 < 2) || (((bVar1 = is_thick_variant(this), bVar1 == 0 && (iVar6 = this->_variant, iVar6 != 2)) && @@ -6078,19 +6078,19 @@ void Entity_Laser::Render(Vector *offset) layerFrame = ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::GetLayerFrame(0); if (layerFrame == (AnimationState *)0x0) goto LAB_0097ab0f; ((AnimationState *)((AnimationState *)frameCopy))->AnimationState::copy_assign(layerFrame); - local_208._offset[2] = (float)CONCAT31(local_208._offset[2]._1_3_,1); - local_208._colorize[3] = this->_laserLength * 0.65 + (float)frameCopy._4_4_; - local_208._colorize[2] = (float)frameCopy._0_4_; - local_208._colorize[1] = (float)frameCopy._4_4_; - local_208._tint[3] = (float)frameCopy._4_4_; - local_208._colorize[0] = (float)frameCopy._8_4_ + (float)frameCopy._0_4_; + local_208._offset[2] = (float)CONCAT31((*(undefined1 *)((char *)&(local_208._offset[2]) + 0x1)),1); + local_208._colorize[3] = this->_laserLength * 0.65 + (*(undefined4 *)((char *)&((float)frameCopy) + 0x4)); + local_208._colorize[2] = (*(undefined4 *)((char *)&((float)frameCopy) + 0x0)); + local_208._colorize[1] = (*(undefined4 *)((char *)&((float)frameCopy) + 0x4)); + local_208._tint[3] = (*(undefined4 *)((char *)&((float)frameCopy) + 0x4)); + local_208._colorize[0] = (*(undefined4 *)((char *)&((float)frameCopy) + 0x8)) + (*(undefined4 *)((char *)&((float)frameCopy) + 0x0)); if ((this->_sprite)._flipX != 0) { - local_208._colorize[0] = (float)frameCopy._0_4_; - local_208._colorize[2] = (float)((float)frameCopy._8_4_ + (float)frameCopy._0_4_); + local_208._colorize[0] = (*(undefined4 *)((char *)&((float)frameCopy) + 0x0)); + local_208._colorize[2] = (float)((*(undefined4 *)((char *)&((float)frameCopy) + 0x8)) + (*(undefined4 *)((char *)&((float)frameCopy) + 0x0))); } local_208._offset[1] = local_208._colorize[3]; local_208._offset[0] = local_208._colorize[0]; - local_134 = (float)frameCopy._8_4_ * 0.5; + local_134 = (*(undefined4 *)((char *)&((float)frameCopy) + 0x8)) * 0.5; local_124 = (AnimationState *)(this->_angleDegrees * 0.017453292); local_208._tint[2] = local_208._colorize[2]; local_154 = sin((float)local_124); @@ -6145,10 +6145,10 @@ void Entity_Laser::Render(Vector *offset) FUN_004072e0(); if (shaderMode == 2) { uVar5 = g_game->_frameCount & 0x800000ff; - if ((int)uVar5 < 0) { + if (GHIDRA_INT(uVar5) < 0) { uVar5 = (uVar5 - 1 | 0xffffff00) + 1; } - shaderColor._colorize[3] = (float)(int)uVar5 * 0.00390625; + shaderColor._colorize[3] = (float)GHIDRA_INT(uVar5) * 0.00390625; } vertexColor._red = shaderColor._tint[0]; vertexColor._green = shaderColor._tint[1]; @@ -6159,8 +6159,8 @@ void Entity_Laser::Render(Vector *offset) layer->_wrapSMode = 0; layer = ((ANM2 *)(this_00))->ANM2::GetLayer((byte *)0x0); layer->_wrapTMode = 0; - uVar15._0_4_ = 1.3930976e-38; - uVar15._4_4_ = 0.0; + (*(undefined4 *)((char *)&(uVar15) + 0x0)) = 1.3930976e-38; + (*(undefined4 *)((char *)&(uVar15) + 0x4)) = 0.0; layer = ((ANM2 *)(this_00))->ANM2::GetLayer((byte *)0x0); ((LayerState *)(layer))->LayerState::GetTexture(auStack_30a + -10); apply_sprite_shader_params(&shaderColor,1,(void *)uVar15,SUB84(uVar15,4)); @@ -6193,28 +6193,28 @@ void Entity_Laser::Render(Vector *offset) LAB_0097ab0f: warnMessage = "[warn] Laser::Render current frame is NULL\n"; KAGE_LogMessage(1,(byte *)"[warn] Laser::Render current frame is NULL\n"); - shader_cache_find((int)warnMessage); + shader_cache_find(GHIDRA_INT(warnMessage)); ExceptionList = local_10; return; } ((AnimationState *)((AnimationState *)firstLayerFrame))->AnimationState::copy_assign(local_124); ((AnimationState *)((AnimationState *)frameCopy))->AnimationState::copy_assign(layerFrame); layer = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer((byte *)0x1); - local_208._offset[2] = (float)CONCAT31(local_208._offset[2]._1_3_,1); + local_208._offset[2] = (float)CONCAT31((*(undefined1 *)((char *)&(local_208._offset[2]) + 0x1)),1); local_120 = frameScaleX * (layer->_size).x * (this->_sprite)._scale.x; frameScaleY = frameScaleY * (layer->_size).y * (this->_sprite)._scale.y; - local_208._colorize[3] = (float)frameCopy._4_4_ + (this->_laserLength / frameScaleY) * 0.65; - local_208._colorize[2] = (float)frameCopy._0_4_; - local_208._colorize[1] = (float)frameCopy._4_4_; - local_208._tint[3] = (float)frameCopy._4_4_; - local_208._colorize[0] = (float)frameCopy._8_4_ + (float)frameCopy._0_4_; + local_208._colorize[3] = (*(undefined4 *)((char *)&((float)frameCopy) + 0x4)) + (this->_laserLength / frameScaleY) * 0.65; + local_208._colorize[2] = (*(undefined4 *)((char *)&((float)frameCopy) + 0x0)); + local_208._colorize[1] = (*(undefined4 *)((char *)&((float)frameCopy) + 0x4)); + local_208._tint[3] = (*(undefined4 *)((char *)&((float)frameCopy) + 0x4)); + local_208._colorize[0] = (*(undefined4 *)((char *)&((float)frameCopy) + 0x8)) + (*(undefined4 *)((char *)&((float)frameCopy) + 0x0)); if ((this->_sprite)._flipX != 0) { - local_208._colorize[0] = (float)frameCopy._0_4_; - local_208._colorize[2] = (float)((float)frameCopy._8_4_ + (float)frameCopy._0_4_); + local_208._colorize[0] = (*(undefined4 *)((char *)&((float)frameCopy) + 0x0)); + local_208._colorize[2] = (float)((*(undefined4 *)((char *)&((float)frameCopy) + 0x8)) + (*(undefined4 *)((char *)&((float)frameCopy) + 0x0))); } local_208._offset[1] = local_208._colorize[3]; local_208._offset[0] = local_208._colorize[0]; - local_130 = (float)frameCopy._8_4_ * 0.5; + local_130 = (*(undefined4 *)((char *)&((float)frameCopy) + 0x8)) * 0.5; local_124 = (AnimationState *)(this->_angleDegrees * 0.017453292); local_208._tint[2] = local_208._colorize[2]; frameScaleX = local_120; @@ -6222,11 +6222,11 @@ LAB_0097ab0f: fVar8 = cos((float)local_124); local_13c = (this->_sprite)._scale.y; local_124 = (AnimationState *) - (((float)firstLayerFrame._20_4_ + (float)firstLayerFrame._12_4_) * fVar8 * + (((*(undefined4 *)((char *)&((float)firstLayerFrame) + 0x14)) + (*(undefined4 *)((char *)&((float)firstLayerFrame) + 0xc))) * fVar8 * local_13c); - local_13c = ((float)firstLayerFrame._20_4_ + (float)firstLayerFrame._12_4_) * local_154 * + local_13c = ((*(undefined4 *)((char *)&((float)firstLayerFrame) + 0x14)) + (*(undefined4 *)((char *)&((float)firstLayerFrame) + 0xc))) * local_154 * local_13c; - fVar7 = this->_laserLength - ((float)firstLayerFrame._12_4_ / 0.65) * 0.5; + fVar7 = this->_laserLength - ((*(undefined4 *)((char *)&((float)firstLayerFrame) + 0xc)) / 0.65) * 0.5; local_1b0.x = fVar7 * local_154; local_154 = fVar7 * fVar8; local_1b0.y = -local_154; @@ -6279,10 +6279,10 @@ LAB_0097ab0f: FUN_004072e0(); if (shaderMode == 2) { uVar5 = g_game->_frameCount & 0x800000ff; - if ((int)uVar5 < 0) { + if (GHIDRA_INT(uVar5) < 0) { uVar5 = (uVar5 - 1 | 0xffffff00) + 1; } - shaderColor._colorize[3] = (float)(int)uVar5 * 0.00390625; + shaderColor._colorize[3] = (float)GHIDRA_INT(uVar5) * 0.00390625; } vertexColor._red = shaderColor._tint[0]; vertexColor._green = shaderColor._tint[1]; @@ -6293,8 +6293,8 @@ LAB_0097ab0f: layer->_wrapSMode = 0; layer = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer((byte *)0x0); layer->_wrapTMode = 0; - uVar14._0_4_ = 1.3928444e-38; - uVar14._4_4_ = 0.0; + (*(undefined4 *)((char *)&(uVar14) + 0x0)) = 1.3928444e-38; + (*(undefined4 *)((char *)&(uVar14) + 0x4)) = 0.0; layer = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer((byte *)0x0); ((LayerState *)(layer))->LayerState::GetTexture(auStack_30a + -10); apply_sprite_shader_params(&shaderColor,1,(void *)uVar14,SUB84(uVar14,4)); @@ -6311,12 +6311,12 @@ LAB_0097b218: shader_cache_find(iVar6); goto LAB_0097b24c; } - local_164 = (byte *)(uint)(1 < uVar5); - layerFrame = ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::GetLayerFrame((int)local_164); + local_164 = (byte *)GHIDRA_UINT((1 < uVar5)); + layerFrame = ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::GetLayerFrame(GHIDRA_INT(local_164)); if (layerFrame == (AnimationState *)0x0) { warnMessage = "[warn] Laser::Render current laser frame is NULL\n"; KAGE_LogMessage(1,(byte *)"[warn] Laser::Render current laser frame is NULL\n"); - shader_cache_find((int)warnMessage); + shader_cache_find(GHIDRA_INT(warnMessage)); ExceptionList = local_10; return; } @@ -6334,13 +6334,13 @@ LAB_0097b218: layer->_wrapTMode = 0; layer = ((ANM2 *)(this_00))->ANM2::GetLayer((byte *)0x0); ((LayerState *)(layer))->LayerState::GetTexture(&local_1b0); - local_8 = (float)CONCAT31(local_8._1_3_,2); + local_8 = (float)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); scaledOffsetX = (this->_posOffset).x * 0.65; local_12c = (this->_homingLaser)._samples._begin; - local_19c = (float)frameCopy._8_4_ * 0.5; + local_19c = (*(undefined4 *)((char *)&((float)frameCopy) + 0x8)) * 0.5; scaledOffsetY = (this->_posOffset).y * 0.65; local_13c = 0.0; - if ((int)(this->_homingLaser)._samples._end - (int)local_12c >> 3 == 1) { + if (GHIDRA_INT((this->_homingLaser)._samples._end) - GHIDRA_INT(local_12c) >> 3 == 1) { local_138 = verticesEnd; } else { @@ -6348,16 +6348,16 @@ LAB_0097b218: local_138 = verticesEnd; do { fVar8 = local_13c; - local_140 = *(float *)((char *)local_12c + (int)local_13c * 8 + 8) - - *(float *)((char *)local_12c + (int)local_13c * 8); - local_134 = *(float *)((char *)local_12c + (int)local_13c * 8 + 0xc) - - *(float *)((char *)local_12c + (int)local_13c * 8 + 4); + local_140 = *(float *)((char *)local_12c + GHIDRA_INT(local_13c) * 8 + 8) - + *(float *)((char *)local_12c + GHIDRA_INT(local_13c) * 8); + local_134 = *(float *)((char *)local_12c + GHIDRA_INT(local_13c) * 8 + 0xc) - + *(float *)((char *)local_12c + GHIDRA_INT(local_13c) * 8 + 4); verticesEnd = local_138; fVar7 = sqrtf(local_134 * local_134 + local_140 * local_140); local_134 = local_134 / fVar7; local_140 = -(local_140 / fVar7); - pfVar3 = (float *)((int)local_12c + (int)fVar8 * 8); - local_188.y = (*(float *)((char *)local_12c + (int)fVar8 * 8 + 4) - 140.0) * 0.65 + + pfVar3 = (float *)(GHIDRA_INT(local_12c) + GHIDRA_INT(fVar8) * 8); + local_188.y = (*(float *)((char *)local_12c + GHIDRA_INT(fVar8) * 8 + 4) - 140.0) * 0.65 + (g_screenHeight - 182.0) * 0.5; local_12c = (int *)(g_displayPixelRatio * g_screenPointScale); local_120 = ((*pfVar3 - 60.0) * 0.65 + (g_screenWidth - 338.0) * 0.5) * (float)local_12c + 0.5 @@ -6380,10 +6380,10 @@ LAB_0097b218: verticesEnd = local_138 + 2; } pvVar12 = (this->_homingLaser)._samples._begin; - local_188.y = (*(float *)((char *)pvVar12 + (int)fVar8 * 8 + 4) - 140.0) * 0.65 + + local_188.y = (*(float *)((char *)pvVar12 + GHIDRA_INT(fVar8) * 8 + 4) - 140.0) * 0.65 + (g_screenHeight - 182.0) * 0.5; local_12c = (int *)(g_displayPixelRatio * g_screenPointScale); - local_120 = ((*(float *)((char *)pvVar12 + (int)fVar8 * 8) - 60.0) * 0.65 + + local_120 = ((*(float *)((char *)pvVar12 + GHIDRA_INT(fVar8) * 8) - 60.0) * 0.65 + (g_screenWidth - 338.0) * 0.5) * (float)local_12c + 0.5; local_138 = verticesEnd; dVar11 = floor((double)local_120); @@ -6404,10 +6404,10 @@ LAB_0097b218: verticesEnd = local_138 + 2; } pvVar12 = (this->_homingLaser)._samples._begin; - local_134 = (*(float *)((char *)pvVar12 + (int)fVar8 * 8 + 0xc) - 140.0) * 0.65 + + local_134 = (*(float *)((char *)pvVar12 + GHIDRA_INT(fVar8) * 8 + 0xc) - 140.0) * 0.65 + (g_screenHeight - 182.0) * 0.5; local_12c = (int *)(g_displayPixelRatio * g_screenPointScale); - local_120 = ((*(float *)((char *)pvVar12 + (int)fVar8 * 8 + 8) - 60.0) * 0.65 + + local_120 = ((*(float *)((char *)pvVar12 + GHIDRA_INT(fVar8) * 8 + 8) - 60.0) * 0.65 + (g_screenWidth - 338.0) * 0.5) * (float)local_12c + 0.5; local_138 = verticesEnd; dVar11 = floor((double)local_120); @@ -6426,10 +6426,10 @@ LAB_0097b218: verticesEnd = local_138 + 2; } pvVar12 = (this->_homingLaser)._samples._begin; - local_134 = (*(float *)((char *)pvVar12 + (int)fVar8 * 8 + 0xc) - 140.0) * 0.65 + + local_134 = (*(float *)((char *)pvVar12 + GHIDRA_INT(fVar8) * 8 + 0xc) - 140.0) * 0.65 + (g_screenHeight - 182.0) * 0.5; local_12c = (int *)(g_displayPixelRatio * g_screenPointScale); - local_120 = ((*(float *)((char *)pvVar12 + (int)fVar8 * 8 + 8) - 60.0) * 0.65 + + local_120 = ((*(float *)((char *)pvVar12 + GHIDRA_INT(fVar8) * 8 + 8) - 60.0) * 0.65 + (g_screenWidth - 338.0) * 0.5) * (float)local_12c + 0.5; local_138 = verticesEnd; dVar11 = floor((double)local_120); @@ -6448,9 +6448,9 @@ LAB_0097b218: verticesEnd = local_138 + 2; } local_12c = (this->_homingLaser)._samples._begin; - local_13c = (float)((int)local_13c + 1); + local_13c = (float)(GHIDRA_INT(local_13c) + 1); local_138 = verticesEnd; - } while ((uint)local_13c < ((int)(this->_homingLaser)._samples._end - (int)local_12c >> 3) - 1U) + } while (GHIDRA_UINT(local_13c) < (GHIDRA_INT((this->_homingLaser)._samples._end) - GHIDRA_INT(local_12c) >> 3) - 1U) ; } iVar6 = this->_subtype; @@ -6479,17 +6479,17 @@ LAB_00979179: g_graphicsManager_blendMode[4] = layer->_blendMode[4]; FUN_00682260(); pfVar3 = verticesBegin; - local_138 = (float *)((int)local_138 - (int)verticesBegin); - if (((uint)local_138 & 0x18) != 0) { + local_138 = (float *)(GHIDRA_INT(local_138) - GHIDRA_INT(verticesBegin)); + if ((GHIDRA_UINT(local_138) & 0x18) != 0) { KAGE_LogMessage(0x10,(byte *)"Vertices size is not a multiple of 4.\n"); } - local_138 = (float *)((int)local_138 >> 3); + local_138 = (float *)(GHIDRA_INT(local_138) >> 3); local_120 = 0.0; if (local_138 != (float *)0x0) { pfVar3 = pfVar3 + 0xb; - local_124 = (AnimationState *)((float)frameCopy._0_4_ + (float)frameCopy._8_4_); + local_124 = (AnimationState *)((*(undefined4 *)((char *)&((float)frameCopy) + 0x0)) + (*(undefined4 *)((char *)&((float)frameCopy) + 0x8))); do { - if ((uint)local_120 < (uint)((int)local_138 + -4)) { + if (GHIDRA_UINT(local_120) < GHIDRA_UINT((GHIDRA_INT(local_138) + -4))) { pfVar3[-7] = (pfVar3[-3] + pfVar3[-7]) * 0.5; pfVar3[-6] = (pfVar3[-2] + pfVar3[-6]) * 0.5; pfVar3[-5] = (pfVar3[-1] + pfVar3[-5]) * 0.5; @@ -6521,8 +6521,8 @@ LAB_00979179: maskedTearFlags = BitSet128::operator_and(&tmpTearFlags,&this->_tearFlags,&g_tearFlagGrow); fVar8 = local_19c; segmentCorner0Y = (float)local_164; - if (((!((int)maskedTearFlags->_l == 0 && *(int *)((int)&maskedTearFlags->_l + 4) == 0)) || - (!((int)maskedTearFlags->_h == 0 && *(int *)((int)&maskedTearFlags->_h + 4) == 0))) && + if (((!(GHIDRA_INT(maskedTearFlags->_l) == 0 && *(int *)(GHIDRA_INT(&maskedTearFlags->_l) + 4) == 0)) || + (!(GHIDRA_INT(maskedTearFlags->_h) == 0 && *(int *)(GHIDRA_INT(&maskedTearFlags->_h) + 4) == 0))) && ((iVar6 = this->_subtype, iVar6 != 1 && ((iVar6 != 2 && (iVar6 != 3)))))) { local_154 = 1.0; local_180.y = local_190 / 1000.0; @@ -6552,8 +6552,8 @@ LAB_00979179: fVar10 = local_16c; maskedTearFlags = BitSet128::operator_and((BitSet128 *)&local_250,&this->_tearFlags,&g_tearFlagShrink); - if (((((int)maskedTearFlags->_l == 0 && *(int *)((int)&maskedTearFlags->_l + 4) == 0) && - ((int)maskedTearFlags->_h == 0 && *(int *)((int)&maskedTearFlags->_h + 4) == 0)) || + if ((((GHIDRA_INT(maskedTearFlags->_l) == 0 && *(int *)(GHIDRA_INT(&maskedTearFlags->_l) + 4) == 0) && + (GHIDRA_INT(maskedTearFlags->_h) == 0 && *(int *)(GHIDRA_INT(&maskedTearFlags->_h) + 4) == 0)) || (iVar6 = this->_subtype, iVar6 == 1)) || ((iVar6 == 2 || (iVar6 == 3)))) { fVar10 = local_194; } @@ -6584,12 +6584,12 @@ LAB_00979179: uv2Y = (float)local_12c + local_190; uv1Y = local_190; uv0Y = local_190; - uv2X = (float)frameCopy._0_4_; + uv2X = (*(undefined4 *)((char *)&((float)frameCopy) + 0x0)); uv3X = (float)local_124; local_220 = 1; if ((this->_sprite)._flipX != 0) { uv2X = (float)local_124; - uv3X = (float)frameCopy._0_4_; + uv3X = (*(undefined4 *)((char *)&((float)frameCopy) + 0x0)); } uv0X = uv2X; uv1X = uv3X; @@ -6629,7 +6629,7 @@ LAB_00979179: local_208._colorize[1] = (this->_sprite)._color._colorize[1]; local_208._colorize[2] = (this->_sprite)._color._colorize[2]; local_208._colorize[3] = (this->_sprite)._color._colorize[3]; - local_208._offset._0_8_ = *(undefined8 *)(this->_sprite)._color._offset; + (*(undefined8 *)((char *)&(local_208._offset) + 0x0)) = *(undefined8 *)(this->_sprite)._color._offset; pvVar12 = (void *)0x979aab; ((Color *)(&local_208))->Color::__mul(other); shaderColor._offset[2] = local_208._offset[2]; @@ -6645,10 +6645,10 @@ LAB_00979179: shaderColor._offset[1] = local_208._offset[1]; if (shaderMode == 2) { uVar5 = g_game->_frameCount & 0x800000ff; - if ((int)uVar5 < 0) { + if (GHIDRA_INT(uVar5) < 0) { uVar5 = (uVar5 - 1 | 0xffffff00) + 1; } - shaderColor._colorize[3] = (float)(int)uVar5 * 0.00390625; + shaderColor._colorize[3] = (float)GHIDRA_INT(uVar5) * 0.00390625; } vertexColor._red = local_208._tint[0]; vertexColor._green = local_208._tint[1]; @@ -6659,22 +6659,22 @@ LAB_00979179: apply_sprite_shader_params(&shaderColor,1,pvVar12,other); (**(code **)(*(int *)local_1b0.x + 0x14))(); pfVar3 = pfVar3 + 8; - local_120 = (float)((int)local_120 + 4); - } while ((uint)local_120 < local_138); + local_120 = (float)(GHIDRA_INT(local_120) + 4); + } while (GHIDRA_UINT(local_120) < local_138); pfVar3 = verticesBegin; } - if ((1 < (uint)(this->_sprite)._layerCount) && (this->_subtype == 0)) { + if ((1 < GHIDRA_UINT((this->_sprite)._layerCount)) && (this->_subtype == 0)) { layerFrame = ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::GetLayerFrame(0); if (layerFrame == (AnimationState *)0x0) { warnMessage = "[warn] Laser::Render current frame is NULL\n"; KAGE_LogMessage(1,(byte *)"[warn] Laser::Render current frame is NULL\n"); - shader_cache_find((int)warnMessage); + shader_cache_find(GHIDRA_INT(warnMessage)); FUN_0040c440(); if (pfVar3 == (float *)0x0) { ExceptionList = local_10; return; } - uVar5 = (int)verticesCapacity - (int)pfVar3 & 0xfffffff8; + uVar5 = GHIDRA_INT(verticesCapacity) - GHIDRA_INT(pfVar3) & 0xfffffff8; pfVar4 = pfVar3; if (uVar5 < 0x1000) { LAB_00979c35: @@ -6684,7 +6684,7 @@ LAB_00979c35: } pfVar4 = (float *)pfVar3[-1]; uVar5 = uVar5 + 0x23; - if ((uint)((int)pfVar3 + (-4 - (int)pfVar4)) < 0x20) goto LAB_00979c35; + if (GHIDRA_UINT((GHIDRA_INT(pfVar3) + (-4 - GHIDRA_INT(pfVar4)))) < 0x20) goto LAB_00979c35; goto LAB_0097a2b3; } ((AnimationState *)((AnimationState *)frameCopy))->AnimationState::copy_assign(layerFrame); @@ -6697,20 +6697,20 @@ LAB_00979c35: ((Vector *)(&local_148))->Vector::Normalized(&local_180); local_13c = -local_180.x; fVar8 = 0.5; - local_130 = (float)frameCopy._8_4_ * 0.5; - local_124 = (AnimationState *)((this->_pos).x + local_180.x * (float)frameCopy._20_4_); - local_12c = (int *)((this->_pos).y + local_180.y * (float)frameCopy._20_4_); + local_130 = (*(undefined4 *)((char *)&((float)frameCopy) + 0x8)) * 0.5; + local_124 = (AnimationState *)((this->_pos).x + local_180.x * (*(undefined4 *)((char *)&((float)frameCopy) + 0x14))); + local_12c = (int *)((this->_pos).y + local_180.y * (*(undefined4 *)((char *)&((float)frameCopy) + 0x14))); if (0 < *(int *)&(*(undefined1 *)((char *)(this) + 0x4f0))) { local_12c = (int *)((float)local_12c - (this->_posOffset).y); } - local_208._colorize[3] = (float)frameCopy._12_4_ + (float)frameCopy._4_4_; - local_208._colorize[2] = (float)frameCopy._0_4_; - local_208._tint[3] = (float)frameCopy._4_4_ + 0.01; - local_208._offset[2] = (float)CONCAT31(local_208._offset[2]._1_3_,1); - local_208._colorize[0] = (float)frameCopy._0_4_ + (float)frameCopy._8_4_; + local_208._colorize[3] = (*(undefined4 *)((char *)&((float)frameCopy) + 0xc)) + (*(undefined4 *)((char *)&((float)frameCopy) + 0x4)); + local_208._colorize[2] = (*(undefined4 *)((char *)&((float)frameCopy) + 0x0)); + local_208._tint[3] = (*(undefined4 *)((char *)&((float)frameCopy) + 0x4)) + 0.01; + local_208._offset[2] = (float)CONCAT31((*(undefined1 *)((char *)&(local_208._offset[2]) + 0x1)),1); + local_208._colorize[0] = (*(undefined4 *)((char *)&((float)frameCopy) + 0x0)) + (*(undefined4 *)((char *)&((float)frameCopy) + 0x8)); if ((this->_sprite)._flipX != 0) { - local_208._colorize[0] = (float)frameCopy._0_4_; - local_208._colorize[2] = (float)((float)frameCopy._0_4_ + (float)frameCopy._8_4_); + local_208._colorize[0] = (*(undefined4 *)((char *)&((float)frameCopy) + 0x0)); + local_208._colorize[2] = (float)((*(undefined4 *)((char *)&((float)frameCopy) + 0x0)) + (*(undefined4 *)((char *)&((float)frameCopy) + 0x8))); } local_208._offset[1] = local_208._colorize[3]; local_208._offset[0] = local_208._colorize[0]; @@ -6752,28 +6752,28 @@ LAB_00979c35: FUN_004072e0(); if (shaderMode == 2) { uVar5 = g_game->_frameCount & 0x800000ff; - if ((int)uVar5 < 0) { + if (GHIDRA_INT(uVar5) < 0) { uVar5 = (uVar5 - 1 | 0xffffff00) + 1; } - shaderColor._colorize[3] = (float)(int)uVar5 * 0.00390625; + shaderColor._colorize[3] = (float)GHIDRA_INT(uVar5) * 0.00390625; } local_254 = shaderColor._tint[0]; local_250 = shaderColor._tint[1]; local_24c = (void *)shaderColor._tint[2]; local_248 = shaderColor._tint[3] * alphaMultiplier; local_244 = 0; - uVar13._0_4_ = 1.3925265e-38; - uVar13._4_4_ = 0.0; + (*(undefined4 *)((char *)&(uVar13) + 0x0)) = 1.3925265e-38; + (*(undefined4 *)((char *)&(uVar13) + 0x4)) = 0.0; layer = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer((byte *)0x0); ((LayerState *)(layer))->LayerState::GetTexture(auStack_30a + -10); apply_sprite_shader_params(&shaderColor,1,(void *)uVar13,SUB84(uVar13,4)); layer = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer((byte *)0x0); texture = ((LayerState *)(layer))->LayerState::GetTexture(&local_148); - local_8 = (float)CONCAT31(local_8._1_3_,3); + local_8 = (float)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); (**(code **)(*(int *)*texture + 0x14))(); FUN_0040c440(); } - local_8 = (float)CONCAT31(local_8._1_3_,4); + local_8 = (float)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),4); if ((((int *)local_1b0.y != (int *)0x0) && (cVar2 = (**(code **)(*(int *)local_1b0.y + 0xc))(), cVar2 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { @@ -6781,12 +6781,12 @@ LAB_00979c35: } local_8 = -NAN; if (pfVar3 != (float *)0x0) { - uVar5 = (int)verticesCapacity - (int)pfVar3 & 0xfffffff8; + uVar5 = GHIDRA_INT(verticesCapacity) - GHIDRA_INT(pfVar3) & 0xfffffff8; pfVar4 = pfVar3; if (0xfff < uVar5) { pfVar4 = (float *)pfVar3[-1]; uVar5 = uVar5 + 0x23; - if (0x1f < (uint)((int)pfVar3 + (-4 - (int)pfVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pfVar3) + (-4 - GHIDRA_INT(pfVar4))))) { LAB_0097a2b3: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -6826,16 +6826,16 @@ LAB_0097b24c: if (this->_sampleLaser != 0) { pfVar3 = (this->_homingLaser)._samples._begin; local_12c = (int *)0x0; - if ((int)(this->_homingLaser)._samples._end - (int)pfVar3 >> 3 != 0) { + if (GHIDRA_INT((this->_homingLaser)._samples._end) - GHIDRA_INT(pfVar3) >> 3 != 0) { do { local_120 = g_displayPixelRatio * g_screenPointScale; local_124 = (AnimationState *) - (((g_screenWidth - 338.0) * 0.5 + (pfVar3[(int)local_12c * 2] - 60.0) * 0.65) + (((g_screenWidth - 338.0) * 0.5 + (pfVar3[GHIDRA_INT(local_12c) * 2] - 60.0) * 0.65) * local_120 + 0.5); dVar11 = floor((double)(float)local_124); local_130 = (float)dVar11 / local_120; local_124 = (AnimationState *) - (((pfVar3[(int)local_12c * 2 + 1] - 140.0) * 0.65 + + (((pfVar3[GHIDRA_INT(local_12c) * 2 + 1] - 140.0) * 0.65 + (g_screenHeight - 182.0) * 0.5) * local_120 + 0.5); dVar11 = floor((double)(float)local_124); fVar8 = (float)dVar11 / local_120; @@ -6867,8 +6867,8 @@ LAB_0097b24c: *(float *)(extraout_EAX_00 + 0x5c) = *(float *)(extraout_EAX_00 + 0x5c) - 1.0; } pfVar3 = (this->_homingLaser)._samples._begin; - local_12c = (int *)((int)local_12c + 1); - } while (local_12c < (uint)((int)(this->_homingLaser)._samples._end - (int)pfVar3 >> 3)); + local_12c = (int *)(GHIDRA_INT(local_12c) + 1); + } while (local_12c < GHIDRA_UINT((GHIDRA_INT((this->_homingLaser)._samples._end) - GHIDRA_INT(pfVar3) >> 3))); } local_154 = this->_angleDegrees * 0.017453292; local_130 = g_displayPixelRatio * g_screenPointScale; @@ -6971,19 +6971,19 @@ void Entity_Laser::UpdateHits() local_14 = 0xffffffff; puStack_18 = &LAB_00b0cbe8; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(local_38 + 0x28); + local_24 = __security_cookie ^ GHIDRA_UINT((local_38 + 0x28)); ExceptionList = &local_1c; savedLaser = this; refresh_tear_params(this,local_24); bVar4 = this->_isFirstUpdate; if ((bVar4 != 0) || (this->_oneHit == 0)) { - uVar1 = *(undefined4 *)((int)&(this->_tearFlags)._l + 4); + uVar1 = *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); qVar3 = (this->_tearFlags)._h; - uVar2 = *(undefined4 *)((int)&(this->_tearFlags)._h + 4); - *(int *)&(this->_activeTearFlags)._l = (int)(this->_tearFlags)._l; - *(undefined4 *)((int)&(this->_activeTearFlags)._l + 4) = uVar1; - *(int *)&(this->_activeTearFlags)._h = (int)qVar3; - *(undefined4 *)((int)&(this->_activeTearFlags)._h + 4) = uVar2; + uVar2 = *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); + *(int *)&(this->_activeTearFlags)._l = GHIDRA_INT((this->_tearFlags)._l); + *(undefined4 *)(GHIDRA_INT(&(this->_activeTearFlags)._l) + 4) = uVar1; + *(int *)&(this->_activeTearFlags)._h = GHIDRA_INT(qVar3); + *(undefined4 *)(GHIDRA_INT(&(this->_activeTearFlags)._h) + 4) = uVar2; } if ((((this->_dead == 0) && (this->_isInterpolating == 0)) && (this->_variant != 8)) && ((bVar4 != 0 || (iVar5 = ((Entity *)((Entity *)this))->Entity::GetIntervalTicks(2.0,0.0), iVar5 != 0)))) { @@ -7016,8 +7016,8 @@ void Entity_Laser::UpdateHits() } fVar12 = radius; maskedFlags = BitSet128::operator_and((BitSet128 *)local_98,&this->_tearFlags,&g_tearFlagPulse); - if (((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) { + if ((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) { fVar12 = sin(this->_updateTime * 0.1); fVar12 = fVar12 * 20.0 + radius; radius = fVar12; @@ -7047,8 +7047,8 @@ LAB_0097c1bc: local_14 = 0; ((std::string *)(local_50 + 0x10))->std::string::append(&DAT_00b61844,4); local_54 = local_50 + 0x10; - if (&DAT_0000000f < (uint)local_38._12_4_) { - local_54 = (byte *)local_50._16_4_; + if (&DAT_0000000f < (*(undefined4 *)((char *)&(GHIDRA_UINT(local_38)) + 0xc))) { + local_54 = (*(undefined4 *)((char *)&((byte *)local_50) + 0x10)); } pbVar6 = (this->_sprite)._animState._animData; if (pbVar6 == (byte *)0x0) { @@ -7070,7 +7070,7 @@ LAB_0097c25f: bVar11 = bVar4 < *wantedAnimChar; if (bVar4 != *wantedAnimChar) { LAB_0097c244: - uVar7 = -(uint)bVar11 | 1; + uVar7 = -GHIDRA_UINT(bVar11) | 1; goto LAB_0097c249; } if (bVar4 == 0) break; @@ -7083,22 +7083,22 @@ LAB_0097c244: uVar7 = 0; LAB_0097c249: if ((uVar7 != 0) || - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) != '\0' && + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) != '\0' && ((this->_sprite)._animState._isPlaying == 0)))) goto LAB_0097c25f; } local_14 = 0xffffffff; - if (&DAT_0000000f < (uint)local_38._12_4_) { - puVar8 = (undefined1 *)(local_38._12_4_ + 1); - pbVar6 = (byte *)local_50._16_4_; + if (&DAT_0000000f < (*(undefined4 *)((char *)&(GHIDRA_UINT(local_38)) + 0xc))) { + puVar8 = (undefined1 *)((*(undefined4 *)((char *)&(local_38) + 0xc)) + 1); + pbVar6 = (*(undefined4 *)((char *)&((byte *)local_50) + 0x10)); if ((undefined1 *)0xfff < puVar8) { - pbVar6 = *(byte **)(local_50._16_4_ + -4); - puVar8 = (undefined1 *)(local_38._12_4_ + 0x24); - if ((byte *)0x1f < (byte *)(local_50._16_4_ + (-4 - (int)pbVar6))) { + pbVar6 = *(byte **)((*(undefined4 *)((char *)&(local_50) + 0x10)) + -4); + puVar8 = (undefined1 *)((*(undefined4 *)((char *)&(local_38) + 0xc)) + 0x24); + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(local_50) + 0x10)) + (-4 - GHIDRA_INT(pbVar6)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(pbVar6,(uint)puVar8); + operator_delete(pbVar6,GHIDRA_UINT(puVar8)); } animData = (this->_sprite)._animState._animData; } @@ -7109,8 +7109,8 @@ LAB_0097c249: } else { maskedFlags = BitSet128::operator_and((BitSet128 *)local_78,&this->_tearFlags,&g_tearFlagGrow); - if (((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) { + if ((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) { if (ownerPlayer == (EntityPtr)0x0) { local_54 = (byte *)0x0; } @@ -7130,8 +7130,8 @@ LAB_0097c249: fVar13 = 500.0; maskedFlags = BitSet128::operator_and((BitSet128 *)local_38,&this->_tearFlags,&g_tearFlagShrink) ; - if ((!((int)maskedFlags->_l == 0 && *(int *)((int)&maskedFlags->_l + 4) == 0)) || - (!((int)maskedFlags->_h == 0 && *(int *)((int)&maskedFlags->_h + 4) == 0))) { + if ((!(GHIDRA_INT(maskedFlags->_l) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) == 0)) || + (!(GHIDRA_INT(maskedFlags->_h) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) == 0))) { if (ownerPlayer == (EntityPtr)0x0) { local_54 = (byte *)0x0; } @@ -7178,12 +7178,12 @@ LAB_0097c249: Room::GetClampedPositionImpl(g_game->_room,&local_70,pos,radius,radius,radius,radius); maskedFlags = BitSet128::operator_and((BitSet128 *)local_38,&this->_tearFlags,&g_tearFlagBounce) ; - if (((int)maskedFlags->_l == 0 && *(int *)((int)&maskedFlags->_l + 4) == 0) && - ((int)maskedFlags->_h == 0 && *(int *)((int)&maskedFlags->_h + 4) == 0)) { + if ((GHIDRA_INT(maskedFlags->_l) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) == 0) && + (GHIDRA_INT(maskedFlags->_h) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) == 0)) { maskedFlags = BitSet128::operator_and ((BitSet128 *)local_38,&this->_tearFlags,&g_tearFlagContinuum); - if (((int)maskedFlags->_l == 0 && *(int *)((int)&maskedFlags->_l + 4) == 0) && - ((int)maskedFlags->_h == 0 && *(int *)((int)&maskedFlags->_h + 4) == 0)) { + if ((GHIDRA_INT(maskedFlags->_l) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) == 0) && + (GHIDRA_INT(maskedFlags->_h) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) == 0)) { local_80.y = local_70.x - pos->x; local_54 = (byte *)(local_70.y - (this->_pos).y); fVar12 = sqrtf(local_80.y * local_80.y + (float)local_54 * (float)local_54); @@ -7214,21 +7214,21 @@ LAB_0097c249: pos->x = local_70.x; velocity->x = fVar12 * -1.0; maskedFlags = ((BitSet128 *)(&g_tearFlagBounce))->BitSet128::__bnot((BitSet128 *)local_38); - *(uint *)&(this->_tearFlags)._l = (uint)(this->_tearFlags)._l & (uint)maskedFlags->_l; - flagWord = (uint *)((int)&(this->_tearFlags)._l + 4); - *flagWord = *flagWord & *(uint *)((int)&maskedFlags->_l + 4); + *(uint *)&(this->_tearFlags)._l = GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(maskedFlags->_l); + flagWord = (uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); + *flagWord = *flagWord & *(uint *)(GHIDRA_INT(&maskedFlags->_l) + 4); pqVar9 = &(this->_tearFlags)._h; - *(uint *)pqVar9 = (uint)*pqVar9 & (uint)maskedFlags->_h; - flagWord = (uint *)((int)&(this->_tearFlags)._h + 4); - *flagWord = *flagWord & *(uint *)((int)&maskedFlags->_h + 4); + *(uint *)pqVar9 = GHIDRA_UINT(*pqVar9) & GHIDRA_UINT(maskedFlags->_h); + flagWord = (uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); + *flagWord = *flagWord & *(uint *)(GHIDRA_INT(&maskedFlags->_h) + 4); *(uint *)&(this->_heldTearFlags)._l = - (uint)(this->_heldTearFlags)._l | (uint)g_tearFlagBounce._l; - flagWord = (uint *)((int)&(this->_heldTearFlags)._l + 4); - *flagWord = *flagWord | g_tearFlagBounce._l._4_4_; + GHIDRA_UINT((this->_heldTearFlags)._l) | GHIDRA_UINT(g_tearFlagBounce._l); + flagWord = (uint *)(GHIDRA_INT(&(this->_heldTearFlags)._l) + 4); + *flagWord = *flagWord | (*(undefined4 *)((char *)&(g_tearFlagBounce._l) + 0x4)); pqVar9 = &(this->_heldTearFlags)._h; - *(uint *)pqVar9 = (uint)*pqVar9 | (uint)g_tearFlagBounce._h; - flagWord = (uint *)((int)&(this->_heldTearFlags)._h + 4); - *flagWord = *flagWord | g_tearFlagBounce._h._4_4_; + *(uint *)pqVar9 = GHIDRA_UINT(*pqVar9) | GHIDRA_UINT(g_tearFlagBounce._h); + flagWord = (uint *)(GHIDRA_INT(&(this->_heldTearFlags)._h) + 4); + *flagWord = *flagWord | (*(undefined4 *)((char *)&(g_tearFlagBounce._h) + 0x4)); } fVar12 = (this->_pos).y; clampedValue = &(this->_velocity).y; @@ -7237,21 +7237,21 @@ LAB_0097c249: (this->_pos).y = local_70.y; *clampedValue = fVar13 * -1.0; maskedFlags = ((BitSet128 *)(&g_tearFlagBounce))->BitSet128::__bnot((BitSet128 *)local_38); - *(uint *)&(this->_tearFlags)._l = (uint)(this->_tearFlags)._l & (uint)maskedFlags->_l; - flagWord = (uint *)((int)&(this->_tearFlags)._l + 4); - *flagWord = *flagWord & *(uint *)((int)&maskedFlags->_l + 4); + *(uint *)&(this->_tearFlags)._l = GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(maskedFlags->_l); + flagWord = (uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); + *flagWord = *flagWord & *(uint *)(GHIDRA_INT(&maskedFlags->_l) + 4); pqVar9 = &(this->_tearFlags)._h; - *(uint *)pqVar9 = (uint)*pqVar9 & (uint)maskedFlags->_h; - flagWord = (uint *)((int)&(this->_tearFlags)._h + 4); - *flagWord = *flagWord & *(uint *)((int)&maskedFlags->_h + 4); + *(uint *)pqVar9 = GHIDRA_UINT(*pqVar9) & GHIDRA_UINT(maskedFlags->_h); + flagWord = (uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); + *flagWord = *flagWord & *(uint *)(GHIDRA_INT(&maskedFlags->_h) + 4); *(uint *)&(this->_heldTearFlags)._l = - (uint)(this->_heldTearFlags)._l | (uint)g_tearFlagBounce._l; - flagWord = (uint *)((int)&(this->_heldTearFlags)._l + 4); - *flagWord = *flagWord | g_tearFlagBounce._l._4_4_; + GHIDRA_UINT((this->_heldTearFlags)._l) | GHIDRA_UINT(g_tearFlagBounce._l); + flagWord = (uint *)(GHIDRA_INT(&(this->_heldTearFlags)._l) + 4); + *flagWord = *flagWord | (*(undefined4 *)((char *)&(g_tearFlagBounce._l) + 0x4)); pqVar9 = &(this->_heldTearFlags)._h; - *(uint *)pqVar9 = (uint)*pqVar9 | (uint)g_tearFlagBounce._h; - flagWord = (uint *)((int)&(this->_heldTearFlags)._h + 4); - *flagWord = *flagWord | g_tearFlagBounce._h._4_4_; + *(uint *)pqVar9 = GHIDRA_UINT(*pqVar9) | GHIDRA_UINT(g_tearFlagBounce._h); + flagWord = (uint *)(GHIDRA_INT(&(this->_heldTearFlags)._h) + 4); + *flagWord = *flagWord | (*(undefined4 *)((char *)&(g_tearFlagBounce._h) + 0x4)); } } LAB_0097c1af: @@ -7271,7 +7271,7 @@ LAB_0097c301: clampedValue = (float *)timeout; } (this->_sprite)._color._tint[3] = - ((float)(int)*clampedValue * (this->_sprite)._color._tint[3]) / 5.0; + ((float)GHIDRA_INT(*clampedValue) * (this->_sprite)._color._tint[3]) / 5.0; } *timeout = iVar5 + -1; if (iVar5 + -1 < 1) { @@ -7305,7 +7305,7 @@ LAB_0097c3ac: spriteColor = &(this->_sprite)._color; fadeColor._offset[1] = 0.0; fadeColor._offset[2] = 0.0; - fadeColor._tint[3] = (float)(int)*clampedValue / 20.0; + fadeColor._tint[3] = (float)GHIDRA_INT(*clampedValue) / 20.0; if (spriteColor != &fadeColor) { (this->_sprite)._color._colorize[0] = 0.0; (this->_sprite)._color._colorize[1] = 0.0; @@ -7325,8 +7325,8 @@ LAB_0097c3ac: fVar12 = radius; maskedFlags = BitSet128::operator_and ((BitSet128 *)local_38,&this->_tearFlags,&g_tearFlagContinuum); - if (((int)maskedFlags->_l == 0 && *(int *)((int)&maskedFlags->_l + 4) == 0) && - ((int)maskedFlags->_h == 0 && *(int *)((int)&maskedFlags->_h + 4) == 0)) { + if ((GHIDRA_INT(maskedFlags->_l) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) == 0) && + (GHIDRA_INT(maskedFlags->_h) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) == 0)) { Room::GetClampedPositionImpl(g_game->_room,&local_70,&this->_pos,fVar12,fVar12,fVar12,fVar12); (this->_pos).x = local_70.x; (this->_pos).y = local_70.y; @@ -7351,8 +7351,8 @@ LAB_0097c3ac: if (this->_isInterpolating == 0) { maskedFlags = BitSet128::operator_and ((BitSet128 *)local_38,&this->_tearFlags,&g_tearFlagContinuum); - if ((int)maskedFlags->_l == 0 && *(int *)((int)&maskedFlags->_l + 4) == 0) { - if ((int)maskedFlags->_h == 0 && *(int *)((int)&maskedFlags->_h + 4) == 0) { + if (GHIDRA_INT(maskedFlags->_l) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) == 0) { + if (GHIDRA_INT(maskedFlags->_h) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) == 0) { if (this->_subtype != 3) { local_70.x = this->_friction * (this->_velocity).x + fVar12; local_70.y = this->_friction * (this->_velocity).y + fVar13; @@ -7361,7 +7361,7 @@ LAB_0097c3ac: ; EVar10 = this->_child; fVar13 = local_8c; - fVar12 = (float)local_98._8_4_; + fVar12 = (*(undefined4 *)((char *)&((float)local_98) + 0x8)); } } } @@ -7378,8 +7378,8 @@ LAB_0097c3ac: *(float *)((char *)EVar10 + 0x350) = (this->_posOffset).y; } maskedFlags = BitSet128::operator_and((BitSet128 *)local_38,&this->_tearFlags,&g_tearFlagHoming); - if (((int)maskedFlags->_l == 0 && *(int *)((int)&maskedFlags->_l + 4) == 0) && - ((int)maskedFlags->_h == 0 && *(int *)((int)&maskedFlags->_h + 4) == 0)) { + if ((GHIDRA_INT(maskedFlags->_l) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) == 0) && + (GHIDRA_INT(maskedFlags->_h) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) == 0)) { iVar5 = 0; } else { @@ -7391,8 +7391,8 @@ LAB_0097c3ac: ((HomingLaser *)(this_00))->HomingLaser::CalculateSamples((float)local_54); ((HomingLaser *)(this_00))->HomingLaser::remove_collinear_samples(0.001); maskedFlags = BitSet128::operator_and((BitSet128 *)local_38,&this->_tearFlags,&g_tearFlagWiggle); - if (((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) { + if ((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) { if ((this->_parent == (EntityPtr)0x0) || (*(int *)((char *)this->_parent + 0x28) != 8)) { if (ownerPlayer == (EntityPtr)0x0) { fVar12 = local_60; @@ -7423,7 +7423,7 @@ LAB_0097c3ac: if ((((this->_dead == 0) && (this->_isInterpolating == 0)) && (this->_variant == 8)) && (iVar5 = ((Entity *)((Entity *)this))->Entity::GetIntervalTicks(30.0,0.0), iVar5 != 0)) { EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)local_98,&this->_pos, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)local_98,&this->_pos, this->_radius,8); local_14 = 1; local_54 = (byte *)0x0; @@ -7431,20 +7431,20 @@ LAB_0097c3ac: do { pbVar6 = local_54; bVar4 = Entity::IsVulnerableEnemy - (*(Entity **)(local_98._4_4_ + (int)local_54 * 4),(Entity *)0x0); + (*(Entity **)((*(undefined4 *)((char *)&(local_98) + 0x4)) + GHIDRA_INT(local_54) * 4),(Entity *)0x0); if (bVar4 != 0) { bVar4 = Entity::IsDescendantOf - ((Entity *)this,*(Entity **)(local_98._4_4_ + (int)pbVar6 * 4)); + ((Entity *)this,*(Entity **)((*(undefined4 *)((char *)&(local_98) + 0x4)) + GHIDRA_INT(pbVar6) * 4)); if (bVar4 == 0) { - takeDamageFn = *(code **)(**(int **)(local_98._4_4_ + (int)pbVar6 * 4) + 0x20); + takeDamageFn = *(code **)(**(int **)((*(undefined4 *)((char *)&(local_98) + 0x4)) + GHIDRA_INT(pbVar6) * 4) + 0x20); ((EntityRef *)((EntityRef *)local_50))->EntityRef::constructor((Entity *)savedLaser); (*takeDamageFn)(savedLaser->_collisionDamage,0,0,local_50,0x1e); this = savedLaser; pbVar6 = local_54; } } - local_54 = (byte *)((int)pbVar6 + 1); - } while (local_54 < (uint)local_8c); + local_54 = (byte *)(GHIDRA_INT(pbVar6) + 1); + } while (local_54 < GHIDRA_UINT(local_8c)); } local_14 = 0xffffffff; if (local_98[0] == '\0') { @@ -7452,14 +7452,14 @@ LAB_0097c3ac: pqVar9 = &g_allocatedBytesNoHeap; } else { - pqVar9 = (qword *)((int)g_mainHeap + 0x30); + pqVar9 = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } - if ((void *)local_98._4_4_ != (void *)0x0) { - uVar7 = *(uint *)(local_98._4_4_ + -4); + if ((*(undefined4 *)((char *)&((void *)local_98) + 0x4)) != (void *)0x0) { + uVar7 = *(uint *)((*(undefined4 *)((char *)&(local_98) + 0x4)) + -4); qVar3 = *pqVar9; - *(uint *)pqVar9 = (uint)*pqVar9 - uVar7; - *(uint *)((char *)pqVar9 + 4) = *(uint *)((char *)pqVar9 + 4) - (uint)((uint)qVar3 < uVar7); - free((void *)(local_98._4_4_ + -4)); + *(uint *)pqVar9 = GHIDRA_UINT(*pqVar9) - uVar7; + *(uint *)((char *)pqVar9 + 4) = *(uint *)((char *)pqVar9 + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar3) < uVar7)); + free((void *)((*(undefined4 *)((char *)&(local_98) + 0x4)) + -4)); } local_14 = 0xffffffff; } @@ -7574,7 +7574,7 @@ byte Entity_Laser::RenderShadowLayer(Vector *offset) local_8 = -NAN; puStack_c = &LAB_00b0cc46; local_10 = ExceptionList; - stackCookie = __security_cookie ^ (uint)(&shaderColor)[1]._colorize; + stackCookie = __security_cookie ^ GHIDRA_UINT((&shaderColor)[1]._colorize); if (this->_visible == 0) { return 1; } @@ -7622,8 +7622,8 @@ byte Entity_Laser::RenderShadowLayer(Vector *offset) ExceptionList = local_10; return 1; } - layerName = (byte *)(uint)(1 < (uint)(this->_sprite)._layerCount); - layerFrame = ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::GetLayerFrame((int)layerName); + layerName = (byte *)GHIDRA_UINT((1 < GHIDRA_UINT((this->_sprite)._layerCount))); + layerFrame = ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::GetLayerFrame(GHIDRA_INT(layerName)); if (layerFrame == (AnimationState *)0x0) { KAGE_LogMessage(1,(byte *)"[warn] Laser::Render current laser frame is NULL\n"); ExceptionList = local_10; @@ -7643,25 +7643,25 @@ byte Entity_Laser::RenderShadowLayer(Vector *offset) layer->_wrapTMode = 0; layer = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer((byte *)0x0); ((LayerState *)(layer))->LayerState::GetTexture(&shadowTexture); - local_8 = (float)CONCAT31(local_8._1_3_,2); + local_8 = (float)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); local_b4 = (this->_homingLaser)._samples._begin; offsetX = (this->_posOffset).x * 0.65; - local_100 = (float)frameCopy._8_4_ * 0.5; + local_100 = (*(undefined4 *)((char *)&((float)frameCopy) + 0x8)) * 0.5; local_f0 = 0.0; - if ((int)(this->_homingLaser)._samples._end - (int)local_b4 >> 3 != 1) { + if (GHIDRA_INT((this->_homingLaser)._samples._end) - GHIDRA_INT(local_b4) >> 3 != 1) { local_ec = -local_100; do { pfVar3 = pointsEnd; - VStack_f8.y = (float)((int)local_f0 * 8); - local_b8 = *(float *)((char *)local_b4 + (int)local_f0 * 8 + 8) - - *(float *)((char *)local_b4 + (int)VStack_f8.y); - local_bc = *(float *)((char *)local_b4 + (int)VStack_f8.y + 0xc) - - *(float *)((char *)local_b4 + (int)VStack_f8.y + 4); + VStack_f8.y = (float)(GHIDRA_INT(local_f0) * 8); + local_b8 = *(float *)((char *)local_b4 + GHIDRA_INT(local_f0) * 8 + 8) - + *(float *)((char *)local_b4 + GHIDRA_INT(VStack_f8.y)); + local_bc = *(float *)((char *)local_b4 + GHIDRA_INT(VStack_f8.y) + 0xc) - + *(float *)((char *)local_b4 + GHIDRA_INT(VStack_f8.y) + 4); fVar5 = sqrtf(local_bc * local_bc + local_b8 * local_b8); local_bc = local_bc / fVar5; local_b8 = -(local_b8 / fVar5); - pfVar4 = (float *)((int)local_b4 + (int)VStack_f8.y); - local_c0 = (*(float *)((char *)local_b4 + (int)VStack_f8.y + 4) - 140.0) * 0.65 + + pfVar4 = (float *)(GHIDRA_INT(local_b4) + GHIDRA_INT(VStack_f8.y)); + local_c0 = (*(float *)((char *)local_b4 + GHIDRA_INT(VStack_f8.y) + 4) - 140.0) * 0.65 + (g_screenHeight - 182.0) * 0.5; local_b4 = (void *)(g_displayPixelRatio * g_screenPointScale); local_b0 = ((*pfVar4 - 60.0) * 0.65 + (g_screenWidth - 338.0) * 0.5) * (float)local_b4 + 0.5; @@ -7683,7 +7683,7 @@ byte Entity_Laser::RenderShadowLayer(Vector *offset) pointsEnd = pfVar3 + 2; } pfVar4 = pointsEnd; - pfVar3 = (float *)((int)(this->_homingLaser)._samples._begin + (int)VStack_f8.y); + pfVar3 = (float *)(GHIDRA_INT((this->_homingLaser)._samples._begin) + GHIDRA_INT(VStack_f8.y)); local_c0 = (pfVar3[1] - 140.0) * 0.65 + (g_screenHeight - 182.0) * 0.5; local_b4 = (void *)(g_displayPixelRatio * g_screenPointScale); local_b0 = ((*pfVar3 - 60.0) * 0.65 + (g_screenWidth - 338.0) * 0.5) * (float)local_b4 + 0.5; @@ -7706,10 +7706,10 @@ byte Entity_Laser::RenderShadowLayer(Vector *offset) } pfVar4 = pointsEnd; samplesBegin = (this->_homingLaser)._samples._begin; - local_c0 = (*(float *)((char *)VStack_f8.y + 0xc + (int)samplesBegin) - 140.0) * 0.65 + + local_c0 = (*(float *)((char *)VStack_f8.y + 0xc + GHIDRA_INT(samplesBegin)) - 140.0) * 0.65 + (g_screenHeight - 182.0) * 0.5; local_b4 = (void *)(g_displayPixelRatio * g_screenPointScale); - local_b0 = ((*(float *)((char *)VStack_f8.y + 8 + (int)samplesBegin) - 60.0) * 0.65 + + local_b0 = ((*(float *)((char *)VStack_f8.y + 8 + GHIDRA_INT(samplesBegin)) - 60.0) * 0.65 + (g_screenWidth - 338.0) * 0.5) * (float)local_b4 + 0.5; dVar10 = floor((double)local_b0); local_d4 = (float)dVar10 / (float)local_b4; @@ -7728,11 +7728,11 @@ byte Entity_Laser::RenderShadowLayer(Vector *offset) } pfVar4 = pointsEnd; samplesBegin = (this->_homingLaser)._samples._begin; - iVar2 = (int)VStack_f8.y + 8; - VStack_f8.y = (*(float *)((char *)VStack_f8.y + 0xc + (int)samplesBegin) - 140.0) * 0.65 + + iVar2 = GHIDRA_INT(VStack_f8.y) + 8; + VStack_f8.y = (*(float *)((char *)VStack_f8.y + 0xc + GHIDRA_INT(samplesBegin)) - 140.0) * 0.65 + (g_screenHeight - 182.0) * 0.5; local_b4 = (void *)(g_displayPixelRatio * g_screenPointScale); - local_b0 = ((*(float *)(iVar2 + (int)samplesBegin) - 60.0) * 0.65 + + local_b0 = ((*(float *)(iVar2 + GHIDRA_INT(samplesBegin)) - 60.0) * 0.65 + (g_screenWidth - 338.0) * 0.5) * (float)local_b4 + 0.5; dVar10 = floor((double)local_b0); local_c0 = (float)dVar10 / (float)local_b4; @@ -7750,8 +7750,8 @@ byte Entity_Laser::RenderShadowLayer(Vector *offset) pointsEnd = pfVar4 + 2; } local_b4 = (this->_homingLaser)._samples._begin; - local_f0 = (float)((int)local_f0 + 1); - } while ((uint)local_f0 < ((int)(this->_homingLaser)._samples._end - (int)local_b4 >> 3) - 1U); + local_f0 = (float)(GHIDRA_INT(local_f0) + 1); + } while (GHIDRA_UINT(local_f0) < (GHIDRA_INT((this->_homingLaser)._samples._end) - GHIDRA_INT(local_b4) >> 3) - 1U); } iVar2 = this->_subtype; if (((iVar2 == 1) || (iVar2 == 2)) || (iVar2 == 3)) { @@ -7766,13 +7766,13 @@ byte Entity_Laser::RenderShadowLayer(Vector *offset) if ((DAT_00c7911c & 1) == 0) { shader = g_currentShader; } - fVar5 = (float)((int)pfVar4 - (int)points >> 3); + fVar5 = (float)(GHIDRA_INT(pfVar4) - GHIDRA_INT(points) >> 3); local_b0 = 0.0; g_currentShader = shader; if (fVar5 != 0.0) { pfVar4 = points + 0xb; do { - if ((uint)local_b0 < (int)fVar5 - 4U) { + if (GHIDRA_UINT(local_b0) < GHIDRA_INT(fVar5) - 4U) { pfVar4[-7] = (pfVar4[-3] + pfVar4[-7]) * 0.5; pfVar4[-6] = (pfVar4[-2] + pfVar4[-6]) * 0.5; pfVar4[-5] = (pfVar4[-1] + pfVar4[-5]) * 0.5; @@ -7809,8 +7809,8 @@ byte Entity_Laser::RenderShadowLayer(Vector *offset) (VStack_f8.y - local_c4) * (VStack_f8.y - local_c4)); local_d8 = &local_104->_tearFlags; maskedFlags = BitSet128::operator_and(&growFlagTest,local_d8,&g_tearFlagGrow); - if ((((int)maskedFlags->_l == 0 && *(int *)((int)&maskedFlags->_l + 4) == 0) && - ((int)maskedFlags->_h == 0 && *(int *)((int)&maskedFlags->_h + 4) == 0)) || + if (((GHIDRA_INT(maskedFlags->_l) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) == 0) && + (GHIDRA_INT(maskedFlags->_h) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) == 0)) || (((iVar2 = local_104->_subtype, iVar2 == 1 || (iVar2 == 2)) || (iVar2 == 3)))) { fVar9 = local_e4; fVar6 = local_d4; @@ -7843,8 +7843,8 @@ byte Entity_Laser::RenderShadowLayer(Vector *offset) } fVar8 = local_e8; maskedFlags = BitSet128::operator_and(&shrinkFlagTest,local_d8,&g_tearFlagShrink); - if ((((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) && + if (((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) && ((iVar2 = local_104->_subtype, iVar2 != 1 && ((iVar2 != 2 && (iVar2 != 3)))))) { local_108 = (BitSet128 *)0x3f800000; local_d8 = (BitSet128 *)(local_ec / 300.0); @@ -7870,9 +7870,9 @@ byte Entity_Laser::RenderShadowLayer(Vector *offset) fVar7 = shrinkScale * (fVar7 - local_110) + local_110; } uvBottomLeftY = (float)local_b4 + local_ec; - uvTopRightX = (float)frameCopy._0_4_ + (float)frameCopy._8_4_; - uvBottomLeftX = (float)frameCopy._0_4_; - uvTopLeftX = (float)frameCopy._0_4_; + uvTopRightX = (*(undefined4 *)((char *)&((float)frameCopy) + 0x0)) + (*(undefined4 *)((char *)&((float)frameCopy) + 0x8)); + uvBottomLeftX = (*(undefined4 *)((char *)&((float)frameCopy) + 0x0)); + uvTopLeftX = (*(undefined4 *)((char *)&((float)frameCopy) + 0x0)); uvTopRightY = local_ec; uvTopLeftY = local_ec; local_164 = 1; @@ -7914,12 +7914,12 @@ byte Entity_Laser::RenderShadowLayer(Vector *offset) (**(code **)(*shadowTexture + 0x14))(&uvTopLeftX); } pfVar4 = pfVar4 + 8; - local_b0 = (float)((int)local_b0 + 4); - } while ((uint)local_b0 < (uint)fVar5); + local_b0 = (float)(GHIDRA_INT(local_b0) + 4); + } while (GHIDRA_UINT(local_b0) < GHIDRA_UINT(fVar5)); this = local_104; } } - if ((uint)(this->_sprite)._layerCount < 2) { + if (GHIDRA_UINT((this->_sprite)._layerCount) < 2) { LAB_0097e2ff: pfVar4 = points; } @@ -7943,12 +7943,12 @@ LAB_0097e2ff: ExceptionList = local_10; return 1; } - size = (int)pointsCapacity - (int)points & 0xfffffff8; + size = GHIDRA_INT(pointsCapacity) - GHIDRA_INT(points) & 0xfffffff8; pfVar3 = points; if (0xfff < size) { pfVar3 = (float *)points[-1]; size = size + 0x23; - if (0x1f < (uint)((int)points + (-4 - (int)pfVar3))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(points) + (-4 - GHIDRA_INT(pfVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -7958,23 +7958,23 @@ LAB_0097e2ff: ((AnimationState *)((AnimationState *)frameCopy))->AnimationState::copy_assign(layerFrame); layer = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer((byte *)0x0); pfVar4 = (this->_homingLaser)._samples._begin; - uvTopLeftY = (float)frameCopy._4_4_ + 0.01; - uvBottomLeftY = (float)frameCopy._12_4_ + (float)frameCopy._4_4_; + uvTopLeftY = (*(undefined4 *)((char *)&((float)frameCopy) + 0x4)) + 0.01; + uvBottomLeftY = (*(undefined4 *)((char *)&((float)frameCopy) + 0xc)) + (*(undefined4 *)((char *)&((float)frameCopy) + 0x4)); local_c4 = local_94 * (layer->_size).x * (this->_sprite)._scale.x; local_164 = 1; - uvTopRightX = (float)frameCopy._8_4_ + (float)frameCopy._0_4_; - uvBottomLeftX = (float)frameCopy._0_4_; - uvTopLeftX = (float)frameCopy._0_4_; + uvTopRightX = (*(undefined4 *)((char *)&((float)frameCopy) + 0x8)) + (*(undefined4 *)((char *)&((float)frameCopy) + 0x0)); + uvBottomLeftX = (*(undefined4 *)((char *)&((float)frameCopy) + 0x0)); + uvTopLeftX = (*(undefined4 *)((char *)&((float)frameCopy) + 0x0)); local_11c.x = *pfVar4 - (this->_pos).x; local_11c.y = pfVar4[1] - (this->_pos).y; uvTopRightY = uvTopLeftY; uvBottomRightX = uvTopRightX; uvBottomRightY = uvBottomLeftY; ((Vector *)(&local_11c))->Vector::Normalized(&VStack_f8); - local_104 = (Entity_Laser *)((uint)VStack_f8.x ^ 0x80000000); - local_108 = (BitSet128 *)(VStack_f8.y * (float)frameCopy._20_4_); - fVar9 = VStack_f8.x * (float)frameCopy._20_4_; - local_b4 = (void *)((float)frameCopy._8_4_ * 0.5); + local_104 = (Entity_Laser *)(GHIDRA_UINT(VStack_f8.x) ^ 0x80000000); + local_108 = (BitSet128 *)(VStack_f8.y * (*(undefined4 *)((char *)&((float)frameCopy) + 0x14))); + fVar9 = VStack_f8.x * (*(undefined4 *)((char *)&((float)frameCopy) + 0x14)); + local_b4 = (void *)((*(undefined4 *)((char *)&((float)frameCopy) + 0x8)) * 0.5); fVar5 = VStack_f8.y; ((KColor *)(&vertexColor))->KColor::SetFromARGB(0xffffffff); pfVar4 = points; @@ -8022,7 +8022,7 @@ LAB_0097e2ff: apply_sprite_shader_params(&shaderColor,1,(void *)uVar11,(void *)((ulonglong)uVar11 >> 0x20)); layer = ((ANM2 *)(laserSprite))->ANM2::GetLayer((byte *)0x0); layerTexture = ((LayerState *)(layer))->LayerState::GetTexture(&local_11c); - local_8 = (float)CONCAT31(local_8._1_3_,3); + local_8 = (float)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); vertexColor._unk = 0; vertexColor._red = shaderColor._tint[0]; vertexColor._green = shaderColor._tint[1]; @@ -8035,7 +8035,7 @@ LAB_0097e2ff: goto LAB_0097e2ff; } } - local_8 = (float)CONCAT31(local_8._1_3_,4); + local_8 = (float)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),4); if (((shadowTextureRef != (int *)0x0) && (isLastRef = (**(code **)(*shadowTextureRef + 0xc))(), isLastRef != '\0')) && (g_imageReleaseFn != (void *)0x0)) { @@ -8045,12 +8045,12 @@ LAB_0097e2ff: ExceptionList = local_10; return 1; } - size = (int)pointsCapacity - (int)pfVar4 & 0xfffffff8; + size = GHIDRA_INT(pointsCapacity) - GHIDRA_INT(pfVar4) & 0xfffffff8; pfVar3 = pfVar4; if (0xfff < size) { pfVar3 = (float *)pfVar4[-1]; size = size + 0x23; - if (0x1f < (uint)((int)pfVar4 + (-4 - (int)pfVar3))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pfVar4) + (-4 - GHIDRA_INT(pfVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -8097,7 +8097,7 @@ void Entity_Laser::damage_entity(Entity *param_2) qword flags; Manager *manager; - securityCookie = __security_cookie ^ (uint)(auStack_8 + 4); + securityCookie = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); local_14 = in_XMM2_Da; if (this->_parentLaser == (EntityPtr)0x0) { hitList = &this->_hitList; @@ -8154,7 +8154,7 @@ void Entity_Laser::damage_entity(Entity *param_2) damageFlagsHi = 0; tearFlags = &this->_tearFlags; get_tear_flags_from_player - ((ulonglong *)&damageFlagsLo,(int)unused,this->_tearFlags,unused2,(Entity *)this); + ((ulonglong *)&damageFlagsLo,GHIDRA_INT(unused),this->_tearFlags,unused2,(Entity *)this); Entity_Tear::ApplyTearFlagEffects(param_2,&this->_pos,this->_tearFlags,(Entity *)this,local_14); if (((param_2->_flags & 0x100000000000000) != 0) && (bVar2 = is_thick_variant(this), manager = g_manager, bVar2 != 0)) { @@ -8162,9 +8162,9 @@ void Entity_Laser::damage_entity(Entity *param_2) seed_fart_sound_override((int *)&local_10); ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(local_10,0.7,8,0,1.0,0.0); flags = param_2->_flags; - puVar1 = (uint *)((int)¶m_2->_flags + 4); + puVar1 = (uint *)(GHIDRA_INT(¶m_2->_flags) + 4); *puVar1 = *puVar1 | 0x800000; - *(int *)¶m_2->_flags = (int)flags; + *(int *)¶m_2->_flags = GHIDRA_INT(flags); local_14 = local_14 + local_14 + 3.0; } if ((this->_blackHpDropChance <= 0.0) || (bVar2 = ((Entity *)(param_2))->Entity::IsActiveEnemy(0), bVar2 == 0)) { @@ -8184,8 +8184,8 @@ LAB_0097e656: local_10 = damageFlagsHi; if ((1 < *(int *)&g_game->_deathmatchManager) && ((maskedFlags = BitSet128::operator_and((BitSet128 *)&local_38,tearFlags,&g_tearFlagLasershot), - (int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0 || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)))) { + GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0 || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)))) { local_10 = uVar7 | 8; } takeDamageFn = *(code **)(*(int *)param_2 + 0x20); @@ -8233,7 +8233,7 @@ byte Entity_Laser::CanOverwrite() { uint uVar1; - uVar1 = (uint)this->_flags & 0x200000; + uVar1 = GHIDRA_UINT(this->_flags) & 0x200000; if ((uVar1 == 0) && (this->_isFirstUpdate == 0)) { return 1; } @@ -8431,7 +8431,7 @@ void Entity_Laser::PostRender() float *firstSample; void *samples; - if ((((((uint)g_game->_debugFlags >> 5 & 1) != 0) && (0.0 < this->_size)) && + if (((((GHIDRA_UINT(g_game->_debugFlags) >> 5 & 1) != 0) && (0.0 < this->_size)) && (this->_entityCollisionClass != 0)) && (-1 < (char)this->_sampleLaser)) { if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < DAT_00c942b0) && (_Init_thread_header(), DAT_00c942b0 == -1)) { @@ -8443,7 +8443,7 @@ void Entity_Laser::PostRender() _Init_thread_footer(); } collisionClass = this->_entityCollisionClass; - if (((int)collisionClass < 1) || (4 < collisionClass)) { + if ((GHIDRA_INT(collisionClass) < 1) || (4 < collisionClass)) { fromColor = (KColor *)&DAT_00c942b8; } else { @@ -8485,7 +8485,7 @@ void Entity_Laser::PostRender() } else { sampleIndex = 0; - if ((int)(this->_homingLaser)._samples._end - (int)(this->_homingLaser)._samples._begin >> 3 + if (GHIDRA_INT((this->_homingLaser)._samples._end) - GHIDRA_INT((this->_homingLaser)._samples._begin) >> 3 != 1) { fVar2 = cos(1.5707964); fVar3 = sin(1.5707964); @@ -8497,7 +8497,7 @@ void Entity_Laser::PostRender() nextSampleX = *(float *)((char *)samples + sampleIndex * 8 + 8); nextSampleY = *(float *)((char *)samples + sampleIndex * 8 + 0xc); if (((((this->_subtype != 1) && (this->_subtype != 2)) && (this->_subtype != 3)) && - ((sampleIndex == ((int)pvVar1 - (int)samples >> 3) - 2U && (this->_isGridHit == 0)))) + ((sampleIndex == (GHIDRA_INT(pvVar1) - GHIDRA_INT(samples) >> 3) - 2U && (this->_isGridHit == 0)))) && (this->_maxDistance <= 0.0)) { fVar5 = nextSampleY - fVar10; fVar7 = nextSampleX - fVar6; @@ -8574,7 +8574,7 @@ void Entity_Laser::PostRender() if (12.0 <= fVar4) { fVar4 = 12.0; } - circleSegments = (int)fVar4; + circleSegments = GHIDRA_INT(fVar4); segment = 1; if (0 < circleSegments * 4) { do { @@ -8595,7 +8595,7 @@ void Entity_Laser::PostRender() } pvVar1 = (this->_homingLaser)._samples._end; sampleIndex = sampleIndex + 1; - } while (sampleIndex < ((int)pvVar1 - (int)(this->_homingLaser)._samples._begin >> 3) - 1U); + } while (sampleIndex < (GHIDRA_INT(pvVar1) - GHIDRA_INT((this->_homingLaser)._samples._begin) >> 3) - 1U); return; } } @@ -8633,18 +8633,18 @@ void Entity_Laser::spawn_impact_effect(int unused) undefined4 local_14; int variant; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00af85cd; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; if (this->_exists == 0) { return; } variant = this->_variant; uVar5 = 0xffffffff; if ((variant == 2) && (this->_subtype != 4)) { - uVar5 = -(uint)(this->_subtype != 0) & 5; + uVar5 = -GHIDRA_UINT((this->_subtype != 0)) & 5; } else { switch(variant) { @@ -8684,7 +8684,7 @@ void Entity_Laser::spawn_impact_effect(int unused) } EVar6 = this->_child; ppvVar1 = &local_1c; - puVar2 = (undefined1 *)((int)register0x00000010 + -4); + puVar2 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); if (EVar6 != (EntityPtr)0x0) { if (*(uint *)((char *)EVar6 + 0x30) == uVar5) { return; @@ -8700,7 +8700,7 @@ void Entity_Laser::spawn_impact_effect(int unused) } puStack_20 = puVar2; ExceptionList = ppvVar1; - if ((int)uVar5 < 0) { + if (GHIDRA_INT(uVar5) < 0) { ExceptionList = local_1c; return; } @@ -8719,7 +8719,7 @@ void Entity_Laser::spawn_impact_effect(int unused) if (impactEffect != (EntityPtr)0x0) { std::multiset::insert(&this->_child); } - pEVar4 = (EntityPtr *)((int)impactEffect + 0x3bc); + pEVar4 = (EntityPtr *)(GHIDRA_INT(impactEffect) + 0x3bc); if (*(int *)((char *)impactEffect + 0x3bc) != 0) { local_44 = pEVar4; std::multiset::erase(&local_44); @@ -8729,44 +8729,44 @@ void Entity_Laser::spawn_impact_effect(int unused) EVar6 = impactEffect; if (uVar5 == 1) { if (this->_spawnerType == 0x3b6) { - local_44 = (EntityPtr *)((int)impactEffect + 0x48); + local_44 = (EntityPtr *)(GHIDRA_INT(impactEffect) + 0x48); anm2Path._size = 0; anm2Path._capacity = 0xf; anm2Path._buf[0] = '\0'; anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x30); anm2Path._size = 0x28; anm2Path._capacity = 0x2f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/1000.050_brimstoneimpact_static.anm2",0x29); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/1000.050_brimstoneimpact_static.anm2",0x29); local_14 = 0; - ((ANM2 *)((ANM2 *)((int)EVar6 + 0x48)))->ANM2::Load(&anm2Path,1); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(EVar6) + 0x48)))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar5 = anm2Path._capacity + 1; - ptr = (char *)anm2Path._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar5) { - ptr = *(char **)(anm2Path._buf._0_4_ + -4); + ptr = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar5 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)ptr))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(ptr)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(ptr,uVar5); } - defaultAnim = (byte *)((int)EVar6 + 0x60); + defaultAnim = (byte *)(GHIDRA_INT(EVar6) + 0x60); anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = anm2Path._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) & 0xffffff00; if (0xf < *(uint *)((char *)EVar6 + 0x74)) { defaultAnim = *(byte **)defaultAnim; } curAnimName = *(byte **)&(*(undefined1 *)((char *)&(local_44[0xd]) + 0x0)); if (curAnimName == (byte *)0x0) { LAB_0097fb40: - bVar3 = ((ANM2 *)((ANM2 *)((int)EVar6 + 0x48)))->ANM2::SetAnimation(defaultAnim,1); + bVar3 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(EVar6) + 0x48)))->ANM2::SetAnimation(defaultAnim,1); pEVar4 = local_44; if (bVar3 != 0) { ((AnimationState *)((AnimationState *)(local_44 + 0xc)))->AnimationState::Rewind(); @@ -8784,7 +8784,7 @@ LAB_0097fb40: bVar7 = bVar3 < *wantedAnim; if (bVar3 != *wantedAnim) { LAB_0097fb20: - uVar5 = -(uint)bVar7 | 1; + uVar5 = -GHIDRA_UINT(bVar7) | 1; goto LAB_0097fb25; } if (bVar3 == 0) break; @@ -8836,7 +8836,7 @@ void Entity_Laser::ResetSpriteScale() undefined4 local_8; void *animData; - local_8 = __security_cookie ^ (uint)(animName + 0x14); + local_8 = __security_cookie ^ GHIDRA_UINT((animName + 0x14)); if (this->_variant != 2) { fVar1 = this->_scale; fVar8 = *(float *)((char *)this->_config + 0x38); @@ -8848,7 +8848,7 @@ void Entity_Laser::ResetSpriteScale() sizeIndex = 0; uVar4 = 0; do { - if (this->_scale < *(float *)((int)&DAT_00b7cd30 + uVar4)) break; + if (this->_scale < *(float *)(GHIDRA_INT(&DAT_00b7cd30) + uVar4)) break; uVar4 = uVar4 + 4; sizeIndex = sizeIndex + 1; } while (uVar4 < 0xc); @@ -8873,7 +8873,7 @@ void Entity_Laser::ResetSpriteScale() isLess = bVar3 < *pbVar6; if (bVar3 != *pbVar6) { LAB_0097fd00: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_0097fd05; } if (bVar3 == 0) break; @@ -8901,7 +8901,7 @@ LAB_0097fd05: isLess = bVar3 < *pbVar7; if (bVar3 != *pbVar7) { LAB_0097fd41: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_0097fd46; } if (bVar3 == 0) break; @@ -8947,7 +8947,7 @@ LAB_0097fd78: if (animData == (void *)0x0) { return; } - ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)(int)frame); + ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(frame)); return; } @@ -9000,7 +9000,7 @@ void Entity_Laser::update_sample_points(char param_2) (**(code **)(*(int *)impactEffect + 0x3c))(&(colorSource->_sprite)._color,0xffffffff); if (*(int *)((char *)impactEffect + 0x30) == 0) { pvVar2 = (this->_homingLaser)._samples._begin; - sampleCount = (int)(this->_homingLaser)._samples._end - (int)pvVar2 >> 3; + sampleCount = GHIDRA_INT((this->_homingLaser)._samples._end) - GHIDRA_INT(pvVar2) >> 3; if (sampleCount < 2) { fStack_24 = this->_angleDegrees * 0.017453292; fVar4 = cos(fStack_24); @@ -9020,7 +9020,7 @@ void Entity_Laser::update_sample_points(char param_2) *(float *)((char *)impactEffect + 0x34c) = (this->_posOffset).x; *(float *)((char *)impactEffect + 0x350) = (this->_posOffset).y; samplesBegin = (this->_homingLaser)._samples._begin; - iVar3 = (int)(this->_homingLaser)._samples._end - (int)pvVar2 >> 3; + iVar3 = GHIDRA_INT((this->_homingLaser)._samples._end) - GHIDRA_INT(pvVar2) >> 3; VStack_2c.x = *(float *)((char *)samplesBegin + iVar3 * 8 + -0x10) - *(float *)((char *)samplesBegin + iVar3 * 8 + -8); fStack_24 = *(float *)((char *)samplesBegin + iVar3 * 8 + -0xc) - @@ -9070,7 +9070,7 @@ void Entity_Laser::update_sample_points(char param_2) &IsaacRepentancePlus::Entity_Laser::RTTI_Type_Descriptor,0); *(float *)((char *)impactEffect + 0x358) = *(float *)(iVar3 + 0x358) + 5.0; pvVar2 = (this->_homingLaser)._samples._begin; - sampleCount = (int)(this->_homingLaser)._samples._end - (int)pvVar2 >> 3; + sampleCount = GHIDRA_INT((this->_homingLaser)._samples._end) - GHIDRA_INT(pvVar2) >> 3; if (sampleCount < 2) { *(float *)((char *)impactEffect + 0xec) = this->_angleDegrees + 90.0; return; @@ -9084,7 +9084,7 @@ void Entity_Laser::update_sample_points(char param_2) return; } pvVar2 = (this->_homingLaser)._samples._begin; - sampleCount = (int)(this->_homingLaser)._samples._end - (int)pvVar2 >> 3; + sampleCount = GHIDRA_INT((this->_homingLaser)._samples._end) - GHIDRA_INT(pvVar2) >> 3; if (sampleCount < 2) { fStack_24 = this->_angleDegrees * 0.017453292; fVar4 = cos(fStack_24); @@ -9104,7 +9104,7 @@ void Entity_Laser::update_sample_points(char param_2) *(float *)((char *)impactEffect + 0x34c) = (this->_posOffset).x; *(float *)((char *)impactEffect + 0x350) = (this->_posOffset).y; samplesBegin = (this->_homingLaser)._samples._begin; - iVar3 = (int)(this->_homingLaser)._samples._end - (int)pvVar2 >> 3; + iVar3 = GHIDRA_INT((this->_homingLaser)._samples._end) - GHIDRA_INT(pvVar2) >> 3; fStack_24 = *(float *)((char *)samplesBegin + iVar3 * 8 + -0x10) - *(float *)((char *)samplesBegin + iVar3 * 8 + -8); VStack_2c.x = *(float *)((char *)samplesBegin + iVar3 * 8 + -0xc) - @@ -9183,7 +9183,7 @@ void Entity_Laser::update_wiggle_path(void *samples, float amplitude, float phas } fVar3 = 1.0; if (sampleIdx < 0x14) { - fVar4 = (float)((double)(int)sampleIdx + __uint_to_double_fixup[-((int)sampleIdx >> 0x1f)] + fVar4 = (float)((double)GHIDRA_INT(sampleIdx) + __uint_to_double_fixup[-(GHIDRA_INT(sampleIdx) >> 0x1f)] ); fVar3 = fVar4 / 20.0; } @@ -9192,7 +9192,7 @@ void Entity_Laser::update_wiggle_path(void *samples, float amplitude, float phas iVar1 = (sampleCount - sampleIdx) + 1; fVar3 = (float)((double)iVar1 + __uint_to_double_fixup[-(iVar1 >> 0x1f)]) / 22.0; } - fVar4 = (float)((double)(int)sampleIdx + __uint_to_double_fixup[-((int)sampleIdx >> 0x1f)] + fVar4 = (float)((double)GHIDRA_INT(sampleIdx) + __uint_to_double_fixup[-(GHIDRA_INT(sampleIdx) >> 0x1f)] ); } falloff = (double)(1.0 - fVar3); diff --git a/src/game/entity_list.cpp b/src/game/entity_list.cpp index fd43e23..a8fc809 100644 --- a/src/game/entity_list.cpp +++ b/src/game/entity_list.cpp @@ -12,15 +12,15 @@ void EntityList::sublist_init(EntityList_EL *parent, int capacity) parentData = parent->_data; *(int *)&(*(undefined1 *)((char *)(this) + 0x8)) = capacity; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xc)) = 0; - *(void **)&(*(undefined1 *)((char *)(this) + 0x4)) = (void *)((int)parentData + startIdx * 4); + *(void **)&(*(undefined1 *)((char *)(this) + 0x4)) = (void *)(GHIDRA_INT(parentData) + startIdx * 4); startIdx = parent->_size; parentCapacity = parent->_capacity; - if (parentCapacity < (uint)(startIdx + capacity)) { + if (parentCapacity < GHIDRA_UINT((startIdx + capacity))) { KAGE_LogMessage(0x10,(byte *)"EL: invalid sublist\n"); startIdx = parent->_size; parentCapacity = parent->_capacity; } - if (parentCapacity < (uint)(startIdx + capacity)) { + if (parentCapacity < GHIDRA_UINT((startIdx + capacity))) { startIdx = 0; *(void **)&(*(undefined1 *)((char *)(this) + 0x4)) = parent->_data; } @@ -51,33 +51,33 @@ void EntityList::Reset() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x6c)) = 0; if ((this->_mainEL)._size != 0) { do { - piVar1 = *(int **)((int)(this->_mainEL)._data + i * 4); + piVar1 = *(int **)(GHIDRA_INT((this->_mainEL)._data) + i * 4); if ((piVar1[0x5b] & 0x20U) == 0) { (**(code **)(*piVar1 + 0x44))(); - *(undefined1 *)(*(int *)((int)(this->_mainEL)._data + i * 4) + 0x170) = 0; - (**(code **)(**(int **)((int)(this->_mainEL)._data + i * 4) + 0x28))(); + *(undefined1 *)(*(int *)(GHIDRA_INT((this->_mainEL)._data) + i * 4) + 0x170) = 0; + (**(code **)(**(int **)(GHIDRA_INT((this->_mainEL)._data) + i * 4) + 0x28))(); } else { iVar2 = (this->_updateEL)._size; - if ((uint)(this->_updateEL)._capacity < iVar2 + 1U) { + if (GHIDRA_UINT((this->_updateEL)._capacity) < iVar2 + 1U) { KAGE_LogMessage(0x10,(byte *)"EL: not enough space for push_back\n"); iVar2 = (this->_updateEL)._size; } - *(int **)((int)(this->_updateEL)._data + iVar2 * 4) = piVar1; + *(int **)(GHIDRA_INT((this->_updateEL)._data) + iVar2 * 4) = piVar1; piVar1 = &(this->_updateEL)._size; *piVar1 = *piVar1 + 1; iVar2 = (this->_renderEL)._size; - movedEntity = *(undefined4 *)((int)(this->_mainEL)._data + i * 4); - if ((uint)(this->_renderEL)._capacity < iVar2 + 1U) { + movedEntity = *(undefined4 *)(GHIDRA_INT((this->_mainEL)._data) + i * 4); + if (GHIDRA_UINT((this->_renderEL)._capacity) < iVar2 + 1U) { KAGE_LogMessage(0x10,(byte *)"EL: not enough space for push_back\n"); iVar2 = (this->_renderEL)._size; } - *(undefined4 *)((int)(this->_renderEL)._data + iVar2 * 4) = movedEntity; + *(undefined4 *)(GHIDRA_INT((this->_renderEL)._data) + iVar2 * 4) = movedEntity; piVar1 = &(this->_renderEL)._size; *piVar1 = *piVar1 + 1; } i = i + 1; - } while (i < (uint)(this->_mainEL)._size); + } while (i < GHIDRA_UINT((this->_mainEL)._size)); iVar2 = (this->_updateEL)._size; } i = 0; @@ -86,58 +86,58 @@ void EntityList::Reset() if (iVar2 != 0) { iVar2 = 0; do { - movedEntity = *(undefined4 *)((int)(this->_updateEL)._data + i * 4); - if ((uint)(this->_mainEL)._capacity < iVar2 + 1U) { + movedEntity = *(undefined4 *)(GHIDRA_INT((this->_updateEL)._data) + i * 4); + if (GHIDRA_UINT((this->_mainEL)._capacity) < iVar2 + 1U) { KAGE_LogMessage(0x10,(byte *)"EL: not enough space for push_back\n"); iVar2 = (this->_mainEL)._size; } i = i + 1; - *(undefined4 *)((int)(this->_mainEL)._data + iVar2 * 4) = movedEntity; + *(undefined4 *)(GHIDRA_INT((this->_mainEL)._data) + iVar2 * 4) = movedEntity; piVar1 = &(this->_mainEL)._size; *piVar1 = *piVar1 + 1; iVar2 = (this->_mainEL)._size; - } while (i < (uint)(this->_updateEL)._size); + } while (i < GHIDRA_UINT((this->_updateEL)._size)); } i = 0; if ((this->_persistentEL)._size != 0) { do { iVar2 = (this->_updateEL)._size; - movedEntity = *(undefined4 *)((int)(this->_persistentEL)._data + i * 4); - if ((uint)(this->_updateEL)._capacity < iVar2 + 1U) { + movedEntity = *(undefined4 *)(GHIDRA_INT((this->_persistentEL)._data) + i * 4); + if (GHIDRA_UINT((this->_updateEL)._capacity) < iVar2 + 1U) { KAGE_LogMessage(0x10,(byte *)"EL: not enough space for push_back\n"); iVar2 = (this->_updateEL)._size; } - *(undefined4 *)((int)(this->_updateEL)._data + iVar2 * 4) = movedEntity; + *(undefined4 *)(GHIDRA_INT((this->_updateEL)._data) + iVar2 * 4) = movedEntity; piVar1 = &(this->_updateEL)._size; *piVar1 = *piVar1 + 1; iVar2 = (this->_renderEL)._size; - movedEntity = *(undefined4 *)((int)(this->_persistentEL)._data + i * 4); - if ((uint)(this->_renderEL)._capacity < iVar2 + 1U) { + movedEntity = *(undefined4 *)(GHIDRA_INT((this->_persistentEL)._data) + i * 4); + if (GHIDRA_UINT((this->_renderEL)._capacity) < iVar2 + 1U) { KAGE_LogMessage(0x10,(byte *)"EL: not enough space for push_back\n"); iVar2 = (this->_renderEL)._size; } i = i + 1; - *(undefined4 *)((int)(this->_renderEL)._data + iVar2 * 4) = movedEntity; + *(undefined4 *)(GHIDRA_INT((this->_renderEL)._data) + iVar2 * 4) = movedEntity; piVar1 = &(this->_renderEL)._size; *piVar1 = *piVar1 + 1; - } while (i < (uint)(this->_persistentEL)._size); + } while (i < GHIDRA_UINT((this->_persistentEL)._size)); } i = 0; if ((this->_updateEL)._size != 0) { do { - iVar2 = *(int *)((int)(this->_updateEL)._data + i * 4); + iVar2 = *(int *)(GHIDRA_INT((this->_updateEL)._data) + i * 4); if ((*(int *)(iVar2 + 0x28) == 3) && (*(int *)(iVar2 + 0x2c) == 0xce)) { wispIndex = (this->_wispEL)._size; - if ((uint)(this->_wispEL)._capacity < wispIndex + 1U) { + if (GHIDRA_UINT((this->_wispEL)._capacity) < wispIndex + 1U) { KAGE_LogMessage(0x10,(byte *)"EL: not enough space for push_back\n"); wispIndex = (this->_wispEL)._size; } - *(int *)((int)(this->_wispEL)._data + wispIndex * 4) = iVar2; + *(int *)(GHIDRA_INT((this->_wispEL)._data) + wispIndex * 4) = iVar2; piVar1 = &(this->_wispEL)._size; *piVar1 = *piVar1 + 1; } i = i + 1; - } while (i < (uint)(this->_updateEL)._size); + } while (i < GHIDRA_UINT((this->_updateEL)._size)); } iVar2 = this[1]._persistentEL._capacity; piVar1 = &this[1]._persistentEL._capacity; @@ -162,8 +162,8 @@ void EntityList::Reset() this[1]._updateEL._capacity = -0x123458a; if (((manager->_netplayManager != *(NetplayManager *)(manager + 1)) && (*(int *)&(*(undefined1 *)((char *)&(this[6]) + 0xc)) != 0)) && - ((uint)manager[1]._state < - *(uint *)((int)&this[1]._renderEL + (*(uint *)&(*(undefined1 *)((char *)&(this[6]) + 0x8)) & 0x1f) * 0x18))) { + (GHIDRA_UINT(manager[1]._state) < + *(uint *)(GHIDRA_INT(&this[1]._renderEL) + (*(uint *)&(*(undefined1 *)((char *)&(this[6]) + 0x8)) & 0x1f) * 0x18))) { *(undefined4 *)&(*(undefined1 *)((char *)&(this[6]) + 0xc)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)&(this[6]) + 0x8)) = 0; } @@ -189,11 +189,11 @@ void EntityList::AddEntity(Entity *entity) iVar2 = entity->_type; if (((iVar2 == 1) || (iVar2 == 3)) || ((iVar2 == 8 && (entity->_subtype == 0)))) { iVar2 = (this->_persistentEL)._size; - if ((uint)(this->_persistentEL)._capacity < iVar2 + 1U) { + if (GHIDRA_UINT((this->_persistentEL)._capacity) < iVar2 + 1U) { KAGE_LogMessage(0x10,(byte *)"EL: not enough space for push_back\n"); iVar2 = (this->_persistentEL)._size; } - *(Entity **)((int)(this->_persistentEL)._data + iVar2 * 4) = entity; + *(Entity **)(GHIDRA_INT((this->_persistentEL)._data) + iVar2 * 4) = entity; sizePtr = &(this->_persistentEL)._size; *sizePtr = *sizePtr + 1; } @@ -214,7 +214,7 @@ void EntityList::AddEntity(Entity *entity) if ((this->_renderEL)._size != 0) { do { otherRenderDepth = - (**(code **)(**(int **)((int)(this->_renderEL)._data + (int)entity * 4) + 0x34))(); + (**(code **)(**(int **)(GHIDRA_INT((this->_renderEL)._data) + GHIDRA_INT(entity) * 4) + 0x34))(); newRenderDepth = newEntity->GetRenderZ(); insertIndex = entity; if (newRenderDepth <= otherRenderDepth) break; @@ -235,21 +235,21 @@ void EntityList::AddEntity(Entity *entity) } if (!isIndexInvalid && shiftIndex != insertIndex) { do { - slot = (undefined4 *)((int)(this->_renderEL)._data + (int)shiftIndex * 4); + slot = (undefined4 *)(GHIDRA_INT((this->_renderEL)._data) + GHIDRA_INT(shiftIndex) * 4); shiftIndex = (Entity *)&(*(undefined1 *)((char *)&(shiftIndex[-1]) + 0x40f)); *slot = slot[-1]; } while (insertIndex < shiftIndex); } - *(Entity **)((int)(this->_renderEL)._data + (int)insertIndex * 4) = newEntity; + *(Entity **)(GHIDRA_INT((this->_renderEL)._data) + GHIDRA_INT(insertIndex) * 4) = newEntity; sizePtr = &(this->_renderEL)._size; *sizePtr = *sizePtr + 1; if ((newEntity->_type == 3) && (newEntity->_variant == 0xce)) { iVar2 = (this->_wispEL)._size; - if ((uint)(this->_wispEL)._capacity < iVar2 + 1U) { + if (GHIDRA_UINT((this->_wispEL)._capacity) < iVar2 + 1U) { KAGE_LogMessage(0x10,(byte *)"EL: not enough space for push_back\n"); iVar2 = (this->_wispEL)._size; } - *(Entity **)((int)(this->_wispEL)._data + iVar2 * 4) = newEntity; + *(Entity **)(GHIDRA_INT((this->_wispEL)._data) + iVar2 * 4) = newEntity; sizePtr = &(this->_wispEL)._size; *sizePtr = *sizePtr + 1; } @@ -259,11 +259,11 @@ void EntityList::AddEntity(Entity *entity) } if ((newEntity->_flags & 8) == 0) { iVar2 = (this->_updateEL)._size; - if ((uint)(this->_updateEL)._capacity < iVar2 + 1U) { + if (GHIDRA_UINT((this->_updateEL)._capacity) < iVar2 + 1U) { KAGE_LogMessage(0x10,(byte *)"EL: not enough space for push_back\n"); iVar2 = (this->_updateEL)._size; } - *(Entity **)((int)(this->_updateEL)._data + iVar2 * 4) = newEntity; + *(Entity **)(GHIDRA_INT((this->_updateEL)._data) + iVar2 * 4) = newEntity; sizePtr = &(this->_updateEL)._size; *sizePtr = *sizePtr + 1; } @@ -365,7 +365,7 @@ void EntityList::Update(byte isTransition) local_14 = (EntityPtr)0xffffffff; puStack_18 = &LAB_00af1575; local_1c = ExceptionList; - uVar6 = __security_cookie ^ (uint)(local_2c + 7); + uVar6 = __security_cookie ^ GHIDRA_UINT((local_2c + 7)); ExceptionList = &local_1c; checksumRecord = (int *)0x0; local_64 = g_manager->_netplayManager; @@ -383,7 +383,7 @@ void EntityList::Update(byte isTransition) else { *(uint *)&(*(undefined1 *)((char *)&(this[6]) + 0x8)) = uVar12 + 1 & 0x1f; } - checksumRecord = (int *)((int)&this[1]._renderEL + uVar12 * 0x18); + checksumRecord = (int *)(GHIDRA_INT(&this[1]._renderEL) + uVar12 * 0x18); checksumRecord[2] = checksumRecord[1]; *checksumRecord = manager[1]._state; } @@ -405,7 +405,7 @@ void EntityList::Update(byte isTransition) bossMaxHealth = 0.0; local_34 = 0.0; local_38 = (EntityPtr)0x0; - local_48 = *(EntityPtr *)((int)(entityList->_updateEL)._data + (int)EVar9 * 4 + -4); + local_48 = *(EntityPtr *)(GHIDRA_INT((entityList->_updateEL)._data) + GHIDRA_INT(EVar9) * 4 + -4); curList = entityList; do { EVar10 = local_38; @@ -414,21 +414,21 @@ void EntityList::Update(byte isTransition) EVar9 = (EntityPtr)(curList->_updateEL)._size; } pEVar3 = entityList; - EVar10 = *(EntityPtr *)((int)(curList->_updateEL)._data + (int)EVar10 * 4); + EVar10 = *(EntityPtr *)(GHIDRA_INT((curList->_updateEL)._data) + GHIDRA_INT(EVar10) * 4); if (*(char *)((char *)EVar10 + 0x172) != '\0') { local_3c = *(EntityPtr *)((char *)EVar10 + 0x16c); curList = pEVar3; if ((((*(uint *)((char *)EVar10 + 0x168) & 8) == 0) || ((*(uint *)((char *)EVar10 + 0x168) & 0x20000) != 0)) && ((isTransition == 0 || - (local_3c = (EntityPtr)((uint)local_3c & 0x1000), local_3c != (EntityPtr)0x0)))) { + (local_3c = (EntityPtr)(GHIDRA_UINT(local_3c) & 0x1000), local_3c != (EntityPtr)0x0)))) { (**(code **)(*(int *)EVar10 + 8))(uVar6); EVar9 = (EntityPtr)(pEVar3->_updateEL)._size; } } - local_38 = (EntityPtr)((int)local_38 + 1); + local_38 = (EntityPtr)(GHIDRA_INT(local_38) + 1); curEntity = EVar9; - } while ((EVar10 != local_48) && ((uint)local_38 < (uint)EVar9)); + } while ((EVar10 != local_48) && (GHIDRA_UINT(local_38) < GHIDRA_UINT(EVar9))); local_3c = (EntityPtr)0x0; if (EVar10 == local_48) { } @@ -437,11 +437,11 @@ void EntityList::Update(byte isTransition) KAGE_LogMessage(0x10,(byte *)"EntityList: e_update is empty!\n"); } prevHealth = (EntityPtr)0x0; - EVar9 = *(EntityPtr *)((int)(curList->_updateEL)._data + (int)local_3c * 4); + EVar9 = *(EntityPtr *)(GHIDRA_INT((curList->_updateEL)._data) + GHIDRA_INT(local_3c) * 4); curEntity = EVar9; - local_38 = (EntityPtr)((int)EVar9 + 0x28); + local_38 = (EntityPtr)(GHIDRA_INT(EVar9) + 0x28); if ((*(int *)&g_game->_deathmatchManager < 2) || (*(EntityPtr *)local_38 != (EntityPtr)0x1)) { - if ((int)*(EntityPtr *)local_38 - 10U < 0x3de) { + if (GHIDRA_INT(*(EntityPtr *)local_38) - 10U < 0x3de) { if (*(EntityPtr *)local_38 == (EntityPtr)0x1) goto LAB_004188e4; prevHealth = *(EntityPtr *)((char *)EVar9 + 0xc5c); goto LAB_0041890f; @@ -489,7 +489,7 @@ LAB_0041890f: (configEntry = EntityConfig::GetEntity (&g_manager->_entityConfig,*(int *)((char *)EVar9 + 0x47c), *(uint *)((char *)EVar9 + 0x480), - (int)*(float *)((char *)EVar9 + 0x498)), + GHIDRA_INT(*(float *)((char *)EVar9 + 0x498))), configEntry != (EntityConfig_Entity *)0x0)) && (configEntry->isBoss != 0)) { bossCount = bossCount + 1; } @@ -497,10 +497,10 @@ LAB_0041890f: cVar4 = (**(code **)(*(int *)EVar9 + 0x48))(); if ((cVar4 != '\0') || (*(EntityPtr *)local_38 == (EntityPtr)0x3c3)) { local_2c[0] = *(EntityPtr *)&g_game->_deathmatchManager; - if (((int)*(EntityPtr *)&g_game->_deathmatchManager < 2) || + if ((GHIDRA_INT(*(EntityPtr *)&g_game->_deathmatchManager) < 2) || (*(EntityPtr *)local_38 != (EntityPtr)0x1)) { EVar10 = *(EntityPtr *)local_38; - if ((0x3dd < (int)EVar10 - 10U) && (EVar10 != (EntityPtr)0x3c3)) goto LAB_00418ba8; + if ((0x3dd < GHIDRA_INT(EVar10) - 10U) && (EVar10 != (EntityPtr)0x3c3)) goto LAB_00418ba8; } else { EVar10 = (EntityPtr)0x1; @@ -520,8 +520,8 @@ LAB_0041890f: } } local_5c = (EntityPtr)0x0; - if (((int)local_2c[0] < 2) || (EVar10 != (EntityPtr)0x1)) { - if ((int)EVar10 - 10U < 0x3de) { + if ((GHIDRA_INT(local_2c[0]) < 2) || (EVar10 != (EntityPtr)0x1)) { + if (GHIDRA_INT(EVar10) - 10U < 0x3de) { if (EVar10 == (EntityPtr)0x1) goto LAB_00418b25; local_5c = *(EntityPtr *)((char *)EVar9 + 0xc5c); } @@ -554,7 +554,7 @@ LAB_00418ba8: isListDirty = 1; } if ((*(uint *)((char *)EVar9 + 0x16c) & 0x100000) != 0) { - local_40 = (float)((uint)local_40 | 1); + local_40 = (float)(GHIDRA_UINT(local_40) | 1); } if (local_64 != netplayEnd) { checksumPosX = *(undefined4 *)((char *)EVar9 + 0x33c); @@ -619,58 +619,58 @@ LAB_00418ba8: EVar9 = curEntity; curList = entityList; } - local_3c = (EntityPtr)((int)local_3c + 1); + local_3c = (EntityPtr)(GHIDRA_INT(local_3c) + 1); } while ((EVar9 != local_48) && - (EVar9 = (EntityPtr)(curList->_updateEL)._size, (uint)local_3c < (uint)EVar9)); + (EVar9 = (EntityPtr)(curList->_updateEL)._size, GHIDRA_UINT(local_3c) < GHIDRA_UINT(EVar9))); uVar6 = 0; - if ((int)(g_game->_playerManager)._extraPlayers._end - - (int)(g_game->_playerManager)._extraPlayers._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._extraPlayers._end) - + GHIDRA_INT((g_game->_playerManager)._extraPlayers._begin) >> 2 != 0) { do { - (**(code **)(**(int **)((int)(g_game->_playerManager)._extraPlayers._begin + uVar6 * 4) + 0xc) + (**(code **)(**(int **)(GHIDRA_INT((g_game->_playerManager)._extraPlayers._begin) + uVar6 * 4) + 0xc) )(); uVar6 = uVar6 + 1; - } while (uVar6 < (uint)((int)(g_game->_playerManager)._extraPlayers._end - - (int)(g_game->_playerManager)._extraPlayers._begin >> 2)); + } while (uVar6 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._extraPlayers._end) - + GHIDRA_INT((g_game->_playerManager)._extraPlayers._begin) >> 2))); } game = g_game; if ((g_manager->_optionsConfig)._enableInterpolation == 0) { playerManager = &g_game->_playerManager; local_48 = (EntityPtr)0x0; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar11 = (playerManager->_playerList)._end; - if ((int)pvVar11 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar11) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar11 = (playerManager->_playerList)._end; } puVar8 = (playerManager->_playerList)._begin; - if ((uint)local_48 < (uint)((int)pvVar11 - (int)puVar8 >> 2)) { - puVar8 = puVar8 + (int)local_48; + if (GHIDRA_UINT(local_48) < GHIDRA_UINT((GHIDRA_INT(pvVar11) - GHIDRA_INT(puVar8) >> 2))) { + puVar8 = puVar8 + GHIDRA_INT(local_48); } player = (Entity *)*puVar8; if ((isTransition == 0) || ((player->_flags & 0x100000000000) != 0)) { - flagsHigh = *(undefined4 *)((int)&player->_flags + 4); - *(uint *)&player->_flags = (uint)player->_flags | 0x4000; - *(undefined4 *)((int)&player->_flags + 4) = flagsHigh; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&player->_flags) + 4); + *(uint *)&player->_flags = GHIDRA_UINT(player->_flags) | 0x4000; + *(undefined4 *)(GHIDRA_INT(&player->_flags) + 4) = flagsHigh; player->Update(); ((Entity *)(player))->Entity::PlayerCollideWithGrid(0); - flagsHigh = *(undefined4 *)((int)&player->_flags + 4); - *(uint *)&player->_flags = (uint)player->_flags & 0xffffbfff; - *(undefined4 *)((int)&player->_flags + 4) = flagsHigh; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&player->_flags) + 4); + *(uint *)&player->_flags = GHIDRA_UINT(player->_flags) & 0xffffbfff; + *(undefined4 *)(GHIDRA_INT(&player->_flags) + 4) = flagsHigh; } - local_48 = (EntityPtr)((int)local_48 + 1); + local_48 = (EntityPtr)(GHIDRA_INT(local_48) + 1); playerManager = &g_game->_playerManager; - } while ((uint)local_48 < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (GHIDRA_UINT(local_48) < + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } game = g_game; - if ((int)(g_game->_playerManager)._extraPlayers._end - - (int)(g_game->_playerManager)._extraPlayers._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._extraPlayers._end) - + GHIDRA_INT((g_game->_playerManager)._extraPlayers._begin) >> 2 != 0) { uVar6 = 0; do { - piVar13 = *(int **)((int)(game->_playerManager)._extraPlayers._begin + uVar6 * 4); + piVar13 = *(int **)(GHIDRA_INT((game->_playerManager)._extraPlayers._begin) + uVar6 * 4); piVar13[0x5a] = piVar13[0x5a] | 0x4000; piVar13[0x5b] = piVar13[0x5b]; (**(code **)(*piVar13 + 0xc))(); @@ -678,8 +678,8 @@ LAB_00418ba8: uVar6 = uVar6 + 1; piVar13[0x5a] = piVar13[0x5a] & 0xffffbfff; piVar13[0x5b] = piVar13[0x5b]; - } while (uVar6 < (uint)((int)(game->_playerManager)._extraPlayers._end - - (int)(game->_playerManager)._extraPlayers._begin >> 2)); + } while (uVar6 < GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._extraPlayers._end) - + GHIDRA_INT((game->_playerManager)._extraPlayers._begin) >> 2))); curList = entityList; } } @@ -754,8 +754,8 @@ LAB_00418ba8: } } piVar13 = piVar13 + 1; - local_34 = (float)((int)local_34 + 1); - } while ((uint)local_34 < (uint)(curList->_renderEL)._size); + local_34 = (float)(GHIDRA_INT(local_34) + 1); + } while (GHIDRA_UINT(local_34) < GHIDRA_UINT((curList->_renderEL)._size)); isWallPass = isAnyWallEntity; local_21 = isAnyFloorEntity; if ((isAnyFloorEntity != false) || (isAnyWallEntity != false)) { @@ -778,7 +778,7 @@ LAB_0041915c: g_graphicsManager_blendMode[4] = 7; g_graphicsManager_flags = uVar6; if (local_21 != false) { - ((shared_ptr *)(&renderTarget))->shared_ptr::assign((void *)((int)g_game->_room + 0x1bc8)); + ((shared_ptr *)(&renderTarget))->shared_ptr::assign((void *)(GHIDRA_INT(g_game->_room) + 0x1bc8)); local_14 = (EntityPtr)0x0; ((KAGE_Graphics *)(&DAT_00c798e0))->KAGE_Graphics::SetRenderTarget(renderTarget,0); local_14 = (EntityPtr)0x1; @@ -791,23 +791,23 @@ LAB_0041915c: local_34 = 0.0; if ((curList->_renderEL)._size != 0) { do { - piVar13 = *(int **)((int)(curList->_renderEL)._data + (int)local_34 * 4); + piVar13 = *(int **)(GHIDRA_INT((curList->_renderEL)._data) + GHIDRA_INT(local_34) * 4); if ((*(char *)((char *)piVar13 + 0x172) != '\0') && ((piVar13[0x5a] & 8U) != 0)) { local_70 = CONCAT44(local_40,local_4c) ^ 0x8000000080000000; (**(code **)(*piVar13 + 0x14))(); local_84 = piVar13[0x5b]; if (((piVar13[0x5a] & 0x2000U) == 0) && ((piVar13[0x5a] & 0x22000U) == 0)) { (**(code **)(*piVar13 + 0x28))(); - isListDirty = CONCAT31(isListDirty._1_3_,1); + isListDirty = CONCAT31((*(undefined1 *)((char *)&(isListDirty) + 0x1)),1); } } - local_34 = (float)((int)local_34 + 1); - } while ((uint)local_34 < (uint)(curList->_renderEL)._size); + local_34 = (float)(GHIDRA_INT(local_34) + 1); + } while (GHIDRA_UINT(local_34) < GHIDRA_UINT((curList->_renderEL)._size)); } _glfw_context_reset(); } if (isWallPass != false) { - ((shared_ptr *)(&renderTarget))->shared_ptr::assign((void *)((int)g_game->_room + 0x1bd0)); + ((shared_ptr *)(&renderTarget))->shared_ptr::assign((void *)(GHIDRA_INT(g_game->_room) + 0x1bd0)); local_14 = (EntityPtr)0x2; ((KAGE_Graphics *)(&DAT_00c798e0))->KAGE_Graphics::SetRenderTarget(renderTarget,0); local_14 = (EntityPtr)0x3; @@ -820,17 +820,17 @@ LAB_0041915c: local_34 = 0.0; if ((curList->_renderEL)._size != 0) { do { - piVar13 = *(int **)((int)(curList->_renderEL)._data + (int)local_34 * 4); + piVar13 = *(int **)(GHIDRA_INT((curList->_renderEL)._data) + GHIDRA_INT(local_34) * 4); if ((*(char *)((char *)piVar13 + 0x172) != '\0') && ((piVar13[0x5a] & 0x2000U) != 0)) { local_70 = CONCAT44(local_40,local_4c) ^ 0x8000000080000000; (**(code **)(*piVar13 + 0x14))(); if ((piVar13[0x5a] & 0x20000U) == 0) { (**(code **)(*piVar13 + 0x28))(); - isListDirty = CONCAT31(isListDirty._1_3_,1); + isListDirty = CONCAT31((*(undefined1 *)((char *)&(isListDirty) + 0x1)),1); } } - local_34 = (float)((int)local_34 + 1); - } while ((uint)local_34 < (uint)(curList->_renderEL)._size); + local_34 = (float)(GHIDRA_INT(local_34) + 1); + } while (GHIDRA_UINT(local_34) < GHIDRA_UINT((curList->_renderEL)._size)); } _glfw_context_reset(); } @@ -853,7 +853,7 @@ LAB_0041915c: uVar14 = 0; if (uVar6 != 0) { do { - if (*(char *)(*(int *)((int)(curList->_updateEL)._data + uVar14 * 4) + 0x172) == '\0') { + if (*(char *)(*(int *)(GHIDRA_INT((curList->_updateEL)._data) + uVar14 * 4) + 0x172) == '\0') { if (uVar6 <= uVar14) { KAGE_LogMessage(0x10,(byte *)"EL: invalid index for remove\n"); uVar6 = (curList->_updateEL)._size; @@ -880,7 +880,7 @@ LAB_0041915c: uVar14 = 0; if (uVar6 != 0) { do { - if (*(char *)(*(int *)((int)(curList->_renderEL)._data + uVar14 * 4) + 0x172) == '\0') { + if (*(char *)(*(int *)(GHIDRA_INT((curList->_renderEL)._data) + uVar14 * 4) + 0x172) == '\0') { if (uVar6 <= uVar14) { KAGE_LogMessage(0x10,(byte *)"EL: invalid index for remove\n"); uVar6 = (curList->_renderEL)._size; @@ -907,7 +907,7 @@ LAB_0041915c: uVar14 = 0; if (uVar6 != 0) { do { - if (*(char *)(*(int *)((int)(curList->_wispEL)._data + uVar14 * 4) + 0x172) == '\0') { + if (*(char *)(*(int *)(GHIDRA_INT((curList->_wispEL)._data) + uVar14 * 4) + 0x172) == '\0') { if (uVar6 <= uVar14) { KAGE_LogMessage(0x10,(byte *)"EL: invalid index for remove\n"); uVar6 = (curList->_wispEL)._size; @@ -934,10 +934,10 @@ LAB_0041915c: uVar14 = 0; if (uVar6 != 0) { do { - piVar13 = *(int **)((int)(curList->_mainEL)._data + uVar14 * 4); + piVar13 = *(int **)(GHIDRA_INT((curList->_mainEL)._data) + uVar14 * 4); if (*(char *)((char *)piVar13 + 0x172) == '\0') { (**(code **)(*piVar13 + 0x44))(); - *(undefined1 *)(*(int *)((int)(curList->_mainEL)._data + uVar14 * 4) + 0x170) = 0; + *(undefined1 *)(*(int *)(GHIDRA_INT((curList->_mainEL)._data) + uVar14 * 4) + 0x170) = 0; uVar6 = (curList->_mainEL)._size; if (uVar6 <= uVar14) { KAGE_LogMessage(0x10,(byte *)"EL: invalid index for remove\n"); @@ -965,12 +965,12 @@ LAB_0041915c: uVar14 = 0; if (uVar6 != 0) { do { - piVar13 = *(int **)((int)(curList->_persistentEL)._data + uVar14 * 4); + piVar13 = *(int **)(GHIDRA_INT((curList->_persistentEL)._data) + uVar14 * 4); if (*(char *)((char *)piVar13 + 0x172) == '\0') { local_21 = SUB41(piVar13[0x5c],0); (**(code **)(*piVar13 + 0x44))(); - *(undefined1 *)(*(int *)((int)(curList->_persistentEL)._data + uVar14 * 4) + 0x170) = 0; - puVar8 = *(undefined4 **)((int)(curList->_persistentEL)._data + uVar14 * 4); + *(undefined1 *)(*(int *)(GHIDRA_INT((curList->_persistentEL)._data) + uVar14 * 4) + 0x170) = 0; + puVar8 = *(undefined4 **)(GHIDRA_INT((curList->_persistentEL)._data) + uVar14 * 4); if (((puVar8[10] == 1) && (local_21 != false)) && (puVar8 != (undefined4 *)0x0)) { (**(code **)*puVar8)(); } @@ -1009,7 +1009,7 @@ LAB_0041915c: if ((curList[1]._updateEL._size == 0) && (isAnyFloorEntity = *(byte *)&curList[1]._updateEL._data, isAnyFloorEntity != 0)) { if (isAnyFloorEntity < 4) { - memset(&(*(undefined1 *)((char *)(checksum) + 0x0)) + isAnyFloorEntity,0,(uint)(byte)(4 - isAnyFloorEntity)); + memset(&(*(undefined1 *)((char *)(checksum) + 0x0)) + isAnyFloorEntity,0,GHIDRA_UINT((byte)(4 - isAnyFloorEntity))); } uVar6 = curList[1]._updateEL._capacity; *(undefined1 *)&curList[1]._updateEL._data = 0; @@ -1041,24 +1041,24 @@ void EntityList::sort_by_render_z() int highOffset; if (DAT_00c7e810 == (void *)0x0) { - allocSize = (ulonglong)(uint)(this->_renderEL)._capacity * 4; + allocSize = (ulonglong)GHIDRA_UINT((this->_renderEL)._capacity) * 4; DAT_00c7e810 = operator_new_tracked - (-(uint)((int)((ulonglong)allocSize >> 0x20) != 0) | (uint)allocSize); + (-GHIDRA_UINT((GHIDRA_INT(((ulonglong)allocSize >> 0x20)) != 0)) | GHIDRA_UINT(allocSize)); } highOffset = 0; local_10 = (this->_renderEL)._size + -1; - if (0 < (int)local_10) { + if (0 < GHIDRA_INT(local_10)) { do { - uVar1 = (**(code **)(**(int **)((int)(this->_renderEL)._data + local_10 * 4) + 0x34))(); + uVar1 = (**(code **)(**(int **)(GHIDRA_INT((this->_renderEL)._data) + local_10 * 4) + 0x34))(); *(uint *)((char *)DAT_00c7e810 + local_10 * 4) = uVar1; if (uVar1 < 10000) { - for (; highOffset < (int)local_10; highOffset = highOffset + 1) { - lowRenderZ = (**(code **)(**(int **)((int)(this->_renderEL)._data + highOffset * 4) + 0x34))(); + for (; highOffset < GHIDRA_INT(local_10); highOffset = highOffset + 1) { + lowRenderZ = (**(code **)(**(int **)(GHIDRA_INT((this->_renderEL)._data) + highOffset * 4) + 0x34))(); if (9999 < lowRenderZ) { pvVar3 = (this->_renderEL)._data; swapTmp = *(undefined4 *)((char *)pvVar3 + highOffset * 4); *(undefined4 *)((char *)pvVar3 + highOffset * 4) = *(undefined4 *)((char *)pvVar3 + local_10 * 4); - *(undefined4 *)((int)(this->_renderEL)._data + local_10 * 4) = swapTmp; + *(undefined4 *)(GHIDRA_INT((this->_renderEL)._data) + local_10 * 4) = swapTmp; pvVar3 = DAT_00c7e810; *(uint *)((char *)DAT_00c7e810 + highOffset * 4) = uVar1; *(uint *)((char *)pvVar3 + local_10 * 4) = lowRenderZ; @@ -1068,30 +1068,30 @@ void EntityList::sort_by_render_z() } } local_10 = local_10 + -1; - } while (highOffset < (int)local_10); + } while (highOffset < GHIDRA_INT(local_10)); } - swapTmp = (**(code **)(**(int **)((int)(this->_renderEL)._data + highOffset * 4) + 0x34))(); + swapTmp = (**(code **)(**(int **)(GHIDRA_INT((this->_renderEL)._data) + highOffset * 4) + 0x34))(); pvVar3 = DAT_00c7e810; *(undefined4 *)((char *)DAT_00c7e810 + highOffset * 4) = swapTmp; highOffset = 0; renderCount = (this->_renderEL)._size; local_c = local_10 + 1; - if ((int)(renderCount - 1) <= (int)local_10) { + if (GHIDRA_INT((renderCount - 1)) <= GHIDRA_INT(local_10)) { local_c = local_10; } if (0 < local_c) { do { highOffset = local_c * 4; - highKey = (uint *)(highOffset + (int)pvVar3); + highKey = (uint *)(highOffset + GHIDRA_INT(pvVar3)); if (*highKey < 5000) { for (; highOffset < local_c; highOffset = highOffset + 1) { if (4999 < *(uint *)((char *)pvVar3 + highOffset * 4)) { pvVar3 = (this->_renderEL)._data; - entitySlot = (undefined4 *)((int)pvVar3 + highOffset * 4); + entitySlot = (undefined4 *)(GHIDRA_INT(pvVar3) + highOffset * 4); swapTmp = *entitySlot; *entitySlot = *(undefined4 *)((char *)pvVar3 + highOffset); pvVar3 = DAT_00c7e810; - *(undefined4 *)(highOffset + (int)(this->_renderEL)._data) = swapTmp; + *(undefined4 *)(highOffset + GHIDRA_INT((this->_renderEL)._data)) = swapTmp; uVar1 = *(uint *)((char *)pvVar3 + highOffset * 4); *(uint *)((char *)pvVar3 + highOffset * 4) = *highKey; *highKey = uVar1; @@ -1103,7 +1103,7 @@ void EntityList::sort_by_render_z() } while (highOffset < local_c); renderCount = (this->_renderEL)._size; } - highOffset = ((uint)(this->_renderEL)._capacity >> 4) + 1; + highOffset = (GHIDRA_UINT((this->_renderEL)._capacity) >> 4) + 1; if ((g_game->_frameCount & 1) == 0) { local_14 = 1; local_18 = 0; @@ -1116,11 +1116,11 @@ void EntityList::sort_by_render_z() break; pvVar3 = (this->_renderEL)._data; highOffset = highOffset + -1; - entitySlot = (undefined4 *)((int)pvVar3 + local_10 * 4); + entitySlot = (undefined4 *)(GHIDRA_INT(pvVar3) + local_10 * 4); swapTmp = *entitySlot; *entitySlot = *(undefined4 *)((char *)pvVar3 + local_c); pvVar3 = DAT_00c7e810; - *(undefined4 *)(local_c + (int)(this->_renderEL)._data) = swapTmp; + *(undefined4 *)(local_c + GHIDRA_INT((this->_renderEL)._data)) = swapTmp; swapTmp = *(undefined4 *)((char *)pvVar3 + local_10 * 4); *(undefined4 *)((char *)pvVar3 + local_10 * 4) = *(undefined4 *)((char *)pvVar3 + local_10 * 4 + -4); @@ -1152,11 +1152,11 @@ void EntityList::sort_by_render_z() break; pvVar3 = (this->_renderEL)._data; highOffset = highOffset + -1; - entitySlot = (undefined4 *)((int)pvVar3 + local_18 * 4); + entitySlot = (undefined4 *)(GHIDRA_INT(pvVar3) + local_18 * 4); swapTmp = *entitySlot; *entitySlot = *(undefined4 *)((char *)pvVar3 + local_c); pvVar3 = DAT_00c7e810; - *(undefined4 *)(local_c + (int)(this->_renderEL)._data) = swapTmp; + *(undefined4 *)(local_c + GHIDRA_INT((this->_renderEL)._data)) = swapTmp; swapTmp = *(undefined4 *)((char *)pvVar3 + local_18 * 4); *(undefined4 *)((char *)pvVar3 + local_18 * 4) = *(undefined4 *)((char *)pvVar3 + local_18 * 4 + -4); @@ -1188,9 +1188,9 @@ void EntityList::render_up_to(uint maxDepth, Vector *offset) float savedOffsetY; uVar1 = this->_renderCursor; - if (uVar1 < (uint)(this->_renderEL)._size) { + if (uVar1 < GHIDRA_UINT((this->_renderEL)._size)) { do { - this_00 = *(Entity **)((int)(this->_renderEL)._data + uVar1 * 4); + this_00 = *(Entity **)(GHIDRA_INT((this->_renderEL)._data) + uVar1 * 4); uVar1 = this_00->GetRenderZ(); if (maxDepth <= uVar1) { return; @@ -1243,7 +1243,7 @@ switchD_00419a0a_default: } uVar1 = this->_renderCursor + 1; this->_renderCursor = uVar1; - } while (uVar1 < (uint)(this->_renderEL)._size); + } while (uVar1 < GHIDRA_UINT((this->_renderEL)._size)); } return; } @@ -1282,7 +1282,7 @@ void EntityList::rebuild_sublists() listIndex = 0; if ((this->_updateEL)._size != 0) { do { - tmpEntity = *(Entity **)((int)(this->_updateEL)._data + listIndex * 4); + tmpEntity = *(Entity **)(GHIDRA_INT((this->_updateEL)._data) + listIndex * 4); tmpEntity->_collidesWithEntity = 0; if (tmpEntity->_entityCollisionClass != 0) { iVar5 = tmpEntity->_type; @@ -1313,11 +1313,11 @@ LAB_0041a0b4: } if ((iVar5 == 2) || (iVar5 == 8)) { if ((!bVar3) && (iVar5 == 2)) { - if ((((uint)tmpEntity[1]._pendingDamageFlags & (uint)g_tearFlagShielded._l) != 0 || - (*(uint *)((int)&tmpEntity[1]._pendingDamageFlags + 4) & - g_tearFlagShielded._l._4_4_) != 0) || - ((tmpEntity[1]._index & (uint)g_tearFlagShielded._h) != 0 || - (tmpEntity[1]._collisionIndex & g_tearFlagShielded._h._4_4_) != 0)) { + if (((GHIDRA_UINT(tmpEntity[1]._pendingDamageFlags) & GHIDRA_UINT(g_tearFlagShielded._l)) != 0 || + (*(uint *)(GHIDRA_INT(&tmpEntity[1]._pendingDamageFlags) + 4) & + (*(undefined4 *)((char *)&(g_tearFlagShielded._l) + 0x4))) != 0) || + ((tmpEntity[1]._index & GHIDRA_UINT(g_tearFlagShielded._h)) != 0 || + (tmpEntity[1]._collisionIndex & (*(undefined4 *)((char *)&(g_tearFlagShielded._h) + 0x4))) != 0)) { bVar3 = true; } } @@ -1358,7 +1358,7 @@ LAB_0041a0b4: } } listIndex = listIndex + 1; - } while (listIndex < (uint)(this->_updateEL)._size); + } while (listIndex < GHIDRA_UINT((this->_updateEL)._size)); } uVar1 = *(undefined4 *)&(*(undefined1 *)((char *)&(this[1]) + 0x1c)); *(undefined4 *)&this[1]._mainEL = uVar1; @@ -1377,113 +1377,113 @@ LAB_0041a0b4: ((CellSpace *)(*(void **)this))->CellSpace::collide(*(void **)&(*(undefined1 *)((char *)(this) + 0x8))); playerManager = &g_game->_playerManager; local_14 = 0; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> 2 + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { playerListEnd = *(void **)this; pvVar6 = (playerManager->_playerList)._end; - if ((int)pvVar6 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar6) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar6 = (playerManager->_playerList)._end; } playerSlot = (playerManager->_playerList)._begin; - if (local_14 < (uint)((int)pvVar6 - (int)playerSlot >> 2)) { + if (local_14 < GHIDRA_UINT((GHIDRA_INT(pvVar6) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + local_14; } ((CellSpace *)(playerListEnd))->CellSpace::collide_entity((Entity *)*playerSlot); playerManager = &g_game->_playerManager; local_14 = local_14 + 1; } while (local_14 < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } ((CellSpace *)(*(void **)&(*(undefined1 *)((char *)(this) + 0x4))))->CellSpace::collide(*(void **)&(*(undefined1 *)((char *)(this) + 0x8))); ((CellSpace *)(*(void **)&(*(undefined1 *)((char *)(this) + 0x8))))->CellSpace::collide_self(); local_14 = 0; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { game = g_game; playerListEnd = *(void **)&(*(undefined1 *)((char *)(this) + 0x8)); pvVar6 = (g_game->_playerManager)._playerList._end; - if ((int)pvVar6 - (int)(g_game->_playerManager)._playerList._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar6) - GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar6 = (game->_playerManager)._playerList._end; } playerSlot = (game->_playerManager)._playerList._begin; - if (local_14 < (uint)((int)pvVar6 - (int)playerSlot >> 2)) { + if (local_14 < GHIDRA_UINT((GHIDRA_INT(pvVar6) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + local_14; } ((CellSpace *)(playerListEnd))->CellSpace::collide_entity((Entity *)*playerSlot); local_14 = local_14 + 1; } while (local_14 < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); } local_14 = 0; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { game = g_game; playerListEnd = *(void **)&(*(undefined1 *)((char *)(this) + 0xc)); pvVar6 = (g_game->_playerManager)._playerList._end; - if ((int)pvVar6 - (int)(g_game->_playerManager)._playerList._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar6) - GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar6 = (game->_playerManager)._playerList._end; } playerSlot = (game->_playerManager)._playerList._begin; - if (local_14 < (uint)((int)pvVar6 - (int)playerSlot >> 2)) { + if (local_14 < GHIDRA_UINT((GHIDRA_INT(pvVar6) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + local_14; } ((CellSpace *)(playerListEnd))->CellSpace::collide_entity((Entity *)*playerSlot); local_14 = local_14 + 1; } while (local_14 < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); } local_14 = 0; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { game = g_game; playerListEnd = *(void **)&(*(undefined1 *)((char *)(this) + 0x10)); pvVar6 = (g_game->_playerManager)._playerList._end; - if ((int)pvVar6 - (int)(g_game->_playerManager)._playerList._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar6) - GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar6 = (game->_playerManager)._playerList._end; } playerSlot = (game->_playerManager)._playerList._begin; - if (local_14 < (uint)((int)pvVar6 - (int)playerSlot >> 2)) { + if (local_14 < GHIDRA_UINT((GHIDRA_INT(pvVar6) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + local_14; } ((CellSpace *)(playerListEnd))->CellSpace::collide_entity((Entity *)*playerSlot); local_14 = local_14 + 1; } while (local_14 < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); } if (1 < *(int *)&g_game->_deathmatchManager) { playerManager = &g_game->_playerManager; local_14 = 0; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { playerListEnd = *(void **)&(*(undefined1 *)((char *)(this) + 0x4)); pvVar6 = (playerManager->_playerList)._end; - if ((int)pvVar6 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar6) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar6 = (playerManager->_playerList)._end; } playerSlot = (playerManager->_playerList)._begin; - if (local_14 < (uint)((int)pvVar6 - (int)playerSlot >> 2)) { + if (local_14 < GHIDRA_UINT((GHIDRA_INT(pvVar6) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + local_14; } ((CellSpace *)(playerListEnd))->CellSpace::collide_entity((Entity *)*playerSlot); playerManager = &g_game->_playerManager; local_14 = local_14 + 1; } while (local_14 < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } ((CellSpace *)(*(void **)&(*(undefined1 *)((char *)(this) + 0x10))))->CellSpace::collide_self(); @@ -1496,24 +1496,24 @@ LAB_0041a0b4: ((CellSpace *)(*(void **)&(*(undefined1 *)((char *)(this) + 0x1c))))->CellSpace::collide(*(void **)&(*(undefined1 *)((char *)(this) + 0x8))); playerManager = &g_game->_playerManager; local_14 = 0; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> 2 + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { playerListEnd = (playerManager->_playerList)._end; playerSlot = (playerManager->_playerList)._begin; - if ((int)playerListEnd - (int)playerSlot >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerSlot) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (playerManager->_playerList)._end; playerSlot = (playerManager->_playerList)._begin; } - if (local_14 < (uint)((int)playerListEnd - (int)playerSlot >> 2)) { + if (local_14 < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + local_14; } tmpEntity = (Entity *)*playerSlot; this_01 = (Entity *)tmpEntity[7]._splatColor._colorize[1]; if ((this_01 != (Entity *)0x0) && (((fVar2 = this_01[5]._color._colorize[1], fVar2 == -NAN || - ((int)tmpEntity[5]._color._colorize[1] <= (int)fVar2)) || (this_01 == tmpEntity)))) { + (GHIDRA_INT(tmpEntity[5]._color._colorize[1]) <= GHIDRA_INT(fVar2))) || (this_01 == tmpEntity)))) { if ((g_game->_frameCount & 1) == 0) { if (((((tmpEntity->_sizeMulti).x == g_vectorOne.x) && ((tmpEntity->_sizeMulti).y == g_vectorOne.y)) && @@ -1560,13 +1560,13 @@ LAB_0041a727: playerManager = &g_game->_playerManager; local_14 = local_14 + 1; } while (local_14 < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } entityIndex = 0; if ((this->_updateEL)._size != 0) { do { - tmpEntity = *(Entity **)((int)(this->_updateEL)._data + entityIndex * 4); + tmpEntity = *(Entity **)(GHIDRA_INT((this->_updateEL)._data) + entityIndex * 4); if (tmpEntity->_type != 7) { if (tmpEntity->_type == 1) { ((Entity *)(tmpEntity))->Entity::PlayerCollideWithGrid(0); @@ -1576,7 +1576,7 @@ LAB_0041a727: } } entityIndex = entityIndex + 1; - } while (entityIndex < (uint)(this->_updateEL)._size); + } while (entityIndex < GHIDRA_UINT((this->_updateEL)._size)); } return; } @@ -1588,7 +1588,7 @@ void EntityList::AddPersistentEntity(Entity *entity) uint i; uint size; - if ((uint)(this->_persistentEL)._capacity <= (this->_persistentEL)._size + 0x32U) { + if (GHIDRA_UINT((this->_persistentEL)._capacity) <= (this->_persistentEL)._size + 0x32U) { KAGE_LogMessage(1,(byte *) "[warn] Can\'t add more persistent entities, persistent list is full!\n"); return; @@ -1606,11 +1606,11 @@ void EntityList::AddPersistentEntity(Entity *entity) piVar1 = piVar1 + 1; } while (i < size); } - if ((uint)(this->_persistentEL)._capacity < size + 1) { + if (GHIDRA_UINT((this->_persistentEL)._capacity) < size + 1) { KAGE_LogMessage(0x10,(byte *)"EL: not enough space for push_back\n"); size = (this->_persistentEL)._size; } - *(Entity **)((int)(this->_persistentEL)._data + size * 4) = entity; + *(Entity **)(GHIDRA_INT((this->_persistentEL)._data) + size * 4) = entity; piVar1 = &(this->_persistentEL)._size; *piVar1 = *piVar1 + 1; return; @@ -1674,7 +1674,7 @@ LAB_0041b62c: if ((((*(char *)(foundNode + 0xd) == '\0') && (*(int *)(foundNode + 0x10) <= type)) && ((*(int *)(foundNode + 0x10) < type || ((0x7fffffff < *(uint *)(foundNode + 0x14) && - (((int)*(uint *)(foundNode + 0x14) < -1 || (0x7fffffff < *(uint *)(foundNode + 0x18))))))))) + ((GHIDRA_INT(*(uint *)(foundNode + 0x14)) < -1 || (0x7fffffff < *(uint *)(foundNode + 0x18))))))))) && (foundNode != iVar1)) { FUN_0041cc60(&variant,foundNode); } @@ -1719,7 +1719,7 @@ int EntityList::CountEntities(Entity *spawner, int type, int variant, int subTyp i = 0; if (entityCount != 0) { do { - newCount = *(int *)((int)(this->_updateEL)._data + i * 4); + newCount = *(int *)(GHIDRA_INT((this->_updateEL)._data) + i * 4); if ((*(int *)(newCount + 0x28) == type) && (*(Entity **)(newCount + 0x3c8) == spawner)) { iVar1 = iVar1 + 1; @@ -1735,7 +1735,7 @@ int EntityList::CountEntities(Entity *spawner, int type, int variant, int subTyp if (type == 0) { if (entityCount != 0) { do { - newCount = *(int *)((int)(this->_updateEL)._data + i * 4); + newCount = *(int *)(GHIDRA_INT((this->_updateEL)._data) + i * 4); if ((*(int *)(newCount + 0x30) == subType) && (*(Entity **)(newCount + 0x3c8) == spawner)) { iVar1 = iVar1 + 1; @@ -1747,7 +1747,7 @@ int EntityList::CountEntities(Entity *spawner, int type, int variant, int subTyp } else if (entityCount != 0) { do { - newCount = *(int *)((int)(this->_updateEL)._data + i * 4); + newCount = *(int *)(GHIDRA_INT((this->_updateEL)._data) + i * 4); if (((*(int *)(newCount + 0x28) == type) && (*(int *)(newCount + 0x30) == subType)) && (*(Entity **)(newCount + 0x3c8) == spawner)) { iVar1 = iVar1 + 1; @@ -1763,7 +1763,7 @@ int EntityList::CountEntities(Entity *spawner, int type, int variant, int subTyp if (type == 0) { if (entityCount != 0) { do { - newCount = *(int *)((int)(this->_updateEL)._data + i * 4); + newCount = *(int *)(GHIDRA_INT((this->_updateEL)._data) + i * 4); if ((*(int *)(newCount + 0x2c) == variant) && (*(Entity **)(newCount + 0x3c8) == spawner)) { iVar1 = iVar1 + 1; @@ -1775,7 +1775,7 @@ int EntityList::CountEntities(Entity *spawner, int type, int variant, int subTyp } else if (entityCount != 0) { do { - newCount = *(int *)((int)(this->_updateEL)._data + i * 4); + newCount = *(int *)(GHIDRA_INT((this->_updateEL)._data) + i * 4); if (((*(int *)(newCount + 0x28) == type) && (*(int *)(newCount + 0x2c) == variant)) && (*(Entity **)(newCount + 0x3c8) == spawner)) { iVar1 = iVar1 + 1; @@ -1789,7 +1789,7 @@ int EntityList::CountEntities(Entity *spawner, int type, int variant, int subTyp i = 0; if (entityCount != 0) { do { - newCount = *(int *)((int)(this->_updateEL)._data + i * 4); + newCount = *(int *)(GHIDRA_INT((this->_updateEL)._data) + i * 4); if (((*(int *)(newCount + 0x2c) == variant) && (*(int *)(newCount + 0x30) == subType)) && (*(Entity **)(newCount + 0x3c8) == spawner)) { iVar1 = iVar1 + 1; @@ -1803,7 +1803,7 @@ int EntityList::CountEntities(Entity *spawner, int type, int variant, int subTyp i = 0; if (entityCount != 0) { do { - newCount = *(int *)((int)(this->_updateEL)._data + i * 4); + newCount = *(int *)(GHIDRA_INT((this->_updateEL)._data) + i * 4); if ((((*(int *)(newCount + 0x28) == type) && (*(int *)(newCount + 0x2c) == variant)) && (*(int *)(newCount + 0x30) == subType)) && (*(Entity **)(newCount + 0x3c8) == spawner)) { @@ -1826,8 +1826,8 @@ byte EntityList::HitListContains(Entity *entity) hitListIndex = ((Entity *)(entity))->Entity::GetHitListIndex(); lowerBound = *(uint **)this; - uVar1 = (int)*(uint **)&(*(undefined1 *)((char *)(this) + 0x4)) - (int)lowerBound >> 2; - while (count = uVar1, 0 < (int)count) { + uVar1 = GHIDRA_INT(*(uint **))&(*(undefined1 *)((char *)(this) + 0x4)) - GHIDRA_INT(lowerBound) >> 2; + while (count = uVar1, 0 < GHIDRA_INT(count)) { uVar1 = count >> 1; if (lowerBound[uVar1] < hitListIndex) { lowerBound = lowerBound + uVar1 + 1; @@ -1855,7 +1855,7 @@ EntityList_EL * EntityList::assign(EntityList_EL *dest, EntityList_EL *source) sublist_init((EntityList *)dest,(EntityList_EL *)&(*(undefined1 *)((char *)(this) + 0x80)),source->_size); local_8 = 0; copyCount = source->_size; - if ((uint)dest->_capacity < copyCount) { + if (GHIDRA_UINT(dest->_capacity) < copyCount) { KAGE_LogMessage(0x10,(byte *)"EL: not enough space for copy\n"); copyCount = source->_size; } @@ -1872,7 +1872,7 @@ Entity * EntityList::Get(uint index) uint clampedIndex; clampedIndex = *(int *)&(*(undefined1 *)((char *)(this) + 0xc)) - 1; - clampedIndex = -(uint)(index != 0) & index; + clampedIndex = -GHIDRA_UINT((index != 0)) & index; if (clampedIndex < clampedIndex) { clampedIndex = clampedIndex; } diff --git a/src/game/entity_list_el.cpp b/src/game/entity_list_el.cpp index 01c89d9..e6908cd 100644 --- a/src/game/entity_list_el.cpp +++ b/src/game/entity_list_el.cpp @@ -16,7 +16,7 @@ void EntityList_EL::push_back(Entity *entity) int count; count = this->_size; - if ((uint)this->_capacity < count + 1U) { + if (GHIDRA_UINT(this->_capacity) < count + 1U) { KAGE_LogMessage(0x10,(byte *)"EL: not enough space for push_back\n"); count = this->_size; } @@ -46,7 +46,7 @@ void EntityList_EL::remove(Entity *entity) shiftIndex = uVar1; if (uVar1 < size - 1) { do { - slotPtr = (undefined4 *)((int)this->_data + shiftIndex * 4); + slotPtr = (undefined4 *)(GHIDRA_INT(this->_data) + shiftIndex * 4); shiftIndex = shiftIndex + 1; *slotPtr = slotPtr[1]; size = this->_size; diff --git a/src/game/entity_npc.cpp b/src/game/entity_npc.cpp index 65c904e..1459422 100644 --- a/src/game/entity_npc.cpp +++ b/src/game/entity_npc.cpp @@ -109,7 +109,7 @@ void Entity_NPC::Hornfel_UpdateAI() local_14 = 0xffffffff; puStack_18 = &LAB_00af349d; local_1c = ExceptionList; - uVar3 = __security_cookie ^ (uint)(local_50 + 0x40); + uVar3 = __security_cookie ^ GHIDRA_UINT((local_50 + 0x40)); ExceptionList = &local_1c; local_12c = this->_minecart; activeRoom = g_game->_room; @@ -144,33 +144,33 @@ void Entity_NPC::Hornfel_UpdateAI() local_14 = 0xffffffff; ((EntityList_Query *)(&fStack_34))->EntityList_Query::~EntityList_Query(); } - flagsHigh = *(undefined4 *)((int)&this->_flags + 4); - *(uint *)&this->_flags = (uint)this->_flags & 0xfffffffb; - *(undefined4 *)((int)&this->_flags + 4) = flagsHigh; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); + *(uint *)&this->_flags = GHIDRA_UINT(this->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = flagsHigh; layer = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer((byte *)0x3); layer->_visible = 0; layer = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer(&DAT_00000004); layer->_visible = 0; this->_stateFrame = 0; - *(undefined4 *)((int)&this->_projectileCooldown + 2) = 0; - *(undefined1 *)((int)&this->_projectileDelay + 2) = 0; + *(undefined4 *)(GHIDRA_INT(&this->_projectileCooldown) + 2) = 0; + *(undefined1 *)(GHIDRA_INT(&this->_projectileDelay) + 2) = 0; *(undefined2 *)&this->_projectileCooldown = 0; std::deque::resize(2); uVar3 = (this->_entityDeque)._offset; *(undefined4 *) - (*(int *)((int)(this->_entityDeque)._map + ((this->_entityDeque)._mapSize - 1 & uVar3 >> 2) * 4 + (*(int *)(GHIDRA_INT((this->_entityDeque)._map) + ((this->_entityDeque)._mapSize - 1 & uVar3 >> 2) * 4 ) + (uVar3 & 3) * 4) = 0; scratchVec.y = (float)(this->_entityDeque)._offset; *(undefined4 *) - (*(int *)((int)(this->_entityDeque)._map + - ((this->_entityDeque)._mapSize - 1 & (int)scratchVec.y + 1U >> 2) * 4) + - ((int)scratchVec.y + 1U & 3) * 4) = 0; + (*(int *)(GHIDRA_INT((this->_entityDeque)._map) + + ((this->_entityDeque)._mapSize - 1 & GHIDRA_INT(scratchVec.y) + 1U >> 2) * 4) + + (GHIDRA_INT(scratchVec.y) + 1U & 3) * 4) = 0; if (this->_variant == 1) { - flagsHigh = *(undefined4 *)((int)&this->_flags + 4); - *(uint *)&this->_flags = (uint)this->_flags | 0x140011; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); + *(uint *)&this->_flags = GHIDRA_UINT(this->_flags) | 0x140011; this->_state = 0x10; this->_isInvicible = 1; - *(undefined4 *)((int)&this->_flags + 4) = flagsHigh; + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = flagsHigh; puVar1 = puStack_20; } else { @@ -179,31 +179,31 @@ void Entity_NPC::Hornfel_UpdateAI() newMinecart = ((Entity *)((Entity *)this))->Entity::GiveMinecart(&g_vectorZero,&g_vectorZero); local_2c = (EntityPtr)0x0; local_28 = (EntityPtr)0xf; - local_50._20_4_ = 0.0; - local_50._20_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(local_50) + 0x14)) = 0.0; + (*(undefined4 *)((char *)&(local_50) + 0x14)) = std::_Allocate(0x30); local_2c = (EntityPtr)0x21; local_28 = (EntityPtr)0x2f; - builtin_strncpy((char *)local_50._20_4_,"gfx/965.001_hornfel minecart.anm2",0x22); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_50) + 0x14)),"gfx/965.001_hornfel minecart.anm2",0x22); local_14 = 1; ((ANM2 *)(&newMinecart->_sprite))->ANM2::Load((std_string *)(local_50 + 0x14),1); local_14 = 0xffffffff; - if (0xf < (uint)local_28) { - projectile = (EntityPtr *)((int)local_28 + 1); - pcVar7 = (char *)local_50._20_4_; + if (0xf < GHIDRA_UINT(local_28)) { + projectile = (EntityPtr *)(GHIDRA_INT(local_28) + 1); + pcVar7 = (*(undefined4 *)((char *)&((char *)local_50) + 0x14)); if ((EntityPtr *)0xfff < projectile) { - pcVar7 = *(char **)(local_50._20_4_ + -4); - projectile = (EntityPtr *)((int)local_28 + 0x24); - if ((char *)0x1f < (char *)(local_50._20_4_ + (-4 - (int)pcVar7))) { + pcVar7 = *(char **)((*(undefined4 *)((char *)&(local_50) + 0x14)) + -4); + projectile = (EntityPtr *)(GHIDRA_INT(local_28) + 0x24); + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_50) + 0x14)) + (-4 - GHIDRA_INT(pcVar7)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(pcVar7,(uint)projectile); + operator_delete(pcVar7,GHIDRA_UINT(projectile)); } local_12c = this->_minecart; } NpcHelper::hornfel_ride_minecart(this); - *(undefined2 *)((int)&this->_projectileCooldown + 1) = 0x1e1e; + *(undefined2 *)(GHIDRA_INT(&this->_projectileCooldown) + 1) = 0x1e1e; puVar1 = puStack_20; } break; @@ -220,9 +220,9 @@ void Entity_NPC::Hornfel_UpdateAI() puVar1 = puStack_20; if ((0 < timer) && (timer = timer + -1, *(short *)&this->_projectileDelay = timer, timer < 1)) { if (this->_state == 0xe) { - if (*(char *)((int)&this->_projectileDelay + 3) != '\0') { + if (*(char *)(GHIDRA_INT(&this->_projectileDelay) + 3) != '\0') { ((ANM2 *)(&this->_sprite))->ANM2::Play((byte *)"Taunt",0); - *(undefined1 *)((int)&this->_projectileCooldown + 3) = 0x96; + *(undefined1 *)(GHIDRA_INT(&this->_projectileCooldown) + 3) = 0x96; puVar1 = puStack_20; } } @@ -267,7 +267,7 @@ LAB_004ba3e5: bVar11 = bVar2 < *(byte *)EVar4; if (bVar2 != *(byte *)EVar4) { LAB_004ba3c4: - uVar3 = -(uint)bVar11 | 1; + uVar3 = -GHIDRA_UINT(bVar11) | 1; goto LAB_004ba3c9; } if (bVar2 == 0) break; @@ -275,13 +275,13 @@ LAB_004ba3c4: bVar11 = bVar2 < *(byte *)((char *)EVar4 + 1); if (bVar2 != *(byte *)((char *)EVar4 + 1)) goto LAB_004ba3c4; animName = animName + 2; - EVar4 = (EntityPtr)((int)EVar4 + 2); + EVar4 = (EntityPtr)(GHIDRA_INT(EVar4) + 2); } while (bVar2 != 0); uVar3 = 0; LAB_004ba3c9: if ((uVar3 != 0) || ((puStack_20 = local_50 + 0x4c, - *(char *)((int)(this->_sprite)._animState._animData + 0x34) != '\0' && + *(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) != '\0' && (puStack_20 = local_50 + 0x4c, (this->_sprite)._animState._isPlaying == 0)))) goto LAB_004ba3e5; } @@ -291,7 +291,7 @@ LAB_004ba3c9: timer = (short)this->_projectileDelay; if (0 < timer) { *(short *)&this->_projectileDelay = - timer - ((short)(int)this->_updateTime - (short)(int)this->_prevUpdateTime); + timer - ((short)GHIDRA_INT(this->_updateTime) - (short)GHIDRA_INT(this->_prevUpdateTime)); } if (this->_entityRef == (EntityPtr)0x0) { local_104 = (EntityPtr)0xffffffff; @@ -309,7 +309,7 @@ LAB_004ba3c9: if ((this->_entityRef != (EntityPtr)0x0) && (bVar2 = ((Entity *)((Entity *)this))->Entity::IsFrame(10,0), bVar2 != 0)) { bVar2 = 0; - vecPtr = ((Room *)(room))->Room::GetGridPosition(&tmpVec,(int)local_104); + vecPtr = ((Room *)(room))->Room::GetGridPosition(&tmpVec,GHIDRA_INT(local_104)); bVar2 = ((NPCAI_Pathfinder *)(&this->_pathfinder))->NPCAI_Pathfinder::HasPathToPos(vecPtr,bVar2); projectile = &this->_entityRef; if (bVar2 == 0) { @@ -331,7 +331,7 @@ LAB_004ba3c9: local_104 = EVar4; if (*(int *)((char *)local_11c + 0x1264) != 0) { do { - EVar10 = *(EntityPtr *)(*(int *)((char *)local_11c + 0x125c) + (int)local_108 * 4); + EVar10 = *(EntityPtr *)(*(int *)((char *)local_11c + 0x125c) + GHIDRA_INT(local_108) * 4); if (*(int *)((char *)EVar10 + 0x28) == 0x3c7) { fVar13 = (this->_pos).y - *(float *)((char *)EVar10 + 0x340); fVar12 = (this->_pos).x - *(float *)((char *)EVar10 + 0x33c); @@ -346,8 +346,8 @@ LAB_004ba3c9: local_104 = EVar10; } } - local_108 = (EntityPtr)((int)local_108 + 1); - } while ((uint)local_108 < (uint)*(EntityPtr *)((char *)local_11c + 0x1264)); + local_108 = (EntityPtr)(GHIDRA_INT(local_108) + 1); + } while (GHIDRA_UINT(local_108) < GHIDRA_UINT(*(EntityPtr *)((char *)local_11c + 0x1264))); if (EVar4 != (EntityPtr)0x0) { if (this->_entityRef != (EntityPtr)0x0) { local_100 = (EntityPtr)&this->_entityRef; @@ -402,8 +402,8 @@ LAB_004ba7a3: local_100 = (EntityPtr)cos((float)local_100); uVar3 = Random(); fVar13 = approach_angle((this->_v1).x,(float)local_11c, - (float)((double)(int)uVar3 + - __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * 2.3283064e-10 + (float)((double)GHIDRA_INT(uVar3) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 3.0 + 0.5); bVar2 = this->_collidesWithGrid; fVar12 = this->_speedMultiplier; @@ -425,7 +425,7 @@ LAB_004ba7a3: LAB_004ba6b2: activeRoom = room; if (local_130 == (EntityPtr)0x0) goto LAB_004ba7a3; - ((Room *)(room))->Room::GetGridPosition(&scratchVec,(int)EVar4); + ((Room *)(room))->Room::GetGridPosition(&scratchVec,GHIDRA_INT(EVar4)); if (isAtRailTarget == '\0') { this->_entityGridCollisionClass = 5; PathFinder::FindGridPath((PathFinder *)&this->_pathfinder,&scratchVec,1.08,0,1); @@ -487,7 +487,7 @@ LAB_004ba6b2: timer = (short)this->_stateFrame; if (timer == 0) { puVar1 = local_50 + 0x4c; - if (*(short *)((int)&this->_stateFrame + 2) < 1) { + if (*(short *)(GHIDRA_INT(&this->_stateFrame) + 2) < 1) { puStack_20 = local_50 + 0x4c; NpcHelper::hornfel_minecart(this); puVar1 = puStack_20; @@ -514,7 +514,7 @@ LAB_004ba6b2: local_104 = (EntityPtr)(tmpEntity->_velocity).x; local_128 = (tmpEntity->_velocity).y; uVar3 = Random(); - fVar12 = (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + fVar12 = (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 0.20000002 + 0.1; local_104 = (EntityPtr)((float)local_104 * fVar12); local_128 = local_128 * fVar12; @@ -528,33 +528,33 @@ LAB_004ba6b2: launchTarget.x = vecPtr->x; launchTarget.y = vecPtr->y; uVar3 = (this->_entityDeque)._mapSize; - if (*(int *)(*(int *)((int)(this->_entityDeque)._map + - ((this->_entityDeque)._mapSize - 1 & (uint)fVar12 >> 2) * 4) + - ((uint)fVar12 & 3) * 4) == 0) { - local_fc = (EntityPtr)((int)fVar12 + 1U >> 2); - uVar6 = (int)fVar12 + 1U & 3; + if (*(int *)(*(int *)(GHIDRA_INT((this->_entityDeque)._map) + + ((this->_entityDeque)._mapSize - 1 & GHIDRA_UINT(fVar12) >> 2) * 4) + + (GHIDRA_UINT(fVar12) & 3) * 4) == 0) { + local_fc = (EntityPtr)(GHIDRA_INT(fVar12) + 1U >> 2); + uVar6 = GHIDRA_INT(fVar12) + 1U & 3; scratchVec.y = fVar12; - if (*(int *)(*(int *)((int)(this->_entityDeque)._map + (uVar3 - 1 & (uint)local_fc) * 4) + + if (*(int *)(*(int *)(GHIDRA_INT((this->_entityDeque)._map) + (uVar3 - 1 & GHIDRA_UINT(local_fc)) * 4) + uVar6 * 4) != 0) { NpcHelper::hornfel_launch_toward (this,*(Entity **) - (*(int *)((int)(this->_entityDeque)._map + - ((this->_entityDeque)._mapSize - 1 & (uint)local_fc) * 4) + + (*(int *)(GHIDRA_INT((this->_entityDeque)._map) + + ((this->_entityDeque)._mapSize - 1 & GHIDRA_UINT(local_fc)) * 4) + uVar6 * 4),&launchTarget); scratchVec.y = (float)(this->_entityDeque)._offset; - uVar3 = (int)scratchVec.y + 1; + uVar3 = GHIDRA_INT(scratchVec.y) + 1; goto LAB_004b9d9e; } } else { NpcHelper::hornfel_launch_toward (this,*(Entity **) - (*(int *)((int)(this->_entityDeque)._map + - (uVar3 - 1 & (uint)fVar12 >> 2) * 4) + ((uint)fVar12 & 3) * 4), + (*(int *)(GHIDRA_INT((this->_entityDeque)._map) + + (uVar3 - 1 & GHIDRA_UINT(fVar12) >> 2) * 4) + (GHIDRA_UINT(fVar12) & 3) * 4), &launchTarget); uVar3 = (this->_entityDeque)._offset; LAB_004b9d9e: - iVar5 = *(int *)((int)(this->_entityDeque)._map + + iVar5 = *(int *)(GHIDRA_INT((this->_entityDeque)._map) + ((this->_entityDeque)._mapSize - 1 & uVar3 >> 2) * 4); EVar4 = (EntityPtr)(iVar5 + (uVar3 & 3) * 4); if (*(int *)(iVar5 + (uVar3 & 3) * 4) != 0) { @@ -563,18 +563,18 @@ LAB_004b9d9e: } *(undefined4 *)EVar4 = 0; } - pcVar7 = (char *)((int)&this->_projectileDelay + 2); + pcVar7 = (char *)(GHIDRA_INT(&this->_projectileDelay) + 2); *pcVar7 = *pcVar7 + '\x01'; } puVar1 = puStack_20; if ((((((this->_sprite)._animState._animData == (void *)0x0) || ((this->_sprite)._animState._isPlaying == 0)) && - (this->_state = 3, *(char *)((int)&this->_projectileDelay + 3) != '\0')) && - ((*(char *)((int)&this->_projectileCooldown + 3) == '\0' && + (this->_state = 3, *(char *)(GHIDRA_INT(&this->_projectileDelay) + 3) != '\0')) && + ((*(char *)(GHIDRA_INT(&this->_projectileCooldown) + 3) == '\0' && (uVar3 = Random(), puVar1 = puStack_20, uVar3 % 10 == 0)))) && (0.5 < this->_health / this->_maxHitPoints)) { ((ANM2 *)(&this->_sprite))->ANM2::Play((byte *)"Taunt",0); - *(undefined1 *)((int)&this->_projectileCooldown + 3) = 0x96; + *(undefined1 *)(GHIDRA_INT(&this->_projectileCooldown) + 3) = 0x96; puVar1 = puStack_20; } break; @@ -633,7 +633,7 @@ LAB_004b9d9e: if (fVar12 <= (float)absDirY) { vecPtr = &local_148; } - EVar10 = (EntityPtr)((int)EVar10 + 8); + EVar10 = (EntityPtr)(GHIDRA_INT(EVar10) + 8); spreadScore = (EntityPtr)(vecPtr->x * (float)local_11c + (float)spreadScore); } while (EVar10 != EVar4); if ((float)local_138 < (float)spreadScore) { @@ -641,7 +641,7 @@ LAB_004b9d9e: launchTarget.y = scratchVec.y; local_138 = spreadScore; } - local_134 = (EntityPtr)((int)local_134 + -1); + local_134 = (EntityPtr)(GHIDRA_INT(local_134) + -1); } while (local_134 != (EntityPtr)0x0); local_134 = (EntityPtr)0x0; this = (Entity_NPC *)local_100; @@ -652,7 +652,7 @@ LAB_004b9d9e: launchTarget.y = (float)local_134; local_11c = (EntityPtr)launchTarget.x; uVar3 = Random(); - tmpEntity = ((Game *)(g_game))->Game::Spawn(4,0xf,(Vector *)((int)this + 0x33c),&g_vectorZero, + tmpEntity = ((Game *)(g_game))->Game::Spawn(4,0xf,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero, (Entity *)0x0,0,uVar3); NpcHelper::hornfel_launch_toward(this,tmpEntity,&launchTarget); tmpEntity->_entityCollisionClass = 1; @@ -664,20 +664,20 @@ LAB_004b9d9e: else { *(EntityPtr *)local_2c = local_11c; *(EntityPtr *)((char *)local_2c + 4) = local_134; - local_2c = (EntityPtr)((int)local_2c + 8); + local_2c = (EntityPtr)(GHIDRA_INT(local_2c) + 8); } - local_fc = (EntityPtr)((int)local_fc + -1); + local_fc = (EntityPtr)(GHIDRA_INT(local_fc) + -1); } while (local_fc != (EntityPtr)0x0); local_14 = 0xffffffff; *(undefined2 *)((char *)this + 0x412) = 0x7d; puVar1 = puStack_20; if (local_130 != (EntityPtr)0x0) { - uVar3 = ((int)local_108 - (int)local_130 >> 3) * 8; + uVar3 = (GHIDRA_INT(local_108) - GHIDRA_INT(local_130) >> 3) * 8; EVar4 = local_130; if (0xfff < uVar3) { EVar4 = *(EntityPtr *)((char *)local_130 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)local_130 - (int)EVar4) - 4U) { + if (0x1f < (GHIDRA_INT(local_130) - GHIDRA_INT(EVar4)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -704,7 +704,7 @@ LAB_004b9d9e: )) { vecPtr = MusicManager::RandomVector(&launchTarget); uVar3 = Random(); - fVar12 = (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + fVar12 = (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10; scratchVec.y = fVar12 * vecPtr->y + (this->_pos).y; scratchVec.x = fVar12 * vecPtr->x + (this->_pos).x; @@ -722,15 +722,15 @@ LAB_004b9d9e: bVar2 = ((Sprite *)((Sprite *)&this->_sprite))->Sprite::IsEventTriggered("Shoot"); if (bVar2 != 0) { ((ProjectileParams *)(&projectileParams))->ProjectileParams::ProjectileParams(); - projectileParams.BulletFlags._4_4_ = projectileParams.BulletFlags._4_4_ | 8; - local_50._0_4_ = 1.0; - local_50._4_4_ = 1.0; - local_50._8_4_ = 1.0; - local_50._12_4_ = 1.0; + (*(undefined4 *)((char *)&(projectileParams.BulletFlags) + 0x4)) = (*(undefined4 *)((char *)&(projectileParams.BulletFlags) + 0x4)) | 8; + (*(undefined4 *)((char *)&(local_50) + 0x0)) = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0x8)) = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0xc)) = 1.0; projectileParams.Scale = 2.0; local_30 = (EntityPtr)0x3f800000; - local_50._16_4_ = 0.0; - local_50._20_4_ = (char *)0x0; + (*(undefined4 *)((char *)&(local_50) + 0x10)) = 0.0; + (*(undefined4 *)((char *)&(local_50) + 0x14)) = (char *)0x0; fStack_38 = 0.0; fStack_34 = 0.0; local_2c = (EntityPtr)0x3e99999a; @@ -854,12 +854,12 @@ LAB_004baae3: if (0 < *(short *)((char *)this + 0x412)) { *(short *)((char *)this + 0x412) = *(short *)((char *)this + 0x412) + -1; } - pfVar8 = ((std_vector *)((int)this + 8))->_begin; + pfVar8 = ((std_vector *)(GHIDRA_INT(this) + 8))->_begin; if (pfVar8 != *(void **)((char *)this + 0xc)) { do { tmpVec.y = pfVar8[3]; - if (((((((uint)pfVar8[2] & 4) != 0) && (pfVar8[6] != 1.4013e-45)) && (pfVar8[4] != 1.4013e-45) - ) || ((((uint)pfVar8[2] & 8) != 0 && (pfVar8[4] == *(float *)((char *)this + 0x28))))) || + if ((((((GHIDRA_UINT(pfVar8[2]) & 4) != 0) && (pfVar8[6] != 1.4013e-45)) && (pfVar8[4] != 1.4013e-45) + ) || (((GHIDRA_UINT(pfVar8[2]) & 8) != 0 && (pfVar8[4] == *(float *)((char *)this + 0x28))))) || ((pfVar8[4] == 1.4013e-42 && ((pfVar8[5] == 2.05991e-43 && (pfVar8[6] != 1.4013e-45)))))) { *(float *)((char *)this + 0x14) = *(float *)((char *)this + 0x14) - *pfVar8; *pfVar8 = 0.0; @@ -888,7 +888,7 @@ LAB_004baae3: if (*(byte *)((char *)this + 0x173) != 0) { if (*(int *)((char *)this + 0x2c) == 1) { uVar3 = Random(); - vecPtr = (Vector *)((int)this + 0x33c); + vecPtr = (Vector *)(GHIDRA_INT(this) + 0x33c); ((Game *)(g_game))->Game::Spawn(1000,1,vecPtr,&g_vectorZero,(Entity *)0x0,0,uVar3); uVar3 = Random(); tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x12,vecPtr,&g_vectorZero,(Entity *)0x0,0,uVar3); @@ -897,19 +897,19 @@ LAB_004baae3: iVar5 = 6; do { uVar3 = Random(); - fVar12 = (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + fVar12 = (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_fc = (EntityPtr)(fVar12 + fVar12); uVar3 = Random(); local_108 = (EntityPtr) - ((float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 15.0 + 5.0); scratchVec.x = cos((float)local_fc); scratchVec.x = scratchVec.x * (float)local_108; scratchVec.y = sin((float)local_fc); scratchVec.y = scratchVec.y * (float)local_108; uVar3 = Random(); - tmpEntity = ((Game *)(g_game))->Game::Spawn(4,3,(Vector *)((int)this + 0x33c),&scratchVec,(Entity *)this, + tmpEntity = ((Game *)(g_game))->Game::Spawn(4,3,(Vector *)(GHIDRA_INT(this) + 0x33c),&scratchVec,(Entity *)this, 0,uVar3); tmpEntity->_entityCollisionClass = 1; iVar5 = iVar5 + -1; @@ -917,25 +917,25 @@ LAB_004baae3: } else if ((local_12c != (EntityPtr)0x0) && (*(byte *)((char *)this + 0x171) != 0)) { uVar3 = Random(); - ((Game *)(g_game))->Game::Spawn(1000,1,(Vector *)((int)this + 0x33c),&g_vectorZero,(Entity *)0x0,0,uVar3); + ((Game *)(g_game))->Game::Spawn(1000,1,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero,(Entity *)0x0,0,uVar3); if (*(int *)((char *)this + 0xb64) == 8) { - if (*(int *)(*(int *)((int)*(void **)((char *)this + 0xbf4) + + if (*(int *)(*(int *)(GHIDRA_INT(*(void **)((char *)this + 0xbf4)) + (*(uint *)((char *)this + 0xbf8) - 1 & *(uint *)((char *)this + 0xbfc) >> 2) * 4) + (*(uint *)((char *)this + 0xbfc) & 3) * 4) != 0) { vecPtr = MusicManager::RandomVector(&tmpVec); uVar3 = Random(); - fVar12 = (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + fVar12 = (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 10.0; scratchVec.y = fVar12 * vecPtr->y + *(float *)((char *)this + 0x340); - scratchVec.x = fVar12 * vecPtr->x + ((Vector *)((int)this + 0x33c))->x; + scratchVec.x = fVar12 * vecPtr->x + ((Vector *)(GHIDRA_INT(this) + 0x33c))->x; NpcHelper::hornfel_launch_toward (this,*(Entity **) - (*(int *)((int)*(void **)((char *)this + 0xbf4) + + (*(int *)(GHIDRA_INT(*(void **)((char *)this + 0xbf4)) + (*(uint *)((char *)this + 0xbf8) - 1 & *(uint *)((char *)this + 0xbfc) >> 2) * 4) + (*(uint *)((char *)this + 0xbfc) & 3) * 4),&scratchVec); uVar3 = *(uint *)((char *)this + 0xbfc) & 3; - iVar5 = *(int *)((int)*(void **)((char *)this + 0xbf4) + + iVar5 = *(int *)(GHIDRA_INT(*(void **)((char *)this + 0xbf4)) + (*(uint *)((char *)this + 0xbfc) >> 2 & *(uint *)((char *)this + 0xbf8) - 1) * 4 ); EVar4 = (EntityPtr)(iVar5 + uVar3 * 4); @@ -946,24 +946,24 @@ LAB_004baae3: *(undefined4 *)EVar4 = 0; } tmpVec.y = *(float *)((char *)this + 0xbfc); - if (*(int *)(*(int *)((int)*(void **)((char *)this + 0xbf4) + - ((int)tmpVec.y + 1U >> 2 & *(uint *)((char *)this + 0xbf8) - 1) * 4) + - ((int)tmpVec.y + 1U & 3) * 4) != 0) { + if (*(int *)(*(int *)(GHIDRA_INT(*(void **)((char *)this + 0xbf4)) + + (GHIDRA_INT(tmpVec.y) + 1U >> 2 & *(uint *)((char *)this + 0xbf8) - 1) * 4) + + (GHIDRA_INT(tmpVec.y) + 1U & 3) * 4) != 0) { vecPtr = MusicManager::RandomVector(&tmpVec); uVar6 = Random(); uVar3 = *(uint *)((char *)this + 0xbfc) + 1; - fVar12 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar12 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 10.0; scratchVec.y = fVar12 * vecPtr->y + *(float *)((char *)this + 0x340); - scratchVec.x = fVar12 * vecPtr->x + ((Vector *)((int)this + 0x33c))->x; + scratchVec.x = fVar12 * vecPtr->x + ((Vector *)(GHIDRA_INT(this) + 0x33c))->x; NpcHelper::hornfel_launch_toward (this,*(Entity **) - (*(int *)((int)*(void **)((char *)this + 0xbf4) + + (*(int *)(GHIDRA_INT(*(void **)((char *)this + 0xbf4)) + (uVar3 >> 2 & *(uint *)((char *)this + 0xbf8) - 1) * 4) + (uVar3 & 3) * 4),&scratchVec); uVar3 = *(uint *)((char *)this + 0xbfc) + 1; uVar6 = uVar3 & 3; - iVar5 = *(int *)((int)*(void **)((char *)this + 0xbf4) + + iVar5 = *(int *)(GHIDRA_INT(*(void **)((char *)this + 0xbf4)) + (uVar3 >> 2 & *(uint *)((char *)this + 0xbf8) - 1) * 4); EVar4 = (EntityPtr)(iVar5 + uVar6 * 4); if (*(int *)(iVar5 + uVar6 * 4) != 0) { @@ -975,8 +975,8 @@ LAB_004baae3: } NpcHelper::minecart_break((Entity_NPC *)local_12c); *(int *)((char *)this + 0xb64) = 0xd; - ((ANM2 *)((ANM2 *)((int)this + 0x48)))->ANM2::Play(&DAT_00b1cdf8,0); - projectile = (EntityPtr *)((int)this + 0xbec); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x48)))->ANM2::Play(&DAT_00b1cdf8,0); + projectile = (EntityPtr *)(GHIDRA_INT(this) + 0xbec); *(int *)((char *)this + 0x184) = 5; *(byte *)((char *)this + 0x173) = 0; *(float *)((char *)this + 0x380) = 100.0; @@ -1019,16 +1019,16 @@ void Entity_NPC::Hornfel_UpdateFrame() NpcAI::ENTITY_MINECART((Entity_NPC *)minecart); } *(int *)((char *)minecart + 0xb64) = 3; - ((Vector *)((int)minecart + 0x33c))->x = (this->_targetPosition).x; + ((Vector *)(GHIDRA_INT(minecart) + 0x33c))->x = (this->_targetPosition).x; *(float *)((char *)minecart + 0x340) = (this->_targetPosition).y; - ((Vector *)((int)minecart + 0x360))->x = g_vectorZero.x; + ((Vector *)(GHIDRA_INT(minecart) + 0x360))->x = g_vectorZero.x; *(float *)((char *)minecart + 0x364) = g_vectorZero.y; return; } gridWidth = *(int *)((char *)g_game->_room + 0xc); gridHeight = *(int *)((char *)g_game->_room + 0x10); - column = (int)((((Vector *)((int)minecart + 0x33c))->x - 40.0) / 40.0 + 0.5); - row = (int)((*(float *)((char *)minecart + 0x340) - 120.0) / 40.0 + 0.5); + column = GHIDRA_INT(((((Vector *)(GHIDRA_INT(minecart) + 0x33c))->x - 40.0) / 40.0 + 0.5)); + row = GHIDRA_INT(((*(float *)((char *)minecart + 0x340) - 120.0) / 40.0 + 0.5)); if (column < 1) { LAB_004bb1a5: if (column < 0) goto LAB_004bb1bb; @@ -1095,17 +1095,17 @@ LAB_004cde91: uVar6 = 0; playerManager = &g_game->_playerManager; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar3 = (playerManager->_playerList)._end; - if ((int)pvVar3 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar3) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar3 = (playerManager->_playerList)._end; game = g_game; } playerSlot = (playerManager->_playerList)._begin; - if (uVar6 < (uint)((int)pvVar3 - (int)playerSlot >> 2)) { + if (uVar6 < GHIDRA_UINT((GHIDRA_INT(pvVar3) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + uVar6; } iVar5 = *playerSlot; @@ -1119,13 +1119,13 @@ LAB_004cde91: } playerManager = &game->_playerManager; uVar6 = uVar6 + 1; - } while (uVar6 < (uint)((int)(game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar6 < GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } pvVar3 = game->_room; - iVar5 = (int)(((this->_pos).x - 40.0) / 40.0 + 0.5); + iVar5 = GHIDRA_INT((((this->_pos).x - 40.0) / 40.0 + 0.5)); if ((((-1 < iVar5) && (iVar5 < *(int *)((char *)pvVar3 + 0xc))) && - (iVar4 = (int)(((this->_pos).y - 120.0) / 40.0 + 0.5), -1 < iVar4)) && + (iVar4 = GHIDRA_INT((((this->_pos).y - 120.0) / 40.0 + 0.5)), -1 < iVar4)) && ((iVar4 < *(int *)((char *)pvVar3 + 0x10) && (uVar6 = *(int *)((char *)pvVar3 + 0xc) * iVar4 + iVar5, uVar6 < 0x1c0)))) { iVar5 = *(int *)((char *)pvVar3 + uVar6 * 4 + 0x76c); @@ -1216,14 +1216,14 @@ void Entity_NPC::apply_velocity(char param_2) railPoint.x = 0.0; railTangent.y = 0.0; railTangent.x = 0.0; - gridX = (int)((fVar2 - 40.0) / 40.0 + 0.5); + gridX = GHIDRA_INT(((fVar2 - 40.0) / 40.0 + 0.5)); if ((((-1 < gridX) && (gridX < *(int *)((char *)local_18 + 0xc))) && - (gridY = (int)(((this->_pos).y - 120.0) / 40.0 + 0.5), -1 < gridY)) && + (gridY = GHIDRA_INT((((this->_pos).y - 120.0) / 40.0 + 0.5)), -1 < gridY)) && (gridY < *(int *)((char *)local_18 + 0x10))) { gridIdx = *(int *)((char *)local_18 + 0xc) * gridY + gridX; if ((gridIdx < 0x1c0) && (bVar1 = *(byte *)((char *)g_game->_room + gridIdx + 0x746c), bVar1 != 0xff)) { - this_01 = (RailManager *)((int)local_18 + 0x7468); + this_01 = (RailManager *)(GHIDRA_INT(local_18) + 0x7468); RailManager::get_closest_rail_point (this_01,pos,&railDir,gridIdx,bVar1 & 0xf,&railPoint,&railTangent,&local_24, &local_1c,isRailReversed); @@ -1243,7 +1243,7 @@ void Entity_NPC::apply_velocity(char param_2) fVar4 = dirY * fVar4 + (this->_pos).y; pos->x = fVar3; (this->_pos).y = fVar4; - gridX = (int)((fVar3 - 40.0) / 40.0 + 0.5); + gridX = GHIDRA_INT(((fVar3 - 40.0) / 40.0 + 0.5)); if (gridX < 0) { LAB_004ce466: gridIdx = 0xffffffff; @@ -1252,7 +1252,7 @@ LAB_004ce469: } else { if (*(int *)((char *)local_18 + 0xc) <= gridX) goto LAB_004ce466; - gridY = (int)((fVar4 - 120.0) / 40.0 + 0.5); + gridY = GHIDRA_INT(((fVar4 - 120.0) / 40.0 + 0.5)); if ((gridY < 0) || (game = g_game, *(int *)((char *)local_18 + 0x10) <= gridY)) goto LAB_004ce466; gridIdx = *(int *)((char *)local_18 + 0xc) * gridY + gridX; @@ -1265,7 +1265,7 @@ LAB_004ce469: railType = bVar1 & 0xf; } } - if (((int)gridIdx < 1) || ((int)railType < 0)) { + if ((GHIDRA_INT(gridIdx) < 1) || (GHIDRA_INT(railType) < 0)) { if (param_2 == '\0') { this->_i2 = -1; } @@ -1298,10 +1298,10 @@ LAB_004ce469: dirX = railTangent.x; if ((this->_variant == 10) && (this->_state == 4)) { curRoom = game->_room; - gridX = (int)(((railTangent.x * 10.0 + pos->x) - 40.0) / 40.0 + 0.5); + gridX = GHIDRA_INT((((railTangent.x * 10.0 + pos->x) - 40.0) / 40.0 + 0.5)); if (((-1 < gridX) && ((((gridX < *(int *)((char *)curRoom + 0xc) && - (gridY = (int)(((railTangent.y * 10.0 + railPoint.y) - 120.0) / 40.0 + 0.5), + (gridY = GHIDRA_INT((((railTangent.y * 10.0 + railPoint.y) - 120.0) / 40.0 + 0.5)), -1 < gridY)) && (gridY < *(int *)((char *)curRoom + 0x10))) && ((gridIdx = *(int *)((char *)curRoom + 0xc) * gridY + gridX, gridIdx < 0x1c0 && (this_00 = *(GridEntity_Door **)((char *)curRoom + gridIdx * 4 + 0x24), @@ -1352,8 +1352,8 @@ void Entity_NPC::update_move_direction_anim() } for (; 360.0 <= fVar3; fVar3 = fVar3 - 360.0) { } - uVar2 = (int)((fVar3 * 16.0) / 360.0 + 0.5) & 0x80000007; - if ((int)uVar2 < 0) { + uVar2 = GHIDRA_INT(((fVar3 * 16.0) / 360.0 + 0.5)) & 0x80000007; + if (GHIDRA_INT(uVar2) < 0) { uVar2 = (uVar2 - 1 | 0xfffffff8) + 1; } currentDirection = this->_i1; @@ -1374,7 +1374,7 @@ void Entity_NPC::update_move_direction_anim() uVar2 = currentDirection + 1; } uVar2 = uVar2 & 0x80000007; - if ((int)uVar2 < 0) { + if (GHIDRA_INT(uVar2) < 0) { uVar2 = (uVar2 - 1 | 0xfffffff8) + 1; } this->_i1 = uVar2; @@ -1404,7 +1404,7 @@ void Entity_NPC::update_move_direction_anim() isLess = bVar1 < *newAnimChar; if (bVar1 != *newAnimChar) { LAB_004ce860: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_004ce865; } if (bVar1 == 0) break; @@ -1443,9 +1443,9 @@ void Entity_NPC::SetMinecartPosVel(Vector *pos, Vector *vel) (this->_pos).x = pos->x; (this->_pos).y = pos->y; - roomWidth = (int)((pos->x - 40.0) / 40.0 + 0.5); + roomWidth = GHIDRA_INT(((pos->x - 40.0) / 40.0 + 0.5)); if ((((roomWidth < 0) || (roomWidth = *(int *)((char *)g_game->_room + 0xc), roomWidth <= roomWidth)) || - (gridY = (int)((pos->y - 120.0) / 40.0 + 0.5), gridY < 0)) || + (gridY = GHIDRA_INT(((pos->y - 120.0) / 40.0 + 0.5)), gridY < 0)) || (*(int *)((char *)g_game->_room + 0x10) <= gridY)) { roomWidth = -1; } @@ -1474,7 +1474,7 @@ void Entity_NPC::MinecartUpdateChild(Entity *child) local_8 = this; if (oldRef != (EntityPtr)0x0) { if (*(int *)((char *)oldRef + 0x3d4) != 0) { - local_8 = (Entity_NPC *)((int)oldRef + 0x3d4); + local_8 = (Entity_NPC *)(GHIDRA_INT(oldRef) + 0x3d4); std::multiset::erase(&local_8); *(undefined4 *)((char *)oldRef + 0x3d4) = 0; oldRef = *refSlot; @@ -1576,11 +1576,11 @@ void Entity_NPC::UpdateCordChain(byte isHalfScale) nextPointIdx = (pointIdx - 1) + uVar14; uVar17 = pointIdx + 2 + uVar14; uVar21 = uVar14 + pointIdx & 1; - iVar7 = *(int *)((int)(this->_vectorDeque1)._map + + iVar7 = *(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + ((this->_vectorDeque1)._mapSize - 1 & uVar14 + pointIdx >> 1) * 4); uVar12 = uVar14 + (pointIdx - 3); nextPointIdx = uVar12 & 1; - iVar15 = *(int *)((int)(this->_vectorDeque1)._map + + iVar15 = *(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + ((this->_vectorDeque1)._mapSize - 1 & uVar12 >> 1) * 4); fVar24 = *(float *)(iVar7 + 4 + uVar21 * 8) - *(float *)(iVar15 + 4 + nextPointIdx * 8); fVar27 = *(float *)(iVar7 + uVar21 * 8) - *(float *)(iVar15 + nextPointIdx * 8); @@ -1589,20 +1589,20 @@ void Entity_NPC::UpdateCordChain(byte isHalfScale) pointMap = (this->_vectorDeque1)._map; uVar18 = nextPointIdx >> 1; nextPointIdx = nextPointIdx & 1; - segmentLength = *(float *)(*(int *)((int)pointMap + + segmentLength = *(float *)(*(int *)(GHIDRA_INT(pointMap) + ((this->_vectorDeque1)._mapSize - 1 & uVar17) * 4) + uVar21 * 8) - - *(float *)(*(int *)((int)pointMap + + - *(float *)(*(int *)(GHIDRA_INT(pointMap) + ((this->_vectorDeque1)._mapSize - 1 & uVar18) * 4) + nextPointIdx * 8); fVar23 = sqrtf(fVar24 * fVar24 + fVar27 * fVar27 + segmentLength * segmentLength); fVar26 = fVar23 - segmentLength; uVar12 = pointIdx + uVar14 + 1; uVar22 = uVar12 & 1; - iVar7 = *(int *)((int)(this->_vectorDeque1)._map + + iVar7 = *(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + ((this->_vectorDeque1)._mapSize - 1 & uVar12 >> 1) * 4); uVar12 = pointIdx + (uVar14 - 2); nextPointIdx = uVar12 & 1; - iVar15 = *(int *)((int)(this->_vectorDeque1)._map + + iVar15 = *(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + ((this->_vectorDeque1)._mapSize - 1 & uVar12 >> 1) * 4); pointMap = (this->_vectorDeque1)._map; forceX = (0.0 - (fVar27 / fVar23) * fVar26 * 0.3) - @@ -1610,10 +1610,10 @@ void Entity_NPC::UpdateCordChain(byte isHalfScale) forceY = (0.0 - (fVar24 / fVar23) * fVar26 * 0.3) - (*(float *)(iVar7 + 4 + uVar22 * 8) - *(float *)(iVar15 + 4 + nextPointIdx * 8)) * 0.3; forceZ = (0.4 - (segmentLength / fVar23) * fVar26 * 0.3) - - (*(float *)(*(int *)((int)pointMap + + (*(float *)(*(int *)(GHIDRA_INT(pointMap) + ((this->_vectorDeque1)._mapSize - 1 & uVar17) * 4) + 4 + uVar21 * 8) - - *(float *)(*(int *)((int)pointMap + + *(float *)(*(int *)(GHIDRA_INT(pointMap) + ((this->_vectorDeque1)._mapSize - 1 & uVar18) * 4) + 4 + nextPointIdx * 8)) * 0.3; uVar17 = pointCount; @@ -1623,11 +1623,11 @@ void Entity_NPC::UpdateCordChain(byte isHalfScale) uVar12 = pointIdx + 5 + uVar14; uVar17 = pointIdx + 2 + uVar14; uVar18 = uVar14 + pointIdx & 1; - iVar7 = *(int *)((int)(this->_vectorDeque1)._map + + iVar7 = *(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + (uVar14 + pointIdx >> 1 & (this->_vectorDeque1)._mapSize - 1) * 4); nextPointIdx = uVar14 + pointIdx + 3; uVar21 = nextPointIdx & 1; - iVar15 = *(int *)((int)(this->_vectorDeque1)._map + + iVar15 = *(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + (nextPointIdx >> 1 & (this->_vectorDeque1)._mapSize - 1) * 4); fVar24 = *(float *)(iVar7 + uVar18 * 8) - *(float *)(iVar15 + uVar21 * 8); fVar27 = *(float *)(iVar7 + 4 + uVar18 * 8) - *(float *)(iVar15 + 4 + uVar21 * 8); @@ -1636,20 +1636,20 @@ void Entity_NPC::UpdateCordChain(byte isHalfScale) pointMap = (this->_vectorDeque1)._map; uVar18 = uVar12 >> 1; uVar12 = uVar12 & 1; - segmentLength = *(float *)(*(int *)((int)pointMap + + segmentLength = *(float *)(*(int *)(GHIDRA_INT(pointMap) + ((this->_vectorDeque1)._mapSize - 1 & uVar17) * 4) + uVar21 * 8) - - *(float *)(*(int *)((int)pointMap + + - *(float *)(*(int *)(GHIDRA_INT(pointMap) + ((this->_vectorDeque1)._mapSize - 1 & uVar18) * 4) + uVar12 * 8); fVar23 = sqrtf(fVar24 * fVar24 + fVar27 * fVar27 + segmentLength * segmentLength); fVar26 = fVar23 - segmentLength; nextPointIdx = pointIdx + uVar14 + 1; uVar22 = nextPointIdx & 1; - iVar7 = *(int *)((int)(this->_vectorDeque1)._map + + iVar7 = *(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + ((this->_vectorDeque1)._mapSize - 1 & nextPointIdx >> 1) * 4); uVar14 = pointIdx + uVar14 + 4; nextPointIdx = uVar14 & 1; - iVar15 = *(int *)((int)(this->_vectorDeque1)._map + + iVar15 = *(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + (uVar14 >> 1 & (this->_vectorDeque1)._mapSize - 1) * 4); pointMap = (this->_vectorDeque1)._map; forceX = (forceX - (fVar24 / fVar23) * fVar26 * 0.3) - @@ -1657,39 +1657,39 @@ void Entity_NPC::UpdateCordChain(byte isHalfScale) forceY = (forceY - (fVar27 / fVar23) * fVar26 * 0.3) - (*(float *)(iVar7 + 4 + uVar22 * 8) - *(float *)(iVar15 + 4 + nextPointIdx * 8)) * 0.3; forceZ = (forceZ - (segmentLength / fVar23) * fVar26 * 0.3) - - (*(float *)(*(int *)((int)pointMap + + (*(float *)(*(int *)(GHIDRA_INT(pointMap) + ((this->_vectorDeque1)._mapSize - 1 & uVar17) * 4) + 4 + uVar21 * 8) - - *(float *)(*(int *)((int)pointMap + + *(float *)(*(int *)(GHIDRA_INT(pointMap) + ((this->_vectorDeque1)._mapSize - 1 & uVar18) * 4) + 4 + uVar12 * 8)) * 0.3; } uVar14 = (this->_vectorDeque1)._offset; uVar17 = uVar14 + pointIdx; nextPointIdx = uVar17 & 1; - iVar7 = *(int *)((int)(this->_vectorDeque1)._map + + iVar7 = *(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + (uVar17 >> 1 & (this->_vectorDeque1)._mapSize - 1) * 4); uVar14 = uVar14 + pointIdx + 1; uVar12 = uVar14 & 1; - iVar15 = *(int *)((int)(this->_vectorDeque1)._map + + iVar15 = *(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + ((this->_vectorDeque1)._mapSize - 1 & uVar14 >> 1) * 4); fVar23 = *(float *)(iVar15 + 4 + uVar12 * 8); fVar24 = *(float *)(iVar7 + 4 + nextPointIdx * 8); uVar17 = (this->_vectorDeque2)._offset + pointIdx; uVar14 = uVar17 & 1; - iVar8 = *(int *)((int)(this->_vectorDeque2)._map + + iVar8 = *(int *)(GHIDRA_INT((this->_vectorDeque2)._map) + ((this->_vectorDeque2)._mapSize - 1 & uVar17 >> 1) * 4); *(float *)(iVar8 + uVar14 * 8) = stepScale * *(float *)(iVar15 + uVar12 * 8) + *(float *)(iVar7 + nextPointIdx * 8); *(float *)(iVar8 + 4 + uVar14 * 8) = stepScale * fVar23 + fVar24; uVar17 = pointIdx + 1 + (this->_vectorDeque1)._offset; uVar14 = uVar17 & 1; - iVar7 = *(int *)((int)(this->_vectorDeque1)._map + + iVar7 = *(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + ((this->_vectorDeque1)._mapSize - 1 & uVar17 >> 1) * 4); fVar23 = *(float *)(iVar7 + 4 + uVar14 * 8); uVar17 = pointIdx + 1 + (this->_vectorDeque2)._offset; uVar12 = uVar17 & 1; - iVar15 = *(int *)((int)(this->_vectorDeque2)._map + + iVar15 = *(int *)(GHIDRA_INT((this->_vectorDeque2)._map) + (uVar17 >> 1 & (this->_vectorDeque2)._mapSize - 1) * 4); *(float *)(iVar15 + uVar12 * 8) = (forceX * stepScale + *(float *)(iVar7 + uVar14 * 8)) * 0.95 ; @@ -1698,39 +1698,39 @@ void Entity_NPC::UpdateCordChain(byte isHalfScale) uVar12 = uVar17 & 1; uVar14 = pointIdx + 2 + (this->_vectorDeque2)._offset; uVar17 = uVar17 >> 1; - *(float *)(*(int *)((int)(this->_vectorDeque2)._map + + *(float *)(*(int *)(GHIDRA_INT((this->_vectorDeque2)._map) + ((this->_vectorDeque2)._mapSize - 1 & uVar14 >> 1) * 4) + (uVar14 & 1) * 8) = stepScale * - *(float *)(*(int *)((int)(this->_vectorDeque1)._map + + *(float *)(*(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + ((this->_vectorDeque1)._mapSize - 1 & uVar17) * 4) + 4 + uVar12 * 8) - + *(float *)(*(int *)((int)(this->_vectorDeque1)._map + + + *(float *)(*(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + ((this->_vectorDeque1)._mapSize - 1 & uVar17) * 4) + uVar12 * 8); uVar17 = pointIdx + 2 + (this->_vectorDeque1)._offset; uVar14 = pointIdx + 2 + (this->_vectorDeque2)._offset; - *(float *)(*(int *)((int)(this->_vectorDeque2)._map + + *(float *)(*(int *)(GHIDRA_INT((this->_vectorDeque2)._map) + (uVar14 >> 1 & (this->_vectorDeque2)._mapSize - 1) * 4) + 4 + (uVar14 & 1) * 8) = (forceZ * stepScale + - *(float *)(*(int *)((int)(this->_vectorDeque1)._map + + *(float *)(*(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + (uVar17 >> 1 & (this->_vectorDeque1)._mapSize - 1) * 4) + 4 + (uVar17 & 1) * 8)) * 0.95; uVar17 = pointIdx + 2 + (this->_vectorDeque2)._offset; uVar14 = uVar17 & 1; uVar17 = uVar17 >> 1; - if (0.0 < *(float *)(*(int *)((int)(this->_vectorDeque2)._map + + if (0.0 < *(float *)(*(int *)(GHIDRA_INT((this->_vectorDeque2)._map) + ((this->_vectorDeque2)._mapSize - 1 & uVar17) * 4) + uVar14 * 8)) { *(undefined4 *) - (*(int *)((int)(this->_vectorDeque2)._map + + (*(int *)(GHIDRA_INT((this->_vectorDeque2)._map) + ((this->_vectorDeque2)._mapSize - 1 & uVar17) * 4) + uVar14 * 8) = 0; uVar17 = pointIdx + 2 + (this->_vectorDeque2)._offset; *(undefined4 *) - (*(int *)((int)(this->_vectorDeque2)._map + + (*(int *)(GHIDRA_INT((this->_vectorDeque2)._map) + (uVar17 >> 1 & (this->_vectorDeque2)._mapSize - 1) * 4) + 4 + (uVar17 & 1) * 8) = 0; uVar17 = pointIdx + 1 + (this->_vectorDeque2)._offset; uVar14 = uVar17 & 1; - iVar7 = *(int *)((int)(this->_vectorDeque2)._map + + iVar7 = *(int *)(GHIDRA_INT((this->_vectorDeque2)._map) + (uVar17 >> 1 & (this->_vectorDeque2)._mapSize - 1) * 4); *(float *)(iVar7 + uVar14 * 8) = *(float *)(iVar7 + uVar14 * 8) * 0.85; *(float *)(iVar7 + 4 + uVar14 * 8) = *(float *)(iVar7 + 4 + uVar14 * 8) * 0.85; @@ -1738,10 +1738,10 @@ void Entity_NPC::UpdateCordChain(byte isHalfScale) uVar17 = (this->_vectorDeque1)._offset; pointCount = (this->_vectorDeque1)._size; uVar14 = uVar17 + (pointCount - 3); - iVar7 = *(int *)((int)(this->_vectorDeque1)._map + + iVar7 = *(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + (uVar17 >> 1 & (this->_vectorDeque1)._mapSize - 1) * 4); uVar12 = uVar14 & 1; - iVar15 = *(int *)((int)(this->_vectorDeque1)._map + + iVar15 = *(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + (uVar14 >> 1 & (this->_vectorDeque1)._mapSize - 1) * 4); fVar23 = *(float *)(iVar15 + 4 + uVar12 * 8) - *(float *)(iVar7 + 4 + (uVar17 & 1) * 8); fVar24 = *(float *)(iVar15 + uVar12 * 8) - *(float *)(iVar7 + (uVar17 & 1) * 8); @@ -1760,7 +1760,7 @@ void Entity_NPC::UpdateCordChain(byte isHalfScale) else { uVar17 = (this->_vectorDeque1)._offset; iVar15 = (this->_vectorDeque1)._size / 3 - 1; - iVar7 = *(int *)((int)(this->_vectorDeque1)._map + + iVar7 = *(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + (uVar17 >> 1 & (this->_vectorDeque1)._mapSize - 1) * 4); uVar14 = (this->_vectorDeque1)._size; lerpT = ((float)(pointIdx / 3) + 0.0) / @@ -1770,19 +1770,19 @@ void Entity_NPC::UpdateCordChain(byte isHalfScale) uVar12 = (uVar14 - 3) + uVar17; uVar14 = (uVar17 - 1) + uVar14; uVar21 = uVar12 & 1; - iVar15 = *(int *)((int)(this->_vectorDeque1)._map + + iVar15 = *(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + ((this->_vectorDeque1)._mapSize - 1 & uVar12 >> 1) * 4); segmentLength = *(float *)(iVar15 + 4 + uVar21 * 8); uVar19 = pointIdx + 2 + uVar17; uVar18 = uVar17 + pointIdx & 1; - iVar8 = *(int *)((int)(this->_vectorDeque1)._map + + iVar8 = *(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + (uVar17 + pointIdx >> 1 & (this->_vectorDeque1)._mapSize - 1) * 4); nextPointIdx = uVar19 >> 1; uVar19 = uVar19 & 1; fVar26 = *(float *)(iVar8 + 4 + uVar18 * 8); uVar12 = pointIdx + 1 + uVar17; uVar22 = uVar12 & 1; - iVar9 = *(int *)((int)(this->_vectorDeque1)._map + + iVar9 = *(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + ((this->_vectorDeque1)._mapSize - 1 & uVar12 >> 1) * 4); fVar27 = *(float *)(iVar9 + 4 + uVar22 * 8); uVar12 = (this->_vectorDeque2)._offset; @@ -1790,24 +1790,24 @@ void Entity_NPC::UpdateCordChain(byte isHalfScale) uVar12 = pointIdx + 1 + uVar12; uVar16 = uVar12 >> 1; uVar12 = uVar12 & 1; - iVar10 = *(int *)((int)(this->_vectorDeque2)._map + + iVar10 = *(int *)(GHIDRA_INT((this->_vectorDeque2)._map) + ((this->_vectorDeque2)._mapSize - 1 & uVar16) * 4); fVar1 = *(float *)(iVar10 + 4 + uVar12 * 8); - fVar2 = *(float *)(*(int *)((int)(this->_vectorDeque1)._map + + fVar2 = *(float *)(*(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + (uVar14 >> 1 & (this->_vectorDeque1)._mapSize - 1) * 4) + (uVar14 & 1) * 8); - fVar3 = *(float *)(*(int *)((int)(this->_vectorDeque1)._map + + fVar3 = *(float *)(*(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + ((this->_vectorDeque1)._mapSize - 1 & uVar17 + 2 >> 1) * 4) + (uVar17 + 2 & 1) * 8); - fVar4 = *(float *)(*(int *)((int)(this->_vectorDeque1)._map + + fVar4 = *(float *)(*(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + ((this->_vectorDeque1)._mapSize - 1 & nextPointIdx) * 4) + uVar19 * 8); - fVar5 = *(float *)(*(int *)((int)(this->_vectorDeque1)._map + + fVar5 = *(float *)(*(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + ((this->_vectorDeque1)._mapSize - 1 & nextPointIdx) * 4) + 4 + uVar19 * 8); - fVar6 = *(float *)(*(int *)((int)(this->_vectorDeque2)._map + + fVar6 = *(float *)(*(int *)(GHIDRA_INT((this->_vectorDeque2)._map) + ((this->_vectorDeque2)._mapSize - 1 & uVar20 >> 1) * 4) + 4 + (uVar20 & 1) * 8); - iVar11 = *(int *)((int)(this->_vectorDeque2)._map + + iVar11 = *(int *)(GHIDRA_INT((this->_vectorDeque2)._map) + ((this->_vectorDeque2)._mapSize - 1 & uVar16) * 4); *(float *)(iVar11 + uVar12 * 8) = *(float *)(iVar10 + uVar12 * 8) + @@ -1818,7 +1818,7 @@ void Entity_NPC::UpdateCordChain(byte isHalfScale) fVar1 + (((lerpInvT * fVar24 + lerpT * segmentLength) - fVar26) * 0.8 - fVar27 * 0.8) * fVar23 * stepScale; uVar17 = pointIdx + 2 + (this->_vectorDeque2)._offset; - *(float *)(*(int *)((int)(this->_vectorDeque2)._map + + *(float *)(*(int *)(GHIDRA_INT((this->_vectorDeque2)._map) + ((this->_vectorDeque2)._mapSize - 1 & uVar17 >> 1) * 4) + 4 + (uVar17 & 1) * 8) = (((lerpT * fVar2 + lerpInvT * fVar3) - fVar4) * 0.8 - fVar5 * 0.8) * fVar23 * stepScale @@ -1881,7 +1881,7 @@ void Entity_NPC::render_overlay(Vector *offset, byte isShadow) uint local_44; float *pointsEnd; - local_44 = __security_cookie ^ (uint)auStack_134; + local_44 = __security_cookie ^ GHIDRA_UINT(auStack_134); if ((this->_vectorDeque2)._size != 0) { cordLength = 192.0; layerId = 2; @@ -1981,7 +1981,7 @@ void Entity_NPC::render_overlay(Vector *offset, byte isShadow) headColor._tint[0] = tmpColor._tint[0]; headColor._tint[1] = tmpColor._tint[1]; headColor._tint[2] = tmpColor._tint[2]; - cordColor._offset._0_8_ = baseOffset; + (*(undefined8 *)((char *)&(cordColor._offset) + 0x0)) = baseOffset; cordColor._offset[2] = local_fc; if ((*(int *)(iVar4 + 0xc) < DAT_00c7f758) && (_Init_thread_header(), DAT_00c7f758 == -1)) { _atexit((_func_4879 *)&LAB_00b154f0); @@ -1999,7 +1999,7 @@ void Entity_NPC::render_overlay(Vector *offset, byte isShadow) pfVar2 = DAT_00c7f760; uVar3 = (this->_vectorDeque2)._offset + i; dequeSlot = uVar3 & 1; - iVar4 = *(int *)((int)(this->_vectorDeque2)._map + + iVar4 = *(int *)(GHIDRA_INT((this->_vectorDeque2)._map) + ((this->_vectorDeque2)._mapSize - 1 & uVar3 >> 1) * 4); trailPointX = *(float *)(iVar4 + dequeSlot * 8); trailPointY = *(float *)(iVar4 + 4 + dequeSlot * 8); @@ -2007,7 +2007,7 @@ void Entity_NPC::render_overlay(Vector *offset, byte isShadow) if (isShadow == 0) { uVar3 = (this->_vectorDeque2)._offset + 2 + i; local_10c = trailPointY + - *(float *)(*(int *)((int)(this->_vectorDeque2)._map + + *(float *)(*(int *)(GHIDRA_INT((this->_vectorDeque2)._map) + ((this->_vectorDeque2)._mapSize - 1 & uVar3 >> 1) * 4) + (uVar3 & 1) * 8); } @@ -2043,10 +2043,10 @@ void Entity_NPC::render_overlay(Vector *offset, byte isShadow) else { *(undefined8 *)g_npcTrailPointsEnd = *(undefined8 *)DAT_00c7f75c; *(undefined4 *)((char *)pvVar1 + 8) = 0; - g_npcTrailPointsEnd = (void *)((int)g_npcTrailPointsEnd + 0xc); + g_npcTrailPointsEnd = (void *)(GHIDRA_INT(g_npcTrailPointsEnd) + 0xc); } i = 1; - if (1 < ((int)DAT_00c7f760 - (int)DAT_00c7f75c >> 3) - 1U) { + if (1 < (GHIDRA_INT(DAT_00c7f760) - GHIDRA_INT(DAT_00c7f75c) >> 3) - 1U) { do { pvVar1 = g_npcTrailPointsEnd; pointX = DAT_00c7f75c[i * 2] * 0.4 + DAT_00c7f75c[i * 2 + -2] * 0.3 + @@ -2066,10 +2066,10 @@ void Entity_NPC::render_overlay(Vector *offset, byte isShadow) else { *(ulonglong *)pvVar1 = CONCAT44(local_124,pointX); *(float *)((char *)pvVar1 + 8) = totalLength; - g_npcTrailPointsEnd = (void *)((int)g_npcTrailPointsEnd + 0xc); + g_npcTrailPointsEnd = (void *)(GHIDRA_INT(g_npcTrailPointsEnd) + 0xc); } i = i + 1; - } while (i < ((int)DAT_00c7f760 - (int)DAT_00c7f75c >> 3) - 1U); + } while (i < (GHIDRA_INT(DAT_00c7f760) - GHIDRA_INT(DAT_00c7f75c) >> 3) - 1U); } pvVar1 = g_npcTrailPointsEnd; pointsEnd = DAT_00c7f760; @@ -2087,7 +2087,7 @@ void Entity_NPC::render_overlay(Vector *offset, byte isShadow) else { *(undefined8 *)pvVar1 = *(undefined8 *)pfVar2; *(float *)((char *)pvVar1 + 8) = totalLength; - g_npcTrailPointsEnd = (void *)((int)g_npcTrailPointsEnd + 0xc); + g_npcTrailPointsEnd = (void *)(GHIDRA_INT(g_npcTrailPointsEnd) + 0xc); } local_10c = 1.0; local_108 = -NAN; @@ -2099,14 +2099,14 @@ void Entity_NPC::render_overlay(Vector *offset, byte isShadow) } else if (this->_type == 0x361) { uVar3 = 0; - i = *(uint *)(*(int *)((int)(this->_sprite)._animState._animData + 0x18) + 8); + i = *(uint *)(*(int *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x18) + 8); if (i != 0) { - pfVar2 = (float *)(*(int *)(*(int *)((int)(this->_sprite)._animState._animData + 0x18) + 4 + pfVar2 = (float *)(*(int *)(*(int *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x18) + 4 ) + 0xc); do { if (totalLength <= *pfVar2) { if ((this->_sprite)._animState._animData != (void *)0x0) { - ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)(int)uVar3); + ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(uVar3)); } break; } @@ -2135,14 +2135,14 @@ void Entity_NPC::render_overlay(Vector *offset, byte isShadow) fVar5 = totalLength / fVar5; i = 0; DAT_00c78ef4 = beamLayerId; - DAT_00c78ef8._0_1_ = isUseOverlay; + (*(undefined1 *)((char *)&(DAT_00c78ef8) + 0x0)) = isUseOverlay; g_beamRendererPointsEnd = g_beamRendererPoints; - DAT_00c78ef8._1_1_ = 1; + (*(undefined1 *)((char *)&(DAT_00c78ef8) + 0x1)) = 1; if (1.0 <= fVar5) { fVar5 = 1.0; } - iVar4 = (int)g_npcTrailPointsEnd - (int)DAT_00c7f76c >> 0x1f; - if (((int)g_npcTrailPointsEnd - (int)DAT_00c7f76c) / 0xc + iVar4 != iVar4) { + iVar4 = GHIDRA_INT(g_npcTrailPointsEnd) - GHIDRA_INT(DAT_00c7f76c) >> 0x1f; + if ((GHIDRA_INT(g_npcTrailPointsEnd) - GHIDRA_INT(DAT_00c7f76c)) / 0xc + iVar4 != iVar4) { local_fc = fVar5 * local_10c; iVar4 = 0; do { @@ -2156,13 +2156,13 @@ void Entity_NPC::render_overlay(Vector *offset, byte isShadow) else { fVar5 = 1.0; } - BeamRenderer::Add((Vector *)(iVar4 + (int)DAT_00c7f76c),color,fVar5, + BeamRenderer::Add((Vector *)(iVar4 + GHIDRA_INT(DAT_00c7f76c)),color,fVar5, local_10c - - (1.0 - *(float *)(iVar4 + 8 + (int)DAT_00c7f76c) / totalLength) * + (1.0 - *(float *)(iVar4 + 8 + GHIDRA_INT(DAT_00c7f76c)) / totalLength) * local_fc); i = i + 1; iVar4 = iVar4 + 0xc; - } while (i < (uint)(((int)g_npcTrailPointsEnd - (int)DAT_00c7f76c) / 0xc)); + } while (i < GHIDRA_UINT(((GHIDRA_INT(g_npcTrailPointsEnd) - GHIDRA_INT(DAT_00c7f76c)) / 0xc))); } BeamRenderer::End(); } @@ -2216,14 +2216,14 @@ int Entity_NPC::FindTargetPit(Vector *pos1, Vector *pos2, uint pitIndex) fVar4 = pos1->x - pitX; score = sqrtf(fVar3 * fVar3 + fVar4 * fVar4); score = 2000.0 - score; - if (-1 < (int)pitIndex) { + if (-1 < GHIDRA_INT(pitIndex)) { if (pos2Distance < 60.0) goto LAB_0054926c; score = score - pos2Distance * 3.0; if (pitIndex == gridIndex) { score = score - 2000.0; } - iVar2 = (int)(((pitX + 40.0) - 40.0) / 40.0 + 0.5); - row = (int)(((pitY + 0.0) - 120.0) / 40.0 + 0.5); + iVar2 = GHIDRA_INT((((pitX + 40.0) - 40.0) / 40.0 + 0.5)); + row = GHIDRA_INT((((pitY + 0.0) - 120.0) / 40.0 + 0.5)); if (((iVar2 < 0) || (gridWidth <= iVar2)) || ((row < 0 || (room->_gridHeight <= row)))) { gridWidth = room->_gridWidth; iVar2 = -1; @@ -2233,7 +2233,7 @@ int Entity_NPC::FindTargetPit(Vector *pos1, Vector *pos2, uint pitIndex) } uVar1 = ((Room *)(room))->Room::GetGridCollision(iVar2); if (uVar1 == 1) { - iVar2 = (int)(((pitX - 40.0) - 40.0) / 40.0 + 0.5); + iVar2 = GHIDRA_INT((((pitX - 40.0) - 40.0) / 40.0 + 0.5)); if ((((iVar2 < 0) || (gridWidth <= iVar2)) || (row < 0)) || (room->_gridHeight <= row)) { iVar2 = -1; } @@ -2242,8 +2242,8 @@ int Entity_NPC::FindTargetPit(Vector *pos1, Vector *pos2, uint pitIndex) } uVar1 = ((Room *)(room))->Room::GetGridCollision(iVar2); if (uVar1 == 1) { - iVar2 = (int)(((pitX + 0.0) - 40.0) / 40.0 + 0.5); - row = (int)(((pitY + 40.0) - 120.0) / 40.0 + 0.5); + iVar2 = GHIDRA_INT((((pitX + 0.0) - 40.0) / 40.0 + 0.5)); + row = GHIDRA_INT((((pitY + 40.0) - 120.0) / 40.0 + 0.5)); if (((iVar2 < 0) || (gridWidth <= iVar2)) || ((row < 0 || (room->_gridHeight <= row)))) { index = -1; @@ -2268,7 +2268,7 @@ int Entity_NPC::FindTargetPit(Vector *pos1, Vector *pos2, uint pitIndex) } } uVar1 = Random(); - score = (float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) * + score = (float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283064e-10 * 500.0 + score; } if (bestScore < score) { @@ -2281,7 +2281,7 @@ LAB_0054926c: gridIndex = gridIndex + 1; gridEntitySlot = gridEntitySlot + 1; gridPath = gridPath + 1; - if (gridWidth * room->_gridHeight <= (int)gridIndex) { + if (gridWidth * room->_gridHeight <= GHIDRA_INT(gridIndex)) { return bestIndex; } } while( true ); @@ -2305,17 +2305,17 @@ Entity_NPC * Entity_NPC::ThrowStrider(Vector *pos, Entity *spanwer, Vector *targ seed = Random(); strider = (Entity_NPC *)((Game *)(g_game))->Game::SpawnEx(0x32e,0,pos,&g_vectorZero,spanwer,0,seed,0); game = g_game; - flagsHigh = *(undefined4 *)((int)&strider->_flags + 4); - *(uint *)&strider->_flags = (uint)strider->_flags & 0xfffffffb; - *(undefined4 *)((int)&strider->_flags + 4) = flagsHigh; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&strider->_flags) + 4); + *(uint *)&strider->_flags = GHIDRA_UINT(strider->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&strider->_flags) + 4) = flagsHigh; fVar3 = targetPos->x; (strider->_targetPosition).x = fVar3; targetY = targetPos->y; (strider->_targetPosition).y = targetY; room = game->_room; - iVar2 = (int)((fVar3 - 40.0) / 40.0 + 0.5); + iVar2 = GHIDRA_INT(((fVar3 - 40.0) / 40.0 + 0.5)); if ((((-1 < iVar2) && (iVar2 < *(int *)((char *)room + 0xc))) && - (iVar1 = (int)((targetY - 120.0) / 40.0 + 0.5), -1 < iVar1)) && + (iVar1 = GHIDRA_INT(((targetY - 120.0) / 40.0 + 0.5)), -1 < iVar1)) && (((iVar1 < *(int *)((char *)room + 0x10) && (iVar2 = *(int *)((char *)room + 0xc) * iVar1 + iVar2, -1 < iVar2)) && (iVar2 < 0x1c0)))) { iVar1 = *(int *)((char *)room + iVar2 * 4 + 0x76c); @@ -2369,9 +2369,9 @@ void Entity_NPC::render_v1_layer_frames() animData = (this->_sprite)._animState._animData; if (fVar5 <= 4.0) { if ((animData == (void *)0x0) || - ((*(int *)((int)(this->_sprite)._animState._animation + 0x80) < 1 && + ((*(int *)(GHIDRA_INT((this->_sprite)._animState._animation) + 0x80) < 1 && (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - *(int *)((int)(this->_sprite)._animState._animation + 0x80) < 1)))) goto LAB_005657ec; + *(int *)(GHIDRA_INT((this->_sprite)._animState._animation) + 0x80) < 1)))) goto LAB_005657ec; animData = (this->_sprite)._animState._animData; layerId = *(int *)((char *)animData + 0x38); if ((animData == (void *)0x0) || @@ -2382,9 +2382,9 @@ void Entity_NPC::render_v1_layer_frames() } else { if ((animData == (void *)0x0) || - ((*(int *)((int)(this->_sprite)._animState._animation + 0x80) < 1 && + ((*(int *)(GHIDRA_INT((this->_sprite)._animState._animation) + 0x80) < 1 && (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - *(int *)((int)(this->_sprite)._animState._animation + 0x80) < 1)))) goto LAB_005657ec; + *(int *)(GHIDRA_INT((this->_sprite)._animState._animation) + 0x80) < 1)))) goto LAB_005657ec; animData = (this->_sprite)._animState._animData; layerId = *(int *)((char *)animData + 0x38); if ((animData == (void *)0x0) || @@ -2396,9 +2396,9 @@ void Entity_NPC::render_v1_layer_frames() } else { if (((this->_sprite)._animState._animData == (void *)0x0) || - ((*(int *)((int)(this->_sprite)._animState._animation + 0x80) < 1 && + ((*(int *)(GHIDRA_INT((this->_sprite)._animState._animation) + 0x80) < 1 && (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - *(int *)((int)(this->_sprite)._animState._animation + 0x80) < 1)))) goto LAB_005657ec; + *(int *)(GHIDRA_INT((this->_sprite)._animState._animation) + 0x80) < 1)))) goto LAB_005657ec; animData = (this->_sprite)._animState._animData; layerId = *(int *)((char *)animData + 0x38); if ((animData == (void *)0x0) || ((layerId < 0 || (*(int *)((char *)animData + 0x1c) <= layerId)))) @@ -2407,7 +2407,7 @@ void Entity_NPC::render_v1_layer_frames() } fVar5 = 1.0; } - *(undefined4 *)((int)(this->_sprite)._animState._layerFrames + layerId * 4) = 0; + *(undefined4 *)(GHIDRA_INT((this->_sprite)._animState._layerFrames) + layerId * 4) = 0; ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::AdvanceLayerPosition(layerId,fVar5); LAB_005657ec: fVar5 = (this->_posOffset).y; @@ -2415,7 +2415,7 @@ LAB_005657ec: layer1Height = fVar5; if (1 < (this->_vectorDeque1)._size) { segmentIndex = (this->_vectorDeque1)._offset + 1; - fVar4 = *(float *)(*(int *)((int)(this->_vectorDeque1)._map + + fVar4 = *(float *)(*(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + (segmentIndex >> 1 & (this->_vectorDeque1)._mapSize - 1) * 4) + 4 + (segmentIndex & 1) * 8); fVar1 = (this->_v1).y; @@ -2426,14 +2426,14 @@ LAB_005657ec: (layer1->_pos).x = (pLVar3->_pos).x; (layer1->_pos).y = (pLVar3->_pos).y; segmentIndex = (this->_vectorDeque1)._offset + 1; - layer1Height = (*(float *)(*(int *)((int)(this->_vectorDeque1)._map + + layer1Height = (*(float *)(*(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + (segmentIndex >> 1 & (this->_vectorDeque1)._mapSize - 1) * 4) + 4 + (segmentIndex & 1) * 8) + (this->_posOffset).y) - (this->_v1).y ; layer2Height = layer1Height; if (2 < (this->_vectorDeque1)._size) { segmentIndex = (this->_vectorDeque1)._offset + 2; - fVar4 = *(float *)(*(int *)((int)(this->_vectorDeque1)._map + + fVar4 = *(float *)(*(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + (segmentIndex >> 1 & (this->_vectorDeque1)._mapSize - 1) * 4) + 4 + (segmentIndex & 1) * 8); fVar1 = (this->_v1).y; @@ -2443,10 +2443,10 @@ LAB_005657ec: segment2Index = (this->_vectorDeque1)._offset; segmentIndex = segment2Index + 1; segment2Index = segment2Index + 2; - fVar4 = *(float *)(*(int *)((int)(this->_vectorDeque1)._map + + fVar4 = *(float *)(*(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + ((this->_vectorDeque1)._mapSize - 1 & segment2Index >> 1) * 4) + 4 + (segment2Index & 1) * 8); - segment1Y = (float *)(*(int *)((int)(this->_vectorDeque1)._map + + segment1Y = (float *)(*(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + ((this->_vectorDeque1)._mapSize - 1 & segmentIndex >> 1) * 4) + 4 + (segmentIndex & 1) * 8); fVar1 = *segment1Y; @@ -2454,13 +2454,13 @@ LAB_005657ec: pLVar3 = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer((byte *)0x2); pLVar3->_flipY = fVar2 <= fVar4 && fVar4 != fVar1; segmentIndex = (this->_vectorDeque1)._offset + 2; - fVar4 = *(float *)(*(int *)((int)(this->_vectorDeque1)._map + + fVar4 = *(float *)(*(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + ((this->_vectorDeque1)._mapSize - 1 & segmentIndex >> 1) * 4) + (segmentIndex & 1) * 8); pLVar3 = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer((byte *)0x2); pLVar3->_flipX = 0.0 < fVar4; segmentIndex = (this->_vectorDeque1)._offset + 2; - if (*(float *)(*(int *)((int)(this->_vectorDeque1)._map + + if (*(float *)(*(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + (segmentIndex >> 1 & (this->_vectorDeque1)._mapSize - 1) * 4) + (segmentIndex & 1) * 8) <= 0.0) { fVar4 = 3.0; @@ -2471,7 +2471,7 @@ LAB_005657ec: pLVar3 = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer((byte *)0x2); (pLVar3->_pos).x = fVar4; segmentIndex = (this->_vectorDeque1)._offset + 2; - layer2Height = (*(float *)(*(int *)((int)(this->_vectorDeque1)._map + + layer2Height = (*(float *)(*(int *)(GHIDRA_INT((this->_vectorDeque1)._map) + ((this->_vectorDeque1)._mapSize - 1 & segmentIndex >> 1) * 4) + 4 + (segmentIndex & 1) * 8) + (this->_posOffset).y) - (this->_v1).y; @@ -2557,11 +2557,11 @@ void Entity_NPC::RenderSegmentLink(Vector *offset, byte isShadow) EntityPtr child; int childI2; - local_44 = __security_cookie ^ (uint)auStack_f4; + local_44 = __security_cookie ^ GHIDRA_UINT(auStack_f4); child = this->_child; if ((child != (EntityPtr)0x0) && (((childI2 = *(int *)((char *)child + 0xbc4), childI2 != 0 || (this->_i2 != 0)) && - (1 < (uint)(this->_sprite)._layerCount)))) { + (1 < GHIDRA_UINT((this->_sprite)._layerCount))))) { if (isShadow == 0) { ((Color *)(&tmpColor))->Color::Color(); baseColor = extraout_EAX; @@ -2588,7 +2588,7 @@ void Entity_NPC::RenderSegmentLink(Vector *offset, byte isShadow) linkColor._colorize[1] = baseColor->_colorize[1]; linkColor._colorize[2] = baseColor->_colorize[2]; linkColor._colorize[3] = baseColor->_colorize[3]; - linkColor._offset._0_8_ = *(undefined8 *)baseColor->_offset; + (*(undefined8 *)((char *)&(linkColor._offset) + 0x0)) = *(undefined8 *)baseColor->_offset; local_c0 = g_displayPixelRatio * g_screenPointScale; linkColor._offset[2] = baseColor->_offset[2]; local_c8 = (g_screenWidth - 338.0) * 0.5; @@ -2630,7 +2630,7 @@ void Entity_NPC::RenderSegmentLink(Vector *offset, byte isShadow) g_beamRendererPointsEnd = g_beamRendererPoints; stretch = (fVar1 - 20.0) / 70.0; DAT_00c78ef4 = 1; - DAT_00c78ef8._0_2_ = 0x100; + (*(undefined2 *)((char *)&(DAT_00c78ef8) + 0x0)) = 0x100; fVar1 = (beamLength - 6.0) * 0.15; local_ac = (beamLength - 6.0) * 0.5 + 6.0; local_a4 = 30.0; @@ -2685,10 +2685,10 @@ void Entity_NPC::CreateBling() float offsetY; rngResult = Random(); - offsetY = ((float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + offsetY = ((float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 - 1.0) * 187.5; rngResult = Random(); - offsetX = ((float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + offsetX = ((float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 - 0.5) * 125.0; sampleY = offsetY; ((Sprite *)((Sprite *)&this->_sprite))->Sprite::GetTexel(texelColor,offsetX,offsetY,g_vectorZero.x,g_vectorZero.y @@ -2723,13 +2723,13 @@ void Entity_NPC::CreateGoldParticles(uint count) uint local_c; undefined1 auStack_8 [4]; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); for (; count != 0; count = count - 1) { rngResult = Random(); - offsetY = ((float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + offsetY = ((float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 - 1.0) * 187.5; rngResult = Random(); - sampleX = ((float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + sampleX = ((float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 - 0.5) * 125.0; sampleY = offsetY; offsetX = sampleX; @@ -2855,7 +2855,7 @@ undefined1 Entity_NPC::CanShutDoors() { uint in_EAX; - if ((this->_canShutDoors == 0) || (in_EAX = (uint)this->_flags & 0x20000000, in_EAX != 0)) { + if ((this->_canShutDoors == 0) || (in_EAX = GHIDRA_UINT(this->_flags) & 0x20000000, in_EAX != 0)) { return in_EAX & 0xffffff00; } return 1; @@ -2894,7 +2894,7 @@ void Entity_NPC::Constructor() (this->_killDamageEvents)._begin = (void *)0x0; (this->_killDamageEvents)._end = (void *)0x0; (this->_killDamageEvents)._capacity = (void *)0x0; - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; deque = &this->_entityDeque; (this->_v1).y = 0.0; (this->_v1).x = 0.0; @@ -2910,8 +2910,8 @@ void Entity_NPC::Constructor() containerProxy = operator_new(8); containerProxy[1] = 0; deque->_proxy = containerProxy; - *containerProxy = (int)deque; - local_8._0_1_ = 3; + *containerProxy = GHIDRA_INT(deque); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; deque = &this->_vectorDeque1; deque->_proxy = (void *)0x0; (this->_vectorDeque1)._map = (void *)0x0; @@ -2921,8 +2921,8 @@ void Entity_NPC::Constructor() containerProxy = operator_new(8); containerProxy[1] = 0; deque->_proxy = containerProxy; - *containerProxy = (int)deque; - local_8._0_1_ = 4; + *containerProxy = GHIDRA_INT(deque); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; deque = &this->_vectorDeque2; deque->_proxy = (void *)0x0; (this->_vectorDeque2)._map = (void *)0x0; @@ -2932,8 +2932,8 @@ void Entity_NPC::Constructor() containerProxy = operator_new(8); containerProxy[1] = 0; deque->_proxy = containerProxy; - *containerProxy = (int)deque; - local_8._0_1_ = 5; + *containerProxy = GHIDRA_INT(deque); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; extraDeque = &(*(undefined1 *)((char *)(this) + 0xc48)); (this->_confusionTargetPos).y = 0.0; (this->_confusionTargetPos).x = 0.0; @@ -2945,8 +2945,8 @@ void Entity_NPC::Constructor() containerProxy = operator_new(8); containerProxy[1] = 0; *(int **)extraDeque = containerProxy; - *containerProxy = (int)extraDeque; - local_8._0_1_ = 6; + *containerProxy = GHIDRA_INT(extraDeque); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; (this->_floorColor)._tint[0] = 1.0; (this->_floorColor)._tint[1] = 1.0; (this->_floorColor)._tint[2] = 1.0; @@ -2970,7 +2970,7 @@ void Entity_NPC::Constructor() (this->_dirtColor)._offset[1] = 0.0; (this->_dirtColor)._offset[2] = 0.0; ((ANM2 *)(&this->_statusEffectSprite))->ANM2::constructor(); - local_8 = CONCAT31(local_8._1_3_,7); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),7); ((ANM2 *)(&this->_chargeBarSprite))->ANM2::constructor(); (this->_hitList)._begin = (void *)0x0; (this->_hitList)._end = (void *)0x0; @@ -3062,10 +3062,10 @@ void Entity_NPC::Init(int type, int variant, int subType, uint initSeed) (this->_killDamageEvents)._end = (this->_killDamageEvents)._begin; this->_killDamage = 0.0; *(undefined4 *)&this->_killDamageFlags = 0; - *(undefined4 *)((int)&this->_killDamageFlags + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&this->_killDamageFlags) + 4) = 0; ((Entity *)((Entity *)this))->Entity::Init(type,variant,subType,initSeed); - *(uint *)&this->_flags = (uint)this->_flags | 4; - *(undefined4 *)((int)&this->_flags + 4) = *(undefined4 *)((int)&this->_flags + 4); + *(uint *)&this->_flags = GHIDRA_UINT(this->_flags) | 4; + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); this->_state = 1; this->_savedState = 0; this->_aiCallPhase = 0; @@ -3116,7 +3116,7 @@ void Entity_NPC::Init(int type, int variant, int subType, uint initSeed) (this->_secondaryHitList)._end = (this->_secondaryHitList)._begin; ((PathFinder *)((PathFinder *)&this->_pathfinder))->PathFinder::Reset(); if (this->_isBoss != 0) { - roomBossCount = (int *)((int)g_game->_room + 0x7224); + roomBossCount = (int *)(GHIDRA_INT(g_game->_room) + 0x7224); *roomBossCount = *roomBossCount + 1; } this->_totalDamageTaken = 0.0; @@ -3183,7 +3183,7 @@ LAB_006b8f98: EVar1 = this->_child; childField = &this->_child; if (EVar1 != (EntityPtr)0x0) { - childParentField = (EntityPtr)((int)EVar1 + 0x3bc); + childParentField = (EntityPtr)(GHIDRA_INT(EVar1) + 0x3bc); local_18 = this->_parent; if (*(int *)((char *)EVar1 + 0x3bc) != 0) { local_14 = childParentField; @@ -3197,7 +3197,7 @@ LAB_006b8f98: EVar1 = this->_parent; parentField = &this->_parent; if (EVar1 != (EntityPtr)0x0) { - local_14 = (EntityPtr)((int)EVar1 + 0x3c0); + local_14 = (EntityPtr)(GHIDRA_INT(EVar1) + 0x3c0); local_1c = *childField; if (*(int *)((char *)EVar1 + 0x3c0) != 0) { local_18 = local_14; @@ -3214,8 +3214,8 @@ LAB_006b8f98: game = g_game; childMaxHp = *(float *)((char *)local_1c + 900); childHealth = *(float *)((char *)local_1c + 0x380); - *(short *)&(*(undefined1 *)((char *)&((g_game->_hud)) + 0x54ba)) = (short)(int)childMaxHp; - *(short *)&(*(undefined1 *)((char *)&((game->_hud)) + 0x54b8)) = (short)(int)((childMaxHp - childHealth) + 1.0); + *(short *)&(*(undefined1 *)((char *)&((g_game->_hud)) + 0x54ba)) = (short)GHIDRA_INT(childMaxHp); + *(short *)&(*(undefined1 *)((char *)&((game->_hud)) + 0x54b8)) = (short)GHIDRA_INT(((childMaxHp - childHealth) + 1.0)); uVar5 = *(uint *)((char *)local_1c + 0x168); flagsHigh = *(undefined4 *)((char *)local_1c + 0x16c); *(uint *)((char *)local_1c + 0x168) = uVar5 & 0x7fffffff; @@ -3292,12 +3292,12 @@ LAB_006b8f98: (this->_hitList)._end = (void *)0x0; (this->_hitList)._capacity = (void *)0x0; if (oldData != (void *)0x0) { - uVar5 = (int)pvVar4 - (int)oldData & 0xfffffffc; + uVar5 = GHIDRA_INT(pvVar4) - GHIDRA_INT(oldData) & 0xfffffffc; pvVar4 = oldData; if (0xfff < uVar5) { pvVar4 = *(void **)((char *)oldData + -4); uVar5 = uVar5 + 0x23; - if (0x1f < (uint)((int)oldData + (-4 - (int)pvVar4))) goto LAB_006b93e7; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(oldData) + (-4 - GHIDRA_INT(pvVar4))))) goto LAB_006b93e7; } operator_delete(pvVar4,uVar5); } @@ -3310,12 +3310,12 @@ LAB_006b8f98: (this->_secondaryHitList)._end = (void *)0x0; (this->_secondaryHitList)._capacity = (void *)0x0; if (oldData != (void *)0x0) { - uVar5 = (int)pvVar4 - (int)oldData & 0xfffffffc; + uVar5 = GHIDRA_INT(pvVar4) - GHIDRA_INT(oldData) & 0xfffffffc; pvVar4 = oldData; if (0xfff < uVar5) { pvVar4 = *(void **)((char *)oldData + -4); uVar5 = uVar5 + 0x23; - if (0x1f < (uint)((int)oldData + (-4 - (int)pvVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(oldData) + (-4 - GHIDRA_INT(pvVar4))))) { LAB_006b93e7: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3325,7 +3325,7 @@ LAB_006b93e7: } } if (this->_sirenPlayerEntity != (void *)0x0) { - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&familiars,3,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&familiars,3,-1,-1,0,0); local_8 = 0; uVar5 = 0; if (familiars._size != 0) { @@ -3336,7 +3336,7 @@ LAB_006b93e7: ((Entity_Familiar *)(this_00))->Entity_Familiar::RemoveFromPlayer(); } uVar5 = uVar5 + 1; - } while (uVar5 < (uint)familiars._size); + } while (uVar5 < GHIDRA_UINT(familiars._size)); } (**(code **)(*(int *)this->_sirenPlayerEntity + 0x44))(); if (this->_sirenPlayerEntity != (undefined4 *)0x0) { @@ -3344,20 +3344,20 @@ LAB_006b93e7: this->_sirenPlayerEntity = (void *)0x0; } local_8 = 0xffffffff; - if (familiars._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(familiars) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (familiars._data != (void *)0x0) { uVar5 = *(uint *)((char *)familiars._data + -4); qVar2 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar5; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar5; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar2 < uVar5); - free((void *)((int)familiars._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < uVar5)); + free((void *)(GHIDRA_INT(familiars._data) + -4)); } local_8 = 0xffffffff; } @@ -3430,14 +3430,14 @@ float Entity_NPC::compute_speed_multiplier() local_10 = ((Room *)(g_game->_room))->Room::GetTimeScale((Vector *)this,(Entity *)this); game = g_game; qVar1 = this->_flags; - uVar4 = *(uint *)((int)&this->_flags + 4); + uVar4 = *(uint *)(GHIDRA_INT(&this->_flags) + 4); if ((qVar1 & 0x20000000) == 0) { - roomTempEffects = (TemporaryEffects *)((int)g_game->_room + 0x7310); + roomTempEffects = (TemporaryEffects *)(GHIDRA_INT(g_game->_room) + 0x7310); isHasEffect = ((TemporaryEffects *)(roomTempEffects))->TemporaryEffects::HasCollectibleEffect(0xe8); if ((isHasEffect == 0) && ((game->_challenge == 0x16 || (*(int *)((char *)game->_room + 0x1210) != 1)))) { pvVar3 = ((TemporaryEffects *)(roomTempEffects))->TemporaryEffects::GetCollectibleEffect(0x42); - uVar4 = *(uint *)((int)&this->_flags + 4); + uVar4 = *(uint *)(GHIDRA_INT(&this->_flags) + 4); if (pvVar3 != (void *)0x0) { fVar5 = ((float)*(int *)((char *)pvVar3 + 8) - 0.0) / 30.0; if (fVar5 <= 0.0) { @@ -3450,7 +3450,7 @@ float Entity_NPC::compute_speed_multiplier() } } else { - uVar4 = *(uint *)((int)&this->_flags + 4); + uVar4 = *(uint *)(GHIDRA_INT(&this->_flags) + 4); local_10 = local_10 * 0.5; } } @@ -3466,7 +3466,7 @@ float Entity_NPC::compute_speed_multiplier() cVar2 = this->IsBoss(); if (((cVar2 == '\0') || ((this->_flags & 0x20000000) != 0)) || (isHasEffect = TemporaryEffects::HasCollectibleEffect - ((TemporaryEffects *)((int)g_game->_room + 0x7310),0x2b9), + ((TemporaryEffects *)(GHIDRA_INT(g_game->_room) + 0x7310),0x2b9), isHasEffect == 0)) { return local_10; } @@ -3525,24 +3525,24 @@ void Entity_NPC::load_graphics(byte param_2) bool isChampionColored; int *spriteBitflags; - ppsStack_20 = (std_string **)((int)&layerString + 0x38); + ppsStack_20 = (std_string **)(GHIDRA_INT(&layerString) + 0x38); local_14 = 0xffffffff; puStack_18 = &LAB_00afa79f; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)&layerString + 0x2cU; + local_24 = __security_cookie ^ GHIDRA_INT(&layerString) + 0x2cU; ExceptionList = &local_1c; uVar8 = 0; local_b4 = 0; self = this; - ppsVar2 = (std_string **)((int)&layerString + 0x38); + ppsVar2 = (std_string **)(GHIDRA_INT(&layerString) + 0x38); if (param_2 != 0) { if (this->_bosscoloridx < 0) { LAB_006bafec: - psVar4 = (std_string *)((int)this->_config + 0x74); + psVar4 = (std_string *)(GHIDRA_INT(this->_config) + 0x74); } else { local_a8 = *(undefined **)((char *)this->_config + 0x68); - if ((*(int *)((char *)this->_config + 0x6c) - (int)local_a8) / 0x7c <= this->_bosscoloridx) + if ((*(int *)((char *)this->_config + 0x6c) - GHIDRA_INT(local_a8)) / 0x7c <= this->_bosscoloridx) goto LAB_006bafec; bossColorPathSize = this->_bosscoloridx * 0x7c; if (*(int *)(local_a8 + bossColorPathSize + 0x54) == 0) goto LAB_006bafec; @@ -3563,21 +3563,21 @@ LAB_006bafec: local_54._buf[1] = '\0'; local_54._buf[2] = '\0'; local_54._buf[3] = '\0'; - local_54._buf._0_4_ = std::_Allocate(0x40); + (*(undefined4 *)((char *)&(local_54._buf) + 0x0)) = std::_Allocate(0x40); local_54._size = 0x35; local_54._capacity = 0x3f; - builtin_strncpy((char *)local_54._buf._0_4_, + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_54._buf) + 0x0)), "gfx/promo/gfuel/102.001_g baby (true final boss).anm2",0x36); local_14 = 0; ((ANM2 *)(&this->_sprite))->ANM2::Load(&local_54,1); local_14 = 0xffffffff; if (0xf < local_54._capacity) { uVar6 = local_54._capacity + 1; - pcVar7 = (char *)local_54._buf._0_4_; + pcVar7 = (*(undefined4 *)((char *)&((char *)local_54._buf) + 0x0)); if (0xfff < uVar6) { - pcVar7 = *(char **)(local_54._buf._0_4_ + -4); + pcVar7 = *(char **)((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + -4); uVar6 = local_54._capacity + 0x24; - if ((char *)0x1f < (char *)(local_54._buf._0_4_ + (-4 - (int)pcVar7))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar7)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -3585,8 +3585,8 @@ LAB_006bafec: operator_delete(pcVar7,uVar6); } local_54._size = 0; - local_54._capacity = (uint)&DAT_0000000f; - local_54._buf._0_4_ = local_54._buf._0_4_ & 0xffffff00; + local_54._capacity = GHIDRA_UINT(&DAT_0000000f); + (*(undefined4 *)((char *)&(local_54._buf) + 0x0)) = (*(undefined4 *)((char *)&(local_54._buf) + 0x0)) & 0xffffff00; ppsVar2 = ppsStack_20; } } @@ -3594,7 +3594,7 @@ LAB_006bafec: game = g_game; sheetOverridePath._size = 0; sheetOverridePath._capacity = 0xf; - sheetOverridePath._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(sheetOverridePath._buf) + 0x0)) = (void *)0x0; local_14 = 1; if (this->_bosscoloridx < 0) { LAB_006bb1b0: @@ -3624,11 +3624,11 @@ LAB_006bb1b0: } else { local_a8 = *(undefined **)((char *)this->_config + 0x68); - if ((*(int *)((char *)this->_config + 0x6c) - (int)local_a8) / 0x7c <= this->_bosscoloridx) + if ((*(int *)((char *)this->_config + 0x6c) - GHIDRA_INT(local_a8)) / 0x7c <= this->_bosscoloridx) goto LAB_006bb1b0; bossColorPath = (void **)(local_a8 + this->_bosscoloridx * 0x7c + 0x2c); if (&sheetOverridePath != (std_string *)bossColorPath) { - bossColorPathSize = (int)(bossColorPath + 4); + bossColorPathSize = GHIDRA_INT((bossColorPath + 4)); if (0xf < bossColorPath[5]) { bossColorPath = *bossColorPath; } @@ -3638,7 +3638,7 @@ LAB_006bb1b0: r = 0.0; isChampionSheetUsed = '\0'; isDirtColorNeeded = '\0'; - if ((this->_isChampion == 0) || (0x19 < (uint)this->_championColorIdx)) { + if ((this->_isChampion == 0) || (0x19 < GHIDRA_UINT(this->_championColorIdx))) { local_a8 = (undefined *)0x0; LAB_006bb24b: isChampionColored = false; @@ -3656,15 +3656,15 @@ LAB_006bb24b: if (!isChampionColored) { pcVar7 = (char *)&s_empty; } - championSuffix._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(championSuffix._buf) + 0x0)) = (void *)0x0; local_ac = (LayerState *)(pcVar7 + 1); suffixEnd = (byte *)pcVar7; do { isChampionColored = *suffixEnd; suffixEnd = suffixEnd + 1; } while (isChampionColored != 0); - ((std::string *)(championSuffix._buf))->std::string::assign((byte *)pcVar7,(int)suffixEnd - (int)local_ac); - local_14._0_1_ = 2; + ((std::string *)(championSuffix._buf))->std::string::assign((byte *)pcVar7,GHIDRA_INT(suffixEnd) - GHIDRA_INT(local_ac)); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; layerIndex = (byte *)0x0; if ((this->_sprite)._layerCount == 0) { LAB_006bb675: @@ -3685,7 +3685,7 @@ LAB_006bb675: (this->_sprite)._championColor._tint[2] = 0.0; (this->_sprite)._championColor._tint[3] = 0.0; LAB_006bb6be: - *(undefined8 *)championColor->_offset = local_ec._offset._0_8_; + *(undefined8 *)championColor->_offset = (*(undefined8 *)((char *)&(local_ec._offset) + 0x0)); championColor->_offset[2] = local_ec._offset[2]; } } @@ -3698,41 +3698,41 @@ LAB_006bb6be: if (layer->_layerData == (void *)0x0) { layerString._size = 0; layerString._capacity = 0xf; - layerString._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(layerString._buf) + 0x0)) = (std_string *)0x0; } else { - ((std::string *)(layerString._buf))->std::string::string((void *)((int)layer->_layerData + 8)); + ((std::string *)(layerString._buf))->std::string::string((void *)(GHIDRA_INT(layer->_layerData) + 8)); } local_b4 = uVar8 | 9; - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; psVar4 = &layerString; if (0xf < layerString._capacity) { - psVar4 = (std_string *)layerString._buf._0_4_; + psVar4 = (*(undefined4 *)((char *)&((std_string *)layerString._buf) + 0x0)); } - local_b8 = (std_string *)layerString._buf._0_4_; + local_b8 = (*(undefined4 *)((char *)&((std_string *)layerString._buf) + 0x0)); local_a4 = local_b4; isChampionColored = str_eq((byte *)psVar4,layerString._size,&DAT_00b64428,4); if (isChampionColored == 0) { if (layer->_layerData == (void *)0x0) { - local_54._buf._0_4_ = (std_string *)0x0; - local_54._capacity = (uint)&DAT_0000000f; + (*(undefined4 *)((char *)&(local_54._buf) + 0x0)) = (std_string *)0x0; + local_54._capacity = GHIDRA_UINT(&DAT_0000000f); local_54._size = 0; } else { - ((std::string *)(local_54._buf))->std::string::string((void *)((int)layer->_layerData + 8)); + ((std::string *)(local_54._buf))->std::string::string((void *)(GHIDRA_INT(layer->_layerData) + 8)); } - psVar4 = (std_string *)local_54._buf._0_4_; + psVar4 = (*(undefined4 *)((char *)&((std_string *)local_54._buf) + 0x0)); local_a4 = uVar8 | 0x1b; psVar5 = &local_54; if (&DAT_0000000f < local_54._capacity) { - psVar5 = (std_string *)local_54._buf._0_4_; + psVar5 = (*(undefined4 *)((char *)&((std_string *)local_54._buf) + 0x0)); } isChampionColored = str_eq((byte *)psVar5,local_54._size,&DAT_00b1d57c,4); if (isChampionColored != 0) goto LAB_006bb394; local_9d = 0; } else { - psVar4 = (std_string *)local_54._buf._0_4_; + psVar4 = (*(undefined4 *)((char *)&((std_string *)local_54._buf) + 0x0)); LAB_006bb394: local_9d = 1; } @@ -3744,13 +3744,13 @@ LAB_006bb394: if ((undefined1 *)0xfff < size) { psVar5 = (std_string *)psVar4[-1]._capacity; size = (undefined1 *)(local_54._capacity + 0x24); - if ((byte *)0x1f < (byte *)((int)psVar4 + (-4 - (int)psVar5))) goto LAB_006bb75e; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(psVar4) + (-4 - GHIDRA_INT(psVar5)))) goto LAB_006bb75e; } - operator_delete(psVar5,(uint)size); + operator_delete(psVar5,GHIDRA_UINT(size)); } } - local_14._0_1_ = 2; - local_14._1_3_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; if ((local_a4 & 1) != 0) { local_a4 = local_a4 & 0xfffffffe; if (0xf < layerString._capacity) { @@ -3759,7 +3759,7 @@ LAB_006bb394: if (0xfff < uVar8) { psVar4 = (std_string *)local_b8[-1]._capacity; uVar8 = layerString._capacity + 0x24; - if ((byte *)0x1f < (byte *)((int)local_b8 + (-4 - (int)psVar4))) goto LAB_006bb75e; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(local_b8) + (-4 - GHIDRA_INT(psVar4)))) goto LAB_006bb75e; } operator_delete(psVar4,uVar8); } @@ -3772,16 +3772,16 @@ LAB_006bb394: local_a4 = local_a4 | 0x20; if (local_ac->_layerData == (void *)0x0) { layerString._capacity = 0xf; - layerString._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(layerString._buf) + 0x0)) = (std_string *)0x0; layerString._size = 0; } else { - ((std::string *)(layerString._buf))->std::string::string((void *)((int)local_ac->_layerData + 8)); + ((std::string *)(layerString._buf))->std::string::string((void *)(GHIDRA_INT(local_ac->_layerData) + 8)); } - uVar1 = layerString._buf._0_4_; + uVar1 = (*(undefined4 *)((char *)&(layerString._buf) + 0x0)); psVar4 = &layerString; if (0xf < layerString._capacity) { - psVar4 = (std_string *)layerString._buf._0_4_; + psVar4 = (*(undefined4 *)((char *)&((std_string *)layerString._buf) + 0x0)); } local_9d = str_eq((byte *)psVar4,layerString._size,(byte *)"Hole2",5); if (0xf < layerString._capacity) { @@ -3790,7 +3790,7 @@ LAB_006bb394: if (0xfff < uVar8) { psVar4 = (std_string *)((std_string *)(uVar1 + -0x18))->_capacity; uVar8 = layerString._capacity + 0x24; - if ((byte *)0x1f < (byte *)(uVar1 + (-4 - (int)psVar4))) goto LAB_006bb75e; + if ((byte *)0x1f < (byte *)(uVar1 + (-4 - GHIDRA_INT(psVar4)))) goto LAB_006bb75e; } operator_delete(psVar4,uVar8); } @@ -3802,27 +3802,27 @@ LAB_006bb394: if (layer->_layerData == (void *)0x0) { layerString._capacity = 0xf; layerString._size = 0; - layerString._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(layerString._buf) + 0x0)) = (std_string *)0x0; } else { - ((std::string *)(layerString._buf))->std::string::string((void *)((int)layer->_layerData + 0x20)); + ((std::string *)(layerString._buf))->std::string::string((void *)(GHIDRA_INT(layer->_layerData) + 0x20)); } - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; anm2_resolve_spritesheet_path (&resolvedSheetPath,&layerString,&sheetOverridePath,&championSuffix,&local_9d); - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; if (0xf < layerString._capacity) { uVar6 = layerString._capacity + 1; - psVar4 = (std_string *)layerString._buf._0_4_; + psVar4 = (*(undefined4 *)((char *)&((std_string *)layerString._buf) + 0x0)); if (0xfff < uVar6) { - psVar4 = (std_string *)((std_string *)(layerString._buf._0_4_ + -0x18))->_capacity; + psVar4 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(layerString._buf) + 0x0)) + -0x18))->_capacity; uVar6 = layerString._capacity + 0x24; - if ((byte *)0x1f < (byte *)(layerString._buf._0_4_ + (-4 - (int)psVar4))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(layerString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar4)))) goto LAB_006bb75e; } operator_delete(psVar4,uVar6); } - ((Sprite *)(layerSprite))->Sprite::ReplaceSpritesheet((int)layerIndex,&resolvedSheetPath); + ((Sprite *)(layerSprite))->Sprite::ReplaceSpritesheet(GHIDRA_INT(layerIndex),&resolvedSheetPath); if (local_9d == 0) { uVar6 = layer->_bitflags & 0xffffffef; } @@ -3830,15 +3830,15 @@ LAB_006bb394: isChampionSheetUsed = '\x01'; uVar6 = layer->_bitflags | 0x10; } - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; layer->_bitflags = uVar6; if (0xf < resolvedSheetPath._capacity) { uVar6 = resolvedSheetPath._capacity + 1; - freeBlock = (void *)resolvedSheetPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)resolvedSheetPath._buf) + 0x0)); if (0xfff < uVar6) { - freeBlock = *(void **)(resolvedSheetPath._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(resolvedSheetPath._buf) + 0x0)) + -4); uVar6 = resolvedSheetPath._capacity + 0x24; - if (0x1f < (uint)(resolvedSheetPath._buf._0_4_ + (-4 - (int)freeBlock))) + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(resolvedSheetPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_006bb75e; } operator_delete(freeBlock,uVar6); @@ -3876,21 +3876,21 @@ LAB_006bb394: } if (0xf < championSuffix._capacity) { uVar8 = championSuffix._capacity + 1; - freeBlock = (void *)championSuffix._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)championSuffix._buf) + 0x0)); if (0xfff < uVar8) { - freeBlock = *(void **)(championSuffix._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(championSuffix._buf) + 0x0)) + -4); uVar8 = championSuffix._capacity + 0x24; - if (0x1f < (uint)(championSuffix._buf._0_4_ + (-4 - (int)freeBlock))) goto LAB_006bb75e; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(championSuffix._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_006bb75e; } operator_delete(freeBlock,uVar8); } if (0xf < sheetOverridePath._capacity) { uVar8 = sheetOverridePath._capacity + 1; - freeBlock = (void *)sheetOverridePath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)sheetOverridePath._buf) + 0x0)); if (0xfff < uVar8) { - freeBlock = *(void **)(sheetOverridePath._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(sheetOverridePath._buf) + 0x0)) + -4); uVar8 = sheetOverridePath._capacity + 0x24; - if (0x1f < (uint)(sheetOverridePath._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(sheetOverridePath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { LAB_006bb75e: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3936,7 +3936,7 @@ void Entity_NPC::LoadEntityConfig() local_8 = 0xffffffff; puStack_c = &LAB_00afa7e0; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(local_34 + 0x30); + local_14 = __security_cookie ^ GHIDRA_UINT((local_34 + 0x30)); ExceptionList = &local_10; rng._seed = this->_initSeed; rng._shift1 = 1; @@ -4013,7 +4013,7 @@ void Entity_NPC::LoadEntityConfig() uVar4 = 0; } if (DAT_00c71670 == '\0') { - if (((0 < (int)uVar4) && (this->_subtype == 0)) && + if (((0 < GHIDRA_INT(uVar4)) && (this->_subtype == 0)) && (((g_manager->_persistentGameData)._achievements[3] != 0 || ((g_manager->_state == 2 && (((game->_dailyChallenge)._id != 0 || (game->_isDebug != 0)))) )))) { @@ -4073,7 +4073,7 @@ void Entity_NPC::LoadEntityConfig() local_8 = 0; iVar2 = this->_subtype + -1; this->_bosscoloridx = iVar2; - if ((iVar2 < 0) || ((int)uVar4 <= iVar2)) { + if ((iVar2 < 0) || (GHIDRA_INT(uVar4) <= iVar2)) { KAGE_LogMessage(1,(byte *)"Invalid boss color idx: %d\n"); this->_bosscoloridx = -1; } @@ -4170,7 +4170,7 @@ Entity * Entity_NPC::GetPlayerTarget() local_8 = 0xffffffff; puStack_c = &LAB_00afa865; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; if (this->_type != 0x35) { ExceptionList = &local_10; if ((((this->_flags & 0x100) != 0) && (*(char *)((char *)g_game->_room + 0x72a1) == '\0')) && @@ -4198,13 +4198,13 @@ Entity * Entity_NPC::GetPlayerTarget() else { bVar1 = 1; } - local_1c._0_1_ = 1; + (*(undefined1 *)((char *)&(local_1c) + 0x0)) = 1; if ((this->_flags & 0x20000000) == 0) { - local_1c = (EntityPtr)((uint)(uint3)local_1c._1_3_ << 8); + local_1c = (EntityPtr)((*(undefined1 *)((char *)&(GHIDRA_UINT((uint3))local_1c) + 0x1)) << 8); } EVar5 = (EntityPtr) Game::GetNearestTargetPlayer - (&this->_pos,(Entity *)this,local_1c._0_1_,bVar1,(void *)0x0,5000.0); + (&this->_pos,(Entity *)this,(*(undefined1 *)((char *)&(local_1c) + 0x0)),bVar1,(void *)0x0,5000.0); if (EVar5 == (EntityPtr)0x0) { player = ((Game *)(g_game))->Game::GetPlayer(0); ExceptionList = local_10; @@ -4240,24 +4240,24 @@ Entity * Entity_NPC::GetPlayerTarget() ExceptionList = &local_10; candidatesCapEnd = candidates; candidatesCap = candidates; - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&sameTypeList,0x35,-1,-1,0,0) + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&sameTypeList,0x35,-1,-1,0,0) ; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); playerManager = &g_game->_playerManager; playerIndex = 0; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> 2 + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { candidatesBegin = (EntityPtr)0x0; } else { do { playerListEnd = (playerManager->_playerList)._end; - if ((int)playerListEnd - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (playerManager->_playerList)._end; } pEVar4 = (playerManager->_playerList)._begin; - if (playerIndex < (uint)((int)playerListEnd - (int)pEVar4 >> 2)) { + if (playerIndex < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(pEVar4) >> 2))) { pEVar4 = pEVar4 + playerIndex; } local_20 = *pEVar4; @@ -4268,7 +4268,7 @@ Entity * Entity_NPC::GetPlayerTarget() sibling = *(Entity_NPC **)((char *)sameTypeList._data + uVar3 * 4); if ((sibling != this) && (sibling->_target == local_20)) goto LAB_006be971; uVar3 = uVar3 + 1; - } while (uVar3 < (uint)sameTypeList._size); + } while (uVar3 < GHIDRA_UINT(sameTypeList._size)); } LAB_006be94c: if (EVar5 == candidatesCap) { @@ -4278,7 +4278,7 @@ LAB_006be94c: } else { *(EntityPtr *)EVar5 = local_20; - candidatesEnd = (EntityPtr)((int)EVar5 + 4); + candidatesEnd = (EntityPtr)(GHIDRA_INT(EVar5) + 4); EVar5 = candidatesEnd; } } @@ -4288,14 +4288,14 @@ LAB_006be971: playerManager = &g_game->_playerManager; playerIndex = playerIndex + 1; } while (playerIndex < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); if (candidates != EVar5) { pickRng._seed = this->_initSeed; pickRng._shift1 = 2; pickRng._shift2 = 7; pickRng._shift3 = 7; - uVar2 = ((RNG *)(&pickRng))->RNG::RandomInt((int)EVar5 - (int)candidates >> 2); + uVar2 = ((RNG *)(&pickRng))->RNG::RandomInt(GHIDRA_INT(EVar5) - GHIDRA_INT(candidates) >> 2); player = *(Entity_Player **)((char *)candidatesBegin + uVar2 * 4); goto LAB_006bea36; } @@ -4325,7 +4325,7 @@ LAB_006bea36: newTarget = *(Entity **)EVar5; uVar2 = local_8 >> 8; local_8 = local_8 & 0xffffff00; - if (sameTypeList._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(sameTypeList) + 0x0)) == '\0') { local_8 = CONCAT31((int3)uVar2,2); tracked_alloc(1,sameTypeList._data,0); } @@ -4333,12 +4333,12 @@ LAB_006bea36: ExceptionList = local_10; return newTarget; } - uVar2 = (int)candidatesCap - (int)candidatesBegin & 0xfffffffc; + uVar2 = GHIDRA_INT(candidatesCap) - GHIDRA_INT(candidatesBegin) & 0xfffffffc; EVar5 = candidatesBegin; if (0xfff < uVar2) { EVar5 = *(EntityPtr *)((char *)candidatesBegin + -4); uVar2 = uVar2 + 0x23; - if (0x1f < ((int)candidatesBegin - (int)EVar5) - 4U) { + if (0x1f < (GHIDRA_INT(candidatesBegin) - GHIDRA_INT(EVar5)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -4367,7 +4367,7 @@ Vector * Entity_NPC::CalcTargetPosition(Vector *outPos, float distanceLimit) Room *room; game = g_game; - local_10.y = *(float *)((int)&this->_flags + 4); + local_10.y = *(float *)(GHIDRA_INT(&this->_flags) + 4); flags = this->_flags; if ((flags & 0x200) == 0) { if ((flags & 0x1000800) != 0) { @@ -4422,7 +4422,7 @@ LAB_006bee6f: room = game->_room; randomDir = MusicManager::RandomVector(&local_20); rngResult = Random(); - fVar3 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)] + fVar3 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)] ) * 2.3283064e-10 * 100.0; local_18.x = (this->_pos).x - fVar3 * randomDir->x; local_18.y = (this->_pos).y - fVar3 * randomDir->y; @@ -4452,14 +4452,14 @@ LAB_006bee6f: local_18.x = this->_size; room = game->_room; rngResult = Random(); - local_20.x = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + local_20.x = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_20.x = local_20.x + local_20.x; rngResult = Random(); - local_10.x = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + local_10.x = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10; rngResult = Random(); - fVar3 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + fVar3 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * local_10.x * 240.0; fVar4 = cos(local_20.x); local_10.x = fVar4 * fVar3 + (this->_pos).x; @@ -4514,7 +4514,7 @@ void Entity_NPC::UpdateDirtColor(byte immediate) local_14 = (byte ****)0xffffffff; puStack_18 = &LAB_00afa8ae; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(layerName + 0x11); + local_24 = __security_cookie ^ GHIDRA_UINT((layerName + 0x11)); ExceptionList = &local_1c; stringDestructFlags = 0; local_68 = 0; @@ -4555,7 +4555,7 @@ LAB_006c05af: layerName[0] = (byte *****)0x0; } else { - ((std::string *)((char *)layerName))->std::string::string((void *)((int)layer->_layerData + 8)); + ((std::string *)((char *)layerName))->std::string::string((void *)(GHIDRA_INT(layer->_layerData) + 8)); } local_14 = (byte ****)0x0; local_68 = stringDestructFlags | 1; @@ -4574,16 +4574,16 @@ LAB_006c05af: local_38._alpha = 0.0; } else { - ((std::string *)((char *)&layerNameCopy))->std::string::string((void *)((int)layer->_layerData + 8)); + ((std::string *)((char *)&layerNameCopy))->std::string::string((void *)(GHIDRA_INT(layer->_layerData) + 8)); } uVar6 = local_38._unk; pppppbVar4 = layerNameCopy; stringDestructFlags = stringDestructFlags | 2; pppppbVar5 = (byte *****)&layerNameCopy; - if (0xf < (uint)local_38._unk) { + if (0xf < GHIDRA_UINT(local_38._unk)) { pppppbVar5 = layerNameCopy; } - bVar3 = str_eq((byte *)pppppbVar5,(uint)local_38._alpha,&DAT_00b1d57c,4); + bVar3 = str_eq((byte *)pppppbVar5,GHIDRA_UINT(local_38._alpha),&DAT_00b1d57c,4); if (bVar3 != 0) goto LAB_006c06a7; isDirtLayer = '\0'; } @@ -4600,7 +4600,7 @@ LAB_006c06a7: if (0xfff < size) { pppppbVar5 = (byte *****)pppppbVar4[-1]; size = uVar6 + 0x24; - if ((byte *)0x1f < (byte *)((int)pppppbVar4 + (-4 - (int)pppppbVar5))) goto LAB_006c07af; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(pppppbVar4) + (-4 - GHIDRA_INT(pppppbVar5)))) goto LAB_006c07af; } operator_delete(pppppbVar5,size); } @@ -4612,7 +4612,7 @@ LAB_006c06a7: if (0xfff < uVar6) { pppppbVar4 = (byte *****)layerNameData[-1]; uVar6 = layerNameCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)layerNameData + (-4 - (int)pppppbVar4))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(layerNameData) + (-4 - GHIDRA_INT(pppppbVar4)))) { LAB_006c07af: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -4958,7 +4958,7 @@ void Entity_NPC::Morph(int EntityType, int Variant, int SubType, int Championid) uint local_c; float *health; - local_c = __security_cookie ^ (uint)&defaultColor; + local_c = __security_cookie ^ GHIDRA_UINT(&defaultColor); if ((((EntityType == this->_type) && (Variant == this->_variant)) && (SubType == this->_subtype)) && ((Championid < 0 || (Championid == this->_championColorIdx)))) { return; @@ -5033,7 +5033,7 @@ void Entity_NPC::ResetColor() int bossColorIdx; int bossColors; - local_8 = __security_cookie ^ (uint)(local_28 + 0x24); + local_8 = __security_cookie ^ GHIDRA_UINT((local_28 + 0x24)); if (this->_isChampion == 0) { bossColorIdx = this->_bosscoloridx; if (bossColorIdx < 0) { @@ -5084,7 +5084,7 @@ void Entity_NPC::ResetColor() isChampionLayer = local_85; } LAB_006c115c: - if ((uint)this->_championColorIdx < 0x1a) { + if (GHIDRA_UINT(this->_championColorIdx) < 0x1a) { spriteColor = &(this->_sprite)._color; if (isChampionLayer == '\0') { championColor = (float *)_Entity_NPC::GetColorWithFlash(flashColor); @@ -5182,11 +5182,11 @@ void * Entity_NPC::shopkeeper_get_loot(void *outLoot, byte isShouldAdvance) undefined4 lootType; undefined4 temp_3f540a64be; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00afa8ed; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; lootList = (int *)0x0; lootMap = (void *)0x0; @@ -5195,7 +5195,7 @@ void * Entity_NPC::shopkeeper_get_loot(void *outLoot, byte isShouldAdvance) lootCount = 0; lootList = operator_new(8); lootList[1] = 0; - *lootList = (int)&lootList; + *lootList = GHIDRA_INT(&lootList); local_14 = 0; if ((this->_flags & 0x40000000000) != 0) { ((LootList *)(outLoot))->LootList::LootList(&lootList); @@ -5224,7 +5224,7 @@ void * Entity_NPC::shopkeeper_get_loot(void *outLoot, byte isShouldAdvance) if (0xfff < local_ESI_258) { block = *(void **)((char *)dequeMap + -4); local_ESI_258 = local_ESI_258 + 0x23; - if (0x1f < (uint)((int)dequeMap + (-4 - (int)block))) goto LAB_006c2071; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(dequeMap) + (-4 - GHIDRA_INT(block))))) goto LAB_006c2071; } operator_delete(block,local_ESI_258); } @@ -5368,7 +5368,7 @@ LAB_006c1fef: local_ESI_258 = local_ESI_258 ^ local_ESI_258 >> ((byte)rng->_shift3 & 0x1f); rng->_seed = local_ESI_258; if (local_ESI_258 % 100 == 0) { - local_38 = CONCAT31((int3)((uint)g_game >> 8),isShouldAdvance) ^ 1; + local_38 = CONCAT31((int3)(GHIDRA_UINT(g_game) >> 8),isShouldAdvance) ^ 1; bVar2 = ItemPool::RemoveCollectible(&g_game->_itemPool,0x40,1,(byte)local_38); if (bVar2 == 0) { bVar2 = (byte)local_38; @@ -5381,7 +5381,7 @@ LAB_006c1fef: else { bVar2 = isShouldAdvance ^ 1; LAB_006c1cb2: - local_38 = CONCAT31(local_38._1_3_,bVar2); + local_38 = CONCAT31((*(undefined1 *)((char *)&(local_38) + 0x1)),bVar2); local_ESI_258 = ((RNG *)(rng))->RNG::RandomInt(100); bVar2 = (byte)local_38; if ((local_ESI_258 == 0) && @@ -5457,7 +5457,7 @@ LAB_006c1ffb: if (0xfff < local_ESI_258) { block = *(void **)((char *)dequeMap + -4); local_ESI_258 = local_ESI_258 + 0x23; - if (0x1f < (uint)((int)dequeMap + (-4 - (int)block))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(dequeMap) + (-4 - GHIDRA_INT(block))))) { LAB_006c2071: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -5518,8 +5518,8 @@ Entity_NPC * Entity_NPC::ThrowSpider(Vector *position, Entity *spawner, Vector t } LAB_006c2838: room = currentGame->_room; - gridX = (int)((fVar2 - 40.0) / 40.0 + 0.5); - gridY = (int)((targetPos.y - 120.0) / 40.0 + 0.5); + gridX = GHIDRA_INT(((fVar2 - 40.0) / 40.0 + 0.5)); + gridY = GHIDRA_INT(((targetPos.y - 120.0) / 40.0 + 0.5)); if ((((-1 < gridX) && (gridX < *(int *)((char *)room + 0xc))) && ((-1 < gridY && ((gridY < *(int *)((char *)room + 0x10) && @@ -5716,7 +5716,7 @@ void Entity_NPC::Update() local_14 = 0xffffffff; puStack_18 = &LAB_00afaabc; local_1c = ExceptionList; - uVar4 = __security_cookie ^ (uint)(local_4c + 0x3c); + uVar4 = __security_cookie ^ GHIDRA_UINT((local_4c + 0x3c)); local_2a4 = (Entity_Effect *)0x0; local_28c = (Entity_Effect *)0x0; if (this->_exists == 0) { @@ -5750,7 +5750,7 @@ void Entity_NPC::Update() if ((((bVar2 != 0) && ((this->_flags & 0x20000000) == 0)) && (bVar2 = ((Entity *)((Entity *)this))->Entity::IsActiveEnemy(0), bVar2 != 0)) && (bVar2 = TemporaryEffects::HasNullEffect - ((TemporaryEffects *)((int)g_game->_room + 0x7310),0x40), bVar2 != 0)) { + ((TemporaryEffects *)(GHIDRA_INT(g_game->_room) + 0x7310),0x40), bVar2 != 0)) { ::((EntityRef *)((EntityRef *)local_4c))->EntityRef::constructor((Entity *)0x0); ((Entity *)((Entity *)this))->Entity::AddWeakness((EntityRef *)local_4c,-3); } @@ -5819,9 +5819,9 @@ LAB_006c4d15: } if (((entityFlags & 0x80) != 0) || ((((bVar2 = TemporaryEffects::HasCollectibleEffect - ((TemporaryEffects *)((int)g_game->_room + 0x7310),0xe8), bVar2 != 0 || + ((TemporaryEffects *)(GHIDRA_INT(g_game->_room) + 0x7310),0xe8), bVar2 != 0 || (bVar2 = TemporaryEffects::HasCollectibleEffect - ((TemporaryEffects *)((int)g_game->_room + 0x7310),0x42), bVar2 != 0)) + ((TemporaryEffects *)(GHIDRA_INT(g_game->_room) + 0x7310),0x42), bVar2 != 0)) || ((g_game->_challenge != 0x16 && (*(int *)((char *)g_game->_room + 0x1210) == 1)))) && (((this->_flags & 0x20000001) == 0 || (this->_type == 0xd4)))))) { local_290 = (Entity *)&DAT_00b6769c; @@ -5885,14 +5885,14 @@ LAB_006c4f12: Entity_NPC_UpdateAI_dispatch(this); this->_aiCallPhase = 0; } - uVar4 = *(uint *)((int)&this->_flags + 4); + uVar4 = *(uint *)(GHIDRA_INT(&this->_flags) + 4); local_288 = (Room *)this->_health; if ((uVar4 & 1) == 0) { - *(int *)&this->_flags = (int)this->_flags; - *(uint *)((int)&this->_flags + 4) = uVar4 ^ 1; + *(int *)&this->_flags = GHIDRA_INT(this->_flags); + *(uint *)(GHIDRA_INT(&this->_flags) + 4) = uVar4 ^ 1; ((Entity *)((Entity *)this))->Entity::Update(); - *(int *)&this->_flags = (int)this->_flags; - flagsHighPtr = (uint *)((int)&this->_flags + 4); + *(int *)&this->_flags = GHIDRA_INT(this->_flags); + flagsHighPtr = (uint *)(GHIDRA_INT(&this->_flags) + 4); *flagsHighPtr = *flagsHighPtr ^ 1; } else { @@ -5958,13 +5958,13 @@ LAB_006c4f12: local_288 = (Room *)((Sprite *)((Sprite *)&this->_sprite))->Sprite::GetLayer(layer); psVar6 = (std_string *)_get_name_string(local_64); local_14 = 1; - local_2a4 = (Entity_Effect *)((uint)local_28c | 1); + local_2a4 = (Entity_Effect *)(GHIDRA_UINT(local_28c) | 1); local_28c = local_2a4; bVar2 = str_eq_cstr(psVar6,&DAT_00b64428); if (bVar2 == 0) { psVar6 = (std_string *)_get_name_string(local_4c + 0x10); local_14 = 2; - local_2a4 = (Entity_Effect *)((uint)local_28c | 2); + local_2a4 = (Entity_Effect *)(GHIDRA_UINT(local_28c) | 2); local_28c = local_2a4; bVar2 = str_eq_cstr(psVar6,&DAT_00b1d57c); local_281 = 0; @@ -5974,13 +5974,13 @@ LAB_006c4f12: LAB_006c5358: local_281 = 1; } - if (((uint)local_28c & 2) != 0) { - local_28c = (Entity_Effect *)((uint)local_28c & 0xfffffffd); + if ((GHIDRA_UINT(local_28c) & 2) != 0) { + local_28c = (Entity_Effect *)(GHIDRA_UINT(local_28c) & 0xfffffffd); ((std::string *)(local_4c + 0x10))->std::string::_Tidy_deallocate(); } local_14 = 0xffffffff; - if (((uint)local_28c & 1) != 0) { - local_28c = (Entity_Effect *)((uint)local_28c & 0xfffffffe); + if ((GHIDRA_UINT(local_28c) & 1) != 0) { + local_28c = (Entity_Effect *)(GHIDRA_UINT(local_28c) & 0xfffffffe); ((std::string *)(local_64))->std::string::_Tidy_deallocate(); } if (local_281 != 0) { @@ -6014,7 +6014,7 @@ LAB_006c5358: local_288 = pRVar10; ((Entity *)((Entity *)pRVar10))->Entity::SetPositionOffset(&this->_posOffset); set_field_358(pRVar10,(this->_posOffset).y + 1.0); - if ((this->_isChampion != 0) && ((uint)this->_championColorIdx < 0x1a)) { + if ((this->_isChampion != 0) && (GHIDRA_UINT(this->_championColorIdx) < 0x1a)) { pcVar1 = *(code **)(*(int *)pRVar10 + 0x3c); uVar28 = _Entity_NPC::GetColorWithFlash(local_a0); (*pcVar1)(uVar28,0xffffffff,0xff,0,1); @@ -6072,13 +6072,13 @@ LAB_006c56aa: } local_281 = 1; } - if (((uint)local_28c & 8) != 0) { - local_28c = (Entity_Effect *)((uint)local_28c & 0xfffffff7); + if ((GHIDRA_UINT(local_28c) & 8) != 0) { + local_28c = (Entity_Effect *)(GHIDRA_UINT(local_28c) & 0xfffffff7); ((std::string *)(local_4c + 0x10))->std::string::_Tidy_deallocate(); } local_14 = 0xffffffff; - if (((uint)local_28c & 4) != 0) { - local_28c = (Entity_Effect *)((uint)local_28c & 0xfffffffb); + if ((GHIDRA_UINT(local_28c) & 4) != 0) { + local_28c = (Entity_Effect *)(GHIDRA_UINT(local_28c) & 0xfffffffb); ((std::string *)(local_64))->std::string::_Tidy_deallocate(); } if (local_281 != 0) { @@ -6140,7 +6140,7 @@ LAB_006c58bd: LAB_006c58e9: if ((iVar16 != 0x12) && (iVar16 != 0x11)) goto LAB_006c68c7; fVar20 = this->_friction * 0.01; - auVar23 = ZEXT416((uint)fVar20); + auVar23 = ZEXT416(GHIDRA_UINT(fVar20)); this->_friction = fVar20; if (this->_stateFrame == 0) { if (iVar16 == 0x11) { @@ -6293,7 +6293,7 @@ LAB_006c5c89: ((ProjectileParams *)(&projectileParams))->ProjectileParams::ProjectileParams(); pPVar31 = &projectileParams; projectileParams.FallingAccelModifier = projectileParams.FallingAccelModifier - 0.099; - auVar23 = ZEXT416((uint)projectileParams.FallingAccelModifier); + auVar23 = ZEXT416(GHIDRA_UINT(projectileParams.FallingAccelModifier)); uVar4 = 9; tmpVec = ((Vector *)(&local_2e0))->Vector::Vector(6.0,10.0); FireProjectiles(this,&this->_pos,tmpVec,uVar4,pPVar31); @@ -6321,10 +6321,10 @@ LAB_006c5c89: tmpColor = extraout_EAX; source = this; FUN_00435bc0(0,0); - tearFlags._l._4_4_ = in_stack_fffffc54; - tearFlags._l._0_4_ = in_stack_fffffc50; - tearFlags._h._0_4_ = in_stack_fffffc58; - tearFlags._h._4_4_ = in_stack_fffffc5c; + (*(undefined4 *)((char *)&(tearFlags._l) + 0x4)) = in_stack_fffffc54; + (*(undefined4 *)((char *)&(tearFlags._l) + 0x0)) = in_stack_fffffc50; + (*(undefined4 *)((char *)&(tearFlags._h) + 0x0)) = in_stack_fffffc58; + (*(undefined4 *)((char *)&(tearFlags._h) + 0x4)) = in_stack_fffffc5c; Game::BombExplosionEffects (g_game,&this->_pos,80.0,tearFlags,tmpColor,(Entity *)source,fVar20,bVar2, CONCAT44(uVar33,uVar28),damageSource); @@ -6392,9 +6392,9 @@ LAB_006c5c89: pEVar7->Update(); fVar20 = random_float(); this = npc; - auVar23._0_4_ = fVar20 * 0.2 + 0.9; - auVar23._4_12_ = extraout_var_00; - play_sound_with_fart_seed(0x1dd,1.25,2,0,auVar23._0_4_); + (*(undefined4 *)((char *)&(auVar23) + 0x0)) = fVar20 * 0.2 + 0.9; + (*(undefined1 *)((char *)&(auVar23) + 0x4)) = extraout_var_00; + play_sound_with_fart_seed(0x1dd,1.25,2,0,(*(undefined4 *)((char *)&(auVar23) + 0x0))); ((Game *)(g_game))->Game::ShakeScreen(0xe); } } @@ -6412,12 +6412,12 @@ LAB_006c5c89: animState = (AnimationState *)Config::GetPillEffects(); iVar16 = ((AnimationState *)(animState))->AnimationState::NextEventTrigger((byte *)"Explosion"); _empty_check_0x34(); - if (auVar23._0_4_ + 10.0 <= (float)iVar16) { + if ((*(undefined4 *)((char *)&(auVar23) + 0x0)) + 10.0 <= (float)iVar16) { fVar19 = (float10)((Sprite *)((Sprite *)&this->_sprite))->Sprite::PlaybackSpeed(); local_288 = (Room *)((float)fVar19 * this->_speedMultiplier); auVar23 = ZEXT416(local_288); _empty_check_0x34(); - if ((float)iVar16 < auVar23._0_4_ + (float)local_288 + 10.0) { + if ((float)iVar16 < (*(undefined4 *)((char *)&(auVar23) + 0x0)) + (float)local_288 + 10.0) { uVar4 = Random(); pEVar7 = ((Game *)(g_game))->Game::Spawn(1000,0xf,&this->_pos,&g_vectorZero,(Entity *)0x0,0xb,uVar4); pAVar18 = (ANM2 *)((Entity *)(pEVar7))->Entity::GetSprite(); @@ -6509,7 +6509,7 @@ LAB_006c5c89: if (bVar2 != 0) { iVar16 = Isaac::Random(0xc); local_2c4 = (Room *)(iVar16 + 0xc); - if (0 < (int)local_2c4) { + if (0 < GHIDRA_INT(local_2c4)) { do { tmpVec = MusicManager::RandomVector(&local_2e0); fVar20 = random_float(); @@ -6528,7 +6528,7 @@ LAB_006c5c89: pTVar29 = &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor; uVar28 = 0; pEVar7 = ((Game *)(g_game))->Game::Spawn(1000,0x3b,tmpVec,&local_298,(Entity *)npc,0, - (uint)local_2c0); + GHIDRA_UINT(local_2c0)); local_2a4 = (Entity_Effect *)__RTDynamicCast(pEVar7,uVar28,pTVar29,pTVar30,uVar33); local_2b0 = (Entity *)0x3f800000; tmpVec = ((Entity *)((Entity *)local_2a4))->Entity::Position(&local_2f0); @@ -6687,7 +6687,7 @@ LAB_006c87a7: } } LAB_006c6bee: - this->_lastGridIndex = (int)local_2c0; + this->_lastGridIndex = GHIDRA_INT(local_2c0); } } } @@ -6844,7 +6844,7 @@ LAB_006c7154: this->_friction = this->_friction * 0.8; pRVar10 = (Room *)((Entity *)((Entity *)this))->Entity::GetHitPointsLost(); local_288 = pRVar10; - if (0 < (int)pRVar10) { + if (0 < GHIDRA_INT(pRVar10)) { do { this->_championRegenTimer = this->_championRegenTimer + 1; regenTimer = this->_championRegenTimer; @@ -6852,7 +6852,7 @@ LAB_006c7154: fVar19 = (float10)Scale(this); SetScale(this,(float)(fVar19 * (float10)0.5)); if ((4 < this->_championRegenTimer) && - ((int)this->_championRegenTimer - (int)local_288 < 5)) { + (GHIDRA_INT(this->_championRegenTimer) - GHIDRA_INT(local_288) < 5)) { ((std::string *)(local_4c + 0x10))->std::string::string_from_cstr((byte *)"gfx/024.000_Globin.anm2"); local_14 = 7; ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)(local_4c + 0x10),1); @@ -6871,7 +6871,7 @@ LAB_006c7308: this->_state = 1; this->_championRegenTimer = 0; this->_friction = this->_baseFriction; - this->_aiCallFlags = (uint)*(ushort *)((int)&this->_aiCallFlags + 2); + this->_aiCallFlags = GHIDRA_UINT(*(ushort *)(GHIDRA_INT(&this->_aiCallFlags) + 2)); iVar16 = this->_type; if ((((iVar16 == 0x22) || (iVar16 == 0x56)) || (iVar16 == 0x36)) || ((iVar16 == 0xf6 || (iVar16 == 0x1d)))) { @@ -7055,18 +7055,18 @@ LAB_006c8133: pRVar10 = (Room *)(fVar20 / 20.0); local_288 = pRVar10; FUN_00407140(); - local_2b0 = (Entity *)(int)(float)pRVar10; + local_2b0 = (Entity *)GHIDRA_INT((float)pRVar10); std::max(); piVar14 = (int *)std::min(); local_2b8.y = (float)*piVar14; - if (0 < (int)local_2b8.y) { + if (0 < GHIDRA_INT(local_2b8.y)) { local_2c4 = (Room *)&this->_posOffset; - local_298.y = (float)(int)&(*(undefined1 *)((char *)(((Entity_Player *)local_2b8.y)) + 0x1)); + local_298.y = (float)GHIDRA_INT(&(*(undefined1 *)((char *)(((Entity_Player *)local_2b8.y)) + 0x1))); local_2f0.y = (float)(Vector *)0x0; - fVar20 = (float)(int)&(*(undefined1 *)((char *)(((Entity_Player *)local_2b8.y)) + 0x1)); + fVar20 = (float)GHIDRA_INT(&(*(undefined1 *)((char *)(((Entity_Player *)local_2b8.y)) + 0x1))); do { - local_2f0.y = (float)((int)&((Vector *)local_2f0.y)->x + 1); - local_2ac = (Room *)((float)(int)local_2f0.y / fVar20); + local_2f0.y = (float)(GHIDRA_INT(&((Vector *)local_2f0.y)->x) + 1); + local_2ac = (Room *)((float)GHIDRA_INT(local_2f0.y) / fVar20); local_288 = local_2ac; entitySlot = (undefined4 *)std::vector::operator_index(pAVar18); tmpVec = ((Entity *)((Entity *)*entitySlot))->Entity::Position(&local_344); @@ -7100,7 +7100,7 @@ LAB_006c8133: ((Entity *)(pEVar7))->Entity::SetPositionOffset(tmpVec); pAVar18 = local_2a0; fVar20 = local_298.y; - } while ((int)local_2f0.y < (int)local_2b8.y); + } while (GHIDRA_INT(local_2f0.y) < GHIDRA_INT(local_2b8.y)); } local_281 = 1; entitySlot = (undefined4 *)std::vector::operator_index(pAVar18); @@ -7189,10 +7189,10 @@ LAB_006c8133: fVar19 = (float10)Color::BO(); local_2ac = (Room *)(float)fVar19; local_2c0 = (Entity *)Math::lerp((float)local_2ac,(float)local_288,0.3,0); - local_288 = (Room *)((float)local_60._4_4_ * 0.9); + local_288 = (Room *)((*(undefined4 *)((char *)&((float)local_60) + 0x4)) * 0.9); local_2ac = (Room *)((Color *)(&spriteColorCopy))->Color::GO(); local_2d8 = (Entity *)Math::lerp((float)local_2ac,(float)local_288,0.3,0); - local_288 = (Room *)((float)local_60._0_4_ * 0.9); + local_288 = (Room *)((*(undefined4 *)((char *)&((float)local_60) + 0x0)) * 0.9); fVar19 = (float10)Color::RO(); local_2ac = (Room *)(float)fVar19; fVar20 = Math::lerp((float)local_2ac,(float)local_288,0.3,0); @@ -7243,10 +7243,10 @@ LAB_006c8136: local_298.y = fVar21; pRVar10 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); iVar16 = ((Room *)(pRVar10))->Room::GetFrameCount(); - if ((uint)(iVar16 + this->_index) % 0x3c == 0) { + if (GHIDRA_UINT((iVar16 + this->_index)) % 0x3c == 0) { pRVar10 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); iVar16 = ((Room *)(pRVar10))->Room::GetFrameCount(); - if ((900 < iVar16) && (local_298.y._0_1_ != '\0')) { + if ((900 < iVar16) && ((*(undefined1 *)((char *)&(local_298.y) + 0x0)) != '\0')) { gridEntity = (GridEntity *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); iVar16 = ((GridEntity *)(gridEntity))->GridEntity::GetVariant(); if (iVar16 == 1) { @@ -7261,7 +7261,7 @@ LAB_006c8136: iVar16 = ((Game *)(g_game))->Game::GetNumPlayers(); if (iVar16 != 0) { do { - player = ((Game *)(g_game))->Game::GetPlayer((uint)pRVar10); + player = ((Game *)(g_game))->Game::GetPlayer(GHIDRA_UINT(pRVar10)); local_298.y = (float)player; bVar2 = ((Entity *)((Entity *)player))->Entity::IsFlying(); if (bVar2 == 0) { @@ -7306,7 +7306,7 @@ LAB_006c8453: else { local_2a4 = (Entity_Effect *)Isaac::Random(3); } - if (0 < (int)local_2a4) { + if (0 < GHIDRA_INT(local_2a4)) { do { uVar4 = Random(); tmpVec = MusicManager::RandomVector(&local_2f8); @@ -7396,20 +7396,20 @@ LAB_006c87b4: iVar16 = ((Game *)(g_game))->Game::GetNumPlayers(); if (iVar16 != 0) { do { - pRVar10 = (Room *)((Game *)(g_game))->Game::GetPlayer((uint)puVar17); + pRVar10 = (Room *)((Game *)(g_game))->Game::GetPlayer(GHIDRA_UINT(puVar17)); FUN_0042a020(); bVar2 = ((Entity_Player *)((Entity_Player *)pRVar10))->Entity_Player::HasCollectible(0x14f,0); - local_298.y._0_1_ = bVar2; + (*(undefined1 *)((char *)&(local_298.y) + 0x0)) = bVar2; FUN_006da770(&local_2e0,0); FUN_006da710(local_298.y); guard_check_icall(); bVar2 = ((Entity_Player *)((Entity_Player *)pRVar10))->Entity_Player::HasTrinket(0x44,0); - local_2b8.y = (float)CONCAT31(local_2b8.y._1_3_,bVar2); + local_2b8.y = (float)CONCAT31((*(undefined1 *)((char *)&(local_2b8.y) + 0x1)),bVar2); FUN_006da770(&local_2e8,1); FUN_006da710(local_2b8.y); guard_check_icall(); bVar2 = ((Entity_Player *)((Entity_Player *)pRVar10))->Entity_Player::HasCollectible(0x2b8,0); - local_2f0.y = (float)CONCAT31(local_2f0.y._1_3_,bVar2); + local_2f0.y = (float)CONCAT31((*(undefined1 *)((char *)&(local_2f0.y) + 0x1)),bVar2); FUN_006da770(&local_2d0,2); FUN_006da710(local_2f0.y); guard_check_icall(); @@ -7418,13 +7418,13 @@ LAB_006c87b4: tmpVec = ((Entity *)((Entity *)pRVar10))->Entity::Position(&local_32c); local_290 = (Entity *)((Vector *)(tmpVec))->Vector::DistanceSquared(&this->_pos); FUN_006da770(&local_300,0); - local_28c = (Entity_Effect *)((uint)local_28c | 0x10); + local_28c = (Entity_Effect *)(GHIDRA_UINT(local_28c) | 0x10); cVar3 = FUN_006da6f0(); if ((cVar3 == '\0') || (local_281 = '\x01', (float)local_2b0 <= (float)local_290)) { local_281 = '\0'; } - if (((uint)local_28c & 0x10) != 0) { - local_28c = (Entity_Effect *)((uint)local_28c & 0xffffffef); + if ((GHIDRA_UINT(local_28c) & 0x10) != 0) { + local_28c = (Entity_Effect *)(GHIDRA_UINT(local_28c) & 0xffffffef); guard_check_icall(); } if (local_281 != '\0') { @@ -7432,13 +7432,13 @@ LAB_006c87b4: local_2b0 = local_290; } FUN_006da770(&local_308,1); - local_28c = (Entity_Effect *)((uint)local_28c | 0x20); + local_28c = (Entity_Effect *)(GHIDRA_UINT(local_28c) | 0x20); cVar3 = FUN_006da6f0(); if ((cVar3 == '\0') || (local_281 = '\x01', (float)local_2d8 <= (float)local_290)) { local_281 = '\0'; } - if (((uint)local_28c & 0x20) != 0) { - local_28c = (Entity_Effect *)((uint)local_28c & 0xffffffdf); + if ((GHIDRA_UINT(local_28c) & 0x20) != 0) { + local_28c = (Entity_Effect *)(GHIDRA_UINT(local_28c) & 0xffffffdf); guard_check_icall(); } if (local_281 != '\0') { @@ -7447,7 +7447,7 @@ LAB_006c87b4: } FUN_006da770(&local_320,2); local_14 = 10; - local_2a4 = (Entity_Effect *)((uint)local_28c | 0x40); + local_2a4 = (Entity_Effect *)(GHIDRA_UINT(local_28c) | 0x40); local_28c = local_2a4; cVar3 = FUN_006da6f0(); if ((cVar3 == '\0') || @@ -7457,15 +7457,15 @@ LAB_006c8ae8: } else { Entity_Player::get_salvation_scale(); - auVar24._4_12_ = auVar23._4_12_; - auVar24._0_4_ = auVar23._0_4_ * 70.0 + this->_size; + (*(undefined1 *)((char *)&(auVar24) + 0x4)) = (*(undefined1 *)((char *)&(auVar23) + 0x4)); + (*(undefined4 *)((char *)&(auVar24) + 0x0)) = (*(undefined4 *)((char *)&(auVar23) + 0x0)) * 70.0 + this->_size; FUN_006daa90(); local_281 = 1; - if (auVar24._0_8_ <= (double)(float)local_290) goto LAB_006c8ae8; + if ((*(undefined8 *)((char *)&(auVar24) + 0x0)) <= (double)(float)local_290) goto LAB_006c8ae8; } local_14 = 0xffffffff; - if (((uint)local_28c & 0x40) != 0) { - local_28c = (Entity_Effect *)((uint)local_28c & 0xffffffbf); + if ((GHIDRA_UINT(local_28c) & 0x40) != 0) { + local_28c = (Entity_Effect *)(GHIDRA_UINT(local_28c) & 0xffffffbf); guard_check_icall(); } if (local_281 != 0) { @@ -7531,16 +7531,16 @@ LAB_006c8ae8: playerManager = (PlayerManager *)((Game *)(g_game))->Game::GetPlayerManager(); player = ((PlayerManager *)(playerManager))->PlayerManager::FirstTrinketOwner(0x87); if (player != (Entity_Player *)0x0) { - auVar25._0_12_ = ZEXT812(0x3e4ccccd); - auVar25._12_4_ = 0; - local_29c = auVar25._0_4_; + (*(undefined1 *)((char *)&(auVar25) + 0x0)) = ZEXT812(0x3e4ccccd); + (*(undefined4 *)((char *)&(auVar25) + 0xc)) = 0; + local_29c = (*(undefined4 *)((char *)&(auVar25) + 0x0)); iVar16 = ((Entity_Player *)(player))->Entity_Player::GetTrinketMultiplier(0x87); if (iVar16 == 2) { auVar22 = ZEXT812(0x3ea8f5c3); LAB_006c8df9: - auVar25._12_4_ = 0; - auVar25._0_12_ = auVar22; - local_29c = auVar22._0_4_; + (*(undefined4 *)((char *)&(auVar25) + 0xc)) = 0; + (*(undefined1 *)((char *)&(auVar25) + 0x0)) = auVar22; + local_29c = (*(undefined4 *)((char *)&(auVar22) + 0x0)); } else if (iVar16 == 3) { auVar22 = ZEXT812(0x3f000000); @@ -7552,7 +7552,7 @@ LAB_006c8df9: local_298.y = fVar20; FUN_00665c00(); local_14 = 0xffffffff; - local_2a5 = local_298.y < auVar25._0_4_ * 0.02 + (float)local_29c; + local_2a5 = local_298.y < (*(undefined4 *)((char *)&(auVar25) + 0x0)) * 0.02 + (float)local_29c; guard_check_icall(); if (local_2a5 != 0) { ::((EntityRef *)((EntityRef *)local_4c))->EntityRef::constructor((Entity *)player); @@ -7562,16 +7562,16 @@ LAB_006c8df9: playerManager = (PlayerManager *)((Game *)(g_game))->Game::GetPlayerManager(); player = ((PlayerManager *)(playerManager))->PlayerManager::FirstTrinketOwner(0xbc); if (player != (Entity_Player *)0x0) { - auVar26._0_12_ = ZEXT812(0x3e4ccccd); - auVar26._12_4_ = 0; - local_29c = auVar26._0_4_; + (*(undefined1 *)((char *)&(auVar26) + 0x0)) = ZEXT812(0x3e4ccccd); + (*(undefined4 *)((char *)&(auVar26) + 0xc)) = 0; + local_29c = (*(undefined4 *)((char *)&(auVar26) + 0x0)); iVar16 = ((Entity_Player *)(player))->Entity_Player::GetTrinketMultiplier(0xbc); if (iVar16 == 2) { auVar22 = ZEXT812(0x3ea8f5c3); LAB_006c8edb: - auVar26._12_4_ = 0; - auVar26._0_12_ = auVar22; - local_29c = auVar22._0_4_; + (*(undefined4 *)((char *)&(auVar26) + 0xc)) = 0; + (*(undefined1 *)((char *)&(auVar26) + 0x0)) = auVar22; + local_29c = (*(undefined4 *)((char *)&(auVar22) + 0x0)); } else if (iVar16 == 3) { auVar22 = ZEXT812(0x3f000000); @@ -7583,7 +7583,7 @@ LAB_006c8edb: local_298.y = fVar20; FUN_00665c00(); local_14 = 0xffffffff; - local_2a5 = local_298.y < auVar26._0_4_ * 0.02 + (float)local_29c; + local_2a5 = local_298.y < (*(undefined4 *)((char *)&(auVar26) + 0x0)) * 0.02 + (float)local_29c; guard_check_icall(); fVar20 = local_2b8.y; if (local_2a5 != 0) { @@ -7607,7 +7607,7 @@ LAB_006c8edb: playerManager = (PlayerManager *)((Game *)(g_game))->Game::GetPlayerManager(); fVar20 = PlayerManager::get_total_luck(playerManager); local_2b8.y = 5.32493e-44; - local_298.y = (float)(0x37 - (int)fVar20); + local_298.y = (float)(0x37 - GHIDRA_INT(fVar20)); piVar14 = (int *)std::max(); iVar16 = *piVar14; cVar3 = this->IsBoss(); @@ -7663,7 +7663,7 @@ LAB_006c8edb: player = ((Game *)(g_game))->Game::GetPlayer(uVar4); tempEffects = (TemporaryEffects *)((Entity_Player *)(player))->Entity_Player::GetEffects(); bVar2 = ((TemporaryEffects *)(tempEffects))->TemporaryEffects::HasCollectibleEffect(0x5d); - local_29c = (Room *)((uint)local_29c & 0xff); + local_29c = (Room *)(GHIDRA_UINT(local_29c) & 0xff); if (bVar2 != 0) { local_29c = (Room *)0x1; } @@ -7728,7 +7728,7 @@ LAB_006c930b: pEVar7 = (Entity *)__RTDynamicCast(pEVar7,uVar28,pTVar29,pTVar30,uVar33); FUN_004563c0(pvVar8); tmpVec = ((Vector *)(&local_54))->Vector::Vector(0.3,0.3); - tmpVec = ((Vector *)((Vector *)((int)pvVar8 + 0x10)))->Vector::Mul(&local_2f8,tmpVec); + tmpVec = ((Vector *)((Vector *)(GHIDRA_INT(pvVar8) + 0x10)))->Vector::Mul(&local_2f8,tmpVec); ((Entity *)(pEVar7))->Entity::SetSpriteScale(tmpVec); set_field_358(pEVar7,10.0); pcVar1 = *(code **)(*(int *)pEVar7 + 0x3c); @@ -7782,8 +7782,8 @@ LAB_006c930b: do { entitySlot = (undefined4 *)EntityPtr::Ref(); pEVar7 = (Entity *)entitySlot[2]; - if (((uint)pEVar7 & 0x282) == 0) { - if (((uint)pEVar7 & 0x286) != 0) { + if ((GHIDRA_UINT(pEVar7) & 0x282) == 0) { + if ((GHIDRA_UINT(pEVar7) & 0x286) != 0) { local_2a0 = (ANM2 *)entitySlot[3]; local_29c = (Room *)0x40a00000; local_290 = pEVar7; @@ -7865,7 +7865,7 @@ LAB_006c930b: ((Sprite *)(sprite))->Sprite::SetColor(tmpColor); } iVar16 = ((Game *)(g_game))->Game::GetFrameCount(); - if ((uint)(iVar16 + this->_index) % 0x1e < 2) { + if (GHIDRA_UINT((iVar16 + this->_index)) % 0x1e < 2) { Isaac::GetRenderPosition(&local_2d0,&this->_pos,1); pRVar10 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); tmpVec = (Vector *)((Room *)(pRVar10))->Room::GetRenderSurfaceTopLeft(); @@ -7874,7 +7874,7 @@ LAB_006c930b: FUN_004177e0(&local_2e0); local_14 = 0xe; piVar14 = (int *)EntityPtr::Ref(); - (**(code **)(*piVar14 + 0x2c))(&local_38,(int)local_2d0.x,(int)local_2d0.y); + (**(code **)(*piVar14 + 0x2c))(&local_38,GHIDRA_INT(local_2d0.x),GHIDRA_INT(local_2d0.y)); local_14 = 0xffffffff; FUN_0041c710(); local_298.y = ((Color *)((Color *)&this->_floorColor))->Color::A(); @@ -8108,7 +8108,7 @@ LAB_006ca2e9: tmpVec = ((Vector *)(tmpVec))->Vector::__sub(&local_2f8,&this->_pos); ((Vector *)(&this->_targetPosition))->Vector::operator_assign(tmpVec); tmpVec = ((Vector *)(&this->_targetPosition))->Vector::__unm((Vector *)(local_318 + 8)); - ((Vector *)((Vector *)((int)this_00 + 0x334)))->Vector::operator_assign(tmpVec); + ((Vector *)((Vector *)(GHIDRA_INT(this_00) + 0x334)))->Vector::operator_assign(tmpVec); } } if (this->_type == 0x19b) { @@ -8121,7 +8121,7 @@ LAB_006ca2e9: iVar16 = Isaac::Random(10); pEVar9 = (Entity_Effect *)(iVar16 + 0xc); local_298.y = (float)pEVar9; - if (0 < (int)pEVar9) { + if (0 < GHIDRA_INT(pEVar9)) { do { tmpVec = MusicManager::RandomVector(&local_54); ((Vector *)(&local_2e8))->Vector::Mul(&local_2d0,tmpVec); @@ -8278,7 +8278,7 @@ void Entity_NPC::update_frozen() float fStack_18; uint local_14; - local_14 = __security_cookie ^ (uint)auStack_78; + local_14 = __security_cookie ^ GHIDRA_UINT(auStack_78); this->_friction = this->_friction * 0.5; damageEvent = (this->_damageEvents)._begin; if (damageEvent != (this->_damageEvents)._end) { @@ -8303,13 +8303,13 @@ LAB_006ca9aa: local_1c = 0; this->Kill(&sourceRef); } - damageEvent = (void *)((int)damageEvent + 0x38); + damageEvent = (void *)(GHIDRA_INT(damageEvent) + 0x38); } while (damageEvent != (this->_damageEvents)._end); } (this->_damageEvents)._end = (this->_damageEvents)._begin; this->_pendingDamage = 0.0; *(undefined4 *)&this->_pendingDamageFlags = 0; - *(undefined4 *)((int)&this->_pendingDamageFlags + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&this->_pendingDamageFlags) + 4) = 0; ((Entity *)((Entity *)this))->Entity::Update(); if ((this->_flags & 0x800000000000) != 0) { rngResult = Random(); @@ -8320,7 +8320,7 @@ LAB_006ca9aa: rngResult = Random(); iVar1 = *(int *)effect; particleScale = - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 0.5 + 0.2; fVar2 = particleScale * g_vectorOne.x; (effect->_sprite)._scale.y = particleScale * g_vectorOne.y; @@ -8333,7 +8333,7 @@ LAB_006ca9aa: effect = ((Game *)(g_game))->Game::SpawnEx(1000,0x3b,&this->_pos,&VStack_6c,(Entity *)0x0,0,rngResult,0); rngResult = Random(); *(float *)(effect[1]._sprite._animDefaultName._buf + 4) = - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 10.0 + 2.0; rngResult = Random(); local_20 = 0x3f4ccccd; @@ -8382,7 +8382,7 @@ LAB_006ca9aa: fStack_5c = (float)g_game->_stage + 7.0; rngResult = Random(); shardIdx = 0; - VStack_6c.x = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)] + VStack_6c.x = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)] ) * 2.3283064e-10 * 360.0; do { angleRad = ((float)shardIdx * 36.0 + VStack_6c.x) * 0.017453292; @@ -8394,14 +8394,14 @@ LAB_006ca9aa: iceTear = (Entity_Tear *) ((Game *)(g_game))->Game::SpawnEx(2,0x29,&this->_pos,&VStack_58,(Entity *)0x0,0,rngResult,0); iceTear->SetCollisionDamage(fStack_5c); - uStack_50 = g_tearFlagIce._l._4_4_ | g_tearFlagSlow._l._4_4_; - VStack_58.y = (float)((uint)g_tearFlagIce._l | (uint)g_tearFlagSlow._l); - uStack_48 = g_tearFlagIce._h._4_4_ | g_tearFlagSlow._h._4_4_; - uStack_4c = (uint)g_tearFlagIce._h | (uint)g_tearFlagSlow._h; - flags._l._4_4_ = uStack_50; - flags._l._0_4_ = VStack_58.y; - flags._h._0_4_ = uStack_4c; - flags._h._4_4_ = uStack_48; + uStack_50 = (*(undefined4 *)((char *)&(g_tearFlagIce._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagSlow._l) + 0x4)); + VStack_58.y = (float)(GHIDRA_UINT(g_tearFlagIce._l) | GHIDRA_UINT(g_tearFlagSlow._l)); + uStack_48 = (*(undefined4 *)((char *)&(g_tearFlagIce._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagSlow._h) + 0x4)); + uStack_4c = GHIDRA_UINT(g_tearFlagIce._h) | GHIDRA_UINT(g_tearFlagSlow._h); + (*(undefined4 *)((char *)&(flags._l) + 0x4)) = uStack_50; + (*(undefined4 *)((char *)&(flags._l) + 0x0)) = VStack_58.y; + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = uStack_4c; + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = uStack_48; ((Entity_Tear *)(iceTear))->Entity_Tear::SetTearFlags(flags); iceTear->_fallingAccel = 0.2; iceTear->_spawnerType = 1; @@ -8477,7 +8477,7 @@ void Entity_NPC::MakeChampion(uint seed, int championColor, byte isInit) float oldMaxHp; EntityPtr *parentRef; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); if ((this->_isChampion != 0) && (isInit == 0)) { return; } @@ -8502,11 +8502,11 @@ void Entity_NPC::MakeChampion(uint seed, int championColor, byte isInit) (*pcVar1)(); return; } - uVar3 = seed >> (afStack_18[0]._0_1_ & 0x1f) ^ seed; - uVar3 = uVar3 << (afStack_18[1]._0_1_ & 0x1f) ^ uVar3; - local_20._4_4_ = uVar3 >> ((byte)local_3c & 0x1f) ^ uVar3; - fVar4 = (float)((double)(int)local_20._4_4_ + - __uint_to_double_fixup[-((int)local_20._4_4_ >> 0x1f)]) * 2.3283062e-10; + uVar3 = seed >> ((*(undefined1 *)((char *)&(afStack_18[0]) + 0x0)) & 0x1f) ^ seed; + uVar3 = uVar3 << ((*(undefined1 *)((char *)&(afStack_18[1]) + 0x0)) & 0x1f) ^ uVar3; + (*(undefined4 *)((char *)&(local_20) + 0x4)) = uVar3 >> ((byte)local_3c & 0x1f) ^ uVar3; + fVar4 = (float)((*(undefined4 *)((char *)&((double)GHIDRA_INT(local_20)) + 0x4)) + + __uint_to_double_fixup[-((*(undefined4 *)((char *)&(GHIDRA_INT(local_20)) + 0x4)) >> 0x1f)]) * 2.3283062e-10; if ((0.01 <= fVar4) || (g_game->_stage < 5)) { if ((0.05 <= fVar4) || (g_game->_stage < 5)) { if (0.15 <= fVar4) { @@ -8527,19 +8527,19 @@ void Entity_NPC::MakeChampion(uint seed, int championColor, byte isInit) } } else { - uVar3 = ((RNG *)((RNG *)(local_20 + 4)))->RNG::RandomInt((uint)(2 < g_game->_stage) * 2 + 4); + uVar3 = ((RNG *)((RNG *)(local_20 + 4)))->RNG::RandomInt(GHIDRA_UINT((2 < g_game->_stage)) * 2 + 4); championColor = *(int *)(&DAT_00b67390 + uVar3 * 4); } } else { - if ((float)local_20._4_4_ == 0.0) { + if ((*(undefined4 *)((char *)&((float)local_20) + 0x4)) == 0.0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar1 = (code *)swi(3); (*pcVar1)(); return; } - uVar3 = (uint)local_20._4_4_ >> (afStack_18[0]._0_1_ & 0x1f) ^ local_20._4_4_; - uVar3 = uVar3 << (afStack_18[1]._0_1_ & 0x1f) ^ uVar3; + uVar3 = (*(undefined4 *)((char *)&(GHIDRA_UINT(local_20)) + 0x4)) >> ((*(undefined1 *)((char *)&(afStack_18[0]) + 0x0)) & 0x1f) ^ (*(undefined4 *)((char *)&(local_20) + 0x4)); + uVar3 = uVar3 << ((*(undefined1 *)((char *)&(afStack_18[1]) + 0x0)) & 0x1f) ^ uVar3; championColor = *(int *)(&DAT_00b673a8 + ((uVar3 >> ((byte)local_3c & 0x1f) ^ uVar3) % 3) * 4); } @@ -8711,7 +8711,7 @@ LAB_006d0647: iVar2 = g_game->_frameCount - *(int *)((char *)g_game->_room + 0x11f0); } hsv_to_rgb((KColor *)local_20,((float)(iVar2 % 0x5a) * 360.0) / 90.0,1.0,1.0,1.0); - ((Color *)((Color *)local_38))->Color::Color((float)local_20._0_4_,(float)local_20._4_4_,afStack_18[0],1.0); + ((Color *)((Color *)local_38))->Color::Color((*(undefined4 *)((char *)&((float)local_20) + 0x0)),(*(undefined4 *)((char *)&((float)local_20) + 0x4)),afStack_18[0],1.0); ((Entity *)((Entity *)&this->_sprite))->Entity::SetColor(colorArg); } LAB_006d0b75: @@ -8751,7 +8751,7 @@ void Entity_NPC::SetRef_bec(Entity *entity) // 006d0c60 void * Entity_NPC::QueryNPCsType(void *outList, int type, int variant) { - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),outList,type,variant,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),outList,type,variant,-1,0,0); return outList; } @@ -8789,8 +8789,8 @@ EntityList * Entity_NPC::QueryNPCsGroup(EntityList *outList, int groupIdx) entityIndex = entityIndex + 1; } while (entityIndex < *(uint *)((char *)sourceRoom + 0x1264)); } - ((EntityList *)((EntityList *)((int)g_game->_room + 0x1218)))->EntityList::assign((EntityList_EL *)outList, - (EntityList_EL *)((int)room + 0x1288)); + ((EntityList *)((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218)))->EntityList::assign((EntityList_EL *)outList, + (EntityList_EL *)(GHIDRA_INT(room) + 0x1288)); return outList; } @@ -8821,11 +8821,11 @@ void * Entity_NPC::fireplace_get_loot(void *outLoot, byte isShouldAdvance) undefined4 pickupSubtype; undefined4 pickupVariant; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00afab6d; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; local_48 = outLoot; lootList = (int *)0x0; @@ -8835,7 +8835,7 @@ void * Entity_NPC::fireplace_get_loot(void *outLoot, byte isShouldAdvance) lootCount = 0; lootList = operator_new(8); lootList[1] = 0; - *lootList = (int)&lootList; + *lootList = GHIDRA_INT(&lootList); local_14 = 0; if ((((((this->_flags & 0x40000000000) != 0) || (iVar3 = this->_variant, iVar3 == 0xb)) || (iVar3 == 10)) || ((iVar3 == 0xc || (iVar3 == 0xd)))) || (iVar3 == 4)) { @@ -8865,7 +8865,7 @@ void * Entity_NPC::fireplace_get_loot(void *outLoot, byte isShouldAdvance) if (0xfff < uVar2) { lootBlocks = *(void **)((char *)lootBlocks + -4); uVar2 = uVar2 + 0x23; - if (0x1f < (uint)((int)lootBlocks + (-4 - (int)lootBlocks))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(lootBlocks) + (-4 - GHIDRA_INT(lootBlocks))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -8976,7 +8976,7 @@ void Entity_NPC::Interpolate() return; } if (this->_type == 0x3c5) { - flags = (uint)this->_flags; + flags = GHIDRA_UINT(this->_flags); if ((flags & 2) == 0) { (this->_preInterpolatePos).x = (this->_pos).x; (this->_preInterpolatePos).y = (this->_pos).y; @@ -8987,23 +8987,23 @@ void Entity_NPC::Interpolate() this->_isInterpolating = 1; ((Entity *)((Entity *)this))->Entity::CollideWithGrid(1); EVar2 = this->_child; - if ((EVar2 != (EntityPtr)0x0) && (*(uint *)((char *)EVar2 + 0x20) < (uint)this->_index)) { + if ((EVar2 != (EntityPtr)0x0) && (*(uint *)((char *)EVar2 + 0x20) < GHIDRA_UINT(this->_index))) { *(float *)((char *)EVar2 + 0x33c) = (this->_pos).x; *(float *)((char *)EVar2 + 0x340) = (this->_pos).y; } if (this->_variant == 10) { playerManager = &g_game->_playerManager; i = 0; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { playerListEnd = (playerManager->_playerList)._end; - if ((int)playerListEnd - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (playerManager->_playerList)._end; } playerSlot = (playerManager->_playerList)._begin; - if (i < (uint)((int)playerListEnd - (int)playerSlot >> 2)) { + if (i < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + i; } iVar1 = *playerSlot; @@ -9017,13 +9017,13 @@ void Entity_NPC::Interpolate() } i = i + 1; playerManager = &g_game->_playerManager; - } while (i < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (i < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } } else { - *(undefined4 *)((int)&this->_flags + 4) = *(undefined4 *)((int)&this->_flags + 4); + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); *(uint *)&this->_flags = flags & 0xfffffffd; } } @@ -9064,11 +9064,11 @@ LAB_006d2dd8: if ((((this->_type == 0x5c) && (this->_variant == 1)) && (EVar2 = this->_entityRef, EVar2 != (EntityPtr)0x0)) && (isEnemy = ((Entity *)((Entity *)EVar2))->Entity::IsEnemy(), isEnemy != 0)) { - fVar3 = ((Vector *)((int)EVar2 + 0x33c))->x - (this->_pos).x; + fVar3 = ((Vector *)(GHIDRA_INT(EVar2) + 0x33c))->x - (this->_pos).x; dy = *(float *)((char *)EVar2 + 0x340) - (this->_pos).y; (this->_targetPosition).x = fVar3; (this->_targetPosition).y = dy; - ((Vector *)((int)EVar2 + 0x334))->x = -fVar3; + ((Vector *)(GHIDRA_INT(EVar2) + 0x334))->x = -fVar3; *(float *)((char *)EVar2 + 0x338) = -dy; } return; @@ -9158,7 +9158,7 @@ void Entity_NPC::Render(Vector *offset) ehState = 0xffffffff; puStack_c = &LAB_00afac0b; savedExceptionList = ExceptionList; - uVar4 = __security_cookie ^ (uint)(debugText + 0x18); + uVar4 = __security_cookie ^ GHIDRA_UINT((debugText + 0x18)); EVar9 = (EntityPtr)this->_type; renderOffset = offset; baseOffset.x = offset->x; @@ -9196,8 +9196,8 @@ LAB_006d301b: else { EVar9 = (EntityPtr)0x0; } - EVar5._1_3_ = 0; - EVar5._0_1_ = renderMode != 5; + (*(undefined1 *)((char *)&(EVar5) + 0x1)) = 0; + (*(undefined1 *)((char *)&(EVar5) + 0x0)) = renderMode != 5; minecart = EVar11; if (EVar5 != EVar9) { fVar13 = 0.0; @@ -9237,13 +9237,13 @@ LAB_006d3040: goto LAB_006d3040; } if ((((this->_type == 0x32a) && (fVar12 = (this->_posOffset).y, -3.0 < fVar12)) && - (EVar9 = (EntityPtr)(*(uint *)((int)&this->_flags + 4) & 0x2000000), EVar9 == (EntityPtr)0x0)) + (EVar9 = (EntityPtr)(*(uint *)(GHIDRA_INT(&this->_flags) + 4) & 0x2000000), EVar9 == (EntityPtr)0x0)) && (renderMode == 3)) { alphaMult = 0.0; } if ((EVar11 != (EntityPtr)0x0) && (this->_visible != 0)) { if (*(void **)((char *)EVar11 + 0x7c) != (void *)0x0) { - pfVar6 = ((AnimationState *)((AnimationState *)((int)EVar11 + 0x78)))->AnimationState::GetNullFrameById(0); + pfVar6 = ((AnimationState *)((AnimationState *)(GHIDRA_INT(EVar11) + 0x78)))->AnimationState::GetNullFrameById(0); if (pfVar6 == (float *)0x0) { EVar9 = extraout_ECX_00; EVar11 = minecart; @@ -9264,7 +9264,7 @@ LAB_006d3040: baseOffset.x = baseOffset.x + *pfVar6; fVar12 = baseOffset.y + pfVar6[1]; baseOffset.y = fVar12; - ((Sprite *)((Sprite *)((int)minecart + 0x48)))->Sprite::RenderLayer(0,&renderPos,&g_vectorZero, + ((Sprite *)((Sprite *)(GHIDRA_INT(minecart) + 0x48)))->Sprite::RenderLayer(0,&renderPos,&g_vectorZero, &g_vectorZero); EVar9 = extraout_ECX_01; } @@ -9345,7 +9345,7 @@ LAB_006d3040: trailColor._offset[1] = 0.0; trailColor._offset[2] = 0.0; local_84.x = baseOffset.x + local_88; - fVar12 = ((float)(int)local_a8 * 0.9) / 7.0 + 0.1; + fVar12 = ((float)GHIDRA_INT(local_a8) * 0.9) / 7.0 + 0.1; local_84.y = baseOffset.y + (float)local_90 / screenScale; trailColor._tint[2] = fVar12 * local_48._tint[2]; trailColor._tint[3] = fVar12 * local_48._tint[3] * 0.5; @@ -9377,12 +9377,12 @@ LAB_006d3040: } AnimationState::Render(laterAnimState,&local_84,&g_vectorZero,&g_vectorZero); } - local_a8 = (float)((int)local_a8 + -1); + local_a8 = (float)(GHIDRA_INT(local_a8) + -1); fVar13 = local_a0 + trailX; fVar12 = local_70 + local_98; trailX = fVar13; local_98 = fVar12; - } while (-1 < (int)local_a8); + } while (-1 < GHIDRA_INT(local_a8)); local_ec._tint[3] = local_48._tint[3] * 0.2; local_ec._colorize[0] = 0.0; local_ec._colorize[1] = 0.0; @@ -9504,8 +9504,8 @@ LAB_006d3907: *(undefined2 *)((char *)local_84.x + 0xc) = 0x101; ehState = 0; uVar4 = 0; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { player = ((Game *)(g_game))->Game::GetPlayer(uVar4); if (player->_minecart == (EntityPtr)this) { @@ -9514,8 +9514,8 @@ LAB_006d3907: FUN_006dac00(&local_70,&fStack_94); } uVar4 = uVar4 + 1; - } while (uVar4 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (uVar4 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); } node = *(int **)local_84.x; if (node != (int *)local_84.x) { @@ -9524,15 +9524,15 @@ LAB_006d3907: fVar12 = (local_18->_pos).x; local_70 = (float)piVar1[0xcf]; local_a0 = (float)piVar1[0xd0]; - piVar1[0xd0] = (int)((float)piVar1[0x823] + (local_18->_pos).y); - piVar1[0xcf] = (int)((float)piVar1[0x822] + fVar12); + piVar1[0xd0] = GHIDRA_INT(((float)piVar1[0x823] + (local_18->_pos).y)); + piVar1[0xcf] = GHIDRA_INT(((float)piVar1[0x822] + fVar12)); *(undefined1 *)((char *)piVar1 + 0x171) = 1; fStack_94 = baseOffset.x + (float)piVar1[0x822] * 0.65; local_90 = (Entity_Player *)(baseOffset.y + (float)piVar1[0x823] * 0.65); (**(code **)(*piVar1 + 0x14))(); - piVar1[0xcf] = (int)local_70; + piVar1[0xcf] = GHIDRA_INT(local_70); *(undefined1 *)((char *)piVar1 + 0x171) = 0; - piVar1[0xd0] = (int)local_a0; + piVar1[0xd0] = GHIDRA_INT(local_a0); piVar1 = (int *)node[2]; if (*(char *)((char *)piVar1 + 0xd) == '\0') { isNil = *(char *)(*piVar1 + 0xd); @@ -9560,7 +9560,7 @@ LAB_006d3907: ehState = 0xffffffff; FID_conflict__Erase_tree_>_> (&local_84,(fuzzer_allocator_> *)&local_84, - *(_Tree_node **)((int)local_84.x + 4)); + *(_Tree_node **)(GHIDRA_INT(local_84.x) + 4)); operator_delete((void *)local_84.x,0x18); curses = extraout_ECX_16; } @@ -9626,7 +9626,7 @@ LAB_006d3d39: fVar12 = pfVar6[5]; *(float *)((char *)EVar9 + 0xe4) = (float)local_90 * pfVar6[4]; *(float *)((char *)EVar9 + 0xe8) = local_88 * fVar12; - ((ANM2 *)((ANM2 *)((int)this->_entityRef + 0x48)))->ANM2::Render(&this->_renderPosition,&g_vectorZero, + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this->_entityRef) + 0x48)))->ANM2::Render(&this->_renderPosition,&g_vectorZero, &g_vectorZero); EVar9 = this->_entityRef; *(float *)((char *)EVar9 + 0xdc) = local_70; @@ -9667,7 +9667,7 @@ LAB_006d3d39: if ((((this->_statusEffectSprite)._loaded != 0) && ((this->_statusEffectSprite)._animState._animData != (void *)0x0)) && ((this->_statusEffectSprite)._animState._isPlaying != 0)) { - local_68 = (float)((uint)(this->_statusEffectSprite)._bitflags >> 0x1f); + local_68 = (float)(GHIDRA_UINT((this->_statusEffectSprite)._bitflags) >> 0x1f); iVar7 = ((AnimationData *)((AnimationData *)&this->_sprite))->AnimationData::find_null_index((byte *)"OverlayEffect"); if (iVar7 < 0) { if (this->_config == (EntityConfig_Entity *)0x0) { @@ -9679,13 +9679,13 @@ LAB_006d3d39: KAGE_LogMessage(1,(byte *) "[warn] No OverlayEffect Null found for Entity %s with sprite %s\n"); ehState = 0xffffffff; - if (0xf < (uint)local_5c._unk) { + if (0xf < GHIDRA_UINT(local_5c._unk)) { uVar4 = local_5c._unk + 1; pvVar8 = configName; if (0xfff < uVar4) { pvVar8 = *(void **)((char *)configName + -4); uVar4 = local_5c._unk + 0x24; - if (0x1f < (uint)((int)configName + (-4 - (int)pvVar8))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(configName) + (-4 - GHIDRA_INT(pvVar8))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -9694,13 +9694,13 @@ LAB_006d3d39: } local_5c._alpha = 0.0; local_5c._unk = 0xf; - configName = (void *)((uint)configName & 0xffffff00); + configName = (void *)(GHIDRA_UINT(configName) & 0xffffff00); } } else { local_9c = ((ANM2 *)(&this->_sprite))->ANM2::GetLayerFrame(iVar7); if (((local_9c != (float *)0x0) && (*(char *)(local_9c + 3) != '\0')) && - ((local_68._0_1_ == '\0' || + (((*(undefined1 *)((char *)&(local_68) + 0x0)) == '\0' || ((this->_parent == (EntityPtr)0x0 || (bVar3 = ((Entity *)((Entity *)this))->Entity::is_same_segmented_body((Entity *)0x0), bVar3 == 0)))))) { (this->_statusEffectSprite)._scale.x = local_9c[4]; @@ -9750,9 +9750,9 @@ LAB_006d445e: render_debug(&local_84,this); LAB_006d44a0: if (((minecart != (EntityPtr)0x0) && (this->_visible != 0)) && - (((Sprite *)((Sprite *)((int)minecart + 0x48)))->Sprite::RenderLayer(1,&renderPos,&g_vectorZero,&g_vectorZero) + (((Sprite *)((Sprite *)(GHIDRA_INT(minecart) + 0x48)))->Sprite::RenderLayer(1,&renderPos,&g_vectorZero,&g_vectorZero) , this->_type == 0x38a)) { - NpcHelper::hornfel_render_minecart(this,(ANM2 *)((int)this->_minecart + 0x48),&renderPos); + NpcHelper::hornfel_render_minecart(this,(ANM2 *)(GHIDRA_INT(this->_minecart) + 0x48),&renderPos); } if ((((this->_controllerID != 0xffffffff) && ((g_manager->_netplayManager == *(NetplayManager *)(g_manager + 1) || @@ -9764,7 +9764,7 @@ LAB_006d44a0: renderPos.x = fVar12 * 12.0 + (this->_renderPosition).x; ((ANM2 *)(&this->_chargeBarSprite))->ANM2::Render(&renderPos,&g_vectorZero,&g_vectorZero); } - if (((this->_flags & 0x1000002000000000) != 0) && (((uint)g_game->_debugFlags >> 6 & 1) != 0)) { + if (((this->_flags & 0x1000002000000000) != 0) && ((GHIDRA_UINT(g_game->_debugFlags) >> 6 & 1) != 0)) { sprintf(debugText,(byte *)"%.02f"); manager = g_manager; local_ec._colorize[0] = 5.60519e-45; @@ -9836,7 +9836,7 @@ byte Entity_NPC::CanBeDamagedFromVelocity(Vector velocity) local_8 = 0xffffffff; puStack_c = &LAB_00af32ed; local_10 = ExceptionList; - local_14 = __security_cookie ^ (int)&animName + 0x28U; + local_14 = __security_cookie ^ GHIDRA_INT(&animName) + 0x28U; iVar2 = this->_type; if (iVar2 != 0x29) { if (iVar2 == 0x61) { @@ -9887,14 +9887,14 @@ byte Entity_NPC::CanBeDamagedFromVelocity(Vector velocity) } } Isaac::GetAxisAlignedUnitVectorFromDir(&facingDir,iVar2); - animNameBuf = animName._buf._0_4_; + animNameBuf = (*(undefined4 *)((char *)&(animName._buf) + 0x0)); uVar3 = 6; if (animName._size < 6) { uVar3 = animName._size; } psVar5 = &animName; if (0xf < animName._capacity) { - psVar5 = (std_string *)animName._buf._0_4_; + psVar5 = (*(undefined4 *)((char *)&((std_string *)animName._buf) + 0x0)); } cmpResult = string_compare((byte *)psVar5,uVar3,(byte *)"Attack",6); if (cmpResult == 0) { @@ -9917,7 +9917,7 @@ byte Entity_NPC::CanBeDamagedFromVelocity(Vector velocity) if (0xfff < uVar3) { psVar5 = (std_string *)((std_string *)(animNameBuf + -0x18))->_capacity; uVar3 = animName._capacity + 0x24; - if ((byte *)0x1f < (byte *)(animNameBuf + (-4 - (int)psVar5))) goto LAB_006d4d56; + if ((byte *)0x1f < (byte *)(animNameBuf + (-4 - GHIDRA_INT(psVar5)))) goto LAB_006d4d56; } operator_delete(psVar5,uVar3); } @@ -9928,7 +9928,7 @@ byte Entity_NPC::CanBeDamagedFromVelocity(Vector velocity) animData = (this->_sprite)._animState._animData; if (animData == (void *)0x0) { animName._capacity = 0xf; - animName._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(animName._buf) + 0x0)) = (std_string *)0x0; animName._size = 0; ExceptionList = &local_10; } @@ -9938,7 +9938,7 @@ byte Entity_NPC::CanBeDamagedFromVelocity(Vector velocity) } psVar5 = &animName; if (0xf < animName._capacity) { - psVar5 = (std_string *)animName._buf._0_4_; + psVar5 = (*(undefined4 *)((char *)&((std_string *)animName._buf) + 0x0)); } cmpName = (byte *)&DAT_00b1cde4; uVar3 = animName._size; @@ -9966,7 +9966,7 @@ LAB_006d4c56: ((uVar1 == 0xffffffff || (bVar4 = (byte)psVar5->_buf[3] < cmpName[3], psVar5->_buf[3] == cmpName[3])))))))))))) goto LAB_006d4c8a; - uVar3 = -(uint)bVar4 | 1; + uVar3 = -GHIDRA_UINT(bVar4) | 1; } if (((uVar3 == 0) && (1 < animName._size)) && (animName._size < 3)) { iVar2 = 1; @@ -9974,7 +9974,7 @@ LAB_006d4c56: else { psVar5 = &animName; if (0xf < animName._capacity) { - psVar5 = (std_string *)animName._buf._0_4_; + psVar5 = (*(undefined4 *)((char *)&((std_string *)animName._buf) + 0x0)); } cmpName = &DAT_00b60d94; uVar3 = animName._size; @@ -10002,7 +10002,7 @@ LAB_006d4cd6: ((uVar1 == 0xffffffff || (bVar4 = (byte)psVar5->_buf[3] < cmpName[3], psVar5->_buf[3] == cmpName[3])))))))))))) goto LAB_006d4d0a; - uVar3 = -(uint)bVar4 | 1; + uVar3 = -GHIDRA_UINT(bVar4) | 1; } if (((uVar3 == 0) && (3 < animName._size)) && (animName._size < 5)) { iVar2 = 0; @@ -10016,12 +10016,12 @@ LAB_006d4cd6: } if (0xf < animName._capacity) { uVar3 = animName._capacity + 1; - psVar5 = (std_string *)animName._buf._0_4_; - facingDir.y = (float)animName._buf._0_4_; + psVar5 = (*(undefined4 *)((char *)&((std_string *)animName._buf) + 0x0)); + facingDir.y = (*(undefined4 *)((char *)&((float)animName._buf) + 0x0)); if (0xfff < uVar3) { - psVar5 = (std_string *)((std_string *)(animName._buf._0_4_ + -0x18))->_capacity; + psVar5 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(animName._buf) + 0x0)) + -0x18))->_capacity; uVar3 = animName._capacity + 0x24; - if ((byte *)0x1f < (byte *)(animName._buf._0_4_ + (-4 - (int)psVar5))) { + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(animName._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar5)))) { LAB_006d4d56: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -10094,7 +10094,7 @@ void Entity_NPC::PlayDeathEffects() if ((*(uint *)((char *)this->_config + 0x60) >> 5 & 1) != 0) { local_10.x = 3.32108e-43; seed_fart_sound_override((int *)&local_10); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_10.x,0.9,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_10.x),0.9,2,0,1.0,0.0); uVar2 = 0x2b; goto LAB_006d51b2; } @@ -10167,8 +10167,8 @@ LAB_006d4f7c: RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Effect:: RTTI_Type_Descriptor,0); - bloodEffect[0x37] = (int)splatOffset.x; - bloodEffect[0x38] = (int)splatOffset.y; + bloodEffect[0x37] = GHIDRA_INT(splatOffset.x); + bloodEffect[0x38] = GHIDRA_INT(splatOffset.y); (**(code **)(*bloodEffect + 0x3c))(&this->_splatColor,0xffffffff,0xff,0,1); bloodEffect[0xd6] = 0x41200000; goto LAB_006d505b; @@ -10275,7 +10275,7 @@ void Entity_NPC::trigger_kill_item_effects() ehState = -NAN; puStack_c = &LAB_00afac5b; prevExceptionList = ExceptionList; - stackCookie = __security_cookie ^ (uint)(&fartColor)[1]._colorize; + stackCookie = __security_cookie ^ GHIDRA_UINT((&fartColor)[1]._colorize); ExceptionList = &prevExceptionList; if (this->_isBoss == 0) { if (this->_isChampion != 0) { @@ -10366,9 +10366,9 @@ void Entity_NPC::trigger_kill_item_effects() } } if (this->_type == 0x197) { - flagsHigh = *(undefined4 *)((int)&this->_flags + 4); - *(uint *)&this->_flags = (uint)this->_flags | 8; - *(undefined4 *)((int)&this->_flags + 4) = flagsHigh; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); + *(uint *)&this->_flags = GHIDRA_UINT(this->_flags) | 8; + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = flagsHigh; } else { this->Remove(); @@ -10394,7 +10394,7 @@ void Entity_NPC::trigger_kill_item_effects() in_stack_fffffce4 = pos; ((Game *)(g_game))->Game::Fart(pos,85.0,(Entity *)itemOwner,1.0,1,&fartColor); EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),&contagionEnemies,pos,85.0,8); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&contagionEnemies,pos,85.0,8); uVar3 = 0; ehState = 0.0; if (contagionEnemies._size != 0) { @@ -10407,23 +10407,23 @@ void Entity_NPC::trigger_kill_item_effects() *(undefined4 *)(iVar6 + 0x168) = *(undefined4 *)(iVar6 + 0x168); } uVar3 = uVar3 + 1; - } while (uVar3 < (uint)contagionEnemies._size); + } while (uVar3 < GHIDRA_UINT(contagionEnemies._size)); } ehState = -NAN; - if (contagionEnemies._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(contagionEnemies) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (contagionEnemies._data != (void *)0x0) { uVar3 = *(uint *)((char *)contagionEnemies._data + -4); prevAllocBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar3; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar3; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)prevAllocBytes < uVar3); - free((void *)((int)contagionEnemies._data + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocBytes) < uVar3)); + free((void *)(GHIDRA_INT(contagionEnemies._data) + -4)); } ehState = -NAN; } @@ -10450,7 +10450,7 @@ void Entity_NPC::trigger_kill_item_effects() local_70 = local_70 + *(float *)(iVar6 + 0x156c); } } - if ((float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * 2.3283062e-10 + if ((float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283062e-10 < local_70 * 0.025 + 0.25) { mawOfVoid = ((Entity_Player *)(local_74))->Entity_Player::SpawnMawOfVoid(0x3c); iVar6 = *(int *)mawOfVoid; @@ -10468,10 +10468,10 @@ void Entity_NPC::trigger_kill_item_effects() ((spawner = this->_spawnerEntity, spawner != (EntityPtr)0x0 && (*(int *)((char *)spawner + 0x28) == 1)))))) { uVar3 = 0; - activeSlot = (ActiveItemDesc *)((int)spawner + 0x1580); + activeSlot = (ActiveItemDesc *)(GHIDRA_INT(spawner) + 0x1580); do { if (activeSlot->_item == 0x17e) { - if (-1 < (int)uVar3) { + if (-1 < GHIDRA_INT(uVar3)) { ((Entity_Player *)((Entity_Player *)spawner))->Entity_Player::FullCharge(uVar3,0,0); } break; @@ -10544,16 +10544,16 @@ void Entity_NPC::trigger_kill_item_effects() std::multiset::erase(); } *aimTargetSlot = (void *)0x0; - local_8c[2] = (int)this->_flags; + local_8c[2] = GHIDRA_INT(this->_flags); if (((this->_flags & 0x100000000000000) != 0) && ((this->_flags & 0x80000000000000) != 0)) { EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),&nearbyEnemies,&this->_pos,120.0,8); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&nearbyEnemies,&this->_pos,120.0,8); ehState = 2.8026e-45; local_70 = 0.0; if ((float)nearbyEnemies._size != 0.0) { do { - enemyIdx = (int)local_70; - nearbyEnemy = *(Entity_NPC **)((char *)nearbyEnemies._data + (int)local_70 * 4); + enemyIdx = GHIDRA_INT(local_70); + nearbyEnemy = *(Entity_NPC **)((char *)nearbyEnemies._data + GHIDRA_INT(local_70) * 4); if ((nearbyEnemy != this) && (bVar2 = ((Entity *)((Entity *)nearbyEnemy))->Entity::IsVulnerableEnemy((Entity *)0x0), bVar2 != 0)) { ::((EntityRef *)(&brimstoneMarkSource))->EntityRef::constructor((Entity *)0x0); @@ -10576,7 +10576,7 @@ void Entity_NPC::trigger_kill_item_effects() color._offset[1] = 0.15686275; color._offset[2] = 0.15686275; ((Entity *)((Entity *)nearbyEnemy))->Entity::AddSlowing(&slowSource,0x5a,slowingAmount,color,bVar2); - enemyIdx = (int)local_70; + enemyIdx = GHIDRA_INT(local_70); } bVar2 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x40); if (bVar2 != 0) { @@ -10651,25 +10651,25 @@ void Entity_NPC::trigger_kill_item_effects() in_stack_fffffce8 = (Vector *)0x41200000; in_stack_fffffce4 = (Vector *)0x6d5f2e; (**(code **)(**(int **)((char *)nearbyEnemies._data + enemyIdx * 4) + 0x20))(); - enemyIdx = (int)local_70; + enemyIdx = GHIDRA_INT(local_70); } local_70 = (float)(enemyIdx + 1); - } while ((uint)local_70 < (uint)nearbyEnemies._size); + } while (GHIDRA_UINT(local_70) < GHIDRA_UINT(nearbyEnemies._size)); } ((Color *)(&poofColor))->Color::Color(); ((Entity *)((Entity *)this))->Entity::MakeBloodPoof(&this->_pos,color_00,1.0); uVar3 = 0; playerManager = &g_game->_playerManager; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar5 = (playerManager->_playerList)._end; - if ((int)pvVar5 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar5) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar5 = (playerManager->_playerList)._end; } playerIt = (playerManager->_playerList)._begin; - if (uVar3 < (uint)((int)pvVar5 - (int)playerIt >> 2)) { + if (uVar3 < GHIDRA_UINT((GHIDRA_INT(pvVar5) - GHIDRA_INT(playerIt) >> 2))) { playerIt = playerIt + uVar3; } iVar6 = *playerIt; @@ -10678,7 +10678,7 @@ void Entity_NPC::trigger_kill_item_effects() (*(int *)(iVar4 + 0x30) == 2)) { ((TemporaryEffects *)((TemporaryEffects *)(iVar6 + 0x1508)))->TemporaryEffects::RemoveNullEffect(0x7f,-1); pvVar5 = (g_manager->_itemConfig)._nullItems._begin; - if ((0x7f < (int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar5 >> 2) && + if ((0x7f < GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar5) >> 2) && (iVar4 = *(int *)((char *)pvVar5 + 0x1fc), iVar4 != 0)) { local_8c[2] = *(undefined4 *)(iVar4 + 0x78); local_8c[1] = 0; @@ -10689,11 +10689,11 @@ void Entity_NPC::trigger_kill_item_effects() } uVar3 = uVar3 + 1; playerManager = &g_game->_playerManager; - } while (uVar3 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar3 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } ehState = -NAN; - if (nearbyEnemies._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(nearbyEnemies) + 0x0)) == '\0') { ehState = 4.2039e-45; tracked_alloc(1,nearbyEnemies._data,0); ehState = -NAN; @@ -10825,7 +10825,7 @@ void Entity_NPC::room_enter() float local_8; EntityPtr jacob; - local_8 = (float)(__security_cookie ^ (uint)((&color)[1]._colorize + 1)); + local_8 = (float)(__security_cookie ^ GHIDRA_UINT(((&color)[1]._colorize + 1))); if (this->_type == 0x362) { isFollowingShadow = this->_variant == 0; } @@ -10841,7 +10841,7 @@ void Entity_NPC::room_enter() iVar1 = roomDesc->GridIndex; if ((iVar3 < 0) || (iVar1 < 0)) { doorSlot = g_game->_enterDoor; - if ((int)doorSlot < 0) { + if (GHIDRA_INT(doorSlot) < 0) { roomDesc = ((Level *)((Level *)g_game))->Level::GetRoomByIdx(g_game->_currentRoomIdx, g_game->_currentDimensionIdx); local_14 = 0xb00000001; @@ -10859,7 +10859,7 @@ void Entity_NPC::room_enter() iVar3 = 0; roomDx = 0; doorSlot = doorSlot & 0x80000003; - if ((int)doorSlot < 0) { + if (GHIDRA_INT(doorSlot) < 0) { doorSlot = (doorSlot - 1 | 0xfffffffc) + 1; } switch(doorSlot) { @@ -10942,7 +10942,7 @@ void Entity_NPC::spawn_damage_numbers() seed = Random(); local_50.x = 0.0; rngResult = Random(); - maxHitPoints = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) + maxHitPoints = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10; local_50.y = -3.0 - (maxHitPoints + maxHitPoints); spawnPos.x = (this->_pos).x - 0.0; @@ -11013,10 +11013,10 @@ void Entity_NPC::update_damage_history() if (0.0 < statusOwner->_shieldStrength) { damageEvent = (this->_damageEvents)._begin; frameDamage = 0.0; - iVar3 = ((int)(this->_damageEvents)._end - (int)damageEvent) / 0x38; + iVar3 = (GHIDRA_INT((this->_damageEvents)._end) - GHIDRA_INT(damageEvent)) / 0x38; if (iVar3 != 0) { do { - if (((uint)damageEvent[2] & 0x2000) == 0) { + if ((GHIDRA_UINT(damageEvent[2]) & 0x2000) == 0) { fVar4 = fVar4 + *damageEvent; } damageEvent = damageEvent + 0xe; @@ -11024,7 +11024,7 @@ void Entity_NPC::update_damage_history() } while (iVar3 != 0); frameDamage = fVar4; } - if ((uint)statusOwner->_shieldFrames <= *(uint *)&(*(undefined1 *)((char *)(statusOwner) + 0xc58))) { + if (GHIDRA_UINT(statusOwner->_shieldFrames) <= *(uint *)&(*(undefined1 *)((char *)(statusOwner) + 0xc58))) { std::deque<4byte>::erase (local_14,*(undefined4 *)&(*(undefined1 *)((char *)(statusOwner) + 0xc48)),0, *(int *)&(*(undefined1 *)((char *)(statusOwner) + 0xc54)),*(undefined4 *)&(*(undefined1 *)((char *)(statusOwner) + 0xc48)),0, @@ -11066,7 +11066,7 @@ void Entity_NPC::update_damage_history() } fVar5 = this->_maxHitPoints / statusOwner->_shieldStrength; damageMult = 1.0; - fVar4 = (fVar4 / (float)((double)(int)ringIdx + __uint_to_double_fixup[-((int)ringIdx >> 0x1f)])) * + fVar4 = (fVar4 / (float)((double)GHIDRA_INT(ringIdx) + __uint_to_double_fixup[-(GHIDRA_INT(ringIdx) >> 0x1f)])) * 30.0; if (fVar5 < fVar4) { fVar5 = fVar5 / fVar4; @@ -11079,21 +11079,21 @@ void Entity_NPC::update_damage_history() this->_pendingDamage = 0.0; pvVar2 = (this->_damageEvents)._begin; local_20 = 0; - eventsBytes = (int)(this->_damageEvents)._end - (int)pvVar2; + eventsBytes = GHIDRA_INT((this->_damageEvents)._end) - GHIDRA_INT(pvVar2); iVar3 = eventsBytes >> 0x1f; if (eventsBytes / 0x38 + iVar3 != iVar3) { iVar3 = 0; do { - fVar4 = *(float *)(iVar3 + (int)pvVar2); - if ((*(uint *)(iVar3 + 8 + (int)pvVar2) & 0x40002000) == 0) { + fVar4 = *(float *)(iVar3 + GHIDRA_INT(pvVar2)); + if ((*(uint *)(iVar3 + 8 + GHIDRA_INT(pvVar2)) & 0x40002000) == 0) { fVar4 = fVar4 * damageMult; - *(float *)(iVar3 + (int)pvVar2) = fVar4; + *(float *)(iVar3 + GHIDRA_INT(pvVar2)) = fVar4; } local_20 = local_20 + 1; iVar3 = iVar3 + 0x38; this->_pendingDamage = fVar4 + this->_pendingDamage; pvVar2 = (this->_damageEvents)._begin; - } while (local_20 < (uint)(((int)(this->_damageEvents)._end - (int)pvVar2) / 0x38)); + } while (local_20 < GHIDRA_UINT(((GHIDRA_INT((this->_damageEvents)._end) - GHIDRA_INT(pvVar2)) / 0x38))); } } return; @@ -11173,7 +11173,7 @@ void Entity_NPC::update_blood_guide_gibs(float *nullFrame) randomDir = MusicManager::RandomVector(&local_30); rngResult = Random(); local_20 = (int *)0x47; - fVar6 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) + fVar6 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10; local_30.y = (fVar6 * randomDir->y * nullFrame[5] * 4.0 + nullFrame[1]) / 0.65; local_30.x = (fVar6 * randomDir->x * nullFrame[4] * 4.0 + *nullFrame) / 0.65; @@ -11191,7 +11191,7 @@ void Entity_NPC::update_blood_guide_gibs(float *nullFrame) bVar2 = 0; framedelay = 2; rngResult = Random(); - pitchRandom = (double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]; + pitchRandom = (double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]; iVar3 = 0x8d; LAB_006d7a90: PlaySound(bloodEffect,iVar3,(float)pitchRandom * 2.3283064e-10 * 0.2 + 0.5,framedelay,bVar2,fVar6); @@ -11214,7 +11214,7 @@ LAB_006d7a90: rngResult = Random(); tmpEntity = local_20; randomFraction = - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10; fVar6 = randomDir->y; fVar4 = randomDir->x; @@ -11223,10 +11223,10 @@ LAB_006d7a90: nullPosY = nullFrame[1]; nullPosX = *nullFrame; local_20[0xd6] = 0x42480000; - local_20[0x38] = (int)(randomFraction * fVar6 * fVar5 * 4.0 + nullPosY); - local_20[0x37] = (int)(randomFraction * fVar4 * nullScaleX * 4.0 + nullPosX); + local_20[0x38] = GHIDRA_INT((randomFraction * fVar6 * fVar5 * 4.0 + nullPosY)); + local_20[0x37] = GHIDRA_INT((randomFraction * fVar4 * nullScaleX * 4.0 + nullPosX)); rngResult = Random(); - tmpEntity[0x3b] = (int)(((float)(rngResult & 3) + 0.0) * 90.0); + tmpEntity[0x3b] = GHIDRA_INT((((float)(rngResult & 3) + 0.0) * 90.0)); rngResult = Random(); local_18 = &DAT_bf800000; local_1c = local_18; @@ -11239,17 +11239,17 @@ LAB_006d7a90: } rngResult = Random(); setColorFn = *(code **)(*tmpEntity + 0x3c); - fVar6 = 1.0 - (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * + fVar6 = 1.0 - (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 0.4; - tmpEntity[0x3a] = (int)(fVar6 * (float)local_1c); - tmpEntity[0x39] = (int)(fVar6 * (float)local_18); + tmpEntity[0x3a] = GHIDRA_INT((fVar6 * (float)local_1c)); + tmpEntity[0x39] = GHIDRA_INT((fVar6 * (float)local_18)); (*setColorFn)(&bloodEffect->_splatColor,0xffffffff,0xff,0,1); fVar6 = 1.0; bVar2 = 0; framedelay = 2; rngResult = Random(); - pitchRandom = (double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]; + pitchRandom = (double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]; iVar3 = 0x48; goto LAB_006d7a90; } @@ -11258,7 +11258,7 @@ LAB_006d7a90: rngResult = Random(); tmpEntity = local_20; randomFraction = - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10; fVar6 = randomDir->y; fVar4 = randomDir->x; @@ -11267,8 +11267,8 @@ LAB_006d7a90: nullPosY = nullFrame[1]; nullPosX = *nullFrame; local_20[0xd6] = 0x42480000; - local_20[0x38] = (int)(randomFraction * fVar6 * fVar5 * 4.0 + nullPosY); - local_20[0x37] = (int)(randomFraction * fVar4 * nullScaleX * 4.0 + nullPosX); + local_20[0x38] = GHIDRA_INT((randomFraction * fVar6 * fVar5 * 4.0 + nullPosY)); + local_20[0x37] = GHIDRA_INT((randomFraction * fVar4 * nullScaleX * 4.0 + nullPosX)); rngResult = Random(); if ((rngResult & 1) == 0) { local_18 = (undefined1 *)0x3f800000; @@ -11277,11 +11277,11 @@ LAB_006d7a90: local_18 = &DAT_bf800000; } rngResult = Random(); - fVar6 = 1.0 - (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * + fVar6 = 1.0 - (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 0.4; - tmpEntity[0x3a] = (int)fVar6; - tmpEntity[0x39] = (int)(fVar6 * (float)local_18); + tmpEntity[0x3a] = GHIDRA_INT(fVar6); + tmpEntity[0x39] = GHIDRA_INT((fVar6 * (float)local_18)); } } } @@ -11299,13 +11299,13 @@ LAB_006d7a90: bloodEffect = (Entity_Effect *)__RTDynamicCast(spawned,uVar7,pTVar8,pTVar9,uVar10); ((Entity_Effect *)(bloodEffect))->Entity_Effect::FollowParent((Entity *)bloodEffect); rngResult = Random(); - fVar6 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + fVar6 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14; fVar6 = fVar6 + fVar6; local_18 = (undefined1 *)sin(fVar6); rngResult = Random(); - local_20 = (int *)((float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10); + local_20 = (int *)((float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10); fVar5 = cos(fVar6); fVar6 = nullFrame[5]; fVar4 = nullFrame[1]; @@ -11344,13 +11344,13 @@ LAB_006d7c3e: local_30.y = fVar6; if (fVar6 != 0.0) { do { - tmpEntity = *(int **)(iVar3 + (int)fVar4 * 4); + tmpEntity = *(int **)(iVar3 + GHIDRA_INT(fVar4) * 4); if (((tmpEntity != (int *)0x0) && (tmpEntity[10] == 1000)) && ((tmpEntity[0xb] == 0x2a && ((Entity_NPC *)tmpEntity[0xef] == bloodEffect)))) { (**(code **)(*tmpEntity + 0x28))(); } - fVar4 = (float)((int)fVar4 + 1); - } while ((uint)fVar4 < (uint)fVar6); + fVar4 = (float)(GHIDRA_INT(fVar4) + 1); + } while (GHIDRA_UINT(fVar4) < GHIDRA_UINT(fVar6)); } } ExceptionList = local_10; @@ -11393,7 +11393,7 @@ byte Entity_NPC::IsControllerActionPressed(int action) byte isPressed; if (this->_controllerID != -1) { - isPressed = input_is_action_pressed(action,this->_controllerID,(Entity *)this,(int)this); + isPressed = input_is_action_pressed(action,this->_controllerID,(Entity *)this,GHIDRA_INT(this)); if (isPressed != 0) { return 1; } @@ -11444,7 +11444,7 @@ Vector * Entity_NPC::GetControllerInput(Vector *outInput, float deadzone) if (controllerIndex != -1) { savedDeadzone = deadzone; if ((*(undefined1 *)((char *)(this) + 0xf2c)) == '\0') { - fVar1 = InputManager::GetActionValue(0,controllerIndex,(Entity *)this,(int)this); + fVar1 = InputManager::GetActionValue(0,controllerIndex,(Entity *)this,GHIDRA_INT(this)); inputX = InputManager::GetActionValue(1,this->_controllerID,(Entity *)this,unused_02); inputX = inputX + (0.0 - fVar1); rawInput.x = inputX; @@ -11453,7 +11453,7 @@ Vector * Entity_NPC::GetControllerInput(Vector *outInput, float deadzone) inputY = inputY + (0.0 - fVar1); } else { - fVar1 = InputManager::GetActionValue(4,controllerIndex,(Entity *)this,(int)this); + fVar1 = InputManager::GetActionValue(4,controllerIndex,(Entity *)this,GHIDRA_INT(this)); inputX = InputManager::GetActionValue(5,this->_controllerID,(Entity *)this,unused); inputX = inputX + (0.0 - fVar1); rawInput.x = inputX; @@ -11652,9 +11652,9 @@ void Entity_NPC::TransferControl(Entity_NPC *target) if (this->_controllerID != -1) { target = (Entity_NPC *)0x0; playersBegin = (g_game->_playerManager)._extraPlayers._begin; - if ((int)(g_game->_playerManager)._extraPlayers._end - (int)playersBegin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._extraPlayers._end) - GHIDRA_INT(playersBegin) >> 2 != 0) { do { - player = *(Entity_Player **)((char *)playersBegin + (int)target * 4); + player = *(Entity_Player **)((char *)playersBegin + GHIDRA_INT(target) * 4); if (player->_controllerIndex == this->_controllerID) { controlledNpcRef = &player->_target; if (player->_target == (EntityPtr)this) { @@ -11671,7 +11671,7 @@ void Entity_NPC::TransferControl(Entity_NPC *target) target = (Entity_NPC *)&(*(undefined1 *)((char *)(target) + 0x1)); playersBegin = (g_game->_playerManager)._extraPlayers._begin; } while (target < (undefined1 *) - ((int)(g_game->_playerManager)._extraPlayers._end - (int)playersBegin >> 2 + (GHIDRA_INT((g_game->_playerManager)._extraPlayers._end) - GHIDRA_INT(playersBegin) >> 2 )); } } @@ -11702,7 +11702,7 @@ void Entity_NPC::SpawnControlTarget(int inputMode, float rotation) void **aimTargetSlot; ColorMod *targetColor; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); aimTarget = this->_aimTargetEffect; aimTargetSlot = &this->_aimTargetEffect; if (aimTarget != (int *)0x0) { @@ -11764,9 +11764,9 @@ void Entity_NPC::SpawnControlTarget(int inputMode, float rotation) std::multiset::insert(aimTargetSlot); aimTarget = this->_aimTargetEffect; LAB_006d8cba: - aimTarget[0x11d] = (int)rotation; - *(undefined4 *)((int)*aimTargetSlot + 0x424) = 2; - *(int *)((int)*aimTargetSlot + 0x428) = inputMode; + aimTarget[0x11d] = GHIDRA_INT(rotation); + *(undefined4 *)(GHIDRA_INT(*aimTargetSlot) + 0x424) = 2; + *(int *)(GHIDRA_INT(*aimTargetSlot) + 0x428) = inputMode; return; } @@ -11858,11 +11858,11 @@ void Entity_NPC::UpdateChargeBar(float start, float end, float value, byte isHid undefined1 *puStack_18; undefined4 local_14; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00af85cd; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; bVar2 = (this->_chargeBarSprite)._loaded; if (this->_controllerID == -1) { if (bVar2 == 0) { @@ -11871,7 +11871,7 @@ void Entity_NPC::UpdateChargeBar(float start, float end, float value, byte isHid } else { ExceptionList = &local_1c; - puVar1 = (undefined1 *)((int)register0x00000010 + -4); + puVar1 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); if (bVar2 == 0) { anm2Path._size = 0; anm2Path._capacity = 0xf; @@ -11879,20 +11879,20 @@ void Entity_NPC::UpdateChargeBar(float start, float end, float value, byte isHid anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x12; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/chargebar.anm2",0x13); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/chargebar.anm2",0x13); local_14 = 0; ((ANM2 *)(&this->_chargeBarSprite))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { size = anm2Path._capacity + 1; - ptr = (char *)anm2Path._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < size) { - ptr = *(char **)(anm2Path._buf._0_4_ + -4); + ptr = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); size = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)ptr))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(ptr)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -11901,7 +11901,7 @@ void Entity_NPC::UpdateChargeBar(float start, float end, float value, byte isHid } anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = anm2Path._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) & 0xffffff00; puVar1 = puStack_20; } puStack_20 = puVar1; @@ -11917,7 +11917,7 @@ void Entity_NPC::UpdateChargeBar(float start, float end, float value, byte isHid if (1.0 <= chargeFraction) { chargeFraction = 1.0; } - chargeFrame = (int)(chargeFraction * 100.0 + 0.0); + chargeFrame = GHIDRA_INT((chargeFraction * 100.0 + 0.0)); if ((isHideWhenFull == 0) || (chargeFrame < 100)) { bVar2 = ((ANM2 *)(&this->_chargeBarSprite))->ANM2::SetAnimation((byte *)"Charging",1); if ((bVar2 != 0) && @@ -12084,7 +12084,7 @@ byte Entity_NPC::split(float damage, EntityRef *source, byte isPlaySound) local_8 = (EntityPtr)0xffffffff; puStack_c = &LAB_00afad00; local_10 = ExceptionList; - uVar6 = __security_cookie ^ (uint)(halves + 0x15); + uVar6 = __security_cookie ^ GHIDRA_UINT((halves + 0x15)); eraseHalfParent = (EntityPtr *)0x0; cleanupFlags = 0; if ((this->_dead != 0) || (this->_exists == 0)) { @@ -12200,7 +12200,7 @@ LAB_006d9b71: bVar4 = (*pcVar3)(); return bVar4; } - uVar6 = (uint)local_20 >> ((byte)rngShifts & 0x1f) ^ (uint)local_20; + uVar6 = GHIDRA_UINT(local_20) >> ((byte)rngShifts & 0x1f) ^ GHIDRA_UINT(local_20); rngShifts2 = 0x100000003; uVar6 = uVar6 << ((byte)((ulonglong)rngShifts >> 0x20) & 0x1f) ^ uVar6; local_20 = (float)(uVar6 >> ((byte)iVar7 & 0x1f) ^ uVar6); @@ -12210,10 +12210,10 @@ LAB_006d9b71: bVar4 = (*pcVar3)(); return bVar4; } - uVar6 = (uint)local_20 >> 3 ^ (uint)local_20; + uVar6 = GHIDRA_UINT(local_20) >> 3 ^ GHIDRA_UINT(local_20); uVar6 = uVar6 << 1 ^ uVar6; uVar6 = uVar6 >> 0xe ^ uVar6; - fVar9 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar9 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283062e-10 * 3.14; source = (EntityRef *)(fVar9 + fVar9); local_24 = (EntityPtr)sin((float)source); @@ -12243,14 +12243,14 @@ LAB_006d9b71: bVar4 = (*pcVar3)(); return bVar4; } - rngState = (uint)local_20 >> ((byte)rngShifts & 0x1f) ^ (uint)local_20; + rngState = GHIDRA_UINT(local_20) >> ((byte)rngShifts & 0x1f) ^ GHIDRA_UINT(local_20); rngState = rngState << ((byte)((ulonglong)rngShifts >> 0x20) & 0x1f) ^ rngState; local_20 = (float)(rngState >> ((byte)local_14 & 0x1f) ^ rngState); half = (Entity_NPC *) - ((Game *)(g_game))->Game::Spawn((uint)source,uVar6,&spawnPos,&g_vectorZero,(Entity *)this, - this->_subtype,(uint)local_20); + ((Game *)(g_game))->Game::Spawn(GHIDRA_UINT(source),uVar6,&spawnPos,&g_vectorZero,(Entity *)this, + this->_subtype,GHIDRA_UINT(local_20)); if (this->_isChampion != 0) { - Morph(half,(int)source,uVar6,this->_subtype,this->_championColorIdx); + Morph(half,GHIDRA_INT(source),uVar6,this->_subtype,this->_championColorIdx); } half->_scoreMultiplier = this->_scoreMultiplier * 0.5; if (half->_type == 0x322) { @@ -12265,7 +12265,7 @@ LAB_006d9b71: std::multiset::insert(temp_27f6a36c5ce); } if ((halfIndex == 0) && (EVar2 = this->_parent, *(int *)((char *)EVar2 + 0x28) == 3)) { - parentLinkSlot = (EntityPtr)((int)EVar2 + 0xdc0); + parentLinkSlot = (EntityPtr)(GHIDRA_INT(EVar2) + 0xdc0); if (*(int *)((char *)EVar2 + 0xdc0) != 0) { local_24 = parentLinkSlot; std::multiset::erase(&local_24); @@ -12274,7 +12274,7 @@ LAB_006d9b71: std::multiset::insert(parentLinkSlot); } EntityList::AddPersistentEntity - ((EntityList *)((int)g_game->_room + 0x1218),(Entity *)half); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(Entity *)half); } if (this->_type == 0x45) { if (this->_variant != 0) goto LAB_006d9ded; @@ -12292,22 +12292,22 @@ LAB_006d9ded: } if (half->_type == 0x38a) { EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&hornfelDoors,0x3c7,-1,-1,0,0); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&hornfelDoors,0x3c7,-1,-1,0,0); cleanupFlags = cleanupFlags | 3; if (hornfelDoors._size != 0) goto LAB_006d9e96; - source = (EntityRef *)CONCAT13(1,source._0_3_); + source = (EntityRef *)CONCAT13(1,(*(undefined1 *)((char *)&(source) + 0x0))); } else { LAB_006d9e96: - source = (EntityRef *)((uint)source & 0xffffff); + source = (EntityRef *)(GHIDRA_UINT(source) & 0xffffff); } if (((cleanupFlags & 1) != 0) && - (cleanupFlags = cleanupFlags & 0xfffffffe, hornfelDoors._0_1_ == '\0')) { + (cleanupFlags = cleanupFlags & 0xfffffffe, (*(undefined1 *)((char *)&(hornfelDoors) + 0x0)) == '\0')) { local_8 = (EntityPtr)0x0; tracked_alloc(1,hornfelDoors._data,0); local_8 = (EntityPtr)0xffffffff; } - if (source._3_1_ != '\0') { + if ((*(undefined1 *)((char *)&(source) + 0x3)) != '\0') { if (half->_minecart != (EntityPtr)0x0) { (**(code **)(*(int *)half->_minecart + 0x28))(); } @@ -12332,7 +12332,7 @@ LAB_006d9f46: bVar8 = bVar4 < *expectedNameCh; if (bVar4 != *expectedNameCh) { LAB_006d9f28: - uVar6 = -(uint)bVar8 | 1; + uVar6 = -GHIDRA_UINT(bVar8) | 1; goto LAB_006d9f2d; } if (bVar4 == 0) break; @@ -12374,8 +12374,8 @@ LAB_006d9f2d: *temp_27f6a36c5ce = (EntityPtr)source; std::multiset::insert(temp_27f6a36c5ce); if (halfIndex != 0) { - *(int *)((int)*temp_27f6a36c5ce + 0xbc0) = - *(int *)((int)*temp_27f6a36c5ce + 0xbc0) + 1; + *(int *)(GHIDRA_INT(*temp_27f6a36c5ce) + 0xbc0) = + *(int *)(GHIDRA_INT(*temp_27f6a36c5ce) + 0xbc0) + 1; } half->_spawnFrame = this->_spawnFrame; half->_state = this->_state; @@ -12390,14 +12390,14 @@ LAB_006d9f2d: ((Sprite *)((Sprite *)&half->_sprite))->Sprite::ReplaceSpritesheet(0,&layer->_spriteSheetPath); ((ANM2 *)(&half->_sprite))->ANM2::LoadGraphics(unk); EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&peeps,0x44,-1,-1,0,0); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&peeps,0x44,-1,-1,0,0); cleanupFlags = cleanupFlags | 4; local_8 = (EntityPtr)0x1; source = (EntityRef *)0x0; if ((EntityRef *)peeps._size != (EntityRef *)0x0) { listData = peeps._data; do { - iVar7 = *(int *)((char *)listData + (int)source * 4); + iVar7 = *(int *)((char *)listData + GHIDRA_INT(source) * 4); if (9 < *(uint *)(iVar7 + 0x2c)) { parentSlot = (undefined4 *)(iVar7 + 0x3bc); if (*(Entity_NPC **)(iVar7 + 0x3bc) == this) { @@ -12410,11 +12410,11 @@ LAB_006d9f2d: } listData = peeps._data; } - source = (EntityRef *)((int)&source->_type + 1); - } while (source < (uint)peeps._size); + source = (EntityRef *)(GHIDRA_INT(&source->_type) + 1); + } while (source < GHIDRA_UINT(peeps._size)); } local_8 = (EntityPtr)0xffffffff; - if (peeps._0_1_ != '\0') goto LAB_006da4a7; + if ((*(undefined1 *)((char *)&(peeps) + 0x0)) != '\0') goto LAB_006da4a7; local_8 = (EntityPtr)0x2; listData = peeps._data; LAB_006da145: @@ -12425,7 +12425,7 @@ LAB_006da145: if (((this->_variant == 0) || (this->_variant == 2)) || (this->_variant == 1)) { half->_state = 4; EntityList::QuerySublist - ((EntityList *)((int)game->_room + 0x1218),&umbilicalCords,0x4f,0x14,-1,0,0) + ((EntityList *)(GHIDRA_INT(game->_room) + 0x1218),&umbilicalCords,0x4f,0x14,-1,0,0) ; cleanupFlags = cleanupFlags | 8; killSourceRef = (EntityRef *)0x0; @@ -12433,44 +12433,44 @@ LAB_006da145: if ((EntityRef *)umbilicalCords._size != (EntityRef *)0x0) { listData = umbilicalCords._data; do { - umbilicalCord = *(int **)((char *)listData + (int)killSourceRef * 4); + umbilicalCord = *(int **)((char *)listData + GHIDRA_INT(killSourceRef) * 4); if ((Entity_NPC *)umbilicalCord[0xef] == this) { (**(code **)(*umbilicalCord + 0x28))(); listData = umbilicalCords._data; } - killSourceRef = (EntityRef *)((int)&killSourceRef->_type + 1); - } while (killSourceRef < (uint)umbilicalCords._size); + killSourceRef = (EntityRef *)(GHIDRA_INT(&killSourceRef->_type) + 1); + } while (killSourceRef < GHIDRA_UINT(umbilicalCords._size)); } if ((this->_type == 0x4f) && (this->_variant == 2)) { EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&geminiBabies,0x4f,0xc,-1,0,0 + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&geminiBabies,0x4f,0xc,-1,0,0 ); listData = geminiBabies._data; cleanupFlags = cleanupFlags | 0x10; umbilicalCords._capacity = geminiBabies._capacity; - umbilicalCords._0_1_ = '\x01'; + (*(undefined1 *)((char *)&(umbilicalCords) + 0x0)) = '\x01'; umbilicalCords._data = geminiBabies._data; umbilicalCords._size = geminiBabies._size; - if (geminiBabies._0_1_ == '\0') { - local_8._0_1_ = 4; + if ((*(undefined1 *)((char *)&(geminiBabies) + 0x0)) == '\0') { + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; tracked_alloc(1,geminiBabies._data,0); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; } source = (EntityRef *)0x0; if ((EntityRef *)geminiBabies._size != (EntityRef *)0x0) { do { - umbilicalCord = (int *)(*(int *)((char *)listData + (int)source * 4) + 0x3bc); + umbilicalCord = (int *)(*(int *)((char *)listData + GHIDRA_INT(source) * 4) + 0x3bc); if ((Entity_NPC *)*umbilicalCord == this) { if ((Entity_NPC *)*umbilicalCord != (Entity_NPC *)0x0) { eraseBabyParent = umbilicalCord; std::multiset::erase(&eraseBabyParent); } - *umbilicalCord = (int)half; + *umbilicalCord = GHIDRA_INT(half); std::multiset::insert(umbilicalCord); } - source = (EntityRef *)((int)&source->_type + 1); + source = (EntityRef *)(GHIDRA_INT(&source->_type) + 1); listData = umbilicalCords._data; - } while (source < (uint)geminiBabies._size); + } while (source < GHIDRA_UINT(geminiBabies._size)); goto LAB_006da29e; } } @@ -12479,7 +12479,7 @@ LAB_006da29e: listData = umbilicalCords._data; } local_8 = (EntityPtr)0xffffffff; - if (umbilicalCords._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(umbilicalCords) + 0x0)) == '\0') { local_8 = (EntityPtr)0x5; goto LAB_006da145; } @@ -12516,12 +12516,12 @@ LAB_006da2c0: else if (iVar7 == 0x2d) { if (halfIndex == 0) { EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&momParts,0x2d,-1,-1,0,0); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&momParts,0x2d,-1,-1,0,0); local_8 = (EntityPtr)0x6; source = (EntityRef *)0x0; if ((EntityRef *)momParts._size != (EntityRef *)0x0) { do { - momPart = *(Entity_NPC **)((char *)momParts._data + (int)source * 4); + momPart = *(Entity_NPC **)((char *)momParts._data + GHIDRA_INT(source) * 4); if ((momPart == (Entity_NPC *)0x0) || (((*(int *)&g_game->_deathmatchManager < 2 || (momPart->_type != 1)) && (0x3dd < momPart->_type - 10U)))) { @@ -12539,11 +12539,11 @@ LAB_006da2c0: std::multiset::insert(temp_27f6a36c5ce); } } - source = (EntityRef *)((int)&source->_type + 1); - } while (source < (uint)momParts._size); + source = (EntityRef *)(GHIDRA_INT(&source->_type) + 1); + } while (source < GHIDRA_UINT(momParts._size)); } local_8 = (EntityPtr)0xffffffff; - if (momParts._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(momParts) + 0x0)) == '\0') { local_8 = (EntityPtr)0x7; listData = momParts._data; goto LAB_006da145; @@ -12568,9 +12568,9 @@ LAB_006da4a7: half->_spawnGridIndex = this->_spawnGridIndex; if ((this->_flags & 0x8000000000) != 0) { halfFlags = half->_flags; - flagsHigh = (uint *)((int)&half->_flags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&half->_flags) + 4); *flagsHigh = *flagsHigh | 0x80; - *(int *)&half->_flags = (int)halfFlags; + *(int *)&half->_flags = GHIDRA_INT(halfFlags); } halfIndex = halfIndex + 1; if (1 < halfIndex) goto LAB_006da4fe; @@ -12618,7 +12618,7 @@ void Entity_NPC::UpdatePickupGhosts() local_8 = (void *)0xffffffff; puStack_c = &LAB_00afad35; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(fireplaceLoot + 9); + uVar1 = __security_cookie ^ GHIDRA_UINT((fireplaceLoot + 9)); ExceptionList = &local_10; isGhostShown = false; guppysEyeOwner = @@ -12762,39 +12762,39 @@ void Entity_NPC::render_debug(float *param_1, int param_2) hpStageRatio = maxHitPoints / ((float)stageNum + (float)stageNum + 6.0); dVar2 = (double)hpStageRatio; libm_sse2_log10_precise(); - local_ec._0_4_ = ((float)dVar2 + 1.0) * 24.0 + 0.5; - dVar2 = floor((double)(float)local_ec._0_4_); - local_ec._0_4_ = (BADTYPE)dVar2; - fVar3 = (float)local_ec._0_4_; - if ((float)local_ec._0_4_ <= 8.0) { + (*(undefined4 *)((char *)&(local_ec) + 0x0)) = ((float)dVar2 + 1.0) * 24.0 + 0.5; + dVar2 = floor((*(undefined4 *)((char *)&((double)(float)local_ec) + 0x0))); + (*(undefined4 *)((char *)&(local_ec) + 0x0)) = (BADTYPE)dVar2; + fVar3 = (*(undefined4 *)((char *)&((float)local_ec) + 0x0)); + if ((*(undefined4 *)((char *)&((float)local_ec) + 0x0)) <= 8.0) { fVar3 = 8.0; } if (48.0 <= fVar3) { fVar3 = 48.0; } renderQuadFn = *(code **)(**(int **)(in_ECX + 0x5488) + 0x14); - local_b0._4_4_ = fVar3; + (*(undefined4 *)((char *)&(local_b0) + 0x4)) = fVar3; ((KColor *)(&local_a0))->KColor::SetFromARGB(0xffffffff); - local_ec._0_4_ = -fVar3 * 0.5; - local_ec._4_4_ = 4.0; + (*(undefined4 *)((char *)&(local_ec) + 0x0)) = -fVar3 * 0.5; + (*(undefined4 *)((char *)&(local_ec) + 0x4)) = 4.0; local_e4 = 0x41000000; - local_e0.x = ((float)local_ec._0_4_ - 4.0) + *param_1; + local_e0.x = ((*(undefined4 *)((char *)&((float)local_ec) + 0x0)) - 4.0) + *param_1; local_e0.y = param_1[1] - 4.0; render_quad_set_rect(local_78,&local_e0,(Vector *)(local_ec + 4),color); - local_c4._0_4_ = 0.0; + (*(undefined4 *)((char *)&(local_c4) + 0x0)) = 0.0; local_c8 = (undefined1 *)0x0; local_d4 = 0; local_d0 = 0.0; local_cc = 4.0; - local_c4._4_4_ = 8.0; - local_c4._8_4_ = 4.0; - local_c4._12_4_ = 8.0; + (*(undefined4 *)((char *)&(local_c4) + 0x4)) = 8.0; + (*(undefined4 *)((char *)&(local_c4) + 0x8)) = 4.0; + (*(undefined4 *)((char *)&(local_c4) + 0xc)) = 8.0; local_b4 = 1; (*renderQuadFn)(); - renderQuadFn = *(code **)(**(int **)(local_c4._8_4_ + 0x5488) + 0x14); + renderQuadFn = *(code **)(**(int **)((*(undefined4 *)((char *)&(local_c4) + 0x8)) + 0x5488) + 0x14); ((KColor *)((KColor *)(local_b0 + 4)))->KColor::SetFromARGB(0xffffffff); - local_ec._0_4_ = 4.0; - local_ec._4_4_ = 8.0; + (*(undefined4 *)((char *)&(local_ec) + 0x0)) = 4.0; + (*(undefined4 *)((char *)&(local_ec) + 0x4)) = 8.0; render_quad_set_rect(auStack_84,(Vector *)(auStack_ee + -6),(Vector *)local_ec,color_00); local_d0 = 28.0; local_d4 = 0; @@ -12803,7 +12803,7 @@ void Entity_NPC::render_debug(float *param_1, int param_2) local_d8 = &DAT_42000000; local_cc = 8.0; local_c8 = &DAT_42000000; - local_c4._0_4_ = 8.0; + (*(undefined4 *)((char *)&(local_c4) + 0x0)) = 8.0; local_c4[4] = 1; (*renderQuadFn)(&local_e0); renderQuadFn = *(code **)(**(int **)(local_c8 + 0x5488) + 0x14); @@ -12813,13 +12813,13 @@ void Entity_NPC::render_debug(float *param_1, int param_2) (&local_a0._unk,(Vector *)(auStack_ee + -0x12),(Vector *)(auStack_ee + -10),color_01); local_e0.y = 4.0; local_e0.x = 0.0; - local_ec._0_4_ = 4.0; - local_ec._4_4_ = 0.0; + (*(undefined4 *)((char *)&(local_ec) + 0x0)) = 4.0; + (*(undefined4 *)((char *)&(local_ec) + 0x4)) = 0.0; local_e4 = 0x41e00000; local_d8 = (undefined1 *)0x41000000; local_d4 = 0x41e00000; local_d0 = 8.0; - local_cc = (float)CONCAT31(local_cc._1_3_,1); + local_cc = (float)CONCAT31((*(undefined1 *)((char *)&(local_cc) + 0x1)),1); (*renderQuadFn)(local_ec,extraout_EAX,g_drawRectUnset); fVar3 = fVar3 / (float)local_c8; fVar4 = (local_cc - 1.0) / 5.0; @@ -12852,12 +12852,12 @@ void Entity_NPC::render_debug(float *param_1, int param_2) render_quad_set_rect (&local_a0._green,(Vector *)(auStack_ee + -0x1e),(Vector *)(auStack_ee + -0x16), (KColor *)local_c4); - local_ec._4_4_ = 4.0; + (*(undefined4 *)((char *)&(local_ec) + 0x4)) = 4.0; local_e0.x = fVar3 * 24.0 + 4.0; - local_ec._0_4_ = 8.0; + (*(undefined4 *)((char *)&(local_ec) + 0x0)) = 8.0; local_e4 = 0x41800000; local_e0.y = 16.0; - local_d8 = (undefined1 *)CONCAT31(local_d8._1_3_,1); + local_d8 = (undefined1 *)CONCAT31((*(undefined1 *)((char *)&(local_d8) + 0x1)),1); (*renderQuadFn)(auStack_ee + -10,extraout_EAX_00,local_b0); return; } diff --git a/src/game/entity_partition.cpp b/src/game/entity_partition.cpp index bbd4edc..32601f6 100644 --- a/src/game/entity_partition.cpp +++ b/src/game/entity_partition.cpp @@ -35,14 +35,14 @@ void EntityPartition::query_box(EntityList_EL *outList, Vector *position, Vector pfVar1 = &position->y; cellSize = *(float *)((char *)this + 0x14); posXCopy = position->x; - position = (Vector *)(int)((position->y - extent->y) / cellSize); - iVar5 = (int)((extent->y + *pfVar1) / cellSize); - iVar6 = (int)((*pfVar3 - extentX) / cellSize); - if ((int)position <= iVar5) { + position = (Vector *)GHIDRA_INT(((position->y - extent->y) / cellSize)); + iVar5 = GHIDRA_INT(((extent->y + *pfVar1) / cellSize)); + iVar6 = GHIDRA_INT(((*pfVar3 - extentX) / cellSize)); + if (GHIDRA_INT(position) <= iVar5) { column = iVar6; do { - for (; column <= (int)((extentX + posXCopy) / cellSize); column = column + 1) { - iVar4 = column + *(int *)((char *)this + 0xc) * (int)position; + for (; column <= GHIDRA_INT(((extentX + posXCopy) / cellSize)); column = column + 1) { + iVar4 = column + *(int *)((char *)this + 0xc) * GHIDRA_INT(position); if ((-1 < iVar4) && (iVar4 < (*(int *)((char *)this + 0x1c) - *(int *)((char *)this + 0x18)) / 0xa4)) { uVar7 = 0; @@ -51,38 +51,38 @@ void EntityPartition::query_box(EntityList_EL *outList, Vector *position, Vector do { iVar2 = *(int *)(iVar4 + uVar7 * 4); entityIndex = *(int *)(iVar2 + 0x24); - if (*(char *)(entityIndex + (int)isSeen) == '\0') { + if (*(char *)(entityIndex + GHIDRA_INT(isSeen)) == '\0') { resultSize = outList->_size; - if ((uint)outList->_capacity < resultSize + 1U) { + if (GHIDRA_UINT(outList->_capacity) < resultSize + 1U) { KAGE_LogMessage(0x10,(byte *)"EL: not enough space for push_back\n"); resultSize = outList->_size; } *(int *)((char *)outList->_data + resultSize * 4) = iVar2; outList->_size = outList->_size + 1; - *(undefined1 *)(entityIndex + (int)isSeen) = 1; + *(undefined1 *)(entityIndex + GHIDRA_INT(isSeen)) = 1; } uVar7 = uVar7 + 1; } while (uVar7 < *(uint *)(iVar4 + 0xa0)); } } } - position = (Vector *)((int)&position->x + 1); + position = (Vector *)(GHIDRA_INT(&position->x) + 1); column = iVar6; - } while ((int)position <= iVar5); + } while (GHIDRA_INT(position) <= iVar5); } if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (isSeen != (void *)0x0) { uVar7 = *(uint *)((char *)isSeen + -4); oldAllocated = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar7; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar7; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)oldAllocated < uVar7); - free((void *)((int)isSeen + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocated) < uVar7)); + free((void *)(GHIDRA_INT(isSeen) + -4)); } } ExceptionList = local_10; diff --git a/src/game/entity_pickup.cpp b/src/game/entity_pickup.cpp index ba996ea..76a2f4c 100644 --- a/src/game/entity_pickup.cpp +++ b/src/game/entity_pickup.cpp @@ -84,7 +84,7 @@ void Entity_Pickup::GetLootList(Vector *renderOffset) puStack_20 = (undefined1 *)(&spriteColor)[1]._offset; puStack_18 = &LAB_00af53de; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)((&spriteColor)[1]._colorize + 1); + local_24 = __security_cookie ^ GHIDRA_UINT(((&spriteColor)[1]._colorize + 1)); ExceptionList = &local_1c; pointCursor = (float *)0x0; local_a4 = renderOffset; @@ -111,7 +111,7 @@ void Entity_Pickup::GetLootList(Vector *renderOffset) spriteColor._colorize[1] = (this->_sprite)._color._colorize[1]; spriteColor._colorize[2] = (this->_sprite)._color._colorize[2]; spriteColor._colorize[3] = (this->_sprite)._color._colorize[3]; - spriteColor._offset._0_8_ = *(undefined8 *)(this->_sprite)._color._offset; + (*(undefined8 *)((char *)&(spriteColor._offset) + 0x0)) = *(undefined8 *)(this->_sprite)._color._offset; local_5c = (EntityPtr)this; while (((segment = *(EntityPtr *)((char *)local_5c + 0x3c0), segment != (EntityPtr)0x0 && (*(int *)((char *)segment + 0x28) == 0x38d)) && (*(int *)((char *)segment + 0x2c) == 10))) { @@ -121,7 +121,7 @@ void Entity_Pickup::GetLootList(Vector *renderOffset) segment = (EntityPtr)this; while (((segment = *(EntityPtr *)((char *)segment + 0x3c0), segment != (EntityPtr)0x0 && (*(int *)((char *)segment + 0x28) == 0x38d)) && (*(int *)((char *)segment + 0x2c) == 10))) { - local_68 = (float)((int)local_68 + 1); + local_68 = (float)(GHIDRA_INT(local_68) + 1); } pickup = this; pointCursor = (&spriteColor)[1]._offset; @@ -130,12 +130,12 @@ void Entity_Pickup::GetLootList(Vector *renderOffset) pointCursor = (float *)puStack_20; } puStack_20 = (undefined1 *)pointCursor; - if (*(int *)((int)(pickup->_sprite)._animState._animation + 0x80) < 1) { + if (*(int *)(GHIDRA_INT((pickup->_sprite)._animState._animation) + 0x80) < 1) { KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"); } pvVar5 = (pickup->_sprite)._animState._animData; if ((pvVar5 != (void *)0x0) && - (-1 < *(int *)((int)(pickup->_sprite)._animState._animation + 0x80))) { + (-1 < *(int *)(GHIDRA_INT((pickup->_sprite)._animState._animation) + 0x80))) { iVar3 = *(int *)((char *)pvVar5 + 0x38); if (iVar3 < 0) { ExceptionList = local_1c; @@ -145,9 +145,9 @@ void Entity_Pickup::GetLootList(Vector *renderOffset) ExceptionList = local_1c; return; } - local_58 = (void *)(iVar3 * 0x10 + *(int *)((int)(pickup->_sprite)._animState._animData + 0x18)) + local_58 = (void *)(iVar3 * 0x10 + *(int *)(GHIDRA_INT((pickup->_sprite)._animState._animData) + 0x18)) ; - iVar3 = *(int *)((int)(pickup->_sprite)._animState._layerFrames + iVar3 * 4); + iVar3 = *(int *)(GHIDRA_INT((pickup->_sprite)._animState._layerFrames) + iVar3 * 4); if (iVar3 < 0) { ExceptionList = local_1c; return; @@ -171,7 +171,7 @@ void Entity_Pickup::GetLootList(Vector *renderOffset) segment = pickup->_child; local_8c = (pickup->_posOffset).x + (pickup->_pos).x; local_5c = (EntityPtr)((pickup->_posOffset).y + (pickup->_pos).y); - local_6c = (void *)(fVar8 / (float)(int)local_68); + local_6c = (void *)(fVar8 / (float)GHIDRA_INT(local_68)); if (((segment != (EntityPtr)0x0) && (*(int *)((char *)segment + 0x28) == 0x38d)) && (*(int *)((char *)segment + 0x2c) == 10)) { do { @@ -275,19 +275,19 @@ void Entity_Pickup::GetLootList(Vector *renderOffset) local_64 = points; } pointCursor = (float *)0x0; - uVar6 = (int)pointCursor - (int)local_64 >> 3; - if (0 < (int)uVar6) { + uVar6 = GHIDRA_INT(pointCursor) - GHIDRA_INT(local_64) >> 3; + if (0 < GHIDRA_INT(uVar6)) { pointCountRemainder = uVar6 & 0x80000003; isPointCountMultipleOf4 = pointCountRemainder == 0; - if ((int)pointCountRemainder < 0) { + if (GHIDRA_INT(pointCountRemainder) < 0) { isPointCountMultipleOf4 = (pointCountRemainder - 1 | 0xfffffffc) == 0xffffffff; } if (isPointCountMultipleOf4) { local_80 = layerFrame[1]; - pointCursor = (float *)((int)local_64 + 0x1c); + pointCursor = (float *)(GHIDRA_INT(local_64) + 0x1c); local_58 = (void *)((uVar6 - 1 >> 2) + 1); do { - local_dc._unk = CONCAT31(local_dc._unk._1_3_,1); + local_dc._unk = CONCAT31((*(undefined1 *)((char *)&(local_dc._unk) + 0x1)),1); if ((pickup->_sprite)._flipX == 0) { local_dc._red = *layerFrame; local_dc._blue = local_dc._red + layerFrame[2]; @@ -347,12 +347,12 @@ void Entity_Pickup::GetLootList(Vector *renderOffset) } else { render_quad_copy(posQuadsEnd,&quad); - posQuadsEnd = (void *)((int)posQuadsEnd + 0x70); + posQuadsEnd = (void *)(GHIDRA_INT(posQuadsEnd) + 0x70); } local_dc._blue = (float)g_graphicsManager_blendMode[2]; local_dc._red = (float)g_graphicsManager_blendMode[0]; pointCursor = pointCursor + 8; - local_58 = (void *)((int)local_58 + -1); + local_58 = (void *)(GHIDRA_INT(local_58) + -1); } while (local_58 != (void *)0x0); local_80 = (float)g_graphicsManager_blendMode[4]; iVar3 = 1; @@ -373,14 +373,14 @@ void Entity_Pickup::GetLootList(Vector *renderOffset) layer->_wrapTMode = 0; layer = ((ANM2 *)(sprite))->ANM2::GetLayer((byte *)0x0); ((LayerState *)(layer))->LayerState::GetTexture(&texture); - local_14 = (float)CONCAT31(local_14._1_3_,3); + local_14 = (float)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),3); if (texture != (Vector *)0x0) { shader = &g_shaders; if ((DAT_00c7911c & 1) == 0) { shader = g_currentShader; } local_f0 = 0.0; - local_9c = (float)(((int)pointCursor - (int)uvQuads) / 0x24); + local_9c = (float)((GHIDRA_INT(pointCursor) - GHIDRA_INT(uvQuads)) / 0x24); g_currentShader = shader; if (local_9c != 0.0) { local_58 = uvQuads; @@ -406,19 +406,19 @@ void Entity_Pickup::GetLootList(Vector *renderOffset) pvVar1 = local_58; pvVar5 = local_6c; (**(code **)((char *)texture->x + 0x14))(local_58); - local_6c = (void *)((int)pvVar5 + 0x70); - local_58 = (void *)((int)pvVar1 + 0x24); - local_9c = (float)((int)local_9c + -1); + local_6c = (void *)(GHIDRA_INT(pvVar5) + 0x70); + local_58 = (void *)(GHIDRA_INT(pvVar1) + 0x24); + local_9c = (float)(GHIDRA_INT(local_9c) + -1); } while (local_9c != 0.0); } } fVar8 = 7.54039e-42; - g_graphicsManager_blendMode[0] = (int)local_dc._red; + g_graphicsManager_blendMode[0] = GHIDRA_INT(local_dc._red); shaderNameCursor = "KAGE_ColorTextureShader"; - g_graphicsManager_blendMode[1] = (int)local_dc._green; - g_graphicsManager_blendMode[2] = (int)local_dc._blue; - g_graphicsManager_blendMode[3] = (int)local_dc._alpha; - g_graphicsManager_blendMode[4] = (int)local_80; + g_graphicsManager_blendMode[1] = GHIDRA_INT(local_dc._green); + g_graphicsManager_blendMode[2] = GHIDRA_INT(local_dc._blue); + g_graphicsManager_blendMode[3] = GHIDRA_INT(local_dc._alpha); + g_graphicsManager_blendMode[4] = GHIDRA_INT(local_80); shaderNameChar = 0x4b; do { shaderNameCursor = shaderNameCursor + 1; @@ -426,17 +426,17 @@ void Entity_Pickup::GetLootList(Vector *renderOffset) if (0x19 < (byte)(shaderNameChar + 0xbf)) { lowerChar = shaderNameChar; } - uVar6 = (uint)lowerChar; + uVar6 = GHIDRA_UINT(lowerChar); if (lowerChar == 0x5c) { uVar6 = 0x2f; } - fVar8 = (float)((int)fVar8 * 0x21 + uVar6); + fVar8 = (float)(GHIDRA_INT(fVar8) * 0x21 + uVar6); shaderNameChar = *shaderNameCursor; } while (shaderNameChar != 0); local_6c = (void *)fVar8; _Find_lower_bound<>(); if (((*(char *)((char *)local_f0 + 0xd) == '\0') && - ((uint)*(float *)((char *)local_f0 + 0x10) <= (uint)fVar8)) && (local_f0 != DAT_00c379bc)) + (GHIDRA_UINT(*(float *)((char *)local_f0 + 0x10)) <= GHIDRA_UINT(fVar8))) && (local_f0 != DAT_00c379bc)) { piVar4 = (int *)std::map::operator_index(); pvVar5 = (void *)*piVar4; @@ -444,40 +444,40 @@ void Entity_Pickup::GetLootList(Vector *renderOffset) g_currentShader = pvVar5; } } - local_14 = (float)CONCAT31(local_14._1_3_,4); + local_14 = (float)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),4); if (((local_78 != (int *)0x0) && (cVar2 = (**(code **)(*local_78 + 0xc))(), cVar2 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(); } if (posQuads != (void *)0x0) { - uVar6 = (((int)posQuadsCapCache - (int)posQuads) / 0x70) * 0x70; + uVar6 = ((GHIDRA_INT(posQuadsCapCache) - GHIDRA_INT(posQuads)) / 0x70) * 0x70; pvVar5 = posQuads; if (0xfff < uVar6) { pvVar5 = *(void **)((char *)posQuads + -4); uVar6 = uVar6 + 0x23; - if (0x1f < (uint)((int)posQuads + (-4 - (int)pvVar5))) goto LAB_00584103; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(posQuads) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_00584103; } operator_delete(pvVar5,uVar6); } if (uvQuads != (void *)0x0) { - uVar6 = (((int)uvQuadsCapCache - (int)uvQuads) / 0x24) * 0x24; + uVar6 = ((GHIDRA_INT(uvQuadsCapCache) - GHIDRA_INT(uvQuads)) / 0x24) * 0x24; pvVar5 = uvQuads; if (0xfff < uVar6) { pvVar5 = *(void **)((char *)uvQuads + -4); uVar6 = uVar6 + 0x23; - if (0x1f < (uint)((int)uvQuads + (-4 - (int)pvVar5))) goto LAB_00584103; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(uvQuads) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_00584103; } operator_delete(pvVar5,uVar6); } } } if (local_64 != (void *)0x0) { - uVar6 = (int)pointsCapCache - (int)local_64 & 0xfffffff8; + uVar6 = GHIDRA_INT(pointsCapCache) - GHIDRA_INT(local_64) & 0xfffffff8; pvVar5 = local_64; if (0xfff < uVar6) { pvVar5 = *(void **)((char *)local_64 + -4); uVar6 = uVar6 + 0x23; - if (0x1f < (uint)((int)local_64 + (-4 - (int)pvVar5))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_64) + (-4 - GHIDRA_INT(pvVar5))))) { LAB_00584103: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -547,7 +547,7 @@ void Entity_Pickup::Constructor() this->_megaChestCollectible[1] = (void *)0x0; this->_flipSaveState = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x5cc)) = 0; - local_8 = CONCAT31(local_8._1_3_,6); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),6); ((ANM2 *)(&this->_altPedestalANM2))->ANM2::constructor(); ExceptionList = local_10; return; @@ -595,7 +595,7 @@ byte Entity_Pickup::TryFlip(Entity_Player *unusedPlayer, uint unusedSeed) do { cycleItem = *(int *)(cycleOffset + *(int *)(*flipStateRef + 100)); if (cycleItem == 0) break; - if ((uint)this->_cycleCollectibleCount < 8) { + if (GHIDRA_UINT(this->_cycleCollectibleCount) < 8) { this->_cycleCollectibleList[this->_cycleCollectibleCount] = cycleItem; this->_cycleCollectibleCount = this->_cycleCollectibleCount + 1; } @@ -607,7 +607,7 @@ byte Entity_Pickup::TryFlip(Entity_Player *unusedPlayer, uint unusedSeed) } else { stateCopy = operator_new(0x78); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; if (stateCopy == (EntitySaveState *)0x0) { state = (void *)0x0; } @@ -615,7 +615,7 @@ byte Entity_Pickup::TryFlip(Entity_Player *unusedPlayer, uint unusedSeed) ((EntitySaveState *)(stateCopy))->EntitySaveState::copy(flippedState); state = extraout_EAX; } - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; } ((EntitySaveStateRef *)(flipStateRef))->EntitySaveStateRef::Set(state); ((ANM2 *)(&this->_altPedestalANM2))->ANM2::Reset(); @@ -643,7 +643,7 @@ void Entity_Pickup::UpdateLootPreview() local_8 = (void *)0xffffffff; puStack_c = &LAB_00afaf7d; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(loot + 10); + uVar1 = __security_cookie ^ GHIDRA_UINT((loot + 10)); ExceptionList = &local_10; player = PlayerManager::FirstCollectibleOwner (&g_game->_playerManager,0x299,(RNG **)&g_game->_playerManager,1); @@ -722,7 +722,7 @@ void Entity_Pickup::SetAlternatePedestal(int pedestalType) if (((*(char *)((char *)foundNode + 0xd) == '\0') && (*(uint *)((char *)foundNode + 0x10) < 0x518601)) && (foundNode != (manager->_entityConfig)._entities._head)) { - pickupConfig = (EntityConfig_Entity *)((int)foundNode + 0x18); + pickupConfig = (EntityConfig_Entity *)(GHIDRA_INT(foundNode) + 0x18); } else { pickupConfig = ((EntityConfig *)(&manager->_entityConfig))->EntityConfig::GetEntity(5,0,0); @@ -741,7 +741,7 @@ void Entity_Pickup::SetAlternatePedestal(int pedestalType) _Find_lower_bound<>(lowerBoundResult,&local_18); if (((*(char *)((char *)foundNode + 0xd) == '\0') && (*(uint *)((char *)foundNode + 0x10) < 0x503901)) && (foundNode != (manager->_entityConfig)._entities._head)) { - pickupConfig = (EntityConfig_Entity *)((int)foundNode + 0x18); + pickupConfig = (EntityConfig_Entity *)(GHIDRA_INT(foundNode) + 0x18); } else { pickupConfig = ((EntityConfig *)(&manager->_entityConfig))->EntityConfig::GetEntity(5,0,0); @@ -753,7 +753,7 @@ void Entity_Pickup::SetAlternatePedestal(int pedestalType) i = 0; local_18 = g_game->_room; if (local_18[0x499] != (void *)0x0) { - while ((((partnerPickup = *(Entity_Pickup **)((int)local_18[0x497] + i * 4), + while ((((partnerPickup = *(Entity_Pickup **)(GHIDRA_INT(local_18[0x497]) + i * 4), partnerPickup == this || (partnerPickup->_type != 5)) || ((partnerPickup->_variant != 100 || ((((partnerPedestalType = GetAlternatePedestal(partnerPickup), @@ -808,7 +808,7 @@ int Entity_Pickup::GetAlternatePedestal() bool isAlternates; bool isAnimNameOwned; - local_8 = (byte ****)(__security_cookie ^ (uint)(animName + 7)); + local_8 = (byte ****)(__security_cookie ^ GHIDRA_UINT((animName + 7))); isAnimNameOwned = false; if (this->_variant == 100) { other = (this->_sprite)._overlayAnimState._animData; @@ -845,7 +845,7 @@ LAB_006e1df5: if (0xfff < size) { pppppbVar1 = (byte *****)animNameHeap[-1]; size = capacity + 0x24; - if ((byte *)0x1f < (byte *)((int)animNameHeap + (-4 - (int)pppppbVar1))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(animNameHeap) + (-4 - GHIDRA_INT(pppppbVar1)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -853,7 +853,7 @@ LAB_006e1df5: operator_delete(pppppbVar1,size); } if (isAlternates) { - return (int)(this->_sprite)._overlayAnimState._animFrame; + return GHIDRA_INT((this->_sprite)._overlayAnimState._animFrame); } return -1; } @@ -892,35 +892,35 @@ void Entity_Pickup::UpdateSprite(byte isIgnoreBlind) undefined4 local_14; void *trinketConfigs; - ppcStack_20 = (char **)((int)&spritesheetPath + 0x38); + ppcStack_20 = (char **)(GHIDRA_INT(&spritesheetPath) + 0x38); local_14 = 0xffffffff; puStack_18 = &LAB_00afb00d; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)&spritesheetPath + 0x2cU; + local_24 = __security_cookie ^ GHIDRA_INT(&spritesheetPath) + 0x2cU; ExceptionList = &local_1c; iVar2 = this->_variant; if (iVar2 == 0x15e) { curses = this->_subtype & 0x7fff; trinketConfigs = (g_manager->_itemConfig)._trinkets._begin; - if ((int)curses < (int)(g_manager->_itemConfig)._trinkets._end - (int)trinketConfigs >> 2) { + if (GHIDRA_INT(curses) < GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(trinketConfigs) >> 2) { iVar2 = *(int *)((char *)trinketConfigs + curses * 4); } else { iVar2 = 0; } - ppcStack_20 = (char **)((int)&spritesheetPath + 0x38); + ppcStack_20 = (char **)(GHIDRA_INT(&spritesheetPath) + 0x38); ((std::string *)(spritesheetPath._buf))->std::string::string((void *)(iVar2 + 0x38)); local_14 = 0; ((Sprite *)((Sprite *)&this->_sprite))->Sprite::ReplaceSpritesheet(0,&spritesheetPath); - (this->_sprite)._bitflags = (uint)this->_subtype >> 8 & 0x80; + (this->_sprite)._bitflags = GHIDRA_UINT(this->_subtype) >> 8 & 0x80; iVar2 = extraout_ECX; } else { if (iVar2 == 100) { - ppcStack_20 = (char **)((int)&spritesheetPath + 0x38); + ppcStack_20 = (char **)(GHIDRA_INT(&spritesheetPath) + 0x38); if (((isIgnoreBlind == 0) && - (ppcStack_20 = (char **)((int)&spritesheetPath + 0x38), g_game->_currentDimensionIdx != 2) - ) && ((ppcStack_20 = (char **)((int)&spritesheetPath + 0x38), + (ppcStack_20 = (char **)(GHIDRA_INT(&spritesheetPath) + 0x38), g_game->_currentDimensionIdx != 2) + ) && ((ppcStack_20 = (char **)(GHIDRA_INT(&spritesheetPath) + 0x38), curses = ((Level *)((Level *)g_game))->Level::GetCurses(), (curses & 0x40) != 0 || (this->_isForceBlind != 0)))) { isBlind = 1; @@ -934,46 +934,46 @@ void Entity_Pickup::UpdateSprite(byte isIgnoreBlind) goto switchD_006e23e9_caseD_1; } if ((iVar2 == 0x17c) && (*(int *)((char *)g_game->_room + 8) == 0x13)) { - ppcStack_20 = (char **)((int)&spritesheetPath + 0x38); - spritesheetPath._buf._0_4_ = std::_Allocate(0x30); + ppcStack_20 = (char **)(GHIDRA_INT(&spritesheetPath) + 0x38); + (*(undefined4 *)((char *)&(spritesheetPath._buf) + 0x0)) = std::_Allocate(0x30); spritesheetPath._size = 0x26; spritesheetPath._capacity = 0x2f; - builtin_strncpy((char *)spritesheetPath._buf._0_4_,"gfx/Items/Pick Ups/IsaacBed_Barren.png", + builtin_strncpy((*(undefined4 *)((char *)&((char *)spritesheetPath._buf) + 0x0)),"gfx/Items/Pick Ups/IsaacBed_Barren.png", 0x27); local_14 = 1; goto LAB_006e23b6; } - ppcVar1 = (char **)((int)&spritesheetPath + 0x38); + ppcVar1 = (char **)(GHIDRA_INT(&spritesheetPath) + 0x38); if (this->_isPayToPlay == 0) goto switchD_006e23e9_caseD_1; iVar2 = iVar2 + -0x35; - ppcVar1 = (char **)((int)&spritesheetPath + 0x38); + ppcVar1 = (char **)(GHIDRA_INT(&spritesheetPath) + 0x38); switch(iVar2) { case 0: case 7: - ppcStack_20 = (char **)((int)&spritesheetPath + 0x38); - spritesheetPath._buf._0_4_ = std::_Allocate(0x40); + ppcStack_20 = (char **)(GHIDRA_INT(&spritesheetPath) + 0x38); + (*(undefined4 *)((char *)&(spritesheetPath._buf) + 0x0)) = std::_Allocate(0x40); spritesheetPath._size = 0x31; spritesheetPath._capacity = 0x3f; - builtin_strncpy((char *)spritesheetPath._buf._0_4_, + builtin_strncpy((*(undefined4 *)((char *)&((char *)spritesheetPath._buf) + 0x0)), "gfx/Items/Pick Ups/Pickup_005_Chests_coinslot.png",0x32); local_14 = 2; break; default: goto switchD_006e23e9_caseD_1; case 2: - ppcStack_20 = (char **)((int)&spritesheetPath + 0x38); - spritesheetPath._buf._0_4_ = std::_Allocate(0x30); + ppcStack_20 = (char **)(GHIDRA_INT(&spritesheetPath) + 0x38); + (*(undefined4 *)((char *)&(spritesheetPath._buf) + 0x0)) = std::_Allocate(0x30); spritesheetPath._size = 0x2b; spritesheetPath._capacity = 0x2f; - builtin_strncpy((char *)spritesheetPath._buf._0_4_, + builtin_strncpy((*(undefined4 *)((char *)&((char *)spritesheetPath._buf) + 0x0)), "gfx/Items/Pick Ups/dirty_chest_coinslot.png",0x2c); local_14 = 3; break; case 4: - spritesheetPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(spritesheetPath._buf) + 0x0)) = std::_Allocate(0x30); spritesheetPath._size = 0x2a; spritesheetPath._capacity = 0x2f; - builtin_strncpy((char *)spritesheetPath._buf._0_4_, + builtin_strncpy((*(undefined4 *)((char *)&((char *)spritesheetPath._buf) + 0x0)), "gfx/Items/Pick Ups/mega_chest_coinslot.png",0x2b); local_14 = 4; ((Sprite *)((Sprite *)&this->_sprite))->Sprite::ReplaceSpritesheet(0,&spritesheetPath); @@ -982,10 +982,10 @@ void Entity_Pickup::UpdateSprite(byte isIgnoreBlind) ppcVar1 = ppcStack_20; if (spritesheetPath._capacity < 0x10) goto switchD_006e23e9_caseD_1; curses = spritesheetPath._capacity + 1; - ptr = (char *)spritesheetPath._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((char *)spritesheetPath._buf) + 0x0)); if (0xfff < curses) { - ptr = *(char **)(spritesheetPath._buf._0_4_ + -4); - iVar2 = spritesheetPath._buf._0_4_ - (int)ptr; + ptr = *(char **)((*(undefined4 *)((char *)&(spritesheetPath._buf) + 0x0)) + -4); + iVar2 = (*(undefined4 *)((char *)&(spritesheetPath._buf) + 0x0)) - GHIDRA_INT(ptr); goto joined_r0x006e253b; } goto LAB_006e22cc; @@ -998,10 +998,10 @@ LAB_006e23b6: ppcVar1 = ppcStack_20; if (0xf < spritesheetPath._capacity) { curses = spritesheetPath._capacity + 1; - ptr = (char *)spritesheetPath._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((char *)spritesheetPath._buf) + 0x0)); if (0xfff < curses) { - ptr = *(char **)(spritesheetPath._buf._0_4_ + -4); - iVar2 = spritesheetPath._buf._0_4_ - (int)ptr; + ptr = *(char **)((*(undefined4 *)((char *)&(spritesheetPath._buf) + 0x0)) + -4); + iVar2 = (*(undefined4 *)((char *)&(spritesheetPath._buf) + 0x0)) - GHIDRA_INT(ptr); joined_r0x006e253b: curses = spritesheetPath._capacity + 0x24; if (0x1f < iVar2 - 4U) { @@ -1058,7 +1058,7 @@ void Entity_Pickup::update_price_sprite(int price) local_8 = 0xffffffff; puStack_c = &LAB_00afb057; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(local_1c + 0x18); + uVar2 = __security_cookie ^ GHIDRA_UINT((local_1c + 0x18)); ExceptionList = &local_10; item = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(this->_subtype); pGVar5 = (GridEntity *)this->_price; @@ -1090,7 +1090,7 @@ void Entity_Pickup::update_price_sprite(int price) if (((*(char *)((char *)configNode + 0xd) == '\0') && (*(uint *)((char *)configNode + 0x10) < 0x509601)) && (configNode != (manager->_entityConfig)._entities._head)) { - priceConfig = (EntityConfig_Entity *)((int)configNode + 0x18); + priceConfig = (EntityConfig_Entity *)(GHIDRA_INT(configNode) + 0x18); } else { priceConfig = ((EntityConfig *)(&manager->_entityConfig))->EntityConfig::GetEntity(5,0,0); @@ -1177,14 +1177,14 @@ void Entity_Pickup::update_price_sprite(int price) (EntityPtr) ((Game *)(g_game))->Game::SpawnEx(1000,0xae,&this->_pos,&g_vectorZero,(Entity *)this,0,uVar3,0); if (*(EntityPtr *)((char *)paymentEffect + 0x3bc) != (EntityPtr)0x0) { - price = (int)((int)paymentEffect + 0x3bc); + price = GHIDRA_INT((GHIDRA_INT(paymentEffect) + 0x3bc)); std::multiset::erase(&price); } *(EntityPtr *)((char *)paymentEffect + 0x3bc) = (EntityPtr)this; - std::multiset::insert((EntityPtr *)((int)paymentEffect + 0x3bc)); + std::multiset::insert((EntityPtr *)(GHIDRA_INT(paymentEffect) + 0x3bc)); (**(code **)(*(int *)paymentEffect + 0xc))(); if (*childSlot != (EntityPtr)0x0) { - price = (int)childSlot; + price = GHIDRA_INT(childSlot); std::multiset::erase(&price); } *childSlot = paymentEffect; @@ -1221,41 +1221,41 @@ void Entity_Pickup::update_price_sprite(int price) else { price = iVar4 / 10; if (((this->_priceANM2)._animState._animData != (void *)0x0) && - ((0 < *(int *)((int)(this->_priceANM2)._animState._animation + 0x80) || + ((0 < *(int *)(GHIDRA_INT((this->_priceANM2)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 0 < *(int *)((int)(this->_priceANM2)._animState._animation + 0x80))))) { + 0 < *(int *)(GHIDRA_INT((this->_priceANM2)._animState._animation) + 0x80))))) { pvVar6 = (this->_priceANM2)._animState._animData; iVar4 = *(int *)((char *)pvVar6 + 0x38); if ((pvVar6 == (void *)0x0) || ((iVar4 < 0 || (*(int *)((char *)pvVar6 + 0x1c) <= iVar4)))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(this->_priceANM2)._animState._layerFrames + iVar4 * 4) = 0; + *(undefined4 *)(GHIDRA_INT((this->_priceANM2)._animState._layerFrames) + iVar4 * 4) = 0; ((AnimationState *)(&(this->_priceANM2)._animState))->AnimationState::AdvanceLayerPosition(iVar4,(float)price); } } price = this->_price % 10; if ((this->_priceANM2)._animState._animData != (void *)0x0) { - if ((1 < *(int *)((int)(this->_priceANM2)._animState._animation + 0x80)) || + if ((1 < *(int *)(GHIDRA_INT((this->_priceANM2)._animState._animation) + 0x80)) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 1 < *(int *)((int)(this->_priceANM2)._animState._animation + 0x80))) { + 1 < *(int *)(GHIDRA_INT((this->_priceANM2)._animState._animation) + 0x80))) { pvVar6 = (this->_priceANM2)._animState._animData; iVar4 = *(int *)((char *)pvVar6 + 0x3c); if ((pvVar6 == (void *)0x0) || ((iVar4 < 0 || (*(int *)((char *)pvVar6 + 0x1c) <= iVar4)))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(this->_priceANM2)._animState._layerFrames + iVar4 * 4) = 0; + *(undefined4 *)(GHIDRA_INT((this->_priceANM2)._animState._layerFrames) + iVar4 * 4) = 0; ((AnimationState *)(&(this->_priceANM2)._animState))->AnimationState::AdvanceLayerPosition(iVar4,(float)price); } if (((this->_priceANM2)._animState._animData != (void *)0x0) && - ((2 < *(int *)((int)(this->_priceANM2)._animState._animation + 0x80) || + ((2 < *(int *)(GHIDRA_INT((this->_priceANM2)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 2 < *(int *)((int)(this->_priceANM2)._animState._animation + 0x80))))) { + 2 < *(int *)(GHIDRA_INT((this->_priceANM2)._animState._animation) + 0x80))))) { pvVar6 = (this->_priceANM2)._animState._animData; iVar4 = *(int *)((char *)pvVar6 + 0x40); if ((pvVar6 == (void *)0x0) || ((iVar4 < 0 || (*(int *)((char *)pvVar6 + 0x1c) <= iVar4)))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(this->_priceANM2)._animState._layerFrames + iVar4 * 4) = 0; + *(undefined4 *)(GHIDRA_INT((this->_priceANM2)._animState._layerFrames) + iVar4 * 4) = 0; ((AnimationState *)(&(this->_priceANM2)._animState))->AnimationState::AdvanceLayerPosition(iVar4,10.0); } } @@ -1291,8 +1291,8 @@ LAB_006e2c1a: seed_fart_sound_override(&price); ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(price,1.0,2,0,1.0,0.0); pvVar6 = g_game->_room; - iVar7 = (int)(((this->_pos).x - 40.0) / 40.0 + 0.5); - iVar4 = (int)(((this->_pos).y - 120.0) / 40.0 + 0.5); + iVar7 = GHIDRA_INT((((this->_pos).x - 40.0) / 40.0 + 0.5)); + iVar4 = GHIDRA_INT((((this->_pos).y - 120.0) / 40.0 + 0.5)); if ((((iVar7 < 0) || (gridWidth = *(int *)((char *)pvVar6 + 0xc), gridWidth <= iVar7)) || (iVar4 < 0)) || (*(int *)((char *)pvVar6 + 0x10) <= iVar4)) { gridWidth = *(int *)((char *)pvVar6 + 0xc); @@ -1301,7 +1301,7 @@ LAB_006e2c1a: else { iVar7 = iVar4 * gridWidth + iVar7; } - if ((uint)(iVar7 + gridWidth) < 0x1c0) { + if (GHIDRA_UINT((iVar7 + gridWidth)) < 0x1c0) { belowGrid = *(undefined4 *)((char *)pvVar6 + (iVar7 + gridWidth) * 4 + 0x24); } else { @@ -1319,8 +1319,8 @@ LAB_006e2c1a: else { if (this->_price == -10) { pvVar6 = g_game->_room; - iVar7 = (int)(((this->_pos).x - 40.0) / 40.0 + 0.5); - iVar4 = (int)(((this->_pos).y - 120.0) / 40.0 + 0.5); + iVar7 = GHIDRA_INT((((this->_pos).x - 40.0) / 40.0 + 0.5)); + iVar4 = GHIDRA_INT((((this->_pos).y - 120.0) / 40.0 + 0.5)); if ((((iVar7 < 0) || (gridWidth = *(int *)((char *)pvVar6 + 0xc), gridWidth <= iVar7)) || (iVar4 < 0)) || (*(int *)((char *)pvVar6 + 0x10) <= iVar4)) { gridWidth = *(int *)((char *)pvVar6 + 0xc); @@ -1358,7 +1358,7 @@ LAB_006e2c1a: } pvVar6 = g_game->_room; price = Random(); - if (((int)uVar2 < 0) || (0x1bf < (int)uVar2)) { + if ((GHIDRA_INT(uVar2) < 0) || (0x1bf < GHIDRA_INT(uVar2))) { KAGE_LogMessage(0x10,(byte *)"SpawnGridEntity: Grid index invalid\n"); } if (0x1bf < uVar2) { @@ -1449,7 +1449,7 @@ void Entity_Pickup::AppearFast() isNameLess = nameChar < (byte)*appearNameCursor; if (nameChar != *appearNameCursor) { LAB_006e3070: - nameCompare = -(uint)isNameLess | 1; + nameCompare = -GHIDRA_UINT(isNameLess) | 1; goto LAB_006e3075; } if (nameChar == 0) break; @@ -1582,7 +1582,7 @@ void Entity_Pickup::Update() local_14 = 0xffffffff; puStack_18 = &LAB_00afb109; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(local_34 + 0x24); + local_24 = __security_cookie ^ GHIDRA_UINT((local_34 + 0x24)); ppvVar2 = &local_1c; if (0 < this->_dropDelay) { if (this->_entityCollisionClass == 0) { @@ -1631,11 +1631,11 @@ void Entity_Pickup::Update() puVar14 = puStack_20; if (0.0 <= *(float *)&(*(undefined1 *)((char *)(this) + 0x6e4))) { flags = this->_flags; - puVar1 = (uint *)((int)&this->_flags + 4); + puVar1 = (uint *)(GHIDRA_INT(&this->_flags) + 4); *puVar1 = *puVar1 & 0xfbffffff; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x6e4)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x6e8)) = 0; - *(int *)&this->_flags = (int)flags; + *(int *)&this->_flags = GHIDRA_INT(flags); this->_entityCollisionClass = 4; this->_entityGridCollisionClass = 5; bVar3 = IsChest(this->_variant); @@ -1670,9 +1670,9 @@ void Entity_Pickup::Update() uVar6 = Random(); pVVar9 = &this->_pos; in_stack_fffffec4 = (PlayerManager *)0x0; - in_stack_fffffec0._0_1_ = 0; - in_stack_fffffec0._1_1_ = 0; - in_stack_fffffec0._2_2_ = 0; + (*(undefined1 *)((char *)&(in_stack_fffffec0) + 0x0)) = 0; + (*(undefined1 *)((char *)&(in_stack_fffffec0) + 0x1)) = 0; + (*(undefined2 *)((char *)&(in_stack_fffffec0) + 0x2)) = 0; in_stack_fffffebc = &g_vectorZero; in_stack_fffffeb4 = (EntityPtr)0xf; in_stack_fffffeb0 = 1.4013e-42; @@ -1680,44 +1680,44 @@ void Entity_Pickup::Update() in_stack_fffffeb8 = pVVar9; pEVar7 = ((Game *)(g_game))->Game::Spawn(1000,0xf,pVVar9,&g_vectorZero,(Entity *)0x0,0,uVar6); pEVar7->Update(); - flagsHigh = *(undefined4 *)((int)&this->_flags + 4); - *(uint *)&this->_flags = (uint)this->_flags & 0xfffffffb; - *(undefined4 *)((int)&this->_flags + 4) = flagsHigh; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); + *(uint *)&this->_flags = GHIDRA_UINT(this->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = flagsHigh; iVar23 = 0x6e3bf1; iVar5 = PlayerManager::GetGFuelCount(); if (1 < iVar5) { uVar6 = Random(); in_stack_fffffeac = 1.0123468e-38; local_cc = ((Game *)(g_game))->Game::Spawn(1000,0xf,pVVar9,&g_vectorZero,(Entity *)0x0,0,uVar6); - local_4c._8_4_ = 0.0; + (*(undefined4 *)((char *)&(local_4c) + 0x8)) = 0.0; explosionSprite = &local_cc->_sprite; local_40 = (Entity *)0xf; - local_68._20_4_ = 0.0; + (*(undefined4 *)((char *)&(local_68) + 0x14)) = 0.0; local_d0 = (Room *)explosionSprite; - local_68._20_4_ = std::_Allocate(0x30); - local_4c._8_4_ = &DAT_00000027; + (*(undefined4 *)((char *)&(local_68) + 0x14)) = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(local_4c) + 0x8)) = &DAT_00000027; local_40 = (Entity *)&DAT_0000002f; - builtin_strncpy((char *)local_68._20_4_,"gfx/promo/gfuel/effects/explosion4.anm2",0x28); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_68) + 0x14)),"gfx/promo/gfuel/effects/explosion4.anm2",0x28); local_14 = 0; ((ANM2 *)(explosionSprite))->ANM2::Load((std_string *)(local_68 + 0x14),1); local_14 = 0xffffffff; if ((Entity *)&DAT_0000000f < local_40) { piVar13 = (int *)&(*(undefined1 *)((char *)(local_40) + 0x1)); - pcVar12 = (char *)local_68._20_4_; + pcVar12 = (*(undefined4 *)((char *)&((char *)local_68) + 0x14)); if ((undefined1 *)0xfff < piVar13) { - pcVar12 = *(char **)(local_68._20_4_ + -4); + pcVar12 = *(char **)((*(undefined4 *)((char *)&(local_68) + 0x14)) + -4); piVar13 = &local_40->_collisionIndex; - if ((char *)0x1f < (char *)(local_68._20_4_ + (-4 - (int)pcVar12))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_68) + 0x14)) + (-4 - GHIDRA_INT(pcVar12)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(pcVar12,(uint)piVar13); + operator_delete(pcVar12,GHIDRA_UINT(piVar13)); } uVar6 = Random(); manager = g_manager; local_e8._shift3 = 0x33d; - local_c8.y = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + local_c8.y = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 0.9; seed_fart_sound_override(&local_e8._shift3); in_stack_fffffebc = (Vector *)0x2; @@ -1733,9 +1733,9 @@ void Entity_Pickup::Update() if (0xf < (local_cc->_sprite)._animDefaultName._capacity) { in_stack_fffffec4 = *(PlayerManager **)((std_string *)in_stack_fffffec4)->_buf; } - in_stack_fffffec0._0_1_ = 0xab; - in_stack_fffffec0._1_1_ = 0x3d; - in_stack_fffffec0._2_2_ = 0x6e; + (*(undefined1 *)((char *)&(in_stack_fffffec0) + 0x0)) = 0xab; + (*(undefined1 *)((char *)&(in_stack_fffffec0) + 0x1)) = 0x3d; + (*(undefined2 *)((char *)&(in_stack_fffffec0) + 0x2)) = 0x6e; bVar3 = ((ANM2 *)(&local_cc->_sprite))->ANM2::SetAnimation((byte *)in_stack_fffffec4,1); pRVar20 = local_d0; if (bVar3 != 0) { @@ -1758,9 +1758,9 @@ LAB_006e3e26: else { iVar23 = 1; in_stack_fffffec4 = &g_game->_playerManager; - in_stack_fffffec0._0_1_ = 199; - in_stack_fffffec0._1_1_ = 2; - in_stack_fffffec0._2_2_ = 0; + (*(undefined1 *)((char *)&(in_stack_fffffec0) + 0x0)) = 199; + (*(undefined1 *)((char *)&(in_stack_fffffec0) + 0x1)) = 2; + (*(undefined2 *)((char *)&(in_stack_fffffec0) + 0x2)) = 0; in_stack_fffffebc = (Vector *)0x6e3e1e; player = PlayerManager::FirstCollectibleOwner (in_stack_fffffec4,0x2c7,(RNG **)in_stack_fffffec4,1); @@ -1772,7 +1772,7 @@ LAB_006e3e26: ((ANM2 *)(&this->_altPedestalANM2))->ANM2::Reset(); } else { - ((ANM2 *)((ANM2 *)((int)register0x00000010 + -0x248)))->ANM2::ANM2(&this->_sprite); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(register0x00000010) + -0x248)))->ANM2::ANM2(&this->_sprite); other._championColor._offset[0] = in_stack_fffffeac; other._filename._buf[0] = in_stack_fffffdb8[0]; other._filename._buf[1] = in_stack_fffffdb8[1]; @@ -1790,8 +1790,8 @@ LAB_006e3e26: other._filename._buf[0xd] = in_stack_fffffdb8[0xd]; other._filename._buf[0xe] = in_stack_fffffdb8[0xe]; other._filename._buf[0xf] = in_stack_fffffdb8[0xf]; - other._filename._size = in_stack_fffffdb8._16_4_; - other._filename._capacity = in_stack_fffffdb8._20_4_; + other._filename._size = (*(undefined4 *)((char *)&(in_stack_fffffdb8) + 0x10)); + other._filename._capacity = (*(undefined4 *)((char *)&(in_stack_fffffdb8) + 0x14)); other._animDefaultName._buf[0] = in_stack_fffffdb8[0x18]; other._animDefaultName._buf[1] = in_stack_fffffdb8[0x19]; other._animDefaultName._buf[2] = in_stack_fffffdb8[0x1a]; @@ -1808,68 +1808,68 @@ LAB_006e3e26: other._animDefaultName._buf[0xd] = in_stack_fffffdb8[0x25]; other._animDefaultName._buf[0xe] = in_stack_fffffdb8[0x26]; other._animDefaultName._buf[0xf] = in_stack_fffffdb8[0x27]; - other._animDefaultName._size = in_stack_fffffdb8._40_4_; - other._animDefaultName._capacity = in_stack_fffffdb8._44_4_; - other._animState._animation = (void *)in_stack_fffffdb8._48_4_; - other._animState._animData = (void *)in_stack_fffffdb8._52_4_; - other._animState._layerFrames = (void *)in_stack_fffffdb8._56_4_; - other._animState._nullLayerFrames = (void *)in_stack_fffffdb8._60_4_; - other._animState._animFrame = (float)in_stack_fffffdb8._64_4_; + other._animDefaultName._size = (*(undefined4 *)((char *)&(in_stack_fffffdb8) + 0x28)); + other._animDefaultName._capacity = (*(undefined4 *)((char *)&(in_stack_fffffdb8) + 0x2c)); + other._animState._animation = (*(undefined4 *)((char *)&((void *)in_stack_fffffdb8) + 0x30)); + other._animState._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffdb8) + 0x34)); + other._animState._layerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffdb8) + 0x38)); + other._animState._nullLayerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffdb8) + 0x3c)); + other._animState._animFrame = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0x40)); other._animState._isPlaying = in_stack_fffffdb8[0x44]; - other._animState._21_3_ = in_stack_fffffdb8._69_3_; - other._animState._currentlyTriggeredEvents = in_stack_fffffdb8._72_4_; - other._animState._previouslyTriggeredEvents = in_stack_fffffdb8._76_4_; - other._overlayAnimState._animation = (void *)in_stack_fffffdb8._80_4_; - other._overlayAnimState._animData = (void *)in_stack_fffffdb8._84_4_; - other._overlayAnimState._layerFrames = (void *)in_stack_fffffdb8._88_4_; - other._overlayAnimState._nullLayerFrames = (void *)in_stack_fffffdb8._92_4_; - other._overlayAnimState._animFrame = (float)in_stack_fffffdb8._96_4_; + (*(undefined1 *)((char *)&(other._animState) + 0x15)) = (*(undefined1 *)((char *)&(in_stack_fffffdb8) + 0x45)); + other._animState._currentlyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffdb8) + 0x48)); + other._animState._previouslyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffdb8) + 0x4c)); + other._overlayAnimState._animation = (*(undefined4 *)((char *)&((void *)in_stack_fffffdb8) + 0x50)); + other._overlayAnimState._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffdb8) + 0x54)); + other._overlayAnimState._layerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffdb8) + 0x58)); + other._overlayAnimState._nullLayerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffdb8) + 0x5c)); + other._overlayAnimState._animFrame = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0x60)); other._overlayAnimState._isPlaying = in_stack_fffffdb8[100]; - other._overlayAnimState._21_3_ = in_stack_fffffdb8._101_3_; - other._overlayAnimState._currentlyTriggeredEvents = in_stack_fffffdb8._104_4_; - other._overlayAnimState._previouslyTriggeredEvents = in_stack_fffffdb8._108_4_; + (*(undefined1 *)((char *)&(other._overlayAnimState) + 0x15)) = (*(undefined1 *)((char *)&(in_stack_fffffdb8) + 0x65)); + other._overlayAnimState._currentlyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffdb8) + 0x68)); + other._overlayAnimState._previouslyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffdb8) + 0x6c)); other._overlayRenderFirst = in_stack_fffffdb8[0x70]; - other._113_3_ = in_stack_fffffdb8._113_3_; - other._animData = (void *)in_stack_fffffdb8._116_4_; - other._animCount = in_stack_fffffdb8._120_4_; - other._layerState = (void *)in_stack_fffffdb8._124_4_; - other._layerCount = in_stack_fffffdb8._128_4_; - other._nullLayerNames = (void *)in_stack_fffffdb8._132_4_; - other._numNullLayers = in_stack_fffffdb8._136_4_; - other._eventNames = (void *)in_stack_fffffdb8._140_4_; - other._numEvents = in_stack_fffffdb8._144_4_; - other._offset.x = (float)in_stack_fffffdb8._148_4_; - other._offset.y = (float)in_stack_fffffdb8._152_4_; - other._scale.x = (float)in_stack_fffffdb8._156_4_; - other._scale.y = (float)in_stack_fffffdb8._160_4_; - other._rotation = (float)in_stack_fffffdb8._164_4_; - other._color._tint[0] = (float)in_stack_fffffdb8._168_4_; - other._color._tint[1] = (float)in_stack_fffffdb8._172_4_; - other._color._tint[2] = (float)in_stack_fffffdb8._176_4_; - other._color._tint[3] = (float)in_stack_fffffdb8._180_4_; - other._color._colorize[0] = (float)in_stack_fffffdb8._184_4_; - other._color._colorize[1] = (float)in_stack_fffffdb8._188_4_; - other._color._colorize[2] = (float)in_stack_fffffdb8._192_4_; - other._color._colorize[3] = (float)in_stack_fffffdb8._196_4_; - other._color._offset[0] = (float)in_stack_fffffdb8._200_4_; - other._color._offset[1] = (float)in_stack_fffffdb8._204_4_; - other._color._offset[2] = (float)in_stack_fffffdb8._208_4_; - other._championColor._tint[0] = (float)in_stack_fffffdb8._212_4_; - other._championColor._tint[1] = (float)in_stack_fffffdb8._216_4_; - other._championColor._tint[2] = (float)in_stack_fffffdb8._220_4_; - other._championColor._tint[3] = (float)in_stack_fffffdb8._224_4_; - other._championColor._colorize[0] = (float)in_stack_fffffdb8._228_4_; - other._championColor._colorize[1] = (float)in_stack_fffffdb8._232_4_; - other._championColor._colorize[2] = (float)in_stack_fffffdb8._236_4_; - other._championColor._colorize[3] = (float)in_stack_fffffdb8._240_4_; + (*(undefined1 *)((char *)&(other) + 0x71)) = (*(undefined1 *)((char *)&(in_stack_fffffdb8) + 0x71)); + other._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffdb8) + 0x74)); + other._animCount = (*(undefined4 *)((char *)&(in_stack_fffffdb8) + 0x78)); + other._layerState = (*(undefined4 *)((char *)&((void *)in_stack_fffffdb8) + 0x7c)); + other._layerCount = (*(undefined4 *)((char *)&(in_stack_fffffdb8) + 0x80)); + other._nullLayerNames = (*(undefined4 *)((char *)&((void *)in_stack_fffffdb8) + 0x84)); + other._numNullLayers = (*(undefined4 *)((char *)&(in_stack_fffffdb8) + 0x88)); + other._eventNames = (*(undefined4 *)((char *)&((void *)in_stack_fffffdb8) + 0x8c)); + other._numEvents = (*(undefined4 *)((char *)&(in_stack_fffffdb8) + 0x90)); + other._offset.x = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0x94)); + other._offset.y = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0x98)); + other._scale.x = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0x9c)); + other._scale.y = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xa0)); + other._rotation = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xa4)); + other._color._tint[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xa8)); + other._color._tint[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xac)); + other._color._tint[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xb0)); + other._color._tint[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xb4)); + other._color._colorize[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xb8)); + other._color._colorize[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xbc)); + other._color._colorize[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xc0)); + other._color._colorize[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xc4)); + other._color._offset[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xc8)); + other._color._offset[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xcc)); + other._color._offset[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xd0)); + other._championColor._tint[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xd4)); + other._championColor._tint[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xd8)); + other._championColor._tint[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xdc)); + other._championColor._tint[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xe0)); + other._championColor._colorize[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xe4)); + other._championColor._colorize[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xe8)); + other._championColor._colorize[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xec)); + other._championColor._colorize[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffdb8) + 0xf0)); other._championColor._offset[1] = in_stack_fffffeb0; other._championColor._offset[2] = (float)in_stack_fffffeb4; - other._256_4_ = in_stack_fffffeb8; + (*(undefined4 *)((char *)&(other) + 0x100)) = in_stack_fffffeb8; other._playbackSpeed = (float)in_stack_fffffebc; - other._264_1_ = (char)in_stack_fffffec0; + (*(undefined1 *)((char *)&(other) + 0x108)) = (char)in_stack_fffffec0; other._loaded = SUB41(in_stack_fffffec0,1); - other._266_2_ = SUB42(in_stack_fffffec0,2); - other._shadowLayerIndex = (int)in_stack_fffffec4; + (*(undefined2 *)((char *)&(other) + 0x10a)) = SUB42(in_stack_fffffec0,2); + other._shadowLayerIndex = GHIDRA_INT(in_stack_fffffec4); other._bitflags = iVar23; ((ANM2 *)(&this->_altPedestalANM2))->ANM2::operator_assign(other); if ((g_game->_currentDimensionIdx == 2) || @@ -1897,20 +1897,20 @@ LAB_006e3e26: local_14 = 0xffffffff; if (&DAT_0000000f < animNameCapacity) { puVar14 = animNameCapacity + 1; - pvVar11 = (void *)local_bc._16_4_; + pvVar11 = (*(undefined4 *)((char *)&((void *)local_bc) + 0x10)); if ((undefined1 *)0xfff < puVar14) { - pvVar11 = *(void **)(local_bc._16_4_ + -4); + pvVar11 = *(void **)((*(undefined4 *)((char *)&(local_bc) + 0x10)) + -4); puVar14 = animNameCapacity + 0x24; - if (0x1f < (uint)(local_bc._16_4_ + (-4 - (int)pvVar11))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_bc) + 0x10)) + (-4 - GHIDRA_INT(pvVar11))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(pvVar11,(uint)puVar14); + operator_delete(pvVar11,GHIDRA_UINT(puVar14)); } animNameSize = 0; animNameCapacity = &DAT_0000000f; - local_bc._16_4_ = local_bc._16_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(local_bc) + 0x10)) = (*(undefined4 *)((char *)&(local_bc) + 0x10)) & 0xffffff00; } } if ((this->_altPedestalANM2)._loaded != 0) { @@ -1922,14 +1922,14 @@ LAB_006e3e26: local_cc = (Entity *)0x0; local_d0 = (Room *)0x0; pEVar7 = (Entity *)0x0; - local_4c._4_4_ = (Room *)0x0; - local_4c._8_4_ = (Entity *)0x0; + (*(undefined4 *)((char *)&(local_4c) + 0x4)) = (Room *)0x0; + (*(undefined4 *)((char *)&(local_4c) + 0x8)) = (Entity *)0x0; local_f4.y = 0.0; local_40 = (Entity *)0x0; local_14 = 2; local_e8._shift3 = 0; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { eligibleCapEnd = (Entity *)0x0; do { local_c8.y = (float)((Game *)(g_game))->Game::GetPlayer(local_e8._shift3); @@ -1940,31 +1940,31 @@ LAB_006e3e26: } if (pEVar7 == eligibleCapEnd) { std::vector::_Emplace_reallocate(); - pEVar7 = (Entity *)local_4c._8_4_; + pEVar7 = (*(undefined4 *)((char *)&((Entity *)local_4c) + 0x8)); eligibleCapEnd = local_40; } else { *(float *)pEVar7 = local_c8.y; - local_4c._8_4_ = &(*(undefined1 *)((char *)(pEVar7) + 0x4)); - pEVar7 = (Entity *)local_4c._8_4_; + (*(undefined4 *)((char *)&(local_4c) + 0x8)) = &(*(undefined1 *)((char *)(pEVar7) + 0x4)); + pEVar7 = (*(undefined4 *)((char *)&((Entity *)local_4c) + 0x8)); } } LAB_006e4032: local_e8._shift3 = local_e8._shift3 + 1; - } while ((uint)local_e8._shift3 < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (GHIDRA_UINT(local_e8._shift3) < + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); this = local_f8; local_f4.y = (float)eligibleCapEnd; } - pEVar7 = (Entity *)((int)pEVar7 - local_4c._4_4_ >> 2); - local_d0 = (Room *)local_4c._4_4_; + pEVar7 = (Entity *)(GHIDRA_INT(pEVar7) - (*(undefined4 *)((char *)&(local_4c) + 0x4)) >> 2); + local_d0 = (*(undefined4 *)((char *)&((Room *)local_4c) + 0x4)); if ((pEVar7 == local_cc) && (this->_subtype != 7)) { - local_34._0_4_ = this->_initSeed; - local_34._4_4_ = 3; - local_34._8_4_ = 3; + (*(undefined4 *)((char *)&(local_34) + 0x0)) = this->_initSeed; + (*(undefined4 *)((char *)&(local_34) + 0x4)) = 3; + (*(undefined4 *)((char *)&(local_34) + 0x8)) = 3; local_28 = 3.64338e-44; - uVar6 = ((RNG *)((RNG *)local_34))->RNG::RandomInt((uint)pEVar7); + uVar6 = ((RNG *)((RNG *)local_34))->RNG::RandomInt(GHIDRA_UINT(pEVar7)); pRVar20 = local_d0; local_c8.y = (float)local_d0->_gridEntities[uVar6 - 9]; if ((Room *)local_c8.y != (Room *)0x0) { @@ -1999,7 +1999,7 @@ LAB_006e4032: ExceptionList = local_1c; return; } - uVar6 = (int)local_f4.y - (int)pRVar20 & 0xfffffffc; + uVar6 = GHIDRA_INT(local_f4.y) - GHIDRA_INT(pRVar20) & 0xfffffffc; ptr = pRVar20; if (uVar6 < 0x1000) { LAB_006e4146: @@ -2009,18 +2009,18 @@ LAB_006e4146: } ptr = *(Room **)&pRVar20[-1]._isPickupVisionInvalid; uVar6 = uVar6 + 0x23; - if ((uint)((int)pRVar20 + (-4 - (int)ptr)) < 0x20) goto LAB_006e4146; + if (GHIDRA_UINT((GHIDRA_INT(pRVar20) + (-4 - GHIDRA_INT(ptr)))) < 0x20) goto LAB_006e4146; goto LAB_006e4192; } } local_14 = 0xffffffff; if (local_d0 != (Room *)0x0) { - uVar6 = ((int)local_f4.y - (int)local_d0 >> 2) * 4; + uVar6 = (GHIDRA_INT(local_f4.y) - GHIDRA_INT(local_d0) >> 2) * 4; pRVar20 = local_d0; if (0xfff < uVar6) { pRVar20 = *(Room **)&local_d0[-1]._isPickupVisionInvalid; uVar6 = uVar6 + 0x23; - if (0x1f < (uint)((int)local_d0 + (-4 - (int)pRVar20))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_d0) + (-4 - GHIDRA_INT(pRVar20))))) { LAB_006e4192: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -2096,7 +2096,7 @@ LAB_006e4283: bVar15 = bVar3 < (byte)*pcVar12; if (bVar3 != *pcVar12) { LAB_006e4390: - uVar6 = -(uint)bVar15 | 1; + uVar6 = -GHIDRA_UINT(bVar15) | 1; goto LAB_006e4395; } if (bVar3 == 0) break; @@ -2123,8 +2123,8 @@ LAB_006e4395: local_c8.y = (float)g_game->_room; iVar5 = ((Room *)((Room *)local_c8.y))->Room::GetGridIndex(&this->_pos); if (((-1 < iVar5) && (((EntityRef *)((EntityRef *)local_bc))->EntityRef::EntityRef(), extraout_EDX < 0x1c0)) && - (((void **)((int)local_c8.y + 0x24))[extraout_EDX] != (int *)0x0)) { - (**(code **)(*(int *)((void **)((int)local_c8.y + 0x24))[extraout_EDX] + 0x14))(); + (((void **)(GHIDRA_INT(local_c8.y) + 0x24))[extraout_EDX] != (int *)0x0)) { + (**(code **)(*(int *)((void **)(GHIDRA_INT(local_c8.y) + 0x24))[extraout_EDX] + 0x14))(); } } } @@ -2152,8 +2152,8 @@ LAB_006e4506: local_c8.y = (float)g_game->_room; if ((((Room *)local_c8.y)->_roomType != 0x10) && (g_game->_frameCount - this->_spawnFrame < 6)) { - local_e8._shift2 = (int)pVVar9->x; - local_e8._shift3 = (int)(this->_targetPosition).y; + local_e8._shift2 = GHIDRA_INT(pVVar9->x); + local_e8._shift3 = GHIDRA_INT((this->_targetPosition).y); iVar5 = ((Room *)((Room *)local_c8.y))->Room::GetGridCollisionAtPos(*pVVar9); if (iVar5 != 0) { freePos = Room::FindFreePickupSpawnPosition @@ -2184,10 +2184,10 @@ LAB_006e45ad: local_d0 = g_game->_room; do { if (local_d0->_doors[iVar5] != (void *)0x0) { - local_e8._shift3 = *(int *)((int)local_d0->_doors[iVar5] + 0x24); + local_e8._shift3 = *(int *)(GHIDRA_INT(local_d0->_doors[iVar5]) + 0x24); local_cc = (Entity *)local_d0->_gridWidth; - fVar16 = ((float)(local_e8._shift3 / (int)local_cc) * 40.0 + 120.0) - fVar19; - fVar18 = ((float)(local_e8._shift3 % (int)local_cc) * 40.0 + 40.0) - fVar17; + fVar16 = ((float)(local_e8._shift3 / GHIDRA_INT(local_cc)) * 40.0 + 120.0) - fVar19; + fVar18 = ((float)(local_e8._shift3 % GHIDRA_INT(local_cc)) * 40.0 + 40.0) - fVar17; if (fVar16 * fVar16 + fVar18 * fVar18 < 4900.0) { if (-1 < iVar5) { local_f4.y = *(float *)local_c8.y - fVar17; @@ -2198,10 +2198,10 @@ LAB_006e45ad: local_d0 = (Room *)((float)local_d0 * (3.0 / fVar17)); } pRVar20 = (Room *)(*(float *)local_c8.y - - ((float)(local_e8._shift3 % (int)local_cc) * 40.0 + 40.0)); + ((float)(local_e8._shift3 % GHIDRA_INT(local_cc)) * 40.0 + 40.0)); local_e8._shift3 = - (int)((float)*(void **)((char *)local_c8.y + 4) - - ((float)(local_e8._shift3 / (int)local_cc) * 40.0 + 120.0)); + GHIDRA_INT(((float)*(void **)((char *)local_c8.y + 4) - + ((float)(local_e8._shift3 / GHIDRA_INT(local_cc)) * 40.0 + 120.0))); local_c8.y = (float)pRVar20; fVar17 = sqrtf((float)local_e8._shift3 * (float)local_e8._shift3 + (float)pRVar20 * (float)pRVar20); @@ -2234,13 +2234,13 @@ LAB_006e45ad: local_d0 = (Room *)((fVar17 + fVar17 + (player->_pos).x) - (this->_pos).x); local_f4.y = (fVar19 + fVar19 + (player->_pos).y) - (this->_pos).y; EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)local_34,&this->_pos, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)local_34,&this->_pos, 50.0,1); fVar17 = 0.0; local_14 = 3; if (local_28 != 0.0) { do { - iVar5 = *(int *)(local_34._4_4_ + (int)fVar17 * 4); + iVar5 = *(int *)((*(undefined4 *)((char *)&(local_34) + 0x4)) + GHIDRA_INT(fVar17) * 4); if (*(int *)(iVar5 + 0x28) == 3) { if (*(int *)(iVar5 + 0x2c) != 0x40) { if (*(int *)(iVar5 + 0x2c) != 0x66) goto LAB_006e4978; @@ -2257,8 +2257,8 @@ LAB_006e45ad: } } LAB_006e4978: - fVar17 = (float)((int)fVar17 + 1); - } while ((uint)fVar17 < (uint)local_28); + fVar17 = (float)(GHIDRA_INT(fVar17) + 1); + } while (GHIDRA_UINT(fVar17) < GHIDRA_UINT(local_28)); } local_c8.y = (float)local_d0 * (float)local_d0 + local_f4.y * local_f4.y; if (2500.0 <= local_c8.y) { @@ -2281,8 +2281,8 @@ LAB_006e4978: local_e8._shift3 = 7; ((RNG *)(&local_e8))->RNG::Next(); local_e8._shift3 = - (int)((float)((double)local_e8._seed + __uint_to_double_fixup[-(local_e8._seed >> 0x1f)]) - * 2.3283062e-10 * 180.0 - 90.0); + GHIDRA_INT(((float)((double)local_e8._seed + __uint_to_double_fixup[-(local_e8._seed >> 0x1f)]) + * 2.3283062e-10 * 180.0 - 90.0)); local_cc = (Entity *)((local_c8.y * 3.0) / 2500.0); fVar17 = sqrtf(local_c8.y); if (fVar17 <= 0.0) { @@ -2293,7 +2293,7 @@ LAB_006e4978: local_c8.y = ((float)local_cc / fVar17) * (float)local_d0; local_cc = (Entity *)(((float)local_cc / fVar17) * local_f4.y); } - local_e8._shift3 = (int)((float)local_e8._shift3 * 0.017453292); + local_e8._shift3 = GHIDRA_INT(((float)local_e8._shift3 * 0.017453292)); local_d0 = (Room *)cos((float)local_e8._shift3); fVar19 = sin((float)local_e8._shift3); fVar17 = this->_friction; @@ -2315,7 +2315,7 @@ LAB_006e4bf6: local_14 = 0xffffffff; if (local_34[0] == '\0') { local_14 = 4; - tracked_alloc(1,(void *)local_34._4_4_,0); + tracked_alloc(1,(*(undefined4 *)((char *)&((void *)local_34) + 0x4)),0); local_14 = 0xffffffff; } } @@ -2374,7 +2374,7 @@ LAB_006e4deb: } local_bd = IsChest(this->_variant); game = g_game; - uVar6 = *(uint *)((int)&this->_flags + 4); + uVar6 = *(uint *)(GHIDRA_INT(&this->_flags) + 4); flags = this->_flags; isDead = this->_dead; if ((uVar6 & 0x100) == 0) { @@ -2393,7 +2393,7 @@ LAB_006e4deb: bVar15 = bVar3 < (byte)*pcVar12; if (bVar3 != *pcVar12) { LAB_006e52d2: - uVar6 = -(uint)bVar15 | 1; + uVar6 = -GHIDRA_UINT(bVar15) | 1; goto LAB_006e52d7; } if (bVar3 == 0) break; @@ -2415,7 +2415,7 @@ LAB_006e52d7: bVar15 = bVar3 < *expectedAnimChar; if (bVar3 != *expectedAnimChar) { LAB_006e5320: - uVar6 = -(uint)bVar15 | 1; + uVar6 = -GHIDRA_UINT(bVar15) | 1; goto LAB_006e5325; } if (bVar3 == 0) break; @@ -2435,7 +2435,7 @@ LAB_006e5325: bVar15 = bVar3 < *expectedAnimChar; if (bVar3 != *expectedAnimChar) { LAB_006e5356: - uVar6 = -(uint)bVar15 | 1; + uVar6 = -GHIDRA_UINT(bVar15) | 1; goto LAB_006e535b; } if (bVar3 == 0) break; @@ -2489,14 +2489,14 @@ LAB_006e53e7: UpdateSprite(this,1); uVar6 = this->_subtype; if (g_game == (Game *)0x0) { - if (-1 < (int)uVar6) goto LAB_006e4fc5; + if (-1 < GHIDRA_INT(uVar6)) goto LAB_006e4fc5; } else { - if ((int)uVar6 < 0) { - if (((int)uVar6 < 0) && + if (GHIDRA_INT(uVar6) < 0) { + if ((GHIDRA_INT(uVar6) < 0) && (pvVar11 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)~uVar6 < - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar11 >> 2)) { + GHIDRA_INT(~uVar6) < + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar11) >> 2)) { iVar5 = **(int **)((char *)pvVar11 + ~uVar6 * 4); } else { @@ -2506,7 +2506,7 @@ LAB_006e53e7: else { LAB_006e4fc5: pvVar11 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar11 >> 2 <= (int)uVar6) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar11) >> 2 <= GHIDRA_INT(uVar6)) goto LAB_006e5401; iVar5 = *(int *)((char *)pvVar11 + uVar6 * 4); } @@ -2531,7 +2531,7 @@ LAB_006e4fc5: } } else if ((iVar5 < 10) || ((iVar5 < 0xf && (uVar6 = Random(), (uVar6 & 7) != 0)))) { - if (((uint)(this->_sprite)._bitflags >> 1 & 1) == 0) { + if ((GHIDRA_UINT((this->_sprite)._bitflags) >> 1 & 1) == 0) { uVar6 = Random(); if (uVar6 % 6 == 0) { piVar13 = &(this->_sprite)._bitflags; @@ -2563,9 +2563,9 @@ LAB_006e4fc5: piVar13 = &(this->_sprite)._bitflags; *piVar13 = *piVar13 & 0xfffffffd; flags = this->_flags; - puVar1 = (uint *)((int)&this->_flags + 4); + puVar1 = (uint *)(GHIDRA_INT(&this->_flags) + 4); *puVar1 = *puVar1 & 0xfffffeff; - *(int *)&this->_flags = (int)flags; + *(int *)&this->_flags = GHIDRA_INT(flags); animName = ((ANM2 *)((ANM2 *)&(this->_sprite)._animState))->ANM2::GetAnimation((std_string *)(local_bc + 0x10)); local_14 = 5; if (0xf < animName->_capacity) { @@ -2580,7 +2580,7 @@ LAB_006e4fc5: ((std::string *)(local_bc + 0x10))->std::string::_Tidy_deallocate(); pVVar9 = MusicManager::RandomVector((Vector *)(local_4c + 8)); local_c8.y = pVVar9->x * 8.0; - local_e8._shift3 = (int)(pVVar9->y * 8.0); + local_e8._shift3 = GHIDRA_INT((pVVar9->y * 8.0)); ((RNG *)((RNG *)local_4c))->RNG::game_constructor(this->_initSeed,3); uVar6 = ((RNG *)(explosionSprite))->RNG::Next(); local_f4.x = local_c8.y + (this->_pos).x; @@ -2596,12 +2596,12 @@ LAB_006e4fc5: LAB_006e5014: piVar13 = &(this->_sprite)._bitflags; *piVar13 = *piVar13 & 0xfffffffd; - *(int *)&this->_flags = (int)flags; - *(uint *)((int)&this->_flags + 4) = uVar6 & 0xfffffeff; + *(int *)&this->_flags = GHIDRA_INT(flags); + *(uint *)(GHIDRA_INT(&this->_flags) + 4) = uVar6 & 0xfffffeff; } LAB_006e5401: if ((this->_variant == 0x3a) && (this->_subtype != 0)) { - local_4c._4_4_ = *(undefined4 *)&this->_flags; + (*(undefined4 *)((char *)&(local_4c) + 0x4)) = *(undefined4 *)&this->_flags; flags = this->_flags; if (((flags & 0x200000000000000) == 0) || (((flags & 0x400000000000000) != 0 || (this->_child != (EntityPtr)0x0)))) { @@ -2616,13 +2616,13 @@ LAB_006e5401: pEVar7 = ((Game *)(g_game))->Game::Spawn(0x330,0,pVVar9,&g_vectorZero,(Entity *)this,0,uVar6); pEVar7->_renderDepthOffset = 6.0; flags = this->_flags; - puVar1 = (uint *)((int)&this->_flags + 4); + puVar1 = (uint *)(GHIDRA_INT(&this->_flags) + 4); *puVar1 = *puVar1 | 0x2000000; - *(int *)&this->_flags = (int)flags; - flagsHigh = *(undefined4 *)((int)&pEVar7->_flags + 4); + *(int *)&this->_flags = GHIDRA_INT(flags); + flagsHigh = *(undefined4 *)(GHIDRA_INT(&pEVar7->_flags) + 4); iVar5 = *(int *)pEVar7; - *(uint *)&pEVar7->_flags = (uint)pEVar7->_flags & 0xfffffffb; - *(undefined4 *)((int)&pEVar7->_flags + 4) = flagsHigh; + *(uint *)&pEVar7->_flags = GHIDRA_UINT(pEVar7->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&pEVar7->_flags) + 4) = flagsHigh; (**(code **)(iVar5 + 0xc))(); ((Color *)(&tmpColor))->Color::Color(1.0,1.0,1.0,0.0); (*extraout_EDX_01)(); @@ -2662,7 +2662,7 @@ LAB_006e562c: pEVar7 = ((Game *)(g_game))->Game::Spawn(1000,7,&this->_pos,&g_vectorZero,(Entity *)0x0,0,uVar6); uVar6 = Random(); virtualFn = *(code **)(*(int *)pEVar7 + 0x3c); - fVar19 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar19 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 0.4 + 0.2; fVar17 = fVar19 * g_vectorOne.x; (pEVar7->_sprite)._scale.y = fVar19 * g_vectorOne.y; @@ -2682,28 +2682,28 @@ LAB_006e562c: this = local_f8; for (iVar5 = uVar6 % 3 + 1; iVar5 != 0; iVar5 = iVar5 + -1) { uVar6 = Random(); - fVar17 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar17 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10; local_d0 = (Room *)(fVar17 + fVar17 + 1.0); uVar6 = Random(); - fVar17 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar17 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_c8.y = fVar17 + fVar17; local_cc = (Entity *)sin(local_c8.y); uVar6 = Random(); local_e8._shift3 = - (int)((float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * - 2.3283064e-10 * 0.5 * this->_size); + GHIDRA_INT(((float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * + 2.3283064e-10 * 0.5 * this->_size)); fVar17 = cos(local_c8.y); - local_4c._8_4_ = fVar17 * (float)local_e8._shift3 + (this->_pos).x; + (*(undefined4 *)((char *)&(local_4c) + 0x8)) = fVar17 * (float)local_e8._shift3 + (this->_pos).x; local_40 = (Entity *)((float)local_cc * (float)local_e8._shift3 + (this->_pos).y); uVar6 = Random(); - fVar17 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar17 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_c8.y = fVar17 + fVar17; - local_e8._shift3 = (int)sin(local_c8.y); + local_e8._shift3 = GHIDRA_INT(sin(local_c8.y)); fVar17 = cos(local_c8.y); - local_34._8_4_ = fVar17 * (float)local_d0; + (*(undefined4 *)((char *)&(local_34) + 0x8)) = fVar17 * (float)local_d0; local_28 = (float)local_d0 * (float)local_e8._shift3 * 0.5; uVar6 = Random(); ((Game *)(g_game))->Game::Spawn(1000,0x3f,(Vector *)(local_4c + 8),(Vector *)(local_34 + 8), @@ -2738,7 +2738,7 @@ LAB_006e562c: ((0 < g_game->_deathCertificateExitTimer && (this->_timeout < 1)))) { uVar6 = Random(); local_28 = (this->_pos).y + 10.0; - local_34._8_4_ = (this->_pos).x + 0.0; + (*(undefined4 *)((char *)&(local_34) + 0x8)) = (this->_pos).x + 0.0; ((Game *)(g_game))->Game::Spawn(1000,0xf,(Vector *)(local_34 + 8),&g_vectorZero,(Entity *)0x0,0,uVar6); this->_timeout = 4; } @@ -2756,7 +2756,7 @@ LAB_006e562c: manager = g_manager; local_c8.y = 2.94273e-44; seed_fart_sound_override((int *)&local_c8.y); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_c8.y,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_c8.y),1.0,2,0,1.0,0.0); this->_wait = 0x1e; UpdateLootPreview(this); } @@ -2815,17 +2815,17 @@ LAB_006e562c: local_cc = (Entity *)(((this->_pos).y - 140.0) * 0.65 + (g_screenHeight - 182.0) * 0.5); local_c8.y = g_displayPixelRatio * g_screenPointScale; local_e8._shift3 = - (int)((((this->_pos).x - 60.0) * 0.65 + (g_screenWidth - 338.0) * 0.5) * local_c8.y + 0.5 - ); + GHIDRA_INT(((((this->_pos).x - 60.0) * 0.65 + (g_screenWidth - 338.0) * 0.5) * local_c8.y + 0.5 + )); dVar22 = floor((double)(float)local_e8._shift3); local_d0 = (Room *)((float)dVar22 / local_c8.y); - local_e8._shift3 = (int)(local_c8.y * (float)local_cc + 0.5); + local_e8._shift3 = GHIDRA_INT((local_c8.y * (float)local_cc + 0.5)); dVar22 = floor((double)(float)local_e8._shift3); local_c8.y = (float)dVar22 / local_c8.y; pvVar11 = game->_room; local_cc = *(Entity **)((char *)pvVar11 + 0x11fc); local_e8._shift3 = *(int *)((char *)pvVar11 + 0x1200); - ((shared_ptr *)(&local_f4))->shared_ptr::assign((void *)((int)pvVar11 + 0x1bc8)); + ((shared_ptr *)(&local_f4))->shared_ptr::assign((void *)(GHIDRA_INT(pvVar11) + 0x1bc8)); local_14 = 6; virtualFn = *(code **)(*(int *)local_f4.x + 0x2c); __ftoui3(); @@ -2845,31 +2845,31 @@ LAB_006e562c: (local_f8->_colorMod)._tint[2] = 0.0; (local_f8->_colorMod)._tint[3] = 0.7; (local_f8->_colorMod)._offset[0] = local_50 * 0.9; - (local_f8->_colorMod)._offset[1] = (float)local_4c._0_4_ * 0.9; - (local_f8->_colorMod)._offset[2] = (float)local_4c._4_4_ * 0.9; + (local_f8->_colorMod)._offset[1] = (*(undefined4 *)((char *)&((float)local_4c) + 0x0)) * 0.9; + (local_f8->_colorMod)._offset[2] = (*(undefined4 *)((char *)&((float)local_4c) + 0x4)) * 0.9; ((Sprite *)((Sprite *)&local_f8->_sprite))->Sprite::SetColor(&local_f8->_colorMod); } game = g_game; - if ((uint)(g_game->_frameCount + this->_index) % 0x1e < 2) { + if (GHIDRA_UINT((g_game->_frameCount + this->_index)) % 0x1e < 2) { local_cc = (Entity *)(((this->_pos).y - 140.0) * 0.65 + (g_screenHeight - 182.0) * 0.5); local_c8.y = g_displayPixelRatio * g_screenPointScale; local_e8._shift3 = - (int)(local_c8.y * (((this->_pos).x - 60.0) * 0.65 + (g_screenWidth - 338.0) * 0.5) + 0.5 - ); + GHIDRA_INT((local_c8.y * (((this->_pos).x - 60.0) * 0.65 + (g_screenWidth - 338.0) * 0.5) + 0.5 + )); dVar22 = floor((double)(float)local_e8._shift3); local_f8 = (Entity_Pickup *)((float)dVar22 / local_c8.y); - local_e8._shift3 = (int)(local_c8.y * (float)local_cc + 0.5); + local_e8._shift3 = GHIDRA_INT((local_c8.y * (float)local_cc + 0.5)); dVar22 = floor((double)(float)local_e8._shift3); local_c8.y = (float)dVar22 / local_c8.y; pvVar11 = game->_room; local_cc = *(Entity **)((char *)pvVar11 + 0x11fc); local_e8._shift3 = *(int *)((char *)pvVar11 + 0x1200); - ((shared_ptr *)(&renderTarget))->shared_ptr::assign((void *)((int)pvVar11 + 0x1bc8)); + ((shared_ptr *)(&renderTarget))->shared_ptr::assign((void *)(GHIDRA_INT(pvVar11) + 0x1bc8)); local_14 = 8; (**(code **)(*renderTarget + 0x2c))(); local_14 = 9; if (((local_d0 != (Room *)0x0) && - (cVar4 = (**(code **)((int)*(float *)local_d0 + 0xc))(), cVar4 != '\0')) && + (cVar4 = (**(code **)(GHIDRA_INT(*(float *)local_d0) + 0xc))(), cVar4 != '\0')) && (g_renderTargetReleaseFn != (void *)0x0)) { (*g_renderTargetReleaseFn)(); } @@ -2879,8 +2879,8 @@ LAB_006e562c: fVar17 = (this->_colorMod)._offset[2]; fVar19 = (this->_colorMod)._offset[0]; fVar16 = (this->_colorMod)._offset[1]; - (this->_colorMod)._offset[2] = ((float)local_4c._4_4_ * 0.9 - fVar17) * 0.5 + fVar17; - (this->_colorMod)._offset[1] = ((float)local_4c._0_4_ * 0.9 - fVar16) * 0.5 + fVar16; + (this->_colorMod)._offset[2] = ((*(undefined4 *)((char *)&((float)local_4c) + 0x4)) * 0.9 - fVar17) * 0.5 + fVar17; + (this->_colorMod)._offset[1] = ((*(undefined4 *)((char *)&((float)local_4c) + 0x0)) * 0.9 - fVar16) * 0.5 + fVar16; (this->_colorMod)._offset[0] = (local_50 * 0.9 - fVar19) * 0.5 + fVar19; } tmpColor._tint[0] = (this->_sprite)._color._tint[0]; @@ -2893,7 +2893,7 @@ LAB_006e562c: tmpColor._colorize[1] = (this->_sprite)._color._colorize[1]; tmpColor._colorize[2] = (this->_sprite)._color._colorize[2]; tmpColor._colorize[3] = (this->_sprite)._color._colorize[3]; - tmpColor._offset._0_8_ = *(undefined8 *)(this->_sprite)._color._offset; + (*(undefined8 *)((char *)&(tmpColor._offset) + 0x0)) = *(undefined8 *)(this->_sprite)._color._offset; Color::Lerp(&lerpedColor,(ColorMod *)&tmpColor,&this->_colorMod,0.1); if (spriteColor != &lerpedColor) { spriteColor->_tint[0] = 0.01; @@ -2904,20 +2904,20 @@ LAB_006e562c: (this->_sprite)._color._colorize[1] = lerpedColor._colorize[1]; (this->_sprite)._color._colorize[2] = lerpedColor._colorize[2]; (this->_sprite)._color._colorize[3] = lerpedColor._colorize[3]; - *(undefined8 *)(this->_sprite)._color._offset = lerpedColor._offset._0_8_; + *(undefined8 *)(this->_sprite)._color._offset = (*(undefined8 *)((char *)&(lerpedColor._offset) + 0x0)); (this->_sprite)._color._offset[2] = lerpedColor._offset[2]; } } game = g_game; uVar6 = this->_timeout; - if (((int)uVar6 < 1) || (this->_variant == 100)) { + if ((GHIDRA_INT(uVar6) < 1) || (this->_variant == 100)) { bVar3 = ((Game *)(g_game))->Game::IsInTimedSet(0x48); if (bVar3 != 0) { iVar5 = this->_spawnFrame; uVar6 = game->_frameCount - iVar5; - if (0x96 < (int)uVar6) { + if (0x96 < GHIDRA_INT(uVar6)) { uVar6 = uVar6 & 0x80000001; - if ((int)uVar6 < 0) { + if (GHIDRA_INT(uVar6) < 0) { uVar6 = (uVar6 - 1 | 0xfffffffe) + 1; } if (uVar6 == 1) { @@ -2941,19 +2941,19 @@ LAB_006e42ba: } } } - else if ((int)uVar6 < 0x1e) { + else if (GHIDRA_INT(uVar6) < 0x1e) { uVar6 = uVar6 & 0x80000001; - if ((int)uVar6 < 0) { + if (GHIDRA_INT(uVar6) < 0) { uVar6 = (uVar6 - 1 | 0xfffffffe) + 1; } if (uVar6 == 1) { ((Color *)((Color *)local_68))->Color::Reset(); - local_4c._4_4_ = (Room *)0x0; - local_4c._8_4_ = (Entity *)0x0; - local_68._0_4_ = 0.0; - local_68._4_4_ = 0.0; - local_68._8_4_ = 0.0; - local_68._12_4_ = 0.0; + (*(undefined4 *)((char *)&(local_4c) + 0x4)) = (Room *)0x0; + (*(undefined4 *)((char *)&(local_4c) + 0x8)) = (Entity *)0x0; + (*(undefined4 *)((char *)&(local_68) + 0x0)) = 0.0; + (*(undefined4 *)((char *)&(local_68) + 0x4)) = 0.0; + (*(undefined4 *)((char *)&(local_68) + 0x8)) = 0.0; + (*(undefined4 *)((char *)&(local_68) + 0xc)) = 0.0; local_40 = (Entity *)0x0; this->SetColor(); } @@ -2973,7 +2973,7 @@ LAB_006e42ba: if (bVar3 != 0) { local_c8.y = 3.237e-43; seed_fart_sound_override((int *)&local_c8.y); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_c8.y,0.5,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_c8.y),0.5,2,0,1.0,0.0); } } if (((this->_sprite)._animState._animData == (void *)0x0) || @@ -2999,7 +2999,7 @@ LAB_006e6519: bVar15 = bVar3 < (byte)*pcVar12; if (bVar3 != *pcVar12) { LAB_006e64d7: - uVar6 = -(uint)bVar15 | 1; + uVar6 = -GHIDRA_UINT(bVar15) | 1; goto LAB_006e64dc; } if (bVar3 == 0) break; @@ -3022,7 +3022,7 @@ LAB_006e64dc: bVar15 = bVar3 < (byte)*pcVar12; if (bVar3 != *pcVar12) { LAB_006e6510: - uVar6 = -(uint)bVar15 | 1; + uVar6 = -GHIDRA_UINT(bVar15) | 1; goto LAB_006e6515; } if (bVar3 == 0) break; @@ -3042,14 +3042,14 @@ LAB_006e6515: local_e8._shift3 = *(int *)&this->_target; if (((EntityPtr)local_e8._shift3 == (EntityPtr)0x0) || (*(int *)(local_e8._shift3 + 0x28) != 1)) { - local_e8._shift3 = (int)((Game *)(g_game))->Game::GetPlayer(0); + local_e8._shift3 = GHIDRA_INT(((Game *)(g_game))->Game)::GetPlayer(0); } if (this->_state == 1) { ((ANM2 *)(&this->_sprite))->ANM2::Play(s_Open,0); uVar6 = 0; playerManager = &g_game->_playerManager; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { player = ((PlayerManager *)(playerManager))->PlayerManager::GetPlayer(uVar6); @@ -3059,14 +3059,14 @@ LAB_006e6515: (player->_velocity).x = g_vectorZero.x; (player->_velocity).y = g_vectorZero.y; player->_isControlsEnabled = 0; - } while (uVar6 < (uint)((int)(game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar6 < GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } flags = this->_flags; - puVar1 = (uint *)((int)&this->_flags + 4); + puVar1 = (uint *)(GHIDRA_INT(&this->_flags) + 4); *puVar1 = *puVar1 | 0x1000; this->_state = this->_state + 1; - *(int *)&this->_flags = (int)flags; + *(int *)&this->_flags = GHIDRA_INT(flags); this->_entityCollisionClass = 0; *(float *)(local_e8._shift3 + 0x1b1c) = g_vectorZero.x; *(float *)(local_e8._shift3 + 0x1b20) = g_vectorZero.y; @@ -3091,7 +3091,7 @@ LAB_006e6515: manager = g_manager; local_c8.y = 1.47417e-42; seed_fart_sound_override((int *)&local_c8.y); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_c8.y,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_c8.y),1.0,2,0,1.0,0.0); iVar5 = local_e8._shift3; ((Entity_Player *)((Entity_Player *)local_e8._shift3))->Entity_Player::PlayExtraAnimation((byte *)"Trapdoor"); fVar17 = (this->_pos).y; @@ -3125,10 +3125,10 @@ LAB_006e67da: local_c8.y = 0.0; } else { - local_c8.y = *(float *)((int)*(void **)((char *)EVar10 + 0x450) + 0x30); + local_c8.y = *(float *)(GHIDRA_INT(*(void **)((char *)EVar10 + 0x450)) + 0x30); } - puVar14 = (undefined1 *)((ANM2 *)((ANM2 *)((int)EVar10 + 0x41c)))->ANM2::GetFrame(); - if (puVar14 != &(*(undefined1 *)((char *)(((Room *)((int)local_c8.y + -0x7898))) + 0x7897))) goto LAB_006e67da; + puVar14 = (undefined1 *)((ANM2 *)((ANM2 *)(GHIDRA_INT(EVar10) + 0x41c)))->ANM2::GetFrame(); + if (puVar14 != &(*(undefined1 *)((char *)(((Room *)(GHIDRA_INT(local_c8.y) + -0x7898))) + 0x7897))) goto LAB_006e67da; } game = g_game; *(int *)((char *)EVar10 + 0x188) = 4; @@ -3181,7 +3181,7 @@ void Entity_Pickup::Render(Vector *offset) local_8 = 0xffffffff; puStack_c = &LAB_00afb151; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; if (((this->_exists != 0) && (this->_visible != 0)) && (this->_dropDelay < 1)) { if (this->_variant == 100) { if (this->_megaChestCollectible[0] != (void *)0x0) { @@ -3223,8 +3223,8 @@ void Entity_Pickup::Render(Vector *offset) uVar2 = uVar2 << ((byte)((ulonglong)_DAT_00c5d010 >> 0x20) & 0x1f) ^ uVar2; DAT_00c5d00c = uVar2 >> ((byte)DAT_00c5d018 & 0x1f) ^ uVar2; (this->_altPedestalANM2)._color._tint[3] = - (float)((double)(int)DAT_00c5d00c + - __uint_to_double_fixup[-((int)DAT_00c5d00c >> 0x1f)]) * 2.3283062e-10 * 0.15 + + (float)((double)GHIDRA_INT(DAT_00c5d00c) + + __uint_to_double_fixup[-(GHIDRA_INT(DAT_00c5d00c) >> 0x1f)]) * 2.3283062e-10 * 0.15 + 0.05; if (this->_subtype != 0) { scratchPos.y = -2.6; @@ -3253,7 +3253,7 @@ void Entity_Pickup::Render(Vector *offset) ((Sprite *)((Sprite *)&this->_sprite))->Sprite::RenderLayer(1,&scratchPos,&g_vectorZero,&g_vectorZero); scratchPos.x = (this->_sprite)._scale.x * 16.0 * 0.65 + position->x; scratchPos.y = (this->_sprite)._scale.y * 0.0 * 0.65 + (this->_renderPosition).y; - ((Sprite *)((Sprite *)((int)this->_megaChestCollectible[1] + 0x48)))->Sprite::RenderLayer(1,&scratchPos, + ((Sprite *)((Sprite *)(GHIDRA_INT(this->_megaChestCollectible[1]) + 0x48)))->Sprite::RenderLayer(1,&scratchPos, &g_vectorZero,&g_vectorZero); } } @@ -3330,15 +3330,15 @@ byte Entity_Pickup::TryOpenChest(Entity_Player *player) Manager *manager; ColorMod *poofColor; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = (int *)0xffffffff; puStack_18 = &LAB_00afb180; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(loot + 0x21); + local_24 = __security_cookie ^ GHIDRA_UINT((loot + 0x21)); ExceptionList = &local_1c; openingPlayer = player; chest = this; - puVar3 = (undefined1 *)((int)register0x00000010 + -4); + puVar3 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); if (player == (Entity_Player *)0x0) { openingPlayer = Game::GetNearestPlayerEx(&this->_pos,1,0,0); puVar3 = puStack_20; @@ -3360,13 +3360,13 @@ byte Entity_Pickup::TryOpenChest(Entity_Player *player) manager = g_manager; local_5c = 3.08286e-44; seed_fart_sound_override((int *)&local_5c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_5c,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_5c),1.0,2,0,1.0,0.0); manager = g_manager; iVar9 = this->_variant; if (((iVar9 == 0x3c) || (iVar9 == 0x35)) || (iVar9 == 0x37)) { local_5c = 2.18603e-43; seed_fart_sound_override((int *)&local_5c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_5c,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_5c),1.0,2,0,1.0,0.0); ((PersistentGameData *)(&g_manager->_persistentGameData))->PersistentGameData::IncreaseEventCounter(0xc6,1); } uVar5 = Random(); @@ -3414,7 +3414,7 @@ byte Entity_Pickup::TryOpenChest(Entity_Player *player) manager = g_manager; local_5c = 3.71344e-43; seed_fart_sound_override((int *)&local_5c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_5c,0.7,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_5c),0.7,2,0,1.0,0.0); chest->Remove(); } } @@ -3493,7 +3493,7 @@ byte Entity_Pickup::TryOpenChest(Entity_Player *player) (*(int *)(lootContainer + 8) - 1U & uVar5) * 4), *(uint *)(*(int *)(*(int *)(iVar9 + 4) + (*(int *)(iVar9 + 8) - 1U & uVar5) * 4) + 4), - chestPos,&g_vectorZero,(Entity *)0x0,(uint)local_6c,(uint)local_64) + chestPos,&g_vectorZero,(Entity *)0x0,GHIDRA_UINT(local_6c),GHIDRA_UINT(local_64)) ; } else { @@ -3539,7 +3539,7 @@ byte Entity_Pickup::TryOpenChest(Entity_Player *player) if (pEVar6->_variant == 100) { (pEVar6->_targetPosition).x = chestPos->x; (pEVar6->_targetPosition).y = chestPos->y; - if ((int)local_5c < 0x169) { + if (GHIDRA_INT(local_5c) < 0x169) { if (local_5c == 5.04467e-43) { iVar9 = 5; } @@ -3704,7 +3704,7 @@ LAB_006e74e4: else { local_6c = (Room *)0x3f800000; if ((pEVar6->_variant == 0x39) && - (local_6c = (Room *)((float)(int)local_70 * 0.05 + 0.4), 1.0 <= (float)local_6c)) + (local_6c = (Room *)((float)GHIDRA_INT(local_70) * 0.05 + 0.4), 1.0 <= (float)local_6c)) { local_6c = (Room *)0x3f800000; } @@ -3725,10 +3725,10 @@ LAB_006e74e4: return bVar4; } dropRng._seed = - (uint)dropRng._seed >> ((byte)dropRng._shift1 & 0x1f) ^ dropRng._seed; + GHIDRA_UINT(dropRng._seed) >> ((byte)dropRng._shift1 & 0x1f) ^ dropRng._seed; dropRng._seed = dropRng._seed << ((byte)dropRng._shift2 & 0x1f) ^ dropRng._seed; dropRng._seed = - (uint)dropRng._seed >> ((byte)dropRng._shift3 & 0x1f) ^ dropRng._seed; + GHIDRA_UINT(dropRng._seed) >> ((byte)dropRng._shift3 & 0x1f) ^ dropRng._seed; local_64 = (Vector *)0xe; if (dropRng._seed == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -3736,10 +3736,10 @@ LAB_006e74e4: bVar4 = (*pcVar1)(); return bVar4; } - uVar5 = (uint)dropRng._seed >> 3 ^ dropRng._seed; + uVar5 = GHIDRA_UINT(dropRng._seed) >> 3 ^ dropRng._seed; uVar5 = uVar5 << 1 ^ uVar5; uVar5 = uVar5 >> 0xe ^ uVar5; - fVar8 = (float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) + fVar8 = (float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283062e-10 * 3.14; local_64 = (Vector *)(fVar8 + fVar8); lootSpawnPos.x = cos((float)local_64); @@ -3749,10 +3749,10 @@ LAB_006e74e4: lootSpawnPos.y = lootSpawnPos.y + pVVar2->y; spawned = ((EntitySpawner *)(local_7c))->EntitySpawner::Spawn(&lootSpawnPos,&lootVelocity,(Entity *)0x0); if ((spawned->_type == 5) && (chest->_variant == 0x39)) { - spawned[1]._sprite._championColor._offset[2] = (float)((int)local_70 / 2); + spawned[1]._sprite._championColor._offset[2] = (float)(GHIDRA_INT(local_70) / 2); } spawned->Update(); - local_70 = (float)((int)local_70 + 1); + local_70 = (float)(GHIDRA_INT(local_70) + 1); if (((1 < *(int *)&g_game->_deathmatchManager) && (spawned->_type == 1)) || (spawned->_type - 10U < 0x3de)) { local_7c = (void *)chestPos->x; @@ -3816,7 +3816,7 @@ LAB_006e74e4: manager = g_manager; local_64 = (Vector *)0x109; seed_fart_sound_override((int *)&local_64); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_64,0.7,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_64),0.7,2,0,1.0,0.0); chest->Remove(); } *(undefined1 *)((char *)g_game->_room + 0x7894) = 1; @@ -3884,7 +3884,7 @@ void Entity_Pickup::PlayDropSound() soundId = 0x26; } else { - soundId = (int)this; + soundId = GHIDRA_INT(this); isChest = IsChest(iVar1); if (isChest == 0) { if (extraout_ECX == 300) { @@ -3980,7 +3980,7 @@ LAB_006e8329: LAB_006e8344: fVar4 = 1.0; LAB_006e834c: - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_8,fVar4,iVar5,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_8),fVar4,iVar5,0,1.0,0.0); return; } if (iVar5 == 0x14) { @@ -4051,7 +4051,7 @@ LAB_006e8319: uVar2 = Random(); SoundEffects::PlayWithFartOverride (0x1ca,1.0,2,0, - (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10 * 0.3 + 0.9); return; } @@ -4063,7 +4063,7 @@ LAB_006e8319: bVar1 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x40000); if (bVar1 != 0) goto LAB_006e8319; uVar2 = this->_subtype; - if ((((int)uVar2 < 0) && (iVar5 = FUN_009e0180(uVar2), iVar5 != 0)) && + if (((GHIDRA_INT(uVar2) < 0) && (iVar5 = FUN_009e0180(uVar2), iVar5 != 0)) && (*(int *)(iVar5 + 0xc) != 0)) { pitchRng._seed = *(int *)(iVar5 + 8); pitchRng._shift1 = 1; @@ -4137,18 +4137,18 @@ LAB_006e81cf: default: local_8 = 1.84971e-43; seed_fart_sound_override((int *)&local_8); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_8,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_8),1.0,2,0,1.0,0.0); local_8 = 8.46384e-43; } manager = g_manager; seed_fart_sound_override((int *)&local_8); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_8,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_8),1.0,2,0,1.0,0.0); switchD_006e808c_caseD_2: local_8 = 8.43582e-43; LAB_006e8131: manager = g_manager; seed_fart_sound_override((int *)&local_8); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_8,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_8),1.0,2,0,1.0,0.0); uVar2 = Random(); proceduralItem = (int *)FUN_009e0180(this->_subtype); SimpleString::operator= @@ -4210,11 +4210,11 @@ undefined4 Entity_Pickup::can_player_buy(Entity_Player *param_2) redHeartCost = ReferenceCount::vftable[iVar2 * -2 + 4]; soulHeartCost = ReferenceCount::vftable[iVar2 * -2 + 5]; if ((redHeartCost != (undefined *)0x0) || (soulHeartCost != (undefined *)0x0)) { - if (((int)soulHeartCost < 1) || (redHeartCost != (undefined *)0x0)) { - if ((int)redHeartCost < 1) { + if ((GHIDRA_INT(soulHeartCost) < 1) || (redHeartCost != (undefined *)0x0)) { + if (GHIDRA_INT(redHeartCost) < 1) { return 1; } - if (0 < (int)soulHeartCost) { + if (0 < GHIDRA_INT(soulHeartCost)) { iVar2 = ((Entity_Player *)(param_2))->Entity_Player::GetEffectiveMaxHearts(); if (iVar2 < 2) { return 0; @@ -4286,19 +4286,19 @@ void Entity_Pickup::CollectTrinket(Entity_Player *param_2, uint param_3) local_8 = 0xffffffff; puStack_c = &LAB_00afb1c5; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; savedThis = this; if ((param_3 == 0) && (param_3 = this->_price, param_3 == 0)) goto LAB_006e89de; ((ANM2 *)(&this->_priceANM2))->ANM2::Reset(); - if (0 < (int)param_3) { - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&entities,3,0xce,0x209,0,0) + if (0 < GHIDRA_INT(param_3)) { + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&entities,3,0xce,0x209,0,0) ; uVar4 = 0; local_8 = 0; if (param_3 != 0) { do { - if ((uint)entities._size <= uVar4) break; + if (GHIDRA_UINT(entities._size) <= uVar4) break; damageSource._type = 0; damageSource._variant = 0; damageSource._spawnerType = 0; @@ -4318,14 +4318,14 @@ void Entity_Pickup::CollectTrinket(Entity_Player *param_2, uint param_3) if (0 < entities._size) { param_3 = entities._size; } - if (entities._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(entities) + 0x0)) == '\0') { local_8 = 1; tracked_alloc(1,entities._data,0); } local_8 = 0xffffffff; ((Entity_Player *)(param_2))->Entity_Player::AddCoins(-param_3); FUN_007d8630(param_3); - Player_stats_add(&g_game->_onlinePlayerStats,0xd,param_2,(float)(int)param_3); + Player_stats_add(&g_game->_onlinePlayerStats,0xd,param_2,(float)GHIDRA_INT(param_3)); goto LAB_006e89de; } iVar5 = ((Entity_Player *)(param_2))->Entity_Player::GetHealthType(); @@ -4370,16 +4370,16 @@ LAB_006e8700: local_1c = 0.8; } rngEnd = (param_2->_trinketRNGs)._end; - if ((int)rngEnd - (int)(param_2->_trinketRNGs)._begin >> 4 < 0xae) { + if (GHIDRA_INT(rngEnd) - GHIDRA_INT((param_2->_trinketRNGs)._begin) >> 4 < 0xae) { KAGE_LogMessage(0x10,(byte *)"Trinket ID out of bounds!\n"); rngEnd = (param_2->_trinketRNGs)._end; } rngBegin = (param_2->_trinketRNGs)._begin; - uVar2 = ((int)rngEnd - (int)rngBegin >> 4) - 1; + uVar2 = (GHIDRA_INT(rngEnd) - GHIDRA_INT(rngBegin) >> 4) - 1; if (0xad < uVar2) { uVar2 = 0xad; } - local_20 = ((RNG *)((RNG *)(uVar2 * 0x10 + (int)rngBegin)))->RNG::RandomFloat(); + local_20 = ((RNG *)((RNG *)(uVar2 * 0x10 + GHIDRA_INT(rngBegin))))->RNG::RandomFloat(); isRemoveOtherDeals = isFreeDeal; if (local_20 <= local_1c) { ((Entity_Player *)(param_2))->Entity_Player::TryRemoveTrinket(0xad); @@ -4450,7 +4450,7 @@ LAB_006e8700: } local_1c = (float)g_game->_startingRoomIdx; local_20 = (float)g_game->_currentRoomIdx; - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&entities,5,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&entities,5,-1,-1,0,0); pickup = savedThis; uVar2 = 0; local_8 = 2; @@ -4472,10 +4472,10 @@ LAB_006e8700: otherPickup->_timeout = 4; } uVar2 = uVar2 + 1; - } while (uVar2 < (uint)entities._size); + } while (uVar2 < GHIDRA_UINT(entities._size)); } local_8 = 0xffffffff; - if (entities._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(entities) + 0x0)) == '\0') { local_8 = 3; tracked_alloc(1,entities._data,0); local_8 = 0xffffffff; @@ -4493,8 +4493,8 @@ LAB_006e89de: restockOwner != (Entity_Player *)0x0 || ((g_game->_difficulty == 2 || (g_game->_difficulty == 3)))))) && (room = g_game->_room, room->_roomType == 2)) { - iVar5 = (int)(((pickup->_pos).x - 40.0) / 40.0 + 0.5); - iVar3 = (int)(((pickup->_pos).y - 120.0) / 40.0 + 0.5); + iVar5 = GHIDRA_INT((((pickup->_pos).x - 40.0) / 40.0 + 0.5)); + iVar3 = GHIDRA_INT((((pickup->_pos).y - 120.0) / 40.0 + 0.5)); if ((((iVar5 < 0) || (room->_gridWidth <= iVar5)) || (iVar3 < 0)) || (room->_gridHeight <= iVar3)) { iVar5 = -1; @@ -4599,17 +4599,17 @@ void Entity_Pickup::update_magnet_attraction() closestDistSq = 1e+09; closestPlayer = (Entity_Player *)0x0; playerIndex = 0; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { LAB_006ed780: listEnd = (playerManager->_playerList)._end; playerEntry = (playerManager->_playerList)._begin; - if ((int)listEnd - (int)playerEntry >> 2 == 0) { + if (GHIDRA_INT(listEnd) - GHIDRA_INT(playerEntry) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); listEnd = (playerManager->_playerList)._end; playerEntry = (playerManager->_playerList)._begin; } - if (playerIndex < (uint)((int)listEnd - (int)playerEntry >> 2)) { + if (playerIndex < GHIDRA_UINT((GHIDRA_INT(listEnd) - GHIDRA_INT(playerEntry) >> 2))) { playerEntry = playerEntry + playerIndex; } pEVar2 = (Entity_Player *)*playerEntry; @@ -4712,28 +4712,28 @@ LAB_006edb53: if ((this->_price == 0) && (this->_variant == 0x14)) { uVar5 = 1; playerManager = &g_game->_playerManager; - if (1 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)) { + if (1 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))) { do { listEnd = (playerManager->_playerList)._end; - if ((int)listEnd - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(listEnd) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); listEnd = (playerManager->_playerList)._end; } game = g_game; playerSlot = (playerManager->_playerList)._begin; - if (uVar5 < (uint)((int)listEnd - (int)playerSlot >> 2)) { + if (uVar5 < GHIDRA_UINT((GHIDRA_INT(listEnd) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + uVar5; } if (*(int *)(*playerSlot + 0x1aec) == 0x12) { listEnd = (g_game->_playerManager)._playerList._end; playerSlot = (g_game->_playerManager)._playerList._begin; - if ((int)listEnd - (int)playerSlot >> 2 == 0) { + if (GHIDRA_INT(listEnd) - GHIDRA_INT(playerSlot) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); listEnd = (game->_playerManager)._playerList._end; playerSlot = (game->_playerManager)._playerList._begin; } - if (uVar5 < (uint)((int)listEnd - (int)playerSlot >> 2)) { + if (uVar5 < GHIDRA_UINT((GHIDRA_INT(listEnd) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + uVar5; } fVar10 = *(float *)(*playerSlot + 0x33c) - (this->_pos).x; @@ -4749,8 +4749,8 @@ LAB_006edb53: } uVar5 = uVar5 + 1; playerManager = &g_game->_playerManager; - } while (uVar5 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar5 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } return; @@ -4829,8 +4829,8 @@ LAB_006ed930: LAB_006eda62: playerManager = &g_game->_playerManager; playerIndex = playerIndex + 1; - if ((uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2) <= playerIndex) goto code_r0x006eda8d; + if (GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2)) <= playerIndex) goto code_r0x006eda8d; goto LAB_006ed780; code_r0x006eda8d: if (closestPlayer != (Entity_Player *)0x0) { @@ -4865,12 +4865,12 @@ void Entity_Pickup::update_cycle_collectible(byte isForce) void *animData; uint cycleCount; - local_14 = __security_cookie ^ (uint)&animFrame; + local_14 = __security_cookie ^ GHIDRA_UINT(&animFrame); cycleCount = this->_cycleCollectibleCount; if (cycleCount == 0) { return; } - frequency = (-(uint)(cycleCount < 4) & 0x18) + 6; + frequency = (-GHIDRA_UINT((cycleCount < 4)) & 0x18) + 6; if (7 < cycleCount) { frequency = 1; } @@ -4893,7 +4893,7 @@ void Entity_Pickup::update_cycle_collectible(byte isForce) } else { dVar2 = floor((double)(this->_sprite)._animState._animFrame); - animFrame = (int)dVar2; + animFrame = GHIDRA_INT(dVar2); } Morph(this,this->_type,this->_variant,this->_cycleCollectibleList[0],1,1,1); if ((this->_sprite)._animState._animData != (void *)0x0) { @@ -5108,7 +5108,7 @@ void Entity_Pickup::RemoveOtherOptions() local_8 = 0xffffffff; puStack_c = &LAB_00afb275; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (uint)(local_28 + 0x24); + uVar3 = __security_cookie ^ GHIDRA_UINT((local_28 + 0x24)); ExceptionList = &local_10; if (in_ECX->_optionsPickupIndex != 0) { if ((((in_ECX->_optionsPickupIndex == 1) && (in_ECX->_variant == 100)) && @@ -5116,11 +5116,11 @@ void Entity_Pickup::RemoveOtherOptions() g_game->_deathCertificateExitTimer = 0x5a; } EntityList::QuerySublist - ((EntityList *)((int)game->_room + 0x1218),(EntityList_EL *)local_28,5,-1,-1,0,0); + ((EntityList *)(GHIDRA_INT(game->_room) + 0x1218),(EntityList_EL *)local_28,5,-1,-1,0,0); i = 0; local_8 = 0; if (local_1c != 0.0) { - listData = (void *)local_28._4_4_; + listData = (*(undefined4 *)((char *)&((void *)local_28) + 0x4)); do { other = *(Entity_Pickup **)((char *)listData + i * 4); if ((other != (Entity_Pickup *)0x0) && (other->_type == 5)) { @@ -5137,10 +5137,10 @@ void Entity_Pickup::RemoveOtherOptions() other->Remove(uVar3); } } - listData = (void *)local_28._4_4_; + listData = (*(undefined4 *)((char *)&((void *)local_28) + 0x4)); } i = i + 1; - } while (i < (uint)local_1c); + } while (i < GHIDRA_UINT(local_1c)); } local_8 = 0xffffffff; in_ECX->_optionsPickupIndex = 0; @@ -5149,15 +5149,15 @@ void Entity_Pickup::RemoveOtherOptions() heapCounter = &g_allocatedBytesNoHeap; } else { - heapCounter = (qword *)((int)g_mainHeap + 0x30); + heapCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } - if ((void *)local_28._4_4_ != (void *)0x0) { - uVar3 = *(uint *)(local_28._4_4_ + -4); + if ((*(undefined4 *)((char *)&((void *)local_28) + 0x4)) != (void *)0x0) { + uVar3 = *(uint *)((*(undefined4 *)((char *)&(local_28) + 0x4)) + -4); qVar2 = *heapCounter; - *(uint *)heapCounter = (uint)*heapCounter - uVar3; + *(uint *)heapCounter = GHIDRA_UINT(*heapCounter) - uVar3; *(uint *)((char *)heapCounter + 4) = - *(uint *)((char *)heapCounter + 4) - (uint)((uint)qVar2 < uVar3); - free((uint *)(local_28._4_4_ + -4)); + *(uint *)((char *)heapCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < uVar3)); + free((uint *)((*(undefined4 *)((char *)&(local_28) + 0x4)) + -4)); } } } @@ -5165,7 +5165,7 @@ void Entity_Pickup::RemoveOtherOptions() if (((in_ECX->_variant == 100) && (g_game->_currentRoomIdx == -0xc)) && ((in_ECX->_flags & 0x40000) != 0)) { local_18.y = (float)g_game->_room; - EntityList::QuerySublist((EntityList *)((int)local_18.y + 0x1218),&collectibles,5,100,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(local_18.y) + 0x1218),&collectibles,5,100,-1,0,0); local_8 = 2; uVar4 = 0; uVar3 = collectibles._size; @@ -5174,7 +5174,7 @@ void Entity_Pickup::RemoveOtherOptions() piVar1 = *(int **)((char *)collectibles._data + uVar4 * 4); if (((piVar1 != (int *)0x0) && (piVar1[10] == 5)) && ((piVar1[0x5a] & 0x40000U) != 0)) { uVar3 = Random(); - local_28._8_4_ = (float)piVar1[0xcf] + 0.0; + (*(undefined4 *)((char *)&(local_28) + 0x8)) = (float)piVar1[0xcf] + 0.0; local_1c = (float)piVar1[0xd0] + 10.0; ((Game *)(g_game))->Game::Spawn(1000,0xf,(Vector *)(local_28 + 8),&g_vectorZero,(Entity *)0x0,0,uVar3); (**(code **)(*piVar1 + 0x28))(); @@ -5184,20 +5184,20 @@ void Entity_Pickup::RemoveOtherOptions() } while (uVar4 < uVar3); } *(undefined4 *)((char *)local_18.y + 0x7764) = 10; - if (collectibles._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(collectibles) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { heapCounter = &g_allocatedBytesNoHeap; } else { - heapCounter = (qword *)((int)g_mainHeap + 0x30); + heapCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (collectibles._data != (void *)0x0) { uVar3 = *(uint *)((char *)collectibles._data + -4); qVar2 = *heapCounter; - *(uint *)heapCounter = (uint)*heapCounter - uVar3; + *(uint *)heapCounter = GHIDRA_UINT(*heapCounter) - uVar3; *(uint *)((char *)heapCounter + 4) = - *(uint *)((char *)heapCounter + 4) - (uint)((uint)qVar2 < uVar3); - free((void *)((int)collectibles._data + -4)); + *(uint *)((char *)heapCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < uVar3)); + free((void *)(GHIDRA_INT(collectibles._data) + -4)); } } } @@ -5242,7 +5242,7 @@ int Entity_Pickup::AssignOptionsIndex() local_10 = ExceptionList; ExceptionList = &local_10; maxIndex = 2; - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&local_20,5,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&local_20,5,-1,-1,0,0); uVar1 = 0; if (local_20._size != 0) { do { @@ -5252,23 +5252,23 @@ int Entity_Pickup::AssignOptionsIndex() maxIndex = pickup->_optionsPickupIndex; } uVar1 = uVar1 + 1; - } while (uVar1 < (uint)local_20._size); + } while (uVar1 < GHIDRA_UINT(local_20._size)); } this->_optionsPickupIndex = maxIndex + 1; - if (local_20._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_20) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { heapAllocatedBytes = &g_allocatedBytesNoHeap; } else { - heapAllocatedBytes = (qword *)((int)g_mainHeap + 0x30); + heapAllocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (local_20._data != (void *)0x0) { uVar1 = *(uint *)((char *)local_20._data + -4); oldAllocatedBytes = *heapAllocatedBytes; - *(uint *)heapAllocatedBytes = (uint)*heapAllocatedBytes - uVar1; + *(uint *)heapAllocatedBytes = GHIDRA_UINT(*heapAllocatedBytes) - uVar1; *(uint *)((char *)heapAllocatedBytes + 4) = - *(uint *)((char *)heapAllocatedBytes + 4) - (uint)((uint)oldAllocatedBytes < uVar1); - free((void *)((int)local_20._data + -4)); + *(uint *)((char *)heapAllocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocatedBytes) < uVar1)); + free((void *)(GHIDRA_INT(local_20._data) + -4)); } } ExceptionList = local_10; @@ -5336,7 +5336,7 @@ void Entity_Pickup::RestoreState(Room *room, Entity_Pickup *entity, void *saveSt (entity->_dropRNG)._shift2 = 3; (entity->_dropRNG)._shift3 = 0x11; iVar4 = entity->_type; - entity->_spawnGridIndex = (int)*(short *)((char *)saveState + 0x20); + entity->_spawnGridIndex = GHIDRA_INT(*(short *)((char *)saveState + 0x20)); entity->_scoreMultiplier = *(float *)((char *)saveState + 0x58); if (iVar4 == 5) { if (*(int *)((char *)saveState + 8) != 0) { @@ -5380,7 +5380,7 @@ void Entity_Pickup::RestoreState(Room *room, Entity_Pickup *entity, void *saveSt do { iVar4 = *(int *)(uVar6 + *(int *)((char *)saveState + 100)); if (iVar4 == 0) break; - if ((uint)entity->_cycleCollectibleCount < 8) { + if (GHIDRA_UINT(entity->_cycleCollectibleCount) < 8) { entity->_cycleCollectibleList[entity->_cycleCollectibleCount] = iVar4; entity->_cycleCollectibleCount = entity->_cycleCollectibleCount + 1; } @@ -5388,15 +5388,15 @@ void Entity_Pickup::RestoreState(Room *room, Entity_Pickup *entity, void *saveSt } while (uVar6 < 0x20); } if (*(int *)((char *)saveState + 0x6c) != 0) { - ((SharedPtr *)(&entity->_flipSaveState))->SharedPtr::assign((int *)((int)saveState + 0x6c)); + ((SharedPtr *)(&entity->_flipSaveState))->SharedPtr::assign((int *)(GHIDRA_INT(saveState) + 0x6c)); ((ANM2 *)(&entity->_altPedestalANM2))->ANM2::Reset(); } UpdateLootPreview(entity); if (((g_game->_currentRoomIdx == -0xc) && (g_game->_isStartingFromState != 0)) && ((entity->_variant == 100 && (-1 < entity->_spawnGridIndex)))) { - uVar1 = *(undefined4 *)((int)&entity->_flags + 4); - *(uint *)&entity->_flags = (uint)entity->_flags | 0x40000; - *(undefined4 *)((int)&entity->_flags + 4) = uVar1; + uVar1 = *(undefined4 *)(GHIDRA_INT(&entity->_flags) + 4); + *(uint *)&entity->_flags = GHIDRA_UINT(entity->_flags) | 0x40000; + *(undefined4 *)(GHIDRA_INT(&entity->_flags) + 4) = uVar1; *(undefined4 *)&(*(undefined1 *)((char *)(room) + 0x7764)) = 0xffffffff; return; } @@ -5422,13 +5422,13 @@ void Entity_Pickup::RestoreState(Room *room, Entity_Pickup *entity, void *saveSt local_18.x = *(float *)((char *)gameRoom + 0x1c); fVar7 = *(float *)((char *)gameRoom + 0x20); uVar6 = Random(); - uintFixup = __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]; + uintFixup = __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]; uVar5 = Random(); (entity->_pos).x = - (float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283064e-10 * (local_18.x - local_10.x) + local_10.x; (entity->_pos).y = - (float)((double)(int)uVar6 + uintFixup) * 2.3283064e-10 * (fVar7 - fVar8) + fVar8; + (float)((double)GHIDRA_INT(uVar6) + uintFixup) * 2.3283064e-10 * (fVar7 - fVar8) + fVar8; return; } if (iVar4 == 0x44) { @@ -5458,7 +5458,7 @@ void Entity_Pickup::RestoreState(Room *room, Entity_Pickup *entity, void *saveSt (entity->_priceANM2)._animDefaultName._capacity = uVar6; (entity->_priceANM2)._animState._animation = gameRoom; (entity->_priceANM2)._animState._animData = pvVar2; - *(undefined1 *)((int)&(entity->_priceANM2)._overlayAnimState._animation + 3) = 1; + *(undefined1 *)(GHIDRA_INT(&(entity->_priceANM2)._overlayAnimState._animation) + 3) = 1; *(undefined1 *)&(entity->_priceANM2)._animState._layerFrames = *(undefined1 *)((char *)saveState + 0x23); *(undefined4 *)((entity->_priceANM2)._filename._buf + 8) = @@ -5471,9 +5471,9 @@ void Entity_Pickup::RestoreState(Room *room, Entity_Pickup *entity, void *saveSt *(undefined4 *)((entity->_priceANM2)._animDefaultName._buf + 0xc) = *(undefined4 *)((char *)saveState + 0xc); if (-1 < *(char *)((char *)saveState + 0x60)) { - uVar6 = (uint)*(char *)((char *)saveState + 0x60); - if ((uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2) <= uVar6) { + uVar6 = GHIDRA_UINT(*(char *)((char *)saveState + 0x60)); + if (GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2)) <= uVar6) { uVar6 = 0; } player = (EntityPtr)((Game *)(g_game))->Game::GetPlayer(uVar6); @@ -5498,7 +5498,7 @@ void Entity_Pickup::RestoreState(Room *room, Entity_Pickup *entity, void *saveSt ((Entity_NPC *)entity,*(uint *)((char *)saveState + 0x34), *(int *)((char *)saveState + 0x18),0); } - bVar3 = ((Vector *)((Vector *)((int)saveState + 0x28)))->Vector::operator_eq(&g_vectorZero); + bVar3 = ((Vector *)((Vector *)(GHIDRA_INT(saveState) + 0x28)))->Vector::operator_eq(&g_vectorZero); if (bVar3 != 0) { bVar10 = 0; bVar9 = 0; @@ -5508,7 +5508,7 @@ void Entity_Pickup::RestoreState(Room *room, Entity_Pickup *entity, void *saveSt Room::FindFreePickupSpawnPosition(room,&local_10,vecResult,fVar8,bVar3,bVar9,bVar10); vecResult = MusicManager::RandomVector(&local_18); uVar6 = Random(); - fVar7 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar7 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10; fVar8 = vecResult->x; (entity->_pos).y = fVar7 * vecResult->y * 20.0 + local_10.y; diff --git a/src/game/entity_player.cpp b/src/game/entity_player.cpp index c774b3c..78660c2 100644 --- a/src/game/entity_player.cpp +++ b/src/game/entity_player.cpp @@ -40,7 +40,7 @@ int Entity_Player::GetHearts() // 0042a2f0 int Entity_Player::GetBatteryCharge(int slot) { - if ((uint)slot < 4) { + if (GHIDRA_UINT(slot) < 4) { return this->_activeDesc[slot]._item; } return 0; @@ -141,7 +141,7 @@ int Entity_Player::GetMovementDirection() // 00505c80 int Entity_Player::GetActiveItem(int slot) { - if ((uint)slot < 4) { + if (GHIDRA_UINT(slot) < 4) { return this->_activeDesc[slot]._charge; } return 0; @@ -209,7 +209,7 @@ int Entity_Player::GetGoldenHearts() // 005b1780 byte Entity_Player::HasWeaponType(int weaponType) { - if ((uint)weaponType < 0x11) { + if (GHIDRA_UINT(weaponType) < 0x11) { return *(byte *)((char *)this->_weapons + weaponType + 0x14); } return 0; @@ -226,16 +226,16 @@ RNG * Entity_Player::GetCollectibleRNG(int id) return (this->_collectibleRNGs)._begin; } rngsEnd = (this->_collectibleRNGs)._end; - if ((int)rngsEnd - (int)(this->_collectibleRNGs)._begin >> 4 <= id) { + if (GHIDRA_INT(rngsEnd) - GHIDRA_INT((this->_collectibleRNGs)._begin) >> 4 <= id) { KAGE_LogMessage(0x10,(byte *)"Collectible ID out of bounds!\n"); rngsEnd = (this->_collectibleRNGs)._end; } rngsBegin = (this->_collectibleRNGs)._begin; - lastIndex = ((int)rngsEnd - (int)rngsBegin >> 4) - 1; - if (lastIndex < (uint)id) { + lastIndex = (GHIDRA_INT(rngsEnd) - GHIDRA_INT(rngsBegin) >> 4) - 1; + if (lastIndex < GHIDRA_UINT(id)) { id = lastIndex; } - return (RNG *)((int)rngsBegin + id * 0x10); + return (RNG *)(GHIDRA_INT(rngsBegin) + id * 0x10); } // 005b1a20 @@ -288,7 +288,7 @@ void Entity_Player::moms_bracelet_grab() local_8 = 0xffffffff; puStack_c = &LAB_00af59cd; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(local_2c + 0x28); + local_14 = __security_cookie ^ GHIDRA_UINT((local_2c + 0x28)); ExceptionList = &local_10; room = g_game->_room; if (this->_itemState != 0x25c) { @@ -301,8 +301,8 @@ void Entity_Player::moms_bracelet_grab() } local_38.x = local_38.x * 22.0; pEVar9 = (EntityPtr *)(fVar8 * 22.0); - gridIndex = (int)(((local_38.x + (this->_pos).x) - 40.0) / 40.0 + 0.5); - iVar5 = (int)((((float)pEVar9 + (this->_pos).y) - 120.0) / 40.0 + 0.5); + gridIndex = GHIDRA_INT((((local_38.x + (this->_pos).x) - 40.0) / 40.0 + 0.5)); + iVar5 = GHIDRA_INT(((((float)pEVar9 + (this->_pos).y) - 120.0) / 40.0 + 0.5)); if ((((-1 < gridIndex) && (gridIndex < room->_gridWidth)) && (-1 < iVar5)) && (((iVar5 < room->_gridHeight && (gridIndex = room->_gridWidth * iVar5 + gridIndex, -1 < gridIndex)) && @@ -334,7 +334,7 @@ void Entity_Player::moms_bracelet_grab() entityCount = (undefined1 *)nearbyEntities._size; if ((undefined1 *)nearbyEntities._size != (undefined1 *)0x0) { do { - entity = *(Entity_Effect **)((nearbyEntities._data)->_buf + (int)local_30 * 4); + entity = *(Entity_Effect **)((nearbyEntities._data)->_buf + GHIDRA_INT(local_30) * 4); if ((*(int *)&g_game->_deathmatchManager < 2) || (((Entity *)entity)->_type != 1)) { iVar5 = ((Entity *)entity)->_type; if (iVar5 - 10U < 0x3de) goto LAB_005b1bf2; @@ -350,23 +350,23 @@ LAB_005b1bf2: if (iVar5 == 0x1b) { if ((((Entity *)entity)->_variant == 0) && (((Entity *)entity)->_subtype == 0)) { ((Entity *)entity)->_subtype = 99; - local_2c._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(local_2c) + 0x0)) = std::_Allocate(0x30); local_1c = 0x2c; local_18 = 0x2f; - builtin_strncpy((char *)local_2c._0_4_,"gfx/monsters/classic/monster_127_redhost.png", + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_2c) + 0x0)),"gfx/monsters/classic/monster_127_redhost.png", 0x2d); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; Sprite::ReplaceSpritesheet ((Sprite *)&((Entity *)entity)->_sprite,0,(std_string *)local_2c); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; bVar3 = extraout_CL; if (0xf < local_18) { uVar7 = local_18 + 1; - pcVar6 = (char *)local_2c._0_4_; + pcVar6 = (*(undefined4 *)((char *)&((char *)local_2c) + 0x0)); if (0xfff < uVar7) { - pcVar6 = *(char **)(local_2c._0_4_ + -4); + pcVar6 = *(char **)((*(undefined4 *)((char *)&(local_2c) + 0x0)) + -4); uVar7 = local_18 + 0x24; - if ((char *)0x1f < (char *)(local_2c._0_4_ + (-4 - (int)pcVar6))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_2c) + 0x0)) + (-4 - GHIDRA_INT(pcVar6)))) { LAB_005b1e76: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -389,20 +389,20 @@ LAB_005b1e76: local_2c[1] = '\0'; local_2c[2] = '\0'; local_2c[3] = '\0'; - local_2c._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_2c) + 0x0)) = std::_Allocate(0x20); local_1c = 0x1c; local_18 = 0x1f; - builtin_strncpy((char *)local_2c._0_4_,"gfx/002.040_thrown tear.anm2",0x1d); - local_8._0_1_ = 2; + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_2c) + 0x0)),"gfx/002.040_thrown tear.anm2",0x1d); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; ((ANM2 *)((ANM2 *)local_38.y))->ANM2::Load((std_string *)local_2c,1); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; if (0xf < local_18) { uVar7 = local_18 + 1; - pcVar6 = (char *)local_2c._0_4_; + pcVar6 = (*(undefined4 *)((char *)&((char *)local_2c) + 0x0)); if (0xfff < uVar7) { - pcVar6 = *(char **)(local_2c._0_4_ + -4); + pcVar6 = *(char **)((*(undefined4 *)((char *)&(local_2c) + 0x0)) + -4); uVar7 = local_18 + 0x24; - if ((char *)0x1f < (char *)(local_2c._0_4_ + (-4 - (int)pcVar6))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_2c) + 0x0)) + (-4 - GHIDRA_INT(pcVar6)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -412,9 +412,9 @@ LAB_005b1e76: LAB_005b2124: ((ANM2 *)((ANM2 *)local_38.y))->ANM2::Play((byte *)"Rock1",0); heldEffect = local_30; - (((Entity *)((int)local_30 + 0x410))->_damageEvents)._capacity = (void *)0x2; - ((Entity *)((int)local_30 + 0x410))->_pendingDamage = 1.26117e-41; - ((Entity *)((int)local_30 + 0x410))->_index = ((Entity *)entity)->_initSeed; + (((Entity *)(GHIDRA_INT(local_30) + 0x410))->_damageEvents)._capacity = (void *)0x2; + ((Entity *)(GHIDRA_INT(local_30) + 0x410))->_pendingDamage = 1.26117e-41; + ((Entity *)(GHIDRA_INT(local_30) + 0x410))->_index = ((Entity *)entity)->_initSeed; if (local_30->_parent != (EntityPtr)0x0) { local_40.y = (float)&local_30->_parent; std::multiset::erase(); @@ -430,23 +430,23 @@ LAB_005b2184: else if (iVar5 == 0xcc) { if ((((Entity *)entity)->_variant == 0) && (((Entity *)entity)->_subtype == 0)) { ((Entity *)entity)->_subtype = 99; - local_2c._0_4_ = std::_Allocate(0x40); + (*(undefined4 *)((char *)&(local_2c) + 0x0)) = std::_Allocate(0x40); local_1c = 0x36; local_18 = 0x3f; - builtin_strncpy((char *)local_2c._0_4_, + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_2c) + 0x0)), "gfx/monsters/rebirth/monster_247_flesh mobile host.png",0x37); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; Sprite::ReplaceSpritesheet ((Sprite *)&((Entity *)entity)->_sprite,1,(std_string *)local_2c); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; bVar3 = extraout_CL_01; if (0xf < local_18) { uVar7 = local_18 + 1; - pcVar6 = (char *)local_2c._0_4_; + pcVar6 = (*(undefined4 *)((char *)&((char *)local_2c) + 0x0)); if (0xfff < uVar7) { - pcVar6 = *(char **)(local_2c._0_4_ + -4); + pcVar6 = *(char **)((*(undefined4 *)((char *)&(local_2c) + 0x0)) + -4); uVar7 = local_18 + 0x24; - if ((char *)0x1f < (char *)(local_2c._0_4_ + (-4 - (int)pcVar6))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_2c) + 0x0)) + (-4 - GHIDRA_INT(pcVar6)))) goto LAB_005b1e76; } operator_delete(pcVar6,uVar7); @@ -455,9 +455,9 @@ LAB_005b2184: ((ANM2 *)(&((Entity *)entity)->_sprite))->ANM2::LoadGraphics(bVar3); *(undefined4 *)((char *)entity + 0x410) = 0xf; ((ANM2 *)(&((Entity *)entity)->_sprite))->ANM2::SetFrame((std_string *)"Bombed",0); - uVar13 = *(undefined4 *)((int)&((Entity *)entity)->_flags + 4); - *(uint *)&((Entity *)entity)->_flags = (uint)((Entity *)entity)->_flags & 0xffffffef; - *(undefined4 *)((int)&((Entity *)entity)->_flags + 4) = uVar13; + uVar13 = *(undefined4 *)(GHIDRA_INT(&((Entity *)entity)->_flags) + 4); + *(uint *)&((Entity *)entity)->_flags = GHIDRA_UINT(((Entity *)entity)->_flags) & 0xffffffef; + *(undefined4 *)(GHIDRA_INT(&((Entity *)entity)->_flags) + 4) = uVar13; uVar7 = Random(); local_30 = (Entity_Effect *) ((Game *)(g_game))->Game::Spawn(1000,0x88,&this->_pos,&g_vectorZero,(Entity *)0x0,0, @@ -469,20 +469,20 @@ LAB_005b2184: local_2c[1] = '\0'; local_2c[2] = '\0'; local_2c[3] = '\0'; - local_2c._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_2c) + 0x0)) = std::_Allocate(0x20); local_1c = 0x1c; local_18 = 0x1f; - builtin_strncpy((char *)local_2c._0_4_,"gfx/002.040_thrown tear.anm2",0x1d); - local_8._0_1_ = 4; + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_2c) + 0x0)),"gfx/002.040_thrown tear.anm2",0x1d); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; ((ANM2 *)((ANM2 *)local_38.y))->ANM2::Load((std_string *)local_2c,1); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; if (0xf < local_18) { uVar7 = local_18 + 1; - pcVar6 = (char *)local_2c._0_4_; + pcVar6 = (*(undefined4 *)((char *)&((char *)local_2c) + 0x0)); if (0xfff < uVar7) { - pcVar6 = *(char **)(local_2c._0_4_ + -4); + pcVar6 = *(char **)((*(undefined4 *)((char *)&(local_2c) + 0x0)) + -4); uVar7 = local_18 + 0x24; - if ((char *)0x1f < (char *)(local_2c._0_4_ + (-4 - (int)pcVar6))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_2c) + 0x0)) + (-4 - GHIDRA_INT(pcVar6)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -498,9 +498,9 @@ LAB_005b2184: entity->Remove(); uVar7 = Random(); iVar5 = 0; - uVar13._0_1_ = 0; - uVar13._1_1_ = 0; - uVar13._2_2_ = 0; + (*(undefined1 *)((char *)&(uVar13) + 0x0)) = 0; + (*(undefined1 *)((char *)&(uVar13) + 0x1)) = 0; + (*(undefined2 *)((char *)&(uVar13) + 0x2)) = 0; pVVar12 = &g_vectorZero; pVVar4 = &this->_pos; fVar11 = 1.90577e-43; @@ -508,7 +508,7 @@ LAB_005b2184: fVar8 = 8.36807e-39; local_30 = (Entity_Effect *) ((Game *)(g_game))->Game::Spawn(1000,0x88,pVVar4,&g_vectorZero,(Entity *)0x0,0,uVar7); - ((ANM2 *)((ANM2 *)((int)register0x00000010 + -0x284)))->ANM2::ANM2(&((Entity *)entity)->_sprite); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(register0x00000010) + -0x284)))->ANM2::ANM2(&((Entity *)entity)->_sprite); other._championColor._offset[0] = fVar8; other._filename._buf[0] = in_stack_fffffd7c[0]; other._filename._buf[1] = in_stack_fffffd7c[1]; @@ -526,8 +526,8 @@ LAB_005b2184: other._filename._buf[0xd] = in_stack_fffffd7c[0xd]; other._filename._buf[0xe] = in_stack_fffffd7c[0xe]; other._filename._buf[0xf] = in_stack_fffffd7c[0xf]; - other._filename._size = in_stack_fffffd7c._16_4_; - other._filename._capacity = in_stack_fffffd7c._20_4_; + other._filename._size = (*(undefined4 *)((char *)&(in_stack_fffffd7c) + 0x10)); + other._filename._capacity = (*(undefined4 *)((char *)&(in_stack_fffffd7c) + 0x14)); other._animDefaultName._buf[0] = in_stack_fffffd7c[0x18]; other._animDefaultName._buf[1] = in_stack_fffffd7c[0x19]; other._animDefaultName._buf[2] = in_stack_fffffd7c[0x1a]; @@ -544,75 +544,75 @@ LAB_005b2184: other._animDefaultName._buf[0xd] = in_stack_fffffd7c[0x25]; other._animDefaultName._buf[0xe] = in_stack_fffffd7c[0x26]; other._animDefaultName._buf[0xf] = in_stack_fffffd7c[0x27]; - other._animDefaultName._size = in_stack_fffffd7c._40_4_; - other._animDefaultName._capacity = in_stack_fffffd7c._44_4_; - other._animState._animation = (void *)in_stack_fffffd7c._48_4_; - other._animState._animData = (void *)in_stack_fffffd7c._52_4_; - other._animState._layerFrames = (void *)in_stack_fffffd7c._56_4_; - other._animState._nullLayerFrames = (void *)in_stack_fffffd7c._60_4_; - other._animState._animFrame = (float)in_stack_fffffd7c._64_4_; + other._animDefaultName._size = (*(undefined4 *)((char *)&(in_stack_fffffd7c) + 0x28)); + other._animDefaultName._capacity = (*(undefined4 *)((char *)&(in_stack_fffffd7c) + 0x2c)); + other._animState._animation = (*(undefined4 *)((char *)&((void *)in_stack_fffffd7c) + 0x30)); + other._animState._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffd7c) + 0x34)); + other._animState._layerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffd7c) + 0x38)); + other._animState._nullLayerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffd7c) + 0x3c)); + other._animState._animFrame = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0x40)); other._animState._isPlaying = in_stack_fffffd7c[0x44]; - other._animState._21_3_ = in_stack_fffffd7c._69_3_; - other._animState._currentlyTriggeredEvents = in_stack_fffffd7c._72_4_; - other._animState._previouslyTriggeredEvents = in_stack_fffffd7c._76_4_; - other._overlayAnimState._animation = (void *)in_stack_fffffd7c._80_4_; - other._overlayAnimState._animData = (void *)in_stack_fffffd7c._84_4_; - other._overlayAnimState._layerFrames = (void *)in_stack_fffffd7c._88_4_; - other._overlayAnimState._nullLayerFrames = (void *)in_stack_fffffd7c._92_4_; - other._overlayAnimState._animFrame = (float)in_stack_fffffd7c._96_4_; + (*(undefined1 *)((char *)&(other._animState) + 0x15)) = (*(undefined1 *)((char *)&(in_stack_fffffd7c) + 0x45)); + other._animState._currentlyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffd7c) + 0x48)); + other._animState._previouslyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffd7c) + 0x4c)); + other._overlayAnimState._animation = (*(undefined4 *)((char *)&((void *)in_stack_fffffd7c) + 0x50)); + other._overlayAnimState._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffd7c) + 0x54)); + other._overlayAnimState._layerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffd7c) + 0x58)); + other._overlayAnimState._nullLayerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffd7c) + 0x5c)); + other._overlayAnimState._animFrame = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0x60)); other._overlayAnimState._isPlaying = in_stack_fffffd7c[100]; - other._overlayAnimState._21_3_ = in_stack_fffffd7c._101_3_; - other._overlayAnimState._currentlyTriggeredEvents = in_stack_fffffd7c._104_4_; - other._overlayAnimState._previouslyTriggeredEvents = in_stack_fffffd7c._108_4_; + (*(undefined1 *)((char *)&(other._overlayAnimState) + 0x15)) = (*(undefined1 *)((char *)&(in_stack_fffffd7c) + 0x65)); + other._overlayAnimState._currentlyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffd7c) + 0x68)); + other._overlayAnimState._previouslyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffd7c) + 0x6c)); other._overlayRenderFirst = in_stack_fffffd7c[0x70]; - other._113_3_ = in_stack_fffffd7c._113_3_; - other._animData = (void *)in_stack_fffffd7c._116_4_; - other._animCount = in_stack_fffffd7c._120_4_; - other._layerState = (void *)in_stack_fffffd7c._124_4_; - other._layerCount = in_stack_fffffd7c._128_4_; - other._nullLayerNames = (void *)in_stack_fffffd7c._132_4_; - other._numNullLayers = in_stack_fffffd7c._136_4_; - other._eventNames = (void *)in_stack_fffffd7c._140_4_; - other._numEvents = in_stack_fffffd7c._144_4_; - other._offset.x = (float)in_stack_fffffd7c._148_4_; - other._offset.y = (float)in_stack_fffffd7c._152_4_; - other._scale.x = (float)in_stack_fffffd7c._156_4_; - other._scale.y = (float)in_stack_fffffd7c._160_4_; - other._rotation = (float)in_stack_fffffd7c._164_4_; - other._color._tint[0] = (float)in_stack_fffffd7c._168_4_; - other._color._tint[1] = (float)in_stack_fffffd7c._172_4_; - other._color._tint[2] = (float)in_stack_fffffd7c._176_4_; - other._color._tint[3] = (float)in_stack_fffffd7c._180_4_; - other._color._colorize[0] = (float)in_stack_fffffd7c._184_4_; - other._color._colorize[1] = (float)in_stack_fffffd7c._188_4_; - other._color._colorize[2] = (float)in_stack_fffffd7c._192_4_; - other._color._colorize[3] = (float)in_stack_fffffd7c._196_4_; - other._color._offset[0] = (float)in_stack_fffffd7c._200_4_; - other._color._offset[1] = (float)in_stack_fffffd7c._204_4_; - other._color._offset[2] = (float)in_stack_fffffd7c._208_4_; - other._championColor._tint[0] = (float)in_stack_fffffd7c._212_4_; - other._championColor._tint[1] = (float)in_stack_fffffd7c._216_4_; - other._championColor._tint[2] = (float)in_stack_fffffd7c._220_4_; - other._championColor._tint[3] = (float)in_stack_fffffd7c._224_4_; - other._championColor._colorize[0] = (float)in_stack_fffffd7c._228_4_; - other._championColor._colorize[1] = (float)in_stack_fffffd7c._232_4_; - other._championColor._colorize[2] = (float)in_stack_fffffd7c._236_4_; - other._championColor._colorize[3] = (float)in_stack_fffffd7c._240_4_; + (*(undefined1 *)((char *)&(other) + 0x71)) = (*(undefined1 *)((char *)&(in_stack_fffffd7c) + 0x71)); + other._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffd7c) + 0x74)); + other._animCount = (*(undefined4 *)((char *)&(in_stack_fffffd7c) + 0x78)); + other._layerState = (*(undefined4 *)((char *)&((void *)in_stack_fffffd7c) + 0x7c)); + other._layerCount = (*(undefined4 *)((char *)&(in_stack_fffffd7c) + 0x80)); + other._nullLayerNames = (*(undefined4 *)((char *)&((void *)in_stack_fffffd7c) + 0x84)); + other._numNullLayers = (*(undefined4 *)((char *)&(in_stack_fffffd7c) + 0x88)); + other._eventNames = (*(undefined4 *)((char *)&((void *)in_stack_fffffd7c) + 0x8c)); + other._numEvents = (*(undefined4 *)((char *)&(in_stack_fffffd7c) + 0x90)); + other._offset.x = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0x94)); + other._offset.y = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0x98)); + other._scale.x = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0x9c)); + other._scale.y = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xa0)); + other._rotation = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xa4)); + other._color._tint[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xa8)); + other._color._tint[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xac)); + other._color._tint[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xb0)); + other._color._tint[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xb4)); + other._color._colorize[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xb8)); + other._color._colorize[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xbc)); + other._color._colorize[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xc0)); + other._color._colorize[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xc4)); + other._color._offset[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xc8)); + other._color._offset[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xcc)); + other._color._offset[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xd0)); + other._championColor._tint[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xd4)); + other._championColor._tint[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xd8)); + other._championColor._tint[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xdc)); + other._championColor._tint[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xe0)); + other._championColor._colorize[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xe4)); + other._championColor._colorize[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xe8)); + other._championColor._colorize[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xec)); + other._championColor._colorize[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffd7c) + 0xf0)); other._championColor._offset[1] = fVar10; other._championColor._offset[2] = fVar11; - other._256_4_ = pVVar4; + (*(undefined4 *)((char *)&(other) + 0x100)) = pVVar4; other._playbackSpeed = (float)pVVar12; - other._264_1_ = (char)uVar13; + (*(undefined1 *)((char *)&(other) + 0x108)) = (char)uVar13; other._loaded = SUB41(uVar13,1); - other._266_2_ = SUB42(uVar13,2); + (*(undefined2 *)((char *)&(other) + 0x10a)) = SUB42(uVar13,2); other._shadowLayerIndex = iVar5; other._bitflags = uVar7; ((ANM2 *)(&local_30->_sprite))->ANM2::operator_assign(other); - (((Entity *)((int)local_30 + 0x410))->_damageEvents)._capacity = (void *)0xc; - ((Entity *)((int)local_30 + 0x410))->_pendingDamage = 0.0; - *(undefined4 *)&((Entity *)((int)local_30 + 0x410))->_pendingDamageFlags = 0; + (((Entity *)(GHIDRA_INT(local_30) + 0x410))->_damageEvents)._capacity = (void *)0xc; + ((Entity *)(GHIDRA_INT(local_30) + 0x410))->_pendingDamage = 0.0; + *(undefined4 *)&((Entity *)(GHIDRA_INT(local_30) + 0x410))->_pendingDamageFlags = 0; pEVar9 = &local_30->_parent; - ((Entity *)((int)local_30 + 0x410))->_index = ((Entity *)entity)->_initSeed; + ((Entity *)(GHIDRA_INT(local_30) + 0x410))->_index = ((Entity *)entity)->_initSeed; if (*pEVar9 != (EntityPtr)0x0) { local_40.y = (float)pEVar9; std::multiset::erase(); @@ -630,15 +630,15 @@ LAB_005b2184: queryResult = EntityList::QueryRadius ((EntityList *)local_40.y,(EntityList_EL *)(local_2c + 8),&this->_pos, 44.0,6); - nearbyEntities._0_1_ = '\x01'; + (*(undefined1 *)((char *)&(nearbyEntities) + 0x0)) = '\x01'; nearbyEntities._data = queryResult->_data; nearbyEntities._capacity = queryResult->_capacity; nearbyEntities._size = queryResult->_size; local_38.y = (float)nearbyEntities._data; if (local_2c[8] == '\0') { - local_8._0_1_ = 5; - tracked_alloc(1,(void *)local_2c._12_4_,0); - local_8 = (uint)local_8._1_3_ << 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; + tracked_alloc(1,(*(undefined4 *)((char *)&((void *)local_2c) + 0xc)),0); + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; local_38.y = (float)nearbyEntities._data; } uVar7 = 0; @@ -658,23 +658,23 @@ LAB_005b219a: ; ((ANM2 *)(&spriteCopy))->ANM2::ANM2((ANM2 *)(rockShot + 0x12)); Isaac::SwapANM2(&local_30->_sprite,&spriteCopy); - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; ((ANM2 *)(room))->ANM2::Reset(); ((AnimationState *)(&spriteCopy._overlayAnimState))->AnimationState::~AnimationState(); ((AnimationState *)(&spriteCopy._animState))->AnimationState::~AnimationState(); ((std::string *)(spriteCopy._animDefaultName._buf))->std::string::_Tidy_deallocate(); ((std::string *)((char *)&spriteCopy))->std::string::_Tidy_deallocate(); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; uVar1 = *(ushort *)((char *)rockShot + 0x32); - (((Entity *)((int)local_30 + 0x410))->_damageEvents)._capacity = - (undefined1 *)(uint)uVar1; - ((Entity *)((int)local_30 + 0x410))->_pendingDamage = - (float)(uint)*(ushort *)(rockShot + 0xc); - ((Entity *)((int)local_30 + 0x410))->_index = rockShot[0xfb]; - *(undefined4 *)&((Entity *)((int)local_30 + 0x410))->_pendingDamageFlags = 0; - if ((undefined1 *)(uint)uVar1 == &DAT_0000000e) { - *(int *)&((Entity *)((int)local_30 + 0x410))->_pendingDamageFlags = - (int)(float)rockShot[0xe0]; + (((Entity *)(GHIDRA_INT(local_30) + 0x410))->_damageEvents)._capacity = + (undefined1 *)GHIDRA_UINT(uVar1); + ((Entity *)(GHIDRA_INT(local_30) + 0x410))->_pendingDamage = + (float)GHIDRA_UINT(*(ushort *)(rockShot + 0xc)); + ((Entity *)(GHIDRA_INT(local_30) + 0x410))->_index = rockShot[0xfb]; + *(undefined4 *)&((Entity *)(GHIDRA_INT(local_30) + 0x410))->_pendingDamageFlags = 0; + if ((undefined1 *)GHIDRA_UINT(uVar1) == &DAT_0000000e) { + *(int *)&((Entity *)(GHIDRA_INT(local_30) + 0x410))->_pendingDamageFlags = + GHIDRA_INT((float)rockShot[0xe0]); } pEVar9 = &local_30->_parent; if (local_30->_parent != (EntityPtr)0x0) { @@ -692,7 +692,7 @@ LAB_005b219a: goto LAB_005b219a; } uVar7 = uVar7 + 1; - } while (uVar7 < (uint)nearbyEntities._size); + } while (uVar7 < GHIDRA_UINT(nearbyEntities._size)); } PlayExtraAnimation(this,(byte *)"LiftItem"); ((ANM2 *)(&this->_heldSprite))->ANM2::Reset(); @@ -700,20 +700,20 @@ LAB_005b219a: this->_itemState = 0x25c; this->_itemStateCooldown = 0; LAB_005b2306: - if (nearbyEntities._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(nearbyEntities) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (nearbyEntities._data != (ANM2 *)0x0) { - uVar7 = ((ANM2 *)((int)nearbyEntities._data + -0x114))->_bitflags; + uVar7 = ((ANM2 *)(GHIDRA_INT(nearbyEntities._data) + -0x114))->_bitflags; qVar2 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar7; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar7; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar2 < uVar7); - free(&((ANM2 *)((int)nearbyEntities._data + -0x114))->_bitflags); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < uVar7)); + free(&((ANM2 *)(GHIDRA_INT(nearbyEntities._data) + -0x114))->_bitflags); } } } @@ -731,7 +731,7 @@ void Entity_Player::UseRedKey() int door; doorSlot = 0; - doorIt = (int *)((int)g_game->_room + 0x7744); + doorIt = (int *)(GHIDRA_INT(g_game->_room) + 0x7744); while ((door = *doorIt, door == 0 || (dy = (this->_pos).y - *(float *)(door + 0x340), dx = (this->_pos).x - *(float *)(door + 0x33c), 14400.0 <= dy * dy + dx * dx))) { @@ -796,7 +796,7 @@ void Entity_Player::use_card_hagalaz(RNG *rng) Manager *manager; EntityRef *sourceRef; - rockEnemyTable[0x5e] = __security_cookie ^ (uint)(rockEnemyTable + 0x5f); + rockEnemyTable[0x5e] = __security_cookie ^ GHIDRA_UINT((rockEnemyTable + 0x5f)); if (rng == (RNG *)0x0) { uVar1 = 0; } @@ -814,10 +814,10 @@ void Entity_Player::use_card_hagalaz(RNG *rng) gridX = local_1b8; if (1 < *(int *)((char *)pvVar4 + 0x10) + -1) { do { - if (-1 < (int)gridX) { - if ((((int)gridX < *(int *)((char *)pvVar4 + 0xc)) && (-1 < (int)local_1b0)) && - ((int)local_1b0 < *(int *)((char *)pvVar4 + 0x10))) { - iVar6 = *(int *)((char *)pvVar4 + 0xc) * (int)local_1b0 + (int)gridX; + if (-1 < GHIDRA_INT(gridX)) { + if (((GHIDRA_INT(gridX) < *(int *)((char *)pvVar4 + 0xc)) && (-1 < GHIDRA_INT(local_1b0))) && + (GHIDRA_INT(local_1b0) < *(int *)((char *)pvVar4 + 0x10))) { + iVar6 = *(int *)((char *)pvVar4 + 0xc) * GHIDRA_INT(local_1b0) + GHIDRA_INT(gridX); if (-1 < iVar6) { piVar2 = *(int **)((char *)pvVar4 + iVar6 * 4 + 0x24); if ((piVar2 != (int *)0x0) && (piVar2[1] != 0x10)) { @@ -857,14 +857,14 @@ LAB_005b2568: } } } - local_1b0 = (int *)((int)local_1b0 + 1); + local_1b0 = (int *)(GHIDRA_INT(local_1b0) + 1); pvVar4 = g_game->_room; - } while ((int)local_1b0 < *(int *)((char *)pvVar4 + 0x10) + -1); + } while (GHIDRA_INT(local_1b0) < *(int *)((char *)pvVar4 + 0x10) + -1); rngSeed = uVar1; } - local_1b8 = (void *)((int)gridX + 1); + local_1b8 = (void *)(GHIDRA_INT(gridX) + 1); pvVar4 = g_game->_room; - } while ((int)local_1b8 < *(int *)((char *)pvVar4 + 0xc) + -1); + } while (GHIDRA_INT(local_1b8) < *(int *)((char *)pvVar4 + 0xc) + -1); } rockEnemyTable[0] = 0x335; rockEnemyTable[1] = 0; @@ -990,7 +990,7 @@ LAB_005b29ae: manager = g_manager; local_1b0 = (int *)0x89; seed_fart_sound_override((int *)&local_1b0); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_1b0,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_1b0),1.0,2,0,1.0,0.0); break; } uVar3 = uVar3 + 1; @@ -1013,19 +1013,19 @@ LAB_005b2ad0: } local_1b4 = (undefined1 *)0x1e; seed_fart_sound_override((int *)&local_1b4); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_1b4,(float)local_1b0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_1b4),(float)local_1b0,2,0,1.0,0.0); uVar3 = Random(); particlesLeft = (undefined1 *)(uVar3 % 6 + 6); if (particlesLeft != (undefined1 *)0x0) { local_1b4 = particlesLeft; do { uVar1 = Random(); - fVar7 = (float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) * + fVar7 = (float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_1b4 = (undefined1 *)(fVar7 + fVar7); uVar1 = Random(); - local_1b0 = (int *)((float)((double)(int)uVar1 + - __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) * + local_1b0 = (int *)((float)((double)GHIDRA_INT(uVar1) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283064e-10 * 5.0); particleVelocity.x = cos((float)local_1b4); particleVelocity.x = particleVelocity.x * (float)local_1b0; @@ -1035,12 +1035,12 @@ LAB_005b2ad0: npcPosX = (npc->_pos).x; npcPosY = (npc->_pos).y; uVar3 = Random(); - fVar7 = (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + fVar7 = (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_1b4 = (undefined1 *)(fVar7 + fVar7); uVar3 = Random(); - local_1b0 = (int *)((float)((double)(int)uVar3 + - __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + local_1b0 = (int *)((float)((double)GHIDRA_INT(uVar3) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 20.0); fVar7 = cos((float)local_1b4); particlePos.x = fVar7 * (float)local_1b0 + npcPosX; @@ -1061,15 +1061,15 @@ LAB_005b2ad0: local_1b0 = piVar2; uVar1 = Random(); piVar2[0x11d] = - (int)(((float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)] - ) * 2.3283064e-10 * 10.0 + 2.0) * (float)local_1b4); + GHIDRA_INT((((float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)] + ) * 2.3283064e-10 * 10.0 + 2.0) * (float)local_1b4)); uVar1 = Random(); iVar6 = uVar1 % 0xf + 0xf; piVar2[0x117] = iVar6; piVar2[0x118] = iVar6; fVar7 = g_vectorOne.y; - piVar2[0x39] = (int)g_vectorOne.x; - piVar2[0x3a] = (int)fVar7; + piVar2[0x39] = GHIDRA_INT(g_vectorOne.x); + piVar2[0x3a] = GHIDRA_INT(fVar7); pcVar5 = *(code **)(*piVar2 + 0x3c); uVar1 = Random(); local_1ac = 0x3f800000; @@ -1082,7 +1082,7 @@ LAB_005b2ad0: fStack_198 = 0.0; fStack_194 = 0.0; fStack_190 = 0.0; - local_1a0 = (float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)] + local_1a0 = (float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)] ) * 2.3283064e-10 * 0.5 + 0.2; (*pcVar5)(&local_1ac,0xffffffff,0xff,0,1); (**(code **)(*local_1b0 + 0xc))(); @@ -1093,14 +1093,14 @@ LAB_005b2ad0: manager = g_manager; local_1b4 = (undefined1 *)0x89; seed_fart_sound_override((int *)&local_1b4); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_1b4,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_1b4),1.0,2,0,1.0,0.0); LAB_005b2f5e: manager = g_manager; if ((npc->_type == 0x13) && (((npc->_variant == 2 || (npc->_variant == 3)) && (npc->_i2 == 0)))) { local_1b4 = (undefined1 *)0x89; seed_fart_sound_override((int *)&local_1b4); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_1b4,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_1b4),1.0,2,0,1.0,0.0); rockDamageSource._type = 0; rockDamageSource._variant = 0; rockDamageSource._spawnerType = 0; @@ -1202,10 +1202,10 @@ int Entity_Player::reroll_collectibles_on_damage(RNG *rng, byte isIncludeActives ResetItemState(itemPool); pvVar4 = (itemPool->_collectibleRNGs)._begin; maxHeartsDelta = 0; - d4Seed = (uint *)((int)pvVar4 + 0x11c0); + d4Seed = (uint *)(GHIDRA_INT(pvVar4) + 0x11c0); rerolledCount = 0; removedItemsEnd = (int *)0x0; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); activeHistoryEntry = (itemPool->_history)._historyItems._end; historyEntry = (itemPool->_history)._historyItems._begin; activeChargeRatio = 0.0; @@ -1213,17 +1213,17 @@ int Entity_Player::reroll_collectibles_on_damage(RNG *rng, byte isIncludeActives do { if ((char)historyEntry[1] == '\0') { uVar8 = historyEntry[2]; - if (0 < *(int *)((int)(itemPool->_collectibleCounts)._begin + uVar8 * 4)) { + if (0 < *(int *)(GHIDRA_INT((itemPool->_collectibleCounts)._begin) + uVar8 * 4)) { if (g_game == (Game *)0x0) { - if (-1 < (int)uVar8) goto LAB_005c8a2a; + if (-1 < GHIDRA_INT(uVar8)) goto LAB_005c8a2a; LAB_005c8a44: local_1c = (ItemConfig_Item *)0x0; } - else if ((int)uVar8 < 0) { - if (((int)uVar8 < 0) && + else if (GHIDRA_INT(uVar8) < 0) { + if ((GHIDRA_INT(uVar8) < 0) && (pvVar9 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)~uVar8 < - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar9 >> 2)) { + GHIDRA_INT(~uVar8) < + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar9) >> 2)) { local_1c = (ItemConfig_Item *)**(undefined4 **)((char *)pvVar9 + ~uVar8 * 4); } else { @@ -1233,7 +1233,7 @@ LAB_005c8a44: else { LAB_005c8a2a: pvVar9 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar9 >> 2 <= (int)uVar8) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar9) >> 2 <= GHIDRA_INT(uVar8)) goto LAB_005c8a44; local_1c = *(ItemConfig_Item **)((char *)pvVar9 + uVar8 * 4); } @@ -1243,7 +1243,7 @@ LAB_005c8a2a: activeDesc = itemPool->_activeDesc; do { if (activeDesc->_item == local_1c->id) { - if (((int)activeSlot < 0) || ((isIncludeActives != 0 && ((int)activeSlot < 2)))) + if ((GHIDRA_INT(activeSlot) < 0) || ((isIncludeActives != 0 && (GHIDRA_INT(activeSlot) < 2)))) goto LAB_005c8a89; goto LAB_005c8c08; } @@ -1263,12 +1263,12 @@ LAB_005c8c08: } } else { - if (-1 < (int)activeSlot) { + if (-1 < GHIDRA_INT(activeSlot)) { if (local_1c->maxCharges < 1) { activeChargeRatio = 1.0; } else { - if ((int)activeSlot < 4) { + if (GHIDRA_INT(activeSlot) < 4) { iVar5 = itemPool->_activeDesc[activeSlot]._charge; } else { @@ -1279,7 +1279,7 @@ LAB_005c8c08: itemPool->_activeDesc[activeSlot]._item = 0; uVar8 = historyEntry[2]; } - piVar6 = (int *)((int)(itemPool->_collectibleCounts)._begin + uVar8 * 4); + piVar6 = (int *)(GHIDRA_INT((itemPool->_collectibleCounts)._begin) + uVar8 * 4); *piVar6 = *piVar6 + -1; maxHeartsDelta = maxHeartsDelta - local_1c->addMaxhearts; TriggerCollectibleRemoved(itemPool,historyEntry[2]); @@ -1288,9 +1288,9 @@ LAB_005c8c08: uVar8 = 0; *(undefined4 *)((char *)pvVar9 + historyEntry[2] * 4) = 0; do { - if ((((-1 < (int)uVar8) && + if ((((-1 < GHIDRA_INT(uVar8)) && (pvVar9 = (g_manager->_itemConfig)._playerForms._begin, - (int)uVar8 < (int)(g_manager->_itemConfig)._playerForms._end - (int)pvVar9 >> 2 + GHIDRA_INT(uVar8) < GHIDRA_INT((g_manager->_itemConfig)._playerForms._end) - GHIDRA_INT(pvVar9) >> 2 )) && (iVar5 = *(int *)((char *)pvVar9 + uVar8 * 4), iVar5 != 0)) && ((*(int *)(iVar5 + 8) != 0 || *(int *)(iVar5 + 0xc) != 0 && (cVar3 = ItemConfig::collectible_has_tags(*(int *)(iVar5 + 8)), cVar3 != '\0'))) @@ -1339,12 +1339,12 @@ LAB_005c8c08: if (((itemPool->_hasCurseMistEffect == 0) && (itemPool->_isCoopGhost == 0)) && ((2 < itemPool->_playerForms[uVar8] && (((pvVar9 = (g_manager->_itemConfig)._playerForms._begin, - (int)uVar8 < (int)(g_manager->_itemConfig)._playerForms._end - (int)pvVar9 >> 2 && + GHIDRA_INT(uVar8) < GHIDRA_INT((g_manager->_itemConfig)._playerForms._end) - GHIDRA_INT(pvVar9) >> 2 && (iVar5 = *(int *)((char *)pvVar9 + uVar8 * 4), iVar5 != 0)) && (iVar5 = *(int *)(iVar5 + 0x28), iVar5 != -1)))))) { if ((iVar5 < 0) || (pvVar9 = (g_manager->_itemConfig)._nullItems._begin, - (int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar9 >> 2 <= iVar5)) { + GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar9) >> 2 <= iVar5)) { formCostume = (ItemConfig_Item *)0x0; } else { @@ -1361,8 +1361,8 @@ LAB_005c8c08: removedItemsIt = removedItemsIt + 1; } while (removedItemsIt != removedItemsEnd); } - uVar8 = (int)(g_manager->_itemConfig)._playerForms._end - - (int)(g_manager->_itemConfig)._playerForms._begin >> 2; + uVar8 = GHIDRA_INT((g_manager->_itemConfig)._playerForms._end) - + GHIDRA_INT((g_manager->_itemConfig)._playerForms._begin) >> 2; formCounts = (void *)0x0; formCountsEnd = (void *)0x0; if (uVar8 != 0) { @@ -1371,10 +1371,10 @@ LAB_005c8c08: std::_Xlen(); } formCounts = std::_Allocate(uVar8 * 4); - formCountsEnd = (void *)((int)formCounts + uVar8 * 4); + formCountsEnd = (void *)(GHIDRA_INT(formCounts) + uVar8 * 4); memset(formCounts,0,uVar8 * 4); } - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); (itemPool->_history)._isLocked = 1; historyEntry = (itemPool->_history)._historyItems._begin; piVar6 = (itemPool->_history)._historyItems._end; @@ -1428,8 +1428,8 @@ LAB_005c8c08: if ((itemPool->_playerType == 0x1e) && (historyEntry[2] == 0x26b)) { historyEntry[2] = 0; } - _isIncludeActives = (int *)((int)_isIncludeActives + 1); - } while ((int)_isIncludeActives < 10); + _isIncludeActives = (int *)(GHIDRA_INT(_isIncludeActives) + 1); + } while (GHIDRA_INT(_isIncludeActives) < 10); local_1c = (ItemConfig_Item *)historyEntry[2]; if (local_1c == (ItemConfig_Item *)0x0) { historyEntry[2] = 0x19; @@ -1437,16 +1437,16 @@ LAB_005c8c08: } LAB_005c8f47: if (g_game == (Game *)0x0) { - if (-1 < (int)local_1c) goto LAB_005c8f8c; + if (-1 < GHIDRA_INT(local_1c)) goto LAB_005c8f8c; LAB_005c8fa6: _isIncludeActives = (int *)0x0; } - else if ((int)local_1c < 0) { - if (((int)local_1c < 0) && + else if (GHIDRA_INT(local_1c) < 0) { + if ((GHIDRA_INT(local_1c) < 0) && (pvVar9 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)~(uint)local_1c < - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar9 >> 2)) { - _isIncludeActives = (int *)**(undefined4 **)((char *)pvVar9 + ~(uint)local_1c * 4); + GHIDRA_INT(~GHIDRA_UINT(local_1c)) < + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar9) >> 2)) { + _isIncludeActives = (int *)**(undefined4 **)((char *)pvVar9 + ~GHIDRA_UINT(local_1c) * 4); } else { _isIncludeActives = (int *)0x0; @@ -1455,37 +1455,37 @@ LAB_005c8fa6: else { LAB_005c8f8c: pvVar9 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar9 >> 2 <= (int)local_1c) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar9) >> 2 <= GHIDRA_INT(local_1c)) goto LAB_005c8fa6; - _isIncludeActives = *(int **)((char *)pvVar9 + (int)local_1c * 4); + _isIncludeActives = *(int **)((char *)pvVar9 + GHIDRA_INT(local_1c) * 4); } if (*_isIncludeActives == 3) { dVar10 = ceil((double)((float)_isIncludeActives[0x1d] * activeChargeRatio)); - iVar5 = (int)dVar10; + iVar5 = GHIDRA_INT(dVar10); } else { iVar5 = 0; } - AddCollectible(itemPool,(int)local_1c,iVar5,0,0,0,0); + AddCollectible(itemPool,GHIDRA_INT(local_1c),iVar5,0,0,0,0); local_1c = (ItemConfig_Item *)0x0; formsEnd = (g_manager->_itemConfig)._playerForms._end; pvVar9 = (g_manager->_itemConfig)._playerForms._begin; - if ((int)formsEnd - (int)pvVar9 >> 2 != 0) { + if (GHIDRA_INT(formsEnd) - GHIDRA_INT(pvVar9) >> 2 != 0) { do { - if ((((-1 < (int)local_1c) && ((int)local_1c < (int)formsEnd - (int)pvVar9 >> 2)) && - (iVar5 = *(int *)((char *)pvVar9 + (int)local_1c * 4), iVar5 != 0)) && + if ((((-1 < GHIDRA_INT(local_1c)) && (GHIDRA_INT(local_1c) < GHIDRA_INT(formsEnd) - GHIDRA_INT(pvVar9) >> 2)) && + (iVar5 = *(int *)((char *)pvVar9 + GHIDRA_INT(local_1c) * 4), iVar5 != 0)) && (*(int *)(iVar5 + 8) != 0 || *(int *)(iVar5 + 0xc) != 0)) { cVar3 = ItemConfig::collectible_has_tags(*(undefined4 *)(iVar5 + 8)); manager = g_manager; if (cVar3 != '\0') { - piVar6 = (int *)((int)formCounts + (int)local_1c * 4); + piVar6 = (int *)(GHIDRA_INT(formCounts) + GHIDRA_INT(local_1c) * 4); *piVar6 = *piVar6 + 1; formsEnd = (manager->_itemConfig)._playerForms._end; } } - local_1c = (ItemConfig_Item *)((int)local_1c + 1); + local_1c = (ItemConfig_Item *)(GHIDRA_INT(local_1c) + 1); pvVar9 = (g_manager->_itemConfig)._playerForms._begin; - } while (local_1c < (uint)((int)formsEnd - (int)pvVar9 >> 2)); + } while (local_1c < GHIDRA_UINT((GHIDRA_INT(formsEnd) - GHIDRA_INT(pvVar9) >> 2))); activeEntry = activeHistoryEntry; } maxHeartsDelta = maxHeartsDelta + _isIncludeActives[0x16]; @@ -1543,27 +1543,27 @@ LAB_005c8f8c: AddMaxHearts(itemPool,maxHeartsDelta,0); } uVar8 = 0; - if ((int)(g_manager->_itemConfig)._playerForms._end - - (int)(g_manager->_itemConfig)._playerForms._begin >> 2 != 0) { + if (GHIDRA_INT((g_manager->_itemConfig)._playerForms._end) - + GHIDRA_INT((g_manager->_itemConfig)._playerForms._begin) >> 2 != 0) { do { iVar5 = *(int *)((char *)formCounts + uVar8 * 4); if (0 < iVar5) { IncrementPlayerFormCounter(itemPool,uVar8,iVar5); } uVar8 = uVar8 + 1; - } while (uVar8 < (uint)((int)(g_manager->_itemConfig)._playerForms._end - - (int)(g_manager->_itemConfig)._playerForms._begin >> 2)); + } while (uVar8 < GHIDRA_UINT((GHIDRA_INT((g_manager->_itemConfig)._playerForms._end) - + GHIDRA_INT((g_manager->_itemConfig)._playerForms._begin) >> 2))); } itemPool->_cacheFlags = itemPool->_cacheFlags | 0xffff; EvaluateItems(itemPool); HUD::mark_all_slots_dirty(&g_game->_hud,0,0); if (formCounts != (void *)0x0) { - uVar8 = (int)formCountsEnd - (int)formCounts & 0xfffffffc; + uVar8 = GHIDRA_INT(formCountsEnd) - GHIDRA_INT(formCounts) & 0xfffffffc; pvVar4 = formCounts; if (0xfff < uVar8) { pvVar4 = *(void **)((char *)formCounts + -4); uVar8 = uVar8 + 0x23; - if (0x1f < (uint)((int)formCounts + (-4 - (int)pvVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(formCounts) + (-4 - GHIDRA_INT(pvVar4))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1592,14 +1592,14 @@ Entity_Familiar * Entity_Player::AddItemWisp(uint param_1, Vector *param_2, char int layerStats [10]; Game *game; - layerStats[9] = __security_cookie ^ (uint)(layerStats + 10); + layerStats[9] = __security_cookie ^ GHIDRA_UINT((layerStats + 10)); iVar5 = 0x2c8; isBookOfVirtuesHeld = HasCollectible(in_ECX,0x248,0); if (isBookOfVirtuesHeld != 0) { iVar5 = 0x10012; } pvVar2 = ItemConfig::get_wisp_config(iVar5); - orbitLayer = (uint)*(short *)((char *)pvVar2 + 0x18c); + orbitLayer = GHIDRA_UINT(*(short *)((char *)pvVar2 + 0x18c)); if (-1 < *(short *)((char *)pvVar2 + 0x18c)) { uVar4 = 0; layerStats[6] = 0; @@ -1630,10 +1630,10 @@ Entity_Familiar * Entity_Player::AddItemWisp(uint param_1, Vector *param_2, char otherWispConfig = ItemConfig::get_wisp_config(iVar3); iVar3 = *(int *)(iVar5 + 0xd70); otherLayer = iVar3 - 7; - if ((otherLayer < 3) && (-1 < (int)otherLayer)) { + if ((otherLayer < 3) && (-1 < GHIDRA_INT(otherLayer))) { if ((*(int *)(iVar5 + 0x2c) == 0xce) || - ((int)*(short *)((char *)otherWispConfig + 0x18e) < layerStats[iVar3 + -4])) { - layerStats[iVar3 + -4] = (int)*(short *)((char *)otherWispConfig + 0x18e); + (GHIDRA_INT(*(short *)((char *)otherWispConfig + 0x18e)) < layerStats[iVar3 + -4])) { + layerStats[iVar3 + -4] = GHIDRA_INT(*(short *)((char *)otherWispConfig + 0x18e)); layerStats[otherLayer] = iVar5; } layerStats[iVar3 + -1] = layerStats[iVar3 + -1] + 1; @@ -1656,7 +1656,7 @@ Entity_Familiar * Entity_Player::AddItemWisp(uint param_1, Vector *param_2, char } } pvVar2 = (in_ECX->_collectibleRNGs)._begin; - rngSeed = (uint *)((int)pvVar2 + 0x2c80); + rngSeed = (uint *)(GHIDRA_INT(pvVar2) + 0x2c80); uVar4 = *rngSeed; if (uVar4 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -1674,7 +1674,7 @@ Entity_Familiar * Entity_Player::AddItemWisp(uint param_1, Vector *param_2, char *rngSeed = uVar4; wisp = (Entity_Familiar *) ((Game *)(game))->Game::Spawn(3,0xed,param_2,&g_vectorZero,(Entity *)in_ECX,param_1,uVar4); - if ((param_3 != '\0') && (-1 < (int)orbitLayer)) { + if ((param_3 != '\0') && (-1 < GHIDRA_INT(orbitLayer))) { ((Entity_Familiar *)(wisp))->Entity_Familiar::AddToOrbit(orbitLayer + 7); } wisp->Update(); @@ -1729,7 +1729,7 @@ void Entity_Player::trigger_book_of_belial_passive(int activeId, int charges) uStack_14 = 0xffffffff; puStack_18 = &LAB_00af5e50; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(local_50 + 0x40); + local_24 = __security_cookie ^ GHIDRA_UINT((local_50 + 0x40)); ExceptionList = &local_1c; player = effectSprite; bVar2 = HasCollectible(effectSprite,0x3b,0); @@ -1759,7 +1759,7 @@ LAB_005ca3bc: local_54 = 0x21; seed_fart_sound_override((int *)&local_54); ((SoundEffects *)(&local_58->_sfxManager))->SoundEffects::Play(local_54,1.0,2,0,1.0,0.0); - UseActiveItem(effectSprite,(short *)((int)&local_58 + 2),0x23,1,-1,0); + UseActiveItem(effectSprite,(short *)(GHIDRA_INT(&local_58) + 2),0x23,1,-1,0); ((Game *)(g_game))->Game::ShakeScreen(8); pvVar1 = g_game->_room; *(undefined4 *)((char *)pvVar1 + 0x7214) = 10; @@ -1803,7 +1803,7 @@ switchD_005c99c5_caseD_23: return; } do { - tmpEntity = *(Entity **)(*(int *)((char *)local_5c + 0x125c) + (int)local_58 * 4); + tmpEntity = *(Entity **)(*(int *)((char *)local_5c + 0x125c) + GHIDRA_INT(local_58) * 4); if ((*(int *)&game->_deathmatchManager < 2) || (tmpEntity->_type != 1)) { local_54 = tmpEntity->_type; if (local_54 - 10 < 0x3de) goto LAB_005c9c18; @@ -1818,7 +1818,7 @@ LAB_005c9c18: uVar3 = Random(); if (uVar3 % 3 == 0) { if (effectSprite == (Entity_Player *)0x0) { - local_50._4_4_ = 0.0; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = 0.0; fStack_48 = 0.0; fStack_44 = 0.0; local_40 = 0.0; @@ -1837,7 +1837,7 @@ LAB_005c9d6c: uVar4 = 0; } else { - local_50._4_4_ = effectSprite->_type; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = effectSprite->_type; fStack_3c = (effectSprite->_pos).x; fStack_38 = (effectSprite->_pos).y; fStack_48 = (float)effectSprite->_variant; @@ -1860,7 +1860,7 @@ LAB_005c9d53: } local_60 = *(code **)(*(int *)tmpEntity + 0x20); if (effectSprite == (Entity_Player *)0x0) { - local_50._4_4_ = 0.0; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = 0.0; fStack_48 = 0.0; fStack_44 = 0.0; local_40 = 0.0; @@ -1879,7 +1879,7 @@ LAB_005c9e81: uVar4 = 0; } else { - local_50._4_4_ = effectSprite->_type; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = effectSprite->_type; fStack_3c = (effectSprite->_pos).x; fStack_38 = (effectSprite->_pos).y; fStack_48 = (float)effectSprite->_variant; @@ -1903,7 +1903,7 @@ LAB_005c9e68: game = g_game; } } - local_58 = (Manager *)((int)local_58 + 1); + local_58 = (Manager *)(GHIDRA_INT(local_58) + 1); if (*(uint *)((char *)local_5c + 0x1264) <= local_58) { ExceptionList = local_1c; return; @@ -1919,7 +1919,7 @@ LAB_005c9e68: } if (activeId != 0x122) { if (activeId == 0x127) { - uVar3 = ((RNG *)((RNG *)((int)(effectSprite->_collectibleRNGs)._begin + 0x3b0)))->RNG::RandomInt(4); + uVar3 = ((RNG *)((RNG *)(GHIDRA_INT((effectSprite->_collectibleRNGs)._begin) + 0x3b0)))->RNG::RandomInt(4); manager = g_manager; if (uVar3 != 0) { ExceptionList = local_1c; @@ -1961,7 +1961,7 @@ LAB_005c9f70: seed_fart_sound_override((int *)&local_54); ((SoundEffects *)(&local_58->_sfxManager))->SoundEffects::Play(local_54,1.0,2,0,1.0,0.0); pvVar1 = (g_manager->_itemConfig)._nullItems._begin; - if ((0x1ec < (int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar1 & 0xfffffffcU)) && + if ((0x1ec < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar1) & 0xfffffffcU))) && (iVar5 = *(int *)((char *)pvVar1 + 0x1ec), iVar5 != 0)) { nullEffect[2] = *(undefined4 *)(iVar5 + 0x78); nullEffect[1] = 0; @@ -1973,8 +1973,8 @@ LAB_005c9f70: uVar3 = Random(); tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0xf,&effectSprite->_pos,&g_vectorZero,(Entity *)0x0,0,uVar3); local_30 = 0.0; - local_50._0_4_ = 0.2; - local_50._4_4_ = 0.2; + (*(undefined4 *)((char *)&(local_50) + 0x0)) = 0.2; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = 0.2; fStack_48 = 0.2; fStack_44 = 0.6; local_40 = 1.0; @@ -1987,8 +1987,8 @@ LAB_005c9f70: tmpEntity->Update(); } else { - local_50._0_4_ = 0.2; - local_50._4_4_ = 0.2; + (*(undefined4 *)((char *)&(local_50) + 0x0)) = 0.2; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = 0.2; fStack_48 = 0.2; fStack_44 = 0.6; local_30 = 0.0; @@ -2003,19 +2003,19 @@ LAB_005c9f70: local_54 = 0; do { uVar3 = local_54; - local_5c = (ItemConfig_Item *)((float)(int)local_54 * 0.7 * 0.25 + 0.3); + local_5c = (ItemConfig_Item *)((float)GHIDRA_INT(local_54) * 0.7 * 0.25 + 0.3); local_58 = (Manager *)((float)local_5c * 0.0); uVar4 = Random(); local_64 = (Entity *) - ((-10.0 - (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) + ((-10.0 - (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 6.0) * (float)local_5c); uVar4 = Random(); local_5c = (ItemConfig_Item *) - (((float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + (((float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 10.0 - 5.0) * 0.017453292); local_60 = (code *)cos((float)local_5c); fVar6 = sin((float)local_5c); - fVar7 = ((float)(int)uVar3 - 0.0) / 12.0; + fVar7 = ((float)GHIDRA_INT(uVar3) - 0.0) / 12.0; if (fVar7 <= 0.0) { fVar7 = 0.0; } @@ -2062,14 +2062,14 @@ LAB_005c9f70: uVar3 = Random(); tmpEntity = local_64; *(float *)(local_64[1]._sprite._animDefaultName._buf + 4) = - (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * 2.3283064e-10 + (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 10.0 + 2.0; uVar3 = Random(); iVar5 = uVar3 % 10 + 10; *(int *)(tmpEntity[1]._sprite._filename._buf + 4) = iVar5; *(int *)(tmpEntity[1]._sprite._filename._buf + 8) = iVar5; uVar3 = Random(); - sparkScaleX = (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + sparkScaleX = (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 0.4 + 0.2; sparkScaleY = sparkScaleX * g_vectorOne.y; sparkScaleX = sparkScaleX * g_vectorOne.x; @@ -2080,7 +2080,7 @@ LAB_005c9f70: (tmpEntity->_sprite)._scale.x = sparkScaleX * fVar6; local_54 = local_54 + 1; effectSprite = player; - } while ((int)local_54 < 5); + } while (GHIDRA_INT(local_54) < 5); ExceptionList = local_1c; return; } @@ -2104,7 +2104,7 @@ void Entity_Player::TriggerBookOfVirtues(int collectibleId, int charge) } if (collectibleId == 0x61) { pvVar3 = (this->_collectibleRNGs)._begin; - rngSeed = (uint *)((int)pvVar3 + 0x2480); + rngSeed = (uint *)(GHIDRA_INT(pvVar3) + 0x2480); uVar2 = *rngSeed; if (uVar2 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -2134,7 +2134,7 @@ LAB_005ca50f: wispCount = wispCount * 2; } if (0 < (short)wispCount) { - uVar2 = (uint)wispCount; + uVar2 = GHIDRA_UINT(wispCount); do { AddWisp(this,collectibleId,&this->_pos,0,0); manager = g_manager; @@ -2142,7 +2142,7 @@ LAB_005ca50f: } while (uVar2 != 0); soundId[0] = (Entity_Player *)0x1d7; seed_fart_sound_override((int *)soundId); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)soundId[0],1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(soundId[0]),1.0,2,0,1.0,0.0); } return; } @@ -2191,7 +2191,7 @@ void Entity_Player::console_spawn(int *spawnSpec, byte isAddWisp) local_8 = 0xffffffff; puStack_c = &LAB_00af5ec5; local_10 = ExceptionList; - uVar4 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar4 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; i = 0; local_34 = g_game->_room; @@ -2224,7 +2224,7 @@ void Entity_Player::console_spawn(int *spawnSpec, byte isAddWisp) return; } pEVar6 = (EntityPtr *)0x0; - rng = (uint *)((int)(local_30->_collectibleRNGs)._begin + 0x1fe0); + rng = (uint *)(GHIDRA_INT((local_30->_collectibleRNGs)._begin) + 0x1fe0); local_38 = (EntityPtr *)0x0; local_2c = (void *)0x0; spawnedEnd = (EntityPtr *)0x0; @@ -2248,7 +2248,7 @@ void Entity_Player::console_spawn(int *spawnSpec, byte isAddWisp) VStack_70.x = (float)spawnSpec[2]; VStack_70.y = (float)spawnSpec[3]; uVar4 = Random(); - local_14 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + local_14 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_14 = local_14 + local_14; local_18 = cos(local_14); @@ -2257,7 +2257,7 @@ void Entity_Player::console_spawn(int *spawnSpec, byte isAddWisp) local_14 = local_14 * 40.0; local_68._position.x = local_18 + playerPos->x; local_68._position.y = local_14 + playerPos->y; - local_68._flags = (int)VStack_70.x; + local_68._flags = GHIDRA_INT(VStack_70.x); local_68._entity = (void *)VStack_70.y; local_68._velocity.x = playerPosY; local_68._velocity.y = fVar3; @@ -2286,7 +2286,7 @@ switchD_005cac1b_caseD_14: VStack_70.x = (float)spawnSpec[2]; VStack_70.y = (float)spawnSpec[3]; uVar4 = Random(); - local_14 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + local_14 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_14 = local_14 + local_14; local_18 = cos(local_14); @@ -2295,7 +2295,7 @@ switchD_005cac1b_caseD_14: local_14 = local_14 * 40.0; local_68._position.x = local_18 + playerPos->x; local_68._position.y = local_14 + playerPos->y; - local_68._flags = (int)VStack_70.x; + local_68._flags = GHIDRA_INT(VStack_70.x); local_68._entity = (void *)VStack_70.y; local_68._velocity.x = playerPosY; local_68._velocity.y = fVar3; @@ -2319,7 +2319,7 @@ switchD_005cac1b_caseD_14: VStack_70.x = (float)spawnSpec[2]; VStack_70.y = (float)spawnSpec[3]; uVar4 = Random(); - local_14 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + local_14 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_14 = local_14 + local_14; local_18 = cos(local_14); @@ -2354,7 +2354,7 @@ switchD_005cac1b_caseD_14: VStack_70.x = (float)spawnSpec[2]; VStack_70.y = (float)spawnSpec[3]; uVar4 = Random(); - local_14 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + local_14 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_14 = local_14 + local_14; local_18 = cos(local_14); @@ -2363,7 +2363,7 @@ switchD_005cac1b_caseD_14: local_14 = local_14 * 40.0; local_68._position.x = local_18 + playerPos->x; local_68._position.y = local_14 + playerPos->y; - local_68._flags = (int)VStack_70.x; + local_68._flags = GHIDRA_INT(VStack_70.x); local_68._entity = (void *)VStack_70.y; local_68._velocity.x = playerPosY; local_68._velocity.y = fVar3; @@ -2383,8 +2383,8 @@ switchD_005cac1b_caseD_14: entriesBegin[1] = playerPosY - local_14; } local_18 = 0.0; - iVar1 = (int)entriesEnd - (int)entriesBegin >> 0x1f; - if (((int)entriesEnd - (int)entriesBegin) / 0x18 + iVar1 != iVar1) { + iVar1 = GHIDRA_INT(entriesEnd) - GHIDRA_INT(entriesBegin) >> 0x1f; + if ((GHIDRA_INT(entriesEnd) - GHIDRA_INT(entriesBegin)) / 0x18 + iVar1 != iVar1) { local_2c = (void *)0x0; do { local_14 = 0.0; @@ -2407,10 +2407,10 @@ switchD_005cac1b_caseD_14: uVar4 = uVar4 << ((byte)rngState[2] & 0x1f) ^ uVar4; uVar4 = uVar4 >> ((byte)rngState[3] & 0x1f) ^ uVar4; *rngState = uVar4; - pos = (Vector *)((int)local_2c + (int)entriesBegin); + pos = (Vector *)(GHIDRA_INT(local_2c) + GHIDRA_INT(entriesBegin)); position = Room::FindFreePickupSpawnPosition(game->_room,&VStack_70,pos,40.0,0,0,0); tmpEntity = (EntityPtr) - ((Game *)(g_game))->Game::Spawn((uint)pos[1].x,(uint)pos[1].y,position,&g_vectorZero, + ((Game *)(g_game))->Game::Spawn(GHIDRA_UINT(pos[1].x),GHIDRA_UINT(pos[1].y),position,&g_vectorZero, (Entity *)local_30,0,uVar4); *(uint *)((char *)tmpEntity + 0x16c) = *(uint *)((char *)tmpEntity + 0x16c) | 0x10000020; *(undefined4 *)((char *)tmpEntity + 0x168) = *(undefined4 *)((char *)tmpEntity + 0x168); @@ -2421,7 +2421,7 @@ switchD_005cac1b_caseD_14: *(float *)((char *)tmpEntity + 0x380) = pos[2].x; *(float *)((char *)tmpEntity + 900) = pos[2].x; ANM2::LoadDeliriumForm - ((ANM2 *)((int)tmpEntity + 0x48),*(int *)((char *)tmpEntity + 0x28), + ((ANM2 *)(GHIDRA_INT(tmpEntity) + 0x48),*(int *)((char *)tmpEntity + 0x28), *(int *)((char *)tmpEntity + 0x2c),1); if (local_38 == local_34) { std::vector::_Emplace_reallocate(local_38,&spawned); @@ -2431,29 +2431,29 @@ switchD_005cac1b_caseD_14: *local_38 = tmpEntity; spawnedEnd = local_38 + 1; } - local_14 = (float)((int)local_14 + 1); + local_14 = (float)(GHIDRA_INT(local_14) + 1); local_38 = spawnedEnd; - } while ((int)local_14 < spawnSpec[3]); + } while (GHIDRA_INT(local_14) < spawnSpec[3]); pEVar6 = spawnedEnd; } - local_2c = (void *)((int)local_2c + 0x18); - local_18 = (float)((int)local_18 + 1); - } while ((uint)local_18 < (uint)(((int)entriesEnd - (int)entriesBegin) / 0x18)); + local_2c = (void *)(GHIDRA_INT(local_2c) + 0x18); + local_18 = (float)(GHIDRA_INT(local_18) + 1); + } while (GHIDRA_UINT(local_18) < GHIDRA_UINT(((GHIDRA_INT(entriesEnd) - GHIDRA_INT(entriesBegin)) / 0x18))); local_2c = (void *)0x0; } - pEVar6 = (EntityPtr *)((int)pEVar6 >> 2); + pEVar6 = (EntityPtr *)(GHIDRA_INT(pEVar6) >> 2); local_14 = 0.0; pvVar5 = (void *)0x0; local_38 = pEVar6; if (pEVar6 != (EntityPtr *)0x0) { do { - tmpEntity = *(EntityPtr *)((char *)pvVar5 + (int)local_14 * 4); + tmpEntity = *(EntityPtr *)((char *)pvVar5 + GHIDRA_INT(local_14) * 4); spawned = tmpEntity; (**(code **)(*(int *)tmpEntity + 0xc))(); *(uint *)((char *)tmpEntity + 0x168) = *(uint *)((char *)tmpEntity + 0x168) | 0x80000000; *(undefined4 *)((char *)tmpEntity + 0x16c) = *(undefined4 *)((char *)tmpEntity + 0x16c); EntityList::AddPersistentEntity - ((EntityList *)((int)g_game->_room + 0x1218),(Entity *)tmpEntity); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(Entity *)tmpEntity); for (chainEntity = *(EntityPtr *)((char *)tmpEntity + 0x3bc); chainEntity != (EntityPtr)0x0; chainEntity = *(EntityPtr *)((char *)chainEntity + 0x3bc)) { tmpEntity = chainEntity; @@ -2475,7 +2475,7 @@ switchD_005cac1b_caseD_14: } else { ANM2::LoadDeliriumForm - ((ANM2 *)((int)chainEntity + 0x48),*(int *)((char *)chainEntity + 0x28), + ((ANM2 *)(GHIDRA_INT(chainEntity) + 0x48),*(int *)((char *)chainEntity + 0x28), *(int *)((char *)chainEntity + 0x2c),1); nextChainNpc = (EntityPtr) __RTDynamicCast(*(undefined4 *)((char *)chainEntity + 0x3c0),0, @@ -2488,9 +2488,9 @@ switchD_005cac1b_caseD_14: } while (nextChainNpc != (EntityPtr)0x0); pEVar6 = local_38; } - local_14 = (float)((int)local_14 + 1); + local_14 = (float)(GHIDRA_INT(local_14) + 1); pvVar5 = local_2c; - } while ((uint)local_14 < pEVar6); + } while (GHIDRA_UINT(local_14) < pEVar6); } if (g_game->_hallucinationTimer < 1) { ((Game *)(g_game))->Game::ShowHallucination(0x19,0x3f); @@ -2516,22 +2516,22 @@ switchD_005cac1b_caseD_14: AddWisp(this_00,*(int *)(&DAT_00b62c80 + (uVar4 & 3) * 4),playerPos,0,0); } if (entriesBegin != (float *)0x0) { - uVar4 = (((int)entriesCapacityEnd - (int)entriesBegin) / 0x18) * 0x18; + uVar4 = ((GHIDRA_INT(entriesCapacityEnd) - GHIDRA_INT(entriesBegin)) / 0x18) * 0x18; ptr = entriesBegin; if (0xfff < uVar4) { ptr = (float *)entriesBegin[-1]; uVar4 = uVar4 + 0x23; - if (0x1f < (uint)((int)entriesBegin + (-4 - (int)ptr))) goto LAB_005cb36d; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(entriesBegin) + (-4 - GHIDRA_INT(ptr))))) goto LAB_005cb36d; } operator_delete(ptr,uVar4); } if (local_2c != (void *)0x0) { - uVar4 = (int)local_34 - (int)local_2c & 0xfffffffc; + uVar4 = GHIDRA_INT(local_34) - GHIDRA_INT(local_2c) & 0xfffffffc; pvVar5 = local_2c; if (0xfff < uVar4) { pvVar5 = *(void **)((char *)local_2c + -4); uVar4 = uVar4 + 0x23; - if (0x1f < (uint)((int)local_2c + (-4 - (int)pvVar5))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_2c) + (-4 - GHIDRA_INT(pvVar5))))) { LAB_005cb36d: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -2576,7 +2576,7 @@ void Entity_Player::update_mini_mush_costume() local_8 = 0xffffffff; puStack_c = &LAB_00af5ef0; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar3 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; if ((this->_temporaryeffects)._disabled == 0) { for (piVar4 = (this->_temporaryeffects)._effects._begin; @@ -2602,7 +2602,7 @@ LAB_005cb4e6: } stackCount = stackCount + iVar6; pvVar7 = (g_manager->_itemConfig)._nullItems._begin; - iVar6 = (int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar7 >> 2; + iVar6 = GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar7) >> 2; if (iVar6 < 0x48) { costumeLevel1 = 0; costumeLevel2 = 0; @@ -2636,20 +2636,20 @@ LAB_005cb4e6: std::_Move_unchecked(pvVar7,uVar3); costumesEnd = (this->_costumeSpriteDescs)._end; local_8 = 0; - ((ANM2 *)((ANM2 *)((int)costumesEnd + -0x130)))->ANM2::Reset(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(costumesEnd) + -0x130)))->ANM2::Reset(); iVar6 = *(int *)((char *)costumesEnd + -0xd8); if (iVar6 != 0) { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar5 = *(uint *)(iVar6 + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar5; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar5; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar5); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar5)); free((void *)(iVar6 + -4)); *(undefined4 *)((char *)costumesEnd + -0xd8) = 0; } @@ -2659,13 +2659,13 @@ LAB_005cb4e6: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar5 = *(uint *)(iVar6 + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar5; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar5; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar5); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar5)); free((void *)(iVar6 + -4)); *(undefined4 *)((char *)costumesEnd + -0xd4) = 0; } @@ -2675,13 +2675,13 @@ LAB_005cb4e6: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar5 = *(uint *)(iVar6 + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar5; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar5; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar5); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar5)); free((void *)(iVar6 + -4)); *(undefined4 *)((char *)costumesEnd + -0xf8) = 0; } @@ -2691,26 +2691,26 @@ LAB_005cb4e6: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar5 = *(uint *)(iVar6 + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar5; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar5; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar5); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar5)); free((void *)(iVar6 + -4)); *(undefined4 *)((char *)costumesEnd + -0xf4) = 0; } - ((std::string *)((char *)((int)costumesEnd + -0x118)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)costumesEnd + -0x130)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(costumesEnd) + -0x118)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(costumesEnd) + -0x130)))->std::string::_Tidy_deallocate(); isCostumeRemoved = true; local_8 = 0xffffffff; costumesEndSlot = &(this->_costumeSpriteDescs)._end; - *costumesEndSlot = (void *)((int)*costumesEndSlot + -0x130); + *costumesEndSlot = (void *)(GHIDRA_INT(*costumesEndSlot) + -0x130); costumesEnd = (this->_costumeSpriteDescs)._end; } else { - pvVar7 = (void *)((int)pvVar7 + 0x130); + pvVar7 = (void *)(GHIDRA_INT(pvVar7) + 0x130); } bVar1 = isCostumeRemoved; } while (pvVar7 != costumesEnd); @@ -2724,7 +2724,7 @@ LAB_005cb4e6: } else { pvVar7 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar7 & 0xfffffffcU) < 0x11d + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar7) & 0xfffffffcU)) < 0x11d ) { AddCostume(this,(ItemConfig_Item *)0x0,0); } @@ -2735,7 +2735,7 @@ LAB_005cb4e6: } else { pvVar7 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar7 & 0xfffffffcU) < 0x121) + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar7) & 0xfffffffcU)) < 0x121) { AddCostume(this,(ItemConfig_Item *)0x0,0); } @@ -2746,7 +2746,7 @@ LAB_005cb4e6: } else { pvVar7 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar7 & 0xfffffffcU) < 0x125) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar7) & 0xfffffffcU)) < 0x125) { AddCostume(this,(ItemConfig_Item *)0x0,0); } else { @@ -2755,7 +2755,7 @@ LAB_005cb4e6: } peer = g_manager->_netplayManager; if (peer != *(NetplayManager *)(g_manager + 1)) { - uVar5 = (int)*(NetplayManager *)(g_manager + 1) - (int)peer >> 2; + uVar5 = GHIDRA_INT(*(NetplayManager *)(g_manager + 1)) - GHIDRA_INT(peer) >> 2; uVar3 = 0; if (uVar5 != 0) { do { @@ -2768,28 +2768,28 @@ LAB_005cb4e6: break; } uVar3 = uVar3 + 1; - peer = (NetplayManager)((int)peer + 4); + peer = (NetplayManager)(GHIDRA_INT(peer) + 4); } while (uVar3 < uVar5); } } uVar3 = 1; playerManager = &g_game->_playerManager; - if (1 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)) { + if (1 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))) { do { pvVar7 = (playerManager->_playerList)._end; piVar4 = (playerManager->_playerList)._begin; - if ((int)pvVar7 - (int)piVar4 >> 2 == 0) { + if (GHIDRA_INT(pvVar7) - GHIDRA_INT(piVar4) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar7 = (playerManager->_playerList)._end; piVar4 = (playerManager->_playerList)._begin; } - if (uVar3 < (uint)((int)pvVar7 - (int)piVar4 >> 2)) { + if (uVar3 < GHIDRA_UINT((GHIDRA_INT(pvVar7) - GHIDRA_INT(piVar4) >> 2))) { piVar4 = piVar4 + uVar3; } peer = g_manager->_netplayManager; if (peer != *(NetplayManager *)(g_manager + 1)) { - peerCount = (int)*(NetplayManager *)(g_manager + 1) - (int)peer >> 2; + peerCount = GHIDRA_INT(*(NetplayManager *)(g_manager + 1)) - GHIDRA_INT(peer) >> 2; uVar5 = 0; if (peerCount != 0) { do { @@ -2799,7 +2799,7 @@ LAB_005cb4e6: break; } uVar5 = uVar5 + 1; - peer = (NetplayManager)((int)peer + 4); + peer = (NetplayManager)(GHIDRA_INT(peer) + 4); } while (uVar5 < peerCount); } } @@ -2841,8 +2841,8 @@ LAB_005cb939: LAB_005cb950: uVar3 = uVar3 + 1; playerManager = &g_game->_playerManager; - } while (uVar3 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar3 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } game = g_game; g_game->_dizzyTargetIntensity = (float)stackCount / 10.0; @@ -2933,16 +2933,16 @@ RNG * Entity_Player::GetTrinketRNG(int id) uint clampedId; void *rngs; - if ((id < 0) || ((int)(this->_trinketRNGs)._end - (int)(this->_trinketRNGs)._begin >> 4 <= id)) { + if ((id < 0) || (GHIDRA_INT((this->_trinketRNGs)._end) - GHIDRA_INT((this->_trinketRNGs)._begin) >> 4 <= id)) { KAGE_LogMessage(0x10,(byte *)"Trinket ID out of bounds!\n"); } rngs = (this->_trinketRNGs)._begin; - index = ((int)(this->_trinketRNGs)._end - (int)rngs >> 4) - 1; - clampedId = -(uint)(id != 0) & id; + index = (GHIDRA_INT((this->_trinketRNGs)._end) - GHIDRA_INT(rngs) >> 4) - 1; + clampedId = -GHIDRA_UINT((id != 0)) & id; if (clampedId < index) { index = clampedId; } - return (RNG *)(index * 0x10 + (int)rngs); + return (RNG *)(index * 0x10 + GHIDRA_INT(rngs)); } // 00665c10 @@ -2999,8 +2999,8 @@ uint Entity_Player::get_grid_collision_at(Vector *position) void *roomPtr; this_00 = g_game->_room; - iVar4 = (int)((position->x - 40.0) / 40.0 + 0.5); - gridRow = (int)((position->y - 120.0) / 40.0 + 0.5); + iVar4 = GHIDRA_INT(((position->x - 40.0) / 40.0 + 0.5)); + gridRow = GHIDRA_INT(((position->y - 120.0) / 40.0 + 0.5)); if ((((iVar4 < 0) || (this_00->_gridWidth <= iVar4)) || (gridRow < 0)) || (this_00->_gridHeight <= gridRow)) { iVar4 = -1; @@ -3011,12 +3011,12 @@ uint Entity_Player::get_grid_collision_at(Vector *position) uVar3 = ((Room *)(this_00))->Room::GetGridCollision(iVar4); roundBias = 0.5; if (uVar3 == 3) { - gridColumn = (int)((position->x - 40.0) / 40.0 + 0.5); + gridColumn = GHIDRA_INT(((position->x - 40.0) / 40.0 + 0.5)); if (-1 < gridColumn) { gridOriginY = 120.0; roomPtr = g_game->_room; if ((((gridColumn < *(int *)((char *)roomPtr + 0xc)) && - (iVar4 = (int)((position->y - 120.0) / 40.0 + 0.5), -1 < iVar4)) && + (iVar4 = GHIDRA_INT(((position->y - 120.0) / 40.0 + 0.5)), -1 < iVar4)) && ((iVar4 < *(int *)((char *)roomPtr + 0x10) && ((gridIndex = *(int *)((char *)roomPtr + 0xc) * iVar4 + gridColumn, gridIndex < 0x1c0 && (iVar4 = *(int *)((char *)roomPtr + gridIndex * 4 + 0x24), iVar4 != 0)))))) && @@ -3049,9 +3049,9 @@ LAB_006b61a0: } if (uVar3 == 4) { roomPtr = g_game->_room; - gridColumn = (int)((position->x - 40.0) / 40.0 + roundBias); + gridColumn = GHIDRA_INT(((position->x - 40.0) / 40.0 + roundBias)); if ((((gridColumn < 0) || (*(int *)((char *)roomPtr + 0xc) <= gridColumn)) || - (iVar4 = (int)((position->y - gridOriginY) / 40.0 + roundBias), iVar4 < 0)) || + (iVar4 = GHIDRA_INT(((position->y - gridOriginY) / 40.0 + roundBias)), iVar4 < 0)) || ((*(int *)((char *)roomPtr + 0x10) <= iVar4 || (uVar3 = *(int *)((char *)roomPtr + 0xc) * iVar4 + gridColumn, 0x1bf < uVar3)))) { iVar4 = 0; @@ -3224,7 +3224,7 @@ void Entity_Player::QueueExtraAnimation(byte *animName) nameChar = *nameEnd; nameEnd = nameEnd + 1; } while (nameChar != 0); - ((std::string *)((this->_queuedExtraAnimation)._buf))->std::string::assign(animName,(int)nameEnd - (int)(animName + 1)); + ((std::string *)((this->_queuedExtraAnimation)._buf))->std::string::assign(animName,GHIDRA_INT(nameEnd) - GHIDRA_INT((animName + 1))); return; } @@ -3242,16 +3242,16 @@ RNG * Entity_Player::GetPillRNG(int pillEffect) uint uVar2; if ((pillEffect < 0) || - ((int)(this->_pillRNGs)._end - (int)(this->_pillRNGs)._begin >> 4 <= pillEffect)) { + (GHIDRA_INT((this->_pillRNGs)._end) - GHIDRA_INT((this->_pillRNGs)._begin) >> 4 <= pillEffect)) { KAGE_LogMessage(0x10,(byte *)"Pill ID out of bounds!\n"); } pvVar1 = (this->_pillRNGs)._begin; - clampedIndex = ((int)(this->_pillRNGs)._end - (int)pvVar1 >> 4) - 1; - uVar2 = -(uint)(pillEffect != 0) & pillEffect; + clampedIndex = (GHIDRA_INT((this->_pillRNGs)._end) - GHIDRA_INT(pvVar1) >> 4) - 1; + uVar2 = -GHIDRA_UINT((pillEffect != 0)) & pillEffect; if (uVar2 < clampedIndex) { clampedIndex = uVar2; } - return (RNG *)(clampedIndex * 0x10 + (int)pvVar1); + return (RNG *)(clampedIndex * 0x10 + GHIDRA_INT(pvVar1)); } // 00753a60 @@ -3261,23 +3261,23 @@ RNG * Entity_Player::GetCardRNG(int cardId) uint cardIndex; uint uVar2; - if ((cardId < 0) || ((int)(this->_cardRNGs)._end - (int)(this->_cardRNGs)._begin >> 4 <= cardId)) + if ((cardId < 0) || (GHIDRA_INT((this->_cardRNGs)._end) - GHIDRA_INT((this->_cardRNGs)._begin) >> 4 <= cardId)) { KAGE_LogMessage(0x10,(byte *)"Card ID out of bounds!\n"); } pvVar1 = (this->_cardRNGs)._begin; - cardIndex = ((int)(this->_cardRNGs)._end - (int)pvVar1 >> 4) - 1; - uVar2 = -(uint)(cardId != 0) & cardId; + cardIndex = (GHIDRA_INT((this->_cardRNGs)._end) - GHIDRA_INT(pvVar1) >> 4) - 1; + uVar2 = -GHIDRA_UINT((cardId != 0)) & cardId; if (uVar2 < cardIndex) { cardIndex = uVar2; } - return (RNG *)(cardIndex * 0x10 + (int)pvVar1); + return (RNG *)(cardIndex * 0x10 + GHIDRA_INT(pvVar1)); } // 00753ac0 uint Entity_Player::IsSubPlayer() { - return (uint)this->_playerIndex >> 0x1f; + return GHIDRA_UINT(this->_playerIndex) >> 0x1f; } // 00753c20 @@ -3315,17 +3315,17 @@ void Entity_Player::constructor() local_14 = 0; *(undefined ***)this = IsaacRepentancePlus::Entity_Player::vftable; ((ANM2 *)(&this->_bodySprite))->ANM2::constructor(); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; ((ANM2 *)(&this->_crownOfLightSprite))->ANM2::constructor(); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; ((ANM2 *)(&this->_darkPrincesCrownSprite))->ANM2::constructor(); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; _eh_vector_constructor_iterator_(this->_chargeBarSprites,0x114,7,ANM2::constructor,ANM2::~ANM2); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; ((ANM2 *)(&this->_bloodGushSprite))->ANM2::constructor(); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; ((ANM2 *)(&this->_heldSprite))->ANM2::constructor(); - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; ((ANM2 *)(&this->_statusEffectSprite))->ANM2::constructor(); (this->_costumeSpriteDescs)._begin = (void *)0x0; (this->_costumeSpriteDescs)._end = (void *)0x0; @@ -3352,9 +3352,9 @@ void Entity_Player::constructor() (this->_name)._capacity = 0xf; (this->_name)._buf[0] = '\0'; *(undefined4 *)&(this->_tearFlags)._l = 0; - *(undefined4 *)((int)&(this->_tearFlags)._l + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) = 0; *(undefined4 *)&(this->_tearFlags)._h = 0; - *(undefined4 *)((int)&(this->_tearFlags)._h + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) = 0; (this->_tearColor)._tint[0] = 1.0; (this->_tearColor)._tint[1] = 1.0; (this->_tearColor)._tint[2] = 1.0; @@ -3390,7 +3390,7 @@ void Entity_Player::constructor() (this->_temporaryeffects)._shouldEvaluateCache = 0; (this->_temporaryeffects)._disabled = 0; (this->_temporaryeffects)._player = this; - local_14._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; remaining = 4; activeDesc = this->_activeDesc; do { @@ -3429,7 +3429,7 @@ void Entity_Player::constructor() containerProxy = operator_new(8); containerProxy[1] = 0; *(int **)puVar1 = containerProxy; - *containerProxy = (int)puVar1; + *containerProxy = GHIDRA_INT(puVar1); (this->_lastDamageSource)._type = 0; (this->_lastDamageSource)._variant = 0; (this->_lastDamageSource)._spawnerType = 0; @@ -3492,7 +3492,7 @@ void Entity_Player::constructor() (this->_cardRNGs)._begin = (void *)0x0; (this->_cardRNGs)._end = (void *)0x0; (this->_cardRNGs)._capacity = (void *)0x0; - local_14._0_1_ = 0x17; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x17; this->_playerFormsRewarded = 0; remaining = 4; (this->_footprintColor1)._tint[0] = 1.0; @@ -3534,7 +3534,7 @@ void Entity_Player::constructor() (this->_moveToTarget).y = 0.0; (this->_moveToTarget).x = 0.0; FUN_008391a0(); - local_14._0_1_ = 0x18; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x18; FUN_008391a0(); (this->_movingBoxContents)._begin = (void *)0x0; (this->_movingBoxContents)._end = (void *)0x0; @@ -3569,7 +3569,7 @@ void Entity_Player::constructor() (this->_contactHitList)._capacity = (void *)0x0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1e50)) = 0; this->_userProfile = KAGE::System::UserProfile::vftable; - local_14._0_1_ = 0x1e; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1e; deque = &this->_afterImageFrames; deque->_proxy = (void *)0x0; (this->_afterImageFrames)._map = (void *)0x0; @@ -3579,11 +3579,11 @@ void Entity_Player::constructor() containerProxy = operator_new(8); containerProxy[1] = 0; deque->_proxy = containerProxy; - *containerProxy = (int)deque; + *containerProxy = GHIDRA_INT(deque); this->_twinPlayer = (EntityPtr)0x0; this->_backupPlayer = (void *)0x0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1e84)) = 0; - local_14._0_1_ = 0x21; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x21; deque = &this->_echoChamberItems; this->_marsUnk1 = 0x5a; this->_marsCooldown = 0; @@ -3599,8 +3599,8 @@ void Entity_Player::constructor() containerProxy = operator_new(8); containerProxy[1] = 0; deque->_proxy = containerProxy; - *containerProxy = (int)deque; - local_14._0_1_ = 0x22; + *containerProxy = GHIDRA_INT(deque); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x22; (this->_suplexTargetPos).y = 0.0; (this->_suplexTargetPos).x = 0.0; (this->_suplexLandPos).y = 0.0; @@ -3618,7 +3618,7 @@ void Entity_Player::constructor() (this->_itemCards)._begin = (void *)0x0; (this->_itemCards)._end = (void *)0x0; (this->_itemCards)._capacity = (void *)0x0; - local_14._0_1_ = 0x24; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x24; (this->_roomTemporaryCollectibles)._head = (void *)0x0; (this->_roomTemporaryCollectibles)._size = 0; sentinelNode = operator_new(0x18); @@ -3627,7 +3627,7 @@ void Entity_Player::constructor() *(void **)((char *)sentinelNode + 8) = sentinelNode; *(undefined2 *)((char *)sentinelNode + 0xc) = 0x101; (this->_roomTemporaryCollectibles)._head = sentinelNode; - local_14._0_1_ = 0x25; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x25; proceduralItemIds = &(this->_proceduralItems)._itemIds; proceduralItemIds->_head = (void *)0x0; (this->_proceduralItems)._itemIds._size = 0; @@ -3675,9 +3675,9 @@ void Entity_Player::constructor() (this->_greedResetCollectibles)._begin = (void *)0x0; (this->_greedResetCollectibles)._end = (void *)0x0; (this->_greedResetCollectibles)._capacity = (void *)0x0; - local_14._0_1_ = 0x2b; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x2b; input_state_reset(&this->_unlistedRestoreState); - local_14 = CONCAT31(local_14._1_3_,0x2c); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x2c); this->_replacedPlayer = (void *)0x0; ((OnlineEmotes *)(&(*(undefined1 *)((char *)(this) + 0x26d8))))->OnlineEmotes::constructor(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x2ee4)) = 0; @@ -3741,7 +3741,7 @@ void Entity_Player::ClearReferences() // 00757ab0 undefined1 Entity_Player::CanShutDoors() { - return CONCAT31((int3)((uint)g_game >> 8),1 < *(int *)&g_game->_deathmatchManager); + return CONCAT31((int3)(GHIDRA_UINT(g_game) >> 8),1 < *(int *)&g_game->_deathmatchManager); } // 00757ac0 @@ -4062,25 +4062,25 @@ void Entity_Player::release_weapons_and_effects(byte isRemoveEntities) playerManager = &g_game->_playerManager; pEStack_14 = (EntityPtr *)0x0; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { playerListEnd = (playerManager->_playerList)._end; - if ((int)playerListEnd - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (playerManager->_playerList)._end; game = g_game; } playerSlot = (playerManager->_playerList)._begin; - if (pEStack_14 < (EntityPtr *)((int)playerListEnd - (int)playerSlot >> 2)) { - playerSlot = playerSlot + (int)pEStack_14; + if (pEStack_14 < (EntityPtr *)(GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerSlot) >> 2)) { + playerSlot = playerSlot + GHIDRA_INT(pEStack_14); } player = (Entity_Player *)*playerSlot; EVar2 = player->_parent; if ((EVar2 == (EntityPtr)0x0) || (*(int *)((char *)EVar2 + 0x28) != 1)) { if (player->_variant == 1) { playerListBegin = (game->_playerManager)._playerList._begin; - if ((int)(game->_playerManager)._playerList._end - (int)playerListBegin >> 2 == 0) { + if (GHIDRA_INT((game->_playerManager)._playerList._end) - GHIDRA_INT(playerListBegin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n" ); playerListBegin = (game->_playerManager)._playerList._begin; @@ -4100,8 +4100,8 @@ void Entity_Player::release_weapons_and_effects(byte isRemoveEntities) pEStack_14 = (EntityPtr *)&(*(undefined1 *)((char *)(pEStack_14) + 0x1)); } while (pEStack_14 < (undefined1 *) - ((int)(game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + (GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2)); } } } @@ -4124,17 +4124,17 @@ uint Entity_Player::InvalidateCoPlayerItems() playerManager = &g_game->_playerManager; playerCount = 0; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> 2 + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { playerListEnd = (playerManager->_playerList)._end; - if ((int)playerListEnd - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (playerManager->_playerList)._end; game = g_game; } playerSlot = (playerManager->_playerList)._begin; - if (i < (uint)((int)playerListEnd - (int)playerSlot >> 2)) { + if (i < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + i; } otherPlayer = *playerSlot; @@ -4142,7 +4142,7 @@ uint Entity_Player::InvalidateCoPlayerItems() if ((ownerPlayer == (Entity_Player *)0x0) || (ownerPlayer->_type != 1)) { if (*(int *)(otherPlayer + 0x2c) == 1) { playerSlot = (game->_playerManager)._playerList._begin; - if ((int)(game->_playerManager)._playerList._end - (int)playerSlot >> 2 == 0) { + if (GHIDRA_INT((game->_playerManager)._playerList._end) - GHIDRA_INT(playerSlot) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerSlot = (game->_playerManager)._playerList._begin; game = g_game; @@ -4158,8 +4158,8 @@ uint Entity_Player::InvalidateCoPlayerItems() } playerManager = &game->_playerManager; i = i + 1; - playerCount = (int)(game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2; + playerCount = GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2; } while (i < playerCount); } return playerCount; @@ -4186,7 +4186,7 @@ void Entity_Player::cycle_spectate_target() int actionOrder [13]; Manager *manager; - actionOrder[0xc] = __security_cookie ^ (uint)(actionOrder + 0xd); + actionOrder[0xc] = __security_cookie ^ GHIDRA_UINT((actionOrder + 0xd)); local_44 = this; isValidTarget = input_is_action_triggered(g_manager,0xd,this->_controllerIndex,(Entity *)0x0,0); unused = extraout_ECX; @@ -4258,7 +4258,7 @@ LAB_00758685: manager = g_manager; local_40 = (EntityPtr)0xc3; seed_fart_sound_override((int *)&local_40); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_40,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_40),1.0,2,0,1.0,0.0); unused = extraout_ECX_01; } goto LAB_007587aa; @@ -4287,7 +4287,7 @@ LAB_007587aa: actionOrder[0xb] = 0xb; while (isValidTarget = input_is_action_pressed - (actionOrder[uVar2],this->_controllerIndex,(Entity *)0x0,(int)unused), + (actionOrder[uVar2],this->_controllerIndex,(Entity *)0x0,GHIDRA_INT(unused)), isValidTarget == 0) { uVar2 = uVar2 + 1; unused = extraout_ECX_02; @@ -4515,7 +4515,7 @@ void Entity_Player::AddEternalHearts(int amount) AddMaxHearts(this,this->_eternalHearts - (this->_eternalHearts >> 0x1f) & 0xfffffffe,0); AddHearts(this,this->_eternalHearts - (this->_eternalHearts >> 0x1f) & 0xfffffffe,0,0); leftoverEternalHearts = this->_eternalHearts & 0x80000001; - if ((int)leftoverEternalHearts < 0) { + if (GHIDRA_INT(leftoverEternalHearts) < 0) { leftoverEternalHearts = (leftoverEternalHearts - 1 | 0xfffffffe) + 1; } this->_eternalHearts = leftoverEternalHearts; @@ -4551,11 +4551,11 @@ void Entity_Player::AddSoulHearts(int amount, byte unk) } if ((((*(char *)((char *)this + 0x154a) == '\0') && (game->_isStartingFromState == 0)) && (game->_isRestoringGlowingHourglassState == 0)) && (0 < amount)) { - bVar1 = ((TemporaryEffects *)((TemporaryEffects *)((int)this + 0x1508)))->TemporaryEffects::HasNullEffect(0x66); + bVar1 = ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508)))->TemporaryEffects::HasNullEffect(0x66); if (bVar1 == 0) { LAB_00758d9a: uVar4 = 0; - activeCharge = (int *)((int)this + 0x1588); + activeCharge = (int *)(GHIDRA_INT(this) + 0x1588); do { if (activeCharge[-2] == 0x249) { iVar3 = GetActiveMaxCharge(this,uVar4); @@ -4577,7 +4577,7 @@ LAB_00758d9a: } while (uVar4 < 4); } else { - ((TemporaryEffects *)((TemporaryEffects *)((int)this + 0x1508)))->TemporaryEffects::RemoveNullEffect(0x66,-1); + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508)))->TemporaryEffects::RemoveNullEffect(0x66,-1); iVar2 = amount + -2; amount = 0; if (0 < iVar2) { @@ -4600,7 +4600,7 @@ LAB_00758d9a: if (count < 1) { return; } - AddBlueFlies(this,(count * 3 + 1) / 2,(Vector *)((int)this + 0x33c),(Entity *)0x0); + AddBlueFlies(this,(count * 3 + 1) / 2,(Vector *)(GHIDRA_INT(this) + 0x33c),(Entity *)0x0); return; } if (*(int *)((char *)this + 0x13c0) != 0x10) { @@ -4690,7 +4690,7 @@ void Entity_Player::AddBlackHearts(int amount) } iVar1 = GetHealthType(this); if (iVar1 == 3) { - AddBlueFlies(this_00,(amount * 4 + 1) / 2,(Vector *)((int)this + 0x33c),(Entity *)0x0); + AddBlueFlies(this_00,(amount * 4 + 1) / 2,(Vector *)(GHIDRA_INT(this) + 0x33c),(Entity *)0x0); return; } if (1 < *(int *)&g_game->_deathmatchManager) { @@ -4711,35 +4711,35 @@ void Entity_Player::AddBlackHearts(int amount) iVar1 = *(int *)((char *)this + 0x1d88); iVar3 = *(int *)((char *)this + 0x1340); heartLimit = GetHeartLimit(this,0); - if ((int)(uVar2 + iVar3 + iVar1 * 2) < heartLimit + -1) { - iVar1 = (int)(local_10 + uVar2 + amount) / 2; - uVar4 = (int)(roundingAdjust + uVar2) / 2; - if ((int)uVar4 < iVar1) { + if (GHIDRA_INT((uVar2 + iVar3 + iVar1 * 2)) < heartLimit + -1) { + iVar1 = GHIDRA_INT((local_10 + uVar2 + amount)) / 2; + uVar4 = GHIDRA_INT((roundingAdjust + uVar2)) / 2; + if (GHIDRA_INT(uVar4) < iVar1) { uVar2 = *(uint *)((char *)this + 0x1350); do { uVar2 = uVar2 | 1 << (uVar4 & 0x1f); uVar4 = uVar4 + 1; - } while ((int)uVar4 < iVar1); + } while (GHIDRA_INT(uVar4) < iVar1); *(uint *)((char *)this + 0x1350) = uVar2; } } else { uVar4 = uVar2 - 1; local_10 = 0; - while ((0 < (int)uVar4 && (uVar2 = uVar2 - 2, (int)local_10 < amount))) { - if ((*(int *)((char *)this + 0x134c) < (int)uVar4) || ((int)uVar4 < 1)) { + while ((0 < GHIDRA_INT(uVar4) && (uVar2 = uVar2 - 2, GHIDRA_INT(local_10) < amount))) { + if ((*(int *)((char *)this + 0x134c) < GHIDRA_INT(uVar4)) || (GHIDRA_INT(uVar4) < 1)) { LAB_007590f3: local_10 = local_10 + 2; *(uint *)((char *)this + 0x1350) = - *(uint *)((char *)this + 0x1350) | 1 << ((int)uVar4 / 2 & 0x1fU); + *(uint *)((char *)this + 0x1350) | 1 << (GHIDRA_INT(uVar4) / 2 & 0x1fU); } else { slotParity = uVar4 & 0x80000001; - if ((int)slotParity < 0) { + if (GHIDRA_INT(slotParity) < 0) { slotParity = (slotParity - 1 | 0xfffffffe) + 1; } if ((slotParity != 1) || - ((*(uint *)((char *)this + 0x1350) & 1 << ((byte)((int)uVar2 / 2) & 0x1f)) == 0)) + ((*(uint *)((char *)this + 0x1350) & 1 << ((byte)(GHIDRA_INT(uVar2) / 2) & 0x1f)) == 0)) goto LAB_007590f3; } uVar4 = uVar4 - 2; @@ -4766,7 +4766,7 @@ LAB_007590f3: void Entity_Player::RemoveBlackHeart(int soulHeartIndex) { if ((soulHeartIndex <= this->_soulHearts) && (-1 < soulHeartIndex)) { - this->_blackHearts = this->_blackHearts & ~(1 << ((uint)soulHeartIndex >> 1 & 0x1f)); + this->_blackHearts = this->_blackHearts & ~(1 << (GHIDRA_UINT(soulHeartIndex) >> 1 & 0x1f)); ClampGoldenHearts(this,0); update_bone_hearts(this); } @@ -4799,7 +4799,7 @@ void Entity_Player::UpdateBlackHeartMask() return; } movedCount = 0; - local_8 = (int)(uVar1 + 1) / 2; + local_8 = GHIDRA_INT((uVar1 + 1)) / 2; uVar2 = 0; if (local_8 < 0x20) { rotateShift = (byte)local_8 & 0x1f; @@ -4809,7 +4809,7 @@ void Entity_Player::UpdateBlackHeartMask() uVar2 = uVar2 | 1 << (local_8 & 0x1f); movedCount = movedCount + 1; } - uVar1 = uVar1 << 1 | (uint)((int)uVar1 < 0); + uVar1 = uVar1 << 1 | GHIDRA_UINT((GHIDRA_INT(uVar1) < 0)); local_8 = local_8 + 1; } while (local_8 < 0x20); uVar1 = this->_soulHearts; @@ -4817,10 +4817,10 @@ void Entity_Player::UpdateBlackHeartMask() this->_blackHearts = this->_blackHearts & ~uVar2; uVar2 = uVar1; local_8 = uVar1; - while ((0 < (int)uVar1 && (local_8 = local_8 - 1, 0 < movedCount))) { + while ((0 < GHIDRA_INT(uVar1) && (local_8 = local_8 - 1, 0 < movedCount))) { if ((uVar1 & 1) != 0) { - if ((((int)uVar2 < (int)uVar1) || (uVar1 == 0)) || - ((this->_blackHearts & 1 << ((byte)((int)local_8 / 2) & 0x1f)) == 0)) { + if (((GHIDRA_INT(uVar2) < GHIDRA_INT(uVar1)) || (uVar1 == 0)) || + ((this->_blackHearts & 1 << ((byte)(GHIDRA_INT(local_8) / 2) & 0x1f)) == 0)) { movedCount = movedCount + -1; this->_blackHearts = this->_blackHearts | 1 << (uVar1 >> 1 & 0x1f); } @@ -4896,7 +4896,7 @@ void Entity_Player::AddCoins(int amount) PlayerManager::FirstCollectibleOwner (&g_game->_playerManager,0x1a0,(RNG **)&g_game->_playerManager,1); clampValues[2] = 0; - clampValues[1] = (-(uint)(deepPocketsOwner != (Entity_Player *)0x0) & 900) + 99; + clampValues[1] = (-GHIDRA_UINT((deepPocketsOwner != (Entity_Player *)0x0)) & 900) + 99; cappedPtr = clampValues; if (clampValues[1] <= coins) { cappedPtr = clampValues + 1; @@ -5086,24 +5086,24 @@ void Entity_Player::ConsumableCountChanged(int bitflags) if (-1 < this->_playerIndex) { if (*(int *)&g_game->_deathmatchManager < 2) { playerIdx = 0; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { game = g_game; playerListEnd = (g_game->_playerManager)._playerList._end; - if ((int)playerListEnd - (int)(g_game->_playerManager)._playerList._begin >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (game->_playerManager)._playerList._end; } playerSlot = (game->_playerManager)._playerList._begin; - if (playerIdx < (uint)((int)playerListEnd - (int)playerSlot >> 2)) { + if (playerIdx < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + playerIdx; } SyncConsumables(this,(Entity_Player *)*playerSlot,bitflags); playerIdx = playerIdx + 1; } while (playerIdx < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); } if ((bitflags & 1U) != 0) { coins = this->_numCoins; @@ -5114,9 +5114,9 @@ void Entity_Player::ConsumableCountChanged(int bitflags) game = g_game; if (0x62 < coins) { oldStateFlags = g_game->_gameStateFlags; - stateFlagsHigh = (uint *)((int)&g_game->_gameStateFlags + 4); + stateFlagsHigh = (uint *)(GHIDRA_INT(&g_game->_gameStateFlags) + 4); *stateFlagsHigh = *stateFlagsHigh | 0x800; - *(int *)&game->_gameStateFlags = (int)oldStateFlags; + *(int *)&game->_gameStateFlags = GHIDRA_INT(oldStateFlags); coins = this->_numCoins; } if ((((coins < 1) && ((game->_gameStateFlags & 0x80000000000) != 0)) && @@ -5215,8 +5215,8 @@ LAB_00759a6a: std::multiset::insert(flyTarget); this = player; } - *(uint *)&fly->_flags = (uint)fly->_flags & 0xfffffffb; - *(undefined4 *)((int)&fly->_flags + 4) = *(undefined4 *)((int)&fly->_flags + 4); + *(uint *)&fly->_flags = GHIDRA_UINT(fly->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&fly->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&fly->_flags) + 4); amount = amount + -1; } while (amount != 0); iVar2 = this->_numBlueFlies; @@ -5234,7 +5234,7 @@ LAB_00759a6a: } (g_manager->_persistentGameData)._achievements[0x184] = 1; if (((unusedArg->_netplayManager == *(NetplayManager *)(unusedArg + 1)) || - (isInputActive = Manager::IsGameplayInputActive((int)unusedArg), isInputActive == 0)) && + (isInputActive = Manager::IsGameplayInputActive(GHIDRA_INT(unusedArg)), isInputActive == 0)) && ((unusedArg->_persistentGameData)._isSteamAchievementsEnabled != 0)) { ((PersistentGameData *)(persistentData))->PersistentGameData::UnlockSteamAchievement(0x184); Manager::queue_achievement_popup(0x184); @@ -5302,7 +5302,7 @@ Entity * Entity_Player::AddSwarmFlyOrbital(Vector *position) local_8 = 0xffffffff; puStack_c = &LAB_00afebed; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; flyDeque = (int *)0x0; flyDequeMap = (void *)0x0; @@ -5311,7 +5311,7 @@ Entity * Entity_Player::AddSwarmFlyOrbital(Vector *position) flyDequeSize = 0; flyDeque = operator_new(8); flyDeque[1] = 0; - *flyDeque = (int)&flyDeque; + *flyDeque = GHIDRA_INT(&flyDeque); local_8 = 0; entityIndex = 0; pvVar3 = g_game->_room; @@ -5330,7 +5330,7 @@ Entity * Entity_Player::AddSwarmFlyOrbital(Vector *position) } if (0xf < flyDequeSize) { do { - (**(code **)(**(int **)(*(int *)((int)flyDequeMap + + (**(code **)(**(int **)(*(int *)(GHIDRA_INT(flyDequeMap) + (flyDequeOffset >> 2 & flyDequeMapSize - 1U) * 4) + (flyDequeOffset & 3) * 4) + 0x28))(uVar2); flyDequeSize = flyDequeSize - 1; @@ -5343,7 +5343,7 @@ Entity * Entity_Player::AddSwarmFlyOrbital(Vector *position) } while (0xf < flyDequeSize); } pvVar3 = (game->_collectibleRNGs)._begin; - rngSeed = (uint *)((int)pvVar3 + 0x2b50); + rngSeed = (uint *)(GHIDRA_INT(pvVar3) + 0x2b50); uVar2 = *rngSeed; if (uVar2 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -5386,7 +5386,7 @@ Entity * Entity_Player::AddSwarmFlyOrbital(Vector *position) if (0xfff < uVar2) { pvVar4 = *(void **)((char *)pvVar3 + -4); uVar2 = uVar2 + 0x23; - if (0x1f < (uint)((int)pvVar3 + (-4 - (int)pvVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar3) + (-4 - GHIDRA_INT(pvVar4))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -5523,7 +5523,7 @@ void Entity_Player::UpdateCostumes() local_8 = 0xffffffff; puStack_c = &LAB_00afeef5; local_10 = ExceptionList; - local_14 = __security_cookie ^ (int)&tmpPath + 0x28U; + local_14 = __security_cookie ^ GHIDRA_INT(&tmpPath) + 0x28U; cleanupFlags = 0; if (this->_variant == 1) { return; @@ -5589,7 +5589,7 @@ LAB_0075c0c6: { local_a8 = (undefined4 *)0x4c; } - costumeIter = (void *)((int)costumeIter + 0x130); + costumeIter = (void *)(GHIDRA_INT(costumeIter) + 0x130); pvVar10 = (this->_costumeSpriteDescs)._end; } while (costumeIter != pvVar10); if (local_a9 == '\0') goto LAB_0075c0c6; @@ -5602,7 +5602,7 @@ LAB_0075c0c6: do { piVar5 = *(int **)((char *)costumeIter + 0x114); if (((piVar5 == (int *)0x0) || (*piVar5 != 0)) || (3 < piVar5[1] - 0x4bU)) { - costumeIter = (void *)((int)costumeIter + 0x130); + costumeIter = (void *)(GHIDRA_INT(costumeIter) + 0x130); } else { piVar5 = (int *)std::vector::erase(eraseResult,costumeIter); @@ -5611,13 +5611,13 @@ LAB_0075c0c6: } while (costumeIter != (this->_costumeSpriteDescs)._end); } if (local_a8 != (undefined4 *)0xffffffff) { - if (((int)local_a8 < 0) || + if ((GHIDRA_INT(local_a8) < 0) || (pvVar10 = (g_manager->_itemConfig)._nullItems._begin, - (int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar10 >> 2 <= (int)local_a8)) { + GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar10) >> 2 <= GHIDRA_INT(local_a8))) { nullItem = (ItemConfig_Item *)0x0; } else { - nullItem = *(ItemConfig_Item **)((char *)pvVar10 + (int)local_a8 * 4); + nullItem = *(ItemConfig_Item **)((char *)pvVar10 + GHIDRA_INT(local_a8) * 4); } AddCostume(this,nullItem,0); } @@ -5630,7 +5630,7 @@ LAB_0075c0c6: } if (cVar11 != local_aa) { pvVar10 = (g_manager->_itemConfig)._nullItems._begin; - iVar13 = (int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar10 >> 2; + iVar13 = GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar10) >> 2; if (local_aa == '\0') { if (iVar13 < 0x68) { nullItem = (ItemConfig_Item *)0x0; @@ -5650,13 +5650,13 @@ LAB_0075c0c6: iVar13 = this->_playerType; if ((iVar13 < 0) || (playerConfig = (g_manager->_entityConfig)._players._begin, - ((int)(g_manager->_entityConfig)._players._end - (int)playerConfig) / 0x148 <= iVar13)) { + (GHIDRA_INT((g_manager->_entityConfig)._players._end) - GHIDRA_INT(playerConfig)) / 0x148 <= iVar13)) { playerConfig = (void *)0x0; LAB_0075c224: KAGE_LogMessage(0x10,(byte *)"Could not load config for player type %d\n"); } else { - playerConfig = (void *)(iVar13 * 0x148 + (int)playerConfig); + playerConfig = (void *)(iVar13 * 0x148 + GHIDRA_INT(playerConfig)); if (playerConfig == (void *)0x0) goto LAB_0075c224; } headColor = *(undefined4 **)((char *)playerConfig + 0xe4); @@ -5681,9 +5681,9 @@ LAB_0075c224: local_bc = (byte *)0x0; pvVar10 = costumeDescs->_begin; bodyColor = headColor; - if (0 < ((int)costumeDescs->_end - (int)pvVar10) / 0x130) { + if (0 < (GHIDRA_INT(costumeDescs->_end) - GHIDRA_INT(pvVar10)) / 0x130) { do { - costumeSprite = (ANM2 *)((int)pvVar10 + (int)local_bc * 0x130); + costumeSprite = (ANM2 *)(GHIDRA_INT(pvVar10) + GHIDRA_INT(local_bc) * 0x130); pbVar14 = local_bc; bodyIndex = local_bc; if ((local_b0->_hasCurseMistEffect == 0) || @@ -5710,7 +5710,7 @@ LAB_0075c397: pbVar7 = &s_empty; } else { - pbVar7 = (byte *)((int)pvVar10 + 8); + pbVar7 = (byte *)(GHIDRA_INT(pvVar10) + 8); if (0xf < *(uint *)((char *)pvVar10 + 0x1c)) { pbVar7 = *(byte **)pbVar7; } @@ -5721,9 +5721,9 @@ LAB_0075c5f9: } else { if ((*(int *)(costumeSprite[1]._filename._buf + 4) < - local_b0->_playerCostumeMap[(int)pbVar14]._priority) || + local_b0->_playerCostumeMap[GHIDRA_INT(pbVar14)]._priority) || (((local_b0->_canFly != 0 && (costumeSprite[1]._filename._buf[9] == '\0')) && - (local_b0->_playerCostumeMap[(int)pbVar14]._isBodyLayer != 0)))) { + (local_b0->_playerCostumeMap[GHIDRA_INT(pbVar14)]._isBodyLayer != 0)))) { if (pbVar14 == &DAT_00000004) { LAB_0075c594: if ((char)costumeSprite[1]._filename._capacity != '\0') goto LAB_0075c59d; @@ -5736,7 +5736,7 @@ LAB_0075c5ca: } if (((matchedLayers != 0) && (bodyIndex == local_bc)) && ((pbVar14 != (byte *)0x0 && - (bVar4 = local_b0->_playerCostumeMap[(int)pbVar14]._isBodyLayer, local_a1 != bVar4 + (bVar4 = local_b0->_playerCostumeMap[GHIDRA_INT(pbVar14)]._isBodyLayer, local_a1 != bVar4 )))) { if (bVar4 == 0) { local_bc = local_bc + 1; @@ -5745,12 +5745,12 @@ LAB_0075c5ca: bodyIndex = bodyIndex + 1; } } - local_a1 = local_b0->_playerCostumeMap[(int)pbVar14]._isBodyLayer; + local_a1 = local_b0->_playerCostumeMap[GHIDRA_INT(pbVar14)]._isBodyLayer; pbVar7 = local_bc; if (local_a1 != 0) { pbVar7 = bodyIndex; } - local_b0->_playerCostumeMap[(int)pbVar14]._index = (int)pbVar7; + local_b0->_playerCostumeMap[GHIDRA_INT(pbVar14)]._index = GHIDRA_INT(pbVar7); if (local_e4->_layerData == (undefined4 *)0x0) { layerId = 0xffffffff; } @@ -5759,9 +5759,9 @@ LAB_0075c5ca: } matchedLayers = matchedLayers + 1; *(undefined4 *) - ((int)(&(local_b0->_sprite)._filename + -3) + (int)(pbVar14 + 0x123) * 0x10) = + (GHIDRA_INT((&(local_b0->_sprite)._filename + -3)) + GHIDRA_INT((pbVar14 + 0x123)) * 0x10) = layerId; - local_b0->_playerCostumeMap[(int)pbVar14]._priority = + local_b0->_playerCostumeMap[GHIDRA_INT(pbVar14)]._priority = *(int *)(local_cc[1]._filename._buf + 4); cVar11 = (char)local_cc[1]._filename._capacity; costumeSprite = local_cc; @@ -5781,7 +5781,7 @@ LAB_0075c59d: bodyColor = *(undefined4 **)(local_cc[1]._filename._buf + 0xc); LAB_0075c5d3: puVar9 = *(undefined4 **)(costumeSprite[1]._filename._buf + 4); - if ((int)local_a8 <= (int)puVar9) { + if (GHIDRA_INT(local_a8) <= GHIDRA_INT(puVar9)) { bodyColor = *(undefined4 **)(costumeSprite[1]._filename._buf + 0xc); local_a8 = puVar9; } @@ -5801,7 +5801,7 @@ LAB_0075c5d3: } if (*(char *)(iVar13 + 0xaa) != '\0') { puVar9 = *(undefined4 **)(costumeSprite[1]._filename._buf + 4); - if ((int)local_a8 <= (int)puVar9) { + if (GHIDRA_INT(local_a8) <= GHIDRA_INT(puVar9)) { bodyColor = *(undefined4 **)(costumeSprite[1]._filename._buf + 0xc); local_a8 = puVar9; } @@ -5809,7 +5809,7 @@ LAB_0075c5d3: } } pbVar14 = bodyIndex; - if ((int)bodyIndex < (int)local_bc) { + if (GHIDRA_INT(bodyIndex) < GHIDRA_INT(local_bc)) { pbVar14 = local_bc; } } @@ -5832,7 +5832,7 @@ LAB_0075c5d3: } local_bc = pbVar14 + 1; pvVar10 = costumeDescs->_begin; - } while ((int)local_bc < ((int)costumeDescs->_end - (int)pvVar10) / 0x130); + } while (GHIDRA_INT(local_bc) < (GHIDRA_INT(costumeDescs->_end) - GHIDRA_INT(pvVar10)) / 0x130); } if ((local_b0->_playerType == 0xc) || (local_a9 = '\0', local_b0->_playerType == 0x18)) { local_a9 = '\x01'; @@ -5840,16 +5840,16 @@ LAB_0075c5d3: local_cc = (ANM2 *)0x0; playerAlias = local_b0; LAB_0075c6e0: - iVar13 = playerAlias->_playerCostumeMap[(int)local_cc]._index; + iVar13 = playerAlias->_playerCostumeMap[GHIDRA_INT(local_cc)]._index; if (iVar13 < 0) goto LAB_0075cdb5; pvVar10 = (playerAlias->_costumeSpriteDescs)._begin; iVar13 = iVar13 * 0x130; local_a2 = *(byte *)((char *)pvVar10 + iVar13 + 0x11f); if (((local_a2 == 0) || (((puVar9 = *(undefined4 **)((char *)pvVar10 + iVar13 + 0x124), puVar9 == headColor || - (playerAlias->_playerCostumeMap[(int)local_cc]._isBodyLayer != 0)) && + (playerAlias->_playerCostumeMap[GHIDRA_INT(local_cc)]._isBodyLayer != 0)) && ((playerAlias = local_b0, puVar9 == bodyColor || - (local_b0->_playerCostumeMap[(int)local_cc]._isBodyLayer == 0)))))) && + (local_b0->_playerCostumeMap[GHIDRA_INT(local_cc)]._isBodyLayer == 0)))))) && (*(int *)((char *)pvVar10 + iVar13 + 300) == playerAlias->_playerType)) goto LAB_0075cdb5; local_bc = *(byte **)((char *)pvVar10 + iVar13 + 0x34); if (local_bc == (byte *)0x0) { @@ -5864,10 +5864,10 @@ LAB_0075c790: if (*(char *)((char *)pvVar10 + iVar13 + 0x44) == '\0') goto LAB_0075c790; local_b1 = 1; } - local_e4 = (LayerState *)(int)*(float *)((char *)pvVar10 + iVar13 + 0x40); + local_e4 = (LayerState *)GHIDRA_INT(*(float *)((char *)pvVar10 + iVar13 + 0x40)); local_a8 = headColor; if ((*(undefined4 **)((char *)pvVar10 + iVar13 + 0x124) != bodyColor) && - (local_b0->_playerCostumeMap[(int)local_cc]._isBodyLayer != 0)) { + (local_b0->_playerCostumeMap[GHIDRA_INT(local_cc)]._isBodyLayer != 0)) { local_a8 = bodyColor; } piVar5 = *(int **)((char *)pvVar10 + iVar13 + 0x114); @@ -5885,38 +5885,38 @@ LAB_0075cac5: local_a2 = 0; local_a1 = 0; local_dc = (ANM2 *)local_b0->_playerType; - layer = ((ANM2 *)((ANM2 *)((int)pvVar10 + iVar13)))->ANM2::GetLayer(pbVar14); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(pvVar10) + iVar13)))->ANM2::GetLayer(pbVar14); if (layer->_layerData == (void *)0x0) { tmpPath._capacity = 0xf; tmpPath._size = 0; - tmpPath._buf._0_4_ = (char *)0x0; + (*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) = (char *)0x0; } else { - ((std::string *)(tmpPath._buf))->std::string::string((void *)((int)layer->_layerData + 0x20)); + ((std::string *)(tmpPath._buf))->std::string::string((void *)(GHIDRA_INT(layer->_layerData) + 0x20)); } cleanupFlags = cleanupFlags | 2; local_8 = 3; costume_path_apply_skin_color - (&skinPath,&tmpPath,(int)local_a8,(int)local_dc,&local_a2,&local_a1); - local_8 = CONCAT31(local_8._1_3_,5); + (&skinPath,&tmpPath,GHIDRA_INT(local_a8),GHIDRA_INT(local_dc),&local_a2,&local_a1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),5); if (0xf < tmpPath._capacity) { uVar6 = tmpPath._capacity + 1; - pcVar15 = (char *)tmpPath._buf._0_4_; + pcVar15 = (*(undefined4 *)((char *)&((char *)tmpPath._buf) + 0x0)); if (0xfff < uVar6) { - pcVar15 = *(char **)(tmpPath._buf._0_4_ + -4); + pcVar15 = *(char **)((*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) + -4); uVar6 = tmpPath._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpPath._buf._0_4_ + (-4 - (int)pcVar15))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar15)))) goto LAB_0075cfcd; } operator_delete(pcVar15,uVar6); } tmpPath._size = 0; tmpPath._capacity = 0xf; - tmpPath._buf._0_4_ = tmpPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) & 0xffffff00; Sprite::ReplaceSpritesheet - ((Sprite *)((int)costumeDescs->_begin + iVar13),(int)pbVar14,&skinPath); + ((Sprite *)(GHIDRA_INT(costumeDescs->_begin) + iVar13),GHIDRA_INT(pbVar14),&skinPath); if ((local_a1 == 0) && (local_a9 != '\0')) { - layer = ((ANM2 *)((ANM2 *)((int)costumeDescs->_begin + iVar13)))->ANM2::GetLayer(pbVar14); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(costumeDescs->_begin) + iVar13)))->ANM2::GetLayer(pbVar14); fVar3 = fRam00c5d09c; fVar2 = fRam00c5d098; fVar8 = fRam00c5d094; @@ -5942,7 +5942,7 @@ LAB_0075cac5: local_80 = 0; uStack_7c = 0; local_78 = 0.0; - layer = ((ANM2 *)((ANM2 *)((int)costumeDescs->_begin + iVar13)))->ANM2::GetLayer(pbVar14); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(costumeDescs->_begin) + iVar13)))->ANM2::GetLayer(pbVar14); layerColor = &layer->_color; if (layerColor != (ColorMod *)local_a0) { layerColor->_tint[0] = 1.0; @@ -5965,11 +5965,11 @@ LAB_0075c9d3: local_8 = 0xffffffff; if (0xf < skinPath._capacity) { uVar6 = skinPath._capacity + 1; - pvVar10 = (void *)skinPath._buf._0_4_; + pvVar10 = (*(undefined4 *)((char *)&((void *)skinPath._buf) + 0x0)); if (0xfff < uVar6) { - pvVar10 = *(void **)(skinPath._buf._0_4_ + -4); + pvVar10 = *(void **)((*(undefined4 *)((char *)&(skinPath._buf) + 0x0)) + -4); uVar6 = skinPath._capacity + 0x24; - if (0x1f < (uint)(skinPath._buf._0_4_ + (-4 - (int)pvVar10))) goto LAB_0075cfcd; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(skinPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar10))))) goto LAB_0075cfcd; } operator_delete(pvVar10,uVar6); } @@ -5978,7 +5978,7 @@ LAB_0075c9d3: } while (pbVar14 < *(byte **)((char *)pvVar10 + iVar13 + 0x80)); } if (local_aa != '\0') goto LAB_0075cd71; - ((std::string *)(tmpPath._buf))->std::string::string((void *)((int)pvVar10 + iVar13)); + ((std::string *)(tmpPath._buf))->std::string::string((void *)(GHIDRA_INT(pvVar10) + iVar13)); puVar9 = local_a8; cleanupFlags = cleanupFlags | 4; local_8 = 6; @@ -5988,11 +5988,11 @@ LAB_0075c9d3: local_8 = 0xffffffff; if (0xf < tmpPath._capacity) { uVar6 = tmpPath._capacity + 1; - pcVar15 = (char *)tmpPath._buf._0_4_; + pcVar15 = (*(undefined4 *)((char *)&((char *)tmpPath._buf) + 0x0)); if (0xfff < uVar6) { - pcVar15 = *(char **)(tmpPath._buf._0_4_ + -4); + pcVar15 = *(char **)((*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) + -4); uVar6 = tmpPath._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpPath._buf._0_4_ + (-4 - (int)pcVar15))) goto LAB_0075cfcd; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar15)))) goto LAB_0075cfcd; } operator_delete(pcVar15,uVar6); } @@ -6003,36 +6003,36 @@ LAB_0075c9d3: do { local_a2 = 0; local_dc = (ANM2 *)local_b0->_playerType; - layer = ((ANM2 *)((ANM2 *)((int)pvVar10 + iVar13)))->ANM2::GetLayer(pbVar14); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(pvVar10) + iVar13)))->ANM2::GetLayer(pbVar14); if (layer->_layerData == (void *)0x0) { tmpPath._capacity = 0xf; tmpPath._size = 0; - tmpPath._buf._0_4_ = (char *)0x0; + (*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) = (char *)0x0; } else { - ((std::string *)(tmpPath._buf))->std::string::string((void *)((int)layer->_layerData + 0x20)); + ((std::string *)(tmpPath._buf))->std::string::string((void *)(GHIDRA_INT(layer->_layerData) + 0x20)); } cleanupFlags = cleanupFlags | 1; local_8 = 0; - costume_path_apply_skin_color(&skinPath,&tmpPath,-1,(int)local_dc,(byte *)0x0,&local_a2); - local_8 = CONCAT31(local_8._1_3_,2); + costume_path_apply_skin_color(&skinPath,&tmpPath,-1,GHIDRA_INT(local_dc),(byte *)0x0,&local_a2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); if (0xf < tmpPath._capacity) { uVar6 = tmpPath._capacity + 1; - pcVar15 = (char *)tmpPath._buf._0_4_; + pcVar15 = (*(undefined4 *)((char *)&((char *)tmpPath._buf) + 0x0)); if (0xfff < uVar6) { - pcVar15 = *(char **)(tmpPath._buf._0_4_ + -4); + pcVar15 = *(char **)((*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) + -4); uVar6 = tmpPath._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpPath._buf._0_4_ + (-4 - (int)pcVar15))) goto LAB_0075cfcd; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar15)))) goto LAB_0075cfcd; } operator_delete(pcVar15,uVar6); } tmpPath._size = 0; tmpPath._capacity = 0xf; - tmpPath._buf._0_4_ = tmpPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) & 0xffffff00; Sprite::ReplaceSpritesheet - ((Sprite *)((int)costumeDescs->_begin + iVar13),(int)pbVar14,&skinPath); + ((Sprite *)(GHIDRA_INT(costumeDescs->_begin) + iVar13),GHIDRA_INT(pbVar14),&skinPath); if ((local_a2 == 0) && (local_a9 != '\0')) { - layer = ((ANM2 *)((ANM2 *)((int)costumeDescs->_begin + iVar13)))->ANM2::GetLayer(pbVar14); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(costumeDescs->_begin) + iVar13)))->ANM2::GetLayer(pbVar14); fVar3 = fRam00c5d09c; fVar2 = fRam00c5d098; fVar8 = fRam00c5d094; @@ -6058,7 +6058,7 @@ LAB_0075c9d3: local_80 = 0; uStack_7c = 0; local_78 = 0.0; - layer = ((ANM2 *)((ANM2 *)((int)costumeDescs->_begin + iVar13)))->ANM2::GetLayer(pbVar14); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(costumeDescs->_begin) + iVar13)))->ANM2::GetLayer(pbVar14); layerColor = &layer->_color; if (layerColor != (ColorMod *)local_a0) { layerColor->_tint[0] = 1.0; @@ -6078,11 +6078,11 @@ LAB_0075cd12: local_8 = 0xffffffff; if (0xf < skinPath._capacity) { uVar6 = skinPath._capacity + 1; - pvVar10 = (void *)skinPath._buf._0_4_; + pvVar10 = (*(undefined4 *)((char *)&((void *)skinPath._buf) + 0x0)); if (0xfff < uVar6) { - pvVar10 = *(void **)(skinPath._buf._0_4_ + -4); + pvVar10 = *(void **)((*(undefined4 *)((char *)&(skinPath._buf) + 0x0)) + -4); uVar6 = skinPath._capacity + 0x24; - if (0x1f < (uint)(skinPath._buf._0_4_ + (-4 - (int)pvVar10))) goto LAB_0075cfcd; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(skinPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar10))))) goto LAB_0075cfcd; } operator_delete(pvVar10,uVar6); } @@ -6093,22 +6093,22 @@ LAB_0075cd12: } playerAlias = local_b0; *(undefined4 **)((char *)costumeDescs->_begin + iVar13 + 0x124) = puVar9; - *(int *)((int)(local_b0->_costumeSpriteDescs)._begin + iVar13 + 300) = local_b0->_playerType; - costumeSprite = (ANM2 *)((int)(local_b0->_costumeSpriteDescs)._begin + iVar13); + *(int *)(GHIDRA_INT((local_b0->_costumeSpriteDescs)._begin) + iVar13 + 300) = local_b0->_playerType; + costumeSprite = (ANM2 *)(GHIDRA_INT((local_b0->_costumeSpriteDescs)._begin) + iVar13); ((ANM2 *)(costumeSprite))->ANM2::LoadGraphics((byte)costumeSprite); if ((local_bc != (byte *)0x0) && (*local_bc != 0)) { pvVar10 = (playerAlias->_costumeSpriteDescs)._begin; if (local_b1 == 0) { - costumeSprite = (ANM2 *)(iVar13 + (int)pvVar10); + costumeSprite = (ANM2 *)(iVar13 + GHIDRA_INT(pvVar10)); bVar4 = ((ANM2 *)(costumeSprite))->ANM2::SetAnimation(local_bc,1); if (((bVar4 != 0) && ((costumeSprite->_animState)._animData != (void *)0x0)) && - (((AnimationState *)(&costumeSprite->_animState))->AnimationState::SetFrameFloat((float)(int)local_e4), + (((AnimationState *)(&costumeSprite->_animState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(local_e4)), (costumeSprite->_animState)._animData != (void *)0x0)) { (costumeSprite->_animState)._isPlaying = 0; } } else { - costumeSprite = (ANM2 *)((int)pvVar10 + iVar13); + costumeSprite = (ANM2 *)(GHIDRA_INT(pvVar10) + iVar13); pbVar14 = (costumeSprite->_animState)._animData; if (pbVar14 == (byte *)0x0) { LAB_0075cd95: @@ -6129,7 +6129,7 @@ LAB_0075cd95: isNameLess = bVar4 < *expectedAnimName; if (bVar4 != *expectedAnimName) { LAB_0075cd7c: - uVar6 = -(uint)isNameLess | 1; + uVar6 = -GHIDRA_UINT(isNameLess) | 1; goto LAB_0075cd81; } if (bVar4 == 0) break; @@ -6149,7 +6149,7 @@ LAB_0075cd81: } LAB_0075cdb5: puVar9 = bodyColor; - local_cc = (ANM2 *)((int)local_cc + 1); + local_cc = (ANM2 *)(GHIDRA_INT(local_cc) + 1); if (0xe < local_cc) goto code_r0x0075cdcb; goto LAB_0075c6e0; code_r0x0075cdcb: @@ -6158,10 +6158,10 @@ code_r0x0075cdcb: if ((g_game->_challenge == 0x2a) && (playerAlias->_playerType == 0x23)) { uVar6 = 0; do { - tmpPath._buf._0_4_ = std::_Allocate(0x40); + (*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) = std::_Allocate(0x40); tmpPath._size = 0x3c; tmpPath._capacity = 0x3f; - builtin_strncpy((char *)tmpPath._buf._0_4_, + builtin_strncpy((*(undefined4 *)((char *)&((char *)tmpPath._buf) + 0x0)), "gfx/characters/costumes/character_016b_theforgotten_bomb.png",0x3d); local_8 = 7; ((Sprite *)((Sprite *)&playerAlias->_sprite))->Sprite::ReplaceSpritesheet(uVar6,&tmpPath); @@ -6169,11 +6169,11 @@ code_r0x0075cdcb: bVar4 = extraout_CL; if (0xf < tmpPath._capacity) { size = tmpPath._capacity + 1; - pcVar15 = (char *)tmpPath._buf._0_4_; + pcVar15 = (*(undefined4 *)((char *)&((char *)tmpPath._buf) + 0x0)); if (0xfff < size) { - pcVar15 = *(char **)(tmpPath._buf._0_4_ + -4); + pcVar15 = *(char **)((*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) + -4); size = tmpPath._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpPath._buf._0_4_ + (-4 - (int)pcVar15))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar15)))) goto LAB_0075d0d4; } operator_delete(pcVar15,size); @@ -6188,33 +6188,33 @@ code_r0x0075cdcb: if (*(int *)((char *)playerConfig + 0x2c) != 0) { headSheetPath._size = 0; headSheetPath._capacity = 0xf; - headSheetPath._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(headSheetPath._buf) + 0x0)) = (void *)0x0; bodySheetPath._size = 0; bodySheetPath._capacity = 0xf; - bodySheetPath._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(bodySheetPath._buf) + 0x0)) = (void *)0x0; local_8 = 9; if (puVar12 != headColor) { headSkinPath = costume_path_apply_skin_color - (&skinPath,(void *)((int)playerConfig + 0x1c),(int)headColor,-1, + (&skinPath,(void *)(GHIDRA_INT(playerConfig) + 0x1c),GHIDRA_INT(headColor),-1, (byte *)0x0,(byte *)0x0); puVar12 = (undefined4 *)&headSheetPath; if (puVar12 != headSkinPath) { - headSheetPath._buf._0_4_ = *headSkinPath; - headSheetPath._buf._4_4_ = headSkinPath[1]; - headSheetPath._buf._8_4_ = headSkinPath[2]; - headSheetPath._buf._12_4_ = headSkinPath[3]; - headSheetPath._16_8_ = *(undefined8 *)(headSkinPath + 4); + (*(undefined4 *)((char *)&(headSheetPath._buf) + 0x0)) = *headSkinPath; + (*(undefined4 *)((char *)&(headSheetPath._buf) + 0x4)) = headSkinPath[1]; + (*(undefined4 *)((char *)&(headSheetPath._buf) + 0x8)) = headSkinPath[2]; + (*(undefined4 *)((char *)&(headSheetPath._buf) + 0xc)) = headSkinPath[3]; + (*(undefined8 *)((char *)&(headSheetPath) + 0x10)) = *(undefined8 *)(headSkinPath + 4); headSkinPath[4] = 0; headSkinPath[5] = 0xf; *(undefined1 *)headSkinPath = 0; } if (0xf < skinPath._capacity) { uVar6 = skinPath._capacity + 1; - pvVar10 = (void *)skinPath._buf._0_4_; + pvVar10 = (*(undefined4 *)((char *)&((void *)skinPath._buf) + 0x0)); if (0xfff < uVar6) { - pvVar10 = *(void **)(skinPath._buf._0_4_ + -4); + pvVar10 = *(void **)((*(undefined4 *)((char *)&(skinPath._buf) + 0x0)) + -4); uVar6 = skinPath._capacity + 0x24; - if (0x1f < (uint)(skinPath._buf._0_4_ + (-4 - (int)pvVar10))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(skinPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar10))))) { LAB_0075cfcd: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -6226,14 +6226,14 @@ LAB_0075cfcd: } if ((undefined4 *)playerAlias->_bodyColor != puVar9) { puVar9 = costume_path_apply_skin_color - (bodySkinPathTmp,(void *)((int)playerConfig + 0x1c),(int)puVar9,-1, + (bodySkinPathTmp,(void *)(GHIDRA_INT(playerConfig) + 0x1c),GHIDRA_INT(puVar9),-1, (byte *)0x0,(byte *)0x0); if (&bodySheetPath != (std_string *)puVar9) { - bodySheetPath._buf._0_4_ = *puVar9; - bodySheetPath._buf._4_4_ = puVar9[1]; - bodySheetPath._buf._8_4_ = puVar9[2]; - bodySheetPath._buf._12_4_ = puVar9[3]; - bodySheetPath._16_8_ = *(undefined8 *)(puVar9 + 4); + (*(undefined4 *)((char *)&(bodySheetPath._buf) + 0x0)) = *puVar9; + (*(undefined4 *)((char *)&(bodySheetPath._buf) + 0x4)) = puVar9[1]; + (*(undefined4 *)((char *)&(bodySheetPath._buf) + 0x8)) = puVar9[2]; + (*(undefined4 *)((char *)&(bodySheetPath._buf) + 0xc)) = puVar9[3]; + (*(undefined8 *)((char *)&(bodySheetPath) + 0x10)) = *(undefined8 *)(puVar9 + 4); puVar9[4] = 0; puVar9[5] = 0xf; *(undefined1 *)puVar9 = 0; @@ -6261,14 +6261,14 @@ LAB_0075cfcd: } uVar6 = uVar6 + 1; } while (uVar6 < 0xf); - local_8 = CONCAT31(local_8._1_3_,8); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),8); if (0xf < bodySheetPath._capacity) { uVar6 = bodySheetPath._capacity + 1; - pvVar10 = (void *)bodySheetPath._buf._0_4_; + pvVar10 = (*(undefined4 *)((char *)&((void *)bodySheetPath._buf) + 0x0)); if (0xfff < uVar6) { - pvVar10 = *(void **)(bodySheetPath._buf._0_4_ + -4); + pvVar10 = *(void **)((*(undefined4 *)((char *)&(bodySheetPath._buf) + 0x0)) + -4); uVar6 = bodySheetPath._capacity + 0x24; - if (0x1f < (uint)(bodySheetPath._buf._0_4_ + (-4 - (int)pvVar10))) goto LAB_0075d0d4; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(bodySheetPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar10))))) goto LAB_0075d0d4; } operator_delete(pvVar10,uVar6); puVar12 = extraout_ECX_02; @@ -6276,11 +6276,11 @@ LAB_0075cfcd: local_8 = 0xffffffff; if (0xf < headSheetPath._capacity) { uVar6 = headSheetPath._capacity + 1; - pvVar10 = (void *)headSheetPath._buf._0_4_; + pvVar10 = (*(undefined4 *)((char *)&((void *)headSheetPath._buf) + 0x0)); if (0xfff < uVar6) { - pvVar10 = *(void **)(headSheetPath._buf._0_4_ + -4); + pvVar10 = *(void **)((*(undefined4 *)((char *)&(headSheetPath._buf) + 0x0)) + -4); uVar6 = headSheetPath._capacity + 0x24; - if (0x1f < (uint)(headSheetPath._buf._0_4_ + (-4 - (int)pvVar10))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(headSheetPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar10))))) { LAB_0075d0d4: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -6292,8 +6292,8 @@ LAB_0075d0d4: } ((ANM2 *)(&playerAlias->_sprite))->ANM2::LoadGraphics((byte)puVar12); } - playerAlias->_headColor = (int)headColor; - playerAlias->_bodyColor = (int)bodyColor; + playerAlias->_headColor = GHIDRA_INT(headColor); + playerAlias->_bodyColor = GHIDRA_INT(bodyColor); } pbVar14 = &playerAlias->_playerCostumeMap[0]._isBodyLayer; local_cc = (ANM2 *)0xf; @@ -6301,7 +6301,7 @@ LAB_0075d0d4: if (-1 < ((PlayerCostumeMap *)(pbVar14 + -0xc))->_index) { costumeSprite = (ANM2 *)(((PlayerCostumeMap *)(pbVar14 + -0xc))->_index * 0x130 + - (int)costumeDescs->_begin); + GHIDRA_INT(costumeDescs->_begin)); if (*pbVar14 == 0) { pcVar15 = "HeadDown"; } @@ -6320,7 +6320,7 @@ LAB_0075d0d4: } } pbVar14 = pbVar14 + 0x10; - local_cc = (ANM2 *)((int)local_cc + -1); + local_cc = (ANM2 *)(GHIDRA_INT(local_cc) + -1); } while (local_cc != (ANM2 *)0x0); if (local_b0->_isCoopGhost != 0) { reset_body_sprite(local_b0); @@ -6375,7 +6375,7 @@ void Entity_Player::AddCostume(ItemConfig_Item *collectibleID, byte itemStateOnl local_8 = (void *)0xffffffff; puStack_c = &LAB_00afef40; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(itemName + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((itemName + 10)); ExceptionList = &local_10; costumeItem = collectibleID; if (((this->_variant != 1) && (collectibleID != (ItemConfig_Item *)0x0)) && @@ -6383,7 +6383,7 @@ void Entity_Player::AddCostume(ItemConfig_Item *collectibleID, byte itemStateOnl if (collectibleID->type == 1) { if ((collectibleID->id == 0x76) && (iVar3 = GetCollectibleNum(this,0x76,0), 1 < iVar3)) { pvVar5 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar5 >> 2 < 0x2e) { + if (GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar5) >> 2 < 0x2e) { collectibleID = (ItemConfig_Item *)0x0; } else { @@ -6394,7 +6394,7 @@ void Entity_Player::AddCostume(ItemConfig_Item *collectibleID, byte itemStateOnl if (collectibleID->type == 1) { if ((collectibleID->id == 0x299) && (iVar3 = GetCollectibleNum(this,0x299,0), 1 < iVar3)) { pvVar5 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar5 >> 2 < 0x7e) { + if (GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar5) >> 2 < 0x7e) { collectibleID = (ItemConfig_Item *)0x0; } else { @@ -6405,7 +6405,7 @@ void Entity_Player::AddCostume(ItemConfig_Item *collectibleID, byte itemStateOnl if (((collectibleID->type == 1) && (collectibleID->id == 0x2da)) && (iVar3 = GetCollectibleNum(this,0x2da,0), 1 < iVar3)) { pvVar5 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar5 >> 2 < 0x7f) { + if (GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar5) >> 2 < 0x7f) { collectibleID = (ItemConfig_Item *)0x0; } else { @@ -6437,7 +6437,7 @@ void Entity_Player::AddCostume(ItemConfig_Item *collectibleID, byte itemStateOnl pvVar5 = (void *)*piVar4; } else { - pvVar5 = (void *)((int)pvVar5 + 0x130); + pvVar5 = (void *)(GHIDRA_INT(pvVar5) + 0x130); } } while (pvVar5 != (this->_costumeSpriteDescs)._end); if (isDuplicate) { @@ -6451,9 +6451,9 @@ void Entity_Player::AddCostume(ItemConfig_Item *collectibleID, byte itemStateOnl uVar6 = uStack_30 + 1; pvVar5 = duplicateItemName[0]; if (0xfff < uVar6) { - pvVar5 = *(void **)((int)duplicateItemName[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(duplicateItemName[0]) + -4); uVar6 = uStack_30 + 0x24; - if (0x1f < (uint)((int)duplicateItemName[0] + (-4 - (int)pvVar5))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(duplicateItemName[0]) + (-4 - GHIDRA_INT(pvVar5))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -6478,7 +6478,7 @@ void Entity_Player::AddCostume(ItemConfig_Item *collectibleID, byte itemStateOnl else { FUN_007dd8a0(); ppvVar1 = &(this->_costumeSpriteDescs)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 0x130); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 0x130); } local_8 = (void *)0x2; ((ANM2 *)(&newCostume))->ANM2::Reset(); @@ -6487,26 +6487,26 @@ void Entity_Player::AddCostume(ItemConfig_Item *collectibleID, byte itemStateOnl ((std::string *)(newCostume._animDefaultName._buf))->std::string::_Tidy_deallocate(); ((std::string *)((char *)&newCostume))->std::string::_Tidy_deallocate(); local_8 = (void *)0xffffffff; - *(int *)((int)(this->_costumeSpriteDescs)._end + -0x18) = (collectibleID->costume).priority; - *(byte *)((int)(this->_costumeSpriteDescs)._end + -0x13) = (collectibleID->costume).isFlying + *(int *)(GHIDRA_INT((this->_costumeSpriteDescs)._end) + -0x18) = (collectibleID->costume).priority; + *(byte *)(GHIDRA_INT((this->_costumeSpriteDescs)._end) + -0x13) = (collectibleID->costume).isFlying ; - *(byte *)((int)(this->_costumeSpriteDescs)._end + -0x12) = + *(byte *)(GHIDRA_INT((this->_costumeSpriteDescs)._end) + -0x12) = (collectibleID->costume).hasOverlay; - *(int *)((int)(this->_costumeSpriteDescs)._end + -0x10) = (collectibleID->costume).skinColor + *(int *)(GHIDRA_INT((this->_costumeSpriteDescs)._end) + -0x10) = (collectibleID->costume).skinColor ; - *(int *)((int)(this->_costumeSpriteDescs)._end + -0xc) = (collectibleID->costume).skinColor; - *(byte *)((int)(this->_costumeSpriteDescs)._end + -0x11) = + *(int *)(GHIDRA_INT((this->_costumeSpriteDescs)._end) + -0xc) = (collectibleID->costume).skinColor; + *(byte *)(GHIDRA_INT((this->_costumeSpriteDescs)._end) + -0x11) = (collectibleID->costume).hasSkinAlt; - *(byte *)((int)(this->_costumeSpriteDescs)._end + -8) = + *(byte *)(GHIDRA_INT((this->_costumeSpriteDescs)._end) + -8) = (collectibleID->costume).overwriteColor; - *(byte *)((int)(this->_costumeSpriteDescs)._end + -7) = itemStateOnly; + *(byte *)(GHIDRA_INT((this->_costumeSpriteDescs)._end) + -7) = itemStateOnly; if (((g_game->_dailyChallenge)._specialDailyId == 0xd) && ((((iVar3 = collectibleID->type, iVar3 == 1 || (iVar3 == 3)) || (iVar3 == 4)) && (collectibleID->id == 0x1a8)))) { - piVar4 = (int *)((int)(this->_costumeSpriteDescs)._end + -0x18); + piVar4 = (int *)(GHIDRA_INT((this->_costumeSpriteDescs)._end) + -0x18); *piVar4 = *piVar4 + 3; } - local_180 = (ANM2 *)((int)(this->_costumeSpriteDescs)._end + -0x130); + local_180 = (ANM2 *)(GHIDRA_INT((this->_costumeSpriteDescs)._end) + -0x130); ((ANM2 *)(local_180))->ANM2::Load(&(collectibleID->costume).anm2Path,0); manager = g_manager; bVar2 = extraout_CL; @@ -6522,8 +6522,8 @@ void Entity_Player::AddCostume(ItemConfig_Item *collectibleID, byte itemStateOnl Sprite::ReplaceSpritesheet ((Sprite *)local_180,0, (std_string *) - ((int)edenHairBegin + - (local_184 % (uint)(((int)pvVar5 - (int)edenHairBegin) / 0x18)) * 0x18)); + (GHIDRA_INT(edenHairBegin) + + (local_184 % GHIDRA_UINT(((GHIDRA_INT(pvVar5) - GHIDRA_INT(edenHairBegin)) / 0x18))) * 0x18)); bVar2 = extraout_CL_00; } costumeSprite = local_180; @@ -6540,7 +6540,7 @@ void Entity_Player::AddCostume(ItemConfig_Item *collectibleID, byte itemStateOnl layerName = &s_empty; } else { - layerName = (byte *)((int)pvVar5 + 8); + layerName = (byte *)(GHIDRA_INT(pvVar5) + 8); if (0xf < *(uint *)((char *)pvVar5 + 0x1c)) { layerName = *(byte **)layerName; } @@ -6567,9 +6567,9 @@ void Entity_Player::AddCostume(ItemConfig_Item *collectibleID, byte itemStateOnl uVar6 = uStack_18 + 1; pvVar5 = itemName[0]; if (0xfff < uVar6) { - pvVar5 = *(void **)((int)itemName[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(itemName[0]) + -4); uVar6 = uStack_18 + 0x24; - if (0x1f < (uint)((int)itemName[0] + (-4 - (int)pvVar5))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(itemName[0]) + (-4 - GHIDRA_INT(pvVar5))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -6578,18 +6578,18 @@ void Entity_Player::AddCostume(ItemConfig_Item *collectibleID, byte itemStateOnl } uStack_1c = 0; uStack_18 = 0xf; - itemName[0] = (void *)((uint)itemName[0] & 0xffffff00); + itemName[0] = (void *)(GHIDRA_UINT(itemName[0]) & 0xffffff00); } } else if (isHasBodyLayer != '\0') { pvVar5 = (this->_costumeSpriteDescs)._end; if (pvVar5 == (this->_costumeSpriteDescs)._capacity) { - FUN_007ddac0(pvVar5,(int)pvVar5 + -0x130); + FUN_007ddac0(pvVar5,GHIDRA_INT(pvVar5) + -0x130); } else { - FUN_007de0e0((int)pvVar5 + -0x130); + FUN_007de0e0(GHIDRA_INT(pvVar5) + -0x130); ppvVar1 = &(this->_costumeSpriteDescs)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 0x130); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 0x130); } } UpdateCostumes(this); @@ -6607,7 +6607,7 @@ void Entity_Player::AddNullCostume(int costumeid) if ((costumeid < 0) || (nullItemsBegin = (g_manager->_itemConfig)._nullItems._begin, - (int)(g_manager->_itemConfig)._nullItems._end - (int)nullItemsBegin >> 2 <= costumeid)) { + GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(nullItemsBegin) >> 2 <= costumeid)) { AddCostume(this,(ItemConfig_Item *)0x0,0); return; } @@ -6643,7 +6643,7 @@ void Entity_Player::RemoveCostume(ItemConfig_Item *Item) costumeIt = (void *)*nextCostumeIt; } else { - costumeIt = (void *)((int)costumeIt + 0x130); + costumeIt = (void *)(GHIDRA_INT(costumeIt) + 0x130); } } while (costumeIt != (this->_costumeSpriteDescs)._end); if (isRemoved) { @@ -6662,7 +6662,7 @@ byte Entity_Player::IsNullItemCostumeVisible(int nullItemID, int playerSpriteLay if ((nullItemID < 0) || (nullItems = (g_manager->_itemConfig)._nullItems._begin, - (int)(g_manager->_itemConfig)._nullItems._end - (int)nullItems >> 2 <= nullItemID)) { + GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(nullItems) >> 2 <= nullItemID)) { isVisible = IsItemCostumeVisible(this,(ItemConfig_Item *)0x0,playerSpriteLayerID); return isVisible; } @@ -6802,7 +6802,7 @@ void Entity_Player::IncrementPlayerFormCounter(int ePlayerForm, int num) bool isPrevFound; void *playerFormConfigs; - if ((((this->_hasCurseMistEffect == 0) && (this->_isCoopGhost == 0)) && ((uint)ePlayerForm < 0x10) + if ((((this->_hasCurseMistEffect == 0) && (this->_isCoopGhost == 0)) && (GHIDRA_UINT(ePlayerForm) < 0x10) ) && (2 < this->_playerForms[ePlayerForm])) { isFormActiveBefore = '\x01'; } @@ -6831,7 +6831,7 @@ void Entity_Player::IncrementPlayerFormCounter(int ePlayerForm, int num) } } if (((this->_hasCurseMistEffect == 0) && (this->_isCoopGhost == 0)) && - (((uint)ePlayerForm < 0x10 && (2 < this->_playerForms[ePlayerForm])))) { + ((GHIDRA_UINT(ePlayerForm) < 0x10 && (2 < this->_playerForms[ePlayerForm])))) { isFormActive = '\x01'; } else { @@ -6847,7 +6847,7 @@ void Entity_Player::IncrementPlayerFormCounter(int ePlayerForm, int num) sfxOwner = g_manager; if ((ePlayerForm < 0) || (playerFormConfigs = (g_manager->_itemConfig)._playerForms._begin, - (int)(g_manager->_itemConfig)._playerForms._end - (int)playerFormConfigs >> 2 <= ePlayerForm)) + GHIDRA_INT((g_manager->_itemConfig)._playerForms._end) - GHIDRA_INT(playerFormConfigs) >> 2 <= ePlayerForm)) { local_10.x = 0.0; } @@ -6886,7 +6886,7 @@ void Entity_Player::IncrementPlayerFormCounter(int ePlayerForm, int num) case 5: if (isFormActive != '\0') { if ((this->_playerFormsRewarded & 0x20) == 0) { - uVar4 = ((RNG *)((RNG *)((int)(this->_collectibleRNGs)._begin + 0xd0)))->RNG::Next(); + uVar4 = ((RNG *)((RNG *)(GHIDRA_INT((this->_collectibleRNGs)._begin) + 0xd0)))->RNG::Next(); position = Room::FindFreePickupSpawnPosition(g_game->_room,&local_18,&this->_pos,40.0,0,0,0) ; ((Game *)(g_game))->Game::SpawnEx(5,0x46,position,&g_vectorZero,(Entity *)this,0,uVar4,0); @@ -6913,7 +6913,7 @@ LAB_0075e541: LAB_0075e806: AddPlayerFormCostume(this,ePlayerForm); if (local_10.x != 0.0) { - formName = (byte *)((int)local_10.x + 0x10); + formName = (byte *)(GHIDRA_INT(local_10.x) + 0x10); messageSlot = &g_game->_hud; if (0xf < *(uint *)((char *)local_10.x + 0x24)) { formName = *(byte **)formName; @@ -6932,13 +6932,13 @@ LAB_0075e806: manager = g_manager; local_10.x = 1.84971e-43; seed_fart_sound_override((int *)&local_10); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_10.x,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_10.x),1.0,2,0,1.0,0.0); uVar4 = Random(); local_10.x = (this->_pos).x + 0.0; local_10.y = (this->_pos).y + 5.0; ((Game *)(g_game))->Game::SpawnEx(1000,0xf,&local_10,&g_vectorZero,(Entity *)this,2,uVar4,0); - this->_playerForms[((uint)ePlayerForm >> 5) + 0x10] = - this->_playerForms[((uint)ePlayerForm >> 5) + 0x10] | 1 << ((byte)ePlayerForm & 0x1f); + this->_playerForms[(GHIDRA_UINT(ePlayerForm) >> 5) + 0x10] = + this->_playerForms[(GHIDRA_UINT(ePlayerForm) >> 5) + 0x10] | 1 << ((byte)ePlayerForm & 0x1f); return; case 0xf: bVar5 = false; @@ -6966,7 +6966,7 @@ LAB_0075e806: if (isFormActive != '\0') { local_18.x = 1.46996e-42; seed_fart_sound_override((int *)&local_18); - ((SoundEffects *)(&sfxOwner->_sfxManager))->SoundEffects::Play((int)local_18.x,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&sfxOwner->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_18.x),1.0,2,0,1.0,0.0); ((ItemOverlay *)(&g_game->_itemOverlay))->ItemOverlay::Show(0x2f,3,(Entity_Player *)0x0); sfxOwner = g_manager; } @@ -6975,7 +6975,7 @@ LAB_0075e806: } local_18.x = 1.46996e-42; seed_fart_sound_override((int *)&local_18); - ((SoundEffects *)(&sfxOwner->_sfxManager))->SoundEffects::Play((int)local_18.x,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&sfxOwner->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_18.x),1.0,2,0,1.0,0.0); ((HUD *)(&g_game->_hud))->HUD::InvalidateActiveItem(this,uVar4); sfxOwner = g_manager; manager = g_manager; @@ -7009,7 +7009,7 @@ LAB_0075e806: ((HUD *)(&g_game->_hud))->HUD::InvalidateActiveItem(this,iVar2); local_18.x = 1.46996e-42; seed_fart_sound_override((int *)&local_18); - ((SoundEffects *)(&sfxOwner->_sfxManager))->SoundEffects::Play((int)local_18.x,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&sfxOwner->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_18.x),1.0,2,0,1.0,0.0); ((ItemOverlay *)(&g_game->_itemOverlay))->ItemOverlay::Show(0x2f,3,(Entity_Player *)0x0); } goto LAB_0075e806; @@ -7022,7 +7022,7 @@ switchD_0075e474_caseD_4: } if ((((-1 < ePlayerForm) && (playerFormConfigs = (manager->_itemConfig)._playerForms._begin, - ePlayerForm < (int)(manager->_itemConfig)._playerForms._end - (int)playerFormConfigs >> 2)) + ePlayerForm < GHIDRA_INT((manager->_itemConfig)._playerForms._end) - GHIDRA_INT(playerFormConfigs) >> 2)) && (iVar2 = *(int *)((char *)playerFormConfigs + ePlayerForm * 4), iVar2 != 0)) && (iVar2 = *(int *)(iVar2 + 0x28), iVar2 != -1)) { Item = ((Config *)(&manager->_itemConfig))->Config::GetNullItem(iVar2); @@ -7039,12 +7039,12 @@ void Entity_Player::AddPlayerFormCostume(int playerForm) if (-1 < playerForm) { pvVar1 = (g_manager->_itemConfig)._playerForms._begin; - if (((playerForm < (int)(g_manager->_itemConfig)._playerForms._end - (int)pvVar1 >> 2) && + if (((playerForm < GHIDRA_INT((g_manager->_itemConfig)._playerForms._end) - GHIDRA_INT(pvVar1) >> 2) && (iVar2 = *(int *)((char *)pvVar1 + playerForm * 4), iVar2 != 0)) && (iVar2 = *(int *)(iVar2 + 0x28), iVar2 != -1)) { if ((-1 < iVar2) && (pvVar1 = (g_manager->_itemConfig)._nullItems._begin, - iVar2 < (int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar1 >> 2)) { + iVar2 < GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar1) >> 2)) { AddCostume(this,*(ItemConfig_Item **)((char *)pvVar1 + iVar2 * 4),0); return; } @@ -7102,14 +7102,14 @@ void Entity_Player::render_charge_bars(Vector *renderPos) barOffsetX = barOffsetY * 12.0; barOffsetY = barOffsetY * -35.0; if ((this->_itemState == 0x2c6) && (5 < this->_bagOfCraftingHoldFrames)) { - bar = (int)((((float)this->_bagOfCraftingHoldFrames - 5.0) / 25.0) * 100.0); + bar = GHIDRA_INT(((((float)this->_bagOfCraftingHoldFrames - 5.0) / 25.0) * 100.0)); chargeBar = this->_chargeBarSprites; } else { if (this->_playerType == 0x1b) { effect = ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::GetCollectibleEffect(0x2c0); collectibles = (manager->_itemConfig)._collectibles._begin; - if ((int)((int)(manager->_itemConfig)._collectibles._end - (int)collectibles & 0xfffffffcU) < + if (GHIDRA_INT((GHIDRA_INT((manager->_itemConfig)._collectibles._end) - GHIDRA_INT(collectibles) & 0xfffffffcU)) < 0xb01) { bar = 0; } @@ -7122,12 +7122,12 @@ void Entity_Player::render_charge_bars(Vector *renderPos) else { fVar6 = ((float)*(int *)((char *)effect + 8) * 100.0) / (float)*(int *)(bar + 0x78); } - FUN_0075ef20(this->_chargeBarSprites + 5,(int)fVar6); + FUN_0075ef20(this->_chargeBarSprites + 5,GHIDRA_INT(fVar6)); } bVar2 = HasCollectible(this,0x2c9,0); if ((bVar2 != 0) && (this->_playerType == 0x1a)) { FUN_0075ef20(this->_chargeBarSprites + 6, - (int)(((float)this->_eveSumptoriumCharge / 60.0) * 100.0)); + GHIDRA_INT((((float)this->_eveSumptoriumCharge / 60.0) * 100.0))); } weaponSlot2 = this->_weapons + 1; local_8 = 0.0; @@ -7137,13 +7137,13 @@ void Entity_Player::render_charge_bars(Vector *renderPos) fVar5 = (float10)(**(code **)(*(int *)*weaponSlot + 0x1c))(); local_c = (float)fVar5; if (0.0 < local_c) { - bar = (int)(local_c * 100.0); + bar = GHIDRA_INT((local_c * 100.0)); goto LAB_0075ebfa; } } - local_8 = (float)((int)local_8 + 1); + local_8 = (float)(GHIDRA_INT(local_8) + 1); weaponSlot = weaponSlot + 1; - } while ((uint)local_8 < 4); + } while (GHIDRA_UINT(local_8) < 4); bar = 0; LAB_0075ebfa: FUN_0075ef20(this->_chargeBarSprites,bar); @@ -7153,7 +7153,7 @@ LAB_0075ebfa: fVar5 = (float10)(**(code **)(*(int *)*weaponSlot2 + 0x20))(); local_c = (float)fVar5; if (0.0 < local_c) { - bar = (int)(local_c * 100.0); + bar = GHIDRA_INT((local_c * 100.0)); goto LAB_0075ec3c; } } @@ -7173,8 +7173,8 @@ LAB_0075ec3c: fVar6 = 100.0; } bar = 0; - if (5 < (int)fVar6) { - bar = (int)fVar6; + if (5 < GHIDRA_INT(fVar6)) { + bar = GHIDRA_INT(fVar6); } FUN_0075ef20(this->_chargeBarSprites + 2,bar); } @@ -7188,8 +7188,8 @@ LAB_0075ec3c: fVar6 = 100.0; } bar = 0; - if (5 < (int)fVar6) { - bar = (int)fVar6; + if (5 < GHIDRA_INT(fVar6)) { + bar = GHIDRA_INT(fVar6); } FUN_0075ef20(this->_chargeBarSprites + 3,bar); } @@ -7203,8 +7203,8 @@ LAB_0075ec3c: fVar6 = 100.0; } bar = 0; - if (5 < (int)fVar6) { - bar = (int)fVar6; + if (5 < GHIDRA_INT(fVar6)) { + bar = GHIDRA_INT(fVar6); } chargeBar = this->_chargeBarSprites + 4; } @@ -7228,13 +7228,13 @@ LAB_0075ed54: uVar4 = uVar4 >> 2 ^ uVar4; uVar4 = uVar4 << 5 ^ uVar4; uVar4 = uVar4 >> 0x15 ^ uVar4; - local_8 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + local_8 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283062e-10 * 0.15 + 0.05; } while (bar = bar + -1, -1 < bar) { bar = visibleBars[bar]; *(float *)(bar + 0xb4) = local_8; - local_14._4_4_ = barOffsetX + renderPos->x + *(float *)(&DAT_00c5d0bc + bar * 8); + (*(undefined4 *)((char *)&(local_14) + 0x4)) = barOffsetX + renderPos->x + *(float *)(&DAT_00c5d0bc + bar * 8); local_c = barOffsetY + renderPos->y + *(float *)(&DAT_00c5d0c0 + bar * 8); if (*(char *)(bar + 0x109) != '\0') { if (*(char *)(bar + 0x70) == '\0') { @@ -7265,7 +7265,7 @@ int Entity_Player::GetCollectibleCount() countIt = (this->_collectibleCounts)._begin; totalCount = 0; - for (remaining = (int)(this->_collectibleCounts)._end - (int)countIt >> 2; remaining != 0; + for (remaining = GHIDRA_INT((this->_collectibleCounts)._end) - GHIDRA_INT(countIt) >> 2; remaining != 0; remaining = remaining + -1) { totalCount = totalCount + *countIt; countIt = countIt + 1; @@ -7483,7 +7483,7 @@ void Entity_Player::EvaluateItems() local_8 = (void *)0xffffffff; puStack_c = &LAB_00aff0d2; local_10 = ExceptionList; - local_14 = (float)(__security_cookie ^ (uint)(prevWeaponTypes + 0x24)); + local_14 = (float)(__security_cookie ^ GHIDRA_UINT((prevWeaponTypes + 0x24))); ExceptionList = &local_10; isEffectsDisabled = (this->_temporaryeffects)._disabled; if ((this->_hasCurseMistEffect != 0) || (isMistOrGhost = '\0', this->_isCoopGhost != 0)) { @@ -7499,7 +7499,7 @@ void Entity_Player::EvaluateItems() if (bVar2 != 0) { rangeBonus = 1.0; damageTearsBonus = (undefined1 [8])0x3f80000000000000; - damageTearsBonus._0_4_ = 0x3f800000; + (*(undefined4 *)((char *)&(damageTearsBonus) + 0x0)) = 0x3f800000; luckBonus = (float)&DAT_bf800000; speedBonus = (float)&DAT_bf800000; shotSpeedBonus = (float)&DAT_bf800000; @@ -7518,7 +7518,7 @@ void Entity_Player::EvaluateItems() ((RNG *)(&statShuffleRng))->RNG::Next(); uVar24 = 0; if (local_460 != (ItemConfig_Item *)0x0) { - uVar24 = (uint)statShuffleRng._seed % (uint)local_460; + uVar24 = GHIDRA_UINT(statShuffleRng._seed) % GHIDRA_UINT(local_460); } swapStat = *(undefined4 *)(damageTearsBonus + uVar25 * 4); iVar4 = uVar24 + uVar25; @@ -7539,27 +7539,27 @@ void Entity_Player::EvaluateItems() iVar4 = GetCollectibleNum(player,0x16,0); auVar29 = _damageTearsBonus; fVar30 = (float)iVar4; - damageTearsBonus._4_4_ = (void *)(fVar30 + (float)damageTearsBonus._4_4_); - rangeBonus = auVar29._8_4_; - shotSpeedBonus = auVar29._12_4_; + (*(undefined4 *)((char *)&(damageTearsBonus) + 0x4)) = (void *)(fVar30 + (*(undefined4 *)((char *)&((float)damageTearsBonus) + 0x4))); + rangeBonus = (*(undefined4 *)((char *)&(auVar29) + 0x8)); + shotSpeedBonus = (*(undefined4 *)((char *)&(auVar29) + 0xc)); rangeBonus = fVar30 + rangeBonus; speedBonus = speedBonus - fVar30 * 0.15; iVar4 = GetCollectibleNum(player,0x17,0); auVar29 = _damageTearsBonus; fVar30 = (float)iVar4; - damageTearsBonus._4_4_ = (void *)(fVar30 + (float)damageTearsBonus._4_4_); + (*(undefined4 *)((char *)&(damageTearsBonus) + 0x4)) = (void *)(fVar30 + (*(undefined4 *)((char *)&((float)damageTearsBonus) + 0x4))); auVar1 = _damageTearsBonus; - shotSpeedBonus = auVar29._12_4_; - _damageTearsBonus = auVar1._0_12_; + shotSpeedBonus = (*(undefined4 *)((char *)&(auVar29) + 0xc)); + _damageTearsBonus = (*(undefined1 *)((char *)&(auVar1) + 0x0)); shotSpeedBonus = fVar30 + shotSpeedBonus; speedBonus = speedBonus - fVar30 * 0.15; iVar4 = GetCollectibleNum(player,0x18,0); auVar29 = _damageTearsBonus; fVar30 = (float)iVar4; - damageTearsBonus._0_4_ = fVar30 + (float)damageTearsBonus._0_4_; + (*(undefined4 *)((char *)&(damageTearsBonus) + 0x0)) = fVar30 + (*(undefined4 *)((char *)&((float)damageTearsBonus) + 0x0)); auVar1 = _damageTearsBonus; - shotSpeedBonus = auVar29._12_4_; - _damageTearsBonus = auVar1._0_12_; + shotSpeedBonus = (*(undefined4 *)((char *)&(auVar29) + 0xc)); + _damageTearsBonus = (*(undefined1 *)((char *)&(auVar1) + 0x0)); shotSpeedBonus = fVar30 + shotSpeedBonus; speedBonus = speedBonus - fVar30 * 0.15; iVar4 = GetCollectibleNum(player,0x19,0); @@ -7570,11 +7570,11 @@ void Entity_Player::EvaluateItems() iVar4 = GetCollectibleNum(player,0x1a,0); auVar29 = _damageTearsBonus; fVar30 = (float)iVar4; - damageTearsBonus._0_4_ = fVar30 + (float)damageTearsBonus._0_4_; + (*(undefined4 *)((char *)&(damageTearsBonus) + 0x0)) = fVar30 + (*(undefined4 *)((char *)&((float)damageTearsBonus) + 0x0)); auVar1 = _damageTearsBonus; - rangeBonus = auVar29._8_4_; - shotSpeedBonus = auVar29._12_4_; - damageTearsBonus = auVar1._0_8_; + rangeBonus = (*(undefined4 *)((char *)&(auVar29) + 0x8)); + shotSpeedBonus = (*(undefined4 *)((char *)&(auVar29) + 0xc)); + damageTearsBonus = (*(undefined8 *)((char *)&(auVar1) + 0x0)); rangeBonus = fVar30 + rangeBonus; speedBonus = speedBonus - fVar30 * 0.15; iVar4 = GetCollectibleNum(player,0x15a,0); @@ -7584,24 +7584,24 @@ void Entity_Player::EvaluateItems() speedBonus = speedBonus - fVar30 * 0.15; iVar4 = GetCollectibleNum(player,0x1c8,0); fVar30 = (float)iVar4; - damageTearsBonus._0_4_ = fVar30 + (float)damageTearsBonus._0_4_; + (*(undefined4 *)((char *)&(damageTearsBonus) + 0x0)) = fVar30 + (*(undefined4 *)((char *)&((float)damageTearsBonus) + 0x0)); luckBonus = fVar30 + luckBonus; speedBonus = speedBonus - fVar30 * 0.15; iVar4 = GetCollectibleNum(player,0x2c3,0); fVar30 = (float)iVar4; - damageTearsBonus._4_4_ = (void *)(fVar30 + (float)damageTearsBonus._4_4_); + (*(undefined4 *)((char *)&(damageTearsBonus) + 0x4)) = (void *)(fVar30 + (*(undefined4 *)((char *)&((float)damageTearsBonus) + 0x4))); luckBonus = fVar30 + luckBonus; speedBonus = speedBonus - fVar30 * 0.15; } bVar2 = HasCollectible(player,0x29f,0); auVar29 = _damageTearsBonus; if (bVar2 != 0) { - damageTearsBonus._4_4_ = - (void *)((float)*(ushort *)&(*(undefined1 *)((char *)(player) + 0x1db2)) * 0.1 + (float)damageTearsBonus._4_4_); - damageTearsBonus._0_4_ = - (void *)((float)*(ushort *)&(*(undefined1 *)((char *)(player) + 0x1db0)) * 0.1 + (float)damageTearsBonus._0_4_); - rangeBonus = auVar29._8_4_; - shotSpeedBonus = auVar29._12_4_; + (*(undefined4 *)((char *)&(damageTearsBonus) + 0x4)) = + (void *)((float)*(ushort *)&(*(undefined1 *)((char *)(player) + 0x1db2)) * 0.1 + (*(undefined4 *)((char *)&((float)damageTearsBonus) + 0x4))); + (*(undefined4 *)((char *)&(damageTearsBonus) + 0x0)) = + (void *)((float)*(ushort *)&(*(undefined1 *)((char *)(player) + 0x1db0)) * 0.1 + (*(undefined4 *)((char *)&((float)damageTearsBonus) + 0x0))); + rangeBonus = (*(undefined4 *)((char *)&(auVar29) + 0x8)); + shotSpeedBonus = (*(undefined4 *)((char *)&(auVar29) + 0xc)); rangeBonus = (float)*(ushort *)&(*(undefined1 *)((char *)(player) + 0x1db4)) * 0.1 + rangeBonus; shotSpeedBonus = (float)*(ushort *)&(*(undefined1 *)((char *)(player) + 0x1db6)) * 0.1 + shotSpeedBonus; speedBonus = (float)*(ushort *)&(*(undefined1 *)((char *)(player) + 0x1db8)) * 0.1 + speedBonus; @@ -7610,12 +7610,12 @@ void Entity_Player::EvaluateItems() bVar2 = HasCollectible(player,0x2ae,0); auVar29 = _damageTearsBonus; if (bVar2 != 0) { - damageTearsBonus._4_4_ = - (void *)((float)*(ushort *)&(*(undefined1 *)((char *)(player) + 0x1dbe)) * 0.2 + (float)damageTearsBonus._4_4_); - damageTearsBonus._0_4_ = - (void *)((float)*(ushort *)&(*(undefined1 *)((char *)(player) + 0x1dbc)) * 0.2 + (float)damageTearsBonus._0_4_); - rangeBonus = auVar29._8_4_; - shotSpeedBonus = auVar29._12_4_; + (*(undefined4 *)((char *)&(damageTearsBonus) + 0x4)) = + (void *)((float)*(ushort *)&(*(undefined1 *)((char *)(player) + 0x1dbe)) * 0.2 + (*(undefined4 *)((char *)&((float)damageTearsBonus) + 0x4))); + (*(undefined4 *)((char *)&(damageTearsBonus) + 0x0)) = + (void *)((float)*(ushort *)&(*(undefined1 *)((char *)(player) + 0x1dbc)) * 0.2 + (*(undefined4 *)((char *)&((float)damageTearsBonus) + 0x0))); + rangeBonus = (*(undefined4 *)((char *)&(auVar29) + 0x8)); + shotSpeedBonus = (*(undefined4 *)((char *)&(auVar29) + 0xc)); rangeBonus = (float)*(ushort *)&(*(undefined1 *)((char *)(player) + 0x1dc0)) * 0.2 + rangeBonus; shotSpeedBonus = (float)*(ushort *)&(*(undefined1 *)((char *)(player) + 0x1dc2)) * 0.2 + shotSpeedBonus; speedBonus = (float)*(ushort *)&(*(undefined1 *)((char *)(player) + 0x1dc4)) * 0.2 + speedBonus; @@ -7738,7 +7738,7 @@ LAB_00763fb3: } uVar25 = 0; do { - Isaac::DestoryWeapon((Weapon **)((int)pEVar33->_weapons + uVar25 + 4)); + Isaac::DestoryWeapon((Weapon **)(GHIDRA_INT(pEVar33->_weapons) + uVar25 + 4)); uVar25 = uVar25 + 4; pEVar33 = player; } while (uVar25 < 0x10); @@ -7750,7 +7750,7 @@ LAB_00763fb3: if (*(char *)((char *)pEVar33->_weapons + uVar25 + 0x14) != '\0') { weapon = Isaac::CreateWeapon(uVar25,(Entity *)pEVar33); iVar4 = iVar4 + 1; - local_470->type = (int)weapon; + local_470->type = GHIDRA_INT(weapon); local_470 = (ItemConfig_Item *)&local_470->id; pEVar33 = player; } @@ -7854,7 +7854,7 @@ LAB_00763fb3: if ((iVar4 == 6) || (iVar4 == 0x1b)) { local_478 = local_478 - 0.1; LAB_0076474b: - fVar30 = (float)damageTearsBonus._4_4_ * 0.5; + fVar30 = (*(undefined4 *)((char *)&((float)damageTearsBonus) + 0x4)) * 0.5; if ((iVar4 == 9) || (iVar4 == 0x1e)) { fVar30 = fVar30 + pEVar33->_edenFireDelay; } @@ -7884,7 +7884,7 @@ LAB_0076474b: goto LAB_0076474b; } local_478 = local_478 - 0.35; - fVar30 = (float)damageTearsBonus._4_4_ * 0.5; + fVar30 = (*(undefined4 *)((char *)&((float)damageTearsBonus) + 0x4)) * 0.5; } if (fVar30 < 0.0) { fVar30 = fVar30 * 0.686655; @@ -7976,11 +7976,11 @@ LAB_0076474b: ((float)(iVar8 + iVar4 + iVar5 + iVar6 + iVar7) + (float)local_470); iVar4 = GetCollectibleNum(pEVar33,0x135,0); local_470 = (ItemConfig_Item *) - (((float)iVar4 + (float)local_470 + (float)local_488 + (float)(int)local_46c) * 0.5) + (((float)iVar4 + (float)local_470 + (float)local_488 + (float)GHIDRA_INT(local_46c)) * 0.5) ; iVar4 = GetTrinketMultiplier(pEVar33,0x27); local_460 = (ItemConfig_Item *) - ((float)(int)pEVar33->_brittleBonesUpgrades * 0.4 + + ((float)GHIDRA_INT(pEVar33->_brittleBonesUpgrades) * 0.4 + (float)iVar4 + (float)local_464 + (float)local_470 + (float)local_460); iVar4 = GetCollectibleNum(pEVar33,0x18d,0); iVar5 = ((TemporaryEffects *)(&pEVar33->_temporaryeffects))->TemporaryEffects::GetCollectibleEffectNum(0x18d); @@ -8214,12 +8214,12 @@ LAB_00764df6: } bVar2 = HasCollectible(player,0x2b7,0); if ((bVar2 != 0) && (isEffectsDisabled == 0)) { - fVar30 = Math::clamp(0.0,6.0,(float)(int)player->_bloodLustCounter); + fVar30 = Math::clamp(0.0,6.0,(float)GHIDRA_INT(player->_bloodLustCounter)); local_464 = (TemporaryEffects *)(fVar30 * 0.05 * fVar30 + fVar30 * 0.2 + (float)local_464); } bVar2 = ((TemporaryEffects *)(temporaryEffects))->TemporaryEffects::HasCollectibleEffect(0xba); if ((bVar2 != 0) && (isEffectsDisabled == 0)) { - fVar30 = Math::clamp(0.0,999.0,(float)(int)player->_bloodLustCounter); + fVar30 = Math::clamp(0.0,999.0,(float)GHIDRA_INT(player->_bloodLustCounter)); local_464 = (TemporaryEffects *)(fVar30 * 0.15 + 0.33 + (float)local_464); } iVar4 = get_seeded_variant(player); @@ -8320,9 +8320,9 @@ LAB_00764df6: iVar5 = *piVar13; piVar13 = (int *)FUN_0042c810(); *(float *)local_464 = - (float)(int)((char *)((int)&((Vector *)((int)local_488 + -8))[-9].x + - (int)((local_470->name)._buf + *piVar13 + iVar4 + iVar5)) + - (int)(local_46c->_sprite)._filename._buf) * 0.6 + *(float *)local_464; + (float)GHIDRA_INT(((char *)(GHIDRA_INT(&((Vector *)(GHIDRA_INT(local_488) + -8))[-9].x) + + GHIDRA_INT(((local_470->name)._buf + *piVar13 + iVar4 + iVar5))) + + GHIDRA_INT((local_46c->_sprite)._filename._buf))) * 0.6 + *(float *)local_464; pTVar31 = local_464; temporaryEffects = local_468; } @@ -8472,8 +8472,8 @@ LAB_00765c5f: iVar9 = GetCollectibleNum(player,4,0); iVar15 = ((TemporaryEffects *)(temporaryEffects))->TemporaryEffects::GetCollectibleEffectNum(0x2b4); local_460 = (ItemConfig_Item *) - ((float)(int)(iVar15 + (uint)bVar2 + (uint)isProptosisEffect + iVar4 + iVar5 + iVar6 - + iVar7 + iVar8 + iVar9) * 0.5 + (float)local_460); + ((float)GHIDRA_INT((iVar15 + GHIDRA_UINT(bVar2) + GHIDRA_UINT(isProptosisEffect) + iVar4 + iVar5 + iVar6 + + iVar7 + iVar8 + iVar9)) * 0.5 + (float)local_460); iVar4 = GetCollectibleNum(player,0x1cf,0); iVar5 = GetCollectibleNum(player,0x1bd,0); iVar6 = GetCollectibleNum(player,0xc9,0); @@ -8703,7 +8703,7 @@ LAB_007668df: else { iVar4 = 0; } - fVar30 = (float)iVar4 + (float)damageTearsBonus._0_4_ + fVar30; + fVar30 = (float)iVar4 + (*(undefined4 *)((char *)&((float)damageTearsBonus) + 0x0)) + fVar30; rawDamage = fVar30; pfVar10 = (float *)std::max(); pEVar33->_damage = *pfVar10; @@ -8756,9 +8756,9 @@ LAB_007668df: cVar3 = DeathmatchManager::is_active(); pIVar20 = local_460; if (cVar3 != '\0') { - pIVar20 = (ItemConfig_Item *)((uint)local_460 >> 3); + pIVar20 = (ItemConfig_Item *)(GHIDRA_UINT(local_460) >> 3); } - fVar30 = (float)(int)pIVar20 + (float)(int)pIVar20; + fVar30 = (float)GHIDRA_INT(pIVar20) + (float)GHIDRA_INT(pIVar20); pow_wrapper(); pEVar33->_damage = fVar30 * 0.1 + pEVar33->_damage; } @@ -8771,7 +8771,7 @@ LAB_007668df: else { fVar30 = 10.0; } - fVar30 = Math::clamp(0.0,fVar30,(float)(int)pEVar33->_bloodLustCounter); + fVar30 = Math::clamp(0.0,fVar30,(float)GHIDRA_INT(pEVar33->_bloodLustCounter)); pEVar33->_damage = fVar30 * 0.1 * fVar30 + fVar30 * 0.4 + pEVar33->_damage; } if ((((pEVar33->_playerType == 7) || (pEVar33->_playerType == 0x1c)) || @@ -8879,7 +8879,7 @@ LAB_00766f9a: *pfVar12 = fVar32; } if (0 < pEVar33->_damageMultiplierStacks) { - fVar32 = pow(1.5,(float)(int)pEVar33->_damageMultiplierStacks); + fVar32 = pow(1.5,(float)GHIDRA_INT(pEVar33->_damageMultiplierStacks)); fVar30 = fVar32 * pEVar33->_damage; fVar32 = fVar32 * pEVar33->_meleeDamage; } @@ -9173,7 +9173,7 @@ LAB_00767ac2: iVar6 = ((TemporaryEffects *)(&pEVar33->_temporaryeffects))->TemporaryEffects::GetCollectibleEffectNum(0x47); iVar7 = ((TemporaryEffects *)(&pEVar33->_temporaryeffects))->TemporaryEffects::GetCollectibleEffectNum(0xc); local_460 = (ItemConfig_Item *) - ((float)(iVar7 + (int)local_460 + iVar4 + iVar5 + iVar6) + rangeBonus); + ((float)(iVar7 + GHIDRA_INT(local_460) + iVar4 + iVar5 + iVar6) + rangeBonus); iVar4 = GetCollectibleNum(pEVar33,0x1e,0); local_460 = (ItemConfig_Item *)((float)iVar4 + (float)local_460); iVar4 = GetCollectibleNum(pEVar33,0x1f,0); @@ -9394,7 +9394,7 @@ LAB_00768248: if ((uVar25 & 0x10) != 0) { _DAT_00c5c3d4 = pEVar33->_edenSpeed; local_480 = (Entity_Player *)0x0; - if ((uint)pEVar33->_playerType < 0x29) { + if (GHIDRA_UINT(pEVar33->_playerType) < 0x29) { local_480 = *(Entity_Player **)(&DAT_00c5c3b0 + pEVar33->_playerType * 4); } _DAT_00c5c428 = _DAT_00c5c3d4; @@ -9417,15 +9417,15 @@ LAB_00768248: if (iVar4 < 1) { local_46c = (Entity_Player *)GetCollectibleNum(pEVar33,0x8f,0); iVar4 = ((TemporaryEffects *)(temporaryEffects))->TemporaryEffects::GetCollectibleEffectNum(0x8f); - local_46c = (Entity_Player *)((int)local_46c + iVar4); + local_46c = (Entity_Player *)(GHIDRA_INT(local_46c) + iVar4); } else { local_46c = (Entity_Player *)0x0; } iVar4 = GetCollectibleNum(pEVar33,0xe,0); - familiarList._16_4_ = ((TemporaryEffects *)(&pEVar33->_temporaryeffects))->TemporaryEffects::GetCollectibleEffectNum(0xe) + (*(undefined4 *)((char *)&(familiarList) + 0x10)) = ((TemporaryEffects *)(&pEVar33->_temporaryeffects))->TemporaryEffects::GetCollectibleEffectNum(0xe) ; - familiarList._16_4_ = iVar4 + familiarList._16_4_; + (*(undefined4 *)((char *)&(familiarList) + 0x10)) = iVar4 + (*(undefined4 *)((char *)&(familiarList) + 0x10)); local_5b4 = (void *)0x1; iVar4 = GetCollectibleNum(pEVar33,0xd,0); virusCount = ((TemporaryEffects *)(&pEVar33->_temporaryeffects))->TemporaryEffects::GetCollectibleEffectNum(0xd); @@ -9455,7 +9455,7 @@ LAB_00768248: iVar4 = GetCollectibleNum(pEVar33,0x78,0); local_460 = (ItemConfig_Item *)((float)iVar4 + (float)local_460); iVar4 = ((TemporaryEffects *)(&pEVar33->_temporaryeffects))->TemporaryEffects::GetCollectibleEffectNum(0x78); - local_460 = (ItemConfig_Item *)((float)iVar4 + (float)local_460 + (float)(int)local_46c); + local_460 = (ItemConfig_Item *)((float)iVar4 + (float)local_460 + (float)GHIDRA_INT(local_46c)); iVar4 = GetCollectibleNum(pEVar33,0x52,0); local_460 = (ItemConfig_Item *)((float)iVar4 + (float)local_460); iVar4 = GetCollectibleNum(pEVar33,0x23b,0); @@ -9494,7 +9494,7 @@ LAB_00768248: iVar5 = 0; } pEVar33->_movespeed = ((float)iVar5 + speedBonus) * 0.2 + (float)iVar4 * 0.1 + (float)local_460; - if ((0x28 < (uint)pEVar33->_playerType) || + if ((0x28 < GHIDRA_UINT(pEVar33->_playerType)) || (0.0 <= *(float *)(&DAT_00c5c3b0 + pEVar33->_playerType * 4))) { bVar2 = ((TemporaryEffects *)(&pEVar33->_temporaryeffects))->TemporaryEffects::HasNullEffect(0x3e); if ((bVar2 != 0) || @@ -9520,7 +9520,7 @@ LAB_00768248: } bVar2 = HasCollectible(pEVar33,0x2b7,0); if ((bVar2 != 0) && (isEffectsDisabled == 0)) { - fVar32 = Math::clamp(0.0,6.0,(float)(int)pEVar33->_bloodLustCounter); + fVar32 = Math::clamp(0.0,6.0,(float)GHIDRA_INT(pEVar33->_bloodLustCounter)); fVar30 = fVar32 * 0.05; pEVar33->_movespeed = fVar32 * 0.02 * fVar32 + fVar30 + pEVar33->_movespeed; } @@ -9576,7 +9576,7 @@ LAB_00768248: } bVar2 = HasCollectible(pEVar33,0x82,0); if ((bVar2 != 0) || (bVar2 = HasCollectible(pEVar33,0xb5,0), bVar2 != 0)) { - local_5a8._0_4_ = 0x3fc00000; + (*(undefined4 *)((char *)&(local_5a8) + 0x0)) = 0x3fc00000; pfVar10 = (float *)std::max(); pEVar33->_movespeed = *pfVar10; } @@ -10355,7 +10355,7 @@ LAB_0076ae8d: } } ((LuaEngine *)(g_luaEngine))->LuaEngine::EvaluateItems(pEVar33,0x80); - pEVar33->_entityGridCollisionClass = (uint)(pEVar33->_canFly == 0) * 2 + 3; + pEVar33->_entityGridCollisionClass = GHIDRA_UINT((pEVar33->_canFly == 0)) * 2 + 3; if (pEVar33->_canFly != local_47b) { UpdateCostumes(pEVar33); } @@ -10982,7 +10982,7 @@ LAB_0076ae8d: pIVar20 = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(0x1b1); pRVar22 = (RNG *)rng_vector_at(); local_5a8._size = GetCollectibleNum(player,0x1b1,0); - local_598._0_4_ = 1; + (*(undefined4 *)((char *)&(local_598) + 0x0)) = 1; clampedCount = (uint *)std::min(); pEVar33 = player; CheckFamiliar(player,0x83,*clampedCount,pRVar22,pIVar20,-1); @@ -11038,7 +11038,7 @@ LAB_0076ae8d: pIVar20 = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(0x239); pRVar22 = (RNG *)rng_vector_at(); local_598._data = (void *)GetCollectibleNum(player,0x239,0); - local_578._0_4_ = 1; + (*(undefined4 *)((char *)&(local_578) + 0x0)) = 1; clampedCount = (uint *)std::min(); CheckFamiliar(player,0xcb,*clampedCount,pRVar22,pIVar20,-1); itemConfig = Isaac::GetItemConfig(); @@ -11148,7 +11148,7 @@ LAB_0076ae8d: itemConfig = Isaac::GetItemConfig(); pIVar20 = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(0x20d); pRVar22 = (RNG *)rng_vector_at(); - CheckFamiliar(pEVar33,0x79,(int)pEVar33->_numLeprosy,pRVar22,pIVar20,-1); + CheckFamiliar(pEVar33,0x79,GHIDRA_INT(pEVar33->_numLeprosy),pRVar22,pIVar20,-1); itemConfig = Isaac::GetItemConfig(); pIVar20 = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(0x1b4); pRVar22 = (RNG *)rng_vector_at(); @@ -11195,13 +11195,13 @@ LAB_0076ae8d: pRVar22 = (RNG *)rng_vector_at(); bVar2 = ((TemporaryEffects *)(local_464))->TemporaryEffects::HasCollectibleEffect(0x112); pEVar33 = player; - CheckFamiliar(player,0x3c,(uint)(bVar2 != 0),pRVar22,pIVar20,-1); + CheckFamiliar(player,0x3c,GHIDRA_UINT((bVar2 != 0)),pRVar22,pIVar20,-1); iVar4 = GetCollectibleNum(pEVar33,0x49,0); iVar5 = ((TemporaryEffects *)(local_464))->TemporaryEffects::GetCollectibleEffectNum(0x49); uVar25 = pEVar33->_potatoPeelerCounter + iVar5 + iVar4; - local_460 = (ItemConfig_Item *)((int)(uVar25 + ((int)uVar25 >> 0x1f & 3U)) >> 2); + local_460 = (ItemConfig_Item *)(GHIDRA_INT((uVar25 + (GHIDRA_INT(uVar25) >> 0x1f & 3U))) >> 2); uVar25 = uVar25 & 0x80000003; - if ((int)uVar25 < 0) { + if (GHIDRA_INT(uVar25) < 0) { uVar25 = (uVar25 - 1 | 0xfffffffc) + 1; } itemConfig = Isaac::GetItemConfig(); @@ -11209,30 +11209,30 @@ LAB_0076ae8d: iVar4 = -1; pIVar20 = collectibleItem; pRVar22 = (RNG *)rng_vector_at(); - CheckFamiliar(player,0x2c,(uint)(uVar25 == 1),pRVar22,pIVar20,iVar4); + CheckFamiliar(player,0x2c,GHIDRA_UINT((uVar25 == 1)),pRVar22,pIVar20,iVar4); iVar4 = -1; pIVar20 = collectibleItem; pRVar22 = (RNG *)rng_vector_at(); - CheckFamiliar(player,0x2d,(uint)(uVar25 == 2),pRVar22,pIVar20,iVar4); + CheckFamiliar(player,0x2d,GHIDRA_UINT((uVar25 == 2)),pRVar22,pIVar20,iVar4); iVar4 = -1; pIVar20 = collectibleItem; pRVar22 = (RNG *)rng_vector_at(); pEVar33 = player; - CheckFamiliar(player,0x2e,(uint)(uVar25 == 3),pRVar22,pIVar20,iVar4); + CheckFamiliar(player,0x2e,GHIDRA_UINT((uVar25 == 3)),pRVar22,pIVar20,iVar4); iVar4 = -1; pRVar22 = (RNG *)rng_vector_at(); pIVar20 = local_460; - CheckFamiliar(pEVar33,0x2f,(uint)local_460,pRVar22,collectibleItem,iVar4); - if (0 < (int)pIVar20) { + CheckFamiliar(pEVar33,0x2f,GHIDRA_UINT(local_460),pRVar22,collectibleItem,iVar4); + if (0 < GHIDRA_INT(pIVar20)) { persistentGameData = (PersistentGameData *)((Room *)((Room *)g_manager))->Room::GetTopLeftPos(); ((PersistentGameData *)(persistentGameData))->PersistentGameData::TryUnlock(0x90); } iVar4 = GetCollectibleNum(pEVar33,0xcf,0); iVar5 = ((TemporaryEffects *)(local_464))->TemporaryEffects::GetCollectibleEffectNum(0xcf); uVar25 = pEVar33->_potatoPeelerBandageCounter + iVar5 + iVar4; - local_460 = (ItemConfig_Item *)((int)(uVar25 + ((int)uVar25 >> 0x1f & 3U)) >> 2); + local_460 = (ItemConfig_Item *)(GHIDRA_INT((uVar25 + (GHIDRA_INT(uVar25) >> 0x1f & 3U))) >> 2); uVar25 = uVar25 & 0x80000003; - if ((int)uVar25 < 0) { + if (GHIDRA_INT(uVar25) < 0) { uVar25 = (uVar25 - 1 | 0xfffffffc) + 1; } itemConfig = Isaac::GetItemConfig(); @@ -11240,21 +11240,21 @@ LAB_0076ae8d: iVar4 = -1; pIVar20 = collectibleItem; pRVar22 = (RNG *)rng_vector_at(); - CheckFamiliar(player,0x45,(uint)(uVar25 == 1),pRVar22,pIVar20,iVar4); + CheckFamiliar(player,0x45,GHIDRA_UINT((uVar25 == 1)),pRVar22,pIVar20,iVar4); iVar4 = -1; pIVar20 = collectibleItem; pRVar22 = (RNG *)rng_vector_at(); - CheckFamiliar(player,0x46,(uint)(uVar25 == 2),pRVar22,pIVar20,iVar4); + CheckFamiliar(player,0x46,GHIDRA_UINT((uVar25 == 2)),pRVar22,pIVar20,iVar4); iVar4 = -1; pIVar20 = collectibleItem; pRVar22 = (RNG *)rng_vector_at(); pEVar33 = player; - CheckFamiliar(player,0x47,(uint)(uVar25 == 3),pRVar22,pIVar20,iVar4); + CheckFamiliar(player,0x47,GHIDRA_UINT((uVar25 == 3)),pRVar22,pIVar20,iVar4); iVar4 = -1; pRVar22 = (RNG *)rng_vector_at(); pIVar20 = local_460; - CheckFamiliar(pEVar33,0x48,(uint)local_460,pRVar22,collectibleItem,iVar4); - if (0 < (int)pIVar20) { + CheckFamiliar(pEVar33,0x48,GHIDRA_UINT(local_460),pRVar22,collectibleItem,iVar4); + if (0 < GHIDRA_INT(pIVar20)) { persistentGameData = (PersistentGameData *)((Room *)((Room *)g_manager))->Room::GetTopLeftPos(); ((PersistentGameData *)(persistentGameData))->PersistentGameData::TryUnlock(0x13); } @@ -11288,7 +11288,7 @@ LAB_0076ae8d: if (local_488 != (RNG *)0x0) { puVar26 = auStack_1bb; do { - local_46c = ((Game *)(g_game))->Game::GetPlayer((uint)local_460); + local_46c = ((Game *)(g_game))->Game::GetPlayer(GHIDRA_UINT(local_460)); iVar4 = ((Entity *)((Entity *)local_46c))->Entity::Variant(); if (iVar4 == 0) { iVar4 = GetCollectibleNum(local_46c,0xee,0); @@ -11309,7 +11309,7 @@ LAB_0076ae8d: puVar26[-2] = 0; } puVar26 = puVar26 + 6; - local_460 = (ItemConfig_Item *)((int)&local_460->type + 1); + local_460 = (ItemConfig_Item *)(GHIDRA_INT(&local_460->type) + 1); } while (local_460 < local_488); pcVar27 = local_1c0; local_484 = local_488; @@ -11318,7 +11318,7 @@ LAB_0076ae8d: local_46c = (Entity_Player *)&local_1bc; for (local_460 = (ItemConfig_Item *)0x0; ((pEVar33 = player, *pcVar27 != '\0' || (pcVar27[3] != '\0')) && (local_460 < pRVar22)); - local_460 = (ItemConfig_Item *)((int)&local_460->type + 1)) { + local_460 = (ItemConfig_Item *)(GHIDRA_INT(&local_460->type) + 1)) { pEVar33 = local_46c + -1; pcVar23 = (char *)FUN_007dd3a0(); cVar3 = *pcVar23; @@ -11334,27 +11334,27 @@ LAB_0076ae8d: pRVar22 = local_488; } pcVar27 = pcVar27 + 6; - local_484 = (RNG *)((int)&local_484[-1]._shift3 + 3); + local_484 = (RNG *)(GHIDRA_INT(&local_484[-1]._shift3) + 3); } while (local_484 != (RNG *)0x0); local_484 = (RNG *)abStack_1be; local_460 = (ItemConfig_Item *)0x0; do { pRVar22 = local_484; - local_480 = ((Game *)(g_game))->Game::GetPlayer((uint)local_460); + local_480 = ((Game *)(g_game))->Game::GetPlayer(GHIDRA_UINT(local_460)); iVar4 = ((Entity *)((Entity *)local_480))->Entity::Variant(); if (iVar4 == 0) { itemConfig = Isaac::GetItemConfig(); pIVar20 = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(0xee); local_46c = (Entity_Player *)&local_480->_collectibleRNGs; pRVar22 = (RNG *)rng_vector_at(); - CheckFamiliar(local_480,0x1a,(uint)*(byte *)((char *)local_484 + -2),pRVar22,pIVar20,-1); + CheckFamiliar(local_480,0x1a,GHIDRA_UINT(*(byte *)((char *)local_484 + -2)),pRVar22,pIVar20,-1); itemConfig = Isaac::GetItemConfig(); pIVar20 = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(0xef); pRVar22 = (RNG *)rng_vector_at(); - CheckFamiliar(local_480,0x1b,(uint)*(byte *)((char *)local_484 + -1),pRVar22,pIVar20,-1); + CheckFamiliar(local_480,0x1b,GHIDRA_UINT(*(byte *)((char *)local_484 + -1)),pRVar22,pIVar20,-1); rng = (RNG *)rng_vector_at(); pRVar22 = local_484; - CheckFamiliar(local_480,0x1c,(uint)*(byte *)local_484,rng,(ItemConfig_Item *)0x0,-1); + CheckFamiliar(local_480,0x1c,GHIDRA_UINT(*(byte *)local_484),rng,(ItemConfig_Item *)0x0,-1); if (*(byte *)pRVar22 != 0) { persistentGameData = (PersistentGameData *)((Room *)((Room *)g_manager))->Room::GetTopLeftPos(); ((PersistentGameData *)(persistentGameData))->PersistentGameData::TryUnlock(0x3a); @@ -11364,18 +11364,18 @@ LAB_0076ae8d: itemConfig = Isaac::GetItemConfig(); pIVar20 = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(0x272); pRVar22 = (RNG *)rng_vector_at(); - CheckFamiliar(local_480,0xd5,(uint)*(byte *)((char *)local_484 + 1),pRVar22,pIVar20,-1); + CheckFamiliar(local_480,0xd5,GHIDRA_UINT(*(byte *)((char *)local_484 + 1)),pRVar22,pIVar20,-1); itemConfig = Isaac::GetItemConfig(); pIVar20 = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(0x273); pRVar22 = (RNG *)rng_vector_at(); - CheckFamiliar(local_480,0xd6,(uint)*(byte *)((char *)local_484 + 2),pRVar22,pIVar20,-1); + CheckFamiliar(local_480,0xd6,GHIDRA_UINT(*(byte *)((char *)local_484 + 2)),pRVar22,pIVar20,-1); rng = (RNG *)rng_vector_at(); pRVar22 = local_484; - CheckFamiliar(local_480,0xdf,(uint)*(byte *)((char *)local_484 + 3),rng, + CheckFamiliar(local_480,0xdf,GHIDRA_UINT(*(byte *)((char *)local_484 + 3)),rng, (ItemConfig_Item *)0x0,-1); } - local_484 = (RNG *)((int)pRVar22 + 6); - local_460 = (ItemConfig_Item *)((int)&local_460->type + 1); + local_484 = (RNG *)(GHIDRA_INT(pRVar22) + 6); + local_460 = (ItemConfig_Item *)(GHIDRA_INT(&local_460->type) + 1); } while (local_460 < local_488); } bVar2 = HasCollectible(pEVar33,0x184,0); @@ -11445,7 +11445,7 @@ LAB_0076ae8d: ((Level *)((Level *)g_game))->Level::GetCurrentRoom(); entityList = (EntityList *)FUN_00428a60(); EntityList::QuerySublist(entityList,(EntityList_EL *)familiarList,3,-1,-1,0,0); - local_8 = (undefined1 *)CONCAT31(local_8._1_3_,2); + local_8 = (undefined1 *)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); iVar4 = ((EntityList *)((EntityList *)familiarList))->EntityList::Size(); if (iVar4 != 0) { uVar25 = 0; @@ -11454,8 +11454,8 @@ LAB_0076ae8d: piVar13 = (int *)__RTDynamicCast(); cVar3 = FUN_005b18e0(); if ((cVar3 != '\0') && (cVar3 = FUN_0060d130(), cVar3 == '\0')) { - if ((int)local_488 < (int)local_46c) { - local_488 = (RNG *)((int)&local_488->_seed + 1); + if (GHIDRA_INT(local_488) < GHIDRA_INT(local_46c)) { + local_488 = (RNG *)(GHIDRA_INT(&local_488->_seed) + 1); FUN_005b1910(); } else { @@ -11468,8 +11468,8 @@ LAB_0076ae8d: pEVar21 = local_46c; pEVar33 = player; } - if ((int)local_488 < (int)pEVar21) { - local_46c = (Entity_Player *)((int)pEVar21 - (int)local_488); + if (GHIDRA_INT(local_488) < GHIDRA_INT(pEVar21)) { + local_46c = (Entity_Player *)(GHIDRA_INT(pEVar21) - GHIDRA_INT(local_488)); local_488 = (RNG *)&pEVar33->_pos; do { pRVar22 = (RNG *)rng_vector_at(); @@ -11486,23 +11486,23 @@ LAB_0076ae8d: FUN_00638e20(); FUN_005b1910(); (**(code **)(*piVar13 + 0xc))(); - local_46c = (Entity_Player *)((int)local_46c + -1); + local_46c = (Entity_Player *)(GHIDRA_INT(local_46c) + -1); } while (local_46c != (Entity_Player *)0x0); } - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((EntityList_Query *)(familiarList))->EntityList_Query::~EntityList_Query(); FUN_007e8f70(); iVar4 = -1; pIVar20 = (ItemConfig_Item *)0x0; pRVar22 = &formFamiliarRng; - local_8 = (undefined1 *)CONCAT31(local_8._1_3_,3); + local_8 = (undefined1 *)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); bVar2 = HasPlayerForm(pEVar33,0xc); - CheckFamiliar(pEVar33,0x71,(uint)(bVar2 != 0),pRVar22,pIVar20,iVar4); + CheckFamiliar(pEVar33,0x71,GHIDRA_UINT((bVar2 != 0)),pRVar22,pIVar20,iVar4); itemConfig = Isaac::GetItemConfig(); pIVar20 = ((ItemConfig *)(itemConfig))->ItemConfig::GetTrinket(0x36); pRVar22 = (RNG *)rng_vector_at(); bVar2 = HasTrinket(player,0x36,0); - CheckFamiliar(player,0xc,(uint)(bVar2 != 0),pRVar22,pIVar20,-1); + CheckFamiliar(player,0xc,GHIDRA_UINT((bVar2 != 0)),pRVar22,pIVar20,-1); itemConfig = Isaac::GetItemConfig(); pIVar20 = ((ItemConfig *)(itemConfig))->ItemConfig::GetTrinket(0x39); pRVar22 = (RNG *)rng_vector_at(); @@ -11515,14 +11515,14 @@ LAB_0076ae8d: pRVar22 = (RNG *)rng_vector_at(); bVar2 = ((TemporaryEffects *)(local_464))->TemporaryEffects::HasTrinketEffect(0x3c); pEVar33 = player; - CheckFamiliar(player,0xf,(uint)(bVar2 != 0),pRVar22,pIVar20,-1); + CheckFamiliar(player,0xf,GHIDRA_UINT((bVar2 != 0)),pRVar22,pIVar20,-1); pRVar22 = (RNG *)rng_vector_at(); - CheckFamiliar(pEVar33,0x67,(int)pEVar33->_tonsilCount,pRVar22,(ItemConfig_Item *)0x0,-1); + CheckFamiliar(pEVar33,0x67,GHIDRA_INT(pEVar33->_tonsilCount),pRVar22,(ItemConfig_Item *)0x0,-1); itemConfig = Isaac::GetItemConfig(); pIVar20 = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(0x262); pRVar22 = (RNG *)rng_vector_at(); bVar2 = ((TemporaryEffects *)(local_464))->TemporaryEffects::HasCollectibleEffect(0x262); - CheckFamiliar(player,0xd2,(uint)(bVar2 != 0),pRVar22,pIVar20,-1); + CheckFamiliar(player,0xd2,GHIDRA_UINT((bVar2 != 0)),pRVar22,pIVar20,-1); itemConfig = Isaac::GetItemConfig(); pIVar20 = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(0x25d); pRVar22 = (RNG *)rng_vector_at(); @@ -11551,7 +11551,7 @@ LAB_0076ae8d: } local_470 = (ItemConfig_Item *)GetCollectibleNum(pEVar33,0x29b,0); _eh_vector_constructor_iterator_(coopBabyList,0xc,2,FUN_00424510,FID_conflict__Tidy); - local_8 = (undefined1 *)CONCAT31(local_8._1_3_,4); + local_8 = (undefined1 *)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),4); uVar25 = 0; iVar4 = ((Game *)(g_game))->Game::GetNumPlayers(); if (iVar4 != 0) { @@ -11580,19 +11580,19 @@ LAB_0076ef58: } iVar4 = ((std::vector *)(coopBabyList))->std::vector::size(); pEVar21 = local_46c; - if ((int)local_46c < iVar4) { + if (GHIDRA_INT(local_46c) < iVar4) { do { playerManager = (PlayerManager *)((Game *)(g_game))->Game::GetPlayerManager(); puVar14 = (undefined4 *)FUN_00708a50(); ((PlayerManager *)(playerManager))->PlayerManager::RemoveCoPlayer((Entity_Player *)*puVar14,0); FUN_007dc650(); iVar4 = ((std::vector *)(coopBabyList))->std::vector::size(); - } while ((int)pEVar21 < iVar4); + } while (GHIDRA_INT(pEVar21) < iVar4); pEVar33 = player; } pEVar21 = local_46c; iVar4 = ((std::vector *)(coopBabyList))->std::vector::size(); - while (iVar4 < (int)pEVar21) { + while (iVar4 < GHIDRA_INT(pEVar21)) { playerManager = (PlayerManager *)((Game *)(g_game))->Game::GetPlayerManager(); coopBaby = ((PlayerManager *)(playerManager))->PlayerManager::SpawnCoPlayerBaby(0x3b); SetControllerIndex(coopBaby,pEVar33->_controllerIndex,0); @@ -11610,19 +11610,19 @@ LAB_0076ef58: if ((cVar3 == '\0') && (cVar3 = FUN_00738330(), cVar3 == '\0')) { iVar4 = ((std::vector *)(coPlayerList))->std::vector::size(); pIVar20 = local_470; - if ((int)local_470 < iVar4) { + if (GHIDRA_INT(local_470) < iVar4) { do { playerManager = (PlayerManager *)((Game *)(g_game))->Game::GetPlayerManager(); puVar14 = (undefined4 *)FUN_00708a50(); ((PlayerManager *)(playerManager))->PlayerManager::RemoveCoPlayer((Entity_Player *)*puVar14,0); FUN_007dc650(); iVar4 = ((std::vector *)(coPlayerList))->std::vector::size(); - } while ((int)pIVar20 < iVar4); + } while (GHIDRA_INT(pIVar20) < iVar4); pEVar33 = player; } pIVar20 = local_470; iVar4 = ((std::vector *)(coPlayerList))->std::vector::size(); - while (iVar4 < (int)pIVar20) { + while (iVar4 < GHIDRA_INT(pIVar20)) { playerManager = (PlayerManager *)((Game *)(g_game))->Game::GetPlayerManager(); coPlayer = ((PlayerManager *)(playerManager))->PlayerManager::SpawnCoPlayer2(0xe); SetControllerIndex(coPlayer,pEVar33->_controllerIndex,0); @@ -11638,7 +11638,7 @@ LAB_0076ef58: } } DAT_00c7ac69 = '\0'; - local_8 = (undefined1 *)CONCAT31(local_8._1_3_,3); + local_8 = (undefined1 *)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); _eh_vector_destructor_iterator_(coopBabyList,0xc,2,FID_conflict__Tidy); } ((LuaEngine *)(g_luaEngine))->LuaEngine::EvaluateItems(pEVar33,0x200); @@ -11649,17 +11649,17 @@ LAB_0076ef58: piVar13 = (int *)FUN_0042c810(); if (*piVar13 != 0) { itemConfig = Isaac::GetItemConfig(); - local_470 = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible((int)pIVar20); + local_470 = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(GHIDRA_INT(pIVar20)); if ((local_470 != (ItemConfig_Item *)0x0) && (local_470->type == 4)) { iVar4 = GetCollectibleNum(pEVar33,local_470->id,0); iVar5 = ((TemporaryEffects *)(local_464))->TemporaryEffects::GetCollectibleEffectNum(local_470->id); - local_46c = (Entity_Player *)((int)(&(local_46c->_sprite)._filename + -3) + iVar4 + iVar5) + local_46c = (Entity_Player *)(GHIDRA_INT((&(local_46c->_sprite)._filename + -3)) + iVar4 + iVar5) ; pIVar20 = local_460; } } - local_460 = (ItemConfig_Item *)((int)pIVar20 + 1); - } while ((int)local_460 < 0x2dd); + local_460 = (ItemConfig_Item *)(GHIDRA_INT(pIVar20) + 1); + } while (GHIDRA_INT(local_460) < 0x2dd); if ((Entity_Player *)&DAT_00000004 < local_46c) { persistentGameData = (PersistentGameData *)((Room *)((Room *)g_manager))->Room::GetTopLeftPos(); ((PersistentGameData *)(persistentGameData))->PersistentGameData::TryUnlock(0x163); @@ -11755,18 +11755,18 @@ LAB_0076f605: puVar14 = (undefined4 *)std::vector::operator_index(); pEVar21 = (Entity_Player *)((Entity_Familiar *)((Entity_Familiar *)*puVar14))->Entity_Familiar::Player(); if (pEVar21 == pEVar33) { - local_470 = (ItemConfig_Item *)((int)&local_470->type + 1); + local_470 = (ItemConfig_Item *)(GHIDRA_INT(&local_470->type) + 1); } uVar25 = uVar25 + 1; uVar24 = ((EntityList *)((EntityList *)fortuneCookieWisps))->EntityList::Size(); } while (uVar25 < uVar24); } - fVar30 = (float)((double)(int)local_470 + __uint_to_double_fixup[-((int)local_470 >> 0x1f)]) * + fVar30 = (float)((double)GHIDRA_INT(local_470) + __uint_to_double_fixup[-(GHIDRA_INT(local_470) >> 0x1f)]) * 0.2 + pEVar33->_luck; - auVar29 = ZEXT416((uint)fVar30); + auVar29 = ZEXT416(GHIDRA_UINT(fVar30)); pEVar33->_luck = fVar30; FUN_007538c0(); - fVar30 = auVar29._0_4_ + pEVar33->_luck; + fVar30 = (*(undefined4 *)((char *)&(auVar29) + 0x0)) + pEVar33->_luck; pEVar33->_luck = fVar30; if (0 < pEVar33->_coopBabyBuffTimers[4]) { pEVar33->_luck = fVar30 + 2.0; @@ -11813,10 +11813,10 @@ LAB_0076f605: } iVar4 = GetCollectibleNum(pEVar33,0x47,0); local_460 = (ItemConfig_Item *) - ((((uint)(0 < pEVar33->_coopBabyBuffTimers[6]) - - (uint)(0 < pEVar33->_coopBabyBuffTimers[5])) + (int)fVar30) - iVar4); + (((GHIDRA_UINT((0 < pEVar33->_coopBabyBuffTimers[6])) - + GHIDRA_UINT((0 < pEVar33->_coopBabyBuffTimers[5]))) + GHIDRA_INT(fVar30)) - iVar4); iVar4 = ((TemporaryEffects *)(local_464))->TemporaryEffects::GetCollectibleEffectNum(0x47); - iVar4 = (int)local_460 - iVar4; + iVar4 = GHIDRA_INT(local_460) - iVar4; iVar5 = GetCollectibleNum(pEVar33,0x1b6,0); iVar6 = ((TemporaryEffects *)(local_464))->TemporaryEffects::GetCollectibleEffectNum(0xc); iVar7 = GetCollectibleNum(pEVar33,0xc,0); @@ -11923,7 +11923,7 @@ LAB_0076fc8b: lustyBloodEffectNum = ((TemporaryEffects *)(&pEVar33->_temporaryeffects))->TemporaryEffects::GetCollectibleEffectNum(0x19b); if ((0 < pEVar33->_bloodLustCounter) || (0 < lustyBloodEffectNum)) { - bloodLustCount = (int)pEVar33->_bloodLustCounter; + bloodLustCount = GHIDRA_INT(pEVar33->_bloodLustCounter); bloodLustCap = 6; std::max(); piVar13 = (int *)std::min(); @@ -11975,7 +11975,7 @@ LAB_0076fc8b: pEVar33->_damage = (float)pIVar20; auVar29 = ZEXT416(local_470); FUN_009bfd20(); - pEVar33->_tearrange = auVar29._0_4_; + pEVar33->_tearrange = (*(undefined4 *)((char *)&(auVar29) + 0x0)); pEVar33->_cacheFlags = pEVar33->_cacheFlags | 0x1b; } bVar2 = HasCollectible(pEVar33,0x232,0); @@ -12074,17 +12074,17 @@ LAB_007703f8: iVar4 = ((Game *)(g_game))->Game::GetNumPlayers(); if (iVar4 != 0) { do { - pEVar21 = ((Game *)(g_game))->Game::GetPlayer((uint)fVar30); + pEVar21 = ((Game *)(g_game))->Game::GetPlayer(GHIDRA_UINT(fVar30)); parentPlayer = (Entity_Player *)((Entity *)((Entity *)pEVar21))->Entity::Parent(); if ((parentPlayer == pEVar33) && (cVar3 = ((Entity *)((Entity *)pEVar21))->Entity::IsDead(), cVar3 == '\0')) { pEVar21->_cacheFlags = pEVar21->_cacheFlags | 0x10; ((Level *)((Level *)&pEVar21->_temporaryeffects))->Level::SetHeartPicked(); } - fVar30 = (float)((int)local_460 + 1); + fVar30 = (float)(GHIDRA_INT(local_460) + 1); local_460 = (ItemConfig_Item *)fVar30; fVar32 = (float)((Game *)(g_game))->Game::GetNumPlayers(); - } while ((uint)fVar30 < (uint)fVar32); + } while (GHIDRA_UINT(fVar30) < GHIDRA_UINT(fVar32)); } } else { @@ -12173,7 +12173,7 @@ byte Entity_Player::HasCollectible(int type, byte ignoreModifiers) RNG local_18; undefined4 local_8; - local_8 = __security_cookie ^ (int)register0x00000010 - 4U; + local_8 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; typeKey = type; collectible = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(type); while( true ) { @@ -12197,14 +12197,14 @@ byte Entity_Player::HasCollectible(int type, byte ignoreModifiers) return 1; } if (type < 0) { - bVar1 = collectible_set_has((void *)((int)this + 0x1fc8),type); + bVar1 = collectible_set_has((void *)(GHIDRA_INT(this) + 0x1fc8),type); return bVar1; } if (ignoreModifiers != 0) goto LAB_00770c3e; if (((type == 0x147) || (type == 0x148)) && (bVar1 = HasTrinket(this,0x15,0), bVar1 != 0)) { local_1c = (NetplayManager *)(g_game->_frameCount & 0x80000003); - if ((int)local_1c < 0) { - local_1c = (NetplayManager *)(((uint)((int)(local_1c + -1) + 3) | 0xfffffffc) + 1); + if (GHIDRA_INT(local_1c) < 0) { + local_1c = (NetplayManager *)((GHIDRA_UINT((GHIDRA_INT((local_1c + -1)) + 3)) | 0xfffffffc) + 1); } iVar3 = GetTrinketMultiplier(this,0x15); if (iVar3 < 2) { @@ -12228,15 +12228,15 @@ LAB_00770856: } if (type == 0x139) { if ((*(int *)((char *)this + 0x13c0) == 10) || - ((bVar1 = ((TemporaryEffects *)((TemporaryEffects *)((int)this + 0x1508)))->TemporaryEffects::HasNullEffect(0x70), + ((bVar1 = ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508)))->TemporaryEffects::HasNullEffect(0x70), bVar1 != 0 && (*(int *)((char *)this + 0x13c0) != 0x1f)))) { local_1c = &g_manager->_netplayManager; local_24 = &g_manager->_persistentGameData; persistentData = local_24; if (*local_1c != *(NetplayManager *)(g_manager + 1)) { userId = FUN_00a23920(); - local_18._shift3 = (int)((ulonglong)userId >> 0x20); - local_18._shift2 = (int)userId; + local_18._shift3 = GHIDRA_INT(((ulonglong)userId >> 0x20)); + local_18._shift2 = GHIDRA_INT(userId); userData = (PersistentGameData *)FUN_0090c300(&local_18._shift2); persistentData = local_24; if (userData != (PersistentGameData *)0x0) { @@ -12335,7 +12335,7 @@ LAB_00770a3e: if (((bVar1 == 0) && ((type != 0x76 || (bVar1 = TemporaryEffects::HasCollectibleEffect - ((TemporaryEffects *)((int)this + 0x1508),0x76), bVar1 == 0)))) && + ((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508),0x76), bVar1 == 0)))) && ((*(char *)((char *)this + 0x170) == '\0' || ((((collectible == (ItemConfig_Item *)0x0 || (bVar1 = ((Item *)(collectible))->Item::HasTags(0x40000000), bVar1 == 0)) || @@ -12354,12 +12354,12 @@ LAB_00770a3e: (((savedCollectible == (ItemConfig_Item *)0x0 || (bVar1 = ((ItemConfig_Item *)(savedCollectible))->ItemConfig_Item::is_mom_item(), bVar1 == 0)) || (bVar1 = TemporaryEffects::HasCollectibleEffect - ((TemporaryEffects *)((int)this + 0x1508),type), bVar1 == 0)))) && + ((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508),type), bVar1 == 0)))) && (iVar3 = GetActiveItemSlot(this,type), iVar3 < 0)))) && (((type == 0xbf || (bVar1 = HasCollectible(this,0xbf,0), bVar1 == 0)) || (type != *(int *)((char *)this + 0x1390))))) && ((bVar1 = TemporaryEffects::HasCollectibleEffect - ((TemporaryEffects *)((int)this + 0x1508),0x1e8), bVar1 == 0 || + ((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508),0x1e8), bVar1 == 0 || (type != *(int *)((char *)this + 5000))))) { LAB_00770c3e: if ((*(int *)((char *)this + 0x2ef4) == 0) || @@ -12391,11 +12391,11 @@ int Entity_Player::GetCollectibleNum(int collectibleID, byte OnlyCountTrueItems) id = collectibleID; if (-1 < collectibleID) { - while (id < (int)(this->_collectibleCounts)._end - (int)(this->_collectibleCounts)._begin >> 2) + while (id < GHIDRA_INT((this->_collectibleCounts)._end) - GHIDRA_INT((this->_collectibleCounts)._begin) >> 2) { if ((this->_variant != 1) || (mainPlayer = GetMainPlayer(this), mainPlayer == (Entity_Player *)0x0)) { - iVar3 = *(int *)((int)(this->_collectibleCounts)._begin + id * 4); + iVar3 = *(int *)(GHIDRA_INT((this->_collectibleCounts)._begin) + id * 4); collectible = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(id); if ((collectible != (ItemConfig_Item *)0x0) && (collectible->type == 3)) { iVar3 = 0; @@ -12504,7 +12504,7 @@ int Entity_Player::GetCollectibleNum(int collectibleID, byte OnlyCountTrueItems) } } switchD_00770e4b_caseD_63: - isMomItem = IsInnateCollectible(this,id,(int)unused); + isMomItem = IsInnateCollectible(this,id,GHIDRA_INT(unused)); if (isMomItem != 0) { count = count + 1; } @@ -12562,14 +12562,14 @@ LAB_00770f59: if (((this->_itemWispsList)._size != 0) && (std::set::find(wispIter,&collectibleID), id = collectibleID, wispIter[0] != (this->_itemWispsList)._head)) { - count = count + *(int *)((int)wispIter[0] + 0x14); + count = count + *(int *)(GHIDRA_INT(wispIter[0]) + 0x14); } if ((this->_modelingClayEffect != 0) && (this->_modelingClayEffect == id)) { count = count + 1; } pvVar1 = (this->_extraCollectibleCounts)._begin; - if (id < (int)(this->_extraCollectibleCounts)._end - (int)pvVar1) { - uVar2 = (uint)*(byte *)((char *)pvVar1 + id); + if (id < GHIDRA_INT((this->_extraCollectibleCounts)._end) - GHIDRA_INT(pvVar1)) { + uVar2 = GHIDRA_UINT(*(byte *)((char *)pvVar1 + id)); } else { uVar2 = 0; @@ -12615,12 +12615,12 @@ byte Entity_Player::VoidHasCollectible(int id) return 0; } } - if ((int)i < 0) { + if (GHIDRA_INT(i) < 0) { return 0; } i = 0; voidedIt = (this->_voidedCollectibles)._begin; - voidedCount = (int)(this->_voidedCollectibles)._end - (int)voidedIt >> 2; + voidedCount = GHIDRA_INT((this->_voidedCollectibles)._end) - GHIDRA_INT(voidedIt) >> 2; if (voidedCount == 0) { return 0; } @@ -12770,7 +12770,7 @@ void Entity_Player::apply_innate_collectibles() collectibleId = 0; unused_00 = this; do { - bVar2 = IsInnateCollectible(this,collectibleId,(int)unused_00); + bVar2 = IsInnateCollectible(this,collectibleId,GHIDRA_INT(unused_00)); pGVar1 = g_game; if (bVar2 == 0) { IsInnateCollectible(this,collectibleId,unused); @@ -12795,28 +12795,28 @@ void Entity_Player::apply_innate_collectibles() ItemPool::RemoveCollectible(&g_game->_itemPool,0x126,0,0); } if (collectibleId < (pGVar1->_itemPool)._removedCollectibles._size) { - removedWord = (uint *)((int)(pGVar1->_itemPool)._removedCollectibles._begin + + removedWord = (uint *)(GHIDRA_INT((pGVar1->_itemPool)._removedCollectibles._begin) + (collectibleId >> 5) * 4); *removedWord = *removedWord | 1 << (collectibleId & 0x1f); } } unused_00 = (g_manager->_itemConfig)._collectibles._begin; - if (((int)collectibleId < - (int)(g_manager->_itemConfig)._collectibles._end - (int)unused_00 >> 2) && + if ((GHIDRA_INT(collectibleId) < + GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(unused_00) >> 2) && (collectibleConfig = *(ItemConfig_Item **) - ((int)(&(unused_00->_sprite)._filename + -3) + collectibleId * 4), + (GHIDRA_INT((&(unused_00->_sprite)._filename + -3)) + collectibleId * 4), collectibleConfig != (ItemConfig_Item *)0x0)) { AddCostume(this,collectibleConfig,0); unused_00 = extraout_ECX; } } collectibleId = collectibleId + 1; - } while ((int)collectibleId < 0x2dd); + } while (GHIDRA_INT(collectibleId) < 0x2dd); if (this->_playerType == 5) { collectiblesBegin = (g_manager->_itemConfig)._collectibles._begin; - if ((int)((int)(g_manager->_itemConfig)._collectibles._end - (int)collectiblesBegin & - 0xfffffffcU) < 0x1e9) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(collectiblesBegin) & + 0xfffffffcU)) < 0x1e9) { RemoveCostume(this,(ItemConfig_Item *)0x0); return; } @@ -12887,7 +12887,7 @@ byte Entity_Player::HasGoldenTrinket(uint TrinketID) slot = slot + 1; trinket = trinket + 1; } while (slot < trinketSlotCount); - if ((*(short *)((int)(this->_smeltedTrinkets)._begin + TrinketID * 4 + 2) < 1) && + if ((*(short *)(GHIDRA_INT((this->_smeltedTrinkets)._begin) + TrinketID * 4 + 2) < 1) && (((*(uint *)&(*(undefined1 *)((char *)(this) + 0x2ef8)) & 0x7fff) != TrinketID || ((*(uint *)&(*(undefined1 *)((char *)(this) + 0x2ef8)) & 0x8000) == 0)))) { return 0; @@ -13033,7 +13033,7 @@ LAB_0077188b: pMStack_20 = g_manager; userIter = g_manager->_netplayManager; if (userIter == *(NetplayManager *)(g_manager + 1)) goto LAB_0077191b; - userCount = (int)*(NetplayManager *)(g_manager + 1) - (int)userIter >> 2; + userCount = GHIDRA_INT(*(NetplayManager *)(g_manager + 1)) - GHIDRA_INT(userIter) >> 2; local_18 = (int *)savedThis->_controllerIndex; uVar6 = 0; if (userCount == 0) goto LAB_0077191b; @@ -13046,7 +13046,7 @@ LAB_0077188b: goto LAB_0077196b; while( true ) { uVar6 = uVar6 + 1; - userIter = (NetplayManager)((int)userIter + 4); + userIter = (NetplayManager)(GHIDRA_INT(userIter) + 4); if (userCount <= uVar6) break; LAB_00771900: if (*(int **)(*(int *)userIter + 0xc) == local_18) { @@ -13064,7 +13064,7 @@ LAB_00771923: pMVar2 = g_manager; pEStack_2c = (Entity_Pickup *)0x38f; seed_fart_sound_override((int *)&pEStack_2c); - ((SoundEffects *)(&pMVar2->_sfxManager))->SoundEffects::Play((int)pEStack_2c,fStack_24,2,0,1.0,0.0); + ((SoundEffects *)(&pMVar2->_sfxManager))->SoundEffects::Play(GHIDRA_INT(pEStack_2c),fStack_24,2,0,1.0,0.0); uVar6 = uVar5; LAB_0077196b: player = savedThis; @@ -13074,9 +13074,9 @@ LAB_0077196b: pMStack_20 = (Manager *)savedThis->_trinketsID[uVar6]; piVar7 = savedThis->_trinketsID + uVar6; local_18 = (int *)0x0; - fStack_24 = (float)((uint)pMStack_20 & 0x7fff); + fStack_24 = (float)(GHIDRA_UINT(pMStack_20) & 0x7fff); if ((fStack_24 == 2.24208e-44) && - (local_18 = (int *)GetTrinketMultiplier(savedThis,0x10), 3 < (int)local_18)) { + (local_18 = (int *)GetTrinketMultiplier(savedThis,0x10), 3 < GHIDRA_INT(local_18))) { local_18 = (int *)0x3; } for (; (pMVar2 = pMStack_20, uVar6 == 0 && (*piVar7 != 0)); piVar7 = piVar7 + 1) { @@ -13089,8 +13089,8 @@ LAB_0077196b: } else { pvVar1 = (g_manager->_itemConfig)._trinkets._begin; - if ((int)fStack_24 < (int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar1 >> 2) { - iVar4 = *(int *)((char *)pvVar1 + (int)fStack_24 * 4); + if (GHIDRA_INT(fStack_24) < GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar1) >> 2) { + iVar4 = *(int *)((char *)pvVar1 + GHIDRA_INT(fStack_24) * 4); } else { iVar4 = 0; @@ -13100,17 +13100,17 @@ LAB_0077196b: uVar6 = Random(); pEStack_2c = (Entity_Pickup *) ((Game *)(g_game))->Game::SpawnEx(5,0x15e,DropPos,&g_vectorZero,(Entity *)player, - (uint)pMVar2,uVar6,0); + GHIDRA_UINT(pMVar2),uVar6,0); if (pEStack_2c != (Entity_Pickup *)0x0) { pEStack_2c->_collisionCooldown = 4; pEStack_2c->_isTouched = 1; } } - TriggerTrinketRemoved(player,(uint)pMVar2); + TriggerTrinketRemoved(player,GHIDRA_UINT(pMVar2)); droppedTrinketType = fStack_24; pvVar1 = (g_manager->_itemConfig)._trinkets._begin; - if (((int)fStack_24 < (int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar1 >> 2) && - (VStack_10.x = *(float *)((char *)pvVar1 + (int)fStack_24 * 4), + if ((GHIDRA_INT(fStack_24) < GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar1) >> 2) && + (VStack_10.x = *(float *)((char *)pvVar1 + GHIDRA_INT(fStack_24) * 4), (ItemConfig_Item *)VStack_10.x != (ItemConfig_Item *)0x0)) { if ((((ItemConfig_Item *)VStack_10.x)->addCostumeOnPickup == 0) && ((player->_temporaryeffects)._disabled == 0)) { @@ -13128,7 +13128,7 @@ LAB_00771b15: if (userIter != *(NetplayManager *)(g_manager + 1)) { VStack_10.x = (float)player->_controllerIndex; uVar6 = 0; - uVar5 = (int)*(NetplayManager *)(g_manager + 1) - (int)userIter >> 2; + uVar5 = GHIDRA_INT(*(NetplayManager *)(g_manager + 1)) - GHIDRA_INT(userIter) >> 2; if (uVar5 != 0) { do { player = savedThis; @@ -13140,21 +13140,21 @@ LAB_00771b15: break; } uVar6 = uVar6 + 1; - userIter = (NetplayManager)((int)userIter + 4); + userIter = (NetplayManager)(GHIDRA_INT(userIter) + 4); } while (uVar6 < uVar5); } } pMVar2 = g_manager; pMStack_20 = (Manager *)0x385; seed_fart_sound_override((int *)&pMStack_20); - ((SoundEffects *)(&pMVar2->_sfxManager))->SoundEffects::Play((int)pMStack_20,sfxVolume,2,0,1.0,0.0); + ((SoundEffects *)(&pMVar2->_sfxManager))->SoundEffects::Play(GHIDRA_INT(pMStack_20),sfxVolume,2,0,1.0,0.0); } else if ((droppedTrinketType == 2.24208e-44) && (pvVar1 = g_game->_room, (*(byte *)(*(int *)((char *)pvVar1 + 4) + 0x44) & 1) == 0)) { - iVar4 = (int)(((pEStack_2c->_pos).x - 40.0) / 40.0 + 0.5); + iVar4 = GHIDRA_INT((((pEStack_2c->_pos).x - 40.0) / 40.0 + 0.5)); if ((iVar4 < 0) || (((gridWidth = *(int *)((char *)pvVar1 + 0xc), gridWidth <= iVar4 || - (gridY = (int)(((pEStack_2c->_pos).y - 120.0) / 40.0 + 0.5), gridY < 0)) || + (gridY = GHIDRA_INT((((pEStack_2c->_pos).y - 120.0) / 40.0 + 0.5)), gridY < 0)) || (*(int *)((char *)pvVar1 + 0x10) <= gridY)))) { gridWidth = *(int *)((char *)pvVar1 + 0xc); iVar4 = -1; @@ -13164,7 +13164,7 @@ LAB_00771b15: } VStack_10.x = (float)(iVar4 % gridWidth) * 40.0 + 40.0; VStack_10.y = (float)(iVar4 / gridWidth) * 40.0 + 120.0; - if (0 < (int)local_18) { + if (0 < GHIDRA_INT(local_18)) { uVar6 = 0; piVar7 = local_18; do { @@ -13175,11 +13175,11 @@ LAB_00771b15: &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Effect:: RTTI_Type_Descriptor,0); - effect[0xcd] = (int)VStack_10.x; - effect[0xce] = (int)VStack_10.y; + effect[0xcd] = GHIDRA_INT(VStack_10.x); + effect[0xce] = GHIDRA_INT(VStack_10.y); (**(code **)(*effect + 0xc))(); uVar6 = uVar6 + 0x1e; - piVar7 = (int *)((int)piVar7 + -1); + piVar7 = (int *)(GHIDRA_INT(piVar7) + -1); } while (piVar7 != (int *)0x0); } } @@ -13216,10 +13216,10 @@ void Entity_Player::AddTrinket(int type, byte firsttime) local_8 = (void *)0xffffffff; puStack_c = &LAB_00aff10d; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(trinketName + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((trinketName + 10)); ExceptionList = &local_10; pvVar2 = (g_manager->_itemConfig)._trinkets._begin; - if (((int)(type & 0x7fffU) < (int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar2 >> 2) && + if ((GHIDRA_INT((type & 0x7fffU)) < GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar2) >> 2) && (trinketConfig = *(ItemConfig_Item **)((char *)pvVar2 + (type & 0x7fffU) * 4), trinketConfig != (ItemConfig_Item *)0x0)) { if (trinketConfig->addCostumeOnPickup != 0) { @@ -13250,9 +13250,9 @@ void Entity_Player::AddTrinket(int type, byte firsttime) uVar3 = trinketNameCapacity + 1; pvVar2 = trinketName[0]; if (0xfff < uVar3) { - pvVar2 = *(void **)((int)trinketName[0] + -4); + pvVar2 = *(void **)(GHIDRA_INT(trinketName[0]) + -4); uVar3 = trinketNameCapacity + 0x24; - if (0x1f < (uint)((int)trinketName[0] + (-4 - (int)pvVar2))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(trinketName[0]) + (-4 - GHIDRA_INT(pvVar2))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -13261,7 +13261,7 @@ void Entity_Player::AddTrinket(int type, byte firsttime) } trinketNameSize = 0; trinketNameCapacity = 0xf; - trinketName[0] = (void *)((uint)trinketName[0] & 0xffffff00); + trinketName[0] = (void *)(GHIDRA_UINT(trinketName[0]) & 0xffffff00); TriggerTrinketAdded(this,type,firsttime); if ((this->_variant == 0) && (this->_isCoopGhost == 0)) { slot = 0; @@ -13309,11 +13309,11 @@ byte Entity_Player::TryRemoveTrinket(uint id) local_8 = (void *)0xffffffff; puStack_c = &LAB_00af32ed; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(trinketName + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((trinketName + 10)); ExceptionList = &local_10; uVar3 = id & 0x7fff; pvVar5 = (g_manager->_itemConfig)._trinkets._begin; - if (((int)uVar3 < (int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar5 >> 2) && + if ((GHIDRA_INT(uVar3) < GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar5) >> 2) && (trinketConfig = *(ItemConfig_Item **)((char *)pvVar5 + uVar3 * 4), trinketConfig != (ItemConfig_Item *)0x0)) { if ((this->_variant == 0) && (this->_isCoopGhost == 0)) { @@ -13336,8 +13336,8 @@ byte Entity_Player::TryRemoveTrinket(uint id) piVar6 = this->_trinketsID; do { if ((*piVar6 == id) || ((*piVar6 & 0x7fffU) == id)) { - if (uVar4 < (int)piVar7 - 1U) { - iVar2 = ((int)piVar7 - 1U) - uVar4; + if (uVar4 < GHIDRA_INT(piVar7) - 1U) { + iVar2 = (GHIDRA_INT(piVar7) - 1U) - uVar4; piVar7 = this->_trinketsID + uVar4 + 1; piVar6 = this->_trinketsID + uVar4; for (; iVar2 != 0; iVar2 = iVar2 + -1) { @@ -13347,7 +13347,7 @@ byte Entity_Player::TryRemoveTrinket(uint id) } piVar7 = local_30; } - this->_trinketsID[(int)piVar7 - 1] = 0; + this->_trinketsID[GHIDRA_INT(piVar7) - 1] = 0; ((ItemConfig_Item *)(trinketConfig))->ItemConfig_Item::GetLocalizedName((std_string *)trinketName,0); local_8 = (void *)0x0; KAGE_LogMessage(1,(byte *)"Removing trinket %d (%s) from player %d (%s)\n"); @@ -13356,9 +13356,9 @@ byte Entity_Player::TryRemoveTrinket(uint id) uVar4 = trinketNameCapacity + 1; pvVar5 = trinketName[0]; if (0xfff < uVar4) { - pvVar5 = *(void **)((int)trinketName[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(trinketName[0]) + -4); uVar4 = trinketNameCapacity + 0x24; - if (0x1f < (uint)((int)trinketName[0] + (-4 - (int)pvVar5))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(trinketName[0]) + (-4 - GHIDRA_INT(pvVar5))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -13367,7 +13367,7 @@ byte Entity_Player::TryRemoveTrinket(uint id) } TriggerTrinketRemoved(this,id); pvVar5 = (g_manager->_itemConfig)._trinkets._begin; - if (((int)uVar3 < (int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar5 >> 2) && + if ((GHIDRA_INT(uVar3) < GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar5) >> 2) && (trinketConfig = *(ItemConfig_Item **)((char *)pvVar5 + uVar3 * 4), trinketConfig != (ItemConfig_Item *)0x0)) { if ((trinketConfig->addCostumeOnPickup == 0) && ((this->_temporaryeffects)._disabled == 0) @@ -13399,11 +13399,11 @@ byte Entity_Player::TryRemoveTrinket(uint id) do { uVar3 = ~local_30[4]; if ((local_30[4] < 0) && - ((int)uVar3 < - (int)(g_game->_proceduralItemManager)._proceduralItems._end - - (int)(g_game->_proceduralItemManager)._proceduralItems._begin >> 2)) { + (GHIDRA_INT(uVar3) < + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._begin) >> 2)) { piVar7 = (this->_proceduralItems)._itemIds._head; - iVar2 = *(int *)((int)(g_game->_proceduralItemManager)._proceduralItems._begin + uVar3 * 4 + iVar2 = *(int *)(GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._begin) + uVar3 * 4 ); if ((iVar2 != 0) && (((piVar6 = *(int **)(iVar2 + 0x10), piVar6 != (int *)0x0 && (*piVar6 == 2)) && @@ -13456,14 +13456,14 @@ byte Entity_Player::TryRemoveSmeltedTrinket(uint id) local_8 = 0xffffffff; puStack_c = &LAB_00aff155; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(acStack_28 + 0x24); + local_18 = __security_cookie ^ GHIDRA_UINT((acStack_28 + 0x24)); ExceptionList = &local_10; if ((this->_variant == 0) && (this->_isCoopGhost == 0)) { InvalidateCoPlayerItems(this); } trinketID = id & 0x7fff; pvVar1 = (g_manager->_itemConfig)._trinkets._begin; - if (((int)trinketID < (int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar1 >> 2) && + if ((GHIDRA_INT(trinketID) < GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar1) >> 2) && (trinketConfig = *(ItemConfig_Item **)((char *)pvVar1 + trinketID * 4), trinketConfig != (ItemConfig_Item *)0x0)) { smeltedTrinkets = &this->_smeltedTrinkets; @@ -13478,17 +13478,17 @@ byte Entity_Player::TryRemoveSmeltedTrinket(uint id) if (0xfff < uVar2) { pvVar1 = *(void **)((char *)local_30 + -4); uVar2 = uStack_1c + 0x24; - if (0x1f < (uint)((int)local_30 + (-4 - (int)pvVar1))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_30) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar1,uVar2); } - smeltedCount = (short *)(trinketID * 4 + (int)smeltedTrinkets->_begin); + smeltedCount = (short *)(trinketID * 4 + GHIDRA_INT(smeltedTrinkets->_begin)); *smeltedCount = *smeltedCount + -1; TriggerTrinketRemoved(this,trinketID); - local_30 = (void *)CONCAT31(local_30._1_3_,'\x01'); + local_30 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_30) + 0x1)),'\x01'); historyEntry = g_game->_frameCount; acStack_28[0] = '\x01'; acStack_28[1] = '\0'; @@ -13518,17 +13518,17 @@ byte Entity_Player::TryRemoveSmeltedTrinket(uint id) if (0xfff < uVar2) { pvVar1 = *(void **)((char *)local_30 + -4); uVar2 = uStack_1c + 0x24; - if (0x1f < (uint)((int)local_30 + (-4 - (int)pvVar1))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_30) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar1,uVar2); } - smeltedCount = (short *)((int)smeltedTrinkets->_begin + trinketID * 4 + 2); + smeltedCount = (short *)(GHIDRA_INT(smeltedTrinkets->_begin) + trinketID * 4 + 2); *smeltedCount = *smeltedCount + -1; TriggerTrinketRemoved(this,trinketID | 0x8000); - local_30 = (void *)CONCAT31(local_30._1_3_,'\x01'); + local_30 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_30) + 0x1)),'\x01'); historyEntry = g_game->_frameCount; acStack_28[0] = '\x01'; acStack_28[1] = '\0'; @@ -13593,13 +13593,13 @@ byte Entity_Player::replace_trinket(int unused0, int unused1, int unused2) local_8 = (void *)0xffffffff; puStack_c = &LAB_00aff1a5; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(smeltedNewName + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((smeltedNewName + 10)); ExceptionList = &local_10; if ((this->_variant == 0) && (this->_isCoopGhost == 0)) { InvalidateCoPlayerItems(this); } pvVar4 = (g_manager->_itemConfig)._trinkets._begin; - if ((int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar4 >> 2 < 0xe) { + if (GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar4) >> 2 < 0xe) { storeCredit = (ItemConfig_Item *)0x0; } else { @@ -13621,31 +13621,31 @@ byte Entity_Player::replace_trinket(int unused0, int unused1, int unused2) ((ItemConfig_Item *)(storeCredit))->ItemConfig_Item::GetLocalizedName((std_string *)oldName,0); local_8 = (void *)0x0; ((ItemConfig_Item *)(storeCredit))->ItemConfig_Item::GetLocalizedName((std_string *)newName,0); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; KAGE_LogMessage(1,(byte *) "Replacing trinket %d (%s) from player %d (%s) with trinket %d (%s)\n"); - local_8 = (void *)((uint)local_8._1_3_ << 8); + local_8 = (void *)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8); if (0xf < newNameCapacity) { index = newNameCapacity + 1; pvVar4 = newName[0]; if (0xfff < index) { - pvVar4 = *(void **)((int)newName[0] + -4); + pvVar4 = *(void **)(GHIDRA_INT(newName[0]) + -4); index = newNameCapacity + 0x24; - if (0x1f < (uint)((int)newName[0] + (-4 - (int)pvVar4))) goto LAB_00772920; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(newName[0]) + (-4 - GHIDRA_INT(pvVar4))))) goto LAB_00772920; } operator_delete(pvVar4,index); } local_8 = (void *)0xffffffff; newNameSize = 0; newNameCapacity = 0xf; - newName[0] = (void *)((uint)newName[0] & 0xffffff00); + newName[0] = (void *)(GHIDRA_UINT(newName[0]) & 0xffffff00); if (0xf < oldNameCapacity) { index = oldNameCapacity + 1; pvVar4 = oldName[0]; if (0xfff < index) { - pvVar4 = *(void **)((int)oldName[0] + -4); + pvVar4 = *(void **)(GHIDRA_INT(oldName[0]) + -4); index = oldNameCapacity + 0x24; - if (0x1f < (uint)((int)oldName[0] + (-4 - (int)pvVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(oldName[0]) + (-4 - GHIDRA_INT(pvVar4))))) { LAB_00772920: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -13655,7 +13655,7 @@ LAB_00772920: } TriggerTrinketRemoved(this,0x800d); pvVar4 = (g_manager->_itemConfig)._trinkets._begin; - if (((0x34 < (int)((int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar4 & 0xfffffffcU) + if (((0x34 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar4) & 0xfffffffcU)) ) && (pIVar1 = *(ItemConfig_Item **)((char *)pvVar4 + 0x34), pIVar1 != (ItemConfig_Item *)0x0)) && ((pIVar1->addCostumeOnPickup != 0 || @@ -13675,14 +13675,14 @@ LAB_00772920: if ((this->_variant == 0) && (this->_isCoopGhost == 0)) { pvVar4 = (this->_history)._historyItems._begin; index = 0; - index = ((int)(this->_history)._historyItems._end - (int)pvVar4) / 0x1c; + index = (GHIDRA_INT((this->_history)._historyItems._end) - GHIDRA_INT(pvVar4)) / 0x1c; if (index != 0) { - piVar3 = (int *)((int)pvVar4 + 8); + piVar3 = (int *)(GHIDRA_INT(pvVar4) + 8); do { if (((char)piVar3[-1] != '\0') && (*piVar3 == 0x800d)) { smeltedGoldenCount = - (short *)((int)(this->_smeltedTrinkets)._begin + storeCredit->id * 4 + 2); - smeltedCount = (short *)((int)(this->_smeltedTrinkets)._begin + storeCredit->id * 4); + (short *)(GHIDRA_INT((this->_smeltedTrinkets)._begin) + storeCredit->id * 4 + 2); + smeltedCount = (short *)(GHIDRA_INT((this->_smeltedTrinkets)._begin) + storeCredit->id * 4); *(undefined4 *)((char *)pvVar4 + index * 0x1c + 8) = 0xd; goldenCount = *smeltedGoldenCount; if (0 < goldenCount) { @@ -13702,32 +13702,32 @@ LAB_00772920: ((ItemConfig_Item *)(storeCredit))->ItemConfig_Item::GetLocalizedName((std_string *)smeltedOldName,0); local_8 = (void *)0x2; ((ItemConfig_Item *)(storeCredit))->ItemConfig_Item::GetLocalizedName((std_string *)smeltedNewName,0); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; KAGE_LogMessage(1,(byte *) "Replacing smelted trinket %d (%s) from player %d (%s) with trinket %d (%s)\n" ); - local_8 = (void *)CONCAT31(local_8._1_3_,2); + local_8 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); if (0xf < smeltedNewNameCapacity) { index = smeltedNewNameCapacity + 1; pvVar4 = smeltedNewName[0]; if (0xfff < index) { - pvVar4 = *(void **)((int)smeltedNewName[0] + -4); + pvVar4 = *(void **)(GHIDRA_INT(smeltedNewName[0]) + -4); index = smeltedNewNameCapacity + 0x24; - if (0x1f < (uint)((int)smeltedNewName[0] + (-4 - (int)pvVar4))) goto LAB_007727f2; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(smeltedNewName[0]) + (-4 - GHIDRA_INT(pvVar4))))) goto LAB_007727f2; } operator_delete(pvVar4,index); } local_8 = (void *)0xffffffff; smeltedNewNameSize = 0; smeltedNewNameCapacity = 0xf; - smeltedNewName[0] = (void *)((uint)smeltedNewName[0] & 0xffffff00); + smeltedNewName[0] = (void *)(GHIDRA_UINT(smeltedNewName[0]) & 0xffffff00); if (0xf < smeltedOldNameCapacity) { index = smeltedOldNameCapacity + 1; pvVar4 = smeltedOldName[0]; if (0xfff < index) { - pvVar4 = *(void **)((int)smeltedOldName[0] + -4); + pvVar4 = *(void **)(GHIDRA_INT(smeltedOldName[0]) + -4); index = smeltedOldNameCapacity + 0x24; - if (0x1f < (uint)((int)smeltedOldName[0] + (-4 - (int)pvVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(smeltedOldName[0]) + (-4 - GHIDRA_INT(pvVar4))))) { LAB_007727f2: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -13737,7 +13737,7 @@ LAB_007727f2: } smeltedOldNameSize = 0; smeltedOldNameCapacity = 0xf; - smeltedOldName[0] = (void *)((uint)smeltedOldName[0] & 0xffffff00); + smeltedOldName[0] = (void *)(GHIDRA_UINT(smeltedOldName[0]) & 0xffffff00); HUD::mark_all_slots_dirty(&g_game->_hud,0,0); goto LAB_007729a1; } @@ -13869,9 +13869,9 @@ Vector * Entity_Player::GetMovementJoystick(Vector *outJoystick) || (((playerType == 0x1d || (playerType == 0x26)) && ((((twin = this->_twinPlayer, twin != (EntityPtr)0x0 && (unused = *(EntityPtr *)((char *)twin + 0x161c), unused != (EntityPtr)0xffffffff)) && - ((int)unused < this->_playerIndex)) && (twin != (EntityPtr)this)))))) && + (GHIDRA_INT(unused) < this->_playerIndex)) && (twin != (EntityPtr)this)))))) && ((this->_isControlsEnabled != 0 && (this->_controlsCooldown < 1)))) { - bVar1 = input_is_action_pressed(0xb,this->_controllerIndex,(Entity *)0x0,(int)unused); + bVar1 = input_is_action_pressed(0xb,this->_controllerIndex,(Entity *)0x0,GHIDRA_INT(unused)); fVar2 = g_vectorZero.y; unused = extraout_ECX; if (bVar1 != 0) { @@ -13880,7 +13880,7 @@ Vector * Entity_Player::GetMovementJoystick(Vector *outJoystick) return outJoystick; } } - fVar2 = InputManager::GetActionValue(0,this->_controllerIndex,(Entity *)this,(int)unused); + fVar2 = InputManager::GetActionValue(0,this->_controllerIndex,(Entity *)this,GHIDRA_INT(unused)); cardinalY = 0.0; rightValue = InputManager::GetActionValue(1,this->_controllerIndex,(Entity *)this,unused_00); joystickX = rightValue + (0.0 - fVar2); @@ -14117,7 +14117,7 @@ int Entity_Player::GetWeaponModifiers() uint modifiers; isHasItem = HasCollectible(this,0x45,0); - modifiers = (uint)(isHasItem != 0); + modifiers = GHIDRA_UINT((isHasItem != 0)); isHasItem = HasCollectible(this,0x13c,0); if (isHasItem != 0) { modifiers = modifiers | 2; @@ -14210,7 +14210,7 @@ void Entity_Player::update_body_animations() local_8 = 0xffffffff; puStack_c = &LAB_00aff2ed; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(moveActions + 8); + local_14 = __security_cookie ^ GHIDRA_UINT((moveActions + 8)); if (this->_heightVelocity <= 0.0 && this->_heightVelocity != 0.0) { return; } @@ -14230,14 +14230,14 @@ void Entity_Player::update_body_animations() (this->_lastVelocity).x = (this->_velocity).x; (this->_lastVelocity).y = (this->_velocity).y; moveX = g_vectorZero.x; - local_50._36_4_ = g_vectorZero.x; + (*(undefined4 *)((char *)&(local_50) + 0x24)) = g_vectorZero.x; local_54 = g_vectorZero.y; local_28 = g_vectorZero.y; if ((this->_isControlsEnabled != 0) && (this->_controlsCooldown < 1)) { vecResult = GetMovementJoystick(this,&VStack_1c); moveX = vecResult->x; local_54 = vecResult->y; - local_50._36_4_ = moveX; + (*(undefined4 *)((char *)&(local_50) + 0x24)) = moveX; local_28 = local_54; bVar1 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x8000); if ((bVar1 != 0) && (this->_canFly == 0)) { @@ -14248,14 +14248,14 @@ void Entity_Player::update_body_animations() if (1.0 < fVar8) { ((Vector *)((Vector *)(local_50 + 0x24)))->Vector::Normalize(); local_54 = local_28; - moveX = (float)local_50._36_4_; + moveX = (*(undefined4 *)((char *)&((float)local_50) + 0x24)); } } iVar2 = this->_playerType; if ((((iVar2 == 0x23) && (this->_isCoopGhost == 0)) || (this->_suplexState != 0)) || (this->_darkArtsBlastPending != 0)) { moveX = g_vectorZero.x; - local_50._36_4_ = g_vectorZero.x; + (*(undefined4 *)((char *)&(local_50) + 0x24)) = g_vectorZero.x; local_54 = g_vectorZero.y; local_28 = g_vectorZero.y; } @@ -14373,12 +14373,12 @@ void Entity_Player::update_body_animations() } else { fVar9 = *(float *)&this->_flags; - uVar7 = *(uint *)((int)&this->_flags + 4); - if (((uint)fVar9 & 0x80) != 0) { + uVar7 = *(uint *)(GHIDRA_INT(&this->_flags) + 4); + if ((GHIDRA_UINT(fVar9) & 0x80) != 0) { local_54 = 0.0; } - if (((fVar8 != 0.0) || (local_50._36_4_ = fVar9, fVar10 != 0.0)) && - ((((uint)fVar9 & 0x8000) == 0 || (local_50._36_4_ = fVar9, this->_canFly != 0)))) { + if (((fVar8 != 0.0) || ((*(undefined4 *)((char *)&(local_50) + 0x24)) = fVar9, fVar10 != 0.0)) && + (((GHIDRA_UINT(fVar9) & 0x8000) == 0 || ((*(undefined4 *)((char *)&(local_50) + 0x24)) = fVar9, this->_canFly != 0)))) { local_64 = (this->_velocity).x; local_70.y = (float)local_58 * fVar10 + local_64 * fVar8; local_60 = fVar8 * local_70.y; @@ -14386,8 +14386,8 @@ void Entity_Player::update_body_animations() fVar8 = sqrtf(local_54 * 0.19999999 + 0.8); (this->_velocity).x = (local_64 - local_60) * fVar8 + local_60; (this->_velocity).y = ((float)local_58 - local_70.y) * fVar8 + local_70.y; - local_50._36_4_ = *(undefined4 *)&this->_flags; - uVar7 = *(uint *)((int)&this->_flags + 4); + (*(undefined4 *)((char *)&(local_50) + 0x24)) = *(undefined4 *)&this->_flags; + uVar7 = *(uint *)(GHIDRA_INT(&this->_flags) + 4); fVar8 = moveX; } local_58 = (byte *)(this->_velocity).y; @@ -14465,30 +14465,30 @@ void Entity_Player::update_body_animations() case 0: case 1: bVar1 = 0x4c; - local_50._36_4_ = 1.12104e-44; - local_50._20_4_ = 1.6631262e+22; - local_50._24_4_ = 7.301531e+31; - local_50._28_4_ = local_50._28_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(local_50) + 0x24)) = 1.12104e-44; + (*(undefined4 *)((char *)&(local_50) + 0x14)) = 1.6631262e+22; + (*(undefined4 *)((char *)&(local_50) + 0x18)) = 7.301531e+31; + (*(undefined4 *)((char *)&(local_50) + 0x1c)) = (*(undefined4 *)((char *)&(local_50) + 0x1c)) & 0xffffff00; local_8 = 1; break; default: - local_50._36_4_ = 1.26117e-44; - local_50._20_4_ = 1.6631262e+22; - local_50._24_4_ = 4.371238e+24; - local_50._28_2_ = 0x74; + (*(undefined4 *)((char *)&(local_50) + 0x24)) = 1.26117e-44; + (*(undefined4 *)((char *)&(local_50) + 0x14)) = 1.6631262e+22; + (*(undefined4 *)((char *)&(local_50) + 0x18)) = 4.371238e+24; + (*(undefined2 *)((char *)&(local_50) + 0x1c)) = 0x74; local_8 = 0; bVar1 = extraout_CL; } local_28 = 2.10195e-44; PlayCollectibleAnim(this,0x5d,0,local_50 + 0x14,-1,bVar1); local_8 = 0xffffffff; - if (0xf < (uint)local_28) { - uVar7 = (int)local_28 + 1; - pvVar5 = (void *)local_50._20_4_; + if (0xf < GHIDRA_UINT(local_28)) { + uVar7 = GHIDRA_INT(local_28) + 1; + pvVar5 = (*(undefined4 *)((char *)&((void *)local_50) + 0x14)); if (0xfff < uVar7) { - pvVar5 = *(void **)(local_50._20_4_ + -4); - uVar7 = (int)local_28 + 0x24; - if (0x1f < (uint)(local_50._20_4_ + (-4 - (int)pvVar5))) goto LAB_0077a500; + pvVar5 = *(void **)((*(undefined4 *)((char *)&(local_50) + 0x14)) + -4); + uVar7 = GHIDRA_INT(local_28) + 0x24; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_50) + 0x14)) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_0077a500; } operator_delete(pvVar5,uVar7); } @@ -14525,12 +14525,12 @@ void Entity_Player::update_body_animations() local_8 = 5; PlayCollectibleAnim(this,0x3a,1,local_50 + 0x14,-1,isUnused_02); local_8 = 0xffffffff; - if (0xf < (uint)local_28) { - uVar7 = (int)local_28 + 1; - pvVar5 = (void *)local_50._20_4_; + if (0xf < GHIDRA_UINT(local_28)) { + uVar7 = GHIDRA_INT(local_28) + 1; + pvVar5 = (*(undefined4 *)((char *)&((void *)local_50) + 0x14)); if (0xfff < uVar7) { - pvVar5 = *(void **)(local_50._20_4_ + -4); - uVar4 = local_50._20_4_ + (-4 - (int)pvVar5); + pvVar5 = *(void **)((*(undefined4 *)((char *)&(local_50) + 0x14)) + -4); + uVar4 = (*(undefined4 *)((char *)&(local_50) + 0x14)) + (-4 - GHIDRA_INT(pvVar5)); goto joined_r0x0077a7e1; } goto LAB_0077a7e7; @@ -14555,12 +14555,12 @@ void Entity_Player::update_body_animations() local_8 = 4; PlayCollectibleAnim(this,299,0,local_50 + 0x14,0,isUnused_01); local_8 = 0xffffffff; - if (0xf < (uint)local_28) { - uVar7 = (int)local_28 + 1; - pvVar5 = (void *)local_50._20_4_; + if (0xf < GHIDRA_UINT(local_28)) { + uVar7 = GHIDRA_INT(local_28) + 1; + pvVar5 = (*(undefined4 *)((char *)&((void *)local_50) + 0x14)); if (0xfff < uVar7) { - pvVar5 = *(void **)(local_50._20_4_ + -4); - uVar4 = local_50._20_4_ + (-4 - (int)pvVar5); + pvVar5 = *(void **)((*(undefined4 *)((char *)&(local_50) + 0x14)) + -4); + uVar4 = (*(undefined4 *)((char *)&(local_50) + 0x14)) + (-4 - GHIDRA_INT(pvVar5)); goto joined_r0x0077a7e1; } goto LAB_0077a7e7; @@ -14585,12 +14585,12 @@ void Entity_Player::update_body_animations() local_8 = 3; PlayCollectibleAnim(this,0x12a,0,local_50 + 0x14,-1,isUnused_00); local_8 = 0xffffffff; - if (0xf < (uint)local_28) { - uVar7 = (int)local_28 + 1; - pvVar5 = (void *)local_50._20_4_; + if (0xf < GHIDRA_UINT(local_28)) { + uVar7 = GHIDRA_INT(local_28) + 1; + pvVar5 = (*(undefined4 *)((char *)&((void *)local_50) + 0x14)); if (0xfff < uVar7) { - pvVar5 = *(void **)(local_50._20_4_ + -4); - uVar4 = local_50._20_4_ + (-4 - (int)pvVar5); + pvVar5 = *(void **)((*(undefined4 *)((char *)&(local_50) + 0x14)) + -4); + uVar4 = (*(undefined4 *)((char *)&(local_50) + 0x14)) + (-4 - GHIDRA_INT(pvVar5)); goto joined_r0x0077a7e1; } goto LAB_0077a7e7; @@ -14615,14 +14615,14 @@ void Entity_Player::update_body_animations() local_8 = 2; PlayCollectibleAnim(this,0x4d,0,local_50 + 0x14,-1,isUnused); local_8 = 0xffffffff; - if (0xf < (uint)local_28) { - uVar7 = (int)local_28 + 1; - pvVar5 = (void *)local_50._20_4_; + if (0xf < GHIDRA_UINT(local_28)) { + uVar7 = GHIDRA_INT(local_28) + 1; + pvVar5 = (*(undefined4 *)((char *)&((void *)local_50) + 0x14)); if (0xfff < uVar7) { - pvVar5 = *(void **)(local_50._20_4_ + -4); - uVar4 = local_50._20_4_ + (-4 - (int)pvVar5); + pvVar5 = *(void **)((*(undefined4 *)((char *)&(local_50) + 0x14)) + -4); + uVar4 = (*(undefined4 *)((char *)&(local_50) + 0x14)) + (-4 - GHIDRA_INT(pvVar5)); joined_r0x0077a7e1: - uVar7 = (int)local_28 + 0x24; + uVar7 = GHIDRA_INT(local_28) + 0x24; if (0x1f < uVar4) goto LAB_0077a500; } LAB_0077a7e7: @@ -14633,19 +14633,19 @@ LAB_0077a7e7: bVar1 = ((TemporaryEffects *)(tempEffects))->TemporaryEffects::HasCollectibleEffect(0x139); if (bVar1 != 0) { local_28 = 2.10195e-44; - local_50._36_4_ = 9.80909e-45; - local_50._20_4_ = 4.514758e+27; - local_50._24_4_ = 1.0505631e-38; + (*(undefined4 *)((char *)&(local_50) + 0x24)) = 9.80909e-45; + (*(undefined4 *)((char *)&(local_50) + 0x14)) = 4.514758e+27; + (*(undefined4 *)((char *)&(local_50) + 0x18)) = 1.0505631e-38; local_8 = 6; PlayCollectibleAnim(this,0x139,1,local_50 + 0x14,-1,isUnused_03); local_8 = 0xffffffff; - if (0xf < (uint)local_28) { - uVar7 = (int)local_28 + 1; - pvVar5 = (void *)local_50._20_4_; + if (0xf < GHIDRA_UINT(local_28)) { + uVar7 = GHIDRA_INT(local_28) + 1; + pvVar5 = (*(undefined4 *)((char *)&((void *)local_50) + 0x14)); if (0xfff < uVar7) { - pvVar5 = *(void **)(local_50._20_4_ + -4); - uVar7 = (int)local_28 + 0x24; - if (0x1f < (uint)(local_50._20_4_ + (-4 - (int)pvVar5))) { + pvVar5 = *(void **)((*(undefined4 *)((char *)&(local_50) + 0x14)) + -4); + uVar7 = GHIDRA_INT(local_28) + 0x24; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_50) + 0x14)) + (-4 - GHIDRA_INT(pvVar5))))) { LAB_0077a500: local_8 = 0xffffffff; /* WARNING: Subroutine does not return */ @@ -14700,25 +14700,25 @@ LAB_0077a500: ; } local_68 = -vecResult->x; - local_58 = (byte *)((uint)vecResult->y ^ 0x80000000); + local_58 = (byte *)(GHIDRA_UINT(vecResult->y) ^ 0x80000000); uVar7 = Random(); uVar4 = Random(); - local_28 = ((float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + local_28 = ((float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 40.0 - 20.0) * 0.017453292; VStack_1c.y = cos(local_28); local_28 = sin(local_28); uVar4 = Random(); - fVar8 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + fVar8 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 20.0 + 6.0; local_70.x = local_68 * 4.0 + (this->_pos).x; - local_50._36_4_ = (VStack_1c.y * local_68 - local_28 * (float)local_58) * fVar8; + (*(undefined4 *)((char *)&(local_50) + 0x24)) = (VStack_1c.y * local_68 - local_28 * (float)local_58) * fVar8; local_28 = (local_28 * local_68 + VStack_1c.y * (float)local_58) * fVar8; local_70.y = (float)local_58 * 4.0 + (this->_pos).y; spawnedEffect = ((Game *)(g_game))->Game::Spawn(1000,99,&local_70,(Vector *)(local_50 + 0x24),(Entity *)0x0,1, uVar7); uVar7 = Random(); - fVar9 = (float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + fVar9 = (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 * 1.5 + 1.0; fVar8 = (spawnedEffect->_sprite)._scale.x; (spawnedEffect->_sprite)._scale.y = fVar9 * (spawnedEffect->_sprite)._scale.y; @@ -14727,18 +14727,18 @@ LAB_0077a500: ((Sprite *)((Sprite *)&spawnedEffect->_sprite))->Sprite::SetColor(color); spawnedEffect->Update(); uVar7 = Random(); - local_28 = ((float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + local_28 = ((float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 * 40.0 - 20.0) * 0.017453292; VStack_1c.y = cos(local_28); local_28 = sin(local_28); uVar7 = Random(); - fVar8 = (float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + fVar8 = (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 * 10.0 + 10.0; - local_50._36_4_ = (VStack_1c.y * local_68 - local_28 * (float)local_58) * fVar8; + (*(undefined4 *)((char *)&(local_50) + 0x24)) = (VStack_1c.y * local_68 - local_28 * (float)local_58) * fVar8; local_28 = (local_28 * local_68 + VStack_1c.y * (float)local_58) * fVar8; uVar7 = Random(); uVar4 = Random(); - fVar8 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + fVar8 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 3.0 + 2.0; VStack_1c.y = fVar8 * (float)local_58 + (this->_pos).y; VStack_1c.x = fVar8 * local_68 + (this->_pos).x; @@ -14754,7 +14754,7 @@ LAB_0077a500: local_60 = 1.0; } uVar7 = Random(); - fVar9 = ((float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + fVar9 = ((float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 * 0.4 + 0.6) * local_60; fVar8 = fVar9 * g_vectorOne.x; (spawnedEffect->_sprite)._scale.y = fVar9 * g_vectorOne.y; @@ -14784,13 +14784,13 @@ LAB_0077ae15: if ((((this->_marsLastTapDirection == iVar2) && (this->_marsTapFrames < 0xb)) && (bVar1 = HasCollectible(this,0x251,0), bVar1 != 0)) && (this->_marsCooldown < 1)) { pvVar5 = (g_manager->_itemConfig)._collectibles._begin; - if ((0x944 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar5 & - 0xfffffffcU)) && (fVar8 = *(float *)((char *)pvVar5 + 0x944), fVar8 != 0.0) + if ((0x944 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar5) & + 0xfffffffcU))) && (fVar8 = *(float *)((char *)pvVar5 + 0x944), fVar8 != 0.0) ) { - local_50._36_4_ = *(float *)((char *)fVar8 + 0x78); - local_50._32_4_ = 0.0; + (*(undefined4 *)((char *)&(local_50) + 0x24)) = *(float *)((char *)fVar8 + 0x78); + (*(undefined4 *)((char *)&(local_50) + 0x20)) = 0.0; local_28 = 0.0; - local_50._28_4_ = fVar8; + (*(undefined4 *)((char *)&(local_50) + 0x1c)) = fVar8; ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddEffect(local_50 + 0x1c,0,1); } this->_marsUnk2 = this->_marsLastTapDirection; @@ -14816,7 +14816,7 @@ LAB_0077ae15: (bVar1 = input_is_action_triggered(g_manager,0xb,this->_controllerIndex,(Entity *)this,0), bVar1 != 0)) { uVar7 = this->_ductTapeMode + 1U & 0x80000003; - if ((int)uVar7 < 0) { + if (GHIDRA_INT(uVar7) < 0) { uVar7 = (uVar7 - 1 | 0xfffffffc) + 1; } this->_ductTapeMode = uVar7; @@ -14968,7 +14968,7 @@ void Entity_Player::update_shooting() local_8 = 0xffffffff; puStack_c = &LAB_00aff3d7; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(auStack_24 + 0x20); + local_14 = __security_cookie ^ GHIDRA_UINT((auStack_24 + 0x20)); ExceptionList = &local_10; local_29c.y = 0.0; cleanupFlags = (EntityPtr)0x0; @@ -15006,17 +15006,17 @@ void Entity_Player::update_shooting() if (bVar4 != 0) { isShooting = 1; } - local_284._1_3_ = 0; - local_284._0_1_ = isShooting; + (*(undefined1 *)((char *)&(local_284) + 0x1)) = 0; + (*(undefined1 *)((char *)&(local_284) + 0x0)) = isShooting; bVar4 = input_is_action_pressed(5,this->_controllerIndex,(Entity *)this,0); if (bVar4 != 0) { local_285 = '\x01'; - local_284._0_1_ = 1; + (*(undefined1 *)((char *)&(local_284) + 0x0)) = 1; } bVar4 = input_is_action_pressed(6,this->_controllerIndex,(Entity *)this,0); if (bVar4 != 0) { local_286 = '\x01'; - local_284._0_1_ = 1; + (*(undefined1 *)((char *)&(local_284) + 0x0)) = 1; } iVar19 = this->_controllerIndex; iVar18 = 7; @@ -15027,28 +15027,28 @@ void Entity_Player::update_shooting() if (bVar4 != 0) { isShooting = 1; } - local_284._1_3_ = SUB43(CONCAT22(extraout_var,uVar6) >> 8,0); - local_284._0_1_ = isShooting; + (*(undefined1 *)((char *)&(local_284) + 0x1)) = SUB43(CONCAT22(extraout_var,uVar6) >> 8,0); + (*(undefined1 *)((char *)&(local_284) + 0x0)) = isShooting; bVar4 = input_is_action_pressed(1,this->_controllerIndex,(Entity *)this,0); if (bVar4 != 0) { local_285 = '\x01'; - local_284._0_1_ = 1; + (*(undefined1 *)((char *)&(local_284) + 0x0)) = 1; } bVar4 = input_is_action_pressed(2,this->_controllerIndex,(Entity *)this,0); if (bVar4 != 0) { local_286 = '\x01'; - local_284._0_1_ = 1; + (*(undefined1 *)((char *)&(local_284) + 0x0)) = 1; } iVar19 = this->_controllerIndex; iVar18 = 3; } bVar4 = input_is_action_pressed(iVar18,iVar19,(Entity *)this,0); - if (((bVar4 != 0) && (local_284._0_1_ = 1, local_286 != '\0')) || + if (((bVar4 != 0) && ((*(undefined1 *)((char *)&(local_284) + 0x0)) = 1, local_286 != '\0')) || ((isShooting != 0 && (local_285 != '\0')))) { isOpposingDirections = 1; } bVar4 = GetMouseAimTarget(this,&shootDirection,0); - if ((bVar4 == 0) && (local_284._0_1_ == 0)) { + if ((bVar4 == 0) && ((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0)) { isShooting = 0; LAB_0077b373: pVVar7 = GetShootingJoystick(this,&local_29c); @@ -15069,17 +15069,17 @@ LAB_0077b373: local_2bc.y = (float)(uVar29 >> 0x20); lVar1 = (uVar29 & 0xffffffff) * 0x431bde82; local_2a8 = SUB84((ulonglong)lVar1 >> 0x20,0); - local_2f8 = (void **)((ulonglong)(uint)local_2bc.y * 0xd7b634db >> 0x20); - lVar2 = (ulonglong)(uint)local_2bc.y * 0x431bde82; - uVar29 = (ulonglong)(uint)local_2bc.y * 0xd7b634db + + local_2f8 = (void **)((ulonglong)GHIDRA_UINT(local_2bc.y) * 0xd7b634db >> 0x20); + lVar2 = (ulonglong)GHIDRA_UINT(local_2bc.y) * 0x431bde82; + uVar29 = (ulonglong)GHIDRA_UINT(local_2bc.y) * 0xd7b634db + ((uVar29 & 0xffffffff) * 0xd7b634db >> 0x20); - uVar20 = (uint)(uVar29 >> 0x20); + uVar20 = GHIDRA_UINT((uVar29 >> 0x20)); lVar1 = lVar1 + (uVar29 & 0xffffffff); local_29c.x = (float)lVar1; - uVar9 = (uint)((ulonglong)lVar1 >> 0x20); + uVar9 = GHIDRA_UINT(((ulonglong)lVar1 >> 0x20)); lVar1 = lVar2 + (ulonglong)CONCAT14(CARRY4(uVar20,uVar9),uVar20 + uVar9); *(uint *)&(*(undefined1 *)((char *)(local_294) + 0x1f90)) = - (uint)lVar1 >> 0x12 | (int)((ulonglong)lVar1 >> 0x20) * 0x4000; + GHIDRA_UINT(lVar1) >> 0x12 | GHIDRA_INT(((ulonglong)lVar1 >> 0x20)) * 0x4000; this = local_294; } local_2c4.y = (float)((ulonglong)lVar2 >> 0x20); @@ -15204,17 +15204,17 @@ LAB_0077b894: } local_2dc = 0; if (iVar19 == 0) { - local_2dc = (uint)local_286; + local_2dc = GHIDRA_UINT(local_286); } local_2bc.y = (float)(Entity *)0x0; if (iVar19 == 0) { - local_2bc.y = (float)(uint)isShooting; + local_2bc.y = (float)GHIDRA_UINT(isShooting); } if ((shootDirection.x == 0.0) && (shootDirection.y == 0.0)) { isDirectionHeld = 0; if (SUB41(local_2bc.y,0) != '\0') { - shootDirection.x = (float)((uint)(this->_lastDirection).x ^ 0x80000000); - shootDirection.y = (float)((uint)(this->_lastDirection).y ^ 0x80000000); + shootDirection.x = (float)(GHIDRA_UINT((this->_lastDirection).x) ^ 0x80000000); + shootDirection.y = (float)(GHIDRA_UINT((this->_lastDirection).y) ^ 0x80000000); } } else { @@ -15270,17 +15270,17 @@ LAB_0077b9dc: uVar9 = Random(); local_29c.x = (float)local_284 * 5.0 + (this->_pos).x; local_29c.y = local_2ec.y * 5.0 + (this->_pos).y; - local_2d0.y = (float)((Game *)(g_game))->Game::Spawn(1000,(uint)local_2d0.y,&local_29c,&g_vectorZero, + local_2d0.y = (float)((Game *)(g_game))->Game::Spawn(1000,GHIDRA_UINT(local_2d0.y),&local_29c,&g_vectorZero, (Entity *)this,0,uVar9); if (((Entity *)local_2d0.y == (Entity *)0x0) || (((Entity *)local_2d0.y)->_type != 1000)) { local_2d0.y = 0.0; } - pAVar3 = &((Entity *)((int)local_2d0.y + 0x410))->_sprite; + pAVar3 = &((Entity *)(GHIDRA_INT(local_2d0.y) + 0x410))->_sprite; (pAVar3->_filename)._buf[4] = '\0'; (pAVar3->_filename)._buf[5] = '\0'; (pAVar3->_filename)._buf[6] = '\0'; (pAVar3->_filename)._buf[7] = '\0'; - pAVar3 = &((Entity *)((int)local_2d0.y + 0x410))->_sprite; + pAVar3 = &((Entity *)(GHIDRA_INT(local_2d0.y) + 0x410))->_sprite; (pAVar3->_filename)._buf[8] = '\0'; (pAVar3->_filename)._buf[9] = '\0'; (pAVar3->_filename)._buf[10] = '\0'; @@ -15303,17 +15303,17 @@ LAB_0077bba3: local_29c.x = (float)local_284; local_29c.y = local_2ec.y; if (1.0 < local_2ec.y * local_2ec.y + (float)local_284 * (float)local_284) { - local_284._0_1_ = bVar4; + (*(undefined1 *)((char *)&(local_284) + 0x0)) = bVar4; ((Vector *)(&local_29c))->Vector::Normalize(); pvVar8 = this->_markedTarget; - bVar4 = local_284._0_1_; + bVar4 = (*(undefined1 *)((char *)&(local_284) + 0x0)); } - local_284._0_1_ = bVar4; + (*(undefined1 *)((char *)&(local_284) + 0x0)) = bVar4; *(float *)((char *)pvVar8 + 0x360) = local_29c.x * 8.0 + *(float *)((char *)pvVar8 + 0x360); *(float *)((char *)pvVar8 + 0x364) = *(float *)((char *)pvVar8 + 0x364) + local_29c.y * 8.0; - bVar4 = local_284._0_1_; + bVar4 = (*(undefined1 *)((char *)&(local_284) + 0x0)); } - local_284._0_1_ = bVar4; + (*(undefined1 *)((char *)&(local_284) + 0x0)) = bVar4; if (EVar11 == (EntityPtr)0x2) { local_290.y = (this->_pos).y - *(float *)((char *)this->_markedTarget + 0x340); local_2a8 = (EntityPtr)((this->_pos).x - *(float *)((char *)this->_markedTarget + 0x33c)); @@ -15329,13 +15329,13 @@ LAB_0077bba3: } bVar4 = HasCollectible(this,0xd2,0); if (bVar4 != 0) { - local_284._0_1_ = local_2bc.y._0_1_; + (*(undefined1 *)((char *)&(local_284) + 0x0)) = (*(undefined1 *)((char *)&(local_2bc.y) + 0x0)); local_285 = (char)local_2dc; - bVar4 = local_284._0_1_; + bVar4 = (*(undefined1 *)((char *)&(local_284) + 0x0)); if (this->_mass == 1000.0) goto LAB_0077be15; } local_285 = '\x01'; - local_284._0_1_ = 1; + (*(undefined1 *)((char *)&(local_284) + 0x0)) = 1; goto LAB_0077be0f; } } @@ -15347,25 +15347,25 @@ LAB_0077bba3: if ((this->_flags & 0x4000) != 0) { goto LAB_0077be15; } - local_284._0_1_ = bVar4; + (*(undefined1 *)((char *)&(local_284) + 0x0)) = bVar4; (**(code **)(*piVar15 + 0x28))(); if (this->_markedTarget != (void *)0x0) { local_2a8 = (EntityPtr)&this->_markedTarget; std::multiset::erase(&local_2a8); } - local_284._0_1_ = local_2bc.y._0_1_; + (*(undefined1 *)((char *)&(local_284) + 0x0)) = (*(undefined1 *)((char *)&(local_2bc.y) + 0x0)); local_285 = (char)local_2dc; this->_markedTarget = (void *)0x0; LAB_0077be0f: - bVar4 = local_284._0_1_; + bVar4 = (*(undefined1 *)((char *)&(local_284) + 0x0)); } LAB_0077be15: - local_284._0_1_ = bVar4; + (*(undefined1 *)((char *)&(local_284) + 0x0)) = bVar4; bVar4 = HasCollectible(this,0x17a,0); game = g_game; if ((((bVar4 != 0) && (*(int *)&g_game->_stageTransition == 0)) && (isInputAllowed != '\0')) && (this->_fireBlockCooldown < 1)) { - if (local_284._0_1_ == 0) { + if ((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0) { *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x18b8)) = 0; } else { @@ -15386,17 +15386,17 @@ LAB_0077be15: ((BitSet128 *)auStack_24,(BitSet128 *)local_3c,&g_tearFlagButtBomb); local_2bc.y = 5.1848e-44; buttBombFlagsLo = pBVar10->_l; - uVar30 = *(undefined4 *)((int)&pBVar10->_l + 4); + uVar30 = *(undefined4 *)(GHIDRA_INT(&pBVar10->_l) + 4); buttBombFlagsHi = pBVar10->_h; - uVar34 = *(undefined4 *)((int)&pBVar10->_h + 4); + uVar34 = *(undefined4 *)(GHIDRA_INT(&pBVar10->_h) + 4); *(undefined1 *)(iVar19 + 0x463) = 1; - *(int *)(iVar19 + 0x438) = (int)buttBombFlagsLo; + *(int *)(iVar19 + 0x438) = GHIDRA_INT(buttBombFlagsLo); *(undefined4 *)(iVar19 + 0x43c) = uVar30; - *(int *)(iVar19 + 0x440) = (int)buttBombFlagsHi; + *(int *)(iVar19 + 0x440) = GHIDRA_INT(buttBombFlagsHi); *(undefined4 *)(iVar19 + 0x444) = uVar34; manager = g_manager; seed_fart_sound_override((int *)&local_2bc.y); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_2bc.y,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_2bc.y),1.0,2,0,1.0,0.0); uVar9 = Random(); tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x22,&this->_pos,&g_vectorZero,(Entity *)0x0,0,uVar9); virtualFn = *(code **)(*(int *)tmpEntity + 0x3c); @@ -15412,7 +15412,7 @@ LAB_0077be15: } if ((game->_dailyChallenge)._specialDailyId == 0x29) { if (*(int *)&game->_stageTransition == 0) { - if ((isInputAllowed != '\0') && (local_284._0_1_ != 0)) { + if ((isInputAllowed != '\0') && ((*(undefined1 *)((char *)&(local_284) + 0x0)) != 0)) { bVar4 = ((Entity *)((Entity *)this))->Entity::IsFrame(0x1e,0); if ((bVar4 != 0) && (uVar9 = Random(), (uVar9 & 3) == 0)) { Game::ButterBeanFart(g_game,&this->_pos,120.0,(Entity *)this,1,0); @@ -15426,7 +15426,7 @@ LAB_0077be15: LAB_0077c05c: if (((*(int *)&game->_stageTransition == 0) && (isInputAllowed != '\0')) && (this->_fireBlockCooldown < 1)) { - if (local_284._0_1_ == 0) { + if ((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0) { *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x18f0)) = 0; } else { @@ -15439,16 +15439,16 @@ LAB_0077c05c: isShooting = 0; } iVar19 = this->_fireBlockCooldown; - EVar11._1_3_ = 0; - EVar11._0_1_ = isShooting; + (*(undefined1 *)((char *)&(EVar11) + 0x1)) = 0; + (*(undefined1 *)((char *)&(EVar11) + 0x0)) = isShooting; local_2b4 = (EntityPtr)0xf; local_2a8 = (EntityPtr)0x0; if (iVar19 < 1) { local_2a8 = EVar11; } - isShooting = local_2a8._0_1_; + isShooting = (*(undefined1 *)((char *)&(local_2a8) + 0x0)); if (((this->_isUrethraBlocked != 0) && (iVar19 < 1)) && (isInputAllowed != '\0')) { - if ((local_284._0_1_ == 0) || + if (((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0) || ((local_285 != '\0' && (this->_maxBladderCharge <= this->_bladderCharge)))) { if ((*(char *)game->_room != '\0') && (5 < game->_frameCount - *(int *)((char *)game->_room + 0x11f0))) { @@ -15461,7 +15461,7 @@ LAB_0077c05c: uVar9 = Random(); local_294->_maxPeeBurstCooldown = 0xb4; local_294->_peeBurstCooldown = 0xb4; - local_294->_nextUrethraBlockFrame = iVar19 + (uVar9 % (uint)local_2b4 + 0xf) * 0x1e; + local_294->_nextUrethraBlockFrame = iVar19 + (uVar9 % GHIDRA_UINT(local_2b4) + 0xf) * 0x1e; local_29c.y = (this->_lastDirection).y * 15.0 * local_294->_shotspeed; local_29c.x = (this->_lastDirection).x * 15.0 * local_294->_shotspeed; velocity.y = local_29c.y; @@ -15473,7 +15473,7 @@ LAB_0077c05c: uVar9 = Random(); local_290.y = 0.01; local_2a8 = (EntityPtr) - (((float)((double)(int)uVar9 + __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) + (((float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283064e-10 * 0.3 + 1.2) * (float)local_2a8); tmpEntity = &local_2a8; if ((float)local_2a8 <= 0.01) { @@ -15484,9 +15484,9 @@ LAB_0077c05c: tear->_fScale = (float)EVar11; ((Entity_Tear *)(tear))->Entity_Tear::ResetSpriteScale(); local_3c = *(undefined1 (*) [4])&(tear->_tearFlags)._l; - fStack_38 = *(float *)((int)&(tear->_tearFlags)._l + 4); + fStack_38 = *(float *)(GHIDRA_INT(&(tear->_tearFlags)._l) + 4); VStack_34.x = *(float *)&(tear->_tearFlags)._h; - VStack_34.y = *(float *)((int)&(tear->_tearFlags)._h + 4); + VStack_34.y = *(float *)(GHIDRA_INT(&(tear->_tearFlags)._h) + 4); pBVar33 = &g_tearFlagSpectral; pBVar10 = BitSet128::operator_or ((BitSet128 *)auStack_24,(BitSet128 *)local_3c,&g_tearFlagPiercing); @@ -15516,7 +15516,7 @@ LAB_0077c4aa: *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x20a4)) = 0; } else if (((iVar19 < 1) && (isInputAllowed != '\0')) && (this->_itemState == 0)) { - if (local_284._0_1_ == 0) { + if ((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0) { rng = (RNG *)rng_vector_at(0x2d5); uVar9 = ((RNG *)(rng))->RNG::RandomInt(0xb); UsePoopSpell(this,uVar9 + 1); @@ -15580,7 +15580,7 @@ LAB_0077c4aa: pcVar13 = "HeadLeft"; } SimpleString::operator=((SimpleString *)&this->_headAnim,pcVar13); - this->_headDirection = (int)local_2bc.y; + this->_headDirection = GHIDRA_INT(local_2bc.y); } } } @@ -15603,7 +15603,7 @@ LAB_0077c4aa: if ((cVar5 == '\0') && (isInputAllowed != '\0')) { bVar4 = HasCollectible(this,399,0); if (bVar4 != 0) { - if ((local_284._0_1_ == 0) || + if (((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0) || ((local_285 != '\0' && (0x96 < this->_mawOfTheVoidChargeTimer)))) { room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); iVar19 = ((Room *)(room))->Room::GetFrameCount(); @@ -15621,16 +15621,16 @@ LAB_0077c4aa: ((std::string *)(mawHeadDown))->std::string::string_from_cstr((byte *)"HeadDownShoot"); local_8 = 0; ((std::string *)(mawHeadRight))->std::string::string_from_cstr((byte *)"HeadRightShoot"); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((std::string *)(local_70 + 0x2c))->std::string::string_from_cstr((byte *)"HeadUpShoot"); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; ((std::string *)(mawHeadLeft))->std::string::string_from_cstr((byte *)"HeadLeftShoot"); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; pVVar7 = Vector::ToCardinal(&local_29c,&this->_lastDirection); pvVar8 = string_from_direction (local_a0,*pVVar7,mawHeadLeft,local_70 + 0x2c,mawHeadRight, mawHeadDown); - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; PlayCollectibleAnim(this,399,0,pvVar8,-1,0); ((std::string *)(local_a0))->std::string::_Tidy_deallocate(); ((std::string *)(mawHeadLeft))->std::string::_Tidy_deallocate(); @@ -15655,7 +15655,7 @@ LAB_0077c4aa: } bVar4 = HasCollectible(this,0x283,0); if (bVar4 != 0) { - if ((local_284._0_1_ == 0) || ((local_285 != '\0' && (0x96 < this->_revelationChargeTimer))) + if (((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0) || ((local_285 != '\0' && (0x96 < this->_revelationChargeTimer))) ) { room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); iVar19 = ((Room *)(room))->Room::GetFrameCount(); @@ -15669,10 +15669,10 @@ LAB_0077c4aa: laser = Entity_Laser::ShootAngle (5,&this->_pos,(float)local_2a8,0x1e,posOffset,(Entity *)this,0); laser->SetCollisionDamage(this->_meleeDamage); - FUN_00456830((int)(this->_tearFlags)._l, - *(undefined4 *)((int)&(this->_tearFlags)._l + 4), - (int)(this->_tearFlags)._h, - *(undefined4 *)((int)&(this->_tearFlags)._h + 4)); + FUN_00456830(GHIDRA_INT((this->_tearFlags)._l), + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4), + GHIDRA_INT((this->_tearFlags)._h), + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4)); if (local_308.y <= -0.5) { fVar24 = -10.0; } @@ -15695,7 +15695,7 @@ LAB_0077c4aa: } bVar4 = HasCollectible(this,0x2a8,0); if (bVar4 != 0) { - if ((local_284._0_1_ == 0) || ((local_285 != '\0' && (0x96 < this->_montezumaChargeTimer)))) + if (((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0) || ((local_285 != '\0' && (0x96 < this->_montezumaChargeTimer)))) { room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); iVar19 = ((Room *)(room))->Room::GetFrameCount(); @@ -15710,8 +15710,8 @@ LAB_0077c4aa: laser->SetCollisionDamage(this->_meleeDamage); pBVar10 = ((BitSet128 *)(&g_tearFlagWait))->BitSet128::__bnot((BitSet128 *)auStack_24); pBVar10 = BitSet128::operator_and((BitSet128 *)local_3c,&this->_tearFlags,pBVar10); - FUN_00456830((int)pBVar10->_l,*(undefined4 *)((int)&pBVar10->_l + 4),(int)pBVar10->_h, - *(undefined4 *)((int)&pBVar10->_h + 4)); + FUN_00456830(GHIDRA_INT(pBVar10->_l),*(undefined4 *)(GHIDRA_INT(&pBVar10->_l) + 4),GHIDRA_INT(pBVar10->_h), + *(undefined4 *)(GHIDRA_INT(&pBVar10->_h) + 4)); ((Entity_Laser *)(laser))->Entity_Laser::SetMaxDistance(120.0); ((EntityPtr *)((EntityPtr *)&this->_montezumaLaser))->EntityPtr::SetReference((Entity *)laser); if (local_2b0.y <= -0.5) { @@ -15736,7 +15736,7 @@ LAB_0077c4aa: } if ((this->_playerType == 0x1a) && (bVar4 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x4000), bVar4 == 0)) { - if ((local_284._0_1_ == 0) || (cVar5 = FUN_007dac30(), cVar5 == '\0')) { + if (((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0) || (cVar5 = FUN_007dac30(), cVar5 == '\0')) { this->_eveSumptoriumCharge = 0; } else { @@ -15775,7 +15775,7 @@ LAB_0077c4aa: } if (pvVar8 == (void *)0x0) { LAB_0077cdbc: - weapon = Isaac::CreateWeapon((int)local_2b4,(Entity *)this); + weapon = Isaac::CreateWeapon(GHIDRA_INT(local_2b4),(Entity *)this); this->_weapons[0] = weapon; } else { @@ -15824,8 +15824,8 @@ LAB_0077cde3: FUN_004316c0(); FUN_004316b0(local_2d0.y); } - local_2bc.y = (float)((int)local_2bc.y + 4); - local_2b4 = (EntityPtr)((int)local_2b4 + -1); + local_2bc.y = (float)(GHIDRA_INT(local_2bc.y) + 4); + local_2b4 = (EntityPtr)(GHIDRA_INT(local_2b4) + -1); } while (local_2b4 != (EntityPtr)0x0); if (this->_weapons[0] == (void *)0x0) { local_2bc.y = (float)(this->_weapons + 1); @@ -15837,13 +15837,13 @@ LAB_0077cde3: bVar4 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x4000); (*virtualFn)(bVar4); } - local_2bc.y = (float)((int)local_2bc.y + 4); - local_2b4 = (EntityPtr)((int)local_2b4 + -1); + local_2bc.y = (float)(GHIDRA_INT(local_2bc.y) + 4); + local_2b4 = (EntityPtr)(GHIDRA_INT(local_2b4) + -1); } while (local_2b4 != (EntityPtr)0x0); } else { FUN_004316c0(); - FUN_004316b0((uint)local_2d0.y | 0x80000000); + FUN_004316b0(GHIDRA_UINT(local_2d0.y) | 0x80000000); virtualFn = *(code **)(*(int *)this->_weapons[0] + 8); bVar4 = ((Entity *)((Entity *)local_294))->Entity::HasEntityFlags(0x4000); (*virtualFn)(bVar4); @@ -15854,7 +15854,7 @@ LAB_0077cde3: } local_2a8 = (EntityPtr)this->_blinkTime; local_2dc = 2; - if ((int)local_2a8 < 9) { + if (GHIDRA_INT(local_2a8) < 9) { local_2dc = 0; } bVar4 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x4000); @@ -15915,7 +15915,7 @@ LAB_0077cde3: __RTDynamicCast(piVar15,0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Effect::RTTI_Type_Descriptor,0); local_2b4 = EVar11; - if (local_284._0_1_ == 0) { + if ((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0) { local_2bc.y = 0.8; } else { @@ -15980,19 +15980,19 @@ LAB_0077cde3: if (((((bVar4 != 0) || (bVar4 = HasCollectible(this,0x238,0), bVar4 != 0)) || (bVar4 = HasCollectible(this,0x2d6,0), bVar4 != 0)) || (bVar4 = HasCollectible(this,0x2a9,0), bVar4 != 0)) && (this->_isControlsEnabled != 0)) { - auStack_24._0_4_ = 4; - auStack_24._4_4_ = 6; + (*(undefined4 *)((char *)&(auStack_24) + 0x0)) = 4; + (*(undefined4 *)((char *)&(auStack_24) + 0x4)) = 6; fStack_1c = 7.00649e-45; iStack_18 = 7; local_2bc.y = 0.0; do { pVVar7 = (Vector *)local_2bc.y; bVar4 = input_is_action_triggered - (g_manager,*(int *)(auStack_24 + (int)local_2bc.y * 4), + (g_manager,*(int *)(auStack_24 + GHIDRA_INT(local_2bc.y) * 4), this->_controllerIndex,(Entity *)this,0); if (bVar4 != 0) { if ((*(Vector **)&(*(undefined1 *)((char *)(this) + 0x1f94)) == pVVar7) && (*(int *)&(*(undefined1 *)((char *)(this) + 0x1f98)) < 0xb)) { - Isaac::GetAxisAlignedUnitVectorFromDir(&local_29c,(int)pVVar7); + Isaac::GetAxisAlignedUnitVectorFromDir(&local_29c,GHIDRA_INT(pVVar7)); room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); bVar4 = ((Room *)(room))->Room::IsMirrorWorld(); if (bVar4 != 0) { @@ -16010,18 +16010,18 @@ LAB_0077cde3: local_290.y = 0.0; do { puVar21 = (undefined1 *)local_290.y; - bVar4 = HasCollectible(this,*(int *)(local_3c + (int)local_290.y * 8),0); + bVar4 = HasCollectible(this,*(int *)(local_3c + GHIDRA_INT(local_290.y) * 8),0); if (bVar4 != 0) { ((Level *)((Level *)g_game))->Level::GetCurrentRoom(); pEVar16 = (EntityList *)FUN_00428a60(); EntityList::QuerySublist - (pEVar16,&local_80,3,*(int *)(local_3c + (int)puVar21 * 8 + 4),-1,0,0); + (pEVar16,&local_80,3,*(int *)(local_3c + GHIDRA_INT(puVar21) * 8 + 4),-1,0,0); local_8 = 5; fVar24 = 0.0; local_2c4.y = 0.0; iVar19 = ((EntityList *)((EntityList *)&local_80))->EntityList::Size(); if (iVar19 != 0) { - local_2d0.y = (float)((int)local_2b4 * 0xc); + local_2d0.y = (float)(GHIDRA_INT(local_2b4) * 0xc); do { std::vector::operator_index(fVar24); this_01 = (Entity_Familiar *)FUN_00435de0(); @@ -16029,18 +16029,18 @@ LAB_0077cde3: (tmpPlayer = (Entity_Player *)((Entity_Familiar *)(this_01))->Entity_Familiar::Player(), tmpPlayer == this)) && ((iVar19 = FUN_00753d30(), -1 < iVar19 && - (iVar19 = FUN_00753d30(), iVar19 <= (int)local_2d0.y)))) { + (iVar19 = FUN_00753d30(), iVar19 <= GHIDRA_INT(local_2d0.y))))) { FUN_00753d40(local_2d0.y); position.y = local_29c.y; position.x = local_29c.x; ((Entity *)((Entity *)this_01))->Entity::SetTargetPosition(position); - local_2b4 = (EntityPtr)((int)local_2b4 + 1); - local_2d0.y = (float)((int)local_2d0.y + 0xc); + local_2b4 = (EntityPtr)(GHIDRA_INT(local_2b4) + 1); + local_2d0.y = (float)(GHIDRA_INT(local_2d0.y) + 0xc); } - fVar24 = (float)((int)local_2c4.y + 1); + fVar24 = (float)(GHIDRA_INT(local_2c4.y) + 1); local_2c4.y = fVar24; fVar27 = (float)((EntityList *)((EntityList *)&local_80))->EntityList::Size(); - } while ((uint)fVar24 < (uint)fVar27); + } while (GHIDRA_UINT(fVar24) < GHIDRA_UINT(fVar27)); } local_8 = 0xffffffff; ((EntityList_Query *)(&local_80))->EntityList_Query::~EntityList_Query(); @@ -16096,17 +16096,17 @@ LAB_0077cde3: ((std::string *)(local_a0))->std::string::string_from_cstr((byte *)"HeadDownShoot"); local_8 = 6; ((std::string *)(hemoptysisHeadRight))->std::string::string_from_cstr((byte *)"HeadRightShoot"); - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; ((std::string *)(hemoptysisHeadUp))->std::string::string_from_cstr((byte *)"HeadUpShoot"); - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; ((std::string *)(hemoptysisHeadLeft))->std::string::string_from_cstr((byte *)"HeadLeftShoot"); - local_8._0_1_ = 9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; direction.y = local_29c.y; direction.x = local_29c.x; animString = string_from_direction (local_70 + 0x14,direction,hemoptysisHeadLeft,hemoptysisHeadUp, hemoptysisHeadRight,local_a0); - local_8._0_1_ = 10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 10; play_null_costume_anim(this,0x75,0,animString,-1,0); ((std::string *)(local_70 + 0x14))->std::string::_Tidy_deallocate(); ((std::string *)(hemoptysisHeadLeft))->std::string::_Tidy_deallocate(); @@ -16120,8 +16120,8 @@ LAB_0077cde3: *(Vector **)&(*(undefined1 *)((char *)(this) + 0x1f94)) = pVVar7; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1f98)) = 0; } - local_2bc.y = (float)((int)&pVVar7->x + 1); - } while ((int)local_2bc.y < 4); + local_2bc.y = (float)(GHIDRA_INT(&pVVar7->x) + 1); + } while (GHIDRA_INT(local_2bc.y) < 4); } *(int *)&(*(undefined1 *)((char *)(this) + 0x1f98)) = *(int *)&(*(undefined1 *)((char *)(this) + 0x1f98)) + 1; bVar4 = HasCollectible(this,400,0); @@ -16166,7 +16166,7 @@ LAB_0077cde3: __RTDynamicCast(piVar15,0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Effect::RTTI_Type_Descriptor,0); local_2b4 = EVar11; - if (local_284._0_1_ == 0) { + if ((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0) { local_290.y = 0.8; } else { @@ -16277,7 +16277,7 @@ LAB_0077cde3: ((Sprite *)((Sprite *)&this->_bodySprite))->Sprite::SetLastFrame(); } bVar4 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x4000); - if ((bVar4 != 0) || (local_284._0_1_ == 0)) goto LAB_0077fc4f; + if ((bVar4 != 0) || ((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0)) goto LAB_0077fc4f; ((TearParams *)(&knifeTearParams))->TearParams::constructor(); uVar9 = Random(); pVVar7 = ((Entity *)((Entity *)this))->Entity::Position(&local_2d8); @@ -16298,7 +16298,7 @@ LAB_0077cde3: knife->Update(); this->_itemStateCooldown = 5; uVar9 = GetActiveItemSlot(this,0x1e1); - if (-1 < (int)uVar9) { + if (-1 < GHIDRA_INT(uVar9)) { DischargeActiveItem(this,uVar9,0); } this->_blinkTime = 1; @@ -16314,7 +16314,7 @@ switchD_0077e14f_caseD_2a: PlayExtraAnimation(this,(byte *)"LiftItem"); ((Sprite *)((Sprite *)&this->_bodySprite))->Sprite::SetLastFrame(); } - if (local_284._0_1_ == 0) goto LAB_0077fc4f; + if ((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0) goto LAB_0077fc4f; bVar4 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x4000); if (bVar4 != 0) goto switchD_0077f19d_caseD_2c5; local_2bc.y = (float)&this->_lastVelocity; @@ -16363,8 +16363,8 @@ switchD_0077e14f_caseD_2a: effect->SetColor(local_70,0xffffffff,0xff,0,1); } effect->Update(); - local_290.y = (float)((int)local_290.y + 4); - local_2c4.y = (float)((int)local_2c4.y + -1); + local_290.y = (float)(GHIDRA_INT(local_290.y) + 4); + local_2c4.y = (float)(GHIDRA_INT(local_2c4.y) + -1); } while (local_2c4.y != 0.0); LAB_0077e64e: iVar19 = 0x1d7; @@ -16414,8 +16414,8 @@ LAB_0077e64e: (**(code **)(*(int *)tmpEntity + 0x3c))(local_70,0xffffffff,0xff,0,1); } (**(code **)(*(int *)tmpEntity + 0xc))(); - local_290.y = (float)((int)local_290.y + 4); - local_2c4.y = (float)((int)local_2c4.y + -1); + local_290.y = (float)(GHIDRA_INT(local_290.y) + 4); + local_2c4.y = (float)(GHIDRA_INT(local_2c4.y) + -1); } while (local_2c4.y != 0.0); local_2c4.y = 0.0; goto LAB_0077e64e; @@ -16484,7 +16484,7 @@ LAB_0077e64e: FUN_00428b50(); cVar5 = FUN_0082ee30(); if ((cVar5 == '\0') && (isInputAllowed != '\0')) { - trigger_fire_item_effects(this,&shootDirection,local_284._0_1_); + trigger_fire_item_effects(this,&shootDirection,(*(undefined1 *)((char *)&(local_284) + 0x0))); } } } @@ -16555,7 +16555,7 @@ switchD_0077e14f_caseD_1: uVar30 = 0; tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x3c,&this->_pos,&local_2ec,(Entity *)this,0,uVar9); effect = (Entity_Effect *)__RTDynamicCast(tmpEntity,uVar30,pTVar31,pTVar32,uVar34); - ((Entity_Effect *)(effect))->Entity_Effect::SetTimeout((int)(-this->_tearheight * 0.75)); + ((Entity_Effect *)(effect))->Entity_Effect::SetTimeout(GHIDRA_INT((-this->_tearheight * 0.75))); effect->SetCollisionDamage(this->_damage + this->_damage); ((Entity *)((Entity *)effect))->Entity::SetParent((Entity *)this); effect->Update(); @@ -16574,7 +16574,7 @@ switchD_0077e14f_caseD_1: PlayExtraAnimation(this,(byte *)"LiftItem"); ((Sprite *)((Sprite *)&this->_bodySprite))->Sprite::SetLastFrame(); } - if (local_284._0_1_ == 0) goto LAB_0077fc4f; + if ((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0) goto LAB_0077fc4f; bVar4 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x4000); if (bVar4 == 0) { local_2b0.y = 10.0; @@ -16612,7 +16612,7 @@ switchD_0077e14f_caseD_1: ((Sprite *)((Sprite *)&this->_bodySprite))->Sprite::SetLastFrame(); SoundEffects::PlayWithFartOverride(0x3fe,1.0,2,0,1.0); } - if (local_284._0_1_ == 0) goto LAB_0077fc4f; + if ((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0) goto LAB_0077fc4f; bVar4 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x4000); if (bVar4 == 0) { local_2b0.y = 15.0; @@ -16638,29 +16638,29 @@ switchD_0077e14f_caseD_1: uVar9 = ((RNG *)(rng))->RNG::RandomInt(uVar9); piVar15 = (int *)FUN_0060c6c0(uVar9); enemyType = *piVar15; - auStack_24._0_4_ = piVar15[1]; - auStack_24._4_4_ = piVar15[2]; + (*(undefined4 *)((char *)&(auStack_24) + 0x0)) = piVar15[1]; + (*(undefined4 *)((char *)&(auStack_24) + 0x4)) = piVar15[2]; fStack_1c = (float)piVar15[3]; iStack_18 = piVar15[4]; bVar4 = Entity_NPC::Redirect(&enemyType,(int *)auStack_24); if (bVar4 != 0) { this_02 = (EntityConfig *)FUN_00417910(); - entityConfigEntry = ((EntityConfig *)(this_02))->EntityConfig::GetEntity(enemyType,auStack_24._0_4_,0); + entityConfigEntry = ((EntityConfig *)(this_02))->EntityConfig::GetEntity(enemyType,(*(undefined4 *)((char *)&(auStack_24) + 0x0)),0); if (entityConfigEntry != (EntityConfig_Entity *)0x0) { piVar15 = (int *)FUN_005cd4b0(entityConfigEntry->id,entityConfigEntry->variant, entityConfigEntry->subtype,entityConfigEntry->baseHP ,0); enemyType = *piVar15; - auStack_24._0_4_ = piVar15[1]; - auStack_24._4_4_ = piVar15[2]; + (*(undefined4 *)((char *)&(auStack_24) + 0x0)) = piVar15[1]; + (*(undefined4 *)((char *)&(auStack_24) + 0x4)) = piVar15[2]; fStack_1c = (float)piVar15[3]; } } (this->_friendBallEnemy)._maxHealth = fStack_1c; (this->_friendBallEnemy)._type = enemyType; - (this->_friendBallEnemy)._variant = auStack_24._0_4_; + (this->_friendBallEnemy)._variant = (*(undefined4 *)((char *)&(auStack_24) + 0x0)); (this->_friendBallEnemy)._health = fStack_1c * 0.5; - (this->_friendBallEnemy)._subtype = auStack_24._4_4_; + (this->_friendBallEnemy)._subtype = (*(undefined4 *)((char *)&(auStack_24) + 0x4)); } uVar9 = Random(); uVar20 = 1; @@ -16668,7 +16668,7 @@ switchD_0077e14f_caseD_1: else { iVar19 = (this->_friendBallEnemy)._type; uVar9 = Random(); - uVar20 = (uint)(iVar19 != 0); + uVar20 = GHIDRA_UINT((iVar19 != 0)); } tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x51,&this->_pos,&local_2c4,(Entity *)this,uVar20, uVar9); @@ -16688,7 +16688,7 @@ switchD_0077e14f_caseD_1: PlayExtraAnimation(this,(byte *)"LiftItem"); ((Sprite *)((Sprite *)&this->_bodySprite))->Sprite::SetLastFrame(); } - if (local_284._0_1_ == 0) break; + if ((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0) break; bVar4 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x4000); if (bVar4 != 0) goto switchD_0077f19d_caseD_2c5; uVar9 = Random(); @@ -16751,7 +16751,7 @@ LAB_0077f493: } else { LAB_0077f3b7: - if (local_284._0_1_ == 0) goto LAB_0077f493; + if ((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0) goto LAB_0077f493; if (this->_heldEntity != (void *)0x0) { local_2b0.y = 10.0; ((Vector *)(&shootDirection))->Vector::__mul(&local_290,&local_2b0.y); @@ -16790,7 +16790,7 @@ LAB_0077f3b7: this->_itemStateCooldown = 5; goto LAB_0077ed7e; } - if (local_284._0_1_ == 0) break; + if ((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0) break; local_2b0.y = 10.0; ((Vector *)(&shootDirection))->Vector::__mul(&local_2bc,&local_2b0.y); GetTearMovementInheritance(this,&local_2d8,&shootDirection,0); @@ -16847,7 +16847,7 @@ switchD_0077f19d_caseD_2c5: ((Sprite *)((Sprite *)&this->_bodySprite))->Sprite::SetLastFrame(); } bVar4 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x4000); - if ((bVar4 == 0) && (local_284._0_1_ != 0)) { + if ((bVar4 == 0) && ((*(undefined1 *)((char *)&(local_284) + 0x0)) != 0)) { ((TearParams *)(&bagTearParams))->TearParams::constructor(); uVar9 = Random(); pVVar7 = ((Entity *)((Entity *)this))->Entity::Position(&local_2d8); @@ -16868,7 +16868,7 @@ switchD_0077f19d_caseD_2c5: knife->Update(); this->_itemStateCooldown = 5; uVar9 = GetActiveItemSlot(this,0x2c6); - if (-1 < (int)uVar9) { + if (-1 < GHIDRA_INT(uVar9)) { DischargeActiveItem(this,uVar9,0); } this->_blinkTime = 1; @@ -16885,7 +16885,7 @@ switchD_0077f19d_caseD_2c5: ((Sprite *)((Sprite *)&this->_bodySprite))->Sprite::SetLastFrame(); } bVar4 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x4000); - if ((bVar4 == 0) && (local_284._0_1_ != 0)) { + if ((bVar4 == 0) && ((*(undefined1 *)((char *)&(local_284) + 0x0)) != 0)) { bVar4 = HasCollectible(this,0x164,0); local_2d0.x = 0.0; local_2d0.y = 0.0; @@ -16904,7 +16904,7 @@ switchD_0077f19d_caseD_2c5: pVVar7 = Vector::operator_mul(&local_2f4,&local_2c4.y,vector); ((Vector *)(&local_2e4))->Vector::operator_add_assign(pVVar7); ((Vector *)(&local_2e4))->Vector::Normalize(); - ((Vector *)(&local_2e4))->Vector::Rotate((&local_2d0.x)[(int)fVar24]); + ((Vector *)(&local_2e4))->Vector::Rotate((&local_2d0.x)[GHIDRA_INT(fVar24)]); uVar9 = Random(); tmpEntity = ((Game *)(g_game))->Game::Spawn(3,0xf0,&this->_pos,&g_vectorZero,(Entity *)this,0,uVar9); ((Entity *)(tmpEntity))->Entity::ClearEntityFlags(4); @@ -16913,8 +16913,8 @@ switchD_0077f19d_caseD_2c5: ((Entity *)(tmpEntity))->Entity::SetTargetPosition(position_00); FUN_005b18f0(1); (**(code **)(*(int *)tmpEntity + 0xc))(); - local_290.y = (float)((int)(float *)local_290.y + 1); - } while ((uint)local_290.y < (uint)local_2bc.y); + local_290.y = (float)(GHIDRA_INT((float *)local_290.y) + 1); + } while (GHIDRA_UINT(local_290.y) < GHIDRA_UINT(local_2bc.y)); play_sound_with_fart_seed(0x1ee,1.0,2,0,1.0); LAB_0077ed69: this->_itemStateCooldown = 5; @@ -16932,7 +16932,7 @@ LAB_0077ed7e: ((Sprite *)((Sprite *)&this->_bodySprite))->Sprite::SetLastFrame(); } bVar4 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x4000); - if ((bVar4 == 0) && (local_284._0_1_ != 0)) { + if ((bVar4 == 0) && ((*(undefined1 *)((char *)&(local_284) + 0x0)) != 0)) { local_2b0.y = 10.0; ((Vector *)(&shootDirection))->Vector::__mul(&local_2d0,&local_2b0.y); GetTearMovementInheritance(this,&local_2d8,&shootDirection,0); @@ -16967,7 +16967,7 @@ LAB_0077fc55: this->_luck = local_29c.y; EVar11 = (EntityPtr)local_29c.y; } - if (((local_284._0_1_ == 0) && (*piVar15 < 0)) && (this->_headDirectionTime < 0)) { + if ((((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0) && (*piVar15 < 0)) && (this->_headDirectionTime < 0)) { FUN_00420ae0(); cVar5 = FUN_0082ee30(); if (cVar5 == '\0') { @@ -17003,7 +17003,7 @@ LAB_0077fc55: bVar4 = HasCollectible(this,0x2ab,0); if ((bVar4 != 0) && ((iVar19 = ((Sprite *)((Sprite *)&this->_sprite))->Sprite::GetOverlayFrame(), iVar19 == 0 && - (8 < (int)local_2a8)))) { + (8 < GHIDRA_INT(local_2a8))))) { local_29c.y = (this->_posOffset).y; ((Color *)(&particleColor))->Color::Color(); fVar24 = random_float(); @@ -17013,16 +17013,16 @@ LAB_0077fc55: local_294 = (Entity_Player *)&this->_playerCostumeMap[0]._isBodyLayer; local_290.y = 2.10195e-44; do { - if ((((-1 < ((PlayerCostumeMap *)((int)local_294 + -0xc))->_index) && + if ((((-1 < ((PlayerCostumeMap *)(GHIDRA_INT(local_294) + -0xc))->_index) && (*(byte *)local_294 == 0)) && - (this_04 = (Sprite *)FUN_005cbd10(((PlayerCostumeMap *)((int)local_294 + -0xc))->_index) + (this_04 = (Sprite *)FUN_005cbd10(((PlayerCostumeMap *)(GHIDRA_INT(local_294) + -0xc))->_index) , this_04[1]._filename._buf[8] == '\0')) && (iVar19 = FUN_0040bcb0(&this->_headAnim), iVar19 != 0)) { if (*(char *)(iVar19 + 0x34) == '\0') { - if ((int)local_2a8 < 9) { + if (GHIDRA_INT(local_2a8) < 9) { uVar30 = FUN_00421620("_Idle"); local_8 = 0xb; - cleanupFlags = (EntityPtr)((uint)cleanupFlags | 1); + cleanupFlags = (EntityPtr)(GHIDRA_UINT(cleanupFlags) | 1); local_29c.y = (float)cleanupFlags; iVar19 = FUN_0040bcb0(uVar30); local_286 = '\x01'; @@ -17033,8 +17033,8 @@ LAB_0077ff13: local_286 = '\0'; } local_8 = 0xffffffff; - if (((uint)cleanupFlags & 1) != 0) { - cleanupFlags = (EntityPtr)((uint)cleanupFlags & 0xfffffffe); + if ((GHIDRA_UINT(cleanupFlags) & 1) != 0) { + cleanupFlags = (EntityPtr)(GHIDRA_UINT(cleanupFlags) & 0xfffffffe); ((std::string *)(local_70 + 0x14))->std::string::_Tidy_deallocate(); } if (local_286 == '\0') { @@ -17051,7 +17051,7 @@ LAB_0077ff13: else { ((Sprite *)(this_04))->Sprite::Play(&this->_headAnim,0); costumeLayer = ((Sprite *)(this_04))->Sprite::GetLayer(*(byte **)((char *)local_294 + -8)); - (costumeLayer->_pos).y = (float)(int)local_2dc * (costumeLayer->_size).y; + (costumeLayer->_pos).y = (float)GHIDRA_INT(local_2dc) * (costumeLayer->_size).y; } if (this_04[1]._filename._buf[10] != '\0') { uVar30 = FUN_00421620("_Overlay"); @@ -17077,8 +17077,8 @@ LAB_0077ff13: } } } - local_294 = (Entity_Player *)((int)local_294 + 0x10); - local_290.y = (float)((int)local_290.y + -1); + local_294 = (Entity_Player *)(GHIDRA_INT(local_294) + 0x10); + local_290.y = (float)(GHIDRA_INT(local_290.y) + -1); } while (local_290.y != 0.0); local_290.y = 0.0; } @@ -17112,14 +17112,14 @@ LAB_007800b3: if (bVar4 == 0) { *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x18a8)) = 0; } - else if (((local_284._0_1_ == 0) || (*(int *)&(*(undefined1 *)((char *)(this) + 0x18ac)) == -1)) || + else if ((((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0) || (*(int *)&(*(undefined1 *)((char *)(this) + 0x18ac)) == -1)) || (iVar19 = vector_to_direction(&shootDirection), iVar19 == *(int *)&(*(undefined1 *)((char *)(this) + 0x18ac))) ) { iVar19 = FUN_00505ca0(); if (0 < iVar19) { *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x18a8)) = 10; } - if (local_284._0_1_ != 0) { + if ((*(undefined1 *)((char *)&(local_284) + 0x0)) != 0) { iVar19 = vector_to_direction(&shootDirection); *(int *)&(*(undefined1 *)((char *)(this) + 0x18ac)) = iVar19; } @@ -17139,7 +17139,7 @@ LAB_007800b3: bVar22 = true; } if ((*(int *)&(*(undefined1 *)((char *)(this) + 0x18a8)) < 0) || - ((*(int *)&(*(undefined1 *)((char *)(this) + 0x18a8)) == 0 && ((local_284._0_1_ == 0 || (bVar22)))))) { + ((*(int *)&(*(undefined1 *)((char *)(this) + 0x18a8)) == 0 && (((*(undefined1 *)((char *)&(local_284) + 0x0)) == 0 || (bVar22)))))) { iVar19 = this->_fireBlockCooldown; bVar22 = iVar19 == 0; if (!bVar22) goto LAB_007802cb; @@ -17154,7 +17154,7 @@ LAB_007800b3: cVar5 = FUN_0082ee30(); if (cVar5 == '\0') { ((Entity *)((Entity *)this))->Entity::ClearEntityFlags(0x4000); - trigger_fire_item_effects(this,&shootDirection,local_284._0_1_); + trigger_fire_item_effects(this,&shootDirection,(*(undefined1 *)((char *)&(local_284) + 0x0))); ((Entity *)((Entity *)this))->Entity::AddEntityFlags(0x4000); } } @@ -17209,112 +17209,112 @@ BitSet128 * Entity_Player::GetBombFlags(BitSet128 *outFlags, byte isRollChances) uint *flagsWord; *(undefined4 *)&outFlags->_l = 0; - *(undefined4 *)((int)&outFlags->_l + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&outFlags->_l) + 4) = 0; *(undefined4 *)&outFlags->_h = 0; - *(undefined4 *)((int)&outFlags->_h + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&outFlags->_h) + 4) = 0; isHasCollectible = HasCollectible(this,0x7d,0); if (isHasCollectible != 0) { - *(uint *)&outFlags->_l = (uint)outFlags->_l | (uint)g_tearFlagHoming._l; - flagsWord = (uint *)((int)&outFlags->_l + 4); - *flagsWord = *flagsWord | g_tearFlagHoming._l._4_4_; - *(uint *)&outFlags->_h = (uint)outFlags->_h | (uint)g_tearFlagHoming._h; - flagsWord = (uint *)((int)&outFlags->_h + 4); - *flagsWord = *flagsWord | g_tearFlagHoming._h._4_4_; + *(uint *)&outFlags->_l = GHIDRA_UINT(outFlags->_l) | GHIDRA_UINT(g_tearFlagHoming._l); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_l) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagHoming._l) + 0x4)); + *(uint *)&outFlags->_h = GHIDRA_UINT(outFlags->_h) | GHIDRA_UINT(g_tearFlagHoming._h); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_h) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagHoming._h) + 0x4)); } isHasCollectible = HasCollectible(this,0x8c,0); if (isHasCollectible != 0) { - *(uint *)&outFlags->_l = (uint)outFlags->_l | (uint)g_tearFlagPoison._l; - flagsWord = (uint *)((int)&outFlags->_l + 4); - *flagsWord = *flagsWord | g_tearFlagPoison._l._4_4_; - *(uint *)&outFlags->_h = (uint)outFlags->_h | (uint)g_tearFlagPoison._h; - flagsWord = (uint *)((int)&outFlags->_h + 4); - *flagsWord = *flagsWord | g_tearFlagPoison._h._4_4_; + *(uint *)&outFlags->_l = GHIDRA_UINT(outFlags->_l) | GHIDRA_UINT(g_tearFlagPoison._l); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_l) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagPoison._l) + 0x4)); + *(uint *)&outFlags->_h = GHIDRA_UINT(outFlags->_h) | GHIDRA_UINT(g_tearFlagPoison._h); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_h) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagPoison._h) + 0x4)); } isHasCollectible = HasCollectible(this,0xd1,0); if ((isHasCollectible != 0) && ((isRollChances == 0 || - (uVar1 = Random(), (int)(uVar1 % 100) <= 0x12 - (int)(this->_luck * -3.0))))) { - *(uint *)&outFlags->_l = (uint)outFlags->_l | (uint)g_tearFlagButtBomb._l; - flagsWord = (uint *)((int)&outFlags->_l + 4); - *flagsWord = *flagsWord | g_tearFlagButtBomb._l._4_4_; - *(uint *)&outFlags->_h = (uint)outFlags->_h | (uint)g_tearFlagButtBomb._h; - flagsWord = (uint *)((int)&outFlags->_h + 4); - *flagsWord = *flagsWord | g_tearFlagButtBomb._h._4_4_; + (uVar1 = Random(), GHIDRA_INT((uVar1 % 100)) <= 0x12 - GHIDRA_INT((this->_luck * -3.0)))))) { + *(uint *)&outFlags->_l = GHIDRA_UINT(outFlags->_l) | GHIDRA_UINT(g_tearFlagButtBomb._l); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_l) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagButtBomb._l) + 0x4)); + *(uint *)&outFlags->_h = GHIDRA_UINT(outFlags->_h) | GHIDRA_UINT(g_tearFlagButtBomb._h); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_h) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagButtBomb._h) + 0x4)); } isHasCollectible = HasCollectible(this,0x100,0); if ((isHasCollectible != 0) && ((isRollChances == 0 || - (uVar1 = Random(), (int)(uVar1 % 100) <= 0x19 - (int)(this->_luck * -6.0))))) { - *(uint *)&outFlags->_l = (uint)outFlags->_l | (uint)g_tearFlagBurn._l; - flagsWord = (uint *)((int)&outFlags->_l + 4); - *flagsWord = *flagsWord | g_tearFlagBurn._l._4_4_; - *(uint *)&outFlags->_h = (uint)outFlags->_h | (uint)g_tearFlagBurn._h; - flagsWord = (uint *)((int)&outFlags->_h + 4); - *flagsWord = *flagsWord | g_tearFlagBurn._h._4_4_; + (uVar1 = Random(), GHIDRA_INT((uVar1 % 100)) <= 0x19 - GHIDRA_INT((this->_luck * -6.0)))))) { + *(uint *)&outFlags->_l = GHIDRA_UINT(outFlags->_l) | GHIDRA_UINT(g_tearFlagBurn._l); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_l) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagBurn._l) + 0x4)); + *(uint *)&outFlags->_h = GHIDRA_UINT(outFlags->_h) | GHIDRA_UINT(g_tearFlagBurn._h); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_h) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagBurn._h) + 0x4)); } isHasCollectible = HasCollectible(this,0xdc,0); if ((isHasCollectible != 0) && ((isRollChances == 0 || - (uVar1 = Random(), (int)(uVar1 % 100) <= 10 - (int)(this->_luck * -3.0))))) { - *(uint *)&outFlags->_l = (uint)outFlags->_l | (uint)g_tearFlagSadBomb._l; - flagsWord = (uint *)((int)&outFlags->_l + 4); - *flagsWord = *flagsWord | g_tearFlagSadBomb._l._4_4_; - *(uint *)&outFlags->_h = (uint)outFlags->_h | (uint)g_tearFlagSadBomb._h; - flagsWord = (uint *)((int)&outFlags->_h + 4); - *flagsWord = *flagsWord | g_tearFlagSadBomb._h._4_4_; + (uVar1 = Random(), GHIDRA_INT((uVar1 % 100)) <= 10 - GHIDRA_INT((this->_luck * -3.0)))))) { + *(uint *)&outFlags->_l = GHIDRA_UINT(outFlags->_l) | GHIDRA_UINT(g_tearFlagSadBomb._l); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_l) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagSadBomb._l) + 0x4)); + *(uint *)&outFlags->_h = GHIDRA_UINT(outFlags->_h) | GHIDRA_UINT(g_tearFlagSadBomb._h); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_h) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagSadBomb._h) + 0x4)); } isHasCollectible = HasCollectible(this,0x16e,0); if ((isHasCollectible != 0) && ((isRollChances == 0 || - (uVar1 = Random(), (int)(uVar1 % 100) <= 0x21 - (int)(this->_luck * -8.0))))) { - *(uint *)&outFlags->_l = (uint)outFlags->_l | (uint)g_tearFlagScatterBomb._l; - flagsWord = (uint *)((int)&outFlags->_l + 4); - *flagsWord = *flagsWord | g_tearFlagScatterBomb._l._4_4_; - *(uint *)&outFlags->_h = (uint)outFlags->_h | (uint)g_tearFlagScatterBomb._h; - flagsWord = (uint *)((int)&outFlags->_h + 4); - *flagsWord = *flagsWord | g_tearFlagScatterBomb._h._4_4_; + (uVar1 = Random(), GHIDRA_INT((uVar1 % 100)) <= 0x21 - GHIDRA_INT((this->_luck * -8.0)))))) { + *(uint *)&outFlags->_l = GHIDRA_UINT(outFlags->_l) | GHIDRA_UINT(g_tearFlagScatterBomb._l); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_l) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagScatterBomb._l) + 0x4)); + *(uint *)&outFlags->_h = GHIDRA_UINT(outFlags->_h) | GHIDRA_UINT(g_tearFlagScatterBomb._h); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_h) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagScatterBomb._h) + 0x4)); } isHasCollectible = HasCollectible(this,0x16f,0); if (isHasCollectible != 0) { - uVar4 = (uint)g_tearFlagSticky._l | (uint)g_tearFlagEgg._l; - uVar1 = g_tearFlagSticky._l._4_4_ | g_tearFlagEgg._l._4_4_; - uVar5 = g_tearFlagSticky._h._4_4_ | g_tearFlagEgg._h._4_4_; - *(uint *)&outFlags->_h = (uint)outFlags->_h | (uint)g_tearFlagSticky._h | (uint)g_tearFlagEgg._h + uVar4 = GHIDRA_UINT(g_tearFlagSticky._l) | GHIDRA_UINT(g_tearFlagEgg._l); + uVar1 = (*(undefined4 *)((char *)&(g_tearFlagSticky._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagEgg._l) + 0x4)); + uVar5 = (*(undefined4 *)((char *)&(g_tearFlagSticky._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagEgg._h) + 0x4)); + *(uint *)&outFlags->_h = GHIDRA_UINT(outFlags->_h) | GHIDRA_UINT(g_tearFlagSticky._h) | GHIDRA_UINT(g_tearFlagEgg._h) ; - *(uint *)&outFlags->_l = (uint)outFlags->_l | uVar4; - flagsWord = (uint *)((int)&outFlags->_l + 4); + *(uint *)&outFlags->_l = GHIDRA_UINT(outFlags->_l) | uVar4; + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_l) + 4); *flagsWord = *flagsWord | uVar1; - flagsWord = (uint *)((int)&outFlags->_h + 4); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_h) + 4); *flagsWord = *flagsWord | uVar5; } isHasCollectible = HasCollectible(this,0x1b0,0); if ((isHasCollectible != 0) && ((isRollChances == 0 || - (uVar1 = Random(), (int)(uVar1 % 100) <= 10 - (int)(this->_luck * -3.0))))) { - *(uint *)&outFlags->_l = (uint)outFlags->_l | (uint)g_tearFlagGlitterBomb._l; - flagsWord = (uint *)((int)&outFlags->_l + 4); - *flagsWord = *flagsWord | g_tearFlagGlitterBomb._l._4_4_; - *(uint *)&outFlags->_h = (uint)outFlags->_h | (uint)g_tearFlagGlitterBomb._h; - flagsWord = (uint *)((int)&outFlags->_h + 4); - *flagsWord = *flagsWord | g_tearFlagGlitterBomb._h._4_4_; + (uVar1 = Random(), GHIDRA_INT((uVar1 % 100)) <= 10 - GHIDRA_INT((this->_luck * -3.0)))))) { + *(uint *)&outFlags->_l = GHIDRA_UINT(outFlags->_l) | GHIDRA_UINT(g_tearFlagGlitterBomb._l); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_l) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagGlitterBomb._l) + 0x4)); + *(uint *)&outFlags->_h = GHIDRA_UINT(outFlags->_h) | GHIDRA_UINT(g_tearFlagGlitterBomb._h); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_h) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagGlitterBomb._h) + 0x4)); } isHasCollectible = HasCollectible(this,0x13b,0); if (isHasCollectible != 0) { - *(uint *)&outFlags->_l = (uint)outFlags->_l | (uint)g_tearFlagAttractor._l; - flagsWord = (uint *)((int)&outFlags->_l + 4); - *flagsWord = *flagsWord | g_tearFlagAttractor._l._4_4_; - *(uint *)&outFlags->_h = (uint)outFlags->_h | (uint)g_tearFlagAttractor._h; - flagsWord = (uint *)((int)&outFlags->_h + 4); - *flagsWord = *flagsWord | g_tearFlagAttractor._h._4_4_; + *(uint *)&outFlags->_l = GHIDRA_UINT(outFlags->_l) | GHIDRA_UINT(g_tearFlagAttractor._l); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_l) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagAttractor._l) + 0x4)); + *(uint *)&outFlags->_h = GHIDRA_UINT(outFlags->_h) | GHIDRA_UINT(g_tearFlagAttractor._h); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_h) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagAttractor._h) + 0x4)); } isHasCollectible = HasCollectible(this,0x161,0); if (isHasCollectible != 0) { - *(uint *)&outFlags->_l = (uint)outFlags->_l | (uint)g_tearFlagCrossBomb._l; - flagsWord = (uint *)((int)&outFlags->_l + 4); - *flagsWord = *flagsWord | g_tearFlagCrossBomb._l._4_4_; - *(uint *)&outFlags->_h = (uint)outFlags->_h | (uint)g_tearFlagCrossBomb._h; - flagsWord = (uint *)((int)&outFlags->_h + 4); - *flagsWord = *flagsWord | g_tearFlagCrossBomb._h._4_4_; + *(uint *)&outFlags->_l = GHIDRA_UINT(outFlags->_l) | GHIDRA_UINT(g_tearFlagCrossBomb._l); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_l) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagCrossBomb._l) + 0x4)); + *(uint *)&outFlags->_h = GHIDRA_UINT(outFlags->_h) | GHIDRA_UINT(g_tearFlagCrossBomb._h); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_h) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagCrossBomb._h) + 0x4)); } if ((*(int *)&(*(undefined1 *)((char *)(this) + 0x2ef8)) == 0) || (*(int *)&(*(undefined1 *)((char *)(this) + 0x2ef8)) != 0x47)) { iVar3 = GetTrinketMultiplier(this,0x47); @@ -17322,7 +17322,7 @@ BitSet128 * Entity_Player::GetBombFlags(BitSet128 *outFlags, byte isRollChances) bVar6 = iVar3 == 0; LAB_007808cb: if (bVar6 || bVar7 != iVar3 < 0) { - flagsLowHiWord = *(uint *)((int)&outFlags->_l + 4); + flagsLowHiWord = *(uint *)(GHIDRA_INT(&outFlags->_l) + 4); goto LAB_00780901; } } @@ -17333,137 +17333,137 @@ LAB_007808cb: bVar6 = iVar2 == 1; goto LAB_007808cb; } - *(uint *)&outFlags->_l = (uint)outFlags->_l | (uint)g_tearFlagCreepTrail._l; - flagsWord = (uint *)((int)&outFlags->_l + 4); - *flagsWord = *flagsWord | g_tearFlagCreepTrail._l._4_4_; - flagsLowHiWord = *(uint *)((int)&outFlags->_l + 4); - *(uint *)&outFlags->_h = (uint)outFlags->_h | (uint)g_tearFlagCreepTrail._h; - flagsWord = (uint *)((int)&outFlags->_h + 4); - *flagsWord = *flagsWord | g_tearFlagCreepTrail._h._4_4_; + *(uint *)&outFlags->_l = GHIDRA_UINT(outFlags->_l) | GHIDRA_UINT(g_tearFlagCreepTrail._l); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_l) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagCreepTrail._l) + 0x4)); + flagsLowHiWord = *(uint *)(GHIDRA_INT(&outFlags->_l) + 4); + *(uint *)&outFlags->_h = GHIDRA_UINT(outFlags->_h) | GHIDRA_UINT(g_tearFlagCreepTrail._h); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_h) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagCreepTrail._h) + 0x4)); LAB_00780901: - uVar1 = *(uint *)((int)&outFlags->_h + 4); + uVar1 = *(uint *)(GHIDRA_INT(&outFlags->_h) + 4); flagsHigh = outFlags->_h; if ((this->_hasGoldenBomb != 0) && (isRollChances == 0)) { - uVar4 = (uint)outFlags->_l | (uint)g_tearFlagGoldenBomb._l; - *(uint *)((int)&outFlags->_l + 4) = g_tearFlagGoldenBomb._l._4_4_ | flagsLowHiWord; + uVar4 = GHIDRA_UINT(outFlags->_l) | GHIDRA_UINT(g_tearFlagGoldenBomb._l); + *(uint *)(GHIDRA_INT(&outFlags->_l) + 4) = (*(undefined4 *)((char *)&(g_tearFlagGoldenBomb._l) + 0x4)) | flagsLowHiWord; *(uint *)&outFlags->_l = uVar4; - uVar1 = uVar1 | g_tearFlagGoldenBomb._h._4_4_; - *(uint *)&outFlags->_h = (uint)flagsHigh | (uint)g_tearFlagGoldenBomb._h; - *(uint *)((int)&outFlags->_h + 4) = uVar1; + uVar1 = uVar1 | (*(undefined4 *)((char *)&(g_tearFlagGoldenBomb._h) + 0x4)); + *(uint *)&outFlags->_h = GHIDRA_UINT(flagsHigh) | GHIDRA_UINT(g_tearFlagGoldenBomb._h); + *(uint *)(GHIDRA_INT(&outFlags->_h) + 4) = uVar1; } isHasCollectible = HasCollectible(this,0x205,0); if ((isHasCollectible != 0) && (isRollChances == 0)) { - *(uint *)&outFlags->_l = (uint)outFlags->_l | (uint)g_tearFlagFastBomb._l; - flagsWord = (uint *)((int)&outFlags->_l + 4); - *flagsWord = *flagsWord | g_tearFlagFastBomb._l._4_4_; - *(uint *)&outFlags->_h = (uint)outFlags->_h | (uint)g_tearFlagFastBomb._h; - flagsWord = (uint *)((int)&outFlags->_h + 4); - *flagsWord = *flagsWord | g_tearFlagFastBomb._h._4_4_; + *(uint *)&outFlags->_l = GHIDRA_UINT(outFlags->_l) | GHIDRA_UINT(g_tearFlagFastBomb._l); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_l) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagFastBomb._l) + 0x4)); + *(uint *)&outFlags->_h = GHIDRA_UINT(outFlags->_h) | GHIDRA_UINT(g_tearFlagFastBomb._h); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_h) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagFastBomb._h) + 0x4)); } isHasCollectible = HasCollectible(this,0x266,0); if (isHasCollectible != 0) { - *(uint *)&outFlags->_l = (uint)outFlags->_l | (uint)g_tearFlagBloodBomb._l; - flagsWord = (uint *)((int)&outFlags->_l + 4); - *flagsWord = *flagsWord | g_tearFlagBloodBomb._l._4_4_; - *(uint *)&outFlags->_h = (uint)outFlags->_h | (uint)g_tearFlagBloodBomb._h; - flagsWord = (uint *)((int)&outFlags->_h + 4); - *flagsWord = *flagsWord | g_tearFlagBloodBomb._h._4_4_; + *(uint *)&outFlags->_l = GHIDRA_UINT(outFlags->_l) | GHIDRA_UINT(g_tearFlagBloodBomb._l); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_l) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagBloodBomb._l) + 0x4)); + *(uint *)&outFlags->_h = GHIDRA_UINT(outFlags->_h) | GHIDRA_UINT(g_tearFlagBloodBomb._h); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_h) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagBloodBomb._h) + 0x4)); } isHasCollectible = HasCollectible(this,0x286,0); if ((isHasCollectible != 0) && ((isRollChances == 0 || - (uVar1 = Random(), (int)(uVar1 % 100) <= 10 - (int)(this->_luck * -3.0))))) { - *(uint *)&outFlags->_l = (uint)outFlags->_l | (uint)g_tearFlagBrimstoneBomb._l; - flagsWord = (uint *)((int)&outFlags->_l + 4); - *flagsWord = *flagsWord | g_tearFlagBrimstoneBomb._l._4_4_; - *(uint *)&outFlags->_h = (uint)outFlags->_h | (uint)g_tearFlagBrimstoneBomb._h; - flagsWord = (uint *)((int)&outFlags->_h + 4); - *flagsWord = *flagsWord | g_tearFlagBrimstoneBomb._h._4_4_; + (uVar1 = Random(), GHIDRA_INT((uVar1 % 100)) <= 10 - GHIDRA_INT((this->_luck * -3.0)))))) { + *(uint *)&outFlags->_l = GHIDRA_UINT(outFlags->_l) | GHIDRA_UINT(g_tearFlagBrimstoneBomb._l); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_l) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagBrimstoneBomb._l) + 0x4)); + *(uint *)&outFlags->_h = GHIDRA_UINT(outFlags->_h) | GHIDRA_UINT(g_tearFlagBrimstoneBomb._h); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_h) + 4); + *flagsWord = *flagsWord | (*(undefined4 *)((char *)&(g_tearFlagBrimstoneBomb._h) + 0x4)); } isHasCollectible = HasCollectible(this,0x2d7,0); if ((isHasCollectible != 0) && ((isRollChances == 0 || - (uVar1 = Random(), (int)(uVar1 % 100) <= 0x21 - (int)(this->_luck * -8.0))))) { - uVar5 = (uint)g_tearFlagGhostBomb._h | (uint)g_tearFlagSpectral._h; - uVar1 = g_tearFlagGhostBomb._l._4_4_ | g_tearFlagSpectral._l._4_4_; - uVar4 = g_tearFlagGhostBomb._h._4_4_ | g_tearFlagSpectral._h._4_4_; + (uVar1 = Random(), GHIDRA_INT((uVar1 % 100)) <= 0x21 - GHIDRA_INT((this->_luck * -8.0)))))) { + uVar5 = GHIDRA_UINT(g_tearFlagGhostBomb._h) | GHIDRA_UINT(g_tearFlagSpectral._h); + uVar1 = (*(undefined4 *)((char *)&(g_tearFlagGhostBomb._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagSpectral._l) + 0x4)); + uVar4 = (*(undefined4 *)((char *)&(g_tearFlagGhostBomb._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagSpectral._h) + 0x4)); *(uint *)&outFlags->_l = - (uint)outFlags->_l | (uint)g_tearFlagGhostBomb._l | (uint)g_tearFlagSpectral._l; - flagsWord = (uint *)((int)&outFlags->_l + 4); + GHIDRA_UINT(outFlags->_l) | GHIDRA_UINT(g_tearFlagGhostBomb._l) | GHIDRA_UINT(g_tearFlagSpectral._l); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_l) + 4); *flagsWord = *flagsWord | uVar1; - *(uint *)&outFlags->_h = (uint)outFlags->_h | uVar5; - flagsWord = (uint *)((int)&outFlags->_h + 4); + *(uint *)&outFlags->_h = GHIDRA_UINT(outFlags->_h) | uVar5; + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_h) + 4); *flagsWord = *flagsWord | uVar4; } isHasCollectible = HasCollectible(this,0x233,0); if ((isHasCollectible != 0) && ((isRollChances == 0 || - (uVar1 = Random(), (int)(uVar1 % 100) <= 0x32 - (int)(this->_luck * -8.0))))) { - nancyBombFlags[0]._l._0_4_ = (uint)g_tearFlagHoming._l; - nancyBombFlags[0]._l._4_4_ = g_tearFlagHoming._l._4_4_; - nancyBombFlags[0]._h._0_4_ = (uint)g_tearFlagHoming._h; - nancyBombFlags[0]._h._4_4_ = g_tearFlagHoming._h._4_4_; - nancyBombFlags[1]._l._0_4_ = (uint)g_tearFlagPoison._l; - nancyBombFlags[1]._l._4_4_ = g_tearFlagPoison._l._4_4_; - nancyBombFlags[1]._h._0_4_ = (uint)g_tearFlagPoison._h; - nancyBombFlags[1]._h._4_4_ = g_tearFlagPoison._h._4_4_; - nancyBombFlags[2]._l._0_4_ = (uint)g_tearFlagButtBomb._l; - nancyBombFlags[2]._l._4_4_ = g_tearFlagButtBomb._l._4_4_; - nancyBombFlags[2]._h._0_4_ = (uint)g_tearFlagButtBomb._h; - nancyBombFlags[2]._h._4_4_ = g_tearFlagButtBomb._h._4_4_; - nancyBombFlags[3]._l._0_4_ = (uint)g_tearFlagBurn._l; - nancyBombFlags[3]._l._4_4_ = g_tearFlagBurn._l._4_4_; - nancyBombFlags[3]._h._0_4_ = (uint)g_tearFlagBurn._h; - nancyBombFlags[3]._h._4_4_ = g_tearFlagBurn._h._4_4_; - nancyBombFlags[4]._l._0_4_ = (uint)g_tearFlagSadBomb._l; - nancyBombFlags[4]._l._4_4_ = g_tearFlagSadBomb._l._4_4_; - nancyBombFlags[4]._h._0_4_ = (uint)g_tearFlagSadBomb._h; - nancyBombFlags[4]._h._4_4_ = g_tearFlagSadBomb._h._4_4_; - nancyBombFlags[5]._l._0_4_ = (uint)g_tearFlagScatterBomb._l; - nancyBombFlags[5]._l._4_4_ = g_tearFlagScatterBomb._l._4_4_; - nancyBombFlags[5]._h._0_4_ = (uint)g_tearFlagScatterBomb._h; - nancyBombFlags[6]._l._4_4_ = g_tearFlagSticky._l._4_4_ | g_tearFlagEgg._l._4_4_; - nancyBombFlags[5]._h._4_4_ = g_tearFlagScatterBomb._h._4_4_; - nancyBombFlags[6]._l._0_4_ = (uint)g_tearFlagSticky._l | (uint)g_tearFlagEgg._l; - nancyBombFlags[6]._h._0_4_ = (uint)g_tearFlagSticky._h | (uint)g_tearFlagEgg._h; - nancyBombFlags[6]._h._4_4_ = g_tearFlagSticky._h._4_4_ | g_tearFlagEgg._h._4_4_; - nancyBombFlags[7]._l._0_4_ = (uint)g_tearFlagGlitterBomb._l; - nancyBombFlags[7]._l._4_4_ = g_tearFlagGlitterBomb._l._4_4_; - nancyBombFlags[7]._h._0_4_ = (uint)g_tearFlagGlitterBomb._h; - nancyBombFlags[7]._h._4_4_ = g_tearFlagGlitterBomb._h._4_4_; - nancyBombFlags[8]._l._0_4_ = (uint)g_tearFlagAttractor._l; - nancyBombFlags[8]._l._4_4_ = g_tearFlagAttractor._l._4_4_; - nancyBombFlags[8]._h._0_4_ = (uint)g_tearFlagAttractor._h; - nancyBombFlags[8]._h._4_4_ = g_tearFlagAttractor._h._4_4_; - nancyBombFlags[9]._l._0_4_ = (uint)g_tearFlagCrossBomb._l; - nancyBombFlags[9]._l._4_4_ = g_tearFlagCrossBomb._l._4_4_; - nancyBombFlags[9]._h._0_4_ = (uint)g_tearFlagCrossBomb._h; - nancyBombFlags[9]._h._4_4_ = g_tearFlagCrossBomb._h._4_4_; - nancyBombFlags[10]._l._0_4_ = (uint)g_tearFlagCreepTrail._l; - nancyBombFlags[10]._l._4_4_ = g_tearFlagCreepTrail._l._4_4_; - nancyBombFlags[10]._h._0_4_ = (uint)g_tearFlagCreepTrail._h; - nancyBombFlags[10]._h._4_4_ = g_tearFlagCreepTrail._h._4_4_; - nancyBombFlags[0xb]._l._0_4_ = (uint)g_tearFlagGoldenBomb._l; - nancyBombFlags[0xb]._l._4_4_ = g_tearFlagGoldenBomb._l._4_4_; - nancyBombFlags[0xb]._h._0_4_ = (uint)g_tearFlagGoldenBomb._h; - nancyBombFlags[0xb]._h._4_4_ = g_tearFlagGoldenBomb._h._4_4_; - nancyBombFlags[0xc]._l._0_4_ = (uint)g_tearFlagFastBomb._l; - nancyBombFlags[0xc]._l._4_4_ = g_tearFlagFastBomb._l._4_4_; - nancyBombFlags[0xc]._h._0_4_ = (uint)g_tearFlagFastBomb._h; - nancyBombFlags[0xc]._h._4_4_ = g_tearFlagFastBomb._h._4_4_; - nancyBombFlags[0xd]._l._0_4_ = (uint)g_tearFlagBloodBomb._l; - nancyBombFlags[0xd]._l._4_4_ = g_tearFlagBloodBomb._l._4_4_; - nancyBombFlags[0xd]._h._0_4_ = (uint)g_tearFlagBloodBomb._h; - nancyBombFlags[0xd]._h._4_4_ = g_tearFlagBloodBomb._h._4_4_; - uVar1 = (uint)(15.0 - this->_luck); - nancyBombFlags[0xe]._l._0_4_ = (uint)g_tearFlagBrimstoneBomb._l; - nancyBombFlags[0xe]._l._4_4_ = g_tearFlagBrimstoneBomb._l._4_4_; - nancyBombFlags[0xe]._h._0_4_ = (uint)g_tearFlagBrimstoneBomb._h; - nancyBombFlags[0xe]._h._4_4_ = g_tearFlagBrimstoneBomb._h._4_4_; - nancyBombFlags[0xf]._l._0_4_ = (uint)g_tearFlagGhostBomb._l; - nancyBombFlags[0xf]._l._4_4_ = g_tearFlagGhostBomb._l._4_4_; - nancyBombFlags[0xf]._h._0_4_ = (uint)g_tearFlagGhostBomb._h; - nancyBombFlags[0xf]._h._4_4_ = g_tearFlagGhostBomb._h._4_4_; + (uVar1 = Random(), GHIDRA_INT((uVar1 % 100)) <= 0x32 - GHIDRA_INT((this->_luck * -8.0)))))) { + (*(undefined4 *)((char *)&(nancyBombFlags[0]._l) + 0x0)) = GHIDRA_UINT(g_tearFlagHoming._l); + (*(undefined4 *)((char *)&(nancyBombFlags[0]._l) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagHoming._l) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[0]._h) + 0x0)) = GHIDRA_UINT(g_tearFlagHoming._h); + (*(undefined4 *)((char *)&(nancyBombFlags[0]._h) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagHoming._h) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[1]._l) + 0x0)) = GHIDRA_UINT(g_tearFlagPoison._l); + (*(undefined4 *)((char *)&(nancyBombFlags[1]._l) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagPoison._l) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[1]._h) + 0x0)) = GHIDRA_UINT(g_tearFlagPoison._h); + (*(undefined4 *)((char *)&(nancyBombFlags[1]._h) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagPoison._h) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[2]._l) + 0x0)) = GHIDRA_UINT(g_tearFlagButtBomb._l); + (*(undefined4 *)((char *)&(nancyBombFlags[2]._l) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagButtBomb._l) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[2]._h) + 0x0)) = GHIDRA_UINT(g_tearFlagButtBomb._h); + (*(undefined4 *)((char *)&(nancyBombFlags[2]._h) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagButtBomb._h) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[3]._l) + 0x0)) = GHIDRA_UINT(g_tearFlagBurn._l); + (*(undefined4 *)((char *)&(nancyBombFlags[3]._l) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagBurn._l) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[3]._h) + 0x0)) = GHIDRA_UINT(g_tearFlagBurn._h); + (*(undefined4 *)((char *)&(nancyBombFlags[3]._h) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagBurn._h) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[4]._l) + 0x0)) = GHIDRA_UINT(g_tearFlagSadBomb._l); + (*(undefined4 *)((char *)&(nancyBombFlags[4]._l) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagSadBomb._l) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[4]._h) + 0x0)) = GHIDRA_UINT(g_tearFlagSadBomb._h); + (*(undefined4 *)((char *)&(nancyBombFlags[4]._h) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagSadBomb._h) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[5]._l) + 0x0)) = GHIDRA_UINT(g_tearFlagScatterBomb._l); + (*(undefined4 *)((char *)&(nancyBombFlags[5]._l) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagScatterBomb._l) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[5]._h) + 0x0)) = GHIDRA_UINT(g_tearFlagScatterBomb._h); + (*(undefined4 *)((char *)&(nancyBombFlags[6]._l) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagSticky._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagEgg._l) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[5]._h) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagScatterBomb._h) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[6]._l) + 0x0)) = GHIDRA_UINT(g_tearFlagSticky._l) | GHIDRA_UINT(g_tearFlagEgg._l); + (*(undefined4 *)((char *)&(nancyBombFlags[6]._h) + 0x0)) = GHIDRA_UINT(g_tearFlagSticky._h) | GHIDRA_UINT(g_tearFlagEgg._h); + (*(undefined4 *)((char *)&(nancyBombFlags[6]._h) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagSticky._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagEgg._h) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[7]._l) + 0x0)) = GHIDRA_UINT(g_tearFlagGlitterBomb._l); + (*(undefined4 *)((char *)&(nancyBombFlags[7]._l) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagGlitterBomb._l) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[7]._h) + 0x0)) = GHIDRA_UINT(g_tearFlagGlitterBomb._h); + (*(undefined4 *)((char *)&(nancyBombFlags[7]._h) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagGlitterBomb._h) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[8]._l) + 0x0)) = GHIDRA_UINT(g_tearFlagAttractor._l); + (*(undefined4 *)((char *)&(nancyBombFlags[8]._l) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagAttractor._l) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[8]._h) + 0x0)) = GHIDRA_UINT(g_tearFlagAttractor._h); + (*(undefined4 *)((char *)&(nancyBombFlags[8]._h) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagAttractor._h) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[9]._l) + 0x0)) = GHIDRA_UINT(g_tearFlagCrossBomb._l); + (*(undefined4 *)((char *)&(nancyBombFlags[9]._l) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagCrossBomb._l) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[9]._h) + 0x0)) = GHIDRA_UINT(g_tearFlagCrossBomb._h); + (*(undefined4 *)((char *)&(nancyBombFlags[9]._h) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagCrossBomb._h) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[10]._l) + 0x0)) = GHIDRA_UINT(g_tearFlagCreepTrail._l); + (*(undefined4 *)((char *)&(nancyBombFlags[10]._l) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagCreepTrail._l) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[10]._h) + 0x0)) = GHIDRA_UINT(g_tearFlagCreepTrail._h); + (*(undefined4 *)((char *)&(nancyBombFlags[10]._h) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagCreepTrail._h) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[0xb]._l) + 0x0)) = GHIDRA_UINT(g_tearFlagGoldenBomb._l); + (*(undefined4 *)((char *)&(nancyBombFlags[0xb]._l) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagGoldenBomb._l) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[0xb]._h) + 0x0)) = GHIDRA_UINT(g_tearFlagGoldenBomb._h); + (*(undefined4 *)((char *)&(nancyBombFlags[0xb]._h) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagGoldenBomb._h) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[0xc]._l) + 0x0)) = GHIDRA_UINT(g_tearFlagFastBomb._l); + (*(undefined4 *)((char *)&(nancyBombFlags[0xc]._l) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagFastBomb._l) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[0xc]._h) + 0x0)) = GHIDRA_UINT(g_tearFlagFastBomb._h); + (*(undefined4 *)((char *)&(nancyBombFlags[0xc]._h) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagFastBomb._h) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[0xd]._l) + 0x0)) = GHIDRA_UINT(g_tearFlagBloodBomb._l); + (*(undefined4 *)((char *)&(nancyBombFlags[0xd]._l) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagBloodBomb._l) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[0xd]._h) + 0x0)) = GHIDRA_UINT(g_tearFlagBloodBomb._h); + (*(undefined4 *)((char *)&(nancyBombFlags[0xd]._h) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagBloodBomb._h) + 0x4)); + uVar1 = GHIDRA_UINT((15.0 - this->_luck)); + (*(undefined4 *)((char *)&(nancyBombFlags[0xe]._l) + 0x0)) = GHIDRA_UINT(g_tearFlagBrimstoneBomb._l); + (*(undefined4 *)((char *)&(nancyBombFlags[0xe]._l) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagBrimstoneBomb._l) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[0xe]._h) + 0x0)) = GHIDRA_UINT(g_tearFlagBrimstoneBomb._h); + (*(undefined4 *)((char *)&(nancyBombFlags[0xe]._h) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagBrimstoneBomb._h) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[0xf]._l) + 0x0)) = GHIDRA_UINT(g_tearFlagGhostBomb._l); + (*(undefined4 *)((char *)&(nancyBombFlags[0xf]._l) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagGhostBomb._l) + 0x4)); + (*(undefined4 *)((char *)&(nancyBombFlags[0xf]._h) + 0x0)) = GHIDRA_UINT(g_tearFlagGhostBomb._h); + (*(undefined4 *)((char *)&(nancyBombFlags[0xf]._h) + 0x4)) = (*(undefined4 *)((char *)&(g_tearFlagGhostBomb._h) + 0x4)); if (uVar1 == 0) { uVar4 = 0; } @@ -17471,9 +17471,9 @@ LAB_00780901: uVar4 = Random(); uVar4 = uVar4 % uVar1; } - iVar3 = ((int)uVar4 < 5) + 2; - if (2 < (int)uVar4) { - iVar3 = ((int)uVar4 < 5) + 1; + iVar3 = (GHIDRA_INT(uVar4) < 5) + 2; + if (2 < GHIDRA_INT(uVar4)) { + iVar3 = (GHIDRA_INT(uVar4) < 5) + 1; } iVar2 = iVar3 + 1; if (uVar4 != 0) { @@ -17482,28 +17482,28 @@ LAB_00780901: do { uVar1 = Random(); uVar1 = uVar1 & 0xf; - *(uint *)&outFlags->_l = (uint)outFlags->_l | (uint)nancyBombFlags[uVar1]._l; - flagsWord = (uint *)((int)&outFlags->_l + 4); - *flagsWord = *flagsWord | *(uint *)((int)&nancyBombFlags[uVar1]._l + 4); - *(uint *)&outFlags->_h = (uint)outFlags->_h | (uint)nancyBombFlags[uVar1]._h; - flagsWord = (uint *)((int)&outFlags->_h + 4); - *flagsWord = *flagsWord | *(uint *)((int)&nancyBombFlags[uVar1]._h + 4); + *(uint *)&outFlags->_l = GHIDRA_UINT(outFlags->_l) | GHIDRA_UINT(nancyBombFlags[uVar1]._l); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_l) + 4); + *flagsWord = *flagsWord | *(uint *)(GHIDRA_INT(&nancyBombFlags[uVar1]._l) + 4); + *(uint *)&outFlags->_h = GHIDRA_UINT(outFlags->_h) | GHIDRA_UINT(nancyBombFlags[uVar1]._h); + flagsWord = (uint *)(GHIDRA_INT(&outFlags->_h) + 4); + *flagsWord = *flagsWord | *(uint *)(GHIDRA_INT(&nancyBombFlags[uVar1]._h) + 4); iVar2 = iVar2 + -1; } while (iVar2 != 0); } - uVar1 = (uint)outFlags->_l; - uVar4 = *(uint *)((int)&outFlags->_l + 4); - if (((uVar1 & (uint)g_tearFlagGhostBomb._l) != 0 || (uVar4 & g_tearFlagGhostBomb._l._4_4_) != 0) - || (((uint)outFlags->_h & (uint)g_tearFlagGhostBomb._h) != 0 || - (*(uint *)((int)&outFlags->_h + 4) & g_tearFlagGhostBomb._h._4_4_) != 0)) { - uVar4 = uVar4 | g_tearFlagSpectral._l._4_4_; + uVar1 = GHIDRA_UINT(outFlags->_l); + uVar4 = *(uint *)(GHIDRA_INT(&outFlags->_l) + 4); + if (((uVar1 & GHIDRA_UINT(g_tearFlagGhostBomb._l)) != 0 || (uVar4 & (*(undefined4 *)((char *)&(g_tearFlagGhostBomb._l) + 0x4))) != 0) + || ((GHIDRA_UINT(outFlags->_h) & GHIDRA_UINT(g_tearFlagGhostBomb._h)) != 0 || + (*(uint *)(GHIDRA_INT(&outFlags->_h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagGhostBomb._h) + 0x4))) != 0)) { + uVar4 = uVar4 | (*(undefined4 *)((char *)&(g_tearFlagSpectral._l) + 0x4)); flagsHigh = outFlags->_h; - uVar5 = *(uint *)((int)&outFlags->_h + 4); - *(uint *)&outFlags->_l = uVar1 | (uint)g_tearFlagSpectral._l; - *(uint *)((int)&outFlags->_l + 4) = uVar4; - uVar5 = uVar5 | g_tearFlagSpectral._h._4_4_; - *(uint *)&outFlags->_h = (uint)flagsHigh | (uint)g_tearFlagSpectral._h; - *(uint *)((int)&outFlags->_h + 4) = uVar5; + uVar5 = *(uint *)(GHIDRA_INT(&outFlags->_h) + 4); + *(uint *)&outFlags->_l = uVar1 | GHIDRA_UINT(g_tearFlagSpectral._l); + *(uint *)(GHIDRA_INT(&outFlags->_l) + 4) = uVar4; + uVar5 = uVar5 | (*(undefined4 *)((char *)&(g_tearFlagSpectral._h) + 0x4)); + *(uint *)&outFlags->_h = GHIDRA_UINT(flagsHigh) | GHIDRA_UINT(g_tearFlagSpectral._h); + *(uint *)(GHIDRA_INT(&outFlags->_h) + 4) = uVar5; } return outFlags; } @@ -17521,10 +17521,10 @@ float Entity_Player::check_bomb_tearflags(BitSet128 tearFlags) isHasCollectible = HasCollectible(this,0x6a,0); if (isHasCollectible == 0) { - if ((((uint)tearFlags._l & (uint)g_tearFlagPersistent._l) == 0 && - (g_tearFlagPersistent._l._4_4_ & tearFlags._l._4_4_) == 0) && - (((uint)tearFlags._h & (uint)g_tearFlagPersistent._h) == 0 && - (g_tearFlagPersistent._h._4_4_ & tearFlags._h._4_4_) == 0)) { + if (((GHIDRA_UINT(tearFlags._l) & GHIDRA_UINT(g_tearFlagPersistent._l)) == 0 && + ((*(undefined4 *)((char *)&(g_tearFlagPersistent._l) + 0x4)) & (*(undefined4 *)((char *)&(tearFlags._l) + 0x4))) == 0) && + ((GHIDRA_UINT(tearFlags._h) & GHIDRA_UINT(g_tearFlagPersistent._h)) == 0 && + ((*(undefined4 *)((char *)&(g_tearFlagPersistent._h) + 0x4)) & (*(undefined4 *)((char *)&(tearFlags._h) + 0x4))) == 0)) { isHasCollectible = HasCollectible(this,0x1a4,0); if (isHasCollectible == 0) { return 1.0; @@ -17703,14 +17703,14 @@ void Entity_Player::update_bomb_input() if (0 < bombCount) { do { GetBombFlags(this,&bombFlags,0); - uVar3 = bombFlags._h._4_4_; - uVar2 = (uint)bombFlags._h; - fVar15 = bombFlags._l._4_4_; - uVar1 = (uint)bombFlags._l; - tearFlags._l._4_4_ = bombFlags._l._4_4_; - tearFlags._l._0_4_ = (uint)bombFlags._l; - tearFlags._h._0_4_ = (uint)bombFlags._h; - tearFlags._h._4_4_ = bombFlags._h._4_4_; + uVar3 = (*(undefined4 *)((char *)&(bombFlags._h) + 0x4)); + uVar2 = GHIDRA_UINT(bombFlags._h); + fVar15 = (*(undefined4 *)((char *)&(bombFlags._l) + 0x4)); + uVar1 = GHIDRA_UINT(bombFlags._l); + (*(undefined4 *)((char *)&(tearFlags._l) + 0x4)) = (*(undefined4 *)((char *)&(bombFlags._l) + 0x4)); + (*(undefined4 *)((char *)&(tearFlags._l) + 0x0)) = GHIDRA_UINT(bombFlags._l); + (*(undefined4 *)((char *)&(tearFlags._h) + 0x0)) = GHIDRA_UINT(bombFlags._h); + (*(undefined4 *)((char *)&(tearFlags._h) + 0x4)) = (*(undefined4 *)((char *)&(bombFlags._h) + 0x4)); bombScale = check_bomb_tearflags(this,tearFlags); launchVelocity.x = (this->_velocity).x * 0.1; launchVelocity.y = (this->_velocity).y * 0.1; @@ -17775,8 +17775,8 @@ LAB_00781539: if (1 < bombCount) { if (isRocket == '\0') { rngResult = Random(); - fStack_bc = (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + fStack_bc = (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14; fStack_bc = fStack_bc + fStack_bc; fVar13 = cos(fStack_bc); @@ -17802,14 +17802,14 @@ LAB_00781539: KAGE_LogMessage(0x10,(byte *)"Start and End parameters cannot be the same!"); } fVar14 = ((float)bombIndex - 0.0) / ((float)(bombCount + -1) - 0.0); - lerpT = ZEXT416((uint)fVar14); + lerpT = ZEXT416(GHIDRA_UINT(fVar14)); if (fVar14 <= 0.0) { lerpT = ZEXT816(0); } - if (1.0 <= lerpT._0_4_) { - lerpT._0_4_ = 0x3f800000; + if (1.0 <= (*(undefined4 *)((char *)&(lerpT) + 0x0))) { + (*(undefined4 *)((char *)&(lerpT) + 0x0)) = 0x3f800000; } - fStack_c4 = ((fStack_c4 - fVar13) * lerpT._0_4_ + fVar13) * 0.017453292; + fStack_c4 = ((fStack_c4 - fVar13) * (*(undefined4 *)((char *)&(lerpT) + 0x0)) + fVar13) * 0.017453292; fVar13 = cos(fStack_c4); fVar14 = sin(fStack_c4); (pEVar5->_pos).y = @@ -17819,22 +17819,22 @@ LAB_00781539: (fVar11 - fVar12); } } - pEVar5[1]._collisionIndex = (int)bombScale; + pEVar5[1]._collisionIndex = GHIDRA_INT(bombScale); *(float *)&pEVar5[1]._pendingDamageFlags = fStack_d0; pEVar5[1]._type = uVar1; - pEVar5[1]._variant = (int)fVar15; + pEVar5[1]._variant = GHIDRA_INT(fVar15); pEVar5[1]._subtype = uVar2; pEVar5[1]._spawnerType = uVar3; pEVar5[1]._sprite._filename._buf[0xb] = '\x01'; manager = g_manager; - fStack_bc = (float)(uVar3 & g_tearFlagGlitterBomb._h._4_4_); + fStack_bc = (float)(uVar3 & (*(undefined4 *)((char *)&(g_tearFlagGlitterBomb._h) + 0x4))); fStack_c4 = fVar15; - if (((uVar1 & (uint)g_tearFlagGlitterBomb._l) != 0 || - ((uint)fVar15 & g_tearFlagGlitterBomb._l._4_4_) != 0) || - ((uVar2 & (uint)g_tearFlagGlitterBomb._h) != 0 || fStack_bc != 0.0)) { + if (((uVar1 & GHIDRA_UINT(g_tearFlagGlitterBomb._l)) != 0 || + (GHIDRA_UINT(fVar15) & (*(undefined4 *)((char *)&(g_tearFlagGlitterBomb._l) + 0x4))) != 0) || + ((uVar2 & GHIDRA_UINT(g_tearFlagGlitterBomb._h)) != 0 || fStack_bc != 0.0)) { fStack_d0 = 1.21493e-42; seed_fart_sound_override((int *)&fStack_d0); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)fStack_d0,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(fStack_d0),1.0,2,0,1.0,0.0); pEVar5 = pEStack_c0; } if (1.5 <= bombScale) { @@ -17845,7 +17845,7 @@ LAB_00781539: if ((pEVar5->_sprite)._animState._animData != (void *)0x0) { AnimationState::AdvancePosition (&(pEVar5->_sprite)._animState, - *(int *)((int)(pEVar5->_sprite)._animState._animData + 0x30) + -1); + *(int *)(GHIDRA_INT((pEVar5->_sprite)._animState._animData) + 0x30) + -1); } *(int *)(pEVar5 + 1) = 0x2d; *(undefined4 *)&(*(undefined1 *)((char *)&(pEVar5[1]) + 0x4)) = 0x2d; @@ -17854,7 +17854,7 @@ LAB_00781539: if (isPartnerGigaBomb == '\0') { fStack_bc = (float)(this->_numGigaBombs - 1); gigaBombsLeft = (int *)&fStack_bc; - if (this->_numBombs <= (int)fStack_bc) { + if (this->_numBombs <= GHIDRA_INT(fStack_bc)) { gigaBombsLeft = &this->_numBombs; } iVar7 = 0; @@ -17920,13 +17920,13 @@ LAB_007819e1: pEVar5[1]._damageEvents._begin = bombRadius; } LAB_00781a4c: - if (((uVar1 & (uint)g_tearFlagFastBomb._l) != 0 || - ((uint)fStack_c4 & g_tearFlagFastBomb._l._4_4_) != 0) || - ((uVar2 & (uint)g_tearFlagFastBomb._h) != 0 || - (uVar3 & g_tearFlagFastBomb._h._4_4_) != 0)) { - rngResult = *(undefined4 *)((int)&pEStack_c0->_flags + 4); - *(uint *)&pEStack_c0->_flags = (uint)pEStack_c0->_flags | 0x4000000; - *(undefined4 *)((int)&pEStack_c0->_flags + 4) = rngResult; + if (((uVar1 & GHIDRA_UINT(g_tearFlagFastBomb._l)) != 0 || + (GHIDRA_UINT(fStack_c4) & (*(undefined4 *)((char *)&(g_tearFlagFastBomb._l) + 0x4))) != 0) || + ((uVar2 & GHIDRA_UINT(g_tearFlagFastBomb._h)) != 0 || + (uVar3 & (*(undefined4 *)((char *)&(g_tearFlagFastBomb._h) + 0x4))) != 0)) { + rngResult = *(undefined4 *)(GHIDRA_INT(&pEStack_c0->_flags) + 4); + *(uint *)&pEStack_c0->_flags = GHIDRA_UINT(pEStack_c0->_flags) | 0x4000000; + *(undefined4 *)(GHIDRA_INT(&pEStack_c0->_flags) + 4) = rngResult; } manager = g_manager; if (bombIndex == 0) { @@ -17943,13 +17943,13 @@ LAB_00781b30: } fStack_d0 = 6.75426e-43; seed_fart_sound_override((int *)&fStack_d0); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)fStack_d0,1.0,4,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(fStack_d0),1.0,4,0,1.0,0.0); manager = g_manager; fStack_d0 = 7.52497e-43; seed_fart_sound_override((int *)&fStack_d0); fVar15 = 0.8; } - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)fStack_d0,1.0,4,0,fVar15,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(fStack_d0),1.0,4,0,fVar15,0.0); } pEStack_c0->Update(); bombIndex = bombIndex + 1; @@ -18049,7 +18049,7 @@ void Entity_Player::trigger_fire_item_effects(Vector *direction, byte isShotFire } if (this->_weapons[0] != (int *)0x0) { weaponFireFn = *(code **)(*(int *)this->_weapons[0] + 0xc); - uVar2 = (uint)this->_flags & 0x4000; + uVar2 = GHIDRA_UINT(this->_flags) & 0x4000; if (uVar2 == 0) { (*weaponFireFn)(direction,_isShotFired,0); return; @@ -18063,7 +18063,7 @@ void Entity_Player::trigger_fire_item_effects(Vector *direction, byte isShotFire weaponSlot = weaponSlot + 1; if (*weaponSlot != (int *)0x0) { apEStack_c[0] = *(Entity_Player **)(*(int *)*weaponSlot + 0xc); - uVar2 = (uint)this->_flags & 0x4000; + uVar2 = GHIDRA_UINT(this->_flags) & 0x4000; if (uVar2 == 0) { isInputDisabledArg = 0; } @@ -18130,7 +18130,7 @@ Entity * Entity_Player::GetActiveWeaponEntity() // 00782a60 uint Entity_Player::CanTurnHead() { - return (uint)this->_headDirectionTime >> 0x1f; + return GHIDRA_UINT(this->_headDirectionTime) >> 0x1f; } // 00782a70 @@ -18288,7 +18288,7 @@ void Entity_Player::Update() local_8 = 0xffffffff; puStack_c = &LAB_00aff534; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(local_24 + 0x20); + local_14 = __security_cookie ^ GHIDRA_UINT((local_24 + 0x20)); ExceptionList = &local_10; local_158.y = 0.0; local_15c = (EntityPtr)0x0; @@ -18376,7 +18376,7 @@ void Entity_Player::Update() else { local_150.y = (float)&this->_twinPlayer; ((EntityPtr *)((EntityPtr *)local_150.y))->EntityPtr::Set(this->_backupPlayer); - ((EntityPtr *)((EntityPtr *)((int)this->_backupPlayer + 0x1e68)))->EntityPtr::Set((Entity *)this); + ((EntityPtr *)((EntityPtr *)(GHIDRA_INT(this->_backupPlayer) + 0x1e68)))->EntityPtr::Set((Entity *)this); *(undefined4 *)((char *)this->_backupPlayer + 0x1e6c) = 0; local_120 = (EntityPtr)this->_controllerIndex; this->_backupPlayer = (void *)0x0; @@ -18391,7 +18391,7 @@ void Entity_Player::Update() iVar5 = EntityPtr::Ref(); *(undefined1 *)(iVar5 + 0x20e8) = 0; } - SetControllerIndex(this,(int)local_120,1); + SetControllerIndex(this,GHIDRA_INT(local_120),1); iVar5 = EntityPtr::Ref(); if (*(char *)(iVar5 + 0x1824) == '\0') { otherPlayer = (Entity_Player *)EntityPtr::Ref(); @@ -18442,7 +18442,7 @@ void Entity_Player::Update() if (*(short *)((char *)this + 0x1d94) != *(short *)((char *)this + 0x1d96)) { *(int *)((char *)this + 0x1574) = *(int *)((char *)this + 0x1574) | 1; *(short *)((char *)this + 0x1d96) = *(short *)((char *)this + 0x1d94); - ((Level *)((Level *)((int)this + 0x1508)))->Level::SetHeartPicked(); + ((Level *)((Level *)(GHIDRA_INT(this) + 0x1508)))->Level::SetHeartPicked(); } cVar3 = FUN_00417390(); if (cVar3 != '\0') { @@ -18459,12 +18459,12 @@ void Entity_Player::Update() } cVar3 = FUN_00417390(); if ((cVar3 == '\0') && (*(int *)((char *)this + 0x34) == 0x388)) { - cVar3 = ((Sprite *)((Sprite *)((int)this + 0x41c)))->Sprite::IsLoaded(); + cVar3 = ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x41c)))->Sprite::IsLoaded(); if (cVar3 == '\0') { ExceptionList = local_10; return; } - ((ANM2 *)((ANM2 *)((int)this + 0x41c)))->ANM2::Update(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x41c)))->ANM2::Update(); ExceptionList = local_10; return; } @@ -18494,9 +18494,9 @@ void Entity_Player::Update() bVar2 = HasTrinket(this,0x67,0); if (bVar2 == 0) { LAB_007831dd: - bVar2 = ((TemporaryEffects *)((TemporaryEffects *)((int)this + 0x1508)))->TemporaryEffects::HasTrinketEffect(0x67); + bVar2 = ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508)))->TemporaryEffects::HasTrinketEffect(0x67); if (bVar2 == 0) goto LAB_0078320d; - ((TemporaryEffects *)((TemporaryEffects *)((int)this + 0x1508)))->TemporaryEffects::RemoveTrinketEffect(0x67,1); + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508)))->TemporaryEffects::RemoveTrinketEffect(0x67,1); } else { iVar5 = GetNumBombs(this); @@ -18505,10 +18505,10 @@ LAB_007831dd: iVar5 = GetNumCoins(this); iVar6 = GetNumKeys(this); if (iVar5 != iVar6) goto LAB_007831dd; - bVar2 = ((TemporaryEffects *)((TemporaryEffects *)((int)this + 0x1508)))->TemporaryEffects::HasTrinketEffect(0x67); + bVar2 = ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508)))->TemporaryEffects::HasTrinketEffect(0x67); if (bVar2 != 0) goto LAB_0078320d; in_stack_fffffdbc = (Vector *)0x7831db; - ((TemporaryEffects *)((TemporaryEffects *)((int)this + 0x1508)))->TemporaryEffects::AddTrinketEffect(0x67,1,1); + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508)))->TemporaryEffects::AddTrinketEffect(0x67,1,1); } AddCacheFlags(this,2); EvaluateItems(this); @@ -18521,17 +18521,17 @@ LAB_0078320d: LAB_0078328a: ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x4000); if (*(EntityPtr *)((char *)this + 0x3c4) != (EntityPtr)0x0) { - local_150.y = ((Vector *)((int)this + 0x334))->x + 0.1; + local_150.y = ((Vector *)(GHIDRA_INT(this) + 0x334))->x + 0.1; local_120 = (EntityPtr)0x3f800000; pEVar7 = (EntityPtr *)std::min(); EVar9 = *(EntityPtr *)((char *)this + 0x3c4); local_120 = *pEVar7; - ((Vector *)((int)this + 0x334))->x = (float)local_120; + ((Vector *)(GHIDRA_INT(this) + 0x334))->x = (float)local_120; vecResult = ((Entity *)((Entity *)EVar9))->Entity::Position(&local_16c); - vecResult = vector_lerp(&scratchVec,(Vector *)((int)this + 0x33c),vecResult,0, + vecResult = vector_lerp(&scratchVec,(Vector *)(GHIDRA_INT(this) + 0x33c),vecResult,0, (float)local_120); - ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::operator_assign(vecResult); - ((Vector *)((Vector *)((int)this + 0x360)))->Vector::operator_assign(&g_vectorZero); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::operator_assign(vecResult); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::operator_assign(&g_vectorZero); ExceptionList = local_10; return; } @@ -18552,9 +18552,9 @@ LAB_0078328a: if (bVar2 != 0) { ((Entity *)((Entity *)this))->Entity::SetTarget((Entity *)local_120); vecResult = ((Entity *)((Entity *)EVar9))->Entity::Position(&local_16c); - ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::operator_assign(vecResult); - ((Vector *)((Vector *)((int)this + 0x360)))->Vector::operator_assign(&g_vectorZero); - ((Vector *)((int)this + 0x334))->x = 1.0; + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::operator_assign(vecResult); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::operator_assign(&g_vectorZero); + ((Vector *)(GHIDRA_INT(this) + 0x334))->x = 1.0; ExceptionList = local_10; return; } @@ -18601,7 +18601,7 @@ LAB_0078328a: if (*(undefined1 *)((char *)this + 0x131c) != '\0') { FUN_007829a0(); } - vecResult = (Vector *)((int)this + 0x33c); + vecResult = (Vector *)(GHIDRA_INT(this) + 0x33c); if (*(Entity **)((char *)this + 0x143c) != (Entity *)0x0) { ((Entity *)(*(Entity **)((char *)this + 0x143c)))->Entity::SetPosition(vecResult); ((Entity *)(*(Entity **)((char *)this + 0x143c)))->Entity::SetVelocity(&g_vectorZero); @@ -18637,7 +18637,7 @@ LAB_0078328a: tmpEntity = (Entity *)EntityPtr::Ref(); ((Entity *)(tmpEntity))->Entity::SetPosition(vecResult); tmpEntity = (Entity *)EntityPtr::Ref(); - ((Entity *)(tmpEntity))->Entity::SetVelocity((Vector *)((int)this + 0x360)); + ((Entity *)(tmpEntity))->Entity::SetVelocity((Vector *)(GHIDRA_INT(this) + 0x360)); } } if (*(Entity **)((char *)this + 0x1e88) != (Entity *)0x0) { @@ -18672,7 +18672,7 @@ LAB_0078328a: *(int *)((char *)this + 0x184) = 3; } else { - *(uint *)((char *)this + 0x184) = (uint)(*(byte *)((char *)this + 0x1570) == 0) * 2 + 3; + *(uint *)((char *)this + 0x184) = GHIDRA_UINT((*(byte *)((char *)this + 0x1570) == 0)) * 2 + 3; } } if (0.0 < *(float *)((char *)this + 0x350)) { @@ -18727,7 +18727,7 @@ LAB_0078328a: bVar2 = HasCollectible(this,0x278,0); if ((bVar2 == 0) && (bVar2 = TemporaryEffects::HasCollectibleEffect - ((TemporaryEffects *)((int)this + 0x1508),0x278), bVar2 == 0)) { + ((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508),0x278), bVar2 == 0)) { local_16c.y = *(float *)((char *)this + 0x1c); } else { @@ -18744,8 +18744,8 @@ LAB_0078328a: } } else { - local_144.y = (float)((uint)local_144.y & 0xffffff00); - std::iterator_copy((std_vector *)((int)this + 8),&local_128); + local_144.y = (float)(GHIDRA_UINT(local_144.y) & 0xffffff00); + std::iterator_copy((std_vector *)(GHIDRA_INT(this) + 8),&local_128); FUN_00456190(); cVar3 = FUN_0042c710(); if (cVar3 != '\0') { @@ -18759,7 +18759,7 @@ LAB_0078328a: ((EntityRef *)((EntityRef *)local_68))->EntityRef::operator_((EntityRef *)(iVar5 + 0x10)); } iVar5 = EntityPtr::Ref(); - local_144.y = (float)((uint)local_144.y & 0xff); + local_144.y = (float)(GHIDRA_UINT(local_144.y) & 0xff); if (*(int *)(iVar5 + 0x18) == 0x3b6) { local_144.y = 1.4013e-45; } @@ -18777,7 +18777,7 @@ LAB_0078328a: *(uint *)((char *)this + 0x18) = *(uint *)((char *)this + 0x18) & 0xffff7fff; *(int *)((char *)this + 0x1ea8) = *(int *)((char *)this + 0x1ea8) + 1; *(undefined4 *)((char *)this + 0x1c) = *(undefined4 *)((char *)this + 0x1c); - if (local_144.y._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_144.y) + 0x0)) == '\0') { ((Entity *)((Entity *)this))->Entity::AddEntityFlags(0x40); sfx = MusicManager::SFXManager(); bVar2 = ((SFXManager *)(sfx))->SFXManager::IsPlaying(0x24e); @@ -18830,7 +18830,7 @@ joined_r0x00783ce0: if (bVar2 == 0) { uVar31 = Random(); in_stack_fffffdbc = &g_vectorZero; - tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x13,(Vector *)((int)this + 0x33c),&g_vectorZero, + tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x13,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero, (Entity *)0x0,0,uVar31); FUN_004316b0(); FUN_004b7070(); @@ -18865,18 +18865,18 @@ joined_r0x00783ce0: ((Entity *)((Entity *)this))->Entity::Update(); bVar2 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x4000); if (bVar2 == 0) { - ((ANM2 *)((ANM2 *)((int)this + 0x41c)))->ANM2::Update(); - bVar2 = ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::IsEventTriggered(&DAT_00b64ba4); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x41c)))->ANM2::Update(); + bVar2 = ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::IsEventTriggered(&DAT_00b64ba4); if (bVar2 != 0) { uVar31 = Random(); in_stack_fffffdbc = &g_vectorZero; spawnedEffect = (Entity_Effect *) - ((Game *)(g_game))->Game::Spawn(1000,0xc,(Vector *)((int)this + 0x33c),&g_vectorZero,(Entity *)0x0,10, + ((Game *)(g_game))->Game::Spawn(1000,0xc,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero,(Entity *)0x0,10, uVar31); ((Entity_Effect *)(spawnedEffect))->Entity_Effect::FollowParent((Entity *)player); set_field_358(spawnedEffect,-10.0); - vecResult = (Vector *)((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::Scale(); + vecResult = (Vector *)((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::Scale(); ((Entity *)((Entity *)spawnedEffect))->Entity::SetSpriteScale(vecResult); vecResult = (Vector *)((Entity *)((Entity *)spawnedEffect))->Entity::SpriteScale(); vecResult2 = ((Vector *)(&local_16c))->Vector::Vector(0.0,-20.0); @@ -18915,23 +18915,23 @@ joined_r0x00783ce0: } } if ((*(byte *)((char *)this + 0x1398) != 0) && - (bVar2 = ((ANM2 *)((ANM2 *)((int)this + 0x48)))->ANM2::IsFinishedImpl(&s_empty), bVar2 != 0)) { + (bVar2 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x48)))->ANM2::IsFinishedImpl(&s_empty), bVar2 != 0)) { *(byte *)((char *)this + 0x1398) = 0; } ((Game *)(g_game))->Game::GetField26614(); cVar3 = DeathmatchManager::is_active(); if ((cVar3 != '\0') && - (bVar2 = ((ANM2 *)((ANM2 *)((int)this + 0x48)))->ANM2::IsFinishedImpl((byte *)"LightTravel"), bVar2 != 0)) { + (bVar2 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x48)))->ANM2::IsFinishedImpl((byte *)"LightTravel"), bVar2 != 0)) { FUN_0044bf90(); } if ((*(byte *)((char *)this + 0x1399) != 0) && (*(byte *)((char *)this + 0x1398) == 0)) { *(byte *)((char *)this + 0x1399) = 0; bVar2 = HasCollectible(this,0x23f,0); if ((bVar2 != 0) && - (bVar2 = ((TemporaryEffects *)((TemporaryEffects *)((int)this + 0x1508)))->TemporaryEffects::HasNullEffect(0x37), + (bVar2 = ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508)))->TemporaryEffects::HasNullEffect(0x37), bVar2 == 0)) { local_150.y = 1.4013e-45; - local_120 = (EntityPtr)(int)(5.0 - *(float *)((char *)this + 0x156c)); + local_120 = (EntityPtr)GHIDRA_INT((5.0 - *(float *)((char *)this + 0x156c))); puVar12 = (uint *)std::max(); uVar31 = *puVar12; if (*(int *)((char *)this + 0x1344) < 2) { @@ -18945,18 +18945,18 @@ joined_r0x00783ce0: fVar32 = 1.0; vecResult = &g_vectorZero; ::((Color *)((Color *)(local_f0 + 0x2c)))->Color::Color(); - spawn_gibs((Vector *)((int)this + 0x33c),0xe,40.0,(uint *)&DAT_00b6bc94,(Entity *)this,color + spawn_gibs((Vector *)(GHIDRA_INT(this) + 0x33c),0xe,40.0,(uint *)&DAT_00b6bc94,(Entity *)this,color ,vecResult,fVar32); iVar5 = Isaac::Random(3); iVar5 = iVar5 + 1; if (0 < iVar5) { do { - ThrowBlueSpider(this,(Vector *)((int)this + 0x33c),&g_vectorZero); + ThrowBlueSpider(this,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero); iVar5 = iVar5 + -1; } while (iVar5 != 0); } in_stack_fffffdbc = (Vector *)0x784279; - ((TemporaryEffects *)((TemporaryEffects *)((int)this + 0x1508)))->TemporaryEffects::AddNullEffect(0x37,1,1); + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508)))->TemporaryEffects::AddNullEffect(0x37,1,1); EvaluateItems(this); } } @@ -18995,7 +18995,7 @@ LAB_0078438c: uVar8 = ((EntityList *)((EntityList *)local_130))->EntityList::Size(); } while (uVar31 < uVar8); pAVar21 = (ANM2 *)local_144.y; - if ((uint)local_144.y < (ANM2 *)0xc) goto LAB_0078438c; + if (GHIDRA_UINT(local_144.y) < (ANM2 *)0xc) goto LAB_0078438c; LAB_0078439a: if (((ANM2 *)&DAT_00000013 < pAVar21) || (iVar5 = Isaac::Random(5), iVar5 != 0)) goto LAB_007845eb; @@ -19050,11 +19050,11 @@ LAB_0078439a: } LAB_007845eb: if (((*(byte *)((char *)this + 0x139a) != 0) && - (bVar2 = ((ANM2 *)((ANM2 *)((int)this + 0x41c)))->ANM2::IsFinishedImpl(&s_empty), bVar2 != 0)) && - (bVar2 = ((ANM2 *)((ANM2 *)((int)this + 0x41c)))->ANM2::IsFinishedImpl((byte *)"LiftItem"), bVar2 == 0)) { + (bVar2 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x41c)))->ANM2::IsFinishedImpl(&s_empty), bVar2 != 0)) && + (bVar2 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x41c)))->ANM2::IsFinishedImpl((byte *)"LiftItem"), bVar2 == 0)) { *(byte *)((char *)this + 0x139a) = 0; - ((ANM2 *)((ANM2 *)((int)this + 0x41c)))->ANM2::Reset(); - ((ANM2 *)((ANM2 *)((int)this + 0xff8)))->ANM2::Reset(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x41c)))->ANM2::Reset(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0xff8)))->ANM2::Reset(); } update_pitfall(this); bVar2 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x4000); @@ -19075,7 +19075,7 @@ LAB_007845eb: local_8 = 3; local_128 = (RNG *)rng_vector_at(); FUN_00424510(); - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; local_129 = 0; iVar5 = 0; local_122 = 0; @@ -19365,7 +19365,7 @@ LAB_00785224: } LAB_007852b2: FUN_005cbe20(); - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; local_158.y = 0.0; pLVar14 = (Level *)Config::GetCollectibles(); iVar5 = ((Level *)(pLVar14))->Level::GetRoomCount(); @@ -19385,7 +19385,7 @@ LAB_007852b2: if (iVar6 != 0) { do { piVar15 = (int *)FUN_0042c810(); - if (*(int *)((int)*(void **)((char *)local_130 + 0x10) + 8) == *piVar15) { + if (*(int *)(GHIDRA_INT(*(void **)((char *)local_130 + 0x10)) + 8) == *piVar15) { local_144.y = *(float *)local_130; std::set::find(); std::iterator_copy(&local_17c,&local_120); @@ -19415,17 +19415,17 @@ LAB_007852b2: } } iVar5 = iVar5 + 0xb8; - puVar19 = (undefined1 *)((int)local_158.y + 1); + puVar19 = (undefined1 *)(GHIDRA_INT(local_158.y) + 1); local_158.y = (float)puVar19; pLVar14 = (Level *)Config::GetCollectibles(); iVar6 = ((Level *)(pLVar14))->Level::GetRoomCount(); - } while ((int)puVar19 < iVar6); + } while (GHIDRA_INT(puVar19) < iVar6); this = player; } iVar5 = 0; - iVar6 = ((std::vector *)((void *)((int)&local_1a0._l + 4)))->std::vector::size(); + iVar6 = ((std::vector *)((void *)(GHIDRA_INT(&local_1a0._l) + 4)))->std::vector::size(); if (iVar6 != 0) { - uVar31 = ((std::vector *)((void *)((int)&local_1a0._l + 4)))->std::vector::size(); + uVar31 = ((std::vector *)((void *)(GHIDRA_INT(&local_1a0._l) + 4)))->std::vector::size(); ((RNG *)(local_128))->RNG::RandomInt(uVar31); piVar15 = (int *)FUN_0042c810(); iVar5 = *piVar15; @@ -19453,23 +19453,23 @@ LAB_007854cf: else { in_stack_fffffdbc = (Vector *)0x1a3; } - UseActiveItem(this,(short *)((int)&local_128 + 2),(int)in_stack_fffffdbc,1,-1,0); + UseActiveItem(this,(short *)(GHIDRA_INT(&local_128) + 2),GHIDRA_INT(in_stack_fffffdbc),1,-1,0); } FUN_00424420(); FID_conflict__Tidy(local_24 + 4); local_8 = 0xffffffff; - FID_conflict__Tidy((void *)((int)&local_1a0._l + 4)); + FID_conflict__Tidy((void *)(GHIDRA_INT(&local_1a0._l) + 4)); } } else { iVar5 = GetTrinketMultiplier(this,4); if ((float)iVar5 <= 1.0) { in_stack_fffffdbc = (Vector *)&DAT_0000002c; - UseActiveItem(this,(short *)((int)&local_128 + 2),0x2c,1,-1,0); + UseActiveItem(this,(short *)(GHIDRA_INT(&local_128) + 2),0x2c,1,-1,0); } else { in_stack_fffffdbc = (Vector *)0x1a3; - UseActiveItem(this,(short *)((int)&local_128 + 2),0x1a3,1,-1,0); + UseActiveItem(this,(short *)(GHIDRA_INT(&local_128) + 2),0x1a3,1,-1,0); } } *(byte *)((char *)this + 0x13b6) = 0; @@ -19477,9 +19477,9 @@ LAB_007854cf: } } } - activeDesc = (ActiveItemDesc *)((int)this + 0x15a0); + activeDesc = (ActiveItemDesc *)(GHIDRA_INT(this) + 0x15a0); local_120 = (EntityPtr)activeDesc; - if (((((ActiveItemDesc *)((int)this + 0x15a0))->_item != 0) && + if (((((ActiveItemDesc *)(GHIDRA_INT(this) + 0x15a0))->_item != 0) && (bVar2 = HasCollectible(this,0x216,0), bVar2 == 0)) && (cVar3 = IsCoopGhost(this), cVar3 == '\0')) { FUN_005b19d0(); @@ -19495,12 +19495,12 @@ LAB_007854cf: FUN_005b1920(); in_stack_fffffdbc = (Vector *)this->_activeDesc[1]._item; activeDesc = this->_activeDesc + 1; - RemoveCollectible(this,(uint)in_stack_fffffdbc,0,1,1); + RemoveCollectible(this,GHIDRA_UINT(in_stack_fffffdbc),0,1,1); FUN_005b19d0(); } bVar2 = HasCollectible(this,0x3b,0); if ((bVar2 != 0) && (cVar3 = FUN_007da770(), cVar3 == '\0')) { - local_120 = (EntityPtr)((int)this + 0x16c8); + local_120 = (EntityPtr)(GHIDRA_INT(this) + 0x16c8); puVar11 = (undefined4 *)FUN_0042c810(); *puVar11 = 0; local_130 = (EntityPtr)0x1; @@ -19511,9 +19511,9 @@ LAB_007854cf: *piVar15 = *piVar15 + 1; } this = player; - local_130 = (EntityPtr)((int)local_130 + -1); + local_130 = (EntityPtr)(GHIDRA_INT(local_130) + -1); activeDesc = activeDesc + -1; - } while (-1 < (int)local_130); + } while (-1 < GHIDRA_INT(local_130)); UpdateBookOfVirtues(player,0); } ((Game *)(g_game))->Game::GetField26614(); @@ -19521,13 +19521,13 @@ LAB_007854cf: if (((cVar3 != '\0') && (*(int *)((char *)this + 0x2c) == 0)) && ((bVar2 = HasCollectible(this,0x1f1,0), bVar2 != 0 && (bVar2 = TemporaryEffects::HasCollectibleEffect - ((TemporaryEffects *)((int)this + 0x1508),0x1f1), bVar2 == 0)))) { + ((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508),0x1f1), bVar2 == 0)))) { uVar29 = get_time_ms(); elapsedMs = uVar29 - (longlong)*(int *)((char *)this + 0x1f90); local_16c.y = (float)((ulonglong)elapsedMs >> 0x20); - if ((local_16c.y != 0.0) || (15000 < (uint)elapsedMs)) { + if ((local_16c.y != 0.0) || (15000 < GHIDRA_UINT(elapsedMs))) { in_stack_fffffdbc = (Vector *)0x78577d; - ((TemporaryEffects *)((TemporaryEffects *)((int)this + 0x1508)))->TemporaryEffects::AddCollectibleEffect(0x1f1,1,1); + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508)))->TemporaryEffects::AddCollectibleEffect(0x1f1,1,1); uVar31 = 0; pvVar16 = (void *)((Game *)(g_game))->Game::GetPlayerManager(); iVar5 = ((std::vector *)(pvVar16))->std::vector::size(); @@ -19575,7 +19575,7 @@ LAB_007854cf: bVar22 = bVar2 < (byte)*pcVar20; if (bVar2 != *pcVar20) { LAB_007858c0: - uVar31 = -(uint)bVar22 | 1; + uVar31 = -GHIDRA_UINT(bVar22) | 1; goto LAB_007858c5; } if (bVar2 == 0) break; @@ -19599,7 +19599,7 @@ LAB_007858c5: bVar22 = bVar2 < (byte)*pcVar20; if (bVar2 != *pcVar20) { LAB_00785910: - uVar31 = -(uint)bVar22 | 1; + uVar31 = -GHIDRA_UINT(bVar22) | 1; goto LAB_00785915; } if (bVar2 == 0) break; @@ -19617,22 +19617,22 @@ LAB_00785915: } } if (*(void **)((char *)this + 0x1410) != (Entity *)0x0) { - ((Entity *)(*(void **)((char *)this + 0x1410)))->Entity::SetPosition((Vector *)((int)this + 0x33c)); - ((Entity *)(*(void **)((char *)this + 0x1410)))->Entity::SetVelocity((Vector *)((int)this + 0x360)); + ((Entity *)(*(void **)((char *)this + 0x1410)))->Entity::SetPosition((Vector *)(GHIDRA_INT(this) + 0x33c)); + ((Entity *)(*(void **)((char *)this + 0x1410)))->Entity::SetVelocity((Vector *)(GHIDRA_INT(this) + 0x360)); bVar2 = ((Entity *)(*(void **)((char *)this + 0x1410)))->Entity::is_player(); if (bVar2 != 0) { pvVar16 = *(void **)((char *)this + 0x1410); - layerFrame = ((ANM2 *)((ANM2 *)((int)this + 0x41c)))->ANM2::GetLayerFrame(0); + layerFrame = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x41c)))->ANM2::GetLayerFrame(0); if ((layerFrame != (void *)0x0) || ((1 < *(int *)((char *)this + 0x1f2c) && - (layerFrame = ((ANM2 *)((ANM2 *)((int)this + 0x48)))->ANM2::GetLayerFrame(0), + (layerFrame = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x48)))->ANM2::GetLayerFrame(0), layerFrame != (void *)0x0)))) { FUN_0067f2e0(); *(float *)((char *)pvVar16 + 0x350) = local_16c.y * *(float *)((char *)this + 0x14f4); } } } - tempEffects = (TemporaryEffects *)((int)this + 0x1508); + tempEffects = (TemporaryEffects *)(GHIDRA_INT(this) + 0x1508); bVar2 = ((TemporaryEffects *)(tempEffects))->TemporaryEffects::HasCollectibleEffect(0x1f1); if (bVar2 != 0) { in_stack_fffffdbc = (Vector *)0x7859db; @@ -19675,7 +19675,7 @@ joined_r0x00785a7e: ::((Color *)((Color *)(local_f0 + 0x2c)))->Color::Color(); ((Entity *)((Entity *)this))->Entity::MakeGroundPoofAtSelf(color_00,0.8); in_stack_fffffdbc = (Vector *)g_tearFlagsNone._l; - Game::DamageRadius((Vector *)((int)this + 0x33c),(Entity *)this,0,0,0,50.0,g_tearFlagsNone, + Game::DamageRadius((Vector *)(GHIDRA_INT(this) + 0x33c),(Entity *)this,0,0,0,50.0,g_tearFlagsNone, 15.0,80.0); *(int *)((char *)this + 0x1574) = *(int *)((char *)this + 0x1574) | tempEffects->_cacheFlags; EvaluateItems(this); @@ -19701,7 +19701,7 @@ LAB_00785bc0: bVar2 = ((TemporaryEffects *)(tempEffects))->TemporaryEffects::HasCollectibleEffect(0x1de); if (((bVar2 == 0) || (*(short *)((char *)this + 0x2ed2) != 0)) && (iVar5 == 0)) goto LAB_00785bc0; - ((Vector *)((Vector *)((int)this + 0x360)))->Vector::operator_assign(&g_vectorZero); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::operator_assign(&g_vectorZero); } EVar9 = (EntityPtr)((Entity *)((Entity *)*(EntityPtr *)((char *)this + 0x3bc)))->Entity::ToPlayer(); local_158.y = (float)EVar9; @@ -19723,14 +19723,14 @@ LAB_00785bc0: iVar5 = ((Game *)(g_game))->Game::GetNumPlayers(); if (iVar5 != 0) { do { - local_120 = (EntityPtr)((Game *)(g_game))->Game::GetPlayer((uint)pAVar21); + local_120 = (EntityPtr)((Game *)(g_game))->Game::GetPlayer(GHIDRA_UINT(pAVar21)); if (local_120 != (EntityPtr)this) { if (local_120 != (EntityPtr)local_158.y) { EVar9 = (EntityPtr)((Entity *)((Entity *)local_120))->Entity::Parent(); if (EVar9 != (EntityPtr)local_158.y) goto LAB_00785d5e; } vecResult = ((Entity *)((Entity *)local_120))->Entity::Position(&local_16c); - ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::__sub(&scratchVec,vecResult); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::__sub(&scratchVec,vecResult); local_130 = (EntityPtr)((Vector *)(&scratchVec))->Vector::LengthSquared(); bVar2 = ((Vector *)(&scratchVec))->Vector::operator_ne(&g_vectorZero); if ((bVar2 != 0) && ((float)local_130 < 144.0)) { @@ -19745,7 +19745,7 @@ LAB_00785d5e: pAVar21 = (ANM2 *)((pAVar21->_filename)._buf + 1); local_144.y = (float)pAVar21; numPlayers = ((Game *)(g_game))->Game::GetNumPlayers(); - } while (pAVar21 < (uint)numPlayers); + } while (pAVar21 < GHIDRA_UINT(numPlayers)); } local_120 = (EntityPtr)((Vector *)(&local_17c))->Vector::Length(); if (2.0 < (float)local_120) { @@ -19766,7 +19766,7 @@ LAB_00785d5e: } } else { - local_174.x = ((Vector *)((int)this + 0x1630))->x; + local_174.x = ((Vector *)(GHIDRA_INT(this) + 0x1630))->x; local_174.y = *(float *)((char *)this + 0x1634); iVar5 = FUN_007826c0(); if ((iVar5 == 0) && @@ -19782,11 +19782,11 @@ LAB_00785d5e: tractorBeam = (Entity_NPC *)__RTDynamicCast(); if (*(int *)((char *)this + 0x1430) == 0) { uVar31 = Random(); - ((Game *)(g_game))->Game::Spawn(7,7,(Vector *)((int)this + 0x33c),&g_vectorZero,(Entity *)this,0,uVar31); + ((Game *)(g_game))->Game::Spawn(7,7,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero,(Entity *)this,0,uVar31); tractorBeam = (Entity_NPC *)__RTDynamicCast(); ((Entity *)((Entity *)tractorBeam))->Entity::SetParent((Entity *)this); tractorBeam->Update(); - ((EntityPtr *)((EntityPtr *)((int)this + 0x1430)))->EntityPtr::SetReference((Entity *)tractorBeam); + ((EntityPtr *)((EntityPtr *)(GHIDRA_INT(this) + 0x1430)))->EntityPtr::SetReference((Entity *)tractorBeam); } local_120 = (EntityPtr)0x41400000; vecResult = ((Vector *)(&local_174))->Vector::__mul(&local_16c,(float *)&local_120); @@ -19812,7 +19812,7 @@ LAB_00785d5e: piVar15 = (int *)std::max(); *(int *)((char *)this + 0x1338) = *piVar15; } - local_144.y = (float)((uint)local_144.y & 0xffffff00); + local_144.y = (float)(GHIDRA_UINT(local_144.y) & 0xffffff00); bVar2 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x4000); if (bVar2 == 0) { ((Game *)(g_game))->Game::GetField26614(); @@ -19820,7 +19820,7 @@ LAB_00785d5e: if ((cVar3 != '\0') && (*(short *)((char *)this + 0x2ed2) != 0)) { sVar4 = *(short *)((char *)this + 0x2ed2) + -1; *(short *)((char *)this + 0x2ed2) = sVar4; - local_144.y = (float)((uint)local_144.y & 0xff); + local_144.y = (float)(GHIDRA_UINT(local_144.y) & 0xff); if (sVar4 == 0) { local_144.y = 1.4013e-45; } @@ -19831,7 +19831,7 @@ LAB_00785d5e: bVar2 = ((TemporaryEffects *)(tempEffects))->TemporaryEffects::HasCollectibleEffect(0x1de); if (((bVar2 != 0) && ((*(int *)((char *)this + 0x162c) != -1 || ((*(byte *)((char *)this + 0x1378) & 4) != 0)))) || - (local_144.y._0_1_ != '\0')) { + ((*(undefined1 *)((char *)&(local_144.y) + 0x0)) != '\0')) { ((Level *)((Level *)g_game))->Level::GetCurrentRoom(); tempEffects = (TemporaryEffects *)FUN_004360d0(); ((TemporaryEffects *)(tempEffects))->TemporaryEffects::RemoveCollectibleEffect(0x1de,1); @@ -19852,7 +19852,7 @@ LAB_00785d5e: itemConfig = Isaac::GetItemConfig(); itemCfg = ((Config *)(itemConfig))->Config::GetNullItem(4); RemoveCostume(this,itemCfg); - *(float *)((char *)this + 0x37c) = *(float *)((int)*(void **)((char *)this + 0x330) + 0x44); + *(float *)((char *)this + 0x37c) = *(float *)(GHIDRA_INT(*(void **)((char *)this + 0x330)) + 0x44); } *(int *)((char *)this + 0x1374) = 0; } @@ -19869,7 +19869,7 @@ LAB_00785d5e: *(float *)((char *)this + 0x37c) = 1000.0; uVar31 = Random(); in_stack_fffffdbc = (Vector *)0x0; - ((Game *)(g_game))->Game::Spawn(1000,0xf,(Vector *)((int)this + 0x33c),&g_vectorZero,(Entity *)this,2, + ((Game *)(g_game))->Game::Spawn(1000,0xf,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero,(Entity *)this,2, uVar31); tmpEntity = (Entity *)__RTDynamicCast(); this = player; @@ -19888,9 +19888,9 @@ LAB_00785d5e: } } if (*(float *)((char *)this + 0x37c) != 1000.0) { - *(float *)((char *)this + 0x37c) = *(float *)((int)*(void **)((char *)this + 0x330) + 0x44); + *(float *)((char *)this + 0x37c) = *(float *)(GHIDRA_INT(*(void **)((char *)this + 0x330)) + 0x44); } - pLVar14 = (Level *)((int)this + 0x1508); + pLVar14 = (Level *)(GHIDRA_INT(this) + 0x1508); bVar2 = ((TemporaryEffects *)((TemporaryEffects *)pLVar14))->TemporaryEffects::HasCollectibleEffect(0x251); if (((bVar2 == 0) && (*(int *)((char *)this + 0x1888) < 1)) && (bVar2 = ((TemporaryEffects *)((TemporaryEffects *)pLVar14))->TemporaryEffects::HasCollectibleEffect(0x2ca), @@ -19947,7 +19947,7 @@ LAB_00785d5e: vecResult2 = Vector::operator_mul(&local_144,&local_150.y,&local_13c); vecResult = ((Vector *)(vecResult))->Vector::__sub(&local_158,vecResult2); tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,99,vecResult,in_stack_fffffdbc,(Entity *)0x0,1, - (uint)local_164.y); + GHIDRA_UINT(local_164.y)); vecResult = (Vector *)((Entity *)(tmpEntity))->Entity::SpriteScale(); fVar32 = random_float(); local_164.y = fVar32 * 1.5 + 1.0; @@ -19971,7 +19971,7 @@ LAB_00785d5e: vecResult2 = Vector::operator_mul(&local_144,&local_150.y,&local_13c); vecResult = ((Vector *)(vecResult))->Vector::__sub(&local_158,vecResult2); tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x3a,vecResult,in_stack_fffffdbc,(Entity *)0x0,0, - (uint)local_164.y); + GHIDRA_UINT(local_164.y)); tmpEntity->Update(); } iVar5 = Isaac::Random(5); @@ -19989,7 +19989,7 @@ LAB_00785d5e: vecResult = ((Vector *)(vecResult))->Vector::__sub(&local_190,vecResult2); projectile = (Entity_Projectile *) ((Game *)(g_game))->Game::Spawn(9,5,vecResult,in_stack_fffffdbc,(Entity *)player,0, - (uint)local_164.y); + GHIDRA_UINT(local_164.y)); uVar31 = 0x80; ((Game *)(g_game))->Game::GetField26614(); cVar3 = DeathmatchManager::is_active(); @@ -20006,10 +20006,10 @@ LAB_00785d5e: } bVar2 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x4000); if (bVar2 == 0) { - ((ANM2 *)((ANM2 *)((int)this + 0xff8)))->ANM2::Update(); - ((ANM2 *)((ANM2 *)((int)this + 0x530)))->ANM2::Update(); - ((ANM2 *)((ANM2 *)((int)this + 0x644)))->ANM2::Update(); - pAVar21 = (ANM2 *)((int)this + 0x758); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0xff8)))->ANM2::Update(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x530)))->ANM2::Update(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x644)))->ANM2::Update(); + pAVar21 = (ANM2 *)(GHIDRA_INT(this) + 0x758); iVar5 = 7; do { ((ANM2 *)(pAVar21))->ANM2::Update(); @@ -20019,30 +20019,30 @@ LAB_00785d5e: } while (iVar5 != 0); ((ANM2 *)(&player->_bloodGushSprite))->ANM2::Update(); } - local_120 = (EntityPtr)((int)this + 0x48); + local_120 = (EntityPtr)(GHIDRA_INT(this) + 0x48); vecResult = (Vector *)((Sprite *)((Sprite *)local_120))->Sprite::Scale(); - ((Sprite *)((Sprite *)((int)this + 0x530)))->Sprite::SetScale(vecResult); - vecResult = (Vector *)((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::Scale(); - ((Sprite *)((Sprite *)((int)this + 0x644)))->Sprite::SetScale(vecResult); - vecResult = (Vector *)((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::Scale(); - ((Sprite *)((Sprite *)((int)this + 0xee4)))->Sprite::SetScale(vecResult); - BVar27._0_12_ = ZEXT812(0x42700000); - BVar27._h._4_4_ = 0; + ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x530)))->Sprite::SetScale(vecResult); + vecResult = (Vector *)((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::Scale(); + ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x644)))->Sprite::SetScale(vecResult); + vecResult = (Vector *)((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::Scale(); + ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0xee4)))->Sprite::SetScale(vecResult); + (*(undefined1 *)((char *)&(BVar27) + 0x0)) = ZEXT812(0x42700000); + (*(undefined4 *)((char *)&(BVar27._h) + 0x4)) = 0; local_150.y = (float)BVar27._l; if ((*(int *)((char *)this + 0x2c) == 0) && (*(byte *)((char *)this + 0x20a9) == 0)) { - ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::SetScale((Vector *)((int)this + 0x14f0)); - cVar3 = ((Sprite *)((Sprite *)((int)this + 0x41c)))->Sprite::IsLoaded(); + ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::SetScale((Vector *)(GHIDRA_INT(this) + 0x14f0)); + cVar3 = ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x41c)))->Sprite::IsLoaded(); if ((cVar3 != '\0') && - ((bVar2 = ((ANM2 *)((ANM2 *)((int)this + 0x41c)))->ANM2::IsPlaying(&s_empty), bVar2 != 0 && - (pvVar16 = ((Sprite *)((Sprite *)((int)this + 0x41c)))->Sprite::GetNullFrame((byte *)"ItemWalk"), + ((bVar2 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x41c)))->ANM2::IsPlaying(&s_empty), bVar2 != 0 && + (pvVar16 = ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x41c)))->Sprite::GetNullFrame((byte *)"ItemWalk"), pvVar16 != (void *)0x0)))) { - vecResult = (Vector *)((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::Scale(); - vecResult = ((Vector *)(vecResult))->Vector::Mul(&local_13c,(Vector *)((int)pvVar16 + 0x10)); - ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::SetScale(vecResult); + vecResult = (Vector *)((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::Scale(); + vecResult = ((Vector *)(vecResult))->Vector::Mul(&local_13c,(Vector *)(GHIDRA_INT(pvVar16) + 0x10)); + ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::SetScale(vecResult); } local_16c.x = g_vectorOne.x; local_16c.y = g_vectorOne.y; - if ((-1 < ((PlayerCostumeMap *)((int)this + 0x126c))->_index) && + if ((-1 < ((PlayerCostumeMap *)(GHIDRA_INT(this) + 0x126c))->_index) && ((iVar5 = FUN_005cbd10(), *(int *)(iVar5 + 0x114) == 0 || ((iVar5 = FUN_005cbd10(), *(int *)(*(int *)(iVar5 + 0x114) + 4) != 0x256 && (iVar5 = FUN_005cbd10(), *(int *)(*(int *)(iVar5 + 0x114) + 4) != 0x2b0)))))) { @@ -20071,7 +20071,7 @@ LAB_00785d5e: bVar2 = HasCollectible(this,0x1ed,0); if (((bVar2 != 0) || (bVar2 = TemporaryEffects::HasCollectibleEffect - ((TemporaryEffects *)((int)this + 0x1508),0x1ed), bVar2 != 0)) && + ((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508),0x1ed), bVar2 != 0)) && (bVar2 = IsExtraAnimationFinished(this), bVar2 != 0)) { uVar31 = ((*(int *)((char *)this + 0x1d88) * 2 - *(int *)((char *)this + 0x1344)) + *(int *)((char *)this + 0x1340)) / 2; @@ -20080,35 +20080,35 @@ LAB_00785d5e: if (cVar3 != '\0') { uVar31 = uVar31 >> 2; } - local_164.y = (float)(int)uVar31 / 24.0; + local_164.y = (float)GHIDRA_INT(uVar31) / 24.0; local_190.y = 1.0 - (1.0 - local_164.y) * (1.0 - local_164.y); fVar32 = local_164.y * 9.0 * local_164.y + 1.0; local_144.y = ((fVar32 + fVar32) * 3.1415927) / 30.0; iVar5 = ((Game *)(g_game))->Game::GetFrameCount(); local_130 = (EntityPtr)(local_190.y * 0.5); - auVar26 = ZEXT416((uint)((float)iVar5 * local_144.y)); + auVar26 = ZEXT416(GHIDRA_UINT(((float)iVar5 * local_144.y))); FUN_00417150(); - fVar32 = (auVar26._0_4_ * 0.5 + 0.5) * 1.2; + fVar32 = ((*(undefined4 *)((char *)&(auVar26) + 0x0)) * 0.5 + 0.5) * 1.2; pow_wrapper(); local_158.y = (fVar32 - 0.2) * (float)local_130 + 1.0; iVar5 = ((Game *)(g_game))->Game::GetFrameCount(); - auVar26 = ZEXT416((uint)((float)(iVar5 + -3) * local_144.y)); + auVar26 = ZEXT416(GHIDRA_UINT(((float)(iVar5 + -3) * local_144.y))); FUN_00417150(); - fVar32 = (auVar26._0_4_ * 0.5 + 0.5) * 1.2; + fVar32 = ((*(undefined4 *)((char *)&(auVar26) + 0x0)) * 0.5 + 0.5) * 1.2; pow_wrapper(); fVar32 = (fVar32 - 0.2) * local_164.y * local_164.y; local_148 = (std_string *)((1.0 / local_158.y - 1.0) * 0.5 + 1.0 + fVar32); local_128 = (RNG *)(fVar32 * 0.5 + local_158.y); iVar5 = ((Game *)(g_game))->Game::GetFrameCount(); - auVar26 = ZEXT416((uint)((float)(iVar5 + 10) * local_144.y)); + auVar26 = ZEXT416(GHIDRA_UINT(((float)(iVar5 + 10) * local_144.y))); FUN_00417150(); - fVar32 = (auVar26._0_4_ * 0.5 + 0.5) * 1.2; + fVar32 = ((*(undefined4 *)((char *)&(auVar26) + 0x0)) * 0.5 + 0.5) * 1.2; pow_wrapper(); local_158.y = (fVar32 - 0.2) * (float)local_130; iVar5 = ((Game *)(g_game))->Game::GetFrameCount(); - auVar26 = ZEXT416((uint)((float)(iVar5 + 0x14) * local_144.y)); + auVar26 = ZEXT416(GHIDRA_UINT(((float)(iVar5 + 0x14) * local_144.y))); FUN_00417150(); - fVar32 = (auVar26._0_4_ * 0.5 + 0.5) * 1.2; + fVar32 = ((*(undefined4 *)((char *)&(auVar26) + 0x0)) * 0.5 + 0.5) * 1.2; pow_wrapper(); local_190.y = (fVar32 - 0.2) * local_190.y * 0.1 + 1.0; local_188 = 1.0 / local_190.y; @@ -20117,7 +20117,7 @@ LAB_00785d5e: local_174.x = g_vectorZero.x; scratchVec.y = g_vectorOne.y; local_174.y = g_vectorZero.y; - if (-1 < ((PlayerCostumeMap *)((int)this + 0x123c))->_index) { + if (-1 < ((PlayerCostumeMap *)(GHIDRA_INT(this) + 0x123c))->_index) { sprite = (Sprite *)FUN_005cbd10(); vecResult = ((Sprite *)(sprite))->Sprite::GetNullFrame((byte *)"HeadTransform"); if ((vecResult != (Vector *)0x0) && (*(char *)&vecResult[1].y != '\0')) { @@ -20134,14 +20134,14 @@ LAB_00785d5e: } } } - ((Entity *)((Entity *)((int)this + 0x48)))->Entity::AddFlagsLow(); + ((Entity *)((Entity *)(GHIDRA_INT(this) + 0x48)))->Entity::AddFlagsLow(); ::((Color *)((Color *)local_f0))->Color::Color(); ::((Color *)((Color *)local_98))->Color::Color(); bVar2 = HasCollectible(this,0xca,0); if ((bVar2 != 0) && (((bVar2 = HasCollectible(this,0xd2,0), bVar2 != 0 && (*(float *)((char *)this + 0x37c) == 1000.0)) || - (bVar2 = ((TemporaryEffects *)((TemporaryEffects *)((int)this + 0x1508)))->TemporaryEffects::HasNullEffect(0x3b), + (bVar2 = ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508)))->TemporaryEffects::HasNullEffect(0x3b), bVar2 != 0)))) { if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < DAT_00c811c8) && (_Init_thread_header(), DAT_00c811c8 == -1)) { @@ -20179,7 +20179,7 @@ LAB_00786ffb: } if ((0 < *(int *)((char *)this + 0x1ae8)) || (iVar5 = TemporaryEffects::GetCollectibleEffectNum - ((TemporaryEffects *)((int)this + 0x1508),699), iVar5 == 4)) { + ((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508),699), iVar5 == 4)) { iVar5 = ((Game *)(g_game))->Game::GetFrameCount(); sinf_wrapper((float)iVar5 * 0.2); ::((Color *)((Color *)(local_98 + 0x2c)))->Color::Color(); @@ -20226,24 +20226,24 @@ LAB_00786ffb: tmpColor = (ColorMod *)::((Color *)())->Color::Color(); ::((Color *)((Color *)local_f0))->Color::__mul(tmpColor); } - pvVar16 = ((TemporaryEffects *)((TemporaryEffects *)((int)this + 0x1508)))->TemporaryEffects::GetNullEffect(0x3f); - if ((pvVar16 != (void *)0x0) && (uVar31 = *(uint *)((char *)pvVar16 + 8), (int)uVar31 < 0x5a)) { + pvVar16 = ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508)))->TemporaryEffects::GetNullEffect(0x3f); + if ((pvVar16 != (void *)0x0) && (uVar31 = *(uint *)((char *)pvVar16 + 8), GHIDRA_INT(uVar31) < 0x5a)) { fVar32 = (float)(uVar31 & 0x8000000f); - if ((int)fVar32 < 0) { - fVar32 = (float)(((int)fVar32 - 1U | 0xfffffff0) + 1); + if (GHIDRA_INT(fVar32) < 0) { + fVar32 = (float)((GHIDRA_INT(fVar32) - 1U | 0xfffffff0) + 1); } local_164.y = (float)(uVar31 & 0x80000007); - if ((int)local_164.y < 0) { - local_164.y = (float)(((int)local_164.y - 1U | 0xfffffff8) + 1); + if (GHIDRA_INT(local_164.y) < 0) { + local_164.y = (float)((GHIDRA_INT(local_164.y) - 1U | 0xfffffff8) + 1); } - if (0x17 < (int)uVar31) { + if (0x17 < GHIDRA_INT(uVar31)) { local_164.y = fVar32; } - if ((int)local_164.y < 5) { + if (GHIDRA_INT(local_164.y) < 5) { tmpColor = (ColorMod *)::((Color *)())->Color::Color(); ::((Color *)(&local_11c))->Color::Color(); in_stack_fffffdbc = (Vector *)(local_98 + 0x2c); - ::Color::Lerp((ColorMod *)in_stack_fffffdbc,from,tmpColor,(float)(int)local_164.y * 0.25); + ::Color::Lerp((ColorMod *)in_stack_fffffdbc,from,tmpColor,(float)GHIDRA_INT(local_164.y) * 0.25); ::((Color *)((Color *)local_f0))->Color::__mul((ColorMod *)(local_98 + 0x2c)); ::((Color *)((Color *)local_98))->Color::__mul((ColorMod *)(local_98 + 0x2c)); } @@ -20251,8 +20251,8 @@ LAB_00786ffb: auVar24 = ZEXT812(0); local_130 = (EntityPtr)0x0; if (1 < *(int *)((char *)this + 0x1ed0)) { - local_68._12_4_ = (void *)0x0; - local_68._16_4_ = (void *)0xbf000000; + (*(undefined4 *)((char *)&(local_68) + 0xc)) = (void *)0x0; + (*(undefined4 *)((char *)&(local_68) + 0x10)) = (void *)0xbf000000; puStack_54 = &DAT_bf800000; fStack_50 = 0.5; local_4c = 2.0; @@ -20261,20 +20261,20 @@ LAB_00786ffb: local_164.y = 8.40779e-45; piVar15 = (int *)std::min(); local_130 = *(EntityPtr *)(local_68 + *piVar15 * 4 + 0xc); - auVar24._4_8_ = 0; - auVar24._0_4_ = local_130; + (*(undefined8 *)((char *)&(auVar24) + 0x4)) = 0; + (*(undefined4 *)((char *)&(auVar24) + 0x0)) = local_130; } - BVar27._h._4_4_ = 0; - BVar27._0_12_ = auVar24; - bVar2 = ((TemporaryEffects *)((TemporaryEffects *)((int)this + 0x1508)))->TemporaryEffects::HasCollectibleEffect(0x2c0); + (*(undefined4 *)((char *)&(BVar27._h) + 0x4)) = 0; + (*(undefined1 *)((char *)&(BVar27) + 0x0)) = auVar24; + bVar2 = ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508)))->TemporaryEffects::HasCollectibleEffect(0x2c0); if (bVar2 != 0) { fVar32 = sinf_wrapper(*(float *)((char *)this + 0x3a4) * 1.5707964); local_174.x = fVar32 + local_174.x; fVar32 = sinf_wrapper(*(float *)((char *)this + 0x3a4) * 1.2566371); - BVar27._l._0_4_ = + (*(undefined4 *)((char *)&(BVar27._l) + 0x0)) = (Entity_Effect *)((SUB124(ZEXT812(0x3f800000),0) - (fVar32 * 0.5 + 0.5)) * 0.4); - BVar27._4_8_ = SUB128(ZEXT812(0x3f800000),4); - BVar27._h._4_4_ = 0; + (*(undefined8 *)((char *)&(BVar27) + 0x4)) = SUB128(ZEXT812(0x3f800000),4); + (*(undefined4 *)((char *)&(BVar27._h) + 0x4)) = 0; in_stack_fffffdbc = (Vector *)0x0; ::((Color *)())->Color::Color(); ::((Color *)((Color *)local_f0))->Color::__mul((ColorMod *)(local_98 + 0x2c)); @@ -20285,12 +20285,12 @@ LAB_00786ffb: if (*(int *)((char *)this + 0x13c0) == 0x23) { itemConfig = Isaac::GetItemConfig(); local_13c.y = (float)((Config *)(itemConfig))->Config::GetNullItem(0x6a); - costumeMap = (PlayerCostumeMap *)((int)this + 0x122c); + costumeMap = (PlayerCostumeMap *)(GHIDRA_INT(this) + 0x122c); local_164.y = 0.0; do { if (((-1 < costumeMap->_index) && (costumeMap->_isBodyLayer == 0)) && (local_144.y = (float)FUN_005cbd10(), - *(Entity **)(((ANM2 *)((int)local_144.y + 0x114))->_filename)._buf == + *(Entity **)(((ANM2 *)(GHIDRA_INT(local_144.y) + 0x114))->_filename)._buf == (Entity *)local_13c.y)) { FUN_0041e470(); cVar3 = FUN_004073a0(); @@ -20304,17 +20304,17 @@ LAB_00786ffb: uVar30 = 0x7876a1; pBVar33 = GetBombFlags(this,pBVar13,0); uVar34 = 0; - local_24._0_4_ = *(undefined4 *)&pBVar33->_l; - local_24._4_4_ = *(undefined4 *)((int)&pBVar33->_l + 4); - local_24._8_4_ = SUB84(pBVar33->_h,0); - iStack_18 = *(int *)((int)&pBVar33->_h + 4); + (*(undefined4 *)((char *)&(local_24) + 0x0)) = *(undefined4 *)&pBVar33->_l; + (*(undefined4 *)((char *)&(local_24) + 0x4)) = *(undefined4 *)(GHIDRA_INT(&pBVar33->_l) + 4); + (*(undefined4 *)((char *)&(local_24) + 0x8)) = SUB84(pBVar33->_h,0); + iStack_18 = *(int *)(GHIDRA_INT(&pBVar33->_h) + 4); FUN_00435bc0(); GetBombVariant(); FUN_00435bc0(); - tearFlags._l._4_4_ = uVar30; - tearFlags._l._0_4_ = (ColorMod *)in_stack_fffffdbc; - tearFlags._h._0_4_ = pBVar13; - tearFlags._h._4_4_ = uVar34; + (*(undefined4 *)((char *)&(tearFlags._l) + 0x4)) = uVar30; + (*(undefined4 *)((char *)&(tearFlags._l) + 0x0)) = (ColorMod *)in_stack_fffffdbc; + (*(undefined4 *)((char *)&(tearFlags._h) + 0x0)) = pBVar13; + (*(undefined4 *)((char *)&(tearFlags._h) + 0x4)) = uVar34; fVar32 = check_bomb_tearflags(this,tearFlags); if (1.5 <= fVar32) { local_150.y = 110.0; @@ -20323,10 +20323,10 @@ LAB_00786ffb: otherPlayer = player; vecResult = MusicManager::RandomVector(&local_13c); vecResult = ((Vector *)(&otherPlayer->_pos))->Vector::__add(&local_164,vecResult); - tearFlags_00._l._4_4_ = local_24._4_4_; - tearFlags_00._l._0_4_ = local_24._0_4_; - tearFlags_00._h._0_4_ = local_24._8_4_; - tearFlags_00._h._4_4_ = iStack_18; + (*(undefined4 *)((char *)&(tearFlags_00._l) + 0x4)) = (*(undefined4 *)((char *)&(local_24) + 0x4)); + (*(undefined4 *)((char *)&(tearFlags_00._l) + 0x0)) = (*(undefined4 *)((char *)&(local_24) + 0x0)); + (*(undefined4 *)((char *)&(tearFlags_00._h) + 0x0)) = (*(undefined4 *)((char *)&(local_24) + 0x8)); + (*(undefined4 *)((char *)&(tearFlags_00._h) + 0x4)) = iStack_18; Game::BombExplosionEffects (g_game,vecResult,local_150.y,tearFlags_00,tmpColor, (Entity *)otherPlayer,1.25,1,4,1); @@ -20334,8 +20334,8 @@ LAB_00786ffb: vfunc = *(code **)(*(int *)otherPlayer + 0x54); vecResult = MusicManager::RandomVector(&local_150); fVar32 = random_float(); - BVar27._l._0_4_ = (Entity_Effect *)(fVar32 * 3.0 + 2.0); - BVar27._4_12_ = extraout_var; + (*(undefined4 *)((char *)&(BVar27._l) + 0x0)) = (Entity_Effect *)(fVar32 * 3.0 + 2.0); + (*(undefined1 *)((char *)&(BVar27) + 0x4)) = extraout_var; local_13c.y = (float)(Entity_Effect *)BVar27._l; ((Vector *)(vecResult))->Vector::__mul(&local_164,&local_13c.y); ((EntityRef *)((EntityRef *)local_68))->EntityRef::constructor((Entity *)0x0); @@ -20364,9 +20364,9 @@ LAB_00786ffb: } break; } - local_164.y = (float)((int)local_164.y + 1); + local_164.y = (float)(GHIDRA_INT(local_164.y) + 1); costumeMap = costumeMap + 1; - } while ((uint)local_164.y < 0xf); + } while (GHIDRA_UINT(local_164.y) < 0xf); goto LAB_0078784d; } } @@ -20374,7 +20374,7 @@ LAB_00786ffb: LAB_0078784d: if (*(int *)((char *)this + 0x13c0) == 0x23) { local_174.y = local_174.y + *(float *)((char *)this + 0x1f88); - BVar27 = (BitSet128)ZEXT416((uint)local_174.y); + BVar27 = (BitSet128)ZEXT416(GHIDRA_UINT(local_174.y)); } } bVar2 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x400000000); @@ -20404,77 +20404,77 @@ LAB_00787961: local_121 = '\x01'; if (bVar2 != 0) goto LAB_00787961; } - local_164.y = (float)((int)this + 0x48); + local_164.y = (float)(GHIDRA_INT(this) + 0x48); pbVar17 = (byte *)0x0; - local_150.y = (float)((int)this + 0x1238); + local_150.y = (float)(GHIDRA_INT(this) + 0x1238); do { if (*(char *)(void **)local_150.y == '\0') { tmpColor = (ColorMod *)local_f0; - layer = ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::GetLayer(pbVar17); + layer = ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::GetLayer(pbVar17); ::((Color *)((Color *)&layer->_color))->Color::operator_assign(tmpColor); - vecResult = (Vector *)((int)this + 0x1500); + vecResult = (Vector *)(GHIDRA_INT(this) + 0x1500); if (local_121 == '\0') { - vecResult = ((Vector *)(&local_174))->Vector::Mul(&local_144,(Vector *)((int)this + 0x14f8)); - layer = ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::GetLayer(pbVar17); + vecResult = ((Vector *)(&local_174))->Vector::Mul(&local_144,(Vector *)(GHIDRA_INT(this) + 0x14f8)); + layer = ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::GetLayer(pbVar17); ((Vector *)(&layer->_pos))->Vector::operator_assign(vecResult); - vecResult = ((Vector *)(&scratchVec))->Vector::Mul((Vector *)&local_1a0._h,(Vector *)((int)this + 0x1500)); + vecResult = ((Vector *)(&scratchVec))->Vector::Mul((Vector *)&local_1a0._h,(Vector *)(GHIDRA_INT(this) + 0x1500)); vecResult = ((Vector *)(vecResult))->Vector::Mul((Vector *)(local_24 + 8),&local_16c); - layer = ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::GetLayer(pbVar17); + layer = ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::GetLayer(pbVar17); ((Vector *)(&layer->_size))->Vector::operator_assign(vecResult); - layer = ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::GetLayer(pbVar17); + layer = ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::GetLayer(pbVar17); (layer->_size).x = local_188 * (layer->_size).x; - layer = ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::GetLayer(pbVar17); + layer = ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::GetLayer(pbVar17); (layer->_size).y = local_190.y * (layer->_size).y; local_13c.y = (*(float *)((char *)this + 0x1504) - *(float *)((char *)this + 0x14fc)) * 2.5 + local_158.y * 8.0; - layer = ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::GetLayer(pbVar17); + layer = ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::GetLayer(pbVar17); (layer->_pos).y = local_13c.y + (layer->_pos).y; goto LAB_00787b47; } LAB_00787a31: - layer = ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::GetLayer(pbVar17); + layer = ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::GetLayer(pbVar17); ((Vector *)(&layer->_size))->Vector::operator_assign(vecResult); vecResult = &g_vectorZero; - layer = ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::GetLayer(pbVar17); + layer = ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::GetLayer(pbVar17); ((Vector *)(&layer->_pos))->Vector::operator_assign(vecResult); } else { tmpColor = (ColorMod *)local_98; - layer = ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::GetLayer(pbVar17); + layer = ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::GetLayer(pbVar17); ::((Color *)((Color *)&layer->_color))->Color::operator_assign(tmpColor); - vecResult = (Vector *)((int)this + 0x14f8); - layer = ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::GetLayer(pbVar17); + vecResult = (Vector *)(GHIDRA_INT(this) + 0x14f8); + layer = ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::GetLayer(pbVar17); ((Vector *)(&layer->_size))->Vector::operator_assign(vecResult); if (local_121 != '\0') { vecResult = &g_vectorOne; goto LAB_00787a31; } - layer = ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::GetLayer(pbVar17); + layer = ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::GetLayer(pbVar17); (layer->_size).x = (float)local_148 * (layer->_size).x; - layer = ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::GetLayer(pbVar17); + layer = ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::GetLayer(pbVar17); (layer->_size).y = (float)local_128 * (layer->_size).y; LAB_00787b47: - layer = ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::GetLayer(pbVar17); - BVar27 = (BitSet128)ZEXT416((uint)local_130); + layer = ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::GetLayer(pbVar17); + BVar27 = (BitSet128)ZEXT416(GHIDRA_UINT(local_130)); (layer->_pos).x = (float)local_130; } pbVar17 = pbVar17 + 1; - local_150.y = (float)((int)((std_string *)((int)local_150.y + 8))->_buf + 8); - } while ((int)pbVar17 < 0xf); + local_150.y = (float)(GHIDRA_INT(((std_string *)(GHIDRA_INT(local_150.y) + 8))->_buf) + 8); + } while (GHIDRA_INT(pbVar17) < 0xf); FUN_005cbe20(); local_8 = 7; local_158.y = 0.0; do { - local_130 = (EntityPtr)((PlayerCostumeMap *)((int)this + 0x122c) + (int)local_158.y); + local_130 = (EntityPtr)((PlayerCostumeMap *)(GHIDRA_INT(this) + 0x122c) + GHIDRA_INT(local_158.y)); if (-1 < *(int *)local_130) { if (*(char *)((char *)local_130 + 0xc) == '\0') { sprite = (Sprite *)FUN_005cbd10(); - if ((byte *)0x3 < (uint)local_158.y) { + if ((byte *)0x3 < GHIDRA_UINT(local_158.y)) { tmpColor = (ColorMod *)((Sprite *)((Sprite *)local_164.y))->Sprite::Color(); ::((Color *)((Color *)(local_228 + -7)))->Color::operator_assign(tmpColor); goto LAB_00787c20; } - tmpColor = (ColorMod *)((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::Color(); + tmpColor = (ColorMod *)((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::Color(); ((Sprite *)(sprite))->Sprite::SetColor(tmpColor); } else { @@ -20487,16 +20487,16 @@ LAB_00787c20: this = player; } sprite = (Sprite *)FUN_005cbd10(); - vecResult = (Vector *)((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::Scale(); + vecResult = (Vector *)((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::Scale(); ((Sprite *)(sprite))->Sprite::SetScale(vecResult); EVar9 = local_130; sprite = (Sprite *)FUN_005cbd10(); local_150.y = (float)((Sprite *)(sprite))->Sprite::GetLayer(*(byte **)((char *)EVar9 + 4)); - layer = ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::GetLayer((byte *)local_158.y); - ((Vector *)((Vector *)((int)local_150.y + 0x34)))->Vector::operator_assign(&layer->_size); - layer = ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::GetLayer((byte *)local_158.y); + layer = ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::GetLayer((byte *)local_158.y); + ((Vector *)((Vector *)(GHIDRA_INT(local_150.y) + 0x34)))->Vector::operator_assign(&layer->_size); + layer = ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::GetLayer((byte *)local_158.y); fVar32 = local_150.y; - ((Vector *)((Vector *)((int)local_150.y + 0x40)))->Vector::operator_assign(&layer->_pos); + ((Vector *)((Vector *)(GHIDRA_INT(local_150.y) + 0x40)))->Vector::operator_assign(&layer->_pos); EVar9 = local_130; if ((byte *)local_158.y == (byte *)0x0) { *(int *)((char *)fVar32 + 0x8c) = *(int *)((char *)fVar32 + 0x8c) | 1; @@ -20517,21 +20517,21 @@ LAB_00787c20: local_144.y = 0.0; } sprite = (Sprite *)FUN_005cbd10(); - local_13c.y = (float)(int)local_144.y * 96.0; + local_13c.y = (float)GHIDRA_INT(local_144.y) * 96.0; layer = ((Sprite *)(sprite))->Sprite::GetLayer(*(byte **)((char *)EVar9 + 4)); - BVar27 = (BitSet128)ZEXT416((uint)local_13c.y); + BVar27 = (BitSet128)ZEXT416(GHIDRA_UINT(local_13c.y)); (layer->_cropOffset).y = local_13c.y; } } - local_158.y = (float)((int)local_158.y + 1); - } while ((uint)local_158.y < &DAT_0000000f); + local_158.y = (float)(GHIDRA_INT(local_158.y) + 1); + } while (GHIDRA_UINT(local_158.y) < &DAT_0000000f); bVar2 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x4000); if (bVar2 == 0) { FUN_0042c770(); std::iterator_copy(&local_17c,&local_150.y); cVar3 = FUN_0042c710(); if (cVar3 != '\0') { - local_164.y = (float)((int)this + 0x1220); + local_164.y = (float)(GHIDRA_INT(this) + 0x1220); do { FUN_005cba30(); tmpEntity = (Entity *)FUN_005cbd10(); @@ -20543,8 +20543,8 @@ LAB_00787c20: if (cVar3 == '\0') { pAVar21 = (ANM2 *)FUN_0041e470(); ((ANM2 *)(pAVar21))->ANM2::GetAnimation((std_string *)(local_68 + 0x10)); - local_8._0_1_ = 8; - local_15c = (EntityPtr)((uint)local_15c | 1); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; + local_15c = (EntityPtr)(GHIDRA_UINT(local_15c) | 1); local_158.y = (float)local_15c; iVar5 = FUN_006da7d0(); local_128 = (RNG *)CONCAT13(1,(undefined3)local_128); @@ -20552,14 +20552,14 @@ LAB_00787c20: } else { LAB_00787ec4: - local_128 = (RNG *)((uint)local_128 & 0xffffff); + local_128 = (RNG *)(GHIDRA_UINT(local_128) & 0xffffff); } local_8 = 7; - if (((uint)local_15c & 1) != 0) { - local_15c = (EntityPtr)((uint)local_15c & 0xfffffffe); + if ((GHIDRA_UINT(local_15c) & 1) != 0) { + local_15c = (EntityPtr)(GHIDRA_UINT(local_15c) & 0xfffffffe); ((std::string *)(local_68 + 0x10))->std::string::_Tidy_deallocate(); } - if (local_128._3_1_ != '\0') { + if ((*(undefined1 *)((char *)&(local_128) + 0x3)) != '\0') { gridEntity = (GridEntity *)FUN_0041e470(); iVar5 = ((GridEntity *)(gridEntity))->GridEntity::GetType(); fVar32 = local_13c.y; @@ -20569,7 +20569,7 @@ LAB_00787ec4: if (iVar5 != 0) { do { animState = (AnimationState *)FUN_0041e470(); - tmpEntity = ((AnimationState *)(animState))->AnimationState::GetLayerFrame((int)pbVar17); + tmpEntity = ((AnimationState *)(animState))->AnimationState::GetLayerFrame(GHIDRA_INT(pbVar17)); local_13c.y = (float)tmpEntity; if (tmpEntity != (Entity *)0x0) { layer = ((Sprite *)((Sprite *)fVar32))->Sprite::GetLayer(pbVar17); @@ -20596,7 +20596,7 @@ LAB_00787ec4: if (*(byte *)((char *)this + 0x173) == 0) { if ((*(int *)((char *)this + 0x2c) == 0) && (*(byte *)((char *)this + 0x20a9) == 0)) { pvVar16 = TemporaryEffects::GetCollectibleEffect - ((TemporaryEffects *)((int)this + 0x1508),0x11a); + ((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508),0x11a); if (pvVar16 != (void *)0x0) { itemConfig = Isaac::GetItemConfig(); itemCfg = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(0x11a); @@ -20609,41 +20609,41 @@ LAB_00787ec4: else { tmpEntity = (Entity *)0x3f000000; } - BVar27._l._0_4_ = + (*(undefined4 *)((char *)&(BVar27._l) + 0x0)) = (Entity_Effect *) (SUB124(ZEXT812(0x3f800000),0) - (((float)*(int *)((char *)pvVar16 + 8) - (float)tmpEntity) - 1.0) / - ((float)(int)local_164.y - 2.0)); - BVar27._4_8_ = SUB128(ZEXT812(0x3f800000),4); - BVar27._h._4_4_ = 0; + ((float)GHIDRA_INT(local_164.y) - 2.0)); + (*(undefined8 *)((char *)&(BVar27) + 0x4)) = SUB128(ZEXT812(0x3f800000),4); + (*(undefined4 *)((char *)&(BVar27._h) + 0x4)) = 0; local_150.y = (float)(Entity_Effect *)BVar27._l; - vecResult = ((Vector *)((Vector *)((int)this + 0x334)))->Vector::__sub((Vector *)(local_24 + 8), - (Vector *)((int)this + 0x33c)); + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x334)))->Vector::__sub((Vector *)(local_24 + 8), + (Vector *)(GHIDRA_INT(this) + 0x33c)); vecResult = ((Vector *)(vecResult))->Vector::__mul((Vector *)&local_1a0._h,&local_150.y); vecResult = ((Vector *)(vecResult))->Vector::__mul(&local_16c,&local_150.y); - ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::operator_add_assign(vecResult); - ((Vector *)((Vector *)((int)this + 0x360)))->Vector::operator_assign(&g_vectorZero); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::operator_add_assign(vecResult); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::operator_assign(&g_vectorZero); entityList = (EntityList *)FUN_00421780(); iVar5 = ((EntityList *)(entityList))->EntityList::Size(); if ((iVar5 == 0x21) && (*(int *)((char *)pvVar16 + 8) == 1)) { uVar31 = Random(); spawnedEffect = (Entity_Effect *) - ((Game *)(g_game))->Game::Spawn(1000,0x3d,(Vector *)((int)this + 0x33c),&g_vectorZero, + ((Game *)(g_game))->Game::Spawn(1000,0x3d,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero, (Entity *)this,0,uVar31); ((Entity *)((Entity *)spawnedEffect))->Entity::SetParent((Entity *)this); - BVar27 = (BitSet128)ZEXT416((uint)*(float *)((char *)this + 0x370)); + BVar27 = (BitSet128)ZEXT416(GHIDRA_UINT(*(float *)((char *)this + 0x370))); ((Entity_Effect *)(spawnedEffect))->Entity_Effect::SetRadii(*(float *)((char *)this + 0x370),90.0); ((Entity_Effect *)(spawnedEffect))->Entity_Effect::SetTimeout(10); } } - tempEffects = (TemporaryEffects *)((int)this + 0x1508); + tempEffects = (TemporaryEffects *)(GHIDRA_INT(this) + 0x1508); bVar2 = ((TemporaryEffects *)(tempEffects))->TemporaryEffects::HasCollectibleEffect(0x146); local_128 = (RNG *)CONCAT13(bVar2,(undefined3)local_128); bVar2 = HasCollectible(this,0x3b,0); if ((bVar2 != 0) && ((bVar2 = ((TemporaryEffects *)(tempEffects))->TemporaryEffects::HasCollectibleEffect(0x11a), bVar2 != 0 || - (local_128._3_1_ != '\0')))) { + ((*(undefined1 *)((char *)&(local_128) + 0x3)) != '\0')))) { iVar5 = ((Entity *)((Entity *)this))->Entity::GetIntervalTicks(4.0,0.0); if (iVar5 != 0) { vfunc = *(code **)(*(int *)this + 0x3c); @@ -20652,8 +20652,8 @@ LAB_00787ec4: } iVar5 = ((Entity *)((Entity *)this))->Entity::GetIntervalTicks(2.0,0.0); if (iVar5 != 0) { - ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::__add(&local_16c,(Vector *)((int)this + 0x34c)); - local_13c.y = (float)((ANM2 *)((ANM2 *)((int)this + 0x48)))->ANM2::GetLayer((byte *)"extra"); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::__add(&local_16c,(Vector *)(GHIDRA_INT(this) + 0x34c)); + local_13c.y = (float)((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x48)))->ANM2::GetLayer((byte *)"extra"); if ((LayerState *)local_13c.y != (LayerState *)0x0) { animState = (AnimationState *)Config::GetPillEffects(); iVar5 = _ptr_deref_or_minus1(); @@ -20662,7 +20662,7 @@ LAB_00787ec4: vecResult = (Vector *)FUN_0067f2e0(); vecResult2 = ((Vector *)((Vector *)&local_1a0._h))->Vector::Vector(0.0,-10.0); vecResult = ((Vector *)(vecResult))->Vector::__add(&scratchVec,vecResult2); - vecResult = ((Vector *)(vecResult))->Vector::Mul(&local_17c,(Vector *)((int)this + 0x14f0)); + vecResult = ((Vector *)(vecResult))->Vector::Mul(&local_17c,(Vector *)(GHIDRA_INT(this) + 0x14f0)); ((Vector *)(&local_16c))->Vector::operator_add_assign(vecResult); } } @@ -20702,8 +20702,8 @@ LAB_00787ec4: iVar5 = Isaac::Random(10); ((Entity_Effect *)(spawnedEffect))->Entity_Effect::SetTimeout(iVar5 + 10); fVar32 = random_float(); - BVar27._l._0_4_ = (Entity_Effect *)(fVar32 * 0.3 + 0.4); - BVar27._4_12_ = extraout_var_00; + (*(undefined4 *)((char *)&(BVar27._l) + 0x0)) = (Entity_Effect *)(fVar32 * 0.3 + 0.4); + (*(undefined1 *)((char *)&(BVar27) + 0x4)) = extraout_var_00; local_150.y = (float)(Entity_Effect *)BVar27._l; vecResult = ((Vector *)(&this->_playerSpriteScale))->Vector::__mul(&local_17c,&local_150.y); vecResult = ((Vector *)(vecResult))->Vector::Mul(&local_174,&g_vectorOne); @@ -20716,11 +20716,11 @@ LAB_00787ec4: iVar5 = _get_index_plus_one_if_kind_4_5(); local_150.y = (float)iVar5 * 0.2 + 2.0; local_13c.y = *(float *)((char *)this + 0x370) + 40.0; - BVar27 = (BitSet128)ZEXT416((uint)local_13c.y); + BVar27 = (BitSet128)ZEXT416(GHIDRA_UINT(local_13c.y)); ((Level *)((Level *)g_game))->Level::GetCurrentRoom(); entityList = (EntityList *)FUN_00428a60(); EntityList::QueryRadius - (entityList,(EntityList_EL *)local_24,(Vector *)((int)this + 0x33c),local_13c.y, + (entityList,(EntityList_EL *)local_24,(Vector *)(GHIDRA_INT(this) + 0x33c),local_13c.y, 10); local_8 = 9; EVar9 = (EntityPtr)0x0; @@ -20736,7 +20736,7 @@ LAB_00787ec4: LAB_0078863e: puVar11 = (undefined4 *)std::vector::operator_index(); bVar2 = ((Entity *)((Entity *)*puVar11))->Entity::IsProjectile(); - if ((bVar2 != 0) && (local_128._3_1_ == '\0')) { + if ((bVar2 != 0) && ((*(undefined1 *)((char *)&(local_128) + 0x3)) == '\0')) { puVar11 = (undefined4 *)std::vector::operator_index(); cVar3 = ((Entity *)((Entity *)*puVar11))->Entity::IsDead(); if (cVar3 == '\0') { @@ -20756,7 +20756,7 @@ LAB_0078863e: puVar11 = (undefined4 *)std::vector::operator_index(); vfunc = *(code **)(*(int *)*puVar11 + 0x20); ((EntityRef *)((EntityRef *)local_68))->EntityRef::constructor((Entity *)player); - BVar27 = (BitSet128)ZEXT416((uint)local_150.y); + BVar27 = (BitSet128)ZEXT416(GHIDRA_UINT(local_150.y)); (*vfunc)(); puVar11 = (undefined4 *)std::vector::operator_index(); this = player; @@ -20765,15 +20765,15 @@ LAB_0078863e: ((Entity *)(tmpEntity))->Entity::AddBurn((EntityRef *)local_68,0x96,0.0,0); EVar9 = local_130; } - EVar9 = (EntityPtr)((int)EVar9 + 1); + EVar9 = (EntityPtr)(GHIDRA_INT(EVar9) + 1); local_130 = EVar9; pcVar20 = (char *)((EntityList *)((EntityList *)local_24))->EntityList::Size(); - } while ((uint)EVar9 < pcVar20); + } while (GHIDRA_UINT(EVar9) < pcVar20); } local_8 = 0xffffffff; ((EntityList_Query *)(local_24))->EntityList_Query::~EntityList_Query(); } - tempEffects = (TemporaryEffects *)((int)this + 0x1508); + tempEffects = (TemporaryEffects *)(GHIDRA_INT(this) + 0x1508); } bVar2 = ((TemporaryEffects *)(tempEffects))->TemporaryEffects::HasCollectibleEffect(0x2c1); if ((bVar2 != 0) && @@ -20806,7 +20806,7 @@ LAB_0078863e: rng = GetCollectibleRNG(this,0x197); uVar31 = ((RNG *)(rng))->RNG::RandomInt(4); *(uint *)((char *)this + 0x192c) = uVar31; - ((TemporaryEffects *)((TemporaryEffects *)((int)this + 0x1508)))->TemporaryEffects::AddCollectibleEffect(0x197,1,1); + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508)))->TemporaryEffects::AddCollectibleEffect(0x197,1,1); itemConfig = Isaac::GetItemConfig(); bVar2 = 0; itemCfg = ((Config *)(itemConfig))->Config::GetNullItem(0x11); @@ -20877,11 +20877,11 @@ LAB_00788a4d: local_129 = 0; } else { - local_150.y = (float)((ANM2 *)((ANM2 *)((int)this + 0x41c)))->ANM2::GetLayerFrame(0); + local_150.y = (float)((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x41c)))->ANM2::GetLayerFrame(0); if ((LayerState *)local_150.y != (LayerState *)0x0) { - local_122 = *(byte *)((int)(((LayerState *)local_150.y)->_spriteSheetPath)._buf + 4); + local_122 = *(byte *)(GHIDRA_INT((((LayerState *)local_150.y)->_spriteSheetPath)._buf) + 4); pbVar17 = (byte *)0x0; - local_13c.y = (float)((int)this + 0xff8); + local_13c.y = (float)(GHIDRA_INT(this) + 0xff8); iVar5 = ((Sprite *)((Sprite *)local_13c.y))->Sprite::GetLayerCount(); fVar32 = local_13c.y; if (iVar5 != 0) { @@ -20909,7 +20909,7 @@ LAB_00788a54: bVar2 = IsExtraAnimationFinished(this); if (bVar2 == 0) { bVar2 = IsHoldingItem(this); - local_128 = (RNG *)((uint)local_128 & 0xffffff); + local_128 = (RNG *)(GHIDRA_UINT(local_128) & 0xffffff); if (bVar2 != 0) goto LAB_00788a71; } else { @@ -20938,7 +20938,7 @@ LAB_00788ade: *(byte *)((char *)this + 0x1398) = 0; } bVar2 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x4000); - if ((bVar2 == 0) && (local_128._3_1_ != '\0')) { + if ((bVar2 == 0) && ((*(undefined1 *)((char *)&(local_128) + 0x3)) != '\0')) { if (local_129 != 0) { FlushQueueItem(this); } @@ -20986,12 +20986,12 @@ LAB_00788e85: } if (((*(int *)((char *)this + 0x2c) == 0) && (*(byte *)((char *)this + 0x20a9) == 0)) && (local_121 != '\0')) { - ((ANM2 *)((ANM2 *)((int)this + 0x48)))->ANM2::Play((byte *)local_144.y,0); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x48)))->ANM2::Play((byte *)local_144.y,0); } - local_148 = (std_string *)((int)this + 0x1238); + local_148 = (std_string *)(GHIDRA_INT(this) + 0x1238); local_120 = (EntityPtr)&DAT_0000000f; do { - if (((-1 < ((PlayerCostumeMap *)((int)local_148 + -0xc))->_index) && + if (((-1 < ((PlayerCostumeMap *)(GHIDRA_INT(local_148) + -0xc))->_index) && (*(byte *)local_148 != 0)) && ((pAVar21 = (ANM2 *)FUN_005cbd10(), *(int *)((char *)this + 0x2c) != 1 && (*(byte *)((char *)this + 0x20a9) == 0)))) { @@ -21009,7 +21009,7 @@ LAB_00788e85: ((std::string *)(tmpString))->std::string::string_from_cstr((byte *)local_144.y); local_8 = 0x11; FUN_0060c790(); - local_8._0_1_ = 0x12; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x12; Sprite::PlayOverlay(); ((std::string *)(local_68 + 0x10))->std::string::_Tidy_deallocate(); local_8 = 0xffffffff; @@ -21020,24 +21020,24 @@ LAB_00788e85: ((Sprite *)((Sprite *)pAVar21))->Sprite::Stop(); } } - local_148 = (std_string *)((int)local_148 + 0x10); - local_120 = (EntityPtr)((int)&((Sprite *)((int)local_120 + -0x114))->_bitflags + 3); + local_148 = (std_string *)(GHIDRA_INT(local_148) + 0x10); + local_120 = (EntityPtr)(GHIDRA_INT(&((Sprite *)(GHIDRA_INT(local_120) + -0x114))->_bitflags) + 3); } while (local_120 != (EntityPtr)0x0); } else { if (((*(int *)((char *)this + 0x2c) == 0) && (*(byte *)((char *)this + 0x20a9) == 0)) && (local_121 != '\0')) { if ((local_12a == 0) || (*(int *)((char *)this + 0x13c0) == 0x23)) { - ((ANM2 *)((ANM2 *)((int)this + 0x48)))->ANM2::SetFrame(local_148,0); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x48)))->ANM2::SetFrame(local_148,0); } else { - ((ANM2 *)((ANM2 *)((int)this + 0x48)))->ANM2::Play((byte *)local_148,0); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x48)))->ANM2::Play((byte *)local_148,0); } } - local_130 = (EntityPtr)((int)this + 0x1238); + local_130 = (EntityPtr)(GHIDRA_INT(this) + 0x1238); local_128 = (RNG *)0xf; do { - if (((-1 < ((PlayerCostumeMap *)((int)local_130 + -0xc))->_index) && + if (((-1 < ((PlayerCostumeMap *)(GHIDRA_INT(local_130) + -0xc))->_index) && (*(byte *)local_130 != 0)) && ((pAVar21 = (ANM2 *)FUN_005cbd10(), *(int *)((char *)this + 0x2c) != 1 && (*(byte *)((char *)this + 0x20a9) == 0)))) { @@ -21059,7 +21059,7 @@ LAB_00788e85: ((std::string *)(tmpString))->std::string::string_from_cstr((byte *)local_148); local_8 = 10; FUN_0060c790(); - local_8._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc; ((std::string *)(tmpString))->std::string::_Tidy_deallocate(); iVar5 = FUN_0040bcb0(); if (iVar5 == 0) { @@ -21079,13 +21079,13 @@ LAB_00788e85: if (local_12a == 0) { local_8 = 0xf; anim = (std_string *)FUN_0060c790(); - local_8._0_1_ = 0x10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x10; ((ANM2 *)(pAVar21))->ANM2::SetFrame(anim,0); } else { local_8 = 0xd; FUN_0060c790(); - local_8._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xe; Sprite::PlayOverlay(); } ((std::string *)(local_68 + 0x10))->std::string::_Tidy_deallocate(); @@ -21099,74 +21099,74 @@ LAB_00788e85: } } } - local_130 = (EntityPtr)((int)local_130 + 0x10); - local_128 = (RNG *)((int)local_128 + -1); + local_130 = (EntityPtr)(GHIDRA_INT(local_130) + 0x10); + local_128 = (RNG *)(GHIDRA_INT(local_128) + -1); } while (local_128 != (RNG *)0x0); local_128 = (RNG *)0x0; } - BVar27._0_12_ = ZEXT812(0x3f800000); - BVar27._h._4_4_ = 0; + (*(undefined1 *)((char *)&(BVar27) + 0x0)) = ZEXT812(0x3f800000); + (*(undefined4 *)((char *)&(BVar27._h) + 0x4)) = 0; local_144.y = (float)BVar27._l; - bVar2 = ((ANM2 *)((ANM2 *)((int)this + 0x48)))->ANM2::IsPlaying(&s_empty); + bVar2 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x48)))->ANM2::IsPlaying(&s_empty); if (bVar2 == 0) { fVar32 = local_144.y; } else { - local_120 = (EntityPtr)((Vector *)((Vector *)((int)this + 0x360)))->Vector::Length(); + local_120 = (EntityPtr)((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::Length(); if (2.3 <= (float)local_120) { fVar32 = local_144.y; } else { fVar32 = assert_lerp_range((float)local_120,1.0,2.3,0.5,1.0,1); } - BVar27 = (BitSet128)ZEXT416((uint)local_120); + BVar27 = (BitSet128)ZEXT416(GHIDRA_UINT(local_120)); if (6.0 < (float)local_120) { - BVar27._l._0_4_ = (Entity_Effect *)assert_lerp_range((float)local_120,6.0,10.0,1.0,2.0,1); - BVar27._4_12_ = extraout_var_01; + (*(undefined4 *)((char *)&(BVar27._l) + 0x0)) = (Entity_Effect *)assert_lerp_range((float)local_120,6.0,10.0,1.0,2.0,1); + (*(undefined1 *)((char *)&(BVar27) + 0x4)) = extraout_var_01; fVar32 = (float)(Entity_Effect *)BVar27._l; } if (0 < *(int *)((char *)this + 0x165c)) { fVar32 = 1.0; - local_13c.y = ((Vector *)((Vector *)((int)this + 0x1654)))->Vector::Dot((Vector *)((int)this + 0x360)); + local_13c.y = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x1654)))->Vector::Dot((Vector *)(GHIDRA_INT(this) + 0x360)); local_13c.y = assert_lerp_range(local_13c.y,-3.0,1.0,3.0,fVar32,1); - fVar32 = ((Vector *)((Vector *)((int)this + 0x1654)))->Vector::Length(); + fVar32 = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x1654)))->Vector::Length(); local_13c.y = fVar32 * local_13c.y; auVar25 = ZEXT812(0x3f000000); auVar28 = ZEXT812(0x40800000); - if (auVar25._0_4_ <= local_13c.y) { - auVar25._4_8_ = auVar25._4_8_; - auVar25._0_4_ = local_13c.y; + if ((*(undefined4 *)((char *)&(auVar25) + 0x0)) <= local_13c.y) { + (*(undefined8 *)((char *)&(auVar25) + 0x4)) = (*(undefined8 *)((char *)&(auVar25) + 0x4)); + (*(undefined4 *)((char *)&(auVar25) + 0x0)) = local_13c.y; } - BVar27._h._4_4_ = 0; - BVar27._0_12_ = auVar25; - if (auVar25._0_4_ <= auVar28._0_4_) { - auVar28._4_8_ = auVar28._4_8_; - auVar28._0_4_ = auVar25._0_4_; + (*(undefined4 *)((char *)&(BVar27._h) + 0x4)) = 0; + (*(undefined1 *)((char *)&(BVar27) + 0x0)) = auVar25; + if ((*(undefined4 *)((char *)&(auVar25) + 0x0)) <= (*(undefined4 *)((char *)&(auVar28) + 0x0))) { + (*(undefined8 *)((char *)&(auVar28) + 0x4)) = (*(undefined8 *)((char *)&(auVar28) + 0x4)); + (*(undefined4 *)((char *)&(auVar28) + 0x0)) = (*(undefined4 *)((char *)&(auVar25) + 0x0)); } - fVar32 = auVar28._0_4_; + fVar32 = (*(undefined4 *)((char *)&(auVar28) + 0x0)); } } local_144.y = fVar32 * local_158.y; - set_PlaybackSpeed((ANM2 *)((int)this + 0x48),local_144.y); - pbVar17 = (byte *)((int)this + 0x1238); + set_PlaybackSpeed((ANM2 *)(GHIDRA_INT(this) + 0x48),local_144.y); + pbVar17 = (byte *)(GHIDRA_INT(this) + 0x1238); local_120 = (EntityPtr)&DAT_0000000f; do { if ((-1 < ((PlayerCostumeMap *)(pbVar17 + -0xc))->_index) && (*pbVar17 != 0)) { pAVar21 = (ANM2 *)FUN_005cbd10(); - BVar27 = (BitSet128)ZEXT416((uint)local_144.y); + BVar27 = (BitSet128)ZEXT416(GHIDRA_UINT(local_144.y)); set_PlaybackSpeed(pAVar21,local_144.y); } pbVar17 = pbVar17 + 0x10; - local_120 = (EntityPtr)((int)&((Sprite *)((int)local_120 + -0x114))->_bitflags + 3); + local_120 = (EntityPtr)(GHIDRA_INT(&((Sprite *)(GHIDRA_INT(local_120) + -0x114))->_bitflags) + 3); } while (local_120 != (EntityPtr)0x0); } cVar3 = FUN_0040c2d0(); if ((cVar3 == '\0') && (bVar2 = IsExtraAnimationFinished(this), bVar2 != 0)) { - pbVar17 = ((std::string *)((char *)((int)this + 0x139c)))->std::string::c_str(); + pbVar17 = ((std::string *)((char *)(GHIDRA_INT(this) + 0x139c)))->std::string::c_str(); PlayExtraAnimation(this,pbVar17); FUN_0040c2f0(); } - layer = (LayerState *)((int)this + 0x1508); + layer = (LayerState *)(GHIDRA_INT(this) + 0x1508); local_150.y = (float)layer; bVar2 = ((TemporaryEffects *)((TemporaryEffects *)layer))->TemporaryEffects::HasCollectibleEffect(0x4d); if ((bVar2 == 0) && @@ -21187,7 +21187,7 @@ LAB_00789259: vecResult2 = ((Vector *)(vecResult2))->Vector::__mul((Vector *)&local_1a0._h,&local_13c.y); vecResult = ((Vector *)(vecResult))->Vector::__add(&local_16c,vecResult2); local_120 = (EntityPtr)((Room *)(room))->Room::GetGridIndex(vecResult); - if ((int)local_120 < 0) { + if (GHIDRA_INT(local_120) < 0) { layer = (LayerState *)local_150.y; this = player; } @@ -21195,21 +21195,21 @@ LAB_00789259: room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); this = player; ((EntityRef *)((EntityRef *)local_68))->EntityRef::constructor((Entity *)player); - ((Room *)(room))->Room::DamageGridWithSource((int)local_120,1,(EntityRef *)local_68); + ((Room *)(room))->Room::DamageGridWithSource(GHIDRA_INT(local_120),1,(EntityRef *)local_68); layer = (LayerState *)&this->_temporaryeffects; } } if ((*(uint *)((char *)this + 0x168) & 0x80) != 0) { - auVar26 = ZEXT416((uint)*(float *)((char *)this + 0x3ac)); + auVar26 = ZEXT416(GHIDRA_UINT(*(float *)((char *)this + 0x3ac))); FUN_00431260(); - BVar27._4_12_ = auVar26._4_12_; - BVar27._l._0_4_ = (Entity_Effect *)(auVar26._0_4_ * *(float *)((char *)this + 0x36c)); + (*(undefined1 *)((char *)&(BVar27) + 0x4)) = (*(undefined1 *)((char *)&(auVar26) + 0x4)); + (*(undefined4 *)((char *)&(BVar27._l) + 0x0)) = (Entity_Effect *)((*(undefined4 *)((char *)&(auVar26) + 0x0)) * *(float *)((char *)this + 0x36c)); *(Entity_Effect **)((char *)this + 0x36c) = (Entity_Effect *)BVar27._l; } room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); iVar5 = ((Room *)(room))->Room::GetBossID(); if ((iVar5 == 0x37) && - (BVar27._0_12_ = ZEXT812(0x43a00000), BVar27._h._4_4_ = 0, + ((*(undefined1 *)((char *)&(BVar27) + 0x0)) = ZEXT812(0x43a00000), (*(undefined4 *)((char *)&(BVar27._h) + 0x4)) = 0, *(float *)((char *)this + 0x340) <= (float)BVar27._l && (float)BVar27._l != *(float *)((char *)this + 0x340))) { *(float *)((char *)this + 0x340) = 320.0; @@ -21235,20 +21235,20 @@ LAB_00789259: ((Entity *)((Entity *)this))->Entity::AddVelocity(vecResult,bVar2); } } - bVar2 = ((Vector *)((Vector *)((int)this + 0x1654)))->Vector::operator_ne(&g_vectorZero); + bVar2 = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x1654)))->Vector::operator_ne(&g_vectorZero); if (bVar2 != 0) { local_150.y = 2.0; - local_13c.y = ((Vector *)((Vector *)((int)this + 0x360)))->Vector::Length(); + local_13c.y = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::Length(); local_120 = (EntityPtr)0x3f800000; std::max(); pfVar10 = (float *)std::min(); local_164.y = *pfVar10 * 0.5; - ((Vector *)((Vector *)((int)this + 0x1654)))->Vector::operator_mul_assign(&local_164.y); - local_13c.y = ((Vector *)((Vector *)((int)this + 0x1654)))->Vector::LengthSquared(); - BVar27._0_12_ = ZEXT812(0x3c23d70a); - BVar27._h._4_4_ = 0; + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x1654)))->Vector::operator_mul_assign(&local_164.y); + local_13c.y = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x1654)))->Vector::LengthSquared(); + (*(undefined1 *)((char *)&(BVar27) + 0x0)) = ZEXT812(0x3c23d70a); + (*(undefined4 *)((char *)&(BVar27._h) + 0x4)) = 0; if (local_13c.y < (float)BVar27._l) { - ((Vector *)((Vector *)((int)this + 0x1654)))->Vector::operator_assign(&g_vectorZero); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x1654)))->Vector::operator_assign(&g_vectorZero); } } FUN_007b9aa0(); @@ -21272,7 +21272,7 @@ LAB_007894ef: bVar22 = bVar2 < bVar1; if (bVar2 != bVar1) { LAB_00789567: - uVar31 = -(uint)bVar22 | 1; + uVar31 = -GHIDRA_UINT(bVar22) | 1; goto LAB_0078956c; } if (bVar2 == 0) break; @@ -21295,7 +21295,7 @@ LAB_007895b1: if (1 < iVar5) { uVar31 = ((Game *)(g_game))->Game::GetFrameCount(); uVar31 = uVar31 & 0x80000003; - if ((int)uVar31 < 0) { + if (GHIDRA_INT(uVar31) < 0) { uVar31 = (uVar31 - 1 | 0xfffffffc) + 1; } if (uVar31 == 2) goto LAB_007895db; @@ -21304,15 +21304,15 @@ LAB_007895b1: else { uVar31 = ((Game *)(g_game))->Game::GetFrameCount(); uVar31 = uVar31 & 0x80000003; - if ((int)uVar31 < 0) { + if (GHIDRA_INT(uVar31) < 0) { uVar31 = (uVar31 - 1 | 0xfffffffc) + 1; } if (uVar31 != 3) goto LAB_007895b1; LAB_007895db: - ((TemporaryEffects *)((TemporaryEffects *)((int)this + 0x1508)))->TemporaryEffects::AddTrinketEffect(0x17,1,1); + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508)))->TemporaryEffects::AddTrinketEffect(0x17,1,1); } ThrowHeldEntity(this,&g_vectorZero); - layer = ((ANM2 *)((ANM2 *)((int)this + 0x48)))->ANM2::GetLayer((byte *)"ghost"); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x48)))->ANM2::GetLayer((byte *)"ghost"); if (layer != (LayerState *)0x0) { layer->_visible = 1; } @@ -21324,7 +21324,7 @@ LAB_007895db: iVar5 = ((Game *)(g_game))->Game::GetNumPlayers(); if (iVar5 != 0) { do { - EVar9 = (EntityPtr)((Game *)(g_game))->Game::GetPlayer((uint)pcVar20); + EVar9 = (EntityPtr)((Game *)(g_game))->Game::GetPlayer(GHIDRA_UINT(pcVar20)); if ((((EVar9 != (EntityPtr)this) && (EVar18 = (EntityPtr)GetOtherTwin(this), EVar9 != EVar18)) && ((iVar5 = ((Entity *)((Entity *)EVar9))->Entity::Parent(), iVar5 == 0 && @@ -21332,7 +21332,7 @@ LAB_007895db: ((cVar3 = ((Entity *)((Entity *)EVar9))->Entity::IsDead(), cVar3 == '\0' || (bVar2 = WillPlayerRevive((Entity_Player *)EVar9), bVar2 != 0)))) goto LAB_007896f1; - pcVar20 = (char *)((int)local_120 + 1); + pcVar20 = (char *)(GHIDRA_INT(local_120) + 1); local_120 = (EntityPtr)pcVar20; puVar19 = (undefined1 *)((Game *)(g_game))->Game::GetNumPlayers(); } while (pcVar20 < puVar19); @@ -21352,7 +21352,7 @@ LAB_007896f1: GetEffects((Entity_Player *)*(EntityPtr *)((char *)this + 0x3bc)); ((TemporaryEffects *)(tempEffects))->TemporaryEffects::AddTrinketEffect(0xb4,1,1); } - ((Vector *)((Vector *)((int)this + 0x360)))->Vector::operator_assign(&g_vectorZero); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::operator_assign(&g_vectorZero); } } else { @@ -21360,7 +21360,7 @@ LAB_00789743: local_12a = 1; } fVar32 = *(float *)((char *)this + 0x36c) * 0.6; - BVar27 = (BitSet128)ZEXT416((uint)fVar32); + BVar27 = (BitSet128)ZEXT416(GHIDRA_UINT(fVar32)); *(float *)((char *)this + 0x36c) = fVar32; if ((*(int *)((char *)this + 0x13c0) == 0x13) || (*(int *)((char *)this + 0x13c0) == 0x14)) { cVar3 = FUN_006f0040(); @@ -21377,7 +21377,7 @@ LAB_00789784: cVar3 = FUN_00423960(); if (cVar3 == '\0') { LAB_007897da: - cVar3 = local_128._3_1_; + cVar3 = (*(undefined1 *)((char *)&(local_128) + 0x3)); } else { pvVar16 = (void *)FUN_00417920(); @@ -21389,12 +21389,12 @@ LAB_007897da: if ((local_121 == '\0') || (iVar5 = 10, cVar3 == '\0')) { iVar5 = 9; } - if ((((((ActiveItemDesc *)((int)this + 0x1580))->_item == 0x28d) && - (bVar2 = ((ANM2 *)((ANM2 *)((int)this + 0x48)))->ANM2::IsPlaying(&s_empty), bVar2 != 0)) && + if ((((((ActiveItemDesc *)(GHIDRA_INT(this) + 0x1580))->_item == 0x28d) && + (bVar2 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x48)))->ANM2::IsPlaying(&s_empty), bVar2 != 0)) && (bVar2 = input_is_action_triggered (g_manager,iVar5,*(int *)((char *)this + 0x1618),(Entity *)0x0,0), bVar2 != 0)) && - (((local_158.y = (float)((ANM2 *)((ANM2 *)((int)this + 0x48)))->ANM2::GetLayer((byte *)"ghost"), + (((local_158.y = (float)((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x48)))->ANM2::GetLayer((byte *)"ghost"), (EntityPtr)local_158.y != (EntityPtr)0x0 && (*(int *)local_158.y != 0)) && (*(char *)((char *)local_158.y + 0x74) != '\0')))) { ((EntityPtr *)((EntityPtr *)&local_16c))->EntityPtr::clear(); @@ -21411,7 +21411,7 @@ LAB_007897da: ((GridEntity *)(gridEntity))->GridEntity::GetType(); render_build_sprite_quad (local_228,&g_vectorZero,(void *)local_13c.y,(LayerState *)local_158.y, - &g_vectorZero,&g_vectorZero,(ANM2 *)((int)this + 0x48)); + &g_vectorZero,&g_vectorZero,(ANM2 *)(GHIDRA_INT(this) + 0x48)); vecResult = ((Vector *)(local_228))->Vector::__add((Vector *)(local_24 + 8),local_210); local_13c.y = 0.5; ((Vector *)(vecResult))->Vector::__mul((Vector *)&local_1a0._h,&local_13c.y); @@ -21419,7 +21419,7 @@ LAB_007897da: ((Vector *)(&local_16c))->Vector::operator_assign(vecResult); } uVar31 = Random(); - tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x90,(Vector *)((int)this + 0x33c),&g_vectorZero, + tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x90,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero, (Entity *)0x0,2,uVar31); ((Entity *)(tmpEntity))->Entity::SetPositionOffset(&local_16c); sprite = (Sprite *)((Entity *)(tmpEntity))->Entity::GetSprite(); @@ -21433,14 +21433,14 @@ LAB_007897da: tmpEntity->Update(); fVar32 = random_float(); this = player; - BVar27._l._0_4_ = (Entity_Effect *)(fVar32 * 0.2 + 0.9); - BVar27._4_12_ = extraout_var_02; + (*(undefined4 *)((char *)&(BVar27._l) + 0x0)) = (Entity_Effect *)(fVar32 * 0.2 + 0.9); + (*(undefined1 *)((char *)&(BVar27) + 0x4)) = extraout_var_02; play_sound_with_fart_seed(0x1dd,1.25,2,0,(float)(Entity_Effect *)BVar27._l); ((Game *)(g_game))->Game::ShakeScreen(0xe); *(undefined1 *)((char *)local_158.y + 0x74) = 0; } } - pAVar21 = (ANM2 *)((int)this + 0x48); + pAVar21 = (ANM2 *)(GHIDRA_INT(this) + 0x48); local_190.y = (float)pAVar21; if (*(int *)((char *)this + 0x13c0) == 0x23) { bVar2 = ((ANM2 *)(pAVar21))->ANM2::IsPlaying((byte *)local_144.y); @@ -21451,25 +21451,25 @@ LAB_007897da: FUN_0069d9d0(); uVar31 = 0; do { - Isaac::DestoryWeapon((Weapon **)((int)((int)this + 0x13e0) + uVar31)); + Isaac::DestoryWeapon((Weapon **)(GHIDRA_INT((GHIDRA_INT(this) + 0x13e0)) + uVar31)); uVar31 = uVar31 + 4; } while (uVar31 < 0x10); - Isaac::DestoryWeapon((void **)((int)this + 0x13dc)); + Isaac::DestoryWeapon((void **)(GHIDRA_INT(this) + 0x13dc)); iVar5 = ((Game *)(g_game))->Game::Challenge(); if (iVar5 == 0x2a) { ::((Color *)((Color *)(local_f0 + 0x2c)))->Color::Color(); BVar27 = g_tearFlagGigaBomb; Game::BombExplosionEffects - (g_game,(Vector *)((int)this + 0x33c),60.0,g_tearFlagGigaBomb,Color, + (g_game,(Vector *)(GHIDRA_INT(this) + 0x33c),60.0,g_tearFlagGigaBomb,Color, (Entity *)this,1.0,1,4,1); } else { - spawn_gibs((Vector *)((int)this + 0x33c),6,40.0,(uint *)&local_158.y,(Entity *)this, - (ColorMod *)((int)this + 0x1b8),&g_vectorZero,1.0); + spawn_gibs((Vector *)(GHIDRA_INT(this) + 0x33c),6,40.0,(uint *)&local_158.y,(Entity *)this, + (ColorMod *)(GHIDRA_INT(this) + 0x1b8),&g_vectorZero,1.0); play_sound_with_fart_seed(0x1b,1.0,2,0,1.0); } LAB_00789f05: - pAVar21 = (ANM2 *)((int)this + 0x48); + pAVar21 = (ANM2 *)(GHIDRA_INT(this) + 0x48); } } else { @@ -21478,19 +21478,19 @@ LAB_00789f05: (bVar2 = ((Sprite *)((Sprite *)pAVar21))->Sprite::IsEventTriggered("DeathSound"), bVar2 != 0)) { bVar2 = IsHologram(this); if (bVar2 == 0) { - BVar27._l._0_4_ = (Entity_Effect *)get_voice_pitch(this); - BVar27._4_12_ = extraout_var_03; + (*(undefined4 *)((char *)&(BVar27._l) + 0x0)) = (Entity_Effect *)get_voice_pitch(this); + (*(undefined1 *)((char *)&(BVar27) + 0x4)) = extraout_var_03; play_sound_with_fart_seed(0xd9,1.0,2,0,(float)(Entity_Effect *)BVar27._l); } if (*(int *)((char *)this + 0x13c0) == 0x19) { - local_150.y = (float)((int)this + 0x33c); + local_150.y = (float)(GHIDRA_INT(this) + 0x33c); vecResult = ((Vector *)((Vector *)(local_24 + 8)))->Vector::Vector(10.0,0.0); - vecResult = ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::__sub((Vector *)&local_1a0._h,vecResult) + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::__sub((Vector *)&local_1a0._h,vecResult) ; Game::ButterBeanFart(g_game,vecResult,120.0,(Entity *)this,1,0); uVar31 = Random(); vecResult = ((Vector *)((Vector *)(local_24 + 8)))->Vector::Vector(10.0,0.0); - vecResult = ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::__sub((Vector *)&local_1a0._h,vecResult) + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::__sub((Vector *)&local_1a0._h,vecResult) ; ((Game *)(g_game))->Game::Spawn(0xf5,0,vecResult,&g_vectorZero,(Entity *)0x0,0,uVar31); local_120 = (EntityPtr)0x6; @@ -21507,8 +21507,8 @@ LAB_00789f05: tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,99,vecResult2,vecResult,(Entity *)0x0,1,uVar31); vecResult = (Vector *)((Entity *)(tmpEntity))->Entity::SpriteScale(); fVar32 = random_float(); - BVar27._l._0_4_ = (Entity_Effect *)(fVar32 * 1.5 + 1.0); - BVar27._4_12_ = extraout_var_04; + (*(undefined4 *)((char *)&(BVar27._l) + 0x0)) = (Entity_Effect *)(fVar32 * 1.5 + 1.0); + (*(undefined1 *)((char *)&(BVar27) + 0x4)) = extraout_var_04; local_164.y = (float)(Entity_Effect *)BVar27._l; vecResult = ((Vector *)(vecResult))->Vector::__mul(&local_174,&local_164.y); ((Entity *)(tmpEntity))->Entity::SetSpriteScale(vecResult); @@ -21516,21 +21516,21 @@ LAB_00789f05: ::((Color *)((Color *)(local_f0 + 0x2c)))->Color::Color(0.4,0.33,0.25,1.0); ((Sprite *)(sprite))->Sprite::SetColor(color_02); tmpEntity->Update(); - local_120 = (EntityPtr)((int)local_120 + -1); + local_120 = (EntityPtr)(GHIDRA_INT(local_120) + -1); } while (local_120 != (EntityPtr)0x0); local_130 = (EntityPtr)0x0; local_120 = (EntityPtr)0x0; this = player; if (0 < player->_poopMana) { do { - if (0x12 < (int)local_130) break; + if (0x12 < GHIDRA_INT(local_130)) break; uVar31 = Random(); vecResult = ((Vector *)((Vector *)(local_24 + 8)))->Vector::Vector(-1.0,0.0); fVar32 = random_float(); vecResult = ((Vector *)(vecResult))->Vector::Rotated((Vector *)&local_1a0._h,fVar32 * 40.0 - 20.0); fVar32 = random_float(); - BVar27._l._0_4_ = (Entity_Effect *)(fVar32 * 6.0 + 3.0); - BVar27._4_12_ = extraout_var_05; + (*(undefined4 *)((char *)&(BVar27._l) + 0x0)) = (Entity_Effect *)(fVar32 * 6.0 + 3.0); + (*(undefined1 *)((char *)&(BVar27) + 0x4)) = extraout_var_05; local_13c.y = (float)(Entity_Effect *)BVar27._l; vecResult = ((Vector *)(vecResult))->Vector::__mul(&local_16c,&local_13c.y); vecResult2 = ((Vector *)(&scratchVec))->Vector::Vector(4.0,0.0); @@ -21540,8 +21540,8 @@ LAB_00789f05: tmpEntity->Update(); this = player; AddPoopMana(player,-1); - local_130 = (EntityPtr)((int)local_130 + 1); - } while ((int)local_130 < this->_poopMana); + local_130 = (EntityPtr)(GHIDRA_INT(local_130) + 1); + } while (GHIDRA_INT(local_130) < this->_poopMana); } goto LAB_00789f05; } @@ -21551,7 +21551,7 @@ LAB_00789f05: (((bVar2 = ((ANM2 *)(pAVar21))->ANM2::IsPlaying((byte *)local_144.y), bVar2 != 0 && ((iVar5 = ((ANM2 *)(pAVar21))->ANM2::GetFrame(), 7 < iVar5 || (*(int *)((char *)this + 0x13c0) == 0x23)))) || (bVar2 = ((ANM2 *)(pAVar21))->ANM2::IsFinishedImpl(&s_empty), bVar2 != 0)))) { - local_158.y = (float)((int)this + 0x1e68); + local_158.y = (float)(GHIDRA_INT(this) + 0x1e68); iVar5 = EntityPtr::Ref(); if ((iVar5 != 0) && (iVar5 = EntityPtr::Ref(), *(char *)(iVar5 + 0x173) == '\0')) { iVar5 = EntityPtr::Ref(); @@ -21604,66 +21604,66 @@ LAB_00789f05: bVar2 = HasCollectible(this,0x177,0); if (bVar2 == 0) { LAB_0078a11e: - local_128 = (RNG *)((uint)local_128 & 0xffffff); + local_128 = (RNG *)(GHIDRA_UINT(local_128) & 0xffffff); } else { ((std::string *)(local_68 + 0x10))->std::string::string_from_cstr(&s_empty); local_8 = 0x13; - local_15c = (EntityPtr)((uint)local_15c | 2); + local_15c = (EntityPtr)(GHIDRA_UINT(local_15c) | 2); local_158.y = (float)local_15c; bVar2 = IsCollectibleAnimFinished(this,0x177,(std_string *)(local_68 + 0x10)); local_128 = (RNG *)CONCAT13(1,(undefined3)local_128); if (bVar2 == 0) goto LAB_0078a11e; } local_8 = 0xffffffff; - if (((uint)local_15c & 2) != 0) { - local_15c = (EntityPtr)((uint)local_15c & 0xfffffffd); + if ((GHIDRA_UINT(local_15c) & 2) != 0) { + local_15c = (EntityPtr)(GHIDRA_UINT(local_15c) & 0xfffffffd); ((std::string *)(local_68 + 0x10))->std::string::_Tidy_deallocate(); } - if (local_128._3_1_ != '\0') { + if ((*(undefined1 *)((char *)&(local_128) + 0x3)) != '\0') { ClearCollectibleAnim(this,0x177); } bVar2 = HasCollectible(this,399,0); if (bVar2 == 0) { LAB_0078a1b2: - local_128 = (RNG *)((uint)local_128 & 0xffffff); + local_128 = (RNG *)(GHIDRA_UINT(local_128) & 0xffffff); } else { ((std::string *)(local_68 + 0x10))->std::string::string_from_cstr(&s_empty); local_8 = 0x14; - local_15c = (EntityPtr)((uint)local_15c | 4); + local_15c = (EntityPtr)(GHIDRA_UINT(local_15c) | 4); local_158.y = (float)local_15c; bVar2 = IsCollectibleAnimFinished(this,399,(std_string *)(local_68 + 0x10)); local_128 = (RNG *)CONCAT13(1,(undefined3)local_128); if (bVar2 == 0) goto LAB_0078a1b2; } local_8 = 0xffffffff; - if (((uint)local_15c & 4) != 0) { - local_15c = (EntityPtr)((uint)local_15c & 0xfffffffb); + if ((GHIDRA_UINT(local_15c) & 4) != 0) { + local_15c = (EntityPtr)(GHIDRA_UINT(local_15c) & 0xfffffffb); ((std::string *)(local_68 + 0x10))->std::string::_Tidy_deallocate(); } - if (local_128._3_1_ != '\0') { + if ((*(undefined1 *)((char *)&(local_128) + 0x3)) != '\0') { ClearCollectibleAnim(this,399); } - bVar2 = ((TemporaryEffects *)((TemporaryEffects *)((int)this + 0x1508)))->TemporaryEffects::HasNullEffect(0x75); + bVar2 = ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508)))->TemporaryEffects::HasNullEffect(0x75); if (bVar2 == 0) { LAB_0078a242: - local_128 = (RNG *)((uint)local_128 & 0xffffff); + local_128 = (RNG *)(GHIDRA_UINT(local_128) & 0xffffff); } else { ((std::string *)(local_68 + 0x10))->std::string::string_from_cstr(&s_empty); local_8 = 0x15; - local_15c = (EntityPtr)((uint)local_15c | 8); + local_15c = (EntityPtr)(GHIDRA_UINT(local_15c) | 8); local_158.y = (float)local_15c; cVar3 = FUN_007ad720(); local_128 = (RNG *)CONCAT13(1,(undefined3)local_128); if (cVar3 == '\0') goto LAB_0078a242; } local_8 = 0xffffffff; - if (((uint)local_15c & 8) != 0) { + if ((GHIDRA_UINT(local_15c) & 8) != 0) { ((std::string *)(local_68 + 0x10))->std::string::_Tidy_deallocate(); } - if (local_128._3_1_ != '\0') { + if ((*(undefined1 *)((char *)&(local_128) + 0x3)) != '\0') { FUN_007ad610(); itemConfig = Isaac::GetItemConfig(); itemCfg = ((Config *)(itemConfig))->Config::GetNullItem(0x75); @@ -21683,16 +21683,16 @@ LAB_0078a242: } bVar2 = ((Game *)(g_game))->Game::GetDebugFlag(7); if (bVar2 != 0) { - piVar15 = (int *)((int)this + 0x1588); + piVar15 = (int *)(GHIDRA_INT(this) + 0x1588); local_120 = (EntityPtr)0x0; do { if (((ActiveItemDesc *)(piVar15 + -2))->_item != 0) { - iVar5 = GetActiveMaxCharge(this,(int)local_120); + iVar5 = GetActiveMaxCharge(this,GHIDRA_INT(local_120)); *piVar15 = iVar5; } - local_120 = (EntityPtr)((int)local_120 + 1); + local_120 = (EntityPtr)(GHIDRA_INT(local_120) + 1); piVar15 = piVar15 + 8; - } while ((uint)local_120 < &DAT_00000004); + } while (GHIDRA_UINT(local_120) < &DAT_00000004); if (*(int *)((char *)this + 0x13c0) == 0x19) { *(int *)((char *)this + 0x1f54) = 9; } @@ -21700,9 +21700,9 @@ LAB_0078a242: bVar2 = ((Game *)(g_game))->Game::IsInTimedSet(1); if ((bVar2 != 0) && (*(int *)((char *)this + 0x2c) == 0)) { musicManager = (MusicManager *)MusicManager::MusicManager(); - fVar32 = ((Vector *)((Vector *)((int)this + 0x360)))->Vector::Length(); + fVar32 = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::Length(); local_13c.y = fVar32 * 0.1 + 0.5; - BVar27 = (BitSet128)ZEXT416((uint)local_13c.y); + BVar27 = (BitSet128)ZEXT416(GHIDRA_UINT(local_13c.y)); ((MusicManager *)(musicManager))->MusicManager::PitchSlide(); } bVar2 = ((Game *)(g_game))->Game::IsInTimedSet(2); @@ -21718,7 +21718,7 @@ LAB_0078a242: ::((Color *)())->Color::Color(); (*vfunc)(); tmpColor = (ColorMod *)::((Color *)())->Color::Color(); - ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::SetColor(tmpColor); + ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::SetColor(tmpColor); } bVar2 = ((Game *)(g_game))->Game::IsInTimedSet(0xe); if (bVar2 != 0) { @@ -21726,25 +21726,25 @@ LAB_0078a242: ::((Color *)())->Color::Color(); (*vfunc)(); tmpColor = (ColorMod *)::((Color *)())->Color::Color(); - ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::SetColor(tmpColor); + ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::SetColor(tmpColor); } bVar2 = ((Game *)(g_game))->Game::IsInTimedSet(0x35); if (bVar2 != 0) { ::((Color *)((Color *)local_98))->Color::Color(); ::((Color *)((Color *)local_98))->Color::SetColorize(1.0,1.0,1.0,1.0); this->SetColor(); - ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::SetColor((ColorMod *)local_98); + ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::SetColor((ColorMod *)local_98); } bVar2 = ((Game *)(g_game))->Game::IsInTimedSet(0x18); if (bVar2 != 0) { room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); - EVar9 = (EntityPtr)((Room *)(room))->Room::GetGridIndex((Vector *)((int)this + 0x33c)); + EVar9 = (EntityPtr)((Room *)(room))->Room::GetGridIndex((Vector *)(GHIDRA_INT(this) + 0x33c)); local_120 = EVar9; room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); - gridEntity = ((Room *)(room))->Room::GetGridEntity((uint)EVar9); + gridEntity = ((Room *)(room))->Room::GetGridEntity(GHIDRA_UINT(EVar9)); if (gridEntity == (GridEntity *)0x0) { local_12a = 0; - local_128 = (RNG *)((uint)local_128 & 0xffffff); + local_128 = (RNG *)(GHIDRA_UINT(local_128) & 0xffffff); LAB_0078a679: local_121 = '\0'; } @@ -21762,23 +21762,23 @@ LAB_0078a64a: } else { local_121 = '\0'; - local_128 = (RNG *)((uint)local_128 & 0xffffff); + local_128 = (RNG *)(GHIDRA_UINT(local_128) & 0xffffff); if (gridEntity != (GridEntity *)0x0) goto LAB_0078a64a; } } room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); - ((Room *)(room))->Room::GetGridPosition((Vector *)(local_24 + 8),(int)local_120); + ((Room *)(room))->Room::GetGridPosition((Vector *)(local_24 + 8),GHIDRA_INT(local_120)); FUN_00a0ff00(); if ((float)BVar27._l < 20.0 - *(float *)((char *)this + 0x370) * 0.5) { room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); bVar2 = ((Room *)(room))->Room::is_type_16(); if ((bVar2 == 0) && - (((gridEntity == (GridEntity *)0x0 || (local_128._3_1_ != '\0')) || + (((gridEntity == (GridEntity *)0x0 || ((*(undefined1 *)((char *)&(local_128) + 0x3)) != '\0')) || ((local_121 != '\0' && (local_12a == 0)))))) { room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); rng = (RNG *)rng_vector_at(); uVar31 = ((RNG *)(rng))->RNG::Next(); - ((Room *)(room))->Room::SpawnGridEntity((int)local_120,0xe,0,uVar31,0); + ((Room *)(room))->Room::SpawnGridEntity(GHIDRA_INT(local_120),0xe,0,uVar31,0); play_sound_with_fart_seed(0x25,0.3,2,0,1.0); } } @@ -21794,9 +21794,9 @@ LAB_0078a64a: FUN_00428b50(); cVar3 = FUN_0082ee30(); if ((cVar3 == '\0') && - (((local_13c.y = ((Vector *)((Vector *)((int)this + 0x1660)))->Vector::Length(), local_13c.y < 0.2 && - (local_13c.y = ((Vector *)((Vector *)((int)this + 0x1654)))->Vector::Length(), local_13c.y < 0.1)) || - ((local_13c.y = ((Vector *)((Vector *)((int)this + 0x1660)))->Vector::Length(), local_13c.y < 0.2 && + (((local_13c.y = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x1660)))->Vector::Length(), local_13c.y < 0.2 && + (local_13c.y = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x1654)))->Vector::Length(), local_13c.y < 0.1)) || + ((local_13c.y = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x1660)))->Vector::Length(), local_13c.y < 0.2 && (*(byte *)((char *)this + 400) != 0)))))) { vfunc = *(code **)(*(int *)this + 0x20); ((EntityRef *)((EntityRef *)local_68))->EntityRef::EntityRef(); @@ -21869,7 +21869,7 @@ LAB_0078aa79: if (0 < iVar5) { if ((*(int *)((char *)this + 0x134c) < 1) && (*(int *)((char *)this + 0x1d88) < 1)) { iVar6 = GetHealthType(this); - iVar6 = scale_for_hard_difficulty(2 - (uint)(iVar6 != 3)); + iVar6 = scale_for_hard_difficulty(2 - GHIDRA_UINT((iVar6 != 3))); if (iVar5 <= iVar6) goto LAB_0078ac08; } bVar2 = HasInstantDeathCurse(this); @@ -21877,7 +21877,7 @@ LAB_0078aa79: iVar5 = ((Entity *)((Entity *)this))->Entity::GetHitPointsLost(); uVar31 = *(int *)((char *)this + 0x138c) - iVar5; *(uint *)((char *)this + 0x138c) = uVar31; - if ((int)uVar31 < 1) { + if (GHIDRA_INT(uVar31) < 1) { *(int *)((char *)this + 0x138c) = 600; vfunc = *(code **)(*(int *)this + 0x20); ((EntityRef *)((EntityRef *)local_68))->EntityRef::EntityRef(); @@ -21885,10 +21885,10 @@ LAB_0078aa79: (*vfunc)(); this = player; } - else if ((int)uVar31 < 0x1e) { + else if (GHIDRA_INT(uVar31) < 0x1e) { uVar31 = uVar31 & 0x80000003; bVar22 = uVar31 == 0; - if ((int)uVar31 < 0) { + if (GHIDRA_INT(uVar31) < 0) { bVar22 = (uVar31 - 1 | 0xfffffffc) == 0xffffffff; } if (bVar22) { @@ -21940,17 +21940,17 @@ LAB_0078ac1d: } LAB_0078ace4: bVar2 = IsHeldItemVisible(this); - vecResult = (Vector *)((int)this + 0x1b1c); + vecResult = (Vector *)(GHIDRA_INT(this) + 0x1b1c); *(byte *)((char *)this + 0x17d8) = bVar2; bVar2 = ((Vector *)(vecResult))->Vector::operator_ne(&g_vectorZero); if (bVar2 != 0) { - vecResult2 = ((Vector *)(vecResult))->Vector::__sub((Vector *)(local_24 + 8),(Vector *)((int)this + 0x33c)); + vecResult2 = ((Vector *)(vecResult))->Vector::__sub((Vector *)(local_24 + 8),(Vector *)(GHIDRA_INT(this) + 0x33c)); local_13c.y = ((Vector *)(vecResult2))->Vector::Length(); if (1.0 < local_13c.y) { - vecResult = ((Vector *)(vecResult))->Vector::__sub((Vector *)(local_24 + 8),(Vector *)((int)this + 0x33c)); + vecResult = ((Vector *)(vecResult))->Vector::__sub((Vector *)(local_24 + 8),(Vector *)(GHIDRA_INT(this) + 0x33c)); local_13c.y = 0.18; vecResult = ((Vector *)(vecResult))->Vector::__mul((Vector *)&local_1a0._h,&local_13c.y); - vecResult = ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::__add(&local_16c,vecResult); + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::__add(&local_16c,vecResult); } ((Entity *)((Entity *)this))->Entity::SetPosition(vecResult); } @@ -22020,12 +22020,12 @@ LAB_0078ace4: goto LAB_0078af55; } } - ((Sprite *)((Sprite *)((int)this + 0x110c)))->Sprite::Stop(); + ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x110c)))->Sprite::Stop(); } else { local_15c = (EntityPtr)0xb67630; LAB_0078af55: - pAVar21 = (ANM2 *)((int)this + 0x110c); + pAVar21 = (ANM2 *)(GHIDRA_INT(this) + 0x110c); cVar3 = ((Sprite *)((Sprite *)pAVar21))->Sprite::IsLoaded(); if (cVar3 == '\0') { ((std::string *)(local_68 + 0x10))->std::string::string_from_cstr((byte *)"gfx/StatusEffects.anm2"); @@ -22050,8 +22050,8 @@ LAB_0078af55: FUN_0041e470(); local_120 = (EntityPtr)FUN_0040bc90(); } - ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::GetOverlayFrame(); - ((ANM2 *)((ANM2 *)((int)this + 0x48)))->ANM2::GetFrame(); + ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::GetOverlayFrame(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x48)))->ANM2::GetFrame(); FUN_00753830(); FUN_00839840(); cVar3 = Level::IsAltStage(); @@ -22219,7 +22219,7 @@ void Entity_Player::Render(Vector *offset) local_8 = -NAN; puStack_c = &LAB_00aff61d; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(&tmpColor)[1]._colorize; + local_14 = __security_cookie ^ GHIDRA_UINT((&tmpColor)[1]._colorize); renderOffset = offset; local_8c = this; if (this->_variant == 2) { @@ -22265,7 +22265,7 @@ void Entity_Player::Render(Vector *offset) return; } if (((manager->_netplayManager != *(NetplayManager *)(manager + 1)) && - (1 < (uint)((int)*(NetplayManager *)(manager + 1) - (int)manager->_netplayManager >> 2))) && + (1 < GHIDRA_UINT((GHIDRA_INT(*(NetplayManager *)(manager + 1)) - GHIDRA_INT(manager->_netplayManager) >> 2)))) && ((bVar1 = IsInvisible(this), bVar1 == 0 || (localPlayer = (Entity_Player *)FUN_0090b0e0(), localPlayer == this)))) { iVar7 = *(int *)(*(int *)this->_shadowImage + 0x10); @@ -22344,7 +22344,7 @@ LAB_0078cef6: if (1 < this->_suplexState) { heldScaleX = pfVar3[4]; heldScaleY = pfVar3[5]; - isHeldBehind = CONCAT31((int3)((uint)uVar6 >> 8),this->_suplexState == 4); + isHeldBehind = CONCAT31((int3)(GHIDRA_UINT(uVar6) >> 8),this->_suplexState == 4); local_58 = pfVar3[0x11]; local_50.y = *(float *)((char *)this->_heldEntity + 0x7c); if (local_50.y != 0.0) { @@ -22354,16 +22354,16 @@ LAB_0078cef6: if (*(int *)((char *)local_50.y + 0x1c) != 0) { iVar7 = 0; do { - local_48.y = (float)((ANM2 *)((ANM2 *)((int)this->_heldEntity + 0x48)))->ANM2::GetLayer(*(byte **)(iVar7 + *(int *)((char *)local_50.y + 0x18) + local_48.y = (float)((ANM2 *)((ANM2 *)(GHIDRA_INT(this->_heldEntity) + 0x48)))->ANM2::GetLayer(*(byte **)(iVar7 + *(int *)((char *)local_50.y + 0x18) )); pvVar4 = AnimationState::GetLayerFrame - ((AnimationState *)((int)this->_heldEntity + 0x78), + ((AnimationState *)(GHIDRA_INT(this->_heldEntity) + 0x78), *(int *)(iVar7 + *(int *)((char *)local_50.y + 0x18))); if (pvVar4 != (void *)0x0) { fStack_14c = 1.109483e-38; render_build_sprite_quad (&quad0X,&g_vectorZero,pvVar4,(LayerState *)local_48.y,&g_vectorZero, - &g_vectorZero,(ANM2 *)((int)this->_heldEntity + 0x48)); + &g_vectorZero,(ANM2 *)(GHIDRA_INT(this->_heldEntity) + 0x48)); fVar9 = quad0X; if (local_90 <= quad0X) { fVar9 = local_90; @@ -22402,8 +22402,8 @@ LAB_0078cef6: } } iVar7 = iVar7 + 0x10; - local_5c = (float)((int)local_5c + 1); - } while ((uint)local_5c < (uint)*(float *)((char *)local_50.y + 0x1c)); + local_5c = (float)(GHIDRA_INT(local_5c) + 1); + } while (GHIDRA_UINT(local_5c) < GHIDRA_UINT(*(float *)((char *)local_50.y + 0x1c))); } sVar2 = fdclass(); if (sVar2 < 1) { @@ -22455,12 +22455,12 @@ LAB_0078d290: tmpColor._colorize[1] = (this->_sprite)._color._colorize[1]; tmpColor._colorize[2] = (this->_sprite)._color._colorize[2]; tmpColor._colorize[3] = (this->_sprite)._color._colorize[3]; - tmpColor._offset._0_8_ = *(undefined8 *)(this->_sprite)._color._offset; + (*(undefined8 *)((char *)&(tmpColor._offset) + 0x0)) = *(undefined8 *)(this->_sprite)._color._offset; if ((this->_afterImageFrames)._size != 0) { do { local_50.y = (float)(this->_afterImageFrames)._offset; - fVar9 = (float)**(int **)((int)(this->_afterImageFrames)._map + - (afterImageIdx + (int)local_50.y & + fVar9 = (float)**(int **)(GHIDRA_INT((this->_afterImageFrames)._map) + + (afterImageIdx + GHIDRA_INT(local_50.y) & (this->_afterImageFrames)._mapSize - 1) * 4) / 10.0; if (fVar9 <= 0.0) { fVar9 = 0.0; @@ -22471,8 +22471,8 @@ LAB_0078d290: tmpColor._tint[3] = fVar9 * (this->_sprite)._color._tint[3] * netplayAlpha; render_color_stack_push(&tmpColor); local_50.y = (float)(this->_afterImageFrames)._offset; - iVar7 = *(int *)((int)(this->_afterImageFrames)._map + - ((int)local_50.y + afterImageIdx & (this->_afterImageFrames)._mapSize - 1) * + iVar7 = *(int *)(GHIDRA_INT((this->_afterImageFrames)._map) + + (GHIDRA_INT(local_50.y) + afterImageIdx & (this->_afterImageFrames)._mapSize - 1) * 4); local_48.x = (*(float *)(iVar7 + 4) - (this->_pos).x) * 0.65 + renderPos.x; local_48.y = (*(float *)(iVar7 + 8) - (this->_pos).y) * 0.65 + renderPos.y; @@ -22517,8 +22517,8 @@ LAB_0078d290: local_48.y = (this->_renderPosition).y - (this->_playerSpriteScale).y * 30.0; FUN_0084a870(); } - if ((1 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)) && + if ((1 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))) && (((local_9c.y == 1.4013e-45 || (local_9c.y == 4.2039e-45)) && (*(int *)&g_game->_roomTransition == 0)))) { iVar7 = PlayerManager::GetPlayerSlotFromController @@ -22718,7 +22718,7 @@ void Entity_Player::RenderGlow(Vector *position) glowSprite = &this->_sprite; } else { - layer = ((ANM2 *)((ANM2 *)(costumeIdx * 0x130 + (int)(this->_costumeSpriteDescs)._begin + layer = ((ANM2 *)((ANM2 *)(costumeIdx * 0x130 + GHIDRA_INT((this->_costumeSpriteDescs)._begin) )))->ANM2::GetLayer((byte *)this->_playerCostumeMap[0]._layerID); savedAlpha = (layer->_color)._tint[3]; if (g_manager->_netplayManager != *(NetplayManager *)(g_manager + 1)) { @@ -22727,17 +22727,17 @@ void Entity_Player::RenderGlow(Vector *position) (&g_manager->_netplayManager,this->_controllerIndex); if (bVar1 == 0) { ((ANM2 *)((ANM2 *)(this->_playerCostumeMap[0]._index * 0x130 + - (int)(this->_costumeSpriteDescs)._begin)))->ANM2::GetLayer((byte *)this->_playerCostumeMap[0]._layerID); + GHIDRA_INT((this->_costumeSpriteDescs)._begin))))->ANM2::GetLayer((byte *)this->_playerCostumeMap[0]._layerID); FUN_00925df0(); *(float *)(extraout_EDX + 0x54) = alphaCopy * savedAlpha; } } ((Sprite *)((Sprite *) (this->_playerCostumeMap[0]._index * 0x130 + - (int)(this->_costumeSpriteDescs)._begin)))->Sprite::RenderLayer(this->_playerCostumeMap[0]._layerID,position,&g_vectorZero,&g_vectorZero); + GHIDRA_INT((this->_costumeSpriteDescs)._begin))))->Sprite::RenderLayer(this->_playerCostumeMap[0]._layerID,position,&g_vectorZero,&g_vectorZero); layerName = (byte *)this->_playerCostumeMap[0]._layerID; glowSprite = (ANM2 *)(this->_playerCostumeMap[0]._index * 0x130 + - (int)(this->_costumeSpriteDescs)._begin); + GHIDRA_INT((this->_costumeSpriteDescs)._begin)); } layer = ((ANM2 *)(glowSprite))->ANM2::GetLayer(layerName); (layer->_color)._tint[3] = savedAlpha; @@ -22774,24 +22774,24 @@ void Entity_Player::RenderBody(Vector *position) } else { if ((this->_canFly == 0) || - (*(char *)(iVar1 * 0x130 + 0x11d + (int)(this->_costumeSpriteDescs)._begin) != '\0')) { + (*(char *)(iVar1 * 0x130 + 0x11d + GHIDRA_INT((this->_costumeSpriteDescs)._begin)) != '\0')) { if (layerId == 1) { local_10.x = (float)(iVar1 * 0x130); costumeItem = *(int **)((char *)local_10.x + 0x114 + - (int)(this->_costumeSpriteDescs)._begin); + GHIDRA_INT((this->_costumeSpriteDescs)._begin)); if (costumeItem != (int *)0x0) { costumeItemType = *costumeItem; if (costumeItemType == 0) { if (costumeItem[1] - 0x4bU < 4) { gushOffsetY = *(float *)((char *)local_10.x + 0xa0 + - (int)(this->_costumeSpriteDescs)._begin) * -15.0; + GHIDRA_INT((this->_costumeSpriteDescs)._begin)) * -15.0; goto LAB_0078dedb; } } else if ((((costumeItemType == 1) || (costumeItemType == 3)) || (costumeItemType == 4) ) && (costumeItem[1] == 0x271)) { gushOffsetY = *(float *)((char *)local_10.x + 0xa0 + - (int)(this->_costumeSpriteDescs)._begin) * -65.0; + GHIDRA_INT((this->_costumeSpriteDescs)._begin)) * -65.0; LAB_0078dedb: if (prevGushOffsetY <= gushOffsetY) { gushOffsetY = prevGushOffsetY; @@ -22799,14 +22799,14 @@ LAB_0078dedb: } } } - ((Sprite *)((Sprite *)(iVar1 * 0x130 + (int)(this->_costumeSpriteDescs)._begin)))->Sprite::RenderLayer(this->_playerCostumeMap[layerId]._layerID,position,&g_vectorZero, + ((Sprite *)((Sprite *)(iVar1 * 0x130 + GHIDRA_INT((this->_costumeSpriteDescs)._begin))))->Sprite::RenderLayer(this->_playerCostumeMap[layerId]._layerID,position,&g_vectorZero, &g_vectorZero); iVar1 = this->_playerCostumeMap[layerId]._index * 0x130; pvVar2 = (this->_costumeSpriteDescs)._begin; prevGushOffsetY = gushOffsetY; - if (((*(int *)(iVar1 + 0x34 + (int)pvVar2) != 0) && + if (((*(int *)(iVar1 + 0x34 + GHIDRA_INT(pvVar2)) != 0) && (pvVar2 = AnimationState::GetLayerFrame - ((AnimationState *)((int)pvVar2 + iVar1 + 0x30), + ((AnimationState *)(GHIDRA_INT(pvVar2) + iVar1 + 0x30), this->_playerCostumeMap[layerId]._layerID), pvVar2 != (void *)0x0 )) && (*(char *)((char *)pvVar2 + 0x2c) != '\0')) { isBodyRendered = true; @@ -22851,7 +22851,7 @@ void Entity_Player::RenderHead(Vector *position) costumeSprite = (Sprite *) (((PlayerCostumeMap *)(costumeLayerIdPtr + -1))->_index * 0x130 + - (int)(this->_costumeSpriteDescs)._begin); + GHIDRA_INT((this->_costumeSpriteDescs)._begin)); layerId = *costumeLayerIdPtr; } ((Sprite *)(costumeSprite))->Sprite::RenderLayer(layerId,position,&g_vectorZero,&g_vectorZero); @@ -22906,7 +22906,7 @@ void Entity_Player::RenderTop(Vector *param_2) costumeIndex = this->_playerCostumeMap[0xb]._index; if (-1 < costumeIndex) { ((Sprite *)((Sprite *) - (costumeIndex * 0x130 + (int)(this->_costumeSpriteDescs)._begin)))->Sprite::RenderLayer(this->_playerCostumeMap[0xb]._layerID,param_2,&g_vectorZero, + (costumeIndex * 0x130 + GHIDRA_INT((this->_costumeSpriteDescs)._begin))))->Sprite::RenderLayer(this->_playerCostumeMap[0xb]._layerID,param_2,&g_vectorZero, &g_vectorZero); return; } @@ -22925,14 +22925,14 @@ void Entity_Player::RemoveCollectibleByHistoryIndex(int index, byte RemovedBool) if (((-1 < index) && (historyItems = (this->_history)._historyItems._begin, - index < ((int)(this->_history)._historyItems._end - (int)historyItems) / 0x1c)) && + index < (GHIDRA_INT((this->_history)._historyItems._end) - GHIDRA_INT(historyItems)) / 0x1c)) && (*(char *)((char *)historyItems + index * 0x1c + 4) == '\0')) { collectibleId = *(int *)((char *)historyItems + index * 0x1c + 8); if (collectibleId < 0) { isInSet = collectible_set_has(&this->_proceduralItems,collectibleId); if (isInSet != 0) goto LAB_0078ff31; } - else if (0 < *(int *)((int)(this->_collectibleCounts)._begin + collectibleId * 4)) { + else if (0 < *(int *)(GHIDRA_INT((this->_collectibleCounts)._begin) + collectibleId * 4)) { LAB_0078ff31: isInSet = (this->_history)._isLocked; (this->_history)._isLocked = 1; @@ -22979,9 +22979,9 @@ void Entity_Player::TriggerCollectibleRemoved(int collectibleID) ((*(int *)&g_game->_deathmatchManager < 2 && ((*(undefined1 *)((char *)(game) + 0x1c030)) == '\0')))) { isUserTracked = FUN_00425a70(netUserId); if (isUserTracked == '\0') { - online_stats_add_user(itemRng,(uint)netUserId,(uint)local_1c); + online_stats_add_user(itemRng,GHIDRA_UINT(netUserId),GHIDRA_UINT(local_1c)); } - iVar2 = FUN_00426560((uint)netUserId,local_1c); + iVar2 = FUN_00426560(GHIDRA_UINT(netUserId),local_1c); if (iVar2 != 0) { *(float *)(iVar2 + 0x14) = *(float *)(iVar2 + 0x14) - 1.0; } @@ -22994,7 +22994,7 @@ void Entity_Player::TriggerCollectibleRemoved(int collectibleID) else if (collectibleID == 0x51) { iVar2 = GetCollectibleNum(this,0x51,0); newCatLives = this->_deadCatLives; - if (iVar2 * 9 < (int)this->_deadCatLives) { + if (iVar2 * 9 < GHIDRA_INT(this->_deadCatLives)) { newCatLives = (short)(iVar2 * 9); } this->_deadCatLives = newCatLives; @@ -23011,7 +23011,7 @@ void Entity_Player::TriggerCollectibleRemoved(int collectibleID) if (collectibleID == 0xfb) { switchD_0079018f_caseD_fc: uVar3 = GetMaxPocketItems(this); - uVar4 = (uint)(this->_pocketSlots[0] != 0); + uVar4 = GHIDRA_UINT((this->_pocketSlots[0] != 0)); uVar5 = uVar4 + 1; if (this->_pocketSlots[2] == 0) { uVar5 = uVar4; @@ -23046,7 +23046,7 @@ switchD_0079018f_caseD_fc: if (slotIndex < 3) { srcSlot = (QueueItemData *)(pocketSlot + 2); for (uVar5 = (3 - slotIndex) * 2 & 0x3ffffffe; uVar5 != 0; uVar5 = uVar5 - 1) { - *pocketSlot = (int)srcSlot->_item; + *pocketSlot = GHIDRA_INT(srcSlot->_item); srcSlot = (QueueItemData *)&srcSlot->_charge; pocketSlot = pocketSlot + 1; } @@ -23059,7 +23059,7 @@ switchD_0079018f_caseD_fc: } slotIndex = slotIndex - 1; local_1c = pocketSlot + -2; - } while (-1 < (int)slotIndex); + } while (-1 < GHIDRA_INT(slotIndex)); } else { if (collectibleID == 0x23) { @@ -23102,7 +23102,7 @@ switchD_0079025a_caseD_1ca: uVar5 = ((RNG *)(itemRng))->RNG::RandomInt(4); this->_purityState = uVar5; nullItems = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)nullItems & 0xfffffffcU) < + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(nullItems) & 0xfffffffcU)) < 0x45) { RemoveCostume(this,(ItemConfig_Item *)0x0); } @@ -23152,7 +23152,7 @@ void Entity_Player::ClearTemporaryEffects() undefined4 local_c; uint collectibleId; - if ((int)(this->_temporaryeffects)._effects._end - (int)(this->_temporaryeffects)._effects._begin + if (GHIDRA_INT((this->_temporaryeffects)._effects._end) - GHIDRA_INT((this->_temporaryeffects)._effects._begin) >> 4 != 0) { ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::ClearEffects(0); } @@ -23206,8 +23206,8 @@ LAB_00790947: if ((*(int *)*piVar3 == 2) && (((int *)*piVar3)[1] == 0xa2)) { if ((piVar3[1] == 1) && ((pvVar1 = (g_manager->_itemConfig)._trinkets._begin, - 0x288 < (int)((int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar1 & 0xfffffffcU - ) && (iVar2 = *(int *)((char *)pvVar1 + 0x288), iVar2 != 0)))) { + 0x288 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar1) & 0xfffffffcU + )) && (iVar2 = *(int *)((char *)pvVar1 + 0x288), iVar2 != 0)))) { trinketEffect[2] = *(undefined4 *)(iVar2 + 0x78); trinketEffect[1] = 0; local_c = 0; @@ -23227,15 +23227,15 @@ LAB_00790947: piVar3 = collectibleNode; collectibleId = collectibleNode[4]; if (g_game == (Game *)0x0) { - if (-1 < (int)collectibleId) goto LAB_00790a4a; + if (-1 < GHIDRA_INT(collectibleId)) goto LAB_00790a4a; LAB_00790a64: itemConfig = (int *)0x0; } - else if ((int)collectibleId < 0) { - if (((int)collectibleId < 0) && + else if (GHIDRA_INT(collectibleId) < 0) { + if ((GHIDRA_INT(collectibleId) < 0) && (pvVar1 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)~collectibleId < - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar1 >> 2)) { + GHIDRA_INT(~collectibleId) < + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar1) >> 2)) { itemConfig = (int *)**(undefined4 **)((char *)pvVar1 + ~collectibleId * 4); } else { @@ -23245,8 +23245,8 @@ LAB_00790a64: else { LAB_00790a4a: pvVar1 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar1 >> 2 <= - (int)collectibleId) goto LAB_00790a64; + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar1) >> 2 <= + GHIDRA_INT(collectibleId)) goto LAB_00790a64; itemConfig = *(int **)((char *)pvVar1 + collectibleId * 4); } if ((*itemConfig != 3) && (iVar2 = 0, 0 < collectibleNode[5])) { @@ -23267,9 +23267,9 @@ LAB_00790a4a: (&this->_roomTemporaryCollectibles, (fuzzer_allocator_> *) &this->_roomTemporaryCollectibles,(_Tree_node *)piVar3[1]); - piVar3[1] = (int)piVar3; - *piVar3 = (int)piVar3; - piVar3[2] = (int)piVar3; + piVar3[1] = GHIDRA_INT(piVar3); + *piVar3 = GHIDRA_INT(piVar3); + piVar3[2] = GHIDRA_INT(piVar3); (this->_roomTemporaryCollectibles)._size = 0; } SetPocketActiveItem(this,0,3,0); @@ -23277,7 +23277,7 @@ LAB_00790a4a: joined_r0x00790924: if (piVar3 == *(int **)((char *)pvVar1 + 0x1510)) goto LAB_00790947; if ((*(int *)*piVar3 == 0) && (((int *)*piVar3)[1] == 0x70)) { - ((TemporaryEffects *)((TemporaryEffects *)((int)pvVar1 + 0x1508)))->TemporaryEffects::RemoveNullEffect(0x70,-1); + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(pvVar1) + 0x1508)))->TemporaryEffects::RemoveNullEffect(0x70,-1); goto LAB_00790947; } piVar3 = piVar3 + 4; @@ -23402,7 +23402,7 @@ int Entity_Player::GetActiveMaxCharge(int slot) } maxCharge = GetCollectibleMaxCharge (this,this->_activeDesc[slot]._item,this->_activeDesc[slot]._varData, - (int)this); + GHIDRA_INT(this)); return maxCharge; } @@ -23552,7 +23552,7 @@ void Entity_Player::ControlActiveItem(int slot) local_8 = 0xffffffff; puStack_c = &LAB_00aff6b3; local_10 = ExceptionList; - uVar4 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar4 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; savedSlot = slot; if (this->_variant == 1) { return; @@ -23596,7 +23596,7 @@ LAB_00791acf: if (((isItemTriggered != '\0') && (local_43 != '\0')) || (slot != 0)) { iVar12 = 10; } - bVar2 = input_is_action_pressed(iVar12,this->_controllerIndex,(Entity *)this,(int)pNVar9); + bVar2 = input_is_action_pressed(iVar12,this->_controllerIndex,(Entity *)this,GHIDRA_INT(pNVar9)); if (bVar2 == 0) { LAB_00791b40: isItemPressed = '\0'; @@ -23646,9 +23646,9 @@ LAB_00791bd4: ExceptionList = local_10; return; } - local_56._1_1_ = (*(undefined1 *)((char *)(this) + 0x26cc)); + (*(undefined1 *)((char *)&(local_56) + 0x1)) = (*(undefined1 *)((char *)(this) + 0x26cc)); (*(undefined1 *)((char *)(this) + 0x26cc)) = 0; - if (local_56._1_1_ != '\0') { + if ((*(undefined1 *)((char *)&(local_56) + 0x1)) != '\0') { isItemTriggered = '\x01'; isItemPressed = '\x01'; } @@ -23683,8 +23683,8 @@ LAB_00791bd4: local_90.y = this->_speedMultiplier * this->_friction * (this->_velocity).y + (this->_pos).y; local_90.x = this->_speedMultiplier * in_XMM0_Da + (this->_pos).x; EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),&local_88,&local_90,this->_size + 150.0, - (uint)(1 < *(int *)&g_game->_deathmatchManager) * 4 + 10); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&local_88,&local_90,this->_size + 150.0, + GHIDRA_UINT((1 < *(int *)&g_game->_deathmatchManager)) * 4 + 10); uVar4 = 0; nearbyCount = local_88._size; if ((undefined1 *)local_88._size != (undefined1 *)0x0) { @@ -23714,9 +23714,9 @@ LAB_00791e44: (tmpEntity->_velocity).y * tmpEntity->_friction; in_XMM0_Da = tmpEntity->_speedMultiplier * (tmpEntity->_velocity).x * tmpEntity->_friction; - local_78.x._0_1_ = SUB41(in_XMM0_Da,0); - local_78.x._1_1_ = (byte)((uint)in_XMM0_Da >> 8); - local_78.x._2_2_ = (undefined2)((uint)in_XMM0_Da >> 0x10); + (*(undefined1 *)((char *)&(local_78.x) + 0x0)) = SUB41(in_XMM0_Da,0); + (*(undefined1 *)((char *)&(local_78.x) + 0x1)) = (byte)(GHIDRA_UINT(in_XMM0_Da) >> 8); + (*(undefined2 *)((char *)&(local_78.x) + 0x2)) = (undefined2)(GHIDRA_UINT(in_XMM0_Da) >> 0x10); ((Entity *)(tmpEntity))->Entity::GetCollisionCapsule(&CStack_3c,&local_78); local_6c.y = 0.0; local_6c.x = 0.0; @@ -23739,10 +23739,10 @@ LAB_00791f0d: ((EntityList_Query *)(&local_88))->EntityList_Query::~EntityList_Query(); slot = savedSlot; } - local_50 = (Manager *)((uint)local_50 & 0xffffff00); - slotOffset = (int)(slot + 0xac) * 0x20; + local_50 = (Manager *)(GHIDRA_UINT(local_50) & 0xffffff00); + slotOffset = GHIDRA_INT((slot + 0xac)) * 0x20; local_43 = '\0'; - local_90.y = *(float *)((int)&(this->_sprite)._filename + slotOffset + -0x48); + local_90.y = *(float *)(GHIDRA_INT(&(this->_sprite)._filename) + slotOffset + -0x48); if (local_90.y == 4.56823e-43) { local_4c = slot * 0x20; bVar2 = AreControlsEnabled(this); @@ -23757,7 +23757,7 @@ LAB_007922ae: if (bVar2 == 0) { local_48 = (ItemConfig_Item *)0x10b; seed_fart_sound_override((int *)&local_48); - ((SoundEffects *)(&pMVar1->_sfxManager))->SoundEffects::Play((int)local_48,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&pMVar1->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_48),1.0,2,0,1.0,0.0); DischargeActiveItem(this,slot,0); iVar10 = local_4c; } @@ -23771,7 +23771,7 @@ LAB_007922ae: goto LAB_007926d7; } } - *(undefined4 *)((int)&this->_activeDesc[0]._timeRechargeCooldown + iVar10) = 9; + *(undefined4 *)(GHIDRA_INT(&this->_activeDesc[0]._timeRechargeCooldown) + iVar10) = 9; } } else { @@ -23782,27 +23782,27 @@ LAB_00791ff1: bVar2 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x4000); if (bVar2 == 0) { iVar10 = GetActiveMaxCharge(this,slot); - local_54 = (Manager *)((int)(iVar10 + (iVar10 >> 0x1f & 3U)) >> 2); + local_54 = (Manager *)(GHIDRA_INT((iVar10 + (iVar10 >> 0x1f & 3U))) >> 2); bVar2 = ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::HasCollectibleEffect(0x146); if (bVar2 == 0) { local_48 = (ItemConfig_Item *)this->_activeDesc[slot]._batteryCharge; local_6c.y = (float)&DAT_00000004; - if ((int)local_48 < 1) { + if (GHIDRA_INT(local_48) < 1) { piVar8 = &this->_activeDesc[slot]._charge; local_48 = (ItemConfig_Item *)*piVar8; drainAmount = &local_6c.y; - if ((int)local_48 < 5) { + if (GHIDRA_INT(local_48) < 5) { drainAmount = (float *)piVar8; } - AddActiveCharge(this,-(int)*drainAmount,slot,0,0,0); + AddActiveCharge(this,-GHIDRA_INT(*drainAmount),slot,0,0,0); iVar10 = this->_activeDesc[slot]._charge; } else { drainAmount = &local_6c.y; - if ((int)local_48 < 5) { + if (GHIDRA_INT(local_48) < 5) { drainAmount = (float *)&this->_activeDesc[slot]._batteryCharge; } - AddActiveCharge(this,-(int)*drainAmount,slot,0,0,0); + AddActiveCharge(this,-GHIDRA_INT(*drainAmount),slot,0,0,0); iVar10 = this->_activeDesc[slot]._batteryCharge; } if (iVar10 < 1) { @@ -23812,7 +23812,7 @@ LAB_00791ff1: pMVar1 = g_manager; local_48 = (ItemConfig_Item *)0x1fa; seed_fart_sound_override((int *)&local_48); - ((SoundEffects *)(&pMVar1->_sfxManager))->SoundEffects::Play((int)local_48,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&pMVar1->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_48),1.0,2,0,1.0,0.0); breathEffectSlot = &this->_breathOfLifeEffect; if (this->_breathOfLifeEffect != (EntityPtr)0x0) { (**(code **)(*(int *)this->_breathOfLifeEffect + 0x28))(); @@ -23827,16 +23827,16 @@ LAB_00791ff1: ((Game *)(g_game))->Game::Spawn(1000,0x7b,&this->_pos,&this->_velocity, (Entity *)this,9,uVar4); *breathEffectSlot = breathEffect; - ((Vector *)((int)breathEffect + 0x34c))->x = 0.0; + ((Vector *)(GHIDRA_INT(breathEffect) + 0x34c))->x = 0.0; *(float *)((char *)breathEffect + 0x350) = -15.0; - local_54 = (Manager *)((int)*breathEffectSlot + 0x3bc); + local_54 = (Manager *)(GHIDRA_INT(*breathEffectSlot) + 0x3bc); if (*(int *)local_54 != 0) { local_6c.y = (float)local_54; std::multiset::erase(&local_6c.y); } *(Entity_Player **)local_54 = this; std::multiset::insert(local_54); - ((ANM2 *)((ANM2 *)((int)*breathEffectSlot + 0x48)))->ANM2::Play((byte *)"Appear",0); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(*breathEffectSlot) + 0x48)))->ANM2::Play((byte *)"Appear",0); bVar2 = HasCollectible(this,0x3b,0); if (bVar2 != 0) { local_40 = 0x3f800000; @@ -23855,14 +23855,14 @@ LAB_00791ff1: } (**(code **)(*(int *)*breathEffectSlot + 0xc))(); isItemTriggered = '\0'; - *(undefined4 *)((int)&this->_activeDesc[0]._timeRechargeCooldown + local_4c) = 0xb; + *(undefined4 *)(GHIDRA_INT(&this->_activeDesc[0]._timeRechargeCooldown) + local_4c) = 0xb; goto LAB_007926d7; } } else { - local_6c.y = (float)(iVar10 / (int)local_54); - if ((int)local_6c.y < (int)local_48 / (int)local_54) { - in_XMM0_Da = (float)(int)local_6c.y * 0.2; + local_6c.y = (float)(iVar10 / GHIDRA_INT(local_54)); + if (GHIDRA_INT(local_6c.y) < GHIDRA_INT(local_48) / GHIDRA_INT(local_54)) { + in_XMM0_Da = (float)GHIDRA_INT(local_6c.y) * 0.2; fVar13 = 1.6 - in_XMM0_Da; if (fVar13 <= 1.0) { fVar13 = 1.0; @@ -23884,7 +23884,7 @@ LAB_00792293: if (9 < iVar10) goto LAB_00791ff1; iVar10 = GetActiveMaxCharge(this,slot); if (iVar10 <= this->_activeDesc[slot]._charge) { - local_50 = (Manager *)CONCAT31(local_50._1_3_,1); + local_50 = (Manager *)CONCAT31((*(undefined1 *)((char *)&(local_50) + 0x1)),1); iVar10 = GetActiveMaxCharge(this,slot); if (this->_activeDesc[slot]._batteryCharge < iVar10) { this->_activeDesc[slot]._batteryCharge = 0; @@ -23914,16 +23914,16 @@ LAB_00792293: FlushQueueItem(this); pMVar1 = (Manager *)this->_activeDesc[0]._item; local_6c.y = (float)pMVar1; - bVar2 = ItemConfig::IsValidCollectible((int)pMVar1); + bVar2 = ItemConfig::IsValidCollectible(GHIDRA_INT(pMVar1)); if (((bVar2 != 0) && (pMVar1 != (Manager *)0x248)) && ((bVar2 = HasCollectible(this,0x216,0), bVar2 == 0 || ((bVar2 = ItemConfig::IsValidCollectible(this->_activeDesc[1]._item), bVar2 != 0 && (this->_activeDesc[1]._item != 0x248)))))) { - RemoveCollectible(this,(uint)pMVar1,0,0,0); + RemoveCollectible(this,GHIDRA_UINT(pMVar1),0,0,0); bVar2 = ((Game *)(g_game))->Game::IsGreedMode(); - uVar4 = ((RNG *)((RNG *)((int)local_6c.y * 0x10 + - (int)(this->_collectibleRNGs)._begin)))->RNG::Next(); - tainted_cain_pedestal_burst(this,&this->_pos,unused_01,uVar4,(uint)bVar2 << 4); + uVar4 = ((RNG *)((RNG *)(GHIDRA_INT(local_6c.y) * 0x10 + + GHIDRA_INT((this->_collectibleRNGs)._begin))))->RNG::Next(); + tainted_cain_pedestal_burst(this,&this->_pos,unused_01,uVar4,GHIDRA_UINT(bVar2) << 4); } } ((HUD *)(&g_game->_hud))->HUD::ShowItemText(this,local_48); @@ -23936,7 +23936,7 @@ LAB_00792293: isDontUpdate = 0; bVar2 = 0; iVar10 = Entity_Familiar::GetRandomWisp - ((RNG *)((int)(this->_collectibleRNGs)._begin + 0x2c60)); + ((RNG *)(GHIDRA_INT((this->_collectibleRNGs)._begin) + 0x2c60)); AddWisp(this,iVar10,position,bVar2,isDontUpdate); } } @@ -23957,7 +23957,7 @@ LAB_00792293: pMVar1 = g_manager; local_48 = (ItemConfig_Item *)0x84; seed_fart_sound_override((int *)&local_48); - ((SoundEffects *)(&pMVar1->_sfxManager))->SoundEffects::Play((int)local_48,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&pMVar1->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_48),1.0,2,0,1.0,0.0); } } else { @@ -23970,7 +23970,7 @@ LAB_00792293: game = g_game; if (local_44 == 0) { bVar2 = AreControlsEnabled(this); - if ((bVar2 != 0) && (local_50 = (Manager *)((uint)local_50 & 0xff), isItemPressed != '\0')) { + if ((bVar2 != 0) && (local_50 = (Manager *)(GHIDRA_UINT(local_50) & 0xff), isItemPressed != '\0')) { local_50 = (Manager *)0x1; } } @@ -23986,10 +23986,10 @@ LAB_00792293: if ((((bVar2 != 0) && (local_44 != 0)) && (local_43 == '\0')) && ((bVar2 = ((Entity *)((Entity *)this))->Entity::IsFrame(6,0), bVar2 != 0 && (wisp = AddWisp(this,0x28f,&this->_pos,0,1), wisp != (Entity_Familiar *)0x0)))) { - uVar14 = *(undefined4 *)((int)&wisp->_flags + 4); + uVar14 = *(undefined4 *)(GHIDRA_INT(&wisp->_flags) + 4); iVar10 = *(int *)wisp; - *(uint *)&wisp->_flags = (uint)wisp->_flags & 0xfffffffb; - *(undefined4 *)((int)&wisp->_flags + 4) = uVar14; + *(uint *)&wisp->_flags = GHIDRA_UINT(wisp->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&wisp->_flags) + 4) = uVar14; wisp->_isNotCountedAsFollower = 1; (**(code **)(iVar10 + 0xc))(); } @@ -24000,23 +24000,23 @@ LAB_007926d7: local_4c = 0; uVar4 = 0; do { - iVar10 = *(int *)((int)&this->_activeDesc[0]._timeRechargeCooldown + uVar4); + iVar10 = *(int *)(GHIDRA_INT(&this->_activeDesc[0]._timeRechargeCooldown) + uVar4); if (0 < iVar10) { - *(int *)((int)&this->_activeDesc[0]._timeRechargeCooldown + uVar4) = iVar10 + -1; + *(int *)(GHIDRA_INT(&this->_activeDesc[0]._timeRechargeCooldown) + uVar4) = iVar10 + -1; } - if (*(int *)((int)&this->_activeDesc[0]._item + uVar4) != 0) { + if (*(int *)(GHIDRA_INT(&this->_activeDesc[0]._item) + uVar4) != 0) { pIVar6 = (ItemConfig_Item *)GetActiveMaxCharge(this,local_4c); local_48 = pIVar6; local_78.y = (float)GetActiveMaxCharge(this,local_4c); local_54 = (Manager *)GetActiveMaxCharge(this,local_4c); - if (*(int *)((int)&this->_activeDesc[0]._timeRechargeCooldown + uVar4) < 1) { + if (*(int *)(GHIDRA_INT(&this->_activeDesc[0]._timeRechargeCooldown) + uVar4) < 1) { local_6c.y = (float)g_manager; itemConfig = ItemConfig::GetCollectible (&g_manager->_itemConfig, - *(int *)((int)&this->_activeDesc[0]._item + uVar4)); + *(int *)(GHIDRA_INT(&this->_activeDesc[0]._item) + uVar4)); if ((itemConfig != (ItemConfig_Item *)0x0) && (itemConfig->chargeType == 1)) { iVar10 = 1; - if (*(int *)((int)&this->_activeDesc[0]._item + uVar4) == 0x246) { + if (*(int *)(GHIDRA_INT(&this->_activeDesc[0]._item) + uVar4) == 0x246) { if ((this->_temporaryeffects)._disabled == 0) { for (piVar8 = (this->_temporaryeffects)._effects._begin; piVar8 != (this->_temporaryeffects)._effects._end; piVar8 = piVar8 + 4) { @@ -24043,34 +24043,34 @@ LAB_007927a6: } iVar10 = (iVar10 + 1) * iVar10; } - iVar12 = *(int *)((int)&this->_activeDesc[0]._charge + uVar4); - if (iVar12 < (int)local_48) { - iVar12 = (int)local_48 - iVar12; + iVar12 = *(int *)(GHIDRA_INT(&this->_activeDesc[0]._charge) + uVar4); + if (iVar12 < GHIDRA_INT(local_48)) { + iVar12 = GHIDRA_INT(local_48) - iVar12; iVar7 = iVar10; if (iVar12 < iVar10) { iVar7 = iVar12; } - iVar12 = *(int *)((int)&this->_activeDesc[0]._charge + uVar4) + iVar7; + iVar12 = *(int *)(GHIDRA_INT(&this->_activeDesc[0]._charge) + uVar4) + iVar7; iVar10 = iVar10 - iVar7; - *(int *)((int)&this->_activeDesc[0]._charge + uVar4) = iVar12; - if ((int)local_48 <= iVar12) { + *(int *)(GHIDRA_INT(&this->_activeDesc[0]._charge) + uVar4) = iVar12; + if (GHIDRA_INT(local_48) <= iVar12) { ((HUD *)(&g_game->_hud))->HUD::FlashChargeBar(this,local_4c); local_60 = 0xab; seed_fart_sound_override(&local_60); - ((SoundEffects *)((SoundEffects *)((int)local_6c.y + 0x2a324)))->SoundEffects::Play(local_60,1.0,2,0,1.0, + ((SoundEffects *)((SoundEffects *)(GHIDRA_INT(local_6c.y) + 0x2a324)))->SoundEffects::Play(local_60,1.0,2,0,1.0, 0.0); } } bVar2 = HasCollectible(this,0x3f,0); if (((bVar2 != 0) && - (iVar12 = *(int *)((int)&this->_activeDesc[0]._batteryCharge + uVar4), - iVar12 < (int)local_48)) && (0 < iVar10)) { - if ((int)local_48 - iVar12 < iVar10) { - iVar10 = (int)local_48 - iVar12; + (iVar12 = *(int *)(GHIDRA_INT(&this->_activeDesc[0]._batteryCharge) + uVar4), + iVar12 < GHIDRA_INT(local_48))) && (0 < iVar10)) { + if (GHIDRA_INT(local_48) - iVar12 < iVar10) { + iVar10 = GHIDRA_INT(local_48) - iVar12; } - *(int *)((int)&this->_activeDesc[0]._batteryCharge + uVar4) = iVar10 + iVar12; + *(int *)(GHIDRA_INT(&this->_activeDesc[0]._batteryCharge) + uVar4) = iVar10 + iVar12; pIVar6 = local_48; - if (iVar10 + iVar12 < (int)local_48) goto LAB_0079293f; + if (iVar10 + iVar12 < GHIDRA_INT(local_48)) goto LAB_0079293f; ((HUD *)(&g_game->_hud))->HUD::FlashChargeBar(this,local_4c); pMVar1 = g_manager; local_60 = 0xaa; @@ -24093,9 +24093,9 @@ LAB_007927a6: LAB_0079293f: bVar2 = HasCollectible(this,0x74,0); if (((bVar2 != 0) && ((ItemConfig_Item *)local_78.y == (ItemConfig_Item *)0x1)) && - ((*(int *)((int)&this->_activeDesc[0]._charge + uVar4) == 0 && + ((*(int *)(GHIDRA_INT(&this->_activeDesc[0]._charge) + uVar4) == 0 && (local_54 == (Manager *)0x0)))) { - iVar10 = *(int *)((int)&this->_activeDesc[0]._subCharge + uVar4); + iVar10 = *(int *)(GHIDRA_INT(&this->_activeDesc[0]._subCharge) + uVar4); if (iVar10 == 0) { iVar7 = *(int *)((char *)g_game->_room + 0x12c0) + *(int *)((char *)g_game->_room + 0x12c4); iVar12 = 0; @@ -24105,26 +24105,26 @@ LAB_0079293f: if (iVar12 < 1) goto LAB_007929af; } iVar10 = iVar10 + 1; - *(int *)((int)&this->_activeDesc[0]._subCharge + uVar4) = iVar10; + *(int *)(GHIDRA_INT(&this->_activeDesc[0]._subCharge) + uVar4) = iVar10; if (iVar10 < 0x1c2) goto LAB_007929ba; - *(undefined4 *)((int)&this->_activeDesc[0]._charge + uVar4) = 1; + *(undefined4 *)(GHIDRA_INT(&this->_activeDesc[0]._charge) + uVar4) = 1; } LAB_007929af: - *(undefined4 *)((int)&this->_activeDesc[0]._subCharge + uVar4) = 0; + *(undefined4 *)(GHIDRA_INT(&this->_activeDesc[0]._subCharge) + uVar4) = 0; } LAB_007929ba: bVar2 = HasCollectible(this,0x287,0); if (((bVar2 == 0) || (local_54 != (Manager *)0x0)) || - (((int)pIVar6 <= *(int *)((int)&this->_activeDesc[0]._charge + uVar4) && + ((GHIDRA_INT(pIVar6) <= *(int *)(GHIDRA_INT(&this->_activeDesc[0]._charge) + uVar4) && ((bVar2 = HasCollectible(this,0x3f,0), bVar2 == 0 || - ((int)pIVar6 <= *(int *)((int)&this->_activeDesc[0]._batteryCharge + uVar4))))))) { - *(undefined4 *)((int)&this->_activeDesc[0]._partialCharge + uVar4) = 0; + (GHIDRA_INT(pIVar6) <= *(int *)(GHIDRA_INT(&this->_activeDesc[0]._batteryCharge) + uVar4))))))) { + *(undefined4 *)(GHIDRA_INT(&this->_activeDesc[0]._partialCharge) + uVar4) = 0; } else { - in_XMM0_Da = *(float *)((int)&this->_activeDesc[0]._partialCharge + uVar4); + in_XMM0_Da = *(float *)(GHIDRA_INT(&this->_activeDesc[0]._partialCharge) + uVar4); if (1.0 <= in_XMM0_Da) { in_XMM0_Da = in_XMM0_Da - 1.0; - *(float *)((int)&this->_activeDesc[0]._partialCharge + uVar4) = in_XMM0_Da; + *(float *)(GHIDRA_INT(&this->_activeDesc[0]._partialCharge) + uVar4) = in_XMM0_Da; AddActiveCharge(this,1,local_4c,0,0,0); } } @@ -24138,12 +24138,12 @@ LAB_007929ba: if ((bVar2 == 0) || ((isItemTriggered == '\0' && ((char)local_50 == '\0')))) goto LAB_00793653; local_6c.y = (float)this->_itemState; this->_lastActionTriggers = this->_lastActionTriggers | 0x10; - iVar10 = *(int *)((int)(&(this->_sprite)._filename + -3) + slotOffset); + iVar10 = *(int *)(GHIDRA_INT((&(this->_sprite)._filename + -3)) + slotOffset); isItemTriggered = '\x01'; if (iVar10 != 0x93) { if (iVar10 == 0x2d2) { EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&local_88,1000,0xc1,0,0,0); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&local_88,1000,0xc1,0,0,0); iVar10 = 0; fVar13 = 1e+09; uVar4 = 0; @@ -24161,7 +24161,7 @@ LAB_007929ba: } } uVar4 = uVar4 + 1; - } while (uVar4 < (uint)local_88._size); + } while (uVar4 < GHIDRA_UINT(local_88._size)); slot = savedSlot; if (iVar10 != 0) { *(undefined1 *)(iVar10 + 0x173) = 1; @@ -24171,7 +24171,7 @@ LAB_007929ba: } else { if (iVar10 != 0x2d9) goto LAB_00792c68; - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&local_88,3,0xf3,0,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&local_88,3,0xf3,0,0,0); uVar4 = 0; if ((undefined1 *)local_88._size != (undefined1 *)0x0) { do { @@ -24186,7 +24186,7 @@ LAB_007929ba: isItemTriggered = '\0'; } uVar4 = uVar4 + 1; - } while (uVar4 < (uint)local_88._size); + } while (uVar4 < GHIDRA_UINT(local_88._size)); } } ((EntityList_Query *)(&local_88))->EntityList_Query::~EntityList_Query(); @@ -24200,20 +24200,20 @@ LAB_007929ba: goto LAB_007935ed; } LAB_00792c68: - iVar10 = *(int *)((int)(&(this->_sprite)._filename + -3) + slotOffset); + iVar10 = *(int *)(GHIDRA_INT((&(this->_sprite)._filename + -3)) + slotOffset); if (iVar10 == 0) goto LAB_007935ed; local_78.y = (float)((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(iVar10); local_60 = GetActiveMaxCharge(this,slot); - iVar10 = *(int *)((int)(&(this->_sprite)._filename + -3) + slotOffset); + iVar10 = *(int *)(GHIDRA_INT((&(this->_sprite)._filename + -3)) + slotOffset); if (iVar10 == 0x28f) { if ((char)local_50 == '\0') goto LAB_00792df3; if (this->_activeDesc[slot]._charge < 0x10) goto LAB_00792da8; pvVar5 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar5 & 0xfffffffcU) < 0xc9) { - local_88._0_4_ = 0; + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar5) & 0xfffffffcU)) < 0xc9) { + (*(undefined4 *)((char *)&(local_88) + 0x0)) = 0; } else { - local_88._0_4_ = *(undefined4 *)((char *)pvVar5 + 200); + (*(undefined4 *)((char *)&(local_88) + 0x0)) = *(undefined4 *)((char *)pvVar5 + 200); } local_88._data = (int *)0x0; local_88._size = 0; @@ -24242,17 +24242,17 @@ LAB_00792da8: if (this->_activeDesc[slot]._charge != local_60) goto LAB_00792df3; bVar2 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x4000); if (bVar2 != 0) goto LAB_007935ed; - UseActiveItem(this,(short *)((int)&local_70 + 2),iVar10,5,slot,0); + UseActiveItem(this,(short *)(GHIDRA_INT(&local_70) + 2),iVar10,5,slot,0); AddActiveCharge(this,-1,0,0,0,0); goto LAB_00793273; } LAB_00792df3: cVar3 = ((KAGE_Filesys_FileManager *)((KAGE_Filesys_FileManager *)this))->KAGE_Filesys_FileManager::OpenRead(iVar10,slot); - iVar10 = *(int *)((int)&(this->_sprite)._filename + (int)(slot + 0xac) * 0x20 + -0x48); + iVar10 = *(int *)(GHIDRA_INT(&(this->_sprite)._filename) + GHIDRA_INT((slot + 0xac)) * 0x20 + -0x48); if (cVar3 == '\0') { local_70 = CONCAT13(1,(undefined3)local_70); if (iVar10 == 0x1ab) { - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&local_88,0x124,-1,1,0,0) + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&local_88,0x124,-1,1,0,0) ; local_8 = 2; if ((undefined1 *)local_88._size != (undefined1 *)0x0) { @@ -24260,7 +24260,7 @@ LAB_00792df3: if ((undefined1 *)local_88._size != (undefined1 *)0x0) { piVar8 = local_88._data; do { - iVar10 = piVar8[(int)local_54]; + iVar10 = piVar8[GHIDRA_INT(local_54)]; in_XMM0_Da = *(float *)(iVar10 + 0x380); if (1.0 < in_XMM0_Da) { if (1 < g_game->_frameCount - *(int *)(iVar10 + 0x328)) { @@ -24276,32 +24276,32 @@ LAB_00792df3: piVar8 = local_88._data; } local_54 = (Manager *)&(*(undefined1 *)((char *)(local_54) + 0x1)); - } while (local_54 < (uint)local_88._size); + } while (local_54 < GHIDRA_UINT(local_88._size)); slot = savedSlot; } } local_8 = 0xffffffff; ((EntityList_Query *)(&local_88))->EntityList_Query::~EntityList_Query(); - if (local_70._3_1_ == '\0') goto LAB_007935ed; + if ((*(undefined1 *)((char *)&(local_70) + 0x3)) == '\0') goto LAB_007935ed; } bVar2 = HasCollectible(this,0xcd,0); if ((((bVar2 != 0) && (this->_itemState == 0)) && (pIVar6 = ItemConfig::GetCollectible (&g_manager->_itemConfig, - *(int *)((int)(&(this->_sprite)._filename + -3) + slotOffset)), + *(int *)(GHIDRA_INT((&(this->_sprite)._filename + -3)) + slotOffset)), pIVar6 != (ItemConfig_Item *)0x0)) && (iVar10 = FUN_007308d0(), iVar10 != 2)) { local_54 = (Manager *)FUN_007308d0(); if (local_54 == (Manager *)0x1) { local_50 = local_54; iVar10 = GetHealthType(this); - local_4c = 2 - (uint)(iVar10 != 3); + local_4c = 2 - GHIDRA_UINT((iVar10 != 3)); } else { local_50 = (Manager *)GetActiveMaxCharge(this,slot); iVar10 = GetTotalActiveCharge(this,slot); - local_50 = (Manager *)((int)local_50 - iVar10); + local_50 = (Manager *)(GHIDRA_INT(local_50) - iVar10); iVar10 = GetHealthType(this); - local_4c = 2 - (uint)(iVar10 != 3); + local_4c = 2 - GHIDRA_UINT((iVar10 != 3)); if (extraout_EDX < 1) goto LAB_007935ed; } iVar10 = local_4c; @@ -24314,7 +24314,7 @@ LAB_00792df3: do { local_60 = this->_soulHearts; local_70 = this->_redHearts; - if ((int)(local_60 + local_70 + this->_boneHearts) <= iVar10) break; + if (GHIDRA_INT((local_60 + local_70 + this->_boneHearts)) <= iVar10) break; this->_damageCooldown = 0; local_78.y = *(float *)(*(int *)this + 0x20); ((EntityRef *)(&local_c8))->EntityRef::constructor((Entity *)this); @@ -24332,9 +24332,9 @@ LAB_00792df3: } if ((this->_playerType == 0x16) && ((this->_soulHearts < local_60 || - ((this->_redHearts < (int)local_70 && + ((this->_redHearts < GHIDRA_INT(local_70) && (bVar2 = HasCollectible(this,0x26b,0), - (int)((uint)(bVar2 != 0) * 2 + 4) <= this->_redHearts)))))) { + GHIDRA_INT((GHIDRA_UINT((bVar2 != 0)) * 2 + 4)) <= this->_redHearts)))))) { if (local_48 != (ItemConfig_Item *)0x0) { local_48 = (ItemConfig_Item *)0x0; goto LAB_00793587; @@ -24357,7 +24357,7 @@ LAB_00793587: } } iVar12 = iVar12 + 1; - } while (iVar12 < (int)local_50); + } while (iVar12 < GHIDRA_INT(local_50)); } } } @@ -24474,7 +24474,7 @@ switchD_00792e5b_caseD_24: candidateItems = (int *)slot; candidateItemsEnd = (int *)slot; candidateItemsCapacity = (int *)slot; - FUN_0042c820(local_88._capacity - (int)local_88._data >> 2); + FUN_0042c820(local_88._capacity - GHIDRA_INT(local_88._data) >> 2); piVar11 = candidateItemsEnd; if (piVar8 != (int *)local_88._capacity) { do { @@ -24490,7 +24490,7 @@ switchD_00792e5b_caseD_24: piVar11 = candidateItemsEnd; } else { - *piVar11 = (int)pIVar6; + *piVar11 = GHIDRA_INT(pIVar6); candidateItemsEnd = piVar11 + 1; piVar11 = candidateItemsEnd; } @@ -24502,31 +24502,31 @@ switchD_00792e5b_caseD_24: } while (piVar8 != (int *)local_88._capacity); } piVar8 = candidateItems; - iVar10 = Isaac::Random((int)piVar11 - (int)candidateItems >> 2); + iVar10 = Isaac::Random(GHIDRA_INT(piVar11) - GHIDRA_INT(candidateItems) >> 2); local_54 = (Manager *)piVar8[iVar10]; if (((Manager *)this->_itemState != (Manager *)0x0) && (local_54 != (Manager *)this->_itemState) ) { ResetItemState(this); } - this->_wildCardItem = (int)local_54; + this->_wildCardItem = GHIDRA_INT(local_54); this->_wildCardItemType = 2; this->_wildCardVarData = 0; - UseActiveItem(this,&local_56,(int)local_54,(local_56._1_1_ != '\0') + 2,-1,0); - local_78.x._0_1_ = (char)*extraout_EAX; - local_78.x._1_1_ = (byte)((ushort)*extraout_EAX >> 8); - pIVar6 = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible((int)local_54); + UseActiveItem(this,&local_56,GHIDRA_INT(local_54),((*(undefined1 *)((char *)&(local_56) + 0x1)) != '\0') + 2,-1,0); + (*(undefined1 *)((char *)&(local_78.x) + 0x0)) = (char)*extraout_EAX; + (*(undefined1 *)((char *)&(local_78.x) + 0x1)) = (byte)((ushort)*extraout_EAX >> 8); + pIVar6 = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(GHIDRA_INT(local_54)); AddCostume(this,pIVar6,1); if ((this->_itemState != 0) && ((bool)local_44 == (this->_activeDesc[1]._item != 0))) { DischargeActiveItem(this,0,0); } local_8 = local_8 & 0xffffff00; if (piVar8 != (int *)0x0) { - uVar4 = ((int)candidateItemsCapacity - (int)piVar8 >> 2) * 4; + uVar4 = (GHIDRA_INT(candidateItemsCapacity) - GHIDRA_INT(piVar8) >> 2) * 4; piVar11 = piVar8; if (0xfff < uVar4) { piVar11 = (int *)piVar8[-1]; uVar4 = uVar4 + 0x23; - if (0x1f < (uint)((int)piVar8 + (-4 - (int)piVar11))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(piVar8) + (-4 - GHIDRA_INT(piVar11))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -24539,32 +24539,32 @@ switchD_00792e5b_caseD_24: } else { if ((this->_itemState != 0) && - (*(int *)((int)(&(this->_sprite)._filename + -3) + slotOffset) != this->_itemState)) { + (*(int *)(GHIDRA_INT((&(this->_sprite)._filename + -3)) + slotOffset) != this->_itemState)) { ResetItemState(this); } iVar10 = slotOffset; this->_wildCardItemType = 2; - this->_wildCardItem = *(int *)((int)(&(this->_sprite)._filename + -3) + slotOffset); + this->_wildCardItem = *(int *)(GHIDRA_INT((&(this->_sprite)._filename + -3)) + slotOffset); this->_wildCardVarData = this->_activeDesc[slot]._varData; - UseActiveItem(this,&local_56,*(int *)((int)(&(this->_sprite)._filename + -3) + slotOffset), - (local_56._1_1_ != '\0') + 4,slot,0); - local_78.x._0_1_ = (char)*extraout_EAX_00; - local_78.x._1_1_ = (byte)((ushort)*extraout_EAX_00 >> 8); + UseActiveItem(this,&local_56,*(int *)(GHIDRA_INT((&(this->_sprite)._filename + -3)) + slotOffset), + ((*(undefined1 *)((char *)&(local_56) + 0x1)) != '\0') + 4,slot,0); + (*(undefined1 *)((char *)&(local_78.x) + 0x0)) = (char)*extraout_EAX_00; + (*(undefined1 *)((char *)&(local_78.x) + 0x1)) = (byte)((ushort)*extraout_EAX_00 >> 8); } bVar2 = HasCollectible(this,0x164,0); if ((((((bVar2 != 0) && (this->_itemState == 0)) && ((Manager *)local_6c.y == (Manager *)0x0)) && - ((local_78.x._1_1_ == 0 && - (iVar12 = *(int *)((int)(&(this->_sprite)._filename + -3) + iVar10), iVar12 != 0)))) && + (((*(undefined1 *)((char *)&(local_78.x) + 0x1)) == 0 && + (iVar12 = *(int *)(GHIDRA_INT((&(this->_sprite)._filename + -3)) + iVar10), iVar12 != 0)))) && (0 < local_60)) && ((iVar12 != 0x20b && (iVar12 != 0x20f)))) { - UseActiveItem(this,&local_56,iVar12,0x621,-1,(int)local_50); + UseActiveItem(this,&local_56,iVar12,0x621,-1,GHIDRA_INT(local_50)); } - if (local_70._3_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_70) + 0x3)) == '\0') { LAB_0079324d: - if (local_78.x._0_1_ != '\0') { - DischargeActiveItem(this,slot,local_78.x._1_1_); + if ((*(undefined1 *)((char *)&(local_78.x) + 0x0)) != '\0') { + DischargeActiveItem(this,slot,(*(undefined1 *)((char *)&(local_78.x) + 0x1))); } } - else if (local_78.x._0_1_ != '\0') { + else if ((*(undefined1 *)((char *)&(local_78.x) + 0x0)) != '\0') { iVar12 = GetTrinketMultiplier(this,0x95); if (iVar12 == 2) { uVar4 = 10; @@ -24573,11 +24573,11 @@ LAB_0079324d: if (iVar12 < 3) goto LAB_0079324d; uVar4 = 5; } - uVar4 = ((RNG *)((RNG *)((int)(this->_trinketRNGs)._begin + 0x950)))->RNG::RandomInt(uVar4); + uVar4 = ((RNG *)((RNG *)(GHIDRA_INT((this->_trinketRNGs)._begin) + 0x950)))->RNG::RandomInt(uVar4); if (uVar4 != 0) goto LAB_0079324d; } - if (local_78.x._1_1_ != 0) { - RemoveCollectible(this,*(uint *)((int)(&(this->_sprite)._filename + -3) + iVar10),0,slot,1); + if ((*(undefined1 *)((char *)&(local_78.x) + 0x1)) != 0) { + RemoveCollectible(this,*(uint *)(GHIDRA_INT((&(this->_sprite)._filename + -3)) + iVar10),0,slot,1); } LAB_00793273: bVar2 = HasTrinket(this,4,0); @@ -24593,13 +24593,13 @@ LAB_007935ed: iVar10 = 0x31; } else { - iVar10 = *(int *)((int)(&(this->_sprite)._filename + -3) + slotOffset); + iVar10 = *(int *)(GHIDRA_INT((&(this->_sprite)._filename + -3)) + slotOffset); } TryRemoveCollectibleCostume(this,iVar10,0); ResetItemState(this); if ((((Manager *)fVar13 != (Manager *)0x0) && ((Manager *)fVar13 != (Manager *)0x82)) && (((Manager *)fVar13 != (Manager *)0xb5 && ((Manager *)fVar13 != (Manager *)0x152)))) { - AnimateCollectible(this,(int)fVar13,(byte *)"HideItem",(byte *)"PlayerPickupSparkle"); + AnimateCollectible(this,GHIDRA_INT(fVar13),(byte *)"HideItem",(byte *)"PlayerPickupSparkle"); } } LAB_00793653: @@ -24614,9 +24614,9 @@ LAB_00793653: } } else if ((local_90.y != 4.56823e-43) && - (pIVar6 = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible((int)local_90.y), + (pIVar6 = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(GHIDRA_INT(local_90.y)), pIVar6 != (ItemConfig_Item *)0x0)) { - ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::RemoveCollectibleEffect((int)fVar13,-1); + ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::RemoveCollectibleEffect(GHIDRA_INT(fVar13),-1); piVar8 = &this->_cacheFlags; *piVar8 = *piVar8 | pIVar6->cacheFlags; if (*piVar8 != 0) { @@ -25147,7 +25147,7 @@ void Entity_Player::update_effects() local_14 = -NAN; puStack_18 = &LAB_00aff8a0; local_1c = ExceptionList; - local_24 = (void *)(__security_cookie ^ (uint)(local_78 + 0x68)); + local_24 = (void *)(__security_cookie ^ GHIDRA_UINT((local_78 + 0x68))); if (*(int *)&g_game->_stageTransition != 0) { return; } @@ -25171,9 +25171,9 @@ void Entity_Player::update_effects() do { if ((((ActiveItemDesc *)(piVar14 + -7))->_item == 0x1a6) && (*piVar14 < 3)) { *piVar14 = 3; - FullCharge(this,(int)local_a34,0,0); + FullCharge(this,GHIDRA_INT(local_a34),0,0); } - local_a34 = (Entity_Tear *)((int)local_a34 + 1); + local_a34 = (Entity_Tear *)(GHIDRA_INT(local_a34) + 1); piVar14 = piVar14 + 8; } while (local_a34 < &DAT_00000004); } @@ -25183,10 +25183,10 @@ void Entity_Player::update_effects() if (((bVar2 != 0) && (pcVar40 = g_game->_room, *pcVar40 != '\0')) && ((g_game->_frameCount - *(int *)(pcVar40 + 0x11f0) == 1 && ((*(int *)(pcVar40 + 8) == 5 && (pcVar40[1] != '\0')))))) { - local_a34 = (Entity_Tear *)((uint)local_a34 & 0xffffff00); + local_a34 = (Entity_Tear *)(GHIDRA_UINT(local_a34) & 0xffffff00); bVar2 = HasGoldenTrinket(this,0x78); if ((bVar2 != 0) || (bVar2 = HasCollectible(this,0x1b7,0), bVar2 != 0)) { - local_a34 = (Entity_Tear *)CONCAT31(local_a34._1_3_,1); + local_a34 = (Entity_Tear *)CONCAT31((*(undefined1 *)((char *)&(local_a34) + 0x1)),1); } uVar22 = 0; do { @@ -25197,7 +25197,7 @@ void Entity_Player::update_effects() } while (uVar22 < 4); local_abc = 2.38221e-43; seed_fart_sound_override((int *)&local_abc); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_abc,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_abc),1.0,2,0,1.0,0.0); uVar22 = Random(); in_stack_ffffe838 = (Entity_Player *)0x0; in_stack_ffffe834 = &g_vectorZero; @@ -25229,10 +25229,10 @@ void Entity_Player::update_effects() in_stack_ffffe83c = &momFootQuery; in_stack_ffffe838 = (Entity_Player *)0x795164; queryList = EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),in_stack_ffffe83c,1000,0x1d, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),in_stack_ffffe83c,1000,0x1d, -1,0,0); uVar22 = queryList->_size; - if (momFootQuery._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(momFootQuery) + 0x0)) == '\0') { local_14 = 0.0; tracked_alloc(1,momFootQuery._data,0); local_14 = -NAN; @@ -25245,7 +25245,7 @@ void Entity_Player::update_effects() local_a28 = (Entity_Tear *)(tmpVec->x * 40.0); local_a04 = (Entity_NPC *)(tmpVec->y * 40.0); uVar5 = Random(); - pvVar28 = (void *)((float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) + pvVar28 = (void *)((float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283064e-10); ((Vector *)(&stompPos))->Vector::Vector((float)local_a3c + (float)local_a28 * (float)pvVar28, (float)local_a04 * (float)pvVar28 + (float)local_a08); @@ -25464,7 +25464,7 @@ void Entity_Player::update_effects() room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); local_a00 = (Entity_Player *)((Room *)(room))->Room::GetGridIndex(&this->_pos); room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); - local_a28 = (Entity_Tear *)((Room *)(room))->Room::GetGridEntity((uint)local_a00); + local_a28 = (Entity_Tear *)((Room *)(room))->Room::GetGridEntity(GHIDRA_UINT(local_a00)); if ((local_a28 == (Entity_Tear *)0x0) || ((iVar4 = ((GridEntity *)((GridEntity *)local_a28))->GridEntity::GetType(), iVar4 == 1 || (iVar4 = ((GridEntity *)((GridEntity *)local_a28))->GridEntity::GetType(), iVar4 == 10)))) { @@ -25501,7 +25501,7 @@ LAB_00795a1c: } rngPtr = (RNG *)rng_vector_at(); fVar11 = (float)((RNG *)(rngPtr))->RNG::RandomInt(100); - if ((uint)fVar11 < local_9fc) { + if (GHIDRA_UINT(fVar11) < local_9fc) { pEVar23 = (Entity_Player *)&DAT_00000005; } local_9fc = pEVar23; @@ -25509,14 +25509,14 @@ LAB_00795a1c: bVar2 = HasCollectible(this,0xca,0); if (bVar2 != 0) { uVar22 = ((RNG *)((RNG *)local_a0c))->RNG::RandomInt(100); - if ((int)(uVar22 - (int)(this->_luck * 10.0)) < 0x1a) { + if (GHIDRA_INT((uVar22 - GHIDRA_INT((this->_luck * 10.0)))) < 0x1a) { pEVar23 = (Entity_Player *)0x3; } local_9fc = pEVar23; } room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); uVar22 = ((RNG *)((RNG *)local_a0c))->RNG::Next(); - ((Room *)(room))->Room::SpawnGridEntity((int)local_a00,0xe,(uint)local_9fc,uVar22,0); + ((Room *)(room))->Room::SpawnGridEntity(GHIDRA_INT(local_a00),0xe,GHIDRA_UINT(local_9fc),uVar22,0); in_stack_ffffe83c = (EntityList_EL *)0x795b43; Game::ButterBeanFart(g_game,&this->_pos,120.0,(Entity *)this,0,0); in_stack_ffffe840 = (Entity_Player *)0x795b60; @@ -25573,9 +25573,9 @@ LAB_00795a1c: LAB_00795cf2: if (local_9fc != (Entity_Player *)0x0) { pvVar28 = (local_9fc->_damageEvents)._begin; - if ((int)pvVar28 < 0x1f) { + if (GHIDRA_INT(pvVar28) < 0x1f) { local_9fc = *(Entity_Player **)(*(int *)this + 0x3c); - if (((uint)pvVar28 & 1) == 0) { + if ((GHIDRA_UINT(pvVar28) & 1) == 0) { in_stack_ffffe840 = (Entity_Player *)((Color *)())->Color::Color(); } else { @@ -25585,9 +25585,9 @@ LAB_00795cf2: (*(code *)local_9fc)(); } else { - uVar22 = (uint)pvVar28 & 0x80000003; + uVar22 = GHIDRA_UINT(pvVar28) & 0x80000003; bVar26 = uVar22 == 0; - if ((int)uVar22 < 0) { + if (GHIDRA_INT(uVar22) < 0) { bVar26 = (uVar22 - 1 | 0xfffffffc) == 0xffffffff; } if (bVar26) { @@ -25744,10 +25744,10 @@ LAB_007960c6: } } local_a28 = (Entity_Tear *)GetActiveItemSlot(this,0x146); - if (-1 < (int)local_a28) { - iVar4 = GetActiveMaxCharge(this,(int)local_a28); - local_a28 = (Entity_Tear *)this->_activeDesc[(int)local_a28]._charge; - local_9fc = (Entity_Player *)((float)(int)local_a28 / (float)iVar4); + if (-1 < GHIDRA_INT(local_a28)) { + iVar4 = GetActiveMaxCharge(this,GHIDRA_INT(local_a28)); + local_a28 = (Entity_Tear *)this->_activeDesc[GHIDRA_INT(local_a28)]._charge; + local_9fc = (Entity_Player *)((float)GHIDRA_INT(local_a28) / (float)iVar4); if ((float)local_9fc < 0.99) { FUN_00757980(); ((Color *)(chargeFadeColor))->Color::Color(); @@ -25876,13 +25876,13 @@ LAB_00796537: } tempEffects = &this->_temporaryeffects; bVar2 = ((TemporaryEffects *)(tempEffects))->TemporaryEffects::HasCollectibleEffect(299); - flags_01._0_12_ = ZEXT812(0x40000000); - flags_01._h._4_4_ = 0; + (*(undefined1 *)((char *)&(flags_01) + 0x0)) = ZEXT812(0x40000000); + (*(undefined4 *)((char *)&(flags_01._h) + 0x4)) = 0; local_a28 = (Entity_Tear *)flags_01._l; if (bVar2 == 0) { bVar2 = HasCollectible(this,299,0); if (((bVar2 != 0) || (iVar4 = GetZodiacEffect(this), iVar4 == 299)) && - (flags_01 = (BitSet128)ZEXT416((uint)this->_taurusSpeedBonus), this->_taurusSpeedBonus != 0.0 + (flags_01 = (BitSet128)ZEXT416(GHIDRA_UINT(this->_taurusSpeedBonus)), this->_taurusSpeedBonus != 0.0 )) { this->_taurusSpeedBonus = 0.0; this->_cacheFlags = this->_cacheFlags | 0x10; @@ -25894,14 +25894,14 @@ LAB_00796889: room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); iVar4 = ((Room *)(room))->Room::GetAliveEnemiesCount(); if ((iVar4 != 0) || - (flags_01._0_12_ = ZEXT812(0x40000000), flags_01._h._4_4_ = 0, + ((*(undefined1 *)((char *)&(flags_01) + 0x0)) = ZEXT812(0x40000000), (*(undefined4 *)((char *)&(flags_01._h) + 0x4)) = 0, (float)flags_01._l < this->_movespeed || (float)flags_01._l == this->_movespeed)) { - flags_01 = (BitSet128)ZEXT416((uint)this->_movespeed); + flags_01 = (BitSet128)ZEXT416(GHIDRA_UINT(this->_movespeed)); if ((this->_movespeed < 2.0) || (pvVar28 = ((TemporaryEffects *)(tempEffects))->TemporaryEffects::GetCollectibleEffect(299), *(int *)((char *)pvVar28 + 8) != 0)) { fVar11 = this->_taurusSpeedBonus + 0.0022222223; - flags_01 = (BitSet128)ZEXT416((uint)fVar11); + flags_01 = (BitSet128)ZEXT416(GHIDRA_UINT(fVar11)); this->_taurusSpeedBonus = fVar11; this->_cacheFlags = this->_cacheFlags | 0x1010; goto LAB_00796889; @@ -25930,7 +25930,7 @@ LAB_007968b4: if (iVar4 != 0) { iVar4 = Isaac::Random(2); GetTearHitParams(this,&aquariusTearParams,1,(this->_meleeDamage * 0.666) / this->_damage, - (-(uint)(iVar4 != 0) & 2) - 1,(Entity *)0x0); + (-GHIDRA_UINT((iVar4 != 0)) & 2) - 1,(Entity *)0x0); uVar22 = Random(); in_stack_ffffe834 = (Vector *)0x796943; queryList = ((Game *)(g_game))->Game::Spawn(1000,0x36,&this->_pos,&g_vectorZero,(Entity *)this,0,uVar22); @@ -26028,7 +26028,7 @@ LAB_00796ab9: pEVar23 = (Entity_Player *)((Room *)(room))->Room::GetGridIndex(&this->_pos); local_a08 = pEVar23; room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); - pGVar12 = ((Room *)(room))->Room::GetGridEntity((uint)pEVar23); + pGVar12 = ((Room *)(room))->Room::GetGridEntity(GHIDRA_UINT(pEVar23)); GetTrinketMultiplier(this,0x19); HasGoldenTrinket(this,0x19); iVar4 = ((Game *)(g_game))->Game::GetFrameCount(); @@ -26056,7 +26056,7 @@ LAB_00796ab9: } rngPtr = (RNG *)rng_vector_at(); fVar11 = (float)((RNG *)(rngPtr))->RNG::RandomInt(100); - if ((uint)fVar11 < local_9fc) { + if (GHIDRA_UINT(fVar11) < local_9fc) { pEVar23 = (Entity_Player *)&DAT_00000005; } local_9fc = pEVar23; @@ -26066,7 +26066,7 @@ LAB_00796ab9: uVar22 = ((RNG *)(rngPtr))->RNG::Next(); in_stack_ffffe83c = (EntityList_EL *)0x796de2; in_stack_ffffe840 = local_a08; - ((Room *)(room))->Room::SpawnGridEntity((int)local_a08,0xe,(uint)local_9fc,uVar22,0); + ((Room *)(room))->Room::SpawnGridEntity(GHIDRA_INT(local_a08),0xe,GHIDRA_UINT(local_9fc),uVar22,0); goto LAB_00796de7; } } @@ -26118,8 +26118,8 @@ LAB_00796de7: ((Game *)(g_game))->Game::Spawn(1000,0x2e,in_stack_ffffe830,&g_vectorZero,(Entity *)this,0,uVar22); queryList = (Entity *)__RTDynamicCast(); fVar11 = random_float(); - flags_01._l._0_4_ = fVar11 * 0.5 + 0.2; - flags_01._4_12_ = extraout_var_00; + (*(undefined4 *)((char *)&(flags_01._l) + 0x0)) = fVar11 * 0.5 + 0.2; + (*(undefined1 *)((char *)&(flags_01) + 0x4)) = extraout_var_00; bobScaleFactor = (float)flags_01._l; tmpVec = ((Vector *)(&g_vectorOne))->Vector::__mul(&bobCreepScale,&bobScaleFactor); ((Entity *)(queryList))->Entity::SetSpriteScale(tmpVec); @@ -26211,7 +26211,7 @@ LAB_007971e6: tmpFlags = BitSet128::operator_or(&slowedTearFlags,tmpFlags2,tmpFlags); flags_01 = *tmpFlags; uVar39 = (undefined4)flags_01._l; - outResult = flags_01._l._4_4_; + outResult = (*(undefined4 *)((char *)&(flags_01._l) + 0x4)); in_stack_ffffe840 = (Entity_Player *)0x797406; ((Entity_Tear *)(local_a0c))->Entity_Tear::SetTearFlags(flags_01); } @@ -26268,7 +26268,7 @@ LAB_007971e6: color._offset[0] = (float)uVar39; color._offset[1] = (float)outResult; color._offset[2] = fVar11; - ((Entity *)(queryList))->Entity::AddSlowing(&spotlightSlowSourcePvp,2 - (uint)(iVar4 != 0),0.9,color,bVar2); + ((Entity *)(queryList))->Entity::AddSlowing(&spotlightSlowSourcePvp,2 - GHIDRA_UINT((iVar4 != 0)),0.9,color,bVar2); pEVar23 = savedPlayer; } LAB_00797406: @@ -26308,7 +26308,7 @@ LAB_00797406: in_stack_ffffe840 = (Entity_Player *)newHaloTearParams; pTVar13 = GetTearHitParams(savedPlayer,(TearParams *)in_stack_ffffe840,3,1.0,iVar4 * 2 + -1, pEVar43); - flags_01 = (BitSet128)ZEXT416((uint)pTVar13->_tearDamage); + flags_01 = (BitSet128)ZEXT416(GHIDRA_UINT(pTVar13->_tearDamage)); (*pcVar1)(); queryList->Update(); ((EntityPtr *)((EntityPtr *)local_a08))->EntityPtr::SetReference(queryList); @@ -26321,7 +26321,7 @@ LAB_00797406: in_stack_ffffe840 = (Entity_Player *)haloTearParams; pTVar13 = GetTearHitParams(pEVar23,(TearParams *)in_stack_ffffe840,3,1.0,iVar4 * 2 + -1,queryList ); - flags_01 = (BitSet128)ZEXT416((uint)pTVar13->_tearDamage); + flags_01 = (BitSet128)ZEXT416(GHIDRA_UINT(pTVar13->_tearDamage)); (*pcVar1)(); } } @@ -26339,12 +26339,12 @@ LAB_00797406: } queryList = (Entity *)(*(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x1ad8)) - iVar4); local_a3c = (Entity *)&(queryList->_sprite)._animDefaultName; - if (-1 < (int)queryList) { + if (-1 < GHIDRA_INT(queryList)) { local_a3c = queryList; } dVar29 = (double)(ZEXT48(in_stack_ffffe840) << 0x20); - if ((int)local_a3c < 0x5f) { - if (((0 < (int)local_a3c) && + if (GHIDRA_INT(local_a3c) < 0x5f) { + if (((0 < GHIDRA_INT(local_a3c)) && (local_a08 = (Entity_Player *) pEVar23->_coopBabyBuffTimers [(*(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x1ad8)) + 0x5f) % 0x60 + 0x25], @@ -26361,39 +26361,39 @@ LAB_00797406: effect = (Entity_Effect *)__RTDynamicCast(); ((Entity_Effect *)(effect))->Entity_Effect::SetTimeout(0x3c); effect->Update(); - pEVar23->_coopBabyBuffTimers[*(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x1ad8)) + 0x25] = (int)effect; + pEVar23->_coopBabyBuffTimers[*(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x1ad8)) + 0x25] = GHIDRA_INT(effect); std::multiset::insert(); queryList = local_a3c; dVar29 = (double)(ZEXT48(pEVar43) << 0x20); *(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x1ad8)) = (*(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x1ad8)) + 1) % 0x60; - if (0xb < (int)local_a3c) { + if (0xb < GHIDRA_INT(local_a3c)) { local_a30 = (Entity_Player *)0xffffffff; ((EntityPtr *)((EntityPtr *)&averagePos))->EntityPtr::clear(); dVar29 = (double)(ZEXT48(pEVar43) << 0x20); - local_a14 = (Entity_Tear *)((int)queryList / 2); - if (-1 < (int)local_a14) { + local_a14 = (Entity_Tear *)(GHIDRA_INT(queryList) / 2); + if (-1 < GHIDRA_INT(local_a14)) { pEVar24 = (Entity_Player *)0xffffffff; do { - if (-1 < (int)pEVar24) goto LAB_00797a7b; + if (-1 < GHIDRA_INT(pEVar24)) goto LAB_00797a7b; pEVar21 = (Entity_Player *) - (((int)(&(local_a14->_sprite)._filename + -3) + + ((GHIDRA_INT((&(local_a14->_sprite)._filename + -3)) + *(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x1ad4))) % 0x60); local_a3c = (Entity *) - pEVar23->_coopBabyBuffTimers[(int)((int)&pEVar21->_collisionIndex + 1)]; + pEVar23->_coopBabyBuffTimers[GHIDRA_INT((GHIDRA_INT(&pEVar21->_collisionIndex) + 1))]; local_a00 = pEVar21; if (local_a3c == (Entity *)0x0) goto LAB_00797a5e; entityColor = (Color *)((Entity *)(local_a3c))->Entity::GetColor(); local_a08 = (Entity_Player *)((Color *)(entityColor))->Color::A(); - auVar32._0_12_ = ZEXT812(0x3f000000); - auVar32._12_4_ = 0; - if ((float)local_a08 < auVar32._0_4_) { + (*(undefined1 *)((char *)&(auVar32) + 0x0)) = ZEXT812(0x3f000000); + (*(undefined4 *)((char *)&(auVar32) + 0xc)) = 0; + if ((float)local_a08 < (*(undefined4 *)((char *)&(auVar32) + 0x0))) { LAB_00797a58: pEVar24 = local_a30; } else { ((Entity *)(local_a3c))->Entity::Position(&trailPointPos); FUN_00a0ff70(); - if (400.0 <= auVar32._0_4_) goto LAB_00797a58; + if (400.0 <= (*(undefined4 *)((char *)&(auVar32) + 0x0))) goto LAB_00797a58; local_a30 = pEVar21; ((EntityPtr *)((EntityPtr *)&farthestPos))->EntityPtr::clear(); pEVar24 = *(Entity_Player **)&(*(undefined1 *)((char *)(pEVar23) + 0x1ad8)); @@ -26405,11 +26405,11 @@ LAB_00797a58: do { local_a08 = (Entity_Player *) pEVar23->_coopBabyBuffTimers - [(int)((int)&pEVar21->_collisionIndex + 1)]; + [GHIDRA_INT((GHIDRA_INT(&pEVar21->_collisionIndex) + 1))]; if (local_a08 != (Entity_Player *)0x0) { ((Entity *)((Entity *)local_a08))->Entity::Position(&trailPos); FUN_00a0ff70(); - local_a3c = auVar32._0_4_; + local_a3c = (*(undefined4 *)((char *)&(auVar32) + 0x0)); if ((float)local_a0c < (float)local_a3c) { tmpVec = ((Entity *)((Entity *)local_a08))->Entity::Position(&farthestTrailPos); ((Vector *)(&farthestPos))->Vector::operator_assign(tmpVec); @@ -26417,8 +26417,8 @@ LAB_00797a58: } auVar32 = ZEXT416(local_a0c); } - fVar11 = auVar32._0_4_; - pEVar21 = (Entity_Player *)((int)&(*(undefined1 *)((char *)(pEVar21) + 0x1)) % 0x60); + fVar11 = (*(undefined4 *)((char *)&(auVar32) + 0x0)); + pEVar21 = (Entity_Player *)(GHIDRA_INT(&(*(undefined1 *)((char *)(pEVar21) + 0x1))) % 0x60); pEVar24 = *(Entity_Player **)&(*(undefined1 *)((char *)(pEVar23) + 0x1ad8)); } while (pEVar21 != pEVar24); pEVar21 = local_a00; @@ -26429,9 +26429,9 @@ LAB_00797a58: pEVar24 = (Entity_Player *)0xffffffff; } else { - pvVar28 = (void *)((int)pEVar24 - (int)pEVar21); - local_a38 = (void *)((int)pvVar28 + 0x60); - if (-1 < (int)pvVar28) { + pvVar28 = (void *)(GHIDRA_INT(pEVar24) - GHIDRA_INT(pEVar21)); + local_a38 = (void *)(GHIDRA_INT(pvVar28) + 0x60); + if (-1 < GHIDRA_INT(pvVar28)) { local_a38 = pvVar28; } ((Vector *)(&averagePos))->Vector::operator_assign(&g_vectorZero); @@ -26439,44 +26439,44 @@ LAB_00797a58: if (pEVar21 != *(Entity_Player **)&(*(undefined1 *)((char *)(pEVar23) + 0x1ad8))) { do { if ((Entity *) - pEVar23->_coopBabyBuffTimers[(int)((int)&local_9fc->_collisionIndex + 1)] + pEVar23->_coopBabyBuffTimers[GHIDRA_INT((GHIDRA_INT(&local_9fc->_collisionIndex) + 1))] != (Entity *)0x0) { tmpVec = ((Entity *)((Entity *) pEVar23->_coopBabyBuffTimers - [(int)((int)&local_9fc->_collisionIndex + 1)]))->Entity::Position(&trailSumPos); + [GHIDRA_INT((GHIDRA_INT(&local_9fc->_collisionIndex) + 1))]))->Entity::Position(&trailSumPos); ((Vector *)(&averagePos))->Vector::operator_add_assign(tmpVec); } - local_9fc = (Entity_Player *)((int)&(*(undefined1 *)((char *)(local_9fc) + 0x1)) % 0x60); + local_9fc = (Entity_Player *)(GHIDRA_INT(&(*(undefined1 *)((char *)(local_9fc) + 0x1))) % 0x60); } while (local_9fc != *(Entity_Player **)&(*(undefined1 *)((char *)(pEVar23) + 0x1ad8))); pEVar21 = local_a00; } - auVar33._0_4_ = SUB124(ZEXT812(0x3f800000),0) / (float)(int)local_a38; - auVar33._4_8_ = SUB128(ZEXT812(0x3f800000),4); - auVar33._12_4_ = 0; - invTrailCount = auVar33._0_4_; + (*(undefined4 *)((char *)&(auVar33) + 0x0)) = SUB124(ZEXT812(0x3f800000),0) / (float)GHIDRA_INT(local_a38); + (*(undefined8 *)((char *)&(auVar33) + 0x4)) = SUB128(ZEXT812(0x3f800000),4); + (*(undefined4 *)((char *)&(auVar33) + 0xc)) = 0; + invTrailCount = (*(undefined4 *)((char *)&(auVar33) + 0x0)); ((Vector *)(&averagePos))->Vector::operator_mul_assign(&invTrailCount); local_9fc = (Entity_Player *)0x0; if (pEVar21 == *(Entity_Player **)&(*(undefined1 *)((char *)(pEVar23) + 0x1ad8))) goto LAB_00797a58; do { if ((Entity *) - pEVar23->_coopBabyBuffTimers[(int)((int)&pEVar21->_collisionIndex + 1)] != + pEVar23->_coopBabyBuffTimers[GHIDRA_INT((GHIDRA_INT(&pEVar21->_collisionIndex) + 1))] != (Entity *)0x0) { ((Entity *)((Entity *) pEVar23->_coopBabyBuffTimers - [(int)((int)&pEVar21->_collisionIndex + 1)]))->Entity::Position(&trailCheckPos); + [GHIDRA_INT((GHIDRA_INT(&pEVar21->_collisionIndex) + 1))]))->Entity::Position(&trailCheckPos); FUN_00a0ff70(); - auVar33._0_4_ = auVar33._0_4_ / (float)local_a0c; - if (auVar33._0_4_ < 0.25) { + (*(undefined4 *)((char *)&(auVar33) + 0x0)) = (*(undefined4 *)((char *)&(auVar33) + 0x0)) / (float)local_a0c; + if ((*(undefined4 *)((char *)&(auVar33) + 0x0)) < 0.25) { local_9fc = (Entity_Player *)&(*(undefined1 *)((char *)(local_9fc) + 0x1)); - auVar33 = ZEXT416((uint)((float)(int)local_a38 * 0.25)); - if ((float)(int)local_a38 * 0.25 < - (float)((double)(int)local_9fc + - __uint_to_double_fixup[-((int)local_9fc >> 0x1f)])) { + auVar33 = ZEXT416(GHIDRA_UINT(((float)GHIDRA_INT(local_a38) * 0.25))); + if ((float)GHIDRA_INT(local_a38) * 0.25 < + (float)((double)GHIDRA_INT(local_9fc) + + __uint_to_double_fixup[-(GHIDRA_INT(local_9fc) >> 0x1f)])) { local_a30 = (Entity_Player *)0xffffffff; } } } - pEVar21 = (Entity_Player *)((int)&(*(undefined1 *)((char *)(pEVar21) + 0x1)) % 0x60); + pEVar21 = (Entity_Player *)(GHIDRA_INT(&(*(undefined1 *)((char *)(pEVar21) + 0x1))) % 0x60); pEVar24 = local_a30; } while (pEVar21 != *(Entity_Player **)&(*(undefined1 *)((char *)(pEVar23) + 0x1ad8))); } @@ -26484,8 +26484,8 @@ LAB_00797a58: LAB_00797a5e: dVar29 = (double)(ZEXT48(pEVar43) << 0x20); local_a14 = (Entity_Tear *)&(*(undefined1 *)((char *)&(local_a14[-1]) + 0x847)); - } while (-1 < (int)local_a14); - if (-1 < (int)pEVar24) { + } while (-1 < GHIDRA_INT(local_a14)); + if (-1 < GHIDRA_INT(pEVar24)) { LAB_00797a7b: pEVar8 = local_a0c; FUN_00431260(); @@ -26659,7 +26659,7 @@ LAB_00797c41: if (iVar4 == 0x2c) { local_a08 = (Entity_Player *)FUN_005b1720(); iVar4 = ((TemporaryEffects *)(tempEffects))->TemporaryEffects::GetNullEffectNum(0x6d); - if (((int)local_a08 <= iVar4) && ((iVar4 - (int)local_a08) % 6 == 0)) { + if ((GHIDRA_INT(local_a08) <= iVar4) && ((iVar4 - GHIDRA_INT(local_a08)) % 6 == 0)) { ((TemporaryEffects *)(tempEffects))->TemporaryEffects::AddNullEffect(0x6d,1,1); room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); Room::get_random_pickup_position(room,&darkEsauSpawnPos,1,0); @@ -26697,14 +26697,14 @@ LAB_007980ae: } tempEffects = &pEVar23->_temporaryeffects; local_a08 = (Entity_Player *)pEVar23->_redStewBonusDuration; - if (0 < (int)local_a08) { + if (0 < GHIDRA_INT(local_a08)) { stewDurationLeft = ((Entity *)((Entity *)pEVar23))->Entity::GetHitPointsLost(); stewDurationLeft = pEVar23->_redStewBonusDuration - stewDurationLeft; local_b20[1] = 0.0; piVar14 = (int *)std::max(); iVar4 = *piVar14; pEVar23->_redStewBonusDuration = iVar4; - if (iVar4 / 10 < (int)local_a08 / 10) { + if (iVar4 / 10 < GHIDRA_INT(local_a08) / 10) { ((Level *)((Level *)tempEffects))->Level::SetHeartPicked(); tempEffects->_cacheFlags = tempEffects->_cacheFlags | 1; } @@ -26784,7 +26784,7 @@ LAB_007980ae: uVar5 = 0x47; uVar22 = ((Entity *)((Entity *)pEVar24))->Entity::InitSeed(); ((RNG *)(&deflectRng))->RNG::game_constructor(uVar22,uVar5); - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; tmpVec = ((Entity *)((Entity *)pEVar24))->Entity::Position(&deflectedProjPos); ((Vector *)(tmpVec))->Vector::__sub(&toProjectile,&pEVar23->_pos); local_a08 = (Entity_Player *)((Vector *)(&toProjectile))->Vector::LengthSquared(); @@ -26816,7 +26816,7 @@ LAB_007980ae: FUN_00753550(); pEVar8 = local_a14; if ((float)local_a14 <= 0.0) { - local_9fc = (Entity_Player *)((uint)pEVar24 ^ 0x80000000); + local_9fc = (Entity_Player *)(GHIDRA_UINT(pEVar24) ^ 0x80000000); FUN_00753550(); tmpVec = &rotatedLeft; } @@ -26844,16 +26844,16 @@ LAB_007980ae: ((Vector *)(&newVelocity))->Vector::Resize(*pfVar16); } ((Entity *)((Entity *)local_a00))->Entity::SetVelocity(&newVelocity); - local_14 = (float)CONCAT31(local_14._1_3_,5); + local_14 = (float)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),5); guard_check_icall(); } else { - local_14 = (float)CONCAT31(local_14._1_3_,5); + local_14 = (float)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),5); guard_check_icall(); } } } - pvVar7 = (void *)((int)local_a38 + 1); + pvVar7 = (void *)(GHIDRA_INT(local_a38) + 1); local_a38 = pvVar7; pvVar28 = (void *)((EntityList *)((EntityList *)deflectQuery))->EntityList::Size(); } while (pvVar7 < pvVar28); @@ -26878,12 +26878,12 @@ LAB_007980ae: auVar30 = ZEXT812(0x42a00000); } else { - auVar30._4_8_ = 0; - auVar30._0_4_ = local_a14; + (*(undefined8 *)((char *)&(auVar30) + 0x4)) = 0; + (*(undefined4 *)((char *)&(auVar30) + 0x0)) = local_a14; } - auVar34._12_4_ = 0; - auVar34._0_12_ = auVar30; - EntityList::QueryRadius(entityList,(EntityList_EL *)auraQuery,&pEVar23->_pos,auVar30._0_4_,8); + (*(undefined4 *)((char *)&(auVar34) + 0xc)) = 0; + (*(undefined1 *)((char *)&(auVar34) + 0x0)) = auVar30; + EntityList::QueryRadius(entityList,(EntityList_EL *)auraQuery,&pEVar23->_pos,(*(undefined4 *)((char *)&(auVar30) + 0x0)),8); local_14 = 9.80909e-45; local_a14 = (Entity_Tear *)0x0; iVar4 = ((EntityList *)((EntityList *)auraQuery))->EntityList::Size(); @@ -26897,11 +26897,11 @@ LAB_007980ae: cVar3 = DeathmatchManager::is_active(); if (cVar3 == '\0') { LAB_0079886f: - local_9fc = (Entity_Player *)((uint)local_9fc & 0xffffff00); + local_9fc = (Entity_Player *)(GHIDRA_UINT(local_9fc) & 0xffffff00); } else { bVar2 = ((Entity *)((Entity *)pEVar24))->Entity::is_player(); - local_9fc = (Entity_Player *)CONCAT31(local_9fc._1_3_,1); + local_9fc = (Entity_Player *)CONCAT31((*(undefined1 *)((char *)&(local_9fc) + 0x1)),1); if (bVar2 == 0) goto LAB_0079886f; } if (local_a29 != 0) { @@ -26909,7 +26909,7 @@ LAB_0079886f: if (cVar3 == '\0') { iVar4 = FUN_00753700(); local_a08 = (Entity_Player *)(0x3c - iVar4); - if ((int)local_a08 < 1) goto LAB_007988e6; + if (GHIDRA_INT(local_a08) < 1) goto LAB_007988e6; ((EntityRef *)(&auraCharmSource))->EntityRef::constructor((Entity *)pEVar23); sourceRef = &auraCharmSource; pEVar21 = local_a08; @@ -26922,13 +26922,13 @@ LAB_0079886f: pEVar41 = (Entity_Player *)0x0; } uVar22 = 0x7988e6; - ((Entity *)((Entity *)pEVar24))->Entity::AddCharmed(sourceRef,(int)pEVar21,(byte)pEVar41,0); + ((Entity *)((Entity *)pEVar24))->Entity::AddCharmed(sourceRef,GHIDRA_INT(pEVar21),(byte)pEVar41,0); dVar29 = (double)((ulonglong)uVar22 << 0x20); } LAB_007988e6: FUN_00417340(); - auVar34._0_4_ = (undefined1 *)(auVar34._0_4_ + 80.0); - local_a08 = (Entity_Player *)auVar34._0_4_; + (*(undefined4 *)((char *)&(auVar34) + 0x0)) = (undefined1 *)((*(undefined4 *)((char *)&(auVar34) + 0x0)) + 80.0); + local_a08 = (*(undefined4 *)((char *)&((Entity_Player *)auVar34) + 0x0)); if (local_a0d != 0) { if (local_a29 != 0) { tmpVec = ((Entity *)((Entity *)pEVar24))->Entity::Position(&auraEnemyPos); @@ -26982,10 +26982,10 @@ LAB_0079898c: local_a08 = (Entity_Player *)(pEVar23->_meleeDamage * 0.75); pEVar24 = pEVar23; FUN_00435bc0(); - tearFlags._l._4_4_ = uVar39; - tearFlags._l._0_4_ = uVar38; - tearFlags._h._0_4_ = queryList; - tearFlags._h._4_4_ = uVar42; + (*(undefined4 *)((char *)&(tearFlags._l) + 0x4)) = uVar39; + (*(undefined4 *)((char *)&(tearFlags._l) + 0x0)) = uVar38; + (*(undefined4 *)((char *)&(tearFlags._h) + 0x0)) = queryList; + (*(undefined4 *)((char *)&(tearFlags._h) + 0x4)) = uVar42; queryList = spawn_chain_lightning (&pEVar23->_pos,tearFlags,(Entity *)pEVar24,(float)local_a08); queryList->Update(); @@ -27000,8 +27000,8 @@ LAB_0079898c: } bVar2 = HasCollectible(pEVar23,0x23e,0); local_a3c = (void *)0x41400000; - BVar35._0_12_ = ZEXT812(0x40800000); - BVar35._h._4_4_ = 0; + (*(undefined1 *)((char *)&(BVar35) + 0x0)) = ZEXT812(0x40800000); + (*(undefined4 *)((char *)&(BVar35._h) + 0x4)) = 0; local_a08 = (Entity_Player *)BVar35._l; if ((bVar2 == 0) || (cVar3 = FUN_00758590(), cVar3 != '\0')) { if (*(int **)&(*(undefined1 *)((char *)(pEVar23) + 0x1e78)) != (int *)0x0) { @@ -27027,9 +27027,9 @@ LAB_0079898c: else { auVar30 = ZEXT812(0x40000000); } - BVar35._h._4_4_ = 0; - BVar35._0_12_ = auVar30; - local_a38 = auVar30._0_4_; + (*(undefined4 *)((char *)&(BVar35._h) + 0x4)) = 0; + (*(undefined1 *)((char *)&(BVar35) + 0x0)) = auVar30; + local_a38 = (*(undefined4 *)((char *)&(auVar30) + 0x0)); iVar4 = ((Entity *)((Entity *)pEVar23))->Entity::GetIntervalTicks((float)local_a14,0.0); if (iVar4 != 0) { damageAuraCenter.y = (pEVar23->_pos).y; @@ -27166,10 +27166,10 @@ LAB_00798e34: if (bVar2 != 0) { ((BitSet128 *)(&orbitTearFlags))->BitSet128::operator__(&g_tearFlagQuadsplit); } - flags_00._l._4_4_ = orbitTearFlags._l._4_4_; - flags_00._l._0_4_ = (undefined4)orbitTearFlags._l; - flags_00._h._0_4_ = (undefined4)orbitTearFlags._h; - flags_00._h._4_4_ = orbitTearFlags._h._4_4_; + (*(undefined4 *)((char *)&(flags_00._l) + 0x4)) = (*(undefined4 *)((char *)&(orbitTearFlags._l) + 0x4)); + (*(undefined4 *)((char *)&(flags_00._l) + 0x0)) = (undefined4)orbitTearFlags._l; + (*(undefined4 *)((char *)&(flags_00._h) + 0x0)) = (undefined4)orbitTearFlags._h; + (*(undefined4 *)((char *)&(flags_00._h) + 0x4)) = (*(undefined4 *)((char *)&(orbitTearFlags._h) + 0x4)); ((Entity_Tear *)((Entity_Tear *)pEVar24))->Entity_Tear::SetTearFlags(flags_00); pcVar1 = *(code **)(*(int *)pEVar24 + 0x40); fVar27 = (float10)((Entity_Tear *)((Entity_Tear *)local_a00))->Entity_Tear::Scale(); @@ -27181,7 +27181,7 @@ LAB_00798e34: fVar27 = (float10)((Entity_Tear *)((Entity_Tear *)pEVar24))->Entity_Tear::Height(); orbitTearHeight = (float)fVar27; pfVar16 = (float *)std::max(); - BVar35 = (BitSet128)ZEXT416((uint)*pfVar16); + BVar35 = (BitSet128)ZEXT416(GHIDRA_UINT(*pfVar16)); ((Entity_Projectile *)((Entity_Projectile *)pEVar24))->Entity_Projectile::SetHeight(*pfVar16); FUN_00444c70(); ((Entity_Projectile *)((Entity_Projectile *)pEVar24))->Entity_Projectile::set_falling_accel(-0.09); @@ -27199,8 +27199,8 @@ LAB_00798e34: local_a0c = (Entity_Tear *)((RNG *)(music))->RNG::RandomFloat(); local_14 = -NAN; guard_check_icall(); - BVar35._0_12_ = ZEXT812(0x3ecccccd); - BVar35._h._4_4_ = 0; + (*(undefined1 *)((char *)&(BVar35) + 0x0)) = ZEXT812(0x3ecccccd); + (*(undefined4 *)((char *)&(BVar35._h) + 0x4)) = 0; if ((float)local_a0c < (float)BVar35._l) { tmpVec = ((Entity *)((Entity *)pEVar24))->Entity::Position(&capturedProjPos); local_a0c = (Entity_Tear *)((Vector *)(tmpVec))->Vector::Distance(&pEVar23->_pos); @@ -27227,7 +27227,7 @@ LAB_00798e34: pVVar15 = ((Entity *)((Entity *)local_a00))->Entity::Position(&capturedProjPos2); pEVar23 = savedPlayer; local_a30 = (Entity_Player *) - ((Game *)(g_game))->Game::Spawn(2,(uint)local_a0c,pVVar15,tmpVec, + ((Game *)(g_game))->Game::Spawn(2,GHIDRA_UINT(local_a0c),pVVar15,tmpVec, (Entity *)savedPlayer,0,uVar22); ((Entity *)((Entity *)local_a30))->Entity::SetParent((Entity *)pEVar23); tmpFlags2 = &g_tearFlagNoGridDamage; @@ -27246,10 +27246,10 @@ LAB_00798e34: ((BitSet128 *)(&capturedTearFlags))->BitSet128::operator__(&g_tearFlagQuadsplit); } pEVar24 = local_a30; - flags._l._4_4_ = capturedTearFlags._l._4_4_; - flags._l._0_4_ = (undefined4)capturedTearFlags._l; - flags._h._0_4_ = (undefined4)capturedTearFlags._h; - flags._h._4_4_ = capturedTearFlags._h._4_4_; + (*(undefined4 *)((char *)&(flags._l) + 0x4)) = (*(undefined4 *)((char *)&(capturedTearFlags._l) + 0x4)); + (*(undefined4 *)((char *)&(flags._l) + 0x0)) = (undefined4)capturedTearFlags._l; + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = (undefined4)capturedTearFlags._h; + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = (*(undefined4 *)((char *)&(capturedTearFlags._h) + 0x4)); ((Entity_Tear *)((Entity_Tear *)local_a30))->Entity_Tear::SetTearFlags(flags); pcVar1 = *(code **)(*(int *)pEVar24 + 0x3c); ((Entity *)((Entity *)local_a00))->Entity::GetColor(); @@ -27277,7 +27277,7 @@ LAB_00798e34: } } } - pvVar7 = (void *)((int)local_a38 + 1); + pvVar7 = (void *)(GHIDRA_INT(local_a38) + 1); local_a38 = pvVar7; pvVar28 = (void *)((EntityList *)((EntityList *)local_9fc))->EntityList::Size(); } while (pvVar7 < pvVar28); @@ -27328,7 +27328,7 @@ LAB_00799548: } iVar4 = ((Entity *)((Entity *)pEVar23))->Entity::FrameCount(); fVar11 = (float)(iVar4 % 0x168) + (float)local_a14; - BVar35 = (BitSet128)ZEXT416((uint)fVar11); + BVar35 = (BitSet128)ZEXT416(GHIDRA_UINT(fVar11)); ((Sprite *)(sprite))->Sprite::SetRotation(fVar11); } if (local_a0d != 0) { @@ -27347,8 +27347,8 @@ LAB_00799548: if (pEVar23->_darkArtsBlastPending == 0) { local_a14 = (Entity_Tear *)((Sprite *)((Sprite *)&pEVar23->_sprite))->Sprite::Color(); fVar11 = random_float(); - BVar35._l._0_4_ = fVar11 * 0.1 + 0.1; - BVar35._4_12_ = extraout_var_01; + (*(undefined4 *)((char *)&(BVar35._l) + 0x0)) = fVar11 * 0.1 + 0.1; + (*(undefined1 *)((char *)&(BVar35) + 0x4)) = extraout_var_01; pEVar8 = local_a14; } else { @@ -27395,10 +27395,10 @@ LAB_00799685: else { ((Entity *)((Entity *)pEVar23))->Entity::GetCollisionCapsule(darkArtsCapsule,&g_vectorZero); darkArtsCapsuleSize = darkArtsCapsuleSize + 10.0; - BVar35 = (BitSet128)ZEXT416((uint)darkArtsCapsuleSize); + BVar35 = (BitSet128)ZEXT416(GHIDRA_UINT(darkArtsCapsuleSize)); if ((pEVar23->_playerType == 0x18) && (bVar2 = HasCollectible(pEVar23,0x26b,0), bVar2 != 0)) { darkArtsCapsuleSize = darkArtsCapsuleSize + 30.0; - BVar35 = (BitSet128)ZEXT416((uint)darkArtsCapsuleSize); + BVar35 = (BitSet128)ZEXT416(GHIDRA_UINT(darkArtsCapsuleSize)); local_a0d = 0; if (*(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x1e88)) == 0) { uVar22 = Random(); @@ -27406,13 +27406,13 @@ LAB_00799685: uVar22); ((Entity *)(queryList))->Entity::SetParent((Entity *)pEVar23); ((EntityPtr *)((EntityPtr *)&(*(undefined1 *)((char *)(pEVar23) + 0x1e88))))->EntityPtr::SetReference(queryList); - BVar35 = (BitSet128)ZEXT416((uint)darkArtsCapsuleSize); + BVar35 = (BitSet128)ZEXT416(GHIDRA_UINT(darkArtsCapsuleSize)); local_a0d = 1; if (*(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x1e88)) != 0) goto LAB_007999a3; } else { LAB_007999a3: - BVar35._l._0_4_ = (float)BVar35._l / 120.0; + (*(undefined4 *)((char *)&(BVar35._l) + 0x0)) = (float)BVar35._l / 120.0; FUN_00435ed0(); queryList = *(Entity **)&(*(undefined1 *)((char *)(pEVar23) + 0x1e88)); tmpVec = ((Vector *)(&darkArtsAuraOffset))->Vector::Vector(0.0,-15.0); @@ -27500,13 +27500,13 @@ LAB_00799a98: pEVar23->_darkArtsDamage = (float)local_a38 + pEVar23->_darkArtsDamage; iVar4 = ((Entity *)((Entity *)local_a00))->Entity::SubType(); fVar11 = (float)((double)iVar4 + __uint_to_double_fixup[-(iVar4 >> 0x1f)]) * 0.05 + 1.5; - BVar35 = (BitSet128)ZEXT416((uint)fVar11); + BVar35 = (BitSet128)ZEXT416(GHIDRA_UINT(fVar11)); play_sound_with_fart_seed(0x1fb,0.8,1,0,fVar11); if (*(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x1e88)) != 0) { tmpVec = ((Entity *)((Entity *)pEVar8))->Entity::Position(&snareTargetPos2); local_a38 = (void *)((Vector *)(tmpVec))->Vector::Distance(&pEVar23->_pos); FUN_00417340(); - BVar35._l._0_4_ = (float)BVar35._l + pEVar23->_size + 10.0; + (*(undefined4 *)((char *)&(BVar35._l) + 0x0)) = (float)BVar35._l + pEVar23->_size + 10.0; if ((float)BVar35._l < (float)local_a38) { uVar22 = Random(); effect = (Entity_Effect *) @@ -27558,8 +27558,8 @@ LAB_00799a98: smokeCountCap = (void *)0x10; piVar14 = (int *)std::min(); local_9fc = (Entity_Player *)((float)*piVar14 * 0.0625); - BVar35._l._0_4_ = random_float(); - BVar35._4_12_ = extraout_var_02; + (*(undefined4 *)((char *)&(BVar35._l) + 0x0)) = random_float(); + (*(undefined1 *)((char *)&(BVar35) + 0x4)) = extraout_var_02; if ((float)BVar35._l < (float)local_9fc + 0.6) { tmpVec = (Vector *)TearsOffset(pEVar23); ((Vector *)(&pEVar23->_pos))->Vector::__add(&smokeOrigin,tmpVec); @@ -27592,7 +27592,7 @@ LAB_00799a98: smokeSpeedMax = 1.0; smokeSpeedWanted = 1.3 - (float)local_9fc * 0.5; pfVar16 = (float *)std::min(); - BVar35 = (BitSet128)ZEXT416((uint)*pfVar16); + BVar35 = (BitSet128)ZEXT416(GHIDRA_UINT(*pfVar16)); set_PlaybackSpeed(anm,*pfVar16); ((Color *)(smokeColor))->Color::Color(0.03137255,0.0,0.0,1.0); queryList->SetColor(); @@ -27604,17 +27604,17 @@ LAB_00799a98: } } } - if ((int)((Vector *)((int)local_a14 + 8))->x % (int)local_a1c == 0) { + if (GHIDRA_INT(((Vector *)(GHIDRA_INT(local_a14) + 8))->x) % GHIDRA_INT(local_a1c) == 0) { TemporaryEffects::RemoveNullEffect - ((TemporaryEffects *)pEVar8,0x6f,(int)*(float *)&(*(undefined1 *)((char *)(local_a14) + 0x4)) / 0x1e + 1); + ((TemporaryEffects *)pEVar8,0x6f,GHIDRA_INT(*(float *)&(*(undefined1 *)((char *)(local_a14) + 0x4))) / 0x1e + 1); } } pvVar28 = ((TemporaryEffects *)((TemporaryEffects *)pEVar8))->TemporaryEffects::GetNullEffect(0x72); if (pvVar28 != (void *)0x0) { iVar4 = ((Entity *)((Entity *)pEVar23))->Entity::GetIntervalTicks(2.0,0.0); if (iVar4 != 0) { - BVar35._l._0_4_ = random_float(); - BVar35._4_12_ = extraout_var_03; + (*(undefined4 *)((char *)&(BVar35._l) + 0x0)) = random_float(); + (*(undefined1 *)((char *)&(BVar35) + 0x4)) = extraout_var_03; if ((float)BVar35._l < 1.6) { tmpVec = (Vector *)TearsOffset(pEVar23); ((Vector *)(&pEVar23->_pos))->Vector::__add(&smoke2Origin,tmpVec); @@ -27647,7 +27647,7 @@ LAB_00799a98: smoke2SpeedWanted = 0.79999995; smoke2SpeedMax = 1.0; pfVar16 = (float *)std::min(); - BVar35 = (BitSet128)ZEXT416((uint)*pfVar16); + BVar35 = (BitSet128)ZEXT416(GHIDRA_UINT(*pfVar16)); set_PlaybackSpeed(anm,*pfVar16); set_field_358(queryList,-20.0); queryList->Update(); @@ -27662,11 +27662,11 @@ LAB_00799a98: if (iVar4 != 0) { uVar22 = *(uint *)(iVar4 + 8) & 0x80000007; bVar26 = uVar22 == 0; - if ((int)uVar22 < 0) { + if (GHIDRA_INT(uVar22) < 0) { bVar26 = (uVar22 - 1 | 0xfffffff8) == 0xffffffff; } if (bVar26) { - if ((int)*(uint *)(iVar4 + 8) < 0x3d) { + if (GHIDRA_INT(*(uint *)(iVar4 + 8)) < 0x3d) { uVar22 = Random(); pEVar23 = savedPlayer; local_a1c = (Entity_Familiar *) @@ -27746,8 +27746,8 @@ LAB_0079a6f8: iVar4 = FUN_00930a00(); local_a0c = (Entity_Tear *)(configItem->maxCooldown - *(int *)(iVar4 + 8)); local_a1c = (Entity_Familiar *)((Vector *)(&pEVar23->_velocity))->Vector::LengthSquared(); - BVar35._0_12_ = ZEXT812(0x41c80000); - BVar35._h._4_4_ = 0; + (*(undefined1 *)((char *)&(BVar35) + 0x0)) = ZEXT812(0x41c80000); + (*(undefined4 *)((char *)&(BVar35._h) + 0x4)) = 0; pEVar8 = (Entity_Tear *)&pEVar23->_temporaryeffects; if ((float)local_a1c < (float)BVar35._l) { dashSpeed = 0.0; @@ -27776,10 +27776,10 @@ LAB_0079a6f8: room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); bVar2 = ((Room *)(room))->Room::IsMirrorWorld(); if (bVar2 != 0) { - BVar35._l._0_4_ = -dashDir.x; - BVar35._l._4_4_ = 0x80000000; - BVar35._h._0_4_ = 0x80000000; - BVar35._h._4_4_ = 0x80000000; + (*(undefined4 *)((char *)&(BVar35._l) + 0x0)) = -dashDir.x; + (*(undefined4 *)((char *)&(BVar35._l) + 0x4)) = 0x80000000; + (*(undefined4 *)((char *)&(BVar35._h) + 0x0)) = 0x80000000; + (*(undefined4 *)((char *)&(BVar35._h) + 0x4)) = 0x80000000; dashDir.x = (float)BVar35._l; } marsDashSpeed = (void *)0x40800000; @@ -27795,15 +27795,15 @@ LAB_0079a6f8: else { pvVar28 = ((TemporaryEffects *)((TemporaryEffects *)pEVar8))->TemporaryEffects::GetCollectibleEffect(0x251); if ((pvVar28 != (void *)0x0) && - (local_a0c = *(Entity_Tear **)((char *)pvVar28 + 8), 0 < (int)local_a0c)) { + (local_a0c = *(Entity_Tear **)((char *)pvVar28 + 8), 0 < GHIDRA_INT(local_a0c))) { local_a00 = (Entity_Player *)0x251; dashSpeed = 15.0; itemConfig = Isaac::GetItemConfig(); local_a1c = (Entity_Familiar *)((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(0x2c0); local_a14 = (Entity_Tear *)FUN_00930a00(); - if ((local_a14 != (Entity_Tear *)0x0) && ((int)((Vector *)((int)local_a14 + 8))->x < 4)) { + if ((local_a14 != (Entity_Tear *)0x0) && (GHIDRA_INT(((Vector *)(GHIDRA_INT(local_a14) + 8))->x) < 4)) { ((TemporaryEffect *)(dashTempEffect))->TemporaryEffect::TemporaryEffect((ItemConfig_Item *)local_a1c); - dashTempEffectCooldown = 4 - (int)((Vector *)((int)local_a14 + 8))->x; + dashTempEffectCooldown = 4 - GHIDRA_INT(((Vector *)(GHIDRA_INT(local_a14) + 8))->x); ((TemporaryEffects *)((TemporaryEffects *)pEVar8))->TemporaryEffects::AddEffect(dashTempEffect,0,1); } goto LAB_0079ad8f; @@ -27819,9 +27819,9 @@ LAB_0079a6f8: LAB_0079ad8f: bVar2 = ((Entity *)((Entity *)pEVar23))->Entity::HasEntityFlags(0x4000); if (bVar2 == 0) { - local_a1c = (Entity_Familiar *)((uint)local_a0c & 0x80000003); - if ((int)local_a1c < 0) { - local_a1c = (Entity_Familiar *)(((uint)&(*(undefined1 *)((char *)&(local_a1c[-1]) + 0xf47)) | 0xfffffffc) + 1); + local_a1c = (Entity_Familiar *)(GHIDRA_UINT(local_a0c) & 0x80000003); + if (GHIDRA_INT(local_a1c) < 0) { + local_a1c = (Entity_Familiar *)((GHIDRA_UINT(&(*(undefined1 *)((char *)&(local_a1c[-1]) + 0xf47))) | 0xfffffffc) + 1); } if (local_a1c == (Entity_Familiar *)0x0) { local_a14 = *(Entity_Tear **)(*(int *)pEVar23 + 0x3c); @@ -27835,7 +27835,7 @@ LAB_0079ad8f: } else { LAB_0079aeb9: - if ((local_a00 == (Entity_Player *)0x82) && (((uint)local_a0c & 1) == 0)) { + if ((local_a00 == (Entity_Player *)0x82) && ((GHIDRA_UINT(local_a0c) & 1) == 0)) { bVar2 = ((TemporaryEffects *)((TemporaryEffects *)pEVar8))->TemporaryEffects::HasCollectibleEffect(0xb5); if (bVar2 != 0) { room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); @@ -27863,7 +27863,7 @@ LAB_0079aeb9: } } } - BVar35 = (BitSet128)ZEXT416((uint)dashSpeed); + BVar35 = (BitSet128)ZEXT416(GHIDRA_UINT(dashSpeed)); if (0.0 < dashSpeed) { local_a14 = (Entity_Tear *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); local_a3c = (Entity *)((Vector *)(&pEVar23->_velocity))->Vector::Length(); @@ -27951,8 +27951,8 @@ LAB_0079aeb9: pEVar23->_suplexState = 2; play_sound_with_fart_seed(0x407,1.0,2,0,1.0); fVar11 = random_float(); - BVar35._l._0_4_ = fVar11 * 0.2 + 0.9; - BVar35._4_12_ = extraout_var_04; + (*(undefined4 *)((char *)&(BVar35._l) + 0x0)) = fVar11 * 0.2 + 0.9; + (*(undefined1 *)((char *)&(BVar35) + 0x4)) = extraout_var_04; play_sound_with_fart_seed(0xf9,1.0,2,0,(float)BVar35._l); break; } @@ -28008,7 +28008,7 @@ LAB_0079aeb9: } } } - pVVar15 = (Vector *)((int)&(*(undefined1 *)((char *)(local_a04) + 0x0)) + 1); + pVVar15 = (Vector *)(GHIDRA_INT(&(*(undefined1 *)((char *)(local_a04) + 0x0))) + 1); local_a04 = (Entity_NPC *)pVVar15; tmpVec = (Vector *)((EntityList *)((EntityList *)dashHits))->EntityList::Size(); } while (pVVar15 < tmpVec); @@ -28022,7 +28022,7 @@ LAB_0079aeb9: goto LAB_0079ba07; queryList = (Entity *)GetOtherTwin(pEVar23); ((Entity *)(queryList))->Entity::Position(&twinPos); - local_a1c = (Entity_Familiar *)assert_lerp_range((float)(int)local_a0c,0.0,15.0,1.0,16.0,1); + local_a1c = (Entity_Familiar *)assert_lerp_range((float)GHIDRA_INT(local_a0c),0.0,15.0,1.0,16.0,1); tmpVec = ((Vector *)(&twinPos))->Vector::__sub(&toTwin,&pEVar23->_pos); BVar35 = (BitSet128)ZEXT416(local_a1c); bVar2 = 0; @@ -28046,7 +28046,7 @@ LAB_0079aeb9: fVar11 = random_float(); local_a1c = (Entity_Familiar *)(fVar11 * 0.7 + 0.3); ((Color *)(&trailColor))->Color::Color(0.0,0.0,0.0,1.0); - BVar35 = (BitSet128)ZEXT416((uint)((float)local_a1c * 0.7)); + BVar35 = (BitSet128)ZEXT416(GHIDRA_UINT(((float)local_a1c * 0.7))); ((Color *)(&trailColor))->Color::SetOffset((float)local_a1c * 0.4,(float)local_a1c * 0.7,(float)local_a1c); queryList->SetColor(); set_field_358(queryList,-5.0); @@ -28067,8 +28067,8 @@ LAB_0079ba25: pVVar15 = ((Vector *)(&pEVar23->_gridCollisionVelocity))->Vector::Normalized(&gridHitDir); tmpVec = &pEVar23->_gridCollisionNormal; local_a1c = (Entity_Familiar *)((Vector *)(pVVar15))->Vector::Dot(tmpVec); - BVar35._0_12_ = ZEXT812(0x3e4ccccd); - BVar35._h._4_4_ = 0; + (*(undefined1 *)((char *)&(BVar35) + 0x0)) = ZEXT812(0x3e4ccccd); + (*(undefined4 *)((char *)&(BVar35._h) + 0x4)) = 0; if ((float)BVar35._l <= (float)local_a1c) { if (pEVar23->_suplexState == 1) { suplexCountdownCap = 1.12104e-44; @@ -28131,7 +28131,7 @@ LAB_0079ba07: iVar4 = 2; } minMarsCooldown = -NAN; - local_c3c._16_4_ = pEVar23->_marsCooldown - iVar4; + (*(undefined4 *)((char *)&(local_c3c) + 0x10)) = pEVar23->_marsCooldown - iVar4; piVar14 = (int *)std::max(); iVar4 = *piVar14; pEVar23->_marsCooldown = iVar4; @@ -28182,18 +28182,18 @@ LAB_0079ba07: *(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x1ea4)) = iVar4; if (((iVar4 == 0x69) || (iVar4 == 0x78)) || (iVar4 == 0x87)) { local_a1c = (Entity_Familiar *)(9 - iVar4 / 0xf); - if (((uint)local_a1c & 1) == 0) { + if ((GHIDRA_UINT(local_a1c) & 1) == 0) { fVar11 = 1.7; } else { fVar11 = 1.4; } - SoundEffects::PlayWithFartOverride(0x1d5,0.8 - (float)(int)local_a1c * 0.2,1,0,fVar11); - auVar31._4_8_ = SUB128(ZEXT812(0x3f800000),4); - auVar31._0_4_ = SUB124(ZEXT812(0x3f800000),0) - (float)(int)local_a1c * 0.3; + SoundEffects::PlayWithFartOverride(0x1d5,0.8 - (float)GHIDRA_INT(local_a1c) * 0.2,1,0,fVar11); + (*(undefined8 *)((char *)&(auVar31) + 0x4)) = SUB128(ZEXT812(0x3f800000),4); + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = SUB124(ZEXT812(0x3f800000),0) - (float)GHIDRA_INT(local_a1c) * 0.3; LAB_0079bc57: - BVar35._h._4_4_ = 0; - BVar35._0_12_ = auVar31; + (*(undefined4 *)((char *)&(BVar35._h) + 0x4)) = 0; + (*(undefined1 *)((char *)&(BVar35) + 0x0)) = auVar31; pcVar1 = *(code **)(*(int *)pEVar23 + 0x3c); ((Color *)())->Color::Color(); (*pcVar1)(); @@ -28220,22 +28220,22 @@ LAB_0079bc57: } } pvVar28 = ((TemporaryEffects *)(&pEVar23->_temporaryeffects))->TemporaryEffects::GetNullEffect(0x3e); - if ((pvVar28 != (void *)0x0) && (uVar22 = *(uint *)((char *)pvVar28 + 8), (int)uVar22 < 0x5a)) { - if ((int)uVar22 < 0x20) { + if ((pvVar28 != (void *)0x0) && (uVar22 = *(uint *)((char *)pvVar28 + 8), GHIDRA_INT(uVar22) < 0x5a)) { + if (GHIDRA_INT(uVar22) < 0x20) { uVar22 = uVar22 & 0x80000007; - if ((int)uVar22 < 0) { + if (GHIDRA_INT(uVar22) < 0) { uVar22 = (uVar22 - 1 | 0xfffffff8) + 1; } } else { uVar22 = uVar22 & 0x8000000f; - if ((int)uVar22 < 0) { + if (GHIDRA_INT(uVar22) < 0) { uVar22 = (uVar22 - 1 | 0xfffffff0) + 1; } - uVar22 = (int)uVar22 / 2; + uVar22 = GHIDRA_INT(uVar22) / 2; } bVar2 = IsNullItemCostumeVisible(pEVar23,0x3e,-1); - if ((int)uVar22 < 4) { + if (GHIDRA_INT(uVar22) < 4) { if (bVar2 != 0) { itemConfig = Isaac::GetItemConfig(); configItem = ((Config *)(itemConfig))->Config::GetNullItem(0x3e); @@ -28327,12 +28327,12 @@ LAB_0079bd65: ((Entity *)(queryList))->Entity::SetField380((float)(fVar27 * (float10)4.0)); itemConfig = Isaac::GetItemConfig(); pEVar17 = local_a1c; - local_a1c = (Entity_Familiar *)((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible((int)local_a1c); + local_a1c = (Entity_Familiar *)((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(GHIDRA_INT(local_a1c)); if (local_a1c != (Entity_Familiar *)0x0) { hud = (HUD *)((Game *)(g_game))->Game::GetHUD(); ((HUD *)(hud))->HUD::ShowItemText(pEVar23,(ItemConfig_Item *)local_a1c); } - AnimateCollectible(pEVar23,(int)pEVar17,(byte *)"UseItem",(byte *)"PlayerPickupSparkle"); + AnimateCollectible(pEVar23,GHIDRA_INT(pEVar17),(byte *)"UseItem",(byte *)"PlayerPickupSparkle"); SoundEffects::PlayWithFartOverride(0x13c,1.0,2,0,1.0); local_14 = -NAN; std::vector::_Tidy(); @@ -28393,9 +28393,9 @@ LAB_0079bd65: } else { BVar35 = (BitSet128) - ZEXT416((uint)(float)((double)*(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x16b8)) + + ZEXT416(GHIDRA_UINT((float)((double)*(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x16b8)) + __uint_to_double_fixup - [-(*(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x16b8)) >> 0x1f)])); + [-(*(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x16b8)) >> 0x1f)]))); } local_a04 = (Entity_NPC *)BVar35._l; if (0.0 < (float)local_a04) { @@ -28404,24 +28404,24 @@ LAB_0079bd65: pAVar25 = pEVar23->_activeDesc; local_a00 = (Entity_Player *)0x0; do { - BVar35 = (BitSet128)ZEXT416((uint)chargeLeft); + BVar35 = (BitSet128)ZEXT416(GHIDRA_UINT(chargeLeft)); if (chargeLeft <= 0.0) break; if (pAVar25->_item != 0) { itemConfig = Isaac::GetItemConfig(); ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(pAVar25->_item); - local_a04 = (Entity_NPC *)GetActiveMaxCharge(pEVar23,(int)local_a00); - iVar4 = GetActiveMaxCharge(pEVar23,(int)local_a00); + local_a04 = (Entity_NPC *)GetActiveMaxCharge(pEVar23,GHIDRA_INT(local_a00)); + iVar4 = GetActiveMaxCharge(pEVar23,GHIDRA_INT(local_a00)); if ((iVar4 == 0) && - ((pAVar25->_charge < (int)local_a04 || + ((pAVar25->_charge < GHIDRA_INT(local_a04) || ((bVar2 = HasCollectible(pEVar23,0x3f,0), bVar2 != 0 && - (pAVar25->_batteryCharge < (int)local_a04)))))) { - local_b94._16_4_ = 1.0 - (float)pAVar25->_partialCharge; + (pAVar25->_batteryCharge < GHIDRA_INT(local_a04))))))) { + (*(undefined4 *)((char *)&(local_b94) + 0x10)) = 1.0 - (float)pAVar25->_partialCharge; partialChargeMin = (void *)0x0; std::max(); pfVar16 = (float *)std::min(); chargeLeft = chargeLeft - *pfVar16; - BVar35 = (BitSet128)ZEXT416((uint)chargeLeft); - pAVar25->_partialCharge = (int)(*pfVar16 + (float)pAVar25->_partialCharge); + BVar35 = (BitSet128)ZEXT416(GHIDRA_UINT(chargeLeft)); + pAVar25->_partialCharge = GHIDRA_INT((*pfVar16 + (float)pAVar25->_partialCharge)); } } local_a00 = (Entity_Player *)&(*(undefined1 *)((char *)(local_a00) + 0x1)); @@ -28450,17 +28450,17 @@ LAB_0079bd65: } else { BVar35 = (BitSet128) - ZEXT416((uint)(float)((double)*(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x16b8)) + + ZEXT416(GHIDRA_UINT((float)((double)*(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x16b8)) + __uint_to_double_fixup - [-(*(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x16b8)) >> 0x1f)])); + [-(*(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x16b8)) >> 0x1f)]))); } local_a04 = (Entity_NPC *)BVar35._l; if (0.0 < (float)local_a04) { itemConfig = Isaac::GetItemConfig(); ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(0x2c0); damage_charge_scale(); - BVar35._l._0_4_ = (float)BVar35._l * (float)local_a04 * 50000.0; - iVar4 = (int)(float)BVar35._l; + (*(undefined4 *)((char *)&(BVar35._l) + 0x0)) = (float)BVar35._l * (float)local_a04 * 50000.0; + iVar4 = GHIDRA_INT((float)BVar35._l); if (pEVar23->_playerType == 0x1b) { add_samson_berserk_charge(pEVar23,iVar4); } @@ -28469,11 +28469,11 @@ LAB_0079bd65: do { if (iVar4 < 1) break; if (*(int *)&(*(undefined1 *)((char *)(local_a08) + 0x0)) == 0x2c0) { - iVar20 = AddActiveCharge(pEVar23,iVar4,(int)local_a04,0,0,1); + iVar20 = AddActiveCharge(pEVar23,iVar4,GHIDRA_INT(local_a04),0,0,1); iVar4 = iVar4 - iVar20; } - local_a04 = (Entity_NPC *)((int)&((Vector *)local_a04)->x + 1); - local_a08 = (Entity_Player *)((int)local_a08 + 0x20); + local_a04 = (Entity_NPC *)(GHIDRA_INT(&((Vector *)local_a04)->x) + 1); + local_a08 = (Entity_Player *)(GHIDRA_INT(local_a08) + 0x20); } while (local_a04 < (Vector *)&DAT_00000004); } } @@ -28487,9 +28487,9 @@ LAB_0079bd65: } else { BVar35 = (BitSet128) - ZEXT416((uint)(float)((double)*(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x16b8)) + + ZEXT416(GHIDRA_UINT((float)((double)*(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x16b8)) + __uint_to_double_fixup - [-(*(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x16b8)) >> 0x1f)])); + [-(*(int *)&(*(undefined1 *)((char *)(pEVar23) + 0x16b8)) >> 0x1f)]))); } local_a04 = (Entity_NPC *)BVar35._l; if (0.0 < (float)local_a04) { @@ -28497,10 +28497,10 @@ LAB_0079bd65: fVar11 = (float)BVar35._l * (float)local_a04 * 1.5 + *(float *)&(*(undefined1 *)((char *)(pEVar23) + 0x1f74)); *(float *)&(*(undefined1 *)((char *)(pEVar23) + 0x1f74)) = fVar11; if (1.0 <= fVar11) { - pEVar17 = (Entity_Familiar *)(int)fVar11; - *(float *)&(*(undefined1 *)((char *)(pEVar23) + 0x1f74)) = fVar11 - (float)(int)pEVar17; + pEVar17 = (Entity_Familiar *)GHIDRA_INT(fVar11); + *(float *)&(*(undefined1 *)((char *)(pEVar23) + 0x1f74)) = fVar11 - (float)GHIDRA_INT(pEVar17); local_a1c = pEVar17; - if (0 < (int)pEVar17) { + if (0 < GHIDRA_INT(pEVar17)) { local_a04 = (Entity_NPC *)&pEVar23->_pos; do { uVar22 = Random(); @@ -28521,8 +28521,8 @@ LAB_0079bd65: ((Entity *)(queryList))->Entity::SetSpriteScale(tmpVec); fVar11 = random_float(); pEVar23 = savedPlayer; - BVar35._l._0_4_ = fVar11 * 0.2 + 1.8; - BVar35._4_12_ = extraout_var_05; + (*(undefined4 *)((char *)&(BVar35._l) + 0x0)) = fVar11 * 0.2 + 1.8; + (*(undefined1 *)((char *)&(BVar35) + 0x4)) = extraout_var_05; play_sound_with_fart_seed(0x25,0.8,2,0,(float)BVar35._l); } } @@ -28548,10 +28548,10 @@ LAB_0079bd65: } } fVar11 = pEVar23->_ibsCharge; - BVar36 = (BitSet128)ZEXT416((uint)fVar11); + BVar36 = (BitSet128)ZEXT416(GHIDRA_UINT(fVar11)); if (fVar11 < 0.0) { ibsChargeNext = fVar11 + 0.016666668; - BVar36 = (BitSet128)ZEXT416((uint)ibsChargeNext); + BVar36 = (BitSet128)ZEXT416(GHIDRA_UINT(ibsChargeNext)); ibsChargeMax = (void *)0x0; pfVar16 = (float *)std::min(); pEVar23->_ibsCharge = *pfVar16; @@ -28599,7 +28599,7 @@ LAB_0079c87f: if ((bVar2 == 0) && ((local_a04 == (Entity_NPC *)&DAT_00000004 || (local_a04 == (Entity_NPC *)&DAT_00000005)))) { - ((TemporaryEffects *)(tempEffects))->TemporaryEffects::AddCollectibleEffect(699,0,6 - (int)local_a04); + ((TemporaryEffects *)(tempEffects))->TemporaryEffects::AddCollectibleEffect(699,0,6 - GHIDRA_INT(local_a04)); queryList = (Entity *)0x0; iVar4 = Isaac::Random(2); GetTearHitParams(pEVar23,aTStack_8c0,3,1.5,iVar4 * 2 + -1,queryList); @@ -28629,17 +28629,17 @@ LAB_0079c87f: ((std::string *)(headDownShoot))->std::string::string_from_cstr((byte *)"HeadDownShoot"); local_14 = 2.38221e-44; ((std::string *)(headRightShoot))->std::string::string_from_cstr((byte *)"HeadRightShoot"); - local_14._0_1_ = 0x12; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x12; ((std::string *)(headUpShoot))->std::string::string_from_cstr((byte *)"HeadUpShoot"); - local_14._0_1_ = 0x13; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x13; ((std::string *)(headLeftShoot))->std::string::string_from_cstr((byte *)"HeadLeftShoot"); - local_14._0_1_ = 0x14; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x14; direction.y = rageDir.y; direction.x = rageDir.x; animName = string_from_direction (rageHeadAnim,direction,headLeftShoot,headUpShoot,headRightShoot, headDownShoot); - local_14 = (float)CONCAT31(local_14._1_3_,0x15); + local_14 = (float)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x15); play_null_costume_anim(pEVar23,99,0,animName,-1,0); ((std::string *)(rageHeadAnim))->std::string::_Tidy_deallocate(); ((std::string *)(headLeftShoot))->std::string::_Tidy_deallocate(); @@ -28790,32 +28790,32 @@ LAB_0079cfcb: if (local_a04 == (Entity_NPC *)0x0) { if (queryList != (Entity *)0x0) { FUN_00417340(); - BVar36._l._0_4_ = (float)BVar36._l + pEVar23->_size + 8.0; + (*(undefined4 *)((char *)&(BVar36._l) + 0x0)) = (float)BVar36._l + pEVar23->_size + 8.0; pushRadius = (float)BVar36._l; iVar4 = ((Entity *)(queryList))->Entity::EntityCollisionClass(); if (iVar4 != 0) { tmpVec = ((Entity *)(queryList))->Entity::Position(&heartPushPosX); - BVar36 = (BitSet128)ZEXT416((uint)(tmpVec->x - (pEVar23->_pos).x)); + BVar36 = (BitSet128)ZEXT416(GHIDRA_UINT((tmpVec->x - (pEVar23->_pos).x))); Math::abs(); if ((float)BVar36._l < pushRadius) { tmpVec = ((Entity *)(queryList))->Entity::Position(&heartPushPosY); - BVar36 = (BitSet128)ZEXT416((uint)(tmpVec->y - (pEVar23->_pos).y)); + BVar36 = (BitSet128)ZEXT416(GHIDRA_UINT((tmpVec->y - (pEVar23->_pos).y))); Math::abs(); if ((float)BVar36._l < pushRadius) { tmpVec = ((Entity *)(queryList))->Entity::Position(&heartPushPos); ((Vector *)(tmpVec))->Vector::__sub(&pushDir,&pEVar23->_pos); local_a1c = (Entity_Familiar *)((Vector *)(&pushDir))->Vector::Length(); - BVar36 = (BitSet128)ZEXT416((uint)pushRadius); + BVar36 = (BitSet128)ZEXT416(GHIDRA_UINT(pushRadius)); if (((float)local_a1c < pushRadius) && (0.0 < (float)local_a1c)) { ((Vector *)(&pushDir))->Vector::__div_assign(&pushRadius); tmpVec = ((Entity *)(queryList))->Entity::Velocity(&heartPushVel); local_a1c = (Entity_Familiar *)((Vector *)(tmpVec))->Vector::Dot(&pushDir); BVar36 = (BitSet128)ZEXT416(local_a1c); if ((float)local_a1c < 0.0) { - BVar36._l._0_4_ = -(float)local_a1c; - BVar36._l._4_4_ = 0x80000000; - BVar36._h._0_4_ = 0x80000000; - BVar36._h._4_4_ = 0x80000000; + (*(undefined4 *)((char *)&(BVar36._l) + 0x0)) = -(float)local_a1c; + (*(undefined4 *)((char *)&(BVar36._l) + 0x4)) = 0x80000000; + (*(undefined4 *)((char *)&(BVar36._h) + 0x0)) = 0x80000000; + (*(undefined4 *)((char *)&(BVar36._h) + 0x4)) = 0x80000000; bVar2 = 0; pushStrength = (float)BVar36._l; tmpVec = Vector::operator_mul(&pushVelocity,&pushStrength,&pushDir); @@ -28835,11 +28835,11 @@ LAB_0079cfcb: BVar36 = (BitSet128)ZEXT416(local_a1c); if (-90.0 < (float)local_a1c) { tmpVec = ((Entity *)((Entity *)pEVar18))->Entity::Position(&heartProjPosX); - BVar36 = (BitSet128)ZEXT416((uint)(tmpVec->x - (pEVar23->_pos).x)); + BVar36 = (BitSet128)ZEXT416(GHIDRA_UINT((tmpVec->x - (pEVar23->_pos).x))); Math::abs(); if ((float)BVar36._l < (float)local_a34) { tmpVec = ((Entity *)((Entity *)pEVar18))->Entity::Position(&heartProjPosY); - BVar36 = (BitSet128)ZEXT416((uint)(tmpVec->y - (pEVar23->_pos).y)); + BVar36 = (BitSet128)ZEXT416(GHIDRA_UINT((tmpVec->y - (pEVar23->_pos).y))); Math::abs(); if ((float)BVar36._l < (float)local_a34) { tmpVec = ((Entity *)((Entity *)pEVar18))->Entity::Position(&heartProjPos); @@ -28852,7 +28852,7 @@ LAB_0079cfcb: } } } - pAVar25 = (ActiveItemDesc *)((int)&(*(undefined1 *)((char *)(local_a08) + 0x0)) + 1); + pAVar25 = (ActiveItemDesc *)(GHIDRA_INT(&(*(undefined1 *)((char *)(local_a08) + 0x0))) + 1); local_a08 = (Entity_Player *)pAVar25; puVar10 = (undefined1 *)((EntityList *)((EntityList *)local_c84))->EntityList::Size(); } while (pAVar25 < puVar10); @@ -28867,7 +28867,7 @@ LAB_0079cfcb: EntityList::QuerySublist(entityList,(EntityList_EL *)local_c3c,3,-1,-1,0,0); local_14 = 3.64338e-44; FUN_00424510(); - local_14 = (float)CONCAT31(local_14._1_3_,0x1b); + local_14 = (float)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x1b); ((Game *)(g_game))->Game::GetField26614(); cVar3 = DeathmatchManager::is_active(); if (cVar3 == '\0') { @@ -28879,13 +28879,13 @@ LAB_0079cfcb: iVar4 = ((Game *)(g_game))->Game::GetNumPlayers(); if (iVar4 != 0) { do { - pEVar24 = ((Game *)(g_game))->Game::GetPlayer((uint)pvVar28); + pEVar24 = ((Game *)(g_game))->Game::GetPlayer(GHIDRA_UINT(pvVar28)); if (((pEVar24 != pEVar23) && (cVar3 = ((Entity *)((Entity *)pEVar24))->Entity::IsDead(), cVar3 == '\0')) && (cVar3 = ((Entity *)((Entity *)pEVar24))->Entity::Visible(), cVar3 != '\0')) { cordPlayer = pEVar24; std::vector::push_back(); } - pvVar28 = (void *)((int)local_a04 + 1); + pvVar28 = (void *)(GHIDRA_INT(local_a04) + 1); local_a04 = pvVar28; pvVar7 = (void *)((Game *)(g_game))->Game::GetNumPlayers(); } while (pvVar28 < pvVar7); @@ -29118,11 +29118,11 @@ LAB_0079d585: ((std::string *)(headDownShoot2))->std::string::string_from_cstr((byte *)"HeadDownShoot"); local_14 = 3.92364e-44; ((std::string *)(headRightShoot2))->std::string::string_from_cstr((byte *)"HeadRightShoot"); - local_14._0_1_ = 0x1d; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1d; ((std::string *)(headUpShoot2))->std::string::string_from_cstr((byte *)"HeadUpShoot"); - local_14._0_1_ = 0x1e; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1e; ((std::string *)(headLeftShoot2))->std::string::string_from_cstr((byte *)"HeadLeftShoot"); - local_14._0_1_ = 0x1f; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1f; direction_00.y = rageLaserDir.y; direction_00.x = rageLaserDir.x; string_from_direction @@ -29131,7 +29131,7 @@ LAB_0079d585: ((std::string *)(headLeftShoot2))->std::string::_Tidy_deallocate(); ((std::string *)(headUpShoot2))->std::string::_Tidy_deallocate(); ((std::string *)(headRightShoot2))->std::string::_Tidy_deallocate(); - local_14 = (float)CONCAT31(local_14._1_3_,0x24); + local_14 = (float)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x24); ((std::string *)(headDownShoot2))->std::string::_Tidy_deallocate(); play_null_costume_anim(pEVar23,99,0,(std_string *)(local_78 + 0x2c),-2,0); itemConfig = Isaac::GetItemConfig(); @@ -29181,7 +29181,7 @@ LAB_0079d585: ((EntityRef *)(&planCSource))->EntityRef::EntityRef(); (*pcVar1)(); *(undefined4 *)&pEVar23->_lastDamageFlags = 0; - *(undefined4 *)((int)&pEVar23->_lastDamageFlags + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&pEVar23->_lastDamageFlags) + 4) = 0; (pEVar23->_lastDamageSource)._type = 0; (pEVar23->_lastDamageSource)._variant = 0; } @@ -29201,7 +29201,7 @@ LAB_0079d585: stompyDustSpread = stompyDustSpread * 20.0; pVVar15 = ((Vector *)(pVVar15))->Vector::__mul(&stompyDustOffset,&stompyDustSpread); tmpVec = ((Vector *)(tmpVec))->Vector::__add(&stompyDustPos,pVVar15); - ((Game *)(g_game))->Game::Spawn(1000,0x3b,tmpVec,(Vector *)local_a28,(Entity *)0x0,0,(uint)local_a1c); + ((Game *)(g_game))->Game::Spawn(1000,0x3b,tmpVec,(Vector *)local_a28,(Entity *)0x0,0,GHIDRA_UINT(local_a1c)); effect = (Entity_Effect *)__RTDynamicCast(); iVar4 = Isaac::Random(2); if (iVar4 == 0) { @@ -29257,7 +29257,7 @@ LAB_0079d585: iVar4 = ((Game *)(g_game))->Game::GetNumPlayers(); if (iVar4 != 0) { do { - pEVar24 = ((Game *)(g_game))->Game::GetPlayer((uint)puVar10); + pEVar24 = ((Game *)(g_game))->Game::GetPlayer(GHIDRA_UINT(puVar10)); if (pEVar24 != pEVar23) { bVar2 = HasCollectible(pEVar24,0x2b8,0); if (bVar2 != 0) { @@ -29266,10 +29266,10 @@ LAB_0079d585: auVar32 = ZEXT416(local_a28); if ((float)local_a34 < (float)local_a28) { get_salvation_scale(); - auVar37._4_12_ = auVar32._4_12_; - auVar37._0_4_ = auVar32._0_4_ * 70.0 + pEVar23->_size; + (*(undefined1 *)((char *)&(auVar37) + 0x4)) = (*(undefined1 *)((char *)&(auVar32) + 0x4)); + (*(undefined4 *)((char *)&(auVar37) + 0x0)) = (*(undefined4 *)((char *)&(auVar32) + 0x0)) * 70.0 + pEVar23->_size; FUN_006daa90(); - if ((double)(float)local_a34 < auVar37._0_8_) { + if ((double)(float)local_a34 < (*(undefined8 *)((char *)&(auVar37) + 0x0))) { local_a28 = local_a34; local_9fc = pEVar24; } @@ -29366,8 +29366,8 @@ LAB_0079d585: projectileFlags = ((Entity_Projectile *)((Entity_Projectile *)pEVar8))->Entity_Projectile::ProjectileFlags(); Entity_Projectile::set_projectile_flags ((Entity_Projectile *)local_a28, - CONCAT44((uint)(projectileFlags >> 0x20) & _DAT_00c5d0e4, - ((uint)projectileFlags | 0x80000080) & _DAT_00c5d0e0) | + CONCAT44(GHIDRA_UINT((projectileFlags >> 0x20)) & _DAT_00c5d0e4, + (GHIDRA_UINT(projectileFlags) | 0x80000080) & _DAT_00c5d0e0) | 0x500000000); pEVar8 = local_a28; FUN_004aad90(); @@ -29466,7 +29466,7 @@ LAB_0079d585: } else { LAB_0079e9c1: - ((Entity_Effect *)(effect))->Entity_Effect::set_state((uint)(*(int *)((char *)local_9fc + 8) < 0x3c)); + ((Entity_Effect *)(effect))->Entity_Effect::set_state(GHIDRA_UINT((*(int *)((char *)local_9fc + 8) < 0x3c))); } local_14 = -NAN; ((EntityList_Query *)(local_adc))->EntityList_Query::~EntityList_Query(); @@ -29572,7 +29572,7 @@ LAB_0079eac8: uVar22 = 3; } else { - uVar22 = (-(uint)(uVar22 < 0x56) & 0xfffffffe) + 6; + uVar22 = (-GHIDRA_UINT((uVar22 < 0x56)) & 0xfffffffe) + 6; } uVar5 = Random(); ((Game *)(g_game))->Game::Spawn(3,0xc9,&pEVar23->_pos,&g_vectorZero,(Entity *)pEVar23,uVar22,uVar5); @@ -29760,7 +29760,7 @@ void Entity_Player::update_ladder() Entity_Player *otherPlayer; EntityPtr *spawnerSlot; - stackCookie = __security_cookie ^ (uint)auStack_b8; + stackCookie = __security_cookie ^ GHIDRA_UINT(auStack_b8); local_7c = this; bVar5 = HasCollectible(this,0x3c,0); if ((bVar5 == 0) || (local_7c->_variant != 0)) { @@ -29824,13 +29824,13 @@ LAB_0079f708: } else { if (uVar9 == 0x46) { - local_68 = (int *)((uint)spawnSubType >> 0xb); + local_68 = (int *)(GHIDRA_UINT(spawnSubType) >> 0xb); do { local_b4 = spawnSubType; if (spawnSubType != (int *)0x0) { pcVar1 = *(code **)(*local_ac + 0x28); iVar8 = ItemPool::GetPillEffect - (&g_game->_itemPool,(uint)spawnSubType,(Entity_Player *)0x0); + (&g_game->_itemPool,GHIDRA_UINT(spawnSubType),(Entity_Player *)0x0); isBanned = (*pcVar1)(iVar8); if (isBanned == '\0') goto LAB_0079f710; uVar6 = local_a8; @@ -29846,7 +29846,7 @@ LAB_0079f708: uVar6 = uVar6 >> ((byte)local_94 & 0x1f) ^ uVar6; local_a8 = uVar6; uVar9 = ItemPool::GetPill(uVar6); - spawnSubType = (int *)(uVar9 | ((uint)local_68 & 1) << 0xb); + spawnSubType = (int *)(uVar9 | (GHIDRA_UINT(local_68) & 1) << 0xb); } while( true ); } if (uVar9 != 100) goto LAB_0079f708; @@ -29858,7 +29858,7 @@ LAB_0079f54a: else { local_68 = spawnSubType; std::set::find_node(local_30,&local_68); - if (((*(char *)(local_28 + 0xd) == '\0') && (*(int *)(local_28 + 0x10) <= (int)piVar11)) + if (((*(char *)(local_28 + 0xd) == '\0') && (*(int *)(local_28 + 0x10) <= GHIDRA_INT(piVar11))) && (local_28 != piVar7[8])) goto LAB_0079f54a; bVar13 = true; } @@ -29882,21 +29882,21 @@ LAB_0079f710: if (local_94 != (Entity *)0x0) { timeNs = GetTimeNs(); ladder = local_94; - local_a8 = (uint)(timeNs >> 0x20); + local_a8 = GHIDRA_UINT((timeNs >> 0x20)); lVar2 = (timeNs & 0xffffffff) * 0x431bde82; local_64 = (EntityPtr *)((ulonglong)lVar2 >> 0x20); local_a0 = (void *)((ulonglong)local_a8 * 0xd7b634db >> 0x20); timeNs = (ulonglong)local_a8 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); - uVar6 = (uint)(timeNs >> 0x20); + uVar6 = GHIDRA_UINT((timeNs >> 0x20)); lVar2 = lVar2 + (timeNs & 0xffffffff); - local_58[0] = (int)lVar2; - uVar9 = (uint)((ulonglong)lVar2 >> 0x20); + local_58[0] = GHIDRA_INT(lVar2); + uVar9 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); lVar2 = (ulonglong)local_a8 * 0x431bde82 + (ulonglong)CONCAT14(CARRY4(uVar6,uVar9),uVar6 + uVar9); local_94->_spawnerType = 0; - uVar9 = (uint)((ulonglong)lVar2 >> 0x20); + uVar9 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); local_94->_spawnerVariant = 0; - local_ac = (int *)((uint)lVar2 >> 0x12 | uVar9 * 0x4000); + local_ac = (int *)(GHIDRA_UINT(lVar2) >> 0x12 | uVar9 * 0x4000); local_90 = (float)(uVar9 >> 0x12); spawnerSlot = &local_94->_spawnerEntity; if (*spawnerSlot != (EntityPtr)0x0) { @@ -29915,7 +29915,7 @@ LAB_0079f710: iVar8 = *(int *)((char *)pvVar10 + 0x1214); *(int *)((char *)pvVar10 + 0x1214) = iVar8 + 1; ladder->_index = iVar8; - ((EntityList *)((EntityList *)((int)pvVar10 + 0x1218)))->EntityList::AddEntity(ladder); + ((EntityList *)((EntityList *)(GHIDRA_INT(pvVar10) + 0x1218)))->EntityList::AddEntity(ladder); bVar5 = Game::ShouldEraseEnemy(ladder); if (bVar5 != 0) { Entity::RemoveWithPoof(ladder,unusedArg); @@ -29936,52 +29936,52 @@ LAB_0079f710: } playerManager = &g_game->_playerManager; local_a4 = (Game *)0x0; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar10 = (playerManager->_playerList)._end; - if ((int)pvVar10 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar10) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar10 = (playerManager->_playerList)._end; } piVar7 = (playerManager->_playerList)._begin; - if (local_a4 < (Game *)((int)pvVar10 - (int)piVar7 >> 2)) { - piVar7 = piVar7 + (int)local_a4; + if (local_a4 < (Game *)(GHIDRA_INT(pvVar10) - GHIDRA_INT(piVar7) >> 2)) { + piVar7 = piVar7 + GHIDRA_INT(local_a4); } trigger_set_dispatch((void *)(*piVar7 + 0x1fc8),6,ladder,&g_vectorZero,&g_vectorZero); playerManager = &g_game->_playerManager; - local_a4 = (Game *)((int)&local_a4->_stage + 1); + local_a4 = (Game *)(GHIDRA_INT(&local_a4->_stage) + 1); } while (local_a4 < - (Game *)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + (Game *)(GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2)); } } LAB_0079f990: timeNs = GetTimeNs(); - uVar9 = (uint)(timeNs >> 0x20); + uVar9 = GHIDRA_UINT((timeNs >> 0x20)); lVar3 = (timeNs & 0xffffffff) * 0x431bde82; local_b4 = (int *)((ulonglong)lVar3 >> 0x20); lVar4 = (ulonglong)uVar9 * 0xd7b634db; local_a4 = (Game *)((ulonglong)lVar4 >> 0x20); lVar2 = (ulonglong)uVar9 * 0x431bde82; timeNs = lVar4 + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); - uVar6 = (uint)(timeNs >> 0x20); + uVar6 = GHIDRA_UINT((timeNs >> 0x20)); lVar3 = lVar3 + (timeNs & 0xffffffff); apiStack_78[0] = (int *)lVar3; - uVar9 = (uint)((ulonglong)lVar3 >> 0x20); + uVar9 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); lVar3 = lVar2 + (ulonglong)CONCAT14(CARRY4(uVar6,uVar9),uVar6 + uVar9); - uVar6 = (uint)((ulonglong)lVar3 >> 0x20); - piVar7 = (int *)((uint)lVar3 >> 0x12 | uVar6 * 0x4000); - uVar9 = (int)piVar7 - (int)local_ac; - bVar13 = CARRY4((uint)g_entitySpawnTimeMs,uVar9); - g_entitySpawnTimeMs._0_4_ = (uint)g_entitySpawnTimeMs + uVar9; - g_entitySpawnTimeMs._4_4_ = - g_entitySpawnTimeMs._4_4_ + (((uVar6 >> 0x12) - (int)local_90) - (uint)(piVar7 < local_ac)) - + (uint)bVar13; + uVar6 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); + piVar7 = (int *)(GHIDRA_UINT(lVar3) >> 0x12 | uVar6 * 0x4000); + uVar9 = GHIDRA_INT(piVar7) - GHIDRA_INT(local_ac); + bVar13 = CARRY4(GHIDRA_UINT(g_entitySpawnTimeMs),uVar9); + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x0)) = GHIDRA_UINT(g_entitySpawnTimeMs) + uVar9; + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) = + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) + (((uVar6 >> 0x12) - GHIDRA_INT(local_90)) - GHIDRA_UINT((piVar7 < local_ac))) + + GHIDRA_UINT(bVar13); } piVar7 = ladderSlot; ladder = local_94; - local_a8 = (uint)lVar2; + local_a8 = GHIDRA_UINT(lVar2); local_94->_visible = 0; *(undefined4 *)&(*(undefined1 *)((char *)&(local_94[1]) + 0x40)) = 0xffffffff; if (*ladderSlot != 0) { @@ -29990,8 +29990,8 @@ LAB_0079f990: lVar2 = CONCAT44(local_60,local_a8); } local_60 = (int *)((ulonglong)lVar2 >> 0x20); - local_a8 = (uint)lVar2; - *piVar7 = (int)ladder; + local_a8 = GHIDRA_UINT(lVar2); + *piVar7 = GHIDRA_INT(ladder); piStack_88 = piVar7; std::set::insert_unique(auStack_24,&piStack_88); local_b4 = *(int **)&(*(undefined1 *)((char *)(local_7c) + 0x1424)); @@ -30005,17 +30005,17 @@ LAB_0079fa87: if (*(char *)((char *)local_b4 + 0x171) != '\0') { uVar9 = local_b4[0x114]; uVar6 = 0; - fVar14 = (float)((int)uVar9 % (int)local_a8) * 40.0 + 40.0; - piVar7 = (int *)((float)((int)uVar9 / (int)local_a8) * 40.0 + 120.0); + fVar14 = (float)(GHIDRA_INT(uVar9) % GHIDRA_INT(local_a8)) * 40.0 + 40.0; + piVar7 = (int *)((float)(GHIDRA_INT(uVar9) / GHIDRA_INT(local_a8)) * 40.0 + 120.0); game = g_game; fStack_84 = fVar14; apiStack_78[0] = piVar7; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { pvVar10 = (game->_playerManager)._playerList._end; piVar11 = (game->_playerManager)._playerList._begin; - if ((int)pvVar10 - (int)piVar11 >> 2 == 0) { + if (GHIDRA_INT(pvVar10) - GHIDRA_INT(piVar11) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar10 = (game->_playerManager)._playerList._end; piVar11 = (game->_playerManager)._playerList._begin; @@ -30023,7 +30023,7 @@ LAB_0079fa87: fVar14 = fStack_84; piVar7 = apiStack_78[0]; } - if (uVar6 < (uint)((int)pvVar10 - (int)piVar11 >> 2)) { + if (uVar6 < GHIDRA_UINT((GHIDRA_INT(pvVar10) - GHIDRA_INT(piVar11) >> 2))) { piVar11 = piVar11 + uVar6; } otherPlayer = (Entity_Player *)*piVar11; @@ -30034,12 +30034,12 @@ LAB_0079fa87: goto LAB_0079fc67; } uVar6 = uVar6 + 1; - } while (uVar6 < (uint)((int)(game->_playerManager)._playerList._end - - (int)(game->_playerManager)._playerList._begin >> 2)); + } while (uVar6 < GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((game->_playerManager)._playerList._begin) >> 2))); uVar9 = local_b4[0x114]; } piVar7 = local_b4; - if (((-1 < (int)uVar9) && (uVar9 < 0x1c0)) && + if (((-1 < GHIDRA_INT(uVar9)) && (uVar9 < 0x1c0)) && ((pit = *(GridEntity_Pit **)((char *)room + uVar9 * 4 + 0x24), pit != (GridEntity_Pit *)0x0 && ((pit->_desc)._type == 7)))) { pit->_hasLadder = 0; @@ -30061,12 +30061,12 @@ LAB_0079fc67: } } else { - iVar12 = (int)((local_90 - 40.0) / 40.0 + 0.5); - iVar8 = (int)(((float)local_94 - 120.0) / 40.0 + 0.5); + iVar12 = GHIDRA_INT(((local_90 - 40.0) / 40.0 + 0.5)); + iVar8 = GHIDRA_INT((((float)local_94 - 120.0) / 40.0 + 0.5)); if (((-1 < iVar12) && (iVar12 < *(int *)((char *)room + 0xc))) && ((-1 < iVar8 && ((iVar8 < *(int *)((char *)room + 0x10) && - (piStack_88 = (int *)(iVar8 * *(int *)((char *)room + 0xc) + iVar12), -1 < (int)piStack_88)))) + (piStack_88 = (int *)(iVar8 * *(int *)((char *)room + 0xc) + iVar12), -1 < GHIDRA_INT(piStack_88))))) )) { fStack_84 = (float)local_ac; apiStack_78[0] = &local_a4->_stage; @@ -30079,8 +30079,8 @@ LAB_0079fc67: fStack_84 = (1.0 / fVar14) * (float)local_ac; moveDirY = (1.0 / fVar14) * (float)local_a4; } - iVar8 = (int)(((fStack_84 * 40.0 + local_90) - 40.0) / 40.0 + 0.5); - iVar12 = (int)(((moveDirY * 40.0 + (float)local_94) - 120.0) / 40.0 + 0.5); + iVar8 = GHIDRA_INT((((fStack_84 * 40.0 + local_90) - 40.0) / 40.0 + 0.5)); + iVar12 = GHIDRA_INT((((moveDirY * 40.0 + (float)local_94) - 120.0) / 40.0 + 0.5)); if ((((iVar8 < 0) || (*(int *)((char *)room + 0xc) <= iVar8)) || (iVar12 < 0)) || (*(int *)((char *)room + 0x10) <= iVar12)) { uVar9 = 0xffffffff; @@ -30089,8 +30089,8 @@ LAB_0079fc67: uVar9 = iVar12 * *(int *)((char *)room + 0xc) + iVar8; } if (piVar7[0x114] != uVar9) { - if ((int)piStack_88 < 0x1c0) { - iVar8 = *(int *)((char *)room + (int)piStack_88 * 4 + 0x24); + if (GHIDRA_INT(piStack_88) < 0x1c0) { + iVar8 = *(int *)((char *)room + GHIDRA_INT(piStack_88) * 4 + 0x24); } else { iVar8 = 0; @@ -30108,21 +30108,21 @@ LAB_0079fc67: uVar6 = uVar9 - 1; upGridIdx = uVar9 - local_a8; piStack_88 = (int *)(uVar9 + local_a8); - if (((((ABS((float)local_ac) <= ABS((float)local_a4)) || ((int)uVar6 < 0)) || - ((int)(local_a8 * local_a8) <= (int)uVar6)) || + if (((((ABS((float)local_ac) <= ABS((float)local_a4)) || (GHIDRA_INT(uVar6) < 0)) || + (GHIDRA_INT((local_a8 * local_a8)) <= GHIDRA_INT(uVar6))) || (((uVar6 < 0x1c0 && (apiStack_78[0] = *(int **)((char *)room + uVar9 * 4 + 0x20), apiStack_78[0] != (int *)0x0)) && (apiStack_78[0][1] == 7)))) || - (((int)(local_a8 * local_a8) <= (int)fStack_84 || + ((GHIDRA_INT((local_a8 * local_a8)) <= GHIDRA_INT(fStack_84) || (((uVar9 + 1 < 0x1c0 && (*(int *)((char *)room + uVar9 * 4 + 0x28) != 0)) && (*(int *)(*(int *)((char *)room + uVar9 * 4 + 0x28) + 4) == 7)))))) { if (ABS((float)local_a4) <= ABS((float)local_ac)) { return; } - if ((int)upGridIdx < 0) { + if (GHIDRA_INT(upGridIdx) < 0) { return; } - if ((int)(local_a8 * local_a8) <= (int)upGridIdx) { + if (GHIDRA_INT((local_a8 * local_a8)) <= GHIDRA_INT(upGridIdx)) { return; } if (((upGridIdx < 0x1c0) && @@ -30130,14 +30130,14 @@ LAB_0079fc67: (*(int *)(iVar8 + 4) == 7)) { return; } - if ((int)piStack_88 < 0) { + if (GHIDRA_INT(piStack_88) < 0) { return; } - if ((int)(local_a8 * local_a8) <= (int)piStack_88) { + if (GHIDRA_INT((local_a8 * local_a8)) <= GHIDRA_INT(piStack_88)) { return; } if (((piStack_88 < (int *)0x1c0) && - (iVar8 = *(int *)((char *)room + (int)piStack_88 * 4 + 0x24), iVar8 != 0)) && + (iVar8 = *(int *)((char *)room + GHIDRA_INT(piStack_88) * 4 + 0x24), iVar8 != 0)) && (*(int *)(iVar8 + 4) == 7)) { return; } @@ -30147,7 +30147,7 @@ LAB_0079fc67: local_a0 = (void *)0x1; } uVar6 = local_b4[0x114]; - if (((-1 < (int)uVar6) && (uVar6 < 0x1c0)) && + if (((-1 < GHIDRA_INT(uVar6)) && (uVar6 < 0x1c0)) && ((pit = *(GridEntity_Pit **)((char *)room + uVar6 * 4 + 0x24), pit != (GridEntity_Pit *)0x0 && ((pit->_desc)._type == 7)))) { pit->_hasLadder = 0; @@ -30160,8 +30160,8 @@ LAB_0079fc67: ((GridEntity_Pit *)(pit))->GridEntity_Pit::UpdateCollision(); piVar11[0x114] = uVar9; iVar8 = *(int *)((char *)room + 0xc); - piVar11[0xcf] = (int)((float)((int)uVar9 % iVar8) * 40.0 + 40.0); - piVar11[0xd0] = (int)((float)((int)uVar9 / iVar8) * 40.0 + 120.0); + piVar11[0xcf] = GHIDRA_INT(((float)(GHIDRA_INT(uVar9) % iVar8) * 40.0 + 40.0)); + piVar11[0xd0] = GHIDRA_INT(((float)(GHIDRA_INT(uVar9) / iVar8) * 40.0 + 120.0)); *(undefined1 *)((char *)piVar11 + 0x171) = 1; manager = g_manager; if (local_a0 == (void *)0x1) { @@ -30173,7 +30173,7 @@ LAB_0079fc67: piVar11[0x3b] = iVar8; local_a0 = (void *)0x43e; seed_fart_sound_override((int *)&local_a0); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_a0,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_a0),1.0,2,0,1.0,0.0); return; } } @@ -30220,7 +30220,7 @@ void Entity_Player::trigger_npc_death(Entity *npc) killedNpc = (Entity *) __RTDynamicCast(npc,0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_NPC::RTTI_Type_Descriptor,0, - __security_cookie ^ (uint)(tmpEffect + 10)); + __security_cookie ^ GHIDRA_UINT((tmpEffect + 10))); if ((pEVar4->_flags & 0x40000000000) == 0) { pTVar10 = &this->_temporaryeffects; bVar1 = ((TemporaryEffects *)(pTVar10))->TemporaryEffects::HasCollectibleEffect(0x5d); @@ -30232,24 +30232,24 @@ void Entity_Player::trigger_npc_death(Entity *npc) bVar1 = HasCollectible(this,0x19b,0); if (bVar1 != 0) { pvVar5 = (g_manager->_itemConfig)._collectibles._begin; - if ((0x19b < (int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar5 >> 2) && + if ((0x19b < GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar5) >> 2) && (iVar6 = *(int *)((char *)pvVar5 + 0x66c), iVar6 != 0)) { - local_3c._8_4_ = *(int *)(iVar6 + 0x78); - local_3c._4_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(local_3c) + 0x8)) = *(int *)(iVar6 + 0x78); + (*(undefined4 *)((char *)&(local_3c) + 0x4)) = (void *)0x0; local_30 = 0.0; - local_3c._0_4_ = iVar6; + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = iVar6; ((TemporaryEffects *)(pTVar10))->TemporaryEffects::AddEffect(local_3c,0,1); } if ((npc->_type == 1) && (1 < *(int *)&g_game->_deathmatchManager)) { iVar6 = 4; do { pvVar5 = (g_manager->_itemConfig)._collectibles._begin; - if ((0x19b < (int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar5 >> 2) && + if ((0x19b < GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar5) >> 2) && (iVar2 = *(int *)((char *)pvVar5 + 0x66c), iVar2 != 0)) { - local_3c._8_4_ = *(int *)(iVar2 + 0x78); - local_3c._4_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(local_3c) + 0x8)) = *(int *)(iVar2 + 0x78); + (*(undefined4 *)((char *)&(local_3c) + 0x4)) = (void *)0x0; local_30 = 0.0; - local_3c._0_4_ = iVar2; + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = iVar2; ((TemporaryEffects *)(pTVar10))->TemporaryEffects::AddEffect(local_3c,0,1); } iVar6 = iVar6 + -1; @@ -30282,16 +30282,16 @@ LAB_007a023d: } iVar6 = __ftoui3(); uVar3 = Random(); - if (uVar3 % 10000 < (uint)(iVar2 + iVar6)) { + if (uVar3 % 10000 < GHIDRA_UINT((iVar2 + iVar6))) { pvVar5 = (g_manager->_itemConfig)._trinkets._begin; - if ((int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar5 >> 2 < 0x3b) { - local_3c._0_4_ = 0; + if (GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar5) >> 2 < 0x3b) { + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = 0; } else { - local_3c._0_4_ = *(int *)((char *)pvVar5 + 0xe8); + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = *(int *)((char *)pvVar5 + 0xe8); } - local_3c._8_4_ = *(int *)(local_3c._0_4_ + 0x78); - local_3c._4_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(local_3c) + 0x8)) = *(int *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + 0x78); + (*(undefined4 *)((char *)&(local_3c) + 0x4)) = (void *)0x0; local_30 = 0.0; ((TemporaryEffects *)(pTVar10))->TemporaryEffects::AddEffect(local_3c,1,1); } @@ -30322,7 +30322,7 @@ LAB_007a030d: } iVar2 = __ftoui3(); uVar3 = Random(); - if (uVar3 % 1000 < (uint)(iVar6 + iVar2)) { + if (uVar3 % 1000 < GHIDRA_UINT((iVar6 + iVar2))) { ((TemporaryEffects *)(pTVar10))->TemporaryEffects::AddTrinketEffect(0x3c,1,1); } } @@ -30371,11 +30371,11 @@ LAB_007a044b: else if (iVar6 == 3) { uVar3 = 7; } - uVar3 = ((RNG *)((RNG *)((int)(this->_trinketRNGs)._begin + 0x760)))->RNG::RandomInt(uVar3); + uVar3 = ((RNG *)((RNG *)(GHIDRA_INT((this->_trinketRNGs)._begin) + 0x760)))->RNG::RandomInt(uVar3); if (uVar3 == 0) { ((TemporaryEffects *)(pTVar10))->TemporaryEffects::AddTrinketEffect(0x76,1,1); pvVar5 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar5 >> 2 < 0x29) { + if (GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar5) >> 2 < 0x29) { collectibleID = (ItemConfig_Item *)0x0; } else { @@ -30398,7 +30398,7 @@ LAB_007a044b: if ((npc != *(Entity **)((char *)pvVar5 + 0x1bb8)) && ((npc->_flags & 0x20000000) == 0)) { *(undefined1 *)((char *)pvVar5 + 0x1bbc) = 1; } - npc = (Entity *)((int)pvVar5 + 0x1bb8); + npc = (Entity *)(GHIDRA_INT(pvVar5) + 0x1bb8); std::multiset::erase(&npc); *(undefined4 *)((char *)pvVar5 + 0x1bb8) = 0; if (*(char *)((char *)pvVar5 + 0x1bbc) == '\0') { @@ -30423,7 +30423,7 @@ LAB_007a044b: (pvVar5 = ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::GetCollectibleEffect(0x2c0), pvVar5 != (void *)0x0)) { collectibles = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)collectibles >> 2 < 0x2c1) { + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(collectibles) >> 2 < 0x2c1) { tmpEffect[0] = 0; } else { @@ -30441,27 +30441,27 @@ LAB_007a044b: LAB_007a0661: local_24.x = 4.2039e-44; } - if ((int)distance < (int)local_24.x) { + if (GHIDRA_INT(distance) < GHIDRA_INT(local_24.x)) { local_24.x = distance; } ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddEffect(tmpEffect,0,1); EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)local_3c,&this->_pos, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)local_3c,&this->_pos, 60.0,2); uVar3 = 0; if (local_30 != 0.0) { do { - iVar6 = *(int *)(local_3c._4_4_ + uVar3 * 4); + iVar6 = *(int *)((*(undefined4 *)((char *)&(local_3c) + 0x4)) + uVar3 * 4); if (((*(int *)(iVar6 + 0x28) == 9) && (*(char *)(iVar6 + 0x173) == '\0')) && ((*(uint *)(iVar6 + 0x438) & 0x80000000) == 0)) { *(undefined1 *)(iVar6 + 0x173) = 1; } uVar3 = uVar3 + 1; - } while (uVar3 < (uint)local_30); + } while (uVar3 < GHIDRA_UINT(local_30)); } if (local_3c[0] == '\0') { local_8 = 0; - tracked_alloc(1,(void *)local_3c._4_4_,0); + tracked_alloc(1,(*(undefined4 *)((char *)&((void *)local_3c) + 0x4)),0); local_8 = 0xffffffff; } } @@ -30478,7 +30478,7 @@ LAB_007a0661: local_24.x = (float)pTVar10; local_24.y = (float)pEVar9; } - local_3c._8_4_ = (pEVar4->_pos).x - (float)pTVar10 * pEVar4->_size; + (*(undefined4 *)((char *)&(local_3c) + 0x8)) = (pEVar4->_pos).x - (float)pTVar10 * pEVar4->_size; local_30 = (pEVar4->_pos).y - (float)pEVar9 * pEVar4->_size; trigger_set_dispatch(&this->_proceduralItems,3,pEVar4,(Vector *)(local_3c + 8),&local_24); if ((*(int *)&(*(undefined1 *)((char *)(this) + 0x2ef8)) == 0) || (*(int *)&(*(undefined1 *)((char *)(this) + 0x2ef8)) != 0xbd)) { @@ -30521,7 +30521,7 @@ LAB_007a0809: effect = (int *)0x0; LAB_007a088a: pvVar5 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar5 & 0xfffffffcU) < 0xe9) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar5) & 0xfffffffcU)) < 0xe9) { tmpEffect[0] = 0; } else { @@ -30533,10 +30533,10 @@ LAB_007a088a: if (effect == (int *)0x0) { npc = (Entity *)0x404; seed_fart_sound_override((int *)&npc); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)npc,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(npc),1.0,2,0,1.0,0.0); local_24.y = 1.4013e-45; } - else if (iVar2 - effect[2] < (int)pTVar10) { + else if (iVar2 - effect[2] < GHIDRA_INT(pTVar10)) { local_24.x = (float)(iVar2 - effect[2]); } ((TemporaryEffects *)(local_18))->TemporaryEffects::AddEffect(tmpEffect,1,1); @@ -30582,7 +30582,7 @@ Entity_Bomb * Entity_Player::FireBomb(Vector *pos, Vector *vel, Entity *source) undefined4 flagsHigh; int *laser; - local_c = __security_cookie ^ (uint)&local_a8; + local_c = __security_cookie ^ GHIDRA_UINT(&local_a8); local_a0 = (Entity_Player *)0x1e; spawnX.x = pos->x + (this->_tearsOffset).x; local_94 = vel; @@ -30594,7 +30594,7 @@ Entity_Bomb * Entity_Player::FireBomb(Vector *pos, Vector *vel, Entity *source) if (bVar3 != 0) { uVar4 = Random(); local_a0 = (Entity_Player *)0x28; - fVar8 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + fVar8 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 2.4; local_a8 = (Entity_Player *)(fVar8 * (float)local_a8); local_9c.x = fVar8 * local_9c.x; @@ -30605,16 +30605,16 @@ Entity_Bomb * Entity_Player::FireBomb(Vector *pos, Vector *vel, Entity *source) local_a8 = (Entity_Player *)((float)local_a8 * 1.2); } bombScale = 1.0; - GetTearHitParams(this,&local_78,5,1.0,(int)(char)this->_tearDisplacement,source); + GetTearHitParams(this,&local_78,5,1.0,GHIDRA_INT((char)this->_tearDisplacement),source); uVar4 = 0; bVar3 = HasCollectible(this,0x247,0); if (bVar3 != 0) { uVar4 = 0x13; } - tearFlags._l._4_4_ = local_78._flags._l._4_4_; - tearFlags._l._0_4_ = (undefined4)local_78._flags._l; - tearFlags._h._0_4_ = (undefined4)local_78._flags._h; - tearFlags._h._4_4_ = local_78._flags._h._4_4_; + (*(undefined4 *)((char *)&(tearFlags._l) + 0x4)) = (*(undefined4 *)((char *)&(local_78._flags._l) + 0x4)); + (*(undefined4 *)((char *)&(tearFlags._l) + 0x0)) = (undefined4)local_78._flags._l; + (*(undefined4 *)((char *)&(tearFlags._h) + 0x0)) = (undefined4)local_78._flags._h; + (*(undefined4 *)((char *)&(tearFlags._h) + 0x4)) = (*(undefined4 *)((char *)&(local_78._flags._h) + 0x4)); fStack_90 = check_bomb_tearflags(this,tearFlags); if (0.55 < local_78._tearScale) { if (local_78._tearScale <= 0.75) { @@ -30646,10 +30646,10 @@ Entity_Bomb * Entity_Player::FireBomb(Vector *pos, Vector *vel, Entity *source) bomb = (Entity_Bomb *) __RTDynamicCast(spawned,0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Bomb::RTTI_Type_Descriptor); - *(uint *)&bomb->_flags = (uint)bomb->_flags | 0x4000000; - flagsHigh = *(undefined4 *)((int)&bomb->_flags + 4); + *(uint *)&bomb->_flags = GHIDRA_UINT(bomb->_flags) | 0x4000000; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&bomb->_flags) + 4); bomb->_entityGridCollisionClass = 6; - *(undefined4 *)((int)&bomb->_flags + 4) = flagsHigh; + *(undefined4 *)(GHIDRA_INT(&bomb->_flags) + 4) = flagsHigh; if ((*(int *)&(*(undefined1 *)((char *)(this) + 0x2ef8)) == 0) || (*(int *)&(*(undefined1 *)((char *)(this) + 0x2ef8)) != 0x85)) { iVar5 = GetTrinketMultiplier(this,0x85); bVar7 = false; @@ -30669,15 +30669,15 @@ Entity_Bomb * Entity_Player::FireBomb(Vector *pos, Vector *vel, Entity *source) LAB_007a0c76: iVar5 = *(int *)bomb; *(undefined4 *)&(bomb->_tearFlags)._l = (undefined4)local_78._flags._l; - *(undefined4 *)((int)&(bomb->_tearFlags)._l + 4) = local_78._flags._l._4_4_; + *(undefined4 *)(GHIDRA_INT(&(bomb->_tearFlags)._l) + 4) = (*(undefined4 *)((char *)&(local_78._flags._l) + 0x4)); *(undefined4 *)&(bomb->_tearFlags)._h = (undefined4)local_78._flags._h; - *(undefined4 *)((int)&(bomb->_tearFlags)._h + 4) = local_78._flags._h._4_4_; + *(undefined4 *)(GHIDRA_INT(&(bomb->_tearFlags)._h) + 4) = (*(undefined4 *)((char *)&(local_78._flags._h) + 0x4)); bomb->_loadCostumes = 1; local_a8 = (Entity_Player *)&(*(undefined1 *)((char *)&(local_a0[-1]) + 0x2ef1)); if (!bVar6) { local_a8 = local_a0; } - bomb->_explosionCountdown1 = (int)local_a8; + bomb->_explosionCountdown1 = GHIDRA_INT(local_a8); *(Entity_Player **)&(*(undefined1 *)((char *)(bomb) + 0x414)) = local_a8; bomb->_scale = fStack_90; iVar10 = 0xff; @@ -30690,10 +30690,10 @@ LAB_007a0c76: } bomb->_parent = (EntityPtr)this; std::multiset::insert(&bomb->_parent); - if ((((uint)(bomb->_tearFlags)._l & (uint)g_tearFlagPiercing._l) != 0 || - (*(uint *)((int)&(bomb->_tearFlags)._l + 4) & g_tearFlagPiercing._l._4_4_) != 0) || - (((uint)(bomb->_tearFlags)._h & (uint)g_tearFlagPiercing._h) != 0 || - (*(uint *)((int)&(bomb->_tearFlags)._h + 4) & g_tearFlagPiercing._h._4_4_) != 0)) { + if (((GHIDRA_UINT((bomb->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagPiercing._l)) != 0 || + (*(uint *)(GHIDRA_INT(&(bomb->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagPiercing._l) + 0x4))) != 0) || + ((GHIDRA_UINT((bomb->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagPiercing._h)) != 0 || + (*(uint *)(GHIDRA_INT(&(bomb->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagPiercing._h) + 0x4))) != 0)) { bomb->SetCollisionDamage(unaff_ESI * 2.5); } if ((bomb->_variant == 0x13) || (bomb->_variant == 0x14)) { @@ -30722,12 +30722,12 @@ LAB_007a0c76: std::multiset::insert(refSlot); piVar9 = (int *)0x0; laser[0xd6] = 0x453b8000; - iVar5 = *(int *)((int)&(pEVar2->_tearFlags)._l + 4); + iVar5 = *(int *)(GHIDRA_INT(&(pEVar2->_tearFlags)._l) + 4); qVar1 = (pEVar2->_tearFlags)._h; - iVar10 = *(int *)((int)&(pEVar2->_tearFlags)._h + 4); - laser[0x10a] = (int)(pEVar2->_tearFlags)._l; + iVar10 = *(int *)(GHIDRA_INT(&(pEVar2->_tearFlags)._h) + 4); + laser[0x10a] = GHIDRA_INT((pEVar2->_tearFlags)._l); laser[0x10b] = iVar5; - laser[0x10c] = (int)qVar1; + laser[0x10c] = GHIDRA_INT(qVar1); laser[0x10d] = iVar10; (**(code **)(*laser + 0x3c))(&pEVar2->_laserColor,0xffffffff,0xff,0,1); (**(code **)(*piVar9 + 0x40))(pEVar2->_damage); @@ -30818,7 +30818,7 @@ byte Entity_Player::TriggerDeath(byte checkOnly) EntityPtr parentPlayer; void *rngArray; - stackCookie = __security_cookie ^ (uint)&local_84; + stackCookie = __security_cookie ^ GHIDRA_UINT(&local_84); local_84 = this; if (this->_variant == 1) { if (checkOnly == 0) { @@ -30897,11 +30897,11 @@ LAB_007a11cc: do { pEVar9 = *ppEVar7; uVar3 = uVar10; - if ((int)uVar10 < 1) { + if (GHIDRA_INT(uVar10) < 1) { uVar3 = 0; } slotIndex = 3; - if ((int)uVar3 < 3) { + if (GHIDRA_INT(uVar3) < 3) { slotIndex = uVar3; } if ((pEVar9->_pocketSlots[slotIndex * 2 + 1] == 1) && @@ -30970,16 +30970,16 @@ LAB_007a12d4: } } pvVar8 = (pEVar6->_trinketRNGs)._end; - if ((int)((int)pvVar8 - (int)(pEVar6->_trinketRNGs)._begin & 0xfffffff0U) < 0x1c1) { + if (GHIDRA_INT((GHIDRA_INT(pvVar8) - GHIDRA_INT((pEVar6->_trinketRNGs)._begin) & 0xfffffff0U)) < 0x1c1) { KAGE_LogMessage(0x10,(byte *)"Trinket ID out of bounds!\n"); pvVar8 = (pEVar6->_trinketRNGs)._end; } rngArray = (pEVar6->_trinketRNGs)._begin; - uVar10 = ((int)pvVar8 - (int)rngArray >> 4) - 1; + uVar10 = (GHIDRA_INT(pvVar8) - GHIDRA_INT(rngArray) >> 4) - 1; if (0x1c < uVar10) { uVar10 = 0x1c; } - uVar10 = ((RNG *)((RNG *)(uVar10 * 0x10 + (int)rngArray)))->RNG::RandomInt(100); + uVar10 = ((RNG *)((RNG *)(uVar10 * 0x10 + GHIDRA_INT(rngArray))))->RNG::RandomInt(100); if (uVar10 < uVar3) { if (checkOnly != 0) { return 1; @@ -31116,13 +31116,13 @@ LAB_007a12d4: } tmpPlayer->_deadCatLives = newDeadCatLives; pEVar6 = (Entity_Player *) - (*(int *)((int)(tmpPlayer->_collectibleCounts)._begin + 0x144) * 9 + -8); - if ((int)newDeadCatLives < (int)pEVar6) { + (*(int *)(GHIDRA_INT((tmpPlayer->_collectibleCounts)._begin) + 0x144) * 9 + -8); + if (GHIDRA_INT(newDeadCatLives) < GHIDRA_INT(pEVar6)) { do { RemoveCollectible(tmpPlayer,0x51,0,0,1); pEVar6 = (Entity_Player *) - (*(int *)((int)(tmpPlayer->_collectibleCounts)._begin + 0x144) * 9 + -8); - } while ((int)tmpPlayer->_deadCatLives < (int)pEVar6); + (*(int *)(GHIDRA_INT((tmpPlayer->_collectibleCounts)._begin) + 0x144) * 9 + -8); + } while (GHIDRA_INT(tmpPlayer->_deadCatLives) < GHIDRA_INT(pEVar6)); } ppEVar7 = g_triggerDeathPlayers; if (g_triggerDeathPlayers != g_triggerDeathPlayersEnd) { @@ -31180,8 +31180,8 @@ LAB_007a1335: pEVar6 = extraout_ECX_25; if (bVar2 != 0) { pvVar8 = (g_manager->_itemConfig)._collectibles._begin; - if ((0x76c < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar8 & - 0xfffffffcU)) && (iVar11 = *(int *)((char *)pvVar8 + 0x76c), iVar11 != 0)) { + if ((0x76c < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar8) & + 0xfffffffcU))) && (iVar11 = *(int *)((char *)pvVar8 + 0x76c), iVar11 != 0)) { effectKey[2] = *(undefined4 *)(iVar11 + 0x78); effectKey[1] = 0; local_68 = 0; @@ -31208,17 +31208,17 @@ LAB_007a1335: pEVar9 = *playerIter; if (pEVar9 != (Entity_Player *)0x0) { pvVar8 = (pEVar9->_collectibleRNGs)._end; - if ((int)((int)pvVar8 - (int)(pEVar9->_collectibleRNGs)._begin & 0xfffffff0U) < 0xd41) { + if (GHIDRA_INT((GHIDRA_INT(pvVar8) - GHIDRA_INT((pEVar9->_collectibleRNGs)._begin) & 0xfffffff0U)) < 0xd41) { KAGE_LogMessage(0x10,(byte *)"Collectible ID out of bounds!\n"); pvVar8 = (pEVar9->_collectibleRNGs)._end; } rngArray = (pEVar9->_collectibleRNGs)._begin; - uVar3 = ((int)pvVar8 - (int)rngArray >> 4) - 1; + uVar3 = (GHIDRA_INT(pvVar8) - GHIDRA_INT(rngArray) >> 4) - 1; uVar10 = 0xd4; if (uVar3 < 0xd4) { uVar10 = uVar3; } - puVar12 = (uint *)(uVar10 * 0x10 + (int)rngArray); + puVar12 = (uint *)(uVar10 * 0x10 + GHIDRA_INT(rngArray)); uVar3 = *puVar12; if (uVar3 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -31233,16 +31233,16 @@ LAB_007a1335: uVar3 = uVar3 << ((byte)puVar12[2] & 0x1f) ^ uVar3; *puVar12 = uVar3 >> ((byte)puVar12[3] & 0x1f) ^ uVar3; pvVar8 = (pEVar9->_trinketRNGs)._end; - if ((int)((int)pvVar8 - (int)(pEVar9->_trinketRNGs)._begin & 0xfffffff0U) < 0x1c1) { + if (GHIDRA_INT((GHIDRA_INT(pvVar8) - GHIDRA_INT((pEVar9->_trinketRNGs)._begin) & 0xfffffff0U)) < 0x1c1) { KAGE_LogMessage(0x10,(byte *)"Trinket ID out of bounds!\n"); pvVar8 = (pEVar9->_trinketRNGs)._end; } rngArray = (pEVar9->_trinketRNGs)._begin; - uVar3 = ((int)pvVar8 - (int)rngArray >> 4) - 1; + uVar3 = (GHIDRA_INT(pvVar8) - GHIDRA_INT(rngArray) >> 4) - 1; if (0x1c < uVar3) { uVar3 = 0x1c; } - puVar12 = (uint *)(uVar3 * 0x10 + (int)rngArray); + puVar12 = (uint *)(uVar3 * 0x10 + GHIDRA_INT(rngArray)); uVar3 = *puVar12; if (uVar3 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -31277,7 +31277,7 @@ LAB_007a1335: manager = g_manager; if (bVar2 != 0) { pvVar8 = (g_manager->_itemConfig)._collectibles._begin; - if ((0xa6c < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar8 & 0xfffffffcU) + if ((0xa6c < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar8) & 0xfffffffcU)) ) && (iVar11 = *(int *)((char *)pvVar8 + 0xa6c), iVar11 != 0)) { effectKey[2] = *(undefined4 *)(iVar11 + 0x78); effectKey[1] = 0; @@ -31302,7 +31302,7 @@ LAB_007a1335: if ((iVar11 == 0x10) || (iVar11 == 0x23)) { local_84 = (Entity_Player *)0x1b; seed_fart_sound_override((int *)&local_84); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_84,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_84),1.0,2,0,1.0,0.0); gibColor._offset[0] = 0.0; gibColor._tint[0] = 1.0; gibColor._tint[1] = 1.0; @@ -31322,7 +31322,7 @@ LAB_007a1335: if (((iVar11 == 10) || (iVar11 == 0x1f)) || (iVar11 == 0x27)) { local_84 = (Entity_Player *)0x50; seed_fart_sound_override((int *)&local_84); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_84,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_84),1.0,2,0,1.0,0.0); uVar3 = Random(); ((Game *)(g_game))->Game::SpawnEx(1000,0xf,&(*g_triggerDeathPlayers)->_pos,&g_vectorZero,(Entity *)0x0,0, uVar3,0); @@ -31330,7 +31330,7 @@ LAB_007a1335: } local_84 = (Entity_Player *)0x1e; seed_fart_sound_override((int *)&local_84); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_84,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_84),1.0,2,0,1.0,0.0); uVar3 = Random(); ((Game *)(g_game))->Game::SpawnEx(1000,2,&(*g_triggerDeathPlayers)->_pos,&g_vectorZero,(Entity *)0x0,3,uVar3, 0); @@ -31344,7 +31344,7 @@ LAB_007a1335: if ((iVar11 == 0x10) || (iVar11 == 0x23)) { local_84 = (Entity_Player *)0x1b; seed_fart_sound_override((int *)&local_84); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_84,1.25,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_84),1.25,2,0,1.0,0.0); ((Color *)(&boneGibColor))->Color::Color(); local_80 = (EntityPtr)0xf; puVar12 = (uint *)&local_80; @@ -31356,7 +31356,7 @@ LAB_007a1335: if (((iVar11 == 10) || (iVar11 == 0x1f)) || (iVar11 == 0x27)) goto LAB_007a1f38; local_84 = (Entity_Player *)0x1e; seed_fart_sound_override((int *)&local_84); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_84,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_84),1.0,2,0,1.0,0.0); uVar3 = Random(); ((Game *)(g_game))->Game::SpawnEx(1000,2,&pEVar9->_pos,&g_vectorZero,(Entity *)0x0,2,uVar3,0); ((Color *)(&gibColor))->Color::Color(); @@ -31382,11 +31382,11 @@ LAB_007a15d3: LAB_007a1630: if ((piVar4[1] != 1) || (*piVar4 != 0x59)) goto LAB_007a163b; if (pEVar6 < (Entity_Player *)0x3) { - pocketCopySrc = (pEVar9->_sprite)._filename._buf + (int)&pEVar6->_baitedCountdown * 8 + -0x40; + pocketCopySrc = (pEVar9->_sprite)._filename._buf + GHIDRA_INT(&pEVar6->_baitedCountdown) * 8 + -0x40; pocketCopyDst = (undefined4 *) - ((int)(&(pEVar9->_sprite)._filename + -3) + (int)&pEVar6->_baitedCountdown * 8); - for (uVar3 = (3 - (int)pEVar6) * 2 & 0x3ffffffe; pEVar6 = (Entity_Player *)0x0, uVar3 != 0; + (GHIDRA_INT((&(pEVar9->_sprite)._filename + -3)) + GHIDRA_INT(&pEVar6->_baitedCountdown) * 8); + for (uVar3 = (3 - GHIDRA_INT(pEVar6)) * 2 & 0x3ffffffe; pEVar6 = (Entity_Player *)0x0, uVar3 != 0; uVar3 = uVar3 - 1) { *pocketCopyDst = *(undefined4 *)pocketCopySrc; pocketCopySrc = pocketCopySrc + 4; @@ -31472,9 +31472,9 @@ LAB_007a1683: pEVar6 = (Entity_Player *) ((iVar5 + 1) / 2 + (pEVar9->_soulHearts + 1) / 2 + pEVar9->_boneHearts); local_7c.x = (float)pEVar6; - if ((int)pEVar6 < iVar11) { - BreakGoldenHearts(pEVar9,iVar11 - (int)pEVar6); - pEVar9->_goldenHearts = (int)local_7c.x; + if (GHIDRA_INT(pEVar6) < iVar11) { + BreakGoldenHearts(pEVar9,iVar11 - GHIDRA_INT(pEVar6)); + pEVar9->_goldenHearts = GHIDRA_INT(local_7c.x); pEVar6 = extraout_ECX_08; } } @@ -31540,14 +31540,14 @@ void Entity_Player::Revive() if (twinPlayer != (EntityPtr)0x0) { if (*(Entity_Player **)((char *)twinPlayer + 0x1410) == this) { if (*(Entity_Player **)((char *)twinPlayer + 0x1410) != (Entity_Player *)0x0) { - local_10.x = (float)((int)twinPlayer + 0x1410); + local_10.x = (float)(GHIDRA_INT(twinPlayer) + 0x1410); std::multiset::erase(&local_10); } *(undefined4 *)((char *)twinPlayer + 0x1410) = 0; oldFlags = this->_flags; - flagsHigh = (uint *)((int)&this->_flags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&this->_flags) + 4); *flagsHigh = *flagsHigh & 0xf9ffffff; - *(int *)&this->_flags = (int)oldFlags; + *(int *)&this->_flags = GHIDRA_INT(oldFlags); } } this->_cacheFlags = 0xffff; @@ -31589,7 +31589,7 @@ void Entity_Player::ReviveFromTrinket(uint trinketId, int unused) local_8 = (void *)0xffffffff; puStack_c = &LAB_00aff10d; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(trinketName + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((trinketName + 10)); ExceptionList = &local_10; if (-1 < game->_playerIndex) { Revive(game); @@ -31623,18 +31623,18 @@ void Entity_Player::ReviveFromTrinket(uint trinketId, int unused) LAB_007a3769: game = g_game; uVar3 = g_game->_enterDoor; - if ((int)uVar3 < 0) { + if (GHIDRA_INT(uVar3) < 0) { leaveDoor = 0xffffffff; } else { leaveDoor = uVar3; - if (6 < (int)uVar3) { + if (6 < GHIDRA_INT(uVar3)) { leaveDoor = 7; } } g_game->_leaveDoor = leaveDoor; uVar3 = uVar3 & 0x80000003; - if ((int)uVar3 < 0) { + if (GHIDRA_INT(uVar3) < 0) { uVar3 = (uVar3 - 1 | 0xfffffffc) + 1; } Game::StartRoomTransition(game,game->_lastRoomIdx,uVar3,iVar4,game,-1); @@ -31677,7 +31677,7 @@ LAB_007a3769: } else { pvVar2 = (g_manager->_itemConfig)._trinkets._begin; - if ((int)(trinketId & 0x7fff) < (int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar2 >> 2) + if (GHIDRA_INT((trinketId & 0x7fff)) < GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar2) >> 2) { trinketConfig = *(ItemConfig_Item **)((char *)pvVar2 + (trinketId & 0x7fff) * 4); } @@ -31692,9 +31692,9 @@ LAB_007a3769: uVar3 = trinketNameCapacity + 1; pvVar2 = trinketName[0]; if (0xfff < uVar3) { - pvVar2 = *(void **)((int)trinketName[0] + -4); + pvVar2 = *(void **)(GHIDRA_INT(trinketName[0]) + -4); uVar3 = trinketNameCapacity + 0x24; - if (0x1f < (uint)((int)trinketName[0] + (-4 - (int)pvVar2))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(trinketName[0]) + (-4 - GHIDRA_INT(pvVar2))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -31756,25 +31756,25 @@ void Entity_Player::remove_twin() } isBackupPlayer = true; } - ((TemporaryEffects *)((TemporaryEffects *)((int)player + 0x1508)))->TemporaryEffects::ClearEffects(1); + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(player) + 0x1508)))->TemporaryEffects::ClearEffects(1); if (*(int *)((char *)player + 0x13c0) != 0x28) { uVar3 = 0; - if ((int)(in_ECX->_collectibleCounts)._end - (int)(in_ECX->_collectibleCounts)._begin >> 2 != 0) + if (GHIDRA_INT((in_ECX->_collectibleCounts)._end) - GHIDRA_INT((in_ECX->_collectibleCounts)._begin) >> 2 != 0) { game = g_game; do { if (game == (Game *)0x0) { - if (-1 < (int)uVar3) goto LAB_007a386d; + if (-1 < GHIDRA_INT(uVar3)) goto LAB_007a386d; } else { - if ((int)uVar3 < 0) { - if (((int)uVar3 < 0) && - ((int)~uVar3 < - (int)(game->_proceduralItemManager)._proceduralItems._end - - (int)(game->_proceduralItemManager)._proceduralItems._begin >> 2)) { + if (GHIDRA_INT(uVar3) < 0) { + if ((GHIDRA_INT(uVar3) < 0) && + (GHIDRA_INT(~uVar3) < + GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._end) - + GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._begin) >> 2)) { item = (ItemConfig_Item *) **(undefined4 **) - ((int)(game->_proceduralItemManager)._proceduralItems._begin + ~uVar3 * 4); + (GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._begin) + ~uVar3 * 4); } else { item = (ItemConfig_Item *)0x0; @@ -31783,15 +31783,15 @@ void Entity_Player::remove_twin() else { LAB_007a386d: pvVar2 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar2 >> 2 <= (int)uVar3) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar2) >> 2 <= GHIDRA_INT(uVar3)) goto LAB_007a38d8; item = *(ItemConfig_Item **)((char *)pvVar2 + uVar3 * 4); } if (((item != (ItemConfig_Item *)0x0) && (item->type != 3)) && (local_c[0] = *(EntityPtr **)(*(int *)((char *)player + 0x16c8) + uVar3 * 4), - 0 < (int)local_c[0])) { - countSlot = (int *)((int)(in_ECX->_collectibleCounts)._begin + uVar3 * 4); - *countSlot = (int)(&(*(undefined1 *)((char *)(local_c[0]) + 0x0)) + *countSlot); + 0 < GHIDRA_INT(local_c[0]))) { + countSlot = (int *)(GHIDRA_INT((in_ECX->_collectibleCounts)._begin) + uVar3 * 4); + *countSlot = GHIDRA_INT((&(*(undefined1 *)((char *)(local_c[0]) + 0x0)) + *countSlot)); game = g_game; *(undefined4 *)(*(int *)((char *)player + 0x16c8) + uVar3 * 4) = 0; if (item->addCostumeOnPickup != 0) { @@ -31802,22 +31802,22 @@ LAB_007a386d: } LAB_007a38d8: uVar3 = uVar3 + 1; - } while (uVar3 < (uint)((int)(in_ECX->_collectibleCounts)._end - - (int)(in_ECX->_collectibleCounts)._begin >> 2)); + } while (uVar3 < GHIDRA_UINT((GHIDRA_INT((in_ECX->_collectibleCounts)._end) - + GHIDRA_INT((in_ECX->_collectibleCounts)._begin) >> 2))); } pvVar2 = (in_ECX->_smeltedTrinkets)._begin; local_c[0] = (EntityPtr *)0x0; - if ((int)(in_ECX->_smeltedTrinkets)._end - (int)pvVar2 >> 2 != 0) { + if (GHIDRA_INT((in_ECX->_smeltedTrinkets)._end) - GHIDRA_INT(pvVar2) >> 2 != 0) { do { twinSmeltedTrinkets = *(int *)((char *)player + 0x1748); - iVar1 = (int)local_c[0] * 4; + iVar1 = GHIDRA_INT(local_c[0]) * 4; if (((0 < *(short *)(twinSmeltedTrinkets + iVar1)) || (0 < *(short *)(twinSmeltedTrinkets + 2 + iVar1))) && ((*(short *)((char *)pvVar2 + iVar1) < 1 && (*(short *)((char *)pvVar2 + iVar1 + 2) < 1)))) { pvVar2 = (g_manager->_itemConfig)._trinkets._begin; - if ((int)((uint)local_c[0] & 0x7fff) < - (int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar2 >> 2) { - item = *(ItemConfig_Item **)((char *)pvVar2 + ((uint)local_c[0] & 0x7fff) * 4); + if (GHIDRA_INT((GHIDRA_UINT(local_c[0]) & 0x7fff)) < + GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar2) >> 2) { + item = *(ItemConfig_Item **)((char *)pvVar2 + (GHIDRA_UINT(local_c[0]) & 0x7fff) * 4); } else { item = (ItemConfig_Item *)0x0; @@ -31829,26 +31829,26 @@ LAB_007a38d8: local_c[0] = (EntityPtr *)&(*(undefined1 *)((char *)(local_c[0]) + 0x1)); *(short *)((char *)pvVar2 + iVar1) = *(short *)((char *)pvVar2 + iVar1) + *(short *)(twinSmeltedTrinkets + iVar1); - smeltedCount = (short *)((int)(in_ECX->_smeltedTrinkets)._begin + iVar1 + 2); + smeltedCount = (short *)(GHIDRA_INT((in_ECX->_smeltedTrinkets)._begin) + iVar1 + 2); *smeltedCount = *smeltedCount + *(short *)(iVar1 + 2 + *(int *)((char *)player + 0x1748)); *(undefined4 *)(*(int *)((char *)player + 0x1748) + iVar1) = 0; pvVar2 = (in_ECX->_smeltedTrinkets)._begin; - } while (local_c[0] < (undefined1 *)((int)(in_ECX->_smeltedTrinkets)._end - (int)pvVar2 >> 2)) + } while (local_c[0] < (undefined1 *)(GHIDRA_INT((in_ECX->_smeltedTrinkets)._end) - GHIDRA_INT(pvVar2) >> 2)) ; } uVar3 = 0; pvVar2 = (in_ECX->_pillEffectUses)._begin; - if ((int)(in_ECX->_pillEffectUses)._end - (int)pvVar2 >> 2 != 0) { + if (GHIDRA_INT((in_ECX->_pillEffectUses)._end) - GHIDRA_INT(pvVar2) >> 2 != 0) { do { iVar1 = *(int *)(*(int *)((char *)player + 0x16d4) + uVar3 * 4); if (0 < iVar1) { - countSlot = (int *)((int)pvVar2 + uVar3 * 4); + countSlot = (int *)(GHIDRA_INT(pvVar2) + uVar3 * 4); *countSlot = *countSlot + iVar1; *(undefined4 *)(*(int *)((char *)player + 0x16d4) + uVar3 * 4) = 0; } uVar3 = uVar3 + 1; pvVar2 = (in_ECX->_pillEffectUses)._begin; - } while (uVar3 < (uint)((int)(in_ECX->_pillEffectUses)._end - (int)pvVar2 >> 2)); + } while (uVar3 < GHIDRA_UINT((GHIDRA_INT((in_ECX->_pillEffectUses)._end) - GHIDRA_INT(pvVar2) >> 2))); } std::vector<4byte>::insert_range ((in_ECX->_voidedCollectibles)._end,*(undefined4 *)((char *)player + 0x1754), @@ -31856,7 +31856,7 @@ LAB_007a38d8: std::vector<8byte>::insert_range ((in_ECX->_voidedPassives)._end,*(undefined4 *)((char *)player + 0x1760), *(undefined4 *)((char *)player + 0x1764),local_c[0]); - ((History *)(&in_ECX->_history))->History::merge((void *)((int)player + 0x1dec)); + ((History *)(&in_ECX->_history))->History::merge((void *)(GHIDRA_INT(player) + 0x1dec)); in_ECX->_cacheFlags = in_ECX->_cacheFlags | 0xffff; (in_ECX->_temporaryeffects)._shouldEvaluateCache = 1; } @@ -31912,10 +31912,10 @@ void Entity_Player::AddPocketItem(int id, uint pocketItemType) } insertSlot = 0; if (this->_pocketSlots[1] == 2) { - insertSlot = (uint)(0 < this->_pocketSlots[0]); + insertSlot = GHIDRA_UINT((0 < this->_pocketSlots[0])); } if ((this->_pocketSlots[maxPocketItems * 2 + -2] == 0) && - ((int)insertSlot <= (int)(maxPocketItems - 2))) { + (GHIDRA_INT(insertSlot) <= GHIDRA_INT((maxPocketItems - 2)))) { remaining = ((maxPocketItems - 2) - insertSlot) + 1; slotEntry = (void **)(this->_pocketSlots + maxPocketItems * 2 + -2); do { @@ -31957,7 +31957,7 @@ void Entity_Player::AddPill(int pillColor) // 007a3c50 int Entity_Player::GetCard(int slot) { - if (((slot < 0) || (3 < (uint)slot)) || (this->_pocketSlots[slot * 2 + 1] != 1)) { + if (((slot < 0) || (3 < GHIDRA_UINT(slot))) || (this->_pocketSlots[slot * 2 + 1] != 1)) { return 0; } return this->_pocketSlots[slot * 2]; @@ -31966,7 +31966,7 @@ int Entity_Player::GetCard(int slot) // 007a3c80 int Entity_Player::GetPill(int slot) { - if (((slot < 0) || (3 < (uint)slot)) || (this->_pocketSlots[slot * 2 + 1] != 0)) { + if (((slot < 0) || (3 < GHIDRA_UINT(slot))) || (this->_pocketSlots[slot * 2 + 1] != 0)) { return 0; } return this->_pocketSlots[slot * 2]; @@ -31975,7 +31975,7 @@ int Entity_Player::GetPill(int slot) // 007a3cb0 void Entity_Player::SetCard(int slot, int card) { - if ((-1 < slot) && ((uint)slot < 4)) { + if ((-1 < slot) && (GHIDRA_UINT(slot) < 4)) { this->_pocketSlots[slot * 2] = card; this->_pocketSlots[slot * 2 + 1] = 1; ((Room *)(g_game->_room))->Room::UpdateRedKey(); @@ -31986,7 +31986,7 @@ void Entity_Player::SetCard(int slot, int card) // 007a3cf0 void Entity_Player::SetPill(int slot, int pillColor) { - if ((-1 < slot) && ((uint)slot < 4)) { + if ((-1 < slot) && (GHIDRA_UINT(slot) < 4)) { this->_pocketSlots[slot * 2] = pillColor; this->_pocketSlots[slot * 2 + 1] = 0; ((Room *)(g_game->_room))->Room::UpdateRedKey(); @@ -32025,7 +32025,7 @@ void Entity_Player::pocket_use_input() uStack_8 = 0xffffffff; puStack_c = &LAB_00aff93d; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar3 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; if (*(int *)&g_game->_stageTransition != 0) { return; } @@ -32150,7 +32150,7 @@ LAB_007a3da4: } } else if (pocketKind == 0) { - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&familiars,3,-1,-1,1,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&familiars,3,-1,-1,1,0); uVar5 = 0; uStack_8 = 0; uVar3 = familiars._size; @@ -32162,14 +32162,14 @@ LAB_007a3da4: } uVar5 = uVar5 + 1; } while (uVar5 < uVar3); - pocketKind = (int)fStack_18; + pocketKind = GHIDRA_INT(fStack_18); } ((PersistentGameData *)(&g_manager->_persistentGameData))->PersistentGameData::IncreaseEventCounter(6,1); ((PersistentGameData *)(&g_manager->_persistentGameData))->PersistentGameData::AddToCollection(0x2b); uVar3 = this->_pocketSlots[0]; fStack_18 = (float)((ItemPool *)(&g_game->_itemPool))->ItemPool::GetPillEffect(uVar3,this); if (((uVar3 & 0x7ff) != 0xe) || - (uVar5 = ((RNG *)((RNG *)((int)(this->_collectibleRNGs)._begin + 0x4b0)))->RNG::RandomInt(100), uVar5 < 5 + (uVar5 = ((RNG *)((RNG *)(GHIDRA_INT((this->_collectibleRNGs)._begin) + 0x4b0)))->RNG::RandomInt(100), uVar5 < 5 )) { iVar4 = this->_pocketSlots[3]; this->_pocketSlots[0] = this->_pocketSlots[2]; @@ -32181,9 +32181,9 @@ LAB_007a3da4: this->_pocketSlots[6] = 0; } TriggerEchoChamber(this,pocketKind,pocketId); - UsePill(this,(int)fStack_18,uVar3,0); + UsePill(this,GHIDRA_INT(fStack_18),uVar3,0); this->_wildCardItemType = 0; - this->_wildCardItem = (int)fStack_18; + this->_wildCardItem = GHIDRA_INT(fStack_18); this->_wildCardVarData = uVar3; if (this->_cacheFlags != 0) { InvalidateCoPlayerItems(this); @@ -32205,7 +32205,7 @@ LAB_007a3da4: else if (iVar4 == 3) { fStack_18 = 0.5; } - VStack_24.y = ((RNG *)((RNG *)((int)(this->_trinketRNGs)._begin + 0x4f0)))->RNG::RandomFloat(); + VStack_24.y = ((RNG *)((RNG *)(GHIDRA_INT((this->_trinketRNGs)._begin) + 0x4f0)))->RNG::RandomFloat(); if (VStack_24.y < fStack_18) { uVar3 = Random(); copySpawnPos = Room::FindFreePickupSpawnPosition @@ -32268,7 +32268,7 @@ void Entity_Player::pockets_rotate() if (0 < in_ECX->_forgottenSwapFormCooldown) { in_ECX->_forgottenSwapFormCooldown = in_ECX->_forgottenSwapFormCooldown + -1; } - bVar1 = input_is_action_triggered(g_manager,0xb,(int)local_10.x,(Entity *)in_ECX,0); + bVar1 = input_is_action_triggered(g_manager,0xb,GHIDRA_INT(local_10.x),(Entity *)in_ECX,0); iVar6 = extraout_ECX; if (bVar1 == 0) goto LAB_007a457c; bVar1 = SwapForgottenForm(in_ECX,0,0); @@ -32289,13 +32289,13 @@ void Entity_Player::pockets_rotate() (game->_hud)._hudRefreshType = 1; (game->_hud)._hudRefreshCountdown = 2; } - local_18.x = (float)((int)local_18.x + 1); - } while ((uint)local_18.x < 3); + local_18.x = (float)(GHIDRA_INT(local_18.x) + 1); + } while (GHIDRA_UINT(local_18.x) < 3); game = g_game; if (in_ECX->_itemState == 0) { if (in_ECX->_activeDesc[0]._item == 0x1e9) { uVar4 = in_ECX->_activeDesc[0]._varData; - uVar5 = (((int)uVar4 >> 0x10) + 1U) % 10; + uVar5 = ((GHIDRA_INT(uVar4) >> 0x10) + 1U) % 10; in_ECX->_activeDesc[0]._varData = uVar5 << 0x10 | uVar4 & 0xffff; hud = &game->_hud; uVar4 = 0; @@ -32319,7 +32319,7 @@ LAB_007a43f6: if (in_ECX->_playerType == 0x15) { bVar1 = HasCollectible(in_ECX,0x26b,0); iVar2 = 0; - iVar6 = (uint)(bVar1 != 0) * 4 + 8; + iVar6 = GHIDRA_UINT((bVar1 != 0)) * 4 + 8; do { if (in_ECX->_inventory[iVar2] < 0) { iVar6 = iVar2; @@ -32354,7 +32354,7 @@ LAB_007a43f6: in_ECX->_bagOfCraftingContent[uVar4] = bVar1; } cardsBegin = (in_ECX->_itemCards)._begin; - uVar4 = (int)(in_ECX->_itemCards)._end - (int)cardsBegin >> 2; + uVar4 = GHIDRA_INT((in_ECX->_itemCards)._end) - GHIDRA_INT(cardsBegin) >> 2; if (1 < uVar4) { firstCard = *cardsBegin; uVar5 = 0; @@ -32363,11 +32363,11 @@ LAB_007a43f6: cards = (in_ECX->_itemCards)._begin; *(undefined4 *)((char *)cards + uVar5 * 4) = *(undefined4 *)((char *)cards + uVar5 * 4 + 4); uVar5 = uVar5 + 1; - } while (uVar5 < ((int)(in_ECX->_itemCards)._end - (int)(in_ECX->_itemCards)._begin >> 2) - + } while (uVar5 < (GHIDRA_INT((in_ECX->_itemCards)._end) - GHIDRA_INT((in_ECX->_itemCards)._begin) >> 2) - 1U); } hud = &g_game->_hud; - *(undefined4 *)((int)(in_ECX->_itemCards)._end + -4) = firstCard; + *(undefined4 *)(GHIDRA_INT((in_ECX->_itemCards)._end) + -4) = firstCard; HUD::mark_all_slots_dirty(hud,0,0); } } @@ -32377,19 +32377,19 @@ LAB_007a43f6: if (0 < iVar2) { local_18.x = 1.16028e-42; seed_fart_sound_override((int *)&local_18); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_18.x,1.2,1,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_18.x),1.2,1,0,1.0,0.0); ((Game *)(g_game))->Game::ShakeScreen(8); iVar6 = extraout_ECX_01; } LAB_007a457c: - bVar1 = input_is_action_pressed(0xb,(int)local_10.x,(Entity *)in_ECX,iVar6); + bVar1 = input_is_action_pressed(0xb,GHIDRA_INT(local_10.x),(Entity *)in_ECX,iVar6); if (bVar1 == 0) { in_ECX->_actionHoldDrop = 0; return; } in_ECX->_actionHoldDrop = in_ECX->_actionHoldDrop + 1; game = g_game; - if (((uint)in_ECX->_actionHoldDrop < 0x79) || ((g_game->_dailyChallenge)._specialDailyId == 4)) { + if ((GHIDRA_UINT(in_ECX->_actionHoldDrop) < 0x79) || ((g_game->_dailyChallenge)._specialDailyId == 4)) { *(undefined4 *)&(*(undefined1 *)((char *)(in_ECX) + 0x1880)) = 0; } else { @@ -32413,7 +32413,7 @@ LAB_007a461f: } } uVar4 = uVar4 + 1; - local_18.x = (float)((int)local_18.x + 4); + local_18.x = (float)(GHIDRA_INT(local_18.x) + 4); } while (uVar4 < 2); local_18.x = 0.0; uVar4 = GetMaxPocketItems(in_ECX); @@ -32423,10 +32423,10 @@ LAB_007a461f: if ((pocketSlot[-1] != 0) && (*pocketSlot != 2)) { isAnythingToDrop = true; } - local_18.x = (float)((int)local_18.x + 1); + local_18.x = (float)(GHIDRA_INT(local_18.x) + 1); pocketSlot = pocketSlot + 2; fVar3 = (float)GetMaxPocketItems(in_ECX); - } while ((uint)local_18.x < (uint)fVar3); + } while (GHIDRA_UINT(local_18.x) < GHIDRA_UINT(fVar3)); } game = g_game; if (isAnythingToDrop) { @@ -32559,7 +32559,7 @@ void Entity_Player::RemovePocketItem(int slot) while ((slotIt[-1] == 0 || (*slotIt == 2))) { slot = slot + 1; slotIt = slotIt + 2; - if (3 < (uint)slot) { + if (3 < GHIDRA_UINT(slot)) { return; } } @@ -32568,7 +32568,7 @@ void Entity_Player::RemovePocketItem(int slot) } } if ((this->_pocketSlots[slot * 2] != 0) && (this->_pocketSlots[slot * 2 + 1] != 2)) { - if ((uint)slot < 3) { + if (GHIDRA_UINT(slot) < 3) { slotIt = this->_pocketSlots + slot * 2 + 2; destSlot = this->_pocketSlots + slot * 2; for (dwordsLeft = (3 - slot) * 2 & 0x3ffffffe; dwordsLeft != 0; dwordsLeft = dwordsLeft - 1) { @@ -32601,7 +32601,7 @@ void Entity_Player::DropPocketItem(int slot, Vector *pos) while ((pocketCursor[-1] == 0 || (*pocketCursor == 2))) { slot = slot + 1; pocketCursor = pocketCursor + 2; - if (3 < (uint)slot) { + if (3 < GHIDRA_UINT(slot)) { return; } } @@ -32620,7 +32620,7 @@ void Entity_Player::DropPocketItem(int slot, Vector *pos) if (pickup != (Entity *)0x0) { pickup[1]._sprite._championColor._offset[0] = 5.60519e-45; } - if ((uint)slot < 3) { + if (GHIDRA_UINT(slot) < 3) { pocketCursor = this->_pocketSlots + slot * 2 + 2; copyDst = this->_pocketSlots + slot * 2; for (uVar1 = (3 - slot) * 2 & 0x3ffffffe; uVar1 != 0; uVar1 = uVar1 - 1) { @@ -32650,7 +32650,7 @@ void Entity_Player::spawn_low_health_blood_splat() undefined1 colorParams [44]; uint local_c; - local_c = __security_cookie ^ (uint)colorParams; + local_c = __security_cookie ^ GHIDRA_UINT(colorParams); if (((((this->_variant == 0) && (this->_boneHearts + this->_soulHearts + this->_redHearts < 2)) && (iVar1 = this->_playerType, iVar1 != 10)) && ((((iVar1 != 0x10 && (iVar1 != 0x11)) && @@ -32659,7 +32659,7 @@ void Entity_Player::spawn_low_health_blood_splat() rngResult = Random(); bloodSplat = ((Game *)(g_game))->Game::SpawnEx(1000,7,&this->_pos,&g_vectorZero,(Entity *)0x0,0,rngResult,0); rngResult = Random(); - fVar2 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + fVar2 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 0.5 + 0.3; scaleX = fVar2 * g_vectorOne.x; (bloodSplat->_sprite)._scale.y = fVar2 * g_vectorOne.y; @@ -32751,7 +32751,7 @@ void Entity_Player::level_start(byte isForced) local_8 = 0xffffffff; puStack_c = &LAB_00aff978; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(salvationEffect + 0x20); + local_18 = __security_cookie ^ GHIDRA_UINT((salvationEffect + 0x20)); ExceptionList = &local_10; this->_delayedSfxId = 0; this->_delayedSfxDelay = 0; @@ -32771,7 +32771,7 @@ void Entity_Player::level_start(byte isForced) if ((iVar7 != 1) || (bVar6 = ((Level *)((Level *)game))->Level::IsAscent(), bVar6 != 0)) { spawnPos = PlayerManager::get_player_start_position (&game->_playerManager,&startPos,this,&g_vectorZero, - (int)&game->_playerManager); + GHIDRA_INT(&game->_playerManager)); fVar1 = spawnPos->x; (this->_pos).x = fVar1; (this->_pos).y = spawnPos->y; @@ -32819,7 +32819,7 @@ void Entity_Player::level_start(byte isForced) ((*(uint *)(*(int *)(((Game *)room)->_stageType + 0x10) + 0x38 + (forcedCurses >> 5) * 4) & 1 << ((byte)forcedCurses & 0x1f)) != 0)) break; forcedCurses = forcedCurses + 1 & 0x80000007; - if ((int)forcedCurses < 0) { + if (GHIDRA_INT(forcedCurses) < 0) { forcedCurses = (forcedCurses - 1 | 0xfffffff8) + 1; } uVar13 = uVar13 + 1; @@ -32835,7 +32835,7 @@ LAB_007a4df2: startX.y = (float)(room->_doorGridPositions[forcedCurses] / room->_gridWidth) * 40.0 + 120.0; } forcedCurses = forcedCurses & 0x80000003; - if ((int)forcedCurses < 0) { + if (GHIDRA_INT(forcedCurses) < 0) { forcedCurses = (forcedCurses - 1 | 0xfffffffc) + 1; } switch(forcedCurses) { @@ -32864,8 +32864,8 @@ LAB_007a4df2: do { if (forcedCurses < 0x1c0) { local_34 = *(Entity_Player **) - ((int)local_30->_roomList[0]._doors + - (int)(room_00->_gridEntities + -0xe) + -0x1c); + (GHIDRA_INT(local_30->_roomList[0]._doors) + + GHIDRA_INT((room_00->_gridEntities + -0xe)) + -0x1c); if ((local_34 != (Entity_Player *)0x0) && (*(int *)&(*(undefined1 *)((char *)(local_34) + 0x4)) == 0x11)) { trapdoorPos.x = (float)(local_34->_collisionIndex % room_00->_gridWidth) * 40.0 + 40.0; @@ -32885,7 +32885,7 @@ LAB_007a4df2: room_00 = game->_room; forcedCurses = forcedCurses + 1; local_30 = (Game *)&local_30->_stageType; - } while ((int)forcedCurses < room_00->_gridHeight * room_00->_gridWidth); + } while (GHIDRA_INT(forcedCurses) < room_00->_gridHeight * room_00->_gridWidth); } } goto LAB_007a4fdc; @@ -32896,7 +32896,7 @@ LAB_007a4df2: outPosition = &homeStartPos; } spawnPos = PlayerManager::get_player_start_position - (&game->_playerManager,outPosition,this,spawnPos,(int)&game->_playerManager + (&game->_playerManager,outPosition,this,spawnPos,GHIDRA_INT(&game->_playerManager) ); (this->_pos).x = spawnPos->x; (this->_pos).y = spawnPos->y; @@ -32949,7 +32949,7 @@ LAB_007a50ce: ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::RemoveNullEffect(0x42,-1); ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::RemoveNullEffect(0x4a,-1); pvVar11 = (g_manager->_itemConfig)._collectibles._begin; - if ((0x2b8 < (int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar11 >> 2) && + if ((0x2b8 < GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar11) >> 2) && (iVar7 = *(int *)((char *)pvVar11 + 0xae0), iVar7 != 0)) { salvationEffect[2] = *(undefined4 *)(iVar7 + 0x78); salvationEffect[1] = 0; @@ -32958,7 +32958,7 @@ LAB_007a50ce: ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::RemoveEffect(salvationEffect,-1); } pvVar11 = (g_manager->_itemConfig)._trinkets._begin; - if ((0xb4 < (int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar11 >> 2) && + if ((0xb4 < GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar11) >> 2) && (iVar7 = *(int *)((char *)pvVar11 + 0x2d0), iVar7 != 0)) { foundSoulEffect[2] = *(undefined4 *)(iVar7 + 0x78); foundSoulEffect[1] = 0; @@ -32967,7 +32967,7 @@ LAB_007a50ce: ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::RemoveEffect(foundSoulEffect,-1); } ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::RemoveNullEffect(0x6d,-1); - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&darkEsaus,0x362,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&darkEsaus,0x362,-1,-1,0,0); local_8 = 0; forcedCurses = 0; if (darkEsaus._size != 0) { @@ -32979,7 +32979,7 @@ LAB_007a50ce: pvVar11 = darkEsaus._data; } forcedCurses = forcedCurses + 1; - } while (forcedCurses < (uint)darkEsaus._size); + } while (forcedCurses < GHIDRA_UINT(darkEsaus._size)); } ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::RemoveNullEffect(0x81,1); if (this->_playerType == 0x27) { @@ -32993,7 +32993,7 @@ LAB_007a5236: } if ((this->_playerType == 0x25) && (g_game->_challenge != 0x2c)) { pvVar11 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar11 >> 2 < 0x6e) { + if (GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar11) >> 2 < 0x6e) { nullEffect = 0; } else { @@ -33042,7 +33042,7 @@ LAB_007a5236: *(undefined4 *)(iVar7 + 0x450) = 2; } pvVar11 = (g_manager->_itemConfig)._collectibles._begin; - if ((0x2a1 < (int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar11 >> 2) && + if ((0x2a1 < GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar11) >> 2) && (iVar7 = *(int *)((char *)pvVar11 + 0xa84), iVar7 != 0)) { redemptionEffect[2] = *(undefined4 *)(iVar7 + 0x78); redemptionEffect[1] = 0; @@ -33057,10 +33057,10 @@ LAB_007a5236: } this->_forgottenBodyRoomIdx = -99999; bVar6 = HasTrinket(this,0xa0,0); - if ((bVar6 != 0) && (local_30 = (Game *)GetTrinketMultiplier(this,0xa0), 0 < (int)local_30)) { + if ((bVar6 != 0) && (local_30 = (Game *)GetTrinketMultiplier(this,0xa0), 0 < GHIDRA_INT(local_30))) { do { pvVar11 = (this->_trinketRNGs)._begin; - rngSeed = (uint *)((int)pvVar11 + 0xa00); + rngSeed = (uint *)(GHIDRA_INT(pvVar11) + 0xa00); forcedCurses = *rngSeed; if (forcedCurses == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -33113,8 +33113,8 @@ LAB_007a5236: AddHearts((Entity_Player *)this->_subPlayer,2,0,0); } if (this->_isCoopGhost == 0) { - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&familiars,3,0xe8,1,0,0); - local_8._0_1_ = 1; + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&familiars,3,0xe8,1,0,0); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; forcedCurses = 0; if (familiars._size != 0) { do { @@ -33125,23 +33125,23 @@ LAB_007a5236: *(undefined4 *)(iVar7 + 0x30) = 0; } forcedCurses = forcedCurses + 1; - } while (forcedCurses < (uint)familiars._size); + } while (forcedCurses < GHIDRA_UINT(familiars._size)); } - local_8 = (uint)local_8._1_3_ << 8; - if (familiars._0_1_ == '\0') { + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; + if ((*(undefined1 *)((char *)&(familiars) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (familiars._data != (void *)0x0) { forcedCurses = *(uint *)((char *)familiars._data + -4); qVar5 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - forcedCurses; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - forcedCurses; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar5 < forcedCurses); - free((void *)((int)familiars._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar5) < forcedCurses)); + free((void *)(GHIDRA_INT(familiars._data) + -4)); } local_8 = local_8 & 0xffffff00; } @@ -33160,7 +33160,7 @@ LAB_007a5236: GetTrinketMultiplier(this,0x3b); iVar7 = __ftoui3(); forcedCurses = Random(); - local_29 = forcedCurses % 100 < (uint)(iVar7 * 0x19); + local_29 = forcedCurses % 100 < GHIDRA_UINT((iVar7 * 0x19)); } bVar6 = HasCollectible(this,0x15,0); if (((bVar6 != 0) || (bVar6 = HasCollectible(this,0x14d,0), bVar6 != 0)) || (local_29 != '\0')) { @@ -33197,7 +33197,7 @@ LAB_007a5236: local_30 = (Game *)0x64; } pvVar11 = (this->_trinketRNGs)._begin; - rngSeed = (uint *)((int)pvVar11 + 0x170); + rngSeed = (uint *)(GHIDRA_INT(pvVar11) + 0x170); forcedCurses = *rngSeed; if (forcedCurses == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -33290,7 +33290,7 @@ LAB_007a5a54: manager = g_manager; local_30 = (Game *)0x419; seed_fart_sound_override((int *)&local_30); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_30,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_30),1.0,2,0,1.0,0.0); local_29 = '\x01'; } } @@ -33298,7 +33298,7 @@ LAB_007a5a54: this->_activeDesc[forcedCurses]._varData = 0; } ((HUD *)(&g_game->_hud))->HUD::InvalidateActiveItem(this,forcedCurses); - uVar13 = CONCAT31((int3)((uint)extraout_ECX_02 >> 8),local_29); + uVar13 = CONCAT31((int3)(GHIDRA_UINT(extraout_ECX_02) >> 8),local_29); } forcedCurses = forcedCurses + 1; } while (forcedCurses < 4); @@ -33327,7 +33327,7 @@ LAB_007a5a54: } bVar6 = HasCollectible(this,0x102,0); if (bVar6 != 0) { - UseActiveItem(this,(short *)((int)&local_34 + 2),0x11c,1,-1,0); + UseActiveItem(this,(short *)(GHIDRA_INT(&local_34) + 2),0x11c,1,-1,0); this->_isPlayingItemAnimation = 0; ((ANM2 *)(&this->_bodySprite))->ANM2::Reset(); (this->_sprite)._playbackSpeed = 1.0; @@ -33353,7 +33353,7 @@ LAB_007a5a54: } } pvVar11 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar11 >> 2 < 300) { + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar11) >> 2 < 300) { Item = (ItemConfig_Item *)0x0; } else { @@ -33420,21 +33420,21 @@ LAB_007a5eb3: if (g_game->_challenge == 0x1f) { pvVar11 = (this->_history)._historyItems._begin; local_34 = (Entity_Player *)0x0; - iVar10 = (int)(this->_history)._historyItems._end - (int)pvVar11; + iVar10 = GHIDRA_INT((this->_history)._historyItems._end) - GHIDRA_INT(pvVar11); iVar7 = iVar10 >> 0x1f; if (iVar10 / 0x1c + iVar7 != iVar7) { iVar7 = 0; do { if ((*(char *)((char *)pvVar11 + iVar7 + 4) == '\0') && (bVar6 = HasCollectible(this,*(int *)((char *)pvVar11 + iVar7 + 8),0), bVar6 != 0)) { - RemoveCollectible(this,*(uint *)((int)(this->_history)._historyItems._begin + - (int)local_34 * 0x1c + 8),0,0,1); + RemoveCollectible(this,*(uint *)(GHIDRA_INT((this->_history)._historyItems._begin) + + GHIDRA_INT(local_34) * 0x1c + 8),0,0,1); break; } pvVar11 = (this->_history)._historyItems._begin; iVar7 = iVar7 + 0x1c; - local_34 = (Entity_Player *)((int)local_34 + 1); - } while (local_34 < (uint)(((int)(this->_history)._historyItems._end - (int)pvVar11) / 0x1c)); + local_34 = (Entity_Player *)(GHIDRA_INT(local_34) + 1); + } while (local_34 < GHIDRA_UINT(((GHIDRA_INT((this->_history)._historyItems._end) - GHIDRA_INT(pvVar11)) / 0x1c))); } AddMaxHearts(this,-2,0); if (((this->_redHearts < 1) && (this->_soulHearts < 1)) && (this->_boneHearts < 1)) { @@ -33458,21 +33458,21 @@ LAB_007a5eb3: *(undefined4 *)((char *)pvVar11 + 0x2cc) = 9; *(Game **)((char *)pvVar11 + 0x2c0) = local_30; pvVar11 = (this->_collectibleRNGs)._begin; - startX.y = (float)((int)pvVar11 + 0x1440); + startX.y = (float)(GHIDRA_INT(pvVar11) + 0x1440); if (local_30 == (Game *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar4 = (code *)swi(3); (*pcVar4)(); return; } - forcedCurses = (uint)local_30 >> 1 ^ (uint)local_30; + forcedCurses = GHIDRA_UINT(local_30) >> 1 ^ GHIDRA_UINT(local_30); forcedCurses = forcedCurses << 5 ^ forcedCurses; forcedCurses = forcedCurses >> 0x13 ^ forcedCurses; *(undefined8 *)((char *)pvVar11 + 0x1444) = 0x700000002; *(uint *)startX.y = forcedCurses; *(undefined4 *)((char *)pvVar11 + 0x144c) = 9; pvVar11 = (this->_collectibleRNGs)._begin; - startX.y = (float)((int)pvVar11 + 0x13c0); + startX.y = (float)(GHIDRA_INT(pvVar11) + 0x13c0); if (forcedCurses == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar4 = (code *)swi(3); @@ -33486,7 +33486,7 @@ LAB_007a5eb3: *(uint *)startX.y = forcedCurses; *(undefined4 *)((char *)pvVar11 + 0x13cc) = 9; pvVar11 = (this->_trinketRNGs)._begin; - startX.y = (float)((int)pvVar11 + 0x2b0); + startX.y = (float)(GHIDRA_INT(pvVar11) + 0x2b0); if (forcedCurses == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar4 = (code *)swi(3); @@ -33500,7 +33500,7 @@ LAB_007a5eb3: *(uint *)startX.y = forcedCurses; *(undefined4 *)((char *)pvVar11 + 700) = 9; pvVar11 = (this->_pillRNGs)._begin; - startX.y = (float)((int)pvVar11 + 0x130); + startX.y = (float)(GHIDRA_INT(pvVar11) + 0x130); if (forcedCurses == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar4 = (code *)swi(3); @@ -33524,12 +33524,12 @@ LAB_007a5eb3: (this->_levelEffectItems)._end = (void *)0x0; (this->_levelEffectItems)._capacity = (void *)0x0; if (pvVar11 != (void *)0x0) { - forcedCurses = (int)pvVar12 - (int)pvVar11 & 0xfffffffc; + forcedCurses = GHIDRA_INT(pvVar12) - GHIDRA_INT(pvVar11) & 0xfffffffc; pvVar12 = pvVar11; if (0xfff < forcedCurses) { pvVar12 = *(void **)((char *)pvVar11 + -4); forcedCurses = forcedCurses + 0x23; - if (0x1f < (uint)((int)pvVar11 + (-4 - (int)pvVar12))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar11) + (-4 - GHIDRA_INT(pvVar12))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -33540,7 +33540,7 @@ LAB_007a5eb3: manager = g_manager; this->_bloodLustCounter = 0; pvVar11 = (manager->_itemConfig)._collectibles._begin; - if ((int)(manager->_itemConfig)._collectibles._end - (int)pvVar11 >> 2 < 0x9e) { + if (GHIDRA_INT((manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar11) >> 2 < 0x9e) { iVar7 = 0; } else { @@ -33549,7 +33549,7 @@ LAB_007a5eb3: forcedCurses = *(uint *)(iVar7 + 0x54) | this->_cacheFlags; this->_cacheFlags = forcedCurses; pvVar11 = (manager->_itemConfig)._collectibles._begin; - if ((int)(manager->_itemConfig)._collectibles._end - (int)pvVar11 >> 2 < 0x2b8) { + if (GHIDRA_INT((manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar11) >> 2 < 0x2b8) { iVar7 = 0; } else { @@ -33571,20 +33571,20 @@ LAB_007a5eb3: } while (forcedCurses < *(uint *)((char *)pvVar11 + 0x1264)); } } - if (darkEsaus._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(darkEsaus) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (darkEsaus._data != (void *)0x0) { forcedCurses = *(uint *)((char *)darkEsaus._data + -4); qVar5 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - forcedCurses; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - forcedCurses; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar5 < forcedCurses); - free((uint *)((int)darkEsaus._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar5) < forcedCurses)); + free((uint *)(GHIDRA_INT(darkEsaus._data) + -4)); } } ExceptionList = local_10; @@ -33611,7 +33611,7 @@ void Entity_Player::ShootCandle(Vector *direction) } else { fireDirection.x = -fireDirection.x; - fireDirection.y = (float)((uint)(this->_movementVector).y ^ 0x80000000); + fireDirection.y = (float)(GHIDRA_UINT((this->_movementVector).y) ^ 0x80000000); } } isHasBirdsEye = HasCollectible(this,0x268,0); @@ -33658,7 +33658,7 @@ void Entity_Player::SetControllerIndex(int index, byte isIncludePlayerOwned) uStack_8 = 0xffffffff; puStack_c = &LAB_00aff9bd; local_10 = ExceptionList; - entityCount = __security_cookie ^ (int)register0x00000010 - 4U; + entityCount = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; KAGE_LogMessage(1,(byte *) "Entity_Player::SetControllerId() Setting controller ID to %d, (Prev: %d) \n"); @@ -33717,16 +33717,16 @@ LAB_007a650d: if (this->_parent == (EntityPtr)0x0) { entityCount = 0; playerManager = &g_game->_playerManager; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { playerListEnd = (playerManager->_playerList)._end; - if ((int)playerListEnd - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (playerManager->_playerList)._end; } puVar4 = (playerManager->_playerList)._begin; - if (entityCount < (uint)((int)playerListEnd - (int)puVar4 >> 2)) { + if (entityCount < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(puVar4) >> 2))) { puVar4 = puVar4 + entityCount; } if (((Entity_Player *)*puVar4)->_parent == (EntityPtr)this) { @@ -33734,8 +33734,8 @@ LAB_007a650d: } entityCount = entityCount + 1; playerManager = &g_game->_playerManager; - } while (entityCount < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (entityCount < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } } @@ -33782,7 +33782,7 @@ void Entity_Player::room_exit(byte isKeepHolyMantle) local_44 = this->_metronomeCollectibleID; if (local_44 != 0) { pvVar3 = (g_manager->_itemConfig)._collectibles._begin; - if ((0x7a0 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar3 & 0xfffffffcU) + if ((0x7a0 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar3) & 0xfffffffcU)) ) && (iVar7 = *(int *)((char *)pvVar3 + 0x7a0), iVar7 != 0)) { effectDesc[2] = *(int *)(iVar7 + 0x78); effectDesc[1] = 0; @@ -33803,7 +33803,7 @@ void Entity_Player::room_exit(byte isKeepHolyMantle) piVar5 != (this->_temporaryeffects)._effects._end; piVar5 = piVar5 + 4) { if ((*(int *)*piVar5 == 2) && (((int *)*piVar5)[1] == 0x76)) { pvVar3 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar3 & 0xfffffffcU) < 0xa1) + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar3) & 0xfffffffcU)) < 0xa1) { costumeItem = (ItemConfig_Item *)0x0; } @@ -33820,7 +33820,7 @@ void Entity_Player::room_exit(byte isKeepHolyMantle) && (local_44 = *(int *)((char *)pvVar3 + 4), 0 < local_44)) { do { pvVar3 = (g_manager->_itemConfig)._nullItems._begin; - if (0x11c < (int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar3 & 0xfffffffcU)) + if (0x11c < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar3) & 0xfffffffcU))) { iVar7 = *(int *)((char *)pvVar3 + 0x11c); if (iVar7 != 0) { @@ -33847,12 +33847,12 @@ void Entity_Player::room_exit(byte isKeepHolyMantle) piVar5[2] = effectDesc[2]; piVar5[3] = 0; ppvVar1 = &(this->_temporaryeffects)._effects._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 0x10); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 0x10); } pvVar3 = (this->_temporaryeffects)._effects._begin; *(undefined4 *) - ((((int)(this->_temporaryeffects)._effects._end - (int)pvVar3 & 0xfffffff0U) - 0xc) + - (int)pvVar3) = 1; + (((GHIDRA_INT((this->_temporaryeffects)._effects._end) - GHIDRA_INT(pvVar3) & 0xfffffff0U) - 0xc) + + GHIDRA_INT(pvVar3)) = 1; LAB_007a68f1: tempEffects->_cacheFlags = tempEffects->_cacheFlags | *(uint *)(effectDesc[0] + 0x54); (this->_temporaryeffects)._shouldEvaluateCache = 1; @@ -33860,8 +33860,8 @@ LAB_007a68f1: } } pvVar3 = (g_manager->_itemConfig)._collectibles._begin; - if ((0x918 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar3 & - 0xfffffffcU)) && (iVar7 = *(int *)((char *)pvVar3 + 0x918), iVar7 != 0)) { + if ((0x918 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar3) & + 0xfffffffcU))) && (iVar7 = *(int *)((char *)pvVar3 + 0x918), iVar7 != 0)) { removeDesc[2] = *(undefined4 *)(iVar7 + 0x78); removeDesc[1] = 0; uStack_14 = 0; @@ -33921,15 +33921,15 @@ LAB_007a6a3a: } } if (g_game == (Game *)0x0) { - if (-1 < (int)activeItemId) goto LAB_007a6af0; + if (-1 < GHIDRA_INT(activeItemId)) goto LAB_007a6af0; LAB_007a6b0a: activeConfig = (ItemConfig_Item *)0x0; } - else if ((int)activeItemId < 0) { - if (((int)activeItemId < 0) && + else if (GHIDRA_INT(activeItemId) < 0) { + if ((GHIDRA_INT(activeItemId) < 0) && (pvVar3 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)~activeItemId < - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar3 >> 2)) { + GHIDRA_INT(~activeItemId) < + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar3) >> 2)) { activeConfig = (ItemConfig_Item *)**(undefined4 **)((char *)pvVar3 + ~activeItemId * 4); } else { @@ -33939,7 +33939,7 @@ LAB_007a6b0a: else { LAB_007a6af0: pvVar3 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar3 >> 2 <= (int)activeItemId + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar3) >> 2 <= GHIDRA_INT(activeItemId) ) goto LAB_007a6b0a; activeConfig = *(ItemConfig_Item **)((char *)pvVar3 + activeItemId * 4); } @@ -34076,7 +34076,7 @@ void Entity_Player::room_enter() local_8 = 0xffffffff; puStack_c = &LAB_00affa03; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(message + 0x50); + local_14 = __security_cookie ^ GHIDRA_UINT((message + 0x50)); if (this->_postLevelInitFinished == 0) { return; } @@ -34104,7 +34104,7 @@ LAB_007a6d0d: do { if (wispChance == (undefined1 *)0x0) { LAB_007a6f9e: - AddWisp(this,0x248,(Vector *)((int)this + 0x33c),1,0); + AddWisp(this,0x248,(Vector *)(GHIDRA_INT(this) + 0x33c),1,0); } else { iVar5 = *(int *)((char *)this + 0x177c); @@ -34132,8 +34132,8 @@ LAB_007a6f9e: local_8 = 0; uVar6 = 0; itemConfig = &g_manager->_itemConfig; - if ((int)(g_manager->_itemConfig)._collectibles._end - - (int)(itemConfig->_collectibles)._begin >> 2 != 0) { + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((itemConfig->_collectibles)._begin) >> 2 != 0) { activesCapacity = (uint *)0x0; do { collectible = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(uVar6); @@ -34158,22 +34158,22 @@ LAB_007a6f9e: } uVar6 = uVar6 + 1; itemConfig = &g_manager->_itemConfig; - } while (uVar6 < (uint)((int)(g_manager->_itemConfig)._collectibles._end - - (int)(itemConfig->_collectibles)._begin >> 2)); + } while (uVar6 < GHIDRA_UINT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((itemConfig->_collectibles)._begin) >> 2))); this = (Entity_Player *)local_90; local_74 = activesCapacity; } pvVar8 = actives; - uVar6 = ((RNG *)((RNG *)(*(int *)((char *)this + 0x177c) + 0xb60)))->RNG::RandomInt((int)puVar12 - (int)actives >> 2); - AddWisp(this,*(int *)((char *)pvVar8 + uVar6 * 4),(Vector *)((int)this + 0x33c),1,0); + uVar6 = ((RNG *)((RNG *)(*(int *)((char *)this + 0x177c) + 0xb60)))->RNG::RandomInt(GHIDRA_INT(puVar12) - GHIDRA_INT(actives) >> 2); + AddWisp(this,*(int *)((char *)pvVar8 + uVar6 * 4),(Vector *)(GHIDRA_INT(this) + 0x33c),1,0); local_8 = 0xffffffff; if (pvVar8 != (void *)0x0) { - uVar6 = ((int)local_74 - (int)pvVar8 >> 2) * 4; + uVar6 = (GHIDRA_INT(local_74) - GHIDRA_INT(pvVar8) >> 2) * 4; ptr = pvVar8; if (0xfff < uVar6) { ptr = *(void **)((char *)pvVar8 + -4); uVar6 = uVar6 + 0x23; - if (0x1f < (uint)((int)pvVar8 + (-4 - (int)ptr))) goto LAB_007a7912; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar8) + (-4 - GHIDRA_INT(ptr))))) goto LAB_007a7912; } operator_delete(ptr,uVar6); actives = (void *)0x0; @@ -34183,11 +34183,11 @@ LAB_007a6f9e: wispChance = local_70; } manager = g_manager; - local_7c = (void *)((int)local_7c + 1); - } while ((int)local_7c < 5); + local_7c = (void *)(GHIDRA_INT(local_7c) + 1); + } while (GHIDRA_INT(local_7c) < 5); local_7c = (void *)0x1d7; seed_fart_sound_override((int *)&local_7c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_7c,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_7c),1.0,2,0,1.0,0.0); } piVar9 = *(int **)(*(int *)((char *)g_game->_room + 4) + 0x10); if (((piVar9 != (int *)0x0) && (piVar9[2] == 0x10)) && @@ -34198,14 +34198,14 @@ LAB_007a6f9e: } if ((*(int *)((char *)this + 0x13c0) == 0x23) && (g_game->_challenge == 0x2a)) { pvVar8 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar8 >> 2 < 0x6b) { + if (GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar8) >> 2 < 0x6b) { iVar5 = 0; } else { iVar5 = *(int *)((char *)pvVar8 + 0x1a8); } uVar6 = 0; - piVar9 = (int *)((int)this + 0x122c); + piVar9 = (int *)(GHIDRA_INT(this) + 0x122c); do { if (((-1 < *piVar9) && ((char)piVar9[3] == '\0')) && (iVar10 = *piVar9 * 0x130 + *(int *)((char *)this + 0x1220), *(int *)(iVar10 + 0x114) == iVar5 @@ -34232,10 +34232,10 @@ LAB_007a6f9e: bVar4 = HasCollectible(this,0x1da,0); itemConfig = extraout_ECX_00; if (bVar4 != 0) { - bVar4 = ((TemporaryEffects *)((TemporaryEffects *)((int)this + 0x1508)))->TemporaryEffects::HasCollectibleEffect(0xd6); + bVar4 = ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508)))->TemporaryEffects::HasCollectibleEffect(0xd6); if (bVar4 == 0) { pvVar8 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar8 >> 2 < 0xd7) { + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar8) >> 2 < 0xd7) { collectibleEffect = 0; } else { @@ -34247,20 +34247,20 @@ LAB_007a6f9e: } local_b4 = 0; local_ac = 0; - ((TemporaryEffects *)((TemporaryEffects *)((int)this + 0x1508)))->TemporaryEffects::AddEffect(&collectibleEffect,1,1) + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508)))->TemporaryEffects::AddEffect(&collectibleEffect,1,1) ; } bVar4 = HasCollectible(this,0x3b,0); itemConfig = extraout_ECX_01; if (((bVar4 != 0) && (itemConfig = (g_manager->_itemConfig)._nullItems._begin, - 0x7b < (int)(g_manager->_itemConfig)._nullItems._end - (int)itemConfig >> 2)) && + 0x7b < GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(itemConfig) >> 2)) && (fVar14 = (itemConfig->_splatColor)._tint[2], fVar14 != 0.0)) { nullEffectCooldown = *(undefined4 *)((char *)fVar14 + 0x78); local_c4 = 0; local_bc = 0; nullEffect = fVar14; - ((TemporaryEffects *)((TemporaryEffects *)((int)this + 0x1508)))->TemporaryEffects::AddEffect(&nullEffect,1,4); + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(this) + 0x1508)))->TemporaryEffects::AddEffect(&nullEffect,1,4); itemConfig = extraout_ECX_02; } } @@ -34270,15 +34270,15 @@ LAB_007a6f9e: GetEnterPosition(itemConfig,&enterPos); game = g_game; if (((g_game->_difficulty == 2) || (g_game->_difficulty == 3)) && - (uVar6 = g_game->_greedLastBeatenWave, uVar6 < (uint)g_game->_greedModeWave)) { - uVar6 = -(uint)(uVar6 != 0) & uVar6; + (uVar6 = g_game->_greedLastBeatenWave, uVar6 < GHIDRA_UINT(g_game->_greedModeWave))) { + uVar6 = -GHIDRA_UINT((uVar6 != 0)) & uVar6; uVar7 = 0xc; if (uVar6 < 0xc) { uVar7 = uVar6; } g_game->_greedModeWave = uVar7; } - local_80 = (float *)((int)this + 0x33c); + local_80 = (float *)(GHIDRA_INT(this) + 0x33c); *local_80 = enterPos.x; *(float *)((char *)this + 0x340) = enterPos.y; *(float *)((char *)this + 0x360) = g_vectorZero.x; @@ -34294,7 +34294,7 @@ LAB_007a6f9e: roomDesc = ((Level *)((Level *)game))->Level::GetRoomByIdx(game->_lastRoomIdx,game->_lastRoomDimensionIdx); if ((*(int *)((char *)roomDesc->Data + 8) == 0x10) && ((*(uint *)(*(int *)((char *)g_game->_room + 4) + 0x44) & 0x10000) != 0)) { - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&queryList,0x38f,0,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&queryList,0x38f,0,-1,0,0); local_8 = 1; if (queryList._size != 0) { uVar16 = *(undefined4 *)(*(int *)queryList._data + 0x340); @@ -34303,7 +34303,7 @@ LAB_007a6f9e: pcVar2 = *(code **)(*(int *)this + 0x54); uVar6 = Random(); local_70 = (undefined1 *) - ((((float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + ((((float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 - 0.5) * 70.0 + 90.0) * 0.017453292); local_74 = (uint *)sin((float)local_70); fVar14 = cos((float)local_70); @@ -34313,7 +34313,7 @@ LAB_007a6f9e: (*pcVar2)(&sourceRef,&launchVelocity,0x41900000); } local_8 = 0xffffffff; - if (queryList._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(queryList) + 0x0)) == '\0') { local_8 = 2; tracked_alloc(1,queryList._data,0); local_8 = 0xffffffff; @@ -34382,13 +34382,13 @@ LAB_007a6f9e: } else { LAB_007a75ef: - if (-1 < (int)uVar6) { - if ((int)uVar6 < 8) { + if (-1 < GHIDRA_INT(uVar6)) { + if (GHIDRA_INT(uVar6) < 8) { door = *(GridEntity_Door **)((char *)g_game->_room + uVar6 * 4 + 0x724); iVar5 = GetTrinketMultiplier(this,0x7c); if ((door == (GridEntity_Door *)0x0) || (((GridEntity_Door *)(door))->GridEntity_Door::Open(), iVar5 < 3)) goto LAB_007a7642; - if (((uint)door->_doorFlags >> 3 & 1) != 0) { + if ((GHIDRA_UINT(door->_doorFlags) >> 3 & 1) != 0) { ((GridEntity_Door *)(door))->GridEntity_Door::TryUnlock(this,1); } } @@ -34420,7 +34420,7 @@ LAB_007a766b: cloudColor._colorize[1] = _UNK_00bac034; cloudColor._colorize[2] = _UNK_00bac038; cloudColor._colorize[3] = _UNK_00bac03c; - ((Game *)((Game *)((int)g_game->_room + 0x1618)))->Game::start_poop_cloud_screen_effect(&cloudColor); + ((Game *)((Game *)(GHIDRA_INT(g_game->_room) + 0x1618)))->Game::start_poop_cloud_screen_effect(&cloudColor); } bVar4 = HasCollectible(this,0x1f9,0); if (((bVar4 != 0) && (*(char *)((char *)g_game->_room + 1) != '\0')) && @@ -34464,7 +34464,7 @@ LAB_007a766b: pTVar18 = &IsaacRepentancePlus::Entity_NPC::RTTI_Type_Descriptor; pTVar17 = &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor; uVar16 = 0; - spawned = ((Game *)(g_game))->Game::Spawn(uVar6,0,(Vector *)((int)this + 0x33c),&g_vectorZero, + spawned = ((Game *)(g_game))->Game::Spawn(uVar6,0,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero, (Entity *)this,0,uVar7); spawned = (Entity *)__RTDynamicCast(spawned,uVar16,pTVar17,pTVar18,uVar19); ((EntityRef *)(&charmRef))->EntityRef::constructor((Entity *)this); @@ -34478,7 +34478,7 @@ LAB_007a766b: if (((*(char *)((char *)configNode + 0xd) == '\0') && (*(uint *)((char *)configNode + 0x10) <= uVar6)) && (configNode != (manager->_entityConfig)._entities._head)) { - entityConfig = (EntityConfig_Entity *)((int)configNode + 0x18); + entityConfig = (EntityConfig_Entity *)(GHIDRA_INT(configNode) + 0x18); } else { entityConfig = (EntityConfig_Entity *)0x0; @@ -34491,7 +34491,7 @@ LAB_007a766b: } format = string_table_translate(&g_manager->_stringTable,(byte *)"#POKE_GO_APPEAR_NOTIFY"); sprintf(message,format); - ((HUD *)(&g_game->_hud))->HUD::show_fortune_line(message,(int)format,(int)psVar11); + ((HUD *)(&g_game->_hud))->HUD::show_fortune_line(message,GHIDRA_INT(format),GHIDRA_INT(psVar11)); local_8 = 0xffffffff; if (0xf < entityNameCapacity) { uVar6 = entityNameCapacity + 1; @@ -34499,7 +34499,7 @@ LAB_007a766b: if (0xfff < uVar6) { psVar11 = (std_string *)entityName[0][-1]._capacity; uVar6 = entityNameCapacity + 0x24; - if (0x1f < (uint)((int)entityName[0] + (-4 - (int)psVar11))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(entityName[0]) + (-4 - GHIDRA_INT(psVar11))))) { LAB_007a7912: local_8 = 0xffffffff; /* WARNING: Subroutine does not return */ @@ -34508,13 +34508,13 @@ LAB_007a7912: } operator_delete(psVar11,uVar6); } - entityName[0] = (std_string *)((uint)entityName[0] & 0xffffff00); + entityName[0] = (std_string *)(GHIDRA_UINT(entityName[0]) & 0xffffff00); } } bVar4 = HasCollectible(this,0x1bd,0); game = g_game; if (bVar4 != 0) { - local_70 = (undefined1 *)((int)g_game->_room + 0x724); + local_70 = (undefined1 *)(GHIDRA_INT(g_game->_room) + 0x724); uVar6 = 0; do { iVar5 = *(int *)(local_70 + uVar6 * 4); @@ -34529,7 +34529,7 @@ LAB_007a7912: iVar5 = *(int *)((char *)this + 0x1b30); local_70 = *(undefined1 **)((char *)this + 0x1b24); seed_fart_sound_override((int *)&local_70); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_70,(float)local_74,iVar5,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_70),(float)local_74,iVar5,0,1.0,0.0); } game = g_game; *(undefined4 *)((char *)this + 0x1b24) = 0x1ba; @@ -34556,7 +34556,7 @@ LAB_007a7912: iVar5 = *(int *)((char *)this + 0x1b30); local_74 = *(uint **)((char *)this + 0x1b24); seed_fart_sound_override((int *)&local_74); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_74,(float)local_78,iVar5,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_74),(float)local_78,iVar5,0,1.0,0.0); game = g_game; } *(undefined4 *)((char *)this + 0x1b24) = 0x1b9; @@ -34577,14 +34577,14 @@ LAB_007a7912: followedPlayer = *(EntityPtr *)((char *)this + 0x3bc); if ((followedPlayer == (EntityPtr)0x0) || (*(int *)((char *)followedPlayer + 0x28) != 1)) { pEVar13 = (game->_playerManager)._playerList._begin; - if ((int)(game->_playerManager)._playerList._end - (int)pEVar13 >> 2 == 0) { + if (GHIDRA_INT((game->_playerManager)._playerList._end) - GHIDRA_INT(pEVar13) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pEVar13 = (game->_playerManager)._playerList._begin; } followedPlayer = *pEVar13; } uVar6 = Random(); - spawned = ((Game *)(g_game))->Game::Spawn(1000,0x72,(Vector *)((int)followedPlayer + 0x33c),&g_vectorZero, + spawned = ((Game *)(g_game))->Game::Spawn(1000,0x72,(Vector *)(GHIDRA_INT(followedPlayer) + 0x33c),&g_vectorZero, (Entity *)0x0,0,uVar6); if (spawned->_child != (EntityPtr)0x0) { local_78 = &spawned->_child; @@ -34618,7 +34618,7 @@ LAB_007a7912: pRVar1 = g_game->_room; uVar6 = Random(); manager = g_manager; - pRVar1->_brokenWatchState = 2 - (uint)(uVar6 % 10 != 0); + pRVar1->_brokenWatchState = 2 - GHIDRA_UINT((uVar6 % 10 != 0)); fVar14 = ((Room *)(pRVar1))->Room::time_scale_update(); (manager->_musicManager)._targetPitch = fVar14; } @@ -34632,7 +34632,7 @@ LAB_007a7cd9: *(undefined4 *)((char *)this + 0x33c) = *(undefined4 *)(*(int *)((char *)this + 0x3bc) + 0x33c); *(undefined4 *)((char *)this + 0x340) = uVar16; } - piVar9 = (int *)((int)this + 0x13e0); + piVar9 = (int *)(GHIDRA_INT(this) + 0x13e0); iVar5 = 4; do { if ((int *)*piVar9 != (int *)0x0) { @@ -34645,15 +34645,15 @@ LAB_007a7cd9: (**(code **)(**(int **)((char *)this + 0x13dc) + 0x2c))(); } pRVar1 = g_game->_room; - iVar10 = (int)((*(float *)((char *)this + 0x33c) - 40.0) / 40.0 + 0.5); - iVar5 = (int)((*(float *)((char *)this + 0x340) - 120.0) / 40.0 + 0.5); + iVar10 = GHIDRA_INT(((*(float *)((char *)this + 0x33c) - 40.0) / 40.0 + 0.5)); + iVar5 = GHIDRA_INT(((*(float *)((char *)this + 0x340) - 120.0) / 40.0 + 0.5)); if (*(char *)((char *)this + 0x1570) == '\0') { if (((((-1 < iVar10) && (iVar10 < pRVar1->_gridWidth)) && ((-1 < iVar5 && ((iVar5 < pRVar1->_gridHeight && (uVar6 = pRVar1->_gridWidth * iVar5 + iVar10, uVar6 < 0x1c0)))))) && (pRVar1->_gridEntities[uVar6] != (void *)0x0)) && - (*(int *)((int)pRVar1->_gridEntities[uVar6] + 4) == 0xe)) { + (*(int *)(GHIDRA_INT(pRVar1->_gridEntities[uVar6]) + 4) == 0xe)) { ((Room *)(pRVar1))->Room::RemoveGridEntity(pRVar1->_gridWidth * iVar5 + iVar10,900,1); } } @@ -34686,7 +34686,7 @@ LAB_007a7cd9: } local_7c = pvVar8; uVar6 = Random(); - fVar14 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar14 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_78 = (EntityPtr *)(fVar14 + fVar14); local_74 = (uint *)cos((float)local_78); @@ -34724,14 +34724,14 @@ LAB_007a7cd9: ,&IsaacRepentancePlus::Entity_NPC::RTTI_Type_Descriptor,0) ; uVar7 = Random(); - local_80 = (float *)((float)(int)(uVar7 % 0x5a - 0x2d) * 0.017453292); + local_80 = (float *)((float)GHIDRA_INT((uVar7 % 0x5a - 0x2d)) * 0.017453292); local_78 = (EntityPtr *)cos((float)local_80); fVar14 = sin((float)local_80); local_80 = (float *)((float)local_78 * (float)local_74 - fVar14 * (float)local_70); local_78 = (EntityPtr *)(fVar14 * (float)local_74 + (float)local_78 * (float)local_70); uVar7 = Random(); iVar5 = piVar9[10]; - fVar14 = (float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + fVar14 = (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 * 10.0; if (((iVar5 == 0x24) || (iVar5 == 0x106)) || (iVar5 == 0x107)) { fVar14 = (float)piVar9[0xdc]; @@ -34741,15 +34741,15 @@ LAB_007a7cd9: enemyPosX = (float)local_80 * fVar14 + *playerPos; fVar14 = (float)local_78 * fVar14 + playerPos[1]; if (3600.0 < targetX * targetX + fVar15 * fVar15) { - piVar9[0xcd] = (int)((targetX - (float)piVar9[0xcf]) + enemyPosX); - piVar9[0xce] = (int)((fVar15 - (float)piVar9[0xd0]) + fVar14); + piVar9[0xcd] = GHIDRA_INT(((targetX - (float)piVar9[0xcf]) + enemyPosX)); + piVar9[0xce] = GHIDRA_INT(((fVar15 - (float)piVar9[0xd0]) + fVar14)); } - piVar9[0xcf] = (int)enemyPosX; - piVar9[0xd0] = (int)fVar14; - piVar9[0x106] = (int)g_vectorZero.x; - piVar9[0x107] = (int)g_vectorZero.y; - piVar9[0x108] = (int)g_vectorZero.x; - piVar9[0x109] = (int)g_vectorZero.y; + piVar9[0xcf] = GHIDRA_INT(enemyPosX); + piVar9[0xd0] = GHIDRA_INT(fVar14); + piVar9[0x106] = GHIDRA_INT(g_vectorZero.x); + piVar9[0x107] = GHIDRA_INT(g_vectorZero.y); + piVar9[0x108] = GHIDRA_INT(g_vectorZero.x); + piVar9[0x109] = GHIDRA_INT(g_vectorZero.y); if (piVar9[10] == 0x1e) { (**(code **)(*piVar9 + 0xc))(); piVar9[0xcd] = piVar9[0xcf]; @@ -34777,7 +34777,7 @@ LAB_007a7cd9: if (((0 < iVar5) && (g_game->_isRestoringGlowingHourglassState == 0)) && (iVar5 = GetTrinketMultiplier(this,0x5d), 0 < iVar5)) { do { - AddBlueFlies(this,1,(Vector *)((int)this + 0x33c),(Entity *)0x0); + AddBlueFlies(this,1,(Vector *)(GHIDRA_INT(this) + 0x33c),(Entity *)0x0); iVar5 = iVar5 + -1; } while (iVar5 != 0); } @@ -34835,14 +34835,14 @@ void Entity_Player::TriggerNewRoom_TemporaryEffects() uint levelEffectItemId; Manager *manager; - local_8 = __security_cookie ^ (uint)(local_38 + 0xd); + local_8 = __security_cookie ^ GHIDRA_UINT((local_38 + 0xd)); bVar2 = HasTrinket(this,0x20,0); if (bVar2 != 0) { iVar3 = GetTrinketMultiplier(this,0x20); - if (((int)(4 / (longlong)iVar3) == 0) || - (uVar4 = Random(), (int)((ulonglong)uVar4 % (4 / (longlong)iVar3 & 0xffffffffU)) == 0)) { + if ((GHIDRA_INT((4 / (longlong)iVar3)) == 0) || + (uVar4 = Random(), GHIDRA_INT(((ulonglong)uVar4 % (4 / (longlong)iVar3 & 0xffffffffU))) == 0)) { pvVar5 = (this->_trinketRNGs)._begin; - trinketSeed = (uint *)((int)pvVar5 + 0x200); + trinketSeed = (uint *)(GHIDRA_INT(pvVar5) + 0x200); local_38[6] = 0xc; local_38[7] = 0x47; RStack_18._seed = 0x79; @@ -34865,8 +34865,8 @@ void Entity_Player::TriggerNewRoom_TemporaryEffects() uVar4 = uVar4 >> ((byte)*(undefined4 *)((char *)pvVar5 + 0x20c) & 0x1f) ^ uVar4; *trinketSeed = uVar4; RStack_18._seed = - (int)((ItemConfig *)(&manager->_itemConfig))->ItemConfig::GetCollectible(local_38[uVar4 % 6 + 6]); - RStack_18._4_8_ = (ulonglong)(uint)((ItemConfig_Item *)RStack_18._seed)->maxCooldown << 0x20; + GHIDRA_INT(((ItemConfig *)(&manager->_itemConfig))->ItemConfig)::GetCollectible(local_38[uVar4 % 6 + 6]); + (*(undefined8 *)((char *)&(RStack_18) + 0x4)) = (ulonglong)GHIDRA_UINT(((ItemConfig_Item *)RStack_18._seed)->maxCooldown) << 0x20; RStack_18._shift3 = 0; ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddEffect(&RStack_18,1,1); } @@ -34874,16 +34874,16 @@ void Entity_Player::TriggerNewRoom_TemporaryEffects() bVar2 = HasTrinket(this,0x84,0); if (bVar2 != 0) { iVar3 = GetTrinketMultiplier(this,0x84); - if (((int)(4 / (longlong)iVar3) == 0) || - (uVar4 = Random(), (int)((ulonglong)uVar4 % (4 / (longlong)iVar3 & 0xffffffffU)) == 0)) { + if ((GHIDRA_INT((4 / (longlong)iVar3)) == 0) || + (uVar4 = Random(), GHIDRA_INT(((ulonglong)uVar4 % (4 / (longlong)iVar3 & 0xffffffffU))) == 0)) { add_random_drug_item_effect(this); } } bVar2 = HasTrinket(this,0x99,0); if (bVar2 != 0) { iVar3 = GetTrinketMultiplier(this,0x99); - if (((int)(4 / (longlong)iVar3) == 0) || - (uVar4 = Random(), (int)((ulonglong)uVar4 % (4 / (longlong)iVar3 & 0xffffffffU)) == 0)) { + if ((GHIDRA_INT((4 / (longlong)iVar3)) == 0) || + (uVar4 = Random(), GHIDRA_INT(((ulonglong)uVar4 % (4 / (longlong)iVar3 & 0xffffffffU))) == 0)) { AddRandomMomItemEffect(this); } } @@ -34916,7 +34916,7 @@ void Entity_Player::TriggerNewRoom_TemporaryEffects() RStack_18._shift3 = 0x15; RStack_18._seed = roomDesc->SpawnSeed; iVar3 = GetTrinketMultiplier(this,0xa6); - uVar4 = ((RNG *)(&RStack_18))->RNG::RandomInt((uint)(2 / (longlong)iVar3)); + uVar4 = ((RNG *)(&RStack_18))->RNG::RandomInt(GHIDRA_UINT((2 / (longlong)iVar3))); if (uVar4 == 0) { ModelingClay_roll(this,&RStack_18); } @@ -34937,11 +34937,11 @@ void Entity_Player::TriggerNewRoom_TemporaryEffects() } else { pvVar5 = (g_manager->_itemConfig)._collectibles._begin; - if ((0x4e4 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar5 & 0xfffffffcU) + if ((0x4e4 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar5) & 0xfffffffcU)) ) && (item = *(ItemConfig_Item **)((char *)pvVar5 + 0x4e4), item != (ItemConfig_Item *)0x0)) { - RStack_18._4_8_ = (ulonglong)(uint)item->maxCooldown << 0x20; + (*(undefined8 *)((char *)&(RStack_18) + 0x4)) = (ulonglong)GHIDRA_UINT(item->maxCooldown) << 0x20; RStack_18._shift3 = 0; - RStack_18._seed = (int)item; + RStack_18._seed = GHIDRA_INT(item); ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::RemoveEffect(&RStack_18,1); } manager = g_manager; @@ -34949,7 +34949,7 @@ void Entity_Player::TriggerNewRoom_TemporaryEffects() (pvVar5 = ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::GetCollectibleEffect(0x139), pvVar5 == (void *)0x0)) || (*(int *)((char *)pvVar5 + 4) < 1)) { pvVar5 = (manager->_itemConfig)._collectibles._begin; - if ((int)((int)(manager->_itemConfig)._collectibles._end - (int)pvVar5 & 0xfffffffcU) < 0x4e5) + if (GHIDRA_INT((GHIDRA_INT((manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar5) & 0xfffffffcU)) < 0x4e5) { RemoveCostume(this,(ItemConfig_Item *)0x0); } @@ -34975,11 +34975,11 @@ void Entity_Player::TriggerNewRoom_TemporaryEffects() this->SetColor(local_38 + 1,0xffffffff,0xff,0,1); if ((*(char *)((char *)g_game->_room + 1) != '\0') && ((pvVar5 = (g_manager->_itemConfig)._collectibles._begin, - 0x4ac < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar5 & 0xfffffffcU) + 0x4ac < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar5) & 0xfffffffcU)) && (item = *(ItemConfig_Item **)((char *)pvVar5 + 0x4ac), item != (ItemConfig_Item *)0x0)))) { - RStack_18._4_8_ = (ulonglong)(uint)item->maxCooldown << 0x20; + (*(undefined8 *)((char *)&(RStack_18) + 0x4)) = (ulonglong)GHIDRA_UINT(item->maxCooldown) << 0x20; RStack_18._shift3 = 0; - RStack_18._seed = (int)item; + RStack_18._seed = GHIDRA_INT(item); ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddEffect(&RStack_18,1,1); } } @@ -35012,7 +35012,7 @@ void Entity_Player::TriggerNewRoom_TemporaryEffects() if ((bVar2 != 0) && (bVar2 = ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::HasCollectibleEffect(0x199), bVar2 == 0)) { pvVar5 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar5 & 0xfffffffcU) < 0x49) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar5) & 0xfffffffcU)) < 0x49) { item = (ItemConfig_Item *)0x0; } else { @@ -35022,7 +35022,7 @@ void Entity_Player::TriggerNewRoom_TemporaryEffects() if (this->_redHearts < 1) { ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddCollectibleEffect(0x199,1,1); pvVar5 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar5 & 0xfffffffcU) < 0x49) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar5) & 0xfffffffcU)) < 0x49) { item = (ItemConfig_Item *)0x0; } else { @@ -35034,26 +35034,26 @@ void Entity_Player::TriggerNewRoom_TemporaryEffects() bVar2 = HasCollectible(this,0x8e,0); if (((bVar2 != 0) && (pvVar5 = (g_manager->_itemConfig)._collectibles._begin, - 0x238 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar5 & 0xfffffffcU))) + 0x238 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar5) & 0xfffffffcU)))) && (item = *(ItemConfig_Item **)((char *)pvVar5 + 0x238), item != (ItemConfig_Item *)0x0)) { - RStack_18._4_8_ = (ulonglong)(uint)item->maxCooldown << 0x20; + (*(undefined8 *)((char *)&(RStack_18) + 0x4)) = (ulonglong)GHIDRA_UINT(item->maxCooldown) << 0x20; RStack_18._shift3 = 0; - RStack_18._seed = (int)item; + RStack_18._seed = GHIDRA_INT(item); ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddEffect(&RStack_18,1,1); } bVar2 = HasCollectible(this,0x197,0); if ((bVar2 != 0) && (bVar2 = ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::HasCollectibleEffect(0x197), bVar2 == 0)) { pvVar5 = (g_manager->_itemConfig)._collectibles._begin; - if ((0x65c < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar5 & 0xfffffffcU) + if ((0x65c < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar5) & 0xfffffffcU)) ) && (item = *(ItemConfig_Item **)((char *)pvVar5 + 0x65c), item != (ItemConfig_Item *)0x0)) { - RStack_18._4_8_ = (ulonglong)(uint)item->maxCooldown << 0x20; + (*(undefined8 *)((char *)&(RStack_18) + 0x4)) = (ulonglong)GHIDRA_UINT(item->maxCooldown) << 0x20; RStack_18._shift3 = 0; - RStack_18._seed = (int)item; + RStack_18._seed = GHIDRA_INT(item); ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddEffect(&RStack_18,1,1); } pvVar5 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar5 & 0xfffffffcU) < 0x45) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar5) & 0xfffffffcU)) < 0x45) { item = (ItemConfig_Item *)0x0; } else { @@ -35092,28 +35092,28 @@ void Entity_Player::TriggerNewRoom_TemporaryEffects() if ((this->_holyMantleStacks & 0xf0) != 0) { do { pvVar5 = (g_manager->_itemConfig)._collectibles._begin; - if ((0x4e4 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar5 & - 0xfffffffcU)) && + if ((0x4e4 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar5) & + 0xfffffffcU))) && (item = *(ItemConfig_Item **)((char *)pvVar5 + 0x4e4), item != (ItemConfig_Item *)0x0)) { - RStack_18._4_8_ = (ulonglong)(uint)item->maxCooldown << 0x20; + (*(undefined8 *)((char *)&(RStack_18) + 0x4)) = (ulonglong)GHIDRA_UINT(item->maxCooldown) << 0x20; RStack_18._shift3 = 0; - RStack_18._seed = (int)item; + RStack_18._seed = GHIDRA_INT(item); ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddEffect(&RStack_18,1,1); } iVar3 = iVar3 + 1; - } while (iVar3 < (int)(uint)(this->_holyMantleStacks >> 4)); + } while (iVar3 < GHIDRA_INT(GHIDRA_UINT((this->_holyMantleStacks >> 4)))); } if ((this->_temporaryeffects)._disabled == 0) { for (effectIter = (this->_temporaryeffects)._effects._begin; effectIter != (this->_temporaryeffects)._effects._end; effectIter = effectIter + 4) { if ((*(int *)*effectIter == 0) && (((int *)*effectIter)[1] == 0x2e)) { pvVar5 = (g_manager->_itemConfig)._collectibles._begin; - if ((0x4e4 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar5 & - 0xfffffffcU)) && + if ((0x4e4 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar5) & + 0xfffffffcU))) && (item = *(ItemConfig_Item **)((char *)pvVar5 + 0x4e4), item != (ItemConfig_Item *)0x0)) { - RStack_18._4_8_ = (ulonglong)(uint)item->maxCooldown << 0x20; + (*(undefined8 *)((char *)&(RStack_18) + 0x4)) = (ulonglong)GHIDRA_UINT(item->maxCooldown) << 0x20; RStack_18._shift3 = 0; - RStack_18._seed = (int)item; + RStack_18._seed = GHIDRA_INT(item); ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddEffect(&RStack_18,1,1); } break; @@ -35122,11 +35122,11 @@ void Entity_Player::TriggerNewRoom_TemporaryEffects() } if ((((this->_variant == 0) && (bVar2 = HasCollectible(this,0x1f1,0), bVar2 != 0)) && (pvVar5 = (g_manager->_itemConfig)._collectibles._begin, - 0x7c4 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar5 & 0xfffffffcU))) + 0x7c4 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar5) & 0xfffffffcU)))) && (item = *(ItemConfig_Item **)((char *)pvVar5 + 0x7c4), item != (ItemConfig_Item *)0x0)) { - RStack_18._4_8_ = (ulonglong)(uint)item->maxCooldown << 0x20; + (*(undefined8 *)((char *)&(RStack_18) + 0x4)) = (ulonglong)GHIDRA_UINT(item->maxCooldown) << 0x20; RStack_18._shift3 = 0; - RStack_18._seed = (int)item; + RStack_18._seed = GHIDRA_INT(item); ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddEffect(&RStack_18,1,1); } bVar2 = HasCollectible(this,0x24c,0); @@ -35138,7 +35138,7 @@ void Entity_Player::TriggerNewRoom_TemporaryEffects() } } pvVar5 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar5 & 0xfffffffcU) < 0xe1) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar5) & 0xfffffffcU)) < 0xe1) { item = (ItemConfig_Item *)0x0; } else { @@ -35148,11 +35148,11 @@ void Entity_Player::TriggerNewRoom_TemporaryEffects() if (((-1 < g_game->_lastBossRoomListIdx) && ((g_game->_roomList[g_game->_lastBossRoomListIdx].Flags & 1) != 0)) && ((pvVar5 = (g_manager->_itemConfig)._nullItems._begin, - 0xe0 < (int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar5 & 0xfffffffcU) && + 0xe0 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar5) & 0xfffffffcU)) && (item = *(ItemConfig_Item **)((char *)pvVar5 + 0xe0), item != (ItemConfig_Item *)0x0)))) { - RStack_18._4_8_ = (ulonglong)(uint)item->maxCooldown << 0x20; + (*(undefined8 *)((char *)&(RStack_18) + 0x4)) = (ulonglong)GHIDRA_UINT(item->maxCooldown) << 0x20; RStack_18._shift3 = 0; - RStack_18._seed = (int)item; + RStack_18._seed = GHIDRA_INT(item); ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddEffect(&RStack_18,1,1); } } @@ -35161,18 +35161,18 @@ LAB_007a8d7b: uVar4 = 0; pvVar5 = (this->_levelEffectItems)._begin; game = g_game; - if ((int)(this->_levelEffectItems)._end - (int)pvVar5 >> 2 != 0) { + if (GHIDRA_INT((this->_levelEffectItems)._end) - GHIDRA_INT(pvVar5) >> 2 != 0) { do { levelEffectItemId = *(uint *)((char *)pvVar5 + uVar4 * 4); if (game == (Game *)0x0) { - if (-1 < (int)levelEffectItemId) goto LAB_007a8dea; + if (-1 < GHIDRA_INT(levelEffectItemId)) goto LAB_007a8dea; } else { - if ((int)levelEffectItemId < 0) { - if (((int)levelEffectItemId < 0) && + if (GHIDRA_INT(levelEffectItemId) < 0) { + if ((GHIDRA_INT(levelEffectItemId) < 0) && (pvVar5 = (game->_proceduralItemManager)._proceduralItems._begin, - (int)~levelEffectItemId < - (int)(game->_proceduralItemManager)._proceduralItems._end - (int)pvVar5 >> 2)) { + GHIDRA_INT(~levelEffectItemId) < + GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar5) >> 2)) { item = (ItemConfig_Item *)**(undefined4 **)((char *)pvVar5 + ~levelEffectItemId * 4); } else { @@ -35182,14 +35182,14 @@ LAB_007a8d7b: else { LAB_007a8dea: pvVar5 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar5 >> 2 <= - (int)levelEffectItemId) goto LAB_007a8e36; + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar5) >> 2 <= + GHIDRA_INT(levelEffectItemId)) goto LAB_007a8e36; item = *(ItemConfig_Item **)((char *)pvVar5 + levelEffectItemId * 4); } if (item != (ItemConfig_Item *)0x0) { - RStack_18._4_8_ = (ulonglong)(uint)item->maxCooldown << 0x20; + (*(undefined8 *)((char *)&(RStack_18) + 0x4)) = (ulonglong)GHIDRA_UINT(item->maxCooldown) << 0x20; RStack_18._shift3 = 0; - RStack_18._seed = (int)item; + RStack_18._seed = GHIDRA_INT(item); ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddEffect(&RStack_18,1,1); game = g_game; } @@ -35197,13 +35197,13 @@ LAB_007a8dea: LAB_007a8e36: uVar4 = uVar4 + 1; pvVar5 = (this->_levelEffectItems)._begin; - } while (uVar4 < (uint)((int)(this->_levelEffectItems)._end - (int)pvVar5 >> 2)); + } while (uVar4 < GHIDRA_UINT((GHIDRA_INT((this->_levelEffectItems)._end) - GHIDRA_INT(pvVar5) >> 2))); } } bVar2 = HasTrinket(this,0x9a,0); if ((bVar2 != 0) && (*(int *)(*(int *)((char *)g_game->_room + 4) + 0x40) == 1)) { pvVar5 = (this->_trinketRNGs)._begin; - trinketSeed = (uint *)((int)pvVar5 + 0x9a0); + trinketSeed = (uint *)(GHIDRA_INT(pvVar5) + 0x9a0); uVar4 = *trinketSeed; if (uVar4 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -35219,9 +35219,9 @@ LAB_007a8e36: uVar4 = uVar4 >> ((byte)*(undefined4 *)((char *)pvVar5 + 0x9ac) & 0x1f) ^ uVar4; *trinketSeed = uVar4; iVar3 = GetTrinketMultiplier(this,0x9a); - if ((int)(uVar4 & 1) < iVar3) { + if (GHIDRA_INT((uVar4 & 1)) < iVar3) { pvVar5 = (this->_trinketRNGs)._begin; - trinketSeed = (uint *)((int)pvVar5 + 0xb70); + trinketSeed = (uint *)(GHIDRA_INT(pvVar5) + 0xb70); uVar4 = *trinketSeed; if (uVar4 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -35318,7 +35318,7 @@ void Entity_Player::TriggerRoomClear() ehState = 0xffffffff; puStack_c = &LAB_00affa55; prevExceptionList = ExceptionList; - stackCookie = __security_cookie ^ (uint)(local_40 + 0x3c); + stackCookie = __security_cookie ^ GHIDRA_UINT((local_40 + 0x3c)); ExceptionList = &prevExceptionList; player = this; bVar5 = HasTrinket(this,0x8f,0); @@ -35326,17 +35326,17 @@ void Entity_Player::TriggerRoomClear() local_60 = (uint *)0x0; do { puVar11 = local_60; - local_5c = (TemporaryEffects *)((int)(local_60 + 0x2b) * 0x20); - uVar13 = *(uint *)((int)&local_5c->_cacheFlags + (int)this); + local_5c = (TemporaryEffects *)(GHIDRA_INT((local_60 + 0x2b)) * 0x20); + uVar13 = *(uint *)(GHIDRA_INT(&local_5c->_cacheFlags) + GHIDRA_INT(this)); if (g_game == (Game *)0x0) { - if (-1 < (int)uVar13) goto LAB_007a907b; + if (-1 < GHIDRA_INT(uVar13)) goto LAB_007a907b; } else { - if ((int)uVar13 < 0) { - if (((int)uVar13 < 0) && + if (GHIDRA_INT(uVar13) < 0) { + if ((GHIDRA_INT(uVar13) < 0) && (pvVar12 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)~uVar13 < - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar12 >> 2)) { + GHIDRA_INT(~uVar13) < + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar12) >> 2)) { iVar6 = **(int **)((char *)pvVar12 + ~uVar13 * 4); } else { @@ -35346,12 +35346,12 @@ void Entity_Player::TriggerRoomClear() else { LAB_007a907b: pvVar12 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar12 >> 2 <= (int)uVar13) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar12) >> 2 <= GHIDRA_INT(uVar13)) goto LAB_007a9338; iVar6 = *(int *)((char *)pvVar12 + uVar13 * 4); } if (iVar6 != 0) { - iVar6 = GetActiveMaxCharge(this,(int)local_60); + iVar6 = GetActiveMaxCharge(this,GHIDRA_INT(local_60)); if (iVar6 == 0) { puVar11 = (uint *)0x1; local_68 = (uint *)0x1; @@ -35365,22 +35365,22 @@ LAB_007a907b: } EVar7 = (EntityPtr)GetTrinketMultiplier(this,0x48); local_44 = (EntityPtr)0x10; - if ((int)EVar7 < 0x10) { + if (GHIDRA_INT(EVar7) < 0x10) { local_44 = EVar7; } - if (0 < (int)local_44) { + if (0 < GHIDRA_INT(local_44)) { do { pvVar12 = (this->_trinketRNGs)._end; - if ((int)pvVar12 - (int)(this->_trinketRNGs)._begin >> 4 < 0x49) { + if (GHIDRA_INT(pvVar12) - GHIDRA_INT((this->_trinketRNGs)._begin) >> 4 < 0x49) { KAGE_LogMessage(0x10,(byte *)"Trinket ID out of bounds!\n"); pvVar12 = (this->_trinketRNGs)._end; } trinketRngs = (this->_trinketRNGs)._begin; - uVar13 = ((int)pvVar12 - (int)trinketRngs >> 4) - 1; + uVar13 = (GHIDRA_INT(pvVar12) - GHIDRA_INT(trinketRngs) >> 4) - 1; if (0x48 < uVar13) { uVar13 = 0x48; } - puVar11 = (uint *)(uVar13 * 0x10 + (int)trinketRngs); + puVar11 = (uint *)(uVar13 * 0x10 + GHIDRA_INT(trinketRngs)); uVar13 = *puVar11; if (uVar13 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -35397,10 +35397,10 @@ LAB_007a907b: *puVar11 = uVar13; if (uVar13 % 0x14 == 0) { iVar6 = GetTrinketMultiplier(this,0x48); - local_68 = (uint *)((int)local_68 + iVar6); + local_68 = (uint *)(GHIDRA_INT(local_68) + iVar6); } - local_44 = (EntityPtr)((int)local_44 + -1); - } while (0 < (int)local_44); + local_44 = (EntityPtr)(GHIDRA_INT(local_44) + -1); + } while (0 < GHIDRA_INT(local_44)); puVar11 = local_68; } if (local_60 == (uint *)0x3) { @@ -35412,27 +35412,27 @@ LAB_007a907b: } else { local_68 = (uint *)GetCollectibleMaxCharge - (this,*(int *)((int)&local_5c->_cacheFlags + (int)this), - this->_activeDesc[(int)local_60]._varData,(int)local_60) + (this,*(int *)(GHIDRA_INT(&local_5c->_cacheFlags) + GHIDRA_INT(this)), + this->_activeDesc[GHIDRA_INT(local_60)]._varData,GHIDRA_INT(local_60)) ; } EVar7 = (EntityPtr)GetTrinketMultiplier(this,3); local_44 = (EntityPtr)0x3; - if ((int)EVar7 < 3) { + if (GHIDRA_INT(EVar7) < 3) { local_44 = EVar7; } - if (((int)local_44 < 1) || - (this->_activeDesc[(int)local_60]._charge + (int)puVar11 < - (int)local_68 - (int)local_44)) { - AddActiveCharge(this,(int)puVar11,(int)local_60,0,0,0); + if ((GHIDRA_INT(local_44) < 1) || + (this->_activeDesc[GHIDRA_INT(local_60)]._charge + GHIDRA_INT(puVar11) < + GHIDRA_INT(local_68) - GHIDRA_INT(local_44))) { + AddActiveCharge(this,GHIDRA_INT(puVar11),GHIDRA_INT(local_60),0,0,0); } else { - iVar6 = AddActiveCharge(this,(int)local_44 + (int)puVar11,(int)local_60,0,0,0); + iVar6 = AddActiveCharge(this,GHIDRA_INT(local_44) + GHIDRA_INT(puVar11),GHIDRA_INT(local_60),0,0,0); manager = g_manager; if (iVar6 != 0) { local_44 = (EntityPtr)0xaa; seed_fart_sound_override((int *)&local_44); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_44,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_44),1.0,2,0,1.0,0.0); uVar13 = Random(); uVar20 = 0; pTVar18 = &IsaacRepentancePlus::Entity_Effect::RTTI_Type_Descriptor; @@ -35451,18 +35451,18 @@ LAB_007a907b: puVar11 = local_60; } else if (iVar6 == 1) { - FullCharge(this,(int)puVar11,0,0); + FullCharge(this,GHIDRA_INT(puVar11),0,0); } } } LAB_007a9338: - local_60 = (uint *)((int)puVar11 + 1); + local_60 = (uint *)(GHIDRA_INT(puVar11) + 1); } while (local_60 < &DAT_00000004); } bVar5 = HasTrinket(this,0x2e,0); if (bVar5 != 0) { - uVar13 = 10 - (int)(this->_luck * 0.5); - if ((int)uVar13 < 1) { + uVar13 = 10 - GHIDRA_INT((this->_luck * 0.5)); + if (GHIDRA_INT(uVar13) < 1) { uVar13 = 1; } if ((uVar13 == 0) || (uVar8 = Random(), uVar8 % uVar13 == 0)) { @@ -35476,7 +35476,7 @@ LAB_007a9338: local_44 = (EntityPtr)0x266; } seed_fart_sound_override((int *)&local_44); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_44,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_44),1.0,2,0,1.0,0.0); uVar13 = Random(); uVar20 = 0; pTVar18 = &IsaacRepentancePlus::Entity_Effect::RTTI_Type_Descriptor; @@ -35496,38 +35496,38 @@ LAB_007a9338: } if (0 < this->_rottenHearts) { iVar6 = 0; - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&local_54,3,0x2b,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&local_54,3,0x2b,-1,0,0); EVar7 = (EntityPtr)0x0; ehState = 0; if ((EntityPtr)local_54._size != (EntityPtr)0x0) { do { - iVar2 = *(int *)((char *)local_54._data + (int)EVar7 * 4); + iVar2 = *(int *)((char *)local_54._data + GHIDRA_INT(EVar7) * 4); if (((iVar2 != 0) && (*(int *)(iVar2 + 0x28) == 3)) && (*(Entity_Player **)(iVar2 + 0x410) == this)) { iVar6 = iVar6 + 1; } - EVar7 = (EntityPtr)((int)EVar7 + 1); - } while ((uint)EVar7 < (uint)local_54._size); + EVar7 = (EntityPtr)(GHIDRA_INT(EVar7) + 1); + } while (GHIDRA_UINT(EVar7) < GHIDRA_UINT(local_54._size)); } iVar6 = this->_rottenHearts * 2 - iVar6; if (0 < iVar6) { AddBlueFlies(this,iVar6,&this->_pos,(Entity *)0x0); } ehState = 0xffffffff; - if (local_54._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_54) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if ((WeightedOutcomePicker)local_54._data != (WeightedOutcomePicker)0x0) { uVar13 = *(uint *)((char *)local_54._data + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar13; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar13; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar13); - free((uint *)((int)local_54._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar13)); + free((uint *)(GHIDRA_INT(local_54._data) + -4)); } ehState = 0xffffffff; } @@ -35539,17 +35539,17 @@ LAB_007a9338: if ((*(int *)*piVar9 == 0) && (((int *)*piVar9)[1] == 0x70)) { if (piVar9[1] == 1) { pvVar12 = (g_manager->_itemConfig)._nullItems._begin; - if ((0x70 < (int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar12 >> 2) && + if ((0x70 < GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar12) >> 2) && (itemConfig = *(ItemConfig_Item **)((char *)pvVar12 + 0x1c0), itemConfig != (ItemConfig_Item *)0x0)) { - local_54._4_8_ = (ulonglong)(uint)itemConfig->maxCooldown << 0x20; + (*(undefined8 *)((char *)&(local_54) + 0x4)) = (ulonglong)GHIDRA_UINT(itemConfig->maxCooldown) << 0x20; local_54._size = 0; - local_54._0_4_ = itemConfig; + (*(undefined4 *)((char *)&(local_54) + 0x0)) = itemConfig; ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddEffect(&local_54,1,1); } pvVar12 = this->_backupPlayer; if ((pvVar12 != (void *)0x0) && - (local_5c = (TemporaryEffects *)((int)pvVar12 + 0x1508), + (local_5c = (TemporaryEffects *)(GHIDRA_INT(pvVar12) + 0x1508), *(char *)((char *)pvVar12 + 0x1519) == '\0')) { piVar9 = *(int **)((char *)pvVar12 + 0x150c); goto joined_r0x007a9607; @@ -35581,16 +35581,16 @@ LAB_007a9679: iVar6 = 0; LAB_007a96f8: pvVar12 = (g_manager->_itemConfig)._collectibles._begin; - if ((699 < (int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar12 >> 2) && + if ((699 < GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar12) >> 2) && (itemConfig = *(ItemConfig_Item **)((char *)pvVar12 + 0xaec), itemConfig != (ItemConfig_Item *)0x0)) { - local_54._4_8_ = (ulonglong)(uint)itemConfig->maxCooldown << 0x20; + (*(undefined8 *)((char *)&(local_54) + 0x4)) = (ulonglong)GHIDRA_UINT(itemConfig->maxCooldown) << 0x20; local_54._size = 0; - local_54._0_4_ = itemConfig; + (*(undefined4 *)((char *)&(local_54) + 0x0)) = itemConfig; ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddEffect(&local_54,0,1); } pvVar12 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar12 >> 2 < 700) { + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar12) >> 2 < 700) { itemConfig = (ItemConfig_Item *)0x0; } else { @@ -35598,7 +35598,7 @@ LAB_007a96f8: } RemoveCostume(this,itemConfig); pvVar12 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar12 >> 2 < 0x61) { + if (GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar12) >> 2 < 0x61) { itemConfig = (ItemConfig_Item *)0x0; } else { @@ -35606,7 +35606,7 @@ LAB_007a96f8: } RemoveCostume(this,itemConfig); pvVar12 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar12 >> 2 < 0x62) { + if (GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar12) >> 2 < 0x62) { itemConfig = (ItemConfig_Item *)0x0; } else { @@ -35614,7 +35614,7 @@ LAB_007a96f8: } RemoveCostume(this,itemConfig); pvVar12 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar12 >> 2 < 99) { + if (GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar12) >> 2 < 99) { itemConfig = (ItemConfig_Item *)0x0; } else { @@ -35622,7 +35622,7 @@ LAB_007a96f8: } RemoveCostume(this,itemConfig); pvVar12 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar12 >> 2 < 100) { + if (GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar12) >> 2 < 100) { itemConfig = (ItemConfig_Item *)0x0; } else { @@ -35632,7 +35632,7 @@ LAB_007a96f8: switch(iVar6) { case 0: pvVar12 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar12 >> 2 < 0x61) { + if (GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar12) >> 2 < 0x61) { itemConfig = (ItemConfig_Item *)0x0; } else { @@ -35641,7 +35641,7 @@ LAB_007a96f8: break; case 1: pvVar12 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar12 >> 2 < 0x62) { + if (GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar12) >> 2 < 0x62) { itemConfig = (ItemConfig_Item *)0x0; } else { @@ -35650,7 +35650,7 @@ LAB_007a96f8: break; case 2: pvVar12 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar12 >> 2 < 99) { + if (GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar12) >> 2 < 99) { itemConfig = (ItemConfig_Item *)0x0; } else { @@ -35660,7 +35660,7 @@ LAB_007a96f8: case 3: case 4: pvVar12 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar12 >> 2 < 100) { + if (GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar12) >> 2 < 100) { itemConfig = (ItemConfig_Item *)0x0; } else { @@ -35679,8 +35679,8 @@ switchD_007a9848_default: fStack_24 = 0.0; local_1c = 0.0; local_18 = 0.0; - local_40._0_4_ = 0.1; - local_40._4_4_ = 0.1; + (*(undefined4 *)((char *)&(local_40) + 0x0)) = 0.1; + (*(undefined4 *)((char *)&(local_40) + 0x4)) = 0.1; fStack_38 = 0.1; fStack_34 = 1.0; this->SetColor(local_40,6,0xff,1,1); @@ -35690,7 +35690,7 @@ LAB_007a9930: if (bVar5 != 0) { local_5c = (TemporaryEffects *)GetTrinketMultiplier(this,0xa3); local_44 = (EntityPtr)0x0; - if (0 < (int)local_5c) { + if (0 < GHIDRA_INT(local_5c)) { do { local_54._data = (void *)0x0; local_54._capacity = 0; @@ -35700,12 +35700,12 @@ LAB_007a9930: local_74.y = 2.8026e-44; std::vector<8byte>::_Emplace_reallocate(0,&local_74); uVar13 = 0; - uVar8 = local_54._capacity - (int)local_54._data >> 3; + uVar8 = local_54._capacity - GHIDRA_INT(local_54._data) >> 3; WVar10 = (WeightedOutcomePicker)local_54._data; if (uVar8 != 0) { do { if (*(int *)((char *)local_54._data + uVar13 * 8) == 1) { - piVar9 = (int *)((int)local_54._data + uVar13 * 8 + 4); + piVar9 = (int *)(GHIDRA_INT(local_54._data) + uVar13 * 8 + 4); *piVar9 = *piVar9 + 6; EVar7 = (EntityPtr)local_54._capacity; if (*piVar9 < 0) { @@ -35731,11 +35731,11 @@ LAB_007a9930: } LAB_007a9a17: uVar13 = 0; - uVar8 = (int)EVar7 - (int)WVar10 >> 3; + uVar8 = GHIDRA_INT(EVar7) - GHIDRA_INT(WVar10) >> 3; if (uVar8 != 0) { do { if (*(int *)((char *)WVar10 + uVar13 * 8) == 2) { - piVar9 = (int *)((int)WVar10 + uVar13 * 8 + 4); + piVar9 = (int *)(GHIDRA_INT(WVar10) + uVar13 * 8 + 4); *piVar9 = *piVar9 + 6; if (*piVar9 < 0) { *(undefined4 *)((char *)WVar10 + uVar13 * 8 + 4) = 0; @@ -35755,16 +35755,16 @@ LAB_007a9a17: else { *(undefined4 *)EVar7 = 2; *(undefined4 *)((char *)EVar7 + 4) = 6; - local_54._capacity = (int)EVar7 + 8; - EVar7 = (EntityPtr)((int)EVar7 + 8); + local_54._capacity = GHIDRA_INT(EVar7) + 8; + EVar7 = (EntityPtr)(GHIDRA_INT(EVar7) + 8); } LAB_007a9a7b: uVar13 = 0; - uVar8 = (int)EVar7 - (int)WVar10 >> 3; + uVar8 = GHIDRA_INT(EVar7) - GHIDRA_INT(WVar10) >> 3; if (uVar8 != 0) { do { if (*(int *)((char *)WVar10 + uVar13 * 8) == 3) { - piVar9 = (int *)((int)WVar10 + uVar13 * 8 + 4); + piVar9 = (int *)(GHIDRA_INT(WVar10) + uVar13 * 8 + 4); *piVar9 = *piVar9 + 1; if (*piVar9 < 0) { *(undefined4 *)((char *)WVar10 + uVar13 * 8 + 4) = 0; @@ -35784,16 +35784,16 @@ LAB_007a9a7b: else { *(undefined4 *)EVar7 = 3; *(undefined4 *)((char *)EVar7 + 4) = 1; - local_54._capacity = (int)EVar7 + 8; - EVar7 = (EntityPtr)((int)EVar7 + 8); + local_54._capacity = GHIDRA_INT(EVar7) + 8; + EVar7 = (EntityPtr)(GHIDRA_INT(EVar7) + 8); } LAB_007a9ae5: uVar13 = 0; - uVar8 = (int)EVar7 - (int)WVar10 >> 3; + uVar8 = GHIDRA_INT(EVar7) - GHIDRA_INT(WVar10) >> 3; if (uVar8 != 0) { do { if (*(int *)((char *)WVar10 + uVar13 * 8) == 4) { - piVar9 = (int *)((int)WVar10 + uVar13 * 8 + 4); + piVar9 = (int *)(GHIDRA_INT(WVar10) + uVar13 * 8 + 4); *piVar9 = *piVar9 + 1; if (*piVar9 < 0) { *(undefined4 *)((char *)WVar10 + uVar13 * 8 + 4) = 0; @@ -35813,16 +35813,16 @@ LAB_007a9ae5: else { *(undefined4 *)EVar7 = 4; *(undefined4 *)((char *)EVar7 + 4) = 1; - local_54._capacity = (int)EVar7 + 8; - EVar7 = (EntityPtr)((int)EVar7 + 8); + local_54._capacity = GHIDRA_INT(EVar7) + 8; + EVar7 = (EntityPtr)(GHIDRA_INT(EVar7) + 8); } LAB_007a9b52: uVar13 = 0; - uVar8 = (int)EVar7 - (int)WVar10 >> 3; + uVar8 = GHIDRA_INT(EVar7) - GHIDRA_INT(WVar10) >> 3; if (uVar8 != 0) { do { if (*(int *)((char *)WVar10 + uVar13 * 8) == 5) { - piVar9 = (int *)((int)WVar10 + uVar13 * 8 + 4); + piVar9 = (int *)(GHIDRA_INT(WVar10) + uVar13 * 8 + 4); *piVar9 = *piVar9 + 1; if (*piVar9 < 0) { *(undefined4 *)((char *)WVar10 + uVar13 * 8 + 4) = 0; @@ -35842,16 +35842,16 @@ LAB_007a9b52: else { *(undefined4 *)EVar7 = 5; *(undefined4 *)((char *)EVar7 + 4) = 1; - local_54._capacity = (int)EVar7 + 8; - EVar7 = (EntityPtr)((int)EVar7 + 8); + local_54._capacity = GHIDRA_INT(EVar7) + 8; + EVar7 = (EntityPtr)(GHIDRA_INT(EVar7) + 8); } LAB_007a9bc0: uVar13 = 0; - uVar8 = (int)EVar7 - (int)WVar10 >> 3; + uVar8 = GHIDRA_INT(EVar7) - GHIDRA_INT(WVar10) >> 3; if (uVar8 != 0) { do { if (*(int *)((char *)WVar10 + uVar13 * 8) == 6) { - piVar9 = (int *)((int)WVar10 + uVar13 * 8 + 4); + piVar9 = (int *)(GHIDRA_INT(WVar10) + uVar13 * 8 + 4); *piVar9 = *piVar9 + 1; if (*piVar9 < 0) { *(undefined4 *)((char *)WVar10 + uVar13 * 8 + 4) = 0; @@ -35869,11 +35869,11 @@ LAB_007a9bc0: else { *(undefined4 *)EVar7 = 6; *(undefined4 *)((char *)EVar7 + 4) = 1; - local_54._capacity = (int)((int)EVar7 + 8); + local_54._capacity = GHIDRA_INT((GHIDRA_INT(EVar7) + 8)); } LAB_007a9c21: pvVar12 = (this->_trinketRNGs)._begin; - puVar11 = (uint *)((int)pvVar12 + 0xa30); + puVar11 = (uint *)(GHIDRA_INT(pvVar12) + 0xa30); uVar13 = *puVar11; if (uVar13 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -35896,25 +35896,25 @@ LAB_007a9c21: Entity_Familiar::ThrowDip(uVar13,&this->_pos,(Entity *)this); ehState = 0xffffffff; if ((WeightedOutcomePicker)local_54._data != (WeightedOutcomePicker)0x0) { - uVar13 = (local_54._size - (int)local_54._data >> 3) * 8; + uVar13 = (local_54._size - GHIDRA_INT(local_54._data) >> 3) * 8; WVar10 = (WeightedOutcomePicker)local_54._data; if (0xfff < uVar13) { WVar10 = *(WeightedOutcomePicker *)((char *)local_54._data + -4); uVar13 = uVar13 + 0x23; - if (0x1f < (uint)((int)local_54._data + (-4 - (int)WVar10))) goto LAB_007aa32a; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_54._data) + (-4 - GHIDRA_INT(WVar10))))) goto LAB_007aa32a; } operator_delete((void *)WVar10,uVar13); local_54._data = (void *)0x0; local_54._capacity = 0; local_54._size = 0; } - local_44 = (EntityPtr)((int)local_44 + 1); - } while ((int)local_44 < (int)local_5c); + local_44 = (EntityPtr)(GHIDRA_INT(local_44) + 1); + } while (GHIDRA_INT(local_44) < GHIDRA_INT(local_5c)); } } bVar5 = HasTrinket(this,0xa7,0); if (bVar5 != 0) { - local_60 = (uint *)((int)(this->_trinketRNGs)._begin + 0xa70); + local_60 = (uint *)(GHIDRA_INT((this->_trinketRNGs)._begin) + 0xa70); iVar6 = GetTrinketMultiplier(this,0xa7); local_5c = (TemporaryEffects *)(5 - iVar6); uVar13 = *local_60; @@ -35931,9 +35931,9 @@ LAB_007a9c21: uVar13 = uVar13 ^ uVar13 << ((byte)local_60[2] & 0x1f); uVar13 = uVar13 ^ uVar13 >> ((byte)local_60[3] & 0x1f); *local_60 = uVar13; - if ((local_5c == (TemporaryEffects *)0x0) || (uVar13 % (uint)local_5c == 0)) { + if ((local_5c == (TemporaryEffects *)0x0) || (uVar13 % GHIDRA_UINT(local_5c) == 0)) { pvVar12 = (this->_trinketRNGs)._begin; - puVar11 = (uint *)((int)pvVar12 + 0xa70); + puVar11 = (uint *)(GHIDRA_INT(pvVar12) + 0xa70); uVar13 = *puVar11; if (uVar13 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -35950,7 +35950,7 @@ LAB_007a9c21: uVar13 = uVar13 << ((byte)*(undefined4 *)((char *)pvVar12 + 0xa78) & 0x1f) ^ uVar13; local_5c = (TemporaryEffects *) (uVar13 >> ((byte)*(undefined4 *)((char *)pvVar12 + 0xa7c) & 0x1f) ^ uVar13); - *puVar11 = (uint)local_5c; + *puVar11 = GHIDRA_UINT(local_5c); local_60 = (uint *)&DAT_00000006; if (local_5c == (TemporaryEffects *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -35958,15 +35958,15 @@ LAB_007a9c21: (*pcVar3)(); return; } - uVar13 = (uint)local_5c >> 1 ^ (uint)local_5c; + uVar13 = GHIDRA_UINT(local_5c) >> 1 ^ GHIDRA_UINT(local_5c); uVar13 = uVar13 << 0xb ^ uVar13; local_68 = (uint *)(uVar13 >> 6 ^ uVar13); local_58 = (Game *)0x115; - if (((uint)local_68 & 3) != 0) { + if ((GHIDRA_UINT(local_68) & 3) != 0) { local_58 = (Game *)0xe3; } uVar13 = Random(); - fVar15 = (float)((double)(int)uVar13 + __uint_to_double_fixup[-((int)uVar13 >> 0x1f)]) * + fVar15 = (float)((double)GHIDRA_INT(uVar13) + __uint_to_double_fixup[-(GHIDRA_INT(uVar13) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_5c = (TemporaryEffects *)(fVar15 + fVar15); local_44 = (EntityPtr)sin((float)local_5c); @@ -35979,10 +35979,10 @@ LAB_007a9c21: (*pcVar3)(); return; } - uVar13 = (uint)local_68 >> ((byte)local_54._data & 0x1f) ^ (uint)local_68; + uVar13 = GHIDRA_UINT(local_68) >> ((byte)local_54._data & 0x1f) ^ GHIDRA_UINT(local_68); uVar13 = uVar13 << ((byte)local_54._capacity & 0x1f) ^ uVar13; spawnedEntity = - ((Game *)(g_game))->Game::Spawn((uint)local_58,0,&local_74,&g_vectorZero,(Entity *)this,0, + ((Game *)(g_game))->Game::Spawn(GHIDRA_UINT(local_58),0,&local_74,&g_vectorZero,(Entity *)this,0, uVar13 >> ((byte)local_60 & 0x1f) ^ uVar13); if ((spawnedEntity == (Entity *)0x0) || (((*(int *)&g_game->_deathmatchManager < 2 || (spawnedEntity->_type != 1)) && @@ -35993,7 +35993,7 @@ LAB_007a9c21: local_20 = g_vectorZero.y; fStack_2c = g_vectorZero.x; fStack_24 = g_vectorZero.x; - local_40._4_4_ = 0.0; + (*(undefined4 *)((char *)&(local_40) + 0x4)) = 0.0; fStack_38 = 0.0; fStack_34 = 0.0; local_30 = 0.0; @@ -36008,8 +36008,8 @@ LAB_007a9c21: local_18 = 0.0; spawnedEntity->_maxHitPoints = fVar15; spawnedEntity->_health = fVar15; - local_40._0_4_ = 1.0; - local_40._4_4_ = 1.0; + (*(undefined4 *)((char *)&(local_40) + 0x0)) = 1.0; + (*(undefined4 *)((char *)&(local_40) + 0x4)) = 1.0; fStack_38 = 1.0; fStack_34 = 1.0; local_30 = 0.0; @@ -36019,18 +36019,18 @@ LAB_007a9c21: uVar13 = Random(); Game::SpawnParticles (g_game,&local_74,0x23,4, - (float)((double)(int)uVar13 + __uint_to_double_fixup[-((int)uVar13 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar13) + __uint_to_double_fixup[-(GHIDRA_INT(uVar13) >> 0x1f)]) * 2.3283064e-10 * 3.0 + 2.0,(ColorMod *)local_40,100000.0,0); uVar13 = Random(); local_44 = (EntityPtr) - ((float)((double)(int)uVar13 + __uint_to_double_fixup[-((int)uVar13 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar13) + __uint_to_double_fixup[-(GHIDRA_INT(uVar13) >> 0x1f)]) * 2.3283064e-10 * 3.0 + 2.0); uVar13 = Random(); iVar6 = (uVar13 & 1) + 2; do { uVar13 = Random(); uVar8 = Random(); - fVar15 = (float)((double)(int)uVar8 + __uint_to_double_fixup[-((int)uVar8 >> 0x1f)]) * + fVar15 = (float)((double)GHIDRA_INT(uVar8) + __uint_to_double_fixup[-(GHIDRA_INT(uVar8) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_58 = (Game *)(fVar15 + fVar15); local_5c = (TemporaryEffects *)sin((float)local_58); @@ -36038,10 +36038,10 @@ LAB_007a9c21: local_80.x = local_80.x * (float)local_44; local_80.y = (float)local_5c * 0.5 * (float)local_44; spawnedEntity = ((Game *)(g_game))->Game::Spawn(1000,5,&local_74,&local_80,(Entity *)0x0,1,uVar13); - uVar16 = *(undefined4 *)((int)&spawnedEntity->_flags + 4); + uVar16 = *(undefined4 *)(GHIDRA_INT(&spawnedEntity->_flags) + 4); iVar2 = *(int *)spawnedEntity; - *(uint *)&spawnedEntity->_flags = (uint)spawnedEntity->_flags | 0x10000; - *(undefined4 *)((int)&spawnedEntity->_flags + 4) = uVar16; + *(uint *)&spawnedEntity->_flags = GHIDRA_UINT(spawnedEntity->_flags) | 0x10000; + *(undefined4 *)(GHIDRA_INT(&spawnedEntity->_flags) + 4) = uVar16; (**(code **)(iVar2 + 0xc))(); iVar6 = iVar6 + -1; } while (iVar6 != 0); @@ -36059,11 +36059,11 @@ LAB_007a9c21: pGVar14 = (Game *)((5 - iVar6) * 2); } local_58 = (Game *)0x1; - if (1 < (int)pGVar14) { + if (1 < GHIDRA_INT(pGVar14)) { local_58 = pGVar14; } pvVar12 = (this->_trinketRNGs)._begin; - puVar11 = (uint *)((int)pvVar12 + 0xaa0); + puVar11 = (uint *)(GHIDRA_INT(pvVar12) + 0xaa0); uVar13 = *puVar11; if (uVar13 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -36078,7 +36078,7 @@ LAB_007a9c21: uVar13 = uVar13 ^ uVar13 << ((byte)*(undefined4 *)((char *)pvVar12 + 0xaa8) & 0x1f); uVar13 = uVar13 ^ uVar13 >> ((byte)*(undefined4 *)((char *)pvVar12 + 0xaac) & 0x1f); *puVar11 = uVar13; - if ((local_58 == (Game *)0x0) || (uVar13 % (uint)local_58 == 0)) { + if ((local_58 == (Game *)0x0) || (uVar13 % GHIDRA_UINT(local_58) == 0)) { EVar7 = (EntityPtr)0x0; local_44 = (EntityPtr)0x0; local_54._data = (void *)0x0; @@ -36087,7 +36087,7 @@ LAB_007a9c21: ehState = 3; pGVar14 = (Game *)0x0; do { - bVar5 = ((Level *)((Level *)g_game))->Level::CanSpawnDoorOutline(g_game->_currentRoomIdx,(uint)pGVar14); + bVar5 = ((Level *)((Level *)g_game))->Level::CanSpawnDoorOutline(g_game->_currentRoomIdx,GHIDRA_UINT(pGVar14)); if (bVar5 != 0) { local_58 = pGVar14; if (EVar7 == local_44) { @@ -36097,17 +36097,17 @@ LAB_007a9c21: } else { *(Game **)EVar7 = pGVar14; - local_54._capacity = (int)EVar7 + 4; - EVar7 = (EntityPtr)((int)EVar7 + 4); + local_54._capacity = GHIDRA_INT(EVar7) + 4; + EVar7 = (EntityPtr)(GHIDRA_INT(EVar7) + 4); } } this = player; - pGVar14 = (Game *)((int)&pGVar14->_stage + 1); + pGVar14 = (Game *)(GHIDRA_INT(&pGVar14->_stage) + 1); } while (pGVar14 < (Game *)&DAT_00000008); if ((EntityPtr)local_54._data != EVar7) { local_58 = g_game; - local_68 = (uint *)((int)(player->_trinketRNGs)._begin + 0xaa0); - uVar13 = (int)EVar7 - (int)local_54._data >> 2; + local_68 = (uint *)(GHIDRA_INT((player->_trinketRNGs)._begin) + 0xaa0); + uVar13 = GHIDRA_INT(EVar7) - GHIDRA_INT(local_54._data) >> 2; local_60 = (uint *)*local_68; if (local_60 == (uint *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -36118,7 +36118,7 @@ LAB_007a9c21: return; } } - uVar8 = (uint)local_60 >> ((byte)local_68[1] & 0x1f) ^ (uint)local_60; + uVar8 = GHIDRA_UINT(local_60) >> ((byte)local_68[1] & 0x1f) ^ GHIDRA_UINT(local_60); uVar8 = uVar8 ^ uVar8 << ((byte)local_68[2] & 0x1f); uVar8 = uVar8 ^ uVar8 >> ((byte)local_68[3] & 0x1f); *local_68 = uVar8; @@ -36134,12 +36134,12 @@ LAB_007a9c21: } ehState = 0xffffffff; if ((EntityPtr)local_54._data != (EntityPtr)0x0) { - uVar13 = ((int)local_44 - (int)local_54._data >> 2) * 4; + uVar13 = (GHIDRA_INT(local_44) - GHIDRA_INT(local_54._data) >> 2) * 4; EVar7 = (EntityPtr)local_54._data; if (0xfff < uVar13) { EVar7 = *(EntityPtr *)((char *)local_54._data + -4); uVar13 = uVar13 + 0x23; - if (0x1f < ((int)local_54._data - (int)EVar7) - 4U) { + if (0x1f < (GHIDRA_INT(local_54._data) - GHIDRA_INT(EVar7)) - 4U) { LAB_007aa32a: ehState = 0xffffffff; /* WARNING: Subroutine does not return */ @@ -36185,42 +36185,42 @@ LAB_007aa32a: if (local_44 == (EntityPtr)0x0) { local_44 = EVar7; LAB_007aa43d: - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&local_54,3,-1,-1,1,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&local_54,3,-1,-1,1,0); EVar7 = (EntityPtr)0x0; ehState = 4; if ((EntityPtr)local_54._size != (EntityPtr)0x0) { WVar10 = (WeightedOutcomePicker)local_54._data; do { - familiar = *(Entity_Familiar **)((char *)WVar10 + (int)EVar7 * 4); + familiar = *(Entity_Familiar **)((char *)WVar10 + GHIDRA_INT(EVar7) * 4); if (familiar->_player == this) { ((Entity_Familiar *)(familiar))->Entity_Familiar::TriggerRoomClear(); WVar10 = (WeightedOutcomePicker)local_54._data; } - EVar7 = (EntityPtr)((int)EVar7 + 1); - } while ((uint)EVar7 < (uint)local_54._size); + EVar7 = (EntityPtr)(GHIDRA_INT(EVar7) + 1); + } while (GHIDRA_UINT(EVar7) < GHIDRA_UINT(local_54._size)); } ehState = 0xffffffff; - if (local_54._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_54) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if ((WeightedOutcomePicker)local_54._data != (WeightedOutcomePicker)0x0) { uVar13 = *(uint *)((char *)local_54._data + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar13; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar13; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar13); - free((uint *)((int)local_54._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar13)); + free((uint *)(GHIDRA_INT(local_54._data) + -4)); } } ehState = 0xffffffff; } else if (local_44 == EVar7) goto LAB_007aa43d; EVar7 = local_44; - UseActiveItem(this,(short *)((int)&local_60 + 2),0x2c7,0,-1,0); + UseActiveItem(this,(short *)(GHIDRA_INT(&local_60) + 2),0x2c7,0,-1,0); if ((EVar7 == (EntityPtr)this->_backupPlayer) && (this->_isCoopGhost == 0)) { *(undefined4 *)((char *)EVar7 + 0x15c0) = 0; TriggerRoomClear((Entity_Player *)EVar7); @@ -36245,13 +36245,13 @@ LAB_007aa526: piVar9 != (this->_temporaryeffects)._effects._end; piVar9 = piVar9 + 4) { if ((*(int *)*piVar9 == 2) && (((int *)*piVar9)[1] == 0xa2)) { pvVar12 = (g_manager->_itemConfig)._trinkets._begin; - if ((0x288 < (int)((int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar12 & 0xfffffffcU - )) && + if ((0x288 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar12) & 0xfffffffcU + ))) && (itemConfig = *(ItemConfig_Item **)((char *)pvVar12 + 0x288), itemConfig != (ItemConfig_Item *)0x0)) { - local_54._4_8_ = (ulonglong)(uint)itemConfig->maxCooldown << 0x20; + (*(undefined8 *)((char *)&(local_54) + 0x4)) = (ulonglong)GHIDRA_UINT(itemConfig->maxCooldown) << 0x20; local_54._size = 0; - local_54._0_4_ = itemConfig; + (*(undefined4 *)((char *)&(local_54) + 0x0)) = itemConfig; ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::RemoveEffect(&local_54,1); } goto LAB_007aa725; @@ -36261,7 +36261,7 @@ LAB_007aa526: bVar5 = HasTrinket(this,0xa2,0); if (bVar5 != 0) { pvVar12 = (this->_trinketRNGs)._begin; - puVar11 = (uint *)((int)pvVar12 + 0xa20); + puVar11 = (uint *)(GHIDRA_INT(pvVar12) + 0xa20); iVar6 = GetTrinketMultiplier(this,0xa2); uVar13 = *puVar11; local_58 = (Game *)0x1; @@ -36281,15 +36281,15 @@ LAB_007aa526: uVar13 = uVar13 ^ uVar13 << ((byte)*(undefined4 *)((char *)pvVar12 + 0xa28) & 0x1f); uVar13 = uVar13 ^ uVar13 >> ((byte)*(undefined4 *)((char *)pvVar12 + 0xa2c) & 0x1f); *puVar11 = uVar13; - if ((((local_58 == (Game *)0x0) || (uVar13 % (uint)local_58 == 0)) && + if ((((local_58 == (Game *)0x0) || (uVar13 % GHIDRA_UINT(local_58) == 0)) && (pvVar12 = (g_manager->_itemConfig)._trinkets._begin, - 0x288 < (int)((int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar12 & 0xfffffffcU))) + 0x288 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar12) & 0xfffffffcU)))) && (itemConfig = *(ItemConfig_Item **)((char *)pvVar12 + 0x288), itemConfig != (ItemConfig_Item *)0x0)) { local_58 = (Game *)itemConfig->maxCooldown; - local_54._4_8_ = ZEXT48(local_58) << 0x20; + (*(undefined8 *)((char *)&(local_54) + 0x4)) = ZEXT48(local_58) << 0x20; local_54._size = 0; - local_54._0_4_ = itemConfig; + (*(undefined4 *)((char *)&(local_54) + 0x0)) = itemConfig; if ((this->_temporaryeffects)._disabled == 0) { piVar9 = (this->_temporaryeffects)._effects._end; for (effect = (this->_temporaryeffects)._effects._begin; effect != piVar9; @@ -36297,7 +36297,7 @@ LAB_007aa526: if ((ItemConfig_Item *)*effect == itemConfig) { if (effect != piVar9) { effect[1] = effect[1] + 2; - effect[2] = (int)local_58->_roomList[0]._doors + effect[2] + -0x30; + effect[2] = GHIDRA_INT(local_58->_roomList[0]._doors) + effect[2] + -0x30; goto LAB_007aa715; } break; @@ -36308,21 +36308,21 @@ LAB_007aa526: std::vector::_Emplace_reallocate(piVar9,&local_54); } else { - *piVar9 = (int)itemConfig; + *piVar9 = GHIDRA_INT(itemConfig); piVar9[1] = 0; - piVar9[2] = (int)local_58; + piVar9[2] = GHIDRA_INT(local_58); piVar9[3] = 0; ppvVar1 = &(this->_temporaryeffects)._effects._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 0x10); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 0x10); } - itemConfig = (ItemConfig_Item *)local_54._0_4_; + itemConfig = (*(undefined4 *)((char *)&((ItemConfig_Item *)local_54) + 0x0)); pvVar12 = (this->_temporaryeffects)._effects._begin; *(undefined4 *) - ((((int)(this->_temporaryeffects)._effects._end - (int)pvVar12 & 0xfffffff0U) - 0xc) + - (int)pvVar12) = 2; + (((GHIDRA_INT((this->_temporaryeffects)._effects._end) - GHIDRA_INT(pvVar12) & 0xfffffff0U) - 0xc) + + GHIDRA_INT(pvVar12)) = 2; effectsOwner = (this->_temporaryeffects)._player; if (effectsOwner != (Entity_Player *)0x0) { - AddCostume(effectsOwner,(ItemConfig_Item *)local_54._0_4_,0); + AddCostume(effectsOwner,(*(undefined4 *)((char *)&((ItemConfig_Item *)local_54) + 0x0)),0); } LAB_007aa715: (this->_temporaryeffects)._cacheFlags = @@ -36333,13 +36333,13 @@ LAB_007aa715: } LAB_007aa725: trigger_set_dispatch(&this->_proceduralItems,5,(Entity *)0x0,&this->_pos,&g_vectorZero); - if ((int)(this->_pendingWisps)._end - (int)(this->_pendingWisps)._begin >> 2 != 0) { + if (GHIDRA_INT((this->_pendingWisps)._end) - GHIDRA_INT((this->_pendingWisps)._begin) >> 2 != 0) { uVar13 = 0; do { - AddWisp(this,*(int *)((int)(this->_pendingWisps)._begin + uVar13 * 4),&this->_pos,0,0); + AddWisp(this,*(int *)(GHIDRA_INT((this->_pendingWisps)._begin) + uVar13 * 4),&this->_pos,0,0); uVar13 = uVar13 + 1; pvVar12 = (this->_pendingWisps)._begin; - } while (uVar13 < (uint)((int)(this->_pendingWisps)._end - (int)pvVar12 >> 2)); + } while (uVar13 < GHIDRA_UINT((GHIDRA_INT((this->_pendingWisps)._end) - GHIDRA_INT(pvVar12) >> 2))); (this->_pendingWisps)._end = pvVar12; } ExceptionList = prevExceptionList; @@ -36349,12 +36349,12 @@ joined_r0x007a9607: if ((*(int *)*piVar9 == 0) && (((int *)*piVar9)[1] == 0x70)) { if ((piVar9[1] == 1) && ((pvVar12 = (g_manager->_itemConfig)._nullItems._begin, - 0x70 < (int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar12 >> 2 && + 0x70 < GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar12) >> 2 && (itemConfig = *(ItemConfig_Item **)((char *)pvVar12 + 0x1c0), itemConfig != (ItemConfig_Item *)0x0)))) { - local_54._4_8_ = (ulonglong)(uint)itemConfig->maxCooldown << 0x20; + (*(undefined8 *)((char *)&(local_54) + 0x4)) = (ulonglong)GHIDRA_UINT(itemConfig->maxCooldown) << 0x20; local_54._size = 0; - local_54._0_4_ = itemConfig; + (*(undefined4 *)((char *)&(local_54) + 0x0)) = itemConfig; ((TemporaryEffects *)(local_5c))->TemporaryEffects::AddEffect(&local_54,1,1); } goto LAB_007a9679; @@ -36366,7 +36366,7 @@ joined_r0x007a9607: // 007aa7c0 byte Entity_Player::HasPlayerForm(int playerForm) { - if ((((this->_hasCurseMistEffect == 0) && (this->_isCoopGhost == 0)) && ((uint)playerForm < 0x10)) + if ((((this->_hasCurseMistEffect == 0) && (this->_isCoopGhost == 0)) && (GHIDRA_UINT(playerForm) < 0x10)) && (2 < this->_playerForms[playerForm])) { return 1; } @@ -36429,14 +36429,14 @@ void Entity_Player::AnimatePickup(ANM2 *param_2, byte param_3, byte *param_4) local_14 = (byte ****)0xffffffff; puStack_18 = &LAB_00affae0; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(spritePath + 0xb); + local_24 = __security_cookie ^ GHIDRA_UINT((spritePath + 0xb)); ExceptionList = &local_1c; savedAnimName = param_4; savedSprite = param_2; cleanupFlags = 0; player = this; if ((g_manager->_netplayManager == *(NetplayManager *)(g_manager + 1)) || - ((uint)((int)*(NetplayManager *)(g_manager + 1) - (int)g_manager->_netplayManager >> 2) < 2)) { + (GHIDRA_UINT((GHIDRA_INT(*(NetplayManager *)(g_manager + 1)) - GHIDRA_INT(g_manager->_netplayManager) >> 2)) < 2)) { LAB_007ab226: puStack_20 = (undefined1 *)(spritePath + 0xe); } @@ -36447,7 +36447,7 @@ LAB_007ab226: isLess = bVar1 < (byte)*pickupName; if (bVar1 != *pickupName) { LAB_007ab1d1: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_007ab1d6; } if (bVar1 == 0) break; @@ -36480,7 +36480,7 @@ LAB_007ab230: if (0xfff < uVar3) { pppppbVar4 = (byte *****)spritePath[0][-1]; uVar3 = spritePathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)spritePath[0] + (-4 - (int)pppppbVar4))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(spritePath[0]) + (-4 - GHIDRA_INT(pppppbVar4)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -36547,8 +36547,8 @@ void Entity_Player::AnimateTrinket(int trinketId, byte *animName, byte *spriteAn void *trinketsBegin; trinketsBegin = (g_manager->_itemConfig)._trinkets._begin; - if ((int)(g_manager->_itemConfig)._trinkets._end - (int)trinketsBegin >> 2 <= - (int)(trinketId & 0x7fffU)) { + if (GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(trinketsBegin) >> 2 <= + GHIDRA_INT((trinketId & 0x7fffU))) { return; } trinketConfig = *(int *)((char *)trinketsBegin + (trinketId & 0x7fffU) * 4); @@ -36564,7 +36564,7 @@ void Entity_Player::AnimateTrinket(int trinketId, byte *animName, byte *spriteAn if (((*(char *)((char *)lowerBoundNode + 0xd) == '\0') && (*(uint *)((char *)lowerBoundNode + 0x10) < 0x506401)) && (lowerBoundNode != (manager->_entityConfig)._entities._head)) { - pickupConfig = (EntityConfig_Entity *)((int)lowerBoundNode + 0x18); + pickupConfig = (EntityConfig_Entity *)(GHIDRA_INT(lowerBoundNode) + 0x18); } else { pickupConfig = ((EntityConfig *)(&manager->_entityConfig))->EntityConfig::GetEntity(5,0,0); @@ -36584,7 +36584,7 @@ void Entity_Player::AnimateTrinket(int trinketId, byte *animName, byte *spriteAn isLess = bVar1 < *newAnimChar; if (bVar1 != *newAnimChar) { LAB_007ab650: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_007ab655; } if (bVar1 == 0) break; @@ -36635,21 +36635,21 @@ void Entity_Player::AnimateCard(int cardId, byte *animName) byte *animData; int cardConfig; - ppvStack_20 = (void **)((int)&cardAnm2Path + 0x50); + ppvStack_20 = (void **)(GHIDRA_INT(&cardAnm2Path) + 0x50); local_14 = 0xffffffff; puStack_18 = &LAB_00affb25; local_1c = ExceptionList; - stackCookie = __security_cookie ^ (int)&cardAnm2Path + 0x44U; + stackCookie = __security_cookie ^ GHIDRA_INT(&cardAnm2Path) + 0x44U; ExceptionList = &local_1c; heldSprite = &this->_heldSprite; if (0x61 < cardId) { pvVar2 = (g_manager->_itemConfig)._cards._begin; - ppvStack_20 = (void **)((int)&cardAnm2Path + 0x50); - if (((cardId < (int)(g_manager->_itemConfig)._cards._end - (int)pvVar2 >> 2) && + ppvStack_20 = (void **)(GHIDRA_INT(&cardAnm2Path) + 0x50); + if (((cardId < GHIDRA_INT((g_manager->_itemConfig)._cards._end) - GHIDRA_INT(pvVar2) >> 2) && (cardConfig = *(int *)((char *)pvVar2 + cardId * 4), - ppvStack_20 = (void **)((int)&cardAnm2Path + 0x50), cardConfig != 0)) && - (ppvStack_20 = (void **)((int)&cardAnm2Path + 0x50), *(int *)(cardConfig + 0x6c) != 0)) { - ppvStack_20 = (void **)((int)&cardAnm2Path + 0x50); + ppvStack_20 = (void **)(GHIDRA_INT(&cardAnm2Path) + 0x50), cardConfig != 0)) && + (ppvStack_20 = (void **)(GHIDRA_INT(&cardAnm2Path) + 0x50), *(int *)(cardConfig + 0x6c) != 0)) { + ppvStack_20 = (void **)(GHIDRA_INT(&cardAnm2Path) + 0x50); ((ANM2 *)(heldSprite))->ANM2::Reset(); ((std::string *)(cardAnm2Path._buf))->std::string::string(*(void **)(cardConfig + 0x6c)); local_14 = 0; @@ -36657,11 +36657,11 @@ void Entity_Player::AnimateCard(int cardId, byte *animName) local_14 = 0xffffffff; if (0xf < cardAnm2Path._capacity) { uVar4 = cardAnm2Path._capacity + 1; - pvVar2 = (void *)cardAnm2Path._buf._0_4_; + pvVar2 = (*(undefined4 *)((char *)&((void *)cardAnm2Path._buf) + 0x0)); if (0xfff < uVar4) { - pvVar2 = *(void **)(cardAnm2Path._buf._0_4_ + -4); + pvVar2 = *(void **)((*(undefined4 *)((char *)&(cardAnm2Path._buf) + 0x0)) + -4); uVar4 = cardAnm2Path._capacity + 0x24; - if (0x1f < (uint)(cardAnm2Path._buf._0_4_ + (-4 - (int)pvVar2))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(cardAnm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar2))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -36685,7 +36685,7 @@ void Entity_Player::AnimateCard(int cardId, byte *animName) isLess = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_007ab7f4: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_007ab7f9; } if (bVar1 == 0) break; @@ -36716,20 +36716,20 @@ LAB_007ab7f9: local_3c._buf[1] = '\0'; local_3c._buf[2] = '\0'; local_3c._buf[3] = '\0'; - local_3c._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) = std::_Allocate(0x20); local_3c._size = 0x19; local_3c._capacity = 0x1f; - builtin_strncpy((char *)local_3c._buf._0_4_,"gfx/ui/ui_cardspills.anm2",0x1a); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_3c._buf) + 0x0)),"gfx/ui/ui_cardspills.anm2",0x1a); local_14 = 1; ((ANM2 *)(heldSprite))->ANM2::Load(&local_3c,1); local_14 = 0xffffffff; if (0xf < local_3c._capacity) { uVar4 = local_3c._capacity + 1; - pcVar3 = (char *)local_3c._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)local_3c._buf) + 0x0)); if (0xfff < uVar4) { - pcVar3 = *(char **)(local_3c._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) + -4); uVar4 = local_3c._capacity + 0x24; - if ((char *)0x1f < (char *)(local_3c._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -36740,7 +36740,7 @@ LAB_007ab7f9: heldSprite = &this->_heldSprite; local_3c._size = 0; local_3c._capacity = 0xf; - local_3c._buf._0_4_ = local_3c._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) = (*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) & 0xffffff00; if (animData == (byte *)0x0) { LAB_007ab949: bVar1 = ((ANM2 *)(heldSprite))->ANM2::SetAnimation((byte *)"Sparkle",1); @@ -36760,7 +36760,7 @@ LAB_007ab949: isLess = bVar1 < (byte)*pcVar3; if (bVar1 != *pcVar3) { LAB_007ab936: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_007ab93b; } if (bVar1 == 0) break; @@ -36785,11 +36785,11 @@ LAB_007ab93b: pvVar2 = ((AnimationState *)(&(this->_heldSprite)._overlayAnimState))->AnimationState::GetLayerFrame(uVar4); if ((pvVar2 != (void *)0x0) && (*(char *)((char *)pvVar2 + 0x2c) != '\0')) goto LAB_007abab4; uVar4 = uVar4 + 1; - } while (uVar4 < (uint)(this->_heldSprite)._layerCount); + } while (uVar4 < GHIDRA_UINT((this->_heldSprite)._layerCount)); } if ((((cardId < 0) || (pvVar2 = (g_manager->_itemConfig)._cards._begin, - (int)(g_manager->_itemConfig)._cards._end - (int)pvVar2 >> 2 <= cardId)) || + GHIDRA_INT((g_manager->_itemConfig)._cards._end) - GHIDRA_INT(pvVar2) >> 2 <= cardId)) || (cardConfig = *(int *)((char *)pvVar2 + cardId * 4), cardConfig == 0)) || (entityConfig = EntityConfig::GetEntity (&g_manager->_entityConfig,5,300,*(int *)(cardConfig + 0x54)), @@ -36815,7 +36815,7 @@ LAB_007aba73: isLess = bVar1 < (byte)*pcVar3; if (bVar1 != *pcVar3) { LAB_007aba60: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_007aba65; } if (bVar1 == 0) break; @@ -36879,7 +36879,7 @@ LAB_007abb93: isLess = bVar1 < (byte)*sparkleChar; if (bVar1 != *sparkleChar) { LAB_007abb80: - animCompare = -(uint)isLess | 1; + animCompare = -GHIDRA_UINT(isLess) | 1; goto LAB_007abb85; } if (bVar1 == 0) break; @@ -37016,7 +37016,7 @@ void Entity_Player::AddPrettyFly() { int *haloOfFliesCount; - haloOfFliesCount = (int *)((int)(this->_pillEffectUses)._begin + 0x28); + haloOfFliesCount = (int *)(GHIDRA_INT((this->_pillEffectUses)._begin) + 0x28); *haloOfFliesCount = *haloOfFliesCount + 1; this->_cacheFlags = this->_cacheFlags | 0x200; EvaluateItems(this); @@ -37111,20 +37111,20 @@ void Entity_Player::active_used_post(int slot, byte unk, int chargeBeforeUse) local_8 = 0; pvVar8 = (g_manager->_itemConfig)._collectibles._begin; chargeBeforeUse = 0; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar8 >> 2 != 0) { + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar8) >> 2 != 0) { do { if ((((chargeBeforeUse != this->_activeDesc[0]._item) && (piVar1 = *(int **)((char *)pvVar8 + chargeBeforeUse * 4), piVar1 != (int *)0x0)) && ((*piVar1 == 3 && (((piVar1[0x2f] & 1U) == 0 && (piVar1[0x12] != 0)))))) && (bVar5 = ((Item *)(piVar1))->Item::IsAvailable(0xffffffff), bVar5 != 0)) { iVar7 = piVar1[1]; - uVar9 = (int)activePickerEnd - (int)WVar10 >> 3; + uVar9 = GHIDRA_INT(activePickerEnd) - GHIDRA_INT(WVar10) >> 3; qualityWeight = *(int *)(&DAT_00b6bc60 + piVar1[0x30] * 4); uVar6 = 0; if (uVar9 != 0) { do { if (*(int *)((char *)WVar10 + uVar6 * 8) == iVar7) { - piVar1 = (int *)((int)WVar10 + 4 + uVar6 * 8); + piVar1 = (int *)(GHIDRA_INT(WVar10) + 4 + uVar6 * 8); *piVar1 = *piVar1 + qualityWeight; if (*piVar1 < 0) { *(undefined4 *)((char *)WVar10 + 4 + uVar6 * 8) = 0; @@ -37151,10 +37151,10 @@ void Entity_Player::active_used_post(int slot, byte unk, int chargeBeforeUse) LAB_007ac194: chargeBeforeUse = chargeBeforeUse + 1; pvVar8 = (local_1c->_itemConfig)._collectibles._begin; - } while ((uint)chargeBeforeUse < - (uint)((int)(local_1c->_itemConfig)._collectibles._end - (int)pvVar8 >> 2)); + } while (GHIDRA_UINT(chargeBeforeUse) < + GHIDRA_UINT((GHIDRA_INT((local_1c->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar8) >> 2))); } - uVar6 = ((RNG *)((RNG *)((int)(this->_trinketRNGs)._begin + 0x8a0)))->RNG::Next(); + uVar6 = ((RNG *)((RNG *)(GHIDRA_INT((this->_trinketRNGs)._begin) + 0x8a0)))->RNG::Next(); in_XMM0_Da = 7.00649e-45; rng._shift1 = 5; rng._seed = uVar6; @@ -37163,12 +37163,12 @@ LAB_007ac194: uVar6 = ((WeightedOutcomePicker *)(&activePicker))->WeightedOutcomePicker::PickOutcome(rng); local_8 = 0xffffffff; if (activePicker != (WeightedOutcomePicker)0x0) { - uVar9 = ((int)activePickerCapacity - (int)activePicker >> 3) * 8; + uVar9 = (GHIDRA_INT(activePickerCapacity) - GHIDRA_INT(activePicker) >> 3) * 8; WVar10 = activePicker; if (0xfff < uVar9) { WVar10 = *(WeightedOutcomePicker *)((char *)activePicker + -4); uVar9 = uVar9 + 0x23; - if (0x1f < ((int)activePicker - (int)WVar10) - 4U) goto LAB_007ac7ad; + if (0x1f < (GHIDRA_INT(activePicker) - GHIDRA_INT(WVar10)) - 4U) goto LAB_007ac7ad; } operator_delete((void *)WVar10,uVar9); activePicker = (WeightedOutcomePicker)0x0; @@ -37177,7 +37177,7 @@ LAB_007ac194: } } else { - uVar6 = ((RNG *)((RNG *)((int)(this->_trinketRNGs)._begin + 0x8a0)))->RNG::Next(); + uVar6 = ((RNG *)((RNG *)(GHIDRA_INT((this->_trinketRNGs)._begin) + 0x8a0)))->RNG::Next(); uVar6 = ItemPool::CreateGlitchedCollectible(&pGVar4->_proceduralItemManager,uVar6,8); collectibleConfig = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(uVar6); if (collectibleConfig->type != 3) goto LAB_007ac2d2; @@ -37191,7 +37191,7 @@ LAB_007ac194: if (iVar7 == 2) { uVar6 = 10; } - uVar9 = ((RNG *)((RNG *)((int)(this->_trinketRNGs)._begin + 0x8a0)))->RNG::RandomInt(100); + uVar9 = ((RNG *)((RNG *)(GHIDRA_INT((this->_trinketRNGs)._begin) + 0x8a0)))->RNG::RandomInt(100); if (uVar9 < uVar6) { iVar7 = GetCollectibleMaxCharge (this,this->_activeDesc[0]._item,this->_activeDesc[0]._varData,unused); @@ -37246,7 +37246,7 @@ LAB_007ac2d2: local_8 = 2; pvVar8 = (g_manager->_itemConfig)._collectibles._begin; _unk = 0; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar8 >> 2 != 0) { + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar8) >> 2 != 0) { do { if (((((_unk != this->_activeDesc[0]._item) && (piVar1 = *(int **)((char *)pvVar8 + _unk * 4), piVar1 != (int *)0x0)) && (*piVar1 == 3)) @@ -37268,11 +37268,11 @@ LAB_007ac2d2: iVar2 = piVar1[0x1d]; if ((iVar2 == 1) || (iVar2 == 2)) { uVar6 = 0; - uVar9 = (int)expansionPickerEnd - (int)expansionPicker >> 3; + uVar9 = GHIDRA_INT(expansionPickerEnd) - GHIDRA_INT(expansionPicker) >> 3; if (uVar9 != 0) { do { if (*(int *)((char *)expansionPicker + uVar6 * 8) == iVar7) { - piVar1 = (int *)((int)expansionPicker + 4 + uVar6 * 8); + piVar1 = (int *)(GHIDRA_INT(expansionPicker) + 4 + uVar6 * 8); *piVar1 = *piVar1 + 1; if (*piVar1 < 0) { *(undefined4 *)((char *)expansionPicker + 4 + uVar6 * 8) = 0; @@ -37295,11 +37295,11 @@ LAB_007ac2d2: } else if (iVar2 == 3) { uVar6 = 0; - uVar9 = (int)activePickerEnd - (int)WVar10 >> 3; + uVar9 = GHIDRA_INT(activePickerEnd) - GHIDRA_INT(WVar10) >> 3; if (uVar9 != 0) { do { if (*(int *)((char *)WVar10 + uVar6 * 8) == iVar7) { - piVar1 = (int *)((int)WVar10 + 4 + uVar6 * 8); + piVar1 = (int *)(GHIDRA_INT(WVar10) + 4 + uVar6 * 8); *piVar1 = *piVar1 + 1; if (*piVar1 < 0) { *(undefined4 *)((char *)WVar10 + 4 + uVar6 * 8) = 0; @@ -37326,7 +37326,7 @@ LAB_007ac2d2: LAB_007ac5c0: _unk = _unk + 1; pvVar8 = (manager->_itemConfig)._collectibles._begin; - } while (_unk < (uint)((int)(manager->_itemConfig)._collectibles._end - (int)pvVar8 >> 2)); + } while (_unk < GHIDRA_UINT((GHIDRA_INT((manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar8) >> 2))); } slot = 1; iVar7 = GetTrinketMultiplier(this,0xb5); @@ -37335,7 +37335,7 @@ LAB_007ac5c0: } else if (iVar7 == 3) { slot = 2; - uVar6 = ((RNG *)((RNG *)((int)(this->_trinketRNGs)._begin + 0xb50)))->RNG::Next(); + uVar6 = ((RNG *)((RNG *)(GHIDRA_INT((this->_trinketRNGs)._begin) + 0xb50)))->RNG::Next(); rng_00._shift1 = 5; rng_00._seed = uVar6; rng_00._shift2 = 9; @@ -37359,7 +37359,7 @@ LAB_007ac5c0: } do { pvVar8 = (this->_trinketRNGs)._begin; - rngSeed = (uint *)((int)pvVar8 + 0xb50); + rngSeed = (uint *)(GHIDRA_INT(pvVar8) + 0xb50); uVar6 = *rngSeed; if (uVar6 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -37393,22 +37393,22 @@ LAB_007ac5c0: slot = slot + -1; } while (slot != 0); if (WVar10 != (WeightedOutcomePicker)0x0) { - uVar6 = (int)activePickerCapacity - (int)WVar10 & 0xfffffff8; + uVar6 = GHIDRA_INT(activePickerCapacity) - GHIDRA_INT(WVar10) & 0xfffffff8; freeBlock = WVar10; if (0xfff < uVar6) { freeBlock = *(WeightedOutcomePicker *)((char *)WVar10 + -4); uVar6 = uVar6 + 0x23; - if (0x1f < ((int)WVar10 - (int)freeBlock) - 4U) goto LAB_007ac7ad; + if (0x1f < (GHIDRA_INT(WVar10) - GHIDRA_INT(freeBlock)) - 4U) goto LAB_007ac7ad; } operator_delete((void *)freeBlock,uVar6); } if (expansionPicker != (WeightedOutcomePicker)0x0) { - uVar6 = (int)expansionPickerCapacity - (int)expansionPicker & 0xfffffff8; + uVar6 = GHIDRA_INT(expansionPickerCapacity) - GHIDRA_INT(expansionPicker) & 0xfffffff8; WVar10 = expansionPicker; if (0xfff < uVar6) { WVar10 = *(WeightedOutcomePicker *)((char *)expansionPicker + -4); uVar6 = uVar6 + 0x23; - if (0x1f < ((int)expansionPicker - (int)WVar10) - 4U) { + if (0x1f < (GHIDRA_INT(expansionPicker) - GHIDRA_INT(WVar10)) - 4U) { LAB_007ac7ad: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -37484,8 +37484,8 @@ void Entity_Player::DischargeActiveItem(uint slot, byte unk) local_14 = -NAN; puStack_18 = &LAB_00affbc7; local_1c = ExceptionList; - uVar6 = __security_cookie ^ (uint)((&local_50)[1]._colorize + 1); - local_68 = (Entity_Player *)CONCAT31(local_68._1_3_,unk); + uVar6 = __security_cookie ^ GHIDRA_UINT(((&local_50)[1]._colorize + 1)); + local_68 = (Entity_Player *)CONCAT31((*(undefined1 *)((char *)&(local_68) + 0x1)),unk); activeSlot = slot; if (3 < slot) { return; @@ -37495,17 +37495,17 @@ void Entity_Player::DischargeActiveItem(uint slot, byte unk) return; } local_6c = (float *)(slot * 0x20); - local_64 = *(EntityPtr *)((char *)(local_6c + 0x563) + (int)this); + local_64 = *(EntityPtr *)((char *)(local_6c + 0x563) + GHIDRA_INT(this)); ExceptionList = &local_1c; local_58 = this; local_24 = uVar6; local_74 = GetActiveMaxCharge(this,slot); local_5c = (Game *)GetActiveMaxCharge(this,slot); - if (*(int *)((char *)(local_6c + 0x562) + (int)this) < local_74) { - iVar10 = *(int *)((char *)(local_6c + 0x562) + (int)this) - local_74; + if (*(int *)((char *)(local_6c + 0x562) + GHIDRA_INT(this)) < local_74) { + iVar10 = *(int *)((char *)(local_6c + 0x562) + GHIDRA_INT(this)) - local_74; itemConfig = ItemConfig::GetCollectible (&g_manager->_itemConfig, - *(int *)((int)(&(this->_sprite)._filename + -3) + descOffset)); + *(int *)(GHIDRA_INT((&(this->_sprite)._filename + -3)) + descOffset)); if ((itemConfig != (ItemConfig_Item *)0x0) && (varData = FUN_007308d0(uVar6), varData != 2)) { varData = FUN_007308d0(uVar6); if (varData == 1) { @@ -37514,7 +37514,7 @@ void Entity_Player::DischargeActiveItem(uint slot, byte unk) varData = GetEffectiveSoulCharge(this); if ((varData < 1) || (((this->_playerType == 0x12 && (bVar5 = HasCollectible(this,0x26b,0), bVar5 != 0)) && - (uVar6 = ((RNG *)((RNG *)((int)(this->_collectibleRNGs)._begin + 0x26b0)))->RNG::RandomInt(2), + (uVar6 = ((RNG *)((RNG *)(GHIDRA_INT((this->_collectibleRNGs)._begin) + 0x26b0)))->RNG::RandomInt(2), uVar6 == 0)))) { varData = GetEffectiveBloodCharge(this); if (0 < varData) { @@ -37527,16 +37527,16 @@ void Entity_Player::DischargeActiveItem(uint slot, byte unk) } } bVar5 = HasCollectible(this,0x74,0); - if ((bVar5 != 0) && (local_60 = (EntityPtr)((int)local_64 + 1), (int)local_60 < (int)local_5c)) { + if ((bVar5 != 0) && (local_60 = (EntityPtr)(GHIDRA_INT(local_64) + 1), GHIDRA_INT(local_60) < GHIDRA_INT(local_5c))) { local_5c = (Game *)g_manager; itemConfig = ItemConfig::GetCollectible (&g_manager->_itemConfig, - *(int *)((int)(&(this->_sprite)._filename + -3) + descOffset)); + *(int *)(GHIDRA_INT((&(this->_sprite)._filename + -3)) + descOffset)); iVar10 = GetActiveMaxCharge(this,activeSlot); if (itemConfig != (ItemConfig_Item *)0x0) { if (iVar10 == 1) { local_64 = local_60; - if ((int)local_60 < local_74 / 2) { + if (GHIDRA_INT(local_60) < local_74 / 2) { local_64 = (EntityPtr)(local_74 / 2); } } @@ -37545,7 +37545,7 @@ void Entity_Player::DischargeActiveItem(uint slot, byte unk) local_60 = (EntityPtr)0xab; seed_fart_sound_override((int *)&local_60); ((SoundEffects *)((SoundEffects *) - &(*(undefined1 *)((char *)&(local_5c->_glowingHourglassStates[0]._gameState) + 0x3934))))->SoundEffects::Play((int)local_60,1.0,2,0,1.0,0.0); + &(*(undefined1 *)((char *)&(local_5c->_glowingHourglassStates[0]._gameState) + 0x3934))))->SoundEffects::Play(GHIDRA_INT(local_60),1.0,2,0,1.0,0.0); } } uVar6 = Random(); @@ -37560,10 +37560,10 @@ void Entity_Player::DischargeActiveItem(uint slot, byte unk) *(undefined4 *)(iVar10 + 0x358) = 0x3f800000; } uVar6 = activeSlot; - local_74 = *(int *)((char *)(local_6c + 0x562) + (int)this); - SetActiveCharge(this,(int)local_64,activeSlot); + local_74 = *(int *)((char *)(local_6c + 0x562) + GHIDRA_INT(this)); + SetActiveCharge(this,GHIDRA_INT(local_64),activeSlot); (*(undefined1 *)((char *)(this) + 0x1826)) = 0; - iVar10 = *(int *)((int)(&(this->_sprite)._filename + -3) + descOffset); + iVar10 = *(int *)(GHIDRA_INT((&(this->_sprite)._filename + -3)) + descOffset); if (iVar10 != 0x2bf) { if ((iVar10 == 0x2c7) && (uVar6 == 2)) { otherPlayer = this->_twinPlayer; @@ -37610,7 +37610,7 @@ void Entity_Player::DischargeActiveItem(uint slot, byte unk) } goto LAB_007ad261; } - if (*(int *)((char *)(local_6c + 0x567) + (int)this) == 0) { + if (*(int *)((char *)(local_6c + 0x567) + GHIDRA_INT(this)) == 0) { iVar10 = 0; local_5c = g_game; playerSlot = (int *)&(*(undefined1 *)((char *)&((g_game->_playerManager)) + 0x80)); @@ -37629,14 +37629,14 @@ LAB_007aca80: *(undefined4 *)((char *)(&local_5c->_seedEffects + -1) + iVar10 * 4) = uVar12; if (-1 < iVar10) { otherPlayer = *(EntityPtr *)((char *)(&g_game->_seedEffects + -1) + iVar10 * 4); - *(int *)((char *)(local_6c + 0x567) + (int)this) = iVar10 + 1; + *(int *)((char *)(local_6c + 0x567) + GHIDRA_INT(this)) = iVar10 + 1; local_64 = otherPlayer; (**(code **)(*(int *)otherPlayer + 4))(this->_type,this->_variant,0,this->_initSeed); - ((Vector *)((int)otherPlayer + 0x33c))->x = (this->_pos).x; + ((Vector *)(GHIDRA_INT(otherPlayer) + 0x33c))->x = (this->_pos).x; *(float *)((char *)otherPlayer + 0x340) = (this->_pos).y; - ((Vector *)((int)otherPlayer + 0x360))->x = (this->_velocity).x; + ((Vector *)(GHIDRA_INT(otherPlayer) + 0x360))->x = (this->_velocity).x; *(float *)((char *)otherPlayer + 0x364) = (this->_velocity).y; - ((TemporaryEffects *)((TemporaryEffects *)((int)otherPlayer + 0x1508)))->TemporaryEffects::AddNullEffect(100,1,1); + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(otherPlayer) + 0x1508)))->TemporaryEffects::AddNullEffect(100,1,1); *(int *)((char *)otherPlayer + 0x1340) = 0; *(int *)((char *)otherPlayer + 0x1344) = 0; *(int *)((char *)otherPlayer + 0x1348) = 0; @@ -37655,19 +37655,19 @@ LAB_007aca80: *(int *)((char *)otherPlayer + 0x16b4) = this->_totalDamageTaken; SyncConsumables(this,(Entity_Player *)otherPlayer,0xffffffff); pvVar11 = (this->_collectibleRNGs)._begin; - rngSeed = (uint *)((int)pvVar11 + 0x2bf0); + rngSeed = (uint *)(GHIDRA_INT(pvVar11) + 0x2bf0); *(byte *)((char *)otherPlayer + 0x1df8) = 1; historyItem = (local_58->_history)._historyItems._begin; pEVar9 = local_58; if (historyItem != (local_58->_history)._historyItems._end) { do { if (*(char *)(historyItem + 1) == '\0') { - if (0 < *(int *)((int)(pEVar9->_collectibleCounts)._begin + (int)historyItem[2] * 4)) { - itemConfig = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible((int)historyItem[2]); + if (0 < *(int *)(GHIDRA_INT((pEVar9->_collectibleCounts)._begin) + GHIDRA_INT(historyItem[2]) * 4)) { + itemConfig = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(GHIDRA_INT(historyItem[2])); pEVar9 = local_58; if (itemConfig->type != 3) { - bVar5 = CanRerollCollectible(local_58,(int)historyItem[2],0); - if ((bVar5 != 0) && (0 < (int)*historyItem)) { + bVar5 = CanRerollCollectible(local_58,GHIDRA_INT(historyItem[2]),0); + if ((bVar5 != 0) && (0 < GHIDRA_INT(*historyItem))) { local_50._colorize[0] = *historyItem; local_50._colorize[1] = historyItem[1]; local_50._colorize[3] = historyItem[3]; @@ -37698,14 +37698,14 @@ LAB_007aca80: *rngSeed = uVar6; local_50._colorize[2] = (float)ItemPool::GetCollectible - ((ItemPool *)local_5c,(int)historyItem[6],uVar6,6,0,0); - local_60 = (EntityPtr)((int)local_60 + 1); - } while ((int)local_60 < 10); + ((ItemPool *)local_5c,GHIDRA_INT(historyItem[6]),uVar6,6,0,0); + local_60 = (EntityPtr)(GHIDRA_INT(local_60) + 1); + } while (GHIDRA_INT(local_60) < 10); if (local_50._colorize[2] == 0.0) { local_50._colorize[2] = 3.50325e-44; } LAB_007ace88: - AddCollectible((Entity_Player *)local_64,(int)local_50._colorize[2],0,0,0,0,0); + AddCollectible((Entity_Player *)local_64,GHIDRA_INT(local_50._colorize[2]),0,0,0,0,0); historyEnd = *(void **)((char *)local_64 + 0x1df0); if (historyEnd == *(void **)((char *)local_64 + 0x1df4)) { std::vector<28byte>::_Emplace_reallocate(historyEnd,local_50._colorize); @@ -37719,7 +37719,7 @@ LAB_007ace88: historyEnd[5] = (float)pEStack_7c; historyEnd[6] = (float)local_68; *(void **)((char *)local_64 + 0x1df0) = - (void *)((int)*(void **)((char *)local_64 + 0x1df0) + 0x1c); + (void *)(GHIDRA_INT(*(void **)((char *)local_64 + 0x1df0)) + 0x1c); } } pEVar9 = local_58; @@ -37736,9 +37736,9 @@ LAB_007ace88: goto LAB_007acacf; } LAB_007acefb: - local_68 = *(Entity_Player **)((char *)(local_6c + 0x567) + (int)this); - if (0 < (int)local_68) { - pEVar9 = (Entity_Player *)(g_game->_seedEffects)._stageSeeds[(int)&(*(undefined1 *)((char *)&(local_68[-1]) + 0x2ee2))]; + local_68 = *(Entity_Player **)((char *)(local_6c + 0x567) + GHIDRA_INT(this)); + if (0 < GHIDRA_INT(local_68)) { + pEVar9 = (Entity_Player *)(g_game->_seedEffects)._stageSeeds[GHIDRA_INT(&(*(undefined1 *)((char *)&(local_68[-1]) + 0x2ee2)))]; local_58 = pEVar9; if (pEVar9 != (Entity_Player *)0x0) { pEVar9->_isControlsEnabled = 0; @@ -37751,7 +37751,7 @@ LAB_007acefb: local_6c = ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::GetNullEffect(0x6d); if (local_6c == (float *)0x0) { pvVar11 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar11 & 0xfffffffcU) < + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar11) & 0xfffffffcU)) < 0x1b5) { local_88 = 0.0; } @@ -37777,9 +37777,9 @@ LAB_007acefb: ((PlayerManager *)(this_00))->PlayerManager::replace_player(this,pEVar9); manager = g_manager; local_60 = (EntityPtr)0x418; - (g_game->_seedEffects)._stageSeeds[(int)&(*(undefined1 *)((char *)&(local_68[-1]) + 0x2ee2))] = (int)this; + (g_game->_seedEffects)._stageSeeds[GHIDRA_INT(&(*(undefined1 *)((char *)&(local_68[-1]) + 0x2ee2)))] = GHIDRA_INT(this); seed_fart_sound_override((int *)&local_60); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_60,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_60),1.0,2,0,1.0,0.0); pEVar9 = local_58; if (local_58->_playerType != this->_playerType) { ChangePlayerType(local_58,this->_playerType,1); @@ -37811,10 +37811,10 @@ LAB_007acefb: goto LAB_007ad16e; } *(undefined4 *) - ((int)(local_58->_collectibleCounts)._begin + *(int *)((char *)pvVar11 + 8) * 4) = + (GHIDRA_INT((local_58->_collectibleCounts)._begin) + *(int *)((char *)pvVar11 + 8) * 4) = *(undefined4 *) - ((int)(this->_collectibleCounts)._begin + *(int *)((char *)pvVar11 + 8) * 4); - *(undefined4 *)((int)(this->_collectibleCounts)._begin + *(int *)((char *)pvVar11 + 8) * 4) + (GHIDRA_INT((this->_collectibleCounts)._begin) + *(int *)((char *)pvVar11 + 8) * 4); + *(undefined4 *)(GHIDRA_INT((this->_collectibleCounts)._begin) + *(int *)((char *)pvVar11 + 8) * 4) = 0; ((History *)(&local_58->_history))->History::AddHistoryItem(pvVar11); puVar8 = (undefined4 *)std::vector::erase(&pEStack_7c,pvVar11); @@ -37826,7 +37826,7 @@ LAB_007acefb: } else { LAB_007ad16e: - pvVar11 = (void *)((int)pvVar11 + 0x1c); + pvVar11 = (void *)(GHIDRA_INT(pvVar11) + 0x1c); } } while (pvVar11 != (this->_history)._historyItems._end); if (isCacheDirty != '\0') { @@ -37837,16 +37837,16 @@ LAB_007ad16e: uVar6 = Random(); effect = ((Game *)(g_game))->Game::Spawn(1000,0xf,&this->_pos,&g_vectorZero,(Entity *)0x0,0,uVar6); effect->Update(); - uVar6 = *(uint *)((int)(&(pEVar9->_sprite)._filename + -3) + descOffset); - if ((uVar6 != *(uint *)((int)(&(this->_sprite)._filename + -3) + descOffset)) && (uVar6 != 0)) + uVar6 = *(uint *)(GHIDRA_INT((&(pEVar9->_sprite)._filename + -3)) + descOffset); + if ((uVar6 != *(uint *)(GHIDRA_INT((&(this->_sprite)._filename + -3)) + descOffset)) && (uVar6 != 0)) { RemoveCollectible(pEVar9,uVar6,1,0,1); } - puVar8 = (undefined4 *)((int)(&(this->_sprite)._filename + -3) + descOffset); + puVar8 = (undefined4 *)(GHIDRA_INT((&(this->_sprite)._filename + -3)) + descOffset); uVar12 = puVar8[1]; uVar15 = puVar8[2]; uVar2 = puVar8[3]; - dstDescHead = (undefined4 *)((int)(&(pEVar9->_sprite)._filename + -3) + descOffset); + dstDescHead = (undefined4 *)(GHIDRA_INT((&(pEVar9->_sprite)._filename + -3)) + descOffset); *dstDescHead = *puVar8; dstDescHead[1] = uVar12; dstDescHead[2] = uVar15; @@ -37888,7 +37888,7 @@ LAB_007acacf: manager = g_manager; local_60 = (EntityPtr)0x35; seed_fart_sound_override((int *)&local_60); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_60,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_60),1.0,2,0,1.0,0.0); uVar6 = Random(); position = &this->_pos; effect = ((Game *)(g_game))->Game::Spawn(1000,0x61,position,&g_vectorZero,(Entity *)0x0,0,uVar6); @@ -37898,7 +37898,7 @@ LAB_007acacf: uVar6 = Random(); Game::SpawnParticles (g_game,position,0x23,8, - (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 3.0 + 2.0,color,(float)local_5c,0); uVar6 = Random(); effect = ((Game *)(g_game))->Game::Spawn(1000,2,position,&g_vectorZero,(Entity *)0x0,2,uVar6); @@ -37908,7 +37908,7 @@ LAB_007acacf: EvaluateItems(this); AnimateCollectible(this,0x2bf,(byte *)"UseItem",(byte *)"PlayerPickupSparkle"); if (unk == 0) { - RemoveCollectible(this,*(uint *)((int)(&(this->_sprite)._filename + -3) + descOffset),0, + RemoveCollectible(this,*(uint *)(GHIDRA_INT((&(this->_sprite)._filename + -3)) + descOffset),0, activeSlot,1); ExceptionList = local_1c; return; @@ -37924,8 +37924,8 @@ void Entity_Player::TryRemoveTrinketCostume(int trinketId) void *trinkets; trinkets = (g_manager->_itemConfig)._trinkets._begin; - if (((int)(trinketId & 0x7fffU) < - (int)(g_manager->_itemConfig)._trinkets._end - (int)trinkets >> 2) && + if ((GHIDRA_INT((trinketId & 0x7fffU)) < + GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(trinkets) >> 2) && (Item = *(ItemConfig_Item **)((char *)trinkets + (trinketId & 0x7fffU) * 4), Item != (ItemConfig_Item *)0x0)) { if ((Item->addCostumeOnPickup == 0) && @@ -37946,7 +37946,7 @@ void Entity_Player::TryRemoveNullCostume(int param_1) if ((param_1 < 0) || (nullItems = (g_manager->_itemConfig)._nullItems._begin, - (int)(g_manager->_itemConfig)._nullItems._end - (int)nullItems >> 2 <= param_1)) { + GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(nullItems) >> 2 <= param_1)) { RemoveCostume(in_ECX,(ItemConfig_Item *)0x0); return; } @@ -37999,23 +37999,23 @@ void Entity_Player::stop_costume_item_anims() do { if (-1 < costumeMapEntry[-1]._index) { *(undefined1 *) - (costumeMapEntry[-1]._index * 0x130 + 0x11c + (int)(this->_costumeSpriteDescs)._begin) = 0; + (costumeMapEntry[-1]._index * 0x130 + 0x11c + GHIDRA_INT((this->_costumeSpriteDescs)._begin)) = 0; } if (-1 < costumeMapEntry->_index) { *(undefined1 *) - (costumeMapEntry->_index * 0x130 + 0x11c + (int)(this->_costumeSpriteDescs)._begin) = 0; + (costumeMapEntry->_index * 0x130 + 0x11c + GHIDRA_INT((this->_costumeSpriteDescs)._begin)) = 0; } if (-1 < costumeMapEntry[1]._index) { *(undefined1 *) - (costumeMapEntry[1]._index * 0x130 + 0x11c + (int)(this->_costumeSpriteDescs)._begin) = 0; + (costumeMapEntry[1]._index * 0x130 + 0x11c + GHIDRA_INT((this->_costumeSpriteDescs)._begin)) = 0; } if (-1 < costumeMapEntry[2]._index) { *(undefined1 *) - (costumeMapEntry[2]._index * 0x130 + 0x11c + (int)(this->_costumeSpriteDescs)._begin) = 0; + (costumeMapEntry[2]._index * 0x130 + 0x11c + GHIDRA_INT((this->_costumeSpriteDescs)._begin)) = 0; } if (-1 < costumeMapEntry[3]._index) { *(undefined1 *) - (costumeMapEntry[3]._index * 0x130 + 0x11c + (int)(this->_costumeSpriteDescs)._begin) = 0; + (costumeMapEntry[3]._index * 0x130 + 0x11c + GHIDRA_INT((this->_costumeSpriteDescs)._begin)) = 0; } costumeMapEntry = costumeMapEntry + 5; batchesLeft = batchesLeft + -1; @@ -38069,7 +38069,7 @@ byte Entity_Player::IsCollectibleAnimFinished(int collectible, std_string *animN do { if (((-1 < costumeMapEntry->_index) && (costumeSprite = - (ANM2 *)(costumeMapEntry->_index * 0x130 + (int)(this->_costumeSpriteDescs)._begin), + (ANM2 *)(costumeMapEntry->_index * 0x130 + GHIDRA_INT((this->_costumeSpriteDescs)._begin)), costumeSprite[1]._filename._buf[8] != '\0')) && (*(ItemConfig_Item **)costumeSprite[1]._filename._buf == item)) { animName_00 = animName; @@ -38150,11 +38150,11 @@ void Entity_Player::TriggerTrinketAdded(uint trinketID, byte firstTimePickingUp) case 0x9c: update_greeds_gullet(this); if (firstTimePickingUp == 0) goto LAB_007ad9f7; - AddHearts(this,(uint)(goldenFlag != 0) * 2 + 2,0,0); + AddHearts(this,GHIDRA_UINT((goldenFlag != 0)) * 2 + 2,0,0); goto LAB_007ad9e6; case 0xa6: if (1 < *(int *)&g_game->_deathmatchManager) { - ModelingClay_roll(this,(RNG *)((int)(this->_trinketRNGs)._begin + 0xa60)); + ModelingClay_roll(this,(RNG *)(GHIDRA_INT((this->_trinketRNGs)._begin) + 0xa60)); } break; case 0xa9: @@ -38176,7 +38176,7 @@ LAB_007ad9e6: } LAB_007ad9f7: trinketsBegin = (g_manager->_itemConfig)._trinkets._begin; - if ((((int)uVar1 < (int)(g_manager->_itemConfig)._trinkets._end - (int)trinketsBegin >> 2) && + if (((GHIDRA_INT(uVar1) < GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(trinketsBegin) >> 2) && (iVar2 = *(int *)((char *)trinketsBegin + uVar1 * 4), iVar2 != 0)) && (uVar1 = *(uint *)(iVar2 + 0x54), uVar1 != 0)) { this->_cacheFlags = this->_cacheFlags | uVar1; @@ -38272,7 +38272,7 @@ void Entity_Player::TriggerTrinketRemoved(uint trinketID) } break; case 0xa9: - iVar1 = -1 - (uint)((trinketID & 0x8000) != 0); + iVar1 = -1 - GHIDRA_UINT(((trinketID & 0x8000) != 0)); playerForm = 0; LAB_007adda7: IncrementPlayerFormCounter(this,playerForm,iVar1); @@ -38294,13 +38294,13 @@ LAB_007adda7: } i = i + 1; iVar1 = *(int *)&(*(undefined1 *)((char *)(this) + 0x2ee4)); - } while (i < (uint)(*(int *)&(*(undefined1 *)((char *)(this) + 0x2ee8)) - iVar1 >> 2)); + } while (i < GHIDRA_UINT((*(int *)&(*(undefined1 *)((char *)(this) + 0x2ee8)) - iVar1 >> 2))); } *(int *)&(*(undefined1 *)((char *)(this) + 0x2ee8)) = iVar1; } } trinkets = (g_manager->_itemConfig)._trinkets._begin; - if ((((int)uVar2 < (int)(g_manager->_itemConfig)._trinkets._end - (int)trinkets >> 2) && + if (((GHIDRA_INT(uVar2) < GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(trinkets) >> 2) && (iVar1 = *(int *)((char *)trinkets + uVar2 * 4), iVar1 != 0)) && (uVar2 = *(uint *)(iVar1 + 0x54), uVar2 != 0)) { this->_cacheFlags = this->_cacheFlags | uVar2; @@ -38364,7 +38364,7 @@ void Entity_Player::RestoreGameState(GameStatePlayer *saveState) local_14 = (void *)0xffffffff; puStack_18 = &LAB_00affbfd; local_1c = ExceptionList; - uVar8 = __security_cookie ^ (uint)(local_3c + 0xb); + uVar8 = __security_cookie ^ GHIDRA_UINT((local_3c + 0xb)); local_58 = saveState; if (this->_replacedPlayer != (void *)0x0) { return; @@ -38372,10 +38372,10 @@ void Entity_Player::RestoreGameState(GameStatePlayer *saveState) ExceptionList = &local_1c; selfSaved = this; local_24 = uVar8; - SetControllerIndex(this,(int)saveState[0x149],1); + SetControllerIndex(this,GHIDRA_INT(saveState[0x149]),1); GVar12 = (GameStatePlayer)this->_playerType; - if (((int)(g_manager->_entityConfig)._players._end - - (int)(g_manager->_entityConfig)._players._begin) / 0x148 <= (int)GVar12) { + if ((GHIDRA_INT((g_manager->_entityConfig)._players._end) - + GHIDRA_INT((g_manager->_entityConfig)._players._begin)) / 0x148 <= GHIDRA_INT(GVar12)) { this->_playerType = 0; GVar12 = (GameStatePlayer)0x0; } @@ -38383,7 +38383,7 @@ void Entity_Player::RestoreGameState(GameStatePlayer *saveState) if (GVar12 != *saveState) { RemoveSkinCostume(this); stop_costume_item_anims(this); - this->_playerType = (int)*saveState; + this->_playerType = GHIDRA_INT(*saveState); update_player_skin(this); this->ResetColor(uVar8); } @@ -38394,13 +38394,13 @@ void Entity_Player::RestoreGameState(GameStatePlayer *saveState) } if ((this->_playerType < 0) || (pvVar11 = (void *)this->_playerType, - ((int)(g_manager->_entityConfig)._players._end - - (int)(g_manager->_entityConfig)._players._begin) / 0x148 <= (int)pvVar11)) { + (GHIDRA_INT((g_manager->_entityConfig)._players._end) - + GHIDRA_INT((g_manager->_entityConfig)._players._begin)) / 0x148 <= GHIDRA_INT(pvVar11))) { local_44 = (EntityConfig_Player *)0x0; } else { local_44 = (EntityConfig_Player *) - ((int)pvVar11 * 0x148 + (int)(g_manager->_entityConfig)._players._begin); + (GHIDRA_INT(pvVar11) * 0x148 + GHIDRA_INT((g_manager->_entityConfig)._players._begin)); if (local_44 != (EntityConfig_Player *)0x0) goto LAB_007ae611; } KAGE_LogMessage(0x10,(byte *)"Could not load config for player type %d\n"); @@ -38410,9 +38410,9 @@ LAB_007ae611: ((EntityConfig_Player *)(local_44))->EntityConfig_Player::GetDisplayName((std_string *)local_3c,pvVar11); if ((EntityConfig_Player *)&this->_name != local_44) { ((std::string *)((this->_name)._buf))->std::string::_Tidy_deallocate(); - friendBallHealth = *(undefined4 *)((int)&local_44->_id + 4); - uVar2 = *(undefined4 *)((int)&local_44->_id + 8); - uVar3 = *(undefined4 *)((int)&local_44->_id + 0xc); + friendBallHealth = *(undefined4 *)(GHIDRA_INT(&local_44->_id) + 4); + uVar2 = *(undefined4 *)(GHIDRA_INT(&local_44->_id) + 8); + uVar3 = *(undefined4 *)(GHIDRA_INT(&local_44->_id) + 0xc); *(int *)(this->_name)._buf = local_44->_id; *(undefined4 *)((this->_name)._buf + 4) = friendBallHealth; *(undefined4 *)((this->_name)._buf + 8) = uVar2; @@ -38423,12 +38423,12 @@ LAB_007ae611: *(char *)&local_44->_id = '\0'; } if (0xf < local_28) { - uVar8 = (int)local_28 + 1; + uVar8 = GHIDRA_INT(local_28) + 1; pvVar11 = local_3c[0]; if (0xfff < uVar8) { - pvVar11 = *(void **)((int)local_3c[0] + -4); - uVar8 = (int)local_28 + 0x24; - if (0x1f < (uint)((int)local_3c[0] + (-4 - (int)pvVar11))) { + pvVar11 = *(void **)(GHIDRA_INT(local_3c[0]) + -4); + uVar8 = GHIDRA_INT(local_28) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_3c[0]) + (-4 - GHIDRA_INT(pvVar11))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -38438,28 +38438,28 @@ LAB_007ae611: pGVar10 = local_58; local_2c = (GameStatePlayer *)0x0; local_28 = (GameStatePlayer *)0xf; - local_3c[0] = (void *)((uint)local_3c[0] & 0xffffff00); - uVar13 = (int)saveState[0x5b] - (int)saveState[0x5a] >> 2; - uVar8 = (int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2; + local_3c[0] = (void *)(GHIDRA_UINT(local_3c[0]) & 0xffffff00); + uVar13 = GHIDRA_INT(saveState[0x5b]) - GHIDRA_INT(saveState[0x5a]) >> 2; + uVar8 = GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2; if (uVar13 < uVar8) { uVar8 = uVar13; } local_44 = (EntityConfig_Player *)0x0; if (uVar8 != 0) { do { - *(undefined4 *)((int)(this->_collectibleCounts)._begin + (int)local_44 * 4) = - *(undefined4 *)((int)saveState[0x5a] + (int)local_44 * 4); - local_44 = (EntityConfig_Player *)((int)local_44 + 1); + *(undefined4 *)(GHIDRA_INT((this->_collectibleCounts)._begin) + GHIDRA_INT(local_44) * 4) = + *(undefined4 *)(GHIDRA_INT(saveState[0x5a]) + GHIDRA_INT(local_44) * 4); + local_44 = (EntityConfig_Player *)(GHIDRA_INT(local_44) + 1); } while (local_44 < uVar8); } piVar15 = this->_trinketsID; - *piVar15 = (int)saveState[99]; + *piVar15 = GHIDRA_INT(saveState[99]); local_44 = (EntityConfig_Player *)0x0; *(GameStatePlayer *)(this->_trinketsID + 1) = saveState[100]; do { - if ((int)(g_manager->_itemConfig)._trinkets._end - - (int)(g_manager->_itemConfig)._trinkets._begin >> 2 <= (int)(*piVar15 & 0x7fffU)) { + if (GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - + GHIDRA_INT((g_manager->_itemConfig)._trinkets._begin) >> 2 <= GHIDRA_INT((*piVar15 & 0x7fffU))) { if (local_44 == (EntityConfig_Player *)0x0) { trinketDst = piVar15; piVar17 = piVar15; @@ -38471,14 +38471,14 @@ LAB_007ae611: } this->_trinketsID[1] = 0; } - local_44 = (EntityConfig_Player *)((int)local_44 + 1); + local_44 = (EntityConfig_Player *)(GHIDRA_INT(local_44) + 1); piVar15 = piVar15 + 1; } while (local_44 < 2); local_40 = (GameStatePlayer)&this->_voidedCollectibles; (this->_voidedCollectibles)._end = ((std_vector *)local_40)->_begin; - local_44 = (EntityConfig_Player *)((int)local_58[0x5e] - (int)local_58[0x5d] >> 2); - if ((uint)((int)(this->_voidedCollectibles)._capacity - (int)((std_vector *)local_40)->_begin >> 2 - ) < local_44) { + local_44 = (EntityConfig_Player *)(GHIDRA_INT(local_58[0x5e]) - GHIDRA_INT(local_58[0x5d]) >> 2); + if (GHIDRA_UINT((GHIDRA_INT((this->_voidedCollectibles)._capacity) - GHIDRA_INT(((std_vector *)local_40)->_begin) >> 2 + )) < local_44) { if (0x3fffffff < local_44) { /* WARNING: Subroutine does not return */ std::_Xlen(); @@ -38488,31 +38488,31 @@ LAB_007ae611: GVar12 = local_40; local_40 = pGVar10[0x5d]; local_44 = (EntityConfig_Player *)0x0; - if ((int)pGVar10[0x5e] - (int)local_40 >> 2 != 0) { + if (GHIDRA_INT(pGVar10[0x5e]) - GHIDRA_INT(local_40) >> 2 != 0) { do { - local_40 = (GameStatePlayer)((int)local_40 + (int)local_44 * 4); + local_40 = (GameStatePlayer)(GHIDRA_INT(local_40) + GHIDRA_INT(local_44) * 4); if (*(int *)local_40 < - (int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2) { + GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2) { piVar15 = *(void **)((char *)GVar12 + 4); if (piVar15 == *(void **)((char *)GVar12 + 8)) { std::vector::_Emplace_reallocate(piVar15,local_40); } else { *piVar15 = *(int *)local_40; - *(void **)((char *)GVar12 + 4) = (void *)((int)*(void **)((char *)GVar12 + 4) + 4); + *(void **)((char *)GVar12 + 4) = (void *)(GHIDRA_INT(*(void **)((char *)GVar12 + 4)) + 4); } } local_40 = pGVar10[0x5d]; - local_44 = (EntityConfig_Player *)((int)local_44 + 1); - } while (local_44 < (uint)((int)pGVar10[0x5e] - (int)local_40 >> 2)); + local_44 = (EntityConfig_Player *)(GHIDRA_INT(local_44) + 1); + } while (local_44 < GHIDRA_UINT((GHIDRA_INT(pGVar10[0x5e]) - GHIDRA_INT(local_40) >> 2))); this = selfSaved; } pvVar11 = (this->_voidedPassives)._begin; local_40 = (GameStatePlayer)&this->_voidedPassives; (this->_voidedPassives)._end = pvVar11; - local_44 = (EntityConfig_Player *)((int)pGVar10[0x61] - (int)pGVar10[0x60] >> 3); - if ((uint)((int)(this->_voidedPassives)._capacity - (int)pvVar11 >> 3) < local_44) { + local_44 = (EntityConfig_Player *)(GHIDRA_INT(pGVar10[0x61]) - GHIDRA_INT(pGVar10[0x60]) >> 3); + if (GHIDRA_UINT((GHIDRA_INT((this->_voidedPassives)._capacity) - GHIDRA_INT(pvVar11) >> 3)) < local_44) { if (0x1fffffff < local_44) { /* WARNING: Subroutine does not return */ std::_Xlen(); @@ -38522,70 +38522,70 @@ LAB_007ae611: GVar12 = local_40; local_54 = pGVar10[0x60]; local_48 = (GameStatePlayer)0x0; - if ((int)pGVar10[0x61] - (int)local_54 >> 3 != 0) { + if (GHIDRA_INT(pGVar10[0x61]) - GHIDRA_INT(local_54) >> 3 != 0) { do { pGVar10 = local_58; - piVar15 = (int *)((int)local_54 + (int)local_48 * 8); + piVar15 = (int *)(GHIDRA_INT(local_54) + GHIDRA_INT(local_48) * 8); if (*piVar15 < - (int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2) { + GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2) { piVar17 = *(void **)((char *)GVar12 + 4); if (piVar17 == *(void **)((char *)GVar12 + 8)) { std::vector<8byte>::_Emplace_reallocate(piVar17,piVar15); } else { - iVar14 = *(int *)((char *)local_54 + 4 + (int)local_48 * 8); + iVar14 = *(int *)((char *)local_54 + 4 + GHIDRA_INT(local_48) * 8); *piVar17 = *piVar15; piVar17[1] = iVar14; - *(void **)((char *)GVar12 + 4) = (void *)((int)*(void **)((char *)GVar12 + 4) + 8); + *(void **)((char *)GVar12 + 4) = (void *)(GHIDRA_INT(*(void **)((char *)GVar12 + 4)) + 8); } } local_54 = pGVar10[0x60]; - local_48 = (GameStatePlayer)((int)local_48 + 1); - } while ((uint)local_48 < (uint)((int)pGVar10[0x61] - (int)local_54 >> 3)); + local_48 = (GameStatePlayer)(GHIDRA_INT(local_48) + 1); + } while (GHIDRA_UINT(local_48) < GHIDRA_UINT((GHIDRA_INT(pGVar10[0x61]) - GHIDRA_INT(local_54) >> 3))); this = selfSaved; } local_40 = (GameStatePlayer)&this->_movingBoxContents; - std::vector::resize(((int)pGVar10[0x79] - (int)pGVar10[0x78]) / 0x78); + std::vector::resize((GHIDRA_INT(pGVar10[0x79]) - GHIDRA_INT(pGVar10[0x78])) / 0x78); local_54 = pGVar10[0x78]; local_48 = (GameStatePlayer)0x0; - iVar14 = (int)pGVar10[0x79] - (int)local_54 >> 0x1f; - if (((int)pGVar10[0x79] - (int)local_54) / 0x78 + iVar14 != iVar14) { + iVar14 = GHIDRA_INT(pGVar10[0x79]) - GHIDRA_INT(local_54) >> 0x1f; + if ((GHIDRA_INT(pGVar10[0x79]) - GHIDRA_INT(local_54)) / 0x78 + iVar14 != iVar14) { local_44 = (EntityConfig_Player *)0x0; do { - movingBoxEntry = (undefined4 *)(*(int *)local_40 + (int)local_44); - *movingBoxEntry = *(undefined4 *)((char *)local_44 + (int)local_54); - movingBoxEntry[1] = *(undefined4 *)((char *)local_44 + 4U + (int)local_54); - movingBoxEntry[2] = *(undefined4 *)((char *)local_44 + 8U + (int)local_54); - movingBoxEntry[3] = *(undefined4 *)((char *)local_44 + 0xcU + (int)local_54); - movingBoxEntry[4] = *(undefined4 *)((char *)local_44 + 0x10U + (int)local_54); - movingBoxEntry[5] = *(undefined4 *)((char *)local_44 + 0x14U + (int)local_54); - movingBoxEntry[6] = *(undefined4 *)((char *)local_44 + 0x18U + (int)local_54); + movingBoxEntry = (undefined4 *)(*(int *)local_40 + GHIDRA_INT(local_44)); + *movingBoxEntry = *(undefined4 *)((char *)local_44 + GHIDRA_INT(local_54)); + movingBoxEntry[1] = *(undefined4 *)((char *)local_44 + 4U + GHIDRA_INT(local_54)); + movingBoxEntry[2] = *(undefined4 *)((char *)local_44 + 8U + GHIDRA_INT(local_54)); + movingBoxEntry[3] = *(undefined4 *)((char *)local_44 + 0xcU + GHIDRA_INT(local_54)); + movingBoxEntry[4] = *(undefined4 *)((char *)local_44 + 0x10U + GHIDRA_INT(local_54)); + movingBoxEntry[5] = *(undefined4 *)((char *)local_44 + 0x14U + GHIDRA_INT(local_54)); + movingBoxEntry[6] = *(undefined4 *)((char *)local_44 + 0x18U + GHIDRA_INT(local_54)); *(undefined1 *)((char *)movingBoxEntry + 0x22) = - *(undefined1 *)((char *)local_44 + 0x22U + (int)local_54); - movingBoxEntry[9] = *(undefined4 *)((char *)local_44 + 0x24U + (int)local_54); - movingBoxEntry[7] = *(undefined4 *)((char *)local_44 + 0x1cU + (int)local_54); - *(undefined2 *)(movingBoxEntry + 8) = *(undefined2 *)((char *)local_44 + 0x20U + (int)local_54); - movingBoxEntry[10] = *(undefined4 *)((char *)local_44 + 0x28U + (int)local_54); - movingBoxEntry[0xb] = *(undefined4 *)((char *)local_44 + 0x2cU + (int)local_54); - movingBoxEntry[0xc] = *(undefined4 *)((char *)local_44 + 0x30U + (int)local_54); - movingBoxEntry[0xd] = *(undefined4 *)((char *)local_44 + 0x34U + (int)local_54); - movingBoxEntry[0xe] = *(undefined4 *)((char *)local_44 + 0x38U + (int)local_54); - movingBoxEntry[0xf] = *(undefined4 *)((char *)local_44 + 0x3cU + (int)local_54); - movingBoxEntry[0x10] = *(undefined4 *)((char *)local_44 + 0x40U + (int)local_54); - iVar14 = *(int *)((char *)local_44 + 0x3cU + (int)local_54); + *(undefined1 *)((char *)local_44 + 0x22U + GHIDRA_INT(local_54)); + movingBoxEntry[9] = *(undefined4 *)((char *)local_44 + 0x24U + GHIDRA_INT(local_54)); + movingBoxEntry[7] = *(undefined4 *)((char *)local_44 + 0x1cU + GHIDRA_INT(local_54)); + *(undefined2 *)(movingBoxEntry + 8) = *(undefined2 *)((char *)local_44 + 0x20U + GHIDRA_INT(local_54)); + movingBoxEntry[10] = *(undefined4 *)((char *)local_44 + 0x28U + GHIDRA_INT(local_54)); + movingBoxEntry[0xb] = *(undefined4 *)((char *)local_44 + 0x2cU + GHIDRA_INT(local_54)); + movingBoxEntry[0xc] = *(undefined4 *)((char *)local_44 + 0x30U + GHIDRA_INT(local_54)); + movingBoxEntry[0xd] = *(undefined4 *)((char *)local_44 + 0x34U + GHIDRA_INT(local_54)); + movingBoxEntry[0xe] = *(undefined4 *)((char *)local_44 + 0x38U + GHIDRA_INT(local_54)); + movingBoxEntry[0xf] = *(undefined4 *)((char *)local_44 + 0x3cU + GHIDRA_INT(local_54)); + movingBoxEntry[0x10] = *(undefined4 *)((char *)local_44 + 0x40U + GHIDRA_INT(local_54)); + iVar14 = *(int *)((char *)local_44 + 0x3cU + GHIDRA_INT(local_54)); movingBoxEntry[0x12] = iVar14; movingBoxEntry[0x13] = iVar14 >> 0x1f; *(undefined1 *)((char *)movingBoxEntry + 0x23) = - *(undefined1 *)((char *)local_44 + 0x23U + (int)local_54); - movingBoxEntry[0x14] = *(undefined4 *)((char *)local_44 + 0x50U + (int)local_54); - movingBoxEntry[0x15] = *(undefined4 *)((char *)local_44 + 0x54U + (int)local_54); + *(undefined1 *)((char *)local_44 + 0x23U + GHIDRA_INT(local_54)); + movingBoxEntry[0x14] = *(undefined4 *)((char *)local_44 + 0x50U + GHIDRA_INT(local_54)); + movingBoxEntry[0x15] = *(undefined4 *)((char *)local_44 + 0x54U + GHIDRA_INT(local_54)); *(undefined1 *)(movingBoxEntry + 0x18) = - *(undefined1 *)((char *)local_44 + 0x60U + (int)local_54); - movingBoxEntry[0x16] = *(undefined4 *)((char *)local_44 + 0x58U + (int)local_54); - movingBoxEntry[0x17] = *(undefined4 *)((char *)local_44 + 0x5cU + (int)local_54); + *(undefined1 *)((char *)local_44 + 0x60U + GHIDRA_INT(local_54)); + movingBoxEntry[0x16] = *(undefined4 *)((char *)local_44 + 0x58U + GHIDRA_INT(local_54)); + movingBoxEntry[0x17] = *(undefined4 *)((char *)local_44 + 0x5cU + GHIDRA_INT(local_54)); local_4c = movingBoxEntry; - puVar9 = (undefined4 *)FUN_004d7250((int)local_54 + 100 + (int)local_44); + puVar9 = (undefined4 *)FUN_004d7250(GHIDRA_INT(local_54) + 100 + GHIDRA_INT(local_44)); pGVar10 = local_58; friendBallHealth = puVar9[1]; puVar9[1] = movingBoxEntry[0x1a]; @@ -38601,11 +38601,11 @@ LAB_007ae611: } pEVar6 = local_44; local_14 = (void *)0xffffffff; - ((SharedPtr *)(local_4c + 0x1b))->SharedPtr::assign((void *)((int)local_54 + 0x6c + (int)local_44)); + ((SharedPtr *)(local_4c + 0x1b))->SharedPtr::assign((void *)(GHIDRA_INT(local_54) + 0x6c + GHIDRA_INT(local_44))); local_54 = pGVar10[0x78]; - local_44 = (EntityConfig_Player *)((int)pEVar6 + 0x78); - local_48 = (GameStatePlayer)((int)local_48 + 1); - } while ((uint)local_48 < (uint)(((int)pGVar10[0x79] - (int)local_54) / 0x78)); + local_44 = (EntityConfig_Player *)(GHIDRA_INT(pEVar6) + 0x78); + local_48 = (GameStatePlayer)(GHIDRA_INT(local_48) + 1); + } while (GHIDRA_UINT(local_48) < GHIDRA_UINT(((GHIDRA_INT(pGVar10[0x79]) - GHIDRA_INT(local_54)) / 0x78))); this = selfSaved; } self = selfSaved; @@ -38619,43 +38619,43 @@ LAB_007ae611: playerFormDst = playerFormDst + 1; iVar14 = iVar14 + -1; } while (iVar14 != 0); - selfSaved->_playerFormsRewarded = (int)pGVar10[0x59]; + selfSaved->_playerFormsRewarded = GHIDRA_INT(pGVar10[0x59]); ClearCostumes(selfSaved); local_48 = (GameStatePlayer)0x0; if (pGVar10[0x74] != (GameStatePlayer)0x0) { do { - local_4c = *(undefined4 **)((int)pGVar10[0x75] + 4 + (int)local_48 * 8); + local_4c = *(undefined4 **)(GHIDRA_INT(pGVar10[0x75]) + 4 + GHIDRA_INT(local_48) * 8); if ((local_4c < (undefined4 *) - ((int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2)) && - (*(uint *)((int)pGVar10[0x75] + (int)local_48 * 8) < 5)) { + (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2)) && + (*(uint *)(GHIDRA_INT(pGVar10[0x75]) + GHIDRA_INT(local_48) * 8) < 5)) { /* WARNING: Could not recover jumptable at 0x007aeb80. Too many branches */ /* WARNING: Treating indirect jump as call */ - (*(code *)(&PTR_DAT_007afc04)[*(int *)((int)pGVar10[0x75] + (int)local_48 * 8)])(); + (*(code *)(&PTR_DAT_007afc04)[*(int *)(GHIDRA_INT(pGVar10[0x75]) + GHIDRA_INT(local_48) * 8)])(); return; } - local_48 = (GameStatePlayer)((int)local_48 + 1); + local_48 = (GameStatePlayer)(GHIDRA_INT(local_48) + 1); self = selfSaved; pGVar10 = local_58; - } while ((uint)local_48 < (uint)local_58[0x74]); + } while (GHIDRA_UINT(local_48) < GHIDRA_UINT(local_58[0x74])); } - uVar13 = (int)pGVar10[0x72] - (int)pGVar10[0x71] >> 2; - uVar8 = (int)(self->_pillEffectUses)._end - (int)(self->_pillEffectUses)._begin >> 2; + uVar13 = GHIDRA_INT(pGVar10[0x72]) - GHIDRA_INT(pGVar10[0x71]) >> 2; + uVar8 = GHIDRA_INT((self->_pillEffectUses)._end) - GHIDRA_INT((self->_pillEffectUses)._begin) >> 2; if (uVar13 < uVar8) { uVar8 = uVar13; } local_44 = (EntityConfig_Player *)0x0; if (uVar8 != 0) { do { - *(undefined4 *)((int)(self->_pillEffectUses)._begin + (int)local_44 * 4) = - *(undefined4 *)((int)pGVar10[0x71] + (int)local_44 * 4); - local_44 = (EntityConfig_Player *)((int)local_44 + 1); + *(undefined4 *)(GHIDRA_INT((self->_pillEffectUses)._begin) + GHIDRA_INT(local_44) * 4) = + *(undefined4 *)(GHIDRA_INT(pGVar10[0x71]) + GHIDRA_INT(local_44) * 4); + local_44 = (EntityConfig_Player *)(GHIDRA_INT(local_44) + 1); } while (local_44 < uVar8); } - uVar13 = (int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2; - uVar8 = (int)pGVar10[0x66] - (int)pGVar10[0x65] >> 2; + uVar13 = GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2; + uVar8 = GHIDRA_INT(pGVar10[0x66]) - GHIDRA_INT(pGVar10[0x65]) >> 2; if (uVar13 < uVar8) { uVar8 = uVar13; } @@ -38663,18 +38663,18 @@ LAB_007ae611: uVar13 = 0; local_44 = (EntityConfig_Player *)0x0; do { - puVar9 = (undefined4 *)((int)(self->_collectibleRNGs)._begin + (int)local_44); + puVar9 = (undefined4 *)(GHIDRA_INT((self->_collectibleRNGs)._begin) + GHIDRA_INT(local_44)); iVar14 = uVar13 * 4; uVar13 = uVar13 + 1; - *puVar9 = *(undefined4 *)((int)pGVar10[0x65] + iVar14); + *puVar9 = *(undefined4 *)(GHIDRA_INT(pGVar10[0x65]) + iVar14); *(undefined8 *)(puVar9 + 1) = 0x900000005; puVar9[3] = 7; - local_44 = (EntityConfig_Player *)((int)local_44 + 0x10); + local_44 = (EntityConfig_Player *)(GHIDRA_INT(local_44) + 0x10); } while (uVar13 < uVar8); } - uVar13 = (int)(g_manager->_itemConfig)._trinkets._end - - (int)(g_manager->_itemConfig)._trinkets._begin >> 2; - uVar8 = (int)pGVar10[0x69] - (int)pGVar10[0x68] >> 2; + uVar13 = GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - + GHIDRA_INT((g_manager->_itemConfig)._trinkets._begin) >> 2; + uVar8 = GHIDRA_INT(pGVar10[0x69]) - GHIDRA_INT(pGVar10[0x68]) >> 2; if (uVar13 < uVar8) { uVar8 = uVar13; } @@ -38682,18 +38682,18 @@ LAB_007ae611: uVar13 = 0; local_44 = (EntityConfig_Player *)0x0; do { - puVar9 = (undefined4 *)((int)(self->_trinketRNGs)._begin + (int)local_44); + puVar9 = (undefined4 *)(GHIDRA_INT((self->_trinketRNGs)._begin) + GHIDRA_INT(local_44)); iVar14 = uVar13 * 4; uVar13 = uVar13 + 1; - *puVar9 = *(undefined4 *)((int)pGVar10[0x68] + iVar14); + *puVar9 = *(undefined4 *)(GHIDRA_INT(pGVar10[0x68]) + iVar14); *(undefined8 *)(puVar9 + 1) = 0x900000005; puVar9[3] = 7; - local_44 = (EntityConfig_Player *)((int)local_44 + 0x10); + local_44 = (EntityConfig_Player *)(GHIDRA_INT(local_44) + 0x10); } while (uVar13 < uVar8); } - uVar13 = (int)(g_manager->_itemConfig)._pillEffects._end - - (int)(g_manager->_itemConfig)._pillEffects._begin >> 2; - uVar8 = (int)pGVar10[0x6c] - (int)pGVar10[0x6b] >> 2; + uVar13 = GHIDRA_INT((g_manager->_itemConfig)._pillEffects._end) - + GHIDRA_INT((g_manager->_itemConfig)._pillEffects._begin) >> 2; + uVar8 = GHIDRA_INT(pGVar10[0x6c]) - GHIDRA_INT(pGVar10[0x6b]) >> 2; if (uVar13 < uVar8) { uVar8 = uVar13; } @@ -38701,34 +38701,34 @@ LAB_007ae611: uVar13 = 0; local_44 = (EntityConfig_Player *)0x0; do { - puVar9 = (undefined4 *)((int)(self->_pillRNGs)._begin + (int)local_44); + puVar9 = (undefined4 *)(GHIDRA_INT((self->_pillRNGs)._begin) + GHIDRA_INT(local_44)); iVar14 = uVar13 * 4; uVar13 = uVar13 + 1; - *puVar9 = *(undefined4 *)((int)pGVar10[0x6b] + iVar14); + *puVar9 = *(undefined4 *)(GHIDRA_INT(pGVar10[0x6b]) + iVar14); *(undefined8 *)(puVar9 + 1) = 0x900000005; puVar9[3] = 7; - local_44 = (EntityConfig_Player *)((int)local_44 + 0x10); + local_44 = (EntityConfig_Player *)(GHIDRA_INT(local_44) + 0x10); } while (uVar13 < uVar8); } GVar12 = (GameStatePlayer) - ((int)(g_manager->_itemConfig)._cards._end - (int)(g_manager->_itemConfig)._cards._begin + (GHIDRA_INT((g_manager->_itemConfig)._cards._end) - GHIDRA_INT((g_manager->_itemConfig)._cards._begin) >> 2); - local_40 = (GameStatePlayer)((int)pGVar10[0x6f] - (int)pGVar10[0x6e] >> 2); - if ((uint)GVar12 < (uint)local_40) { + local_40 = (GameStatePlayer)(GHIDRA_INT(pGVar10[0x6f]) - GHIDRA_INT(pGVar10[0x6e]) >> 2); + if (GHIDRA_UINT(GVar12) < GHIDRA_UINT(local_40)) { local_40 = GVar12; } GVar12 = (GameStatePlayer)0x0; if (local_40 != (GameStatePlayer)0x0) { local_44 = (EntityConfig_Player *)0x0; do { - puVar9 = (undefined4 *)((int)(self->_cardRNGs)._begin + (int)local_44); - iVar14 = (int)GVar12 * 4; - GVar12 = (GameStatePlayer)((int)GVar12 + 1); - *puVar9 = *(undefined4 *)((int)pGVar10[0x6e] + iVar14); + puVar9 = (undefined4 *)(GHIDRA_INT((self->_cardRNGs)._begin) + GHIDRA_INT(local_44)); + iVar14 = GHIDRA_INT(GVar12) * 4; + GVar12 = (GameStatePlayer)(GHIDRA_INT(GVar12) + 1); + *puVar9 = *(undefined4 *)(GHIDRA_INT(pGVar10[0x6e]) + iVar14); *(undefined8 *)(puVar9 + 1) = 0x900000005; puVar9[3] = 7; - local_44 = (EntityConfig_Player *)((int)local_44 + 0x10); - } while ((uint)GVar12 < (uint)local_40); + local_44 = (EntityConfig_Player *)(GHIDRA_INT(local_44) + 0x10); + } while (GHIDRA_UINT(GVar12) < GHIDRA_UINT(local_40)); } self->_goldenHearts = 0; self->_eternalHearts = 0; @@ -38739,13 +38739,13 @@ LAB_007ae611: self->_redHearts = 0; self->_brokenHearts = 0; self->_rottenHearts = 0; - AddMaxHearts(self,(int)pGVar10[2],1); - self->_blackHearts = (int)pGVar10[4]; - AddSoulHearts(self,(int)pGVar10[3],0); - self->_eternalHearts = (int)pGVar10[5]; - self->_boneHearts = (int)pGVar10[0xdd]; - self->_boneHeartsMask = (int)pGVar10[0xde]; - AddHearts(self,(int)pGVar10[1],1,0); + AddMaxHearts(self,GHIDRA_INT(pGVar10[2]),1); + self->_blackHearts = GHIDRA_INT(pGVar10[4]); + AddSoulHearts(self,GHIDRA_INT(pGVar10[3]),0); + self->_eternalHearts = GHIDRA_INT(pGVar10[5]); + self->_boneHearts = GHIDRA_INT(pGVar10[0xdd]); + self->_boneHeartsMask = GHIDRA_INT(pGVar10[0xde]); + AddHearts(self,GHIDRA_INT(pGVar10[1]),1,0); if ((*(char *)(pGVar10 + 0xe6) != '\0') && (self->_subPlayer != 0)) { FUN_007ae430(pGVar10 + 0xe7); } @@ -38757,17 +38757,17 @@ LAB_007ae611: local_28 = (GameStatePlayer *)0x0; local_14 = (void *)0x1; local_40 = (GameStatePlayer)&g_game->_playerManager; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(((PlayerManager *)local_40)->_playerList)._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((((PlayerManager *)local_40)->_playerList)._begin) >> 2 != 0) { uVar8 = 0; do { pvVar11 = *(void **)((char *)local_40 + 4); - if ((int)pvVar11 - *(int *)local_40 >> 2 == 0) { + if (GHIDRA_INT(pvVar11) - *(int *)local_40 >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar11 = *(void **)((char *)local_40 + 4); } pGVar10 = *(GameStatePlayer **)local_40; - if (uVar8 < (uint)((int)pvVar11 - (int)pGVar10 >> 2)) { + if (uVar8 < GHIDRA_UINT((GHIDRA_INT(pvVar11) - GHIDRA_INT(pGVar10) >> 2))) { pGVar10 = pGVar10 + uVar8; } local_54 = *pGVar10; @@ -38776,9 +38776,9 @@ LAB_007ae611: if ((mainPlayer == (Entity_Player *)0x0) || (mainPlayer->_type != 1)) { local_40 = (GameStatePlayer)g_game; piVar15 = (g_game->_playerManager)._playerList._begin; - if ((int)(g_game->_playerManager)._playerList._end - (int)piVar15 >> 2 == 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT(piVar15) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); - piVar15 = (((PlayerManager *)((int)local_40 + 0x1baa8))->_playerList)._begin; + piVar15 = (((PlayerManager *)(GHIDRA_INT(local_40) + 0x1baa8))->_playerList)._begin; } mainPlayer = (Entity_Player *)*piVar15; } @@ -38791,41 +38791,41 @@ LAB_007ae611: } else { *(GameStatePlayer *)local_48 = local_54; - local_48 = (GameStatePlayer)((int)local_48 + 4); + local_48 = (GameStatePlayer)(GHIDRA_INT(local_48) + 4); local_2c = (GameStatePlayer *)local_48; } } } uVar8 = uVar8 + 1; local_40 = (GameStatePlayer)&g_game->_playerManager; - } while (uVar8 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(((PlayerManager *)local_40)->_playerList)._begin >> 2)); + } while (uVar8 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((((PlayerManager *)local_40)->_playerList)._begin) >> 2))); pGVar10 = local_58; } local_40 = pGVar10[0xe3]; local_4c = (void *)0x0; - iVar14 = (int)pGVar10[0xe4] - (int)local_40 >> 0x1f; + iVar14 = GHIDRA_INT(pGVar10[0xe4]) - GHIDRA_INT(local_40) >> 0x1f; local_54 = (GameStatePlayer)local_30; - if (((int)pGVar10[0xe4] - (int)local_40) / 0x1c + iVar14 != iVar14) { - iVar14 = (int)local_48 - (int)local_30; + if ((GHIDRA_INT(pGVar10[0xe4]) - GHIDRA_INT(local_40)) / 0x1c + iVar14 != iVar14) { + iVar14 = GHIDRA_INT(local_48) - GHIDRA_INT(local_30); local_48 = (GameStatePlayer)0x0; do { - psVar16 = (short *)((int)(int *)local_48 + (int)local_40); + psVar16 = (short *)(GHIDRA_INT((int *)local_48) + GHIDRA_INT(local_40)); if (local_4c < (void *)(iVar14 >> 2)) { - if (*(int *)(*(int *)((char *)local_54 + (int)local_4c * 4) + 0x1aec) == (int)*psVar16) { + if (*(int *)(*(int *)((char *)local_54 + GHIDRA_INT(local_4c) * 4) + 0x1aec) == GHIDRA_INT(*psVar16)) { FUN_007ae430(psVar16); } } else { - ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::SpawnCoPlayerBaby((int)*psVar16); - FUN_007ae430((int)(int *)local_48 + (int)local_40); + ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::SpawnCoPlayerBaby(GHIDRA_INT(*psVar16)); + FUN_007ae430(GHIDRA_INT((int *)local_48) + GHIDRA_INT(local_40)); ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::RemoveCoPlayer(player,(byte)player); pGVar10 = local_58; } local_40 = pGVar10[0xe3]; - local_4c = (undefined4 *)((int)local_4c + 1); - local_48 = (GameStatePlayer)((int)local_48 + 0x1c); - } while (local_4c < (void *)(((int)pGVar10[0xe4] - (int)local_40) / 0x1c)); + local_4c = (undefined4 *)(GHIDRA_INT(local_4c) + 1); + local_48 = (GameStatePlayer)(GHIDRA_INT(local_48) + 0x1c); + } while (local_4c < (void *)((GHIDRA_INT(pGVar10[0xe4]) - GHIDRA_INT(local_40)) / 0x1c)); self = selfSaved; } if (&self->_history != (History *)(pGVar10 + 0xef)) { @@ -38835,7 +38835,7 @@ LAB_007ae611: GVar12 = pGVar10[0xf3]; GVar4 = pGVar10[0xf4]; GVar5 = pGVar10[0xf5]; - self->_inventory[0] = (int)pGVar10[0xf2]; + self->_inventory[0] = GHIDRA_INT(pGVar10[0xf2]); *(GameStatePlayer *)(self->_inventory + 1) = GVar12; *(GameStatePlayer *)(self->_inventory + 2) = GVar4; *(GameStatePlayer *)(self->_inventory + 3) = GVar5; @@ -38862,12 +38862,12 @@ LAB_007ae611: *(GameStatePlayer *)(self->_inventory + 0xf) = GVar5; HUD::mark_all_slots_dirty(&game->_hud,0,0); uVar8 = 0; - if ((int)(self->_smeltedTrinkets)._end - (int)(self->_smeltedTrinkets)._begin >> 2 != 0) { + if (GHIDRA_INT((self->_smeltedTrinkets)._end) - GHIDRA_INT((self->_smeltedTrinkets)._begin) >> 2 != 0) { do { - *(undefined4 *)((int)(self->_smeltedTrinkets)._begin + uVar8 * 4) = 0; + *(undefined4 *)(GHIDRA_INT((self->_smeltedTrinkets)._begin) + uVar8 * 4) = 0; uVar8 = uVar8 + 1; - } while (uVar8 < (uint)((int)(self->_smeltedTrinkets)._end - - (int)(self->_smeltedTrinkets)._begin >> 2)); + } while (uVar8 < GHIDRA_UINT((GHIDRA_INT((self->_smeltedTrinkets)._end) - + GHIDRA_INT((self->_smeltedTrinkets)._begin) >> 2))); } pvVar11 = (self->_history)._historyItems._begin; if (pvVar11 != (self->_history)._historyItems._end) { @@ -38876,48 +38876,48 @@ LAB_007ae611: uVar8 = *(uint *)((char *)pvVar11 + 8) & 0x7fff; smeltedCounts = (self->_smeltedTrinkets)._begin; if ((*(uint *)((char *)pvVar11 + 8) >> 0xf & 1) == 0) { - psVar16 = (short *)((int)smeltedCounts + uVar8 * 4); + psVar16 = (short *)(GHIDRA_INT(smeltedCounts) + uVar8 * 4); *psVar16 = *psVar16 + 1; } else { - psVar16 = (short *)((int)smeltedCounts + uVar8 * 4 + 2); + psVar16 = (short *)(GHIDRA_INT(smeltedCounts) + uVar8 * 4 + 2); *psVar16 = *psVar16 + 1; } } - pvVar11 = (void *)((int)pvVar11 + 0x1c); + pvVar11 = (void *)(GHIDRA_INT(pvVar11) + 0x1c); } while (pvVar11 != (self->_history)._historyItems._end); pGVar10 = local_58; } - self->_jarHearts = (int)pGVar10[6]; - self->_jarFlies = (int)pGVar10[7]; - self->_numCoins = (int)pGVar10[8]; - self->_numKeys = (int)pGVar10[9]; - self->_numBombs = (int)pGVar10[10]; + self->_jarHearts = GHIDRA_INT(pGVar10[6]); + self->_jarFlies = GHIDRA_INT(pGVar10[7]); + self->_numCoins = GHIDRA_INT(pGVar10[8]); + self->_numKeys = GHIDRA_INT(pGVar10[9]); + self->_numBombs = GHIDRA_INT(pGVar10[10]); self->_hasGoldenKey = *(byte *)(pGVar10 + 0xb); self->_hasGoldenBomb = (*(undefined1 *)((char *)&(pGVar10[0xb]) + 0x1)); - self->_monkeyPawCounter = (uint)*(ushort *)&(*(undefined1 *)((char *)&(pGVar10[0xb]) + 0x2)); - self->_totalDamageTaken = (uint)*(ushort *)(pGVar10 + 0xc); + self->_monkeyPawCounter = GHIDRA_UINT(*(ushort *)&(*(undefined1 *)((char *)&(pGVar10[0xb]) + 0x2))); + self->_totalDamageTaken = GHIDRA_UINT(*(ushort *)(pGVar10 + 0xc)); self->_holyMantleState = -((*(undefined1 *)((char *)&(pGVar10[0xc]) + 0x2)) != '\0') & 2; self->_tonsilCounter = *(short *)(pGVar10 + 0xd); self->_tonsilCount = *(short *)&(*(undefined1 *)((char *)&(pGVar10[0xd]) + 0x2)); self->_numLeprosy = *(short *)(pGVar10 + 0xe); - self->_speedModifier = (int)pGVar10[0x12]; - self->_fireDelayModifier = (int)pGVar10[0x13]; - self->_damageModifier = (int)pGVar10[0x14]; - self->_tearRangeModifier = (int)pGVar10[0x15]; - self->_shotSpeedModifier = (int)pGVar10[0x16]; - self->_luckModifier = (int)pGVar10[0x17]; - self->_donateLuck = (int)pGVar10[0x18]; - self->_potatoPeelerCounter = (int)pGVar10[0x19]; - self->_potatoPeelerBandageCounter = (int)pGVar10[0x1a]; + self->_speedModifier = GHIDRA_INT(pGVar10[0x12]); + self->_fireDelayModifier = GHIDRA_INT(pGVar10[0x13]); + self->_damageModifier = GHIDRA_INT(pGVar10[0x14]); + self->_tearRangeModifier = GHIDRA_INT(pGVar10[0x15]); + self->_shotSpeedModifier = GHIDRA_INT(pGVar10[0x16]); + self->_luckModifier = GHIDRA_INT(pGVar10[0x17]); + self->_donateLuck = GHIDRA_INT(pGVar10[0x18]); + self->_potatoPeelerCounter = GHIDRA_INT(pGVar10[0x19]); + self->_potatoPeelerBandageCounter = GHIDRA_INT(pGVar10[0x1a]); self->_brittleBonesUpgrades = *(short *)(pGVar10 + 0xee); - self->_redStewBonusDuration = (int)pGVar10[0x10f]; - self->_brokenHearts = (int)pGVar10[0x110]; - self->_rottenHearts = (int)pGVar10[0x111]; - self->_effectiveSoulCharge = (int)pGVar10[0x112]; + self->_redStewBonusDuration = GHIDRA_INT(pGVar10[0x10f]); + self->_brokenHearts = GHIDRA_INT(pGVar10[0x110]); + self->_rottenHearts = GHIDRA_INT(pGVar10[0x111]); + self->_effectiveSoulCharge = GHIDRA_INT(pGVar10[0x112]); *(GameStatePlayer *)&(*(undefined1 *)((char *)(self) + 0x1dcc)) = pGVar10[0x113]; - self->_urnSouls = (int)pGVar10[0x114]; - self->_numGigaBombs = (int)pGVar10[0x115]; + self->_urnSouls = GHIDRA_INT(pGVar10[0x114]); + self->_numGigaBombs = GHIDRA_INT(pGVar10[0x115]); *(undefined8 *)&(*(undefined1 *)((char *)(self) + 0x1db0)) = *(undefined8 *)(pGVar10 + 0x116); *(GameStatePlayer *)&(*(undefined1 *)((char *)(self) + 0x1db8)) = pGVar10[0x118]; *(undefined8 *)&(*(undefined1 *)((char *)(self) + 0x1dbc)) = *(undefined8 *)(pGVar10 + 0x119); @@ -38929,27 +38929,27 @@ LAB_007ae611: self->_rockBottomTearRange = (float)pGVar10[0x120]; self->_rockBottomMoveSpeed = (float)pGVar10[0x11d]; self->_rockBottomShotSpeed = (float)pGVar10[0x121]; - self->_reverseEmpressMaxHearts = (int)pGVar10[0x123]; - self->_reverseSunBoneHearts = (int)pGVar10[0x124]; + self->_reverseEmpressMaxHearts = GHIDRA_INT(pGVar10[0x123]); + self->_reverseSunBoneHearts = GHIDRA_INT(pGVar10[0x124]); *(GameStatePlayer *)&(*(undefined1 *)((char *)(self) + 0x1ed8)) = pGVar10[0x125]; *(GameStatePlayer *)&(*(undefined1 *)((char *)(self) + 0x1ec8)) = pGVar10[0x126]; - self->_forgottenBodyRoomIdx = (int)pGVar10[0x127]; + self->_forgottenBodyRoomIdx = GHIDRA_INT(pGVar10[0x127]); (self->_forgottenBodyPos).x = (float)pGVar10[0x128]; (self->_forgottenBodyPos).y = (float)pGVar10[0x129]; *(GameStatePlayer *)&(*(undefined1 *)((char *)(self) + 0x1f14)) = pGVar10[0x12a]; - self->_maggyHealthDrainCooldown = (int)pGVar10[299]; + self->_maggyHealthDrainCooldown = GHIDRA_INT(pGVar10[299]); if (&self->_echoChamberItems != (std_deque *)(pGVar10 + 300)) { - local_40 = (GameStatePlayer)((uint)local_40 & 0xffffff00); + local_40 = (GameStatePlayer)(GHIDRA_UINT(local_40) & 0xffffff00); std::deque::operator_assign(pGVar10 + 300,local_40); } uVar8 = 8; - if ((uint)((int)pGVar10[0x132] - (int)pGVar10[0x131]) < 8) { - uVar8 = (int)pGVar10[0x132] - (int)pGVar10[0x131]; + if (GHIDRA_UINT((GHIDRA_INT(pGVar10[0x132]) - GHIDRA_INT(pGVar10[0x131]))) < 8) { + uVar8 = GHIDRA_INT(pGVar10[0x132]) - GHIDRA_INT(pGVar10[0x131]); } uVar13 = 0; if (uVar8 != 0) { do { - self->_bagOfCraftingContent[uVar13] = *(byte *)(uVar13 + (int)pGVar10[0x131]); + self->_bagOfCraftingContent[uVar13] = *(byte *)(uVar13 + GHIDRA_INT(pGVar10[0x131])); uVar13 = uVar13 + 1; } while (uVar13 < uVar8); } @@ -38957,67 +38957,67 @@ LAB_007ae611: *(GameStatePlayer *)&(*(undefined1 *)((char *)(self) + 0x1f50)) = pGVar10[0x135]; self->_bagOfCraftingOutput = GVar12; uVar8 = 6; - if ((uint)((int)pGVar10[0x138] - (int)pGVar10[0x137]) < 6) { - uVar8 = (int)pGVar10[0x138] - (int)pGVar10[0x137]; + if (GHIDRA_UINT((GHIDRA_INT(pGVar10[0x138]) - GHIDRA_INT(pGVar10[0x137]))) < 6) { + uVar8 = GHIDRA_INT(pGVar10[0x138]) - GHIDRA_INT(pGVar10[0x137]); } uVar13 = 0; if (uVar8 != 0) { do { - self->_poopSpellQueue[uVar13] = *(byte *)(uVar13 + (int)pGVar10[0x137]); + self->_poopSpellQueue[uVar13] = *(byte *)(uVar13 + GHIDRA_INT(pGVar10[0x137])); uVar13 = uVar13 + 1; } while (uVar13 < uVar8); } uVar8 = 0x14; - if ((uint)((int)pGVar10[0x13b] - (int)pGVar10[0x13a]) < 0x14) { - uVar8 = (int)pGVar10[0x13b] - (int)pGVar10[0x13a]; + if (GHIDRA_UINT((GHIDRA_INT(pGVar10[0x13b]) - GHIDRA_INT(pGVar10[0x13a]))) < 0x14) { + uVar8 = GHIDRA_INT(pGVar10[0x13b]) - GHIDRA_INT(pGVar10[0x13a]); } uVar13 = 0; if (uVar8 != 0) { do { - self->_poopSpellQueue[uVar13 + 6] = *(byte *)(uVar13 + (int)pGVar10[0x13a]); + self->_poopSpellQueue[uVar13 + 6] = *(byte *)(uVar13 + GHIDRA_INT(pGVar10[0x13a])); uVar13 = uVar13 + 1; } while (uVar13 < uVar8); } (*(undefined1 *)((char *)(self) + 0x1f72)) = *(undefined1 *)(pGVar10 + 0x13d); - self->_poopMana = (int)pGVar10[0x136]; + self->_poopMana = GHIDRA_INT(pGVar10[0x136]); *(GameStatePlayer *)&(*(undefined1 *)((char *)(self) + 0x1f74)) = pGVar10[0x13e]; - self->_effectiveBloodCharge = (int)pGVar10[0x13f]; + self->_effectiveBloodCharge = GHIDRA_INT(pGVar10[0x13f]); if (&self->_itemCards != (std_vector *)(pGVar10 + 0x140)) { local_5c = pGVar10[0x140]; - local_48 = (GameStatePlayer)((int)pGVar10[0x141] - (int)local_5c); - local_40 = (GameStatePlayer)((int)local_48 >> 2); + local_48 = (GameStatePlayer)(GHIDRA_INT(pGVar10[0x141]) - GHIDRA_INT(local_5c)); + local_40 = (GameStatePlayer)(GHIDRA_INT(local_48) >> 2); local_4c = (self->_itemCards)._begin; - if ((uint)((int)(self->_itemCards)._capacity - (int)local_4c >> 2) < (uint)local_40) { + if (GHIDRA_UINT((GHIDRA_INT((self->_itemCards)._capacity) - GHIDRA_INT(local_4c) >> 2)) < GHIDRA_UINT(local_40)) { std::vector::reserve_clear(local_40); local_4c = (self->_itemCards)._begin; } memmove(local_4c,(void *)local_5c,(size_t)local_48); - (self->_itemCards)._end = (void *)((int)(int *)local_48 + (int)local_4c); + (self->_itemCards)._end = (void *)(GHIDRA_INT((int *)local_48) + GHIDRA_INT(local_4c)); } - self->_modelingClayEffect = (int)pGVar10[0x143]; - self->_keepersSackBonus = (int)pGVar10[0x144]; + self->_modelingClayEffect = GHIDRA_INT(pGVar10[0x143]); + self->_keepersSackBonus = GHIDRA_INT(pGVar10[0x144]); self->_isLevelStartPending = *(byte *)(pGVar10 + 0x14d); self->_hasCurseMistEffect = (*(undefined1 *)((char *)&(pGVar10[0x14d]) + 0x1)); GVar12 = pGVar10[0x14f]; GVar4 = pGVar10[0x150]; GVar5 = pGVar10[0x151]; - (self->_consumablesBackup).coins = (int)pGVar10[0x14e]; - (self->_consumablesBackup).keys = (int)GVar12; - (self->_consumablesBackup).bombs = (int)GVar4; + (self->_consumablesBackup).coins = GHIDRA_INT(pGVar10[0x14e]); + (self->_consumablesBackup).keys = GHIDRA_INT(GVar12); + (self->_consumablesBackup).bombs = GHIDRA_INT(GVar4); *(GameStatePlayer *)&(self->_consumablesBackup).goldkey = GVar5; GVar12 = pGVar10[0x153]; GVar4 = pGVar10[0x154]; GVar5 = pGVar10[0x155]; - (self->_consumablesBackup).soulcharges = (int)pGVar10[0x152]; - (self->_consumablesBackup).gigabombs = (int)GVar12; - (self->_consumablesBackup).poopmana = (int)GVar4; - (self->_consumablesBackup).bloodcharges = (int)GVar5; + (self->_consumablesBackup).soulcharges = GHIDRA_INT(pGVar10[0x152]); + (self->_consumablesBackup).gigabombs = GHIDRA_INT(GVar12); + (self->_consumablesBackup).poopmana = GHIDRA_INT(GVar4); + (self->_consumablesBackup).bloodcharges = GHIDRA_INT(GVar5); if (&self->_curseMistFamiliars != (std_vector *)(pGVar10 + 0x156)) { std::vector<52byte>::assign(pGVar10[0x156],pGVar10[0x157],local_5c); } - self->_curseMistRedHearts = (int)pGVar10[0x159]; + self->_curseMistRedHearts = GHIDRA_INT(pGVar10[0x159]); GVar12 = pGVar10[0x15b]; - self->_curseMistPocketSlots[0] = (int)pGVar10[0x15a]; + self->_curseMistPocketSlots[0] = GHIDRA_INT(pGVar10[0x15a]); *(GameStatePlayer *)(self->_curseMistPocketSlots + 1) = GVar12; GVar12 = pGVar10[0x15d]; *(GameStatePlayer *)(self->_curseMistPocketSlots + 2) = pGVar10[0x15c]; @@ -39028,11 +39028,11 @@ LAB_007ae611: GVar12 = pGVar10[0x161]; *(GameStatePlayer *)(self->_curseMistPocketSlots + 6) = pGVar10[0x160]; *(GameStatePlayer *)(self->_curseMistPocketSlots + 7) = GVar12; - self->_curseMistTrinkets[0] = (int)pGVar10[0x162]; + self->_curseMistTrinkets[0] = GHIDRA_INT(pGVar10[0x162]); *(GameStatePlayer *)(self->_curseMistTrinkets + 1) = pGVar10[0x163]; self->_isCoopGhost = *(byte *)(pGVar10 + 0x164); GVar12 = pGVar10[0x166]; - self->_ghostPocketSlots[0] = (int)pGVar10[0x165]; + self->_ghostPocketSlots[0] = GHIDRA_INT(pGVar10[0x165]); *(GameStatePlayer *)(self->_ghostPocketSlots + 1) = GVar12; GVar12 = pGVar10[0x168]; *(GameStatePlayer *)(self->_ghostPocketSlots + 2) = pGVar10[0x167]; @@ -39043,12 +39043,12 @@ LAB_007ae611: GVar12 = pGVar10[0x16c]; *(GameStatePlayer *)(self->_ghostPocketSlots + 6) = pGVar10[0x16b]; *(GameStatePlayer *)(self->_ghostPocketSlots + 7) = GVar12; - self->_ghostTrinkets[0] = (int)pGVar10[0x16d]; + self->_ghostTrinkets[0] = GHIDRA_INT(pGVar10[0x16d]); *(GameStatePlayer *)(self->_ghostTrinkets + 1) = pGVar10[0x16e]; self->_wildCardItemType = *(byte *)(pGVar10 + 0x16f); - self->_wildCardItem = (int)pGVar10[0x170]; - self->_wildCardVarData = (int)pGVar10[0x171]; - self->_samsonBerserkCharge = (int)pGVar10[0x172]; + self->_wildCardItem = GHIDRA_INT(pGVar10[0x170]); + self->_wildCardVarData = GHIDRA_INT(pGVar10[0x171]); + self->_samsonBerserkCharge = GHIDRA_INT(pGVar10[0x172]); self->_ibsCharge = (float)pGVar10[0x173]; std_map_copy_assign(&(self->_proceduralItems)._itemIds,pGVar10 + 0x175); ((GlitchedItemSet *)(&self->_proceduralItems))->GlitchedItemSet::recalculate(); @@ -39059,43 +39059,43 @@ LAB_007ae611: selfSaved->_edenTearRange = (float)pGVar10[0x1e]; selfSaved->_edenShotSpeed = (float)pGVar10[0x1f]; selfSaved->_edenLuck = (float)pGVar10[0x20]; - selfSaved->_vampireCharmKills = (int)pGVar10[0x21]; + selfSaved->_vampireCharmKills = GHIDRA_INT(pGVar10[0x21]); *(GameStatePlayer *)&(*(undefined1 *)((char *)(selfSaved) + 0x160c)) = pGVar10[0x22]; pvVar11 = (manager->_itemConfig)._collectibles._end; - if ((int)pGVar10[0x23] < (int)pvVar11 - (int)(manager->_itemConfig)._collectibles._begin >> 2) { - selfSaved->_activeDesc[0]._item = (int)pGVar10[0x23]; - selfSaved->_activeDesc[0]._unk = (int)pGVar10[0x24]; - selfSaved->_activeDesc[0]._charge = (int)pGVar10[0x25]; - selfSaved->_activeDesc[0]._batteryCharge = (int)pGVar10[0x26]; - selfSaved->_activeDesc[0]._partialCharge = (int)pGVar10[0x27]; - selfSaved->_activeDesc[0]._varData = (int)pGVar10[0x28]; + if (GHIDRA_INT(pGVar10[0x23]) < GHIDRA_INT(pvVar11) - GHIDRA_INT((manager->_itemConfig)._collectibles._begin) >> 2) { + selfSaved->_activeDesc[0]._item = GHIDRA_INT(pGVar10[0x23]); + selfSaved->_activeDesc[0]._unk = GHIDRA_INT(pGVar10[0x24]); + selfSaved->_activeDesc[0]._charge = GHIDRA_INT(pGVar10[0x25]); + selfSaved->_activeDesc[0]._batteryCharge = GHIDRA_INT(pGVar10[0x26]); + selfSaved->_activeDesc[0]._partialCharge = GHIDRA_INT(pGVar10[0x27]); + selfSaved->_activeDesc[0]._varData = GHIDRA_INT(pGVar10[0x28]); pvVar11 = (manager->_itemConfig)._collectibles._end; } - if ((int)pGVar10[0x29] < (int)pvVar11 - (int)(manager->_itemConfig)._collectibles._begin >> 2) { + if (GHIDRA_INT(pGVar10[0x29]) < GHIDRA_INT(pvVar11) - GHIDRA_INT((manager->_itemConfig)._collectibles._begin) >> 2) { *(GameStatePlayer *)(selfSaved->_activeDesc + 1) = pGVar10[0x29]; - selfSaved->_activeDesc[1]._unk = (int)pGVar10[0x2a]; - selfSaved->_activeDesc[1]._charge = (int)pGVar10[0x2b]; - selfSaved->_activeDesc[1]._batteryCharge = (int)pGVar10[0x2c]; - selfSaved->_activeDesc[1]._partialCharge = (int)pGVar10[0x2d]; - selfSaved->_activeDesc[1]._varData = (int)pGVar10[0x2e]; + selfSaved->_activeDesc[1]._unk = GHIDRA_INT(pGVar10[0x2a]); + selfSaved->_activeDesc[1]._charge = GHIDRA_INT(pGVar10[0x2b]); + selfSaved->_activeDesc[1]._batteryCharge = GHIDRA_INT(pGVar10[0x2c]); + selfSaved->_activeDesc[1]._partialCharge = GHIDRA_INT(pGVar10[0x2d]); + selfSaved->_activeDesc[1]._varData = GHIDRA_INT(pGVar10[0x2e]); pvVar11 = (manager->_itemConfig)._collectibles._end; } - if ((int)pGVar10[0x2f] < (int)pvVar11 - (int)(manager->_itemConfig)._collectibles._begin >> 2) { + if (GHIDRA_INT(pGVar10[0x2f]) < GHIDRA_INT(pvVar11) - GHIDRA_INT((manager->_itemConfig)._collectibles._begin) >> 2) { *(GameStatePlayer *)(selfSaved->_activeDesc + 2) = pGVar10[0x2f]; - selfSaved->_activeDesc[2]._unk = (int)pGVar10[0x30]; - selfSaved->_activeDesc[2]._charge = (int)pGVar10[0x31]; - selfSaved->_activeDesc[2]._batteryCharge = (int)pGVar10[0x32]; - selfSaved->_activeDesc[2]._partialCharge = (int)pGVar10[0x33]; - selfSaved->_activeDesc[2]._varData = (int)pGVar10[0x34]; + selfSaved->_activeDesc[2]._unk = GHIDRA_INT(pGVar10[0x30]); + selfSaved->_activeDesc[2]._charge = GHIDRA_INT(pGVar10[0x31]); + selfSaved->_activeDesc[2]._batteryCharge = GHIDRA_INT(pGVar10[0x32]); + selfSaved->_activeDesc[2]._partialCharge = GHIDRA_INT(pGVar10[0x33]); + selfSaved->_activeDesc[2]._varData = GHIDRA_INT(pGVar10[0x34]); pvVar11 = (manager->_itemConfig)._collectibles._end; } - if ((int)pGVar10[0x35] < (int)pvVar11 - (int)(manager->_itemConfig)._collectibles._begin >> 2) { + if (GHIDRA_INT(pGVar10[0x35]) < GHIDRA_INT(pvVar11) - GHIDRA_INT((manager->_itemConfig)._collectibles._begin) >> 2) { *(GameStatePlayer *)(selfSaved->_activeDesc + 3) = pGVar10[0x35]; - selfSaved->_activeDesc[3]._unk = (int)pGVar10[0x36]; - selfSaved->_activeDesc[3]._charge = (int)pGVar10[0x37]; - selfSaved->_activeDesc[3]._batteryCharge = (int)pGVar10[0x38]; - selfSaved->_activeDesc[3]._partialCharge = (int)pGVar10[0x39]; - selfSaved->_activeDesc[3]._varData = (int)pGVar10[0x3a]; + selfSaved->_activeDesc[3]._unk = GHIDRA_INT(pGVar10[0x36]); + selfSaved->_activeDesc[3]._charge = GHIDRA_INT(pGVar10[0x37]); + selfSaved->_activeDesc[3]._batteryCharge = GHIDRA_INT(pGVar10[0x38]); + selfSaved->_activeDesc[3]._partialCharge = GHIDRA_INT(pGVar10[0x39]); + selfSaved->_activeDesc[3]._varData = GHIDRA_INT(pGVar10[0x3a]); } iVar14 = selfSaved->_variant; *(GameStatePlayer *)&(*(undefined1 *)((char *)(selfSaved) + 0x1738)) = pGVar10[0x11]; @@ -39123,58 +39123,58 @@ LAB_007ae611: local_48 = (GameStatePlayer)0x0; do { if (((*(int *)((char *)local_40 + 4) == 1) && (*(int *)local_40 != 0)) && - ((int)(g_manager->_itemConfig)._cards._end - (int)(g_manager->_itemConfig)._cards._begin >> 2 + (GHIDRA_INT((g_manager->_itemConfig)._cards._end) - GHIDRA_INT((g_manager->_itemConfig)._cards._begin) >> 2 <= *(int *)local_40)) { - if ((uint)local_48 < 3) { - piVar15 = (int *)((int)local_40 + 8); + if (GHIDRA_UINT(local_48) < 3) { + piVar15 = (int *)(GHIDRA_INT(local_40) + 8); GVar12 = local_40; - for (uVar8 = (3 - (int)local_48) * 2 & 0x3ffffffe; uVar8 != 0; uVar8 = uVar8 - 1) { + for (uVar8 = (3 - GHIDRA_INT(local_48)) * 2 & 0x3ffffffe; uVar8 != 0; uVar8 = uVar8 - 1) { *(int *)GVar12 = *piVar15; piVar15 = piVar15 + 1; - GVar12 = (GameStatePlayer)((int)GVar12 + 4); + GVar12 = (GameStatePlayer)(GHIDRA_INT(GVar12) + 4); } } selfSaved->_pocketSlots[6] = 0; } - local_48 = (GameStatePlayer)((int)local_48 + 1); - local_40 = (GameStatePlayer)((int)local_40 + 8); - } while ((uint)local_48 < 4); - selfSaved->_rUaWizardTimer = (int)local_58[0x82]; + local_48 = (GameStatePlayer)(GHIDRA_INT(local_48) + 1); + local_40 = (GameStatePlayer)(GHIDRA_INT(local_40) + 8); + } while (GHIDRA_UINT(local_48) < 4); + selfSaved->_rUaWizardTimer = GHIDRA_INT(local_58[0x82]); selfSaved->_bloodLustCounter = *(short *)(local_58 + 0x83); selfSaved->_deadCatLives = *(short *)&(*(undefined1 *)((char *)&(local_58[0x83]) + 0x2)); GVar12 = local_58[0x85]; GVar4 = local_58[0x86]; GVar5 = local_58[0x87]; - (selfSaved->_friendBallEnemy)._type = (int)local_58[0x84]; - (selfSaved->_friendBallEnemy)._variant = (int)GVar12; - (selfSaved->_friendBallEnemy)._subtype = (int)GVar4; - (selfSaved->_friendBallEnemy)._championId = (int)GVar5; + (selfSaved->_friendBallEnemy)._type = GHIDRA_INT(local_58[0x84]); + (selfSaved->_friendBallEnemy)._variant = GHIDRA_INT(GVar12); + (selfSaved->_friendBallEnemy)._subtype = GHIDRA_INT(GVar4); + (selfSaved->_friendBallEnemy)._championId = GHIDRA_INT(GVar5); friendBallHealth = *(undefined8 *)(local_58 + 0x88); - (selfSaved->_friendBallEnemy)._health = (float)(int)friendBallHealth; - (selfSaved->_friendBallEnemy)._maxHealth = (float)(int)((ulonglong)friendBallHealth >> 0x20); + (selfSaved->_friendBallEnemy)._health = (float)GHIDRA_INT(friendBallHealth); + (selfSaved->_friendBallEnemy)._maxHealth = (float)GHIDRA_INT(((ulonglong)friendBallHealth >> 0x20)); *(GameStatePlayer *)&(selfSaved->_friendBallEnemy)._playerControlled = local_58[0x8a]; - selfSaved->_purityState = (int)local_58[0xd2]; - selfSaved->_immaculateConceptionState = (int)local_58[0xd3]; - selfSaved->_cambionConceptionState = (int)local_58[0xd4]; - selfSaved->_conceptionFamiliarFlags = (int)local_58[0xd5]; + selfSaved->_purityState = GHIDRA_INT(local_58[0xd2]); + selfSaved->_immaculateConceptionState = GHIDRA_INT(local_58[0xd3]); + selfSaved->_cambionConceptionState = GHIDRA_INT(local_58[0xd4]); + selfSaved->_conceptionFamiliarFlags = GHIDRA_INT(local_58[0xd5]); selfSaved->_d8DamageModifier = (float)local_58[0xd6]; selfSaved->_d8SpeedModifier = (float)local_58[0xd7]; selfSaved->_d8RangeModifier = (float)local_58[0xd8]; selfSaved->_d8FireDelayModifier = (float)local_58[0xd9]; - selfSaved->_goldenHearts = (int)local_58[0xda]; - selfSaved->_planCKillCountdown = (int)local_58[0xf]; - selfSaved->_imExcitedSpeedupCountdown = (int)local_58[0x10]; + selfSaved->_goldenHearts = GHIDRA_INT(local_58[0xda]); + selfSaved->_planCKillCountdown = GHIDRA_INT(local_58[0xf]); + selfSaved->_imExcitedSpeedupCountdown = GHIDRA_INT(local_58[0x10]); selfSaved->_holyMantleStacks = *(byte *)(local_58 + 0x174); - selfSaved->_ductTapeMode = (*(undefined1 *)((char *)&((uint)(byte)local_58[0x174]) + 0x1)); + selfSaved->_ductTapeMode = (*(undefined1 *)((char *)&(GHIDRA_UINT((byte)local_58[0x174])) + 0x1)); selfSaved->_dead = 0; try_trigger_astral_projection(selfSaved); if (local_54 != (GameStatePlayer)0x0) { - uVar8 = (int)local_44 - (int)local_54 & 0xfffffffc; + uVar8 = GHIDRA_INT(local_44) - GHIDRA_INT(local_54) & 0xfffffffc; GVar12 = local_54; if (0xfff < uVar8) { GVar12 = *(GameStatePlayer *)((char *)local_54 + -4); uVar8 = uVar8 + 0x23; - if (0x1f < (uint)((int)local_54 + (-4 - (int)GVar12))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_54) + (-4 - GHIDRA_INT(GVar12))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -39286,9 +39286,9 @@ byte Entity_Player::try_trigger_astral_projection() if (this->_astralProjectionBody == (EntityPtr)0x0) { seed = Random(); iVar3 = 0; - uVar9._0_1_ = 0; - uVar9._1_1_ = 0; - uVar9._2_2_ = 0; + (*(undefined1 *)((char *)&(uVar9) + 0x0)) = 0; + (*(undefined1 *)((char *)&(uVar9) + 0x1)) = 0; + (*(undefined2 *)((char *)&(uVar9) + 0x2)) = 0; pVVar7 = &g_vectorZero; position = &this->_pos; fVar6 = 8.40779e-45; @@ -39297,7 +39297,7 @@ byte Entity_Player::try_trigger_astral_projection() pEVar8 = this; astralBody = (EntityPtr) ((Game *)(g_game))->Game::SpawnEx(1000,6,position,&g_vectorZero,(Entity *)this,0,seed,0); - ((ANM2 *)((ANM2 *)((int)register0x00000010 + -0x15c)))->ANM2::ANM2(&this->_sprite); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(register0x00000010) + -0x15c)))->ANM2::ANM2(&this->_sprite); other._championColor._colorize[3] = fVar4; other._filename._buf[0] = in_stack_fffffea4[0]; other._filename._buf[1] = in_stack_fffffea4[1]; @@ -39315,8 +39315,8 @@ byte Entity_Player::try_trigger_astral_projection() other._filename._buf[0xd] = in_stack_fffffea4[0xd]; other._filename._buf[0xe] = in_stack_fffffea4[0xe]; other._filename._buf[0xf] = in_stack_fffffea4[0xf]; - other._filename._size = in_stack_fffffea4._16_4_; - other._filename._capacity = in_stack_fffffea4._20_4_; + other._filename._size = (*(undefined4 *)((char *)&(in_stack_fffffea4) + 0x10)); + other._filename._capacity = (*(undefined4 *)((char *)&(in_stack_fffffea4) + 0x14)); other._animDefaultName._buf[0] = in_stack_fffffea4[0x18]; other._animDefaultName._buf[1] = in_stack_fffffea4[0x19]; other._animDefaultName._buf[2] = in_stack_fffffea4[0x1a]; @@ -39333,76 +39333,76 @@ byte Entity_Player::try_trigger_astral_projection() other._animDefaultName._buf[0xd] = in_stack_fffffea4[0x25]; other._animDefaultName._buf[0xe] = in_stack_fffffea4[0x26]; other._animDefaultName._buf[0xf] = in_stack_fffffea4[0x27]; - other._animDefaultName._size = in_stack_fffffea4._40_4_; - other._animDefaultName._capacity = in_stack_fffffea4._44_4_; - other._animState._animation = (void *)in_stack_fffffea4._48_4_; - other._animState._animData = (void *)in_stack_fffffea4._52_4_; - other._animState._layerFrames = (void *)in_stack_fffffea4._56_4_; - other._animState._nullLayerFrames = (void *)in_stack_fffffea4._60_4_; - other._animState._animFrame = (float)in_stack_fffffea4._64_4_; + other._animDefaultName._size = (*(undefined4 *)((char *)&(in_stack_fffffea4) + 0x28)); + other._animDefaultName._capacity = (*(undefined4 *)((char *)&(in_stack_fffffea4) + 0x2c)); + other._animState._animation = (*(undefined4 *)((char *)&((void *)in_stack_fffffea4) + 0x30)); + other._animState._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffea4) + 0x34)); + other._animState._layerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffea4) + 0x38)); + other._animState._nullLayerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffea4) + 0x3c)); + other._animState._animFrame = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0x40)); other._animState._isPlaying = in_stack_fffffea4[0x44]; - other._animState._21_3_ = in_stack_fffffea4._69_3_; - other._animState._currentlyTriggeredEvents = in_stack_fffffea4._72_4_; - other._animState._previouslyTriggeredEvents = in_stack_fffffea4._76_4_; - other._overlayAnimState._animation = (void *)in_stack_fffffea4._80_4_; - other._overlayAnimState._animData = (void *)in_stack_fffffea4._84_4_; - other._overlayAnimState._layerFrames = (void *)in_stack_fffffea4._88_4_; - other._overlayAnimState._nullLayerFrames = (void *)in_stack_fffffea4._92_4_; - other._overlayAnimState._animFrame = (float)in_stack_fffffea4._96_4_; + (*(undefined1 *)((char *)&(other._animState) + 0x15)) = (*(undefined1 *)((char *)&(in_stack_fffffea4) + 0x45)); + other._animState._currentlyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffea4) + 0x48)); + other._animState._previouslyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffea4) + 0x4c)); + other._overlayAnimState._animation = (*(undefined4 *)((char *)&((void *)in_stack_fffffea4) + 0x50)); + other._overlayAnimState._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffea4) + 0x54)); + other._overlayAnimState._layerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffea4) + 0x58)); + other._overlayAnimState._nullLayerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffea4) + 0x5c)); + other._overlayAnimState._animFrame = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0x60)); other._overlayAnimState._isPlaying = in_stack_fffffea4[100]; - other._overlayAnimState._21_3_ = in_stack_fffffea4._101_3_; - other._overlayAnimState._currentlyTriggeredEvents = in_stack_fffffea4._104_4_; - other._overlayAnimState._previouslyTriggeredEvents = in_stack_fffffea4._108_4_; + (*(undefined1 *)((char *)&(other._overlayAnimState) + 0x15)) = (*(undefined1 *)((char *)&(in_stack_fffffea4) + 0x65)); + other._overlayAnimState._currentlyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffea4) + 0x68)); + other._overlayAnimState._previouslyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffea4) + 0x6c)); other._overlayRenderFirst = in_stack_fffffea4[0x70]; - other._113_3_ = in_stack_fffffea4._113_3_; - other._animData = (void *)in_stack_fffffea4._116_4_; - other._animCount = in_stack_fffffea4._120_4_; - other._layerState = (void *)in_stack_fffffea4._124_4_; - other._layerCount = in_stack_fffffea4._128_4_; - other._nullLayerNames = (void *)in_stack_fffffea4._132_4_; - other._numNullLayers = in_stack_fffffea4._136_4_; - other._eventNames = (void *)in_stack_fffffea4._140_4_; - other._numEvents = in_stack_fffffea4._144_4_; - other._offset.x = (float)in_stack_fffffea4._148_4_; - other._offset.y = (float)in_stack_fffffea4._152_4_; - other._scale.x = (float)in_stack_fffffea4._156_4_; - other._scale.y = (float)in_stack_fffffea4._160_4_; - other._rotation = (float)in_stack_fffffea4._164_4_; - other._color._tint[0] = (float)in_stack_fffffea4._168_4_; - other._color._tint[1] = (float)in_stack_fffffea4._172_4_; - other._color._tint[2] = (float)in_stack_fffffea4._176_4_; - other._color._tint[3] = (float)in_stack_fffffea4._180_4_; - other._color._colorize[0] = (float)in_stack_fffffea4._184_4_; - other._color._colorize[1] = (float)in_stack_fffffea4._188_4_; - other._color._colorize[2] = (float)in_stack_fffffea4._192_4_; - other._color._colorize[3] = (float)in_stack_fffffea4._196_4_; - other._color._offset[0] = (float)in_stack_fffffea4._200_4_; - other._color._offset[1] = (float)in_stack_fffffea4._204_4_; - other._color._offset[2] = (float)in_stack_fffffea4._208_4_; - other._championColor._tint[0] = (float)in_stack_fffffea4._212_4_; - other._championColor._tint[1] = (float)in_stack_fffffea4._216_4_; - other._championColor._tint[2] = (float)in_stack_fffffea4._220_4_; - other._championColor._tint[3] = (float)in_stack_fffffea4._224_4_; - other._championColor._colorize[0] = (float)in_stack_fffffea4._228_4_; - other._championColor._colorize[1] = (float)in_stack_fffffea4._232_4_; - other._championColor._colorize[2] = (float)in_stack_fffffea4._236_4_; + (*(undefined1 *)((char *)&(other) + 0x71)) = (*(undefined1 *)((char *)&(in_stack_fffffea4) + 0x71)); + other._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffea4) + 0x74)); + other._animCount = (*(undefined4 *)((char *)&(in_stack_fffffea4) + 0x78)); + other._layerState = (*(undefined4 *)((char *)&((void *)in_stack_fffffea4) + 0x7c)); + other._layerCount = (*(undefined4 *)((char *)&(in_stack_fffffea4) + 0x80)); + other._nullLayerNames = (*(undefined4 *)((char *)&((void *)in_stack_fffffea4) + 0x84)); + other._numNullLayers = (*(undefined4 *)((char *)&(in_stack_fffffea4) + 0x88)); + other._eventNames = (*(undefined4 *)((char *)&((void *)in_stack_fffffea4) + 0x8c)); + other._numEvents = (*(undefined4 *)((char *)&(in_stack_fffffea4) + 0x90)); + other._offset.x = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0x94)); + other._offset.y = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0x98)); + other._scale.x = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0x9c)); + other._scale.y = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0xa0)); + other._rotation = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0xa4)); + other._color._tint[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0xa8)); + other._color._tint[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0xac)); + other._color._tint[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0xb0)); + other._color._tint[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0xb4)); + other._color._colorize[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0xb8)); + other._color._colorize[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0xbc)); + other._color._colorize[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0xc0)); + other._color._colorize[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0xc4)); + other._color._offset[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0xc8)); + other._color._offset[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0xcc)); + other._color._offset[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0xd0)); + other._championColor._tint[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0xd4)); + other._championColor._tint[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0xd8)); + other._championColor._tint[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0xdc)); + other._championColor._tint[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0xe0)); + other._championColor._colorize[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0xe4)); + other._championColor._colorize[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0xe8)); + other._championColor._colorize[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffea4) + 0xec)); other._championColor._offset[0] = fVar5; other._championColor._offset[1] = fVar6; other._championColor._offset[2] = (float)position; - other._256_4_ = pVVar7; + (*(undefined4 *)((char *)&(other) + 0x100)) = pVVar7; other._playbackSpeed = (float)pEVar8; - other._264_1_ = (char)uVar9; + (*(undefined1 *)((char *)&(other) + 0x108)) = (char)uVar9; other._loaded = SUB41(uVar9,1); - other._266_2_ = SUB42(uVar9,2); + (*(undefined2 *)((char *)&(other) + 0x10a)) = SUB42(uVar9,2); other._shadowLayerIndex = seed; other._bitflags = iVar3; - ((ANM2 *)((ANM2 *)((int)astralBody + 0x48)))->ANM2::operator_assign(other); - ghostLayer = ((ANM2 *)((ANM2 *)((int)astralBody + 0x48)))->ANM2::GetLayer((byte *)"ghost"); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(astralBody) + 0x48)))->ANM2::operator_assign(other); + ghostLayer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(astralBody) + 0x48)))->ANM2::GetLayer((byte *)"ghost"); if (ghostLayer != (LayerState *)0x0) { ghostLayer->_visible = 0; } - ((AnimationState *)((AnimationState *)((int)astralBody + 0x98)))->AnimationState::SetAnimationData((void *)0x0); - ((ANM2 *)((ANM2 *)((int)astralBody + 0x48)))->ANM2::Play((byte *)"Death",0); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(astralBody) + 0x98)))->AnimationState::SetAnimationData((void *)0x0); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(astralBody) + 0x48)))->ANM2::Play((byte *)"Death",0); *(uint *)((char *)astralBody + 0x168) = *(uint *)((char *)astralBody + 0x168) | 0x200000; *(undefined4 *)((char *)astralBody + 0x16c) = *(undefined4 *)((char *)astralBody + 0x16c); *(undefined4 *)((char *)astralBody + 0x450) = 10; @@ -39513,12 +39513,12 @@ void Entity_Player::spawn_dark_esau(void *gameStatePlayer) if (iVar7 != 0) { local_6c = (float *)0x0; do { - local_54 = (EntityPtr)(*(int *)((char *)gameStatePlayer + 0x380) + (int)local_6c); + local_54 = (EntityPtr)(*(int *)((char *)gameStatePlayer + 0x380) + GHIDRA_INT(local_6c)); familiarRecord = *(EntityPtr *)local_54; local_58 = *(EntityPtr *)((char *)local_54 + 8); room = g_game->_room; uVar4 = Random(); - local_5c = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + local_5c = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_5c = local_5c + local_5c; fVar8 = cos(local_5c); @@ -39529,12 +39529,12 @@ void Entity_Player::spawn_dark_esau(void *gameStatePlayer) familiarRecord = local_54; spawnedFamiliar = (Menu_Stats *) - ((Game *)(g_game))->Game::SpawnEx(3,(uint)*(EntityPtr *)((char *)local_54 + 4),&spawnPos,&g_vectorZero, - (Entity *)this,(uint)local_58,(uint)familiarRecord,0); + ((Game *)(g_game))->Game::SpawnEx(3,GHIDRA_UINT(*(EntityPtr *)((char *)local_54 + 4)),&spawnPos,&g_vectorZero, + (Entity *)this,GHIDRA_UINT(local_58),GHIDRA_UINT(familiarRecord),0); ((Menu_Stats *)(spawnedFamiliar))->Menu_Stats::Render(familiarRecord); - local_64.x = (float)((int)local_64.x + 1); - local_6c = (float *)((int)local_6c + 0x34); - } while ((uint)local_64.x < (uint)*(float *)((char *)gameStatePlayer + 0x37c)); + local_64.x = (float)(GHIDRA_INT(local_64.x) + 1); + local_6c = (float *)(GHIDRA_INT(local_6c) + 0x34); + } while (GHIDRA_UINT(local_64.x) < GHIDRA_UINT(*(float *)((char *)gameStatePlayer + 0x37c))); } if (this->_replacedPlayer == (void *)0x0) { if (this->_playerType == 0x11) { @@ -39542,7 +39542,7 @@ void Entity_Player::spawn_dark_esau(void *gameStatePlayer) } local_5c = 0.0; if (0 < *(int *)((char *)gameStatePlayer + 0x22c)) { - local_6c = (float *)((int)gameStatePlayer + 0x244); + local_6c = (float *)(GHIDRA_INT(gameStatePlayer) + 0x244); do { room = g_game->_room; local_58 = (EntityPtr)((room->_bottomRightPos).x - (room->_topLeftPos).x); @@ -39556,7 +39556,7 @@ void Entity_Player::spawn_dark_esau(void *gameStatePlayer) local_50.x = (float)local_58 * 0.5 + (room->_topLeftPos).x; Room::FindFreePickupSpawnPosition (room,&spawnPos,&local_50, - (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * (float)familiarRecord,0,0,0); uVar4 = Random(); uVar13 = 0; @@ -39564,14 +39564,14 @@ void Entity_Player::spawn_dark_esau(void *gameStatePlayer) pTVar11 = &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor; uVar10 = 0; spawnedEntity = - ((Game *)(g_game))->Game::Spawn((uint)local_6c[-5],(uint)local_6c[-4],&spawnPos,&g_vectorZero, - (Entity *)0x0,(uint)local_6c[-3],uVar4); + ((Game *)(g_game))->Game::Spawn(GHIDRA_UINT(local_6c[-5]),GHIDRA_UINT(local_6c[-4]),&spawnPos,&g_vectorZero, + (Entity *)0x0,GHIDRA_UINT(local_6c[-3]),uVar4); restoredEnemy = (Entity_NPC *)__RTDynamicCast(spawnedEntity,uVar10,pTVar11,pTVar12,uVar13); if (restoredEnemy != (Entity_NPC *)0x0) { restoredEnemy->_health = local_6c[-1]; restoredEnemy->_maxHitPoints = *local_6c; - ((Entity_NPC *)(restoredEnemy))->Entity_NPC::Morph((int)local_6c[-5],(int)local_6c[-4],(int)local_6c[-3], - (int)local_6c[-2]); + ((Entity_NPC *)(restoredEnemy))->Entity_NPC::Morph(GHIDRA_INT(local_6c[-5]),GHIDRA_INT(local_6c[-4]),GHIDRA_INT(local_6c[-3]), + GHIDRA_INT(local_6c[-2])); if (*(char *)(local_6c + 1) != '\0') { restoredEnemy->_controllerID = this->_controllerIndex; } @@ -39593,7 +39593,7 @@ void Entity_Player::spawn_dark_esau(void *gameStatePlayer) charmSource._spawnerVariant = this->_spawnerVariant; charmSource._velocity.x = (this->_velocity).x; charmSource._velocity.y = (this->_velocity).y; - local_64.x = (float)(uint)((this->_flags & 0x100) != 0); + local_64.x = (float)GHIDRA_UINT(((this->_flags & 0x100) != 0)); if ((this->_flags & 0x20000000) == 0) { uVar4 = 0; } @@ -39606,33 +39606,33 @@ void Entity_Player::spawn_dark_esau(void *gameStatePlayer) else { uVar5 = 4; } - charmSource._flags = uVar5 | uVar4 | (uint)local_64.x; + charmSource._flags = uVar5 | uVar4 | GHIDRA_UINT(local_64.x); charmSource._entity = this; ((Entity *)((Entity *)restoredEnemy))->Entity::AddCharmed(&charmSource,-1,0,0); restoredEnemy->Update(); } - local_5c = (float)((int)local_5c + 1); + local_5c = (float)(GHIDRA_INT(local_5c) + 1); local_6c = local_6c + 7; - } while ((int)local_5c < *(int *)((char *)gameStatePlayer + 0x22c)); + } while (GHIDRA_INT(local_5c) < *(int *)((char *)gameStatePlayer + 0x22c)); } - if (&this->_levelEffectItems != (std_vector *)((int)gameStatePlayer + 0x424)) { + if (&this->_levelEffectItems != (std_vector *)(GHIDRA_INT(gameStatePlayer) + 0x424)) { local_54 = *(EntityPtr *)((char *)gameStatePlayer + 0x424); - local_64.x = (float)(*(int *)((char *)gameStatePlayer + 0x428) - (int)local_54); - local_5c = (float)((int)local_64.x >> 2); + local_64.x = (float)(*(int *)((char *)gameStatePlayer + 0x428) - GHIDRA_INT(local_54)); + local_5c = (float)(GHIDRA_INT(local_64.x) >> 2); local_6c = (this->_levelEffectItems)._begin; - if ((uint)((int)(this->_levelEffectItems)._capacity - (int)local_6c >> 2) < (uint)local_5c) { + if (GHIDRA_UINT((GHIDRA_INT((this->_levelEffectItems)._capacity) - GHIDRA_INT(local_6c) >> 2)) < GHIDRA_UINT(local_5c)) { std::vector::reserve_clear(local_5c); local_6c = (this->_levelEffectItems)._begin; } memmove(local_6c,(void *)local_54,(size_t)local_64.x); - (this->_levelEffectItems)._end = (void *)((int)local_64.x + (int)local_6c); + (this->_levelEffectItems)._end = (void *)(GHIDRA_INT(local_64.x) + GHIDRA_INT(local_6c)); } iVar7 = *(int *)((char *)gameStatePlayer + 0x430); this->_bleedOutHealth = iVar7; if (0 < iVar7) { local_54 = (EntityPtr)this->_type; - uVar4 = (uint)this->_flags; - uVar5 = *(uint *)((int)&this->_flags + 4); + uVar4 = GHIDRA_UINT(this->_flags); + uVar5 = *(uint *)(GHIDRA_INT(&this->_flags) + 4); fVar8 = (this->_pos).x; fVar9 = (this->_pos).y; velocityX = (this->_velocity).x; @@ -39641,8 +39641,8 @@ void Entity_Player::spawn_dark_esau(void *gameStatePlayer) local_64.x = (float)this->_spawnerType; iVar7 = this->_spawnerVariant; *(uint *)&this->_flags = uVar4; - *(uint *)((int)&this->_flags + 4) = uVar5 | 4; - local_5c = (float)(uint)((uVar4 & 0x100) != 0); + *(uint *)(GHIDRA_INT(&this->_flags) + 4) = uVar5 | 4; + local_5c = (float)GHIDRA_UINT(((uVar4 & 0x100) != 0)); if ((uVar4 & 0x20000000) == 0) { uVar4 = 0; } @@ -39656,14 +39656,14 @@ void Entity_Player::spawn_dark_esau(void *gameStatePlayer) uVar5 = 4; } (this->_entityRef2)._position.x = fVar8; - (this->_entityRef2)._type = (int)local_54; - (this->_entityRef2)._variant = (int)local_58; - (this->_entityRef2)._spawnerType = (int)local_64.x; + (this->_entityRef2)._type = GHIDRA_INT(local_54); + (this->_entityRef2)._variant = GHIDRA_INT(local_58); + (this->_entityRef2)._spawnerType = GHIDRA_INT(local_64.x); (this->_entityRef2)._spawnerVariant = iVar7; (this->_entityRef2)._position.y = fVar9; (this->_entityRef2)._velocity.x = velocityX; (this->_entityRef2)._velocity.y = velocityY; - (this->_entityRef2)._flags = uVar5 | uVar4 | (uint)local_5c; + (this->_entityRef2)._flags = uVar5 | uVar4 | GHIDRA_UINT(local_5c); (this->_entityRef2)._entity = this; } this->_greedsGulletHearts = *(short *)((char *)gameStatePlayer + 0x434); @@ -39672,18 +39672,18 @@ void Entity_Player::spawn_dark_esau(void *gameStatePlayer) (this->_queuedItem)._item = *(void **)((char *)gameStatePlayer + 0x408); (this->_queuedItem)._charge = *(int *)((char *)gameStatePlayer + 0x40c); (this->_queuedItem)._flags = *(byte *)((char *)gameStatePlayer + 0x410); - if (tempEffects != (std_vector *)((int)gameStatePlayer + 0x414)) { + if (tempEffects != (std_vector *)(GHIDRA_INT(gameStatePlayer) + 0x414)) { local_54 = *(EntityPtr *)((char *)gameStatePlayer + 0x414); - local_64.x = (float)(*(int *)((char *)gameStatePlayer + 0x418) - (int)local_54); - local_5c = (float)((int)local_64.x >> 4); + local_64.x = (float)(*(int *)((char *)gameStatePlayer + 0x418) - GHIDRA_INT(local_54)); + local_5c = (float)(GHIDRA_INT(local_64.x) >> 4); local_6c = tempEffects->_begin; - if ((uint)((int)(this->_temporaryeffects)._effects._capacity - (int)local_6c >> 4) < - (uint)local_5c) { - vector16_clear_and_reserve(tempEffects,(uint)local_5c); + if (GHIDRA_UINT((GHIDRA_INT((this->_temporaryeffects)._effects._capacity) - GHIDRA_INT(local_6c) >> 4)) < + GHIDRA_UINT(local_5c)) { + vector16_clear_and_reserve(tempEffects,GHIDRA_UINT(local_5c)); local_6c = (this->_temporaryeffects)._effects._begin; } memmove(local_6c,(void *)local_54,(size_t)local_64.x); - (this->_temporaryeffects)._effects._end = (void *)((int)local_64.x + (int)local_6c); + (this->_temporaryeffects)._effects._end = (void *)(GHIDRA_INT(local_64.x) + GHIDRA_INT(local_6c)); } this->_strengthMaxHearts = *(int *)((char *)gameStatePlayer + 0x420); if ((this->_temporaryeffects)._effects._begin == (this->_temporaryeffects)._effects._end) { @@ -39696,11 +39696,11 @@ void Entity_Player::spawn_dark_esau(void *gameStatePlayer) uVar4 = *(uint *)((char *)local_6c + 4 + iVar7); iVar7 = *(int *)((char *)local_6c + *(int *)((char *)gameStatePlayer + 0x518)); if (iVar7 == 0) { - if ((int)uVar4 < 0) goto LAB_007b07a0; + if (GHIDRA_INT(uVar4) < 0) goto LAB_007b07a0; itemListBegin = (manager->_itemConfig)._nullItems._begin; itemListEnd = (manager->_itemConfig)._nullItems._end; LAB_007b0792: - if ((int)uVar4 < (int)itemListEnd - (int)itemListBegin >> 2) { + if (GHIDRA_INT(uVar4) < GHIDRA_INT(itemListEnd) - GHIDRA_INT(itemListBegin) >> 2) { local_50.x = *(float *)((char *)itemListBegin + uVar4 * 4); } else { @@ -39716,19 +39716,19 @@ LAB_007b07a0: goto LAB_007b0792; } if (g_game == (Game *)0x0) { - if (-1 < (int)uVar4) goto LAB_007b0760; + if (-1 < GHIDRA_INT(uVar4)) goto LAB_007b0760; goto LAB_007b07a0; } - if (-1 < (int)uVar4) { + if (-1 < GHIDRA_INT(uVar4)) { LAB_007b0760: itemListBegin = (manager->_itemConfig)._collectibles._begin; itemListEnd = (manager->_itemConfig)._collectibles._end; goto LAB_007b0792; } - if ((-1 < (int)uVar4) || + if ((-1 < GHIDRA_INT(uVar4)) || (itemListBegin = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)itemListBegin >> 2 - <= (int)~uVar4)) goto LAB_007b07a0; + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(itemListBegin) >> 2 + <= GHIDRA_INT(~uVar4))) goto LAB_007b07a0; local_50.x = **(float **)((char *)itemListBegin + ~uVar4 * 4); } uStack_44 = 0; @@ -39745,12 +39745,12 @@ LAB_007b0760: effectsEnd[2] = fStack_48; effectsEnd[3] = 0.0; ppvVar1 = &(this->_temporaryeffects)._effects._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 0x10); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 0x10); } iVar7 = *(int *)((char *)gameStatePlayer + 0x518); - local_6c = (float *)((int)local_6c + 0x10); - local_64.x = (float)((int)local_64.x + 1); - } while ((uint)local_64.x < (uint)(*(int *)((char *)gameStatePlayer + 0x51c) - iVar7 >> 4)); + local_6c = (float *)(GHIDRA_INT(local_6c) + 0x10); + local_64.x = (float)(GHIDRA_INT(local_64.x) + 1); + } while (GHIDRA_UINT(local_64.x) < GHIDRA_UINT((*(int *)((char *)gameStatePlayer + 0x51c) - iVar7 >> 4))); } } if (0.0 < *(float *)((char *)gameStatePlayer + 0x530)) { @@ -39769,7 +39769,7 @@ LAB_007b0760: local_50.x = (float)local_58 * 0.5 + (room->_topLeftPos).x; Room::FindFreePickupSpawnPosition (room,&local_64,&local_50, - (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * (float)familiarRecord,1,0,0); local_5c = 0.0; do { @@ -39781,8 +39781,8 @@ LAB_007b0760: candidatePos = Room::FindFreePickupSpawnPosition(room,&local_50,candidatePos,0.0,1,0,0); local_64.x = candidatePos->x; local_64.y = candidatePos->y; - local_5c = (float)((int)local_5c + 1); - } while ((int)local_5c < 0x14); + local_5c = (float)(GHIDRA_INT(local_5c) + 1); + } while (GHIDRA_INT(local_5c) < 0x14); uVar4 = Random(); familiarRecord = (EntityPtr) ((Game *)(g_game))->Game::SpawnEx(0x362,0,&local_64,&g_vectorZero,(Entity *)this,0,uVar4,0); @@ -40006,13 +40006,13 @@ void Entity_Player::UseCard(int cardType, uint useFlag) uStack_8 = 0xffffffff; puStack_c = &LAB_00affd56; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(gridMarks + 0x1d0); + local_14 = __security_cookie ^ GHIDRA_UINT((gridMarks + 0x1d0)); card = cardType; if (cardType < 0) { return; } pvVar45 = (g_manager->_itemConfig)._cards._begin; - if ((int)(g_manager->_itemConfig)._cards._end - (int)pvVar45 >> 2 <= cardType) { + if (GHIDRA_INT((g_manager->_itemConfig)._cards._end) - GHIDRA_INT(pvVar45) >> 2 <= cardType) { return; } cardConfig = *(int *)((char *)pvVar45 + cardType * 4); @@ -40028,31 +40028,31 @@ void Entity_Player::UseCard(int cardType, uint useFlag) announcerDelay = 900; } if (g_game->_challenge == 0x20) { - rngSource = (RNG *)(cardType * 0x10 + (int)(this->_cardRNGs)._begin); + rngSource = (RNG *)(cardType * 0x10 + GHIDRA_INT((this->_cardRNGs)._begin)); ((RNG *)(rngSource))->RNG::Next(); - cardType = (uint)rngSource->_seed % 0x61 + 1; + cardType = GHIDRA_UINT(rngSource->_seed) % 0x61 + 1; card = cardType; } VStack_2dc.y = (float)(useFlag >> 7 & 0xffffff01); local_2ac = useFlag >> 5 & 0xffffff01; bVar4 = HasCollectible(this,0x1c3,0); if ((bVar4 == 0) || ((*(int *)(cardConfig + 0x58) != 0 && (*(int *)(cardConfig + 0x58) != 5)))) { - uStack_2a2._1_1_ = 0; + (*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) = 0; bVar4 = ~(byte)(useFlag >> 1) & 1; LAB_007b23cf: - local_2a8 = CONCAT31(local_2a8._1_3_,bVar4); + local_2a8 = CONCAT31((*(undefined1 *)((char *)&(local_2a8) + 0x1)),bVar4); } else { isPlayAnnouncer = 1; - uStack_2a2._1_1_ = 1; + (*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) = 1; VStack_2bc.y = (float)(CONCAT31((uint3)(useFlag >> 9),~(byte)(useFlag >> 1)) & 0xffffff01); - local_2a8 = CONCAT31(local_2a8._1_3_,SUB41(VStack_2bc.y,0)); + local_2a8 = CONCAT31((*(undefined1 *)((char *)&(local_2a8) + 0x1)),SUB41(VStack_2bc.y,0)); if ((useFlag & 4) != 0) { - uStack_2a2._1_1_ = 1; - local_2a8 = CONCAT31(local_2a8._1_3_,SUB41(VStack_2bc.y,0)); + (*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) = 1; + local_2a8 = CONCAT31((*(undefined1 *)((char *)&(local_2a8) + 0x1)),SUB41(VStack_2bc.y,0)); if ((char)local_2ac == '\0') { UseCard(this,cardType,0x20); - uStack_2a2._1_1_ = isPlayAnnouncer; + (*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) = isPlayAnnouncer; bVar4 = SUB41(VStack_2bc.y,0); goto LAB_007b23cf; } @@ -40095,7 +40095,7 @@ LAB_007b23cf: telepathyCooldown = telepathyEffect->maxCooldown; uStack_3cc = 0; ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddEffect(&telepathyEffect,(byte)local_2a8,1); - if (uStack_2a2._1_1_ != 0) { + if ((*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) != 0) { belialEffect = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(0x22); uStack_3e4 = 0; belialCooldown = belialEffect->maxCooldown; @@ -40113,34 +40113,34 @@ LAB_007b23cf: VStack_2cc.y = (float)this; if ((((Level *)VStack_2dc.y)->_roomList[0x19].DecorationSeed != 0) && (((Level *)VStack_2dc.y)->_roomList[0x26].GreedSubType != 6)) { - VStack_2b4.y = (float)((uint)VStack_2b4.y & 0xffffff00); + VStack_2b4.y = (float)(GHIDRA_UINT(VStack_2b4.y) & 0xffffff00); VStack_2bc.y = 1.4013e-45; VStack_2a0.y = 0.0; - if (1 < (uint)((Level *)VStack_2dc.y)->_roomList[0x19].DecorationSeed) { + if (1 < GHIDRA_UINT(((Level *)VStack_2dc.y)->_roomList[0x19].DecorationSeed)) { do { - pRVar6 = *(Room **)(*(int *)&((RoomDescriptor *)((int)VStack_2dc.y + 0x14))[0x19]. - PoopCount + (int)VStack_2bc.y * 4); + pRVar6 = *(Room **)(*(int *)&((RoomDescriptor *)(GHIDRA_INT(VStack_2dc.y) + 0x14))[0x19]. + PoopCount + GHIDRA_INT(VStack_2bc.y) * 4); cVar5 = this->IsValidTarget(pRVar6); if ((cVar5 != '\0') && (((bVar4 = ((Entity *)((Entity *)pRVar6))->Entity::IsVulnerableEnemy((Entity *)0x0), bVar4 != 0 || ((((1 < *(int *)&g_game->_deathmatchManager && (pRVar6->_gridEntities[1] == (void *)0x1)) || - (((int)pRVar6->_gridEntities[1] - 10U < 0x3de && - (pRVar6->_gridEntities[1] != (void *)0x21)))) && (VStack_2b4.y._0_1_ == '\0')))) + ((GHIDRA_INT(pRVar6->_gridEntities[1]) - 10U < 0x3de && + (pRVar6->_gridEntities[1] != (void *)0x21)))) && ((*(undefined1 *)((char *)&(VStack_2b4.y) + 0x0)) == '\0')))) && ((*(byte *)((char *)pRVar6->_gridEntities + 0x14f) == 0 && (VStack_2a0.y <= (float)*(EntityPtr *)(pRVar6->_gridEntities + 0xd7))))))) { VStack_2d4.y = VStack_2cc.y; VStack_2cc.y = (float)pRVar6; VStack_2a0.y = (float)*(EntityPtr *)(pRVar6->_gridEntities + 0xd7); bVar4 = ((Entity *)((Entity *)pRVar6))->Entity::IsVulnerableEnemy((Entity *)0x0); - VStack_2b4.y = (float)((uint)VStack_2b4.y & 0xff); + VStack_2b4.y = (float)(GHIDRA_UINT(VStack_2b4.y) & 0xff); if (bVar4 != 0) { VStack_2b4.y = 1.4013e-45; } } - VStack_2bc.y = (float)((int)VStack_2bc.y + 1); - } while ((uint)VStack_2bc.y < - (uint)((RoomDescriptor *)((int)VStack_2dc.y + 0x14))[0x19].DecorationSeed); + VStack_2bc.y = (float)(GHIDRA_INT(VStack_2bc.y) + 1); + } while (GHIDRA_UINT(VStack_2bc.y) < + GHIDRA_UINT(((RoomDescriptor *)(GHIDRA_INT(VStack_2dc.y) + 0x14))[0x19].DecorationSeed)); } } fVar51 = VStack_2cc.y; @@ -40149,8 +40149,8 @@ LAB_007b23cf: } if ((Room *)VStack_2cc.y != (Room *)0x0) { uVar7 = Random(); - VStack_2a0.x = ((Vector *)((void **)((int)fVar51 + 0x24) + 0xc6))->x; - VStack_2a0.y = *(float *)((void **)((int)fVar51 + 0x24) + 199); + VStack_2a0.x = ((Vector *)((void **)(GHIDRA_INT(fVar51) + 0x24) + 0xc6))->x; + VStack_2a0.y = *(float *)((void **)(GHIDRA_INT(fVar51) + 0x24) + 199); uVar52 = 0; pTVar49 = &IsaacRepentancePlus::Entity_Effect::RTTI_Type_Descriptor; pTVar48 = &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor; @@ -40161,10 +40161,10 @@ LAB_007b23cf: tmpEntity->Update(); } fVar51 = VStack_2d4.y; - if ((uStack_2a2._1_1_ != 0) && ((Room *)VStack_2d4.y != (Room *)0x0)) { + if (((*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) != 0) && ((Room *)VStack_2d4.y != (Room *)0x0)) { tmpEntity = (Entity *)Entity_Effect::CreateTimer(0,0); - pvVar45 = ((void **)((int)fVar51 + 0x24))[199]; - (tmpEntity->_pos).x = ((Vector *)((void **)((int)fVar51 + 0x24) + 0xc6))->x; + pvVar45 = ((void **)(GHIDRA_INT(fVar51) + 0x24))[199]; + (tmpEntity->_pos).x = ((Vector *)((void **)(GHIDRA_INT(fVar51) + 0x24) + 0xc6))->x; (tmpEntity->_pos).y = (float)pvVar45; ((Entity *)(tmpEntity))->Entity::SetTarget((Entity *)fVar51); } @@ -40183,7 +40183,7 @@ LAB_007b23cf: whoreCooldown = whoreEffect->maxCooldown; uStack_3ec = 0; ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddEffect(&whoreEffect,(byte)local_2a8,1); - if (uStack_2a2._1_1_ != 0) { + if ((*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) != 0) { whoreClothEffect = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(0x7a); uStack_404 = 0; whoreClothCooldown = whoreClothEffect->maxCooldown; @@ -40203,7 +40203,7 @@ LAB_007b23cf: Game::StartRoomTransition(game,iVar41,-1,3,this,-1); isPlayAnim = 0; } - if (uStack_2a2._1_1_ != 0) { + if ((*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) != 0) { pLVar22 = (Level *)Config::GetCollectibles(); roomDesc = ((Level *)(pLVar22))->Level::GetRoomByIdx(iVar41,-1); if (roomDesc->VisitedCount == 0) { @@ -40216,13 +40216,13 @@ LAB_007b23cf: ExceptionList = local_10; return; } - VStack_2a0.y = (float)(uStack_2a2._1_1_ + 2); + VStack_2a0.y = (float)((*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) + 2); do { uVar7 = ((RNG *)((RNG *)pRVar6))->RNG::Next(); pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); vecResult = Room::FindFreePickupSpawnPosition(pRVar6,&spawnPos2,&this->_pos,40.0,0,0,0); ((Game *)(g_game))->Game::Spawn(5,10,vecResult,&g_vectorZero,(Entity *)this,3,uVar7); - VStack_2a0.y = (float)((int)VStack_2a0.y + -1); + VStack_2a0.y = (float)(GHIDRA_INT(VStack_2a0.y) + -1); pRVar6 = local_298; } while (VStack_2a0.y != 0.0); VStack_2a0.y = 0.0; @@ -40232,13 +40232,13 @@ LAB_007b23cf: ExceptionList = local_10; return; } - VStack_2a0.y = (float)(uStack_2a2._1_1_ + 2); + VStack_2a0.y = (float)((*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) + 2); do { uVar7 = ((RNG *)((RNG *)pRVar6))->RNG::Next(); pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); vecResult = Room::FindFreePickupSpawnPosition(pRVar6,&spawnPos,&this->_pos,40.0,0,0,0); ((Game *)(g_game))->Game::Spawn(5,10,vecResult,&g_vectorZero,(Entity *)this,1,uVar7); - VStack_2a0.y = (float)((int)VStack_2a0.y + -1); + VStack_2a0.y = (float)(GHIDRA_INT(VStack_2a0.y) + -1); pRVar6 = local_298; } while (VStack_2a0.y != 0.0); VStack_2a0.y = 0.0; @@ -40251,7 +40251,7 @@ LAB_007b23cf: itemConfig = Isaac::GetItemConfig(); configItem = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(0x4d); ((TemporaryEffect *)(configItem))->TemporaryEffect::TemporaryEffect(); - if (uStack_2a2._1_1_ != 0) { + if ((*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) != 0) { unicornCooldown = unicornCooldown * 2; } ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddEffect(unicornEffect,(byte)local_2a8,1); @@ -40261,7 +40261,7 @@ LAB_007b23cf: ExceptionList = local_10; return; } - VStack_2a0.y = (float)(uStack_2a2._1_1_ + 1); + VStack_2a0.y = (float)((*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) + 1); do { bVar4 = HasTrinket(this,0x16,0); if (bVar4 == 0) { @@ -40289,7 +40289,7 @@ LAB_007b2f5b: pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); vecResult = Room::FindFreePickupSpawnPosition(pRVar6,&VStack_344,&this->_pos,40.0,0,0,0); ((Game *)(g_game))->Game::Spawn(5,0x14,vecResult,&g_vectorZero,(Entity *)this,0,uVar7); - VStack_2a0.y = (float)((int)VStack_2a0.y + -1); + VStack_2a0.y = (float)(GHIDRA_INT(VStack_2a0.y) + -1); pRVar6 = local_298; } while (VStack_2a0.y != 0.0); VStack_2a0.y = 0.0; @@ -40305,7 +40305,7 @@ LAB_007b2f5b: Config::GetCollectibles(); FUN_00428ae0(0xffffffff); Game::StartRoomTransition(g_game,iVar41,-1,3,this,-1); - if (uStack_2a2._1_1_ != 0) { + if ((*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) != 0) { FUN_00420ae0(); FUN_00753c40(2); } @@ -40386,21 +40386,21 @@ LAB_007b327d: case 0x12: Config::GetCollectibles(); VStack_2b4.y = (float)((Level *)(0x18))->Level::QueryRoomTypeIndex(0,pRVar6,0); - if ((int)VStack_2b4.y < 0) { + if (GHIDRA_INT(VStack_2b4.y) < 0) { LAB_007b3428: Config::GetCollectibles(); VStack_2b4.y = (float)((Level *)(4))->Level::QueryRoomTypeIndex(0,pRVar6,0); - if ((int)VStack_2b4.y < 0) break; + if (GHIDRA_INT(VStack_2b4.y) < 0) break; } else { pLVar22 = (Level *)Config::GetCollectibles(); - roomDesc = ((Level *)(pLVar22))->Level::GetRoomByIdx((int)VStack_2b4.y,-1); + roomDesc = ((Level *)(pLVar22))->Level::GetRoomByIdx(GHIDRA_INT(VStack_2b4.y),-1); if (*(int *)((char *)roomDesc->Data + 8) != 0x18) goto LAB_007b3428; } Config::GetCollectibles(); FUN_00428ae0(0xffffffff); - Game::StartRoomTransition(g_game,(int)VStack_2b4.y,-1,3,this,-1); - if (uStack_2a2._1_1_ != 0) { + Game::StartRoomTransition(g_game,GHIDRA_INT(VStack_2b4.y),-1,3,this,-1); + if ((*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) != 0) { FUN_00420ae0(); FUN_00753c40(1); } @@ -40411,7 +40411,7 @@ LAB_007b3428: uVar36 = 7; goto LAB_007b34ad; case 0x14: - if (uStack_2a2._1_1_ == 0) { + if ((*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) == 0) { fVar51 = 1.0; } else { @@ -40434,10 +40434,10 @@ LAB_007b3428: (*pcVar1)(VStack_2c4.y,0,0,&EStack_254,0x1e); EVar33 = (EntityPtr)VStack_2bc.y; } - EVar33 = (EntityPtr)((int)EVar33 + 1); + EVar33 = (EntityPtr)(GHIDRA_INT(EVar33) + 1); VStack_2bc.y = (float)EVar33; EVar21 = (EntityPtr)((EntityList *)())->EntityList::Size(); - } while ((uint)EVar33 < (uint)EVar21); + } while (GHIDRA_UINT(EVar33) < GHIDRA_UINT(EVar21)); } uVar7 = 0; ((Game *)(g_game))->Game::GetPlayerManager(); @@ -40515,7 +40515,7 @@ LAB_007b36ff: if (iVar41 == 0) { iVar41 = 2; } - AddBombs(this,iVar41 + (uint)uStack_2a2._1_1_ * 2); + AddBombs(this,iVar41 + (*(undefined1 *)((char *)&(GHIDRA_UINT(uStack_2a2)) + 0x1)) * 2); break; case 0x18: if ((char)local_2ac != '\0') { @@ -40526,7 +40526,7 @@ LAB_007b36ff: if (iVar41 == 0) { iVar41 = 2; } - AddCoins(this,iVar41 + (uint)uStack_2a2._1_1_ * 2); + AddCoins(this,iVar41 + (*(undefined1 *)((char *)&(GHIDRA_UINT(uStack_2a2)) + 0x1)) * 2); break; case 0x19: if ((char)local_2ac != '\0') { @@ -40537,7 +40537,7 @@ LAB_007b36ff: if (iVar41 == 0) { iVar41 = 2; } - AddKeys(this,iVar41 + (uint)uStack_2a2._1_1_ * 2); + AddKeys(this,iVar41 + (*(undefined1 *)((char *)&(GHIDRA_UINT(uStack_2a2)) + 0x1)) * 2); break; case 0x1a: if ((char)local_2ac != '\0') { @@ -40549,7 +40549,7 @@ LAB_007b36ff: if (iVar41 == 0) { iVar41 = 2; } - AddBloodCharge(iVar41 + (uint)uStack_2a2._1_1_ * 2); + AddBloodCharge(iVar41 + (*(undefined1 *)((char *)&(GHIDRA_UINT(uStack_2a2)) + 0x1)) * 2); } else { iVar41 = this->_redHearts; @@ -40557,18 +40557,18 @@ LAB_007b36ff: if (iVar41 == 0) { iVar17 = 2; } - VStack_2a0.y = (float)((uint)uStack_2a2._1_1_ * 2); - puVar28 = (undefined1 *)((int)VStack_2a0.y + iVar17); + VStack_2a0.y = (float)((*(undefined1 *)((char *)&(GHIDRA_UINT(uStack_2a2)) + 0x1)) * 2); + puVar28 = (undefined1 *)(GHIDRA_INT(VStack_2a0.y) + iVar17); if (1 < *(int *)&g_game->_deathmatchManager) { iVar17 = iVar41; if (iVar41 == 0) { iVar17 = 0x10; } - uVar7 = iVar17 + (uint)uStack_2a2._1_1_ * 0x10; + uVar7 = iVar17 + (*(undefined1 *)((char *)&(GHIDRA_UINT(uStack_2a2)) + 0x1)) * 0x10; puVar28 = (undefined1 *)(uVar7 >> 3); this->_redHearts = (uVar7 & 7) + iVar41; } - AddHearts(this,(int)puVar28,0,0); + AddHearts(this,GHIDRA_INT(puVar28),0,0); } break; case 0x1b: @@ -40587,7 +40587,7 @@ LAB_007b36ff: pvVar45 = (void *)0x0; do { pLVar22 = *(Level **) - ((int)((PlayerCostumeMap *)((int)EVar33 + 0x125c))->_index + (int)pvVar45 * 4); + (GHIDRA_INT(((PlayerCostumeMap *)(GHIDRA_INT(EVar33) + 0x125c))->_index) + GHIDRA_INT(pvVar45) * 4); if ((*(undefined1 *)((char *)&(pLVar22->_roomList[1]) + 0xa7)) == '\0') { puVar28 = pLVar22->_roomList[0].OverrideData; if (puVar28 == &DAT_00000005) { @@ -40611,7 +40611,7 @@ LAB_007b2675: emplace_back<>(&vecResult->y); } } - pvVar45 = (void *)((int)pvVar45 + 1); + pvVar45 = (void *)(GHIDRA_INT(pvVar45) + 1); EVar33 = (EntityPtr)VStack_2a0.y; } while (pvVar45 < *(void **)((char *)VStack_2a0.y + 0x1264)); this = (Entity_Player *)VStack_2d4.y; @@ -40621,22 +40621,22 @@ LAB_007b2675: if (targetsEnd - targetsBegin >> 2 != 0) { do { fVar51 = VStack_2bc.y; - iVar41 = *(int *)(targetsBegin + (int)VStack_2bc.y * 4); + iVar41 = *(int *)(targetsBegin + GHIDRA_INT(VStack_2bc.y) * 4); if (((1 < *(int *)&g_game->_deathmatchManager) && (*(int *)(iVar41 + 0x28) == 1)) || (*(int *)(iVar41 + 0x28) - 10U < 0x3de)) { uVar7 = Random(); - iVar41 = *(int *)(targetsBegin + (int)fVar51 * 4); + iVar41 = *(int *)(targetsBegin + GHIDRA_INT(fVar51) * 4); VStack_2cc.x = *(float *)(iVar41 + 0x33c); VStack_2cc.y = *(float *)(iVar41 + 0x340); ((Game *)(g_game))->Game::Spawn(1000,0xf,&VStack_2cc,&g_vectorZero,(Entity *)0x0,0,uVar7); } - piVar37 = *(int **)(targetsBegin + (int)fVar51 * 4); + piVar37 = *(int **)(targetsBegin + GHIDRA_INT(fVar51) * 4); VStack_2a0.y = 0.0; if (piVar37[10] == 5) { VStack_2a0.y = *(float *)(piVar37 + 0x14a); } (**(code **)(*piVar37 + 0x28))(); - iVar41 = *(int *)(targetsBegin + (int)fVar51 * 4); + iVar41 = *(int *)(targetsBegin + GHIDRA_INT(fVar51) * 4); VStack_2b4.x = *(float *)(iVar41 + 0x33c); VStack_2b4.y = *(float *)(iVar41 + 0x340); pRVar6 = g_game->_room; @@ -40651,18 +40651,18 @@ LAB_007b2675: VStack_2b4.y = vecResult->y; } fVar51 = VStack_2bc.y; - RStack_20c._seed = *(int *)(*(int *)(targetsBegin + (int)VStack_2bc.y * 4) + 0x3ec); + RStack_20c._seed = *(int *)(*(int *)(targetsBegin + GHIDRA_INT(VStack_2bc.y) * 4) + 0x3ec); RStack_20c._shift1 = 1; RStack_20c._shift2 = 5; RStack_20c._shift3 = 0x10; - uStack_8._0_1_ = 1; + (*(undefined1 *)((char *)&(uStack_8) + 0x0)) = 1; uVar7 = ((RNG *)(&RStack_20c))->RNG::Next(); - tmpEntity = ((Game *)(g_game))->Game::Spawn(5,(uint)VStack_2f0.y,&VStack_2b4,&g_vectorZero,(Entity *)this,0 + tmpEntity = ((Game *)(g_game))->Game::Spawn(5,GHIDRA_UINT(VStack_2f0.y),&VStack_2b4,&g_vectorZero,(Entity *)this,0 ,uVar7); - uStack_8 = (uint)uStack_8._1_3_ << 8; - VStack_2bc.y = (float)((int)fVar51 + 1); + uStack_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(uStack_8)) + 0x1)) << 8; + VStack_2bc.y = (float)(GHIDRA_INT(fVar51) + 1); tmpEntity[1]._sprite._championColor._tint[0] = VStack_2a0.y; - } while ((uint)VStack_2bc.y < (uint)(targetsEnd - targetsBegin >> 2)); + } while (GHIDRA_UINT(VStack_2bc.y) < GHIDRA_UINT((targetsEnd - targetsBegin >> 2))); } uStack_8 = 0xffffffff; FID_conflict__Tidy(&targetsBegin); @@ -40699,13 +40699,13 @@ LAB_007b2675: uVar30 = ((Entity *)((Entity *)VStack_2a0.y))->Entity::Variant(); this = (Entity_Player *)VStack_2d4.y; ((Game *)(g_game))->Game::Spawn(5,uVar30,vecResult,&g_vectorZero,(Entity *)VStack_2d4.y,uVar7, - (uint)VStack_2dc.y); + GHIDRA_UINT(VStack_2dc.y)); EVar33 = (EntityPtr)VStack_2bc.y; } - EVar33 = (EntityPtr)((int)EVar33 + 1); + EVar33 = (EntityPtr)(GHIDRA_INT(EVar33) + 1); VStack_2bc.y = (float)EVar33; EVar21 = (EntityPtr)((EntityList *)())->EntityList::Size(); - } while ((uint)EVar33 < (uint)EVar21); + } while (GHIDRA_UINT(EVar33) < GHIDRA_UINT(EVar21)); } itemOverlay = (ItemOverlay *)((Game *)(g_game))->Game::GetItemOverlay(); ((ItemOverlay *)(itemOverlay))->ItemOverlay::Show(0x15,4,(Entity_Player *)0x0); @@ -40713,7 +40713,7 @@ LAB_007b2675: ((EntityList_Query *)(&jeraPickups))->EntityList_Query::~EntityList_Query(); break; case 0x22: - UseActiveItem(this,(short *)((int)&uStack_2f8 + 2),0x54,1,-1,0); + UseActiveItem(this,(short *)(GHIDRA_INT(&uStack_2f8) + 2),0x54,1,-1,0); itemOverlay = (ItemOverlay *)((Game *)(g_game))->Game::GetItemOverlay(); ((ItemOverlay *)(itemOverlay))->ItemOverlay::Show(0x16,4,(Entity_Player *)0x0); break; @@ -40742,7 +40742,7 @@ LAB_007b2675: ((ItemOverlay *)(itemOverlay))->ItemOverlay::Show(0x18,4,(Entity_Player *)0x0); break; case 0x25: - UseActiveItem(this,(short *)((int)&uStack_2f8 + 2),0x69,1,-1,0); + UseActiveItem(this,(short *)(GHIDRA_INT(&uStack_2f8) + 2),0x69,1,-1,0); itemOverlay = (ItemOverlay *)((Game *)(g_game))->Game::GetItemOverlay(); ((ItemOverlay *)(itemOverlay))->ItemOverlay::Show(0x19,4,(Entity_Player *)0x0); break; @@ -40769,7 +40769,7 @@ LAB_007b2675: case 0x28: uVar7 = ((RNG *)((RNG *)pRVar6))->RNG::RandomInt(4); if (uVar7 == 0) { - if (VStack_2dc.y._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(VStack_2dc.y) + 0x0)) == '\0') { uVar7 = ((RNG *)((RNG *)pRVar6))->RNG::Next(); pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); vecResult = Room::FindFreePickupSpawnPosition(pRVar6,&VStack_330,&this->_pos,40.0,0,0,0); @@ -40797,7 +40797,7 @@ LAB_007b2675: this = (Entity_Player *)VStack_2d4.y; } } - UseCard(this,(int)VStack_2b4.y,0); + UseCard(this,GHIDRA_INT(VStack_2b4.y),0); break; case 0x29: if ((((this->_queuedItem)._item != (void *)0x0) && @@ -40818,12 +40818,12 @@ LAB_007b2675: uVar7 = Random(); this = (Entity_Player *)VStack_2d4.y; vecResult = (Vector *)((Vector *)())->Vector::Vector(); - vecResult = ((Vector *)((Vector *)((void **)((int)this + 0x24) + 0xc6)))->Vector::__add(&VStack_31c,vecResult); + vecResult = ((Vector *)((Vector *)((void **)(GHIDRA_INT(this) + 0x24) + 0xc6)))->Vector::__add(&VStack_31c,vecResult); ((Game *)(g_game))->Game::Spawn(1000,0xf,vecResult,&g_vectorZero,(Entity *)0x0,0,uVar7); } ((Level *)((Level *)g_game))->Level::GetCurrentRoom(); VStack_2b4.y = (float)((Room *)())->Room::GetEntities(); - uStack_2a2._1_1_ = 0; + (*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) = 0; FUN_00424510(); uStack_8 = 4; pRVar6 = (Room *)0x0; @@ -40841,7 +40841,7 @@ LAB_007b2675: if (((iVar41 == 100) && (iVar41 = ((Entity *)((Entity *)local_298))->Entity::SubType(), iVar41 != 0)) && (iVar41 = ((Entity_Pickup *)((Entity_Pickup *)local_298))->Entity_Pickup::Timeout(), iVar41 < 1)) { speedStat = (int *)&(*(undefined1 *)((char *)(((Room *)this)) + 0x1520)); - uStack_2a2._1_1_ = 1; + (*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) = 1; fireDelayStat = (int *)&(*(undefined1 *)((char *)(((Room *)this)) + 0x1524)); damageStat = (int *)&(*(undefined1 *)((char *)(((Room *)this)) + 0x1528)); rangeStat = (int *)&(*(undefined1 *)((char *)(((Room *)this)) + 0x152c)); @@ -40878,7 +40878,7 @@ LAB_007b2675: } } } - puVar47 = (undefined1 *)((int)VStack_2cc.y + 1); + puVar47 = (undefined1 *)(GHIDRA_INT(VStack_2cc.y) + 1); VStack_2cc.y = (float)puVar47; puVar28 = (undefined1 *)((EntityList *)())->EntityList::Size(); pRVar6 = (Room *)VStack_2cc.y; @@ -40889,7 +40889,7 @@ LAB_007b2675: VStack_2bc.y = 0.0; iVar41 = ((std::vector *)())->std::vector::size(); if (iVar41 != 0) { - VStack_2a0.y = (float)((void **)((int)VStack_2d4.y + 0x24) + 0xee); + VStack_2a0.y = (float)((void **)(GHIDRA_INT(VStack_2d4.y) + 0x24) + 0xee); do { puVar27 = (undefined4 *)FUN_0042c810(EVar33); tmpEntity = (Entity *)*puVar27; @@ -40903,17 +40903,17 @@ LAB_007b2675: tmpEntity = ((Game *)(g_game))->Game::Spawn(5,100,&VStack_2dc,&g_vectorZero,(Entity *)0x0,uVar7,uVar30); FUN_006e2ff0(iVar41 + 1); tmpEntity->Update(); - EVar33 = (EntityPtr)((int)VStack_2bc.y + 1); + EVar33 = (EntityPtr)(GHIDRA_INT(VStack_2bc.y) + 1); VStack_2bc.y = (float)EVar33; EVar21 = (EntityPtr)((std::vector *)())->std::vector::size(); - } while ((uint)EVar33 < (uint)EVar21); + } while (GHIDRA_UINT(EVar33) < GHIDRA_UINT(EVar21)); } FUN_007dc610(); this = (Entity_Player *)VStack_2d4.y; *(uint *)((char *)VStack_2d4.y + 0x1574) = *(uint *)((char *)VStack_2d4.y + 0x1574) | 0x41f; EvaluateItems(); - UseActiveItem(this,(short *)((int)&uStack_2f8 + 2),0x23,1,-1,0); - if (uStack_2a2._1_1_ != 0) { + UseActiveItem(this,(short *)(GHIDRA_INT(&uStack_2f8) + 2),0x23,1,-1,0); + if ((*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) != 0) { ((Level *)((Level *)g_game))->Level::GetCurrentRoom(); iVar41 = ((GridEntity *)())->GridEntity::GetVariant(); if (iVar41 != 0xb) { @@ -40949,7 +40949,7 @@ LAB_007b4865: vecResult2 = ((Vector *)(vecResult2))->Vector::__mul(&VStack_360,&VStack_2c4.y); vecResult = ((Vector *)(vecResult))->Vector::__add(&VStack_31c,vecResult2); this = (Entity_Player *)VStack_2d4.y; - ((Game *)(g_game))->Game::Spawn(2,9,(Vector *)((void **)((int)VStack_2d4.y + 0x24) + 0xc6),vecResult, + ((Game *)(g_game))->Game::Spawn(2,9,(Vector *)((void **)(GHIDRA_INT(VStack_2d4.y) + 0x24) + 0xc6),vecResult, (Entity *)VStack_2d4.y,0,uVar7); goto LAB_007b8998; case 0x2b: @@ -40996,7 +40996,7 @@ LAB_007b4865: sourceRef = ((EntityRef *)(&suicideKingRef))->EntityRef::EntityRef(); (*pcVar1)(sourceRef); *(undefined4 *)&this->_lastDamageFlags = 0; - *(undefined4 *)((int)&this->_lastDamageFlags + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&this->_lastDamageFlags) + 4) = 0; (this->_lastDamageSource)._type = 0; (this->_lastDamageSource)._variant = 0; VStack_2a0.y = 0.0; @@ -41012,8 +41012,8 @@ LAB_007b4865: (Entity *)VStack_2d4.y,0,uVar7); fVar51 = VStack_2a0.y; FUN_005b19f0(VStack_2a0.y); - VStack_2a0.y = (float)((int)fVar51 + 1); - } while ((int)VStack_2a0.y < 10); + VStack_2a0.y = (float)(GHIDRA_INT(fVar51) + 1); + } while (GHIDRA_INT(VStack_2a0.y) < 10); goto LAB_007b8998; case 0x2f: UseActiveItem(this,&uStack_2a2,0xaf,1,-1,0); @@ -41030,14 +41030,14 @@ LAB_007b4865: VStack_2a0.y = (float)(hourglassState->_eventCounters + this->_glowingHourglassIndex * 0x177 + -0x182d); VStack_2b4.y = 0.0; - pfVar16 = (float *)((int)VStack_2a0.y + 0x104); + pfVar16 = (float *)(GHIDRA_INT(VStack_2a0.y) + 0x104); LAB_007b3be0: cVar5 = FUN_00753630(); if ((cVar5 == '\0') || (*pfVar16 != 6.72623e-44)) goto LAB_007b3bf0; - if ((uint)VStack_2b4.y < (Room *)0x3) { - puVar27 = (undefined4 *)((int)VStack_2b4.y * 8 + 0x10c + (int)VStack_2a0.y); - copyDst = (undefined4 *)((int)VStack_2b4.y * 8 + 0x104 + (int)VStack_2a0.y); - for (uVar7 = (3 - (int)VStack_2b4.y) * 2 & 0x3ffffffe; uVar7 != 0; uVar7 = uVar7 - 1) { + if (GHIDRA_UINT(VStack_2b4.y) < (Room *)0x3) { + puVar27 = (undefined4 *)(GHIDRA_INT(VStack_2b4.y) * 8 + 0x10c + GHIDRA_INT(VStack_2a0.y)); + copyDst = (undefined4 *)(GHIDRA_INT(VStack_2b4.y) * 8 + 0x104 + GHIDRA_INT(VStack_2a0.y)); + for (uVar7 = (3 - GHIDRA_INT(VStack_2b4.y)) * 2 & 0x3ffffffe; uVar7 != 0; uVar7 = uVar7 - 1) { *copyDst = *puVar27; puVar27 = puVar27 + 1; copyDst = copyDst + 1; @@ -41047,7 +41047,7 @@ LAB_007b3be0: FUN_00753620(); } LAB_007b3c4c: - UseActiveItem(this,(short *)((int)&uStack_2f8 + 2), + UseActiveItem(this,(short *)(GHIDRA_INT(&uStack_2f8) + 2), ((ActiveItemDesc *)&(*(undefined1 *)((char *)(((Room *)this)) + 0x1580)))->_item,4,0,0); TriggerBookOfVirtues(((ActiveItemDesc *)&(*(undefined1 *)((char *)(((Room *)this)) + 0x1580)))->_item,0); goto LAB_007b8998; @@ -41070,7 +41070,7 @@ LAB_007b3c4c: break; case 0x31: UseActiveItem(this,&uStack_2a2,0x69,1,-1,0); - UseActiveItem(this,(short *)((int)&uStack_2f8 + 2),0xa6,1,-1,0); + UseActiveItem(this,(short *)(GHIDRA_INT(&uStack_2f8) + 2),0xa6,1,-1,0); break; case 0x32: ((Level *)())->Level::GetCurrentRoom(); @@ -41113,7 +41113,7 @@ LAB_007b3d9f: } VStack_2a0.y = 0.0; do { - EVar33 = *(EntityPtr *)(&VStack_2c4.x + (int)VStack_2a0.y); + EVar33 = *(EntityPtr *)(&VStack_2c4.x + GHIDRA_INT(VStack_2a0.y)); VStack_2bc.y = (float)EVar33; if (EVar33 != (EntityPtr)0x0) { uVar7 = Random(); @@ -41136,9 +41136,9 @@ LAB_007b3d9f: vecResult = ((Entity *)((Entity *)fVar51))->Entity::Position(&VStack_330); ((Entity_NPC *)(npc))->Entity_NPC::hold_set(0x96,vecResult); } - VStack_2a0.y = (float)((int)VStack_2a0.y + 1); + VStack_2a0.y = (float)(GHIDRA_INT(VStack_2a0.y) + 1); this = (Entity_Player *)VStack_2d4.y; - } while ((int)VStack_2a0.y < 2); + } while (GHIDRA_INT(VStack_2a0.y) < 2); break; case 0x33: bVar4 = ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::HasNullEffect(0x2e); @@ -41172,14 +41172,14 @@ LAB_007b3d9f: rngSource = (RNG *)FUN_005cbd00(0x35); uVar30 = ((RNG *)(rngSource))->RNG::Next(); uVar30 = ItemPool::GetCard(uVar30,1,0,0); - vecResult = Vector::FromAngle(&VStack_374,(float)(int)VStack_2b4.y * -90.0); + vecResult = Vector::FromAngle(&VStack_374,(float)GHIDRA_INT(VStack_2b4.y) * -90.0); VStack_2dc.y = 2.0; vecResult = ((Vector *)(vecResult))->Vector::__mul(&VStack_300,&VStack_2dc.y); this = (Entity_Player *)VStack_2d4.y; ((Game *)(g_game))->Game::Spawn(5,300,&pickupPos,vecResult,(Entity *)VStack_2d4.y,uVar30,uVar7); - VStack_2b4.y = (float)((int)VStack_2b4.y + 1); + VStack_2b4.y = (float)(GHIDRA_INT(VStack_2b4.y) + 1); pRVar6 = local_298; - } while ((int)VStack_2b4.y < 3); + } while (GHIDRA_INT(VStack_2b4.y) < 3); break; case 0x36: itemConfig = Isaac::GetItemConfig(); @@ -41209,27 +41209,27 @@ LAB_007b3d9f: case 0.0: VStack_2dc.y = (float)Config::GetCollectibles(); uVar7 = ((Level *)((Level *)VStack_2dc.y))->Level::GetCurrentRoomIndex(); - if (-1 < (int)uVar7) { + if (-1 < GHIDRA_INT(uVar7)) { if (uVar7 < 0xa9) { - pRVar6 = (Room *)((int)uVar7 / 0xd); - VStack_2bc.y = (float)((int)uVar7 % 0xd); - local_298 = (Room *)((int)VStack_2bc.y + -3); - VStack_2c4.y = (float)((int)VStack_2bc.y + 3); + pRVar6 = (Room *)(GHIDRA_INT(uVar7) / 0xd); + VStack_2bc.y = (float)(GHIDRA_INT(uVar7) % 0xd); + local_298 = (Room *)(GHIDRA_INT(VStack_2bc.y) + -3); + VStack_2c4.y = (float)(GHIDRA_INT(VStack_2bc.y) + 3); VStack_2b4.y = (float)pRVar6; - if ((int)local_298 <= (int)((int)VStack_2bc.y + 3)) { + if (GHIDRA_INT(local_298) <= GHIDRA_INT((GHIDRA_INT(VStack_2bc.y) + 3))) { VStack_2cc.y = -NAN; do { fVar51 = VStack_2cc.y; - if (((undefined1 *)((int)VStack_2cc.y + (int)VStack_2bc.y) < (undefined1 *)0xd) && - ((int)&(*(undefined1 *)((char *)&(pRVar6[-1]) + 0x7895)) <= (int)&(*(undefined1 *)((char *)(pRVar6) + 0x3)))) { + if (((undefined1 *)(GHIDRA_INT(VStack_2cc.y) + GHIDRA_INT(VStack_2bc.y)) < (undefined1 *)0xd) && + (GHIDRA_INT(&(*(undefined1 *)((char *)&(pRVar6[-1]) + 0x7895))) <= GHIDRA_INT(&(*(undefined1 *)((char *)(pRVar6) + 0x3))))) { uVar7 = 0xfffffffd; VStack_2a0.y = 9.80909e-45; - iVar41 = (int)local_298->_gridEntities + (int)&(*(undefined1 *)((char *)&(pRVar6[-1]) + 0x7895)) * 0xd + -0x24 + iVar41 = GHIDRA_INT(local_298->_gridEntities) + GHIDRA_INT(&(*(undefined1 *)((char *)&(pRVar6[-1]) + 0x7895))) * 0xd + -0x24 ; do { - if ((int)pRVar6->_gridEntities + (uVar7 - 0x24) < 0xd) { - if ((int)((((uint)fVar51 ^ (int)fVar51 >> 0x1f) - ((int)fVar51 >> 0x1f)) + - ((uVar7 ^ (int)uVar7 >> 0x1f) - ((int)uVar7 >> 0x1f))) < 4) { + if (GHIDRA_INT(pRVar6->_gridEntities) + (uVar7 - 0x24) < 0xd) { + if (GHIDRA_INT((((GHIDRA_UINT(fVar51) ^ GHIDRA_INT(fVar51) >> 0x1f) - (GHIDRA_INT(fVar51) >> 0x1f)) + + ((uVar7 ^ GHIDRA_INT(uVar7) >> 0x1f) - (GHIDRA_INT(uVar7) >> 0x1f)))) < 4) { roomDesc = ((Level *)((Level *)VStack_2dc.y))->Level::GetRoomByIdx(iVar41,-1); pRVar6 = (Room *)VStack_2b4.y; fVar51 = VStack_2cc.y; @@ -41244,13 +41244,13 @@ LAB_007b3d9f: } uVar7 = uVar7 + 1; iVar41 = iVar41 + 0xd; - VStack_2a0.y = (float)((int)VStack_2a0.y + -1); + VStack_2a0.y = (float)(GHIDRA_INT(VStack_2a0.y) + -1); } while (VStack_2a0.y != 0.0); VStack_2a0.y = 0.0; } local_298 = (Room *)&(*(undefined1 *)((char *)(local_298) + 0x1)); - VStack_2cc.y = (float)((int)fVar51 + 1); - } while ((int)local_298 <= (int)VStack_2c4.y); + VStack_2cc.y = (float)(GHIDRA_INT(fVar51) + 1); + } while (GHIDRA_INT(local_298) <= GHIDRA_INT(VStack_2c4.y)); this = (Entity_Player *)VStack_2d4.y; } } @@ -41269,9 +41269,9 @@ LAB_007b3d9f: local_298 = (Room *)0x0; uVar7 = EntityPtr::Ref(); ((RNG *)(&shardRng))->RNG::game_constructor(uVar7,uVar30); - uStack_8 = CONCAT31(uStack_8._1_3_,6); + uStack_8 = CONCAT31((*(undefined1 *)((char *)&(uStack_8) + 0x1)),6); uVar7 = ((RNG *)(&shardRng))->RNG::RandomInt(2); - VStack_2a0.y = (float)((-(uint)(uVar7 != 0) & 0xffffffdc) + 0x24); + VStack_2a0.y = (float)((-GHIDRA_UINT((uVar7 != 0)) & 0xffffffdc) + 0x24); iVar41 = ((EntityList *)())->EntityList::Size(); if (iVar41 != 0) { uVar7 = 0; @@ -41300,7 +41300,7 @@ LAB_007b3d9f: if (pRVar6 != (Room *)0x0) { iVar41 = ((Entity *)((Entity *)pRVar6))->Entity::Variant(); iVar17 = ((Entity *)((Entity *)local_298))->Entity::Type(); - Entity_Pickup::Morph((Entity_Pickup *)local_298,iVar17,iVar41,(int)VStack_2a0.y,1,0,0); + Entity_Pickup::Morph((Entity_Pickup *)local_298,iVar17,iVar41,GHIDRA_INT(VStack_2a0.y),1,0,0); FUN_005b1950(0); } } @@ -41326,10 +41326,10 @@ LAB_007b3d9f: use_card_hagalaz(pRVar6); break; case 7.00649e-45: - UseActiveItem(this,(short *)((int)&uStack_30c + 2),0x1dc,1,-1,0); + UseActiveItem(this,(short *)(GHIDRA_INT(&uStack_30c) + 2),0x1dc,1,-1,0); break; case 8.40779e-45: - UseActiveItem(this,(short *)((int)&VStack_314.y + 2),0x54,1,-1,0); + UseActiveItem(this,(short *)(GHIDRA_INT(&VStack_314.y) + 2),0x54,1,-1,0); break; case 9.80909e-45: AddSoulHearts(this,1,0); @@ -41350,10 +41350,10 @@ LAB_007b3d9f: local_2a8 = 0; VStack_2a0.y = 0.0; do { - player = (Entity_Player *)(&VStack_2bc.x)[(int)VStack_2a0.y]; + player = (Entity_Player *)(&VStack_2bc.x)[GHIDRA_INT(VStack_2a0.y)]; if (player != (Entity_Player *)0x0) { uStack_2f8 = uStack_2f8 + player->_eternalHearts; - VStack_2cc.y = (float)((int)VStack_2cc.y + player->_goldenHearts); + VStack_2cc.y = (float)(GHIDRA_INT(VStack_2cc.y) + player->_goldenHearts); VStack_2f0.y = (float)player->_rottenHearts; local_2ac = player->_redHearts; player->_eternalHearts = 0; @@ -41363,8 +41363,8 @@ LAB_007b3d9f: VStack_2c4.y = (float)player->_boneHearts; if ((player->_redHearts < 1) || (player->_maxHearts < 1)) { if (player->_boneHearts < 1) { - if (0 < (int)EStack_2e4) { - AddSoulHearts(player,1 - (int)EStack_2e4,0); + if (0 < GHIDRA_INT(EStack_2e4)) { + AddSoulHearts(player,1 - GHIDRA_INT(EStack_2e4),0); } } else { @@ -41392,37 +41392,37 @@ LAB_007b4f9f: player->_boneHearts = 0; update_bone_hearts(player); } - VStack_2f0.y = (float)((int)VStack_2f0.y - player->_rottenHearts); - local_2ac = (local_2ac + (int)VStack_2f0.y * -2) - player->_redHearts; + VStack_2f0.y = (float)(GHIDRA_INT(VStack_2f0.y) - player->_rottenHearts); + local_2ac = (local_2ac + GHIDRA_INT(VStack_2f0.y) * -2) - player->_redHearts; iVar41 = FUN_00759260(); - uStack_2e8 = (float)((int)uStack_2e8 - iVar41); - EStack_2e4 = (EntityPtr)(((int)EStack_2e4 + (int)uStack_2e8 * -2) - player->_soulHearts); - if ((0 < (int)local_2ac) && (iVar41 = GetHealthType(player), iVar41 == 3)) { + uStack_2e8 = (float)(GHIDRA_INT(uStack_2e8) - iVar41); + EStack_2e4 = (EntityPtr)((GHIDRA_INT(EStack_2e4) + GHIDRA_INT(uStack_2e8) * -2) - player->_soulHearts); + if ((0 < GHIDRA_INT(local_2ac)) && (iVar41 = GetHealthType(player), iVar41 == 3)) { iVar41 = local_2ac + 1; local_2ac = 0; local_2a8 = local_2a8 + iVar41 / 2; } EVar33 = EStack_2e4; - if ((int)EStack_2e4 < 0) { - iVar41 = (1 - (int)EStack_2e4) / 2; - uStack_2e8 = (float)((int)uStack_2e8 - iVar41); - EVar33 = (EntityPtr)((int)EStack_2e4 + iVar41 * 2); + if (GHIDRA_INT(EStack_2e4) < 0) { + iVar41 = (1 - GHIDRA_INT(EStack_2e4)) / 2; + uStack_2e8 = (float)(GHIDRA_INT(uStack_2e8) - iVar41); + EVar33 = (EntityPtr)(GHIDRA_INT(EStack_2e4) + iVar41 * 2); } - fVar51 = (float)((int)VStack_2c4.y - player->_boneHearts); + fVar51 = (float)(GHIDRA_INT(VStack_2c4.y) - player->_boneHearts); uVar7 = uVar7 + local_2ac; VStack_2c4.y = fVar51; - VStack_314.y = (float)((int)((int)VStack_2f0.y + 0x24) + (int)VStack_314.y + -0x24); - VStack_2b4.y = (float)((int)VStack_2b4.y + (int)uStack_2e8); - EVar33 = (EntityPtr)((int)EStack_2f4 + (int)EVar33); - uStack_30c = uStack_30c + (int)fVar51; + VStack_314.y = (float)(GHIDRA_INT((GHIDRA_INT(VStack_2f0.y) + 0x24)) + GHIDRA_INT(VStack_314.y) + -0x24); + VStack_2b4.y = (float)(GHIDRA_INT(VStack_2b4.y) + GHIDRA_INT(uStack_2e8)); + EVar33 = (EntityPtr)(GHIDRA_INT(EStack_2f4) + GHIDRA_INT(EVar33)); + uStack_30c = uStack_30c + GHIDRA_INT(fVar51); iVar41 = local_2a8; EStack_2f4 = EVar33; } this = (Entity_Player *)VStack_2d4.y; - VStack_2a0.y = (float)((int)VStack_2a0.y + 1); - } while ((uint)VStack_2a0.y < 2); + VStack_2a0.y = (float)(GHIDRA_INT(VStack_2a0.y) + 1); + } while (GHIDRA_UINT(VStack_2a0.y) < 2); if (0 < *(int *)((char *)VStack_2d4.y + 0x1da8)) { - EStack_2f4 = (EntityPtr)((int)EVar33 + *(int *)((char *)VStack_2d4.y + 0x1da8)); + EStack_2f4 = (EntityPtr)(GHIDRA_INT(EVar33) + *(int *)((char *)VStack_2d4.y + 0x1da8)); *(undefined4 *)((char *)VStack_2d4.y + 0x1da8) = 0; } uVar30 = uVar7; @@ -41432,11 +41432,11 @@ LAB_007b4f9f: } local_2a8 = iVar41 + *(int *)((char *)VStack_2d4.y + 0x1368); VStack_2bc.y = *(float *)((char *)VStack_2d4.y + 0x1dd4); - VStack_2dc.y = (float)(uint)(*(undefined1 *)((char *)VStack_2d4.y + 0x1361) != '\0'); - EStack_2e4 = (EntityPtr)(*(int *)((char *)VStack_2d4.y + 0x1364) - (int)VStack_2bc.y); + VStack_2dc.y = (float)GHIDRA_UINT((*(undefined1 *)((char *)VStack_2d4.y + 0x1361) != '\0')); + EStack_2e4 = (EntityPtr)(*(int *)((char *)VStack_2d4.y + 0x1364) - GHIDRA_INT(VStack_2bc.y)); uStack_2e8 = *(float *)((char *)VStack_2d4.y + 0x135c); *(undefined4 *)((char *)VStack_2d4.y + 0x1368) = 0; - VStack_2a0.y = (float)(uint)(*(undefined1 *)((char *)VStack_2d4.y + 0x1360) != '\0'); + VStack_2a0.y = (float)GHIDRA_UINT((*(undefined1 *)((char *)VStack_2d4.y + 0x1360) != '\0')); *(undefined4 *)((char *)VStack_2d4.y + 0x1364) = 0; *(undefined4 *)((char *)VStack_2d4.y + 0x1dd4) = 0; *(undefined1 *)((char *)VStack_2d4.y + 0x1361) = 0; @@ -41448,13 +41448,13 @@ LAB_007b4f9f: uVar7 = ((RNG *)((RNG *)local_298))->RNG::Next(); ((RNG *)(&tmpRng))->RNG::game_constructor(uVar7,shiftidx); uStack_8 = 7; - VStack_2f0.y = (float)((void **)((int)this + 0x24) + 0xc6); - if (0 < (int)uVar30) { + VStack_2f0.y = (float)((void **)(GHIDRA_INT(this) + 0x24) + 0xc6); + if (0 < GHIDRA_INT(uVar30)) { do { iVar41 = nullsub_7dd380(); - if ((int)uVar30 < iVar41) { + if (GHIDRA_INT(uVar30) < iVar41) { iVar41 = nullsub_7dd380(); - if ((int)uVar30 < iVar41) { + if (GHIDRA_INT(uVar30) < iVar41) { VStack_2c4.y = 2.8026e-45; } else { @@ -41469,23 +41469,23 @@ LAB_007b4f9f: uVar7 = ((RNG *)(&tmpRng))->RNG::Next(); pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); vecResult = Room::FindFreePickupSpawnPosition - (pRVar6,&VStack_300,(Vector *)((void **)((int)this + 0x24) + 0xc6),40.0, + (pRVar6,&VStack_300,(Vector *)((void **)(GHIDRA_INT(this) + 0x24) + 0xc6),40.0, 0,0,0); - ((Game *)(g_game))->Game::Spawn(5,10,vecResult,&g_vectorZero,(Entity *)this,(uint)VStack_2c4.y,uVar7); + ((Game *)(g_game))->Game::Spawn(5,10,vecResult,&g_vectorZero,(Entity *)this,GHIDRA_UINT(VStack_2c4.y),uVar7); uVar30 = local_2ac; - } while (0 < (int)local_2ac); + } while (0 < GHIDRA_INT(local_2ac)); } - VStack_2c4.y = (float)((void **)((int)this + 0x24) + 0xc6); + VStack_2c4.y = (float)((void **)(GHIDRA_INT(this) + 0x24) + 0xc6); fVar51 = VStack_314.y; EVar33 = EStack_2f4; - if (0 < (int)VStack_314.y) { + if (0 < GHIDRA_INT(VStack_314.y)) { do { uVar7 = ((RNG *)(&tmpRng))->RNG::Next(); pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); vecResult = Room::FindFreePickupSpawnPosition (pRVar6,&VStack_300,(Vector *)VStack_2c4.y,40.0,0,0,0); ((Game *)(g_game))->Game::Spawn(5,10,vecResult,&g_vectorZero,(Entity *)this,0xc,uVar7); - VStack_314.y = (float)((int)VStack_314.y + -1); + VStack_314.y = (float)(GHIDRA_INT(VStack_314.y) + -1); fVar51 = 0.0; EVar33 = EStack_2f4; } while (VStack_314.y != 0.0); @@ -41493,22 +41493,22 @@ LAB_007b4f9f: while( true ) { VStack_314.y = fVar51; EStack_2f4 = EVar33; - if ((int)EVar33 < 1) break; + if (GHIDRA_INT(EVar33) < 1) break; iVar41 = nullsub_7dd380(); - if ((int)EVar33 < iVar41) { + if (GHIDRA_INT(EVar33) < iVar41) { VStack_2c4.y = (float)&DAT_00000008; } else { VStack_2c4.y = 4.2039e-45; } iVar41 = nullsub_7dd380(); - EStack_2f4 = (EntityPtr)((int)EVar33 - iVar41); + EStack_2f4 = (EntityPtr)(GHIDRA_INT(EVar33) - iVar41); uVar7 = ((RNG *)(&tmpRng))->RNG::Next(); pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); vecResult = Room::FindFreePickupSpawnPosition - (pRVar6,&VStack_300,(Vector *)((void **)((int)this + 0x24) + 0xc6),40.0,0, + (pRVar6,&VStack_300,(Vector *)((void **)(GHIDRA_INT(this) + 0x24) + 0xc6),40.0,0, 0,0); - ((Game *)(g_game))->Game::Spawn(5,10,vecResult,&g_vectorZero,(Entity *)this,(uint)VStack_2c4.y,uVar7); + ((Game *)(g_game))->Game::Spawn(5,10,vecResult,&g_vectorZero,(Entity *)this,GHIDRA_UINT(VStack_2c4.y),uVar7); fVar51 = VStack_314.y; EVar33 = EStack_2f4; } @@ -41519,20 +41519,20 @@ LAB_007b4f9f: uVar7 = ((RNG *)(&tmpRng))->RNG::Next(); pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); vecResult = Room::FindFreePickupSpawnPosition - (pRVar6,&VStack_300,(Vector *)((void **)((int)this + 0x24) + 0xc6),40.0, + (pRVar6,&VStack_300,(Vector *)((void **)(GHIDRA_INT(this) + 0x24) + 0xc6),40.0, 0,0,0); ((Game *)(g_game))->Game::Spawn(5,10,vecResult,&g_vectorZero,(Entity *)this,6,uVar7); - fVar51 = (float)((int)VStack_2c4.y + 1); + fVar51 = (float)(GHIDRA_INT(VStack_2c4.y) + 1); VStack_2c4.y = fVar51; iVar41 = nullsub_7dd380(); - } while ((int)fVar51 < iVar41); + } while (GHIDRA_INT(fVar51) < iVar41); } if (0 < uStack_30c) { do { uVar7 = ((RNG *)(&tmpRng))->RNG::Next(); pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); vecResult = Room::FindFreePickupSpawnPosition - (pRVar6,&VStack_300,(Vector *)((void **)((int)this + 0x24) + 0xc6),40.0, + (pRVar6,&VStack_300,(Vector *)((void **)(GHIDRA_INT(this) + 0x24) + 0xc6),40.0, 0,0,0); ((Game *)(g_game))->Game::Spawn(5,10,vecResult,&g_vectorZero,(Entity *)this,0xb,uVar7); uStack_30c = uStack_30c + -1; @@ -41543,28 +41543,28 @@ LAB_007b4f9f: uVar7 = ((RNG *)(&tmpRng))->RNG::Next(); pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); vecResult = Room::FindFreePickupSpawnPosition - (pRVar6,&VStack_374,(Vector *)((void **)((int)this + 0x24) + 0xc6),40.0, + (pRVar6,&VStack_374,(Vector *)((void **)(GHIDRA_INT(this) + 0x24) + 0xc6),40.0, 0,0,0); ((Game *)(g_game))->Game::Spawn(5,10,vecResult,&g_vectorZero,(Entity *)this,4,uVar7); uStack_2f8 = uStack_2f8 + -1; } while (uStack_2f8 != 0); } - local_298 = (Room *)((void **)((int)this + 0x24) + 0xc6); - if (0 < (int)VStack_2cc.y) { + local_298 = (Room *)((void **)(GHIDRA_INT(this) + 0x24) + 0xc6); + if (0 < GHIDRA_INT(VStack_2cc.y)) { do { uVar7 = ((RNG *)(&tmpRng))->RNG::Next(); pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); vecResult = Room::FindFreePickupSpawnPosition - (pRVar6,&VStack_330,(Vector *)((void **)((int)this + 0x24) + 0xc6),40.0, + (pRVar6,&VStack_330,(Vector *)((void **)(GHIDRA_INT(this) + 0x24) + 0xc6),40.0, 0,0,0); ((Game *)(g_game))->Game::Spawn(5,10,vecResult,&g_vectorZero,(Entity *)this,7,uVar7); - VStack_2cc.y = (float)((int)VStack_2cc.y + -1); + VStack_2cc.y = (float)(GHIDRA_INT(VStack_2cc.y) + -1); } while (VStack_2cc.y != 0.0); - VStack_2f0.y = (float)((void **)((int)this + 0x24) + 0xc6); + VStack_2f0.y = (float)((void **)(GHIDRA_INT(this) + 0x24) + 0xc6); VStack_2cc.y = 0.0; } VStack_2b4.y = (float)local_298; - if (0 < (int)local_2a8) { + if (0 < GHIDRA_INT(local_2a8)) { do { if (local_2a8 < 100) { if (0x18 < local_2a8) { @@ -41609,34 +41609,34 @@ LAB_007b5662: vecResult = Room::FindFreePickupSpawnPosition (pRVar6,&VStack_31c,(Vector *)VStack_2f0.y,fVar51,0,0,0); fVar51 = VStack_2c4.y; - tmpEntity = ((Game *)(g_game))->Game::Spawn(5,(uint)VStack_2c4.y,vecResult,&g_vectorZero,(Entity *)this,uVar7 - ,(uint)local_298); + tmpEntity = ((Game *)(g_game))->Game::Spawn(5,GHIDRA_UINT(VStack_2c4.y),vecResult,&g_vectorZero,(Entity *)this,uVar7 + ,GHIDRA_UINT(local_298)); VStack_2c4.y = (float)tmpEntity; if (fVar51 == 1.4013e-43) { uVar7 = Random(); vecResult = ((Entity *)((Entity *)VStack_2c4.y))->Entity::Position(&VStack_360); ((Game *)(g_game))->Game::Spawn(1000,0xf,vecResult,&g_vectorZero,(Entity *)0x0,0,uVar7); } - } while (0 < (int)local_2a8); + } while (0 < GHIDRA_INT(local_2a8)); local_298 = (Room *)VStack_2f0.y; } VStack_2cc.y = VStack_2b4.y; - if (0 < (int)EStack_2e4) { + if (0 < GHIDRA_INT(EStack_2e4)) { do { - if ((uint)EStack_2e4 < 99) { - if (9 < (uint)EStack_2e4) { + if (GHIDRA_UINT(EStack_2e4) < 99) { + if (9 < GHIDRA_UINT(EStack_2e4)) { uVar7 = 0x13; - EStack_2e4 = (EntityPtr)((int)EStack_2e4 + -10); + EStack_2e4 = (EntityPtr)(GHIDRA_INT(EStack_2e4) + -10); goto LAB_007b57d2; } VStack_2c4.y = 5.60519e-44; - if ((uint)EStack_2e4 < 2) { + if (GHIDRA_UINT(EStack_2e4) < 2) { uVar7 = 1; - EStack_2e4 = (EntityPtr)((int)EStack_2e4 + -1); + EStack_2e4 = (EntityPtr)(GHIDRA_INT(EStack_2e4) + -1); } else { uVar7 = 2; - EStack_2e4 = (EntityPtr)((int)EStack_2e4 + -2); + EStack_2e4 = (EntityPtr)(GHIDRA_INT(EStack_2e4) + -2); } VStack_2b4.y = (float)((RNG *)(&tmpRng))->RNG::Next(); pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); @@ -41644,7 +41644,7 @@ LAB_007b5662: } else { uVar7 = 0xbe; - EStack_2e4 = (EntityPtr)((int)EStack_2e4 + -99); + EStack_2e4 = (EntityPtr)(GHIDRA_INT(EStack_2e4) + -99); LAB_007b57d2: VStack_2c4.y = 1.4013e-43; VStack_2b4.y = (float)((RNG *)(&tmpRng))->RNG::Next(); @@ -41654,18 +41654,18 @@ LAB_007b57d2: vecResult = Room::FindFreePickupSpawnPosition (pRVar6,&VStack_368,(Vector *)local_298,fVar51,0,0,0); fVar51 = VStack_2c4.y; - tmpEntity = ((Game *)(g_game))->Game::Spawn(5,(uint)VStack_2c4.y,vecResult,&g_vectorZero,(Entity *)this,uVar7 - ,(uint)VStack_2b4.y); + tmpEntity = ((Game *)(g_game))->Game::Spawn(5,GHIDRA_UINT(VStack_2c4.y),vecResult,&g_vectorZero,(Entity *)this,uVar7 + ,GHIDRA_UINT(VStack_2b4.y)); VStack_2c4.y = (float)tmpEntity; if (fVar51 == 1.4013e-43) { uVar7 = Random(); vecResult = ((Entity *)((Entity *)VStack_2c4.y))->Entity::Position(&VStack_398); ((Game *)(g_game))->Game::Spawn(1000,0xf,vecResult,&g_vectorZero,(Entity *)0x0,0,uVar7); } - } while (0 < (int)EStack_2e4); + } while (0 < GHIDRA_INT(EStack_2e4)); VStack_2b4.y = (float)local_298; } - for (; VStack_2dc.y != 0.0; VStack_2dc.y = (float)((int)VStack_2dc.y - 1)) { + for (; VStack_2dc.y != 0.0; VStack_2dc.y = (float)(GHIDRA_INT(VStack_2dc.y) - 1)) { uVar7 = ((RNG *)(&tmpRng))->RNG::Next(); pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); vecResult = Room::FindFreePickupSpawnPosition @@ -41675,28 +41675,28 @@ LAB_007b57d2: VStack_2dc.y = 0.0; fVar51 = uStack_2e8; EVar33 = (EntityPtr)VStack_2bc.y; - if (0 < (int)VStack_2bc.y) { + if (0 < GHIDRA_INT(VStack_2bc.y)) { do { uVar7 = ((RNG *)(&tmpRng))->RNG::Next(); pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); vecResult = Room::FindFreePickupSpawnPosition (pRVar6,&spawnPos,(Vector *)VStack_2cc.y,40.0,0,0,0); ((Game *)(g_game))->Game::Spawn(5,0x28,vecResult,&g_vectorZero,(Entity *)this,7,uVar7); - VStack_2bc.y = (float)((int)VStack_2bc.y + -1); + VStack_2bc.y = (float)(GHIDRA_INT(VStack_2bc.y) + -1); fVar51 = uStack_2e8; EVar33 = (EntityPtr)0x0; } while ((EntityPtr)VStack_2bc.y != (EntityPtr)0x0); } - while (VStack_2bc.y = (float)EVar33, 0 < (int)fVar51) { - if ((uint)fVar51 < 99) { + while (VStack_2bc.y = (float)EVar33, 0 < GHIDRA_INT(fVar51)) { + if (GHIDRA_UINT(fVar51) < 99) { VStack_2c4.y = 4.2039e-44; - if ((uint)fVar51 < 2) { + if (GHIDRA_UINT(fVar51) < 2) { VStack_2dc.y = 1.4013e-45; - fVar51 = (float)((int)fVar51 - 1); + fVar51 = (float)(GHIDRA_INT(fVar51) - 1); } else { VStack_2dc.y = 4.2039e-45; - fVar51 = (float)((int)fVar51 - 2); + fVar51 = (float)(GHIDRA_INT(fVar51) - 2); } uStack_2e8 = fVar51; VStack_2bc.y = (float)((RNG *)(&tmpRng))->RNG::Next(); @@ -41706,7 +41706,7 @@ LAB_007b57d2: else { VStack_2bc.y = (float)((RNG *)(&tmpRng))->RNG::Next(); VStack_2f0.y = 10.0; - fVar51 = (float)((int)fVar51 - 99); + fVar51 = (float)(GHIDRA_INT(fVar51) - 99); VStack_2c4.y = 1.4013e-43; VStack_2dc.y = (float)&DAT_00000011; uStack_2e8 = fVar51; @@ -41715,8 +41715,8 @@ LAB_007b57d2: } vecResult = Room::FindFreePickupSpawnPosition (pRVar20,&spawnPos2,(Vector *)VStack_2cc.y,(float)pRVar6,0,0,0); - VStack_2bc.y = (float)((Game *)(g_game))->Game::Spawn(5,(uint)VStack_2c4.y,vecResult,&g_vectorZero, - (Entity *)this,(uint)VStack_2dc.y,(uint)VStack_2bc.y); + VStack_2bc.y = (float)((Game *)(g_game))->Game::Spawn(5,GHIDRA_UINT(VStack_2c4.y),vecResult,&g_vectorZero, + (Entity *)this,GHIDRA_UINT(VStack_2dc.y),GHIDRA_UINT(VStack_2bc.y)); EVar33 = (EntityPtr)VStack_2bc.y; if (VStack_2c4.y == 1.4013e-43) { uVar7 = Random(); @@ -41726,7 +41726,7 @@ LAB_007b57d2: EVar33 = (EntityPtr)VStack_2bc.y; } } - for (; VStack_2a0.y != 0.0; VStack_2a0.y = (float)((int)VStack_2a0.y - 1)) { + for (; VStack_2a0.y != 0.0; VStack_2a0.y = (float)(GHIDRA_INT(VStack_2a0.y) - 1)) { uVar7 = ((RNG *)(&tmpRng))->RNG::Next(); pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); vecResult = Room::FindFreePickupSpawnPosition @@ -41753,26 +41753,26 @@ LAB_007b57d2: uVar30 = GetMaxPocketItems(this); } while (uVar7 < uVar30); } - if (uStack_2a2._1_1_ != 0) { + if ((*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) != 0) { Config::GetCollectibles(); EVar33 = (EntityPtr)FUN_0042c7f0(); FUN_00424510(); - uStack_8._0_1_ = 8; - if (0 < (int)EVar33) { + (*(undefined1 *)((char *)&(uStack_8) + 0x0)) = 8; + if (0 < GHIDRA_INT(EVar33)) { joined_r0x007b5c54: - EVar33 = (EntityPtr)((int)EVar33 + -1); + EVar33 = (EntityPtr)(GHIDRA_INT(EVar33) + -1); VStack_2a0.y = (float)EVar33; - if (-1 < (int)EVar33) { + if (-1 < GHIDRA_INT(EVar33)) { Config::GetCollectibles(); iVar41 = FUN_005cbe00(EVar33); if (*(char *)(iVar41 + 4) == '\0') { Config::GetCollectibles(); iVar41 = FUN_005cbe00(EVar33); VStack_2b4.y = *(float *)(iVar41 + 8); - bVar4 = CanRerollCollectible(this,(int)VStack_2b4.y,0); + bVar4 = CanRerollCollectible(this,GHIDRA_INT(VStack_2b4.y),0); if (bVar4 != 0) { itemConfig = Isaac::GetItemConfig(); - configItem = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible((int)VStack_2b4.y); + configItem = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(GHIDRA_INT(VStack_2b4.y)); if (configItem->type != 3) { VStack_2bc.y = (float)&(*(undefined1 *)((char *)&((((Room *)this)->_fxLayers)) + 0xb0)); iVar41 = 0; @@ -41807,7 +41807,7 @@ joined_r0x007b5c54: } while (uVar7 < uVar30); } } - uStack_8 = CONCAT31(uStack_8._1_3_,7); + uStack_8 = CONCAT31((*(undefined1 *)((char *)&(uStack_8) + 0x1)),7); FID_conflict__Tidy(auStack_328); } FUN_005b19d0(); @@ -41836,8 +41836,8 @@ joined_r0x007b5c54: ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::RemoveNullEffect(0x3e,1); ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddNullEffect(0x3e,(byte)local_2a8,1); this->_reverseEmpressMaxHearts = iVar41; - VStack_2a0.y = (float)(((uint)uStack_2a2._1_1_ - iVar41) + 2); - if (0 < (int)VStack_2a0.y) { + VStack_2a0.y = (float)(((*(undefined1 *)((char *)&(GHIDRA_UINT(uStack_2a2)) + 0x1)) - iVar41) + 2); + if (0 < GHIDRA_INT(VStack_2a0.y)) { do { iVar41 = GetHeartLimit(this,0); iVar17 = GetEffectiveMaxHearts(this); @@ -41846,7 +41846,7 @@ joined_r0x007b5c54: AddMaxHearts(this,2,0); } AddHearts(this,2,0,0); - VStack_2a0.y = (float)((int)VStack_2a0.y + -1); + VStack_2a0.y = (float)(GHIDRA_INT(VStack_2a0.y) + -1); } while ((EntityPtr)VStack_2a0.y != (EntityPtr)0x0); VStack_2a0.y = 0.0; } @@ -41874,13 +41874,13 @@ joined_r0x007b5c54: ExceptionList = local_10; return; } - VStack_2a0.y = (float)(uStack_2a2._1_1_ + 2); + VStack_2a0.y = (float)((*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) + 2); do { uVar7 = ((RNG *)((RNG *)pRVar6))->RNG::Next(); pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); vecResult = Room::FindFreePickupSpawnPosition(pRVar6,&VStack_308,&this->_pos,40.0,0,0,0); ((Game *)(g_game))->Game::Spawn(5,10,vecResult,&g_vectorZero,(Entity *)this,0xb,uVar7); - VStack_2a0.y = (float)((int)VStack_2a0.y + -1); + VStack_2a0.y = (float)(GHIDRA_INT(VStack_2a0.y) + -1); pRVar6 = local_298; } while (VStack_2a0.y != 0.0); VStack_2a0.y = 0.0; @@ -41890,13 +41890,13 @@ joined_r0x007b5c54: ExceptionList = local_10; return; } - VStack_2a0.y = (float)(uStack_2a2._1_1_ + 1); + VStack_2a0.y = (float)((*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) + 1); VStack_2dc.y = (float)&this->_pos; do { EVar33 = (EntityPtr)((RNG *)((RNG *)pRVar6))->RNG::Next(); VStack_2bc.y = (float)EVar33; pRVar20 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); - uVar7 = ((Room *)(pRVar20))->Room::GetSeededCollectible((uint)EVar33,0); + uVar7 = ((Room *)(pRVar20))->Room::GetSeededCollectible(GHIDRA_UINT(EVar33),0); ((Game *)(g_game))->Game::GetField26614(); cVar5 = FUN_00429550(); fVar51 = VStack_2bc.y; @@ -41907,7 +41907,7 @@ joined_r0x007b5c54: cVar5 = (**(code **)(*piVar37 + 0x30))(uVar7); if (cVar5 == '\0') break; pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); - uVar7 = ((Room *)(pRVar6))->Room::GetSeededCollectible((uint)fVar51,0); + uVar7 = ((Room *)(pRVar6))->Room::GetSeededCollectible(GHIDRA_UINT(fVar51),0); ((Game *)(g_game))->Game::GetField26614(); cVar5 = FUN_00429550(); } while (cVar5 != '\0'); @@ -41938,9 +41938,9 @@ joined_r0x007b5c54: if ((*(int *)((char *)this + 0x13c0) != 10) && (*(int *)((char *)this + 0x13c0) != 0x1f)) { AddBrokenHearts(this,1); } - VStack_2a0.y = (float)((int)VStack_2a0.y + -1); - *(undefined4 *)&(*(undefined1 *)((char *)(((FXLayers *)((int)this + 0x1618))) + 0x90)) = 0x400; - *(undefined4 *)&(*(undefined1 *)((char *)(((FXLayers *)((int)this + 0x1618))) + 0x94)) = 0; + VStack_2a0.y = (float)(GHIDRA_INT(VStack_2a0.y) + -1); + *(undefined4 *)&(*(undefined1 *)((char *)(((FXLayers *)(GHIDRA_INT(this) + 0x1618))) + 0x90)) = 0x400; + *(undefined4 *)&(*(undefined1 *)((char *)(((FXLayers *)(GHIDRA_INT(this) + 0x1618))) + 0x94)) = 0; pRVar6 = local_298; } while (VStack_2a0.y != 0.0); VStack_2a0.y = 0.0; @@ -41996,7 +41996,7 @@ joined_r0x007b5c54: (*pcVar1)(uVar36,0xffffffff,0xff,0,1); effect->Update(); this = (Entity_Player *)VStack_2d4.y; - VStack_2bc.y = (float)((int)VStack_2bc.y + -1); + VStack_2bc.y = (float)(GHIDRA_INT(VStack_2bc.y) + -1); } while ((EntityPtr)VStack_2bc.y != (EntityPtr)0x0); pcVar1 = *(code **)(*(int *)VStack_2d4.y + 0x3c); uVar36 = ((Color *)(0x3f800000))->Color::Color(0,0,0,0,0x3f4ccccd,0x3f4ccccd,0x3f4ccccd); @@ -42014,7 +42014,7 @@ joined_r0x007b5c54: } goto LAB_007b8998; case 0x40: - uVar7 = ((RNG *)((RNG *)pRVar6))->RNG::RandomInt((uStack_2a2._1_1_ + 1) * 3); + uVar7 = ((RNG *)((RNG *)pRVar6))->RNG::RandomInt(((*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) + 1) * 3); EVar33 = (EntityPtr)(uVar7 + 2); VStack_2a0.y = (float)EVar33; if (EVar33 != (EntityPtr)0x0) { @@ -42024,7 +42024,7 @@ joined_r0x007b5c54: Room::FindFreePickupSpawnPosition(pRVar20,&VStack_358,(Vector *)VStack_2bc.y,40.0,0,0,0); uVar7 = ((RNG *)((RNG *)pRVar6))->RNG::Next(); ((Game *)(g_game))->Game::Spawn(5,0x3c,&VStack_358,&g_vectorZero,(Entity *)0x0,0,uVar7); - EVar33 = (EntityPtr)((int)EVar33 + -1); + EVar33 = (EntityPtr)(GHIDRA_INT(EVar33) + -1); this = (Entity_Player *)VStack_2d4.y; } while (EVar33 != (EntityPtr)0x0); } @@ -42043,7 +42043,7 @@ LAB_007b6afb: uVar30 = 0x21; uVar7 = ((RNG *)((RNG *)pRVar6))->RNG::Next(); ((RNG *)(&RStack_22c))->RNG::game_constructor(uVar7,uVar30); - uStack_8 = CONCAT31(uStack_8._1_3_,0xb); + uStack_8 = CONCAT31((*(undefined1 *)((char *)&(uStack_8) + 0x1)),0xb); uVar7 = ((RNG *)(&RStack_22c))->RNG::Next(); pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); ((Level *)((Level *)g_game))->Level::GetCurrentRoom(); @@ -42094,7 +42094,7 @@ LAB_007b6706: } else { iVar41 = ((Entity *)((Entity *)pRVar6))->Entity::SubType(); - local_2a8 = (uint)(iVar41 != 2) * 2 + 1; + local_2a8 = GHIDRA_UINT((iVar41 != 2)) * 2 + 1; } } } @@ -42122,10 +42122,10 @@ LAB_007b684f: uVar30 = 0x10; uVar7 = ((Entity *)((Entity *)pRVar6))->Entity::InitSeed(); ((RNG *)(&tmpRng))->RNG::game_constructor(uVar7,uVar30); - uStack_8 = CONCAT31(uStack_8._1_3_,10); + uStack_8 = CONCAT31((*(undefined1 *)((char *)&(uStack_8) + 0x1)),10); if (9 < local_2a8) { VStack_2a0.y = (float)((local_2a8 - 5) / 5); - local_2a8 = local_2a8 + (int)VStack_2a0.y * -5; + local_2a8 = local_2a8 + GHIDRA_INT(VStack_2a0.y) * -5; do { uVar7 = ((RNG *)(&tmpRng))->RNG::Next(); uVar30 = ((RNG *)(&tmpRng))->RNG::Next(); @@ -42136,11 +42136,11 @@ LAB_007b684f: vecResult = ((Vector *)(vecResult))->Vector::__mul(&VStack_374,&VStack_2c4.y); vecResult2 = ((Entity *)((Entity *)VStack_2b4.y))->Entity::Position(&VStack_330); ((Game *)(g_game))->Game::Spawn(5,0x14,vecResult2,vecResult,(Entity *)0x0,2,uVar7); - VStack_2a0.y = (float)((int)VStack_2a0.y - 1); + VStack_2a0.y = (float)(GHIDRA_INT(VStack_2a0.y) - 1); } while (VStack_2a0.y != 0.0); VStack_2a0.y = 0.0; } - if (0 < (int)local_2a8) { + if (0 < GHIDRA_INT(local_2a8)) { do { uVar7 = ((RNG *)(&tmpRng))->RNG::Next(); uVar30 = ((RNG *)(&tmpRng))->RNG::Next(); @@ -42170,7 +42170,7 @@ LAB_007b684f: } Entity_Pickup::RemoveOtherOptions(); uVar7 = local_2ac + 1; - uStack_8 = CONCAT31(uStack_8._1_3_,9); + uStack_8 = CONCAT31((*(undefined1 *)((char *)&(uStack_8) + 0x1)),9); local_2ac = uVar7; guard_check_icall(); } @@ -42179,7 +42179,7 @@ LAB_007b684f: if ((uVar7 == 300) || (uVar7 == 0x5a)) goto LAB_007b6844; if (uVar7 == 100) { iVar41 = ((Entity *)((Entity *)pRVar6))->Entity::SubType(); - local_2a8 = -(uint)(iVar41 != 0) & 0xf; + local_2a8 = -GHIDRA_UINT((iVar41 != 0)) & 0xf; if (local_2a8 != 0) goto LAB_007b684f; } } @@ -42188,10 +42188,10 @@ switchD_007b66d7_caseD_b: uVar7 = local_2ac; VStack_2bc.y = (float)EVar33; } - EVar33 = (EntityPtr)((int)VStack_2bc.y + 1); + EVar33 = (EntityPtr)(GHIDRA_INT(VStack_2bc.y) + 1); VStack_2bc.y = (float)EVar33; EVar21 = (EntityPtr)((EntityList *)())->EntityList::Size(); - } while ((uint)EVar33 < (uint)EVar21); + } while (GHIDRA_UINT(EVar33) < GHIDRA_UINT(EVar21)); if (uVar7 == 0) { pRVar6 = local_298; goto LAB_007b6afb; @@ -42209,7 +42209,7 @@ switchD_007b66d7_caseD_b: VStack_2bc.y = (float)((RNG *)((RNG *)pRVar6))->RNG::Next(); fVar51 = VStack_2a0.y; if ((EntityPtr)VStack_2a0.y == (EntityPtr)0x0) { - UseActiveItem(this,(short *)((int)&uStack_2e8 + 2),0x11c,0x11,-1,0); + UseActiveItem(this,(short *)(GHIDRA_INT(&uStack_2e8) + 2),0x11c,0x11,-1,0); } else { if (((((EntityPtr)VStack_2a0.y == (EntityPtr)0x1) || @@ -42238,7 +42238,7 @@ switchD_007b66d7_caseD_b: VStack_2a0.y = (float)((Game *)(g_game))->Game::GetPlayer(uVar7); iVar41 = ((Entity *)((Entity *)VStack_2a0.y))->Entity::Variant(); if (iVar41 == 0) { - UseActiveItem((Entity_Player *)VStack_2a0.y,(short *)((int)&VStack_314.y + 2),0x11c, + UseActiveItem((Entity_Player *)VStack_2a0.y,(short *)(GHIDRA_INT(&VStack_314.y) + 2),0x11c, 0x11,-1,0); } uVar7 = uVar7 + 1; @@ -42257,7 +42257,7 @@ switchD_007b66d7_caseD_b: ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddNullEffect(0x41,1,1); break; case 0x45: - UseActiveItem(this,(short *)((int)&local_2ac + 2),0x221,3,-1,0); + UseActiveItem(this,(short *)(GHIDRA_INT(&local_2ac) + 2),0x221,3,-1,0); break; case 0x46: if ((char)local_2ac != '\0') { @@ -42265,7 +42265,7 @@ switchD_007b66d7_caseD_b: return; } iVar41 = 5; - if (uStack_2a2._1_1_ != 0) { + if ((*(undefined1 *)((char *)&(uStack_2a2) + 0x1)) != 0) { iVar41 = 10; } do { @@ -42283,7 +42283,7 @@ switchD_007b66d7_caseD_b: } ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::RemoveNullEffect(0x43,1); ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddNullEffect(0x43,1,1); - UseActiveItem(this,(short *)((int)&local_2a8 + 2),0x21,3,-1,0); + UseActiveItem(this,(short *)(GHIDRA_INT(&local_2a8) + 2),0x21,3,-1,0); break; case 0x48: uVar30 = 0x2d; @@ -42298,8 +42298,8 @@ switchD_007b66d7_caseD_b: VStack_2cc.y = (float)(local_2ac * uVar7); entityList = (EntityList *)FUN_00428a60(); EntityList::QuerySublist(entityList,&towerEffects,1000,0xa1,-1,0,0); - uStack_8 = CONCAT31(uStack_8._1_3_,0xd); - if (0 < (int)VStack_2cc.y) { + uStack_8 = CONCAT31((*(undefined1 *)((char *)&(uStack_8) + 0x1)),0xd); + if (0 < GHIDRA_INT(VStack_2cc.y)) { uVar7 = 0; pRVar6 = local_298; do { @@ -42326,9 +42326,9 @@ switchD_007b66d7_caseD_b: pRVar6 = local_298; goto LAB_007b6f0b; } - VStack_2b4.y = (float)((int)VStack_2b4.y + 1); + VStack_2b4.y = (float)(GHIDRA_INT(VStack_2b4.y) + 1); pRVar6 = (Room *)((EntityList *)())->EntityList::Size(); - } while ((uint)VStack_2b4.y < pRVar6); + } while (GHIDRA_UINT(VStack_2b4.y) < pRVar6); pRVar6 = local_298; } gridMarks[uVar7] = '\x05'; @@ -42336,26 +42336,26 @@ switchD_007b66d7_caseD_b: } LAB_007b6f0b: uVar7 = uVar7 + 1; - } while ((int)uVar7 < (int)VStack_2cc.y); + } while (GHIDRA_INT(uVar7) < GHIDRA_INT(VStack_2cc.y)); uVar7 = local_2a8; this = (Entity_Player *)VStack_2d4.y; } EStack_2f4 = (EntityPtr)(uVar7 - 1); VStack_2a0.y = 1.4013e-45; - if (1 < (int)EStack_2f4) { + if (1 < GHIDRA_INT(EStack_2f4)) { iVar41 = uVar7 - 1; VStack_2c4.y = (float)(local_2ac - 1); do { - if (1 < (int)(local_2ac - 1)) { - markAbove = gridMarks + (int)VStack_2a0.y; - markBelow = gridMarks + (int)((int)VStack_2a0.y + uVar7 * 2); + if (1 < GHIDRA_INT((local_2ac - 1))) { + markAbove = gridMarks + GHIDRA_INT(VStack_2a0.y); + markBelow = gridMarks + GHIDRA_INT((GHIDRA_INT(VStack_2a0.y) + uVar7 * 2)); VStack_2dc.y = (float)(-1 - uVar7); markCell = markAbove + uVar7; VStack_2bc.y = (float)(1 - uVar7); iVar41 = local_2ac - 2; do { - if ((((*markCell != '\0') && (uVar7 = local_2a8, markBelow[(int)VStack_2bc.y] != '\0')) && - (markBelow[(int)(((Level *)VStack_2dc.y)->_roomList + -1) + 0xa4] != '\0')) && + if ((((*markCell != '\0') && (uVar7 = local_2a8, markBelow[GHIDRA_INT(VStack_2bc.y)] != '\0')) && + (markBelow[GHIDRA_INT((((Level *)VStack_2dc.y)->_roomList + -1)) + 0xa4] != '\0')) && ((*markBelow != '\0' && (*markAbove != '\0')))) { *markCell = '2'; } @@ -42366,8 +42366,8 @@ LAB_007b6f0b: } while (iVar41 != 0); iVar41 = uVar7 - 1; } - VStack_2a0.y = (float)((int)VStack_2a0.y + 1); - } while ((int)VStack_2a0.y < iVar41); + VStack_2a0.y = (float)(GHIDRA_INT(VStack_2a0.y) + 1); + } while (GHIDRA_INT(VStack_2a0.y) < iVar41); this = (Entity_Player *)VStack_2d4.y; } VStack_2b4.y = 0.0; @@ -42375,20 +42375,20 @@ LAB_007b6f0b: FUN_00424510(); fVar51 = VStack_2cc.y; iVar41 = 0; - uStack_8 = CONCAT31(uStack_8._1_3_,0xe); + uStack_8 = CONCAT31((*(undefined1 *)((char *)&(uStack_8) + 0x1)),0xe); isAnyMarked = false; - if ((int)VStack_2cc.y < 1) { + if (GHIDRA_INT(VStack_2cc.y) < 1) { LAB_007b73c1: std::vector::_Tidy(); break; } do { if (gridMarks[iVar41] != '\0') { - WeightedOutcomePicker::AddOutcomeWeight(outcomePicker,iVar41,(int)gridMarks[iVar41],0); + WeightedOutcomePicker::AddOutcomeWeight(outcomePicker,iVar41,GHIDRA_INT(gridMarks[iVar41]),0); isAnyMarked = true; } iVar41 = iVar41 + 1; - } while (iVar41 < (int)fVar51); + } while (iVar41 < GHIDRA_INT(fVar51)); this = (Entity_Player *)VStack_2d4.y; if (!isAnyMarked) goto LAB_007b73c1; rng._shift1 = towerRng._shift1; @@ -42404,8 +42404,8 @@ LAB_007b73c1: vecResult2 = (Vector *)((Vector *)())->Vector::Vector(); ((Vector *)(vecResult))->Vector::__add(&VStack_314,vecResult2); VStack_2bc.y = 0.0; - iVar41 = (int)uVar7 % (int)local_2a8; - VStack_2c4.y = (float)((int)uVar7 / (int)local_2a8); + iVar41 = GHIDRA_INT(uVar7) % GHIDRA_INT(local_2a8); + VStack_2c4.y = (float)(GHIDRA_INT(uVar7) / GHIDRA_INT(local_2a8)); VStack_2a0.y = (float)(iVar41 + -2); puVar27 = (undefined4 *)std::max(); pLVar22 = (Level *)*puVar27; @@ -42414,9 +42414,9 @@ LAB_007b73c1: VStack_2dc.y = (float)pLVar22; VStack_2a0.y = (float)EStack_2e4; piVar37 = (int *)std::min(); - if ((int)pLVar22 <= *piVar37) { - uStack_2e8 = (float)((int)VStack_2c4.y - 2); - pRVar6 = (Room *)((int)VStack_2c4.y + 2); + if (GHIDRA_INT(pLVar22) <= *piVar37) { + uStack_2e8 = (float)(GHIDRA_INT(VStack_2c4.y) - 2); + pRVar6 = (Room *)(GHIDRA_INT(VStack_2c4.y) + 2); VStack_2f0.y = (float)pRVar6; do { VStack_2bc.y = 0.0; @@ -42427,9 +42427,9 @@ LAB_007b73c1: VStack_2c4.y = fVar51; VStack_2a0.y = (float)pRVar6; piVar37 = (int *)std::min(); - if ((int)fVar51 <= *piVar37) { - uVar7 = (int)((RoomDescriptor *)((int)VStack_2dc.y + 0x14))->_doors + - (int)fVar51 * local_2a8 + -0x30; + if (GHIDRA_INT(fVar51) <= *piVar37) { + uVar7 = GHIDRA_INT(((RoomDescriptor *)(GHIDRA_INT(VStack_2dc.y) + 0x14))->_doors) + + GHIDRA_INT(fVar51) * local_2a8 + -0x30; do { if (gridMarks[uVar7] != '\0') { ((Room *)(local_298))->Room::GetGridPosition(&VStack_358,uVar7); @@ -42449,37 +42449,37 @@ LAB_007b73c1: effect = (Entity_Effect *) ((Game *)(g_game))->Game::Spawn(1000,0xb1,vecResult,&g_vectorZero, (Entity *)VStack_2d4.y,1,uVar30); - ((Entity_Effect *)(effect))->Entity_Effect::SetTimeout((int)VStack_2b4.y); + ((Entity_Effect *)(effect))->Entity_Effect::SetTimeout(GHIDRA_INT(VStack_2b4.y)); effect->Update(); fVar51 = VStack_2c4.y; } } uVar7 = uVar7 + local_2a8; VStack_2a0.y = VStack_2f0.y; - fVar51 = (float)((int)fVar51 + 1); + fVar51 = (float)(GHIDRA_INT(fVar51) + 1); VStack_2bc.y = (float)(local_2ac - 1); VStack_2c4.y = fVar51; piVar37 = (int *)std::min(); - } while ((int)fVar51 <= *piVar37); + } while (GHIDRA_INT(fVar51) <= *piVar37); pRVar6 = (Room *)VStack_2f0.y; } VStack_2a0.y = (float)EStack_2e4; - pLVar22 = (Level *)((int)(int *)VStack_2dc.y + 1); + pLVar22 = (Level *)(GHIDRA_INT((int *)VStack_2dc.y) + 1); VStack_2bc.y = (float)EStack_2f4; VStack_2dc.y = (float)pLVar22; piVar37 = (int *)std::min(); - } while ((int)pLVar22 <= *piVar37); + } while (GHIDRA_INT(pLVar22) <= *piVar37); } uVar7 = ((RNG *)(&towerRng))->RNG::Next(); this = (Entity_Player *)VStack_2d4.y; effect = (Entity_Effect *) ((Game *)(g_game))->Game::Spawn(1000,0xb1,&VStack_314,&g_vectorZero,(Entity *)VStack_2d4.y,0, uVar7); - ((Entity_Effect *)(effect))->Entity_Effect::SetTimeout((int)VStack_2b4.y); + ((Entity_Effect *)(effect))->Entity_Effect::SetTimeout(GHIDRA_INT(VStack_2b4.y)); effect->Update(); std::vector::_Tidy(); - VStack_2b4.y = (float)((int)((int)VStack_2b4.y + 4) + 1); - } while ((int)VStack_2b4.y < 0x23); + VStack_2b4.y = (float)(GHIDRA_INT((GHIDRA_INT(VStack_2b4.y) + 4)) + 1); + } while (GHIDRA_INT(VStack_2b4.y) < 0x23); ((EntityList_Query *)(&towerEffects))->EntityList_Query::~EntityList_Query(); uStack_8 = 0xffffffff; guard_check_icall(); @@ -42487,7 +42487,7 @@ LAB_007b73c1: case 0x49: Config::GetCollectibles(); VStack_2bc.y = (float)FUN_0042c7f0(); - if (0 < (int)VStack_2bc.y) { + if (0 < GHIDRA_INT(VStack_2bc.y)) { iVar41 = 0; do { Config::GetCollectibles(); @@ -42496,14 +42496,14 @@ LAB_007b73c1: Config::GetCollectibles(); iVar17 = FUN_005cbe00(iVar41); VStack_2a0.y = *(float *)(iVar17 + 8); - bVar4 = CanRerollCollectible(this,(int)VStack_2a0.y,0); + bVar4 = CanRerollCollectible(this,GHIDRA_INT(VStack_2a0.y),0); if (bVar4 != 0) { itemConfig = Isaac::GetItemConfig(); - configItem = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible((int)VStack_2a0.y); + configItem = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(GHIDRA_INT(VStack_2a0.y)); if ((configItem->type != 3) && (piVar37 = (int *)FUN_0042c810(VStack_2a0.y), 0 < *piVar37)) { RemoveCollectibleByHistoryIndex(this,iVar41,1); - AnimateCollectible(this,(int)VStack_2a0.y,(byte *)"Pickup", + AnimateCollectible(this,GHIDRA_INT(VStack_2a0.y),(byte *)"Pickup", (byte *)"PlayerPickupSparkle"); ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::RemoveNullEffect(0x46,1); ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddNullEffect(0x46,1,1); @@ -42512,7 +42512,7 @@ LAB_007b73c1: } } iVar41 = iVar41 + 1; - } while (iVar41 < (int)VStack_2bc.y); + } while (iVar41 < GHIDRA_INT(VStack_2bc.y)); } break; case 0x4a: @@ -42566,18 +42566,18 @@ LAB_007b34ad: vecResult = Room::FindFreePickupSpawnPosition(pRVar6,&VStack_308,&this->_pos,40.0,0,0,0); pRVar6 = (Room *)0xa; LAB_007b31f0: - tmpEntity = ((Game *)(g_game))->Game::Spawn(6,(uint)pRVar6,vecResult,&g_vectorZero,(Entity *)0x0,0,uVar7); + tmpEntity = ((Game *)(g_game))->Game::Spawn(6,GHIDRA_UINT(pRVar6),vecResult,&g_vectorZero,(Entity *)0x0,0,uVar7); ((Entity *)(tmpEntity))->Entity::AddEntityFlags(4); break; case 0x4d: pRVar6 = (Room *)((Level *)())->Level::GetCurrentRoom(); VStack_2a0.y = (float)((Room *)(pRVar6))->Room::GetGridIndex(&this->_pos); - if (-1 < (int)VStack_2a0.y) { + if (-1 < GHIDRA_INT(VStack_2a0.y)) { pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); uVar7 = Random(); - ((Room *)(pRVar6))->Room::SpawnGridEntity((int)VStack_2a0.y,0x12,0,uVar7,0); + ((Room *)(pRVar6))->Room::SpawnGridEntity(GHIDRA_INT(VStack_2a0.y),0x12,0,uVar7,0); pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); - VStack_2a0.y = (float)((Room *)(pRVar6))->Room::GetGridEntity((uint)VStack_2a0.y); + VStack_2a0.y = (float)((Room *)(pRVar6))->Room::GetGridEntity(GHIDRA_UINT(VStack_2a0.y)); if ((EntityPtr)VStack_2a0.y != (EntityPtr)0x0) { iVar41 = ((GridEntity *)())->GridEntity::GetType(); if (iVar41 == 0x12) { @@ -42595,7 +42595,7 @@ LAB_007b31f0: } break; case 0x4e: - UseActiveItem(this,(short *)((int)&local_298 + 2),0x244,1,-1,0); + UseActiveItem(this,(short *)(GHIDRA_INT(&local_298) + 2),0x244,1,-1,0); break; case 0x4f: uVar7 = ((RNG *)((RNG *)pRVar6))->RNG::RandomInt(0x14); @@ -42609,9 +42609,9 @@ LAB_007b31f0: tmpEntity = ((Game *)(g_game))->Game::Spawn(5,10,vecResult,&g_vectorZero,(Entity *)this,1,uVar7); FUN_005b19f0(VStack_2a0.y); tmpEntity->Update(); - VStack_2a0.y = (float)((int)VStack_2a0.y + 1); + VStack_2a0.y = (float)(GHIDRA_INT(VStack_2a0.y) + 1); pRVar6 = local_298; - } while ((uint)VStack_2a0.y < (uint)VStack_2bc.y); + } while (GHIDRA_UINT(VStack_2a0.y) < GHIDRA_UINT(VStack_2bc.y)); } break; case 0x50: @@ -42628,7 +42628,7 @@ LAB_007b31f0: } } else if (bVar4 == 2) { - UseActiveItem(this,(short *)((int)&local_298 + 2),this->_wildCardItem,0x484,-1, + UseActiveItem(this,(short *)(GHIDRA_INT(&local_298) + 2),this->_wildCardItem,0x484,-1, this->_wildCardVarData); TriggerBookOfVirtues(this->_wildCardItem,0); goto LAB_007b8998; @@ -42669,10 +42669,10 @@ LAB_007b31f0: } } } - VStack_2a0.y = (float)((int)VStack_2a0.y + 1); + VStack_2a0.y = (float)(GHIDRA_INT(VStack_2a0.y) + 1); EVar21 = (EntityPtr)((EntityList *)())->EntityList::Size(); EVar33 = (EntityPtr)VStack_2a0.y; - } while ((uint)VStack_2a0.y < (uint)EVar21); + } while (GHIDRA_UINT(VStack_2a0.y) < GHIDRA_UINT(EVar21)); this = (Entity_Player *)VStack_2d4.y; } uStack_8 = 0xffffffff; @@ -42688,7 +42688,7 @@ LAB_007b31f0: pLVar22 = (Level *)Config::GetCollectibles(); level = (Level *)Config::GetCollectibles(); iVar41 = ((Level *)(level))->Level::GetCurrentRoomIndex(); - bVar4 = ((Level *)(pLVar22))->Level::CanSpawnDoorOutline(iVar41,(uint)VStack_2b4.y); + bVar4 = ((Level *)(pLVar22))->Level::CanSpawnDoorOutline(iVar41,GHIDRA_UINT(VStack_2b4.y)); if (bVar4 != 0) { Config::GetCollectibles(); pLVar22 = (Level *)Config::GetCollectibles(); @@ -42697,15 +42697,15 @@ LAB_007b31f0: } pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); fVar51 = VStack_2b4.y; - VStack_2a0.y = (float)((Room *)(pRVar6))->Room::GetDoor((int)VStack_2b4.y); + VStack_2a0.y = (float)((Room *)(pRVar6))->Room::GetDoor(GHIDRA_INT(VStack_2b4.y)); if ((((EntityPtr)VStack_2a0.y != (EntityPtr)0x0) && (cVar5 = FUN_0056ff60(0x10), cVar5 == '\0')) && (bVar4 = ((GridEntity_Door *)((GridEntity_Door *)VStack_2a0.y))->GridEntity_Door::TryUnlock(this,1), bVar4 == 0)) { ((GridEntity_Door *)((GridEntity_Door *)VStack_2a0.y))->GridEntity_Door::Open(); ((GridEntity_Door *)((GridEntity_Door *)VStack_2a0.y))->GridEntity_Door::TryBlowOpen(0,(Entity *)0x0); } - VStack_2b4.y = (float)((int)fVar51 + 1); - } while ((int)VStack_2b4.y < 8); + VStack_2b4.y = (float)(GHIDRA_INT(fVar51) + 1); + } while (GHIDRA_INT(VStack_2b4.y) < 8); ((Level *)((Level *)g_game))->Level::GetCurrentRoom(); playerEffects = (TemporaryEffects *)FUN_004360d0(); ((TemporaryEffects *)(playerEffects))->TemporaryEffects::AddCollectibleEffect(0xaf,1,1); @@ -42719,7 +42719,7 @@ LAB_007b31f0: ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddNullEffect(0x80,1,1); pRVar6 = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); ((Room *)(pRVar6))->Room::SetPauseTimer(0x5a); - UseActiveItem(this,(short *)((int)&VStack_2d4.y + 2),0x2c1,9,-1,0); + UseActiveItem(this,(short *)(GHIDRA_INT(&VStack_2d4.y) + 2),0x2c1,9,-1,0); break; case 0x55: ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddNullEffect(0x73,1,1); @@ -42763,7 +42763,7 @@ LAB_007b31f0: iVar41 = Isaac::Random(0x5a); ((Entity_Effect *)(effect))->Entity_Effect::set_state(iVar41); effect->Update(); - VStack_2a0.y = (float)((int)VStack_2a0.y + -1); + VStack_2a0.y = (float)(GHIDRA_INT(VStack_2a0.y) + -1); } while ((EntityPtr)VStack_2a0.y != (EntityPtr)0x0); break; case 0x57: @@ -42797,7 +42797,7 @@ LAB_007b31f0: sourceRef = ((EntityRef *)(&soulLazarusRef))->EntityRef::EntityRef(); (*pcVar1)(sourceRef); *(undefined4 *)&this->_lastDamageFlags = 0; - *(undefined4 *)((int)&this->_lastDamageFlags + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&this->_lastDamageFlags) + 4) = 0; (this->_lastDamageSource)._type = 0; (this->_lastDamageSource)._variant = 0; goto LAB_007b8998; @@ -42805,8 +42805,8 @@ LAB_007b31f0: ((Level *)())->Level::GetCurrentRoom(); playerEffects = (TemporaryEffects *)FUN_004360d0(); ((TemporaryEffects *)(playerEffects))->TemporaryEffects::AddCollectibleEffect(0x192,1,1); - UseActiveItem(this,(short *)((int)&VStack_2d4.y + 2),0x69,1,-1,0); - UseActiveItem(this,(short *)((int)&local_298 + 2),0xa6,1,-1,0); + UseActiveItem(this,(short *)(GHIDRA_INT(&VStack_2d4.y) + 2),0x69,1,-1,0); + UseActiveItem(this,(short *)(GHIDRA_INT(&local_298) + 2),0xa6,1,-1,0); ((Level *)((Level *)g_game))->Level::GetCurrentRoom(); playerEffects = (TemporaryEffects *)FUN_004360d0(); ((TemporaryEffects *)(playerEffects))->TemporaryEffects::RemoveCollectibleEffect(0x192,-1); @@ -42859,7 +42859,7 @@ LAB_007b31f0: } } LAB_007b81fb: - puVar47 = (undefined1 *)((int)VStack_2cc.y + 1); + puVar47 = (undefined1 *)(GHIDRA_INT(VStack_2cc.y) + 1); VStack_2cc.y = (float)puVar47; puVar28 = (undefined1 *)FUN_00414410(); this = (Entity_Player *)VStack_2d4.y; @@ -42874,13 +42874,13 @@ LAB_007b81fb: EVar33 = *entryPtr; VStack_2a0.y = (float)EVar33; itemConfig = Isaac::GetItemConfig(); - configItem = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible((int)EVar33); + configItem = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(GHIDRA_INT(EVar33)); if ((useFlag & 0x800) == 0) { hud = (HUD *)((Game *)(g_game))->Game::GetHUD(); ((HUD *)(hud))->HUD::ShowItemText(this,configItem); } SoundEffects::PlayWithFartOverride(0x80,2,0,0x3f800000); - AnimateCollectible(this,(int)VStack_2a0.y,(byte *)"Pickup",(byte *)"PlayerPickupSparkle"); + AnimateCollectible(this,GHIDRA_INT(VStack_2a0.y),(byte *)"Pickup",(byte *)"PlayerPickupSparkle"); SetQueuedItem(configItem,0xffffffff,0,0,0xffffffff); isPlayAnim = 0; } @@ -42899,9 +42899,9 @@ LAB_007b81fb: tmpEntity = ((Game *)(g_game))->Game::Spawn(5,0x14,vecResult,&g_vectorZero,(Entity *)this,0,uVar7); FUN_005b19f0(VStack_2a0.y); tmpEntity->Update(); - VStack_2a0.y = (float)((int)VStack_2a0.y + 1); + VStack_2a0.y = (float)(GHIDRA_INT(VStack_2a0.y) + 1); pRVar6 = local_298; - } while ((uint)VStack_2a0.y < (uint)VStack_2bc.y); + } while (GHIDRA_UINT(VStack_2a0.y) < GHIDRA_UINT(VStack_2bc.y)); } break; case 0x5e: @@ -42918,7 +42918,7 @@ LAB_007b81fb: tmpEntity = ((Game *)(g_game))->Game::Spawn(3,0x2b,vecResult,&g_vectorZero,(Entity *)VStack_2d4.y,uVar30 + 1, uVar7); tmpEntity->Update(); - EVar33 = (EntityPtr)((int)VStack_2a0.y + 1); + EVar33 = (EntityPtr)(GHIDRA_INT(VStack_2a0.y) + 1); VStack_2a0.y = (float)EVar33; ((Game *)(g_game))->Game::GetField26614(); cVar5 = FUN_00429550(); @@ -42927,7 +42927,7 @@ LAB_007b81fb: iVar41 = 10; } pRVar6 = local_298; - } while ((int)EVar33 < iVar41); + } while (GHIDRA_INT(EVar33) < iVar41); break; case 0x5f: playerManager = (PlayerManager *)((Game *)())->Game::GetPlayerManager(); @@ -42969,7 +42969,7 @@ LAB_007b81fb: configItem = ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(0x248); } AddWisp(this,configItem->id,&this->_pos,1,0); - VStack_2a0.y = (float)((int)VStack_2a0.y + -1); + VStack_2a0.y = (float)(GHIDRA_INT(VStack_2a0.y) + -1); } while ((EntityPtr)VStack_2a0.y != (EntityPtr)0x0); SoundEffects::PlayWithFartOverride2(0x1d7,&this->_pos,2,0,0x3f800000); break; @@ -42987,7 +42987,7 @@ LAB_007b81fb: init_forgotten_twin((Entity_Player *)EVar33); InitPostLevelInitStats((Entity_Player *)EVar33); VStack_2c4.y = (float)FUN_005cbd00(0x2bf); - VStack_2cc.y = (float)((int)EVar33 + 0x1dec); + VStack_2cc.y = (float)(GHIDRA_INT(EVar33) + 0x1dec); FUN_005b16f0(1); VStack_2dc.y = (float)Config::GetCollectibles(); std::iterator_copy(&local_298); @@ -43027,11 +43027,11 @@ LAB_007b81fb: if (EStack_254._position.y == 8.67404e-43) { EStack_254._position.y = 0.0; } - VStack_2bc.y = (float)((int)VStack_2bc.y + 1); - } while ((int)VStack_2bc.y < 10); + VStack_2bc.y = (float)(GHIDRA_INT(VStack_2bc.y) + 1); + } while (GHIDRA_INT(VStack_2bc.y) < 10); if (EStack_254._position.y != 0.0) { LAB_007b8881: - AddCollectible((Entity_Player *)VStack_2a0.y,(int)EStack_254._position.y,0,1,0,0,0); + AddCollectible((Entity_Player *)VStack_2a0.y,GHIDRA_INT(EStack_254._position.y),0,1,0,0,0); itemConfig = Isaac::GetItemConfig(); iVar41 = EntityPtr::Ref(); ((ItemConfig *)(itemConfig))->ItemConfig::GetCollectible(*(int *)(iVar41 + 8)); @@ -43080,8 +43080,8 @@ LAB_007b8998: return; LAB_007b3bf0: pfVar16 = pfVar16 + 2; - VStack_2b4.y = (float)((int)VStack_2b4.y + 1); - if ((undefined1 *)0x3 < (uint)VStack_2b4.y) goto LAB_007b3c4c; + VStack_2b4.y = (float)(GHIDRA_INT(VStack_2b4.y) + 1); + if ((undefined1 *)0x3 < GHIDRA_UINT(VStack_2b4.y)) goto LAB_007b3c4c; goto LAB_007b3be0; } @@ -43141,7 +43141,7 @@ void Entity_Player::update_footprints() local_8 = -NAN; puStack_c = &LAB_00affd9d; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(&tmpColor)[1]._colorize; + local_14 = __security_cookie ^ GHIDRA_UINT((&tmpColor)[1]._colorize); ExceptionList = &local_10; if (((this->_variant == 0) && (this->_isCoopGhost == 0)) && (local_64 = this, bVar3 = IsHologram(this), bVar3 == 0)) { @@ -43159,7 +43159,7 @@ void Entity_Player::update_footprints() pvVar8 = g_game->_room; local_60.y = *(float *)((char *)pvVar8 + 0x11fc); local_58.y = *(float *)((char *)pvVar8 + 0x1200); - ((shared_ptr *)(&local_4c))->shared_ptr::assign((void *)((int)pvVar8 + 0x1bc8)); + ((shared_ptr *)(&local_4c))->shared_ptr::assign((void *)(GHIDRA_INT(pvVar8) + 0x1bc8)); local_8 = 0.0; sampleColorFn = *(code **)(*(int *)local_4c.x + 0x2c); __ftoui3(); @@ -43213,14 +43213,14 @@ void Entity_Player::update_footprints() if (bVar3 != 0) { local_58.y = 6.72623e-44; seed_fart_sound_override((int *)&local_58.y); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_58.y,0.5,1,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_58.y),0.5,1,0,1.0,0.0); ((Game *)(g_game))->Game::ShakeScreen(5); rngResult = Random(); local_58.x = (local_64->_velocity).x * 0.7; local_58.y = (local_64->_velocity).y * 0.7; tmpVec = MusicManager::RandomVector(&local_74); rngResult2 = Random(); - oldOffsetBlue = (float)((double)(int)rngResult2 + __uint_to_double_fixup[-((int)rngResult2 >> 0x1f)] + oldOffsetBlue = (float)((double)GHIDRA_INT(rngResult2) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult2) >> 0x1f)] ) * 2.3283064e-10 * 20.0; VStack_7c.x = local_6c.x + oldOffsetBlue * tmpVec->x; VStack_7c.y = local_6c.y + oldOffsetBlue * tmpVec->y; @@ -43231,7 +43231,7 @@ void Entity_Player::update_footprints() } rngResult = Random(); *(float *)(spawned[1]._sprite._animDefaultName._buf + 4) = - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 5.0 * (float)local_44; rngResult = Random(); iVar2 = *(int *)spawned; @@ -43250,29 +43250,29 @@ void Entity_Player::update_footprints() spawned = ((Game *)(g_game))->Game::Spawn(1000,7,&local_6c,&g_vectorZero,(Entity *)0x0,0,rngResult); splat = (int *)__RTDynamicCast(spawned,uVar6,pTVar7); oldOffsetBlue = g_vectorOne.y * 0.1; - splat[0x39] = (int)(g_vectorOne.x * 0.1); - splat[0x3a] = (int)oldOffsetBlue; + splat[0x39] = GHIDRA_INT((g_vectorOne.x * 0.1)); + splat[0x3a] = GHIDRA_INT(oldOffsetBlue); (**(code **)(*splat + 0x3c))(local_60.y,0xffffffff,0xff); (**(code **)(*splat + 0xc))(); } pvVar8 = g_game->_room; local_58.y = *(float *)((char *)pvVar8 + 0x11fc); local_44 = *(undefined1 **)((char *)pvVar8 + 0x1200); - ((shared_ptr *)(&VStack_7c))->shared_ptr::assign((void *)((int)pvVar8 + 0x1bc8)); + ((shared_ptr *)(&VStack_7c))->shared_ptr::assign((void *)(GHIDRA_INT(pvVar8) + 0x1bc8)); local_8 = 1.4013e-45; (**(code **)(*(int *)VStack_7c.x + 0x2c))(&floorRed); local_8 = -NAN; FUN_0041c710(); oldOffsetBlue = *(float *)((char *)local_60.y + 0x20); - fVar1 = ((float *)((int)local_60.y + 0x20))[2]; - oldOffsetGreen = ((float *)((int)local_60.y + 0x20))[1]; + fVar1 = ((float *)(GHIDRA_INT(local_60.y) + 0x20))[2]; + oldOffsetGreen = ((float *)(GHIDRA_INT(local_60.y) + 0x20))[1]; oldOffsetRed = *(float *)((char *)local_60.y + 0x20); ((float *)local_60.y)[3] = (0.7 - ((float *)local_60.y)[3]) * 0.3 + ((float *)local_60.y)[3]; - oldOffsetBlue = ((float *)((int)local_60.y + 0x20))[2]; + oldOffsetBlue = ((float *)(GHIDRA_INT(local_60.y) + 0x20))[2]; *(float *)((char *)local_60.y + 0x20) = (floorRed * 0.9 - oldOffsetBlue) * 0.5 + oldOffsetRed; - ((float *)((int)local_60.y + 0x20))[2] = (floorBlue * 0.9 - fVar1) * 0.5 + oldOffsetBlue; - ((float *)((int)local_60.y + 0x20))[1] = - (floorGreen * 0.9 - oldOffsetGreen) * 0.5 + ((float *)((int)local_60.y + 0x20))[1]; + ((float *)(GHIDRA_INT(local_60.y) + 0x20))[2] = (floorBlue * 0.9 - fVar1) * 0.5 + oldOffsetBlue; + ((float *)(GHIDRA_INT(local_60.y) + 0x20))[1] = + (floorGreen * 0.9 - oldOffsetGreen) * 0.5 + ((float *)(GHIDRA_INT(local_60.y) + 0x20))[1]; if (0.0 < *(float *)((char *)g_game->_room + 0x7240)) { oldOffsetBlue = (this->_velocity).y; fVar1 = (this->_velocity).x; @@ -43287,16 +43287,16 @@ void Entity_Player::update_footprints() (**(code **)(iVar2 + 0xc))(); rngResult = Random(); for (local_44 = (undefined1 *)(rngResult % 5 + 3); local_44 != (undefined1 *)0x0; - local_44 = (undefined1 *)((int)local_44 + -1)) { + local_44 = (undefined1 *)(GHIDRA_INT(local_44) + -1)) { rngResult = Random(); rngResult2 = Random(); - local_50 = (float)((double)(int)rngResult2 + - __uint_to_double_fixup[-((int)rngResult2 >> 0x1f)]) * 2.3283064e-10; + local_50 = (float)((double)GHIDRA_INT(rngResult2) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult2) >> 0x1f)]) * 2.3283064e-10; local_64 = (Entity_Player *)(local_50 * (this->_velocity).y); local_50 = local_50 * (this->_velocity).x; rngResult2 = Random(); - local_4c.y = (float)((double)(int)rngResult2 + - __uint_to_double_fixup[-((int)rngResult2 >> 0x1f)]) * 2.3283064e-10 + local_4c.y = (float)((double)GHIDRA_INT(rngResult2) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult2) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_4c.y = local_4c.y + local_4c.y; local_58.y = sin(local_4c.y); @@ -43313,7 +43313,7 @@ void Entity_Player::update_footprints() 0.16000001 < fVar1 * fVar1 + oldOffsetBlue * oldOffsetBlue)) { FUN_00683680(); g_graphicsManager_flags = g_graphicsManager_flags & 0xfffffffd; - ((shared_ptr *)(&local_74))->shared_ptr::assign((void *)((int)g_game->_room + 0x1bd8)); + ((shared_ptr *)(&local_74))->shared_ptr::assign((void *)(GHIDRA_INT(g_game->_room) + 0x1bd8)); local_8 = 2.8026e-45; ((KAGE_Graphics *)(&DAT_00c798e0))->KAGE_Graphics::SetRenderTarget((void *)local_74.x,0); local_8 = -NAN; @@ -43366,8 +43366,8 @@ void Entity_Player::update_footprints() pop_render_target(); g_graphicsManager_blendMode[0] = savedBlendMode0; g_graphicsManager_blendMode[1] = savedBlendMode1; - g_graphicsManager_blendMode[2] = (int)VStack_7c.x; - g_graphicsManager_blendMode[3] = (int)VStack_7c.y; + g_graphicsManager_blendMode[2] = GHIDRA_INT(VStack_7c.x); + g_graphicsManager_blendMode[3] = GHIDRA_INT(VStack_7c.y); g_graphicsManager_blendMode[4] = iVar2; shader_cache_find(unusedArg); } @@ -43411,7 +43411,7 @@ byte Entity_Player::is_footstep_triggered(int foot) game = g_game; costumeIndex = this->_playerCostumeMap[1]._index; if (-1 < costumeIndex) { - costumeSprite = (Sprite *)(costumeIndex * 0x130 + (int)(this->_costumeSpriteDescs)._begin); + costumeSprite = (Sprite *)(costumeIndex * 0x130 + GHIDRA_INT((this->_costumeSpriteDescs)._begin)); anm2Id = *(int **)costumeSprite[1]._filename._buf; if (((anm2Id != (int *)0x0) && (*anm2Id == 3)) && (anm2Id[1] == 0x271)) { if (foot != -1) { @@ -43500,7 +43500,7 @@ void Entity_Player::update_pitfall() isLess = bVar1 < (byte)*unused; if (bVar1 != *unused) { LAB_007b9bd8: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_007b9bdd; } if (bVar1 == 0) break; @@ -43521,11 +43521,11 @@ LAB_007b9bdd: } if (((this->_pitfallState != 4) && (this->_pitfallState == 2)) && (this->_pitfallTimer = this->_pitfallTimer + 1, 0x27 < this->_pitfallTimer)) { - bVar1 = input_is_action_pressed(0,this->_controllerIndex,(Entity *)this,(int)unused); + bVar1 = input_is_action_pressed(0,this->_controllerIndex,(Entity *)this,GHIDRA_INT(unused)); isRightPressed = input_is_action_pressed(1,this->_controllerIndex,(Entity *)this,unused_00); isUpPressed = input_is_action_pressed (2,this->_controllerIndex,(Entity *)this, - CONCAT31((int3)((uint)extraout_ECX_00 >> 8),bVar1 | isRightPressed) + CONCAT31((int3)(GHIDRA_UINT(extraout_ECX_00) >> 8),bVar1 | isRightPressed) ); isDownPressed = input_is_action_pressed(3,this->_controllerIndex,(Entity *)this,unused_01); if ((isDownPressed != 0 || ((bVar1 | isRightPressed) != 0 || isUpPressed != 0)) || @@ -43624,30 +43624,30 @@ LAB_007b9e7b: (isCheck = HasCollectible(this,0x20b,0), isCheck != 0)) { unk1 = 0; boxContents = (this->_movingBoxContents)._begin; - iVar1 = (int)(this->_movingBoxContents)._end - (int)boxContents; + iVar1 = GHIDRA_INT((this->_movingBoxContents)._end) - GHIDRA_INT(boxContents); iVar2 = iVar1 >> 0x1f; if (iVar1 / 0x78 + iVar2 != iVar2) { iVar2 = 0; do { - if (((*(int *)(iVar2 + (int)boxContents) == 5) && - (*(int *)(iVar2 + 4 + (int)boxContents) == 100)) && - (*(int *)(iVar2 + 8 + (int)boxContents) == 0x1a6)) { + if (((*(int *)(iVar2 + GHIDRA_INT(boxContents)) == 5) && + (*(int *)(iVar2 + 4 + GHIDRA_INT(boxContents)) == 100)) && + (*(int *)(iVar2 + 8 + GHIDRA_INT(boxContents)) == 0x1a6)) { if (unk2 == 0) { if ((isDecreasePending != '\0') && - (iVar1 = *(int *)(iVar2 + 0x5c + (int)boxContents), iVar1 < 3)) { - *(int *)(iVar2 + 0x5c + (int)boxContents) = iVar1 + 1; + (iVar1 = *(int *)(iVar2 + 0x5c + GHIDRA_INT(boxContents)), iVar1 < 3)) { + *(int *)(iVar2 + 0x5c + GHIDRA_INT(boxContents)) = iVar1 + 1; isDecreasePending = '\0'; } } else { - *(undefined4 *)(iVar2 + 0x5c + (int)boxContents) = 3; + *(undefined4 *)(iVar2 + 0x5c + GHIDRA_INT(boxContents)) = 3; } } boxContents = (this->_movingBoxContents)._begin; iVar2 = iVar2 + 0x78; unk1 = unk1 + 1; - } while ((uint)unk1 < - (uint)(((int)(this->_movingBoxContents)._end - (int)boxContents) / 0x78)); + } while (GHIDRA_UINT(unk1) < + GHIDRA_UINT(((GHIDRA_INT((this->_movingBoxContents)._end) - GHIDRA_INT(boxContents)) / 0x78))); } } return; @@ -43686,7 +43686,7 @@ byte Entity_Player::GetMouseAimTarget(Vector *outTarget, byte isSkipNetCursor) local_8 = 0xffffffff; puStack_c = &LAB_00affddd; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (uint)(windowSizeBuf + 0xe); + uVar3 = __security_cookie ^ GHIDRA_UINT((windowSizeBuf + 0xe)); ExceptionList = &local_10; iVar4 = this->_controllerIndex; ((InputManager *)(&PTR_vftable_00c57b18))->InputManager::get_device(&device,iVar4); @@ -43830,7 +43830,7 @@ void Entity_Player::update_baby_skin_effects() local_8 = -NAN; puStack_c = &LAB_00affe10; local_10 = ExceptionList; - rngResult = __security_cookie ^ (uint)((&tearHitParams)[1]._tearColor._colorize + 3); + rngResult = __security_cookie ^ GHIDRA_UINT(((&tearHitParams)[1]._tearColor._colorize + 3)); if (game->_dead != 0) { return; } @@ -43897,7 +43897,7 @@ void Entity_Player::update_baby_skin_effects() } } i = i + 1; - } while ((uint)i < (uint)local_88[0x499]); + } while (GHIDRA_UINT(i) < GHIDRA_UINT(local_88[0x499])); } goto LAB_007bb592; } @@ -43917,13 +43917,13 @@ void Entity_Player::update_baby_skin_effects() if (iVar5 != 0) { bombFlags = GetBombFlags(game,(BitSet128 *)local_94,0); bombFlagsLow = bombFlags->_l; - uVar11 = *(undefined4 *)((int)&bombFlags->_l + 4); + uVar11 = *(undefined4 *)(GHIDRA_INT(&bombFlags->_l) + 4); bombFlagsHigh = bombFlags->_h; - rngResult = *(undefined4 *)((int)&bombFlags->_h + 4); + rngResult = *(undefined4 *)(GHIDRA_INT(&bombFlags->_h) + 4); *(undefined1 *)(iVar5 + 0x463) = 1; - *(int *)(iVar5 + 0x438) = (int)bombFlagsLow; + *(int *)(iVar5 + 0x438) = GHIDRA_INT(bombFlagsLow); *(undefined4 *)(iVar5 + 0x43c) = uVar11; - *(int *)(iVar5 + 0x440) = (int)bombFlagsHigh; + *(int *)(iVar5 + 0x440) = GHIDRA_INT(bombFlagsHigh); *(undefined4 *)(iVar5 + 0x444) = rngResult; } } @@ -43941,11 +43941,11 @@ void Entity_Player::update_baby_skin_effects() ; creepEffect = (int *)__RTDynamicCast(spawnedEntity,uVar11,pTVar12,pTVar13,rngResult,rngResult); rngResult = Random(); - fVar10 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + fVar10 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 0.5 + 0.2; fVar9 = fVar10 * g_vectorOne.x; - creepEffect[0x3a] = (int)(fVar10 * g_vectorOne.y); - creepEffect[0x39] = (int)fVar9; + creepEffect[0x3a] = GHIDRA_INT((fVar10 * g_vectorOne.y)); + creepEffect[0x39] = GHIDRA_INT(fVar9); (**(code **)(*creepEffect + 0xc))(); } bVar2 = IsExtraAnimationFinished(game); @@ -43970,13 +43970,13 @@ LAB_007bade5: bVar2 = ((Entity *)((Entity *)game))->Entity::IsFrame(0x1e,0); if ((bVar2 == 0) || (rngResult = Random(), rngResult % 0x32 != 0)) goto LAB_007bb58c; pvVar6 = (g_manager->_itemConfig)._collectibles._begin; - if (0x3e0 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar6 & 0xfffffffcU - )) { - local_94._0_4_ = *(undefined4 *)((char *)pvVar6 + 0x3e0); + if (0x3e0 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar6) & 0xfffffffcU + ))) { + (*(undefined4 *)((char *)&(local_94) + 0x0)) = *(undefined4 *)((char *)pvVar6 + 0x3e0); goto LAB_007bad9f; } LAB_007bad98: - local_94._0_4_ = 0; + (*(undefined4 *)((char *)&(local_94) + 0x0)) = 0; goto LAB_007bad9f; } LAB_007bae5e: @@ -43987,9 +43987,9 @@ LAB_007bae5e: bVar2 = ((Entity *)((Entity *)game))->Entity::IsFrame(0x1e,0); if ((bVar2 == 0) || (rngResult = Random(), rngResult % 0x32 != 0)) goto LAB_007bb58c; pvVar6 = (g_manager->_itemConfig)._collectibles._begin; - if (0x338 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar6 & - 0xfffffffcU)) { - local_94._0_4_ = *(undefined4 *)((char *)pvVar6 + 0x338); + if (0x338 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar6) & + 0xfffffffcU))) { + (*(undefined4 *)((char *)&(local_94) + 0x0)) = *(undefined4 *)((char *)pvVar6 + 0x338); goto LAB_007bad9f; } goto LAB_007bad98; @@ -44002,9 +44002,9 @@ LAB_007bae5e: bVar2 = ((Entity *)((Entity *)game))->Entity::IsFrame(0x1e,0); if ((bVar2 == 0) || (rngResult = Random(), rngResult % 0x32 != 0)) goto LAB_007bb58c; pvVar6 = (g_manager->_itemConfig)._collectibles._begin; - if (0x1e8 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar6 & - 0xfffffffcU)) { - local_94._0_4_ = *(undefined4 *)((char *)pvVar6 + 0x1e8); + if (0x1e8 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar6) & + 0xfffffffcU))) { + (*(undefined4 *)((char *)&(local_94) + 0x0)) = *(undefined4 *)((char *)pvVar6 + 0x1e8); goto LAB_007bad9f; } goto LAB_007bad98; @@ -44017,9 +44017,9 @@ LAB_007bae5e: bVar2 = ((Entity *)((Entity *)game))->Entity::IsFrame(0x1e,0); if ((bVar2 == 0) || (rngResult = Random(), rngResult % 0x32 != 0)) goto LAB_007bb58c; pvVar6 = (g_manager->_itemConfig)._collectibles._begin; - if (0x358 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar6 & - 0xfffffffcU)) { - local_94._0_4_ = *(undefined4 *)((char *)pvVar6 + 0x358); + if (0x358 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar6) & + 0xfffffffcU))) { + (*(undefined4 *)((char *)&(local_94) + 0x0)) = *(undefined4 *)((char *)pvVar6 + 0x358); goto LAB_007bad9f; } goto LAB_007bad98; @@ -44031,16 +44031,16 @@ LAB_007bae5e: bVar2 = ((Entity *)((Entity *)game))->Entity::IsFrame(7,game->_index); if (bVar2 != 0) { EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)local_94, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)local_94, &game->_pos,150.0,8); local_8 = 0.0; i = 0; if (local_88 != (undefined4 *)0x0) { do { iVar5 = i; - bVar2 = ((Entity *)(*(Entity **)(local_94._4_4_ + i * 4)))->Entity::IsVulnerableEnemy((Entity *)0x0); + bVar2 = ((Entity *)(*(Entity **)((*(undefined4 *)((char *)&(local_94) + 0x4)) + i * 4)))->Entity::IsVulnerableEnemy((Entity *)0x0); if (bVar2 != 0) { - pcVar1 = *(code **)(**(int **)(local_94._4_4_ + iVar5 * 4) + 0x20); + pcVar1 = *(code **)(**(int **)((*(undefined4 *)((char *)&(local_94) + 0x4)) + iVar5 * 4) + 0x20); ((EntityRef *)(&sourceRef))->EntityRef::constructor((Entity *)local_84); rngResult = Random(); pTVar7 = GetTearHitParams(local_84,&tearHitParams,1,1.0,(rngResult & 1) * 2 + -1, @@ -44049,7 +44049,7 @@ LAB_007bae5e: iVar5 = i; } i = iVar5 + 1; - } while ((uint)i < local_88); + } while (GHIDRA_UINT(i) < local_88); game = local_84; } ((EntityList_Query *)(local_94))->EntityList_Query::~EntityList_Query(); @@ -44065,9 +44065,9 @@ LAB_007bb2d2: bVar2 = ((Entity *)((Entity *)game))->Entity::IsFrame(0x1e,0); if ((bVar2 != 0) && (rngResult = Random(), rngResult % 0x32 == 0)) { pvVar6 = (g_manager->_itemConfig)._collectibles._begin; - if (0x88 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar6 & - 0xfffffffcU)) { - local_94._0_4_ = *(undefined4 *)((char *)pvVar6 + 0x88); + if (0x88 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar6) & + 0xfffffffcU))) { + (*(undefined4 *)((char *)&(local_94) + 0x0)) = *(undefined4 *)((char *)pvVar6 + 0x88); goto LAB_007bad9f; } goto LAB_007bad98; @@ -44078,27 +44078,27 @@ LAB_007bb2d2: game = g_game; if (game->_babySkin == 0x34) { bVar2 = TemporaryEffects::HasCollectibleEffect - ((TemporaryEffects *)((int)g_game->_room + 0x7310),0x40); + ((TemporaryEffects *)(GHIDRA_INT(g_game->_room) + 0x7310),0x40); if (bVar2 != 0) goto LAB_007bb44f; bVar2 = ((Entity *)((Entity *)game))->Entity::IsFrame(0x1e,0); if (bVar2 == 0) goto LAB_007bb592; rngResult = Random(); if (rngResult % 0x32 != 0) goto LAB_007bb58c; pvVar6 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar6 & 0xfffffffcU) < + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar6) & 0xfffffffcU)) < 0x101) { LAB_007bb3be: - local_94._0_4_ = 0; + (*(undefined4 *)((char *)&(local_94) + 0x0)) = 0; } else { - local_94._0_4_ = *(undefined4 *)((char *)pvVar6 + 0x100); + (*(undefined4 *)((char *)&(local_94) + 0x0)) = *(undefined4 *)((char *)pvVar6 + 0x100); } LAB_007bb3c8: - local_94._4_4_ = (undefined1 *)0x0; + (*(undefined4 *)((char *)&(local_94) + 0x4)) = (undefined1 *)0x0; local_88 = (undefined4 *)0x0; - local_94._8_4_ = 0x96; + (*(undefined4 *)((char *)&(local_94) + 0x8)) = 0x96; TemporaryEffects::AddEffect - ((TemporaryEffects *)((int)g_game->_room + 0x7310),local_94,1,1); + ((TemporaryEffects *)(GHIDRA_INT(g_game->_room) + 0x7310),local_94,1,1); } else { if ((game->_babySkin == 0x31) && @@ -44116,7 +44116,7 @@ LAB_007bb44f: iVar5 = game->_babySkin; if (iVar5 == 0x35) { bVar2 = TemporaryEffects::HasCollectibleEffect - ((TemporaryEffects *)((int)game->_room + 0x7310),0xd7); + ((TemporaryEffects *)(GHIDRA_INT(game->_room) + 0x7310),0xd7); if (bVar2 != 0) { LAB_007bb562: if (game->_isCoopGhost == 0) goto LAB_007bb592; @@ -44130,9 +44130,9 @@ LAB_007bb56b: rngResult = Random(); if (rngResult % 0x32 == 0) { pvVar6 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar6 & 0xfffffffcU - ) < 0x35d) goto LAB_007bb3be; - local_94._0_4_ = *(undefined4 *)((char *)pvVar6 + 0x35c); + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar6) & 0xfffffffcU + )) < 0x35d) goto LAB_007bb3be; + (*(undefined4 *)((char *)&(local_94) + 0x0)) = *(undefined4 *)((char *)pvVar6 + 0x35c); goto LAB_007bb3c8; } } @@ -44169,14 +44169,14 @@ LAB_007bb56b: bVar2 = ((Entity *)((Entity *)game))->Entity::IsFrame(0x1e,0); if ((bVar2 == 0) || (rngResult = Random(), rngResult % 0x32 != 0)) goto LAB_007bb58c; pvVar6 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar6 & 0xfffffffcU) < + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar6) & 0xfffffffcU)) < 0x66d) { - local_94._0_4_ = 0; - local_94._4_4_ = &DAT_00000005; + (*(undefined4 *)((char *)&(local_94) + 0x0)) = 0; + (*(undefined4 *)((char *)&(local_94) + 0x4)) = &DAT_00000005; } else { - local_94._0_4_ = *(undefined4 *)((char *)pvVar6 + 0x66c); - local_94._4_4_ = &DAT_00000005; + (*(undefined4 *)((char *)&(local_94) + 0x0)) = *(undefined4 *)((char *)pvVar6 + 0x66c); + (*(undefined4 *)((char *)&(local_94) + 0x4)) = &DAT_00000005; } goto LAB_007bada9; } @@ -44184,10 +44184,10 @@ LAB_007bb56b: if ((bVar2 != 0) && (rngResult = Random(), rngResult % 0x32 == 0)) { local_98 = 0.0; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { - tmpPlayer = ((Game *)(g_game))->Game::GetPlayer((uint)local_98); + tmpPlayer = ((Game *)(g_game))->Game::GetPlayer(GHIDRA_UINT(local_98)); iVar5 = tmpPlayer->_coopBabyBuffTimers[0]; if (iVar5 < 0x96) { iVar5 = 0x96; @@ -44196,7 +44196,7 @@ LAB_007bb56b: tmpPlayer->_cacheFlags = tmpPlayer->_cacheFlags | 1; EvaluateItems(tmpPlayer); fVar9 = local_98; - tmpPlayer = ((Game *)(g_game))->Game::GetPlayer((uint)local_98); + tmpPlayer = ((Game *)(g_game))->Game::GetPlayer(GHIDRA_UINT(local_98)); iVar5 = tmpPlayer->_coopBabyBuffTimers[1]; if (iVar5 < 0x96) { iVar5 = 0x96; @@ -44204,7 +44204,7 @@ LAB_007bb56b: tmpPlayer->_coopBabyBuffTimers[1] = iVar5; tmpPlayer->_cacheFlags = tmpPlayer->_cacheFlags | 2; EvaluateItems(tmpPlayer); - tmpPlayer = ((Game *)(g_game))->Game::GetPlayer((uint)fVar9); + tmpPlayer = ((Game *)(g_game))->Game::GetPlayer(GHIDRA_UINT(fVar9)); iVar5 = tmpPlayer->_coopBabyBuffTimers[2]; if (iVar5 < 0x96) { iVar5 = 0x96; @@ -44212,7 +44212,7 @@ LAB_007bb56b: tmpPlayer->_coopBabyBuffTimers[2] = iVar5; tmpPlayer->_cacheFlags = tmpPlayer->_cacheFlags | 0x10; EvaluateItems(tmpPlayer); - tmpPlayer = ((Game *)(g_game))->Game::GetPlayer((uint)fVar9); + tmpPlayer = ((Game *)(g_game))->Game::GetPlayer(GHIDRA_UINT(fVar9)); iVar5 = tmpPlayer->_coopBabyBuffTimers[3]; if (iVar5 < 0x96) { iVar5 = 0x96; @@ -44220,7 +44220,7 @@ LAB_007bb56b: tmpPlayer->_coopBabyBuffTimers[3] = iVar5; tmpPlayer->_cacheFlags = tmpPlayer->_cacheFlags | 0xc; EvaluateItems(tmpPlayer); - tmpPlayer = ((Game *)(g_game))->Game::GetPlayer((uint)fVar9); + tmpPlayer = ((Game *)(g_game))->Game::GetPlayer(GHIDRA_UINT(fVar9)); iVar5 = tmpPlayer->_coopBabyBuffTimers[4]; if (iVar5 < 0x96) { iVar5 = 0x96; @@ -44228,10 +44228,10 @@ LAB_007bb56b: tmpPlayer->_coopBabyBuffTimers[4] = iVar5; tmpPlayer->_cacheFlags = tmpPlayer->_cacheFlags | 0x400; EvaluateItems(tmpPlayer); - local_98 = (float)((int)fVar9 + 1); - } while ((uint)local_98 < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + local_98 = (float)(GHIDRA_INT(fVar9) + 1); + } while (GHIDRA_UINT(local_98) < + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); game = g_game; game = local_84; } @@ -44245,8 +44245,8 @@ LAB_007bb56b: if ((bVar2 != 0) && (rngResult = Random(), rngResult % 0x32 == 0)) { i = 0; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { tmpPlayer = ((Game *)(g_game))->Game::GetPlayer(i); iVar5 = tmpPlayer->_coopBabyBuffTimers[0]; @@ -44257,8 +44257,8 @@ LAB_007bb56b: tmpPlayer->_cacheFlags = tmpPlayer->_cacheFlags | 1; EvaluateItems(tmpPlayer); i = i + 1; - } while ((uint)i < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (GHIDRA_UINT(i) < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); game = g_game; game = local_84; } @@ -44274,8 +44274,8 @@ LAB_007bb56b: if ((bVar2 != 0) && (rngResult = Random(), rngResult % 0x32 == 0)) { i = 0; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { tmpPlayer = ((Game *)(g_game))->Game::GetPlayer(i); iVar5 = tmpPlayer->_coopBabyBuffTimers[1]; @@ -44286,8 +44286,8 @@ LAB_007bb56b: tmpPlayer->_cacheFlags = tmpPlayer->_cacheFlags | 2; EvaluateItems(tmpPlayer); i = i + 1; - } while ((uint)i < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (GHIDRA_UINT(i) < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); game = g_game; game = local_84; } @@ -44303,8 +44303,8 @@ LAB_007bb56b: if ((bVar2 != 0) && (rngResult = Random(), rngResult % 0x32 == 0)) { i = 0; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { tmpPlayer = ((Game *)(g_game))->Game::GetPlayer(i); iVar5 = tmpPlayer->_coopBabyBuffTimers[2]; @@ -44315,8 +44315,8 @@ LAB_007bb56b: tmpPlayer->_cacheFlags = tmpPlayer->_cacheFlags | 0x10; EvaluateItems(tmpPlayer); i = i + 1; - } while ((uint)i < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (GHIDRA_UINT(i) < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); game = g_game; game = local_84; } @@ -44332,8 +44332,8 @@ LAB_007bb56b: if ((bVar2 != 0) && (rngResult = Random(), rngResult % 0x32 == 0)) { i = 0; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { tmpPlayer = ((Game *)(g_game))->Game::GetPlayer(i); iVar5 = tmpPlayer->_coopBabyBuffTimers[3]; @@ -44344,8 +44344,8 @@ LAB_007bb56b: tmpPlayer->_cacheFlags = tmpPlayer->_cacheFlags | 0xc; EvaluateItems(tmpPlayer); i = i + 1; - } while ((uint)i < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (GHIDRA_UINT(i) < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); game = g_game; game = local_84; } @@ -44361,8 +44361,8 @@ LAB_007bb56b: if ((bVar2 != 0) && (rngResult = Random(), rngResult % 0x32 == 0)) { i = 0; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { tmpPlayer = ((Game *)(g_game))->Game::GetPlayer(i); iVar5 = tmpPlayer->_coopBabyBuffTimers[4]; @@ -44373,8 +44373,8 @@ LAB_007bb56b: tmpPlayer->_cacheFlags = tmpPlayer->_cacheFlags | 0x400; EvaluateItems(tmpPlayer); i = i + 1; - } while ((uint)i < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (GHIDRA_UINT(i) < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); game = g_game; game = local_84; } @@ -44390,8 +44390,8 @@ LAB_007bb56b: if ((bVar2 != 0) && (rngResult = Random(), rngResult % 0x32 == 0)) { i = 0; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { tmpPlayer = ((Game *)(g_game))->Game::GetPlayer(i); iVar5 = tmpPlayer->_coopBabyBuffTimers[5]; @@ -44405,8 +44405,8 @@ LAB_007bb56b: } i = i + 1; tmpPlayer->_coopBabyBuffTimers[5] = iVar5; - } while ((uint)i < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (GHIDRA_UINT(i) < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); game = g_game; game = local_84; } @@ -44422,8 +44422,8 @@ LAB_007bb56b: if ((bVar2 != 0) && (rngResult = Random(), rngResult % 0x32 == 0)) { i = 0; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { tmpPlayer = ((Game *)(g_game))->Game::GetPlayer(i); iVar5 = tmpPlayer->_coopBabyBuffTimers[6]; @@ -44437,8 +44437,8 @@ LAB_007bb56b: } i = i + 1; tmpPlayer->_coopBabyBuffTimers[6] = iVar5; - } while ((uint)i < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (GHIDRA_UINT(i) < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); game = g_game; game = local_84; } @@ -44454,8 +44454,8 @@ LAB_007bb56b: if ((bVar2 != 0) && (rngResult = Random(), rngResult % 0x32 == 0)) { i = 0; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { tmpPlayer = ((Game *)(game))->Game::GetPlayer(i); game = g_game; @@ -44465,8 +44465,8 @@ LAB_007bb56b: } tmpPlayer->_coopBabyBuffTimers[7] = iVar5; i = i + 1; - } while ((uint)i < (uint)((int)(game->_playerManager)._playerList._end - - (int)(game->_playerManager)._playerList._begin >> 2)); + } while (GHIDRA_UINT(i) < GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((game->_playerManager)._playerList._begin) >> 2))); game = local_84; } goto LAB_007bb592; @@ -44482,13 +44482,13 @@ LAB_007bb56b: bVar2 = ((Entity *)((Entity *)game))->Entity::IsFrame(0x1e,0); if ((bVar2 == 0) || (rngResult = Random(), rngResult % 0x32 != 0)) goto LAB_007bb58c; pvVar6 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar6 & 0xfffffffcU) < 0x51) + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar6) & 0xfffffffcU)) < 0x51) goto LAB_007bad98; - local_94._0_4_ = *(undefined4 *)((char *)pvVar6 + 0x50); + (*(undefined4 *)((char *)&(local_94) + 0x0)) = *(undefined4 *)((char *)pvVar6 + 0x50); LAB_007bad9f: - local_94._4_4_ = (undefined1 *)0x0; + (*(undefined4 *)((char *)&(local_94) + 0x4)) = (undefined1 *)0x0; LAB_007bada9: - local_94._8_4_ = 0x96; + (*(undefined4 *)((char *)&(local_94) + 0x8)) = 0x96; local_88 = (undefined4 *)0x0; tmpPlayer = GetMainPlayer(game); ((TemporaryEffects *)(&tmpPlayer->_temporaryeffects))->TemporaryEffects::AddEffect(local_94,1,1); @@ -44528,7 +44528,7 @@ void Entity_Player::coop_baby_death_effect() undefined4 temp_10305fbffd8d0a; undefined4 temp_12305fbffd8d0a; - local_c = __security_cookie ^ (uint)auStack_58; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_58); iVar4 = this->_babySkin; local_50 = this; if (iVar4 == 0) { @@ -44537,16 +44537,16 @@ void Entity_Player::coop_baby_death_effect() if (iVar4 != 0) { do { rngValue = Random(); - fVar5 = (float)((double)(int)rngValue + __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + fVar5 = (float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_50 = (Entity_Player *)(fVar5 + fVar5); rngValue = Random(); - local_54 = (float)((double)(int)rngValue + __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) + local_54 = (float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 40.0; fVar5 = cos((float)local_50); - local_48._0_4_ = fVar5 * local_54 + (this->_pos).x; + (*(undefined4 *)((char *)&(local_48) + 0x0)) = fVar5 * local_54 + (this->_pos).x; fVar5 = sin((float)local_50); - local_48._4_4_ = fVar5 * local_54 + (this->_pos).y; + (*(undefined4 *)((char *)&(local_48) + 0x4)) = fVar5 * local_54 + (this->_pos).y; this->_numBlueSpiders = this->_numBlueSpiders + 1; spawn_blue_spider((Vector *)local_48,(Entity *)this,&g_vectorZero); iVar4 = iVar4 + -1; @@ -44585,13 +44585,13 @@ void Entity_Player::coop_baby_death_effect() if (iVar4 != 0) { pBVar3 = GetBombFlags(this,(BitSet128 *)local_48,0); qVar1 = pBVar3->_l; - temp_10305fbffd8d0a = *(undefined4 *)((int)&pBVar3->_l + 4); + temp_10305fbffd8d0a = *(undefined4 *)(GHIDRA_INT(&pBVar3->_l) + 4); qVar2 = pBVar3->_h; - temp_12305fbffd8d0a = *(undefined4 *)((int)&pBVar3->_h + 4); + temp_12305fbffd8d0a = *(undefined4 *)(GHIDRA_INT(&pBVar3->_h) + 4); *(undefined1 *)(iVar4 + 0x463) = 1; - *(int *)(iVar4 + 0x438) = (int)qVar1; + *(int *)(iVar4 + 0x438) = GHIDRA_INT(qVar1); *(undefined4 *)(iVar4 + 0x43c) = temp_10305fbffd8d0a; - *(int *)(iVar4 + 0x440) = (int)qVar2; + *(int *)(iVar4 + 0x440) = GHIDRA_INT(qVar2); *(undefined4 *)(iVar4 + 0x444) = temp_12305fbffd8d0a; return; } @@ -44603,8 +44603,8 @@ void Entity_Player::coop_baby_death_effect() do { Room::FindFreePickupSpawnPosition (g_game->_room,(Vector *)local_48,&this->_pos,100.0,0,0,0); - targetPos.y = (float)local_48._4_4_; - targetPos.x = (float)local_48._0_4_; + targetPos.y = (*(undefined4 *)((char *)&((float)local_48) + 0x4)); + targetPos.x = (*(undefined4 *)((char *)&((float)local_48) + 0x0)); Entity_NPC::ThrowSpider(&this->_pos,(Entity *)this,targetPos,0,-30.0); iVar4 = iVar4 + -1; } while (iVar4 != 0); @@ -44620,7 +44620,7 @@ void Entity_Player::coop_baby_death_effect() spawnPos = Room::FindFreePickupSpawnPosition (g_game->_room,(Vector *)local_48,&this->_pos,40.0,0,0,0); ((Game *)(g_game))->Game::SpawnEx(5,0x14,spawnPos,&g_vectorZero,(Entity *)this,0,rngValue,0); - local_54 = (float)((int)local_54 + -1); + local_54 = (float)(GHIDRA_INT(local_54) + -1); } while (local_54 != 0.0); return; } @@ -44779,7 +44779,7 @@ void Entity_Player::InitPostLevelInitStats() local_8 = 0xffffffff; puStack_c = &LAB_00affeb0; local_10 = ExceptionList; - local_14 = __security_cookie ^ (int)register0x00000010 - 4U; + local_14 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; uVar9 = this->_initSeed; rng._shift1 = 1; @@ -44791,9 +44791,9 @@ void Entity_Player::InitPostLevelInitStats() playerCopy = this; local_d0 = ((Game *)(g_game))->Game::GetChallengeParams(); uStack_a8 = playerCopy->_playerType; - if (((int)uStack_a8 < 0) || - (((int)(g_manager->_entityConfig)._players._end - - (int)(g_manager->_entityConfig)._players._begin) / 0x148 <= (int)uStack_a8)) { + if ((GHIDRA_INT(uStack_a8) < 0) || + ((GHIDRA_INT((g_manager->_entityConfig)._players._end) - + GHIDRA_INT((g_manager->_entityConfig)._players._begin)) / 0x148 <= GHIDRA_INT(uStack_a8))) { local_a4 = (PersistentGameData *)0x0; LAB_007bc81f: KAGE_LogMessage(0x10,(byte *)"Could not load config for player type %d\n"); @@ -44801,7 +44801,7 @@ LAB_007bc81f: } else { local_a4 = (PersistentGameData *) - (uStack_a8 * 0x148 + (int)(g_manager->_entityConfig)._players._begin); + (uStack_a8 * 0x148 + GHIDRA_INT((g_manager->_entityConfig)._players._begin)); if (local_a4 == (PersistentGameData *)0x0) goto LAB_007bc81f; } pEVar12 = playerCopy; @@ -44812,17 +44812,17 @@ LAB_007bc81f: iVar14 = *(int *)&(*(undefined1 *)((char *)(playerCopy) + 0x1e50)); if (iVar14 == 0) { local_dc = 0; - local_dc._4_4_ = (ItemConfig *)0x0; - local_dc._0_4_ = 0; - playerUserId._4_4_ = local_dc._4_4_; - playerUserId._0_4_ = (uint)local_dc; + (*(undefined4 *)((char *)&(local_dc) + 0x4)) = (ItemConfig *)0x0; + (*(undefined4 *)((char *)&(local_dc) + 0x0)) = 0; + (*(undefined4 *)((char *)&(playerUserId) + 0x4)) = (*(undefined4 *)((char *)&(local_dc) + 0x4)); + (*(undefined4 *)((char *)&(playerUserId) + 0x0)) = GHIDRA_UINT(local_dc); } else { - playerUserId._4_4_ = *(ItemConfig **)(iVar14 + 0xc); - playerUserId._0_4_ = *(uint *)(iVar14 + 8); + (*(undefined4 *)((char *)&(playerUserId) + 0x4)) = *(ItemConfig **)(iVar14 + 0xc); + (*(undefined4 *)((char *)&(playerUserId) + 0x0)) = *(uint *)(iVar14 + 8); } - local_b4 = playerUserId._4_4_; - uStack_a8 = (uint)playerUserId; + local_b4 = (*(undefined4 *)((char *)&(playerUserId) + 0x4)); + uStack_a8 = GHIDRA_UINT(playerUserId); FUN_00731ee0(local_114,&playerUserId); if ((((*(char *)(local_10c + 0xd) == '\0') && (*(undefined1 **)(local_10c + 0x14) <= local_b4)) && ((*(undefined1 **)(local_10c + 0x14) < local_b4 || @@ -44869,7 +44869,7 @@ LAB_007bc81f: uVar10 = uVar10 + 1; } while (uVar10 < 10); AddPocketItem(playerCopy,uVar11,0); - uVar10 = -(uint)((uVar11 & 0x7ff) != 0) & uVar11 & 0x7ff; + uVar10 = -GHIDRA_UINT(((uVar11 & 0x7ff) != 0)) & uVar11 & 0x7ff; uVar11 = 0xe; if (uVar10 < 0xe) { uVar11 = uVar10; @@ -44958,7 +44958,7 @@ LAB_007bc81f: std::vector::push_back(&dailyItemId3); break; case 5: - piVar15 = (int *)((int)(pEVar12->_pillEffectUses)._begin + 0x48); + piVar15 = (int *)(GHIDRA_INT((pEVar12->_pillEffectUses)._begin) + 0x48); *piVar15 = *piVar15 + 0x12; pEVar12->_cacheFlags = pEVar12->_cacheFlags | 0x400; ((Color *)(&tintColor))->Color::Color(); @@ -45048,7 +45048,7 @@ LAB_007bc81f: dailyItemId2 = 0x5d; std::vector::push_back(&dailyItemId2); pvVar7 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar7 >> 2 < 0x24) { + if (GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar7) >> 2 < 0x24) { AddCostume(pEVar12,(ItemConfig_Item *)0x0,0); } else { @@ -45290,21 +45290,21 @@ LAB_007bc81f: pEVar12 = playerCopy; if (*(int *)&g_game->_deathmatchManager < 2) { uVar11 = 0; - uStack_a8 = (int)itemsEnd - (int)itemsBegin >> 2; + uStack_a8 = GHIDRA_INT(itemsEnd) - GHIDRA_INT(itemsBegin) >> 2; if (uStack_a8 != 0) { do { uVar9 = itemsBegin[uVar11]; AddCollectible(pEVar12,uVar9,-1,1,0,0,0); ItemPool::RemoveCollectible(&g_game->_itemPool,uVar9,0,0); if (g_game == (Game *)0x0) { - if (-1 < (int)uVar9) goto LAB_007bd89b; + if (-1 < GHIDRA_INT(uVar9)) goto LAB_007bd89b; } else { - if ((int)uVar9 < 0) { - if (((int)uVar9 < 0) && + if (GHIDRA_INT(uVar9) < 0) { + if ((GHIDRA_INT(uVar9) < 0) && (pvVar7 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)~uVar9 < - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar7 >> 2)) { + GHIDRA_INT(~uVar9) < + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar7) >> 2)) { iVar14 = **(int **)((char *)pvVar7 + ~uVar9 * 4); } else { @@ -45314,7 +45314,7 @@ LAB_007bc81f: else { LAB_007bd89b: pvVar7 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar7 >> 2 <= (int)uVar9) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar7) >> 2 <= GHIDRA_INT(uVar9)) goto LAB_007bd8ee; iVar14 = *(int *)((char *)pvVar7 + uVar9 * 4); } @@ -45389,7 +45389,7 @@ LAB_007bd8ee: AddTrinket(pEVar12,0x48,1); pGVar8 = g_game; pvVar7 = (g_game->_itemPool)._trinketPoolItems._begin; - if (((0x48 < (int)(g_game->_itemPool)._trinketPoolItems._end - (int)pvVar7 >> 3) && + if (((0x48 < GHIDRA_INT((g_game->_itemPool)._trinketPoolItems._end) - GHIDRA_INT(pvVar7) >> 3) && (*(char *)((char *)pvVar7 + 0x244) != '\0')) && (*(char *)((char *)pvVar7 + 0x245) != '\0')) { *(undefined1 *)((char *)pvVar7 + 0x244) = 0; piVar15 = &(pGVar8->_itemPool)._numAvailableTrinkets; @@ -45406,7 +45406,7 @@ LAB_007bdacf: pGVar8 = g_game; if (((0 < iVar14) && (pvVar7 = (g_game->_itemPool)._trinketPoolItems._begin, - iVar14 < (int)(g_game->_itemPool)._trinketPoolItems._end - (int)pvVar7 >> 3)) && + iVar14 < GHIDRA_INT((g_game->_itemPool)._trinketPoolItems._end) - GHIDRA_INT(pvVar7) >> 3)) && ((*(char *)((char *)pvVar7 + iVar14 * 8 + 4) != '\0' && (*(char *)((char *)pvVar7 + iVar14 * 8 + 5) != '\0')))) { *(undefined1 *)((char *)pvVar7 + iVar14 * 8 + 4) = 0; @@ -45433,13 +45433,13 @@ LAB_007bdb1f: } LAB_007bdb5f: local_94 = (PersistentGameData *) - CONCAT31((int3)((uint)pGVar8 >> 8),*(int *)&g_game->_deathmatchManager < 2); + CONCAT31((int3)(GHIDRA_UINT(pGVar8) >> 8),*(int *)&g_game->_deathmatchManager < 2); if ((*(int *)&g_game->_deathmatchManager < 2) && (g_manager->_netplayManager != *(NetplayManager *)(g_manager + 1))) { ((InputManager *)(&PTR_vftable_00c57b18))->InputManager::get_device(&local_dc,pEVar12->_controllerIndex); local_8 = 1; - if ((uint)local_dc != 0) { - iVar14 = __RTDynamicCast((uint)local_dc,0,&KAGE::Input::InputDeviceBase::RTTI_Type_Descriptor, + if (GHIDRA_UINT(local_dc) != 0) { + iVar14 = __RTDynamicCast(GHIDRA_UINT(local_dc),0,&KAGE::Input::InputDeviceBase::RTTI_Type_Descriptor, &IsaacRepentancePlus::NetInputDevice::RTTI_Type_Descriptor,0); if (iVar14 != 0) { iVar14 = *(int *)(iVar14 + 0x374); @@ -45448,22 +45448,22 @@ LAB_007bdb5f: uVar11 = local_ac; uStack_a8 = 0; local_ac = 0; - deviceUserId._0_4_ = local_ac; + (*(undefined4 *)((char *)&(deviceUserId) + 0x0)) = local_ac; uVar10 = uStack_a8; local_ac = uVar11; } else { - deviceUserId._0_4_ = *(uint *)(iVar14 + 8); + (*(undefined4 *)((char *)&(deviceUserId) + 0x0)) = *(uint *)(iVar14 + 8); uVar10 = *(uint *)(iVar14 + 0xc); } - deviceUserId._4_4_ = uVar10; - uStack_a8 = (uint)deviceUserId; + (*(undefined4 *)((char *)&(deviceUserId) + 0x4)) = uVar10; + uStack_a8 = GHIDRA_UINT(deviceUserId); FUN_00731ee0(local_120,&deviceUserId); if (((*(char *)(local_118 + 0xd) != '\0') || (uVar10 < *(uint *)(local_118 + 0x14))) || ((uVar10 <= *(uint *)(local_118 + 0x14) && (uStack_a8 < *(uint *)(local_118 + 0x10))))) { local_118 = *(int *)&(*(undefined1 *)((char *)&(g_manager[1]._gamestate) + 0xc8)); } - local_94 = (PersistentGameData *)((uint)local_94 & 0xff); + local_94 = (PersistentGameData *)(GHIDRA_UINT(local_94) & 0xff); if (local_118 != *(int *)&(*(undefined1 *)((char *)&(g_manager[1]._gamestate) + 0xc8))) { local_94 = (PersistentGameData *)0x0; } @@ -45471,8 +45471,8 @@ LAB_007bdb5f: } } local_8 = 2; - if (((local_dc._4_4_ != (ItemConfig *)0x0) && - (cVar4 = (**(code **)(*(int *)local_dc._4_4_ + 0xc))(), cVar4 != '\0')) && + if ((((*(undefined4 *)((char *)&(local_dc) + 0x4)) != (ItemConfig *)0x0) && + (cVar4 = (**(code **)(*(*(undefined4 *)((char *)&((int *)local_dc) + 0x4)) + 0xc))(), cVar4 != '\0')) && (g_inputDeviceRelease != (void *)0x0)) { (*g_inputDeviceRelease)(&local_dc); } @@ -45539,8 +45539,8 @@ LAB_007bdb5f: local_94 = (PersistentGameData *)0x0; uStack_a8 = 100; do { - uVar11 = ((int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2) - 1; + uVar11 = (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2) - 1; if (uVar9 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar1 = (code *)swi(3); @@ -45557,15 +45557,15 @@ LAB_007bdb5f: uVar10 = uVar10 + 1; local_b4 = &g_manager->_itemConfig; if (g_game == (Game *)0x0) { - if (-1 < (int)uVar10) goto LAB_007bdf2c; + if (-1 < GHIDRA_INT(uVar10)) goto LAB_007bdf2c; LAB_007bdf3f: piVar15 = (int *)0x0; } - else if ((int)uVar10 < 0) { - if (((int)uVar10 < 0) && + else if (GHIDRA_INT(uVar10) < 0) { + if ((GHIDRA_INT(uVar10) < 0) && (pvVar7 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)~uVar10 < - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar7 >> 2)) { + GHIDRA_INT(~uVar10) < + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar7) >> 2)) { piVar15 = (int *)**(undefined4 **)((char *)pvVar7 + ~uVar10 * 4); } else { @@ -45575,15 +45575,15 @@ LAB_007bdf3f: else { LAB_007bdf2c: pvVar7 = (local_b4->_collectibles)._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar7 >> 2 <= (int)uVar10) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar7) >> 2 <= GHIDRA_INT(uVar10)) goto LAB_007bdf3f; piVar15 = *(int **)((char *)pvVar7 + uVar10 * 4); } rng._seed = uVar9; if (((((uVar10 != 0) && - ((int)uVar10 < - (int)(g_manager->_itemConfig)._collectibles._end - - (int)(local_b4->_collectibles)._begin >> 2)) && (uVar10 != 0xeb)) && + (GHIDRA_INT(uVar10) < + GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((local_b4->_collectibles)._begin) >> 2)) && (uVar10 != 0xeb)) && ((uVar10 != 0x2b && (uVar10 != 0x3d)))) && ((collectibleConfig = ((ItemConfig *)(local_b4))->ItemConfig::GetCollectible(uVar10), collectibleConfig != (ItemConfig_Item *)0x0 && ((piVar15[0x2f] & 1U) == 0)))) { @@ -45605,8 +45605,8 @@ LAB_007bdf2c: } while (uStack_a8 != 0); local_90 = uVar9; if (local_94 != (PersistentGameData *)0x0) { - AddCollectible(playerCopy,(int)local_94,-1,1,0,0,0); - ItemPool::RemoveCollectible(&g_game->_itemPool,(int)local_94,0,0); + AddCollectible(playerCopy,GHIDRA_INT(local_94),-1,1,0,0,0); + ItemPool::RemoveCollectible(&g_game->_itemPool,GHIDRA_INT(local_94),0,0); } if (uVar11 != 0) { AddCollectible(pEVar12,uVar11,-1,1,0,0,0); @@ -45655,9 +45655,9 @@ LAB_007bdf2c: } } local_94 = (PersistentGameData *)local_a4->_eventCounters[0x72]; - local_b4 = (ItemConfig *)((uint)local_94 >> 0x10); + local_b4 = (ItemConfig *)(GHIDRA_UINT(local_94) >> 0x10); if (g_manager->_netplayManager == *(NetplayManager *)(g_manager + 1)) { - local_b4 = (ItemConfig *)((uint)local_94 & 0xffff); + local_b4 = (ItemConfig *)(GHIDRA_UINT(local_94) & 0xffff); } if ((ItemConfig *)0x2 < local_b4) { local_b4 = (ItemConfig *)0x2; @@ -45666,8 +45666,8 @@ LAB_007bdf2c: do { uStack_a8 = 0; LAB_007be1e0: - uVar11 = ((int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2) - 1; + uVar11 = (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2) - 1; if (uVar9 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar1 = (code *)swi(3); @@ -45679,32 +45679,32 @@ LAB_007be1e0: rng._seed = uVar9 >> ((byte)rngShift3 & 0x1f) ^ uVar9; uVar9 = 0; if (uVar11 != 0) { - uVar9 = (uint)rng._seed % uVar11; + uVar9 = GHIDRA_UINT(rng._seed) % uVar11; } uVar9 = uVar9 + 1; if (g_game == (Game *)0x0) { - if (-1 < (int)uVar9) goto LAB_007be280; + if (-1 < GHIDRA_INT(uVar9)) goto LAB_007be280; LAB_007be29a: piVar15 = (int *)0x0; } - else if ((int)uVar9 < 0) { - if ((-1 < (int)uVar9) || + else if (GHIDRA_INT(uVar9) < 0) { + if ((-1 < GHIDRA_INT(uVar9)) || (pvVar7 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar7 >> 2 <= - (int)~uVar9)) goto LAB_007be29a; + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar7) >> 2 <= + GHIDRA_INT(~uVar9))) goto LAB_007be29a; piVar15 = (int *)**(undefined4 **)((char *)pvVar7 + ~uVar9 * 4); } else { LAB_007be280: pvVar7 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar7 >> 2 <= (int)uVar9) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar7) >> 2 <= GHIDRA_INT(uVar9)) goto LAB_007be29a; piVar15 = *(int **)((char *)pvVar7 + uVar9 * 4); } local_90 = rng._seed; if ((((uVar9 == 0) || - ((int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2 <= (int)uVar9)) || + (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2 <= GHIDRA_INT(uVar9))) || (uVar9 == 0xeb)) || (((uVar9 == 0x2b || (uVar9 == 0x3d)) || ((collectibleConfig = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(uVar9), @@ -45712,7 +45712,7 @@ LAB_007be280: LAB_007be376: uStack_a8 = uStack_a8 + 1; pEVar12 = playerCopy; - if (99 < (int)uStack_a8) goto LAB_007be345; + if (99 < GHIDRA_INT(uStack_a8)) goto LAB_007be345; uVar9 = local_90; goto LAB_007be1e0; } @@ -45723,7 +45723,7 @@ LAB_007be376: AddCollectible(playerCopy,uVar9,-1,1,0,0,0); ItemPool::RemoveCollectible(&g_game->_itemPool,uVar9,0,0); LAB_007be345: - local_b4 = (ItemConfig *)((int)(local_b4 + -1) + 0x10f); + local_b4 = (ItemConfig *)(GHIDRA_INT((local_b4 + -1)) + 0x10f); if (local_b4 == (ItemConfig *)0x0) goto code_r0x007be352; uVar9 = local_90; } while( true ); @@ -45756,7 +45756,7 @@ LAB_007be345: iVar14 = *piVar15; if (((0 < iVar14) && (pvVar7 = (g_game->_itemPool)._trinketPoolItems._begin, - iVar14 < (int)(g_game->_itemPool)._trinketPoolItems._end - (int)pvVar7 >> 3)) && + iVar14 < GHIDRA_INT((g_game->_itemPool)._trinketPoolItems._end) - GHIDRA_INT(pvVar7) >> 3)) && ((*(char *)((char *)pvVar7 + iVar14 * 8 + 4) != '\0' && (*(char *)((char *)pvVar7 + iVar14 * 8 + 5) != '\0')))) { *(undefined1 *)((char *)pvVar7 + iVar14 * 8 + 4) = 0; @@ -45770,7 +45770,7 @@ LAB_007be345: if (pCVar16->_startingPill != -1) { uVar9 = ((ItemPool *)(&g_game->_itemPool))->ItemPool::ForceAddPillEffect(pCVar16->_startingPill); AddPocketItem(pEVar12,uVar9,0); - uVar11 = -(uint)((uVar9 & 0x7ff) != 0) & uVar9 & 0x7ff; + uVar11 = -GHIDRA_UINT(((uVar9 & 0x7ff) != 0)) & uVar9 & 0x7ff; uVar9 = 0xe; if (uVar11 < 0xe) { uVar9 = uVar11; @@ -45826,10 +45826,10 @@ LAB_007be602: code_r0x007be352: netplayManager = &g_manager->_netplayManager; if (*netplayManager == *(NetplayManager *)(g_manager + 1)) { - uVar11 = (uint)local_94 & 0xffff0000; + uVar11 = GHIDRA_UINT(local_94) & 0xffff0000; } else { - uVar11 = (uint)local_94 & 0xffff; + uVar11 = GHIDRA_UINT(local_94) & 0xffff; } local_a4->_eventCounters[0x72] = uVar11; pvVar7 = ((InputManager *)(netplayManager))->InputManager::GetDeviceByPlayerEntity(pEVar12); @@ -45843,7 +45843,7 @@ LAB_007be608: EvaluateItems(pEVar12); pGVar8 = g_game; playerList = (g_game->_playerManager)._playerList._begin; - if ((int)(g_game->_playerManager)._playerList._end - (int)playerList >> 2 == 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT(playerList) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerList = (pGVar8->_playerManager)._playerList._begin; } @@ -45869,7 +45869,7 @@ LAB_007be608: else if ((iVar14 == 0x25) && (g_game->_challenge != 0x2c)) { ((TemporaryEffects *)(&pEVar12->_temporaryeffects))->TemporaryEffects::RemoveNullEffect(0x6d,-1); pvVar7 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar7 >> 2 < 0x6e) { + if (GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar7) >> 2 < 0x6e) { tmpEffect[0] = 0; } else { @@ -45903,7 +45903,7 @@ LAB_007be608: local_78 = g_manager; pvVar7 = (g_manager->_itemConfig)._collectibles._end; collectibles = (g_manager->_itemConfig)._collectibles._begin; - uVar11 = (int)pvVar7 - (int)collectibles >> 2; + uVar11 = GHIDRA_INT(pvVar7) - GHIDRA_INT(collectibles) >> 2; if (uVar11 != 0) { if (0x3fffffff < uVar11) { /* WARNING: Subroutine does not return */ @@ -45916,22 +45916,22 @@ LAB_007be608: uVar11 = 0; piVar15 = itemsEnd; local_a4 = (PersistentGameData *)itemsCapacity; - if ((int)pvVar7 - (int)collectibles >> 2 != 0) { + if (GHIDRA_INT(pvVar7) - GHIDRA_INT(collectibles) >> 2 != 0) { do { local_74 = *(int **)((char *)collectibles + uVar11 * 4); if (uVar11 != 0) { pvVar7 = (g_manager->_itemConfig)._collectibles._begin; - if (((((int)uVar11 < (int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar7 >> 2) + if ((((GHIDRA_INT(uVar11) < GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar7) >> 2) && (uVar11 != 0xeb)) && (uVar11 != 0x2b)) && (uVar11 != 0x3d)) { if (g_game == (Game *)0x0) { - if (-1 < (int)uVar11) goto LAB_007be8da; + if (-1 < GHIDRA_INT(uVar11)) goto LAB_007be8da; } else { - if ((int)uVar11 < 0) { - if (((int)uVar11 < 0) && + if (GHIDRA_INT(uVar11) < 0) { + if ((GHIDRA_INT(uVar11) < 0) && (pvVar7 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)~uVar11 < - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar7 >> 2)) + GHIDRA_INT(~uVar11) < + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar7) >> 2)) { iVar14 = **(int **)((char *)pvVar7 + ~uVar11 * 4); } @@ -45953,7 +45953,7 @@ LAB_007be8da: piVar15 = itemsEnd; } else { - *piVar15 = (int)pCStack_b8; + *piVar15 = GHIDRA_INT(pCStack_b8); itemsEnd = piVar15 + 1; piVar15 = itemsEnd; } @@ -45964,8 +45964,8 @@ LAB_007be8da: } uVar11 = uVar11 + 1; collectibles = (local_78->_itemConfig)._collectibles._begin; - } while (uVar11 < (uint)((int)(local_78->_itemConfig)._collectibles._end - (int)collectibles - >> 2)); + } while (uVar11 < GHIDRA_UINT((GHIDRA_INT((local_78->_itemConfig)._collectibles._end) - GHIDRA_INT(collectibles) + >> 2))); uVar9 = local_90; } local_d0 = (ChallengeParam *)0x0; @@ -45973,7 +45973,7 @@ LAB_007be8da: do { piVar2 = itemsBegin; if (piVar13 == piVar15) break; - uVar11 = (int)piVar15 - (int)itemsBegin >> 2; + uVar11 = GHIDRA_INT(piVar15) - GHIDRA_INT(itemsBegin) >> 2; if (uVar9 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar1 = (code *)swi(3); @@ -45987,7 +45987,7 @@ LAB_007be8da: if (uVar11 != 0) { uVar10 = uVar9 % uVar11; } - if (uVar10 < ((int)piVar15 - (int)itemsBegin >> 2) - 1U) { + if (uVar10 < (GHIDRA_INT(piVar15) - GHIDRA_INT(itemsBegin) >> 2) - 1U) { iVar14 = itemsBegin[uVar10]; itemsBegin[uVar10] = piVar15[-1]; piVar15[-1] = iVar14; @@ -46001,7 +46001,7 @@ LAB_007be8da: } while (local_d0 < (ChallengeParam *)0xa); local_8 = 0xffffffff; if (piVar13 != (int *)0x0) { - deallocate(piVar13,(int)local_a4 - (int)piVar13 >> 2); + deallocate(piVar13,GHIDRA_INT(local_a4) - GHIDRA_INT(piVar13) >> 2); } pEVar12 = playerCopy; } @@ -46063,7 +46063,7 @@ void Entity_Player::update_player_skin() local_14 = (void *)0xffffffff; puStack_18 = &LAB_00affefd; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(skinColorStr + 0x11); + local_24 = __security_cookie ^ GHIDRA_UINT((skinColorStr + 0x11)); ExceptionList = &local_1c; local_78 = this; if (this->_isCoopGhost != 0) { @@ -46074,11 +46074,11 @@ void Entity_Player::update_player_skin() iVar5 = this->_playerType; if ((iVar5 < 0) || (pvVar4 = (g_manager->_entityConfig)._players._begin, - ((int)(g_manager->_entityConfig)._players._end - (int)pvVar4) / 0x148 <= iVar5)) { + (GHIDRA_INT((g_manager->_entityConfig)._players._end) - GHIDRA_INT(pvVar4)) / 0x148 <= iVar5)) { playerConfig = (EntityConfig_Player *)0x0; } else { - playerConfig = (EntityConfig_Player *)(iVar5 * 0x148 + (int)pvVar4); + playerConfig = (EntityConfig_Player *)(iVar5 * 0x148 + GHIDRA_INT(pvVar4)); } this->_bodyColor = -1; this->_headColor = -1; @@ -46086,23 +46086,23 @@ void Entity_Player::update_player_skin() uVar6 = 0; puStack_20 = (undefined1 *)(skinColorStr + 0x14); do { - local_3c._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) = std::_Allocate(0x30); local_3c._size = 0x26; - local_3c._capacity = (uint)&DAT_0000002f; - builtin_strncpy((char *)local_3c._buf._0_4_,"gfx/characters/costumes/NiceLilith.png",0x27); + local_3c._capacity = GHIDRA_UINT(&DAT_0000002f); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_3c._buf) + 0x0)),"gfx/characters/costumes/NiceLilith.png",0x27); local_14 = (void *)0x0; ((Sprite *)((Sprite *)&this->_sprite))->Sprite::ReplaceSpritesheet(uVar6,&local_3c); local_14 = (void *)0xffffffff; unk = extraout_CL; if (&DAT_0000000f < local_3c._capacity) { freeSize = (undefined1 *)(local_3c._capacity + 1); - freePtr = (char *)local_3c._buf._0_4_; + freePtr = (*(undefined4 *)((char *)&((char *)local_3c._buf) + 0x0)); if ((undefined1 *)0xfff < freeSize) { - freePtr = *(char **)(local_3c._buf._0_4_ + -4); + freePtr = *(char **)((*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) + -4); freeSize = (undefined1 *)(local_3c._capacity + 0x24); - if ((char *)0x1f < (char *)(local_3c._buf._0_4_ + (-4 - (int)freePtr))) goto LAB_007bee2a; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) + (-4 - GHIDRA_INT(freePtr)))) goto LAB_007bee2a; } - operator_delete(freePtr,(uint)freeSize); + operator_delete(freePtr,GHIDRA_UINT(freeSize)); unk = extraout_CL_00; } uVar6 = uVar6 + 1; @@ -46131,7 +46131,7 @@ LAB_007bee42: local_14 = (void *)0x1; strResult = costume_path_apply_skin_color(&local_3c,pvVar4,-1,iVar5,(byte *)0x0,(byte *)0x0) ; - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (local_74->_layerData == (int *)0x0) { iVar5 = -1; } @@ -46139,31 +46139,31 @@ LAB_007bee42: iVar5 = *(int *)local_74->_layerData; } ((Sprite *)((Sprite *)&this->_sprite))->Sprite::ReplaceSpritesheet(iVar5,strResult); - local_14 = (void *)CONCAT31(local_14._1_3_,1); + local_14 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); unk = extraout_CL_02; if (&DAT_0000000f < local_3c._capacity) { freeSize = (undefined1 *)(local_3c._capacity + 1); - freePtr = (char *)local_3c._buf._0_4_; + freePtr = (*(undefined4 *)((char *)&((char *)local_3c._buf) + 0x0)); if ((undefined1 *)0xfff < freeSize) { - freePtr = *(char **)(local_3c._buf._0_4_ + -4); + freePtr = *(char **)((*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) + -4); freeSize = (undefined1 *)(local_3c._capacity + 0x24); - if ((char *)0x1f < (char *)(local_3c._buf._0_4_ + (-4 - (int)freePtr))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) + (-4 - GHIDRA_INT(freePtr)))) goto LAB_007bee2a; } - operator_delete(freePtr,(uint)freeSize); + operator_delete(freePtr,GHIDRA_UINT(freeSize)); unk = extraout_CL_03; } local_14 = (void *)0xffffffff; local_3c._size = 0; - local_3c._capacity = (uint)&DAT_0000000f; - local_3c._buf._0_4_ = local_3c._buf._0_4_ & 0xffffff00; + local_3c._capacity = GHIDRA_UINT(&DAT_0000000f); + (*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) = (*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) & 0xffffff00; if (0xf < skinColorStrCapacity) { uVar6 = skinColorStrCapacity + 1; pvVar4 = skinColorStr[0]; if (0xfff < uVar6) { - pvVar4 = *(void **)((int)skinColorStr[0] + -4); + pvVar4 = *(void **)(GHIDRA_INT(skinColorStr[0]) + -4); uVar6 = skinColorStrCapacity + 0x24; - if (0x1f < (uint)((int)skinColorStr[0] + (-4 - (int)pvVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(skinColorStr[0]) + (-4 - GHIDRA_INT(pvVar4))))) { LAB_007bee2a: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -46182,7 +46182,7 @@ LAB_007bee2a: } else if ((iVar5 < 0) || (pvVar4 = (g_manager->_itemConfig)._nullItems._begin, - (int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar4 >> 2 <= iVar5)) { + GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar4) >> 2 <= iVar5)) { AddCostume(this,(ItemConfig_Item *)0x0,0); } else { @@ -46194,7 +46194,7 @@ LAB_007bee2a: if (challengeParams->_canShoot == 0) { if ((this->_playerType != 0x23) && (this->_playerType != 0x28)) { pvVar4 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar4 & 0xfffffffcU) < 0x39) + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar4) & 0xfffffffcU)) < 0x39) { costume = (ItemConfig_Item *)0x0; } @@ -46211,14 +46211,14 @@ LAB_007beef4: game = g_game; } local_78 = (Entity_Player *)0x36; - std::set::find_node((undefined1 *)((int)&local_3c + 0xc),&local_78); + std::set::find_node((undefined1 *)(GHIDRA_INT(&local_3c) + 0xc),&local_78); if (((*(char *)(local_3c._capacity + 0xd) != '\0') || (0x36 < *(int *)(local_3c._capacity + 0x10)) ) || ((void *)local_3c._capacity == (game->_seedEffects)._seedEffects)) { pvVar4 = extraout_ECX; if ((game->_dailyChallenge)._specialDailyId != 0x13) goto LAB_007bef66; } pvVar4 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar4 & 0xfffffffcU) < 0x41) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar4) & 0xfffffffcU)) < 0x41) { costume = (ItemConfig_Item *)0x0; } else { @@ -46230,7 +46230,7 @@ LAB_007beef4: LAB_007bef66: if ((game->_challenge == 0x2a) && (this->_playerType == 0x23)) { pvVar4 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar4 & 0xfffffffcU) < 0x1a9) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar4) & 0xfffffffcU)) < 0x1a9) { costume = (ItemConfig_Item *)0x0; } else { @@ -46261,9 +46261,9 @@ LAB_007bef66: uVar6 = displayNameCapacity + 1; pvVar4 = displayName[0]; if (0xfff < uVar6) { - pvVar4 = *(void **)((int)displayName[0] + -4); + pvVar4 = *(void **)(GHIDRA_INT(displayName[0]) + -4); uVar6 = displayNameCapacity + 0x24; - if (0x1f < (uint)((int)displayName[0] + (-4 - (int)pvVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(displayName[0]) + (-4 - GHIDRA_INT(pvVar4))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -46289,9 +46289,9 @@ void Entity_Player::InitBabySkin() uVar2 = this->_babySkin; if (uVar2 < 0x47) { pEVar1 = (Entity_Player *) - ((int)(g_manager->_entityConfig)._babies._end - - (int)(g_manager->_entityConfig)._babies._begin); - if ((uint)((int)pEVar1 / 0x38) <= uVar2) { + (GHIDRA_INT((g_manager->_entityConfig)._babies._end) - + GHIDRA_INT((g_manager->_entityConfig)._babies._begin)); + if (GHIDRA_UINT((GHIDRA_INT(pEVar1) / 0x38)) <= uVar2) { KAGE_LogMessage(0x10,(byte *)"Baby list is smaller than requested baby %d!"); pEVar1 = extraout_ECX; } @@ -46301,9 +46301,9 @@ void Entity_Player::InitBabySkin() Sprite::ReplaceSpritesheet ((Sprite *)&this->_sprite,uVar2, (std_string *) - ((int)(manager->_entityConfig)._babies._begin + this->_babySkin * 0x38 + 0x1c)); + (GHIDRA_INT((manager->_entityConfig)._babies._begin) + this->_babySkin * 0x38 + 0x1c)); uVar2 = uVar2 + 1; - } while (uVar2 < (uint)(this->_sprite)._layerCount); + } while (uVar2 < GHIDRA_UINT((this->_sprite)._layerCount)); ((ANM2 *)(&this->_sprite))->ANM2::LoadGraphics(unk); return; } @@ -46313,25 +46313,25 @@ void Entity_Player::InitBabySkin() if (uVar2 == 0x47) { uVar2 = this->_subtype; if ((uVar2 < 0x47) || - ((uint)(((int)(g_manager->_entityConfig)._babies._end - - (int)(g_manager->_entityConfig)._babies._begin) / 0x38) <= uVar2)) { + (GHIDRA_UINT(((GHIDRA_INT((g_manager->_entityConfig)._babies._end) - + GHIDRA_INT((g_manager->_entityConfig)._babies._begin)) / 0x38)) <= uVar2)) { KAGE_LogMessage(0x10,(byte *)"Bad baby basic id %d"); uVar2 = this->_subtype; pEVar1 = extraout_ECX_00; if (uVar2 < 0x47) goto LAB_007bf18d; } pEVar1 = (Entity_Player *) - ((int)(manager->_entityConfig)._babies._end - - (int)(manager->_entityConfig)._babies._begin); - if ((uVar2 < (uint)((int)pEVar1 / 0x38)) && (uVar2 = 0, (this->_sprite)._layerCount != 0)) { + (GHIDRA_INT((manager->_entityConfig)._babies._end) - + GHIDRA_INT((manager->_entityConfig)._babies._begin)); + if ((uVar2 < GHIDRA_UINT((GHIDRA_INT(pEVar1) / 0x38))) && (uVar2 = 0, (this->_sprite)._layerCount != 0)) { do { Sprite::ReplaceSpritesheet ((Sprite *)&this->_sprite,uVar2, (std_string *) - ((int)(manager->_entityConfig)._babies._begin + this->_subtype * 0x38 + 0x1c)); + (GHIDRA_INT((manager->_entityConfig)._babies._begin) + this->_subtype * 0x38 + 0x1c)); uVar2 = uVar2 + 1; pEVar1 = extraout_ECX_01; - } while (uVar2 < (uint)(this->_sprite)._layerCount); + } while (uVar2 < GHIDRA_UINT((this->_sprite)._layerCount)); } } } @@ -46364,10 +46364,10 @@ Entity_Laser * Entity_Player::FireDelayedBrimstone(float angle, Entity *parent) uint local_c; EntityPtr *parentRef; - local_c = __security_cookie ^ (uint)hitParams; - hitParams._4_4_ = angle; + local_c = __security_cookie ^ GHIDRA_UINT(hitParams); + (*(undefined4 *)((char *)&(hitParams) + 0x4)) = angle; variant = 1; - hitParams._8_4_ = parent; + (*(undefined4 *)((char *)&(hitParams) + 0x8)) = parent; bVar1 = HasCollectible(this,0x44,0); if (bVar1 != 0) { variant = 9; @@ -46376,23 +46376,23 @@ Entity_Laser * Entity_Player::FireDelayedBrimstone(float angle, Entity *parent) if ((1 < brimstoneCount) && (bVar5 = variant == 9, variant = 0xb, bVar5)) { variant = 0xe; } - hitParams._12_4_ = (parent->_pos).x; + (*(undefined4 *)((char *)&(hitParams) + 0xc)) = (parent->_pos).x; fStack_7c = (parent->_pos).y; laser = Entity_Laser::ShootAngle - (variant,(Vector *)(hitParams + 0xc),(float)hitParams._4_4_,10, + (variant,(Vector *)(hitParams + 0xc),(*(undefined4 *)((char *)&((float)hitParams) + 0x4)),10, &parent->_posOffset,(Entity *)this,0); fVar6 = 0.0; laser->SetColor(&this->_laserColor,0xffffffff,0xff); uVar2 = Random(); GetTearHitParams(this,(TearParams *)hitParams,2,1.0,(uVar2 & 1) * 2 + -1,(Entity *)0x0); laser->SetCollisionDamage(fStack_44); - uVar4 = ~(uint)g_tearFlagOccult._h; - uVar3 = ~g_tearFlagOccult._h._4_4_; - uVar2 = ~g_tearFlagOccult._l._4_4_; - *(uint *)&(laser->_tearFlags)._l = ~(uint)g_tearFlagOccult._l & uStack_58; - *(uint *)((int)&(laser->_tearFlags)._l + 4) = uVar2 & uStack_54; + uVar4 = ~GHIDRA_UINT(g_tearFlagOccult._h); + uVar3 = ~(*(undefined4 *)((char *)&(g_tearFlagOccult._h) + 0x4)); + uVar2 = ~(*(undefined4 *)((char *)&(g_tearFlagOccult._l) + 0x4)); + *(uint *)&(laser->_tearFlags)._l = ~GHIDRA_UINT(g_tearFlagOccult._l) & uStack_58; + *(uint *)(GHIDRA_INT(&(laser->_tearFlags)._l) + 4) = uVar2 & uStack_54; *(uint *)&(laser->_tearFlags)._h = uVar4 & uStack_50; - *(uint *)((int)&(laser->_tearFlags)._h + 4) = uVar3 & uStack_4c; + *(uint *)(GHIDRA_INT(&(laser->_tearFlags)._h) + 4) = uVar3 & uStack_4c; (*(undefined1 *)((char *)(laser) + 0x517)) = 1; fVar6 = sin(fVar6 * 0.017453292); if (fVar6 <= -0.5) { @@ -46449,7 +46449,7 @@ byte Entity_Player::CanPickupItem() isLess = bVar1 < *otherAnimChar; if (bVar1 != *otherAnimChar) { LAB_007bf423: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_007bf428; } if (bVar1 == 0) break; @@ -46472,7 +46472,7 @@ LAB_007bf428: isLess = bVar1 < (byte)*deathChar; if (bVar1 != *deathChar) { LAB_007bf465: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_007bf46a; } if (bVar1 == 0) break; @@ -46515,7 +46515,7 @@ byte Entity_Player::IsHoldingItem() isLess = ch < (byte)*expectedCursor; if (ch != *expectedCursor) { LAB_007bf4d1: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_007bf4d6; } if (ch == 0) break; @@ -46535,7 +46535,7 @@ LAB_007bf4d6: isLess = ch < (byte)*expectedCursor; if (ch != *expectedCursor) { LAB_007bf505: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_007bf50a; } if (ch == 0) break; @@ -46555,7 +46555,7 @@ LAB_007bf50a: isLess = ch < (byte)*expectedCursor; if (ch != *expectedCursor) { LAB_007bf540: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_007bf545; } if (ch == 0) break; @@ -46575,7 +46575,7 @@ LAB_007bf545: isLess = ch < (byte)*expectedCursor; if (ch != *expectedCursor) { LAB_007bf570: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_007bf575; } if (ch == 0) break; @@ -46594,7 +46594,7 @@ LAB_007bf575: isLess = ch < (byte)*expectedCursor; if (ch != *expectedCursor) { LAB_007bf5a0: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_007bf5a5; } if (ch == 0) break; @@ -46642,9 +46642,9 @@ void Entity_Player::AddBlueSpider(Vector *position) this->_numBlueSpiders = this->_numBlueSpiders + 1; seed = Random(); spider = ((Game *)(g_game))->Game::SpawnEx(3,0x49,position,&g_vectorZero,(Entity *)this,0,seed,0); - flagsHigh = *(undefined4 *)((int)&spider->_flags + 4); - *(uint *)&spider->_flags = (uint)spider->_flags & 0xfffffffb; - *(undefined4 *)((int)&spider->_flags + 4) = flagsHigh; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&spider->_flags) + 4); + *(uint *)&spider->_flags = GHIDRA_UINT(spider->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&spider->_flags) + 4) = flagsHigh; return; } @@ -46672,14 +46672,14 @@ int Entity_Player::GetExtraLives() void *collectibleCounts; collectibleCounts = (this->_collectibleCounts)._begin; - extraLives = (int)this->_deadCatLives + *(int *)((char *)collectibleCounts + 0xac0) + + extraLives = GHIDRA_INT(this->_deadCatLives) + *(int *)((char *)collectibleCounts + 0xac0) + *(int *)((char *)collectibleCounts + 0x530) + *(int *)((char *)collectibleCounts + 0x4dc) + *(int *)((char *)collectibleCounts + 0x350) + *(int *)((char *)collectibleCounts + 0x284) + *(int *)((char *)collectibleCounts + 0x2c); if (this->_playerType == 0x1f) { extraLives = extraLives + *(int *)((char *)collectibleCounts + 0x9ac); } - return (uint)(this->_playerType == 8) + extraLives; + return GHIDRA_UINT((this->_playerType == 8)) + extraLives; } // 007c2e90 @@ -46712,7 +46712,7 @@ uint Entity_Player::GetGlitchBabySubType() local_8 = 0; local_14 = (g_manager->_entityConfig)._babies._end; babiesBegin = (g_manager->_entityConfig)._babies._begin; - babyCount = ((int)local_14 - (int)babiesBegin) / 0x38; + babyCount = (GHIDRA_INT(local_14) - GHIDRA_INT(babiesBegin)) / 0x38; local_1c = babiesBegin; if (babyCount != 0) { if (0x3fffffff < babyCount) { @@ -46724,14 +46724,14 @@ uint Entity_Player::GetGlitchBabySubType() babiesBegin = (manager->_entityConfig)._babies._begin; } candidatesEnd = (int *)0x0; - local_14 = (void *)((int)local_14 - (int)babiesBegin); + local_14 = (void *)(GHIDRA_INT(local_14) - GHIDRA_INT(babiesBegin)); babyIndex = 0; - if ((int)local_14 / 0x38 + ((int)local_14 >> 0x1f) != (int)local_14 >> 0x1f) { + if (GHIDRA_INT(local_14) / 0x38 + (GHIDRA_INT(local_14) >> 0x1f) != GHIDRA_INT(local_14) >> 0x1f) { babyOffset = 0; do { - pvVar2 = (void *)(babyOffset + (int)babiesBegin); - if ((*(int *)(babyOffset + (int)babiesBegin) != 0x19) && - (*(int *)(babyOffset + (int)babiesBegin) != 0x18)) { + pvVar2 = (void *)(babyOffset + GHIDRA_INT(babiesBegin)); + if ((*(int *)(babyOffset + GHIDRA_INT(babiesBegin)) != 0x19) && + (*(int *)(babyOffset + GHIDRA_INT(babiesBegin)) != 0x18)) { if (-1 < *(int *)((char *)pvVar2 + 0x34)) { isUnlocked = PersistentGameData::Unlocked (&g_manager->_persistentGameData,*(int *)((char *)pvVar2 + 0x34)); @@ -46744,7 +46744,7 @@ uint Entity_Player::GetGlitchBabySubType() candidatesEnd = candidatesEndSlot; } else { - *candidatesEnd = (int)pvVar2; + *candidatesEnd = GHIDRA_INT(pvVar2); candidatesEndSlot = candidatesEnd + 1; candidatesEnd = candidatesEndSlot; } @@ -46755,7 +46755,7 @@ LAB_007c2fce: babiesBegin = (manager->_entityConfig)._babies._begin; local_1c = babiesBegin; } while (babyIndex < - (uint)(((int)(manager->_entityConfig)._babies._end - (int)babiesBegin) / 0x38)); + GHIDRA_UINT(((GHIDRA_INT((manager->_entityConfig)._babies._end) - GHIDRA_INT(babiesBegin)) / 0x38))); } if (candidatesEnd == (int *)0x0) { KAGE_LogMessage(1,(byte *)"[err] Couldn\'t select a baby subtype!\n"); @@ -46770,11 +46770,11 @@ LAB_007c2fce: } rngValue = rngValue >> 5 ^ rngValue; rngValue = rngValue << 9 ^ rngValue; - if ((int)candidatesEnd >> 2 == 0) { + if (GHIDRA_INT(candidatesEnd) >> 2 == 0) { rngValue = 0; } else { - rngValue = (rngValue >> 7 ^ rngValue) % (uint)((int)candidatesEnd >> 2); + rngValue = (rngValue >> 7 ^ rngValue) % GHIDRA_UINT((GHIDRA_INT(candidatesEnd) >> 2)); } ExceptionList = local_10; return **(uint **)(rngValue * 4); @@ -46980,7 +46980,7 @@ byte Entity_Player::CanPickSoulHearts() this = (Entity_Player *)*(EntityPtr *)((char *)this + 0x1e68); } LAB_007c34ac: - activeCharge = (int *)((int)this + 0x1588); + activeCharge = (int *)(GHIDRA_INT(this) + 0x1588); activeSlot = 0; do { if ((activeCharge[-2] == 0x249) && @@ -47039,22 +47039,22 @@ LAB_007c359c: return 1; } do { - if ((int)halfHeartIdx < 1) { + if (GHIDRA_INT(halfHeartIdx) < 1) { return 1; } uVar2 = halfHeartIdx & 0x80000001; - if ((int)uVar2 < 0) { + if (GHIDRA_INT(uVar2) < 0) { uVar2 = (uVar2 - 1 | 0xfffffffe) + 1; } if (uVar2 != 1) { return 1; } - if ((*(uint *)((char *)this + 0x1350) & 1 << ((byte)((int)(halfHeartIdx - 1) / 2) & 0x1f)) == 0) + if ((*(uint *)((char *)this + 0x1350) & 1 << ((byte)(GHIDRA_INT((halfHeartIdx - 1)) / 2) & 0x1f)) == 0) { return 1; } halfHeartIdx = halfHeartIdx + 2; - } while ((int)halfHeartIdx < soulHearts); + } while (GHIDRA_INT(halfHeartIdx) < soulHearts); } return 0; } @@ -47067,13 +47067,13 @@ void Entity_Player::RemoveSkinCostume() iVar1 = this->_playerType; if (-1 < iVar1) { - if (((iVar1 < ((int)(g_manager->_entityConfig)._players._end - - (int)(g_manager->_entityConfig)._players._begin) / 0x148) && - (pvVar2 = (void *)(iVar1 * 0x148 + (int)(g_manager->_entityConfig)._players._begin), + if (((iVar1 < (GHIDRA_INT((g_manager->_entityConfig)._players._end) - + GHIDRA_INT((g_manager->_entityConfig)._players._begin)) / 0x148) && + (pvVar2 = (void *)(iVar1 * 0x148 + GHIDRA_INT((g_manager->_entityConfig)._players._begin)), pvVar2 != (void *)0x0)) && (iVar1 = *(int *)((char *)pvVar2 + 0xac), iVar1 != -1)) { if ((-1 < iVar1) && (pvVar2 = (g_manager->_itemConfig)._nullItems._begin, - iVar1 < (int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar2 >> 2)) { + iVar1 < GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar2) >> 2)) { RemoveCostume(this,*(ItemConfig_Item **)((char *)pvVar2 + iVar1 * 4)); return; } @@ -47101,7 +47101,7 @@ void Entity_Player::ResetItemState() } else if (this->_itemState == 0x152) { pvVar2 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar2 & 0xfffffffcU) < 0x79) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar2) & 0xfffffffcU)) < 0x79) { Item = (ItemConfig_Item *)0x0; } else { @@ -47114,7 +47114,7 @@ void Entity_Player::ResetItemState() if (pvVar2 != (this->_costumeSpriteDescs)._end) { do { if (*(char *)((char *)pvVar2 + 0x129) == '\0') { - pvVar2 = (void *)((int)pvVar2 + 0x130); + pvVar2 = (void *)(GHIDRA_INT(pvVar2) + 0x130); } else { eraseResult = (int *)std::vector::erase(eraseResultBuf,pvVar2); @@ -47140,7 +47140,7 @@ void Entity_Player::ResetItemState() isLess = bVar1 < (byte)*targetNameCursor; if (bVar1 != *targetNameCursor) { LAB_007c37b3: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_007c37b8; } if (bVar1 == 0) break; @@ -47265,7 +47265,7 @@ void Entity_Player::add_random_stat_up(RNG *rng) int *local_c; int *local_8; - local_8 = (int *)(__security_cookie ^ (uint)(statModifiers + 7)); + local_8 = (int *)(__security_cookie ^ GHIDRA_UINT((statModifiers + 7))); statModifiers[0] = &this->_speedModifier; rngSeed = rng->_seed; statModifiers[1] = &this->_fireDelayModifier; @@ -47306,20 +47306,20 @@ void Entity_Player::preload_item_sounds() manager = g_manager; if ((*(undefined1 *)((char *)(this) + 0x13f1)) != '\0') { sounds = (g_manager->_sfxManager)._sounds._begin; - if (0x102 < ((int)(g_manager->_sfxManager)._sounds._end - (int)sounds) / 0x1b8) { + if (0x102 < (GHIDRA_INT((g_manager->_sfxManager)._sounds._end) - GHIDRA_INT(sounds)) / 0x1b8) { if (*(char *)((char *)sounds + 0x1bd08) == '\0') { KAGE_LogMessage(1,(byte *)"Preload sound %d.\n"); - ((SoundEffect *)((SoundEffect *)((int)sounds + 0x1bb70)))->SoundEffect::Load(); + ((SoundEffect *)((SoundEffect *)(GHIDRA_INT(sounds) + 0x1bb70)))->SoundEffect::Load(); loadedCount = &(*(undefined1 *)((char *)&((manager->_sfxManager)) + 0xc)); *(int *)loadedCount = *(int *)loadedCount + 1; } *(undefined1 *)((char *)sounds + 0x1bd09) = 0; } sounds = (manager->_sfxManager)._sounds._begin; - if (0x96 < ((int)(manager->_sfxManager)._sounds._end - (int)sounds) / 0x1b8) { + if (0x96 < (GHIDRA_INT((manager->_sfxManager)._sounds._end) - GHIDRA_INT(sounds)) / 0x1b8) { if (*(char *)((char *)sounds + 0x10368) == '\0') { KAGE_LogMessage(1,(byte *)"Preload sound %d.\n"); - ((SoundEffect *)((SoundEffect *)((int)sounds + 66000)))->SoundEffect::Load(); + ((SoundEffect *)((SoundEffect *)(GHIDRA_INT(sounds) + 66000)))->SoundEffect::Load(); loadedCount = &(*(undefined1 *)((char *)&((manager->_sfxManager)) + 0xc)); *(int *)loadedCount = *(int *)loadedCount + 1; } @@ -47328,10 +47328,10 @@ void Entity_Player::preload_item_sounds() } if ((*(undefined1 *)((char *)(this) + 0x13f3)) != '\0') { sounds = (manager->_sfxManager)._sounds._begin; - if (0x85 < ((int)(manager->_sfxManager)._sounds._end - (int)sounds) / 0x1b8) { + if (0x85 < (GHIDRA_INT((manager->_sfxManager)._sounds._end) - GHIDRA_INT(sounds)) / 0x1b8) { if (*(char *)((char *)sounds + 0xe630) == '\0') { KAGE_LogMessage(1,(byte *)"Preload sound %d.\n"); - ((SoundEffect *)((SoundEffect *)((int)sounds + 0xe498)))->SoundEffect::Load(); + ((SoundEffect *)((SoundEffect *)(GHIDRA_INT(sounds) + 0xe498)))->SoundEffect::Load(); loadedCount = &(*(undefined1 *)((char *)&((manager->_sfxManager)) + 0xc)); *(int *)loadedCount = *(int *)loadedCount + 1; } @@ -47340,10 +47340,10 @@ void Entity_Player::preload_item_sounds() } if ((*(undefined1 *)((char *)(this) + 0x13f2)) != '\0') { sounds = (manager->_sfxManager)._sounds._begin; - if (7 < ((int)(manager->_sfxManager)._sounds._end - (int)sounds) / 0x1b8) { + if (7 < (GHIDRA_INT((manager->_sfxManager)._sounds._end) - GHIDRA_INT(sounds)) / 0x1b8) { if (*(char *)((char *)sounds + 0xda0) == '\0') { KAGE_LogMessage(1,(byte *)"Preload sound %d.\n"); - ((SoundEffect *)((SoundEffect *)((int)sounds + 0xc08)))->SoundEffect::Load(); + ((SoundEffect *)((SoundEffect *)(GHIDRA_INT(sounds) + 0xc08)))->SoundEffect::Load(); loadedCount = &(*(undefined1 *)((char *)&((manager->_sfxManager)) + 0xc)); *(int *)loadedCount = *(int *)loadedCount + 1; } @@ -47353,10 +47353,10 @@ void Entity_Player::preload_item_sounds() isOwned = HasCollectible(this,0x9b,0); if (isOwned != 0) { sounds = (manager->_sfxManager)._sounds._begin; - if (0xed < ((int)(manager->_sfxManager)._sounds._end - (int)sounds) / 0x1b8) { + if (0xed < (GHIDRA_INT((manager->_sfxManager)._sounds._end) - GHIDRA_INT(sounds)) / 0x1b8) { if (*(char *)((char *)sounds + 0x198f0) == '\0') { KAGE_LogMessage(1,(byte *)"Preload sound %d.\n"); - ((SoundEffect *)((SoundEffect *)((int)sounds + 0x19758)))->SoundEffect::Load(); + ((SoundEffect *)((SoundEffect *)(GHIDRA_INT(sounds) + 0x19758)))->SoundEffect::Load(); loadedCount = &(*(undefined1 *)((char *)&((manager->_sfxManager)) + 0xc)); *(int *)loadedCount = *(int *)loadedCount + 1; } @@ -47364,10 +47364,10 @@ void Entity_Player::preload_item_sounds() } } sounds = (manager->_sfxManager)._sounds._begin; - if (0x37 < ((int)(manager->_sfxManager)._sounds._end - (int)sounds) / 0x1b8) { + if (0x37 < (GHIDRA_INT((manager->_sfxManager)._sounds._end) - GHIDRA_INT(sounds)) / 0x1b8) { if (*(char *)((char *)sounds + 0x6020) == '\0') { KAGE_LogMessage(1,(byte *)"Preload sound %d.\n"); - ((SoundEffect *)((SoundEffect *)((int)sounds + 0x5e88)))->SoundEffect::Load(); + ((SoundEffect *)((SoundEffect *)(GHIDRA_INT(sounds) + 0x5e88)))->SoundEffect::Load(); loadedCount = &(*(undefined1 *)((char *)&((manager->_sfxManager)) + 0xc)); *(int *)loadedCount = *(int *)loadedCount + 1; } @@ -47376,10 +47376,10 @@ void Entity_Player::preload_item_sounds() isOwned = HasCollectible(this,0x31,0); if (isOwned != 0) { sounds = (manager->_sfxManager)._sounds._begin; - if (5 < ((int)(manager->_sfxManager)._sounds._end - (int)sounds) / 0x1b8) { + if (5 < (GHIDRA_INT((manager->_sfxManager)._sounds._end) - GHIDRA_INT(sounds)) / 0x1b8) { if (*(char *)((char *)sounds + 0xa30) == '\0') { KAGE_LogMessage(1,(byte *)"Preload sound %d.\n"); - ((SoundEffect *)((SoundEffect *)((int)sounds + 0x898)))->SoundEffect::Load(); + ((SoundEffect *)((SoundEffect *)(GHIDRA_INT(sounds) + 0x898)))->SoundEffect::Load(); loadedCount = &(*(undefined1 *)((char *)&((manager->_sfxManager)) + 0xc)); *(int *)loadedCount = *(int *)loadedCount + 1; } @@ -47388,20 +47388,20 @@ void Entity_Player::preload_item_sounds() } if (this->_activeDesc[0]._item != 0) { sounds = (manager->_sfxManager)._sounds._begin; - if (0xab < ((int)(manager->_sfxManager)._sounds._end - (int)sounds) / 0x1b8) { + if (0xab < (GHIDRA_INT((manager->_sfxManager)._sounds._end) - GHIDRA_INT(sounds)) / 0x1b8) { if (*(char *)((char *)sounds + 0x12780) == '\0') { KAGE_LogMessage(1,(byte *)"Preload sound %d.\n"); - ((SoundEffect *)((SoundEffect *)((int)sounds + 0x125e8)))->SoundEffect::Load(); + ((SoundEffect *)((SoundEffect *)(GHIDRA_INT(sounds) + 0x125e8)))->SoundEffect::Load(); loadedCount = &(*(undefined1 *)((char *)&((manager->_sfxManager)) + 0xc)); *(int *)loadedCount = *(int *)loadedCount + 1; } *(undefined1 *)((char *)sounds + 0x12781) = 0; } sounds = (manager->_sfxManager)._sounds._begin; - if (0xda < ((int)(manager->_sfxManager)._sounds._end - (int)sounds) / 0x1b8) { + if (0xda < (GHIDRA_INT((manager->_sfxManager)._sounds._end) - GHIDRA_INT(sounds)) / 0x1b8) { if (*(char *)((char *)sounds + 0x17848) == '\0') { KAGE_LogMessage(1,(byte *)"Preload sound %d.\n"); - ((SoundEffect *)((SoundEffect *)((int)sounds + 0x176b0)))->SoundEffect::Load(); + ((SoundEffect *)((SoundEffect *)(GHIDRA_INT(sounds) + 0x176b0)))->SoundEffect::Load(); loadedCount = &(*(undefined1 *)((char *)&((manager->_sfxManager)) + 0xc)); *(int *)loadedCount = *(int *)loadedCount + 1; } @@ -47413,10 +47413,10 @@ void Entity_Player::preload_item_sounds() if (isOwned == 0) goto LAB_007c3e5c; } sounds = (manager->_sfxManager)._sounds._begin; - if (0xaa < ((int)(manager->_sfxManager)._sounds._end - (int)sounds) / 0x1b8) { + if (0xaa < (GHIDRA_INT((manager->_sfxManager)._sounds._end) - GHIDRA_INT(sounds)) / 0x1b8) { if (*(char *)((char *)sounds + 0x125c8) == '\0') { KAGE_LogMessage(1,(byte *)"Preload sound %d.\n"); - ((SoundEffect *)((SoundEffect *)((int)sounds + 0x12430)))->SoundEffect::Load(); + ((SoundEffect *)((SoundEffect *)(GHIDRA_INT(sounds) + 0x12430)))->SoundEffect::Load(); loadedCount = &(*(undefined1 *)((char *)&((manager->_sfxManager)) + 0xc)); *(int *)loadedCount = *(int *)loadedCount + 1; } @@ -47427,10 +47427,10 @@ LAB_007c3e5c: isOwned = HasCollectible(this,0x24,0); if (isOwned != 0) { sounds = (manager->_sfxManager)._sounds._begin; - if (0x25 < ((int)(manager->_sfxManager)._sounds._end - (int)sounds) / 0x1b8) { + if (0x25 < (GHIDRA_INT((manager->_sfxManager)._sounds._end) - GHIDRA_INT(sounds)) / 0x1b8) { if (*(char *)((char *)sounds + 0x4130) == '\0') { KAGE_LogMessage(1,(byte *)"Preload sound %d.\n"); - ((SoundEffect *)((SoundEffect *)((int)sounds + 0x3f98)))->SoundEffect::Load(); + ((SoundEffect *)((SoundEffect *)(GHIDRA_INT(sounds) + 0x3f98)))->SoundEffect::Load(); loadedCount = &(*(undefined1 *)((char *)&((manager->_sfxManager)) + 0xc)); *(int *)loadedCount = *(int *)loadedCount + 1; } @@ -47443,10 +47443,10 @@ LAB_007c3e5c: if (isOwned == 0) goto LAB_007c3f3a; } sounds = (manager->_sfxManager)._sounds._begin; - if (0x9d < ((int)(manager->_sfxManager)._sounds._end - (int)sounds) / 0x1b8) { + if (0x9d < (GHIDRA_INT((manager->_sfxManager)._sounds._end) - GHIDRA_INT(sounds)) / 0x1b8) { if (*(char *)((char *)sounds + 0x10f70) == '\0') { KAGE_LogMessage(1,(byte *)"Preload sound %d.\n"); - ((SoundEffect *)((SoundEffect *)((int)sounds + 0x10dd8)))->SoundEffect::Load(); + ((SoundEffect *)((SoundEffect *)(GHIDRA_INT(sounds) + 0x10dd8)))->SoundEffect::Load(); loadedCount = &(*(undefined1 *)((char *)&((manager->_sfxManager)) + 0xc)); *(int *)loadedCount = *(int *)loadedCount + 1; } @@ -47456,10 +47456,10 @@ LAB_007c3f3a: isOwned = HasCollectible(this,0x53,0); if (isOwned != 0) { sounds = (manager->_sfxManager)._sounds._begin; - if (0x77 < ((int)(manager->_sfxManager)._sounds._end - (int)sounds) / 0x1b8) { + if (0x77 < (GHIDRA_INT((manager->_sfxManager)._sounds._end) - GHIDRA_INT(sounds)) / 0x1b8) { if (*(char *)((char *)sounds + 0xce20) == '\0') { KAGE_LogMessage(1,(byte *)"Preload sound %d.\n"); - ((SoundEffect *)((SoundEffect *)((int)sounds + 0xcc88)))->SoundEffect::Load(); + ((SoundEffect *)((SoundEffect *)(GHIDRA_INT(sounds) + 0xcc88)))->SoundEffect::Load(); loadedCount = &(*(undefined1 *)((char *)&((manager->_sfxManager)) + 0xc)); *(int *)loadedCount = *(int *)loadedCount + 1; } @@ -47468,30 +47468,30 @@ LAB_007c3f3a: } if ((this->_pocketSlots[1] == 0) && (this->_pocketSlots[0] != 0)) { sounds = (manager->_sfxManager)._sounds._begin; - if (0x84 < ((int)(manager->_sfxManager)._sounds._end - (int)sounds) / 0x1b8) { + if (0x84 < (GHIDRA_INT((manager->_sfxManager)._sounds._end) - GHIDRA_INT(sounds)) / 0x1b8) { if (*(char *)((char *)sounds + 0xe478) == '\0') { KAGE_LogMessage(1,(byte *)"Preload sound %d.\n"); - ((SoundEffect *)((SoundEffect *)((int)sounds + 0xe2e0)))->SoundEffect::Load(); + ((SoundEffect *)((SoundEffect *)(GHIDRA_INT(sounds) + 0xe2e0)))->SoundEffect::Load(); loadedCount = &(*(undefined1 *)((char *)&((manager->_sfxManager)) + 0xc)); *(int *)loadedCount = *(int *)loadedCount + 1; } *(undefined1 *)((char *)sounds + 0xe479) = 0; } sounds = (manager->_sfxManager)._sounds._begin; - if (0x10c < ((int)(manager->_sfxManager)._sounds._end - (int)sounds) / 0x1b8) { + if (0x10c < (GHIDRA_INT((manager->_sfxManager)._sounds._end) - GHIDRA_INT(sounds)) / 0x1b8) { if (*(char *)((char *)sounds + 0x1ce38) == '\0') { KAGE_LogMessage(1,(byte *)"Preload sound %d.\n"); - ((SoundEffect *)((SoundEffect *)((int)sounds + 0x1cca0)))->SoundEffect::Load(); + ((SoundEffect *)((SoundEffect *)(GHIDRA_INT(sounds) + 0x1cca0)))->SoundEffect::Load(); loadedCount = &(*(undefined1 *)((char *)&((manager->_sfxManager)) + 0xc)); *(int *)loadedCount = *(int *)loadedCount + 1; } *(undefined1 *)((char *)sounds + 0x1ce39) = 0; } sounds = (manager->_sfxManager)._sounds._begin; - if (0x10b < ((int)(manager->_sfxManager)._sounds._end - (int)sounds) / 0x1b8) { + if (0x10b < (GHIDRA_INT((manager->_sfxManager)._sounds._end) - GHIDRA_INT(sounds)) / 0x1b8) { if (*(char *)((char *)sounds + 0x1cc80) == '\0') { KAGE_LogMessage(1,(byte *)"Preload sound %d.\n"); - ((SoundEffect *)((SoundEffect *)((int)sounds + 0x1cae8)))->SoundEffect::Load(); + ((SoundEffect *)((SoundEffect *)(GHIDRA_INT(sounds) + 0x1cae8)))->SoundEffect::Load(); loadedCount = &(*(undefined1 *)((char *)&((manager->_sfxManager)) + 0xc)); *(int *)loadedCount = *(int *)loadedCount + 1; } @@ -47713,7 +47713,7 @@ void Entity_Player::UsePill(int pillEffect, int pillColor, uint useFlags) local_14 = 0xffffffff; puStack_18 = &LAB_00afff9c; local_1c = ExceptionList; - stackCookie = __security_cookie ^ (uint)(experimentalText + 0x98); + stackCookie = __security_cookie ^ GHIDRA_UINT((experimentalText + 0x98)); ExceptionList = &local_1c; onlineStats = &g_game->_onlinePlayerStats; g_game->_bloomDuration = 0x1e; @@ -47733,11 +47733,11 @@ void Entity_Player::UsePill(int pillEffect, int pillColor, uint useFlags) useFlagsLocal = useFlags | 0x900; } } - isHorsePill = (uint)pillColor >> 0xb & 0xffffff01; + isHorsePill = GHIDRA_UINT(pillColor) >> 0xb & 0xffffff01; uVar8 = pillColor & 0x7ff; if (uVar8 == 0xe) { pvVar7 = (this->_collectibleRNGs)._begin; - rngState = (uint *)((int)pvVar7 + 0x4b0); + rngState = (uint *)(GHIDRA_INT(pvVar7) + 0x4b0); local_208 = &g_game->_itemPool; uVar9 = *rngState; if (uVar9 == 0) { @@ -47757,7 +47757,7 @@ void Entity_Player::UsePill(int pillEffect, int pillColor, uint useFlags) ((ItemPool *)(local_208))->ItemPool::on_pill_used(pillColor,uVar9,rngState); } else { - uVar12 = -(uint)(uVar8 != 0) & uVar8; + uVar12 = -GHIDRA_UINT((uVar8 != 0)) & uVar8; uVar9 = 0xe; if (uVar12 < 0xe) { uVar9 = uVar12; @@ -47766,7 +47766,7 @@ void Entity_Player::UsePill(int pillEffect, int pillColor, uint useFlags) } pillName._size = 0; pillName._capacity = 0xf; - pillName._buf._0_4_ = (float **)0x0; + (*(undefined4 *)((char *)&(pillName._buf) + 0x0)) = (float **)0x0; pillDescription._size = 0; pillDescription._capacity = 0xf; pillDescription._buf[0] = '\0'; @@ -47777,7 +47777,7 @@ void Entity_Player::UsePill(int pillEffect, int pillColor, uint useFlags) local_20c = g_manager; if ((pillEffect < 0) || (pvVar7 = (g_manager->_itemConfig)._pillEffects._begin, - (int)(g_manager->_itemConfig)._pillEffects._end - (int)pvVar7 >> 2 <= pillEffect)) { + GHIDRA_INT((g_manager->_itemConfig)._pillEffects._end) - GHIDRA_INT(pvVar7) >> 2 <= pillEffect)) { pillConfig = (Manager *)0x0; } else { @@ -47786,7 +47786,7 @@ void Entity_Player::UsePill(int pillEffect, int pillColor, uint useFlags) if (g_game->_challenge == 0x20) { if (-1 < pillEffect) { if (pillEffect < 0x32) { - rngState = (uint *)(pillEffect * 0x10 + (int)(this->_pillRNGs)._begin); + rngState = (uint *)(pillEffect * 0x10 + GHIDRA_INT((this->_pillRNGs)._begin)); uVar9 = *rngState; if (uVar9 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -47800,11 +47800,11 @@ void Entity_Player::UsePill(int pillEffect, int pillColor, uint useFlags) uVar9 = uVar9 >> ((byte)rngState[1] & 0x1f) ^ uVar9; uVar9 = uVar9 << ((byte)rngState[2] & 0x1f) ^ uVar9; local_208 = (ItemPool *)(uVar9 >> ((byte)rngState[3] & 0x1f)); - uVar9 = (uint)local_208 ^ uVar9; + uVar9 = GHIDRA_UINT(local_208) ^ uVar9; *rngState = uVar9; uVar9 = uVar9 % 0x32; pvVar7 = (local_20c->_itemConfig)._pillEffects._begin; - if ((int)(local_20c->_itemConfig)._pillEffects._end - (int)pvVar7 >> 2 <= (int)uVar9) { + if (GHIDRA_INT((local_20c->_itemConfig)._pillEffects._end) - GHIDRA_INT(pvVar7) >> 2 <= GHIDRA_INT(uVar9)) { pillConfig = (Manager *)0x0; goto LAB_007c46b3; } @@ -47816,32 +47816,32 @@ LAB_007c4477: if (&pillName != pillNameResult) { if (0xf < pillName._capacity) { uVar9 = pillName._capacity + 1; - ppfVar22 = (float **)pillName._buf._0_4_; + ppfVar22 = (*(undefined4 *)((char *)&((float **)pillName._buf) + 0x0)); if (0xfff < uVar9) { - ppfVar22 = *(float ***)(pillName._buf._0_4_ + -4); + ppfVar22 = *(float ***)((*(undefined4 *)((char *)&(pillName._buf) + 0x0)) + -4); uVar9 = pillName._capacity + 0x24; - if ((undefined1 *)0x1f < (undefined1 *)(pillName._buf._0_4_ + (-4 - (int)ppfVar22))) + if ((undefined1 *)0x1f < (undefined1 *)((*(undefined4 *)((char *)&(pillName._buf) + 0x0)) + (-4 - GHIDRA_INT(ppfVar22)))) goto LAB_007c453e; } operator_delete(ppfVar22,uVar9); } - pillName._buf._0_4_ = *(undefined4 *)pillNameResult->_buf; - pillName._buf._4_4_ = *(undefined4 *)(pillNameResult->_buf + 4); - pillName._buf._8_4_ = *(undefined4 *)(pillNameResult->_buf + 8); - pillName._buf._12_4_ = *(undefined4 *)(pillNameResult->_buf + 0xc); + (*(undefined4 *)((char *)&(pillName._buf) + 0x0)) = *(undefined4 *)pillNameResult->_buf; + (*(undefined4 *)((char *)&(pillName._buf) + 0x4)) = *(undefined4 *)(pillNameResult->_buf + 4); + (*(undefined4 *)((char *)&(pillName._buf) + 0x8)) = *(undefined4 *)(pillNameResult->_buf + 8); + (*(undefined4 *)((char *)&(pillName._buf) + 0xc)) = *(undefined4 *)(pillNameResult->_buf + 0xc); pillName._size = pillNameResult->_size; pillName._capacity = pillNameResult->_capacity; pillNameResult->_size = 0; pillNameResult->_capacity = 0xf; pillNameResult->_buf[0] = '\0'; } - if (0xf < (uint)local_ac) { - uVar9 = (int)local_ac + 1; - pvVar7 = (void *)local_c0._0_4_; + if (0xf < GHIDRA_UINT(local_ac)) { + uVar9 = GHIDRA_INT(local_ac) + 1; + pvVar7 = (*(undefined4 *)((char *)&((void *)local_c0) + 0x0)); if (0xfff < uVar9) { - pvVar7 = *(void **)(local_c0._0_4_ + -4); - uVar9 = (int)local_ac + 0x24; - if (0x1f < (uint)(local_c0._0_4_ + (-4 - (int)pvVar7))) { + pvVar7 = *(void **)((*(undefined4 *)((char *)&(local_c0) + 0x0)) + -4); + uVar9 = GHIDRA_INT(local_ac) + 0x24; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_c0) + 0x0)) + (-4 - GHIDRA_INT(pvVar7))))) { LAB_007c453e: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -47849,9 +47849,9 @@ LAB_007c453e: } operator_delete(pvVar7,uVar9); } - local_c0._16_4_ = 0; + (*(undefined4 *)((char *)&(local_c0) + 0x10)) = 0; local_ac = (undefined1 [4])0xf; - local_c0._0_4_ = local_c0._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(local_c0) + 0x0)) = (*(undefined4 *)((char *)&(local_c0) + 0x0)) & 0xffffff00; if (*(int *)&(*(undefined1 *)((char *)&((pillConfig->_persistentGameData)) + 0x1c)) == 0) { CStack_150._colorize[1] = 0.0; CStack_150._offset[2] = 2.10195e-44; @@ -47866,18 +47866,18 @@ LAB_007c453e: local_20c = *(Manager **)pillRng; if (*pbVar19 == 0x23) { local_208 = (ItemPool *)(pbVar19 + 1); - local_214 = (float)((uint)local_214 & 0xffffff); + local_214 = (float)(GHIDRA_UINT(local_214) & 0xffffff); in_stack_fffffd94 = "PocketItems"; in_stack_fffffd90 = 0x7c45e5; StringTable::get_string - (pillRng,(byte *)"PocketItems",(int)local_20c,(byte *)local_208, - (byte *)((int)&local_214 + 3)); - if (local_214._3_1_ == '\0') { + (pillRng,(byte *)"PocketItems",GHIDRA_INT(local_20c),(byte *)local_208, + (byte *)(GHIDRA_INT(&local_214) + 3)); + if ((*(undefined1 *)((char *)&(local_214) + 0x3)) == '\0') { local_216 = 0; in_stack_fffffd94 = "PocketItems"; in_stack_fffffd90 = 0x7c461e; pbVar19 = StringTable::get_string - (pillRng,(byte *)"PocketItems",(int)local_20c,(byte *)local_208, + (pillRng,(byte *)"PocketItems",GHIDRA_INT(local_20c),(byte *)local_208, &local_216); } } @@ -47890,27 +47890,27 @@ LAB_007c453e: pbVar18 = pbVar18 + 1; } while (bVar6 != 0); ((std::string *)((char *)(CStack_150._colorize + 1)))->std::string::assign(pbVar19, - (int)pbVar18 - (int)(pbVar19 + 1)); + GHIDRA_INT(pbVar18) - GHIDRA_INT((pbVar19 + 1))); } if (0xf < pillDescription._capacity) { uVar9 = pillDescription._capacity + 1; - pvVar7 = (void *)pillDescription._buf._0_4_; + pvVar7 = (*(undefined4 *)((char *)&((void *)pillDescription._buf) + 0x0)); if (0xfff < uVar9) { - pvVar7 = *(void **)(pillDescription._buf._0_4_ + -4); + pvVar7 = *(void **)((*(undefined4 *)((char *)&(pillDescription._buf) + 0x0)) + -4); uVar9 = pillDescription._capacity + 0x24; - if (0x1f < (pillDescription._buf._0_4_ - (int)pvVar7) - 4U) { + if (0x1f < ((*(undefined4 *)((char *)&(pillDescription._buf) + 0x0)) - GHIDRA_INT(pvVar7)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar7,uVar9); } - pillDescription._buf._0_4_ = CStack_150._colorize[1]; - pillDescription._buf._4_4_ = CStack_150._colorize[2]; - pillDescription._buf._8_4_ = CStack_150._colorize[3]; - pillDescription._buf._12_4_ = CStack_150._offset[0]; - pillDescription._size = (uint)CStack_150._offset[1]; - pillDescription._capacity = (uint)CStack_150._offset[2]; + (*(undefined4 *)((char *)&(pillDescription._buf) + 0x0)) = CStack_150._colorize[1]; + (*(undefined4 *)((char *)&(pillDescription._buf) + 0x4)) = CStack_150._colorize[2]; + (*(undefined4 *)((char *)&(pillDescription._buf) + 0x8)) = CStack_150._colorize[3]; + (*(undefined4 *)((char *)&(pillDescription._buf) + 0xc)) = CStack_150._offset[0]; + pillDescription._size = GHIDRA_UINT(CStack_150._offset[1]); + pillDescription._capacity = GHIDRA_UINT(CStack_150._offset[2]); } } } @@ -47921,17 +47921,17 @@ LAB_007c46b3: std::set::find_node(); pMVar21 = g_manager; if ((*(char *)((char *)local_220.y + 0xd) != '\0') || - (pfVar24 = (float *)local_220.y, 0x1d < (int)*(float *)((char *)local_220.y + 0x10))) { + (pfVar24 = (float *)local_220.y, 0x1d < GHIDRA_INT(*(float *)((char *)local_220.y + 0x10)))) { pfVar24 = (game->_seedEffects)._seedEffects; } if (pfVar24 != (game->_seedEffects)._seedEffects) { - local_214 = (float)((uint)local_214 & 0xffffff); + local_214 = (float)(GHIDRA_UINT(local_214) & 0xffffff); in_stack_fffffd94 = "PocketItems"; in_stack_fffffd90 = 0x7c472f; StringTable::get_string (&g_manager->_stringTable,(byte *)"PocketItems",*(int *)&g_manager->_stringTable, - (byte *)0xb67da9,(byte *)((int)&local_214 + 3)); - if (local_214._3_1_ == '\0') { + (byte *)0xb67da9,(byte *)(GHIDRA_INT(&local_214) + 3)); + if ((*(undefined1 *)((char *)&(local_214) + 0x3)) == '\0') { local_216 = 0; in_stack_fffffd94 = "PocketItems"; in_stack_fffffd90 = 0x7c4761; @@ -47947,11 +47947,11 @@ LAB_007c46b3: bVar6 = *pbVar19; pbVar19 = pbVar19 + 1; } while (bVar6 != 0); - ((std::string *)(pillName._buf))->std::string::assign((byte *)pcVar10,(int)pbVar19 - (int)(pcVar10 + 1)); + ((std::string *)(pillName._buf))->std::string::assign((byte *)pcVar10,GHIDRA_INT(pbVar19) - GHIDRA_INT((pcVar10 + 1))); pillDescription._size = 0; pillNameResult = &pillDescription; if (0xf < pillDescription._capacity) { - pillNameResult = (std_string *)pillDescription._buf._0_4_; + pillNameResult = (*(undefined4 *)((char *)&((std_string *)pillDescription._buf) + 0x0)); } pillNameResult->_buf[0] = '\0'; } @@ -47962,32 +47962,32 @@ LAB_007c46b3: iVar26 = 0x7c47d0; std::set::find_node(); if ((*(char *)((char *)local_220.y + 0xd) != '\0') || - (pfVar24 = (float *)local_220.y, 9 < (int)*(float *)((char *)local_220.y + 0x10))) { + (pfVar24 = (float *)local_220.y, 9 < GHIDRA_INT(*(float *)((char *)local_220.y + 0x10)))) { pfVar24 = (game->_seedEffects)._seedEffects; } if (pfVar24 != (game->_seedEffects)._seedEffects) { ((std::string *)(acStackY_308 + 0x94))->std::string::string(&pillName); puVar11 = string_scramble_seeded - (&local_d8,in_stack_fffffd8c,in_stack_fffffd90,(int)in_stack_fffffd94,iVar26 - ,(uint)ppfVar22,(uint)textCapacity); + (&local_d8,in_stack_fffffd8c,in_stack_fffffd90,GHIDRA_INT(in_stack_fffffd94),iVar26 + ,GHIDRA_UINT(ppfVar22),GHIDRA_UINT(textCapacity)); if (&pillName != (std_string *)puVar11) { if (0xf < pillName._capacity) { textCapacity = (ItemPool **)(pillName._capacity + 1); - ppfVar22 = (float **)pillName._buf._0_4_; + ppfVar22 = (*(undefined4 *)((char *)&((float **)pillName._buf) + 0x0)); if ((ItemPool **)0xfff < textCapacity) { - ppfVar22 = *(float ***)(pillName._buf._0_4_ + -4); + ppfVar22 = *(float ***)((*(undefined4 *)((char *)&(pillName._buf) + 0x0)) + -4); textCapacity = (ItemPool **)(pillName._capacity + 0x24); - if ((undefined1 *)0x1f < (undefined1 *)(pillName._buf._0_4_ + (-4 - (int)ppfVar22))) + if ((undefined1 *)0x1f < (undefined1 *)((*(undefined4 *)((char *)&(pillName._buf) + 0x0)) + (-4 - GHIDRA_INT(ppfVar22)))) goto LAB_007c48c4; } iVar26 = 0x7c4852; - operator_delete(ppfVar22,(uint)textCapacity); + operator_delete(ppfVar22,GHIDRA_UINT(textCapacity)); } - pillName._buf._0_4_ = *puVar11; - pillName._buf._4_4_ = puVar11[1]; - pillName._buf._8_4_ = puVar11[2]; - pillName._buf._12_4_ = puVar11[3]; - pillName._16_8_ = *(undefined8 *)(puVar11 + 4); + (*(undefined4 *)((char *)&(pillName._buf) + 0x0)) = *puVar11; + (*(undefined4 *)((char *)&(pillName._buf) + 0x4)) = puVar11[1]; + (*(undefined4 *)((char *)&(pillName._buf) + 0x8)) = puVar11[2]; + (*(undefined4 *)((char *)&(pillName._buf) + 0xc)) = puVar11[3]; + (*(undefined8 *)((char *)&(pillName) + 0x10)) = *(undefined8 *)(puVar11 + 4); puVar11[4] = 0; puVar11[5] = 0xf; *(undefined1 *)puVar11 = 0; @@ -47998,58 +47998,58 @@ LAB_007c46b3: if ((ItemPool **)0xfff < textCapacity) { ppfVar22 = (float **)local_d8[-1]; textCapacity = (ItemPool **)(local_c4 + 0x24); - if ((undefined1 *)0x1f < (undefined1 *)((int)local_d8 + (-4 - (int)ppfVar22))) { + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(local_d8) + (-4 - GHIDRA_INT(ppfVar22)))) { LAB_007c48c4: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } iVar26 = 0x7c48d1; - operator_delete(ppfVar22,(uint)textCapacity); + operator_delete(ppfVar22,GHIDRA_UINT(textCapacity)); } ((std::string *)(acStackY_308 + 0x94))->std::string::string(&pillDescription); pillNameResult = string_scramble_seeded (CStack_150._colorize + 1,in_stack_fffffd8c,in_stack_fffffd90, - (int)in_stack_fffffd94,iVar26,(uint)ppfVar22,(uint)textCapacity); + GHIDRA_INT(in_stack_fffffd94),iVar26,GHIDRA_UINT(ppfVar22),GHIDRA_UINT(textCapacity)); if (&pillDescription != pillNameResult) { if (0xf < pillDescription._capacity) { uVar9 = pillDescription._capacity + 1; - pvVar7 = (void *)pillDescription._buf._0_4_; + pvVar7 = (*(undefined4 *)((char *)&((void *)pillDescription._buf) + 0x0)); if (0xfff < uVar9) { - pvVar7 = *(void **)(pillDescription._buf._0_4_ + -4); + pvVar7 = *(void **)((*(undefined4 *)((char *)&(pillDescription._buf) + 0x0)) + -4); uVar9 = pillDescription._capacity + 0x24; - if (0x1f < (pillDescription._buf._0_4_ - (int)pvVar7) - 4U) goto LAB_007c49a4; + if (0x1f < ((*(undefined4 *)((char *)&(pillDescription._buf) + 0x0)) - GHIDRA_INT(pvVar7)) - 4U) goto LAB_007c49a4; } operator_delete(pvVar7,uVar9); } - pillDescription._buf._0_4_ = *(undefined4 *)pillNameResult->_buf; - pillDescription._buf._4_4_ = *(undefined4 *)(pillNameResult->_buf + 4); - pillDescription._buf._8_4_ = *(undefined4 *)(pillNameResult->_buf + 8); - pillDescription._buf._12_4_ = *(undefined4 *)(pillNameResult->_buf + 0xc); + (*(undefined4 *)((char *)&(pillDescription._buf) + 0x0)) = *(undefined4 *)pillNameResult->_buf; + (*(undefined4 *)((char *)&(pillDescription._buf) + 0x4)) = *(undefined4 *)(pillNameResult->_buf + 4); + (*(undefined4 *)((char *)&(pillDescription._buf) + 0x8)) = *(undefined4 *)(pillNameResult->_buf + 8); + (*(undefined4 *)((char *)&(pillDescription._buf) + 0xc)) = *(undefined4 *)(pillNameResult->_buf + 0xc); pillDescription._size = pillNameResult->_size; pillDescription._capacity = pillNameResult->_capacity; pillNameResult->_size = 0; pillNameResult->_capacity = 0xf; pillNameResult->_buf[0] = '\0'; } - if ((char *)0xf < (uint)CStack_150._offset[2]) { - size = (char *)((int)CStack_150._offset[2] + 1); + if ((char *)0xf < GHIDRA_UINT(CStack_150._offset[2])) { + size = (char *)(GHIDRA_INT(CStack_150._offset[2]) + 1); pcVar10 = (char *)CStack_150._colorize[1]; if ((char *)0xfff < size) { - pcVar10 = *(char **)((int)CStack_150._colorize[1] + -4); - size = (char *)((int)CStack_150._offset[2] + 0x24); - if ((char *)0x1f < (char *)((int)CStack_150._colorize[1] + (-4 - (int)pcVar10))) { + pcVar10 = *(char **)(GHIDRA_INT(CStack_150._colorize[1]) + -4); + size = (char *)(GHIDRA_INT(CStack_150._offset[2]) + 0x24); + if ((char *)0x1f < (char *)(GHIDRA_INT(CStack_150._colorize[1]) + (-4 - GHIDRA_INT(pcVar10)))) { LAB_007c49a4: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(pcVar10,(uint)size); + operator_delete(pcVar10,GHIDRA_UINT(size)); } CStack_150._offset[1] = 0.0; CStack_150._offset[2] = 2.10195e-44; - CStack_150._colorize[1] = (float)((uint)CStack_150._colorize[1] & 0xffffff00); + CStack_150._colorize[1] = (float)(GHIDRA_UINT(CStack_150._colorize[1]) & 0xffffff00); } local_230.y = (float)(useFlagsLocal & 0x800); if ((EntityPtr *)local_230.y == (EntityPtr *)0x0) { @@ -48058,19 +48058,19 @@ LAB_007c49a4: goto LAB_007c4a29; } LAB_007c4a2e: - piVar14 = (int *)((int)(this->_pillEffectUses)._begin + pillEffect * 4); + piVar14 = (int *)(GHIDRA_INT((this->_pillEffectUses)._begin) + pillEffect * 4); *piVar14 = *piVar14 + 1; if ((char)isHorsePill != '\0') { - piVar14 = (int *)((int)(this->_pillEffectUses)._begin + pillEffect * 4); + piVar14 = (int *)(GHIDRA_INT((this->_pillEffectUses)._begin) + pillEffect * 4); *piVar14 = *piVar14 + 1; } } else { LAB_007c4a29: - if ((uint)pillEffect < 0x32) goto LAB_007c4a2e; + if (GHIDRA_UINT(pillEffect) < 0x32) goto LAB_007c4a2e; } FUN_00763290(); - if (4 < *(int *)((int)(this->_pillEffectUses)._begin + 0xac)) { + if (4 < *(int *)(GHIDRA_INT((this->_pillEffectUses)._begin) + 0xac)) { ((PersistentGameData *)(&g_manager->_persistentGameData))->PersistentGameData::TryUnlock(0x182); } iVar26 = 2; @@ -48079,16 +48079,16 @@ LAB_007c4a29: iVar26 = 900; } if ((pillEffect < 0) || - ((int)(this->_pillRNGs)._end - (int)(this->_pillRNGs)._begin >> 4 <= pillEffect)) { + (GHIDRA_INT((this->_pillRNGs)._end) - GHIDRA_INT((this->_pillRNGs)._begin) >> 4 <= pillEffect)) { KAGE_LogMessage(0x10,(byte *)"Pill ID out of bounds!\n"); } pvVar7 = (this->_pillRNGs)._begin; - uVar9 = ((int)(this->_pillRNGs)._end - (int)pvVar7 >> 4) - 1; - uVar12 = -(uint)(pillEffect != 0) & pillEffect; + uVar9 = (GHIDRA_INT((this->_pillRNGs)._end) - GHIDRA_INT(pvVar7) >> 4) - 1; + uVar12 = -GHIDRA_UINT((pillEffect != 0)) & pillEffect; if (uVar12 < uVar9) { uVar9 = uVar12; } - pillRng = (RNG *)(uVar9 * 0x10 + (int)pvVar7); + pillRng = (RNG *)(uVar9 * 0x10 + GHIDRA_INT(pvVar7)); local_214 = (float)(useFlagsLocal >> 7 & 0xffffff01); uVar9 = Random(); if (((((uVar9 & 1) == 0) && (local_20c == (void *)0x0)) || (local_20c == (void *)0x2)) && @@ -48126,15 +48126,15 @@ LAB_007c4b59: iVar13 = FUN_00456540(); if (0 < iVar13) { cVar5 = '\0'; - local_214 = (float)((uint)local_214 & 0xffffff); + local_214 = (float)(GHIDRA_UINT(local_214) & 0xffffff); local_20c = (void *)0x0; if (pIVar23[2]._pools[0xf]._poolList._capacity != (void *)0x0) { do { tmpEntity = *(Entity **) - ((int)pIVar23[2]._pools[0xf]._poolList._begin + (int)local_20c * 4); + (GHIDRA_INT(pIVar23[2]._pools[0xf]._poolList._begin) + GHIDRA_INT(local_20c) * 4); if (((1 < *(int *)&g_game->_deathmatchManager) && (tmpEntity->_type == 1)) || (tmpEntity->_type - 10U < 0x3de)) { - local_ac = *(undefined1 (*) [4])((int)&tmpEntity->_flags + 4); + local_ac = *(undefined1 (*) [4])(GHIDRA_INT(&tmpEntity->_flags) + 4); if (((tmpEntity->_flags & 0x11) == 0) && ((tmpEntity->_flags & 0x20000011) == 0)) { ((EntityRef *)((EntityRef *)(local_ec + 4)))->EntityRef::constructor((Entity *)this); ((Entity *)(tmpEntity))->Entity::AddPoison((EntityRef *)(local_ec + 4),0x5a,0.0,0); @@ -48142,10 +48142,10 @@ LAB_007c4b59: cVar5 = '\x01'; } else { - cVar5 = local_214._3_1_; + cVar5 = (*(undefined1 *)((char *)&(local_214) + 0x3)); } } - local_20c = (Manager *)((int)local_20c + 1); + local_20c = (Manager *)(GHIDRA_INT(local_20c) + 1); pIVar23 = local_208; } while (local_20c < local_208[2]._pools[0xf]._poolList._capacity); if (cVar5 != '\0') { @@ -48154,7 +48154,7 @@ LAB_007c4b59: local_d8 = (float **)0x3f800000; fStack_d4 = 0.0; fStack_d0 = 1.0; - ((Game *)((Game *)((int)g_game->_room + 0x1618)))->Game::start_poop_cloud_screen_effect(color_00); + ((Game *)((Game *)(GHIDRA_INT(g_game->_room) + 0x1618)))->Game::start_poop_cloud_screen_effect(color_00); AnimatePill(this,pillColor,(byte *)"UseItem"); pMVar21 = extraout_ECX; break; @@ -48215,7 +48215,7 @@ LAB_007c4eaa: play_sound_with_fart_seed(0x25,1.0,2,0,1.0); ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::RemoveNullEffect(0,-1); puVar11 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)puVar11 & 0xfffffffcU) < 1) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(puVar11) & 0xfffffffcU)) < 1) { itemConfig = (ItemConfig_Item *)0x0; } else { @@ -48236,7 +48236,7 @@ LAB_007c4eaa: SetFullHearts(this); LAB_007c4df2: AnimateHappy(this); - play_sound_with_fart_seed((int)local_210,1.0,2,0,1.0); + play_sound_with_fart_seed(GHIDRA_INT(local_210),1.0,2,0,1.0); pMVar21 = extraout_ECX_02; break; case 6: @@ -48249,7 +48249,7 @@ LAB_007c4df2: case 7: AddMaxHearts(this,(isHorsePill & 0xff) * 2 + 2,0); AnimateHappy(this); - play_sound_with_fart_seed((int)local_210,1.0,2,0,1.0); + play_sound_with_fart_seed(GHIDRA_INT(local_210),1.0,2,0,1.0); ((Color *)((Color *)local_ec))->Color::Color(); fStack_dc = 1.0; local_d8 = (float **)0x3f000000; @@ -48263,7 +48263,7 @@ LAB_007c4df2: break; case 8: pvVar7 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar7 & 0xfffffffcU) < 9) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar7) & 0xfffffffcU)) < 9) { itemConfig = (ItemConfig_Item *)0x0; } else { @@ -48272,7 +48272,7 @@ LAB_007c4df2: if (cVar5 != '\0') { RemoveCostume(this,itemConfig); pvVar7 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar7 & 0xfffffffcU) < 0x1d9) + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar7) & 0xfffffffcU)) < 0x1d9) { itemConfig = (ItemConfig_Item *)0x0; } @@ -48287,7 +48287,7 @@ LAB_007c4df2: break; case 9: pvVar7 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar7 & 0xfffffffcU) < 5) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar7) & 0xfffffffcU)) < 5) { itemConfig = (ItemConfig_Item *)0x0; } else { @@ -48296,7 +48296,7 @@ LAB_007c4df2: if (cVar5 != '\0') { RemoveCostume(this,itemConfig); pvVar7 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar7 & 0xfffffffcU) < 0x1dd) + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar7) & 0xfffffffcU)) < 0x1dd) { itemConfig = (ItemConfig_Item *)0x0; } @@ -48325,7 +48325,7 @@ LAB_007c4df2: case 0xc: this->_cacheFlags = this->_cacheFlags | 0x1008; AnimateHappy(this); - play_sound_with_fart_seed((int)local_210,1.0,2,0,1.0); + play_sound_with_fart_seed(GHIDRA_INT(local_210),1.0,2,0,1.0); ((Color *)((Color *)local_ec))->Color::Color(); fStack_dc = 0.5; local_d8 = (float **)0x3f800000; @@ -48343,7 +48343,7 @@ LAB_007c4df2: case 0xe: this->_cacheFlags = this->_cacheFlags | 0x1010; AnimateHappy(this); - play_sound_with_fart_seed((int)local_210,1.0,2,0,1.0); + play_sound_with_fart_seed(GHIDRA_INT(local_210),1.0,2,0,1.0); ((Color *)((Color *)local_ec))->Color::Color(); fStack_dc = 1.0; local_d8 = (float **)0x3f800000; @@ -48363,7 +48363,7 @@ LAB_007c4df2: case 0x10: this->_cacheFlags = this->_cacheFlags | 0x1002; AnimateHappy(this); - play_sound_with_fart_seed((int)local_210,1.0,2,0,1.0); + play_sound_with_fart_seed(GHIDRA_INT(local_210),1.0,2,0,1.0); ((Color *)((Color *)local_ec))->Color::Color(); fStack_dc = 0.5; local_d8 = (float **)0x3f000000; @@ -48383,7 +48383,7 @@ LAB_007c4df2: case 0x12: this->_cacheFlags = this->_cacheFlags | 0x1400; AnimateHappy(this); - play_sound_with_fart_seed((int)local_210,1.0,2,0,1.0); + play_sound_with_fart_seed(GHIDRA_INT(local_210),1.0,2,0,1.0); ((Color *)((Color *)local_ec))->Color::Color(); fStack_dc = 0.0; local_d8 = (float **)0x3f800000; @@ -48407,12 +48407,12 @@ LAB_007c5622: if ((((bVar6 == 0) || (bVar6 = ((Game *)(g_game))->Game::IsGreedMode(), bVar6 != 0)) || (iVar13 != 6)) && ((bVar6 = ((Level *)((Level *)g_game))->Level::HasPhotoDoor(), bVar6 == 0 || (*(int *)(*(int *)((char *)g_game->_room + 4) + 8) != g_game->_lastBossRoomListIdx)))) { - local_20c = (Manager *)CONCAT31(local_20c._1_3_,1); + local_20c = (Manager *)CONCAT31((*(undefined1 *)((char *)&(local_20c) + 0x1)),1); } else { - local_20c = (Manager *)((uint)local_20c & 0xffffff00); + local_20c = (Manager *)(GHIDRA_UINT(local_20c) & 0xffffff00); } - uVar9 = ((RNG *)((RNG *)((int)(this->_pillRNGs)._begin + 0x130)))->RNG::Next(); + uVar9 = ((RNG *)((RNG *)(GHIDRA_INT((this->_pillRNGs)._begin) + 0x130)))->RNG::Next(); ((Game *)(g_game))->Game::MoveToRandomRoom((byte)local_20c,uVar9,this); pMVar21 = extraout_ECX_07; } @@ -48420,7 +48420,7 @@ LAB_007c5622: local_224 = (float *)0x0; local_220.x = 0.0; local_220.y = 0.0; - local_14 = CONCAT31(local_14._1_3_,2); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); local_208 = (ItemPool *)0x4; std::vector<4byte>::_Emplace_reallocate(); local_208 = (ItemPool *)0x2; @@ -48429,7 +48429,7 @@ LAB_007c5622: } else { *(float *)local_220.x = 2.8026e-45; - local_220.x = (float)((int)local_220.x + 4); + local_220.x = (float)(GHIDRA_INT(local_220.x) + 4); } local_208 = (ItemPool *)0x7; if (local_220.x == local_220.y) { @@ -48437,7 +48437,7 @@ LAB_007c5622: } else { *(float *)local_220.x = 9.80909e-45; - local_220.x = (float)((int)local_220.x + 4); + local_220.x = (float)(GHIDRA_INT(local_220.x) + 4); } local_208 = (ItemPool *)0x8; if (local_220.x == local_220.y) { @@ -48445,7 +48445,7 @@ LAB_007c5622: } else { *(float *)local_220.x = 1.12104e-44; - local_220.x = (float)((int)local_220.x + 4); + local_220.x = (float)(GHIDRA_INT(local_220.x) + 4); } local_208 = (ItemPool *)0x12; if (local_220.x == local_220.y) { @@ -48453,7 +48453,7 @@ LAB_007c5622: } else { *(float *)local_220.x = 2.52234e-44; - local_220.x = (float)((int)local_220.x + 4); + local_220.x = (float)(GHIDRA_INT(local_220.x) + 4); } local_208 = (ItemPool *)0x14; if (local_220.x == local_220.y) { @@ -48461,7 +48461,7 @@ LAB_007c5622: } else { *(float *)local_220.x = 2.8026e-44; - local_220.x = (float)((int)local_220.x + 4); + local_220.x = (float)(GHIDRA_INT(local_220.x) + 4); } local_208 = (ItemPool *)0x15; if (local_220.x == local_220.y) { @@ -48469,7 +48469,7 @@ LAB_007c5622: } else { *(float *)local_220.x = 2.94273e-44; - local_220.x = (float)((int)local_220.x + 4); + local_220.x = (float)(GHIDRA_INT(local_220.x) + 4); } local_208 = (ItemPool *)0xc; if (local_220.x == local_220.y) { @@ -48477,7 +48477,7 @@ LAB_007c5622: } else { *(float *)local_220.x = 1.68156e-44; - local_220.x = (float)((int)local_220.x + 4); + local_220.x = (float)(GHIDRA_INT(local_220.x) + 4); } local_208 = (ItemPool *)0xb; if (local_220.x == local_220.y) { @@ -48485,7 +48485,7 @@ LAB_007c5622: } else { *(float *)local_220.x = 1.54143e-44; - local_220.x = (float)((int)local_220.x + 4); + local_220.x = (float)(GHIDRA_INT(local_220.x) + 4); } local_208 = (ItemPool *)0x18; if (local_220.x == local_220.y) { @@ -48493,7 +48493,7 @@ LAB_007c5622: } else { *(float *)local_220.x = 3.36312e-44; - local_220.x = (float)((int)local_220.x + 4); + local_220.x = (float)(GHIDRA_INT(local_220.x) + 4); } local_208 = (ItemPool *)0x9; if (local_220.x == local_220.y) { @@ -48501,7 +48501,7 @@ LAB_007c5622: } else { *(float *)local_220.x = 1.26117e-44; - local_220.x = (float)((int)local_220.x + 4); + local_220.x = (float)(GHIDRA_INT(local_220.x) + 4); } local_208 = (ItemPool *)&DAT_0000000d; if (local_220.x == local_220.y) { @@ -48509,10 +48509,10 @@ LAB_007c5622: } else { *(float *)local_220.x = 1.82169e-44; - local_220.x = (float)((int)local_220.x + 4); + local_220.x = (float)(GHIDRA_INT(local_220.x) + 4); } teleport_to_random_room_of_types(this,&local_224,1); - local_14 = CONCAT31(local_14._1_3_,1); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); FID_conflict__Tidy(&local_224); pMVar21 = extraout_ECX_06; } @@ -48548,7 +48548,7 @@ LAB_007c5dc8: local_208 = (ItemPool *)(uVar9 + 1); } fVar27 = 0.0; - if (0 < (int)local_208) { + if (0 < GHIDRA_INT(local_208)) { do { local_230.y = (float)Random(); if (((char)local_214 == '\0') || (local_20c = (void *)0x2, fVar27 == 0.0)) { @@ -48556,11 +48556,11 @@ LAB_007c5dc8: } pVVar17 = Room::FindFreePickupSpawnPosition (g_game->_room,(Vector *)(local_c0 + 0x10),&this->_pos,40.0,0,0,0); - tmpEntity = ((Game *)(g_game))->Game::Spawn(5,0x5a,pVVar17,&g_vectorZero,(Entity *)this,(uint)local_20c, - (uint)local_230.y); + tmpEntity = ((Game *)(g_game))->Game::Spawn(5,0x5a,pVVar17,&g_vectorZero,(Entity *)this,GHIDRA_UINT(local_20c), + GHIDRA_UINT(local_230.y)); tmpEntity[1]._sprite._championColor._offset[2] = fVar27; - fVar27 = (float)((int)fVar27 + 1); - } while ((int)fVar27 < (int)local_208); + fVar27 = (float)(GHIDRA_INT(fVar27) + 1); + } while (GHIDRA_INT(fVar27) < GHIDRA_INT(local_208)); } AnimateHappy(this); pMVar21 = extraout_ECX_19; @@ -48592,16 +48592,16 @@ LAB_007c5dc8: if ((char)isHorsePill == '\0') { local_208 = (ItemPool *)(uVar9 + 1); } - if (0 < (int)local_208) { + if (0 < GHIDRA_INT(local_208)) { do { uVar9 = Random(); pVVar17 = Room::FindFreePickupSpawnPosition (g_game->_room,(Vector *)(local_c0 + 0x10),&this->_pos,40.0,0,0,0); - tmpEntity = ((Game *)(g_game))->Game::Spawn(5,(uint)local_230.y,pVVar17,&g_vectorZero,(Entity *)this,1, + tmpEntity = ((Game *)(g_game))->Game::Spawn(5,GHIDRA_UINT(local_230.y),pVVar17,&g_vectorZero,(Entity *)this,1, uVar9); tmpEntity[1]._sprite._championColor._offset[2] = (float)local_20c; - local_20c = (Manager *)((int)local_20c + 1); - } while ((int)local_20c < (int)local_208); + local_20c = (Manager *)(GHIDRA_INT(local_20c) + 1); + } while (GHIDRA_INT(local_20c) < GHIDRA_INT(local_208)); } LAB_007c5fcc: AnimatePill(this,pillColor,(byte *)"UseItem"); @@ -48640,8 +48640,8 @@ LAB_007c5fcc: FUN_0092df00(0x25,extraout_ECX_23,0,0); FUN_0092df00(0x25,extraout_ECX_24,0x14,0); ((Game *)(g_game))->Game::ShakeScreen(3); - piVar14[0x39] = (int)((float)piVar14[0x39] + (float)piVar14[0x39]); - piVar14[0x3a] = (int)((float)piVar14[0x3a] + (float)piVar14[0x3a]); + piVar14[0x39] = GHIDRA_INT(((float)piVar14[0x39] + (float)piVar14[0x39])); + piVar14[0x3a] = GHIDRA_INT(((float)piVar14[0x3a] + (float)piVar14[0x3a])); } (**(code **)(*piVar14 + 0xc))(); ShootCandle(this,direction_00); @@ -48650,7 +48650,7 @@ LAB_007c5fcc: if (local_208[2]._pools[0xf]._poolList._capacity != (void *)0x0) { do { pEVar15 = *(Entity_Player **) - ((int)local_208[2]._pools[0xf]._poolList._begin + (int)local_20c * 4); + (GHIDRA_INT(local_208[2]._pools[0xf]._poolList._begin) + GHIDRA_INT(local_20c) * 4); if ((pEVar15 != this) && (bVar6 = ((Entity *)((Entity *)pEVar15))->Entity::IsVulnerableEnemy((Entity *)0x0), bVar6 != 0)) { if ((char)isHorsePill == '\0') { @@ -48677,7 +48677,7 @@ LAB_007c5fcc: ((Entity *)((Entity *)pEVar15))->Entity::AddCharmed((EntityRef *)(local_ec + 4),iVar13,0,0); } LAB_007c62d0: - local_20c = (Manager *)((int)local_20c + 1); + local_20c = (Manager *)(GHIDRA_INT(local_20c) + 1); } while (local_20c < local_208[2]._pools[0xf]._poolList._capacity); } if ((char)isHorsePill == '\0') { @@ -48712,17 +48712,17 @@ LAB_007c7497: bVar25 = true; } game = g_game; - if ((local_214._3_1_ == '\0') && (!bVar25)) { + if (((*(undefined1 *)((char *)&(local_214) + 0x3)) == '\0') && (!bVar25)) { uVar9 = 0; do { - uVar16 = -(uint)((uVar9 & 0x7ff) != 0) & uVar9 & 0x7ff; + uVar16 = -GHIDRA_UINT(((uVar9 & 0x7ff) != 0)) & uVar9 & 0x7ff; uVar12 = 0xe; if (uVar16 < 0xe) { uVar12 = uVar16; } uVar9 = uVar9 + 1; *(undefined1 *)((char *)(&game->_itemPool + 1) + uVar12 + 0x3c) = 0; - } while ((int)uVar9 < 0xe); + } while (GHIDRA_INT(uVar9) < 0xe); AnimateSad(this); pMVar21 = extraout_ECX_26; break; @@ -48743,7 +48743,7 @@ LAB_007c7497: goto LAB_007c6454; case 0x1b: pvVar7 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar7 & 0xfffffffcU) < 0x19) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar7) & 0xfffffffcU)) < 0x19) { itemConfig = (ItemConfig_Item *)0x0; } else { @@ -48777,7 +48777,7 @@ LAB_007c7497: case 0x1e: play_sound_with_fart_seed(0x25,1.0,2,0,1.0); pvVar7 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar7 & 0xfffffffcU) < 0x71) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar7) & 0xfffffffcU)) < 0x71) { itemConfig = (ItemConfig_Item *)0x0; } else { @@ -48798,7 +48798,7 @@ LAB_007c548c: case 0x1f: ((Level *)((Level *)g_game))->Level::AddCurse(0x20,0); pvVar7 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar7 >> 2 < 0x157) { + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar7) >> 2 < 0x157) { itemConfig = (ItemConfig_Item *)0x0; } else { @@ -48810,7 +48810,7 @@ LAB_007c548c: local_210 = (float *)0x0; local_220.x = 0.0; local_220.y = 0.0; - local_14 = CONCAT31(local_14._1_3_,4); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),4); uVar9 = ((Level *)((Level *)g_game))->Level::filter_curses(1); pfVar24 = (float *)0x0; if (uVar9 == 0) { @@ -48861,14 +48861,14 @@ LAB_007c548c: pfVar24 = (float *)local_220.x; } } - uVar9 = (int)pfVar24 - (int)local_224 >> 2; + uVar9 = GHIDRA_INT(pfVar24) - GHIDRA_INT(local_224) >> 2; if (uVar9 != 0) { uVar9 = ((RNG *)(&g_game->_generationRNG))->RNG::RandomInt(uVar9); - ((Level *)((Level *)g_game))->Level::AddCurse((uint)local_224[uVar9],0); + ((Level *)((Level *)g_game))->Level::AddCurse(GHIDRA_UINT(local_224[uVar9]),0); } - local_14 = CONCAT31(local_14._1_3_,1); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); if (local_224 != (float *)0x0) { - deallocate(local_224,(int)local_210 - (int)local_224 >> 2); + deallocate(local_224,GHIDRA_INT(local_210) - GHIDRA_INT(local_224) >> 2); } } LAB_007c679f: @@ -48889,32 +48889,32 @@ LAB_007c679f: case 0x22: pvVar7 = g_game->_room; local_210 = (float *)0x1; - local_214 = (float)((uint)local_214 & 0xffffff); + local_214 = (float)(GHIDRA_UINT(local_214) & 0xffffff); if (1 < *(int *)((char *)pvVar7 + 0xc) + -1) { do { local_208 = (ItemPool *)0x1; pfVar24 = local_210; if (1 < *(int *)((char *)pvVar7 + 0x10) + -1) { do { - if (-1 < (int)pfVar24) { + if (-1 < GHIDRA_INT(pfVar24)) { local_20c = *(Manager **)((char *)pvVar7 + 0xc); - if ((((int)pfVar24 < (int)local_20c) && (-1 < (int)local_208)) && - ((int)local_208 < *(int *)((char *)pvVar7 + 0x10))) { - pfVar24 = (float *)((int)local_208 * (int)local_20c + (int)local_210); - if (((-1 < (int)pfVar24) && - (piVar14 = *(int **)((char *)pvVar7 + (int)pfVar24 * 4 + 0x24), + if (((GHIDRA_INT(pfVar24) < GHIDRA_INT(local_20c)) && (-1 < GHIDRA_INT(local_208))) && + (GHIDRA_INT(local_208) < *(int *)((char *)pvVar7 + 0x10))) { + pfVar24 = (float *)(GHIDRA_INT(local_208) * GHIDRA_INT(local_20c) + GHIDRA_INT(local_210)); + if (((-1 < GHIDRA_INT(pfVar24)) && + (piVar14 = *(int **)((char *)pvVar7 + GHIDRA_INT(pfVar24) * 4 + 0x24), piVar14 != (int *)0x0)) && (piVar14[1] == 0xe)) { iVar13 = piVar14[9]; iVar1 = piVar14[9]; this->_numBlueSpiders = this->_numBlueSpiders + 1; - local_230.x = (float)(iVar13 % (int)local_20c) * 40.0 + 40.0; - local_230.y = (float)(iVar1 / (int)local_20c) * 40.0 + 120.0; + local_230.x = (float)(iVar13 % GHIDRA_INT(local_20c)) * 40.0 + 40.0; + local_230.y = (float)(iVar1 / GHIDRA_INT(local_20c)) * 40.0 + 120.0; spawn_blue_spider(&local_230,(Entity *)this,&g_vectorZero); if ((char)isHorsePill != '\0') { iVar13 = piVar14[9]; iVar1 = *(int *)((char *)g_game->_room + 0xc); this->_numBlueSpiders = this->_numBlueSpiders + 1; - local_c0._16_4_ = (float)(iVar13 % iVar1) * 40.0 + 40.0; + (*(undefined4 *)((char *)&(local_c0) + 0x10)) = (float)(iVar13 % iVar1) * 40.0 + 40.0; local_ac = (undefined1 [4])((float)(iVar13 / iVar1) * 40.0 + 120.0); spawn_blue_spider((Vector *)(local_c0 + 0x10),(Entity *)this,&g_vectorZero); } @@ -48926,14 +48926,14 @@ LAB_007c679f: pfVar24 = local_210; } } - local_208 = (ItemPool *)((int)&local_208->_seed + 1); + local_208 = (ItemPool *)(GHIDRA_INT(&local_208->_seed) + 1); pvVar7 = g_game->_room; - } while ((int)local_208 < *(int *)((char *)pvVar7 + 0x10) + -1); + } while (GHIDRA_INT(local_208) < *(int *)((char *)pvVar7 + 0x10) + -1); } - local_210 = (float *)((int)pfVar24 + 1); + local_210 = (float *)(GHIDRA_INT(pfVar24) + 1); pvVar7 = g_game->_room; - } while ((int)local_210 < *(int *)((char *)pvVar7 + 0xc) + -1); - if (local_214._3_1_ != '\0') goto LAB_007c7497; + } while (GHIDRA_INT(local_210) < *(int *)((char *)pvVar7 + 0xc) + -1); + if ((*(undefined1 *)((char *)&(local_214) + 0x3)) != '\0') goto LAB_007c7497; } uVar9 = ((RNG *)(pillRng))->RNG::RandomInt(2); iVar13 = uVar9 + 1; @@ -48978,7 +48978,7 @@ LAB_007c679f: if ((char)isHorsePill != '\0') { ((Game *)(g_game))->Game::ShakeScreen(0x1e); local_230.y = (float)(g_manager->_itemConfig)._nullItems._begin; - iVar13 = (int)(g_manager->_itemConfig)._nullItems._end - (int)local_230.y >> 2; + iVar13 = GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(local_230.y) >> 2; if (iVar13 < 0x2a) { itemConfig = (ItemConfig_Item *)0x0; } @@ -49043,17 +49043,17 @@ LAB_007c679f: local_208 = (ItemPool *)0x42a00000; } uVar12 = Random(); - fVar27 = (float)((double)(int)uVar12 + __uint_to_double_fixup[-((int)uVar12 >> 0x1f)]) * + fVar27 = (float)((double)GHIDRA_INT(uVar12) + __uint_to_double_fixup[-(GHIDRA_INT(uVar12) >> 0x1f)]) * 2.3283064e-10 * (float)local_208 + 35.0; local_ac = (undefined1 [4])(fVar27 * local_230.y + (this->_pos).y); - local_c0._16_4_ = fVar27 * (float)local_20c + (this->_pos).x; + (*(undefined4 *)((char *)&(local_c0) + 0x10)) = fVar27 * (float)local_20c + (this->_pos).x; tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x5e,(Vector *)(local_c0 + 0x10),&g_vectorZero, (Entity *)this,0,uVar9); - *(uint *)&tmpEntity->_flags = (uint)tmpEntity->_flags | 0x20000000; - flagsHigh = *(undefined4 *)((int)&tmpEntity->_flags + 4); + *(uint *)&tmpEntity->_flags = GHIDRA_UINT(tmpEntity->_flags) | 0x20000000; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&tmpEntity->_flags) + 4); (tmpEntity->_sprite)._scale.x = 5.0; (tmpEntity->_sprite)._scale.y = 5.0; - *(undefined4 *)((int)&tmpEntity->_flags + 4) = flagsHigh; + *(undefined4 *)(GHIDRA_INT(&tmpEntity->_flags) + 4) = flagsHigh; if ((char)isHorsePill != '\0') { pAVar3 = &tmpEntity[1]._sprite; (pAVar3->_filename)._buf[4] = -0x7c; @@ -49068,7 +49068,7 @@ LAB_007c679f: } tmpEntity->Update(); iVar13 = iVar13 + 1; - } while (iVar13 < (int)local_210); + } while (iVar13 < GHIDRA_INT(local_210)); AnimatePill(this,pillColor,(byte *)"UseItem"); pMVar21 = extraout_ECX_40; break; @@ -49090,17 +49090,17 @@ LAB_007c679f: local_208 = (ItemPool *)0x42a00000; } uVar12 = Random(); - fVar27 = (float)((double)(int)uVar12 + __uint_to_double_fixup[-((int)uVar12 >> 0x1f)]) * + fVar27 = (float)((double)GHIDRA_INT(uVar12) + __uint_to_double_fixup[-(GHIDRA_INT(uVar12) >> 0x1f)]) * 2.3283064e-10 * (float)local_208 + 35.0; local_ac = (undefined1 [4])(fVar27 * local_230.y + (this->_pos).y); - local_c0._16_4_ = fVar27 * (float)local_20c + (this->_pos).x; + (*(undefined4 *)((char *)&(local_c0) + 0x10)) = fVar27 * (float)local_20c + (this->_pos).x; tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x2d,(Vector *)(local_c0 + 0x10),&g_vectorZero, (Entity *)this,0,uVar9); - *(uint *)&tmpEntity->_flags = (uint)tmpEntity->_flags | 0x20000000; - flagsHigh = *(undefined4 *)((int)&tmpEntity->_flags + 4); + *(uint *)&tmpEntity->_flags = GHIDRA_UINT(tmpEntity->_flags) | 0x20000000; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&tmpEntity->_flags) + 4); (tmpEntity->_sprite)._scale.x = 5.0; (tmpEntity->_sprite)._scale.y = 5.0; - *(undefined4 *)((int)&tmpEntity->_flags + 4) = flagsHigh; + *(undefined4 *)(GHIDRA_INT(&tmpEntity->_flags) + 4) = flagsHigh; if ((char)isHorsePill != '\0') { pAVar3 = &tmpEntity[1]._sprite; (pAVar3->_filename)._buf[4] = -0x7c; @@ -49115,7 +49115,7 @@ LAB_007c679f: } tmpEntity->Update(); iVar13 = iVar13 + 1; - } while (iVar13 < (int)local_210); + } while (iVar13 < GHIDRA_INT(local_210)); AnimatePill(this,pillColor,(byte *)"UseItem"); pMVar21 = extraout_ECX_41; break; @@ -49150,7 +49150,7 @@ LAB_007c679f: this->_cacheFlags = this->_cacheFlags | 0xffff; EvaluateItems(this); } - UseActiveItem(this,(short *)((int)&local_214 + 2),0x1df,1,-1,0); + UseActiveItem(this,(short *)(GHIDRA_INT(&local_214) + 2),0x1df,1,-1,0); AnimatePill(this,pillColor,(byte *)"UseItem"); pMVar21 = extraout_ECX_44; break; @@ -49159,7 +49159,7 @@ LAB_007c679f: uVar9 = Random(); pVVar17 = Isaac::GetAxisAlignedUnitVectorFromDir(&local_220,this->_headDirection); local_ac = (undefined1 [4])(pVVar17->y * 10.0 * this->_shotspeed); - local_c0._16_4_ = pVVar17->x * 10.0 * this->_shotspeed; + (*(undefined4 *)((char *)&(local_c0) + 0x10)) = pVVar17->x * 10.0 * this->_shotspeed; ((Game *)(g_game))->Game::Spawn(2,0,&this->_pos,(Vector *)(local_c0 + 0x10),(Entity *)this,0,uVar9); tear = (Entity_Tear *)__RTDynamicCast(); tear->SetCollisionDamage(); @@ -49182,21 +49182,21 @@ LAB_007c679f: local_214 = pVVar17->y; local_210 = (float *)this->_shotspeed; uVar9 = Random(); - rngFloat = (float)((double)(int)uVar9 + __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) * + rngFloat = (float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_230.y = rngFloat + rngFloat; local_208 = (ItemPool *)cos(local_230.y); local_230.y = sin(local_230.y); uVar9 = Random(); - rngFloat = (float)((double)(int)uVar9 + __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) * + rngFloat = (float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283064e-10; - local_c0._16_4_ = + (*(undefined4 *)((char *)&(local_c0) + 0x10)) = ((float)local_208 + (float)local_208) * rngFloat + fVar27 * 8.0 * (float)local_210; local_ac = (undefined1 [4]) ((local_230.y + local_230.y) * rngFloat + local_214 * 8.0 * (float)local_210); uVar9 = Random(); local_208 = (ItemPool *) - ((float)((double)(int)uVar9 + __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283064e-10 + 0.8); uVar9 = Random(); ((Game *)(g_game))->Game::Spawn(2,0,&this->_pos,(Vector *)(local_c0 + 0x10),(Entity *)this,0,uVar9); @@ -49209,7 +49209,7 @@ LAB_007c679f: tear->_fallingAccel = 0.6; uVar9 = Random(); tear->_fallingSpeed = - -9.0 - (float)((double)(int)uVar9 + __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) * + -9.0 - (float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283064e-10 * 5.0; pIVar23 = local_208; if ((float)local_208 <= 0.01) { @@ -49219,13 +49219,13 @@ LAB_007c679f: tear->_fScale = (float)pIVar23; ((Entity_Tear *)(tear))->Entity_Tear::ResetSpriteScale(); ((Color *)((Color *)local_ec))->Color::Reset(); - local_ec._0_4_ = 0.5; - local_ec._4_4_ = 0.9; + (*(undefined4 *)((char *)&(local_ec) + 0x0)) = 0.5; + (*(undefined4 *)((char *)&(local_ec) + 0x4)) = 0.9; fStack_e4 = 0.4; fStack_e0 = 1.0; tear->SetColor(); tear->Update(); - local_20c = (Manager *)((int)local_20c + -1); + local_20c = (Manager *)(GHIDRA_INT(local_20c) + -1); } while (local_20c != (Manager *)0x0); local_20c = (void *)0x0; pMVar21 = extraout_ECX_45; @@ -49233,7 +49233,7 @@ LAB_007c679f: break; case 0x2d: if (cVar5 == '\0') { - UseActiveItem(this,(short *)((int)&local_214 + 2),0x12a,1,-1,0); + UseActiveItem(this,(short *)(GHIDRA_INT(&local_214) + 2),0x12a,1,-1,0); goto LAB_007c7497; } ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddCollectibleEffect(0x5d,1,1); @@ -49265,7 +49265,7 @@ LAB_007c6454: case 0x30: this->_cacheFlags = this->_cacheFlags | 0x1004; AnimateHappy(this); - play_sound_with_fart_seed((int)local_210,1.0,2,0,1.0); + play_sound_with_fart_seed(GHIDRA_INT(local_210),1.0,2,0,1.0); ((Color *)((Color *)local_ec))->Color::Color(); fStack_dc = 1.3; local_d8 = (float **)0x3fa66666; @@ -49286,13 +49286,13 @@ LAB_007c5631: local_17c._colorize[2] = 2.24208e-44; local_17c._colorize[3] = 1.68156e-44; local_17c._offset[0] = 1.96182e-44; - local_c0._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(local_c0) + 0x0)) = (void *)0x0; local_c0[4] = '\x02'; local_c0[5] = '\0'; local_c0[6] = '\0'; local_c0[7] = '\0'; - local_c0._8_4_ = 8; - local_c0._12_8_ = 0x40000000010; + (*(undefined4 *)((char *)&(local_c0) + 0x8)) = 8; + (*(undefined8 *)((char *)&(local_c0) + 0xc)) = 0x40000000010; local_ac = (undefined1 [4])0x4; local_17c._offset[1] = 2.52234e-44; local_17c._offset[2] = 6.72623e-44; @@ -49322,14 +49322,14 @@ LAB_007c5631: local_214 = (float)CONCAT13(bVar6,(undefined3)local_214); isSkipStatDown = '\x01'; if (bVar6 != 0) { - local_214 = (float)((uint)fVar27 & 0xffffff); + local_214 = (float)(GHIDRA_UINT(fVar27) & 0xffffff); isSkipStatDown = '\0'; } } local_224 = (float *)0x0; local_220.x = 0.0; local_220.y = 0.0; - local_14 = CONCAT31(local_14._1_3_,3); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),3); std::vector::_Reallocate(); local_20c = (void *)0x0; pfVar24 = (float *)local_220.y; @@ -49340,12 +49340,12 @@ LAB_007c5631: } else { *(Manager **)local_220.x = local_20c; - local_220.x = (float)((int)local_220.x + 4); + local_220.x = (float)(GHIDRA_INT(local_220.x) + 4); } fVar27 = local_220.x; - local_20c = (Manager *)((int)local_20c + 1); + local_20c = (Manager *)(GHIDRA_INT(local_20c) + 1); } while (local_20c < (void *)0x6); - RNG::Shuffle((RNG *)((int)(this->_pillRNGs)._begin + 0x310),(int *)local_224,(int *)local_220.x) + RNG::Shuffle((RNG *)(GHIDRA_INT((this->_pillRNGs)._begin) + 0x310),(int *)local_224,(int *)local_220.x) ; if ((*local_224 == 0.0) && (bVar6 = CanUsePill(this,6), bVar6 == 0)) { *local_224 = *(float *)((char *)fVar27 + -4); @@ -49353,31 +49353,31 @@ LAB_007c5631: } pfVar24 = local_224; bVar6 = (byte)isHorsePill; - if (local_214._3_1_ == '\0') { - piVar14 = (int *)((int)(this->_pillEffectUses)._begin + - (int)local_17c._colorize[(int)local_224[1] + 1] * 4); + if ((*(undefined1 *)((char *)&(local_214) + 0x3)) == '\0') { + piVar14 = (int *)(GHIDRA_INT((this->_pillEffectUses)._begin) + + GHIDRA_INT(local_17c._colorize[GHIDRA_INT(local_224[1]) + 1]) * 4); *piVar14 = *piVar14 + 1; if (bVar6 != 0) { - piVar14 = (int *)((int)(this->_pillEffectUses)._begin + - (int)local_17c._colorize[(int)local_224[1] + 1] * 4); + piVar14 = (int *)(GHIDRA_INT((this->_pillEffectUses)._begin) + + GHIDRA_INT(local_17c._colorize[GHIDRA_INT(local_224[1]) + 1]) * 4); *piVar14 = *piVar14 + 1; } - this->_cacheFlags = this->_cacheFlags | *(uint *)(local_c0 + (int)local_224[1] * 4); + this->_cacheFlags = this->_cacheFlags | *(uint *)(local_c0 + GHIDRA_INT(local_224[1]) * 4); if (local_224[1] == 0.0) { AddMaxHearts(this,(isHorsePill & 0xff) * 2 + 2,0); bVar6 = (byte)isHorsePill; } } if (isSkipStatDown == '\0') { - piVar14 = (int *)((int)(this->_pillEffectUses)._begin + - *(int *)(local_c0 + (int)*pfVar24 * 4 + -0x18) * 4); + piVar14 = (int *)(GHIDRA_INT((this->_pillEffectUses)._begin) + + *(int *)(local_c0 + GHIDRA_INT(*pfVar24) * 4 + -0x18) * 4); *piVar14 = *piVar14 + 1; if (bVar6 != 0) { - piVar14 = (int *)((int)(this->_pillEffectUses)._begin + - *(int *)(local_c0 + (int)*pfVar24 * 4 + -0x18) * 4); + piVar14 = (int *)(GHIDRA_INT((this->_pillEffectUses)._begin) + + *(int *)(local_c0 + GHIDRA_INT(*pfVar24) * 4 + -0x18) * 4); *piVar14 = *piVar14 + 1; } - this->_cacheFlags = this->_cacheFlags | *(uint *)(local_c0 + (int)*pfVar24 * 4); + this->_cacheFlags = this->_cacheFlags | *(uint *)(local_c0 + GHIDRA_INT(*pfVar24) * 4); if (*pfVar24 == 0.0) { AddMaxHearts(this,(bVar6 ^ 1) * 2 + -4,0); TryPreventDeath(this); @@ -49385,23 +49385,23 @@ LAB_007c5631: } if ((EntityPtr *)local_230.y == (EntityPtr *)0x0) { if (isSkipStatDown == '\0') { - if (local_214._3_1_ == '\0') { - sprintf((byte *)&fStack_e0,(byte *)CStack_150._colorize[(int)pfVar24[1] + 1]); + if ((*(undefined1 *)((char *)&(local_214) + 0x3)) == '\0') { + sprintf((byte *)&fStack_e0,(byte *)CStack_150._colorize[GHIDRA_INT(pfVar24[1]) + 1]); pbVar18 = string_table_translate(&g_manager->_stringTable,(byte *)&fStack_e0); pbVar19 = pbVar18; do { bVar6 = *pbVar19; - pbVar19[(int)(experimentalText + -(int)pbVar18)] = bVar6; + pbVar19[GHIDRA_INT((experimentalText + -GHIDRA_INT(pbVar18)))] = bVar6; pbVar19 = pbVar19 + 1; } while (bVar6 != 0); puVar4 = (undefined2 *)(local_ac + 3); do { puVar20 = puVar4; - puVar4 = (undefined2 *)((int)puVar20 + 1); + puVar4 = (undefined2 *)(GHIDRA_INT(puVar20) + 1); } while (*(char *)((char *)puVar20 + 1) != '\0'); *(undefined2 *)((char *)puVar20 + 1) = 0x202c; *(undefined1 *)((char *)puVar20 + 3) = 0; - sprintf((byte *)&fStack_e0,(byte *)CStack_150._colorize[(int)*pfVar24 + 1]); + sprintf((byte *)&fStack_e0,(byte *)CStack_150._colorize[GHIDRA_INT(*pfVar24) + 1]); pbVar18 = string_table_translate(&g_manager->_stringTable,(byte *)&fStack_e0); pbVar19 = pbVar18; do { @@ -49414,12 +49414,12 @@ LAB_007c5631: copyDst = copyDst + 1; } while (*copySrc != 0); copySrc = pbVar18; - for (uVar9 = (uint)((int)pbVar19 - (int)pbVar18) >> 2; uVar9 != 0; uVar9 = uVar9 - 1) { + for (uVar9 = GHIDRA_UINT((GHIDRA_INT(pbVar19) - GHIDRA_INT(pbVar18))) >> 2; uVar9 != 0; uVar9 = uVar9 - 1) { *(undefined4 *)copyDst = *(undefined4 *)copySrc; copySrc = copySrc + 4; copyDst = copyDst + 4; } - for (uVar9 = (int)pbVar19 - (int)pbVar18 & 3; uVar9 != 0; uVar9 = uVar9 - 1) { + for (uVar9 = GHIDRA_INT(pbVar19) - GHIDRA_INT(pbVar18) & 3; uVar9 != 0; uVar9 = uVar9 - 1) { *copyDst = *copySrc; copySrc = copySrc + 1; copyDst = copyDst + 1; @@ -49427,32 +49427,32 @@ LAB_007c5631: pfVar24 = local_224; } else { - sprintf((byte *)&fStack_e0,(byte *)CStack_150._colorize[(int)*pfVar24 + 1]); + sprintf((byte *)&fStack_e0,(byte *)CStack_150._colorize[GHIDRA_INT(*pfVar24) + 1]); pbVar18 = string_table_translate(&g_manager->_stringTable,(byte *)&fStack_e0); pbVar19 = pbVar18; do { bVar6 = *pbVar19; - pbVar19[(int)(experimentalText + -(int)pbVar18)] = bVar6; + pbVar19[GHIDRA_INT((experimentalText + -GHIDRA_INT(pbVar18)))] = bVar6; pbVar19 = pbVar19 + 1; } while (bVar6 != 0); } } else { - sprintf((byte *)&fStack_e0,(byte *)CStack_150._colorize[(int)pfVar24[1] + 1]); + sprintf((byte *)&fStack_e0,(byte *)CStack_150._colorize[GHIDRA_INT(pfVar24[1]) + 1]); pbVar18 = string_table_translate(&g_manager->_stringTable,(byte *)&fStack_e0); pbVar19 = pbVar18; do { bVar6 = *pbVar19; - pbVar19[(int)(experimentalText + -(int)pbVar18)] = bVar6; + pbVar19[GHIDRA_INT((experimentalText + -GHIDRA_INT(pbVar18)))] = bVar6; pbVar19 = pbVar19 + 1; } while (bVar6 != 0); } - iVar13 = toupper((int)(char)experimentalText[0]); + iVar13 = toupper(GHIDRA_INT((char)experimentalText[0])); experimentalText[0] = (byte)iVar13; PlayerHUD::show_pill_name(); } if (isSkipStatDown == '\0') { - if (local_214._3_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_214) + 0x3)) == '\0') { AnimateHappy(this); } else { @@ -49461,16 +49461,16 @@ LAB_007c5631: } else { AnimateHappy(this); - play_sound_with_fart_seed((int)local_210,1.0,2,0,1.0); + play_sound_with_fart_seed(GHIDRA_INT(local_210),1.0,2,0,1.0); } - local_14 = CONCAT31(local_14._1_3_,1); - deallocate(pfVar24,(int)local_220.y - (int)pfVar24 >> 2); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); + deallocate(pfVar24,GHIDRA_INT(local_220.y) - GHIDRA_INT(pfVar24) >> 2); pMVar21 = extraout_ECX_18; break; default: pMVar21 = g_manager; - if ((int)(g_manager->_itemConfig)._pillEffects._end - - (int)(g_manager->_itemConfig)._pillEffects._begin >> 2 <= pillEffect) { + if (GHIDRA_INT((g_manager->_itemConfig)._pillEffects._end) - + GHIDRA_INT((g_manager->_itemConfig)._pillEffects._begin) >> 2 <= pillEffect) { KAGE_LogMessage(1,(byte *)"Pill %d Effect Not Implemented!\n"); pMVar21 = extraout_ECX_49; break; @@ -49508,8 +49508,8 @@ LAB_007c7658: (((this->_cacheFlags = this->_cacheFlags | 1, pillEffect == 0x19 || (pillEffect == 1)) || ((((pillEffect == 0x1b || ((pillEffect == 0x16 || (pillEffect == 0x1d)))) || (pillEffect == 0x1f)) || ((pillEffect == 0x25 || (pillEffect == 0x2a)))))))) { - local_c0._12_8_ = 0x30000000d; - local_c0._8_4_ = pillRng->_seed; + (*(undefined8 *)((char *)&(local_c0) + 0xc)) = 0x30000000d; + (*(undefined4 *)((char *)&(local_c0) + 0x8)) = pillRng->_seed; local_ac = (undefined1 [4])0x1b; uVar9 = ((RNG *)((RNG *)(local_c0 + 8)))->RNG::Next(); pVVar17 = Room::FindFreePickupSpawnPosition(g_game->_room,&local_220,&this->_pos,40.0,0,0,0); @@ -49520,24 +49520,24 @@ LAB_007c7658: } if (0xf < pillDescription._capacity) { uVar8 = pillDescription._capacity + 1; - pvVar7 = (void *)pillDescription._buf._0_4_; + pvVar7 = (*(undefined4 *)((char *)&((void *)pillDescription._buf) + 0x0)); if (0xfff < uVar8) { - pvVar7 = *(void **)(pillDescription._buf._0_4_ + -4); + pvVar7 = *(void **)((*(undefined4 *)((char *)&(pillDescription._buf) + 0x0)) + -4); uVar8 = pillDescription._capacity + 0x24; - if (0x1f < (pillDescription._buf._0_4_ - (int)pvVar7) - 4U) goto LAB_007c77b1; + if (0x1f < ((*(undefined4 *)((char *)&(pillDescription._buf) + 0x0)) - GHIDRA_INT(pvVar7)) - 4U) goto LAB_007c77b1; } operator_delete(pvVar7,uVar8); } pillDescription._size = 0; pillDescription._capacity = 0xf; - pillDescription._buf._0_4_ = pillDescription._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(pillDescription._buf) + 0x0)) = (*(undefined4 *)((char *)&(pillDescription._buf) + 0x0)) & 0xffffff00; if (0xf < pillName._capacity) { uVar8 = pillName._capacity + 1; - ppfVar22 = (float **)pillName._buf._0_4_; + ppfVar22 = (*(undefined4 *)((char *)&((float **)pillName._buf) + 0x0)); if (0xfff < uVar8) { - ppfVar22 = *(float ***)(pillName._buf._0_4_ + -4); + ppfVar22 = *(float ***)((*(undefined4 *)((char *)&(pillName._buf) + 0x0)) + -4); uVar8 = pillName._capacity + 0x24; - if ((undefined1 *)0x1f < (undefined1 *)(pillName._buf._0_4_ + (-4 - (int)ppfVar22))) { + if ((undefined1 *)0x1f < (undefined1 *)((*(undefined4 *)((char *)&(pillName._buf) + 0x0)) + (-4 - GHIDRA_INT(ppfVar22)))) { LAB_007c77b1: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -49646,7 +49646,7 @@ void Entity_Player::update_purity_glow(Entity_Player *player) local_8 = 0xffffffff; puStack_c = &LAB_00af6ebd; local_10 = ExceptionList; - local_14 = __security_cookie ^ (int)&costumePath + 0x28U; + local_14 = __security_cookie ^ GHIDRA_INT(&costumePath) + 0x28U; ExceptionList = &local_10; purityState = player->_purityState; if (3 < purityState) { @@ -49656,16 +49656,16 @@ void Entity_Player::update_purity_glow(Entity_Player *player) text = (&PTR_s_gfx_characters_costumes_PurityGl_00b6bb40)[purityState]; costumePath._size = 0; costumePath._capacity = 0xf; - costumePath._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(costumePath._buf) + 0x0)) = (void *)0x0; textEnd = text; do { ch = *textEnd; textEnd = textEnd + 1; } while (ch != 0); - ((std::string *)(costumePath._buf))->std::string::assign(text,(int)textEnd - (int)(text + 1)); + ((std::string *)(costumePath._buf))->std::string::assign(text,GHIDRA_INT(textEnd) - GHIDRA_INT((text + 1))); local_8 = 0; pvVar1 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar1 & 0xfffffffcU) < 0x45) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar1) & 0xfffffffcU)) < 0x45) { glowNullItem = (ItemConfig_Item *)0x0; } else { @@ -49674,11 +49674,11 @@ void Entity_Player::update_purity_glow(Entity_Player *player) ReplaceCostumeSprite(player,glowNullItem,&costumePath,0); if (0xf < costumePath._capacity) { size = costumePath._capacity + 1; - pvVar1 = (void *)costumePath._buf._0_4_; + pvVar1 = (*(undefined4 *)((char *)&((void *)costumePath._buf) + 0x0)); if (0xfff < size) { - pvVar1 = *(void **)(costumePath._buf._0_4_ + -4); + pvVar1 = *(void **)((*(undefined4 *)((char *)&(costumePath._buf) + 0x0)) + -4); size = costumePath._capacity + 0x24; - if (0x1f < (uint)(costumePath._buf._0_4_ + (-4 - (int)pvVar1))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(costumePath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -49718,7 +49718,7 @@ void Entity_Player::trigger_immaculate_conception(byte isCambion) local_8 = (void *)0xffffffff; puStack_c = &LAB_00b00025; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(cambionPath + 0xb); + local_18 = __security_cookie ^ GHIDRA_UINT((cambionPath + 0xb)); ExceptionList = &local_10; if (isCambion == 0) { iVar5 = 5; @@ -49746,18 +49746,18 @@ void Entity_Player::trigger_immaculate_conception(byte isCambion) costumePathEnd = costumePathEnd + 1; } while (bVar1 != 0); ((std::string *)((char *)immaculatePath))->std::string::assign(costumePath, - (int)costumePathEnd - (int)(costumePath + 1)); + GHIDRA_INT(costumePathEnd) - GHIDRA_INT((costumePath + 1))); local_8 = (void *)0x3; costume_path_apply_skin_color (&immaculateSkinPath,immaculatePath,iVar2,playerType,(byte *)0x0,(byte *)0x0); - local_8 = (void *)CONCAT31(local_8._1_3_,5); + local_8 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),5); if (0xf < immaculatePathCapacity) { freeSize = immaculatePathCapacity + 1; freeBlock = immaculatePath[0]; if (0xfff < freeSize) { - freeBlock = *(void **)((int)immaculatePath[0] + -4); + freeBlock = *(void **)(GHIDRA_INT(immaculatePath[0]) + -4); freeSize = immaculatePathCapacity + 0x24; - if (0x1f < (uint)((int)immaculatePath[0] + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(immaculatePath[0]) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -49766,9 +49766,9 @@ void Entity_Player::trigger_immaculate_conception(byte isCambion) } immaculatePathSize = 0; immaculatePathCapacity = 0xf; - immaculatePath[0] = (void *)((uint)immaculatePath[0] & 0xffffff00); + immaculatePath[0] = (void *)(GHIDRA_UINT(immaculatePath[0]) & 0xffffff00); freeBlock = (g_manager->_itemConfig)._collectibles._begin; - if ((int)((int)(g_manager->_itemConfig)._collectibles._end - (int)freeBlock & 0xfffffffcU) < + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(freeBlock) & 0xfffffffcU)) < 0x675) { pIVar3 = (ItemConfig_Item *)0x0; } @@ -49781,11 +49781,11 @@ void Entity_Player::trigger_immaculate_conception(byte isCambion) return; } freeSize = immaculateSkinPath._capacity + 1; - freeBlock = (void *)immaculateSkinPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)immaculateSkinPath._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(immaculateSkinPath._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(immaculateSkinPath._buf) + 0x0)) + -4); freeSize = immaculateSkinPath._capacity + 0x24; - if (0x1f < (uint)(immaculateSkinPath._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(immaculateSkinPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -49804,17 +49804,17 @@ void Entity_Player::trigger_immaculate_conception(byte isCambion) bVar1 = *costumePathEnd; costumePathEnd = costumePathEnd + 1; } while (bVar1 != 0); - ((std::string *)((char *)cambionPath))->std::string::assign(costumePath,(int)costumePathEnd - (int)(costumePath + 1)); + ((std::string *)((char *)cambionPath))->std::string::assign(costumePath,GHIDRA_INT(costumePathEnd) - GHIDRA_INT((costumePath + 1))); local_8 = (void *)0x0; costume_path_apply_skin_color(&cambionSkinPath,cambionPath,iVar5,iVar4,(byte *)0x0,(byte *)0x0); - local_8 = (void *)CONCAT31(local_8._1_3_,2); + local_8 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); if (0xf < cambionPathCapacity) { freeSize = cambionPathCapacity + 1; freeBlock = cambionPath[0]; if (0xfff < freeSize) { - freeBlock = *(void **)((int)cambionPath[0] + -4); + freeBlock = *(void **)(GHIDRA_INT(cambionPath[0]) + -4); freeSize = cambionPathCapacity + 0x24; - if (0x1f < (uint)((int)cambionPath[0] + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(cambionPath[0]) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -49823,9 +49823,9 @@ void Entity_Player::trigger_immaculate_conception(byte isCambion) } cambionPathSize = 0; cambionPathCapacity = 0xf; - cambionPath[0] = (void *)((uint)cambionPath[0] & 0xffffff00); + cambionPath[0] = (void *)(GHIDRA_UINT(cambionPath[0]) & 0xffffff00); freeBlock = (g_manager->_itemConfig)._collectibles._begin; - if ((int)((int)(g_manager->_itemConfig)._collectibles._end - (int)freeBlock & 0xfffffffcU) < + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(freeBlock) & 0xfffffffcU)) < 0x671) { pIVar3 = (ItemConfig_Item *)0x0; } @@ -49838,11 +49838,11 @@ void Entity_Player::trigger_immaculate_conception(byte isCambion) return; } freeSize = cambionSkinPath._capacity + 1; - freeBlock = (void *)cambionSkinPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)cambionSkinPath._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(cambionSkinPath._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(cambionSkinPath._buf) + 0x0)) + -4); freeSize = cambionSkinPath._capacity + 0x24; - if (0x1f < (uint)(cambionSkinPath._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(cambionSkinPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -49872,7 +49872,7 @@ void Entity_Player::AddImmaculateConceptionCounter(int param_1) uint familiarFlag; Manager *manager; - familiarFlagOptions[5] = __security_cookie ^ (uint)auStack_34; + familiarFlagOptions[5] = __security_cookie ^ GHIDRA_UINT(auStack_34); isImmaculateConceptionOwned = HasCollectible(in_ECX,0x19d,0); if (isImmaculateConceptionOwned != 0) { iVar2 = 0xf; @@ -49892,7 +49892,7 @@ void Entity_Player::AddImmaculateConceptionCounter(int param_1) in_ECX->_immaculateConceptionState = param_1; if (iVar2 <= param_1) { collectibleRngs = (in_ECX->_collectibleRNGs)._begin; - rngSeed = (uint *)((int)collectibleRngs + 0x19d0); + rngSeed = (uint *)(GHIDRA_INT(collectibleRngs) + 0x19d0); familiarFlagOptions[0] = 0x40; familiarFlagOptions[1] = 0x80; familiarFlagOptions[2] = 0x100; @@ -49918,11 +49918,11 @@ void Entity_Player::AddImmaculateConceptionCounter(int param_1) manager = g_manager; iVar2 = 0; do { - familiarFlag = familiarFlagOptions[(int)(rngResult % 5 + iVar2) % 5]; + familiarFlag = familiarFlagOptions[GHIDRA_INT((rngResult % 5 + iVar2)) % 5]; if ((in_ECX->_conceptionFamiliarFlags & familiarFlag) == 0) { local_2c.x = 1.41531e-42; seed_fart_sound_override((int *)&local_2c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_2c.x,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_2c.x),1.0,2,0,1.0,0.0); in_ECX->_conceptionFamiliarFlags = in_ECX->_conceptionFamiliarFlags | familiarFlag; in_ECX->_cacheFlags = in_ECX->_cacheFlags | 0x200; EvaluateItems(in_ECX); @@ -49988,10 +49988,10 @@ void Entity_Player::dash_impact() ExceptionList = &local_10; qVar3 = this->_flags; damageCooldown = &this->_damageCooldown; - puVar1 = (uint *)((int)&this->_flags + 4); + puVar1 = (uint *)(GHIDRA_INT(&this->_flags) + 4); *puVar1 = *puVar1 & 0xffffffef; game = g_game; - *(int *)&this->_flags = (int)qVar3; + *(int *)&this->_flags = GHIDRA_INT(qVar3); this->_marsUnkBool = 1; local_20 = 4.2039e-44; piVar5 = (int *)&local_20; @@ -50014,9 +50014,9 @@ void Entity_Player::dash_impact() local_38.x = local_20 + (this->_pos).x; local_38.y = local_18 + (this->_pos).y; ringEffect = ((Game *)(g_game))->Game::Spawn(1000,0x93,&local_38,&g_vectorZero,(Entity *)this,0,seed); - flagsHigh = *(undefined4 *)((int)&ringEffect->_flags + 4); - *(uint *)&ringEffect->_flags = (uint)ringEffect->_flags | 0x20000000; - *(undefined4 *)((int)&ringEffect->_flags + 4) = flagsHigh; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&ringEffect->_flags) + 4); + *(uint *)&ringEffect->_flags = GHIDRA_UINT(ringEffect->_flags) | 0x20000000; + *(undefined4 *)(GHIDRA_INT(&ringEffect->_flags) + 4) = flagsHigh; ((EntityRef *)(&sourceRef))->EntityRef::constructor((Entity *)this); ((Entity *)(ringEffect))->Entity::AddBurn(&sourceRef,10,0.0,0); ringEffect->Update(); @@ -50025,13 +50025,13 @@ void Entity_Player::dash_impact() iVar6 = iVar6 + 1; } while (iVar6 < 8); EntityList::QueryRadius - ((EntityList *)((int)game->_room + 0x1218),&nearbyEntities,&this->_pos,80.0,0xffffffff); + ((EntityList *)(GHIDRA_INT(game->_room) + 0x1218),&nearbyEntities,&this->_pos,80.0,0xffffffff); local_8 = 0; local_20 = 0.0; if (nearbyEntities._size != 0) { do { fVar9 = local_20; - target = *(Entity_Projectile **)((char *)nearbyEntities._data + (int)local_20 * 4); + target = *(Entity_Projectile **)((char *)nearbyEntities._data + GHIDRA_INT(local_20) * 4); if (((target->_type != 1) && (((bVar4 = ((Entity *)((Entity *)target))->Entity::IsVulnerableEnemy((Entity *)0x0), bVar4 != 0 || (target->_type == 4)) || (target->_type == 5)))) && @@ -50123,8 +50123,8 @@ void Entity_Player::dash_impact() } } } - local_20 = (float)((int)fVar9 + 1); - } while ((uint)local_20 < (uint)nearbyEntities._size); + local_20 = (float)(GHIDRA_INT(fVar9) + 1); + } while (GHIDRA_UINT(local_20) < GHIDRA_UINT(nearbyEntities._size)); } ((EntityList_Query *)(&nearbyEntities))->EntityList_Query::~EntityList_Query(); ExceptionList = local_10; @@ -50185,8 +50185,8 @@ LAB_007c8873: do { uVar4 = Random(); pEVar5 = ((Game *)(g_game))->Game::SpawnEx(3,0x2b,&this->_pos,&g_vectorZero,(Entity *)this,1,uVar4,0); - *(uint *)&pEVar5->_flags = (uint)pEVar5->_flags & 0xfffffffb; - *(undefined4 *)((int)&pEVar5->_flags + 4) = *(undefined4 *)((int)&pEVar5->_flags + 4); + *(uint *)&pEVar5->_flags = GHIDRA_UINT(pEVar5->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&pEVar5->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&pEVar5->_flags) + 4); iVar2 = iVar2 + -1; } while (iVar2 != 0); } @@ -50242,8 +50242,8 @@ LAB_007c899e: do { uVar4 = Random(); pEVar5 = ((Game *)(g_game))->Game::SpawnEx(3,0x2b,&this->_pos,&g_vectorZero,(Entity *)this,2,uVar4,0); - *(uint *)&pEVar5->_flags = (uint)pEVar5->_flags & 0xfffffffb; - *(undefined4 *)((int)&pEVar5->_flags + 4) = *(undefined4 *)((int)&pEVar5->_flags + 4); + *(uint *)&pEVar5->_flags = GHIDRA_UINT(pEVar5->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&pEVar5->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&pEVar5->_flags) + 4); iVar2 = iVar2 + -1; } while (iVar2 != 0); } @@ -50299,8 +50299,8 @@ LAB_007c8aaa: do { uVar4 = Random(); pEVar5 = ((Game *)(g_game))->Game::SpawnEx(3,0x2b,&this->_pos,&g_vectorZero,(Entity *)this,3,uVar4,0); - *(uint *)&pEVar5->_flags = (uint)pEVar5->_flags & 0xfffffffb; - *(undefined4 *)((int)&pEVar5->_flags + 4) = *(undefined4 *)((int)&pEVar5->_flags + 4); + *(uint *)&pEVar5->_flags = GHIDRA_UINT(pEVar5->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&pEVar5->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&pEVar5->_flags) + 4); iVar2 = iVar2 + -1; } while (iVar2 != 0); } @@ -50356,8 +50356,8 @@ LAB_007c8bb9: do { uVar4 = Random(); pEVar5 = ((Game *)(g_game))->Game::SpawnEx(3,0x2b,&this->_pos,&g_vectorZero,(Entity *)this,4,uVar4,0); - *(uint *)&pEVar5->_flags = (uint)pEVar5->_flags & 0xfffffffb; - *(undefined4 *)((int)&pEVar5->_flags + 4) = *(undefined4 *)((int)&pEVar5->_flags + 4); + *(uint *)&pEVar5->_flags = GHIDRA_UINT(pEVar5->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&pEVar5->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&pEVar5->_flags) + 4); iVar2 = iVar2 + -1; } while (iVar2 != 0); } @@ -50380,7 +50380,7 @@ LAB_007c8c78: } locustCount = GetTrinketMultiplier(this,0x75); trinketRngs = (this->_trinketRNGs)._begin; - conquestRngSeed = (uint *)((int)trinketRngs + 0x750); + conquestRngSeed = (uint *)(GHIDRA_INT(trinketRngs) + 0x750); iVar2 = GetTrinketMultiplier(this,0x75); uVar4 = *conquestRngSeed; if (uVar4 == 0) { @@ -50429,8 +50429,8 @@ LAB_007c8d6e: do { uVar4 = Random(); pEVar5 = ((Game *)(g_game))->Game::SpawnEx(3,0x2b,&this->_pos,&g_vectorZero,(Entity *)this,5,uVar4,0); - *(uint *)&pEVar5->_flags = (uint)pEVar5->_flags & 0xfffffffb; - *(undefined4 *)((int)&pEVar5->_flags + 4) = *(undefined4 *)((int)&pEVar5->_flags + 4); + *(uint *)&pEVar5->_flags = GHIDRA_UINT(pEVar5->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&pEVar5->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&pEVar5->_flags) + 4); locustCount = locustCount + -1; } while (locustCount != 0); } @@ -50452,7 +50452,7 @@ Entity_Laser * Entity_Player::SpawnMawOfVoid(int timeout) manager = g_manager; local_c = (EntityPtr *)0x1aa; seed_fart_sound_override(&local_c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_c,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_c),1.0,2,0,1.0,0.0); uVar1 = Random(); spawned = ((Game *)(g_game))->Game::SpawnEx(7,1,&this->_pos,&g_vectorZero,(Entity *)this,3,uVar1,0); laser = (Entity_Laser *) @@ -50470,24 +50470,24 @@ Entity_Laser * Entity_Player::SpawnMawOfVoid(int timeout) std::multiset::insert(parentRef); } laser->_renderDepthOffset = 3000.0; - uVar1 = ~(g_tearFlagGrow._l._4_4_ | g_tearFlagShrink._l._4_4_) & - *(uint *)((int)&(this->_tearFlags)._l + 4) | g_tearFlagPulse._l._4_4_; + uVar1 = ~((*(undefined4 *)((char *)&(g_tearFlagGrow._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagShrink._l) + 0x4))) & + *(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) | (*(undefined4 *)((char *)&(g_tearFlagPulse._l) + 0x4)); tearFlagsWord2 = - ~((uint)g_tearFlagGrow._h | (uint)g_tearFlagShrink._h) & (uint)(this->_tearFlags)._h | - (uint)g_tearFlagPulse._h; + ~(GHIDRA_UINT(g_tearFlagGrow._h) | GHIDRA_UINT(g_tearFlagShrink._h)) & GHIDRA_UINT((this->_tearFlags)._h) | + GHIDRA_UINT(g_tearFlagPulse._h); tearFlagsWord3 = - ~(g_tearFlagGrow._h._4_4_ | g_tearFlagShrink._h._4_4_) & - *(uint *)((int)&(this->_tearFlags)._h + 4) | g_tearFlagPulse._h._4_4_; + ~((*(undefined4 *)((char *)&(g_tearFlagGrow._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagShrink._h) + 0x4))) & + *(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) | (*(undefined4 *)((char *)&(g_tearFlagPulse._h) + 0x4)); *(uint *)&(laser->_tearFlags)._l = - ~((uint)g_tearFlagGrow._l | (uint)g_tearFlagShrink._l) & (uint)(this->_tearFlags)._l | - (uint)g_tearFlagPulse._l; - *(uint *)((int)&(laser->_tearFlags)._l + 4) = uVar1; + ~(GHIDRA_UINT(g_tearFlagGrow._l) | GHIDRA_UINT(g_tearFlagShrink._l)) & GHIDRA_UINT((this->_tearFlags)._l) | + GHIDRA_UINT(g_tearFlagPulse._l); + *(uint *)(GHIDRA_INT(&(laser->_tearFlags)._l) + 4) = uVar1; *(uint *)&(laser->_tearFlags)._h = tearFlagsWord2; - *(uint *)((int)&(laser->_tearFlags)._h + 4) = tearFlagsWord3; + *(uint *)(GHIDRA_INT(&(laser->_tearFlags)._h) + 4) = tearFlagsWord3; laser->SetCollisionDamage(this->_damage); laser->_timeout = timeout; if (laser->_spawnerEntity != (EntityPtr)0x0) { - std::multiset::erase((int)register0x00000010 + -0x10); + std::multiset::erase(GHIDRA_INT(register0x00000010) + -0x10); } laser->_spawnerEntity = (EntityPtr)this; std::multiset::insert(&laser->_spawnerEntity); @@ -50601,7 +50601,7 @@ Entity * Entity_Player::ShootRedCandle(Vector *dir) uint local_c; Manager *manager; - local_c = __security_cookie ^ (uint)&local_c0; + local_c = __security_cookie ^ GHIDRA_UINT(&local_c0); flame = (Entity *)0x0; rngResult = Random(); local_c0 = 0x3f800000; @@ -50672,7 +50672,7 @@ Entity * Entity_Player::ShootBlueCandle(Vector *dir) uint local_c; Manager *manager; - local_c = __security_cookie ^ (uint)&local_c0; + local_c = __security_cookie ^ GHIDRA_UINT(&local_c0); flame = (Entity *)0x0; rngResult = Random(); local_c0 = 0x3f800000; @@ -50753,12 +50753,12 @@ void Entity_Player::DoZitEffect(Vector *direction) undefined4 uStack_10; uint local_c; - local_c = __security_cookie ^ (uint)auStack_54; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_54); rngResult = Random(); for (creepCount = rngResult % 3 + 1; creepCount != 0; creepCount = creepCount + -1) { local_4c = (float)Random(); rngResult = Random(); - local_50 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + local_50 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10; scratchVec.x = sqrtf(direction->x * direction->x + direction->y * direction->y); if (scratchVec.x <= 0.0) { @@ -50772,7 +50772,7 @@ void Entity_Player::DoZitEffect(Vector *direction) } scratchVec.x = scratchVec.x + (zitTear->_pos).x; scratchVec.y = scratchVec.y + (zitTear->_pos).y; - ((Game *)(g_game))->Game::SpawnEx(1000,0x2c,&scratchVec,&g_vectorZero,(Entity *)zitTear,0,(uint)local_4c,0); + ((Game *)(g_game))->Game::SpawnEx(1000,0x2c,&scratchVec,&g_vectorZero,(Entity *)zitTear,0,GHIDRA_UINT(local_4c),0); } local_4c = direction->x; local_50 = direction->y; @@ -50829,7 +50829,7 @@ void Entity_Player::apply_victory_lap_penalty(uint param_1) local_8 = 0xffffffff; puStack_c = &LAB_00b0008d; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; if (g_game->_victoryLap == 2) { ExceptionList = &local_10; if (6 < in_ECX->_maxHearts) { @@ -50870,7 +50870,7 @@ void Entity_Player::apply_victory_lap_penalty(uint param_1) do { if (*(char *)((char *)historyItem + 4) == '\0') { if (itemsEnd == (undefined4 *)0x0) { - std::vector::_Emplace_reallocate(0,(undefined4 *)((int)historyItem + 8)); + std::vector::_Emplace_reallocate(0,(undefined4 *)(GHIDRA_INT(historyItem) + 8)); itemsEnd = local_3c; } else { @@ -50879,11 +50879,11 @@ void Entity_Player::apply_victory_lap_penalty(uint param_1) itemsEnd = local_3c; } } - historyItem = (void *)((int)historyItem + 0x1c); + historyItem = (void *)(GHIDRA_INT(historyItem) + 0x1c); } while (historyItem != (in_ECX->_history)._historyItems._end); local_2c = itemsEnd; } - uVar3 = (int)local_2c >> 2; + uVar3 = GHIDRA_INT(local_2c) >> 2; shuffleIndex = uVar3 - 1; if (0 < shuffleIndex) { remaining = uVar3; @@ -50910,8 +50910,8 @@ void Entity_Player::apply_victory_lap_penalty(uint param_1) *(undefined4 *)(swapIndex * 4) = swapTmp; } while (0 < shuffleIndex); } - floor((double)((float)((double)(int)(uVar3 + 1) + - __uint_to_double_fixup[-((int)(uVar3 + 1) >> 0x1f)]) * removeFraction)); + floor((double)((float)((double)GHIDRA_INT((uVar3 + 1)) + + __uint_to_double_fixup[-(GHIDRA_INT((uVar3 + 1)) >> 0x1f)]) * removeFraction)); uVar2 = __ftoui3(uVar2); if (uVar2 < uVar3) { uVar3 = uVar2; @@ -51153,8 +51153,8 @@ void Entity_Player::UpdateHeartDependentEffects() } ((ItemOverlay *)(&game->_itemOverlay))->ItemOverlay::Show(3,3,(Entity_Player *)0x0); nullItems = (g_manager->_itemConfig)._nullItems._begin; - if ((0x1b8 < (int)((int)(g_manager->_itemConfig)._nullItems._end - (int)nullItems & - 0xfffffffcU)) && (iVar3 = *(int *)((char *)nullItems + 0x1b8), iVar3 != 0)) { + if ((0x1b8 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(nullItems) & + 0xfffffffcU))) && (iVar3 = *(int *)((char *)nullItems + 0x1b8), iVar3 != 0)) { nullEffect[2] = *(undefined4 *)(iVar3 + 0x78); nullEffect[1] = 0; local_c = 0; @@ -51305,7 +51305,7 @@ void Entity_Player::BreakGoldenHearts(int count) local_14 = 0xffffffff; puStack_18 = &LAB_00b000d5; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(local_50 + 0x40); + local_24 = __security_cookie ^ GHIDRA_UINT((local_50 + 0x40)); if (count < 1) { return; } @@ -51313,7 +51313,7 @@ void Entity_Player::BreakGoldenHearts(int count) ExceptionList = &local_1c; player = this; seed_fart_sound_override((int *)&local_54); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_54,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_54),1.0,2,0,1.0,0.0); uVar4 = Random(); effect = ((Game *)(g_game))->Game::Spawn(1000,0xf,&this->_pos,&g_vectorZero,(Entity *)0x0,0,uVar4); local_2c = 0.0; @@ -51334,12 +51334,12 @@ void Entity_Player::BreakGoldenHearts(int count) if ((undefined1 *)0xfff < size) { pcVar5 = *(char **)(pcStack_3c + -4); size = local_28 + 0x24; - if ((char *)0x1f < pcStack_3c + (-4 - (int)pcVar5)) { + if ((char *)0x1f < pcStack_3c + (-4 - GHIDRA_INT(pcVar5))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(pcVar5,(uint)size); + operator_delete(pcVar5,GHIDRA_UINT(size)); } pAVar2 = local_54; animData = (effect->_sprite)._animState._animData; @@ -51354,7 +51354,7 @@ void Entity_Player::BreakGoldenHearts(int count) isLess = bVar3 < (byte)*pcVar5; if (bVar3 != *pcVar5) { LAB_007ca463: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_007ca468; } if (bVar3 == 0) break; @@ -51389,8 +51389,8 @@ LAB_007ca49c: do { local_54 = pAVar2; local_5c = (Entity *)(this->_posOffset).y; - local_50._0_4_ = 1.0; - local_50._4_4_ = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0x0)) = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = 1.0; fStack_48 = 1.0; fStack_44 = 1.0; local_30 = 0.0; @@ -51403,15 +51403,15 @@ LAB_007ca49c: uVar4 = Random(); Game::SpawnParticles (g_game,position,0x5f,10, - (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 12.0 + 8.0,(ColorMod *)local_50,(float)local_5c,0); uVar4 = Random(); piVar6 = (int *)(uVar4 % 6); - while (local_54 = (ANM2 *)((int)piVar6 + 3), local_54 != (ANM2 *)0x0) { + while (local_54 = (ANM2 *)(GHIDRA_INT(piVar6) + 3), local_54 != (ANM2 *)0x0) { Isaac::GetRandomPickupVelocity(&randomVelocity,position,0,(RNG *)0x0); uVar4 = Random(); coinVelocity.y = - (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 0.66 + 0.33; coinVelocity.x = randomVelocity.x * coinVelocity.y; coinVelocity.y = randomVelocity.y * coinVelocity.y; @@ -51425,7 +51425,7 @@ LAB_007ca49c: pAVar2 = (ANM2 *)0x0; } while (count != 0); EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),&nearbyEnemies,position,80.0,8); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&nearbyEnemies,position,80.0,8); uVar4 = 0; local_14 = 1; if (nearbyEnemies._size != 0) { @@ -51444,8 +51444,8 @@ LAB_007ca49c: pcStack_3c = (char *)0x0; fStack_38 = 0.0; fStack_34 = 0.0; - local_50._0_4_ = 1.0; - local_50._4_4_ = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0x0)) = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = 1.0; fStack_48 = 1.0; fStack_44 = 1.0; local_2c = 0.9; @@ -51455,22 +51455,22 @@ LAB_007ca49c: self = player; } uVar4 = uVar4 + 1; - } while (uVar4 < (uint)nearbyEnemies._size); + } while (uVar4 < GHIDRA_UINT(nearbyEnemies._size)); } - if (nearbyEnemies._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(nearbyEnemies) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (nearbyEnemies._data != (void *)0x0) { uVar4 = *(uint *)((char *)nearbyEnemies._data + -4); qVar1 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar4; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar4; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar1 < uVar4); - free((void *)((int)nearbyEnemies._data + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar4)); + free((void *)(GHIDRA_INT(nearbyEnemies._data) + -4)); } } ExceptionList = local_1c; @@ -51524,7 +51524,7 @@ void Entity_Player::AddBoneHearts(int amount) if (amount < 1) { return; } - AddBlueFlies(this,amount * 4,(Vector *)((int)this + 0x33c),(Entity *)0x0); + AddBlueFlies(this,amount * 4,(Vector *)(GHIDRA_INT(this) + 0x33c),(Entity *)0x0); return; } if (extraout_EDX != 0x11) break; @@ -51708,12 +51708,12 @@ void Entity_Player::update_bone_hearts() uVar3 = uVar3 & ~(1 << (uVar4 & 0x1f)); } uVar4 = uVar4 + 1; - bit = bit << 1 | (uint)((int)bit < 0); - } while ((int)uVar4 < iVar2); + bit = bit << 1 | GHIDRA_UINT((GHIDRA_INT(bit) < 0)); + } while (GHIDRA_INT(uVar4) < iVar2); this->_boneHeartsMask = uVar3; } uVar3 = iVar2 - 1; - if (-1 < (int)uVar3) { + if (-1 < GHIDRA_INT(uVar3)) { topShift = (byte)uVar3 & 0x1f; uVar4 = 1 << topShift | 1U >> 0x20 - topShift; do { @@ -51724,9 +51724,9 @@ void Entity_Player::update_bone_hearts() iVar1 = iVar1 + -1; this->_boneHeartsMask = this->_boneHeartsMask | 1 << (uVar3 & 0x1f); } - uVar4 = uVar4 >> 1 | (uint)((uVar4 & 1) != 0) << 0x1f; + uVar4 = uVar4 >> 1 | GHIDRA_UINT(((uVar4 & 1) != 0)) << 0x1f; uVar3 = uVar3 - 1; - } while (-1 < (int)uVar3); + } while (-1 < GHIDRA_INT(uVar3)); } } return; @@ -51872,7 +51872,7 @@ LAB_007caefe: return gulletHearts; } gulletHearts = GetGreedsGulletHearts(this); - iVar2 = (uint)(iVar2 != 0x21) * 2 + 4 + gulletHearts * 2; + iVar2 = GHIDRA_UINT((iVar2 != 0x21)) * 2 + 4 + gulletHearts * 2; gulletHearts = 0x18; if (iVar2 < 0x18) { gulletHearts = iVar2; @@ -51975,7 +51975,7 @@ void Entity_Player::apply_coop_baby_spawn_bonus() case 0x3a: linkedPlayer = (EntityPtr)GetMainPlayer(this); seed = Random(); - pEVar2 = ((Game *)(g_game))->Game::Spawn(1000,0x72,(Vector *)((int)linkedPlayer + 0x33c),&g_vectorZero, + pEVar2 = ((Game *)(g_game))->Game::Spawn(1000,0x72,(Vector *)(GHIDRA_INT(linkedPlayer) + 0x33c),&g_vectorZero, (Entity *)0x0,0,seed); if (pEVar2->_child != (EntityPtr)0x0) { local_8 = (Entity_Player *)&pEVar2->_child; @@ -52043,7 +52043,7 @@ int Entity_Player::GetTrinketMultiplier(uint type) RNG roomRng; undefined4 local_8; - local_8 = __security_cookie ^ (int)register0x00000010 - 4U; + local_8 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; player = this; if (this->_variant == 1) { do { @@ -52070,7 +52070,7 @@ int Entity_Player::GetTrinketMultiplier(uint type) if ((g_game->_dailyChallenge)._specialDailyId == 0x1c) { uVar3 = 0; do { - if (trinketId == *(uint *)((int)&DAT_00b6bad0 + uVar3)) { + if (trinketId == *(uint *)(GHIDRA_INT(&DAT_00b6bad0) + uVar3)) { multiplier = multiplier + 1; break; } @@ -52081,7 +52081,7 @@ int Entity_Player::GetTrinketMultiplier(uint type) iVar4 = GetTrinketMultiplier(player,0x15); if (0 < iVar4) { uVar3 = g_game->_frameCount & 0x80000003; - if ((int)uVar3 < 0) { + if (GHIDRA_INT(uVar3) < 0) { uVar3 = (uVar3 - 1 | 0xfffffffc) + 1; } if ((trinketId == 0x30) && ((uVar3 == 2 || ((1 < iVar4 && (uVar3 == 3)))))) { @@ -52089,7 +52089,7 @@ int Entity_Player::GetTrinketMultiplier(uint type) } } iVar4 = GetTrinketMultiplier(player,0x40); - if ((0 < iVar4) && (trinketId == (&DAT_00b6bad0)[(uint)(g_game->_frameCount / 0x5a) % 10])) { + if ((0 < iVar4) && (trinketId == (&DAT_00b6bad0)[GHIDRA_UINT((g_game->_frameCount / 0x5a)) % 10])) { multiplier = multiplier + iVar4; } iVar4 = GetTrinketMultiplier(player,0x4b); @@ -52149,12 +52149,12 @@ LAB_007cb8d8: multiplier = iVar4 + 2; } pvVar1 = (player->_smeltedTrinkets)._begin; - if (trinketId < (uint)((int)(player->_smeltedTrinkets)._end - (int)pvVar1 >> 2)) { + if (trinketId < GHIDRA_UINT((GHIDRA_INT((player->_smeltedTrinkets)._end) - GHIDRA_INT(pvVar1) >> 2))) { multiplier = *(short *)((char *)pvVar1 + trinketId * 4) + multiplier + *(short *)((char *)pvVar1 + trinketId * 4 + 2) * 2; } pvVar1 = (player->_extraTrinketCounts)._begin; - if ((int)trinketId < (int)(player->_extraTrinketCounts)._end - (int)pvVar1) { + if (GHIDRA_INT(trinketId) < GHIDRA_INT((player->_extraTrinketCounts)._end) - GHIDRA_INT(pvVar1)) { cVar2 = *(char *)((char *)pvVar1 + trinketId); } else { @@ -52233,9 +52233,9 @@ LAB_007cbaf4: } else { playerConfig = (g_manager->_entityConfig)._players._begin; - if (((int)(g_manager->_entityConfig)._players._end - (int)playerConfig) / 0x148 <= + if ((GHIDRA_INT((g_manager->_entityConfig)._players._end) - GHIDRA_INT(playerConfig)) / 0x148 <= this->_playerType) goto LAB_007cbaf2; - playerConfig = (void *)(this->_playerType * 0x148 + (int)playerConfig); + playerConfig = (void *)(this->_playerType * 0x148 + GHIDRA_INT(playerConfig)); if (playerConfig == (void *)0x0) goto LAB_007cbaf4; } if ((isChallengeCanShoot == 0) || (*(char *)((char *)playerConfig + 0xd0) == '\0')) { @@ -52365,7 +52365,7 @@ void Entity_Player::init_forgotten_twin() local_8 = (int *)0xffffffff; puStack_c = &LAB_00b00117; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(&poofColor)[1]._colorize; + local_14 = __security_cookie ^ GHIDRA_UINT((&poofColor)[1]._colorize); ExceptionList = &local_10; if (-1 < this->_playerIndex) { if ((this->_playerType == 0x10) || (this->_playerType == 0x11)) { @@ -52383,7 +52383,7 @@ void Entity_Player::init_forgotten_twin() subPlayer = extraout_EAX_00; } local_8 = (int *)0xffffffff; - this->_subPlayer = (int)subPlayer; + this->_subPlayer = GHIDRA_INT(subPlayer); (**(code **)(*subPlayer + 4)) (this->_type,this->_variant,(this->_playerType == 0x10) + '\x10',this->_initSeed ); @@ -52418,7 +52418,7 @@ void Entity_Player::init_forgotten_twin() (this->_playerType != 0x27)) { seed = Random(); darkEsau = this->_darkEsau; - darkEsauPos.x = ((Vector *)((int)darkEsau + 0x33c))->x; + darkEsauPos.x = ((Vector *)(GHIDRA_INT(darkEsau) + 0x33c))->x; darkEsauPos.y = *(float *)((char *)darkEsau + 0x340); ((Game *)(g_game))->Game::Spawn(1000,0xf,&darkEsauPos,&g_vectorZero,(Entity *)darkEsau,0,seed); ((Color *)(&poofColor))->Color::Color(); @@ -52471,7 +52471,7 @@ Entity * Entity_Player::spawn_forgotten_body() } uVar10 = this->_forgottenBodyRoomIdx; bodyDimension = 0; - if (-1 < (int)uVar10) { + if (-1 < GHIDRA_INT(uVar10)) { bodyDimension = uVar10 / 0xa9; uVar10 = uVar10 % 0xa9; } @@ -52518,8 +52518,8 @@ Entity * Entity_Player::spawn_forgotten_body() (body->_sprite)._color._offset[1] = (float)uVar7; (body->_sprite)._color._offset[2] = *(float *)&(*(undefined1 *)((char *)(this) + 0x1708)); } - *(uint *)&body->_flags = (uint)body->_flags & 0xfffffffb; - *(undefined4 *)((int)&body->_flags + 4) = *(undefined4 *)((int)&body->_flags + 4); + *(uint *)&body->_flags = GHIDRA_UINT(body->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&body->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&body->_flags) + 4); if (*bodySlot != (void *)0x0) { pEStack_14 = (EntityPtr *)bodySlot; std::multiset::erase(&pEStack_14); @@ -52626,7 +52626,7 @@ byte Entity_Player::SwapForgottenForm(byte isForce, byte isNoEffects) ehState = -NAN; puStack_18 = &LAB_00b00140; savedExceptionList = ExceptionList; - swapDwordTmp = __security_cookie ^ (uint)((&colorMod)[1]._colorize + 1); + swapDwordTmp = __security_cookie ^ GHIDRA_UINT(((&colorMod)[1]._colorize + 1)); iVar9 = this->_subPlayer; if (iVar9 == 0) { return 0; @@ -52674,7 +52674,7 @@ LAB_007cc270: if (*ppvVar8 != (int *)0x0) { (**(code **)(*(int *)*ppvVar8 + 0x14))(swapDwordTmp); } - local_5c = (ItemConfig_Item *)((int)&local_5c[-1]._initCharge + 3); + local_5c = (ItemConfig_Item *)(GHIDRA_INT(&local_5c[-1]._initCharge) + 3); } while (local_5c != (ItemConfig_Item *)0x0); iVar9 = this->_redHearts; this->_redHearts = *(int *)(this->_subPlayer + 0x1344); @@ -52726,8 +52726,8 @@ LAB_007cc270: if ((this != effectsOwner) && (swapByte != &(*(undefined1 *)((char *)(this) + 0x1401)))) { do { swapByteTmp = *swapByte; - *swapByte = swapByte[(int)effectsOwner - (int)this]; - swapByte[(int)effectsOwner - (int)this] = swapByteTmp; + *swapByte = swapByte[GHIDRA_INT(effectsOwner) - GHIDRA_INT(this)]; + swapByte[GHIDRA_INT(effectsOwner) - GHIDRA_INT(this)] = swapByteTmp; swapByte = swapByte + 1; } while (swapByte != &(*(undefined1 *)((char *)(this) + 0x1401))); effectsOwner = (Entity_Player *)local_70->_subPlayer; @@ -52736,7 +52736,7 @@ LAB_007cc270: ppvVar8 = this->_weapons + 1; if ((ppvVar8 != effectsOwner->_weapons + 1) && (local_54 = (ItemConfig_Item *)&(*(undefined1 *)((char *)(this) + 0x13f0)), (ItemConfig_Item *)ppvVar8 != local_54)) { - iVar9 = (int)(effectsOwner->_weapons + 1) - (int)ppvVar8; + iVar9 = GHIDRA_INT((effectsOwner->_weapons + 1)) - GHIDRA_INT(ppvVar8); do { pvVar1 = *ppvVar8; *ppvVar8 = *(void **)((char *)ppvVar8 + iVar9); @@ -52745,16 +52745,16 @@ LAB_007cc270: } while ((ItemConfig_Item *)ppvVar8 != local_54); } if (this->_weapons[1] != (void *)0x0) { - *(Entity_Player **)((int)this->_weapons[1] + 4) = this; + *(Entity_Player **)(GHIDRA_INT(this->_weapons[1]) + 4) = this; } if (this->_weapons[2] != (void *)0x0) { - *(Entity_Player **)((int)this->_weapons[2] + 4) = this; + *(Entity_Player **)(GHIDRA_INT(this->_weapons[2]) + 4) = this; } if (this->_weapons[3] != (void *)0x0) { - *(Entity_Player **)((int)this->_weapons[3] + 4) = this; + *(Entity_Player **)(GHIDRA_INT(this->_weapons[3]) + 4) = this; } if (this->_weapons[4] != (void *)0x0) { - *(Entity_Player **)((int)this->_weapons[4] + 4) = this; + *(Entity_Player **)(GHIDRA_INT(this->_weapons[4]) + 4) = this; } if (this->_playerType == 0x11) { if ((isNoEffects == 0) || (this->_forgottenBody == (void *)0x0)) { @@ -52782,7 +52782,7 @@ LAB_007cc270: spriteColor._colorize[1] = (this->_sprite)._color._colorize[1]; spriteColor._colorize[2] = (this->_sprite)._color._colorize[2]; spriteColor._colorize[3] = (this->_sprite)._color._colorize[3]; - spriteColor._offset._0_8_ = *(undefined8 *)(this->_sprite)._color._offset; + (*(undefined8 *)((char *)&(spriteColor._offset) + 0x0)) = *(undefined8 *)(this->_sprite)._color._offset; ((Color *)(&spriteColor))->Color::__mul(&colorMod); colorMod._tint[0] = spriteColor._tint[0]; colorMod._tint[1] = spriteColor._tint[1]; @@ -52802,19 +52802,19 @@ LAB_007cc270: swapDwordTmp = this->_forgottenBodyRoomIdx; local_5c = (ItemConfig_Item *)0x0; uVar10 = swapDwordTmp; - if (-1 < (int)swapDwordTmp) { + if (-1 < GHIDRA_INT(swapDwordTmp)) { local_5c = (ItemConfig_Item *)(swapDwordTmp / 0xa9); uVar10 = swapDwordTmp % 0xa9; swapDwordTmp = this->_forgottenBodyRoomIdx; } if (((this->_forgottenBody == (void *)0x0) && (swapDwordTmp != 0xfffe7961)) && - (bodyRoom = ((Level *)((Level *)g_game))->Level::GetRoomByIdx(uVar10,(int)local_5c), + (bodyRoom = ((Level *)((Level *)g_game))->Level::GetRoomByIdx(uVar10,GHIDRA_INT(local_5c)), bodyRoom != *(RoomDescriptor **)((char *)g_game->_room + 4))) { bVar2 = HasCollectible(this,0x26b,0); game = g_game; if (bVar2 == 0) goto LAB_007cc74d; g_game->_leaveDoor = -1; - Game::StartRoomTransition(game,uVar10,-1,0x11,this,(int)local_5c); + Game::StartRoomTransition(game,uVar10,-1,0x11,this,GHIDRA_INT(local_5c)); this->_forgottenBodyRoomIdx = -99999; } else { @@ -52844,18 +52844,18 @@ LAB_007cc74d: fVar11 = sqrtf(local_78 * local_78 + (float)local_74 * (float)local_74); local_54 = (ItemConfig_Item *)(fVar11 / 20.0); dVar12 = floor((double)(float)local_54); - local_54 = (ItemConfig_Item *)(int)dVar12; + local_54 = (ItemConfig_Item *)GHIDRA_INT(dVar12); minTrailCountPtr = &local_5c; - if (3 < (int)dVar12) { + if (3 < GHIDRA_INT(dVar12)) { minTrailCountPtr = &local_54; } trailCountPtr = &local_84; - if ((int)*minTrailCountPtr < 0xd) { + if (GHIDRA_INT(*minTrailCountPtr) < 0xd) { trailCountPtr = minTrailCountPtr; } trailCount = *trailCountPtr; - if (0 < (int)trailCount) { - local_74 = (ItemConfig_Item *)(float)(int)((int)&trailCount->type + 1); + if (0 < GHIDRA_INT(trailCount)) { + local_74 = (ItemConfig_Item *)(float)GHIDRA_INT((GHIDRA_INT(&trailCount->type) + 1)); trailIndex = 0; do { trailIndex = trailIndex + 1; @@ -52868,23 +52868,23 @@ LAB_007cc74d: (*(float *)((char *)this->_forgottenBody + 0x340) - local_88) * (float)local_5c; swapDwordTmp = Random(); - fVar11 = (float)((double)(int)swapDwordTmp + __uint_to_double_fixup[-((int)swapDwordTmp >> 0x1f)]) * + fVar11 = (float)((double)GHIDRA_INT(swapDwordTmp) + __uint_to_double_fixup[-(GHIDRA_INT(swapDwordTmp) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_84 = (ItemConfig_Item *)(fVar11 + fVar11); angleSin = sin((float)local_84); swapDwordTmp = Random(); local_54 = (ItemConfig_Item *) - ((float)((double)(int)swapDwordTmp + __uint_to_double_fixup[-((int)swapDwordTmp >> 0x1f)] + ((float)((double)GHIDRA_INT(swapDwordTmp) + __uint_to_double_fixup[-(GHIDRA_INT(swapDwordTmp) >> 0x1f)] ) * 2.3283064e-10); fVar11 = cos((float)local_84); VStack_64.x = fVar11 * (float)local_54 * 15.0 + trailX; VStack_64.y = local_88 + (float)local_54 * angleSin * 15.0; swapDwordTmp = Random(); uVar10 = Random(); - local_94 = (float)((double)(int)uVar10 + - __uint_to_double_fixup[-((int)uVar10 >> 0x1f)]) * 2.3283064e-10 * + local_94 = (float)((double)GHIDRA_INT(uVar10) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar10) >> 0x1f)]) * 2.3283064e-10 * 0.5 + 0.5; - local_a0._8_4_ = poofVelocity.x * local_94; + (*(undefined4 *)((char *)&(local_a0) + 0x8)) = poofVelocity.x * local_94; local_94 = poofVelocity.y * local_94; spawnedEffect = ((Game *)(g_game))->Game::SpawnEx(1000,0x6f,&VStack_64,(Vector *)(local_a0 + 8),(Entity *)0x0, @@ -52904,7 +52904,7 @@ LAB_007cc74d: local_88 = (float)local_5c * g_vectorOne.x; local_5c = (ItemConfig_Item *)((float)local_5c * g_vectorOne.y); swapDwordTmp = Random(); - fVar11 = (float)((double)(int)swapDwordTmp + __uint_to_double_fixup[-((int)swapDwordTmp >> 0x1f)]) * + fVar11 = (float)((double)GHIDRA_INT(swapDwordTmp) + __uint_to_double_fixup[-(GHIDRA_INT(swapDwordTmp) >> 0x1f)]) * 2.3283064e-10 * 0.3 + 0.3; (spawnedEffect->_sprite)._scale.y = fVar11 * (float)local_5c; (spawnedEffect->_sprite)._scale.x = fVar11 * local_88; @@ -52912,7 +52912,7 @@ LAB_007cc74d: posOffsetY = (this->_posOffset).y; (spawnedEffect->_posOffset).x = (this->_posOffset).x + 0.0; (spawnedEffect->_posOffset).y = fVar11 * -16.0 + posOffsetY; - } while (trailIndex < (int)trailCount); + } while (trailIndex < GHIDRA_INT(trailCount)); } } swapDwordTmp = Random(); @@ -52927,23 +52927,23 @@ LAB_007cc74d: VStack_64.x = *(float *)((char *)pvVar1 + 0x33c); VStack_64.y = *(float *)((char *)pvVar1 + 0x340); EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)local_a0, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)local_a0, &VStack_64,*(float *)((char *)pvVar1 + 0x370) + 25.0,2); fVar11 = 0.0; if (local_94 != 0.0) { do { - iVar9 = *(int *)(local_a0._4_4_ + (int)fVar11 * 4); + iVar9 = *(int *)((*(undefined4 *)((char *)&(local_a0) + 0x4)) + GHIDRA_INT(fVar11) * 4); if ((*(char *)(iVar9 + 0x173) == '\0') && (-50.0 < *(float *)(iVar9 + 0x410))) { *(undefined4 *)(iVar9 + 0x438) = 0; *(undefined4 *)(iVar9 + 0x43c) = 0; *(undefined1 *)(iVar9 + 0x173) = 1; } - fVar11 = (float)((int)fVar11 + 1); - } while ((uint)fVar11 < (uint)local_94); + fVar11 = (float)(GHIDRA_INT(fVar11) + 1); + } while (GHIDRA_UINT(fVar11) < GHIDRA_UINT(local_94)); } if (local_a0[0] == '\0') { ehState = 0.0; - tracked_alloc(1,(void *)local_a0._4_4_,0); + tracked_alloc(1,(*(undefined4 *)((char *)&((void *)local_a0) + 0x4)),0); ehState = -NAN; } } @@ -52962,7 +52962,7 @@ LAB_007cc74d: } this->ResetColor(); if (isNoEffects == 0) { - spriteColor._offset._0_8_ = *(undefined8 *)(this->_sprite)._color._offset; + (*(undefined8 *)((char *)&(spriteColor._offset) + 0x0)) = *(undefined8 *)(this->_sprite)._color._offset; colorMod._tint[0] = (this->_sprite)._color._tint[0] * 1.0; colorMod._tint[1] = (this->_sprite)._color._tint[1] * 1.0; colorMod._tint[2] = (this->_sprite)._color._tint[2] * 1.0; @@ -52987,12 +52987,12 @@ LAB_007cc74d: if ((((iVar9 == 1) || (iVar9 == 3)) || (iVar9 == 4)) && (*(int *)(*piVar5 + 4) == 0x7a)) { local_74 = (ItemConfig_Item *)piVar5[1]; pIVar4 = local_74; - if (0 < (int)local_74) { + if (0 < GHIDRA_INT(local_74)) { local_5c = local_74; do { pvVar1 = (g_manager->_itemConfig)._collectibles._begin; - if ((0x1e8 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar1 & - 0xfffffffcU)) && + if ((0x1e8 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar1) & + 0xfffffffcU))) && (pIVar4 = *(ItemConfig_Item **)((char *)pvVar1 + 0x1e8), pIVar4 != (ItemConfig_Item *)0x0)) { VStack_64.x = (float)pIVar4->maxCooldown; @@ -53001,7 +53001,7 @@ LAB_007cc74d: effectEntryItem = pIVar4; ((TemporaryEffects *)(tempEffects))->TemporaryEffects::RemoveEffect(&effectEntryItem,1); } - local_5c = (ItemConfig_Item *)((int)&local_5c[-1]._initCharge + 3); + local_5c = (ItemConfig_Item *)(GHIDRA_INT(&local_5c[-1]._initCharge) + 3); } while (local_5c != (ItemConfig_Item *)0x0); local_5c = (ItemConfig_Item *)0x0; pIVar4 = local_74; @@ -53012,7 +53012,7 @@ LAB_007cc74d: } pIVar4 = (ItemConfig_Item *)0x0; LAB_007ccdf8: - local_54 = (ItemConfig_Item *)((int)&pIVar4[-1]._initCharge + 3); + local_54 = (ItemConfig_Item *)(GHIDRA_INT(&pIVar4[-1]._initCharge) + 3); if (local_55 == 0) { local_54 = pIVar4; } @@ -53038,7 +53038,7 @@ LAB_007ccdf8: } } pvVar1 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar1 & 0xfffffffcU) < 0x1e9) + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar1) & 0xfffffffcU)) < 0x1e9) { local_5c = (ItemConfig_Item *)0x0; } @@ -53051,7 +53051,7 @@ LAB_007ccdf8: LAB_007ccf4a: if (((this->_redHearts < 2) && (pvVar1 = (g_manager->_itemConfig)._collectibles._begin, - 0x1e8 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar1 & 0xfffffffcU)) + 0x1e8 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar1) & 0xfffffffcU))) ) && (pIVar4 = *(ItemConfig_Item **)((char *)pvVar1 + 0x1e8), pIVar4 != (ItemConfig_Item *)0x0) ) { VStack_64.x = (float)pIVar4->maxCooldown; @@ -53063,12 +53063,12 @@ LAB_007ccf4a: } LAB_007ccfa0: effectsOwner = this; - if (0 < (int)local_54) { + if (0 < GHIDRA_INT(local_54)) { pIVar4 = local_54; do { pvVar1 = (g_manager->_itemConfig)._collectibles._begin; - if (0x1e8 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar1 & 0xfffffffcU - )) { + if (0x1e8 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar1) & 0xfffffffcU + ))) { local_5c = *(ItemConfig_Item **)((char *)pvVar1 + 0x1e8); if (local_5c != (ItemConfig_Item *)0x0) { local_74 = (ItemConfig_Item *)local_5c->maxCooldown; @@ -53102,11 +53102,11 @@ LAB_007ccfa0: effect[2] = local_74; effect[3] = 0; ppvVar8 = &(this->_temporaryeffects)._effects._end; - *ppvVar8 = (void *)((int)*ppvVar8 + 0x10); + *ppvVar8 = (void *)(GHIDRA_INT(*ppvVar8) + 0x10); } local_54 = (this->_temporaryeffects)._effects._end; pvVar1 = (this->_temporaryeffects)._effects._begin; - *(undefined4 *)((((int)local_54 - (int)pvVar1 & 0xfffffff0U) - 0xc) + (int)pvVar1) = 1; + *(undefined4 *)(((GHIDRA_INT(local_54) - GHIDRA_INT(pvVar1) & 0xfffffff0U) - 0xc) + GHIDRA_INT(pvVar1)) = 1; effectsOwner = (this->_temporaryeffects)._player; effectEntryItem = local_5c; if (effectsOwner != (Entity_Player *)0x0) { @@ -53119,12 +53119,12 @@ LAB_007cd080: } } } - pIVar4 = (ItemConfig_Item *)((int)&pIVar4[-1]._initCharge + 3); + pIVar4 = (ItemConfig_Item *)(GHIDRA_INT(&pIVar4[-1]._initCharge) + 3); } while (pIVar4 != (ItemConfig_Item *)0x0); effectsOwner = local_70; } pvVar1 = (g_manager->_itemConfig)._collectibles._begin; - if ((0x664 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar1 & 0xfffffffcU)) + if ((0x664 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar1) & 0xfffffffcU))) && (pIVar4 = *(ItemConfig_Item **)((char *)pvVar1 + 0x664), pIVar4 != (ItemConfig_Item *)0x0)) { VStack_64.x = (float)pIVar4->maxCooldown; effectEntryCount = 0; @@ -53143,7 +53143,7 @@ LAB_007cd080: } } pvVar1 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar1 & 0xfffffffcU) < 0x49) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar1) & 0xfffffffcU)) < 0x49) { pIVar4 = (ItemConfig_Item *)0x0; } else { @@ -53152,8 +53152,8 @@ LAB_007cd080: RemoveCostume(effectsOwner,pIVar4); if (effectsOwner->_redHearts < 1) { pvVar1 = (g_manager->_itemConfig)._collectibles._begin; - if (0x664 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar1 & 0xfffffffcU - )) { + if (0x664 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar1) & 0xfffffffcU + ))) { local_54 = *(ItemConfig_Item **)((char *)pvVar1 + 0x664); if (local_54 != (ItemConfig_Item *)0x0) { local_74 = (ItemConfig_Item *)local_54->maxCooldown; @@ -53187,11 +53187,11 @@ LAB_007cd080: effect[2] = local_74; effect[3] = 0; ppvVar8 = &(this->_temporaryeffects)._effects._end; - *ppvVar8 = (void *)((int)*ppvVar8 + 0x10); + *ppvVar8 = (void *)(GHIDRA_INT(*ppvVar8) + 0x10); } local_70 = (this->_temporaryeffects)._effects._end; pvVar1 = (this->_temporaryeffects)._effects._begin; - *(undefined4 *)((((int)local_70 - (int)pvVar1 & 0xfffffff0U) - 0xc) + (int)pvVar1) = 1; + *(undefined4 *)(((GHIDRA_INT(local_70) - GHIDRA_INT(pvVar1) & 0xfffffff0U) - 0xc) + GHIDRA_INT(pvVar1)) = 1; effectsOwner = (this->_temporaryeffects)._player; effectEntryItem = local_54; if (effectsOwner != (Entity_Player *)0x0) { @@ -53205,7 +53205,7 @@ LAB_007cd242: } } pvVar1 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar1 & 0xfffffffcU) < 0x49) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar1) & 0xfffffffcU)) < 0x49) { pIVar4 = (ItemConfig_Item *)0x0; } else { @@ -53241,8 +53241,8 @@ LAB_007cd27a: } } pvVar1 = (g_manager->_itemConfig)._collectibles._begin; - if (0x67c < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar1 & - 0xfffffffcU)) { + if (0x67c < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar1) & + 0xfffffffcU))) { local_54 = *(ItemConfig_Item **)((char *)pvVar1 + 0x67c); if (local_54 != (ItemConfig_Item *)0x0) { local_74 = (ItemConfig_Item *)local_54->maxCooldown; @@ -53276,11 +53276,11 @@ LAB_007cd27a: effect[2] = local_74; effect[3] = 0; ppvVar8 = &(this->_temporaryeffects)._effects._end; - *ppvVar8 = (void *)((int)*ppvVar8 + 0x10); + *ppvVar8 = (void *)(GHIDRA_INT(*ppvVar8) + 0x10); } local_70 = (this->_temporaryeffects)._effects._end; pvVar1 = (this->_temporaryeffects)._effects._begin; - *(undefined4 *)((((int)local_70 - (int)pvVar1 & 0xfffffff0U) - 0xc) + (int)pvVar1) = 1 + *(undefined4 *)(((GHIDRA_INT(local_70) - GHIDRA_INT(pvVar1) & 0xfffffff0U) - 0xc) + GHIDRA_INT(pvVar1)) = 1 ; effectsOwner = (this->_temporaryeffects)._player; effectEntryItem = local_54; @@ -53305,7 +53305,7 @@ LAB_007cd3ef: isLess = bVar2 < (byte)*expectedChar; if (bVar2 != *expectedChar) { LAB_007cd434: - swapDwordTmp = -(uint)isLess | 1; + swapDwordTmp = -GHIDRA_UINT(isLess) | 1; goto LAB_007cd439; } if (bVar2 == 0) break; @@ -53318,7 +53318,7 @@ LAB_007cd434: swapDwordTmp = 0; LAB_007cd439: if (swapDwordTmp == 0) { - if ((*(char *)((int)(effectsOwner->_crownOfLightSprite)._animState._animData + 0x34) != '\0') + if ((*(char *)(GHIDRA_INT((effectsOwner->_crownOfLightSprite)._animState._animData) + 0x34) != '\0') && ((effectsOwner->_crownOfLightSprite)._animState._isPlaying == 0)) { crownAnim = 0x100b6ae50; goto LAB_007cd57d; @@ -53336,8 +53336,8 @@ LAB_007cd439: iVar9 = *(int *)*piVar5; if ((((iVar9 == 1) || (iVar9 == 3)) || (iVar9 == 4)) && (*(int *)(*piVar5 + 4) == 0x19f)) { pvVar1 = (g_manager->_itemConfig)._collectibles._begin; - if ((0x67c < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar1 & - 0xfffffffcU)) && + if ((0x67c < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar1) & + 0xfffffffcU))) && (pIVar4 = *(ItemConfig_Item **)((char *)pvVar1 + 0x67c), pIVar4 != (ItemConfig_Item *)0x0) ) { VStack_64.x = (float)pIVar4->maxCooldown; @@ -53370,7 +53370,7 @@ LAB_007cd860: isLess = bVar2 < (byte)*expectedChar; if (bVar2 != *expectedChar) { LAB_007cd880: - swapDwordTmp = -(uint)isLess | 1; + swapDwordTmp = -GHIDRA_UINT(isLess) | 1; goto LAB_007cd885; } if (bVar2 == 0) break; @@ -53396,7 +53396,7 @@ LAB_007cd530: isLess = bVar2 < (byte)*expectedChar; if (bVar2 != *expectedChar) { LAB_007cd550: - swapDwordTmp = -(uint)isLess | 1; + swapDwordTmp = -GHIDRA_UINT(isLess) | 1; goto LAB_007cd555; } if (bVar2 == 0) break; @@ -53404,7 +53404,7 @@ LAB_007cd550: swapDwordTmp = 0; LAB_007cd555: if ((swapDwordTmp != 0) || - ((*(char *)((int)(effectsOwner->_crownOfLightSprite)._animState._animData + 0x34) != '\0' && + ((*(char *)(GHIDRA_INT((effectsOwner->_crownOfLightSprite)._animState._animData) + 0x34) != '\0' && ((effectsOwner->_crownOfLightSprite)._animState._isPlaying == 0)))) { LAB_007cd576: crownAnim = 0x100b6ae44; @@ -53433,7 +53433,7 @@ LAB_007cd657: } } pvVar1 = (g_manager->_itemConfig)._collectibles._begin; - if (0x6e8 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar1 & 0xfffffffcU)) + if (0x6e8 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar1) & 0xfffffffcU))) { local_54 = *(ItemConfig_Item **)((char *)pvVar1 + 0x6e8); if (local_54 != (ItemConfig_Item *)0x0) { @@ -53468,11 +53468,11 @@ LAB_007cd657: effect[2] = local_74; effect[3] = 0; ppvVar8 = &(tempEffects->_effects)._end; - *ppvVar8 = (void *)((int)*ppvVar8 + 0x10); + *ppvVar8 = (void *)(GHIDRA_INT(*ppvVar8) + 0x10); } local_70 = (tempEffects->_effects)._end; pvVar1 = (tempEffects->_effects)._begin; - *(undefined4 *)((((int)local_70 - (int)pvVar1 & 0xfffffff0U) - 0xc) + (int)pvVar1) = 1; + *(undefined4 *)(((GHIDRA_INT(local_70) - GHIDRA_INT(pvVar1) & 0xfffffff0U) - 0xc) + GHIDRA_INT(pvVar1)) = 1; effectEntryItem = local_54; if (tempEffects->_player != (Entity_Player *)0x0) { effectEntryItem = local_54; @@ -53500,7 +53500,7 @@ LAB_007cd7e4: isLess = bVar2 < (byte)*expectedChar; if (bVar2 != *expectedChar) { LAB_007cd7b4: - swapDwordTmp = -(uint)isLess | 1; + swapDwordTmp = -GHIDRA_UINT(isLess) | 1; goto LAB_007cd7b9; } if (bVar2 == 0) break; @@ -53535,8 +53535,8 @@ LAB_007cd606: iVar9 = *(int *)*piVar5; if ((((iVar9 == 1) || (iVar9 == 3)) || (iVar9 == 4)) && (((int *)*piVar5)[1] == 0x1ba)) { pvVar1 = (g_manager->_itemConfig)._collectibles._begin; - if ((0x6e8 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar1 & - 0xfffffffcU)) && (iVar9 = *(int *)((char *)pvVar1 + 0x6e8), iVar9 != 0)) { + if ((0x6e8 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar1) & + 0xfffffffcU))) && (iVar9 = *(int *)((char *)pvVar1 + 0x6e8), iVar9 != 0)) { local_78 = *(float *)(iVar9 + 0x78); crownEffectKey[1] = 0; local_74 = (ItemConfig_Item *)0x0; @@ -53618,7 +53618,7 @@ byte Entity_Player::CanRerollCollectible(int id, byte unk) isBlocked = false; challengeParams = ((Manager *)(manager))->Manager::GetChallengeParams(g_game->_challenge); challengeItemIter = (challengeParams->_collectibleList)._begin; - challengeItem = (int)(challengeParams->_collectibleList)._end - (int)challengeItemIter >> 2; + challengeItem = GHIDRA_INT((challengeParams->_collectibleList)._end) - GHIDRA_INT(challengeItemIter) >> 2; if (challengeItem != 0) { do { challengeItem = *challengeItemIter; @@ -53734,7 +53734,7 @@ void Entity_Player::update_greeds_gullet() } healthPlayer->_isUpdatingGreedsGullet = 1; sVar4 = this->_greedsGulletHearts; - iVar1 = (int)sVar4; + iVar1 = GHIDRA_INT(sVar4); this->_isUpdatingGreedsGullet = 1; iVar2 = GetHealthType(healthPlayer); switch(iVar2) { @@ -53784,7 +53784,7 @@ switchD_007ce498_caseD_2: } } iVar1 = GetGreedsGulletHearts(this); - iVar2 = (int)this->_greedsGulletHearts; + iVar2 = GHIDRA_INT(this->_greedsGulletHearts); if ((iVar1 != iVar2) || (0 < this->_greedsGulletOverflow)) { if ((1 < *(int *)&g_game->_deathmatchManager) && ((iVar2 < iVar1 && (this->_greedsGulletRedHearts < iVar1)))) { @@ -53883,7 +53883,7 @@ void Entity_Player::ChangePlayerType(int playerType, byte unk) local_8 = (Entity_Player *)0xffffffff; puStack_c = &LAB_00b001ff; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(animName + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((animName + 10)); if (playerType < 0) { return; } @@ -53902,11 +53902,11 @@ LAB_007cea0f: } uVar8 = 0; if (((this->_playerType == 0x12) && - (local_38.y = (float)this->_effectiveSoulCharge, 0 < (int)local_38.y)) && (unk == 0)) { + (local_38.y = (float)this->_effectiveSoulCharge, 0 < GHIDRA_INT(local_38.y))) && (unk == 0)) { iVar11 = 0; iVar5 = iVar11; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { pEVar3 = ((Game *)(g_game))->Game::GetPlayer(uVar8); iVar11 = iVar5 + 1; @@ -53915,10 +53915,10 @@ LAB_007cea0f: } uVar8 = uVar8 + 1; iVar5 = iVar11; - } while (uVar8 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (uVar8 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); } - uVar8 = (int)local_38.y / iVar11; + uVar8 = GHIDRA_INT(local_38.y) / iVar11; if (uVar8 == 0) { uVar8 = 1; } @@ -53928,7 +53928,7 @@ LAB_007cea0f: if (oldPlayerType == 0xb) { oldPlayerType = 0xb; local_38.y = (float)(g_manager->_entityConfig)._players._begin; - if ((8 < ((int)(g_manager->_entityConfig)._players._end - (int)local_38.y) / 0x148) && + if ((8 < (GHIDRA_INT((g_manager->_entityConfig)._players._end) - GHIDRA_INT(local_38.y)) / 0x148) && ((void *)local_38.y != (void *)0xfffff5c0)) { oldPlayerType = 0xb; if (*(int *)((char *)local_38.y + 0xaec) != -1) { @@ -53939,7 +53939,7 @@ LAB_007cea0f: } } this->_playerType = playerType; - if (0 < (int)uVar8) { + if (0 < GHIDRA_INT(uVar8)) { AddSoulCharge(this,-uVar8); AddSoulHearts(this,uVar8,0); } @@ -53951,11 +53951,11 @@ LAB_007cea0f: Teleport(this,&local_38,0,0); } oldFlags = this->_flags; - flagsHigh = (uint *)((int)&this->_flags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&this->_flags) + 4); *flagsHigh = *flagsHigh & 0xfbffffff; (this->_posOffset).y = 0.0; this->_heightVelocity = 0.0; - *(int *)&this->_flags = (int)oldFlags; + *(int *)&this->_flags = GHIDRA_INT(oldFlags); } pEVar3 = (Entity_Player *)GetHealthType(this); local_40 = this->_subPlayer; @@ -54018,7 +54018,7 @@ LAB_007ceb8b: if (this->_brokenHearts < 2) { pfVar4 = (float *)&this->_brokenHearts; } - this->_brokenHearts = (int)*pfVar4; + this->_brokenHearts = GHIDRA_INT(*pfVar4); AddMaxHearts(this,4,0); this->_rottenHearts = 0; this->_boneHeartsMask = 0; @@ -54042,10 +54042,10 @@ LAB_007ceb81: local_38.y = (float)GetEffectiveMaxHearts(this); piVar7 = &this->_redHearts; pfVar4 = &local_38.y; - if (*piVar7 <= (int)local_38.y) { + if (*piVar7 <= GHIDRA_INT(local_38.y)) { pfVar4 = (float *)piVar7; } - *piVar7 = (int)*pfVar4; + *piVar7 = GHIDRA_INT(*pfVar4); goto LAB_007ceb81; } } @@ -54065,18 +54065,18 @@ LAB_007cecd9: local_3c = InitTwin(this,0x14); InitPostLevelInitStats(local_3c); heartRng._shift3 = 0x17; - heartRng._seed = *(uint *)((int)(this->_collectibleRNGs)._begin + 0x1e20); + heartRng._seed = *(uint *)(GHIDRA_INT((this->_collectibleRNGs)._begin) + 0x1e20); heartRng._shift1 = 8; heartRng._shift2 = 9; uVar9 = (this->_maxHearts + 1) / 2; uVar8 = uVar9 & 0x80000001; - if ((int)uVar8 < 0) { + if (GHIDRA_INT(uVar8) < 0) { uVar8 = (uVar8 - 1 | 0xfffffffe) + 1; } uVar8 = ((RNG *)(&heartRng))->RNG::RandomInt(uVar8 + 1); - uVar8 = (uVar8 + (int)uVar9 / 2) * 2; + uVar8 = (uVar8 + GHIDRA_INT(uVar9) / 2) * 2; uVar9 = this->_boneHearts & 0x80000001; - if ((int)uVar9 < 0) { + if (GHIDRA_INT(uVar9) < 0) { uVar9 = (uVar9 - 1 | 0xfffffffe) + 1; } local_40 = uVar8; @@ -54085,11 +54085,11 @@ LAB_007cecd9: iVar11 = uVar8 + local_50 * 2; uVar8 = this->_redHearts; uVar9 = uVar8 & 0x80000001; - if ((int)uVar9 < 0) { + if (GHIDRA_INT(uVar9) < 0) { uVar9 = (uVar9 - 1 | 0xfffffffe) + 1; } uVar9 = ((RNG *)(&heartRng))->RNG::RandomInt(uVar9 + 1); - twinRedHearts = uVar9 + (int)uVar8 / 2; + twinRedHearts = uVar9 + GHIDRA_INT(uVar8) / 2; if (iVar11 < twinRedHearts) { twinRedHearts = iVar11; } @@ -54102,11 +54102,11 @@ LAB_007cecd9: } twinRedHearts = twinRedHearts + iVar11; uVar8 = uVar9 & 0x80000001; - if ((int)uVar8 < 0) { + if (GHIDRA_INT(uVar8) < 0) { uVar8 = (uVar8 - 1 | 0xfffffffe) + 1; } uVar8 = ((RNG *)(&heartRng))->RNG::RandomInt(uVar8 + 1); - iVar11 = uVar8 + (int)uVar9 / 2; + iVar11 = uVar8 + GHIDRA_INT(uVar9) / 2; twinRottenHearts = (twinRedHearts + 1) / 2; if (iVar11 < twinRottenHearts) { twinRottenHearts = iVar11; @@ -54118,13 +54118,13 @@ LAB_007cecd9: } twinRottenHearts = twinRottenHearts + iVar11; uVar8 = this->_soulHearts & 0x80000001; - if ((int)uVar8 < 0) { + if (GHIDRA_INT(uVar8) < 0) { uVar8 = (uVar8 - 1 | 0xfffffffe) + 1; } uVar8 = ((RNG *)(&heartRng))->RNG::RandomInt(uVar8 + 1); local_44 = (float)(uVar8 + this->_soulHearts / 2); uVar8 = this->_goldenHearts & 0x80000001; - if ((int)uVar8 < 0) { + if (GHIDRA_INT(uVar8) < 0) { uVar8 = (uVar8 - 1 | 0xfffffffe) + 1; } uVar8 = ((RNG *)(&heartRng))->RNG::RandomInt(uVar8 + 1); @@ -54133,16 +54133,16 @@ LAB_007cecd9: local_3c->_maxHearts = local_40; AddBoneHearts(local_3c,local_50); iVar11 = twinRedHearts; - pEVar3->_soulHearts = (int)local_44; + pEVar3->_soulHearts = GHIDRA_INT(local_44); pEVar3->_redHearts = twinRedHearts; pEVar3->_blackHearts = pEVar3->_blackHearts | - this->_blackHearts << ((byte)((this->_soulHearts - (int)local_44) / 2) & 0x1f); - pEVar3->_goldenHearts = (int)local_38.y; + this->_blackHearts << ((byte)((this->_soulHearts - GHIDRA_INT(local_44)) / 2) & 0x1f); + pEVar3->_goldenHearts = GHIDRA_INT(local_38.y); pEVar3->_rottenHearts = twinRottenHearts; pEVar3->_brokenHearts = this->_brokenHearts; - if (0 < (int)local_44) { - AddSoulHearts(this,-(int)local_44,0); + if (0 < GHIDRA_INT(local_44)) { + AddSoulHearts(this,-GHIDRA_INT(local_44),0); } if (0 < iVar11) { AddHearts(this,-iVar11,0,0); @@ -54150,10 +54150,10 @@ LAB_007cecd9: if (0 < local_50) { AddBoneHearts(this,-local_50); } - if (0 < (int)local_40) { + if (0 < GHIDRA_INT(local_40)) { AddMaxHearts(this,-local_40,0); } - this->_goldenHearts = this->_goldenHearts - (int)local_38.y; + this->_goldenHearts = this->_goldenHearts - GHIDRA_INT(local_38.y); this->_rottenHearts = this->_rottenHearts - twinRottenHearts; if (this->_soulHearts + this->_redHearts + this->_boneHearts < 1) { AddSoulHearts(this,1,0); @@ -54164,7 +54164,7 @@ LAB_007cecd9: if (((*(int *)&g_game->_deathmatchManager < 2) && (this->_dead == 0)) && (0 < this->_goldenHearts)) { iVar11 = (this->_soulHearts + 1) / 2 + - (*(int *)((int)(&this->_headAnim + 1) + + (*(int *)(GHIDRA_INT((&this->_headAnim + 1)) + ((this->_redHearts <= this->_maxHearts) + 2) * 4) + 1) / 2 + this->_boneHearts; if (iVar11 < this->_goldenHearts) { @@ -54189,7 +54189,7 @@ LAB_007cecd9: bVar2 = CanRerollCollectible(this,local_40,0); if (((bVar2 != 0) && (*(int *)local_38.y != 3)) && (local_44 = (float)(local_40 * 4), - 0 < *(int *)((int)(this->_collectibleCounts)._begin + (int)local_44))) { + 0 < *(int *)(GHIDRA_INT((this->_collectibleCounts)._begin) + GHIDRA_INT(local_44)))) { if (uVar8 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar1 = (code *)swi(3); @@ -54200,9 +54200,9 @@ LAB_007cecd9: uVar8 = uVar8 << ((byte)heartRng._shift2 & 0x1f) ^ uVar8; uVar8 = uVar8 >> ((byte)heartRng._shift3 & 0x1f) ^ uVar8; if ((uVar8 & 1) == 0) { - piVar7 = (int *)((int)local_44 + (int)(local_3c->_collectibleCounts)._begin); + piVar7 = (int *)(GHIDRA_INT(local_44) + GHIDRA_INT((local_3c->_collectibleCounts)._begin)); *piVar7 = *piVar7 + 1; - if (*(char *)((int)&(((ANM2 *)((int)local_38.y + 0x48))->_overlayAnimState). + if (*(char *)(GHIDRA_INT(&(((ANM2 *)(GHIDRA_INT(local_38.y) + 0x48))->_overlayAnimState)). _currentlyTriggeredEvents + 2) != '\0') { AddCostume(local_3c,(ItemConfig_Item *)local_38.y,0); } @@ -54211,7 +54211,7 @@ LAB_007cecd9: pvVar10 = (void *)*piVar7; History::remove_index_refs (&this->_history, - ((int)pvVar10 - (int)(this->_history)._historyItems._begin) / 0x1c); + (GHIDRA_INT(pvVar10) - GHIDRA_INT((this->_history)._historyItems._begin)) / 0x1c); local_2d = '\x01'; RemoveCollectible(this,local_40,1,0,1); } @@ -54220,7 +54220,7 @@ LAB_007cecd9: else { uVar9 = local_40 & 0x7fff; pvVar6 = (g_manager->_itemConfig)._trinkets._begin; - if ((int)uVar9 < (int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar6 >> 2) { + if (GHIDRA_INT(uVar9) < GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar6) >> 2) { local_38.y = *(float *)((char *)pvVar6 + uVar9 * 4); } else { @@ -54228,8 +54228,8 @@ LAB_007cecd9: } pvVar6 = (this->_smeltedTrinkets)._begin; local_44 = (float)(uVar9 * 4); - if ((0 < *(short *)((char *)pvVar6 + (int)local_44)) || - (0 < *(short *)((char *)pvVar6 + (int)local_44 + 2))) { + if ((0 < *(short *)((char *)pvVar6 + GHIDRA_INT(local_44))) || + (0 < *(short *)((char *)pvVar6 + GHIDRA_INT(local_44) + 2))) { if (uVar8 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar1 = (code *)swi(3); @@ -54241,17 +54241,17 @@ LAB_007cecd9: uVar8 = uVar8 >> ((byte)heartRng._shift3 & 0x1f) ^ uVar8; if ((uVar8 & 1) == 0) { pvVar6 = (local_3c->_smeltedTrinkets)._begin; - if ((*(short *)((char *)pvVar6 + (int)local_44) < 1) && - (*(short *)((char *)pvVar6 + (int)local_44 + 2) < 1)) { + if ((*(short *)((char *)pvVar6 + GHIDRA_INT(local_44)) < 1) && + (*(short *)((char *)pvVar6 + GHIDRA_INT(local_44) + 2) < 1)) { AddCostume(local_3c,(ItemConfig_Item *)local_38.y,0); pvVar6 = (local_3c->_smeltedTrinkets)._begin; } if ((*(uint *)((char *)pvVar10 + 8) & 0x8000) == 0) { - *(short *)((char *)local_44 + (int)pvVar6) = - *(short *)((char *)local_44 + (int)pvVar6) + 1; + *(short *)((char *)local_44 + GHIDRA_INT(pvVar6)) = + *(short *)((char *)local_44 + GHIDRA_INT(pvVar6)) + 1; } else { - smeltedCount = (short *)((int)local_44 + 2 + (int)pvVar6); + smeltedCount = (short *)(GHIDRA_INT(local_44) + 2 + GHIDRA_INT(pvVar6)); *smeltedCount = *smeltedCount + 1; } ((History *)(&local_3c->_history))->History::AddHistoryItem(pvVar10); @@ -54260,12 +54260,12 @@ LAB_007cecd9: pvVar10 = (void *)*piVar7; History::remove_index_refs (&this->_history, - ((int)pvVar10 - (int)(this->_history)._historyItems._begin) / 0x1c); + (GHIDRA_INT(pvVar10) - GHIDRA_INT((this->_history)._historyItems._begin)) / 0x1c); local_2d = '\x01'; } } } - pvVar6 = (void *)((int)pvVar10 + 0x1c); + pvVar6 = (void *)(GHIDRA_INT(pvVar10) + 0x1c); if (local_2d != '\0') { pvVar6 = pvVar10; } @@ -54297,10 +54297,10 @@ LAB_007cecd9: local_38.y = (float)*(Entity_Player **)((char *)twinPlayer + 0x1da0); piVar7 = &this->_brokenHearts; pfVar4 = &local_38.y; - if ((int)*(Entity_Player **)((char *)twinPlayer + 0x1da0) <= *piVar7) { + if (GHIDRA_INT(*(Entity_Player **)((char *)twinPlayer + 0x1da0)) <= *piVar7) { pfVar4 = (float *)piVar7; } - *piVar7 = (int)*pfVar4; + *piVar7 = GHIDRA_INT(*pfVar4); AddMaxHearts(this,*(int *)((char *)twinPlayer + 0x1340),0); AddBoneHearts(this,*(int *)((char *)this->_twinPlayer + 0x1d88)); AddEternalHearts(this,*(int *)((char *)this->_twinPlayer + 0x1348)); @@ -54355,19 +54355,19 @@ LAB_007cecd9: local_8 = (Entity_Player *)0x0; local_2d = (this->_sprite)._animState._isPlaying; local_44 = (this->_sprite)._animState._animFrame; - ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)((int)this->_config + 0x74),0); + ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)(GHIDRA_INT(this->_config) + 0x74),0); update_player_skin(this); this->ResetColor(); RemoveCollectible(this,oldPlayerType,extraout_ECX); if (animNameSize == (void *)0x0) goto LAB_007cf515; if (local_2d == 0) { pEVar3 = (Entity_Player *)animName; - if (0xf < (uint)animNameCapacity) { + if (0xf < GHIDRA_UINT(animNameCapacity)) { pEVar3 = animName[0]; } bVar2 = ((ANM2 *)(&this->_sprite))->ANM2::SetAnimation((byte *)pEVar3,1); if (((bVar2 != 0) && ((this->_sprite)._animState._animData != (void *)0x0)) && - (((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)(int)local_44), + (((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(local_44)), (this->_sprite)._animState._animData != (void *)0x0)) { (this->_sprite)._animState._isPlaying = 0; } @@ -54375,7 +54375,7 @@ LAB_007cecd9: } curAnim = (this->_sprite)._animState._animData; local_38.y = (float)animName; - if (0xf < (uint)animNameCapacity) { + if (0xf < GHIDRA_UINT(animNameCapacity)) { local_38.y = (float)animName[0]; } if (curAnim == (byte *)0x0) { @@ -54397,7 +54397,7 @@ LAB_007cf49f: isLess = bVar2 < *(byte *)pEVar3; if (bVar2 != *(byte *)pEVar3) { LAB_007cf486: - uVar8 = -(uint)isLess | 1; + uVar8 = -GHIDRA_UINT(isLess) | 1; goto LAB_007cf48b; } if (bVar2 == 0) break; @@ -54423,7 +54423,7 @@ LAB_007cf515: } else if ((this->_playerType == 0x1d) && (this->_backupPlayer == (void *)0x0)) { local_38.y = (float)operator_new(0x2f00); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; if ((Entity_Player *)local_38.y == (Entity_Player *)0x0) { piVar7 = (int *)0x0; } @@ -54431,7 +54431,7 @@ LAB_007cf515: constructor((Entity_Player *)local_38.y); piVar7 = extraout_EAX; } - local_8 = (Entity_Player *)((uint)local_8._1_3_ << 8); + local_8 = (Entity_Player *)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8); this->_backupPlayer = piVar7; (**(code **)(*piVar7 + 4))(this->_type,this->_variant,0x26,this->_initSeed); *(Entity_Player **)((char *)this->_backupPlayer + 0x1e6c) = this; @@ -54441,13 +54441,13 @@ LAB_007cf515: EvaluateItems(this); apply_innate_collectibles(this); UpdateCostumes(this); - if (0xf < (uint)animNameCapacity) { - uVar8 = (int)animNameCapacity + 1; + if (0xf < GHIDRA_UINT(animNameCapacity)) { + uVar8 = GHIDRA_INT(animNameCapacity) + 1; pEVar3 = animName[0]; if (0xfff < uVar8) { pEVar3 = *(Entity_Player **)&(*(undefined1 *)((char *)&(animName[0][-1]) + 0x2efc)); - uVar8 = (int)animNameCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)animName[0] + (-4 - (int)pEVar3))) { + uVar8 = GHIDRA_INT(animNameCapacity) + 0x24; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(animName[0]) + (-4 - GHIDRA_INT(pEVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -54480,7 +54480,7 @@ void Entity_Player::RemoveCollectible(int param_2) undefined8 local_14; undefined4 local_8; - local_8 = __security_cookie ^ (uint)(eraseOut + 0x2c); + local_8 = __security_cookie ^ GHIDRA_UINT((eraseOut + 0x2c)); playerType = this->_playerType; if (param_2 == playerType) { return; @@ -54519,7 +54519,7 @@ LAB_007cf690: bVar2 = HasCollectible(this,0x26b,0); (this->_history)._isLocked = 1; pvVar4 = (this->_history)._historyItems._begin; - this_00 = (Entity_Player *)((uint)(bVar2 != 0) * 4 + 8); + this_00 = (Entity_Player *)(GHIDRA_UINT((bVar2 != 0)) * 4 + 8); local_1c = this_00; if (pvVar4 != (this->_history)._historyItems._end) { do { @@ -54528,12 +54528,12 @@ LAB_007cf690: bVar2 = CanAddCollectibleToInventory(this_00,uVar3); this_00 = extraout_ECX; if (bVar2 == 0) goto LAB_007cf6f6; - if (0 < (int)local_1c) { + if (0 < GHIDRA_INT(local_1c)) { this_00 = (Entity_Player *)&(*(undefined1 *)((char *)&(local_1c[-1]) + 0x2eff)); local_1c = this_00; goto LAB_007cf6f6; } - if (0 < *(int *)((int)(this->_collectibleCounts)._begin + uVar3 * 4)) { + if (0 < *(int *)(GHIDRA_INT((this->_collectibleCounts)._begin) + uVar3 * 4)) { RemoveCollectible(this,uVar3,1,0,1); } eraseResult = (undefined4 *)std::vector::erase(eraseOut,pvVar4); @@ -54542,7 +54542,7 @@ LAB_007cf690: } else { LAB_007cf6f6: - pvVar4 = (void *)((int)pvVar4 + 0x1c); + pvVar4 = (void *)(GHIDRA_INT(pvVar4) + 0x1c); } } while (pvVar4 != (this->_history)._historyItems._end); } @@ -54553,7 +54553,7 @@ LAB_007cf6f6: if (((playerType == 0x25) || (playerType == 0x27)) && (bVar2 = ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::HasNullEffect(0x6d), bVar2 == 0)) { pvVar4 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar4 & 0xfffffffcU) < 0x1b5) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar4) & 0xfffffffcU)) < 0x1b5) { tempEffect = 0; } else { @@ -54583,11 +54583,11 @@ LAB_007cf6f6: playerType = this->_playerType; if ((playerType < 0) || (pvVar4 = (g_manager->_entityConfig)._players._begin, - ((int)(g_manager->_entityConfig)._players._end - (int)pvVar4) / 0x148 <= playerType)) { + (GHIDRA_INT((g_manager->_entityConfig)._players._end) - GHIDRA_INT(pvVar4)) / 0x148 <= playerType)) { pvVar4 = (void *)0x0; } else { - pvVar4 = (void *)(playerType * 0x148 + (int)pvVar4); + pvVar4 = (void *)(playerType * 0x148 + GHIDRA_INT(pvVar4)); } SetPocketActiveItem(this,*(int *)((char *)pvVar4 + 0xf0),2,0); HUD::mark_all_slots_dirty(&g_game->_hud,1,1); @@ -54685,7 +54685,7 @@ LAB_007d1505: bombsOrMana = this->_poopMana; } else { - bombsOrMana = (uint)(4 < this->_numBombs); + bombsOrMana = GHIDRA_UINT((4 < this->_numBombs)); } if (((bombsOrMana == 0) || (this->_numKeys < 5)) || (this->_trinketsID[0] != 0)) { LAB_007d14a0: @@ -54693,7 +54693,7 @@ LAB_007d14a0: } else { trinketList = EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&trinketQuery,5,0x15e, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&trinketQuery,5,0x15e, -1,0,0); isQueryMade = true; if (trinketList->_size != 0) goto LAB_007d14a0; @@ -54804,7 +54804,7 @@ void Entity_Player::GetEnterPosition(Vector *buffer) ((*(uint *)(*(int *)(*(int *)((char *)g_game->_room + 4) + 0x10) + 0x38 + (enterDoor >> 5) * 4 ) & 1 << ((byte)enterDoor & 0x1f)) != 0)) break; enterDoor = enterDoor + 1 & 0x80000007; - if ((int)enterDoor < 0) { + if (GHIDRA_INT(enterDoor) < 0) { enterDoor = (enterDoor - 1 | 0xfffffff8) + 1; } attempt = attempt + 1; @@ -54826,7 +54826,7 @@ void Entity_Player::GetEnterPosition(Vector *buffer) buffer->x = doorX; buffer->y = doorY; enterDoor = enterDoor & 0x80000003; - if ((int)enterDoor < 0) { + if (GHIDRA_INT(enterDoor) < 0) { enterDoor = (enterDoor - 1 | 0xfffffffc) + 1; } switch(enterDoor) { @@ -54885,11 +54885,11 @@ Entity_Familiar * Entity_Player::AddMinisaac(Vector *position, byte isPlayAnim) } else { uVar2 = Random(); - local_24.x = (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + local_24.x = (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_24.x = local_24.x + local_24.x; uVar2 = Random(); - local_1c.x = (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + local_1c.x = (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10 * 3.0 + 2.0; fVar4 = cos(local_24.x); launchVelocity.x = fVar4 * local_1c.x; @@ -54910,8 +54910,8 @@ Entity_Familiar * Entity_Player::AddMinisaac(Vector *position, byte isPlayAnim) minisaac = (Entity_Familiar *) ((Game *)(g_game))->Game::SpawnEx(3,0xe4,position,&local_24,(Entity *)this,uVar2,seed,0); if (isPlayAnim == 0) goto LAB_007d1be2; - *(uint *)&minisaac->_flags = (uint)minisaac->_flags & 0xfffffffb; - *(undefined4 *)((int)&minisaac->_flags + 4) = *(undefined4 *)((int)&minisaac->_flags + 4); + *(uint *)&minisaac->_flags = GHIDRA_UINT(minisaac->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&minisaac->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&minisaac->_flags) + 4); animData = (minisaac->_sprite)._animState._animData; if (animData == (byte *)0x0) { LAB_007d19f9: @@ -54932,7 +54932,7 @@ LAB_007d19f9: bVar3 = bVar1 < (byte)*appearName; if (bVar1 != *appearName) { LAB_007d19e3: - uVar2 = -(uint)bVar3 | 1; + uVar2 = -GHIDRA_UINT(bVar3) | 1; goto LAB_007d19e8; } if (bVar1 == 0) break; @@ -54957,7 +54957,7 @@ LAB_007d19e8: local_1c.x = (float)bloodSplat; uVar2 = Random(); (bloodSplat->_sprite)._rotation = - (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * 2.3283064e-10 * + (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10 * 360.0; animData = (bloodSplat->_sprite)._animState._animData; if (animData == (byte *)0x0) { @@ -54979,7 +54979,7 @@ LAB_007d1b16: bVar3 = bVar1 < *splatAnimName; if (bVar1 != *splatAnimName) { LAB_007d1b00: - uVar2 = -(uint)bVar3 | 1; + uVar2 = -GHIDRA_UINT(bVar3) | 1; goto LAB_007d1b05; } if (bVar1 == 0) break; @@ -54999,16 +54999,16 @@ LAB_007d1b05: fVar4 = local_1c.x; manager = g_manager; local_1c.x = 4.2039e-44; - fVar6 = (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + fVar6 = (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10 * 0.4 + 0.8; fVar5 = fVar6 * g_vectorOne.y; - (((ANM2 *)((int)fVar4 + 0x48))->_scale).x = fVar6 * g_vectorOne.x; - (((ANM2 *)((int)fVar4 + 0x48))->_scale).y = fVar5; + (((ANM2 *)(GHIDRA_INT(fVar4) + 0x48))->_scale).x = fVar6 * g_vectorOne.x; + (((ANM2 *)(GHIDRA_INT(fVar4) + 0x48))->_scale).y = fVar5; *(int *)((char *)fVar4 + 0x354) = 2000; seed_fart_sound_override((int *)&local_1c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_1c.x,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_1c.x),1.0,2,0,1.0,0.0); LAB_007d1be2: - minisaac->_entityGridCollisionClass = (uint)(player->_canFly == 0) * 2 + 3; + minisaac->_entityGridCollisionClass = GHIDRA_UINT((player->_canFly == 0)) * 2 + 3; return minisaac; } @@ -55038,7 +55038,7 @@ undefined4 Entity_Player::play_hurt_effects() local_8 = -NAN; puStack_c = &LAB_00b002bd; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(local_44 + 0x10); + local_14 = __security_cookie ^ GHIDRA_UINT((local_44 + 0x10)); ExceptionList = &local_10; pvVar2 = ((TemporaryEffects *)(&in_ECX->_temporaryeffects))->TemporaryEffects::GetCollectibleEffect(0x146); if ((((0 < in_ECX->_damageCooldown) && ((in_ECX->_flags & 0x1000000000) == 0)) || @@ -55047,7 +55047,7 @@ undefined4 Entity_Player::play_hurt_effects() return 0; } collectibleConfigs = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)collectibleConfigs >> 2 < 0x147) { + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(collectibleConfigs) >> 2 < 0x147) { iVar3 = 0; } else { @@ -55062,11 +55062,11 @@ undefined4 Entity_Player::play_hurt_effects() if (isOwned == 0) { uVar4 = 0; do { - local_50._8_4_ = 0; + (*(undefined4 *)((char *)&(local_50) + 0x8)) = 0; local_44[0] = -12.0; laser = Entity_Laser::ShootAngle (5,&in_ECX->_pos, - (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) + (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 90.0,0x1e,(Vector *)(local_50 + 8),(Entity *)in_ECX,0); laser->SetCollisionDamage(0x41400000); local_44[1] = 1.0; @@ -55092,13 +55092,13 @@ undefined4 Entity_Player::play_hurt_effects() pvVar2 = ((TemporaryEffects *)(&in_ECX->_temporaryeffects))->TemporaryEffects::GetCollectibleEffect(0x3a); if ((pvVar2 != (void *)0x0) && (0x95 < *(int *)((char *)pvVar2 + 8))) goto LAB_007d1f00; pvVar2 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar2 >> 2 < 0x3b) { - local_50._0_4_ = 0; + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar2) >> 2 < 0x3b) { + (*(undefined4 *)((char *)&(local_50) + 0x0)) = 0; } else { - local_50._0_4_ = *(undefined4 *)((char *)pvVar2 + 0xe8); + (*(undefined4 *)((char *)&(local_50) + 0x0)) = *(undefined4 *)((char *)pvVar2 + 0xe8); } - local_50._8_4_ = 0x1e; + (*(undefined4 *)((char *)&(local_50) + 0x8)) = 0x1e; iVar3 = 1; } else { @@ -55106,24 +55106,24 @@ undefined4 Entity_Player::play_hurt_effects() manager = g_manager; local_44[0] = 1.12104e-43; seed_fart_sound_override((int *)local_44); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_44[0],1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_44[0]),1.0,2,0,1.0,0.0); manager = g_manager; local_44[0] = 4.76441e-44; seed_fart_sound_override((int *)local_44); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_44[0],1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_44[0]),1.0,2,0,1.0,0.0); pvVar2 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar2 >> 2 < 0x70) { - local_50._0_4_ = 0; - local_50._8_4_ = 0x96; + if (GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar2) >> 2 < 0x70) { + (*(undefined4 *)((char *)&(local_50) + 0x0)) = 0; + (*(undefined4 *)((char *)&(local_50) + 0x8)) = 0x96; iVar3 = 0x14; } else { - local_50._0_4_ = *(undefined4 *)((char *)pvVar2 + 0x1bc); - local_50._8_4_ = 0x96; + (*(undefined4 *)((char *)&(local_50) + 0x0)) = *(undefined4 *)((char *)pvVar2 + 0x1bc); + (*(undefined4 *)((char *)&(local_50) + 0x8)) = 0x96; iVar3 = 0x14; } } - local_50._4_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = (void *)0x0; local_44[0] = 0.0; ((TemporaryEffects *)(&in_ECX->_temporaryeffects))->TemporaryEffects::AddEffect(local_50,1,iVar3); LAB_007d1f00: @@ -55131,7 +55131,7 @@ LAB_007d1f00: if (isOwned != 0) { iVar3 = 0; EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)local_50,3,0xce,0x146,0, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)local_50,3,0xce,0x146,0, 0); wispIdx = 0; local_8 = 0.0; @@ -55139,12 +55139,12 @@ LAB_007d1f00: if (local_44[0] != 0.0) { do { iVar3 = wispCount + 1; - if (*(Entity_Player **)(*(int *)(local_50._4_4_ + wispIdx * 4) + 0x410) != in_ECX) { + if (*(Entity_Player **)(*(int *)((*(undefined4 *)((char *)&(local_50) + 0x4)) + wispIdx * 4) + 0x410) != in_ECX) { iVar3 = wispCount; } wispIdx = wispIdx + 1; wispCount = iVar3; - } while (wispIdx < (uint)local_44[0]); + } while (wispIdx < GHIDRA_UINT(local_44[0])); } iVar3 = 4 - iVar3; if (0 < iVar3) { @@ -55158,15 +55158,15 @@ LAB_007d1f00: heapCounter = &g_allocatedBytesNoHeap; } else { - heapCounter = (qword *)((int)g_mainHeap + 0x30); + heapCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } - if ((void *)local_50._4_4_ != (void *)0x0) { - uVar4 = *(uint *)(local_50._4_4_ + -4); + if ((*(undefined4 *)((char *)&((void *)local_50) + 0x4)) != (void *)0x0) { + uVar4 = *(uint *)((*(undefined4 *)((char *)&(local_50) + 0x4)) + -4); qVar1 = *heapCounter; - *(uint *)heapCounter = (uint)*heapCounter - uVar4; + *(uint *)heapCounter = GHIDRA_UINT(*heapCounter) - uVar4; *(uint *)((char *)heapCounter + 4) = - *(uint *)((char *)heapCounter + 4) - (uint)((uint)qVar1 < uVar4); - free((uint *)(local_50._4_4_ + -4)); + *(uint *)((char *)heapCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar4)); + free((uint *)((*(undefined4 *)((char *)&(local_50) + 0x4)) + -4)); } } } @@ -55253,10 +55253,10 @@ byte Entity_Player::TryHoldEntity(Entity *entity) return 0; } iVar1 = this->_type; - flagsHigh = (uint *)((int)&entity->_flags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&entity->_flags) + 4); *flagsHigh = *flagsHigh | 0x2000020; entity->_spawnerType = iVar1; - *(int *)&entity->_flags = (int)entity->_flags; + *(int *)&entity->_flags = GHIDRA_INT(entity->_flags); (entity->_posOffset).x = g_vectorZero.x; (entity->_posOffset).y = g_vectorZero.y; bVar2 = ((Entity_Bomb *)((Entity_Bomb *)entity))->Entity_Bomb::IsRocket(); @@ -55269,10 +55269,10 @@ byte Entity_Player::TryHoldEntity(Entity *entity) if (iVar1 == 1000) { if (entity->_variant == 0x88) { iVar1 = this->_type; - flagsHigh = (uint *)((int)&entity->_flags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&entity->_flags) + 4); *flagsHigh = *flagsHigh | 0x20; entity->_spawnerType = iVar1; - *(int *)&entity->_flags = (int)entity->_flags; + *(int *)&entity->_flags = GHIDRA_INT(entity->_flags); (entity->_posOffset).x = 0.0; (entity->_posOffset).y = -10.0; goto LAB_007d23e6; @@ -55283,11 +55283,11 @@ LAB_007d23a4: if (iVar1 != 0xf5) { return 0; } - flagsHigh = (uint *)((int)&entity->_flags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&entity->_flags) + 4); *flagsHigh = *flagsHigh | 0x2000020; } else { - flagsHigh = (uint *)((int)&entity->_flags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&entity->_flags) + 4); *flagsHigh = *flagsHigh | 0x2000000; } } @@ -55299,16 +55299,16 @@ LAB_007d23a4: (entity->_velocity).x = g_vectorZero.x; (entity->_velocity).y = g_vectorZero.y; flags = entity->_flags; - flagsHigh = (uint *)((int)&entity->_flags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&entity->_flags) + 4); *flagsHigh = *flagsHigh | 0x2000000; - *(int *)&entity->_flags = (int)flags; + *(int *)&entity->_flags = GHIDRA_INT(flags); bVar2 = TemporaryEffects::HasCollectibleEffect ((TemporaryEffects *)&entity[5]._sprite._overlayRenderFirst,0x2ca); manager = g_manager; if (bVar2 != 0) { local_c[0] = (Entity_Player *)0x248; seed_fart_sound_override((int *)local_c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_c[0],1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_c[0]),1.0,2,0,1.0,0.0); } TemporaryEffects::RemoveCollectibleEffect ((TemporaryEffects *)&entity[5]._sprite._overlayRenderFirst,0x2ca,-1); @@ -55317,10 +55317,10 @@ LAB_007d23a4: goto LAB_007d23a4; } if ((entity->_variant != 0xc9) && (entity->_variant != 0xef)) goto LAB_007d23a4; - flagsHigh = (uint *)((int)&entity->_flags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&entity->_flags) + 4); *flagsHigh = *flagsHigh | 0x2000000; } - *(int *)&entity->_flags = (int)entity->_flags; + *(int *)&entity->_flags = GHIDRA_INT(entity->_flags); LAB_007d23e6: heldSlot = &this->_heldEntity; entity->_visible = 0; @@ -55367,9 +55367,9 @@ Entity * Entity_Player::ThrowHeldEntity(Vector *Velocity) return (Entity *)0x0; } thrownEntity->_visible = this->_isHeldEntityVisible; - *(int *)((int)*heldEntitySlot + 0x188) = this->_heldEntityCollisionClass; - *(int *)((int)*heldEntitySlot + 0x184) = this->_heldEntityGridCollisionClass; - local_44 = (Vector *)(uint)((this->_flags & 0x100) != 0); + *(int *)(GHIDRA_INT(*heldEntitySlot) + 0x188) = this->_heldEntityCollisionClass; + *(int *)(GHIDRA_INT(*heldEntitySlot) + 0x184) = this->_heldEntityGridCollisionClass; + local_44 = (Vector *)GHIDRA_UINT(((this->_flags & 0x100) != 0)); cVar1 = (**(code **)(*(int *)*heldEntitySlot + 0x54))(); heldEntity = *heldEntitySlot; iVar5 = heldEntity[10]; @@ -55377,7 +55377,7 @@ Entity * Entity_Player::ThrowHeldEntity(Vector *Velocity) if (iVar5 == 4) { if ((heldEntity[0xb] == 0x13) || (heldEntity[0xb] == 0x14)) { fVar2 = atan2f(Velocity->y,Velocity->x); - heldEntity[0x10a] = (int)(fVar2 * 57.295776); + heldEntity[0x10a] = GHIDRA_INT((fVar2 * 57.295776)); iVar5 = -0x3ea00000; } else { @@ -55386,10 +55386,10 @@ Entity * Entity_Player::ThrowHeldEntity(Vector *Velocity) } heldEntity[0xd3] = 0; heldEntity[0xd4] = iVar5; - heldEntity[0xd8] = (int)Velocity->x; + heldEntity[0xd8] = GHIDRA_INT(Velocity->x); fVar2 = Velocity->y; heldEntity[0x5b] = heldEntity[0x5b] & 0xfdffffdf; - heldEntity[0xd9] = (int)fVar2; + heldEntity[0xd9] = GHIDRA_INT(fVar2); heldEntity[0x5a] = heldEntity[0x5a]; heldEntity[0x10b] = 0x41700000; } @@ -55400,7 +55400,7 @@ Entity * Entity_Player::ThrowHeldEntity(Vector *Velocity) fVar2 = 1.1493498e-38; thrownEntity = (Entity_Tear *) ((Game *)(g_game))->Game::SpawnEx(2,0x28,local_44,Velocity,unaff_EBX, - (uint)*(ushort *)(heldEntity + 0x109) | + GHIDRA_UINT(*(ushort *)(heldEntity + 0x109)) | heldEntity[0x108] << 0x10,heldEntity[0x10c],0); thrownEntity->SetCollisionDamage(); if (heldEntity[0x108] == 0xe) { @@ -55412,9 +55412,9 @@ Entity * Entity_Player::ThrowHeldEntity(Vector *Velocity) } thrownEntity->SetCollisionDamage(); if (heldEntity[0x10d] == 1) { - flagsHigh = *(undefined4 *)((int)&thrownEntity->_flags + 4); - *(uint *)&thrownEntity->_flags = (uint)thrownEntity->_flags | 0x40000; - *(undefined4 *)((int)&thrownEntity->_flags + 4) = flagsHigh; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&thrownEntity->_flags) + 4); + *(uint *)&thrownEntity->_flags = GHIDRA_UINT(thrownEntity->_flags) | 0x40000; + *(undefined4 *)(GHIDRA_INT(&thrownEntity->_flags) + 4) = flagsHigh; } } if ((heldEntity[0x108] == 0x19) && (heldEntity[0x10a] == 4)) { @@ -55427,7 +55427,7 @@ Entity * Entity_Player::ThrowHeldEntity(Vector *Velocity) thrownEntity->_fallingAccel = 0.8; thrownEntity->_fallingSpeed = -5.0; thrownEntity->_prismTouched = 1; - ((ANM2 *)((ANM2 *)((int)register0x00000010 + -0x174)))->ANM2::ANM2((ANM2 *)(heldEntity + 0x12)); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(register0x00000010) + -0x174)))->ANM2::ANM2((ANM2 *)(heldEntity + 0x12)); other._championColor._offset[0] = fVar2; other._filename._buf[0] = in_stack_fffffe8c[0]; other._filename._buf[1] = in_stack_fffffe8c[1]; @@ -55445,8 +55445,8 @@ Entity * Entity_Player::ThrowHeldEntity(Vector *Velocity) other._filename._buf[0xd] = in_stack_fffffe8c[0xd]; other._filename._buf[0xe] = in_stack_fffffe8c[0xe]; other._filename._buf[0xf] = in_stack_fffffe8c[0xf]; - other._filename._size = in_stack_fffffe8c._16_4_; - other._filename._capacity = in_stack_fffffe8c._20_4_; + other._filename._size = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x10)); + other._filename._capacity = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x14)); other._animDefaultName._buf[0] = in_stack_fffffe8c[0x18]; other._animDefaultName._buf[1] = in_stack_fffffe8c[0x19]; other._animDefaultName._buf[2] = in_stack_fffffe8c[0x1a]; @@ -55463,65 +55463,65 @@ Entity * Entity_Player::ThrowHeldEntity(Vector *Velocity) other._animDefaultName._buf[0xd] = in_stack_fffffe8c[0x25]; other._animDefaultName._buf[0xe] = in_stack_fffffe8c[0x26]; other._animDefaultName._buf[0xf] = in_stack_fffffe8c[0x27]; - other._animDefaultName._size = in_stack_fffffe8c._40_4_; - other._animDefaultName._capacity = in_stack_fffffe8c._44_4_; - other._animState._animation = (void *)in_stack_fffffe8c._48_4_; - other._animState._animData = (void *)in_stack_fffffe8c._52_4_; - other._animState._layerFrames = (void *)in_stack_fffffe8c._56_4_; - other._animState._nullLayerFrames = (void *)in_stack_fffffe8c._60_4_; - other._animState._animFrame = (float)in_stack_fffffe8c._64_4_; + other._animDefaultName._size = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x28)); + other._animDefaultName._capacity = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x2c)); + other._animState._animation = (*(undefined4 *)((char *)&((void *)in_stack_fffffe8c) + 0x30)); + other._animState._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffe8c) + 0x34)); + other._animState._layerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffe8c) + 0x38)); + other._animState._nullLayerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffe8c) + 0x3c)); + other._animState._animFrame = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0x40)); other._animState._isPlaying = in_stack_fffffe8c[0x44]; - other._animState._21_3_ = in_stack_fffffe8c._69_3_; - other._animState._currentlyTriggeredEvents = in_stack_fffffe8c._72_4_; - other._animState._previouslyTriggeredEvents = in_stack_fffffe8c._76_4_; - other._overlayAnimState._animation = (void *)in_stack_fffffe8c._80_4_; - other._overlayAnimState._animData = (void *)in_stack_fffffe8c._84_4_; - other._overlayAnimState._layerFrames = (void *)in_stack_fffffe8c._88_4_; - other._overlayAnimState._nullLayerFrames = (void *)in_stack_fffffe8c._92_4_; - other._overlayAnimState._animFrame = (float)in_stack_fffffe8c._96_4_; + (*(undefined1 *)((char *)&(other._animState) + 0x15)) = (*(undefined1 *)((char *)&(in_stack_fffffe8c) + 0x45)); + other._animState._currentlyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x48)); + other._animState._previouslyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x4c)); + other._overlayAnimState._animation = (*(undefined4 *)((char *)&((void *)in_stack_fffffe8c) + 0x50)); + other._overlayAnimState._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffe8c) + 0x54)); + other._overlayAnimState._layerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffe8c) + 0x58)); + other._overlayAnimState._nullLayerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffe8c) + 0x5c)); + other._overlayAnimState._animFrame = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0x60)); other._overlayAnimState._isPlaying = in_stack_fffffe8c[100]; - other._overlayAnimState._21_3_ = in_stack_fffffe8c._101_3_; - other._overlayAnimState._currentlyTriggeredEvents = in_stack_fffffe8c._104_4_; - other._overlayAnimState._previouslyTriggeredEvents = in_stack_fffffe8c._108_4_; + (*(undefined1 *)((char *)&(other._overlayAnimState) + 0x15)) = (*(undefined1 *)((char *)&(in_stack_fffffe8c) + 0x65)); + other._overlayAnimState._currentlyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x68)); + other._overlayAnimState._previouslyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x6c)); other._overlayRenderFirst = in_stack_fffffe8c[0x70]; - other._113_3_ = in_stack_fffffe8c._113_3_; - other._animData = (void *)in_stack_fffffe8c._116_4_; - other._animCount = in_stack_fffffe8c._120_4_; - other._layerState = (void *)in_stack_fffffe8c._124_4_; - other._layerCount = in_stack_fffffe8c._128_4_; - other._nullLayerNames = (void *)in_stack_fffffe8c._132_4_; - other._numNullLayers = in_stack_fffffe8c._136_4_; - other._eventNames = (void *)in_stack_fffffe8c._140_4_; - other._numEvents = in_stack_fffffe8c._144_4_; - other._offset.x = (float)in_stack_fffffe8c._148_4_; - other._offset.y = (float)in_stack_fffffe8c._152_4_; - other._scale.x = (float)in_stack_fffffe8c._156_4_; - other._scale.y = (float)in_stack_fffffe8c._160_4_; - other._rotation = (float)in_stack_fffffe8c._164_4_; - other._color._tint[0] = (float)in_stack_fffffe8c._168_4_; - other._color._tint[1] = (float)in_stack_fffffe8c._172_4_; - other._color._tint[2] = (float)in_stack_fffffe8c._176_4_; - other._color._tint[3] = (float)in_stack_fffffe8c._180_4_; - other._color._colorize[0] = (float)in_stack_fffffe8c._184_4_; - other._color._colorize[1] = (float)in_stack_fffffe8c._188_4_; - other._color._colorize[2] = (float)in_stack_fffffe8c._192_4_; - other._color._colorize[3] = (float)in_stack_fffffe8c._196_4_; - other._color._offset[0] = (float)in_stack_fffffe8c._200_4_; - other._color._offset[1] = (float)in_stack_fffffe8c._204_4_; - other._color._offset[2] = (float)in_stack_fffffe8c._208_4_; - other._championColor._tint[0] = (float)in_stack_fffffe8c._212_4_; - other._championColor._tint[1] = (float)in_stack_fffffe8c._216_4_; - other._championColor._tint[2] = (float)in_stack_fffffe8c._220_4_; - other._championColor._tint[3] = (float)in_stack_fffffe8c._224_4_; - other._championColor._colorize[0] = (float)in_stack_fffffe8c._228_4_; - other._championColor._colorize[1] = (float)in_stack_fffffe8c._232_4_; - other._championColor._colorize[2] = (float)in_stack_fffffe8c._236_4_; - other._championColor._colorize[3] = (float)in_stack_fffffe8c._240_4_; + (*(undefined1 *)((char *)&(other) + 0x71)) = (*(undefined1 *)((char *)&(in_stack_fffffe8c) + 0x71)); + other._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffe8c) + 0x74)); + other._animCount = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x78)); + other._layerState = (*(undefined4 *)((char *)&((void *)in_stack_fffffe8c) + 0x7c)); + other._layerCount = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x80)); + other._nullLayerNames = (*(undefined4 *)((char *)&((void *)in_stack_fffffe8c) + 0x84)); + other._numNullLayers = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x88)); + other._eventNames = (*(undefined4 *)((char *)&((void *)in_stack_fffffe8c) + 0x8c)); + other._numEvents = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x90)); + other._offset.x = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0x94)); + other._offset.y = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0x98)); + other._scale.x = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0x9c)); + other._scale.y = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xa0)); + other._rotation = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xa4)); + other._color._tint[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xa8)); + other._color._tint[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xac)); + other._color._tint[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xb0)); + other._color._tint[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xb4)); + other._color._colorize[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xb8)); + other._color._colorize[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xbc)); + other._color._colorize[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xc0)); + other._color._colorize[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xc4)); + other._color._offset[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xc8)); + other._color._offset[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xcc)); + other._color._offset[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xd0)); + other._championColor._tint[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xd4)); + other._championColor._tint[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xd8)); + other._championColor._tint[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xdc)); + other._championColor._tint[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xe0)); + other._championColor._colorize[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xe4)); + other._championColor._colorize[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xe8)); + other._championColor._colorize[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xec)); + other._championColor._colorize[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffe8c) + 0xf0)); other._championColor._offset[1] = fVar3; other._championColor._offset[2] = fVar4; - other._256_4_ = local_44; + (*(undefined4 *)((char *)&(other) + 0x100)) = local_44; other._playbackSpeed = (float)Velocity; - other._264_4_ = unaff_EBX; + (*(undefined4 *)((char *)&(other) + 0x108)) = unaff_EBX; other._shadowLayerIndex = iVar5; other._bitflags = iVar6; ((ANM2 *)(&thrownEntity->_sprite))->ANM2::operator_assign(other); @@ -55557,7 +55557,7 @@ Entity * Entity_Player::ThrowHeldEntity(Vector *Velocity) } manager = g_manager; if (heldEntity[10] == 0xf5) { - seed_fart_sound_override((int *)((int)register0x00000010 + -0x50)); + seed_fart_sound_override((int *)(GHIDRA_INT(register0x00000010) + -0x50)); ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(0x361,1.0,2,0,1.0,0.0); heldEntity = *heldEntitySlot; } @@ -55680,24 +55680,24 @@ void Entity_Player::apply_soul_charge_to_actives(int oldSoulCharge) do { itemId = this->_activeDesc[slot]._item; if (g_game == (Game *)0x0) { - if (-1 < (int)itemId) goto LAB_007d2bd3; + if (-1 < GHIDRA_INT(itemId)) goto LAB_007d2bd3; LAB_007d2bf5: local_8 = 0; } - else if ((int)itemId < 0) { + else if (GHIDRA_INT(itemId) < 0) { proceduralIdx = ~itemId; - isNotProcedural = -1 < (int)itemId; + isNotProcedural = -1 < GHIDRA_INT(itemId); itemId = proceduralIdx; if ((isNotProcedural) || (itemList = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)itemList >> 2 <= - (int)proceduralIdx)) goto LAB_007d2bf5; + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(itemList) >> 2 <= + GHIDRA_INT(proceduralIdx))) goto LAB_007d2bf5; local_8 = **(int **)((char *)itemList + proceduralIdx * 4); } else { LAB_007d2bd3: itemList = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)itemList >> 2 <= (int)itemId) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(itemList) >> 2 <= GHIDRA_INT(itemId)) goto LAB_007d2bf5; local_8 = *(int *)((char *)itemList + itemId * 4); } @@ -55807,24 +55807,24 @@ void Entity_Player::blood_charge_changed(int oldBloodCharge) do { itemId = this->_activeDesc[slot]._item; if (g_game == (Game *)0x0) { - if (-1 < (int)itemId) goto LAB_007d2e53; + if (-1 < GHIDRA_INT(itemId)) goto LAB_007d2e53; LAB_007d2e75: local_8 = 0; } - else if ((int)itemId < 0) { + else if (GHIDRA_INT(itemId) < 0) { proceduralIdx = ~itemId; - isNotProcedural = -1 < (int)itemId; + isNotProcedural = -1 < GHIDRA_INT(itemId); itemId = proceduralIdx; if ((isNotProcedural) || (itemList = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)itemList >> 2 <= - (int)proceduralIdx)) goto LAB_007d2e75; + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(itemList) >> 2 <= + GHIDRA_INT(proceduralIdx))) goto LAB_007d2e75; local_8 = **(int **)((char *)itemList + proceduralIdx * 4); } else { LAB_007d2e53: itemList = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)itemList >> 2 <= (int)itemId) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(itemList) >> 2 <= GHIDRA_INT(itemId)) goto LAB_007d2e75; local_8 = *(int *)((char *)itemList + itemId * 4); } @@ -55898,7 +55898,7 @@ void Entity_Player::AddRottenHearts(int amount, byte unk) prevRottenHearts = GetHealthType(this_01); if (prevRottenHearts == 3) { if (0 < amount_00) { - AddBlueFlies(this_02,(amount_00 * 3 + 1) / 2,(Vector *)((int)this + 0x33c),(Entity *)0x0 + AddBlueFlies(this_02,(amount_00 * 3 + 1) / 2,(Vector *)(GHIDRA_INT(this) + 0x33c),(Entity *)0x0 ); return; } @@ -56005,7 +56005,7 @@ void Entity_Player::UpdateBookOfVirtues(byte addedBookOfVirtues) unused = g_game; if ((((*(byte *)((char *)removedCollectibles + 4) & 4) == 0) && (g_game->_challenge != 0x2b)) && (0x22 < (g_game->_itemPool)._removedCollectibles._size)) { - unused = (Game *)((int)removedCollectibles + 4); + unused = (Game *)(GHIDRA_INT(removedCollectibles) + 4); unused->_stage = unused->_stage | 4; currentActive = this->_activeDesc[0]._item; goto LAB_007d327a; @@ -56029,7 +56029,7 @@ LAB_007d327a: iVar1 = 0; } else { - iVar1 = GetCollectibleMaxCharge(this,iVar1,this->_activeDesc[0]._varData,(int)unused); + iVar1 = GetCollectibleMaxCharge(this,iVar1,this->_activeDesc[0]._varData,GHIDRA_INT(unused)); } this->_activeDesc[0]._charge = iVar1; this->_activeDesc[0]._batteryCharge = 0; @@ -56064,7 +56064,7 @@ void Entity_Player::trigger_vampire_charm_kill() soundId[0] = (Entity_Player *)0x266; } seed_fart_sound_override((int *)soundId); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)soundId[0],1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(soundId[0]),1.0,2,0,1.0,0.0); AddHearts(this,1,1,0); this->_vampireCharmKills = this->_vampireCharmKills - iVar1; seed = Random(); @@ -56089,11 +56089,11 @@ void Entity_Player::AddUrnSouls(uint amount) amount = amount + this->_urnSouls; local_c[1] = 0x14; upperClamped = &amount; - if (0x13 < (int)amount) { + if (0x13 < GHIDRA_INT(amount)) { upperClamped = local_c + 1; } clamped = local_c; - if (0 < (int)*upperClamped) { + if (0 < GHIDRA_INT(*upperClamped)) { clamped = upperClamped; } this->_urnSouls = *clamped; @@ -56171,14 +56171,14 @@ byte Entity_Player::try_end_astral_projection() EntityPtr astralBody; Game *game; - local_44 = __security_cookie ^ (uint)auStack_f4; + local_44 = __security_cookie ^ GHIDRA_UINT(auStack_f4); if ((((this->_temporaryeffects)._disabled != 0) || (pvVar5 = ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::GetCollectibleEffect(0x2a5), pvVar5 == (void *)0x0)) || (*(int *)((char *)pvVar5 + 4) != 1)) { return 0; } pvVar5 = (g_manager->_itemConfig)._collectibles._begin; - if ((0xa94 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar5 & 0xfffffffcU)) + if ((0xa94 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar5) & 0xfffffffcU))) && (fVar8 = *(float *)((char *)pvVar5 + 0xa94), fVar8 != 0.0)) { local_a8._tint[2] = *(float *)((char *)fVar8 + 0x78); local_a8._tint[1] = 0.0; @@ -56187,7 +56187,7 @@ byte Entity_Player::try_end_astral_projection() ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::AddEffect(&local_a8,1,1); } pvVar5 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar5 & 0xfffffffcU) < 0xa95) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar5) & 0xfffffffcU)) < 0xa95) { Item = (ItemConfig_Item *)0x0; } else { @@ -56211,7 +56211,7 @@ byte Entity_Player::try_end_astral_projection() local_d4 = local_d4 / 20.0; dVar9 = floor((double)local_d4); local_d4 = (float)dVar9; - iVar7 = (int)dVar9; + iVar7 = GHIDRA_INT(dVar9); if (iVar7 < 4) { iVar7 = 4; } @@ -56229,11 +56229,11 @@ byte Entity_Player::try_end_astral_projection() local_d4 = (this->_pos).x; playerY = (this->_pos).y; uVar6 = Random(); - local_c8 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + local_c8 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_c8 = local_c8 + local_c8; uVar6 = Random(); - local_cc = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + local_cc = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10; fVar8 = cos(local_c8); local_a8._tint[0] = fVar8 * local_cc * 15.0 + (bodyX - local_d4) * local_d0 + local_d4; @@ -56242,7 +56242,7 @@ byte Entity_Player::try_end_astral_projection() uVar6 = Random(); rngResult = Random(); trailVelocity.x = - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 0.5 + 0.5; trailVelocity.y = trailVelocity.x * local_bc.y; trailVelocity.x = trailVelocity.x * local_bc.x; @@ -56263,7 +56263,7 @@ byte Entity_Player::try_end_astral_projection() local_c4 = local_d0 * g_vectorOne.x; local_d0 = local_d0 * g_vectorOne.y; uVar6 = Random(); - fVar8 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar8 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 0.3 + 0.3; (effect->_sprite)._scale.y = local_d0 * fVar8; (effect->_sprite)._scale.x = fVar8 * local_c4; @@ -56319,7 +56319,7 @@ byte Entity_Player::try_end_astral_projection() local_a8._colorize[1] = (this->_sprite)._color._colorize[1]; local_a8._colorize[2] = (this->_sprite)._color._colorize[2]; local_a8._colorize[3] = (this->_sprite)._color._colorize[3]; - local_a8._offset._0_8_ = *(undefined8 *)(this->_sprite)._color._offset; + (*(undefined8 *)((char *)&(local_a8._offset) + 0x0)) = *(undefined8 *)(this->_sprite)._color._offset; ((Color *)(&local_a8))->Color::__mul(&effectColor); effectColor._tint[0] = local_a8._tint[0]; effectColor._tint[1] = local_a8._tint[1]; @@ -56376,7 +56376,7 @@ byte Entity_Player::try_end_astral_projection() isCharLess = bVar2 < (byte)*expectedAnimChar; if (bVar2 != *expectedAnimChar) { LAB_007d3d20: - uVar6 = -(uint)isCharLess | 1; + uVar6 = -GHIDRA_UINT(isCharLess) | 1; goto LAB_007d3d25; } if (bVar2 == 0) break; @@ -56428,10 +56428,10 @@ void Entity_Player::fire_saturnus_tears() double uintFixup; rngResult = Random(); - uintFixup = __uint_to_double_fixup[-((int)rngResult >> 0x1f)]; + uintFixup = __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]; i = 0; do { - fVar5 = (float)((double)(int)rngResult + uintFixup) * 2.3283064e-10 * 360.0 - + fVar5 = (float)((double)GHIDRA_INT(rngResult) + uintFixup) * 2.3283064e-10 * 360.0 - (float)i * 51.42857; fVar3 = fVar5 * 0.017453292; fVar4 = cos(fVar3); @@ -56447,34 +56447,34 @@ void Entity_Player::fire_saturnus_tears() tear = FireTear(this,&tearPos,velocity,0x47,(Entity *)0x0,1.5); tear->SetCollisionDamage(tear->_collisionDamage + 5.0); flagsLow = (tear->_tearFlags)._l; - uVar1 = *(uint *)((int)&(tear->_tearFlags)._l + 4); + uVar1 = *(uint *)(GHIDRA_INT(&(tear->_tearFlags)._l) + 4); flagsHigh = (tear->_tearFlags)._h; - uVar2 = *(uint *)((int)&(tear->_tearFlags)._h + 4); + uVar2 = *(uint *)(GHIDRA_INT(&(tear->_tearFlags)._h) + 4); tear->_tearIdx = 1; - uStack_20 = ~((uint)g_tearFlagHoming._l | (uint)g_tearFlagBounce._l | - (uint)g_tearFlagBoomerang._l | (uint)g_tearFlagOrbit._l | - (uint)g_tearFlagLudovico._l | (uint)g_tearFlagOccult._l) & - ((uint)flagsLow | (uint)g_tearFlagNoGridDamage._l | (uint)g_tearFlagSpectral._l | - (uint)g_tearFlagOrbitAdvanced._l); - uStack_1c = ~(g_tearFlagHoming._l._4_4_ | g_tearFlagBounce._l._4_4_ | - g_tearFlagBoomerang._l._4_4_ | g_tearFlagOrbit._l._4_4_ | - g_tearFlagLudovico._l._4_4_ | g_tearFlagOccult._l._4_4_) & - (uVar1 | g_tearFlagNoGridDamage._l._4_4_ | g_tearFlagSpectral._l._4_4_ | - g_tearFlagOrbitAdvanced._l._4_4_); - uStack_18 = ~((uint)g_tearFlagHoming._h | (uint)g_tearFlagBounce._h | - (uint)g_tearFlagBoomerang._h | (uint)g_tearFlagOrbit._h | - (uint)g_tearFlagLudovico._h | (uint)g_tearFlagOccult._h) & - ((uint)flagsHigh | (uint)g_tearFlagNoGridDamage._h | (uint)g_tearFlagSpectral._h | - (uint)g_tearFlagOrbitAdvanced._h); - uStack_14 = ~(g_tearFlagHoming._h._4_4_ | g_tearFlagBounce._h._4_4_ | - g_tearFlagBoomerang._h._4_4_ | g_tearFlagOrbit._h._4_4_ | - g_tearFlagLudovico._h._4_4_ | g_tearFlagOccult._h._4_4_) & - (uVar2 | g_tearFlagNoGridDamage._h._4_4_ | g_tearFlagSpectral._h._4_4_ | - g_tearFlagOrbitAdvanced._h._4_4_); - flags._l._4_4_ = uStack_1c; - flags._l._0_4_ = uStack_20; - flags._h._0_4_ = uStack_18; - flags._h._4_4_ = uStack_14; + uStack_20 = ~(GHIDRA_UINT(g_tearFlagHoming._l) | GHIDRA_UINT(g_tearFlagBounce._l) | + GHIDRA_UINT(g_tearFlagBoomerang._l) | GHIDRA_UINT(g_tearFlagOrbit._l) | + GHIDRA_UINT(g_tearFlagLudovico._l) | GHIDRA_UINT(g_tearFlagOccult._l)) & + (GHIDRA_UINT(flagsLow) | GHIDRA_UINT(g_tearFlagNoGridDamage._l) | GHIDRA_UINT(g_tearFlagSpectral._l) | + GHIDRA_UINT(g_tearFlagOrbitAdvanced._l)); + uStack_1c = ~((*(undefined4 *)((char *)&(g_tearFlagHoming._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagBounce._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagBoomerang._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagOrbit._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagLudovico._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagOccult._l) + 0x4))) & + (uVar1 | (*(undefined4 *)((char *)&(g_tearFlagNoGridDamage._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagSpectral._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagOrbitAdvanced._l) + 0x4))); + uStack_18 = ~(GHIDRA_UINT(g_tearFlagHoming._h) | GHIDRA_UINT(g_tearFlagBounce._h) | + GHIDRA_UINT(g_tearFlagBoomerang._h) | GHIDRA_UINT(g_tearFlagOrbit._h) | + GHIDRA_UINT(g_tearFlagLudovico._h) | GHIDRA_UINT(g_tearFlagOccult._h)) & + (GHIDRA_UINT(flagsHigh) | GHIDRA_UINT(g_tearFlagNoGridDamage._h) | GHIDRA_UINT(g_tearFlagSpectral._h) | + GHIDRA_UINT(g_tearFlagOrbitAdvanced._h)); + uStack_14 = ~((*(undefined4 *)((char *)&(g_tearFlagHoming._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagBounce._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagBoomerang._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagOrbit._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagLudovico._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagOccult._h) + 0x4))) & + (uVar2 | (*(undefined4 *)((char *)&(g_tearFlagNoGridDamage._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagSpectral._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagOrbitAdvanced._h) + 0x4))); + (*(undefined4 *)((char *)&(flags._l) + 0x4)) = uStack_1c; + (*(undefined4 *)((char *)&(flags._l) + 0x0)) = uStack_20; + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = uStack_18; + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = uStack_14; ((Entity_Tear *)(tear))->Entity_Tear::SetTearFlags(flags); tear->_height = -20.0; fVar3 = ((Entity_Tear *)(tear))->Entity_Tear::get_height_offset_y(-20.0); @@ -56496,7 +56496,7 @@ int Entity_Player::GetMaxInventorySize() byte isBirthright; isBirthright = HasCollectible(this,0x26b,0); - return (uint)(isBirthright != 0) * 4 + 8; + return GHIDRA_UINT((isBirthright != 0)) * 4 + 8; } // 007d4170 @@ -56561,9 +56561,9 @@ void Entity_Player::SetPocketActiveItem(int collectible, int slot, byte keepInPo if (collectible == 0x1e4) { ItemPool::RemoveCollectible(&g_game->_itemPool,0x126,0,0); } - if ((uint)collectible < (game->_itemPool)._removedCollectibles._size) { - removedWord = (uint *)((int)(game->_itemPool)._removedCollectibles._begin + - ((uint)collectible >> 5) * 4); + if (GHIDRA_UINT(collectible) < (game->_itemPool)._removedCollectibles._size) { + removedWord = (uint *)(GHIDRA_INT((game->_itemPool)._removedCollectibles._begin) + + (GHIDRA_UINT(collectible) >> 5) * 4); *removedWord = *removedWord | 1 << (collectible & 0x1fU); } } @@ -56633,7 +56633,7 @@ void Entity_Player::update_suplex() local_8 = 0xffffffff; puStack_c = &LAB_00b00308; local_10 = ExceptionList; - stackCookie = __security_cookie ^ (uint)(local_24 + 0x20); + stackCookie = __security_cookie ^ GHIDRA_UINT((local_24 + 0x20)); ExceptionList = &local_10; local_7bc = (EntityPtr)this; iVar5 = this->_suplexState; @@ -56648,7 +56648,7 @@ void Entity_Player::update_suplex() iVar5 = this->_suplexState; } if (0 < this->_suplexAimCountdown) { - iVar7 = this->_suplexAimCountdown + ((int)this->_updateTime - (int)this->_prevUpdateTime) * -2; + iVar7 = this->_suplexAimCountdown + (GHIDRA_INT(this->_updateTime) - GHIDRA_INT(this->_prevUpdateTime)) * -2; this->_suplexAimCountdown = iVar7; if (iVar5 == 5) { this->_suplexAimCountdown = 0; @@ -56666,7 +56666,7 @@ LAB_007d44b8: pvVar6 = this->_markedTarget; targetPos = &markedPosX; if (pvVar6 == (void *)0x0) { - local_24._8_4_ = (this->_pos).x; + (*(undefined4 *)((char *)&(local_24) + 0x8)) = (this->_pos).x; local_18 = (int *)(this->_pos).y; targetPos = (float *)(local_24 + 8); } @@ -56687,18 +56687,18 @@ LAB_007d44b8: this->_suplexState = 3; local_7ac = (Entity_Player *)0x408; seed_fart_sound_override((int *)&local_7ac); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_7ac,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_7ac),1.0,2,0,1.0,0.0); bVar2 = HasCollectible(this,0x248,0); if (bVar2 != 0) { EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)local_24,3,0xce, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)local_24,3,0xce, 0x2c5,0,0); piVar8 = (int *)0x0; local_8 = 0; if (local_18 != (int *)0x0) { - pvVar6 = (void *)local_24._4_4_; + pvVar6 = (*(undefined4 *)((char *)&((void *)local_24) + 0x4)); do { - suplexWisp = *(int **)((char *)pvVar6 + (int)piVar8 * 4); + suplexWisp = *(int **)((char *)pvVar6 + GHIDRA_INT(piVar8) * 4); if ((Entity_Player *)suplexWisp[0x104] == this) { EStack_54._position.x = g_vectorZero.x; EStack_54._velocity.x = g_vectorZero.x; @@ -56711,15 +56711,15 @@ LAB_007d44b8: EStack_54._flags = 0; EStack_54._entity = (void *)0x0; (**(code **)(*suplexWisp + 0x24))(&EStack_54); - pvVar6 = (void *)local_24._4_4_; + pvVar6 = (*(undefined4 *)((char *)&((void *)local_24) + 0x4)); } - piVar8 = (int *)((int)piVar8 + 1); + piVar8 = (int *)(GHIDRA_INT(piVar8) + 1); } while (piVar8 < local_18); } local_8 = 0xffffffff; if (local_24[0] == '\0') { local_8 = 1; - tracked_alloc(1,(void *)local_24._4_4_,0); + tracked_alloc(1,(*(undefined4 *)((char *)&((void *)local_24) + 0x4)),0); local_8 = 0xffffffff; } } @@ -56756,17 +56756,17 @@ LAB_007d44b8: } isSuperLeap = str_eq((byte *)curAnimChars,*animNameSize,(byte *)"SuperLeapUp",0xb); if (&DAT_0000000f < local_18) { - piVar8 = (int *)((int)local_18 + 1); + piVar8 = (int *)(GHIDRA_INT(local_18) + 1); pvVar6 = curAnim[0]; if ((int *)0xfff < piVar8) { - pvVar6 = *(void **)((int)curAnim[0] + -4); + pvVar6 = *(void **)(GHIDRA_INT(curAnim[0]) + -4); piVar8 = local_18 + 9; - if (0x1f < (uint)((int)curAnim[0] + (-4 - (int)pvVar6))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(curAnim[0]) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(pvVar6,(uint)piVar8); + operator_delete(pvVar6,GHIDRA_UINT(piVar8)); } if (isSuperLeap == 0) { animName = "LeapDown"; @@ -56808,38 +56808,38 @@ LAB_007d44b8: } local_7b8 = *ppuVar3; seed_fart_sound_override((int *)&local_7ac); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_7ac,1.0,2,0,1.0,0.0); - curAnimChars = ((ANM2 *)((ANM2 *)((int)local_7bc + 0x78)))->ANM2::GetAnimation((std_string *)curAnim); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_7ac),1.0,2,0,1.0,0.0); + curAnimChars = ((ANM2 *)((ANM2 *)(GHIDRA_INT(local_7bc) + 0x78)))->ANM2::GetAnimation((std_string *)curAnim); animNameSize = &curAnimChars->_size; if (0xf < curAnimChars->_capacity) { curAnimChars = *(std_string **)curAnimChars->_buf; } isSuperLeap = str_eq((byte *)curAnimChars,*animNameSize,(byte *)"SuperLeapDown",0xd); if (&DAT_0000000f < local_18) { - piVar8 = (int *)((int)local_18 + 1); + piVar8 = (int *)(GHIDRA_INT(local_18) + 1); pvVar6 = curAnim[0]; if ((int *)0xfff < piVar8) { - pvVar6 = *(void **)((int)curAnim[0] + -4); + pvVar6 = *(void **)(GHIDRA_INT(curAnim[0]) + -4); piVar8 = local_18 + 9; - if (0x1f < (uint)((int)curAnim[0] + (-4 - (int)pvVar6))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(curAnim[0]) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(pvVar6,(uint)piVar8); + operator_delete(pvVar6,GHIDRA_UINT(piVar8)); } manager = g_manager; - local_24._8_4_ = 0.0; + (*(undefined4 *)((char *)&(local_24) + 0x8)) = 0.0; local_18 = (int *)0xf; - curAnim[0] = (void *)((uint)curAnim[0] & 0xffffff00); + curAnim[0] = (void *)(GHIDRA_UINT(curAnim[0]) & 0xffffff00); if (isSuperLeap == 0) { ((Game *)(g_game))->Game::ShakeScreen(0xe); manager = g_manager; local_7b4 = (undefined1 *)0x34; seed_fart_sound_override((int *)&local_7b4); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_7b4,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_7b4),1.0,2,0,1.0,0.0); this = (Entity_Player *)local_7bc; - ((Game *)(g_game))->Game::MakeShockwave((Vector *)((int)local_7bc + 0x33c),0.04,0.025,0xd); + ((Game *)(g_game))->Game::MakeShockwave((Vector *)(GHIDRA_INT(local_7bc) + 0x33c),0.04,0.025,0xd); local_7b4 = (undefined1 *)0x428c0000; local_7c4 = (undefined1 *)(*(float *)((char *)this + 0x14f0) * 40.0 + 50.0); ppuVar3 = &local_7c4; @@ -56848,7 +56848,7 @@ LAB_007d44b8: } local_18 = (int *)((float)*ppuVar3 / 9.0); uVar4 = Random(); - local_7c8 = ((Game *)(g_game))->Game::Spawn(1000,0x3d,(Vector *)((int)this + 0x33c),&g_vectorZero, + local_7c8 = ((Game *)(g_game))->Game::Spawn(1000,0x3d,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero, (Entity *)this,0,uVar4); local_7bc = (EntityPtr)&local_7c8->_parent; if (local_7c8->_parent != (EntityPtr)0x0) { @@ -56859,18 +56859,18 @@ LAB_007d44b8: std::multiset::insert(local_7bc); *(undefined4 *)&(*(undefined1 *)((char *)&(local_7c8[1]) + 0x44)) = *(undefined4 *)((char *)this + 0x370); *(undefined1 **)local_7c8[1]._sprite._filename._buf = *ppuVar3; - *(int *)(local_7c8[1]._sprite._filename._buf + 4) = (int)(float)local_18; - *(int *)(local_7c8[1]._sprite._filename._buf + 8) = (int)(float)local_18; + *(int *)(local_7c8[1]._sprite._filename._buf + 4) = GHIDRA_INT((float)local_18); + *(int *)(local_7c8[1]._sprite._filename._buf + 8) = GHIDRA_INT((float)local_18); } else { bombRadius = (undefined1 *)((float)bombRadius * 6.0); local_7ac = (Entity_Player *)0x34; local_7b8 = (undefined1 *)((float)*ppuVar3 + (float)*ppuVar3); seed_fart_sound_override((int *)&local_7ac); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_7ac,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_7ac),1.0,2,0,1.0,0.0); uVar4 = Random(); EVar1 = local_7bc; - playerPos = (Vector *)((int)local_7bc + 0x33c); + playerPos = (Vector *)(GHIDRA_INT(local_7bc) + 0x33c); effect = ((Game *)(g_game))->Game::Spawn(1000,0x7f,playerPos,&g_vectorZero,(Entity *)local_7bc,0,uVar4); fVar9 = *(float *)((char *)EVar1 + 0x340); iVar5 = *(int *)effect; @@ -56888,19 +56888,19 @@ LAB_007d44b8: do { rngResult = Random(); local_7c4 = (undefined1 *) - ((((((float)((double)(int)uVar4 + - __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) + - (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10) + ((((((float)((double)GHIDRA_INT(uVar4) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) + + (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10) - 0.5) * 360.0) / 15.0) * 0.017453292); local_7ac = (Entity_Player *)sin((float)local_7c4); rngResult = Random(); local_7b4 = (undefined1 *) - ((float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * + ((float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 5.0 + 15.0); - local_24._8_4_ = cos((float)local_7c4); - local_24._8_4_ = (float)local_24._8_4_ * (float)local_7b4; + (*(undefined4 *)((char *)&(local_24) + 0x8)) = cos((float)local_7c4); + (*(undefined4 *)((char *)&(local_24) + 0x8)) = (*(undefined4 *)((char *)&((float)local_24) + 0x8)) * (float)local_7b4; local_18 = (int *)((float)local_7b4 * (float)local_7ac * 0.85); rngResult = Random(); local_7ac = (Entity_Player *) @@ -56915,12 +56915,12 @@ LAB_007d44b8: } rngResult = Random(); (local_7ac->_bodySprite)._overlayAnimState._layerFrames = - (void *)(((float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * + (void *)(((float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 10.0 + 2.0) * (float)local_7b4); rngResult = Random(); - fVar10 = (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * 0.6 + + fVar10 = (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 0.6 + 1.0; fVar9 = fVar10 * g_vectorOne.x; (local_7ac->_sprite)._scale.y = fVar10 * g_vectorOne.y; @@ -56966,12 +56966,12 @@ LAB_007d44b8: (**(code **)(**(int **)((char *)this + 0x1410) + 0xc))(); } } - playerPos = (Vector *)((int)this + 0x33c); + playerPos = (Vector *)(GHIDRA_INT(this) + 0x33c); ((Game *)(g_game))->Game::BombDamage(playerPos,(float)bombRadius,(float)local_7b8,0,(Entity *)this, g_tearFlagsNone,0x1000000,0); room = g_game->_room; - iVar7 = (int)((playerPos->x - 40.0) / 40.0 + 0.5); - iVar5 = (int)((*(float *)((char *)this + 0x340) - 120.0) / 40.0 + 0.5); + iVar7 = GHIDRA_INT(((playerPos->x - 40.0) / 40.0 + 0.5)); + iVar5 = GHIDRA_INT(((*(float *)((char *)this + 0x340) - 120.0) / 40.0 + 0.5)); if ((((iVar7 < 0) || (room->_gridWidth <= iVar7)) || (iVar5 < 0)) || (room->_gridHeight <= iVar5)) { iVar7 = -1; @@ -56980,10 +56980,10 @@ LAB_007d44b8: iVar7 = iVar5 * room->_gridWidth + iVar7; } uVar4 = ((Room *)(room))->Room::GetGridCollision(iVar7); - if ((uVar4 == 0) || ((*(char *)((char *)this + 0x1570) != '\0' && ((int)uVar4 < 4)))) { + if ((uVar4 == 0) || ((*(char *)((char *)this + 0x1570) != '\0' && (GHIDRA_INT(uVar4) < 4)))) { ((PathFinder *)((PathFinder *)&pathfinder))->PathFinder::Init((Entity *)this); local_8 = 2; - bVar2 = ((NPCAI_Pathfinder *)(&pathfinder))->NPCAI_Pathfinder::HasPathToPos((Vector *)((int)this + 0x1f3c),0); + bVar2 = ((NPCAI_Pathfinder *)(&pathfinder))->NPCAI_Pathfinder::HasPathToPos((Vector *)(GHIDRA_INT(this) + 0x1f3c),0); if (bVar2 != 0) { *(float *)((char *)this + 0x1f3c) = playerPos->x; *(undefined4 *)((char *)this + 8000) = *(undefined4 *)((char *)this + 0x340); @@ -56991,7 +56991,7 @@ LAB_007d44b8: local_8 = 0xffffffff; FID_conflict__Erase_tree_>_> (local_60,(fuzzer_allocator_> *)local_60, - *(_Tree_node **)((int)local_60[0] + 4)); + *(_Tree_node **)(GHIDRA_INT(local_60[0]) + 4)); operator_delete(local_60[0],0x14); } bVar2 = HasCollectible(this,0x248,0); @@ -57009,7 +57009,7 @@ LAB_007d44b8: } } if (*(int *)((char *)this + 0x7c) != 0) { - animState = (AnimationState *)((int)this + 0x78); + animState = (AnimationState *)(GHIDRA_INT(this) + 0x78); bVar2 = ((AnimationState *)(animState))->AnimationState::IsEventTriggered(&DAT_00b1d3b0); if (bVar2 != 0) { ThrowHeldEntity(this,&g_vectorZero); @@ -57017,7 +57017,7 @@ LAB_007d44b8: goto LAB_007d4fc6; } } - animState = (AnimationState *)((int)this + 0x78); + animState = (AnimationState *)(GHIDRA_INT(this) + 0x78); LAB_007d4fc6: if (*(int *)((char *)this + 0x7c) != 0) { bVar2 = ((AnimationState *)(animState))->AnimationState::WasEventTriggered(&DAT_00b1d3b0); @@ -57076,7 +57076,7 @@ uint Entity_Player::bag_of_crafting_collect(Entity_Pickup *param_1) bool isCoinUpgraded; Manager *manager; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); collectedPickup = param_1; uVar5 = param_1->_variant; if ((((uVar5 == 10) || (uVar5 == 0x14)) || (uVar5 == 0x5a)) || @@ -57115,9 +57115,9 @@ uint Entity_Player::bag_of_crafting_collect(Entity_Pickup *param_1) goto LAB_007d54dd; } if (((iVar7 == 2) || (iVar7 == 1)) || (iVar7 == 5)) { - local_1c._4_4_ = 1; - local_1c._8_4_ = 0x13; - local_1c._0_4_ = collectedPickup->_initSeed; + (*(undefined4 *)((char *)&(local_1c) + 0x4)) = 1; + (*(undefined4 *)((char *)&(local_1c) + 0x8)) = 0x13; + (*(undefined4 *)((char *)&(local_1c) + 0x0)) = collectedPickup->_initSeed; local_10 = 4.2039e-45; uVar5 = ((RNG *)((RNG *)local_1c))->RNG::RandomInt(8); if (uVar5 != 0) goto LAB_007d5282; @@ -57133,7 +57133,7 @@ LAB_007d5282: pickup = collectedPickup; /* WARNING (jumptable): Sanity check requires truncation of jumptable */ /* WARNING: Could not find normalized switch variable to match jumptable */ - switch(*(undefined1 *)((int)&PTR_caseD_2_007d587c + iVar1 + 2)) { + switch(*(undefined1 *)(GHIDRA_INT(&PTR_caseD_2_007d587c) + iVar1 + 2)) { case 0: switch(iVar7) { case 3: @@ -57225,7 +57225,7 @@ LAB_007d54e0: } while (uVar5 < 2); uVar5 = Random(); local_10 = (pickup->_pos).y; - local_1c._8_4_ = (pickup->_pos).x; + (*(undefined4 *)((char *)&(local_1c) + 0x8)) = (pickup->_pos).x; local_50 = ((Game *)(g_game))->Game::Spawn(1000,0xf,(Vector *)(local_1c + 8),&g_vectorZero,(Entity *)0x0,1, uVar5); if (isCoinUpgraded) { @@ -57270,7 +57270,7 @@ LAB_007d5690: isLess = bVar4 < (byte)*collectAnimName; if (bVar4 != *collectAnimName) { LAB_007d5670: - uVar5 = -(uint)isLess | 1; + uVar5 = -GHIDRA_UINT(isLess) | 1; goto LAB_007d5675; } if (bVar4 == 0) break; @@ -57283,7 +57283,7 @@ LAB_007d5670: uVar5 = 0; LAB_007d5675: if ((uVar5 != 0) || - ((*(char *)((int)(pickup->_sprite)._animState._animData + 0x34) != '\0' && + ((*(char *)(GHIDRA_INT((pickup->_sprite)._animState._animData) + 0x34) != '\0' && ((pickup->_sprite)._animState._isPlaying == 0)))) goto LAB_007d5690; } local_50 = (Entity *)0xf9; @@ -57293,7 +57293,7 @@ LAB_007d5675: local_50 = (Entity *)0x13c; } seed_fart_sound_override((int *)&local_50); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_50,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_50),1.0,2,0,1.0,0.0); pickup = collectedPickup; if (collectedPickup->_price != 0) { ((Entity_Pickup *)(collectedPickup))->Entity_Pickup::CollectTrinket(in_ECX,0); @@ -57309,7 +57309,7 @@ LAB_007d5675: uVar5 = uVar5 + 1; playerHud = (HUD *)(playerHud->_playerHUD + 0x6dc); if (7 < uVar5) { - return CONCAT31((int3)((uint)playerHud >> 8),1); + return CONCAT31((int3)(GHIDRA_UINT(playerHud) >> 8),1); } } } @@ -57347,19 +57347,19 @@ LAB_007d57e0: if (*(int *)(playerHud->_playerHUD + 0x3004) != 0) { playerHud->_playerHUD[0x36b1] = 1; } - return CONCAT31((int3)((uint)playerHud >> 8),1); + return CONCAT31((int3)(GHIDRA_UINT(playerHud) >> 8),1); } uVar5 = 0; while (*(Entity_Player **)playerHud->_playerHUD != in_ECX) { uVar5 = uVar5 + 1; playerHud = (HUD *)(playerHud->_playerHUD + 0x6dc); if (7 < uVar5) { - return CONCAT31((int3)((uint)playerHud >> 8),1); + return CONCAT31((int3)(GHIDRA_UINT(playerHud) >> 8),1); } } } playerHud->_playerHUD[0x6ad] = 1; - return CONCAT31((int3)((uint)playerHud >> 8),1); + return CONCAT31((int3)(GHIDRA_UINT(playerHud) >> 8),1); } // 007d65c0 @@ -57368,7 +57368,7 @@ int Entity_Player::GetMaxPoopMana() Entity_Player *birthrightOwner; birthrightOwner = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::FirstBirthrightOwner(0x19); - return (-(uint)(birthrightOwner != (Entity_Player *)0x0) & 0x14) + 9; + return (-GHIDRA_UINT((birthrightOwner != (Entity_Player *)0x0)) & 0x14) + 9; } // 007d65e0 @@ -57386,7 +57386,7 @@ void Entity_Player::AddPoopMana(int amount) amount = newMana; birthrightOwner = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::FirstBirthrightOwner(0x19); minMana = 0; - maxMana = (-(uint)(birthrightOwner != (Entity_Player *)0x0) & 0x14) + 9; + maxMana = (-GHIDRA_UINT((birthrightOwner != (Entity_Player *)0x0)) & 0x14) + 9; cappedPtr = &amount; if (maxMana <= newMana) { cappedPtr = &maxMana; @@ -57478,7 +57478,7 @@ void Entity_Player::poop_spell_roll() puStack_c = &LAB_00b0039d; local_10 = ExceptionList; ExceptionList = &local_10; - spellRng = (RNG *)((int)(this->_collectibleRNGs)._begin + 0x17a0); + spellRng = (RNG *)(GHIDRA_INT((this->_collectibleRNGs)._begin) + 0x17a0); slot = 0; player = this; do { @@ -57499,11 +57499,11 @@ void Entity_Player::poop_spell_roll() std::vector<8byte>::_Emplace_reallocate(0,&latePoopEntry); uVar2 = 0; latePoolData = latePoolBegin; - uVar4 = (int)latePoolEnd - (int)latePoolBegin >> 3; + uVar4 = GHIDRA_INT(latePoolEnd) - GHIDRA_INT(latePoolBegin) >> 3; if (uVar4 != 0) { do { if (*(int *)((char *)latePoolBegin + uVar2 * 8) == 9) { - weightPtr = (int *)((int)latePoolBegin + uVar2 * 8 + 4); + weightPtr = (int *)(GHIDRA_INT(latePoolBegin) + uVar2 * 8 + 4); *weightPtr = *weightPtr + 5; if (*weightPtr < 0) { *(undefined4 *)((char *)latePoolBegin + uVar2 * 8 + 4) = 0; @@ -57525,11 +57525,11 @@ void Entity_Player::poop_spell_roll() } LAB_007d67ba: uVar2 = 0; - uVar4 = (int)latePoolEnd - (int)latePoolBegin >> 3; + uVar4 = GHIDRA_INT(latePoolEnd) - GHIDRA_INT(latePoolBegin) >> 3; if (uVar4 != 0) { do { if (*(int *)((char *)latePoolBegin + uVar2 * 8) == 8) { - weightPtr = (int *)((int)latePoolBegin + uVar2 * 8 + 4); + weightPtr = (int *)(GHIDRA_INT(latePoolBegin) + uVar2 * 8 + 4); *weightPtr = *weightPtr + 3; if (*weightPtr < 0) { *(undefined4 *)((char *)latePoolBegin + uVar2 * 8 + 4) = 0; @@ -57552,11 +57552,11 @@ LAB_007d67ba: } LAB_007d6821: uVar2 = 0; - uVar4 = (int)latePoolEnd - (int)latePoolBegin >> 3; + uVar4 = GHIDRA_INT(latePoolEnd) - GHIDRA_INT(latePoolBegin) >> 3; if (uVar4 != 0) { do { if (*(int *)((char *)latePoolBegin + uVar2 * 8) == 2) { - weightPtr = (int *)((int)latePoolBegin + uVar2 * 8 + 4); + weightPtr = (int *)(GHIDRA_INT(latePoolBegin) + uVar2 * 8 + 4); *weightPtr = *weightPtr + 1; if (*weightPtr < 0) { *(undefined4 *)((char *)latePoolBegin + uVar2 * 8 + 4) = 0; @@ -57579,11 +57579,11 @@ LAB_007d6821: } LAB_007d688a: uVar2 = 0; - uVar4 = (int)latePoolEnd - (int)latePoolBegin >> 3; + uVar4 = GHIDRA_INT(latePoolEnd) - GHIDRA_INT(latePoolBegin) >> 3; if (uVar4 != 0) { do { if (*(int *)((char *)latePoolBegin + uVar2 * 8) == 3) { - weightPtr = (int *)((int)latePoolBegin + uVar2 * 8 + 4); + weightPtr = (int *)(GHIDRA_INT(latePoolBegin) + uVar2 * 8 + 4); *weightPtr = *weightPtr + 1; if (*weightPtr < 0) { *(undefined4 *)((char *)latePoolBegin + uVar2 * 8 + 4) = 0; @@ -57606,11 +57606,11 @@ LAB_007d688a: } LAB_007d68f1: uVar2 = 0; - uVar4 = (int)latePoolEnd - (int)latePoolBegin >> 3; + uVar4 = GHIDRA_INT(latePoolEnd) - GHIDRA_INT(latePoolBegin) >> 3; if (uVar4 != 0) { do { if (*(int *)((char *)latePoolBegin + uVar2 * 8) == 4) { - weightPtr = (int *)((int)latePoolBegin + uVar2 * 8 + 4); + weightPtr = (int *)(GHIDRA_INT(latePoolBegin) + uVar2 * 8 + 4); *weightPtr = *weightPtr + 1; if (*weightPtr < 0) { *(undefined4 *)((char *)latePoolBegin + uVar2 * 8 + 4) = 0; @@ -57633,11 +57633,11 @@ LAB_007d68f1: } LAB_007d695a: uVar2 = 0; - uVar4 = (int)latePoolEnd - (int)latePoolBegin >> 3; + uVar4 = GHIDRA_INT(latePoolEnd) - GHIDRA_INT(latePoolBegin) >> 3; if (uVar4 != 0) { do { if (*(int *)((char *)latePoolBegin + uVar2 * 8) == 5) { - weightPtr = (int *)((int)latePoolBegin + uVar2 * 8 + 4); + weightPtr = (int *)(GHIDRA_INT(latePoolBegin) + uVar2 * 8 + 4); *weightPtr = *weightPtr + 1; if (*weightPtr < 0) { *(undefined4 *)((char *)latePoolBegin + uVar2 * 8 + 4) = 0; @@ -57660,11 +57660,11 @@ LAB_007d695a: } LAB_007d69ca: uVar2 = 0; - uVar4 = (int)latePoolEnd - (int)latePoolBegin >> 3; + uVar4 = GHIDRA_INT(latePoolEnd) - GHIDRA_INT(latePoolBegin) >> 3; if (uVar4 != 0) { do { if (*(int *)((char *)latePoolBegin + uVar2 * 8) == 10) { - weightPtr = (int *)((int)latePoolBegin + uVar2 * 8 + 4); + weightPtr = (int *)(GHIDRA_INT(latePoolBegin) + uVar2 * 8 + 4); *weightPtr = *weightPtr + 1; if (*weightPtr < 0) { *(undefined4 *)((char *)latePoolBegin + uVar2 * 8 + 4) = 0; @@ -57691,18 +57691,18 @@ LAB_007d6a3a: midPoolBegin = (void *)0x0; midPoolEnd = (undefined4 *)0x0; midPoolCapacity = (undefined4 *)0x0; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); midCornyEntry = 2; midCornyWeight = 1; latePoolData = latePoolBegin; std::vector<8byte>::_Emplace_reallocate(0,&midCornyEntry); uVar2 = 0; - uVar4 = (int)midPoolEnd - (int)midPoolBegin >> 3; + uVar4 = GHIDRA_INT(midPoolEnd) - GHIDRA_INT(midPoolBegin) >> 3; midPoolData = midPoolBegin; if (uVar4 != 0) { do { if (*(int *)((char *)midPoolBegin + uVar2 * 8) == 3) { - weightPtr = (int *)((int)midPoolBegin + uVar2 * 8 + 4); + weightPtr = (int *)(GHIDRA_INT(midPoolBegin) + uVar2 * 8 + 4); *weightPtr = *weightPtr + 1; if (*weightPtr < 0) { *(undefined4 *)((char *)midPoolBegin + uVar2 * 8 + 4) = 0; @@ -57724,11 +57724,11 @@ LAB_007d6a3a: } LAB_007d6af3: uVar2 = 0; - uVar4 = (int)midPoolEnd - (int)midPoolBegin >> 3; + uVar4 = GHIDRA_INT(midPoolEnd) - GHIDRA_INT(midPoolBegin) >> 3; if (uVar4 != 0) { do { if (*(int *)((char *)midPoolBegin + uVar2 * 8) == 4) { - weightPtr = (int *)((int)midPoolBegin + uVar2 * 8 + 4); + weightPtr = (int *)(GHIDRA_INT(midPoolBegin) + uVar2 * 8 + 4); *weightPtr = *weightPtr + 1; if (*weightPtr < 0) { *(undefined4 *)((char *)midPoolBegin + uVar2 * 8 + 4) = 0; @@ -57751,11 +57751,11 @@ LAB_007d6af3: } LAB_007d6b64: uVar2 = 0; - uVar4 = (int)midPoolEnd - (int)midPoolBegin >> 3; + uVar4 = GHIDRA_INT(midPoolEnd) - GHIDRA_INT(midPoolBegin) >> 3; if (uVar4 != 0) { do { if (*(int *)((char *)midPoolBegin + uVar2 * 8) == 5) { - weightPtr = (int *)((int)midPoolBegin + uVar2 * 8 + 4); + weightPtr = (int *)(GHIDRA_INT(midPoolBegin) + uVar2 * 8 + 4); *weightPtr = *weightPtr + 1; if (*weightPtr < 0) { *(undefined4 *)((char *)midPoolBegin + uVar2 * 8 + 4) = 0; @@ -57778,11 +57778,11 @@ LAB_007d6b64: } LAB_007d6bd5: uVar2 = 0; - uVar4 = (int)midPoolEnd - (int)midPoolBegin >> 3; + uVar4 = GHIDRA_INT(midPoolEnd) - GHIDRA_INT(midPoolBegin) >> 3; if (uVar4 != 0) { do { if (*(int *)((char *)midPoolBegin + uVar2 * 8) == 10) { - weightPtr = (int *)((int)midPoolBegin + uVar2 * 8 + 4); + weightPtr = (int *)(GHIDRA_INT(midPoolBegin) + uVar2 * 8 + 4); *weightPtr = *weightPtr + 1; if (*weightPtr < 0) { *(undefined4 *)((char *)midPoolBegin + uVar2 * 8 + 4) = 0; @@ -57807,18 +57807,18 @@ LAB_007d6c46: earlyPoolBegin = (void *)0x0; earlyPoolEnd = (undefined4 *)0x0; earlyPoolCapacity = (undefined4 *)0x0; - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); earlyBlackEntry = 6; earlyBlackWeight = 1; midPoolData = midPoolBegin; std::vector<8byte>::_Emplace_reallocate(0,&earlyBlackEntry); uVar2 = 0; - uVar4 = (int)earlyPoolEnd - (int)earlyPoolBegin >> 3; + uVar4 = GHIDRA_INT(earlyPoolEnd) - GHIDRA_INT(earlyPoolBegin) >> 3; earlyPoolData = earlyPoolBegin; if (uVar4 != 0) { do { if (*(int *)((char *)earlyPoolBegin + uVar2 * 8) == 7) { - weightPtr = (int *)((int)earlyPoolBegin + uVar2 * 8 + 4); + weightPtr = (int *)(GHIDRA_INT(earlyPoolBegin) + uVar2 * 8 + 4); *weightPtr = *weightPtr + 1; if (*weightPtr < 0) { *(undefined4 *)((char *)earlyPoolBegin + uVar2 * 8 + 4) = 0; @@ -57840,11 +57840,11 @@ LAB_007d6c46: } LAB_007d6cfb: uVar2 = 0; - uVar4 = (int)earlyPoolEnd - (int)earlyPoolBegin >> 3; + uVar4 = GHIDRA_INT(earlyPoolEnd) - GHIDRA_INT(earlyPoolBegin) >> 3; if (uVar4 != 0) { do { if (*(int *)((char *)earlyPoolBegin + uVar2 * 8) == 0xb) { - weightPtr = (int *)((int)earlyPoolBegin + uVar2 * 8 + 4); + weightPtr = (int *)(GHIDRA_INT(earlyPoolBegin) + uVar2 * 8 + 4); *weightPtr = *weightPtr + 1; if (*weightPtr < 0) { *(undefined4 *)((char *)earlyPoolBegin + uVar2 * 8 + 4) = 0; @@ -57889,9 +57889,9 @@ LAB_007d6d73: local_4c = 7; spellRngCopy->_seed = uVar2; weightRoll = 0; - uVar5 = (int)earlyPoolEnd - (int)earlyPoolData >> 3; + uVar5 = GHIDRA_INT(earlyPoolEnd) - GHIDRA_INT(earlyPoolData) >> 3; if (uVar5 != 0) { - weightPtr = (int *)((int)earlyPoolData + 4); + weightPtr = (int *)(GHIDRA_INT(earlyPoolData) + 4); do { weightRoll = weightRoll + *weightPtr; weightPtr = weightPtr + 2; @@ -57914,17 +57914,17 @@ LAB_007d6d73: } cumulativeWeight = 0; uVar2 = 0; - uVar4 = (int)earlyPoolEnd - (int)earlyPoolData >> 3; + uVar4 = GHIDRA_INT(earlyPoolEnd) - GHIDRA_INT(earlyPoolData) >> 3; if (uVar4 == 0) { LAB_007d6e6a: KAGE_LogMessage(0x10,(byte *) "No weights were added. At least one outcome needs weight."); } else { - weightPtr = (int *)((int)earlyPoolData + 4); + weightPtr = (int *)(GHIDRA_INT(earlyPoolData) + 4); do { cumulativeWeight = cumulativeWeight + *weightPtr; - if ((int)weightRoll < cumulativeWeight) { + if (GHIDRA_INT(weightRoll) < cumulativeWeight) { bVar3 = (byte)*(undefined4 *)((char *)earlyPoolData + uVar2 * 8); goto LAB_007d6e7b; } @@ -57960,9 +57960,9 @@ LAB_007d6e7b: local_4c = 7; spellRngCopy->_seed = uVar2; weightRoll = 0; - uVar5 = (int)midPoolEnd - (int)midPoolData >> 3; + uVar5 = GHIDRA_INT(midPoolEnd) - GHIDRA_INT(midPoolData) >> 3; if (uVar5 != 0) { - weightPtr = (int *)((int)midPoolData + 4); + weightPtr = (int *)(GHIDRA_INT(midPoolData) + 4); do { weightRoll = weightRoll + *weightPtr; weightPtr = weightPtr + 2; @@ -57985,12 +57985,12 @@ LAB_007d6e7b: } cumulativeWeight = 0; uVar2 = 0; - uVar4 = (int)midPoolEnd - (int)midPoolData >> 3; + uVar4 = GHIDRA_INT(midPoolEnd) - GHIDRA_INT(midPoolData) >> 3; if (uVar4 == 0) goto LAB_007d6f8c; - weightPtr = (int *)((int)midPoolData + 4); + weightPtr = (int *)(GHIDRA_INT(midPoolData) + 4); do { cumulativeWeight = cumulativeWeight + *weightPtr; - if ((int)weightRoll < cumulativeWeight) { + if (GHIDRA_INT(weightRoll) < cumulativeWeight) { bVar3 = (byte)*(undefined4 *)((char *)midPoolData + uVar2 * 8); goto LAB_007d6f9d; } @@ -58017,9 +58017,9 @@ LAB_007d6f88: spellRngCopy->_seed = local_4c; uVar5 = 0; local_54 = 7; - uVar2 = (int)latePoolEndCopy - (int)latePoolDataCopy >> 3; + uVar2 = GHIDRA_INT(latePoolEndCopy) - GHIDRA_INT(latePoolDataCopy) >> 3; if (uVar2 != 0) { - weightPtr = (int *)((int)latePoolDataCopy + 4); + weightPtr = (int *)(GHIDRA_INT(latePoolDataCopy) + 4); do { uVar5 = uVar5 + *weightPtr; weightPtr = weightPtr + 2; @@ -58042,12 +58042,12 @@ LAB_007d6f88: } cumulativeWeight = 0; uVar2 = 0; - uVar4 = (int)latePoolEnd - (int)latePoolDataCopy >> 3; + uVar4 = GHIDRA_INT(latePoolEnd) - GHIDRA_INT(latePoolDataCopy) >> 3; if (uVar4 != 0) { - weightPtr = (int *)((int)latePoolDataCopy + 4); + weightPtr = (int *)(GHIDRA_INT(latePoolDataCopy) + 4); do { cumulativeWeight = cumulativeWeight + *weightPtr; - if ((int)uVar5 < cumulativeWeight) { + if (GHIDRA_INT(uVar5) < cumulativeWeight) { bVar3 = (byte)*(undefined4 *)((char *)latePoolDataCopy + uVar2 * 8); goto LAB_007d6f9d; } @@ -58099,43 +58099,43 @@ LAB_007d6f9d: } uVar2 = uVar2 + 1; } while (uVar2 < 0x13); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; if (earlyPoolData != (void *)0x0) { - uVar2 = ((int)earlyPoolCapacity - (int)earlyPoolData >> 3) * 8; + uVar2 = (GHIDRA_INT(earlyPoolCapacity) - GHIDRA_INT(earlyPoolData) >> 3) * 8; freeBlock = earlyPoolData; if (0xfff < uVar2) { freeBlock = *(void **)((char *)earlyPoolData + -4); uVar2 = uVar2 + 0x23; - if (0x1f < (uint)((int)earlyPoolData + (-4 - (int)freeBlock))) goto LAB_007d7282; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(earlyPoolData) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_007d7282; } operator_delete(freeBlock,uVar2); earlyPoolBegin = (void *)0x0; earlyPoolEnd = (undefined4 *)0x0; earlyPoolCapacity = (undefined4 *)0x0; } - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; if (midPoolData != (void *)0x0) { - uVar2 = ((int)midPoolCapacity - (int)midPoolData >> 3) * 8; + uVar2 = (GHIDRA_INT(midPoolCapacity) - GHIDRA_INT(midPoolData) >> 3) * 8; freeBlock = midPoolData; if (0xfff < uVar2) { freeBlock = *(void **)((char *)midPoolData + -4); uVar2 = uVar2 + 0x23; - if (0x1f < (uint)((int)midPoolData + (-4 - (int)freeBlock))) goto LAB_007d7282; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(midPoolData) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_007d7282; } operator_delete(freeBlock,uVar2); midPoolBegin = (void *)0x0; midPoolEnd = (undefined4 *)0x0; midPoolCapacity = (undefined4 *)0x0; } - local_8._0_1_ = 0xff; - local_8._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0xffffff; if (latePoolDataCopy != (void *)0x0) { - uVar2 = (int)latePoolCapacity - (int)latePoolDataCopy & 0xfffffff8; + uVar2 = GHIDRA_INT(latePoolCapacity) - GHIDRA_INT(latePoolDataCopy) & 0xfffffff8; freeBlock = latePoolDataCopy; if (0xfff < uVar2) { freeBlock = *(void **)((char *)latePoolDataCopy + -4); uVar2 = uVar2 + 0x23; - if (0x1f < (uint)((int)latePoolDataCopy + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(latePoolDataCopy) + (-4 - GHIDRA_INT(freeBlock))))) { LAB_007d7282: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -58184,11 +58184,11 @@ void Entity_Player::UsePoopSpell(uint param_2) EntityPtr *parentRef; manager = g_manager; - securityCookie = __security_cookie ^ (uint)auStack_68; + securityCookie = __security_cookie ^ GHIDRA_UINT(auStack_68); collectibleRngs = (this->_collectibleRNGs)._begin; - poopRngSeed = (uint *)((int)collectibleRngs + 0x17a0); - if (((-1 < (int)param_2) && (param_2 < 0xc)) && - (local_64 = (EntityPtr *)(&PTR_00b6ba00)[param_2], 0 < (int)local_64)) { + poopRngSeed = (uint *)(GHIDRA_INT(collectibleRngs) + 0x17a0); + if (((-1 < GHIDRA_INT(param_2)) && (param_2 < 0xc)) && + (local_64 = (EntityPtr *)(&PTR_00b6ba00)[param_2], 0 < GHIDRA_INT(local_64))) { rngResult = *poopRngSeed; if (rngResult == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -58207,41 +58207,41 @@ void Entity_Player::UsePoopSpell(uint param_2) rngResult = rngResult >> ((byte)*(undefined4 *)((char *)collectibleRngs + 0x17ac) & 0x1f) ^ rngResult; *poopRngSeed = rngResult; - spawned = ((Game *)(game))->Game::SpawnEx(0xf5,(uint)local_64,&this->_pos,&g_vectorZero,(Entity *)this,0, + spawned = ((Game *)(game))->Game::SpawnEx(0xf5,GHIDRA_UINT(local_64),&this->_pos,&g_vectorZero,(Entity *)this,0, rngResult,0); spawned->Update(); if ((spawned->_sprite)._animState._animData != (void *)0x0) { AnimationState::AdvancePosition (&(spawned->_sprite)._animState, - *(int *)((int)(spawned->_sprite)._animState._animData + 0x30) + -1); + *(int *)(GHIDRA_INT((spawned->_sprite)._animState._animData) + 0x30) + -1); } TryHoldEntity(this,spawned); manager = g_manager; local_64 = (EntityPtr *)0x25f; seed_fart_sound_override((int *)&local_64); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_64,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_64),1.0,2,0,1.0,0.0); return; } switch(param_2) { case 8: local_64 = (EntityPtr *)0x25; seed_fart_sound_override((int *)&local_64); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_64,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_64),1.0,2,0,1.0,0.0); manager = g_manager; local_64 = (EntityPtr *)0x95; seed_fart_sound_override((int *)&local_64); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_64,1.0,2,0,1.5,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_64),1.0,2,0,1.5,0.0); rngResult = Random(); local_60.x = (float)((Game *)(g_game))->Game::SpawnEx(1000,0xc3,&this->_pos,&g_vectorZero,(Entity *)this,1, rngResult,0); oldParent = ((Entity *)local_60.x)->_parent; - pAVar3 = &((Entity *)((int)local_60.x + 0x410))->_sprite; + pAVar3 = &((Entity *)(GHIDRA_INT(local_60.x) + 0x410))->_sprite; (pAVar3->_filename)._buf[4] = '$'; (pAVar3->_filename)._buf[5] = '\0'; (pAVar3->_filename)._buf[6] = '\0'; (pAVar3->_filename)._buf[7] = '\0'; parentRef = &((Entity *)local_60.x)->_parent; - pAVar3 = &((Entity *)((int)local_60.x + 0x410))->_sprite; + pAVar3 = &((Entity *)(GHIDRA_INT(local_60.x) + 0x410))->_sprite; (pAVar3->_filename)._buf[8] = '$'; (pAVar3->_filename)._buf[9] = '\0'; (pAVar3->_filename)._buf[10] = '\0'; @@ -58283,24 +58283,24 @@ void Entity_Player::UsePoopSpell(uint param_2) spawned = (Entity *) __RTDynamicCast(spawned,0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Bomb::RTTI_Type_Descriptor,0); - spawned[1]._type = (int)bombFlags._l; - spawned[1]._variant = bombFlags._l._4_4_; - spawned[1]._subtype = (int)bombFlags._h; - spawned[1]._spawnerType = bombFlags._h._4_4_; + spawned[1]._type = GHIDRA_INT(bombFlags._l); + spawned[1]._variant = (*(undefined4 *)((char *)&(bombFlags._l) + 0x4)); + spawned[1]._subtype = GHIDRA_INT(bombFlags._h); + spawned[1]._spawnerType = (*(undefined4 *)((char *)&(bombFlags._h) + 0x4)); spawned[1]._sprite._filename._buf[0xb] = '\x01'; TryHoldEntity(this,spawned); manager = g_manager; local_64 = (EntityPtr *)0x25f; seed_fart_sound_override((int *)&local_64); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_64,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_64),1.0,2,0,1.0,0.0); return; case 0xb: local_64 = (EntityPtr *)0x25; seed_fart_sound_override((int *)&local_64); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_64,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_64),1.0,2,0,1.0,0.0); ((TemporaryEffects *)(&this->_temporaryeffects))->TemporaryEffects::RemoveNullEffect(0,-1); nullItems = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)nullItems & 0xfffffffcU) < 1) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(nullItems) & 0xfffffffcU)) < 1) { local_60.x = 0.0; } else { @@ -58372,10 +58372,10 @@ void Entity_Player::RecomputeWispCollectibles(Entity_Familiar *wisp) pEVar10 = (Entity_Familiar *)wisp->_subtype; wisp = pEVar10; std::set::find_node(local_44,&wisp); - if (((*(char *)((int)&(wispFoundNode->_damageEvents)._end + 1) == '\0') && - ((int)(wispFoundNode->_damageEvents)._capacity <= (int)pEVar10)) && + if (((*(char *)(GHIDRA_INT(&(wispFoundNode->_damageEvents)._end) + 1) == '\0') && + (GHIDRA_INT((wispFoundNode->_damageEvents)._capacity) <= GHIDRA_INT(pEVar10))) && (wispFoundNode != pEVar7)) { - wispFoundNode->_pendingDamage = (float)((int)wispFoundNode->_pendingDamage + 1); + wispFoundNode->_pendingDamage = (float)(GHIDRA_INT(wispFoundNode->_pendingDamage) + 1); } else { local_24 = (std_map *)0x1; @@ -58395,10 +58395,10 @@ void Entity_Player::RecomputeWispCollectibles(Entity_Familiar *wisp) pEVar7 = *(Entity_Familiar **)(iVar8 + 0x30); wisp = pEVar7; std::set::find_node(local_50,&wisp); - if (((*(char *)((int)&(roomWispFoundNode->_damageEvents)._end + 1) == '\0') && - ((int)(roomWispFoundNode->_damageEvents)._capacity <= (int)pEVar7)) && + if (((*(char *)(GHIDRA_INT(&(roomWispFoundNode->_damageEvents)._end) + 1) == '\0') && + (GHIDRA_INT((roomWispFoundNode->_damageEvents)._capacity) <= GHIDRA_INT(pEVar7))) && (roomWispFoundNode != newWispItems)) { - roomWispFoundNode->_pendingDamage = (float)((int)roomWispFoundNode->_pendingDamage + 1); + roomWispFoundNode->_pendingDamage = (float)(GHIDRA_INT(roomWispFoundNode->_pendingDamage) + 1); } else { local_24 = (std_map *)0x1; @@ -58417,11 +58417,11 @@ void Entity_Player::RecomputeWispCollectibles(Entity_Familiar *wisp) wisp = pEVar10; local_1c = pEVar7; removedItems = operator_new(0x14); - *removedItems = (int)removedItems; - removedItems[1] = (int)removedItems; - removedItems[2] = (int)removedItems; + *removedItems = GHIDRA_INT(removedItems); + removedItems[1] = GHIDRA_INT(removedItems); + removedItems[2] = GHIDRA_INT(removedItems); *(undefined2 *)(removedItems + 3) = 0x101; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); game = g_game; LAB_007d7900: while (oldListHead = local_24->_head, pEVar7 != oldListHead) { @@ -58429,15 +58429,15 @@ LAB_007d7900: LAB_007d7a52: pvVar2 = (pEVar7->_damageEvents)._capacity; if (game == (Game *)0x0) { - if (-1 < (int)pvVar2) goto LAB_007d7a8a; + if (-1 < GHIDRA_INT(pvVar2)) goto LAB_007d7a8a; } else { - if ((int)pvVar2 < 0) { - if (((int)pvVar2 < 0) && + if (GHIDRA_INT(pvVar2) < 0) { + if ((GHIDRA_INT(pvVar2) < 0) && (pvVar3 = (game->_proceduralItemManager)._proceduralItems._begin, - (int)~(uint)pvVar2 < - (int)(game->_proceduralItemManager)._proceduralItems._end - (int)pvVar3 >> 2)) { - iVar8 = **(int **)((char *)pvVar3 + ~(uint)pvVar2 * 4); + GHIDRA_INT(~GHIDRA_UINT(pvVar2)) < + GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar3) >> 2)) { + iVar8 = **(int **)((char *)pvVar3 + ~GHIDRA_UINT(pvVar2) * 4); } else { iVar8 = 0; @@ -58446,9 +58446,9 @@ LAB_007d7a52: else { LAB_007d7a8a: pvVar3 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar3 >> 2 <= (int)pvVar2) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar3) >> 2 <= GHIDRA_INT(pvVar2)) goto LAB_007d7ab7; - iVar8 = *(int *)((char *)pvVar3 + (int)pvVar2 * 4); + iVar8 = *(int *)((char *)pvVar3 + GHIDRA_INT(pvVar2) * 4); } if (iVar8 != 0) { player->_cacheFlags = player->_cacheFlags | *(uint *)(iVar8 + 0x54); @@ -58466,19 +58466,19 @@ LAB_007d7ab7: else { pvVar3 = (pEVar7->_damageEvents)._capacity; pvVar2 = (pEVar10->_damageEvents)._capacity; - if ((int)pvVar2 < (int)pvVar3) goto LAB_007d7914; - if ((int)pvVar3 < (int)pvVar2) goto LAB_007d7a52; + if (GHIDRA_INT(pvVar2) < GHIDRA_INT(pvVar3)) goto LAB_007d7914; + if (GHIDRA_INT(pvVar3) < GHIDRA_INT(pvVar2)) goto LAB_007d7a52; if (pEVar7->_pendingDamage != pEVar10->_pendingDamage) { if (game == (Game *)0x0) { - if (-1 < (int)pvVar3) goto LAB_007d79a5; + if (-1 < GHIDRA_INT(pvVar3)) goto LAB_007d79a5; } else { - if ((int)pvVar3 < 0) { - if (((int)pvVar3 < 0) && + if (GHIDRA_INT(pvVar3) < 0) { + if ((GHIDRA_INT(pvVar3) < 0) && (pvVar2 = (game->_proceduralItemManager)._proceduralItems._begin, - (int)~(uint)pvVar3 < - (int)(game->_proceduralItemManager)._proceduralItems._end - (int)pvVar2 >> 2)) { - iVar8 = **(int **)((char *)pvVar2 + ~(uint)pvVar3 * 4); + GHIDRA_INT(~GHIDRA_UINT(pvVar3)) < + GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar2) >> 2)) { + iVar8 = **(int **)((char *)pvVar2 + ~GHIDRA_UINT(pvVar3) * 4); } else { iVar8 = 0; @@ -58487,9 +58487,9 @@ LAB_007d7ab7: else { LAB_007d79a5: pvVar2 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar2 >> 2 <= (int)pvVar3) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar2) >> 2 <= GHIDRA_INT(pvVar3)) goto LAB_007d79d2; - iVar8 = *(int *)((char *)pvVar2 + (int)pvVar3 * 4); + iVar8 = *(int *)((char *)pvVar2 + GHIDRA_INT(pvVar3) * 4); } if (iVar8 != 0) { player->_cacheFlags = player->_cacheFlags | *(uint *)(iVar8 + 0x54); @@ -58513,17 +58513,17 @@ LAB_007d79d2: LAB_007d7914: pvVar2 = (pEVar10->_damageEvents)._capacity; if (game == (Game *)0x0) { - if (-1 < (int)pvVar2) goto LAB_007d79f5; + if (-1 < GHIDRA_INT(pvVar2)) goto LAB_007d79f5; LAB_007d7a24: item = (ItemConfig_Item *)0x0; } else { - if ((int)pvVar2 < 0) { - if (((int)pvVar2 < 0) && + if (GHIDRA_INT(pvVar2) < 0) { + if ((GHIDRA_INT(pvVar2) < 0) && (pvVar3 = (game->_proceduralItemManager)._proceduralItems._begin, - (int)~(uint)pvVar2 < - (int)(game->_proceduralItemManager)._proceduralItems._end - (int)pvVar3 >> 2)) { - item = (ItemConfig_Item *)**(int **)((char *)pvVar3 + ~(uint)pvVar2 * 4); + GHIDRA_INT(~GHIDRA_UINT(pvVar2)) < + GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar3) >> 2)) { + item = (ItemConfig_Item *)**(int **)((char *)pvVar3 + ~GHIDRA_UINT(pvVar2) * 4); } else { item = (ItemConfig_Item *)0x0; @@ -58532,9 +58532,9 @@ LAB_007d7a24: else { LAB_007d79f5: pvVar3 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar3 >> 2 <= (int)pvVar2) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar3) >> 2 <= GHIDRA_INT(pvVar2)) goto LAB_007d7a24; - item = *(ItemConfig_Item **)((char *)pvVar3 + (int)pvVar2 * 4); + item = *(ItemConfig_Item **)((char *)pvVar3 + GHIDRA_INT(pvVar2) * 4); } if (item != (ItemConfig_Item *)0x0) { player->_cacheFlags = player->_cacheFlags | item->cacheFlags; @@ -58581,21 +58581,21 @@ LAB_007d7bcf: this_00 = player; uVar9 = removedNode[4]; if (game == (Game *)0x0) { - if (-1 < (int)uVar9) goto LAB_007d7b33; + if (-1 < GHIDRA_INT(uVar9)) goto LAB_007d7b33; LAB_007d7b52: item = (ItemConfig_Item *)0x0; } - else if ((int)uVar9 < 0) { - if ((-1 < (int)uVar9) || + else if (GHIDRA_INT(uVar9) < 0) { + if ((-1 < GHIDRA_INT(uVar9)) || (pvVar2 = (game->_proceduralItemManager)._proceduralItems._begin, - (int)(game->_proceduralItemManager)._proceduralItems._end - (int)pvVar2 >> 2 <= (int)~uVar9 + GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar2) >> 2 <= GHIDRA_INT(~uVar9) )) goto LAB_007d7b52; item = (ItemConfig_Item *)**(undefined4 **)((char *)pvVar2 + ~uVar9 * 4); } else { LAB_007d7b33: pvVar2 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar2 >> 2 <= (int)uVar9) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar2) >> 2 <= GHIDRA_INT(uVar9)) goto LAB_007d7b52; item = *(ItemConfig_Item **)((char *)pvVar2 + uVar9 * 4); } @@ -58675,7 +58675,7 @@ void Entity_Player::trigger_cracked_orb(Vector *effectPos) puStack_c = &LAB_00b0040d; local_10 = ExceptionList; - uVar5 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar5 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; iVar10 = 0; piVar7 = (int *)0x0; @@ -58710,9 +58710,9 @@ void Entity_Player::trigger_cracked_orb(Vector *effectPos) unrevealedBegin = unrevealedRooms; unrevealedCapEnd = piVar7; if (unrevealedRooms != pushCursor) { - roomCount = (int)pushCursor - (int)unrevealedRooms >> 2; + roomCount = GHIDRA_INT(pushCursor) - GHIDRA_INT(unrevealedRooms) >> 2; pvVar8 = (player->_collectibleRNGs)._begin; - rngSeed = (uint *)((int)pvVar8 + 0x2a30); + rngSeed = (uint *)(GHIDRA_INT(pvVar8) + 0x2a30); uVar9 = *rngSeed; if (uVar9 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -58739,7 +58739,7 @@ void Entity_Player::trigger_cracked_orb(Vector *effectPos) manager = g_manager; local_24 = (Game *)0x352; seed_fart_sound_override((int *)&local_24); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_24,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_24),1.0,2,0,1.0,0.0); } } isAnyOpened = '\0'; @@ -58749,7 +58749,7 @@ void Entity_Player::trigger_cracked_orb(Vector *effectPos) local_1c = 0x24; do { if (((local_24 < (Game *)0x1c0) && - (piVar7 = *(int **)(local_1c + (int)pvVar8), piVar7 != (int *)0x0)) && + (piVar7 = *(int **)(local_1c + GHIDRA_INT(pvVar8)), piVar7 != (int *)0x0)) && ((((iVar10 = piVar7[1], iVar10 == 2 || (((((iVar10 == 3 || (iVar10 == 4)) || (iVar10 == 5)) || ((iVar10 == 6 || (iVar10 == 0x16)))) || (iVar10 == 0x18)))) || @@ -58777,10 +58777,10 @@ void Entity_Player::trigger_cracked_orb(Vector *effectPos) isAnyOpened = '\x01'; } LAB_007d7f10: - local_24 = (Game *)((int)&local_24->_stage + 1); + local_24 = (Game *)(GHIDRA_INT(&local_24->_stage) + 1); local_1c = local_1c + 4; pvVar8 = g_game->_room; - } while ((int)local_24 < *(int *)((char *)pvVar8 + 0x10) * *(int *)((char *)pvVar8 + 0xc)); + } while (GHIDRA_INT(local_24) < *(int *)((char *)pvVar8 + 0x10) * *(int *)((char *)pvVar8 + 0xc)); } local_1c = 0; local_24 = (Game *)0x724; @@ -58788,7 +58788,7 @@ LAB_007d7f10: pGVar6 = local_24; local_1c = local_1c + 1; if ((local_1c < 9) && - (door = *(GridEntity_Door **)((char *)g_game->_room + (int)(local_24->_roomList + -1) + 0xa4), + (door = *(GridEntity_Door **)((char *)g_game->_room + GHIDRA_INT((local_24->_roomList + -1)) + 0xa4), door != (GridEntity_Door *)0x0)) { iVar10 = (door->_desc)._variant; if (((iVar10 == 1) || (((iVar10 == 4 || (iVar10 == 3)) || (iVar10 == 2)))) || (iVar10 == 5)) { @@ -58822,7 +58822,7 @@ LAB_007d80f4: local_24 = pGVar6; } local_24 = (Game *)&local_24->_stageType; - if (0x743 < (int)local_24) { + if (0x743 < GHIDRA_INT(local_24)) { if (isAnyOpened != '\0') { uVar5 = Random(); orbEffect = (Entity_Effect *) @@ -58847,12 +58847,12 @@ LAB_007d80f4: orbEffect->Update(); } if (unrevealedBegin != (int *)0x0) { - uVar5 = (int)unrevealedCapEnd - (int)unrevealedBegin & 0xfffffffc; + uVar5 = GHIDRA_INT(unrevealedCapEnd) - GHIDRA_INT(unrevealedBegin) & 0xfffffffc; piVar7 = unrevealedBegin; if (0xfff < uVar5) { piVar7 = (int *)unrevealedBegin[-1]; uVar5 = uVar5 + 0x23; - if (0x1f < (uint)((int)unrevealedBegin + (-4 - (int)piVar7))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(unrevealedBegin) + (-4 - GHIDRA_INT(piVar7))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -58888,7 +58888,7 @@ uint Entity_Player::AddItemCard(uint itemID) if (starterDeckCount + 3 < 0x14) { starterDeckCount = starterDeckCount + 3; } - if ((int)pvVar2 - (int)pvVar3 >> 2 == starterDeckCount) { + if (GHIDRA_INT(pvVar2) - GHIDRA_INT(pvVar3) >> 2 == starterDeckCount) { Room::FindFreePickupSpawnPosition(g_game->_room,&dropPos,&this->_pos,0.0,0,0,0); uVar4 = Random(); droppedCard = ((Game *)(g_game))->Game::SpawnEx(5,300,&dropPos,&g_vectorZero,(Entity *)this, @@ -58897,24 +58897,24 @@ uint Entity_Player::AddItemCard(uint itemID) droppedCard[1]._sprite._championColor._offset[0] = 5.60519e-45; } pvVar3 = (this->_itemCards)._begin; - pvVar2 = (void *)((int)pvVar3 + 4); - memmove(pvVar3,pvVar2,(int)(this->_itemCards)._end - (int)pvVar2); + pvVar2 = (void *)(GHIDRA_INT(pvVar3) + 4); + memmove(pvVar3,pvVar2,GHIDRA_INT((this->_itemCards)._end) - GHIDRA_INT(pvVar2)); ppvVar1 = &(this->_itemCards)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + -4); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + -4); } } pvVar2 = (this->_itemCards)._end; pvVar3 = (this->_itemCards)._begin; starterDeckCount = GetCollectibleNum(this,0xfb,0); uVar4 = 0x14; - if ((int)(starterDeckCount + 3U) < 0x14) { + if (GHIDRA_INT((starterDeckCount + 3U)) < 0x14) { uVar4 = starterDeckCount + 3U; } - if (uVar4 <= (uint)((int)pvVar2 - (int)pvVar3 >> 2)) { + if (uVar4 <= GHIDRA_UINT((GHIDRA_INT(pvVar2) - GHIDRA_INT(pvVar3) >> 2))) { return 0; } if (itemID == 0) { - uVar4 = ((RNG *)((RNG *)((int)(this->_collectibleRNGs)._begin + 0x2c60)))->RNG::Next(); + uVar4 = ((RNG *)((RNG *)(GHIDRA_INT((this->_collectibleRNGs)._begin) + 0x2c60)))->RNG::Next(); itemID = ItemPool::GetCardImpl(uVar4); } uVar4 = itemID; @@ -58927,14 +58927,14 @@ uint Entity_Player::AddItemCard(uint itemID) else if (_Src == cardsEnd) { *cardsEnd = itemID; ppvVar1 = &(this->_itemCards)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 4); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 4); } else { *cardsEnd = cardsEnd[-1]; ppvVar1 = &(this->_itemCards)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 4); - _Size = (int)cardsEnd + (-4 - (int)_Src); - memmove((void *)((int)cardsEnd - _Size),_Src,_Size); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 4); + _Size = GHIDRA_INT(cardsEnd) + (-4 - GHIDRA_INT(_Src)); + memmove((void *)(GHIDRA_INT(cardsEnd) - _Size),_Src,_Size); *_Src = uVar4; } HUD::mark_all_slots_dirty(&g_game->_hud,0,0); @@ -58995,7 +58995,7 @@ LAB_007d8486: do { flagsHigh = Random(); uVar4 = Random(); - local_1c = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + local_1c = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_1c = local_1c + local_1c; cosAngle = cos(local_1c); @@ -59003,15 +59003,15 @@ LAB_007d8486: velocity.x = cosAngle + cosAngle; velocity.y = velocity.y + velocity.y; pEVar3 = ((Game *)(g_game))->Game::SpawnEx(3,0xee,&this->_pos,&velocity,(Entity *)this,7,flagsHigh,0); - flagsHigh = *(undefined4 *)((int)&pEVar3->_flags + 4); + flagsHigh = *(undefined4 *)(GHIDRA_INT(&pEVar3->_flags) + 4); iVar5 = *(int *)pEVar3; - *(uint *)&pEVar3->_flags = (uint)pEVar3->_flags & 0xfffffffb; - *(undefined4 *)((int)&pEVar3->_flags + 4) = flagsHigh; + *(uint *)&pEVar3->_flags = GHIDRA_UINT(pEVar3->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&pEVar3->_flags) + 4) = flagsHigh; (**(code **)(iVar5 + 0xc))(); manager = g_manager; local_1c = 1.00893e-43; seed_fart_sound_override((int *)&local_1c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_1c,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_1c),1.0,2,0,1.0,0.0); flagsHigh = Random(); bloodPoof = ((Game *)(g_game))->Game::SpawnEx(1000,2,&this->_pos,&g_vectorZero,(Entity *)0x0,2,flagsHigh,0); bloodPoof->SetColor(&pEVar3->_splatColor,0xffffffff,0xff,0,1); @@ -59077,7 +59077,7 @@ byte Entity_Player::spawn_ghost_corpse() corpseEffect = (EntityPtr) ((Game *)(g_game))->Game::SpawnEx(1000,6,&this->_pos,&g_vectorZero,(Entity *)this,0,uVar3,0); ((ANM2 *)(&spriteCopy))->ANM2::ANM2(&this->_sprite); - Isaac::SwapANM2((ANM2 *)((int)corpseEffect + 0x48),&spriteCopy); + Isaac::SwapANM2((ANM2 *)(GHIDRA_INT(corpseEffect) + 0x48),&spriteCopy); local_8 = 0; ((ANM2 *)(this_00))->ANM2::Reset(); ((AnimationState *)(&spriteCopy._overlayAnimState))->AnimationState::~AnimationState(); @@ -59085,11 +59085,11 @@ byte Entity_Player::spawn_ghost_corpse() ((std::string *)(spriteCopy._animDefaultName._buf))->std::string::_Tidy_deallocate(); ((std::string *)((char *)&spriteCopy))->std::string::_Tidy_deallocate(); local_8 = 0xffffffff; - ghostLayer = ((ANM2 *)((ANM2 *)((int)corpseEffect + 0x48)))->ANM2::GetLayer((byte *)"ghost"); + ghostLayer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(corpseEffect) + 0x48)))->ANM2::GetLayer((byte *)"ghost"); if (ghostLayer != (LayerState *)0x0) { ghostLayer->_visible = 0; } - ((AnimationState *)((AnimationState *)((int)corpseEffect + 0x98)))->AnimationState::SetAnimationData((void *)0x0); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(corpseEffect) + 0x98)))->AnimationState::SetAnimationData((void *)0x0); *(float *)((char *)corpseEffect + 0x14c) = 1.0; animData = *(void **)((char *)corpseEffect + 0x7c); if (animData != (byte *)0x0) { @@ -59103,7 +59103,7 @@ byte Entity_Player::spawn_ghost_corpse() isLess = bVar2 < (byte)*deathCursor; if (bVar2 != *deathCursor) { LAB_007d88c0: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_007d88c5; } if (bVar2 == 0) break; @@ -59118,19 +59118,19 @@ LAB_007d88c5: if ((uVar3 == 0) && ((animData[0x34] == 0 || (*(byte *)((char *)corpseEffect + 0x8c) != 0)))) goto LAB_007d88f8; } - bVar2 = ((ANM2 *)((ANM2 *)((int)corpseEffect + 0x48)))->ANM2::SetAnimation((byte *)"Death",1); + bVar2 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(corpseEffect) + 0x48)))->ANM2::SetAnimation((byte *)"Death",1); if (bVar2 != 0) { - ((AnimationState *)((AnimationState *)((int)corpseEffect + 0x78)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(corpseEffect) + 0x78)))->AnimationState::Rewind(); *(byte *)((char *)corpseEffect + 0x8c) = 1; } LAB_007d88f8: if (*(void **)((char *)corpseEffect + 0x7c) != (void *)0x0) { - ((AnimationState *)((AnimationState *)((int)corpseEffect + 0x78)))->AnimationState::SetFrameFloat(6.0); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(corpseEffect) + 0x78)))->AnimationState::SetFrameFloat(6.0); } *(uint *)((char *)corpseEffect + 0x168) = *(uint *)((char *)corpseEffect + 0x168) | 0x200000; *(undefined4 *)((char *)corpseEffect + 0x16c) = *(undefined4 *)((char *)corpseEffect + 0x16c); iVar1 = *(int *)corpseEffect; - *(undefined4 *)&(*(undefined1 *)((char *)(((Entity *)((int)corpseEffect + 0x410))) + 0x40)) = 10; + *(undefined4 *)&(*(undefined1 *)((char *)(((Entity *)(GHIDRA_INT(corpseEffect) + 0x410))) + 0x40)) = 10; (**(code **)(iVar1 + 0xc))(); pEVar4 = &local_14->_astralProjectionBody; if (*pEVar4 != (EntityPtr)0x0) { @@ -59180,10 +59180,10 @@ void Entity_Player::AddCurseMistEffect() AddCurseMistEffect(this->_backupPlayer); } qVar4 = this->_flags; - puVar2 = (uint *)((int)&this->_flags + 4); + puVar2 = (uint *)(GHIDRA_INT(&this->_flags) + 4); *puVar2 = *puVar2 & 0xfffffffb; this->_cacheFlags = this->_cacheFlags | 0xffff; - *(int *)&this->_flags = (int)qVar4; + *(int *)&this->_flags = GHIDRA_INT(qVar4); this->_bleedOutHealth = 0; this->_hasCurseMistEffect = 1; UpdateCostumes(this); @@ -59201,14 +59201,14 @@ void Entity_Player::AddCurseMistEffect() tmpBackup[1] = 0; tmpBackup[2] = 0; local_28 = 0; - familiarList._0_4_ = 0; + (*(undefined4 *)((char *)&(familiarList) + 0x0)) = 0; familiarList._data = (void *)0x0; familiarList._capacity = 0; familiarList._size = 0; restore_curse_mist_backup(this,tmpBackup); (this->_curseMistFamiliars)._end = (this->_curseMistFamiliars)._begin; EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&familiarList,3,-1,-1,0,0); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&familiarList,3,-1,-1,0,0); local_8 = 0; familiarIdx = 0; if (familiarList._size != 0) { @@ -59244,7 +59244,7 @@ void Entity_Player::AddCurseMistEffect() backupSlot[0xb] = 0; backupSlot[0xc] = 0; ppvVar1 = &(this->_curseMistFamiliars)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 0x34); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 0x34); } backupEnd = (this->_curseMistFamiliars)._end; familiar = (Entity_Familiar *) @@ -59252,7 +59252,7 @@ void Entity_Player::AddCurseMistEffect() &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Familiar::RTTI_Type_Descriptor,0 ); - ((Entity_Familiar *)(familiar))->Entity_Familiar::store_backup((void *)((int)backupEnd + -0x34)); + ((Entity_Familiar *)(familiar))->Entity_Familiar::store_backup((void *)(GHIDRA_INT(backupEnd) + -0x34)); familiarEntity = *(int **)((char *)familiarList._data + familiarIdx * 4); if (familiarEntity[0xb] == 0xe7) { (**(code **)(*familiarEntity + 0x28))(); @@ -59260,10 +59260,10 @@ void Entity_Player::AddCurseMistEffect() familiarListData = familiarList._data; } familiarIdx = familiarIdx + 1; - } while (familiarIdx < (uint)familiarList._size); + } while (familiarIdx < GHIDRA_UINT(familiarList._size)); } local_8 = 0xffffffff; - if (familiarList._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(familiarList) + 0x0)) == '\0') { local_8 = 1; tracked_alloc(1,familiarList._data,0); local_8 = 0xffffffff; @@ -59350,7 +59350,7 @@ void Entity_Player::RemoveCurseMistEffect() iVar8 = this->_numCoins + backup->coins; itemOwner = PlayerManager::FirstCollectibleOwner (&g_game->_playerManager,0x1a0,(RNG **)&g_game->_playerManager,1); - iVar3 = (-(uint)(itemOwner != (Entity_Player *)0x0) & 900) + 99; + iVar3 = (-GHIDRA_UINT((itemOwner != (Entity_Player *)0x0)) & 900) + 99; if (iVar8 < iVar3) { iVar3 = iVar8; } @@ -59383,7 +59383,7 @@ void Entity_Player::RemoveCurseMistEffect() (this->_consumablesBackup).goldbomb = bVar2; local_14 = (this->_consumablesBackup).gigabombs + this->_numGigaBombs; piVar7 = (int *)&local_14; - if (iVar3 <= (int)local_14) { + if (iVar3 <= GHIDRA_INT(local_14)) { piVar7 = &(this->_consumablesBackup).bombs; } iVar8 = this->_effectiveSoulCharge + (this->_consumablesBackup).soulcharges; @@ -59402,7 +59402,7 @@ void Entity_Player::RemoveCurseMistEffect() (this->_consumablesBackup).bloodcharges = iVar3; iVar8 = this->_poopMana + (this->_consumablesBackup).poopmana; itemOwner = ((PlayerManager *)(&game->_playerManager))->PlayerManager::FirstBirthrightOwner(0x19); - iVar3 = (-(uint)(itemOwner != (Entity_Player *)0x0) & 0x14) + 9; + iVar3 = (-GHIDRA_UINT((itemOwner != (Entity_Player *)0x0)) & 0x14) + 9; if (iVar8 < iVar3) { iVar3 = iVar8; } @@ -59441,15 +59441,15 @@ void Entity_Player::RemoveCurseMistEffect() *(undefined2 *)((char *)variantCounts + 0xc) = 0x101; local_8 = 0; if (savedFamiliars != (this->_curseMistFamiliars)._end) { - key = (uint *)((int)savedFamiliars + 4); + key = (uint *)(GHIDRA_INT(savedFamiliars) + 4); do { _Find_lower_bound<>(lowerBound,key); if (((*(char *)((char *)lowerBoundNode + 0xd) != '\0') || (*key < *(uint *)((char *)lowerBoundNode + 0x10))) || (lowerBoundNode == variantCounts)) { - puVar4 = map_find_value(&variantCounts,(uint)key); + puVar4 = map_find_value(&variantCounts,GHIDRA_UINT(key)); *puVar4 = 0; } - puVar5 = map_find_value(&variantCounts,(uint)key); + puVar5 = map_find_value(&variantCounts,GHIDRA_UINT(key)); uVar6 = *key; variantIdx = *puVar5; local_14 = variantIdx; @@ -59459,10 +59459,10 @@ void Entity_Player::RemoveCurseMistEffect() uVar6 = *key; } EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&familiars,3,uVar6,-1,0,0); - local_8._0_1_ = 1; + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&familiars,3,uVar6,-1,0,0); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; if (familiars._size != 0) { - variantIdx = -(uint)(variantIdx != 0) & variantIdx; + variantIdx = -GHIDRA_UINT((variantIdx != 0)) & variantIdx; uVar6 = familiars._size - 1U; if (variantIdx < familiars._size - 1U) { uVar6 = variantIdx; @@ -59472,33 +59472,33 @@ void Entity_Player::RemoveCurseMistEffect() &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Familiar::RTTI_Type_Descriptor,0); ((Menu_Stats *)((Menu_Stats *)familiar))->Menu_Stats::Render(key + -1); - *(uint *)&familiar->_flags = (uint)familiar->_flags | 4; + *(uint *)&familiar->_flags = GHIDRA_UINT(familiar->_flags) | 4; iVar3 = familiar->_variant; - *(undefined4 *)((int)&familiar->_flags + 4) = *(undefined4 *)((int)&familiar->_flags + 4); + *(undefined4 *)(GHIDRA_INT(&familiar->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&familiar->_flags) + 4); if (iVar3 == 0xca) { familiar->_subtype = key[1]; } variantIdx = local_14; } - local_8 = (uint)local_8._1_3_ << 8; - if (familiars._0_1_ == '\0') { + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; + if ((*(undefined1 *)((char *)&(familiars) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (familiars._data != (void *)0x0) { uVar6 = *(uint *)((char *)familiars._data + -4); qVar1 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar6; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar6; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar1 < uVar6); - free((uint *)((int)familiars._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar6)); + free((uint *)(GHIDRA_INT(familiars._data) + -4)); } local_8 = local_8 & 0xffffff00; } - piVar7 = map_find_value(&variantCounts,(uint)key); + piVar7 = map_find_value(&variantCounts,GHIDRA_UINT(key)); *piVar7 = variantIdx + 1; puVar5 = key + 0xc; key = key + 0xd; @@ -59515,7 +59515,7 @@ void Entity_Player::RemoveCurseMistEffect() FID_conflict__Erase_tree_>_> (&variantCounts, (fuzzer_allocator_> *)&variantCounts, - *(_Tree_node **)((int)variantCounts + 4)); + *(_Tree_node **)(GHIDRA_INT(variantCounts) + 4)); operator_delete(variantCounts,0x18); } ExceptionList = local_10; @@ -59576,8 +59576,8 @@ void Entity_Player::add_samson_berserk_charge(int amount) if (99999 < berserkItem) { *berserkCharge = 0; collectibles = (g_manager->_itemConfig)._collectibles._begin; - if ((0xb00 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)collectibles & - 0xfffffffcU)) && + if ((0xb00 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(collectibles) & + 0xfffffffcU))) && (berserkItem = *(int *)((char *)collectibles + 0xb00), berserkItem != 0)) { berserkEffect[2] = *(undefined4 *)(berserkItem + 0x78); berserkEffect[1] = 0; @@ -59633,7 +59633,7 @@ void Entity_Player::RevivePlayerGhost() configNode = (manager->_entityConfig)._entities._head; configHead = configNode; } - ANM2Path = (std_string *)((int)configNode + 0x8c); + ANM2Path = (std_string *)(GHIDRA_INT(configNode) + 0x8c); if (configNode == configHead) { ANM2Path = (std_string *)0x74; } @@ -59685,7 +59685,7 @@ void Entity_Player::RevivePlayerGhost() else { iVar2 = GetHealthType(this); this->_redHearts = 0; - this->_soulHearts = (uint)(iVar2 != 2) * 2 + 1; + this->_soulHearts = GHIDRA_UINT((iVar2 != 2)) * 2 + 1; } } } @@ -59751,7 +59751,7 @@ void Entity_Player::MorphToCoopGhost() local_8 = 0xffffffff; puStack_c = &LAB_00b004d5; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; if (this->_playerType != 0x28) { if (this->_playerType == 0x23) { @@ -59850,7 +59850,7 @@ void Entity_Player::MorphToCoopGhost() this->_isInvicible = 1; this->_visible = 1; EvaluateItems(this); - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&wisps,3,0xce,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&wisps,3,0xce,-1,0,0); wispData = wisps._data; local_8 = 0; i = 0; @@ -59865,8 +59865,8 @@ void Entity_Player::MorphToCoopGhost() i = i + 1; } while (i < uVar2); } - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&itemWisps,3,0xed,-1,0,0); - local_8 = CONCAT31(local_8._1_3_,1); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&itemWisps,3,0xed,-1,0,0); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); i = 0; uVar2 = itemWisps._size; if (itemWisps._size != 0) { @@ -59879,33 +59879,33 @@ void Entity_Player::MorphToCoopGhost() i = i + 1; } while (i < uVar2); } - if (itemWisps._0_1_ == '\0') { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + if ((*(undefined1 *)((char *)&(itemWisps) + 0x0)) == '\0') { + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } if (itemWisps._data != (void *)0x0) { uVar2 = *(uint *)((char *)itemWisps._data + -4); qVar1 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar1 < uVar2); - free((void *)((int)itemWisps._data + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar2)); + free((void *)(GHIDRA_INT(itemWisps._data) + -4)); } } local_8 = 0xffffffff; - if (wisps._0_1_ == '\0') { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + if ((*(undefined1 *)((char *)&(wisps) + 0x0)) == '\0') { + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } if (wisps._data != (void *)0x0) { uVar2 = *(uint *)((char *)wisps._data + -4); qVar1 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar1 < uVar2); - free((uint *)((int)wisps._data + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar2)); + free((uint *)(GHIDRA_INT(wisps._data) + -4)); } } local_8 = 0xffffffff; @@ -59939,7 +59939,7 @@ void Entity_Player::reset_body_sprite() _Find_lower_bound<>(findResult,&local_8); if (((*(char *)((char *)node + 0xd) == '\0') && (*(uint *)((char *)node + 0x10) < 0x100101)) && (node != (manager->_entityConfig)._entities._head)) { - playerEntityConfig = (EntityConfig_Entity *)((int)node + 0x18); + playerEntityConfig = (EntityConfig_Entity *)(GHIDRA_INT(node) + 0x18); } else { playerEntityConfig = ((EntityConfig *)(&manager->_entityConfig))->EntityConfig::GetEntity(1,0,0); @@ -59965,10 +59965,10 @@ void Entity_Player::reset_body_sprite() do { Sprite::ReplaceSpritesheet ((Sprite *)sprite,layerId, - (std_string *)((int)(local_8->_entityConfig)._babies._begin + iVar2 + 0x1c)); + (std_string *)(GHIDRA_INT((local_8->_entityConfig)._babies._begin) + iVar2 + 0x1c)); layerId = layerId + 1; iVar1 = extraout_ECX; - } while (layerId < (uint)(local_c->_sprite)._layerCount); + } while (layerId < GHIDRA_UINT((local_c->_sprite)._layerCount)); } ((ANM2 *)(sprite))->ANM2::LoadGraphics((byte)iVar1); return; @@ -60071,10 +60071,10 @@ uint * Entity_Player::CalculateBagOfCraftingOutput(uint *output, byte *bagConten pickupCounts[0x1d] = 0; pickupCounts[0x1e] = 0; pickupCounts[pickup4] = pickupCounts[pickup4] + 1; - local_68 = (std_vector *)(uint)local_64[1]; + local_68 = (std_vector *)GHIDRA_UINT(local_64[1]); poolWeights = (void *)0x0; poolWeightsEnd = (undefined4 *)0x0; - pickupCounts[(int)local_68] = pickupCounts[(int)local_68] + 1; + pickupCounts[GHIDRA_INT(local_68)] = pickupCounts[GHIDRA_INT(local_68)] + 1; pickup2 = local_64[2]; pickup6 = local_64[6]; poolWeightsCapacityEnd = (undefined4 *)0x0; @@ -60085,13 +60085,13 @@ uint * Entity_Player::CalculateBagOfCraftingOutput(uint *output, byte *bagConten pickup7 = local_64[7]; pickupCounts[pickup6] = pickupCounts[pickup6] + 1; pickupCounts[pickup7] = pickupCounts[pickup7] + 1; - iVar6 = *(int *)(&DAT_00b6ba30 + (uint)pickup7 * 4) + - *(int *)(&DAT_00b6ba30 + (uint)pickup6 * 4) + - *(int *)(&DAT_00b6ba30 + (uint)pickup5 * 4) + - *(int *)(&DAT_00b6ba30 + (uint)pickup4 * 4) + - *(int *)(&DAT_00b6ba30 + (uint)pickup3 * 4) + - *(int *)(&DAT_00b6ba30 + (uint)pickup2 * 4) + - *(int *)(&DAT_00b6ba30 + (int)local_68 * 4) + *(int *)(&DAT_00b6ba30 + (uint)pickup4 * 4); + iVar6 = *(int *)(&DAT_00b6ba30 + GHIDRA_UINT(pickup7) * 4) + + *(int *)(&DAT_00b6ba30 + GHIDRA_UINT(pickup6) * 4) + + *(int *)(&DAT_00b6ba30 + GHIDRA_UINT(pickup5) * 4) + + *(int *)(&DAT_00b6ba30 + GHIDRA_UINT(pickup4) * 4) + + *(int *)(&DAT_00b6ba30 + GHIDRA_UINT(pickup3) * 4) + + *(int *)(&DAT_00b6ba30 + GHIDRA_UINT(pickup2) * 4) + + *(int *)(&DAT_00b6ba30 + GHIDRA_INT(local_68) * 4) + *(int *)(&DAT_00b6ba30 + GHIDRA_UINT(pickup4) * 4); ehState = 0; local_4c = 0; local_48 = 1.0; @@ -60127,7 +60127,7 @@ uint * Entity_Player::CalculateBagOfCraftingOutput(uint *output, byte *bagConten poolWeightsEnd = poolWeightsEnd + 2; } local_4c = 3; - local_48 = (float)((uint)pickupCounts._0_4_ >> 0x18) * 10.0; + local_48 = (float)((*(undefined4 *)((char *)&(GHIDRA_UINT(pickupCounts)) + 0x0)) >> 0x18) * 10.0; if (poolWeightsEnd == poolWeightsCapacityEnd) { FUN_007dd690(poolWeightsEnd,&local_4c); } @@ -60137,7 +60137,7 @@ uint * Entity_Player::CalculateBagOfCraftingOutput(uint *output, byte *bagConten poolWeightsEnd = poolWeightsEnd + 2; } local_4c = 5; - local_48 = (float)((uint)pickupCounts._4_4_ >> 0x10 & 0xff) * 5.0; + local_48 = (float)((*(undefined4 *)((char *)&(GHIDRA_UINT(pickupCounts)) + 0x4)) >> 0x10 & 0xff) * 5.0; if (poolWeightsEnd == poolWeightsCapacityEnd) { FUN_007dd690(poolWeightsEnd,&local_4c); } @@ -60147,7 +60147,7 @@ uint * Entity_Player::CalculateBagOfCraftingOutput(uint *output, byte *bagConten poolWeightsEnd = poolWeightsEnd + 2; } local_4c = 8; - local_48 = (float)((uint)pickupCounts._4_4_ >> 8 & 0xff) * 10.0; + local_48 = (float)((*(undefined4 *)((char *)&(GHIDRA_UINT(pickupCounts)) + 0x4)) >> 8 & 0xff) * 10.0; if (poolWeightsEnd == poolWeightsCapacityEnd) { FUN_007dd690(poolWeightsEnd,&local_4c); } @@ -60157,7 +60157,7 @@ uint * Entity_Player::CalculateBagOfCraftingOutput(uint *output, byte *bagConten poolWeightsEnd = poolWeightsEnd + 2; } local_4c = 0xc; - local_48 = (float)((uint)pickupCounts._4_4_ >> 0x18) * 10.0; + local_48 = (float)((*(undefined4 *)((char *)&(GHIDRA_UINT(pickupCounts)) + 0x4)) >> 0x18) * 10.0; if (poolWeightsEnd == poolWeightsCapacityEnd) { FUN_007dd690(poolWeightsEnd,&local_4c); } @@ -60167,7 +60167,7 @@ uint * Entity_Player::CalculateBagOfCraftingOutput(uint *output, byte *bagConten poolWeightsEnd = poolWeightsEnd + 2; } local_4c = 9; - local_48 = (float)((uint)pickupCounts._24_4_ >> 8 & 0xff) * 10.0; + local_48 = (float)((*(undefined4 *)((char *)&(GHIDRA_UINT(pickupCounts)) + 0x18)) >> 8 & 0xff) * 10.0; if (poolWeightsEnd == poolWeightsCapacityEnd) { FUN_007dd690(poolWeightsEnd,&local_4c); } @@ -60186,8 +60186,8 @@ uint * Entity_Player::CalculateBagOfCraftingOutput(uint *output, byte *bagConten poolWeightsEnd[1] = local_48; poolWeightsEnd = poolWeightsEnd + 2; } - if (((uint)pickupCounts._0_4_ >> 8 & 0xff) + (uint)pickupCounts[8] + (uint)pickupCounts[0xc] + - ((uint)pickupCounts._12_4_ >> 0x18) == 0) { + if (((*(undefined4 *)((char *)&(GHIDRA_UINT(pickupCounts)) + 0x0)) >> 8 & 0xff) + GHIDRA_UINT(pickupCounts[8]) + GHIDRA_UINT(pickupCounts[0xc]) + + ((*(undefined4 *)((char *)&(GHIDRA_UINT(pickupCounts)) + 0xc)) >> 0x18) == 0) { local_4c = 0x1a; local_48 = (float)pickupCounts[0x17] * 10.0; if (poolWeightsEnd == poolWeightsCapacityEnd) { @@ -60208,13 +60208,13 @@ uint * Entity_Player::CalculateBagOfCraftingOutput(uint *output, byte *bagConten seed = (game->_seedEffects)._gameStartSeed; } local_70 = (void *)0x0; - psVar9 = (std_vector *)(1 - (int)pickupCounts); + psVar9 = (std_vector *)(1 - GHIDRA_INT(pickupCounts)); local_60 = &DAT_00b1f4d4; local_7c = 0x1f; local_68 = psVar9; do { - if (pickupCounts[(int)local_70] != 0) { - if (&DAT_00000050 < pickupCounts + (int)&psVar9->_begin + (int)local_70) { + if (pickupCounts[GHIDRA_INT(local_70)] != 0) { + if (&DAT_00000050 < pickupCounts + GHIDRA_INT(&psVar9->_begin) + GHIDRA_INT(local_70)) { KAGE_LogMessage(0x10,(byte *)"RNG: Invalid ShiftIdx\n"); } local_64 = (byte *)0x0; @@ -60229,12 +60229,12 @@ uint * Entity_Player::CalculateBagOfCraftingOutput(uint *output, byte *bagConten seed = seed << ((byte)((ulonglong)*local_60 >> 0x20) & 0x1f) ^ seed; seed = seed >> ((byte)*(undefined4 *)(local_60 + 1) & 0x1f) ^ seed; local_64 = local_64 + 1; - } while (local_64 < (byte *)(uint)pickupCounts[(int)local_70]); + } while (local_64 < (byte *)GHIDRA_UINT(pickupCounts[GHIDRA_INT(local_70)])); psVar9 = local_68; } puVar10 = local_5c; - local_60 = (undefined8 *)((int)local_60 + 0xc); - local_70 = (void *)((int)local_70 + 1); + local_60 = (undefined8 *)(GHIDRA_INT(local_60) + 0xc); + local_70 = (void *)(GHIDRA_INT(local_70) + 1); local_7c = local_7c + -1; } while (local_7c != 0); local_48 = 2.8026e-44; @@ -60248,8 +60248,8 @@ uint * Entity_Player::CalculateBagOfCraftingOutput(uint *output, byte *bagConten pickupCounts[0x17] = 0; local_68 = (std_vector *)0x0; local_70 = (void *)0x0; - local_64 = (byte *)((int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2); + local_64 = (byte *)(GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2); itemWeightsEnd = 0; itemWeightsCapacityEnd = (void *)0x0; if (local_64 != (byte *)0x0) { @@ -60257,22 +60257,22 @@ uint * Entity_Player::CalculateBagOfCraftingOutput(uint *output, byte *bagConten /* WARNING: Subroutine does not return */ std::_Xlen(); } - uVar5 = (int)local_64 * 4; + uVar5 = GHIDRA_INT(local_64) * 4; local_70 = std::_Allocate(uVar5); - itemWeightsCapacityEnd = (void *)((int)local_70 + uVar5); + itemWeightsCapacityEnd = (void *)(GHIDRA_INT(local_70) + uVar5); itemWeightsEnd = std::fill_n<4byte>(local_70,local_64,&local_68); } - ehState = CONCAT31(ehState._1_3_,1); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),1); totalWeight = 0.0; - puVar10 = (undefined4 *)((int)puVar10 - (int)poolWeights >> 3); + puVar10 = (undefined4 *)(GHIDRA_INT(puVar10) - GHIDRA_INT(poolWeights) >> 3); local_64 = (byte *)0x0; pvVar8 = poolWeights; local_5c = puVar10; if (puVar10 != (undefined4 *)0x0) { do { - fVar11 = *(float *)((char *)pvVar8 + (int)local_64 * 8 + 4); + fVar11 = *(float *)((char *)pvVar8 + GHIDRA_INT(local_64) * 8 + 4); if (0.0 < fVar11) { - iVar1 = *(int *)((char *)pvVar8 + (int)local_64 * 8); + iVar1 = *(int *)((char *)pvVar8 + GHIDRA_INT(local_64) * 8); if (((iVar1 == 4) || (iVar1 == 3)) || (iVar7 = iVar6, iVar1 == 5)) { iVar7 = iVar6 + -5; } @@ -60320,7 +60320,7 @@ LAB_007da41c: local_7c = 0; local_68 = &(g_game->_itemPool)._pools[iVar1]._poolList; pvVar8 = local_68->_begin; - iVar7 = (int)local_68->_end - (int)pvVar8; + iVar7 = GHIDRA_INT(local_68->_end) - GHIDRA_INT(pvVar8); iVar1 = iVar7 >> 0x1f; if (iVar7 / 0x18 + iVar1 == iVar1) { pvVar8 = poolWeights; @@ -60329,16 +60329,16 @@ LAB_007da41c: local_60 = (undefined8 *)0x0; game = g_game; do { - uVar5 = *(uint *)((char *)pvVar8 + (int)local_60); + uVar5 = *(uint *)((char *)pvVar8 + GHIDRA_INT(local_60)); if (game == (Game *)0x0) { - if (-1 < (int)uVar5) goto LAB_007da49b; + if (-1 < GHIDRA_INT(uVar5)) goto LAB_007da49b; } else { - if ((int)uVar5 < 0) { - if (((int)uVar5 < 0) && + if (GHIDRA_INT(uVar5) < 0) { + if ((GHIDRA_INT(uVar5) < 0) && (pvVar8 = (game->_proceduralItemManager)._proceduralItems._begin, - (int)~uVar5 < - (int)(game->_proceduralItemManager)._proceduralItems._end - (int)pvVar8 >> 2)) + GHIDRA_INT(~uVar5) < + GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar8) >> 2)) { pvVar8 = (void *)**(undefined4 **)((char *)pvVar8 + ~uVar5 * 4); } @@ -60349,7 +60349,7 @@ LAB_007da4b3: if (((pvVar8 != (void *)0x0) && (pickup4 = ((Item *)(pvVar8))->Item::IsAvailable(1), pickup4 != 0)) && ((minQuality <= *(int *)((char *)pvVar8 + 0xc4) && (*(int *)((char *)pvVar8 + 0xc4) <= maxQuality)))) { - fVar12 = fVar11 * *(float *)((char *)local_60 + (int)local_68->_begin + 4); + fVar12 = fVar11 * *(float *)((char *)local_60 + GHIDRA_INT(local_68->_begin) + 4); totalWeight = fVar12 + totalWeight; *(float *)((char *)local_70 + *(int *)((char *)pvVar8 + 4) * 4) = fVar12 + *(float *)((char *)local_70 + *(int *)((char *)pvVar8 + 4) * 4); @@ -60358,8 +60358,8 @@ LAB_007da4b3: else { LAB_007da49b: pvVar8 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)uVar5 < - (int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar8 >> 2) { + if (GHIDRA_INT(uVar5) < + GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar8) >> 2) { pvVar8 = *(void **)((char *)pvVar8 + uVar5 * 4); goto LAB_007da4b3; } @@ -60369,12 +60369,12 @@ LAB_007da49b: local_60 = local_60 + 3; local_7c = local_7c + 1; pvVar8 = local_68->_begin; - } while (local_7c < (uint)(((int)local_68->_end - (int)pvVar8) / 0x18)); + } while (local_7c < GHIDRA_UINT(((GHIDRA_INT(local_68->_end) - GHIDRA_INT(pvVar8)) / 0x18))); pvVar8 = poolWeights; puVar10 = local_5c; } } - local_64 = (byte *)((int)local_64 + 1); + local_64 = (byte *)(GHIDRA_INT(local_64) + 1); } while (local_64 < puVar10); } local_5c = (undefined4 *)0x19; @@ -60392,9 +60392,9 @@ LAB_007da49b: seed = seed >> (pickupCounts[0x10] & 0x1f) ^ seed; seed = seed << (pickupCounts[0x14] & 0x1f) ^ seed; seed = seed >> (SUB41(local_48,0) & 0x1f) ^ seed; - weightCount = itemWeightsEnd - (int)local_70 >> 2; + weightCount = itemWeightsEnd - GHIDRA_INT(local_70) >> 2; uVar5 = 0; - fVar11 = (float)((double)(int)seed + __uint_to_double_fixup[-((int)seed >> 0x1f)]) * + fVar11 = (float)((double)GHIDRA_INT(seed) + __uint_to_double_fixup[-(GHIDRA_INT(seed) >> 0x1f)]) * 2.3283062e-10 * totalWeight; if (weightCount != 0) { do { @@ -60409,14 +60409,14 @@ LAB_007da49b: } LAB_007da627: if (game == (Game *)0x0) { - if (-1 < (int)local_5c) goto LAB_007da666; + if (-1 < GHIDRA_INT(local_5c)) goto LAB_007da666; } else { - if ((int)local_5c < 0) { - iVar6 = -1 - (int)local_5c; + if (GHIDRA_INT(local_5c) < 0) { + iVar6 = -1 - GHIDRA_INT(local_5c); if ((iVar6 < 0) || (pvVar8 = (game->_proceduralItemManager)._proceduralItems._begin, - (int)(game->_proceduralItemManager)._proceduralItems._end - (int)pvVar8 >> 2 <= iVar6 + GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar8) >> 2 <= iVar6 )) { pvVar8 = (void *)0x0; } @@ -60427,9 +60427,9 @@ LAB_007da627: else { LAB_007da666: pvVar8 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar8 >> 2 <= (int)local_5c + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar8) >> 2 <= GHIDRA_INT(local_5c) ) goto LAB_007da698; - pvVar8 = *(void **)((char *)pvVar8 + (int)local_5c * 4); + pvVar8 = *(void **)((char *)pvVar8 + GHIDRA_INT(local_5c) * 4); } if (pvVar8 != (void *)0x0) { pickup4 = ((Item *)(pvVar8))->Item::IsAvailable(6); @@ -60438,30 +60438,30 @@ LAB_007da666: } } LAB_007da698: - local_68 = (std_vector *)((int)&local_68->_begin + 1); + local_68 = (std_vector *)(GHIDRA_INT(&local_68->_begin) + 1); local_5c = (undefined4 *)0x19; - } while ((int)local_68 < 0x14); + } while (GHIDRA_INT(local_68) < 0x14); } - uVar5 = ((ItemPool *)(&game->_itemPool))->ItemPool::GetFirstItemPoolForCollectible((int)local_5c); - *output = (uint)local_5c; + uVar5 = ((ItemPool *)(&game->_itemPool))->ItemPool::GetFirstItemPoolForCollectible(GHIDRA_INT(local_5c)); + *output = GHIDRA_UINT(local_5c); output[1] = uVar5; if (local_70 != (void *)0x0) { - uVar5 = (int)itemWeightsCapacityEnd - (int)local_70 & 0xfffffffc; + uVar5 = GHIDRA_INT(itemWeightsCapacityEnd) - GHIDRA_INT(local_70) & 0xfffffffc; pvVar8 = local_70; if (0xfff < uVar5) { pvVar8 = *(void **)((char *)local_70 + -4); uVar5 = uVar5 + 0x23; - if (0x1f < (uint)((int)local_70 + (-4 - (int)pvVar8))) goto LAB_007da72b; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_70) + (-4 - GHIDRA_INT(pvVar8))))) goto LAB_007da72b; } operator_delete(pvVar8,uVar5); } if (poolWeights != (void *)0x0) { - uVar5 = (int)poolWeightsCapacityEnd - (int)poolWeights & 0xfffffff8; + uVar5 = GHIDRA_INT(poolWeightsCapacityEnd) - GHIDRA_INT(poolWeights) & 0xfffffff8; pvVar8 = poolWeights; if (0xfff < uVar5) { pvVar8 = *(void **)((char *)poolWeights + -4); uVar5 = uVar5 + 0x23; - if (0x1f < (uint)((int)poolWeights + (-4 - (int)pvVar8))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(poolWeights) + (-4 - GHIDRA_INT(pvVar8))))) { LAB_007da72b: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -60471,7 +60471,7 @@ LAB_007da72b: } } else { - output[1] = (uint)local_48; + output[1] = GHIDRA_UINT(local_48); *output = local_4c; } ExceptionList = prevExceptionList; @@ -60534,11 +60534,11 @@ void Entity_Player::SpawnClot(Vector *pos, byte unk) if (iVar4 - this->_rottenHearts <= minRedHearts) { iVar2 = this->_boneHearts; uVar5 = this->_soulHearts; - if ((int)(iVar2 + uVar5) <= (int)(unk ^ 1)) { + if (GHIDRA_INT((iVar2 + uVar5)) <= GHIDRA_INT((unk ^ 1))) { return; } if ((0 < iVar2) && - (isBoneHeart = IsBoneHeart(this,((int)(uVar5 + 1) >> 1) + iVar2 + -1), isBoneHeart != 0)) { + (isBoneHeart = IsBoneHeart(this,(GHIDRA_INT((uVar5 + 1)) >> 1) + iVar2 + -1), isBoneHeart != 0)) { AddBoneHearts(this,-1); uVar5 = 5; goto LAB_007daaa6; @@ -60548,17 +60548,17 @@ void Entity_Player::SpawnClot(Vector *pos, byte unk) this->_soulHearts = 0; } else { - if (0 < (int)uVar5) { + if (0 < GHIDRA_INT(uVar5)) { uVar3 = uVar5 & 0x80000001; - if ((int)uVar3 < 0) { + if (GHIDRA_INT(uVar3) < 0) { uVar3 = (uVar3 - 1 | 0xfffffffe) + 1; } if (uVar3 != 1) goto LAB_007daa01; blackHeartMask = (float)this->_blackHearts; - if (((uint)blackHeartMask & 1 << ((byte)((int)(uVar5 - 1) / 2) & 0x1f)) == 0) + if ((GHIDRA_UINT(blackHeartMask) & 1 << ((byte)(GHIDRA_INT((uVar5 - 1)) / 2) & 0x1f)) == 0) goto LAB_007daa0d; LAB_007daa69: - this->_blackHearts = (uint)blackHeartMask & ~(1 << (uVar5 >> 1 & 0x1f)); + this->_blackHearts = GHIDRA_UINT(blackHeartMask) & ~(1 << (uVar5 >> 1 & 0x1f)); ClampGoldenHearts(this,0); update_bone_hearts(this); LAB_007daa84: @@ -60567,23 +60567,23 @@ LAB_007daa84: goto LAB_007daaa6; } LAB_007daa01: - if (0 < (int)uVar5) { + if (0 < GHIDRA_INT(uVar5)) { LAB_007daa0d: uVar3 = uVar5 - 1; - if (((int)uVar3 <= (int)uVar5) && (0 < (int)uVar3)) { + if ((GHIDRA_INT(uVar3) <= GHIDRA_INT(uVar5)) && (0 < GHIDRA_INT(uVar3))) { uVar3 = uVar3 & 0x80000001; - if ((int)uVar3 < 0) { + if (GHIDRA_INT(uVar3) < 0) { uVar3 = (uVar3 - 1 | 0xfffffffe) + 1; } if (uVar3 == 1) { blackHeartMask = (float)this->_blackHearts; local_18 = blackHeartMask; - if (((uint)blackHeartMask & 1 << ((byte)((int)(uVar5 - 2) / 2) & 0x1f)) != 0) { + if ((GHIDRA_UINT(blackHeartMask) & 1 << ((byte)(GHIDRA_INT((uVar5 - 2)) / 2) & 0x1f)) != 0) { uVar3 = uVar5 & 0x80000001; - if ((int)uVar3 < 0) { + if (GHIDRA_INT(uVar3) < 0) { uVar3 = (uVar3 - 1 | 0xfffffffe) + 1; } - if ((uVar3 == 1) && (-1 < (int)uVar5)) goto LAB_007daa69; + if ((uVar3 == 1) && (-1 < GHIDRA_INT(uVar5))) goto LAB_007daa69; goto LAB_007daa84; } } @@ -60618,7 +60618,7 @@ LAB_007daa0d: LAB_007daaa6: uVar3 = Random(); angleRoll = Random(); - local_18 = (float)((double)(int)angleRoll + __uint_to_double_fixup[-((int)angleRoll >> 0x1f)]) * + local_18 = (float)((double)GHIDRA_INT(angleRoll) + __uint_to_double_fixup[-(GHIDRA_INT(angleRoll) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_18 = local_18 + local_18; local_14 = (Entity *)cos(local_18); @@ -60626,15 +60626,15 @@ LAB_007daaa6: clotVelocity.x = (float)local_14 + (float)local_14; clotVelocity.y = clotVelocity.y + clotVelocity.y; local_14 = ((Game *)(g_game))->Game::SpawnEx(3,0xee,pos,&clotVelocity,(Entity *)this,uVar5,uVar3,0); - uVar1 = *(undefined4 *)((int)&local_14->_flags + 4); + uVar1 = *(undefined4 *)(GHIDRA_INT(&local_14->_flags) + 4); iVar2 = *(int *)local_14; - *(uint *)&local_14->_flags = (uint)local_14->_flags & 0xfffffffb; - *(undefined4 *)((int)&local_14->_flags + 4) = uVar1; + *(uint *)&local_14->_flags = GHIDRA_UINT(local_14->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&local_14->_flags) + 4) = uVar1; (**(code **)(iVar2 + 0xc))(); manager = g_manager; local_18 = 1.00893e-43; seed_fart_sound_override((int *)&local_18); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_18,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_18),1.0,2,0,1.0,0.0); uVar5 = Random(); bloodSplat = ((Game *)(g_game))->Game::SpawnEx(1000,2,pos,&g_vectorZero,(Entity *)0x0,2,uVar5,0); bloodSplat->SetColor(&local_14->_splatColor,0xffffffff,0xff,0,1); @@ -60689,14 +60689,14 @@ void Entity_Player::ResetPlayer() if ((this->_variant == 0) && (this->_isCoopGhost == 0)) { InitPostLevelInitStats(this); uVar2 = 0; - if ((int)(this->_greedResetCollectibles)._end - (int)(this->_greedResetCollectibles)._begin >> 2 + if (GHIDRA_INT((this->_greedResetCollectibles)._end) - GHIDRA_INT((this->_greedResetCollectibles)._begin) >> 2 != 0) { do { - AddCollectible(this,*(int *)((int)(this->_greedResetCollectibles)._begin + uVar2 * 4),0,0,0, + AddCollectible(this,*(int *)(GHIDRA_INT((this->_greedResetCollectibles)._begin) + uVar2 * 4),0,0,0, 0,0); uVar2 = uVar2 + 1; - } while (uVar2 < (uint)((int)(this->_greedResetCollectibles)._end - - (int)(this->_greedResetCollectibles)._begin >> 2)); + } while (uVar2 < GHIDRA_UINT((GHIDRA_INT((this->_greedResetCollectibles)._end) - + GHIDRA_INT((this->_greedResetCollectibles)._begin) >> 2))); } EvaluateItems(this); RecomputeWispCollectibles(this,(Entity_Familiar *)0x0); @@ -60709,12 +60709,12 @@ void Entity_Player::ResetPlayer() (this->_greedResetCollectibles)._end = (void *)0x0; (this->_greedResetCollectibles)._capacity = (void *)0x0; if (oldBegin != (void *)0x0) { - uVar2 = (int)oldBegin - (int)oldBegin & 0xfffffffc; + uVar2 = GHIDRA_INT(oldBegin) - GHIDRA_INT(oldBegin) & 0xfffffffc; oldBegin = oldBegin; if (0xfff < uVar2) { oldBegin = *(void **)((char *)oldBegin + -4); uVar2 = uVar2 + 0x23; - if (0x1f < (uint)((int)oldBegin + (-4 - (int)oldBegin))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(oldBegin) + (-4 - GHIDRA_INT(oldBegin))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -60753,11 +60753,11 @@ void Entity_Player::remove_wooden_cross_mantles() } mantleStacks = this->_holyMantleStacks; keptCrossStacks = iVar1 - (mantleStacks & 0xf); - if ((int)keptCrossStacks < 0) { + if (GHIDRA_INT(keptCrossStacks) < 0) { keptCrossStacks = 0; } crossStacks = mantleStacks >> 4; - crossStacksLeft = (uint)crossStacks; + crossStacksLeft = GHIDRA_UINT(crossStacks); if (keptCrossStacks < crossStacksLeft) { stacksToRemove = crossStacksLeft - keptCrossStacks; do { @@ -60765,8 +60765,8 @@ void Entity_Player::remove_wooden_cross_mantles() crossStacksLeft = crossStacksLeft - 1; crossStacks = (byte)crossStacksLeft; collectibles = (g_manager->_itemConfig)._collectibles._begin; - if ((0x4e4 < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)collectibles & - 0xfffffffcU)) && + if ((0x4e4 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(collectibles) & + 0xfffffffcU))) && (mantleConfig = *(int *)((char *)collectibles + 0x4e4), mantleConfig != 0)) { removedEffect[2] = *(undefined4 *)(mantleConfig + 0x78); removedEffect[1] = 0; @@ -60791,7 +60791,7 @@ void Entity_Player::remove_wooden_cross_mantles() } } collectibles = (g_manager->_itemConfig)._collectibles._begin; - if ((int)((int)(g_manager->_itemConfig)._collectibles._end - (int)collectibles & 0xfffffffcU) + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(collectibles) & 0xfffffffcU)) < 0x4e5) { RemoveCostume(this,(ItemConfig_Item *)0x0); stacksToRemove = iVar1; @@ -60934,7 +60934,7 @@ int Entity_Player::get_seeded_variant() gameStartSeed = (game->_seedEffects)._gameStartSeed; } uVar2 = 1; - if (1 < (uint)(gameStartSeed + unlockState)) { + if (1 < GHIDRA_UINT((gameStartSeed + unlockState))) { uVar2 = gameStartSeed + unlockState; } if (uVar2 == 0) { @@ -61029,13 +61029,13 @@ void Entity_Player::add_random_drug_item_effect() Manager *manager; void *trinketRngs; - local_8 = __security_cookie ^ (uint)(drugItems + 9); + local_8 = __security_cookie ^ GHIDRA_UINT((drugItems + 9)); drugItems[0] = 0xd; drugItems[1] = 0xe; drugItems[2] = 0xf0; drugItems[3] = 0x46; trinketRngs = (this->_trinketRNGs)._begin; - brokenSyringeSeed = (uint *)((int)trinketRngs + 0x840); + brokenSyringeSeed = (uint *)(GHIDRA_INT(trinketRngs) + 0x840); local_18 = (ItemConfig_Item *)0x8f; uStack_14 = 0x159; iStack_10 = 0x1ed; @@ -61087,7 +61087,7 @@ void Entity_Player::AddRandomMomItemEffect() momItems[2] = 0x1f; momItems[3] = 0x37; playerRngs = (this->_trinketRNGs)._begin; - rngSeed = (uint *)((int)playerRngs + 0x990); + rngSeed = (uint *)(GHIDRA_INT(playerRngs) + 0x990); momItems[4] = 0x6e; momItems[5] = 0x72; momItems[6] = 199; @@ -61144,7 +61144,7 @@ void Entity_Player::ModelingClay_roll(RNG *rng) else { *filterSlot = FUN_007dbe70; filtersEnd = &(manager->_itemConfig)._availabilityFilters._end; - *filtersEnd = (void *)((int)*filtersEnd + 4); + *filtersEnd = (void *)(GHIDRA_INT(*filtersEnd) + 4); } seed = rng->_seed; pvVar1 = g_game->_room; @@ -61165,7 +61165,7 @@ void Entity_Player::ModelingClay_roll(RNG *rng) manager = g_manager; this->_modelingClayEffect = collectibleId; filtersEnd = &(manager->_itemConfig)._availabilityFilters._end; - *filtersEnd = (void *)((int)*filtersEnd + -4); + *filtersEnd = (void *)(GHIDRA_INT(*filtersEnd) + -4); collectibleConfig = ((ItemConfig *)(&manager->_itemConfig))->ItemConfig::GetCollectible(this->_modelingClayEffect); if (collectibleConfig != (ItemConfig_Item *)0x0) { this->_cacheFlags = this->_cacheFlags | collectibleConfig->cacheFlags; @@ -61243,18 +61243,18 @@ void Entity_Player::twins_duplicate_familiars(int count) itemConfig = &g_manager->_itemConfig; ExceptionList = &local_10; player = this; - if (4 < (int)((int)(g_manager->_itemConfig)._collectibles._end - - (int)(itemConfig->_collectibles)._begin & 0xfffffffcU)) { + if (4 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((itemConfig->_collectibles)._begin) & 0xfffffffcU))) { do { if (g_game == (Game *)0x0) { - if (-1 < (int)uVar7) goto LAB_007dbf93; + if (-1 < GHIDRA_INT(uVar7)) goto LAB_007dbf93; } else { - if ((int)uVar7 < 0) { - if (((int)uVar7 < 0) && + if (GHIDRA_INT(uVar7) < 0) { + if ((GHIDRA_INT(uVar7) < 0) && (pvVar1 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)~uVar7 < - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar1 >> 2)) { + GHIDRA_INT(~uVar7) < + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar1) >> 2)) { piVar3 = (int *)**(undefined4 **)((char *)pvVar1 + ~uVar7 * 4); } else { @@ -61264,7 +61264,7 @@ void Entity_Player::twins_duplicate_familiars(int count) else { LAB_007dbf93: pvVar1 = (itemConfig->_collectibles)._begin; - if ((int)(itemConfig->_collectibles)._end - (int)pvVar1 >> 2 <= (int)uVar7) + if (GHIDRA_INT((itemConfig->_collectibles)._end) - GHIDRA_INT(pvVar1) >> 2 <= GHIDRA_INT(uVar7)) goto LAB_007dc03e; piVar3 = *(int **)((char *)pvVar1 + uVar7 * 4); } @@ -61273,8 +61273,8 @@ LAB_007dbf93: if (*piVar3 == 4) { iVar6 = GetCollectibleNum(player,uVar7,0); if (((((iVar6 < 1) || (uVar7 == 0)) || - ((int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2 <= (int)uVar7)) || + (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2 <= GHIDRA_INT(uVar7))) || ((uVar7 == 0xeb || (uVar7 == 0x2b)))) || (uVar7 == 0x3d)) { puVar4 = itemsCapEnd; } @@ -61303,9 +61303,9 @@ LAB_007dbf93: LAB_007dc03e: uVar7 = uVar7 + 1; itemConfig = &g_manager->_itemConfig; - } while ((int)uVar7 < - (int)(g_manager->_itemConfig)._collectibles._end - - (int)(itemConfig->_collectibles)._begin >> 2); + } while (GHIDRA_INT(uVar7) < + GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((itemConfig->_collectibles)._begin) >> 2); } temporaryEffects = &player->_temporaryeffects; itemsBegin = familiarItems; @@ -61337,8 +61337,8 @@ LAB_007dc03e: } } pvVar1 = (playerReg->_trinketRNGs)._begin; - puVar4 = (uint *)((int)pvVar1 + 0xb70); - local_20 = (int)itemsEnd - (int)itemsBegin >> 2; + puVar4 = (uint *)(GHIDRA_INT(pvVar1) + 0xb70); + local_20 = GHIDRA_INT(itemsEnd) - GHIDRA_INT(itemsBegin) >> 2; uVar7 = *puVar4; if (uVar7 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -61357,8 +61357,8 @@ LAB_007dc03e: local_20 = uVar7 % local_20; } pvVar1 = (player->_trinketRNGs)._begin; - puVar4 = (uint *)((int)pvVar1 + 0xb70); - local_24 = (int)itemsEnd - (int)itemsBegin >> 2; + puVar4 = (uint *)(GHIDRA_INT(pvVar1) + 0xb70); + local_24 = GHIDRA_INT(itemsEnd) - GHIDRA_INT(itemsBegin) >> 2; uVar7 = *puVar4; if (uVar7 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -61380,14 +61380,14 @@ LAB_007dc03e: uVar7 = itemsBegin[uVar5]; local_24 = uVar7; if (g_game == (Game *)0x0) { - if (-1 < (int)uVar7) goto LAB_007dc1df; + if (-1 < GHIDRA_INT(uVar7)) goto LAB_007dc1df; } else { - if ((int)uVar7 < 0) { - if (((int)uVar7 < 0) && + if (GHIDRA_INT(uVar7) < 0) { + if ((GHIDRA_INT(uVar7) < 0) && (pvVar1 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)~uVar7 < - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar1 >> 2)) { + GHIDRA_INT(~uVar7) < + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar1) >> 2)) { iVar6 = **(int **)((char *)pvVar1 + ~uVar7 * 4); } else { @@ -61397,7 +61397,7 @@ LAB_007dc03e: else { LAB_007dc1df: pvVar1 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar1 >> 2 <= (int)uVar7) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar1) >> 2 <= GHIDRA_INT(uVar7)) goto LAB_007dc222; iVar6 = *(int *)((char *)pvVar1 + uVar7 * 4); } @@ -61429,12 +61429,12 @@ LAB_007dc222: count = count + -1; if (count == 0) { if (itemsBegin != (uint *)0x0) { - uVar7 = (int)itemsCapEnd - (int)itemsBegin & 0xfffffffc; + uVar7 = GHIDRA_INT(itemsCapEnd) - GHIDRA_INT(itemsBegin) & 0xfffffffc; puVar4 = itemsBegin; if (0xfff < uVar7) { puVar4 = (uint *)itemsBegin[-1]; uVar7 = uVar7 + 0x23; - if (0x1f < (uint)((int)itemsBegin + (-4 - (int)puVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(itemsBegin) + (-4 - GHIDRA_INT(puVar4))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -61525,21 +61525,21 @@ void Entity_Player::TriggerRoomExit() layerId = *(AnimationLayer **)(layerOffset + *(int *)(local_11c + 0x18)); layerFrame = AnimationState::GetLayerFrame ((AnimationState *)((this->_sprite)._animDefaultName._buf + 8), - (int)layerId); + GHIDRA_INT(layerId)); layerState = ((ANM2 *)((ANM2 *)&this->_spawnerVariant))->ANM2::GetLayer((byte *)layerId); if (((layerState->_visible != 0) && (layerFrame != (void *)0x0)) && (*(char *)((char *)layerFrame + 0x2c) != '\0')) { local_168 = (AnimationLayer *)(*(int *)(local_11c + 0x18) + layerOffset); - if (((((int)layerId < 0) || - (*(int *)(*(int *)((this->_sprite)._animDefaultName._buf + 8) + 0x80) <= (int)layerId)) - && (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), (int)layerId < 0)) || - (*(int *)(*(int *)((this->_sprite)._animDefaultName._buf + 8) + 0x80) <= (int)layerId)) { + if ((((GHIDRA_INT(layerId) < 0) || + (*(int *)(*(int *)((this->_sprite)._animDefaultName._buf + 8) + 0x80) <= GHIDRA_INT(layerId))) + && (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), GHIDRA_INT(layerId) < 0)) || + (*(int *)(*(int *)((this->_sprite)._animDefaultName._buf + 8) + 0x80) <= GHIDRA_INT(layerId))) { iVar6 = 0; } else { iVar6 = *(int *)((this->_sprite)._animDefaultName._size + *(int *)(*(int *)((this->_sprite)._animDefaultName._buf + 0xc) + 0x38 + - (int)layerId * 4) * 4); + GHIDRA_INT(layerId) * 4) * 4); } AnimationLayer::RenderFrame (local_168,&local_15c,iVar6,&g_vectorZero,&g_vectorZero, @@ -61559,7 +61559,7 @@ void Entity_Player::TriggerRoomExit() local_144 = (float)local_168 * local_150.x - fVar8 * local_164.x; local_168 = (AnimationLayer *)((float)local_168 * local_164.x + fVar8 * local_150.x); local_164.x = (float)layerId; - local_150.x = (float)((int)layerFrame + 0x30); + local_150.x = (float)(GHIDRA_INT(layerFrame) + 0x30); iVar6 = FUN_00833010(&local_164); if ((AnimationState *)(iVar6 + 0xa8) != (AnimationState *)local_150.x) { pvVar7 = *(void **)((char *)local_150.x + 4); @@ -61577,7 +61577,7 @@ void Entity_Player::TriggerRoomExit() *(int *)(iVar6 + 0xc0) = iVar4; *(int *)(iVar6 + 0xc4) = iVar5; *(undefined8 *)(iVar6 + 200) = *(undefined8 *)((char *)local_150.x + 0x20); - *(void **)(iVar6 + 0xd0) = ((AnimationState *)((int)local_150.x + 0x20))->_layerFrames; + *(void **)(iVar6 + 0xd0) = ((AnimationState *)(GHIDRA_INT(local_150.x) + 0x20))->_layerFrames; } local_164.x = (float)layerId; iVar6 = FUN_00833010(&local_164); @@ -61617,7 +61617,7 @@ void Entity_Player::TriggerRoomExit() } while (local_120 < *(uint *)(local_11c + 0x1c)); return; } - iVar6 = *(int *)((int)&this->_pendingDamageFlags + 4); + iVar6 = *(int *)(GHIDRA_INT(&this->_pendingDamageFlags) + 4); if ((((((iVar6 != 1) && (iVar6 != 2)) && (pvVar7 = (this->_damageEvents)._capacity, pvVar7 != (void *)0xffffffff)) && ((iVar6 != 0xb && (iVar6 != 0x10)))) && @@ -61697,7 +61697,7 @@ LAB_00832ee2: g_graphicsManager_blendMode[2] = 7; g_graphicsManager_blendMode[3] = 1; g_graphicsManager_blendMode[4] = 7; - iVar6 = *(int *)((int)&this->_pendingDamageFlags + 4); + iVar6 = *(int *)(GHIDRA_INT(&this->_pendingDamageFlags) + 4); local_140._red = 0.0; local_140._green = 0.0; local_140._blue = 0.0; @@ -61731,7 +61731,7 @@ int Entity_Player::GetJarFlies() // 00841cb0 int Entity_Player::GetActiveSubCharge(int slot) { - if ((uint)slot < 4) { + if (GHIDRA_UINT(slot) < 4) { return this->_activeDesc[slot]._subCharge; } return 0; @@ -61740,8 +61740,8 @@ int Entity_Player::GetActiveSubCharge(int slot) // 00841cd0 int Entity_Player::GetPoopSpell(int position) { - if ((uint)position < 6) { - return (uint)this->_poopSpellQueue[position]; + if (GHIDRA_UINT(position) < 6) { + return GHIDRA_UINT(this->_poopSpellQueue[position]); } return 0; } @@ -61883,7 +61883,7 @@ void Entity_Player::CheckPoopSpellQueue(Vector *param_2) local_8 = 0xffffffff; puStack_c = &LAB_00b0c86e; local_10 = ExceptionList; - local_14 = __security_cookie ^ (int)register0x00000010 - 4U; + local_14 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; drawOffset = param_2; local_74._unk = 0; @@ -61901,12 +61901,12 @@ void Entity_Player::CheckPoopSpellQueue(Vector *param_2) render_quad_set_rect(overlayQuad,param_2,&local_7c,&local_74); render_color_shader_pass(quad); titleText = &(this->_sprite)._numEvents; - if (0xf < (uint)(this->_sprite)._rotation) { + if (0xf < GHIDRA_UINT((this->_sprite)._rotation)) { titleText = (int *)*titleText; } text = &(this->_sprite)._color; local_4c = text; - if (0xf < (uint)(this->_sprite)._color._colorize[1]) { + if (0xf < GHIDRA_UINT((this->_sprite)._color._colorize[1])) { local_4c = (ColorMod *)text->_tint[0]; } titleFont = (Font *)&(*(undefined1 *)((char *)(this) + 0x40)); @@ -61918,16 +61918,16 @@ void Entity_Player::CheckPoopSpellQueue(Vector *param_2) local_74._alpha = 0.0; linesCapacity = (Font *)0x0; local_74._unk = 0; - local_8._0_1_ = 0; - local_8._1_3_ = 0; - local_60 = (int *)((int)g_screenWidth + -0x28); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0; + local_60 = (int *)(GHIDRA_INT(g_screenWidth) + -0x28); if (local_60 < piVar2) { string_split(&wordsBegin,(std_string *)text,0x20); lineWidth = 0; local_1c = 0; local_18 = 0xf; local_2c = (undefined4 ******)0x0; - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; piVar2 = wordsBegin; pFVar8 = (Font *)0x0; if (wordsBegin != wordsEnd) { @@ -61937,7 +61937,7 @@ void Entity_Player::CheckPoopSpellQueue(Vector *param_2) wordSize = 0; wordCapacity = 0; local_4c = (ColorMod *)piVar2; - if (0xf < (uint)piVar2[5]) { + if (0xf < GHIDRA_UINT(piVar2[5])) { local_4c = (ColorMod *)*piVar2; } if (local_50 < 0x10) { @@ -61956,7 +61956,7 @@ void Entity_Player::CheckPoopSpellQueue(Vector *param_2) memcpy(word,local_4c,local_50 + 1); } piVar2 = piVar2 + 6; - local_8 = CONCAT31(local_8._1_3_,3); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); wordSize = local_50; wordCapacity = uVar9; if (piVar2 != wordsEnd) { @@ -61969,7 +61969,7 @@ void Entity_Player::CheckPoopSpellQueue(Vector *param_2) local_4c = (ColorMod *)((Font *)(local_5c))->Font::get_string_width_n((byte *)ppppppbVar4,-1); fVar1 = local_74._alpha; framePhase = lineWidth; - if (local_60 < (int *)((int)local_4c->_tint + lineWidth)) { + if (local_60 < (int *)(GHIDRA_INT(local_4c->_tint) + lineWidth)) { if ((Font *)local_74._alpha == linesCapacity) { vector_string_emplace_reallocate (&local_74._blue,(std_string *)local_74._alpha,&local_2c); @@ -61977,7 +61977,7 @@ void Entity_Player::CheckPoopSpellQueue(Vector *param_2) } else { ((std::string *)((char *)local_74._alpha))->std::string::string(&local_2c); - local_74._alpha = (float)((int)fVar1 + 0x18); + local_74._alpha = (float)(GHIDRA_INT(fVar1) + 0x18); } local_1c = 0; ppppppuVar3 = &local_2c; @@ -61992,15 +61992,15 @@ void Entity_Player::CheckPoopSpellQueue(Vector *param_2) ppppppbVar4 = word; } ((std::string *)((char *)&local_2c))->std::string::append((byte *)ppppppbVar4,wordSize); - lineWidth = (int)local_4c->_tint + framePhase; - local_8._0_1_ = 2; + lineWidth = GHIDRA_INT(local_4c->_tint) + framePhase; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; if (0xf < wordCapacity) { uVar9 = wordCapacity + 1; ppppppbVar4 = word; if (0xfff < uVar9) { ppppppbVar4 = (byte ******)word[-1]; uVar9 = wordCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)word + (-4 - (int)ppppppbVar4))) goto LAB_009603a7; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(word) + (-4 - GHIDRA_INT(ppppppbVar4)))) goto LAB_009603a7; } operator_delete(ppppppbVar4,uVar9); } @@ -62013,25 +62013,25 @@ void Entity_Player::CheckPoopSpellQueue(Vector *param_2) } else { ((std::string *)((char *)local_74._alpha))->std::string::string(&local_2c); - local_74._alpha = (float)((int)fVar1 + 0x18); + local_74._alpha = (float)(GHIDRA_INT(fVar1) + 0x18); } } linesBegin = (Font *)local_74._blue; pFVar8 = (Font *)local_74._alpha; } - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; if (0xf < local_18) { uVar9 = local_18 + 1; ppppppuVar3 = local_2c; if (0xfff < uVar9) { ppppppuVar3 = (undefined4 ******)local_2c[-1]; uVar9 = local_18 + 0x24; - if ((undefined1 *)0x1f < (undefined1 *)((int)local_2c + (-4 - (int)ppppppuVar3))) + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(local_2c) + (-4 - GHIDRA_INT(ppppppuVar3)))) goto LAB_009603a7; } operator_delete(ppppppuVar3,uVar9); } - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; if (wordsBegin != (int *)0x0) { local_60 = wordsEnd; piVar2 = wordsBegin; @@ -62045,7 +62045,7 @@ void Entity_Player::CheckPoopSpellQueue(Vector *param_2) if (0xfff < uVar7) { pvVar6 = *(void **)((char *)pvVar5 + -4); uVar7 = uVar9 + 0x24; - if (0x1f < (uint)((int)pvVar5 + (-4 - (int)pvVar6))) goto LAB_009603a7; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar5) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_009603a7; } operator_delete(pvVar6,uVar7); wordsEnd = local_60; @@ -62056,12 +62056,12 @@ void Entity_Player::CheckPoopSpellQueue(Vector *param_2) piVar2 = piVar2 + 6; } while (piVar2 != wordsEnd); } - uVar9 = ((wordsCapacity - (int)wordsBegin) / 0x18) * 0x18; + uVar9 = ((wordsCapacity - GHIDRA_INT(wordsBegin)) / 0x18) * 0x18; piVar2 = wordsBegin; if (0xfff < uVar9) { piVar2 = (int *)wordsBegin[-1]; uVar9 = uVar9 + 0x23; - if ((undefined1 *)0x1f < (undefined1 *)((int)wordsBegin + (-4 - (int)piVar2))) { + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(wordsBegin) + (-4 - GHIDRA_INT(piVar2)))) { LAB_009603a7: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -62083,7 +62083,7 @@ LAB_009603a7: } g_graphicsManager_blendMode[0] = 0; g_graphicsManager_blendMode[2] = 7; - local_4c = (ColorMod *)(((int)pFVar8 - (int)linesBegin) / 0x18); + local_4c = (ColorMod *)((GHIDRA_INT(pFVar8) - GHIDRA_INT(linesBegin)) / 0x18); g_graphicsManager_blendMode[3] = 1; g_graphicsManager_blendMode[4] = 7; local_30 = 0; @@ -62093,20 +62093,20 @@ LAB_009603a7: local_20 = 0xffffffff; local_1c = 0; local_18 = 0; - local_50 = (uint)(((g_screenHeight * 0.5 - - (float)((double)((int)local_4c * 8) + - __uint_to_double_fixup[-((int)local_4c * 8 >> 0x1f)])) - 64.0) + - drawOffset->y); - local_8._0_1_ = 4; - local_7c.y = (float)((int)g_screenWidth - (int)local_7c.y) * 0.5; + local_50 = GHIDRA_UINT((((g_screenHeight * 0.5 - + (float)((double)(GHIDRA_INT(local_4c) * 8) + + __uint_to_double_fixup[-(GHIDRA_INT(local_4c) * 8 >> 0x1f)])) - 64.0) + + drawOffset->y)); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; + local_7c.y = (float)(GHIDRA_INT(g_screenWidth) - GHIDRA_INT(local_7c.y)) * 0.5; pvVar5 = ((Font *)(titleFont))->Font::measure_string(glyphQuads,(byte *)titleText,&local_30,&g_vectorOne); - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; color._blue = 1.0; color._red = 1.0; color._green = 1.0; color._alpha = 1.0; color._unk = 0; - Font::render_glyph_quads(titleFont,pvVar5,local_7c.y,(float)(int)local_50,1.0,1.0,color,&local_30) + Font::render_glyph_quads(titleFont,pvVar5,local_7c.y,(float)GHIDRA_INT(local_50),1.0,1.0,color,&local_30) ; std::vector<12byte>::clear(); std::vector<12byte>::_Tidy(); @@ -62114,7 +62114,7 @@ LAB_009603a7: local_50 = local_50 + 0x40; if (local_4c != (ColorMod *)0x0) { do { - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; local_5c = line; if (0xf < *(uint *)&line->_lineHeight) { local_5c = *(Font **)line; @@ -62127,28 +62127,28 @@ LAB_009603a7: local_20 = 0xffffffff; local_1c = 0; local_18 = 0; - local_8._0_1_ = 6; - local_7c.y = (float)((int)g_screenWidth - framePhase) * 0.5 + drawOffset->x; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; + local_7c.y = (float)(GHIDRA_INT(g_screenWidth) - framePhase) * 0.5 + drawOffset->x; pvVar5 = ((Font *)(bodyFont))->Font::measure_string(glyphQuads,&local_5c->_isLoaded,&local_30,&g_vectorOne) ; - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; color_00._blue = 0.8235294; color_00._red = 0.98039216; color_00._green = 0.98039216; color_00._alpha = 1.0; color_00._unk = 0; Font::render_glyph_quads - (bodyFont,pvVar5,local_7c.y,(float)(int)local_50,1.0,1.0,color_00,&local_30); + (bodyFont,pvVar5,local_7c.y,(float)GHIDRA_INT(local_50),1.0,1.0,color_00,&local_30); std::vector<12byte>::clear(); std::vector<12byte>::_Tidy(); local_50 = local_50 + 0x10; line = (Font *)&line->_scaleW; - local_4c = (ColorMod *)((int)local_4c + -1); + local_4c = (ColorMod *)(GHIDRA_INT(local_4c) + -1); } while (local_4c != (ColorMod *)0x0); local_4c = (ColorMod *)0x0; pFVar8 = (Font *)local_74._alpha; } - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; line = linesBegin; if (linesBegin != (Font *)0x0) { for (; line != pFVar8; line = (Font *)&line->_scaleW) { @@ -62160,7 +62160,7 @@ LAB_009603a7: if (0xfff < uVar7) { pvVar6 = *(void **)((char *)pvVar5 + -4); uVar7 = uVar9 + 0x24; - if (0x1f < (uint)((int)pvVar5 + (-4 - (int)pvVar6))) goto LAB_00960720; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar5) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_00960720; } operator_delete(pvVar6,uVar7); } @@ -62168,12 +62168,12 @@ LAB_009603a7: *(uint *)&line->_lineHeight = 0xf; line->_isLoaded = 0; } - uVar9 = (((int)linesCapacity - (int)linesBegin) / 0x18) * 0x18; + uVar9 = ((GHIDRA_INT(linesCapacity) - GHIDRA_INT(linesBegin)) / 0x18) * 0x18; pFVar8 = linesBegin; if (0xfff < uVar9) { pFVar8 = (Font *)linesBegin[-1]._missingCharacter; uVar9 = uVar9 + 0x23; - if (0x1f < (uint)((int)linesBegin + (-4 - (int)pFVar8))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(linesBegin) + (-4 - GHIDRA_INT(pFVar8))))) { LAB_00960720: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -62272,7 +62272,7 @@ undefined4 Entity_Player::restore_save_state_part2() do { if (0 < iVar18) { pvVar11 = (g_manager->_itemConfig)._pillEffects._begin; - if (((int)(g_manager->_itemConfig)._pillEffects._end - (int)pvVar11 >> 2 <= iVar18) || + if ((GHIDRA_INT((g_manager->_itemConfig)._pillEffects._end) - GHIDRA_INT(pvVar11) >> 2 <= iVar18) || (*(int *)((char *)pvVar11 + iVar18 * 4) == 0)) { format = "Invalid pill effect %d\n"; goto LAB_009d4590; @@ -62308,7 +62308,7 @@ undefined4 Entity_Player::restore_save_state_part2() *(undefined4 *)(unaff_EBP + -0x1c) = *fieldPtr; ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); iVar9 = *(int *)(unaff_EBP + -0x24); - if ((uint)puVar16[2] < 0x4d) { + if (GHIDRA_UINT(puVar16[2]) < 0x4d) { (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x3c,4,1); *(undefined4 *)(unaff_EBP + -0x1c) = *(undefined4 *)(unaff_EBP + -0x3c); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); @@ -62316,10 +62316,10 @@ undefined4 Entity_Player::restore_save_state_part2() } else { (**(code **)(*(int *)*puVar16 + 0x14))(iVar9 + 0x20c,2,1); - *(uint *)(unaff_EBP + -0x1c) = (uint)*(ushort *)(iVar9 + 0x20c); + *(uint *)(unaff_EBP + -0x1c) = GHIDRA_UINT(*(ushort *)(iVar9 + 0x20c)); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),2); (**(code **)(*(int *)*puVar16 + 0x14))((ushort *)(iVar9 + 0x20e),2,1); - *(uint *)(unaff_EBP + -0x1c) = (uint)*(ushort *)(iVar9 + 0x20e); + *(uint *)(unaff_EBP + -0x1c) = GHIDRA_UINT(*(ushort *)(iVar9 + 0x20e)); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),2); iVar9 = *(int *)(unaff_EBP + -0x24); } @@ -62413,7 +62413,7 @@ undefined4 Entity_Player::restore_save_state_part2() iVar9 = *(int *)(unaff_EBP + -0x24); } } - if (0x38 < (uint)puVar16[2]) { + if (0x38 < GHIDRA_UINT(puVar16[2])) { (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x50,4,1); *(undefined4 *)(unaff_EBP + -0x1c) = *(undefined4 *)(unaff_EBP + -0x50); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); @@ -62421,7 +62421,7 @@ undefined4 Entity_Player::restore_save_state_part2() iVar19 = *(int *)(iVar9 + 0x1e0); *(int **)(unaff_EBP + -0x3c) = (int *)(iVar9 + 0x1e0); uVar8 = *(uint *)(unaff_EBP + -0x50); - if ((uint)((iVar18 - iVar19) / 0x78) < uVar8) { + if (GHIDRA_UINT(((iVar18 - iVar19) / 0x78)) < uVar8) { if (0x2222222 < uVar8) { /* WARNING: Subroutine does not return */ std::_Xlen(); @@ -62462,7 +62462,7 @@ undefined4 Entity_Player::restore_save_state_part2() *(undefined4 *)(unaff_EBP + -0x94) = 0; *(undefined4 *)(unaff_EBP + -0x90) = 0; *(undefined4 *)(unaff_EBP + -4) = 3; - if ((uint)puVar16[2] < 0x67) { + if (GHIDRA_UINT(puVar16[2]) < 0x67) { (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x100,4,1); *(undefined4 *)(unaff_EBP + -0x1c) = *(undefined4 *)(unaff_EBP + -0x100); ((Checksum *)(pvVar11))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); @@ -62493,9 +62493,9 @@ undefined4 Entity_Player::restore_save_state_part2() *(undefined1 *)(unaff_EBP + -0x38) = *(undefined1 *)(unaff_EBP + -0xdd); ((Checksum *)(pvVar11))->Checksum::Update((byte *)(unaff_EBP + -0x38),1); (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x30,2,1); - *(uint *)(unaff_EBP + -0x1c) = (uint)*(ushort *)(unaff_EBP + -0x30); + *(uint *)(unaff_EBP + -0x1c) = GHIDRA_UINT(*(ushort *)(unaff_EBP + -0x30)); ((Checksum *)(pvVar11))->Checksum::Update((byte *)(unaff_EBP + -0x1c),2); - *(int *)(unaff_EBP + -0xf4) = (int)*(short *)(unaff_EBP + -0x30); + *(int *)(unaff_EBP + -0xf4) = GHIDRA_INT(*(short *)(unaff_EBP + -0x30)); } } else { @@ -62565,7 +62565,7 @@ undefined4 Entity_Player::restore_save_state_part2() *(undefined4 *)(unaff_EBP + -0x1c) = *fieldPtr; ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); iVar9 = *(int *)(unaff_EBP + -0x24); - if ((uint)puVar16[2] < 0x8c) { + if (GHIDRA_UINT(puVar16[2]) < 0x8c) { (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x1c,4,1); *(undefined4 *)(unaff_EBP + -0x3c) = *(undefined4 *)(unaff_EBP + -0x1c); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x3c),4); @@ -62576,7 +62576,7 @@ undefined4 Entity_Player::restore_save_state_part2() *(undefined4 *)(unaff_EBP + -0x1c) = *(undefined4 *)(iVar9 + 0x36c); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); } - if ((uint)puVar16[2] < 0x23) { + if (GHIDRA_UINT(puVar16[2]) < 0x23) { *(undefined4 *)(iVar9 + 0x370) = 0; } else { @@ -62584,7 +62584,7 @@ undefined4 Entity_Player::restore_save_state_part2() *(undefined4 *)(unaff_EBP + -0x1c) = *(undefined4 *)(iVar9 + 0x370); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); } - if (0x1f < (uint)puVar16[2]) { + if (0x1f < GHIDRA_UINT(puVar16[2])) { iVar18 = *(int *)*puVar16; *(int *)(unaff_EBP + -0x44) = iVar9 + 0x37c; (**(code **)(iVar18 + 0x14))(iVar9 + 0x37c,4,1); @@ -62709,17 +62709,17 @@ undefined4 Entity_Player::restore_save_state_part2() iVar9 = *(int *)(unaff_EBP + -0x24); } } - if (0x3f < (uint)puVar16[2]) { + if (0x3f < GHIDRA_UINT(puVar16[2])) { (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x1d,1,1); *(undefined1 *)(unaff_EBP + -0x38) = *(undefined1 *)(unaff_EBP + -0x1d); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x38),1); *(undefined4 *)(unaff_EBP + -4) = 8; - vector28_resize((void *)(iVar9 + 0x38c),(uint)*(byte *)(unaff_EBP + -0x1d)); + vector28_resize((void *)(iVar9 + 0x38c),GHIDRA_UINT(*(byte *)(unaff_EBP + -0x1d))); *(undefined4 *)(unaff_EBP + -4) = 0xffffffff; uVar10 = GameStatePlayer::read_part3(); return uVar10; } - if ((uint)puVar16[2] < 0x41) { + if (GHIDRA_UINT(puVar16[2]) < 0x41) { uVar10 = *(undefined4 *)(unaff_EBP + -0x34); *(undefined4 *)(unaff_EBP + -0x34) = uVar10; LAB_009d29c0: @@ -62730,7 +62730,7 @@ LAB_009d29c0: shortField = (ushort *)(*(int *)(unaff_EBP + -0x24) + 0x3b8); (**(code **)(*(int *)*puVar16 + 0x14))(shortField,2,1); pvVar11 = *(void **)(unaff_EBP + -0x28); - *(uint *)(unaff_EBP + -0x1c) = (uint)*shortField; + *(uint *)(unaff_EBP + -0x1c) = GHIDRA_UINT(*shortField); ((Checksum *)(pvVar11))->Checksum::Update((byte *)(unaff_EBP + -0x1c),2); uVar8 = puVar16[2]; if (0x57 < uVar8) { @@ -62746,12 +62746,12 @@ LAB_009d29c0: } else { (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x30,2,1); - *(uint *)(unaff_EBP + -0x1c) = (uint)*(ushort *)(unaff_EBP + -0x30); + *(uint *)(unaff_EBP + -0x1c) = GHIDRA_UINT(*(ushort *)(unaff_EBP + -0x30)); ((Checksum *)(pvVar11))->Checksum::Update((byte *)(unaff_EBP + -0x1c),2); iVar9 = *(int *)(unaff_EBP + -0x24); - *(int *)(iVar9 + 0x434) = (int)*(short *)(unaff_EBP + -0x30); + *(int *)(iVar9 + 0x434) = GHIDRA_INT(*(short *)(unaff_EBP + -0x30)); (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x30,2,1); - *(uint *)(unaff_EBP + -0x1c) = (uint)*(ushort *)(unaff_EBP + -0x30); + *(uint *)(unaff_EBP + -0x1c) = GHIDRA_UINT(*(ushort *)(unaff_EBP + -0x30)); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),2); *(undefined2 *)(iVar9 + 0x438) = *(undefined2 *)(unaff_EBP + -0x30); uVar8 = puVar16[2]; @@ -62822,11 +62822,11 @@ LAB_009d29c0: *(undefined1 *)(unaff_EBP + -0x38) = *(undefined1 *)(unaff_EBP + -0x1d); ((Checksum *)(pvVar11))->Checksum::Update((byte *)(unaff_EBP + -0x38),1); iVar9 = *(int *)(unaff_EBP + -0x24); - *(uint *)(iVar9 + 0x44c) = (uint)*(byte *)(unaff_EBP + -0x1d); + *(uint *)(iVar9 + 0x44c) = GHIDRA_UINT(*(byte *)(unaff_EBP + -0x1d)); (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x1d,1,1); *(undefined1 *)(unaff_EBP + -0x38) = *(undefined1 *)(unaff_EBP + -0x1d); ((Checksum *)(*(void **)(unaff_EBP + -0x34)))->Checksum::Update((byte *)(unaff_EBP + -0x38),1); - *(uint *)(iVar9 + 0x454) = (uint)*(byte *)(unaff_EBP + -0x1d); + *(uint *)(iVar9 + 0x454) = GHIDRA_UINT(*(byte *)(unaff_EBP + -0x1d)); } } uVar8 = puVar16[2]; @@ -62834,7 +62834,7 @@ LAB_009d29c0: (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x29,1,1); *(undefined1 *)(unaff_EBP + -0x38) = *(undefined1 *)(unaff_EBP + -0x29); ((Checksum *)(*(void **)(unaff_EBP + -0x34)))->Checksum::Update((byte *)(unaff_EBP + -0x38),1); - *(uint *)(iVar9 + 0x450) = (uint)*(byte *)(unaff_EBP + -0x29); + *(uint *)(iVar9 + 0x450) = GHIDRA_UINT(*(byte *)(unaff_EBP + -0x29)); uVar8 = puVar16[2]; } uVar10 = *(undefined4 *)(unaff_EBP + -0x28); @@ -62896,10 +62896,10 @@ LAB_009d2c5b: } else { (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x30,2,1); - *(uint *)(unaff_EBP + -0x1c) = (uint)*(ushort *)(unaff_EBP + -0x30); + *(uint *)(unaff_EBP + -0x1c) = GHIDRA_UINT(*(ushort *)(unaff_EBP + -0x30)); ((Checksum *)(pvVar11))->Checksum::Update((byte *)(unaff_EBP + -0x1c),2); iVar9 = *(int *)(unaff_EBP + -0x24); - *(int *)(iVar9 + 0x498) = (int)*(short *)(unaff_EBP + -0x30); + *(int *)(iVar9 + 0x498) = GHIDRA_INT(*(short *)(unaff_EBP + -0x30)); uVar8 = puVar16[2]; if (0x69 < uVar8) { (**(code **)(*(int *)*puVar16 + 0x14))((undefined4 *)(iVar9 + 0x49c),4,1); @@ -62926,7 +62926,7 @@ LAB_009d2c5b: pvVar11 = *(void **)(unaff_EBP + -0x28); *(undefined4 *)(unaff_EBP + -0x1c) = *(undefined4 *)(iVar9 + 0x4ac); ((Checksum *)(pvVar11))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); - if ((uint)puVar16[2] < 0x90) { + if (GHIDRA_UINT(puVar16[2]) < 0x90) { *(undefined4 *)(unaff_EBP + -100) = 0; *(undefined4 *)(unaff_EBP + -0x60) = 0; *(undefined4 *)(unaff_EBP + -0x5c) = 0; @@ -62987,19 +62987,19 @@ LAB_009d2c5b: iVar9 = iVar19; if ((0 < iVar18) && ((pvVar11 = (g_manager->_itemConfig)._cards._begin, - (int)(g_manager->_itemConfig)._cards._end - (int)pvVar11 >> 2 <= iVar18 || + GHIDRA_INT((g_manager->_itemConfig)._cards._end) - GHIDRA_INT(pvVar11) >> 2 <= iVar18 || (*(int *)((char *)pvVar11 + iVar18 * 4) == 0)))) { KAGE_LogMessage(1,(byte *)"[warn] Invalid pocket item (type: %d, ID: %d)\n"); pvVar11 = *(void **)(unaff_EBP + -0x88); if (pvVar11 != (void *)0x0) { - deallocate(pvVar11,*(int *)(unaff_EBP + -0x80) - (int)pvVar11 >> 2); + deallocate(pvVar11,*(int *)(unaff_EBP + -0x80) - GHIDRA_INT(pvVar11) >> 2); } pvVar11 = *(void **)(unaff_EBP + -100); if (pvVar11 == (void *)0x0) { uVar10 = FUN_009d459a(uVar10); return uVar10; } - deallocate(pvVar11,*(int *)(unaff_EBP + -0x5c) - (int)pvVar11 >> 2); + deallocate(pvVar11,*(int *)(unaff_EBP + -0x5c) - GHIDRA_INT(pvVar11) >> 2); goto code_r0x009d459a; } } @@ -63055,12 +63055,12 @@ LAB_009d2c5b: } pvVar11 = *(void **)(unaff_EBP + -0x88); if (pvVar11 != (void *)0x0) { - deallocate(pvVar11,*(int *)(unaff_EBP + -0x80) - (int)pvVar11 >> 2); + deallocate(pvVar11,*(int *)(unaff_EBP + -0x80) - GHIDRA_INT(pvVar11) >> 2); } *(undefined4 *)(unaff_EBP + -4) = 0xffffffff; pvVar11 = *(void **)(unaff_EBP + -100); if (pvVar11 != (void *)0x0) { - deallocate(pvVar11,*(int *)(unaff_EBP + -0x5c) - (int)pvVar11 >> 2); + deallocate(pvVar11,*(int *)(unaff_EBP + -0x5c) - GHIDRA_INT(pvVar11) >> 2); } } else { @@ -63079,7 +63079,7 @@ LAB_009d2c5b: if (((*(char *)(unaff_EBP + -0x4c) == '\x01') && (iVar9 = *(int *)(unaff_EBP + -0x48), 0 < iVar9)) && ((pvVar1 = (g_manager->_itemConfig)._cards._begin, - (int)(g_manager->_itemConfig)._cards._end - (int)pvVar1 >> 2 <= iVar9 || + GHIDRA_INT((g_manager->_itemConfig)._cards._end) - GHIDRA_INT(pvVar1) >> 2 <= iVar9 || (*(int *)((char *)pvVar1 + iVar9 * 4) == 0)))) { KAGE_LogMessage(1,(byte *)"[warn] Invalid pocket item (type: %d, ID: %d)\n"); goto code_r0x009d459a; @@ -63107,7 +63107,7 @@ LAB_009d2c5b: (**(code **)(*(int *)*puVar16 + 0x14))(fieldPtr,4,1); *(undefined4 *)(unaff_EBP + -0x1c) = *fieldPtr; ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); - if (0x98 < (uint)puVar16[2]) { + if (0x98 < GHIDRA_UINT(puVar16[2])) { fieldPtr = (undefined4 *)(*(int *)(unaff_EBP + -0x24) + 0x4d4); (**(code **)(*(int *)*puVar16 + 0x14))(fieldPtr,4,1); *(undefined4 *)(unaff_EBP + -0x1c) = *fieldPtr; @@ -63321,7 +63321,7 @@ LAB_009d2c5b: *(undefined1 *)(unaff_EBP + -0x30) = *(undefined1 *)(unaff_EBP + -0x29); ((Checksum *)(*(void **)(unaff_EBP + -0x34)))->Checksum::Update((byte *)(unaff_EBP + -0x30),1); *(undefined4 *)(unaff_EBP + -0x44) = 0; - *(int *)(*(int *)(unaff_EBP + -0x50) + 4) = (int)*(char *)(unaff_EBP + -0x29); + *(int *)(*(int *)(unaff_EBP + -0x50) + 4) = GHIDRA_INT(*(char *)(unaff_EBP + -0x29)); (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x44,4,1); *(undefined4 *)(unaff_EBP + -0x1c) = *(undefined4 *)(unaff_EBP + -0x44); ((Checksum *)(*(void **)(unaff_EBP + -0x34)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); @@ -63334,7 +63334,7 @@ LAB_009d2c5b: pvVar1 = (g_manager->_itemConfig)._cards._end; *(void **)(unaff_EBP + -0x1c) = pvVar11; iVar9 = *(int *)(unaff_EBP + -0x24); - if (((int)pvVar1 - (int)pvVar11 >> 2 <= iVar18) || + if ((GHIDRA_INT(pvVar1) - GHIDRA_INT(pvVar11) >> 2 <= iVar18) || (*(int *)(*(int *)(unaff_EBP + -0x1c) + iVar18 * 4) == 0)) { KAGE_LogMessage(1,(byte *)"[warn] Invalid pre curse pocket item (type: %d, ID: %d)\n"); goto code_r0x009d459a; @@ -63352,12 +63352,12 @@ LAB_009d2c5b: do { uVar14 = *puVar15; *(uint *)(unaff_EBP + -0x1c) = uVar14; - if (0 < (int)uVar14) { + if (0 < GHIDRA_INT(uVar14)) { puVar16 = *(undefined4 **)(unaff_EBX + 8); - if (((int)(g_manager->_itemConfig)._trinkets._end - - (int)(g_manager->_itemConfig)._trinkets._begin >> 2 <= (int)(uVar14 & 0x7fff)) || + if ((GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - + GHIDRA_INT((g_manager->_itemConfig)._trinkets._begin) >> 2 <= GHIDRA_INT((uVar14 & 0x7fff))) || (iVar9 = *(int *)(unaff_EBP + -0x24), - *(int *)((int)(g_manager->_itemConfig)._trinkets._begin + (uVar14 & 0x7fff) * 4) == 0)) + *(int *)(GHIDRA_INT((g_manager->_itemConfig)._trinkets._begin) + (uVar14 & 0x7fff) * 4) == 0)) { format = "[warn] Invalid pre curse trinket %d\n"; goto LAB_009d4590; @@ -63381,7 +63381,7 @@ LAB_009d2c5b: *(undefined1 *)(unaff_EBP + -0x30) = *(undefined1 *)(unaff_EBP + -0x35); ((Checksum *)(*(void **)(unaff_EBP + -0x34)))->Checksum::Update((byte *)(unaff_EBP + -0x30),1); *(undefined4 *)(unaff_EBP + -0x44) = 0; - **(int **)(unaff_EBP + -0x50) = (int)*(char *)(unaff_EBP + -0x35); + **(int **)(unaff_EBP + -0x50) = GHIDRA_INT(*(char *)(unaff_EBP + -0x35)); (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x44,4,1); *(undefined4 *)(unaff_EBP + -0x1c) = *(undefined4 *)(unaff_EBP + -0x44); ((Checksum *)(*(void **)(unaff_EBP + -0x34)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); @@ -63395,7 +63395,7 @@ LAB_009d2c5b: pvVar1 = (g_manager->_itemConfig)._cards._end; *(void **)(unaff_EBP + -0x1c) = pvVar11; iVar9 = *(int *)(unaff_EBP + -0x24); - if (((int)pvVar1 - (int)pvVar11 >> 2 <= iVar18) || + if ((GHIDRA_INT(pvVar1) - GHIDRA_INT(pvVar11) >> 2 <= iVar18) || (*(int *)(*(int *)(unaff_EBP + -0x1c) + iVar18 * 4) == 0)) { KAGE_LogMessage(1,(byte *) "[warn] Invalid pre coop ghost pocket item (type: %d, ID: %d)\n"); @@ -63417,12 +63417,12 @@ LAB_009d2c5b: if (cVar6 != '\0') { uVar14 = *puVar15; *(uint *)(unaff_EBP + -0x1c) = uVar14; - if (0 < (int)uVar14) { + if (0 < GHIDRA_INT(uVar14)) { puVar16 = *(undefined4 **)(unaff_EBX + 8); - if (((int)(g_manager->_itemConfig)._trinkets._end - - (int)(g_manager->_itemConfig)._trinkets._begin >> 2 <= (int)(uVar14 & 0x7fff)) || + if ((GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - + GHIDRA_INT((g_manager->_itemConfig)._trinkets._begin) >> 2 <= GHIDRA_INT((uVar14 & 0x7fff))) || (iVar9 = *(int *)(unaff_EBP + -0x24), - *(int *)((int)(g_manager->_itemConfig)._trinkets._begin + (uVar14 & 0x7fff) * 4) == 0 + *(int *)(GHIDRA_INT((g_manager->_itemConfig)._trinkets._begin) + (uVar14 & 0x7fff) * 4) == 0 )) { format = "[warn] Invalid pre coop ghost trinket %d\n"; goto LAB_009d4590; @@ -63510,14 +63510,14 @@ LAB_009d3eb4: iVar9 = *(int *)(unaff_EBP + -0x1c); } bVar7 = *(char *)(unaff_EBP + -0x35) + 1; - uVar8 = (uint)bVar7; + uVar8 = GHIDRA_UINT(bVar7); *(byte *)(unaff_EBP + -0x35) = bVar7; } while (bVar7 < *(byte *)(unaff_EBP + -0x1d)); puVar16 = *(undefined4 **)(unaff_EBX + 8); goto LAB_009d3eb4; } } - if ((uint)puVar16[2] < 0x6f) { + if (GHIDRA_UINT(puVar16[2]) < 0x6f) { LAB_009d3f14: uVar8 = puVar16[2]; if (0x72 < uVar8) { @@ -63564,7 +63564,7 @@ LAB_009d4022: iVar9 = **(int **)(unaff_EBP + -0x48); if (((*(char *)(unaff_EBP + -0x2d) == '\x01') && (0 < iVar9)) && ((pvVar11 = (manager->_itemConfig)._cards._begin, - (int)(manager->_itemConfig)._cards._end - (int)pvVar11 >> 2 <= iVar9 || + GHIDRA_INT((manager->_itemConfig)._cards._end) - GHIDRA_INT(pvVar11) >> 2 <= iVar9 || (*(int *)((char *)pvVar11 + iVar9 * 4) == 0)))) { KAGE_LogMessage(1,(byte *) "[warn] Invalid pocket item wildcard effect (type: %d, id: %d)\n"); @@ -63574,7 +63574,7 @@ LAB_009d4022: iVar9 = *(int *)(unaff_EBP + -0x24); } } - if (0x42 < (uint)puVar16[2]) { + if (0x42 < GHIDRA_UINT(puVar16[2])) { (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x44,4,1); *(undefined4 *)(unaff_EBP + -0x1c) = *(undefined4 *)(unaff_EBP + -0x44); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); @@ -63625,7 +63625,7 @@ LAB_009d4022: pvVar1 = (g_manager->_itemConfig)._trinkets._end; *(void **)(unaff_EBP + -0x1c) = pvVar11; puVar16 = *(undefined4 **)(unaff_EBX + 8); - if (((int)pvVar1 - (int)pvVar11 >> 2 <= (int)(uVar8 & 0x7fff)) || + if ((GHIDRA_INT(pvVar1) - GHIDRA_INT(pvVar11) >> 2 <= GHIDRA_INT((uVar8 & 0x7fff))) || (*(int *)(*(int *)(unaff_EBP + -0x1c) + (uVar8 & 0x7fff) * 4) == 0)) { format = "[warn] Invalid history trinket %d\n"; goto LAB_009d4590; @@ -63678,7 +63678,7 @@ LAB_009d422f: *(uint *)(unaff_EBP + -0x48) = uVar8; } while (uVar8 < *(uint *)(unaff_EBP + -0x44)); } - if (100 < (uint)puVar16[2]) { + if (100 < GHIDRA_UINT(puVar16[2])) { (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x29,1,1); *(undefined1 *)(unaff_EBP + -0x30) = *(undefined1 *)(unaff_EBP + -0x29); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x30),1); @@ -63686,17 +63686,17 @@ LAB_009d422f: if (*(char *)(unaff_EBP + -0x29) != '\0') { do { (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x30,2,1); - *(uint *)(unaff_EBP + -0x1c) = (uint)*(ushort *)(unaff_EBP + -0x30); + *(uint *)(unaff_EBP + -0x1c) = GHIDRA_UINT(*(ushort *)(unaff_EBP + -0x30)); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),2); bVar7 = *(byte *)(unaff_EBP + -0x35); bVar13 = bVar7 + 1; *(byte *)(unaff_EBP + -0x35) = bVar13; - *(int *)(iVar9 + 0x3c8 + (uint)bVar7 * 4) = (int)*(short *)(unaff_EBP + -0x30); + *(int *)(iVar9 + 0x3c8 + GHIDRA_UINT(bVar7) * 4) = GHIDRA_INT(*(short *)(unaff_EBP + -0x30)); } while (bVar13 < *(byte *)(unaff_EBP + -0x29)); } } } - if (0x50 < (uint)puVar16[2]) { + if (0x50 < GHIDRA_UINT(puVar16[2])) { (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x1d,1,1); *(undefined1 *)(unaff_EBP + -0x30) = *(undefined1 *)(unaff_EBP + -0x1d); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x30),1); @@ -63727,7 +63727,7 @@ LAB_009d422f: } while (bVar7 < *(byte *)(unaff_EBP + -0x1d)); } } - if (0x89 < (uint)puVar16[2]) { + if (0x89 < GHIDRA_UINT(puVar16[2])) { (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x3c,4,1); *(undefined4 *)(unaff_EBP + -0x1c) = *(undefined4 *)(unaff_EBP + -0x3c); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); @@ -63736,13 +63736,13 @@ LAB_009d422f: *(int *)(unaff_EBP + -0x44) = iVar9 + 0x5d4; do { (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x38,2,1); - *(uint *)(unaff_EBP + -0x48) = (uint)*(ushort *)(unaff_EBP + -0x38); + *(uint *)(unaff_EBP + -0x48) = GHIDRA_UINT(*(ushort *)(unaff_EBP + -0x38)); ((Checksum *)(checksum2))->Checksum::Update((byte *)(unaff_EBP + -0x48),2); (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x30,2,1); - *(uint *)(unaff_EBP + -0x48) = (uint)*(ushort *)(unaff_EBP + -0x30); + *(uint *)(unaff_EBP + -0x48) = GHIDRA_UINT(*(ushort *)(unaff_EBP + -0x30)); ((Checksum *)(checksum2))->Checksum::Update((byte *)(unaff_EBP + -0x48),2); - *(int *)(unaff_EBP + -0x54) = (int)*(short *)(unaff_EBP + -0x38); - *(uint *)(unaff_EBP + -0x50) = (uint)*(ushort *)(unaff_EBP + -0x30); + *(int *)(unaff_EBP + -0x54) = GHIDRA_INT(*(short *)(unaff_EBP + -0x38)); + *(uint *)(unaff_EBP + -0x50) = GHIDRA_UINT(*(ushort *)(unaff_EBP + -0x30)); std_map_int_insert(*(void **)(unaff_EBP + -0x44),(void *)(unaff_EBP + -0x78), (int *)(unaff_EBP + -0x54)); uVar8 = *(int *)(unaff_EBP + -0x1c) + 1; @@ -63753,7 +63753,7 @@ LAB_009d422f: } *(int *)(unaff_EBP + -0x3c) = iVar9 + 0x4b0; std::deque::_Tidy(); - if (0x9c < (uint)puVar16[2]) { + if (0x9c < GHIDRA_UINT(puVar16[2])) { piVar17 = (int *)*puVar16; *(undefined4 *)(unaff_EBP + -0x28) = 0; (**(code **)(*piVar17 + 0x14))(unaff_EBP + -0x28,4,1); @@ -63795,11 +63795,11 @@ LAB_009d4590: *(undefined4 *)(unaff_EBP + -0x1c) = *fieldPtr; ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); (**(code **)(*(int *)*puVar16 + 0x14))(unaff_EBP + -0x30,2,1); - *(uint *)(unaff_EBP + -0x1c) = (uint)*(ushort *)(unaff_EBP + -0x30); + *(uint *)(unaff_EBP + -0x1c) = GHIDRA_UINT(*(ushort *)(unaff_EBP + -0x30)); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),2); iVar9 = *(int *)(unaff_EBP + -0x24); *(undefined4 *)(unaff_EBP + -4) = 10; - uVar8 = (uint)*(ushort *)(unaff_EBP + -0x30); + uVar8 = GHIDRA_UINT(*(ushort *)(unaff_EBP + -0x30)); iVar18 = *(int *)(iVar9 + 0x51c); iVar19 = *(int *)(iVar9 + 0x518); *(int *)(unaff_EBP + -0x44) = iVar18; @@ -63812,7 +63812,7 @@ LAB_009d2c3f: *(int *)(iVar9 + 0x51c) = iVar18; } else if (uVar14 < uVar8) { - if (uVar8 <= (uint)(*(int *)(iVar9 + 0x520) - *(int *)(unaff_EBP + -0x1c) >> 4)) { + if (uVar8 <= GHIDRA_UINT((*(int *)(iVar9 + 0x520) - *(int *)(unaff_EBP + -0x1c) >> 4))) { iVar18 = uVar8 - uVar14; *(int *)(unaff_EBP + -0x1c) = iVar18; if (iVar18 == 0) { @@ -63888,7 +63888,7 @@ void Entity_Player::AddTrinket(int param_2, char param_3) undefined1 riffHeader [12]; uint local_c; - local_c = __security_cookie ^ (uint)&uStack_2c; + local_c = __security_cookie ^ GHIDRA_UINT(&uStack_2c); local_1c = param_2; streamSize = this->Init(); this->Render(riffHeader,0xc,1); diff --git a/src/game/entity_projectile.cpp b/src/game/entity_projectile.cpp index 09d3942..fb09542 100644 --- a/src/game/entity_projectile.cpp +++ b/src/game/entity_projectile.cpp @@ -46,9 +46,9 @@ void Entity_Projectile::AddProjectileFlags(ulonglong flags) { uint *flagsHigh; - *(uint *)&this->_projectileFlags = (uint)this->_projectileFlags | (uint)flags; - flagsHigh = (uint *)((int)&this->_projectileFlags + 4); - *flagsHigh = *flagsHigh | flags._4_4_; + *(uint *)&this->_projectileFlags = GHIDRA_UINT(this->_projectileFlags) | GHIDRA_UINT(flags); + flagsHigh = (uint *)(GHIDRA_INT(&this->_projectileFlags) + 4); + *flagsHigh = *flagsHigh | (*(undefined4 *)((char *)&(flags) + 0x4)); return; } @@ -97,7 +97,7 @@ void Entity_Projectile::Init(int type, int variant, int subType, uint initSeed) ((Entity *)((Entity *)this))->Entity::Init(type,variant,subType,initSeed); this->_entityGridCollisionClass = 4; if (this->_config != (void *)0x0) { - ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)((int)this->_config + 0x74),1); + ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)(GHIDRA_INT(this->_config) + 0x74),1); } this->_height = -23.0; uVar1 = Random(); @@ -105,21 +105,21 @@ void Entity_Projectile::Init(int type, int variant, int subType, uint initSeed) this->_scale = 1.0; *(undefined4 *)&this->_projectileFlags = 0; iVar2 = this->_variant; - *(undefined4 *)((int)&this->_projectileFlags + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&this->_projectileFlags) + 4) = 0; this->_homingStrength = 1.0; this->_curvingStrength = 0.015; this->_acceleration = 1.01; - uintFixup = __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]; + uintFixup = __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]; this->_orbitDistance = 0.0; this->_animKey = -1; this->_collisionDamage = 1.0; this->_isRenderedAtGround = 0; *(undefined4 *)&this->_changeFlags = 0; - *(undefined4 *)((int)&this->_changeFlags + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&this->_changeFlags) + 4) = 0; this->_changeVelocity = 0.0; this->_changeTimeout = 0x1e; this->_maxHitPoints = 0.0; - this->_fallingSpeed = ((float)((double)(int)uVar1 + uintFixup) * 2.3283064e-10 - 0.5) * 0.2; + this->_fallingSpeed = ((float)((double)GHIDRA_INT(uVar1) + uintFixup) * 2.3283064e-10 - 0.5) * 0.2; *(float *)&(*(undefined1 *)((char *)(this) + 0x460)) = g_vectorZero.x; *(float *)&(*(undefined1 *)((char *)(this) + 0x464)) = g_vectorZero.y; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x470)) = 0; @@ -145,9 +145,9 @@ void Entity_Projectile::Init(int type, int variant, int subType, uint initSeed) ((*(uint *)((char *)this->_spawnerEntity + 0x16c) & 0x400000) != 0)) { velX = (this->_velocity).x; flags = this->_flags; - flagsHigh = (uint *)((int)&this->_flags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&this->_flags) + 4); *flagsHigh = *flagsHigh | 0x400000; - *(int *)&this->_flags = (int)flags; + *(int *)&this->_flags = GHIDRA_INT(flags); (this->_velocity).x = velX * 0.8; (this->_velocity).y = (this->_velocity).y * 0.8; } @@ -178,12 +178,12 @@ void Entity_Projectile::Reflect(Entity *unused, Vector *newVelocity) changeFlags = this->_changeFlags; parent = &this->_parent; projectileFlags = this->_projectileFlags; - flagsHigh = (uint *)((int)&this->_projectileFlags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&this->_projectileFlags) + 4); *flagsHigh = *flagsHigh & 0xfffffffe; - flagsHigh = (uint *)((int)&this->_changeFlags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&this->_changeFlags) + 4); *flagsHigh = *flagsHigh & 0xfffffffe; - *(uint *)&this->_changeFlags = (uint)changeFlags & 0xfbe3e7fe | 0x80000080; - *(uint *)&this->_projectileFlags = (uint)projectileFlags & 0xfbe3e7fe | 0x80000080; + *(uint *)&this->_changeFlags = GHIDRA_UINT(changeFlags) & 0xfbe3e7fe | 0x80000080; + *(uint *)&this->_projectileFlags = GHIDRA_UINT(projectileFlags) & 0xfbe3e7fe | 0x80000080; (this->_velocity).x = newVelocity->x; (this->_velocity).y = newVelocity->y; if (*parent != (EntityPtr)0x0) { @@ -374,7 +374,7 @@ void Entity_Projectile::Update() uStack_14 = 0xffffffff; puStack_18 = &UNK_00af75f6; pvStack_1c = ExceptionList; - securityCookie = __security_cookie ^ (uint)(auStack_3c + 0x2c); + securityCookie = __security_cookie ^ GHIDRA_UINT((auStack_3c + 0x2c)); ExceptionList = &pvStack_1c; EStack_368 = (EntityPtr)0x0; VStack_3cc.y = (float)&this->_speedMultiplier; @@ -391,8 +391,8 @@ void Entity_Projectile::Update() uVar3 = Random(); bVar1 = ((Entity *)((Entity *)this))->Entity::IsFrame(uVar3 % 7 + 0xc,0); if (bVar1 != 0) { - *(uint *)&this->_flags = (uint)this->_flags & 0xffffffdf; - *(undefined4 *)((int)&this->_flags + 4) = *(undefined4 *)((int)&this->_flags + 4); + *(uint *)&this->_flags = GHIDRA_UINT(this->_flags) & 0xffffffdf; + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); *(float *)&(*(undefined1 *)((char *)(this) + 0x460)) = g_vectorZero.x; *(float *)&(*(undefined1 *)((char *)(this) + 0x464)) = g_vectorZero.y; goto LAB_00653169; @@ -407,7 +407,7 @@ void Entity_Projectile::Update() } iVar4 = this->_variant; if ((((iVar4 == 0) || (iVar4 == 3)) || (iVar4 == 4)) || (iVar4 == 6)) { - sizeIndex = (int)(this->_scale * 3.0 + 3.0); + sizeIndex = GHIDRA_INT((this->_scale * 3.0 + 3.0)); iVar4 = 0xd; if (sizeIndex < 0xd) { iVar4 = sizeIndex; @@ -445,7 +445,7 @@ void Entity_Projectile::Update() if (pvVar19 != (void *)0x0) { AnimationState::SetFrameFloat (&(this->_sprite)._animState, - (float)(int)((uint)(this->_dropRNG)._seed % *(uint *)((char *)pvVar19 + 0x30))); + (float)GHIDRA_INT((GHIDRA_UINT((this->_dropRNG)._seed) % *(uint *)((char *)pvVar19 + 0x30)))); } this->_animKey = 100; } @@ -553,7 +553,7 @@ LAB_0065334c: projectile->_animKey = 800; ((Entity *)((Entity *)EVar5))->Entity::AddFlagsLow(); LAB_00653797: - vecResult = ((Vector *)(&g_vectorOne))->Vector::__mul(&tmpVecC,(float *)((int)this + 0x420)); + vecResult = ((Vector *)(&g_vectorOne))->Vector::__mul(&tmpVecC,(float *)(GHIDRA_INT(this) + 0x420)); ((Sprite *)((Sprite *)EVar5))->Sprite::SetScale(vecResult); } } @@ -568,7 +568,7 @@ LAB_00653797: ((Sprite *)((Sprite *)anm2))->Sprite::set_flip_x(bVar1 & 1); uVar3 = ((RNG *)(&this->_dropRNG))->RNG::RandomInt(4); EStack_35c = (EntityPtr) - ((float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)] + ((float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)] ) * 48.0); layer = ((Sprite *)((Sprite *)anm2))->Sprite::GetLayer((byte *)0x0); (layer->_cropOffset).x = (float)EStack_35c; @@ -581,24 +581,24 @@ LAB_00653797: } else if (iVar4 == 0x10) { pVStack_3c4 = (Vector *)&DAT_0000000d; - EStack_35c = (EntityPtr)(int)(this->_scale * 3.0 + 3.0); + EStack_35c = (EntityPtr)GHIDRA_INT((this->_scale * 3.0 + 3.0)); piVar12 = (int *)std::min(); EStack_35c = (EntityPtr)(*piVar12 + 0x44c); if ((EntityPtr)this->_animKey != EStack_35c) { sprintf_s(animName,0x20,(byte *)"RegularTear%d"); ((ANM2 *)(&this->_sprite))->ANM2::Play(animName,0); - this->_animKey = (int)EStack_35c; + this->_animKey = GHIDRA_INT(EStack_35c); } EStack_35c = (EntityPtr)((Vector *)(&this->_velocity))->Vector::GetAngleDegrees(); if (((float)EStack_35c < -90.0) || (90.0 < (float)EStack_35c)) { EStack_364 = (EntityPtr)(180.0 - (float)EStack_35c); - EStack_360._0_1_ = 1; + (*(undefined1 *)((char *)&(EStack_360) + 0x0)) = 1; } else { - EStack_360 = (EntityPtr)((uint)(uint3)EStack_360._1_3_ << 8); + EStack_360 = (EntityPtr)((*(undefined1 *)((char *)&(GHIDRA_UINT((uint3))EStack_360) + 0x1)) << 8); EStack_364 = EStack_35c; } - ((Sprite *)((Sprite *)&this->_sprite))->Sprite::set_flip_x(EStack_360._0_1_); + ((Sprite *)((Sprite *)&this->_sprite))->Sprite::set_flip_x((*(undefined1 *)((char *)&(EStack_360) + 0x0))); ((Sprite *)((Sprite *)&this->_sprite))->Sprite::SetRotation((float)EStack_364); if (this->_child == (EntityPtr)0x0) { uVar3 = Random(); @@ -631,15 +631,15 @@ LAB_00653797: else { sprite = (Sprite *)((Entity *)())->Entity::GetSprite(); spriteColor = (Font *)((Sprite *)(sprite))->Sprite::Color(); - pCVar13 = (Color *)((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::Color(); + pCVar13 = (Color *)((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::Color(); fVar17 = ((Color *)(pCVar13))->Color::A(); EStack_35c = (EntityPtr)(fVar17 * 0.5); ((Font *)(spriteColor))->Font::SetLineHeightModifier((float)EStack_35c); tmpEntity = *(Entity **)((char *)this + 0x3c0); - vecResult = ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::__add(&tmpVecC, - (Vector *)((int)this + 0x34c)); + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::__add(&tmpVecC, + (Vector *)(GHIDRA_INT(this) + 0x34c)); ((Entity *)(tmpEntity))->Entity::SetPosition(vecResult); - ((Entity *)(*(Entity **)((char *)this + 0x3c0)))->Entity::SetVelocity((Vector *)((int)this + 0x360)); + ((Entity *)(*(Entity **)((char *)this + 0x3c0)))->Entity::SetVelocity((Vector *)(GHIDRA_INT(this) + 0x360)); } } goto LAB_00653bc5; @@ -719,10 +719,10 @@ LAB_00653bc5: } if ((uVar3 & 0x8000) != 0) { uVar3 = Random(); - tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x7b,(Vector *)((int)this + 0x33c), - (Vector *)((int)this + 0x360),*(Entity **)((char *)this + 0x3c8),4, + tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x7b,(Vector *)(GHIDRA_INT(this) + 0x33c), + (Vector *)(GHIDRA_INT(this) + 0x360),*(Entity **)((char *)this + 0x3c8),4, uVar3); - vecResult = ((Vector *)(&g_vectorOne))->Vector::__mul(&tmpVecA,(float *)((int)this + 0x420)); + vecResult = ((Vector *)(&g_vectorOne))->Vector::__mul(&tmpVecA,(float *)(GHIDRA_INT(this) + 0x420)); ((Entity *)(tmpEntity))->Entity::SetSpriteScale(vecResult); ((Entity *)(tmpEntity))->Entity::SetParent((Entity *)this); tmpEntity->Update(); @@ -735,27 +735,27 @@ LAB_00653d51: fVar18 = 0.0; LAB_00653d5c: ((KColor *)(this_02))->KColor::KColor(fVar15,fVar17,fVar18,1.0); - ((Entity *)((Entity *)((int)this + 0x33c)))->Entity::AddFear(); + ((Entity *)((Entity *)(GHIDRA_INT(this) + 0x33c)))->Entity::AddFear(); } if (((*(uint *)((char *)this + 0x43c) & 0x200000) != 0) && (EStack_35c = *(EntityPtr *)((char *)this + 0x30), - (undefined1 *)((int)EStack_35c - 1U) < (undefined1 *)0x3e7)) { + (undefined1 *)(GHIDRA_INT(EStack_35c) - 1U) < (undefined1 *)0x3e7)) { fStack_380 = *(float *)((char *)this + 0x420); EStack_360 = EStack_35c; - if (100 < (int)EStack_35c) { - EStack_360 = (EntityPtr)((int)EStack_35c + -100); + if (100 < GHIDRA_INT(EStack_35c)) { + EStack_360 = (EntityPtr)(GHIDRA_INT(EStack_35c) + -100); } - if (0 < (int)EStack_360) { + if (0 < GHIDRA_INT(EStack_360)) { EStack_374 = EStack_360; do { uVar3 = Random(); EVar5 = (EntityPtr) - ((Game *)(g_game))->Game::Spawn(9,0,(Vector *)((int)this + 0x33c),&g_vectorZero, + ((Game *)(g_game))->Game::Spawn(9,0,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero, *(Entity **)((char *)this + 0x3c8),0,uVar3); EStack_354 = EVar5; ((Entity *)((Entity *)EVar5))->Entity::SetTarget((Entity *)this); ((Entity *)((Entity *)EVar5))->Entity::SetParent(*(Entity **)((char *)this + 0x3bc)); - tmpColor = (ColorMod *)((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::Color(); + tmpColor = (ColorMod *)((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::Color(); ((Color *)((Color *)auStack_cc))->Color::operator_assign(tmpColor); iVar4 = Isaac::Random(2); if (iVar4 == 0) { @@ -779,14 +779,14 @@ LAB_00653d5c: ((Entity *)((Entity *)EStack_354))->Entity::SetTargetPosition(*vecResult); random_float(); FUN_004508a0(); - if (100 < (int)EStack_35c) { + if (100 < GHIDRA_INT(EStack_35c)) { FUN_00435cd0(); } - EStack_374 = (EntityPtr)((int)EStack_374 + -1); + EStack_374 = (EntityPtr)(GHIDRA_INT(EStack_374) + -1); } while (EStack_374 != (EntityPtr)0x0); EStack_374 = (EntityPtr)0x0; } - spriteColor = (Font *)((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::Color(); + spriteColor = (Font *)((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::Color(); ((Font *)(spriteColor))->Font::SetLineHeightModifier(0.0); *(undefined4 *)((char *)this + 0x30) = 1000; } @@ -806,12 +806,12 @@ LAB_00653d5c: (*(Entity **)((char *)this + 0x3c4) != (Entity *)0x0)) && (bVar1 = ((Entity *)(*(Entity **)((char *)this + 0x3c4)))->Entity::IsProjectile(), bVar1 != 0)) { vecResult = Vector::FromAngle(&tmpVecA,*(float *)((char *)this + 0x424)); - Vector::operator_mul(&VStack_418,(float *)((int)this + 0x334),vecResult); + Vector::operator_mul(&VStack_418,(float *)(GHIDRA_INT(this) + 0x334),vecResult); vecResult = Vector::FromAngle(&tmpVecA,*(float *)((char *)this + 0x424) + 90.0); - Vector::operator_mul(&VStack_438,(float *)((int)this + 0x338),vecResult); + Vector::operator_mul(&VStack_438,(float *)(GHIDRA_INT(this) + 0x338),vecResult); iVar4 = ((Game *)(g_game))->Game::GetFrameCount(); EStack_360 = (EntityPtr) - ((((float)((uint)(iVar4 + *(int *)((char *)this + 0x3ec)) % 0x1e) + 0.0) * 6.2831855) + ((((float)(GHIDRA_UINT((iVar4 + *(int *)((char *)this + 0x3ec))) % 0x1e) + 0.0) * 6.2831855) / 30.0); vecResult = ((Entity *)(*(Entity **)((char *)this + 0x3c4)))->Entity::Position(&tmpVecA); EVar5 = EStack_360; @@ -822,8 +822,8 @@ LAB_00653d5c: EStack_354 = (EntityPtr)sinf_wrapper((float)EStack_360); vecResult2 = Vector::operator_mul(&VStack_3f8,(float *)&EStack_354,&VStack_438); ((Vector *)(vecResult))->Vector::__add(&VStack_46c,vecResult2); - vecResult = ((Vector *)(&VStack_46c))->Vector::__sub(&VStack_3b0,(Vector *)((int)this + 0x33c)); - ((Vector *)((Vector *)((int)this + 0x360)))->Vector::operator_assign(vecResult); + vecResult = ((Vector *)(&VStack_46c))->Vector::__sub(&VStack_3b0,(Vector *)(GHIDRA_INT(this) + 0x33c)); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::operator_assign(vecResult); *(undefined4 *)((char *)this + 0x36c) = 0x3f800000; *(undefined4 *)((char *)this + 0x414) = 0; *(undefined4 *)((char *)this + 0x410) = 0xc1b80000; @@ -835,8 +835,8 @@ LAB_00653d5c: (iVar4 = ((Entity *)((Entity *)this))->Entity::GetIntervalTicks(2.0,0.0), iVar4 != 0)))) { uVar3 = Random(); EStack_34c = (EntityPtr)0x3f000000; - vecResult = ((Vector *)((Vector *)((int)this + 0x360)))->Vector::__mul(&tmpVecA,(float *)&EStack_34c); - tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x6f,(Vector *)((int)this + 0x33c),vecResult, + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::__mul(&tmpVecA,(float *)&EStack_34c); + tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x6f,(Vector *)(GHIDRA_INT(this) + 0x33c),vecResult, (Entity *)this,0,uVar3); ((BlendMode *)(auStack_cc + 0x2c))->BlendMode::SetMode(2,0); sprite = (Sprite *)((Entity *)(tmpEntity))->Entity::GetSprite(); @@ -861,8 +861,8 @@ LAB_00653d5c: else { uVar3 = Random(); EStack_34c = (EntityPtr)0x3f000000; - vecResult = ((Vector *)((Vector *)((int)this + 0x360)))->Vector::__mul(&tmpVecA,(float *)&EStack_34c); - tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x6f,(Vector *)((int)this + 0x33c),vecResult,(Entity *)this, + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::__mul(&tmpVecA,(float *)&EStack_34c); + tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x6f,(Vector *)(GHIDRA_INT(this) + 0x33c),vecResult,(Entity *)this, 0,uVar3); ((BlendMode *)(auStack_cc + 0x2c))->BlendMode::SetMode(2,0); sprite = (Sprite *)((Entity *)(tmpEntity))->Entity::GetSprite(); @@ -885,7 +885,7 @@ LAB_0065453a: } if (((*(uint *)((char *)this + 0x43c) & 0x800000) != 0) && (iVar4 = ((Entity *)((Entity *)this))->Entity::GetIntervalTicks(8.0,0.0), iVar4 != 0)) { - ((Vector *)((Vector *)((int)this + 0x360)))->Vector::Rotated(&VStack_3f8,90.0); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::Rotated(&VStack_3f8,90.0); EStack_360 = (EntityPtr)0x0; do { EVar5 = EStack_360; @@ -901,8 +901,8 @@ LAB_0065453a: vecResult = ((Vector *)(vecResult))->Vector::__mul(&tmpVecB,(float *)&EStack_354); otherProjectile = (Entity_Projectile *) - ((Game *)(g_game))->Game::Spawn(9,0,(Vector *)((int)this + 0x33c),vecResult,(Entity *)0x0,0, - (uint)EStack_35c); + ((Game *)(g_game))->Game::Spawn(9,0,(Vector *)(GHIDRA_INT(this) + 0x33c),vecResult,(Entity *)0x0,0, + GHIDRA_UINT(EStack_35c)); ((Entity *)((Entity *)otherProjectile))->Entity::SetSpawnerEntity(*(Entity **)((char *)this + 0x3c8)); FUN_004316b0(); FUN_004b7070(); @@ -912,8 +912,8 @@ LAB_0065453a: set_falling_accel(otherProjectile,-0.04); FUN_004aad70(); otherProjectile->Update(); - EStack_360 = (EntityPtr)((int)EStack_360 + 1); - } while ((int)EStack_360 < 2); + EStack_360 = (EntityPtr)(GHIDRA_INT(EStack_360) + 1); + } while (GHIDRA_INT(EStack_360) < 2); } if ((*(int *)((char *)this + 0x2c) == 0xe) && (iVar4 = ((Entity *)((Entity *)this))->Entity::GetIntervalTicks(2.0,0.0), iVar4 != 0)) { @@ -922,9 +922,9 @@ LAB_0065453a: if (fVar17 < (50.0 - *(float *)((char *)this + 0x3a4)) / 40.0) { uVar3 = Random(); EStack_34c = (EntityPtr)0x3f000000; - vecResult = ((Vector *)((Vector *)((int)this + 0x360)))->Vector::__mul(&tmpVecA,(float *)&EStack_34c); + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::__mul(&tmpVecA,(float *)&EStack_34c); pEVar6 = (Entity_Effect *) - ((Game *)(g_game))->Game::Spawn(1000,0x3b,(Vector *)((int)this + 0x33c),vecResult,(Entity *)this + ((Game *)(g_game))->Game::Spawn(1000,0x3b,(Vector *)(GHIDRA_INT(this) + 0x33c),vecResult,(Entity *)this ,0,uVar3); vecResult = &projectile->_posOffset; vecResult2 = ((Vector *)(&tmpVecB))->Vector::Vector(0.0,projectile->_fallingSpeed * 0.5); @@ -950,15 +950,15 @@ LAB_0065453a: } EStack_35c = (EntityPtr)Random(); EStack_34c = (EntityPtr)0x3f000000; - pVStack_3c4 = ((Vector *)((Vector *)((int)this + 0x360)))->Vector::__mul(&tmpVecA,(float *)&EStack_34c); + pVStack_3c4 = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::__mul(&tmpVecA,(float *)&EStack_34c); vecResult = MusicManager::RandomVector(&tmpVecB); vecResult = Vector::operator_mul(&tmpVecC,&projectile->_size,vecResult); EStack_354 = (EntityPtr)random_float(); vecResult = ((Vector *)(vecResult))->Vector::__mul(&VStack_3a8,(float *)&EStack_354); - vecResult = ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::__add(&VStack_408,vecResult); + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::__add(&VStack_408,vecResult); otherProjectile = projectile; tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x6f,vecResult,pVStack_3c4,(Entity *)projectile,0, - (uint)EStack_35c); + GHIDRA_UINT(EStack_35c)); vecResult = ((Vector *)((Vector *)(entityQuery + 0x1c)))->Vector::Vector(0.0, otherProjectile->_fallingSpeed * 0.5); vecResult = ((Vector *)(&otherProjectile->_posOffset))->Vector::__add(&VStack_474,vecResult); @@ -989,8 +989,8 @@ LAB_0065453a: (iVar4 = ((Entity *)((Entity *)this))->Entity::GetIntervalTicks(2.0,0.0), iVar4 != 0)) { uVar3 = Random(); EStack_34c = (EntityPtr)0x3f000000; - vecResult = ((Vector *)((Vector *)((int)this + 0x360)))->Vector::__mul(&tmpVecA,(float *)&EStack_34c); - tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x6f,(Vector *)((int)this + 0x33c),vecResult,(Entity *)this, + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::__mul(&tmpVecA,(float *)&EStack_34c); + tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x6f,(Vector *)(GHIDRA_INT(this) + 0x33c),vecResult,(Entity *)this, 0,uVar3); vecResult = &projectile->_posOffset; vecResult2 = ((Vector *)(&tmpVecB))->Vector::Vector(0.0,projectile->_fallingSpeed * 0.5); @@ -1008,20 +1008,20 @@ LAB_0065453a: if (*(char *)((char *)this + 0x173) == '\0') { if (*(int *)((char *)this + 0x34) != 0x390) { if ((*(int *)((char *)this + 0x3c4) == 0) && - (player = Game::GetNearestPlayerEx((Vector *)((int)this + 0x33c),0,0,0), + (player = Game::GetNearestPlayerEx((Vector *)(GHIDRA_INT(this) + 0x33c),0,0,0), player != (Entity_Player *)0x0)) { ((Entity *)((Entity *)this))->Entity::SetTarget((Entity *)player); } if (*(Entity **)((char *)this + 0x3c4) != (Entity *)0x0) { vecResult = ((Entity *)(*(Entity **)((char *)this + 0x3c4)))->Entity::Position(&tmpVecA); - vecResult = ((Vector *)(vecResult))->Vector::__sub(&tmpVecB,(Vector *)((int)this + 0x33c)); + vecResult = ((Vector *)(vecResult))->Vector::__sub(&tmpVecB,(Vector *)(GHIDRA_INT(this) + 0x33c)); ((Vector *)(vecResult))->Vector::Normalized(&VStack_3a0); - EStack_34c = (EntityPtr)((Vector *)((Vector *)((int)this + 0x360)))->Vector::Dot(&VStack_3a0); + EStack_34c = (EntityPtr)((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::Dot(&VStack_3a0); if (0.0 < (float)EStack_34c) { - EStack_34c = (EntityPtr)((Vector *)((Vector *)((int)this + 0x360)))->Vector::Length(); - vecResult = ((Vector *)(&VStack_3a0))->Vector::__mul(&tmpVecA,(float *)((int)this + 0x39c)); - ((Vector *)((Vector *)((int)this + 0x360)))->Vector::operator_add_assign(vecResult); - ((Vector *)((Vector *)((int)this + 0x360)))->Vector::Resize((float)EStack_34c); + EStack_34c = (EntityPtr)((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::Length(); + vecResult = ((Vector *)(&VStack_3a0))->Vector::__mul(&tmpVecA,(float *)(GHIDRA_INT(this) + 0x39c)); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::operator_add_assign(vecResult); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::Resize((float)EStack_34c); } } } @@ -1053,7 +1053,7 @@ LAB_006555d5: *(undefined4 *)((char *)this + 0x30) = 0; SoundEffects::PlayWithFartOverride(0x1e,1.0,2,0,1.0); uVar3 = Random(); - EStack_354 = (EntityPtr)((int)this + 0x33c); + EStack_354 = (EntityPtr)(GHIDRA_INT(this) + 0x33c); tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,2,(Vector *)EStack_354,&g_vectorZero,(Entity *)0x0,3,uVar3); EStack_34c = (EntityPtr)0x3fc00000; vecResult = Vector::operator_mul(&tmpVecA,(float *)&EStack_34c,&g_vectorOne); @@ -1069,7 +1069,7 @@ LAB_006555d5: ((Level *)((Level *)g_game))->Level::GetCurrentRoom(); entityList = (EntityList *)FUN_00428a60(); EntityList::QuerySublist(entityList,(EntityList_EL *)entityQuery2,9,-1,-1,0,0); - uStack_14 = CONCAT31(uStack_14._1_3_,2); + uStack_14 = CONCAT31((*(undefined1 *)((char *)&(uStack_14) + 0x1)),2); uVar3 = 0; iVar4 = ((EntityList *)((EntityList *)entityQuery2))->EntityList::Size(); otherProjectile = projectile; @@ -1116,7 +1116,7 @@ LAB_006555d5: listEntry = (undefined4 *)FUN_0042c810(); otherProjectile = (Entity_Projectile *)*listEntry; ((Vector *)(&VStack_3f0))->Vector::Rotated(&VStack_3a0, - (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)] + (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)] ) * (float)EStack_374 + (float)EStack_364); EStack_34c = (EntityPtr)0x40c00000; vecResult = ((Vector *)(&VStack_3a0))->Vector::__mul(&tmpVecA,(float *)&EStack_34c); @@ -1178,7 +1178,7 @@ LAB_006555d5: vecResult = Vector::operator_mul(&VStack_4c4,(float *)&pVStack_3c4,&VStack_3a8); vecResult = ((Vector *)(&this_03->_pos))->Vector::__add(&VStack_4cc,vecResult); spawn_small_maggot_jump(vecResult,(float)EStack_35c,&this_03->_pos); - EStack_360 = (EntityPtr)((int)EStack_360 + -1); + EStack_360 = (EntityPtr)(GHIDRA_INT(EStack_360) + -1); } while (EStack_360 != (EntityPtr)0x0); uVar3 = Random(); tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x17,&this_03->_pos,&g_vectorZero,(Entity *)this_03,0, @@ -1208,10 +1208,10 @@ LAB_006555d5: (iVar4 = ((Entity *)((Entity *)this))->Entity::GetIntervalTicks(4.0,0.0), iVar4 != 0)) { uVar3 = Random(); EStack_34c = (EntityPtr)0x3e4ccccd; - vecResult = ((Vector *)((Vector *)((int)this + 0x360)))->Vector::__mul(&tmpVecA,(float *)&EStack_34c); + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::__mul(&tmpVecA,(float *)&EStack_34c); otherProjectile = (Entity_Projectile *) - ((Game *)(g_game))->Game::Spawn(9,0,(Vector *)((int)this + 0x33c),vecResult,(Entity *)0x0,0,uVar3); + ((Game *)(g_game))->Game::Spawn(9,0,(Vector *)(GHIDRA_INT(this) + 0x33c),vecResult,(Entity *)0x0,0,uVar3); ((Entity *)((Entity *)otherProjectile))->Entity::SetSpawnerEntity((Entity *)*(EntityPtr *)((char *)this + 0x3c8)); FUN_004316b0(); FUN_004b7070(); @@ -1261,10 +1261,10 @@ LAB_006555d5: } } else if (iVar4 == 5) { - tmpColor = (ColorMod *)((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::Color(); + tmpColor = (ColorMod *)((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::Color(); fVar17 = random_float(); Game::SpawnParticles - (g_game,(Vector *)((int)this + 0x33c),0x3a,4,fVar17 * 2.0 + 1.0,tmpColor, + (g_game,(Vector *)(GHIDRA_INT(this) + 0x33c),0x3a,4,fVar17 * 2.0 + 1.0,tmpColor, fStack_380,0); uVar3 = 0x2b; } @@ -1278,28 +1278,28 @@ LAB_006555d5: } } uVar8 = Random(); - ((Game *)(g_game))->Game::Spawn(1000,uVar3,(Vector *)((int)this + 0x33c),&g_vectorZero,(Entity *)0x0,0, + ((Game *)(g_game))->Game::Spawn(1000,uVar3,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero,(Entity *)0x0,0, uVar8); EVar5 = (EntityPtr)__RTDynamicCast(); EStack_374 = EVar5; - ((Entity *)((Entity *)EVar5))->Entity::SetPositionOffset((Vector *)((int)this + 0x34c)); + ((Entity *)((Entity *)EVar5))->Entity::SetPositionOffset((Vector *)(GHIDRA_INT(this) + 0x34c)); vecResult = ((Vector *)(&g_vectorOne))->Vector::__mul(&VStack_3b0,(float *)&EStack_360); ((Entity *)((Entity *)EVar5))->Entity::SetSpriteScale(vecResult); Isaac::Random(4); FUN_0043eea0(); room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); - bVar1 = ((Room *)(room))->Room::IsPositionInRoom((Vector *)((int)this + 0x33c),-80.0); + bVar1 = ((Room *)(room))->Room::IsPositionInRoom((Vector *)(GHIDRA_INT(this) + 0x33c),-80.0); if (bVar1 != 0) { SoundEffects::PlayWithFartOverride2 - ((int)EStack_368,(int)this + 0x33c,2,0,1.0,(float)EStack_364); + (GHIDRA_INT(EStack_368),GHIDRA_INT(this) + 0x33c,2,0,1.0,(float)EStack_364); } } else if (iVar4 == 1) { fStack_380 = *(float *)((char *)this + 0x410); - tmpColor = (ColorMod *)((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::Color(); + tmpColor = (ColorMod *)((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::Color(); fVar17 = random_float(); Game::SpawnParticles - (g_game,(Vector *)((int)this + 0x33c),0x23,8,fVar17 * 2.0 + 1.0,tmpColor, + (g_game,(Vector *)(GHIDRA_INT(this) + 0x33c),0x23,8,fVar17 * 2.0 + 1.0,tmpColor, fStack_380,1); } else if (iVar4 == 2) { @@ -1335,32 +1335,32 @@ LAB_006555d5: fStack_380,0); fVar17 = random_float(); SoundEffects::PlayWithFartOverride2 - (0x8a,(int)&otherProjectile->_pos,2,0,fVar17 * 0.5 + 2.0,0.2); + (0x8a,GHIDRA_INT(&otherProjectile->_pos),2,0,fVar17 * 0.5 + 2.0,0.2); LAB_00655e83: this = projectile; } else if (iVar4 == 8) { ((Color *)(&CStack_108))->Color::Color(); - ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::SetColor(color_00); + ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::SetColor(color_00); rng_pair_init(subtypeHigh); - subtypeHigh._0_4_ = (uint)*(int *)((char *)this + 0x30) >> 0x10; - subtypeHigh._4_4_ = *(int *)((char *)this + 0x30) & 0xffff; + (*(undefined4 *)((char *)&(subtypeHigh) + 0x0)) = GHIDRA_UINT(*(int *)((char *)this + 0x30)) >> 0x10; + (*(undefined4 *)((char *)&(subtypeHigh) + 0x4)) = *(int *)((char *)this + 0x30) & 0xffff; VStack_34.x = *(float *)((char *)this + 0x3ec); bVar1 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x40000); - auStack_3c._0_4_ = (BADTYPE)*(float *)((char *)this + 0x380); - VStack_34.y = (float)(uint)(bVar1 != 0); + (*(undefined4 *)((char *)&(auStack_3c) + 0x0)) = (BADTYPE)*(float *)((char *)this + 0x380); + VStack_34.y = (float)GHIDRA_UINT((bVar1 != 0)); Entity::DestroyRockGridAt - ((Vector *)((int)this + 0x33c),(GridEntityDesc *)subtypeHigh,(Entity *)this, + ((Vector *)(GHIDRA_INT(this) + 0x33c),(GridEntityDesc *)subtypeHigh,(Entity *)this, *(int *)((char *)this + 0x448)); } else { if (iVar4 == 9) { ((Color *)((Color *)auStack_160))->Color::Color(); ((KColor *)((KColor *)auStack_160))->KColor::FromRGBA255(0x8c,0x7b,0x7b,0xff); - tmpColor = (ColorMod *)((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::Color(); + tmpColor = (ColorMod *)((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::Color(); ((Color *)((Color *)auStack_160))->Color::__mul(tmpColor); uVar3 = Random(); - EStack_360 = (EntityPtr)((int)this + 0x33c); + EStack_360 = (EntityPtr)(GHIDRA_INT(this) + 0x33c); tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x91,(Vector *)EStack_360,&g_vectorZero,(Entity *)this ,0,uVar3); pVStack_384 = &projectile->_posOffset; @@ -1376,16 +1376,16 @@ LAB_00655e83: EVar5 = EStack_360; bVar1 = ((Room *)(room))->Room::IsPositionInRoom((Vector *)EStack_360,-20.0); if (bVar1 != 0) { - SoundEffects::PlayWithFartOverride2(0x89,(int)EVar5,2,0,1.0,1.0); + SoundEffects::PlayWithFartOverride2(0x89,GHIDRA_INT(EVar5),2,0,1.0,1.0); EStack_34c = (EntityPtr)0x10; fStack_380 = 1.4013e-45; fVar17 = random_float(); - EStack_368 = (EntityPtr)(int)(*(float *)pEStack_358 * 4.0 * (fVar17 * 0.5 + 1.0)); + EStack_368 = (EntityPtr)GHIDRA_INT((*(float *)pEStack_358 * 4.0 * (fVar17 * 0.5 + 1.0))); std::max(); pEVar9 = (EntityPtr *)std::min(); EVar11 = *pEVar9; EStack_354 = EVar11; - if (0 < (int)EVar11) { + if (0 < GHIDRA_INT(EVar11)) { EStack_35c = (EntityPtr)&projectile->_size; do { fVar17 = random_float(); @@ -1402,7 +1402,7 @@ LAB_00655e83: ((Entity *)(tmpEntity))->Entity::SetPositionOffset(pVStack_384); tmpEntity->SetColor(); tmpEntity->Update(); - EVar11 = (EntityPtr)&(*(undefined1 *)((char *)(((Entity_Projectile *)((int)EVar11 + -0x478))) + 0x477)); + EVar11 = (EntityPtr)&(*(undefined1 *)((char *)(((Entity_Projectile *)(GHIDRA_INT(EVar11) + -0x478))) + 0x477)); EVar5 = EStack_360; } while (EVar11 != (EntityPtr)0x0); } @@ -1411,12 +1411,12 @@ LAB_00655e83: } if (iVar4 == 0xb) { uVar3 = Random(); - EVar5 = (EntityPtr)((int)this + 0x33c); + EVar5 = (EntityPtr)(GHIDRA_INT(this) + 0x33c); EStack_34c = EVar5; tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,2,(Vector *)EVar5,&g_vectorZero,(Entity *)0x0,2,uVar3) ; - ((Entity *)(tmpEntity))->Entity::SetPositionOffset((Vector *)((int)this + 0x34c)); - SoundEffects::PlayWithFartOverride2(0x102,(int)EVar5,2,0,1.0,1.0); + ((Entity *)(tmpEntity))->Entity::SetPositionOffset((Vector *)(GHIDRA_INT(this) + 0x34c)); + SoundEffects::PlayWithFartOverride2(0x102,GHIDRA_INT(EVar5),2,0,1.0,1.0); room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); VStack_3f0.x = *(float *)EVar5; VStack_3f0.y = *(float *)((char *)this + 0x340); @@ -1427,7 +1427,7 @@ LAB_00655e83: fStack_380 = 0.1; vecResult = ((Vector *)(&projectile->_velocity))->Vector::__mul(&VStack_3b0,&fStack_380); tmpEntity = ((Game *)(g_game))->Game::Spawn(0x18, - (uint)((uint)projectile->_initSeed % (uint)EStack_368 == 0), + GHIDRA_UINT((GHIDRA_UINT(projectile->_initSeed) % GHIDRA_UINT(EStack_368) == 0)), (Vector *)EStack_34c,vecResult,(Entity *)EVar5,0,uVar3); ((Entity *)(tmpEntity))->Entity::ClearEntityFlags(4); ((Entity *)(tmpEntity))->Entity::SetField380(24.0); @@ -1445,7 +1445,7 @@ LAB_00655e83: } if ((*(uint *)((char *)this + 0x438) & 0x4000) != 0) { uVar3 = Random(); - ((Game *)(g_game))->Game::Spawn(1000,0x38,(Vector *)((int)this + 0x33c),&g_vectorZero,(Entity *)this,0, + ((Game *)(g_game))->Game::Spawn(1000,0x38,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero,(Entity *)this,0, uVar3); pEVar6 = (Entity_Effect *)__RTDynamicCast(); pEVar6->Update(); @@ -1454,7 +1454,7 @@ LAB_00655e83: } else { uVar3 = Random(); - pEVar6 = (Entity_Effect *)((int)this + 0x33c); + pEVar6 = (Entity_Effect *)(GHIDRA_INT(this) + 0x33c); pEStack_358 = pEVar6; EStack_374 = (EntityPtr) ((Game *)(g_game))->Game::Spawn(1000,1,(Vector *)pEVar6,&g_vectorZero,(Entity *)0x0,0,uVar3); @@ -1471,20 +1471,20 @@ LAB_00655e83: if (iVar4 == 0x389) { EStack_360 = (EntityPtr)0x0; do { - vecResult = Vector::FromAngle(&VStack_3b0,(float)(int)EStack_360 * 60.0 + 0.0); + vecResult = Vector::FromAngle(&VStack_3b0,(float)GHIDRA_INT(EStack_360) * 60.0 + 0.0); fStack_380 = 8.0; Vector::operator_mul(&VStack_3f8,&fStack_380,vecResult); uVar3 = Random(); otherProjectile = (Entity_Projectile *) - ((Game *)(g_game))->Game::Spawn(9,2,(Vector *)((int)this + 0x33c),&VStack_3f8, + ((Game *)(g_game))->Game::Spawn(9,2,(Vector *)(GHIDRA_INT(this) + 0x33c),&VStack_3f8, *(Entity **)((char *)this + 0x3bc),0,uVar3); FUN_004316b0(); FUN_004b7070(); set_falling_accel(otherProjectile,0.05); otherProjectile->SetColor(); - EStack_360 = (EntityPtr)((int)EStack_360 + 1); - } while ((int)EStack_360 < 6); + EStack_360 = (EntityPtr)(GHIDRA_INT(EStack_360) + 1); + } while (GHIDRA_INT(EStack_360) < 6); iVar4 = *(int *)((char *)this + 0x34); } if ((iVar4 == 0x3b7) && (*(int *)((char *)this + 0x38) == 0x14)) { @@ -1494,7 +1494,7 @@ LAB_00655e83: EVar5 = EStack_360; uVar3 = Random(); EStack_368 = projectile->_spawnerEntity; - vecResult = ((Vector *)(&VStack_3b0))->Vector::Vector(0.0,-2.0 - (float)(int)EVar5 * 7.0); + vecResult = ((Vector *)(&VStack_3b0))->Vector::Vector(0.0,-2.0 - (float)GHIDRA_INT(EVar5) * 7.0); vecResult2 = MusicManager::RandomVector(&tmpVecA); fStack_380 = 10.0; vecResult2 = ((Vector *)(vecResult2))->Vector::__mul(&tmpVecB,&fStack_380); @@ -1531,18 +1531,18 @@ LAB_00655e83: FUN_00444c70(); set_falling_accel(otherProjectile,1.0); otherProjectile->Update(); - EStack_360 = (EntityPtr)((int)EStack_360 + 1); - } while ((int)EStack_360 < 0xe); + EStack_360 = (EntityPtr)(GHIDRA_INT(EStack_360) + 1); + } while (GHIDRA_INT(EStack_360) < 0xe); ((Level *)((Level *)g_game))->Level::GetCurrentRoom(); Room::get_lava_line_y(); fVar15 = (this->_pos).y; if (fVar17 <= fVar15) { VStack_3f0.x = (this->_pos).x; - auVar16 = ZEXT416((uint)fVar15); + auVar16 = ZEXT416(GHIDRA_UINT(fVar15)); VStack_3f0.y = fVar15; ((Level *)((Level *)g_game))->Level::GetCurrentRoom(); Room::get_lava_line_y(); - VStack_3f0.y = auVar16._0_4_; + VStack_3f0.y = (*(undefined4 *)((char *)&(auVar16) + 0x0)); pEVar6 = Entity_Effect::CreateTimer(reroll_entity_to_free_tile,5,4,0); ((Entity *)((Entity *)pEVar6))->Entity::SetSpawnerEntity((Entity *)this->_spawnerEntity); FUN_004316b0(); @@ -1560,7 +1560,7 @@ LAB_00655e83: if ((*(uint *)((char *)this + 0x438) & 4) == 0) { uVar8 = 0x16; } - ((Game *)(g_game))->Game::Spawn(1000,uVar8,(Vector *)((int)this + 0x33c),&g_vectorZero,(Entity *)this,0, + ((Game *)(g_game))->Game::Spawn(1000,uVar8,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero,(Entity *)this,0, uVar3); pEVar6 = (Entity_Effect *)__RTDynamicCast(); FUN_004316b0(); @@ -1577,7 +1577,7 @@ LAB_00655e83: } pEVar6->Update(); uVar3 = Random(); - ((Game *)(g_game))->Game::Spawn(1000,7,(Vector *)((int)this + 0x33c),&g_vectorZero,(Entity *)0x0,0,uVar3); + ((Game *)(g_game))->Game::Spawn(1000,7,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero,(Entity *)0x0,0,uVar3); tmpEntity = (Entity *)__RTDynamicCast(); fVar17 = random_float(); EStack_354 = (EntityPtr)(fVar17 + 0.8); @@ -1587,15 +1587,15 @@ LAB_00655e83: ((Sprite *)((Sprite *)&projectile->_sprite))->Sprite::Color(); (*vfunc)(); tmpEntity->Update(); - VStack_438.y = *(float *)((int)&projectile->_projectileFlags + 4); - uVar3 = (uint)projectile->_projectileFlags; + VStack_438.y = *(float *)(GHIDRA_INT(&projectile->_projectileFlags) + 4); + uVar3 = GHIDRA_UINT(projectile->_projectileFlags); this = projectile; } if ((uVar3 & 8) != 0) { iVar4 = *(int *)((char *)this + 0x34); if (iVar4 == 0x3e) { uVar3 = Random(); - ((Game *)(g_game))->Game::Spawn(1000,0x19,(Vector *)((int)this + 0x33c),&g_vectorZero,(Entity *)this,0, + ((Game *)(g_game))->Game::Spawn(1000,0x19,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero,(Entity *)this,0, uVar3); tmpEntity = (Entity *)__RTDynamicCast(); EStack_354 = (EntityPtr)0x40000000; @@ -1607,7 +1607,7 @@ LAB_00655e83: else { if ((iVar4 == 0x133) || (iVar4 == 0x22)) { uVar3 = Random(); - ((Game *)(g_game))->Game::Spawn(1000,0x1a,(Vector *)((int)this + 0x33c),&g_vectorZero,(Entity *)this,0, + ((Game *)(g_game))->Game::Spawn(1000,0x1a,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero,(Entity *)this,0, uVar3); pEVar6 = (Entity_Effect *)__RTDynamicCast(); ((Entity_Effect *)(pEVar6))->Entity_Effect::SetTimeout(0x96); @@ -1615,7 +1615,7 @@ LAB_00655e83: } else { uVar3 = Random(); - ((Game *)(g_game))->Game::Spawn(1000,0x1a,(Vector *)((int)this + 0x33c),&g_vectorZero,(Entity *)this,0, + ((Game *)(g_game))->Game::Spawn(1000,0x1a,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero,(Entity *)this,0, uVar3); pEVar6 = (Entity_Effect *)__RTDynamicCast(); EStack_354 = (EntityPtr)0x40400000; @@ -1627,7 +1627,7 @@ LAB_00655e83: } if ((*(uint *)((char *)this + 0x438) & 0x10000) != 0) { if (*(int *)((char *)this + 0x34) == 0x3e) { - EStack_354 = (EntityPtr)((Vector *)((Vector *)((int)this + 0x360)))->Vector::Length(); + EStack_354 = (EntityPtr)((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::Length(); ((Vector *)(&VStack_3cc))->Vector::Vector((float)EStack_354,0.0); iVar4 = Isaac::Random(2); if (iVar4 == 0) { @@ -1645,12 +1645,12 @@ LAB_00655e83: vecResult = ((Vector *)(&VStack_3cc))->Vector::__mul(&VStack_3b0,(float *)&EStack_35c); } ((Vector *)(&VStack_3cc))->Vector::operator_assign(vecResult); - EStack_364 = (EntityPtr)((int)this + 0x48); + EStack_364 = (EntityPtr)(GHIDRA_INT(this) + 0x48); pEStack_358 = (Entity_Effect *)0x4; do { uVar3 = Random(); - vecResult = ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::__sub(&tmpVecA, - (Vector *)((int)this + 0x360)); + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::__sub(&tmpVecA, + (Vector *)(GHIDRA_INT(this) + 0x360)); ((Game *)(g_game))->Game::Spawn(*(int *)((char *)this + 0x28),*(int *)((char *)this + 0x2c),vecResult, &VStack_3cc,(Entity *)0x0,0,uVar3); tmpEntity = (Entity *)__RTDynamicCast(); @@ -1666,9 +1666,9 @@ LAB_00655e83: std::max(); FUN_004508a0(); savedProjFlags = otherProjectile->_projectileFlags; - tmpEntity[1]._variant = *(int *)((int)&otherProjectile->_projectileFlags + 4); + tmpEntity[1]._variant = *(int *)(GHIDRA_INT(&otherProjectile->_projectileFlags) + 4); iVar4 = *(int *)tmpEntity; - tmpEntity[1]._type = (uint)savedProjFlags & 0xfffeffff; + tmpEntity[1]._type = GHIDRA_UINT(savedProjFlags) & 0xfffeffff; tmpEntity[1]._damageEvents._begin = (void *)0x3dcccccd; vfunc = *(code **)(iVar4 + 0x3c); *(undefined4 *)&(*(undefined1 *)((char *)&(tmpEntity[1]) + 0x4)) = 0xc0400000; @@ -1684,7 +1684,7 @@ LAB_00655e83: pEStack_358 = (Entity_Effect *)0x0; } else if ((*(int *)((char *)this + 0x34) == 0x38f) && (*(int *)((char *)this + 0x38) == 2)) { - EStack_354 = (EntityPtr)((int)this + 0x33c); + EStack_354 = (EntityPtr)(GHIDRA_INT(this) + 0x33c); pEStack_358 = (Entity_Effect *)0xffffffff; do { pEVar6 = pEStack_358; @@ -1693,7 +1693,7 @@ LAB_00655e83: fVar17 = random_float(); fVar17 = Math::lerp(-6.0,-10.0,fVar17,0); vecResult = ((Vector *)(&VStack_3b0))->Vector::Vector(0.0,fVar17); - vecResult = ((Vector *)(vecResult))->Vector::Rotated(&tmpVecA,(float)(int)pEVar6 * 30.0); + vecResult = ((Vector *)(vecResult))->Vector::Rotated(&tmpVecA,(float)GHIDRA_INT(pEVar6) * 30.0); vecResult2 = ((Vector *)(&tmpVecB))->Vector::Vector(0.0,-6.0); vecResult2 = ((Vector *)((Vector *)EStack_354))->Vector::__add(&tmpVecC,vecResult2); otherProjectile = @@ -1708,16 +1708,16 @@ LAB_00655e83: set_falling_accel(otherProjectile,0.2); otherProjectile->SetColor(); pEStack_358 = (Entity_Effect *)&(*(undefined1 *)((char *)(pEStack_358) + 0x2)); - } while ((int)pEStack_358 < 2); + } while (GHIDRA_INT(pEStack_358) < 2); } else { MusicManager::RandomVector(&VStack_3e4); - EStack_35c = (EntityPtr)((int)this + 0x360); + EStack_35c = (EntityPtr)(GHIDRA_INT(this) + 0x360); EStack_354 = (EntityPtr)((Vector *)((Vector *)EStack_35c))->Vector::Length(); ((Vector *)(&VStack_3e4))->Vector::operator_mul_assign((float *)&EStack_354); - pVStack_384 = (Vector *)((int)this + 0x33c); + pVStack_384 = (Vector *)(GHIDRA_INT(this) + 0x33c); pEStack_358 = (Entity_Effect *)0x0; - EStack_364 = (EntityPtr)((int)this + 0x48); + EStack_364 = (EntityPtr)(GHIDRA_INT(this) + 0x48); do { ((EntityPtr *)((EntityPtr *)&scratchVec))->EntityPtr::clear(); if (pEStack_358 < (Entity_Effect *)0x2) { @@ -1727,7 +1727,7 @@ LAB_00655e83: vecResult = ((Vector *)(&VStack_3b0))->Vector::Vector(VStack_3e4.y,-VStack_3e4.x); } ((Vector *)(&scratchVec))->Vector::operator_assign(vecResult); - if (((uint)pEStack_358 & 1) != 0) { + if ((GHIDRA_UINT(pEStack_358) & 1) != 0) { vecResult = ((Vector *)(&scratchVec))->Vector::__unm(&tmpVecA); ((Vector *)(&scratchVec))->Vector::operator_assign(vecResult); } @@ -1743,8 +1743,8 @@ LAB_00655e83: random_float(); FUN_00444c70(); tmpEntity->SetCollisionDamage(); - iVar4 = *(int *)((int)&otherProjectile->_projectileFlags + 4); - tmpEntity[1]._type = (uint)otherProjectile->_projectileFlags & 0xfffeffff; + iVar4 = *(int *)(GHIDRA_INT(&otherProjectile->_projectileFlags) + 4); + tmpEntity[1]._type = GHIDRA_UINT(otherProjectile->_projectileFlags) & 0xfffeffff; tmpEntity[1]._variant = iVar4; FUN_004508a0(); vfunc = *(code **)(*(int *)tmpEntity + 0x3c); @@ -1754,16 +1754,16 @@ LAB_00655e83: tmpEntity->Update(); pEStack_358 = (Entity_Effect *)&(*(undefined1 *)((char *)(pEStack_358) + 0x1)); this = projectile; - } while ((int)pEStack_358 < 4); + } while (GHIDRA_INT(pEStack_358) < 4); } } if ((*(uint *)((char *)this + 0x43c) & 8) != 0) { - SoundEffects::PlayWithFartOverride2(0x1e3,(int)((int)this + 0x33c),0x2d,0,1.0,1.0); + SoundEffects::PlayWithFartOverride2(0x1e3,GHIDRA_INT((GHIDRA_INT(this) + 0x33c)),0x2d,0,1.0,1.0); iVar4 = 0; do { uVar3 = Random(); pEStack_358 = (Entity_Effect *) - ((Game *)(g_game))->Game::Spawn(1000,0x94,(Vector *)((int)this + 0x33c),&g_vectorZero, + ((Game *)(g_game))->Game::Spawn(1000,0x94,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero, (Entity *)*(EntityPtr *)((char *)this + 0x3c8),0,uVar3); ((Entity *)((Entity *)pEStack_358))->Entity::SetParent((Entity *)this); ((Entity_Effect *)(pEStack_358))->Entity_Effect::set_rotation((float)iVar4 * 90.0 + 0.0); @@ -1775,33 +1775,33 @@ LAB_00655e83: } while (iVar4 < 4); } if ((*(uint *)((char *)this + 0x43c) & 0x10) != 0) { - SoundEffects::PlayWithFartOverride2(0x1e3,(int)((int)this + 0x33c),0x2d,0,1.0,1.0); + SoundEffects::PlayWithFartOverride2(0x1e3,GHIDRA_INT((GHIDRA_INT(this) + 0x33c)),0x2d,0,1.0,1.0); pEStack_358 = (Entity_Effect *)0x0; do { uVar3 = Random(); pEVar6 = (Entity_Effect *) - ((Game *)(g_game))->Game::Spawn(1000,0x94,(Vector *)((int)this + 0x33c),&g_vectorZero, + ((Game *)(g_game))->Game::Spawn(1000,0x94,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero, (Entity *)*(EntityPtr *)((char *)this + 0x3c8),0,uVar3); ((Entity *)((Entity *)pEVar6))->Entity::SetParent((Entity *)this); FUN_004316b0(); FUN_004b7070(); - ((Entity_Effect *)(pEVar6))->Entity_Effect::set_rotation((float)(int)pEStack_358 * 90.0 + 45.0); + ((Entity_Effect *)(pEVar6))->Entity_Effect::set_rotation((float)GHIDRA_INT(pEStack_358) * 90.0 + 45.0); bVar1 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x20000000); if ((bVar1 != 0) || ((*(uint *)((char *)this + 0x438) & 0x80000000) != 0)) { ((Entity *)((Entity *)pEVar6))->Entity::AddEntityFlags(0x20000000); } pEStack_358 = (Entity_Effect *)&(*(undefined1 *)((char *)(pEStack_358) + 0x1)); - } while ((int)pEStack_358 < 4); + } while (GHIDRA_INT(pEStack_358) < 4); } uVar3 = *(uint *)((char *)this + 0x43c); VStack_418.x = *(float *)((char *)this + 0x438); if ((uVar3 & 0x40) != 0) { pVStack_384 = (Vector *)0x40000000; - vecResult = (Vector *)((int)this + 0x33c); + vecResult = (Vector *)(GHIDRA_INT(this) + 0x33c); pVStack_398 = vecResult; - vecResult2 = ((Vector *)((Vector *)((int)this + 0x194)))->Vector::__mul(&tmpVecA,(float *)&pVStack_384); + vecResult2 = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x194)))->Vector::__mul(&tmpVecA,(float *)&pVStack_384); ((Vector *)(vecResult))->Vector::operator__(vecResult2); - SoundEffects::PlayWithFartOverride2(0x1e,(int)vecResult,2,0,1.0,1.0); + SoundEffects::PlayWithFartOverride2(0x1e,GHIDRA_INT(vecResult),2,0,1.0,1.0); uVar3 = Random(); ((Game *)(g_game))->Game::Spawn(1000,2,vecResult,&g_vectorZero,(Entity *)0x0,3,uVar3); EVar5 = (EntityPtr)0x8; @@ -1812,10 +1812,10 @@ LAB_00655e83: } EStack_364 = EVar5; } - fStack_37c = (float)(int)EStack_364; + fStack_37c = (float)GHIDRA_INT(EStack_364); pEStack_358 = (Entity_Effect *)0x0; do { - vecResult = Vector::FromAngle(&tmpVecA,((float)(int)pEStack_358 * 360.0) / fStack_37c + 0.0) + vecResult = Vector::FromAngle(&tmpVecA,((float)GHIDRA_INT(pEStack_358) * 360.0) / fStack_37c + 0.0) ; pVStack_384 = (Vector *)0x41200000; ((Vector *)(vecResult))->Vector::__mul(&VStack_430,(float *)&pVStack_384); @@ -1829,26 +1829,26 @@ LAB_00655e83: FUN_004316b0(); FUN_004b7070(); if (this->_subtype == 0) { - uVar3 = *(uint *)((int)&this->_projectileFlags + 4) & 0xffffffbf; + uVar3 = *(uint *)(GHIDRA_INT(&this->_projectileFlags) + 4) & 0xffffffbf; } else { FUN_004508a0(); FUN_00435cd0(); - uVar3 = *(uint *)((int)&this->_projectileFlags + 4); + uVar3 = *(uint *)(GHIDRA_INT(&this->_projectileFlags) + 4); } - set_projectile_flags(otherProjectile,CONCAT44(uVar3,(int)this->_projectileFlags)); + set_projectile_flags(otherProjectile,CONCAT44(uVar3,GHIDRA_INT(this->_projectileFlags))); pEStack_358 = (Entity_Effect *)&(*(undefined1 *)((char *)(pEStack_358) + 0x1)); - } while ((int)pEStack_358 < (int)EStack_364); + } while (GHIDRA_INT(pEStack_358) < GHIDRA_INT(EStack_364)); VStack_418.x = *(float *)&this->_projectileFlags; - uVar3 = *(uint *)((int)&this->_projectileFlags + 4); + uVar3 = *(uint *)(GHIDRA_INT(&this->_projectileFlags) + 4); } if ((uVar3 & 0x400000) != 0) { - vecResult = ((Vector *)((Vector *)((int)this + 0x360)))->Vector::Normalized(&tmpVecA); + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::Normalized(&tmpVecA); ((Vector *)(vecResult))->Vector::__unm(&VStack_438); - pVStack_398 = (Vector *)((int)this + 0x33c); + pVStack_398 = (Vector *)(GHIDRA_INT(this) + 0x33c); pEStack_358 = (Entity_Effect *)0xffffffff; do { - vecResult = ((Vector *)(&VStack_438))->Vector::Rotated(&tmpVecC,(float)(int)pEStack_358 * 24.0); + vecResult = ((Vector *)(&VStack_438))->Vector::Rotated(&tmpVecC,(float)GHIDRA_INT(pEStack_358) * 24.0); fStack_37c = 10.0; ((Vector *)(vecResult))->Vector::__mul(&VStack_428,&fStack_37c); uVar3 = Random(); @@ -1863,14 +1863,14 @@ LAB_00655e83: set_falling_accel(otherProjectile,-0.04); set_projectile_flags(otherProjectile,this->_projectileFlags & 0xffbfffffffffffff); pEStack_358 = (Entity_Effect *)&(*(undefined1 *)((char *)(pEStack_358) + 0x2)); - } while ((int)pEStack_358 < 2); + } while (GHIDRA_INT(pEStack_358) < 2); VStack_418.x = *(float *)&this->_projectileFlags; - uVar3 = *(uint *)((int)&this->_projectileFlags + 4); + uVar3 = *(uint *)(GHIDRA_INT(&this->_projectileFlags) + 4); } if ((uVar3 & 0x20000) != 0) { - SoundEffects::PlayWithFartOverride2(0x1e,(int)this + 0x33c,2,0,1.0,1.0); + SoundEffects::PlayWithFartOverride2(0x1e,GHIDRA_INT(this) + 0x33c,2,0,1.0,1.0); uVar3 = Random(); - tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,2,(Vector *)((int)this + 0x33c),&g_vectorZero, + tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,2,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero, (Entity *)0x0,3,uVar3); vfunc = *(code **)(*(int *)tmpEntity + 0x3c); ((Color *)())->Color::Color(); @@ -1878,14 +1878,14 @@ LAB_00655e83: this = projectile; if ((projectile->_spawnerType == 0x38f) && (projectile->_spawnerVariant == 2)) { EStack_364 = *(EntityPtr *)&projectile->_projectileFlags; - pVStack_398 = (Vector *)(*(uint *)((int)&projectile->_projectileFlags + 4) & 0xfffdffff); + pVStack_398 = (Vector *)(*(uint *)(GHIDRA_INT(&projectile->_projectileFlags) + 4) & 0xfffdffff); pEStack_358 = (Entity_Effect *)0x0; - fStack_37c = (float)((uint)pVStack_398 | 0x401); + fStack_37c = (float)(GHIDRA_UINT(pVStack_398) | 0x401); do { fVar17 = random_float(); fVar17 = Math::lerp(-6.0,-10.0,fVar17,0); vecResult = ((Vector *)(&tmpVecC))->Vector::Vector(0.0,fVar17); - fVar17 = assert_lerp_range((float)(int)pEStack_358,0.0,12.0,-75.0,75.0,1); + fVar17 = assert_lerp_range((float)GHIDRA_INT(pEStack_358),0.0,12.0,-75.0,75.0,1); ((Vector *)(vecResult))->Vector::Rotated(&VStack_418,fVar17); uVar3 = Random(); otherProjectile = @@ -1900,7 +1900,7 @@ LAB_00655e83: random_float(); FUN_004508a0(); pEStack_358 = (Entity_Effect *)&(*(undefined1 *)((char *)(pEStack_358) + 0x1)); - } while ((int)pEStack_358 < 0xd); + } while (GHIDRA_INT(pEStack_358) < 0xd); } else { pEStack_358 = (Entity_Effect *)0x10; @@ -1928,13 +1928,13 @@ LAB_00655e83: } if ((*(uint *)((char *)this + 0x43c) & 0x2000) != 0) { if (*(int *)((char *)this + 0x2c) == 1) { - SoundEffects::PlayWithFartOverride2(0x1eb,(int)this + 0x33c,2,0,1.0,1.0); + SoundEffects::PlayWithFartOverride2(0x1eb,GHIDRA_INT(this) + 0x33c,2,0,1.0,1.0); } room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); - bVar1 = ((Room *)(room))->Room::IsPositionInRoom((Vector *)((int)this + 0x33c),0.0); + bVar1 = ((Room *)(room))->Room::IsPositionInRoom((Vector *)(GHIDRA_INT(this) + 0x33c),0.0); if (bVar1 != 0) { uVar3 = Random(); - tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0xf,(Vector *)((int)this + 0x33c),&g_vectorZero, + tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0xf,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero, (Entity *)*(EntityPtr *)((char *)this + 0x3c8),0,uVar3); vfunc = *(code **)(*(int *)tmpEntity + 0x3c); ((Color *)())->Color::Color(); @@ -1963,12 +1963,12 @@ LAB_00655e83: pEVar6->SetCollisionDamage(); ((Entity_Effect *)(pEVar6))->Entity_Effect::SetTimeout(0x96); } - SoundEffects::PlayWithFartOverride2(0x1d7,(int)&this->_pos,2,0,1.0,1.0); + SoundEffects::PlayWithFartOverride2(0x1d7,GHIDRA_INT(&this->_pos),2,0,1.0,1.0); } } if ((*(uint *)((char *)this + 0x43c) & 0x80) != 0) { uVar3 = Random(); - vecResult = (Vector *)((int)this + 0x33c); + vecResult = (Vector *)(GHIDRA_INT(this) + 0x33c); pEStack_358 = (Entity_Effect *) ((Game *)(g_game))->Game::Spawn(1000,0x93,vecResult,&g_vectorZero, (Entity *)*(EntityPtr *)((char *)this + 0x3c8),0,uVar3); @@ -2016,7 +2016,7 @@ LAB_00655e83: LAB_00657ca1: if ((uVar3 & 0x80000000) != 0) goto LAB_00657cca; tmpEntity = Game::GetNearestTargetPlayer - ((Vector *)((int)this + 0x33c),(Entity *)EVar5,0,1,(void *)0x0, + ((Vector *)(GHIDRA_INT(this) + 0x33c),(Entity *)EVar5,0,1,(void *)0x0, 5000.0); } else { @@ -2029,24 +2029,24 @@ LAB_00657ca1: } LAB_00657cca: tmpEntity = Game::GetNearestEnemy - ((Vector *)((int)this + 0x33c),(Entity *)EVar5,5000.0,(void *)0x0); + ((Vector *)(GHIDRA_INT(this) + 0x33c),(Entity *)EVar5,5000.0,(void *)0x0); } ((Entity *)((Entity *)this))->Entity::SetTarget(tmpEntity); } uVar3 = Random(); pEStack_358 = (Entity_Effect *) - ((Game *)(g_game))->Game::Spawn(1000,0x7e,(Vector *)((int)this + 0x33c),&g_vectorZero, + ((Game *)(g_game))->Game::Spawn(1000,0x7e,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero, (Entity *)*(EntityPtr *)((char *)this + 0x3c8),1,uVar3); sprite = (Sprite *)((Entity *)((Entity *)pEStack_358))->Entity::GetSprite(); tmpColor = (ColorMod *)((Color *)())->Color::Color(); ((Sprite *)(sprite))->Sprite::SetColor(tmpColor); if (*(EntityPtr *)((char *)this + 0x3c4) == (EntityPtr)0x0) { - vecResult = ((Vector *)((Vector *)((int)this + 0x360)))->Vector::Normalized(&VStack_3b0); + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::Normalized(&VStack_3b0); vecResult = ((Vector *)(vecResult))->Vector::__unm(&tmpVecA); } else { vecResult = ((Entity *)((Entity *)*(EntityPtr *)((char *)this + 0x3c4)))->Entity::Position(&VStack_3b0); - vecResult = ((Vector *)(vecResult))->Vector::__sub(&tmpVecA,(Vector *)((int)this + 0x33c)); + vecResult = ((Vector *)(vecResult))->Vector::__sub(&tmpVecA,(Vector *)(GHIDRA_INT(this) + 0x33c)); vecResult = ((Vector *)(vecResult))->Vector::Normalized(&tmpVecB); } pEVar6 = pEStack_358; @@ -2054,18 +2054,18 @@ LAB_00657cca: pEVar6->Update(); } if ((*(uint *)((char *)this + 0x43c) & 0x800000) != 0) { - vecResult = ((Vector *)((Vector *)((int)this + 0x360)))->Vector::Normalized(&VStack_3b0); + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::Normalized(&VStack_3b0); ((Vector *)(vecResult))->Vector::__unm(&VStack_3f8); play_sound_with_fart_seed(0x1e,1.0,2,0,1.0); uVar3 = Random(); - pVStack_398 = (Vector *)((int)this + 0x33c); + pVStack_398 = (Vector *)(GHIDRA_INT(this) + 0x33c); tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,2,pVStack_398,&g_vectorZero,(Entity *)0x0,3,uVar3); tmpEntity->Update(); pEStack_358 = (Entity_Effect *)0xfffffffe; do { uVar3 = Random(); EVar5 = *(EntityPtr *)((char *)this + 0x3c8); - vecResult = ((Vector *)(&VStack_3f8))->Vector::Rotated(&VStack_3b0,(float)(int)pEStack_358 * 24.0); + vecResult = ((Vector *)(&VStack_3f8))->Vector::Rotated(&VStack_3b0,(float)GHIDRA_INT(pEStack_358) * 24.0); fStack_37c = 10.0; vecResult = ((Vector *)(vecResult))->Vector::__mul(&tmpVecA,&fStack_37c); tmpEntity = ((Game *)(g_game))->Game::Spawn(9,0,pVStack_398,vecResult,(Entity *)EVar5,0,uVar3); @@ -2075,11 +2075,11 @@ LAB_00657cca: tmpEntity->SetColor(); tmpEntity->Update(); pEStack_358 = (Entity_Effect *)&(*(undefined1 *)((char *)(pEStack_358) + 0x1)); - } while ((int)pEStack_358 < 3); + } while (GHIDRA_INT(pEStack_358) < 3); } if (*(int *)((char *)this + 0x2c) == 0xf) { uVar3 = Random(); - vecResult = (Vector *)((int)this + 0x33c); + vecResult = (Vector *)(GHIDRA_INT(this) + 0x33c); tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,2,vecResult,&g_vectorZero,(Entity *)0x0,3,uVar3); tmpEntity->SetColor(); tmpEntity->Update(); @@ -2091,7 +2091,7 @@ LAB_00657cca: } if (EStack_374 != (EntityPtr)0x0) { vfunc = *(code **)(*(int *)EStack_374 + 0x3c); - ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::Color(); + ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::Color(); (*vfunc)(); if (*(int *)((char *)this + 0x2c) == 3) { vfunc = *(code **)(*(int *)EStack_374 + 0x3c); @@ -2126,8 +2126,8 @@ LAB_006580b1: ((0 < *(int *)((char *)this + 0x45c) && (iVar4 = ((Entity *)((Entity *)this))->Entity::GetIntervalTicks((float)*(int *)((char *)this + 0x45c),0.0), iVar4 == 0)))))) { - pEStack_358 = (Entity_Effect *)((int)this + 0x360); - vecResult = ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::__add(&VStack_3b0,(Vector *)pEStack_358); + pEStack_358 = (Entity_Effect *)(GHIDRA_INT(this) + 0x360); + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::__add(&VStack_3b0,(Vector *)pEStack_358); vecResult2 = (Vector *)FUN_004172b0(); ((Vector *)(vecResult))->Vector::__sub(&VStack_3a0,vecResult2); EStack_360 = (EntityPtr)((Vector *)(&VStack_3a0))->Vector::Length(); @@ -2135,7 +2135,7 @@ LAB_006580b1: ((Vector *)(&VStack_3a0))->Vector::__div(&VStack_400,(float *)&EStack_360); fVar17 = ((Vector *)(&VStack_400))->Vector::GetAngleDegrees(); *(float *)((char *)this + 0x428) = fVar17; - ((Vector *)((Vector *)pEStack_358))->Vector::operator__((Vector *)((int)this + 0x334)); + ((Vector *)((Vector *)pEStack_358))->Vector::operator__((Vector *)(GHIDRA_INT(this) + 0x334)); bVar1 = 0; fStack_37c = (50.0 - (float)EStack_360) * 0.1; vecResult = ((Vector *)(&VStack_400))->Vector::__mul(&VStack_3b0,&fStack_37c); @@ -2144,7 +2144,7 @@ LAB_006580b1: vecResult = ((Vector *)(vecResult))->Vector::__add(&tmpVecC,vecResult2); ((Vector *)((Vector *)pEStack_358))->Vector::operator_assign(vecResult); vecResult = ((Entity *)((Entity *)projectile->_parent))->Entity::Velocity(&VStack_3f8); - ((Vector *)((Vector *)((int)this + 0x334)))->Vector::operator_assign(vecResult); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x334)))->Vector::operator_assign(vecResult); this = projectile; } fVar17 = Math::lerp(*(float *)((char *)this + 0x410),-23.0,0.4,0); @@ -2161,8 +2161,8 @@ LAB_006580b1: goto LAB_0065acd8; } vecResult = Vector::FromAngle(&angleDir,*(float *)((char *)this + 0x428)); - vecResult = Vector::operator_mul(&angleVelocity,(float *)((int)this + 0x458),vecResult); - ((Vector *)((Vector *)((int)this + 0x360)))->Vector::operator_assign(vecResult); + vecResult = Vector::operator_mul(&angleVelocity,(float *)(GHIDRA_INT(this) + 0x458),vecResult); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::operator_assign(vecResult); *(float *)((char *)this + 0x428) = 0.015; } if (*(code **)((char *)this + 0x470) != (code *)0x0) { @@ -2170,7 +2170,7 @@ LAB_006580b1: } fVar17 = *(float *)((char *)this + 0x43c); uVar3 = *(uint *)((char *)this + 0x438); - if (((uint)fVar17 & 0x10000) == 0) { + if ((GHIDRA_UINT(fVar17) & 0x10000) == 0) { if ((uVar3 & 1) != 0) { bVar1 = ((Entity *)((Entity *)this))->Entity::IsFrame(3,0); if (bVar1 != 0) { @@ -2182,12 +2182,12 @@ LAB_006580b1: (bVar1 = ((Entity *)((Entity *)*(EntityPtr *)((char *)this + 0x3c8)))->Entity::HasEntityFlags(0x100), bVar1 == 0)) && ((*(uint *)((char *)this + 0x438) & 0x80000000) == 0)) { tmpEntity = Game::GetNearestTargetPlayer - ((Vector *)((int)this + 0x33c), + ((Vector *)(GHIDRA_INT(this) + 0x33c), (Entity *)*(EntityPtr *)((char *)this + 0x3c8),0,1,(void *)0x0,500.0); } else { tmpEntity = Game::GetNearestEnemy - ((Vector *)((int)this + 0x33c), + ((Vector *)(GHIDRA_INT(this) + 0x33c), (Entity *)*(EntityPtr *)((char *)this + 0x3c8),500.0,(void *)0x0); } ((Entity *)((Entity *)this))->Entity::SetTarget(tmpEntity); @@ -2201,21 +2201,21 @@ LAB_00658602: fStack_3bc = 0.5; vecResult = ((Vector *)(&VStack_3a8))->Vector::__mul(&VStack_4a4,&fStack_3bc); vecResult = ((Vector *)(&VStack_3a0))->Vector::__add((Vector *)(entityQuery2 + 0x10),vecResult); - ((Vector *)(vecResult))->Vector::__sub(&scratchVec,(Vector *)((int)this + 0x33c)); + ((Vector *)(vecResult))->Vector::__sub(&scratchVec,(Vector *)(GHIDRA_INT(this) + 0x33c)); fStack_3bc = ((Vector *)(&scratchVec))->Vector::Length(); if (fStack_3bc < 100.0) { - vecResult = ((Vector *)(&VStack_3a0))->Vector::__sub(&VStack_4a4,(Vector *)((int)this + 0x33c)); + vecResult = ((Vector *)(&VStack_3a0))->Vector::__sub(&VStack_4a4,(Vector *)(GHIDRA_INT(this) + 0x33c)); ((Vector *)(&scratchVec))->Vector::operator_assign(vecResult); vecResult = ((Vector *)(&scratchVec))->Vector::Normalized((Vector *)(entityQuery2 + 0x10)); fStack_3bc = 1.4; vecResult = ((Vector *)(vecResult))->Vector::__mul(&VStack_4a4,&fStack_3bc); - vecResult = ((Vector *)(vecResult))->Vector::__mul(&VStack_510,(float *)((int)this + 0x424)); - vecResult = ((Vector *)(vecResult))->Vector::__mul(&VStack_518,(float *)((int)this + 0x39c)); - ((Vector *)((Vector *)((int)this + 0x360)))->Vector::operator_add_assign(vecResult); + vecResult = ((Vector *)(vecResult))->Vector::__mul(&VStack_510,(float *)(GHIDRA_INT(this) + 0x424)); + vecResult = ((Vector *)(vecResult))->Vector::__mul(&VStack_518,(float *)(GHIDRA_INT(this) + 0x39c)); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::operator_add_assign(vecResult); fStack_3bc = *(float *)((char *)this + 0x39c); fVar17 = Math::lerp(1.0,0.92,*(float *)((char *)this + 0x424),0); fStack_37c = Math::timescale_factor(fVar17,fStack_3bc); - ((Vector *)((Vector *)((int)this + 0x360)))->Vector::operator_mul_assign(&fStack_37c); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::operator_mul_assign(&fStack_37c); } } pCVar13 = (Color *)((Entity *)((Entity *)this))->Entity::GetColor(); @@ -2236,7 +2236,7 @@ LAB_00658602: LAB_00658433: if ((uVar3 & 0x80000000) != 0) goto LAB_00658462; tmpEntity = Game::GetNearestTargetPlayer - ((Vector *)((int)this + 0x33c), + ((Vector *)(GHIDRA_INT(this) + 0x33c), (Entity *)*(EntityPtr *)((char *)this + 0x3c8),0,1,(void *)0x0,5000.0); } else { @@ -2248,7 +2248,7 @@ LAB_00658433: } LAB_00658462: tmpEntity = Game::GetNearestEnemy - ((Vector *)((int)this + 0x33c), + ((Vector *)(GHIDRA_INT(this) + 0x33c), (Entity *)*(EntityPtr *)((char *)this + 0x3c8),5000.0,(void *)0x0); } ((Entity *)((Entity *)this))->Entity::SetTarget(tmpEntity); @@ -2256,16 +2256,16 @@ LAB_00658462: if (EVar5 == (EntityPtr)0x0) goto LAB_00658802; } vecResult = ((Entity *)((Entity *)EVar5))->Entity::Position(&homingTargetPos); - vecResult = ((Vector *)(vecResult))->Vector::__sub(&VStack_518,(Vector *)((int)this + 0x33c)); + vecResult = ((Vector *)(vecResult))->Vector::__sub(&VStack_518,(Vector *)(GHIDRA_INT(this) + 0x33c)); fStack_37c = 0.1; vecResult = ((Vector *)(vecResult))->Vector::__mul(&VStack_510,&fStack_37c); - vecResult = ((Vector *)((Vector *)((int)this + 0x360)))->Vector::__add((Vector *)(entityQuery2 + 0x10), + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::__add((Vector *)(entityQuery2 + 0x10), vecResult); - pVStack_398 = (Vector *)((Vector *)((Vector *)((int)this + 0x360)))->Vector::Length(); + pVStack_398 = (Vector *)((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::Length(); fStack_3bc = 0.001; pfVar10 = (float *)std::max(); vecResult = ((Vector *)(vecResult))->Vector::Resized(&VStack_4a4,*pfVar10); - ((Vector *)((Vector *)((int)this + 0x360)))->Vector::operator_assign(vecResult); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::operator_assign(vecResult); } LAB_00658802: uVar3 = *(uint *)((char *)this + 0x438); @@ -2280,7 +2280,7 @@ LAB_00658802: if (((uVar3 & 0x400) != 0) && (bVar1 = ((Entity *)((Entity *)this))->Entity::IsFrame(2,0), bVar1 != 0)) { uVar3 = Random(); pEVar6 = (Entity_Effect *) - ((Game *)(g_game))->Game::Spawn(1000,0x16,(Vector *)((int)this + 0x33c),&g_vectorZero,(Entity *)this + ((Game *)(g_game))->Game::Spawn(1000,0x16,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero,(Entity *)this ,0,uVar3); if (*(int *)((char *)this + 0x34) != 0x10e) { ((Entity_Effect *)(pEVar6))->Entity_Effect::SetTimeout(0x5a); @@ -2289,7 +2289,7 @@ LAB_00658802: if (((*(uint *)((char *)this + 0x438) & 0x4000) != 0) && (iVar4 = ((Entity *)((Entity *)this))->Entity::GetIntervalTicks(20.0,0.0), iVar4 != 0)) { uVar3 = Random(); - ((Game *)(g_game))->Game::Spawn(1000,0x38,(Vector *)((int)this + 0x33c),&g_vectorZero,(Entity *)this,0,uVar3) + ((Game *)(g_game))->Game::Spawn(1000,0x38,(Vector *)(GHIDRA_INT(this) + 0x33c),&g_vectorZero,(Entity *)this,0,uVar3) ; pEVar6 = (Entity_Effect *)__RTDynamicCast(); pEVar6->Update(); @@ -2297,13 +2297,13 @@ LAB_00658802: } if ((*(uint *)((char *)this + 0x438) & 0x40000000) == 0) goto LAB_00658b5a; room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); - vecResult = ((Room *)(room))->Room::ScreenWrapPosition(&tmpVecA,(Vector *)((int)this + 0x33c),-100.0); - ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::operator_assign(vecResult); + vecResult = ((Room *)(room))->Room::ScreenWrapPosition(&tmpVecA,(Vector *)(GHIDRA_INT(this) + 0x33c),-100.0); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::operator_assign(vecResult); bVar1 = ((Entity *)((Entity *)this))->Entity::IsFrame(2,*(int *)((char *)this + 0x20)); if (bVar1 == 0) goto LAB_00658b5a; fVar17 = *(float *)((char *)this + 0x3a4); ((Color *)((Color *)auStack_cc))->Color::Color(); - switch((int)(fVar17 * 0.5) % 9) { + switch(GHIDRA_INT((fVar17 * 0.5)) % 9) { case 0: fVar17 = 0.33; goto LAB_00658b2f; @@ -2352,7 +2352,7 @@ LAB_00658b5a: if ((*(uint *)((char *)this + 0x438) & 0x1800) != 0) { if (((*(uint *)((char *)this + 0x43c) & 0x1000000) == 0) || (*(EntityPtr *)((char *)this + 0x3bc) == (EntityPtr)0x0)) { - ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::__sub(&VStack_3e4,(Vector *)((int)this + 0x334)); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::__sub(&VStack_3e4,(Vector *)(GHIDRA_INT(this) + 0x334)); ((Vector *)(&VStack_428))->Vector::Vector(-VStack_3e4.y,VStack_3e4.x); if ((*(uint *)((char *)this + 0x438) & 0x1000) != 0) { vecResult = ((Vector *)(&VStack_428))->Vector::__unm(&VStack_508); @@ -2372,15 +2372,15 @@ LAB_00658b5a: ((Vector *)(&VStack_3e4))->Vector::operator_mul_assign((float *)pEVar9); vecResult = ((Vector *)(&VStack_3e4))->Vector::__add(&orbitSteer,&VStack_428); vecResult = ((Vector *)(vecResult))->Vector::Normalized(&orbitSteerDir); - speed = ((Vector *)((Vector *)((int)this + 0x360)))->Vector::Length(); + speed = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::Length(); vecResult = ((Vector *)(vecResult))->Vector::__mul(&orbitVelocity,&speed); - ((Vector *)((Vector *)((int)this + 0x360)))->Vector::operator_assign(vecResult); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::operator_assign(vecResult); this = projectile; } else { - ((Vector *)((Vector *)((int)this + 0x360)))->Vector::operator__((Vector *)((int)this + 0x468)); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::operator__((Vector *)(GHIDRA_INT(this) + 0x468)); vecResult = ((Entity *)((Entity *)*(EntityPtr *)((char *)this + 0x3bc)))->Entity::Position(&tmpVecA); - ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::__sub(&fromOrbitParent,vecResult); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::__sub(&fromOrbitParent,vecResult); ((Vector *)(&orbitParentTangent))->Vector::Vector(-fromOrbitParent.y,fromOrbitParent.x); if ((*(uint *)((char *)this + 0x438) & 0x1000) != 0) { vecResult = ((Vector *)(&orbitParentTangent))->Vector::__unm(&tmpVecA); @@ -2400,33 +2400,33 @@ LAB_00658b5a: ((Vector *)(&fromOrbitParent))->Vector::operator_mul_assign((float *)pEVar9); vecResult = ((Vector *)(&fromOrbitParent))->Vector::__add(&tmpVecA,&orbitParentTangent); vecResult = ((Vector *)(vecResult))->Vector::Normalized(&tmpVecB); - EStack_34c = (EntityPtr)((Vector *)((Vector *)((int)this + 0x360)))->Vector::Length(); + EStack_34c = (EntityPtr)((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::Length(); vecResult = ((Vector *)(vecResult))->Vector::__mul(&tmpVecC,(float *)&EStack_34c); - ((Vector *)((Vector *)((int)this + 0x360)))->Vector::operator_assign(vecResult); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::operator_assign(vecResult); vecResult = ((Entity *)((Entity *)*(EntityPtr *)((char *)this + 0x3bc)))->Entity::Velocity(&VStack_3a8); - ((Vector *)((Vector *)((int)this + 0x360)))->Vector::operator_add_assign(vecResult); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::operator_add_assign(vecResult); vecResult = ((Entity *)((Entity *)*(EntityPtr *)((char *)this + 0x3bc)))->Entity::Velocity(&VStack_408); - ((Vector *)((Vector *)((int)this + 0x468)))->Vector::operator_assign(vecResult); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x468)))->Vector::operator_assign(vecResult); vecResult = ((Entity *)((Entity *)*(EntityPtr *)((char *)this + 0x3bc)))->Entity::Position(&VStack_508); - ((Vector *)((Vector *)((int)this + 0x334)))->Vector::operator_assign(vecResult); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x334)))->Vector::operator_assign(vecResult); } } - EStack_364 = (EntityPtr)((int)this + 0x360); + EStack_364 = (EntityPtr)(GHIDRA_INT(this) + 0x360); if ((*(uint *)((char *)this + 0x438) & 0xc0000) != 0) { - vecResult = (Vector *)((int)this + 0x360); + vecResult = (Vector *)(GHIDRA_INT(this) + 0x360); EStack_374 = (EntityPtr)((Vector *)(vecResult))->Vector::Length(); - ((Vector *)(&VStack_430))->Vector::Vector(-*(float *)((char *)this + 0x364),((Vector *)((int)this + 0x360))->x); + ((Vector *)(&VStack_430))->Vector::Vector(-*(float *)((char *)this + 0x364),((Vector *)(GHIDRA_INT(this) + 0x360))->x); if ((*(uint *)((char *)this + 0x438) & 0x40000) != 0) { vecResult2 = ((Vector *)(&VStack_430))->Vector::__unm(&tmpVecA); ((Vector *)(&VStack_430))->Vector::operator_assign(vecResult2); } vecResult2 = ((Vector *)(&VStack_430))->Vector::__mul(&tmpVecA,(float *)&EStack_374); - vecResult2 = ((Vector *)(vecResult2))->Vector::__mul(&tmpVecB,(float *)((int)this + 0x428)); - vecResult2 = ((Vector *)(vecResult2))->Vector::__mul(&tmpVecC,(float *)((int)this + 0x39c)); + vecResult2 = ((Vector *)(vecResult2))->Vector::__mul(&tmpVecB,(float *)(GHIDRA_INT(this) + 0x428)); + vecResult2 = ((Vector *)(vecResult2))->Vector::__mul(&tmpVecC,(float *)(GHIDRA_INT(this) + 0x39c)); ((Vector *)(vecResult))->Vector::operator_add_assign(vecResult2); ((Vector *)(vecResult))->Vector::Resize((float)EStack_374); } - EStack_364 = (EntityPtr)((int)this + 0x360); + EStack_364 = (EntityPtr)(GHIDRA_INT(this) + 0x360); if ((*(uint *)((char *)this + 0x438) & 0x100000) != 0) { uVar3 = 0; iVar4 = ((Game *)(g_game))->Game::GetNumPlayers(); @@ -2434,20 +2434,20 @@ LAB_00658b5a: do { player = ((Game *)(g_game))->Game::GetPlayer(uVar3); vecResult = ((Entity *)((Entity *)player))->Entity::Position(&tmpVecA); - ((Vector *)(vecResult))->Vector::__sub(&toPlayer,(Vector *)((int)this + 0x33c)); + ((Vector *)(vecResult))->Vector::__sub(&toPlayer,(Vector *)(GHIDRA_INT(this) + 0x33c)); ((Vector *)(&tmpVecC))->Vector::Vector(0.0,1.0); vecResult = ((Vector *)(&toPlayer))->Vector::Normalized(&tmpVecB); EStack_34c = (EntityPtr)((Vector *)(&tmpVecC))->Vector::Dot(vecResult); if (((float)EStack_34c < 0.05) && (-0.4 < (float)EStack_34c)) { room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); pfVar10 = (float *)((Room *)(room))->Room::GetTopLeftPos(); - if (*pfVar10 - 120.0 < ((Vector *)((int)this + 0x33c))->x) { + if (*pfVar10 - 120.0 < ((Vector *)(GHIDRA_INT(this) + 0x33c))->x) { room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); pfVar10 = (float *)((Room *)(room))->Room::GetBottomRightPos(); - if (((Vector *)((int)this + 0x33c))->x <= *pfVar10 + 120.0 && - *pfVar10 + 120.0 != ((Vector *)((int)this + 0x33c))->x) { + if (((Vector *)(GHIDRA_INT(this) + 0x33c))->x <= *pfVar10 + 120.0 && + *pfVar10 + 120.0 != ((Vector *)(GHIDRA_INT(this) + 0x33c))->x) { vecResult = ((Vector *)(&tmpVecA))->Vector::Vector(1.0,0.0); - EStack_34c = (EntityPtr)((Vector *)((Vector *)((int)this + 0x360)))->Vector::Length(); + EStack_34c = (EntityPtr)((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::Length(); vecResult = ((Vector *)(vecResult))->Vector::__mul(&tmpVecB,(float *)&EStack_34c); EStack_354 = (EntityPtr)0x40000000; ((Vector *)(vecResult))->Vector::__mul(&VStack_400,(float *)&EStack_354); @@ -2458,7 +2458,7 @@ LAB_00658b5a: else { vecResult = &VStack_400; } - ((Vector *)((Vector *)((int)this + 0x360)))->Vector::operator_assign(vecResult); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::operator_assign(vecResult); *(uint *)((char *)this + 0x438) = *(uint *)((char *)this + 0x438) & 0xffefffff; *(undefined4 *)((char *)this + 0x43c) = *(undefined4 *)((char *)this + 0x43c); break; @@ -2467,12 +2467,12 @@ LAB_00658b5a: } uVar3 = uVar3 + 1; iVar4 = ((Game *)(g_game))->Game::GetNumPlayers(); - } while ((int)uVar3 < iVar4); + } while (GHIDRA_INT(uVar3) < iVar4); } } fVar17 = *(float *)((char *)this + 0x43c); uVar3 = *(uint *)((char *)this + 0x438); - if (((uint)fVar17 & 0x200) != 0) { + if ((GHIDRA_UINT(fVar17) & 0x200) != 0) { if (*(EntityPtr *)((char *)this + 0x3c8) == (EntityPtr)0x0) { LAB_006592f6: ((Entity *)((Entity *)this))->Entity::Die(); @@ -2490,7 +2490,7 @@ LAB_006592f6: scratchVec.y = pfVar10[1]; pVStack_384 = (Vector *)((Vector *)(&scratchVec))->Vector::Length(); ((Vector *)(&scratchVec))->Vector::__div_assign((float *)&pVStack_384); - ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::__sub(&VStack_4cc,&VStack_4c4); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::__sub(&VStack_4cc,&VStack_4c4); pEStack_358 = (Entity_Effect *)((Vector *)(&VStack_4cc))->Vector::Length(); EStack_34c = (EntityPtr)((Vector *)(&VStack_4cc))->Vector::Dot(&scratchVec); EVar5 = EStack_364; @@ -2502,21 +2502,21 @@ LAB_006592f6: goto LAB_006592f6; vecResult = Vector::operator_mul(&tmpVecA,(float *)&pEStack_358,&scratchVec); vecResult = ((Vector *)(&VStack_4c4))->Vector::__add(&tmpVecB,vecResult); - ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::operator_assign(vecResult); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::operator_assign(vecResult); vecResult = Vector::operator_mul(&tractorVelocity,&tractorSpeed,&scratchVec); ((Vector *)((Vector *)EVar5))->Vector::operator_assign(vecResult); uVar3 = *(uint *)((char *)this + 0x438); } fVar17 = *(float *)((char *)this + 0x43c); } - if (((uint)fVar17 & 0x40000) != 0) { + if ((GHIDRA_UINT(fVar17) & 0x40000) != 0) { ((RNG *)((RNG *)(auStack_cc + 0x30)))->RNG::game_constructor(*(int *)((char *)this + 0x3ec),8); uStack_14 = 4; EStack_34c = (EntityPtr)((RNG *)((RNG *)(auStack_cc + 0x30)))->RNG::RandomFloat(); wiggleStrength = Math::lerp(2.0,5.0,(float)EStack_34c,0); fVar17 = ((RNG *)((RNG *)(auStack_cc + 0x30)))->RNG::RandomFloat(); VStack_3dc.y = *(float *)((char *)this + 0x338); - VStack_3dc.x = ((Vector *)((int)this + 0x334))->x; + VStack_3dc.x = ((Vector *)(GHIDRA_INT(this) + 0x334))->x; EStack_34c = (EntityPtr)(*(float *)((char *)this + 0x3a4) / 100.0 + fVar17); EStack_360 = (EntityPtr)((Vector *)(&VStack_3dc))->Vector::Length(); ((Vector *)(&VStack_3dc))->Vector::__div_assign((float *)&EStack_360); @@ -2542,14 +2542,14 @@ LAB_006592f6: if ((uVar3 & 0x200000) != 0) { fVar17 = *(float *)((char *)this + 0x3a4) * 3.1415927; sineFactor = sinf_wrapper((fVar17 + fVar17) / 30.0); - vecResult = ((Vector *)((Vector *)((int)this + 0x360)))->Vector::__mul(&sineVelocityOffset,&sineFactor); - ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::operator_add_assign(vecResult); + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::__mul(&sineVelocityOffset,&sineFactor); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::operator_add_assign(vecResult); uVar3 = *(uint *)((char *)this + 0x438); fVar17 = *(float *)((char *)this + 0x43c); } - EStack_364 = (EntityPtr)((int)this + 0x33c); + EStack_364 = (EntityPtr)(GHIDRA_INT(this) + 0x33c); if ((uVar3 & 0x20) != 0) { - ((Vector *)(&VStack_474))->Vector::Vector(*(float *)((char *)this + 0x364),-((Vector *)((int)this + 0x360))->x); + ((Vector *)(&VStack_474))->Vector::Vector(*(float *)((char *)this + 0x364),-((Vector *)(GHIDRA_INT(this) + 0x360))->x); ((Vector *)(&VStack_474))->Vector::Normalize(); fVar17 = 1.0; if (*(int *)((char *)this + 0x34) == 0x390) { @@ -2565,7 +2565,7 @@ LAB_006592f6: uVar3 = *(uint *)((char *)this + 0x438); fVar17 = *(float *)((char *)this + 0x43c); } - vecResult = (Vector *)((int)this + 0x360); + vecResult = (Vector *)(GHIDRA_INT(this) + 0x360); VStack_3a8.y = fVar17; if ((uVar3 & 0x400000) != 0) { ((Vector *)((Vector *)(entityQuery + 0x1c)))->Vector::Vector(*(float *)((char *)this + 0x364),-vecResult->x); @@ -2580,7 +2580,7 @@ LAB_006592f6: FUN_00417150(); megaWiggleAmount = fVar17 * (float)EStack_34c; vecResult2 = ((Vector *)((Vector *)(entityQuery + 0x1c)))->Vector::__mul(&megaWiggleOffset,&megaWiggleAmount); - ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::operator_add_assign(vecResult2); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::operator_add_assign(vecResult2); VStack_3a8.y = *(float *)((char *)this + 0x43c); uVar3 = *(uint *)((char *)this + 0x438); } @@ -2588,7 +2588,7 @@ LAB_006592f6: fVar17 = sqrtf(2.0); EStack_34c = (EntityPtr)(fVar17 * 30.0); fVar17 = sqrtf(2.0); - EStack_34c = (EntityPtr)(int)((float)EStack_34c / (fVar17 + 1.0)); + EStack_34c = (EntityPtr)GHIDRA_INT(((float)EStack_34c / (fVar17 + 1.0))); iVar4 = ((Entity *)((Entity *)this))->Entity::FrameCount(); if (iVar4 == 1) { fVar17 = 45.0; @@ -2597,7 +2597,7 @@ LAB_006592f6: else { iVar4 = ((Entity *)((Entity *)this))->Entity::GetHitPointsLost(); if (iVar4 < 1) goto LAB_00659836; - EVar5 = (EntityPtr)((int)*(float *)((char *)this + 0x3a4) % 0x1e); + EVar5 = (EntityPtr)(GHIDRA_INT(*(float *)((char *)this + 0x3a4)) % 0x1e); if (EVar5 == EStack_34c) { fVar17 = -135.0; vecResult2 = &sawtoothLeftVelocity; @@ -2616,7 +2616,7 @@ LAB_00659836: fVar17 = sqrtf(2.0); EStack_34c = (EntityPtr)(fVar17 * 15.0); fVar17 = sqrtf(2.0); - EStack_34c = (EntityPtr)(int)((float)EStack_34c / (fVar17 + 1.0)); + EStack_34c = (EntityPtr)GHIDRA_INT(((float)EStack_34c / (fVar17 + 1.0))); iVar4 = ((Entity *)((Entity *)this))->Entity::FrameCount(); if (iVar4 == 1) { fVar17 = 45.0; @@ -2625,7 +2625,7 @@ LAB_00659836: else { iVar4 = ((Entity *)((Entity *)this))->Entity::GetHitPointsLost(); if (iVar4 < 1) goto LAB_00659903; - EVar5 = (EntityPtr)((int)*(float *)((char *)this + 0x3a4) % 0xf); + EVar5 = (EntityPtr)(GHIDRA_INT(*(float *)((char *)this + 0x3a4)) % 0xf); if (EVar5 == EStack_34c) { fVar17 = -90.0; vecResult2 = &triangleLeftVelocity; @@ -2643,7 +2643,7 @@ LAB_00659903: if (((*(uint *)((char *)this + 0x438) & 0x4000000) != 0) && (*(EntityPtr *)((char *)this + 0x3bc) != (EntityPtr)0x0)) { vecResult2 = ((Entity *)((Entity *)*(EntityPtr *)((char *)this + 0x3bc)))->Entity::Position(&VStack_3a8); - ((Vector *)(vecResult2))->Vector::__sub(&VStack_408,(Vector *)((int)this + 0x33c)); + ((Vector *)(vecResult2))->Vector::__sub(&VStack_408,(Vector *)(GHIDRA_INT(this) + 0x33c)); fVar17 = ((Vector *)(vecResult))->Vector::Length(); vecResult2 = ((Vector *)(&VStack_408))->Vector::Resized(&VStack_3a8,fVar17); ((Vector *)(vecResult))->Vector::operator_assign(vecResult2); @@ -2657,12 +2657,12 @@ LAB_00653169: } } if ((*(uint *)((char *)this + 0x43c) & 0x100000) != 0) { - ((Vector *)((Vector *)((int)this + 0x334)))->Vector::__sub(&VStack_3a0,(Vector *)((int)this + 0x33c)); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x334)))->Vector::__sub(&VStack_3a0,(Vector *)(GHIDRA_INT(this) + 0x33c)); EStack_35c = (EntityPtr)((Vector *)(&VStack_3a0))->Vector::Length(); if (10.0 <= (float)EStack_35c) { ((Vector *)(&VStack_3a0))->Vector::__div_assign((float *)&EStack_35c); bVar1 = 0; - vecResult2 = ((Vector *)(&VStack_3a0))->Vector::__mul(&VStack_500,(float *)((int)this + 0x424)); + vecResult2 = ((Vector *)(&VStack_3a0))->Vector::__mul(&VStack_500,(float *)(GHIDRA_INT(this) + 0x424)); ((Entity *)((Entity *)this))->Entity::AddVelocity(vecResult2,bVar1); if (*(float *)((char *)this + 0x3a4) <= 150.0 && *(float *)((char *)this + 0x3a4) != 150.0) { *(float *)((char *)this + 0x414) = 0.0; @@ -2703,7 +2703,7 @@ LAB_00659b08: fVar17 = *(float *)((char *)this + 0x43c); } VStack_3a8.y = fVar17; - if (((uint)fVar17 & 0x20) != 0) { + if ((GHIDRA_UINT(fVar17) & 0x20) != 0) { EStack_34c = (EntityPtr)(*(float *)((char *)this + 0x3a4) / 20.0); EStack_354 = (EntityPtr)0x3f800000; pfVar10 = (float *)std::min(); @@ -2718,9 +2718,9 @@ LAB_00659b08: (((iVar4 = ((Entity *)((Entity *)this))->Entity::GetHitPointsLost(), 0 < iVar4 && (iVar4 = Isaac::Random(0x1e), iVar4 == 0)) || (*(int *)((char *)this + 0x34) == 0x3e)))) { ((Vector *)((Vector *)auStack_3c))->Vector::Vector(-*(float *)((char *)this + 0x364), - ((Vector *)((int)this + 0x360))->x); - ((Vector *)(&VStack_34))->Vector::Vector(*(float *)((char *)this + 0x364),-((Vector *)((int)this + 0x360))->x); - forwardDirX = ((Vector *)((int)this + 0x360))->x; + ((Vector *)(GHIDRA_INT(this) + 0x360))->x); + ((Vector *)(&VStack_34))->Vector::Vector(*(float *)((char *)this + 0x364),-((Vector *)(GHIDRA_INT(this) + 0x360))->x); + forwardDirX = ((Vector *)(GHIDRA_INT(this) + 0x360))->x; EStack_34c = (EntityPtr)auStack_3c; forwardDirY = *(float *)((char *)this + 0x364); rng._shift1 = 0x40000; @@ -2742,8 +2742,8 @@ LAB_00659b08: VStack_3a8.x = vecResult->x; VStack_3a8.y = vecResult->y; uVar3 = Random(); - vecResult = ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::__sub(&VStack_440, - (Vector *)((int)this + 0x360)); + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::__sub(&VStack_440, + (Vector *)(GHIDRA_INT(this) + 0x360)); ((Game *)(g_game))->Game::Spawn(*(int *)((char *)this + 0x28),*(int *)((char *)this + 0x2c),vecResult,&VStack_3a8 ,(Entity *)0x0,0,uVar3); EVar5 = (EntityPtr)__RTDynamicCast(); @@ -2771,16 +2771,16 @@ LAB_00659b08: uVar3 = *(uint *)((char *)this + 0x438); *(int *)((char *)EVar5 + 0x43c) = *(int *)((char *)this + 0x43c); *(uint *)((char *)EVar5 + 0x438) = - (uint)(&CStack_108)[1]._tint[(int)((int)EStack_364 + 1)] | uVar3 & 0xffd3ffff; + GHIDRA_UINT((&CStack_108)[1]._tint[GHIDRA_INT((GHIDRA_INT(EStack_364) + 1))]) | uVar3 & 0xffd3ffff; vfunc = *(code **)(*(int *)EVar5 + 0x3c); - ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::Color(); + ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::Color(); (*vfunc)(); EVar5 = EStack_354; ((Entity *)((Entity *)EStack_354))->Entity::SetParent((Entity *)*(EntityPtr *)((char *)this + 0x3bc)); (**(code **)(*(int *)EVar5 + 0xc))(); - EStack_364 = (EntityPtr)((int)EStack_364 + 1); - EStack_34c = (EntityPtr)((int)EStack_34c + 8); - } while ((int)EStack_364 < 3); + EStack_364 = (EntityPtr)(GHIDRA_INT(EStack_364) + 1); + EStack_34c = (EntityPtr)(GHIDRA_INT(EStack_34c) + 8); + } while (GHIDRA_INT(EStack_364) < 3); vfunc = *(code **)(*(int *)this + 0x24); ((EntityRef *)((EntityRef *)(auStack_160 + 4)))->EntityRef::EntityRef(); (*vfunc)(); @@ -2800,7 +2800,7 @@ LAB_00659f8a: if (0x20 < uVar3) goto LAB_00659f8a; } uStack_14 = 0xffffffff; - if (((uint)EStack_368 & 1) != 0) { + if ((GHIDRA_UINT(EStack_368) & 1) != 0) { guard_check_icall(); } if (isCircleProc != '\0') { @@ -2818,7 +2818,7 @@ LAB_00659f8a: fVar14 = (float10)((Entity_Laser *)((Entity_Laser *)EStack_368))->Entity_Laser::Radius(); EStack_378 = (EntityPtr)(float)fVar14; vecResult = ((Entity *)((Entity *)EStack_368))->Entity::Position(&VStack_440); - pVStack_3d0 = (Vector *)((Vector *)((Vector *)((int)this + 0x33c)))->Vector::DistanceSquared(vecResult); + pVStack_3d0 = (Vector *)((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::DistanceSquared(vecResult); if ((float)pVStack_3d0 < (float)EStack_378 * (float)EStack_378) { this->Remove(); EVar5 = (EntityPtr)((Entity *)((Entity *)EStack_368))->Entity::SpawnerEntity(); @@ -2842,8 +2842,8 @@ LAB_0065a0e7: } ((TearParams *)(&spawnerTearParams))->TearParams::copy(other); uVar3 = Random(); - vecResult = ((Vector *)((Vector *)((int)this + 0x360)))->Vector::__unm(&VStack_4bc); - ((Game *)(g_game))->Game::Spawn(2,0,(Vector *)((int)this + 0x33c),vecResult,(Entity *)EStack_360,0, + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::__unm(&VStack_4bc); + ((Game *)(g_game))->Game::Spawn(2,0,(Vector *)(GHIDRA_INT(this) + 0x33c),vecResult,(Entity *)EStack_360,0, uVar3); this_01 = (Entity_Tear *)__RTDynamicCast(); SetHeight((Entity_Projectile *)this_01,*(float *)((char *)this + 0x410)); @@ -2858,10 +2858,10 @@ LAB_0065a0e7: this_01->Update(); EVar5 = EStack_34c; } - EVar5 = (EntityPtr)((int)EVar5 + 1); + EVar5 = (EntityPtr)(GHIDRA_INT(EVar5) + 1); EStack_34c = EVar5; EVar11 = (EntityPtr)((EntityList *)((EntityList *)entityQuery))->EntityList::Size(); - } while ((uint)EVar5 < (uint)EVar11); + } while (GHIDRA_UINT(EVar5) < GHIDRA_UINT(EVar11)); } uStack_14 = 0xffffffff; ((EntityList_Query *)(entityQuery))->EntityList_Query::~EntityList_Query(); @@ -2877,13 +2877,13 @@ LAB_0065a0e7: FUN_00431290(); FUN_004312b0(); EStack_378 = (EntityPtr)(fVar15 * 2.0); - fVar14 = (float10)((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::Rotation(); + fVar14 = (float10)((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::Rotation(); EStack_378 = (EntityPtr)(float)(fVar14 + (float10)(float)EStack_378); fVar17 = normalize_angle_degrees((float)EStack_378); - ((Sprite *)((Sprite *)((int)this + 0x48)))->Sprite::SetRotation(fVar17); + ((Sprite *)((Sprite *)(GHIDRA_INT(this) + 0x48)))->Sprite::SetRotation(fVar17); fVar17 = *(float *)((char *)this + 0x410); } - EStack_368 = (EntityPtr)((int)this + 0x360); + EStack_368 = (EntityPtr)(GHIDRA_INT(this) + 0x360); if (isSideView != 0) { if (*(float *)((char *)this + 0x418) < 0.001) { if (-10.0 < fVar17) { @@ -2897,7 +2897,7 @@ LAB_0065a376: *(float *)((char *)this + 0x364) = fVar17 + *(float *)((char *)this + 0x364); } room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); - vecResult = (Vector *)((int)this + 0x33c); + vecResult = (Vector *)(GHIDRA_INT(this) + 0x33c); Room::GetClampedPositionImpl(room,&VStack_3a8,vecResult,-600.0,-200.0,-200.0,-200.0); bVar1 = ((Vector *)(vecResult))->Vector::operator_ne(&VStack_3a8); if (bVar1 != 0) { @@ -2923,7 +2923,7 @@ LAB_0065a376: } uVar3 = Random(); tmpEntity = ((Game *)(g_game))->Game::Spawn(1000,0x10,vecResult,&g_vectorZero,(Entity *)0x0, - (uint)EStack_368,uVar3); + GHIDRA_UINT(EStack_368),uVar3); tmpEntity->Update(); } else { @@ -2972,14 +2972,14 @@ LAB_0065a621: ((((*(int *)((char *)this + 0x45c) < 1 || (iVar4 = ((Entity *)((Entity *)this))->Entity::GetIntervalTicks((float)*(int *)((char *)this + 0x45c),0.0), iVar4 != 0)) && (iVar4 = ((Entity *)((Entity *)this))->Entity::FrameCount(), 0 < iVar4)) && - (((Vector *)((Vector *)((int)this + 0x360)))->Vector::Resize(*(float *)((char *)this + 0x458)), + (((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::Resize(*(float *)((char *)this + 0x458)), (*(uint *)((char *)this + 0x454) & 3) != 3)))) { *(uint *)((char *)this + 0x43c) = *(uint *)((char *)this + 0x43c) & 0xfffffffd; *(undefined4 *)((char *)this + 0x438) = *(undefined4 *)((char *)this + 0x438); } if ((*(uint *)((char *)this + 0x43c) & 0x800) != 0) { room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); - VStack_3a0.x = ((Vector *)((int)this + 0x33c))->x; + VStack_3a0.x = ((Vector *)(GHIDRA_INT(this) + 0x33c))->x; VStack_3a0.y = *(float *)((char *)this + 0x340); iVar4 = ((Room *)(room))->Room::GetGridCollisionAtPos(*(Vector *)((char *)this + 0x33c)); if ((iVar4 == 2) || (iVar4 == 3)) { @@ -2996,12 +2996,12 @@ LAB_0065a621: } LAB_0065a73e: if ((*(uint *)((char *)this + 0x43c) & 0x400) != 0) { - pVStack_3d0 = (Vector *)((int)this + 0x33c); + pVStack_3d0 = (Vector *)(GHIDRA_INT(this) + 0x33c); VStack_3dc.x = g_vectorZero.x; VStack_3dc.y = g_vectorZero.y; uVar3 = 0; - pvStack_410 = (void *)((uint)(*(float *)((char *)this + 0x410) < -50.0) * 2 + 2); - EStack_378 = (EntityPtr)((int)this + 0x178); + pvStack_410 = (void *)(GHIDRA_UINT((*(float *)((char *)this + 0x410) < -50.0)) * 2 + 2); + EStack_378 = (EntityPtr)(GHIDRA_INT(this) + 0x178); iVar4 = FUN_0042f160(); if (iVar4 != 0) { do { @@ -3015,7 +3015,7 @@ LAB_0065a73e: pos_01.y = scratchVec.y; pos_01.x = scratchVec.x; iVar4 = ((Room *)(room))->Room::GetGridCollisionAtPos(pos_01); - if ((int)pvStack_410 <= iVar4) { + if (GHIDRA_INT(pvStack_410) <= iVar4) { vecResult = (Vector *)std::vector::operator__(); ((Vector *)(&VStack_3dc))->Vector::operator_add_assign(vecResult); } @@ -3027,7 +3027,7 @@ LAB_0065a73e: bVar1 = ((Vector *)(&VStack_3dc))->Vector::operator_ne(&g_vectorZero); if (bVar1 != 0) { ((Vector *)(&VStack_3dc))->Vector::Normalize(); - vecResult = (Vector *)((int)this + 0x360); + vecResult = (Vector *)(GHIDRA_INT(this) + 0x360); EStack_378 = (EntityPtr) (-VStack_3dc.x * vecResult->x - VStack_3dc.y * *(float *)((char *)this + 0x364)); if ((float)EStack_378 < 0.0) { @@ -3035,7 +3035,7 @@ LAB_0065a73e: pVStack_3d0 = (Vector *)0x40000000; vecResult2 = ((Vector *)(vecResult2))->Vector::__mul(&VStack_4bc,(float *)&pVStack_3d0); ((Vector *)(vecResult))->Vector::operator_add_assign(vecResult2); - ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::operator_add_assign(vecResult); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::operator_add_assign(vecResult); } } } @@ -3067,7 +3067,7 @@ LAB_0065a73e: bVar1 = ((Entity_Player *)((Entity_Player *)EStack_368))->Entity_Player::HasCollectible(0x14f,0); if (bVar1 != 0) { vecResult = ((Entity *)((Entity *)EStack_368))->Entity::Position(&VStack_440); - EStack_378 = (EntityPtr)((Vector *)(vecResult))->Vector::DistanceSquared((Vector *)((int)this + 0x33c)) + EStack_378 = (EntityPtr)((Vector *)(vecResult))->Vector::DistanceSquared((Vector *)(GHIDRA_INT(this) + 0x33c)) ; if ((float)EStack_378 < (float)EStack_360) { EStack_34c = EStack_368; @@ -3081,11 +3081,11 @@ LAB_0065a73e: if ((EStack_34c != (EntityPtr)0x0) && ((float)EStack_360 < 6400.0)) { EStack_378 = (EntityPtr)sqrtf((float)EStack_360); vecResult = ((Entity *)((Entity *)EVar5))->Entity::Position(&VStack_440); - vecResult = ((Vector *)((Vector *)((int)this + 0x33c)))->Vector::__sub(&VStack_4bc,vecResult); + vecResult = ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x33c)))->Vector::__sub(&VStack_4bc,vecResult); fVar17 = random_float(); vecResult = ((Vector *)(vecResult))->Vector::Resized(&VStack_500, fVar17 * (80.0 - (float)EStack_378) * 0.1 + 0.05); - ((Vector *)((Vector *)((int)this + 0x360)))->Vector::operator_add_assign(vecResult); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::operator_add_assign(vecResult); } } } @@ -3100,18 +3100,18 @@ LAB_0065a73e: playerManager = (PlayerManager *)((Game *)(g_game))->Game::GetPlayerManager(); fVar17 = PlayerManager::get_total_luck(playerManager); VStack_47c.y = 7.00649e-44; - modemChance = 0x43 - (int)fVar17; + modemChance = 0x43 - GHIDRA_INT(fVar17); piVar12 = (int *)std::max(); iVar4 = Isaac::Random(*piVar12); if ((iVar4 == 0) && (*(char *)((char *)this + 0x173) == '\0')) { - ((Vector *)((Vector *)((int)this + 0x460)))->Vector::operator_assign((Vector *)((int)this + 0x33c)); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x460)))->Vector::operator_assign((Vector *)(GHIDRA_INT(this) + 0x33c)); ((Entity *)((Entity *)this))->Entity::AddEntityFlags(0x20); - ((Vector *)((Vector *)((int)this + 0x360)))->Vector::operator_assign(&g_vectorZero); + ((Vector *)((Vector *)(GHIDRA_INT(this) + 0x360)))->Vector::operator_assign(&g_vectorZero); } } if ((*(uint *)((char *)this + 0x43c) & 0x2000000) != 0) { *(undefined4 *)((char *)this + 0x188) = 0; - sprite = (Sprite *)((int)this + 0x48); + sprite = (Sprite *)(GHIDRA_INT(this) + 0x48); spriteColor = (Font *)((Sprite *)(sprite))->Sprite::Color(); pCVar13 = (Color *)((Sprite *)(sprite))->Sprite::Color(); fVar17 = ((Color *)(pCVar13))->Color::A(); @@ -3218,9 +3218,9 @@ void Entity_Projectile::Interpolate() uint projectileFlagsHi; EntityPtr spawner; - flagsLo = (uint)this->_flags; + flagsLo = GHIDRA_UINT(this->_flags); if ((flagsLo & 2) != 0) { - *(undefined4 *)((int)&this->_flags + 4) = *(undefined4 *)((int)&this->_flags + 4); + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); *(uint *)&this->_flags = flagsLo & 0xfffffffd; return; } @@ -3233,16 +3233,16 @@ void Entity_Projectile::Interpolate() if (*(code **)&(*(undefined1 *)((char *)(this) + 0x470)) != (code *)0x0) { (**(code **)&(*(undefined1 *)((char *)(this) + 0x470)))(this,1); } - flagsLo = (uint)this->_projectileFlags; - projectileFlagsHi = *(uint *)((int)&this->_projectileFlags + 4); + flagsLo = GHIDRA_UINT(this->_projectileFlags); + projectileFlagsHi = *(uint *)(GHIDRA_INT(&this->_projectileFlags) + 4); if ((flagsLo & 0x200000) != 0) { fVar1 = this->_updateTime * 3.1415927; fVar2 = sin((fVar1 + fVar1) / 30.0); fVar1 = (this->_velocity).y; (this->_pos).x = fVar2 * (this->_velocity).x * 0.5 + (this->_pos).x; (this->_pos).y = fVar1 * fVar2 * 0.5 + (this->_pos).y; - flagsLo = (uint)this->_projectileFlags; - projectileFlagsHi = *(uint *)((int)&this->_projectileFlags + 4); + flagsLo = GHIDRA_UINT(this->_projectileFlags); + projectileFlagsHi = *(uint *)(GHIDRA_INT(&this->_projectileFlags) + 4); } if ((flagsLo & 0x20) != 0) { perpX = (this->_velocity).y; @@ -3260,8 +3260,8 @@ void Entity_Projectile::Interpolate() fVar1 = cos((fVar1 + fVar1) / 30.0); (this->_pos).x = perpX * fVar1 * 3.0 * 0.5 + (this->_pos).x; (this->_pos).y = perpY * fVar1 * 3.0 * 0.5 + (this->_pos).y; - flagsLo = (uint)this->_projectileFlags; - projectileFlagsHi = *(uint *)((int)&this->_projectileFlags + 4); + flagsLo = GHIDRA_UINT(this->_projectileFlags); + projectileFlagsHi = *(uint *)(GHIDRA_INT(&this->_projectileFlags) + 4); } if ((flagsLo & 0x400000) != 0) { perpX = (this->_velocity).y; @@ -3282,7 +3282,7 @@ void Entity_Projectile::Interpolate() fVar3 = fVar3 * (fVar1 + 3.0); (this->_pos).x = perpX * fVar3 * 0.5 + (this->_pos).x; (this->_pos).y = perpY * fVar3 * 0.5 + (this->_pos).y; - projectileFlagsHi = *(uint *)((int)&this->_projectileFlags + 4); + projectileFlagsHi = *(uint *)(GHIDRA_INT(&this->_projectileFlags) + 4); } if (((projectileFlagsHi & 0x200) != 0) && (spawner = this->_spawnerEntity, spawner != (EntityPtr)0x0)) { @@ -3373,7 +3373,7 @@ void Entity_Projectile::Render(Vector *offset) (g_screenHeight - 182.0) * 0.5) * pixelScale + 0.5; dVar3 = floor((double)pixelCoord); pixelCoord = (float)dVar3; - rngState = (uint)local_20.y >> 5 ^ (uint)local_20.y; + rngState = GHIDRA_UINT(local_20.y) >> 5 ^ GHIDRA_UINT(local_20.y); rngState = rngState << 0x15 ^ rngState; local_20.y = (float)(rngState >> 0xc ^ rngState); offsetX = offset->x; @@ -3385,13 +3385,13 @@ void Entity_Projectile::Render(Vector *offset) (*pcVar1)(); return; } - rngState = (uint)local_20.y >> 5 ^ (uint)local_20.y; - local_18.y = (float)((double)(int)local_20.y + - __uint_to_double_fixup[-((int)local_20.y >> 0x1f)]) * 2.3283062e-10 * 16.0; + rngState = GHIDRA_UINT(local_20.y) >> 5 ^ GHIDRA_UINT(local_20.y); + local_18.y = (float)((double)GHIDRA_INT(local_20.y) + + __uint_to_double_fixup[-(GHIDRA_INT(local_20.y) >> 0x1f)]) * 2.3283062e-10 * 16.0; rngState = rngState << 0x15 ^ rngState; rngShift = (byte)rngShift3; rngState = rngState >> (rngShift & 0x1f) ^ rngState; - local_18.x = (float)((double)(int)rngState + __uint_to_double_fixup[-((int)rngState >> 0x1f)]) * + local_18.x = (float)((double)GHIDRA_INT(rngState) + __uint_to_double_fixup[-(GHIDRA_INT(rngState) >> 0x1f)]) * 2.3283062e-10 * 16.0; if (rngState == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -3409,11 +3409,11 @@ void Entity_Projectile::Render(Vector *offset) return; } uVar2 = rngState >> 5 ^ rngState; - local_20.y = (float)((double)(int)rngState + __uint_to_double_fixup[-((int)rngState >> 0x1f)]) * + local_20.y = (float)((double)GHIDRA_INT(rngState) + __uint_to_double_fixup[-(GHIDRA_INT(rngState) >> 0x1f)]) * 2.3283062e-10 * 16.0; uVar2 = uVar2 << 0x15 ^ uVar2; uVar2 = uVar2 >> (rngShift & 0x1f) ^ uVar2; - local_20.x = (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + local_20.x = (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283062e-10 * 16.0; ((ANM2 *)(&this->_sprite))->ANM2::Render(&this->_renderPosition,&local_18,&local_20); } @@ -3480,9 +3480,9 @@ void Entity_Projectile::AddChangeFlags(ulonglong flags) { uint *changeFlagsHigh; - *(uint *)&this->_changeFlags = (uint)this->_changeFlags | (uint)flags; - changeFlagsHigh = (uint *)((int)&this->_changeFlags + 4); - *changeFlagsHigh = *changeFlagsHigh | flags._4_4_; + *(uint *)&this->_changeFlags = GHIDRA_UINT(this->_changeFlags) | GHIDRA_UINT(flags); + changeFlagsHigh = (uint *)(GHIDRA_INT(&this->_changeFlags) + 4); + *changeFlagsHigh = *changeFlagsHigh | (*(undefined4 *)((char *)&(flags) + 0x4)); return; } diff --git a/src/game/entity_ref.cpp b/src/game/entity_ref.cpp index ce1f265..a7d654a 100644 --- a/src/game/entity_ref.cpp +++ b/src/game/entity_ref.cpp @@ -98,7 +98,7 @@ EntityRef * EntityRef::operator_(EntityRef *other) // 004a2910 uint EntityRef::IsFriendly() { - return CONCAT31((uint3)((uint)this->_flags >> 9),(char)((uint)this->_flags >> 1)) & 0xffffff01; + return CONCAT31((uint3)(GHIDRA_UINT(this->_flags) >> 9),(char)(GHIDRA_UINT(this->_flags) >> 1)) & 0xffffff01; } // 004bc670 diff --git a/src/game/entity_save_state.cpp b/src/game/entity_save_state.cpp index 4446500..b4ec0d0 100644 --- a/src/game/entity_save_state.cpp +++ b/src/game/entity_save_state.cpp @@ -74,9 +74,9 @@ void EntitySaveState::copy(void *other) this[0x16] = *(EntitySaveState *)((char *)other + 0x58); this[0x17] = *(EntitySaveState *)((char *)other + 0x5c); *(undefined1 *)(this + 0x18) = *(undefined1 *)((char *)other + 0x60); - FUN_004d7250((int)other + 100); + FUN_004d7250(GHIDRA_INT(other) + 100); local_8 = 0; - FUN_004d7190((int)other + 0x6c); + FUN_004d7190(GHIDRA_INT(other) + 0x6c); ExceptionList = local_10; return; } @@ -95,7 +95,7 @@ void EntitySaveState::set_extra_data(undefined4 param_1) local_8 = 0xffffffff; puStack_c = &LAB_00af0d44; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; extraDataRef = operator_new(0x18); local_8 = 0; diff --git a/src/game/entity_save_state_ref.cpp b/src/game/entity_save_state_ref.cpp index 50210f0..94663b3 100644 --- a/src/game/entity_save_state_ref.cpp +++ b/src/game/entity_save_state_ref.cpp @@ -13,7 +13,7 @@ void EntitySaveStateRef::Set(void *state) local_8 = 0xffffffff; puStack_c = &LAB_00af0d44; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; refCount = operator_new(0x18); local_8 = 0; diff --git a/src/game/entity_slot.cpp b/src/game/entity_slot.cpp index 66bc1c8..3cfc4eb 100644 --- a/src/game/entity_slot.cpp +++ b/src/game/entity_slot.cpp @@ -89,7 +89,7 @@ void Entity_Slot::Update() ehState = 0xffffffff; puStack_18 = &LAB_00af768c; savedExceptionList = ExceptionList; - stackCookie = __security_cookie ^ (uint)(local_4c + 0x3c); + stackCookie = __security_cookie ^ GHIDRA_UINT((local_4c + 0x3c)); ExceptionList = &savedExceptionList; local_b0.y = 0.0; local_e8.y = 0.0; @@ -119,21 +119,21 @@ LAB_0065d9f6: if (bVar2 != 0) { local_d0.y = 2.94273e-44; seed_fart_sound_override((int *)&local_d0.y); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_d0.y,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_d0.y),1.0,2,0,1.0,0.0); this = savedSlot; puVar1 = puStack_20; } } } puStack_20 = puVar1; - isPrizeAnim = (uint)this->_flags; - uVar12 = *(undefined4 *)((int)&this->_flags + 4); + isPrizeAnim = GHIDRA_UINT(this->_flags); + uVar12 = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); if ((isPrizeAnim & 4) != 0) { *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x410)) = 0; *(undefined2 *)&(*(undefined1 *)((char *)(this) + 0x41c)) = 0; iVar4 = this->_variant; *(uint *)&this->_flags = isPrizeAnim & 0xfffffffb; - *(undefined4 *)((int)&this->_flags + 4) = uVar12; + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = uVar12; if (iVar4 == 0xb) { ((ANM2 *)(&this->_sprite))->ANM2::Play((byte *)"Appear",0); this->_visible = 1; @@ -153,7 +153,7 @@ LAB_0065d9f6: bVar17 = bVar2 < (byte)*animName; if (bVar2 != *animName) { LAB_0065db20: - isPrizeAnim = -(uint)bVar17 | 1; + isPrizeAnim = -GHIDRA_UINT(bVar17) | 1; goto LAB_0065db25; } if (bVar2 == 0) break; @@ -224,7 +224,7 @@ LAB_0065db25: pEVar8 = ((Game *)(g_game))->Game::Spawn(1000,7,&this->_pos,&g_vectorZero,(Entity *)0x0,0,isPrizeAnim); isPrizeAnim = Random(); setColorFn = *(code **)(*(int *)pEVar8 + 0x3c); - fVar19 = (float)((double)(int)isPrizeAnim + __uint_to_double_fixup[-((int)isPrizeAnim >> 0x1f)]) * + fVar19 = (float)((double)GHIDRA_INT(isPrizeAnim) + __uint_to_double_fixup[-(GHIDRA_INT(isPrizeAnim) >> 0x1f)]) * 2.3283064e-10 * 0.4 + 0.2; fVar18 = fVar19 * g_vectorOne.x; (pEVar8->_sprite)._scale.y = fVar19 * g_vectorOne.y; @@ -302,8 +302,8 @@ LAB_0065df69: Room::get_random_pickup_position(g_game->_room,&local_a0,0,0); local_c0.y = (float)g_game->_room; isPrizeAnim = ((Room *)((Room *)local_c0.y))->Room::GetGridIndex(&local_a0); - if ((isPrizeAnim < 0x1c0) && (((int *)((int)local_c0.y + 0x76c))[isPrizeAnim] < 0x3b7)) { - ((int *)((int)local_c0.y + 0x76c))[isPrizeAnim] = 900; + if ((isPrizeAnim < 0x1c0) && (((int *)(GHIDRA_INT(local_c0.y) + 0x76c))[isPrizeAnim] < 0x3b7)) { + ((int *)(GHIDRA_INT(local_c0.y) + 0x76c))[isPrizeAnim] = 900; } isPrizeAnim = Random(); ((Game *)(g_game))->Game::Spawn(4,3,&local_a0,&g_vectorZero,(Entity *)pEVar15,0,isPrizeAnim); @@ -324,7 +324,7 @@ LAB_0065df69: if ((bVar2 != 0) && (pEVar15->_variant == 1)) { ((ANM2 *)(&pEVar15->_sprite))->ANM2::SetFrame((std_string *)"Prize",0); ((RNG *)(&pEVar15->_dropRNG))->RNG::Next(); - if ((uint)(pEVar15->_dropRNG)._seed % 0x32 == 0) { + if (GHIDRA_UINT((pEVar15->_dropRNG)._seed) % 0x32 == 0) { isPrizeAnim = Random(); ((Game *)(g_game))->Game::Spawn(1000,1,&pEVar15->_pos,&g_vectorZero,(Entity *)0x0,0,isPrizeAnim); spawn_break_drops(pEVar15); @@ -339,17 +339,17 @@ LAB_0065df69: (((RNG *)(&pEVar15->_dropRNG))->RNG::Next(), ((pEVar15->_dropRNG)._seed & 3U) != 0)))) { ((RNG *)(&pEVar15->_dropRNG))->RNG::Next(); local_a8.y = 2.94273e-44; - isPrizeAnim = (uint)(pEVar15->_dropRNG)._seed % 0x15; + isPrizeAnim = GHIDRA_UINT((pEVar15->_dropRNG)._seed) % 0x15; } else { ((RNG *)(&pEVar15->_dropRNG))->RNG::Next(); - isPrizeAnim = (uint)(pEVar15->_dropRNG)._seed % (uint)local_a8.y; + isPrizeAnim = GHIDRA_UINT((pEVar15->_dropRNG)._seed) % GHIDRA_UINT(local_a8.y); } isPrizeAnim = isPrizeAnim + 3; *(uint *)&(*(undefined1 *)((char *)(pEVar15) + 0x414)) = isPrizeAnim; if (isPrizeAnim == 9) { ((RNG *)(&pEVar15->_dropRNG))->RNG::Next(); - if ((uint)(pEVar15->_dropRNG)._seed % (uint)local_c0.y < 3) { + if (GHIDRA_UINT((pEVar15->_dropRNG)._seed) % GHIDRA_UINT(local_c0.y) < 3) { isPrizeAnim = *(uint *)&(*(undefined1 *)((char *)(pEVar15) + 0x414)); goto LAB_0065e2a5; } @@ -361,23 +361,23 @@ LAB_0065e2a5: bVar17 = false; if (isPrizeAnim == 10) { ((RNG *)(&pEVar15->_dropRNG))->RNG::Next(); - if (4 < (uint)(pEVar15->_dropRNG)._seed % (uint)local_c0.y) goto LAB_0065e2c8; + if (4 < GHIDRA_UINT((pEVar15->_dropRNG)._seed) % GHIDRA_UINT(local_c0.y)) goto LAB_0065e2c8; isPrizeAnim = *(uint *)&(*(undefined1 *)((char *)(pEVar15) + 0x414)); bVar17 = isPrizeAnim == 10; } if ((9 < isPrizeAnim && !bVar17) && - (((RNG *)(&pEVar15->_dropRNG))->RNG::Next(), (uint)(pEVar15->_dropRNG)._seed % (uint)local_c0.y != 0 + (((RNG *)(&pEVar15->_dropRNG))->RNG::Next(), GHIDRA_UINT((pEVar15->_dropRNG)._seed) % GHIDRA_UINT(local_c0.y) != 0 )) { *(int *)&(*(undefined1 *)((char *)(pEVar15) + 0x414)) = *(int *)&(*(undefined1 *)((char *)(pEVar15) + 0x414)) + 1; } } if ((*(int *)&(*(undefined1 *)((char *)(pEVar15) + 0x414)) == 7) && - (((RNG *)(&pEVar15->_dropRNG))->RNG::Next(), (uint)(pEVar15->_dropRNG)._seed % 3 == 0)) { + (((RNG *)(&pEVar15->_dropRNG))->RNG::Next(), GHIDRA_UINT((pEVar15->_dropRNG)._seed) % 3 == 0)) { *(undefined4 *)&(*(undefined1 *)((char *)(pEVar15) + 0x414)) = 0xb; } if ((((*(int *)&(*(undefined1 *)((char *)(pEVar15) + 0x414)) == 6) || (*(int *)&(*(undefined1 *)((char *)(pEVar15) + 0x414)) == 5)) && (bVar2 = ((Entity_Player *)(player))->Entity_Player::HasTrinket(0x16,0), bVar2 != 0)) && - (((RNG *)((RNG *)local_d0.y))->RNG::Next(), (uint)*(int *)local_d0.y % 5 != 0)) { + (((RNG *)((RNG *)local_d0.y))->RNG::Next(), GHIDRA_UINT(*(int *)local_d0.y) % 5 != 0)) { *(undefined4 *)&(*(undefined1 *)((char *)(pEVar15) + 0x414)) = 0xb; } if ((g_game->_difficulty == 1) && @@ -481,20 +481,20 @@ LAB_0065e2a5: local_c0.y = (float)(pRVar16->_seed & 7); ((RNG *)(pRVar16))->RNG::Next(); player = (Entity_Player *)local_e0.y; - local_f8._4_4_ = (ANM2 *)(pRVar16->_seed & 7); + (*(undefined4 *)((char *)&(local_f8) + 0x4)) = (ANM2 *)(pRVar16->_seed & 7); if (local_a8.y != local_c0.y) break; - } while ((ANM2 *)local_c0.y == local_f8._4_4_); + } while ((ANM2 *)local_c0.y == (*(undefined4 *)((char *)&(local_f8) + 0x4))); if ((((pEVar15->_sprite)._animState._animData != (void *)0x0) && - (((AnimationState *)(&(pEVar15->_sprite)._animState))->AnimationState::SetLayerFrame(1,(int)local_a8.y), + (((AnimationState *)(&(pEVar15->_sprite)._animState))->AnimationState::SetLayerFrame(1,GHIDRA_INT(local_a8.y)), (pEVar15->_sprite)._animState._animData != (void *)0x0)) && - (((AnimationState *)(&(pEVar15->_sprite)._animState))->AnimationState::SetLayerFrame(2,(int)local_c0.y), + (((AnimationState *)(&(pEVar15->_sprite)._animState))->AnimationState::SetLayerFrame(2,GHIDRA_INT(local_c0.y)), (pEVar15->_sprite)._animState._animData != (void *)0x0)) { - ((AnimationState *)(&(pEVar15->_sprite)._animState))->AnimationState::SetLayerFrame(3,(int)local_f8._4_4_); + ((AnimationState *)(&(pEVar15->_sprite)._animState))->AnimationState::SetLayerFrame(3,(*(undefined4 *)((char *)&(GHIDRA_INT(local_f8)) + 0x4))); } manager = g_manager; local_c0.y = 3.48923e-43; seed_fart_sound_override((int *)&local_c0.y); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_c0.y,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_c0.y),1.0,2,0,1.0,0.0); pEVar15 = savedSlot; } } @@ -509,13 +509,13 @@ LAB_0065e2a5: } else { ((RNG *)(&pEVar15->_dropRNG))->RNG::Next(); - isPrizeAnim = (uint)(pEVar15->_dropRNG)._seed % 100; + isPrizeAnim = GHIDRA_UINT((pEVar15->_dropRNG)._seed) % 100; bVar2 = ((Entity_Player *)(player))->Entity_Player::HasTrinket(0x4c,0); sprite = (Sprite *)local_c0.y; if (bVar2 != 0) { isPrizeAnim = isPrizeAnim - 5; } - if ((int)isPrizeAnim < 0x19) { + if (GHIDRA_INT(isPrizeAnim) < 0x19) { ((ANM2 *)((ANM2 *)local_c0.y))->ANM2::Play((byte *)"Prize",0); iVar4 = 0x10c; } @@ -627,7 +627,7 @@ LAB_0065eb25: iVar4 = ((Entity_Player *)(player))->Entity_Player::GetBrokenHearts(); if (0 < iVar4) { ((Entity_Player *)(player))->Entity_Player::AddBrokenHearts(-1); - Entity_Player::UseActiveItem(player,(short *)((int)&local_f8 + 6),0x23,1,-1,0); + Entity_Player::UseActiveItem(player,(short *)(GHIDRA_INT(&local_f8) + 6),0x23,1,-1,0); SoundEffects::PlayWithFartOverride(0x10c,1.0,2,0,1.0); goto LAB_0065ed16; } @@ -764,23 +764,23 @@ LAB_0065ed16: } else { local_a8.y = (float)((Entity_Player *)((Entity_Player *)local_e0.y))->Entity_Player::GetTrinketMultiplier(0x4c); - local_f8._4_4_ = (ANM2 *)0x3; + (*(undefined4 *)((char *)&(local_f8) + 0x4)) = (ANM2 *)0x3; minMaxResult = (undefined4 *)std::min(); local_a8.y = (float)*minMaxResult; } switch(pEVar15->_variant) { case 1: ((std::string *)(prizeAnimName))->std::string::string_from_cstr((byte *)"Prize"); - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; pAVar14 = (ANM2 *)Config::GetPillEffects(); ((ANM2 *)(pAVar14))->ANM2::GetAnimation((std_string *)local_4c); isPrizeAnim = FUN_0040c790(); - local_f8._4_4_ = (ANM2 *)CONCAT13(isPrizeAnim,local_f8._4_3_); + (*(undefined4 *)((char *)&(local_f8) + 0x4)) = (ANM2 *)CONCAT13(isPrizeAnim,(*(undefined1 *)((char *)&(local_f8) + 0x4))); ((std::string *)(local_4c))->std::string::_Tidy_deallocate(); - ehState = (uint)ehState._1_3_ << 8; + ehState = (*(undefined1 *)((char *)&(GHIDRA_UINT(ehState)) + 0x1)) << 8; ((std::string *)(prizeAnimName))->std::string::_Tidy_deallocate(); pEVar15 = savedSlot; - if (local_f8._7_1_ != '\0') { + if ((*(undefined1 *)((char *)&(local_f8) + 0x7)) != '\0') { switch(*(undefined4 *)&(*(undefined1 *)((char *)(savedSlot) + 0x414))) { case 3: isPrizeAnim = ((RNG *)((RNG *)pAVar10))->RNG::RandomInt(3); @@ -886,7 +886,7 @@ switchD_0065eef5_default: if ((ANM2 *)local_b0.y == (ANM2 *)0x0) goto switchD_0065eef5_default; do { HandleCollision(pEVar15,0x14,0,fVar18,&prizeRng,&g_vectorZero,&g_vectorZero); - local_b0.y = (float)((int)&((ANM2 *)((int)local_b0.y + -0x114))->_bitflags + 3); + local_b0.y = (float)(GHIDRA_INT(&((ANM2 *)(GHIDRA_INT(local_b0.y) + -0x114))->_bitflags) + 3); } while ((ANM2 *)local_b0.y != (ANM2 *)0x0); *(undefined4 *)&(*(undefined1 *)((char *)(pEVar15) + 0x410)) = 1; local_b0.y = 0.0; @@ -957,7 +957,7 @@ LAB_0065f65e: if (cVar3 != '\0') goto LAB_0065f76e; } itemPool = (ItemPool *)((Game *)(g_game))->Game::GetItemPool(); - ItemPool::RemoveCollectible(itemPool,(int)local_d0.y,0,0); + ItemPool::RemoveCollectible(itemPool,GHIDRA_INT(local_d0.y),0,0); pEVar15->Remove(); isPrizeAnim = Random(); ((Game *)(g_game))->Game::Spawn(1000,1,&pEVar15->_pos,&g_vectorZero,(Entity *)0x0,0,isPrizeAnim); @@ -967,7 +967,7 @@ LAB_0065f65e: pTVar20 = &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor; uVar12 = 0; pEVar8 = ((Game *)(g_game))->Game::Spawn(5,100,&pEVar15->_pos,&g_vectorZero,(Entity *)0x0, - (uint)local_d0.y,isPrizeAnim); + GHIDRA_UINT(local_d0.y),isPrizeAnim); pickup = (Entity_Pickup *)__RTDynamicCast(pEVar8,uVar12,pTVar20,pTVar21,uVar22); ((Entity_Pickup *)(pickup))->Entity_Pickup::SetAlternatePedestal(2); pickup->Update(); @@ -996,25 +996,25 @@ LAB_0065f76e: bVar2 = ((Entity_Player *)((Entity_Player *)fVar18))->Entity_Player::HasCollectible(0x4b,0); if (bVar2 == 0) { LAB_0065f7e9: - local_f8._4_4_ = (ANM2 *)((uint)local_f8._4_4_ & 0xffffff); + (*(undefined4 *)((char *)&(local_f8) + 0x4)) = (ANM2 *)((*(undefined4 *)((char *)&(GHIDRA_UINT(local_f8)) + 0x4)) & 0xffffff); } else { newSlotTimer = 8; isPrizeAnim = EntityPtr::Ref(); ((RNG *)((RNG *)(local_4c + 8)))->RNG::game_constructor(isPrizeAnim,newSlotTimer); - ehState = CONCAT31(ehState._1_3_,2); - local_e8.y = (float)((uint)local_b0.y | 1); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),2); + local_e8.y = (float)(GHIDRA_UINT(local_b0.y) | 1); local_b0.y = local_e8.y; isPrizeAnim = ((RNG *)(localRng))->RNG::RandomInt(4); - local_f8._4_4_ = (ANM2 *)CONCAT13(1,local_f8._4_3_); + (*(undefined4 *)((char *)&(local_f8) + 0x4)) = (ANM2 *)CONCAT13(1,(*(undefined1 *)((char *)&(local_f8) + 0x4))); if (isPrizeAnim != 0) goto LAB_0065f7e9; } ehState = 0; - if (((uint)local_b0.y & 1) != 0) { + if ((GHIDRA_UINT(local_b0.y) & 1) != 0) { guard_check_icall(); } pAVar10 = (ANM2 *)local_c0.y; - bVar2 = local_f8._7_1_; + bVar2 = (*(undefined1 *)((char *)&(local_f8) + 0x7)); } pEVar15 = savedSlot; fVar18 = local_a8.y; @@ -1025,7 +1025,7 @@ LAB_0065f7e9: if (pAVar10 == (ANM2 *)0x0) goto LAB_0065f522; do { HandleCollision(pEVar15,0x14,0,fVar18,&prizeRng,&g_vectorZero,&g_vectorZero); - local_c0.y = (float)((int)&((ANM2 *)((int)local_c0.y + -0x114))->_bitflags + 3); + local_c0.y = (float)(GHIDRA_INT(&((ANM2 *)(GHIDRA_INT(local_c0.y) + -0x114))->_bitflags) + 3); } while ((ANM2 *)local_c0.y != (ANM2 *)0x0); local_c0.y = 0.0; } @@ -1180,7 +1180,7 @@ LAB_0065fdc3: pAVar10 = (ANM2 *)ItemPool::GetCollectible(itemPool,10,newSlotTimer,0,0,0); tmpVec = (Vector *)FUN_006653c0(&local_a0); } - ((Game *)(g_game))->Game::Spawn(5,100,tmpVec,&g_vectorZero,(Entity *)0x0,(uint)pAVar10,isPrizeAnim); + ((Game *)(g_game))->Game::Spawn(5,100,tmpVec,&g_vectorZero,(Entity *)0x0,GHIDRA_UINT(pAVar10),isPrizeAnim); pEVar15 = savedSlot; *(undefined4 *)&(*(undefined1 *)((char *)(savedSlot) + 0x410)) = 4; ((ANM2 *)(&savedSlot->_sprite))->ANM2::Play((byte *)"Teleport",0); @@ -1281,7 +1281,7 @@ LAB_0065fc5e: pVVar13 = &g_vectorZero; tmpVec = ((Vector *)((Vector *)local_a0.y))->Vector::__add(&local_b8,&local_d8); ((Entity_Player *)((Entity_Player *)fVar18))->Entity_Player::ThrowBlueSpider(tmpVec,pVVar13); - pRVar16 = (RNG *)((int)&pRVar16[-1]._shift3 + 3); + pRVar16 = (RNG *)(GHIDRA_INT(&pRVar16[-1]._shift3) + 3); } while (pRVar16 != (RNG *)0x0); pEVar15 = savedSlot; } @@ -1343,11 +1343,11 @@ LAB_00660ed1: bVar2 = ((Room *)(room))->Room::CheckLine(pVVar13,tmpVec,1,0,0,0,(Vector *)0x0); pEVar15 = savedSlot; if (bVar2 != 0) break; - local_b0.y = (float)((int)((std_string *)local_b0.y)->_buf + 1); - } while ((uint)local_b0.y < (ANM2 *)0xa); + local_b0.y = (float)(GHIDRA_INT(((std_string *)local_b0.y)->_buf) + 1); + } while (GHIDRA_UINT(local_b0.y) < (ANM2 *)0xa); HandleCollision(savedSlot,*(undefined4 *)&(*(undefined1 *)((char *)(savedSlot) + 0x414)),local_c8.y,local_a8.y, &prizeRng,&local_f0,&local_b8); - local_d0.y = (float)((int)&((RNG *)((int)local_d0.y + -0x10))->_shift3 + 3); + local_d0.y = (float)(GHIDRA_INT(&((RNG *)(GHIDRA_INT(local_d0.y) + -0x10))->_shift3) + 3); } while ((RNG *)local_d0.y != (RNG *)0x0); local_d0.y = 0.0; } @@ -1457,7 +1457,7 @@ LAB_0066148d: tmpVec = ((Vector *)((Vector *)(local_4c + 0x10)))->Vector::Vector(0.0,80.0); tmpVec = ((Vector *)((Vector *)local_b0.y))->Vector::__add(&VStack_54,tmpVec); tmpVec = Room::FindFreePickupSpawnPosition(room,&scratchVec,tmpVec,0.0,0,0,0); - ((Game *)(g_game))->Game::Spawn(5,100,tmpVec,&g_vectorZero,(Entity *)0x0,isPrizeAnim,(uint)local_a0.y); + ((Game *)(g_game))->Game::Spawn(5,100,tmpVec,&g_vectorZero,(Entity *)0x0,isPrizeAnim,GHIDRA_UINT(local_a0.y)); pEVar15 = savedSlot; } (*(undefined1 *)((char *)(pEVar15) + 0x418)) = 0; @@ -1475,12 +1475,12 @@ LAB_0066148d: local_a8.y = (float)(isPrizeAnim % 1000); ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::IncreaseEventCounter(0x14,1) ; - pAVar14 = (ANM2 *)((int)local_a8.y + 1); + pAVar14 = (ANM2 *)(GHIDRA_INT(local_a8.y) + 1); local_a8.y = (float)pAVar14; ((ANM2 *)((ANM2 *)local_c8.y))->ANM2::SetFrame((std_string *)"Prize",0); - ((ANM2 *)((ANM2 *)local_c8.y))->ANM2::SetLayerFrame(1,((int)pAVar14 / 100) % 10); - ((ANM2 *)((ANM2 *)local_c8.y))->ANM2::SetLayerFrame(2,((int)pAVar14 / 10) % 10); - ((ANM2 *)((ANM2 *)local_c8.y))->ANM2::SetLayerFrame(3,(int)((int)local_a8.y + ((int)pAVar14 / 10) * -10)); + ((ANM2 *)((ANM2 *)local_c8.y))->ANM2::SetLayerFrame(1,(GHIDRA_INT(pAVar14) / 100) % 10); + ((ANM2 *)((ANM2 *)local_c8.y))->ANM2::SetLayerFrame(2,(GHIDRA_INT(pAVar14) / 10) % 10); + ((ANM2 *)((ANM2 *)local_c8.y))->ANM2::SetLayerFrame(3,GHIDRA_INT((GHIDRA_INT(local_a8.y) + (GHIDRA_INT(pAVar14) / 10) * -10))); isPrizeAnim = ((RNG *)((RNG *)pAVar10))->RNG::RandomInt(0x32); fVar18 = local_e0.y; if (isPrizeAnim == 0) { @@ -1516,42 +1516,42 @@ LAB_006616a8: tmpVec = ((Vector *)((Vector *)(local_4c + 0x10)))->Vector::Vector(0.0,40.0); tmpVec = ((Vector *)(&pEVar15->_pos))->Vector::__add(&VStack_54,tmpVec); tmpVec = Room::FindFreePickupSpawnPosition(room,&scratchVec,tmpVec,0.0,0,0,0); - ((Game *)(g_game))->Game::Spawn(6,4,tmpVec,&g_vectorZero,(Entity *)pEVar15,0,(uint)local_a0.y); + ((Game *)(g_game))->Game::Spawn(6,4,tmpVec,&g_vectorZero,(Entity *)pEVar15,0,GHIDRA_UINT(local_a0.y)); pAVar10 = (ANM2 *)&pEVar15->_dropRNG; } ((Game *)(g_game))->Game::DonateAngel(1); ((Game *)(g_game))->Game::DonateGreed(1); - if (9 < (int)local_a8.y) { + if (9 < GHIDRA_INT(local_a8.y)) { ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::TryUnlock(0x86); } - if (0x13 < (int)local_a8.y) { + if (0x13 < GHIDRA_INT(local_a8.y)) { ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::TryUnlock(0x97); } - if (0x31 < (int)local_a8.y) { + if (0x31 < GHIDRA_INT(local_a8.y)) { ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::TryUnlock(0x87); } - if (99 < (int)local_a8.y) { + if (99 < GHIDRA_INT(local_a8.y)) { ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::TryUnlock(0x98); } - if (0x95 < (int)local_a8.y) { + if (0x95 < GHIDRA_INT(local_a8.y)) { ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::TryUnlock(0x88); } - if (199 < (int)local_a8.y) { + if (199 < GHIDRA_INT(local_a8.y)) { ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::TryUnlock(0x99); } - if (399 < (int)local_a8.y) { + if (399 < GHIDRA_INT(local_a8.y)) { ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::TryUnlock(0x89); } - if (599 < (int)local_a8.y) { + if (599 < GHIDRA_INT(local_a8.y)) { ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::TryUnlock(0x9a); } - if (899 < (int)local_a8.y) { + if (899 < GHIDRA_INT(local_a8.y)) { ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::TryUnlock(0x3b); } - if (0x3e6 < (int)local_a8.y) { + if (0x3e6 < GHIDRA_INT(local_a8.y)) { ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::TryUnlock(0x8a); } - if (999 < (int)local_a8.y) { + if (999 < GHIDRA_INT(local_a8.y)) { isPrizeAnim = Random(); local_b0.y = (float)&pEVar15->_pos; ((Game *)(g_game))->Game::Spawn(1000,1,(Vector *)local_b0.y,&g_vectorZero,(Entity *)0x0,0,isPrizeAnim); @@ -1579,7 +1579,7 @@ LAB_006616a8: } while (iVar4 < 10); isPrizeAnim = ((RNG *)((RNG *)local_c0.y))->RNG::Next(); ((Game *)(g_game))->Game::Spawn(5,0x14,(Vector *)local_b0.y,&local_b8,(Entity *)0x0,3,isPrizeAnim); - local_e8.y = (float)((int)&((ANM2 *)((int)local_e8.y + -0x114))->_bitflags + 3); + local_e8.y = (float)(GHIDRA_INT(&((ANM2 *)(GHIDRA_INT(local_e8.y) + -0x114))->_bitflags) + 3); } while ((ANM2 *)local_e8.y != (ANM2 *)0x0); Game::SetStateFlag(0x11,1); } @@ -1600,10 +1600,10 @@ LAB_006616a8: local_d0.y = (float)(iVar4 * 3); local_a0.y = (float)((Entity_Player *)((Entity_Player *)local_e0.y))->Entity_Player::GetTrinketMultiplier(0x55); minResult = std_min_ptr((uint *)&local_d0.y,(uint *)&local_a0.y); - local_d0.y = (float)((int)local_d0.y - *minResult); + local_d0.y = (float)(GHIDRA_INT(local_d0.y) - *minResult); if (*(int *)&(*(undefined1 *)((char *)(pEVar15) + 0x410)) != 3) { isPrizeAnim = ((RNG *)((RNG *)pAVar10))->RNG::RandomInt(3000); - if (isPrizeAnim < (uint)((int)local_d0.y * 3)) { + if (isPrizeAnim < GHIDRA_UINT((GHIDRA_INT(local_d0.y) * 3))) { bVar2 = 0; pbVar5 = (byte *)FUN_0065d1f0(); ((ANM2 *)(&pEVar15->_sprite))->ANM2::Play(pbVar5,bVar2); @@ -1630,12 +1630,12 @@ LAB_00661b4b: local_c8.y = (float)&DAT_00000014; isPrizeAnim = ((RNG *)((RNG *)pAVar10))->RNG::RandomInt(3); local_b0.y = (float)(isPrizeAnim + 1); - if ((int)local_b0.y < 1) break; + if (GHIDRA_INT(local_b0.y) < 1) break; } fVar18 = local_a8.y; do { HandleCollision(pEVar15,local_c8.y,0,fVar18,&prizeRng,&g_vectorZero,&g_vectorZero); - local_b0.y = (float)((int)&((ANM2 *)((int)local_b0.y + -0x114))->_bitflags + 3); + local_b0.y = (float)(GHIDRA_INT(&((ANM2 *)(GHIDRA_INT(local_b0.y) + -0x114))->_bitflags) + 3); } while ((ANM2 *)local_b0.y != (ANM2 *)0x0); local_b0.y = 0.0; } @@ -1662,7 +1662,7 @@ LAB_00661b4b: isPrizeAnim = 4; LAB_00662124: isPrizeAnim = ((RNG *)((RNG *)pAVar10))->RNG::RandomInt(isPrizeAnim); - local_f8._4_4_ = (ANM2 *)CONCAT13(isPrizeAnim == 0,local_f8._4_3_); + (*(undefined4 *)((char *)&(local_f8) + 0x4)) = (ANM2 *)CONCAT13(isPrizeAnim == 0,(*(undefined1 *)((char *)&(local_f8) + 0x4))); } else { if (iVar4 == 1) { @@ -1674,11 +1674,11 @@ LAB_00662124: goto LAB_00662124; } isPrizeAnim = ((RNG *)((RNG *)pAVar10))->RNG::RandomInt(4); - local_f8._4_4_ = (ANM2 *)CONCAT13(isPrizeAnim != 0,local_f8._4_3_); + (*(undefined4 *)((char *)&(local_f8) + 0x4)) = (ANM2 *)CONCAT13(isPrizeAnim != 0,(*(undefined1 *)((char *)&(local_f8) + 0x4))); } bVar2 = ((Entity_Player *)((Entity_Player *)local_e0.y))->Entity_Player::HasTrinket(0x4c,0); if (((bVar2 == 0) || (isPrizeAnim = ((RNG *)((RNG *)pAVar10))->RNG::RandomInt(0x14), isPrizeAnim != 0)) && - (local_f8._7_1_ == '\0')) { + ((*(undefined1 *)((char *)&(local_f8) + 0x7)) == '\0')) { *(int *)&(*(undefined1 *)((char *)(pEVar15) + 0x420)) = *(int *)&(*(undefined1 *)((char *)(pEVar15) + 0x420)) + 1; } else { @@ -1730,29 +1730,29 @@ LAB_00662215: } PersistentGameData::IncreaseEventCounter (*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548)),0x73,1); - local_a8.y = (float)((int)((std_string *)local_a8.y)->_buf + 1); + local_a8.y = (float)(GHIDRA_INT(((std_string *)local_a8.y)->_buf) + 1); } fVar18 = local_a8.y; ((ANM2 *)((ANM2 *)local_c8.y))->ANM2::SetFrame((std_string *)"Prize",0); - ((ANM2 *)((ANM2 *)local_c8.y))->ANM2::SetLayerFrame(1,((int)fVar18 / 100) % 10); - iVar4 = (int)fVar18 / 10; + ((ANM2 *)((ANM2 *)local_c8.y))->ANM2::SetLayerFrame(1,(GHIDRA_INT(fVar18) / 100) % 10); + iVar4 = GHIDRA_INT(fVar18) / 10; ((ANM2 *)((ANM2 *)local_c8.y))->ANM2::SetLayerFrame(2,iVar4 % 10); - ((ANM2 *)((ANM2 *)local_c8.y))->ANM2::SetLayerFrame(3,(int)((int)local_a8.y + iVar4 * -10)); + ((ANM2 *)((ANM2 *)local_c8.y))->ANM2::SetLayerFrame(3,GHIDRA_INT((GHIDRA_INT(local_a8.y) + iVar4 * -10))); pEVar15 = savedSlot; - if (1 < (int)local_a8.y) { + if (1 < GHIDRA_INT(local_a8.y)) { ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(savedSlot) + 0x548))))->PersistentGameData::TryUnlock(0xf2); } - if (0xd < (int)local_a8.y) { + if (0xd < GHIDRA_INT(local_a8.y)) { ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::TryUnlock(0xf3); } - if (0x20 < (int)local_a8.y) { + if (0x20 < GHIDRA_INT(local_a8.y)) { ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::TryUnlock(0xf4); } - if (0x43 < (int)local_a8.y) { + if (0x43 < GHIDRA_INT(local_a8.y)) { ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::TryUnlock(0xf5); } - if ((int)local_a8.y < 999) { - if (0x6e < (int)local_a8.y) goto LAB_00661da8; + if (GHIDRA_INT(local_a8.y) < 999) { + if (0x6e < GHIDRA_INT(local_a8.y)) goto LAB_00661da8; } else { bVar2 = ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::TryUnlock(0x113); @@ -1774,22 +1774,22 @@ LAB_00662215: LAB_00661da8: ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::TryUnlock(0xf6); } - if (0xe9 < (int)local_a8.y) { + if (0xe9 < GHIDRA_INT(local_a8.y)) { ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::TryUnlock(0xf7); } - if (0x1b6 < (int)local_a8.y) { + if (0x1b6 < GHIDRA_INT(local_a8.y)) { ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::TryUnlock(0xf8); } - if (499 < (int)local_a8.y) { + if (499 < GHIDRA_INT(local_a8.y)) { ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::TryUnlock(0x155); } - if (0x299 < (int)local_a8.y) { + if (0x299 < GHIDRA_INT(local_a8.y)) { ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::TryUnlock(0xf9); } - if (0x36e < (int)local_a8.y) { + if (0x36e < GHIDRA_INT(local_a8.y)) { ((PersistentGameData *)(*(PersistentGameData **)&(*(undefined1 *)((char *)(pEVar15) + 0x548))))->PersistentGameData::TryUnlock(0xfa); } - if ((int)local_a8.y < 1000) { + if (GHIDRA_INT(local_a8.y) < 1000) { if ((ANM2 *)local_a8.y != (ANM2 *)0x3e7) goto LAB_00661fe0; *(undefined2 *)&(*(undefined1 *)((char *)(pEVar15) + 0x42a)) = 0; newSlotTimer = 0x14; @@ -1823,7 +1823,7 @@ LAB_00661da8: } while (iVar4 < 10); isPrizeAnim = ((RNG *)((RNG *)local_c0.y))->RNG::Next(); ((Game *)(g_game))->Game::Spawn(5,0x14,(Vector *)local_b0.y,&local_c8,(Entity *)0x0,3,isPrizeAnim); - local_e8.y = (float)((int)local_e8.y + -1); + local_e8.y = (float)(GHIDRA_INT(local_e8.y) + -1); } while (local_e8.y != 0.0); pEVar15 = savedSlot; LAB_00661fe0: @@ -1910,7 +1910,7 @@ LAB_006604ee: tmpVec = &local_b8; pAVar10 = (ANM2 *)local_c8.y; LAB_006604fd: - ((Game *)(g_game))->Game::Spawn(5,0x15e,(Vector *)pAVar10,tmpVec,(Entity *)0x0,(uint)fVar18,isPrizeAnim); + ((Game *)(g_game))->Game::Spawn(5,0x15e,(Vector *)pAVar10,tmpVec,(Entity *)0x0,GHIDRA_UINT(fVar18),isPrizeAnim); *(undefined4 *)&(*(undefined1 *)((char *)(savedSlot) + 0x420)) = 0; pEVar15 = savedSlot; } @@ -1948,7 +1948,7 @@ LAB_00660524: local_4c[0xd] = '\0'; local_4c[0xe] = '\0'; local_4c[0xf] = '\0'; - local_4c._16_4_ = 2; + (*(undefined4 *)((char *)&(local_4c) + 0x10)) = 2; local_38 = 3; isPrizeAnim = ((RNG *)((RNG *)pAVar10))->RNG::RandomInt(6); fVar18 = local_e0.y; @@ -1957,10 +1957,10 @@ LAB_00660524: do { iVar4 = ((Entity_Player *)((Entity_Player *)fVar18))->Entity_Player::GetActiveMaxCharge(newSlotTimer); if (iVar4 == 0) { - if (0 < (int)local_a0.y) { + if (0 < GHIDRA_INT(local_a0.y)) { effect = Entity_Effect::CreateTimer - (&LAB_0065d930,(uint)(0x14 / (longlong)(int)local_a0.y), - (uint)local_a0.y,1); + (&LAB_0065d930,GHIDRA_UINT((0x14 / (longlong)GHIDRA_INT(local_a0.y))), + GHIDRA_UINT(local_a0.y),1); ((Entity *)((Entity *)effect))->Entity::SetParent((Entity *)fVar18); effect->Update(); } @@ -2042,11 +2042,11 @@ LAB_006608b1: VStack_54.y = 1.76564e-43; isPrizeAnim = EntityPtr::Ref(); ((RNG *)((RNG *)(local_4c + 8)))->RNG::game_constructor(isPrizeAnim,newSlotTimer); - ehState._0_1_ = 3; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 3; local_b0.y = (float)((RNG *)(this_02))->RNG::RandomInt(8); - ehState = (uint)ehState._1_3_ << 8; + ehState = (*(undefined1 *)((char *)&(GHIDRA_UINT(ehState)) + 0x1)) << 8; guard_check_icall(); - if ((ANM2 *)&DAT_00000004 <= (uint)local_b0.y) { + if ((ANM2 *)&DAT_00000004 <= GHIDRA_UINT(local_b0.y)) { LAB_00660a66: ((Color *)(&tmpColor))->Color::Color(); fVar18 = local_e0.y; @@ -2057,8 +2057,8 @@ LAB_00660a66: break; } itemPool = (ItemPool *)((Game *)(g_game))->Game::GetItemPool(); - local_b8.y = choiceTable[(int)local_b0.y]; - bVar2 = ((ItemPool *)(itemPool))->ItemPool::RemoveTrinket((int)local_b8.y); + local_b8.y = choiceTable[GHIDRA_INT(local_b0.y)]; + bVar2 = ((ItemPool *)(itemPool))->ItemPool::RemoveTrinket(GHIDRA_INT(local_b8.y)); if (bVar2 == 0) goto LAB_00660a66; SoundEffects::PlayWithFartOverride(0xff,1.0,2,0,1.0); local_b0.y = (float)&pEVar15->_pos; @@ -2245,7 +2245,7 @@ void Entity_Slot::spawn_break_drops() uint dropTrinkets [6]; Game *game; - dropTrinkets[5] = __security_cookie ^ (uint)(dropTrinkets + 6); + dropTrinkets[5] = __security_cookie ^ GHIDRA_UINT((dropTrinkets + 6)); trinketOwnerRng = (RNG *)0x0; local_5c.y = (float)this; ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::RandomTrinketOwner(0x16,this->_initSeed,&trinketOwnerRng); @@ -2283,7 +2283,7 @@ void Entity_Slot::spawn_break_drops() dropRng = &this->_dropRNG; local_5c.y = (float)dropRng; uVar1 = ((RNG *)(dropRng))->RNG::RandomInt(4); - if (0 < (int)uVar1) { + if (0 < GHIDRA_INT(uVar1)) { do { uVar2 = ((RNG *)(dropRng))->RNG::Next(); Isaac::GetRandomPickupVelocity(&local_54,&this->_pos,1,&velocityRng); @@ -2299,7 +2299,7 @@ void Entity_Slot::spawn_break_drops() local_4c = dropRng; uVar1 = ((RNG *)(dropRng))->RNG::RandomInt(2); local_54.y = (float)(uVar1 + 1); - if (0 < (int)local_54.y) { + if (0 < GHIDRA_INT(local_54.y)) { do { tmpRng = trinketOwnerRng; uVar1 = ((RNG *)(dropRng))->RNG::RandomInt(2); @@ -2324,7 +2324,7 @@ void Entity_Slot::spawn_break_drops() ((Game *)(g_game))->Game::Spawn(5,10,&this->_pos,&local_70,(Entity *)0x0,0,uVar1); dropRng = local_4c; } - local_54.y = (float)((int)local_54.y + -1); + local_54.y = (float)(GHIDRA_INT(local_54.y) + -1); } while (local_54.y != 0.0); return; } @@ -2427,7 +2427,7 @@ LAB_00663f4c: ((RNG *)((RNG *)local_90))->RNG::game_constructor(this->_initSeed,0x1b); randomCount = (float)((RNG *)(dropRng))->RNG::RandomInt(4); fVar3 = 2.8026e-45; - if (2 < (int)randomCount) { + if (2 < GHIDRA_INT(randomCount)) { fVar3 = randomCount; } local_68.y = fVar3; @@ -2435,7 +2435,7 @@ LAB_00663f4c: if ((uVar1 != 0) && (isTrinketHeld = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(0x2a), isTrinketHeld != 0)) { - local_68.y = (float)((int)fVar3 + 1); + local_68.y = (float)(GHIDRA_INT(fVar3) + 1); } dropTrinkets[0] = 0x2d; dropTrinkets[1] = 0x2c; @@ -2447,10 +2447,10 @@ LAB_00663f4c: game = g_game; uVar1 = ((RNG *)((RNG *)local_90))->RNG::Next(); local_70.y = (float)PlayerManager::RandomTrinketOwner - (&game->_playerManager,dropTrinkets[(int)local_4c],uVar1, + (&game->_playerManager,dropTrinkets[GHIDRA_INT(local_4c)],uVar1, (RNG **)0x0); if ((Entity_Player *)local_70.y != (Entity_Player *)0x0) { - uVar1 = dropTrinkets[(int)local_4c]; + uVar1 = dropTrinkets[GHIDRA_INT(local_4c)]; isTrinketHeld = ((Entity_Player *)((Entity_Player *)local_70.y))->Entity_Player::HasTrinket(uVar1,0); if ((isTrinketHeld != 0) && (((uVar1 != 0x22 || @@ -2466,7 +2466,7 @@ LAB_00663f4c: } tmpRng = ((Entity_Player *)((Entity_Player *)local_70.y))->Entity_Player::GetTrinketRNG(uVar1); fVar3 = (float)((RNG *)(tmpRng))->RNG::RandomInt(100); - if ((uint)fVar3 < (uint)local_54.y) { + if (GHIDRA_UINT(fVar3) < GHIDRA_UINT(local_54.y)) { local_4c = (RNG *)0xa; switch(uVar1) { case 0x22: @@ -2489,18 +2489,18 @@ LAB_00663f4c: Isaac::GetRandomPickupVelocity(&pickupVelocity,slotPos,1,&velocityRng); tmpRng = ((Entity_Player *)((Entity_Player *)local_70.y))->Entity_Player::GetTrinketRNG(uVar1); uVar1 = ((RNG *)(tmpRng))->RNG::Next(); - ((Game *)(g_game))->Game::Spawn(5,(uint)local_4c,slotPos,&pickupVelocity,(Entity *)0x0,0,uVar1); + ((Game *)(g_game))->Game::Spawn(5,GHIDRA_UINT(local_4c),slotPos,&pickupVelocity,(Entity *)0x0,0,uVar1); goto LAB_00664266; } } } - local_4c = (RNG *)((int)local_4c + 1); + local_4c = (RNG *)(GHIDRA_INT(local_4c) + 1); } while (local_4c < 5); local_54.y = (float)&this->_pos; LAB_00664266: slotPos = &this->_pos; local_4c = (RNG *)0x0; - if (0 < (int)local_68.y) { + if (0 < GHIDRA_INT(local_68.y)) { tmpRng = trinketOwnerRng; do { ((RNG *)(dropRng))->RNG::Next(); @@ -2529,7 +2529,7 @@ LAB_00664266: ((Game *)(g_game))->Game::Spawn(5,10,slotPos,&heartVelocity,(Entity *)0x0,0,uVar1); uVar1 = ((RNG *)(dropRng))->RNG::RandomInt(2); if (uVar1 == 0) { - local_68.y = (float)((int)local_68.y - 1); + local_68.y = (float)(GHIDRA_INT(local_68.y) - 1); } } LAB_00664483: @@ -2539,7 +2539,7 @@ LAB_00664483: uVar1 = ((RNG *)(dropRng))->RNG::RandomInt(3); iVar4 = uVar1 + 1; if (0 < iVar4) { - local_70.y = (float)((int)local_5c.y + 0x33c); + local_70.y = (float)(GHIDRA_INT(local_5c.y) + 0x33c); do { uVar1 = ((RNG *)(dropRng))->RNG::Next(); Isaac::GetRandomPickupVelocity(&pickupVelocity,(Vector *)local_70.y,1,&velocityRng); @@ -2551,8 +2551,8 @@ LAB_00664483: } slotPos = (Vector *)local_54.y; } - local_4c = (RNG *)((int)local_4c + 1); - if ((int)local_68.y <= (int)local_4c) { + local_4c = (RNG *)(GHIDRA_INT(local_4c) + 1); + if (GHIDRA_INT(local_68.y) <= GHIDRA_INT(local_4c)) { return; } } while( true ); diff --git a/src/game/entity_tear.cpp b/src/game/entity_tear.cpp index 5ca8ea3..b7d9c28 100644 --- a/src/game/entity_tear.cpp +++ b/src/game/entity_tear.cpp @@ -7,13 +7,13 @@ BitSet128 * Entity_Tear::TearFlags(BitSet128 *outFlags) undefined4 uVar2; qword qVar3; - uVar1 = *(undefined4 *)((int)&(this->_tearFlags)._l + 4); + uVar1 = *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); qVar3 = (this->_tearFlags)._h; - uVar2 = *(undefined4 *)((int)&(this->_tearFlags)._h + 4); - *(int *)&outFlags->_l = (int)(this->_tearFlags)._l; - *(undefined4 *)((int)&outFlags->_l + 4) = uVar1; - *(int *)&outFlags->_h = (int)qVar3; - *(undefined4 *)((int)&outFlags->_h + 4) = uVar2; + uVar2 = *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); + *(int *)&outFlags->_l = GHIDRA_INT((this->_tearFlags)._l); + *(undefined4 *)(GHIDRA_INT(&outFlags->_l) + 4) = uVar1; + *(int *)&outFlags->_h = GHIDRA_INT(qVar3); + *(undefined4 *)(GHIDRA_INT(&outFlags->_h) + 4) = uVar2; return outFlags; } @@ -104,9 +104,9 @@ void Entity_Tear::Constructor() ((Entity *)((Entity *)this))->Entity::constructor(); *(undefined ***)this = IsaacRepentancePlus::Entity_Tear::vftable; *(undefined4 *)&(this->_tearFlags)._l = 0; - *(undefined4 *)((int)&(this->_tearFlags)._l + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) = 0; *(undefined4 *)&(this->_tearFlags)._h = 0; - *(undefined4 *)((int)&(this->_tearFlags)._h + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) = 0; (this->_continueVelocity).y = 0.0; (this->_continueVelocity).x = 0.0; (this->_hitList)._begin = (void *)0x0; @@ -121,9 +121,9 @@ void Entity_Tear::Constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x4a4)) = 0; local_8 = 6; ((ANM2 *)(&this->_tearHaloANM2))->ANM2::constructor(); - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; ((ANM2 *)(&this->_tearEffectANM2))->ANM2::constructor(); - local_8 = CONCAT31(local_8._1_3_,8); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),8); ((ANM2 *)(&this->_deadEyeANM2))->ANM2::constructor(); (this->_posDisplacement).y = 0.0; (this->_posDisplacement).x = 0.0; @@ -165,11 +165,11 @@ void Entity_Tear::Init(int type, int variant, int subType, uint initSeed) local_8 = 0xffffffff; puStack_c = &LAB_00af77c5; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&local_2c)[1]._size; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&local_2c)[1]._size); ExceptionList = &local_10; ((Entity *)((Entity *)this))->Entity::Init(type,variant,subType,initSeed); if (this->_config != (void *)0x0) { - ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)((int)this->_config + 0x74),1); + ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)(GHIDRA_INT(this->_config) + 0x74),1); } this->_entityGridCollisionClass = 4; this->_collisionDamage = 3.5; @@ -178,7 +178,7 @@ void Entity_Tear::Init(int type, int variant, int subType, uint initSeed) this->_fallingAccel = 0.0; this->_height = -23.0; this->_fallingSpeed = - ((float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) * 2.3283064e-10 + ((float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283064e-10 - 0.5) * 0.2; heightOffsetY = get_height_offset_y(this,-23.0); game = g_game; @@ -195,9 +195,9 @@ void Entity_Tear::Init(int type, int variant, int subType, uint initSeed) this->_knockbackMultiplier = 1.7; this->_maxHitPoints = 0.0; *(undefined4 *)&(this->_tearFlags)._l = 0; - *(undefined4 *)((int)&(this->_tearFlags)._l + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) = 0; *(undefined4 *)&(this->_tearFlags)._h = 0; - *(undefined4 *)((int)&(this->_tearFlags)._h + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) = 0; this->_waitFrames = 0; (this->_continueVelocity).x = g_vectorZero.x; (this->_continueVelocity).y = g_vectorZero.y; @@ -276,20 +276,20 @@ void Entity_Tear::Init(int type, int variant, int subType, uint initSeed) bulletAnm2Path._buf[1] = '\0'; bulletAnm2Path._buf[2] = '\0'; bulletAnm2Path._buf[3] = '\0'; - bulletAnm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(bulletAnm2Path._buf) + 0x0)) = std::_Allocate(0x30); bulletAnm2Path._size = 0x20; bulletAnm2Path._capacity = 0x2f; - builtin_strncpy((char *)bulletAnm2Path._buf._0_4_,"gfx/promo/gfuel/bullet tear.anm2",0x21); + builtin_strncpy((*(undefined4 *)((char *)&((char *)bulletAnm2Path._buf) + 0x0)),"gfx/promo/gfuel/bullet tear.anm2",0x21); local_8 = 0; ((ANM2 *)(&this->_sprite))->ANM2::Load(&bulletAnm2Path,1); local_8 = 0xffffffff; if (0xf < bulletAnm2Path._capacity) { uVar1 = bulletAnm2Path._capacity + 1; - pcVar3 = (char *)bulletAnm2Path._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)bulletAnm2Path._buf) + 0x0)); if (0xfff < uVar1) { - pcVar3 = *(char **)(bulletAnm2Path._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(bulletAnm2Path._buf) + 0x0)) + -4); uVar1 = bulletAnm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(bulletAnm2Path._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(bulletAnm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -311,20 +311,20 @@ void Entity_Tear::Init(int type, int variant, int subType, uint initSeed) local_2c._buf[1] = '\0'; local_2c._buf[2] = '\0'; local_2c._buf[3] = '\0'; - local_2c._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) = std::_Allocate(0x20); local_2c._size = 0x1c; local_2c._capacity = 0x1f; - builtin_strncpy((char *)local_2c._buf._0_4_,"gfx/promo/gfuel/missile.anm2",0x1d); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_2c._buf) + 0x0)),"gfx/promo/gfuel/missile.anm2",0x1d); local_8 = 1; ((ANM2 *)(&this->_sprite))->ANM2::Load(&local_2c,1); local_8 = 0xffffffff; if (0xf < local_2c._capacity) { uVar1 = local_2c._capacity + 1; - pcVar3 = (char *)local_2c._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)local_2c._buf) + 0x0)); if (0xfff < uVar1) { - pcVar3 = *(char **)(local_2c._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) + -4); uVar1 = local_2c._capacity + 0x24; - if ((char *)0x1f < (char *)(local_2c._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -332,8 +332,8 @@ void Entity_Tear::Init(int type, int variant, int subType, uint initSeed) operator_delete(pcVar3,uVar1); } local_2c._size = 0; - local_2c._capacity = (uint)&DAT_0000000f; - local_2c._buf._0_4_ = local_2c._buf._0_4_ & 0xffffff00; + local_2c._capacity = GHIDRA_UINT(&DAT_0000000f); + (*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) = (*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) & 0xffffff00; layerIndex = (byte *)0x1; } uVar1 = g_graphicsManager_flags; @@ -400,7 +400,7 @@ void Entity_Tear::ClearReferences() if (*refSlot != (EntityPtr)0x0) { EVar1 = this->_linkNext; if (EVar1 != (EntityPtr)0x0) { - if (*(int *)((int)*refSlot + 0x28) == 2) { + if (*(int *)(GHIDRA_INT(*refSlot) + 0x28) == 2) { FUN_0067dac0(&this->_linkNext); EVar1 = this->_linkNext; } @@ -422,10 +422,10 @@ void Entity_Tear::ClearReferences() if (this->_attachedEffect != (EntityPtr)0x0) { (**(code **)(*(int *)this->_attachedEffect + 0x28))(); } - if (((((uint)(this->_tearFlags)._l & (uint)g_tearFlagLudovico._l) != 0 || - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagLudovico._l._4_4_) != 0) || - (((uint)(this->_tearFlags)._h & (uint)g_tearFlagLudovico._h) != 0 || - (*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagLudovico._h._4_4_) != 0)) && + if ((((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagLudovico._l)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagLudovico._l) + 0x4))) != 0) || + ((GHIDRA_UINT((this->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagLudovico._h)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagLudovico._h) + 0x4))) != 0)) && (EVar1 = this->_child, EVar1 != (EntityPtr)0x0)) { childType = *(int *)((char *)EVar1 + 0x28); while (childType == 2) { @@ -486,11 +486,11 @@ void Entity_Tear::update_wiggle() float dirY; frameParity = g_manager->_framecount & 0x80000001; - if ((int)frameParity < 0) { + if (GHIDRA_INT(frameParity) < 0) { frameParity = (frameParity - 1 | 0xfffffffe) + 1; } dirY = (this->_velocity).y; - fVar1 = (float)(g_game->_frameCount - this->_spawnFrame) + (float)(int)frameParity * 0.5; + fVar1 = (float)(g_game->_frameCount - this->_spawnFrame) + (float)GHIDRA_INT(frameParity) * 0.5; dirX = (this->_velocity).x; if (ABS(dirX) <= ABS(dirY)) { fVar1 = fVar1 * 0.2; @@ -544,35 +544,35 @@ void Entity_Tear::play_fire_sound() } LAB_00666e14: manager = g_manager; - local_10 = *(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagHorn._h._4_4_; - tearFlagsWord2 = (uint)(this->_tearFlags)._h; - if ((((uint)(this->_tearFlags)._l & (uint)g_tearFlagHorn._l) != 0 || - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagHorn._l._4_4_) != 0) || - ((tearFlagsWord2 & (uint)g_tearFlagHorn._h) != 0 || local_10 != 0)) { + local_10 = *(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagHorn._h) + 0x4)); + tearFlagsWord2 = GHIDRA_UINT((this->_tearFlags)._h); + if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagHorn._l)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagHorn._l) + 0x4))) != 0) || + ((tearFlagsWord2 & GHIDRA_UINT(g_tearFlagHorn._h)) != 0 || local_10 != 0)) { soundId = 0x364; seed_fart_sound_override(&soundId); ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(soundId,1.0,2,0,1.0,0.0); - tearFlagsWord2 = (uint)(this->_tearFlags)._h; + tearFlagsWord2 = GHIDRA_UINT((this->_tearFlags)._h); } - local_10 = (uint)(this->_tearFlags)._l; - if (((local_10 & (uint)g_tearFlagOrbit._l) != 0 || - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagOrbit._l._4_4_) != 0) || - ((tearFlagsWord2 & (uint)g_tearFlagOrbit._h) != 0 || - (*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagOrbit._h._4_4_) != 0)) { + local_10 = GHIDRA_UINT((this->_tearFlags)._l); + if (((local_10 & GHIDRA_UINT(g_tearFlagOrbit._l)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagOrbit._l) + 0x4))) != 0) || + ((tearFlagsWord2 & GHIDRA_UINT(g_tearFlagOrbit._h)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagOrbit._h) + 0x4))) != 0)) { if (this->_fallingSpeed < 0.0) { this->_fallingSpeed = this->_fallingSpeed * 3.0; } this->_isHovering = 1; } - tearFlagsWord2 = (uint)(this->_tearFlags)._h; - if (((local_10 & (uint)g_tearFlagHydrobounce._l) == 0 && - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagHydrobounce._l._4_4_) == 0) && - ((tearFlagsWord2 & (uint)g_tearFlagHydrobounce._h) == 0 && - (*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagHydrobounce._h._4_4_) == 0)) { - if (((local_10 & (uint)g_tearFlagBoomerang._l) != 0 || - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagBoomerang._l._4_4_) != 0) || - ((tearFlagsWord2 & (uint)g_tearFlagBoomerang._h) != 0 || - (*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagBoomerang._h._4_4_) != 0)) { + tearFlagsWord2 = GHIDRA_UINT((this->_tearFlags)._h); + if (((local_10 & GHIDRA_UINT(g_tearFlagHydrobounce._l)) == 0 && + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagHydrobounce._l) + 0x4))) == 0) && + ((tearFlagsWord2 & GHIDRA_UINT(g_tearFlagHydrobounce._h)) == 0 && + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagHydrobounce._h) + 0x4))) == 0)) { + if (((local_10 & GHIDRA_UINT(g_tearFlagBoomerang._l)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagBoomerang._l) + 0x4))) != 0) || + ((tearFlagsWord2 & GHIDRA_UINT(g_tearFlagBoomerang._h)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagBoomerang._h) + 0x4))) != 0)) { this->_fallingSpeed = this->_fallingSpeed * 0.5; this->_fallingAccel = (this->_fallingAccel + 0.08) * 0.25 - 0.08; } @@ -1495,7 +1495,7 @@ void Entity_Tear::Update() ehState = 0xffffffff; puStack_18 = &LAB_00af78c4; prevExceptionList = ExceptionList; - stackCookie = __security_cookie ^ (uint)(local_7c + 0x6c); + stackCookie = __security_cookie ^ GHIDRA_UINT((local_7c + 0x6c)); ExceptionList = &prevExceptionList; local_87c = (EntityPtr)0x0; local_8f8 = (EntityPtr)0x0; @@ -1509,8 +1509,8 @@ void Entity_Tear::Update() puStack_20 = puVar3; tearFlagsPtr = &this->_tearFlags; pBVar6 = BitSet128::operator_and(&ludovicoMask,tearFlagsPtr,&g_tearFlagLudovico); - if (((((int)pBVar6->_l != 0 || *(int *)((int)&pBVar6->_l + 4) != 0) || - ((int)pBVar6->_h != 0 || *(int *)((int)&pBVar6->_h + 4) != 0)) && ((this->_subtype & 4) != 0) + if ((((GHIDRA_INT(pBVar6->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar6->_l) + 4) != 0) || + (GHIDRA_INT(pBVar6->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar6->_h) + 4) != 0)) && ((this->_subtype & 4) != 0) ) && (this->_parent == (EntityPtr)0x0)) goto LAB_006684e5; EVar14 = this->_spawnerEntity; local_8d8 = (EntityPtr)this; @@ -1651,12 +1651,12 @@ LAB_0066757c: local_8fc = (EntityPtr)0x41700000; local_900 = 0.4; if (bVar4 != 0) { - local_888._0_1_ = this->_dead != 0; + (*(undefined1 *)((char *)&(local_888) + 0x0)) = this->_dead != 0; pBVar8 = BitSet128::operator_and(&ludovicoMask3,pBVar6,&g_tearFlagLudovico); bVar4 = ((BitSet128 *)(pBVar8))->BitSet128::IsNonZero(); if (bVar4 != 0) { bVar4 = ((Entity *)((Entity *)this))->Entity::IsFrame(5,this->_index); - local_888 = (EntityPtr)((uint)local_888 & 0xff); + local_888 = (EntityPtr)(GHIDRA_UINT(local_888) & 0xff); if (bVar4 != 0) { local_888 = (EntityPtr)0x1; } @@ -1666,7 +1666,7 @@ LAB_0066757c: bVar4 = ((BitSet128 *)(pBVar8))->BitSet128::IsNonZero(); if ((bVar4 != 0) || (this->_variant == 4)) goto LAB_006677ce; } - if (local_888._0_1_ != '\0') { + if ((*(undefined1 *)((char *)&(local_888) + 0x0)) != '\0') { greenCreepPos.y = (this->_pos).y; greenCreepPos.x = (this->_pos).x; room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); @@ -1750,9 +1750,9 @@ LAB_006677ce: } } } - local_898 = (EntityPtr)((int)local_898 + 1); + local_898 = (EntityPtr)(GHIDRA_INT(local_898) + 1); EVar14 = (EntityPtr)((EntityList *)((EntityList *)techZeroQuery))->EntityList::Size(); - } while ((uint)local_898 < (uint)EVar14); + } while (GHIDRA_UINT(local_898) < GHIDRA_UINT(EVar14)); if (((local_8a0 != (EntityPtr)0x0) && (*(Entity_Tear **)((char *)local_8a0 + 0x48c) != this)) && (local_8d8 != (EntityPtr)0x0)) { pVVar9 = ((Entity *)((Entity *)local_8a0))->Entity::Position(&entityPos2); @@ -1966,18 +1966,18 @@ LAB_00668237: local_8e4 = (EntityPtr)0xc1200000; local_8cc = (EntityPtr)0xc1a00000; local_904 = (EntityPtr)0x3e800000; - auVar31._0_12_ = ZEXT812(0xc1be0000); - auVar31._12_4_ = 0; - local_8b0 = auVar31._0_4_; + (*(undefined1 *)((char *)&(auVar31) + 0x0)) = ZEXT812(0xc1be0000); + (*(undefined4 *)((char *)&(auVar31) + 0xc)) = 0; + local_8b0 = (*(undefined4 *)((char *)&(auVar31) + 0x0)); if ((this->_dead == 0) || (this->_variant == 9)) goto LAB_0066a370; if (this->_variant == 0x28) { rng_pair_init(&local_e18); - local_e18._type = (uint)this->_subtype >> 0x10; + local_e18._type = GHIDRA_UINT(this->_subtype) >> 0x10; local_e18._variant = this->_subtype & 0xffff; local_e18._spawnSeed = this->_initSeed; bVar4 = ((Entity *)((Entity *)this))->Entity::HasEntityFlags(0x40000); - local_e18._varData = (int)(bVar4 != 0); - local_e18._state = (int)this->_health; + local_e18._varData = GHIDRA_INT((bVar4 != 0)); + local_e18._state = GHIDRA_INT(this->_health); Entity::DestroyRockGridAt(pVVar9,&local_e18,(Entity *)this,this->_tearIdx); if (this->_spawnerEntity != (EntityPtr)0x0) { bVar4 = ((Entity *)((Entity *)this->_spawnerEntity))->Entity::is_player(); @@ -1989,15 +1989,15 @@ LAB_00668237: iVar7 = Isaac::Random(3); EVar14 = (EntityPtr)(iVar7 + 1); local_8e4 = EVar14; - if (0 < (int)EVar14) { + if (0 < GHIDRA_INT(EVar14)) { do { local_8e4 = (EntityPtr) Entity_Player::AddWisp((Entity_Player *)local_904,0x25c,pVVar9,0,1); if (local_8e4 != (EntityPtr)0x0) { ((Entity *)((Entity *)local_8e4))->Entity::SetTargetPosition(*pVVar9); - (**(code **)((int)*(float *)local_8e4 + 0xc))(); + (**(code **)(GHIDRA_INT(*(float *)local_8e4) + 0xc))(); } - EVar14 = (EntityPtr)((int)EVar14 + -1); + EVar14 = (EntityPtr)(GHIDRA_INT(EVar14) + -1); } while (EVar14 != (EntityPtr)0x0); this = tear; } @@ -2010,7 +2010,7 @@ LAB_006684e5: ExceptionList = prevExceptionList; return; } - local_888 = (EntityPtr)((uint)local_888 & 0xffffff00); + local_888 = (EntityPtr)(GHIDRA_UINT(local_888) & 0xffffff00); pBVar6 = BitSet128::operator_and(&hydrobounceMask2,&this->_tearFlags,&g_tearFlagHydrobounce); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if ((bVar4 != 0) && (this->_deathFlags == 4)) { @@ -2040,18 +2040,18 @@ LAB_006684e5: this->_dead = 0; in_stack_ffffd9fc = *(Vector **)&(this->_tearFlags)._l; qVar2 = (this->_tearFlags)._h; - local_888._0_1_ = 1; - flags_00._h._1_1_ = (char)(qVar2 >> 8); - flags_00._0_9_ = *(unkbyte9 *)&this->_tearFlags; - flags_00._h._2_2_ = (short)(qVar2 >> 0x10); - flags_00._h._4_4_ = *(undefined4 *)((int)&(this->_tearFlags)._h + 4); + (*(undefined1 *)((char *)&(local_888) + 0x0)) = 1; + (*(undefined1 *)((char *)&(flags_00._h) + 0x1)) = (char)(qVar2 >> 8); + (*(undefined1 *)((char *)&(flags_00) + 0x0)) = *(unkbyte9 *)&this->_tearFlags; + (*(undefined2 *)((char *)&(flags_00._h) + 0x2)) = (short)(qVar2 >> 0x10); + (*(undefined4 *)((char *)&(flags_00._h) + 0x4)) = *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); tear_flags_area_apply (pVVar9,(Entity *)this,this->_size + 20.0,this->_collisionDamage * (float)local_904, flags_00); } LAB_0066863a: local_910 = 1.0; - auVar31 = ZEXT416((uint)oneConst); + auVar31 = ZEXT416(GHIDRA_UINT(oneConst)); iVar7 = this->_variant; local_8c8 = (ANM2 *)0x0; local_898 = (EntityPtr)0x0; @@ -2080,7 +2080,7 @@ LAB_0066863a: case 0x30: if (local_900 <= this->_fScale) { if (0.8 <= this->_fScale) { - auVar31 = ZEXT416((uint)oneConst); + auVar31 = ZEXT416(GHIDRA_UINT(oneConst)); if (this->_height <= -5.0) { local_88c = (EntityPtr)0x96; local_8c8 = (ANM2 *)0xc; @@ -2136,18 +2136,18 @@ LAB_0066863a: local_88c = (EntityPtr)0xb5; local_8c4 = (BitSet128 *)halfConst; fVar27 = random_float(); - auVar31._0_4_ = (EntityPtr)(fVar27 * 0.2 + oneConst); - auVar31._4_12_ = extraout_var; - local_8a0 = auVar31._0_4_; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)(fVar27 * 0.2 + oneConst); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var; + local_8a0 = (*(undefined4 *)((char *)&(auVar31) + 0x0)); break; case 8: local_8c8 = (ANM2 *)&DAT_00000014; local_88c = (EntityPtr)0x31; local_8c4 = (BitSet128 *)pointThreeConst; fVar27 = random_float(); - auVar31._0_4_ = (EntityPtr)(fVar27 * 0.1 + 0.95); - auVar31._4_12_ = extraout_var_01; - local_8a0 = auVar31._0_4_; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)(fVar27 * 0.1 + 0.95); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_01; + local_8a0 = (*(undefined4 *)((char *)&(auVar31) + 0x0)); break; case 0xd: case 0x17: @@ -2162,9 +2162,9 @@ LAB_0066863a: local_8c4 = (BitSet128 *)oneConst; fVar27 = random_float(); local_8c8 = (ANM2 *)0x61; - auVar31._0_4_ = (EntityPtr)(fVar27 * pointSixConst + 0.8); - auVar31._4_12_ = extraout_var_03; - local_8a0 = auVar31._0_4_; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)(fVar27 * pointSixConst + 0.8); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_03; + local_8a0 = (*(undefined4 *)((char *)&(auVar31) + 0x0)); break; } local_8c4 = (BitSet128 *)zeroConst; @@ -2184,9 +2184,9 @@ LAB_00668a9b: local_88c = (EntityPtr)0x8a; fVar27 = random_float(); local_8c8 = (ANM2 *)0x61; - auVar31._0_4_ = (EntityPtr)(fVar27 * halfConst + 2.0); - auVar31._4_12_ = extraout_var_04; - local_8a0 = auVar31._0_4_; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)(fVar27 * halfConst + 2.0); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_04; + local_8a0 = (*(undefined4 *)((char *)&(auVar31) + 0x0)); break; case 0x12: local_8c0 = (EntityPtr)this->_height; @@ -2195,9 +2195,9 @@ LAB_00668a9b: local_8b4 = (EntityPtr)(fVar27 * (float)local_890 + 2.0); iVar7 = Isaac::Random(2); iVar7 = iVar7 + 2; - uVar37 = local_8c0._0_1_; - uVar38 = local_8c0._1_1_; - uVar39 = local_8c0._2_2_; + uVar37 = (*(undefined1 *)((char *)&(local_8c0) + 0x0)); + uVar38 = (*(undefined1 *)((char *)&(local_8c0) + 0x1)); + uVar39 = (*(undefined2 *)((char *)&(local_8c0) + 0x2)); variant = 0x55; goto LAB_006689b3; case 0x14: @@ -2207,9 +2207,9 @@ LAB_00668a9b: local_8b4 = (EntityPtr)(fVar27 * (float)local_890 + 2.0); iVar7 = Isaac::Random(2); iVar7 = iVar7 + 4; - uVar37 = local_8c0._0_1_; - uVar38 = local_8c0._1_1_; - uVar39 = local_8c0._2_2_; + uVar37 = (*(undefined1 *)((char *)&(local_8c0) + 0x0)); + uVar38 = (*(undefined1 *)((char *)&(local_8c0) + 0x1)); + uVar39 = (*(undefined2 *)((char *)&(local_8c0) + 0x2)); variant = 0x62; LAB_006689b3: in_stack_ffffd9fc = (Vector *)local_8b4; @@ -2220,9 +2220,9 @@ LAB_006689b3: local_88c = (EntityPtr)0x8a; local_8c4 = (BitSet128 *)pointThreeConst; fVar27 = random_float(); - auVar31._0_4_ = (EntityPtr)(fVar27 * halfConst + 2.0); - auVar31._4_12_ = extraout_var_02; - local_8a0 = auVar31._0_4_; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)(fVar27 * halfConst + 2.0); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_02; + local_8a0 = (*(undefined4 *)((char *)&(auVar31) + 0x0)); break; case 0x1d: local_8c0 = (EntityPtr)this->_height; @@ -2235,17 +2235,17 @@ LAB_006689b3: local_88c = (EntityPtr)0x8a; local_8c4 = (BitSet128 *)pointThreeConst; fVar27 = random_float(); - auVar31._0_4_ = (EntityPtr)(fVar27 * halfConst + (float)local_890); - auVar31._4_12_ = extraout_var_00; - local_8a0 = auVar31._0_4_; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)(fVar27 * halfConst + (float)local_890); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_00; + local_8a0 = (*(undefined4 *)((char *)&(auVar31) + 0x0)); break; case 0x2a: local_88c = (EntityPtr)0x1e7; local_8c4 = (BitSet128 *)Math::clamp(halfConst,oneConst,this->_fScale * 1.4); - auVar31._0_4_ = (EntityPtr)Math::clamp(0.95,1.8,oneConst / this->_fScale); - auVar31._4_12_ = extraout_var_05; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)Math::clamp(0.95,1.8,oneConst / this->_fScale); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_05; local_8c8 = (ANM2 *)0x91; - local_8a0 = auVar31._0_4_; + local_8a0 = (*(undefined4 *)((char *)&(auVar31) + 0x0)); room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); bVar4 = ((Room *)(room))->Room::IsPositionInRoom(pVVar9,-20.0); if (bVar4 != 0) { @@ -2257,21 +2257,21 @@ LAB_006689b3: uStack_9e8 = 0x10; uStack_b9c = 1; fVar27 = random_float(); - auVar31._0_4_ = (EntityPtr)(fVar27 * halfConst + oneConst); - auVar31._4_12_ = extraout_var_06; - particleCount = (int)(this->_fScale * 4.0 * (float)auVar31._0_4_); + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)(fVar27 * halfConst + oneConst); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_06; + particleCount = GHIDRA_INT((this->_fScale * 4.0 * (*(undefined4 *)((char *)&((float)auVar31) + 0x0)))); std::max(); pEVar19 = (EntityPtr *)std::min(); local_89c = *pEVar19; - if (0 < (int)local_89c) { + if (0 < GHIDRA_INT(local_89c)) { do { fVar27 = random_float(); Vector::FromAngle(&particleDir,fVar27 * 360.0); fVar27 = random_float(); particleSpeed = fVar27 * 2.0 + oneConst; - auVar31._0_4_ = (EntityPtr)random_float(); - auVar31._4_12_ = extraout_var_07; - particleDist = (float)auVar31._0_4_; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)random_float(); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_07; + particleDist = (*(undefined4 *)((char *)&((float)auVar31) + 0x0)); pVVar9 = ((Vector *)(&particleDir))->Vector::__mul(&VStack_15a0,&particleDist); pVVar9 = ((Vector *)(pVVar9))->Vector::__mul(&VStack_15a8,&this->_size); ((Vector *)(&this->_pos))->Vector::__add(&particlePos,pVVar9); @@ -2282,7 +2282,7 @@ LAB_006689b3: in_stack_ffffd9fc = (Vector *)0xffffffff; pEVar11->SetColor(); pEVar11->Update(); - local_89c = (EntityPtr)((int)local_89c + -1); + local_89c = (EntityPtr)(GHIDRA_INT(local_89c) + -1); } while (local_89c != (EntityPtr)0x0); local_89c = (EntityPtr)0x0; } @@ -2303,7 +2303,7 @@ LAB_006689b3: local_8c8 = (ANM2 *)0xc; local_8a0 = (EntityPtr)(fVar27 * halfConst + 2.0); local_898 = (EntityPtr)((this->_variant == 0x2c) + 0x14); - auVar31 = ZEXT416((uint)pointThreeConst); + auVar31 = ZEXT416(GHIDRA_UINT(pointThreeConst)); goto LAB_00668f76; case 0x2f: local_88c = (EntityPtr)0x31; @@ -2315,7 +2315,7 @@ LAB_00668eec: local_8c8 = (ANM2 *)0xc; local_898 = (EntityPtr)0x16; local_8a0 = (EntityPtr)(fVar27 * halfConst + 2.0); - auVar31 = ZEXT416((uint)pointThreeConst); + auVar31 = ZEXT416(GHIDRA_UINT(pointThreeConst)); goto LAB_00668f76; case 0x32: local_88c = (EntityPtr)0x1e; @@ -2323,9 +2323,9 @@ LAB_00668eec: local_8c8 = (ANM2 *)0x2; local_898 = (EntityPtr)0x2; local_8a0 = (EntityPtr)(fVar27 * halfConst + 1.5); - auVar31 = ZEXT416((uint)pointSixConst); + auVar31 = ZEXT416(GHIDRA_UINT(pointSixConst)); LAB_00668f76: - local_8c4 = auVar31._0_4_; + local_8c4 = (*(undefined4 *)((char *)&(auVar31) + 0x0)); } pVVar9 = &this->_pos; pBVar6 = BitSet128::operator_and(&explosiveMask4,&this->_tearFlags,&g_tearFlagExplosive); @@ -2350,7 +2350,7 @@ LAB_00668fe9: else { local_89c = (EntityPtr)0x420c0000; } - if (local_888._0_1_ != '\0') { + if ((*(undefined1 *)((char *)&(local_888) + 0x0)) != '\0') { local_89c = (EntityPtr)((float)local_89c * halfConst); } local_8b4 = (EntityPtr)0x4; @@ -2368,10 +2368,10 @@ LAB_00668fe9: } pfVar16 = (float *)std::max(); local_910 = *pfVar16 / 60.0; - in_stack_ffffd9fc = *(Vector **)((int)&(this->_tearFlags)._h + 4); - auVar31 = ZEXT416((uint)local_89c); + in_stack_ffffd9fc = *(Vector **)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); + auVar31 = ZEXT416(GHIDRA_UINT(local_89c)); ((Game *)(g_game))->Game::BombDamage(pVVar9,(float)local_89c,*pfVar16,1,(Entity *)this,this->_tearFlags, - (ulonglong)(uint)local_8b4,0); + (ulonglong)GHIDRA_UINT(local_8b4),0); pBVar6 = BitSet128::operator_and(&poisonMask,&this->_tearFlags,&g_tearFlagPoison); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { @@ -2379,9 +2379,9 @@ LAB_00668fe9: ((Game *)(g_game))->Game::Spawn(1000,7,pVVar9,&g_vectorZero,(Entity *)0x0,0,uVar10); pEVar11 = (Entity *)__RTDynamicCast(); fVar27 = random_float(); - auVar31._0_4_ = (EntityPtr)((fVar27 + oneConst) * local_910); - auVar31._4_12_ = extraout_var_08; - pVVar9 = ((Vector *)(&local_15b8))->Vector::Vector((float)auVar31._0_4_,(float)auVar31._0_4_); + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)((fVar27 + oneConst) * local_910); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_08; + pVVar9 = ((Vector *)(&local_15b8))->Vector::Vector((*(undefined4 *)((char *)&((float)auVar31) + 0x0)),(*(undefined4 *)((char *)&((float)auVar31) + 0x0))); ((Entity *)(pEVar11))->Entity::SetSpriteScale(pVVar9); pcVar1 = *(code **)(*(int *)pEVar11 + 0x3c); ((Color *)())->Color::Color(); @@ -2407,18 +2407,18 @@ LAB_00668fe9: local_8c8 = (ANM2 *)0x0; } pBVar8 = local_8c4; - if ((local_888._0_1_ != '\0') && (local_8c8 != (ANM2 *)0x1)) { + if (((*(undefined1 *)((char *)&(local_888) + 0x0)) != '\0') && (local_8c8 != (ANM2 *)0x1)) { pBVar8 = (BitSet128 *)((float)local_8c4 * halfConst); bVar25 = local_8c8 == (ANM2 *)&DAT_0000000b; local_8c8 = (ANM2 *)&DAT_0000000e; - local_898._1_3_ = 0; - local_898._0_1_ = bVar25; + (*(undefined1 *)((char *)&(local_898) + 0x1)) = 0; + (*(undefined1 *)((char *)&(local_898) + 0x0)) = bVar25; } if (local_88c != (EntityPtr)0x0) { - auVar31 = ZEXT416((uint)local_8a0); + auVar31 = ZEXT416(GHIDRA_UINT(local_8a0)); in_stack_ffffd9fc = &this->_pos; SoundEffects::PlayWithFartOverride2 - ((int)local_88c,(int)in_stack_ffffd9fc,2,0,(float)local_8a0,(float)pBVar8); + (GHIDRA_INT(local_88c),GHIDRA_INT(in_stack_ffffd9fc),2,0,(float)local_8a0,(float)pBVar8); } pBVar8 = BitSet128::operator_and(&quadsplitMask,pBVar6,&g_tearFlagQuadsplit); bVar4 = ((BitSet128 *)(pBVar8))->BitSet128::IsNonZero(); @@ -2427,9 +2427,9 @@ LAB_00668fe9: pVVar9 = &this->_velocity; local_88c = (EntityPtr)pVVar9; local_8c0 = (EntityPtr)((Vector *)(pVVar9))->Vector::LengthSquared(); - auVar31._0_12_ = ZEXT812(0x3dcccccd); - auVar31._12_4_ = 0; - if (auVar31._0_4_ <= (float)local_8c0) { + (*(undefined1 *)((char *)&(auVar31) + 0x0)) = ZEXT812(0x3dcccccd); + (*(undefined4 *)((char *)&(auVar31) + 0xc)) = 0; + if ((*(undefined4 *)((char *)&(auVar31) + 0x0)) <= (float)local_8c0) { tearSpeed = ((Vector *)(pVVar9))->Vector::Length(); pfVar16 = &tearSpeed; } @@ -2441,14 +2441,14 @@ LAB_00668fe9: local_8a0 = (EntityPtr)0x0; do { ((EntityPtr *)((EntityPtr *)&splitVel))->EntityPtr::clear(); - if ((uint)local_8a0 < 2) { + if (GHIDRA_UINT(local_8a0) < 2) { pVVar9 = &quadsplitVel; } else { pVVar9 = ((Vector *)(&local_15c8))->Vector::Vector(quadsplitVel.y,-quadsplitVel.x); } ((Vector *)(&splitVel))->Vector::operator_assign(pVVar9); - if (((uint)local_8a0 & 1) != 0) { + if ((GHIDRA_UINT(local_8a0) & 1) != 0) { pVVar9 = ((Vector *)(&splitVel))->Vector::__unm(&negated); ((Vector *)(&splitVel))->Vector::operator_assign(pVVar9); } @@ -2461,7 +2461,7 @@ LAB_00668fe9: EVar14 = this->_spawnerEntity; pVVar9 = ((Vector *)(tearPos))->Vector::__sub(&local_15d8,(Vector *)local_88c); spawnedTear = tear; - ((Game *)(g_game))->Game::Spawn(tear->_type,(uint)local_8c0,pVVar9,&splitVel,(Entity *)EVar14,0,uVar10); + ((Game *)(g_game))->Game::Spawn(tear->_type,GHIDRA_UINT(local_8c0),pVVar9,&splitVel,(Entity *)EVar14,0,uVar10); EVar14 = (EntityPtr)__RTDynamicCast(); local_89c = EVar14; if (local_8b4 == (EntityPtr)0x0) { @@ -2469,7 +2469,7 @@ LAB_00668fe9: } else { FUN_005cd770(); - EVar28 = auVar31._0_4_; + EVar28 = (*(undefined4 *)((char *)&(auVar31) + 0x0)); } EVar28 = (EntityPtr)((float)EVar28 * halfConst); ((Entity_Projectile *)((Entity_Projectile *)EVar14))->Entity_Projectile::SetHeight((float)EVar28); @@ -2506,7 +2506,7 @@ LAB_00668fe9: pBVar6 = BitSet128::operator_and(&andResult7,pBVar6,local_8c4); pBVar6 = BitSet128::operator_and(&andResult8,pBVar6,(BitSet128 *)local_8ac); BitSet128::operator_and(&inheritedFlags3,pBVar6,(BitSet128 *)local_87c); - if (local_888._0_1_ != '\0') { + if ((*(undefined1 *)((char *)&(local_888) + 0x0)) != '\0') { ((BitSet128 *)(&g_tearFlagExplosive))->BitSet128::__bnot(¬Explosive); FUN_005cd430(); } @@ -2515,15 +2515,15 @@ LAB_00668fe9: FUN_00444c70(); this = tear; (**(code **)(*(int *)EVar14 + 0x40))(); - flags._l._4_4_ = inheritedFlags3._l._4_4_; - flags._l._0_4_ = (undefined4)inheritedFlags3._l; - flags._h._0_4_ = (undefined4)inheritedFlags3._h; - flags._h._4_1_ = (char)inheritedFlags3._h._4_4_; - flags._h._5_1_ = (char)((uint)inheritedFlags3._h._4_4_ >> 8); - flags._h._6_2_ = (short)((uint)inheritedFlags3._h._4_4_ >> 0x10); + (*(undefined4 *)((char *)&(flags._l) + 0x4)) = (*(undefined4 *)((char *)&(inheritedFlags3._l) + 0x4)); + (*(undefined4 *)((char *)&(flags._l) + 0x0)) = (undefined4)inheritedFlags3._l; + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = (undefined4)inheritedFlags3._h; + (*(undefined1 *)((char *)&(flags._h) + 0x4)) = (*(undefined4 *)((char *)&((char)inheritedFlags3._h) + 0x4)); + (*(undefined1 *)((char *)&(flags._h) + 0x5)) = (char)((*(undefined4 *)((char *)&(GHIDRA_UINT(inheritedFlags3._h)) + 0x4)) >> 8); + (*(undefined2 *)((char *)&(flags._h) + 0x6)) = (short)((*(undefined4 *)((char *)&(GHIDRA_UINT(inheritedFlags3._h)) + 0x4)) >> 0x10); SetTearFlags((Entity_Tear *)EVar14,flags); fVar27 = this->_fScale * pointSixConst; - auVar31 = ZEXT416((uint)fVar27); + auVar31 = ZEXT416(GHIDRA_UINT(fVar27)); SetScale((Entity_Tear *)EVar14,fVar27); pcVar1 = *(code **)(*(int *)EVar14 + 0x3c); ((Sprite *)((Sprite *)&this->_sprite))->Sprite::Color(); @@ -2532,14 +2532,14 @@ LAB_00668fe9: EVar14 = local_89c; ((Entity *)((Entity *)local_89c))->Entity::SetParent((Entity *)this->_parent); (**(code **)(*(int *)EVar14 + 0xc))(); - local_8a0 = (EntityPtr)((int)local_8a0 + 1); - } while ((int)local_8a0 < 4); + local_8a0 = (EntityPtr)(GHIDRA_INT(local_8a0) + 1); + } while (GHIDRA_INT(local_8a0) < 4); pBVar6 = &this->_tearFlags; } pBVar8 = BitSet128::operator_and(&burstsplitMask,pBVar6,&g_tearFlagBurstsplit); bVar4 = ((BitSet128 *)(pBVar8))->BitSet128::IsNonZero(); if (bVar4 != 0) { - fire_split_projectiles(this,local_888._0_1_); + fire_split_projectiles(this,(*(undefined1 *)((char *)&(local_888) + 0x0))); } pBVar6 = BitSet128::operator_and(&laserMask2,pBVar6,&g_tearFlagLaser); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); @@ -2551,7 +2551,7 @@ LAB_00668fe9: pAVar22 = local_8c8; if (local_8c8 != (ANM2 *)0x0) { uVar10 = Random(); - ((Game *)(g_game))->Game::Spawn(1000,(uint)pAVar22,&this->_pos,&g_vectorZero,(Entity *)this,(uint)local_898, + ((Game *)(g_game))->Game::Spawn(1000,GHIDRA_UINT(pAVar22),&this->_pos,&g_vectorZero,(Entity *)this,GHIDRA_UINT(local_898), uVar10); EVar14 = (EntityPtr)__RTDynamicCast(); local_88c = EVar14; @@ -2583,7 +2583,7 @@ LAB_00668fe9: Isaac::Random(4); FUN_0043eea0(); } - auVar31 = ZEXT416((uint)local_910); + auVar31 = ZEXT416(GHIDRA_UINT(local_910)); if (local_910 != oneConst) { pVVar9 = (Vector *)((Entity *)((Entity *)EVar14))->Entity::SpriteScale(); pVVar9 = ((Vector *)(pVVar9))->Vector::__mul(&local_1600,&local_910); @@ -2594,7 +2594,7 @@ LAB_00668fe9: case 0x13: pcVar1 = *(code **)(*(int *)EVar14 + 0x3c); ((Sprite *)((Sprite *)&tear->_sprite))->Sprite::Color(); - auVar31 = ZEXT416((uint)pointThreeConst); + auVar31 = ZEXT416(GHIDRA_UINT(pointThreeConst)); ((Color *)(aCStackY_3c4c + 0x81))->Color::Color(); FUN_004072e0(); EVar14 = local_88c; @@ -2653,7 +2653,7 @@ LAB_00668fe9: case 0x12: pcVar1 = *(code **)(*(int *)EVar14 + 0x3c); ((Sprite *)((Sprite *)&tear->_sprite))->Sprite::Color(); - auVar31 = ZEXT416((uint)oneConst); + auVar31 = ZEXT416(GHIDRA_UINT(oneConst)); ((Color *)(0x3f800000))->Color::Color(0,0x46,0xff); FUN_004072e0(); EVar14 = local_88c; @@ -2664,7 +2664,7 @@ LAB_00668fe9: case 0x14: pcVar1 = *(code **)(*(int *)EVar14 + 0x3c); ((Sprite *)((Sprite *)&tear->_sprite))->Sprite::Color(); - auVar31 = ZEXT416((uint)oneConst); + auVar31 = ZEXT416(GHIDRA_UINT(oneConst)); ((Color *)(0x3f800000))->Color::Color(0xe6,0xe6,0); FUN_004072e0(); EVar14 = local_88c; @@ -2685,7 +2685,7 @@ LAB_00668fe9: case 0x1b: pcVar1 = *(code **)(*(int *)EVar14 + 0x3c); ((Sprite *)((Sprite *)&tear->_sprite))->Sprite::Color(); - auVar31 = ZEXT416((uint)halfConst); + auVar31 = ZEXT416(GHIDRA_UINT(halfConst)); ((Color *)(0x3f800000))->Color::Color(0x3f000000,0x3f000000,0x3f000000); FUN_004072e0(); EVar14 = local_88c; @@ -2707,7 +2707,7 @@ LAB_00668fe9: case 0x26: pcVar1 = *(code **)(*(int *)EVar14 + 0x3c); ((Sprite *)((Sprite *)&tear->_sprite))->Sprite::Color(); - auVar31 = ZEXT416((uint)pointThreeConst); + auVar31 = ZEXT416(GHIDRA_UINT(pointThreeConst)); ((Color *)(aCStackY_3c4c + 0x81))->Color::Color(); FUN_004072e0(); EVar14 = local_88c; @@ -2718,7 +2718,7 @@ LAB_00668fe9: case 0x2d: pcVar1 = *(code **)(*(int *)EVar14 + 0x3c); ((Sprite *)((Sprite *)&tear->_sprite))->Sprite::Color(); - auVar31 = ZEXT416((uint)oneConst); + auVar31 = ZEXT416(GHIDRA_UINT(oneConst)); ((Color *)(0x3f800000))->Color::Color(0x3f800000,0x3f19999a,0x3f47ae14,0x3f800000,0,0,0); FUN_004072e0(); EVar14 = local_88c; @@ -2743,9 +2743,9 @@ LAB_00668fe9: ((Color *)((Color *)local_150))->Color::operator_assign(color); FUN_00417900(); FUN_00925df0(); - local_87c = auVar31._0_4_; + local_87c = (*(undefined4 *)((char *)&(auVar31) + 0x0)); fVar27 = ((Color *)((Color *)local_150))->Color::A(); - auVar31 = ZEXT416((uint)local_87c); + auVar31 = ZEXT416(GHIDRA_UINT(local_87c)); ((Font *)((Font *)local_150))->Font::SetLineHeightModifier(fVar27 * (float)local_87c); in_stack_ffffd9fc = (Vector *)0xffffffff; (**(code **)(*(int *)EVar14 + 0x3c))(); @@ -2776,13 +2776,13 @@ LAB_00668fe9: bloodParticleScale = 0.3; pVVar9 = ((Vector *)(&g_vectorOne))->Vector::__mul(&uniformScale4,&bloodParticleScale); ((Entity *)(pEVar11))->Entity::SetSpriteScale(pVVar9); - auVar31 = ZEXT416((uint)zeroConst); + auVar31 = ZEXT416(GHIDRA_UINT(zeroConst)); ((Color *)((Color *)local_7c))->Color::Color(); ((Font *)((Font *)local_7c))->Font::SetLineHeightModifier(0.08); this = tear; if (tear->_variant == 0x1b) { LAB_0066a2e0: - auVar31 = ZEXT416((uint)zeroConst); + auVar31 = ZEXT416(GHIDRA_UINT(zeroConst)); color = (ColorMod *)((Color *)())->Color::Color(); ((Color *)((Color *)local_7c))->Color::operator_assign(color); } @@ -2798,15 +2798,15 @@ LAB_0066a2bc: goto LAB_0066a2bc; } fVar27 = random_float(); - auVar31._0_4_ = (EntityPtr)(fVar27 * pointThreeConst + 0.2); - auVar31._4_12_ = extraout_var_09; - ((Font *)((Font *)local_7c))->Font::SetLineHeightModifier((float)auVar31._0_4_); + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)(fVar27 * pointThreeConst + 0.2); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_09; + ((Font *)((Font *)local_7c))->Font::SetLineHeightModifier((*(undefined4 *)((char *)&((float)auVar31) + 0x0))); } in_stack_ffffd9fc = (Vector *)0xffffffff; pEVar11->SetColor(); pEVar11->Update(); - local_89c = (EntityPtr)((int)local_89c + 1); - } while ((int)local_89c < bloodParticleCount); + local_89c = (EntityPtr)(GHIDRA_INT(local_89c) + 1); + } while (GHIDRA_INT(local_89c) < bloodParticleCount); } } if (this->_dead != 0) { @@ -2828,9 +2828,9 @@ LAB_0066a370: fVar27 = get_tear_trinket_multiplier((Entity_Player *)local_8d8,0x1e); auVar33 = extraout_var_10; } - auVar31._0_4_ = (EntityPtr)(fVar27 * halfConst + halfConst); - auVar31._4_12_ = auVar33; - squareSpeedScale = (float)auVar31._0_4_; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)(fVar27 * halfConst + halfConst); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = auVar33; + squareSpeedScale = (*(undefined4 *)((char *)&((float)auVar31) + 0x0)); iVar7 = ((Entity *)((Entity *)this))->Entity::FrameCount(); if (iVar7 < 5) { iVar7 = ((Entity *)((Entity *)this))->Entity::FrameCount(); @@ -2918,7 +2918,7 @@ LAB_0066a545: ((Vector *)(&local_98c))->Vector::operator__(pVVar9); } local_928 = ((Vector *)(&local_98c))->Vector::Length(); - auVar31 = ZEXT416((uint)local_928); + auVar31 = ZEXT416(GHIDRA_UINT(local_928)); if (local_928 != zeroConst) { ((Vector *)(&local_98c))->Vector::__div(&local_c90,&local_928); ((Vector *)(&this->_velocity))->Vector::operator__(&this->_orbitVelocity); @@ -2958,7 +2958,7 @@ LAB_0066a545: local_87c = (EntityPtr)(fVar27 * (float)local_8ac); fVar27 = ((Vector *)(&this->_velocity))->Vector::GetAngleDegrees(); local_89c = (EntityPtr)(fVar27 + (float)local_87c); - auVar31 = ZEXT416((uint)local_89c); + auVar31 = ZEXT416(GHIDRA_UINT(local_89c)); Vector::FromAngle(&local_da0,(float)local_89c); local_968 = ((Vector *)(&this->_velocity))->Vector::Length(); pVVar9 = ((Vector *)(&local_da0))->Vector::__mul(&local_16d0,&local_968); @@ -2986,7 +2986,7 @@ LAB_0066a545: ((Vector *)(&local_9bc))->Vector::operator_assign(pVVar9); pVVar9 = ((Entity *)((Entity *)local_8a0))->Entity::Velocity(&entityVel2); Entity::get_friction(); - local_a38 = auVar31._0_4_; + local_a38 = (*(undefined4 *)((char *)&(auVar31) + 0x0)); pVVar9 = ((Vector *)(pVVar9))->Vector::__div(&local_e70,&local_a38); } ((Vector *)(&local_c98))->Vector::operator_assign(pVVar9); @@ -3050,18 +3050,18 @@ LAB_0066a545: pVVar9 = ((Vector *)(&local_ca0))->Vector::__add(&local_eb0,&local_b7c); pVVar9 = ((Vector *)(pVVar9))->Vector::__div(&local_eb8,&this->_friction); ((Vector *)(&this->_velocity))->Vector::operator_assign(pVVar9); - auVar31._0_4_ = + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr) normalize_angle_degrees ((((this->_orbitRadius / local_93c) * 180.0) / 3.1415927) * this->_speedMultiplier + this->_orbitAngle); - auVar31._4_12_ = extraout_var_11; - this->_orbitAngle = (float)auVar31._0_4_; + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_11; + this->_orbitAngle = (*(undefined4 *)((char *)&((float)auVar31) + 0x0)); if (1 < this->_waitFrames) { - pVVar9 = Vector::FromAngle(&angleDir,(float)auVar31._0_4_); - auVar31 = ZEXT416((uint)this->_orbitRadius); + pVVar9 = Vector::FromAngle(&angleDir,(*(undefined4 *)((char *)&((float)auVar31) + 0x0))); + auVar31 = ZEXT416(GHIDRA_UINT(this->_orbitRadius)); Math::abs(); - local_a4c = auVar31._0_4_; + local_a4c = (*(undefined4 *)((char *)&(auVar31) + 0x0)); in_stack_ffffd9fc = (Vector *)0x66afed; pVVar9 = Vector::operator_mul(&local_ec8,&local_a4c,pVVar9); pVVar15 = &this->_continueVelocity; @@ -3085,7 +3085,7 @@ LAB_0066aff6: local_a2c = (100.0 - local_92c) * 0.01; ((Vector *)(&local_b5c))->Vector::Vector(local_b64.y,-local_b64.x); local_87c = (EntityPtr)((Vector *)(&local_b5c))->Vector::Dot(&this->_velocity); - auVar31 = ZEXT416((uint)zeroConst); + auVar31 = ZEXT416(GHIDRA_UINT(zeroConst)); if ((float)local_87c < zeroConst) { local_a24 = &DAT_bf800000; ((Vector *)(&local_b5c))->Vector::operator_mul_assign((float *)&local_a24); @@ -3119,10 +3119,10 @@ LAB_0066aff6: if (this->_target == (EntityPtr)0x0) { bVar4 = ((Entity *)((Entity *)this))->Entity::IsFrame(4,this->_index); if (bVar4 != 0) { - auVar31._0_12_ = ZEXT812(0x4e6e6b28); - auVar31._12_4_ = 0; + (*(undefined1 *)((char *)&(auVar31) + 0x0)) = ZEXT812(0x4e6e6b28); + (*(undefined4 *)((char *)&(auVar31) + 0xc)) = 0; local_8a0 = (EntityPtr)0x0; - local_898 = auVar31._0_4_; + local_898 = (*(undefined4 *)((char *)&(auVar31) + 0x0)); ((Level *)((Level *)g_game))->Level::GetCurrentRoom(); entityList = (EntityList *)FUN_00428a60(); local_c30 = (void *)0x40a00000; @@ -3179,7 +3179,7 @@ LAB_0066aff6: if (bVar4 != 0) { EVar14 = (EntityPtr)((float)local_8d0 + 1000.0); } - auVar31 = ZEXT416((uint)EVar14); + auVar31 = ZEXT416(GHIDRA_UINT(EVar14)); if ((float)EVar14 < (float)local_898) { local_8a0 = EVar28; local_898 = EVar14; @@ -3189,9 +3189,9 @@ LAB_0066aff6: } } LAB_0066cdbc: - local_888 = (EntityPtr)((int)local_888 + 1); + local_888 = (EntityPtr)(GHIDRA_INT(local_888) + 1); EVar14 = (EntityPtr)((EntityList *)((EntityList *)aheadQuery))->EntityList::Size(); - } while ((uint)local_888 < (uint)EVar14); + } while (GHIDRA_UINT(local_888) < GHIDRA_UINT(EVar14)); } ((Game *)(g_game))->Game::GetField26614(); cVar5 = DeathmatchManager::is_active(); @@ -3202,7 +3202,7 @@ LAB_0066cdbc: EntityList::QuerySublist (entityList,(EntityList_EL *)deathmatchFamiliarQuery,3,0x43,-1,1,0); EVar14 = (EntityPtr)0x0; - ehState = CONCAT31(ehState._1_3_,4); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),4); local_888 = (EntityPtr)0x0; iVar7 = ((EntityList *)((EntityList *)deathmatchFamiliarQuery))->EntityList::Size(); if (iVar7 != 0) { @@ -3220,20 +3220,20 @@ LAB_0066cdbc: EVar14 = local_888; local_87c = (EntityPtr)(fVar27 * 128.0); local_8d0 = (EntityPtr)((float)local_87c + (float)local_8ac); - auVar31 = ZEXT416((uint)local_898); + auVar31 = ZEXT416(GHIDRA_UINT(local_898)); if ((float)local_8d0 < (float)local_898) { pEVar19 = (EntityPtr *)std::vector::operator_index(); - auVar31 = ZEXT416((uint)local_8d0); + auVar31 = ZEXT416(GHIDRA_UINT(local_8d0)); local_898 = local_8d0; local_8a0 = *pEVar19; } } - EVar14 = (EntityPtr)((int)EVar14 + 1); + EVar14 = (EntityPtr)(GHIDRA_INT(EVar14) + 1); local_888 = EVar14; EVar28 = (EntityPtr)((EntityList *)((EntityList *)deathmatchFamiliarQuery))->EntityList::Size(); - } while ((uint)EVar14 < (uint)EVar28); + } while (GHIDRA_UINT(EVar14) < GHIDRA_UINT(EVar28)); } - ehState = CONCAT31(ehState._1_3_,3); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),3); ((EntityList_Query *)(deathmatchFamiliarQuery))->EntityList_Query::~EntityList_Query(); } ((Entity *)((Entity *)this))->Entity::SetTarget((Entity *)local_8a0); @@ -3252,10 +3252,10 @@ LAB_0066cdbc: local_c24 = 2.0; pVVar9 = ((Vector *)(pVVar9))->Vector::__mul(&local_1090,&local_c24); ((Vector *)(&this->_velocity))->Vector::operator__(pVVar9); - auVar31._0_4_ = + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)Math::timescale_factor(this->_homingFriction,this->_speedMultiplier); - auVar31._4_12_ = extraout_var_14; - local_c20 = (void *)auVar31._0_4_; + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_14; + local_c20 = (*(undefined4 *)((char *)&((void *)auVar31) + 0x0)); ((Vector *)(&this->_velocity))->Vector::operator_mul_assign((float *)&local_c20); } } @@ -3263,15 +3263,15 @@ LAB_0066cdbc: local_88c = (EntityPtr)GetRootPlayer(this); local_8c8 = &this->_sprite; _empty_check_0x34(); - auVar32._4_12_ = auVar31._4_12_; - auVar32._0_4_ = (BitSet128 *)((auVar31._0_4_ * 360.0) / (float)local_8fc + 90.0); - local_8c4 = auVar32._0_4_; + (*(undefined1 *)((char *)&(auVar32) + 0x4)) = (*(undefined1 *)((char *)&(auVar31) + 0x4)); + (*(undefined4 *)((char *)&(auVar32) + 0x0)) = (BitSet128 *)(((*(undefined4 *)((char *)&(auVar31) + 0x0)) * 360.0) / (float)local_8fc + 90.0); + local_8c4 = (*(undefined4 *)((char *)&(auVar32) + 0x0)); if (local_88c == (EntityPtr)0x0) { local_8c0 = (EntityPtr)zeroConst; } else { FUN_00665c00(); - local_8c0 = auVar32._0_4_; + local_8c0 = (*(undefined4 *)((char *)&(auVar32) + 0x0)); } local_8a1 = '\0'; pBVar6 = BitSet128::operator_and(&fetusTechxMask,&this->_tearFlags,&g_tearFlagFetusTechx); @@ -3649,24 +3649,24 @@ LAB_0066b8aa: } } LAB_0066c0c5: - local_89c = (EntityPtr)((int)local_89c + 1); + local_89c = (EntityPtr)(GHIDRA_INT(local_89c) + 1); EVar14 = (EntityPtr)((EntityList *)((EntityList *)fetusTechQuery))->EntityList::Size(); - } while ((uint)local_89c < (uint)EVar14); + } while (GHIDRA_UINT(local_89c) < GHIDRA_UINT(EVar14)); if ((0.85 < (float)local_898) && (local_8b4 != (EntityPtr)0x0)) { *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x4a8)) = 8; pVVar9 = ((Entity *)((Entity *)local_8b4))->Entity::Position(&entityPos11); pVVar9 = ((Vector *)(pVVar9))->Vector::__sub(&local_f90,&this->_pos); ((Vector *)(pVVar9))->Vector::Normalized(&fetusTechAimDir); bVar4 = 1; - uVar37 = local_88c._0_1_; - uVar38 = local_88c._1_1_; - uVar39 = local_88c._2_2_; + uVar37 = (*(undefined1 *)((char *)&(local_88c) + 0x0)); + uVar38 = (*(undefined1 *)((char *)&(local_88c) + 0x1)); + uVar39 = (*(undefined2 *)((char *)&(local_88c) + 0x2)); pVVar9 = &this->_posOffset; in_stack_ffffd9fc = (Vector *)0x3; fVar27 = ((Vector *)(&fetusTechAimDir))->Vector::GetAngleDegrees(); EVar14 = (EntityPtr) Entity_Laser::ShootAngle - (2,&this->_pos,fVar27,(int)in_stack_ffffd9fc,pVVar9, + (2,&this->_pos,fVar27,GHIDRA_INT(in_stack_ffffd9fc),pVVar9, (Entity *)CONCAT22(uVar39,CONCAT11(uVar38,uVar37)),bVar4); local_888 = EVar14; if (EVar14 != (EntityPtr)0x0) { @@ -3678,7 +3678,7 @@ LAB_0066c0c5: in_stack_ffffd9fc = *(Vector **)&pBVar6->_l; FUN_00456830(); local_a78 = 1; - local_a74 = (EntityPtr)(int)(20.0 - (float)local_8c0); + local_a74 = (EntityPtr)GHIDRA_INT((20.0 - (float)local_8c0)); local_87c = local_a74; piVar12 = (int *)std::max(); iVar7 = Isaac::Random(*piVar12); @@ -3715,7 +3715,7 @@ LAB_0066c0c5: uVar37 = 0x80; uVar39 = 0x453b; } - set_field_358((void *)EVar14,(float)((uint)CONCAT21(uVar39,uVar37) << 8)); + set_field_358((void *)EVar14,(float)(GHIDRA_UINT(CONCAT21(uVar39,uVar37)) << 8)); if (local_88c != (EntityPtr)0x0) { Entity_Player::get_laser_color_copy ((Entity_Player *)local_88c,(ColorMod *)local_1d8); @@ -3745,17 +3745,17 @@ LAB_0066c0c5: local_a88 = 0x3f800000; pEVar19 = (EntityPtr *)std::min(); local_898 = *pEVar19; - auVar31 = ZEXT416((uint)local_898); + auVar31 = ZEXT416(GHIDRA_UINT(local_898)); bVar4 = ((Entity *)((Entity *)this))->Entity::IsFrame(8,this->_index); if ((bVar4 != 0) && (this->_stickTarget == (void *)0x0)) { ((std::vector *)(&this->_hitList))->std::vector::clear(0); } if ((this->_target == (EntityPtr)0x0) && (bVar4 = ((Entity *)((Entity *)this))->Entity::IsFrame(4,this->_index), bVar4 != 0)) { - auVar31._0_12_ = ZEXT812(0x4e6e6b28); - auVar31._12_4_ = 0; + (*(undefined1 *)((char *)&(auVar31) + 0x0)) = ZEXT812(0x4e6e6b28); + (*(undefined4 *)((char *)&(auVar31) + 0xc)) = 0; local_888 = (EntityPtr)0x0; - local_8c0 = auVar31._0_4_; + local_8c0 = (*(undefined4 *)((char *)&(auVar31) + 0x0)); ((Level *)((Level *)g_game))->Level::GetCurrentRoom(); entityList = (EntityList *)FUN_00428a60(); local_b44 = 5.0; @@ -3795,7 +3795,7 @@ LAB_0066c0c5: local_8ac = (EntityPtr)((Vector *)(pVVar9))->Vector::Distance(pVVar15); fVar27 = random_float(); local_87c = (EntityPtr)(fVar27 * 128.0 + (float)local_8ac); - auVar31 = ZEXT416((uint)local_87c); + auVar31 = ZEXT416(GHIDRA_UINT(local_87c)); if ((float)local_87c < (float)local_8c0) { local_888 = local_89c; local_8c0 = local_87c; @@ -3804,10 +3804,10 @@ LAB_0066c0c5: } } LAB_0066c6d8: - EVar28 = (EntityPtr)((int)local_8b4 + 1); + EVar28 = (EntityPtr)(GHIDRA_INT(local_8b4) + 1); local_8b4 = EVar28; EVar14 = (EntityPtr)((EntityList *)((EntityList *)aheadQuery2))->EntityList::Size(); - } while ((uint)EVar28 < (uint)EVar14); + } while (GHIDRA_UINT(EVar28) < GHIDRA_UINT(EVar14)); } ((Entity *)((Entity *)this))->Entity::SetTarget((Entity *)local_888); ehState = 0xffffffff; @@ -3851,9 +3851,9 @@ LAB_0066c6d8: pVVar9 = ((Vector *)(&fromTarget2))->Vector::__unm(&negated2); local_87c = (EntityPtr)((Vector *)(pVVar9))->Vector::GetAngleDegrees(); local_8ac = (EntityPtr)((Vector *)((Vector *)EVar28))->Vector::GetAngleDegrees(); - auVar31._0_4_ = (EntityPtr)approach_angle((float)local_8ac,(float)local_87c,(float)local_89c); - auVar31._4_12_ = extraout_var_12; - pVVar9 = Vector::FromAngle(&angleDir3,(float)auVar31._0_4_); + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)approach_angle((float)local_8ac,(float)local_87c,(float)local_89c); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_12; + pVVar9 = Vector::FromAngle(&angleDir3,(*(undefined4 *)((char *)&((float)auVar31) + 0x0))); local_c3c = (void *)((Vector *)((Vector *)EVar28))->Vector::Length(); pVVar9 = Vector::operator_mul(&local_1010,(float *)&local_c3c,pVVar9); ((Vector *)((Vector *)EVar28))->Vector::operator_assign(pVVar9); @@ -3876,8 +3876,8 @@ LAB_0066c6d8: if (fVar27 < zeroConst) { fVar27 = fVar27 + 360.0; } - auVar31._0_4_ = (EntityPtr)(fVar27 / (float)local_8c0); - auVar31._4_12_ = extraout_var_13; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)(fVar27 / (float)local_8c0); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_13; FUN_0040a740(); } } @@ -3934,8 +3934,8 @@ LAB_0066d2f2: else { local_914 = local_914 * local_900; } - auVar31 = ZEXT416((uint)aimDir.x); - if ((aimDir.x == zeroConst) && (auVar31 = ZEXT416((uint)aimDir.y), aimDir.y == zeroConst)) { + auVar31 = ZEXT416(GHIDRA_UINT(aimDir.x)); + if ((aimDir.x == zeroConst) && (auVar31 = ZEXT416(GHIDRA_UINT(aimDir.y)), aimDir.y == zeroConst)) { pBVar8 = BitSet128::operator_and(&boomerangMask3,pBVar6,&g_tearFlagBoomerang); bVar4 = ((BitSet128 *)(pBVar8))->BitSet128::IsNonZero(); if (bVar4 == 0) { @@ -3966,11 +3966,11 @@ LAB_0066d2e6: bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 == 0) { if (*(int *)((char *)EVar14 + 0x438) < 1) { - fVar27 = ((Vector *)((Vector *)((int)EVar14 + 0x7ec)))->Vector::Length(); + fVar27 = ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x7ec)))->Vector::Length(); local_87c = (EntityPtr)(fVar27 * 0.014); *(float *)((char *)EVar14 + 0x388) = (float)local_87c + *(float *)((char *)EVar14 + 0x388); fVar27 = *(float *)((char *)EVar14 + 0x424) + 0.01; - auVar31 = ZEXT416((uint)fVar27); + auVar31 = ZEXT416(GHIDRA_UINT(fVar27)); *(float *)((char *)EVar14 + 0x424) = fVar27; } } @@ -3978,28 +3978,28 @@ LAB_0066d2e6: bVar4 = is_not_familiar_spawned((Entity_Tear *)EVar14); if (bVar4 != 0) { pVVar9 = ((Entity *)(*(Entity **)((char *)EVar14 + 0x3bc)))->Entity::Position(&parentPos); - local_87c = (EntityPtr)((Vector *)(pVVar9))->Vector::Distance((Vector *)((int)EVar14 + 0x33c)); + local_87c = (EntityPtr)((Vector *)(pVVar9))->Vector::Distance((Vector *)(GHIDRA_INT(EVar14) + 0x33c)); fVar27 = Math::clamp(oneConst,700.0,(float)local_87c); - auVar31._0_4_ = (EntityPtr)(fVar27 / 700.0 + oneConst); - auVar31._4_12_ = extraout_var_15; - *(float *)((char *)EVar14 + 0x388) = (float)auVar31._0_4_ * *(float *)((char *)EVar14 + 0x454); - local_8dc = (float)auVar31._0_4_; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)(fVar27 / 700.0 + oneConst); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_15; + *(float *)((char *)EVar14 + 0x388) = (*(undefined4 *)((char *)&((float)auVar31) + 0x0)) * *(float *)((char *)EVar14 + 0x454); + local_8dc = (*(undefined4 *)((char *)&((float)auVar31) + 0x0)); } } } - pBVar6 = BitSet128::operator_and(&shrinkMask,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagShrink) + pBVar6 = BitSet128::operator_and(&shrinkMask,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagShrink) ; bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { pBVar6 = BitSet128::operator_and - (&ludovicoMask10,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagLudovico); + (&ludovicoMask10,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagLudovico); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 == 0) { if (*(int *)((char *)EVar14 + 0x438) < 1) { - auVar31 = ZEXT416((uint)*(float *)((char *)EVar14 + 0x3a4)); + auVar31 = ZEXT416(GHIDRA_UINT(*(float *)((char *)EVar14 + 0x3a4))); if (4.0 < *(float *)((char *)EVar14 + 0x3a4)) { pBVar6 = BitSet128::operator_and - (&fetusMask3,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagFetus); + (&fetusMask3,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagFetus); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); fVar27 = *(float *)((char *)EVar14 + 0x454); fVar23 = *(float *)((char *)EVar14 + 0x388); @@ -4020,7 +4020,7 @@ LAB_0066d2e6: else { decayFactor = 0.006; } - local_c14._0_4_ = 0x3dcccccd; + (*(undefined4 *)((char *)&(local_c14) + 0x0)) = 0x3dcccccd; local_c18 = fVar23 - decayFactor * fVar27; } pfVar16 = (float *)std::max(); @@ -4028,10 +4028,10 @@ LAB_0066d2e6: *(float *)((char *)EVar14 + 0x388) = fVar27; fVar27 = fVar27 / *(float *)((char *)EVar14 + 0x454); FUN_00431260(); - auVar31._0_12_ = ZEXT812(0x3dcccccd); - auVar31._12_4_ = 0; + (*(undefined1 *)((char *)&(auVar31) + 0x0)) = ZEXT812(0x3dcccccd); + (*(undefined4 *)((char *)&(auVar31) + 0xc)) = 0; local_8dc = fVar27; - if (*(float *)((char *)EVar14 + 0x388) <= auVar31._0_4_) { + if (*(float *)((char *)EVar14 + 0x388) <= (*(undefined4 *)((char *)&(auVar31) + 0x0))) { *(undefined1 *)((char *)EVar14 + 0x173) = 1; *(uint *)((char *)EVar14 + 0x474) = *(uint *)((char *)EVar14 + 0x474) | 0x10; } @@ -4042,17 +4042,17 @@ LAB_0066d2e6: bVar4 = is_not_familiar_spawned((Entity_Tear *)EVar14); if (bVar4 != 0) { pVVar9 = ((Entity *)(*(Entity **)((char *)EVar14 + 0x3bc)))->Entity::Position(&parentPos2); - local_87c = (EntityPtr)((Vector *)(pVVar9))->Vector::Distance((Vector *)((int)EVar14 + 0x33c)); + local_87c = (EntityPtr)((Vector *)(pVVar9))->Vector::Distance((Vector *)(GHIDRA_INT(EVar14) + 0x33c)); fVar27 = Math::clamp(zeroConst,900.0,(float)local_87c); fVar27 = oneConst - fVar27 / 900.0; local_8dc = fVar27 * local_8dc; - auVar31 = ZEXT416((uint)local_8dc); + auVar31 = ZEXT416(GHIDRA_UINT(local_8dc)); *(float *)((char *)EVar14 + 0x388) = fVar27 * *(float *)((char *)EVar14 + 0x454); } } } pBVar6 = BitSet128::operator_and - (&spectralMask,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagSpectral); + (&spectralMask,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagSpectral); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { if ((*(int *)((char *)EVar14 + 0x2c) == 4) || (*(int *)((char *)EVar14 + 0x2c) == 9)) { @@ -4063,7 +4063,7 @@ LAB_0066d2e6: } *(undefined4 *)((char *)EVar14 + 0x184) = uVar20; pBVar6 = BitSet128::operator_and - (&ludovicoMask11,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagLudovico); + (&ludovicoMask11,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagLudovico); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsZero(); if (bVar4 != 0) { if (*(char *)((char *)EVar14 + 0x46b) == '\0') { @@ -4082,47 +4082,47 @@ LAB_0066d2e6: } } pBVar6 = BitSet128::operator_and - (&boomerangMask4,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagBoomerang); + (&boomerangMask4,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagBoomerang); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if ((bVar4 != 0) && (*(int *)((char *)EVar14 + 0x3bc) != 0)) { pBVar8 = &g_tearFlagOrbitAdvanced; pBVar6 = BitSet128::operator_or(&withOrbit2,&g_tearFlagLudovico,&g_tearFlagOrbit); pBVar6 = BitSet128::operator_or(&orResult7,pBVar6,pBVar8); - pBVar6 = BitSet128::operator_and(&andResult17,(BitSet128 *)((int)EVar14 + 0x428),pBVar6); + pBVar6 = BitSet128::operator_and(&andResult17,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),pBVar6); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsZero(); if (bVar4 != 0) { pVVar9 = ((Entity *)(*(Entity **)((char *)EVar14 + 0x3bc)))->Entity::Position(&parentPos3); pVVar15 = ((Vector *)(&local_10d8))->Vector::Vector(zeroConst,2.0); pVVar9 = ((Vector *)(pVVar9))->Vector::__add(&local_10e0,pVVar15); - ((Vector *)((Vector *)((int)EVar14 + 0x33c)))->Vector::__sub(&local_ca8,pVVar9); - bVar4 = ((Vector *)((Vector *)((int)EVar14 + 0x334)))->Vector::operator_ne(&g_vectorZero); + ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x33c)))->Vector::__sub(&local_ca8,pVVar9); + bVar4 = ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x334)))->Vector::operator_ne(&g_vectorZero); if (bVar4 != 0) { pVVar9 = ((Vector *)(&local_10e8))->Vector::Vector(zeroConst,2.0); - pVVar9 = ((Vector *)((Vector *)((int)EVar14 + 0x334)))->Vector::__sub(&local_10f0,pVVar9); - pVVar9 = ((Vector *)((Vector *)((int)EVar14 + 0x33c)))->Vector::__sub(&local_10f8,pVVar9); + pVVar9 = ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x334)))->Vector::__sub(&local_10f0,pVVar9); + pVVar9 = ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x33c)))->Vector::__sub(&local_10f8,pVVar9); ((Vector *)(&local_ca8))->Vector::operator_assign(pVVar9); } local_87c = (EntityPtr)GetRootPlayer((Entity_Tear *)EVar14); - local_c04._0_4_ = 0x41a00000; - local_c14._size = (int)((*(float *)((char *)EVar14 + 0x820) - 60.0) * halfConst); - auVar31 = ZEXT416((uint)local_c14._size); + (*(undefined4 *)((char *)&(local_c04) + 0x0)) = 0x41a00000; + local_c14._size = GHIDRA_INT(((*(float *)((char *)EVar14 + 0x820) - 60.0) * halfConst)); + auVar31 = ZEXT416(GHIDRA_UINT(local_c14._size)); puVar13 = (undefined4 *)std::max(); local_8ac = (EntityPtr)*puVar13; if (local_87c == (EntityPtr)0x0) { - auVar31 = ZEXT416((uint)oneConst); + auVar31 = ZEXT416(GHIDRA_UINT(oneConst)); } else { FUN_00436190(); } - fVar27 = auVar31._0_4_ * 10.0; - auVar31._0_4_ = (EntityPtr)((fVar27 * fVar27) / ((float)local_8ac + (float)local_8ac)); - local_c04._data = (void *)auVar31._0_4_; + fVar27 = (*(undefined4 *)((char *)&(auVar31) + 0x0)) * 10.0; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)((fVar27 * fVar27) / ((float)local_8ac + (float)local_8ac)); + local_c04._data = (*(undefined4 *)((char *)&((void *)auVar31) + 0x0)); pVVar9 = ((Vector *)(&local_ca8))->Vector::Normalized(&direction11); pVVar9 = ((Vector *)(pVVar9))->Vector::__mul(&local_1108,(float *)&local_c04._data); - ((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::operator__(pVVar9); + ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::operator__(pVVar9); } } - pBVar6 = BitSet128::operator_and(&wiggleMask,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagWiggle) + pBVar6 = BitSet128::operator_and(&wiggleMask,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagWiggle) ; bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { @@ -4130,16 +4130,16 @@ LAB_0066d2e6: fVar27 = oneConst; } else { - auVar31._0_4_ = (EntityPtr)get_tear_trinket_multiplier((Entity_Player *)local_8d8,10); - auVar31._4_12_ = extraout_var_16; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)get_tear_trinket_multiplier((Entity_Player *)local_8d8,10); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_16; local_c04._size = 0x3f800000; - local_c04._capacity = (int)auVar31._0_4_; + local_c04._capacity = (*(undefined4 *)((char *)&(GHIDRA_INT(auVar31)) + 0x0)); pfVar16 = (float *)std::max(); fVar27 = *pfVar16; } apply_wiggle((Entity_Tear *)EVar14,fVar27); } - pBVar6 = BitSet128::operator_and(&spiralMask,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagSpiral) + pBVar6 = BitSet128::operator_and(&spiralMask,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagSpiral) ; bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { @@ -4147,52 +4147,52 @@ LAB_0066d2e6: fVar27 = oneConst; } else { - auVar31._0_4_ = (EntityPtr)get_tear_trinket_multiplier((Entity_Player *)local_8d8,0x1a); - auVar31._4_12_ = extraout_var_17; - local_bf0._0_4_ = 0x3f800000; - local_bf4 = (float)auVar31._0_4_; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)get_tear_trinket_multiplier((Entity_Player *)local_8d8,0x1a); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_17; + (*(undefined4 *)((char *)&(local_bf0) + 0x0)) = 0x3f800000; + local_bf4 = (*(undefined4 *)((char *)&((float)auVar31) + 0x0)); pfVar16 = (float *)std::max(); fVar27 = *pfVar16; } apply_wiggle((Entity_Tear *)EVar14,fVar27); } pBVar6 = BitSet128::operator_and - (&bigSpiralMask,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagBigSpiral); + (&bigSpiralMask,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagBigSpiral); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { if (local_8d8 != (EntityPtr)0x0) { - auVar31._0_4_ = (EntityPtr)get_tear_trinket_multiplier((Entity_Player *)local_8d8,0x2e); - auVar31._4_12_ = extraout_var_18; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)get_tear_trinket_multiplier((Entity_Player *)local_8d8,0x2e); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_18; local_bf0._capacity = 0x3f800000; - local_bf0._data = (void *)auVar31._0_4_; + local_bf0._data = (*(undefined4 *)((char *)&((void *)auVar31) + 0x0)); std::max(); } update_wiggle((Entity_Tear *)EVar14); } pBVar6 = BitSet128::operator_and - (&attractorMask2,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagAttractor); + (&attractorMask2,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagAttractor); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { - auVar31._0_4_ = + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)Math::clamp(zeroConst,oneConst,(*(float *)((char *)EVar14 + 0x3a4) - 10.0) / 10.0); - auVar31._4_12_ = extraout_var_19; + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_19; local_87c = *(EntityPtr *)((char *)EVar14 + 0x478); - local_8d0 = (EntityPtr)((float)auVar31._0_4_ * 20.0 * (float)auVar31._0_4_); + local_8d0 = (EntityPtr)((*(undefined4 *)((char *)&((float)auVar31) + 0x0)) * 20.0 * (*(undefined4 *)((char *)&((float)auVar31) + 0x0))); if (local_87c != (EntityPtr)0x0) { - auVar31._0_12_ = ZEXT812(0x41000000); - auVar31._12_4_ = 0; - local_8d0 = auVar31._0_4_; + (*(undefined1 *)((char *)&(auVar31) + 0x0)) = ZEXT812(0x41000000); + (*(undefined4 *)((char *)&(auVar31) + 0xc)) = 0; + local_8d0 = (*(undefined4 *)((char *)&(auVar31) + 0x0)); } local_bf0._size = 0x40800000; pVVar9 = Vector::operator_mul - (&local_1110,(float *)&local_bf0._size,(Vector *)((int)EVar14 + 0x360)); - pVVar9 = ((Vector *)((Vector *)((int)EVar14 + 0x33c)))->Vector::__add(&local_1118,pVVar9); + (&local_1110,(float *)&local_bf0._size,(Vector *)(GHIDRA_INT(EVar14) + 0x360)); + pVVar9 = ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x33c)))->Vector::__add(&local_1118,pVVar9); in_stack_ffffd9fc = (Vector *)0x66dae1; Game::AttractEntities (g_game,pVVar9,Entity_Effect::rift_attract_filter,(void *)local_87c,(float)local_8d0, 250.0); } - pBVar6 = (BitSet128 *)((int)EVar14 + 0x428); + pBVar6 = (BitSet128 *)(GHIDRA_INT(EVar14) + 0x428); pBVar8 = BitSet128::operator_and(&pulseMask,pBVar6,&g_tearFlagPulse); bVar4 = ((BitSet128 *)(pBVar8))->BitSet128::IsNonZero(); if (bVar4 != 0) { @@ -4206,22 +4206,22 @@ LAB_0066d2e6: fVar27 = *pfVar16; } local_8d0 = (EntityPtr)(fVar27 * pointThreeConst); - auVar31 = ZEXT416((uint)local_8d0); + auVar31 = ZEXT416(GHIDRA_UINT(local_8d0)); pBVar8 = BitSet128::operator_and(&ludovicoMask12,pBVar6,&g_tearFlagLudovico); bVar4 = ((BitSet128 *)(pBVar8))->BitSet128::IsNonZero(); if (bVar4 == 0) { iVar7 = ((Entity *)((Entity *)EVar14))->Entity::FrameCount(); fVar27 = sinf_wrapper((float)iVar7 * 0.7); - auVar31._0_4_ = (EntityPtr)((fVar27 + 0.7) * (float)local_8d0 + pointSixConst); - auVar31._4_12_ = extraout_var_21; - local_8dc = local_8dc * (float)auVar31._0_4_; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)((fVar27 + 0.7) * (float)local_8d0 + pointSixConst); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_21; + local_8dc = local_8dc * (*(undefined4 *)((char *)&((float)auVar31) + 0x0)); } else if ((*(int *)((char *)EVar14 + 0x3bc) != 0) && (iVar7 = ((Entity *)())->Entity::Type(), iVar7 == 1)) { iVar7 = ((Entity *)((Entity *)EVar14))->Entity::FrameCount(); fVar27 = sinf_wrapper((float)iVar7 * 0.2); - auVar31._0_4_ = (EntityPtr)((fVar27 + 0.2) * (float)local_8d0 + 1.1); - auVar31._4_12_ = extraout_var_20; - local_8dc = local_8dc * (float)auVar31._0_4_; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)((fVar27 + 0.2) * (float)local_8d0 + 1.1); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_20; + local_8dc = local_8dc * (*(undefined4 *)((char *)&((float)auVar31) + 0x0)); } } local_8b4 = (EntityPtr)local_8dc; @@ -4237,12 +4237,12 @@ LAB_0066dc7d: if ((*(int *)((char *)EVar14 + 0x478) != 0) && (0 < *(int *)((char *)EVar14 + 0x484))) { fVar27 = oneConst - (float)*(int *)((char *)EVar14 + 0x484) / 60.0; local_8dc = local_8dc + fVar27 + fVar27; - auVar31 = ZEXT416((uint)local_8dc); + auVar31 = ZEXT416(GHIDRA_UINT(local_8dc)); } } - local_8a0 = (EntityPtr)((int)EVar14 + 0x48); + local_8a0 = (EntityPtr)(GHIDRA_INT(EVar14) + 0x48); ((Sprite *)((Sprite *)local_8a0))->Sprite::SetRotation(0.0); - local_87c = (EntityPtr)((int)EVar14 + 0x5c0); + local_87c = (EntityPtr)(GHIDRA_INT(EVar14) + 0x5c0); local_8b9 = '\0'; cVar5 = ((Sprite *)((Sprite *)local_87c))->Sprite::IsLoaded(); if (cVar5 == '\0') { @@ -4268,14 +4268,14 @@ LAB_0066dd14: fVar27 = *pfVar16; } fVar27 = fVar27 * halfConst + oneConst; - auVar31 = ZEXT416((uint)fVar27); + auVar31 = ZEXT416(GHIDRA_UINT(fVar27)); if (iVar7 == 0x32) { pVVar9 = ((Vector *)(&local_1120))->Vector::Vector(fVar27,oneConst); - ((Vector *)((Vector *)((int)EVar14 + 0x374)))->Vector::operator_assign(pVVar9); + ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x374)))->Vector::operator_assign(pVVar9); } else { pVVar9 = ((Vector *)(&local_1128))->Vector::Vector(oneConst,fVar27); - ((Vector *)((Vector *)((int)EVar14 + 0x374)))->Vector::operator_assign(pVVar9); + ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x374)))->Vector::operator_assign(pVVar9); local_8b9 = '\x01'; } } @@ -4292,8 +4292,8 @@ LAB_0066dd14: goto LAB_0066de6b; } fVar27 = *(float *)((char *)EVar14 + 0x3a4) * 45.0; - auVar31 = ZEXT416((uint)fVar27); - ((Sprite *)((Sprite *)((int)EVar14 + 0x48)))->Sprite::SetRotation(fVar27); + auVar31 = ZEXT416(GHIDRA_UINT(fVar27)); + ((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x48)))->Sprite::SetRotation(fVar27); local_8b9 = '\0'; } else { @@ -4310,7 +4310,7 @@ LAB_0066de6b: } } if (*(int *)((char *)EVar14 + 0x2c) == 0x32) { - fVar27 = ((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::Length(); + fVar27 = ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::Length(); local_8d0 = (EntityPtr)(fVar27 + fVar27); if (*(float *)((char *)EVar14 + 0x360) <= zeroConst && zeroConst != *(float *)((char *)EVar14 + 0x360) ) { @@ -4327,16 +4327,16 @@ LAB_0066de6b: if (fVar27 < zeroConst) { fVar27 = fVar27 + 360.0; } - auVar31._0_4_ = (EntityPtr)(fVar27 / (float)local_8c0); - auVar31._4_12_ = extraout_var_22; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)(fVar27 / (float)local_8c0); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_22; FUN_0040a740(); } if ((local_8b9 != '\0') || (local_8a1 != 0)) { local_9c4.x = *(float *)((char *)EVar14 + 0x360); - local_8ac = (EntityPtr)((int)EVar14 + 0x360); + local_8ac = (EntityPtr)(GHIDRA_INT(EVar14) + 0x360); local_9c4.y = *(float *)((char *)EVar14 + 0x364); if (*(int *)((char *)EVar14 + 0x438) < 1) { - auVar31 = ZEXT416((uint)*(float *)((char *)EVar14 + 0x418)); + auVar31 = ZEXT416(GHIDRA_UINT(*(float *)((char *)EVar14 + 0x418))); if (0.001 < *(float *)((char *)EVar14 + 0x418)) { LAB_0066e037: pVVar9 = ((Vector *)(&local_1130))->Vector::Vector(zeroConst,(float)local_8e0); @@ -4344,11 +4344,11 @@ LAB_0066e037: } else { pBVar6 = BitSet128::operator_and - (&ludovicoMask13,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagLudovico); + (&ludovicoMask13,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagLudovico); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { pBVar6 = BitSet128::operator_and - (&hydrobounceMask4,(BitSet128 *)((int)EVar14 + 0x428), + (&hydrobounceMask4,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428), &g_tearFlagHydrobounce); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) goto LAB_0066e037; @@ -4356,22 +4356,22 @@ LAB_0066e037: } } else { - ((Vector *)(&local_9c4))->Vector::operator_assign((Vector *)((int)EVar14 + 0x43c)); + ((Vector *)(&local_9c4))->Vector::operator_assign((Vector *)(GHIDRA_INT(EVar14) + 0x43c)); } local_89c = (EntityPtr)((Vector *)(&local_9c4))->Vector::GetAngleDegrees(); if (local_8b9 != '\0') { - auVar31 = ZEXT416((uint)local_89c); - ((Sprite *)((Sprite *)((int)EVar14 + 0x48)))->Sprite::SetRotation((float)local_89c); + auVar31 = ZEXT416(GHIDRA_UINT(local_89c)); + ((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x48)))->Sprite::SetRotation((float)local_89c); } if (local_8a1 != 0) { layerIndex = (byte *)0x0; - iVar7 = ((Sprite *)((Sprite *)((int)EVar14 + 0x5c0)))->Sprite::GetLayerCount(); + iVar7 = ((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x5c0)))->Sprite::GetLayerCount(); EVar28 = local_87c; if (iVar7 != 0) { do { layer = ((Sprite *)((Sprite *)EVar28))->Sprite::GetLayer(layerIndex); if ((layer->_bitflags & 0x1000U) != 0) { - auVar31 = ZEXT416((uint)local_89c); + auVar31 = ZEXT416(GHIDRA_UINT(local_89c)); layer->_rotation = (float)local_89c; } layerIndex = layerIndex + 1; @@ -4406,7 +4406,7 @@ LAB_0066e037: ((Entity_Effect *)(effect))->Entity_Effect::SetTimeout(iVar7 + 0xf); EVar14 = (EntityPtr)tear; local_bcc = tear->_fScale * local_900; - auVar31 = ZEXT416((uint)local_bcc); + auVar31 = ZEXT416(GHIDRA_UINT(local_bcc)); pVVar9 = Vector::operator_mul(&uniformScale10,&local_bcc,&g_vectorOne); ((Entity *)((Entity *)effect))->Entity::SetSpriteScale(pVVar9); set_field_358(effect,-18.0); @@ -4420,7 +4420,7 @@ LAB_0066e037: if (*(int *)((char *)EVar14 + 0x2c) == 0x26) { local_87c = (EntityPtr)Random(); local_bc8 = 0.3; - pVVar9 = ((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::__mul(&local_1168,&local_bc8); + pVVar9 = ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::__mul(&local_1168,&local_bc8); pVVar15 = MusicManager::RandomVector(&randomDir2); local_bc4 = random_float(); pVVar15 = ((Vector *)(pVVar15))->Vector::__mul(&local_1178,&local_bc4); @@ -4431,7 +4431,7 @@ LAB_0066e037: in_stack_ffffd9fc = ((Vector *)(pVVar9))->Vector::__add(&local_1190,pVVar15); local_89c = (EntityPtr) ((Game *)(g_game))->Game::Spawn(1000,0x58,tearPos,in_stack_ffffd9fc,(Entity *)0x0,0, - (uint)local_87c); + GHIDRA_UINT(local_87c)); sprite = (Sprite *)((Entity *)((Entity *)local_89c))->Entity::GetSprite(); pVVar9 = ((Vector *)(&g_vectorOne))->Vector::__mul(&uniformScale11,pfVar16); local_bbc = 0.8; @@ -4439,14 +4439,14 @@ LAB_0066e037: fVar27 = random_float(); pfVar16 = &local_bb4; pVVar9 = &local_11a8; - auVar31._0_4_ = (EntityPtr)(fVar27 * pointSixConst + pointSixConst); - auVar31._4_12_ = extraout_var_23; - local_bb4 = (float)auVar31._0_4_; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)(fVar27 * pointSixConst + pointSixConst); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_23; + local_bb4 = (*(undefined4 *)((char *)&((float)auVar31) + 0x0)); } else { local_87c = (EntityPtr)Random(); local_bb0 = 0.3; - pVVar9 = ((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::__mul(&local_11b0,&local_bb0); + pVVar9 = ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::__mul(&local_11b0,&local_bb0); pVVar15 = MusicManager::RandomVector(&randomDir3); local_bac = random_float(); pVVar15 = ((Vector *)(pVVar15))->Vector::__mul(&local_11c0,&local_bac); @@ -4456,7 +4456,7 @@ LAB_0066e037: in_stack_ffffd9fc = ((Vector *)(pVVar9))->Vector::__add(&local_11d8,pVVar15); EVar14 = (EntityPtr) ((Game *)(g_game))->Game::Spawn(1000,0x6f,tearPos,in_stack_ffffd9fc,(Entity *)0x0,0, - (uint)local_87c); + GHIDRA_UINT(local_87c)); local_89c = EVar14; pAVar22 = (ANM2 *)((Entity *)((Entity *)EVar14))->Entity::GetSprite(); fVar27 = random_float(); @@ -4468,9 +4468,9 @@ LAB_0066e037: fVar27 = random_float(); pfVar16 = &local_b98; pVVar9 = &local_11f0; - auVar31._0_4_ = (EntityPtr)(fVar27 * pointSixConst + pointSixConst); - auVar31._4_12_ = extraout_var_24; - local_b98 = (float)auVar31._0_4_; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)(fVar27 * pointSixConst + pointSixConst); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_24; + local_b98 = (*(undefined4 *)((char *)&((float)auVar31) + 0x0)); } pVVar9 = ((Vector *)(pVVar15))->Vector::__mul(pVVar9,pfVar16); ((Sprite *)(sprite))->Sprite::SetScale(pVVar9); @@ -4483,14 +4483,14 @@ LAB_0066e037: ((Sprite *)(sprite))->Sprite::SetColor(color); (**(code **)(*(int *)local_89c + 0xc))(); } - pBVar6 = BitSet128::operator_and(&glowMask,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagGlow); + pBVar6 = BitSet128::operator_and(&glowMask,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagGlow); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { ((Level *)((Level *)g_game))->Level::GetCurrentRoom(); entityList = (EntityList *)FUN_00428a60(); in_stack_ffffd9fc = (Vector *)0x66e65e; EntityList::QueryRadius - (entityList,(EntityList_EL *)local_d08,(Vector *)((int)EVar14 + 0x33c), + (entityList,(EntityList_EL *)local_d08,(Vector *)(GHIDRA_INT(EVar14) + 0x33c), *(float *)((char *)EVar14 + 0x370) * (float)local_890 + 100.0,0xffffffff); ehState = 5; local_888 = (EntityPtr)0x0; @@ -4505,30 +4505,30 @@ LAB_0066e037: (bVar4 = ((Entity *)(*(Entity **)((char *)EVar14 + 0x3c8)))->Entity::IsDescendantOf((Entity *)local_898), bVar4 == 0)))) { FUN_00417340(); - fVar27 = auVar31._0_4_ + *(float *)((char *)EVar14 + 0x370); + fVar27 = (*(undefined4 *)((char *)&(auVar31) + 0x0)) + *(float *)((char *)EVar14 + 0x370); local_89c = (EntityPtr)fVar27; FUN_00417340(); fVar27 = fVar27 + *(float *)((char *)EVar14 + 0x370) * 4.0; local_89c = (EntityPtr)((float)local_89c * (float)local_89c); local_8ac = (EntityPtr)(fVar27 * fVar27); pVVar9 = ((Entity *)((Entity *)local_898))->Entity::Position(&entityPos15); - local_87c = (EntityPtr)((Vector *)(pVVar9))->Vector::DistanceSquared((Vector *)((int)EVar14 + 0x33c)); - auVar31 = ZEXT416((uint)local_8ac); + local_87c = (EntityPtr)((Vector *)(pVVar9))->Vector::DistanceSquared((Vector *)(GHIDRA_INT(EVar14) + 0x33c)); + auVar31 = ZEXT416(GHIDRA_UINT(local_8ac)); if (((float)local_87c < (float)local_8ac) && ((float)local_89c < (float)local_87c)) { - pcVar1 = *(code **)((int)*(float *)local_898 + 0x20); + pcVar1 = *(code **)(GHIDRA_INT(*(float *)local_898) + 0x20); ((EntityRef *)(&local_2570))->EntityRef::constructor((Entity *)EVar14); in_stack_ffffd9fc = (Vector *)0x0; (*pcVar1)(); } } - local_888 = (EntityPtr)((int)local_888 + 1); + local_888 = (EntityPtr)(GHIDRA_INT(local_888) + 1); EVar28 = (EntityPtr)((EntityList *)((EntityList *)local_d08))->EntityList::Size(); - } while ((uint)local_888 < (uint)EVar28); + } while (GHIDRA_UINT(local_888) < GHIDRA_UINT(EVar28)); } ehState = 0xffffffff; ((EntityList_Query *)(local_d08))->EntityList_Query::~EntityList_Query(); } - pBVar8 = (BitSet128 *)((int)EVar14 + 0x428); + pBVar8 = (BitSet128 *)(GHIDRA_INT(EVar14) + 0x428); pBVar6 = BitSet128::operator_and(&decelerateMask,pBVar8,&g_tearFlagDecelerate); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { @@ -4539,9 +4539,9 @@ LAB_0066e037: bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsZero(); if (bVar4 != 0) { fVar27 = assert_lerp_range(*(float *)((char *)EVar14 + 0x3a4),zeroConst,10.0,oneConst,0.8,1); - auVar31._0_4_ = (EntityPtr)(fVar27 * *(float *)((char *)EVar14 + 0x36c)); - auVar31._4_12_ = extraout_var_25; - *(EntityPtr *)((char *)EVar14 + 0x36c) = auVar31._0_4_; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)(fVar27 * *(float *)((char *)EVar14 + 0x36c)); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_25; + *(EntityPtr *)((char *)EVar14 + 0x36c) = (*(undefined4 *)((char *)&(auVar31) + 0x0)); } } pBVar6 = BitSet128::operator_and(&accelerateMask,pBVar8,&g_tearFlagAccelerate); @@ -4555,15 +4555,15 @@ LAB_0066e037: if (bVar4 != 0) { local_87c = (EntityPtr) assert_lerp_range(*(float *)((char *)EVar14 + 0x3a4),zeroConst,10.0,0.8,1.2,1); - local_b2c = ((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::Length(); + local_b2c = ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::Length(); local_b2c = local_b2c * (float)local_87c; local_b28 = 0x41f00000; pfVar16 = (float *)std::min(); - auVar31 = ZEXT416((uint)*pfVar16); - ((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::Resize(*pfVar16); + auVar31 = ZEXT416(GHIDRA_UINT(*pfVar16)); + ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::Resize(*pfVar16); } } - pBVar6 = (BitSet128 *)((int)EVar14 + 0x428); + pBVar6 = (BitSet128 *)(GHIDRA_INT(EVar14) + 0x428); pBVar8 = BitSet128::operator_and(&absorbMask,pBVar6,&g_tearFlagAbsorb); bVar4 = ((BitSet128 *)(pBVar8))->BitSet128::IsNonZero(); if (bVar4 != 0) { @@ -4578,13 +4578,13 @@ LAB_0066e037: } else { FUN_005cd770(); - local_8b0 = auVar31._0_4_; + local_8b0 = (*(undefined4 *)((char *)&(auVar31) + 0x0)); FUN_0060d040(); - local_8d8 = auVar31._0_4_; + local_8d8 = (*(undefined4 *)((char *)&(auVar31) + 0x0)); FUN_005cd750(); - local_888 = auVar31._0_4_; + local_888 = (*(undefined4 *)((char *)&(auVar31) + 0x0)); FUN_00436190(); - local_aac = auVar31._0_4_; + local_aac = (*(undefined4 *)((char *)&(auVar31) + 0x0)); } EVar29 = (EntityPtr)((float)local_888 / 10.0); local_b34 = 0x40400000; @@ -4597,7 +4597,7 @@ LAB_0066e037: std::min(); pfVar16 = (float *)std::max(); local_940 = *pfVar16; - auVar31 = ZEXT416((uint)local_8b0); + auVar31 = ZEXT416(GHIDRA_UINT(local_8b0)); ((Entity_Projectile *)((Entity_Projectile *)EVar14))->Entity_Projectile::SetHeight((float)local_8b0); ((Entity_Projectile *)((Entity_Projectile *)EVar14))->Entity_Projectile::set_falling_accel(0.0); FUN_00444c70(); @@ -4607,30 +4607,30 @@ LAB_0066e037: bVar4 = ((BitSet128 *)(pBVar8))->BitSet128::IsZero(); if (bVar4 != 0) { fVar27 = *(float *)((char *)EVar14 + 0x36c) * 0.95; - auVar31 = ZEXT416((uint)fVar27); + auVar31 = ZEXT416(GHIDRA_UINT(fVar27)); *(float *)((char *)EVar14 + 0x36c) = fVar27; } iVar7 = ((Entity *)((Entity *)EVar14))->Entity::FrameCount(); if (10 < iVar7) { if (local_940 <= *(float *)((char *)EVar14 + 0x420)) { LAB_0066ebda: - pBVar6 = (BitSet128 *)((int)EVar14 + 0x428); - auVar31._0_4_ = + pBVar6 = (BitSet128 *)(GHIDRA_INT(EVar14) + 0x428); + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)Math::clamp(zeroConst,8.0,*(float *)((char *)EVar14 + 0x420) * 5.0); - auVar31._4_12_ = extraout_var_26; - local_890 = (EntityPtr)(int)(float)auVar31._0_4_; + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_26; + local_890 = (*(undefined4 *)((char *)&((EntityPtr)GHIDRA_INT((float)auVar31)) + 0x0)); pBVar8 = BitSet128::operator_and(&splitMask,pBVar6,&g_tearFlagSplit); bVar4 = ((BitSet128 *)(pBVar8))->BitSet128::IsNonZero(); if (bVar4 != 0) { - local_890 = (EntityPtr)((int)local_890 + 4); + local_890 = (EntityPtr)(GHIDRA_INT(local_890) + 4); } pBVar8 = BitSet128::operator_and(&quadsplitMask2,pBVar6,&g_tearFlagQuadsplit); bVar4 = ((BitSet128 *)(pBVar8))->BitSet128::IsNonZero(); if (bVar4 != 0) { - auVar31 = ZEXT416((uint)((float)(int)local_890 * 1.5)); - local_890 = (EntityPtr)(int)((float)(int)local_890 * 1.5); + auVar31 = ZEXT416(GHIDRA_UINT(((float)GHIDRA_INT(local_890) * 1.5))); + local_890 = (EntityPtr)GHIDRA_INT(((float)GHIDRA_INT(local_890) * 1.5)); } - if ((int)local_890 < 3) { + if (GHIDRA_INT(local_890) < 3) { ((BitSet128 *)(&g_tearFlagAbsorb))->BitSet128::__bnot(¬Absorb2); FUN_005cd430(); FUN_00444c70(); @@ -4638,9 +4638,9 @@ LAB_0066ebda: } fVar27 = random_float(); local_8ac = (EntityPtr)(fVar27 * 360.0); - local_8e0 = (Entity_Player *)((int)EVar14 + 0x410); + local_8e0 = (Entity_Player *)(GHIDRA_INT(EVar14) + 0x410); local_8b0 = (EntityPtr)0x0; - local_87c = (EntityPtr)(360.0 / (float)(int)local_890); + local_87c = (EntityPtr)(360.0 / (float)GHIDRA_INT(local_890)); while( true ) { pBVar36 = &g_tearFlagFetus; uVar37 = 0x50; @@ -4658,7 +4658,7 @@ LAB_0066ebda: uVar18 = Random(); pEVar11 = *(Entity **)((char *)EVar14 + 0x3c8); pVVar9 = Vector::FromAngle(&angleDir6, - (float)(int)local_8b0 * (float)local_87c + (float)local_8ac); + (float)GHIDRA_INT(local_8b0) * (float)local_87c + (float)local_8ac); pVVar9 = ((Vector *)(pVVar9))->Vector::__mul(&local_1208,&local_aac); local_ab0 = 10.0; pVVar9 = ((Vector *)(pVVar9))->Vector::__mul(&local_1210,&local_ab0); @@ -4674,14 +4674,14 @@ LAB_0066ebda: ((Entity_Projectile *)((Entity_Projectile *)EVar28))->Entity_Projectile::SetHeight(*pfVar16); EVar14 = (EntityPtr)tear; SetScale((Entity_Tear *)EVar28,tear->_baseScale * halfConst); - flags_01._l._4_4_ = inheritedFlags._l._4_4_; - flags_01._l._0_4_ = (undefined4)inheritedFlags._l; - flags_01._h._0_1_ = (char)(undefined4)inheritedFlags._h; - flags_01._h._1_1_ = (char)((uint)(undefined4)inheritedFlags._h >> 8); - flags_01._h._2_2_ = (short)((uint)(undefined4)inheritedFlags._h >> 0x10); - flags_01._h._4_4_ = inheritedFlags._h._4_4_; + (*(undefined4 *)((char *)&(flags_01._l) + 0x4)) = (*(undefined4 *)((char *)&(inheritedFlags._l) + 0x4)); + (*(undefined4 *)((char *)&(flags_01._l) + 0x0)) = (undefined4)inheritedFlags._l; + (*(undefined1 *)((char *)&(flags_01._h) + 0x0)) = (char)(undefined4)inheritedFlags._h; + (*(undefined1 *)((char *)&(flags_01._h) + 0x1)) = (char)(GHIDRA_UINT((undefined4)inheritedFlags._h) >> 8); + (*(undefined2 *)((char *)&(flags_01._h) + 0x2)) = (short)(GHIDRA_UINT((undefined4)inheritedFlags._h) >> 0x10); + (*(undefined4 *)((char *)&(flags_01._h) + 0x4)) = (*(undefined4 *)((char *)&(inheritedFlags._h) + 0x4)); SetTearFlags((Entity_Tear *)EVar28,flags_01); - auVar31 = ZEXT416((uint)(((Entity_Tear *)EVar14)->_collisionDamage * halfConst)); + auVar31 = ZEXT416(GHIDRA_UINT((((Entity_Tear *)EVar14)->_collisionDamage * halfConst))); (**(code **)(*(int *)EVar28 + 0x40))(); pcVar1 = *(code **)(*(int *)EVar28 + 0x3c); ((Entity *)((Entity *)EVar14))->Entity::GetColor(); @@ -4700,16 +4700,16 @@ LAB_0066ebda: FUN_00444c70(); ((Entity_Projectile *)((Entity_Projectile *)local_898))->Entity_Projectile::set_falling_accel(3.0); } - local_8b0 = (EntityPtr)((int)local_8b0 + 1); - if ((int)local_890 <= (int)local_8b0) break; + local_8b0 = (EntityPtr)(GHIDRA_INT(local_8b0) + 1); + if (GHIDRA_INT(local_890) <= GHIDRA_INT(local_8b0)) break; pBVar6 = &((Entity_Tear *)EVar14)->_tearFlags; } (**(code **)(*(int *)EVar14 + 0x28))(); } else { - auVar31 = ZEXT416((uint)((float)local_888 * 5.0)); + auVar31 = ZEXT416(GHIDRA_UINT(((float)local_888 * 5.0))); local_aa4 = 0x96; - local_aa0 = (int)((float)local_888 * 5.0); + local_aa0 = GHIDRA_INT(((float)local_888 * 5.0)); std::min(); local_aa8 = 0x50; piVar12 = (int *)std::max(); @@ -4717,7 +4717,7 @@ LAB_0066ebda: if ((*piVar12 <= iVar7) || (cVar5 = Entity::CollidesWithGrid(), cVar5 != '\0')) goto LAB_0066ebda; LAB_0066ef8a: - pVVar9 = (Vector *)((int)EVar14 + 0x33c); + pVVar9 = (Vector *)(GHIDRA_INT(EVar14) + 0x33c); } if (*(char *)((char *)EVar14 + 0x173) == '\0') { ((Level *)((Level *)g_game))->Level::GetCurrentRoom(); @@ -4747,14 +4747,14 @@ LAB_0066ef8a: ((Entity *)local_890,*(Entity **)((char *)EVar14 + 0x3c8)), bVar4 != 0)) { FUN_00417340(); - local_ab8 = auVar31._0_4_ + *(float *)((char *)EVar14 + 0x370); + local_ab8 = (*(undefined4 *)((char *)&(auVar31) + 0x0)) + *(float *)((char *)EVar14 + 0x370); local_abc = 0x40a00000; pEVar19 = (EntityPtr *)std::max(); local_87c = *pEVar19; pVVar15 = ((Entity *)((Entity *)local_890))->Entity::Position(&entityPos16); local_8ac = (EntityPtr)((Vector *)(pVVar15))->Vector::DistanceSquared(pVVar9); EVar28 = local_890; - auVar31 = ZEXT416((uint)((float)local_87c * (float)local_87c)); + auVar31 = ZEXT416(GHIDRA_UINT(((float)local_87c * (float)local_87c))); if ((float)local_8ac <= (float)local_87c * (float)local_87c) { fVar26 = (float10)Scale((Entity_Tear *)local_890); local_87c = (EntityPtr)(float)fVar26; @@ -4776,7 +4776,7 @@ LAB_0066ef8a: fVar26 = (float10)((Entity *)((Entity *)local_890))->Entity::CollisionDamage(); local_ae4 = (float)fVar26; pfVar16 = (float *)std::max(); - auVar31 = ZEXT416((uint)((float)local_8d8 + *pfVar16)); + auVar31 = ZEXT416(GHIDRA_UINT(((float)local_8d8 + *pfVar16))); (*pcVar1)(); (**(code **)(*(int *)EVar14 + 0x28))(); break; @@ -4794,22 +4794,22 @@ LAB_0066ef8a: fVar26 = (float10)((Entity *)((Entity *)local_890))->Entity::CollisionDamage(); local_ad0 = (float)fVar26; pfVar16 = (float *)std::max(); - auVar31 = ZEXT416((uint)((float)local_8d8 + *pfVar16)); + auVar31 = ZEXT416(GHIDRA_UINT(((float)local_8d8 + *pfVar16))); (*pcVar1)(); (**(code **)(*(int *)local_890 + 0x28))(); - pVVar9 = (Vector *)((int)EVar14 + 0x33c); + pVVar9 = (Vector *)(GHIDRA_INT(EVar14) + 0x33c); } } } } - local_8b0 = (EntityPtr)((int)local_8b0 + 1); + local_8b0 = (EntityPtr)(GHIDRA_INT(local_8b0) + 1); EVar28 = (EntityPtr)((EntityList *)((EntityList *)radiusQuery))->EntityList::Size(); - } while ((uint)local_8b0 < (uint)EVar28); + } while (GHIDRA_UINT(local_8b0) < GHIDRA_UINT(EVar28)); } ehState = 0xffffffff; ((EntityList_Query *)(radiusQuery))->EntityList_Query::~EntityList_Query(); } - pBVar6 = (BitSet128 *)((int)EVar14 + 0x428); + pBVar6 = (BitSet128 *)(GHIDRA_INT(EVar14) + 0x428); } } } @@ -4825,9 +4825,9 @@ LAB_0066ef8a: else { if (*(Entity **)((char *)EVar14 + 0x3bc) != (Entity *)0x0) { pVVar9 = ((Entity *)(*(Entity **)((char *)EVar14 + 0x3bc)))->Entity::Position(&parentPos4); - local_87c = (EntityPtr)((Vector *)((Vector *)((int)EVar14 + 0x33c)))->Vector::Distance(pVVar9); + local_87c = (EntityPtr)((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x33c)))->Vector::Distance(pVVar9); if (10.0 < (float)local_87c) { - ((EntityPtr *)((EntityPtr *)((int)EVar14 + 0x494)))->EntityPtr::Set(*(Entity **)((char *)EVar14 + 0x3bc)); + ((EntityPtr *)((EntityPtr *)(GHIDRA_INT(EVar14) + 0x494)))->EntityPtr::Set(*(Entity **)((char *)EVar14 + 0x3bc)); goto LAB_0066f416; } } @@ -4838,7 +4838,7 @@ LAB_0066ef8a: } } LAB_0066f416: - auVar31 = ZEXT416((uint)*(float *)((char *)EVar14 + 0x3a4)); + auVar31 = ZEXT416(GHIDRA_UINT(*(float *)((char *)EVar14 + 0x3a4))); if ((float)local_8fc < *(float *)((char *)EVar14 + 0x3a4)) { iVar7 = EntityPtr::Ref(); if (iVar7 != 0) { @@ -4851,8 +4851,8 @@ LAB_0066f416: ((iVar7 = Isaac::Random(10), iVar7 == 0 && (local_87c = (EntityPtr)find_link_partner((Entity_Tear *)EVar14), local_87c != (EntityPtr)0x0)))) { - ((EntityPtr *)((EntityPtr *)((int)EVar14 + 0x494)))->EntityPtr::Set((Entity *)local_87c); - ((EntityPtr *)((EntityPtr *)((int)local_87c + 0x498)))->EntityPtr::Set((Entity *)EVar14); + ((EntityPtr *)((EntityPtr *)(GHIDRA_INT(EVar14) + 0x494)))->EntityPtr::Set((Entity *)local_87c); + ((EntityPtr *)((EntityPtr *)(GHIDRA_INT(local_87c) + 0x498)))->EntityPtr::Set((Entity *)EVar14); } } LAB_0066f4a9: @@ -4871,52 +4871,52 @@ LAB_0066f4a9: local_8ac = (EntityPtr)__RTDynamicCast(); if (local_8ac != (EntityPtr)0x0) { pVVar9 = ((Entity *)((Entity *)local_8e0))->Entity::Position(&entityPos17); - ((Vector *)((Vector *)((int)EVar14 + 0x33c)))->Vector::__sub(&local_cb0,pVVar9); + ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x33c)))->Vector::__sub(&local_cb0,pVVar9); local_96c = (undefined1 *)0x3f800000; pBVar6 = BitSet128::operator_and(&boomerangMask6,pBVar6,&g_tearFlagBoomerang); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if ((bVar4 != 0) && - (local_87c = (EntityPtr)((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::Dot(&local_cb0), + (local_87c = (EntityPtr)((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::Dot(&local_cb0), (float)local_87c < zeroConst)) { local_96c = &DAT_bf800000; } - local_87c = (EntityPtr)((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::Length(); + local_87c = (EntityPtr)((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::Length(); fVar26 = (float10)((Entity_Projectile *)((Entity_Projectile *)local_8ac))->Entity_Projectile::Damage(); Vector::FromAngle(&local_cb8,(float)fVar26); - auVar31 = ZEXT416((uint)local_87c); + auVar31 = ZEXT416(GHIDRA_UINT(local_87c)); pVVar9 = ((Vector *)(&local_cb8))->Vector::Resized(&resized,(float)local_87c); pVVar9 = ((Vector *)(pVVar9))->Vector::__mul(&local_1238,(float *)&local_96c); - ((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::operator_assign(pVVar9); + ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::operator_assign(pVVar9); pVVar9 = ((Entity *)((Entity *)local_8e0))->Entity::Position(&entityPos18); local_ae8 = ((Vector *)(&local_cb0))->Vector::Length(); pVVar15 = ((Vector *)(&local_cb8))->Vector::__mul(&local_1248,&local_ae8); pVVar9 = ((Vector *)(pVVar9))->Vector::__add(&local_1250,pVVar15); - ((Vector *)((Vector *)((int)EVar14 + 0x33c)))->Vector::operator_assign(pVVar9); + ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x33c)))->Vector::operator_assign(pVVar9); } } } - pVVar9 = (Vector *)((int)EVar14 + 0x33c); + pVVar9 = (Vector *)(GHIDRA_INT(EVar14) + 0x33c); outResult = (TypeDescriptor *)0x66f6d1; bVar4 = ((Entity *)((Entity *)EVar14))->Entity::HasEntityFlags(0x80000); if (bVar4 != 0) { fVar27 = *(float *)((char *)EVar14 + 0x3a4); - auVar31 = ZEXT416((uint)fVar27); + auVar31 = ZEXT416(GHIDRA_UINT(fVar27)); if (5.0 <= fVar27) { outResult = (TypeDescriptor *)0x66f72f; ((Entity *)((Entity *)EVar14))->Entity::ClearEntityFlags(0x80000); } else { fVar27 = assert_lerp_range(fVar27,zeroConst,5.0,0.55,1.0,1); - auVar31._0_4_ = (EntityPtr)(fVar27 * *(float *)((char *)EVar14 + 0x36c)); - auVar31._4_12_ = extraout_var_27; - *(EntityPtr *)((char *)EVar14 + 0x36c) = auVar31._0_4_; + (*(undefined4 *)((char *)&(auVar31) + 0x0)) = (EntityPtr)(fVar27 * *(float *)((char *)EVar14 + 0x36c)); + (*(undefined1 *)((char *)&(auVar31) + 0x4)) = extraout_var_27; + *(EntityPtr *)((char *)EVar14 + 0x36c) = (*(undefined4 *)((char *)&(auVar31) + 0x0)); } } - pBVar6 = BitSet128::operator_and(&popMask,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagPop); + pBVar6 = BitSet128::operator_and(&popMask,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagPop); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { pBVar6 = BitSet128::operator_and - (&ludovicoMask16,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagLudovico); + (&ludovicoMask16,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagLudovico); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsZero(); if (bVar4 != 0) { ((Level *)((Level *)g_game))->Level::GetCurrentRoom(); @@ -4940,15 +4940,15 @@ LAB_0066f4a9: outResult = (TypeDescriptor *)0x66f832; ((Vector *)(pVVar9))->Vector::__sub(&separation,pVVar15); FUN_00417340(); - local_8c0 = (EntityPtr)((auVar31._0_4_ + *(float *)((char *)EVar14 + 0x370)) * 0.9); + local_8c0 = (EntityPtr)(((*(undefined4 *)((char *)&(auVar31) + 0x0)) + *(float *)((char *)EVar14 + 0x370)) * 0.9); local_87c = (EntityPtr)((Vector *)(&separation))->Vector::LengthSquared(); - auVar31 = ZEXT416((uint)local_87c); + auVar31 = ZEXT416(GHIDRA_UINT(local_87c)); if ((float)local_87c <= (float)local_8c0 * (float)local_8c0) { local_87c = (EntityPtr)((Vector *)(&separation))->Vector::LengthSquared(); - auVar31 = ZEXT416((uint)local_87c); + auVar31 = ZEXT416(GHIDRA_UINT(local_87c)); if ((float)local_87c != zeroConst) { ((Vector *)(&separation))->Vector::Normalized(&separationDir); - pVVar24 = (Vector *)((int)EVar14 + 0x360); + pVVar24 = (Vector *)(GHIDRA_INT(EVar14) + 0x360); local_8e0 = (Entity_Player *)((Vector *)(pVVar24))->Vector::Dot(&separationDir); pVVar9 = ((Entity *)((Entity *)local_898))->Entity::Velocity(&entityVel3); local_8d0 = (EntityPtr)((Vector *)(pVVar9))->Vector::Dot(&separationDir); @@ -4959,7 +4959,7 @@ LAB_0066f4a9: ((Vector *)(pVVar24))->Vector::__add(&bouncedVel,pVVar9); pVVar9 = ((Entity *)((Entity *)local_898))->Entity::Velocity(&entityVel4); otherRelSpeed = (float)local_8e0 - (float)local_8d0; - auVar31 = ZEXT416((uint)otherRelSpeed); + auVar31 = ZEXT416(GHIDRA_UINT(otherRelSpeed)); pVVar15 = ((Vector *)(&separationDir))->Vector::__mul(&local_1280,&otherRelSpeed); pVVar15 = ((Vector *)(pVVar15))->Vector::__mul(&local_1288,&bounceFactor); ((Vector *)(pVVar9))->Vector::__add(&otherBouncedVel,pVVar15); @@ -4977,17 +4977,17 @@ LAB_0066f4a9: ((Entity *)((Entity *)local_898))->Entity::SetPosition(&otherPushedPos); EVar14 = (EntityPtr)tear; tear->_popBounceCount = tear->_popBounceCount + 1; - *(short *)&((AnimationState *)((int)local_898 + 0x46c))->_animation = - *(short *)&((AnimationState *)((int)local_898 + 0x46c))->_animation + 1; + *(short *)&((AnimationState *)(GHIDRA_INT(local_898) + 0x46c))->_animation = + *(short *)&((AnimationState *)(GHIDRA_INT(local_898) + 0x46c))->_animation + 1; outResult = (TypeDescriptor *)0x2; in_stack_ffffd9fc = pVVar9; - SoundEffects::PlayWithFartOverride2(0x1ca,(int)pVVar9,2,0,1.0,oneConst); + SoundEffects::PlayWithFartOverride2(0x1ca,GHIDRA_INT(pVVar9),2,0,1.0,oneConst); } } } - local_8b0 = (EntityPtr)((int)local_8b0 + 1); + local_8b0 = (EntityPtr)(GHIDRA_INT(local_8b0) + 1); EVar28 = (EntityPtr)((EntityList *)((EntityList *)popTearQuery))->EntityList::Size(); - } while ((uint)local_8b0 < (uint)EVar28); + } while (GHIDRA_UINT(local_8b0) < GHIDRA_UINT(EVar28)); } ehState = 0xffffffff; *(float *)((char *)EVar14 + 0x36c) = *(float *)((char *)EVar14 + 0x36c) * 0.96; @@ -4997,19 +4997,19 @@ LAB_0066f4a9: if (-5.0 < *(float *)((char *)EVar14 + 0x410)) { LAB_0066fb70: pBVar6 = BitSet128::operator_and - (&ludovicoMask17,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagLudovico); + (&ludovicoMask17,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagLudovico); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsZero(); if (bVar4 == 0) goto LAB_0066fc9b; if ((*(int *)((char *)EVar14 + 0x2c) == 9) && (*(char *)((char *)EVar14 + 0x173) == '\0')) { - ((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::operator_assign(&g_vectorZero); + ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::operator_assign(&g_vectorZero); *(undefined4 *)((char *)EVar14 + 0x184) = 0; *(undefined4 *)((char *)EVar14 + 0x188) = 0; - ((Sprite *)((Sprite *)((int)EVar14 + 0x48)))->Sprite::SetRotation(180.0); + ((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x48)))->Sprite::SetRotation(180.0); outResult = (TypeDescriptor *)0x66fbea; - ((ANM2 *)((ANM2 *)((int)EVar14 + 0x48)))->ANM2::Play((byte *)"Stuck",0); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(EVar14) + 0x48)))->ANM2::Play((byte *)"Stuck",0); } pBVar6 = BitSet128::operator_and - (&hydrobounceMask6,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagHydrobounce) + (&hydrobounceMask6,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagHydrobounce) ; bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { @@ -5034,7 +5034,7 @@ LAB_0066fb70: goto LAB_00670391; } pBVar6 = BitSet128::operator_and - (&hydrobounceMask7,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagHydrobounce); + (&hydrobounceMask7,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagHydrobounce); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if ((bVar4 != 0) && (-5.0 < *(float *)((char *)EVar14 + 0x414) + *(float *)((char *)EVar14 + 0x410))) goto LAB_0066fb70; @@ -5042,37 +5042,37 @@ LAB_0066fc9b: pBVar6 = BitSet128::operator_or(&withBounceWallsonly,&g_tearFlagBounce,&g_tearFlagBounceWallsonly) ; outResult = (TypeDescriptor *)0x66fcc2; - pBVar6 = BitSet128::operator_and(&andResult23,(BitSet128 *)((int)EVar14 + 0x428),pBVar6); + pBVar6 = BitSet128::operator_and(&andResult23,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),pBVar6); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if ((bVar4 == 0) && (*(int *)((char *)EVar14 + 0x2c) != 0x2e)) { LAB_0066fcf0: pBVar6 = BitSet128::operator_and - (&ludovicoMask18,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagLudovico); + (&ludovicoMask18,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagLudovico); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if ((bVar4 != 0) && ((*(byte *)((char *)EVar14 + 0x30) & 2) != 0)) goto LAB_00670254; pBVar6 = BitSet128::operator_and - (&rerollRockWispMask,(BitSet128 *)((int)EVar14 + 0x428), + (&rerollRockWispMask,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428), &g_tearFlagRerollRockWisp); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); pEVar30 = (Entity_Projectile *)((Room *)(room))->Room::GetGridIndex(pVVar9); local_8ac = (EntityPtr)pEVar30; - if (-1 < (int)pEVar30) { + if (-1 < GHIDRA_INT(pEVar30)) { room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); - local_8e0 = (Entity_Player *)((Room *)(room))->Room::GetGridEntity((uint)pEVar30); + local_8e0 = (Entity_Player *)((Room *)(room))->Room::GetGridEntity(GHIDRA_UINT(pEVar30)); if ((local_8e0 != (Entity_Player *)0x0) && (bVar4 = ((GridEntity *)((GridEntity *)local_8e0))->GridEntity::IsBreakableRock(), bVar4 != 0)) { ((BitSet128 *)(&g_tearFlagRerollRockWisp))->BitSet128::__bnot(¬RerollRockWisp); FUN_005cd430(); FUN_00665b70(); ((GridEntity_Rock *)((GridEntity_Rock *)local_8e0))->GridEntity_Rock::UpdateNeighbors(); - local_87c = (EntityPtr)((RNG *)((RNG *)((int)EVar14 + 0x3dc)))->RNG::RandomInt(6); + local_87c = (EntityPtr)((RNG *)((RNG *)(GHIDRA_INT(EVar14) + 0x3dc)))->RNG::RandomInt(6); room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); tintedRockIdx = ((Room *)(room))->Room::GetTintedRockIdx(); - local_890 = (EntityPtr)((uint)(pEVar30 == (Entity_Projectile *)tintedRockIdx) * 2 + 2); + local_890 = (EntityPtr)(GHIDRA_UINT((pEVar30 == (Entity_Projectile *)tintedRockIdx)) * 2 + 2); if ((pEVar30 == (Entity_Projectile *)tintedRockIdx) && - (uVar10 = ((RNG *)((RNG *)((int)EVar14 + 0x3dc)))->RNG::RandomInt(0x14), uVar10 == 0)) { + (uVar10 = ((RNG *)((RNG *)(GHIDRA_INT(EVar14) + 0x3dc)))->RNG::RandomInt(0x14), uVar10 == 0)) { persistentGameData = (PersistentGameData *)((Room *)((Room *)g_manager))->Room::GetTopLeftPos(); bVar4 = ((PersistentGameData *)(persistentGameData))->PersistentGameData::Unlocked(0x143); if (bVar4 != 0) { @@ -5082,7 +5082,7 @@ LAB_0066fcf0: local_888 = (EntityPtr)0x0; switch(local_87c) { case (EntityPtr)0x0: - local_87c = (EntityPtr)((RNG *)((RNG *)((int)EVar14 + 0x3dc)))->RNG::RandomFloat(); + local_87c = (EntityPtr)((RNG *)((RNG *)(GHIDRA_INT(EVar14) + 0x3dc)))->RNG::RandomFloat(); local_890 = (EntityPtr)0xe; if (pointSixConst <= (float)local_87c) { if (0.8 <= (float)local_87c) { @@ -5116,28 +5116,28 @@ LAB_0066fcf0: local_890 = (EntityPtr)0xc; } room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); - ((Room *)(room))->Room::SetGridPath((int)pEVar30,0); + ((Room *)(room))->Room::SetGridPath(GHIDRA_INT(pEVar30),0); room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); - uVar10 = ((RNG *)((RNG *)((int)EVar14 + 0x3dc)))->RNG::Next(); + uVar10 = ((RNG *)((RNG *)(GHIDRA_INT(EVar14) + 0x3dc)))->RNG::Next(); in_stack_ffffd9fc = (Vector *)local_890; outResult = (TypeDescriptor *)local_888; - ((Room *)(room))->Room::SpawnGridEntity((int)local_8ac,(uint)local_890,(uint)local_888,uVar10,0); + ((Room *)(room))->Room::SpawnGridEntity(GHIDRA_INT(local_8ac),GHIDRA_UINT(local_890),GHIDRA_UINT(local_888),uVar10,0); } } goto LAB_00670391; } if ((*(char *)((char *)EVar14 + 400) != '\0') && (-60.0 < *(float *)((char *)EVar14 + 0x410))) { pBVar6 = BitSet128::operator_and - (&ludovicoMask19,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagLudovico); + (&ludovicoMask19,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagLudovico); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsZero(); if ((bVar4 == 0) || (*(int *)((char *)EVar14 + 0x2c) == 9)) goto LAB_0066ffc8; LAB_00670079: pBVar6 = BitSet128::operator_and - (&spectralMask2,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagSpectral); + (&spectralMask2,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagSpectral); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsZero(); if ((bVar4 == 0) && (*(int *)((char *)EVar14 + 0x2c) != 4)) goto LAB_00670391; pBVar6 = BitSet128::operator_and - (&stickyMask2,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagSticky); + (&stickyMask2,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagSticky); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsZero(); if (bVar4 == 0) { LAB_00670113: @@ -5145,11 +5145,11 @@ LAB_00670113: } else { pBVar6 = BitSet128::operator_and - (&boogerMask,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagBooger); + (&boogerMask,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagBooger); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsZero(); if (bVar4 == 0) goto LAB_00670113; pBVar6 = BitSet128::operator_and - (&sporeMask2,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagSpore); + (&sporeMask2,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagSpore); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsZero(); if (bVar4 == 0) goto LAB_00670113; } @@ -5220,7 +5220,7 @@ LAB_00670062: LAB_0067039b: if (*(char *)((char *)EVar14 + 0x173) == '\0') { room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); - EVar28 = (EntityPtr)((int)EVar14 + 0x33c); + EVar28 = (EntityPtr)(GHIDRA_INT(EVar14) + 0x33c); outResult = (TypeDescriptor *)&DAT_bf800000; in_stack_ffffd9fc = (Vector *)EVar28; Room::GetClampedPositionImpl @@ -5236,29 +5236,29 @@ LAB_0067039b: local_8ac = (EntityPtr)*puVar13; local_8e0 = (Entity_Player *)puVar13[1]; outResult = (TypeDescriptor *)0x670463; - ((ANM2 *)((ANM2 *)((int)EVar14 + 0x48)))->ANM2::Play((byte *)"Stuck",0); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(EVar14) + 0x48)))->ANM2::Play((byte *)"Stuck",0); if ((float)local_87c <= *(float *)EVar28) { if (*(float *)EVar28 <= (float)local_8ac) { if ((float)local_8cc <= *(float *)((char *)EVar14 + 0x340)) { if ((float)local_8e0 < *(float *)((char *)EVar14 + 0x340)) { - ((Sprite *)((Sprite *)((int)EVar14 + 0x48)))->Sprite::set_flip_x(zeroConst < *(float *)((char *)EVar14 + 0x360)); - set_byte_0x101((void *)((int)EVar14 + 0x48),1); + ((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x48)))->Sprite::set_flip_x(zeroConst < *(float *)((char *)EVar14 + 0x360)); + set_byte_0x101((void *)(GHIDRA_INT(EVar14) + 0x48),1); } } else { - ((Sprite *)((Sprite *)((int)EVar14 + 0x48)))->Sprite::set_flip_x(*(float *)((char *)EVar14 + 0x360) <= zeroConst && + ((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x48)))->Sprite::set_flip_x(*(float *)((char *)EVar14 + 0x360) <= zeroConst && zeroConst != *(float *)((char *)EVar14 + 0x360)); } } else { - ((Sprite *)((Sprite *)((int)EVar14 + 0x48)))->Sprite::SetRotation(90.0); + ((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x48)))->Sprite::SetRotation(90.0); } } else { - ((Sprite *)((Sprite *)((int)EVar14 + 0x48)))->Sprite::SetRotation(90.0); - ((Sprite *)((Sprite *)((int)EVar14 + 0x48)))->Sprite::set_flip_x(1); + ((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x48)))->Sprite::SetRotation(90.0); + ((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x48)))->Sprite::set_flip_x(1); } - ((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::operator_assign(&g_vectorZero); + ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::operator_assign(&g_vectorZero); *(undefined4 *)((char *)EVar14 + 0x184) = 0; *(undefined4 *)((char *)EVar14 + 0x188) = 0; *(undefined1 *)((char *)EVar14 + 0x173) = 1; @@ -5266,7 +5266,7 @@ LAB_0067039b: } room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); local_87c = (EntityPtr)((Room *)(room))->Room::GetGridIndex((Vector *)EVar28); - if (-1 < (int)local_87c) { + if (-1 < GHIDRA_INT(local_87c)) { room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); ((EntityRef *)(&local_2598))->EntityRef::constructor((Entity *)EVar14); outResult = (TypeDescriptor *)0x0; @@ -5281,7 +5281,7 @@ LAB_0067039b: if (bVar4 != 0) goto LAB_0066fcf0; LAB_00670254: pBVar6 = BitSet128::operator_and - (&spectralMask3,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagSpectral); + (&spectralMask3,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagSpectral); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); uVar20 = 6; if (bVar4 != 0) { @@ -5289,15 +5289,15 @@ LAB_00670254: } *(undefined4 *)((char *)EVar14 + 0x184) = uVar20; if (*(char *)((char *)EVar14 + 400) != '\0') { - pVVar9 = (Vector *)((int)EVar14 + 0x360); - ((Vector *)((Vector *)((int)EVar14 + 0x33c)))->Vector::__sub(&local_12a8,pVVar9); + pVVar9 = (Vector *)(GHIDRA_INT(EVar14) + 0x360); + ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x33c)))->Vector::__sub(&local_12a8,pVVar9); try_make_bridges(); ((Vector *)(pVVar9))->Vector::Normalize(); - local_af0 = ((Vector *)((Vector *)((int)EVar14 + 0x194)))->Vector::Length(); + local_af0 = ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x194)))->Vector::Length(); ((Vector *)(pVVar9))->Vector::operator_mul_assign(&local_af0); ((BitSet128 *)(&g_tearFlagTractorBeam))->BitSet128::__bnot(¬TractorBeam); FUN_005cd430(); - ((std::vector *)((void *)((int)EVar14 + 0x444)))->std::vector::clear(0); + ((std::vector *)((void *)(GHIDRA_INT(EVar14) + 0x444)))->std::vector::clear(0); local_87c = (EntityPtr)oneConst; EVar28 = (EntityPtr)oneConst; if (*(Entity **)((char *)EVar14 + 0x3c8) != (Entity *)0x0) { @@ -5322,21 +5322,21 @@ LAB_00670254: LAB_00670391: if (*(int *)((char *)EVar14 + 0x2c) == 9) goto LAB_0067039b; } - pVVar9 = (Vector *)((int)EVar14 + 0x33c); + pVVar9 = (Vector *)(GHIDRA_INT(EVar14) + 0x33c); if (((*(int *)((char *)EVar14 + 0x2c) == 0x2b) || (*(int *)((char *)EVar14 + 0x2c) == 0x2c)) && ((*(char *)((char *)EVar14 + 0x173) == '\0' && (local_8b0 = (EntityPtr)((Entity *)(*(Entity **)((char *)EVar14 + 0x3c8)))->Entity::ToPlayer(), local_8b0 != (EntityPtr)0x0)))) { - ((Vector *)(pVVar9))->Vector::__add(&local_9cc,(Vector *)((int)EVar14 + 0x360)); - bVar4 = ((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::operator_ne(&g_vectorZero); + ((Vector *)(pVVar9))->Vector::__add(&local_9cc,(Vector *)(GHIDRA_INT(EVar14) + 0x360)); + bVar4 = ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::operator_ne(&g_vectorZero); if (bVar4 != 0) { - pVVar9 = ((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::Normalized(&direction12); - pVVar9 = ((Vector *)(pVVar9))->Vector::__mul(&local_12b8,(float *)((int)EVar14 + 0x370)); + pVVar9 = ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::Normalized(&direction12); + pVVar9 = ((Vector *)(pVVar9))->Vector::__mul(&local_12b8,(float *)(GHIDRA_INT(EVar14) + 0x370)); ((Vector *)(&local_9cc))->Vector::operator_add_assign(pVVar9); } local_890 = (EntityPtr)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); uVar10 = ((Room *)((Room *)local_890))->Room::GetGridIndex(&local_9cc); - if (-1 < (int)uVar10) { + if (-1 < GHIDRA_INT(uVar10)) { local_88c = (EntityPtr)((Room *)((Room *)local_890))->Room::GetGridEntity(uVar10); pos.y = local_9cc.y; pos.x = local_9cc.x; @@ -5389,13 +5389,13 @@ LAB_00670792: ((Entity *)((Entity *)EVar14))->Entity::Die(); } ((GridEntity *)((GridEntity *)local_88c))->GridEntity::Position(&gridPos); - pVVar9 = ((Vector *)(&gridPos))->Vector::__sub(&local_12c0,(Vector *)((int)EVar14 + 0x33c)); + pVVar9 = ((Vector *)(&gridPos))->Vector::__sub(&local_12c0,(Vector *)(GHIDRA_INT(EVar14) + 0x33c)); pVVar9 = Vector::ToCardinal(&cardinalDir,pVVar9); local_af4 = 40.0; pVVar9 = Vector::operator_mul(&local_12d0,&local_af4,pVVar9); pVVar9 = ((Vector *)(&gridPos))->Vector::__add(&local_12d8,pVVar9); uVar10 = ((Room *)((Room *)local_890))->Room::GetGridIndex(pVVar9); - if (-1 < (int)uVar10) { + if (-1 < GHIDRA_INT(uVar10)) { EVar28 = local_88c; gridEntity = ((Room *)((Room *)local_890))->Room::GetGridEntity(uVar10); ((Room *)((Room *)local_890))->Room::TryMakeBridge(gridEntity,(GridEntity *)EVar28); @@ -5406,9 +5406,9 @@ LAB_00670792: } } LAB_006708cc: - pVVar9 = (Vector *)((int)EVar14 + 0x33c); + pVVar9 = (Vector *)(GHIDRA_INT(EVar14) + 0x33c); entityList = (EntityList *)FUN_00428a60(); - outResult = (TypeDescriptor *)((int)local_d08 + 0x10); + outResult = (TypeDescriptor *)(GHIDRA_INT(local_d08) + 0x10); in_stack_ffffd9fc = (Vector *)0x6708f0; EntityList::QueryRadius(entityList,(EntityList_EL *)outResult,pVVar9,24.0,0x10); ehState = 8; @@ -5444,12 +5444,12 @@ LAB_006708cc: ((EntityList_Query *)(local_d08 + 0x10))->EntityList_Query::~EntityList_Query(); } pBVar6 = BitSet128::operator_and - (&ludovicoMask20,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagLudovico); + (&ludovicoMask20,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagLudovico); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { local_888 = (EntityPtr)(*(uint *)((char *)EVar14 + 0x30) >> 1 & 0xffffff01); local_8a1 = is_not_familiar_spawned((Entity_Tear *)EVar14); - if (local_888._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_888) + 0x0)) == '\0') { fVar27 = 0.7; } else { @@ -5465,7 +5465,7 @@ LAB_006708cc: FUN_005cd750(); } local_8cc = EVar28; - pBVar6 = BitSet128::operator_and(&flatMask2,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagFlat); + pBVar6 = BitSet128::operator_and(&flatMask2,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagFlat); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { if (local_890 == (EntityPtr)0x0) { @@ -5474,7 +5474,7 @@ LAB_006708cc: if (bVar4 != 0) goto LAB_00670ae2; } pVVar15 = ((Vector *)(&local_12e0))->Vector::Vector(oneConst,oneConst); - ((Vector *)((Vector *)((int)EVar14 + 0x374)))->Vector::operator_assign(pVVar15); + ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x374)))->Vector::operator_assign(pVVar15); FUN_00665a50(); } LAB_00670ae2: @@ -5482,14 +5482,14 @@ LAB_00670ae2: (bVar4 = ((Entity *)(*(Entity **)((char *)EVar14 + 0x3bc)))->Entity::IsFamiliar(), bVar4 != 0)) { local_8dc = local_8dc * local_8ec; } - local_8b0 = (EntityPtr)((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::Length(); - if (local_888._0_1_ != '\0') { + local_8b0 = (EntityPtr)((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::Length(); + if ((*(undefined1 *)((char *)&(local_888) + 0x0)) != '\0') { fVar27 = assert_lerp_range((float)local_8b0,10.0,20.0,0.9,2.0,1); local_8dc = fVar27 * local_8dc; } local_89c = (EntityPtr)((Entity *)((Entity *)EVar14))->Entity::GetIntervalTicks((float)local_8cc,zeroConst); if (local_89c != (EntityPtr)0x0) { - ((std::vector *)((void *)((int)EVar14 + 0x444)))->std::vector::clear(0); + ((std::vector *)((void *)(GHIDRA_INT(EVar14) + 0x444)))->std::vector::clear(0); try_make_bridges(); if (local_890 != (EntityPtr)0x0) { pEVar11 = *(Entity **)((char *)EVar14 + 0x3c8); @@ -5505,17 +5505,17 @@ LAB_00670ae2: ((Entity *)((Entity *)EVar14))->Entity::LoadEntityConfig(); *(undefined4 *)((char *)EVar14 + 0x184) = 0; if (*(int *)((char *)EVar14 + 0x330) != 0) { - ((ANM2 *)((ANM2 *)((int)EVar14 + 0x48)))->ANM2::Load((std_string *)(*(int *)((char *)EVar14 + 0x330) + 0x74),1); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(EVar14) + 0x48)))->ANM2::Load((std_string *)(*(int *)((char *)EVar14 + 0x330) + 0x74),1); bVar4 = 0; psVar21 = (std_string *) - ((Sprite *)((Sprite *)((int)EVar14 + 0x48)))->Sprite::GetDefaultAnimationName(); - ((Sprite *)((Sprite *)((int)EVar14 + 0x48)))->Sprite::Play(psVar21,bVar4); - ((Sprite *)((Sprite *)((int)EVar14 + 0x48)))->Sprite::SetRotation(0.0); + ((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x48)))->Sprite::GetDefaultAnimationName(); + ((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x48)))->Sprite::Play(psVar21,bVar4); + ((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x48)))->Sprite::SetRotation(0.0); ResetSpriteScale((Entity_Tear *)EVar14); } } } - if (local_888._0_1_ != '\0') { + if ((*(undefined1 *)((char *)&(local_888) + 0x0)) != '\0') { if (10.0 < (float)local_8b0) { fVar27 = assert_lerp_range((float)local_8b0,10.0,20.0,oneConst,6.0,1); local_f8._tearDamage = fVar27 * local_f8._tearDamage; @@ -5532,30 +5532,30 @@ LAB_00670ae2: pBVar6 = BitSet128::operator_and(&andResult24,&local_f8._flags,pBVar6); pBVar6 = BitSet128::operator_or(&orResult13,pBVar6,pBVar8); EVar29 = *(EntityPtr *)&pBVar6->_l; - outResult = *(TypeDescriptor **)((int)&pBVar6->_l + 4); - flags_02._h._1_1_ = (char)(pBVar6->_h >> 8); - flags_02._0_9_ = *(unkbyte9 *)pBVar6; - flags_02._h._2_2_ = (short)(pBVar6->_h >> 0x10); - flags_02._h._4_4_ = *(undefined4 *)((int)&pBVar6->_h + 4); + outResult = *(TypeDescriptor **)(GHIDRA_INT(&pBVar6->_l) + 4); + (*(undefined1 *)((char *)&(flags_02._h) + 0x1)) = (char)(pBVar6->_h >> 8); + (*(undefined1 *)((char *)&(flags_02) + 0x0)) = *(unkbyte9 *)pBVar6; + (*(undefined2 *)((char *)&(flags_02._h) + 0x2)) = (short)(pBVar6->_h >> 0x10); + (*(undefined4 *)((char *)&(flags_02._h) + 0x4)) = *(undefined4 *)(GHIDRA_INT(&pBVar6->_h) + 4); in_stack_ffffd9fc = (Vector *)EVar29; SetTearFlags((Entity_Tear *)EVar14,flags_02); if (local_8a1 != 0) { pBVar6 = BitSet128::operator_and - (&growMask2,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagGrow); + (&growMask2,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagGrow); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { pVVar9 = ((Entity *)(*(Entity **)((char *)EVar14 + 0x3bc)))->Entity::Position(&parentPos5); - local_87c = (EntityPtr)((Vector *)(pVVar9))->Vector::Distance((Vector *)((int)EVar14 + 0x33c)); + local_87c = (EntityPtr)((Vector *)(pVVar9))->Vector::Distance((Vector *)(GHIDRA_INT(EVar14) + 0x33c)); fVar27 = Math::clamp(oneConst,700.0,(float)local_87c); EVar29 = (EntityPtr)((fVar27 / 700.0 + oneConst) * *(float *)((char *)EVar14 + 0x388)); *(EntityPtr *)((char *)EVar14 + 0x388) = EVar29; } pBVar6 = BitSet128::operator_and - (&shrinkMask2,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagShrink); + (&shrinkMask2,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagShrink); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { pVVar9 = ((Entity *)(*(Entity **)((char *)EVar14 + 0x3bc)))->Entity::Position(&parentPos6); - local_87c = (EntityPtr)((Vector *)(pVVar9))->Vector::Distance((Vector *)((int)EVar14 + 0x33c)); + local_87c = (EntityPtr)((Vector *)(pVVar9))->Vector::Distance((Vector *)(GHIDRA_INT(EVar14) + 0x33c)); fVar27 = Math::clamp(zeroConst,700.0,(float)local_87c); EVar29 = (EntityPtr)(fVar27 / 900.0); *(float *)((char *)EVar14 + 0x388) = @@ -5564,12 +5564,12 @@ LAB_00670ae2: EVar28 = local_890; } pBVar6 = BitSet128::operator_and - (&occultMask2,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagOccult); + (&occultMask2,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagOccult); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (((bVar4 == 0) || (iVar7 = ((Entity_Player *)((Entity_Player *)EVar28))->Entity_Player::GetFireDirection(), iVar7 == -1)) || - ((int)local_89c < 1)) { - pVVar9 = (Vector *)((int)EVar14 + 0x33c); + (GHIDRA_INT(local_89c) < 1)) { + pVVar9 = (Vector *)(GHIDRA_INT(EVar14) + 0x33c); } else { do { @@ -5578,12 +5578,12 @@ LAB_00670ae2: EVar29 = (EntityPtr)((float)EVar29 * 10.0); local_af8 = EVar29; pVVar15 = Vector::operator_mul(&local_1300,(float *)&local_af8,pVVar9); - pVVar9 = (Vector *)((int)EVar14 + 0x33c); + pVVar9 = (Vector *)(GHIDRA_INT(EVar14) + 0x33c); outResult = (TypeDescriptor *)0x7; in_stack_ffffd9fc = (Vector *)pVVar15->y; Entity_Player::FireTear ((Entity_Player *)local_890,pVVar9,*pVVar15,7,(Entity *)EVar14,1.0); - local_89c = (EntityPtr)((int)local_89c + -1); + local_89c = (EntityPtr)(GHIDRA_INT(local_89c) + -1); } while (local_89c != (EntityPtr)0x0); local_89c = (EntityPtr)0x0; } @@ -5598,11 +5598,11 @@ LAB_00670ae2: if (cVar5 != '\0') { ((Entity *)((Entity *)EVar14))->Entity::LoadEntityConfig(); if (*(int *)((char *)EVar14 + 0x330) != 0) { - ((ANM2 *)((ANM2 *)((int)EVar14 + 0x48)))->ANM2::Load((std_string *)(*(int *)((char *)EVar14 + 0x330) + 0x74),1); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(EVar14) + 0x48)))->ANM2::Load((std_string *)(*(int *)((char *)EVar14 + 0x330) + 0x74),1); bVar4 = 0; - psVar21 = (std_string *)((Sprite *)((Sprite *)((int)EVar14 + 0x48)))->Sprite::GetDefaultAnimationName(); + psVar21 = (std_string *)((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x48)))->Sprite::GetDefaultAnimationName(); outResult = (TypeDescriptor *)0x6715e3; - ((Sprite *)((Sprite *)((int)EVar14 + 0x48)))->Sprite::Play(psVar21,bVar4); + ((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x48)))->Sprite::Play(psVar21,bVar4); ResetSpriteScale((Entity_Tear *)EVar14); } } @@ -5611,18 +5611,18 @@ LAB_00670ae2: if (((iVar7 == 5) || (iVar7 == 6)) || ((iVar7 == 7 || (((iVar7 == 0x14 || (iVar7 == 0x21)) || (iVar7 == 0x22)))))) { LAB_0067162f: - ((Sprite *)((Sprite *)((int)EVar14 + 0x48)))->Sprite::SetRotation(*(float *)((char *)EVar14 + 0x458)); + ((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x48)))->Sprite::SetRotation(*(float *)((char *)EVar14 + 0x458)); } else { pBVar6 = BitSet128::operator_and - (&flatMask3,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagFlat); + (&flatMask3,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagFlat); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) goto LAB_0067162f; } if ((*(byte *)((char *)EVar14 + 0x30) & 1) != 0) { if (*(Entity **)((char *)EVar14 + 0x3bc) != (Entity *)0x0) { pVVar9 = ((Entity *)(*(Entity **)((char *)EVar14 + 0x3bc)))->Entity::Position(&parentPos7); - pVVar24 = (Vector *)((int)EVar14 + 0x7f4); + pVVar24 = (Vector *)(GHIDRA_INT(EVar14) + 0x7f4); iVar7 = ((Entity *)((Entity *)tear))->Entity::FrameCount(); iVar7 = iVar7 + tear->_index * 0x32; fVar27 = sinf_wrapper((float)((double)iVar7 + __uint_to_double_fixup[-(iVar7 >> 0x1f)]) * @@ -5635,7 +5635,7 @@ LAB_0067162f: ((Vector *)(tearPos))->Vector::operator_assign(pVVar15); outResult = (TypeDescriptor *)0x67174f; pVVar15 = ((Vector *)(pVVar24))->Vector::Rotated(&rotatedDir, - ((float)((uint)tear->_index % 10) + 0.0) * 0.1 - 4.0); + ((float)(GHIDRA_UINT(tear->_index) % 10) + 0.0) * 0.1 - 4.0); ((Vector *)(pVVar24))->Vector::operator_assign(pVVar15); EVar14 = (EntityPtr)tear; } @@ -5657,10 +5657,10 @@ LAB_0067162f: do { pEVar19 = (EntityPtr *)FUN_0042c810(); local_898 = *pEVar19; - ((Entity *)((Entity *)local_898))->Entity::SetVelocity((Vector *)((int)EVar14 + 0x360)); + ((Entity *)((Entity *)local_898))->Entity::SetVelocity((Vector *)(GHIDRA_INT(EVar14) + 0x360)); local_8b0 = (EntityPtr) - ((float)((double)(int)local_8ec + - __uint_to_double_fixup[-((int)local_8ec >> 0x1f)]) * 360.0); + ((float)((double)GHIDRA_INT(local_8ec) + + __uint_to_double_fixup[-(GHIDRA_INT(local_8ec) >> 0x1f)]) * 360.0); iVar7 = ((std::vector *)(local_9e0))->std::vector::size(); local_8b0 = (EntityPtr) ((float)local_8b0 / @@ -5689,29 +5689,29 @@ LAB_0067162f: in_stack_ffffd9fc = (Vector *)0xffffffff; (*pcVar1)(); pBVar6 = ((BitSet128 *)(&g_tearFlagExplosive))->BitSet128::__bnot(¬Explosive2); - pBVar6 = BitSet128::operator_and(&andResult25,(BitSet128 *)((int)EVar14 + 0x428),pBVar6); + pBVar6 = BitSet128::operator_and(&andResult25,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),pBVar6); EVar28 = local_898; SetTearFlags((Entity_Tear *)local_898,*pBVar6); FUN_0044bfa0(); (**(code **)(*(int *)EVar28 + 0x40))(); normalize_angle_degrees((float)local_8cc + 90.0); FUN_004aadb0(); - fVar23 = (float)((int)local_8ec + 1); + fVar23 = (float)(GHIDRA_INT(local_8ec) + 1); local_8ec = fVar23; fVar27 = (float)((std::vector *)(local_9e0))->std::vector::size(); - pVVar9 = (Vector *)((int)EVar14 + 0x33c); - } while ((uint)fVar23 < (uint)fVar27); + pVVar9 = (Vector *)(GHIDRA_INT(EVar14) + 0x33c); + } while (GHIDRA_UINT(fVar23) < GHIDRA_UINT(fVar27)); } if (*(Entity **)((char *)EVar14 + 0x3bc) != (Entity *)0x0) { bVar4 = ((Entity *)(*(Entity **)((char *)EVar14 + 0x3bc)))->Entity::IsFamiliar(); if (bVar4 != 0) { ((Level *)((Level *)g_game))->Level::GetCurrentRoom(); entityList = (EntityList *)FUN_00428a60(); - outResult = (TypeDescriptor *)((int)local_d68 + 0x10); + outResult = (TypeDescriptor *)(GHIDRA_INT(local_d68) + 0x10); in_stack_ffffd9fc = (Vector *)0x67126f; EntityList::QueryRadius - (entityList,(EntityList_EL *)outResult,(Vector *)((int)EVar14 + 0x33c),24.0,4); - ehState = CONCAT31(ehState._1_3_,10); + (entityList,(EntityList_EL *)outResult,(Vector *)(GHIDRA_INT(EVar14) + 0x33c),24.0,4); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),10); local_8b0 = (EntityPtr)0x0; iVar7 = ((EntityList *)((EntityList *)(local_d68 + 0x10)))->EntityList::Size(); if (iVar7 != 0) { @@ -5720,14 +5720,14 @@ LAB_0067162f: local_8cc = (EntityPtr)((Entity *)((Entity *)*puVar13))->Entity::ToTear(); if ((local_8cc != (EntityPtr)0x0) && (local_8cc != EVar14)) { pBVar6 = BitSet128::operator_and - (&ludovicoMask21,(BitSet128 *)((int)local_8cc + 0x428), + (&ludovicoMask21,(BitSet128 *)(GHIDRA_INT(local_8cc) + 0x428), &g_tearFlagLudovico); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if ((bVar4 != 0) && (bVar4 = is_not_familiar_spawned((Entity_Tear *)local_8cc), bVar4 != 0)) { pVVar9 = ((Entity *)((Entity *)local_8cc))->Entity::Position(&entityPos22); outResult = (TypeDescriptor *)0x671317; - ((Vector *)((Vector *)((int)EVar14 + 0x33c)))->Vector::__sub(&local_984,pVVar9); + ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x33c)))->Vector::__sub(&local_984,pVVar9); local_87c = (EntityPtr)((Vector *)(&local_984))->Vector::Length(); if (24.0 <= (float)local_87c) { local_978 = (EntityPtr)zeroConst; @@ -5752,17 +5752,17 @@ LAB_0067162f: } } } - local_8b0 = (EntityPtr)((int)local_8b0 + 1); + local_8b0 = (EntityPtr)(GHIDRA_INT(local_8b0) + 1); EVar28 = (EntityPtr)((EntityList *)((EntityList *)(local_d68 + 0x10)))->EntityList::Size(); - } while ((uint)local_8b0 < (uint)EVar28); + } while (GHIDRA_UINT(local_8b0) < GHIDRA_UINT(EVar28)); } - ehState = CONCAT31(ehState._1_3_,9); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),9); ((EntityList_Query *)(local_d68 + 0x10))->EntityList_Query::~EntityList_Query(); } - pVVar9 = (Vector *)((int)EVar14 + 0x33c); + pVVar9 = (Vector *)(GHIDRA_INT(EVar14) + 0x33c); pVVar15 = ((Entity *)(*(Entity **)((char *)EVar14 + 0x3bc)))->Entity::Position(&parentPos8); local_87c = (EntityPtr)((Vector *)(pVVar15))->Vector::DistanceSquared(pVVar9); - if (local_888._0_1_ != '\0') { + if ((*(undefined1 *)((char *)&(local_888) + 0x0)) != '\0') { if ((float)local_87c <= 1600.0) { ehState = 0xffffffff; *(float *)((char *)EVar14 + 0x36c) = *(float *)((char *)EVar14 + 0x36c) * 0.9; @@ -5799,7 +5799,7 @@ LAB_0067162f: } } } - pVVar9 = (Vector *)((int)EVar14 + 0x33c); + pVVar9 = (Vector *)(GHIDRA_INT(EVar14) + 0x33c); ehState = 0xffffffff; FID_conflict__Tidy(local_9e0); } @@ -5818,14 +5818,14 @@ LAB_006717e1: outResult = (TypeDescriptor *)0x6717b0; ((RNG *)(&local_8c))->RNG::game_constructor(*(int *)((char *)EVar14 + 0x3ec),0x2c); ehState = 0xb; - local_8f8 = (EntityPtr)((uint)local_8f8 | 1); + local_8f8 = (EntityPtr)(GHIDRA_UINT(local_8f8) | 1); local_87c = local_8f8; uVar10 = ((RNG *)(laser))->RNG::RandomInt(100); local_8a1 = '\x01'; if (0x20 < uVar10) goto LAB_006717e1; } ehState = 0xffffffff; - if (((uint)local_8f8 & 1) != 0) { + if ((GHIDRA_UINT(local_8f8) & 1) != 0) { guard_check_icall(); } if (local_8a1 != '\0') { @@ -5868,8 +5868,8 @@ LAB_006717e1: } ((TearParams *)(&tearHitParams))->TearParams::copy(other); uVar10 = Random(); - pVVar9 = ((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::__unm(&negated3); - ((Game *)(g_game))->Game::Spawn(2,0,(Vector *)((int)EVar14 + 0x33c),pVVar9,(Entity *)local_888,0, + pVVar9 = ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::__unm(&negated3); + ((Game *)(g_game))->Game::Spawn(2,0,(Vector *)(GHIDRA_INT(EVar14) + 0x33c),pVVar9,(Entity *)local_888,0, uVar10); spawnedTear = (Entity_Tear *)__RTDynamicCast(); Entity_Projectile::SetHeight @@ -5879,7 +5879,7 @@ LAB_006717e1: SetTearFlags(spawnedTear,g_tearFlagHoming); SetScale(spawnedTear,tearHitParams._tearScale); Entity_Projectile::set_falling_accel - ((Entity_Projectile *)spawnedTear,((Vector *)((int)EVar14 + 0x418))->x); + ((Entity_Projectile *)spawnedTear,((Vector *)(GHIDRA_INT(EVar14) + 0x418))->x); ((Color *)())->Color::Color(); outResult = (TypeDescriptor *)0x0; in_stack_ffffd9fc = (Vector *)0xff; @@ -5888,17 +5888,17 @@ LAB_006717e1: spawnedTear->Update(); } } - EVar29 = (EntityPtr)((int)local_8f8 + 1); + EVar29 = (EntityPtr)(GHIDRA_INT(local_8f8) + 1); local_8f8 = EVar29; EVar28 = (EntityPtr)((EntityList *)((EntityList *)local_d68))->EntityList::Size(); - if ((uint)EVar28 <= (uint)EVar29) break; - pVVar9 = (Vector *)((int)EVar14 + 0x33c); + if (GHIDRA_UINT(EVar28) <= GHIDRA_UINT(EVar29)) break; + pVVar9 = (Vector *)(GHIDRA_INT(EVar14) + 0x33c); } } ehState = 0xffffffff; ((EntityList_Query *)(local_d68))->EntityList_Query::~EntityList_Query(); } - pVVar9 = (Vector *)((int)EVar14 + 0x420); + pVVar9 = (Vector *)(GHIDRA_INT(EVar14) + 0x420); pVVar9->x = local_8dc * *(float *)((char *)EVar14 + 0x424); local_b00 = 0x3c23d70a; local_8c0 = (EntityPtr)pVVar9; @@ -5911,7 +5911,7 @@ LAB_006717e1: if (*(EntityPtr *)((char *)EVar14 + 0x3c8) != (EntityPtr)0x0) { local_87c = (EntityPtr)((float)pEVar30 * pointSixConst); pVVar9 = ((Entity *)((Entity *)*(EntityPtr *)((char *)EVar14 + 0x3c8)))->Entity::Position(&spawnerPos); - local_8cc = (EntityPtr)((Vector *)(pVVar9))->Vector::Distance((Vector *)((int)EVar14 + 0x33c)); + local_8cc = (EntityPtr)((Vector *)(pVVar9))->Vector::Distance((Vector *)(GHIDRA_INT(EVar14) + 0x33c)); pEVar30 = (Entity_Projectile *) assert_lerp_range((float)local_8cc,zeroConst,160.0,(float)local_8ac,(float)local_87c ,1); @@ -5921,15 +5921,15 @@ LAB_006717e1: *(float *)((char *)EVar14 + 0x3a4) / (float)local_8fc); outResult = (TypeDescriptor *)0x671bef; pVVar9 = ((Vector *)(&g_vectorOne))->Vector::__mul(&uniformScale13,&local_97c); - ((Sprite *)((Sprite *)((int)EVar14 + 0x48)))->Sprite::SetScale(pVVar9); - effect = (Font *)((Sprite *)((Sprite *)((int)EVar14 + 0x48)))->Sprite::Color(); + ((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x48)))->Sprite::SetScale(pVVar9); + effect = (Font *)((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x48)))->Sprite::Color(); fVar27 = Math::clamp(zeroConst,pointSixConst,*(float *)((char *)EVar14 + 0x3a4) / (float)local_8f4) ; ((Font *)(effect))->Font::SetLineHeightModifier(oneConst - fVar27); local_b04 = 0x3f19999a; pfVar16 = (float *)std::max(); *(float *)((char *)EVar14 + 0x370) = - *(float *)((int)*(void **)((char *)EVar14 + 0x330) + 0x38) * *pfVar16 * 5.0; + *(float *)(GHIDRA_INT(*(void **)((char *)EVar14 + 0x330)) + 0x38) * *pfVar16 * 5.0; } bVar4 = ((Game *)(g_game))->Game::IsInTimedSet(0x25); if (bVar4 != 0) { @@ -5939,19 +5939,19 @@ LAB_006717e1: outResult = (TypeDescriptor *)0x0; in_stack_ffffd9fc = (Vector *)0x3f800000; color = (ColorMod *)((Color *)())->Color::Color(); - ((Sprite *)((Sprite *)((int)EVar14 + 0x48)))->Sprite::SetColor(color); + ((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x48)))->Sprite::SetColor(color); } prevPos.y = *(float *)((char *)EVar14 + 0x340); - pVVar9 = (Vector *)((int)EVar14 + 0x33c); + pVVar9 = (Vector *)(GHIDRA_INT(EVar14) + 0x33c); prevPos.x = pVVar9->x; ((Entity *)((Entity *)EVar14))->Entity::Update(); pBVar6 = BitSet128::operator_and - (&bit127Mask,(BitSet128 *)((int)EVar14 + 0x428),(BitSet128 *)&DAT_00c346d0); + (&bit127Mask,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),(BitSet128 *)&DAT_00c346d0); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { if (*(EntityPtr *)((char *)EVar14 + 0x3bc) != (EntityPtr)0x0) { pBVar6 = BitSet128::operator_and - (&bit125Mask,(BitSet128 *)((int)EVar14 + 0x428),(BitSet128 *)&DAT_00c346b0) + (&bit125Mask,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),(BitSet128 *)&DAT_00c346b0) ; bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (((bVar4 == 0) || (iVar7 = ((Entity *)((Entity *)EVar14))->Entity::FrameCount(), iVar7 < 1)) || @@ -5959,7 +5959,7 @@ LAB_006717e1: (iVar7 = Entity::GetIntervalTicks ((Entity *)EVar14,(float)*(int *)((char *)EVar14 + 0x83c),zeroConst), iVar7 == 0)))) { - local_8f4 = (Entity_Player *)((int)EVar14 + 0x360); + local_8f4 = (Entity_Player *)(GHIDRA_INT(EVar14) + 0x360); pVVar9 = ((Vector *)(pVVar9))->Vector::__add(&local_13b8,(Vector *)local_8f4); pVVar15 = (Vector *)FUN_004172b0(); ((Vector *)(pVVar9))->Vector::__sub(&local_cc8,pVVar15); @@ -5968,7 +5968,7 @@ LAB_006717e1: ((Vector *)(&local_cc8))->Vector::__div(&local_c88,&local_95c); fVar27 = ((Vector *)(&local_c88))->Vector::GetAngleDegrees(); *(float *)((char *)EVar14 + 0x840) = fVar27; - ((Vector *)((Vector *)local_8f4))->Vector::operator__((Vector *)((int)EVar14 + 0x334)); + ((Vector *)((Vector *)local_8f4))->Vector::operator__((Vector *)(GHIDRA_INT(EVar14) + 0x334)); bVar4 = 0; local_b08 = (50.0 - local_95c) * 0.1; pVVar9 = ((Vector *)(&local_c88))->Vector::__mul(local_13c8,&local_b08); @@ -5977,7 +5977,7 @@ LAB_006717e1: pVVar9 = ((Vector *)(pVVar9))->Vector::__add(&local_13e0,pVVar15); ((Vector *)((Vector *)local_8f4))->Vector::operator_assign(pVVar9); pVVar9 = ((Entity *)((Entity *)tear->_parent))->Entity::Velocity(&parentVel2); - ((Vector *)((Vector *)((int)EVar14 + 0x334)))->Vector::operator_assign(pVVar9); + ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x334)))->Vector::operator_assign(pVVar9); EVar14 = (EntityPtr)tear; } fVar27 = Math::lerp(*(float *)((char *)EVar14 + 0x410),-23.0,local_900,0); @@ -5995,33 +5995,33 @@ LAB_006717e1: } outResult = (TypeDescriptor *)Vector::FromAngle(&angleDir8,*(float *)((char *)EVar14 + 0x840)); in_stack_ffffd9fc = (Vector *)0x67201c; - pVVar15 = Vector::operator_mul(&local_13f8,(float *)((int)EVar14 + 0x838),(Vector *)outResult); - ((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::operator_assign(pVVar15); + pVVar15 = Vector::operator_mul(&local_13f8,(float *)(GHIDRA_INT(EVar14) + 0x838),(Vector *)outResult); + ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::operator_assign(pVVar15); *(undefined4 *)((char *)EVar14 + 0x840) = 0x3c75c28f; } if (*(EntityPtr *)((char *)EVar14 + 0x3c4) != (EntityPtr)0x0) { pBVar6 = BitSet128::operator_and - (&turnHorizontalMask2,(BitSet128 *)((int)EVar14 + 0x428), + (&turnHorizontalMask2,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428), &g_tearFlagTurnHorizontal); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { - ((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::Normalized(&velDir); + ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::Normalized(&velDir); pVVar15 = ((Entity *)((Entity *)*(EntityPtr *)((char *)EVar14 + 0x3c4)))->Entity::Position(&targetPos5); pVVar15 = ((Vector *)(pVVar15))->Vector::__sub(&local_1408,&prevPos); - pVVar15 = ((Vector *)(pVVar15))->Vector::__sub(&local_1410,(Vector *)((int)EVar14 + 0x360)); + pVVar15 = ((Vector *)(pVVar15))->Vector::__sub(&local_1410,(Vector *)(GHIDRA_INT(EVar14) + 0x360)); ((Vector *)(pVVar15))->Vector::Normalized(&local_d88); local_8ac = (EntityPtr)((Vector *)(&local_d88))->Vector::Dot(&velDir); pVVar15 = ((Entity *)((Entity *)*(EntityPtr *)((char *)EVar14 + 0x3c4)))->Entity::Position(&targetPos6); pVVar15 = ((Vector *)(pVVar15))->Vector::__sub(&local_1420,pVVar9); outResult = (TypeDescriptor *)0x672114; - pVVar15 = ((Vector *)(pVVar15))->Vector::__sub(&local_1428,(Vector *)((int)EVar14 + 0x360)); + pVVar15 = ((Vector *)(pVVar15))->Vector::__sub(&local_1428,(Vector *)(GHIDRA_INT(EVar14) + 0x360)); ((Vector *)(pVVar15))->Vector::Normalized(&local_cd8); local_87c = (EntityPtr)((Vector *)(&local_cd8))->Vector::Dot(&velDir); if ((zeroConst < (float)local_87c) || (((float)local_8ac <= zeroConst && ((float)local_87c < -0.1)))) { if (((float)local_87c < -0.1) && ((float)local_8ac < -0.1)) { pBVar6 = BitSet128::operator_and - (&homingMask5,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagHoming); + (&homingMask5,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagHoming); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsZero(); if (bVar4 != 0) { ((Entity *)((Entity *)EVar14))->Entity::SetTarget((Entity *)0x0); @@ -6036,38 +6036,38 @@ LAB_006717e1: local_b0c = &DAT_bf800000; ((Vector *)(&velDir))->Vector::operator_mul_assign((float *)&local_b0c); } - local_b10 = ((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::Length(); + local_b10 = ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::Length(); outResult = (TypeDescriptor *)0x672206; pVVar15 = ((Vector *)(&velDir))->Vector::__mul(&local_1438,&local_b10); - ((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::operator_assign(pVVar15); + ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::operator_assign(pVVar15); ((BitSet128 *)(&g_tearFlagTurnHorizontal))->BitSet128::__bnot(¬TurnHorizontal); FUN_005cd430(); } } } pBVar6 = BitSet128::operator_and - (&stickyMask3,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagSticky); + (&stickyMask3,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagSticky); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 == 0) { pBVar6 = BitSet128::operator_and - (&boogerMask2,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagBooger); + (&boogerMask2,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagBooger); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) goto LAB_006722d8; pBVar6 = BitSet128::operator_and - (&sporeMask3,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagSpore); + (&sporeMask3,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagSpore); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) goto LAB_006722d8; } else { LAB_006722d8: - local_8b0 = (EntityPtr)((int)EVar14 + 0x478); + local_8b0 = (EntityPtr)(GHIDRA_INT(EVar14) + 0x478); if (*(int *)((char *)EVar14 + 0x478) == 0) { if (((*(int *)((char *)EVar14 + 0x2c) == 0x1a) || (*(int *)((char *)EVar14 + 0x2c) == 0x30)) && - (bVar4 = ((ANM2 *)((ANM2 *)((int)EVar14 + 0x48)))->ANM2::IsPlaying(&s_empty), bVar4 == 0)) { + (bVar4 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(EVar14) + 0x48)))->ANM2::IsPlaying(&s_empty), bVar4 == 0)) { pAVar22 = (ANM2 *)Config::GetPillEffects(); psVar21 = ((ANM2 *)(pAVar22))->ANM2::GetAnimation((std_string *)(local_1d8 + 0x2c)); ehState = 0x10; - ((Sprite *)((Sprite *)((int)EVar14 + 0x48)))->Sprite::Play(psVar21,0); + ((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x48)))->Sprite::Play(psVar21,0); ehState = 0xffffffff; ((std::string *)(local_1d8 + 0x2c))->std::string::_Tidy_deallocate(); } @@ -6076,47 +6076,47 @@ LAB_006722d8: cVar5 = ((Entity *)())->Entity::Visible(); if ((cVar5 == '\0') || (iVar7 = ((Entity *)(*(Entity **)((char *)EVar14 + 0x478)))->Entity::EntityCollisionClass(), iVar7 == 0)) { - ((EntityPtr *)((EntityPtr *)((int)EVar14 + 0x478)))->EntityPtr::SetReference((Entity *)0x0); - ((std::vector *)((void *)((int)EVar14 + 0x444)))->std::vector::clear(0); + ((EntityPtr *)((EntityPtr *)(GHIDRA_INT(EVar14) + 0x478)))->EntityPtr::SetReference((Entity *)0x0); + ((std::vector *)((void *)(GHIDRA_INT(EVar14) + 0x444)))->std::vector::clear(0); if ((*(int *)((char *)EVar14 + 0x2c) == 0x1a) || (*(int *)((char *)EVar14 + 0x2c) == 0x30)) { pAVar22 = (ANM2 *)Config::GetPillEffects(); psVar21 = ((ANM2 *)(pAVar22))->ANM2::GetAnimation(&curAnimName); ehState = 0xd; outResult = (TypeDescriptor *)0x6723d6; - ((Sprite *)((Sprite *)((int)EVar14 + 0x48)))->Sprite::Play(psVar21,0); + ((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x48)))->Sprite::Play(psVar21,0); ehState = 0xffffffff; ((std::string *)(curAnimName._buf))->std::string::_Tidy_deallocate(); } } else { pVVar15 = ((Entity *)(*(Entity **)((char *)EVar14 + 0x478)))->Entity::Velocity(&stickTargetVel); - ((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::operator_assign(pVVar15); + ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::operator_assign(pVVar15); pVVar15 = ((Entity *)(*(Entity **)((char *)EVar14 + 0x478)))->Entity::Position(&stickTargetPos); outResult = (TypeDescriptor *)0x672353; - pVVar15 = ((Vector *)(pVVar15))->Vector::__add(&local_1450,(Vector *)((int)EVar14 + 0x47c)); + pVVar15 = ((Vector *)(pVVar15))->Vector::__add(&local_1450,(Vector *)(GHIDRA_INT(EVar14) + 0x47c)); ((Vector *)(pVVar9))->Vector::operator_assign(pVVar15); if (((*(int *)((char *)EVar14 + 0x2c) == 0x1a) || (*(int *)((char *)EVar14 + 0x2c) == 0x30)) && - (bVar4 = ((ANM2 *)((ANM2 *)((int)EVar14 + 0x48)))->ANM2::IsPlaying(&s_empty), bVar4 != 0)) { - ((Sprite *)((Sprite *)((int)EVar14 + 0x48)))->Sprite::Stop(); + (bVar4 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(EVar14) + 0x48)))->ANM2::IsPlaying(&s_empty), bVar4 != 0)) { + ((Sprite *)((Sprite *)(GHIDRA_INT(EVar14) + 0x48)))->Sprite::Stop(); } } *(int *)((char *)EVar14 + 0x484) = *(int *)((char *)EVar14 + 0x484) + -1; if (*(int *)((char *)EVar14 + 0x484) < 1) { *(byte *)((char *)EVar14 + 0x173) = 1; *(uint *)((char *)EVar14 + 0x474) = *(uint *)((char *)EVar14 + 0x474) | 0x40; - ((Vector *)((int)EVar14 + 0x420))->x = (float)local_8b4 * *(float *)((char *)EVar14 + 0x424); + ((Vector *)(GHIDRA_INT(EVar14) + 0x420))->x = (float)local_8b4 * *(float *)((char *)EVar14 + 0x424); local_b14 = 0x3c23d70a; pfVar16 = (float *)std::max(); - ((Vector *)((int)EVar14 + 0x420))->x = *pfVar16; + ((Vector *)(GHIDRA_INT(EVar14) + 0x420))->x = *pfVar16; ResetSpriteScale((Entity_Tear *)EVar14); pBVar6 = BitSet128::operator_and - (&stickyMask4,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagSticky); + (&stickyMask4,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagSticky); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { uVar37 = 0x83; uVar38 = 0x24; uVar39 = 0x67; - ((BitSet128 *)((BitSet128 *)((int)EVar14 + 0x428)))->BitSet128::operator__(&g_tearFlagExplosive); + ((BitSet128 *)((BitSet128 *)(GHIDRA_INT(EVar14) + 0x428)))->BitSet128::operator__(&g_tearFlagExplosive); *(uint *)((char *)EVar14 + 0x474) = *(uint *)((char *)EVar14 + 0x474) | 0x20; *(float *)((char *)EVar14 + 0x388) = *(float *)((char *)EVar14 + 0x388) + 60.0; local_8f4 = GetRootPlayer((Entity_Tear *)EVar14); @@ -6125,12 +6125,12 @@ LAB_006722d8: FUN_00435bc0(); Entity_Player::GetBombVariant(); FUN_00435bc0(); - tearFlags._l._4_4_ = (EntityPtr)outResult; - tearFlags._l._0_4_ = (EntityPtr)in_stack_ffffd9fc; - tearFlags._h._0_1_ = uVar37; - tearFlags._h._1_1_ = uVar38; - tearFlags._h._2_2_ = uVar39; - tearFlags._h._4_4_ = uVar20; + (*(undefined4 *)((char *)&(tearFlags._l) + 0x4)) = (EntityPtr)outResult; + (*(undefined4 *)((char *)&(tearFlags._l) + 0x0)) = (EntityPtr)in_stack_ffffd9fc; + (*(undefined1 *)((char *)&(tearFlags._h) + 0x0)) = uVar37; + (*(undefined1 *)((char *)&(tearFlags._h) + 0x1)) = uVar38; + (*(undefined2 *)((char *)&(tearFlags._h) + 0x2)) = uVar39; + (*(undefined4 *)((char *)&(tearFlags._h) + 0x4)) = uVar20; fVar27 = ((Entity_Player *)(local_8f4))->Entity_Player::check_bomb_tearflags(tearFlags); if (1.5 <= fVar27) { *(float *)((char *)EVar14 + 0x388) = *(float *)((char *)EVar14 + 0x388) + 50.0; @@ -6138,7 +6138,7 @@ LAB_006722d8: } } pBVar6 = BitSet128::operator_and - (&sporeMask4,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagSpore); + (&sporeMask4,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagSpore); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { EVar29 = (EntityPtr)GetRootPlayer((Entity_Tear *)EVar14); @@ -6147,7 +6147,7 @@ LAB_006722d8: if (EVar29 != (EntityPtr)0x0) { EVar28 = EVar29; } - pVVar9 = (Vector *)((int)EVar14 + 0x33c); + pVVar9 = (Vector *)(GHIDRA_INT(EVar14) + 0x33c); ((Game *)(g_game))->Game::Fart(pVVar9,85.0,(Entity *)EVar28,1.0,0,color); if (*(int *)((char *)EVar14 + 0x478) != 0) { bVar4 = ((Entity *)((Entity *)EVar14))->Entity::HasEntityFlags(0x80000000000); @@ -6166,16 +6166,16 @@ LAB_006722d8: ((Level *)((Level *)g_game))->Level::GetCurrentRoom(); entityList = (EntityList *)FUN_00428a60(); EntityList::QueryRadius(entityList,(EntityList_EL *)radiusQuery200,pVVar9,200.0,8); - ehState = CONCAT31(ehState._1_3_,0xf); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),0xf); local_8f8 = (EntityPtr)0x0; - if (0 < (int)local_8ec) { - local_8e0 = (Entity_Player *)((int)EVar14 + 0x360); + if (0 < GHIDRA_INT(local_8ec)) { + local_8e0 = (Entity_Player *)(GHIDRA_INT(EVar14) + 0x360); do { fVar27 = local_8ec; fVar23 = random_float(); Vector::FromAngle(&local_b8c, - ((fVar23 * 0.8 + ((float)(int)local_8f8 - local_900)) * 360.0) / - (float)(int)fVar27 + (float)local_87c); + ((fVar23 * 0.8 + ((float)GHIDRA_INT(local_8f8) - local_900)) * 360.0) / + (float)GHIDRA_INT(fVar27) + (float)local_87c); local_8fc = (EntityPtr)0x0; local_8f4 = (Entity_Player *)0x4e6e6b28; local_8ac = (EntityPtr)0x0; @@ -6203,10 +6203,10 @@ LAB_006722d8: } } EVar28 = local_8fc; - EVar14 = (EntityPtr)((int)EVar14 + 1); + EVar14 = (EntityPtr)(GHIDRA_INT(EVar14) + 1); fVar27 = (float)((EntityList *)((EntityList *)radiusQuery200))->EntityList::Size(); spawnedTear = tear; - } while ((uint)EVar14 < (uint)fVar27); + } while (GHIDRA_UINT(EVar14) < GHIDRA_UINT(fVar27)); if (EVar28 != (EntityPtr)0x0) { FUN_00431620(); pVVar9 = (Vector *)FUN_006b6e40(); @@ -6243,12 +6243,12 @@ LAB_006722d8: pBVar6 = BitSet128::operator_or(&orResult14,pBVar6,pBVar8); ((BitSet128 *)(&inheritedFlags2))->BitSet128::operator__(pBVar6); EVar14 = local_8d0; - flags_03._l._4_4_ = inheritedFlags2._l._4_4_; - flags_03._l._0_4_ = (undefined4)inheritedFlags2._l; - flags_03._h._0_1_ = (char)(undefined4)inheritedFlags2._h; - flags_03._h._1_1_ = (char)((uint)(undefined4)inheritedFlags2._h >> 8); - flags_03._h._2_2_ = (short)((uint)(undefined4)inheritedFlags2._h >> 0x10); - flags_03._h._4_4_ = inheritedFlags2._h._4_4_; + (*(undefined4 *)((char *)&(flags_03._l) + 0x4)) = (*(undefined4 *)((char *)&(inheritedFlags2._l) + 0x4)); + (*(undefined4 *)((char *)&(flags_03._l) + 0x0)) = (undefined4)inheritedFlags2._l; + (*(undefined1 *)((char *)&(flags_03._h) + 0x0)) = (char)(undefined4)inheritedFlags2._h; + (*(undefined1 *)((char *)&(flags_03._h) + 0x1)) = (char)(GHIDRA_UINT((undefined4)inheritedFlags2._h) >> 8); + (*(undefined2 *)((char *)&(flags_03._h) + 0x2)) = (short)(GHIDRA_UINT((undefined4)inheritedFlags2._h) >> 0x10); + (*(undefined4 *)((char *)&(flags_03._h) + 0x4)) = (*(undefined4 *)((char *)&(inheritedFlags2._h) + 0x4)); SetTearFlags((Entity_Tear *)local_8d0,flags_03); SetScale((Entity_Tear *)EVar14,*(float *)local_8c0 * 0.2); pcVar1 = *(code **)(*(int *)EVar14 + 0x3c); @@ -6258,8 +6258,8 @@ LAB_006722d8: FUN_00431620(); ((Entity *)((Entity *)EVar14))->Entity::AddEntityFlags(0x80000000000); (**(code **)(*(int *)EVar14 + 0xc))(); - local_8f8 = (EntityPtr)((int)local_8f8 + 1); - } while ((int)local_8f8 < (int)local_8ec); + local_8f8 = (EntityPtr)(GHIDRA_INT(local_8f8) + 1); + } while (GHIDRA_INT(local_8f8) < GHIDRA_INT(local_8ec)); pVVar9 = tearPos; EVar14 = (EntityPtr)tear; } @@ -6272,7 +6272,7 @@ LAB_006722d8: } } pBVar6 = BitSet128::operator_and - (&boogerMask3,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagBooger); + (&boogerMask3,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagBooger); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (((bVar4 != 0) && (bVar4 = ((Entity *)((Entity *)EVar14))->Entity::IsFrame(0x1e,*(int *)((char *)EVar14 + 0x20)), bVar4 != 0)) && @@ -6282,11 +6282,11 @@ LAB_006722d8: FUN_00665a90(); } pBVar6 = BitSet128::operator_and - (&ludovicoMask22,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagLudovico); + (&ludovicoMask22,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagLudovico); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if ((bVar4 != 0) && (bVar4 = is_not_familiar_spawned((Entity_Tear *)EVar14), bVar4 != 0)) { pBVar6 = BitSet128::operator_and - (&continuumMask,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagContinuum); + (&continuumMask,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagContinuum); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsZero(); if (bVar4 != 0) { room = (Room *)((Level *)((Level *)g_game))->Level::GetCurrentRoom(); @@ -6295,50 +6295,50 @@ LAB_006722d8: } } pBVar6 = BitSet128::operator_and - (&bit126Mask,(BitSet128 *)((int)EVar14 + 0x428),(BitSet128 *)&DAT_00c346c0); + (&bit126Mask,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),(BitSet128 *)&DAT_00c346c0); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if ((bVar4 != 0) && (((*(int *)((char *)EVar14 + 0x83c) < 1 || (iVar7 = Entity::GetIntervalTicks ((Entity *)EVar14,(float)*(int *)((char *)EVar14 + 0x83c),zeroConst), iVar7 != 0)) && (iVar7 = ((Entity *)((Entity *)EVar14))->Entity::FrameCount(), 0 < iVar7)))) { - ((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::Resize(*(float *)((char *)EVar14 + 0x838)); - bit125Flags._l._0_4_ = _DAT_00c346b0; - bit125Flags._l._4_4_ = uRam00c346b4; - bit125Flags._h._0_4_ = uRam00c346b8; - bit125Flags._h._4_4_ = uRam00c346bc; - pBVar6 = BitSet128::operator_and(&andResult31,(BitSet128 *)((int)EVar14 + 0x828),&bit125Flags); + ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::Resize(*(float *)((char *)EVar14 + 0x838)); + (*(undefined4 *)((char *)&(bit125Flags._l) + 0x0)) = _DAT_00c346b0; + (*(undefined4 *)((char *)&(bit125Flags._l) + 0x4)) = uRam00c346b4; + (*(undefined4 *)((char *)&(bit125Flags._h) + 0x0)) = uRam00c346b8; + (*(undefined4 *)((char *)&(bit125Flags._h) + 0x4)) = uRam00c346bc; + pBVar6 = BitSet128::operator_and(&andResult31,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x828),&bit125Flags); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) { - bit126Flags._l._0_4_ = _DAT_00c346c0; - bit126Flags._l._4_4_ = uRam00c346c4; - bit126Flags._h._0_4_ = uRam00c346c8; - bit126Flags._h._4_4_ = uRam00c346cc; - pBVar6 = BitSet128::operator_and(&andResult32,(BitSet128 *)((int)EVar14 + 0x828),&bit126Flags) + (*(undefined4 *)((char *)&(bit126Flags._l) + 0x0)) = _DAT_00c346c0; + (*(undefined4 *)((char *)&(bit126Flags._l) + 0x4)) = uRam00c346c4; + (*(undefined4 *)((char *)&(bit126Flags._h) + 0x0)) = uRam00c346c8; + (*(undefined4 *)((char *)&(bit126Flags._h) + 0x4)) = uRam00c346cc; + pBVar6 = BitSet128::operator_and(&andResult32,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x828),&bit126Flags) ; bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 != 0) goto LAB_00672d53; } pBVar6 = ((BitSet128 *)((BitSet128 *)&DAT_00c346c0))->BitSet128::__bnot(¬Bit126); - pBVar6 = BitSet128::operator_and(&andResult33,(BitSet128 *)((int)EVar14 + 0x428),pBVar6); - uVar20 = *(undefined4 *)((int)&pBVar6->_l + 4); + pBVar6 = BitSet128::operator_and(&andResult33,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),pBVar6); + uVar20 = *(undefined4 *)(GHIDRA_INT(&pBVar6->_l) + 4); qVar2 = pBVar6->_h; - iVar7 = *(int *)((int)&pBVar6->_h + 4); - *(int *)((char *)EVar14 + 0x428) = (int)pBVar6->_l; + iVar7 = *(int *)(GHIDRA_INT(&pBVar6->_h) + 4); + *(int *)((char *)EVar14 + 0x428) = GHIDRA_INT(pBVar6->_l); *(undefined4 *)((char *)EVar14 + 0x42c) = uVar20; - *(int *)((char *)EVar14 + 0x430) = (int)qVar2; + *(int *)((char *)EVar14 + 0x430) = GHIDRA_INT(qVar2); *(int *)((char *)EVar14 + 0x434) = iVar7; } LAB_00672d53: pBVar6 = BitSet128::operator_and - (&bit125Mask2,(BitSet128 *)((int)EVar14 + 0x428),(BitSet128 *)&DAT_00c346b0); + (&bit125Mask2,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),(BitSet128 *)&DAT_00c346b0); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (((bVar4 != 0) && (iVar7 = ((Entity *)((Entity *)EVar14))->Entity::FrameCount(), 0 < iVar7)) && ((*(int *)((char *)EVar14 + 0x83c) < 1 || (iVar7 = Entity::GetIntervalTicks ((Entity *)EVar14,(float)*(int *)((char *)EVar14 + 0x83c),zeroConst), iVar7 != 0)))) { - ((BitSet128 *)((BitSet128 *)((int)EVar14 + 0x428)))->BitSet128::IsNonZero(); + ((BitSet128 *)((BitSet128 *)(GHIDRA_INT(EVar14) + 0x428)))->BitSet128::IsNonZero(); *(int *)((char *)EVar14 + 0x428) = *(int *)((char *)EVar14 + 0x828); *(undefined4 *)((char *)EVar14 + 0x42c) = *(undefined4 *)((char *)EVar14 + 0x82c); *(undefined4 *)((char *)EVar14 + 0x430) = *(undefined4 *)((char *)EVar14 + 0x830); @@ -6350,32 +6350,32 @@ LAB_00672d53: *(undefined4 *)((char *)EVar14 + 0x834) = uStack_1574; } pVVar15 = ((Vector *)(pVVar9))->Vector::__sub(&local_14a0,&prevPos); - ((Vector *)((Vector *)((int)EVar14 + 0x7ec)))->Vector::operator_assign(pVVar15); + ((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x7ec)))->Vector::operator_assign(pVVar15); if (*(int *)((char *)EVar14 + 0x438) < 1) { pBVar6 = BitSet128::operator_and - (&ludovicoMask23,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagLudovico); + (&ludovicoMask23,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagLudovico); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsZero(); if (((bVar4 != 0) && (*(byte *)((char *)EVar14 + 0x173) == 0)) && (*(int *)((char *)EVar14 + 0x478) == 0)) { pBVar6 = BitSet128::operator_and - (&chainMask2,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagChain); + (&chainMask2,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagChain); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsZero(); if (bVar4 != 0) { pBVar6 = BitSet128::operator_and - (&popMask2,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagPop); + (&popMask2,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagPop); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsZero(); if (((bVar4 != 0) || (8 < *(short *)((char *)EVar14 + 0x46c))) || - (local_87c = (EntityPtr)((Vector *)((Vector *)((int)EVar14 + 0x360)))->Vector::LengthSquared(), + (local_87c = (EntityPtr)((Vector *)((Vector *)(GHIDRA_INT(EVar14) + 0x360)))->Vector::LengthSquared(), (float)local_87c < 0.01)) { pBVar6 = BitSet128::operator_and - (&fetusMask4,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagFetus); + (&fetusMask4,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagFetus); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 == 0) { fVar23 = Math::timescale_factor(0.9,*(float *)((char *)EVar14 + 0x39c)); fVar27 = *(float *)((char *)EVar14 + 0x39c); pvVar34 = (void *)(fVar27 * 0.1 + - fVar23 * (float)((NPCAI_Pathfinder *)((int)EVar14 + 0x414))->_entity - + fVar27 * ((Vector *)((int)EVar14 + 0x418))->x); + fVar23 * (float)((NPCAI_Pathfinder *)(GHIDRA_INT(EVar14) + 0x414))->_entity + + fVar27 * ((Vector *)(GHIDRA_INT(EVar14) + 0x418))->x); } else if (*(float *)((char *)EVar14 + 0x3a4) <= *(float *)((char *)EVar14 + 0x820) * (float)local_904) { @@ -6383,16 +6383,16 @@ LAB_00672d53: pvVar34 = (void *)zeroConst; } else { - local_b20 = ((Vector *)((int)EVar14 + 0x418))->x + 0.2; + local_b20 = ((Vector *)(GHIDRA_INT(EVar14) + 0x418))->x + 0.2; local_b24 = 0; - local_87c = (EntityPtr)((NPCAI_Pathfinder *)((int)EVar14 + 0x414))->_entity; + local_87c = (EntityPtr)((NPCAI_Pathfinder *)(GHIDRA_INT(EVar14) + 0x414))->_entity; fVar27 = Math::timescale_factor(0.9,*(float *)((char *)EVar14 + 0x39c)); local_87c = (EntityPtr)(fVar27 * (float)local_87c); pfVar16 = (float *)std::max(); fVar27 = *(float *)((char *)EVar14 + 0x39c); pvVar34 = (void *)(fVar27 * *pfVar16 + (float)local_87c); } - ((NPCAI_Pathfinder *)((int)EVar14 + 0x414))->_entity = pvVar34; + ((NPCAI_Pathfinder *)(GHIDRA_INT(EVar14) + 0x414))->_entity = pvVar34; Entity_Projectile::SetHeight ((Entity_Projectile *)EVar14, fVar27 * (float)pvVar34 + *(float *)((char *)EVar14 + 0x410)); @@ -6400,10 +6400,10 @@ LAB_00672d53: bVar4 = ((Room *)(room))->Room::is_type_16(); if (bVar4 != 0) { pBVar6 = BitSet128::operator_and - (&fetusMask5,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagFetus); + (&fetusMask5,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagFetus); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 == 0) { - fVar27 = ((Vector *)((int)EVar14 + 0x418))->x; + fVar27 = ((Vector *)(GHIDRA_INT(EVar14) + 0x418))->x; if (fVar27 < 0.001) { if (*(float *)((char *)EVar14 + 0x410) <= (float)local_8e4) goto LAB_0067308c; fVar27 = *(float *)((char *)EVar14 + 0x364) + halfConst; @@ -6422,7 +6422,7 @@ LAB_0067308c: Room::get_lava_line_y(); if (fVar27 < *(float *)((char *)EVar14 + 0x340)) { pBVar6 = BitSet128::operator_and - (&explosiveMask6,(BitSet128 *)((int)EVar14 + 0x428), + (&explosiveMask6,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428), &g_tearFlagExplosive); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 == 0) { @@ -6452,11 +6452,11 @@ LAB_0067308c: } } pBVar6 = BitSet128::operator_and - (&continuumMask2,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagContinuum); + (&continuumMask2,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagContinuum); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if (bVar4 == 0) goto LAB_006734ab; pBVar6 = BitSet128::operator_and - (&ludovicoMask24,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagLudovico); + (&ludovicoMask24,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagLudovico); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsZero(); if ((bVar4 == 0) && (bVar4 = is_not_familiar_spawned((Entity_Tear *)EVar14), bVar4 == 0)) goto LAB_006734ab; @@ -6466,7 +6466,7 @@ LAB_0067308c: bVar4 = ((Vector *)(pVVar9))->Vector::operator_ne(&wrappedPos); if (bVar4 != 0) { pBVar6 = BitSet128::operator_and - (&tractorBeamMask3,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagTractorBeam) + (&tractorBeamMask3,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagTractorBeam) ; bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if ((bVar4 != 0) && (*(EntityPtr *)((char *)EVar14 + 0x3bc) != (EntityPtr)0x0)) { @@ -6476,7 +6476,7 @@ LAB_0067308c: } ((Vector *)(pVVar9))->Vector::operator_assign(&wrappedPos); pBVar6 = BitSet128::operator_and - (&ludovicoMask25,(BitSet128 *)((int)EVar14 + 0x428),&g_tearFlagLudovico); + (&ludovicoMask25,(BitSet128 *)(GHIDRA_INT(EVar14) + 0x428),&g_tearFlagLudovico); bVar4 = ((BitSet128 *)(pBVar6))->BitSet128::IsNonZero(); if ((bVar4 != 0) && (bVar4 = is_not_familiar_spawned((Entity_Tear *)EVar14), bVar4 != 0)) { for (EVar28 = *(EntityPtr *)((char *)EVar14 + 0x3c0); EVar28 != (EntityPtr)0x0; @@ -6631,11 +6631,11 @@ void Entity_Tear::SetTearFlags(BitSet128 flags) local_14 = 0xffffffff; puStack_18 = &LAB_00af7975; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(local_44 + 0x34); + local_24 = __security_cookie ^ GHIDRA_UINT((local_44 + 0x34)); ExceptionList = &local_1c; maskedFlags = BitSet128::operator_and((BitSet128 *)(local_44 + 4),&flags,&g_tearFlagGlow); - if ((((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) && + if (((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) && ((this->_tearHaloANM2)._loaded == 0)) { fStack_34 = 0.0; local_30 = 2.10195e-44; @@ -6643,20 +6643,20 @@ void Entity_Tear::SetTearFlags(BitSet128 flags) local_44[1] = '\0'; local_44[2] = '\0'; local_44[3] = '\0'; - local_44._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_44) + 0x0)) = std::_Allocate(0x20); fStack_34 = 2.38221e-44; local_30 = 4.34403e-44; - builtin_strncpy((char *)local_44._0_4_,"gfx/TearHalo.anm2",0x12); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_44) + 0x0)),"gfx/TearHalo.anm2",0x12); local_14 = 0; ((ANM2 *)(&this->_tearHaloANM2))->ANM2::Load((std_string *)local_44,1); local_14 = 0xffffffff; - if (0xf < (uint)local_30) { - uVar3 = (int)local_30 + 1; - freeBlock = (char *)local_44._0_4_; + if (0xf < GHIDRA_UINT(local_30)) { + uVar3 = GHIDRA_INT(local_30) + 1; + freeBlock = (*(undefined4 *)((char *)&((char *)local_44) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(local_44._0_4_ + -4); - uVar3 = (int)local_30 + 0x24; - if ((char *)0x1f < (char *)(local_44._0_4_ + (-4 - (int)freeBlock))) { + freeBlock = *(char **)((*(undefined4 *)((char *)&(local_44) + 0x0)) + -4); + uVar3 = GHIDRA_INT(local_30) + 0x24; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_44) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -6667,28 +6667,28 @@ void Entity_Tear::SetTearFlags(BitSet128 flags) } if ((this->_tearEffectANM2)._loaded != 0) goto LAB_00676b9b; maskedFlags = BitSet128::operator_and((BitSet128 *)(local_44 + 4),&flags,&g_tearFlagHorn); - if (((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) { + if ((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) { fStack_34 = 0.0; local_30 = 2.10195e-44; local_44[0] = '\0'; local_44[1] = '\0'; local_44[2] = '\0'; local_44[3] = '\0'; - local_44._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_44) + 0x0)) = std::_Allocate(0x20); fStack_34 = 4.06377e-44; local_30 = 4.34403e-44; - builtin_strncpy((char *)local_44._0_4_,"gfx/LittleHornTearEffect.anm2",0x1e); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_44) + 0x0)),"gfx/LittleHornTearEffect.anm2",0x1e); local_14 = 1; ((ANM2 *)(&this->_tearEffectANM2))->ANM2::Load((std_string *)local_44,1); local_14 = 0xffffffff; - if (0xf < (uint)local_30) { - uVar3 = (int)local_30 + 1; - freeBlock = (char *)local_44._0_4_; + if (0xf < GHIDRA_UINT(local_30)) { + uVar3 = GHIDRA_INT(local_30) + 1; + freeBlock = (*(undefined4 *)((char *)&((char *)local_44) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(local_44._0_4_ + -4); - uVar3 = (int)local_30 + 0x24; - if ((char *)0x1f < (char *)(local_44._0_4_ + (-4 - (int)freeBlock))) { + freeBlock = *(char **)((*(undefined4 *)((char *)&(local_44) + 0x0)) + -4); + uVar3 = GHIDRA_INT(local_30) + 0x24; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_44) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -6723,7 +6723,7 @@ void Entity_Tear::SetTearFlags(BitSet128 flags) bVar4 = bVar1 < *pbVar2; if (bVar1 != *pbVar2) { LAB_00676b65: - uVar3 = -(uint)bVar4 | 1; + uVar3 = -GHIDRA_UINT(bVar4) | 1; goto LAB_00676b6a; } if (bVar1 == 0) break; @@ -6736,7 +6736,7 @@ LAB_00676b65: uVar3 = 0; LAB_00676b6a: if ((uVar3 == 0) && - ((*(char *)((int)(this->_tearEffectANM2)._animState._animData + 0x34) == '\0' || + ((*(char *)(GHIDRA_INT((this->_tearEffectANM2)._animState._animData) + 0x34) == '\0' || ((this->_tearEffectANM2)._animState._isPlaying != 0)))) goto LAB_00676b9b; } bVar1 = ((ANM2 *)(&this->_tearEffectANM2))->ANM2::SetAnimation(s_Idle,1); @@ -6747,15 +6747,15 @@ LAB_00676b6a: goto LAB_00676b9b; } maskedFlags = BitSet128::operator_and((BitSet128 *)(local_44 + 4),&flags,&g_tearFlagRift); - if (((int)maskedFlags->_l == 0 && *(int *)((int)&maskedFlags->_l + 4) == 0) && - ((int)maskedFlags->_h == 0 && *(int *)((int)&maskedFlags->_h + 4) == 0)) { + if ((GHIDRA_INT(maskedFlags->_l) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) == 0) && + (GHIDRA_INT(maskedFlags->_h) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) == 0)) { maskedFlags = BitSet128::operator_and ((BitSet128 *)(local_44 + 4),&flags,&g_tearFlagLightFromHeaven); - if (((int)maskedFlags->_l == 0 && *(int *)((int)&maskedFlags->_l + 4) == 0) && - ((int)maskedFlags->_h == 0 && *(int *)((int)&maskedFlags->_h + 4) == 0)) { + if ((GHIDRA_INT(maskedFlags->_l) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) == 0) && + (GHIDRA_INT(maskedFlags->_h) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) == 0)) { maskedFlags = BitSet128::operator_and((BitSet128 *)(local_44 + 4),&flags,&g_tearFlagJacobs); - if (((int)maskedFlags->_l == 0 && *(int *)((int)&maskedFlags->_l + 4) == 0) && - ((int)maskedFlags->_h == 0 && *(int *)((int)&maskedFlags->_h + 4) == 0)) { + if ((GHIDRA_INT(maskedFlags->_l) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) == 0) && + (GHIDRA_INT(maskedFlags->_h) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) == 0)) { maskedFlags = BitSet128::operator_and ((BitSet128 *)(local_44 + 4),&flags,&g_tearFlagMysteriousLiquidCreep ); @@ -6767,20 +6767,20 @@ LAB_00676b6a: local_44[1] = '\0'; local_44[2] = '\0'; local_44[3] = '\0'; - local_44._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_44) + 0x0)) = std::_Allocate(0x20); fStack_34 = 4.06377e-44; local_30 = 4.34403e-44; - builtin_strncpy((char *)local_44._0_4_,"gfx/MysteriousTearEffect.anm2",0x1e); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_44) + 0x0)),"gfx/MysteriousTearEffect.anm2",0x1e); local_14 = 5; ((ANM2 *)(&this->_tearEffectANM2))->ANM2::Load((std_string *)local_44,1); local_14 = 0xffffffff; - if (0xf < (uint)local_30) { - uVar3 = (int)local_30 + 1; - freeBlock = (char *)local_44._0_4_; + if (0xf < GHIDRA_UINT(local_30)) { + uVar3 = GHIDRA_INT(local_30) + 1; + freeBlock = (*(undefined4 *)((char *)&((char *)local_44) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(local_44._0_4_ + -4); - uVar3 = (int)local_30 + 0x24; - if ((char *)0x1f < (char *)(local_44._0_4_ + (-4 - (int)freeBlock))) { + freeBlock = *(char **)((*(undefined4 *)((char *)&(local_44) + 0x0)) + -4); + uVar3 = GHIDRA_INT(local_30) + 0x24; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_44) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -6814,20 +6814,20 @@ LAB_00676b6a: local_44[1] = '\0'; local_44[2] = '\0'; local_44[3] = '\0'; - local_44._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_44) + 0x0)) = std::_Allocate(0x20); fStack_34 = 3.78351e-44; local_30 = 4.34403e-44; - builtin_strncpy((char *)local_44._0_4_,"gfx/FireMindTearEffect.anm2",0x1c); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_44) + 0x0)),"gfx/FireMindTearEffect.anm2",0x1c); local_14 = 6; ((ANM2 *)(&this->_tearEffectANM2))->ANM2::Load((std_string *)local_44,1); local_14 = 0xffffffff; - if (0xf < (uint)local_30) { - uVar3 = (int)local_30 + 1; - freeBlock = (char *)local_44._0_4_; + if (0xf < GHIDRA_UINT(local_30)) { + uVar3 = GHIDRA_INT(local_30) + 1; + freeBlock = (*(undefined4 *)((char *)&((char *)local_44) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(local_44._0_4_ + -4); - uVar3 = (int)local_30 + 0x24; - if ((char *)0x1f < (char *)(local_44._0_4_ + (-4 - (int)freeBlock))) { + freeBlock = *(char **)((*(undefined4 *)((char *)&(local_44) + 0x0)) + -4); + uVar3 = GHIDRA_INT(local_30) + 0x24; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_44) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -6847,20 +6847,20 @@ LAB_00676b6a: local_44[1] = '\0'; local_44[2] = '\0'; local_44[3] = '\0'; - local_44._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_44) + 0x0)) = std::_Allocate(0x20); fStack_34 = 4.34403e-44; local_30 = 4.34403e-44; - builtin_strncpy((char *)local_44._0_4_,"gfx/JacobsLadderTearEffect.anm2",0x20); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_44) + 0x0)),"gfx/JacobsLadderTearEffect.anm2",0x20); local_14 = 4; ((ANM2 *)(&this->_tearEffectANM2))->ANM2::Load((std_string *)local_44,1); local_14 = 0xffffffff; - if (0xf < (uint)local_30) { - uVar3 = (int)local_30 + 1; - freeBlock = (char *)local_44._0_4_; + if (0xf < GHIDRA_UINT(local_30)) { + uVar3 = GHIDRA_INT(local_30) + 1; + freeBlock = (*(undefined4 *)((char *)&((char *)local_44) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(local_44._0_4_ + -4); - uVar3 = (int)local_30 + 0x24; - if ((char *)0x1f < (char *)(local_44._0_4_ + (-4 - (int)freeBlock))) { + freeBlock = *(char **)((*(undefined4 *)((char *)&(local_44) + 0x0)) + -4); + uVar3 = GHIDRA_INT(local_30) + 0x24; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_44) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -6890,20 +6890,20 @@ LAB_00676426: local_44[1] = '\0'; local_44[2] = '\0'; local_44[3] = '\0'; - local_44._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_44) + 0x0)) = std::_Allocate(0x20); fStack_34 = 3.92364e-44; local_30 = 4.34403e-44; - builtin_strncpy((char *)local_44._0_4_,"gfx/HolyLightTearEffect.anm2",0x1d); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_44) + 0x0)),"gfx/HolyLightTearEffect.anm2",0x1d); local_14 = 3; ((ANM2 *)(&this->_tearEffectANM2))->ANM2::Load((std_string *)local_44,1); local_14 = 0xffffffff; - if (0xf < (uint)local_30) { - uVar3 = (int)local_30 + 1; - freeBlock = (char *)local_44._0_4_; + if (0xf < GHIDRA_UINT(local_30)) { + uVar3 = GHIDRA_INT(local_30) + 1; + freeBlock = (*(undefined4 *)((char *)&((char *)local_44) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(local_44._0_4_ + -4); - uVar3 = (int)local_30 + 0x24; - if ((char *)0x1f < (char *)(local_44._0_4_ + (-4 - (int)freeBlock))) { + freeBlock = *(char **)((*(undefined4 *)((char *)&(local_44) + 0x0)) + -4); + uVar3 = GHIDRA_INT(local_30) + 0x24; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_44) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -6951,20 +6951,20 @@ LAB_006767dc: local_44[1] = '\0'; local_44[2] = '\0'; local_44[3] = '\0'; - local_44._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_44) + 0x0)) = std::_Allocate(0x20); fStack_34 = 4.06377e-44; local_30 = 4.34403e-44; - builtin_strncpy((char *)local_44._0_4_,"gfx/LittleHornTearEffect.anm2",0x1e); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_44) + 0x0)),"gfx/LittleHornTearEffect.anm2",0x1e); local_14 = 2; ((ANM2 *)(&this->_tearEffectANM2))->ANM2::Load((std_string *)local_44,1); local_14 = 0xffffffff; - if (0xf < (uint)local_30) { - uVar3 = (int)local_30 + 1; - freeBlock = (char *)local_44._0_4_; + if (0xf < GHIDRA_UINT(local_30)) { + uVar3 = GHIDRA_INT(local_30) + 1; + freeBlock = (*(undefined4 *)((char *)&((char *)local_44) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(local_44._0_4_ + -4); - uVar3 = (int)local_30 + 0x24; - if ((char *)0x1f < (char *)(local_44._0_4_ + (-4 - (int)freeBlock))) { + freeBlock = *(char **)((*(undefined4 *)((char *)&(local_44) + 0x0)) + -4); + uVar3 = GHIDRA_INT(local_30) + 0x24; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_44) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -7037,13 +7037,13 @@ LAB_006767e5: } LAB_00676b9b: *(undefined4 *)&(this->_tearFlags)._l = (undefined4)flags._l; - *(undefined4 *)((int)&(this->_tearFlags)._l + 4) = flags._l._4_4_; + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) = (*(undefined4 *)((char *)&(flags._l) + 0x4)); *(undefined4 *)&(this->_tearFlags)._h = (undefined4)flags._h; - *(undefined4 *)((int)&(this->_tearFlags)._h + 4) = flags._h._4_4_; + *(undefined4 *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) = (*(undefined4 *)((char *)&(flags._h) + 0x4)); ExceptionList = local_1c; return; LAB_006767e0: - uVar3 = -(uint)bVar4 | 1; + uVar3 = -GHIDRA_UINT(bVar4) | 1; goto LAB_006767e5; } @@ -7104,14 +7104,14 @@ void Entity_Tear::apply_death_flag_effects(Entity *target) local_8 = -NAN; puStack_c = &LAB_00af79ad; local_10 = ExceptionList; - uVar4 = __security_cookie ^ (uint)(&color)[1]._colorize; + uVar4 = __security_cookie ^ GHIDRA_UINT((&color)[1]._colorize); ExceptionList = &local_10; local_70 = (EntityPtr)target; local_a0.y = (float)this; if ((this->_dead == 0) || (((pBVar5 = BitSet128::operator_and(&childFlags,&this->_tearFlags,&g_tearFlagHydrobounce), - (int)pBVar5->_l == 0 && *(int *)((int)&pBVar5->_l + 4) == 0 && - ((int)pBVar5->_h == 0 && *(int *)((int)&pBVar5->_h + 4) == 0)) || + GHIDRA_INT(pBVar5->_l) == 0 && *(int *)(GHIDRA_INT(&pBVar5->_l) + 4) == 0 && + (GHIDRA_INT(pBVar5->_h) == 0 && *(int *)(GHIDRA_INT(&pBVar5->_h) + 4) == 0)) || (isDeadRising = '\x01', 0.0 < this->_fallingSpeed || this->_fallingSpeed == 0.0)))) { isDeadRising = '\0'; } @@ -7132,8 +7132,8 @@ void Entity_Tear::apply_death_flag_effects(Entity *target) pBVar5 = &this->_tearFlags; tearFlags = pBVar5; pBVar7 = BitSet128::operator_and(&childFlags,pBVar5,&g_tearFlagSplit); - if (((((int)pBVar7->_l != 0 || *(int *)((int)&pBVar7->_l + 4) != 0) || - ((int)pBVar7->_h != 0 || *(int *)((int)&pBVar7->_h + 4) != 0)) && + if ((((GHIDRA_INT(pBVar7->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar7->_l) + 4) != 0) || + (GHIDRA_INT(pBVar7->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar7->_h) + 4) != 0)) && (fVar9 < this->_collisionDamage)) && ((this->_height <= -5.0 && this->_height != -5.0 || (isDeadRising != '\0')))) { local_68 = (Entity_Tear *)0x0; @@ -7201,28 +7201,28 @@ void Entity_Tear::apply_death_flag_effects(Entity *target) BitSet128::operator_and(&childFlags,pBVar5,(BitSet128 *)local_64); if (isDeadRising != '\0') { pBVar5 = ((BitSet128 *)(&g_tearFlagExplosive))->BitSet128::__bnot(&local_b0); - childFlags._l._0_4_ = (uint)childFlags._l & (uint)pBVar5->_l; - childFlags._l._4_4_ = childFlags._l._4_4_ & *(uint *)((int)&pBVar5->_l + 4); - childFlags._h._0_4_ = (uint)childFlags._h & (uint)pBVar5->_h; - childFlags._h._4_4_ = childFlags._h._4_4_ & *(uint *)((int)&pBVar5->_h + 4); + (*(undefined4 *)((char *)&(childFlags._l) + 0x0)) = GHIDRA_UINT(childFlags._l) & GHIDRA_UINT(pBVar5->_l); + (*(undefined4 *)((char *)&(childFlags._l) + 0x4)) = (*(undefined4 *)((char *)&(childFlags._l) + 0x4)) & *(uint *)(GHIDRA_INT(&pBVar5->_l) + 4); + (*(undefined4 *)((char *)&(childFlags._h) + 0x0)) = GHIDRA_UINT(childFlags._h) & GHIDRA_UINT(pBVar5->_h); + (*(undefined4 *)((char *)&(childFlags._h) + 0x4)) = (*(undefined4 *)((char *)&(childFlags._h) + 0x4)) & *(uint *)(GHIDRA_INT(&pBVar5->_h) + 4); } childTear = local_60; this = (Entity_Tear *)local_a0.y; - color._tint[0] = (((ANM2 *)((int)local_a0.y + 0x48))->_color)._tint[0]; - color._tint[1] = (((ANM2 *)((int)local_a0.y + 0x48))->_color)._tint[1]; - color._tint[2] = (((ANM2 *)((int)local_a0.y + 0x48))->_color)._tint[2]; - color._offset[2] = (((ANM2 *)((int)local_a0.y + 0x48))->_color)._offset[2]; - color._colorize[0] = (((ANM2 *)((int)local_a0.y + 0x48))->_color)._colorize[0]; - color._colorize[1] = (((ANM2 *)((int)local_a0.y + 0x48))->_color)._colorize[1]; - color._colorize[2] = (((ANM2 *)((int)local_a0.y + 0x48))->_color)._colorize[2]; - color._colorize[3] = (((ANM2 *)((int)local_a0.y + 0x48))->_color)._colorize[3]; - color._tint[3] = (((ANM2 *)((int)local_a0.y + 0x48))->_color)._tint[3] * alphaMultiplier; - color._offset._0_8_ = *(undefined8 *)(((ANM2 *)((int)local_a0.y + 0x48))->_color)._offset; + color._tint[0] = (((ANM2 *)(GHIDRA_INT(local_a0.y) + 0x48))->_color)._tint[0]; + color._tint[1] = (((ANM2 *)(GHIDRA_INT(local_a0.y) + 0x48))->_color)._tint[1]; + color._tint[2] = (((ANM2 *)(GHIDRA_INT(local_a0.y) + 0x48))->_color)._tint[2]; + color._offset[2] = (((ANM2 *)(GHIDRA_INT(local_a0.y) + 0x48))->_color)._offset[2]; + color._colorize[0] = (((ANM2 *)(GHIDRA_INT(local_a0.y) + 0x48))->_color)._colorize[0]; + color._colorize[1] = (((ANM2 *)(GHIDRA_INT(local_a0.y) + 0x48))->_color)._colorize[1]; + color._colorize[2] = (((ANM2 *)(GHIDRA_INT(local_a0.y) + 0x48))->_color)._colorize[2]; + color._colorize[3] = (((ANM2 *)(GHIDRA_INT(local_a0.y) + 0x48))->_color)._colorize[3]; + color._tint[3] = (((ANM2 *)(GHIDRA_INT(local_a0.y) + 0x48))->_color)._tint[3] * alphaMultiplier; + (*(undefined8 *)((char *)&(color._offset) + 0x0)) = *(undefined8 *)(((ANM2 *)(GHIDRA_INT(local_a0.y) + 0x48))->_color)._offset; local_60->SetColor(&color,0xffffffff,0xff,0,1); - flags._l._4_4_ = childFlags._l._4_4_; - flags._l._0_4_ = (uint)childFlags._l; - flags._h._0_4_ = (uint)childFlags._h; - flags._h._4_4_ = childFlags._h._4_4_; + (*(undefined4 *)((char *)&(flags._l) + 0x4)) = (*(undefined4 *)((char *)&(childFlags._l) + 0x4)); + (*(undefined4 *)((char *)&(flags._l) + 0x0)) = GHIDRA_UINT(childFlags._l); + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = GHIDRA_UINT(childFlags._h); + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = (*(undefined4 *)((char *)&(childFlags._h) + 0x4)); SetTearFlags(childTear,flags); local_64 = *(EntityPtr *)((char *)this + 0x3bc); if (childTear->_parent != (EntityPtr)0x0) { @@ -7234,19 +7234,19 @@ void Entity_Tear::apply_death_flag_effects(Entity *target) std::multiset::insert(&childTear->_parent); } childTear->Update(); - local_68 = (Entity_Tear *)((int)local_68 + 1); - } while ((int)local_68 < 2); - pBVar5 = (BitSet128 *)((int)this + 0x428); + local_68 = (Entity_Tear *)(GHIDRA_INT(local_68) + 1); + } while (GHIDRA_INT(local_68) < 2); + pBVar5 = (BitSet128 *)(GHIDRA_INT(this) + 0x428); } fVar9 = -5.0; pBVar7 = BitSet128::operator_and(&local_b0,pBVar5,&g_tearFlagBone); - if ((((int)pBVar7->_l != 0 || *(int *)((int)&pBVar7->_l + 4) != 0) || - ((int)pBVar7->_h != 0 || *(int *)((int)&pBVar7->_h + 4) != 0)) && + if (((GHIDRA_INT(pBVar7->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar7->_l) + 4) != 0) || + (GHIDRA_INT(pBVar7->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar7->_h) + 4) != 0)) && (this->_height <= fVar9 && fVar9 != this->_height)) { local_64 = (EntityPtr)0x0; do { uVar4 = Random(); - fVar9 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + fVar9 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_60 = (Entity_Tear *)(fVar9 + fVar9); local_68 = (Entity_Tear *)sin((float)local_60); @@ -7272,20 +7272,20 @@ void Entity_Tear::apply_death_flag_effects(Entity *target) local_68 = childTear; if (uVar4 == 0x1d) { spritesheetPath[0] = std::_Allocate(0x20); - local_50._h._0_4_ = 0x18; - local_50._h._4_4_ = 0x1f; + (*(undefined4 *)((char *)&(local_50._h) + 0x0)) = 0x18; + (*(undefined4 *)((char *)&(local_50._h) + 0x4)) = 0x1f; builtin_strncpy(spritesheetPath[0],"gfx/tears_brokenbone.png",0x19); local_8 = 0.0; ((Sprite *)((Sprite *)&childTear->_sprite))->Sprite::ReplaceSpritesheet(0,(std_string *)spritesheetPath); local_8 = -NAN; bVar3 = extraout_CL; - if (0xf < local_50._h._4_4_) { - uVar4 = local_50._h._4_4_ + 1; + if (0xf < (*(undefined4 *)((char *)&(local_50._h) + 0x4))) { + uVar4 = (*(undefined4 *)((char *)&(local_50._h) + 0x4)) + 1; ptr = spritesheetPath[0]; if (0xfff < uVar4) { ptr = *(char **)(spritesheetPath[0] + -4); - uVar4 = local_50._h._4_4_ + 0x24; - if ((char *)0x1f < spritesheetPath[0] + (-4 - (int)ptr)) { + uVar4 = (*(undefined4 *)((char *)&(local_50._h) + 0x4)) + 0x24; + if ((char *)0x1f < spritesheetPath[0] + (-4 - GHIDRA_INT(ptr))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -7314,28 +7314,28 @@ void Entity_Tear::apply_death_flag_effects(Entity *target) BitSet128::operator_and(&childFlags,pBVar7,pBVar5); if (isDeadRising != '\0') { pBVar5 = ((BitSet128 *)(&g_tearFlagExplosive))->BitSet128::__bnot(&local_c0); - childFlags._l._0_4_ = (uint)childFlags._l & (uint)pBVar5->_l; - childFlags._l._4_4_ = childFlags._l._4_4_ & *(uint *)((int)&pBVar5->_l + 4); - childFlags._h._0_4_ = (uint)childFlags._h & (uint)pBVar5->_h; - childFlags._h._4_4_ = childFlags._h._4_4_ & *(uint *)((int)&pBVar5->_h + 4); + (*(undefined4 *)((char *)&(childFlags._l) + 0x0)) = GHIDRA_UINT(childFlags._l) & GHIDRA_UINT(pBVar5->_l); + (*(undefined4 *)((char *)&(childFlags._l) + 0x4)) = (*(undefined4 *)((char *)&(childFlags._l) + 0x4)) & *(uint *)(GHIDRA_INT(&pBVar5->_l) + 4); + (*(undefined4 *)((char *)&(childFlags._h) + 0x0)) = GHIDRA_UINT(childFlags._h) & GHIDRA_UINT(pBVar5->_h); + (*(undefined4 *)((char *)&(childFlags._h) + 0x4)) = (*(undefined4 *)((char *)&(childFlags._h) + 0x4)) & *(uint *)(GHIDRA_INT(&pBVar5->_h) + 4); } childTear = local_68; this = (Entity_Tear *)local_a0.y; - color._tint[0] = (((ANM2 *)((int)local_a0.y + 0x48))->_color)._tint[0]; - color._tint[1] = (((ANM2 *)((int)local_a0.y + 0x48))->_color)._tint[1]; - color._tint[2] = (((ANM2 *)((int)local_a0.y + 0x48))->_color)._tint[2]; - color._offset[2] = (((ANM2 *)((int)local_a0.y + 0x48))->_color)._offset[2]; - color._colorize[0] = (((ANM2 *)((int)local_a0.y + 0x48))->_color)._colorize[0]; - color._colorize[1] = (((ANM2 *)((int)local_a0.y + 0x48))->_color)._colorize[1]; - color._colorize[2] = (((ANM2 *)((int)local_a0.y + 0x48))->_color)._colorize[2]; - color._colorize[3] = (((ANM2 *)((int)local_a0.y + 0x48))->_color)._colorize[3]; - color._tint[3] = (((ANM2 *)((int)local_a0.y + 0x48))->_color)._tint[3] * alphaMultiplier; - color._offset._0_8_ = *(undefined8 *)(((ANM2 *)((int)local_a0.y + 0x48))->_color)._offset; + color._tint[0] = (((ANM2 *)(GHIDRA_INT(local_a0.y) + 0x48))->_color)._tint[0]; + color._tint[1] = (((ANM2 *)(GHIDRA_INT(local_a0.y) + 0x48))->_color)._tint[1]; + color._tint[2] = (((ANM2 *)(GHIDRA_INT(local_a0.y) + 0x48))->_color)._tint[2]; + color._offset[2] = (((ANM2 *)(GHIDRA_INT(local_a0.y) + 0x48))->_color)._offset[2]; + color._colorize[0] = (((ANM2 *)(GHIDRA_INT(local_a0.y) + 0x48))->_color)._colorize[0]; + color._colorize[1] = (((ANM2 *)(GHIDRA_INT(local_a0.y) + 0x48))->_color)._colorize[1]; + color._colorize[2] = (((ANM2 *)(GHIDRA_INT(local_a0.y) + 0x48))->_color)._colorize[2]; + color._colorize[3] = (((ANM2 *)(GHIDRA_INT(local_a0.y) + 0x48))->_color)._colorize[3]; + color._tint[3] = (((ANM2 *)(GHIDRA_INT(local_a0.y) + 0x48))->_color)._tint[3] * alphaMultiplier; + (*(undefined8 *)((char *)&(color._offset) + 0x0)) = *(undefined8 *)(((ANM2 *)(GHIDRA_INT(local_a0.y) + 0x48))->_color)._offset; local_68->SetColor(&color,0xffffffff,0xff,0,1); - flags_00._l._4_4_ = childFlags._l._4_4_; - flags_00._l._0_4_ = (uint)childFlags._l; - flags_00._h._0_4_ = (uint)childFlags._h; - flags_00._h._4_4_ = childFlags._h._4_4_; + (*(undefined4 *)((char *)&(flags_00._l) + 0x4)) = (*(undefined4 *)((char *)&(childFlags._l) + 0x4)); + (*(undefined4 *)((char *)&(flags_00._l) + 0x0)) = GHIDRA_UINT(childFlags._l); + (*(undefined4 *)((char *)&(flags_00._h) + 0x0)) = GHIDRA_UINT(childFlags._h); + (*(undefined4 *)((char *)&(flags_00._h) + 0x4)) = (*(undefined4 *)((char *)&(childFlags._h) + 0x4)); SetTearFlags(childTear,flags_00); local_74 = *(EntityPtr *)((char *)this + 0x3bc); if (childTear->_parent != (EntityPtr)0x0) { @@ -7347,13 +7347,13 @@ void Entity_Tear::apply_death_flag_effects(Entity *target) std::multiset::insert(&childTear->_parent); } childTear->Update(); - local_64 = (EntityPtr)((int)local_64 + 1); - } while ((int)local_64 < 2); - pBVar5 = (BitSet128 *)((int)this + 0x428); + local_64 = (EntityPtr)(GHIDRA_INT(local_64) + 1); + } while (GHIDRA_INT(local_64) < 2); + pBVar5 = (BitSet128 *)(GHIDRA_INT(this) + 0x428); } pBVar7 = BitSet128::operator_and(&local_b0,pBVar5,&g_tearFlagJacobs); - if ((((int)pBVar7->_l != 0 || *(int *)((int)&pBVar7->_l + 4) != 0) || - ((int)pBVar7->_h != 0 || *(int *)((int)&pBVar7->_h + 4) != 0)) && + if (((GHIDRA_INT(pBVar7->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar7->_l) + 4) != 0) || + (GHIDRA_INT(pBVar7->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar7->_h) + 4) != 0)) && (this->_height <= -5.0 && this->_height != -5.0)) { spawned = spawn_chain_lightning (&this->_pos,*pBVar5,(Entity *)this->_spawnerEntity, @@ -7374,22 +7374,22 @@ void Entity_Tear::apply_death_flag_effects(Entity *target) color._colorize[2] = (spawned->_sprite)._color._colorize[2]; color._colorize[3] = (spawned->_sprite)._color._colorize[3]; color._tint[3] = (spawned->_sprite)._color._tint[3] * alphaMultiplier; - color._offset._0_8_ = *(undefined8 *)(spawned->_sprite)._color._offset; + (*(undefined8 *)((char *)&(color._offset) + 0x0)) = *(undefined8 *)(spawned->_sprite)._color._offset; color._offset[2] = (spawned->_sprite)._color._offset[2]; spawned->SetColor(&color,0xffffffff,0xff,0,1); spawned->Update(); pBVar5 = &this->_tearFlags; } pBVar7 = BitSet128::operator_and(&local_b0,pBVar5,&g_tearFlagRift); - if (((int)pBVar7->_l != 0 || *(int *)((int)&pBVar7->_l + 4) != 0) || - ((int)pBVar7->_h != 0 || *(int *)((int)&pBVar7->_h + 4) != 0)) { + if ((GHIDRA_INT(pBVar7->_l) != 0 || *(int *)(GHIDRA_INT(&pBVar7->_l) + 4) != 0) || + (GHIDRA_INT(pBVar7->_h) != 0 || *(int *)(GHIDRA_INT(&pBVar7->_h) + 4) != 0)) { pBVar7 = ((BitSet128 *)(&g_tearFlagRift))->BitSet128::__bnot(&local_b0); - *(uint *)&pBVar5->_l = (uint)pBVar5->_l & (uint)pBVar7->_l; - puVar1 = (uint *)((int)&pBVar5->_l + 4); - *puVar1 = *puVar1 & *(uint *)((int)&pBVar7->_l + 4); - *(uint *)&pBVar5->_h = (uint)pBVar5->_h & (uint)pBVar7->_h; - puVar1 = (uint *)((int)&pBVar5->_h + 4); - *puVar1 = *puVar1 & *(uint *)((int)&pBVar7->_h + 4); + *(uint *)&pBVar5->_l = GHIDRA_UINT(pBVar5->_l) & GHIDRA_UINT(pBVar7->_l); + puVar1 = (uint *)(GHIDRA_INT(&pBVar5->_l) + 4); + *puVar1 = *puVar1 & *(uint *)(GHIDRA_INT(&pBVar7->_l) + 4); + *(uint *)&pBVar5->_h = GHIDRA_UINT(pBVar5->_h) & GHIDRA_UINT(pBVar7->_h); + puVar1 = (uint *)(GHIDRA_INT(&pBVar5->_h) + 4); + *puVar1 = *puVar1 & *(uint *)(GHIDRA_INT(&pBVar7->_h) + 4); game = g_game; bVar3 = ((Room *)(g_game->_room))->Room::IsPositionInRoom(&this->_pos,-10.0); if (bVar3 != 0) { @@ -7414,7 +7414,7 @@ void Entity_Tear::apply_death_flag_effects(Entity *target) manager = g_manager; local_70 = (EntityPtr)0x440; seed_fart_sound_override((int *)&local_70); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_70,0.5,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_70),0.5,2,0,1.0,0.0); } } ExceptionList = local_10; @@ -7447,7 +7447,7 @@ void Entity_Tear::ResetSpriteScale() uint local_c; Game *game; - local_c = __security_cookie ^ (uint)&local_4c; + local_c = __security_cookie ^ GHIDRA_UINT(&local_4c); local_4c = 1.0; iVar1 = this->_variant; scaleAnimBase = iVar1 * 100; @@ -7518,13 +7518,13 @@ void Entity_Tear::ResetSpriteScale() ((ANM2 *)(&this->_sprite))->ANM2::Play(animName,0); this->_scaleAnimNum = scaleAnimBase + uVar2; } - if ((int)uVar2 < 0xd) { - if (((((uint)g_tearFlagGrow._l | (uint)g_tearFlagLudovico._l) & (uint)(this->_tearFlags)._l) - == 0 && ((g_tearFlagGrow._l._4_4_ | g_tearFlagLudovico._l._4_4_) & - *(uint *)((int)&(this->_tearFlags)._l + 4)) == 0) && - ((((uint)g_tearFlagGrow._h | (uint)g_tearFlagLudovico._h) & (uint)(this->_tearFlags)._h) == - 0 && (*(uint *)((int)&(this->_tearFlags)._h + 4) & - (g_tearFlagGrow._h._4_4_ | g_tearFlagLudovico._h._4_4_)) == 0)) { + if (GHIDRA_INT(uVar2) < 0xd) { + if ((((GHIDRA_UINT(g_tearFlagGrow._l) | GHIDRA_UINT(g_tearFlagLudovico._l)) & GHIDRA_UINT((this->_tearFlags)._l)) + == 0 && (((*(undefined4 *)((char *)&(g_tearFlagGrow._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagLudovico._l) + 0x4))) & + *(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4)) == 0) && + (((GHIDRA_UINT(g_tearFlagGrow._h) | GHIDRA_UINT(g_tearFlagLudovico._h)) & GHIDRA_UINT((this->_tearFlags)._h)) == + 0 && (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & + ((*(undefined4 *)((char *)&(g_tearFlagGrow._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagLudovico._h) + 0x4)))) == 0)) { local_4c = 1.0; fVar3 = 1.0; } @@ -7587,7 +7587,7 @@ switchD_006777c1_caseD_28: animData = (this->_sprite)._animState._animData; } if (animData != (void *)0x0) { - ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)(int)startFrame); + ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(startFrame)); } } else { @@ -7634,11 +7634,11 @@ switchD_006777c1_caseD_28: do { if (fVar3 <= (float)(&DAT_00b64e70)[uVar2]) break; uVar2 = uVar2 + 1; - } while ((int)uVar2 < 4); + } while (GHIDRA_INT(uVar2) < 4); if (this->_scaleAnimNum != uVar2 + scaleAnimBase) { this->_scaleAnimNum = uVar2 + scaleAnimBase; sprintf(animName,(byte *)"Rotate%d"); - if (this->_scaleAnimNum / 100 == (int)local_48 / 100) { + if (this->_scaleAnimNum / 100 == GHIDRA_INT(local_48) / 100) { iVar1 = ((ANM2 *)(&this->_sprite))->ANM2::GetFrame(); ((ANM2 *)(&this->_sprite))->ANM2::Play(animName,0); if (iVar1 < 0) goto LAB_00677c46; @@ -7717,10 +7717,10 @@ LAB_00677c46: } while (layerIndex < (byte *)(this->_sprite)._layerCount); } } - if ((((uint)(this->_tearFlags)._l & (uint)g_tearFlagGlow._l) != 0 || - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagGlow._l._4_4_) != 0) || - (((uint)(this->_tearFlags)._h & (uint)g_tearFlagGlow._h) != 0 || - (*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagGlow._h._4_4_) != 0)) { + if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagGlow._l)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagGlow._l) + 0x4))) != 0) || + ((GHIDRA_UINT((this->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagGlow._h)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagGlow._h) + 0x4))) != 0)) { fVar3 = this->_fScale * 0.45; (this->_tearHaloANM2)._scale.y = fVar3 * fVar5; (this->_tearHaloANM2)._scale.x = fVar3 * fVar4; @@ -7843,7 +7843,7 @@ LAB_00678885: uVar6 = Random(); EVar3 = this->_spawnerEntity; uVar7 = Random(); - fVar12 = (float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + fVar12 = (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 * 360.0 * 0.017453292; fVar13 = cos(fVar12); fVar12 = sin(fVar12); @@ -7855,129 +7855,129 @@ LAB_00678885: &IsaacRepentancePlus::Entity_Tear::RTTI_Type_Descriptor,0); if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < DAT_00c80008) && (_Init_thread_header(&DAT_00c80008), DAT_00c80008 == -1)) { - DAT_00c80010 = (uint)g_tearFlagSpore._l | (uint)g_tearFlagOccult._l | - (uint)g_tearFlagBait._l | (uint)g_tearFlagMagnetize._l | - (uint)g_tearFlagIce._l | (uint)g_tearFlagPunch._l | - (uint)g_tearFlagCreepTrail._l | (uint)g_tearFlagHydrobounce._l | - (uint)g_tearFlagLasershot._l | (uint)g_tearFlagLaser._l | - (uint)g_tearFlagHorn._l | (uint)g_tearFlagJacobs._l | - (uint)g_tearFlagNeedle._l | (uint)g_tearFlagMidas._l | - (uint)g_tearFlagBelial._l | (uint)g_tearFlagAcid._l | - (uint)g_tearFlagEgg._l | (uint)g_tearFlagBooger._l | - (uint)g_tearFlagPermanentConfusion._l | (uint)g_tearFlagBigSpiral._l | - (uint)g_tearFlagGreedCoin._l | (uint)g_tearFlagGodsFlesh._l | - (uint)g_tearFlagBlackHpDrop._l | (uint)g_tearFlagCoinDrop._l | - (uint)g_tearFlagLightFromHeaven._l | (uint)g_tearFlagContinuum._l | - (uint)g_tearFlagSticky._l | (uint)g_tearFlagMysteriousLiquidCreep._l | - (uint)g_tearFlagGish._l | (uint)g_tearFlagGlow._l | - (uint)g_tearFlagSquare._l | (uint)g_tearFlagFlat._l | - (uint)g_tearFlagSpiral._l | (uint)g_tearFlagPulse._l | - (uint)g_tearFlagKnockback._l | (uint)g_tearFlagAttractor._l | - (uint)g_tearFlagBurn._l | (uint)g_tearFlagShrink._l | - (uint)g_tearFlagFear._l | (uint)g_tearFlagBounce._l | - (uint)g_tearFlagHpDrop._l | (uint)g_tearFlagConfusion._l | - (uint)g_tearFlagCharm._l | (uint)g_tearFlagMulligan._l | - (uint)g_tearFlagWiggle._l | (uint)g_tearFlagPersistent._l | - (uint)g_tearFlagGrow._l | (uint)g_tearFlagFreeze._l | - (uint)g_tearFlagPoison._l | (uint)g_tearFlagSlow._l | - (uint)g_tearFlagHoming._l | (uint)g_tearFlagSpectral._l | - (uint)g_tearFlagPiercing._l; - DAT_00c80014 = g_tearFlagSpore._l._4_4_ | g_tearFlagOccult._l._4_4_ | - g_tearFlagBait._l._4_4_ | g_tearFlagMagnetize._l._4_4_ | - g_tearFlagIce._l._4_4_ | g_tearFlagPunch._l._4_4_ | - g_tearFlagCreepTrail._l._4_4_ | g_tearFlagHydrobounce._l._4_4_ | - g_tearFlagLasershot._l._4_4_ | g_tearFlagLaser._l._4_4_ | - g_tearFlagHorn._l._4_4_ | g_tearFlagJacobs._l._4_4_ | - g_tearFlagNeedle._l._4_4_ | g_tearFlagMidas._l._4_4_ | - g_tearFlagBelial._l._4_4_ | g_tearFlagAcid._l._4_4_ | - g_tearFlagEgg._l._4_4_ | g_tearFlagBooger._l._4_4_ | - g_tearFlagPermanentConfusion._l._4_4_ | g_tearFlagBigSpiral._l._4_4_ | - g_tearFlagGreedCoin._l._4_4_ | g_tearFlagGodsFlesh._l._4_4_ | - g_tearFlagBlackHpDrop._l._4_4_ | g_tearFlagCoinDrop._l._4_4_ | - g_tearFlagLightFromHeaven._l._4_4_ | g_tearFlagContinuum._l._4_4_ | - g_tearFlagSticky._l._4_4_ | g_tearFlagMysteriousLiquidCreep._l._4_4_ | - g_tearFlagGish._l._4_4_ | g_tearFlagGlow._l._4_4_ | - g_tearFlagSquare._l._4_4_ | g_tearFlagFlat._l._4_4_ | - g_tearFlagSpiral._l._4_4_ | g_tearFlagPulse._l._4_4_ | - g_tearFlagKnockback._l._4_4_ | g_tearFlagAttractor._l._4_4_ | - g_tearFlagBurn._l._4_4_ | g_tearFlagShrink._l._4_4_ | - g_tearFlagFear._l._4_4_ | g_tearFlagBounce._l._4_4_ | - g_tearFlagHpDrop._l._4_4_ | g_tearFlagConfusion._l._4_4_ | - g_tearFlagCharm._l._4_4_ | g_tearFlagMulligan._l._4_4_ | - g_tearFlagWiggle._l._4_4_ | g_tearFlagPersistent._l._4_4_ | - g_tearFlagGrow._l._4_4_ | g_tearFlagFreeze._l._4_4_ | - g_tearFlagPoison._l._4_4_ | g_tearFlagSlow._l._4_4_ | - g_tearFlagHoming._l._4_4_ | g_tearFlagSpectral._l._4_4_ | - g_tearFlagPiercing._l._4_4_; - DAT_00c80018 = (uint)g_tearFlagSpore._h | (uint)g_tearFlagOccult._h | - (uint)g_tearFlagBait._h | (uint)g_tearFlagMagnetize._h | - (uint)g_tearFlagIce._h | (uint)g_tearFlagPunch._h | - (uint)g_tearFlagCreepTrail._h | (uint)g_tearFlagHydrobounce._h | - (uint)g_tearFlagLasershot._h | (uint)g_tearFlagLaser._h | - (uint)g_tearFlagHorn._h | (uint)g_tearFlagJacobs._h | - (uint)g_tearFlagNeedle._h | (uint)g_tearFlagMidas._h | - (uint)g_tearFlagBelial._h | (uint)g_tearFlagAcid._h | - (uint)g_tearFlagEgg._h | (uint)g_tearFlagBooger._h | - (uint)g_tearFlagPermanentConfusion._h | (uint)g_tearFlagBigSpiral._h | - (uint)g_tearFlagGreedCoin._h | (uint)g_tearFlagGodsFlesh._h | - (uint)g_tearFlagBlackHpDrop._h | (uint)g_tearFlagCoinDrop._h | - (uint)g_tearFlagLightFromHeaven._h | (uint)g_tearFlagContinuum._h | - (uint)g_tearFlagSticky._h | (uint)g_tearFlagMysteriousLiquidCreep._h | - (uint)g_tearFlagGish._h | (uint)g_tearFlagGlow._h | - (uint)g_tearFlagSquare._h | (uint)g_tearFlagFlat._h | - (uint)g_tearFlagSpiral._h | (uint)g_tearFlagPulse._h | - (uint)g_tearFlagKnockback._h | (uint)g_tearFlagAttractor._h | - (uint)g_tearFlagBurn._h | (uint)g_tearFlagShrink._h | - (uint)g_tearFlagFear._h | (uint)g_tearFlagBounce._h | - (uint)g_tearFlagHpDrop._h | (uint)g_tearFlagConfusion._h | - (uint)g_tearFlagCharm._h | (uint)g_tearFlagMulligan._h | - (uint)g_tearFlagWiggle._h | (uint)g_tearFlagPersistent._h | - (uint)g_tearFlagGrow._h | (uint)g_tearFlagFreeze._h | - (uint)g_tearFlagPoison._h | (uint)g_tearFlagSlow._h | - (uint)g_tearFlagHoming._h | (uint)g_tearFlagSpectral._h | - (uint)g_tearFlagPiercing._h; - DAT_00c8001c = g_tearFlagSpore._h._4_4_ | g_tearFlagOccult._h._4_4_ | - g_tearFlagBait._h._4_4_ | g_tearFlagMagnetize._h._4_4_ | - g_tearFlagIce._h._4_4_ | g_tearFlagPunch._h._4_4_ | - g_tearFlagCreepTrail._h._4_4_ | g_tearFlagHydrobounce._h._4_4_ | - g_tearFlagLasershot._h._4_4_ | g_tearFlagLaser._h._4_4_ | - g_tearFlagHorn._h._4_4_ | g_tearFlagJacobs._h._4_4_ | - g_tearFlagNeedle._h._4_4_ | g_tearFlagMidas._h._4_4_ | - g_tearFlagBelial._h._4_4_ | g_tearFlagAcid._h._4_4_ | - g_tearFlagEgg._h._4_4_ | g_tearFlagBooger._h._4_4_ | - g_tearFlagPermanentConfusion._h._4_4_ | g_tearFlagBigSpiral._h._4_4_ | - g_tearFlagGreedCoin._h._4_4_ | g_tearFlagGodsFlesh._h._4_4_ | - g_tearFlagBlackHpDrop._h._4_4_ | g_tearFlagCoinDrop._h._4_4_ | - g_tearFlagLightFromHeaven._h._4_4_ | g_tearFlagContinuum._h._4_4_ | - g_tearFlagSticky._h._4_4_ | g_tearFlagMysteriousLiquidCreep._h._4_4_ | - g_tearFlagGish._h._4_4_ | g_tearFlagGlow._h._4_4_ | - g_tearFlagSquare._h._4_4_ | g_tearFlagFlat._h._4_4_ | - g_tearFlagSpiral._h._4_4_ | g_tearFlagPulse._h._4_4_ | - g_tearFlagKnockback._h._4_4_ | g_tearFlagAttractor._h._4_4_ | - g_tearFlagBurn._h._4_4_ | g_tearFlagShrink._h._4_4_ | - g_tearFlagFear._h._4_4_ | g_tearFlagBounce._h._4_4_ | - g_tearFlagHpDrop._h._4_4_ | g_tearFlagConfusion._h._4_4_ | - g_tearFlagCharm._h._4_4_ | g_tearFlagMulligan._h._4_4_ | - g_tearFlagWiggle._h._4_4_ | g_tearFlagPersistent._h._4_4_ | - g_tearFlagGrow._h._4_4_ | g_tearFlagFreeze._h._4_4_ | - g_tearFlagPoison._h._4_4_ | g_tearFlagSlow._h._4_4_ | - g_tearFlagHoming._h._4_4_ | g_tearFlagSpectral._h._4_4_ | - g_tearFlagPiercing._h._4_4_; + DAT_00c80010 = GHIDRA_UINT(g_tearFlagSpore._l) | GHIDRA_UINT(g_tearFlagOccult._l) | + GHIDRA_UINT(g_tearFlagBait._l) | GHIDRA_UINT(g_tearFlagMagnetize._l) | + GHIDRA_UINT(g_tearFlagIce._l) | GHIDRA_UINT(g_tearFlagPunch._l) | + GHIDRA_UINT(g_tearFlagCreepTrail._l) | GHIDRA_UINT(g_tearFlagHydrobounce._l) | + GHIDRA_UINT(g_tearFlagLasershot._l) | GHIDRA_UINT(g_tearFlagLaser._l) | + GHIDRA_UINT(g_tearFlagHorn._l) | GHIDRA_UINT(g_tearFlagJacobs._l) | + GHIDRA_UINT(g_tearFlagNeedle._l) | GHIDRA_UINT(g_tearFlagMidas._l) | + GHIDRA_UINT(g_tearFlagBelial._l) | GHIDRA_UINT(g_tearFlagAcid._l) | + GHIDRA_UINT(g_tearFlagEgg._l) | GHIDRA_UINT(g_tearFlagBooger._l) | + GHIDRA_UINT(g_tearFlagPermanentConfusion._l) | GHIDRA_UINT(g_tearFlagBigSpiral._l) | + GHIDRA_UINT(g_tearFlagGreedCoin._l) | GHIDRA_UINT(g_tearFlagGodsFlesh._l) | + GHIDRA_UINT(g_tearFlagBlackHpDrop._l) | GHIDRA_UINT(g_tearFlagCoinDrop._l) | + GHIDRA_UINT(g_tearFlagLightFromHeaven._l) | GHIDRA_UINT(g_tearFlagContinuum._l) | + GHIDRA_UINT(g_tearFlagSticky._l) | GHIDRA_UINT(g_tearFlagMysteriousLiquidCreep._l) | + GHIDRA_UINT(g_tearFlagGish._l) | GHIDRA_UINT(g_tearFlagGlow._l) | + GHIDRA_UINT(g_tearFlagSquare._l) | GHIDRA_UINT(g_tearFlagFlat._l) | + GHIDRA_UINT(g_tearFlagSpiral._l) | GHIDRA_UINT(g_tearFlagPulse._l) | + GHIDRA_UINT(g_tearFlagKnockback._l) | GHIDRA_UINT(g_tearFlagAttractor._l) | + GHIDRA_UINT(g_tearFlagBurn._l) | GHIDRA_UINT(g_tearFlagShrink._l) | + GHIDRA_UINT(g_tearFlagFear._l) | GHIDRA_UINT(g_tearFlagBounce._l) | + GHIDRA_UINT(g_tearFlagHpDrop._l) | GHIDRA_UINT(g_tearFlagConfusion._l) | + GHIDRA_UINT(g_tearFlagCharm._l) | GHIDRA_UINT(g_tearFlagMulligan._l) | + GHIDRA_UINT(g_tearFlagWiggle._l) | GHIDRA_UINT(g_tearFlagPersistent._l) | + GHIDRA_UINT(g_tearFlagGrow._l) | GHIDRA_UINT(g_tearFlagFreeze._l) | + GHIDRA_UINT(g_tearFlagPoison._l) | GHIDRA_UINT(g_tearFlagSlow._l) | + GHIDRA_UINT(g_tearFlagHoming._l) | GHIDRA_UINT(g_tearFlagSpectral._l) | + GHIDRA_UINT(g_tearFlagPiercing._l); + DAT_00c80014 = (*(undefined4 *)((char *)&(g_tearFlagSpore._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagOccult._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagBait._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagMagnetize._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagIce._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagPunch._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagCreepTrail._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagHydrobounce._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagLasershot._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagLaser._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagHorn._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagJacobs._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagNeedle._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagMidas._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagBelial._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagAcid._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagEgg._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagBooger._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagPermanentConfusion._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagBigSpiral._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagGreedCoin._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagGodsFlesh._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagBlackHpDrop._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagCoinDrop._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagLightFromHeaven._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagContinuum._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagSticky._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagMysteriousLiquidCreep._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagGish._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagGlow._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagSquare._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagFlat._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagSpiral._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagPulse._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagKnockback._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagAttractor._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagBurn._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagShrink._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagFear._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagBounce._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagHpDrop._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagConfusion._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagCharm._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagMulligan._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagWiggle._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagPersistent._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagGrow._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagFreeze._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagPoison._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagSlow._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagHoming._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagSpectral._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagPiercing._l) + 0x4)); + DAT_00c80018 = GHIDRA_UINT(g_tearFlagSpore._h) | GHIDRA_UINT(g_tearFlagOccult._h) | + GHIDRA_UINT(g_tearFlagBait._h) | GHIDRA_UINT(g_tearFlagMagnetize._h) | + GHIDRA_UINT(g_tearFlagIce._h) | GHIDRA_UINT(g_tearFlagPunch._h) | + GHIDRA_UINT(g_tearFlagCreepTrail._h) | GHIDRA_UINT(g_tearFlagHydrobounce._h) | + GHIDRA_UINT(g_tearFlagLasershot._h) | GHIDRA_UINT(g_tearFlagLaser._h) | + GHIDRA_UINT(g_tearFlagHorn._h) | GHIDRA_UINT(g_tearFlagJacobs._h) | + GHIDRA_UINT(g_tearFlagNeedle._h) | GHIDRA_UINT(g_tearFlagMidas._h) | + GHIDRA_UINT(g_tearFlagBelial._h) | GHIDRA_UINT(g_tearFlagAcid._h) | + GHIDRA_UINT(g_tearFlagEgg._h) | GHIDRA_UINT(g_tearFlagBooger._h) | + GHIDRA_UINT(g_tearFlagPermanentConfusion._h) | GHIDRA_UINT(g_tearFlagBigSpiral._h) | + GHIDRA_UINT(g_tearFlagGreedCoin._h) | GHIDRA_UINT(g_tearFlagGodsFlesh._h) | + GHIDRA_UINT(g_tearFlagBlackHpDrop._h) | GHIDRA_UINT(g_tearFlagCoinDrop._h) | + GHIDRA_UINT(g_tearFlagLightFromHeaven._h) | GHIDRA_UINT(g_tearFlagContinuum._h) | + GHIDRA_UINT(g_tearFlagSticky._h) | GHIDRA_UINT(g_tearFlagMysteriousLiquidCreep._h) | + GHIDRA_UINT(g_tearFlagGish._h) | GHIDRA_UINT(g_tearFlagGlow._h) | + GHIDRA_UINT(g_tearFlagSquare._h) | GHIDRA_UINT(g_tearFlagFlat._h) | + GHIDRA_UINT(g_tearFlagSpiral._h) | GHIDRA_UINT(g_tearFlagPulse._h) | + GHIDRA_UINT(g_tearFlagKnockback._h) | GHIDRA_UINT(g_tearFlagAttractor._h) | + GHIDRA_UINT(g_tearFlagBurn._h) | GHIDRA_UINT(g_tearFlagShrink._h) | + GHIDRA_UINT(g_tearFlagFear._h) | GHIDRA_UINT(g_tearFlagBounce._h) | + GHIDRA_UINT(g_tearFlagHpDrop._h) | GHIDRA_UINT(g_tearFlagConfusion._h) | + GHIDRA_UINT(g_tearFlagCharm._h) | GHIDRA_UINT(g_tearFlagMulligan._h) | + GHIDRA_UINT(g_tearFlagWiggle._h) | GHIDRA_UINT(g_tearFlagPersistent._h) | + GHIDRA_UINT(g_tearFlagGrow._h) | GHIDRA_UINT(g_tearFlagFreeze._h) | + GHIDRA_UINT(g_tearFlagPoison._h) | GHIDRA_UINT(g_tearFlagSlow._h) | + GHIDRA_UINT(g_tearFlagHoming._h) | GHIDRA_UINT(g_tearFlagSpectral._h) | + GHIDRA_UINT(g_tearFlagPiercing._h); + DAT_00c8001c = (*(undefined4 *)((char *)&(g_tearFlagSpore._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagOccult._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagBait._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagMagnetize._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagIce._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagPunch._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagCreepTrail._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagHydrobounce._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagLasershot._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagLaser._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagHorn._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagJacobs._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagNeedle._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagMidas._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagBelial._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagAcid._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagEgg._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagBooger._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagPermanentConfusion._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagBigSpiral._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagGreedCoin._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagGodsFlesh._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagBlackHpDrop._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagCoinDrop._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagLightFromHeaven._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagContinuum._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagSticky._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagMysteriousLiquidCreep._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagGish._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagGlow._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagSquare._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagFlat._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagSpiral._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagPulse._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagKnockback._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagAttractor._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagBurn._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagShrink._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagFear._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagBounce._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagHpDrop._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagConfusion._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagCharm._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagMulligan._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagWiggle._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagPersistent._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagGrow._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagFreeze._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagPoison._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagSlow._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagHoming._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagSpectral._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagPiercing._h) + 0x4)); _Init_thread_footer(&DAT_00c80008); } - uStack_1c = DAT_00c80014 & *(uint *)((int)&(this->_tearFlags)._l + 4); - uStack_20 = DAT_00c80010 & (uint)(this->_tearFlags)._l; - uStack_14 = *(uint *)((int)&(this->_tearFlags)._h + 4) & DAT_00c8001c; - uStack_18 = DAT_00c80018 & (uint)(this->_tearFlags)._h; - flags._l._4_4_ = uStack_1c; - flags._l._0_4_ = uStack_20; - flags._h._0_4_ = uStack_18; - flags._h._4_4_ = uStack_14; + uStack_1c = DAT_00c80014 & *(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); + uStack_20 = DAT_00c80010 & GHIDRA_UINT((this->_tearFlags)._l); + uStack_14 = *(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & DAT_00c8001c; + uStack_18 = DAT_00c80018 & GHIDRA_UINT((this->_tearFlags)._h); + (*(undefined4 *)((char *)&(flags._l) + 0x4)) = uStack_1c; + (*(undefined4 *)((char *)&(flags._l) + 0x0)) = uStack_20; + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = uStack_18; + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = uStack_14; SetTearFlags(childShot,flags); uVar6 = Random(); (**(code **)(*(int *)childShot + 0x40)) ((this->_collisionDamage / 1.5) * - ((float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 0.5 + 0.75)); fVar12 = fVar13 * this->_fScale * 0.55; if (fVar12 <= 0.01) { @@ -8001,7 +8001,7 @@ LAB_00678885: uVar6 = Random(); childShot->_fallingAccel = 1.3; childShot->_fallingSpeed = - ((float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 0.75 + 0.5) * (float)this * 0.5; childShot->SetColor(&(this->_sprite)._color,0xffffffff,0xff,0,1); childShot->_prismTouched = this->_prismTouched; @@ -8015,8 +8015,8 @@ LAB_00678b68: uVar6 = Random(); childShot = (Entity_Tear *) Entity_Player::FireDelayedBrimstone - (player,(float)((double)(int)uVar6 + - __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + (player,(float)((double)GHIDRA_INT(uVar6) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 360.0,(Entity *)player); (childShot->_pos).x = (this->_pos).x; (childShot->_pos).y = (this->_pos).y; @@ -8036,7 +8036,7 @@ LAB_00678b68: isOwned = ((Entity_Player *)(player))->Entity_Player::HasCollectible(0x44,0); if (isOwned == 0) goto LAB_00678885; uVar6 = Random(); - fVar12 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar12 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 360.0 * 0.017453292; fVar13 = cos(fVar12); laserDirection.y = sin(fVar12); @@ -8058,10 +8058,10 @@ LAB_00678b68: goto LAB_00678b68; } uVar6 = Random(); - dVar2 = __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]; + dVar2 = __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]; fVar12 = player->_shotspeed * 10.0; uVar7 = Random(); - fVar13 = (float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + fVar13 = (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 * 360.0 * 0.017453292; fVar14 = cos(fVar13); fVar13 = sin(fVar13); @@ -8069,7 +8069,7 @@ LAB_00678b68: techXVelocity.x = fVar14 * fVar12 - fVar13 * 0.0; techXLaser = Entity_Player::FireTechXLaser (player,&this->_pos,&techXVelocity, - (float)((double)(int)uVar6 + dVar2) * 2.3283064e-10 * 60.0 + 20.0, + (float)((double)GHIDRA_INT(uVar6) + dVar2) * 2.3283064e-10 * 60.0 + 20.0, (Entity *)0x0,1.0); techXLaser->_prismTouched = this->_prismTouched; techXLaser->_multidimensionalTouched = this->_multidimensionalTouched; @@ -8077,21 +8077,21 @@ LAB_00678b68: } else { uVar6 = Random(); - fVar12 = ((float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar12 = ((float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 4.0 + 3.0) * player->_shotspeed; uVar6 = Random(); - fVar13 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar13 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 360.0 * 0.017453292; fVar14 = cos(fVar13); fVar13 = sin(fVar13); bombVelocity.x = fVar12 * fVar14 - fVar13 * 0.0; bombVelocity.y = fVar12 * fVar13 + fVar14 * 0.0; uVar6 = Random(); - fVar12 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar12 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 3.14; fVar12 = fVar12 + fVar12; uVar6 = Random(); - fVar13 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar13 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10; fVar14 = cos(fVar12); bombPos.x = fVar14 * fVar13 * 10.0 + (this->_pos).x; @@ -8101,17 +8101,17 @@ LAB_00678b68: childBomb->SetColor(&(this->_sprite)._color,0xffffffff,0xff,0,1); childBomb->_prismTouched = this->_prismTouched; if (this->_canTriggerStreakEnd == 0) { - uVar6 = *(uint *)((int)&(childBomb->_tearFlags)._l + 4); + uVar6 = *(uint *)(GHIDRA_INT(&(childBomb->_tearFlags)._l) + 4); qVar5 = (childBomb->_tearFlags)._h; - uVar7 = *(uint *)((int)&(childBomb->_tearFlags)._h + 4); - uVar11 = ~(uint)g_tearFlagSadBomb._h; - uVar10 = ~g_tearFlagSadBomb._h._4_4_; - uVar8 = ~g_tearFlagSadBomb._l._4_4_; + uVar7 = *(uint *)(GHIDRA_INT(&(childBomb->_tearFlags)._h) + 4); + uVar11 = ~GHIDRA_UINT(g_tearFlagSadBomb._h); + uVar10 = ~(*(undefined4 *)((char *)&(g_tearFlagSadBomb._h) + 0x4)); + uVar8 = ~(*(undefined4 *)((char *)&(g_tearFlagSadBomb._l) + 0x4)); *(uint *)&(childBomb->_tearFlags)._l = - ~(uint)g_tearFlagSadBomb._l & (uint)(childBomb->_tearFlags)._l; - *(uint *)((int)&(childBomb->_tearFlags)._l + 4) = uVar8 & uVar6; - *(uint *)&(childBomb->_tearFlags)._h = uVar11 & (uint)qVar5; - *(uint *)((int)&(childBomb->_tearFlags)._h + 4) = uVar10 & uVar7; + ~GHIDRA_UINT(g_tearFlagSadBomb._l) & GHIDRA_UINT((childBomb->_tearFlags)._l); + *(uint *)(GHIDRA_INT(&(childBomb->_tearFlags)._l) + 4) = uVar8 & uVar6; + *(uint *)&(childBomb->_tearFlags)._h = uVar11 & GHIDRA_UINT(qVar5); + *(uint *)(GHIDRA_INT(&(childBomb->_tearFlags)._h) + 4) = uVar10 & uVar7; } childBomb->_loadCostumes = 1; childBomb->_scale = childBomb->_scale * 0.5; @@ -8122,7 +8122,7 @@ LAB_00678b68: if ((childBomb->_variant != 0x13) && (childBomb->_variant != 0x14)) { uVar6 = Random(); childBomb->_fallSpeed = - -3.0 - (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) + -3.0 - (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 5.0; uVar6 = (childBomb->_dropRNG)._seed; if (uVar6 == 0) { @@ -8144,8 +8144,8 @@ LAB_00678b68: childBomb->_explosionCountdown1 = iVar9; *(int *)&(*(undefined1 *)((char *)(childBomb) + 0x414)) = iVar9; } - *(uint *)&childBomb->_flags = (uint)childBomb->_flags | 0x4000000; - puVar1 = (uint *)((int)&childBomb->_flags + 4); + *(uint *)&childBomb->_flags = GHIDRA_UINT(childBomb->_flags) | 0x4000000; + puVar1 = (uint *)(GHIDRA_INT(&childBomb->_flags) + 4); *puVar1 = *puVar1 | 0x400; } } @@ -8189,14 +8189,14 @@ void Entity_Tear::Render(Vector *offset) fVar1 = offset->y; position->x = (float)dVar4 / fVar3 + offset->x; (this->_renderPosition).y = (float)dVar5 / fVar3 + fVar1; - if ((((uint)(this->_tearFlags)._l & (uint)g_tearFlagGlow._l) != 0 || - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagGlow._l._4_4_) != 0) || - (((uint)(this->_tearFlags)._h & (uint)g_tearFlagGlow._h) != 0 || - (*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagGlow._h._4_4_) != 0)) { + if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagGlow._l)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagGlow._l) + 0x4))) != 0) || + ((GHIDRA_UINT((this->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagGlow._h)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagGlow._h) + 0x4))) != 0)) { ((ANM2 *)(&this->_tearHaloANM2))->ANM2::Render(position,&g_vectorZero,&g_vectorZero); } if (((this->_tearEffectANM2)._loaded != 0) && - (((uint)(this->_tearEffectANM2)._bitflags >> 0xd & 1) != 0)) { + ((GHIDRA_UINT((this->_tearEffectANM2)._bitflags) >> 0xd & 1) != 0)) { ((ANM2 *)(&this->_tearEffectANM2))->ANM2::Render(position,&g_vectorZero,&g_vectorZero); } spawnerPlayer = @@ -8252,7 +8252,7 @@ void Entity_Tear::Render(Vector *offset) (this->_sprite)._color._offset[2] = fVar1; } if (((this->_tearEffectANM2)._loaded != 0) && - (((uint)(this->_tearEffectANM2)._bitflags >> 0xd & 1) == 0)) { + ((GHIDRA_UINT((this->_tearEffectANM2)._bitflags) >> 0xd & 1) == 0)) { ((ANM2 *)(&this->_tearEffectANM2))->ANM2::Render(position,&g_vectorZero,&g_vectorZero); } if (this->_deadEyeIntensity != 0.0) { @@ -8302,18 +8302,18 @@ void Entity_Tear::Interpolate() (this->_pos).y = fVar5 + fVar8; return; } - uVar3 = (uint)(this->_tearFlags)._h; - local_2c = (undefined1 *)(uVar3 & (uint)g_tearFlagTractorBeam._h); - tearFlagsLo = (uint)(this->_tearFlags)._l; - local_34.x = (float)(*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagTractorBeam._h._4_4_); + uVar3 = GHIDRA_UINT((this->_tearFlags)._h); + local_2c = (undefined1 *)(uVar3 & GHIDRA_UINT(g_tearFlagTractorBeam._h)); + tearFlagsLo = GHIDRA_UINT((this->_tearFlags)._l); + local_34.x = (float)(*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagTractorBeam._h) + 0x4))); local_1c = this; - if (((tearFlagsLo & (uint)g_tearFlagTractorBeam._l) != 0 || - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagTractorBeam._l._4_4_) != 0) || + if (((tearFlagsLo & GHIDRA_UINT(g_tearFlagTractorBeam._l)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagTractorBeam._l) + 0x4))) != 0) || (local_2c != (undefined1 *)0x0 || local_34.x != 0.0)) { - if ((((tearFlagsLo & (uint)g_tearFlagLudovico._l) == 0 && - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagLudovico._l._4_4_) == 0) && - ((((uVar3 & (uint)g_tearFlagLudovico._h) == 0 && - (*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagLudovico._h._4_4_) == 0 && + if ((((tearFlagsLo & GHIDRA_UINT(g_tearFlagLudovico._l)) == 0 && + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagLudovico._l) + 0x4))) == 0) && + ((((uVar3 & GHIDRA_UINT(g_tearFlagLudovico._h)) == 0 && + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagLudovico._h) + 0x4))) == 0 && (EVar4 = this->_parent, EVar4 != (EntityPtr)0x0)) && (*(int *)((char *)EVar4 + 0x28) == 1)))) && (this->_stickTarget == (void *)0x0)) { iVar1 = __RTDynamicCast(EVar4,0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, @@ -8322,13 +8322,13 @@ void Entity_Tear::Interpolate() &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Laser::RTTI_Type_Descriptor,0); if (playerLaser != 0) { - auStack_18._0_4_ = (uint)(this->_tearFlags)._l & (uint)g_tearFlagBoomerang._l; - auStack_18._4_4_ = *(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagBoomerang._l._4_4_ + (*(undefined4 *)((char *)&(auStack_18) + 0x0)) = GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagBoomerang._l); + (*(undefined4 *)((char *)&(auStack_18) + 0x4)) = *(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagBoomerang._l) + 0x4)) ; fVar5 = (this->_pos).x - *(float *)(iVar1 + 0x33c); fVar8 = (this->_pos).y - *(float *)(iVar1 + 0x340); - uStack_10 = (uint)(this->_tearFlags)._h & (uint)g_tearFlagBoomerang._h; - uStack_c = *(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagBoomerang._h._4_4_; + uStack_10 = GHIDRA_UINT((this->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagBoomerang._h); + uStack_c = *(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagBoomerang._h) + 0x4)); local_2c = (undefined1 *)0x3f800000; local_28 = fVar8; local_24.x = fVar5; @@ -8337,8 +8337,8 @@ void Entity_Tear::Interpolate() local_2c = &DAT_bf800000; } local_34.x = *(float *)(extraout_EDX + 0x41c) * 0.017453292; - auStack_18._0_4_ = cos(local_34.x); - auStack_18._4_4_ = sin(local_34.x); + (*(undefined4 *)((char *)&(auStack_18) + 0x0)) = cos(local_34.x); + (*(undefined4 *)((char *)&(auStack_18) + 0x4)) = sin(local_34.x); fVar5 = (this->_velocity).y; fVar8 = (this->_velocity).x; fVar5 = sqrtf(fVar8 * fVar8 + fVar5 * fVar5); @@ -8348,17 +8348,17 @@ void Entity_Tear::Interpolate() (this->_velocity).y = (float)local_2c * fVar5; fVar8 = sqrtf(local_28 * local_28 + local_24.x * local_24.x); fVar5 = *(float *)(iVar1 + 0x33c); - (this->_pos).y = fVar8 * (float)auStack_18._4_4_ + *(float *)(iVar1 + 0x340); - (this->_pos).x = fVar8 * (float)auStack_18._0_4_ + fVar5; + (this->_pos).y = fVar8 * (*(undefined4 *)((char *)&((float)auStack_18) + 0x4)) + *(float *)(iVar1 + 0x340); + (this->_pos).x = fVar8 * (*(undefined4 *)((char *)&((float)auStack_18) + 0x0)) + fVar5; } } } - uVar3 = (uint)(this->_tearFlags)._h; - local_24.x = (float)(uVar3 & (uint)g_tearFlagLaser._h); - local_34.x = *(float *)((int)&(this->_tearFlags)._h + 4); - local_28 = (float)((uint)local_34.x & g_tearFlagLaser._h._4_4_); - if (((!(((uint)(this->_tearFlags)._l & (uint)g_tearFlagLaser._l) == 0 && - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagLaser._l._4_4_) == 0)) || + uVar3 = GHIDRA_UINT((this->_tearFlags)._h); + local_24.x = (float)(uVar3 & GHIDRA_UINT(g_tearFlagLaser._h)); + local_34.x = *(float *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); + local_28 = (float)(GHIDRA_UINT(local_34.x) & (*(undefined4 *)((char *)&(g_tearFlagLaser._h) + 0x4))); + if (((!((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagLaser._l)) == 0 && + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagLaser._l) + 0x4))) == 0)) || (!(local_24.x == 0.0 && local_28 == 0.0))) && ((this->_techZeroLaser != (EntityPtr)0x0 && (this->_techZeroTarget != (EntityPtr)0x0)))) { iVar1 = __RTDynamicCast(this->_techZeroLaser,0, @@ -8383,14 +8383,14 @@ void Entity_Tear::Interpolate() *(float *)(iVar1 + 0x33c) = ((this->_posOffset).x + (this->_pos).x + (this->_velocity).x) - *(float *)(iVar1 + 0x34c); *(float *)(iVar1 + 0x340) = (fVar5 + fVar8 + fVar7) - *(float *)(iVar1 + 0x350); - uVar3 = (uint)(this->_tearFlags)._h; - local_34.x = *(float *)((int)&(this->_tearFlags)._h + 4); + uVar3 = GHIDRA_UINT((this->_tearFlags)._h); + local_34.x = *(float *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); } tear = local_1c; - local_24.x = (float)(uVar3 & (uint)g_tearFlagLudovico._h); - if ((((uint)(this->_tearFlags)._l & (uint)g_tearFlagLudovico._l) == 0 && - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagLudovico._l._4_4_) == 0) && - (local_24.x == 0.0 && ((uint)local_34.x & g_tearFlagLudovico._h._4_4_) == 0)) { + local_24.x = (float)(uVar3 & GHIDRA_UINT(g_tearFlagLudovico._h)); + if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagLudovico._l)) == 0 && + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagLudovico._l) + 0x4))) == 0) && + (local_24.x == 0.0 && (GHIDRA_UINT(local_34.x) & (*(undefined4 *)((char *)&(g_tearFlagLudovico._h) + 0x4))) == 0)) { nextSpawner = this->_spawnerEntity; EVar4 = (EntityPtr)this; while (spawner = nextSpawner, spawner != (EntityPtr)0x0) { @@ -8400,10 +8400,10 @@ void Entity_Tear::Interpolate() if (*(int *)((char *)EVar4 + 0x28) != 1) { EVar4 = (EntityPtr)0x0; } - if ((((uint)(this->_tearFlags)._l & (uint)g_tearFlagWiggle._l) != 0 || - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagWiggle._l._4_4_) != 0) || - ((uVar3 & (uint)g_tearFlagWiggle._h) != 0 || - ((uint)local_34.x & g_tearFlagWiggle._h._4_4_) != 0)) { + if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagWiggle._l)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagWiggle._l) + 0x4))) != 0) || + ((uVar3 & GHIDRA_UINT(g_tearFlagWiggle._h)) != 0 || + (GHIDRA_UINT(local_34.x) & (*(undefined4 *)((char *)&(g_tearFlagWiggle._h) + 0x4))) != 0)) { if (EVar4 == (EntityPtr)0x0) { fVar5 = 1.0; } @@ -8416,10 +8416,10 @@ void Entity_Tear::Interpolate() apply_wiggle(tear,fVar5); } local_1c = (Entity_Tear *) - (*(uint *)((int)&(tear->_tearFlags)._h + 4) & g_tearFlagSpiral._h._4_4_); - if ((((uint)(tear->_tearFlags)._l & (uint)g_tearFlagSpiral._l) != 0 || - (*(uint *)((int)&(tear->_tearFlags)._l + 4) & g_tearFlagSpiral._l._4_4_) != 0) || - (((uint)(tear->_tearFlags)._h & (uint)g_tearFlagSpiral._h) != 0 || + (*(uint *)(GHIDRA_INT(&(tear->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagSpiral._h) + 0x4))); + if (((GHIDRA_UINT((tear->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagSpiral._l)) != 0 || + (*(uint *)(GHIDRA_INT(&(tear->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagSpiral._l) + 0x4))) != 0) || + ((GHIDRA_UINT((tear->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagSpiral._h)) != 0 || local_1c != (Entity_Tear *)0x0)) { if (EVar4 == (EntityPtr)0x0) { fVar5 = 1.0; @@ -8438,10 +8438,10 @@ void Entity_Tear::Interpolate() apply_wiggle(tear,fVar5); } local_1c = (Entity_Tear *) - (*(uint *)((int)&(tear->_tearFlags)._h + 4) & g_tearFlagBigSpiral._h._4_4_); - if ((((uint)(tear->_tearFlags)._l & (uint)g_tearFlagBigSpiral._l) != 0 || - (*(uint *)((int)&(tear->_tearFlags)._l + 4) & g_tearFlagBigSpiral._l._4_4_) != 0) || - (((uint)(tear->_tearFlags)._h & (uint)g_tearFlagBigSpiral._h) != 0 || + (*(uint *)(GHIDRA_INT(&(tear->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagBigSpiral._h) + 0x4))); + if (((GHIDRA_UINT((tear->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagBigSpiral._l)) != 0 || + (*(uint *)(GHIDRA_INT(&(tear->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagBigSpiral._l) + 0x4))) != 0) || + ((GHIDRA_UINT((tear->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagBigSpiral._h)) != 0 || local_1c != (Entity_Tear *)0x0)) { if (EVar4 != (EntityPtr)0x0) { ((Entity_Player *)((Entity_Player *)EVar4))->Entity_Player::GetTrinketMultiplier(0x60); @@ -8453,9 +8453,9 @@ void Entity_Tear::Interpolate() } else { if ((this->_subtype & 2) != 0) { - uVar3 = (uint)this->_flags; + uVar3 = GHIDRA_UINT(this->_flags); if ((uVar3 & 2) != 0) { - *(undefined4 *)((int)&this->_flags + 4) = *(undefined4 *)((int)&this->_flags + 4); + *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&this->_flags) + 4); *(uint *)&this->_flags = uVar3 & 0xfffffffd; return; } @@ -8472,17 +8472,17 @@ void Entity_Tear::Interpolate() this->_isInterpolating = 1; local_34.x = *(float *)&this->_parent; if (((EntityPtr)local_34.x == (EntityPtr)0x0) || (*(int *)((char *)local_34.x + 0x28) != 2)) { - local_1c = (Entity_Tear *)((uint)(this->_tearFlags)._h & (uint)g_tearFlagContinuum._h); - local_24.x = (float)(*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagContinuum._h._4_4_ + local_1c = (Entity_Tear *)(GHIDRA_UINT((this->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagContinuum._h)); + local_24.x = (float)(*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagContinuum._h) + 0x4)) ); - if ((((uint)(this->_tearFlags)._l & (uint)g_tearFlagContinuum._l) == 0 && - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagContinuum._l._4_4_) == 0) && + if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagContinuum._l)) == 0 && + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagContinuum._l) + 0x4))) == 0) && (local_1c == (Entity_Tear *)0x0 && local_24.x == 0.0)) { Room::GetClampedPositionImpl(g_game->_room,(Vector *)auStack_18,pVVar2,0.0,0.0,0.0,0.0); - pVVar2->x = (float)auStack_18._0_4_; - (this->_pos).y = (float)auStack_18._4_4_; + pVVar2->x = (*(undefined4 *)((char *)&((float)auStack_18) + 0x0)); + (this->_pos).y = (*(undefined4 *)((char *)&((float)auStack_18) + 0x4)); local_34.x = *(float *)&this->_parent; - puVar6 = (undefined1 *)auStack_18._4_4_; + puVar6 = (*(undefined4 *)((char *)&((undefined1 *)auStack_18) + 0x4)); } if (((EntityPtr)local_34.x != (EntityPtr)0x0) && (*(int *)((char *)local_34.x + 0x28) == 2)) goto LAB_00679c17; @@ -8491,18 +8491,18 @@ void Entity_Tear::Interpolate() LAB_00679c17: if ((this->_subtype & 1) != 0) { local_1c = (Entity_Tear *) - ((((float)((uint)this->_index % 10) + 0.0) * 0.1 * 0.5 + 2.0) * 0.017453292); + ((((float)(GHIDRA_UINT(this->_index) % 10) + 0.0) * 0.1 * 0.5 + 2.0) * 0.017453292); local_2c = (undefined1 *)cos((float)local_1c); fVar7 = sin((float)local_1c); fVar5 = (this->_parentOffset).x; fVar8 = (this->_parentOffset).y; - auStack_18._4_4_ = (float)local_2c * fVar8 + fVar7 * fVar5; + (*(undefined4 *)((char *)&(auStack_18) + 0x4)) = (float)local_2c * fVar8 + fVar7 * fVar5; local_28 = *(float *)((char *)local_34.x + 0x33c); local_34.x = *(float *)((char *)local_34.x + 0x340); local_1c = (Entity_Tear *)((float)local_2c * fVar5 - fVar7 * fVar8); iVar1 = this->_index * 0x32; - local_2c = (undefined1 *)auStack_18._4_4_; - auStack_18._0_4_ = local_1c; + local_2c = (*(undefined4 *)((char *)&((undefined1 *)auStack_18) + 0x4)); + (*(undefined4 *)((char *)&(auStack_18) + 0x0)) = local_1c; local_24.x = sin(((float)(g_game->_frameCount - this->_spawnFrame) + 0.5 + (float)((double)iVar1 + __uint_to_double_fixup[-(iVar1 >> 0x1f)])) * 0.08); fVar5 = sqrtf((float)local_1c * (float)local_1c + (float)local_2c * (float)local_2c); @@ -8513,10 +8513,10 @@ LAB_00679c17: (this->_pos).y = local_34.x + fVar5; } } - if ((((uint)(this->_tearFlags)._l & (uint)g_tearFlagHydrobounce._l) != 0 || - (*(uint *)((int)&(this->_tearFlags)._l + 4) & g_tearFlagHydrobounce._l._4_4_) != 0) || - (((uint)(this->_tearFlags)._h & (uint)g_tearFlagHydrobounce._h) != 0 || - (*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagHydrobounce._h._4_4_) != 0)) { + if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagHydrobounce._l)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagHydrobounce._l) + 0x4))) != 0) || + ((GHIDRA_UINT((this->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagHydrobounce._h)) != 0 || + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagHydrobounce._h) + 0x4))) != 0)) { ((Entity *)((Entity *)this))->Entity::GetRootParent(); game = g_game; fVar5 = sin(((float)(g_game->_frameCount - this->_spawnFrame) + 0.5) * @@ -8529,10 +8529,10 @@ LAB_00679c17: LAB_00679a3a: if (this->_waitFrames < 1) { local_1c = (Entity_Tear *) - (*(uint *)((int)&(this->_tearFlags)._h + 4) & g_tearFlagLudovico._h._4_4_); - if (((((uint)g_tearFlagLudovico._l & (uint)(this->_tearFlags)._l) == 0 && - (g_tearFlagLudovico._l._4_4_ & *(uint *)((int)&(this->_tearFlags)._l + 4)) == 0) && - (((uint)(this->_tearFlags)._h & (uint)g_tearFlagLudovico._h) == 0 && + (*(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagLudovico._h) + 0x4))); + if ((((GHIDRA_UINT(g_tearFlagLudovico._l) & GHIDRA_UINT((this->_tearFlags)._l)) == 0 && + ((*(undefined4 *)((char *)&(g_tearFlagLudovico._l) + 0x4)) & *(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4)) == 0) && + ((GHIDRA_UINT((this->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagLudovico._h)) == 0 && local_1c == (Entity_Tear *)0x0)) && (this->_dead == 0)) { if (*(int *)((char *)game->_room + 8) == 0x10) { (this->_posOffset).y = -18.0; @@ -8566,7 +8566,7 @@ void Entity_Tear::SetDeadEyeIntensity(float intensity) local_14 = 0xffffffff; puStack_18 = &LAB_00af33dd; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(local_68 + 0x16); + local_24 = __security_cookie ^ GHIDRA_UINT((local_68 + 0x16)); ExceptionList = &local_1c; this->_deadEyeIntensity = intensity; if ((intensity != 0.0) && ((this->_deadEyeANM2)._loaded == 0)) { @@ -8576,20 +8576,20 @@ void Entity_Tear::SetDeadEyeIntensity(float intensity) anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1a; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/DeadEyeTearEffect.anm2",0x1b); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/DeadEyeTearEffect.anm2",0x1b); local_14 = 0; ((ANM2 *)(&this->_deadEyeANM2))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar1 = anm2Path._capacity + 1; - ptr = (char *)anm2Path._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar1) { - ptr = *(char **)(anm2Path._buf._0_4_ + -4); + ptr = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar1 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)ptr))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(ptr)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -8672,14 +8672,14 @@ Entity_Tear * Entity_Tear::MakeMultidimensionalCopy(Entity *spawner) copy->_baseScale = fVar1; copy->_fScale = fVar1; ResetSpriteScale(copy); - uStack_1c = ~g_tearFlagLudovico._l._4_4_ & *(uint *)((int)&(this->_tearFlags)._l + 4); - uStack_20 = ~(uint)g_tearFlagLudovico._l & (uint)(this->_tearFlags)._l; - uStack_14 = ~g_tearFlagLudovico._h._4_4_ & *(uint *)((int)&(this->_tearFlags)._h + 4); - uStack_18 = ~(uint)g_tearFlagLudovico._h & (uint)(this->_tearFlags)._h; - flags._l._4_4_ = uStack_1c; - flags._l._0_4_ = uStack_20; - flags._h._0_4_ = uStack_18; - flags._h._4_4_ = uStack_14; + uStack_1c = ~(*(undefined4 *)((char *)&(g_tearFlagLudovico._l) + 0x4)) & *(uint *)(GHIDRA_INT(&(this->_tearFlags)._l) + 4); + uStack_20 = ~GHIDRA_UINT(g_tearFlagLudovico._l) & GHIDRA_UINT((this->_tearFlags)._l); + uStack_14 = ~(*(undefined4 *)((char *)&(g_tearFlagLudovico._h) + 0x4)) & *(uint *)(GHIDRA_INT(&(this->_tearFlags)._h) + 4); + uStack_18 = ~GHIDRA_UINT(g_tearFlagLudovico._h) & GHIDRA_UINT((this->_tearFlags)._h); + (*(undefined4 *)((char *)&(flags._l) + 0x4)) = uStack_1c; + (*(undefined4 *)((char *)&(flags._l) + 0x0)) = uStack_20; + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = uStack_18; + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = uStack_14; SetTearFlags(copy,flags); copy->_waitFrames = this->_waitFrames; copy->_tearIdx = this->_tearIdx; @@ -8693,7 +8693,7 @@ Entity_Tear * Entity_Tear::MakeMultidimensionalCopy(Entity *spawner) aEStack_28[0] = this->_parent; refSlot = ©->_parent; if (*refSlot != (EntityPtr)0x0) { - std::multiset::erase((int)aEStack_28 + 0xfffffffc); + std::multiset::erase(GHIDRA_INT(aEStack_28) + 0xfffffffc); } *refSlot = aEStack_28[0]; if (aEStack_28[0] != (EntityPtr)0x0) { @@ -8730,11 +8730,11 @@ void Entity_Tear::ChangeVariant(int variant) int savedGridCollisionClass; float savedScale; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00af79f5; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; savedGridCollisionClass = this->_entityGridCollisionClass; savedCollisionDamage = this->_collisionDamage; @@ -8742,7 +8742,7 @@ void Entity_Tear::ChangeVariant(int variant) savedScale = this->_fScale; this->LoadEntityConfig(local_24); if (this->_config != (void *)0x0) { - ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)((int)this->_config + 0x74),1); + ((ANM2 *)(&this->_sprite))->ANM2::Load((std_string *)(GHIDRA_INT(this->_config) + 0x74),1); if (this->_variant == 0xd) { isGfuelSeed = ((Seeds *)(&g_game->_seedEffects))->Seeds::HasSeedEffect(0x4f); if (isGfuelSeed != 0) { @@ -8752,20 +8752,20 @@ void Entity_Tear::ChangeVariant(int variant) bulletAnmPath._buf[1] = '\0'; bulletAnmPath._buf[2] = '\0'; bulletAnmPath._buf[3] = '\0'; - bulletAnmPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(bulletAnmPath._buf) + 0x0)) = std::_Allocate(0x30); bulletAnmPath._size = 0x20; bulletAnmPath._capacity = 0x2f; - builtin_strncpy((char *)bulletAnmPath._buf._0_4_,"gfx/promo/gfuel/bullet tear.anm2",0x21); + builtin_strncpy((*(undefined4 *)((char *)&((char *)bulletAnmPath._buf) + 0x0)),"gfx/promo/gfuel/bullet tear.anm2",0x21); local_14 = 0; ((ANM2 *)(&this->_sprite))->ANM2::Load(&bulletAnmPath,1); local_14 = 0xffffffff; if (0xf < bulletAnmPath._capacity) { uVar1 = bulletAnmPath._capacity + 1; - freeBlock = (char *)bulletAnmPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)bulletAnmPath._buf) + 0x0)); if (0xfff < uVar1) { - freeBlock = *(char **)(bulletAnmPath._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(bulletAnmPath._buf) + 0x0)) + -4); uVar1 = bulletAnmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(bulletAnmPath._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(bulletAnmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -8794,20 +8794,20 @@ void Entity_Tear::ChangeVariant(int variant) missileAnmPath._buf[1] = '\0'; missileAnmPath._buf[2] = '\0'; missileAnmPath._buf[3] = '\0'; - missileAnmPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(missileAnmPath._buf) + 0x0)) = std::_Allocate(0x20); missileAnmPath._size = 0x1c; missileAnmPath._capacity = 0x1f; - builtin_strncpy((char *)missileAnmPath._buf._0_4_,"gfx/promo/gfuel/missile.anm2",0x1d); + builtin_strncpy((*(undefined4 *)((char *)&((char *)missileAnmPath._buf) + 0x0)),"gfx/promo/gfuel/missile.anm2",0x1d); local_14 = 1; ((ANM2 *)(&this->_sprite))->ANM2::Load(&missileAnmPath,1); local_14 = 0xffffffff; if (0xf < missileAnmPath._capacity) { uVar1 = missileAnmPath._capacity + 1; - freeBlock = (char *)missileAnmPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)missileAnmPath._buf) + 0x0)); if (0xfff < uVar1) { - freeBlock = *(char **)(missileAnmPath._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(missileAnmPath._buf) + 0x0)) + -4); uVar1 = missileAnmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(missileAnmPath._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(missileAnmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -8817,7 +8817,7 @@ void Entity_Tear::ChangeVariant(int variant) uVar1 = g_graphicsManager_flags; missileAnmPath._size = 0; missileAnmPath._capacity = 0xf; - missileAnmPath._buf._0_4_ = missileAnmPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(missileAnmPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(missileAnmPath._buf) + 0x0)) & 0xffffff00; layer = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer((byte *)0x1); blendSrc = 1; if ((uVar1 & 4) == 0) { @@ -8865,7 +8865,7 @@ int Entity_Tear::find_nearest_linkable_tear() puStack_c = &LAB_00af7a20; local_10 = ExceptionList; ExceptionList = &local_10; - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&local_2c,2,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&local_2c,2,-1,-1,0,0); nearestTear = 0; uVar3 = 0; nearestDist = 40.0; @@ -8876,10 +8876,10 @@ int Entity_Tear::find_nearest_linkable_tear() do { iVar1 = *(int *)((char *)tearsData + uVar3 * 4); if (iVar1 != iVar2) { - if (((((*(uint *)(iVar1 + 0x428) & (uint)g_tearFlagChain._l) == 0 && - (*(uint *)(iVar1 + 0x42c) & g_tearFlagChain._l._4_4_) == 0) && - ((*(uint *)(iVar1 + 0x430) & (uint)g_tearFlagChain._h) == 0 && - (*(uint *)(iVar1 + 0x434) & g_tearFlagChain._h._4_4_) == 0)) || + if (((((*(uint *)(iVar1 + 0x428) & GHIDRA_UINT(g_tearFlagChain._l)) == 0 && + (*(uint *)(iVar1 + 0x42c) & (*(undefined4 *)((char *)&(g_tearFlagChain._l) + 0x4))) == 0) && + ((*(uint *)(iVar1 + 0x430) & GHIDRA_UINT(g_tearFlagChain._h)) == 0 && + (*(uint *)(iVar1 + 0x434) & (*(undefined4 *)((char *)&(g_tearFlagChain._h) + 0x4))) == 0)) || ((*(int *)(iVar1 + 0x494) != 0 && (*(int *)(*(int *)(iVar1 + 0x494) + 0x28) == 2)))) || (fVar4 = *(float *)(selfTear + 0x340) - *(float *)(iVar1 + 0x340), dx = *(float *)(selfTear + 0x33c) - *(float *)(iVar1 + 0x33c), @@ -8897,22 +8897,22 @@ int Entity_Tear::find_nearest_linkable_tear() } } uVar3 = uVar3 + 1; - } while (uVar3 < (uint)local_2c._size); + } while (uVar3 < GHIDRA_UINT(local_2c._size)); } - if (local_2c._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_2c) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (local_2c._data != (void *)0x0) { uVar3 = *(uint *)((char *)local_2c._data + -4); oldAllocated = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar3; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar3; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)oldAllocated < uVar3); - free((uint *)((int)local_2c._data + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocated) < uVar3)); + free((uint *)(GHIDRA_INT(local_2c._data) + -4)); } } ExceptionList = local_10; @@ -8947,7 +8947,7 @@ Entity_Tear * Entity_Tear::find_link_partner() local_10 = ExceptionList; ExceptionList = &local_10; self = (EntityPtr)this; - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&local_30,2,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&local_30,2,-1,-1,0,0); partner = (Entity_Tear *)0x0; nearestDistance = 20.0; nearestTear = (Entity_Tear *)0x0; @@ -8958,10 +8958,10 @@ Entity_Tear * Entity_Tear::find_link_partner() chainTear = *(EntityPtr *)((char *)tearData + i * 4); if (chainTear != (EntityPtr)this) { this = (Entity_Tear *)self; - if ((((*(uint *)((char *)chainTear + 0x428) & (uint)g_tearFlagChain._l) == 0 && - (*(uint *)((char *)chainTear + 0x42c) & g_tearFlagChain._l._4_4_) == 0) && - ((*(uint *)((char *)chainTear + 0x430) & (uint)g_tearFlagChain._h) == 0 && - (*(uint *)((char *)chainTear + 0x434) & g_tearFlagChain._h._4_4_) == 0)) || + if ((((*(uint *)((char *)chainTear + 0x428) & GHIDRA_UINT(g_tearFlagChain._l)) == 0 && + (*(uint *)((char *)chainTear + 0x42c) & (*(undefined4 *)((char *)&(g_tearFlagChain._l) + 0x4))) == 0) && + ((*(uint *)((char *)chainTear + 0x430) & GHIDRA_UINT(g_tearFlagChain._h)) == 0 && + (*(uint *)((char *)chainTear + 0x434) & (*(undefined4 *)((char *)&(g_tearFlagChain._h) + 0x4))) == 0)) || (*(int *)((char *)chainTear + 0x498) != 0)) { tearData = local_30._data; } @@ -8969,11 +8969,11 @@ Entity_Tear * Entity_Tear::find_link_partner() bVar3 = true; do { if (chainTear == (EntityPtr)0x0) goto LAB_0067aa2a; - if ((((uint)((BitSet128 *)((int)chainTear + 0x428))->_l & (uint)g_tearFlagChain._l) == 0 - && (*(uint *)((char *)chainTear + 0x42c) & g_tearFlagChain._l._4_4_) == 0) && + if (((GHIDRA_UINT(((BitSet128 *)(GHIDRA_INT(chainTear) + 0x428))->_l) & GHIDRA_UINT(g_tearFlagChain._l)) == 0 + && (*(uint *)((char *)chainTear + 0x42c) & (*(undefined4 *)((char *)&(g_tearFlagChain._l) + 0x4))) == 0) && (bVar2 = bVar3, - (*(uint *)((char *)chainTear + 0x430) & (uint)g_tearFlagChain._h) == 0 && - (*(uint *)((char *)chainTear + 0x434) & g_tearFlagChain._h._4_4_) == 0)) break; + (*(uint *)((char *)chainTear + 0x430) & GHIDRA_UINT(g_tearFlagChain._h)) == 0 && + (*(uint *)((char *)chainTear + 0x434) & (*(undefined4 *)((char *)&(g_tearFlagChain._h) + 0x4))) == 0)) break; isNotSelf = chainTear != self; chainTear = *(EntityPtr *)((char *)chainTear + 0x494); bVar2 = false; @@ -9004,22 +9004,22 @@ LAB_0067aa2a: } LAB_0067aa8b: i = i + 1; - } while (i < (uint)local_30._size); + } while (i < GHIDRA_UINT(local_30._size)); } - if (local_30._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_30) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (local_30._data != (void *)0x0) { uVar1 = *(uint *)((char *)local_30._data + -4); qVar4 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar1; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar1; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar4 < uVar1); - free((uint *)((int)local_30._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar4) < uVar1)); + free((uint *)(GHIDRA_INT(local_30._data) + -4)); } } ExceptionList = local_10; @@ -9125,14 +9125,14 @@ undefined1 Entity_Tear::try_make_bridges(float *param_1) local_8 = 0xffffffff; puStack_c = &LAB_00af7a8d; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; local_18 = in_ECX; maskedFlags = BitSet128::operator_and (&local_48,(BitSet128 *)&in_ECX[1]._pendingDamageFlags, &g_tearFlagNoGridDamage); - if (((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - (local_28 = (int *)((uint)maskedFlags->_h | *(uint *)((int)&maskedFlags->_h + 4)), + if ((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (local_28 = (int *)(GHIDRA_UINT(maskedFlags->_h) | *(uint *)(GHIDRA_INT(&maskedFlags->_h) + 4)), local_28 != (int *)0x0)) { ExceptionList = local_10; return 0; @@ -9142,36 +9142,36 @@ undefined1 Entity_Tear::try_make_bridges(float *param_1) rockDamage = (10.0 < in_ECX->_collisionDamage) + 1; local_24 = local_28; local_28 = operator_new(0x14); - *local_28 = (int)local_28; - local_28[1] = (int)local_28; - local_28[2] = (int)local_28; + *local_28 = GHIDRA_INT(local_28); + local_28[1] = GHIDRA_INT(local_28); + local_28[2] = GHIDRA_INT(local_28); *(undefined2 *)(local_28 + 3) = 0x101; local_8 = 0; uVar6 = 0; collisionPoints = (in_ECX->_collisionPoints)._begin; - if ((int)(in_ECX->_collisionPoints)._end - (int)collisionPoints >> 3 != 0) { + if (GHIDRA_INT((in_ECX->_collisionPoints)._end) - GHIDRA_INT(collisionPoints) >> 3 != 0) { do { local_1c = g_game->_room; - iVar4 = (int)(((*param_1 + *(float *)((char *)collisionPoints + uVar6 * 8)) - 40.0) / 40.0 + 0.5) + iVar4 = GHIDRA_INT((((*param_1 + *(float *)((char *)collisionPoints + uVar6 * 8)) - 40.0) / 40.0 + 0.5)) ; - iVar3 = (int)(((*(float *)((char *)collisionPoints + uVar6 * 8 + 4) + param_1[1]) - 120.0) / 40.0 - + 0.5); + iVar3 = GHIDRA_INT((((*(float *)((char *)collisionPoints + uVar6 * 8 + 4) + param_1[1]) - 120.0) / 40.0 + + 0.5)); if ((((-1 < iVar4) && (iVar4 < *(int *)((char *)local_1c + 0xc))) && (-1 < iVar3)) && ((in_ECX = local_18, iVar3 < *(int *)((char *)local_1c + 0x10) && - (local_1c = (void *)(iVar3 * *(int *)((char *)local_1c + 0xc) + iVar4), -1 < (int)local_1c))) + (local_1c = (void *)(iVar3 * *(int *)((char *)local_1c + 0xc) + iVar4), -1 < GHIDRA_INT(local_1c)))) ) { std::set::insert(&local_38._h,&local_1c); } uVar6 = uVar6 + 1; collisionPoints = (in_ECX->_collisionPoints)._begin; - } while (uVar6 < (uint)((int)(in_ECX->_collisionPoints)._end - (int)collisionPoints >> 3)); + } while (uVar6 < GHIDRA_UINT((GHIDRA_INT((in_ECX->_collisionPoints)._end) - GHIDRA_INT(collisionPoints) >> 3))); } param_1 = (float *)*local_28; if (param_1 != (float *)local_28) { pEVar7 = local_18; do { - if ((((uint)param_1[4] < 0x1c0) && - (rock = *(GridEntity **)((char *)g_game->_room + (int)param_1[4] * 4 + 0x24), + if (((GHIDRA_UINT(param_1[4]) < 0x1c0) && + (rock = *(GridEntity **)((char *)g_game->_room + GHIDRA_INT(param_1[4]) * 4 + 0x24), rock != (GridEntity *)0x0)) && ((rock->_collisionClass != 1 && ((rock->_collisionClass != 0 && (isHitSolid = 1, isRockDestroyed == '\0')))))) { @@ -9180,15 +9180,15 @@ undefined1 Entity_Tear::try_make_bridges(float *param_1) (((maskedFlags = BitSet128::operator_and (&local_38,(BitSet128 *)&pEVar7[1]._pendingDamageFlags, &g_tearFlagAcid), - (int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0 || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) || + GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0 || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) || (((maskedFlags = BitSet128::operator_and (&local_58,(BitSet128 *)&pEVar7[1]._pendingDamageFlags, &g_tearFlagRock), - (int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0 || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) && + GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0 || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) && (uVar6 = Random(), - (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 < pEVar7->_collisionDamage * 0.1)))))) { virtualFn = *(code **)(*(int *)rock + 0x14); ((EntityRef *)(&tearRef))->EntityRef::constructor(local_18); @@ -9218,10 +9218,10 @@ undefined1 Entity_Tear::try_make_bridges(float *param_1) if ((dirX != g_vectorZero.x) || (dirY != g_vectorZero.y)) { this = g_game->_room; iVar3 = this->_gridWidth; - iVar5 = (int)((((float)(rock->_gridIndex % iVar3) * 40.0 + 40.0 + dirX * 40.0) - 40.0) - / 40.0 + 0.5); - iVar4 = (int)((((float)(rock->_gridIndex / iVar3) * 40.0 + 120.0 + dirY * 40.0) - - 120.0) / 40.0 + 0.5); + iVar5 = GHIDRA_INT(((((float)(rock->_gridIndex % iVar3) * 40.0 + 40.0 + dirX * 40.0) - 40.0) + / 40.0 + 0.5)); + iVar4 = GHIDRA_INT(((((float)(rock->_gridIndex / iVar3) * 40.0 + 120.0 + dirY * 40.0) - + 120.0) / 40.0 + 0.5)); if (((-1 < iVar5) && (((iVar5 < iVar3 && (-1 < iVar4)) && (iVar4 < this->_gridHeight)))) && (iVar5 = iVar3 * iVar4 + iVar5, -1 < iVar5)) { @@ -9309,7 +9309,7 @@ void Entity_Tear::reroll_hit_entity(int unused) EntityPtr *spawnerPtr; ColorMod *spriteColor; - local_c = __security_cookie ^ (uint)auStack_c4; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_c4); iVar10 = 0x20; hitEntity = this; do { @@ -9439,7 +9439,7 @@ LAB_006b5635: else { local_a0 = spawnSubType; std::set::find_node(local_5c,&local_a0); - if (((*(char *)(local_54 + 0xd) == '\0') && (*(int *)(local_54 + 0x10) <= (int)uVar9)) && + if (((*(char *)(local_54 + 0xd) == '\0') && (*(int *)(local_54 + 0x10) <= GHIDRA_INT(uVar9))) && (local_54 != piVar7[8])) goto LAB_006b5635; bVar11 = true; } @@ -9462,20 +9462,20 @@ LAB_006b57e1: if (local_a8 == (Entity *)0x0) goto LAB_006b5ab6; timeNs = GetTimeNs(); tmpEntity = local_a8; - uVar5 = (uint)(timeNs >> 0x20); + uVar5 = GHIDRA_UINT((timeNs >> 0x20)); lVar3 = (timeNs & 0xffffffff) * 0x431bde82; local_ac = (EntityPtr *)((ulonglong)lVar3 >> 0x20); lVar4 = (ulonglong)uVar5 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); - local_90[0] = (int)(lVar4 + lVar3); + local_90[0] = GHIDRA_INT((lVar4 + lVar3)); lVar3 = (ulonglong)uVar5 * 0x431bde82 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar4 >> 0x20), - (uint)(&(*(undefined1 *)((char *)(local_ac) + 0x0)) + CARRY4((uint)lVar3,(uint)lVar4))), - (int)((ulonglong)(lVar4 + lVar3) >> 0x20)); - local_90[2] = (int)((ulonglong)lVar3 >> 0x20); + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)), + GHIDRA_UINT((&(*(undefined1 *)((char *)(local_ac) + 0x0)) + CARRY4(GHIDRA_UINT(lVar3),GHIDRA_UINT(lVar4))))), + GHIDRA_INT(((ulonglong)(lVar4 + lVar3) >> 0x20))); + local_90[2] = GHIDRA_INT(((ulonglong)lVar3 >> 0x20)); spawnerPtr = &local_a8->_spawnerEntity; - local_b8 = (int *)((uint)lVar3 >> 0x12 | local_90[2] * 0x4000); - local_90[2] = (uint)local_90[2] >> 0x12; + local_b8 = (int *)(GHIDRA_UINT(lVar3) >> 0x12 | local_90[2] * 0x4000); + local_90[2] = GHIDRA_UINT(local_90[2]) >> 0x12; local_a8->_spawnerType = 0; local_a8->_spawnerVariant = 0; if (*spawnerPtr != (EntityPtr)0x0) { @@ -9494,7 +9494,7 @@ LAB_006b57e1: iVar10 = *(int *)((char *)pvVar8 + 0x1214); *(int *)((char *)pvVar8 + 0x1214) = iVar10 + 1; tmpEntity->_index = iVar10; - ((EntityList *)((EntityList *)((int)pvVar8 + 0x1218)))->EntityList::AddEntity(tmpEntity); + ((EntityList *)((EntityList *)(GHIDRA_INT(pvVar8) + 0x1218)))->EntityList::AddEntity(tmpEntity); isErased = Game::ShouldEraseEnemy(tmpEntity); if (isErased != 0) { Entity::RemoveWithPoof(tmpEntity,unusedArg); @@ -9515,41 +9515,41 @@ LAB_006b57e1: } uVar5 = 0; playerManager = &g_game->_playerManager; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar8 = (playerManager->_playerList)._end; - if ((int)pvVar8 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar8) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar8 = (playerManager->_playerList)._end; } piVar7 = (playerManager->_playerList)._begin; - if (uVar5 < (uint)((int)pvVar8 - (int)piVar7 >> 2)) { + if (uVar5 < GHIDRA_UINT((GHIDRA_INT(pvVar8) - GHIDRA_INT(piVar7) >> 2))) { piVar7 = piVar7 + uVar5; } trigger_set_dispatch((void *)(*piVar7 + 0x1fc8),6,tmpEntity,&newPos,&g_vectorZero); uVar5 = uVar5 + 1; playerManager = &g_game->_playerManager; - } while (uVar5 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar5 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } LAB_006b5a32: timeNs = GetTimeNs(); - uVar9 = (uint)(timeNs >> 0x20); + uVar9 = GHIDRA_UINT((timeNs >> 0x20)); lVar3 = (timeNs & 0xffffffff) * 0x431bde82; lVar4 = (ulonglong)uVar9 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); - uVar6 = (uint)((ulonglong)lVar4 >> 0x20); - uVar5 = (int)((ulonglong)lVar3 >> 0x20) + (uint)CARRY4((uint)lVar3,(uint)lVar4); + uVar6 = GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)); + uVar5 = GHIDRA_INT(((ulonglong)lVar3 >> 0x20)) + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar3),GHIDRA_UINT(lVar4))); lVar3 = (ulonglong)uVar9 * 0x431bde82 + (ulonglong)CONCAT14(CARRY4(uVar6,uVar5),uVar6 + uVar5); - uVar6 = (uint)((ulonglong)lVar3 >> 0x20); - uVar5 = (uint)lVar3 >> 0x12 | uVar6 * 0x4000; - uVar9 = uVar5 - (int)local_b8; - bVar11 = CARRY4((uint)g_entitySpawnTimeMs,uVar9); - g_entitySpawnTimeMs._0_4_ = (uint)g_entitySpawnTimeMs + uVar9; - g_entitySpawnTimeMs._4_4_ = - g_entitySpawnTimeMs._4_4_ + (((uVar6 >> 0x12) - local_90[2]) - (uint)(uVar5 < local_b8)) + - (uint)bVar11; + uVar6 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); + uVar5 = GHIDRA_UINT(lVar3) >> 0x12 | uVar6 * 0x4000; + uVar9 = uVar5 - GHIDRA_INT(local_b8); + bVar11 = CARRY4(GHIDRA_UINT(g_entitySpawnTimeMs),uVar9); + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x0)) = GHIDRA_UINT(g_entitySpawnTimeMs) + uVar9; + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) = + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) + (((uVar6 >> 0x12) - local_90[2]) - GHIDRA_UINT((uVar5 < local_b8))) + + GHIDRA_UINT(bVar11); LAB_006b5ab6: spriteColor = &(local_a8->_sprite)._color; if (spriteColor != &poofColor) { diff --git a/src/game/entity_text.cpp b/src/game/entity_text.cpp index 6e7831e..5f08c62 100644 --- a/src/game/entity_text.cpp +++ b/src/game/entity_text.cpp @@ -21,7 +21,7 @@ void Entity_Text::Update() else if (iVar1 == 1) { iVar1 = *(int *)((char *)this + 0x410); if (iVar1 == 0) { - sprintf_s((byte *)((int)this + 0x418),0x100,&DAT_00b62fe0); + sprintf_s((byte *)(GHIDRA_INT(this) + 0x418),0x100,&DAT_00b62fe0); iVar1 = *(int *)((char *)this + 0x410); } game = g_game; @@ -43,11 +43,11 @@ void Entity_Text::Update() else if (iVar1 == 2) { timer = *(uint *)((char *)this + 0x410); if (timer == 0) { - sprintf_s((byte *)((int)this + 0x418),0x100,s__d); + sprintf_s((byte *)(GHIDRA_INT(this) + 0x418),0x100,s__d); timer = *(uint *)((char *)this + 0x410); } uVar2 = 0x3f800000; - if ((*(int *)((char *)this + 0x414) + -0xf <= (int)timer) && ((timer & 1) != 0)) { + if ((*(int *)((char *)this + 0x414) + -0xf <= GHIDRA_INT(timer)) && ((timer & 1) != 0)) { uVar2 = 0; } *(undefined4 *)((char *)this + 0x518) = 0x3f800000; @@ -103,7 +103,7 @@ void Entity_Text::Render(Vector *offset) local_10 = ExceptionList; ExceptionList = &local_10; if (*(char *)((char *)font + 0x172) != '\0') { - str = (byte *)((int)font + 0x418); + str = (byte *)(GHIDRA_INT(font) + 0x418); font = &g_manager->_font6_PFTempestaSevenCondensed; textWidth = ((Font *)(font))->Font::get_string_width_n(str,-1); worldY = *(float *)((char *)font + 0x340) + *(float *)((char *)font + 0x350); @@ -124,7 +124,7 @@ void Entity_Text::Render(Vector *offset) isPaused = ((Game *)(g_game))->Game::IsPaused(); if (isPaused == 0) { flickerPhase = g_manager->_framecount + 1U & 0x80000001; - if ((int)flickerPhase < 0) { + if (GHIDRA_INT(flickerPhase) < 0) { flickerPhase = (flickerPhase - 1 | 0xfffffffe) + 1; } } @@ -138,7 +138,7 @@ void Entity_Text::Render(Vector *offset) local_30 = 0xffffffff; local_2c = 0; local_28 = 0; - fVar1 = ((float)(int)(flickerPhase + *(int *)((char *)font + 0x410) * 2) * 0.5 - 0.0) * 0.25; + fVar1 = ((float)GHIDRA_INT((flickerPhase + *(int *)((char *)font + 0x410) * 2)) * 0.5 - 0.0) * 0.25; if (fVar1 <= 0.0) { fVar1 = 0.0; } @@ -151,7 +151,7 @@ void Entity_Text::Render(Vector *offset) pos.x = screenX - (float)textWidth * 0.5 * fVar1; scale.y = fVar1; scale.x = fVar1; - ((Font *)(font))->Font::DrawString(str,pos,scale,(KColor *)((int)font + 0x518),&fontSettings); + ((Font *)(font))->Font::DrawString(str,pos,scale,(KColor *)(GHIDRA_INT(font) + 0x518),&fontSettings); ExceptionList = local_10; return; } @@ -163,7 +163,7 @@ void Entity_Text::Render(Vector *offset) local_2c = 0; local_28 = 0; local_8 = 1; - ((Font *)(font))->Font::DrawString(str,(KColor *)((int)font + 0x518),&fontSettings, + ((Font *)(font))->Font::DrawString(str,(KColor *)(GHIDRA_INT(font) + 0x518),&fontSettings, screenX - (float)textWidth * 0.5,*(float *)((char *)font + 0x1a8)); } ExceptionList = local_10; diff --git a/src/game/file_system.cpp b/src/game/file_system.cpp index beb8e8e..ac7efba 100644 --- a/src/game/file_system.cpp +++ b/src/game/file_system.cpp @@ -77,7 +77,7 @@ void FileSystem::load_mount_points() local_8 = 0xffffffff; puStack_c = &LAB_00b10f7f; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; self = this; piVar2 = Open(&PTR_vftable_00c37a10,(byte *)"kage_mount_points.dat",(int *)0x0); @@ -149,8 +149,8 @@ void FileSystem::load_mount_points() (**(code **)(*piVar2 + 0x14))(&entryCount,4,1); uVar1 = entryCount; entries = operator_new_tracked - (-(uint)((int)((ulonglong)entryCount * 4 >> 0x20) != 0) | - (uint)((ulonglong)entryCount * 4)); + (-GHIDRA_UINT((GHIDRA_INT(((ulonglong)entryCount * 4 >> 0x20)) != 0)) | + GHIDRA_UINT(((ulonglong)entryCount * 4))); i = 0; if (uVar1 != 0) { do { @@ -159,7 +159,7 @@ void FileSystem::load_mount_points() iVar4 = (**(code **)(*piVar2 + 0x14))(&entryLength,4,1); local_2c = entryLength; if (iVar4 == 4) { - uVar1 = (int)entryLength + 1; + uVar1 = GHIDRA_INT(entryLength) + 1; pvVar6 = operator_new_tracked(uVar1); memset(pvVar6,0,uVar1); piVar2 = file; @@ -190,7 +190,7 @@ void FileSystem::load_mount_points() } } puVar5 = operator_new(0x14); - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; mountPointMem = puVar5; if (puVar5 == (undefined4 *)0x0) { local_2c = (undefined4 *)0x0; @@ -208,15 +208,15 @@ void FileSystem::load_mount_points() *(void **)((char *)pvVar6 + 8) = pvVar6; *(undefined2 *)((char *)pvVar6 + 0xc) = 0x101; *mapTree = pvVar6; - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; *puVar5 = KAGE::Filesys::ContentManagerBase::ContentMountPoint::vftable; FUN_00a15b90(&mountPath); pvVar6 = entries; - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; FUN_00a68590(entries,entryCount); local_2c = puVar5; } - local_8 = CONCAT31(local_8._1_3_,3); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); puVar5 = *(undefined4 **)((char *)self + 0x18); if (puVar5 == *(undefined4 **)((char *)self + 0x1c)) { std::vector<4byte>::_Emplace_reallocate(puVar5,&local_2c); @@ -236,13 +236,13 @@ LAB_00a16b36: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } blockSize = *(uint *)(iVar4 + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - blockSize; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - blockSize; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < blockSize); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < blockSize)); free((void *)(iVar4 + -4)); *(undefined4 *)((char *)pvVar6 + i * 4) = 0; } @@ -257,15 +257,15 @@ LAB_00a16b36: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar1 = *(uint *)((char *)pvVar6 + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar1; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar1; freeFn = free_exref; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar1); - free((void *)((int)pvVar6 + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar1)); + free((void *)(GHIDRA_INT(pvVar6) + -4)); } local_8 = 0xffffffff; if (mountPath != (byte *)0x0) { @@ -273,13 +273,13 @@ LAB_00a16b36: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar1 = *(uint *)(mountPath + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar1; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar1; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar1); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar1)); (*freeFn)(mountPath + -4); mountPath = (byte *)0x0; } @@ -290,13 +290,13 @@ LAB_00a16b36: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar1 = *(uint *)(local_20 + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar1; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar1; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar1); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar1)); (*freeFn)(local_20 + -4); } local_8 = 0xffffffff; @@ -346,10 +346,10 @@ undefined4 FileSystem::find_mount(byte *param_1, undefined1 *param_2) *(byte **)(*(int *)(*(int *)(in_ECX + 8) + mountIndex * 4) + 0xc),0, 0); bVar3 = open_archive_file(&PTR_vftable_00c37a10,archivePath,(void **)0x0); - param_1 = (byte *)CONCAT13(bVar3,param_1._0_3_); + param_1 = (byte *)CONCAT13(bVar3,(*(undefined1 *)((char *)&(param_1) + 0x0))); if (archivePath != (byte *)0x0) { operator_delete(archivePath,1); - bVar3 = param_1._3_1_; + bVar3 = (*(undefined1 *)((char *)&(param_1) + 0x3)); } if (bVar3 != 0) { iVar1 = *(int *)(fileSystem + 8); @@ -364,7 +364,7 @@ undefined4 FileSystem::find_mount(byte *param_1, undefined1 *param_2) _Find_lower_bound<>(hashIter,¶m_1); if (((*(char *)(hashNode + 0xd) == '\0') && (*(byte **)(hashNode + 0x10) <= param_1)) && (hashNode != *(int *)(iVar1 + 4))) { - entry = map_find_value((void *)(iVar1 + 4),(uint)¶m_1); + entry = map_find_value((void *)(iVar1 + 4),GHIDRA_UINT(¶m_1)); if (*entry != 0) { if (normalizedPath != (byte *)0x0) { local_8 = 0; @@ -385,13 +385,13 @@ undefined4 FileSystem::find_mount(byte *param_1, undefined1 *param_2) allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } blockSize = *(uint *)(normalizedPath + -4); qVar2 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - blockSize; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - blockSize; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar2 < blockSize); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < blockSize)); free(normalizedPath + -4); } ExceptionList = local_10; @@ -420,7 +420,7 @@ byte * FileSystem::ResolvePath(byte *path) isExists = *pbVar2; pbVar2 = pbVar2 + 1; } while (isExists != 0); - if (((2 < (uint)((int)pbVar2 - (int)(path + 1))) && (path[1] == 0x3a)) && + if (((2 < GHIDRA_UINT((GHIDRA_INT(pbVar2) - GHIDRA_INT((path + 1))))) && (path[1] == 0x3a)) && ((path[2] == 0x5c || (path[2] == 0x2f)))) { pbVar1 = path_join(path,(byte *)0x0,0,0); isExists = file_exists(pbVar1); @@ -433,13 +433,13 @@ byte * FileSystem::ResolvePath(byte *path) return pbVar1; } } - path = (byte *)((uint)path & 0xffffff); - mount = find_mount(pbVar1,(int)&path + 3); + path = (byte *)(GHIDRA_UINT(path) & 0xffffff); + mount = find_mount(pbVar1,GHIDRA_INT(&path) + 3); if (mount == 0) { ExceptionList = local_10; return (byte *)0x0; } - if (path._3_1_ != '\0') { + if ((*(undefined1 *)((char *)&(path) + 0x3)) != '\0') { pbVar1 = path_join(pbVar1,*(byte **)(mount + 0xc),0,0); ExceptionList = local_10; return pbVar1; @@ -498,7 +498,7 @@ LAB_00a1795c: local_8 = outResolvedPath; goto LAB_00a1795c; } - *outResolvedPath = (int)resolvedPath; + *outResolvedPath = GHIDRA_INT(resolvedPath); ExceptionList = local_10; return path; } @@ -523,7 +523,7 @@ byte FileSystem::open_disk_file(byte *path, void **outFile) else { this_00[1] = 2; this_00[2] = 0; - *this_00 = (int)KAGE::Filesys::File::vftable; + *this_00 = GHIDRA_INT(KAGE)::Filesys::File::vftable; this_00[3] = 0; } if (*(code **)(*this_00 + 0x24) == KAGE::Filesys::File::open) { @@ -558,7 +558,7 @@ byte FileSystem::open_archive_file(byte *path, void **outFile) local_8 = 0xffffffff; puStack_c = &LAB_00b11067; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; if ((path != (byte *)0x0) && (*path != 0)) { pathHash = KAGE_Filesys_FileManager::GetPrimaryFilePathHash(path); diff --git a/src/game/font.cpp b/src/game/font.cpp index beec0ba..1fb678e 100644 --- a/src/game/font.cpp +++ b/src/game/font.cpp @@ -14,7 +14,7 @@ void Font::EnableAutoWrap(undefined2 param_2) this->_aa = 0; this->_paddingUp = 0; this->_infoBitField = (undefined1)param_2; - this->_charSet = param_2._1_1_; + this->_charSet = (*(undefined1 *)((char *)&(param_2) + 0x1)); this->_paddingRight = 0; this->_paddingDown = 0; this->_paddingLeft = 0x80; @@ -51,7 +51,7 @@ Vector * Font::measure_rich_text(Vector *outSize, byte *text, int maxWidth, floa puStack_c = &LAB_00b0ff7d; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; linesBegin = (void *)0x0; linesEnd = (void *)0x0; @@ -61,16 +61,16 @@ Vector * Font::measure_rich_text(Vector *outSize, byte *text, int maxWidth, floa ((KColor *)(&white))->KColor::SetFromARGB(0xffffffff); rich_text_layout(this,text,baseColor,maxWidth,&linesBegin,scale); pvVar3 = linesEnd; - linesHeight = ((int)linesEnd - (int)linesBegin >> 4) * - (uint)*(ushort *)&(this->_kerningPairs)._begin; + linesHeight = (GHIDRA_INT(linesEnd) - GHIDRA_INT(linesBegin) >> 4) * + GHIDRA_UINT(*(ushort *)&(this->_kerningPairs)._begin); outSize->x = 0.0; outSize->y = (float)((double)linesHeight + __uint_to_double_fixup[-(linesHeight >> 0x1f)]) * *(float *)&this[1]._pages * textScale; if (linesBegin != linesEnd) { pvVar2 = linesBegin; do { - lineWidthPtr = (int *)((int)pvVar2 + 0xc); - pvVar2 = (void *)((int)pvVar2 + 0x10); + lineWidthPtr = (int *)(GHIDRA_INT(pvVar2) + 0xc); + pvVar2 = (void *)(GHIDRA_INT(pvVar2) + 0x10); lineWidth = (float)((double)*lineWidthPtr + __uint_to_double_fixup[-(*lineWidthPtr >> 0x1f)]); widestLine = outSize->x; if (outSize->x <= lineWidth) { @@ -81,15 +81,15 @@ Vector * Font::measure_rich_text(Vector *outSize, byte *text, int maxWidth, floa } pvVar2 = linesBegin; if (linesBegin != (void *)0x0) { - for (; pvVar2 != pvVar3; pvVar2 = (void *)((int)pvVar2 + 0x10)) { + for (; pvVar2 != pvVar3; pvVar2 = (void *)(GHIDRA_INT(pvVar2) + 0x10)) { std::vector::_Tidy(uVar1); } - uVar1 = linesCapacityEnd - (int)linesBegin & 0xfffffff0; + uVar1 = linesCapacityEnd - GHIDRA_INT(linesBegin) & 0xfffffff0; pvVar3 = linesBegin; if (0xfff < uVar1) { pvVar3 = *(void **)((char *)linesBegin + -4); uVar1 = uVar1 + 0x23; - if (0x1f < (uint)((int)linesBegin + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(linesBegin) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -129,9 +129,9 @@ byte Font::IsAutoWrapEnabled() { int iVar1; - iVar1._0_2_ = this->_stretchH; - iVar1._2_1_ = this->_aa; - iVar1._3_1_ = this->_paddingUp; + (*(undefined2 *)((char *)&(iVar1) + 0x0)) = this->_stretchH; + (*(undefined1 *)((char *)&(iVar1) + 0x2)) = this->_aa; + (*(undefined1 *)((char *)&(iVar1) + 0x3)) = this->_paddingUp; return iVar1 == 1; } @@ -157,8 +157,8 @@ bool Font::IsTruncationEnabled() void Font::SetMissingCharacterOverride(undefined4 param_2) { this->_spacingVert = (undefined1)param_2; - this->_outline = param_2._1_1_; - *(undefined2 *)&(*(undefined1 *)((char *)(this) + 0x12)) = param_2._2_2_; + this->_outline = (*(undefined1 *)((char *)&(param_2) + 0x1)); + *(undefined2 *)&(*(undefined1 *)((char *)(this) + 0x12)) = (*(undefined2 *)((char *)&(param_2) + 0x2)); return; } @@ -238,17 +238,17 @@ void Font::Load(byte *path, byte unusedIsLoading) local_8 = 0xffffffff; puStack_c = &LAB_00b11203; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(directory + 0x211); + local_14 = __security_cookie ^ GHIDRA_UINT((directory + 0x211)); ExceptionList = &local_10; local_424 = this; Unload(this); piVar4 = ((FileSystem *)(&PTR_vftable_00c37a10))->FileSystem::Open(path,(int *)0x0); if (piVar4 != (int *)0x0) { - iVar10 = -(int)path; + iVar10 = -GHIDRA_INT(path); do { bVar1 = *path; path = path + 1; - path[(int)(directory + iVar10)] = bVar1; + path[GHIDRA_INT((directory + iVar10))] = bVar1; } while (bVar1 != 0); pcVar5 = directory; do { @@ -270,7 +270,7 @@ void Font::Load(byte *path, byte unusedIsLoading) bVar12 = bVar1 < *pbVar9; if (bVar1 != *pbVar9) { LAB_00a1a830: - uVar7 = -(uint)bVar12 | 1; + uVar7 = -GHIDRA_UINT(bVar12) | 1; goto LAB_00a1a835; } if (bVar1 == 0) break; @@ -307,9 +307,9 @@ LAB_00a1a835: local_420 = pbVar6; (**(code **)(*piVar4 + 0x14))(pbVar6,1,local_41c); pbVar6[local_41c] = 0; - uVar7 = (uint)(ushort)this->_pages; + uVar7 = GHIDRA_UINT((ushort)this->_pages); local_424->_numPages = uVar7; - pageTextures = operator_new_tracked(-(uint)(0xfffffffb < uVar7 * 8) | uVar7 * 8 + 4); + pageTextures = operator_new_tracked(-GHIDRA_UINT((0xfffffffb < uVar7 * 8)) | uVar7 * 8 + 4); local_8 = 0; if (pageTextures == (uint *)0x0) { pageTextures = (uint *)0x0; @@ -347,13 +347,13 @@ LAB_00a1a835: copyDst = copyDst + 1; } while (*copySrc != 0); copySrc = pbVar6; - for (uVar7 = (uint)((int)pbVar9 - (int)pbVar6) >> 2; uVar7 != 0; uVar7 = uVar7 - 1) + for (uVar7 = GHIDRA_UINT((GHIDRA_INT(pbVar9) - GHIDRA_INT(pbVar6))) >> 2; uVar7 != 0; uVar7 = uVar7 - 1) { *(undefined4 *)copyDst = *(undefined4 *)copySrc; copySrc = copySrc + 4; copyDst = copyDst + 4; } - for (uVar7 = (int)pbVar9 - (int)pbVar6 & 3; uVar7 != 0; uVar7 = uVar7 - 1) { + for (uVar7 = GHIDRA_INT(pbVar9) - GHIDRA_INT(pbVar6) & 3; uVar7 != 0; uVar7 = uVar7 - 1) { *copyDst = *copySrc; copySrc = copySrc + 1; copyDst = copyDst + 1; @@ -365,14 +365,14 @@ LAB_00a1a835: cVar3 = *pcVar5; pcVar5 = pcVar5 + 1; } while (cVar3 != '\0'); - pbVar9 = (byte *)(pcVar5 + -(int)(_unusedIsLoading + 1)); + pbVar9 = (byte *)(pcVar5 + -GHIDRA_INT((_unusedIsLoading + 1))); if (pbVar9 == (byte *)0x3) { pbVar9 = local_417 + 3; do { bVar1 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar1 != 0); - uVar7 = (int)pbVar9 - (int)(local_417 + 4); + uVar7 = GHIDRA_INT(pbVar9) - GHIDRA_INT((local_417 + 4)); pbVar9 = (byte *)0x0; if ((4 < uVar7) && (pbVar9 = local_417 + uVar7 + 3, local_417[uVar7 - 1] == 0x2e)) { @@ -387,7 +387,7 @@ LAB_00a1a835: uVar7 = local_42c; local_8 = 1; KAGE::SmartPointer::operator_assign - ((void *)((int)local_424->_pageTextures + local_42c * 8),pvVar8); + ((void *)(GHIDRA_INT(local_424->_pageTextures) + local_42c * 8),pvVar8); local_8 = 2; if (((imageRef != (int *)0x0) && (cVar3 = (**(code **)(*imageRef + 0xc))(), cVar3 != '\0')) && @@ -399,7 +399,7 @@ LAB_00a1a835: pbVar6 = pbVar6 + 1; } while (bVar1 != 0); local_42c = uVar7 + 1; - } while (local_42c < (uint)this->_numPages); + } while (local_42c < GHIDRA_UINT(this->_numPages)); } local_8 = 0xffffffff; if (local_420 != (byte *)0x0) { @@ -412,18 +412,18 @@ LAB_00a1a835: this->_numChars = local_41c / 0x14; lVar2 = (ulonglong)(local_41c / 0x14) * 0x14; pvVar8 = operator_new_tracked - (-(uint)((int)((ulonglong)lVar2 >> 0x20) != 0) | (uint)lVar2); + (-GHIDRA_UINT((GHIDRA_INT(((ulonglong)lVar2 >> 0x20)) != 0)) | GHIDRA_UINT(lVar2)); this->_chars = pvVar8; (**(code **)(*piVar4 + 0x14))(pvVar8,0x14,this->_numChars); if (this->_numChars != 0) { iVar10 = 0; uVar7 = 0; do { - pageTextures = map_find_value(&this->_charsBlock,(int)local_424->_chars + iVar10); + pageTextures = map_find_value(&this->_charsBlock,GHIDRA_INT(local_424->_chars) + iVar10); iVar10 = iVar10 + 0x14; *pageTextures = uVar7; uVar7 = uVar7 + 1; - } while (uVar7 < (uint)local_424->_numChars); + } while (uVar7 < GHIDRA_UINT(local_424->_numChars)); this = local_424; goto LAB_00a1ad1a; } @@ -433,21 +433,21 @@ LAB_00a1a835: pvVar8 = kerningPairs->_begin; kerningEnd = (this->_kerningPairs)._end; kerningCount = local_41c / 10; - uVar7 = (int)kerningEnd - (int)pvVar8 >> 4; + uVar7 = GHIDRA_INT(kerningEnd) - GHIDRA_INT(pvVar8) >> 4; kerningVector = kerningPairs; local_430 = kerningEnd; if (kerningCount < uVar7) { - (this->_kerningPairs)._end = (void *)(kerningCount * 0x10 + (int)pvVar8); + (this->_kerningPairs)._end = (void *)(kerningCount * 0x10 + GHIDRA_INT(pvVar8)); } else if (uVar7 < kerningCount) { - if ((uint)((int)(this->_kerningPairs)._capacity - (int)pvVar8 >> 4) < kerningCount) { + if (GHIDRA_UINT((GHIDRA_INT((this->_kerningPairs)._capacity) - GHIDRA_INT(pvVar8) >> 4)) < kerningCount) { std::vector<16byte>::_Resize_reallocate(kerningCount,uVar7); } else { iVar10 = kerningCount - uVar7; if (iVar10 != 0) { memset(kerningEnd,0,iVar10 * 0x10); - kerningEnd = (void *)((int)local_430 + iVar10 * 0x10); + kerningEnd = (void *)(GHIDRA_INT(local_430) + iVar10 * 0x10); } (this->_kerningPairs)._end = kerningEnd; } @@ -455,18 +455,18 @@ LAB_00a1a835: if (kerningCount != 0) { local_430 = (void *)0x0; do { - pageTextures = (uint *)((int)kerningPairs->_begin + (int)local_430); + pageTextures = (uint *)(GHIDRA_INT(kerningPairs->_begin) + GHIDRA_INT(local_430)); local_420 = (byte *)0x0; (**(code **)(*openFile + 0x14))(&local_420,4,1); pbVar6 = local_420; local_42c = 0; (**(code **)(*openFile + 0x14))(&local_42c,4,1); - pageTextures[1] = (uint)pbVar6; + pageTextures[1] = GHIDRA_UINT(pbVar6); *pageTextures = local_42c; local_420 = (byte *)0x0; (**(code **)(*openFile + 0x14))(&local_420,2,1); - *(undefined2 *)(pageTextures + 2) = local_420._0_2_; - local_430 = (void *)((int)local_430 + 0x10); + *(undefined2 *)(pageTextures + 2) = (*(undefined2 *)((char *)&(local_420) + 0x0)); + local_430 = (void *)(GHIDRA_INT(local_430) + 0x10); kerningCount = kerningCount - 1; kerningPairs = kerningVector; } while (kerningCount != 0); @@ -474,7 +474,7 @@ LAB_00a1a835: this = local_424; local_438 = local_438 & 0xffffff00; std::_Sort_unchecked<16byte_u64key> - ((int)(local_424->_kerningPairs)._end - (int)kerningPairs->_begin >> 4, + (GHIDRA_INT((local_424->_kerningPairs)._end) - GHIDRA_INT(kerningPairs->_begin) >> 4, local_438); LAB_00a1ad1a: piVar4 = openFile; @@ -511,7 +511,7 @@ void Font::Unload() local_8 = 0xffffffff; pvVar1 = this->_pageTextures; if (pvVar1 != (void *)0x0) { - pageTexturesHeader = (uint *)((int)pvVar1 + -4); + pageTexturesHeader = (uint *)(GHIDRA_INT(pvVar1) + -4); local_8 = 1; _eh_vector_destructor_iterator_(pvVar1,8,*pageTexturesHeader,FUN_0040c440); operator_delete(pageTexturesHeader,*pageTexturesHeader * 8 + 4); @@ -521,7 +521,7 @@ void Font::Unload() FID_conflict__Erase_tree_>_> (&this->_charsBlock, (fuzzer_allocator_> *)&this->_charsBlock, - *(_Tree_node **)((int)pvVar1 + 4)); + *(_Tree_node **)(GHIDRA_INT(pvVar1) + 4)); *(void **)((char *)pvVar1 + 4) = pvVar1; *(void **)pvVar1 = pvVar1; *(void **)((char *)pvVar1 + 8) = pvVar1; @@ -576,7 +576,7 @@ void Font::DrawStringScaled(byte *text, Vector *pos, KColor *color, void *settin local_8 = 0xffffffff; puStack_c = &LAB_00b1125d; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(glyphBuffer + 0x20); + uVar1 = __security_cookie ^ GHIDRA_UINT((glyphBuffer + 0x20)); ExceptionList = &local_10; y = pos->y; local_14 = pos->x; @@ -604,7 +604,7 @@ void Font::DrawString(byte *text, KColor *color, void *settings, float x, float local_8 = 0xffffffff; puStack_c = &LAB_00b1128d; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(local_2c + 0x28); + uVar1 = __security_cookie ^ GHIDRA_UINT((local_2c + 0x28)); ExceptionList = &local_10; posX = x; posY = y; @@ -634,7 +634,7 @@ void Font::DrawString(byte *str, Vector *position, Vector *scale, KColor *color, local_8 = 0xffffffff; puStack_c = &LAB_00b1128d; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(glyphVector + 0x28); + uVar1 = __security_cookie ^ GHIDRA_UINT((glyphVector + 0x28)); ExceptionList = &local_10; scaleY = scale->y; scaleX = scale->x; @@ -663,7 +663,7 @@ void Font::DrawString(byte *str, Vector pos, Vector scale, KColor *color, FontSe local_8 = 0xffffffff; puStack_c = &LAB_00b1128d; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(layout + 0x28); + uVar1 = __security_cookie ^ GHIDRA_UINT((layout + 0x28)); ExceptionList = &local_10; scaleCopy.x = scale.x; scaleCopy.y = scale.y; @@ -691,7 +691,7 @@ void Font::draw_string_wide_unscaled(short *text, float x, float y, KColor *colo local_8 = 0xffffffff; puStack_c = &LAB_00b1128d; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(glyphBuffer + 0x28); + uVar1 = __security_cookie ^ GHIDRA_UINT((glyphBuffer + 0x28)); ExceptionList = &local_10; drawX = x; drawY = y; @@ -734,8 +734,8 @@ int Font::get_kerning(uint second, uint first) pairsEnd = (this->_kerningPairs)._end; pair = (this->_kerningPairs)._begin; - count = (int)pairsEnd - (int)pair >> 4; - if (0 < (int)count) { + count = GHIDRA_INT(pairsEnd) - GHIDRA_INT(pair) >> 4; + if (0 < GHIDRA_INT(count)) { do { half = count >> 1; if ((pair[half * 4 + 1] <= second) && @@ -744,12 +744,12 @@ int Font::get_kerning(uint second, uint first) half = count + (-1 - half); } count = half; - } while (0 < (int)half); + } while (0 < GHIDRA_INT(half)); } if (((pair == pairsEnd) || (*pair != first)) || (pair[1] != second)) { return 0; } - return (int)(short)pair[2]; + return GHIDRA_INT((short)pair[2]); } // 00a1b580 @@ -800,7 +800,7 @@ void Font::render_glyph(uint ch, byte unknown, uint *prevChar, float x, float y, return; } glyphs = this->_chars; - local_18.y = (float)(int)*(short *)((char *)glyphs + glyphIndex * 0x14 + 0x10); + local_18.y = (float)GHIDRA_INT(*(short *)((char *)glyphs + glyphIndex * 0x14 + 0x10)); glyphTable = glyphs; iVar1 = get_kerning(this,*prevChar,ch); kernOffset = (float)iVar1 * scaleX; @@ -815,11 +815,11 @@ void Font::render_glyph(uint ch, byte unknown, uint *prevChar, float x, float y, quad_set_rect(srcQuad,&local_20,&local_10,unused); local_10.x = (float)*(ushort *)((char *)glyphs + glyphIndex * 0x14 + 8) * scaleXLocal; local_10.y = (float)*(ushort *)((char *)glyphs + glyphIndex * 0x14 + 10) * scaleY; - local_20.x = (float)(int)*(short *)((char *)glyphs + glyphIndex * 0x14 + 0xc) * scaleXLocal + penX; - local_20.y = (float)(int)*(short *)((char *)glyphs + glyphIndex * 0x14 + 0xe) * scaleY + y; + local_20.x = (float)GHIDRA_INT(*(short *)((char *)glyphs + glyphIndex * 0x14 + 0xc)) * scaleXLocal + penX; + local_20.y = (float)GHIDRA_INT(*(short *)((char *)glyphs + glyphIndex * 0x14 + 0xe)) * scaleY + y; render_quad_set_rect(renderQuad,&local_20,&local_10,&color); - (**(code **)(**(int **)((int)this->_pageTextures + - (uint)*(byte *)((char *)glyphs + glyphIndex * 0x14 + 0x12) * 8) + 0x14)) + (**(code **)(**(int **)(GHIDRA_INT(this->_pageTextures) + + GHIDRA_UINT(*(byte *)((char *)glyphs + glyphIndex * 0x14 + 0x12)) * 8) + 0x14)) (srcQuad,renderQuad,g_drawRectUnset); } else { @@ -850,8 +850,8 @@ void Font::render_glyph(uint ch, byte unknown, uint *prevChar, float x, float y, local_118 = puVar2[8]; local_10.x = (float)*(ushort *)((char *)glyphs + glyphIndex * 0x14 + 8) * scaleX; local_10.y = (float)*(ushort *)((char *)glyphs + glyphIndex * 0x14 + 10) * scaleY; - local_18.x = (float)(int)*(short *)((char *)glyphs + glyphIndex * 0x14 + 0xc) * scaleX + x; - local_18.y = (float)(int)*(short *)((char *)glyphs + glyphIndex * 0x14 + 0xe) * scaleY + y; + local_18.x = (float)GHIDRA_INT(*(short *)((char *)glyphs + glyphIndex * 0x14 + 0xc)) * scaleX + x; + local_18.y = (float)GHIDRA_INT(*(short *)((char *)glyphs + glyphIndex * 0x14 + 0xe)) * scaleY + y; render_quad_set_rect(renderQuad,&local_18,&local_10,&color); puVar2 = extraout_EAX; dst = colorQuad; @@ -865,8 +865,8 @@ void Font::render_glyph(uint ch, byte unknown, uint *prevChar, float x, float y, if (isAccepted == '\0') { return; } - (**(code **)(**(int **)((int)*(void **)((char *)local_20.y + 0x3c) + - (uint)*(byte *)((char *)glyphTable + glyphIndex * 0x14 + 0x12) * 8) + 0x14)) + (**(code **)(**(int **)(GHIDRA_INT(*(void **)((char *)local_20.y + 0x3c)) + + GHIDRA_UINT(*(byte *)((char *)glyphTable + glyphIndex * 0x14 + 0x12)) * 8) + 0x14)) (&srcQuadCopy,colorQuad,g_drawRectUnset); } *prevChar = ch; @@ -925,7 +925,7 @@ int Font::get_string_width_n(byte *str, int length) } while (nextChar[0] != 0); width = local_30; } - if ((int)width < 0) { + if (GHIDRA_INT(width) < 0) { width = 0; } return width; @@ -953,7 +953,7 @@ int Font::get_string_width_utf16(short *text, int length) FUN_00a55b00(text,length); iVar2 = 0; if (textBegin < textEnd) { - ch = (uint)*textBegin; + ch = GHIDRA_UINT(*textBegin); prevChar = 0; width = 0; if (ch != 0) { @@ -976,7 +976,7 @@ int Font::get_string_width_utf16(short *text, int length) prevChar = ch; } iVar2 = width; - } while ((cursor < textEnd) && (ch = (uint)*cursor, ch != 0)); + } while ((cursor < textEnd) && (ch = GHIDRA_UINT(*cursor), ch != 0)); } } if (iVar2 < 0) { @@ -1008,7 +1008,7 @@ void * Font::measure_string(void *outLayout, byte *text, void *settings, Vector puStack_c = &LAB_00b1130b; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (uint)(layout + 0x24); + uVar3 = __security_cookie ^ GHIDRA_UINT((layout + 0x24)); ExceptionList = &local_10; if (*(int *)((char *)settings + 8) == 1) { widthBudget = *(ushort *)((char *)settings + 6); @@ -1018,7 +1018,7 @@ void * Font::measure_string(void *outLayout, byte *text, void *settings, Vector *(undefined4 *)((char *)outLayout + 8) = 0; *(undefined4 *)((char *)outLayout + 0xc) = 0; local_8 = 0; - ((FormattedText *)(outLayout))->FormattedText::set(text,this,(uint)widthBudget,scaleX,0); + ((FormattedText *)(outLayout))->FormattedText::set(text,this,GHIDRA_UINT(widthBudget),scaleX,0); ExceptionList = local_10; return outLayout; } @@ -1032,18 +1032,18 @@ void * Font::measure_string(void *outLayout, byte *text, void *settings, Vector layout[0] = layout[0] | 1; local_8 = 2; if (*(int *)((char *)settings + 8) == 2) { - maxWidth = (uint)*(ushort *)((char *)settings + 6); + maxWidth = GHIDRA_UINT(*(ushort *)((char *)settings + 6)); local_14 = get_string_width_n(this,&DAT_00b1cec0,-1); if (maxWidth < local_14) { local_14 = maxWidth; } local_14 = maxWidth - local_14; text = (byte *)0x0; - lineCount = (byte *)((linesEnd - (int)linesBegin) / 0xc); + lineCount = (byte *)((linesEnd - GHIDRA_INT(linesBegin)) / 0xc); pbVar4 = linesBegin; if (lineCount != (byte *)0x0) { do { - get_string_width_n(this,*(byte **)(pbVar4 + 4),(uint)*(ushort *)(pbVar4 + 8)); + get_string_width_n(this,*(byte **)(pbVar4 + 4),GHIDRA_UINT(*(ushort *)(pbVar4 + 8))); lineWidth = __ftoui3(); widthBudget = local_14; if (maxWidth < lineWidth) { @@ -1052,7 +1052,7 @@ void * Font::measure_string(void *outLayout, byte *text, void *settings, Vector if (*(short *)(pbVar4 + 8) != 0) { widthBudget = *(ushort *)(pbVar4 + 8); do { - get_string_width_n(this,*(byte **)(pbVar4 + 4),(uint)widthBudget); + get_string_width_n(this,*(byte **)(pbVar4 + 4),GHIDRA_UINT(widthBudget)); lineWidth = __ftoui3(); if (lineWidth <= widthBudget) break; pbVar1 = pbVar4 + 8; @@ -1070,16 +1070,16 @@ void * Font::measure_string(void *outLayout, byte *text, void *settings, Vector *(undefined4 *)((char *)outLayout + 4) = 0; *(undefined4 *)((char *)outLayout + 8) = 0; *(undefined4 *)((char *)outLayout + 0xc) = 0; - local_8 = CONCAT31(local_8._1_3_,3); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); ((FormattedText *)(outLayout))->FormattedText::operator_assign(layout); std::vector<12byte>::clear(uVar3); if (linesBegin != (byte *)0x0) { - uVar3 = ((linesCapacity - (int)linesBegin) / 0xc) * 0xc; + uVar3 = ((linesCapacity - GHIDRA_INT(linesBegin)) / 0xc) * 0xc; pbVar4 = linesBegin; if (0xfff < uVar3) { pbVar4 = *(byte **)(linesBegin + -4); uVar3 = uVar3 + 0x23; - if ((byte *)0x1f < linesBegin + (-4 - (int)pbVar4)) { + if ((byte *)0x1f < linesBegin + (-4 - GHIDRA_INT(pbVar4))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1118,7 +1118,7 @@ void * Font::layout_glyphs(void *outRun, byte *text, void *settings, Vector *box puStack_c = &LAB_00b11363; local_10 = ExceptionList; - uVar7 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar7 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; local_14 = this; if (*(int *)((char *)settings + 8) == 1) { @@ -1133,10 +1133,10 @@ void * Font::layout_glyphs(void *outRun, byte *text, void *settings, Vector *box local_20 = local_14; local_14 = (Font *)&local_20; local_18 = FUN_00a56bf0; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); local_1c = (byte *)fVar3; FormattedText::split_lines_converted - ((short *)text,(uint)uVar6,(undefined4 *)((int)outRun + 4),FUN_00a56bf0,local_14); + ((short *)text,GHIDRA_UINT(uVar6),(undefined4 *)(GHIDRA_INT(outRun) + 4),FUN_00a56bf0,local_14); *(byte *)outRun = *(byte *)outRun | 1; ExceptionList = local_10; return outRun; @@ -1149,18 +1149,18 @@ void * Font::layout_glyphs(void *outRun, byte *text, void *settings, Vector *box FormattedText::split_lines_utf16((short *)text,&local_2c); local_8 = 3; if (*(int *)((char *)settings + 8) == 2) { - uVar10 = (uint)*(ushort *)((char *)settings + 6); + uVar10 = GHIDRA_UINT(*(ushort *)((char *)settings + 6)); uVar7 = get_string_width_n(this,&DAT_00b1cec0,-1); if (uVar10 < uVar7) { uVar7 = uVar10; } local_14 = (Font *)(uVar10 - uVar7); text = (byte *)0x0; - local_1c = (byte *)((local_28 - (int)local_2c) / 0xc); + local_1c = (byte *)((local_28 - GHIDRA_INT(local_2c)) / 0xc); pbVar11 = local_2c; if (local_1c != (byte *)0x0) { do { - get_string_width_utf16(this,*(short **)(pbVar11 + 4),(uint)*(ushort *)(pbVar11 + 8)); + get_string_width_utf16(this,*(short **)(pbVar11 + 4),GHIDRA_UINT(*(ushort *)(pbVar11 + 8))); uVar7 = __ftoui3(); pFVar5 = local_14; if (uVar10 < uVar7) { @@ -1169,7 +1169,7 @@ void * Font::layout_glyphs(void *outRun, byte *text, void *settings, Vector *box if (*(short *)(pbVar11 + 8) != 0) { uVar6 = *(ushort *)(pbVar11 + 8); do { - get_string_width_utf16(this,*(short **)(pbVar11 + 4),(uint)uVar6); + get_string_width_utf16(this,*(short **)(pbVar11 + 4),GHIDRA_UINT(uVar6)); pFVar8 = (Font *)__ftoui3(); if (pFVar8 <= pFVar5) break; pbVar1 = pbVar11 + 8; @@ -1183,38 +1183,38 @@ void * Font::layout_glyphs(void *outRun, byte *text, void *settings, Vector *box } while (text < local_1c); } } - ppbVar2 = (byte **)((int)outRun + 4); + ppbVar2 = (byte **)(GHIDRA_INT(outRun) + 4); *(undefined1 *)outRun = 0; *ppbVar2 = (byte *)0x0; *(undefined4 *)((char *)outRun + 8) = 0; *(undefined4 *)((char *)outRun + 0xc) = 0; - local_8 = CONCAT31(local_8._1_3_,4); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),4); *(undefined1 *)outRun = 1; if (ppbVar2 != &local_2c) { std::vector<12byte>::assign(local_2c,local_28,outRun); } if (((*(byte *)outRun & 1) == 0) && - (iVar9 = *(int *)((char *)outRun + 8) - (int)*ppbVar2, text = (byte *)0x0, iVar4 = iVar9 >> 0x1f, + (iVar9 = *(int *)((char *)outRun + 8) - GHIDRA_INT(*ppbVar2), text = (byte *)0x0, iVar4 = iVar9 >> 0x1f, iVar9 / 0xc + iVar4 != iVar4)) { boxSize = (Vector *)0x0; do { pbVar11 = *ppbVar2; - _Dst = operator_new_tracked((uint)*(ushort *)((int)&boxSize[1].x + (int)pbVar11) * 2); - memcpy(_Dst,*(void **)((int)&boxSize->y + (int)pbVar11), - (uint)*(ushort *)((int)&boxSize[1].x + (int)pbVar11) * 2); - *(void **)((int)&boxSize->y + (int)pbVar11) = _Dst; + _Dst = operator_new_tracked(GHIDRA_UINT(*(ushort *)(GHIDRA_INT(&boxSize[1].x) + GHIDRA_INT(pbVar11))) * 2); + memcpy(_Dst,*(void **)(GHIDRA_INT(&boxSize->y) + GHIDRA_INT(pbVar11)), + GHIDRA_UINT(*(ushort *)(GHIDRA_INT(&boxSize[1].x) + GHIDRA_INT(pbVar11))) * 2); + *(void **)(GHIDRA_INT(&boxSize->y) + GHIDRA_INT(pbVar11)) = _Dst; text = text + 1; boxSize = (Vector *)&boxSize[1].y; - } while (text < (byte *)((*(int *)((char *)outRun + 8) - (int)*ppbVar2) / 0xc)); + } while (text < (byte *)((*(int *)((char *)outRun + 8) - GHIDRA_INT(*ppbVar2)) / 0xc)); } std::vector<12byte>::clear(); if (local_2c != (byte *)0x0) { - uVar7 = ((local_24 - (int)local_2c) / 0xc) * 0xc; + uVar7 = ((local_24 - GHIDRA_INT(local_2c)) / 0xc) * 0xc; pbVar11 = local_2c; if (0xfff < uVar7) { pbVar11 = *(byte **)(local_2c + -4); uVar7 = uVar7 + 0x23; - if ((byte *)0x1f < local_2c + (-4 - (int)pbVar11)) { + if ((byte *)0x1f < local_2c + (-4 - GHIDRA_INT(pbVar11))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } diff --git a/src/game/formatted_text.cpp b/src/game/formatted_text.cpp index 6b75925..7fd16e8 100644 --- a/src/game/formatted_text.cpp +++ b/src/game/formatted_text.cpp @@ -64,10 +64,10 @@ void FormattedText::set(byte *text, void *measureContext, int maxLength, float s puStack_c = &LAB_00b1283d; local_10 = ExceptionList; ExceptionList = &local_10; - std::vector<12byte>::clear(__security_cookie ^ (int)register0x00000010 - 4U); + std::vector<12byte>::clear(__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); local_1c = measureContext; local_18 = scale; - outLines = (int *)((int)this + 4); + outLines = (int *)(GHIDRA_INT(this) + 4); local_8 = 0; parse(text,maxLength,outLines,FUN_00a56750,&local_1c); local_8 = 0xffffffff; @@ -84,13 +84,13 @@ void FormattedText::set(byte *text, void *measureContext, int maxLength, float s measureContext = (void *)0x0; do { iVar1 = *outLines; - segmentCopy = operator_new_tracked((uint)*(ushort *)((char *)measureContext + iVar1 + 8)); + segmentCopy = operator_new_tracked(GHIDRA_UINT(*(ushort *)((char *)measureContext + iVar1 + 8))); memcpy(segmentCopy,*(void **)((char *)measureContext + iVar1 + 4), - (uint)*(ushort *)((char *)measureContext + iVar1 + 8)); + GHIDRA_UINT(*(ushort *)((char *)measureContext + iVar1 + 8))); *(void **)((char *)measureContext + iVar1 + 4) = segmentCopy; _isCopySegments = _isCopySegments + 1; - measureContext = (void *)((int)measureContext + 0xc); - } while (_isCopySegments < (uint)((*(int *)((char *)this + 8) - *outLines) / 0xc)); + measureContext = (void *)(GHIDRA_INT(measureContext) + 0xc); + } while (_isCopySegments < GHIDRA_UINT(((*(int *)((char *)this + 8) - *outLines) / 0xc))); } ExceptionList = local_10; return; @@ -107,9 +107,9 @@ void * FormattedText::operator_assign(void *other) int *runs; flags = *(byte *)other; - runs = (int *)((int)this + 4); + runs = (int *)(GHIDRA_INT(this) + 4); *(byte *)this = flags; - if (runs != (int *)((int)other + 4)) { + if (runs != (int *)(GHIDRA_INT(other) + 4)) { std::vector<12byte>::assign(*(int *)((char *)other + 4),*(undefined4 *)((char *)other + 8),other); flags = *(byte *)this; } @@ -121,10 +121,10 @@ void * FormattedText::operator_assign(void *other) runOffset = 0; do { iVar1 = *runs + runOffset; - textCopy = operator_new_tracked((uint)*(ushort *)(iVar1 + 8)); - memcpy(textCopy,*(void **)(iVar1 + 4),(uint)*(ushort *)(iVar1 + 8)); + textCopy = operator_new_tracked(GHIDRA_UINT(*(ushort *)(iVar1 + 8))); + memcpy(textCopy,*(void **)(iVar1 + 4),GHIDRA_UINT(*(ushort *)(iVar1 + 8))); *(void **)(iVar1 + 4) = textCopy; - other = (void *)((int)other + 1); + other = (void *)(GHIDRA_INT(other) + 1); runOffset = runOffset + 0xc; } while (other < (void *)((*(int *)((char *)this + 8) - *runs) / 0xc)); return this; @@ -197,7 +197,7 @@ LAB_00a55f66: while (ch == (&DAT_00b65584)[uVar2]) { uVar2 = uVar2 + 1; if (1 < uVar2) { - uVar2 = (uint)(pbVar5 != (byte *)0x0); + uVar2 = GHIDRA_UINT((pbVar5 != (byte *)0x0)); if ((pbVar3 == (byte *)0x0) || (pbVar5 <= pbVar3)) goto LAB_00a55fb8; uVar2 = 2; linesCapacityEnd = *(undefined1 **)((char *)linesLocal + 8); @@ -212,7 +212,7 @@ LAB_00a55f66: if (pbVar4 == (byte *)0x0) { pbVar6 = (byte *)0x0; } - uVar2 = (uint)(local_10 != (byte *)0x0); + uVar2 = GHIDRA_UINT((local_10 != (byte *)0x0)); pbVar5 = pbVar6; LAB_00a55fb8: pbVar3 = pbVar5; @@ -304,7 +304,7 @@ LAB_00a560e3: while (currentChar == (char)(&DAT_00b65584)[uVar2]) { uVar2 = uVar2 + 1; if (1 < uVar2) { - uVar2 = (uint)(newlinePos != (short *)0x0); + uVar2 = GHIDRA_UINT((newlinePos != (short *)0x0)); lineEnd = newlinePos; if ((psVar1 == (short *)0x0) || (newlinePos <= psVar1)) goto LAB_00a5614b; uVar2 = 2; @@ -321,14 +321,14 @@ LAB_00a560e3: if (newlinePos == (short *)0x0) { lineEnd = (short *)0x0; } - uVar2 = (uint)(newlinePos != (short *)0x0); + uVar2 = GHIDRA_UINT((newlinePos != (short *)0x0)); LAB_00a5614b: psVar1 = lineEnd; linesCapacity = *(undefined1 **)((char *)outLinesLocal + 8); linesEnd = *(undefined1 **)((char *)outLinesLocal + 4); if (psVar1 == (short *)0x0) { newLine[0] = 0; - newLineLength = (undefined2)((textLength * 2 - (int)text) + (int)textStart >> 1); + newLineLength = (undefined2)((textLength * 2 - GHIDRA_INT(text)) + GHIDRA_INT(textStart) >> 1); if (linesEnd == linesCapacity) { local_18 = newlinePos; local_14 = newlinePos; @@ -343,7 +343,7 @@ LAB_00a5614b: } LAB_00a56158: newLine[0] = 0; - newLineLength = (undefined2)((int)psVar1 - (int)text >> 1); + newLineLength = (undefined2)(GHIDRA_INT(psVar1) - GHIDRA_INT(text) >> 1); if (linesEnd == linesCapacity) { local_18 = newlinePos; local_14 = newlinePos; @@ -415,16 +415,16 @@ void FormattedText::parse(byte *text, uint maxWidth, void *outLines, void *measu curLineStart = text; cursor = text; spaceWidth = (*measureFn)(&DAT_00b656ec,1,userData, - __security_cookie ^ (uint)(pendingLineFlags + 0x40)); + __security_cookie ^ GHIDRA_UINT((pendingLineFlags + 0x40))); wordBuf = operator_new_tracked(0x40); if (text < textEnd) { do { pbVar9 = cursor; bVar1 = *text; - uVar6 = (uint)bVar1 << 8; + uVar6 = GHIDRA_UINT(bVar1) << 8; isNewline = 0; if (bVar1 != 0) { - uVar6 = (uint)CONCAT11(bVar1,bVar1); + uVar6 = GHIDRA_UINT(CONCAT11(bVar1,bVar1)); pbVar5 = text; do { if ((char)uVar6 == ' ') goto LAB_00a56414; @@ -482,7 +482,7 @@ LAB_00a5645c: isNewline = 1; } else { - uVar6 = (int)pbVar7 - (int)cursor; + uVar6 = GHIDRA_INT(pbVar7) - GHIDRA_INT(cursor); } if (wordBufCapacity <= uVar6) { if (wordBuf != (void *)0x0) { @@ -490,14 +490,14 @@ LAB_00a5645c: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar4 = *(uint *)((char *)wordBuf + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar4; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar4; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar4); - free((uint *)((int)wordBuf + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar4)); + free((uint *)(GHIDRA_INT(wordBuf) + -4)); local_8 = local_8 & 0xffffff00; } wordBufCapacity = uVar6 + 1; @@ -530,7 +530,7 @@ LAB_00a5645c: *(int *)((char *)outLines + 4) = *(int *)((char *)outLines + 4) + 0xc; cursor = pbVar5; } - uVar4 = (uint)isNewline << 8; + uVar4 = GHIDRA_UINT(isNewline) << 8; curLineStart = pbVar9; if (isNewline != 0) { curLineStart = cursor; @@ -558,7 +558,7 @@ LAB_00a5645c: if (pbVar5 <= curLineStart) break; pbVar7 = curLineStart; if (local_34 < maxWidthLocal) { - local_24 = (int)pbVar9 - (int)curLineStart; + local_24 = GHIDRA_INT(pbVar9) - GHIDRA_INT(curLineStart); do { if (pbVar5 <= pbVar7) break; if (pbVar9 < pbVar5) { @@ -577,7 +577,7 @@ LAB_00a5645c: LAB_00a5663d: pbVar7 = pbVar7 + 1; } - local_24 = (int)pbVar7 - (int)curLineStart; + local_24 = GHIDRA_INT(pbVar7) - GHIDRA_INT(curLineStart); lineLength = (short)local_24; pbVar2 = *(byte **)((char *)outLines + 4); lineFlags[0] = -(pbVar7 < pbVar5) & 2; @@ -592,7 +592,7 @@ LAB_00a5663d: *(int *)((char *)outLines + 4) = *(int *)((char *)outLines + 4) + 0xc; } curLineStart = pbVar7; - local_24 = (*measureFn)(pbVar7,(int)pbVar5 - (int)pbVar7,userData); + local_24 = (*measureFn)(pbVar7,GHIDRA_INT(pbVar5) - GHIDRA_INT(pbVar7),userData); } while (maxWidthLocal < local_24); } } @@ -605,7 +605,7 @@ LAB_00a5663d: text = curLineStart; } pvVar3 = wordBuf; - if (0 < (int)textEnd - (int)text) { + if (0 < GHIDRA_INT(textEnd) - GHIDRA_INT(text)) { lineLength = (short)textEnd - (short)text; lineFlags[0] = 0; lineSlot = *(undefined1 **)((char *)outLines + 4); @@ -625,14 +625,14 @@ LAB_00a5663d: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar6 = *(uint *)((char *)pvVar3 + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar6; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar6; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar6); - free((void *)((int)pvVar3 + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar6)); + free((void *)(GHIDRA_INT(pvVar3) + -4)); } ExceptionList = local_10; return; diff --git a/src/game/frame_queue.cpp b/src/game/frame_queue.cpp index 9c8bec5..764444a 100644 --- a/src/game/frame_queue.cpp +++ b/src/game/frame_queue.cpp @@ -53,7 +53,7 @@ void FrameQueue::setSize(int count) local_14 = 0xffffffff; puStack_18 = &LAB_00b14eff; local_1c = ExceptionList; - uVar2 = __security_cookie ^ (uint)(createdBuf + 0x58); + uVar2 = __security_cookie ^ GHIDRA_UINT((createdBuf + 0x58)); ExceptionList = &local_1c; pvVar5 = *(void **)((char *)this + 0xc); frameCount = count; @@ -67,8 +67,8 @@ void FrameQueue::setSize(int count) pbVar4 = puStack_20; } puStack_20 = pbVar4; - local_14._0_1_ = 0; - local_14._1_3_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; if (*(int *)((char *)this + 4) != 0) { node = (int *)**(int **)this; if (node != *(int **)this) { @@ -86,14 +86,14 @@ void FrameQueue::setSize(int count) do { clip = *(undefined4 *)((char *)this + 8); frameMem = operator_new(0x20); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (frameMem == (void *)0x0) { puVar3 = (undefined4 *)0x0; } else { puVar3 = (undefined4 *)FUN_00aba8b0(clip); } - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (puVar3[6] == 0) { (**(code **)*puVar3)(1); puVar3 = (undefined4 *)0x0; @@ -109,8 +109,8 @@ void FrameQueue::setSize(int count) bVar1 = *pbVar4; pbVar4 = pbVar4 + 1; } while (bVar1 != 0); - ((std::string *)((char *)createdText))->std::string::assign(createdBuf,(int)pbVar4 - (int)(createdBuf + 1)); - local_14._0_1_ = 2; + ((std::string *)((char *)createdText))->std::string::assign(createdBuf,GHIDRA_INT(pbVar4) - GHIDRA_INT((createdBuf + 1))); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; memset(requestedBuf,0,0x40); sprintf(requestedBuf,s__d); pbVar4 = requestedBuf; @@ -121,20 +121,20 @@ void FrameQueue::setSize(int count) bVar1 = *pbVar4; pbVar4 = pbVar4 + 1; } while (bVar1 != 0); - ((std::string *)((char *)requestedText))->std::string::assign(requestedBuf,(int)pbVar4 - (int)(requestedBuf + 1)); - local_14._0_1_ = 3; + ((std::string *)((char *)requestedText))->std::string::assign(requestedBuf,GHIDRA_INT(pbVar4) - GHIDRA_INT((requestedBuf + 1))); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; insertedString = std_string_insert(requestedText,0,(byte *)"FrameQueue: unable to create ",0x1d); msgPart1 = *(void **)insertedString->_buf; uStack_d4 = *(undefined4 *)(insertedString->_buf + 4); uStack_d0 = *(undefined4 *)(insertedString->_buf + 8); uStack_cc = *(undefined4 *)(insertedString->_buf + 0xc); - local_c8._0_4_ = insertedString->_size; - local_c8._4_4_ = insertedString->_capacity; + (*(undefined4 *)((char *)&(local_c8) + 0x0)) = insertedString->_size; + (*(undefined4 *)((char *)&(local_c8) + 0x4)) = insertedString->_capacity; insertedString->_size = 0; insertedString->_capacity = 0xf; insertedString->_buf[0] = '\0'; - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; puVar3 = ((std::string *)((char *)&msgPart1))->std::string::append((byte *)" frames, out of memory. Created ", 0x20); msgPart2 = (void *)*puVar3; @@ -145,9 +145,9 @@ void FrameQueue::setSize(int count) puVar3[4] = 0; puVar3[5] = 0xf; *(undefined1 *)puVar3 = 0; - local_14._0_1_ = 5; - ((std::string *)((char *)msgPart3))->std::string::concat_move((int)frameMem,&msgPart2,createdText); - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; + ((std::string *)((char *)msgPart3))->std::string::concat_move(GHIDRA_INT(frameMem),&msgPart2,createdText); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; puVar3 = ((std::string *)((char *)msgPart3))->std::string::append((byte *)" frames.",8); message = (void *)*puVar3; uStack_bc = puVar3[1]; @@ -157,75 +157,75 @@ void FrameQueue::setSize(int count) puVar3[4] = 0; puVar3[5] = 0xf; *(undefined1 *)puVar3 = 0; - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; (*(code *)PTR_FUN_00c5aa7c)(&message); - if (0xf < local_b0._4_4_) { - uVar2 = local_b0._4_4_ + 1; + if (0xf < (*(undefined4 *)((char *)&(local_b0) + 0x4))) { + uVar2 = (*(undefined4 *)((char *)&(local_b0) + 0x4)) + 1; pvVar5 = message; if (0xfff < uVar2) { pvVar5 = *(void **)((char *)message + -4); - uVar2 = local_b0._4_4_ + 0x24; - if (0x1f < (uint)((int)message + (-4 - (int)pvVar5))) goto LAB_00aaaa49; + uVar2 = (*(undefined4 *)((char *)&(local_b0) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(message) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_00aaaa49; } operator_delete(pvVar5,uVar2); } local_b0 = 0xf00000000; - message = (void *)((uint)message & 0xffffff00); + message = (void *)(GHIDRA_UINT(message) & 0xffffff00); if (0xf < msgPart3Capacity) { uVar2 = msgPart3Capacity + 1; pvVar5 = msgPart3[0]; if (0xfff < uVar2) { - pvVar5 = *(void **)((int)msgPart3[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(msgPart3[0]) + -4); uVar2 = msgPart3Capacity + 0x24; - if (0x1f < (uint)((int)msgPart3[0] + (-4 - (int)pvVar5))) goto LAB_00aaaa49; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(msgPart3[0]) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_00aaaa49; } operator_delete(pvVar5,uVar2); } msgPart3Size = 0; msgPart3Capacity = 0xf; - msgPart3[0] = (void *)((uint)msgPart3[0] & 0xffffff00); - if (0xf < local_128._4_4_) { - uVar2 = local_128._4_4_ + 1; + msgPart3[0] = (void *)(GHIDRA_UINT(msgPart3[0]) & 0xffffff00); + if (0xf < (*(undefined4 *)((char *)&(local_128) + 0x4))) { + uVar2 = (*(undefined4 *)((char *)&(local_128) + 0x4)) + 1; pvVar5 = msgPart2; if (0xfff < uVar2) { pvVar5 = *(void **)((char *)msgPart2 + -4); - uVar2 = local_128._4_4_ + 0x24; - if (0x1f < (uint)((int)msgPart2 + (-4 - (int)pvVar5))) goto LAB_00aaaa49; + uVar2 = (*(undefined4 *)((char *)&(local_128) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(msgPart2) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_00aaaa49; } operator_delete(pvVar5,uVar2); } - if (0xf < local_c8._4_4_) { - uVar2 = local_c8._4_4_ + 1; + if (0xf < (*(undefined4 *)((char *)&(local_c8) + 0x4))) { + uVar2 = (*(undefined4 *)((char *)&(local_c8) + 0x4)) + 1; pvVar5 = msgPart1; if (0xfff < uVar2) { pvVar5 = *(void **)((char *)msgPart1 + -4); - uVar2 = local_c8._4_4_ + 0x24; - if (0x1f < (uint)((int)msgPart1 + (-4 - (int)pvVar5))) goto LAB_00aaaa49; + uVar2 = (*(undefined4 *)((char *)&(local_c8) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(msgPart1) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_00aaaa49; } operator_delete(pvVar5,uVar2); } local_c8 = 0xf00000000; - msgPart1 = (void *)((uint)msgPart1 & 0xffffff00); + msgPart1 = (void *)(GHIDRA_UINT(msgPart1) & 0xffffff00); if (0xf < requestedTextCapacity) { uVar2 = requestedTextCapacity + 1; pvVar5 = requestedText[0]; if (0xfff < uVar2) { - pvVar5 = *(void **)((int)requestedText[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(requestedText[0]) + -4); uVar2 = requestedTextCapacity + 0x24; - if (0x1f < (uint)((int)requestedText[0] + (-4 - (int)pvVar5))) goto LAB_00aaaa49; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(requestedText[0]) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_00aaaa49; } operator_delete(pvVar5,uVar2); } requestedTextSize = 0; requestedTextCapacity = 0xf; - requestedText[0] = (void *)((uint)requestedText[0] & 0xffffff00); + requestedText[0] = (void *)(GHIDRA_UINT(requestedText[0]) & 0xffffff00); if (0xf < createdTextCapacity) { uVar2 = createdTextCapacity + 1; pvVar5 = createdText[0]; if (0xfff < uVar2) { - pvVar5 = *(void **)((int)createdText[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(createdText[0]) + -4); uVar2 = createdTextCapacity + 0x24; - if (0x1f < (uint)((int)createdText[0] + (-4 - (int)pvVar5))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(createdText[0]) + (-4 - GHIDRA_INT(pvVar5))))) { LAB_00aaaa49: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -240,15 +240,15 @@ LAB_00aaaa49: /* WARNING: Subroutine does not return */ std::_Xlength_error("list too long"); } - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; node = operator_new(0xc); - local_14._0_1_ = 0; - node[2] = (int)puVar3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; + node[2] = GHIDRA_INT(puVar3); *(int *)((char *)this + 4) = *(int *)((char *)this + 4) + 1; puVar3 = *(undefined4 **)(listHead + 4); *node = listHead; createdCount = createdCount + 1; - node[1] = (int)puVar3; + node[1] = GHIDRA_INT(puVar3); *(int **)(listHead + 4) = node; *puVar3 = node; } while (createdCount < frameCount); diff --git a/src/game/friend_entry.cpp b/src/game/friend_entry.cpp index 22421c1..9422dcb 100644 --- a/src/game/friend_entry.cpp +++ b/src/game/friend_entry.cpp @@ -11,14 +11,14 @@ FriendEntry::~FriendEntry() puStack_c = &LAB_00af09f0; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; *(undefined ***)((char *)this + 8) = KAGE::Network::Multiplayer::ConstLobby::vftable; local_8 = 0; if (*(int **)((char *)this + 0x10) != (int *)0x0) { isLastRef = (**(code **)(**(int **)((char *)this + 0x10) + 0xc))(uVar1); if ((isLastRef != '\0') && (g_lobbyReleaseFn != (void *)0x0)) { - (*g_lobbyReleaseFn)((int)this + 0xc); + (*g_lobbyReleaseFn)(GHIDRA_INT(this) + 0xc); } } *(undefined ***)this = KAGE::System::UserProfileBase::vftable; diff --git a/src/game/fx_layer.cpp b/src/game/fx_layer.cpp index fc30d93..2c57dae 100644 --- a/src/game/fx_layer.cpp +++ b/src/game/fx_layer.cpp @@ -20,10 +20,10 @@ void * FXLayer::copy_constructor(void *other) local_8 = 0xffffffff; puStack_c = &LAB_00b0d700; local_10 = ExceptionList; - uVar5 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar5 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; *(undefined4 *)this = *(undefined4 *)other; - ((KAGE::SmartPointer *)((void *)((int)this + 4)))->KAGE::SmartPointer::operator_assign((void *)((int)other + 4)); + ((KAGE::SmartPointer *)((void *)(GHIDRA_INT(this) + 4)))->KAGE::SmartPointer::operator_assign((void *)(GHIDRA_INT(other) + 4)); local_8 = 0; *(undefined4 *)((char *)this + 0xc) = 0; *(undefined4 *)((char *)this + 0x10) = 0; @@ -31,7 +31,7 @@ void * FXLayer::copy_constructor(void *other) srcEnd = *(undefined4 **)((char *)other + 0x10); src = *(undefined4 **)((char *)other + 0xc); if (src != srcEnd) { - byteCount = ((int)srcEnd - (int)src) / 0x14; + byteCount = (GHIDRA_INT(srcEnd) - GHIDRA_INT(src)) / 0x14; if (0xccccccc < byteCount) { /* WARNING: Subroutine does not return */ FUN_0040cee0(uVar5); @@ -40,7 +40,7 @@ void * FXLayer::copy_constructor(void *other) newData = std::_Allocate(byteCount); *(void **)((char *)this + 0xc) = newData; *(void **)((char *)this + 0x10) = newData; - *(void **)((char *)this + 0x14) = (void *)((int)newData + byteCount); + *(void **)((char *)this + 0x14) = (void *)(GHIDRA_INT(newData) + byteCount); dest = *(undefined4 **)((char *)this + 0xc); do { uVar2 = src[1]; diff --git a/src/game/fx_layers.cpp b/src/game/fx_layers.cpp index f93da49..ee264f9 100644 --- a/src/game/fx_layers.cpp +++ b/src/game/fx_layers.cpp @@ -12,7 +12,7 @@ void FXLayers::destructor() local_8 = 0xffffffff; puStack_c = &LAB_00af09f0; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; _eh_vector_destructor_iterator_(&(*(undefined1 *)((char *)(this) + 0x2c8)),0x114,2,ANM2::~ANM2); FID_conflict__Tidy(&(*(undefined1 *)((char *)(this) + 0x44))); @@ -88,7 +88,7 @@ void FXLayers::parse_fx_params_node(void *node) uint local_c; char *nameLast; - local_c = __security_cookie ^ (uint)auStack_44; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_44); fxLayers = this; paramsNode = ((xml_node *)(node))->xml_node::first_node((byte *)"params",in_stack_ffffffa8,in_stack_ffffffac); do { @@ -114,9 +114,9 @@ void FXLayers::parse_fx_params_node(void *node) pcVar8 = (char *)attr[2]; } if (pcVar8 == nameLast + -0xb65867) { - pbVar2 = (byte *)(pcVar8 + (int)pbVar4); + pbVar2 = (byte *)(pcVar8 + GHIDRA_INT(pbVar4)); if (pbVar2 <= pbVar4) goto LAB_0098fb2d; - iVar5 = (int)"stage" - (int)pbVar4; + iVar5 = GHIDRA_INT("stage") - GHIDRA_INT(pbVar4); while (*pbVar4 == pbVar4[iVar5]) { pbVar4 = pbVar4 + 1; if (pbVar2 <= pbVar4) goto LAB_0098fb2d; @@ -140,9 +140,9 @@ LAB_0098fb2d: pcVar8 = (char *)puVar6[2]; } if (pcVar8 == nameLast + -0xb7d6bf) { - pbVar2 = (byte *)(pcVar8 + (int)pbVar4); + pbVar2 = (byte *)(pcVar8 + GHIDRA_INT(pbVar4)); if (pbVar2 <= pbVar4) goto LAB_0098fb87; - iVar5 = (int)"altStages" - (int)pbVar4; + iVar5 = GHIDRA_INT("altStages") - GHIDRA_INT(pbVar4); while (*pbVar4 == pbVar4[iVar5]) { pbVar4 = pbVar4 + 1; if (pbVar2 <= pbVar4) goto LAB_0098fb87; @@ -166,13 +166,13 @@ LAB_0098fb87: pcVar8 = (char *)local_3c[2]; } if (pcVar8 == nameLast + -0xb6cd2b) { - pbVar2 = (byte *)(pcVar8 + (int)pbVar4); + pbVar2 = (byte *)(pcVar8 + GHIDRA_INT(pbVar4)); if (pbVar2 <= pbVar4) { LAB_0098fbd0: puVar7 = local_3c; goto LAB_0098fbe7; } - iVar5 = (int)"backdrop" - (int)pbVar4; + iVar5 = GHIDRA_INT("backdrop") - GHIDRA_INT(pbVar4); while (*pbVar4 == pbVar4[iVar5]) { pbVar4 = pbVar4 + 1; if (pbVar2 <= pbVar4) goto LAB_0098fbd0; @@ -236,7 +236,7 @@ LAB_0098fbe7: isLess = isStageMatch < (byte)*pcVar8; if (isStageMatch != *pcVar8) { LAB_0098fce6: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_0098fceb; } if (isStageMatch == 0) break; @@ -261,7 +261,7 @@ LAB_0098fceb: isStageMatch = *pbVar2; pbVar2 = pbVar2 + 1; } while (isStageMatch != 0); - ((std::string *)((char *)attrValue))->std::string::assign(pbVar4,(int)pbVar2 - (int)(pbVar4 + 1)); + ((std::string *)((char *)attrValue))->std::string::assign(pbVar4,GHIDRA_INT(pbVar2) - GHIDRA_INT((pbVar4 + 1))); if (attrValueSize == 0) { LAB_0098fdf2: isStageMatch = 0; @@ -284,7 +284,7 @@ LAB_0098fdf2: local_EAX_642 = 0; } else { - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; } if (local_EAX_642 != 0) goto LAB_0098fd8b; } @@ -307,7 +307,7 @@ LAB_0098fd8b: local_EAX_642 = 0; } else { - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; } if (local_EAX_642 == 0) goto LAB_0098fdee; } @@ -328,7 +328,7 @@ LAB_0098fdee: if (0xfff < local_EAX_642) { pppppiVar3 = (int *****)attrValue[0][-1]; local_EAX_642 = attrValueCapacity + 0x24; - if (0x1f < (uint)((int)attrValue[0] + (-4 - (int)pppppiVar3))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(attrValue[0]) + (-4 - GHIDRA_INT(pppppiVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -348,7 +348,7 @@ LAB_0098fdee: isLess = isStageMatch < (byte)*pcVar8; if (isStageMatch != *pcVar8) { LAB_0098fec2: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_0098fec7; } if (isStageMatch == 0) break; @@ -387,7 +387,7 @@ LAB_0098fec7: isLess = isStageMatch < (byte)*pcVar8; if (isStageMatch != *pcVar8) { LAB_0098fef1: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_0098fef6; } if (isStageMatch == 0) break; @@ -414,7 +414,7 @@ LAB_0098fef6: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_0098ff41: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_0098ff46; } if (isStageMatch == 0) break; @@ -445,7 +445,7 @@ LAB_0098ff46: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_0098ffa0: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_0098ffa5; } if (isStageMatch == 0) break; @@ -476,7 +476,7 @@ LAB_0098ffa5: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_00990000: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_00990005; } if (isStageMatch == 0) break; @@ -507,7 +507,7 @@ LAB_00990005: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_00990060: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_00990065; } if (isStageMatch == 0) break; @@ -538,7 +538,7 @@ LAB_00990065: isLess = isStageMatch < (byte)*pcVar8; if (isStageMatch != *pcVar8) { LAB_009900c0: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_009900c5; } if (isStageMatch == 0) break; @@ -569,7 +569,7 @@ LAB_009900c5: isLess = isStageMatch < (byte)*pcVar8; if (isStageMatch != *pcVar8) { LAB_00990118: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_0099011d; } if (isStageMatch == 0) break; @@ -608,7 +608,7 @@ LAB_0099011d: isLess = isStageMatch < (byte)*pcVar8; if (isStageMatch != *pcVar8) { LAB_00990190: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_00990195; } if (isStageMatch == 0) break; @@ -634,7 +634,7 @@ LAB_00990195: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_009901e1: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_009901e6; } if (isStageMatch == 0) break; @@ -665,7 +665,7 @@ LAB_009901e6: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_00990240: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_00990245; } if (isStageMatch == 0) break; @@ -696,7 +696,7 @@ LAB_00990245: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_009902a0: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_009902a5; } if (isStageMatch == 0) break; @@ -727,7 +727,7 @@ LAB_009902a5: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_00990300: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_00990305; } if (isStageMatch == 0) break; @@ -761,7 +761,7 @@ LAB_00990305: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_00990360: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_00990365; } if (isStageMatch == 0) break; @@ -792,7 +792,7 @@ LAB_00990365: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_009903c0: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_009903c5; } if (isStageMatch == 0) break; @@ -823,7 +823,7 @@ LAB_009903c5: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_00990418: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_0099041d; } if (isStageMatch == 0) break; @@ -865,7 +865,7 @@ LAB_009909f3: isLess = isStageMatch < (byte)*pcVar8; if (isStageMatch != *pcVar8) { LAB_00990490: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_00990495; } if (isStageMatch == 0) break; @@ -892,7 +892,7 @@ LAB_00990495: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_009904e1: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_009904e6; } if (isStageMatch == 0) break; @@ -926,7 +926,7 @@ LAB_009904e6: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_00990541: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_00990546; } if (isStageMatch == 0) break; @@ -957,7 +957,7 @@ LAB_00990546: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_009905a0: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_009905a5; } if (isStageMatch == 0) break; @@ -988,7 +988,7 @@ LAB_009905a5: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_009905f8: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_009905fd; } if (isStageMatch == 0) break; @@ -1025,7 +1025,7 @@ LAB_009905fd: isLess = isStageMatch < (byte)*pcVar8; if (isStageMatch != *pcVar8) { LAB_00990670: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_00990675; } if (isStageMatch == 0) break; @@ -1052,7 +1052,7 @@ LAB_00990675: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_009906c1: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_009906c6; } if (isStageMatch == 0) break; @@ -1086,7 +1086,7 @@ LAB_009906c6: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_00990721: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_00990726; } if (isStageMatch == 0) break; @@ -1117,7 +1117,7 @@ LAB_00990726: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_00990780: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_00990785; } if (isStageMatch == 0) break; @@ -1148,7 +1148,7 @@ LAB_00990785: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_009907d8: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_009907dd; } if (isStageMatch == 0) break; @@ -1187,7 +1187,7 @@ LAB_009907dd: isLess = isStageMatch < (byte)*pcVar8; if (isStageMatch != *pcVar8) { LAB_00990850: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_00990855; } if (isStageMatch == 0) break; @@ -1213,7 +1213,7 @@ LAB_00990855: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_009908a1: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_009908a6; } if (isStageMatch == 0) break; @@ -1247,7 +1247,7 @@ LAB_009908a6: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_00990901: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_00990906; } if (isStageMatch == 0) break; @@ -1278,7 +1278,7 @@ LAB_00990906: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_00990960: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_00990965; } if (isStageMatch == 0) break; @@ -1309,7 +1309,7 @@ LAB_00990965: isLess = isStageMatch < *nameChar; if (isStageMatch != *nameChar) { LAB_009909b8: - local_EAX_642 = -(uint)isLess | 1; + local_EAX_642 = -GHIDRA_UINT(isLess) | 1; goto LAB_009909bd; } if (isStageMatch == 0) break; @@ -1327,7 +1327,7 @@ LAB_009909bd: pbVar4 = (byte *)puVar7[1]; } dVar9 = atof((char *)pbVar4); - fxLayers[1]._poopFxCountdown = (int)(float)dVar9; + fxLayers[1]._poopFxCountdown = GHIDRA_INT((float)dVar9); } } } @@ -1490,11 +1490,11 @@ void FXLayers::LoadConfig(byte *path, int stage, int stageType) undefined1 *puStack_18; undefined4 local_14; - ppsStack_20 = (std_string **)((int)&gfxPath + 0x50); + ppsStack_20 = (std_string **)(GHIDRA_INT(&gfxPath) + 0x50); local_14 = 0xffffffff; puStack_18 = &LAB_00b0d5ea; local_1c = ExceptionList; - securityCookie = __security_cookie ^ (int)&gfxPath + 0x44U; + securityCookie = __security_cookie ^ GHIDRA_INT(&gfxPath) + 0x44U; ExceptionList = &local_1c; pfStack_101e8 = (float *)path; *(int *)&(*(undefined1 *)((char *)(veinsSprite) + 0xc)) = stage; @@ -1519,7 +1519,7 @@ void FXLayers::LoadConfig(byte *path, int stage, int stageType) stageId = RoomConfig::GetStageID(uVar8,*(uint *)&(*(undefined1 *)((char *)(pFStack_101e0) + 0x10)),-1); pFVar24 = pFStack_101e0; if ((game->_difficulty == 2) || (game->_difficulty == 3)) { - if ((int)uVar8 < 5) { + if (GHIDRA_INT(uVar8) < 5) { *(uint *)&(*(undefined1 *)((char *)(pFStack_101e0) + 0xc)) = uVar8 * 2 + -1; } else { @@ -1623,13 +1623,13 @@ switchD_00990cde_caseD_1: uVar39 = CONCAT44(pbStack_1021c,0x990db8); ((rapidxml::xml_document *)(document))->rapidxml::xml_document::parse(pbStack_1021c); pvVar10 = xml_node::first_node - (document,(byte *)"fxLayers",(int)uVar39,(byte)((ulonglong)uVar39 >> 0x20)); + (document,(byte *)"fxLayers",GHIDRA_INT(uVar39),(byte)((ulonglong)uVar39 >> 0x20)); gfxPath._size = 0; gfxPath._capacity = 0xf; - gfxPath._buf._0_4_ = (std_string *)0x0; - local_14 = CONCAT31(local_14._1_3_,1); + (*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) = (std_string *)0x0; + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); pvVar11 = xml_node::first_attribute - (pvVar10,&DAT_00b6987c,(uint)uVar39,(byte)((ulonglong)uVar39 >> 0x20)); + (pvVar10,&DAT_00b6987c,GHIDRA_UINT(uVar39),(byte)((ulonglong)uVar39 >> 0x20)); if (pvVar11 != (void *)0x0) { pbVar21 = &g_xmlNullStr; if (*(byte **)((char *)pvVar11 + 4) != (byte *)0x0) { @@ -1640,11 +1640,11 @@ switchD_00990cde_caseD_1: bVar4 = *pbVar19; pbVar19 = pbVar19 + 1; } while (bVar4 != 0); - uVar39 = CONCAT44((int)pbVar19 - (int)(pbVar21 + 1),pbVar21); - ((std::string *)(gfxPath._buf))->std::string::assign(pbVar21,(int)pbVar19 - (int)(pbVar21 + 1)); + uVar39 = CONCAT44(GHIDRA_INT(pbVar19) - GHIDRA_INT((pbVar21 + 1)),pbVar21); + ((std::string *)(gfxPath._buf))->std::string::assign(pbVar21,GHIDRA_INT(pbVar19) - GHIDRA_INT((pbVar21 + 1))); } pvStack_10214 = - ((xml_node *)(pvVar10))->xml_node::first_node(&DAT_00b7d6b4,(int)uVar39,(byte)((ulonglong)uVar39 >> 0x20)); + ((xml_node *)(pvVar10))->xml_node::first_node(&DAT_00b7d6b4,GHIDRA_INT(uVar39),(byte)((ulonglong)uVar39 >> 0x20)); joined_r0x00990e3c: if (pvStack_10214 != (void *)0x0) { psStack_10210 = (std_string *)0x0; @@ -1655,10 +1655,10 @@ joined_r0x00990e3c: layerPathCapacity = 0xf; layerPathBuf = (byte *******)0x0; ((FXParams *)((FXParams *)auStack_10278))->FXParams::FXParams(); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; piStack_101dc = *(int **)((char *)extraout_EDX + 0x20); - auStack_10278._0_4_ = -1; - uStack_10240._0_2_ = (ushort)(byte)uStack_10240; + (*(undefined4 *)((char *)&(auStack_10278) + 0x0)) = -1; + (*(undefined2 *)((char *)&(uStack_10240) + 0x0)) = (ushort)(byte)uStack_10240; fStack_10260 = 1.4013e-45; fStack_10244 = 1.4013e-45; pvVar10 = extraout_EDX; @@ -1676,7 +1676,7 @@ LAB_00990ec5: bVar32 = bVar4 < *pbVar20; if (bVar4 != *pbVar20) { LAB_00990ef6: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_00990efb; } if (bVar4 == 0) break; @@ -1693,7 +1693,7 @@ LAB_00990efb: if ((byte *)piStack_101dc[1] != (byte *)0x0) { pbVar21 = (byte *)piStack_101dc[1]; } - auStack_10278._0_4_ = atoi((char *)pbVar21); + (*(undefined4 *)((char *)&(auStack_10278) + 0x0)) = atoi((char *)pbVar21); goto LAB_009918f8; } pbVar20 = &DAT_00b66e0c; @@ -1706,7 +1706,7 @@ LAB_00990efb: bVar32 = bVar4 < *pbVar20; if (bVar4 != *pbVar20) { LAB_00990f50: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_00990f55; } if (bVar4 == 0) break; @@ -1728,7 +1728,7 @@ LAB_00990f55: bVar4 = *pbVar19; pbVar19 = pbVar19 + 1; } while (bVar4 != 0); - psVar22 = (std_string *)(pbVar19 + -(int)(pbVar21 + 1)); + psVar22 = (std_string *)(pbVar19 + -GHIDRA_INT((pbVar21 + 1))); if ((std_string *)(0x7fffffff - gfxPath._size) < psVar22) { LAB_00993701: /* WARNING: Subroutine does not return */ @@ -1736,10 +1736,10 @@ LAB_00993701: } psVar13 = &gfxPath; if (0xf < gfxPath._capacity) { - psVar13 = (std_string *)gfxPath._buf._0_4_; + psVar13 = (*(undefined4 *)((char *)&((std_string *)gfxPath._buf) + 0x0)); } - ((std::string *)((char *)&concatBuf))->std::string::concat((int)pfStack_101ec,psVar22,(byte *)psVar13, - gfxPath._size,pbVar21,(uint)psVar22); + ((std::string *)((char *)&concatBuf))->std::string::concat(GHIDRA_INT(pfStack_101ec),psVar22,(byte *)psVar13, + gfxPath._size,pbVar21,GHIDRA_UINT(psVar22)); cleanupFlags = cleanupFlags | 1; if (0xf < layerPathCapacity) { uVar8 = layerPathCapacity + 1; @@ -1747,13 +1747,13 @@ LAB_00993701: if (0xfff < uVar8) { pppppppbVar12 = (byte *******)layerPathBuf[-1]; uVar8 = layerPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)layerPathBuf + (-4 - (int)pppppppbVar12))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(layerPathBuf) + (-4 - GHIDRA_INT(pppppppbVar12)))) goto LAB_00993307; } operator_delete(pppppppbVar12,uVar8); } layerPathBuf = concatBuf; - concatBuf = (byte *******)((uint)concatBuf & 0xffffff00); + concatBuf = (byte *******)(GHIDRA_UINT(concatBuf) & 0xffffff00); uStack_c8 = uStack_98; uStack_c4 = uStack_94; uStack_c0 = uStack_90; @@ -1773,7 +1773,7 @@ LAB_00993701: bVar32 = bVar4 < (byte)*pcVar28; if (bVar4 != *pcVar28) { LAB_00991053: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_00991058; } if (bVar4 == 0) break; @@ -1803,7 +1803,7 @@ LAB_00991058: bVar32 = bVar4 < *pbVar20; if (bVar4 != *pbVar20) { LAB_009910b0: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_009910b5; } if (bVar4 == 0) break; @@ -1834,7 +1834,7 @@ LAB_009910b5: bVar32 = bVar4 < *pbVar20; if (bVar4 != *pbVar20) { LAB_00991110: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_00991115; } if (bVar4 == 0) break; @@ -1865,7 +1865,7 @@ LAB_00991115: bVar32 = bVar4 < *pbVar20; if (bVar4 != *pbVar20) { LAB_00991170: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_00991175; } if (bVar4 == 0) break; @@ -1896,7 +1896,7 @@ LAB_00991175: bVar32 = bVar4 < *pbVar20; if (bVar4 != *pbVar20) { LAB_009911d0: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_009911d5; } if (bVar4 == 0) break; @@ -1927,7 +1927,7 @@ LAB_009911d5: bVar32 = bVar4 < (byte)*pcVar28; if (bVar4 != *pcVar28) { LAB_00991230: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_00991235; } if (bVar4 == 0) break; @@ -1952,11 +1952,11 @@ LAB_00991235: bVar4 = *pbVar19; pbVar19 = pbVar19 + 1; } while (bVar4 != 0); - ((std::string *)((char *)&attrValueBuf))->std::string::assign(pbVar21,(int)pbVar19 - (int)(pbVar21 + 1)); - local_14._0_1_ = 5; + ((std::string *)((char *)&attrValueBuf))->std::string::assign(pbVar21,GHIDRA_INT(pbVar19) - GHIDRA_INT((pbVar21 + 1))); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < DAT_00c9431c) && (_Init_thread_header(), DAT_00c9431c == -1)) { - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; DAT_00c94320 = (undefined1 *)0x0; DAT_00c94324 = 0; DAT_00c94320 = operator_new(0x2c); @@ -1965,7 +1965,7 @@ LAB_00991235: *(undefined1 **)(DAT_00c94320 + 8) = DAT_00c94320; *(undefined2 *)(DAT_00c94320 + 0xc) = 0x101; _atexit(FUN_00b16a00); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; _Init_thread_footer(); } if (DAT_00c94324 == 0) { @@ -1988,7 +1988,7 @@ LAB_00991235: uStack_10290 = 6; FUN_00998240(auStack_102ec,&pcStack_10294); } - std::map::lower_bound((undefined1 *)((int)&local_e4 + 0xc),&attrValueBuf); + std::map::lower_bound((undefined1 *)(GHIDRA_INT(&local_e4) + 0xc),&attrValueBuf); pppppppbVar3 = attrValueBuf; puVar23 = (undefined1 *)local_e4._capacity; if (*(char *)(local_e4._capacity + 0xd) == '\0') { @@ -2014,14 +2014,14 @@ LAB_009913e4: else { fStack_1024c = *(float *)(puVar23 + 0x28); } - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; if (0xf < attrValueCapacity) { uVar8 = attrValueCapacity + 1; pppppppbVar12 = pppppppbVar3; if (0xfff < uVar8) { pppppppbVar12 = (byte *******)pppppppbVar3[-1]; uVar8 = attrValueCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)pppppppbVar3 + (-4 - (int)pppppppbVar12))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(pppppppbVar3) + (-4 - GHIDRA_INT(pppppppbVar12)))) goto LAB_00993307; } goto LAB_009918d8; @@ -2038,7 +2038,7 @@ LAB_009913e4: bVar32 = bVar4 < (byte)*pcVar28; if (bVar4 != *pcVar28) { LAB_00991460: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_00991465; } if (bVar4 == 0) break; @@ -2077,7 +2077,7 @@ LAB_00991465: bVar32 = bVar4 < (byte)*pcVar28; if (bVar4 != *pcVar28) { LAB_009914e3: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_009914e8; } if (bVar4 == 0) break; @@ -2107,7 +2107,7 @@ LAB_009914e8: bVar32 = bVar4 < (byte)*pcVar28; if (bVar4 != *pcVar28) { LAB_00991540: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_00991545; } if (bVar4 == 0) break; @@ -2120,7 +2120,7 @@ LAB_00991540: uVar8 = 0; LAB_00991545: if (uVar8 == 0) { - uStack_10240._0_2_ = CONCAT11(1,(byte)uStack_10240); + (*(undefined2 *)((char *)&(uStack_10240) + 0x0)) = CONCAT11(1,(byte)uStack_10240); pbVar21 = &g_xmlNullStr; if ((byte *)piStack_101dc[1] != (byte *)0x0) { pbVar21 = (byte *)piStack_101dc[1]; @@ -2139,7 +2139,7 @@ LAB_00991545: bVar32 = bVar4 < (byte)*pcVar28; if (bVar4 != *pcVar28) { LAB_009915a1: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_009915a6; } if (bVar4 == 0) break; @@ -2162,7 +2162,7 @@ LAB_009915a6: bVar32 = bVar4 < (byte)*pcVar28; if (bVar4 != *pcVar28) { LAB_009916e4: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_009916e9; } if (bVar4 == 0) break; @@ -2192,7 +2192,7 @@ LAB_009916e9: bVar32 = bVar4 < (byte)*pcVar28; if (bVar4 != *pcVar28) { LAB_00991740: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_00991745; } if (bVar4 == 0) break; @@ -2222,7 +2222,7 @@ LAB_00991745: bVar32 = bVar4 < (byte)*pcVar28; if (bVar4 != *pcVar28) { LAB_009917a0: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_009917a5; } if (bVar4 == 0) break; @@ -2247,7 +2247,7 @@ LAB_009917a5: bVar4 = *pbVar19; pbVar19 = pbVar19 + 1; } while (bVar4 != 0); - ((std::string *)((char *)&attrValueBuf))->std::string::assign(pbVar21,(int)pbVar19 - (int)(pbVar21 + 1)) + ((std::string *)((char *)&attrValueBuf))->std::string::assign(pbVar21,GHIDRA_INT(pbVar19) - GHIDRA_INT((pbVar21 + 1))) ; if (attrValueSize == 0) { LAB_009918a5: @@ -2270,7 +2270,7 @@ LAB_009918a5: uVar8 = 0; } else { - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; } if (uVar8 != 0) goto LAB_0099183d; } @@ -2292,7 +2292,7 @@ LAB_0099183d: uVar8 = 0; } else { - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; } if (uVar8 == 0) goto LAB_0099189c; } @@ -2304,7 +2304,7 @@ LAB_0099183d: if (iVar7 == 0) goto LAB_009918a5; } LAB_0099189c: - uStack_10230 = CONCAT11(uStack_10230._1_1_,1); + uStack_10230 = CONCAT11((*(undefined1 *)((char *)&(uStack_10230) + 0x1)),1); } goto LAB_009918b2; } @@ -2324,10 +2324,10 @@ LAB_0099189c: bVar4 = *pbVar19; pbVar19 = pbVar19 + 1; } while (bVar4 != 0); - ((std::string *)((char *)&attrValueBuf))->std::string::assign(pbVar21,(int)pbVar19 - (int)(pbVar21 + 1)); + ((std::string *)((char *)&attrValueBuf))->std::string::assign(pbVar21,GHIDRA_INT(pbVar19) - GHIDRA_INT((pbVar21 + 1))); if (attrValueSize == 0) { LAB_009916a9: - uStack_10240 = (float)((uint)uStack_10240 & 0xffffff00); + uStack_10240 = (float)(GHIDRA_UINT(uStack_10240) & 0xffffff00); } else { pppppppbVar12 = (byte *******)&attrValueBuf; @@ -2346,7 +2346,7 @@ LAB_009916a9: uVar8 = 0; } else { - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; } if (uVar8 != 0) goto LAB_0099163e; } @@ -2368,7 +2368,7 @@ LAB_0099163e: uVar8 = 0; } else { - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; } if (uVar8 == 0) goto LAB_0099169d; } @@ -2380,7 +2380,7 @@ LAB_0099163e: if (iVar7 == 0) goto LAB_009916a9; } LAB_0099169d: - uStack_10240 = (float)CONCAT31(uStack_10240._1_3_,1); + uStack_10240 = (float)CONCAT31((*(undefined1 *)((char *)&(uStack_10240) + 0x1)),1); } LAB_009918b2: if (attrValueCapacity < 0x10) goto LAB_009918e0; @@ -2389,7 +2389,7 @@ LAB_009918b2: if (uVar8 < 0x1000) goto LAB_009918d8; pppppppbVar12 = (byte *******)attrValueBuf[-1]; uVar8 = attrValueCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)attrValueBuf + (-4 - (int)pppppppbVar12))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(attrValueBuf) + (-4 - GHIDRA_INT(pppppppbVar12)))) goto LAB_00993307; LAB_009918d8: operator_delete(pppppppbVar12,uVar8); @@ -2397,7 +2397,7 @@ LAB_009918d8: LAB_009918e0: attrValueSize = 0; attrValueCapacity = 0xf; - attrValueBuf = (byte *******)((uint)attrValueBuf & 0xffffff00); + attrValueBuf = (byte *******)(GHIDRA_UINT(attrValueBuf) & 0xffffff00); piVar9 = piStack_101dc; LAB_009918f8: if ((piVar9[4] == 0) || (piStack_101dc = (int *)piVar9[6], piStack_101dc == (int *)0x0)) @@ -2407,14 +2407,14 @@ LAB_009918f8: goto LAB_00991915; } pfVar26 = (float *)&(*(undefined1 *)((char *)(pFStack_101e0) + 0x24)); - uVar39 = CONCAT44(0x9925b4,(int)uVar39); + uVar39 = CONCAT44(0x9925b4,GHIDRA_INT(uVar39)); pfStack_101e4 = pfVar26; FUN_009973e0(); pvVar10 = xml_node::first_node - (document,(byte *)"fxRays",(int)uVar39,(byte)((ulonglong)uVar39 >> 0x20)); + (document,(byte *)"fxRays",GHIDRA_INT(uVar39),(byte)((ulonglong)uVar39 >> 0x20)); psStack_10204 = xml_node::first_node - (pvVar10,(byte *)"rayGroup",(int)uVar39,(byte)((ulonglong)uVar39 >> 0x20)); + (pvVar10,(byte *)"rayGroup",GHIDRA_INT(uVar39),(byte)((ulonglong)uVar39 >> 0x20)); game = g_game; joined_r0x009925de: g_game = game; @@ -2430,10 +2430,10 @@ joined_r0x009925de: pfStack_10234 = (float *)0x0; uStack_10230 = 0; local_e4._size = 0; - local_e4._capacity = (uint)&DAT_0000000f; - local_e4._buf._0_4_ = (void *)0x0; - local_14._1_3_ = (undefined3)((uint)local_14 >> 8); - local_14._0_1_ = 0xe; + local_e4._capacity = GHIDRA_UINT(&DAT_0000000f); + (*(undefined4 *)((char *)&(local_e4._buf) + 0x0)) = (void *)0x0; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = (undefined3)(GHIDRA_UINT(local_14) >> 8); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xe; for (puVar29 = *(undefined4 **)(psStack_10204[1]._buf + 8); puVar29 != (undefined4 *)0x0; puVar29 = (undefined4 *)puVar29[6]) { pbVar19 = &DAT_00b7d790; @@ -2447,7 +2447,7 @@ joined_r0x009925de: pbVar20 = (byte *)*puVar29; if (bStack_101d1 != *pbVar19) { LAB_009926bb: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_009926c0; } if (bStack_101d1 == 0) break; @@ -2480,7 +2480,7 @@ LAB_009926c0: pbVar20 = (byte *)*puVar29; if (bStack_101d1 != *pbVar19) { LAB_0099272f: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_00992734; } if (bStack_101d1 == 0) break; @@ -2513,7 +2513,7 @@ LAB_00992734: pbVar19 = (byte *)*puVar29; if (bStack_101d1 != *pcVar28) { LAB_009927aa: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_009927af; } if (bStack_101d1 == 0) break; @@ -2546,7 +2546,7 @@ LAB_009927af: pbVar19 = (byte *)*puVar29; if (bStack_101d1 != *pcVar28) { LAB_0099281e: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_00992823; } if (bStack_101d1 == 0) break; @@ -2579,7 +2579,7 @@ LAB_00992823: pbVar19 = (byte *)*puVar29; if (bStack_101d1 != *pcVar28) { LAB_0099289a: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_0099289f; } if (bStack_101d1 == 0) break; @@ -2612,7 +2612,7 @@ LAB_0099289f: pbVar19 = (byte *)*puVar29; if (bStack_101d1 != *pcVar28) { LAB_0099290e: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_00992913; } if (bStack_101d1 == 0) break; @@ -2645,7 +2645,7 @@ LAB_00992913: pbVar19 = (byte *)*puVar29; if (bStack_101d1 != *pcVar28) { LAB_0099298a: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_0099298f; } if (bStack_101d1 == 0) break; @@ -2677,7 +2677,7 @@ LAB_0099298f: bVar32 = bVar4 < (byte)*pcVar28; if (bVar4 != *pcVar28) { LAB_009929e1: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_009929e6; } if (bVar4 == 0) break; @@ -2699,7 +2699,7 @@ LAB_009929e6: bVar4 = *pbVar19; pbVar19 = pbVar19 + 1; } while (bVar4 != 0); - ((std::string *)(local_e4._buf))->std::string::assign(pbVar21,(int)pbVar19 - (int)(pbVar21 + 1)); + ((std::string *)(local_e4._buf))->std::string::assign(pbVar21,GHIDRA_INT(pbVar19) - GHIDRA_INT((pbVar21 + 1))); } } } @@ -2711,10 +2711,10 @@ LAB_009929e6: if (puVar29[4] == 0) break; } string_split(&psStack_10210,&local_e4,0x2c); - local_14._0_1_ = 0xf; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xf; pvStack_10214 = (void *)0x0; - iVar7 = (int)psStack_1020c - (int)psStack_10210 >> 0x1f; - if (((int)psStack_1020c - (int)psStack_10210) / 0x18 + iVar7 != iVar7) { + iVar7 = GHIDRA_INT(psStack_1020c) - GHIDRA_INT(psStack_10210) >> 0x1f; + if ((GHIDRA_INT(psStack_1020c) - GHIDRA_INT(psStack_10210)) / 0x18 + iVar7 != iVar7) { iVar7 = 0; do { pcVar28 = psStack_10210->_buf + iVar7; @@ -2758,12 +2758,12 @@ LAB_00993706: bVar4 = stage_matches(iVar15,1 << ((byte)pfStack_101e8 & 0x1f), *(int *)&(*(undefined1 *)((char *)(pFStack_101e0) + 0xc)),*(int *)&(*(undefined1 *)((char *)(pFStack_101e0) + 0x10))); if (bVar4 != 0) { - uStack_10230 = CONCAT11(uStack_10230._1_1_,1); + uStack_10230 = CONCAT11((*(undefined1 *)((char *)&(uStack_10230) + 0x1)),1); break; } iVar7 = iVar7 + 0x18; - pvStack_10214 = (void *)((int)pvStack_10214 + 1); - } while (pvStack_10214 < (void *)(((int)psStack_1020c - (int)psStack_10210) / 0x18)); + pvStack_10214 = (void *)(GHIDRA_INT(pvStack_10214) + 1); + } while (pvStack_10214 < (void *)((GHIDRA_INT(psStack_1020c) - GHIDRA_INT(psStack_10210)) / 0x18)); } pcVar28 = "fxRay"; do { @@ -2781,9 +2781,9 @@ LAB_00993706: pcVar28 = (char *)piStack_101dc[2]; } if (pcVar28 == pcVar31 + -0xb7d853) { - pbVar19 = pbVar21 + (int)pcVar28; + pbVar19 = pbVar21 + GHIDRA_INT(pcVar28); if (pbVar19 <= pbVar21) goto joined_r0x00992bf5; - iVar7 = (int)&DAT_00b7d854 - (int)pbVar21; + iVar7 = GHIDRA_INT(&DAT_00b7d854) - GHIDRA_INT(pbVar21); while (*pbVar21 == pbVar21[iVar7]) { pbVar21 = pbVar21 + 1; if (pbVar19 <= pbVar21) goto joined_r0x00992bf5; @@ -2803,21 +2803,21 @@ joined_r0x00992bf5: RStack_101fc._shift1 = 0; RStack_101fc._shift2 = 0; RStack_101fc._shift3 = 0; - local_14._0_1_ = 0x11; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x11; if ((DAT_00c35e8c == 0.0) && (KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"), DAT_00c35e8c == 0.0)) { pcVar2 = (code *)swi(3); (*pcVar2)(); return; } - uVar8 = (uint)DAT_00c35e8c >> ((byte)DAT_00c35e90 & 0x1f) ^ (uint)DAT_00c35e8c; + uVar8 = GHIDRA_UINT(DAT_00c35e8c) >> ((byte)DAT_00c35e90 & 0x1f) ^ GHIDRA_UINT(DAT_00c35e8c); uVar8 = uVar8 << ((byte)DAT_00c35e94 & 0x1f) ^ uVar8; DAT_00c35e8c = (float)(uVar8 >> ((byte)DAT_00c35e98 & 0x1f) ^ uVar8); puVar29 = (undefined4 *)piStack_101dc[8]; RStack_101fc._shift1 = - (int)((float)((double)(int)DAT_00c35e8c + - __uint_to_double_fixup[-((int)DAT_00c35e8c >> 0x1f)]) * 2.3283062e-10 * - 3.1415927); + GHIDRA_INT(((float)((double)GHIDRA_INT(DAT_00c35e8c) + + __uint_to_double_fixup[-(GHIDRA_INT(DAT_00c35e8c) >> 0x1f)]) * 2.3283062e-10 * + 3.1415927)); for (; puVar29 != (undefined4 *)0x0; puVar29 = (undefined4 *)puVar29[6]) { pbVar21 = (byte *)*puVar29; pbVar20 = &DAT_00b66e0c; @@ -2830,7 +2830,7 @@ joined_r0x00992bf5: bVar32 = bVar4 < *pbVar20; if (bVar4 != *pbVar20) { LAB_00992d21: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_00992d26; } if (bVar4 == 0) break; @@ -2851,13 +2851,13 @@ LAB_00992d26: attrValueCapacity = 0xf; attrValueBuf = (byte *******)0x0; ((std::string *)((char *)&attrValueBuf))->std::string::assign(&DAT_00b7d85c,4); - local_14._0_1_ = 0x12; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x12; pbVar19 = pbVar21; do { bVar4 = *pbVar19; pbVar19 = pbVar19 + 1; } while (bVar4 != 0); - ((std::string *)((char *)&attrValueBuf))->std::string::append(pbVar21,(int)pbVar19 - (int)(pbVar21 + 1)); + ((std::string *)((char *)&attrValueBuf))->std::string::append(pbVar21,GHIDRA_INT(pbVar19) - GHIDRA_INT((pbVar21 + 1))); FUN_00417100(); cleanupFlags = cleanupFlags | 8; if (0xf < rayImagePathCapacity) { @@ -2866,13 +2866,13 @@ LAB_00992d26: if (0xfff < uVar8) { pppppppbVar12 = (byte *******)rayImagePathBuf[-1]; uVar8 = rayImagePathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)rayImagePathBuf + (-4 - (int)pppppppbVar12))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(rayImagePathBuf) + (-4 - GHIDRA_INT(pppppppbVar12)))) goto LAB_00993307; } operator_delete(pppppppbVar12,uVar8); } rayImagePathBuf = concatBuf; - concatBuf = (byte *******)((uint)concatBuf & 0xffffff00); + concatBuf = (byte *******)(GHIDRA_UINT(concatBuf) & 0xffffff00); uStack_b0 = uStack_98; uStack_ac = uStack_94; uStack_a8 = uStack_90; @@ -2881,21 +2881,21 @@ LAB_00992d26: concatSize = 0; concatCapacity = 0xf; ((std::string *)((char *)&concatBuf))->std::string::_Tidy_deallocate(); - local_14._0_1_ = 0x11; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x11; if (0xf < attrValueCapacity) { uVar8 = attrValueCapacity + 1; pppppppbVar12 = attrValueBuf; if (0xfff < uVar8) { pppppppbVar12 = (byte *******)attrValueBuf[-1]; uVar8 = attrValueCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)attrValueBuf + (-4 - (int)pppppppbVar12))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(attrValueBuf) + (-4 - GHIDRA_INT(pppppppbVar12)))) goto LAB_00993307; } operator_delete(pppppppbVar12,uVar8); } attrValueSize = 0; attrValueCapacity = 0xf; - attrValueBuf = (byte *******)((uint)attrValueBuf & 0xffffff00); + attrValueBuf = (byte *******)(GHIDRA_UINT(attrValueBuf) & 0xffffff00); } else { pcVar28 = "opacity"; @@ -2908,7 +2908,7 @@ LAB_00992d26: bVar32 = bVar4 < (byte)*pcVar28; if (bVar4 != *pcVar28) { LAB_00992e90: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_00992e95; } if (bVar4 == 0) break; @@ -2939,7 +2939,7 @@ LAB_00992e95: bVar32 = bVar4 < (byte)*pcVar28; if (bVar4 != *pcVar28) { LAB_00992ee4: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_00992ee9; } if (bVar4 == 0) break; @@ -2957,7 +2957,7 @@ LAB_00992ee9: pbVar21 = (byte *)puVar29[1]; } dVar38 = atof((char *)pbVar21); - RStack_101fc._seed = (int)(float)dVar38; + RStack_101fc._seed = GHIDRA_INT((float)dVar38); } } } @@ -2968,15 +2968,15 @@ LAB_00992ee9: pppppppbVar12 = rayImagePathBuf; } pvVar10 = Manager::LoadImage(auStack_10288,(byte *)pppppppbVar12); - local_14._0_1_ = 0x13; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x13; piVar16 = ((KAGE::SmartPointer *)(auStack_10280))->KAGE::SmartPointer::operator_assign(pvVar10); piVar9 = (int *)piVar16[1]; piVar16[1] = RStack_101fc._shift3; piVar25 = (int *)*piVar16; *piVar16 = RStack_101fc._shift2; - RStack_101fc._shift2 = (int)piVar25; - local_14._0_1_ = 0x14; - RStack_101fc._shift3 = (int)piVar9; + RStack_101fc._shift2 = GHIDRA_INT(piVar25); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x14; + RStack_101fc._shift3 = GHIDRA_INT(piVar9); if (piStack_1027c != (int *)0x0) { cVar5 = (**(code **)(*piStack_1027c + 0xc))(); if ((cVar5 != '\0') && (g_imageReleaseFn != (void *)0x0)) { @@ -2984,7 +2984,7 @@ LAB_00992ee9: } piVar25 = (int *)RStack_101fc._shift2; } - local_14._0_1_ = 0x15; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x15; if (piStack_10284 != (int *)0x0) { cVar5 = (**(code **)(*piStack_10284 + 0xc))(); if ((cVar5 != '\0') && (g_imageReleaseFn != (void *)0x0)) { @@ -2992,7 +2992,7 @@ LAB_00992ee9: } piVar25 = (int *)RStack_101fc._shift2; } - local_14 = CONCAT31(local_14._1_3_,0x11); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x11); if ((piVar25 != (int *)0x0) && ((piVar25[0xe] != 1 || (piVar25[0xf] != 1)))) { (**(code **)(*piVar25 + 0x48))(1); piVar25[0xe] = 1; @@ -3024,20 +3024,20 @@ LAB_00992ee9: } pfStack_10238 = pfStack_10238 + 5; } - local_14._0_1_ = 0x16; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x16; if ((((int *)RStack_101fc._shift3 != (int *)0x0) && (cVar5 = (**(code **)(*(int *)RStack_101fc._shift3 + 0xc))(), cVar5 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(); } - local_14._0_1_ = 0xf; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xf; if (0xf < rayImagePathCapacity) { uVar8 = rayImagePathCapacity + 1; pppppppbVar12 = rayImagePathBuf; if (0xfff < uVar8) { pppppppbVar12 = (byte *******)rayImagePathBuf[-1]; uVar8 = rayImagePathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)rayImagePathBuf + (-4 - (int)pppppppbVar12))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(rayImagePathBuf) + (-4 - GHIDRA_INT(pppppppbVar12)))) goto LAB_00993307; } operator_delete(pppppppbVar12,uVar8); @@ -3052,10 +3052,10 @@ LAB_00992ee9: if (iVar7 != 0) { RStack_101fc._seed = *(int *)(iVar7 + 0x58); } - RStack_101fc._shift3 = (int)&DAT_00000007; + RStack_101fc._shift3 = GHIDRA_INT(&DAT_00000007); RStack_101fc._shift1 = 5; RStack_101fc._shift2 = 9; - uVar8 = ((int)pfVar26[1] - (int)*pfVar26) / 0x2c; + uVar8 = (GHIDRA_INT(pfVar26[1]) - GHIDRA_INT(*pfVar26)) / 0x2c; if (uVar8 != 0) { uVar8 = ((RNG *)(&RStack_101fc))->RNG::RandomInt(uVar8); game = g_game; @@ -3071,18 +3071,18 @@ LAB_00992ee9: uVar39 = CONCAT44(pvVar10,0x9932bc); ((FXParams *)(&pFVar24->_fxParams))->FXParams::operator_assign(pvVar10); pvVar10 = xml_node::first_node - (document,(byte *)"fxParams",(int)uVar39,(byte)((ulonglong)uVar39 >> 0x20)); + (document,(byte *)"fxParams",GHIDRA_INT(uVar39),(byte)((ulonglong)uVar39 >> 0x20)); if (pvVar10 != (void *)0x0) { parse_fx_params_node(pFVar24,pvVar10); } - local_14._0_1_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; if (0xf < gfxPath._capacity) { uVar8 = gfxPath._capacity + 1; - psVar22 = (std_string *)gfxPath._buf._0_4_; + psVar22 = (*(undefined4 *)((char *)&((std_string *)gfxPath._buf) + 0x0)); if (0xfff < uVar8) { - psVar22 = (std_string *)((std_string *)(gfxPath._buf._0_4_ + -0x18))->_capacity; + psVar22 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) + -0x18))->_capacity; uVar8 = gfxPath._capacity + 0x24; - if ((byte *)0x1f < (byte *)(gfxPath._buf._0_4_ + (-4 - (int)psVar22))) goto LAB_00993307; + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar22)))) goto LAB_00993307; } operator_delete(psVar22,uVar8); } @@ -3091,25 +3091,25 @@ LAB_00992ee9: local_14 = 0x18; tracked_alloc(1,pbStack_1021c,0); iVar7 = 0; - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; veinsSprite = (ANM2 *)&(*(undefined1 *)((char *)(pFStack_101e0) + 0x2c8)); do { gfxPath._size = 0; gfxPath._capacity = 0xf; - gfxPath._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) = (std_string *)0x0; ((std::string *)(gfxPath._buf))->std::string::assign((byte *)"gfx/Veins.anm2",0xe); local_14 = 0x19; ((ANM2 *)(veinsSprite))->ANM2::Load(&gfxPath,1); - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; if (0xf < gfxPath._capacity) { uVar8 = gfxPath._capacity + 1; - psVar22 = (std_string *)gfxPath._buf._0_4_; + psVar22 = (*(undefined4 *)((char *)&((std_string *)gfxPath._buf) + 0x0)); if (0xfff < uVar8) { - psVar22 = (std_string *)((std_string *)(gfxPath._buf._0_4_ + -0x18))->_capacity; + psVar22 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) + -0x18))->_capacity; uVar8 = gfxPath._capacity + 0x24; - if ((byte *)0x1f < (byte *)(gfxPath._buf._0_4_ + (-4 - (int)psVar22))) { + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar22)))) { LAB_00993307: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3142,7 +3142,7 @@ LAB_00993307: fVar35 = *(float *)&(*(undefined1 *)((char *)(pFVar24) + 0xb8)) - fVar30; fVar34 = (float)pfStack_101ec - fVar1; fVar36 = fVar35 + fVar35; - fVar33 = (fVar34 + fVar34 + fVar36) * ((float)(int)pfStack_101e8 / 10.0); + fVar33 = (fVar34 + fVar34 + fVar36) * ((float)GHIDRA_INT(pfStack_101e8) / 10.0); if (fVar35 <= fVar33) { if (fVar34 + fVar35 <= fVar33) { if (fVar34 + fVar36 <= fVar33) { @@ -3169,7 +3169,7 @@ LAB_00993307: } ((RNG *)((RNG *)&DAT_00c35e8c))->RNG::Next(); pfStack_101ec = pfVar26 + -0xb; - *pfStack_101ec = (float)((uint)DAT_00c35e8c & 1); + *pfStack_101ec = (float)(GHIDRA_UINT(DAT_00c35e8c) & 1); if (pfVar26 != (float *)&DAT_0000002c) { pfVar26 = pfVar26 + -10; iVar7 = 3; @@ -3187,10 +3187,10 @@ LAB_00993307: && (*(int *)((char *)g_game->_room + 8) == 5)) { grow_vein_branches(pFStack_101e0,pfStack_101ec); } - pfStack_101e8 = (float *)((int)pfVar27 + 1); + pfStack_101e8 = (float *)(GHIDRA_INT(pfVar27) + 1); pfStack_101e4 = pfVar26 + 0xd; pFVar24 = pFStack_101e0; - } while ((int)pfStack_101e8 < 10); + } while (GHIDRA_INT(pfStack_101e8) < 10); pFStack_101e0->_poopFxCountdown = 0; ((Color *)((Color *)&(*(undefined1 *)((char *)(pFStack_101e0) + 0x84))))->Color::Reset(); pFStack_101e0->_loaded = 1; @@ -3217,9 +3217,9 @@ LAB_00991915: pcVar28 = (char *)puStack_101d8[2]; } if (pcVar28 == pcVar31 + -0xb66feb) { - pbVar19 = (byte *)(pcVar28 + (int)pbVar21); + pbVar19 = (byte *)(pcVar28 + GHIDRA_INT(pbVar21)); if (pbVar19 <= pbVar21) goto LAB_00991993; - iVar7 = (int)&DAT_00b66fec - (int)pbVar21; + iVar7 = GHIDRA_INT(&DAT_00b66fec) - GHIDRA_INT(pbVar21); while (*pbVar21 == pbVar21[iVar7]) { pbVar21 = pbVar21 + 1; if (pbVar19 <= pbVar21) goto LAB_00991993; @@ -3233,7 +3233,7 @@ LAB_00991993: tokenCapacity = 0xf; tokenSize = 0; tokenBuf = (byte *******)0x0; - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; puVar29 = (undefined4 *)puStack_101d8[8]; piStack_101dc = (int *)0x1; if (puVar29 != (undefined4 *)0x0) { @@ -3249,7 +3249,7 @@ LAB_00991993: bVar32 = bVar4 < *pbVar20; if (bVar4 != *pbVar20) { LAB_00991a06: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_00991a0b; } if (bVar4 == 0) break; @@ -3271,14 +3271,14 @@ LAB_00991a0b: bVar4 = *pbVar19; pbVar19 = pbVar19 + 1; } while (bVar4 != 0); - psVar22 = (std_string *)(pbVar19 + -(int)(pbVar21 + 1)); + psVar22 = (std_string *)(pbVar19 + -GHIDRA_INT((pbVar21 + 1))); if ((std_string *)(0x7fffffff - gfxPath._size) < psVar22) goto LAB_00993701; psVar13 = &gfxPath; if (0xf < gfxPath._capacity) { - psVar13 = (std_string *)gfxPath._buf._0_4_; + psVar13 = (*(undefined4 *)((char *)&((std_string *)gfxPath._buf) + 0x0)); } - ((std::string *)((char *)&attrValueBuf))->std::string::concat((int)pfStack_101ec,psVar22,(byte *)psVar13, - gfxPath._size,pbVar21,(uint)psVar22); + ((std::string *)((char *)&attrValueBuf))->std::string::concat(GHIDRA_INT(pfStack_101ec),psVar22,(byte *)psVar13, + gfxPath._size,pbVar21,GHIDRA_UINT(psVar22)); cleanupFlags = cleanupFlags | 2; if (0xf < tokenCapacity) { uVar8 = tokenCapacity + 1; @@ -3286,13 +3286,13 @@ LAB_00991a0b: if (0xfff < uVar8) { pppppppbVar12 = (byte *******)tokenBuf[-1]; uVar8 = tokenCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)tokenBuf + (-4 - (int)pppppppbVar12))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(tokenBuf) + (-4 - GHIDRA_INT(pppppppbVar12)))) goto LAB_00993307; } operator_delete(pppppppbVar12,uVar8); } tokenBuf = attrValueBuf; - attrValueBuf = (byte *******)((uint)attrValueBuf & 0xffffff00); + attrValueBuf = (byte *******)(GHIDRA_UINT(attrValueBuf) & 0xffffff00); uStack_80 = uStack_38; uStack_7c = uStack_34; uStack_78 = uStack_30; @@ -3313,7 +3313,7 @@ LAB_00991a0b: bVar32 = bVar4 < (byte)*pcVar28; if (bVar4 != *pcVar28) { LAB_00991b46: - uVar8 = -(uint)bVar32 | 1; + uVar8 = -GHIDRA_UINT(bVar32) | 1; goto LAB_00991b4b; } if (bVar4 == 0) break; @@ -3348,14 +3348,14 @@ LAB_00991b4b: psStack_1020c = psVar22 + 1; } } - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; if (0xf < tokenCapacity) { uVar8 = tokenCapacity + 1; pppppppbVar12 = tokenBuf; if (0xfff < uVar8) { pppppppbVar12 = (byte *******)tokenBuf[-1]; uVar8 = tokenCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)tokenBuf + (-4 - (int)pppppppbVar12))) goto LAB_00993307; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(tokenBuf) + (-4 - GHIDRA_INT(pppppppbVar12)))) goto LAB_00993307; } operator_delete(pppppppbVar12,uVar8); } @@ -3363,8 +3363,8 @@ LAB_00991b4b: } while (puStack_101d8 != (undefined4 *)0x0); } psVar22 = psStack_1020c; - iVar7 = (int)psStack_1020c - (int)psStack_10210 >> 0x1f; - if (((int)psStack_1020c - (int)psStack_10210) / 0x18 + iVar7 == iVar7) { + iVar7 = GHIDRA_INT(psStack_1020c) - GHIDRA_INT(psStack_10210) >> 0x1f; + if ((GHIDRA_INT(psStack_1020c) - GHIDRA_INT(psStack_10210)) / 0x18 + iVar7 == iVar7) { if (psStack_1020c == psStack_10204) { vector_string_emplace_reallocate(&psStack_10210,psStack_1020c,&layerPathBuf); psStack_10204 = psStack_10208; @@ -3376,7 +3376,7 @@ LAB_00991b4b: } pFVar24 = pFStack_101e0; pcVar28 = (char *)*(undefined8 *)&(*(undefined1 *)((char *)(pFStack_101e0) + 0xc)); - bVar4 = stage_matches((int)fStack_10248,(uint)fStack_10244,*(int *)&(*(undefined1 *)((char *)(pFStack_101e0) + 0xc)), + bVar4 = stage_matches(GHIDRA_INT(fStack_10248),GHIDRA_UINT(fStack_10244),*(int *)&(*(undefined1 *)((char *)(pFStack_101e0) + 0xc)), *(int *)&(*(undefined1 *)((char *)(pFStack_101e0) + 0x10))); if (((bVar4 == 0) || ((pfStack_10238 != (float *)0x0 && (*(float **)&(*(undefined1 *)((char *)(pFVar24) + 0x14)) != pfStack_10238)))) || @@ -3389,11 +3389,11 @@ LAB_00991b4b: fVar30 = *(float *)(iVar7 + 0x58); } piStack_101dc = (int *)&DAT_00000007; - RStack_101fc._shift3 = (int)&DAT_00000007; + RStack_101fc._shift3 = GHIDRA_INT(&DAT_00000007); pvVar10 = *(void **)&(*(undefined1 *)((char *)(pFVar24) + 0x1c)); RStack_101fc._shift1 = 5; RStack_101fc._shift2 = 9; - RStack_101fc._seed = (int)fVar30; + RStack_101fc._seed = GHIDRA_INT(fVar30); if (pvVar10 == *(void **)&(*(undefined1 *)((char *)(pFVar24) + 0x20))) { std::vector::_Emplace_reallocate(pvVar10,auStack_10278); } @@ -3404,16 +3404,16 @@ LAB_00991b4b: imagePath._size = 0; puStack_101d8 = *(undefined4 **)&(*(undefined1 *)((char *)(pFVar24) + 0x1c)); imagePath._capacity = 0xf; - imagePath._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(imagePath._buf) + 0x0)) = (std_string *)0x0; ((std::string *)(imagePath._buf))->std::string::assign(&s_empty,0); psVar22 = psStack_10210; - local_14._0_1_ = 8; - uVar8 = ((int)psStack_1020c - (int)psStack_10210) / 0x18; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; + uVar8 = (GHIDRA_INT(psStack_1020c) - GHIDRA_INT(psStack_10210)) / 0x18; if (uVar8 != 0) { uVar8 = ((RNG *)(&RStack_101fc))->RNG::RandomInt(uVar8); psVar22 = psVar22 + uVar8; if (&imagePath != psVar22) { - iVar7 = (int)&psVar22->_size; + iVar7 = GHIDRA_INT(&psVar22->_size); if (0xf < psVar22->_capacity) { psVar22 = *(std_string **)psVar22->_buf; } @@ -3424,10 +3424,10 @@ LAB_00991b4b: } psVar22 = &imagePath; if (0xf < imagePath._capacity) { - psVar22 = (std_string *)imagePath._buf._0_4_; + psVar22 = (*(undefined4 *)((char *)&((std_string *)imagePath._buf) + 0x0)); } pvVar10 = Manager::LoadImage(auStack_10280,(byte *)psVar22); - local_14._0_1_ = 9; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; dVar38 = (double)CONCAT44(pvVar10,0x991db0); puVar14 = ((KAGE::SmartPointer *)(auStack_10288))->KAGE::SmartPointer::operator_assign(pvVar10); puVar29 = puStack_101d8; @@ -3437,7 +3437,7 @@ LAB_00991b4b: uVar6 = *puVar14; *puVar14 = puStack_101d8[-0x12]; puStack_101d8[-0x12] = uVar6; - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; if (piStack_10284 != (int *)0x0) { dVar38 = (double)CONCAT44(0x991de9,SUB84(dVar38,0)); cVar5 = (**(code **)(*piStack_10284 + 0xc))(); @@ -3446,7 +3446,7 @@ LAB_00991b4b: (*g_imageReleaseFn)(); } } - local_14._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; if (piStack_1027c != (int *)0x0) { dVar38 = (double)CONCAT44(0x991e17,SUB84(dVar38,0)); cVar5 = (**(code **)(*piStack_1027c + 0xc))(); @@ -3455,7 +3455,7 @@ LAB_00991b4b: (*g_imageReleaseFn)(); } } - local_14 = CONCAT31(local_14._1_3_,8); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),8); pfStack_101e8 = (float *)puVar29[-0x12]; if (pfStack_101e8 == (float *)0x0) { pcVar28 = "[warn] failed to load %s\n"; @@ -3464,7 +3464,7 @@ LAB_00991b4b: else { if ((pfStack_101e8[0xe] != 0.0) || (pfStack_101e8[0xf] != 0.0)) { dVar38 = 0.0; - (**(code **)((int)*pfStack_101e8 + 0x48))(); + (**(code **)(GHIDRA_INT(*pfStack_101e8) + 0x48))(); pfStack_101e8[0xe] = 0.0; pfStack_101e8[0xf] = 0.0; } @@ -3472,21 +3472,21 @@ LAB_00991b4b: ((pfStack_101e8 = (float *)puVar29[-0x12], pfStack_101e8[0xc] != 1.4013e-45 || (pfStack_101e8[0xd] != 1.4013e-45)))) { dVar38 = 2.12199579145934e-314; - (**(code **)((int)*pfStack_101e8 + 0x44))(); + (**(code **)(GHIDRA_INT(*pfStack_101e8) + 0x44))(); pfStack_101e8[0xc] = 1.4013e-45; pfStack_101e8[0xd] = 1.4013e-45; } pfStack_101e4 = (float *)puStack_101d8[-0xd]; - pfStack_101e8 = (float *)((int)(puVar29[-0xf] - puVar29[-0x10]) / 0x14); + pfStack_101e8 = (float *)(GHIDRA_INT((puVar29[-0xf] - puVar29[-0x10])) / 0x14); if (pfStack_101e4 < pfStack_101e8) { - iVar7 = puVar29[-0x10] + (int)pfStack_101e4 * 0x14; + iVar7 = puVar29[-0x10] + GHIDRA_INT(pfStack_101e4) * 0x14; LAB_00991f42: puVar29[-0xf] = iVar7; } else if (pfStack_101e8 < pfStack_101e4) { - if (pfStack_101e4 <= (float *)((int)(puVar29[-0xe] - puVar29[-0x10]) / 0x14)) { - dVar38 = (double)CONCAT44(pfStack_101e8,(int)pfStack_101e4 - (int)pfStack_101e8); - iVar7 = FUN_009981d0(puVar29[-0xf],(int)pfStack_101e4 - (int)pfStack_101e8,pfStack_101e8); + if (pfStack_101e4 <= (float *)(GHIDRA_INT((puVar29[-0xe] - puVar29[-0x10])) / 0x14)) { + dVar38 = (double)CONCAT44(pfStack_101e8,GHIDRA_INT(pfStack_101e4) - GHIDRA_INT(pfStack_101e8)); + iVar7 = FUN_009981d0(puVar29[-0xf],GHIDRA_INT(pfStack_101e4) - GHIDRA_INT(pfStack_101e8),pfStack_101e8); goto LAB_00991f42; } dVar38 = (double)CONCAT44(&pfStack_101e8,pfStack_101e4); @@ -3494,7 +3494,7 @@ LAB_00991f42: } pcVar28 = SUB84(dVar38,0); pfStack_101e8 = (float *)0x0; - if (0 < (int)puStack_101d8[-0xd]) { + if (0 < GHIDRA_INT(puStack_101d8[-0xd])) { iVar7 = 0; do { if (fVar30 == 0.0) { @@ -3504,13 +3504,13 @@ LAB_00991f42: return; } bVar4 = (byte)RStack_101fc._shift1; - uVar8 = (uint)fVar30 >> (bVar4 & 0x1f) ^ (uint)fVar30; + uVar8 = GHIDRA_UINT(fVar30) >> (bVar4 & 0x1f) ^ GHIDRA_UINT(fVar30); bVar17 = (byte)RStack_101fc._shift2; uVar8 = uVar8 << (bVar17 & 0x1f) ^ uVar8; bVar18 = (byte)piStack_101dc; uVar8 = uVar8 >> (bVar18 & 0x1f) ^ uVar8; *(float *)(puStack_101d8[-0x10] + 8 + iVar7) = - (float)((double)(int)uVar8 + __uint_to_double_fixup[-((int)uVar8 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar8) + __uint_to_double_fixup[-(GHIDRA_INT(uVar8) >> 0x1f)]) * 2.3283062e-10 * ((float)puStack_101d8[-0xb] - (float)puStack_101d8[-0xc]) + (float)puStack_101d8[-0xc]; if (uVar8 == 0) { @@ -3524,7 +3524,7 @@ LAB_00991f42: fVar30 = (float)(uVar8 >> (bVar18 & 0x1f) ^ uVar8); *(float *)(puStack_101d8[-0x10] + 0xc + iVar7) = ((float)puStack_101d8[-9] - (float)puStack_101d8[-10]) * - (float)((double)(int)fVar30 + __uint_to_double_fixup[-((int)fVar30 >> 0x1f)]) * + (float)((double)GHIDRA_INT(fVar30) + __uint_to_double_fixup[-(GHIDRA_INT(fVar30) >> 0x1f)]) * 2.3283062e-10 + (float)puStack_101d8[-10]; if (*(char *)((char *)puStack_101d8 + -0x13) == '\0') { if (*(char *)(puStack_101d8 + -1) == '\0') { @@ -3534,13 +3534,13 @@ LAB_00991f42: (*pcVar2)(); return; } - uVar8 = (uint)fVar30 >> (bVar4 & 0x1f) ^ (uint)fVar30; + uVar8 = GHIDRA_UINT(fVar30) >> (bVar4 & 0x1f) ^ GHIDRA_UINT(fVar30); uVar8 = uVar8 << (bVar17 & 0x1f) ^ uVar8; pfStack_101e4 = (float *)(uVar8 >> (bVar18 & 0x1f) ^ uVar8); piVar9 = puStack_101d8 + -0x10; *(float *)(*piVar9 + iVar7) = - (float)((double)(int)pfStack_101e4 + - __uint_to_double_fixup[-((int)pfStack_101e4 >> 0x1f)]) * 2.3283062e-10 * + (float)((double)GHIDRA_INT(pfStack_101e4) + + __uint_to_double_fixup[-(GHIDRA_INT(pfStack_101e4) >> 0x1f)]) * 2.3283062e-10 * (float)((double)*(int *)(puStack_101d8[-0x12] + 0x10) + __uint_to_double_fixup[-(*(int *)(puStack_101d8[-0x12] + 0x10) >> 0x1f)]); if (pfStack_101e4 == (float *)0x0) { @@ -3549,12 +3549,12 @@ LAB_00991f42: (*pcVar2)(); return; } - uVar8 = (uint)pfStack_101e4 >> (bVar4 & 0x1f) ^ (uint)pfStack_101e4; + uVar8 = GHIDRA_UINT(pfStack_101e4) >> (bVar4 & 0x1f) ^ GHIDRA_UINT(pfStack_101e4); uVar8 = uVar8 << (bVar17 & 0x1f) ^ uVar8; pfStack_101e4 = (float *)(uVar8 >> (bVar18 & 0x1f) ^ uVar8); *(float *)(*piVar9 + 4 + iVar7) = - (float)((double)(int)pfStack_101e4 + - __uint_to_double_fixup[-((int)pfStack_101e4 >> 0x1f)]) * 2.3283062e-10 * + (float)((double)GHIDRA_INT(pfStack_101e4) + + __uint_to_double_fixup[-(GHIDRA_INT(pfStack_101e4) >> 0x1f)]) * 2.3283062e-10 * (float)((double)*(int *)(puStack_101d8[-0x12] + 0x14) + __uint_to_double_fixup[-(*(int *)(puStack_101d8[-0x12] + 0x14) >> 0x1f)]); if (pfStack_101e4 == (float *)0x0) { @@ -3563,12 +3563,12 @@ LAB_00991f42: (*pcVar2)(); return; } - uVar8 = (uint)pfStack_101e4 >> (bVar4 & 0x1f) ^ (uint)pfStack_101e4; + uVar8 = GHIDRA_UINT(pfStack_101e4) >> (bVar4 & 0x1f) ^ GHIDRA_UINT(pfStack_101e4); uVar8 = uVar8 << (bVar17 & 0x1f) ^ uVar8; pfStack_101e4 = (float *)(uVar8 >> (bVar18 & 0x1f) ^ uVar8); *(bool *)(*piVar9 + 0x10 + iVar7) = - (float)((double)(int)pfStack_101e4 + - __uint_to_double_fixup[-((int)pfStack_101e4 >> 0x1f)]) * 2.3283062e-10 < 0.5 + (float)((double)GHIDRA_INT(pfStack_101e4) + + __uint_to_double_fixup[-(GHIDRA_INT(pfStack_101e4) >> 0x1f)]) * 2.3283062e-10 < 0.5 ; if (pfStack_101e4 == (float *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -3576,11 +3576,11 @@ LAB_00991f42: (*pcVar2)(); return; } - uVar8 = (uint)pfStack_101e4 >> (bVar4 & 0x1f) ^ (uint)pfStack_101e4; + uVar8 = GHIDRA_UINT(pfStack_101e4) >> (bVar4 & 0x1f) ^ GHIDRA_UINT(pfStack_101e4); uVar8 = uVar8 << (bVar17 & 0x1f) ^ uVar8; fVar30 = (float)(uVar8 >> (bVar18 & 0x1f) ^ uVar8); *(bool *)(puStack_101d8[-0x10] + 0x11 + iVar7) = - (float)((double)(int)fVar30 + __uint_to_double_fixup[-((int)fVar30 >> 0x1f)]) * + (float)((double)GHIDRA_INT(fVar30) + __uint_to_double_fixup[-(GHIDRA_INT(fVar30) >> 0x1f)]) * 2.3283062e-10 < 0.5; } else { @@ -3616,56 +3616,56 @@ LAB_00991f42: } pcVar28 = SUB84(dVar38,0); iVar7 = iVar7 + 0x14; - pfStack_101e8 = (float *)((int)pfStack_101e8 + 1); - } while ((int)pfStack_101e8 < (int)puStack_101d8[-0xd]); + pfStack_101e8 = (float *)(GHIDRA_INT(pfStack_101e8) + 1); + } while (GHIDRA_INT(pfStack_101e8) < GHIDRA_INT(puStack_101d8[-0xd])); } } - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; if (0xf < imagePath._capacity) { uVar8 = imagePath._capacity + 1; - pcVar28 = (char *)imagePath._buf._0_4_; + pcVar28 = (*(undefined4 *)((char *)&((char *)imagePath._buf) + 0x0)); if (0xfff < uVar8) { - pcVar28 = (char *)((std_string *)(imagePath._buf._0_4_ + -0x18))->_capacity; + pcVar28 = (char *)((std_string *)((*(undefined4 *)((char *)&(imagePath._buf) + 0x0)) + -0x18))->_capacity; uVar8 = imagePath._capacity + 0x24; - if ((byte *)0x1f < (byte *)(imagePath._buf._0_4_ + (-4 - (int)pcVar28))) goto LAB_00993307; + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(imagePath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar28)))) goto LAB_00993307; } operator_delete(pcVar28,uVar8); } imagePath._size = 0; imagePath._capacity = 0xf; - imagePath._buf._0_4_ = imagePath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(imagePath._buf) + 0x0)) = (*(undefined4 *)((char *)&(imagePath._buf) + 0x0)) & 0xffffff00; LAB_009924a0: uVar39 = CONCAT44(0x9924ab,pcVar28); FID_conflict__Tidy(auStack_1026c); - local_14._0_1_ = 0xc; - if ((int *)auStack_10278._8_4_ != (int *)0x0) { - uVar39 = CONCAT44(0x9924c0,(int)uVar39); - cVar5 = (**(code **)(*(int *)auStack_10278._8_4_ + 0xc))(); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; + if ((*(undefined4 *)((char *)&((int *)auStack_10278) + 0x8)) != (int *)0x0) { + uVar39 = CONCAT44(0x9924c0,GHIDRA_INT(uVar39)); + cVar5 = (**(code **)(*(*(undefined4 *)((char *)&((int *)auStack_10278) + 0x8)) + 0xc))(); if ((cVar5 != '\0') && (g_imageReleaseFn != (void *)0x0)) { uVar39 = 0x9924d6; (*g_imageReleaseFn)(); } } - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < layerPathCapacity) { uVar8 = layerPathCapacity + 1; pppppppbVar12 = layerPathBuf; if (0xfff < uVar8) { pppppppbVar12 = (byte *******)layerPathBuf[-1]; uVar8 = layerPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)layerPathBuf + (-4 - (int)pppppppbVar12))) goto LAB_00993307; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(layerPathBuf) + (-4 - GHIDRA_INT(pppppppbVar12)))) goto LAB_00993307; } uVar39 = CONCAT44(uVar8,pppppppbVar12); operator_delete(pppppppbVar12,uVar8); } psVar13 = psStack_1020c; - local_14 = CONCAT31(local_14._1_3_,1); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); psVar22 = psStack_10210; if (psStack_10210 != (std_string *)0x0) { for (; psVar22 != psVar13; psVar22 = psVar22 + 1) { ((std::string *)(psVar22->_buf))->std::string::_Tidy_deallocate(); } - uVar8 = ((int)psStack_10204 - (int)psStack_10210) / 0x18; + uVar8 = (GHIDRA_INT(psStack_10204) - GHIDRA_INT(psStack_10210)) / 0x18; uVar39 = CONCAT44(uVar8,psStack_10210); deallocate(psStack_10210,uVar8); psStack_10210 = (std_string *)0x0; @@ -3682,22 +3682,22 @@ LAB_00993141: } else { FXLayerGroup::copy_constructor(pvVar10,&fStack_10258); - pfVar26[1] = (float)((int)pfVar26[1] + 0x2c); + pfVar26[1] = (float)(GHIDRA_INT(pfVar26[1]) + 0x2c); } } std::vector::_Tidy(); - local_14._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xd; if (&DAT_0000000f < local_e4._capacity) { puVar23 = (undefined1 *)(local_e4._capacity + 1); - pvVar10 = (void *)local_e4._buf._0_4_; + pvVar10 = (*(undefined4 *)((char *)&((void *)local_e4._buf) + 0x0)); if ((undefined1 *)0xfff < puVar23) { - pvVar10 = *(void **)(local_e4._buf._0_4_ + -4); + pvVar10 = *(void **)((*(undefined4 *)((char *)&(local_e4._buf) + 0x0)) + -4); puVar23 = (undefined1 *)(local_e4._capacity + 0x24); - if (0x1f < (uint)(local_e4._buf._0_4_ + (-4 - (int)pvVar10))) goto LAB_00993307; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_e4._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar10))))) goto LAB_00993307; } - operator_delete(pvVar10,(uint)puVar23); + operator_delete(pvVar10,GHIDRA_UINT(puVar23)); } - local_14 = CONCAT31(local_14._1_3_,1); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); std::vector<20byte>::_Tidy(); psStack_10204 = (std_string *)psStack_10204[1]._capacity; game = g_game; @@ -3723,7 +3723,7 @@ void FXLayers::clear() FXParams defaultParams [2]; uint local_c; - local_c = __security_cookie ^ (uint)auStack_c4; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_c4); *(undefined1 *)(in_ECX + 8) = 0; iVar4 = *(int *)(in_ECX + 0x28); iVar3 = *(int *)(in_ECX + 0x24); @@ -3746,13 +3746,13 @@ void FXLayers::clear() local_bc = local_bc + 0x14; entryIndex = entryIndex + 1; } while (entryIndex < - (uint)((*(int *)(layerOffset + 0x20 + iVar3) - *(int *)(layerOffset + 0x1c + iVar3) - ) / 0x14)); + GHIDRA_UINT(((*(int *)(layerOffset + 0x20 + iVar3) - *(int *)(layerOffset + 0x1c + iVar3) + ) / 0x14))); } iVar4 = *(int *)(in_ECX + 0x28); - local_c0 = (undefined4 *)((int)local_c0 + 1); + local_c0 = (undefined4 *)(GHIDRA_INT(local_c0) + 1); layerOffset = layerOffset + 0x2c; - } while (local_c0 < (uint)((iVar4 - iVar3) / 0x2c)); + } while (local_c0 < GHIDRA_UINT(((iVar4 - iVar3) / 0x2c))); local_bc = iVar4; } if (iVar3 != iVar4) { @@ -3766,7 +3766,7 @@ void FXLayers::clear() iVar4 = *(int *)(in_ECX + 0x18); local_c0 = (undefined4 *)0x0; uVar2 = *(int *)(in_ECX + 0x1c) - iVar4; - if ((int)uVar2 / 0x4c + ((int)uVar2 >> 0x1f) != (int)uVar2 >> 0x1f) { + if (GHIDRA_INT(uVar2) / 0x4c + (GHIDRA_INT(uVar2) >> 0x1f) != GHIDRA_INT(uVar2) >> 0x1f) { iVar3 = 0; do { smartPtr = (int *)(iVar4 + 4 + iVar3); @@ -3775,9 +3775,9 @@ void FXLayers::clear() } iVar4 = *(int *)(in_ECX + 0x18); iVar3 = iVar3 + 0x4c; - uVar2 = (int)local_c0 + 1; + uVar2 = GHIDRA_INT(local_c0) + 1; local_c0 = (undefined4 *)uVar2; - } while (uVar2 < (uint)((*(int *)(in_ECX + 0x1c) - iVar4) / 0x4c)); + } while (uVar2 < GHIDRA_UINT(((*(int *)(in_ECX + 0x1c) - iVar4) / 0x4c))); } std::_Destroy_range(uVar2); *(undefined4 *)(in_ECX + 0x1c) = *(undefined4 *)(in_ECX + 0x18); @@ -3892,7 +3892,7 @@ void FXLayers::render_layer(int layerIndex) tiles = *(int *)(iVar3 + 0xc); quadLeft = ((*(float *)((char *)g_game->_room + 0x1204) + (g_game->_screenShakeOffset).x) - (float)(dVar5 + __uint_to_double_fixup[-iVar1]) * 0.5) + screenOffsetX; - isFlipX = *(char *)(tiles + 0x10 + (int)local_18); + isFlipX = *(char *)(tiles + 0x10 + GHIDRA_INT(local_18)); quadTop = (((g_game->_screenShakeOffset).y + *(float *)((char *)g_game->_room + 0x1208)) - (float)((double)*(int *)(tiles + 0x14) + __uint_to_double_fixup[-(*(int *)(tiles + 0x14) >> 0x1f)]) * 0.5) + @@ -3900,7 +3900,7 @@ void FXLayers::render_layer(int layerIndex) if (isFlipX != '\0') { quadLeft = quadLeft * -1.0; } - if (*(char *)(tiles + 0x11 + (int)local_18) == '\0') { + if (*(char *)(tiles + 0x11 + GHIDRA_INT(local_18)) == '\0') { quadBottom = g_screenHeight; } else { @@ -3911,13 +3911,13 @@ void FXLayers::render_layer(int layerIndex) if (isFlipX != '\0') { quadRight = -g_screenWidth; } - quadLeft = *(float *)(tiles + (int)local_18) - quadLeft; - quadTop = *(float *)(tiles + 4 + (int)local_18) - quadTop; + quadLeft = *(float *)(tiles + GHIDRA_INT(local_18)) - quadLeft; + quadTop = *(float *)(tiles + 4 + GHIDRA_INT(local_18)) - quadTop; quadRight = quadLeft + quadRight; quadBottom = quadTop + quadBottom; } fVar4 = 0.0; - local_20 = CONCAT31(local_20._1_3_,1); + local_20 = CONCAT31((*(undefined1 *)((char *)&(local_20) + 0x1)),1); quadTopLeftX = quadLeft; quadTopLeftY = quadTop; quadTopRightY = quadTop; @@ -3984,9 +3984,9 @@ LAB_0099461a: tiles = **(int **)(iVar3 + 4); } (**(code **)(tiles + 0x14))(&quadTopLeftX,renderQuad); - local_18 = (FXLayers *)((int)local_18 + 0x14); - local_1c = (float)((int)local_1c + 1); - } while ((int)local_1c < *(int *)(iVar3 + 0x18)); + local_18 = (FXLayers *)(GHIDRA_INT(local_18) + 0x14); + local_1c = (float)(GHIDRA_INT(local_1c) + 1); + } while (GHIDRA_INT(local_1c) < *(int *)(iVar3 + 0x18)); activeShader = g_currentShader; } if ((prevShader != (void *)0x0) && @@ -4038,7 +4038,7 @@ void FXLayers::render_behind_layers() savedBlend0 = *(int *)&(*(undefined1 *)((char *)(in_ECX) + 0x18)); layerOffset = layerOffset + 0x4c; layerIndex = layerIndex + 1; - } while (layerIndex < (uint)((*(int *)&(*(undefined1 *)((char *)(in_ECX) + 0x1c)) - savedBlend0) / 0x4c)); + } while (layerIndex < GHIDRA_UINT(((*(int *)&(*(undefined1 *)((char *)(in_ECX) + 0x1c)) - savedBlend0) / 0x4c))); } } g_graphicsManager_blendMode[0] = savedBlend0; @@ -4091,7 +4091,7 @@ void FXLayers::render_background_layers() savedBlend1 = *(int *)&(*(undefined1 *)((char *)(in_ECX) + 0x18)); layerOffset = layerOffset + 0x4c; layerIndex = layerIndex + 1; - } while (layerIndex < (uint)((*(int *)&(*(undefined1 *)((char *)(in_ECX) + 0x1c)) - savedBlend1) / 0x4c)); + } while (layerIndex < GHIDRA_UINT(((*(int *)&(*(undefined1 *)((char *)(in_ECX) + 0x1c)) - savedBlend1) / 0x4c))); } } g_graphicsManager_blendMode[0] = savedBlend0; @@ -4186,18 +4186,18 @@ void FXLayers::Render() byte hashChar; FXLayers *layers; - local_14 = __security_cookie ^ (uint)auStack_1c8; + local_14 = __security_cookie ^ GHIDRA_UINT(auStack_1c8); pvVar13 = g_game->_room; local_1b0 = this; if ((*(int *)((char *)pvVar13 + 0x1d18) == 0x39) && (local_1ac = 0.0, *(int *)((char *)pvVar13 + 0x1264) != 0)) { do { - piVar4 = *(int **)(*(int *)((char *)pvVar13 + 0x125c) + (int)local_1ac * 4); + piVar4 = *(int **)(*(int *)((char *)pvVar13 + 0x125c) + GHIDRA_INT(local_1ac) * 4); if ((piVar4[10] == 1000) && ((piVar4[0xb] == 0xa6 && (piVar4[0xd] == 0x3b7)))) { (**(code **)(*piVar4 + 0x14))(); } - local_1ac = (float)((int)local_1ac + 1); - } while ((uint)local_1ac < (uint)*(float *)((char *)pvVar13 + 0x1264)); + local_1ac = (float)(GHIDRA_INT(local_1ac) + 1); + } while (GHIDRA_UINT(local_1ac) < GHIDRA_UINT(*(float *)((char *)pvVar13 + 0x1264))); } pFVar1 = local_1b0; if (local_1b0->_loaded != 0) { @@ -4214,17 +4214,17 @@ void FXLayers::Render() fStack_1b4 = 0.0; do { if (*(int *)((char *)fStack_1b4 + 0x2cU + iVar8) == 1) { - ((BlendMode *)(&quadColor))->BlendMode::SetMode(*(int *)((char *)fStack_1b4 + 0x44U + iVar8),(int)local_1b8); + ((BlendMode *)(&quadColor))->BlendMode::SetMode(*(int *)((char *)fStack_1b4 + 0x44U + iVar8),GHIDRA_INT(local_1b8)); g_graphicsManager_blendMode[0] = *extraout_EAX; g_graphicsManager_blendMode[1] = extraout_EAX[1]; g_graphicsManager_blendMode[2] = extraout_EAX[2]; g_graphicsManager_blendMode[3] = extraout_EAX[3]; g_graphicsManager_blendMode[4] = extraout_EAX[4]; - render_layer(pFVar1,(int)local_1b8); + render_layer(pFVar1,GHIDRA_INT(local_1b8)); } iVar8 = *(int *)&(*(undefined1 *)((char *)(pFVar1) + 0x18)); - fStack_1b4 = (float)((int)fStack_1b4 + 0x4c); - local_1b8 = (float *)((int)local_1b8 + 1); + fStack_1b4 = (float)(GHIDRA_INT(fStack_1b4) + 0x4c); + local_1b8 = (float *)(GHIDRA_INT(local_1b8) + 1); } while (local_1b8 < (float *)((*(int *)&(*(undefined1 *)((char *)(pFVar1) + 0x1c)) - iVar8) / 0x4c)); } if (0 < pFVar1->_poopFxCountdown) { @@ -4307,9 +4307,9 @@ void FXLayers::Render() iStack_10c = 0x3f800000; fStack_108 = local_1ac; (**(code **)(**(int **)&(*(undefined1 *)((char *)(pFVar1) + 0x3c)) + 0x14))(); - fStack_1b4 = (float)((int)fStack_1b4 + 1); - fStack_1a8 = (float)((int)fStack_1a8 + 0x14); - } while ((int)fStack_1b4 < *(int *)&(*(undefined1 *)((char *)(pFVar1) + 0x50))); + fStack_1b4 = (float)(GHIDRA_INT(fStack_1b4) + 1); + fStack_1a8 = (float)(GHIDRA_INT(fStack_1a8) + 0x14); + } while (GHIDRA_INT(fStack_1b4) < *(int *)&(*(undefined1 *)((char *)(pFVar1) + 0x50))); } } pFVar1 = local_1b0; @@ -4322,7 +4322,7 @@ void FXLayers::Render() pFVar1 = local_1b0; if ((~preventedCurses & (forcedCurses | uVar9 | forcedCurses) & 1) == 0) { pFVar1 = *(FXLayers **)&(*(undefined1 *)((char *)(local_1b0) + 0x30)); - if (-1 < (int)pFVar1) { + if (-1 < GHIDRA_INT(pFVar1)) { g_graphicsManager_blendMode[1] = 1; if (((byte)g_graphicsManager_flags & 4) == 0) { g_graphicsManager_blendMode[1] = 6; @@ -4359,7 +4359,7 @@ void FXLayers::Render() fStack_19c = ((float)piStack_1bc / (float)local_1b8 - (float)pvStack_198) + *(float *)((char *)pvVar13 + 0x1208); fVar10 = (local_1ac - fStack_1a8) + *(float *)((char *)pvVar13 + 0x1204); - lightEntryOffset = (int)local_1b0 * 0x2c; + lightEntryOffset = GHIDRA_INT(local_1b0) * 0x2c; iVar6 = (*(int *)(lightEntryOffset + 0x20 + *(int *)&(*(undefined1 *)((char *)(layers) + 0x24))) - *(int *)(lightEntryOffset + 0x1c + *(int *)&(*(undefined1 *)((char *)(layers) + 0x24)))) / 0x14; iVar8 = *(int *)&(*(undefined1 *)((char *)(layers) + 0x24)); @@ -4390,8 +4390,8 @@ void FXLayers::Render() quadColor._unk = 0; beamTopRight.x = fVar10 * *(float *)(iVar6 + 8 + lightEntryOffset); beamOffsetX = (fStack_154 + *(float *)(iVar6 + 0x14 + lightEntryOffset)) * - (float)((double)(int)fStack_1b4 + - __uint_to_double_fixup[-((int)fStack_1b4 >> 0x1f)]) + + (float)((double)GHIDRA_INT(fStack_1b4) + + __uint_to_double_fixup[-(GHIDRA_INT(fStack_1b4) >> 0x1f)]) + *(float *)(iVar6 + lightEntryOffset); fVar11 = lightOriginX + beamOffsetX; VStack_114.x = beamTopRight.x + fVar11; @@ -4442,7 +4442,7 @@ void FXLayers::Render() ); fVar10 = sin(*(float *)((char *)piStack_1bc + 8 + iVar8)); local_1b8 = (float *)(auStack_1c8 + -0x10); - auStack_4c._12_4_ = 1.0; + (*(undefined4 *)((char *)&(auStack_4c) + 0xc)) = 1.0; fStack_3c = 1.0; fStack_30 = 0.0; fStack_2c = 0.0; @@ -4477,7 +4477,7 @@ void FXLayers::Render() ((ColorMod *)(auStack_4c + 0xc),1,(void *)uVar14, (void *)((ulonglong)uVar14 >> 0x20)); quadColor._unk = 0; - quadColor._red = (float)auStack_4c._12_4_; + quadColor._red = (*(undefined4 *)((char *)&((float)auStack_4c) + 0xc)); quadColor._green = fStack_3c; quadColor._blue = fStack_38; quadColor._alpha = fStack_34; @@ -4501,9 +4501,9 @@ void FXLayers::Render() fStack_148 = 1.0; fStack_144 = 0.0; fStack_140 = 1.0; - fStack_17c = (float)((uint)fStack_17c & 0xffffff00); + fStack_17c = (float)(GHIDRA_UINT(fStack_17c) & 0xffffff00); fStack_13c = fStack_17c; - auStack_4c._12_4_ = (1.0 - (float)piStack_1a0) * (float)piStack_1bc; + (*(undefined4 *)((char *)&(auStack_4c) + 0xc)) = (1.0 - (float)piStack_1a0) * (float)piStack_1bc; pvVar13 = (void *)0x0; imageRefCount = (void *)0x0; piStack_1a0 = *(int **)(*(int *)(&(*(undefined1 *)((char *)(local_1b0) + 0x1c)) + @@ -4528,10 +4528,10 @@ void FXLayers::Render() apfStack_1c4[0] = pfVar2; apply_sprite_shader_params((ColorMod *)auStack_4c,1,pvVar13,imageRefCount); quadColor._green = 0.0; - fStack_19c = (float)auStack_4c._0_4_; - pvStack_198 = (void *)auStack_4c._4_4_; - fStack_194 = (float)auStack_4c._8_4_; - quadColor._red = (float)auStack_4c._12_4_; + fStack_19c = (*(undefined4 *)((char *)&((float)auStack_4c) + 0x0)); + pvStack_198 = (*(undefined4 *)((char *)&((void *)auStack_4c) + 0x4)); + fStack_194 = (*(undefined4 *)((char *)&((float)auStack_4c) + 0x8)); + quadColor._red = (*(undefined4 *)((char *)&((float)auStack_4c) + 0xc)); (**(code **)(**(int **)(*(int *)(&(*(undefined1 *)((char *)(local_1b0) + 0x1c)) + *(int *)&(*(undefined1 *)((char *)(layers) + 0x24))) + 0xc + iVar8) + 0x14)) (&uStack_15c); @@ -4541,14 +4541,14 @@ void FXLayers::Render() lightOriginX = fStack_1a8; } iVar5 = *(int *)(iVar6 + 0x1c + lightEntryOffset); - fStack_1b4 = (float)((int)fStack_1b4 + 1); + fStack_1b4 = (float)(GHIDRA_INT(fStack_1b4) + 1); *(float *)(iVar8 + 8 + iVar5) = *(float *)(iVar8 + 4 + iVar5) + *(float *)(iVar8 + 8 + iVar5); iVar8 = iVar8 + 0x14; pFVar1 = local_1b0; - } while ((uint)fStack_1b4 < - (uint)((*(int *)(iVar6 + 0x20 + lightEntryOffset) - - *(int *)(*(int *)&(*(undefined1 *)((char *)(layers) + 0x24)) + 0x1c + lightEntryOffset)) / 0x14) + } while (GHIDRA_UINT(fStack_1b4) < + GHIDRA_UINT(((*(int *)(iVar6 + 0x20 + lightEntryOffset) - + *(int *)(*(int *)&(*(undefined1 *)((char *)(layers) + 0x24)) + 0x1c + lightEntryOffset)) / 0x14)) ); } } @@ -4569,7 +4569,7 @@ void FXLayers::Render() if (0x19 < (byte)(hashChar + 0xbf)) { lowerChar = hashChar; } - forcedCurses = (uint)lowerChar; + forcedCurses = GHIDRA_UINT(lowerChar); if (lowerChar == 0x5c) { forcedCurses = 0x2f; } @@ -4701,7 +4701,7 @@ void FXLayers::render_underwater_layers() layerOffset = layerOffset + 0x4c; layerIdx = layerIdx + 1; imageWidth = *(int *)&(*(undefined1 *)((char *)(fxLayers) + 0x18)); - } while (layerIdx < (uint)((*(int *)&(*(undefined1 *)((char *)(fxLayers) + 0x1c)) - imageWidth) / 0x4c)); + } while (layerIdx < GHIDRA_UINT(((*(int *)&(*(undefined1 *)((char *)(fxLayers) + 0x1c)) - imageWidth) / 0x4c))); } } return; @@ -4749,7 +4749,7 @@ void FXLayers::render_overlay_layers() layers = *(int *)&(*(undefined1 *)((char *)(in_ECX) + 0x18)); layerOffset = layerOffset + 0x4c; layerIndex = layerIndex + 1; - } while (layerIndex < (uint)((*(int *)&(*(undefined1 *)((char *)(in_ECX) + 0x1c)) - layers) / 0x4c)); + } while (layerIndex < GHIDRA_UINT(((*(int *)&(*(undefined1 *)((char *)(in_ECX) + 0x1c)) - layers) / 0x4c))); } } g_graphicsManager_blendMode[0] = savedBlend0; @@ -4788,7 +4788,7 @@ void FXLayers::render_veins() uint local_44; float veinAnimIndex; - local_44 = __security_cookie ^ (uint)auStack_b4; + local_44 = __security_cookie ^ GHIDRA_UINT(auStack_b4); if (*(int *)&(*(undefined1 *)((char *)(in_ECX) + 0xc4)) != 0) { local_84 = (float *)&(*(undefined1 *)((char *)(in_ECX) + 0xd8)); veinsLeft = 10; @@ -4802,15 +4802,15 @@ void FXLayers::render_veins() uStack_68 = 0x3f800000; veinAnimIndex = local_84[1]; local_50 = 0; - *(float *)(&(*(undefined1 *)((char *)(in_ECX) + 0x364)) + (int)veinAnimIndex * 0x114) = + *(float *)(&(*(undefined1 *)((char *)(in_ECX) + 0x364)) + GHIDRA_INT(veinAnimIndex) * 0x114) = *local_84 * g_vectorOne.x * local_84[1]; - *(float *)(&(*(undefined1 *)((char *)(in_ECX) + 0x368)) + (int)veinAnimIndex * 0x114) = scaledY * veinAnimIndex; + *(float *)(&(*(undefined1 *)((char *)(in_ECX) + 0x368)) + GHIDRA_INT(veinAnimIndex) * 0x114) = scaledY * veinAnimIndex; uStack_4c = 0; local_48 = 0; - *(float *)(&(*(undefined1 *)((char *)(in_ECX) + 0x36c)) + (int)local_84[-6] * 0x114) = local_84[-1]; + *(float *)(&(*(undefined1 *)((char *)(in_ECX) + 0x36c)) + GHIDRA_INT(local_84[-6]) * 0x114) = local_84[-1]; veinAnimIndex = local_84[-6]; - animColor = (undefined4 *)(&(*(undefined1 *)((char *)(in_ECX) + 0x370)) + (int)veinAnimIndex * 0x114); - veinAlpha = ((1.0 - (float)(int)local_84[3] * 0.25) * 0.7 + 0.3) * local_84[2] * local_84[1] + animColor = (undefined4 *)(&(*(undefined1 *)((char *)(in_ECX) + 0x370)) + GHIDRA_INT(veinAnimIndex) * 0x114); + veinAlpha = ((1.0 - (float)GHIDRA_INT(local_84[3]) * 0.25) * 0.7 + 0.3) * local_84[2] * local_84[1] ; if (animColor != &veinColor) { animColor[4] = 0; @@ -4826,7 +4826,7 @@ void FXLayers::render_veins() veinAnimIndex = local_84[-6]; } pixelScale = g_displayPixelRatio * g_screenPointScale; - iVar2 = (int)veinAnimIndex * 0x114; + iVar2 = GHIDRA_INT(veinAnimIndex) * 0x114; local_8c = ((g_screenWidth - 338.0) * 0.5 + (local_84[4] - 60.0) * 0.65) * pixelScale + 0.5; dVar4 = floor((double)local_8c); renderX = (float)dVar4 / pixelScale; @@ -4931,7 +4931,7 @@ void FXLayers::render_vein_branch(void *node) ((ANM2 *)((ANM2 *)(&(*(undefined1 *)((char *)(this) + 0x2c8)) + iVar1 * 0x114)))->ANM2::Render(&renderPos,&g_vectorZero,&g_vectorZero); iVar1 = 3; do { - node = (void *)((int)node + 4); + node = (void *)(GHIDRA_INT(node) + 4); render_vein_branch(this,*(void **)node); iVar1 = iVar1 + -1; } while (iVar1 != 0); @@ -4963,7 +4963,7 @@ void FXLayers::grow_vein_branches(void *node) qword prevAllocated; if (node != (void *)0x0) { - childSlot = (undefined4 *)((int)node + 4); + childSlot = (undefined4 *)(GHIDRA_INT(node) + 4); if (4 < *(int *)((char *)node + 0x24)) { *childSlot = 0; *(undefined4 *)((char *)node + 8) = 0; @@ -5003,7 +5003,7 @@ void FXLayers::grow_vein_branches(void *node) allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } block = malloc(0x38); if (block == (undefined4 *)0x0) { @@ -5014,9 +5014,9 @@ LAB_00996cad: else { *block = 0x38; prevAllocated = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter + 0x38; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) + 0x38; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) + (uint)(0xffffffc7 < (uint)prevAllocated); + *(uint *)((char *)allocCounter + 4) + GHIDRA_UINT((0xffffffc7 < GHIDRA_UINT(prevAllocated))); if (block == (undefined4 *)0xfffffffc) goto LAB_00996cad; node_00 = (uint *)FUN_0098f6c0(); } @@ -5041,13 +5041,13 @@ LAB_00996cad: fVar6 = *(float *)((char *)node + 0x18); parentX = *(float *)((char *)node + 0x28); parentY = *(float *)((char *)node + 0x2c); - node_00[5] = (uint)angle; - node_00[10] = (uint)(((fVar1 / 0.65) * cosRotation - (fVar2 / 0.65) * sinRotation) * fVar5 + - parentX); - node_00[0xb] = (uint)(((fVar2 / 0.65) * cosRotation + (fVar1 / 0.65) * sinRotation) * fVar6 - + parentY); + node_00[5] = GHIDRA_UINT(angle); + node_00[10] = GHIDRA_UINT((((fVar1 / 0.65) * cosRotation - (fVar2 / 0.65) * sinRotation) * fVar5 + + parentX)); + node_00[0xb] = GHIDRA_UINT((((fVar2 / 0.65) * cosRotation + (fVar1 / 0.65) * sinRotation) * fVar6 + + parentY)); node_00[4] = *(uint *)((char *)node + 0x10); - node_00[6] = (uint)(*(float *)((char *)node + 0x18) * 0.75); + node_00[6] = GHIDRA_UINT((*(float *)((char *)node + 0x18) * 0.75)); node_00[8] = *(uint *)((char *)node + 0x20); iVar3 = *(int *)((char *)node + 0x24); node_00[7] = 0x3f800000; @@ -5112,7 +5112,7 @@ void FXLayers::update_vein_branch(int *param_1) if (0.0 <= fVar7 * (fVar10 - fVar8) + fVar6 * (*(float *)(in_ECX + 0x4f0) - (float)param_1[10])) { fVar10 = (float)param_1[7]; - param_1[7] = (int)(fVar10 + 0.05); + param_1[7] = GHIDRA_INT((fVar10 + 0.05)); if (1.0 < fVar10 + 0.05) { param_1[7] = 0x3f800000; } @@ -5141,9 +5141,9 @@ void FXLayers::update_vein_branch(int *param_1) } else { fVar10 = (float)param_1[7]; - param_1[7] = (int)(fVar10 - 0.05); + param_1[7] = GHIDRA_INT((fVar10 - 0.05)); if (fVar10 - 0.05 < -1.0) { - param_1[7] = (int)&DAT_bf800000; + param_1[7] = GHIDRA_INT(&DAT_bf800000); } } LAB_00996fdb: @@ -5190,7 +5190,7 @@ LAB_00996fdb: allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } puVar4 = malloc(0x38); if (puVar4 == (undefined4 *)0x0) { @@ -5207,9 +5207,9 @@ LAB_009972ba: else { *puVar4 = 0x38; qVar2 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes + 0x38; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) + 0x38; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) + (uint)(0xffffffc7 < (uint)qVar2); + *(uint *)((char *)allocatedBytes + 4) + GHIDRA_UINT((0xffffffc7 < GHIDRA_UINT(qVar2))); newNode = puVar4 + 1; if (newNode == (uint *)0x0) goto LAB_009972ba; *newNode = 0; @@ -5235,16 +5235,16 @@ LAB_009972ba: rngValue = rngValue << ((byte)DAT_00c35e94 & 0x1f) ^ rngValue; DAT_00c35e8c = rngValue >> ((byte)DAT_00c35e98 & 0x1f) ^ rngValue; rngValue = DAT_00c35e8c & 1; - newNode[10] = (uint)childX; - newNode[0xb] = (uint)fVar10; + newNode[10] = GHIDRA_UINT(childX); + newNode[0xb] = GHIDRA_UINT(fVar10); *newNode = rngValue; - newNode[5] = (uint)fVar8; - newNode[6] = (uint)((float)param_1[6] * 0.85); + newNode[5] = GHIDRA_UINT(fVar8); + newNode[6] = GHIDRA_UINT(((float)param_1[6] * 0.85)); newNode[8] = param_1[8]; iVar5 = param_1[9]; newNode[7] = 0; newNode[9] = iVar5 + 1; - *childSlot = (int)newNode; + *childSlot = GHIDRA_INT(newNode); } } } diff --git a/src/game/fx_params.cpp b/src/game/fx_params.cpp index 4f79903..3cf752f 100644 --- a/src/game/fx_params.cpp +++ b/src/game/fx_params.cpp @@ -98,7 +98,7 @@ void FXParams::operator_assign(void *other) *(undefined4 *)&this[1].useWaterV2 = uVar1; *(undefined4 *)&(*(undefined1 *)((char *)&(this[1]) + 0x20)) = uVar2; *(undefined4 *)&(*(undefined1 *)((char *)&(this[1]) + 0x24)) = *(undefined4 *)((char *)other + 0x70); - if ((undefined4 *)&(*(undefined1 *)((char *)&(this[1]) + 0x28)) != (undefined4 *)((int)other + 0x74)) { + if ((undefined4 *)&(*(undefined1 *)((char *)&(this[1]) + 0x28)) != (undefined4 *)(GHIDRA_INT(other) + 0x74)) { uVar1 = *(undefined4 *)((char *)other + 0x78); uVar2 = *(undefined4 *)((char *)other + 0x7c); uVar3 = *(undefined4 *)((char *)other + 0x80); diff --git a/src/game/game.cpp b/src/game/game.cpp index f336202..76ea855 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -32,12 +32,12 @@ Entity_Player * Game::GetPlayer(uint Index) playersEnd = (this->_playerManager)._playerList._end; puVar1 = (this->_playerManager)._playerList._begin; - if ((int)playersEnd - (int)puVar1 >> 2 == 0) { + if (GHIDRA_INT(playersEnd) - GHIDRA_INT(puVar1) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playersEnd = (this->_playerManager)._playerList._end; puVar1 = (this->_playerManager)._playerList._begin; } - if (Index < (uint)((int)playersEnd - (int)puVar1 >> 2)) { + if (Index < GHIDRA_UINT((GHIDRA_INT(playersEnd) - GHIDRA_INT(puVar1) >> 2))) { return (Entity_Player *)puVar1[Index]; } return (Entity_Player *)*puVar1; @@ -46,8 +46,8 @@ Entity_Player * Game::GetPlayer(uint Index) // 004178d0 int Game::GetNumPlayers() { - return (int)(this->_playerManager)._playerList._end - - (int)(this->_playerManager)._playerList._begin >> 2; + return GHIDRA_INT((this->_playerManager)._playerList._end) - + GHIDRA_INT((this->_playerManager)._playerList._begin) >> 2; } // 004178e0 @@ -110,7 +110,7 @@ undefined4 Game::load_bossoverlays_xml(byte *param_1) local_14 = (byte ***)0xffffffff; puStack_18 = &LAB_00af17c3; local_1c = ExceptionList; - uVar3 = __security_cookie ^ (uint)(anm2Root + 0x11); + uVar3 = __security_cookie ^ GHIDRA_UINT((anm2Root + 0x11)); ExceptionList = &local_1c; *in_ECX = 0; local_24 = uVar3; @@ -144,9 +144,9 @@ undefined4 Game::load_bossoverlays_xml(byte *param_1) bVar2 = *pbVar7; pbVar7 = pbVar7 + 1; } while (bVar2 != 0); - uVar3 = (int)pbVar7 - (int)(pbVar9 + 1); + uVar3 = GHIDRA_INT(pbVar7) - GHIDRA_INT((pbVar9 + 1)); ((std::string *)((char *)anm2Root))->std::string::assign(pbVar9,uVar3); - for (node = ((xml_node *)(node))->xml_node::first_node((byte *)"entry",(int)pbVar9,(byte)uVar3); + for (node = ((xml_node *)(node))->xml_node::first_node((byte *)"entry",GHIDRA_INT(pbVar9),(byte)uVar3); node != (void *)0x0; node = *(void **)((char *)node + 0x2c)) { anm2PathCapacity = 0xf; overlayId = 0; @@ -156,8 +156,8 @@ undefined4 Game::load_bossoverlays_xml(byte *param_1) animNameCapacity = 0xf; animName[0] = (byte ****)0x0; isPersist = 0; - local_14._1_3_ = (undefined3)((uint)local_14 >> 8); - local_14 = (byte ***)CONCAT31(local_14._1_3_,2); + (*(undefined1 *)((char *)&(local_14) + 0x1)) = (undefined3)(GHIDRA_UINT(local_14) >> 8); + local_14 = (byte ***)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); attr = *(undefined4 **)((char *)node + 0x20); uVar3 = 0; if (attr == (undefined4 *)0x0) { @@ -192,7 +192,7 @@ LAB_004210b2: bVar10 = bVar2 < *pbVar8; if (bVar2 != *pbVar8) { LAB_00420d91: - uVar3 = -(uint)bVar10 | 1; + uVar3 = -GHIDRA_UINT(bVar10) | 1; goto LAB_00420d96; } if (bVar2 == 0) break; @@ -222,7 +222,7 @@ LAB_00420d96: bVar10 = bVar2 < *pbVar8; if (bVar2 != *pbVar8) { LAB_00420df0: - uVar3 = -(uint)bVar10 | 1; + uVar3 = -GHIDRA_UINT(bVar10) | 1; goto LAB_00420df5; } if (bVar2 == 0) break; @@ -244,7 +244,7 @@ LAB_00420df5: bVar2 = *pbVar7; pbVar7 = pbVar7 + 1; } while (bVar2 != 0); - allocSource = (std_string *)(pbVar7 + -(int)(pbVar9 + 1)); + allocSource = (std_string *)(pbVar7 + -GHIDRA_INT((pbVar9 + 1))); if ((std_string *)(0x7fffffff - anm2RootSize) < allocSource) { /* WARNING: Subroutine does not return */ std::string::_Xlen(); @@ -253,15 +253,15 @@ LAB_00420df5: if (0xf < anm2RootCapacity) { ppppbVar6 = anm2Root[0]; } - ((std::string *)((char *)&tmpString))->std::string::concat((int)in_ECX,allocSource,(byte *)ppppbVar6, - anm2RootSize,pbVar9,(uint)allocSource); + ((std::string *)((char *)&tmpString))->std::string::concat(GHIDRA_INT(in_ECX),allocSource,(byte *)ppppbVar6, + anm2RootSize,pbVar9,GHIDRA_UINT(allocSource)); if (0xf < anm2PathCapacity) { uVar3 = anm2PathCapacity + 1; ppppbVar6 = anm2Path; if (0xfff < uVar3) { ppppbVar6 = (byte ****)anm2Path[-1]; uVar3 = anm2PathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)anm2Path + (-4 - (int)ppppbVar6))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(anm2Path) + (-4 - GHIDRA_INT(ppppbVar6)))) goto LAB_004211de; } operator_delete(ppppbVar6,uVar3); @@ -284,7 +284,7 @@ LAB_00420df5: bVar10 = bVar2 < *pbVar8; if (bVar2 != *pbVar8) { LAB_00420ed8: - uVar3 = -(uint)bVar10 | 1; + uVar3 = -GHIDRA_UINT(bVar10) | 1; goto LAB_00420edd; } if (bVar2 == 0) break; @@ -306,7 +306,7 @@ LAB_00420edd: bVar2 = *pbVar7; pbVar7 = pbVar7 + 1; } while (bVar2 != 0); - ((std::string *)((char *)animName))->std::string::assign(pbVar9,(int)pbVar7 - (int)(pbVar9 + 1)); + ((std::string *)((char *)animName))->std::string::assign(pbVar9,GHIDRA_INT(pbVar7) - GHIDRA_INT((pbVar9 + 1))); } else { persistKeyChar = "persist"; @@ -319,7 +319,7 @@ LAB_00420edd: bVar10 = bVar2 < (byte)*persistKeyChar; if (bVar2 != *persistKeyChar) { LAB_00420f40: - uVar3 = -(uint)bVar10 | 1; + uVar3 = -GHIDRA_UINT(bVar10) | 1; goto LAB_00420f45; } if (bVar2 == 0) break; @@ -344,7 +344,7 @@ LAB_00420f45: bVar2 = *pbVar7; pbVar7 = pbVar7 + 1; } while (bVar2 != 0); - ((std::string *)((char *)&tmpString))->std::string::assign(pbVar9,(int)pbVar7 - (int)(pbVar9 + 1)); + ((std::string *)((char *)&tmpString))->std::string::assign(pbVar9,GHIDRA_INT(pbVar7) - GHIDRA_INT((pbVar9 + 1))); if (tmpStringSize == 0) { LAB_00421045: isPersist = 0; @@ -366,7 +366,7 @@ LAB_00421045: uVar3 = 0; } else { - uVar3 = -(uint)bVar10 | 1; + uVar3 = -GHIDRA_UINT(bVar10) | 1; } if (uVar3 != 0) goto LAB_00420fdd; } @@ -388,7 +388,7 @@ LAB_00420fdd: uVar3 = 0; } else { - uVar3 = -(uint)bVar10 | 1; + uVar3 = -GHIDRA_UINT(bVar10) | 1; } if (uVar3 == 0) goto LAB_0042103c; } @@ -408,7 +408,7 @@ LAB_0042103c: if (0xfff < uVar3) { ppppbVar6 = (byte ****)tmpString[-1]; uVar3 = tmpStringCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)tmpString + (-4 - (int)ppppbVar6))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(tmpString) + (-4 - GHIDRA_INT(ppppbVar6)))) goto LAB_004211de; } operator_delete(ppppbVar6,uVar3); @@ -421,14 +421,14 @@ LAB_0042103c: uVar3 = overlayId; if (overlayId < 5) goto LAB_004210b2; } - local_14 = (byte ***)CONCAT31(local_14._1_3_,1); + local_14 = (byte ***)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); if (0xf < animNameCapacity) { uVar3 = animNameCapacity + 1; ppppbVar6 = animName[0]; if (0xfff < uVar3) { ppppbVar6 = (byte ****)animName[0][-1]; uVar3 = animNameCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)animName[0] + (-4 - (int)ppppbVar6))) goto LAB_004211de; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(animName[0]) + (-4 - GHIDRA_INT(ppppbVar6)))) goto LAB_004211de; } operator_delete(ppppbVar6,uVar3); } @@ -438,19 +438,19 @@ LAB_0042103c: if (0xfff < uVar3) { ppppbVar6 = (byte ****)anm2Path[-1]; uVar3 = anm2PathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)anm2Path + (-4 - (int)ppppbVar6))) goto LAB_004211de; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(anm2Path) + (-4 - GHIDRA_INT(ppppbVar6)))) goto LAB_004211de; } operator_delete(ppppbVar6,uVar3); } } - local_14 = (byte ***)((uint)local_14 & 0xffffff00); + local_14 = (byte ***)(GHIDRA_UINT(local_14) & 0xffffff00); if (0xf < anm2RootCapacity) { uVar3 = anm2RootCapacity + 1; ppppbVar6 = anm2Root[0]; if (0xfff < uVar3) { ppppbVar6 = (byte ****)anm2Root[0][-1]; uVar3 = anm2RootCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)anm2Root[0] + (-4 - (int)ppppbVar6))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(anm2Root[0]) + (-4 - GHIDRA_INT(ppppbVar6)))) { LAB_004211de: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -464,14 +464,14 @@ LAB_004211de: heapCounter = &g_allocatedBytesNoHeap; } else { - heapCounter = (qword *)((int)g_mainHeap + 0x30); + heapCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (text != (byte *)0x0) { uVar3 = *(uint *)(text + -4); qVar1 = *heapCounter; - *(uint *)heapCounter = (uint)*heapCounter - uVar3; + *(uint *)heapCounter = GHIDRA_UINT(*heapCounter) - uVar3; *(uint *)((char *)heapCounter + 4) = - *(uint *)((char *)heapCounter + 4) - (uint)((uint)qVar1 < uVar3); + *(uint *)((char *)heapCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar3)); free(text + -4); } uVar4 = 1; @@ -651,10 +651,10 @@ bool Game::HasHallucination() // 004d3390 void Game::SetStateFlag(uint param_1) { - if ((int)param_1 < 1) { + if (GHIDRA_INT(param_1) < 1) { param_1 = 0; } - if (((int)param_1 < 0x34) && (0x34 < param_1)) { + if ((GHIDRA_INT(param_1) < 0x34) && (0x34 < param_1)) { /* WARNING: Subroutine does not return */ std::bitset::_Xran(); } @@ -780,7 +780,7 @@ void Game::constructor() local_14 = 0xffffffff; puStack_18 = &LAB_00afb82b; local_1c = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 0x10U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; _eh_vector_constructor_iterator_ (this->_roomList,0xb8,0x20f,RoomDescriptor::constructor,RoomDescriptor::destructor); @@ -819,17 +819,17 @@ void Game::constructor() (this->_roomConfig)._curses._begin = (void *)0x0; (this->_roomConfig)._curses._end = (void *)0x0; (this->_roomConfig)._curses._capacity = (void *)0x0; - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; _eh_vector_constructor_iterator_ (&(*(undefined1 *)((char *)(this) + 0x1a570)),0x1c,0x10,(_func_void_void_ptr *)&LAB_00829650,FUN_0069d1f0); - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1a730)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1a734)) = 0; allocation = operator_new(100); *(void **)allocation = allocation; *(void **)((char *)allocation + 4) = allocation; *(void **)&(*(undefined1 *)((char *)(this) + 0x1a730)) = allocation; - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; this->_preloadManager = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1a73c)) = 0; allocation = operator_new(0x50); @@ -838,7 +838,7 @@ void Game::constructor() *(void **)((char *)allocation + 8) = allocation; *(undefined2 *)((char *)allocation + 0xc) = 0x101; this->_preloadManager = allocation; - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; _eh_vector_constructor_iterator_ ((this->_itemPool)._pools,0x34,0x1f,(_func_void_void_ptr *)&LAB_00732c20, (_func_void_void_ptr *)&LAB_00732c80); @@ -926,7 +926,7 @@ void Game::constructor() puVar4 = puVar4 + 1; iVar5 = iVar5 + -1; } while (iVar5 != 0); - local_14._0_1_ = 9; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; _eh_vector_constructor_iterator_ (&this->_bossPool,0x3c,0x25,(_func_void_void_ptr *)&LAB_00421810,FUN_00421860); (this->_bossPool)._removedBosses._begin = (void *)0x0; @@ -946,9 +946,9 @@ void Game::constructor() *(undefined4 *)&(*(undefined1 *)((char *)&((this->_roomTransition)) + 0x2c)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_roomTransition)) + 0x30)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_roomTransition)) + 0x34)) = 0; - local_14._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; ((ANM2 *)(&(this->_roomTransition)._versusScreenSprite))->ANM2::constructor(); - local_14._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xd; FUN_0040d170(); FUN_0040d170(); roomTransitionSprites = &(this->_roomTransition)._sprites; @@ -963,7 +963,7 @@ void Game::constructor() (this->_roomTransition)._slideOffset.y = 0.0; (this->_roomTransition)._slideOffset.x = 0.0; (this->_roomTransition)._minecart = (EntityPtr)0x0; - local_14._0_1_ = 0xf; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xf; FUN_0082ed00(); (this->_roomTransition)._bossIntroBossId = 0; *(undefined4 *)&this->_stageTransition = 0; @@ -1006,32 +1006,32 @@ void Game::constructor() *(undefined4 *)&(*(undefined1 *)((char *)&((this->_playerManager)) + 0x64)) = 0xffffffff; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_playerManager)) + 0x68)) = 0xffffffff; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_playerManager)) + 0x6c)) = 0xffffffff; - local_14._0_1_ = 0x11; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x11; Seeds::constructor(); (this->_onlinePlayerStats)._begin = (void *)0x0; (this->_onlinePlayerStats)._end = (void *)0x0; (this->_onlinePlayerStats)._capacity = (void *)0x0; - local_14._0_1_ = 0x13; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x13; _eh_vector_constructor_iterator_ (&(*(undefined1 *)((char *)(this) + 0x1bbec)),0x34,0x15,(_func_void_void_ptr *)&LAB_00425360,FUN_00425410); - local_14._0_1_ = 0x14; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x14; (*(undefined1 *)((char *)(this) + 0x1c030)) = 0; init_coop_awards(&this->_onlinePlayerStats); - local_14._0_1_ = 0x15; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x15; ((ANM2 *)(&(this->_itemOverlay)._sprite))->ANM2::constructor(); - local_14._0_1_ = 0x16; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x16; _eh_vector_constructor_iterator_ (&(*(undefined1 *)((char *)&((this->_itemOverlay)) + 0x11c)),0x58,0x30,(_func_void_void_ptr *)&LAB_009abcf0, FUN_009abd50); (this->_itemOverlay)._player = (EntityPtr)0x0; - local_14._0_1_ = 0x18; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x18; ((ANM2 *)(&(this->_itemOverlay)._megaMushPlayerSprite))->ANM2::constructor(); - local_14._0_1_ = 0x19; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x19; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x1d2f4))))->ANM2::constructor(); - local_14._0_1_ = 0x1a; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1a; _eh_vector_constructor_iterator_ (&(*(undefined1 *)((char *)(this) + 0x1d408)),0x38,5,(_func_void_void_ptr *)&LAB_00420aa0,FUN_00420b00); - local_14._0_1_ = 0x1b; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1b; *(undefined4 *)&this->_gameOver = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_gameOver)) + 0x4)) = 0; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)&((this->_gameOver)) + 0x8))))->ANM2::constructor(); @@ -1040,32 +1040,32 @@ void Game::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1d644)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1d648)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1d64c)) = 0; - local_14._0_1_ = 0x1c; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1c; Leaderboard::constructor(); - local_14._0_1_ = 0x1d; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1d; ((HUD *)(&this->_hud))->HUD::constructor(); - local_14._0_1_ = 0x1e; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1e; ((PauseScreen *)(&this->_pauseScreen))->PauseScreen::constructor(); - local_14._0_1_ = 0x1f; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1f; this->_revivePlayerMenu = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x24ed0)) = 0xffffffff; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x24ed4)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x24ed8)) = 0; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x24edc))))->ANM2::constructor(); - local_14._0_1_ = 0x20; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x20; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x24ff0))))->ANM2::constructor(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x25104)) = 0x3f400000; - local_14._0_1_ = 0x21; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x21; (*(undefined1 *)((char *)(this) + 0x25108)) = 0; this->_emoteMenuState = 0; ((OnlineEmotes *)(&(*(undefined1 *)((char *)(this) + 0x25110))))->OnlineEmotes::constructor(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x258d4)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x258d8)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x258dc)) = 0; - local_14._0_1_ = 0x23; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x23; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x258e0)) = 0; SharedPtrPair::constructor(); - local_14._0_1_ = 0x24; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x24; SharedPtrPair::constructor(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x2593c)) = 0xffffffff; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x25940)) = 0; @@ -1073,30 +1073,30 @@ void Game::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x25948)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x2594c)) = 0x42dc0000; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x25950)) = 0x428c0000; - local_14._0_1_ = 0x25; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x25; (this->_onlineStatsScreen)._isActive = 0; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)&((this->_onlineStatsScreen)) + 0x4))))->ANM2::constructor(); - local_14._0_1_ = 0x26; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x26; _eh_vector_constructor_iterator_ (&(*(undefined1 *)((char *)&((this->_onlineStatsScreen)) + 0x118)),0x114,4,ANM2::constructor,ANM2::~ANM2); (this->_onlineStatsScreen)._players._begin = (void *)0x0; (this->_onlineStatsScreen)._players._end = (void *)0x0; (this->_onlineStatsScreen)._players._capacity = (void *)0x0; - local_14._0_1_ = 0x27; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x27; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_minimap)) + 0x14)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_minimap)) + 0x10)) = 0; _eh_vector_constructor_iterator_((this->_minimap)._config,0x160,2,FUN_0098b0a0,FUN_0098b130); - local_14._0_1_ = 0x28; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x28; ((ANM2 *)(&(this->_minimap)._itemIconsSprite))->ANM2::constructor(); - local_14._0_1_ = 0x29; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x29; ((ANM2 *)(&(this->_minimap)._hudPickupSprite))->ANM2::constructor(); - local_14._0_1_ = 0x2a; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x2a; ((ANM2 *)(&(this->_minimap)._iconsSprite))->ANM2::constructor(); *(undefined4 *)&(*(undefined1 *)((char *)&((this->_minimap)) + 0x614)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_minimap)) + 0x618)) = 0; (this->_minimap)._shakeOffset.y = 0.0; (this->_minimap)._shakeOffset.x = 0.0; - local_14._0_1_ = 0x2b; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x2b; (this->_screenShakeOffset).y = 0.0; (this->_screenShakeOffset).x = 0.0; ((KAGE::SmartPointer *)(this->_giantBookClickerImage))->KAGE::SmartPointer::SmartPointer((void *)0x0); @@ -1122,7 +1122,7 @@ void Game::constructor() (this->_ambush)._isActive = 0; (this->_ambush)._currentWave = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x265f0)) = 0; - local_14 = CONCAT31(local_14._1_3_,0x2d); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x2d); *(undefined4 *)&this->_deathmatchManager = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_deathmatchManager)) + 0x4)) = 0; (this->_deathmatchManager)._type = (void *)0x0; @@ -1138,7 +1138,7 @@ void Game::constructor() iVar5 = uVar2 % 10 + 2; } ((DeathmatchManager *)(&this->_deathmatchManager))->DeathmatchManager::set_type(iVar5); - local_14._0_1_ = 0x2e; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x2e; ((ChallengeParams *)(&(this->_dailyChallenge)._params))->ChallengeParams::ChallengeParams(); (this->_dailyChallenge)._id = 0; (this->_dailyChallenge)._seed = 0; @@ -1146,7 +1146,7 @@ void Game::constructor() (this->_dailyChallenge)._isPractice = 0; ((ChallengeParam *)(&(this->_dailyChallenge)._params))->ChallengeParam::Reset(); ((ScoreSheet *)(&this->_scoreSheet))->ScoreSheet::ScoreSheet(); - local_14._0_1_ = 0x30; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x30; ((ANM2 *)(&(this->_genericPrompt)._sprite))->ANM2::constructor(); (this->_genericPrompt)._isOnlineVote = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_genericPrompt)) + 0x114)) = 0; @@ -1154,7 +1154,7 @@ void Game::constructor() *(undefined4 *)&(*(undefined1 *)((char *)&((this->_genericPrompt)) + 0x11c)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_genericPrompt)) + 0x120)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_genericPrompt)) + 0x124)) = 0; - local_14._0_1_ = 0x31; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x31; ((ANM2 *)(&this->_completionWidgetSprite))->ANM2::constructor(); this->_encounteredBosses[0] = 0; this->_encounteredBosses[1] = 0; @@ -1168,12 +1168,12 @@ void Game::constructor() this->_encounteredBosses[9] = 0; this->_encounteredBosses[10] = 0; this->_encounteredBosses[0xb] = 0; - local_14._0_1_ = 0x33; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x33; this->_isInstantFadeIn = 0; _eh_vector_constructor_iterator_ (this->_glowingHourglassStates,0x20660,2,FUN_006f2970, (_func_void_void_ptr *)&LAB_006f2990); - local_14._0_1_ = 0x34; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x34; (this->_currentColorModifier)._red = 1.0; (this->_currentColorModifier)._green = 1.0; (this->_currentColorModifier)._blue = 1.0; @@ -1224,7 +1224,7 @@ void Game::constructor() *(undefined4 *)&(*(undefined1 *)((char *)&((this->_proceduralItemManager)) + 0x20)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_proceduralItemManager)) + 0x24)) = 0; spawnTriggerTargets = &(this->_proceduralItemManager)._spawnTriggerTargets; - local_14._0_1_ = 0x3a; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x3a; spawnTriggerTargets->_head = (void *)0x0; (this->_proceduralItemManager)._spawnTriggerTargets._size = 0; allocation = operator_new(0x18); @@ -1233,7 +1233,7 @@ void Game::constructor() *(void **)((char *)allocation + 8) = allocation; *(undefined2 *)((char *)allocation + 0xc) = 0x101; spawnTriggerTargets->_head = allocation; - local_14._0_1_ = 0x3b; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x3b; _eh_vector_constructor_iterator_(&(*(undefined1 *)((char *)(this) + 0x6778c)),800,7,FUN_006ef920,FUN_006f29a0); this->_isPocketItemRewindSaved = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x68d74)) = 0; @@ -1249,7 +1249,7 @@ void Game::constructor() this[1]._roomList[0]._doors[0] = 0; this[1]._roomList[0]._doors[1] = 0; this[1]._roomList[0]._doors[2] = 0; - local_14._0_1_ = 0x3e; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x3e; piVar1 = this[1]._roomList[0]._doors + 3; *piVar1 = 0; this[1]._roomList[0]._doors[4] = 0; @@ -1258,9 +1258,9 @@ void Game::constructor() this[1]._roomList[0]._doors[7] = 0; puVar4 = operator_new(8); puVar4[1] = 0; - *piVar1 = (int)puVar4; + *piVar1 = GHIDRA_INT(puVar4); *puVar4 = piVar1; - local_14._0_1_ = 0x3f; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x3f; piVar1 = &this[1]._roomList[0].DisplayFlags; *piVar1 = 0; this[1]._roomList[0].VisitedCount = 0; @@ -1270,9 +1270,9 @@ void Game::constructor() this[1]._roomList[0].GreedSubType = 0; containerProxy = operator_new(8); containerProxy[1] = 0; - *piVar1 = (int)containerProxy; - *containerProxy = (int)piVar1; - local_14._0_1_ = 0x40; + *piVar1 = GHIDRA_INT(containerProxy); + *containerProxy = GHIDRA_INT(piVar1); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x40; this[1]._roomList[0].PitsCount = 0; this[1]._roomList[0].DecorationSeed = 0; this[1]._roomList[0].PoopCount = 0; @@ -1280,9 +1280,9 @@ void Game::constructor() _eh_vector_constructor_iterator_ (&this[1]._roomList[0].SpawnSeed,0x18,6,FUN_0040c380,std::string::_Tidy_deallocate); this[1]._roomList[1]._doors[7] = 0; - local_14._0_1_ = 0x41; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x41; allocation = operator_new(0x6aac60); - local_14._0_1_ = 0x42; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x42; if (allocation == (void *)0x0) { allocation = (void *)0x0; } @@ -1290,7 +1290,7 @@ void Game::constructor() ((EntityFactory *)(allocation))->EntityFactory::constructor(); allocation = extraout_EAX; } - local_14 = CONCAT31(local_14._1_3_,0x41); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x41); this->_entityFactory = allocation; create_render_surfaces(); ((ModManager *)(&g_manager->_modManager))->ModManager::create_shader_render_targets(); @@ -1369,37 +1369,37 @@ Game::~Game() entityPool = *(void **)(in_ECX + 0x26580); if (entityPool != (void *)0x0) { local_8 = 0; - _eh_vector_destructor_iterator_((void *)((int)entityPool + 0x696458),0x520,0x40,FUN_00960bc0); + _eh_vector_destructor_iterator_((void *)(GHIDRA_INT(entityPool) + 0x696458),0x520,0x40,FUN_00960bc0); local_8 = 1; _eh_vector_destructor_iterator_ - ((void *)((int)entityPool + 0x675c50),0x410,0x80,(_func_void_void_ptr *)&LAB_006a7f10) + ((void *)(GHIDRA_INT(entityPool) + 0x675c50),0x410,0x80,(_func_void_void_ptr *)&LAB_006a7f10) ; local_8 = 2; _eh_vector_destructor_iterator_ - ((void *)((int)entityPool + 0x64c448),0x530,0x80,(_func_void_void_ptr *)&LAB_005ccc90) + ((void *)(GHIDRA_INT(entityPool) + 0x64c448),0x530,0x80,(_func_void_void_ptr *)&LAB_005ccc90) ; local_8 = 3; _eh_vector_destructor_iterator_ - ((void *)((int)entityPool + 0x460440),0xf60,0x200,Entity_NPC::~Entity_NPC); + ((void *)(GHIDRA_INT(entityPool) + 0x460440),0xf60,0x200,Entity_NPC::~Entity_NPC); local_8 = 4; - _eh_vector_destructor_iterator_((void *)((int)entityPool + 0x435c38),0x550,0x80,FUN_0065d160); + _eh_vector_destructor_iterator_((void *)(GHIDRA_INT(entityPool) + 0x435c38),0x550,0x80,FUN_0065d160); local_8 = 5; _eh_vector_destructor_iterator_ - ((void *)((int)entityPool + 0x357c30),0x6f0,0x200,Entity_Pickup::~Entity_Pickup); + ((void *)(GHIDRA_INT(entityPool) + 0x357c30),0x6f0,0x200,Entity_Pickup::~Entity_Pickup); local_8 = 6; _eh_vector_destructor_iterator_ - ((void *)((int)entityPool + 0x32c828),0x568,0x80,Entity_Laser::destructor); + ((void *)(GHIDRA_INT(entityPool) + 0x32c828),0x568,0x80,Entity_Laser::destructor); local_8 = 7; _eh_vector_destructor_iterator_ - ((void *)((int)entityPool + 0x223820),0x848,0x200,Entity_Tear::~Entity_Tear); + ((void *)(GHIDRA_INT(entityPool) + 0x223820),0x848,0x200,Entity_Tear::~Entity_Tear); local_8 = 8; _eh_vector_destructor_iterator_ - ((void *)((int)entityPool + 0x194818),0x478,0x200,(_func_void_void_ptr *)&LAB_00652b80 + ((void *)(GHIDRA_INT(entityPool) + 0x194818),0x478,0x200,(_func_void_void_ptr *)&LAB_00652b80 ); local_8 = 9; - _eh_vector_destructor_iterator_((void *)((int)entityPool + 0x16d210),0x9d8,0x40,FUN_006a1fc0); + _eh_vector_destructor_iterator_((void *)(GHIDRA_INT(entityPool) + 0x16d210),0x9d8,0x40,FUN_006a1fc0); local_8 = 10; - _eh_vector_destructor_iterator_((void *)((int)entityPool + 0x130008),0xf48,0x40,FUN_0060d400); + _eh_vector_destructor_iterator_((void *)(GHIDRA_INT(entityPool) + 0x130008),0xf48,0x40,FUN_0060d400); local_8 = 0xb; _eh_vector_destructor_iterator_(entityPool,0x4c0,0x400,FUN_005cda90); local_8 = 0xffffffff; @@ -1476,7 +1476,7 @@ Game::~Game() ((std::string *)((char *)(in_ECX + 0x1d528)))->std::string::_Tidy_deallocate(); local_8 = 0x11; _eh_vector_destructor_iterator_((void *)(in_ECX + 0x1d408),0x38,5,FUN_00420b00); - local_8 = CONCAT31(local_8._1_3_,0x12); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x12); ((ANM2 *)((ANM2 *)(in_ECX + 0x1d2f4)))->ANM2::Reset(); ((AnimationState *)((AnimationState *)(in_ECX + 0x1d344)))->AnimationState::~AnimationState(); ((AnimationState *)((AnimationState *)(in_ECX + 0x1d324)))->AnimationState::~AnimationState(); @@ -1512,14 +1512,14 @@ Game::~Game() *(undefined4 *)(in_ECX + 0x18300) = 0; } std::vector::_Tidy(); - local_8._0_1_ = 0x16; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x16; if (*(int **)(in_ECX + 0x182fc) != (int *)0x0) { isLastRef = (**(code **)(**(int **)(in_ECX + 0x182fc) + 0xc))(); if ((isLastRef != '\0') && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(in_ECX + 0x182f8); } } - local_8 = CONCAT31(local_8._1_3_,0x15); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x15); _eh_vector_destructor_iterator_((void *)(in_ECX + 0x14),0xb8,0x20f,RoomDescriptor::destructor); ExceptionList = local_10; return; @@ -1550,7 +1550,7 @@ void Game::create_render_surfaces() local_8 = 0xffffffff; puStack_c = &LAB_00afbbb5; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(tmpTarget + 0x14); + uVar1 = __security_cookie ^ GHIDRA_UINT((tmpTarget + 0x14)); ExceptionList = &local_10; if (DAT_00c79758 == (int *)0x0) { ((KColor *)(&transparentColor))->KColor::SetFromARGB(0); @@ -1720,7 +1720,7 @@ void Game::ReloadStagesXmlOnLuaReset() puStack_20 = (undefined1 *)(redirectedPathA + 0x14); puStack_18 = &LAB_00afbc2d; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(redirectedPathA + 0x11); + local_24 = __security_cookie ^ GHIDRA_UINT((redirectedPathA + 0x11)); ExceptionList = &local_1c; fileName._capacity = 0xf; fileName._size = 10; @@ -1730,34 +1730,34 @@ void Game::ReloadStagesXmlOnLuaReset() fileName._buf[10] = '\0'; local_14 = (void *)0x0; ((ModManager *)(&g_manager->_modManager))->ModManager::TryRedirectPath((std_string *)redirectedPathA,&fileName); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; stagePathChars = extraout_EAX; if (0xf < *(uint *)(extraout_EAX + 0x14)) { stagePathChars = *(byte **)extraout_EAX; } ((RoomConfig *)(&temp_3f7f10adfc->_roomConfig))->RoomConfig::LoadStagesXml(stagePathChars); - local_14 = (void *)((uint)local_14._1_3_ << 8); + local_14 = (void *)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8); if (0xf < redirectedPathACapacity) { freeSize = redirectedPathACapacity + 1; freePtr = redirectedPathA[0]; if (0xfff < freeSize) { - freePtr = *(void **)((int)redirectedPathA[0] + -4); + freePtr = *(void **)(GHIDRA_INT(redirectedPathA[0]) + -4); freeSize = redirectedPathACapacity + 0x24; - if (0x1f < (uint)((int)redirectedPathA[0] + (-4 - (int)freePtr))) goto LAB_006f3d18; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPathA[0]) + (-4 - GHIDRA_INT(freePtr))))) goto LAB_006f3d18; } operator_delete(freePtr,freeSize); } local_14 = (void *)0xffffffff; redirectedPathASize = 0; redirectedPathACapacity = 0xf; - redirectedPathA[0] = (void *)((uint)redirectedPathA[0] & 0xffffff00); + redirectedPathA[0] = (void *)(GHIDRA_UINT(redirectedPathA[0]) & 0xffffff00); if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freePtr = (void *)fileName._buf._0_4_; + freePtr = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freePtr = *(void **)(fileName._buf._0_4_ + -4); + freePtr = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freePtr))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freePtr))))) { LAB_006f3d18: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1773,34 +1773,34 @@ LAB_006f3d18: fileName._buf[10] = '\0'; local_14 = (void *)0x2; ((ModManager *)(&g_manager->_modManager))->ModManager::TryRedirectPath((std_string *)redirectedPathB,&fileName); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; stagePathChars = extraout_EAX_00; if (0xf < *(uint *)(extraout_EAX_00 + 0x14)) { stagePathChars = *(byte **)extraout_EAX_00; } ((RoomConfig *)(&temp_3f7f10adfc->_roomConfig))->RoomConfig::LoadCursesXml(stagePathChars,0); - local_14 = (void *)CONCAT31(local_14._1_3_,2); + local_14 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); if (0xf < redirectedPathBCapacity) { freeSize = redirectedPathBCapacity + 1; freePtr = redirectedPathB[0]; if (0xfff < freeSize) { - freePtr = *(void **)((int)redirectedPathB[0] + -4); + freePtr = *(void **)(GHIDRA_INT(redirectedPathB[0]) + -4); freeSize = redirectedPathBCapacity + 0x24; - if (0x1f < (uint)((int)redirectedPathB[0] + (-4 - (int)freePtr))) goto LAB_006f3dfe; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPathB[0]) + (-4 - GHIDRA_INT(freePtr))))) goto LAB_006f3dfe; } operator_delete(freePtr,freeSize); } local_14 = (void *)0xffffffff; redirectedPathBSize = 0; redirectedPathBCapacity = 0xf; - redirectedPathB[0] = (void *)((uint)redirectedPathB[0] & 0xffffff00); + redirectedPathB[0] = (void *)(GHIDRA_UINT(redirectedPathB[0]) & 0xffffff00); if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freePtr = (void *)fileName._buf._0_4_; + freePtr = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freePtr = *(void **)(fileName._buf._0_4_ + -4); + freePtr = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freePtr))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freePtr))))) { LAB_006f3dfe: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1813,34 +1813,34 @@ LAB_006f3dfe: fileName._size = 0xe; local_14 = (void *)0x4; ((ModManager *)(&g_manager->_modManager))->ModManager::TryRedirectPath((std_string *)redirectedPathA,&fileName); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; stagePathChars = extraout_EAX_01; if (0xf < *(uint *)(extraout_EAX_01 + 0x14)) { stagePathChars = *(byte **)extraout_EAX_01; } LoadMinibossesXml((Game *)&temp_3f7f10adfc->_roomConfig,stagePathChars); - local_14 = (void *)CONCAT31(local_14._1_3_,4); + local_14 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),4); if (0xf < redirectedPathACapacity) { freeSize = redirectedPathACapacity + 1; freePtr = redirectedPathA[0]; if (0xfff < freeSize) { - freePtr = *(void **)((int)redirectedPathA[0] + -4); + freePtr = *(void **)(GHIDRA_INT(redirectedPathA[0]) + -4); freeSize = redirectedPathACapacity + 0x24; - if (0x1f < (uint)((int)redirectedPathA[0] + (-4 - (int)freePtr))) goto LAB_006f3eea; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPathA[0]) + (-4 - GHIDRA_INT(freePtr))))) goto LAB_006f3eea; } operator_delete(freePtr,freeSize); } local_14 = (void *)0xffffffff; redirectedPathASize = 0; redirectedPathACapacity = 0xf; - redirectedPathA[0] = (void *)((uint)redirectedPathA[0] & 0xffffff00); + redirectedPathA[0] = (void *)(GHIDRA_UINT(redirectedPathA[0]) & 0xffffff00); if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freePtr = (void *)fileName._buf._0_4_; + freePtr = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freePtr = *(void **)(fileName._buf._0_4_ + -4); + freePtr = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freePtr))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freePtr))))) { LAB_006f3eea: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1854,34 +1854,34 @@ LAB_006f3eea: builtin_strncpy(fileName._buf,"players.xml",0xc); local_14 = (void *)0x6; ((ModManager *)(&g_manager->_modManager))->ModManager::TryRedirectPath((std_string *)redirectedPathB,&fileName); - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; stagePathChars = extraout_EAX_02; if (0xf < *(uint *)(extraout_EAX_02 + 0x14)) { stagePathChars = *(byte **)extraout_EAX_02; } this->EntityConfig::load_players_xml(stagePathChars,(void *)0x0); - local_14 = (void *)CONCAT31(local_14._1_3_,6); + local_14 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),6); if (0xf < redirectedPathBCapacity) { freeSize = redirectedPathBCapacity + 1; freePtr = redirectedPathB[0]; if (0xfff < freeSize) { - freePtr = *(void **)((int)redirectedPathB[0] + -4); + freePtr = *(void **)(GHIDRA_INT(redirectedPathB[0]) + -4); freeSize = redirectedPathBCapacity + 0x24; - if (0x1f < (uint)((int)redirectedPathB[0] + (-4 - (int)freePtr))) goto LAB_006f3fd9; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPathB[0]) + (-4 - GHIDRA_INT(freePtr))))) goto LAB_006f3fd9; } operator_delete(freePtr,freeSize); } local_14 = (void *)0xffffffff; redirectedPathBSize = 0; redirectedPathBCapacity = 0xf; - redirectedPathB[0] = (void *)((uint)redirectedPathB[0] & 0xffffff00); + redirectedPathB[0] = (void *)(GHIDRA_UINT(redirectedPathB[0]) & 0xffffff00); if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freePtr = (void *)fileName._buf._0_4_; + freePtr = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freePtr = *(void **)(fileName._buf._0_4_ + -4); + freePtr = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freePtr))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freePtr))))) { LAB_006f3fd9: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1901,22 +1901,22 @@ LAB_006f3fd9: VictoryRunPrompt::Load(extraout_ECX); fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; anm2PathBuf = std::_Allocate(0x20); fileName._size = 0x1d; fileName._capacity = 0x1f; builtin_strncpy(anm2PathBuf,"gfx/ui/completion_widget.anm2",0x1e); - fileName._buf._0_4_ = anm2PathBuf; + (*(undefined4 *)((char *)&(fileName._buf) + 0x0)) = anm2PathBuf; local_14 = (void *)0x8; ((ANM2 *)(&temp_3f7f10adfc->_completionWidgetSprite))->ANM2::Load(&fileName,1); local_14 = (void *)0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freePtr = (void *)fileName._buf._0_4_; + freePtr = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freePtr = *(void **)(fileName._buf._0_4_ + -4); + freePtr = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freePtr))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freePtr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1925,7 +1925,7 @@ LAB_006f3fd9: } fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffffffffff00; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffffffffff00; bVar1 = ((ANM2 *)(&temp_3f7f10adfc->_completionWidgetSprite))->ANM2::SetAnimation(s_Idle,1); if ((bVar1 != 0) && ((temp_3f7f10adfc->_completionWidgetSprite)._animState._animData != (void *)0x0)) { @@ -2014,7 +2014,7 @@ void Game::ResetState() this->_hallucinationTimer = 0; this->_framesSinceRoomTransition = 0; *(undefined4 *)&this->_gameStateFlags = 0; - *(undefined4 *)((int)&this->_gameStateFlags + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&this->_gameStateFlags) + 4) = 0; this->_ascentTimer = 0; (*(undefined1 *)((char *)(this) + 0x67aa8)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x67a9c)) = 0; @@ -2097,7 +2097,7 @@ void Game::LoadConfigXmls() local_14 = (void *)0xffffffff; puStack_18 = &LAB_00afbd65; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(local_6c + 0x17); + local_24 = __security_cookie ^ GHIDRA_UINT((local_6c + 0x17)); ExceptionList = &local_1c; reset_run_state(g_game); manager = g_manager; @@ -2115,34 +2115,34 @@ void Game::LoadConfigXmls() tmpName._buf[10] = '\0'; local_14 = (void *)0x0; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath((std_string *)local_6c,&tmpName); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; stagesPath = extraout_EAX; if (0xf < *(uint *)(extraout_EAX + 0x14)) { stagesPath = *(byte **)extraout_EAX; } ((RoomConfig *)(&pGVar1->_roomConfig))->RoomConfig::LoadStagesXml(stagesPath); - local_14 = (void *)((uint)local_14._1_3_ << 8); + local_14 = (void *)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8); if (0xf < local_58) { uVar4 = local_58 + 1; pvVar3 = local_6c[0]; if (0xfff < uVar4) { - pvVar3 = *(void **)((int)local_6c[0] + -4); + pvVar3 = *(void **)(GHIDRA_INT(local_6c[0]) + -4); uVar4 = local_58 + 0x24; - if (0x1f < (uint)((int)local_6c[0] + (-4 - (int)pvVar3))) goto LAB_006f48a1; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_6c[0]) + (-4 - GHIDRA_INT(pvVar3))))) goto LAB_006f48a1; } operator_delete(pvVar3,uVar4); } local_14 = (void *)0xffffffff; local_5c = 0; local_58 = 0xf; - local_6c[0] = (void *)((uint)local_6c[0] & 0xffffff00); + local_6c[0] = (void *)(GHIDRA_UINT(local_6c[0]) & 0xffffff00); if (0xf < tmpName._capacity) { uVar4 = tmpName._capacity + 1; - pvVar3 = (void *)tmpName._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)tmpName._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(tmpName._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + -4); uVar4 = tmpName._capacity + 0x24; - if (0x1f < (uint)(tmpName._buf._0_4_ + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) { LAB_006f48a1: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -2158,34 +2158,34 @@ LAB_006f48a1: tmpName._buf[10] = '\0'; local_14 = (void *)0x2; ((ModManager *)(&g_manager->_modManager))->ModManager::TryRedirectPath(&tmpPath,&tmpName); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; stagesPath = extraout_EAX_00; if (0xf < *(uint *)(extraout_EAX_00 + 0x14)) { stagesPath = *(byte **)extraout_EAX_00; } ((RoomConfig *)(&pGVar1->_roomConfig))->RoomConfig::LoadCursesXml(stagesPath,0); - local_14 = (void *)CONCAT31(local_14._1_3_,2); + local_14 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); if (0xf < tmpPath._capacity) { uVar4 = tmpPath._capacity + 1; - pvVar3 = (void *)tmpPath._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)tmpPath._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(tmpPath._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) + -4); uVar4 = tmpPath._capacity + 0x24; - if (0x1f < (uint)(tmpPath._buf._0_4_ + (-4 - (int)pvVar3))) goto LAB_006f4987; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) goto LAB_006f4987; } operator_delete(pvVar3,uVar4); } local_14 = (void *)0xffffffff; tmpPath._size = 0; tmpPath._capacity = 0xf; - tmpPath._buf._0_4_ = tmpPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) & 0xffffff00; if (0xf < tmpName._capacity) { uVar4 = tmpName._capacity + 1; - pvVar3 = (void *)tmpName._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)tmpName._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(tmpName._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + -4); uVar4 = tmpName._capacity + 0x24; - if (0x1f < (uint)(tmpName._buf._0_4_ + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) { LAB_006f4987: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -2199,34 +2199,34 @@ LAB_006f4987: tmpName._size = 0xe; local_14 = (void *)0x4; ((ModManager *)(&g_manager->_modManager))->ModManager::TryRedirectPath(&tmpPath,&tmpName); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; stagesPath = extraout_EAX_01; if (0xf < *(uint *)(extraout_EAX_01 + 0x14)) { stagesPath = *(byte **)extraout_EAX_01; } LoadMinibossesXml((Game *)&pGVar1->_roomConfig,stagesPath); - local_14 = (void *)CONCAT31(local_14._1_3_,4); + local_14 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),4); if (0xf < tmpPath._capacity) { uVar4 = tmpPath._capacity + 1; - pvVar3 = (void *)tmpPath._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)tmpPath._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(tmpPath._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) + -4); uVar4 = tmpPath._capacity + 0x24; - if (0x1f < (uint)(tmpPath._buf._0_4_ + (-4 - (int)pvVar3))) goto LAB_006f4a84; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) goto LAB_006f4a84; } operator_delete(pvVar3,uVar4); } local_14 = (void *)0xffffffff; tmpPath._size = 0; tmpPath._capacity = 0xf; - tmpPath._buf._0_4_ = tmpPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) & 0xffffff00; if (0xf < tmpName._capacity) { uVar4 = tmpName._capacity + 1; - pvVar3 = (void *)tmpName._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)tmpName._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(tmpName._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + -4); uVar4 = tmpName._capacity + 0x24; - if (0x1f < (uint)(tmpName._buf._0_4_ + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) { LAB_006f4a84: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -2239,34 +2239,34 @@ LAB_006f4a84: tmpName._size = 0xd; local_14 = (void *)0x6; ((ModManager *)(&g_manager->_modManager))->ModManager::TryRedirectPath((std_string *)local_6c,&tmpName); - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; stagesPath = extraout_EAX_02; if (0xf < *(uint *)(extraout_EAX_02 + 0x14)) { stagesPath = *(byte **)extraout_EAX_02; } load_giantbook_xml(&pGVar1->_itemOverlay,stagesPath); - local_14 = (void *)CONCAT31(local_14._1_3_,6); + local_14 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),6); if (0xf < local_58) { uVar4 = local_58 + 1; pvVar3 = local_6c[0]; if (0xfff < uVar4) { - pvVar3 = *(void **)((int)local_6c[0] + -4); + pvVar3 = *(void **)(GHIDRA_INT(local_6c[0]) + -4); uVar4 = local_58 + 0x24; - if (0x1f < (uint)((int)local_6c[0] + (-4 - (int)pvVar3))) goto LAB_006f4b6e; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_6c[0]) + (-4 - GHIDRA_INT(pvVar3))))) goto LAB_006f4b6e; } operator_delete(pvVar3,uVar4); } local_14 = (void *)0xffffffff; local_5c = 0; local_58 = 0xf; - local_6c[0] = (void *)((uint)local_6c[0] & 0xffffff00); + local_6c[0] = (void *)(GHIDRA_UINT(local_6c[0]) & 0xffffff00); if (0xf < tmpName._capacity) { uVar4 = tmpName._capacity + 1; - pvVar3 = (void *)tmpName._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)tmpName._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(tmpName._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + -4); uVar4 = tmpName._capacity + 0x24; - if (0x1f < (uint)(tmpName._buf._0_4_ + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) { LAB_006f4b6e: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -2279,37 +2279,37 @@ LAB_006f4b6e: tmpName._size = 0x10; tmpName._capacity = 0x1f; builtin_strncpy(longNameBuf,"bossoverlays.xml",0x11); - tmpName._buf._0_4_ = longNameBuf; + (*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) = longNameBuf; local_14 = (void *)0x8; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&tmpPath,&tmpName); - local_14._0_1_ = 9; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; puVar2 = extraout_EAX_03; - if (0xf < (uint)extraout_EAX_03[5]) { + if (0xf < GHIDRA_UINT(extraout_EAX_03[5])) { puVar2 = (undefined4 *)*extraout_EAX_03; } load_bossoverlays_xml(puVar2); - local_14 = (void *)CONCAT31(local_14._1_3_,8); + local_14 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),8); if (0xf < tmpPath._capacity) { uVar4 = tmpPath._capacity + 1; - pvVar3 = (void *)tmpPath._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)tmpPath._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(tmpPath._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) + -4); uVar4 = tmpPath._capacity + 0x24; - if (0x1f < (uint)(tmpPath._buf._0_4_ + (-4 - (int)pvVar3))) goto LAB_006f4c52; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) goto LAB_006f4c52; } operator_delete(pvVar3,uVar4); } local_14 = (void *)0xffffffff; tmpPath._size = 0; tmpPath._capacity = 0xf; - tmpPath._buf._0_4_ = tmpPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) & 0xffffff00; if (0xf < tmpName._capacity) { uVar4 = tmpName._capacity + 1; - pvVar3 = (void *)tmpName._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)tmpName._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(tmpName._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + -4); uVar4 = tmpName._capacity + 0x24; - if (0x1f < (uint)(tmpName._buf._0_4_ + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) { LAB_006f4c52: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -2336,34 +2336,34 @@ LAB_006f4c52: tmpName._buf[10] = '\0'; local_14 = (void *)0xa; ((ModManager *)(&g_manager->_modManager))->ModManager::TryRedirectPath(&tmpPath,&tmpName); - local_14._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; puVar2 = extraout_EAX_04; - if (0xf < (uint)extraout_EAX_04[5]) { + if (0xf < GHIDRA_UINT(extraout_EAX_04[5])) { puVar2 = (undefined4 *)*extraout_EAX_04; } LoadBossRushXml(puVar2); - local_14 = (void *)CONCAT31(local_14._1_3_,10); + local_14 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),10); if (0xf < tmpPath._capacity) { uVar4 = tmpPath._capacity + 1; - pvVar3 = (void *)tmpPath._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)tmpPath._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(tmpPath._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) + -4); uVar4 = tmpPath._capacity + 0x24; - if (0x1f < (uint)(tmpPath._buf._0_4_ + (-4 - (int)pvVar3))) goto LAB_006f4da8; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) goto LAB_006f4da8; } operator_delete(pvVar3,uVar4); } local_14 = (void *)0xffffffff; tmpPath._size = 0; tmpPath._capacity = 0xf; - tmpPath._buf._0_4_ = tmpPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) & 0xffffff00; if (0xf < tmpName._capacity) { uVar4 = tmpName._capacity + 1; - pvVar3 = (void *)tmpName._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)tmpName._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(tmpName._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + -4); uVar4 = tmpName._capacity + 0x24; - if (0x1f < (uint)(tmpName._buf._0_4_ + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) { LAB_006f4da8: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -2376,34 +2376,34 @@ LAB_006f4da8: builtin_strncpy(tmpName._buf,"preload.xml",0xc); local_14 = (void *)0xc; ((ModManager *)(&g_manager->_modManager))->ModManager::TryRedirectPath((std_string *)local_6c,&tmpName); - local_14._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xd; stagesPath = extraout_EAX_05; if (0xf < *(uint *)(extraout_EAX_05 + 0x14)) { stagesPath = *(byte **)extraout_EAX_05; } load_preloads_xml(&pGVar1->_preloadManager,stagesPath); - local_14 = (void *)CONCAT31(local_14._1_3_,0xc); + local_14 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0xc); if (0xf < local_58) { uVar4 = local_58 + 1; pvVar3 = local_6c[0]; if (0xfff < uVar4) { - pvVar3 = *(void **)((int)local_6c[0] + -4); + pvVar3 = *(void **)(GHIDRA_INT(local_6c[0]) + -4); uVar4 = local_58 + 0x24; - if (0x1f < (uint)((int)local_6c[0] + (-4 - (int)pvVar3))) goto LAB_006f4e94; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_6c[0]) + (-4 - GHIDRA_INT(pvVar3))))) goto LAB_006f4e94; } operator_delete(pvVar3,uVar4); } local_14 = (void *)0xffffffff; local_5c = 0; local_58 = 0xf; - local_6c[0] = (void *)((uint)local_6c[0] & 0xffffff00); + local_6c[0] = (void *)(GHIDRA_UINT(local_6c[0]) & 0xffffff00); if (0xf < tmpName._capacity) { uVar4 = tmpName._capacity + 1; - pvVar3 = (void *)tmpName._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)tmpName._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(tmpName._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + -4); uVar4 = tmpName._capacity + 0x24; - if (0x1f < (uint)(tmpName._buf._0_4_ + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) { LAB_006f4e94: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -2419,52 +2419,52 @@ LAB_006f4e94: local_14 = (void *)0xffffffff; tmpName._capacity = 0xf; tmpName._size = 0; - tmpName._buf._0_8_ = tmpName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(tmpName._buf) + 0x0)) = (*(undefined8 *)((char *)&(tmpName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(tmpName._buf))->std::string::assign(&DAT_00b68200,5); local_14 = (void *)0xf; ((PreloadManager *)(&pGVar1->_preloadManager))->PreloadManager::load_group(&tmpName); local_14 = (void *)0xffffffff; if (0xf < tmpName._capacity) { uVar4 = tmpName._capacity + 1; - pvVar3 = (void *)tmpName._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)tmpName._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(tmpName._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + -4); uVar4 = tmpName._capacity + 0x24; - if (0x1f < (uint)(tmpName._buf._0_4_ + (-4 - (int)pvVar3))) goto LAB_006f5040; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) goto LAB_006f5040; } operator_delete(pvVar3,uVar4); } tmpName._size = 0; tmpName._capacity = 0xf; - tmpName._buf._0_8_ = tmpName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(tmpName._buf) + 0x0)) = (*(undefined8 *)((char *)&(tmpName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(tmpName._buf))->std::string::assign((byte *)"pickups",7); local_14 = (void *)0x10; ((PreloadManager *)(&pGVar1->_preloadManager))->PreloadManager::load_group(&tmpName); local_14 = (void *)0xffffffff; if (0xf < tmpName._capacity) { uVar4 = tmpName._capacity + 1; - pvVar3 = (void *)tmpName._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)tmpName._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(tmpName._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + -4); uVar4 = tmpName._capacity + 0x24; - if (0x1f < (uint)(tmpName._buf._0_4_ + (-4 - (int)pvVar3))) goto LAB_006f5040; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) goto LAB_006f5040; } operator_delete(pvVar3,uVar4); } tmpName._size = 0; tmpName._capacity = 0xf; - tmpName._buf._0_8_ = tmpName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(tmpName._buf) + 0x0)) = (*(undefined8 *)((char *)&(tmpName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(tmpName._buf))->std::string::assign((byte *)"icons",5); local_14 = (void *)0x11; ((PreloadManager *)(&pGVar1->_preloadManager))->PreloadManager::load_group(&tmpName); local_14 = (void *)0xffffffff; if (0xf < tmpName._capacity) { uVar4 = tmpName._capacity + 1; - pvVar3 = (void *)tmpName._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)tmpName._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(tmpName._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + -4); uVar4 = tmpName._capacity + 0x24; - if (0x1f < (uint)(tmpName._buf._0_4_ + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) { LAB_006f5040: local_14 = (void *)0xffffffff; /* WARNING: Subroutine does not return */ @@ -2480,18 +2480,18 @@ LAB_006f5040: VictoryRunPrompt::Load(extraout_ECX); tmpName._size = 0; tmpName._capacity = 0xf; - tmpName._buf._0_8_ = tmpName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(tmpName._buf) + 0x0)) = (*(undefined8 *)((char *)&(tmpName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(tmpName._buf))->std::string::assign((byte *)"gfx/ui/completion_widget.anm2",0x1d); local_14 = (void *)0x12; ((ANM2 *)(&pGVar1->_completionWidgetSprite))->ANM2::Load(&tmpName,1); local_14 = (void *)0xffffffff; if (0xf < tmpName._capacity) { uVar4 = tmpName._capacity + 1; - pvVar3 = (void *)tmpName._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)tmpName._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(tmpName._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + -4); uVar4 = tmpName._capacity + 0x24; - if (0x1f < (uint)(tmpName._buf._0_4_ + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpName._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2585,7 +2585,7 @@ void Game::Fadeout(float speed, int target, KColor *color) float green; float red; - if ((uint)target < 0xc) { + if (GHIDRA_UINT(target) < 0xc) { this->_fadeSpeed = speed; red = color->_red; green = color->_green; @@ -2641,7 +2641,7 @@ void Game::Start(int playertype, int challenge, Seeds seeds, uint difficulty) this_02 = g_game; puStack_c = &LAB_00afbdc8; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(tmpString + 0x28); + local_14 = __security_cookie ^ GHIDRA_UINT((tmpString + 0x28)); ExceptionList = &local_10; local_8 = 0; iVar3 = 0x15; @@ -2666,35 +2666,35 @@ void Game::Start(int playertype, int challenge, Seeds seeds, uint difficulty) KAGE_LogMessage(0x10,(byte *)"Start seed is not initialized"); } ((Seeds *)(&seedsCopy))->Seeds::construct_from_copy(&seeds); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((Seeds *)(&this_02->_seedEffects))->Seeds::operator_assign(other); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; FID_conflict__Erase_tree_>_> (&seedsCopy._seedEffects, (fuzzer_allocator_> *)&seedsCopy._seedEffects, - *(_Tree_node **)((int)seedsCopy._seedEffects + 4)); + *(_Tree_node **)(GHIDRA_INT(seedsCopy._seedEffects) + 4)); operator_delete(seedsCopy._seedEffects,0x14); if (this_02->_challenge != 0) { pvVar2 = (this_02->_seedEffects)._seedEffects; game = &(this_02->_seedEffects)._seedEffects; FID_conflict__Erase_tree_>_> (game,(fuzzer_allocator_> *)game, - *(_Tree_node **)((int)pvVar2 + 4)); + *(_Tree_node **)(GHIDRA_INT(pvVar2) + 4)); *(void **)((char *)pvVar2 + 4) = pvVar2; *(void **)pvVar2 = pvVar2; *(void **)((char *)pvVar2 + 8) = pvVar2; (this_02->_seedEffects)._seedEffectsCount = 0; challengeParams = GetChallengeParams(this_02); uVar4 = 0; - if ((int)(challengeParams->_seedEffects)._end - (int)(challengeParams->_seedEffects)._begin >> 2 + if (GHIDRA_INT((challengeParams->_seedEffects)._end) - GHIDRA_INT((challengeParams->_seedEffects)._begin) >> 2 != 0) { do { Seeds::AddSeedEffect (&this_02->_seedEffects, - *(int *)((int)(challengeParams->_seedEffects)._begin + uVar4 * 4)); + *(int *)(GHIDRA_INT((challengeParams->_seedEffects)._begin) + uVar4 * 4)); uVar4 = uVar4 + 1; - } while (uVar4 < (uint)((int)(challengeParams->_seedEffects)._end - - (int)(challengeParams->_seedEffects)._begin >> 2)); + } while (uVar4 < GHIDRA_UINT((GHIDRA_INT((challengeParams->_seedEffects)._end) - + GHIDRA_INT((challengeParams->_seedEffects)._begin) >> 2))); } } local_ESI_410 = &this_02->_seedEffects; @@ -2725,16 +2725,16 @@ void Game::Start(int playertype, int challenge, Seeds seeds, uint difficulty) uVar4 = (this_02->_seedEffects)._gameStartSeed; } Seeds::Seed2String((std_string *)tmpString,uVar4); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; KAGE_LogMessage(1,(byte *)"RNG Start Seed: %s (%u) [New, %d]\n"); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; if (0xf < tmpStringCapacity) { uVar4 = tmpStringCapacity + 1; - pvVar2 = (void *)tmpString._0_4_; + pvVar2 = (*(undefined4 *)((char *)&((void *)tmpString) + 0x0)); if (0xfff < uVar4) { - pvVar2 = *(void **)(tmpString._0_4_ + -4); + pvVar2 = *(void **)((*(undefined4 *)((char *)&(tmpString) + 0x0)) + -4); uVar4 = tmpStringCapacity + 0x24; - if (0x1f < (uint)(tmpString._0_4_ + (-4 - (int)pvVar2))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpString) + 0x0)) + (-4 - GHIDRA_INT(pvVar2))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2746,39 +2746,39 @@ void Game::Start(int playertype, int challenge, Seeds seeds, uint difficulty) tmpStringCapacity = 0xf; puStack_1c = (undefined4 *)&DAT_0000000d; tmpString = (undefined1 [8])0x6c6f6f706d657469; - puStack_20 = (undefined4 *)CONCAT22(puStack_20._2_2_,0x6c); - local_8._0_1_ = 3; + puStack_20 = (undefined4 *)CONCAT22((*(undefined2 *)((char *)&(puStack_20) + 0x2)),0x6c); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; ModManager::TryRedirectPath (&g_manager->_modManager,(std_string *)itemPoolPath,(std_string *)tmpString); - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; filename = extraout_EAX; if (0xf < *(uint *)(extraout_EAX + 0x14)) { filename = *(byte **)extraout_EAX; } uVar4 = ((Seeds *)(local_ESI_410))->Seeds::GetNextSeed(); ((ItemPool *)(&this_02->_itemPool))->ItemPool::Init(uVar4,filename); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; if (0xf < itemPoolPathCapacity) { uVar4 = itemPoolPathCapacity + 1; pvVar2 = itemPoolPath[0]; if (0xfff < uVar4) { - pvVar2 = *(void **)((int)itemPoolPath[0] + -4); + pvVar2 = *(void **)(GHIDRA_INT(itemPoolPath[0]) + -4); uVar4 = itemPoolPathCapacity + 0x24; - if (0x1f < (uint)((int)itemPoolPath[0] + (-4 - (int)pvVar2))) goto LAB_006f56df; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(itemPoolPath[0]) + (-4 - GHIDRA_INT(pvVar2))))) goto LAB_006f56df; } operator_delete(pvVar2,uVar4); } - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; itemPoolPathSize = 0; itemPoolPathCapacity = 0xf; - itemPoolPath[0] = (void *)((uint)itemPoolPath[0] & 0xffffff00); + itemPoolPath[0] = (void *)(GHIDRA_UINT(itemPoolPath[0]) & 0xffffff00); if (0xf < tmpStringCapacity) { uVar4 = tmpStringCapacity + 1; - pvVar2 = (void *)tmpString._0_4_; + pvVar2 = (*(undefined4 *)((char *)&((void *)tmpString) + 0x0)); if (0xfff < uVar4) { - pvVar2 = *(void **)(tmpString._0_4_ + -4); + pvVar2 = *(void **)((*(undefined4 *)((char *)&(tmpString) + 0x0)) + -4); uVar4 = tmpStringCapacity + 0x24; - if (0x1f < (uint)(tmpString._0_4_ + (-4 - (int)pvVar2))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpString) + 0x0)) + (-4 - GHIDRA_INT(pvVar2))))) { LAB_006f56df: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -2804,14 +2804,14 @@ LAB_006f56df: ((Level *)((Level *)this_02))->Level::Init(1); std::vector::copy_constructor(&this_02->_playerManager); playersEnd = puStack_1c; - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; for (onlineStatEntry = puStack_20; onlineStatEntry != playersEnd; onlineStatEntry = onlineStatEntry + 1) { if (((Entity_Player *)*onlineStatEntry)->_variant == 0) { ((Entity_Player *)((Entity_Player *)*onlineStatEntry))->Entity_Player::InitPostLevelInitStats(); } } - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; FID_conflict__Tidy(&puStack_20); Manager::save_game_state(); ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::trigger_new_room_effects(); @@ -2833,7 +2833,7 @@ LAB_006f56df: FID_conflict__Erase_tree_>_> (&seeds._seedEffects, (fuzzer_allocator_> *)&seeds._seedEffects, - *(_Tree_node **)((int)seeds._seedEffects + 4)); + *(_Tree_node **)(GHIDRA_INT(seeds._seedEffects) + 4)); operator_delete(seeds._seedEffects,0x14); ExceptionList = local_10; return; @@ -2890,7 +2890,7 @@ void Game::add_players(int *users, uint flags) puStack_c = &LAB_00afbee6; local_10 = ExceptionList; - uVar5 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar5 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; local_30 = 0; local_34 = 0; @@ -2916,10 +2916,10 @@ void Game::add_players(int *users, uint flags) iVar7 = *(int *)(*users + iVar11 + 4); if (iVar7 == 0) { local_24 = 0; - local_24._4_4_ = (Entity_Player *)0x0; - local_24._0_4_ = 0; + (*(undefined4 *)((char *)&(local_24) + 0x4)) = (Entity_Player *)0x0; + (*(undefined4 *)((char *)&(local_24) + 0x0)) = 0; userIdLo = (undefined4)local_24; - userIdHi = local_24._4_4_; + userIdHi = (*(undefined4 *)((char *)&(local_24) + 0x4)); } else { userIdLo = *(undefined4 *)(iVar7 + 8); @@ -2931,21 +2931,21 @@ void Game::add_players(int *users, uint flags) local_24 = CONCAT44(pEVar6,(undefined4)local_24); if (pEVar6 == (Entity_Player *)0x0) { local_5c = operator_new(0x3f8); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; if (local_5c == (int *)0x0) { pEVar6 = (Entity_Player *)0x0; } else { - ((NetInputDevice *)(local_5c))->NetInputDevice::NetInputDevice(local_3c._4_4_); + ((NetInputDevice *)(local_5c))->NetInputDevice::NetInputDevice((*(undefined4 *)((char *)&(local_3c) + 0x4))); pEVar6 = extraout_EAX_00; } - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; local_24 = CONCAT44(pEVar6,(undefined4)local_24); FUN_00905f60(pEVar6); puVar9 = *(undefined4 **)(manager + 1); if (puVar9 == *(undefined4 **)&(*(undefined1 *)((char *)&(manager[1]) + 0x4))) { - std::vector<4byte>::_Emplace_reallocate(puVar9,(int)&local_24 + 4); - pEVar6 = local_24._4_4_; + std::vector<4byte>::_Emplace_reallocate(puVar9,GHIDRA_INT(&local_24) + 4); + pEVar6 = (*(undefined4 *)((char *)&(local_24) + 0x4)); } else { *puVar9 = pEVar6; @@ -2971,7 +2971,7 @@ void Game::add_players(int *users, uint flags) pvVar12 = (void *)g_manager->_activeControllerIndex; KAGE_LogMessage(1,(byte *)"[Frame: %d] Adding local player, device ID = %d \n"); deviceAlloc = operator_new(0x3f8); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; if (deviceAlloc == (void *)0x0) { pEVar6 = (Entity_Player *)0x0; } @@ -2979,7 +2979,7 @@ void Game::add_players(int *users, uint flags) ((NetInputDevice *)(deviceAlloc))->NetInputDevice::NetInputDevice(pvVar12); pEVar6 = extraout_EAX; } - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; (pEVar6->_sizeMulti).x = (float)g_userProfile; local_2c = pEVar6; FUN_00905f60(pEVar6); @@ -3029,7 +3029,7 @@ void Game::add_players(int *users, uint flags) (&game->_playerManager,*(int *)(*users + 0xc), (game->_seedEffects)._playerInitSeed); puVar9 = (game->_playerManager)._playerList._begin; - if ((int)(game->_playerManager)._playerList._end - (int)puVar9 >> 2 == 0) { + if (GHIDRA_INT((game->_playerManager)._playerList._end) - GHIDRA_INT(puVar9) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); puVar9 = (game->_playerManager)._playerList._begin; } @@ -3044,7 +3044,7 @@ void Game::add_players(int *users, uint flags) uVar10 = userIdx; goto LAB_006f68af; } - *newPlayersEnd = (int)local_14; + *newPlayersEnd = GHIDRA_INT(local_14); newPlayersEnd = newPlayersEnd + 1; uVar10 = userIdx; } @@ -3057,14 +3057,14 @@ LAB_006f68af: newPlayersCapacity = (int *)0x0; } else { - *newPlayersEnd = (int)local_14; + *newPlayersEnd = GHIDRA_INT(local_14); newPlayersEnd = newPlayersEnd + 1; } } - ((Entity_Player *)(local_14))->Entity_Player::SetControllerIndex((int)pvVar12,1); + ((Entity_Player *)(local_14))->Entity_Player::SetControllerIndex(GHIDRA_INT(pvVar12),1); userIdx = uVar10 + 1; iVar7 = *users; - } while (userIdx < (uint)((users[1] - iVar7) / 0x14)); + } while (userIdx < GHIDRA_UINT(((users[1] - iVar7) / 0x14))); } local_2c = (Entity_Player *)0x0; newPlayerIt = (int *)0x0; @@ -3075,10 +3075,10 @@ LAB_006f68af: local_74 = KAGE::Network::Multiplayer::ConstLobby::vftable; local_70 = (int *)0x0; lobbyRefCount = (int *)0x0; - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; ((std::shared_ptr *)(&local_70))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); local_74 = KAGE::Network::Multiplayer::Lobby::vftable; - local_8 = CONCAT31(local_8._1_3_,4); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),4); local_30 = 0xd; if (local_70 == (int *)0x0) { local_5c = (int *)0x0; @@ -3087,7 +3087,7 @@ LAB_006f68af: iVar7 = (**(code **)(*local_70 + 0x20))(&local_7c); local_5c = *(int **)(iVar7 + 4); } - local_7c = CONCAT44(local_7c._4_4_,KAGE::System::UserProfileBase::vftable); + local_7c = CONCAT44((*(undefined4 *)((char *)&(local_7c) + 0x4)),KAGE::System::UserProfileBase::vftable); local_60 = KAGE::System::UserProfile::vftable; local_8 = 5; local_34 = 0x4f; @@ -3121,7 +3121,7 @@ LAB_006f69a3: ((Entity_Player *)((Entity_Player *)*newPlayerIt))->Entity_Player::InitPostLevelInitStats(); users = (int *)0x1; ((InputManager *)(&PTR_vftable_00c57b18))->InputManager::get_device(&local_60,*(int *)(*newPlayerIt + 0x1618)); - local_8 = CONCAT31(local_8._1_3_,7); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),7); if ((local_60 != (undefined **)0x0) && (iVar7 = __RTDynamicCast(local_60,0,&KAGE::Input::InputDeviceBase::RTTI_Type_Descriptor, &IsaacRepentancePlus::NetInputDevice::RTTI_Type_Descriptor,0), @@ -3129,9 +3129,9 @@ LAB_006f69a3: iVar7 = *(int *)(iVar7 + 0x374); if (iVar7 == 0) { local_7c = 0; - local_7c._4_4_ = (int *)0x0; - local_7c._0_4_ = (undefined **)0x0; - local_70 = local_7c._4_4_; + (*(undefined4 *)((char *)&(local_7c) + 0x4)) = (int *)0x0; + (*(undefined4 *)((char *)&(local_7c) + 0x0)) = (undefined **)0x0; + local_70 = (*(undefined4 *)((char *)&(local_7c) + 0x4)); local_74 = (undefined **)local_7c; } else { @@ -3147,8 +3147,8 @@ LAB_006f69a3: KAGE_LogMessage(1,(byte *)"Setting PersistentGameData ReadOnly to %s\n"); game = g_game; (manager->_persistentGameData)._isReadOnly = 1; - local_28 = (Game *)((game->_stage - (int)users) + -1); - if (0 < (int)local_28) { + local_28 = (Game *)((game->_stage - GHIDRA_INT(users)) + -1); + if (0 < GHIDRA_INT(local_28)) { local_34 = 0x13; uVar10 = 0; uVar5 = *(uint *)(*newPlayerIt + 0x3ec); @@ -3188,7 +3188,7 @@ LAB_006f69a3: iVar7 = 1; } else { - iVar7 = (-(uint)(uVar10 < 0x23) & 6) + 2; + iVar7 = (-GHIDRA_UINT((uVar10 < 0x23)) & 6) + 2; } local_54 = &game->_itemPool; if (uVar5 == 0) { @@ -3203,7 +3203,7 @@ LAB_006f69a3: iVar7 = ItemPool::GetCollectible(local_54,iVar7,local_50,0,0,0); if ((((iVar7 != 0) && (pvVar12 = (g_manager->_itemConfig)._collectibles._begin, - iVar7 < (int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar12 >> 2)) && + iVar7 < GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar12) >> 2)) && (iVar7 != 0xeb)) && ((iVar7 != 0x2b && (iVar7 != 0x3d)))) { if (g_game == (Game *)0x0) { if (-1 < iVar7) goto LAB_006f6c78; @@ -3213,8 +3213,8 @@ LAB_006f69a3: iVar11 = -1 - iVar7; if ((iVar11 < 0) || (proceduralItems = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)(g_game->_proceduralItemManager)._proceduralItems._end - - (int)proceduralItems >> 2 <= iVar11)) { + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - + GHIDRA_INT(proceduralItems) >> 2 <= iVar11)) { iVar11 = 0; } else { @@ -3234,7 +3234,7 @@ LAB_006f6c78: iVar11 = -1 - iVar7; if ((iVar11 < 0) || (pvVar12 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar12 + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar12) >> 2 <= iVar11)) { piVar8 = (int *)0x0; } @@ -3263,28 +3263,28 @@ LAB_006f6cb6: LAB_006f6d10: game = g_game; uVar5 = local_50; - } while (0 < (int)local_28); + } while (0 < GHIDRA_INT(local_28)); } manager = g_manager; KAGE_LogMessage(1,(byte *)"Setting PersistentGameData ReadOnly to %s\n"); (manager->_persistentGameData)._isReadOnly = 0; } - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; if (((local_5c != (int *)0x0) && (cVar4 = (**(code **)(*local_5c + 0xc))(), cVar4 != '\0')) && (g_inputDeviceRelease != (void *)0x0)) { (*g_inputDeviceRelease)(&local_60); } newPlayerIt = newPlayerIt + 1; - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; } while (newPlayerIt != newPlayersEnd); } if (local_2c != (Entity_Player *)0x0) { - uVar5 = (int)newPlayersCapacity - (int)local_2c & 0xfffffffc; + uVar5 = GHIDRA_INT(newPlayersCapacity) - GHIDRA_INT(local_2c) & 0xfffffffc; pEVar6 = local_2c; if (0xfff < uVar5) { pEVar6 = *(Entity_Player **)&(*(undefined1 *)((char *)&(local_2c[-1]) + 0x2efc)); uVar5 = uVar5 + 0x23; - if (0x1f < (uint)((int)local_2c + (-4 - (int)pEVar6))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_2c) + (-4 - GHIDRA_INT(pEVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -3333,7 +3333,7 @@ void Game::StartDailyChallenge(DailyChallenge *daily) uStack_8 = 0xffffffff; puStack_c = &LAB_00afbf35; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(tmpString + 0x2c); + local_18 = __security_cookie ^ GHIDRA_UINT((tmpString + 0x2c)); ExceptionList = &local_10; g_game->_isStarted = 1; seedEffectSet->_difficulty = (daily->_params)._difficulty; @@ -3350,7 +3350,7 @@ void Game::StartDailyChallenge(DailyChallenge *daily) (seedEffectSet->_seedEffects)._gameStartSeed = 0; pvVar2 = *seedEffectSet; (seedEffectSet->_seedEffects)._isCustomRun = 0; - seedEffectRoot = *(_Tree_node **)((int)pvVar2 + 4); + seedEffectRoot = *(_Tree_node **)(GHIDRA_INT(pvVar2) + 4); uVar4 = 0x6f6e9a; FID_conflict__Erase_tree_>_> (seedEffectSet,(fuzzer_allocator_> *)seedEffectSet, @@ -3362,34 +3362,34 @@ void Game::StartDailyChallenge(DailyChallenge *daily) (seedEffectSet->_seedEffects)._isCustomRun = 1; Seeds::Seed2String(asStackY_c98 + 0x81,daily->_seed); seed._buf[4] = (char)in_stack_ffffff84; - seed._buf[5] = (char)((uint)in_stack_ffffff84 >> 8); - seed._buf[6] = (char)((uint)in_stack_ffffff84 >> 0x10); - seed._buf[7] = (char)((uint)in_stack_ffffff84 >> 0x18); + seed._buf[5] = (char)(GHIDRA_UINT(in_stack_ffffff84) >> 8); + seed._buf[6] = (char)(GHIDRA_UINT(in_stack_ffffff84) >> 0x10); + seed._buf[7] = (char)(GHIDRA_UINT(in_stack_ffffff84) >> 0x18); seed._buf[0] = (char)in_stack_ffffff80; - seed._buf[1] = (char)((uint)in_stack_ffffff80 >> 8); - seed._buf[2] = (char)((uint)in_stack_ffffff80 >> 0x10); - seed._buf[3] = (char)((uint)in_stack_ffffff80 >> 0x18); + seed._buf[1] = (char)(GHIDRA_UINT(in_stack_ffffff80) >> 8); + seed._buf[2] = (char)(GHIDRA_UINT(in_stack_ffffff80) >> 0x10); + seed._buf[3] = (char)(GHIDRA_UINT(in_stack_ffffff80) >> 0x18); seed._buf[8] = (char)in_stack_ffffff88; - seed._buf[9] = (char)((uint)in_stack_ffffff88 >> 8); - seed._buf[10] = (char)((uint)in_stack_ffffff88 >> 0x10); - seed._buf[0xb] = (char)((uint)in_stack_ffffff88 >> 0x18); + seed._buf[9] = (char)(GHIDRA_UINT(in_stack_ffffff88) >> 8); + seed._buf[10] = (char)(GHIDRA_UINT(in_stack_ffffff88) >> 0x10); + seed._buf[0xb] = (char)(GHIDRA_UINT(in_stack_ffffff88) >> 0x18); seed._buf[0xc] = (char)uVar4; - seed._buf[0xd] = (char)((uint)uVar4 >> 8); - seed._buf[0xe] = (char)((uint)uVar4 >> 0x10); - seed._buf[0xf] = (char)((uint)uVar4 >> 0x18); - seed._size = (uint)seedEffectSet; - seed._capacity = (uint)seedEffectRoot; + seed._buf[0xd] = (char)(GHIDRA_UINT(uVar4) >> 8); + seed._buf[0xe] = (char)(GHIDRA_UINT(uVar4) >> 0x10); + seed._buf[0xf] = (char)(GHIDRA_UINT(uVar4) >> 0x18); + seed._size = GHIDRA_UINT(seedEffectSet); + seed._capacity = GHIDRA_UINT(seedEffectRoot); ((Seeds *)(&seedEffectSet->_seedEffects))->Seeds::SetStartSeed(seed); uVar3 = 0; - if ((int)(daily->_params)._seedEffects._end - (int)(daily->_params)._seedEffects._begin >> 2 != 0) + if (GHIDRA_INT((daily->_params)._seedEffects._end) - GHIDRA_INT((daily->_params)._seedEffects._begin) >> 2 != 0) { do { Seeds::AddSeedEffect (&seedEffectSet->_seedEffects, - *(int *)((int)(daily->_params)._seedEffects._begin + uVar3 * 4)); + *(int *)(GHIDRA_INT((daily->_params)._seedEffects._begin) + uVar3 * 4)); uVar3 = uVar3 + 1; - } while (uVar3 < (uint)((int)(daily->_params)._seedEffects._end - - (int)(daily->_params)._seedEffects._begin >> 2)); + } while (uVar3 < GHIDRA_UINT((GHIDRA_INT((daily->_params)._seedEffects._end) - + GHIDRA_INT((daily->_params)._seedEffects._begin) >> 2))); } if ((seedEffectSet->_seedEffects)._gameStartSeed == 0) { KAGE_LogMessage(0x10,(byte *)"Error: Game Start Seed was not set.\n"); @@ -3430,11 +3430,11 @@ void Game::StartDailyChallenge(DailyChallenge *daily) uStack_8 = 0xffffffff; if (0xf < tmpStringCapacity) { uVar3 = tmpStringCapacity + 1; - pvVar2 = (void *)tmpString._0_4_; + pvVar2 = (*(undefined4 *)((char *)&((void *)tmpString) + 0x0)); if (0xfff < uVar3) { - pvVar2 = *(void **)(tmpString._0_4_ + -4); + pvVar2 = *(void **)((*(undefined4 *)((char *)&(tmpString) + 0x0)) + -4); uVar3 = tmpStringCapacity + 0x24; - if (0x1f < (uint)(tmpString._0_4_ + (-4 - (int)pvVar2))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpString) + 0x0)) + (-4 - GHIDRA_INT(pvVar2))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -3449,11 +3449,11 @@ void Game::StartDailyChallenge(DailyChallenge *daily) tmpStringCapacity = 0xf; puStack_20 = (undefined4 *)&DAT_0000000d; tmpString = (undefined1 [8])0x6c6f6f706d657469; - puStack_24 = (undefined4 *)CONCAT22(puStack_24._2_2_,0x6c); + puStack_24 = (undefined4 *)CONCAT22((*(undefined2 *)((char *)&(puStack_24) + 0x2)),0x6c); uStack_8 = 1; ModManager::TryRedirectPath (&g_manager->_modManager,(std_string *)itemPoolPath,(std_string *)tmpString); - uStack_8 = CONCAT31(uStack_8._1_3_,2); + uStack_8 = CONCAT31((*(undefined1 *)((char *)&(uStack_8) + 0x1)),2); filename = extraout_EAX; if (0xf < *(uint *)(extraout_EAX + 0x14)) { filename = *(byte **)extraout_EAX; @@ -3476,28 +3476,28 @@ void Game::StartDailyChallenge(DailyChallenge *daily) uVar3 = uVar3 >> ((byte)(seedEffectSet->_seedEffects)._rng._shift3 & 0x1f) ^ uVar3; (seedEffectSet->_seedEffects)._rng._seed = uVar3; ((ItemPool *)(&seedEffectSet->_itemPool))->ItemPool::Init(uVar3,filename); - uStack_8 = CONCAT31(uStack_8._1_3_,1); + uStack_8 = CONCAT31((*(undefined1 *)((char *)&(uStack_8) + 0x1)),1); if (0xf < itemPoolPathCapacity) { uVar3 = itemPoolPathCapacity + 1; pvVar2 = itemPoolPath[0]; if (0xfff < uVar3) { - pvVar2 = *(void **)((int)itemPoolPath[0] + -4); + pvVar2 = *(void **)(GHIDRA_INT(itemPoolPath[0]) + -4); uVar3 = itemPoolPathCapacity + 0x24; - if (0x1f < (uint)((int)itemPoolPath[0] + (-4 - (int)pvVar2))) goto LAB_006f71ce; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(itemPoolPath[0]) + (-4 - GHIDRA_INT(pvVar2))))) goto LAB_006f71ce; } operator_delete(pvVar2,uVar3); } uStack_8 = 0xffffffff; itemPoolPathSize = 0; itemPoolPathCapacity = 0xf; - itemPoolPath[0] = (void *)((uint)itemPoolPath[0] & 0xffffff00); + itemPoolPath[0] = (void *)(GHIDRA_UINT(itemPoolPath[0]) & 0xffffff00); if (0xf < tmpStringCapacity) { uVar3 = tmpStringCapacity + 1; - pvVar2 = (void *)tmpString._0_4_; + pvVar2 = (*(undefined4 *)((char *)&((void *)tmpString) + 0x0)); if (0xfff < uVar3) { - pvVar2 = *(void **)(tmpString._0_4_ + -4); + pvVar2 = *(void **)((*(undefined4 *)((char *)&(tmpString) + 0x0)) + -4); uVar3 = tmpStringCapacity + 0x24; - if (0x1f < (uint)(tmpString._0_4_ + (-4 - (int)pvVar2))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpString) + 0x0)) + (-4 - GHIDRA_INT(pvVar2))))) { LAB_006f71ce: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3579,7 +3579,7 @@ void Game::StartFromRerunState(GameState *state) local_8 = 0xffffffff; puStack_c = &LAB_00afbf88; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(auStack_30 + 0x2c); + local_18 = __security_cookie ^ GHIDRA_UINT((auStack_30 + 0x2c)); ExceptionList = &local_10; hud = &g_game->_hud; g_game->_isStarted = 1; @@ -3601,13 +3601,13 @@ void Game::StartFromRerunState(GameState *state) FID_conflict__Erase_tree_>_> (&seedsCopy._seedEffects, (fuzzer_allocator_> *)&seedsCopy._seedEffects, - *(_Tree_node **)((int)seedsCopy._seedEffects + 4)); + *(_Tree_node **)(GHIDRA_INT(seedsCopy._seedEffects) + 4)); operator_delete(seedsCopy._seedEffects,0x14); pvVar2 = (temp_3ff60c61d2->_seedEffects)._seedEffects; hud = &(temp_3ff60c61d2->_seedEffects)._seedEffects; FID_conflict__Erase_tree_>_> (hud,(fuzzer_allocator_> *)hud, - *(_Tree_node **)((int)pvVar2 + 4)); + *(_Tree_node **)(GHIDRA_INT(pvVar2) + 4)); *(void **)((char *)pvVar2 + 4) = pvVar2; *(void **)pvVar2 = pvVar2; *(void **)((char *)pvVar2 + 8) = pvVar2; @@ -3647,11 +3647,11 @@ void Game::StartFromRerunState(GameState *state) local_8 = 0xffffffff; if (0xf < uStack_1c) { seedValue = uStack_1c + 1; - pvVar2 = (void *)auStack_30._0_4_; + pvVar2 = (*(undefined4 *)((char *)&((void *)auStack_30) + 0x0)); if (0xfff < seedValue) { - pvVar2 = *(void **)(auStack_30._0_4_ + -4); + pvVar2 = *(void **)((*(undefined4 *)((char *)&(auStack_30) + 0x0)) + -4); seedValue = uStack_1c + 0x24; - if (0x1f < (uint)(auStack_30._0_4_ + (-4 - (int)pvVar2))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(auStack_30) + 0x0)) + (-4 - GHIDRA_INT(pvVar2))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -3673,35 +3673,35 @@ void Game::StartFromRerunState(GameState *state) local_8 = 2; ModManager::TryRedirectPath (&g_manager->_modManager,(std_string *)itemPoolsPath,(std_string *)auStack_30); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; filename = extraout_EAX; if (0xf < *(uint *)(extraout_EAX + 0x14)) { filename = *(byte **)extraout_EAX; } seedValue = ((Seeds *)(seeds))->Seeds::GetNextSeed(); ((ItemPool *)(&temp_3ff60c61d2->_itemPool))->ItemPool::Init(seedValue,filename); - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); if (0xf < itemPoolsPathCapacity) { seedValue = itemPoolsPathCapacity + 1; pvVar2 = itemPoolsPath[0]; if (0xfff < seedValue) { - pvVar2 = *(void **)((int)itemPoolsPath[0] + -4); + pvVar2 = *(void **)(GHIDRA_INT(itemPoolsPath[0]) + -4); seedValue = itemPoolsPathCapacity + 0x24; - if (0x1f < (uint)((int)itemPoolsPath[0] + (-4 - (int)pvVar2))) goto LAB_006f7624; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(itemPoolsPath[0]) + (-4 - GHIDRA_INT(pvVar2))))) goto LAB_006f7624; } operator_delete(pvVar2,seedValue); } local_8 = 0xffffffff; itemPoolsPathSize = 0; itemPoolsPathCapacity = 0xf; - itemPoolsPath[0] = (void *)((uint)itemPoolsPath[0] & 0xffffff00); + itemPoolsPath[0] = (void *)(GHIDRA_UINT(itemPoolsPath[0]) & 0xffffff00); if (0xf < uStack_1c) { seedValue = uStack_1c + 1; - pvVar2 = (void *)auStack_30._0_4_; + pvVar2 = (*(undefined4 *)((char *)&((void *)auStack_30) + 0x0)); if (0xfff < seedValue) { - pvVar2 = *(void **)(auStack_30._0_4_ + -4); + pvVar2 = *(void **)((*(undefined4 *)((char *)&(auStack_30) + 0x0)) + -4); seedValue = uStack_1c + 0x24; - if (0x1f < (uint)(auStack_30._0_4_ + (-4 - (int)pvVar2))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(auStack_30) + 0x0)) + (-4 - GHIDRA_INT(pvVar2))))) { LAB_006f7624: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3773,7 +3773,7 @@ void Game::StartDebug(int levelStage, int stageType, int difficulty, std_string this_00 = g_game; puStack_c = &LAB_00afbfe9; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(redirectedPath + 0x11); + local_18 = __security_cookie ^ GHIDRA_UINT((redirectedPath + 0x11)); ExceptionList = &local_10; local_8 = (void *)0x0; g_game->_isStarted = 1; @@ -3781,10 +3781,10 @@ void Game::StartDebug(int levelStage, int stageType, int difficulty, std_string this_00->_difficulty = difficulty; this_00->_isDebug = 1; (this_00->_seedEffects)._isCustomRun = 1; - auVar1._4_4_ = in_stack_ffffff90; - auVar1._0_4_ = in_stack_ffffff8c; - auVar1._8_4_ = in_stack_ffffff94; - auVar1._12_8_ = 0; + (*(undefined4 *)((char *)&(auVar1) + 0x4)) = in_stack_ffffff90; + (*(undefined4 *)((char *)&(auVar1) + 0x0)) = in_stack_ffffff8c; + (*(undefined4 *)((char *)&(auVar1) + 0x8)) = in_stack_ffffff94; + (*(undefined8 *)((char *)&(auVar1) + 0xc)) = 0; auVar1 = auVar1 << 0x20; seed._capacity = 0xf; seed._buf[0] = auVar1[0]; @@ -3803,7 +3803,7 @@ void Game::StartDebug(int levelStage, int stageType, int difficulty, std_string seed._buf[0xd] = auVar1[0xd]; seed._buf[0xe] = auVar1[0xe]; seed._buf[0xf] = auVar1[0xf]; - seed._size = auVar1._16_4_; + seed._size = (*(undefined4 *)((char *)&(auVar1) + 0x10)); ((Seeds *)(&this_00->_seedEffects))->Seeds::SetStartSeed(seed); manager = g_manager; if (((((this_00->_seedEffects)._isCustomRun == 0) && @@ -3824,37 +3824,37 @@ void Game::StartDebug(int levelStage, int stageType, int difficulty, std_string itemPoolFile._capacity = 0xf; itemPoolFile._size = 0xd; builtin_strncpy(itemPoolFile._buf,"itempool",8); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((ModManager *)(&g_manager->_modManager))->ModManager::TryRedirectPath((std_string *)redirectedPath,&itemPoolFile); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; itemPoolPath = extraout_EAX; if (0xf < *(uint *)(extraout_EAX + 0x14)) { itemPoolPath = *(byte **)extraout_EAX; } uVar2 = ((Seeds *)(&this_00->_seedEffects))->Seeds::GetNextSeed(); ((ItemPool *)(&this_00->_itemPool))->ItemPool::Init(uVar2,itemPoolPath); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; if (0xf < redirectedPathCapacity) { uVar2 = redirectedPathCapacity + 1; freeBlock = redirectedPath[0]; if (0xfff < uVar2) { - freeBlock = *(void **)((int)redirectedPath[0] + -4); + freeBlock = *(void **)(GHIDRA_INT(redirectedPath[0]) + -4); uVar2 = redirectedPathCapacity + 0x24; - if (0x1f < (uint)((int)redirectedPath[0] + (-4 - (int)freeBlock))) goto LAB_006f793a; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPath[0]) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_006f793a; } operator_delete(freeBlock,uVar2); } - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; redirectedPathSize = 0; redirectedPathCapacity = 0xf; - redirectedPath[0] = (void *)((uint)redirectedPath[0] & 0xffffff00); + redirectedPath[0] = (void *)(GHIDRA_UINT(redirectedPath[0]) & 0xffffff00); if (0xf < itemPoolFile._capacity) { uVar2 = itemPoolFile._capacity + 1; - freeBlock = (void *)itemPoolFile._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)itemPoolFile._buf) + 0x0)); if (0xfff < uVar2) { - freeBlock = *(void **)(itemPoolFile._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(itemPoolFile._buf) + 0x0)) + -4); uVar2 = itemPoolFile._capacity + 0x24; - if (0x1f < (uint)(itemPoolFile._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(itemPoolFile._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { LAB_006f793a: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3879,10 +3879,10 @@ LAB_006f793a: iVar3 = *(int *)ThreadLocalStoragePointer; if ((*(int *)(iVar3 + 0xc) < DAT_00c80e44) && (_Init_thread_header(&DAT_00c80e44), iVar3 = extraout_ECX, DAT_00c80e44 == -1)) { - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; RoomConfig::LoadRoomFromXmlFile(); _atexit((_func_4879 *)&LAB_00b159c0); - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; _Init_thread_footer(&DAT_00c80e44); iVar3 = extraout_ECX_00; } @@ -3894,11 +3894,11 @@ LAB_006f793a: LuaEngine::PostGameStart(0); if (0xf < roomFile._capacity) { uVar2 = roomFile._capacity + 1; - freeBlock = (void *)roomFile._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)roomFile._buf) + 0x0)); if (0xfff < uVar2) { - freeBlock = *(void **)(roomFile._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(roomFile._buf) + 0x0)) + -4); uVar2 = roomFile._capacity + 0x24; - if (0x1f < (roomFile._buf._0_4_ - (int)freeBlock) - 4U) { + if (0x1f < ((*(undefined4 *)((char *)&(roomFile._buf) + 0x0)) - GHIDRA_INT(freeBlock)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -3940,15 +3940,15 @@ void Game::NextVictoryLap() puStack_c = &LAB_00afc04d; local_10 = ExceptionList; - uVar5 = __security_cookie ^ (uint)(redirectedPath + 0x16); + uVar5 = __security_cookie ^ GHIDRA_UINT((redirectedPath + 0x16)); ExceptionList = &local_10; - auStack_44._12_4_ = KAGE::Network::Multiplayer::ConstLobby::vftable; + (*(undefined4 *)((char *)&(auStack_44) + 0xc)) = KAGE::Network::Multiplayer::ConstLobby::vftable; local_34 = (int *)0x0; local_30 = (int *)0x0; local_8 = (void *)0x0; local_14 = uVar5; ((std::shared_ptr *)(auStack_44 + 0x10))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); - auStack_44._12_4_ = KAGE::Network::Multiplayer::Lobby::vftable; + (*(undefined4 *)((char *)&(auStack_44) + 0xc)) = KAGE::Network::Multiplayer::Lobby::vftable; local_8 = (void *)0x1; if ((local_34 == (int *)0x0) || (cVar4 = (**(code **)(*local_34 + 0xc))(uVar5), cVar4 == '\0')) { isLobbyActive = false; @@ -3956,7 +3956,7 @@ void Game::NextVictoryLap() else { isLobbyActive = true; } - auStack_44._12_4_ = KAGE::Network::Multiplayer::ConstLobby::vftable; + (*(undefined4 *)((char *)&(auStack_44) + 0xc)) = KAGE::Network::Multiplayer::ConstLobby::vftable; local_8 = (void *)0x2; if (((local_30 != (int *)0x0) && (cVar4 = (**(code **)(*local_30 + 0xc))(), cVar4 != '\0')) && (g_lobbyReleaseFn != (void *)0x0)) { @@ -3992,14 +3992,14 @@ void Game::NextVictoryLap() pvVar6 = (this->_playerManager)._playerList._end; uVar5 = 0; piVar7 = (this->_playerManager)._playerList._begin; - if ((int)pvVar6 - (int)piVar7 >> 2 != 0) { + if (GHIDRA_INT(pvVar6) - GHIDRA_INT(piVar7) >> 2 != 0) { do { - if ((int)pvVar6 - (int)piVar7 >> 2 == 0) { + if (GHIDRA_INT(pvVar6) - GHIDRA_INT(piVar7) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar6 = (this->_playerManager)._playerList._end; piVar7 = (this->_playerManager)._playerList._begin; } - if (uVar5 < (uint)((int)pvVar6 - (int)piVar7 >> 2)) { + if (uVar5 < GHIDRA_UINT((GHIDRA_INT(pvVar6) - GHIDRA_INT(piVar7) >> 2))) { piVar7 = piVar7 + uVar5; } if (*(int *)(*piVar7 + 0x2c) == 0) { @@ -4013,12 +4013,12 @@ void Game::NextVictoryLap() pvVar6 = (this->_playerManager)._playerList._end; uVar5 = uVar5 + 1; piVar7 = (this->_playerManager)._playerList._begin; - } while (uVar5 < (uint)((int)pvVar6 - (int)piVar7 >> 2)); + } while (uVar5 < GHIDRA_UINT((GHIDRA_INT(pvVar6) - GHIDRA_INT(piVar7) >> 2))); } qVar3 = this->_gameStateFlags; - puVar1 = (uint *)((int)&this->_gameStateFlags + 4); + puVar1 = (uint *)(GHIDRA_INT(&this->_gameStateFlags) + 4); *puVar1 = *puVar1 & 0xfffdffff; - *(int *)&this->_gameStateFlags = (int)qVar3; + *(int *)&this->_gameStateFlags = GHIDRA_INT(qVar3); uVar5 = (this->_seedEffects)._gameStartSeed; if (uVar5 == 0) { KAGE_LogMessage(0x10,(byte *)"Error: Game Start Seed was not set.\n"); @@ -4055,18 +4055,18 @@ void Game::NextVictoryLap() local_8 = (void *)0x6; KAGE_LogMessage(1,(byte *)"RNG Victory Lap Start Seed: %s (%u)\n"); local_8 = (void *)0xffffffff; - if (&DAT_0000000f < (uint)KStack_28._unk) { + if (&DAT_0000000f < GHIDRA_UINT(KStack_28._unk)) { piVar7 = (int *)(KStack_28._unk + 1); pvVar6 = seedString; if ((int *)0xfff < piVar7) { pvVar6 = *(void **)((char *)seedString + -4); piVar7 = (int *)(KStack_28._unk + 0x24); - if (0x1f < (uint)((int)seedString + (-4 - (int)pvVar6))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(seedString) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(pvVar6,(uint)piVar7); + operator_delete(pvVar6,GHIDRA_UINT(piVar7)); } auStack_44[8] = 's'; auStack_44[9] = '.'; @@ -4074,7 +4074,7 @@ void Game::NextVictoryLap() auStack_44[0xb] = 'm'; KStack_28._alpha = 0.0; KStack_28._unk = 0xf; - seedString = (void *)((uint)seedString & 0xffffff00); + seedString = (void *)(GHIDRA_UINT(seedString) & 0xffffff00); local_30 = (int *)0xf; local_34 = (int *)0xd; auStack_44[0] = 'i'; @@ -4085,39 +4085,39 @@ void Game::NextVictoryLap() auStack_44[5] = 'o'; auStack_44[6] = 'o'; auStack_44[7] = 'l'; - auStack_44._12_2_ = 0x6c; + (*(undefined2 *)((char *)&(auStack_44) + 0xc)) = 0x6c; local_8 = (void *)0x7; ModManager::TryRedirectPath (&g_manager->_modManager,(std_string *)redirectedPath,(std_string *)auStack_44); - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; filename = extraout_EAX; if (0xf < *(uint *)(extraout_EAX + 0x14)) { filename = *(byte **)extraout_EAX; } uVar5 = ((Seeds *)(&this->_seedEffects))->Seeds::GetNextSeed(); ((ItemPool *)(&this->_itemPool))->ItemPool::Init(uVar5,filename); - local_8 = (void *)CONCAT31(local_8._1_3_,7); + local_8 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),7); if (0xf < redirectedPathCapacity) { uVar5 = redirectedPathCapacity + 1; pvVar6 = redirectedPath[0]; if (0xfff < uVar5) { - pvVar6 = *(void **)((int)redirectedPath[0] + -4); + pvVar6 = *(void **)(GHIDRA_INT(redirectedPath[0]) + -4); uVar5 = redirectedPathCapacity + 0x24; - if (0x1f < (uint)((int)redirectedPath[0] + (-4 - (int)pvVar6))) goto LAB_006f7f31; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPath[0]) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_006f7f31; } operator_delete(pvVar6,uVar5); } local_8 = (void *)0xffffffff; redirectedPathSize = 0; redirectedPathCapacity = 0xf; - redirectedPath[0] = (void *)((uint)redirectedPath[0] & 0xffffff00); + redirectedPath[0] = (void *)(GHIDRA_UINT(redirectedPath[0]) & 0xffffff00); if (0xf < local_30) { - uVar5 = (int)local_30 + 1; - pvVar6 = (void *)auStack_44._0_4_; + uVar5 = GHIDRA_INT(local_30) + 1; + pvVar6 = (*(undefined4 *)((char *)&((void *)auStack_44) + 0x0)); if (0xfff < uVar5) { - pvVar6 = *(void **)(auStack_44._0_4_ + -4); - uVar5 = (int)local_30 + 0x24; - if (0x1f < (uint)(auStack_44._0_4_ + (-4 - (int)pvVar6))) { + pvVar6 = *(void **)((*(undefined4 *)((char *)&(auStack_44) + 0x0)) + -4); + uVar5 = GHIDRA_INT(local_30) + 0x24; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(auStack_44) + 0x0)) + (-4 - GHIDRA_INT(pvVar6))))) { LAB_006f7f31: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -4233,7 +4233,7 @@ void Game::restore_game_state(GameState *state, byte isContinue) local_8 = 0xffffffff; puStack_c = &LAB_00afc0a8; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&tmpString)[1]._size; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&tmpString)[1]._size); ExceptionList = &local_10; ((Seeds *)(&seedsCopy))->Seeds::construct_from_copy((Seeds *)&(*(undefined1 *)((char *)(state) + 0x1e724))); local_8 = 0; @@ -4242,7 +4242,7 @@ void Game::restore_game_state(GameState *state, byte isContinue) FID_conflict__Erase_tree_>_> (&seedsCopy._seedEffects, (fuzzer_allocator_> *)&seedsCopy._seedEffects, - *(_Tree_node **)((int)seedsCopy._seedEffects + 4)); + *(_Tree_node **)(GHIDRA_INT(seedsCopy._seedEffects) + 4)); operator_delete(seedsCopy._seedEffects,0x14); this->_challenge = *(int *)state; if (((*(undefined1 *)((char *)(state) + 0x5)) == '\0') && (g_manager->_isConsoleEnabled == 0)) { @@ -4302,15 +4302,15 @@ void Game::restore_game_state(GameState *state, byte isContinue) this->_lastLevelWithDamage = *(int *)&(*(undefined1 *)((char *)(state) + 0x1e788)); if (pbVar4 != &(*(undefined1 *)((char *)(state) + 0x1e79c))) { pvVar6 = *(void **)&(*(undefined1 *)((char *)(state) + 0x1e79c)); - _Size = *(int *)&(*(undefined1 *)((char *)(state) + 0x1e7a0)) - (int)pvVar6; + _Size = *(int *)&(*(undefined1 *)((char *)(state) + 0x1e7a0)) - GHIDRA_INT(pvVar6); destData = *(void **)pbVar4; - if ((uint)(*(int *)(this->_encounteredBosses + 8) - (int)destData >> 3) < - (uint)((int)_Size >> 3)) { - std::vector<8byte>::_Clear_and_reserve((int)_Size >> 3); + if (GHIDRA_UINT((*(int *)(this->_encounteredBosses + 8) - GHIDRA_INT(destData) >> 3)) < + GHIDRA_UINT((GHIDRA_INT(_Size) >> 3))) { + std::vector<8byte>::_Clear_and_reserve(GHIDRA_INT(_Size) >> 3); destData = *(void **)pbVar4; } memmove(destData,pvVar6,_Size); - *(size_t *)(this->_encounteredBosses + 4) = _Size + (int)destData; + *(size_t *)(this->_encounteredBosses + 4) = _Size + GHIDRA_INT(destData); } this->_magicSkinUses = *(int *)&(*(undefined1 *)((char *)(state) + 0x1e78c)); std::vector<12byte>::operator_assign(&(*(undefined1 *)((char *)(state) + 0x1e790))); @@ -4333,34 +4333,34 @@ void Game::restore_game_state(GameState *state, byte isContinue) builtin_strncpy(tmpString._buf,"itempool",8); local_8 = 1; ((ModManager *)(&g_manager->_modManager))->ModManager::TryRedirectPath((std_string *)redirectedPath,&tmpString); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; pbVar4 = extraout_EAX; if (0xf < *(uint *)(extraout_EAX + 0x14)) { pbVar4 = *(byte **)extraout_EAX; } ((ItemPool *)(&this->_itemPool))->ItemPool::Init(*(uint *)&(*(undefined1 *)((char *)(state) + 0x1e5bc)),pbVar4); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); if (0xf < redirectedPathCapacity) { bitsLow = redirectedPathCapacity + 1; pvVar6 = redirectedPath[0]; if (0xfff < bitsLow) { - pvVar6 = *(void **)((int)redirectedPath[0] + -4); + pvVar6 = *(void **)(GHIDRA_INT(redirectedPath[0]) + -4); bitsLow = redirectedPathCapacity + 0x24; - if (0x1f < (uint)((int)redirectedPath[0] + (-4 - (int)pvVar6))) goto LAB_006f8543; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPath[0]) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_006f8543; } operator_delete(pvVar6,bitsLow); } local_8 = 0xffffffff; redirectedPathSize = 0; redirectedPathCapacity = 0xf; - redirectedPath[0] = (void *)((uint)redirectedPath[0] & 0xffffff00); + redirectedPath[0] = (void *)(GHIDRA_UINT(redirectedPath[0]) & 0xffffff00); if (0xf < tmpString._capacity) { bitsLow = tmpString._capacity + 1; - pvVar6 = (void *)tmpString._buf._0_4_; + pvVar6 = (*(undefined4 *)((char *)&((void *)tmpString._buf) + 0x0)); if (0xfff < bitsLow) { - pvVar6 = *(void **)(tmpString._buf._0_4_ + -4); + pvVar6 = *(void **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); bitsLow = tmpString._capacity + 0x24; - if (0x1f < (uint)(tmpString._buf._0_4_ + (-4 - (int)pvVar6))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar6))))) { LAB_006f8543: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -4393,11 +4393,11 @@ LAB_006f8543: local_8 = 0xffffffff; if (0xf < tmpString._capacity) { bitsLow = tmpString._capacity + 1; - pvVar6 = (void *)tmpString._buf._0_4_; + pvVar6 = (*(undefined4 *)((char *)&((void *)tmpString._buf) + 0x0)); if (0xfff < bitsLow) { - pvVar6 = *(void **)(tmpString._buf._0_4_ + -4); + pvVar6 = *(void **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); bitsLow = tmpString._capacity + 0x24; - if (0x1f < (uint)(tmpString._buf._0_4_ + (-4 - (int)pvVar6))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -4407,7 +4407,7 @@ LAB_006f8543: manager = g_manager; tmpString._size = 0; tmpString._capacity = 0xf; - tmpString._buf._0_8_ = tmpString._buf._0_8_ & 0xffffffffffffff00; + (*(undefined8 *)((char *)&(tmpString._buf) + 0x0)) = (*(undefined8 *)((char *)&(tmpString._buf) + 0x0)) & 0xffffffffffffff00; if (g_manager->_networkPlay == 0) { if (((((this->_seedEffects)._isCustomRun == 0) && (isConsoleUsed = ((Seeds *)(&this->_seedEffects))->Seeds::AchievementUnlocksDisallowed(), @@ -4436,16 +4436,16 @@ LAB_006f8543: FUN_00422ea0(&(*(undefined1 *)((char *)(state) + 0x1e680))); FUN_009e0340(&(*(undefined1 *)((char *)(state) + 0x1fd98))); pvVar6 = &(*(undefined1 *)((char *)(this) + 0x6778c)); - this->_ascentTimer = (uint)((*(undefined1 *)((char *)(state) + 0x1e7b0)) != '\0'); + this->_ascentTimer = GHIDRA_UINT(((*(undefined1 *)((char *)(state) + 0x1e7b0)) != '\0')); slotState = &(*(undefined1 *)((char *)(state) + 0x1e7b4)); iVar5 = 7; do { ((Game_StateSlot *)(pvVar6))->Game_StateSlot::operator_assign(slotState); - slotState = (void *)((int)slotState + 800); - pvVar6 = (void *)((int)pvVar6 + 800); + slotState = (void *)(GHIDRA_INT(slotState) + 800); + pvVar6 = (void *)(GHIDRA_INT(pvVar6) + 800); iVar5 = iVar5 + -1; } while (iVar5 != 0); - this->_deathCertificateExitTimer = (int)*(short *)&(*(undefined1 *)((char *)(state) + 0x1fd94)); + this->_deathCertificateExitTimer = GHIDRA_INT(*(short *)&(*(undefined1 *)((char *)(state) + 0x1fd94))); oldModeHandler = (this->_deathmatchManager)._type; *(undefined4 *)&this->_deathmatchManager = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_deathmatchManager)) + 0x4)) = 0; @@ -4453,7 +4453,7 @@ LAB_006f8543: (**(code **)*oldModeHandler)(1); (this->_deathmatchManager)._type = (void *)0x0; } - ((DeathmatchManager *)(&this->_deathmatchManager))->DeathmatchManager::set_type((*(undefined1 *)((char *)((uint)(byte)state) + 0x1fddc))); + ((DeathmatchManager *)(&this->_deathmatchManager))->DeathmatchManager::set_type((*(undefined1 *)((char *)(GHIDRA_UINT((byte)state)) + 0x1fddc))); (**(code **)(*(int *)(this->_deathmatchManager)._type + 0x74))(state); ((PlayerManager *)(&this->_playerManager))->PlayerManager::RestoreGameState(state); ((Level *)((Level *)this))->Level::RestoreGameState(state); @@ -4480,7 +4480,7 @@ LAB_006f8543: if ((this->_ambush)._bossRushWaves._begin == (this->_ambush)._bossRushWaves._end) break; std::vector<12byte>::_Tidy(); ppvVar1 = &(this->_ambush)._bossRushWaves._end; - *ppvVar1 = (void *)((int)*ppvVar1 + -0xc); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + -0xc); waveIndex = waveIndex + 1; } while (waveIndex < ((this->_ambush)._currentWave + -1) * *(int *)&(*(undefined1 *)((char *)&((this->_ambush)) + 0x1c))); @@ -4495,8 +4495,8 @@ LAB_006f8543: iVar5 = (g_manager->_musicManager)._currentMusicID; if ((iVar5 == 0x5f) || (iVar5 == 0x40)) { iVar5 = (*(int *)((char *)g_game->_room + 8) == 0x11) + 0x26; - if (iVar5 < ((int)(g_manager->_musicManager)._entries._end - - (int)(g_manager->_musicManager)._entries._begin) / 0x60) { + if (iVar5 < (GHIDRA_INT((g_manager->_musicManager)._entries._end) - + GHIDRA_INT((g_manager->_musicManager)._entries._begin)) / 0x60) { (g_manager->_musicManager)._queuedMusicID = iVar5; } } @@ -4509,21 +4509,21 @@ LAB_006f8543: bitsLow = 0; pvVar6 = (this->_playerManager)._playerList._end; oldModeHandler = (pPVar2->_playerList)._begin; - if ((int)pvVar6 - (int)oldModeHandler >> 2 != 0) { + if (GHIDRA_INT(pvVar6) - GHIDRA_INT(oldModeHandler) >> 2 != 0) { do { - if ((int)pvVar6 - (int)oldModeHandler >> 2 == 0) { + if (GHIDRA_INT(pvVar6) - GHIDRA_INT(oldModeHandler) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar6 = (this->_playerManager)._playerList._end; oldModeHandler = (pPVar2->_playerList)._begin; } - if (bitsLow < (uint)((int)pvVar6 - (int)oldModeHandler >> 2)) { + if (bitsLow < GHIDRA_UINT((GHIDRA_INT(pvVar6) - GHIDRA_INT(oldModeHandler) >> 2))) { oldModeHandler = oldModeHandler + bitsLow; } ((Entity_Player *)((Entity_Player *)*oldModeHandler))->Entity_Player::update_mini_mush_costume(); pvVar6 = (this->_playerManager)._playerList._end; bitsLow = bitsLow + 1; oldModeHandler = (pPVar2->_playerList)._begin; - } while (bitsLow < (uint)((int)pvVar6 - (int)oldModeHandler >> 2)); + } while (bitsLow < GHIDRA_UINT((GHIDRA_INT(pvVar6) - GHIDRA_INT(oldModeHandler) >> 2))); } ExceptionList = local_10; return; @@ -4557,7 +4557,7 @@ void Game::store_game_state(GameState *state) local_8 = 0xffffffff; puStack_c = &LAB_00afc0ed; local_10 = ExceptionList; - securityCookie = __security_cookie ^ (uint)&(&seedsCopy)[1]._rng._shift3; + securityCookie = __security_cookie ^ GHIDRA_UINT(&(&seedsCopy)[1]._rng._shift3); ExceptionList = &local_10; ((GameState *)(state))->GameState::Clear(); ((Seeds *)(&seedsCopy))->Seeds::construct_from_copy(&this->_seedEffects); @@ -4567,7 +4567,7 @@ void Game::store_game_state(GameState *state) FID_conflict__Erase_tree_>_> (&seedsCopy._seedEffects, (fuzzer_allocator_> *)&seedsCopy._seedEffects, - *(_Tree_node **)((int)seedsCopy._seedEffects + 4)); + *(_Tree_node **)(GHIDRA_INT(seedsCopy._seedEffects) + 4)); operator_delete(seedsCopy._seedEffects,0x14); *(int *)&(*(undefined1 *)((char *)(state) + 0x1e780)) = (this->_playerManager)._rng._seed; i = 0; @@ -4615,15 +4615,15 @@ void Game::store_game_state(GameState *state) *(int *)&(*(undefined1 *)((char *)(state) + 0x1e788)) = this->_lastLevelWithDamage; if (&(*(undefined1 *)((char *)(state) + 0x1e79c)) != this->_encounteredBosses) { pvVar3 = *(void **)this->_encounteredBosses; - bossesBytes = *(int *)(this->_encounteredBosses + 4) - (int)pvVar3; + bossesBytes = *(int *)(this->_encounteredBosses + 4) - GHIDRA_INT(pvVar3); dstBosses = *(void **)&(*(undefined1 *)((char *)(state) + 0x1e79c)); - if ((uint)(*(int *)&(*(undefined1 *)((char *)(state) + 0x1e7a4)) - (int)dstBosses >> 3) < (uint)((int)bossesBytes >> 3)) + if (GHIDRA_UINT((*(int *)&(*(undefined1 *)((char *)(state) + 0x1e7a4)) - GHIDRA_INT(dstBosses) >> 3)) < GHIDRA_UINT((GHIDRA_INT(bossesBytes) >> 3))) { - std::vector<8byte>::_Clear_and_reserve((int)bossesBytes >> 3); + std::vector<8byte>::_Clear_and_reserve(GHIDRA_INT(bossesBytes) >> 3); dstBosses = *(void **)&(*(undefined1 *)((char *)(state) + 0x1e79c)); } memmove(dstBosses,pvVar3,bossesBytes); - *(size_t *)&(*(undefined1 *)((char *)(state) + 0x1e7a0)) = (int)dstBosses + bossesBytes; + *(size_t *)&(*(undefined1 *)((char *)(state) + 0x1e7a0)) = GHIDRA_INT(dstBosses) + bossesBytes; } *(int *)&(*(undefined1 *)((char *)(state) + 0x1e7a8)) = this->_pixelationTimer; *(int *)&(*(undefined1 *)((char *)(state) + 0x1e7ac)) = this->_pixelationDuration; @@ -4632,18 +4632,18 @@ void Game::store_game_state(GameState *state) ((ItemPool *)(&this->_itemPool))->ItemPool::StoreGameState((GameStateItemPool *)&(*(undefined1 *)((char *)(state) + 0x1e3cc))); FUN_00422f80(&(*(undefined1 *)((char *)(state) + 0x1e680))); std::vector<4byte>::resize - ((int)(this->_proceduralItemManager)._proceduralItems._end - - (int)(this->_proceduralItemManager)._proceduralItems._begin >> 2); + (GHIDRA_INT((this->_proceduralItemManager)._proceduralItems._end) - + GHIDRA_INT((this->_proceduralItemManager)._proceduralItems._begin) >> 2); i = 0; - if ((int)(this->_proceduralItemManager)._proceduralItems._end - - (int)(this->_proceduralItemManager)._proceduralItems._begin >> 2 != 0) { + if (GHIDRA_INT((this->_proceduralItemManager)._proceduralItems._end) - + GHIDRA_INT((this->_proceduralItemManager)._proceduralItems._begin) >> 2 != 0) { do { *(undefined4 *)(*(int *)&(*(undefined1 *)((char *)(state) + 0x1fd98)) + i * 4) = *(undefined4 *) - (*(int *)((int)(this->_proceduralItemManager)._proceduralItems._begin + i * 4) + 8); + (*(int *)(GHIDRA_INT((this->_proceduralItemManager)._proceduralItems._begin) + i * 4) + 8); i = i + 1; - } while (i < (uint)((int)(this->_proceduralItemManager)._proceduralItems._end - - (int)(this->_proceduralItemManager)._proceduralItems._begin >> 2)); + } while (i < GHIDRA_UINT((GHIDRA_INT((this->_proceduralItemManager)._proceduralItems._end) - + GHIDRA_INT((this->_proceduralItemManager)._proceduralItems._begin) >> 2))); } ((Room *)(this->_room))->Room::on_leave(); ((Level *)((Level *)this))->Level::store_game_state(state); @@ -4654,8 +4654,8 @@ void Game::store_game_state(GameState *state) iVar4 = 7; do { ((Game_StateSlot *)(pvVar3))->Game_StateSlot::operator_assign(stateSlot); - stateSlot = (void *)((int)stateSlot + 800); - pvVar3 = (void *)((int)pvVar3 + 800); + stateSlot = (void *)(GHIDRA_INT(stateSlot) + 800); + pvVar3 = (void *)(GHIDRA_INT(pvVar3) + 800); iVar4 = iVar4 + -1; } while (iVar4 != 0); iVar4 = 0xe; @@ -4698,7 +4698,7 @@ void Game::End(int EndingID) manager = g_manager; game = g_game; - if (0xe < (uint)EndingID) { + if (0xe < GHIDRA_UINT(EndingID)) { KAGE_LogMessage(1,(byte *)"Invalid ending specified to ((Game *)())->Game::End()\n"); return; } @@ -4762,7 +4762,7 @@ LAB_006f97bc: *(undefined1 *)&manager->_persistentGameData = 1; (*(undefined1 *)((char *)&((manager->_cutsceneManager)) + 0x848)) = 1; (manager->_cutsceneManager)._isQueuedCleanup = isCleanup; - manager->_cutsceneNextMenuState = (int)nextMenuState; + manager->_cutsceneNextMenuState = GHIDRA_INT(nextMenuState); (manager->_cutsceneManager)._queuedCutsceneId = 3; break; case 3: @@ -4803,7 +4803,7 @@ LAB_006f97bc: default: uVar1 = 2; } - ((Manager *)(nextMenuState))->Manager::ShowCutscene(uVar1,isCleanup,(uint)nextMenuState); + ((Manager *)(nextMenuState))->Manager::ShowCutscene(uVar1,isCleanup,GHIDRA_UINT(nextMenuState)); manager = g_manager; game = g_game; goto LAB_006f995b; @@ -4816,7 +4816,7 @@ LAB_006f97bc: *(undefined1 *)&manager->_persistentGameData = 1; (*(undefined1 *)((char *)&((manager->_cutsceneManager)) + 0x848)) = 1; (manager->_cutsceneManager)._isQueuedCleanup = isCleanup; - manager->_cutsceneNextMenuState = (int)nextMenuState; + manager->_cutsceneNextMenuState = GHIDRA_INT(nextMenuState); (manager->_cutsceneManager)._queuedCutsceneId = 0xf; break; case 5: @@ -4828,7 +4828,7 @@ LAB_006f97bc: *(undefined1 *)&manager->_persistentGameData = 1; (*(undefined1 *)((char *)&((manager->_cutsceneManager)) + 0x848)) = 1; (manager->_cutsceneManager)._isQueuedCleanup = isCleanup; - manager->_cutsceneNextMenuState = (int)nextMenuState; + manager->_cutsceneNextMenuState = GHIDRA_INT(nextMenuState); (manager->_cutsceneManager)._queuedCutsceneId = 0x10; break; case 6: @@ -4840,7 +4840,7 @@ LAB_006f97bc: *(undefined1 *)&manager->_persistentGameData = 1; (*(undefined1 *)((char *)&((manager->_cutsceneManager)) + 0x848)) = 1; (manager->_cutsceneManager)._isQueuedCleanup = isCleanup; - manager->_cutsceneNextMenuState = (int)nextMenuState; + manager->_cutsceneNextMenuState = GHIDRA_INT(nextMenuState); (manager->_cutsceneManager)._queuedCutsceneId = 0x12; break; case 7: @@ -4852,7 +4852,7 @@ LAB_006f97bc: *(undefined1 *)&manager->_persistentGameData = 1; (*(undefined1 *)((char *)&((manager->_cutsceneManager)) + 0x848)) = 1; (manager->_cutsceneManager)._isQueuedCleanup = isCleanup; - manager->_cutsceneNextMenuState = (int)nextMenuState; + manager->_cutsceneNextMenuState = GHIDRA_INT(nextMenuState); (manager->_cutsceneManager)._queuedCutsceneId = 0x11; break; case 8: @@ -4864,7 +4864,7 @@ LAB_006f97bc: *(undefined1 *)&manager->_persistentGameData = 1; (*(undefined1 *)((char *)&((manager->_cutsceneManager)) + 0x848)) = 1; (manager->_cutsceneManager)._isQueuedCleanup = isCleanup; - manager->_cutsceneNextMenuState = (int)nextMenuState; + manager->_cutsceneNextMenuState = GHIDRA_INT(nextMenuState); (manager->_cutsceneManager)._queuedCutsceneId = 0x13; break; case 9: @@ -4876,7 +4876,7 @@ LAB_006f97bc: *(undefined1 *)&manager->_persistentGameData = 1; (*(undefined1 *)((char *)&((manager->_cutsceneManager)) + 0x848)) = 1; (manager->_cutsceneManager)._isQueuedCleanup = isCleanup; - manager->_cutsceneNextMenuState = (int)nextMenuState; + manager->_cutsceneNextMenuState = GHIDRA_INT(nextMenuState); (manager->_cutsceneManager)._queuedCutsceneId = 0x15; break; case 10: @@ -4888,7 +4888,7 @@ LAB_006f97bc: *(undefined1 *)&manager->_persistentGameData = 1; (*(undefined1 *)((char *)&((manager->_cutsceneManager)) + 0x848)) = 1; (manager->_cutsceneManager)._isQueuedCleanup = isCleanup; - manager->_cutsceneNextMenuState = (int)nextMenuState; + manager->_cutsceneNextMenuState = GHIDRA_INT(nextMenuState); (manager->_cutsceneManager)._queuedCutsceneId = 0x14; break; case 0xb: @@ -4900,7 +4900,7 @@ LAB_006f97bc: *(undefined1 *)&manager->_persistentGameData = 1; (*(undefined1 *)((char *)&((manager->_cutsceneManager)) + 0x848)) = 1; (manager->_cutsceneManager)._isQueuedCleanup = isCleanup; - manager->_cutsceneNextMenuState = (int)nextMenuState; + manager->_cutsceneNextMenuState = GHIDRA_INT(nextMenuState); (manager->_cutsceneManager)._queuedCutsceneId = 0x16; break; case 0xc: @@ -4912,7 +4912,7 @@ LAB_006f97bc: *(undefined1 *)&manager->_persistentGameData = 1; (*(undefined1 *)((char *)&((manager->_cutsceneManager)) + 0x848)) = 1; (manager->_cutsceneManager)._isQueuedCleanup = isCleanup; - manager->_cutsceneNextMenuState = (int)nextMenuState; + manager->_cutsceneNextMenuState = GHIDRA_INT(nextMenuState); (manager->_cutsceneManager)._queuedCutsceneId = 0x17; break; case 0xd: @@ -4924,7 +4924,7 @@ LAB_006f97bc: *(undefined1 *)&manager->_persistentGameData = 1; (*(undefined1 *)((char *)&((manager->_cutsceneManager)) + 0x848)) = 1; (manager->_cutsceneManager)._isQueuedCleanup = isCleanup; - manager->_cutsceneNextMenuState = (int)nextMenuState; + manager->_cutsceneNextMenuState = GHIDRA_INT(nextMenuState); (manager->_cutsceneManager)._queuedCutsceneId = 0x18; break; case 0xe: @@ -4936,7 +4936,7 @@ LAB_006f97bc: *(undefined1 *)&manager->_persistentGameData = 1; (*(undefined1 *)((char *)&((manager->_cutsceneManager)) + 0x848)) = 1; (manager->_cutsceneManager)._isQueuedCleanup = isCleanup; - manager->_cutsceneNextMenuState = (int)nextMenuState; + manager->_cutsceneNextMenuState = GHIDRA_INT(nextMenuState); (manager->_cutsceneManager)._queuedCutsceneId = 0x1a; break; default: @@ -5030,8 +5030,8 @@ void Game::Exit(byte ShouldSave) statsEntry = (gameData->_onlineStatsScreen)._players._begin; if (statsEntry != playersEnd) { do { - ((std::string *)((char *)((int)statsEntry + 8)))->std::string::_Tidy_deallocate(); - statsEntry = (void *)((int)statsEntry + 0x38); + ((std::string *)((char *)(GHIDRA_INT(statsEntry) + 8)))->std::string::_Tidy_deallocate(); + statsEntry = (void *)(GHIDRA_INT(statsEntry) + 0x38); } while (statsEntry != playersEnd); statsEntry = (gameData->_onlineStatsScreen)._players._begin; } @@ -5083,7 +5083,7 @@ void Game::Exit(byte ShouldSave) iVar4 = iVar4 + -1; } while (iVar4 != 0); _ShouldSave = _ShouldSave + 0x31; - piStack_8 = (int *)((int)piStack_8 + -1); + piStack_8 = (int *)(GHIDRA_INT(piStack_8) + -1); } while (piStack_8 != (int *)0x0); ((Console *)(&gameData->_console))->Console::Close(); FUN_007384d0(); @@ -5120,12 +5120,12 @@ void Game::Exit(byte ShouldSave) } } else { - isNil = *(char *)((int)_ShouldSave[1] + 0xd); + isNil = *(char *)(GHIDRA_INT(_ShouldSave[1]) + 0xd); piVar2 = (int *)_ShouldSave[1]; piVar3 = (int *)_ShouldSave; while ((_ShouldSave = (uint *)piVar2, isNil == '\0' && (piVar3 == (int *)_ShouldSave[2]))) { - isNil = *(char *)((int)_ShouldSave[1] + 0xd); + isNil = *(char *)(GHIDRA_INT(_ShouldSave[1]) + 0xd); piVar2 = (int *)_ShouldSave[1]; piVar3 = (int *)_ShouldSave; } @@ -5311,12 +5311,12 @@ LAB_006fb16a: local_11 = '\0'; } pPVar9 = local_24; - if (((uint)local_24 & 2) != 0) { - pPVar9 = (PauseScreen *)((uint)local_24 & 0xfffffffd); + if ((GHIDRA_UINT(local_24) & 2) != 0) { + pPVar9 = (PauseScreen *)(GHIDRA_UINT(local_24) & 0xfffffffd); local_30 = KAGE::System::UserProfileBase::vftable; } uStack_8 = 0xffffffff; - if (((uint)pPVar9 & 1) != 0) { + if ((GHIDRA_UINT(pPVar9) & 1) != 0) { ((KAGE::Network::Multiplayer::ConstLobby *)(lobby))->KAGE::Network::Multiplayer::ConstLobby::~ConstLobby(); manager = g_manager; } @@ -5364,18 +5364,18 @@ LAB_006fb28b: if (local_11 != '\0') { local_1c = 0; lobbyMembersBytes = - (int)(g_manager->_lobbyMembers)._end - (int)(g_manager->_lobbyMembers)._begin; + GHIDRA_INT((g_manager->_lobbyMembers)._end) - GHIDRA_INT((g_manager->_lobbyMembers)._begin); iVar7 = lobbyMembersBytes >> 0x1f; if (lobbyMembersBytes / 0x14 + iVar7 != iVar7) { iVar7 = 0; do { pvVar1 = (manager->_lobbyMembers)._begin; local_1c = local_1c + 1; - *(byte *)(iVar7 + 8 + (int)pvVar1) = *(byte *)(iVar7 + 8 + (int)pvVar1) | 1; + *(byte *)(iVar7 + 8 + GHIDRA_INT(pvVar1)) = *(byte *)(iVar7 + 8 + GHIDRA_INT(pvVar1)) | 1; iVar7 = iVar7 + 0x14; } while (local_1c < - (uint)(((int)(manager->_lobbyMembers)._end - (int)(manager->_lobbyMembers)._begin) - / 0x14)); + GHIDRA_UINT(((GHIDRA_INT((manager->_lobbyMembers)._end) - GHIDRA_INT((manager->_lobbyMembers)._begin)) + / 0x14))); this = savedThis; } FUN_0090c560(); @@ -5423,7 +5423,7 @@ LAB_006fb3bd: if (local_24 != g_onlineVoteMap) { pPVar13 = (PauseScreen *)0x0; do { - pPVar9 = (PauseScreen *)((int)&pPVar13->_state + 1); + pPVar9 = (PauseScreen *)(GHIDRA_INT(&pPVar13->_state) + 1); if (*(int *)&(*(undefined1 *)((char *)(local_24) + 0x18)) != 0) { pPVar9 = pPVar13; } @@ -5527,26 +5527,26 @@ LAB_006fb6ae: if (0.0 < (this->_fadeInColor)._alpha) { if ((g_manager->_netplayManager == *(NetplayManager *)(g_manager + 1)) && (local_11 == 0)) { timeNs = GetTimeNs(); - uVar10 = (uint)(timeNs >> 0x20); + uVar10 = GHIDRA_UINT((timeNs >> 0x20)); uVar2 = (timeNs & 0xffffffff) * 0xd7b634db; local_30 = (undefined **)uVar2; lVar3 = (timeNs & 0xffffffff) * 0x431bde82; local_28 = (undefined4)((ulonglong)lVar3 >> 0x20); lVar4 = (ulonglong)uVar10 * 0xd7b634db; - local_1c = (uint)((ulonglong)lVar4 >> 0x20); + local_1c = GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)); lVar5 = (ulonglong)uVar10 * 0x431bde82; local_24 = (PauseScreen *)lVar5; uVar2 = lVar4 + (uVar2 >> 0x20); - uVar11 = (uint)(uVar2 >> 0x20); + uVar11 = GHIDRA_UINT((uVar2 >> 0x20)); lVar3 = lVar3 + (uVar2 & 0xffffffff); local_20 = (undefined4)lVar3; - uVar10 = (uint)((ulonglong)lVar3 >> 0x20); + uVar10 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); lVar5 = lVar5 + (ulonglong)CONCAT14(CARRY4(uVar11,uVar10),uVar11 + uVar10); - uVar10 = (uint)((ulonglong)lVar5 >> 0x20); - uVar11 = (uint)lVar5 >> 0x12 | uVar10 * 0x4000; + uVar10 = GHIDRA_UINT(((ulonglong)lVar5 >> 0x20)); + uVar11 = GHIDRA_UINT(lVar5) >> 0x12 | uVar10 * 0x4000; local_2c = (PauseScreen *) (((uVar10 >> 0x12) - *(int *)&(*(undefined1 *)((char *)(g_manager) + 0x4ae24))) - - (uint)(uVar11 < *(uint *)&(*(undefined1 *)((char *)(g_manager) + 0x4ae20)))); + GHIDRA_UINT((uVar11 < *(uint *)&(*(undefined1 *)((char *)(g_manager) + 0x4ae20))))); this = savedThis; if ((local_2c == (PauseScreen *)0x0) && (manager = g_manager, uVar11 - *(int *)&(*(undefined1 *)((char *)(g_manager) + 0x4ae20)) < 0xbb9)) @@ -5640,7 +5640,7 @@ LAB_006fb811: game->_leaveDoor = -1; iStack_80 = 0x6fb9f7; StartRoomTransition(game,*(int *)&(*(undefined1 *)((char *)(game) + 0x18900)),-1,0x14,(Entity_Player *)0x0, - (*(undefined1 *)((char *)((int)(char)game) + 0x18904))); + (*(undefined1 *)((char *)(GHIDRA_INT((char)game)) + 0x18904))); } } this->_timeCounter = this->_timeCounter + 1; @@ -5697,7 +5697,7 @@ LAB_006fb811: *(int *)&(*(undefined1 *)((char *)(savedThis) + 0x67730)) = *(int *)&(*(undefined1 *)((char *)(savedThis) + 0x67730)) + -1; std::vector::_Tidy(); std::vector::_Tidy(); - FID_conflict__Tidy((int *)((int)debugNode + 0x1c)); + FID_conflict__Tidy((int *)(GHIDRA_INT(debugNode) + 0x1c)); FUN_0042f240(); operator_delete((void *)debugNode,0x40); this = savedThis; @@ -5824,14 +5824,14 @@ void Game::Render() char *room; int transitionDuration; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00afc1d6; local_1c = ExceptionList; - stackCookie = __security_cookie ^ (int)register0x00000010 - 0x10U; + stackCookie = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; local_88 = this; - puVar9 = (undefined1 *)((int)register0x00000010 + -4); + puVar9 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); if (this->_triggerWindowResize != 0) { recreate_render_targets(); this->_triggerWindowResize = 0; @@ -6029,7 +6029,7 @@ LAB_006fbfa2: g_graphicsManager_blendMode[3] = 1; g_graphicsManager_blendMode[4] = 0; g_currentShader = shader; - ((Shader *)(shader))->Shader::set_uniform((byte *)"Amount",8,&(this->_currentColorModifier)._amount,(int)shader); + ((Shader *)(shader))->Shader::set_uniform((byte *)"Amount",8,&(this->_currentColorModifier)._amount,GHIDRA_INT(shader)); ((Shader *)(g_currentShader))->Shader::set_uniform((byte *)"Brightness",8, &(this->_currentColorModifier)._brightness,unused); ((Shader *)(g_currentShader))->Shader::set_uniform((byte *)"Contrast",8, @@ -6148,7 +6148,7 @@ LAB_006fbfa2: __uint_to_double_fixup[-(DAT_00c79774[7] >> 0x1f)]); local_2c.x = 2.0 / (float)((double)DAT_00c79774[6] + __uint_to_double_fixup[-(DAT_00c79774[6] >> 0x1f)]); - ((Shader *)(shader))->Shader::set_uniform((byte *)"BloomAmount",8,&local_78,(int)DAT_00c79774); + ((Shader *)(shader))->Shader::set_uniform((byte *)"BloomAmount",8,&local_78,GHIDRA_INT(DAT_00c79774)); ((Shader *)(g_currentShader))->Shader::set_uniform((byte *)"Ratio",9,&local_2c,unused_01); bloomBottomLeftX = 0; bloomParams = 0; @@ -6198,7 +6198,7 @@ LAB_006fbfa2: local_2c.x = (float)((double)DAT_00c79758[6] + __uint_to_double_fixup[-(DAT_00c79758[6] >> 0x1f)]); g_currentShader = shader; - ((Shader *)(shader))->Shader::set_uniform((byte *)"PixelationAmount",8,&local_84.y,(int)DAT_00c79758); + ((Shader *)(shader))->Shader::set_uniform((byte *)"PixelationAmount",8,&local_84.y,GHIDRA_INT(DAT_00c79758)); ((Shader *)(g_currentShader))->Shader::set_uniform((byte *)"ScreenSize",0xb,&screenSize,unused_02); pixelationBottomLeftX = 0; pixelationParams = 0; @@ -6252,13 +6252,13 @@ LAB_006fbfa2: local_2c.x = (float)((double)DAT_00c7979c[6] + __uint_to_double_fixup[-(DAT_00c7979c[6] >> 0x1f)]); g_currentShader = shader; - ((Shader *)(shader))->Shader::set_uniform((byte *)"Amount",8,&local_78,(int)DAT_00c7979c); + ((Shader *)(shader))->Shader::set_uniform((byte *)"Amount",8,&local_78,GHIDRA_INT(DAT_00c7979c)); ((Shader *)(g_currentShader))->Shader::set_uniform((byte *)"ScreenSize",0xb,&screenSize,unused_03); puVar9 = screenQuad; (**(code **)(*DAT_00c7979c + 0x14))(&shaderParams); if ((float)local_78 < 0.999) { uVar5 = g_manager->_framecount & 0x80000003; - if ((int)uVar5 < 0) { + if (GHIDRA_INT(uVar5) < 0) { uVar5 = (uVar5 - 1 | 0xfffffffc) + 1; } if ((uVar5 == 1) || (uVar5 == 3)) { @@ -6299,7 +6299,7 @@ LAB_006fbfa2: if ((DAT_00c7911c & 1) == 0) { shader = g_currentShader; } - local_c0._unk._0_1_ = 1; + (*(undefined1 *)((char *)&(local_c0._unk) + 0x0)) = 1; pvVar10 = (void *)0x6fce6d; g_currentShader = shader; clickerQuadTopRightY = clickerQuadTopLeftY; @@ -6350,7 +6350,7 @@ LAB_006fbfa2: local_2c.x = (float)((double)DAT_00c79794[6] + __uint_to_double_fixup[-(DAT_00c79794[6] >> 0x1f)]); g_currentShader = shader; - ((Shader *)(shader))->Shader::set_uniform(&DAT_00b6837c,8,&local_88,(int)DAT_00c79794); + ((Shader *)(shader))->Shader::set_uniform(&DAT_00b6837c,8,&local_88,GHIDRA_INT(DAT_00c79794)); ((Shader *)(g_currentShader))->Shader::set_uniform((byte *)"ScreenSize",0xb,&screenSize,unused_04); (**(code **)(*DAT_00c79794 + 0x14))(&shaderParams); iVar6 = extraout_ECX_00; @@ -6390,9 +6390,9 @@ LAB_006fbfa2: Manager::render_loading_icon((this->_fadeInColor)._alpha); } } - if ((((uint)this->_debugFlags >> 0xb & 1) != 0) && - ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0)) { + if (((GHIDRA_UINT(this->_debugFlags) >> 0xb & 1) != 0) && + (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0)) { debugPlayer = GetPlayer(g_game,0); local_2c.x = 10.0; local_2c.y = 10.0; @@ -6435,7 +6435,7 @@ byte Game::IsPaused() if (g_manager->_netplayManager == *(NetplayManager *)(g_manager + 1)) { return 1; } - if (((int)*(NetplayManager *)(g_manager + 1) - (int)g_manager->_netplayManager & 0xfffffffcU) == + if ((GHIDRA_INT(*(NetplayManager *)(g_manager + 1)) - GHIDRA_INT(g_manager->_netplayManager) & 0xfffffffcU) == 4) { return 1; } @@ -6483,13 +6483,13 @@ void Game::interpolate_update() do { player = *(Entity_Player **)(*(int *)((char *)pvVar4 + 0x125c) + i * 4); if (player->_type == 1) { - flagsHigh = *(undefined4 *)((int)&player->_flags + 4); - *(uint *)&player->_flags = (uint)player->_flags | 0x4000; - *(undefined4 *)((int)&player->_flags + 4) = flagsHigh; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&player->_flags) + 4); + *(uint *)&player->_flags = GHIDRA_UINT(player->_flags) | 0x4000; + *(undefined4 *)(GHIDRA_INT(&player->_flags) + 4) = flagsHigh; player->Update(); - flagsHigh = *(undefined4 *)((int)&player->_flags + 4); - *(uint *)&player->_flags = (uint)player->_flags & 0xffffbfff; - *(undefined4 *)((int)&player->_flags + 4) = flagsHigh; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&player->_flags) + 4); + *(uint *)&player->_flags = GHIDRA_UINT(player->_flags) & 0xffffbfff; + *(undefined4 *)(GHIDRA_INT(&player->_flags) + 4) = flagsHigh; StageTransition::update_player_trapdoor_scale(&game->_stageTransition,player,1); } else if ((player->_flags & 0x100000000000) != 0) { @@ -6539,14 +6539,14 @@ void Game::interpolate_update() pEVar3 = *(Entity **)(*(int *)((char *)pvVar4 + 0x125c) + i * 4); iVar1 = *(int *)pEVar3; if (pEVar3->_type == 1) { - flagsHigh = *(undefined4 *)((int)&pEVar3->_flags + 4); - *(uint *)&pEVar3->_flags = (uint)pEVar3->_flags | 0x4000; - *(undefined4 *)((int)&pEVar3->_flags + 4) = flagsHigh; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&pEVar3->_flags) + 4); + *(uint *)&pEVar3->_flags = GHIDRA_UINT(pEVar3->_flags) | 0x4000; + *(undefined4 *)(GHIDRA_INT(&pEVar3->_flags) + 4) = flagsHigh; (**(code **)(iVar1 + 0xc))(); ((Entity *)(pEVar3))->Entity::PlayerCollideWithGrid(0); - flagsHigh = *(undefined4 *)((int)&pEVar3->_flags + 4); - *(uint *)&pEVar3->_flags = (uint)pEVar3->_flags & 0xffffbfff; - *(undefined4 *)((int)&pEVar3->_flags + 4) = flagsHigh; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&pEVar3->_flags) + 4); + *(uint *)&pEVar3->_flags = GHIDRA_UINT(pEVar3->_flags) & 0xffffbfff; + *(undefined4 *)(GHIDRA_INT(&pEVar3->_flags) + 4) = flagsHigh; } else { (**(code **)(iVar1 + 0x10))(); @@ -6565,13 +6565,13 @@ void Game::interpolate_update() iVar2 = pEVar3->_type; if (iVar2 == 1) { LAB_006fd6e6: - flagsHigh = *(undefined4 *)((int)&pEVar3->_flags + 4); - *(uint *)&pEVar3->_flags = (uint)pEVar3->_flags | 0x4000; - *(undefined4 *)((int)&pEVar3->_flags + 4) = flagsHigh; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&pEVar3->_flags) + 4); + *(uint *)&pEVar3->_flags = GHIDRA_UINT(pEVar3->_flags) | 0x4000; + *(undefined4 *)(GHIDRA_INT(&pEVar3->_flags) + 4) = flagsHigh; ((Entity *)(pEVar3))->Entity::PlayerCollideWithGrid(0); - flagsHigh = *(undefined4 *)((int)&pEVar3->_flags + 4); - *(uint *)&pEVar3->_flags = (uint)pEVar3->_flags & 0xffffbfff; - *(undefined4 *)((int)&pEVar3->_flags + 4) = flagsHigh; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&pEVar3->_flags) + 4); + *(uint *)&pEVar3->_flags = GHIDRA_UINT(pEVar3->_flags) & 0xffffbfff; + *(undefined4 *)(GHIDRA_INT(&pEVar3->_flags) + 4) = flagsHigh; } else { if (iVar2 != 3) { @@ -6596,7 +6596,7 @@ LAB_006fd6e6: i = 0; *(undefined1 *)((char *)pvVar4 + 0x7220) = 1; pvVar4 = (game->_playerManager)._extraPlayers._begin; - if ((int)(game->_playerManager)._extraPlayers._end - (int)pvVar4 >> 2 != 0) { + if (GHIDRA_INT((game->_playerManager)._extraPlayers._end) - GHIDRA_INT(pvVar4) >> 2 != 0) { do { tmpEntity = *(int **)((char *)pvVar4 + i * 4); tmpEntity[0x5a] = tmpEntity[0x5a] | 0x4000; @@ -6606,7 +6606,7 @@ LAB_006fd6e6: tmpEntity[0x5a] = tmpEntity[0x5a] & 0xffffbfff; tmpEntity[0x5b] = tmpEntity[0x5b]; pvVar4 = (g_game->_playerManager)._extraPlayers._begin; - } while (i < (uint)((int)(g_game->_playerManager)._extraPlayers._end - (int)pvVar4 >> 2)); + } while (i < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._extraPlayers._end) - GHIDRA_INT(pvVar4) >> 2))); } } } @@ -6655,10 +6655,10 @@ void Game::StartStageTransition(byte isSameStage, int transitionOverride, Entity local_8 = 0xffffffff; puStack_c = &LAB_00af32ed; local_10 = ExceptionList; - uVar5 = __security_cookie ^ (uint)(aiStack_24 + 8); + uVar5 = __security_cookie ^ GHIDRA_UINT((aiStack_24 + 8)); ExceptionList = &local_10; local_14 = uVar5; - if (6 < (uint)transitionOverride) { + if (6 < GHIDRA_UINT(transitionOverride)) { KAGE_LogMessage(8,(byte *)"Invalid animation passed to ((Game *)())->Game::StartStageTransition()\n"); ExceptionList = local_10; return; @@ -6666,7 +6666,7 @@ void Game::StartStageTransition(byte isSameStage, int transitionOverride, Entity if ((((this->_dailyChallenge)._id != 0) && ((g_game->_dailyChallenge)._id != 0)) && ((g_game->_dailyChallenge)._isPractice == 0)) { userData = &g_game->_leaderboard; - uStack_38._4_4_ = 2.8026e-45; + (*(undefined4 *)((char *)&(uStack_38) + 0x4)) = 2.8026e-45; unused = g_manager->_netplayManager; NVar1 = *(NetplayManager *)(g_manager + 1); iVar6 = 0; @@ -6682,7 +6682,7 @@ void Game::StartStageTransition(byte isSameStage, int transitionOverride, Entity if (*(int *)&(*(undefined1 *)((char *)(game) + 0x1d888)) == 0) { LAB_006fdcc2: name = leaderboard_name_format - (leaderboardName,(game->_dailyChallenge)._id,(int)unused,iVar6); + (leaderboardName,(game->_dailyChallenge)._id,GHIDRA_INT(unused),iVar6); local_8 = 0; if (0xf < *(uint *)(name + 0x14)) { name = *(byte **)name; @@ -6693,18 +6693,18 @@ LAB_006fdcc2: size = local_18 + 1; pvVar8 = leaderboardName[0]; if ((undefined1 *)0xfff < size) { - pvVar8 = *(void **)((int)leaderboardName[0] + -4); + pvVar8 = *(void **)(GHIDRA_INT(leaderboardName[0]) + -4); size = local_18 + 0x24; - if (0x1f < (uint)((int)leaderboardName[0] + (-4 - (int)pvVar8))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(leaderboardName[0]) + (-4 - GHIDRA_INT(pvVar8))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(pvVar8,(uint)size); + operator_delete(pvVar8,GHIDRA_UINT(size)); } aiStack_24[2] = 0; local_18 = &DAT_0000000f; - leaderboardName[0] = (void *)((uint)leaderboardName[0] & 0xffffff00); + leaderboardName[0] = (void *)(GHIDRA_UINT(leaderboardName[0]) & 0xffffff00); goto LAB_006fdd5c; } uVar11 = *(uint *)&(*(undefined1 *)((char *)(game) + 0x1d888)); @@ -6717,43 +6717,43 @@ LAB_006fdd5c: save_rewind_state(-1); } KAGE_LogMessage(1,(byte *)"[Frame %d] Starting stage transition (transition type: %d) \n"); - uVar5 = *(uint *)((int)&this->_gameStateFlags + 4) & 0x10000; + uVar5 = *(uint *)(GHIDRA_INT(&this->_gameStateFlags) + 4) & 0x10000; if (isSameStage == 0) { - uStack_38._4_4_ = (float)this->_stage; + (*(undefined4 *)((char *)&(uStack_38) + 0x4)) = (float)this->_stage; if (uVar5 == 0) { forcedCurses = 0; } else { forcedCurses = CONCAT31((int3)(uVar5 >> 8),1); } - FUN_009e5a30(uStack_38._4_4_,this->_stageType,this->_timeCounter,forcedCurses); + FUN_009e5a30((*(undefined4 *)((char *)&(uStack_38) + 0x4)),this->_stageType,this->_timeCounter,forcedCurses); uVar5 = g_game->_debugCurses; uVar11 = g_game->_curses; forcedCurses = Seeds::GetForcedCurses(); preventedCurses = Seeds::GetPreventedCurses(); if ((~preventedCurses & (forcedCurses | uVar5 | uVar11) & 2) != 0) { bVar3 = GetStateFlag(this,0x30); - FUN_009e5a30((int)uStack_38._4_4_ + 1,this->_stageType,this->_timeCounter,bVar3); + FUN_009e5a30((*(undefined4 *)((char *)&(GHIDRA_INT(uStack_38)) + 0x4)) + 1,this->_stageType,this->_timeCounter,bVar3); } } else { iStack_3c = this->_stage; - uStack_38._4_4_ = (float)CONCAT31(uStack_38._5_3_,uVar5 != 0); + (*(undefined4 *)((char *)&(uStack_38) + 0x4)) = (float)CONCAT31((*(undefined1 *)((char *)&(uStack_38) + 0x5)),uVar5 != 0); piVar10 = *(int **)&(*(undefined1 *)((char *)(this) + 0x26728)); - uStack_38._0_4_ = (float)this->_stageType; + (*(undefined4 *)((char *)&(uStack_38) + 0x0)) = (float)this->_stageType; if (piVar10 == *(int **)&(*(undefined1 *)((char *)(this) + 0x2672c))) { std::vector<12byte>::_Emplace_reallocate(piVar10,&iStack_3c); } else { *piVar10 = iStack_3c; - piVar10[1] = (int)(float)uStack_38; - piVar10[2] = (int)uStack_38._4_4_; + piVar10[1] = GHIDRA_INT((float)uStack_38); + piVar10[2] = (*(undefined4 *)((char *)&(GHIDRA_INT(uStack_38)) + 0x4)); *(int *)&(*(undefined1 *)((char *)(this) + 0x26728)) = *(int *)&(*(undefined1 *)((char *)(this) + 0x26728)) + 0xc; } } pvVar8 = (this->_playerManager)._playerList._begin; playerIdx = 0; - if ((int)(this->_playerManager)._playerList._end - (int)pvVar8 >> 2 != 0) { + if (GHIDRA_INT((this->_playerManager)._playerList._end) - GHIDRA_INT(pvVar8) >> 2 != 0) { do { player_00 = *(EntityPtr *)((char *)pvVar8 + playerIdx * 4); EVar2 = *(EntityPtr *)((char *)player_00 + 0x1e68); @@ -6761,14 +6761,14 @@ LAB_006fdd5c: ((*(int *)((char *)player_00 + 0x161c) <= *(int *)((char *)EVar2 + 0x161c) || (EVar2 == player_00)))) && (*(int *)&g_game->_deathmatchManager < 2)) { netUserId = player_get_net_user_id((Entity_Player *)player_00); - uStack_38._4_4_ = (float)(netUserId >> 0x20); + (*(undefined4 *)((char *)&(uStack_38) + 0x4)) = (float)(netUserId >> 0x20); if (((netUserId != 0xffffffffffffffff) && (*(int *)&g_game->_deathmatchManager < 2)) && ((*(undefined1 *)((char *)(this) + 0x1c030)) == '\0')) { cVar4 = FUN_00425a70(netUserId); if (cVar4 == '\0') { - online_stats_add_user(&this->_onlinePlayerStats,(uint)netUserId,(uint)uStack_38._4_4_); + online_stats_add_user(&this->_onlinePlayerStats,GHIDRA_UINT(netUserId),(*(undefined4 *)((char *)&(GHIDRA_UINT(uStack_38)) + 0x4))); } - iVar6 = FUN_00426560((uint)netUserId,uStack_38._4_4_); + iVar6 = FUN_00426560(GHIDRA_UINT(netUserId),(*(undefined4 *)((char *)&(uStack_38) + 0x4))); if (iVar6 != 0) { *(float *)(iVar6 + 0xc) = *(float *)(iVar6 + 0xc) + 1.0; } @@ -6776,7 +6776,7 @@ LAB_006fdd5c: } pvVar8 = (this->_playerManager)._playerList._begin; playerIdx = playerIdx + 1; - } while (playerIdx < (uint)((int)(this->_playerManager)._playerList._end - (int)pvVar8 >> 2)); + } while (playerIdx < GHIDRA_UINT((GHIDRA_INT((this->_playerManager)._playerList._end) - GHIDRA_INT(pvVar8) >> 2))); } game = g_game; if (player == (Entity_Player *)0x0) { @@ -6801,8 +6801,8 @@ LAB_006fdd5c: if ((playerLocal != (Entity_Player *)0x0) && (playerLocal->_variant == 0)) { (playerLocal->_velocity).x = g_vectorZero.x; (playerLocal->_velocity).y = g_vectorZero.y; - uStack_38._0_4_ = (playerLocal->_velocity).x * 0.1; - uStack_38._4_4_ = (playerLocal->_velocity).y * 0.1; + (*(undefined4 *)((char *)&(uStack_38) + 0x0)) = (playerLocal->_velocity).x * 0.1; + (*(undefined4 *)((char *)&(uStack_38) + 0x4)) = (playerLocal->_velocity).y * 0.1; playerLocal->_isControlsEnabled = 0; ((Entity_Player *)(playerLocal))->Entity_Player::ThrowHeldEntity((Vector *)&uStack_38); game = g_game; @@ -6834,34 +6834,34 @@ LAB_006fe0c8: pvVar8 = (this->_playerManager)._playerList._end; piVar10 = (this->_playerManager)._playerList._begin; playerIdx = 0; - if ((int)pvVar8 - (int)piVar10 >> 2 != 0) { + if (GHIDRA_INT(pvVar8) - GHIDRA_INT(piVar10) >> 2 != 0) { do { uVar5 = playerIdx; - if ((int)pvVar8 - (int)piVar10 >> 2 == 0) { + if (GHIDRA_INT(pvVar8) - GHIDRA_INT(piVar10) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar8 = (this->_playerManager)._playerList._end; } playerIt = (this->_playerManager)._playerList._begin; - if (uVar5 < (uint)((int)pvVar8 - (int)playerIt >> 2)) { + if (uVar5 < GHIDRA_UINT((GHIDRA_INT(pvVar8) - GHIDRA_INT(playerIt) >> 2))) { playerIt = playerIt + uVar5; } ((Entity_Player *)((Entity_Player *)*playerIt))->Entity_Player::room_exit(0); while( true ) { pvVar8 = (this->_playerManager)._playerList._end; piVar10 = (this->_playerManager)._playerList._begin; - if ((int)pvVar8 - (int)piVar10 >> 2 == 0) { + if (GHIDRA_INT(pvVar8) - GHIDRA_INT(piVar10) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar8 = (this->_playerManager)._playerList._end; piVar10 = (this->_playerManager)._playerList._begin; } - uVar11 = (int)pvVar8 - (int)piVar10 >> 2; + uVar11 = GHIDRA_INT(pvVar8) - GHIDRA_INT(piVar10) >> 2; piVar9 = piVar10 + uVar5; if (uVar11 <= uVar5) { piVar9 = piVar10; } iVar6 = *piVar9; pvVar8 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar8 & 0xfffffffcU) < + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar8) & 0xfffffffcU)) < 0x1d5) { iVar12 = 0; } @@ -6882,11 +6882,11 @@ LAB_006fe0c8: } uVar5 = playerIdx; piVar10 = (this->_playerManager)._playerList._begin; - if (playerIdx < (uint)((int)pvVar8 - (int)piVar10 >> 2)) { + if (playerIdx < GHIDRA_UINT((GHIDRA_INT(pvVar8) - GHIDRA_INT(piVar10) >> 2))) { piVar10 = piVar10 + playerIdx; } pvVar8 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar8 & 0xfffffffcU) < + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar8) & 0xfffffffcU)) < 0x1d5) { aiStack_24[0] = 0; } @@ -6903,8 +6903,8 @@ LAB_006fe1cd: playerIdx = playerIdx + 1; } while (playerIdx < uVar11); } - uStack_38._4_4_ = 2.24208e-44; - std::set::find_node(aiStack_24 + 1,(int)&uStack_38 + 4); + (*(undefined4 *)((char *)&(uStack_38) + 0x4)) = 2.24208e-44; + std::set::find_node(aiStack_24 + 1,GHIDRA_INT(&uStack_38) + 4); if (((local_18[0xd] == '\0') && (*(int *)(local_18 + 0x10) < 0x11)) && (local_18 != (this->_seedEffects)._seedEffects)) { this->_stageNameNumeral = this->_stageNameNumeral + 1; @@ -6924,21 +6924,21 @@ void Game::ChangeRoom(int roomIdx, int dimension) i = 0; room = (this->_playerManager)._playerList._end; playerIt = (this->_playerManager)._playerList._begin; - if ((int)room - (int)playerIt >> 2 != 0) { + if (GHIDRA_INT(room) - GHIDRA_INT(playerIt) >> 2 != 0) { do { - if ((int)room - (int)playerIt >> 2 == 0) { + if (GHIDRA_INT(room) - GHIDRA_INT(playerIt) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); room = (this->_playerManager)._playerList._end; playerIt = (this->_playerManager)._playerList._begin; } - if (i < (uint)((int)room - (int)playerIt >> 2)) { + if (i < GHIDRA_UINT((GHIDRA_INT(room) - GHIDRA_INT(playerIt) >> 2))) { playerIt = playerIt + i; } ((Entity_Player *)((Entity_Player *)*playerIt))->Entity_Player::room_exit(0); room = (this->_playerManager)._playerList._end; i = i + 1; playerIt = (this->_playerManager)._playerList._begin; - } while (i < (uint)((int)room - (int)playerIt >> 2)); + } while (i < GHIDRA_UINT((GHIDRA_INT(room) - GHIDRA_INT(playerIt) >> 2))); } ((Level *)((Level *)this))->Level::ChangeRoom(roomIdx,dimension); ((Room *)(this->_room))->Room::Update(); @@ -7018,7 +7018,7 @@ Entity * Game::SpawnEx(uint type, uint variant, Vector *position, Vector *veloci lua_callback_run_pre_entity_spawn ((int *)&local_54,(int *)&variant,position,velocity,spawner,(int *)&subType,&seed); pEVar8 = local_54; - type = (uint)local_54; + type = GHIDRA_UINT(local_54); if (1 < *(int *)&g_game->_deathmatchManager) { ((ItemPool *)((g_game->_deathmatchManager)._type))->ItemPool::ReplaceBlacklistedPickup(&type,&variant,&subType); } @@ -7046,27 +7046,27 @@ Entity * Game::SpawnEx(uint type, uint variant, Vector *position, Vector *veloci } } uVar14 = local_60; - local_54 = ((EntityFactory *)(this->_entityFactory))->EntityFactory::Create((uint)pEVar8,(byte)flags & 1); + local_54 = ((EntityFactory *)(this->_entityFactory))->EntityFactory::Create(GHIDRA_UINT(pEVar8),(byte)flags & 1); if (local_54 == (Entity *)0x0) { return (Entity *)0x0; } timeNs = GetTimeNs(); entity = local_54; spawnerEntity = spawner; - local_50 = (uint)(timeNs >> 0x20); + local_50 = GHIDRA_UINT((timeNs >> 0x20)); lVar3 = (timeNs & 0xffffffff) * 0x431bde82; - sourceRef._variant = (int)((ulonglong)lVar3 >> 0x20); + sourceRef._variant = GHIDRA_INT(((ulonglong)lVar3 >> 0x20)); lVar4 = (ulonglong)local_50 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); - uVar11 = (uint)((ulonglong)lVar4 >> 0x20); + uVar11 = GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)); lVar3 = (ulonglong)local_50 * 0x431bde82 + (ulonglong) - CONCAT14(CARRY4(uVar11,(uint)(&(*(undefined1 *)((char *)(((EntityPtr *)sourceRef._variant)) + 0x0)) + - CARRY4((uint)lVar3,(uint)lVar4))), - &(*(undefined1 *)((char *)(((EntityPtr *)sourceRef._variant)) + 0x0)) + CARRY4((uint)lVar3,(uint)lVar4) + + CONCAT14(CARRY4(uVar11,GHIDRA_UINT((&(*(undefined1 *)((char *)(((EntityPtr *)sourceRef._variant)) + 0x0)) + + CARRY4(GHIDRA_UINT(lVar3),GHIDRA_UINT(lVar4))))), + &(*(undefined1 *)((char *)(((EntityPtr *)sourceRef._variant)) + 0x0)) + CARRY4(GHIDRA_UINT(lVar3),GHIDRA_UINT(lVar4)) + uVar11); - sourceRef._spawnerType = (int)((ulonglong)lVar3 >> 0x20); - local_58 = (uint)lVar3 >> 0x12 | sourceRef._spawnerType * 0x4000; - sourceRef._spawnerType = (uint)sourceRef._spawnerType >> 0x12; + sourceRef._spawnerType = GHIDRA_INT(((ulonglong)lVar3 >> 0x20)); + local_58 = GHIDRA_UINT(lVar3) >> 0x12 | sourceRef._spawnerType * 0x4000; + sourceRef._spawnerType = GHIDRA_UINT(sourceRef._spawnerType) >> 0x12; if (spawner == (Entity *)0x0) { local_54->_spawnerType = 0; iVar7 = 0; @@ -7078,7 +7078,7 @@ Entity * Game::SpawnEx(uint type, uint variant, Vector *position, Vector *veloci spawnerSlot = &local_54->_spawnerEntity; local_54->_spawnerVariant = iVar7; if (*spawnerSlot != (EntityPtr)0x0) { - sourceRef._variant = (int)spawnerSlot; + sourceRef._variant = GHIDRA_INT(spawnerSlot); std::multiset::erase(&sourceRef._variant); } *spawnerSlot = (EntityPtr)spawnerEntity; @@ -7108,13 +7108,13 @@ Entity * Game::SpawnEx(uint type, uint variant, Vector *position, Vector *veloci } } else { - uVar11 = *(uint *)((int)&entity->_flags + 4); + uVar11 = *(uint *)(GHIDRA_INT(&entity->_flags) + 4); uVar1 = (undefined4)entity->_flags; *(undefined4 *)&entity->_flags = uVar1; - *(uint *)((int)&entity->_flags + 4) = uVar11 | 0x10000000; + *(uint *)(GHIDRA_INT(&entity->_flags) + 4) = uVar11 | 0x10000000; if ((unaff_ESI != 9) && (unaff_ESI != 7)) { *(undefined4 *)&entity->_flags = uVar1; - *(uint *)((int)&entity->_flags + 4) = uVar11 | 0x10000020; + *(uint *)(GHIDRA_INT(&entity->_flags) + 4) = uVar11 | 0x10000020; } sourceRef._entity = (spawnerEntity->_charmSource)._entity; if (sourceRef._entity == (void *)0x0) { @@ -7196,9 +7196,9 @@ LAB_006fe79f: sourceRef._entity = (void *)0x0; ((Entity *)(pEVar8))->Entity::AddShrink(&sourceRef,0x5a,0,0); if (0 < pEVar8->_shrinkCountdown) { - uVar1 = *(undefined4 *)((int)&pEVar8->_flags + 4); - *(uint *)&pEVar8->_flags = (uint)pEVar8->_flags | 0x1000000; - *(undefined4 *)((int)&pEVar8->_flags + 4) = uVar1; + uVar1 = *(undefined4 *)(GHIDRA_INT(&pEVar8->_flags) + 4); + *(uint *)&pEVar8->_flags = GHIDRA_UINT(pEVar8->_flags) | 0x1000000; + *(undefined4 *)(GHIDRA_INT(&pEVar8->_flags) + 4) = uVar1; pEVar8->_shrinkStatus1 = pEVar8->_shrinkStatus2; } } @@ -7249,42 +7249,42 @@ LAB_006fe79f: } uVar14 = 0; playerManager = &g_game->_playerManager; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar17 = (playerManager->_playerList)._end; - if ((int)pvVar17 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar17) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar17 = (playerManager->_playerList)._end; } piVar10 = (playerManager->_playerList)._begin; - if (uVar14 < (uint)((int)pvVar17 - (int)piVar10 >> 2)) { + if (uVar14 < GHIDRA_UINT((GHIDRA_INT(pvVar17) - GHIDRA_INT(piVar10) >> 2))) { piVar10 = piVar10 + uVar14; } trigger_set_dispatch((void *)(*piVar10 + 0x1fc8),6,entity,position,velocity); uVar14 = uVar14 + 1; playerManager = &g_game->_playerManager; - } while (uVar14 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar14 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } LAB_006feb8d: timeNs = GetTimeNs(); - uVar11 = (uint)(timeNs >> 0x20); + uVar11 = GHIDRA_UINT((timeNs >> 0x20)); lVar3 = (timeNs & 0xffffffff) * 0x431bde82; lVar4 = (ulonglong)uVar11 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); - uVar12 = (uint)((ulonglong)lVar4 >> 0x20); - uVar14 = (int)((ulonglong)lVar3 >> 0x20) + (uint)CARRY4((uint)lVar3,(uint)lVar4); + uVar12 = GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)); + uVar14 = GHIDRA_INT(((ulonglong)lVar3 >> 0x20)) + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar3),GHIDRA_UINT(lVar4))); lVar3 = (ulonglong)uVar11 * 0x431bde82 + (ulonglong)CONCAT14(CARRY4(uVar12,uVar14),uVar12 + uVar14); - uVar12 = (uint)((ulonglong)lVar3 >> 0x20); - uVar14 = (uint)lVar3 >> 0x12 | uVar12 * 0x4000; + uVar12 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); + uVar14 = GHIDRA_UINT(lVar3) >> 0x12 | uVar12 * 0x4000; uVar11 = uVar14 - unaff_EBX; - bVar15 = CARRY4((uint)g_entitySpawnTimeMs,uVar11); - g_entitySpawnTimeMs._0_4_ = (uint)g_entitySpawnTimeMs + uVar11; - g_entitySpawnTimeMs._4_4_ = - g_entitySpawnTimeMs._4_4_ + (((uVar12 >> 0x12) - (int)local_48) - (uint)(uVar14 < unaff_EBX)) - + (uint)bVar15; + bVar15 = CARRY4(GHIDRA_UINT(g_entitySpawnTimeMs),uVar11); + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x0)) = GHIDRA_UINT(g_entitySpawnTimeMs) + uVar11; + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) = + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) + (((uVar12 >> 0x12) - GHIDRA_INT(local_48)) - GHIDRA_UINT((uVar14 < unaff_EBX))) + + GHIDRA_UINT(bVar15); return pEStack_64; } @@ -7343,11 +7343,11 @@ void Game::DamageRadius(Vector *position, Entity *source, ulonglong damageFlags, int targetType; game = g_game; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00afc22d; local_1c = ExceptionList; - uVar3 = __security_cookie ^ (int)register0x00000010 - 0x10U; + uVar3 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; enemyDamage = damage; ((EntityRef *)(&sourceRef))->EntityRef::constructor(source); @@ -7377,7 +7377,7 @@ LAB_006fee31: isHitPlayers = isDamagePlayers; LAB_006fee08: if (!isPlayerSource) { - local_2c = *(undefined4 *)((int)&source->_flags + 4); + local_2c = *(undefined4 *)(GHIDRA_INT(&source->_flags) + 4); if (((source->_flags & 0x100) == 0) && ((source->_flags & 0x20000100) == 0)) goto LAB_006fee31; } @@ -7385,7 +7385,7 @@ LAB_006fee08: isDamageEnemies = '\x01'; LAB_006fee3d: EntityList::QueryRadius - ((EntityList *)((int)game->_room + 0x1218),&hits,position,radius,0xffffffff); + ((EntityList *)(GHIDRA_INT(game->_room) + 0x1218),&hits,position,radius,0xffffffff); local_14 = 0; local_2c = 0; if (hits._size != 0) { @@ -7395,8 +7395,8 @@ LAB_006fee3d: targetType = target->_type; if (((targetType == 1) || (targetType == 3)) && (isHitPlayers != 0)) { poisonBits = BitSet128::operator_and(&local_50,&tearFlags,&g_tearFlagPoison); - if ((((int)poisonBits->_l != 0 || *(int *)((int)&poisonBits->_l + 4) != 0) || - ((int)poisonBits->_h != 0 || *(int *)((int)&poisonBits->_h + 4) != 0)) && + if (((GHIDRA_INT(poisonBits->_l) != 0 || *(int *)(GHIDRA_INT(&poisonBits->_l) + 4) != 0) || + (GHIDRA_INT(poisonBits->_h) != 0 || *(int *)(GHIDRA_INT(&poisonBits->_h) + 4) != 0)) && (targetType == 1)) { isPoisonImmune = ((Entity_Player *)(target))->Entity_Player::HasPoisonImmunity(); if (isPoisonImmune != 0) goto LAB_006fef6e; @@ -7412,31 +7412,31 @@ LAB_006fee3d: else if ((((1 < *(int *)&g_game->_deathmatchManager) && (targetType == 1)) || (targetType - 10U < 0x3de)) && ((isDamageEnemies != '\0' && (targetType != 1)))) { target->TakeDamage(enemyDamage,damageFlags,&sourceRef,0x1e,uVar3); - flags._l._4_4_ = tearFlags._l._4_4_; - flags._l._0_4_ = (undefined4)tearFlags._l; - flags._h._0_4_ = (undefined4)tearFlags._h; - flags._h._4_4_ = tearFlags._h._4_4_; + (*(undefined4 *)((char *)&(flags._l) + 0x4)) = (*(undefined4 *)((char *)&(tearFlags._l) + 0x4)); + (*(undefined4 *)((char *)&(flags._l) + 0x0)) = (undefined4)tearFlags._l; + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = (undefined4)tearFlags._h; + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = (*(undefined4 *)((char *)&(tearFlags._h) + 0x4)); Entity_Tear::ApplyTearFlagEffects((Entity *)target,position,flags,source,3.5); } } LAB_006fef6e: local_2c = local_2c + 1; - } while (local_2c < (uint)hits._size); + } while (local_2c < GHIDRA_UINT(hits._size)); } - if (hits._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(hits) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (hits._data != (void *)0x0) { uVar3 = *(uint *)((char *)hits._data + -4); qVar1 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar3; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar3; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar1 < uVar3); - free((void *)((int)hits._data + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar3)); + free((void *)(GHIDRA_INT(hits._data) + -4)); } } ExceptionList = local_1c; @@ -7504,13 +7504,13 @@ void Game::BombDamage(Vector *pos, float damage, float radius, byte lineCheck, E void *room; code *takeDamageFn; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00afc2b9; local_1c = ExceptionList; ExceptionList = &local_1c; savedGame = this; - puVar1 = (undefined1 *)((int)register0x00000010 + -4); + puVar1 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); if (source == (Entity *)0x0) { LAB_006ff2fb: puStack_20 = puVar1; @@ -7525,7 +7525,7 @@ LAB_006ff2fb: } } else { - puVar1 = (undefined1 *)((int)register0x00000010 + -4); + puVar1 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); if (source->_type != 1) { pEVar4 = ((Entity *)(source))->Entity::GetPlayerAncestor(); puVar1 = puStack_20; @@ -7538,8 +7538,8 @@ LAB_006ff333: if (damage < 166.0) { fVar7 = damage; maskedFlags = BitSet128::operator_and(&local_78,&tearFlags,&g_tearFlagCrossBomb); - if ((((int)maskedFlags->_l == 0 && *(int *)((int)&maskedFlags->_l + 4) == 0) && - ((int)maskedFlags->_h == 0 && *(int *)((int)&maskedFlags->_h + 4) == 0)) || (fVar7 < 125.0)) + if (((GHIDRA_INT(maskedFlags->_l) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) == 0) && + (GHIDRA_INT(maskedFlags->_h) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) == 0)) || (fVar7 < 125.0)) goto LAB_006ff38e; } uVar6 = Random(); @@ -7550,12 +7550,12 @@ LAB_006ff38e: isPlayerSource = 0; } EntityList::QueryRadius - ((EntityList *)((int)this->_room + 0x1218),&nearby,pos,effectiveRadius,0xffffffff); + ((EntityList *)(GHIDRA_INT(this->_room) + 0x1218),&nearby,pos,effectiveRadius,0xffffffff); local_14 = 0; local_40 = (GridEntity *)0x0; if (nearby._size != 0) { do { - pEVar4 = *(Entity **)((char *)nearby._data + (int)local_40 * 4); + pEVar4 = *(Entity **)((char *)nearby._data + GHIDRA_INT(local_40) * 4); local_28 = pEVar4; if ((((pEVar4 != source) || (damageSource != 0)) && ((pEVar4->_dead == 0 && @@ -7575,10 +7575,10 @@ LAB_006ff38e: } if ((source != (Entity *)0x0) && (source->_type == 4)) { iVar5 = __RTDynamicCast(); - tearFlags._l._0_4_ = (uint)tearFlags._l | *(uint *)(iVar5 + 0x438); - tearFlags._l._4_4_ = tearFlags._l._4_4_ | *(uint *)(iVar5 + 0x43c); - tearFlags._h._0_4_ = (uint)tearFlags._h | *(uint *)(iVar5 + 0x440); - tearFlags._h._4_4_ = tearFlags._h._4_4_ | *(uint *)(iVar5 + 0x444); + (*(undefined4 *)((char *)&(tearFlags._l) + 0x0)) = GHIDRA_UINT(tearFlags._l) | *(uint *)(iVar5 + 0x438); + (*(undefined4 *)((char *)&(tearFlags._l) + 0x4)) = (*(undefined4 *)((char *)&(tearFlags._l) + 0x4)) | *(uint *)(iVar5 + 0x43c); + (*(undefined4 *)((char *)&(tearFlags._h) + 0x0)) = GHIDRA_UINT(tearFlags._h) | *(uint *)(iVar5 + 0x440); + (*(undefined4 *)((char *)&(tearFlags._h) + 0x4)) = (*(undefined4 *)((char *)&(tearFlags._h) + 0x4)) | *(uint *)(iVar5 + 0x444); } if ((0.0 < (float)local_3c) && (pEVar4->_type != 1000)) { iVar5 = __RTDynamicCast(); @@ -7616,8 +7616,8 @@ LAB_006ff38e: fVar7 = 0.5; piVar9 = local_3c; maskedFlags = BitSet128::operator_and(&knockbackMask,&tearFlags,&g_tearFlagKnockback); - if (((int)maskedFlags->_l == 0 && *(int *)((int)&maskedFlags->_l + 4) == 0) && - ((int)maskedFlags->_h == 0 && *(int *)((int)&maskedFlags->_h + 4) == 0)) { + if ((GHIDRA_INT(maskedFlags->_l) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) == 0) && + (GHIDRA_INT(maskedFlags->_h) == 0 && *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) == 0)) { iVar5 = pEVar4->_type; LAB_006ff827: fVar14 = (pEVar4->_velocity).x; @@ -7660,7 +7660,7 @@ LAB_006ff6ce: if (0.0 < damage) { fVar7 = damage; ((EntityRef *)(&playerDamageSource))->EntityRef::constructor(source); - playerDamageSource._flags = playerDamageSource._flags | (uint)isPlayerSource * 2; + playerDamageSource._flags = playerDamageSource._flags | GHIDRA_UINT(isPlayerSource) * 2; if (fVar7 < 85.0) { local_24 = 1.0; } @@ -7705,8 +7705,8 @@ LAB_006ff6ce: local_34 = (Entity *)Random(); room = g_game->_room; vecResult = Room::GetCenterPos(&local_68); - gridX = (int)((vecResult->x - 40.0) / 40.0 + 0.5); - iVar5 = (int)((vecResult->y - 120.0) / 40.0 + 0.5); + gridX = GHIDRA_INT(((vecResult->x - 40.0) / 40.0 + 0.5)); + iVar5 = GHIDRA_INT(((vecResult->y - 120.0) / 40.0 + 0.5)); if (((gridX < 0) || (gridWidth = *(int *)((char *)room + 0xc), gridWidth <= gridX)) || ((iVar5 < 0 || (*(int *)((char *)room + 0x10) <= iVar5)))) { local_24 = -NAN; @@ -7717,13 +7717,13 @@ LAB_006ff8e1: else { fVar7 = (float)(iVar5 * gridWidth + gridX); local_24 = fVar7; - if (((int)fVar7 < 0) || (0x1bf < (int)fVar7)) goto LAB_006ff8e1; + if ((GHIDRA_INT(fVar7) < 0) || (0x1bf < GHIDRA_INT(fVar7))) goto LAB_006ff8e1; } - if ((uint)fVar7 < 0x1c0) { - uVar6 = ((Room *)(local_30))->Room::GetGridCollision((int)fVar7); - if ((int)uVar6 < 1) { + if (GHIDRA_UINT(fVar7) < 0x1c0) { + uVar6 = ((Room *)(local_30))->Room::GetGridCollision(GHIDRA_INT(fVar7)); + if (GHIDRA_INT(uVar6) < 1) { pGVar8 = operator_new(0x154); - local_14._0_1_ = 0x12; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x12; local_90.y = (float)pGVar8; if (pGVar8 == (GridEntity *)0x0) { pGVar8 = (GridEntity *)0x0; @@ -7732,7 +7732,7 @@ LAB_006ff8e1: ((GridEntity *)(pGVar8))->GridEntity::GridEntity(); *(undefined ***)pGVar8 = IsaacRepentancePlus::GridEntity_Stairs::vftable; } - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (pGVar8 != (GridEntity *)0x0) { (pGVar8->_desc)._type = 0x12; goto LAB_006ffa6f; @@ -7747,8 +7747,8 @@ LAB_006ff8e1: local_34 = (Entity *)Random(); room = g_game->_room; vecResult = Room::GetCenterPos((Vector *)&local_78._h); - gridX = (int)((vecResult->x - 40.0) / 40.0 + 0.5); - iVar5 = (int)((vecResult->y - 120.0) / 40.0 + 0.5); + gridX = GHIDRA_INT(((vecResult->x - 40.0) / 40.0 + 0.5)); + iVar5 = GHIDRA_INT(((vecResult->y - 120.0) / 40.0 + 0.5)); if ((((gridX < 0) || (gridWidth = *(int *)((char *)room + 0xc), gridWidth <= gridX)) || (iVar5 < 0)) || (*(int *)((char *)room + 0x10) <= iVar5)) { local_24 = -NAN; @@ -7759,13 +7759,13 @@ LAB_006ff9ff: else { fVar7 = (float)(iVar5 * gridWidth + gridX); local_24 = fVar7; - if (((int)fVar7 < 0) || (0x1bf < (int)fVar7)) goto LAB_006ff9ff; + if ((GHIDRA_INT(fVar7) < 0) || (0x1bf < GHIDRA_INT(fVar7))) goto LAB_006ff9ff; } - if ((uint)fVar7 < 0x1c0) { - uVar6 = ((Room *)(local_30))->Room::GetGridCollision((int)fVar7); - if (0 < (int)uVar6) goto LAB_006ffaab; + if (GHIDRA_UINT(fVar7) < 0x1c0) { + uVar6 = ((Room *)(local_30))->Room::GetGridCollision(GHIDRA_INT(fVar7)); + if (0 < GHIDRA_INT(uVar6)) goto LAB_006ffaab; pGVar8 = operator_new(0x158); - local_14._0_1_ = 0x28; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x28; local_58.y = (float)pGVar8; if (pGVar8 == (GridEntity *)0x0) { pGVar8 = (GridEntity *)0x0; @@ -7775,18 +7775,18 @@ LAB_006ff9ff: *(undefined ***)pGVar8 = IsaacRepentancePlus::GridEntity_TrapDoor::vftable; *(undefined4 *)(pGVar8 + 1) = 0; } - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (pGVar8 == (GridEntity *)0x0) goto LAB_006ffaab; (pGVar8->_desc)._type = 0x11; LAB_006ffa6f: - pGVar8->_gridIndex = (int)local_24; - if (local_30->_gridEntities[(int)local_24] != (undefined4 *)0x0) { - (*(code *)**(undefined4 **)local_30->_gridEntities[(int)local_24])(); + pGVar8->_gridIndex = GHIDRA_INT(local_24); + if (local_30->_gridEntities[GHIDRA_INT(local_24)] != (undefined4 *)0x0) { + (*(code *)**(undefined4 **)local_30->_gridEntities[GHIDRA_INT(local_24)])(); } - local_30->_gridEntities[(int)local_24] = pGVar8; + local_30->_gridEntities[GHIDRA_INT(local_24)] = pGVar8; (pGVar8->_desc)._variant = 0; (pGVar8->_desc)._varData = 0; - ((GridEntity *)(pGVar8))->GridEntity::Init((uint)local_34); + ((GridEntity *)(pGVar8))->GridEntity::Init(GHIDRA_UINT(local_34)); } } } @@ -7798,14 +7798,14 @@ LAB_006ffac3: local_3c = (int *)damage; fVar7 = damage; maskedFlags = BitSet128::operator_and(&crossBombMask,&tearFlags,&g_tearFlagCrossBomb); - if (((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) { + if ((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) { bVar2 = 0; local_38 = (Entity *) - (((int)(pEVar4->_damageEvents)._end - (int)(pEVar4->_damageEvents)._begin) / + ((GHIDRA_INT((pEVar4->_damageEvents)._end) - GHIDRA_INT((pEVar4->_damageEvents)._begin)) / 0x38); if (local_38 != (Entity *)0x0) { - piVar9 = (int *)((int)(pEVar4->_damageEvents)._begin + 0x34); + piVar9 = (int *)(GHIDRA_INT((pEVar4->_damageEvents)._begin) + 0x34); pEVar4 = local_38; prevHitCount = bVar2; do { @@ -7828,12 +7828,12 @@ LAB_006ffac3: iVar5 = 0x6ffb82; maskedFlags = BitSet128::operator_and(&nonExplosiveFlags,&tearFlags,maskedFlags); get_tear_flags_from_player - (&damageFlags,(int)(auStackY_1f4 + 0x90),*maskedFlags,iVar5,source); + (&damageFlags,GHIDRA_INT((auStackY_1f4 + 0x90)),*maskedFlags,iVar5,source); takeDamageFn = *(code **)(*(int *)pEVar4 + 0x20); ((EntityRef *)(&sourceRef))->EntityRef::constructor(source); (*takeDamageFn)(); - if ((((!((uint)tearFlags._l == 0 && tearFlags._l._4_4_ == 0)) || - (!((uint)tearFlags._h == 0 && tearFlags._h._4_4_ == 0))) && (source != (Entity *)0x0) + if ((((!(GHIDRA_UINT(tearFlags._l) == 0 && (*(undefined4 *)((char *)&(tearFlags._l) + 0x4)) == 0)) || + (!(GHIDRA_UINT(tearFlags._h) == 0 && (*(undefined4 *)((char *)&(tearFlags._h) + 0x4)) == 0))) && (source != (Entity *)0x0) ) && ((source->_spawnerType < 10 || (999 < source->_spawnerType)))) { bVar2 = ((Entity *)(pEVar4))->Entity::IsVulnerableEnemy((Entity *)0x0); if (bVar2 != 0) { @@ -7845,23 +7845,23 @@ LAB_006ffac3: } } LAB_006ffd46: - local_40 = (GridEntity *)((int)local_40 + 1); - } while (local_40 < (uint)nearby._size); + local_40 = (GridEntity *)(GHIDRA_INT(local_40) + 1); + } while (local_40 < GHIDRA_UINT(nearby._size)); } FUN_005cbe20(); - local_14 = CONCAT31(local_14._1_3_,0x2f); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x2f); local_28 = (Entity *)((effectiveRadius * 8.0) / 40.0); dVar15 = ceil((double)(float)local_28); local_28 = (Entity *)(float)dVar15; - pGVar8 = (GridEntity *)(int)dVar15; - local_38 = (Entity *)(6.2831855 / (float)(int)pGVar8); + pGVar8 = (GridEntity *)GHIDRA_INT(dVar15); + local_38 = (Entity *)(6.2831855 / (float)GHIDRA_INT(pGVar8)); local_24 = 0.0; local_40 = pGVar8; local_28 = (Entity *)((Room *)(g_game->_room))->Room::GetGridIndex(pos); - if (-1 < (int)local_28) { + if (-1 < GHIDRA_INT(local_28)) { std::set::insert(); } - if (0 < (int)pGVar8) { + if (0 < GHIDRA_INT(pGVar8)) { do { local_50.x = cos(local_24); local_50.y = sin(local_24); @@ -7885,7 +7885,7 @@ LAB_006ffd46: } while ((float)local_34 < effectiveRadius); pGVar8 = local_40; } - pGVar8 = (GridEntity *)((int)&pGVar8[-1]._sprite._bitflags + 3); + pGVar8 = (GridEntity *)(GHIDRA_INT(&pGVar8[-1]._sprite._bitflags) + 3); local_24 = local_24 + (float)local_38; local_40 = pGVar8; } while (pGVar8 != (GridEntity *)0x0); @@ -7971,7 +7971,7 @@ Entity * Game::spawn_bomb_crater(Vector *position, Entity *spawner, float scale) local_8 = 0xffffffff; puStack_c = &LAB_00afc320; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar3 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; savedScale = scale; seed = Random(); @@ -8105,14 +8105,14 @@ void Game::ShakeScreen(int timeout) playerListEnd = (this->_playerManager)._playerList._end; playerIdx = 0; piVar1 = (this->_playerManager)._playerList._begin; - if ((int)playerListEnd - (int)piVar1 >> 2 != 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT(piVar1) >> 2 != 0) { do { - if ((int)playerListEnd - (int)piVar1 >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT(piVar1) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (this->_playerManager)._playerList._end; piVar1 = (this->_playerManager)._playerList._begin; } - if (playerIdx < (uint)((int)playerListEnd - (int)piVar1 >> 2)) { + if (playerIdx < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(piVar1) >> 2))) { piVar1 = piVar1 + playerIdx; } rumbleParams[1] = 0.5; @@ -8122,7 +8122,7 @@ void Game::ShakeScreen(int timeout) playerListEnd = (this->_playerManager)._playerList._end; playerIdx = playerIdx + 1; piVar1 = (this->_playerManager)._playerList._begin; - } while (playerIdx < (uint)((int)playerListEnd - (int)piVar1 >> 2)); + } while (playerIdx < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(piVar1) >> 2))); } } return; @@ -8143,10 +8143,10 @@ void Game::MakeShockwave(Vector *pos, float amplitude, float speed, int duration posX = pos->x; posY = pos->y; gameRoom = g_game->_room; - piVar1 = (int *)((int)gameRoom + 0x70fc); + piVar1 = (int *)(GHIDRA_INT(gameRoom) + 0x70fc); *piVar1 = *piVar1 + 1; shockwaveId = *(uint *)((char *)gameRoom + 0x70fc) & 0x80000001; - if ((int)shockwaveId < 0) { + if (GHIDRA_INT(shockwaveId) < 0) { shockwaveId = (shockwaveId - 1 | 0xfffffffe) + 1; } if (1 < shockwaveId) { @@ -8248,7 +8248,7 @@ Entity_Player * Game::GetNearestPlayer(Vector *pos) playersEnd = (this->_playerManager)._playerList._end; playersBegin = (this->_playerManager)._playerList._begin; - if ((int)playersEnd - (int)playersBegin >> 2 == 0) { + if (GHIDRA_INT(playersEnd) - GHIDRA_INT(playersBegin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playersEnd = (this->_playerManager)._playerList._end; playersBegin = (this->_playerManager)._playerList._begin; @@ -8259,18 +8259,18 @@ Entity_Player * Game::GetNearestPlayer(Vector *pos) fVar2 = pos->y - (nearestPlayer->_pos).y; nearestDistSq = fVar2 * fVar2 + fVar1 * fVar1; fVar1 = nearestDistSq; - if (1 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)) { + if (1 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))) { do { fVar2 = fVar1; - if ((int)playersEnd - (int)playersBegin >> 2 == 0) { + if (GHIDRA_INT(playersEnd) - GHIDRA_INT(playersBegin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playersEnd = (this->_playerManager)._playerList._end; fVar2 = nearestDistSq; } playersBegin = (this->_playerManager)._playerList._begin; playerSlot = playersBegin + playerIdx; - if ((uint)((int)playersEnd - (int)playersBegin >> 2) <= playerIdx) { + if (GHIDRA_UINT((GHIDRA_INT(playersEnd) - GHIDRA_INT(playersBegin) >> 2)) <= playerIdx) { playerSlot = playersBegin; } player = (Entity_Player *)*playerSlot; @@ -8288,8 +8288,8 @@ Entity_Player * Game::GetNearestPlayer(Vector *pos) fVar1 = fVar2; nearestPlayer = player; } while (playerIdx < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); } return nearestPlayer; } @@ -8338,13 +8338,13 @@ void Game::Fart(Vector *pos, float radius, Entity *source, float scale, int subT fartScale = scale + scale; trinketMultiplier = ((Entity_Player *)(sourcePlayer))->Entity_Player::GetTrinketMultiplier(0x86); } - EntityList::QueryRadius((EntityList *)((int)this->_room + 0x1218),&entities,pos,radius,0xffffffff) + EntityList::QueryRadius((EntityList *)(GHIDRA_INT(this->_room) + 0x1218),&entities,pos,radius,0xffffffff) ; local_8 = 0; source = (Entity *)0x0; if ((undefined1 *)entities._size != (undefined1 *)0x0) { do { - pEVar4 = *(Entity **)((char *)entities._data + (int)source * 4); + pEVar4 = *(Entity **)((char *)entities._data + GHIDRA_INT(source) * 4); if ((((pEVar4 != fartSource) && (pEVar4->_entityGridCollisionClass != 4)) && ((pEVar4->_mass != 0.0 && (bVar2 = ((Entity *)(pEVar4))->Entity::IsVulnerableEnemy((Entity *)0x0), bVar2 != 0)))) && @@ -8375,7 +8375,7 @@ void Game::Fart(Vector *pos, float radius, Entity *source, float scale, int subT } } source = (Entity *)&(*(undefined1 *)((char *)(source) + 0x1)); - } while (source < (uint)entities._size); + } while (source < GHIDRA_UINT(entities._size)); } uVar3 = Random(); pEVar4 = Spawn(g_game,1000,0x22,pos,&g_vectorZero,fartSource,subType,uVar3); @@ -8394,19 +8394,19 @@ void Game::Fart(Vector *pos, float radius, Entity *source, float scale, int subT if ((fartSource != (Entity *)0x0) && (fartSource->_type == 1)) { ((Entity_Player *)((Entity_Player *)fartSource))->Entity_Player::ShootCandle(direction); } - if (entities._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(entities) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { heapUsage = &g_allocatedBytesNoHeap; } else { - heapUsage = (qword *)((int)g_mainHeap + 0x30); + heapUsage = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (entities._data != (void *)0x0) { uVar3 = *(uint *)((char *)entities._data + -4); qVar1 = *heapUsage; - *(uint *)heapUsage = (uint)*heapUsage - uVar3; - *(uint *)((char *)heapUsage + 4) = *(uint *)((char *)heapUsage + 4) - (uint)((uint)qVar1 < uVar3); - free((void *)((int)entities._data + -4)); + *(uint *)heapUsage = GHIDRA_UINT(*heapUsage) - uVar3; + *(uint *)((char *)heapUsage + 4) = *(uint *)((char *)heapUsage + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar3)); + free((void *)(GHIDRA_INT(entities._data) + -4)); } } ExceptionList = local_10; @@ -8457,7 +8457,7 @@ void Game::CharmFart(Vector *position, float radius, Entity *source) radius = local_48; } EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),&entities,position,radius,0xffffffff); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&entities,position,radius,0xffffffff); uVar3 = 0; local_8 = 0; if (entities._size != 0) { @@ -8493,7 +8493,7 @@ void Game::CharmFart(Vector *position, float radius, Entity *source) } } uVar3 = uVar3 + 1; - } while (uVar3 < (uint)entities._size); + } while (uVar3 < GHIDRA_UINT(entities._size)); } uVar3 = Random(); fartEffect = Spawn(g_game,1000,0x22,positionLocal,&g_vectorZero,(Entity *)0x0,0,uVar3); @@ -8523,19 +8523,19 @@ void Game::CharmFart(Vector *position, float radius, Entity *source) if ((source != (Entity *)0x0) && (source->_type == 1)) { ((Entity_Player *)((Entity_Player *)source))->Entity_Player::ShootCandle(direction); } - if (entities._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(entities) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { heapUsage = &g_allocatedBytesNoHeap; } else { - heapUsage = (qword *)((int)g_mainHeap + 0x30); + heapUsage = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (entities._data != (void *)0x0) { uVar3 = *(uint *)((char *)entities._data + -4); qVar1 = *heapUsage; - *(uint *)heapUsage = (uint)*heapUsage - uVar3; - *(uint *)((char *)heapUsage + 4) = *(uint *)((char *)heapUsage + 4) - (uint)((uint)qVar1 < uVar3); - free((void *)((int)entities._data + -4)); + *(uint *)heapUsage = GHIDRA_UINT(*heapUsage) - uVar3; + *(uint *)((char *)heapUsage + 4) = *(uint *)((char *)heapUsage + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar3)); + free((void *)(GHIDRA_INT(entities._data) + -4)); } } ExceptionList = local_10; @@ -8584,25 +8584,25 @@ void Game::RerollLevelCollectibles() do { entityStates = savedEntities->_begin; entityIndex = 0; - savedEntitiesBytes = (int)savedEntities->_end - (int)entityStates; + savedEntitiesBytes = GHIDRA_INT(savedEntities->_end) - GHIDRA_INT(entityStates); iVar1 = savedEntitiesBytes >> 0x1f; if (savedEntitiesBytes / 0x78 + iVar1 != iVar1) { entityOffset = 0; do { - if ((((*(int *)(entityOffset + (int)entityStates) == 5) && - (*(int *)(entityOffset + 4 + (int)entityStates) == 100)) && - (iVar1 = *(int *)(entityOffset + 8 + (int)entityStates), iVar1 != 0)) && + if ((((*(int *)(entityOffset + GHIDRA_INT(entityStates)) == 5) && + (*(int *)(entityOffset + 4 + GHIDRA_INT(entityStates)) == 100)) && + (iVar1 = *(int *)(entityOffset + 8 + GHIDRA_INT(entityStates)), iVar1 != 0)) && (isRerollable = Entity_Pickup::CanRerollVariant(100,iVar1), isRerollable != 0)) { - *(undefined4 *)(entityOffset + 8 + (int)entityStates) = 0; - *(undefined1 *)(entityOffset + 0x22 + (int)savedEntities->_begin) = 0; + *(undefined4 *)(entityOffset + 8 + GHIDRA_INT(entityStates)) = 0; + *(undefined1 *)(entityOffset + 0x22 + GHIDRA_INT(savedEntities->_begin)) = 0; entityStates = savedEntities->_begin; } entityIndex = entityIndex + 1; entityOffset = entityOffset + 0x78; - } while (entityIndex < (uint)(((int)savedEntities->_end - (int)entityStates) / 0x78)); + } while (entityIndex < GHIDRA_UINT(((GHIDRA_INT(savedEntities->_end) - GHIDRA_INT(entityStates)) / 0x78))); } roomIndex = roomIndex + 1; - savedEntities = (std_vector *)((int)(savedEntities + 0xf) + 4); + savedEntities = (std_vector *)(GHIDRA_INT((savedEntities + 0xf)) + 4); } while (roomIndex < this->_nbRooms); } return; @@ -8633,7 +8633,7 @@ void Game::RerollLevelPickups(uint seed) do { pvVar5 = savedEntities->_begin; entityIndex = 0; - iVar4 = (int)savedEntities->_end - (int)pvVar5; + iVar4 = GHIDRA_INT(savedEntities->_end) - GHIDRA_INT(pvVar5); pickupVariant = iVar4 >> 0x1f; if (iVar4 / 0x78 + pickupVariant != pickupVariant) { entityOffset = 0; @@ -8677,7 +8677,7 @@ LAB_00704d00: } else if (pickupVariant == 10) { pvVar5 = (g_manager->_itemConfig)._trinkets._begin; - if ((((int)((int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar5 & 0xfffffffcU) + if (((GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar5) & 0xfffffffcU)) < 0x59) || (iVar4 = *(int *)((char *)pvVar5 + 0x58), iVar4 == 0)) || (bVar2 = true, (*(uint *)(iVar4 + 0xb8) & 0x80000000) == 0)) { bVar2 = false; @@ -8707,7 +8707,7 @@ LAB_00704d00: } LAB_00704ef7: roomIdx = roomIdx + 1; - savedEntities = (std_vector *)((int)(savedEntities + 0xf) + 4); + savedEntities = (std_vector *)(GHIDRA_INT((savedEntities + 0xf)) + 4); } while (roomIdx < this->_nbRooms); } return; @@ -8734,7 +8734,7 @@ LAB_00704ec8: pvVar5 = savedEntities->_begin; entityOffset = entityOffset + 0x78; entityIndex = entityIndex + 1; - if ((uint)(((int)savedEntities->_end - (int)pvVar5) / 0x78) <= entityIndex) goto LAB_00704ef7; + if (GHIDRA_UINT(((GHIDRA_INT(savedEntities->_end) - GHIDRA_INT(pvVar5)) / 0x78)) <= entityIndex) goto LAB_00704ef7; goto LAB_00704ca2; } @@ -8752,7 +8752,7 @@ void Game::FinishChallenge() if ((this->_fadeOutColor)._alpha <= 0.0) { if (g_game->_challenge != 0) { - isGameplayInputActive = Manager::IsGameplayInputActive((int)this); + isGameplayInputActive = Manager::IsGameplayInputActive(GHIDRA_INT(this)); manager = g_manager; if (isGameplayInputActive == 0) { KAGE_LogMessage(1,(byte *)"Setting PersistentGameData ReadOnly to %s\n"); @@ -8850,7 +8850,7 @@ byte Game::RerollEnemy(Entity_NPC *npc, byte isIgnoreHealthMatch) undefined4 local_14; void *filteredData; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &DAT_00afc42d; local_1c = ExceptionList; @@ -8949,13 +8949,13 @@ LAB_007052ae: local_38 = puVar11; } filteredData = filteredBegin; - iVar3 = (int)puVar9 - (int)filteredBegin >> 0x1f; + iVar3 = GHIDRA_INT(puVar9) - GHIDRA_INT(filteredBegin) >> 0x1f; pool = &filteredBegin; - if (((int)puVar9 - (int)filteredBegin) / 0x14 + iVar3 == iVar3) { + if ((GHIDRA_INT(puVar9) - GHIDRA_INT(filteredBegin)) / 0x14 + iVar3 == iVar3) { pool = (void **)local_28.y; } pvVar10 = *pool; - local_28.y = (float)(((int)pool[1] - (int)pvVar10) / 0x14); + local_28.y = (float)((GHIDRA_INT(pool[1]) - GHIDRA_INT(pvVar10)) / 0x14); local_30.y = (float)pvVar10; if (local_28.y == 0.0) { uVar12 = 0; @@ -8963,9 +8963,9 @@ LAB_007052ae: else { uVar12 = Random(); pvVar10 = *pool; - uVar12 = uVar12 % (uint)local_28.y; + uVar12 = uVar12 % GHIDRA_UINT(local_28.y); } - puVar1 = (uint *)((int)pvVar10 + uVar12 * 0x14); + puVar1 = (uint *)(GHIDRA_INT(pvVar10) + uVar12 * 0x14); newType = *puVar1; newVariant = puVar1[1]; uStack_58 = puVar1[2]; @@ -8983,19 +8983,19 @@ LAB_007052ae: ((Entity_NPC *)(newNpc))->Entity_NPC::Morph(newNpc->_type,newNpc->_variant,newNpc->_subtype,championColor); } qVar7 = newNpc->_flags; - puVar1 = (uint *)((int)&newNpc->_flags + 4); + puVar1 = (uint *)(GHIDRA_INT(&newNpc->_flags) + 4); *puVar1 = *puVar1 | 0x80; - *(int *)&newNpc->_flags = (int)qVar7; + *(int *)&newNpc->_flags = GHIDRA_INT(qVar7); newNpc->Update(); newNpc->_health = healthFraction * newNpc->_maxHitPoints; npc->Remove(); if (filteredData != (void *)0x0) { - uVar12 = (((int)local_38 - (int)filteredData) / 0x14) * 0x14; + uVar12 = ((GHIDRA_INT(local_38) - GHIDRA_INT(filteredData)) / 0x14) * 0x14; pvVar10 = filteredData; if (0xfff < uVar12) { pvVar10 = *(void **)((char *)filteredData + -4); uVar12 = uVar12 + 0x23; - if (0x1f < (uint)((int)filteredData + (-4 - (int)pvVar10))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(filteredData) + (-4 - GHIDRA_INT(pvVar10))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -9052,7 +9052,7 @@ byte Game::DevolveEnemy(Entity *entity, Entity **outEntity) bool isDevolvedFlying; Game *savedGame; - local_8 = __security_cookie ^ (int)register0x00000010 - 4U; + local_8 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; savedOutEntity = outEntity; game = g_game; if ((entity->_flags & 0x20000000) == 0) { @@ -9063,7 +9063,7 @@ byte Game::DevolveEnemy(Entity *entity, Entity **outEntity) pvVar1 = entity->_config; if (pvVar1 != (void *)0x0) { iVar8 = *(int *)((char *)pvVar1 + 0xa4); - scratchVec.y = (float)((int)pvVar1 + 0xa4); + scratchVec.y = (float)(GHIDRA_INT(pvVar1) + 0xa4); if ((iVar8 != *(int *)((char *)pvVar1 + 0xa8)) && (entity->_type != 0x19c)) { healthFraction = 1.0; championColor = -1; @@ -9090,7 +9090,7 @@ byte Game::DevolveEnemy(Entity *entity, Entity **outEntity) local_20 = *(uint *)(iVar7 + 0x58); } local_40.y = 3.78351e-44; - local_10.y = (float)((int)pvVar1 + 0xa8); + local_10.y = (float)(GHIDRA_INT(pvVar1) + 0xa8); if (iVar8 != *(int *)local_10.y) { do { fVar9 = fVar9 + *(float *)(iVar8 + 8); @@ -9098,7 +9098,7 @@ byte Game::DevolveEnemy(Entity *entity, Entity **outEntity) } while (iVar8 != *(int *)local_10.y); local_1c = fVar9; } - gridCollisionClass = (byte *)((int)pvVar1 + 0xb4); + gridCollisionClass = (byte *)(GHIDRA_INT(pvVar1) + 0xb4); if (0xf < *(uint *)((char *)pvVar1 + 200)) { gridCollisionClass = *(byte **)gridCollisionClass; } @@ -9120,16 +9120,16 @@ byte Game::DevolveEnemy(Entity *entity, Entity **outEntity) uVar6 = local_20 >> 4 ^ local_20; uVar6 = uVar6 << 3 ^ uVar6; uVar6 = uVar6 >> (SUB41(local_40.y,0) & 0x1f) ^ uVar6; - fVar9 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar9 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283062e-10 * fVar9; for (puVar5 = *(uint **)scratchVec.y; puVar5 != *(uint **)local_10.y; puVar5 = puVar5 + 3) { if (fVar9 < (float)puVar5[2]) { uVar6 = *puVar5; - if (999 < (int)uVar6) { + if (999 < GHIDRA_INT(uVar6)) { devolved = game->_room; - iVar8 = (int)(((entity->_pos).x - 40.0) / 40.0 + 0.5); + iVar8 = GHIDRA_INT((((entity->_pos).x - 40.0) / 40.0 + 0.5)); if ((((iVar8 < 0) || (devolved->_gridWidth <= iVar8)) || - (iVar7 = (int)(((entity->_pos).y - 120.0) / 40.0 + 0.5), iVar7 < 0)) || + (iVar7 = GHIDRA_INT((((entity->_pos).y - 120.0) / 40.0 + 0.5)), iVar7 < 0)) || (devolved->_gridHeight <= iVar7)) { gridIndex = 0xffffffff; } @@ -9138,7 +9138,7 @@ byte Game::DevolveEnemy(Entity *entity, Entity **outEntity) if (gridIndex != 0xffffffff) { isDevolvedFlying = 0; outEntity_00 = (Entity **)0x0; - local_10.x = (float)CONCAT22(local_10.x._2_2_,(short)puVar5[1]); + local_10.x = (float)CONCAT22((*(undefined2 *)((char *)&(local_10.x) + 0x2)),(short)puVar5[1]); entryType = uVar6; uVar6 = Random(); ((Room *)(devolved))->Room::SpawnEntry(gridIndex,&entryType,uVar6,outEntity_00,isDevolvedFlying); @@ -9154,8 +9154,8 @@ byte Game::DevolveEnemy(Entity *entity, Entity **outEntity) entity->Remove(); uVar6 = Random(); iVar8 = *(int *)((char *)game->_room + 0xc); - local_10.x = (float)((int)gridIndex % iVar8) * 40.0 + 40.0; - local_10.y = (float)((int)gridIndex / iVar8) * 40.0 + 120.0; + local_10.x = (float)(GHIDRA_INT(gridIndex) % iVar8) * 40.0 + 40.0; + local_10.y = (float)(GHIDRA_INT(gridIndex) / iVar8) * 40.0 + 120.0; poofEffect = Spawn(g_game,1000,0xf,&local_10,&g_vectorZero,(Entity *)0x0,0,uVar6); poofEffect->Update(); if (savedOutEntity == (Entity **)0x0) { @@ -9167,17 +9167,17 @@ byte Game::DevolveEnemy(Entity *entity, Entity **outEntity) if (uVar6 == 0) { return 0; } - local_1c = (float)(uint)(ushort)puVar5[1]; + local_1c = (float)GHIDRA_UINT((ushort)puVar5[1]); devolvedSubtype = *(ushort *)((char *)puVar5 + 6); if (uVar6 == 999) { uVar6 = 1000; } local_20 = uVar6; - local_10.y = (float)(uint)devolvedSubtype; + local_10.y = (float)GHIDRA_UINT(devolvedSubtype); Entity_NPC::Redirect((int *)&local_20,(int *)&local_1c); devolvedConfig = EntityConfig::GetEntity - (&g_manager->_entityConfig,local_20,(int)local_1c,(uint)devolvedSubtype); + (&g_manager->_entityConfig,local_20,GHIDRA_INT(local_1c),GHIDRA_UINT(devolvedSubtype)); if (devolvedConfig != (EntityConfig_Entity *)0x0) { devolvedGridCollisionClass = &devolvedConfig->gridCollisionClassString; if (0xf < (devolvedConfig->gridCollisionClassString)._capacity) { @@ -9216,8 +9216,8 @@ LAB_00705880: local_40.x = (entity->_pos).x; local_40.y = (entity->_pos).y; devolved = (Entity_NPC *) - Spawn(game,local_20,(uint)local_1c,&local_40,&scratchVec,(Entity *)0x0, - (uint)local_10.y,uVar6); + Spawn(game,local_20,GHIDRA_UINT(local_1c),&local_40,&scratchVec,(Entity *)0x0, + GHIDRA_UINT(local_10.y),uVar6); isDevolvedFlying = ((Entity *)((Entity *)devolved))->Entity::IsEnemy(); if (isDevolvedFlying != 0) { if (-1 < championColor) { @@ -9226,9 +9226,9 @@ LAB_00705880: } fVar9 = devolved->_maxHitPoints; flags = devolved->_flags; - puVar5 = (uint *)((int)&devolved->_flags + 4); + puVar5 = (uint *)(GHIDRA_INT(&devolved->_flags) + 4); *puVar5 = *puVar5 | 0x80; - *(int *)&devolved->_flags = (int)flags; + *(int *)&devolved->_flags = GHIDRA_INT(flags); devolved->_health = healthFraction * fVar9; } devolved->Update(); @@ -9301,7 +9301,7 @@ void Game::ShowHallucination(int param_2, int param_3) iVar2 = *(int *)((char *)game->_room + 0x10); *(float *)((char *)room + 0x6ae8) = (float)(*(int *)((char *)game->_room + 0xc) + -2) * 26.0 + 52.0; *(float *)((char *)room + 0x6aec) = (float)(iVar2 + -2) * 26.0 + 52.0; - ((Backdrop *)((Backdrop *)((int)room + 0x1bc8)))->Backdrop::load_details(); + ((Backdrop *)((Backdrop *)(GHIDRA_INT(room) + 0x1bc8)))->Backdrop::load_details(); } return; } @@ -9337,7 +9337,7 @@ void Game::save_rewind_state(int leaveDoor) return; } if ((-1 < hourglassState->_leaveDoor) && - ((uint)(g_game->_frameCount - hourglassState->_timeCounter) < 0xf)) { + (GHIDRA_UINT((g_game->_frameCount - hourglassState->_timeCounter)) < 0xf)) { return; } } @@ -9419,13 +9419,13 @@ void Game::rewind(Entity_Player *player) local_8 = 0xffffffff; puStack_c = &LAB_00afc45d; local_10 = ExceptionList; - uVar4 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar4 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; local_30 = g_game; iVar6 = g_game->_currentGlowingHourglassSlot; if (iVar6 < 0) { return; } - hourglassState = (GlowingHourglassState *)((int)g_game + iVar6 * -0x20660 + 0x4704c); + hourglassState = (GlowingHourglassState *)(GHIDRA_INT(g_game) + iVar6 * -0x20660 + 0x4704c); bVar8 = hourglassState->_isUsable; if (bVar8 == 0) { hourglassState = g_game->_glowingHourglassStates + iVar6; @@ -9459,7 +9459,7 @@ void Game::rewind(Entity_Player *player) else { if (((pEVar5->_variant == 0xce) && (pEVar5->_subtype == 0x1a6)) && (game->_frameCount - pEVar5->_spawnFrame < 2)) { - hourglassWispCount = (PlayerManager *)((int)hourglassWispCount + 1); + hourglassWispCount = (PlayerManager *)(GHIDRA_INT(hourglassWispCount) + 1); } local_20 = hourglassWispCount; LAB_00706148: @@ -9467,14 +9467,14 @@ LAB_00706148: local_1c = &pEVar5->_type; pEVar5->ClearReferences(uVar4); pvVar7 = g_game->_room; - ((EntityList_EL *)((EntityList_EL *)((int)pvVar7 + 0x1238)))->EntityList_EL::remove((Entity *)pEVar5); - ((EntityList_EL *)((EntityList_EL *)((int)pvVar7 + 0x1258)))->EntityList_EL::remove((Entity *)pEVar5); - ((EntityList_EL *)((EntityList_EL *)((int)pvVar7 + 0x1248)))->EntityList_EL::remove((Entity *)pEVar5); - ((EntityList_EL *)((EntityList_EL *)((int)pvVar7 + 0x1268)))->EntityList_EL::remove((Entity *)pEVar5); - ((EntityList_EL *)((EntityList_EL *)((int)pvVar7 + 0x12a8)))->EntityList_EL::remove((Entity *)pEVar5); + ((EntityList_EL *)((EntityList_EL *)(GHIDRA_INT(pvVar7) + 0x1238)))->EntityList_EL::remove((Entity *)pEVar5); + ((EntityList_EL *)((EntityList_EL *)(GHIDRA_INT(pvVar7) + 0x1258)))->EntityList_EL::remove((Entity *)pEVar5); + ((EntityList_EL *)((EntityList_EL *)(GHIDRA_INT(pvVar7) + 0x1248)))->EntityList_EL::remove((Entity *)pEVar5); + ((EntityList_EL *)((EntityList_EL *)(GHIDRA_INT(pvVar7) + 0x1268)))->EntityList_EL::remove((Entity *)pEVar5); + ((EntityList_EL *)((EntityList_EL *)(GHIDRA_INT(pvVar7) + 0x12a8)))->EntityList_EL::remove((Entity *)pEVar5); pEVar5->_valid = 0; EntityList::invalidate_type_cache - ((EntityList *)((int)pvVar7 + 0x1218),pEVar5->_type,pEVar5->_variant, + ((EntityList *)(GHIDRA_INT(pvVar7) + 0x1218),pEVar5->_type,pEVar5->_variant, pEVar5->_subtype); iVar6 = *local_1c; game = g_game; @@ -9497,13 +9497,13 @@ LAB_00706148: local_38.y = (float)player->_effectiveBloodCharge; } if ((*(int *)&(*(undefined1 *)((char *)&((local_2c->_gameState)) + 0xe4)) != local_30->_stage) || - (local_28 = (void *)((uint)local_28 & 0xffffff00), + (local_28 = (void *)(GHIDRA_UINT(local_28) & 0xffffff00), *(int *)&(*(undefined1 *)((char *)&((local_2c->_gameState)) + 0xe8)) != local_30->_stageType)) { - local_28 = (void *)CONCAT31(local_28._1_3_,1); + local_28 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_28) + 0x1)),1); } local_3c = local_30->_rewindsThisFloor; local_20 = (PlayerManager *)((Level *)((Level *)local_30))->Level::GetRoomByIdx(local_30->_currentRoomIdx,-1); - if ((*(int *)((int)((RoomDescriptor *)local_20)->Data + 8) == 4) && + if ((*(int *)(GHIDRA_INT(((RoomDescriptor *)local_20)->Data) + 8) == 4) && (((RoomDescriptor *)local_20)->VisitedCount == 1)) { pEVar5 = PlayerManager::FirstCollectibleOwner (&g_game->_playerManager,0x19e,(RNG **)&g_game->_playerManager,1); @@ -9522,7 +9522,7 @@ LAB_00706148: pEVar5 != (Entity_Player *)0x0)) && (iVar6 = ((Entity_Player *)(pEVar5))->Entity_Player::GetTrinketMultiplier(0x6f), 1 < iVar6)))) || (isHasMoreOptions != '\0')) { - *(undefined4 *)((int)*(void **)((char *)local_20 + 0x10) + 0x34) = 0x3f800000; + *(undefined4 *)(GHIDRA_INT(*(void **)((char *)local_20 + 0x10)) + 0x34) = 0x3f800000; } } game->_isRestoringGlowingHourglassState = 1; @@ -9559,28 +9559,28 @@ LAB_00706148: if (player != (Entity_Player *)0x0) { local_30 = (Game *)CONCAT31((int3)(local_3c + 1 >> 8),1); playerQueueProxy = (int *)0x0; - local_2c = (GlowingHourglassState *)CONCAT31(local_2c._1_3_,1); + local_2c = (GlowingHourglassState *)CONCAT31((*(undefined1 *)((char *)&(local_2c) + 0x1)),1); playerQueueMap = (void *)0x0; playerQueueMapSize = 0; playerQueueOffset = 0; playerQueueSize = 0; playerQueueProxy = operator_new(8); playerQueueProxy[1] = 0; - *playerQueueProxy = (int)&playerQueueProxy; + *playerQueueProxy = GHIDRA_INT(&playerQueueProxy); local_8 = 0; pvVar7 = (local_20->_playerList)._end; playerIt = (local_20->_playerList)._begin; iVar6 = playerQueueSize; - if ((int)pvVar7 - (int)playerIt >> 2 != 0) { + if (GHIDRA_INT(pvVar7) - GHIDRA_INT(playerIt) >> 2 != 0) { uVar4 = 0; do { - if ((int)pvVar7 - (int)playerIt >> 2 == 0) { + if (GHIDRA_INT(pvVar7) - GHIDRA_INT(playerIt) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar7 = (local_20->_playerList)._end; playerIt = (local_20->_playerList)._begin; iVar6 = playerQueueSize; } - if (uVar4 < (uint)((int)pvVar7 - (int)playerIt >> 2)) { + if (uVar4 < GHIDRA_UINT((GHIDRA_INT(pvVar7) - GHIDRA_INT(playerIt) >> 2))) { playerIt = playerIt + uVar4; } iVar1 = *playerIt; @@ -9626,7 +9626,7 @@ LAB_00706148: playerIt = (local_20->_playerList)._begin; pvVar7 = (local_20->_playerList)._end; piVar12 = local_1c; - } while (uVar4 < (uint)((int)pvVar7 - (int)playerIt >> 2)); + } while (uVar4 < GHIDRA_UINT((GHIDRA_INT(pvVar7) - GHIDRA_INT(playerIt) >> 2))); } while (iVar6 != 0) { uVar4 = playerQueueOffset >> 2; @@ -9641,23 +9641,23 @@ LAB_00706148: Entity_Player::TryDecreaseGlowingHourglassUses (*(Entity_Player **) (*(int *)((char *)playerQueueMap + (playerQueueMapSize - 1 & uVar4) * 4) + uVar10 * 4 - ),(int)local_2c,(byte)local_28); - local_30 = (Game *)((uint)local_30 & 0xff); + ),GHIDRA_INT(local_2c),(byte)local_28); + local_30 = (Game *)(GHIDRA_UINT(local_30) & 0xff); if (extraout_AL != '\0') { local_30 = (Game *)0x0; } - local_2c = (GlowingHourglassState *)CONCAT31(local_2c._1_3_,(char)local_30); + local_2c = (GlowingHourglassState *)CONCAT31((*(undefined1 *)((char *)&(local_2c) + 0x1)),(char)local_30); iVar6 = playerQueueSize; } player->_effectiveSoulCharge = local_24; - player->_effectiveBloodCharge = (int)local_38.y; + player->_effectiveBloodCharge = GHIDRA_INT(local_38.y); iVar6 = 0; - if (0 < (int)piVar12) { + if (0 < GHIDRA_INT(piVar12)) { do { local_38.x = (player->_pos).x; local_38.y = (player->_pos).y; Entity_Player::AddWisp(player,0x1a6,&local_38,0,0); - piVar12 = (int *)((int)piVar12 + -1); + piVar12 = (int *)(GHIDRA_INT(piVar12) + -1); } while (piVar12 != (int *)0x0); iVar6 = playerQueueSize; } @@ -9687,7 +9687,7 @@ LAB_00706148: if (0xfff < uVar4) { pvVar9 = *(void **)((char *)pvVar7 + -4); uVar4 = uVar4 + 0x23; - if (0x1f < (uint)((int)pvVar7 + (-4 - (int)pvVar9))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar7) + (-4 - GHIDRA_INT(pvVar9))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -9715,9 +9715,9 @@ LAB_00706148: uVar4 = 0; if ((this->_entityList)._updateEL._size != 0) { do { - (**(code **)(**(int **)((int)(this->_entityList)._updateEL._data + uVar4 * 4) + 0x30))(); + (**(code **)(**(int **)(GHIDRA_INT((this->_entityList)._updateEL._data) + uVar4 * 4) + 0x30))(); uVar4 = uVar4 + 1; - } while (uVar4 < (uint)(this->_entityList)._updateEL._size); + } while (uVar4 < GHIDRA_UINT((this->_entityList)._updateEL._size)); this = *temp_3f74d4d66a; } this->Room::Update(); @@ -9737,7 +9737,7 @@ GlowingHourglassState * Game::GetGlowingHourglassState() if (slot < 0) { return (GlowingHourglassState *)0x0; } - state = (GlowingHourglassState *)((int)this + slot * -0x20660 + 0x4704c); + state = (GlowingHourglassState *)(GHIDRA_INT(this) + slot * -0x20660 + 0x4704c); isUsable = state->_isUsable; if (isUsable == 0) { state = this->_glowingHourglassStates + slot; @@ -9822,12 +9822,12 @@ ChallengeParam * Game::GetChallengeParams() return &(this->_dailyChallenge)._params; } paramsBegin = (g_manager->_challengeParams)._begin; - clampedIndex = ((int)(g_manager->_challengeParams)._end - (int)paramsBegin) / 0xa4 - 1; - challengeIndex = -(uint)(this->_challenge != 0) & this->_challenge; + clampedIndex = (GHIDRA_INT((g_manager->_challengeParams)._end) - GHIDRA_INT(paramsBegin)) / 0xa4 - 1; + challengeIndex = -GHIDRA_UINT((this->_challenge != 0)) & this->_challenge; if (challengeIndex < clampedIndex) { clampedIndex = challengeIndex; } - return (ChallengeParam *)(clampedIndex * 0xa4 + (int)paramsBegin); + return (ChallengeParam *)(clampedIndex * 0xa4 + GHIDRA_INT(paramsBegin)); } // 00707370 @@ -9859,7 +9859,7 @@ Entity * Game::GetNearestEnemy(Vector *position, Entity *source, float radius, v uStack_8 = 0xffffffff; puStack_c = &LAB_00afc4c0; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar3 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; bestDistSq = radius * radius; local_14 = (Entity *)0x0; @@ -9892,7 +9892,7 @@ Entity * Game::GetNearestEnemy(Vector *position, Entity *source, float radius, v else { uVar4 = 4; } - entityRef._flags = uVar4 | uVar5 | (uint)((entity->_flags & 0x100) != 0); + entityRef._flags = uVar4 | uVar5 | GHIDRA_UINT(((entity->_flags & 0x100) != 0)); entityRef._entity = entity; bVar1 = ((Entity *)(source))->Entity::IsDamageSourceFriendly(&entityRef); if (bVar1 == 0) goto LAB_007074b5; @@ -9938,20 +9938,20 @@ LAB_007074d7: } else { LAB_007075f1: - uVar5 = (uint)entity->_flags; + uVar5 = GHIDRA_UINT(entity->_flags); if (((uVar5 & 0x20000000) == 0) && ((uVar5 & 0x10) == 0)) { if (distanceFn == (void *)0x0) { dy = pos->y - (entity->_pos).y; distSq = pos->x - (entity->_pos).x; distSq = dy * dy + distSq * distSq; - local_28 = *(int *)((int)&entity->_flags + 4); + local_28 = *(int *)(GHIDRA_INT(&entity->_flags) + 4); } else { customDist = (float10)(*distanceFn)(pos,source,entity); - uVar5 = (uint)entity->_flags; + uVar5 = GHIDRA_UINT(entity->_flags); distSq = (float)customDist; local_38 = distSq; - local_28 = *(int *)((int)&entity->_flags + 4); + local_28 = *(int *)(GHIDRA_INT(&entity->_flags) + 4); } if ((uVar5 & 0x100) != 0) { distSq = distSq + 160000.0; @@ -10065,7 +10065,7 @@ void Game::AddErasedEnemy(Entity *entity) return; } } - vector12_resize(this,((int)(game->_erasedEntities)._end - (int)this->_begin) / 0xc + 1); + vector12_resize(this,(GHIDRA_INT((game->_erasedEntities)._end) - GHIDRA_INT(this->_begin)) / 0xc + 1); erasedEnd = (game->_erasedEntities)._end; *(int *)((char *)erasedEnd + -0xc) = fixedType; *(int *)((char *)erasedEnd + -8) = fixedVariant; @@ -10141,10 +10141,10 @@ void Game::SaveBackwardsStage(int stage) iVar1 = *(int *)((char *)source->Data + 8); if (iVar1 == 5) { if ((roomIdx != this->_lastBossRoomListIdx) && - ((uint)*(int *)((char *)(game->_glowingHourglassStates + 2) + (stage * 200 + 0x34) * 4) < + (GHIDRA_UINT(*(int *)((char *)(game->_glowingHourglassStates + 2) + (stage * 200 + 0x34) * 4)) < 2)) { GameState::copy_room_list - (dest + *(int *)((int)(game->_glowingHourglassStates + 2) + + (dest + *(int *)(GHIDRA_INT((game->_glowingHourglassStates + 2)) + (stage * 200 + 0x34) * 4),source); iVar1 = *(int *)((char *)(game->_glowingHourglassStates + 2) + (stage * 200 + 0x34) * 4); if (dest[iVar1].Data != (void *)0x0) { @@ -10159,7 +10159,7 @@ void Game::SaveBackwardsStage(int stage) } } else if ((iVar1 == 4) && - ((uint)*(int *)((char *)(game->_glowingHourglassStates + 2) + (stage * 200 + 0x35) * 4) + (GHIDRA_UINT(*(int *)((char *)(game->_glowingHourglassStates + 2) + (stage * 200 + 0x35) * 4)) < 2)) { GameState::copy_room_list ((RoomDescriptor *) @@ -10282,7 +10282,7 @@ void Game::update_trapdoor_loop_sfx() pvVar1 = trapdoor->_room; local_24 = 0.0; isTrapdoorRoom = false; - local_14._0_4_ = 0.0; + (*(undefined4 *)((char *)&(local_14) + 0x0)) = 0.0; distanceVolume = 1.0; if ((((pvVar1 != (void *)0x0) && (trapdoor->_difficulty != 2)) && (trapdoor->_difficulty != 3)) && ((trapdoor->_stage != 9 && (trapdoor->_stage != 0xd)))) { @@ -10293,7 +10293,7 @@ void Game::update_trapdoor_loop_sfx() gridIndex = 0; isTrapdoorRoom = true; if (0 < iVar4) { - gridSlot = (undefined4 *)((int)pvVar1 + 0x24); + gridSlot = (undefined4 *)(GHIDRA_INT(pvVar1) + 0x24); do { if (((gridIndex < 0x1c0) && (trapdoor = (GridEntity *)*gridSlot, trapdoor != (GridEntity *)0x0)) && @@ -10305,7 +10305,7 @@ void Game::update_trapdoor_loop_sfx() } gridIndex = gridIndex + 1; gridSlot = gridSlot + 1; - } while ((int)gridIndex < iVar4); + } while (GHIDRA_INT(gridIndex) < iVar4); } } iVar4 = 0; @@ -10318,7 +10318,7 @@ LAB_00708805: fVar5 = local_20.x - (player->_pos).y; fVar5 = sqrtf(local_24 * local_24 + fVar5 * fVar5); if (0.0 < fVar5) { - local_14._0_4_ = 0.6; + (*(undefined4 *)((char *)&(local_14) + 0x0)) = 0.6; distanceVolume = 200.0 / fVar5; pfVar3 = (float *)local_14; if (0.6 <= 200.0 / fVar5) { @@ -10329,15 +10329,15 @@ LAB_00708805: distanceVolume = 1.0; } } - local_14._0_4_ = 0.75; + (*(undefined4 *)((char *)&(local_14) + 0x0)) = 0.75; local_20.x = local_24 / 300.0; pVVar2 = (Vector *)local_14; if (local_24 / 300.0 <= 0.75) { pVVar2 = &local_20; } - local_14._0_4_ = pVVar2->x; - if ((float)local_14._0_4_ <= -0.75) { - local_14._0_4_ = -0.75; + (*(undefined4 *)((char *)&(local_14) + 0x0)) = pVVar2->x; + if ((*(undefined4 *)((char *)&((float)local_14) + 0x0)) <= -0.75) { + (*(undefined4 *)((char *)&(local_14) + 0x0)) = -0.75; } } isPlaying = ((SFXManager *)(&g_manager->_sfxManager))->SFXManager::IsPlaying(0x3f0); @@ -10346,7 +10346,7 @@ LAB_00708805: if (isPlaying == 0) { local_20.x = 1.41251e-42; seed_fart_sound_override((int *)&local_20); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_20.x,fVar5,0,1,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_20.x),fVar5,0,1,1.0,0.0); return; } fVar5 = fVar5 + 0.05; @@ -10356,7 +10356,7 @@ LAB_00708805: sfxManager = &g_manager->_sfxManager; *(float *)&(*(undefined1 *)((char *)(trapdoor) + 0x68d74)) = fVar5; ((SFXManager *)(sfxManager))->SFXManager::AdjustVolume(0x3f0,fVar5 * distanceVolume); - ((SFXManager *)(&g_manager->_sfxManager))->SFXManager::adjust_pan(0x3f0,(float)local_14._0_4_); + ((SFXManager *)(&g_manager->_sfxManager))->SFXManager::adjust_pan(0x3f0,(*(undefined4 *)((char *)&((float)local_14) + 0x0))); return; } door = *(int *)((char *)pvVar1 + iVar4 * 4 + 0x724); @@ -10646,7 +10646,7 @@ void Game::generate_home_level() local_8 = 0xffffffff; puStack_c = &LAB_00afe350; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(local_30 + 0x2c); + local_14 = __security_cookie ^ GHIDRA_UINT((local_30 + 0x2c)); ExceptionList = &local_10; seed = (this->_generationRNG)._seed; rng = &this->_generationRNG; @@ -10665,7 +10665,7 @@ void Game::generate_home_level() rng->_seed = seed; ((RoomDescriptor *)(generator))->RoomDescriptor::Init(seed); local_8 = 0; - if ((uint)((local_40 - local_48[0]) / 0x48) < 6) { + if (GHIDRA_UINT(((local_40 - local_48[0]) / 0x48)) < 6) { vector_LevelGenerator_Room_reserve(local_48,6); } pvVar2 = LevelGenerator::CreateRoom((LevelGenerator *)generator,6,6,1,-1,-1,-1); @@ -10882,14 +10882,14 @@ void Game::generate_home_level() pvVar2 = ThreadLocalStoragePointer; if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } specialRoomDesc = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { specialRoomDesc = this->_roomList + 0x1fc; } ((Seeds *)((Seeds *)specialRoomDesc))->Seeds::Init3(rng); @@ -10913,27 +10913,27 @@ void Game::generate_home_level() iVar4 = *(int *)pvVar2; if ((*(int *)(iVar4 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } specialRoomDesc = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { specialRoomDesc = this->_roomList + 0x1fc; } specialRoomDesc->Data = local_3b0; if ((*(int *)(iVar4 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } specialRoomDesc = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { specialRoomDesc = this->_roomList + 0x200; } ((Seeds *)((Seeds *)specialRoomDesc))->Seeds::Init3(rng); @@ -10957,27 +10957,27 @@ void Game::generate_home_level() iVar4 = *(int *)ThreadLocalStoragePointer; if ((*(int *)(iVar4 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } specialRoomDesc = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { specialRoomDesc = this->_roomList + 0x200; } specialRoomDesc->Data = local_3b0; if ((*(int *)(iVar4 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } specialRoomDesc = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { specialRoomDesc = this->_roomList + 0x1fe; } ((Seeds *)((Seeds *)specialRoomDesc))->Seeds::Init3(rng); @@ -11001,39 +11001,39 @@ void Game::generate_home_level() iVar4 = *(int *)ThreadLocalStoragePointer; if ((*(int *)(iVar4 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } specialRoomDesc = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { specialRoomDesc = this->_roomList + 0x1fe; } specialRoomDesc->Data = local_3b0; if ((*(int *)(iVar4 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } specialRoomDesc = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { specialRoomDesc = this->_roomList + 0x204; } ((Seeds *)((Seeds *)specialRoomDesc))->Seeds::Init3(rng); pRVar3 = RoomConfig::GetRoomByStageTypeAndVariant(roomConfig,0x23,0x10,0x29a,-1); if ((*(int *)(iVar4 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8 = CONCAT31(local_8._1_3_,8); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),8); ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); _Init_thread_footer(&g_invalidRoomDescriptorGuard); } - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { specialRoomDesc = this->_roomList + 0x204; } else { @@ -11202,11 +11202,11 @@ void Game::render_debug_player_info(Entity_Player *debugPlayer, Vector *pos) undefined4 historyTime; game = g_game; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b0027d; local_1c = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 0x10U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; bgColor._red = 0.0; bgColor._green = 0.0; @@ -11238,7 +11238,7 @@ void Game::render_debug_player_info(Entity_Player *debugPlayer, Vector *pos) uVar1 = 0; pvVar3 = (debugPlayer->_collectibleCounts)._begin; lineY = linePos.y; - if ((int)(debugPlayer->_collectibleCounts)._end - (int)pvVar3 >> 2 != 0) { + if (GHIDRA_INT((debugPlayer->_collectibleCounts)._end) - GHIDRA_INT(pvVar3) >> 2 != 0) { do { local_98 = *(int *)((char *)pvVar3 + uVar1 * 4); iVar2 = ((Entity_Player *)(debugPlayer))->Entity_Player::GetCollectibleNum(uVar1,0); @@ -11291,7 +11291,7 @@ LAB_007d021d: uVar1 = uVar1 + 1; pvVar3 = (local_b4->_collectibleCounts)._begin; debugPlayer = local_b4; - } while (uVar1 < (uint)((int)(local_b4->_collectibleCounts)._end - (int)pvVar3 >> 2)); + } while (uVar1 < GHIDRA_UINT((GHIDRA_INT((local_b4->_collectibleCounts)._end) - GHIDRA_INT(pvVar3) >> 2))); } fVar8 = 0.0; rowSize.x = 120.0; @@ -11333,7 +11333,7 @@ LAB_007d021d: lineY = lineY + 8.0; local_a8.y = (float)(debugPlayer->_temporaryeffects)._effects._begin; local_9c = 0.0; - if ((int)(debugPlayer->_temporaryeffects)._effects._end - (int)local_a8.y >> 4 != 0) { + if (GHIDRA_INT((debugPlayer->_temporaryeffects)._effects._end) - GHIDRA_INT(local_a8.y) >> 4 != 0) { rowSize.x = 120.0; rowSize.y = 7.0; local_98 = 0; @@ -11384,13 +11384,13 @@ LAB_007d021d: *(undefined4 *)((char *)pvVar3 + local_98 + 8)); lineY = lineY + 8.0; local_a8.y = (float)(debugPlayer->_temporaryeffects)._effects._begin; - local_9c = (float)((int)local_9c + 1); + local_9c = (float)(GHIDRA_INT(local_9c) + 1); local_98 = local_98 + 0x10; - } while ((uint)local_9c < - (uint)((int)(debugPlayer->_temporaryeffects)._effects._end - (int)local_a8.y >> 4)); + } while (GHIDRA_UINT(local_9c) < + GHIDRA_UINT((GHIDRA_INT((debugPlayer->_temporaryeffects)._effects._end) - GHIDRA_INT(local_a8.y) >> 4))); } local_a8.y = 0.0; - local_ac = (StringTable *)((int)g_game->_room + 0x7314); + local_ac = (StringTable *)(GHIDRA_INT(g_game->_room) + 0x7314); iVar2 = *(int *)local_ac; if (*(int *)((char *)g_game->_room + 0x7318) - iVar2 >> 4 != 0) { rowSize.x = 120.0; @@ -11433,13 +11433,13 @@ LAB_007d021d: textColor._blue = 1.0; textColor._alpha = 1.0; FUN_007cf9a0(&linePos,&textColor,"[R] %s x%d: %d",local_80.y, - *(undefined4 *)(iVar2 + 4 + (int)local_9c), - *(undefined4 *)(iVar2 + 8 + (int)local_9c)); - local_9c = (float)((int)fVar8 + 0x10); + *(undefined4 *)(iVar2 + 4 + GHIDRA_INT(local_9c)), + *(undefined4 *)(iVar2 + 8 + GHIDRA_INT(local_9c))); + local_9c = (float)(GHIDRA_INT(fVar8) + 0x10); lineY = lineY + 8.0; iVar2 = *(int *)local_ac; - local_a8.y = (float)((int)local_a8.y + 1); - } while ((uint)local_a8.y < (uint)(*(int *)&(*(undefined1 *)((char *)(local_ac) + 0x4)) - iVar2 >> 4)); + local_a8.y = (float)(GHIDRA_INT(local_a8.y) + 1); + } while (GHIDRA_UINT(local_a8.y) < GHIDRA_UINT((*(int *)&(*(undefined1 *)((char *)(local_ac) + 0x4)) - iVar2 >> 4))); debugPlayer = local_b4; } fVar8 = 0.0; @@ -11557,13 +11557,13 @@ LAB_007d021d: } psVar5 = &bitsText; if (0xf < bitsText._capacity) { - psVar5 = (std_string *)bitsText._buf._0_4_; + psVar5 = (*(undefined4 *)((char *)&((std_string *)bitsText._buf) + 0x0)); } local_2c = 0; local_28 = 0xf; local_3c = (undefined4 *******)0x0; std::string::append_reversed(psVar5->_buf + bitsText._size,psVar5,local_80.y); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; pppppppuVar7 = &local_3c; if (0xf < local_28) { pppppppuVar7 = local_3c; @@ -11575,19 +11575,19 @@ LAB_007d021d: textColor._blue = 1.0; textColor._alpha = 1.0; FUN_007cf9a0(&linePos,&textColor,"Black hearts: %s",pppppppuVar7); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (0xf < local_28) { pppppppuVar7 = (undefined4 *******)(local_28 + 1); ptr = (char *)local_3c; if ((undefined4 *******)0xfff < pppppppuVar7) { ptr = (char *)local_3c[-1]; pppppppuVar7 = (undefined4 *******)(local_28 + 0x24); - if (0x1f < (uint)((int)local_3c + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_3c) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(ptr,(uint)pppppppuVar7); + operator_delete(ptr,GHIDRA_UINT(pppppppuVar7)); } linePos.y = lineY + 8.0; local_80.y = (float)debugPlayer->_boneHearts; @@ -11595,10 +11595,10 @@ LAB_007d021d: psVar5 = (std_string *)std::bitset<32>::to_string(&local_3c,ptr,pppppppuVar7); if (&bitsText != psVar5) { ((std::string *)(bitsText._buf))->std::string::_Tidy_deallocate(); - bitsText._buf._0_4_ = *(undefined4 *)psVar5->_buf; - bitsText._buf._4_4_ = *(undefined4 *)(psVar5->_buf + 4); - bitsText._buf._8_4_ = *(undefined4 *)(psVar5->_buf + 8); - bitsText._buf._12_4_ = *(undefined4 *)(psVar5->_buf + 0xc); + (*(undefined4 *)((char *)&(bitsText._buf) + 0x0)) = *(undefined4 *)psVar5->_buf; + (*(undefined4 *)((char *)&(bitsText._buf) + 0x4)) = *(undefined4 *)(psVar5->_buf + 4); + (*(undefined4 *)((char *)&(bitsText._buf) + 0x8)) = *(undefined4 *)(psVar5->_buf + 8); + (*(undefined4 *)((char *)&(bitsText._buf) + 0xc)) = *(undefined4 *)(psVar5->_buf + 0xc); bitsText._size = psVar5->_size; bitsText._capacity = psVar5->_capacity; psVar5->_size = 0; @@ -11611,7 +11611,7 @@ LAB_007d021d: if (0xfff < uVar1) { pppppppuVar7 = (undefined4 *******)local_3c[-1]; uVar1 = local_28 + 0x24; - if (0x1f < (uint)((int)local_3c + (-4 - (int)pppppppuVar7))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_3c) + (-4 - GHIDRA_INT(pppppppuVar7))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -11640,27 +11640,27 @@ LAB_007d021d: } psVar5 = &bitsText; if (0xf < bitsText._capacity) { - psVar5 = (std_string *)bitsText._buf._0_4_; + psVar5 = (*(undefined4 *)((char *)&((std_string *)bitsText._buf) + 0x0)); } local_2c = 0; local_28 = 0xf; local_3c = (undefined4 *******)0x0; std::string::append_reversed(psVar5->_buf + bitsText._size,psVar5,local_80.y); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; pppppppuVar7 = &local_3c; if (0xf < local_28) { pppppppuVar7 = local_3c; } ((KColor *)(&textColor))->KColor::SetFromARGB(0xffffffff); FUN_007cf9a0(&linePos,extraout_ECX_03,"Bone hearts.: %s",pppppppuVar7); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (0xf < local_28) { uVar1 = local_28 + 1; pppppppuVar7 = local_3c; if (0xfff < uVar1) { pppppppuVar7 = (undefined4 *******)local_3c[-1]; uVar1 = local_28 + 0x24; - if (0x1f < (uint)((int)local_3c + (-4 - (int)pppppppuVar7))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_3c) + (-4 - GHIDRA_INT(pppppppuVar7))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -11713,7 +11713,7 @@ LAB_007d021d: render_color_shader_pass(quad_07); ((KColor *)(&textColor))->KColor::SetFromARGB(0xffffffff); FUN_007cf9a0(&linePos,extraout_ECX_08,"Greed\'s Gullet: %d (overflow:%d)", - (int)player->_greedsGulletHearts,(int)player->_greedsGulletOverflow); + GHIDRA_INT(player->_greedsGulletHearts),GHIDRA_INT(player->_greedsGulletOverflow)); linePos.y = lineY + 8.0; rowSize.x = 120.0; rowSize.y = 7.0; @@ -11726,9 +11726,9 @@ LAB_007d021d: uVar1 = 0; lineY = linePos.y; do { - if (((int)uVar1 < 0) || + if ((GHIDRA_INT(uVar1) < 0) || (pvVar3 = (g_manager->_itemConfig)._playerForms._begin, - (int)(g_manager->_itemConfig)._playerForms._end - (int)pvVar3 >> 2 <= (int)uVar1)) { + GHIDRA_INT((g_manager->_itemConfig)._playerForms._end) - GHIDRA_INT(pvVar3) >> 2 <= GHIDRA_INT(uVar1))) { local_a0 = (Vector *)0x0; } else { @@ -11740,7 +11740,7 @@ LAB_007d021d: render_quad_set_rect(bgQuad,&linePos,&rowSize,&bgColor); render_color_shader_pass(quad_09); local_a8.y = (float)player->_playerForms[uVar1]; - labelText = (byte *)((int)local_a0 + 0x10); + labelText = (byte *)(GHIDRA_INT(local_a0) + 0x10); if (0xf < *(uint *)((char *)local_a0 + 0x24)) { labelText = *(byte **)labelText; } @@ -11765,11 +11765,11 @@ LAB_007d021d: } while (uVar1 < 0x10); if (0xf < bitsText._capacity) { uVar1 = bitsText._capacity + 1; - pvVar3 = (void *)bitsText._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)bitsText._buf) + 0x0)); if (0xfff < uVar1) { - pvVar3 = *(void **)(bitsText._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(bitsText._buf) + 0x0)) + -4); uVar1 = bitsText._capacity + 0x24; - if (0x1f < (bitsText._buf._0_4_ - (int)pvVar3) - 4U) { + if (0x1f < ((*(undefined4 *)((char *)&(bitsText._buf) + 0x0)) - GHIDRA_INT(pvVar3)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -11802,14 +11802,14 @@ LAB_007d021d: render_quad_set_rect(bgQuad,&linePos,&local_a8,&bgColor); render_color_shader_pass(quad_01); uVar1 = puVar4[6]; - if (((int)uVar1 < 0) || (0x1e < uVar1)) { + if ((GHIDRA_INT(uVar1) < 0) || (0x1e < uVar1)) { labelText = &s_empty; } else { labelText = (&PTR_s_treasure_00b1f3d0)[uVar1]; } uVar1 = puVar4[5]; - if (((int)uVar1 < 0) || (0x1d < uVar1)) { + if ((GHIDRA_INT(uVar1) < 0) || (0x1d < uVar1)) { roomTypeName = &s_empty; } else { @@ -11830,14 +11830,14 @@ LAB_007d021d: render_quad_set_rect(bgQuad,&linePos,&local_80,&bgColor); render_color_shader_pass(quad_00); uVar1 = puVar4[6]; - if (((int)uVar1 < 0) || (0x1e < uVar1)) { + if ((GHIDRA_INT(uVar1) < 0) || (0x1e < uVar1)) { labelText = &s_empty; } else { labelText = (&PTR_s_treasure_00b1f3d0)[uVar1]; } uVar1 = puVar4[5]; - if (((int)uVar1 < 0) || (0x1d < uVar1)) { + if ((GHIDRA_INT(uVar1) < 0) || (0x1d < uVar1)) { roomTypeName = &s_empty; } else { @@ -11873,7 +11873,7 @@ int Game::damage_cooldown_scale(int ticks) } scaledTicks = 1; if (0xf < ticks) { - scaledTicks = (uint)ticks >> 3; + scaledTicks = GHIDRA_UINT(ticks) >> 3; } return scaledTicks; } @@ -11905,7 +11905,7 @@ void Game::reset_players_for_greed(Entity_Player *player) local_8 = 0xffffffff; puStack_c = &LAB_00b00565; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; if (player->_exists == 0) { return; } @@ -11914,7 +11914,7 @@ void Game::reset_players_for_greed(Entity_Player *player) } local_20 = (void **)player->_controllerIndex; ExceptionList = &local_10; - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&familiars,3,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&familiars,3,-1,-1,0,0); local_8 = 0; i = 0; if (familiars._size != 0) { @@ -11927,17 +11927,17 @@ void Game::reset_players_for_greed(Entity_Player *player) pvVar3 = familiars._data; } i = i + 1; - } while (i < (uint)familiars._size); + } while (i < GHIDRA_UINT(familiars._size)); } local_2c = (void *)0x0; local_14 = (void *)0x0; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); otherPlayer = player->_twinPlayer; local_18 = (void *)0x0; if ((otherPlayer != (EntityPtr)0x0) || (otherPlayer = (EntityPtr)player->_backupPlayer, otherPlayer != (EntityPtr)0x0)) { local_18 = (void *)0x0; - ppvVar4 = (void **)((int)otherPlayer + 0x20dc); + ppvVar4 = (void **)(GHIDRA_INT(otherPlayer) + 0x20dc); if (&local_2c != ppvVar4) { local_14 = *(void **)((char *)otherPlayer + 0x20e0); local_18 = *(void **)((char *)otherPlayer + 0x20e4); @@ -11972,14 +11972,14 @@ void Game::reset_players_for_greed(Entity_Player *player) savedDamageTaken = player->_totalDamageTaken; (**(code **)(*(int *)player + 4)) (player->_type,player->_variant,player->_playerType,player->_initSeed); - ((Entity_Player *)(player))->Entity_Player::SetControllerIndex((int)local_20,0); + ((Entity_Player *)(player))->Entity_Player::SetControllerIndex(GHIDRA_INT(local_20),0); ppvVar4 = local_20; player->_totalDamageTaken = savedDamageTaken; if (player->_twinPlayer != (EntityPtr)0x0) { - ((Entity_Player *)((Entity_Player *)player->_twinPlayer))->Entity_Player::SetControllerIndex((int)local_20,0); + ((Entity_Player *)((Entity_Player *)player->_twinPlayer))->Entity_Player::SetControllerIndex(GHIDRA_INT(local_20),0); } if (player->_backupPlayer != (Entity_Player *)0x0) { - ((Entity_Player *)(player->_backupPlayer))->Entity_Player::SetControllerIndex((int)ppvVar4,0); + ((Entity_Player *)(player->_backupPlayer))->Entity_Player::SetControllerIndex(GHIDRA_INT(ppvVar4),0); } ((Entity_Player *)(player))->Entity_Player::ResetPlayer(); pvVar5 = local_1c; @@ -11988,7 +11988,7 @@ void Game::reset_players_for_greed(Entity_Player *player) if (otherPlayer == (EntityPtr)0x0) { otherPlayer = (EntityPtr)player->_backupPlayer; if (otherPlayer == (EntityPtr)0x0) goto LAB_007db61a; - local_20 = (void **)((int)otherPlayer + 0x20dc); + local_20 = (void **)(GHIDRA_INT(otherPlayer) + 0x20dc); if (&local_2c != local_20) { local_2c = *local_20; *local_20 = local_1c; @@ -12001,7 +12001,7 @@ void Game::reset_players_for_greed(Entity_Player *player) } } else { - local_20 = (void **)((int)otherPlayer + 0x20dc); + local_20 = (void **)(GHIDRA_INT(otherPlayer) + 0x20dc); if (&local_2c != local_20) { local_2c = *local_20; *local_20 = local_1c; @@ -12023,19 +12023,19 @@ LAB_007db61a: } local_8 = local_8 & 0xffffff00; if (pvVar5 != (void *)0x0) { - uVar2 = (int)pvVar3 - (int)pvVar5 & 0xfffffffc; + uVar2 = GHIDRA_INT(pvVar3) - GHIDRA_INT(pvVar5) & 0xfffffffc; pvVar3 = pvVar5; if (0xfff < uVar2) { pvVar3 = *(void **)((char *)pvVar5 + -4); uVar2 = uVar2 + 0x23; - if (0x1f < (uint)((int)pvVar5 + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar5) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar3,uVar2); } - if (familiars._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(familiars) + 0x0)) == '\0') { local_8 = 2; tracked_alloc(1,familiars._data,0); } @@ -12200,10 +12200,10 @@ void Game::Render(Entity *entity, Vector *renderOffset) int layerFramesBase; EntityPtr temp_5ff20d4b15; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); puStack_18 = &LAB_00b014f8; local_1c = ExceptionList; - local_24 = (float)(__security_cookie ^ (uint)(&tmpColor + 2)); + local_24 = (float)(__security_cookie ^ GHIDRA_UINT((&tmpColor + 2))); ExceptionList = &local_1c; flickerRng._seed = g_game->_frameCount + entity->_initSeed; lightEntity = (Entity_Player *)entity; @@ -12224,8 +12224,8 @@ void Game::Render(Entity *entity, Vector *renderOffset) if (entity->_visible != 0) { uVar16 = (entity->_sprite)._bitflags; if ((uVar16 >> 0xb & 1) != 0) { - local_178._0_4_ = (entity->_pos).x + (entity->_posOffset).x; - local_178._4_4_ = (entity->_pos).y + (entity->_posOffset).y; + (*(undefined4 *)((char *)&(local_178) + 0x0)) = (entity->_pos).x + (entity->_posOffset).x; + (*(undefined4 *)((char *)&(local_178) + 0x4)) = (entity->_pos).y + (entity->_posOffset).y; pVVar5 = Isaac::GetRenderPosition(&local_13c,(Vector *)local_178,1); local_160.y = (float)(renderOffsetLocal.x + pVVar5->x); local_130 = &entity->_sprite; @@ -12238,19 +12238,19 @@ void Game::Render(Entity *entity, Vector *renderOffset) lightSprite = local_130; local_150.y = 0.0; do { - local_108 = *(ANM2 **)(*(int *)(local_178 + (int)local_150.y * 4 + -8) + 4); + local_108 = *(ANM2 **)(*(int *)(local_178 + GHIDRA_INT(local_150.y) * 4 + -8) + 4); if ((local_108 != (ANM2 *)0x0) && - (local_12c = (ANM2 *)0x0, *(int *)((int)(local_108->_animDefaultName)._buf + 0xc) != 0)) + (local_12c = (ANM2 *)0x0, *(int *)(GHIDRA_INT((local_108->_animDefaultName)._buf) + 0xc) != 0)) { local_154 = 0.0; do { - local_130 = *(ANM2 **)(*(int *)((int)(local_108->_animDefaultName)._buf + 8) + - (int)local_154); + local_130 = *(ANM2 **)(*(int *)(GHIDRA_INT((local_108->_animDefaultName)._buf) + 8) + + GHIDRA_INT(local_154)); local_EAX_515 = (char *)FUN_0040b4d0(); pbVar6 = ((std::string *)(local_EAX_515))->std::string::c_str(); if ((*pbVar6 == 0x2a) && ((lightSprite->_animState)._animData != (void *)0x0)) { local_130 = AnimationState::GetNullFrameById - ((AnimationState *)local_180.y,(int)local_130); + ((AnimationState *)local_180.y,GHIDRA_INT(local_130)); if ((local_130 != (ANM2 *)0x0) && (((local_130->_filename)._buf[0xc] != '\0' && (0.0 < *(float *)((local_130->_animDefaultName)._buf + 0xc))))) { @@ -12277,7 +12277,7 @@ void Game::Render(Entity *entity, Vector *renderOffset) lightColor._colorize[1] = (lightSprite->_color)._colorize[1]; lightColor._colorize[2] = (lightSprite->_color)._colorize[2]; lightColor._colorize[3] = (lightSprite->_color)._colorize[3]; - lightColor._offset._0_8_ = *(undefined8 *)(lightSprite->_color)._offset; + (*(undefined8 *)((char *)&(lightColor._offset) + 0x0)) = *(undefined8 *)(lightSprite->_color)._offset; ((Color *)(&lightColor))->Color::__mul((ColorMod *)&local_130->_animDefaultName); ((Color *)((Color *)&tmpColor))->Color::operator_assign((ColorMod *)&lightColor); Color::apply_to_kcolor(&local_1a8,&tmpColor,pKVar15); @@ -12302,12 +12302,12 @@ void Game::Render(Entity *entity, Vector *renderOffset) this = (Game *)room; } } - local_12c = (ANM2 *)((int)(local_12c->_filename)._buf + 1); - local_154 = (float)((int)local_154 + 0x10); - } while (local_12c < *(ANM2 **)((int)(local_108->_animDefaultName)._buf + 0xc)); + local_12c = (ANM2 *)(GHIDRA_INT((local_12c->_filename)._buf) + 1); + local_154 = (float)(GHIDRA_INT(local_154) + 0x10); + } while (local_12c < *(ANM2 **)(GHIDRA_INT((local_108->_animDefaultName)._buf) + 0xc)); } - local_150.y = (float)((int)((std_string *)local_150.y)->_buf + 1); - } while ((uint)local_150.y < (ANM2 *)0x2); + local_150.y = (float)(GHIDRA_INT(((std_string *)local_150.y)->_buf) + 1); + } while (GHIDRA_UINT(local_150.y) < (ANM2 *)0x2); this->_roomList[0x9a]._doors[1] = 0; uVar16 = (lightEntity->_sprite)._bitflags; entity = (Entity *)lightEntity; @@ -12324,7 +12324,7 @@ void Game::Render(Entity *entity, Vector *renderOffset) local_180.y = (float)&(((Entity_Player *)entity)->_sprite)._animState; local_154 = 0.0; do { - pvVar11 = *(void **)(*(int *)(local_178 + (int)local_154 * 4 + -8) + 4); + pvVar11 = *(void **)(*(int *)(local_178 + GHIDRA_INT(local_154) * 4 + -8) + 4); local_160.y = (float)pvVar11; if (pvVar11 != (void *)0x0) { local_150.y = 0.0; @@ -12336,21 +12336,21 @@ void Game::Render(Entity *entity, Vector *renderOffset) if ((layer->_bitflags & 4) != 0) { layerFramesBase = *(int *)((char *)pvVar11 + 0x18); frameIndex = AnimationState::GetLayerFrameIdx - (*(AnimationState **)(local_178 + (int)local_154 * 4 + -8), - (int)local_100.y); + (*(AnimationState **)(local_178 + GHIDRA_INT(local_154) * 4 + -8), + GHIDRA_INT(local_100.y)); AnimationLayer::RenderFrame ((AnimationLayer *)(layerFramesBase + iVar20),&local_188,frameIndex, &g_vectorZero,&g_vectorZero,local_12c); pvVar11 = (void *)local_160.y; } iVar20 = iVar20 + 0x10; - local_150.y = (float)((int)((std_string *)local_150.y)->_buf + 1); + local_150.y = (float)(GHIDRA_INT(((std_string *)local_150.y)->_buf) + 1); lightSprite = local_12c; - } while ((uint)local_150.y < *(ANM2 **)((char *)pvVar11 + 0x1c)); + } while (GHIDRA_UINT(local_150.y) < *(ANM2 **)((char *)pvVar11 + 0x1c)); } } - local_154 = (float)((int)local_154 + 1); - } while ((uint)local_154 < 2); + local_154 = (float)(GHIDRA_INT(local_154) + 1); + } while (GHIDRA_UINT(local_154) < 2); this = (Game *)room; entity = (Entity *)lightEntity; } @@ -12364,8 +12364,8 @@ void Game::Render(Entity *entity, Vector *renderOffset) ((Color *)((Color *)&tmpColor))->Color::SetTint(1.0,0.4,0.0,1.0); ((Color *)((Color *)(this->_roomList[0x9a]._doors + 2)))->Color::operator_assign(&tmpColor); fVar23 = g_vectorOne.x * 0.8; - this->_roomList[0x9a]._doors[0] = (int)(g_vectorOne.y * 0.8); - this->_roomList[0x9a].AllowedDoors = (int)fVar23; + this->_roomList[0x9a]._doors[0] = GHIDRA_INT((g_vectorOne.y * 0.8)); + this->_roomList[0x9a].AllowedDoors = GHIDRA_INT(fVar23); local_110.x = (((Entity_Player *)entity)->_pos).x + 0.0; local_110.y = (((Entity_Player *)entity)->_pos).y - 16.0; pVVar5 = Isaac::GetRenderPosition(&local_13c,&local_110,1); @@ -12415,11 +12415,11 @@ LAB_00809a2f: ((BlendMode *)(local_148))->BlendMode::SetMode(2,0); lightSprite = (ANM2 *)(this->_roomList[0x99]._doors + 6); layer = ((ANM2 *)(lightSprite))->ANM2::GetLayer((byte *)0x0); - layer->_blendMode[0] = local_148._0_4_; - layer->_blendMode[1] = local_148._4_4_; - layer->_blendMode[2] = (int)local_140; - layer->_blendMode[3] = (int)local_13c.x; - layer->_blendMode[4] = (int)local_13c.y; + layer->_blendMode[0] = (*(undefined4 *)((char *)&(local_148) + 0x0)); + layer->_blendMode[1] = (*(undefined4 *)((char *)&(local_148) + 0x4)); + layer->_blendMode[2] = GHIDRA_INT(local_140); + layer->_blendMode[3] = GHIDRA_INT(local_13c.x); + layer->_blendMode[4] = GHIDRA_INT(local_13c.y); ((Color *)(&lightColor))->Color::Reset(); ((Color *)(&lightColor))->Color::SetTint(0.4,0.6,1.0,local_150.y * 0.12 + 0.3); lightColor._offset[0] = 0.0; @@ -12432,11 +12432,11 @@ LAB_00809a2f: ((ANM2 *)(lightSprite))->ANM2::Render(&local_170,&g_vectorZero,&g_vectorZero); ((BlendMode *)(local_148))->BlendMode::SetMode(1,0); layer = ((ANM2 *)(lightSprite))->ANM2::GetLayer((byte *)0x0); - layer->_blendMode[0] = local_148._0_4_; - layer->_blendMode[1] = local_148._4_4_; - layer->_blendMode[2] = (int)local_140; - layer->_blendMode[3] = (int)local_13c.x; - layer->_blendMode[4] = (int)local_13c.y; + layer->_blendMode[0] = (*(undefined4 *)((char *)&(local_148) + 0x0)); + layer->_blendMode[1] = (*(undefined4 *)((char *)&(local_148) + 0x4)); + layer->_blendMode[2] = GHIDRA_INT(local_140); + layer->_blendMode[3] = GHIDRA_INT(local_13c.x); + layer->_blendMode[4] = GHIDRA_INT(local_13c.y); } bVar3 = ((Level *)((Level *)g_game))->Level::IsMausoleumHeartStage(); if (bVar3 != 0) { @@ -12448,20 +12448,20 @@ LAB_00809a2f: } fVar23 = 0.0; costumeItem = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(0x100); - bVar3 = Entity_Player::IsItemCostumeVisible((Entity_Player *)entity,costumeItem,(int)fVar23) + bVar3 = Entity_Player::IsItemCostumeVisible((Entity_Player *)entity,costumeItem,GHIDRA_INT(fVar23)) ; if (bVar3 == 0) { fVar23 = -NAN; costumeItem = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(0x101); bVar3 = Entity_Player::IsItemCostumeVisible - ((Entity_Player *)entity,costumeItem,(int)fVar23); + ((Entity_Player *)entity,costumeItem,GHIDRA_INT(fVar23)); if ((bVar3 != 0) || (bVar3 = ((Entity_Player *)((Entity_Player *)entity))->Entity_Player::IsNullItemCostumeVisible(0x38,0), bVar3 != 0)) goto LAB_008077c8; fVar23 = -NAN; costumeItem = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(3); bVar3 = Entity_Player::IsItemCostumeVisible - ((Entity_Player *)entity,costumeItem,(int)fVar23); + ((Entity_Player *)entity,costumeItem,GHIDRA_INT(fVar23)); if (bVar3 != 0) { LAB_00807700: roomAlias = room; @@ -12486,12 +12486,12 @@ LAB_00807700: fVar23 = -NAN; costumeItem = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(0xc0); bVar3 = Entity_Player::IsItemCostumeVisible - ((Entity_Player *)entity,costumeItem,(int)fVar23); + ((Entity_Player *)entity,costumeItem,GHIDRA_INT(fVar23)); if (bVar3 != 0) goto LAB_00807700; fVar23 = -NAN; costumeItem = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(0x23c); bVar3 = Entity_Player::IsItemCostumeVisible - ((Entity_Player *)entity,costumeItem,(int)fVar23); + ((Entity_Player *)entity,costumeItem,GHIDRA_INT(fVar23)); if (bVar3 != 0) goto LAB_00807700; ((Color *)(&lightColor))->Color::Reset(); ((Color *)(&lightColor))->Color::SetTint(1.0,1.0,1.0,1.0); @@ -12503,7 +12503,7 @@ LAB_00807700: fVar23 = -NAN; costumeItem = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(0x5b); bVar3 = Entity_Player::IsItemCostumeVisible - ((Entity_Player *)entity,costumeItem,(int)fVar23); + ((Entity_Player *)entity,costumeItem,GHIDRA_INT(fVar23)); if (bVar3 != 0) { fVar22 = g_vectorOne.x * 1.75; fVar23 = g_vectorOne.y * 1.75; @@ -12570,11 +12570,11 @@ LAB_008078ab: ((Color *)((Color *)&(*(undefined1 *)((char *)(roomAlias) + 0x6ffc))))->Color::operator_assign(&tmpColor); ((BlendMode *)(local_148))->BlendMode::SetMode(1,0); layer = ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(roomAlias) + 0x6f54))))->ANM2::GetLayer((byte *)0x0); - layer->_blendMode[0] = local_148._0_4_; - layer->_blendMode[1] = local_148._4_4_; - layer->_blendMode[2] = (int)local_140; - layer->_blendMode[3] = (int)local_13c.x; - layer->_blendMode[4] = (int)local_13c.y; + layer->_blendMode[0] = (*(undefined4 *)((char *)&(local_148) + 0x0)); + layer->_blendMode[1] = (*(undefined4 *)((char *)&(local_148) + 0x4)); + layer->_blendMode[2] = GHIDRA_INT(local_140); + layer->_blendMode[3] = GHIDRA_INT(local_13c.x); + layer->_blendMode[4] = GHIDRA_INT(local_13c.y); ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(roomAlias) + 0x6f54))))->ANM2::Render(&local_170,&g_vectorZero,&g_vectorZero); roomAlias = room; } @@ -12585,7 +12585,7 @@ LAB_008078ab: fVar23 = 0.1; if (uVar16 != 0) { do { - iVar20 = *(int *)((int)(roomAlias->_entityList)._updateEL._data + uVar9 * 4); + iVar20 = *(int *)(GHIDRA_INT((roomAlias->_entityList)._updateEL._data) + uVar9 * 4); if ((*(int *)(iVar20 + 0x28) == 0x197) && (*(int *)(iVar20 + 0x2c) == 0)) { fVar23 = 1.0 - *(float *)(iVar20 + 0x380) / *(float *)(iVar20 + 900); break; @@ -12598,8 +12598,8 @@ LAB_008078ab: pVVar13 = &g_vectorZero; pVVar17 = &g_vectorZero; fVar22 = (fVar23 + 3.0) * g_vectorOne.y; - ((Vector *)((int)local_100.y + 0x9c))->x = (fVar23 + 3.0) * g_vectorOne.x; - ((Vector *)((int)local_100.y + 0x9c))->y = fVar22; + ((Vector *)(GHIDRA_INT(local_100.y) + 0x9c))->x = (fVar23 + 3.0) * g_vectorOne.x; + ((Vector *)(GHIDRA_INT(local_100.y) + 0x9c))->y = fVar22; lightSprite = (ANM2 *)local_100.y; goto LAB_00807b32; } @@ -12723,7 +12723,7 @@ LAB_00808404: pVVar5 = ((Vector *)(&g_vectorOne))->Vector::__mul(&local_13c,(float *)&local_12c); ((Sprite *)((Sprite *)lightSprite))->Sprite::SetScale(pVVar5); if (local_130 != (ANM2 *)0x0) { - ((Sprite *)((Sprite *)lightSprite))->Sprite::SetFrame_1((int)local_130); + ((Sprite *)((Sprite *)lightSprite))->Sprite::SetFrame_1(GHIDRA_INT(local_130)); } pVVar5 = ((Entity *)(entity))->Entity::Position(&local_13c); pVVar17 = (Vector *)((Entity *)(entity))->Entity::PositionOffset(); @@ -12751,8 +12751,8 @@ LAB_00808404: ((Color *)((Color *)&tmpColor))->Color::SetTint(1.0,0.8,0.8,1.0); ((Color *)((Color *)(this->_roomList[0x9a]._doors + 2)))->Color::operator_assign(&tmpColor); fVar23 = g_vectorOne.y * 0.4; - this->_roomList[0x9a].AllowedDoors = (int)(g_vectorOne.x * 0.4); - this->_roomList[0x9a]._doors[0] = (int)fVar23; + this->_roomList[0x9a].AllowedDoors = GHIDRA_INT((g_vectorOne.x * 0.4)); + this->_roomList[0x9a]._doors[0] = GHIDRA_INT(fVar23); if (this->_roomList[0x99].SavedGridEntities._begin != (void *)0x0) { AnimationState::SetFrameFloat ((AnimationState *)&this->_roomList[0x99].BossDeathSeed,1.0); @@ -12779,7 +12779,7 @@ LAB_00808404: tmpColor._colorize[1] = (((Entity_Player *)entity)->_sprite)._color._colorize[1]; tmpColor._colorize[2] = (((Entity_Player *)entity)->_sprite)._color._colorize[2]; tmpColor._colorize[3] = (((Entity_Player *)entity)->_sprite)._color._colorize[3]; - tmpColor._offset._0_8_ = *(undefined8 *)(((Entity_Player *)entity)->_sprite)._color._offset; + (*(undefined8 *)((char *)&(tmpColor._offset) + 0x0)) = *(undefined8 *)(((Entity_Player *)entity)->_sprite)._color._offset; ((Color *)((Color *)&tmpColor))->Color::__mul(&layer->_color); ((Color *)(&lightColor2))->Color::operator_assign(&tmpColor); Color::apply_to_kcolor(&layer0Color,(ColorMod *)&lightColor2,&local_1a8); @@ -12799,7 +12799,7 @@ LAB_00808404: tmpColor._colorize[1] = (((Entity_Player *)entity)->_sprite)._color._colorize[1]; tmpColor._colorize[2] = (((Entity_Player *)entity)->_sprite)._color._colorize[2]; tmpColor._colorize[3] = (((Entity_Player *)entity)->_sprite)._color._colorize[3]; - tmpColor._offset._0_8_ = *(undefined8 *)(((Entity_Player *)entity)->_sprite)._color._offset; + (*(undefined8 *)((char *)&(tmpColor._offset) + 0x0)) = *(undefined8 *)(((Entity_Player *)entity)->_sprite)._color._offset; ((Color *)((Color *)&tmpColor))->Color::__mul(&layer->_color); ((Color *)(&lightColor2))->Color::operator_assign(&tmpColor); Color::apply_to_kcolor((KColor *)(local_c8 + 0x18),(ColorMod *)&lightColor2,&local_1a8); @@ -12807,10 +12807,10 @@ LAB_00808404: local_188.y = layer0Color._red; local_100.y = layer0Color._blue; local_1b8.y = (float)local_ac; - local_1b0.y = (float)local_c8._24_4_; + local_1b0.y = (*(undefined4 *)((char *)&((float)local_c8) + 0x18)); local_194.y = (float)local_a8; if (layer0Color._green * 0.7152 + layer0Color._red * 0.2126 + layer0Color._blue * 0.0722 <= - ((float)local_ac * 0.7152 + (float)local_c8._24_4_ * 0.2126 + (float)local_a8 * 0.0722) + ((float)local_ac * 0.7152 + (*(undefined4 *)((char *)&((float)local_c8) + 0x18)) * 0.2126 + (float)local_a8 * 0.0722) - 0.25) { ((Color *)((Color *)&tmpColor))->Color::Reset(); lightSprite = (ANM2 *)local_1b0.y; @@ -12827,8 +12827,8 @@ LAB_00808404: ((Color *)((Color *)(this->_roomList[0x9a]._doors + 2)))->Color::operator_assign(&tmpColor); layer = ((ANM2 *)(&((Entity_Player *)entity)->_sprite))->ANM2::GetLayer((byte *)0x0); fVar23 = (layer->_size).y; - this->_roomList[0x9a].AllowedDoors = (int)((layer->_size).x * 0.4); - this->_roomList[0x9a]._doors[0] = (int)(fVar23 * 0.4); + this->_roomList[0x9a].AllowedDoors = GHIDRA_INT(((layer->_size).x * 0.4)); + this->_roomList[0x9a]._doors[0] = GHIDRA_INT((fVar23 * 0.4)); if (this->_roomList[0x99].SavedGridEntities._begin != (void *)0x0) { ((AnimationState *)((AnimationState *)&this->_roomList[0x99].BossDeathSeed))->AnimationState::SetFrameFloat(1.0); } @@ -12866,10 +12866,10 @@ LAB_00807d20: pvVar11 = ((AnimationState *)(pAVar10))->AnimationState::GetLayerFrame(iVar20); if ((pvVar11 != (void *)0x0) && (*(char *)((char *)pvVar11 + 0x2c) != '\0')) { local_100.y = 0.5; - pVVar5 = Vector::operator_mul(&local_13c,&local_100.y,(Vector *)((int)pvVar11 + 8)); - pVVar5 = ((Vector *)(pVVar5))->Vector::__sub(&local_128,(Vector *)((int)pvVar11 + 0x20)); - pVVar5 = ((Vector *)(pVVar5))->Vector::Mul(&local_110,(Vector *)((int)pvVar11 + 0x18)); - ((Vector *)((Vector *)((int)pvVar11 + 0x10)))->Vector::__add(&local_160,pVVar5); + pVVar5 = Vector::operator_mul(&local_13c,&local_100.y,(Vector *)(GHIDRA_INT(pvVar11) + 8)); + pVVar5 = ((Vector *)(pVVar5))->Vector::__sub(&local_128,(Vector *)(GHIDRA_INT(pvVar11) + 0x20)); + pVVar5 = ((Vector *)(pVVar5))->Vector::Mul(&local_110,(Vector *)(GHIDRA_INT(pvVar11) + 0x18)); + ((Vector *)((Vector *)(GHIDRA_INT(pvVar11) + 0x10)))->Vector::__add(&local_160,pVVar5); sprite = (Sprite *)((Entity *)(entity))->Entity::GetSprite(); fVar21 = (float10)((Sprite *)(sprite))->Sprite::Rotation(); pVVar5 = ((Vector *)(&local_160))->Vector::Rotated(&local_13c,(float)fVar21); @@ -12885,7 +12885,7 @@ LAB_00807d20: sprite = (Sprite *)((Entity *)(entity))->Entity::GetSprite(); cVar2 = ((Sprite *)(sprite))->Sprite::FlipY(); if (cVar2 != '\0') { - local_160.y = (float)((uint)local_160.y ^ 0x80000000); + local_160.y = (float)(GHIDRA_UINT(local_160.y) ^ 0x80000000); } lightSprite = &room->_lightSprite; ((Color *)((Color *)&tmpColor))->Color::Color(1.0,0.8,0.2,1.0); @@ -12997,7 +12997,7 @@ LAB_008087da: local_180.y = (float)laserEndPoint[1]; local_150.y = 0.0; do { - local_130 = (ANM2 *)((float)(int)local_150.y / 19.0); + local_130 = (ANM2 *)((float)GHIDRA_INT(local_150.y) / 19.0); iVar20 = ((Entity *)(entity))->Entity::Variant(); if (iVar20 == 4) { pfVar4 = (float *)((Entity *)(entity))->Entity::SpriteScale(); @@ -13024,8 +13024,8 @@ LAB_008087da: pVVar5 = ((Vector *)(pVVar5))->Vector::__add(&local_1b0,&renderOffsetLocal); ((ANM2 *)(lightSprite))->ANM2::Render(pVVar5,pVVar17,pVVar13); } - local_150.y = (float)((int)((std_string *)local_150.y)->_buf + 1); - } while ((int)local_150.y < 0x14); + local_150.y = (float)(GHIDRA_INT(((std_string *)local_150.y)->_buf) + 1); + } while (GHIDRA_INT(local_150.y) < 0x14); } else { local_108 = ((Entity_Laser *)((Entity_Laser *)entity))->Entity_Laser::GetNonOptimizedSamples(); @@ -13055,7 +13055,7 @@ LAB_008087da: pVVar5 = ((Vector *)(pVVar5))->Vector::__add((Vector *)local_178,&local_120); ((ANM2 *)(lightSprite))->ANM2::Render(pVVar5,pVVar17,pVVar13); } - uVar16 = uVar16 + (int)local_160.y; + uVar16 = uVar16 + GHIDRA_INT(local_160.y); uVar9 = FUN_0042f160(); } while (uVar16 < uVar9); } @@ -13110,8 +13110,8 @@ LAB_008087da: ((Color *)((Color *)&tmpColor))->Color::Reset(); ((Color *)((Color *)&tmpColor))->Color::SetTint(1.0,0.8,0.4,1.0); ((Color *)((Color *)(this->_roomList[0x9a]._doors + 2)))->Color::operator_assign(&tmpColor); - this->_roomList[0x9a].AllowedDoors = (int)g_vectorOne.x; - this->_roomList[0x9a]._doors[0] = (int)g_vectorOne.y; + this->_roomList[0x9a].AllowedDoors = GHIDRA_INT(g_vectorOne.x); + this->_roomList[0x9a]._doors[0] = GHIDRA_INT(g_vectorOne.y); local_110.x = (((Entity_Player *)entity)->_pos).x + 0.0; local_110.y = (((Entity_Player *)entity)->_pos).y - 16.0; pVVar5 = Isaac::GetRenderPosition(&local_13c,&local_110,1); @@ -13232,8 +13232,8 @@ LAB_00809546: ((Color *)((Color *)&tmpColor))->Color::SetTint(1.0,0.8,0.4,1.0); ((Color *)((Color *)(this->_roomList[0x9a]._doors + 2)))->Color::operator_assign(&tmpColor); fVar23 = g_vectorOne.y * 0.8; - this->_roomList[0x9a].AllowedDoors = (int)(g_vectorOne.x * 0.8); - this->_roomList[0x9a]._doors[0] = (int)fVar23; + this->_roomList[0x9a].AllowedDoors = GHIDRA_INT((g_vectorOne.x * 0.8)); + this->_roomList[0x9a]._doors[0] = GHIDRA_INT(fVar23); local_110.x = (((Entity_Player *)entity)->_pos).x + 0.0; local_110.y = (((Entity_Player *)entity)->_pos).y - 16.0; pVVar5 = Isaac::GetRenderPosition(&local_13c,&local_110,1); @@ -13260,8 +13260,8 @@ LAB_00809546: ((Color *)((Color *)(this->_roomList[0x9a]._doors + 2)))->Color::operator_assign(&tmpColor); local_188.y = (float)(this->_roomList[0x99]._doors + 6); fVar23 = g_vectorOne.y * 0.6; - this->_roomList[0x9a].AllowedDoors = (int)(g_vectorOne.x * 0.6); - this->_roomList[0x9a]._doors[0] = (int)fVar23; + this->_roomList[0x9a].AllowedDoors = GHIDRA_INT((g_vectorOne.x * 0.6)); + this->_roomList[0x9a]._doors[0] = GHIDRA_INT(fVar23); if (this->_roomList[0x99].SavedGridEntities._begin != (void *)0x0) { ((AnimationState *)((AnimationState *)&this->_roomList[0x99].BossDeathSeed))->AnimationState::SetFrameFloat(1.0); } @@ -13377,23 +13377,23 @@ LAB_0080b3a9: local_12c = (ANM2 *)((GridEntity *)(local_EAX_18866))->GridEntity::GetType(); if (local_12c != (ANM2 *)0x0) { uVar16 = 0; - if (*(int *)((int)(local_12c->_animDefaultName)._buf + 4) != 0) { + if (*(int *)(GHIDRA_INT((local_12c->_animDefaultName)._buf) + 4) != 0) { local_150.y = 0.0; do { - local_130 = *(ANM2 **)((int)((std_string *)local_150.y)->_buf + + local_130 = *(ANM2 **)(GHIDRA_INT(((std_string *)local_150.y)->_buf) + *(int *)(local_12c->_animDefaultName)._buf); sprite = (Sprite *)((Entity *)(entity))->Entity::GetSprite(); ((Sprite *)(sprite))->Sprite::GetLayer((byte *)local_130); layerName = (std_string *)_get_name_string(); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; isFlameLayer = str_eq_cstr(layerName,(byte *)"flame"); - local_14 = (float)((uint)local_14._1_3_ << 8); + local_14 = (float)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8); ((std::string *)(local_c8 + 0x14))->std::string::_Tidy_deallocate(); if (isFlameLayer != 0) { - if (-1 < (int)uVar16) { + if (-1 < GHIDRA_INT(uVar16)) { ((Entity *)(entity))->Entity::GetSprite(); pAVar10 = (AnimationState *)Config::GetPillEffects(); - local_160.y = (float)((AnimationState *)(pAVar10))->AnimationState::GetLayerFrame((int)local_130); + local_160.y = (float)((AnimationState *)(pAVar10))->AnimationState::GetLayerFrame(GHIDRA_INT(local_130)); if (((void *)local_160.y != (void *)0x0) && (*(char *)((char *)local_160.y + 0x2c) != '\0')) { pVVar5 = ((Vector *)(&local_13c))->Vector::Vector(33.0,37.0); @@ -13432,7 +13432,7 @@ LAB_0080b3a9: pVVar5 = ((Vector *)(&flameQuad))->Vector::__add(&local_180,pVVar5); pVVar17 = ((Vector *)(flameDelta2))->Vector::__sub(&local_170,&flameQuad); pVVar17 = ((Vector *)(pVVar17))->Vector::__mul(&local_100, - (float *)((int)((std_string *)local_150.y)->_buf + 4)); + (float *)(GHIDRA_INT(((std_string *)local_150.y)->_buf) + 4)); ((Vector *)(pVVar5))->Vector::__add(&local_194,pVVar17); pRVar18 = room; ((Color *)((Color *)&tmpColor))->Color::Color(0.8,0.2,1.0,1.0); @@ -13458,7 +13458,7 @@ LAB_0080b3a9: } uVar16 = uVar16 + 1; local_150.y = (float)&((std_string *)local_150.y)->_size; - } while (uVar16 < (uint)*(int *)((int)(local_12c->_animDefaultName)._buf + 4)); + } while (uVar16 < GHIDRA_UINT(*(int *)(GHIDRA_INT((local_12c->_animDefaultName)._buf) + 4))); } } break; @@ -13469,8 +13469,8 @@ LAB_0080b3a9: ((Color *)((Color *)(this->_roomList[0x9a]._doors + 2)))->Color::operator_assign(&tmpColor); local_188.y = (float)(this->_roomList[0x99]._doors + 6); fVar23 = g_vectorOne.y * 0.6; - this->_roomList[0x9a].AllowedDoors = (int)(g_vectorOne.x * 0.6); - this->_roomList[0x9a]._doors[0] = (int)fVar23; + this->_roomList[0x9a].AllowedDoors = GHIDRA_INT((g_vectorOne.x * 0.6)); + this->_roomList[0x9a]._doors[0] = GHIDRA_INT(fVar23); if (this->_roomList[0x99].SavedGridEntities._begin != (void *)0x0) { ((AnimationState *)((AnimationState *)&this->_roomList[0x99].BossDeathSeed))->AnimationState::SetFrameFloat(1.0); } @@ -13512,8 +13512,8 @@ LAB_0080b3a9: } fVar23 = (((Entity_Player *)entity)->_sprite)._scale.y; this->_roomList[0x9a].AllowedDoors = - (int)((((Entity_Player *)entity)->_sprite)._scale.x * 1.5); - this->_roomList[0x9a]._doors[0] = (int)(fVar23 * 1.5); + GHIDRA_INT(((((Entity_Player *)entity)->_sprite)._scale.x * 1.5)); + this->_roomList[0x9a]._doors[0] = GHIDRA_INT((fVar23 * 1.5)); local_110.y = (((Entity_Player *)entity)->_pos).y; local_110.x = (((Entity_Player *)entity)->_pos).x; pVVar5 = Isaac::GetRenderPosition(&local_13c,&local_110,1); @@ -13589,8 +13589,8 @@ LAB_0080b3a9: ((Color *)((Color *)(this->_roomList[0x9a]._doors + 2)))->Color::operator_assign(&tmpColor); fVar23 = (((Entity_Player *)entity)->_sprite)._scale.y; this->_roomList[0x9a].AllowedDoors = - (int)((((Entity_Player *)entity)->_sprite)._scale.x * 0.5); - this->_roomList[0x9a]._doors[0] = (int)(fVar23 * 0.5); + GHIDRA_INT(((((Entity_Player *)entity)->_sprite)._scale.x * 0.5)); + this->_roomList[0x9a]._doors[0] = GHIDRA_INT((fVar23 * 0.5)); if (this->_roomList[0x99].SavedGridEntities._begin != (void *)0x0) { ((AnimationState *)((AnimationState *)&this->_roomList[0x99].BossDeathSeed))->AnimationState::SetFrameFloat(1.0); } @@ -13623,7 +13623,7 @@ LAB_0080b3a9: pAVar10 = (AnimationState *)Config::GetPillEffects(); pvVar11 = ((AnimationState *)(pAVar10))->AnimationState::GetLayerFrame(0); if (pvVar11 == (void *)0x0) break; - pCVar8 = (Color *)((int)pvVar11 + 0x30); + pCVar8 = (Color *)(GHIDRA_INT(pvVar11) + 0x30); local_100.y = ((Color *)(pCVar8))->Color::A(); local_160.y = ((Color *)(pCVar8))->Color::B(); fVar21 = (float10)Color::G(); @@ -13802,7 +13802,7 @@ LAB_0080a3bc: ((Entity *)(entity))->Entity::GetSprite(); pAVar10 = (AnimationState *)Config::GetPillEffects(); pvVar11 = ((AnimationState *)(pAVar10))->AnimationState::GetLayerFrame(0); - fVar23 = ((Color *)((Color *)((int)pvVar11 + 0x30)))->Color::A(); + fVar23 = ((Color *)((Color *)(GHIDRA_INT(pvVar11) + 0x30)))->Color::A(); local_100.y = fVar23 * 6.4; ((Color *)((Color *)&tmpColor))->Color::Color(0.4,0.7,1.0,local_100.y); ((Sprite *)((Sprite *)(this->_roomList[0x99]._doors + 6)))->Sprite::SetColor(color_02); @@ -14017,16 +14017,16 @@ LAB_00807b32: local_100.y = (float)((AnimationState *)(pAVar10))->AnimationState::GetAnimationLength(); lightSprite = (ANM2 *)((Entity *)(entity))->Entity::GetSprite(); iVar20 = ((ANM2 *)(lightSprite))->ANM2::GetFrame(); - if ((int)local_100.y - iVar20 < 7) { + if (GHIDRA_INT(local_100.y) - iVar20 < 7) { sprite = (Sprite *)(this->_roomList[0x99]._doors + 6); - local_100.y = (float)((int)local_100.y - iVar20) / 6.0; + local_100.y = (float)(GHIDRA_INT(local_100.y) - iVar20) / 6.0; ((Entity *)((Entity *)lightEntity))->Entity::GetColor(); ((Color *)(1.0 - local_100.y * local_100.y))->Color::Color(0x32,0x32,0x32); color = (ColorMod *)FUN_004072e0(); ((Sprite *)(sprite))->Sprite::SetColor(color); pEVar1 = lightEntity; pfVar4 = (float *)((Entity *)((Entity *)lightEntity))->Entity::SpriteScale(); - ((Sprite *)(sprite))->Sprite::SetFrame_1((uint)(1.5 < *pfVar4)); + ((Sprite *)(sprite))->Sprite::SetFrame_1(GHIDRA_UINT((1.5 < *pfVar4))); pVVar5 = (Vector *)((Entity *)((Entity *)pEVar1))->Entity::SpriteScale(); local_100.y = 1.5; pVVar5 = ((Vector *)(pVVar5))->Vector::__mul(&local_13c,&local_100.y); @@ -14071,7 +14071,7 @@ LAB_00807b3d: // 0081df10 void Game::SetShockwaveParams(int shockwaveId, void *params) { - if (1 < (uint)shockwaveId) { + if (1 < GHIDRA_UINT(shockwaveId)) { KAGE_LogMessage(0x10,(byte *)"Shockwave id is too large!"); } this->_roomList[0x9c]._doors[shockwaveId * 7 + 0x1d] = *(int *)params; @@ -14114,7 +14114,7 @@ byte Game::LoadMinibossesXml(byte *path) local_8 = 0xffffffff; puStack_c = &LAB_00b01d7b; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (uint)(xmlMemoryPool + 0x10028); + uVar3 = __security_cookie ^ GHIDRA_UINT((xmlMemoryPool + 0x10028)); ExceptionList = &local_10; file = ((FileSystem *)(&PTR_vftable_00c37a10))->FileSystem::Open(path,(int *)0x0); if (file == (int *)0x0) { @@ -14153,7 +14153,7 @@ byte Game::LoadMinibossesXml(byte *path) bVar9 = bVar2 < *pbVar7; if (bVar2 != *pbVar7) { LAB_0082c456: - uVar3 = -(uint)bVar9 | 1; + uVar3 = -GHIDRA_UINT(bVar9) | 1; goto LAB_0082c45b; } if (bVar2 == 0) break; @@ -14183,7 +14183,7 @@ LAB_0082c45b: bVar9 = bVar2 < *pbVar7; if (bVar2 != *pbVar7) { LAB_0082c4b0: - uVar3 = -(uint)bVar9 | 1; + uVar3 = -GHIDRA_UINT(bVar9) | 1; goto LAB_0082c4b5; } if (bVar2 == 0) break; @@ -14205,7 +14205,7 @@ LAB_0082c4b5: bVar2 = *pbVar5; pbVar5 = pbVar5 + 1; } while (bVar2 != 0); - ((std::string *)((char *)minibossName))->std::string::assign(pbVar8,(int)pbVar5 - (int)(pbVar8 + 1)); + ((std::string *)((char *)minibossName))->std::string::assign(pbVar8,GHIDRA_INT(pbVar5) - GHIDRA_INT((pbVar8 + 1))); } } if (attribute[4] == 0) break; @@ -14228,7 +14228,7 @@ LAB_0082c4b5: if (0xfff < uVar3) { pppppbVar6 = (byte *****)minibossName[0][-1]; uVar3 = minibossNameCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)minibossName[0] + (-4 - (int)pppppbVar6))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(minibossName[0]) + (-4 - GHIDRA_INT(pppppbVar6)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -14240,14 +14240,14 @@ LAB_0082c4b5: allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (text != (byte *)0x0) { uVar3 = *(uint *)(text + -4); qVar1 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar3; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar3; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar1 < uVar3); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar3)); free(text + -4); } local_8 = 3; @@ -14297,7 +14297,7 @@ void Game::LoadBossRushXml(byte *param_1) local_8 = 0xffffffff; puStack_c = &LAB_00b0225b; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(xmlPool + 0x1002c); + uVar1 = __security_cookie ^ GHIDRA_UINT((xmlPool + 0x1002c)); ExceptionList = &local_10; file = ((FileSystem *)(&PTR_vftable_00c37a10))->FileSystem::Open(param_1,(int *)0x0); if (file != (int *)0x0) { @@ -14339,7 +14339,7 @@ void Game::LoadBossRushXml(byte *param_1) isLess = bVar10 < (byte)*pcVar5; if (bVar10 != *pcVar5) { LAB_008347b6: - uVar1 = -(uint)isLess | 1; + uVar1 = -GHIDRA_UINT(isLess) | 1; goto LAB_008347bb; } if (bVar10 == 0) break; @@ -14371,7 +14371,7 @@ LAB_008347bb: isLess = bVar10 < (byte)*pcVar5; if (bVar10 != *pcVar5) { LAB_00834807: - uVar1 = -(uint)isLess | 1; + uVar1 = -GHIDRA_UINT(isLess) | 1; goto LAB_0083480c; } if (bVar10 == 0) break; @@ -14402,7 +14402,7 @@ LAB_00834860: waveSpawnsBegin = (void *)0x0; waveSpawnsEnd = (undefined8 *)0x0; waveSpawnsCapacity = (undefined8 *)0x0; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); pcVar5 = "enemy"; do { pcVar9 = pcVar5; @@ -14420,9 +14420,9 @@ LAB_00834860: pcVar5 = (char *)enemyNode[2]; } if (pcVar5 == pcVar9 + -0xb681ff) { - pbVar4 = pbVar6 + (int)pcVar5; + pbVar4 = pbVar6 + GHIDRA_INT(pcVar5); if (pbVar4 <= pbVar6) goto LAB_008348e0; - iVar2 = (int)&DAT_00b68200 - (int)pbVar6; + iVar2 = GHIDRA_INT(&DAT_00b68200) - GHIDRA_INT(pbVar6); while (*pbVar6 == pbVar6[iVar2]) { pbVar6 = pbVar6 + 1; if (pbVar4 <= pbVar6) goto LAB_008348e0; @@ -14441,14 +14441,14 @@ LAB_00834bf5: allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (fileBuffer != (byte *)0x0) { uVar1 = *(uint *)(fileBuffer + -4); oldAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar1; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar1; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)oldAllocatedBytes < uVar1); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocatedBytes) < uVar1)); free(fileBuffer + -4); } } @@ -14475,7 +14475,7 @@ LAB_008349b0: else { *waveSpawnsEnd = CONCAT44(enemyVariant,enemyType); *(int *)(waveSpawnsEnd + 1) = iVar2; - waveSpawnsEnd = (undefined8 *)((int)waveSpawnsEnd + 0xc); + waveSpawnsEnd = (undefined8 *)(GHIDRA_INT(waveSpawnsEnd) + 0xc); } iVar8 = iVar8 + -1; } while (iVar8 != 0); @@ -14493,7 +14493,7 @@ LAB_008349b0: isLess = bVar10 < *pbVar3; if (bVar10 != *pbVar3) { LAB_0083495f: - uVar1 = -(uint)isLess | 1; + uVar1 = -GHIDRA_UINT(isLess) | 1; goto LAB_00834964; } if (bVar10 == 0) break; @@ -14523,7 +14523,7 @@ LAB_00834964: isLess = bVar10 < (byte)*pcVar5; if (bVar10 != *pcVar5) { LAB_00834a10: - uVar1 = -(uint)isLess | 1; + uVar1 = -GHIDRA_UINT(isLess) | 1; goto LAB_00834a15; } if (bVar10 == 0) break; @@ -14553,7 +14553,7 @@ LAB_00834a15: isLess = bVar10 < (byte)*pcVar5; if (bVar10 != *pcVar5) { LAB_00834a70: - uVar1 = -(uint)isLess | 1; + uVar1 = -GHIDRA_UINT(isLess) | 1; goto LAB_00834a75; } if (bVar10 == 0) break; @@ -14583,7 +14583,7 @@ LAB_00834a75: isLess = bVar10 < (byte)*pcVar5; if (bVar10 != *pcVar5) { LAB_00834ad0: - uVar1 = -(uint)isLess | 1; + uVar1 = -GHIDRA_UINT(isLess) | 1; goto LAB_00834ad5; } if (bVar10 == 0) break; @@ -14620,12 +14620,12 @@ LAB_00834b46: } local_8 = local_8 & 0xffffff00; if (waveSpawnsBegin != (void *)0x0) { - uVar1 = (((int)waveSpawnsCapacity - (int)waveSpawnsBegin) / 0xc) * 0xc; + uVar1 = ((GHIDRA_INT(waveSpawnsCapacity) - GHIDRA_INT(waveSpawnsBegin)) / 0xc) * 0xc; ptr = waveSpawnsBegin; if (0xfff < uVar1) { ptr = *(void **)((char *)waveSpawnsBegin + -4); uVar1 = uVar1 + 0x23; - if (0x1f < (uint)((int)waveSpawnsBegin + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(waveSpawnsBegin) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -14752,7 +14752,7 @@ void Game::render_mod_shaders() int *nextNode; float paramNameSize; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b079a5; local_1c = ExceptionList; @@ -14849,10 +14849,10 @@ void Game::render_mod_shaders() KStack_6c._alpha = 0.0; KStack_6c._unk = 0; local_90 = (double)CONCAT44(paramNameSize,(undefined4)local_90); - if (0xf < (uint)paramIter[9]) { + if (0xf < GHIDRA_UINT(paramIter[9])) { paramNameChars = (float *)*paramNameChars; } - if ((uint)paramNameSize < 0x10) { + if (GHIDRA_UINT(paramNameSize) < 0x10) { ppppuVar9 = (undefined4 ****)*paramNameChars; KStack_6c._red = paramNameChars[1]; KStack_6c._green = paramNameChars[2]; @@ -14863,29 +14863,29 @@ void Game::render_mod_shaders() local_70 = ppppuVar9; } else { - uVar7 = (uint)paramNameSize | 0xf; + uVar7 = GHIDRA_UINT(paramNameSize) | 0xf; if (0x7fffffff < uVar7) { uVar7 = 0x7fffffff; } local_38 = (double)CONCAT44(uVar7,(undefined4)local_38); local_70 = std::_Allocate(uVar7 + 1); - memcpy(local_70,paramNameChars,(int)local_90._4_4_ + 1); - KStack_6c._unk = (int)local_38._4_4_; - KStack_6c._alpha = local_90._4_4_; + memcpy(local_70,paramNameChars,(*(undefined4 *)((char *)&(GHIDRA_INT(local_90)) + 0x4)) + 1); + KStack_6c._unk = (*(undefined4 *)((char *)&(GHIDRA_INT(local_38)) + 0x4)); + KStack_6c._alpha = (*(undefined4 *)((char *)&(local_90) + 0x4)); ppppuVar5 = &local_70; - if (0xf < local_38._4_4_) { + if (0xf < (*(undefined4 *)((char *)&(local_38) + 0x4))) { ppppuVar5 = local_70; } } lua_pushlstring(luaState,ppppuVar5,KStack_6c._alpha); paramNameRef = luaL_ref(luaState,0xfff0b9d8); - if (0xf < (uint)KStack_6c._unk) { + if (0xf < GHIDRA_UINT(KStack_6c._unk)) { uVar7 = KStack_6c._unk + 1; ppppuVar5 = local_70; if (0xfff < uVar7) { ppppuVar5 = (undefined4 ****)local_70[-1]; uVar7 = KStack_6c._unk + 0x24; - if (0x1f < (uint)((int)local_70 + (-4 - (int)ppppuVar5))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_70) + (-4 - GHIDRA_INT(ppppuVar5))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -14894,7 +14894,7 @@ void Game::render_mod_shaders() } KStack_6c._alpha = 0.0; KStack_6c._unk = 0xf; - local_70 = (undefined4 ****)((uint)local_70 & 0xffffff00); + local_70 = (undefined4 ****)(GHIDRA_UINT(local_70) & 0xffffff00); paramValueLuaState = luaState; FUN_0085c270(luaState); paramValueRef = luaL_ref(luaState,0xfff0b9d8); @@ -14905,15 +14905,15 @@ void Game::render_mod_shaders() uVar3 = lua_type(luaState,0xffffffff); local_38 = (double)CONCAT44(uVar3,(undefined4)local_38); lua_settop(luaState,0xfffffffe); - if (local_38._4_4_ != (undefined4 ****)0x3) goto LAB_008f79b0; + if ((*(undefined4 *)((char *)&(local_38) + 0x4)) != (undefined4 ****)0x3) goto LAB_008f79b0; ((LuaRef *)(¶mValueLuaState))->LuaRef::push(luaState); uVar3 = lua_gettop(luaState); luaNumber = (float10)luaL_checknumber(luaState,uVar3); local_38 = (double)CONCAT44((float)luaNumber,(undefined4)local_38); lua_settop(luaState,0xfffffffe); *(undefined4 *****)(vertexData + (paramOffset + vertexOffset) * 4) = - local_38._4_4_; - ppppuVar9 = local_38._4_4_; + (*(undefined4 *)((char *)&(local_38) + 0x4)); + ppppuVar9 = (*(undefined4 *)((char *)&(local_38) + 0x4)); } } else { @@ -14923,14 +14923,14 @@ LAB_008f79b0: uVar3 = lua_type(luaState,0xffffffff); local_38 = (double)CONCAT44(uVar3,(undefined4)local_38); lua_settop(luaState,0xfffffffe); - if (local_38._4_4_ == (undefined4 ****)0x5) { + if ((*(undefined4 *)((char *)&(local_38) + 0x4)) == (undefined4 ****)0x5) { ((LuaRef *)(¶mValueLuaState))->LuaRef::push(luaState); lua_len(luaState,0xffffffff); luaNumber = (float10)luaL_checknumber(luaState,0xffffffff); local_38 = (double)luaNumber; lua_settop(luaState,0xfffffffe); lua_settop(luaState,0xfffffffe); - if ((int)local_38 == piVar6[10]) { + if (GHIDRA_INT(local_38) == piVar6[10]) { local_38 = (double)CONCAT44(1,(undefined4)local_38); ((LuaRef *)(¶mValueLuaState))->LuaRef::push(luaState); lua_len(luaState,0xffffffff); @@ -14939,10 +14939,10 @@ LAB_008f79b0: lua_settop(luaState,0xfffffffe); lua_settop(luaState,0xfffffffe); pvVar4 = luaState; - if (0 < (int)local_90) { + if (0 < GHIDRA_INT(local_90)) { local_ac = luaState; local_a8 = paramValueRef; - iVar8 = (int)local_38._4_4_; + iVar8 = (*(undefined4 *)((char *)&(GHIDRA_INT(local_38)) + 0x4)); do { FUN_0085bfd0(); elementRef = luaL_ref(pvVar4,0xfff0b9d8); @@ -14958,7 +14958,7 @@ LAB_008f79b0: local_38 = (double)luaNumber; lua_settop(pvVar4,0xfffffffe); lua_settop(pvVar4,0xfffffffe); - } while (iVar8 <= (int)local_38); + } while (iVar8 <= GHIDRA_INT(local_38)); piVar6 = paramIter; iVar8 = modCursor; } @@ -14994,7 +14994,7 @@ LAB_008f79b0: piVar6 = shaderEntry; iVar2 = vertexStride; } - vertexCursor = (float *)((int)vertexCursor + vertexStrideBytes); + vertexCursor = (float *)(GHIDRA_INT(vertexCursor) + vertexStrideBytes); vertexIndex = vertexIndex + 1; vertexOffset = vertexOffset + iVar2; } while (vertexIndex < 4); @@ -15048,14 +15048,14 @@ void Game::end_save_progress() this = &g_manager->_netplayManager; if (g_manager->_netplayManager == *(NetplayManager *)(g_manager + 1)) goto LAB_0095a502; if (g_game->_challenge == 0) { - uStack_c = CONCAT35(uStack_c._5_3_,0x100000000); + uStack_c = CONCAT35((*(undefined1 *)((char *)&(uStack_c) + 0x5)),0x100000000); if ((g_game->_dailyChallenge)._id != 0) goto LAB_0095a4db; } else { LAB_0095a4db: - uStack_c._4_4_ = uStack_c._4_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(uStack_c) + 0x4)) = (*(undefined4 *)((char *)&(uStack_c) + 0x4)) & 0xffffff00; } - FUN_0090cd10(1,uStack_c._4_4_); + FUN_0090cd10(1,(*(undefined4 *)((char *)&(uStack_c) + 0x4))); *(undefined4 *)&(*(undefined1 *)((char *)&(manager[1]._gamestate) + 0x918)) = 0x25; this->NetplayManager::update_lobby_stage_info(); LAB_0095a502: @@ -15083,13 +15083,13 @@ LAB_0095a502: KAGE_LogMessage(1,(byte *)"Setting PersistentGameData ReadOnly to %s\n"); pMVar2 = g_manager; (manager->_persistentGameData)._isReadOnly = bVar3; - if (2 < (uint)(pMVar2->_persistentGameData)._eventCounters[0x16]) { + if (2 < GHIDRA_UINT((pMVar2->_persistentGameData)._eventCounters[0x16])) { ((PersistentGameData *)(&pMVar2->_persistentGameData))->PersistentGameData::TryUnlock(0x142); } player = GetPlayer(g_game,0); if (player->_playerType < 0x29) { - uStack_c._4_4_ = (g_manager->_persistentGameData)._eventCounters[0x1f0]; - uStack_c._0_4_ = (g_manager->_persistentGameData)._eventCounters[0xbc]; + (*(undefined4 *)((char *)&(uStack_c) + 0x4)) = (g_manager->_persistentGameData)._eventCounters[0x1f0]; + (*(undefined4 *)((char *)&(uStack_c) + 0x0)) = (g_manager->_persistentGameData)._eventCounters[0xbc]; player = GetPlayer(g_game,0); uVar1 = player->_playerType; uVar4 = 1 << (uVar1 & 0x1f); @@ -15101,12 +15101,12 @@ LAB_0095a502: if (0x3f < uVar1) { uVar5 = uVar4; } - if ((uVar4 & (uint)uStack_c) != 0 || (uVar5 & uStack_c._4_4_) != 0) { - uStack_c._4_4_ = 0; - uStack_c._0_4_ = 0; + if ((uVar4 & GHIDRA_UINT(uStack_c)) != 0 || (uVar5 & (*(undefined4 *)((char *)&(uStack_c) + 0x4))) != 0) { + (*(undefined4 *)((char *)&(uStack_c) + 0x4)) = 0; + (*(undefined4 *)((char *)&(uStack_c) + 0x0)) = 0; } PersistentGameData::set_run_mask - (&g_manager->_persistentGameData,uVar4 | (uint)uStack_c,uVar5 | uStack_c._4_4_); + (&g_manager->_persistentGameData,uVar4 | GHIDRA_UINT(uStack_c),uVar5 | (*(undefined4 *)((char *)&(uStack_c) + 0x4))); } } return; @@ -15146,7 +15146,7 @@ void Game::ShowFortuneText(RNG *rng, byte *category) local_8 = (undefined4 ***)0xffffffff; puStack_c = &LAB_00b0ccc5; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(curLine + 0xb); + local_18 = __security_cookie ^ GHIDRA_UINT((curLine + 0xb)); ExceptionList = &local_10; local_40 = category; local_44 = rng; @@ -15162,7 +15162,7 @@ void Game::ShowFortuneText(RNG *rng, byte *category) tracked_alloc(1,pbVar4,0); local_8 = (undefined4 ***)0xffffffff; } - uVar5 = ((RNG *)(local_44))->RNG::RandomInt((uint)stringCount); + uVar5 = ((RNG *)(local_44))->RNG::RandomInt(GHIDRA_UINT(stringCount)); pbVar4 = StringTable::get_string_by_index (&g_manager->_stringTable,local_40,*(int *)&g_manager->_stringTable,uVar5); lines = (undefined4 *)0x0; @@ -15185,10 +15185,10 @@ void Game::ShowFortuneText(RNG *rng, byte *category) puVar3 = lines; if (ch == 0x7c) { if (lineCount == 0x7ffffff) goto LAB_00980a4b; - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; newNode = operator_new(0x20); ((std::string *)((char *)(newNode + 2)))->std::string::string(curLine); - local_8 = (undefined4 ***)CONCAT31(local_8._1_3_,2); + local_8 = (undefined4 ***)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); lineCount = lineCount + 1; puVar2 = (undefined4 *)puVar3[1]; *newNode = puVar3; @@ -15208,7 +15208,7 @@ void Game::ShowFortuneText(RNG *rng, byte *category) if (0xf < uVar9) { ppppuVar6 = curLine[0]; } - pbVar4 = (byte *)((int)ppppuVar6 + curLineSize); + pbVar4 = (byte *)(GHIDRA_INT(ppppuVar6) + curLineSize); curLineSize = curLineSize + 1; *pbVar4 = ch; *(undefined1 *)((char *)ppppuVar6 + uVar7 + 1) = 0; @@ -15236,8 +15236,8 @@ void Game::ShowFortuneText(RNG *rng, byte *category) } local_48 = std::_Allocate(uVar5 + 1); curLineSize = uVar7 + 1; - local_40 = (byte *)((int)local_48 + uVar7); - local_44 = (RNG *)(uVar7 + 1 + (int)local_48); + local_40 = (byte *)(GHIDRA_INT(local_48) + uVar7); + local_44 = (RNG *)(uVar7 + 1 + GHIDRA_INT(local_48)); curLineCapacity = uVar5; if (uVar9 < 0x10) { memcpy(local_48,curLine,uVar7); @@ -15253,7 +15253,7 @@ void Game::ShowFortuneText(RNG *rng, byte *category) if (0xfff < uVar7) { ppppuVar8 = (undefined4 ****)ppppuVar6[-1]; uVar7 = uVar9 + 0x24; - if ((undefined1 *)0x1f < (undefined1 *)((int)ppppuVar6 + (-4 - (int)ppppuVar8))) + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(ppppuVar6) + (-4 - GHIDRA_INT(ppppuVar8)))) goto LAB_00980ad1; } operator_delete(ppppuVar8,uVar7); @@ -15272,10 +15272,10 @@ LAB_00980a4b: /* WARNING: Subroutine does not return */ std::_Xlength_error("list too long"); } - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; newNode = operator_new(0x20); ((std::string *)((char *)(newNode + 2)))->std::string::string(curLine); - local_8 = (undefined4 ***)CONCAT31(local_8._1_3_,2); + local_8 = (undefined4 ***)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); lineCount = lineCount + 1; puVar2 = (undefined4 *)puVar3[1]; *newNode = puVar3; @@ -15293,7 +15293,7 @@ LAB_00980a4b: if (0xfff < uVar9) { ppppuVar8 = (undefined4 ****)ppppuVar6[-1]; uVar9 = uVar5 + 0x24; - if ((undefined1 *)0x1f < (undefined1 *)((int)ppppuVar6 + (-4 - (int)ppppuVar8))) { + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(ppppuVar6) + (-4 - GHIDRA_INT(ppppuVar8)))) { LAB_00980ad1: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -15376,29 +15376,29 @@ void Game::update_map_input() local_8 = 0xffffffff; puStack_c = &LAB_00b0d4ad; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar3 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; local_20 = in_ECX; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 == 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); } isMapHeld = false; playerManager = &g_game->_playerManager; local_18 = 0.0; piVar6 = in_ECX; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> 2 + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { playersEnd = (playerManager->_playerList)._end; playerSlot = (playerManager->_playerList)._begin; - if ((int)playersEnd - (int)playerSlot >> 2 == 0) { + if (GHIDRA_INT(playersEnd) - GHIDRA_INT(playerSlot) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playersEnd = (playerManager->_playerList)._end; playerSlot = (playerManager->_playerList)._begin; } - if ((uint)local_18 < (uint)((int)playersEnd - (int)playerSlot >> 2)) { - playerSlot = playerSlot + (int)local_18; + if (GHIDRA_UINT(local_18) < GHIDRA_UINT((GHIDRA_INT(playersEnd) - GHIDRA_INT(playerSlot) >> 2))) { + playerSlot = playerSlot + GHIDRA_INT(local_18); } pEVar5 = (Entity *)*playerSlot; local_14 = pEVar5; @@ -15409,7 +15409,7 @@ LAB_0098dcbe: else { peer = g_manager->_netplayManager; if (peer != *(NetplayManager *)(g_manager + 1)) { - peerCount = (int)*(NetplayManager *)(g_manager + 1) - (int)peer >> 2; + peerCount = GHIDRA_INT(*(NetplayManager *)(g_manager + 1)) - GHIDRA_INT(peer) >> 2; peerIndex = 0; if (peerCount != 0) { do { @@ -15423,12 +15423,12 @@ LAB_0098dcbe: break; } peerIndex = peerIndex + 1; - peer = (NetplayManager)((int)peer + 4); + peer = (NetplayManager)(GHIDRA_INT(peer) + 4); } while (peerIndex < peerCount); } } pEVar5 = local_14; - bVar1 = input_is_action_pressed(0xd,(int)local_14[5]._color._colorize[0],local_14,(int)peer) + bVar1 = input_is_action_pressed(0xd,GHIDRA_INT(local_14[5]._color._colorize[0]),local_14,GHIDRA_INT(peer)) ; if (bVar1 != 0) goto LAB_0098dcbe; LAB_0098dd0a: @@ -15439,7 +15439,7 @@ LAB_0098dd0a: if (peer != *(NetplayManager *)(g_manager + 1)) { local_1c = pEVar5[5]._color._colorize[0]; peerIndex = 0; - peerCount = (int)*(NetplayManager *)(g_manager + 1) - (int)peer >> 2; + peerCount = GHIDRA_INT(*(NetplayManager *)(g_manager + 1)) - GHIDRA_INT(peer) >> 2; if (peerCount != 0) { do { piVar6 = in_ECX; @@ -15449,14 +15449,14 @@ LAB_0098dd0a: break; } peerIndex = peerIndex + 1; - peer = (NetplayManager)((int)peer + 4); + peer = (NetplayManager)(GHIDRA_INT(peer) + 4); } while (peerIndex < peerCount); } } pEVar5 = local_14; in_ECX = piVar6; if (g_manager->_netplayManager != *(NetplayManager *)(g_manager + 1)) { - ((InputManager *)(&PTR_vftable_00c57b18))->InputManager::get_device(&device,(int)local_14[5]._color._colorize[0]) + ((InputManager *)(&PTR_vftable_00c57b18))->InputManager::get_device(&device,GHIDRA_INT(local_14[5]._color._colorize[0])) ; local_8 = 0; if (((device != 0) && @@ -15479,11 +15479,11 @@ LAB_0098ddb1: else { iVar4 = *(int *)(*(int *)((char *)local_1c + 0x378) + 0xc); } - bVar1 = input_is_action_pressed(0xd,iVar4,pEVar5,(int)netplay); + bVar1 = input_is_action_pressed(0xd,iVar4,pEVar5,GHIDRA_INT(netplay)); if (bVar1 != 0) goto LAB_0098ddda; } else { - bVar1 = ((NetplayManager *)(netplay))->NetplayManager::IsIdxLocalPlayer((uint)pEVar5[5]._color._colorize[0]); + bVar1 = ((NetplayManager *)(netplay))->NetplayManager::IsIdxLocalPlayer(GHIDRA_UINT(pEVar5[5]._color._colorize[0])); netplay = extraout_ECX_00; if (bVar1 != 0) goto LAB_0098ddb1; } @@ -15501,11 +15501,11 @@ LAB_0098ddb1: LAB_0098de0e: game = g_game; playerManager = &g_game->_playerManager; - local_18 = (float)((int)local_18 + 1); + local_18 = (float)(GHIDRA_INT(local_18) + 1); piVar6 = in_ECX; - } while ((uint)local_18 < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (GHIDRA_UINT(local_18) < + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); if ((isMapHeld) && (in_ECX[2] = in_ECX[2] + 1, in_ECX[2] == 10)) { ((Level *)((Level *)game))->Level::ShowName(1); } @@ -15515,15 +15515,15 @@ LAB_0098de0e: local_20 = (int *)in_ECX[0x188]; local_14 = (Entity *)in_ECX[0x189]; uVar3 = Random(); - local_1c = (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + local_1c = (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_18 = (float)in_ECX[0x187] / 10.0; local_1c = local_1c + local_1c; fVar7 = cos(local_1c); local_20 = (int *)(fVar7 * local_18 + (float)local_20 * 0.5); fVar7 = sin(local_1c); - in_ECX[0x188] = (int)local_20; - in_ECX[0x189] = (int)(fVar7 * local_18 + (float)local_14 * 0.5); + in_ECX[0x188] = GHIDRA_INT(local_20); + in_ECX[0x189] = GHIDRA_INT((fVar7 * local_18 + (float)local_14 * 0.5)); } iVar4 = *in_ECX; if (iVar4 == 0) { @@ -15533,14 +15533,14 @@ LAB_0098de0e: else { fVar7 = (float)in_ECX[0x5c] + 0.1; } - in_ECX[0x5c] = (int)fVar7; + in_ECX[0x5c] = GHIDRA_INT(fVar7); if ((float)in_ECX[0xb4] <= 0.2) { fVar7 = 0.0; } else { fVar7 = (float)in_ECX[0xb4] - 0.2; } - in_ECX[0xb4] = (int)fVar7; + in_ECX[0xb4] = GHIDRA_INT(fVar7); LAB_0098e157: if (isMapHeld) { *in_ECX = 1; @@ -15555,8 +15555,8 @@ LAB_0098e157: else { fVar7 = (float)in_ECX[0x5c] - 0.2; } - in_ECX[0x5c] = (int)fVar7; - if ((uint)in_ECX[2] < 9) { + in_ECX[0x5c] = GHIDRA_INT(fVar7); + if (GHIDRA_UINT(in_ECX[2]) < 9) { if (isMapHeld) goto LAB_0098e0cd; *in_ECX = 2; *(undefined1 *)(in_ECX + 1) = 1; @@ -15569,10 +15569,10 @@ LAB_0098e157: } else { in_ECX[0x5c] = 0; - if ((uint)in_ECX[2] < 9) { + if (GHIDRA_UINT(in_ECX[2]) < 9) { if (isMapHeld) { LAB_0098e0cd: - in_ECX[0xb4] = (int)((float)in_ECX[0xb4] + 0.1); + in_ECX[0xb4] = GHIDRA_INT(((float)in_ECX[0xb4] + 0.1)); goto LAB_0098df73; } *in_ECX = 0; @@ -15594,19 +15594,19 @@ LAB_0098e0cd: else { fVar7 = (float)in_ECX[0x5c] - 0.2; } - in_ECX[0x5c] = (int)fVar7; + in_ECX[0x5c] = GHIDRA_INT(fVar7); fVar7 = (float)in_ECX[0xb4]; targetOpacity = (g_manager->_optionsConfig)._mapOpacity; if (fVar7 <= targetOpacity + 0.1) { if (targetOpacity - 0.1 <= fVar7) { - in_ECX[0xb4] = (int)targetOpacity; + in_ECX[0xb4] = GHIDRA_INT(targetOpacity); } else { - in_ECX[0xb4] = (int)(fVar7 + 0.1); + in_ECX[0xb4] = GHIDRA_INT((fVar7 + 0.1)); } } else { - in_ECX[0xb4] = (int)(fVar7 - 0.1); + in_ECX[0xb4] = GHIDRA_INT((fVar7 - 0.1)); } goto LAB_0098e157; } @@ -15625,7 +15625,7 @@ LAB_0098df73: if (1.0 <= fVar7) { fVar7 = 1.0; } - in_ECX[0x5c] = (int)fVar7; + in_ECX[0x5c] = GHIDRA_INT(fVar7); fVar7 = (float)in_ECX[0xb4]; if (fVar7 <= 0.0) { fVar7 = 0.0; @@ -15633,7 +15633,7 @@ LAB_0098df73: if (1.0 <= fVar7) { fVar7 = 1.0; } - in_ECX[0xb4] = (int)fVar7; + in_ECX[0xb4] = GHIDRA_INT(fVar7); ExceptionList = local_10; return; } @@ -15682,7 +15682,7 @@ void Game::start_poop_cloud_screen_effect(ColorMod *color) pvVar7 = (void *)color->_colorize[2]; pvVar3 = (void *)color->_colorize[3]; this->_roomList[0].RestrictedGridIndexes._head = (void *)color->_colorize[0]; - this->_roomList[0].RestrictedGridIndexes._size = (uint)fVar5; + this->_roomList[0].RestrictedGridIndexes._size = GHIDRA_UINT(fVar5); this->_roomList[0].SavedEffects._begin = pvVar7; this->_roomList[0].SavedEffects._end = pvVar3; *(undefined8 *)&this->_roomList[0].SavedEffects._capacity = *(undefined8 *)color->_offset; @@ -15692,7 +15692,7 @@ void Game::start_poop_cloud_screen_effect(ColorMod *color) iVar1 = this->_roomList[0]._doors[1]; if (iVar1 < 1) { this->_roomList[0]._doors[1] = 0xb4; - *(undefined1 *)((int)&this->_roomList[0].SpawnSeed + 1) = 0; + *(undefined1 *)(GHIDRA_INT(&this->_roomList[0].SpawnSeed) + 1) = 0; this->_roomList[0].DisplayFlags = 3; this->_roomList[0].VisitedCount = 0x3dcccccd; this->_roomList[0].Flags = 0x3f800000; @@ -15748,7 +15748,7 @@ void Game::start_poop_cloud_screen_effect(ColorMod *color) bVar8 = (byte)rngShift3; seed = seed >> (bVar8 & 0x1f) ^ seed; *(float *)(this->_roomList[0]._doors[5] + 8 + cloudOffset) = - (float)((double)(int)seed + __uint_to_double_fixup[-((int)seed >> 0x1f)]) * + (float)((double)GHIDRA_INT(seed) + __uint_to_double_fixup[-(GHIDRA_INT(seed) >> 0x1f)]) * 2.3283062e-10 * ((float)this->_roomList[0].Flags - (float)this->_roomList[0].VisitedCount) + (float)this->_roomList[0].VisitedCount; @@ -15763,7 +15763,7 @@ void Game::start_poop_cloud_screen_effect(ColorMod *color) seed = seed >> (bVar8 & 0x1f) ^ seed; *(float *)(this->_roomList[0]._doors[5] + 0xc + cloudOffset) = ((float)this->_roomList[0].GreedSubType - *(float *)&this->_roomList[0].TotalMoneySpent - ) * (float)((double)(int)seed + __uint_to_double_fixup[-((int)seed >> 0x1f)]) * + ) * (float)((double)GHIDRA_INT(seed) + __uint_to_double_fixup[-(GHIDRA_INT(seed) >> 0x1f)]) * 2.3283062e-10 + *(float *)&this->_roomList[0].TotalMoneySpent; if (seed == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -15777,7 +15777,7 @@ void Game::start_poop_cloud_screen_effect(ColorMod *color) iVar1 = *(int *)(this->_roomList[0]._doors[3] + 0x10); *(float *)(cloudOffset + this->_roomList[0]._doors[5]) = (float)((double)iVar1 + __uint_to_double_fixup[-(iVar1 >> 0x1f)]) * - (float)((double)(int)local_2c + __uint_to_double_fixup[-((int)local_2c >> 0x1f)]) * + (float)((double)GHIDRA_INT(local_2c) + __uint_to_double_fixup[-(GHIDRA_INT(local_2c) >> 0x1f)]) * 2.3283062e-10; if (local_2c == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -15791,7 +15791,7 @@ void Game::start_poop_cloud_screen_effect(ColorMod *color) iVar1 = *(int *)(this->_roomList[0]._doors[3] + 0x14); *(float *)(this->_roomList[0]._doors[5] + 4 + cloudOffset) = (float)((double)iVar1 + __uint_to_double_fixup[-(iVar1 >> 0x1f)]) * - (float)((double)(int)local_2c + __uint_to_double_fixup[-((int)local_2c >> 0x1f)]) * + (float)((double)GHIDRA_INT(local_2c) + __uint_to_double_fixup[-(GHIDRA_INT(local_2c) >> 0x1f)]) * 2.3283062e-10; if (local_2c == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -15803,7 +15803,7 @@ void Game::start_poop_cloud_screen_effect(ColorMod *color) seed = seed << 9 ^ seed; seed = seed >> (bVar8 & 0x1f) ^ seed; *(bool *)(this->_roomList[0]._doors[5] + 0x10 + cloudOffset) = - (float)((double)(int)seed + __uint_to_double_fixup[-((int)seed >> 0x1f)]) * + (float)((double)GHIDRA_INT(seed) + __uint_to_double_fixup[-(GHIDRA_INT(seed) >> 0x1f)]) * 2.3283062e-10 < 0.5; if (seed == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -15815,15 +15815,15 @@ void Game::start_poop_cloud_screen_effect(ColorMod *color) seed = seed << 9 ^ seed; seed = seed >> (bVar8 & 0x1f) ^ seed; *(bool *)(this->_roomList[0]._doors[5] + 0x11 + cloudOffset) = - (float)((double)(int)seed + __uint_to_double_fixup[-((int)seed >> 0x1f)]) * + (float)((double)GHIDRA_INT(seed) + __uint_to_double_fixup[-(GHIDRA_INT(seed) >> 0x1f)]) * 2.3283062e-10 < 0.5; cloudOffset = cloudOffset + 0x14; - local_30 = (int *)((int)local_30 + 1); - } while ((int)local_30 < this->_roomList[0].DisplayFlags); + local_30 = (int *)(GHIDRA_INT(local_30) + 1); + } while (GHIDRA_INT(local_30) < this->_roomList[0].DisplayFlags); } } else if (iVar1 < 0x96) { - this->_roomList[0]._doors[1] = (int)(180.0 - (((float)iVar1 - 0.0) / 150.0) * 30.0); + this->_roomList[0]._doors[1] = GHIDRA_INT((180.0 - (((float)iVar1 - 0.0) / 150.0) * 30.0)); } ExceptionList = local_1c; return; diff --git a/src/game/game_over.cpp b/src/game/game_over.cpp index ab17734..fe2b818 100644 --- a/src/game/game_over.cpp +++ b/src/game/game_over.cpp @@ -72,10 +72,10 @@ void GameOver::RenderItemSprite(int memberIndex) void *local_14; Manager *manager; - local_30._unk = (int)(numberText + 0xf); + local_30._unk = GHIDRA_INT((numberText + 0xf)); puStack_18 = &LAB_00b07173; local_1c = ExceptionList; - local_30._alpha = (float)(__security_cookie ^ (uint)(numberText + 0xc)); + local_30._alpha = (float)(__security_cookie ^ GHIDRA_UINT((numberText + 0xc))); ExceptionList = &local_1c; local_a4._green = (float)memberIndex; local_34 = KAGE::Network::Multiplayer::ConstLobby::vftable; @@ -111,14 +111,14 @@ LAB_008ec04c: slotX = (g_menuManager->_ViewPosition).x + *(float *)&(*(undefined1 *)((char *)(this) + 0x8)); slotY = (g_menuManager->_ViewPosition).y + *(float *)&(*(undefined1 *)((char *)(this) + 0xc)); local_8c = g_vectorZero.x; - local_a4._unk = (int)g_vectorZero.y; + local_a4._unk = GHIDRA_INT(g_vectorZero.y); memberSprite = lobby_member_sprite_get(this,memberIndex); if (memberSprite == (ANM2 *)0x0) { ExceptionList = local_1c; return; } local_a4._blue = (float)memberSprite; - user = lobby_get_member_info(this,(int)local_a4._green); + user = lobby_get_member_info(this,GHIDRA_INT(local_a4._green)); savedUser = user; playerNumber = FUN_008edde0(); playerNumber = playerNumber + 1; @@ -149,7 +149,7 @@ LAB_008ec144: local_b0 = KAGE::System::UserProfileBase::vftable; } local_30._red = (float)KAGE::System::UserProfile::vftable; - local_14 = (void *)CONCAT31(local_14._1_3_,5); + local_14 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),5); local_76 = ((KAGE::System::UserProfile *)(&local_30))->KAGE::System::UserProfile::is_local_user(); local_30._red = (float)KAGE::System::UserProfileBase::vftable; local_54._blue = (float)KAGE::Network::Multiplayer::ConstLobby::vftable; @@ -179,8 +179,8 @@ LAB_008ec144: (g_lobbyReleaseFn != (void *)0x0)) { (*g_lobbyReleaseFn)(); } - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; iVar3 = (g_manager->_lobbySettings)._gameMode; if ((((iVar3 == 4) || (iVar3 == 5)) || (playerNumber != cursorPlayerNumber)) || (isSwapAllowed = '\x01', isLocalMember == '\0')) { @@ -193,10 +193,10 @@ LAB_008ec144: local_60 = 0xe; local_70 = (undefined1 [8])0x6e6f697469736f50; local_14 = (void *)0xb; - ((std::string *)((char *)&local_58))->std::string::concat_move((int)local_30._green,local_70,right); - local_14._0_1_ = 0xc; + ((std::string *)((char *)&local_58))->std::string::concat_move(GHIDRA_INT(local_30._green),local_70,right); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; pppppppbVar4 = (byte *******)&local_58; - if (&DAT_0000000f < (uint)local_54._unk) { + if (&DAT_0000000f < GHIDRA_UINT(local_54._unk)) { pppppppbVar4 = local_58; } if (*(int *)&(*(undefined1 *)((char *)(local_90) + 0x44)) == 0) { @@ -208,38 +208,38 @@ LAB_008ec144: } memberSprite = (ANM2 *)local_a4._blue; local_8c = *nullFrame; - local_a4._unk = (int)nullFrame[1]; - local_14._0_1_ = 0xb; - if (&DAT_0000000f < (uint)local_54._unk) { + local_a4._unk = GHIDRA_INT(nullFrame[1]); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; + if (&DAT_0000000f < GHIDRA_UINT(local_54._unk)) { size = (int *)(local_54._unk + 1); pppppppbVar4 = local_58; if ((int *)0xfff < size) { pppppppbVar4 = (byte *******)local_58[-1]; size = (int *)(local_54._unk + 0x24); - if ((byte *)0x1f < (byte *)((int)local_58 + (-4 - (int)pppppppbVar4))) goto LAB_008ec408; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(local_58) + (-4 - GHIDRA_INT(pppppppbVar4)))) goto LAB_008ec408; } - operator_delete(pppppppbVar4,(uint)size); + operator_delete(pppppppbVar4,GHIDRA_UINT(size)); } - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; if (0xf < local_5c) { uVar8 = local_5c + 1; - pvVar7 = (void *)local_70._0_4_; + pvVar7 = (*(undefined4 *)((char *)&((void *)local_70) + 0x0)); if (0xfff < uVar8) { - pvVar7 = *(void **)(local_70._0_4_ + -4); + pvVar7 = *(void **)((*(undefined4 *)((char *)&(local_70) + 0x0)) + -4); uVar8 = local_5c + 0x24; - if (0x1f < (uint)(local_70._0_4_ + (-4 - (int)pvVar7))) goto LAB_008ec408; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_70) + 0x0)) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_008ec408; } operator_delete(pvVar7,uVar8); } - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; - if (0xf < (uint)local_30._green) { - uVar8 = (int)local_30._green + 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; + if (0xf < GHIDRA_UINT(local_30._green)) { + uVar8 = GHIDRA_INT(local_30._green) + 1; pvVar7 = numberText[0]; if (0xfff < uVar8) { - pvVar7 = *(void **)((int)numberText[0] + -4); - uVar8 = (int)local_30._green + 0x24; - if (0x1f < (uint)((int)numberText[0] + (-4 - (int)pvVar7))) { + pvVar7 = *(void **)(GHIDRA_INT(numberText[0]) + -4); + uVar8 = GHIDRA_INT(local_30._green) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(numberText[0]) + (-4 - GHIDRA_INT(pvVar7))))) { LAB_008ec408: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -269,9 +269,9 @@ LAB_008ec408: local_8c = slotY + nullFrame[1]; } } - local_a4._unk = (int)slotX; + local_a4._unk = GHIDRA_INT(slotX); local_30._green = slotY; - if ((uint)local_a4._green < local_ac) { + if (GHIDRA_UINT(local_a4._green) < local_ac) { FUN_0040a860(); if (((user == (int *)0x0) || (isLocalMember == '\0')) || ((*(char *)((char *)user + 10) != '\0' || (isKeyboard == '\0')))) { @@ -455,7 +455,7 @@ LAB_008ec865: KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(memberSprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,(uint)(local_76 == 0)); + ((ANM2 *)(memberSprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,GHIDRA_UINT((local_76 == 0))); } pLVar5 = ((ANM2 *)(memberSprite))->ANM2::GetLayer((byte *)"Player_Options_Cursor"); if (pLVar5 == (LayerState *)0x0) { @@ -507,7 +507,7 @@ LAB_008ec865: ExceptionList = local_1c; return; } - if (local_ac <= (uint)local_a4._green) { + if (local_ac <= GHIDRA_UINT(local_a4._green)) { ExceptionList = local_1c; return; } @@ -539,7 +539,7 @@ LAB_008ec865: pLVar5 = ((ANM2 *)((ANM2 *)portraitSprite))->ANM2::GetLayer((byte *)"Player_Portrait_Random"); pLVar5->_visible = 0; Sprite::ReplaceSpritesheet - ((Sprite *)portraitSprite,0x2a,(std_string *)((int)local_30._green + 0x4c)); + ((Sprite *)portraitSprite,0x2a,(std_string *)(GHIDRA_INT(local_30._green) + 0x4c)); ((ANM2 *)((ANM2 *)portraitSprite))->ANM2::LoadGraphics(unk); } memberSprite = (ANM2 *)local_a4._blue; @@ -582,8 +582,8 @@ LAB_008ecbd8: in_stack_ffffff10 = 0x8eccac; in_stack_ffffff14 = (KColor *)local_30._green; ((Font *)(local_ac))->Font::DrawStringScaled((byte *)local_30._green,(Vector *)pos_01,color_02,fontSettings); - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; iVar3 = (g_manager->_optionsConfig)._eosCrossplay; if ((iVar3 == 2) || (iVar3 == 3)) { cVar2 = (**(code **)(*user + 0x14))(); @@ -614,12 +614,12 @@ LAB_008ecbd8: FUN_00a29fd0(); local_14 = (void *)0xe; if (((KColor *)local_30._red == (KColor *)0x0) || - (0x77 < *(ushort *)&((KColor *)((int)local_30._red + 0x14))->_red)) { + (0x77 < *(ushort *)&((KColor *)(GHIDRA_INT(local_30._red) + 0x14))->_red)) { iVar3 = 0; } else { iVar3 = 2; - if (0x3c < *(ushort *)&((KColor *)((int)local_30._red + 0x14))->_red) { + if (0x3c < *(ushort *)&((KColor *)(GHIDRA_INT(local_30._red) + 0x14))->_red) { iVar3 = 1; } } @@ -650,8 +650,8 @@ LAB_008ecbd8: Font::DrawStringScaled (&manager->_font1_TeamMeatEx10,(byte *)in_stack_ffffff14,(Vector *)pos_01,color_01, settings); - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; local_b8 = 0; local_b4 = 0; memberSprite = (ANM2 *)local_a4._blue; @@ -674,13 +674,13 @@ LAB_008ecbd8: local_30._red = fVar10; ((Color *)(aCStackY_173c + 0x81))->Color::Color(1.0,1.0,1.0,1.0); color._colorize[3] = (float)in_stack_ffffff0c; - color._tint[0] = (float)in_stack_fffffef0._0_4_; - color._tint[1] = (float)in_stack_fffffef0._4_4_; - color._tint[2] = (float)in_stack_fffffef0._8_4_; - color._tint[3] = (float)in_stack_fffffef0._12_4_; - color._colorize[0] = (float)in_stack_fffffef0._16_4_; - color._colorize[1] = (float)in_stack_fffffef0._20_4_; - color._colorize[2] = (float)in_stack_fffffef0._24_4_; + color._tint[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffef0) + 0x0)); + color._tint[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffef0) + 0x4)); + color._tint[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffef0) + 0x8)); + color._tint[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffef0) + 0xc)); + color._colorize[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffef0) + 0x10)); + color._colorize[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffef0) + 0x14)); + color._colorize[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffef0) + 0x18)); color._offset[0] = (float)in_stack_ffffff10; color._offset[1] = (float)in_stack_ffffff14; color._offset[2] = (float)pos_01; @@ -712,13 +712,13 @@ LAB_008ecbd8: iVar3 = 0x19; LAB_008ed064: color_00._colorize[3] = (float)in_stack_ffffff0c; - color_00._tint[0] = (float)in_stack_fffffef0._0_4_; - color_00._tint[1] = (float)in_stack_fffffef0._4_4_; - color_00._tint[2] = (float)in_stack_fffffef0._8_4_; - color_00._tint[3] = (float)in_stack_fffffef0._12_4_; - color_00._colorize[0] = (float)in_stack_fffffef0._16_4_; - color_00._colorize[1] = (float)in_stack_fffffef0._20_4_; - color_00._colorize[2] = (float)in_stack_fffffef0._24_4_; + color_00._tint[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffef0) + 0x0)); + color_00._tint[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffef0) + 0x4)); + color_00._tint[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffef0) + 0x8)); + color_00._tint[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffef0) + 0xc)); + color_00._colorize[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffef0) + 0x10)); + color_00._colorize[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffef0) + 0x14)); + color_00._colorize[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffef0) + 0x18)); color_00._offset[0] = (float)in_stack_ffffff10; color_00._offset[1] = (float)in_stack_ffffff14; color_00._offset[2] = (float)pos_01; @@ -794,7 +794,7 @@ void GameOver::Render() local_14 = 0xffffffff; puStack_18 = &LAB_00b0d7dd; local_1c = ExceptionList; - uVar4 = __security_cookie ^ (uint)(nullName + 0x58); + uVar4 = __security_cookie ^ GHIDRA_UINT((nullName + 0x58)); ExceptionList = &local_1c; local_124 = 0.0; if (*(int *)smallFont != 0) { @@ -829,21 +829,21 @@ void GameOver::Render() } } local_108 = *(std_string **)((char *)local_fc + 0x13c0); - if ((int)local_108 < 0x29) { + if (GHIDRA_INT(local_108) < 0x29) { ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(smallFont) + 0x8))))->ANM2::Render(&screenCenter,&g_vectorZero,&g_vectorZero); } else { pLVar6 = ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(smallFont) + 0x8))))->ANM2::GetLayer(&DAT_00000004); pLVar6->_visible = 0; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(smallFont) + 0x8))))->ANM2::Render(&screenCenter,&g_vectorZero,&g_vectorZero); - ModManager::RenderCustomGameOver((int)local_108,&screenCenter); + ModManager::RenderCustomGameOver(GHIDRA_INT(local_108),&screenCenter); } local_10c = g_vectorZero.x; local_110 = g_vectorZero.y; pLVar6 = ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(smallFont) + 0x8))))->ANM2::GetLayer(&DAT_00000006); local_104 = 0x10; pLVar6->_visible = 1; - pvVar5 = (((History *)((int)local_fc + 0x1dec))->_historyItems)._begin; + pvVar5 = (((History *)(GHIDRA_INT(local_fc) + 0x1dec))->_historyItems)._begin; if (pvVar5 != *(void **)((char *)local_fc + 0x1df0)) { do { if (local_104 == 0) break; @@ -854,16 +854,16 @@ void GameOver::Render() local_100 = 0.0; } if (g_game == (Game *)0x0) { - if (-1 < (int)local_100) goto LAB_00998b3f; + if (-1 < GHIDRA_INT(local_100)) goto LAB_00998b3f; } else { - if ((int)local_100 < 0) { - if (((int)local_100 < 0) && + if (GHIDRA_INT(local_100) < 0) { + if ((GHIDRA_INT(local_100) < 0) && (local_108 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)~(uint)local_100 < - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)local_108 >> 2)) { + GHIDRA_INT(~GHIDRA_UINT(local_100)) < + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(local_108) >> 2)) { itemConfig = (ItemConfig_Item *) - **(undefined4 **)((char *)local_108 + ~(uint)local_100 * 4); + **(undefined4 **)((char *)local_108 + ~GHIDRA_UINT(local_100) * 4); } else { itemConfig = (ItemConfig_Item *)0x0; @@ -872,19 +872,19 @@ void GameOver::Render() else { LAB_00998b3f: collectibleConfigs = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)collectibleConfigs >> 2 <= - (int)local_100) goto LAB_00998f1b; - itemConfig = *(ItemConfig_Item **)((char *)collectibleConfigs + (int)local_100 * 4); + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(collectibleConfigs) >> 2 <= + GHIDRA_INT(local_100)) goto LAB_00998f1b; + itemConfig = *(ItemConfig_Item **)((char *)collectibleConfigs + GHIDRA_INT(local_100) * 4); } if ((itemConfig != (ItemConfig_Item *)0x0) && ((itemConfig->type != 3 || - (itemConfig->id == ((ActiveItemDesc *)((int)local_fc + 0x1580))->_item)))) { - if ((int)local_100 < 0x2dd) { - if ((int)local_100 < 1) { + (itemConfig->id == ((ActiveItemDesc *)(GHIDRA_INT(local_fc) + 0x1580))->_item)))) { + if (GHIDRA_INT(local_100) < 0x2dd) { + if (GHIDRA_INT(local_100) < 1) { local_100 = 1.02715e-42; } else { - local_100 = (float)((int)local_100 - 1); + local_100 = (float)(GHIDRA_INT(local_100) - 1); } if ((*(int *)&(*(undefined1 *)((char *)(smallFont) + 0x3c)) != 0) && ((6 < *(int *)(*(int *)&(*(undefined1 *)((char *)(smallFont) + 0x38)) + 0x80) || @@ -893,12 +893,12 @@ LAB_00998b3f: iVar7 = *(int *)&(*(undefined1 *)((char *)(smallFont) + 0x3c)); local_108 = *(std_string **)(iVar7 + 0x50); if ((iVar7 == 0) || - (((int)local_108 < 0 || (*(int *)(iVar7 + 0x1c) <= (int)local_108)))) { + ((GHIDRA_INT(local_108) < 0 || (*(int *)(iVar7 + 0x1c) <= GHIDRA_INT(local_108))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)(*(int *)&(*(undefined1 *)((char *)(smallFont) + 0x40)) + (int)local_108 * 4) = 0; + *(undefined4 *)(*(int *)&(*(undefined1 *)((char *)(smallFont) + 0x40)) + GHIDRA_INT(local_108) * 4) = 0; AnimationState::AdvanceLayerPosition - ((AnimationState *)&(*(undefined1 *)((char *)(smallFont) + 0x38)),(int)local_108,(float)(int)local_100) + ((AnimationState *)&(*(undefined1 *)((char *)(smallFont) + 0x38)),GHIDRA_INT(local_108),(float)GHIDRA_INT(local_100)) ; } local_120.x = local_10c + screenCenter.x; @@ -990,7 +990,7 @@ LAB_00998bff: tmpColorMod._colorize[3] = 0.0; drawPos.y = screenCenter.y + *(float *)(iVar7 + 0x14) + local_110; ModManager::RenderCustomCollectionItem - (&g_manager->_modManager,(uint)local_100,&drawPos,&g_vectorOne, + (&g_manager->_modManager,GHIDRA_UINT(local_100),&drawPos,&g_vectorOne, &tmpColorMod,&tmpColor); } } @@ -1004,7 +1004,7 @@ LAB_00998bff: } } LAB_00998f1b: - pvVar5 = (void *)((int)pvVar5 + 0x1c); + pvVar5 = (void *)(GHIDRA_INT(pvVar5) + 0x1c); } while (pvVar5 != *(void **)((char *)local_fc + 0x1df0)); } if (*(int *)&(*(undefined1 *)((char *)&(smallFont[1]) + 0xc)) != 0) { @@ -1093,7 +1093,7 @@ LAB_00998f1b: tmpColorMod._offset[0] = -NAN; tmpColorMod._offset[1] = 0.0; tmpColorMod._offset[2] = 0.0; - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; ((KColor *)(&tmpColor))->KColor::SetFromARGB(0xff362f2d); local_100 = local_100 - 4.0; ((Font *)(&pMVar2->_font2_TeamMeatEx12))->Font::DrawString(seedHalf,color,tmpColorMod._colorize, @@ -1124,7 +1124,7 @@ LAB_00998f1b: tmpColorMod._offset[0] = -NAN; tmpColorMod._offset[1] = 0.0; tmpColorMod._offset[2] = 0.0; - local_14 = CONCAT31(local_14._1_3_,7); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),7); ((KColor *)(&tmpColor))->KColor::SetFromARGB(0xff362f2d); ((Font *)(&pMVar2->_font2_TeamMeatEx12))->Font::DrawString(seedHalf,color_00,tmpColorMod._colorize, local_100,local_124 + 17.0); @@ -1137,7 +1137,7 @@ LAB_00998f1b: if (0xfff < uVar11) { ptr = (std_string *)local_f4[-1]._capacity; uVar11 = uVar4 + 0x24; - if (0x1f < (uint)((int)local_f4 + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_f4) + (-4 - GHIDRA_INT(ptr))))) { LAB_0099978e: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1148,17 +1148,17 @@ LAB_0099978e: } else { local_108 = *(std_string **)(smallFont + 1); - iVar9 = *(int *)&(*(undefined1 *)((char *)&(smallFont[1]) + 0x4)) - (int)local_108; + iVar9 = *(int *)&(*(undefined1 *)((char *)&(smallFont[1]) + 0x4)) - GHIDRA_INT(local_108); local_104 = 0; iVar7 = iVar9 >> 0x1f; if (iVar9 / 0x38 + iVar7 != iVar7) { local_fc = (EntityPtr)0x0; do { - if (0xdf < (uint)local_fc) { + if (0xdf < GHIDRA_UINT(local_fc)) { ExceptionList = local_1c; return; } - memberEntry = local_108->_buf + (int)local_fc; + memberEntry = local_108->_buf + GHIDRA_INT(local_fc); local_120.x = (float)KAGE::System::UserProfileBase::vftable; ((UserProfile *)(memberEntry))->UserProfile::find_or_create(); local_14 = 0; @@ -1228,9 +1228,9 @@ LAB_0099978e: local_100 = 0.0; local_110 = drawPos.y; do { - if (2 < (int)local_10c) break; - cVar3 = FUN_008ca1d0(*(undefined4 *)(local_108->_buf + (int)local_fc), - *(undefined4 *)((undefined1 *)((int)local_fc + 4) + (int)local_108) + if (2 < GHIDRA_INT(local_10c)) break; + cVar3 = FUN_008ca1d0(*(undefined4 *)(local_108->_buf + GHIDRA_INT(local_fc)), + *(undefined4 *)((undefined1 *)(GHIDRA_INT(local_fc) + 4) + GHIDRA_INT(local_108)) ,local_100); if (cVar3 != '\0') { pbVar10 = deedName; @@ -1250,8 +1250,8 @@ LAB_0099978e: pbVar10 = pbVar10 + 1; } while (bVar1 != 0); ((std::string *)((char *)deedText))->std::string::assign(translatedText, - (int)pbVar10 - (int)(translatedText + 1)); - local_124 = (float)((uint)local_124 | 1); + GHIDRA_INT(pbVar10) - GHIDRA_INT((translatedText + 1))); + local_124 = (float)(GHIDRA_UINT(local_124) | 1); tmpColorMod._colorize[0] = 1.4013e-45; tmpColorMod._colorize[1] = 9.18341e-41; tmpColorMod._colorize[2] = 0.0; @@ -1259,7 +1259,7 @@ LAB_0099978e: tmpColorMod._offset[0] = -NAN; tmpColorMod._offset[1] = 0.0; tmpColorMod._offset[2] = 0.0; - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; pppppppbVar8 = (byte *******)deedText; if (0xf < uStack_c8) { pppppppbVar8 = deedText[0]; @@ -1272,8 +1272,8 @@ LAB_0099978e: Font::DrawStringScaled (smallFont,(byte *)pppppppbVar8,&drawPos,&tmpColor,tmpColorMod._colorize); drawPos.y = local_110 + 15.0; - local_10c = (float)((int)local_10c + 1); - local_14 = CONCAT31(local_14._1_3_,2); + local_10c = (float)(GHIDRA_INT(local_10c) + 1); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); local_110 = drawPos.y; if (0xf < uStack_c8) { uVar4 = uStack_c8 + 1; @@ -1281,19 +1281,19 @@ LAB_0099978e: if (0xfff < uVar4) { pppppppbVar8 = (byte *******)deedText[0][-1]; uVar4 = uStack_c8 + 0x24; - if ((byte *)0x1f < (byte *)((int)deedText[0] + (-4 - (int)pppppppbVar8))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(deedText[0]) + (-4 - GHIDRA_INT(pppppppbVar8)))) goto LAB_0099978e; } operator_delete(pppppppbVar8,uVar4); } } deedName = deedName + 0x18; - local_100 = (float)((int)local_100 + 1); - } while ((int)deedName < 0xc79100); - local_fc = (EntityPtr)((int)local_fc + 0x38); + local_100 = (float)(GHIDRA_INT(local_100) + 1); + } while (GHIDRA_INT(deedName) < 0xc79100); + local_fc = (EntityPtr)(GHIDRA_INT(local_fc) + 0x38); local_14 = 0xffffffff; local_108 = *(std_string **)(smallFont + 1); - } while (local_104 < (uint)((*(int *)&(*(undefined1 *)((char *)&(smallFont[1]) + 0x4)) - (int)local_108) / 0x38)); + } while (local_104 < GHIDRA_UINT(((*(int *)&(*(undefined1 *)((char *)&(smallFont[1]) + 0x4)) - GHIDRA_INT(local_108)) / 0x38))); } } } @@ -1345,7 +1345,7 @@ void GameOver::Show() local_8 = 0xffffffff; puStack_c = &LAB_00b0d825; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(playerLabel + 0x20); + local_14 = __security_cookie ^ GHIDRA_UINT((playerLabel + 0x20)); ExceptionList = &local_10; if ((g_game->_pauseScreen)._state != 0) { ((PopupWindow *)(&g_game->_pauseScreen))->PopupWindow::hide(); @@ -1372,23 +1372,23 @@ void GameOver::Show() } anm2File._size = 0; anm2File._capacity = 0xf; - anm2File._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anm2File._buf) + 0x0)) = (void *)0x0; pbVar3 = (byte *)anm2Path; do { isBossKiller = *pbVar3; pbVar3 = pbVar3 + 1; } while (isBossKiller != 0); - ((std::string *)(anm2File._buf))->std::string::assign((byte *)anm2Path,(int)pbVar3 - (int)(anm2Path + 1)); + ((std::string *)(anm2File._buf))->std::string::assign((byte *)anm2Path,GHIDRA_INT(pbVar3) - GHIDRA_INT((anm2Path + 1))); local_8 = 0; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x8))))->ANM2::Load(&anm2File,1); local_8 = 0xffffffff; if (0xf < anm2File._capacity) { uVar5 = anm2File._capacity + 1; - pvVar4 = (void *)anm2File._buf._0_4_; + pvVar4 = (*(undefined4 *)((char *)&((void *)anm2File._buf) + 0x0)); if (0xfff < uVar5) { - pvVar4 = *(void **)(anm2File._buf._0_4_ + -4); + pvVar4 = *(void **)((*(undefined4 *)((char *)&(anm2File._buf) + 0x0)) + -4); uVar5 = anm2File._capacity + 0x24; - if (0x1f < (uint)(anm2File._buf._0_4_ + (-4 - (int)pvVar4))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anm2File._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar4))))) { LAB_009998fd: local_8 = 0xffffffff; /* WARNING: Subroutine does not return */ @@ -1399,7 +1399,7 @@ LAB_009998fd: } anm2File._size = 0; anm2File._capacity = 0xf; - anm2File._buf._0_4_ = anm2File._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(anm2File._buf) + 0x0)) = (*(undefined4 *)((char *)&(anm2File._buf) + 0x0)) & 0xffffff00; iVar6 = g_game->_stage; if ((g_game->_difficulty == 2) || (iVar7 = iVar6, g_game->_difficulty == 3)) { if (iVar6 < 5) { @@ -1484,7 +1484,7 @@ code_r0x009999d4: deadPlayer = *(Entity_Player **)((char *)deadPlayer + 0x1e68); } KAGE_LogMessage(1,(byte *)"Game Over. Killed by (%d.%d) spawned by (%d.%d) damage flags (%d)\n"); - iVar7 = ((EntityRef *)((int)deadPlayer + 0x167c))->_type; + iVar7 = ((EntityRef *)(GHIDRA_INT(deadPlayer) + 0x167c))->_type; pEStack_84 = (EntityConfig_Entity *)0x0; iVar6 = -1; if ((((iVar7 == 0) || @@ -1498,7 +1498,7 @@ code_r0x009999d4: *(int *)((char *)deadPlayer + 0x1688),0), pEStack_84 == (EntityConfig_Entity *)0x0)) || (iVar6 = pEStack_84->portrait, iVar6 == -1)))) { - iVar7 = ((EntityRef *)((int)deadPlayer + 0x167c))->_type; + iVar7 = ((EntityRef *)(GHIDRA_INT(deadPlayer) + 0x167c))->_type; if (iVar7 == 4) { iVar6 = 0x41; } @@ -1711,7 +1711,7 @@ LAB_00999f34: } *(int *)&(*(undefined1 *)((char *)&(this[1]) + 0x4)) = iVar7; pEStack_84 = (EntityConfig_Entity *)0x0; - iVar7 = (int)(g_game->_onlinePlayerStats)._end - (int)(g_game->_onlinePlayerStats)._begin; + iVar7 = GHIDRA_INT((g_game->_onlinePlayerStats)._end) - GHIDRA_INT((g_game->_onlinePlayerStats)._begin); iVar6 = iVar7 >> 0x1f; if (iVar7 / 0x68 + iVar6 != iVar6) { uStack_88 = 0; @@ -1743,15 +1743,15 @@ LAB_00999f34: if (0xfff < uVar5) { pvVar4 = *(void **)((char *)pvStack_6c + -4); uVar5 = uStack_58 + 0x24; - if (0x1f < (uint)((int)pvStack_6c + (-4 - (int)pvVar4))) goto LAB_009998fd; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvStack_6c) + (-4 - GHIDRA_INT(pvVar4))))) goto LAB_009998fd; } operator_delete(pvVar4,uVar5); game = g_game; } pvVar4 = (game->_onlinePlayerStats)._begin; - uVar2 = *(undefined4 *)(uStack_88 + 4 + (int)pvVar4); + uVar2 = *(undefined4 *)(uStack_88 + 4 + GHIDRA_INT(pvVar4)); iVar6 = *(int *)&(*(undefined1 *)((char *)&(this[1]) + 0x4)); - *(undefined4 *)(iVar6 + -0x38) = *(undefined4 *)(uStack_88 + (int)pvVar4); + *(undefined4 *)(iVar6 + -0x38) = *(undefined4 *)(uStack_88 + GHIDRA_INT(pvVar4)); manager = g_manager; *(undefined4 *)(iVar6 + -0x34) = uVar2; if (manager->_netplayManager == *(NetplayManager *)(manager + 1)) { @@ -1763,7 +1763,7 @@ LAB_00999f34: isBossKiller = *pbVar3; pbVar3 = pbVar3 + 1; } while (isBossKiller != 0); - uVar5 = (int)pbVar3 - (int)(playerLabel + 1); + uVar5 = GHIDRA_INT(pbVar3) - GHIDRA_INT((playerLabel + 1)); pbVar3 = playerLabel; } else { @@ -1775,14 +1775,14 @@ LAB_00999f34: isBossKiller = *nameEnd; nameEnd = nameEnd + 1; } while (isBossKiller != 0); - uVar5 = (int)nameEnd - (int)(pbVar3 + 1); + uVar5 = GHIDRA_INT(nameEnd) - GHIDRA_INT((pbVar3 + 1)); } ((std::string *)((char *)(*(int *)&(*(undefined1 *)((char *)&(this[1]) + 0x4)) + -0x30)))->std::string::assign(pbVar3,uVar5); - pEStack_84 = (EntityConfig_Entity *)((int)pEStack_84 + 1); + pEStack_84 = (EntityConfig_Entity *)(GHIDRA_INT(pEStack_84) + 1); uStack_88 = uStack_88 + 0x68; } while (pEStack_84 < - (uint)(((int)(g_game->_onlinePlayerStats)._end - - (int)(g_game->_onlinePlayerStats)._begin) / 0x68)); + GHIDRA_UINT(((GHIDRA_INT((g_game->_onlinePlayerStats)._end) - + GHIDRA_INT((g_game->_onlinePlayerStats)._begin)) / 0x68))); } } ExceptionList = local_10; diff --git a/src/game/game_state.cpp b/src/game/game_state.cpp index 0d86613..5e9aae3 100644 --- a/src/game/game_state.cpp +++ b/src/game/game_state.cpp @@ -40,16 +40,16 @@ RoomDescriptor * GameState::copy_room_list(RoomDescriptor *dest, RoomDescriptor dest->BossDeathSeed = source->BossDeathSeed; if (&dest->SavedGridEntities != &source->SavedGridEntities) { pvVar1 = (source->SavedGridEntities)._begin; - _Size = (int)(source->SavedGridEntities)._end - (int)pvVar1; + _Size = GHIDRA_INT((source->SavedGridEntities)._end) - GHIDRA_INT(pvVar1); destBegin = (dest->SavedGridEntities)._begin; - source = (RoomDescriptor *)((int)_Size >> 5); - if ((RoomDescriptor *)((int)(dest->SavedGridEntities)._capacity - (int)destBegin >> 5) < source) + source = (RoomDescriptor *)(GHIDRA_INT(_Size) >> 5); + if ((RoomDescriptor *)(GHIDRA_INT((dest->SavedGridEntities)._capacity) - GHIDRA_INT(destBegin) >> 5) < source) { std::vector<32byte>::_Clear_and_reserve_geometric(source); destBegin = (dest->SavedGridEntities)._begin; } memmove(destBegin,pvVar1,_Size); - (dest->SavedGridEntities)._end = (void *)((int)destBegin + _Size); + (dest->SavedGridEntities)._end = (void *)(GHIDRA_INT(destBegin) + _Size); } if (&dest->SavedEntities != &sourceDesc->SavedEntities) { std::vector::assign @@ -60,12 +60,12 @@ RoomDescriptor * GameState::copy_room_list(RoomDescriptor *dest, RoomDescriptor pvVar1 = restrictedIndexes->_head; FID_conflict__Erase_tree_>_> (restrictedIndexes,(fuzzer_allocator_> *)restrictedIndexes, - *(_Tree_node **)((int)pvVar1 + 4)); + *(_Tree_node **)(GHIDRA_INT(pvVar1) + 4)); *(void **)((char *)pvVar1 + 4) = pvVar1; *(void **)pvVar1 = pvVar1; *(void **)((char *)pvVar1 + 8) = pvVar1; (dest->RestrictedGridIndexes)._size = 0; - std_set_uint_copy(&dest->RestrictedGridIndexes,&sourceDesc->RestrictedGridIndexes,(int)source); + std_set_uint_copy(&dest->RestrictedGridIndexes,&sourceDesc->RestrictedGridIndexes,GHIDRA_INT(source)); } if (&dest->SavedEffects != &sourceDesc->SavedEffects) { std::vector::assign @@ -121,7 +121,7 @@ GameState * GameState::constructor() local_8 = 0; _eh_vector_constructor_iterator_ (&(*(undefined1 *)((char *)(this) + 0x1a0)),0xb8,0x20f,RoomDescriptor::constructor,RoomDescriptor::destructor); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; listHead = &(*(undefined1 *)((char *)(this) + 0x1951c)); *(undefined4 *)listHead = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x19520)) = 0; @@ -131,8 +131,8 @@ GameState * GameState::constructor() sentinelNode = operator_new(8); sentinelNode[1] = 0; *(int **)listHead = sentinelNode; - *sentinelNode = (int)listHead; - local_8._0_1_ = 2; + *sentinelNode = GHIDRA_INT(listHead); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x19d34)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x19d30)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x19d3c)) = 0xffffffff; @@ -142,10 +142,10 @@ GameState * GameState::constructor() (*(undefined1 *)((char *)(this) + 0x19d4c)) = 0; _eh_vector_constructor_iterator_ (&(*(undefined1 *)((char *)(this) + 0x19d7c)),0x5dc,8,input_state_reset,GameStatePlayer::~GameStatePlayer); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; _eh_vector_constructor_iterator_ (&(*(undefined1 *)((char *)(this) + 0x1cc5c)),0x5dc,4,input_state_reset,GameStatePlayer::~GameStatePlayer); - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; _eh_vector_constructor_iterator_(&(*(undefined1 *)((char *)(this) + 0x1e3cc)),0xc,0x1f,FUN_00424510,FID_conflict__Tidy); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1e5d4)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1e5d8)) = 0; @@ -159,7 +159,7 @@ GameState * GameState::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1e718)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1e71c)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1e720)) = 0; - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; Seeds::constructor(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1e790)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1e794)) = 0; @@ -167,7 +167,7 @@ GameState * GameState::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1e79c)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1e7a0)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1e7a4)) = 0; - local_8._0_1_ = 9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; _eh_vector_constructor_iterator_(&(*(undefined1 *)((char *)(this) + 0x1e7b4)),800,7,FUN_006ef920,FUN_006f29a0); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1fd98)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1fd9c)) = 0; @@ -191,7 +191,7 @@ GameState * GameState::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1fe1c)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1fe20)) = 0xf; (*(undefined1 *)((char *)(this) + 0x1fe0c)) = 0; - local_8 = CONCAT31(local_8._1_3_,0x10); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x10); this->_saveFile = (void *)0x0; Clear(this); ExceptionList = local_10; @@ -279,7 +279,7 @@ void GameState::Clear() local_14 = (void *)0xffffffff; puStack_18 = &LAB_00b0f28d; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(local_60 + 0x14); + local_24 = __security_cookie ^ GHIDRA_UINT((local_60 + 0x14)); ExceptionList = &local_1c; this->_isSaveAvailable = 0; this->_isRerunAvailable = 0; @@ -350,7 +350,7 @@ void GameState::Clear() std::vector::_Tidy(); FID_conflict__Erase_tree_>_> (local_60,(fuzzer_allocator_> *)local_60, - *(_Tree_node **)((int)local_60[0] + 4)); + *(_Tree_node **)(GHIDRA_INT(local_60[0]) + 4)); operator_delete(local_60[0],0x14); std::vector::_Tidy(); FUN_00708f90(); @@ -422,17 +422,17 @@ void GameState::Clear() puVar5[1] = 0; puVar5[2] = 0; if (pvVar2 != (void *)0x0) { - uVar6 = uVar6 - (int)pvVar2 & 0xfffffffc; + uVar6 = uVar6 - GHIDRA_INT(pvVar2) & 0xfffffffc; pvVar3 = pvVar2; if (0xfff < uVar6) { pvVar3 = *(void **)((char *)pvVar2 + -4); uVar6 = uVar6 + 0x23; - if (0x1f < (uint)((int)pvVar2 + (-4 - (int)pvVar3))) goto LAB_009c8175; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar2) + (-4 - GHIDRA_INT(pvVar3))))) goto LAB_009c8175; } operator_delete(pvVar3,uVar6); } } - local_e4 = (GameState *)((int)local_e4 + 1); + local_e4 = (GameState *)(GHIDRA_INT(local_e4) + 1); puVar5 = puVar5 + 3; } while (local_e4 < 0x1f); memset(&(*(undefined1 *)((char *)(gameState) + 0x1e540)),0,0x7c); @@ -446,8 +446,8 @@ void GameState::Clear() memset(&(*(undefined1 *)((char *)(gameState) + 0x1e640)),0,0x3e); FUN_009cf000(); local_80 = -0x55e8beb1; - local_7c._0_4_ = 5; - local_7c._4_4_ = (void *)0x9; + (*(undefined4 *)((char *)&(local_7c) + 0x0)) = 5; + (*(undefined4 *)((char *)&(local_7c) + 0x4)) = (void *)0x9; local_74 = &DAT_00000007; local_34 = (void *)0x0; local_30 = 0; @@ -461,7 +461,7 @@ void GameState::Clear() local_34 = pvVar2; FID_conflict__Erase_tree_>_> (&local_34,(fuzzer_allocator_> *)&local_34, - *(_Tree_node **)((int)pvVar2 + 4)); + *(_Tree_node **)(GHIDRA_INT(pvVar2) + 4)); *(void **)((char *)pvVar2 + 4) = pvVar2; *(void **)pvVar2 = pvVar2; *(void **)((char *)pvVar2 + 8) = pvVar2; @@ -471,7 +471,7 @@ void GameState::Clear() local_14 = (void *)0xffffffff; FID_conflict__Erase_tree_>_> (&local_34,(fuzzer_allocator_> *)&local_34, - *(_Tree_node **)((int)local_34 + 4)); + *(_Tree_node **)(GHIDRA_INT(local_34) + 4)); operator_delete(local_34,0x14); puVar1 = &(*(undefined1 *)((char *)(gameState) + 0x1e790)); *(undefined4 *)&(*(undefined1 *)((char *)(gameState) + 0x1e780)) = 0; @@ -485,12 +485,12 @@ void GameState::Clear() *(undefined4 *)&(*(undefined1 *)((char *)(gameState) + 0x1e794)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(gameState) + 0x1e798)) = 0; if (pvVar2 != (void *)0x0) { - uVar6 = ((iVar7 - (int)pvVar2) / 0xc) * 0xc; + uVar6 = ((iVar7 - GHIDRA_INT(pvVar2)) / 0xc) * 0xc; pvVar3 = pvVar2; if (0xfff < uVar6) { pvVar3 = *(void **)((char *)pvVar2 + -4); uVar6 = uVar6 + 0x23; - if (0x1f < (uint)((int)pvVar2 + (-4 - (int)pvVar3))) goto LAB_009c8175; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar2) + (-4 - GHIDRA_INT(pvVar3))))) goto LAB_009c8175; } operator_delete(pvVar3,uVar6); } @@ -505,12 +505,12 @@ void GameState::Clear() *(undefined4 *)&(*(undefined1 *)((char *)(gameState) + 0x1e7a0)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(gameState) + 0x1e7a4)) = 0; if (pvVar2 != (void *)0x0) { - uVar6 = iVar7 - (int)pvVar2 & 0xfffffff8; + uVar6 = iVar7 - GHIDRA_INT(pvVar2) & 0xfffffff8; pvVar3 = pvVar2; if (0xfff < uVar6) { pvVar3 = *(void **)((char *)pvVar2 + -4); uVar6 = uVar6 + 0x23; - if (0x1f < (uint)((int)pvVar2 + (-4 - (int)pvVar3))) goto LAB_009c8175; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar2) + (-4 - GHIDRA_INT(pvVar3))))) goto LAB_009c8175; } operator_delete(pvVar3,uVar6); } @@ -521,7 +521,7 @@ void GameState::Clear() auStack_f0[2] = 0; local_f8 = operator_new(8); local_f8[1] = 0; - *local_f8 = (int)&local_f8; + *local_f8 = GHIDRA_INT(&local_f8); FUN_007526b0(&(*(undefined1 *)((char *)(gameState) + 0x1951c))); if (auStack_f0[2] != 0) { do { @@ -548,7 +548,7 @@ void GameState::Clear() if (0xfff < uVar6) { pvVar3 = *(void **)((char *)pvVar2 + -4); uVar6 = uVar6 + 0x23; - if (0x1f < (uint)((int)pvVar2 + (-4 - (int)pvVar3))) goto LAB_009c8175; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar2) + (-4 - GHIDRA_INT(pvVar3))))) goto LAB_009c8175; } operator_delete(pvVar3,uVar6); } @@ -595,12 +595,12 @@ void GameState::Clear() *(undefined4 *)&(*(undefined1 *)((char *)(gameState) + 0x1fd9c)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(gameState) + 0x1fda0)) = 0; if (pvVar2 != (void *)0x0) { - uVar6 = iVar7 - (int)pvVar2 & 0xfffffffc; + uVar6 = iVar7 - GHIDRA_INT(pvVar2) & 0xfffffffc; pvVar3 = pvVar2; if (0xfff < uVar6) { pvVar3 = *(void **)((char *)pvVar2 + -4); uVar6 = uVar6 + 0x23; - if (0x1f < (uint)((int)pvVar2 + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar2) + (-4 - GHIDRA_INT(pvVar3))))) { LAB_009c8175: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -714,9 +714,9 @@ void GameState::write_bool_vector(void *stream, void *bits) void *local_14; void *local_c; - puStack_20 = (undefined4 *)(uint)(uint3)puStack_20; + puStack_20 = (undefined4 *)GHIDRA_UINT((uint3))puStack_20; bitsInByte = 0; - local_18 = (int *)(uint)*(ushort *)((char *)bits + 0xc); + local_18 = (int *)GHIDRA_UINT(*(ushort *)((char *)bits + 0xc)); abStack_34[0] = 1; abStack_34[1] = 0; abStack_34[2] = 0; @@ -725,8 +725,8 @@ void GameState::write_bool_vector(void *stream, void *bits) local_14 = stream; local_c = bits; (**(code **)(**(int **)stream + 0x1c))(&local_18,2); - uStack_1c = (uint)uStack_24; - ((Checksum *)((void *)((int)stream + 0xc)))->Checksum::Update((byte *)&uStack_1c,2); + uStack_1c = GHIDRA_UINT(uStack_24); + ((Checksum *)((void *)(GHIDRA_INT(stream) + 0xc)))->Checksum::Update((byte *)&uStack_1c,2); bitIdx = 0; if (uStack_24 != 0) { do { @@ -736,7 +736,7 @@ void GameState::write_bool_vector(void *stream, void *bits) (**(code **)(*(int *)*puStack_20 + 0x1c))(abStack_22 + -7,1,1); ((Checksum *)(puStack_20 + 3))->Checksum::Update(abStack_22 + -6,1); } - uVar2 = (undefined1)((uint)bitIdx >> 0x18); + uVar2 = (undefined1)(GHIDRA_UINT(bitIdx) >> 0x18); bitIdx = bitIdx + 1; } while (bitIdx < uStack_24); if (bitsInByte != 0) { @@ -763,10 +763,10 @@ void GameState::write_entry(int *entry, int *stream) stream = (int *)entry[1]; ((Checksum *)(writer + 3))->Checksum::Update((byte *)&stream,4); (**(code **)(*(int *)*writer + 0x1c))(entry + 2,2,1); - stream = (int *)(uint)*(ushort *)(entry + 2); + stream = (int *)GHIDRA_UINT(*(ushort *)(entry + 2)); ((Checksum *)(writer + 3))->Checksum::Update((byte *)&stream,2); - (**(code **)(*(int *)*writer + 0x1c))((ushort *)((int)entry + 10),2,1); - stream = (int *)(uint)*(ushort *)((char *)entry + 10); + (**(code **)(*(int *)*writer + 0x1c))((ushort *)(GHIDRA_INT(entry) + 10),2,1); + stream = (int *)GHIDRA_UINT(*(ushort *)((char *)entry + 10)); ((Checksum *)(writer + 3))->Checksum::Update((byte *)&stream,2); return; } @@ -817,130 +817,130 @@ void GameState::write_entity_save_state(void *record, void *writer) local_14[0] = *(undefined4 *)record; (**(code **)(**(int **)writer + 0x1c))(); iStack_40 = 0x9c891d; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update(abStack_1c,4); - iStack_40 = (int)record + 4; + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update(abStack_1c,4); + iStack_40 = GHIDRA_INT(record) + 4; (**(code **)(**(int **)writer + 0x1c))(); puStack_4c = (undefined4 *)0x9c8941; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update(abStack_1c + -0xc,4); - puStack_4c = (undefined4 *)((int)record + 8); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update(abStack_1c + -0xc,4); + puStack_4c = (undefined4 *)(GHIDRA_INT(record) + 8); (**(code **)(**(int **)writer + 0x1c))(); puStack_34 = *(undefined4 **)((char *)record + 8); puStack_58 = (undefined4 *)0x9c8965; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&puStack_34,4); - puStack_58 = (undefined4 *)((int)record + 0xc); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&puStack_34,4); + puStack_58 = (undefined4 *)(GHIDRA_INT(record) + 0xc); (**(code **)(**(int **)writer + 0x1c))(); iStack_40 = *(undefined4 *)((char *)record + 0xc); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&iStack_40,4); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&iStack_40,4); (**(code **)(**(int **)writer + 0x1c))(); puStack_4c = *(undefined4 **)((char *)record + 0x10); uStack_70 = (undefined4 *)0x9c89ad; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&puStack_4c,4); - uStack_70 = (undefined4 *)((int)record + 0x14); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&puStack_4c,4); + uStack_70 = (undefined4 *)(GHIDRA_INT(record) + 0x14); (**(code **)(**(int **)writer + 0x1c))(); puStack_58 = *(undefined4 **)((char *)record + 0x14); iStack_7c = 0x9c89d1; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&puStack_58,4); - iStack_7c = (int)record + 0x60; + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&puStack_58,4); + iStack_7c = GHIDRA_INT(record) + 0x60; (**(code **)(**(int **)writer + 0x1c))(); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update(abStack_1c + -0x50,1); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update(abStack_1c + -0x50,1); (**(code **)(**(int **)writer + 0x1c))(); uStack_70 = *(undefined4 **)((char *)record + 0x18); uStack_94 = (undefined4 *)0x9c8a1a; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&uStack_70,4); - uStack_94 = (undefined4 *)((int)record + 0x1c); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&uStack_70,4); + uStack_94 = (undefined4 *)(GHIDRA_INT(record) + 0x1c); (**(code **)(**(int **)writer + 0x1c))(); iStack_7c = *(undefined4 *)((char *)record + 0x1c); iStack_a0 = 0x9c8a3e; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&iStack_7c,4); - iStack_a0 = (int)record + 0x22; + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&iStack_7c,4); + iStack_a0 = GHIDRA_INT(record) + 0x22; (**(code **)(**(int **)writer + 0x1c))(); puStack_ac = (undefined4 *)0x9c8a63; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update(abStack_1c + -0x74,1); - puStack_ac = (undefined4 *)((int)record + 0x24); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update(abStack_1c + -0x74,1); + puStack_ac = (undefined4 *)(GHIDRA_INT(record) + 0x24); (**(code **)(**(int **)writer + 0x1c))(); uStack_94 = *(undefined4 **)((char *)record + 0x24); puStack_b8 = (undefined4 *)0x9c8a87; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&uStack_94,4); - puStack_b8 = (undefined4 *)((int)record + 0x28); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&uStack_94,4); + puStack_b8 = (undefined4 *)(GHIDRA_INT(record) + 0x28); (**(code **)(**(int **)writer + 0x1c))(); iStack_a0 = *(undefined4 *)((char *)record + 0x28); puStack_c4 = (undefined4 *)0x9c8aaf; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&iStack_a0,4); - puStack_c4 = (undefined4 *)((int)record + 0x2c); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&iStack_a0,4); + puStack_c4 = (undefined4 *)(GHIDRA_INT(record) + 0x2c); (**(code **)(**(int **)writer + 0x1c))(); puStack_ac = *(undefined4 **)((char *)record + 0x2c); puStack_d0 = (undefined4 *)0x9c8ad7; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&puStack_ac,4); - puStack_d0 = (undefined4 *)((int)record + 0x30); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&puStack_ac,4); + puStack_d0 = (undefined4 *)(GHIDRA_INT(record) + 0x30); (**(code **)(**(int **)writer + 0x1c))(); puStack_b8 = *(undefined4 **)((char *)record + 0x30); puStack_dc = (undefined4 *)0x9c8afb; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&puStack_b8,4); - puStack_dc = (undefined4 *)((int)record + 0x34); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&puStack_b8,4); + puStack_dc = (undefined4 *)(GHIDRA_INT(record) + 0x34); (**(code **)(**(int **)writer + 0x1c))(); puStack_c4 = *(undefined4 **)((char *)record + 0x34); puStack_e8 = (undefined4 *)0x9c8b1f; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&puStack_c4,4); - puStack_e8 = (undefined4 *)((int)record + 0x38); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&puStack_c4,4); + puStack_e8 = (undefined4 *)(GHIDRA_INT(record) + 0x38); (**(code **)(**(int **)writer + 0x1c))(); puStack_d0 = *(undefined4 **)((char *)record + 0x38); puStack_f4 = (undefined4 *)0x9c8b43; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&puStack_d0,4); - puStack_f4 = (undefined4 *)((int)record + 0x3c); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&puStack_d0,4); + puStack_f4 = (undefined4 *)(GHIDRA_INT(record) + 0x3c); (**(code **)(**(int **)writer + 0x1c))(); puStack_dc = *(undefined4 **)((char *)record + 0x3c); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&puStack_dc,4); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&puStack_dc,4); (**(code **)(**(int **)writer + 0x1c))(); puStack_e8 = *(undefined4 **)((char *)record + 0x40); uStack_10c = (undefined4 *)0x9c8b8b; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&puStack_e8,4); - uStack_10c = (undefined4 *)((int)record + 0x48); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&puStack_e8,4); + uStack_10c = (undefined4 *)(GHIDRA_INT(record) + 0x48); (**(code **)(**(int **)writer + 0x1c))(); puStack_f4 = *(undefined4 **)((char *)record + 0x48); iStack_118 = 0x9c8bb6; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&puStack_f4,8); - iStack_118 = (int)record + 0x23; + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&puStack_f4,8); + iStack_118 = GHIDRA_INT(record) + 0x23; (**(code **)(**(int **)writer + 0x1c))(); puStack_124 = (undefined4 *)0x9c8bdb; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)((int)register0x00000010 + -0x108),1); - puStack_124 = (undefined4 *)((int)record + 0x50); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)(GHIDRA_INT(register0x00000010) + -0x108),1); + puStack_124 = (undefined4 *)(GHIDRA_INT(record) + 0x50); (**(code **)(**(int **)writer + 0x1c))(); uStack_10c = *(undefined4 **)((char *)record + 0x50); puStack_130 = (undefined4 *)0x9c8c03; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&uStack_10c,4); - puStack_130 = (undefined4 *)((int)record + 0x54); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&uStack_10c,4); + puStack_130 = (undefined4 *)(GHIDRA_INT(record) + 0x54); (**(code **)(**(int **)writer + 0x1c))(); iStack_118 = *(undefined4 *)((char *)record + 0x54); puStack_13c = (ushort *)0x9c8c2b; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&iStack_118,4); - puStack_13c = (ushort *)((int)record + 0x20); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&iStack_118,4); + puStack_13c = (ushort *)(GHIDRA_INT(record) + 0x20); (**(code **)(**(int **)writer + 0x1c))(); - puStack_124 = (undefined4 *)(uint)*(ushort *)((char *)record + 0x20); + puStack_124 = (undefined4 *)GHIDRA_UINT(*(ushort *)((char *)record + 0x20)); uStack_148 = (undefined4 *)0x9c8c50; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&puStack_124,2); - uStack_148 = (undefined4 *)((int)record + 0x58); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&puStack_124,2); + uStack_148 = (undefined4 *)(GHIDRA_INT(record) + 0x58); (**(code **)(**(int **)writer + 0x1c))(); puStack_130 = *(undefined4 **)((char *)record + 0x58); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&puStack_130,4); - (**(code **)(**(int **)writer + 0x1c))((undefined4 *)((int)record + 0x5c)); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&puStack_130,4); + (**(code **)(**(int **)writer + 0x1c))((undefined4 *)(GHIDRA_INT(record) + 0x5c)); puStack_13c = *(ushort **)((char *)record + 0x5c); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&puStack_13c,4); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&puStack_13c,4); puVar1 = uStack_148; - uStack_148 = (undefined4 *)((uint)uStack_148 & 0xffffff); + uStack_148 = (undefined4 *)(GHIDRA_UINT(uStack_148) & 0xffffff); isHasExtraData = *(int *)((char *)record + 100) != 0; if (isHasExtraData) { - uStack_148._0_3_ = SUB43(puVar1,0); + (*(undefined1 *)((char *)&(uStack_148) + 0x0)) = SUB43(puVar1,0); uStack_148 = (undefined4 *)CONCAT13(1,(undefined3)uStack_148); } if (*(int *)((char *)record + 0x6c) != 0) { uStack_148 = (undefined4 *)(CONCAT13(isHasExtraData,(undefined3)uStack_148) | 0x2000000); } - (**(code **)(**(int **)writer + 0x1c))((int)&uStack_148 + 3,1,1); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)((int)register0x00000010 + -0x150),1); + (**(code **)(**(int **)writer + 0x1c))(GHIDRA_INT(&uStack_148) + 3,1,1); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)(GHIDRA_INT(register0x00000010) + -0x150),1); extraData = *(byte **)((char *)record + 100); if (extraData != (byte *)0x0) { (**(code **)(**(int **)writer + 0x1c))(extraData,1,0x20); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update(extraData,0x20); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update(extraData,0x20); } if (*(void **)((char *)record + 0x6c) != (void *)0x0) { write_entity_save_state(*(void **)((char *)record + 0x6c),writer); @@ -970,21 +970,21 @@ byte GameState::write_room(void *roomConfigState, short *room, int *stream) writer = stream; write_entry(roomConfigState,stream); psVar5 = room; - local_8 = (uint)(ushort)*room; + local_8 = GHIDRA_UINT((ushort)*room); (**(code **)(*(int *)*writer + 0x1c))(&local_8,2,1); roomConfigState = (void *)(local_8 & 0xffff); ((Checksum *)(writer + 3))->Checksum::Update((byte *)&roomConfigState,2); - local_8 = (uint)(ushort)psVar5[2]; + local_8 = GHIDRA_UINT((ushort)psVar5[2]); (**(code **)(*(int *)*writer + 0x1c))(&local_8,2,1); roomConfigState = (void *)(local_8 & 0xffff); ((Checksum *)(writer + 3))->Checksum::Update((byte *)&roomConfigState,2); - local_8 = (uint)(ushort)psVar5[4]; + local_8 = GHIDRA_UINT((ushort)psVar5[4]); (**(code **)(*(int *)*writer + 0x1c))(&local_8,2,1); roomConfigState = (void *)(local_8 & 0xffff); ((Checksum *)(writer + 3))->Checksum::Update((byte *)&roomConfigState,2); - stream = (int *)CONCAT13((char)psVar5[6],stream._0_3_); - (**(code **)(*(int *)*writer + 0x1c))((int)&stream + 3,1,1); - roomConfigState = (void *)CONCAT31(roomConfigState._1_3_,stream._3_1_); + stream = (int *)CONCAT13((char)psVar5[6],(*(undefined1 *)((char *)&(stream) + 0x0))); + (**(code **)(*(int *)*writer + 0x1c))(GHIDRA_INT(&stream) + 3,1,1); + roomConfigState = (void *)CONCAT31((*(undefined1 *)((char *)&(roomConfigState) + 0x1)),(*(undefined1 *)((char *)&(stream) + 0x3))); ((Checksum *)(writer + 3))->Checksum::Update((byte *)&roomConfigState,1); allowedDoors = *(int **)(psVar5 + 0xc); (**(code **)(*(int *)*writer + 0x1c))(&allowedDoors,4,1); @@ -1006,11 +1006,11 @@ byte GameState::write_room(void *roomConfigState, short *room, int *stream) ((Checksum *)(writer + 3))->Checksum::Update((byte *)&stream,4); puVar4 = (ushort *)(room + 0x25); (**(code **)(*(int *)*writer + 0x1c))(puVar4,2,1); - stream = (int *)(uint)*puVar4; + stream = (int *)GHIDRA_UINT(*puVar4); ((Checksum *)(writer + 3))->Checksum::Update((byte *)&stream,2); puVar4 = (ushort *)(room + 0x24); (**(code **)(*(int *)*writer + 0x1c))(puVar4,2,1); - stream = (int *)(uint)*puVar4; + stream = (int *)GHIDRA_UINT(*puVar4); ((Checksum *)(writer + 3))->Checksum::Update((byte *)&stream,2); psVar5 = room + 0x26; (**(code **)(*(int *)*writer + 0x1c))(psVar5,4,1); @@ -1042,7 +1042,7 @@ byte GameState::write_room(void *roomConfigState, short *room, int *stream) gridEntityType = *puVar2; stream = (int *)(gridEntityType & 0xffff); (**(code **)(*(int *)*writer + 0x1c))(&stream,2,1); - gridTypeShort = (uint)stream & 0xffff; + gridTypeShort = GHIDRA_UINT(stream) & 0xffff; ((Checksum *)(writer + 3))->Checksum::Update((byte *)&gridTypeShort,2); if (gridEntityType != 0) { (**(code **)(*(int *)*writer + 0x1c))(puVar2 + 1,4,1); @@ -1051,9 +1051,9 @@ byte GameState::write_room(void *roomConfigState, short *room, int *stream) (**(code **)(*(int *)*writer + 0x1c))(puVar2 + 2,4,1); stream = (int *)puVar2[2]; ((Checksum *)(writer + 3))->Checksum::Update((byte *)&stream,4); - roomConfigState = (void *)(uint)(ushort)puVar2[3]; + roomConfigState = (void *)GHIDRA_UINT((ushort)puVar2[3]); (**(code **)(*(int *)*writer + 0x1c))(&roomConfigState,2,1); - stream = (int *)((uint)roomConfigState & 0xffff); + stream = (int *)(GHIDRA_UINT(roomConfigState) & 0xffff); ((Checksum *)(writer + 3))->Checksum::Update((byte *)&stream,2); (**(code **)(*(int *)*writer + 0x1c))(puVar2 + 4,4,1); stream = (int *)puVar2[4]; @@ -1078,7 +1078,7 @@ byte GameState::write_room(void *roomConfigState, short *room, int *stream) do { write_entity_save_state((void *)(*(int *)(psVar5 + 0x3a) + saveStateOffset),writer); saveStateOffset = saveStateOffset + 0x78; - stream = (int *)((int)stream + 1); + stream = (int *)(GHIDRA_INT(stream) + 1); } while (stream < savedEntityCount); } piVar3 = writer + 3; @@ -1110,16 +1110,16 @@ byte GameState::write_room(void *roomConfigState, short *room, int *stream) do { write_entity_save_state((void *)(*(int *)(psVar5 + 0x44) + saveStateOffset),writer); saveStateOffset = saveStateOffset + 0x78; - stream = (int *)((int)stream + 1); + stream = (int *)(GHIDRA_INT(stream) + 1); } while (stream < savedEffectCount); } piVar3 = writer + 3; (**(code **)(*(int *)*writer + 0x1c))(psVar5 + 0x57,2,1); - stream = (int *)(uint)(ushort)psVar5[0x57]; + stream = (int *)GHIDRA_UINT((ushort)psVar5[0x57]); ((Checksum *)(piVar3))->Checksum::Update((byte *)&stream,2); puVar4 = (ushort *)(room + 0x56); (**(code **)(*(int *)*writer + 0x1c))(puVar4,2,1); - stream = (int *)(uint)*puVar4; + stream = (int *)GHIDRA_UINT(*puVar4); ((Checksum *)(piVar3))->Checksum::Update((byte *)&stream,2); pbVar6 = (byte *)(room + 0x4a); (**(code **)(*(int *)*writer + 0x1c))(pbVar6,2,8); @@ -1133,7 +1133,7 @@ byte GameState::write_room(void *roomConfigState, short *room, int *stream) ((Checksum *)(piVar3))->Checksum::Update((byte *)&stream,4); puVar4 = (ushort *)(room + 0x29); (**(code **)(*(int *)*writer + 0x1c))(puVar4,2,1); - room = (short *)(uint)*puVar4; + room = (short *)GHIDRA_UINT(*puVar4); ((Checksum *)(piVar3))->Checksum::Update((byte *)&room,2); return 1; } @@ -1181,7 +1181,7 @@ byte GameState::write(void **gameStateIO) local_8 = 0xffffffff; puStack_c = &LAB_00b0f2d0; local_10 = ExceptionList; - blobLength = __security_cookie ^ (uint)(bitmask + 0x20); + blobLength = __security_cookie ^ GHIDRA_UINT((bitmask + 0x20)); ExceptionList = &local_10; self = this; local_18 = blobLength; @@ -1207,12 +1207,12 @@ byte GameState::write(void **gameStateIO) ((Checksum *)(gameStateIO + 3))->Checksum::Update((byte *)&local_450,4); puVar4 = &(*(undefined1 *)((char *)(self) + 0xc)); (**(code **)(*(int *)*gameStateIO + 0x1c))(puVar4,2,1); - local_450 = (int *)(uint)*(ushort *)puVar4; + local_450 = (int *)GHIDRA_UINT(*(ushort *)puVar4); ((Checksum *)(gameStateIO + 3))->Checksum::Update((byte *)&local_450,2); blobLength = *(ushort *)puVar4; puVar4 = &(*(undefined1 *)((char *)(self) + 0xe)); - (**(code **)(*(int *)*gameStateIO + 0x1c))(puVar4,1,(uint)blobLength); - ((Checksum *)(gameStateIO + 3))->Checksum::Update(puVar4,(uint)blobLength); + (**(code **)(*(int *)*gameStateIO + 0x1c))(puVar4,1,GHIDRA_UINT(blobLength)); + ((Checksum *)(gameStateIO + 3))->Checksum::Update(puVar4,GHIDRA_UINT(blobLength)); puVar4 = &(*(undefined1 *)((char *)(self) + 0x44)); (**(code **)(*(int *)*gameStateIO + 0x1c))(puVar4,4,1); local_450 = *(int **)puVar4; @@ -1344,13 +1344,13 @@ byte GameState::write(void **gameStateIO) ((Checksum *)(gameStateIO + 3))->Checksum::Update(local_44c,1); puVar4 = &(*(undefined1 *)((char *)(self) + 0x108)); (**(code **)(*(int *)*gameStateIO + 0x1c))(puVar4,2,1); - local_450 = (int *)(uint)*(ushort *)puVar4; + local_450 = (int *)GHIDRA_UINT(*(ushort *)puVar4); ((Checksum *)(gameStateIO + 3))->Checksum::Update((byte *)&local_450,2); blobLength = *(ushort *)puVar4; puVar4 = &(*(undefined1 *)((char *)(self) + 0x10a)); - (**(code **)(*(int *)*gameStateIO + 0x1c))(puVar4,1,(uint)blobLength); + (**(code **)(*(int *)*gameStateIO + 0x1c))(puVar4,1,GHIDRA_UINT(blobLength)); checksumState = gameStateIO + 3; - ((Checksum *)(checksumState))->Checksum::Update(puVar4,(uint)blobLength); + ((Checksum *)(checksumState))->Checksum::Update(puVar4,GHIDRA_UINT(blobLength)); puVar4 = &(*(undefined1 *)((char *)(self) + 0x124)); (**(code **)(*(int *)*gameStateIO + 0x1c))(puVar4,4,1); local_450 = *(int **)puVar4; @@ -1378,7 +1378,7 @@ byte GameState::write(void **gameStateIO) ((Checksum *)(checksumState))->Checksum::Update((byte *)&local_450,4); state = self; dwordPtr = dwordPtr + 1; - local_45c = (int *)((int)local_45c + -1); + local_45c = (int *)(GHIDRA_INT(local_45c) + -1); } while (local_45c != (int *)0x0); local_45c = *(int **)&(*(undefined1 *)((char *)(self) + 0x1952c)); (**(code **)(*(int *)*gameStateIO + 0x1c))(&local_45c,4,1); @@ -1389,7 +1389,7 @@ byte GameState::write(void **gameStateIO) do { local_434 = *(std_string **)&(*(undefined1 *)((char *)(state) + 0x19528)); write_entry(*(int **)(*(int *)&(*(undefined1 *)((char *)(state) + 0x19520)) + - ((int)local_434 + blobLength & *(int *)&(*(undefined1 *)((char *)(state) + 0x19524)) - 1U) * 4), + (GHIDRA_INT(local_434) + blobLength & *(int *)&(*(undefined1 *)((char *)(state) + 0x19524)) - 1U) * 4), (int *)gameStateIO); blobLength = blobLength + 1; } while (blobLength < *(uint *)&(*(undefined1 *)((char *)(state) + 0x1952c))); @@ -1405,8 +1405,8 @@ byte GameState::write(void **gameStateIO) do { write_room(checksum,fieldPtr,(int *)gameStateIO); fieldPtr = fieldPtr + 0x5c; - local_45c = (int *)((int)local_45c + 1); - checksum = (void *)((int)checksum + 0xc); + local_45c = (int *)(GHIDRA_INT(local_45c) + 1); + checksum = (void *)(GHIDRA_INT(checksum) + 0xc); } while (local_45c < (int *)*local_460); state = self; } @@ -1417,8 +1417,8 @@ byte GameState::write(void **gameStateIO) do { write_room(checksum,fieldPtr,(int *)gameStateIO); fieldPtr = fieldPtr + 0x5c; - checksum = (void *)((int)checksum + 0xc); - local_45c = (int *)((int)local_45c + -1); + checksum = (void *)(GHIDRA_INT(checksum) + 0xc); + local_45c = (int *)(GHIDRA_INT(local_45c) + -1); } while (local_45c != (int *)0x0); puVar3 = (uint *)0x0; emptyRun = 0; @@ -1432,28 +1432,28 @@ byte GameState::write(void **gameStateIO) } else { if (emptyRun != 0) { - blobLength = (uint)puVar3 & 0xffff; - puVar3 = (uint *)((int)puVar3 + 1); + blobLength = GHIDRA_UINT(puVar3) & 0xffff; + puVar3 = (uint *)(GHIDRA_INT(puVar3) + 1); packedList[blobLength] = emptyRun - 1U | 0x8000; emptyRun = 0; } - blobLength = (uint)puVar3 & 0xffff; - puVar3 = (uint *)((int)puVar3 + 1); + blobLength = GHIDRA_UINT(puVar3) & 0xffff; + puVar3 = (uint *)(GHIDRA_INT(puVar3) + 1); packedList[blobLength] = (ushort)iVar1; local_460 = puVar3; } piVar5 = piVar5 + 1; checksumState = gameStateIO + 3; - local_45c = (int *)((int)local_45c + -1); + local_45c = (int *)(GHIDRA_INT(local_45c) + -1); } while (local_45c != (int *)0x0); if (emptyRun != 0) { - local_460 = (uint *)((int)puVar3 + 1); - packedList[(uint)puVar3 & 0xffff] = emptyRun - 1U | 0x8000; + local_460 = (uint *)(GHIDRA_INT(puVar3) + 1); + packedList[GHIDRA_UINT(puVar3) & 0xffff] = emptyRun - 1U | 0x8000; } (**(code **)(*(int *)*gameStateIO + 0x1c))(&local_460,2,1); - local_450 = (int *)((uint)local_460 & 0xffff); + local_450 = (int *)(GHIDRA_UINT(local_460) & 0xffff); ((Checksum *)(checksumState))->Checksum::Update((byte *)&local_450,2); - blobLength = (uint)local_460 & 0xffff; + blobLength = GHIDRA_UINT(local_460) & 0xffff; (**(code **)(*(int *)*gameStateIO + 0x1c))(packedList,2,blobLength); ((Checksum *)(checksumState))->Checksum::Update((byte *)packedList,blobLength * 2); puVar4 = &(*(undefined1 *)((char *)(self) + 0x19d1c)); @@ -1562,9 +1562,9 @@ byte GameState::write(void **gameStateIO) checksum = &(*(undefined1 *)((char *)(state) + 0x19d7c)); do { write_player(checksum,gameStateIO); - checksum = (void *)((int)checksum + 0x5dc); - local_45c = (int *)((int)local_45c + 1); - } while ((int)local_45c < *(int *)&(*(undefined1 *)((char *)(state) + 0x19d78))); + checksum = (void *)(GHIDRA_INT(checksum) + 0x5dc); + local_45c = (int *)(GHIDRA_INT(local_45c) + 1); + } while (GHIDRA_INT(local_45c) < *(int *)&(*(undefined1 *)((char *)(state) + 0x19d78))); } checksumState = gameStateIO + 3; tmpByte = 4; @@ -1588,7 +1588,7 @@ byte GameState::write(void **gameStateIO) write_player(local_45c,gameStateIO); } local_45c = local_45c + 0x177; - local_460 = (uint *)((int)local_460 + -1); + local_460 = (uint *)(GHIDRA_INT(local_460) + -1); } while (local_460 != (uint *)0x0); write_item_pool(&(*(undefined1 *)((char *)(state) + 0x1e3cc)),gameStateIO); blobLength = *(uint *)&(*(undefined1 *)((char *)(state) + 0x1e728)); @@ -1606,12 +1606,12 @@ byte GameState::write(void **gameStateIO) ((Checksum *)(checksumState))->Checksum::Update((byte *)seedStrBuf,9); local_8 = 0xffffffff; if (0xf < local_434) { - blobLength = (int)local_434 + 1; + blobLength = GHIDRA_INT(local_434) + 1; seedStrBuf = local_448[0]; if (0xfff < blobLength) { seedStrBuf = (std_string *)local_448[0][-1]._capacity; - blobLength = (int)local_434 + 0x24; - if (0x1f < (uint)((int)local_448[0] + (-4 - (int)seedStrBuf))) { + blobLength = GHIDRA_INT(local_434) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_448[0]) + (-4 - GHIDRA_INT(seedStrBuf))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1634,11 +1634,11 @@ byte GameState::write(void **gameStateIO) local_450 = piVar5; std::set::find_node(local_448 + 3,&local_450); if (((*(char *)((char *)local_434 + 0xd) == '\0') && - (*(int *)((char *)local_434 + 0x10) <= (int)piVar5)) && + (*(int *)((char *)local_434 + 0x10) <= GHIDRA_INT(piVar5))) && (local_434 != (std_string *)*(uint *)&(*(undefined1 *)((char *)(state) + 0x1e778)))) { - bitmask[(uint)piVar5 >> 3] = bitmask[(uint)piVar5 >> 3] | (byte)(1 << ((uint)piVar5 & 7)); + bitmask[GHIDRA_UINT(piVar5) >> 3] = bitmask[GHIDRA_UINT(piVar5) >> 3] | (byte)(1 << (GHIDRA_UINT(piVar5) & 7)); } - piVar5 = (int *)((int)piVar5 + 1); + piVar5 = (int *)(GHIDRA_INT(piVar5) + 1); } while (piVar5 < (int *)0x50); (**(code **)(*(int *)*gameStateIO + 0x1c))(&DAT_00b7f865,1,1); local_44c[0] = 10; @@ -1666,7 +1666,7 @@ byte GameState::write(void **gameStateIO) local_45c = (int *)0x0; if (*(int *)&(*(undefined1 *)((char *)(state) + 0x1e7a0)) - *(int *)&(*(undefined1 *)((char *)(state) + 0x1e79c)) >> 3 != 0) { do { - iVar1 = (int)local_45c * 8; + iVar1 = GHIDRA_INT(local_45c) * 8; dwordPtr = (undefined4 *)(*(int *)&(*(undefined1 *)((char *)(state) + 0x1e79c)) + iVar1); (**(code **)(*(int *)*gameStateIO + 0x1c))(dwordPtr,4,1); local_450 = (int *)*dwordPtr; @@ -1675,7 +1675,7 @@ byte GameState::write(void **gameStateIO) (**(code **)(*(int *)*gameStateIO + 0x1c))(piVar5,4,1); local_450 = (int *)*piVar5; ((Checksum *)(gameStateIO + 3))->Checksum::Update((byte *)&local_450,4); - local_45c = (int *)((int)local_45c + 1); + local_45c = (int *)(GHIDRA_INT(local_45c) + 1); state = self; } while (local_45c < (int *)(*(int *)&(*(undefined1 *)((char *)(self) + 0x1e7a0)) - *(int *)&(*(undefined1 *)((char *)(self) + 0x1e79c)) >> 3)); } @@ -1684,7 +1684,7 @@ byte GameState::write(void **gameStateIO) write_bool_vector(gameStateIO,&(*(undefined1 *)((char *)(state) + 0x1e714))); local_45c = (int *)0x25; (**(code **)(*(int *)*gameStateIO + 0x1c))(&local_45c,2,1); - local_450 = (int *)((uint)local_45c & 0xffff); + local_450 = (int *)(GHIDRA_UINT(local_45c) & 0xffff); ((Checksum *)(checksumState))->Checksum::Update((byte *)&local_450,2); local_45c = (int *)0x25; puVar3 = local_460; @@ -1693,7 +1693,7 @@ byte GameState::write(void **gameStateIO) local_450 = (int *)*puVar3; ((Checksum *)(checksumState))->Checksum::Update((byte *)&local_450,4); puVar3 = puVar3 + 1; - local_45c = (int *)((int)local_45c + -1); + local_45c = (int *)(GHIDRA_INT(local_45c) + -1); } while (local_45c != (int *)0x0); puVar4 = &(*(undefined1 *)((char *)(self) + 0x1e78c)); (**(code **)(*(int *)*gameStateIO + 0x1c))(puVar4,4,1); @@ -1702,7 +1702,7 @@ byte GameState::write(void **gameStateIO) state = self; piVar5 = *(int **)&(*(undefined1 *)((char *)(self) + 0x1e794)); local_45c = (int *)&(*(undefined1 *)((char *)(self) + 0x1e790)); - if ((uint)(((int)piVar5 - *local_45c) / 0xc) < 0x100) { + if (GHIDRA_UINT(((GHIDRA_INT(piVar5) - *local_45c) / 0xc)) < 0x100) { local_450 = piVar5; } else { @@ -1710,7 +1710,7 @@ byte GameState::write(void **gameStateIO) vector12_resize(&(*(undefined1 *)((char *)(self) + 0x1e790)),0xff); piVar5 = *(int **)&(*(undefined1 *)((char *)(state) + 0x1e794)); } - tmpByte = (byte)(((int)piVar5 - *(int *)&(*(undefined1 *)((char *)(state) + 0x1e790))) / 0xc); + tmpByte = (byte)((GHIDRA_INT(piVar5) - *(int *)&(*(undefined1 *)((char *)(state) + 0x1e790))) / 0xc); (**(code **)(*(int *)*gameStateIO + 0x1c))(&tmpByte,1,1); local_44c[0] = tmpByte; ((Checksum *)(checksumState))->Checksum::Update(local_44c,1); @@ -1720,30 +1720,30 @@ byte GameState::write(void **gameStateIO) if (listBytes / 0xc + iVar1 != iVar1) { local_460 = (uint *)0x0; do { - puVar3 = (uint *)(*local_45c + (int)local_460); + puVar3 = (uint *)(*local_45c + GHIDRA_INT(local_460)); (**(code **)(*(int *)*gameStateIO + 0x1c))(puVar3,4,1); local_434 = (std_string *)*puVar3; ((Checksum *)(checksumState))->Checksum::Update((byte *)(local_448 + 5),4); - puVar3 = (uint *)((int)local_460 + *local_45c + 4); + puVar3 = (uint *)(GHIDRA_INT(local_460) + *local_45c + 4); (**(code **)(*(int *)*gameStateIO + 0x1c))(puVar3,4,1); local_434 = (std_string *)*puVar3; ((Checksum *)(checksumState))->Checksum::Update((byte *)(local_448 + 5),4); - puVar3 = (uint *)((int)local_460 + *local_45c + 8); + puVar3 = (uint *)(GHIDRA_INT(local_460) + *local_45c + 8); (**(code **)(*(int *)*gameStateIO + 0x1c))(puVar3,4,1); local_434 = (std_string *)*puVar3; ((Checksum *)(checksumState))->Checksum::Update((byte *)(local_448 + 5),4); local_460 = local_460 + 3; - local_450 = (int *)((int)local_450 + 1); + local_450 = (int *)(GHIDRA_INT(local_450) + 1); } while (local_450 < (int *)((local_45c[1] - *local_45c) / 0xc)); state = self; } - local_450 = (int *)(uint)*(ushort *)&(*(undefined1 *)((char *)(state) + 0x1e7a8)); + local_450 = (int *)GHIDRA_UINT(*(ushort *)&(*(undefined1 *)((char *)(state) + 0x1e7a8))); (**(code **)(*(int *)*gameStateIO + 0x1c))(&local_450,2,1); - local_434 = (std_string *)((uint)local_450 & 0xffff); + local_434 = (std_string *)(GHIDRA_UINT(local_450) & 0xffff); ((Checksum *)(checksumState))->Checksum::Update((byte *)(local_448 + 5),2); - local_450 = (int *)(uint)*(ushort *)&(*(undefined1 *)((char *)(state) + 0x1e7ac)); + local_450 = (int *)GHIDRA_UINT(*(ushort *)&(*(undefined1 *)((char *)(state) + 0x1e7ac))); (**(code **)(*(int *)*gameStateIO + 0x1c))(&local_450,2,1); - local_434 = (std_string *)((uint)local_450 & 0xffff); + local_434 = (std_string *)(GHIDRA_UINT(local_450) & 0xffff); ((Checksum *)(checksumState))->Checksum::Update((byte *)(local_448 + 5),2); (**(code **)(*(int *)*gameStateIO + 0x1c))(&(*(undefined1 *)((char *)(state) + 0x1e7b0)),1,1); local_44c[0] = (*(undefined1 *)((char *)(state) + 0x1e7b0)); @@ -1783,11 +1783,11 @@ byte GameState::write(void **gameStateIO) local_44c[0] = *stageBlock; ((Checksum *)(checksumState))->Checksum::Update(local_44c,1); stageBlock = stageBlock + 800; - local_450 = (int *)((int)local_450 + -1); + local_450 = (int *)(GHIDRA_INT(local_450) + -1); } while (local_450 != (int *)0x0); puVar4 = &(*(undefined1 *)((char *)(self) + 0x1fd94)); (**(code **)(*(int *)*gameStateIO + 0x1c))(puVar4,2,1); - local_434 = (std_string *)(uint)*(ushort *)puVar4; + local_434 = (std_string *)GHIDRA_UINT(*(ushort *)puVar4); ((Checksum *)(checksumState))->Checksum::Update((byte *)(local_448 + 5),2); state = self; write_int_vector((GameState *)gameStateIO,&(*(undefined1 *)((char *)(self) + 0x1fd98))); @@ -1799,17 +1799,17 @@ byte GameState::write(void **gameStateIO) if ((gameStateIO[6] == (void *)0x0) && (pendingByteCount = *(byte *)(gameStateIO + 4), pendingByteCount != 0)) { if (pendingByteCount < 4) { - memset((void *)((uint)pendingByteCount + (int)checksumState),0, - (uint)(byte)(4 - pendingByteCount)); + memset((void *)(GHIDRA_UINT(pendingByteCount) + GHIDRA_INT(checksumState)),0, + GHIDRA_UINT((byte)(4 - pendingByteCount))); } *(undefined1 *)(gameStateIO + 4) = 0; gameStateIO[5] = - (void *)(((uint)gameStateIO[5] >> 1) + (int)gameStateIO[5] * -0x80000000 + - (int)*checksumState); + (void *)((GHIDRA_UINT(gameStateIO[5]) >> 1) + GHIDRA_INT(gameStateIO[5]) * -0x80000000 + + GHIDRA_INT(*checksumState)); } checksum = gameStateIO[5]; *(void **)&(*(undefined1 *)((char *)(state) + 0x1fda4)) = checksum; - encodedChecksum = (uint)checksum ^ 0x96696996; + encodedChecksum = GHIDRA_UINT(checksum) ^ 0x96696996; (**(code **)(*(int *)state->_saveFile + 0x1c))(&encodedChecksum,4,1); ExceptionList = local_10; return 1; @@ -1847,7 +1847,7 @@ byte GameState::read_player(void *unused, void *player, void *stream) local_8 = 0xffffffff; puStack_c = &LAB_00b0f300; local_10 = ExceptionList; - uStack_60 = __security_cookie ^ (uint)(tmpShort + 0xc); + uStack_60 = __security_cookie ^ GHIDRA_UINT((tmpShort + 0xc)); local_14 = (undefined1 *)&uStack_60; ExceptionList = &local_10; savedState = this; @@ -1862,144 +1862,144 @@ byte GameState::read_player(void *unused, void *player, void *stream) if (*(uint *)((char *)stream_00 + 8) < 0x7d) { (**(code **)(**(int **)stream_00 + 0x14))(player,4,1); stream = *(void **)pvVar5; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); - puVar3 = (undefined4 *)((int)pvVar5 + 4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); + puVar3 = (undefined4 *)(GHIDRA_INT(pvVar5) + 4); (**(code **)(**(int **)stream_00 + 0x14))(puVar3,4,1); stream = (void *)*puVar3; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); - puVar3 = (undefined4 *)((int)player + 8); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); + puVar3 = (undefined4 *)(GHIDRA_INT(player) + 8); (**(code **)(**(int **)stream_00 + 0x14))(puVar3,4,1); stream = (void *)*puVar3; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); iVar1 = 0; pvVar5 = player; } else { (**(code **)(**(int **)stream_00 + 0x14))(tmpShort,2,1); - unused = (void *)(uint)tmpShort[0]; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&unused,2); + unused = (void *)GHIDRA_UINT(tmpShort[0]); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&unused,2); pvVar5 = player; - *(int *)player = (int)(short)tmpShort[0]; + *(int *)player = GHIDRA_INT((short)tmpShort[0]); (**(code **)(**(int **)stream_00 + 0x14))(tmpShort,2,1); - unused = (void *)(uint)tmpShort[0]; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&unused,2); - *(int *)((char *)pvVar5 + 4) = (int)(short)tmpShort[0]; + unused = (void *)GHIDRA_UINT(tmpShort[0]); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&unused,2); + *(int *)((char *)pvVar5 + 4) = GHIDRA_INT((short)tmpShort[0]); (**(code **)(**(int **)stream_00 + 0x14))(tmpShort,2,1); - unused = (void *)(uint)tmpShort[0]; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&unused,2); - *(int *)((char *)pvVar5 + 8) = (int)(short)tmpShort[0]; - (**(code **)(**(int **)stream_00 + 0x14))((int)&stream + 3,1,1); - unused = (void *)CONCAT31(unused._1_3_,stream._3_1_); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&unused,1); - iVar1 = (int)stream._3_1_; + unused = (void *)GHIDRA_UINT(tmpShort[0]); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&unused,2); + *(int *)((char *)pvVar5 + 8) = GHIDRA_INT((short)tmpShort[0]); + (**(code **)(**(int **)stream_00 + 0x14))(GHIDRA_INT(&stream) + 3,1,1); + unused = (void *)CONCAT31((*(undefined1 *)((char *)&(unused) + 0x1)),(*(undefined1 *)((char *)&(stream) + 0x3))); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&unused,1); + iVar1 = (*(undefined1 *)((char *)&(GHIDRA_INT(stream)) + 0x3)); } *(int *)((char *)pvVar5 + 0xc) = iVar1; (**(code **)(**(int **)stream_00 + 0x14))(&local_34,4,1); stream = local_34; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); - *(uint *)((char *)pvVar5 + 0x18) = (uint)local_34 & 0xff; + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); + *(uint *)((char *)pvVar5 + 0x18) = GHIDRA_UINT(local_34) & 0xff; local_50._shift3 = 0; - (**(code **)(**(int **)stream_00 + 0x14))((byte *)((int)pvVar5 + 0x1c),4,8); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)((int)pvVar5 + 0x1c),0x20); - puVar3 = (undefined4 *)((int)player + 0x3c); + (**(code **)(**(int **)stream_00 + 0x14))((byte *)(GHIDRA_INT(pvVar5) + 0x1c),4,8); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)(GHIDRA_INT(pvVar5) + 0x1c),0x20); + puVar3 = (undefined4 *)(GHIDRA_INT(player) + 0x3c); (**(code **)(**(int **)stream_00 + 0x14))(puVar3,4,1); stream = (void *)*puVar3; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); - puVar3 = (undefined4 *)((int)player + 0x40); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); + puVar3 = (undefined4 *)(GHIDRA_INT(player) + 0x40); (**(code **)(**(int **)stream_00 + 0x14))(puVar3,4,1); stream = (void *)*puVar3; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); pvVar5 = player; - local_20 = (uint *)((int)player + 0x44); + local_20 = (uint *)(GHIDRA_INT(player) + 0x44); if (*(uint *)&(*(undefined1 *)((char *)(savedState) + 0x1fdf0)) < 0x3f) { *local_20 = 0; - (**(code **)(**(int **)stream_00 + 0x14))((int)&stream + 3,1,1); - unused = (void *)CONCAT31(unused._1_3_,stream._3_1_); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&unused,1); - if (stream._3_1_ != '\0') { + (**(code **)(**(int **)stream_00 + 0x14))(GHIDRA_INT(&stream) + 3,1,1); + unused = (void *)CONCAT31((*(undefined1 *)((char *)&(unused) + 0x1)),(*(undefined1 *)((char *)&(stream) + 0x3))); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&unused,1); + if ((*(undefined1 *)((char *)&(stream) + 0x3)) != '\0') { *(uint *)((char *)pvVar5 + 0x44) = *(uint *)((char *)pvVar5 + 0x44) | 1; } - (**(code **)(**(int **)stream_00 + 0x14))((ushort *)((int)pvVar5 + 0x4a),4,1); - unused = (void *)(uint)*(ushort *)((char *)pvVar5 + 0x4a); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&unused,4); - (**(code **)(**(int **)stream_00 + 0x14))((int)&stream + 3,1,1); - unused = (void *)CONCAT31(unused._1_3_,stream._3_1_); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&unused,1); + (**(code **)(**(int **)stream_00 + 0x14))((ushort *)(GHIDRA_INT(pvVar5) + 0x4a),4,1); + unused = (void *)GHIDRA_UINT(*(ushort *)((char *)pvVar5 + 0x4a)); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&unused,4); + (**(code **)(**(int **)stream_00 + 0x14))(GHIDRA_INT(&stream) + 3,1,1); + unused = (void *)CONCAT31((*(undefined1 *)((char *)&(unused) + 0x1)),(*(undefined1 *)((char *)&(stream) + 0x3))); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&unused,1); puVar4 = local_20; - if (stream._3_1_ != '\0') { + if ((*(undefined1 *)((char *)&(stream) + 0x3)) != '\0') { *local_20 = *local_20 | 2; } - (**(code **)(**(int **)stream_00 + 0x14))((int)&stream + 3,1,1); - unused = (void *)CONCAT31(unused._1_3_,stream._3_1_); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&unused,1); - if (stream._3_1_ != '\0') { + (**(code **)(**(int **)stream_00 + 0x14))(GHIDRA_INT(&stream) + 3,1,1); + unused = (void *)CONCAT31((*(undefined1 *)((char *)&(unused) + 0x1)),(*(undefined1 *)((char *)&(stream) + 0x3))); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&unused,1); + if ((*(undefined1 *)((char *)&(stream) + 0x3)) != '\0') { *puVar4 = *puVar4 | 4; } - (**(code **)(**(int **)stream_00 + 0x14))((int)&stream + 3,1,1); - unused = (void *)CONCAT31(unused._1_3_,stream._3_1_); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&unused,1); - if (stream._3_1_ != '\0') { + (**(code **)(**(int **)stream_00 + 0x14))(GHIDRA_INT(&stream) + 3,1,1); + unused = (void *)CONCAT31((*(undefined1 *)((char *)&(unused) + 0x1)),(*(undefined1 *)((char *)&(stream) + 0x3))); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&unused,1); + if ((*(undefined1 *)((char *)&(stream) + 0x3)) != '\0') { *puVar4 = *puVar4 | 8; } - (**(code **)(**(int **)stream_00 + 0x14))((int)&stream + 3,1,1); - unused = (void *)CONCAT31(unused._1_3_,stream._3_1_); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&unused,1); - if (stream._3_1_ != '\0') { + (**(code **)(**(int **)stream_00 + 0x14))(GHIDRA_INT(&stream) + 3,1,1); + unused = (void *)CONCAT31((*(undefined1 *)((char *)&(unused) + 0x1)),(*(undefined1 *)((char *)&(stream) + 0x3))); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&unused,1); + if ((*(undefined1 *)((char *)&(stream) + 0x3)) != '\0') { *puVar4 = *puVar4 | 0x10; } if (0x3c < *(uint *)((char *)stream_00 + 8)) { - puVar3 = (undefined4 *)((int)player + 0x4c); + puVar3 = (undefined4 *)(GHIDRA_INT(player) + 0x4c); (**(code **)(**(int **)stream_00 + 0x14))(puVar3,4,1); unused = (void *)*puVar3; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&unused,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&unused,4); } - (**(code **)(**(int **)stream_00 + 0x14))((int)&stream + 3,1,1); - unused = (void *)CONCAT31(unused._1_3_,stream._3_1_); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&unused,1); - if (stream._3_1_ != '\0') { + (**(code **)(**(int **)stream_00 + 0x14))(GHIDRA_INT(&stream) + 3,1,1); + unused = (void *)CONCAT31((*(undefined1 *)((char *)&(unused) + 0x1)),(*(undefined1 *)((char *)&(stream) + 0x3))); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&unused,1); + if ((*(undefined1 *)((char *)&(stream) + 0x3)) != '\0') { *local_20 = *local_20 | 0x20; } } else { (**(code **)(**(int **)stream_00 + 0x14))(local_20,4); stream = *(void **)((char *)pvVar5 + 0x44); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); stream = *(void **)(**(int **)stream_00 + 0x14); if (*(uint *)&(*(undefined1 *)((char *)(savedState) + 0x1fdf0)) < 0x82) { (*stream)(&unused,4,1); stream = unused; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); - *(undefined2 *)((char *)pvVar5 + 0x4a) = unused._0_2_; + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); + *(undefined2 *)((char *)pvVar5 + 0x4a) = (*(undefined2 *)((char *)&(unused) + 0x0)); *(undefined2 *)((char *)pvVar5 + 0x48) = 0; } else { - (*stream)((int)pvVar5 + 0x4a,2); - stream = (void *)(uint)*(ushort *)((char *)pvVar5 + 0x4a); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,2); - (**(code **)(**(int **)stream_00 + 0x14))((int)pvVar5 + 0x48,2,1); - stream = (void *)(uint)*(ushort *)((char *)pvVar5 + 0x48); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,2); + (*stream)(GHIDRA_INT(pvVar5) + 0x4a,2); + stream = (void *)GHIDRA_UINT(*(ushort *)((char *)pvVar5 + 0x4a)); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,2); + (**(code **)(**(int **)stream_00 + 0x14))(GHIDRA_INT(pvVar5) + 0x48,2,1); + stream = (void *)GHIDRA_UINT(*(ushort *)((char *)pvVar5 + 0x48)); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,2); } - (**(code **)(**(int **)stream_00 + 0x14))((undefined4 *)((int)pvVar5 + 0x4c),4,1); + (**(code **)(**(int **)stream_00 + 0x14))((undefined4 *)(GHIDRA_INT(pvVar5) + 0x4c),4,1); stream = *(void **)((char *)pvVar5 + 0x4c); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); } - puVar3 = (undefined4 *)((int)player + 0x54); + puVar3 = (undefined4 *)(GHIDRA_INT(player) + 0x54); (**(code **)(**(int **)stream_00 + 0x14))(puVar3,4,1); stream = (void *)*puVar3; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); - puVar3 = (undefined4 *)((int)player + 0x58); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); + puVar3 = (undefined4 *)(GHIDRA_INT(player) + 0x58); (**(code **)(**(int **)stream_00 + 0x14))(puVar3,4,1); stream = (void *)*puVar3; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); - puVar3 = (undefined4 *)((int)player + 0x5c); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); + puVar3 = (undefined4 *)(GHIDRA_INT(player) + 0x5c); (**(code **)(**(int **)stream_00 + 0x14))(puVar3,4,1); stream = (void *)*puVar3; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); pvVar5 = player; - (**(code **)(**(int **)stream_00 + 0x14))((int)player + 0x60,4,1); + (**(code **)(**(int **)stream_00 + 0x14))(GHIDRA_INT(player) + 0x60,4,1); stream = *(void **)((char *)pvVar5 + 0x60); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); if (*(uint *)((char *)stream_00 + 8) < 0x4b) { if (*(int *)((char *)pvVar5 + 0x60) == 0) { uVar2 = 0; @@ -2014,9 +2014,9 @@ byte GameState::read_player(void *unused, void *player, void *stream) *(uint *)((char *)pvVar5 + 100) = uVar2; } else { - (**(code **)(**(int **)stream_00 + 0x14))((undefined4 *)((int)pvVar5 + 100),4,1); + (**(code **)(**(int **)stream_00 + 0x14))((undefined4 *)(GHIDRA_INT(pvVar5) + 100),4,1); stream = *(void **)((char *)pvVar5 + 100); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); pvVar5 = player; } local_50._shift3 = 0; @@ -2025,76 +2025,76 @@ byte GameState::read_player(void *unused, void *player, void *stream) if (*(uint *)((char *)stream_00 + 8) < 0x7b) { (**(code **)(**(int **)stream_00 + 0x14))(&tmpInt,4,1); stream = tmpInt; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); - *local_20 = (uint)tmpInt; + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); + *local_20 = GHIDRA_UINT(tmpInt); puVar4 = local_20 + 1; (**(code **)(**(int **)stream_00 + 0x14))(puVar4,4,1); stream = (void *)*puVar4; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); puVar4 = local_20 + 2; (**(code **)(**(int **)stream_00 + 0x14))(puVar4,4,1); stream = (void *)*puVar4; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); puVar4 = local_20 + 3; (**(code **)(**(int **)stream_00 + 0x14))(puVar4,4,1); stream = (void *)*puVar4; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); puVar4 = local_20 + 4; (**(code **)(**(int **)stream_00 + 0x14))(puVar4,4,1); stream = (void *)*puVar4; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); puVar4 = local_20 + 6; (**(code **)(**(int **)stream_00 + 0x14))(puVar4,1,1); - stream = (void *)CONCAT31(stream._1_3_,(char)*puVar4); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,1); + stream = (void *)CONCAT31((*(undefined1 *)((char *)&(stream) + 0x1)),(char)*puVar4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,1); puVar4 = local_20 + 7; (**(code **)(**(int **)stream_00 + 0x14))(puVar4,4,1); stream = (void *)*puVar4; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); if (0x20 < *(uint *)&(*(undefined1 *)((char *)(savedState) + 0x1fdf0))) goto LAB_009cbd8f; LAB_009cbdb4: pvVar5 = player; } else { (**(code **)(**(int **)stream_00 + 0x14))(&unused,2,1); - stream = (void *)((uint)unused & 0xffff); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,2); - *local_20 = (uint)unused & 0xffff; - if (((uint)unused & 0xffff) != 0) { + stream = (void *)(GHIDRA_UINT(unused) & 0xffff); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,2); + *local_20 = GHIDRA_UINT(unused) & 0xffff; + if ((GHIDRA_UINT(unused) & 0xffff) != 0) { puVar4 = local_20 + 1; (**(code **)(**(int **)stream_00 + 0x14))(puVar4,4,1); stream = (void *)*puVar4; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); puVar4 = local_20 + 2; (**(code **)(**(int **)stream_00 + 0x14))(puVar4,4,1); stream = (void *)*puVar4; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); (**(code **)(**(int **)stream_00 + 0x14))(tmpShort,2,1); - stream = (void *)(uint)tmpShort[0]; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,2); - local_20[3] = (uint)tmpShort[0]; + stream = (void *)GHIDRA_UINT(tmpShort[0]); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,2); + local_20[3] = GHIDRA_UINT(tmpShort[0]); puVar4 = local_20 + 4; (**(code **)(**(int **)stream_00 + 0x14))(puVar4,4,1); stream = (void *)*puVar4; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); puVar4 = local_20 + 7; - *(bool *)(local_20 + 6) = 0 < (int)local_20[3]; + *(bool *)(local_20 + 6) = 0 < GHIDRA_INT(local_20[3]); (**(code **)(**(int **)stream_00 + 0x14))(puVar4,4,1); stream = (void *)*puVar4; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); LAB_009cbd8f: puVar4 = local_20 + 5; (**(code **)(**(int **)stream_00 + 0x14))(puVar4,4,1); stream = (void *)*puVar4; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); goto LAB_009cbdb4; } } local_50._shift3 = local_50._shift3 + 0x20; - if ((void *)0x37ff < (uint)local_50._shift3) { + if ((void *)0x37ff < GHIDRA_UINT(local_50._shift3)) { (**(code **)(**(int **)stream_00 + 0x14))(&entityStateCount,4,1); stream = entityStateCount; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); local_8 = 0; std::vector::resize(entityStateCount); local_8 = 0xffffffff; @@ -2108,15 +2108,15 @@ LAB_009cbd8f: return 0; } read_entity_save_state_tree - ((void *)(*(int *)((char *)pvVar5 + 0x74) + (int)stream),stream_00); - stream = (void *)((int)stream + 0x78); - unused = (void *)((int)unused + 1); + ((void *)(*(int *)((char *)pvVar5 + 0x74) + GHIDRA_INT(stream)),stream_00); + stream = (void *)(GHIDRA_INT(stream) + 0x78); + unused = (void *)(GHIDRA_INT(unused) + 1); } while (unused < entityStateCount); } (**(code **)(**(int **)stream_00 + 0x14))(&idSetCount,4,1); stream = idSetCount; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); - unused = (void *)((int)pvVar5 + 0x80); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); + unused = (void *)(GHIDRA_INT(pvVar5) + 0x80); iVar1 = *(int *)unused; FID_conflict__Erase_tree_>_> (unused,unused,*(_Tree_node **)(iVar1 + 4)); @@ -2133,15 +2133,15 @@ LAB_009cbd8f: return 0; } (**(code **)(**(int **)stream_00 + 0x14))(&stream,4,1); - local_50._shift3 = (int)stream; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&local_50._shift3,4); + local_50._shift3 = GHIDRA_INT(stream); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&local_50._shift3,4); std::set::insert(local_3c,&stream); - pvVar5 = (void *)((int)pvVar5 + 1); + pvVar5 = (void *)(GHIDRA_INT(pvVar5) + 1); } while (pvVar5 < idSetCount); } (**(code **)(**(int **)stream_00 + 0x14))(&entityStateCount2,4,1); stream = entityStateCount2; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); pvVar5 = player; local_8 = 2; std::vector::resize(entityStateCount2); @@ -2156,55 +2156,55 @@ LAB_009cbd8f: return 0; } read_entity_save_state_tree - ((void *)(*(int *)((char *)pvVar5 + 0x88) + (int)stream),stream_00); - stream = (void *)((int)stream + 0x78); - unused = (void *)((int)unused + 1); + ((void *)(*(int *)((char *)pvVar5 + 0x88) + GHIDRA_INT(stream)),stream_00); + stream = (void *)(GHIDRA_INT(stream) + 0x78); + unused = (void *)(GHIDRA_INT(unused) + 1); } while (unused < entityStateCount2); } stream = *(void **)(**(int **)stream_00 + 0x14); if (*(uint *)&(*(undefined1 *)((char *)(savedState) + 0x1fdf0)) < 0x49) { (*stream)(&player,4,1); stream = player; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); - *(undefined2 *)((char *)pvVar5 + 0xae) = player._0_2_; + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); + *(undefined2 *)((char *)pvVar5 + 0xae) = (*(undefined2 *)((char *)&(player) + 0x0)); (**(code **)(**(int **)stream_00 + 0x14))(&player,4,1); stream = player; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); - *(undefined2 *)((char *)pvVar5 + 0xac) = player._0_2_; + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); + *(undefined2 *)((char *)pvVar5 + 0xac) = (*(undefined2 *)((char *)&(player) + 0x0)); stream = &DAT_00000008; - puVar7 = (undefined2 *)((int)pvVar5 + 0x94); + puVar7 = (undefined2 *)(GHIDRA_INT(pvVar5) + 0x94); do { (**(code **)(**(int **)stream_00 + 0x14))(&player,4,1); unused = player; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&unused,4); - stream = (void *)((int)stream + -1); - *puVar7 = player._0_2_; + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&unused,4); + stream = (void *)(GHIDRA_INT(stream) + -1); + *puVar7 = (*(undefined2 *)((char *)&(player) + 0x0)); puVar7 = puVar7 + 1; } while (stream != (void *)0x0); } else { - (*stream)((int)pvVar5 + 0xae,2); - stream = (void *)(uint)*(ushort *)((char *)pvVar5 + 0xae); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,2); - (**(code **)(**(int **)stream_00 + 0x14))((int)pvVar5 + 0xac,2,1); - stream = (void *)(uint)*(ushort *)((char *)pvVar5 + 0xac); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,2); - (**(code **)(**(int **)stream_00 + 0x14))((byte *)((int)pvVar5 + 0x94),2,8); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)((int)pvVar5 + 0x94),0x10); + (*stream)(GHIDRA_INT(pvVar5) + 0xae,2); + stream = (void *)GHIDRA_UINT(*(ushort *)((char *)pvVar5 + 0xae)); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,2); + (**(code **)(**(int **)stream_00 + 0x14))(GHIDRA_INT(pvVar5) + 0xac,2,1); + stream = (void *)GHIDRA_UINT(*(ushort *)((char *)pvVar5 + 0xac)); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,2); + (**(code **)(**(int **)stream_00 + 0x14))((byte *)(GHIDRA_INT(pvVar5) + 0x94),2,8); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)(GHIDRA_INT(pvVar5) + 0x94),0x10); if (0x54 < *(uint *)&(*(undefined1 *)((char *)(savedState) + 0x1fdf0))) { - data = (byte *)((int)player + 0xa4); + data = (byte *)(GHIDRA_INT(player) + 0xa4); (**(code **)(**(int **)stream_00 + 0x14))(data,1,8); - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update(data,8); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update(data,8); } - puVar3 = (undefined4 *)((int)player + 0xb4); + puVar3 = (undefined4 *)(GHIDRA_INT(player) + 0xb4); (**(code **)(**(int **)stream_00 + 0x14))(puVar3,4,1); stream = (void *)*puVar3; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&stream,4); if (0x67 < *(uint *)&(*(undefined1 *)((char *)(savedState) + 0x1fdf0))) { - puVar6 = (ushort *)((int)player + 0x52); + puVar6 = (ushort *)(GHIDRA_INT(player) + 0x52); (**(code **)(**(int **)stream_00 + 0x14))(puVar6,2,1); - player = (void *)(uint)*puVar6; - ((Checksum *)((void *)((int)stream_00 + 0xc)))->Checksum::Update((byte *)&player,2); + player = (void *)GHIDRA_UINT(*puVar6); + ((Checksum *)((void *)(GHIDRA_INT(stream_00) + 0xc)))->Checksum::Update((byte *)&player,2); ExceptionList = local_10; return 1; } @@ -2291,7 +2291,7 @@ byte GameState::read(void *reader, byte isVerifyChecksum) ehState = 0xffffffff; puStack_18 = &LAB_00b0f33b; prevExceptionList = ExceptionList; - stackCookie = __security_cookie ^ (uint)(seedString + 0x20); + stackCookie = __security_cookie ^ GHIDRA_UINT((seedString + 0x20)); ExceptionList = &prevExceptionList; savedReader = reader; local_6a8 = this; @@ -2329,7 +2329,7 @@ LAB_009cc232: FUN_009d8550(&(*(undefined1 *)((char *)(this) + 0x4))); } (**(code **)(**(int **)reader + 0x14))(&bStack_6ad,1,1); - checksum = (void *)((int)reader + 0xc); + checksum = (void *)(GHIDRA_INT(reader) + 0xc); abStack_67c[0] = bStack_6ad; ((Checksum *)(checksum))->Checksum::Update(abStack_67c,1); pSStack_6ac = (Seeds *)&(*(undefined1 *)((char *)(this) + 0x1e724)); @@ -2346,8 +2346,8 @@ LAB_009cc232: uVar1 = *(ushort *)ppSVar8; *(ushort *)puVar14 = uVar1; puVar14 = &(*(undefined1 *)((char *)(local_6a8) + 0xe)); - (**(code **)(*(int *)*savedReader + 0x14))(puVar14,1,(uint)uVar1); - ((Checksum *)(checksum))->Checksum::Update(puVar14,(uint)uVar1); + (**(code **)(*(int *)*savedReader + 0x14))(puVar14,1,GHIDRA_UINT(uVar1)); + ((Checksum *)(checksum))->Checksum::Update(puVar14,GHIDRA_UINT(uVar1)); readerLocal = savedReader; state = local_6a8; FUN_009d84a0(&(*(undefined1 *)((char *)(local_6a8) + 0x44))); @@ -2409,28 +2409,28 @@ LAB_009cc232: (**(code **)(*(int *)*readerLocal + 0x14))(&historyTime,4,1); pSStack_688 = (Seeds *)historyTime; ((Checksum *)(readerLocal + 3))->Checksum::Update((byte *)&pSStack_688,4); - auStack_6e8._8_4_ = uStack_690; + (*(undefined4 *)((char *)&(auStack_6e8) + 0x8)) = uStack_690; iStack_6dc = historyLevelStage; uStack_6d8 = historyStageType; uStack_6d4 = historyRoomType; - auStack_6e8._4_4_ = auStack_6e8._4_4_ & 0xffffff00; - auStack_6e8._0_4_ = historyTime; + (*(undefined4 *)((char *)&(auStack_6e8) + 0x4)) = (*(undefined4 *)((char *)&(auStack_6e8) + 0x4)) & 0xffffff00; + (*(undefined4 *)((char *)&(auStack_6e8) + 0x0)) = historyTime; pSStack_6d0 = pSStack_6a4; if (historyTime < 0) { - auStack_6e8._0_4_ = g_game->_frameCount; + (*(undefined4 *)((char *)&(auStack_6e8) + 0x0)) = g_game->_frameCount; } historyEnd = *(int **)&(*(undefined1 *)((char *)(state) + 0x1a13c)); if (historyEnd == *(int **)&(*(undefined1 *)((char *)(state) + 0x1a140))) { std::vector<28byte>::_Emplace_reallocate(historyEnd,auStack_6e8); } else { - *historyEnd = auStack_6e8._0_4_; - historyEnd[1] = auStack_6e8._4_4_; - historyEnd[2] = (int)uStack_690; + *historyEnd = (*(undefined4 *)((char *)&(auStack_6e8) + 0x0)); + historyEnd[1] = (*(undefined4 *)((char *)&(auStack_6e8) + 0x4)); + historyEnd[2] = GHIDRA_INT(uStack_690); historyEnd[3] = historyLevelStage; historyEnd[4] = historyStageType; historyEnd[5] = historyRoomType; - historyEnd[6] = (int)pSStack_6a4; + historyEnd[6] = GHIDRA_INT(pSStack_6a4); *(int *)&(*(undefined1 *)((char *)(state) + 0x1a13c)) = *(int *)&(*(undefined1 *)((char *)(state) + 0x1a13c)) + 0x1c; } pSStack_6a0 = (Seeds *)&(*(undefined1 *)((char *)(pSStack_6a0) + 0x1)); @@ -2499,7 +2499,7 @@ LAB_009cc232: ((Checksum *)(checksum))->Checksum::Update(abStack_67c,1); puVar14 = &(*(undefined1 *)((char *)(state) + 0x108)); (**(code **)(*(int *)*savedReader + 0x14))(puVar14,2,1); - pSStack_688 = (Seeds *)(uint)*(ushort *)puVar14; + pSStack_688 = (Seeds *)GHIDRA_UINT(*(ushort *)puVar14); ((Checksum *)(checksum))->Checksum::Update((byte *)&pSStack_688,2); pSStack_688 = (Seeds *)0x1a; ppSVar8 = &pSStack_688; @@ -2509,8 +2509,8 @@ LAB_009cc232: uVar1 = *(ushort *)ppSVar8; *(ushort *)puVar14 = uVar1; puVar14 = &(*(undefined1 *)((char *)(local_6a8) + 0x10a)); - (**(code **)(*(int *)*savedReader + 0x14))(puVar14,1,(uint)uVar1); - ((Checksum *)(checksum))->Checksum::Update(puVar14,(uint)uVar1); + (**(code **)(*(int *)*savedReader + 0x14))(puVar14,1,GHIDRA_UINT(uVar1)); + ((Checksum *)(checksum))->Checksum::Update(puVar14,GHIDRA_UINT(uVar1)); state = local_6a8; puVar14 = &(*(undefined1 *)((char *)(local_6a8) + 0x124)); (**(code **)(*(int *)*savedReader + 0x14))(puVar14,4,1); @@ -2529,15 +2529,15 @@ LAB_009cc232: ((Checksum *)(checksum))->Checksum::Update((byte *)&pSStack_688,4); readerLocal = savedReader; pSStack_69c = (Seeds *)&(*(undefined1 *)((char *)(state) + 0x164)); - pSStack_6a0 = (Seeds *)((0x50 < (uint)savedReader[2]) + 0xd); + pSStack_6a0 = (Seeds *)((0x50 < GHIDRA_UINT(savedReader[2])) + 0xd); do { (**(code **)(*(int *)*readerLocal + 0x14))(pSStack_69c,4,1); pSStack_688 = *(Seeds **)pSStack_69c; ((Checksum *)(readerLocal + 3))->Checksum::Update((byte *)&pSStack_688,4); pSStack_69c = (Seeds *)&pSStack_69c->_gameStartSeed; - pSStack_6a0 = (Seeds *)((int)&pSStack_6a0[-1]._seedEffectsCount + 3); + pSStack_6a0 = (Seeds *)(GHIDRA_INT(&pSStack_6a0[-1]._seedEffectsCount) + 3); } while (pSStack_6a0 != (Seeds *)0x0); - if (0x55 < (uint)readerLocal[2]) { + if (0x55 < GHIDRA_UINT(readerLocal[2])) { (**(code **)(*(int *)*readerLocal + 0x14))(&pSStack_6a0,4,1); pSStack_688 = pSStack_6a0; ((Checksum *)(readerLocal + 3))->Checksum::Update((byte *)&pSStack_688,4); @@ -2549,21 +2549,21 @@ LAB_009cc232: do { puVar14 = *(undefined1 **)&(*(undefined1 *)((char *)(state) + 0x19524)); if (puVar14 <= &(*(undefined1 *)((char *)(pSStack_6a4) + 0x1))) { - std_deque_growmap(&(*(undefined1 *)((char *)(state) + 0x1951c)),(uint)pSStack_6a4); + std_deque_growmap(&(*(undefined1 *)((char *)(state) + 0x1951c)),GHIDRA_UINT(pSStack_6a4)); puVar14 = *(undefined1 **)&(*(undefined1 *)((char *)(state) + 0x19524)); pSStack_6a4 = *(Seeds **)&(*(undefined1 *)((char *)(state) + 0x1952c)); } - uVar7 = (uint)(puVar14 + -1) & *(uint *)&(*(undefined1 *)((char *)(state) + 0x19528)); + uVar7 = GHIDRA_UINT((puVar14 + -1)) & *(uint *)&(*(undefined1 *)((char *)(state) + 0x19528)); *(uint *)&(*(undefined1 *)((char *)(state) + 0x19528)) = uVar7; - pSStack_6a4 = (Seeds *)((uint)(puVar14 + -1) & - (int)pSStack_6a4->_stageSeeds + (uVar7 - 0x18)); + pSStack_6a4 = (Seeds *)(GHIDRA_UINT((puVar14 + -1)) & + GHIDRA_INT(pSStack_6a4->_stageSeeds) + (uVar7 - 0x18)); iVar6 = *(int *)&(*(undefined1 *)((char *)(state) + 0x19520)); - if (*(int *)(iVar6 + (int)pSStack_6a4 * 4) == 0) { + if (*(int *)(iVar6 + GHIDRA_INT(pSStack_6a4) * 4) == 0) { pvVar9 = operator_new(0xc); - *(void **)(*(int *)&(*(undefined1 *)((char *)(state) + 0x19520)) + (int)pSStack_6a4 * 4) = pvVar9; + *(void **)(*(int *)&(*(undefined1 *)((char *)(state) + 0x19520)) + GHIDRA_INT(pSStack_6a4) * 4) = pvVar9; iVar6 = *(int *)&(*(undefined1 *)((char *)(state) + 0x19520)); } - puVar2 = *(undefined8 **)(iVar6 + (int)pSStack_6a4 * 4); + puVar2 = *(undefined8 **)(iVar6 + GHIDRA_INT(pSStack_6a4) * 4); *puVar2 = 0; *(undefined4 *)(puVar2 + 1) = 0; pSVar10 = (Seeds *)(*(int *)&(*(undefined1 *)((char *)(state) + 0x1952c)) + 1); @@ -2574,7 +2574,7 @@ LAB_009cc232: } if (bVar17) { do { - pSVar10 = (Seeds *)((int)&pSVar10[-1]._seedEffectsCount + 3); + pSVar10 = (Seeds *)(GHIDRA_INT(&pSVar10[-1]._seedEffectsCount) + 3); *(Seeds **)&(*(undefined1 *)((char *)(state) + 0x1952c)) = pSVar10; if (pSVar10 == (Seeds *)0x0) { *(undefined4 *)&(*(undefined1 *)((char *)(state) + 0x19528)) = 0; @@ -2589,7 +2589,7 @@ LAB_009cc232: (*(GameStatePlayer **) (*(int *)&(*(undefined1 *)((char *)(state) + 0x19520)) + (*(int *)&(*(undefined1 *)((char *)(state) + 0x19524)) - 1U & - (int)pSStack_688->_stageSeeds + (int)(pSStack_6a4[-1]._stageSeeds + 0xb)) * 4), + GHIDRA_INT(pSStack_688->_stageSeeds) + GHIDRA_INT((pSStack_6a4[-1]._stageSeeds + 0xb))) * 4), readerLocal); pSStack_6a4 = (Seeds *)&(*(undefined1 *)((char *)(pSStack_6a4) + 0x1)); } while (pSStack_6a4 < *(undefined1 **)&(*(undefined1 *)((char *)(state) + 0x1952c))); @@ -2621,7 +2621,7 @@ LAB_009cc232: uStack_690 = (Seeds *)0x20d; } else { - uStack_690 = (Seeds *)(0x20f - (uint)(uVar7 < 0x9a)); + uStack_690 = (Seeds *)(0x20f - GHIDRA_UINT((uVar7 < 0x9a))); } if (0x1fa < *(uint *)&(*(undefined1 *)((char *)(state) + 0x19c))) { KAGE_LogMessage(1,(byte *)"[warn] Invalid room count %d. Save file %s might be corrupt.\n"); @@ -2658,16 +2658,16 @@ LAB_009cd058: pSStack_6a4 = (Seeds *)&(pSStack_6a4->_rng)._shift1; } while (pSStack_69c < uStack_690); } - if ((uint)readerLocal[2] < 0x7b) { + if (GHIDRA_UINT(readerLocal[2]) < 0x7b) { (**(code **)(*(int *)*readerLocal + 0x14))(&(*(undefined1 *)((char *)(state) + 0x19530)),4,0xa9); ((Checksum *)(checksum))->Checksum::Update(&(*(undefined1 *)((char *)(state) + 0x19530)),0x2a4); } else { uStack_690 = (Seeds *)0x0; (**(code **)(*(int *)*readerLocal + 0x14))(&uStack_690,2,1); - pSStack_688 = (Seeds *)((uint)uStack_690 & 0xffff); + pSStack_688 = (Seeds *)(GHIDRA_UINT(uStack_690) & 0xffff); ((Checksum *)(checksum))->Checksum::Update((byte *)&pSStack_688,2); - uVar7 = (uint)uStack_690 & 0xffff; + uVar7 = GHIDRA_UINT(uStack_690) & 0xffff; (**(code **)(*(int *)*savedReader + 0x14))(rleWords,2,uVar7); ((Checksum *)(checksum))->Checksum::Update((byte *)rleWords,uVar7 * 2); pSStack_69c = (Seeds *)0x0; @@ -2678,11 +2678,11 @@ LAB_009cd058: do { pSVar3 = pSStack_69c; if ((short)uVar7 == 0) { - pSStack_688._0_2_ = (ushort)uStack_690; + (*(undefined2 *)((char *)&(pSStack_688) + 0x0)) = (ushort)uStack_690; if ((ushort)pSStack_688 <= (ushort)pSStack_69c) goto LAB_009cd14a; pSStack_69c = (Seeds *)&(*(undefined1 *)((char *)(pSStack_69c) + 0x1)); - uVar11 = (uint)rleWords[(uint)pSVar3 & 0xffff]; - if ((short)rleWords[(uint)pSVar3 & 0xffff] < 0) { + uVar11 = GHIDRA_UINT(rleWords[GHIDRA_UINT(pSVar3) & 0xffff]); + if ((short)rleWords[GHIDRA_UINT(pSVar3) & 0xffff] < 0) { uVar7 = uVar11 & 0x7fff; goto LAB_009cd14a; } @@ -2716,7 +2716,7 @@ LAB_009cd14a: (**(code **)(*(int *)*savedReader + 0x14))(&(*(undefined1 *)((char *)(state) + 0x19d20)),4,1); pSStack_688 = *(Seeds **)&(*(undefined1 *)((char *)(state) + 0x19d20)); ((Checksum *)(checksum))->Checksum::Update((byte *)&pSStack_688,4); - if (0xa4 < (uint)savedReader[2]) { + if (0xa4 < GHIDRA_UINT(savedReader[2])) { (**(code **)(*(int *)*savedReader + 0x14))(&(*(undefined1 *)((char *)(state) + 0x19d24)),1,1); abStack_67c[0] = (*(undefined1 *)((char *)(state) + 0x19d24)); ((Checksum *)(checksum))->Checksum::Update(abStack_67c,1); @@ -2789,9 +2789,9 @@ LAB_009cd14a: ((Checksum *)(checksum))->Checksum::Update((byte *)&pSStack_688,4); iVar6 = *(int *)puVar14; if (((iVar6 < 0) || - (((int)(g_manager->_entityConfig)._players._end - - (int)(g_manager->_entityConfig)._players._begin) / 0x148 <= iVar6)) || - ((void *)(iVar6 * 0x148 + (int)(g_manager->_entityConfig)._players._begin) == (void *)0x0)) { + ((GHIDRA_INT((g_manager->_entityConfig)._players._end) - + GHIDRA_INT((g_manager->_entityConfig)._players._begin)) / 0x148 <= iVar6)) || + ((void *)(iVar6 * 0x148 + GHIDRA_INT((g_manager->_entityConfig)._players._begin)) == (void *)0x0)) { KAGE_LogMessage(1,(byte *)"[warn] Invalid starting player type: %d\n"); ExceptionList = prevExceptionList; return 0; @@ -2815,7 +2815,7 @@ LAB_009cd14a: (**(code **)(*(int *)*savedReader + 0x14))(&bStack_67d,1,1); abStack_67c[0] = bStack_67d; ((Checksum *)(readerLocal + 3))->Checksum::Update(abStack_67c,1); - *(int *)&(*(undefined1 *)((char *)(state) + 0x19d78)) = (int)(char)bStack_67d; + *(int *)&(*(undefined1 *)((char *)(state) + 0x19d78)) = GHIDRA_INT((char)bStack_67d); pSStack_6a0 = (Seeds *)0x0; if (0 < (char)bStack_67d) { pSStack_6a4 = (Seeds *)&(*(undefined1 *)((char *)(state) + 0x19d7c)); @@ -2828,23 +2828,23 @@ LAB_009cd14a: } pSStack_6a0 = (Seeds *)&(*(undefined1 *)((char *)(pSStack_6a0) + 0x1)); pSStack_6a4 = (Seeds *)(pSStack_6a4[0x10]._stageSeeds + 1); - } while ((int)pSStack_6a0 < *(int *)&(*(undefined1 *)((char *)(state) + 0x19d78))); + } while (GHIDRA_INT(pSStack_6a0) < *(int *)&(*(undefined1 *)((char *)(state) + 0x19d78))); } } if (0x8c < *(uint *)&(*(undefined1 *)((char *)(state) + 0x1fdf0))) { (**(code **)(*(int *)*readerLocal + 0x14))(&bStack_67d,1,1); abStack_67c[0] = bStack_67d; ((Checksum *)(readerLocal + 3))->Checksum::Update(abStack_67c,1); - pSStack_688 = (Seeds *)(int)(char)bStack_67d; + pSStack_688 = (Seeds *)GHIDRA_INT((char)bStack_67d); pSStack_69c = (Seeds *)0x0; - if (0 < (int)pSStack_688) { + if (0 < GHIDRA_INT(pSStack_688)) { uStack_690 = (Seeds *)&(*(undefined1 *)((char *)(state) + 0x1cc5c)); do { (**(code **)(*(int *)*readerLocal + 0x14))(&bStack_67d,1,1); abStack_67c[0] = bStack_67d; ((Checksum *)(readerLocal + 3))->Checksum::Update(abStack_67c,1); if (bStack_67d != 0) { - if ((int)pSStack_69c < 4) { + if (GHIDRA_INT(pSStack_69c) < 4) { bVar5 = ((GameStatePlayer *)((GameStatePlayer *)uStack_690))->GameStatePlayer::read(readerLocal); if (bVar5 == 0) { ExceptionList = prevExceptionList; @@ -2859,7 +2859,7 @@ LAB_009cd14a: FID_conflict__Erase_tree_>_> (apvStack_a4, (fuzzer_allocator_> *)apvStack_a4, - *(_Tree_node **)((int)apvStack_a4[0] + 4)); + *(_Tree_node **)(GHIDRA_INT(apvStack_a4[0]) + 4)); operator_delete(apvStack_a4[0],0x18); std::vector<52byte>::_Tidy(); FUN_004b3950(); @@ -2890,7 +2890,7 @@ LAB_009cd14a: } uStack_690 = (Seeds *)(uStack_690[0x10]._stageSeeds + 1); pSStack_69c = (Seeds *)&(*(undefined1 *)((char *)(pSStack_69c) + 0x1)); - } while ((int)pSStack_69c < (int)pSStack_688); + } while (GHIDRA_INT(pSStack_69c) < GHIDRA_INT(pSStack_688)); } } read_item_pool((int *)&(*(undefined1 *)((char *)(state) + 0x1e3cc)),readerLocal); @@ -2900,23 +2900,23 @@ LAB_009cd14a: uStack_27 = 0; uStack_6d8 = 0; uStack_6d4 = 0xf; - auStack_6e8._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(auStack_6e8) + 0x0)) = (void *)0x0; do { bVar5 = *pbVar12; pbVar12 = pbVar12 + 1; } while (bVar5 != 0); - ((std::string *)(auStack_6e8))->std::string::assign(seedString,(int)pbVar12 - (int)(seedString + 1)); + ((std::string *)(auStack_6e8))->std::string::assign(seedString,GHIDRA_INT(pbVar12) - GHIDRA_INT((seedString + 1))); ehState = 1; uVar7 = Seeds::String2Seed((std_string *)auStack_6e8); ((Seeds *)((Seeds *)&(*(undefined1 *)((char *)(state) + 0x1e724))))->Seeds::set_start_seed(uVar7); ehState = 0xffffffff; if (0xf < uStack_6d4) { uVar7 = uStack_6d4 + 1; - pvVar9 = (void *)auStack_6e8._0_4_; + pvVar9 = (*(undefined4 *)((char *)&((void *)auStack_6e8) + 0x0)); if (0xfff < uVar7) { - pvVar9 = *(void **)(auStack_6e8._0_4_ + -4); + pvVar9 = *(void **)((*(undefined4 *)((char *)&(auStack_6e8) + 0x0)) + -4); uVar7 = uStack_6d4 + 0x24; - if (0x1f < (uint)(auStack_6e8._0_4_ + (-4 - (int)pvVar9))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(auStack_6e8) + 0x0)) + (-4 - GHIDRA_INT(pvVar9))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2967,7 +2967,7 @@ LAB_009cdc87: readerLocal = savedReader; if (0x4f < uVar7) break; (**(code **)(*(int *)*savedReader + 0x14))(&bStack_695,1,1); - uStack_690 = (Seeds *)CONCAT31(uStack_690._1_3_,bStack_695); + uStack_690 = (Seeds *)CONCAT31((*(undefined1 *)((char *)&(uStack_690) + 0x1)),bStack_695); ((Checksum *)(readerLocal + 3))->Checksum::Update((byte *)&uStack_690,1); pSVar10 = pSStack_6ac; pSStack_6a0 = (Seeds *)0x0; @@ -2978,9 +2978,9 @@ LAB_009cdc87: ((Seeds *)(pSVar10))->Seeds::AddSeedEffect(uVar7); } pSStack_6a0 = (Seeds *)&(*(undefined1 *)((char *)(pSStack_6a0) + 0x1)); - pSStack_6a4 = (Seeds *)((int)pSStack_6a4 << 1 | (uint)((int)pSStack_6a4 < 0)); + pSStack_6a4 = (Seeds *)(GHIDRA_INT(pSStack_6a4) << 1 | GHIDRA_UINT((GHIDRA_INT(pSStack_6a4) < 0))); uVar7 = uVar7 + 1; - } while ((int)pSStack_6a0 < 8); + } while (GHIDRA_INT(pSStack_6a0) < 8); abStack_67c[0] = abStack_67c[0] + 1; } while (abStack_67c[0] < bStack_67d); goto LAB_009cdc87; @@ -3003,21 +3003,21 @@ LAB_009cdc87: ((Checksum *)(readerLocal + 3))->Checksum::Update((byte *)&pSStack_688,4); pSStack_69c = *(Seeds **)&(*(undefined1 *)((char *)(state) + 0x1e7a0)); pSStack_6a0 = (Seeds *)&(*(undefined1 *)((char *)(state) + 0x1e79c)); - pSStack_688 = (Seeds *)((int)pSStack_69c - *(int *)pSStack_6a0 >> 3); + pSStack_688 = (Seeds *)(GHIDRA_INT(pSStack_69c) - *(int *)pSStack_6a0 >> 3); if (uStack_690 < pSStack_688) { - pSVar10 = (Seeds *)(*(int *)pSStack_6a0 + (int)uStack_690 * 8); + pSVar10 = (Seeds *)(*(int *)pSStack_6a0 + GHIDRA_INT(uStack_690) * 8); LAB_009cde1a: *(Seeds **)&(*(undefined1 *)((char *)(state) + 0x1e7a0)) = pSVar10; } else if (pSStack_688 < uStack_690) { if (uStack_690 <= (Seeds *)(*(int *)&(*(undefined1 *)((char *)(state) + 0x1e7a4)) - *(int *)pSStack_6a0 >> 3)) { - pSStack_688 = (Seeds *)((int)uStack_690 - (int)pSStack_688); + pSStack_688 = (Seeds *)(GHIDRA_INT(uStack_690) - GHIDRA_INT(pSStack_688)); if (pSStack_688 == (Seeds *)0x0) { pSVar10 = pSStack_69c; } else { - memset(pSStack_69c,0,(int)pSStack_688 * 8); - pSVar10 = (Seeds *)(pSStack_69c->_stageSeeds + (int)pSStack_688 * 2 + -6); + memset(pSStack_69c,0,GHIDRA_INT(pSStack_688) * 8); + pSVar10 = (Seeds *)(pSStack_69c->_stageSeeds + GHIDRA_INT(pSStack_688) * 2 + -6); } goto LAB_009cde1a; } @@ -3025,9 +3025,9 @@ LAB_009cde1a: } pSStack_6ac = (Seeds *)0x0; pSVar10 = (Seeds *)&(*(undefined1 *)((char *)(state) + 0x1e79c)); - if (0 < (int)uStack_690) { + if (0 < GHIDRA_INT(uStack_690)) { do { - iVar6 = (int)pSStack_6ac * 8; + iVar6 = GHIDRA_INT(pSStack_6ac) * 8; puVar15 = (uint *)(*(int *)pSVar10 + iVar6); (**(code **)(*(int *)*savedReader + 0x14))(puVar15,4,1); pSStack_688 = (Seeds *)*puVar15; @@ -3044,7 +3044,7 @@ LAB_009cde1a: } pSStack_6ac = (Seeds *)&(*(undefined1 *)((char *)(pSStack_6ac) + 0x1)); pSVar10 = pSStack_6a0; - } while ((int)pSStack_6ac < (int)uStack_690); + } while (GHIDRA_INT(pSStack_6ac) < GHIDRA_INT(uStack_690)); state = local_6a8; } LAB_009cdedb: @@ -3055,7 +3055,7 @@ LAB_009cdedb: else { GameStateReader::read_bool_vector(readerLocal,&(*(undefined1 *)((char *)(state) + 0x1e714)),0x68); (**(code **)(*(int *)*readerLocal + 0x14))(&uStack_690,2,1); - pSStack_688 = (Seeds *)((uint)uStack_690 & 0xffff); + pSStack_688 = (Seeds *)(GHIDRA_UINT(uStack_690) & 0xffff); ((Checksum *)(readerLocal + 3))->Checksum::Update((byte *)&pSStack_688,2); pSStack_6a0 = (Seeds *)0x0; if ((ushort)uStack_690 != 0) { @@ -3065,7 +3065,7 @@ LAB_009cdedb: pSStack_688 = pSStack_6ac; ((Checksum *)(historyEnd))->Checksum::Update((byte *)&pSStack_688,4); if ((ushort)pSStack_6a0 < 0x25) { - pSStack_6a4->_stageSeeds[((uint)pSStack_6a0 & 0xffff) - 6] = (int)pSStack_6ac; + pSStack_6a4->_stageSeeds[(GHIDRA_UINT(pSStack_6a0) & 0xffff) - 6] = GHIDRA_INT(pSStack_6ac); readerLocal = savedReader; } pSStack_6a0 = (Seeds *)&(*(undefined1 *)((char *)(pSStack_6a0) + 0x1)); @@ -3084,29 +3084,29 @@ LAB_009cdedb: if (0x58 < uVar7) { bStack_67d = 0; (**(code **)(*(int *)*savedReader + 0x14))(&bStack_67d,1,1); - uStack_690 = (Seeds *)CONCAT31(uStack_690._1_3_,bStack_67d); + uStack_690 = (Seeds *)CONCAT31((*(undefined1 *)((char *)&(uStack_690) + 0x1)),bStack_67d); ((Checksum *)(readerLocal + 3))->Checksum::Update((byte *)&uStack_690,1); pSStack_69c = (Seeds *)&(*(undefined1 *)((char *)(state) + 0x1e790)); - vector12_resize(pSStack_69c,(uint)bStack_67d); + vector12_resize(pSStack_69c,GHIDRA_UINT(bStack_67d)); iVar13 = *(int *)&(*(undefined1 *)((char *)(state) + 0x1e794)) - *(int *)&(*(undefined1 *)((char *)(state) + 0x1e790)); pSStack_6ac = (Seeds *)0x0; iVar6 = iVar13 >> 0x1f; if (iVar13 / 0xc + iVar6 != iVar6) { uStack_690 = (Seeds *)0x0; do { - puVar16 = (undefined4 *)((int)uStack_690 + *(int *)pSStack_69c); + puVar16 = (undefined4 *)(GHIDRA_INT(uStack_690) + *(int *)pSStack_69c); (**(code **)(*(int *)*readerLocal + 0x14))(puVar16,4,1); pSStack_688 = (Seeds *)*puVar16; ((Checksum *)(readerLocal + 3))->Checksum::Update((byte *)&pSStack_688,4); - puVar16 = (undefined4 *)((int)uStack_690 + 4 + *(int *)pSStack_69c); + puVar16 = (undefined4 *)(GHIDRA_INT(uStack_690) + 4 + *(int *)pSStack_69c); (**(code **)(*(int *)*readerLocal + 0x14))(puVar16,4,1); pSStack_688 = (Seeds *)*puVar16; ((Checksum *)(readerLocal + 3))->Checksum::Update((byte *)&pSStack_688,4); - puVar15 = (uint *)((int)uStack_690 + 8 + *(int *)pSStack_69c); + puVar15 = (uint *)(GHIDRA_INT(uStack_690) + 8 + *(int *)pSStack_69c); (**(code **)(*(int *)*readerLocal + 0x14))(puVar15,4,1); pSStack_688 = (Seeds *)*puVar15; ((Checksum *)(readerLocal + 3))->Checksum::Update((byte *)&pSStack_688,4); - uStack_690 = (Seeds *)((int)uStack_690 + 0xc); + uStack_690 = (Seeds *)(GHIDRA_INT(uStack_690) + 0xc); pSStack_6ac = (Seeds *)&(*(undefined1 *)((char *)(pSStack_6ac) + 0x1)); } while (pSStack_6ac < (undefined1 *)((pSStack_69c->_gameStartSeed - *(int *)pSStack_69c) / 0xc)); @@ -3117,67 +3117,67 @@ LAB_009cdedb: uVar7 = *(uint *)&(*(undefined1 *)((char *)(state) + 0x1fdf0)); if (0x52 < uVar7) { (**(code **)(*(int *)*readerLocal + 0x14))(&uStack_690,2,1); - pSStack_688 = (Seeds *)((uint)uStack_690 & 0xffff); + pSStack_688 = (Seeds *)(GHIDRA_UINT(uStack_690) & 0xffff); ((Checksum *)(readerLocal + 3))->Checksum::Update((byte *)&pSStack_688,2); - *(uint *)&(*(undefined1 *)((char *)(state) + 0x1e7a8)) = (uint)uStack_690 & 0xffff; + *(uint *)&(*(undefined1 *)((char *)(state) + 0x1e7a8)) = GHIDRA_UINT(uStack_690) & 0xffff; (**(code **)(*(int *)*readerLocal + 0x14))(&uStack_690,2,1); - pSStack_688 = (Seeds *)((uint)uStack_690 & 0xffff); + pSStack_688 = (Seeds *)(GHIDRA_UINT(uStack_690) & 0xffff); ((Checksum *)(readerLocal + 3))->Checksum::Update((byte *)&pSStack_688,2); uVar7 = *(uint *)&(*(undefined1 *)((char *)(state) + 0x1fdf0)); - *(uint *)&(*(undefined1 *)((char *)(state) + 0x1e7ac)) = (uint)uStack_690 & 0xffff; + *(uint *)&(*(undefined1 *)((char *)(state) + 0x1e7ac)) = GHIDRA_UINT(uStack_690) & 0xffff; } if (0x80 < uVar7) { (**(code **)(*(int *)*savedReader + 0x14))(&(*(undefined1 *)((char *)(state) + 0x1e7b0)),1,1); - uStack_690 = (Seeds *)CONCAT31(uStack_690._1_3_,(*(undefined1 *)((char *)(state) + 0x1e7b0))); + uStack_690 = (Seeds *)CONCAT31((*(undefined1 *)((char *)&(uStack_690) + 0x1)),(*(undefined1 *)((char *)(state) + 0x1e7b0))); ((Checksum *)(checksum))->Checksum::Update((byte *)&uStack_690,1); readerLocal = savedReader; local_6a8 = (GameState *)&(*(undefined1 *)((char *)(state) + 0x1ead0)); pSStack_6ac = (Seeds *)0x7; do { (**(code **)(*(int *)*readerLocal + 0x14))(abStack_67c,1,1); - uStack_690 = (Seeds *)CONCAT31(uStack_690._1_3_,abStack_67c[0]); + uStack_690 = (Seeds *)CONCAT31((*(undefined1 *)((char *)&(uStack_690) + 0x1)),abStack_67c[0]); ((Checksum *)(readerLocal + 3))->Checksum::Update((byte *)&uStack_690,1); - *(int *)((char *)local_6a8 + -4) = (int)(char)abStack_67c[0]; + *(int *)((char *)local_6a8 + -4) = GHIDRA_INT((char)abStack_67c[0]); if (((char)abStack_67c[0] != 0) || (0x88 < *(uint *)&(*(undefined1 *)((char *)(state) + 0x1fdf0)))) { (**(code **)(*(int *)*readerLocal + 0x14))(&bStack_67d,1,1); - uStack_690 = (Seeds *)CONCAT31(uStack_690._1_3_,bStack_67d); + uStack_690 = (Seeds *)CONCAT31((*(undefined1 *)((char *)&(uStack_690) + 0x1)),bStack_67d); ((Checksum *)(readerLocal + 3))->Checksum::Update((byte *)&uStack_690,1); - *(int *)((char *)local_6a8 + -0xc) = (int)(char)bStack_67d; + *(int *)((char *)local_6a8 + -0xc) = GHIDRA_INT((char)bStack_67d); bStack_695 = 0; if ('\0' < (char)bStack_67d) { do { - read_player(state,(undefined1 *)((int)local_6a8 + (char)bStack_695 * 0xc + -0x1ac), - (undefined1 *)((int)local_6a8 + (char)bStack_695 * 0xb8 + -0x31c), + read_player(state,(undefined1 *)(GHIDRA_INT(local_6a8) + (char)bStack_695 * 0xc + -0x1ac), + (undefined1 *)(GHIDRA_INT(local_6a8) + (char)bStack_695 * 0xb8 + -0x31c), readerLocal); bStack_695 = bStack_695 + 1; } while ((char)bStack_695 < (char)bStack_67d); } (**(code **)(*(int *)*readerLocal + 0x14))(&bStack_67d,1,1); - uStack_690 = (Seeds *)CONCAT31(uStack_690._1_3_,bStack_67d); + uStack_690 = (Seeds *)CONCAT31((*(undefined1 *)((char *)&(uStack_690) + 0x1)),bStack_67d); ((Checksum *)(readerLocal + 3))->Checksum::Update((byte *)&uStack_690,1); - *(int *)((char *)local_6a8 + -8) = (int)(char)bStack_67d; + *(int *)((char *)local_6a8 + -8) = GHIDRA_INT((char)bStack_67d); bStack_695 = 0; if ('\0' < (char)bStack_67d) { do { - read_player(state,(undefined1 *)((int)local_6a8 + ((char)bStack_695 + -3) * 0xc), - (undefined1 *)((int)local_6a8 + (char)bStack_695 * 0xb8 + -0x194), + read_player(state,(undefined1 *)(GHIDRA_INT(local_6a8) + ((char)bStack_695 + -3) * 0xc), + (undefined1 *)(GHIDRA_INT(local_6a8) + (char)bStack_695 * 0xb8 + -0x194), readerLocal); bStack_695 = bStack_695 + 1; } while ((char)bStack_695 < (char)bStack_67d); } (**(code **)(*(int *)*readerLocal + 0x14))(local_6a8,1,1); - uStack_690 = (Seeds *)CONCAT31(uStack_690._1_3_,*(undefined1 *)local_6a8); + uStack_690 = (Seeds *)CONCAT31((*(undefined1 *)((char *)&(uStack_690) + 0x1)),*(undefined1 *)local_6a8); ((Checksum *)(readerLocal + 3))->Checksum::Update((byte *)&uStack_690,1); } - local_6a8 = (GameState *)((int)local_6a8 + 800); - pSStack_6ac = (Seeds *)((int)&pSStack_6ac[-1]._seedEffectsCount + 3); + local_6a8 = (GameState *)(GHIDRA_INT(local_6a8) + 800); + pSStack_6ac = (Seeds *)(GHIDRA_INT(&pSStack_6ac[-1]._seedEffectsCount) + 3); } while (pSStack_6ac != (Seeds *)0x0); uVar7 = *(uint *)&(*(undefined1 *)((char *)(state) + 0x1fdf0)); pSStack_6ac = (Seeds *)0x0; } if (0x84 < uVar7) { (**(code **)(*(int *)*savedReader + 0x14))(&(*(undefined1 *)((char *)(state) + 0x1fd94)),2,1); - pSStack_688 = (Seeds *)(uint)*(ushort *)&(*(undefined1 *)((char *)(state) + 0x1fd94)); + pSStack_688 = (Seeds *)GHIDRA_UINT(*(ushort *)&(*(undefined1 *)((char *)(state) + 0x1fd94))); ((Checksum *)(checksum))->Checksum::Update((byte *)&pSStack_688,2); uVar7 = *(uint *)&(*(undefined1 *)((char *)(state) + 0x1fdf0)); readerLocal = savedReader; @@ -3188,7 +3188,7 @@ LAB_009cdedb: } if (0x97 < uVar7) { (**(code **)(*(int *)*savedReader + 0x14))(&(*(undefined1 *)((char *)(state) + 0x1fddc)),1,1); - uStack_690 = (Seeds *)CONCAT31(uStack_690._1_3_,(*(undefined1 *)((char *)(state) + 0x1fddc))); + uStack_690 = (Seeds *)CONCAT31((*(undefined1 *)((char *)&(uStack_690) + 0x1)),(*(undefined1 *)((char *)(state) + 0x1fddc))); ((Checksum *)(checksum))->Checksum::Update((byte *)&uStack_690,1); uVar7 = *(uint *)&(*(undefined1 *)((char *)(state) + 0x1fdf0)); } @@ -3197,12 +3197,12 @@ LAB_009cdedb: GameStateReader::read_int_vector(savedReader,(int *)&(*(undefined1 *)((char *)(state) + 0x1fde0))); } cVar4 = (**(code **)(*(int *)*readerLocal + 0x10))(); - uStack_690._3_1_ = cVar4; + (*(undefined1 *)((char *)&(uStack_690) + 0x3)) = cVar4; (**(code **)(*(int *)*readerLocal + 0x14))(&trailerChecksum,4,1); pSStack_688 = trailerChecksum; ((Checksum *)(readerLocal + 3))->Checksum::Update((byte *)&pSStack_688,4); - trailerChecksum = (Seeds *)((uint)trailerChecksum ^ 0x96696996); - if (((trailerChecksum == *(Seeds **)&(*(undefined1 *)((char *)(state) + 0x1fda4))) && (uStack_690._3_1_ == '\0')) && + trailerChecksum = (Seeds *)(GHIDRA_UINT(trailerChecksum) ^ 0x96696996); + if (((trailerChecksum == *(Seeds **)&(*(undefined1 *)((char *)(state) + 0x1fda4))) && ((*(undefined1 *)((char *)&(uStack_690) + 0x3)) == '\0')) && (cVar4 = (**(code **)(*(int *)*readerLocal + 0x10))(), cVar4 != '\0')) { ExceptionList = prevExceptionList; return 1; @@ -3241,7 +3241,7 @@ byte GameState::read_item_pool(int *poolState, void *reader) local_18 = (undefined1 *)0x0; bitWord = *(uint *)((char *)reader + 8); - poolCount = (undefined1 *)((-(uint)(bitWord < 0x7a) & 0xfffffffe) + 0x1f); + poolCount = (undefined1 *)((-GHIDRA_UINT((bitWord < 0x7a)) & 0xfffffffe) + 0x1f); if (bitWord < 0x70) { poolCount = &DAT_0000001c; } @@ -3251,7 +3251,7 @@ byte GameState::read_item_pool(int *poolState, void *reader) if (bitWord < 0x57) { poolCount = (undefined1 *)0x1a; } - freeBlock = (void *)((int)reader + 0xc); + freeBlock = (void *)(GHIDRA_INT(reader) + 0xc); checksum = freeBlock; poolStateLocal = poolState; do { @@ -3265,12 +3265,12 @@ byte GameState::read_item_pool(int *poolState, void *reader) poolState[1] = 0; poolState[2] = 0; if (oldData != (void *)0x0) { - bitWord = iVar1 - (int)oldData & 0xfffffffc; + bitWord = iVar1 - GHIDRA_INT(oldData) & 0xfffffffc; pvVar8 = oldData; if (0xfff < bitWord) { pvVar8 = *(void **)((char *)oldData + -4); bitWord = bitWord + 0x23; - if (0x1f < (uint)((int)oldData + (-4 - (int)pvVar8))) goto LAB_009ce83e; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(oldData) + (-4 - GHIDRA_INT(pvVar8))))) goto LAB_009ce83e; } operator_delete(pvVar8,bitWord); } @@ -3279,12 +3279,12 @@ byte GameState::read_item_pool(int *poolState, void *reader) oldData = (void *)0x0; if (local_1c != (void *)0x0) { do { - piVar6 = (int *)(*poolState + (int)oldData * 4); + piVar6 = (int *)(*poolState + GHIDRA_INT(oldData) * 4); (**(code **)(**(int **)reader + 0x14))(piVar6,4,1); freeBlock = checksum; local_28 = (void *)*piVar6; ((Checksum *)(checksum))->Checksum::Update((byte *)&local_28,4); - oldData = (void *)((int)oldData + 1); + oldData = (void *)(GHIDRA_INT(oldData) + 1); } while (oldData < local_1c); } puVar7 = poolCount; @@ -3295,7 +3295,7 @@ byte GameState::read_item_pool(int *poolState, void *reader) pbVar5 = (byte *)(poolStateLocal + 0x5d); (**(code **)(**(int **)reader + 0x14))(pbVar5,4,poolCount); freeBlock = checksum; - ((Checksum *)(checksum))->Checksum::Update(pbVar5,(int)puVar7 * 4); + ((Checksum *)(checksum))->Checksum::Update(pbVar5,GHIDRA_INT(puVar7) * 4); piVar6 = poolStateLocal + 0x7c; (**(code **)(**(int **)oldData + 0x14))(piVar6,4,1); reader = (void *)*piVar6; @@ -3325,7 +3325,7 @@ byte GameState::read_item_pool(int *poolState, void *reader) bitWord = *(uint *)((char *)oldData + 8); } if (bitWord < 0x37) { - local_18 = (undefined1 *)((-(uint)(bitWord < 0x35) & 0xffffff22) + 0x2dd); + local_18 = (undefined1 *)((-GHIDRA_UINT((bitWord < 0x35)) & 0xffffff22) + 0x2dd); } else { (**(code **)(**(int **)oldData + 0x14))(&local_18,4,1); @@ -3334,8 +3334,8 @@ byte GameState::read_item_pool(int *poolState, void *reader) } if (local_18 <= (undefined1 *) - ((int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2)) { + (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2)) { piVar6 = poolStateLocal + 0x82; pMVar2 = g_manager; if (&local_38 != piVar6) { @@ -3346,39 +3346,39 @@ byte GameState::read_item_pool(int *poolState, void *reader) poolStateLocal[0x84] = 0; poolStateLocal[0x85] = 0; if (pvVar8 != (void *)0x0) { - bitWord = (int)pMVar2 - (int)pvVar8 & 0xfffffffc; + bitWord = GHIDRA_INT(pMVar2) - GHIDRA_INT(pvVar8) & 0xfffffffc; freeBlock = pvVar8; if (0xfff < bitWord) { freeBlock = *(void **)((char *)pvVar8 + -4); bitWord = bitWord + 0x23; - if (0x1f < (uint)((int)pvVar8 + (-4 - (int)freeBlock))) goto LAB_009ce83e; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar8) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_009ce83e; } operator_delete(freeBlock,bitWord); pMVar2 = extraout_ECX; } } - vector_bool_resize(piVar6,(uint)local_18,(byte)pMVar2); + vector_bool_resize(piVar6,GHIDRA_UINT(local_18),(byte)pMVar2); puVar7 = (undefined1 *)0x0; if (local_18 != (undefined1 *)0x0) { do { - (**(code **)(**(int **)oldData + 0x14))((int)&reader + 3,1,1); - collectibleBit[0] = reader._3_1_; + (**(code **)(**(int **)oldData + 0x14))(GHIDRA_INT(&reader) + 3,1,1); + collectibleBit[0] = (*(undefined1 *)((char *)&(reader) + 0x3)); ((Checksum *)(freeBlock))->Checksum::Update(collectibleBit,1); - bitWord = (uint)puVar7 >> 5; + bitWord = GHIDRA_UINT(puVar7) >> 5; local_28 = (void *)poolStateLocal[0x82]; bitWord = *(uint *)((char *)local_28 + bitWord * 4); - if (reader._3_1_ == '\0') { - bitWord = bitWord & ~(1 << ((uint)puVar7 & 0x1f)); + if ((*(undefined1 *)((char *)&(reader) + 0x3)) == '\0') { + bitWord = bitWord & ~(1 << (GHIDRA_UINT(puVar7) & 0x1f)); } else { - bitWord = bitWord | 1 << ((uint)puVar7 & 0x1f); + bitWord = bitWord | 1 << (GHIDRA_UINT(puVar7) & 0x1f); } puVar7 = puVar7 + 1; *(uint *)((char *)local_28 + bitWord * 4) = bitWord; } while (puVar7 < local_18); } if (*(uint *)((char *)oldData + 8) < 0x37) { - local_1c = (void *)((-(uint)(*(uint *)((char *)oldData + 8) < 0x35) & 0xffffffba) + 0xbe); + local_1c = (void *)((-GHIDRA_UINT((*(uint *)((char *)oldData + 8) < 0x35)) & 0xffffffba) + 0xbe); } else { (**(code **)(**(int **)oldData + 0x14))(&local_1c,4,1); @@ -3386,8 +3386,8 @@ byte GameState::read_item_pool(int *poolState, void *reader) ((Checksum *)(freeBlock))->Checksum::Update((byte *)&local_28,4); } if (local_1c <= - (void *)((int)(g_manager->_itemConfig)._trinkets._end - - (int)(g_manager->_itemConfig)._trinkets._begin >> 2)) { + (void *)(GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - + GHIDRA_INT((g_manager->_itemConfig)._trinkets._begin) >> 2)) { piVar6 = poolStateLocal + 0x86; pMVar2 = g_manager; if (&local_38 != piVar6) { @@ -3398,12 +3398,12 @@ byte GameState::read_item_pool(int *poolState, void *reader) poolStateLocal[0x88] = 0; poolStateLocal[0x89] = 0; if (pvVar8 != (void *)0x0) { - bitWord = (int)pMVar2 - (int)pvVar8 & 0xfffffffc; + bitWord = GHIDRA_INT(pMVar2) - GHIDRA_INT(pvVar8) & 0xfffffffc; freeBlock = pvVar8; if (0xfff < bitWord) { freeBlock = *(void **)((char *)pvVar8 + -4); bitWord = bitWord + 0x23; - if (0x1f < (uint)((int)pvVar8 + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar8) + (-4 - GHIDRA_INT(freeBlock))))) { LAB_009ce83e: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3413,23 +3413,23 @@ LAB_009ce83e: pMVar2 = extraout_ECX_00; } } - vector_bool_resize(piVar6,(uint)local_1c,(byte)pMVar2); + vector_bool_resize(piVar6,GHIDRA_UINT(local_1c),(byte)pMVar2); pvVar8 = (void *)0x0; if (local_1c != (void *)0x0) { do { (**(code **)(**(int **)oldData + 0x14))(trinketBit,1,1); - reader = (void *)CONCAT31(reader._1_3_,trinketBit[0]); + reader = (void *)CONCAT31((*(undefined1 *)((char *)&(reader) + 0x1)),trinketBit[0]); ((Checksum *)(freeBlock))->Checksum::Update((byte *)&reader,1); - bitWord = (uint)pvVar8 >> 5; + bitWord = GHIDRA_UINT(pvVar8) >> 5; reader = (void *)poolStateLocal[0x86]; bitWord = *(uint *)((char *)reader + bitWord * 4); if (trinketBit[0] == '\0') { - bitWord = bitWord & ~(1 << ((uint)pvVar8 & 0x1f)); + bitWord = bitWord & ~(1 << (GHIDRA_UINT(pvVar8) & 0x1f)); } else { - bitWord = bitWord | 1 << ((uint)pvVar8 & 0x1f); + bitWord = bitWord | 1 << (GHIDRA_UINT(pvVar8) & 0x1f); } - pvVar8 = (void *)((int)pvVar8 + 1); + pvVar8 = (void *)(GHIDRA_INT(pvVar8) + 1); *(uint *)((char *)reader + bitWord * 4) = bitWord; } while (pvVar8 < local_1c); } @@ -3452,7 +3452,7 @@ LAB_009ce83e: if (0x4d < *(uint *)((char *)oldData + 8)) { pbVar5 = (byte *)(poolStateLocal + 0x9d); (**(code **)(**(int **)oldData + 0x14))(pbVar5,2,poolCount); - ((Checksum *)(freeBlock))->Checksum::Update(pbVar5,(int)puVar7 * 2); + ((Checksum *)(freeBlock))->Checksum::Update(pbVar5,GHIDRA_INT(puVar7) * 2); } return 1; } @@ -3487,7 +3487,7 @@ void GameState::write_item_pool(void *itemPools, void *stream) uint writeValue [2]; poolsLeft = 0x1f; - checksum = (void *)((int)stream + 0xc); + checksum = (void *)(GHIDRA_INT(stream) + 0xc); local_24 = itemPools; savedChecksum = checksum; do { @@ -3506,10 +3506,10 @@ void GameState::write_item_pool(void *itemPools, void *stream) i = i + 1; } while (i < itemCount); } - itemPools = (void *)((int)itemPools + 0xc); + itemPools = (void *)(GHIDRA_INT(itemPools) + 0xc); poolsLeft = poolsLeft + -1; } while (poolsLeft != 0); - data = (byte *)((int)local_24 + 0x174); + data = (byte *)(GHIDRA_INT(local_24) + 0x174); (**(code **)(**(int **)stream + 0x1c))(); ((Checksum *)(pvStack_1c))->Checksum::Update(data,0x7c); (**(code **)(**(int **)stream + 0x1c))(); @@ -3538,7 +3538,7 @@ void GameState::write_item_pool(void *itemPools, void *stream) do { uStack_8c = CONCAT13((*(uint *)(*(int *)(uVar3 + 0x208) + (i >> 5) * 4) & 1 << ((byte)i & 0x1f)) != 0,(undefined3)uStack_8c); - (**(code **)(**(int **)stream + 0x1c))((int)&uStack_8c + 3,1,1); + (**(code **)(**(int **)stream + 0x1c))(GHIDRA_INT(&uStack_8c) + 3,1,1); ((Checksum *)(pvStack_1c))->Checksum::Update(abStack_72 + -0x16,1); i = i + 1; } while (i < uVar4); @@ -3741,7 +3741,7 @@ void GameState::write_player(void *playerState, void *writer) local_3c = playerState; (**(code **)(**(int **)writer + 0x1c))(); auStack_20[0] = *(undefined4 *)playerState; - pvVar4 = (void *)((int)writer + 0xc); + pvVar4 = (void *)(GHIDRA_INT(writer) + 0xc); ((Checksum *)(pvVar4))->Checksum::Update((byte *)auStack_20,4); (**(code **)(**(int **)writer + 0x1c))(); auStack_2c[0] = *(undefined4 *)((char *)playerState + 4); @@ -3865,7 +3865,7 @@ void GameState::write_player(void *playerState, void *writer) iVar28 = iVar26 + 0x104; iVar30 = 4; do { - iVar25 = CONCAT13((char)((uint)iVar25 >> 0x18), + iVar25 = CONCAT13((char)(GHIDRA_UINT(iVar25) >> 0x18), CONCAT12(*(undefined1 *)(iVar28 + 4),(short)iVar25)); (**(code **)(**(int **)writer + 0x1c))(); ((Checksum *)(pvVar4))->Checksum::Update(abStack_28a + 6,1); @@ -3905,14 +3905,14 @@ void GameState::write_player(void *playerState, void *writer) do { iVar28 = iVar30; (**(code **)(**(int **)writer + 0x1c))(); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update(abStack_28a + -6,4); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update(abStack_28a + -6,4); (**(code **)(**(int **)writer + 0x1c))(); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update(abStack_28a + 6,4); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update(abStack_28a + 6,4); pairIndex = pairIndex + 1; iVar30 = iVar28; } while (pairIndex < *puVar24); } - pvVar4 = (void *)((int)writer + 0xc); + pvVar4 = (void *)(GHIDRA_INT(writer) + 0xc); write_int_vector(writer,(void *)(iVar28 + 0x194)); write_int_vector(writer,(void *)(iVar28 + 0x1a0)); write_int_vector(writer,(void *)(iVar28 + 0x1ac)); @@ -3983,9 +3983,9 @@ void GameState::write_player(void *playerState, void *writer) write_entity_save_state((void *)(*(int *)(iVar30 + 0x1e0) + iVar28),writer); iVar28 = iVar28 + 0x78; uVar23 = uVar23 + 1; - } while (uVar23 < (uint)((*(int *)(iVar30 + 0x1e4) - *(int *)(iVar30 + 0x1e0)) / 0x78)); + } while (uVar23 < GHIDRA_UINT(((*(int *)(iVar30 + 0x1e4) - *(int *)(iVar30 + 0x1e0)) / 0x78))); } - pvVar4 = (void *)((int)writer + 0xc); + pvVar4 = (void *)(GHIDRA_INT(writer) + 0xc); (**(code **)(**(int **)writer + 0x1c))(); ((Checksum *)(pvVar4))->Checksum::Update(abStack_332 + 6,4); (**(code **)(**(int **)writer + 0x1c))(); @@ -4050,16 +4050,16 @@ void GameState::write_player(void *playerState, void *writer) (**(code **)(**(int **)writer + 0x1c))(); ((Checksum *)(pvVar4))->Checksum::Update(abStack_3f2 + 6,1); uVar23 = 0; - iVar25 = CONCAT13((char)((uint)uVar22 >> 0x18),(uint3)(ushort)uVar22); + iVar25 = CONCAT13((char)(GHIDRA_UINT(uVar22) >> 0x18),(uint3)(ushort)uVar22); iVar28 = iVar25; - if ((char)((uint)uVar22 >> 8) != '\0') { + if ((char)(GHIDRA_UINT(uVar22) >> 8) != '\0') { do { GameStatePlayer::write_coplayer ((GameStatePlayer *)(*(int *)(iVar30 + 0x38c) + uVar23 * 0x1c),writer); - bVar1 = (char)((uint)iVar28 >> 0x10) + 1; - uVar23 = (uint)bVar1; - iVar25 = CONCAT13((char)((uint)iVar28 >> 0x18),CONCAT12(bVar1,(short)iVar28)); - uVar6 = (uint)iVar28 >> 8; + bVar1 = (char)(GHIDRA_UINT(iVar28) >> 0x10) + 1; + uVar23 = GHIDRA_UINT(bVar1); + iVar25 = CONCAT13((char)(GHIDRA_UINT(iVar28) >> 0x18),CONCAT12(bVar1,(short)iVar28)); + uVar6 = GHIDRA_UINT(iVar28) >> 8; iVar28 = iVar25; } while (bVar1 < (byte)uVar6); } @@ -4119,17 +4119,17 @@ void GameState::write_player(void *playerState, void *writer) if ((short)uVar22 != 0) { do { (**(code **)(**(int **)writer + 0x1c))(); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update(abStack_4e2 + 6,4); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update(abStack_4e2 + 6,4); (**(code **)(**(int **)writer + 0x1c))(); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update(abStack_4ee + 6,4); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update(abStack_4ee + 6,4); (**(code **)(**(int **)writer + 0x1c))(); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update(abStack_4fa + 6,4); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update(abStack_4fa + 6,4); (**(code **)(**(int **)writer + 0x1c))(); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update(abStack_4d6 + 6,4); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update(abStack_4d6 + 6,4); uVar7 = uVar7 + 1; } while (uVar7 < (ushort)uVar22); } - pvVar4 = (void *)((int)writer + 0xc); + pvVar4 = (void *)(GHIDRA_INT(writer) + 0xc); (**(code **)(**(int **)writer + 0x1c))(); ((Checksum *)(pvVar4))->Checksum::Update(abStack_4e2 + 6,4); (**(code **)(**(int **)writer + 0x1c))(); @@ -4161,14 +4161,14 @@ void GameState::write_player(void *playerState, void *writer) ((Checksum *)(pvVar4))->Checksum::Update(abStack_536 + 6,4); uStack_580 = abStack_542 + -0x21; iVar25 = 1; - iVar28 = CONCAT22((short)((uint)uVar22 >> 0x10), + iVar28 = CONCAT22((short)(GHIDRA_UINT(uVar22) >> 0x10), CONCAT11(*(undefined1 *)(iVar30 + 0x4c0),(char)uVar22)); (**(code **)(**(int **)writer + 0x1c))(); uStack_58c = (byte *)0x9d622b; ((Checksum *)(pvVar4))->Checksum::Update(abStack_542 + -0x2a,1); uVar23 = 0; bVar1 = 0; - if ((char)((uint)iVar26 >> 8) != '\0') { + if ((char)(GHIDRA_UINT(iVar26) >> 8) != '\0') { do { iVar30 = iVar28; uVar23 = uVar23 + *(int *)(iVar30 + 0x4bc); @@ -4178,25 +4178,25 @@ void GameState::write_player(void *playerState, void *writer) (uVar23 & 1) * 8),(int3)iVar26); uStack_58c = abStack_542 + -0x2b; (**(code **)(**(int **)writer + 0x1c))(); - uStack_574 = CONCAT31(uStack_574._1_3_,(char)((uint)iVar25 >> 0x18)); + uStack_574 = CONCAT31((*(undefined1 *)((char *)&(uStack_574) + 0x1)),(char)(GHIDRA_UINT(iVar25) >> 0x18)); uStack_598 = (int *)0x9d62c0; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&uStack_574,1); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&uStack_574,1); uStack_598 = &iStack_55c; (**(code **)(**(int **)writer + 0x1c))(); uStack_58c = (byte *)0x9d62e6; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update(abStack_542 + 6,4); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update(abStack_542 + 6,4); bVar1 = bVar1 + 1; - uVar23 = (uint)bVar1; + uVar23 = GHIDRA_UINT(bVar1); iVar28 = iVar30; - } while (bVar1 < (byte)((uint)iVar26 >> 8)); + } while (bVar1 < (byte)(GHIDRA_UINT(iVar26) >> 8)); } - pvVar4 = (void *)((int)writer + 0xc); + pvVar4 = (void *)(GHIDRA_INT(writer) + 0xc); byteIndex = 0; do { puVar2 = (undefined1 *)(*(int *)(iVar30 + 0x4c4) + byteIndex); uStack_58c = puVar2; (**(code **)(**(int **)writer + 0x1c))(); - uStack_568 = CONCAT31(uStack_568._1_3_,*puVar2); + uStack_568 = CONCAT31((*(undefined1 *)((char *)&(uStack_568) + 0x1)),*puVar2); uStack_58c = (byte *)0x9d632c; iVar30 = iVar28; ((Checksum *)(pvVar4))->Checksum::Update((byte *)&uStack_568,1); @@ -4216,27 +4216,27 @@ void GameState::write_player(void *playerState, void *writer) do { puVar2 = (undefined1 *)(*(int *)(iVar25 + 0x4dc) + uStack_568); (**(code **)(**(int **)writer + 0x1c))(); - uStack_580 = (byte *)CONCAT31(uStack_580._1_3_,*puVar2); + uStack_580 = (byte *)CONCAT31((*(undefined1 *)((char *)&(uStack_580) + 0x1)),*puVar2); ((Checksum *)(pvVar4))->Checksum::Update((byte *)&uStack_580,1); uStack_568 = uStack_568 + 1; } while (uStack_568 < 6); - iVar30 = CONCAT13((char)((uint)uVar22 >> 0x18),CONCAT12(0x14,(short)uVar22)); + iVar30 = CONCAT13((char)(GHIDRA_UINT(uVar22) >> 0x18),CONCAT12(0x14,(short)uVar22)); (**(code **)(**(int **)writer + 0x1c))(); - uStack_58c = (byte *)CONCAT31(uStack_58c._1_3_,(char)(uVar23 >> 0x10)); + uStack_58c = (byte *)CONCAT31((*(undefined1 *)((char *)&(uStack_58c) + 0x1)),(char)(uVar23 >> 0x10)); ((Checksum *)(pvVar4))->Checksum::Update((byte *)&uStack_58c,1); uStack_574 = 0; if ((char)(uVar23 >> 0x10) != '\0') { do { puVar2 = (undefined1 *)(*(int *)(iVar30 + 0x4e8) + uStack_574); (**(code **)(**(int **)writer + 0x1c))(); - uStack_58c = (byte *)CONCAT31(uStack_58c._1_3_,*puVar2); + uStack_58c = (byte *)CONCAT31((*(undefined1 *)((char *)&(uStack_58c) + 0x1)),*puVar2); ((Checksum *)(pvVar4))->Checksum::Update((byte *)&uStack_58c,1); uStack_574 = uStack_574 + 1; } while (uStack_574 < (uVar23 >> 0x10 & 0xff)); } iVar28 = 1; (**(code **)(**(int **)writer + 0x1c))(); - uStack_598 = (int *)CONCAT31(uStack_598._1_3_,*(undefined1 *)(iVar30 + 0x4f4)); + uStack_598 = (int *)CONCAT31((*(undefined1 *)((char *)&(uStack_598) + 0x1)),*(undefined1 *)(iVar30 + 0x4f4)); ((Checksum *)(pvVar4))->Checksum::Update((byte *)&uStack_598,1); (**(code **)(**(int **)writer + 0x1c))(); ((Checksum *)(pvVar4))->Checksum::Update(abStack_5a2 + 0x2a,4); @@ -4344,16 +4344,16 @@ void GameState::write_player(void *playerState, void *writer) ((Checksum *)(pvVar4))->Checksum::Update(abStack_662 + 6,4); uStack_6ac = abStack_662 + -0x2a; (**(code **)(**(int **)writer + 0x1c))(); - uStack_694 = CONCAT31(uStack_694._1_3_,uVar11); + uStack_694 = CONCAT31((*(undefined1 *)((char *)&(uStack_694) + 0x1)),uVar11); pbStack_6b8 = (byte *)0x9d68c4; ((Checksum *)(pvVar4))->Checksum::Update((byte *)&uStack_694,1); pbStack_6b8 = abStack_662 + -0x37; (**(code **)(**(int **)writer + 0x1c))(); - uStack_5f8 = CONCAT31(uStack_5f8._1_3_,(char)((uint)iVar21 >> 0x18)); + uStack_5f8 = CONCAT31((*(undefined1 *)((char *)&(uStack_5f8) + 0x1)),(char)(GHIDRA_UINT(iVar21) >> 0x18)); uStack_61c = 0x9d68fe; ((Checksum *)(pvVar4))->Checksum::Update((byte *)&uStack_5f8,1); uStack_61c = iVar26 + 0x34; - } while (iVar25 + 1U < (uint)((*(int *)(iVar27 + 0x55c) - *(int *)(iVar27 + 0x558)) / 0x34)); + } while (iVar25 + 1U < GHIDRA_UINT(((*(int *)(iVar27 + 0x55c) - *(int *)(iVar27 + 0x558)) / 0x34))); } uStack_61c = iVar27 + 0x564; uVar22 = 1; @@ -4366,7 +4366,7 @@ void GameState::write_player(void *playerState, void *writer) do { uStack_628 = abStack_602 + -6; (**(code **)(**(int **)writer + 0x1c))(); - uStack_610 = (undefined4 *)CONCAT31(uStack_610._1_3_,(char)uVar22); + uStack_610 = (undefined4 *)CONCAT31((*(undefined1 *)((char *)&(uStack_610) + 0x1)),(char)uVar22); ((Checksum *)(pvVar4))->Checksum::Update((byte *)&uStack_610,1); uStack_5f8 = *piVar29; (**(code **)(**(int **)writer + 0x1c))(); @@ -4382,13 +4382,13 @@ void GameState::write_player(void *playerState, void *writer) uVar22 = 1; iVar25 = 1; (**(code **)(**(int **)writer + 0x1c))(); - uStack_61c = CONCAT31(uStack_61c._1_3_,*(undefined1 *)(iVar20 + 0x590)); + uStack_61c = CONCAT31((*(undefined1 *)((char *)&(uStack_61c) + 0x1)),*(undefined1 *)(iVar20 + 0x590)); ((Checksum *)(pvVar4))->Checksum::Update((byte *)&uStack_61c,1); piVar29 = (int *)(iVar28 + 0x594); iVar30 = 4; do { (**(code **)(**(int **)writer + 0x1c))(); - uStack_628 = (byte *)CONCAT31(uStack_628._1_3_,(char)uVar22); + uStack_628 = (byte *)CONCAT31((*(undefined1 *)((char *)&(uStack_628) + 0x1)),(char)uVar22); uStack_64c = (int *)0x9d6a61; ((Checksum *)(pvVar4))->Checksum::Update((byte *)&uStack_628,1); uStack_64c = &uStack_610; @@ -4413,13 +4413,13 @@ void GameState::write_player(void *playerState, void *writer) ((Checksum *)(pvVar4))->Checksum::Update(abStack_602 + -0x12,4); iVar30 = 1; (**(code **)(**(int **)writer + 0x1c))(); - uStack_64c = (int *)CONCAT31(uStack_64c._1_3_,*(undefined1 *)(iVar20 + 0x5d0)); + uStack_64c = (int *)CONCAT31((*(undefined1 *)((char *)&(uStack_64c) + 0x1)),*(undefined1 *)(iVar20 + 0x5d0)); uStack_670 = (undefined1 *)0x9d6b3a; ((Checksum *)(pvVar4))->Checksum::Update((byte *)&uStack_64c,1); uVar22 = 1; uStack_670 = (undefined1 *)(iVar27 + 0x5d1); (**(code **)(**(int **)writer + 0x1c))(); - uStack_658 = CONCAT31(uStack_658._1_3_,*(undefined1 *)(iVar27 + 0x5d1)); + uStack_658 = CONCAT31((*(undefined1 *)((char *)&(uStack_658) + 0x1)),*(undefined1 *)(iVar27 + 0x5d1)); uStack_67c = 0x9d6b65; ((Checksum *)(pvVar4))->Checksum::Update((byte *)&uStack_658,1); uStack_67c = iVar28 + 0x524; @@ -4429,16 +4429,16 @@ void GameState::write_player(void *playerState, void *writer) ((Checksum *)(pvVar4))->Checksum::Update(abStack_63e + 6,4); uStack_688 = abStack_662 + -8; iVar25 = 1; - iVar28 = CONCAT13((char)((uint)uVar22 >> 0x18), + iVar28 = CONCAT13((char)(GHIDRA_UINT(uVar22) >> 0x18), CONCAT12((char)(*(int *)(iVar30 + 0x504) - *(int *)(iVar30 + 0x500) >> 2), (short)uVar22)); (**(code **)(**(int **)writer + 0x1c))(); - uStack_670 = (undefined1 *)CONCAT31(uStack_670._1_3_,(char)((uint)iVar26 >> 0x10)); + uStack_670 = (undefined1 *)CONCAT31((*(undefined1 *)((char *)&(uStack_670) + 0x1)),(char)(GHIDRA_UINT(iVar26) >> 0x10)); uStack_694 = 0x9d6bcd; ((Checksum *)(pvVar4))->Checksum::Update((byte *)&uStack_670,1); uVar23 = 0; bVar1 = 0; - if ((char)((uint)iVar26 >> 0x10) != '\0') { + if ((char)(GHIDRA_UINT(iVar26) >> 0x10) != '\0') { do { uStack_694 = *(int *)(iVar30 + 0x500) + uVar23 * 4; (**(code **)(**(int **)writer + 0x1c))(); @@ -4446,9 +4446,9 @@ void GameState::write_player(void *playerState, void *writer) iVar30 = iVar28; ((Checksum *)(pvVar4))->Checksum::Update(abStack_63e + -6,4); bVar1 = bVar1 + 1; - uVar23 = (uint)bVar1; + uVar23 = GHIDRA_UINT(bVar1); iVar28 = iVar30; - } while (bVar1 < (byte)((uint)iVar26 >> 0x10)); + } while (bVar1 < (byte)(GHIDRA_UINT(iVar26) >> 0x10)); } uStack_694 = iVar30 + 0x50c; iVar30 = 4; @@ -4466,7 +4466,7 @@ void GameState::write_player(void *playerState, void *writer) pcVar3 = (char *)(iVar25 + 0x5bc); uStack_6ac = (byte *)pcVar3; (**(code **)(**(int **)writer + 0x1c))(); - uStack_694 = CONCAT31(uStack_694._1_3_,*pcVar3); + uStack_694 = CONCAT31((*(undefined1 *)((char *)&(uStack_694) + 0x1)),*pcVar3); pbStack_6b8 = (byte *)0x9d6c9a; ((Checksum *)(pvVar4))->Checksum::Update((byte *)&uStack_694,1); if (*pcVar3 != -1) { @@ -4487,15 +4487,15 @@ void GameState::write_player(void *playerState, void *writer) do { uStack_688 = (byte *)listEntry[2]; if (*(char *)(listEntry + 1) == '\0') { - if ((int)uStack_688 < 0) { - uStack_688 = (byte *)(-(int)uStack_688 | 0x2000000); + if (GHIDRA_INT(uStack_688) < 0) { + uStack_688 = (byte *)(-GHIDRA_INT(uStack_688) | 0x2000000); } } - else if ((int)uStack_688 < 0) { - uStack_688 = (byte *)(-(int)uStack_688 | 0x3000000); + else if (GHIDRA_INT(uStack_688) < 0) { + uStack_688 = (byte *)(-GHIDRA_INT(uStack_688) | 0x3000000); } else { - uStack_688 = (byte *)((uint)uStack_688 | 0x1000000); + uStack_688 = (byte *)(GHIDRA_UINT(uStack_688) | 0x1000000); } uVar23 = listEntry[4]; uStack_67c = listEntry[5]; @@ -4534,29 +4534,29 @@ void GameState::write_player(void *playerState, void *writer) piVar29 = piVar29 + -1; iVar30 = iVar30 + -1; } while (-1 < iVar30); - uVar8 = (uint)uVar7; + uVar8 = GHIDRA_UINT(uVar7); uVar22 = 1; (**(code **)(**(int **)writer + 0x1c))(abStack_662 + -0x45,1,1); - uStack_6ac = (byte *)CONCAT31(uStack_6ac._1_3_,(char)((uint)pcVar3 >> 8)); + uStack_6ac = (byte *)CONCAT31((*(undefined1 *)((char *)&(uStack_6ac) + 0x1)),(char)(GHIDRA_UINT(pcVar3) >> 8)); ((Checksum *)(pvVar4))->Checksum::Update((byte *)&uStack_6ac,1); uVar11 = (undefined1)uVar22; uVar6 = 0; bVar1 = 0; - if ((char)((uint)pcVar3 >> 8) != '\0') { + if ((char)(GHIDRA_UINT(pcVar3) >> 8) != '\0') { do { - uVar6 = (uint)*(ushort *)(pcVar10 + uVar6 * 4 + 0x3c8); + uVar6 = GHIDRA_UINT(*(ushort *)(pcVar10 + uVar6 * 4 + 0x3c8)); (**(code **)(**(int **)writer + 0x1c))(abStack_662 + -0x1e,2,1); uStack_67c = uVar6 & 0xffff; ((Checksum *)(pvVar4))->Checksum::Update((byte *)&uStack_67c,2); uVar11 = (undefined1)uVar22; bVar1 = bVar1 + 1; - uVar6 = (uint)bVar1; - } while (bVar1 < (byte)((uint)pcVar3 >> 8)); + uVar6 = GHIDRA_UINT(bVar1); + } while (bVar1 < (byte)(GHIDRA_UINT(pcVar3) >> 8)); } iVar30 = 1; pcVar5 = (char *)0x1; (**(code **)(**(int **)writer + 0x1c))(abStack_662 + -0x4e); - pbStack_6b8 = (byte *)CONCAT31(pbStack_6b8._1_3_,uVar11); + pbStack_6b8 = (byte *)CONCAT31((*(undefined1 *)((char *)&(pbStack_6b8) + 0x1)),uVar11); ((Checksum *)(pvVar4))->Checksum::Update((byte *)&pbStack_6b8,1); uVar6 = 0; if (*(int *)(pcVar10 + 0x428) - *(int *)(pcVar10 + 0x424) >> 2 != 0) { @@ -4568,7 +4568,7 @@ void GameState::write_player(void *playerState, void *writer) ((Checksum *)(pvVar4))->Checksum::Update((byte *)&uStack_688,4); uVar6 = uVar6 + 1; pcVar3 = pcVar10; - } while (uVar6 < (uint)(*(int *)(pcVar10 + 0x428) - *(int *)(pcVar10 + 0x424) >> 2)); + } while (uVar6 < GHIDRA_UINT((*(int *)(pcVar10 + 0x428) - *(int *)(pcVar10 + 0x424) >> 2))); } iVar28 = 4; (**(code **)(**(int **)writer + 0x1c))(abStack_662 + -0x2a,4,1); @@ -4577,12 +4577,12 @@ void GameState::write_player(void *playerState, void *writer) uStack_6ac = (byte *)**(int **)(pcVar10 + 0x5d4); if (uStack_6ac != (byte *)*(int **)(pcVar10 + 0x5d4)) { do { - uStack_6a0 = (byte *)(uint)*(ushort *)((char *)uStack_6ac + 0x14); + uStack_6a0 = (byte *)GHIDRA_UINT(*(ushort *)((char *)uStack_6ac + 0x14)); (**(code **)(**(int **)writer + 0x1c))(abStack_662 + -0x3a,2,1); uStack_6a0 = (byte *)(uVar8 & 0xffff); ((Checksum *)(pvVar4))->Checksum::Update((byte *)&uStack_6a0,2); (**(code **)(**(int **)writer + 0x1c))(&uStack_6ac,2,1); - uStack_694 = (uint)uStack_6a0 & 0xffff; + uStack_694 = GHIDRA_UINT(uStack_6a0) & 0xffff; ((Checksum *)(pvVar4))->Checksum::Update((byte *)&uStack_694,2); std:: _Tree_unchecked_const_iterator_>,std::_Iterator_base0> @@ -4632,7 +4632,7 @@ void GameState::read_record(uint *record, int *stream) undefined4 local_8; undefined8 *entryEnd; - local_8 = __security_cookie ^ (uint)(checksumByte + 0x18); + local_8 = __security_cookie ^ GHIDRA_UINT((checksumByte + 0x18)); (**(code **)(*(int *)*stream + 0x14))(record,4,1); local_24 = *record; ((Checksum *)(stream + 3))->Checksum::Update((byte *)&local_24,4); @@ -4651,8 +4651,8 @@ void GameState::read_record(uint *record, int *stream) (**(code **)(*(int *)*stream + 0x14))(record + 5,4,1); local_24 = record[5]; ((Checksum *)(stream + 3))->Checksum::Update((byte *)&local_24,4); - entryCount = 0x1f - ((uint)stream[2] < 0x94); - if ((uint)stream[2] < 0xa2) { + entryCount = 0x1f - (GHIDRA_UINT(stream[2]) < 0x94); + if (GHIDRA_UINT(stream[2]) < 0xa2) { entryField2 = entryField2 & 0xffffff00; entryField3 = 0x3f800000; local_24 = 0; @@ -4691,7 +4691,7 @@ void GameState::read_record(uint *record, int *stream) local_24 = entryCount; ((Checksum *)(stream + 3))->Checksum::Update((byte *)&local_24,4); local_24 = 0; - if (0 < (int)entryCount) { + if (0 < GHIDRA_INT(entryCount)) { do { (**(code **)(*(int *)*stream + 0x14))(&entry,4,1); checksumValue = entry; @@ -4700,7 +4700,7 @@ void GameState::read_record(uint *record, int *stream) (**(code **)(*(int *)*stream + 0x14))(&flagByte,1,1); checksumByte[0] = flagByte; ((Checksum *)(stream + 3))->Checksum::Update(checksumByte,1); - entryField2 = CONCAT31(entryField2._1_3_,flagByte != 0); + entryField2 = CONCAT31((*(undefined1 *)((char *)&(entryField2) + 0x1)),flagByte != 0); (**(code **)(*(int *)*stream + 0x14))(&entryField3,4,1); checksumValue = entryField3; ((Checksum *)(stream + 3))->Checksum::Update((byte *)&checksumValue,4); @@ -4714,7 +4714,7 @@ void GameState::read_record(uint *record, int *stream) record[10] = record[10] + 0xc; } local_24 = local_24 + 1; - } while ((int)local_24 < (int)entryCount); + } while (GHIDRA_INT(local_24) < GHIDRA_INT(entryCount)); } record[7] = record[6]; entryCount = 0; @@ -4722,7 +4722,7 @@ void GameState::read_record(uint *record, int *stream) checksumValue = entryCount; ((Checksum *)(stream + 3))->Checksum::Update((byte *)&checksumValue,4); local_24 = 0; - if (0 < (int)entryCount) { + if (0 < GHIDRA_INT(entryCount)) { do { (**(code **)(*(int *)*stream + 0x14))(&entry,4,1); checksumValue = entry; @@ -4731,7 +4731,7 @@ void GameState::read_record(uint *record, int *stream) (**(code **)(*(int *)*stream + 0x14))(&flagByte,1,1); checksumByte[0] = flagByte; ((Checksum *)(stream + 3))->Checksum::Update(checksumByte,1); - entryField2 = CONCAT31(entryField2._1_3_,flagByte != 0); + entryField2 = CONCAT31((*(undefined1 *)((char *)&(entryField2) + 0x1)),flagByte != 0); (**(code **)(*(int *)*stream + 0x14))(&entryField3,4,1); checksumValue = entryField3; ((Checksum *)(stream + 3))->Checksum::Update((byte *)&checksumValue,4); @@ -4745,7 +4745,7 @@ void GameState::read_record(uint *record, int *stream) record[7] = record[7] + 0xc; } local_24 = local_24 + 1; - } while ((int)local_24 < (int)entryCount); + } while (GHIDRA_INT(local_24) < GHIDRA_INT(entryCount)); } } (**(code **)(*(int *)*stream + 0x14))(record + 0xc,4,1); @@ -4755,7 +4755,7 @@ void GameState::read_record(uint *record, int *stream) checksumValue = record[0xd]; ((Checksum *)(stream + 3))->Checksum::Update((byte *)&checksumValue,4); record[0x12] = record[0x11]; - if (0x9e < (uint)stream[2]) { + if (0x9e < GHIDRA_UINT(stream[2])) { (**(code **)(*(int *)*stream + 0x14))(&entryCount,4,1); checksumValue = entryCount; ((Checksum *)(stream + 3))->Checksum::Update((byte *)&checksumValue,4); @@ -4776,7 +4776,7 @@ void GameState::read_record(uint *record, int *stream) checksumByte[0] = flagByte; ((Checksum *)(stream + 3))->Checksum::Update(checksumByte,1); entryEnd = (undefined8 *)record[0x12]; - entryField3 = CONCAT31(entryField3._1_3_,flagByte != 0); + entryField3 = CONCAT31((*(undefined1 *)((char *)&(entryField3) + 0x1)),flagByte != 0); if (entryEnd == (undefined8 *)record[0x13]) { std::vector<12byte>::_Emplace_reallocate(entryEnd,&entry); } @@ -4790,7 +4790,7 @@ void GameState::read_record(uint *record, int *stream) } } record[0xf] = record[0xe]; - if (0xa2 < (uint)stream[2]) { + if (0xa2 < GHIDRA_UINT(stream[2])) { (**(code **)(*(int *)*stream + 0x14))(&entryCount,4,1); checksumValue = entryCount; ((Checksum *)(stream + 3))->Checksum::Update((byte *)&checksumValue,4); @@ -4811,7 +4811,7 @@ void GameState::read_record(uint *record, int *stream) checksumByte[0] = flagByte; ((Checksum *)(stream + 3))->Checksum::Update(checksumByte,1); entryEnd = (undefined8 *)record[0xf]; - entryField3 = CONCAT31(entryField3._1_3_,flagByte != 0); + entryField3 = CONCAT31((*(undefined1 *)((char *)&(entryField3) + 0x1)),flagByte != 0); if (entryEnd == (undefined8 *)record[0x10]) { std::vector<12byte>::_Emplace_reallocate(entryEnd,&entry); } @@ -4842,26 +4842,26 @@ void GameState::write_score_sheet(void *writer) writerLocal = writer; (**(code **)(**(int **)writer + 0x1c))(this,4,1); writer = *(void **)this; - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update((byte *)&writer,4); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update((byte *)&writer,4); (**(code **)(**(int **)writerLocal + 0x1c))(&(*(undefined1 *)((char *)(this) + 0x4)),4,1); writer = *(void **)&(*(undefined1 *)((char *)(this) + 0x4)); - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update((byte *)&writer,4); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update((byte *)&writer,4); (**(code **)(**(int **)writerLocal + 0x1c))(&(*(undefined1 *)((char *)(this) + 0x8)),4,1); writer = *(void **)&(*(undefined1 *)((char *)(this) + 0x8)); - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update((byte *)&writer,4); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update((byte *)&writer,4); (**(code **)(**(int **)writerLocal + 0x1c))(&(*(undefined1 *)((char *)(this) + 0xc)),4,1); writer = *(void **)&(*(undefined1 *)((char *)(this) + 0xc)); - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update((byte *)&writer,4); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update((byte *)&writer,4); (**(code **)(**(int **)writerLocal + 0x1c))(&(*(undefined1 *)((char *)(this) + 0x10)),4,1); writer = *(void **)&(*(undefined1 *)((char *)(this) + 0x10)); - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update((byte *)&writer,4); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update((byte *)&writer,4); (**(code **)(**(int **)writerLocal + 0x1c))(&(*(undefined1 *)((char *)(this) + 0x14)),4,1); writer = *(void **)&(*(undefined1 *)((char *)(this) + 0x14)); - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update((byte *)&writer,4); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update((byte *)&writer,4); writer = (void *)((*(int *)&(*(undefined1 *)((char *)(this) + 0x28)) - *(int *)&(*(undefined1 *)((char *)(this) + 0x24))) / 0xc); (**(code **)(**(int **)writerLocal + 0x1c))(&writer,4,1); local_10 = writer; - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update((byte *)&local_10,4); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update((byte *)&local_10,4); local_10 = (void *)0x0; iVar2 = *(int *)&(*(undefined1 *)((char *)(this) + 0x28)) - *(int *)&(*(undefined1 *)((char *)(this) + 0x24)); iVar1 = iVar2 >> 0x1f; @@ -4871,24 +4871,24 @@ void GameState::write_score_sheet(void *writer) field = (undefined4 *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x24)) + entryOffset); (**(code **)(**(int **)writerLocal + 0x1c))(field,4,1); checksumValue = (void *)*field; - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update((byte *)&checksumValue,4); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update((byte *)&checksumValue,4); writer = (void *)CONCAT13(*(char *)(entryOffset + 4 + *(int *)&(*(undefined1 *)((char *)(this) + 0x24))) != '\0', - writer._0_3_); - (**(code **)(**(int **)writerLocal + 0x1c))((int)&writer + 3,1,1); - checksumByte[0] = writer._3_1_; - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update(checksumByte,1); + (*(undefined1 *)((char *)&(writer) + 0x0))); + (**(code **)(**(int **)writerLocal + 0x1c))(GHIDRA_INT(&writer) + 3,1,1); + checksumByte[0] = (*(undefined1 *)((char *)&(writer) + 0x3)); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update(checksumByte,1); field = (undefined4 *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x24)) + entryOffset + 8); (**(code **)(**(int **)writerLocal + 0x1c))(field,4,1); checksumValue = (void *)*field; - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update((byte *)&checksumValue,4); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update((byte *)&checksumValue,4); entryOffset = entryOffset + 0xc; - local_10 = (void *)((int)local_10 + 1); + local_10 = (void *)(GHIDRA_INT(local_10) + 1); } while (local_10 < (void *)((*(int *)&(*(undefined1 *)((char *)(this) + 0x28)) - *(int *)&(*(undefined1 *)((char *)(this) + 0x24))) / 0xc)); } writer = (void *)((*(int *)&(*(undefined1 *)((char *)(this) + 0x1c)) - *(int *)&(*(undefined1 *)((char *)(this) + 0x18))) / 0xc); (**(code **)(**(int **)writerLocal + 0x1c))(&writer,4,1); checksumValue = writer; - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update((byte *)&checksumValue,4); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update((byte *)&checksumValue,4); iVar2 = *(int *)&(*(undefined1 *)((char *)(this) + 0x1c)) - *(int *)&(*(undefined1 *)((char *)(this) + 0x18)); local_10 = (void *)0x0; iVar1 = iVar2 >> 0x1f; @@ -4898,30 +4898,30 @@ void GameState::write_score_sheet(void *writer) field = (undefined4 *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x18)) + entryOffset); (**(code **)(**(int **)writerLocal + 0x1c))(field,4,1); checksumValue = (void *)*field; - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update((byte *)&checksumValue,4); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update((byte *)&checksumValue,4); writer = (void *)CONCAT13(*(char *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x18)) + 4 + entryOffset) != '\0', - writer._0_3_); - (**(code **)(**(int **)writerLocal + 0x1c))((int)&writer + 3,1,1); - checksumByte[0] = writer._3_1_; - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update(checksumByte,1); + (*(undefined1 *)((char *)&(writer) + 0x0))); + (**(code **)(**(int **)writerLocal + 0x1c))(GHIDRA_INT(&writer) + 3,1,1); + checksumByte[0] = (*(undefined1 *)((char *)&(writer) + 0x3)); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update(checksumByte,1); field = (undefined4 *)(entryOffset + 8 + *(int *)&(*(undefined1 *)((char *)(this) + 0x18))); (**(code **)(**(int **)writerLocal + 0x1c))(field,4,1); checksumValue = (void *)*field; - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update((byte *)&checksumValue,4); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update((byte *)&checksumValue,4); entryOffset = entryOffset + 0xc; - local_10 = (void *)((int)local_10 + 1); + local_10 = (void *)(GHIDRA_INT(local_10) + 1); } while (local_10 < (void *)((*(int *)&(*(undefined1 *)((char *)(this) + 0x1c)) - *(int *)&(*(undefined1 *)((char *)(this) + 0x18))) / 0xc)); } (**(code **)(**(int **)writerLocal + 0x1c))(&(*(undefined1 *)((char *)(this) + 0x30)),4,1); writer = *(void **)&(*(undefined1 *)((char *)(this) + 0x30)); - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update((byte *)&writer,4); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update((byte *)&writer,4); (**(code **)(**(int **)writerLocal + 0x1c))(&(*(undefined1 *)((char *)(this) + 0x34)),4,1); writer = *(void **)&(*(undefined1 *)((char *)(this) + 0x34)); - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update((byte *)&writer,4); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update((byte *)&writer,4); writer = (void *)((*(int *)&(*(undefined1 *)((char *)(this) + 0x48)) - *(int *)&(*(undefined1 *)((char *)(this) + 0x44))) / 0xc); (**(code **)(**(int **)writerLocal + 0x1c))(&writer,4,1); checksumValue = writer; - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update((byte *)&checksumValue,4); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update((byte *)&checksumValue,4); local_10 = (void *)0x0; iVar2 = *(int *)&(*(undefined1 *)((char *)(this) + 0x48)) - *(int *)&(*(undefined1 *)((char *)(this) + 0x44)); iVar1 = iVar2 >> 0x1f; @@ -4931,24 +4931,24 @@ void GameState::write_score_sheet(void *writer) field = (undefined4 *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x44)) + entryOffset); (**(code **)(**(int **)writerLocal + 0x1c))(field,4,1); checksumValue = (void *)*field; - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update((byte *)&checksumValue,4); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update((byte *)&checksumValue,4); field = (undefined4 *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x44)) + entryOffset + 4); (**(code **)(**(int **)writerLocal + 0x1c))(field,4,1); checksumValue = (void *)*field; - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update((byte *)&checksumValue,4); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update((byte *)&checksumValue,4); writer = (void *)CONCAT13(*(char *)(entryOffset + 8 + *(int *)&(*(undefined1 *)((char *)(this) + 0x44))) != '\0', - writer._0_3_); - (**(code **)(**(int **)writerLocal + 0x1c))((int)&writer + 3,1,1); - checksumByte[0] = writer._3_1_; - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update(checksumByte,1); + (*(undefined1 *)((char *)&(writer) + 0x0))); + (**(code **)(**(int **)writerLocal + 0x1c))(GHIDRA_INT(&writer) + 3,1,1); + checksumByte[0] = (*(undefined1 *)((char *)&(writer) + 0x3)); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update(checksumByte,1); entryOffset = entryOffset + 0xc; - local_10 = (void *)((int)local_10 + 1); + local_10 = (void *)(GHIDRA_INT(local_10) + 1); } while (local_10 < (void *)((*(int *)&(*(undefined1 *)((char *)(this) + 0x48)) - *(int *)&(*(undefined1 *)((char *)(this) + 0x44))) / 0xc)); } writer = (void *)((*(int *)&(*(undefined1 *)((char *)(this) + 0x3c)) - *(int *)&(*(undefined1 *)((char *)(this) + 0x38))) / 0xc); (**(code **)(**(int **)writerLocal + 0x1c))(&writer,4,1); checksumValue = writer; - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update((byte *)&checksumValue,4); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update((byte *)&checksumValue,4); iVar2 = *(int *)&(*(undefined1 *)((char *)(this) + 0x3c)) - *(int *)&(*(undefined1 *)((char *)(this) + 0x38)); local_10 = (void *)0x0; iVar1 = iVar2 >> 0x1f; @@ -4958,18 +4958,18 @@ void GameState::write_score_sheet(void *writer) field = (undefined4 *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x38)) + entryOffset); (**(code **)(**(int **)writerLocal + 0x1c))(field,4,1); checksumValue = (void *)*field; - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update((byte *)&checksumValue,4); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update((byte *)&checksumValue,4); field = (undefined4 *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x38)) + entryOffset + 4); (**(code **)(**(int **)writerLocal + 0x1c))(field,4,1); checksumValue = (void *)*field; - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update((byte *)&checksumValue,4); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update((byte *)&checksumValue,4); writer = (void *)CONCAT13(*(char *)(entryOffset + 8 + *(int *)&(*(undefined1 *)((char *)(this) + 0x38))) != '\0', - writer._0_3_); - (**(code **)(**(int **)writerLocal + 0x1c))((int)&writer + 3,1,1); - checksumByte[0] = writer._3_1_; - ((Checksum *)((void *)((int)writerLocal + 0xc)))->Checksum::Update(checksumByte,1); + (*(undefined1 *)((char *)&(writer) + 0x0))); + (**(code **)(**(int **)writerLocal + 0x1c))(GHIDRA_INT(&writer) + 3,1,1); + checksumByte[0] = (*(undefined1 *)((char *)&(writer) + 0x3)); + ((Checksum *)((void *)(GHIDRA_INT(writerLocal) + 0xc)))->Checksum::Update(checksumByte,1); entryOffset = entryOffset + 0xc; - local_10 = (void *)((int)local_10 + 1); + local_10 = (void *)(GHIDRA_INT(local_10) + 1); } while (local_10 < (void *)((*(int *)&(*(undefined1 *)((char *)(this) + 0x3c)) - *(int *)&(*(undefined1 *)((char *)(this) + 0x38))) / 0xc)); } return; @@ -5013,7 +5013,7 @@ byte GameState::read_rerun(void **gameStateIO) int *historyEnd; undefined1 *version; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); (**(code **)(*(int *)this->_saveFile + 0x14))(); version = &(*(undefined1 *)((char *)(this) + 0x1fdf0)); local_1c = 0; @@ -5103,7 +5103,7 @@ byte GameState::read_rerun(void **gameStateIO) (**(code **)(*(int *)*gameStateIO + 0x14))(); playerCountBuf[0] = playerCount; ((Checksum *)(gameStateIO + 3))->Checksum::Update(playerCountBuf,1); - *(int *)&(*(undefined1 *)((char *)(this) + 0x19d78)) = (int)(char)playerCount; + *(int *)&(*(undefined1 *)((char *)(this) + 0x19d78)) = GHIDRA_INT((char)playerCount); i = 0; if (0 < (char)playerCount) { this_00 = (GameStatePlayer *)&(*(undefined1 *)((char *)(this) + 0x19d7c)); @@ -5111,7 +5111,7 @@ byte GameState::read_rerun(void **gameStateIO) ((GameStatePlayer *)(this_00))->GameStatePlayer::read(gameStateIO); this_00 = this_00 + 0x177; i = i + 1; - } while ((int)i < *(int *)&(*(undefined1 *)((char *)(this) + 0x19d78))); + } while (GHIDRA_INT(i) < *(int *)&(*(undefined1 *)((char *)(this) + 0x19d78))); } } (**(code **)(*(int *)*gameStateIO + 0x14))(); @@ -5126,23 +5126,23 @@ byte GameState::read_rerun(void **gameStateIO) bVar1 = *seedCursor; seedCursor = seedCursor + 1; } while (bVar1 != 0); - ((std::string *)(acStack_ae + -0x26))->std::string::assign(seedText,(int)seedCursor - (int)(seedText + 1)); + ((std::string *)(acStack_ae + -0x26))->std::string::assign(seedText,GHIDRA_INT(seedCursor) - GHIDRA_INT((seedText + 1))); seed._buf[4] = (char)in_stack_ffffff30; - seed._buf[5] = (char)((uint)in_stack_ffffff30 >> 8); - seed._buf[6] = (char)((uint)in_stack_ffffff30 >> 0x10); - seed._buf[7] = (char)((uint)in_stack_ffffff30 >> 0x18); + seed._buf[5] = (char)(GHIDRA_UINT(in_stack_ffffff30) >> 8); + seed._buf[6] = (char)(GHIDRA_UINT(in_stack_ffffff30) >> 0x10); + seed._buf[7] = (char)(GHIDRA_UINT(in_stack_ffffff30) >> 0x18); seed._buf[0] = (char)uVar3; - seed._buf[1] = (char)((uint)uVar3 >> 8); - seed._buf[2] = (char)((uint)uVar3 >> 0x10); - seed._buf[3] = (char)((uint)uVar3 >> 0x18); + seed._buf[1] = (char)(GHIDRA_UINT(uVar3) >> 8); + seed._buf[2] = (char)(GHIDRA_UINT(uVar3) >> 0x10); + seed._buf[3] = (char)(GHIDRA_UINT(uVar3) >> 0x18); seed._buf[8] = (char)in_stack_ffffff34; - seed._buf[9] = (char)((uint)in_stack_ffffff34 >> 8); - seed._buf[10] = (char)((uint)in_stack_ffffff34 >> 0x10); - seed._buf[0xb] = (char)((uint)in_stack_ffffff34 >> 0x18); + seed._buf[9] = (char)(GHIDRA_UINT(in_stack_ffffff34) >> 8); + seed._buf[10] = (char)(GHIDRA_UINT(in_stack_ffffff34) >> 0x10); + seed._buf[0xb] = (char)(GHIDRA_UINT(in_stack_ffffff34) >> 0x18); seed._buf[0xc] = (char)uVar4; - seed._buf[0xd] = (char)((uint)uVar4 >> 8); - seed._buf[0xe] = (char)((uint)uVar4 >> 0x10); - seed._buf[0xf] = (char)((uint)uVar4 >> 0x18); + seed._buf[0xd] = (char)(GHIDRA_UINT(uVar4) >> 8); + seed._buf[0xe] = (char)(GHIDRA_UINT(uVar4) >> 0x10); + seed._buf[0xf] = (char)(GHIDRA_UINT(uVar4) >> 0x18); seed._size = uVar5; seed._capacity = uVar2; ((Seeds *)((Seeds *)&(*(undefined1 *)((char *)(this) + 0x1e724))))->Seeds::SetStartSeed(seed); @@ -5181,7 +5181,7 @@ byte GameState::write_rerun(void **gameStateIO) local_8 = 0xffffffff; puStack_c = &LAB_00b0f3cd; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(header + 0x24); + uVar1 = __security_cookie ^ GHIDRA_UINT((header + 0x24)); ExceptionList = &local_10; io = gameStateIO; local_18 = uVar1; @@ -5207,7 +5207,7 @@ byte GameState::write_rerun(void **gameStateIO) do { write_player(checksumValue,io); i = i + 1; - checksumValue = (void *)((int)checksumValue + 0x5dc); + checksumValue = (void *)(GHIDRA_INT(checksumValue) + 0x5dc); } while (i < *(int *)&(*(undefined1 *)((char *)(this) + 0x19d78))); } uVar1 = *(uint *)&(*(undefined1 *)((char *)(this) + 0x1e728)); @@ -5232,7 +5232,7 @@ byte GameState::write_rerun(void **gameStateIO) if (0xfff < uVar1) { psVar2 = (std_string *)seedString[0][-1]._capacity; uVar1 = seedStringCapacity + 0x24; - if (0x1f < (uint)((int)seedString[0] + (-4 - (int)psVar2))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(seedString[0]) + (-4 - GHIDRA_INT(psVar2))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -5241,18 +5241,18 @@ byte GameState::write_rerun(void **gameStateIO) } seedStringSize = 0; seedStringCapacity = 0xf; - seedString[0] = (std_string *)((uint)seedString[0] & 0xffffff00); + seedString[0] = (std_string *)(GHIDRA_UINT(seedString[0]) & 0xffffff00); if ((ppvVar3[6] == (void *)0x0) && (pendingByteCount = *(byte *)(ppvVar3 + 4), pendingByteCount != 0)) { if (pendingByteCount < 4) { - memset((void *)((uint)pendingByteCount + (int)checksum),0,(uint)(byte)(4 - pendingByteCount)); + memset((void *)(GHIDRA_UINT(pendingByteCount) + GHIDRA_INT(checksum)),0,GHIDRA_UINT((byte)(4 - pendingByteCount))); } *(undefined1 *)(ppvVar3 + 4) = 0; - ppvVar3[5] = (void *)(((uint)ppvVar3[5] >> 1) + (int)ppvVar3[5] * -0x80000000 + (int)*checksum); + ppvVar3[5] = (void *)((GHIDRA_UINT(ppvVar3[5]) >> 1) + GHIDRA_INT(ppvVar3[5]) * -0x80000000 + GHIDRA_INT(*checksum)); } checksumValue = ppvVar3[5]; *(void **)&(*(undefined1 *)((char *)(this) + 0x1fda4)) = checksumValue; - obfuscatedChecksum = (uint)checksumValue ^ 0x96696996; + obfuscatedChecksum = GHIDRA_UINT(checksumValue) ^ 0x96696996; (**(code **)(*(int *)this->_saveFile + 0x1c))(&obfuscatedChecksum,4,1); ExceptionList = local_10; return 1; diff --git a/src/game/game_state_player.cpp b/src/game/game_state_player.cpp index b801fec..5196be9 100644 --- a/src/game/game_state_player.cpp +++ b/src/game/game_state_player.cpp @@ -9,7 +9,7 @@ GameStatePlayer::~GameStatePlayer() tree = this + 0x175; FID_conflict__Erase_tree_>_> (tree,(fuzzer_allocator_> *)tree, - *(_Tree_node **)((int)this[0x175] + 4)); + *(_Tree_node **)(GHIDRA_INT(this[0x175]) + 4)); operator_delete((void *)*tree,0x18); std::vector<52byte>::_Tidy(); FUN_004b3950(); @@ -47,26 +47,26 @@ void GameStatePlayer::read_player_key(void *stream) srcStream = stream; (**(code **)(**(int **)stream + 0x14))(this,4,1); stream = *(void **)this; - ((Checksum *)((void *)((int)srcStream + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(srcStream) + 0xc)))->Checksum::Update((byte *)&stream,4); stream = this + 1; if (*this == (GameStatePlayer)0x80000000) { (**(code **)(**(int **)srcStream + 0x14))(); stream = *(void **)(this + 1); - ((Checksum *)((void *)((int)srcStream + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(srcStream) + 0xc)))->Checksum::Update((byte *)&stream,4); (**(code **)(**(int **)srcStream + 0x14))(this + 2,2,1); - stream = (void *)(uint)*(ushort *)(this + 2); - ((Checksum *)((void *)((int)srcStream + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT(*(ushort *)(this + 2)); + ((Checksum *)((void *)(GHIDRA_INT(srcStream) + 0xc)))->Checksum::Update((byte *)&stream,2); (**(code **)(**(int **)srcStream + 0x14))(&(*(undefined1 *)((char *)&(this[2]) + 0x2)),2,1); - stream = (void *)(uint)*(ushort *)&(*(undefined1 *)((char *)&(this[2]) + 0x2)); - ((Checksum *)((void *)((int)srcStream + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT(*(ushort *)&(*(undefined1 *)((char *)&(this[2]) + 0x2))); + ((Checksum *)((void *)(GHIDRA_INT(srcStream) + 0xc)))->Checksum::Update((byte *)&stream,2); return; } (**(code **)(**(int **)srcStream + 0x14))(stream,4,1); stream = *(void **)stream; - ((Checksum *)((void *)((int)srcStream + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(srcStream) + 0xc)))->Checksum::Update((byte *)&stream,4); (**(code **)(**(int **)srcStream + 0x14))(this + 2,4,1); stream = *(void **)(this + 2); - ((Checksum *)((void *)((int)srcStream + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(srcStream) + 0xc)))->Checksum::Update((byte *)&stream,4); return; } @@ -187,12 +187,12 @@ void GameStatePlayer::Init() this[0x5b] = (GameStatePlayer)0x0; this[0x5c] = (GameStatePlayer)0x0; if (GVar2 != (GameStatePlayer)0x0) { - uVar3 = (int)oldDequeSize - (int)GVar2 & 0xfffffffc; + uVar3 = GHIDRA_INT(oldDequeSize) - GHIDRA_INT(GVar2) & 0xfffffffc; oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) goto LAB_009cff2f; + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) goto LAB_009cff2f; } operator_delete((void *)oldDequeSize,uVar3); } @@ -205,12 +205,12 @@ void GameStatePlayer::Init() this[0x5e] = (GameStatePlayer)0x0; this[0x5f] = (GameStatePlayer)0x0; if (GVar2 != (GameStatePlayer)0x0) { - uVar3 = (int)oldDequeSize - (int)GVar2 & 0xfffffffc; + uVar3 = GHIDRA_INT(oldDequeSize) - GHIDRA_INT(GVar2) & 0xfffffffc; oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) goto LAB_009cff2f; + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) goto LAB_009cff2f; } operator_delete((void *)oldDequeSize,uVar3); } @@ -223,12 +223,12 @@ void GameStatePlayer::Init() this[0x61] = (GameStatePlayer)0x0; this[0x62] = (GameStatePlayer)0x0; if (GVar2 != (GameStatePlayer)0x0) { - uVar3 = (int)oldDequeSize - (int)GVar2 & 0xfffffff8; + uVar3 = GHIDRA_INT(oldDequeSize) - GHIDRA_INT(GVar2) & 0xfffffff8; oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) goto LAB_009cff2f; + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) goto LAB_009cff2f; } operator_delete((void *)oldDequeSize,uVar3); } @@ -243,15 +243,15 @@ void GameStatePlayer::Init() this[0x7a] = (GameStatePlayer)0x0; GVar1 = GVar2; if (GVar2 != (GameStatePlayer)0x0) { - for (; GVar1 != oldDequeSize; GVar1 = (GameStatePlayer)((int)GVar1 + 0x78)) { + for (; GVar1 != oldDequeSize; GVar1 = (GameStatePlayer)(GHIDRA_INT(GVar1) + 0x78)) { invoke_pending_callbacks((void *)GVar1); } - uVar3 = (((int)local_3c - (int)GVar2) / 0x78) * 0x78; + uVar3 = ((GHIDRA_INT(local_3c) - GHIDRA_INT(GVar2)) / 0x78) * 0x78; oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) goto LAB_009cff2f; + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) goto LAB_009cff2f; } operator_delete((void *)oldDequeSize,uVar3); } @@ -266,12 +266,12 @@ void GameStatePlayer::Init() this[0x76] = (GameStatePlayer)0x0; this[0x77] = (GameStatePlayer)0x0; if (GVar2 != (GameStatePlayer)0x0) { - uVar3 = (int)oldDequeSize - (int)GVar2 & 0xfffffff8; + uVar3 = GHIDRA_INT(oldDequeSize) - GHIDRA_INT(GVar2) & 0xfffffff8; oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) goto LAB_009cff2f; + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) goto LAB_009cff2f; } operator_delete((void *)oldDequeSize,uVar3); } @@ -284,12 +284,12 @@ void GameStatePlayer::Init() this[0x66] = (GameStatePlayer)0x0; this[0x67] = (GameStatePlayer)0x0; if (GVar2 != (GameStatePlayer)0x0) { - uVar3 = (int)oldDequeSize - (int)GVar2 & 0xfffffffc; + uVar3 = GHIDRA_INT(oldDequeSize) - GHIDRA_INT(GVar2) & 0xfffffffc; oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) goto LAB_009cff2f; + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) goto LAB_009cff2f; } operator_delete((void *)oldDequeSize,uVar3); } @@ -302,12 +302,12 @@ void GameStatePlayer::Init() this[0x69] = (GameStatePlayer)0x0; this[0x6a] = (GameStatePlayer)0x0; if (GVar2 != (GameStatePlayer)0x0) { - uVar3 = (int)oldDequeSize - (int)GVar2 & 0xfffffffc; + uVar3 = GHIDRA_INT(oldDequeSize) - GHIDRA_INT(GVar2) & 0xfffffffc; oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) goto LAB_009cff2f; + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) goto LAB_009cff2f; } operator_delete((void *)oldDequeSize,uVar3); } @@ -320,12 +320,12 @@ void GameStatePlayer::Init() this[0x6c] = (GameStatePlayer)0x0; this[0x6d] = (GameStatePlayer)0x0; if (GVar2 != (GameStatePlayer)0x0) { - uVar3 = (int)oldDequeSize - (int)GVar2 & 0xfffffffc; + uVar3 = GHIDRA_INT(oldDequeSize) - GHIDRA_INT(GVar2) & 0xfffffffc; oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) goto LAB_009cff2f; + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) goto LAB_009cff2f; } operator_delete((void *)oldDequeSize,uVar3); } @@ -338,12 +338,12 @@ void GameStatePlayer::Init() this[0x6f] = (GameStatePlayer)0x0; this[0x70] = (GameStatePlayer)0x0; if (GVar2 != (GameStatePlayer)0x0) { - uVar3 = (int)oldDequeSize - (int)GVar2 & 0xfffffffc; + uVar3 = GHIDRA_INT(oldDequeSize) - GHIDRA_INT(GVar2) & 0xfffffffc; oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) goto LAB_009cff2f; + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) goto LAB_009cff2f; } operator_delete((void *)oldDequeSize,uVar3); } @@ -356,12 +356,12 @@ void GameStatePlayer::Init() this[0x72] = (GameStatePlayer)0x0; this[0x73] = (GameStatePlayer)0x0; if (GVar2 != (GameStatePlayer)0x0) { - uVar3 = (int)oldDequeSize - (int)GVar2 & 0xfffffffc; + uVar3 = GHIDRA_INT(oldDequeSize) - GHIDRA_INT(GVar2) & 0xfffffffc; oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) goto LAB_009cff2f; + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) goto LAB_009cff2f; } operator_delete((void *)oldDequeSize,uVar3); } @@ -374,12 +374,12 @@ void GameStatePlayer::Init() this[0xe1] = (GameStatePlayer)0x0; this[0xe2] = (GameStatePlayer)0x0; if (GVar2 != (GameStatePlayer)0x0) { - uVar3 = (((int)oldDequeSize - (int)GVar2) / 0x34) * 0x34; + uVar3 = ((GHIDRA_INT(oldDequeSize) - GHIDRA_INT(GVar2)) / 0x34) * 0x34; oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) goto LAB_009cff2f; + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) goto LAB_009cff2f; } operator_delete((void *)oldDequeSize,uVar3); } @@ -393,12 +393,12 @@ void GameStatePlayer::Init() this[0xe4] = (GameStatePlayer)0x0; this[0xe5] = (GameStatePlayer)0x0; if (GVar2 != (GameStatePlayer)0x0) { - uVar3 = (((int)oldDequeSize - (int)GVar2) / 0x1c) * 0x1c; + uVar3 = ((GHIDRA_INT(oldDequeSize) - GHIDRA_INT(GVar2)) / 0x1c) * 0x1c; oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) goto LAB_009cff2f; + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) goto LAB_009cff2f; } operator_delete((void *)oldDequeSize,uVar3); } @@ -413,12 +413,12 @@ void GameStatePlayer::Init() this[0xf0] = (GameStatePlayer)0x0; this[0xf1] = (GameStatePlayer)0x0; if (GVar2 != (GameStatePlayer)0x0) { - uVar3 = (((int)oldDequeSize - (int)GVar2) / 0x1c) * 0x1c; + uVar3 = ((GHIDRA_INT(oldDequeSize) - GHIDRA_INT(GVar2)) / 0x1c) * 0x1c; oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) goto LAB_009cff2f; + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) goto LAB_009cff2f; } operator_delete((void *)oldDequeSize,uVar3); } @@ -447,12 +447,12 @@ void GameStatePlayer::Init() this[0x10a] = (GameStatePlayer)0x0; this[0x10b] = (GameStatePlayer)0x0; if (GVar2 != (GameStatePlayer)0x0) { - uVar3 = (int)oldDequeSize - (int)GVar2 & 0xfffffffc; + uVar3 = GHIDRA_INT(oldDequeSize) - GHIDRA_INT(GVar2) & 0xfffffffc; oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) goto LAB_009cff2f; + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) goto LAB_009cff2f; } operator_delete((void *)oldDequeSize,uVar3); } @@ -496,12 +496,12 @@ void GameStatePlayer::Init() this[0x147] = (GameStatePlayer)0x0; this[0x148] = (GameStatePlayer)0x0; if (GVar2 != (GameStatePlayer)0x0) { - uVar3 = (int)oldDequeSize - (int)GVar2 & 0xfffffff0; + uVar3 = GHIDRA_INT(oldDequeSize) - GHIDRA_INT(GVar2) & 0xfffffff0; oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) goto LAB_009cff2f; + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) goto LAB_009cff2f; } operator_delete((void *)oldDequeSize,uVar3); } @@ -548,27 +548,27 @@ void GameStatePlayer::Init() oldDequeSize = tmpDequeMapSize; if (tmpDequeSize != (GameStatePlayer)0x0) { do { - tmpDequeSize = (GameStatePlayer)((int)tmpDequeSize + -1); + tmpDequeSize = (GameStatePlayer)(GHIDRA_INT(tmpDequeSize) + -1); local_3c = (GameStatePlayer)0x0; } while (tmpDequeSize != (GameStatePlayer)0x0); tmpDequeOffset = (GameStatePlayer)0x0; tmpDequeSize = (GameStatePlayer)0x0; } while (oldDequeSize != (GameStatePlayer)0x0) { - ptr = *(void **)((char *)GVar2 + -4 + (int)oldDequeSize * 4); - oldDequeSize = (GameStatePlayer)((int)oldDequeSize + -1); + ptr = *(void **)((char *)GVar2 + -4 + GHIDRA_INT(oldDequeSize) * 4); + oldDequeSize = (GameStatePlayer)(GHIDRA_INT(oldDequeSize) + -1); if (ptr != (void *)0x0) { operator_delete(ptr,0x10); GVar2 = tmpDequeMap; } } if (GVar2 != (GameStatePlayer)0x0) { - uVar3 = (int)tmpDequeMapSize * 4; + uVar3 = GHIDRA_INT(tmpDequeMapSize) * 4; oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) goto LAB_009cff2f; + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) goto LAB_009cff2f; } operator_delete((void *)oldDequeSize,uVar3); } @@ -585,12 +585,12 @@ void GameStatePlayer::Init() this[0x132] = (GameStatePlayer)0x0; this[0x133] = (GameStatePlayer)0x0; if (GVar2 != (GameStatePlayer)0x0) { - uVar3 = (int)oldDequeSize - (int)GVar2; + uVar3 = GHIDRA_INT(oldDequeSize) - GHIDRA_INT(GVar2); oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) goto LAB_009cff2f; + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) goto LAB_009cff2f; } operator_delete((void *)oldDequeSize,uVar3); } @@ -605,12 +605,12 @@ void GameStatePlayer::Init() this[0x138] = (GameStatePlayer)0x0; this[0x139] = (GameStatePlayer)0x0; if (GVar2 != (GameStatePlayer)0x0) { - uVar3 = (int)oldDequeSize - (int)GVar2; + uVar3 = GHIDRA_INT(oldDequeSize) - GHIDRA_INT(GVar2); oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) goto LAB_009cff2f; + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) goto LAB_009cff2f; } operator_delete((void *)oldDequeSize,uVar3); } @@ -623,12 +623,12 @@ void GameStatePlayer::Init() this[0x13b] = (GameStatePlayer)0x0; this[0x13c] = (GameStatePlayer)0x0; if (GVar2 != (GameStatePlayer)0x0) { - uVar3 = (int)oldDequeSize - (int)GVar2; + uVar3 = GHIDRA_INT(oldDequeSize) - GHIDRA_INT(GVar2); oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) goto LAB_009cff2f; + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) goto LAB_009cff2f; } operator_delete((void *)oldDequeSize,uVar3); } @@ -645,12 +645,12 @@ void GameStatePlayer::Init() this[0x141] = (GameStatePlayer)0x0; this[0x142] = (GameStatePlayer)0x0; if (GVar2 != (GameStatePlayer)0x0) { - uVar3 = (int)oldDequeSize - (int)GVar2 & 0xfffffffc; + uVar3 = GHIDRA_INT(oldDequeSize) - GHIDRA_INT(GVar2) & 0xfffffffc; oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) goto LAB_009cff2f; + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) goto LAB_009cff2f; } operator_delete((void *)oldDequeSize,uVar3); } @@ -667,12 +667,12 @@ void GameStatePlayer::Init() this[0x157] = (GameStatePlayer)0x0; this[0x158] = (GameStatePlayer)0x0; if (GVar2 != (GameStatePlayer)0x0) { - uVar3 = (((int)oldDequeSize - (int)GVar2) / 0x34) * 0x34; + uVar3 = ((GHIDRA_INT(oldDequeSize) - GHIDRA_INT(GVar2)) / 0x34) * 0x34; oldDequeSize = GVar2; if (0xfff < uVar3) { oldDequeSize = *(GameStatePlayer *)((char *)GVar2 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)GVar2 - (int)oldDequeSize) - 4U) { + if (0x1f < (GHIDRA_INT(GVar2) - GHIDRA_INT(oldDequeSize)) - 4U) { LAB_009cff2f: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -726,7 +726,7 @@ LAB_009cff2f: } FID_conflict__Erase_tree_>_> (&local_3c,(fuzzer_allocator_> *)&local_3c, - *(_Tree_node **)((int)local_3c + 4)); + *(_Tree_node **)(GHIDRA_INT(local_3c) + 4)); operator_delete((void *)local_3c,0x18); memberField = this + 0x105; this[0xdb] = (GameStatePlayer)0x0; @@ -738,7 +738,7 @@ LAB_009cff2f: this[0x106] = (GameStatePlayer)0x0; this[0x107] = (GameStatePlayer)0x0; if (GVar2 != (GameStatePlayer)0x0) { - FUN_005cbf50(GVar2,(int)oldDequeSize - (int)GVar2 >> 4); + FUN_005cbf50(GVar2,GHIDRA_INT(oldDequeSize) - GHIDRA_INT(GVar2) >> 4); } } this[0x108] = (GameStatePlayer)0x0; @@ -752,42 +752,42 @@ byte GameStatePlayer::read_coplayer(short *block, void *stream) pvVar1 = stream; (**(code **)(**(int **)stream + 0x14))(block,2,1); - stream = (void *)(uint)(ushort)*block; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT((ushort)*block); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&stream,2); (**(code **)(**(int **)pvVar1 + 0x14))(block + 1,2,1); - stream = (void *)(uint)(ushort)block[1]; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT((ushort)block[1]); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&stream,2); (**(code **)(**(int **)pvVar1 + 0x14))(block + 2,2,1); - stream = (void *)(uint)(ushort)block[2]; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT((ushort)block[2]); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&stream,2); (**(code **)(**(int **)pvVar1 + 0x14))(block + 3,2,1); - stream = (void *)(uint)(ushort)block[3]; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT((ushort)block[3]); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&stream,2); (**(code **)(**(int **)pvVar1 + 0x14))(block + 4,2,1); - stream = (void *)(uint)(ushort)block[4]; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT((ushort)block[4]); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&stream,2); (**(code **)(**(int **)pvVar1 + 0x14))(block + 5,2,1); - stream = (void *)(uint)(ushort)block[5]; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT((ushort)block[5]); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&stream,2); (**(code **)(**(int **)pvVar1 + 0x14))(block + 6,2,1); - stream = (void *)(uint)(ushort)block[6]; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT((ushort)block[6]); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&stream,2); (**(code **)(**(int **)pvVar1 + 0x14))(block + 7,2,1); - stream = (void *)(uint)(ushort)block[7]; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT((ushort)block[7]); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&stream,2); (**(code **)(**(int **)pvVar1 + 0x14))(block + 10,4,1); stream = *(void **)(block + 10); - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&stream,4); (**(code **)(**(int **)pvVar1 + 0x14))(block + 0xc,4,1); stream = *(void **)(block + 0xc); - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&stream,4); if (0x91 < *(uint *)((char *)pvVar1 + 8)) { (**(code **)(**(int **)pvVar1 + 0x14))(block + 9,2,1); - stream = (void *)(uint)(ushort)block[9]; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT((ushort)block[9]); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&stream,2); (**(code **)(**(int **)pvVar1 + 0x14))(block + 8,2,1); - stream = (void *)(uint)(ushort)block[8]; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT((ushort)block[8]); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&stream,2); } return 1; } @@ -799,41 +799,41 @@ void GameStatePlayer::write_coplayer(void *stream) writer = stream; (**(code **)(**(int **)stream + 0x1c))(this,2,1); - stream = (void *)(uint)*(ushort *)this; - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT(*(ushort *)this); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&stream,2); (**(code **)(**(int **)writer + 0x1c))(&(*(undefined1 *)((char *)(this) + 0x2)),2,1); - stream = (void *)(uint)*(ushort *)&(*(undefined1 *)((char *)(this) + 0x2)); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT(*(ushort *)&(*(undefined1 *)((char *)(this) + 0x2))); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&stream,2); (**(code **)(**(int **)writer + 0x1c))(this + 1,2,1); - stream = (void *)(uint)*(ushort *)(this + 1); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT(*(ushort *)(this + 1)); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&stream,2); (**(code **)(**(int **)writer + 0x1c))(&(*(undefined1 *)((char *)&(this[1]) + 0x2)),2,1); - stream = (void *)(uint)*(ushort *)&(*(undefined1 *)((char *)&(this[1]) + 0x2)); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT(*(ushort *)&(*(undefined1 *)((char *)&(this[1]) + 0x2))); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&stream,2); (**(code **)(**(int **)writer + 0x1c))(this + 2,2,1); - stream = (void *)(uint)*(ushort *)(this + 2); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT(*(ushort *)(this + 2)); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&stream,2); (**(code **)(**(int **)writer + 0x1c))(&(*(undefined1 *)((char *)&(this[2]) + 0x2)),2,1); - stream = (void *)(uint)*(ushort *)&(*(undefined1 *)((char *)&(this[2]) + 0x2)); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT(*(ushort *)&(*(undefined1 *)((char *)&(this[2]) + 0x2))); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&stream,2); (**(code **)(**(int **)writer + 0x1c))(this + 3,2,1); - stream = (void *)(uint)*(ushort *)(this + 3); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT(*(ushort *)(this + 3)); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&stream,2); (**(code **)(**(int **)writer + 0x1c))(&(*(undefined1 *)((char *)&(this[3]) + 0x2)),2,1); - stream = (void *)(uint)*(ushort *)&(*(undefined1 *)((char *)&(this[3]) + 0x2)); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT(*(ushort *)&(*(undefined1 *)((char *)&(this[3]) + 0x2))); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&stream,2); (**(code **)(**(int **)writer + 0x1c))(this + 5,4,1); stream = *(void **)(this + 5); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&stream,4); (**(code **)(**(int **)writer + 0x1c))(this + 6,4,1); stream = *(void **)(this + 6); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&stream,4); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&stream,4); (**(code **)(**(int **)writer + 0x1c))(&(*(undefined1 *)((char *)&(this[4]) + 0x2)),2,1); - stream = (void *)(uint)*(ushort *)&(*(undefined1 *)((char *)&(this[4]) + 0x2)); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT(*(ushort *)&(*(undefined1 *)((char *)&(this[4]) + 0x2))); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&stream,2); (**(code **)(**(int **)writer + 0x1c))(this + 4,2,1); - stream = (void *)(uint)*(ushort *)(this + 4); - ((Checksum *)((void *)((int)writer + 0xc)))->Checksum::Update((byte *)&stream,2); + stream = (void *)GHIDRA_UINT(*(ushort *)(this + 4)); + ((Checksum *)((void *)(GHIDRA_INT(writer) + 0xc)))->Checksum::Update((byte *)&stream,2); return; } @@ -847,38 +847,38 @@ void GameStatePlayer::read_block_538(uint *block, void *stream) pvVar1 = stream; (**(code **)(**(int **)stream + 0x14))(value,2,1); - checksumValue = (uint)value[0]; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&checksumValue,2); - *block = (uint)value[0]; + checksumValue = GHIDRA_UINT(value[0]); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&checksumValue,2); + *block = GHIDRA_UINT(value[0]); (**(code **)(**(int **)pvVar1 + 0x14))(value,2,1); - checksumValue = (uint)value[0]; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&checksumValue,2); - block[1] = (uint)value[0]; + checksumValue = GHIDRA_UINT(value[0]); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&checksumValue,2); + block[1] = GHIDRA_UINT(value[0]); (**(code **)(**(int **)pvVar1 + 0x14))(value,2,1); - checksumValue = (uint)value[0]; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&checksumValue,2); - block[2] = (uint)value[0]; - (**(code **)(**(int **)pvVar1 + 0x14))((int)&stream + 3,1,1); - flagsByte[0] = stream._3_1_; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update(flagsByte,1); - *(byte *)(block + 3) = stream._3_1_ & 1; - *(byte *)((char *)block + 0xd) = stream._3_1_ >> 1 & 1; + checksumValue = GHIDRA_UINT(value[0]); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&checksumValue,2); + block[2] = GHIDRA_UINT(value[0]); + (**(code **)(**(int **)pvVar1 + 0x14))(GHIDRA_INT(&stream) + 3,1,1); + flagsByte[0] = (*(undefined1 *)((char *)&(stream) + 0x3)); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update(flagsByte,1); + *(byte *)(block + 3) = (*(undefined1 *)((char *)&(stream) + 0x3)) & 1; + *(byte *)((char *)block + 0xd) = (*(undefined1 *)((char *)&(stream) + 0x3)) >> 1 & 1; (**(code **)(**(int **)pvVar1 + 0x14))(value,2,1); - checksumValue = (uint)value[0]; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&checksumValue,2); - block[4] = (uint)value[0]; + checksumValue = GHIDRA_UINT(value[0]); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&checksumValue,2); + block[4] = GHIDRA_UINT(value[0]); (**(code **)(**(int **)pvVar1 + 0x14))(value,2,1); - checksumValue = (uint)value[0]; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&checksumValue,2); - block[5] = (uint)value[0]; + checksumValue = GHIDRA_UINT(value[0]); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&checksumValue,2); + block[5] = GHIDRA_UINT(value[0]); (**(code **)(**(int **)pvVar1 + 0x14))(value,2,1); - checksumValue = (uint)value[0]; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&checksumValue,2); - block[6] = (uint)value[0]; + checksumValue = GHIDRA_UINT(value[0]); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&checksumValue,2); + block[6] = GHIDRA_UINT(value[0]); (**(code **)(**(int **)pvVar1 + 0x14))(value,2,1); - checksumValue = (uint)value[0]; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&checksumValue,2); - block[7] = (uint)value[0]; + checksumValue = GHIDRA_UINT(value[0]); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&checksumValue,2); + block[7] = GHIDRA_UINT(value[0]); return; } @@ -893,47 +893,47 @@ void GameStatePlayer::write_block_538(short *block, void *stream) byte packedByte [4]; pvVar1 = stream; - value = (uint)(ushort)*block; + value = GHIDRA_UINT((ushort)*block); (**(code **)(**(int **)stream + 0x1c))(&value,2,1); checksumValue = value & 0xffff; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&checksumValue,2); - value = (uint)(ushort)block[2]; + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&checksumValue,2); + value = GHIDRA_UINT((ushort)block[2]); (**(code **)(**(int **)pvVar1 + 0x1c))(&value,2,1); checksumValue = value & 0xffff; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&checksumValue,2); - value = (uint)(ushort)block[4]; + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&checksumValue,2); + value = GHIDRA_UINT((ushort)block[4]); (**(code **)(**(int **)pvVar1 + 0x1c))(&value,2,1); checksumValue = value & 0xffff; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&checksumValue,2); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&checksumValue,2); pvVar2 = stream; - stream = (void *)((uint)stream & 0xffffff); + stream = (void *)(GHIDRA_UINT(stream) & 0xffffff); isFlagC = (char)block[6] != '\0'; if (isFlagC) { - stream._0_3_ = SUB43(pvVar2,0); - stream = (void *)CONCAT13(1,stream._0_3_); + (*(undefined1 *)((char *)&(stream) + 0x0)) = SUB43(pvVar2,0); + stream = (void *)CONCAT13(1,(*(undefined1 *)((char *)&(stream) + 0x0))); } if (*(char *)((char *)block + 0xd) != '\0') { - stream = (void *)(CONCAT13(isFlagC,stream._0_3_) | 0x2000000); + stream = (void *)(CONCAT13(isFlagC,(*(undefined1 *)((char *)&(stream) + 0x0))) | 0x2000000); } - (**(code **)(**(int **)pvVar1 + 0x1c))((int)&stream + 3,1,1); - packedByte[0] = stream._3_1_; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update(packedByte,1); - value = (uint)(ushort)block[8]; + (**(code **)(**(int **)pvVar1 + 0x1c))(GHIDRA_INT(&stream) + 3,1,1); + packedByte[0] = (*(undefined1 *)((char *)&(stream) + 0x3)); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update(packedByte,1); + value = GHIDRA_UINT((ushort)block[8]); (**(code **)(**(int **)pvVar1 + 0x1c))(&value,2,1); checksumValue = value & 0xffff; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&checksumValue,2); - value = (uint)(ushort)block[10]; + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&checksumValue,2); + value = GHIDRA_UINT((ushort)block[10]); (**(code **)(**(int **)pvVar1 + 0x1c))(&value,2,1); checksumValue = value & 0xffff; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&checksumValue,2); - value = (uint)(ushort)block[0xc]; + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&checksumValue,2); + value = GHIDRA_UINT((ushort)block[0xc]); (**(code **)(**(int **)pvVar1 + 0x1c))(&value,2,1); checksumValue = value & 0xffff; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&checksumValue,2); - value = (uint)(ushort)block[0xe]; + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&checksumValue,2); + value = GHIDRA_UINT((ushort)block[0xe]); (**(code **)(**(int **)pvVar1 + 0x1c))(&value,2,1); checksumValue = value & 0xffff; - ((Checksum *)((void *)((int)pvVar1 + 0xc)))->Checksum::Update((byte *)&checksumValue,2); + ((Checksum *)((void *)(GHIDRA_INT(pvVar1) + 0xc)))->Checksum::Update((byte *)&checksumValue,2); return; } @@ -982,99 +982,99 @@ byte GameStatePlayer::read(void *reader) local_14 = (GameStatePlayer)0xffffffff; puStack_18 = &LAB_00b0f39e; local_1c = ExceptionList; - uStack_120 = __security_cookie ^ (uint)(local_2c + 7); + uStack_120 = __security_cookie ^ GHIDRA_UINT((local_2c + 7)); local_20 = (undefined1 *)&uStack_120; ExceptionList = &local_1c; uVar10 = 4; playerState = this; (**(code **)(**(int **)reader + 0x14))(this,4,1); local_2c[0] = *this; - checksum = (void *)((int)reader + 0xc); + checksum = (void *)(GHIDRA_INT(reader) + 0xc); local_44 = checksum; local_38 = checksum; ((Checksum *)(checksum))->Checksum::Update((byte *)local_2c,4); - if ((((int)*this < 0) || - (((int)(g_manager->_entityConfig)._players._end - - (int)(g_manager->_entityConfig)._players._begin) / 0x148 <= (int)*this)) || - ((void *)((int)*this * 0x148 + (int)(g_manager->_entityConfig)._players._begin) == (void *)0x0) + if (((GHIDRA_INT(*this) < 0) || + ((GHIDRA_INT((g_manager->_entityConfig)._players._end) - + GHIDRA_INT((g_manager->_entityConfig)._players._begin)) / 0x148 <= GHIDRA_INT(*this))) || + ((void *)(GHIDRA_INT(*this) * 0x148 + GHIDRA_INT((g_manager->_entityConfig)._players._begin)) == (void *)0x0) ) { format = "[warn] Invalid player type: %d\n"; goto LAB_009d4590; } (**(code **)(**(int **)reader + 0x14))(this + 1,4,1); local_2c[0] = this[1]; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 2; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 3; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 4; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 5; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 6; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 7; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 8; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 9; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 10; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 0xb; (**(code **)(**(int **)reader + 0x14))(pGVar7,1,1); - checksumByte._0_1_ = *(undefined1 *)pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)&checksumByte,1); + (*(undefined1 *)((char *)&(checksumByte) + 0x0)) = *(undefined1 *)pGVar7; + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)&checksumByte,1); pGVar7 = playerState + 0xb; (**(code **)(**(int **)reader + 0x14))(&(*(undefined1 *)((char *)(pGVar7) + 0x1)),1,1); - checksumByte = CONCAT11(checksumByte._1_1_,(*(undefined1 *)((char *)(pGVar7) + 0x1))); - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)&checksumByte,1); + checksumByte = CONCAT11((*(undefined1 *)((char *)&(checksumByte) + 0x1)),(*(undefined1 *)((char *)(pGVar7) + 0x1))); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)&checksumByte,1); pGVar7 = playerState; if (*(uint *)((char *)reader + 8) < 0x82) { (**(code **)(**(int **)reader + 0x14))(&local_4c,4,1); local_2c[0] = local_4c; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); - *(undefined2 *)&(*(undefined1 *)((char *)&(pGVar7[0xb]) + 0x2)) = local_4c._0_2_; + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); + *(undefined2 *)&(*(undefined1 *)((char *)&(pGVar7[0xb]) + 0x2)) = (*(undefined2 *)((char *)&(local_4c) + 0x0)); *(undefined2 *)(pGVar7 + 0xc) = 0; } else { (**(code **)(**(int **)reader + 0x14))(&(*(undefined1 *)((char *)&(playerState[0xb]) + 0x2)),2,1); - local_2c[0]._2_2_ = 0; - local_2c[0]._0_2_ = *(ushort *)&(*(undefined1 *)((char *)&(pGVar7[0xb]) + 0x2)); - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,2); + (*(undefined2 *)((char *)&(local_2c[0]) + 0x2)) = 0; + (*(undefined2 *)((char *)&(local_2c[0]) + 0x0)) = *(ushort *)&(*(undefined1 *)((char *)&(pGVar7[0xb]) + 0x2)); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,2); (**(code **)(**(int **)reader + 0x14))(pGVar7 + 0xc,2,1); - local_2c[0]._2_2_ = 0; - local_2c[0]._0_2_ = *(ushort *)(pGVar7 + 0xc); - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,2); + (*(undefined2 *)((char *)&(local_2c[0]) + 0x2)) = 0; + (*(undefined2 *)((char *)&(local_2c[0]) + 0x0)) = *(ushort *)(pGVar7 + 0xc); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,2); } if (*(uint *)((char *)reader + 8) < 0x79) { (**(code **)(**(int **)reader + 0x14))(&(*(undefined1 *)((char *)&(pGVar7[0xc]) + 0x2)),1,1); - checksumByte = CONCAT11(checksumByte._1_1_,(*(undefined1 *)((char *)&(pGVar7[0xc]) + 0x2))); - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)&checksumByte,1); + checksumByte = CONCAT11((*(undefined1 *)((char *)&(checksumByte) + 0x1)),(*(undefined1 *)((char *)&(pGVar7[0xc]) + 0x2))); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)&checksumByte,1); } else { (**(code **)(**(int **)reader + 0x14))(&packedFlags,1,1); - checksumByte = CONCAT11(checksumByte._1_1_,packedFlags); - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)&checksumByte,1); + checksumByte = CONCAT11((*(undefined1 *)((char *)&(checksumByte) + 0x1)),packedFlags); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)&checksumByte,1); (*(undefined1 *)((char *)&(pGVar7[0xc]) + 0x2)) = packedFlags & 1; *(byte *)(pGVar7 + 0x14d) = packedFlags >> 1 & 1; (*(undefined1 *)((char *)&(pGVar7[0x14d]) + 0x1)) = packedFlags >> 2 & 1; @@ -1084,53 +1084,53 @@ byte GameStatePlayer::read(void *reader) if (0x23 < uVar9) { (**(code **)(**(int **)reader + 0x14))(&local_4c,4,1); local_2c[0] = local_4c; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); - *(undefined2 *)(pGVar7 + 0xd) = local_4c._0_2_; + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); + *(undefined2 *)(pGVar7 + 0xd) = (*(undefined2 *)((char *)&(local_4c) + 0x0)); uVar9 = *(uint *)((char *)reader + 8); } if (0x39 < uVar9) { (**(code **)(**(int **)reader + 0x14))(&local_4c,4,1); local_2c[0] = local_4c; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); - *(undefined2 *)(pGVar7 + 0xe) = local_4c._0_2_; + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); + *(undefined2 *)(pGVar7 + 0xe) = (*(undefined2 *)((char *)&(local_4c) + 0x0)); } } else { (**(code **)(**(int **)reader + 0x14))(pGVar7 + 0xd,2,1); - local_2c[0]._2_2_ = 0; - local_2c[0]._0_2_ = *(ushort *)(pGVar7 + 0xd); - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,2); + (*(undefined2 *)((char *)&(local_2c[0]) + 0x2)) = 0; + (*(undefined2 *)((char *)&(local_2c[0]) + 0x0)) = *(ushort *)(pGVar7 + 0xd); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,2); pGVar7 = playerState + 0xd; (**(code **)(**(int **)reader + 0x14))(&(*(undefined1 *)((char *)(pGVar7) + 0x2)),2,1); - local_2c[0]._2_2_ = 0; - local_2c[0]._0_2_ = *(ushort *)&(*(undefined1 *)((char *)(pGVar7) + 0x2)); - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,2); + (*(undefined2 *)((char *)&(local_2c[0]) + 0x2)) = 0; + (*(undefined2 *)((char *)&(local_2c[0]) + 0x0)) = *(ushort *)&(*(undefined1 *)((char *)(pGVar7) + 0x2)); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,2); pGVar7 = playerState + 0xe; (**(code **)(**(int **)reader + 0x14))(pGVar7,2,1); - local_2c[0]._2_2_ = 0; - local_2c[0]._0_2_ = *(ushort *)pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,2); + (*(undefined2 *)((char *)&(local_2c[0]) + 0x2)) = 0; + (*(undefined2 *)((char *)&(local_2c[0]) + 0x0)) = *(ushort *)pGVar7; + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,2); pGVar7 = playerState; } uVar9 = *(uint *)((char *)reader + 8); if (0x24 < uVar9) { (**(code **)(**(int **)reader + 0x14))(pGVar7 + 0xf,4,1); local_2c[0] = pGVar7[0xf]; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); uVar9 = *(uint *)((char *)reader + 8); } if (0xa4 < uVar9) { pGVar7 = playerState + 0x10; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); uVar9 = *(uint *)((char *)reader + 8); } if (0x2c < uVar9) { pGVar7 = playerState + 0x11; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); uVar9 = *(uint *)((char *)reader + 8); } if (uVar9 < 0x3e) { @@ -1145,54 +1145,54 @@ byte GameStatePlayer::read(void *reader) pGVar7 = playerState + 0xdd; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 0xde; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; pGVar7 = local_2c; LAB_009d0b19: - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)pGVar7,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)pGVar7,4); } pGVar7 = playerState + 0x12; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 0x13; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 0x14; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 0x15; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 0x16; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 0x17; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 0x18; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState; if (0x27 < *(uint *)((char *)reader + 8)) { if (*(uint *)((char *)reader + 8) < 0x45) { (**(code **)(**(int **)reader + 0x14))(&local_4c,4,1); local_2c[0] = local_4c; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); - pGVar7[0x19] = (GameStatePlayer)(int)((float)local_4c / 0.2); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); + pGVar7[0x19] = (GameStatePlayer)GHIDRA_INT(((float)local_4c / 0.2)); } else { (**(code **)(**(int **)reader + 0x14))(playerState + 0x19,4,1); local_2c[0] = pGVar7[0x19]; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); if (0xa5 < *(uint *)((char *)reader + 8)) { FUN_009d84a0(pGVar7 + 0x1a); } @@ -1200,37 +1200,37 @@ LAB_009d0b19: } (**(code **)(**(int **)reader + 0x14))(pGVar7 + 0x1b,4,1); local_2c[0] = pGVar7[0x1b]; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 0x1c; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 0x1d; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 0x1e; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 0x1f; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 0x20; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 0x21; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); uVar9 = *(uint *)((char *)reader + 8); if (0x37 < uVar9) { pGVar7 = playerState + 0x22; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); uVar9 = *(uint *)((char *)reader + 8); } local_54 = (GameStatePlayer)0x4; @@ -1248,72 +1248,72 @@ LAB_009d0b19: do { (**(code **)(**(int **)reader + 0x14))(local_50,4,1); local_2c[0] = *(GameStatePlayer *)local_50; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); - if ((0 < (int)*(GameStatePlayer *)local_50) && + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); + if ((0 < GHIDRA_INT(*(GameStatePlayer *)local_50)) && (collectibleConfig = - ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible((int)*(GameStatePlayer *)local_50), + ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(GHIDRA_INT(*(GameStatePlayer *)local_50)), collectibleConfig == (ItemConfig_Item *)0x0)) { format = "Invalid collectible ID: %d\n"; uVar9 = 4; goto LAB_009d4592; } if (0x98 < *(uint *)((char *)reader + 8)) { - pGVar7 = (GameStatePlayer *)((int)local_50 + 4); + pGVar7 = (GameStatePlayer *)(GHIDRA_INT(local_50) + 4); (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); } - pGVar7 = (GameStatePlayer *)((int)local_50 + 8); + pGVar7 = (GameStatePlayer *)(GHIDRA_INT(local_50) + 8); (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); - pGVar7 = (GameStatePlayer *)((int)local_50 + 0xc); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); + pGVar7 = (GameStatePlayer *)(GHIDRA_INT(local_50) + 0xc); (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); uVar9 = *(uint *)((char *)reader + 8); if (99 < uVar9) { - pGVar7 = (GameStatePlayer *)((int)local_50 + 0x10); + pGVar7 = (GameStatePlayer *)(GHIDRA_INT(local_50) + 0x10); (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); uVar9 = *(uint *)((char *)reader + 8); } if (0x6b < uVar9) { - pGVar7 = (GameStatePlayer *)((int)local_50 + 0x14); + pGVar7 = (GameStatePlayer *)(GHIDRA_INT(local_50) + 0x14); (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); } - local_4c = (GameStatePlayer)((int)local_4c + 1); - local_50 = (GameStatePlayer)((int)local_50 + 0x18); - } while ((uint)local_4c < (uint)local_54); + local_4c = (GameStatePlayer)(GHIDRA_INT(local_4c) + 1); + local_50 = (GameStatePlayer)(GHIDRA_INT(local_50) + 0x18); + } while (GHIDRA_UINT(local_4c) < GHIDRA_UINT(local_54)); pGVar7 = playerState + 0x3b; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 0x3c; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 0x3d; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 0x3e; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); uVar9 = *(uint *)((char *)reader + 8); if (0x28 < uVar9) { pGVar7 = playerState + 0x3f; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState + 0x40; (**(code **)(**(int **)reader + 0x14))(pGVar7,4,1); local_2c[0] = *pGVar7; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); uVar9 = *(uint *)((char *)reader + 8); } pocketSlotCount = (GameStatePlayer)0x4; @@ -1328,27 +1328,27 @@ LAB_009d0b19: pGVar7 = playerState; do { (**(code **)(**(int **)reader + 0x14))(&pocketType,1,1); - checksumByte = CONCAT11(checksumByte._1_1_,pocketType); - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)&checksumByte,1); + checksumByte = CONCAT11((*(undefined1 *)((char *)&(checksumByte) + 0x1)),pocketType); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)&checksumByte,1); local_54 = (GameStatePlayer)0x0; - pocketSlot[1] = (GameStatePlayer)(int)pocketType; + pocketSlot[1] = (GameStatePlayer)GHIDRA_INT(pocketType); (**(code **)(**(int **)reader + 0x14))(&local_54,4,1); local_2c[0] = local_54; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); *pocketSlot = local_54; - if (((pocketType == '\x01') && (0 < (int)local_54)) && + if (((pocketType == '\x01') && (0 < GHIDRA_INT(local_54))) && ((local_2c[0] = (GameStatePlayer)(g_manager->_itemConfig)._cards._begin, - (int)(g_manager->_itemConfig)._cards._end - (int)local_2c[0] >> 2 <= (int)local_54 || + GHIDRA_INT((g_manager->_itemConfig)._cards._end) - GHIDRA_INT(local_2c[0]) >> 2 <= GHIDRA_INT(local_54) || (pGVar7 = playerState, - *(GameStatePlayer *)((int)local_2c[0] + (int)local_54 * 4) == (GameStatePlayer)0x0)))) { + *(GameStatePlayer *)(GHIDRA_INT(local_2c[0]) + GHIDRA_INT(local_54) * 4) == (GameStatePlayer)0x0)))) { KAGE_LogMessage(1,(byte *)"[warn] Invalid pocket item (type: %d, ID: %d)\n"); ExceptionList = local_1c; return 0; } pocketSlot = pocketSlot + 2; - local_4c = (GameStatePlayer)((int)local_4c + 1); - } while ((uint)local_4c < (uint)pocketSlotCount); - iVar8 = 0x10 - (uint)(*(uint *)((char *)reader + 8) < 0xa7); + local_4c = (GameStatePlayer)(GHIDRA_INT(local_4c) + 1); + } while (GHIDRA_UINT(local_4c) < GHIDRA_UINT(pocketSlotCount)); + iVar8 = 0x10 - GHIDRA_UINT((*(uint *)((char *)reader + 8) < 0xa7)); (**(code **)(**(int **)reader + 0x14))(pGVar7 + 0x49,4,iVar8); pvVar3 = local_44; ((Checksum *)(local_44))->Checksum::Update((byte *)(pGVar7 + 0x49),iVar8 * 4); @@ -1359,23 +1359,23 @@ LAB_009d0b19: local_2c[0] = local_54; ((Checksum *)(pvVar3))->Checksum::Update((byte *)local_2c,4); local_8c = 0; - playerState[0x59] = (GameStatePlayer)((uint)local_54 & 0xffff); + playerState[0x59] = (GameStatePlayer)(GHIDRA_UINT(local_54) & 0xffff); uVar9 = *(uint *)((char *)reader + 8); } pGVar7 = playerState; if (0x2e < uVar9) { GameStateReader::read_int_vector(reader,(int *)(playerState + 0x5a)); - if ((uint)((int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2) < - (uint)((int)pGVar7[0x5b] - (int)pGVar7[0x5a] >> 2)) { + if (GHIDRA_UINT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2)) < + GHIDRA_UINT((GHIDRA_INT(pGVar7[0x5b]) - GHIDRA_INT(pGVar7[0x5a]) >> 2))) { bVar2 = FUN_009d459a(uVar10); return bVar2; } uVar9 = *(uint *)((char *)reader + 8); if (uVar9 < 0x4d) { - sVar1 = *(short *)((int)pGVar7[0x5a] + 0x144); + sVar1 = *(short *)(GHIDRA_INT(pGVar7[0x5a]) + 0x144); *(short *)&(*(undefined1 *)((char *)&(pGVar7[0x83]) + 0x2)) = sVar1; - *(int *)((int)pGVar7[0x5a] + 0x144) = (sVar1 + 8) / 9; + *(int *)(GHIDRA_INT(pGVar7[0x5a]) + 0x144) = (sVar1 + 8) / 9; GVar4 = pGVar7[0x5a]; *(undefined2 *)&(*(undefined1 *)((char *)&(pGVar7[0xd]) + 0x2)) = *(undefined2 *)((char *)GVar4 + 0x768); *(undefined4 *)((char *)GVar4 + 0x768) = 0; @@ -1385,21 +1385,21 @@ LAB_009d0b19: if (0x26 < uVar9) { GameStateReader::read_int_vector(reader,(int *)(pGVar7 + 0x5d)); GVar4 = pGVar7[0x5d]; - local_2c[0] = (GameStatePlayer)((int)pGVar7[0x5e] - (int)GVar4 >> 2); + local_2c[0] = (GameStatePlayer)(GHIDRA_INT(pGVar7[0x5e]) - GHIDRA_INT(GVar4) >> 2); local_4c = (GameStatePlayer)0x0; if (local_2c[0] != (GameStatePlayer)0x0) { do { iVar8 = *(int *)GVar4; if ((0 < iVar8) && ((pvVar3 = (g_manager->_itemConfig)._collectibles._begin, - (int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar3 >> 2 <= iVar8 || + GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar3) >> 2 <= iVar8 || (*(int *)((char *)pvVar3 + iVar8 * 4) == 0)))) { format = "[warn] Invalid voided active item %d\n"; goto LAB_009d4590; } - local_4c = (GameStatePlayer)((int)local_4c + 1); - GVar4 = (GameStatePlayer)((int)GVar4 + 4); - } while ((uint)local_4c < (uint)local_2c[0]); + local_4c = (GameStatePlayer)(GHIDRA_INT(local_4c) + 1); + GVar4 = (GameStatePlayer)(GHIDRA_INT(GVar4) + 4); + } while (GHIDRA_UINT(local_4c) < GHIDRA_UINT(local_2c[0])); } } if (*(uint *)((char *)reader + 8) < 0x8b) { @@ -1414,24 +1414,24 @@ LAB_009d0b19: GameStateReader::read_int_vector(reader,(int *)&intVector); pGVar7 = playerState; GVar4 = (GameStatePlayer)0x0; - local_2c[0] = (GameStatePlayer)(intVectorEnd - (int)intVector >> 2); + local_2c[0] = (GameStatePlayer)(intVectorEnd - GHIDRA_INT(intVector) >> 2); if (local_2c[0] != (GameStatePlayer)0x0) { do { GVar5 = playerState[0x60]; - *(undefined4 *)((char *)GVar5 + (int)GVar4 * 8) = - *(undefined4 *)((char *)intVector + (int)GVar4 * 4); - *(undefined4 *)((char *)GVar5 + 4 + (int)GVar4 * 8) = 0; - GVar4 = (GameStatePlayer)((int)GVar4 + 1); - } while ((uint)GVar4 < (uint)local_2c[0]); + *(undefined4 *)((char *)GVar5 + GHIDRA_INT(GVar4) * 8) = + *(undefined4 *)((char *)intVector + GHIDRA_INT(GVar4) * 4); + *(undefined4 *)((char *)GVar5 + 4 + GHIDRA_INT(GVar4) * 8) = 0; + GVar4 = (GameStatePlayer)(GHIDRA_INT(GVar4) + 1); + } while (GHIDRA_UINT(GVar4) < GHIDRA_UINT(local_2c[0])); } local_14 = (GameStatePlayer)0xffffffff; if (intVector != (void *)0x0) { - uVar9 = (local_8c - (int)intVector >> 2) * 4; + uVar9 = (local_8c - GHIDRA_INT(intVector) >> 2) * 4; pvVar3 = intVector; if (0xfff < uVar9) { pvVar3 = *(void **)((char *)intVector + -4); uVar9 = uVar9 + 0x23; - if (0x1f < (uint)((int)intVector + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(intVector) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1442,22 +1442,22 @@ LAB_009d0b19: else { (**(code **)(**(int **)reader + 0x14))(&local_50,4,1); local_2c[0] = local_50; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); pGVar7 = playerState; local_4c = (GameStatePlayer)(playerState + 0x60); GVar4 = *(GameStatePlayer *)local_4c; playerState[0x61] = GVar4; if (local_50 != (GameStatePlayer)0x0) { GVar5 = local_50; - if ((uint)((int)playerState[0x62] - (int)GVar4 >> 3) < (uint)local_50) { + if (GHIDRA_UINT((GHIDRA_INT(playerState[0x62]) - GHIDRA_INT(GVar4) >> 3)) < GHIDRA_UINT(local_50)) { std::vector<8byte_0_m1>::_Resize_reallocate(local_50,GVar4); } else { do { *(undefined4 *)GVar4 = 0; *(undefined4 *)((char *)GVar4 + 4) = 0xffffffff; - GVar4 = (GameStatePlayer)((int)GVar4 + 8); - GVar5 = (GameStatePlayer)((int)GVar5 + -1); + GVar4 = (GameStatePlayer)(GHIDRA_INT(GVar4) + 8); + GVar5 = (GameStatePlayer)(GHIDRA_INT(GVar5) + -1); } while (GVar5 != (GameStatePlayer)0x0); playerState[0x61] = GVar4; } @@ -1466,73 +1466,73 @@ LAB_009d0b19: if (local_50 != (GameStatePlayer)0x0) { do { (**(code **)(**(int **)reader + 0x14))(&checksumByte,2,1); - local_2c[0]._2_2_ = 0; - local_2c[0]._0_2_ = checksumByte; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,2); + (*(undefined2 *)((char *)&(local_2c[0]) + 0x2)) = 0; + (*(undefined2 *)((char *)&(local_2c[0]) + 0x0)) = checksumByte; + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,2); (**(code **)(**(int **)reader + 0x14))(readShort,2,1); - local_2c[0]._2_2_ = 0; - local_2c[0]._0_2_ = readShort[0]; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,2); + (*(undefined2 *)((char *)&(local_2c[0]) + 0x2)) = 0; + (*(undefined2 *)((char *)&(local_2c[0]) + 0x0)) = readShort[0]; + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,2); GVar4 = *(GameStatePlayer *)local_4c; - *(uint *)((char *)GVar4 + (int)local_54 * 8) = (uint)checksumByte; - *(uint *)((char *)GVar4 + 4 + (int)local_54 * 8) = (uint)readShort[0]; - local_54 = (GameStatePlayer)((int)local_54 + 1); - } while ((uint)local_54 < (uint)local_50); + *(uint *)((char *)GVar4 + GHIDRA_INT(local_54) * 8) = GHIDRA_UINT(checksumByte); + *(uint *)((char *)GVar4 + 4 + GHIDRA_INT(local_54) * 8) = GHIDRA_UINT(readShort[0]); + local_54 = (GameStatePlayer)(GHIDRA_INT(local_54) + 1); + } while (GHIDRA_UINT(local_54) < GHIDRA_UINT(local_50)); pGVar7 = playerState; } } GVar4 = pGVar7[0x60]; - local_2c[0] = (GameStatePlayer)((int)pGVar7[0x61] - (int)GVar4 >> 3); + local_2c[0] = (GameStatePlayer)(GHIDRA_INT(pGVar7[0x61]) - GHIDRA_INT(GVar4) >> 3); local_4c = (GameStatePlayer)0x0; if (local_2c[0] != (GameStatePlayer)0x0) { do { iVar8 = *(int *)GVar4; if ((0 < iVar8) && - (((int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2 <= iVar8 || + ((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2 <= iVar8 || (pGVar7 = playerState, - *(int *)((int)(g_manager->_itemConfig)._collectibles._begin + iVar8 * 4) == 0)))) { + *(int *)(GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) + iVar8 * 4) == 0)))) { format = "[warn] Invalid voided passive item %d\n"; goto LAB_009d4590; } - local_4c = (GameStatePlayer)((int)local_4c + 1); - GVar4 = (GameStatePlayer)((int)GVar4 + 8); - } while ((uint)local_4c < (uint)local_2c[0]); + local_4c = (GameStatePlayer)(GHIDRA_INT(local_4c) + 1); + GVar4 = (GameStatePlayer)(GHIDRA_INT(GVar4) + 8); + } while (GHIDRA_UINT(local_4c) < GHIDRA_UINT(local_2c[0])); } } (**(code **)(**(int **)reader + 0x14))(pGVar7 + 99,4,2); - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)(pGVar7 + 99),8); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)(pGVar7 + 99),8); pGVar6 = pGVar7 + 99; local_4c = (GameStatePlayer)0x0; while( true ) { local_2c[0] = *pGVar6; - if ((0 < (int)local_2c[0]) && - (((int)(g_manager->_itemConfig)._trinkets._end - - (int)(g_manager->_itemConfig)._trinkets._begin >> 2 <= (int)((uint)local_2c[0] & 0x7fff) || + if ((0 < GHIDRA_INT(local_2c[0])) && + ((GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - + GHIDRA_INT((g_manager->_itemConfig)._trinkets._begin) >> 2 <= GHIDRA_INT((GHIDRA_UINT(local_2c[0]) & 0x7fff)) || (pGVar7 = playerState, - *(int *)((int)(g_manager->_itemConfig)._trinkets._begin + ((uint)local_2c[0] & 0x7fff) * 4) + *(int *)(GHIDRA_INT((g_manager->_itemConfig)._trinkets._begin) + (GHIDRA_UINT(local_2c[0]) & 0x7fff) * 4) == 0)))) break; - local_4c = (GameStatePlayer)((int)local_4c + 1); + local_4c = (GameStatePlayer)(GHIDRA_INT(local_4c) + 1); pGVar6 = pGVar6 + 1; - if (1 < (uint)local_4c) { + if (1 < GHIDRA_UINT(local_4c)) { if (*(int *)((char *)reader + 8) - 0x2fU < 0x62) { (**(code **)(**(int **)reader + 0x14))(&local_54,4,1); local_2c[0] = local_54; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); local_4c = (GameStatePlayer)0x0; if (local_54 != (GameStatePlayer)0x0) { do { (**(code **)(**(int **)reader + 0x14))(&readByte,1,1); local_5c[0] = readByte; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update(local_5c,1); - local_4c = (GameStatePlayer)((int)local_4c + 1); - } while ((uint)local_4c < (uint)local_54); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update(local_5c,1); + local_4c = (GameStatePlayer)(GHIDRA_INT(local_4c) + 1); + } while (GHIDRA_UINT(local_4c) < GHIDRA_UINT(local_54)); pGVar7 = playerState; } } (**(code **)(**(int **)reader + 0x14))(pGVar7 + 0x74,4,1); local_2c[0] = pGVar7[0x74]; - ((Checksum *)((void *)((int)reader + 0xc)))->Checksum::Update((byte *)local_2c,4); + ((Checksum *)((void *)(GHIDRA_INT(reader) + 0xc)))->Checksum::Update((byte *)local_2c,4); local_14 = (GameStatePlayer)0x1; std::vector<8byte>::resize(pGVar7[0x74]); local_14 = (GameStatePlayer)0xffffffff; @@ -1597,7 +1597,7 @@ undefined4 GameStatePlayer::read_part3() goto code_r0x009d459a; } bVar7 = read_coplayer((short *)(*(int *)(unaff_ESI + 0x38c) + - (uint)*(byte *)(unaff_EBP + -0x29) * 0x1c),unaff_EDI); + GHIDRA_UINT(*(byte *)(unaff_EBP + -0x29)) * 0x1c),unaff_EDI); if (bVar7 == 0) goto LAB_009d26db; bVar7 = *(char *)(unaff_EBP + -0x29) + 1; *(byte *)(unaff_EBP + -0x29) = bVar7; @@ -1614,7 +1614,7 @@ LAB_009d26db: uVar8 = FUN_009d459a(); return uVar8; } - if ((uint)unaff_EDI[2] < 0x41) { + if (GHIDRA_UINT(unaff_EDI[2]) < 0x41) { uVar8 = *(undefined4 *)(unaff_EBP + -0x34); *(undefined4 *)(unaff_EBP + -0x34) = uVar8; LAB_009d29c0: @@ -1625,7 +1625,7 @@ LAB_009d29c0: puVar18 = (ushort *)(iVar13 + 0x3b8); (**(code **)(*(int *)*unaff_EDI + 0x14))(puVar18,2,1); pvVar9 = *(void **)(unaff_EBP + -0x28); - *(uint *)(unaff_EBP + -0x1c) = (uint)*puVar18; + *(uint *)(unaff_EBP + -0x1c) = GHIDRA_UINT(*puVar18); ((Checksum *)(pvVar9))->Checksum::Update((byte *)(unaff_EBP + -0x1c),2); uVar11 = unaff_EDI[2]; if (0x57 < uVar11) { @@ -1641,12 +1641,12 @@ LAB_009d29c0: } else { (**(code **)(*(int *)*unaff_EDI + 0x14))(unaff_EBP + -0x30,2,1); - *(uint *)(unaff_EBP + -0x1c) = (uint)*(ushort *)(unaff_EBP + -0x30); + *(uint *)(unaff_EBP + -0x1c) = GHIDRA_UINT(*(ushort *)(unaff_EBP + -0x30)); ((Checksum *)(pvVar9))->Checksum::Update((byte *)(unaff_EBP + -0x1c),2); iVar13 = *(int *)(unaff_EBP + -0x24); - *(int *)(iVar13 + 0x434) = (int)*(short *)(unaff_EBP + -0x30); + *(int *)(iVar13 + 0x434) = GHIDRA_INT(*(short *)(unaff_EBP + -0x30)); (**(code **)(*(int *)*unaff_EDI + 0x14))(unaff_EBP + -0x30,2,1); - *(uint *)(unaff_EBP + -0x1c) = (uint)*(ushort *)(unaff_EBP + -0x30); + *(uint *)(unaff_EBP + -0x1c) = GHIDRA_UINT(*(ushort *)(unaff_EBP + -0x30)); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),2); *(undefined2 *)(iVar13 + 0x438) = *(undefined2 *)(unaff_EBP + -0x30); uVar11 = unaff_EDI[2]; @@ -1717,11 +1717,11 @@ LAB_009d29c0: *(undefined1 *)(unaff_EBP + -0x38) = *(undefined1 *)(unaff_EBP + -0x1d); ((Checksum *)(pvVar9))->Checksum::Update((byte *)(unaff_EBP + -0x38),1); iVar13 = *(int *)(unaff_EBP + -0x24); - *(uint *)(iVar13 + 0x44c) = (uint)*(byte *)(unaff_EBP + -0x1d); + *(uint *)(iVar13 + 0x44c) = GHIDRA_UINT(*(byte *)(unaff_EBP + -0x1d)); (**(code **)(*(int *)*unaff_EDI + 0x14))(unaff_EBP + -0x1d,1,1); *(undefined1 *)(unaff_EBP + -0x38) = *(undefined1 *)(unaff_EBP + -0x1d); ((Checksum *)(*(void **)(unaff_EBP + -0x34)))->Checksum::Update((byte *)(unaff_EBP + -0x38),1); - *(uint *)(iVar13 + 0x454) = (uint)*(byte *)(unaff_EBP + -0x1d); + *(uint *)(iVar13 + 0x454) = GHIDRA_UINT(*(byte *)(unaff_EBP + -0x1d)); } } uVar11 = unaff_EDI[2]; @@ -1729,7 +1729,7 @@ LAB_009d29c0: (**(code **)(*(int *)*unaff_EDI + 0x14))(unaff_EBP + -0x29,1,1); *(undefined1 *)(unaff_EBP + -0x38) = *(undefined1 *)(unaff_EBP + -0x29); ((Checksum *)(*(void **)(unaff_EBP + -0x34)))->Checksum::Update((byte *)(unaff_EBP + -0x38),1); - *(uint *)(iVar13 + 0x450) = (uint)*(byte *)(unaff_EBP + -0x29); + *(uint *)(iVar13 + 0x450) = GHIDRA_UINT(*(byte *)(unaff_EBP + -0x29)); uVar11 = unaff_EDI[2]; } uVar8 = *(undefined4 *)(unaff_EBP + -0x28); @@ -1791,10 +1791,10 @@ LAB_009d2c5b: } else { (**(code **)(*(int *)*puVar19 + 0x14))(unaff_EBP + -0x30,2,1); - *(uint *)(unaff_EBP + -0x1c) = (uint)*(ushort *)(unaff_EBP + -0x30); + *(uint *)(unaff_EBP + -0x1c) = GHIDRA_UINT(*(ushort *)(unaff_EBP + -0x30)); ((Checksum *)(pvVar9))->Checksum::Update((byte *)(unaff_EBP + -0x1c),2); iVar13 = *(int *)(unaff_EBP + -0x24); - *(int *)(iVar13 + 0x498) = (int)*(short *)(unaff_EBP + -0x30); + *(int *)(iVar13 + 0x498) = GHIDRA_INT(*(short *)(unaff_EBP + -0x30)); uVar11 = puVar19[2]; if (0x69 < uVar11) { (**(code **)(*(int *)*puVar19 + 0x14))((undefined4 *)(iVar13 + 0x49c),4,1); @@ -1820,7 +1820,7 @@ LAB_009d2c5b: pvVar9 = *(void **)(unaff_EBP + -0x28); *(undefined4 *)(unaff_EBP + -0x1c) = *(undefined4 *)(iVar13 + 0x4ac); ((Checksum *)(pvVar9))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); - if ((uint)puVar19[2] < 0x90) { + if (GHIDRA_UINT(puVar19[2]) < 0x90) { *(undefined4 *)(unaff_EBP + -100) = 0; *(undefined4 *)(unaff_EBP + -0x60) = 0; *(undefined4 *)(unaff_EBP + -0x5c) = 0; @@ -1881,16 +1881,16 @@ LAB_009d2c5b: iVar13 = iVar22; if ((0 < iVar12) && ((pvVar9 = (g_manager->_itemConfig)._cards._begin, - (int)(g_manager->_itemConfig)._cards._end - (int)pvVar9 >> 2 <= iVar12 || + GHIDRA_INT((g_manager->_itemConfig)._cards._end) - GHIDRA_INT(pvVar9) >> 2 <= iVar12 || (*(int *)((char *)pvVar9 + iVar12 * 4) == 0)))) { KAGE_LogMessage(1,(byte *)"[warn] Invalid pocket item (type: %d, ID: %d)\n"); pvVar9 = *(void **)(unaff_EBP + -0x88); if (pvVar9 != (void *)0x0) { - deallocate(pvVar9,*(int *)(unaff_EBP + -0x80) - (int)pvVar9 >> 2); + deallocate(pvVar9,*(int *)(unaff_EBP + -0x80) - GHIDRA_INT(pvVar9) >> 2); } pvVar9 = *(void **)(unaff_EBP + -100); if (pvVar9 == (void *)0x0) goto LAB_009d26db; - deallocate(pvVar9,*(int *)(unaff_EBP + -0x5c) - (int)pvVar9 >> 2); + deallocate(pvVar9,*(int *)(unaff_EBP + -0x5c) - GHIDRA_INT(pvVar9) >> 2); goto code_r0x009d459a; } } @@ -1946,12 +1946,12 @@ LAB_009d2c5b: } pvVar9 = *(void **)(unaff_EBP + -0x88); if (pvVar9 != (void *)0x0) { - deallocate(pvVar9,*(int *)(unaff_EBP + -0x80) - (int)pvVar9 >> 2); + deallocate(pvVar9,*(int *)(unaff_EBP + -0x80) - GHIDRA_INT(pvVar9) >> 2); } *(undefined4 *)(unaff_EBP + -4) = 0xffffffff; pvVar9 = *(void **)(unaff_EBP + -100); if (pvVar9 != (void *)0x0) { - deallocate(pvVar9,*(int *)(unaff_EBP + -0x5c) - (int)pvVar9 >> 2); + deallocate(pvVar9,*(int *)(unaff_EBP + -0x5c) - GHIDRA_INT(pvVar9) >> 2); } } else { @@ -1970,7 +1970,7 @@ LAB_009d2c5b: if (((*(char *)(unaff_EBP + -0x4c) == '\x01') && (iVar13 = *(int *)(unaff_EBP + -0x48), 0 < iVar13)) && ((pvVar1 = (g_manager->_itemConfig)._cards._begin, - (int)(g_manager->_itemConfig)._cards._end - (int)pvVar1 >> 2 <= iVar13 || + GHIDRA_INT((g_manager->_itemConfig)._cards._end) - GHIDRA_INT(pvVar1) >> 2 <= iVar13 || (*(int *)((char *)pvVar1 + iVar13 * 4) == 0)))) { KAGE_LogMessage(1,(byte *)"[warn] Invalid pocket item (type: %d, ID: %d)\n"); goto code_r0x009d459a; @@ -1998,7 +1998,7 @@ LAB_009d2c5b: (**(code **)(*(int *)*puVar19 + 0x14))(readDest,4,1); *(undefined4 *)(unaff_EBP + -0x1c) = *readDest; ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); - if (0x98 < (uint)puVar19[2]) { + if (0x98 < GHIDRA_UINT(puVar19[2])) { readDest = (undefined4 *)(*(int *)(unaff_EBP + -0x24) + 0x4d4); (**(code **)(*(int *)*puVar19 + 0x14))(readDest,4,1); *(undefined4 *)(unaff_EBP + -0x1c) = *readDest; @@ -2212,7 +2212,7 @@ LAB_009d2c5b: *(undefined1 *)(unaff_EBP + -0x30) = *(undefined1 *)(unaff_EBP + -0x29); ((Checksum *)(*(void **)(unaff_EBP + -0x34)))->Checksum::Update((byte *)(unaff_EBP + -0x30),1); *(undefined4 *)(unaff_EBP + -0x44) = 0; - *(int *)(*(int *)(unaff_EBP + -0x50) + 4) = (int)*(char *)(unaff_EBP + -0x29); + *(int *)(*(int *)(unaff_EBP + -0x50) + 4) = GHIDRA_INT(*(char *)(unaff_EBP + -0x29)); (**(code **)(*(int *)*puVar19 + 0x14))(unaff_EBP + -0x44,4,1); *(undefined4 *)(unaff_EBP + -0x1c) = *(undefined4 *)(unaff_EBP + -0x44); ((Checksum *)(*(void **)(unaff_EBP + -0x34)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); @@ -2225,7 +2225,7 @@ LAB_009d2c5b: pvVar1 = (g_manager->_itemConfig)._cards._end; *(void **)(unaff_EBP + -0x1c) = pvVar9; iVar13 = *(int *)(unaff_EBP + -0x24); - if (((int)pvVar1 - (int)pvVar9 >> 2 <= iVar12) || + if ((GHIDRA_INT(pvVar1) - GHIDRA_INT(pvVar9) >> 2 <= iVar12) || (*(int *)(*(int *)(unaff_EBP + -0x1c) + iVar12 * 4) == 0)) { KAGE_LogMessage(1,(byte *)"[warn] Invalid pre curse pocket item (type: %d, ID: %d)\n"); goto code_r0x009d459a; @@ -2243,12 +2243,12 @@ LAB_009d2c5b: do { uVar15 = *puVar16; *(uint *)(unaff_EBP + -0x1c) = uVar15; - if (0 < (int)uVar15) { + if (0 < GHIDRA_INT(uVar15)) { puVar19 = *(undefined4 **)(unaff_EBX + 8); - if (((int)(g_manager->_itemConfig)._trinkets._end - - (int)(g_manager->_itemConfig)._trinkets._begin >> 2 <= (int)(uVar15 & 0x7fff)) || + if ((GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - + GHIDRA_INT((g_manager->_itemConfig)._trinkets._begin) >> 2 <= GHIDRA_INT((uVar15 & 0x7fff))) || (iVar13 = *(int *)(unaff_EBP + -0x24), - *(int *)((int)(g_manager->_itemConfig)._trinkets._begin + (uVar15 & 0x7fff) * 4) == 0)) + *(int *)(GHIDRA_INT((g_manager->_itemConfig)._trinkets._begin) + (uVar15 & 0x7fff) * 4) == 0)) { pcVar17 = "[warn] Invalid pre curse trinket %d\n"; goto LAB_009d4590; @@ -2272,7 +2272,7 @@ LAB_009d2c5b: *(undefined1 *)(unaff_EBP + -0x30) = *(undefined1 *)(unaff_EBP + -0x35); ((Checksum *)(*(void **)(unaff_EBP + -0x34)))->Checksum::Update((byte *)(unaff_EBP + -0x30),1); *(undefined4 *)(unaff_EBP + -0x44) = 0; - **(int **)(unaff_EBP + -0x50) = (int)*(char *)(unaff_EBP + -0x35); + **(int **)(unaff_EBP + -0x50) = GHIDRA_INT(*(char *)(unaff_EBP + -0x35)); (**(code **)(*(int *)*puVar19 + 0x14))(unaff_EBP + -0x44,4,1); *(undefined4 *)(unaff_EBP + -0x1c) = *(undefined4 *)(unaff_EBP + -0x44); ((Checksum *)(*(void **)(unaff_EBP + -0x34)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); @@ -2286,7 +2286,7 @@ LAB_009d2c5b: pvVar1 = (g_manager->_itemConfig)._cards._end; *(void **)(unaff_EBP + -0x1c) = pvVar9; iVar13 = *(int *)(unaff_EBP + -0x24); - if (((int)pvVar1 - (int)pvVar9 >> 2 <= iVar12) || + if ((GHIDRA_INT(pvVar1) - GHIDRA_INT(pvVar9) >> 2 <= iVar12) || (*(int *)(*(int *)(unaff_EBP + -0x1c) + iVar12 * 4) == 0)) { KAGE_LogMessage(1,(byte *) "[warn] Invalid pre coop ghost pocket item (type: %d, ID: %d)\n"); @@ -2308,12 +2308,12 @@ LAB_009d2c5b: if (cVar6 != '\0') { uVar15 = *puVar16; *(uint *)(unaff_EBP + -0x1c) = uVar15; - if (0 < (int)uVar15) { + if (0 < GHIDRA_INT(uVar15)) { puVar19 = *(undefined4 **)(unaff_EBX + 8); - if (((int)(g_manager->_itemConfig)._trinkets._end - - (int)(g_manager->_itemConfig)._trinkets._begin >> 2 <= (int)(uVar15 & 0x7fff)) || + if ((GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - + GHIDRA_INT((g_manager->_itemConfig)._trinkets._begin) >> 2 <= GHIDRA_INT((uVar15 & 0x7fff))) || (iVar13 = *(int *)(unaff_EBP + -0x24), - *(int *)((int)(g_manager->_itemConfig)._trinkets._begin + (uVar15 & 0x7fff) * 4) == 0 + *(int *)(GHIDRA_INT((g_manager->_itemConfig)._trinkets._begin) + (uVar15 & 0x7fff) * 4) == 0 )) { pcVar17 = "[warn] Invalid pre coop ghost trinket %d\n"; goto LAB_009d4590; @@ -2401,14 +2401,14 @@ LAB_009d3eb4: iVar13 = *(int *)(unaff_EBP + -0x1c); } bVar7 = *(char *)(unaff_EBP + -0x35) + 1; - uVar11 = (uint)bVar7; + uVar11 = GHIDRA_UINT(bVar7); *(byte *)(unaff_EBP + -0x35) = bVar7; } while (bVar7 < *(byte *)(unaff_EBP + -0x1d)); puVar19 = *(undefined4 **)(unaff_EBX + 8); goto LAB_009d3eb4; } } - if ((uint)puVar19[2] < 0x6f) { + if (GHIDRA_UINT(puVar19[2]) < 0x6f) { LAB_009d3f14: uVar11 = puVar19[2]; if (0x72 < uVar11) { @@ -2455,7 +2455,7 @@ LAB_009d4022: iVar13 = **(int **)(unaff_EBP + -0x48); if (((*(char *)(unaff_EBP + -0x2d) == '\x01') && (0 < iVar13)) && ((pvVar9 = (manager->_itemConfig)._cards._begin, - (int)(manager->_itemConfig)._cards._end - (int)pvVar9 >> 2 <= iVar13 || + GHIDRA_INT((manager->_itemConfig)._cards._end) - GHIDRA_INT(pvVar9) >> 2 <= iVar13 || (*(int *)((char *)pvVar9 + iVar13 * 4) == 0)))) { KAGE_LogMessage(1,(byte *) "[warn] Invalid pocket item wildcard effect (type: %d, id: %d)\n"); @@ -2465,7 +2465,7 @@ LAB_009d4022: iVar13 = *(int *)(unaff_EBP + -0x24); } } - if (0x42 < (uint)puVar19[2]) { + if (0x42 < GHIDRA_UINT(puVar19[2])) { (**(code **)(*(int *)*puVar19 + 0x14))(unaff_EBP + -0x44,4,1); *(undefined4 *)(unaff_EBP + -0x1c) = *(undefined4 *)(unaff_EBP + -0x44); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); @@ -2516,7 +2516,7 @@ LAB_009d4022: pvVar1 = (g_manager->_itemConfig)._trinkets._end; *(void **)(unaff_EBP + -0x1c) = pvVar9; puVar19 = *(undefined4 **)(unaff_EBX + 8); - if (((int)pvVar1 - (int)pvVar9 >> 2 <= (int)(uVar11 & 0x7fff)) || + if ((GHIDRA_INT(pvVar1) - GHIDRA_INT(pvVar9) >> 2 <= GHIDRA_INT((uVar11 & 0x7fff))) || (*(int *)(*(int *)(unaff_EBP + -0x1c) + (uVar11 & 0x7fff) * 4) == 0)) { pcVar17 = "[warn] Invalid history trinket %d\n"; goto LAB_009d4590; @@ -2569,7 +2569,7 @@ LAB_009d422f: *(uint *)(unaff_EBP + -0x48) = uVar11; } while (uVar11 < *(uint *)(unaff_EBP + -0x44)); } - if (100 < (uint)puVar19[2]) { + if (100 < GHIDRA_UINT(puVar19[2])) { (**(code **)(*(int *)*puVar19 + 0x14))(unaff_EBP + -0x29,1,1); *(undefined1 *)(unaff_EBP + -0x30) = *(undefined1 *)(unaff_EBP + -0x29); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x30),1); @@ -2577,17 +2577,17 @@ LAB_009d422f: if (*(char *)(unaff_EBP + -0x29) != '\0') { do { (**(code **)(*(int *)*puVar19 + 0x14))(unaff_EBP + -0x30,2,1); - *(uint *)(unaff_EBP + -0x1c) = (uint)*(ushort *)(unaff_EBP + -0x30); + *(uint *)(unaff_EBP + -0x1c) = GHIDRA_UINT(*(ushort *)(unaff_EBP + -0x30)); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),2); bVar7 = *(byte *)(unaff_EBP + -0x35); bVar14 = bVar7 + 1; *(byte *)(unaff_EBP + -0x35) = bVar14; - *(int *)(iVar13 + 0x3c8 + (uint)bVar7 * 4) = (int)*(short *)(unaff_EBP + -0x30); + *(int *)(iVar13 + 0x3c8 + GHIDRA_UINT(bVar7) * 4) = GHIDRA_INT(*(short *)(unaff_EBP + -0x30)); } while (bVar14 < *(byte *)(unaff_EBP + -0x29)); } } } - if (0x50 < (uint)puVar19[2]) { + if (0x50 < GHIDRA_UINT(puVar19[2])) { (**(code **)(*(int *)*puVar19 + 0x14))(unaff_EBP + -0x1d,1,1); *(undefined1 *)(unaff_EBP + -0x30) = *(undefined1 *)(unaff_EBP + -0x1d); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x30),1); @@ -2618,7 +2618,7 @@ LAB_009d422f: } while (bVar7 < *(byte *)(unaff_EBP + -0x1d)); } } - if (0x89 < (uint)puVar19[2]) { + if (0x89 < GHIDRA_UINT(puVar19[2])) { (**(code **)(*(int *)*puVar19 + 0x14))(unaff_EBP + -0x3c,4,1); *(undefined4 *)(unaff_EBP + -0x1c) = *(undefined4 *)(unaff_EBP + -0x3c); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); @@ -2627,13 +2627,13 @@ LAB_009d422f: *(int *)(unaff_EBP + -0x44) = iVar13 + 0x5d4; do { (**(code **)(*(int *)*puVar19 + 0x14))(unaff_EBP + -0x38,2,1); - *(uint *)(unaff_EBP + -0x48) = (uint)*(ushort *)(unaff_EBP + -0x38); + *(uint *)(unaff_EBP + -0x48) = GHIDRA_UINT(*(ushort *)(unaff_EBP + -0x38)); this->Checksum::Update((byte *)(unaff_EBP + -0x48),2); (**(code **)(*(int *)*puVar19 + 0x14))(unaff_EBP + -0x30,2,1); - *(uint *)(unaff_EBP + -0x48) = (uint)*(ushort *)(unaff_EBP + -0x30); + *(uint *)(unaff_EBP + -0x48) = GHIDRA_UINT(*(ushort *)(unaff_EBP + -0x30)); this->Checksum::Update((byte *)(unaff_EBP + -0x48),2); - *(int *)(unaff_EBP + -0x54) = (int)*(short *)(unaff_EBP + -0x38); - *(uint *)(unaff_EBP + -0x50) = (uint)*(ushort *)(unaff_EBP + -0x30); + *(int *)(unaff_EBP + -0x54) = GHIDRA_INT(*(short *)(unaff_EBP + -0x38)); + *(uint *)(unaff_EBP + -0x50) = GHIDRA_UINT(*(ushort *)(unaff_EBP + -0x30)); std_map_int_insert(*(void **)(unaff_EBP + -0x44),(void *)(unaff_EBP + -0x78), (int *)(unaff_EBP + -0x54)); uVar11 = *(int *)(unaff_EBP + -0x1c) + 1; @@ -2644,7 +2644,7 @@ LAB_009d422f: } *(int *)(unaff_EBP + -0x3c) = iVar13 + 0x4b0; std::deque::_Tidy(); - if (0x9c < (uint)puVar19[2]) { + if (0x9c < GHIDRA_UINT(puVar19[2])) { piVar20 = (int *)*puVar19; *(undefined4 *)(unaff_EBP + -0x28) = 0; (**(code **)(*piVar20 + 0x14))(unaff_EBP + -0x28,4,1); @@ -2686,11 +2686,11 @@ LAB_009d4590: *(undefined4 *)(unaff_EBP + -0x1c) = *puVar19; ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),4); (**(code **)(*(int *)*unaff_EDI + 0x14))(unaff_EBP + -0x30,2,1); - *(uint *)(unaff_EBP + -0x1c) = (uint)*(ushort *)(unaff_EBP + -0x30); + *(uint *)(unaff_EBP + -0x1c) = GHIDRA_UINT(*(ushort *)(unaff_EBP + -0x30)); ((Checksum *)(*(void **)(unaff_EBP + -0x28)))->Checksum::Update((byte *)(unaff_EBP + -0x1c),2); iVar13 = *(int *)(unaff_EBP + -0x24); *(undefined4 *)(unaff_EBP + -4) = 10; - uVar11 = (uint)*(ushort *)(unaff_EBP + -0x30); + uVar11 = GHIDRA_UINT(*(ushort *)(unaff_EBP + -0x30)); iVar12 = *(int *)(iVar13 + 0x51c); iVar22 = *(int *)(iVar13 + 0x518); *(int *)(unaff_EBP + -0x44) = iVar12; @@ -2703,7 +2703,7 @@ LAB_009d2c3f: *(int *)(iVar13 + 0x51c) = iVar12; } else if (uVar15 < uVar11) { - if (uVar11 <= (uint)(*(int *)(iVar13 + 0x520) - *(int *)(unaff_EBP + -0x1c) >> 4)) { + if (uVar11 <= GHIDRA_UINT((*(int *)(iVar13 + 0x520) - *(int *)(unaff_EBP + -0x1c) >> 4))) { iVar12 = uVar11 - uVar15; *(int *)(unaff_EBP + -0x1c) = iVar12; if (iVar12 == 0) { diff --git a/src/game/game_state_slot.cpp b/src/game/game_state_slot.cpp index 5eb4584..d05c856 100644 --- a/src/game/game_state_slot.cpp +++ b/src/game/game_state_slot.cpp @@ -13,8 +13,8 @@ void * Game_StateSlot::operator_assign(void *other) void *dstBegin; void *srcBegin; - src = (undefined4 *)((int)other + 0x8c); - dst = (int *)((int)this + 0x6c); + src = (undefined4 *)(GHIDRA_INT(other) + 0x8c); + dst = (int *)(GHIDRA_INT(this) + 0x6c); blocksLeft = 2; do { dst[-0x1b] = src[-0x23]; @@ -47,14 +47,14 @@ void * Game_StateSlot::operator_assign(void *other) dst[-2] = src[-10]; if (dst != src + -8) { srcBegin = (void *)src[-9]; - copySize = *(int *)(((int)other - (int)this) + (int)dst) - (int)srcBegin; + copySize = *(int *)((GHIDRA_INT(other) - GHIDRA_INT(this)) + GHIDRA_INT(dst)) - GHIDRA_INT(srcBegin); dstBegin = (void *)dst[-1]; - if ((uint)(dst[1] - (int)dstBegin >> 5) < (uint)((int)copySize >> 5)) { - std::vector<32byte>::_Clear_and_reserve_geometric((int)copySize >> 5); + if (GHIDRA_UINT((dst[1] - GHIDRA_INT(dstBegin) >> 5)) < GHIDRA_UINT((GHIDRA_INT(copySize) >> 5))) { + std::vector<32byte>::_Clear_and_reserve_geometric(GHIDRA_INT(copySize) >> 5); dstBegin = (void *)dst[-1]; } memmove(dstBegin,srcBegin,copySize); - *dst = (int)dstBegin + copySize; + *dst = GHIDRA_INT(dstBegin) + copySize; } if (dst + 2 != src + -6) { std::vector::assign(src[-6],src[-5],other); @@ -69,7 +69,7 @@ void * Game_StateSlot::operator_assign(void *other) *(int *)iVar2 = iVar2; *(int *)(iVar2 + 8) = iVar2; dst[6] = 0; - std_set_uint_copy(dst + 5,src + -3,(int)other); + std_set_uint_copy(dst + 5,src + -3,GHIDRA_INT(other)); } if (dst + 7 != src + -1) { std::vector::assign(src[-1],*src,other); @@ -101,12 +101,12 @@ void * Game_StateSlot::operator_assign(void *other) } while (blocksLeft != 0); iVar2 = 2; *(undefined8 *)((char *)this + 0x170) = *(undefined8 *)((char *)other + 0x170); - roomList = (RoomDescriptor *)((int)this + 0x188); + roomList = (RoomDescriptor *)(GHIDRA_INT(this) + 0x188); *(undefined4 *)((char *)this + 0x178) = *(undefined4 *)((char *)other + 0x178); *(undefined8 *)((char *)this + 0x17c) = *(undefined8 *)((char *)other + 0x17c); *(undefined4 *)((char *)this + 0x184) = *(undefined4 *)((char *)other + 0x184); do { - GameState::copy_room_list(roomList,(RoomDescriptor *)(((int)other - (int)this) + (int)roomList)) + GameState::copy_room_list(roomList,(RoomDescriptor *)((GHIDRA_INT(other) - GHIDRA_INT(this)) + GHIDRA_INT(roomList))) ; roomList = roomList + 1; iVar2 = iVar2 + -1; diff --git a/src/game/generic_popup.cpp b/src/game/generic_popup.cpp index 2fcbe79..5d9857b 100644 --- a/src/game/generic_popup.cpp +++ b/src/game/generic_popup.cpp @@ -31,7 +31,7 @@ void GenericPopup::Render() local_8 = 0xffffffff; puStack_c = &LAB_00b0245d; local_10 = ExceptionList; - local_14 = __security_cookie ^ (int)register0x00000010 - 4U; + local_14 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; if ((this[0xd] != (GenericPopup)0x0) && (*(char *)(this + 0x11) != '\0')) { font = &g_manager->_font2_TeamMeatEx12; @@ -61,14 +61,14 @@ void GenericPopup::Render() bVar2 = bVar1 < *idleName; if (bVar1 != *idleName) { LAB_00837400: - local_1c.x = (float)(-(uint)bVar2 | 1); + local_1c.x = (float)(-GHIDRA_UINT(bVar2) | 1); goto LAB_00837405; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)animName + 1); bVar2 = bVar1 < idleName[1]; if (bVar1 != idleName[1]) goto LAB_00837400; - animName = (GenericPopup)((int)animName + 2); + animName = (GenericPopup)(GHIDRA_INT(animName) + 2); idleName = idleName + 2; } while (bVar1 != 0); local_1c.x = 0.0; @@ -118,7 +118,7 @@ void GenericPopup::destructor() puStack_c = &LAB_00af0b40; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; this[0x53] = (GenericPopup)KAGE::Network::Multiplayer::ConstLobby::vftable; local_8 = 0; diff --git a/src/game/generic_prompt.cpp b/src/game/generic_prompt.cpp index 63d7d21..b0478f9 100644 --- a/src/game/generic_prompt.cpp +++ b/src/game/generic_prompt.cpp @@ -13,11 +13,11 @@ void GenericPrompt::Initialize(byte SmallPrompt) undefined1 *puStack_18; undefined4 local_14; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b02515; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; if (SmallPrompt == 0) { anm2Path._size = 0; @@ -26,19 +26,19 @@ void GenericPrompt::Initialize(byte SmallPrompt) anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x18; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/Prompt_YesNo.anm2",0x19); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/Prompt_YesNo.anm2",0x19); local_14 = 1; ((ANM2 *)(&this->_sprite))->ANM2::Load(&anm2Path,1); if (anm2Path._capacity < 0x10) goto LAB_00837a6d; size = anm2Path._capacity + 1; - ptr = (char *)anm2Path._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < size) { - ptr = *(char **)(anm2Path._buf._0_4_ + -4); + ptr = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); size = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)ptr))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(ptr)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -51,20 +51,20 @@ void GenericPrompt::Initialize(byte SmallPrompt) smallAnm2Path._buf[1] = '\0'; smallAnm2Path._buf[2] = '\0'; smallAnm2Path._buf[3] = '\0'; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); - smallAnm2Path._buf._0_4_ = std::_Allocate(0x20); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); + (*(undefined4 *)((char *)&(smallAnm2Path._buf) + 0x0)) = std::_Allocate(0x20); smallAnm2Path._size = 0x1e; smallAnm2Path._capacity = 0x1f; - builtin_strncpy((char *)smallAnm2Path._buf._0_4_,"gfx/ui/Prompt_YesNo_Small.anm2",0x1f); + builtin_strncpy((*(undefined4 *)((char *)&((char *)smallAnm2Path._buf) + 0x0)),"gfx/ui/Prompt_YesNo_Small.anm2",0x1f); local_14 = 0; ((ANM2 *)(&this->_sprite))->ANM2::Load(&smallAnm2Path,1); if (smallAnm2Path._capacity < 0x10) goto LAB_00837a6d; size = smallAnm2Path._capacity + 1; - ptr = (char *)smallAnm2Path._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((char *)smallAnm2Path._buf) + 0x0)); if (0xfff < size) { - ptr = *(char **)(smallAnm2Path._buf._0_4_ + -4); + ptr = *(char **)((*(undefined4 *)((char *)&(smallAnm2Path._buf) + 0x0)) + -4); size = smallAnm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(smallAnm2Path._buf._0_4_ + (-4 - (int)ptr))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(smallAnm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(ptr)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -112,7 +112,7 @@ void GenericPrompt::Update(byte processInput) isLess = bVar1 < (byte)*appearChar; if (bVar1 != *appearChar) { LAB_00837b22: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_00837b27; } if (bVar1 == 0) break; @@ -135,7 +135,7 @@ LAB_00837b27: isLess = bVar1 < *idleChar; if (bVar1 != *idleChar) { LAB_00837b60: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_00837b65; } if (bVar1 == 0) break; @@ -156,9 +156,9 @@ LAB_00837b65: } selectedOption = *(int *)&(*(undefined1 *)((char *)(this) + 0x128)); if ((this->_sprite)._animState._animData != (void *)0x0) { - if ((*(int *)((int)(this->_sprite)._animState._animation + 0x80) < 2) && + if ((*(int *)(GHIDRA_INT((this->_sprite)._animState._animation) + 0x80) < 2) && (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - *(int *)((int)(this->_sprite)._animState._animation + 0x80) < 2)) { + *(int *)(GHIDRA_INT((this->_sprite)._animState._animation) + 0x80) < 2)) { return; } currentAnimData = (this->_sprite)._animState._animData; @@ -167,7 +167,7 @@ LAB_00837b65: (*(int *)((char *)currentAnimData + 0x1c) <= layerId)) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(this->_sprite)._animState._layerFrames + layerId * 4) = 0; + *(undefined4 *)(GHIDRA_INT((this->_sprite)._animState._layerFrames) + layerId * 4) = 0; ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::AdvanceLayerPosition(layerId,(float)selectedOption); } return; @@ -276,7 +276,7 @@ void GenericPrompt::Render() lineY = fVar3; } lineText = lineText + 1; - local_20 = (float)((int)local_20 + -1); + local_20 = (float)(GHIDRA_INT(local_20) + -1); local_18 = (Font *)textScaleY; } while (local_20 != 0.0); lineText = (undefined4 *)&(*(undefined1 *)((char *)(local_28) + 0x11c)); @@ -306,7 +306,7 @@ void GenericPrompt::Render() layoutScale.y = textScaleY; glyphRun = ((Font *)(bodyFont))->Font::layout_glyphs(glyphRunBuf,(byte *)*lineText,&fontSettings, &layoutScale); - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); color._green = textColor._green; color._red = textColor._red; color._blue = textColor._blue; @@ -370,7 +370,7 @@ LAB_0083804d: isLess = bVar1 < *idleCursor; if (bVar1 != *idleCursor) { LAB_008380a0: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_008380a5; } if (bVar1 == 0) break; @@ -383,9 +383,9 @@ LAB_008380a0: uVar2 = 0; LAB_008380a5: if (uVar2 == 0) { - *(uint *)&(*(undefined1 *)((char *)(this) + 0x12c)) = 2 - (uint)(*(int *)&(*(undefined1 *)((char *)(this) + 0x128)) != 0); + *(uint *)&(*(undefined1 *)((char *)(this) + 0x12c)) = 2 - GHIDRA_UINT((*(int *)&(*(undefined1 *)((char *)(this) + 0x128)) != 0)); if (this->_isOnlineVote != 0) { - online_vote_send((uint)(*(int *)&(*(undefined1 *)((char *)(this) + 0x128)) == 0)); + online_vote_send(GHIDRA_UINT((*(int *)&(*(undefined1 *)((char *)(this) + 0x128)) == 0))); return; } Disappear(&this->_sprite); @@ -418,7 +418,7 @@ void GenericPrompt::Show(byte UNK) isLess = bVar1 < (byte)*appearName; if (bVar1 != *appearName) { LAB_00838142: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_00838147; } if (bVar1 == 0) break; @@ -465,7 +465,7 @@ void GenericPrompt::Disappear(ANM2 *anm2) isLess = bVar1 < (byte)*targetName; if (bVar1 != *targetName) { LAB_008381d0: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_008381d5; } if (bVar1 == 0) break; diff --git a/src/game/glitched_item_set.cpp b/src/game/glitched_item_set.cpp index 8fbcdcb..94a68f6 100644 --- a/src/game/glitched_item_set.cpp +++ b/src/game/glitched_item_set.cpp @@ -16,14 +16,14 @@ void GlitchedItemSet::recalculate() do { *(undefined1 *)(uVar1 + *(int *)((char *)this + 0xc)) = 0; uVar1 = uVar1 + 1; - } while (uVar1 < (uint)(*(int *)((char *)this + 0x10) - *(int *)((char *)this + 0xc))); + } while (uVar1 < GHIDRA_UINT((*(int *)((char *)this + 0x10) - *(int *)((char *)this + 0xc)))); } uVar1 = 0; if (*(int *)((char *)this + 0x1c) != *(int *)((char *)this + 0x18)) { do { *(undefined1 *)(uVar1 + *(int *)((char *)this + 0x18)) = 0; uVar1 = uVar1 + 1; - } while (uVar1 < (uint)(*(int *)((char *)this + 0x1c) - *(int *)((char *)this + 0x18))); + } while (uVar1 < GHIDRA_UINT((*(int *)((char *)this + 0x1c) - *(int *)((char *)this + 0x18)))); } *(undefined4 *)((char *)this + 0x24) = 0; *(undefined4 *)((char *)this + 0x28) = 0; @@ -36,10 +36,10 @@ void GlitchedItemSet::recalculate() if ((int *)node != *(int **)((char *)this + 4)) { do { uVar1 = ~*(uint *)(node + 0x10); - if ((((int)*(uint *)(node + 0x10) < 0) && + if (((GHIDRA_INT(*(uint *)(node + 0x10)) < 0) && (proceduralItems = (game->_proceduralItemManager)._proceduralItems._begin, - (int)uVar1 < - (int)(game->_proceduralItemManager)._proceduralItems._end - (int)proceduralItems >> 2)) && + GHIDRA_INT(uVar1) < + GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(proceduralItems) >> 2)) && (proceduralItem = *(int *)((char *)proceduralItems + uVar1 * 4), proceduralItem != 0)) { countInfo = *(int **)(proceduralItem + 0x10); if (countInfo != (int *)0x0) { diff --git a/src/game/grid_entity.cpp b/src/game/grid_entity.cpp index 7743344..4423643 100644 --- a/src/game/grid_entity.cpp +++ b/src/game/grid_entity.cpp @@ -190,7 +190,7 @@ byte GridEntity::IsEasyCrushableOrWalkable() { int gridType; - if (((((((uint)this->_gridIndex < 0x1c0) && + if ((((((GHIDRA_UINT(this->_gridIndex) < 0x1c0) && (0 < *(int *)((char *)g_game->_room + this->_gridIndex * 4 + 0x76c))) && (gridType = (this->_desc)._type, gridType != 2)) && ((gridType != 6 && (gridType != 4)))) && ((gridType != 0x16 && (gridType != 0x1a)))) && @@ -205,7 +205,7 @@ byte GridEntity::IsDangerousCrushableOrWalkable() { int gridType; - if ((((((uint)this->_gridIndex < 0x1c0) && + if (((((GHIDRA_UINT(this->_gridIndex) < 0x1c0) && (999 < *(int *)((char *)g_game->_room + this->_gridIndex * 4 + 0x76c))) && (gridType = (this->_desc)._type, gridType != 0xc)) && ((gridType != 5 && (gridType != 8)))) && ((gridType != 9 && ((gridType != 0xe || ((this->_desc)._variant != 1)))))) { @@ -234,7 +234,7 @@ void GridEntity::trigger_output(GridEntity *gridEntity) iVar1 = (gridEntity->_desc)._type; if (iVar1 == 0xc) { - if ((uint)(gridEntity->_desc)._state < 4) { + if (GHIDRA_UINT((gridEntity->_desc)._state) < 4) { destroySource._position.y = g_vectorZero.y; destroySource._velocity.y = g_vectorZero.y; destroySource._type = 0; diff --git a/src/game/grid_entity_decoration.cpp b/src/game/grid_entity_decoration.cpp index 53ba355..24bd766 100644 --- a/src/game/grid_entity_decoration.cpp +++ b/src/game/grid_entity_decoration.cpp @@ -37,7 +37,7 @@ void GridEntity_Decoration::Update() local_14 = (std_string *)0xffffffff; puStack_18 = &LAB_00af462d; local_1c = ExceptionList; - securityCookie = __security_cookie ^ (uint)(animName + 0xb); + securityCookie = __security_cookie ^ GHIDRA_UINT((animName + 0xb)); ExceptionList = &local_1c; if (((this->_desc)._variant != 1000) && ((this->_sprite)._loaded != 0)) { decoration = this; @@ -57,8 +57,8 @@ void GridEntity_Decoration::Update() (this->_sprite)._animState._isPlaying = 0; } uVar1 = 0; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { player = ((Game *)(g_game))->Game::GetPlayer(uVar1); if (player->_entityGridCollisionClass == 5) { @@ -96,8 +96,8 @@ void GridEntity_Decoration::Update() } } uVar1 = uVar1 + 1; - } while (uVar1 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (uVar1 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); animNameData = animName[0]; } } @@ -107,7 +107,7 @@ void GridEntity_Decoration::Update() if (0xfff < uVar1) { psVar2 = (std_string *)animNameData[-1]._capacity; uVar1 = animNameCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)animNameData + (-4 - (int)psVar2))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(animNameData) + (-4 - GHIDRA_INT(psVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -161,7 +161,7 @@ void GridEntity_Decoration::BeginBatches() local_8 = 0xffffffff; puStack_c = &LAB_00b0d8bd; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&local_2c)[1]._size; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&local_2c)[1]._size); iVar5 = (this->_desc)._variant; if (iVar5 == 1000) { return; @@ -194,20 +194,20 @@ void GridEntity_Decoration::BeginBatches() local_2c._buf[2] = '\0'; local_2c._buf[3] = '\0'; if (backdropType == 0x38) { - local_2c._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) = std::_Allocate(0x20); local_2c._size = 0x1a; local_2c._capacity = 0x1f; - builtin_strncpy((char *)local_2c._buf._0_4_,"gfx/grid/Tiles_Rotgut.anm2",0x1b); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_2c._buf) + 0x0)),"gfx/grid/Tiles_Rotgut.anm2",0x1b); local_8 = 0; ((ANM2 *)(&this->_sprite))->ANM2::Load(&local_2c,1); local_8 = 0xffffffff; if (0xf < local_2c._capacity) { uVar11 = local_2c._capacity + 1; - pcVar9 = (char *)local_2c._buf._0_4_; + pcVar9 = (*(undefined4 *)((char *)&((char *)local_2c._buf) + 0x0)); if (0xfff < uVar11) { - pcVar9 = *(char **)(local_2c._buf._0_4_ + -4); + pcVar9 = *(char **)((*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) + -4); uVar11 = local_2c._capacity + 0x24; - if ((char *)0x1f < (char *)(local_2c._buf._0_4_ + (-4 - (int)pcVar9))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar9)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -232,34 +232,34 @@ void GridEntity_Decoration::BeginBatches() return; } if (backdropType == 0x37) { - local_2c._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) = std::_Allocate(0x30); local_2c._size = 0x26; local_2c._capacity = 0x2f; - builtin_strncpy(((std_string *)local_2c._buf._0_4_)->_buf,"gfx/grid/Tiles_I",0x10); - ((std_string *)local_2c._buf._0_4_)->_size = 0x646d6574; - ((std_string *)local_2c._buf._0_4_)->_capacity = 0x65676e75; - builtin_strncpy(((std_string *)(local_2c._buf._0_4_ + 0x18))->_buf,"on_Gideon.anm2",0xf); + builtin_strncpy(((*(undefined4 *)((char *)&((std_string *)local_2c._buf) + 0x0)))->_buf,"gfx/grid/Tiles_I",0x10); + ((*(undefined4 *)((char *)&((std_string *)local_2c._buf) + 0x0)))->_size = 0x646d6574; + ((*(undefined4 *)((char *)&((std_string *)local_2c._buf) + 0x0)))->_capacity = 0x65676e75; + builtin_strncpy(((std_string *)((*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) + 0x18))->_buf,"on_Gideon.anm2",0xf); local_8 = 1; } else { - local_2c._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) = std::_Allocate(0x20); local_2c._size = 0x1f; local_2c._capacity = 0x1f; - builtin_strncpy(((std_string *)local_2c._buf._0_4_)->_buf,"gfx/grid/Tiles_I",0x10); - ((std_string *)local_2c._buf._0_4_)->_size = 0x646d6574; - ((std_string *)local_2c._buf._0_4_)->_capacity = 0x65676e75; - builtin_strncpy(((std_string *)(local_2c._buf._0_4_ + 0x18))->_buf,"on.anm2",8); + builtin_strncpy(((*(undefined4 *)((char *)&((std_string *)local_2c._buf) + 0x0)))->_buf,"gfx/grid/Tiles_I",0x10); + ((*(undefined4 *)((char *)&((std_string *)local_2c._buf) + 0x0)))->_size = 0x646d6574; + ((*(undefined4 *)((char *)&((std_string *)local_2c._buf) + 0x0)))->_capacity = 0x65676e75; + builtin_strncpy(((std_string *)((*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) + 0x18))->_buf,"on.anm2",8); local_8 = 2; } ((ANM2 *)(&this->_sprite))->ANM2::Load(&local_2c,1); local_8 = 0xffffffff; if (0xf < local_2c._capacity) { uVar11 = local_2c._capacity + 1; - psVar4 = (std_string *)local_2c._buf._0_4_; + psVar4 = (*(undefined4 *)((char *)&((std_string *)local_2c._buf) + 0x0)); if (0xfff < uVar11) { - psVar4 = (std_string *)((std_string *)(local_2c._buf._0_4_ + -0x18))->_capacity; + psVar4 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) + -0x18))->_capacity; uVar11 = local_2c._capacity + 0x24; - if (0x1f < (uint)(local_2c._buf._0_4_ + (-4 - (int)psVar4))) goto LAB_0099af04; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar4))))) goto LAB_0099af04; } operator_delete(psVar4,uVar11); } @@ -287,23 +287,23 @@ void GridEntity_Decoration::BeginBatches() local_2c._buf[1] = '\0'; local_2c._buf[2] = '\0'; local_2c._buf[3] = '\0'; - local_2c._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) = std::_Allocate(0x20); local_2c._size = 0x1c; local_2c._capacity = 0x1f; - builtin_strncpy(((std_string *)local_2c._buf._0_4_)->_buf,"gfx/grid/Props_1",0x10); - ((std_string *)local_2c._buf._0_4_)->_size = 0x72475f32; - ((std_string *)local_2c._buf._0_4_)->_capacity = 0x2e646565; - builtin_strncpy(((std_string *)(local_2c._buf._0_4_ + 0x18))->_buf,"anm2",5); + builtin_strncpy(((*(undefined4 *)((char *)&((std_string *)local_2c._buf) + 0x0)))->_buf,"gfx/grid/Props_1",0x10); + ((*(undefined4 *)((char *)&((std_string *)local_2c._buf) + 0x0)))->_size = 0x72475f32; + ((*(undefined4 *)((char *)&((std_string *)local_2c._buf) + 0x0)))->_capacity = 0x2e646565; + builtin_strncpy(((std_string *)((*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) + 0x18))->_buf,"anm2",5); local_8 = 3; ((ANM2 *)(&this->_sprite))->ANM2::Load(&local_2c,1); local_8 = 0xffffffff; if (0xf < local_2c._capacity) { uVar11 = local_2c._capacity + 1; - psVar4 = (std_string *)local_2c._buf._0_4_; + psVar4 = (*(undefined4 *)((char *)&((std_string *)local_2c._buf) + 0x0)); if (0xfff < uVar11) { - psVar4 = (std_string *)((std_string *)(local_2c._buf._0_4_ + -0x18))->_capacity; + psVar4 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) + -0x18))->_capacity; uVar11 = local_2c._capacity + 0x24; - if (0x1f < (uint)(local_2c._buf._0_4_ + (-4 - (int)psVar4))) goto LAB_0099af04; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar4))))) goto LAB_0099af04; } operator_delete(psVar4,uVar11); } @@ -312,7 +312,7 @@ void GridEntity_Decoration::BeginBatches() ExceptionList = local_10; return; } - ((std::string *)(anm2Path._buf))->std::string::string((void *)((int)pvVar8 + *(int *)((char *)pvVar8 + 0x1d18) * 0x13c + 0x1d94)); + ((std::string *)(anm2Path._buf))->std::string::string((void *)(GHIDRA_INT(pvVar8) + *(int *)((char *)pvVar8 + 0x1d18) * 0x13c + 0x1d94)); local_8 = 4; iVar5 = g_game->_stage; bVar2 = ((Seeds *)(&g_game->_seedEffects))->Seeds::HasSeedEffect(0x4f); @@ -343,7 +343,7 @@ LAB_0099b160: pvVar8 = (decoration->_sprite)._animState._animData; if (pvVar8 == (void *)0x0) { local_2c._capacity = 0xf; - local_2c._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) = (std_string *)0x0; local_2c._size = 0; } else { @@ -351,9 +351,9 @@ LAB_0099b160: } local_64 = &local_2c; if (0xf < local_2c._capacity) { - local_64 = (std_string *)local_2c._buf._0_4_; + local_64 = (*(undefined4 *)((char *)&((std_string *)local_2c._buf) + 0x0)); } - animNameHeap = (std_string *)local_2c._buf._0_4_; + animNameHeap = (*(undefined4 *)((char *)&((std_string *)local_2c._buf) + 0x0)); if (4 < local_2c._size) { iVar5 = -1; if (local_2c._size - 5 != -1) { @@ -380,20 +380,20 @@ LAB_0099b160: uVar11 = 0; } else { - uVar11 = -(uint)bVar12 | 1; + uVar11 = -GHIDRA_UINT(bVar12) | 1; } if (uVar11 == 0) { - if (((int)psVar4 - (int)local_64 != -1) && (backdropType != 4)) goto LAB_0099b501; + if ((GHIDRA_INT(psVar4) - GHIDRA_INT(local_64) != -1) && (backdropType != 4)) goto LAB_0099b501; break; } } if (psVar4 == local_64) break; - psVar4 = (std_string *)((int)&psVar4[-1]._capacity + 3); + psVar4 = (std_string *)(GHIDRA_INT(&psVar4[-1]._capacity) + 3); } while( true ); } local_64 = &local_2c; if (0xf < local_2c._capacity) { - local_64 = (std_string *)local_2c._buf._0_4_; + local_64 = (*(undefined4 *)((char *)&((std_string *)local_2c._buf) + 0x0)); } if (8 < local_2c._size) { iVar5 = -1; @@ -423,26 +423,26 @@ LAB_0099b160: uVar11 = 0; } else { - uVar11 = -(uint)bVar12 | 1; + uVar11 = -GHIDRA_UINT(bVar12) | 1; } if (uVar11 == 0) { - if (((int)psVar4 - (int)local_64 != -1) && (backdropType != 5)) goto LAB_0099b501; + if ((GHIDRA_INT(psVar4) - GHIDRA_INT(local_64) != -1) && (backdropType != 5)) goto LAB_0099b501; break; } } if (psVar4 == local_64) break; - psVar4 = (std_string *)((int)&psVar4[-1]._capacity + 3); + psVar4 = (std_string *)(GHIDRA_INT(&psVar4[-1]._capacity) + 3); } while( true ); } local_78 = &local_2c; if (0xf < local_2c._capacity) { - local_78 = (std_string *)local_2c._buf._0_4_; + local_78 = (*(undefined4 *)((char *)&((std_string *)local_2c._buf) + 0x0)); } if (5 < local_2c._size) { local_64 = (std_string *)(local_78->_buf + (local_2c._size - 5)); - for (puddleMatch = memchr(local_78,0x50,(int)local_64 - (int)local_78); + for (puddleMatch = memchr(local_78,0x50,GHIDRA_INT(local_64) - GHIDRA_INT(local_78)); puddleMatch != (byte *)0x0; - puddleMatch = memchr(puddleMatch + 1,0x50,(int)local_64 - (int)(puddleMatch + 1))) { + puddleMatch = memchr(puddleMatch + 1,0x50,GHIDRA_INT(local_64) - GHIDRA_INT((puddleMatch + 1)))) { pcVar9 = "Puddle"; iVar5 = 2; pbVar7 = puddleMatch; @@ -460,10 +460,10 @@ LAB_0099b160: uVar11 = 0; } else { - uVar11 = -(uint)bVar12 | 1; + uVar11 = -GHIDRA_UINT(bVar12) | 1; } if (uVar11 == 0) { - if (((int)puddleMatch - (int)local_78 != -1) && + if ((GHIDRA_INT(puddleMatch) - GHIDRA_INT(local_78) != -1) && (*(int *)((char *)g_game->_room + 0x721c) != 0)) goto LAB_0099b501; break; } @@ -480,8 +480,8 @@ LAB_0099b160: } uVar11 = anm2Path._capacity + 1; if (uVar11 < 0x1000) goto LAB_0099b4b8; - uVar3 = anm2Path._buf._0_4_ + (-4 - (int)*(void **)(anm2Path._buf._0_4_ + -4)); - anm2Path._buf._0_4_ = *(void **)(anm2Path._buf._0_4_ + -4); + uVar3 = (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(*(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4))); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = *(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); joined_r0x0099b4b2: uVar11 = anm2Path._capacity + 0x24; if (0x1f < uVar3) { @@ -490,7 +490,7 @@ LAB_0099af04: _invalid_parameter_noinfo_noreturn(); } LAB_0099b4b8: - operator_delete((void *)anm2Path._buf._0_4_,uVar11); + operator_delete((*(undefined4 *)((char *)&((void *)anm2Path._buf) + 0x0)),uVar11); ExceptionList = local_10; return; LAB_0099b501: @@ -502,7 +502,7 @@ LAB_0099b3bd: if (0xfff < uVar11) { psVar4 = (std_string *)animNameHeap[-1]._capacity; uVar11 = local_2c._capacity + 0x24; - if (0x1f < (uint)((int)animNameHeap + (-4 - (int)psVar4))) goto LAB_0099af04; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(animNameHeap) + (-4 - GHIDRA_INT(psVar4))))) goto LAB_0099af04; } operator_delete(psVar4,uVar11); } @@ -521,17 +521,17 @@ LAB_0099b406: uVar3 = curAnimNameCapacity + 1; pvVar8 = curAnimName[0]; if (0xfff < uVar3) { - pvVar8 = *(void **)((int)curAnimName[0] + -4); + pvVar8 = *(void **)(GHIDRA_INT(curAnimName[0]) + -4); uVar3 = curAnimNameCapacity + 0x24; - if (0x1f < (uint)((int)curAnimName[0] + (-4 - (int)pvVar8))) goto LAB_0099af04; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(curAnimName[0]) + (-4 - GHIDRA_INT(pvVar8))))) goto LAB_0099af04; } operator_delete(pvVar8,uVar3); } curAnimNameSize = 0; curAnimNameCapacity = 0xf; - curAnimName[0] = (void *)((uint)curAnimName[0] & 0xffffff00); + curAnimName[0] = (void *)(GHIDRA_UINT(curAnimName[0]) & 0xffffff00); if (uVar11 != 0xffffffff) { - puddleCount = (int *)((int)g_game->_room + 0x721c); + puddleCount = (int *)(GHIDRA_INT(g_game->_room) + 0x721c); *puddleCount = *puddleCount + 1; } if (anm2Path._capacity < 0x10) { @@ -540,7 +540,7 @@ LAB_0099b406: } uVar11 = anm2Path._capacity + 1; if (uVar11 < 0x1000) goto LAB_0099b4b8; - uVar3 = anm2Path._buf._0_4_ + (-4 - (int)*(void **)(anm2Path._buf._0_4_ + -4)); - anm2Path._buf._0_4_ = *(void **)(anm2Path._buf._0_4_ + -4); + uVar3 = (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(*(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4))); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = *(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); goto joined_r0x0099b4b2; } diff --git a/src/game/grid_entity_door.cpp b/src/game/grid_entity_door.cpp index 38e31b7..88941a6 100644 --- a/src/game/grid_entity_door.cpp +++ b/src/game/grid_entity_door.cpp @@ -96,14 +96,14 @@ void GridEntity_Door::Update() float playerY; int *roomConfig; - local_44 = __security_cookie ^ (uint)auStack_f4; + local_44 = __security_cookie ^ GHIDRA_UINT(auStack_f4); this->_updateCount = this->_updateCount + 1; game = g_game; if ((this->_desc)._variant == 5) { - uVar6 = *(uint *)((int)&g_game->_gameStateFlags + 4); + uVar6 = *(uint *)(GHIDRA_INT(&g_game->_gameStateFlags) + 4); if ((uVar6 & 0x20000) != 0) { - *(int *)&g_game->_gameStateFlags = (int)g_game->_gameStateFlags; - *(uint *)((int)&game->_gameStateFlags + 4) = uVar6 | 0x20000; + *(int *)&g_game->_gameStateFlags = GHIDRA_INT(g_game->_gameStateFlags); + *(uint *)(GHIDRA_INT(&game->_gameStateFlags) + 4) = uVar6 | 0x20000; (this->_desc)._variant = 8; UpdateAnimation(this); Open(this); @@ -120,9 +120,9 @@ void GridEntity_Door::Update() if (iVar3 != 4) { if (iVar3 == 5) { qVar2 = g_game->_gameStateFlags; - flagsHigh = (uint *)((int)&g_game->_gameStateFlags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&g_game->_gameStateFlags) + 4); *flagsHigh = *flagsHigh | 0x20000; - *(int *)&game->_gameStateFlags = (int)qVar2; + *(int *)&game->_gameStateFlags = GHIDRA_INT(qVar2); } (this->_desc)._variant = 8; UpdateAnimation(this); @@ -169,13 +169,13 @@ LAB_0070c737: dVar7 = floor((double)(this->_sprite)._animState._animFrame); manager = g_manager; local_c4 = (float)dVar7; - if ((int)dVar7 == 2) { + if (GHIDRA_INT(dVar7) == 2) { local_c4 = 6.44597e-44; if ((this->_doorFlags & 8) == 0) { local_c4 = 4.90454e-44; } seed_fart_sound_override((int *)&local_c4); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_c4,1.0,10,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_c4),1.0,10,0,1.0,0.0); } } } @@ -191,7 +191,7 @@ LAB_0070c737: isChallengeOpen = ((ANM2 *)(&this->_sprite))->ANM2::IsPlaying((byte *)animName); if (isChallengeOpen == 0) { LAB_0070c871: - uVar4 = (uint)local_c5; + uVar4 = GHIDRA_UINT(local_c5); } else { pvVar1 = (this->_sprite)._animState._animData; @@ -201,7 +201,7 @@ LAB_0070c871: iVar3 = ((ANM2 *)(&this->_sprite))->ANM2::GetFrame(); if (iVar3 != 2) goto LAB_0070c871; FUN_0070bfa0(0x2f,10,uVar8,0x3f800000); - uVar4 = (uint)(byte)this->_doorFlags; + uVar4 = GHIDRA_UINT((byte)this->_doorFlags); } } } @@ -241,7 +241,7 @@ LAB_0070c926: isLess = isChallengeOpen < (byte)*expectedName; if (isChallengeOpen != *expectedName) { LAB_0070c980: - uVar6 = -(uint)isLess | 1; + uVar6 = -GHIDRA_UINT(isLess) | 1; goto LAB_0070c985; } if (isChallengeOpen == 0) break; @@ -304,8 +304,8 @@ LAB_0070c9b8: boxTop = local_b8 + local_88._tint[uVar6 * 4 + 1]; local_b8 = local_b8 + local_88._tint[uVar6 * 4 + 3]; uVar6 = 0; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { player = ((Game *)(g_game))->Game::GetPlayer(uVar6); if (((player->_entityGridCollisionClass == 5) || (*(int *)((char *)g_game->_room + 8) == 10)) @@ -332,8 +332,8 @@ LAB_0070c9b8: } } uVar6 = uVar6 + 1; - } while (uVar6 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (uVar6 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); } } if ((((((this->_targetRoomType == 0xb) && ((this->_doorFlags & 8) != 0)) && (this->_isBusted == 0) @@ -369,7 +369,7 @@ LAB_0070c9b8: if (isChallengeOpen != 0) { local_c4 = 7.28675e-44; seed_fart_sound_override((int *)&local_c4); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_c4,1.0,2,0,0.33,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_c4),1.0,2,0,0.33,0.0); } } } @@ -390,7 +390,7 @@ LAB_0070c9b8: local_c4 = 9.52883e-44; seed_fart_sound_override((int *)&local_c4); uVar8 = 0x3f800000; - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_c4,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_c4),1.0,2,0,1.0,0.0); if ((this->_desc)._variant == 8) { FUN_0070bfa0(0x9c,2,uVar8,0x3f800000); } @@ -398,7 +398,7 @@ LAB_0070c9b8: else { local_c4 = 7.28675e-44; seed_fart_sound_override((int *)&local_c4); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_c4,1.0,2,0,0.33,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_c4),1.0,2,0,0.33,0.0); } } if ((this->_sprite)._animState._animData != (void *)0x0) { @@ -438,7 +438,7 @@ LAB_0070c9b8: (((*(int *)((char *)pvVar1 + 8) == 1 && (*(int *)((char *)pvVar1 + 0x10) == 3)) && (g_game->_stageType == 1)))) { uVar6 = Random(); - local_c4 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + local_c4 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 0.5; layer = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer((byte *)0x3); local_88._offset[0] = 0.0; @@ -494,7 +494,7 @@ LAB_0070c9b8: if ((iVar3 % iVar5 < 0xb) && (iVar3 % iVar5 == 0)) { local_c4 = 1.42092e-42; seed_fart_sound_override((int *)&local_c4); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_c4,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_c4),1.0,2,0,1.0,0.0); isChallengeOpen = ((ANM2 *)(&this->_sparkleSprite))->ANM2::SetAnimation((byte *)"Sparkle",1); if (isChallengeOpen != 0) { ((AnimationState *)(&(this->_sparkleSprite)._animState))->AnimationState::Rewind(); @@ -621,13 +621,13 @@ void GridEntity_Door::LoadSprite() float tintG; float tintR; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); ehState = 0xffffffff; puStack_18 = &LAB_00afc928; savedExceptionList = ExceptionList; - stackCookie = __security_cookie ^ (int)register0x00000010 - 0x10U; + stackCookie = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &savedExceptionList; - puVar2 = (undefined1 *)((int)register0x00000010 + -4); + puVar2 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); if ((this->_extraSprite)._loaded != 0) { ((ANM2 *)(&this->_extraSprite))->ANM2::Reset(); puVar2 = puStack_20; @@ -645,20 +645,20 @@ void GridEntity_Door::LoadSprite() tmpString._buf[1] = '\0'; tmpString._buf[2] = '\0'; tmpString._buf[3] = '\0'; - tmpString._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = std::_Allocate(0x30); tmpString._size = 0x22; tmpString._capacity = 0x2f; - builtin_strncpy((char *)tmpString._buf._0_4_,"gfx/grid/door_downpour_mirror.anm2",0x23); + builtin_strncpy((*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)),"gfx/grid/door_downpour_mirror.anm2",0x23); ehState = 0; ((ANM2 *)(&this->_sprite))->ANM2::Load(&tmpString,1); ehState = 0xffffffff; if (0xf < tmpString._capacity) { uVar8 = tmpString._capacity + 1; - pcVar7 = (char *)tmpString._buf._0_4_; + pcVar7 = (*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)); if (0xfff < uVar8) { - pcVar7 = *(char **)(tmpString._buf._0_4_ + -4); + pcVar7 = *(char **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar8 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)pcVar7))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar7)))) { LAB_0070d535: ehState = 0xffffffff; /* WARNING: Subroutine does not return */ @@ -681,21 +681,21 @@ LAB_0070d535: mineshaftLightPath._buf[1] = '\0'; mineshaftLightPath._buf[2] = '\0'; mineshaftLightPath._buf[3] = '\0'; - mineshaftLightPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(mineshaftLightPath._buf) + 0x0)) = std::_Allocate(0x30); mineshaftLightPath._size = 0x28; mineshaftLightPath._capacity = 0x2f; - builtin_strncpy((char *)mineshaftLightPath._buf._0_4_, + builtin_strncpy((*(undefined4 *)((char *)&((char *)mineshaftLightPath._buf) + 0x0)), "gfx/grid/door_mines_mineshaft_light.anm2",0x29); ehState = 1; ((ANM2 *)(&this->_sprite))->ANM2::Load(&mineshaftLightPath,1); ehState = 0xffffffff; if (0xf < mineshaftLightPath._capacity) { uVar8 = mineshaftLightPath._capacity + 1; - pcVar7 = (char *)mineshaftLightPath._buf._0_4_; + pcVar7 = (*(undefined4 *)((char *)&((char *)mineshaftLightPath._buf) + 0x0)); if (0xfff < uVar8) { - pcVar7 = *(char **)(mineshaftLightPath._buf._0_4_ + -4); + pcVar7 = *(char **)((*(undefined4 *)((char *)&(mineshaftLightPath._buf) + 0x0)) + -4); uVar8 = mineshaftLightPath._capacity + 0x24; - if ((char *)0x1f < (char *)(mineshaftLightPath._buf._0_4_ + (-4 - (int)pcVar7))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(mineshaftLightPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar7)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -704,7 +704,7 @@ LAB_0070d535: } mineshaftLightPath._size = 0; mineshaftLightPath._capacity = 0xf; - mineshaftLightPath._buf._0_4_ = mineshaftLightPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(mineshaftLightPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(mineshaftLightPath._buf) + 0x0)) & 0xffffff00; } else { mineshaftDarkPath._size = 0; @@ -713,21 +713,21 @@ LAB_0070d535: mineshaftDarkPath._buf[1] = '\0'; mineshaftDarkPath._buf[2] = '\0'; mineshaftDarkPath._buf[3] = '\0'; - mineshaftDarkPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(mineshaftDarkPath._buf) + 0x0)) = std::_Allocate(0x30); mineshaftDarkPath._size = 0x27; mineshaftDarkPath._capacity = 0x2f; - builtin_strncpy((char *)mineshaftDarkPath._buf._0_4_,"gfx/grid/door_mines_mineshaft_dark.anm2" + builtin_strncpy((*(undefined4 *)((char *)&((char *)mineshaftDarkPath._buf) + 0x0)),"gfx/grid/door_mines_mineshaft_dark.anm2" ,0x28); ehState = 2; ((ANM2 *)(&this->_sprite))->ANM2::Load(&mineshaftDarkPath,1); ehState = 0xffffffff; if (0xf < mineshaftDarkPath._capacity) { uVar8 = mineshaftDarkPath._capacity + 1; - pcVar7 = (char *)mineshaftDarkPath._buf._0_4_; + pcVar7 = (*(undefined4 *)((char *)&((char *)mineshaftDarkPath._buf) + 0x0)); if (0xfff < uVar8) { - pcVar7 = *(char **)(mineshaftDarkPath._buf._0_4_ + -4); + pcVar7 = *(char **)((*(undefined4 *)((char *)&(mineshaftDarkPath._buf) + 0x0)) + -4); uVar8 = mineshaftDarkPath._capacity + 0x24; - if ((char *)0x1f < (char *)(mineshaftDarkPath._buf._0_4_ + (-4 - (int)pcVar7))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(mineshaftDarkPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar7)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -736,7 +736,7 @@ LAB_0070d535: } mineshaftDarkPath._size = 0; mineshaftDarkPath._capacity = 0xf; - mineshaftDarkPath._buf._0_4_ = mineshaftDarkPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(mineshaftDarkPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(mineshaftDarkPath._buf) + 0x0)) & 0xffffff00; } this->_doorFlags = this->_doorFlags | 0x20; if ((this->_desc)._variant == 4) { @@ -755,20 +755,20 @@ LAB_0070e8c5: anmPath._buf[1] = '\0'; anmPath._buf[2] = '\0'; anmPath._buf[3] = '\0'; - anmPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = std::_Allocate(0x20); anmPath._size = 0x15; anmPath._capacity = 0x1f; - builtin_strncpy((char *)anmPath._buf._0_4_,"gfx/door_sparkle.anm2",0x16); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)),"gfx/door_sparkle.anm2",0x16); ehState = 3; ((ANM2 *)(&this->_sparkleSprite))->ANM2::Load(&anmPath,1); ehState = 0xffffffff; if (0xf < anmPath._capacity) { uVar8 = anmPath._capacity + 1; - pcVar7 = (char *)anmPath._buf._0_4_; + pcVar7 = (*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)); if (0xfff < uVar8) { - pcVar7 = *(char **)(anmPath._buf._0_4_ + -4); + pcVar7 = *(char **)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + -4); uVar8 = anmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(anmPath._buf._0_4_ + (-4 - (int)pcVar7))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar7)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -777,7 +777,7 @@ LAB_0070e8c5: } anmPath._size = 0; anmPath._capacity = 0xf; - anmPath._buf._0_4_ = anmPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) & 0xffffff00; LAB_0070e980: tmpString._size = 0; tmpString._capacity = 0xf; @@ -786,21 +786,21 @@ LAB_0070e980: tmpString._buf[2] = '\0'; tmpString._buf[3] = '\0'; if (*(int *)((char *)g_game->_room + 0x1d18) == 0x10) { - tmpString._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = std::_Allocate(0x30); tmpString._size = 0x2a; tmpString._capacity = 0x2f; - builtin_strncpy((char *)tmpString._buf._0_4_,"gfx/grid/door_08_holeinwall _darkroom.anm2",0x2b + builtin_strncpy((*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)),"gfx/grid/door_08_holeinwall _darkroom.anm2",0x2b ); ehState = 4; ((ANM2 *)(&this->_sprite))->ANM2::Load(&tmpString,1); ehState = 0xffffffff; if (0xf < tmpString._capacity) { uVar8 = tmpString._capacity + 1; - pcVar7 = (char *)tmpString._buf._0_4_; + pcVar7 = (*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)); if (0xfff < uVar8) { - pcVar7 = *(char **)(tmpString._buf._0_4_ + -4); + pcVar7 = *(char **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar8 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)pcVar7))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar7)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -809,23 +809,23 @@ LAB_0070e980: } tmpString._size = 0; tmpString._capacity = 0xf; - tmpString._buf._0_4_ = tmpString._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) & 0xffffff00; } else { - tmpString._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = std::_Allocate(0x30); tmpString._size = 0x20; tmpString._capacity = 0x2f; - builtin_strncpy((char *)tmpString._buf._0_4_,"gfx/grid/Door_08_HoleInWall.anm2",0x21); + builtin_strncpy((*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)),"gfx/grid/Door_08_HoleInWall.anm2",0x21); ehState = 5; ((ANM2 *)(&this->_sprite))->ANM2::Load(&tmpString,0); ehState = 0xffffffff; if (0xf < tmpString._capacity) { uVar8 = tmpString._capacity + 1; - pcVar7 = (char *)tmpString._buf._0_4_; + pcVar7 = (*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)); if (0xfff < uVar8) { - pcVar7 = *(char **)(tmpString._buf._0_4_ + -4); + pcVar7 = *(char **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar8 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)pcVar7))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar7)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -834,11 +834,11 @@ LAB_0070e980: } tmpString._size = 0; tmpString._capacity = 0xf; - tmpString._buf._0_4_ = tmpString._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) & 0xffffff00; Sprite::ReplaceSpritesheet ((Sprite *)&this->_sprite,0, (std_string *) - ((int)g_game->_room + *(int *)((char *)g_game->_room + 0x1d18) * 0x13c + 0x1e24)); + (GHIDRA_INT(g_game->_room) + *(int *)((char *)g_game->_room + 0x1d18) * 0x13c + 0x1e24)); ((ANM2 *)(&this->_sprite))->ANM2::LoadGraphics(unk_00); } pvVar6 = g_game->_room; @@ -895,7 +895,7 @@ LAB_0070e980: do { tmpString._size = 0; tmpString._capacity = 0xf; - tmpString._buf._0_4_ = (char *)0x0; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (char *)0x0; ((std::string *)(tmpString._buf))->std::string::assign((byte *)"gfx/grid/door_04_selfsacrificeroomdoor_nospikes.png",0x33); ehState = 0xe; ((Sprite *)((Sprite *)&this->_sprite))->Sprite::ReplaceSpritesheet(uVar8,&tmpString); @@ -903,18 +903,18 @@ LAB_0070e980: bVar3 = extraout_CL_11; if (0xf < tmpString._capacity) { uVar9 = tmpString._capacity + 1; - pcVar7 = (char *)tmpString._buf._0_4_; + pcVar7 = (*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)); if (0xfff < uVar9) { - pcVar7 = *(char **)(tmpString._buf._0_4_ + -4); + pcVar7 = *(char **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar9 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)pcVar7))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar7)))) goto LAB_0070d535; } operator_delete(pcVar7,uVar9); bVar3 = extraout_CL_12; } uVar8 = uVar8 + 1; - } while (uVar8 < (uint)(this->_sprite)._layerCount); + } while (uVar8 < GHIDRA_UINT((this->_sprite)._layerCount)); } ((ANM2 *)(&this->_sprite))->ANM2::LoadGraphics(bVar3); (this->_desc)._varData = 1; @@ -953,9 +953,9 @@ LAB_0070e980: if (((bVar3 == 0) || (game->_greedModeTreasureRoomIdx == this->_targetRoomIdx)) || (game->_greedModeTreasureRoomIdx == game->_currentRoomIdx)) { roomDesc = ((Game *)(game))->Game::GetCurrentRoomDesc(); - if ((((uint)roomDesc->Flags >> 0xb & 1) == 0) && + if (((GHIDRA_UINT(roomDesc->Flags) >> 0xb & 1) == 0) && (roomDesc = ((Level *)((Level *)g_game))->Level::GetRoomByIdx(this->_targetRoomIdx,-1), - ((uint)roomDesc->Flags >> 0xb & 1) == 0)) { + (GHIDRA_UINT(roomDesc->Flags) >> 0xb & 1) == 0)) { std::string::string_from_cstr (doorAnmPath._buf,(byte *)"gfx/grid/Door_02_TreasureRoomDoor.anm2"); ehState = 0x13; @@ -1010,7 +1010,7 @@ LAB_0070e789: do { tmpString._size = 0; tmpString._capacity = 0xf; - tmpString._buf._0_4_ = (char *)0x0; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (char *)0x0; ((std::string *)(tmpString._buf))->std::string::assign((byte *)"gfx/grid/door_29_doortobluewomb_blue.png",0x28); ehState = 0x17; ((Sprite *)((Sprite *)&this->_sprite))->Sprite::ReplaceSpritesheet(uVar8,&tmpString); @@ -1018,18 +1018,18 @@ LAB_0070e789: bVar3 = extraout_CL_08; if (0xf < tmpString._capacity) { uVar9 = tmpString._capacity + 1; - pcVar7 = (char *)tmpString._buf._0_4_; + pcVar7 = (*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)); if (0xfff < uVar9) { - pcVar7 = *(char **)(tmpString._buf._0_4_ + -4); + pcVar7 = *(char **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar9 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)pcVar7))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar7)))) goto LAB_0070d535; } operator_delete(pcVar7,uVar9); bVar3 = extraout_CL_09; } uVar8 = uVar8 + 1; - } while (uVar8 < (uint)(this->_sprite)._layerCount); + } while (uVar8 < GHIDRA_UINT((this->_sprite)._layerCount)); } ((ANM2 *)(&this->_sprite))->ANM2::LoadGraphics(bVar3); goto LAB_0070e789; @@ -1092,9 +1092,9 @@ LAB_0070e789: bVar3 = IsRoomType(this,0xe); if (bVar3 != 0) { roomDesc = ((Game *)(game))->Game::GetCurrentRoomDesc(); - if ((((uint)roomDesc->Flags >> 0xb & 1) == 0) && + if (((GHIDRA_UINT(roomDesc->Flags) >> 0xb & 1) == 0) && (roomDesc = ((Level *)((Level *)g_game))->Level::GetRoomByIdx(this->_targetRoomIdx,-1), - ((uint)roomDesc->Flags >> 0xb & 1) == 0)) { + (GHIDRA_UINT(roomDesc->Flags) >> 0xb & 1) == 0)) { std::string::string_from_cstr (devilRoomDoorPath._buf,(byte *)"gfx/grid/Door_07_DevilRoomDoor.anm2"); ehState = 0x1e; @@ -1158,56 +1158,56 @@ LAB_0070e789: do { tmpString._size = 0; tmpString._capacity = 0xf; - tmpString._buf._0_4_ = (char *)0x0; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (char *)0x0; ((std::string *)(tmpString._buf))->std::string::assign((byte *)"gfx/grid/door_house_cracked.png",0x1f); ehState = 0x21; ((Sprite *)((Sprite *)&this->_sprite))->Sprite::ReplaceSpritesheet(uVar8,&tmpString); ehState = 0xffffffff; if (0xf < tmpString._capacity) { uVar9 = tmpString._capacity + 1; - pcVar7 = (char *)tmpString._buf._0_4_; + pcVar7 = (*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)); if (0xfff < uVar9) { - pcVar7 = *(char **)(tmpString._buf._0_4_ + -4); + pcVar7 = *(char **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar9 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)pcVar7))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar7)))) goto LAB_0070d535; } operator_delete(pcVar7,uVar9); } uVar8 = uVar8 + 1; - } while (uVar8 < (uint)(this->_sprite)._layerCount); + } while (uVar8 < GHIDRA_UINT((this->_sprite)._layerCount)); } } else { uVar8 = *(uint *)(iVar4 + 0x44); - if ((((uVar8 >> 10 & 1) != 0) || (((uint)roomDesc->Flags >> 10 & 1) != 0)) || + if ((((uVar8 >> 10 & 1) != 0) || ((GHIDRA_UINT(roomDesc->Flags) >> 10 & 1) != 0)) || (g_game->_currentDimensionIdx == 2)) { uVar9 = 0; if ((this->_sprite)._layerCount != 0) { do { tmpString._size = 0; tmpString._capacity = 0xf; - tmpString._buf._0_4_ = (char *)0x0; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (char *)0x0; ((std::string *)(tmpString._buf))->std::string::assign((byte *)"gfx/grid/door_closet_red.png",0x1c); ehState = 0x22; ((Sprite *)((Sprite *)&this->_sprite))->Sprite::ReplaceSpritesheet(uVar9,&tmpString); ehState = 0xffffffff; if (0xf < tmpString._capacity) { uVar8 = tmpString._capacity + 1; - pcVar7 = (char *)tmpString._buf._0_4_; + pcVar7 = (*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)); if (0xfff < uVar8) { - pcVar7 = *(char **)(tmpString._buf._0_4_ + -4); + pcVar7 = *(char **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar8 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)pcVar7))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar7)))) goto LAB_0070d535; } operator_delete(pcVar7,uVar8); } uVar9 = uVar9 + 1; - } while (uVar9 < (uint)(this->_sprite)._layerCount); + } while (uVar9 < GHIDRA_UINT((this->_sprite)._layerCount)); uVar8 = *(uint *)(iVar4 + 0x44); } - if ((((uVar8 >> 10 & 1) != 0) && (((uint)roomDesc->Flags >> 10 & 1) == 0)) && + if ((((uVar8 >> 10 & 1) != 0) && ((GHIDRA_UINT(roomDesc->Flags) >> 10 & 1) == 0)) && (g_game->_stageType == 0)) { layer = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer((byte *)0x3); layer->_visible = 1; @@ -1244,7 +1244,7 @@ LAB_0070e789: if ((*(uint *)(*(int *)((char *)g_game->_room + 4) + 0x44) >> 10 & 1) == 0) { roomDesc = ((Level *)((Level *)g_game))->Level::GetRoomByIdx(this->_targetRoomIdx,-1); game = extraout_ECX; - if (((uint)roomDesc->Flags >> 10 & 1) != 0) goto LAB_0070e564; + if ((GHIDRA_UINT(roomDesc->Flags) >> 10 & 1) != 0) goto LAB_0070e564; bVar3 = IsRoomType(this,2); if (bVar3 != 0) { local_190 = (byte *)0xb68c48; @@ -1275,7 +1275,7 @@ LAB_0070e789: bVar3 = extraout_CL_03; goto LAB_0070e56f; } - local_190 = ((std::string *)((char *)((int)g_game->_room + + local_190 = ((std::string *)((char *)(GHIDRA_INT(g_game->_room) + *(int *)((char *)g_game->_room + 0x1d18) * 0x13c + 0x1e0c)))->std::string::c_str(); bVar3 = extraout_CL_04; @@ -1291,31 +1291,31 @@ LAB_0070e56f: do { tmpString._size = 0; tmpString._capacity = 0xf; - tmpString._buf._0_4_ = (char *)0x0; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (char *)0x0; pathEnd = local_190; do { bVar3 = *pathEnd; pathEnd = pathEnd + 1; } while (bVar3 != 0); - ((std::string *)(tmpString._buf))->std::string::assign(local_190,(int)pathEnd - (int)(local_190 + 1)); + ((std::string *)(tmpString._buf))->std::string::assign(local_190,GHIDRA_INT(pathEnd) - GHIDRA_INT((local_190 + 1))); ehState = 0x24; ((Sprite *)((Sprite *)&this->_sprite))->Sprite::ReplaceSpritesheet(uVar8,&tmpString); ehState = 0xffffffff; bVar3 = extraout_CL_05; if (0xf < tmpString._capacity) { uVar9 = tmpString._capacity + 1; - pcVar7 = (char *)tmpString._buf._0_4_; + pcVar7 = (*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)); if (0xfff < uVar9) { - pcVar7 = *(char **)(tmpString._buf._0_4_ + -4); + pcVar7 = *(char **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar9 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)pcVar7))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar7)))) goto LAB_0070d535; } operator_delete(pcVar7,uVar9); bVar3 = extraout_CL_06; } uVar8 = uVar8 + 1; - } while (uVar8 < (uint)(this->_sprite)._layerCount); + } while (uVar8 < GHIDRA_UINT((this->_sprite)._layerCount)); } } ((ANM2 *)(&this->_sprite))->ANM2::LoadGraphics(bVar3); @@ -1347,20 +1347,20 @@ LAB_0070e56f: anmPath._buf[1] = '\0'; anmPath._buf[2] = '\0'; anmPath._buf[3] = '\0'; - anmPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = std::_Allocate(0x20); anmPath._size = 0x1b; anmPath._capacity = 0x1f; - builtin_strncpy((char *)anmPath._buf._0_4_,"gfx/grid/Door_Downpour.anm2",0x1c); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)),"gfx/grid/Door_Downpour.anm2",0x1c); ehState = 6; ((ANM2 *)(&this->_sprite))->ANM2::Load(&anmPath,1); ehState = 0xffffffff; if (0xf < anmPath._capacity) { uVar8 = anmPath._capacity + 1; - pcVar7 = (char *)anmPath._buf._0_4_; + pcVar7 = (*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)); if (0xfff < uVar8) { - pcVar7 = *(char **)(anmPath._buf._0_4_ + -4); + pcVar7 = *(char **)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + -4); uVar8 = anmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(anmPath._buf._0_4_ + (-4 - (int)pcVar7))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar7)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1369,7 +1369,7 @@ LAB_0070e56f: } anmPath._size = 0; anmPath._capacity = 0xf; - anmPath._buf._0_4_ = anmPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) & 0xffffff00; break; case 2: tmpString._size = 0; @@ -1378,20 +1378,20 @@ LAB_0070e56f: tmpString._buf[1] = '\0'; tmpString._buf[2] = '\0'; tmpString._buf[3] = '\0'; - tmpString._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = std::_Allocate(0x20); tmpString._size = 0x18; tmpString._capacity = 0x1f; - builtin_strncpy((char *)tmpString._buf._0_4_,"gfx/grid/Door_Mines.anm2",0x19); + builtin_strncpy((*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)),"gfx/grid/Door_Mines.anm2",0x19); ehState = 7; ((ANM2 *)(&this->_sprite))->ANM2::Load(&tmpString,1); ehState = 0xffffffff; if (0xf < tmpString._capacity) { uVar8 = tmpString._capacity + 1; - pcVar7 = (char *)tmpString._buf._0_4_; + pcVar7 = (*(undefined4 *)((char *)&((char *)tmpString._buf) + 0x0)); if (0xfff < uVar8) { - pcVar7 = *(char **)(tmpString._buf._0_4_ + -4); + pcVar7 = *(char **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar8 = tmpString._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpString._buf._0_4_ + (-4 - (int)pcVar7))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar7)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1494,17 +1494,17 @@ LAB_0070eb83: if (iVar4 == 2) { tmpString._size = 0; tmpString._capacity = 0xf; - tmpString._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (void *)0x0; ((std::string *)(tmpString._buf))->std::string::assign((byte *)"gfx/grid/door_16_doublelock.anm2",0x20); ehState = 0x25; ((ANM2 *)(&this->_extraSprite))->ANM2::Load(&tmpString,1); if (0xf < tmpString._capacity) { uVar8 = tmpString._capacity + 1; - pvVar6 = (void *)tmpString._buf._0_4_; + pvVar6 = (*(undefined4 *)((char *)&((void *)tmpString._buf) + 0x0)); if (0xfff < uVar8) { - pvVar6 = *(void **)(tmpString._buf._0_4_ + -4); + pvVar6 = *(void **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar8 = tmpString._capacity + 0x24; - if (0x1f < (uint)(tmpString._buf._0_4_ + (-4 - (int)pvVar6))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1637,7 +1637,7 @@ LAB_0070f2ee: bVar6 = bVar2 < (byte)expectedName->_buf[0]; if (bVar2 != expectedName->_buf[0]) { LAB_0070f2d0: - uVar3 = -(uint)bVar6 | 1; + uVar3 = -GHIDRA_UINT(bVar6) | 1; goto LAB_0070f2d5; } if (bVar2 == 0) break; @@ -1682,7 +1682,7 @@ LAB_0070f4b6: bVar6 = bVar2 < (byte)expectedName->_buf[0]; if (bVar2 != expectedName->_buf[0]) { LAB_0070f4a0: - uVar3 = -(uint)bVar6 | 1; + uVar3 = -GHIDRA_UINT(bVar6) | 1; goto LAB_0070f4a5; } if (bVar2 == 0) break; @@ -1771,7 +1771,7 @@ LAB_0070f3fe: bVar6 = bVar2 < (byte)expectedName->_buf[0]; if (bVar2 != expectedName->_buf[0]) { LAB_0070f3e0: - uVar3 = -(uint)bVar6 | 1; + uVar3 = -GHIDRA_UINT(bVar6) | 1; goto LAB_0070f3e5; } if (bVar2 == 0) break; @@ -1805,7 +1805,7 @@ LAB_0070f311: && ((this->_sprite)._animState._animData != (void *)0x0)) { AnimationState::AdvancePosition (&(this->_sprite)._animState, - *(int *)((int)(this->_sprite)._animState._animData + 0x30) + -1); + *(int *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x30) + -1); } goto LAB_0070f174; } @@ -1839,7 +1839,7 @@ LAB_0070f311: bVar6 = bVar2 < (byte)expectedName->_buf[0]; if (bVar2 != expectedName->_buf[0]) { LAB_0070efc2: - uVar3 = -(uint)bVar6 | 1; + uVar3 = -GHIDRA_UINT(bVar6) | 1; goto LAB_0070efc7; } if (bVar2 == 0) break; @@ -1902,7 +1902,7 @@ LAB_0070f0a0: bVar6 = bVar2 < (byte)expectedName->_buf[0]; if (bVar2 != expectedName->_buf[0]) { LAB_0070f085: - uVar3 = -(uint)bVar6 | 1; + uVar3 = -GHIDRA_UINT(bVar6) | 1; goto LAB_0070f08a; } if (bVar2 == 0) break; @@ -1919,7 +1919,7 @@ LAB_0070f08a: } sprite = (Sprite *)&this->_sprite; if (this->_targetRoomIdx == -7) { - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&familiars,3,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&familiars,3,-1,-1,0,0); local_8 = 0; uVar3 = 0; if (familiars._size != 0) { @@ -1931,7 +1931,7 @@ LAB_0070f08a: *(undefined4 *)(iVar4 + 0xd88) = 1; } uVar3 = uVar3 + 1; - } while (uVar3 < (uint)familiars._size); + } while (uVar3 < GHIDRA_UINT(familiars._size)); this = local_18; } local_8 = 0xffffffff; @@ -1964,7 +1964,7 @@ LAB_0070f174: // 0070f670 undefined1 GridEntity_Door::CanTakeDamageFromTearEffects() { - return CONCAT31((uint3)((uint)this->_doorFlags >> 0xc),~(byte)((uint)this->_doorFlags >> 4)) & + return CONCAT31((uint3)(GHIDRA_UINT(this->_doorFlags) >> 0xc),~(byte)(GHIDRA_UINT(this->_doorFlags) >> 4)) & 0xffffff01; } @@ -2089,21 +2089,21 @@ void GridEntity_Door::SpawnDust() do { rngResult = Random(); rngValue = Random(); - fVar2 = (float)((double)(int)rngValue + __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + fVar2 = (float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 5.0; rngValue = Random(); iVar1 = this->_gridIndex; - fVar3 = (float)((double)(int)rngValue + __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + fVar3 = (float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 5.0 - 2.5; dustVelocity.y = fVar3 * dirX + fVar2 * negDirY; dustVelocity.x = fVar3 * negDirY + fVar2 * -dirX; gridWidth = *(int *)((char *)g_game->_room + 0xc); rngValue = Random(); - fVar2 = (float)((double)(int)rngValue + __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + fVar2 = (float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 3.14; fVar2 = fVar2 + fVar2; rngValue = Random(); - fVar3 = (float)((double)(int)rngValue + __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + fVar3 = (float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 20.0; cosAngle = cos(fVar2); local_10.x = cosAngle * fVar3 + (float)(iVar1 % gridWidth) * 40.0 + 40.0; @@ -2120,9 +2120,9 @@ void GridEntity_Door::SpawnDust() sideSign = &DAT_bf800000; } rngResult = Random(); - dust[0x11d] = (int)(((float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 - * 10.0 + 2.0) * (float)sideSign); + dust[0x11d] = GHIDRA_INT((((float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 + * 10.0 + 2.0) * (float)sideSign)); rngResult = Random(); iVar1 = rngResult % 0xf + 0xf; dust[0x117] = iVar1; @@ -2163,7 +2163,7 @@ byte GridEntity_Door::TryBlowOpen(byte isFromExplosion, Entity *source) void *room; int variant; - stackCookie = __security_cookie ^ (uint)&soundId; + stackCookie = __security_cookie ^ GHIDRA_UINT(&soundId); if (((isFromExplosion == 0) && (source == (Entity *)0x0)) && (cVar3 = FUN_00711740(), cVar3 == '\0')) { return 0; @@ -2230,9 +2230,9 @@ byte GridEntity_Door::TryBlowOpen(byte isFromExplosion, Entity *source) ((Game *)(g_game))->Game::UpdateVisibility(); game = g_game; qVar2 = g_game->_gameStateFlags; - puVar1 = (uint *)((int)&g_game->_gameStateFlags + 4); + puVar1 = (uint *)(GHIDRA_INT(&g_game->_gameStateFlags) + 4); *puVar1 = *puVar1 | 0x100000; - *(int *)&game->_gameStateFlags = (int)qVar2; + *(int *)&game->_gameStateFlags = GHIDRA_INT(qVar2); return 1; } return 0; @@ -2447,7 +2447,7 @@ byte GridEntity_Door::TryUnlock(Entity_Player *player, byte isForce) return 0; } if (local_64 != 0.0) { - ((Entity_Player *)(trinketHolder))->Entity_Player::TryRemoveTrinket((uint)local_64); + ((Entity_Player *)(trinketHolder))->Entity_Player::TryRemoveTrinket(GHIDRA_UINT(local_64)); } manager = g_manager; local_60 = 8; @@ -2481,7 +2481,7 @@ byte GridEntity_Door::TryUnlock(Entity_Player *player, byte isForce) bVar7 = bVar1 < *pbVar4; if (bVar1 != *pbVar4) { LAB_007106c0: - uVar5 = -(uint)bVar7 | 1; + uVar5 = -GHIDRA_UINT(bVar7) | 1; goto LAB_007106c5; } if (bVar1 == 0) break; @@ -2526,15 +2526,15 @@ LAB_007106c5: do { uVar5 = local_60; rngResult = Random(); - local_64 = ((float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 + local_64 = ((float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 30.0 - 15.0) * 0.017453292; cosSpread = cos(local_64); local_64 = sin(local_64); rngResult = Random(); particleVelocity.y = - (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * 15.0 + (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 15.0 + 5.0; particleVelocity.x = (-dirX * cosSpread - negDirY * local_64) * particleVelocity.y; particleVelocity.y = (negDirY * cosSpread + -dirX * local_64) * particleVelocity.y; @@ -2557,7 +2557,7 @@ LAB_007106c5: *(undefined4 *)&(*(undefined1 *)((char *)&(particle[1]) + 0x4)) = 0xc1000000; } local_60 = local_60 + 1; - } while ((int)local_60 < particleCount); + } while (GHIDRA_INT(local_60) < particleCount); } goto LAB_007109b9; } @@ -2579,9 +2579,9 @@ LAB_007109b9: } else if (iVar2 == 5) { gameStateFlags = g_game->_gameStateFlags; - gameStateFlagsHigh = (uint *)((int)&g_game->_gameStateFlags + 4); + gameStateFlagsHigh = (uint *)(GHIDRA_INT(&g_game->_gameStateFlags) + 4); *gameStateFlagsHigh = *gameStateFlagsHigh | 0x20000; - *(int *)&game->_gameStateFlags = (int)gameStateFlags; + *(int *)&game->_gameStateFlags = GHIDRA_INT(gameStateFlags); } iVar2 = (this->_desc)._variant; bVar7 = false; @@ -2692,7 +2692,7 @@ LAB_00710b1b: bVar7 = bVar1 < (byte)*wantedAnimNameStr; if (bVar1 != *wantedAnimNameStr) { LAB_00710c35: - uVar5 = -(uint)bVar7 | 1; + uVar5 = -GHIDRA_UINT(bVar7) | 1; goto LAB_00710c3a; } if (bVar1 == 0) break; @@ -2723,7 +2723,7 @@ LAB_00710c3a: bVar7 = bVar1 < (byte)*wantedAnimNameStr; if (bVar1 != *wantedAnimNameStr) { LAB_00710ca0: - uVar5 = -(uint)bVar7 | 1; + uVar5 = -GHIDRA_UINT(bVar7) | 1; goto LAB_00710ca5; } if (bVar1 == 0) break; @@ -2869,9 +2869,9 @@ LAB_00710e57: variant = (this->_desc)._variant; if (variant == 5) { qVar2 = g_game->_gameStateFlags; - puVar1 = (uint *)((int)&g_game->_gameStateFlags + 4); + puVar1 = (uint *)(GHIDRA_INT(&g_game->_gameStateFlags) + 4); *puVar1 = *puVar1 | 0x20000; - *(int *)&game->_gameStateFlags = (int)qVar2; + *(int *)&game->_gameStateFlags = GHIDRA_INT(qVar2); variant = (this->_desc)._variant; } if (((variant == 6) && (this->_targetRoomType == 4)) && @@ -2916,8 +2916,8 @@ void GridEntity_Door::SetRoomTypes(int CurrentRoomType, int TargetRoomType) currentRoomDesc = ((Level *)((Level *)g_game))->Level::GetRoomByIdx(g_game->_currentRoomIdx,g_game->_currentDimensionIdx); targetRoomDesc = ((Level *)((Level *)g_game))->Level::GetRoomByIdx(this->_targetRoomIdx,-1); - if ((((uint)currentRoomDesc->Flags >> 10 & 1) != 0) || - (((uint)targetRoomDesc->Flags >> 10 & 1) != 0)) { + if (((GHIDRA_UINT(currentRoomDesc->Flags) >> 10 & 1) != 0) || + ((GHIDRA_UINT(targetRoomDesc->Flags) >> 10 & 1) != 0)) { if ((this->_currentRoomType == 7) || (this->_currentRoomType == 8)) { this->_currentRoomType = 1; } @@ -2930,7 +2930,7 @@ void GridEntity_Door::SetRoomTypes(int CurrentRoomType, int TargetRoomType) iVar2 = g_game->_difficulty; if ((iVar2 == 2) || (iVar2 == 3)) { iVar3 = this->_targetRoomType; - if ((iVar3 == 0x17) && (g_game->_greedModeWave < (int)((iVar2 == 3) + 10))) { + if ((iVar3 == 0x17) && (g_game->_greedModeWave < GHIDRA_INT(((iVar2 == 3) + 10)))) { (this->_desc)._variant = 6; goto LAB_00711262; } @@ -3031,8 +3031,8 @@ joined_r0x007111a8: if (g_game->_currentDimensionIdx == 0) { (this->_desc)._variant = 3; LAB_00711244: - if ((((uint)currentRoomDesc->Flags >> 10 & 1) == 0) || - (((uint)targetRoomDesc->Flags >> 10 & 1) != 0)) goto LAB_00711262; + if (((GHIDRA_UINT(currentRoomDesc->Flags) >> 10 & 1) == 0) || + ((GHIDRA_UINT(targetRoomDesc->Flags) >> 10 & 1) != 0)) goto LAB_00711262; goto LAB_0071125b; } LAB_0071132c: @@ -3134,7 +3134,7 @@ LAB_00711262: if (((this->_doorFlags & 0x20) != 0) && ((this->_sprite)._animState._animData != (void *)0x0)) { AnimationState::AdvancePosition (&(this->_sprite)._animState, - *(int *)((int)(this->_sprite)._animState._animData + 0x30) + -1); + *(int *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x30) + -1); } return; } @@ -3151,7 +3151,7 @@ void GridEntity_Door::BeginBatches() } this->_previousState = doorState; this->_previousVariant = (this->_desc)._variant; - if ((uint)this->_gridIndex < 0x1c0) { + if (GHIDRA_UINT(this->_gridIndex) < 0x1c0) { *(undefined4 *)((char *)g_game->_room + this->_gridIndex * 4 + 0x76c) = 1000; } this->_updateCount = 0; @@ -3183,9 +3183,9 @@ void GridEntity_Door::SetLocked(byte isLocked) } else if ((isLocked == 0) && (doorVariant == 5)) { stateFlags = g_game->_gameStateFlags; - stateFlagsHigh = (uint *)((int)&g_game->_gameStateFlags + 4); + stateFlagsHigh = (uint *)(GHIDRA_INT(&g_game->_gameStateFlags) + 4); *stateFlagsHigh = *stateFlagsHigh | 0x20000; - *(int *)&game->_gameStateFlags = (int)stateFlags; + *(int *)&game->_gameStateFlags = GHIDRA_INT(stateFlags); } doorVariant = 8; if (isLocked != 0) { diff --git a/src/game/grid_entity_fire.cpp b/src/game/grid_entity_fire.cpp index 529b5e7..3384f37 100644 --- a/src/game/grid_entity_fire.cpp +++ b/src/game/grid_entity_fire.cpp @@ -31,13 +31,13 @@ void GridEntity_Fire::BeginBatches() local_8 = 0xffffffff; puStack_c = &LAB_00af7acd; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&anm2Path)[1]._size; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&anm2Path)[1]._size); ExceptionList = &local_10; if ((((this->_desc)._spawnCount < 2) && ((this->_desc)._variant == 0)) && (uVar2 = Random(), uVar2 % 0x28 == 0)) { (this->_desc)._variant = 1; } - if ((uint)this->_gridIndex < 0x1c0) { + if (GHIDRA_UINT(this->_gridIndex) < 0x1c0) { *(undefined4 *)((char *)g_game->_room + this->_gridIndex * 4 + 0x76c) = 0x578; } anm2Path._size = 0; @@ -46,20 +46,20 @@ void GridEntity_Fire::BeginBatches() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1c; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/grid/grid_fireplace.anm2",0x1d); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/grid/grid_fireplace.anm2",0x1d); local_8 = 0; ((ANM2 *)(&this->_sprite))->ANM2::Load(&anm2Path,1); local_8 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar2 = anm2Path._capacity + 1; - pcVar3 = (char *)anm2Path._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar2) { - pcVar3 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar2 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -86,7 +86,7 @@ LAB_0067dc72: bVar4 = bVar1 < (byte)*pcVar3; if (bVar1 != *pcVar3) { LAB_0067dc54: - uVar2 = -(uint)bVar4 | 1; + uVar2 = -GHIDRA_UINT(bVar4) | 1; goto LAB_0067dc59; } if (bVar1 == 0) break; @@ -107,20 +107,20 @@ LAB_0067dc59: anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1d; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/grid/effect_005_fire.anm2",0x1e); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/grid/effect_005_fire.anm2",0x1e); local_8 = 1; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x154))))->ANM2::Load(&anm2Path,1); local_8 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar2 = anm2Path._capacity + 1; - pcVar3 = (char *)anm2Path._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar2) { - pcVar3 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar2 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -130,7 +130,7 @@ LAB_0067dc59: animData = *(byte **)&(*(undefined1 *)((char *)(this) + 0x188)); anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = anm2Path._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) & 0xffffff00; if (animData == (byte *)0x0) { LAB_0067ddb6: bVar1 = ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x154))))->ANM2::SetAnimation((byte *)"FireStage00",1); @@ -150,7 +150,7 @@ LAB_0067ddb6: bVar4 = bVar1 < (byte)*pcVar3; if (bVar1 != *pcVar3) { LAB_0067dd92: - uVar2 = -(uint)bVar4 | 1; + uVar2 = -GHIDRA_UINT(bVar4) | 1; goto LAB_0067dd97; } if (bVar1 == 0) break; @@ -171,7 +171,7 @@ LAB_0067dd97: entityConfig = &manager->_entityConfig; if (((*(char *)((char *)foundNode + 0xd) == '\0') && (*(uint *)((char *)foundNode + 0x10) < 0x3e800f01)) && (foundNode != (entityConfig->_entities)._head)) { - preloadEntry = (EntityConfig_Entity *)((int)foundNode + 0x18); + preloadEntry = (EntityConfig_Entity *)(GHIDRA_INT(foundNode) + 0x18); } else { preloadEntry = ((EntityConfig *)(entityConfig))->EntityConfig::GetEntity(1000,0,0); @@ -186,7 +186,7 @@ LAB_0067dd97: if (((*(char *)((char *)foundNode + 0xd) == '\0') && (*(undefined **)((char *)foundNode + 0x10) <= &DAT_00500a00)) && (foundNode != (manager->_entityConfig)._entities._head)) { - preloadEntry = (EntityConfig_Entity *)((int)foundNode + 0x18); + preloadEntry = (EntityConfig_Entity *)(GHIDRA_INT(foundNode) + 0x18); } else { preloadEntry = ((EntityConfig *)(&manager->_entityConfig))->EntityConfig::GetEntity(5,0,0); @@ -201,7 +201,7 @@ LAB_0067dd97: if (((*(char *)((char *)foundNode + 0xd) == '\0') && (*(undefined **)((char *)foundNode + 0x10) <= &DAT_00501400)) && (foundNode != (entityConfig->_entities)._head)) { - preloadEntry = (EntityConfig_Entity *)((int)foundNode + 0x18); + preloadEntry = (EntityConfig_Entity *)(GHIDRA_INT(foundNode) + 0x18); } else { preloadEntry = ((EntityConfig *)(entityConfig))->EntityConfig::GetEntity(5,0,0); @@ -235,20 +235,20 @@ LAB_0067dd97: anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1a; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/grid/Effect_Ember.anm2",0x1b); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/grid/Effect_Ember.anm2",0x1b); local_8 = 2; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x27c))))->ANM2::Load(&anm2Path,1); local_8 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar2 = anm2Path._capacity + 1; - pcVar3 = (char *)anm2Path._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar2) { - pcVar3 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar2 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -267,7 +267,7 @@ LAB_0067dd97: bVar4 = bVar1 < *expectedByte; if (bVar1 != *expectedByte) { LAB_0067e036: - uVar2 = -(uint)bVar4 | 1; + uVar2 = -GHIDRA_UINT(bVar4) | 1; goto LAB_0067e03b; } if (bVar1 == 0) break; @@ -377,7 +377,7 @@ LAB_0067e2a3: isLess = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_0067e288: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0067e28d; } if (bVar1 == 0) break; @@ -390,7 +390,7 @@ LAB_0067e288: uVar2 = 0; LAB_0067e28d: if ((uVar2 != 0) || - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) != '\0' && + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) != '\0' && ((this->_sprite)._animState._isPlaying == 0)))) goto LAB_0067e2a3; } iVar3 = 0; @@ -415,7 +415,7 @@ LAB_0067e1fb: isLess = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_0067e1e0: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0067e1e5; } if (bVar1 == 0) break; @@ -428,7 +428,7 @@ LAB_0067e1e0: uVar2 = 0; LAB_0067e1e5: if ((uVar2 != 0) || - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) != '\0' && + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) != '\0' && ((this->_sprite)._animState._isPlaying == 0)))) goto LAB_0067e1fb; } GridEntity::hurt_surroundings((GridEntity *)this,38.0,38.0,16.0,1,2,1); @@ -486,19 +486,19 @@ LAB_0067e2c6: uVar2 = Random(); pfVar4 = (float *)(uVar2 % 0x1e); uVar2 = Random(); - local_38.x = (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + local_38.x = (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10 * -1.6 - 0.8; uVar2 = Random(); - local_40.x = (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + local_40.x = (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10 * 0.4 - 0.2; uVar2 = Random(); - fVar8 = -15.0 - (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + fVar8 = -15.0 - (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10 * 15.0; uVar2 = Random(); pfVar6 = *(float **)&(*(undefined1 *)((char *)(this) + 0x274)); particleVelY = local_38.x; particleFrame = 0; - particleX = (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + particleX = (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10 * 16.0 - 8.0; particleVelX = local_40.x; particleY = fVar8; @@ -524,15 +524,15 @@ LAB_0067e2c6: *pfVar6 = particleVelYPtr[-1] + *pfVar6; *pfVar7 = *pfVar7 + *particleVelYPtr; uVar2 = Random(); - local_38.x = (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + local_38.x = (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10 * 0.1 - 0.05; uVar2 = Random(); - particleVelYPtr[1] = (float)((int)particleVelYPtr[1] + 1); + particleVelYPtr[1] = (float)(GHIDRA_INT(particleVelYPtr[1]) + 1); particleVelYPtr[-1] = - (((float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + (((float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10 * 0.4 - 0.2) + particleVelYPtr[-1]) * 0.98; *particleVelYPtr = (local_38.x + *particleVelYPtr) * 0.97; - if ((int)particleVelYPtr[1] < (int)particleVelYPtr[2]) { + if (GHIDRA_INT(particleVelYPtr[1]) < GHIDRA_INT(particleVelYPtr[2])) { pfVar6 = pfVar6 + 6; particleVelYPtr = particleVelYPtr + 6; pfVar4 = *(float **)&(*(undefined1 *)((char *)(this) + 0x274)); diff --git a/src/game/grid_entity_gravity.cpp b/src/game/grid_entity_gravity.cpp index 926289a..14bc70e 100644 --- a/src/game/grid_entity_gravity.cpp +++ b/src/game/grid_entity_gravity.cpp @@ -33,12 +33,12 @@ void GridEntity_Gravity::guard_check_icall() local_8 = 0xffffffff; puStack_c = &LAB_00b0d90d; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(floorAnimName + 0x30); + local_14 = __security_cookie ^ GHIDRA_UINT((floorAnimName + 0x30)); ExceptionList = &local_10; pvVar1 = g_game->_room; iVar2 = *(int *)((char *)pvVar1 + 0xc); - column = (int)((((float)(this->_gridIndex % iVar2) * 40.0 + 40.0 + 0.0) - 40.0) / 40.0 + 0.5); - belowRow = (int)((((float)(this->_gridIndex / iVar2) * 40.0 + 120.0 + 40.0) - 120.0) / 40.0 + 0.5) + column = GHIDRA_INT(((((float)(this->_gridIndex % iVar2) * 40.0 + 40.0 + 0.0) - 40.0) / 40.0 + 0.5)); + belowRow = GHIDRA_INT(((((float)(this->_gridIndex / iVar2) * 40.0 + 120.0 + 40.0) - 120.0) / 40.0 + 0.5)) ; if (((((-1 < column) && (column < iVar2)) && (-1 < belowRow)) && ((belowRow < *(int *)((char *)pvVar1 + 0x10) && @@ -59,20 +59,20 @@ void GridEntity_Gravity::guard_check_icall() tilesPath._buf[1] = '\0'; tilesPath._buf[2] = '\0'; tilesPath._buf[3] = '\0'; - tilesPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(tilesPath._buf) + 0x0)) = std::_Allocate(0x20); tilesPath._size = 0x1a; tilesPath._capacity = 0x1f; - builtin_strncpy((char *)tilesPath._buf._0_4_,"gfx/grid/Tiles_Rotgut.anm2",0x1b); + builtin_strncpy((*(undefined4 *)((char *)&((char *)tilesPath._buf) + 0x0)),"gfx/grid/Tiles_Rotgut.anm2",0x1b); local_8 = 0; ((ANM2 *)(&this->_sprite))->ANM2::Load(&tilesPath,1); local_8 = 0xffffffff; if (0xf < tilesPath._capacity) { uVar4 = tilesPath._capacity + 1; - freeBlock = (char *)tilesPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)tilesPath._buf) + 0x0)); if (0xfff < uVar4) { - freeBlock = *(char **)(tilesPath._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(tilesPath._buf) + 0x0)) + -4); uVar4 = tilesPath._capacity + 0x24; - if ((char *)0x1f < (char *)(tilesPath._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tilesPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -95,7 +95,7 @@ void GridEntity_Gravity::guard_check_icall() } uVar4 = ((RNG *)(&rng))->RNG::RandomInt(uVar4); if ((this->_sprite)._animState._animData != (void *)0x0) { - ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)(int)uVar4); + ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(uVar4)); } } else { @@ -106,21 +106,21 @@ void GridEntity_Gravity::guard_check_icall() tilesPath._buf[1] = '\0'; tilesPath._buf[2] = '\0'; tilesPath._buf[3] = '\0'; - tilesPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(tilesPath._buf) + 0x0)) = std::_Allocate(0x30); floorSprite = sprite; tilesPath._size = 0x26; tilesPath._capacity = 0x2f; - builtin_strncpy((char *)tilesPath._buf._0_4_,"gfx/grid/Tiles_Itemdungeon_Gideon.anm2",0x27); + builtin_strncpy((*(undefined4 *)((char *)&((char *)tilesPath._buf) + 0x0)),"gfx/grid/Tiles_Itemdungeon_Gideon.anm2",0x27); local_8 = 1; ((ANM2 *)(sprite))->ANM2::Load(&tilesPath,1); local_8 = 0xffffffff; if (0xf < tilesPath._capacity) { uVar4 = tilesPath._capacity + 1; - freeBlock = (char *)tilesPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)tilesPath._buf) + 0x0)); if (0xfff < uVar4) { - freeBlock = *(char **)(tilesPath._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(tilesPath._buf) + 0x0)) + -4); uVar4 = tilesPath._capacity + 0x24; - if ((char *)0x1f < (char *)(tilesPath._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tilesPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -129,7 +129,7 @@ void GridEntity_Gravity::guard_check_icall() } tilesPath._size = 0; tilesPath._capacity = 0xf; - tilesPath._buf._0_4_ = tilesPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(tilesPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(tilesPath._buf) + 0x0)) & 0xffffff00; } else { itemDungeonPath._size = 0; @@ -138,21 +138,21 @@ void GridEntity_Gravity::guard_check_icall() itemDungeonPath._buf[1] = '\0'; itemDungeonPath._buf[2] = '\0'; itemDungeonPath._buf[3] = '\0'; - itemDungeonPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(itemDungeonPath._buf) + 0x0)) = std::_Allocate(0x20); floorSprite = sprite; itemDungeonPath._size = 0x1f; itemDungeonPath._capacity = 0x1f; - builtin_strncpy((char *)itemDungeonPath._buf._0_4_,"gfx/grid/Tiles_Itemdungeon.anm2",0x20); + builtin_strncpy((*(undefined4 *)((char *)&((char *)itemDungeonPath._buf) + 0x0)),"gfx/grid/Tiles_Itemdungeon.anm2",0x20); local_8 = 2; ((ANM2 *)(sprite))->ANM2::Load(&itemDungeonPath,1); local_8 = 0xffffffff; if (0xf < itemDungeonPath._capacity) { uVar4 = itemDungeonPath._capacity + 1; - freeBlock = (char *)itemDungeonPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)itemDungeonPath._buf) + 0x0)); if (0xfff < uVar4) { - freeBlock = *(char **)(itemDungeonPath._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(itemDungeonPath._buf) + 0x0)) + -4); uVar4 = itemDungeonPath._capacity + 0x24; - if ((char *)0x1f < (char *)(itemDungeonPath._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(itemDungeonPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -161,7 +161,7 @@ void GridEntity_Gravity::guard_check_icall() } itemDungeonPath._size = 0; itemDungeonPath._capacity = 0xf; - itemDungeonPath._buf._0_4_ = itemDungeonPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(itemDungeonPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(itemDungeonPath._buf) + 0x0)) & 0xffffff00; } if (iVar2 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -191,21 +191,21 @@ void GridEntity_Gravity::Update() playerManager = &g_game->_playerManager; i = 0; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { playerListEnd = (playerManager->_playerList)._end; - if ((int)playerListEnd - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (playerManager->_playerList)._end; } playerSlot = (playerManager->_playerList)._begin; - if (i < (uint)((int)playerListEnd - (int)playerSlot >> 2)) { + if (i < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + i; } player = *playerSlot; - player = (int)((*(float *)(player + 0x33c) - 40.0) / 40.0 + 0.5); - gridY = (int)((*(float *)(player + 0x340) - 120.0) / 40.0 + 0.5); + player = GHIDRA_INT(((*(float *)(player + 0x33c) - 40.0) / 40.0 + 0.5)); + gridY = GHIDRA_INT(((*(float *)(player + 0x340) - 120.0) / 40.0 + 0.5)); if ((((player < 0) || (gridWidth = *(int *)((char *)g_game->_room + 0xc), gridWidth <= player)) || (gridY < 0)) || (*(int *)((char *)g_game->_room + 0x10) <= gridY)) { player = -1; @@ -219,8 +219,8 @@ void GridEntity_Gravity::Update() } i = i + 1; playerManager = &g_game->_playerManager; - } while (i < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (i < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } if ((this->_sprite)._loaded != 0) { ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::Update(); diff --git a/src/game/grid_entity_lock.cpp b/src/game/grid_entity_lock.cpp index 26c3ed0..3f1c592 100644 --- a/src/game/grid_entity_lock.cpp +++ b/src/game/grid_entity_lock.cpp @@ -17,7 +17,7 @@ void GridEntity_Lock::BeginBatches() local_8 = 0xffffffff; puStack_c = &LAB_00afc99d; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&anm2Path)[1]._size; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&anm2Path)[1]._size); ExceptionList = &local_10; anm2Path._size = 0; anm2Path._capacity = 0xf; @@ -25,20 +25,20 @@ void GridEntity_Lock::BeginBatches() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x18; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/grid/grid_locks.anm2",0x19); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/grid/grid_locks.anm2",0x19); local_8 = 0; ((ANM2 *)(&this->_sprite))->ANM2::Load(&anm2Path,1); local_8 = 0xffffffff; if (0xf < anm2Path._capacity) { size = anm2Path._capacity + 1; - pcVar1 = (char *)anm2Path._buf._0_4_; + pcVar1 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < size) { - pcVar1 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar1 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); size = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar1))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar1)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -47,7 +47,7 @@ void GridEntity_Lock::BeginBatches() } anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = anm2Path._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) & 0xffffff00; payToPlayOwner = PlayerManager::FirstCollectibleOwner (&g_game->_playerManager,0x17c,(RNG **)&g_game->_playerManager,1); @@ -66,7 +66,7 @@ void GridEntity_Lock::BeginBatches() } } this->_collisionClass = 4; - if ((uint)this->_gridIndex < 0x1c0) { + if (GHIDRA_UINT(this->_gridIndex) < 0x1c0) { *(undefined4 *)((char *)g_game->_room + this->_gridIndex * 4 + 0x76c) = 4000; } } @@ -105,7 +105,7 @@ void GridEntity_Lock::Update() isBreakTriggered != 0)) { this->_collisionClass = 0; game = g_game; - if ((uint)this->_gridIndex < 0x1c0) { + if (GHIDRA_UINT(this->_gridIndex) < 0x1c0) { *(undefined4 *)((char *)g_game->_room + this->_gridIndex * 4 + 0x76c) = 0; goto LAB_007119ac; } @@ -115,17 +115,17 @@ LAB_007119ac: if ((this->_desc)._state == 0) { playerManager = &game->_playerManager; i = 0; - if ((int)(game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> 2 + if (GHIDRA_INT((game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { playerListEnd = (playerManager->_playerList)._end; - if ((int)playerListEnd - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (playerManager->_playerList)._end; game = g_game; } playerSlot = (playerManager->_playerList)._begin; - if (i < (uint)((int)playerListEnd - (int)playerSlot >> 2)) { + if (i < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + i; } player_00 = (Entity_Player *)*playerSlot; @@ -139,8 +139,8 @@ LAB_007119ac: } playerManager = &game->_playerManager; i = i + 1; - } while (i < (uint)((int)(game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (i < GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } if ((this->_sprite)._loaded != 0) { @@ -181,7 +181,7 @@ void GridEntity_Lock::try_unlock(Entity_Player *player, byte isForce) soundId[0] = (GridEntity_Lock *)0x2d; } seed_fart_sound_override((int *)soundId); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)soundId[0],1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(soundId[0]),1.0,2,0,1.0,0.0); break_open(this,player); } return; @@ -211,7 +211,7 @@ void GridEntity_Lock::break_open(Entity_Player *player) local_10.y = 3.20897e-43; lock = this; seed_fart_sound_override((int *)&local_10.y); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_10.y,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_10.y),1.0,2,0,1.0,0.0); if ((*(undefined1 *)((char *)(this) + 0x154)) == '\0') { if ((player == (Entity_Player *)0x0) || (anim = "BreakingGolden", player->_hasGoldenKey == 0)) { anim = "Breaking"; @@ -240,7 +240,7 @@ void GridEntity_Lock::break_open(Entity_Player *player) uVar3 = uVar3 >> 1 ^ uVar3; uVar3 = uVar3 << 5 ^ uVar3; local_10.y = (float)(uVar3 >> 0x10 ^ uVar3); - if (0.1 <= (float)((double)(int)local_10.y + __uint_to_double_fixup[-((int)local_10.y >> 0x1f)]) * + if (0.1 <= (float)((double)GHIDRA_INT(local_10.y) + __uint_to_double_fixup[-(GHIDRA_INT(local_10.y) >> 0x1f)]) * 2.3283062e-10) { return; } @@ -263,7 +263,7 @@ LAB_00711d1a: (*debugBreak)(); return; } - uVar3 = (uint)local_10.y >> ((byte)dropRng._shift1 & 0x1f) ^ (uint)local_10.y; + uVar3 = GHIDRA_UINT(local_10.y) >> ((byte)dropRng._shift1 & 0x1f) ^ GHIDRA_UINT(local_10.y); uVar3 = uVar3 << ((byte)dropRng._shift2 & 0x1f) ^ uVar3; dropRng._seed = uVar3 >> 0x10 ^ uVar3; local_10.y = (float)dropRng._seed; @@ -276,7 +276,7 @@ LAB_00711e7c: (*debugBreak)(); return; } - uVar3 = (uint)local_10.y >> ((byte)dropRng._shift1 & 0x1f) ^ (uint)local_10.y; + uVar3 = GHIDRA_UINT(local_10.y) >> ((byte)dropRng._shift1 & 0x1f) ^ GHIDRA_UINT(local_10.y); uVar3 = uVar3 << ((byte)dropRng._shift2 & 0x1f) ^ uVar3; iVar2 = *(int *)((char *)g_game->_room + 0xc); gridX = lock->_gridIndex % iVar2; @@ -287,16 +287,16 @@ LAB_00711e7c: else { if (player != (Entity_Player *)0x0) { trinketRngEnd = (player->_trinketRNGs)._end; - if ((int)((int)trinketRngEnd - (int)(player->_trinketRNGs)._begin & 0xfffffff0U) < 0x161) { + if (GHIDRA_INT((GHIDRA_INT(trinketRngEnd) - GHIDRA_INT((player->_trinketRNGs)._begin) & 0xfffffff0U)) < 0x161) { KAGE_LogMessage(0x10,(byte *)"Trinket ID out of bounds!\n"); trinketRngEnd = (player->_trinketRNGs)._end; } trinketRngBegin = (player->_trinketRNGs)._begin; - uVar3 = ((int)trinketRngEnd - (int)trinketRngBegin >> 4) - 1; + uVar3 = (GHIDRA_INT(trinketRngEnd) - GHIDRA_INT(trinketRngBegin) >> 4) - 1; if (0x16 < uVar3) { uVar3 = 0x16; } - trinketRng = (uint *)(uVar3 * 0x10 + (int)trinketRngBegin); + trinketRng = (uint *)(uVar3 * 0x10 + GHIDRA_INT(trinketRngBegin)); uVar3 = *trinketRng; if (uVar3 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); diff --git a/src/game/grid_entity_pit.cpp b/src/game/grid_entity_pit.cpp index 9d93f12..165ba3f 100644 --- a/src/game/grid_entity_pit.cpp +++ b/src/game/grid_entity_pit.cpp @@ -62,12 +62,12 @@ void GridEntity_Pit::Update() Manager *manager; EntityPtr *spawnerSlot; - local_c = __security_cookie ^ (uint)auStack_e4; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_e4); pit = this; if (((this->_desc)._state == 3) && ((roomDesc = ((Level *)((Level *)g_game))->Level::GetRoomByIdx(g_game->_currentRoomIdx, g_game->_currentDimensionIdx), - ((uint)roomDesc->Flags >> 1 & 1) != 0 || + (GHIDRA_UINT(roomDesc->Flags) >> 1 & 1) != 0 || (bVar6 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(0x97), bVar6 != 0)))) { (this->_desc)._state = 2; } @@ -75,23 +75,23 @@ void GridEntity_Pit::Update() ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::Update(); ((AnimationState *)(&(this->_sprite)._overlayAnimState))->AnimationState::Update(); } - if (1 < (uint)(this->_sprite)._layerCount) { + if (1 < GHIDRA_UINT((this->_sprite)._layerCount)) { pGVar8 = (Game *)((this->_desc)._state + -2); local_dc = (Game *)0x0; - if (0 < (int)pGVar8) { + if (0 < GHIDRA_INT(pGVar8)) { local_dc = pGVar8; } if (((this->_sprite)._animState._animData != (void *)0x0) && - ((1 < *(int *)((int)(this->_sprite)._animState._animation + 0x80) || + ((1 < *(int *)(GHIDRA_INT((this->_sprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 1 < *(int *)((int)(this->_sprite)._animState._animation + 0x80))))) { + 1 < *(int *)(GHIDRA_INT((this->_sprite)._animState._animation) + 0x80))))) { pvVar13 = (this->_sprite)._animState._animData; iVar11 = *(int *)((char *)pvVar13 + 0x3c); if ((pvVar13 == (void *)0x0) || ((iVar11 < 0 || (*(int *)((char *)pvVar13 + 0x1c) <= iVar11)))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(this->_sprite)._animState._layerFrames + iVar11 * 4) = 0; - ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::AdvanceLayerPosition(iVar11,(float)(int)local_dc); + *(undefined4 *)(GHIDRA_INT((this->_sprite)._animState._layerFrames) + iVar11 * 4) = 0; + ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::AdvanceLayerPosition(iVar11,(float)GHIDRA_INT(local_dc)); } iVar11 = (this->_desc)._state; layer = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer((byte *)0x1); @@ -137,7 +137,7 @@ void GridEntity_Pit::Update() spawnVelocity.x = 0.0; uVar9 = Random(); iVar11 = *(int *)((char *)g_game->_room + 0xc); - fVar16 = (float)((double)(int)uVar9 + __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) * + fVar16 = (float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283064e-10; local_98[2] = -1.0 - (fVar16 + fVar16); spawnPos.x = (float)(this->_gridIndex % iVar11) * 40.0 + 40.0; @@ -188,7 +188,7 @@ LAB_00712ebb: } else { if (piVar12 == (int *)0x46) { - local_bc = (float)((uint)spawnSubType >> 0xb); + local_bc = (float)(GHIDRA_UINT(spawnSubType) >> 0xb); do { local_d8[0] = spawnSubType; if (spawnSubType != 0) { @@ -209,7 +209,7 @@ LAB_00712ebb: uVar9 = uVar9 << ((byte)((ulonglong)local_78 >> 0x20) & 0x1f) ^ uVar9; uVar9 = uVar9 >> ((byte)local_c0 & 0x1f) ^ uVar9; uVar10 = ItemPool::GetPill(uVar9); - spawnSubType = uVar10 | ((uint)local_bc & 1) << 0xb; + spawnSubType = uVar10 | (GHIDRA_UINT(local_bc) & 1) << 0xb; } while( true ); } if (piVar12 != (int *)0x64) goto LAB_00712ebb; @@ -244,19 +244,19 @@ LAB_00712ec3: if (local_c0 != (Entity *)0x0) { uVar17 = GetTimeNs(); pEVar5 = local_c0; - uVar9 = (uint)(uVar17 >> 0x20); + uVar9 = GHIDRA_UINT((uVar17 >> 0x20)); lVar2 = (uVar17 & 0xffffffff) * 0x431bde82; lVar3 = (ulonglong)uVar9 * 0xd7b634db + ((uVar17 & 0xffffffff) * 0xd7b634db >> 0x20); local_b0[0] = (Entity *)(lVar3 + lVar2); lVar2 = (ulonglong)uVar9 * 0x431bde82 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar3 >> 0x20), - (int)((ulonglong)lVar2 >> 0x20) + - (uint)CARRY4((uint)lVar2,(uint)lVar3)), - (int)((ulonglong)(lVar3 + lVar2) >> 0x20)); - startTimeHi = (uint)((ulonglong)lVar2 >> 0x20); + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)), + GHIDRA_INT(((ulonglong)lVar2 >> 0x20)) + + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar2),GHIDRA_UINT(lVar3)))), + GHIDRA_INT(((ulonglong)(lVar3 + lVar2) >> 0x20))); + startTimeHi = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); spawnerSlot = &local_c0->_spawnerEntity; - local_b4 = (uint)lVar2 >> 0x12 | startTimeHi * 0x4000; + local_b4 = GHIDRA_UINT(lVar2) >> 0x12 | startTimeHi * 0x4000; startTimeHi = startTimeHi >> 0x12; local_c0->_spawnerType = 0; local_c0->_spawnerVariant = 0; @@ -276,7 +276,7 @@ LAB_00712ec3: iVar11 = *(int *)((char *)pvVar13 + 0x1214); *(int *)((char *)pvVar13 + 0x1214) = iVar11 + 1; pEVar5->_index = iVar11; - ((EntityList *)((EntityList *)((int)pvVar13 + 0x1218)))->EntityList::AddEntity(pEVar5); + ((EntityList *)((EntityList *)(GHIDRA_INT(pvVar13) + 0x1218)))->EntityList::AddEntity(pEVar5); bVar6 = Game::ShouldEraseEnemy(pEVar5); if (bVar6 != 0) { Entity::RemoveWithPoof(pEVar5,unusedArg_00); @@ -297,28 +297,28 @@ LAB_00712ec3: } uVar9 = 0; playerManager = &g_game->_playerManager; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar13 = (playerManager->_playerList)._end; - if ((int)pvVar13 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar13) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar13 = (playerManager->_playerList)._end; } piVar12 = (playerManager->_playerList)._begin; - if (uVar9 < (uint)((int)pvVar13 - (int)piVar12 >> 2)) { + if (uVar9 < GHIDRA_UINT((GHIDRA_INT(pvVar13) - GHIDRA_INT(piVar12) >> 2))) { piVar12 = piVar12 + uVar9; } trigger_set_dispatch((void *)(*piVar12 + 0x1fc8),6,pEVar5,&spawnPos,&spawnVelocity); uVar9 = uVar9 + 1; playerManager = &g_game->_playerManager; - } while (uVar9 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar9 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } LAB_00713111: uVar17 = GetTimeNs(); - uVar9 = (uint)(uVar17 >> 0x20); + uVar9 = GHIDRA_UINT((uVar17 >> 0x20)); lVar2 = (uVar17 & 0xffffffff) * 0x431bde82; local_b0[0] = (Entity *)((ulonglong)lVar2 >> 0x20); lVar3 = (ulonglong)uVar9 * 0x431bde82; @@ -326,23 +326,23 @@ LAB_00713111: lVar4 = (ulonglong)uVar9 * 0xd7b634db + ((uVar17 & 0xffffffff) * 0xd7b634db >> 0x20); local_68.x = (float)(lVar4 + lVar2); lVar3 = lVar3 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar4 >> 0x20), - (int)(&(local_b0[0]->_sprite)._filename + -3) + - (uint)CARRY4((uint)lVar2,(uint)lVar4)), - (int)((ulonglong)(lVar4 + lVar2) >> 0x20)); - uVar14 = (uint)((ulonglong)lVar3 >> 0x20); - uVar9 = (uint)lVar3 >> 0x12 | uVar14 * 0x4000; + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)), + GHIDRA_INT((&(local_b0[0]->_sprite)._filename + -3)) + + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar2),GHIDRA_UINT(lVar4)))), + GHIDRA_INT(((ulonglong)(lVar4 + lVar2) >> 0x20))); + uVar14 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); + uVar9 = GHIDRA_UINT(lVar3) >> 0x12 | uVar14 * 0x4000; uVar10 = uVar9 - local_b4; - bVar15 = CARRY4((uint)g_entitySpawnTimeMs,uVar10); - g_entitySpawnTimeMs._0_4_ = (uint)g_entitySpawnTimeMs + uVar10; - g_entitySpawnTimeMs._4_4_ = - g_entitySpawnTimeMs._4_4_ + (((uVar14 >> 0x12) - startTimeHi) - (uint)(uVar9 < local_b4)) - + (uint)bVar15; + bVar15 = CARRY4(GHIDRA_UINT(g_entitySpawnTimeMs),uVar10); + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x0)) = GHIDRA_UINT(g_entitySpawnTimeMs) + uVar10; + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) = + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) + (((uVar14 >> 0x12) - startTimeHi) - GHIDRA_UINT((uVar9 < local_b4))) + + GHIDRA_UINT(bVar15); } pEVar5 = local_c0; uVar9 = Random(); ((Color *)(&tintColor))->Color::Color(1.0,0.0,0.0, - (float)((double)(int)uVar9 + __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 0.1); other = extraout_EAX; layer = ((ANM2 *)(&pEVar5->_sprite))->ANM2::GetLayer((byte *)0x0); @@ -350,13 +350,13 @@ LAB_00713111: ((BlendMode *)(&iStack_7c))->BlendMode::SetMode(2,unusedArg_01); layer = ((ANM2 *)(&pEVar5->_sprite))->ANM2::GetLayer((byte *)0x0); layer->_blendMode[0] = iStack_7c; - layer->_blendMode[1] = (int)local_78; - layer->_blendMode[2] = local_78._4_4_; + layer->_blendMode[1] = GHIDRA_INT(local_78); + layer->_blendMode[2] = (*(undefined4 *)((char *)&(local_78) + 0x4)); layer->_blendMode[3] = local_70; layer->_blendMode[4] = iStack_6c; uVar9 = Random(); *(float *)(pEVar5[1]._sprite._animDefaultName._buf + 4) = - (float)((double)(int)uVar9 + __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) * 2.3283064e-10 + (float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283064e-10 * 10.0 + 2.0; uVar9 = Random(); iVar11 = uVar9 % 0x1e + 0x14; @@ -364,7 +364,7 @@ LAB_00713111: *(int *)(pEVar5[1]._sprite._filename._buf + 8) = iVar11; uVar9 = Random(); iVar11 = *(int *)pEVar5; - scale = (float)((double)(int)uVar9 + __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) * + scale = (float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 0.8; fVar16 = scale * g_vectorOne.x; (pEVar5->_sprite)._scale.y = scale * g_vectorOne.y; @@ -376,21 +376,21 @@ LAB_00713111: (*(float *)((char *)pvVar13 + 0x7740) <= 0.5)) || ((this->_desc)._state != 0)) || (uVar9 = Random(), uVar9 % 0x14 != 0)) goto LAB_00713310; uVar9 = Random(); - local_98[0] = (float)((double)(int)uVar9 + __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) * + local_98[0] = (float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283064e-10 * -1.2800001; uVar9 = Random(); iVar11 = *(int *)((char *)g_game->_room + 0xc); - local_bc = ((float)((double)(int)uVar9 + __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) * + local_bc = ((float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283064e-10 - 0.5) * 0.4; spawnVelocity.y = local_98[0]; spawnPos.x = (float)(this->_gridIndex % iVar11) * 40.0 + 40.0; spawnPos.y = (float)(this->_gridIndex / iVar11) * 40.0 + 120.0; spawnVelocity.x = local_bc; uVar9 = Random(); - spawnPos.x = ((float)((double)(int)uVar9 + __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) * + spawnPos.x = ((float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283064e-10 - 0.5) * 18.0 + spawnPos.x; uVar9 = Random(); - spawnPos.y = ((float)((double)(int)uVar9 + __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) * + spawnPos.y = ((float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283064e-10 - 0.5) * 18.0 + spawnPos.y; local_c0 = (Entity *)Random(); local_dc = g_game; @@ -437,7 +437,7 @@ LAB_00712858: } else { if (uVar9 == 0x46) { - local_98[2] = (float)((uint)spawnSubType >> 0xb); + local_98[2] = (float)(GHIDRA_UINT(spawnSubType) >> 0xb); do { local_d8[0] = spawnSubType; if (spawnSubType != 0) { @@ -458,7 +458,7 @@ LAB_00712858: uVar10 = uVar10 << ((byte)((ulonglong)local_78 >> 0x20) & 0x1f) ^ uVar10; uVar10 = uVar10 >> ((byte)local_a8 & 0x1f) ^ uVar10; uVar9 = ItemPool::GetPill(uVar10); - spawnSubType = uVar9 | ((uint)local_98[2] & 1) << 0xb; + spawnSubType = uVar9 | (GHIDRA_UINT(local_98[2]) & 1) << 0xb; } while( true ); } if (uVar9 != 100) goto LAB_00712858; @@ -493,18 +493,18 @@ LAB_00712860: if (local_b0[0] == (Entity *)0x0) goto LAB_00713310; uVar17 = GetTimeNs(); pEVar5 = local_b0[0]; - uVar9 = (uint)(uVar17 >> 0x20); + uVar9 = GHIDRA_UINT((uVar17 >> 0x20)); lVar2 = (uVar17 & 0xffffffff) * 0x431bde82; lVar3 = (ulonglong)uVar9 * 0xd7b634db + ((uVar17 & 0xffffffff) * 0xd7b634db >> 0x20); local_98[2] = (float)(lVar3 + lVar2); lVar2 = (ulonglong)uVar9 * 0x431bde82 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar3 >> 0x20), - (int)((ulonglong)lVar2 >> 0x20) + (uint)CARRY4((uint)lVar2,(uint)lVar3)), - (int)((ulonglong)(lVar3 + lVar2) >> 0x20)); - startTimeHi = (uint)((ulonglong)lVar2 >> 0x20); + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)), + GHIDRA_INT(((ulonglong)lVar2 >> 0x20)) + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar2),GHIDRA_UINT(lVar3)))), + GHIDRA_INT(((ulonglong)(lVar3 + lVar2) >> 0x20))); + startTimeHi = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); spawnerSlot = &local_b0[0]->_spawnerEntity; - local_d0 = (int *)((uint)lVar2 >> 0x12 | startTimeHi * 0x4000); + local_d0 = (int *)(GHIDRA_UINT(lVar2) >> 0x12 | startTimeHi * 0x4000); startTimeHi = startTimeHi >> 0x12; local_b0[0]->_spawnerType = 0; local_b0[0]->_spawnerVariant = 0; @@ -524,7 +524,7 @@ LAB_00712860: iVar11 = *(int *)((char *)pvVar13 + 0x1214); *(int *)((char *)pvVar13 + 0x1214) = iVar11 + 1; pEVar5->_index = iVar11; - ((EntityList *)((EntityList *)((int)pvVar13 + 0x1218)))->EntityList::AddEntity(pEVar5); + ((EntityList *)((EntityList *)(GHIDRA_INT(pvVar13) + 0x1218)))->EntityList::AddEntity(pEVar5); bVar6 = Game::ShouldEraseEnemy(pEVar5); if (bVar6 != 0) { Entity::RemoveWithPoof(pEVar5,unusedArg); @@ -545,28 +545,28 @@ LAB_00712860: } uVar9 = 0; playerManager = &g_game->_playerManager; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar13 = (playerManager->_playerList)._end; - if ((int)pvVar13 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar13) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar13 = (playerManager->_playerList)._end; } piVar12 = (playerManager->_playerList)._begin; - if (uVar9 < (uint)((int)pvVar13 - (int)piVar12 >> 2)) { + if (uVar9 < GHIDRA_UINT((GHIDRA_INT(pvVar13) - GHIDRA_INT(piVar12) >> 2))) { piVar12 = piVar12 + uVar9; } trigger_set_dispatch((void *)(*piVar12 + 0x1fc8),6,pEVar5,&spawnPos,&spawnVelocity); uVar9 = uVar9 + 1; playerManager = &g_game->_playerManager; - } while (uVar9 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar9 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } LAB_00712ab1: uVar17 = GetTimeNs(); - uVar9 = (uint)(uVar17 >> 0x20); + uVar9 = GHIDRA_UINT((uVar17 >> 0x20)); lVar2 = (uVar17 & 0xffffffff) * 0x431bde82; local_b0[0] = (Entity *)((ulonglong)lVar2 >> 0x20); lVar3 = (ulonglong)uVar9 * 0x431bde82; @@ -574,18 +574,18 @@ LAB_00712ab1: lVar4 = (ulonglong)uVar9 * 0xd7b634db + ((uVar17 & 0xffffffff) * 0xd7b634db >> 0x20); local_68.x = (float)(lVar4 + lVar2); lVar3 = lVar3 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar4 >> 0x20), - (int)(&(local_b0[0]->_sprite)._filename + -3) + - (uint)CARRY4((uint)lVar2,(uint)lVar4)), - (int)((ulonglong)(lVar4 + lVar2) >> 0x20)); - uVar10 = (uint)((ulonglong)lVar3 >> 0x20); - piVar12 = (int *)((uint)lVar3 >> 0x12 | uVar10 * 0x4000); - uVar9 = (int)piVar12 - (int)local_d0; - bVar15 = CARRY4((uint)g_entitySpawnTimeMs,uVar9); - g_entitySpawnTimeMs._0_4_ = (uint)g_entitySpawnTimeMs + uVar9; - g_entitySpawnTimeMs._4_4_ = - g_entitySpawnTimeMs._4_4_ + (((uVar10 >> 0x12) - startTimeHi) - (uint)(piVar12 < local_d0)) + - (uint)bVar15; + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)), + GHIDRA_INT((&(local_b0[0]->_sprite)._filename + -3)) + + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar2),GHIDRA_UINT(lVar4)))), + GHIDRA_INT(((ulonglong)(lVar4 + lVar2) >> 0x20))); + uVar10 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); + piVar12 = (int *)(GHIDRA_UINT(lVar3) >> 0x12 | uVar10 * 0x4000); + uVar9 = GHIDRA_INT(piVar12) - GHIDRA_INT(local_d0); + bVar15 = CARRY4(GHIDRA_UINT(g_entitySpawnTimeMs),uVar9); + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x0)) = GHIDRA_UINT(g_entitySpawnTimeMs) + uVar9; + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) = + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) + (((uVar10 >> 0x12) - startTimeHi) - GHIDRA_UINT((piVar12 < local_d0))) + + GHIDRA_UINT(bVar15); LAB_00713310: curPit = pit; if ((((g_game->_frameCount % 10 == 0) && @@ -594,10 +594,10 @@ LAB_00713310: (((pit->_desc)._state == 0 && (uVar9 = Random(), uVar9 % 6 == 0)))) { ((GridEntity *)((GridEntity *)curPit))->GridEntity::Position(&spawnPos); uVar9 = Random(); - spawnPos.x = ((float)((double)(int)uVar9 + __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) * + spawnPos.x = ((float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283064e-10 - 0.5) * 15.0 + spawnPos.x; uVar9 = Random(); - spawnPos.y = ((float)((double)(int)uVar9 + __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) * + spawnPos.y = ((float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283064e-10 - 0.5) * 15.0 + spawnPos.y; uVar9 = Random(); ((Game *)(g_game))->Game::SpawnEx(1000,0x7c,&spawnPos,&g_vectorZero,(Entity *)0x0,0,uVar9,0); @@ -640,7 +640,7 @@ void GridEntity_Pit::BeginBatches() local_8 = 0xffffffff; puStack_c = &LAB_00afca3d; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&anm2Path)[1]._size; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&anm2Path)[1]._size); ExceptionList = &local_10; uVar3 = (this->_desc)._variant; if ((char)uVar3 < '\0') { @@ -649,7 +649,7 @@ void GridEntity_Pit::BeginBatches() (this->_desc)._variant = uVar3; } if ((uVar3 & 0xff00) != 0) { - *(char *)(this->_gridIndex + 0x746c + (int)g_game->_room) = (char)(uVar3 >> 8); + *(char *)(this->_gridIndex + 0x746c + GHIDRA_INT(g_game->_room)) = (char)(uVar3 >> 8); } game = g_game; this->_hasLadder = 0; @@ -701,20 +701,20 @@ void GridEntity_Pit::BeginBatches() anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; if ((*(uint *)(*(int *)((char *)game->_room + 4) + 0x44) >> 5 & 1) == 0) { - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x16; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/grid/grid_pit.anm2",0x17); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/grid/grid_pit.anm2",0x17); local_8 = 2; ((ANM2 *)(&this->_sprite))->ANM2::Load(&anm2Path,0); local_8 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - pcVar6 = (char *)anm2Path._buf._0_4_; + pcVar6 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - pcVar6 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar6 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar6))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar6)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -723,27 +723,27 @@ void GridEntity_Pit::BeginBatches() } anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = anm2Path._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) & 0xffffff00; Sprite::ReplaceSpritesheet ((Sprite *)&this->_sprite,0, (std_string *) - ((int)g_game->_room + *(int *)((char *)g_game->_room + 0x1d18) * 0x13c + 0x1dc4)); + (GHIDRA_INT(g_game->_room) + *(int *)((char *)g_game->_room + 0x1d18) * 0x13c + 0x1dc4)); } else { - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1c; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/grid/grid_pit_water.anm2",0x1d); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/grid/grid_pit_water.anm2",0x1d); local_8 = 0; ((ANM2 *)(&this->_sprite))->ANM2::Load(&anm2Path,0); local_8 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - pcVar6 = (char *)anm2Path._buf._0_4_; + pcVar6 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - pcVar6 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar6 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar6))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar6)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -753,7 +753,7 @@ void GridEntity_Pit::BeginBatches() pbVar7 = (this->_sprite)._overlayAnimState._animData; anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = anm2Path._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) & 0xffffff00; if (pbVar7 == (byte *)0x0) { LAB_00713a2c: bVar2 = ((ANM2 *)(&this->_sprite))->ANM2::SetOverlayAnimation((byte *)"highlights",1); @@ -773,7 +773,7 @@ LAB_00713a2c: isLess = bVar2 < (byte)*pcVar6; if (bVar2 != *pcVar6) { LAB_00713a11: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_00713a16; } if (bVar2 == 0) break; @@ -799,10 +799,10 @@ LAB_00713a16: startFrame = startFrame % uVar3; } if ((this->_sprite)._overlayAnimState._animData != (void *)0x0) { - ((AnimationState *)(&(this->_sprite)._overlayAnimState))->AnimationState::SetFrameFloat((float)(int)startFrame); + ((AnimationState *)(&(this->_sprite)._overlayAnimState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(startFrame)); } pvVar5 = g_game->_room; - pbVar7 = (byte *)((int)pvVar5 + *(int *)((char *)pvVar5 + 0x1d18) * 0x13c + 0x1ddc); + pbVar7 = (byte *)(GHIDRA_INT(pvVar5) + *(int *)((char *)pvVar5 + 0x1d18) * 0x13c + 0x1ddc); if (0xf < *(uint *)(pbVar7 + 0x14)) { pbVar7 = *(byte **)pbVar7; } @@ -827,23 +827,23 @@ LAB_00713aee: } spritesheetPath._size = 0; spritesheetPath._capacity = 0xf; - spritesheetPath._buf._0_4_ = (char *)0x0; + (*(undefined4 *)((char *)&(spritesheetPath._buf) + 0x0)) = (char *)0x0; pbVar7 = pbVar4; do { bVar2 = *pbVar7; pbVar7 = pbVar7 + 1; } while (bVar2 != 0); - ((std::string *)(spritesheetPath._buf))->std::string::assign(pbVar4,(int)pbVar7 - (int)(pbVar4 + 1)); + ((std::string *)(spritesheetPath._buf))->std::string::assign(pbVar4,GHIDRA_INT(pbVar7) - GHIDRA_INT((pbVar4 + 1))); local_8 = 1; ((Sprite *)((Sprite *)&this->_sprite))->Sprite::ReplaceSpritesheet(0,&spritesheetPath); local_8 = 0xffffffff; if (0xf < spritesheetPath._capacity) { uVar3 = spritesheetPath._capacity + 1; - pcVar6 = (char *)spritesheetPath._buf._0_4_; + pcVar6 = (*(undefined4 *)((char *)&((char *)spritesheetPath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar6 = *(char **)(spritesheetPath._buf._0_4_ + -4); + pcVar6 = *(char **)((*(undefined4 *)((char *)&(spritesheetPath._buf) + 0x0)) + -4); uVar3 = spritesheetPath._capacity + 0x24; - if ((char *)0x1f < (char *)(spritesheetPath._buf._0_4_ + (-4 - (int)pcVar6))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(spritesheetPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar6)))) goto LAB_00713e5d; } operator_delete(pcVar6,uVar3); @@ -861,21 +861,21 @@ LAB_00713caf: if ((((local_64[0xd] == '\0') && (*(int *)(local_64 + 0x10) < 0x50)) && (local_64 != (game->_seedEffects)._seedEffects)) && (0.5 < *(float *)((char *)game->_room + 0x7240))) { - spritesheetPath._buf._0_4_ = std::_Allocate(0x40); + (*(undefined4 *)((char *)&(spritesheetPath._buf) + 0x0)) = std::_Allocate(0x40); spritesheetPath._size = 0x39; spritesheetPath._capacity = 0x3f; - builtin_strncpy((char *)spritesheetPath._buf._0_4_, + builtin_strncpy((*(undefined4 *)((char *)&((char *)spritesheetPath._buf) + 0x0)), "gfx/promo/gfuel/grid/grid_pit_floodedcaves_verycursed.png",0x3a); local_8 = 3; ((Sprite *)((Sprite *)&this->_sprite))->Sprite::ReplaceSpritesheet(0,&spritesheetPath); local_8 = 0xffffffff; if (0xf < spritesheetPath._capacity) { uVar3 = spritesheetPath._capacity + 1; - pcVar6 = (char *)spritesheetPath._buf._0_4_; + pcVar6 = (*(undefined4 *)((char *)&((char *)spritesheetPath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar6 = *(char **)(spritesheetPath._buf._0_4_ + -4); + pcVar6 = *(char **)((*(undefined4 *)((char *)&(spritesheetPath._buf) + 0x0)) + -4); uVar3 = spritesheetPath._capacity + 0x24; - if ((char *)0x1f < (char *)(spritesheetPath._buf._0_4_ + (-4 - (int)pcVar6))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(spritesheetPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar6)))) goto LAB_00713e5d; } operator_delete(pcVar6,uVar3); @@ -891,30 +891,30 @@ LAB_00713caf: goto LAB_00713caf; } } - pbVar7 = (byte *)((int)game->_room + *(int *)((char *)game->_room + 0x1d18) * 0x13c + 0x1dac); + pbVar7 = (byte *)(GHIDRA_INT(game->_room) + *(int *)((char *)game->_room + 0x1d18) * 0x13c + 0x1dac); if (0xf < *(uint *)(pbVar7 + 0x14)) { pbVar7 = *(byte **)pbVar7; } spritesheetPath._size = 0; spritesheetPath._capacity = 0xf; - spritesheetPath._buf._0_4_ = (char *)0x0; + (*(undefined4 *)((char *)&(spritesheetPath._buf) + 0x0)) = (char *)0x0; pbVar4 = pbVar7; do { bVar2 = *pbVar4; pbVar4 = pbVar4 + 1; } while (bVar2 != 0); - ((std::string *)(spritesheetPath._buf))->std::string::assign(pbVar7,(int)pbVar4 - (int)(pbVar7 + 1)); + ((std::string *)(spritesheetPath._buf))->std::string::assign(pbVar7,GHIDRA_INT(pbVar4) - GHIDRA_INT((pbVar7 + 1))); local_8 = 4; ((Sprite *)((Sprite *)&this->_sprite))->Sprite::ReplaceSpritesheet(1,&spritesheetPath); local_8 = 0xffffffff; bVar2 = extraout_CL; if (0xf < spritesheetPath._capacity) { uVar3 = spritesheetPath._capacity + 1; - pcVar6 = (char *)spritesheetPath._buf._0_4_; + pcVar6 = (*(undefined4 *)((char *)&((char *)spritesheetPath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar6 = *(char **)(spritesheetPath._buf._0_4_ + -4); + pcVar6 = *(char **)((*(undefined4 *)((char *)&(spritesheetPath._buf) + 0x0)) + -4); uVar3 = spritesheetPath._capacity + 0x24; - if ((char *)0x1f < (char *)(spritesheetPath._buf._0_4_ + (-4 - (int)pcVar6))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(spritesheetPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar6)))) { LAB_00713e5d: local_8 = 0xffffffff; /* WARNING: Subroutine does not return */ @@ -959,17 +959,17 @@ void GridEntity_Pit::update_sprite_edges() pvVar1 = g_game->_room; edgeFrame = 0; gridY = *(uint *)((char *)pvVar1 + 0xc); - gridY = (uint)this->_gridIndex / gridY; - gridX = (uint)this->_gridIndex % gridY; + gridY = GHIDRA_UINT(this->_gridIndex) / gridY; + gridX = GHIDRA_UINT(this->_gridIndex) % gridY; iVar6 = gridX - 1; - if ((((((-1 < iVar6) && (iVar6 < (int)gridY)) && (-1 < (int)gridY)) && - (((int)gridY < *(int *)((char *)pvVar1 + 0x10) && (iVar8 = gridY * gridY + iVar6, -1 < iVar8)))) + if ((((((-1 < iVar6) && (iVar6 < GHIDRA_INT(gridY))) && (-1 < GHIDRA_INT(gridY))) && + ((GHIDRA_INT(gridY) < *(int *)((char *)pvVar1 + 0x10) && (iVar8 = gridY * gridY + iVar6, -1 < iVar8)))) && (iVar8 = *(int *)((char *)pvVar1 + iVar8 * 4 + 0x24), iVar8 != 0)) && (*(int *)(iVar8 + 4) == 7)) { edgeFrame = 1; } iVar8 = gridY - 1; - if ((((-1 < (int)gridX) && ((int)gridX < *(int *)((char *)pvVar1 + 0xc))) && + if ((((-1 < GHIDRA_INT(gridX)) && (GHIDRA_INT(gridX) < *(int *)((char *)pvVar1 + 0xc))) && ((-1 < iVar8 && (((iVar8 < *(int *)((char *)pvVar1 + 0x10) && (iVar2 = *(int *)((char *)pvVar1 + 0xc) * iVar8 + gridX, -1 < iVar2)) && @@ -979,15 +979,15 @@ void GridEntity_Pit::update_sprite_edges() } iVar2 = gridX + 1; if ((((-1 < iVar2) && (iVar2 < *(int *)((char *)pvVar1 + 0xc))) && - ((-1 < (int)gridY && - (((int)gridY < *(int *)((char *)pvVar1 + 0x10) && + ((-1 < GHIDRA_INT(gridY) && + ((GHIDRA_INT(gridY) < *(int *)((char *)pvVar1 + 0x10) && (iVar7 = *(int *)((char *)pvVar1 + 0xc) * gridY + iVar2, -1 < iVar7)))))) && ((iVar7 = *(int *)((char *)pvVar1 + iVar7 * 4 + 0x24), iVar7 != 0 && (*(int *)(iVar7 + 4) == 7)))) { edgeFrame = edgeFrame + 4; } iVar7 = gridY + 1; - if ((((-1 < (int)gridX) && ((int)gridX < *(int *)((char *)pvVar1 + 0xc))) && (-1 < iVar7)) && + if ((((-1 < GHIDRA_INT(gridX)) && (GHIDRA_INT(gridX) < *(int *)((char *)pvVar1 + 0xc))) && (-1 < iVar7)) && (((iVar7 < *(int *)((char *)pvVar1 + 0x10) && (iVar4 = gridX + *(int *)((char *)pvVar1 + 0xc) * iVar7, -1 < iVar4)) && ((iVar4 = *(int *)((char *)pvVar1 + iVar4 * 4 + 0x24), iVar4 != 0 && (*(int *)(iVar4 + 4) == 7))) @@ -1104,7 +1104,7 @@ void GridEntity_Pit::update_sprite_edges() (this->_sprite)._animState._animData != (void *)0x0)) { (this->_sprite)._animState._isPlaying = 0; } - if (1 < (uint)(this->_sprite)._layerCount) { + if (1 < GHIDRA_UINT((this->_sprite)._layerCount)) { iVar8 = (this->_desc)._state + -2; iVar6 = 0; if (0 < iVar8) { @@ -1112,7 +1112,7 @@ void GridEntity_Pit::update_sprite_edges() } if (((this->_sprite)._animState._animData != (void *)0x0) && ((animState = &(this->_sprite)._animState, - 1 < *(int *)((int)(this->_sprite)._animState._animation + 0x80) || + 1 < *(int *)(GHIDRA_INT((this->_sprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), 1 < *(int *)((char *)animState->_animation + 0x80))))) { pvVar1 = (this->_sprite)._animState._animData; @@ -1120,7 +1120,7 @@ void GridEntity_Pit::update_sprite_edges() if ((pvVar1 == (void *)0x0) || ((iVar8 < 0 || (*(int *)((char *)pvVar1 + 0x1c) <= iVar8)))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(this->_sprite)._animState._layerFrames + iVar8 * 4) = 0; + *(undefined4 *)(GHIDRA_INT((this->_sprite)._animState._layerFrames) + iVar8 * 4) = 0; ((AnimationState *)(animState))->AnimationState::AdvanceLayerPosition(iVar8,(float)iVar6); } iVar6 = (this->_desc)._state; @@ -1181,18 +1181,18 @@ void GridEntity_Pit::guard_check_icall() } while (dx < 2); uVar3 = 0; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { playerListEnd = (game->_playerManager)._playerList._end; playerSlot = (game->_playerManager)._playerList._begin; - if ((int)playerListEnd - (int)playerSlot >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerSlot) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (game->_playerManager)._playerList._end; playerSlot = (game->_playerManager)._playerList._begin; game = g_game; } - if (uVar3 < (uint)((int)playerListEnd - (int)playerSlot >> 2)) { + if (uVar3 < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + uVar3; } player = (Entity_Player *)*playerSlot; @@ -1200,15 +1200,15 @@ void GridEntity_Pit::guard_check_icall() if ((((iVar2 != 0) && (iVar2 != 3)) && (iVar2 != 1)) && ((iVar2 != 2 && (player->_pitfallState == 0)))) { playerColumnF = ((player->_pos).x - 40.0) / 40.0 + 0.5; - iVar4 = (int)playerColumnF; - iVar2 = (int)(((player->_pos).y - 120.0) / 40.0 + 0.5); + iVar4 = GHIDRA_INT(playerColumnF); + iVar2 = GHIDRA_INT((((player->_pos).y - 120.0) / 40.0 + 0.5)); if (((iVar4 < 0) || ((iVar1 = *(int *)((char *)game->_room + 0xc), iVar1 <= iVar4 || (iVar2 < 0)))) || (*(int *)((char *)game->_room + 0x10) <= iVar2)) { iVar2 = -1; } else { - iVar2 = iVar1 * iVar2 + (int)playerColumnF; + iVar2 = iVar1 * iVar2 + GHIDRA_INT(playerColumnF); } iVar4 = this->_gridIndex; if (iVar2 == iVar4) { @@ -1227,8 +1227,8 @@ void GridEntity_Pit::guard_check_icall() } } uVar3 = uVar3 + 1; - } while (uVar3 < (uint)((int)(game->_playerManager)._playerList._end - - (int)(game->_playerManager)._playerList._begin >> 2)); + } while (uVar3 < GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((game->_playerManager)._playerList._begin) >> 2))); UpdateCollision(this); return; } @@ -1271,7 +1271,7 @@ void GridEntity_Pit::UpdateCollision() *(undefined4 *)((char *)room + gridIdx * 4 + 0x76c) = gridPathValue; } } - else if ((uint)this->_gridIndex < 0x1c0) { + else if (GHIDRA_UINT(this->_gridIndex) < 0x1c0) { *(undefined4 *)((char *)room + this->_gridIndex * 4 + 0x76c) = 0; this->_collisionClass = 0; return; diff --git a/src/game/grid_entity_poop.cpp b/src/game/grid_entity_poop.cpp index f6359ab..a378bef 100644 --- a/src/game/grid_entity_poop.cpp +++ b/src/game/grid_entity_poop.cpp @@ -54,7 +54,7 @@ void GridEntity_Poop::Update() local_14 = 0xffffffff; puStack_18 = &LAB_00afca70; local_1c = ExceptionList; - uVar2 = __security_cookie ^ (uint)(animName + 0x34); + uVar2 = __security_cookie ^ GHIDRA_UINT((animName + 0x34)); ExceptionList = &local_1c; local_50 = this; local_24 = uVar2; @@ -75,7 +75,7 @@ void GridEntity_Poop::Update() if (((this->_desc)._variant == 1) && (roomDesc = ((Level *)((Level *)g_game))->Level::GetRoomByIdx(g_game->_currentRoomIdx, g_game->_currentDimensionIdx), - ((uint)roomDesc->Flags >> 1 & 1) != 0)) { + (GHIDRA_UINT(roomDesc->Flags) >> 1 & 1) != 0)) { local_45 = (this->_sprite)._flipX; iVar5 = *(int *)this; this->_reviveTimer = 0; @@ -92,7 +92,7 @@ void GridEntity_Poop::Update() local_58 = *(void **)((char *)pvVar3 + 0x30); bVar1 = ((ANM2 *)(&this->_sprite))->ANM2::SetAnimation(animName,1); if (((bVar1 != 0) && ((this->_sprite)._animState._animData != (void *)0x0)) && - (((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)(int)local_58), + (((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(local_58)), (this->_sprite)._animState._animData != (void *)0x0)) { (this->_sprite)._animState._isPlaying = 0; } @@ -126,7 +126,7 @@ LAB_007149d5: isLess = bVar1 < (byte)*expectedName; if (bVar1 != *expectedName) { LAB_007149b7: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_007149bc; } if (bVar1 == 0) break; @@ -143,7 +143,7 @@ LAB_007149bc: } game = g_game; (this->_desc)._state = 0; - if ((uint)this->_gridIndex < 0x1c0) { + if (GHIDRA_UINT(this->_gridIndex) < 0x1c0) { *(undefined4 *)((char *)game->_room + this->_gridIndex * 4 + 0x76c) = 0x5dc; } } @@ -200,7 +200,7 @@ LAB_007149bc: isLess = bVar1 < (byte)*expectedName; if (bVar1 != *expectedName) { LAB_00714b81: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_00714b86; } if (bVar1 == 0) break; @@ -233,7 +233,7 @@ LAB_00714be2: isLess = bVar1 < (byte)*expectedName; if (bVar1 != *expectedName) { LAB_00714bc4: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_00714bc9; } if (bVar1 == 0) break; @@ -251,24 +251,24 @@ LAB_00714bc9: if ((this->_sprite)._animState._animData != (void *)0x0) { AnimationState::AdvancePosition (&(this->_sprite)._animState, - *(int *)((int)(this->_sprite)._animState._animData + 0x30) + -1); + *(int *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x30) + -1); } LAB_00714c16: playerManager = &g_game->_playerManager; local_45 = '\0'; local_50 = (GridEntity_Poop *)0x0; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> 2 + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar3 = (playerManager->_playerList)._end; playerIt = (playerManager->_playerList)._begin; - if ((int)pvVar3 - (int)playerIt >> 2 == 0) { + if (GHIDRA_INT(pvVar3) - GHIDRA_INT(playerIt) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar3 = (playerManager->_playerList)._end; playerIt = (playerManager->_playerList)._begin; } - if (local_50 < (uint)((int)pvVar3 - (int)playerIt >> 2)) { - playerIt = playerIt + (int)local_50; + if (local_50 < GHIDRA_UINT((GHIDRA_INT(pvVar3) - GHIDRA_INT(playerIt) >> 2))) { + playerIt = playerIt + GHIDRA_INT(local_50); } player = (Entity_Player *)*playerIt; if (((((player->_variant == 0) && (iVar5 = player->_entityGridCollisionClass, iVar5 != 0)) && @@ -367,17 +367,17 @@ switchD_00714d3f_caseD_2: } } playerManager = &g_game->_playerManager; - local_50 = (GridEntity_Poop *)((int)local_50 + 1); + local_50 = (GridEntity_Poop *)(GHIDRA_INT(local_50) + 1); } while (local_50 < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } if ((*(undefined1 *)((char *)(this) + 0x171)) != '\0') { iVar5 = *(int *)((char *)g_game->_room + 0xc); local_74.x = (float)(this->_gridIndex % iVar5) * 40.0 + 40.0; local_74.y = (float)(this->_gridIndex / iVar5) * 40.0 + 120.0; EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)&pvStack_68,&local_74, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)&pvStack_68,&local_74, 16.0,0xffffffff); uVar2 = 0; if (local_5c != 0) { @@ -399,15 +399,15 @@ LAB_00714fce: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (pvStack_64 != (void *)0x0) { uVar2 = *(uint *)((char *)pvStack_64 + -4); allocBytesBefore = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocBytesBefore < uVar2); - free((void *)((int)pvStack_64 + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocBytesBefore) < uVar2)); + free((void *)(GHIDRA_INT(pvStack_64) + -4)); } local_14 = 0xffffffff; } @@ -418,18 +418,18 @@ LAB_00714fce: if (((this->_desc)._variant == 6) && ((this->_desc)._state != 1000)) { playerManager = &g_game->_playerManager; local_50 = (GridEntity_Poop *)0x0; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar3 = (playerManager->_playerList)._end; playerIt = (playerManager->_playerList)._begin; - if ((int)pvVar3 - (int)playerIt >> 2 == 0) { + if (GHIDRA_INT(pvVar3) - GHIDRA_INT(playerIt) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar3 = (playerManager->_playerList)._end; playerIt = (playerManager->_playerList)._begin; } - if (local_50 < (uint)((int)pvVar3 - (int)playerIt >> 2)) { - playerIt = playerIt + (int)local_50; + if (local_50 < GHIDRA_UINT((GHIDRA_INT(pvVar3) - GHIDRA_INT(playerIt) >> 2))) { + playerIt = playerIt + GHIDRA_INT(local_50); } player = (Entity_Player *)*playerIt; iVar5 = *(int *)((char *)g_game->_room + 0xc); @@ -450,10 +450,10 @@ LAB_00714fce: } } playerManager = &g_game->_playerManager; - local_50 = (GridEntity_Poop *)((int)local_50 + 1); + local_50 = (GridEntity_Poop *)(GHIDRA_INT(local_50) + 1); } while (local_50 < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } if ((this->_sprite)._loaded != 0) { @@ -532,7 +532,7 @@ void GridEntity_Poop::BeginBatches() ehState = 0xffffffff; puStack_c = &LAB_00afcac6; prevExceptionList = ExceptionList; - stackCookie = __security_cookie ^ (uint)(playStateAnimName + 0x30); + stackCookie = __security_cookie ^ GHIDRA_UINT((playStateAnimName + 0x30)); ExceptionList = &prevExceptionList; (this->_desc)._varData = 0; *(undefined2 *)&this->_isUnderPlayer = 0; @@ -542,18 +542,18 @@ void GridEntity_Poop::BeginBatches() playerManager = &local_1a8->_playerManager; local_1a4 = (EntityConfig *)0x0; isUnderPlayer = 0; - if ((int)(local_1a8->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin + if (GHIDRA_INT((local_1a8->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar8 = (playerManager->_playerList)._end; - if ((int)pvVar8 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar8) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar8 = (playerManager->_playerList)._end; local_1a8 = g_game; } playerSlot = (playerManager->_playerList)._begin; - if (local_1a4 < (EntityConfig *)((int)pvVar8 - (int)playerSlot >> 2)) { - playerSlot = playerSlot + (int)local_1a4; + if (local_1a4 < (EntityConfig *)(GHIDRA_INT(pvVar8) - GHIDRA_INT(playerSlot) >> 2)) { + playerSlot = playerSlot + GHIDRA_INT(local_1a4); } iVar3 = *playerSlot; if (((((*(int *)(iVar3 + 0x2c) == 0) && (iVar12 = *(int *)(iVar3 + 0x184), iVar12 != 0)) && @@ -567,12 +567,12 @@ void GridEntity_Poop::BeginBatches() isUnderPlayer = 1; goto LAB_00715af4; } - local_1a4 = (EntityConfig *)((int)&(local_1a4->_entities)._head + 1); + local_1a4 = (EntityConfig *)(GHIDRA_INT(&(local_1a4->_entities)._head) + 1); playerManager = &local_1a8->_playerManager; } while (local_1a4 < (EntityConfig *) - ((int)(local_1a8->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + (GHIDRA_INT((local_1a8->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2)); isUnderPlayer = this->_isUnderPlayer; } } @@ -613,7 +613,7 @@ LAB_00715bc8: if ((this->_desc)._state != 1000) { uVar13 = 0x5dc; } - if ((uint)this->_gridIndex < 0x1c0) { + if (GHIDRA_UINT(this->_gridIndex) < 0x1c0) { *(undefined4 *)((char *)local_1a8->_room + this->_gridIndex * 4 + 0x76c) = uVar13; } manager = g_manager; @@ -624,7 +624,7 @@ LAB_00715bc8: if (((*(char *)((char *)effect43ConfigNode + 0xd) == '\0') && (*(uint *)((char *)effect43ConfigNode + 0x10) < 0x3e802b01)) && (effect43ConfigNode != (entityConfig->_entities)._head)) { - configEntry = (EntityConfig_Entity *)((int)effect43ConfigNode + 0x18); + configEntry = (EntityConfig_Entity *)(GHIDRA_INT(effect43ConfigNode) + 0x18); } else { configEntry = ((EntityConfig *)(entityConfig))->EntityConfig::GetEntity(1000,0,0); @@ -639,7 +639,7 @@ LAB_00715bc8: if (((*(char *)((char *)effect58ConfigNode + 0xd) == '\0') && (*(uint *)((char *)effect58ConfigNode + 0x10) < 0x3e803a01)) && (effect58ConfigNode != (manager->_entityConfig)._entities._head)) { - configEntry = (EntityConfig_Entity *)((int)effect58ConfigNode + 0x18); + configEntry = (EntityConfig_Entity *)(GHIDRA_INT(effect58ConfigNode) + 0x18); } else { configEntry = ((EntityConfig *)(&manager->_entityConfig))->EntityConfig::GetEntity(1000,0,0); @@ -654,7 +654,7 @@ LAB_00715bc8: if (((*(char *)((char *)heartConfigNode + 0xd) == '\0') && (*(undefined **)((char *)heartConfigNode + 0x10) <= &DAT_00500a00)) && (heartConfigNode != (manager->_entityConfig)._entities._head)) { - configEntry = (EntityConfig_Entity *)((int)heartConfigNode + 0x18); + configEntry = (EntityConfig_Entity *)(GHIDRA_INT(heartConfigNode) + 0x18); } else { configEntry = ((EntityConfig *)(&manager->_entityConfig))->EntityConfig::GetEntity(5,0,0); @@ -669,7 +669,7 @@ LAB_00715bc8: if (((*(char *)((char *)coinConfigNode + 0xd) == '\0') && (*(undefined **)((char *)coinConfigNode + 0x10) <= &DAT_00501400)) && (coinConfigNode != (entityConfig->_entities)._head)) { - configEntry = (EntityConfig_Entity *)((int)coinConfigNode + 0x18); + configEntry = (EntityConfig_Entity *)(GHIDRA_INT(coinConfigNode) + 0x18); } else { configEntry = ((EntityConfig *)(entityConfig))->EntityConfig::GetEntity(5,0,0); @@ -688,20 +688,20 @@ LAB_00715bc8: giantAnm2Path._buf[1] = '\0'; giantAnm2Path._buf[2] = '\0'; giantAnm2Path._buf[3] = '\0'; - giantAnm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(giantAnm2Path._buf) + 0x0)) = std::_Allocate(0x20); giantAnm2Path._size = 0x1d; giantAnm2Path._capacity = 0x1f; - builtin_strncpy((char *)giantAnm2Path._buf._0_4_,"gfx/grid/grid_poop_giant.anm2",0x1e); + builtin_strncpy((*(undefined4 *)((char *)&((char *)giantAnm2Path._buf) + 0x0)),"gfx/grid/grid_poop_giant.anm2",0x1e); ehState = 0; ((ANM2 *)(&this->_sprite))->ANM2::Load(&giantAnm2Path,1); ehState = 0xffffffff; if (0xf < giantAnm2Path._capacity) { uVar4 = giantAnm2Path._capacity + 1; - pcVar11 = (char *)giantAnm2Path._buf._0_4_; + pcVar11 = (*(undefined4 *)((char *)&((char *)giantAnm2Path._buf) + 0x0)); if (0xfff < uVar4) { - pcVar11 = *(char **)(giantAnm2Path._buf._0_4_ + -4); + pcVar11 = *(char **)((*(undefined4 *)((char *)&(giantAnm2Path._buf) + 0x0)) + -4); uVar4 = giantAnm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(giantAnm2Path._buf._0_4_ + (-4 - (int)pcVar11))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(giantAnm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar11)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -710,7 +710,7 @@ LAB_00715bc8: } giantAnm2Path._size = 0; giantAnm2Path._capacity = 0xf; - giantAnm2Path._buf._0_4_ = giantAnm2Path._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(giantAnm2Path._buf) + 0x0)) = (*(undefined4 *)((char *)&(giantAnm2Path._buf) + 0x0)) & 0xffffff00; goto LAB_007162ed; } anm2Path._size = 0; @@ -719,20 +719,20 @@ LAB_00715bc8: anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x17; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/grid/grid_poop.anm2",0x18); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/grid/grid_poop.anm2",0x18); ehState = 1; ((ANM2 *)(&this->_sprite))->ANM2::Load(&anm2Path,0); ehState = 0xffffffff; if (0xf < anm2Path._capacity) { uVar4 = anm2Path._capacity + 1; - pcVar11 = (char *)anm2Path._buf._0_4_; + pcVar11 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - pcVar11 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar11 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar4 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar11))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar11)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -741,7 +741,7 @@ LAB_00715bc8: } anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = anm2Path._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) & 0xffffff00; switch((this->_desc)._variant) { case 0: uVar4 = (this->_rng)._seed; @@ -820,7 +820,7 @@ LAB_00716065: pbVar7 = pbVar7 + 1; } while (isSameSpritesheet != 0); ((std::string *)((char *)spritesheetPathString))->std::string::assign(spritesheetPath, - (int)pbVar7 - (int)(spritesheetPath + 1)); + GHIDRA_INT(pbVar7) - GHIDRA_INT((spritesheetPath + 1))); spritesheetHeapBuf = spritesheetPathString[0]; ehState = 2; if ((this->_sprite)._layerCount < 1) { @@ -829,7 +829,7 @@ LAB_00716065: else { local_1ac = (this->_sprite)._layerState; psVar10 = &local_1ac->_damageEvents; - if (0xf < *(uint *)((int)&local_1ac->_pendingDamageFlags + 4)) { + if (0xf < *(uint *)(GHIDRA_INT(&local_1ac->_pendingDamageFlags) + 4)) { psVar10 = (local_1ac->_damageEvents)._begin; } pppppppbVar6 = (byte *******)spritesheetPathString; @@ -838,7 +838,7 @@ LAB_00716065: } isSameSpritesheet = str_eq((byte *)pppppppbVar6,spritesheetPathSize,(byte *)psVar10, - (uint)local_1ac->_pendingDamageFlags); + GHIDRA_UINT(local_1ac->_pendingDamageFlags)); isSameSpritesheet = extraout_CL_00; if (isSameSpritesheet == 0) { psVar10 = &local_1ac->_damageEvents; @@ -864,7 +864,7 @@ LAB_00716065: if (0xfff < uVar4) { pppppppbVar6 = (byte *******)spritesheetHeapBuf[-1]; uVar4 = spritesheetPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)spritesheetHeapBuf + (-4 - (int)pppppppbVar6))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(spritesheetHeapBuf) + (-4 - GHIDRA_INT(pppppppbVar6)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -874,7 +874,7 @@ LAB_00716065: } spritesheetPathSize = 0; spritesheetPathCapacity = 0xf; - spritesheetPathString[0] = (byte *******)((uint)spritesheetPathString[0] & 0xffffff00); + spritesheetPathString[0] = (byte *******)(GHIDRA_UINT(spritesheetPathString[0]) & 0xffffff00); ((ANM2 *)(&this->_sprite))->ANM2::LoadGraphics(isSameSpritesheet); LAB_007162ed: iVar3 = (this->_desc)._state; @@ -898,7 +898,7 @@ LAB_007162ed: local_1ac = *(Entity **)((char *)pvVar8 + 0x30); isSameSpritesheet = ((ANM2 *)(&this->_sprite))->ANM2::SetAnimation(stateAnimName,1); if (((isSameSpritesheet != 0) && ((this->_sprite)._animState._animData != (void *)0x0)) && - (((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)(int)local_1ac), + (((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(local_1ac)), (this->_sprite)._animState._animData != (void *)0x0)) { (this->_sprite)._animState._isPlaying = 0; } @@ -916,7 +916,7 @@ LAB_007162ed: isLess = isSameSpritesheet < (byte)*pcVar11; if (isSameSpritesheet != *pcVar11) { LAB_00716370: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00716375; } if (isSameSpritesheet == 0) break; @@ -929,7 +929,7 @@ LAB_00716370: uVar4 = 0; LAB_00716375: if ((uVar4 == 0) && - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) == '\0' || + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) == '\0' || ((this->_sprite)._animState._isPlaying != 0)))) goto LAB_00716493; } pcVar11 = "Appear"; @@ -947,7 +947,7 @@ LAB_00716375: isLess = isSameSpritesheet < *pbVar9; if (isSameSpritesheet != *pbVar9) { LAB_007163e7: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_007163ec; } if (isSameSpritesheet == 0) break; @@ -960,7 +960,7 @@ LAB_007163e7: uVar4 = 0; LAB_007163ec: if ((uVar4 == 0) && - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) == '\0' || + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) == '\0' || ((this->_sprite)._animState._isPlaying != 0)))) goto LAB_00716493; } pcVar11 = (char *)playStateAnimName; @@ -1024,7 +1024,7 @@ LAB_00716493: isLess = isSameSpritesheet < *idleAnimName; if (isSameSpritesheet != *idleAnimName) { LAB_00716606: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_0071660b; } if (isSameSpritesheet == 0) break; @@ -1101,13 +1101,13 @@ void GridEntity_Poop::spawn_hit_gibs(Vector *position, int poopVariant, int maxG uint local_c; undefined1 auStack_8 [4]; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); if (maxGibs < 1) { rngResult = 0; } else { rngResult = Random(); - rngResult = rngResult % (uint)maxGibs; + rngResult = rngResult % GHIDRA_UINT(maxGibs); } local_68 = &(g_game->_seedEffects)._seedEffects; local_6c = 3.22299e-44; @@ -1143,7 +1143,7 @@ void GridEntity_Poop::spawn_hit_gibs(Vector *position, int poopVariant, int maxG gibColor._offset[1] = 0.45; LAB_00716828: rngResult = Random(); - speedRoll = (double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]; + speedRoll = (double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]; color = &gibColor; } else { @@ -1191,11 +1191,11 @@ LAB_00716828: switchD_0071688e_default: rngResult = Random(); rngRoll = Random(); - fVar2 = (float)((double)(int)rngRoll + __uint_to_double_fixup[-((int)rngRoll >> 0x1f)]) * + fVar2 = (float)((double)GHIDRA_INT(rngRoll) + __uint_to_double_fixup[-(GHIDRA_INT(rngRoll) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_68 = (void **)(fVar2 + fVar2); rngRoll = Random(); - local_6c = (float)((double)(int)rngRoll + __uint_to_double_fixup[-((int)rngRoll >> 0x1f)]) * + local_6c = (float)((double)GHIDRA_INT(rngRoll) + __uint_to_double_fixup[-(GHIDRA_INT(rngRoll) >> 0x1f)]) * 2.3283064e-10 + 2.0; local_74.x = cos((float)local_68); local_74.x = local_74.x * local_6c; @@ -1230,7 +1230,7 @@ switchD_0071688e_default: if (poopVariant == 0xc) { ((Color *)(&defaultColor))->Color::Color(); rngResult = Random(); - speedRoll = (double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]; + speedRoll = (double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]; variant = 0x23; color = extraout_EAX; goto LAB_00716adb; @@ -1250,7 +1250,7 @@ switchD_0071688e_default: } ((Color *)(&defaultColor))->Color::Color(); rngResult = Random(); - speedRoll = (double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]; + speedRoll = (double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]; color = extraout_EAX_00; } variant = 0x3a; @@ -1276,13 +1276,13 @@ void GridEntity_Poop::destroy_effects() float local_8; Manager *manager; - local_8 = (float)(__security_cookie ^ (uint)((&splatColor)[1]._tint + 1)); + local_8 = (float)(__security_cookie ^ GHIDRA_UINT(((&splatColor)[1]._tint + 1))); ((PersistentGameData *)(&g_manager->_persistentGameData))->PersistentGameData::IncreaseEventCounter(5,1); manager = g_manager; if (in_EDX == 0xc) { local_64 = 1.91978e-43; seed_fart_sound_override((int *)&local_64); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_64,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_64),1.0,2,0,1.0,0.0); ((Color *)(&particleColor))->Color::Color(); Game::SpawnParticles(g_game,in_ECX,4,3,4.0,color,100000.0,0x30001); return; @@ -1341,8 +1341,8 @@ void GridEntity_Poop::destroy_effects() if (in_EDX != 0xe) { if (in_EDX - 7U < 4) { scaleY = g_vectorOne.y * 2.0; - extraout_EDX[0x39] = (int)(g_vectorOne.x * 2.0); - extraout_EDX[0x3a] = (int)scaleY; + extraout_EDX[0x39] = GHIDRA_INT((g_vectorOne.x * 2.0)); + extraout_EDX[0x3a] = GHIDRA_INT(scaleY); } return; } @@ -1380,9 +1380,9 @@ GridEntity_Poop * GridEntity_Poop::get_giga_part(int variant, byte isCreate) uVar3 = Room::GetGridIndexByTile (this_00,(*(int *)(&DAT_00b690f0 + uVar5 * 8) - *(int *)(&DAT_00b690f0 + uVar3 * 8)) + - (uint)this->_gridIndex % (uint)this_00->_gridWidth, + GHIDRA_UINT(this->_gridIndex) % GHIDRA_UINT(this_00->_gridWidth), (*(int *)(&DAT_00b690f4 + uVar5 * 8) - *(int *)(&DAT_00b690f4 + uVar3 * 8)) + - (uint)this->_gridIndex / (uint)this_00->_gridWidth); + GHIDRA_UINT(this->_gridIndex) / GHIDRA_UINT(this_00->_gridWidth)); if (uVar3 < 0x1c0) { pGVar4 = this_00->_gridEntities[uVar3]; if (((pGVar4 != (GridEntity_Poop *)0x0) && ((pGVar4->_desc)._type == 0xe)) && @@ -1399,7 +1399,7 @@ GridEntity_Poop * GridEntity_Poop::get_giga_part(int variant, byte isCreate) ((Room *)(this_00))->Room::RemoveGridEntity(uVar3,0,1); } uVar5 = Random(); - if (((int)uVar3 < 0) || (0x1bf < (int)uVar3)) { + if ((GHIDRA_INT(uVar3) < 0) || (0x1bf < GHIDRA_INT(uVar3))) { KAGE_LogMessage(0x10,(byte *)"SpawnGridEntity: Grid index invalid\n"); } if ((uVar3 < 0x1c0) && (this_00->_gridPaths[uVar3] < 0x385)) { @@ -1419,10 +1419,10 @@ GridEntity_Poop * GridEntity_Poop::get_giga_part(int variant, byte isCreate) newPoop[1]._gridIndex = 0; newPoop[1]._spawnFrame = 0; newPoop[1]._rng._seed = 0; - newPoop[1]._rng._shift1 = (int)g_vectorZero.x; - newPoop[1]._rng._shift2 = (int)g_vectorZero.y; - newPoop[1]._rng._shift3 = (int)g_vectorZero.x; - newPoop[1]._collisionClass = (int)g_vectorZero.y; + newPoop[1]._rng._shift1 = GHIDRA_INT(g_vectorZero.x); + newPoop[1]._rng._shift2 = GHIDRA_INT(g_vectorZero.y); + newPoop[1]._rng._shift3 = GHIDRA_INT(g_vectorZero.x); + newPoop[1]._collisionClass = GHIDRA_INT(g_vectorZero.y); pGVar1 = newPoop + 1; (pGVar1->_sprite)._filename._buf[0] = '\0'; (pGVar1->_sprite)._filename._buf[1] = '\0'; @@ -1469,7 +1469,7 @@ void GridEntity_Poop::guard_check_icall() GridEntity_Poop *gigaParts [3]; GridEntity_Poop *local_8; - local_8 = (GridEntity_Poop *)(__security_cookie ^ (uint)(gigaParts + 4)); + local_8 = (GridEntity_Poop *)(__security_cookie ^ GHIDRA_UINT((gigaParts + 4))); if ((this->_desc)._variant == 7) { part = get_giga_part(this,8,1); gigaParts[0] = part; diff --git a/src/game/grid_entity_pressure_plate.cpp b/src/game/grid_entity_pressure_plate.cpp index 60a8fa4..f208a12 100644 --- a/src/game/grid_entity_pressure_plate.cpp +++ b/src/game/grid_entity_pressure_plate.cpp @@ -57,14 +57,14 @@ void GridEntity_PressurePlate::update_press() local_18.x = (float)(this->_gridIndex % iVar4) * 40.0 + 40.0; local_18.y = (float)(this->_gridIndex / iVar4) * 40.0 + 120.0; EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),&nearbyEntities,&local_18,60.0,0x28); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&nearbyEntities,&local_18,60.0,0x28); local_8 = 0; local_18.y = 0.0; if ((float)nearbyEntities._size != 0.0) { pressRadiusSq = 900.0; gridOriginY = 120.0; do { - presser = *(Entity_Player **)((char *)nearbyEntities._data + (int)local_18.y * 4); + presser = *(Entity_Player **)((char *)nearbyEntities._data + GHIDRA_INT(local_18.y) * 4); iVar4 = presser->_type; if (((iVar4 == 1) && (presser->_isCoopGhost != 0)) || ((presser->_dead == 0 && @@ -87,8 +87,8 @@ void GridEntity_PressurePlate::update_press() goto LAB_00983570; } } - local_18.y = (float)((int)local_18.y + 1); - } while ((uint)local_18.y < (uint)nearbyEntities._size); + local_18.y = (float)(GHIDRA_INT(local_18.y) + 1); + } while (GHIDRA_UINT(local_18.y) < GHIDRA_UINT(nearbyEntities._size)); } goto LAB_00983648; while( true ) { @@ -103,7 +103,7 @@ LAB_00983570: bVar6 = bVar1 < (byte)*pcVar5; if (bVar1 != *pcVar5) { LAB_00983590: - uVar3 = -(uint)bVar6 | 1; + uVar3 = -GHIDRA_UINT(bVar6) | 1; goto LAB_00983595; } if (bVar1 == 0) break; @@ -114,7 +114,7 @@ LAB_00983595: LAB_00983599: local_18.y = 6.57209e-43; seed_fart_sound_override((int *)&local_18.y); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_18.y,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_18.y),1.0,2,0,1.0,0.0); } pbVar2 = (this->_sprite)._animState._animData; if (pbVar2 != (byte *)0x0) { @@ -128,7 +128,7 @@ LAB_00983599: bVar6 = bVar1 < (byte)*pcVar5; if (bVar1 != *pcVar5) { LAB_00983610: - uVar3 = -(uint)bVar6 | 1; + uVar3 = -GHIDRA_UINT(bVar6) | 1; goto LAB_00983615; } if (bVar1 == 0) break; @@ -172,7 +172,7 @@ LAB_009836b8: bVar6 = bVar1 < *offNameCursor; if (bVar1 != *offNameCursor) { LAB_009836a2: - uVar3 = -(uint)bVar6 | 1; + uVar3 = -GHIDRA_UINT(bVar6) | 1; goto LAB_009836a7; } if (bVar1 == 0) break; @@ -206,20 +206,20 @@ LAB_009836a7: } } LAB_00983750: - if (nearbyEntities._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(nearbyEntities) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (nearbyEntities._data != (void *)0x0) { uVar3 = *(uint *)((char *)nearbyEntities._data + -4); oldAllocated = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar3; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar3; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)oldAllocated < uVar3); - free((void *)((int)nearbyEntities._data + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocated) < uVar3)); + free((void *)(GHIDRA_INT(nearbyEntities._data) + -4)); } } ExceptionList = local_10; @@ -314,7 +314,7 @@ void GridEntity_PressurePlate::play_pending_animation() isLess = ch < *targetName; if (ch != *targetName) { LAB_00983903: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_00983908; } if (ch == 0) break; @@ -340,7 +340,7 @@ LAB_00983908: isLess = ch < (byte)*offRedStart; if (ch != *offRedStart) { LAB_00983953: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_00983958; } if (ch == 0) break; @@ -399,17 +399,17 @@ void GridEntity_PressurePlate::update_greed_button() local_7c = 0; bVar2 = *(byte *)(*(int *)((char *)g_game->_room + 4) + 0x44) & 1; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> 2 + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar6 = (playerManager->_playerList)._end; - if ((int)pvVar6 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar6) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar6 = (playerManager->_playerList)._end; game = g_game; } playerSlot = (playerManager->_playerList)._begin; - if (local_7c < (uint)((int)pvVar6 - (int)playerSlot >> 2)) { + if (local_7c < GHIDRA_UINT((GHIDRA_INT(pvVar6) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + local_7c; } player = (Entity_Player *)*playerSlot; @@ -452,8 +452,8 @@ void GridEntity_PressurePlate::update_greed_button() playerManager = &game->_playerManager; local_7c = local_7c + 1; } while (local_7c < - (uint)((int)(game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } iVar5 = (this->_desc)._state; if ((iVar5 == 0) && (isLess)) { @@ -477,7 +477,7 @@ LAB_00983c89: isLess = bVar3 < (byte)*switchedAnimChar; if (bVar3 != *switchedAnimChar) { LAB_00983c80: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00983c85; } if (bVar3 == 0) break; @@ -502,16 +502,16 @@ LAB_00983c85: ((Room *)(game->_room))->Room::SpawnGreedModeWave(0); uVar4 = 0; playerManager = &g_game->_playerManager; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar6 = (playerManager->_playerList)._end; - if ((int)pvVar6 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar6) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar6 = (playerManager->_playerList)._end; } playerSlot = (playerManager->_playerList)._begin; - if (uVar4 < (uint)((int)pvVar6 - (int)playerSlot >> 2)) { + if (uVar4 < GHIDRA_UINT((GHIDRA_INT(pvVar6) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + uVar4; } player = (Entity_Player *)*playerSlot; @@ -533,8 +533,8 @@ LAB_00983c85: flashColor._tint[3] = 1.0; player->SetColor(&flashColor,0xffffffff,0xff,0,1); pvVar6 = (g_manager->_itemConfig)._collectibles._begin; - if ((0x4ac < (int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar6 & - 0xfffffffcU)) && (iVar5 = *(int *)((char *)pvVar6 + 0x4ac), iVar5 != 0) + if ((0x4ac < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar6) & + 0xfffffffcU))) && (iVar5 = *(int *)((char *)pvVar6 + 0x4ac), iVar5 != 0) ) { effectEntry[2] = *(undefined4 *)(iVar5 + 0x78); effectEntry[1] = 0; @@ -545,8 +545,8 @@ LAB_00983c85: } uVar4 = uVar4 + 1; playerManager = &g_game->_playerManager; - } while (uVar4 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar4 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } else { @@ -563,7 +563,7 @@ LAB_00983ea2: waveTimerNow = *(int *)((char *)game->_room + 0x723c); _isWaveActive = CONCAT31(uStack_77,0 < waveTimerNow); if (iVar5 == 3) { - if (((!bVar1) || ((game->_difficulty == 3) + 0xb <= (uint)game->_greedModeWave)) || + if (((!bVar1) || ((game->_difficulty == 3) + 0xb <= GHIDRA_UINT(game->_greedModeWave))) || ((waveTimerNow < 1 && (bVar2 == 0)))) goto LAB_00983f0b; (this->_desc)._state = 0; } @@ -636,7 +636,7 @@ void GridEntity_PressurePlate::Reward() int targetRoomType; manager = g_manager; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b0ce51; local_1c = ExceptionList; @@ -646,7 +646,7 @@ void GridEntity_PressurePlate::Reward() if (9 < uVar8) { if (uVar8 < 0xe) { ExceptionList = &local_1c; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); ((Room *)(g_game->_room))->Room::TriggerOutput(uVar8 - 10); ExceptionList = local_1c; return; @@ -663,7 +663,7 @@ void GridEntity_PressurePlate::Reward() return; } ExceptionList = &local_1c; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); tmpPos = ((GridEntity *)((GridEntity *)door))->GridEntity::Position(&local_68); player = Game::GetNearestPlayerEx(tmpPos,1,0,0); if (player == (Entity_Player *)0x0) { @@ -694,7 +694,7 @@ void GridEntity_PressurePlate::Reward() rng._shift3 = 7; if (uVar8 == 0) { ExceptionList = &local_1c; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar1 = (code *)swi(3); (*pcVar1)(); @@ -707,9 +707,9 @@ void GridEntity_PressurePlate::Reward() if ((rng._seed & 1U) == 0) { local_30 = (void *)0x10c; ExceptionList = &local_1c; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); seed_fart_sound_override((int *)&local_30); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_30,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_30),1.0,2,0,1.0,0.0); targetRoomType = g_game->_room->_gridWidth; local_58.x = (float)(door->_gridIndex % targetRoomType) * 40.0 + 40.0; local_58.y = (float)(door->_gridIndex / targetRoomType) * 40.0 + 120.0; @@ -720,10 +720,10 @@ void GridEntity_PressurePlate::Reward() (*pcVar1)(); return; } - uVar8 = (uint)local_38 >> ((byte)rng._shift1 & 0x1f) ^ (uint)local_38; + uVar8 = GHIDRA_UINT(local_38) >> ((byte)rng._shift1 & 0x1f) ^ GHIDRA_UINT(local_38); uVar8 = uVar8 << ((byte)rng._shift2 & 0x1f) ^ uVar8; rng._seed = uVar8 >> ((byte)local_2c & 0x1f) ^ uVar8; - uVar8 = (uint)rng._seed % 100; + uVar8 = GHIDRA_UINT(rng._seed) % 100; if (uVar8 < 5) { isTrapDoorAllowed = ((Level *)((Level *)g_game))->Level::CanSpawnTrapDoor(); if (isTrapDoorAllowed != 0) { @@ -741,7 +741,7 @@ void GridEntity_PressurePlate::Reward() local_30 = pvVar6; local_38 = (void *)((RNG *)(&rng))->RNG::Next(); uVar8 = ((Room *)(g_game->_room))->Room::GetGridIndex(&local_4c); - if (((int)uVar8 < 0) || (0x1bf < (int)uVar8)) { + if ((GHIDRA_INT(uVar8) < 0) || (0x1bf < GHIDRA_INT(uVar8))) { KAGE_LogMessage(0x10,(byte *)"SpawnGridEntity: Grid index invalid\n"); } if (0x1bf < uVar8) { @@ -770,11 +770,11 @@ void GridEntity_PressurePlate::Reward() poop[1]._spawnFrame = 0; poop[1]._rng._seed = 0; fVar5 = g_vectorZero.y; - poop[1]._rng._shift1 = (int)g_vectorZero.x; - poop[1]._rng._shift2 = (int)fVar5; + poop[1]._rng._shift1 = GHIDRA_INT(g_vectorZero.x); + poop[1]._rng._shift2 = GHIDRA_INT(fVar5); fVar5 = g_vectorZero.y; - poop[1]._rng._shift3 = (int)g_vectorZero.x; - poop[1]._collisionClass = (int)fVar5; + poop[1]._rng._shift3 = GHIDRA_INT(g_vectorZero.x); + poop[1]._collisionClass = GHIDRA_INT(fVar5); pGVar2 = poop + 1; (pGVar2->_sprite)._filename._buf[0] = '\0'; (pGVar2->_sprite)._filename._buf[1] = '\0'; @@ -810,7 +810,7 @@ void GridEntity_PressurePlate::Reward() if (uVar8 < 0x1e) { uVar8 = ((RNG *)(&rng))->RNG::RandomInt(3); local_30 = (void *)(uVar8 + 1); - if ((int)local_30 < 1) { + if (GHIDRA_INT(local_30) < 1) { ExceptionList = local_1c; return; } @@ -823,7 +823,7 @@ void GridEntity_PressurePlate::Reward() local_4c.y = tmpPos->y; uVar8 = ((RNG *)(&rng))->RNG::Next(); ((Game *)(g_game))->Game::Spawn(5,0x14,&local_4c,&g_vectorZero,(Entity *)0x0,0,uVar8); - local_30 = (void *)((int)local_30 + -1); + local_30 = (void *)(GHIDRA_INT(local_30) + -1); } while (local_30 != (void *)0x0); ExceptionList = local_1c; return; @@ -831,7 +831,7 @@ void GridEntity_PressurePlate::Reward() if (uVar8 < 0x32) { uVar8 = ((RNG *)(&rng))->RNG::RandomInt(2); local_30 = (void *)(uVar8 + 1); - if ((int)local_30 < 1) { + if (GHIDRA_INT(local_30) < 1) { ExceptionList = local_1c; return; } @@ -844,7 +844,7 @@ void GridEntity_PressurePlate::Reward() local_4c.y = tmpPos->y; uVar8 = ((RNG *)(&rng))->RNG::Next(); ((Game *)(g_game))->Game::Spawn(5,10,&local_4c,&g_vectorZero,(Entity *)0x0,0,uVar8); - local_30 = (void *)((int)local_30 + -1); + local_30 = (void *)(GHIDRA_INT(local_30) + -1); } while (local_30 != (void *)0x0); ExceptionList = local_1c; return; @@ -852,7 +852,7 @@ void GridEntity_PressurePlate::Reward() if (uVar8 < 0x46) { uVar8 = ((RNG *)(&rng))->RNG::RandomInt(2); local_30 = (void *)(uVar8 + 1); - if ((int)local_30 < 1) { + if (GHIDRA_INT(local_30) < 1) { ExceptionList = local_1c; return; } @@ -865,7 +865,7 @@ void GridEntity_PressurePlate::Reward() local_4c.y = tmpPos->y; uVar8 = ((RNG *)(&rng))->RNG::Next(); ((Game *)(g_game))->Game::Spawn(5,0x28,&local_4c,&g_vectorZero,(Entity *)0x0,0,uVar8); - local_30 = (void *)((int)local_30 + -1); + local_30 = (void *)(GHIDRA_INT(local_30) + -1); } while (local_30 != (void *)0x0); ExceptionList = local_1c; return; @@ -964,7 +964,7 @@ LAB_00984de5: LAB_00984e83: uVar8 = ((RNG *)(&rng))->RNG::Next(); rngValue = ((RNG *)(&rng))->RNG::RandomInt(2); - ((Game *)(g_game))->Game::Spawn(6,(-(uint)(rngValue != 0) & 2) + 1,&local_4c,&g_vectorZero,(Entity *)0x0,0, + ((Game *)(g_game))->Game::Spawn(6,(-GHIDRA_UINT((rngValue != 0)) & 2) + 1,&local_4c,&g_vectorZero,(Entity *)0x0,0, uVar8); ExceptionList = local_1c; return; @@ -973,7 +973,7 @@ LAB_00984e83: local_30 = pvVar6; local_38 = (void *)((RNG *)(&rng))->RNG::Next(); uVar8 = ((Room *)(g_game->_room))->Room::GetGridIndex(&local_4c); - if (((int)uVar8 < 0) || (0x1bf < (int)uVar8)) { + if ((GHIDRA_INT(uVar8) < 0) || (0x1bf < GHIDRA_INT(uVar8))) { KAGE_LogMessage(0x10,(byte *)"SpawnGridEntity: Grid index invalid\n"); } if (0x1bf < uVar8) { @@ -1002,11 +1002,11 @@ LAB_00984e83: poop[1]._spawnFrame = 0; poop[1]._rng._seed = 0; fVar5 = g_vectorZero.y; - poop[1]._rng._shift1 = (int)g_vectorZero.x; - poop[1]._rng._shift2 = (int)fVar5; + poop[1]._rng._shift1 = GHIDRA_INT(g_vectorZero.x); + poop[1]._rng._shift2 = GHIDRA_INT(fVar5); fVar5 = g_vectorZero.y; - poop[1]._rng._shift3 = (int)g_vectorZero.x; - poop[1]._collisionClass = (int)fVar5; + poop[1]._rng._shift3 = GHIDRA_INT(g_vectorZero.x); + poop[1]._collisionClass = GHIDRA_INT(fVar5); pGVar2 = poop + 1; (pGVar2->_sprite)._filename._buf[0] = '\0'; (pGVar2->_sprite)._filename._buf[1] = '\0'; @@ -1033,21 +1033,21 @@ LAB_00984e83: (poop->_desc)._variant = 3; LAB_009848ac: (poop->_desc)._varData = 0; - ((GridEntity *)(poop))->GridEntity::Init((uint)local_38); + ((GridEntity *)(poop))->GridEntity::Init(GHIDRA_UINT(local_38)); ExceptionList = local_1c; return; } ExceptionList = &local_1c; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); if ((door->_desc)._state != 4) { local_30 = (void *)0x10b; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); seed_fart_sound_override((int *)&local_30); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_30,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_30),1.0,2,0,1.0,0.0); } fVar5 = (float)(*(int *)((char *)g_game->_room + 0x12c0) + *(int *)((char *)g_game->_room + 0x12c4)); local_4c.y = 0.0; - if (0 < (int)fVar5) { + if (0 < GHIDRA_INT(fVar5)) { local_4c.y = fVar5; } local_24 = 0; @@ -1426,12 +1426,12 @@ switchD_0098532f_default: spawnPositionsEnd = (float *)0x0; spawnPositionsCapacity = (float *)0x0; local_14 = 0x2e; - pvVar6 = (void *)((int)g_game->_room + 0x724); + pvVar6 = (void *)(GHIDRA_INT(g_game->_room) + 0x724); local_2c = (float *)0x0; positionsCapacity = (float *)0x0; local_30 = pvVar6; do { - targetRoomType = *(int *)((char *)pvVar6 + (int)local_2c * 4); + targetRoomType = *(int *)((char *)pvVar6 + GHIDRA_INT(local_2c) * 4); if (targetRoomType != 0) { targetRoomType = *(int *)(targetRoomType + 0x24); iVar7 = *(int *)((char *)g_game->_room + 0xc); @@ -1444,7 +1444,7 @@ switchD_0098532f_default: fVar9 = (float)local_38 - (player->_pos).x; pvVar6 = local_30; if (6400.0 < fVar5 * fVar5 + fVar9 * fVar9) { - targetRoomType = *(int *)(*(int *)((char *)local_30 + (int)local_2c * 4) + 0x24); + targetRoomType = *(int *)(*(int *)((char *)local_30 + GHIDRA_INT(local_2c) * 4) + 0x24); iVar7 = *(int *)((char *)g_game->_room + 0xc); local_60.x = (float)(targetRoomType % iVar7) * 40.0 + 40.0; local_60.y = (float)(targetRoomType / iVar7) * 40.0 + 120.0; @@ -1462,7 +1462,7 @@ switchD_0098532f_default: } } uVar8 = local_24; - local_2c = (float *)((int)local_2c + 1); + local_2c = (float *)(GHIDRA_INT(local_2c) + 1); } while (local_2c < 8); local_2c = positionsCapacity; if (spawnPositions == positionsEnd) { @@ -1482,9 +1482,9 @@ switchD_0098532f_default: } ((RNG *)(&rng))->RNG::Next(); local_24 = rng._seed & 3; - local_44.y = (float)((int)local_3c + local_24); + local_44.y = (float)(GHIDRA_INT(local_3c) + local_24); local_30 = (void *)rng._seed; - if ((int)local_24 < (int)local_44.y) { + if (GHIDRA_INT(local_24) < GHIDRA_INT(local_44.y)) { do { if (local_30 == (void *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -1492,31 +1492,31 @@ switchD_0098532f_default: (*pcVar1)(); return; } - rngValue = (uint)local_30 >> ((byte)rng._shift1 & 0x1f) ^ (uint)local_30; + rngValue = GHIDRA_UINT(local_30) >> ((byte)rng._shift1 & 0x1f) ^ GHIDRA_UINT(local_30); rngValue = rngValue << ((byte)rng._shift2 & 0x1f) ^ rngValue; local_30 = (void *)(rngValue >> ((byte)rng._shift3 & 0x1f) ^ rngValue); tmpPos = Room::FindFreePickupSpawnPosition (g_game->_room,&local_68, (Vector *) (spawnPositions + - (local_24 % (uint)((int)positionsEnd - (int)spawnPositions >> 3)) * 2),0.0 + (local_24 % GHIDRA_UINT((GHIDRA_INT(positionsEnd) - GHIDRA_INT(spawnPositions) >> 3))) * 2),0.0 ,0,0,0); rngValue = Random(); - local_34 = (float)((double)(int)rngValue + __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + local_34 = (float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_34 = local_34 + local_34; rngValue = Random(); - local_38 = (void *)((float)((double)(int)rngValue + - __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * 2.3283064e-10); + local_38 = (void *)((float)((double)GHIDRA_INT(rngValue) + + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10); fVar5 = sin(local_34); local_3c = fVar5 * (float)local_38 * 20.0 + tmpPos->y; fVar5 = cos(local_34); local_60.x = fVar5 * (float)local_38 * 20.0 + tmpPos->x; local_60.y = local_3c; - ((Game *)(g_game))->Game::Spawn(uVar8,enemyVariant,&local_60,&g_vectorZero,(Entity *)0x0,0,(uint)local_30); + ((Game *)(g_game))->Game::Spawn(uVar8,enemyVariant,&local_60,&g_vectorZero,(Entity *)0x0,0,GHIDRA_UINT(local_30)); local_24 = local_24 + 1; positionsEnd = spawnPositionsEnd; - } while ((int)local_24 < (int)local_44.y); + } while (GHIDRA_INT(local_24) < GHIDRA_INT(local_44.y)); } pvVar6 = g_game->_room; iVar7 = *(int *)((char *)pvVar6 + 0x12c4) + *(int *)((char *)pvVar6 + 0x12c0); @@ -1524,14 +1524,14 @@ switchD_0098532f_default: if (0 < iVar7) { targetRoomType = iVar7; } - if ((int)local_4c.y < targetRoomType) { + if (GHIDRA_INT(local_4c.y) < targetRoomType) { local_30 = (void *)0x0; targetRoomType = 0x724; game = g_game; do { - local_30 = (void *)((int)local_30 + 1); + local_30 = (void *)(GHIDRA_INT(local_30) + 1); if (local_30 < (void *)0x9) { - door = *(GridEntity_Door **)(targetRoomType + (int)game->_room); + door = *(GridEntity_Door **)(targetRoomType + GHIDRA_INT(game->_room)); if ((door != (GridEntity_Door *)0x0) && ((door->_desc)._state != 1)) { (door->_desc)._state = 1; ((GridEntity_Door *)(door))->GridEntity_Door::UpdateAnimation(); @@ -1556,13 +1556,13 @@ switchD_0098532f_default: pvVar6 = game->_room; } if ((*(byte *)(*(int *)((char *)pvVar6 + 4) + 0x44) & 1) == 0) { - ((GridEntityDesc *)((int)local_58.y + 4))->_state = 4; + ((GridEntityDesc *)(GHIDRA_INT(local_58.y) + 4))->_state = 4; } if (spawnPositions == (float *)0x0) { ExceptionList = local_1c; return; } - deallocate(spawnPositions,(int)local_2c - (int)spawnPositions >> 3); + deallocate(spawnPositions,GHIDRA_INT(local_2c) - GHIDRA_INT(spawnPositions) >> 3); ExceptionList = local_1c; return; } @@ -1595,7 +1595,7 @@ void GridEntity_PressurePlate::BeginBatches() local_8 = 0xffffffff; puStack_c = &LAB_00b0cee5; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&gfxPath)[1]._size; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&gfxPath)[1]._size); ExceptionList = &local_10; gfxPath._size = 0; gfxPath._capacity = 0xf; @@ -1603,21 +1603,21 @@ void GridEntity_PressurePlate::BeginBatches() gfxPath._buf[1] = '\0'; gfxPath._buf[2] = '\0'; gfxPath._buf[3] = '\0'; - gfxPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) = std::_Allocate(0x30); gfxPath._size = 0x20; gfxPath._capacity = 0x2f; - builtin_strncpy((char *)gfxPath._buf._0_4_,"gfx/grid/grid_pressureplate.anm2",0x21); + builtin_strncpy((*(undefined4 *)((char *)&((char *)gfxPath._buf) + 0x0)),"gfx/grid/grid_pressureplate.anm2",0x21); local_8 = 0; ((ANM2 *)(&this->_sprite))->ANM2::Load(&gfxPath,0); local_8 = 0xffffffff; bVar1 = extraout_CL; if (0xf < gfxPath._capacity) { uVar3 = gfxPath._capacity + 1; - freeBlock = (char *)gfxPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)gfxPath._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(gfxPath._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) + -4); uVar3 = gfxPath._capacity + 0x24; - if ((char *)0x1f < (char *)(gfxPath._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1629,21 +1629,21 @@ void GridEntity_PressurePlate::BeginBatches() this->_nextGreedAnimation = &s_empty; switch(iVar2) { case 0: - gfxPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) = std::_Allocate(0x30); gfxPath._size = 0x26; gfxPath._capacity = 0x2f; - builtin_strncpy((char *)gfxPath._buf._0_4_,"gfx/grid/grid_pressureplate_silver.png",0x27); + builtin_strncpy((*(undefined4 *)((char *)&((char *)gfxPath._buf) + 0x0)),"gfx/grid/grid_pressureplate_silver.png",0x27); local_8 = 1; ((Sprite *)((Sprite *)&this->_sprite))->Sprite::ReplaceSpritesheet(0,&gfxPath); local_8 = 0xffffffff; bVar1 = extraout_CL_01; if (0xf < gfxPath._capacity) { uVar3 = gfxPath._capacity + 1; - freeBlock = (char *)gfxPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)gfxPath._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(gfxPath._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) + -4); uVar3 = gfxPath._capacity + 0x24; - if ((char *)0x1f < (char *)(gfxPath._buf._0_4_ + (-4 - (int)freeBlock))) goto LAB_0098631e; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) goto LAB_0098631e; } operator_delete(freeBlock,uVar3); bVar1 = extraout_CL_02; @@ -1659,20 +1659,20 @@ void GridEntity_PressurePlate::BeginBatches() gfxPath._buf[1] = '\0'; gfxPath._buf[2] = '\0'; gfxPath._buf[3] = '\0'; - gfxPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) = std::_Allocate(0x20); gfxPath._size = 0x18; gfxPath._capacity = 0x1f; - builtin_strncpy((char *)gfxPath._buf._0_4_,"gfx/grid/TimerPlate.anm2",0x19); + builtin_strncpy((*(undefined4 *)((char *)&((char *)gfxPath._buf) + 0x0)),"gfx/grid/TimerPlate.anm2",0x19); local_8 = 2; ((ANM2 *)(&this->_timerPlate))->ANM2::Load(&gfxPath,1); local_8 = 0xffffffff; if (0xf < gfxPath._capacity) { uVar3 = gfxPath._capacity + 1; - freeBlock = (char *)gfxPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)gfxPath._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(gfxPath._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) + -4); uVar3 = gfxPath._capacity + 0x24; - if ((char *)0x1f < (char *)(gfxPath._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1683,13 +1683,13 @@ void GridEntity_PressurePlate::BeginBatches() bVar1 = extraout_CL_03; break; case 3: - gfxPath._buf._0_4_ = std::_Allocate(0x20); - builtin_strncpy((char *)gfxPath._buf._0_4_,"gfx/grid/grid_button_rail.png",0x1e); + (*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) = std::_Allocate(0x20); + builtin_strncpy((*(undefined4 *)((char *)&((char *)gfxPath._buf) + 0x0)),"gfx/grid/grid_button_rail.png",0x1e); local_8 = 3; goto LAB_009861b7; case 9: - gfxPath._buf._0_4_ = std::_Allocate(0x20); - builtin_strncpy((char *)gfxPath._buf._0_4_,"gfx/grid/grid_button_kill.png",0x1e); + (*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) = std::_Allocate(0x20); + builtin_strncpy((*(undefined4 *)((char *)&((char *)gfxPath._buf) + 0x0)),"gfx/grid/grid_button_kill.png",0x1e); local_8 = 4; LAB_009861b7: gfxPath._capacity = 0x1f; @@ -1699,10 +1699,10 @@ LAB_009861b7: bVar1 = extraout_CL_04; if (0xf < gfxPath._capacity) { uVar3 = gfxPath._capacity + 1; - freeBlock = (char *)gfxPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)gfxPath._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(gfxPath._buf._0_4_ + -4); - iVar2 = gfxPath._buf._0_4_ - (int)freeBlock; + freeBlock = *(char **)((*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) + -4); + iVar2 = (*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) - GHIDRA_INT(freeBlock); joined_r0x00986318: uVar3 = gfxPath._capacity + 0x24; if (0x1f < iVar2 - 4U) { @@ -1722,20 +1722,20 @@ LAB_009861f6: case 0xb: case 0xc: case 0xd: - gfxPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) = std::_Allocate(0x20); gfxPath._size = 0x1f; gfxPath._capacity = 0x1f; - builtin_strncpy((char *)gfxPath._buf._0_4_,"gfx/grid/grid_button_output.png",0x20); + builtin_strncpy((*(undefined4 *)((char *)&((char *)gfxPath._buf) + 0x0)),"gfx/grid/grid_button_output.png",0x20); local_8 = 5; ((Sprite *)((Sprite *)&this->_sprite))->Sprite::ReplaceSpritesheet(0,&gfxPath); local_8 = 0xffffffff; bVar1 = extraout_CL_06; if (gfxPath._capacity < 0x10) break; uVar3 = gfxPath._capacity + 1; - freeBlock = (char *)gfxPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)gfxPath._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(gfxPath._buf._0_4_ + -4); - iVar2 = gfxPath._buf._0_4_ - (int)freeBlock; + freeBlock = *(char **)((*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) + -4); + iVar2 = (*(undefined4 *)((char *)&(gfxPath._buf) + 0x0)) - GHIDRA_INT(freeBlock); goto joined_r0x00986318; } goto LAB_009861f6; @@ -1763,7 +1763,7 @@ LAB_009861f6: isLess = bVar1 < *expectedAnimName; if (bVar1 != *expectedAnimName) { LAB_00986374: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_00986379; } if (bVar1 == 0) break; diff --git a/src/game/grid_entity_rock.cpp b/src/game/grid_entity_rock.cpp index ee09190..40d9180 100644 --- a/src/game/grid_entity_rock.cpp +++ b/src/game/grid_entity_rock.cpp @@ -91,7 +91,7 @@ void GridEntity_Rock::Update() local_8 = -NAN; puStack_c = &LAB_00afcb3d; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(&local_40)[1]._colorize; + uVar2 = __security_cookie ^ GHIDRA_UINT((&local_40)[1]._colorize); ExceptionList = &local_10; iVar4 = (this->_desc)._type; game = g_game; @@ -123,15 +123,15 @@ LAB_0071905d: } local_50[1] = (Entity_Player *)(iVar4 % iVar6); local_50[3] = (Entity_Player *)0x0; - if ((int)local_50[1] < 0xb) { + if (GHIDRA_INT(local_50[1]) < 0xb) { if (local_50[1] == (Entity_Player *)0x0) { local_50[3] = (Entity_Player *)0x3f6; seed_fart_sound_override((int *)(local_50 + 3)); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_50[3],1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_50[3]),1.0,2,0,1.0,0.0); } - uVar2 = (int)((int)local_50[1] - 5U) >> 0x1f; + uVar2 = GHIDRA_INT((GHIDRA_INT(local_50[1]) - 5U)) >> 0x1f; local_50[2] = (Entity_Player *) - (1.0 - (float)(int)(((int)local_50[1] - 5U ^ uVar2) - uVar2) / 5.0); + (1.0 - (float)GHIDRA_INT(((GHIDRA_INT(local_50[1]) - 5U ^ uVar2) - uVar2)) / 5.0); local_50[3] = local_50[2]; } } @@ -139,7 +139,7 @@ LAB_007191ab: game = g_game; collectibleEffect = TemporaryEffects::GetCollectibleEffect - ((TemporaryEffects *)((int)g_game->_room + 0x7310),0x11f); + ((TemporaryEffects *)(GHIDRA_INT(g_game->_room) + 0x7310),0x11f); if (collectibleEffect == (void *)0x0) { pEVar3 = local_50[3]; } @@ -168,8 +168,8 @@ LAB_007191ab: fStack_7c = 0.0; fStack_78 = 0.0; fStack_74 = 0.0; - local_90._0_4_ = 1.0; - local_90._4_4_ = 1.0; + (*(undefined4 *)((char *)&(local_90) + 0x0)) = 1.0; + (*(undefined4 *)((char *)&(local_90) + 0x4)) = 1.0; fStack_88 = 1.0; fStack_84 = 1.0; local_6c = local_70; @@ -244,8 +244,8 @@ LAB_0071926c: local_50[0] = (Entity_Player *)(rockPos.x + local_40._tint[uVar2 * 2 + 3]); local_50[1] = (Entity_Player *)(rockPos.y + local_40._colorize[uVar2 * 2]); room = game->_room; - iVar6 = (int)(((float)local_50[0] - 40.0) / 40.0 + 0.5); - iVar4 = (int)(((float)local_50[1] - 120.0) / 40.0 + 0.5); + iVar6 = GHIDRA_INT((((float)local_50[0] - 40.0) / 40.0 + 0.5)); + iVar4 = GHIDRA_INT((((float)local_50[1] - 120.0) / 40.0 + 0.5)); if (((iVar6 < 0) || (room->_gridWidth <= iVar6)) || ((iVar4 < 0 || (room->_gridHeight <= iVar4)))) { iVar6 = -1; @@ -283,7 +283,7 @@ LAB_00719576: update_collision(this); if (((this->_desc)._state == 1) && ((this->_desc)._type == 0x19)) { roomDesc = ((Level *)((Level *)game))->Level::GetRoomByIdx(game->_currentRoomIdx,game->_currentDimensionIdx); - if ((((uint)roomDesc->Flags >> 1 & 1) == 0) && + if (((GHIDRA_UINT(roomDesc->Flags) >> 1 & 1) == 0) && (bVar1 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(0x97), bVar1 == 0)) { iVar4 = *(int *)((char *)g_game->_room + 0xc); rockPos.x = (float)(this->_gridIndex % iVar4) * 40.0 + 40.0; @@ -291,13 +291,13 @@ LAB_00719576: local_50[0] = (Entity_Player *)rockPos.x; local_50[1] = (Entity_Player *)rockPos.y; EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218), + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218), (EntityList_EL *)(local_40._colorize + 3),&rockPos,80.0,0xffffffff); local_8 = 0.0; local_50[2] = (Entity_Player *)0x0; if (local_40._offset[2] != 0.0) { do { - ent = *(Entity **)((int)local_40._offset[0] + (int)local_50[2] * 4); + ent = *(Entity **)(GHIDRA_INT(local_40._offset[0]) + GHIDRA_INT(local_50[2]) * 4); if (ent->_entityCollisionClass != 0) { if ((ent->_type == 1) || (ent->_type == 3)) { fVar9 = 21.0; @@ -307,7 +307,7 @@ LAB_00719576: } uVar2 = 0; collisionPoint = (ent->_collisionPoints)._begin; - uVar8 = (int)(ent->_collisionPoints)._end - (int)collisionPoint >> 3; + uVar8 = GHIDRA_INT((ent->_collisionPoints)._end) - GHIDRA_INT(collisionPoint) >> 3; if (uVar8 != 0) { do { if ((ABS(((ent->_pos).x + *collisionPoint) - (float)local_50[0]) <= fVar9) && @@ -326,10 +326,10 @@ LAB_00719576: } while (uVar2 < uVar8); } } - local_50[2] = (Entity_Player *)((int)local_50[2] + 1); - } while (local_50[2] < (uint)local_40._offset[2]); + local_50[2] = (Entity_Player *)(GHIDRA_INT(local_50[2]) + 1); + } while (local_50[2] < GHIDRA_UINT(local_40._offset[2])); } - if (local_40._colorize[3]._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_40._colorize[3]) + 0x0)) == '\0') { local_8 = 1.4013e-45; tracked_alloc(1,(void *)local_40._offset[0],0); } @@ -396,9 +396,9 @@ void GridEntity_Rock::RenderTop(Vector *pos) roomColor._colorize[1] = *(float *)((char *)pvVar1 + 0x72b8); roomColor._colorize[2] = *(float *)((char *)pvVar1 + 0x72bc); roomColor._colorize[3] = *(float *)((char *)pvVar1 + 0x72c0); - roomColor._offset._0_8_ = *(undefined8 *)((char *)pvVar1 + 0x72c4); + (*(undefined8 *)((char *)&(roomColor._offset) + 0x0)) = *(undefined8 *)((char *)pvVar1 + 0x72c4); roomColor._offset[2] = *(float *)((char *)pvVar1 + 0x72cc); - savedColor._offset._0_8_ = savedOffsetXY; + (*(undefined8 *)((char *)&(savedColor._offset) + 0x0)) = savedOffsetXY; savedColor._offset[2] = savedOffsetZ; local_58 = savedColor._tint[0]; fStack_54 = savedColor._tint[1]; @@ -418,7 +418,7 @@ void GridEntity_Rock::RenderTop(Vector *pos) (this->_sprite)._color._colorize[1] = roomColor._colorize[1]; (this->_sprite)._color._colorize[2] = roomColor._colorize[2]; (this->_sprite)._color._colorize[3] = roomColor._colorize[3]; - *(undefined8 *)(this->_sprite)._color._offset = roomColor._offset._0_8_; + *(undefined8 *)(this->_sprite)._color._offset = (*(undefined8 *)((char *)&(roomColor._offset) + 0x0)); (this->_sprite)._color._offset[2] = roomColor._offset[2]; } topLayer = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer((byte *)0x1); @@ -429,7 +429,7 @@ void GridEntity_Rock::RenderTop(Vector *pos) (layerIndex = *(int *)((char *)pvVar1 + 0x3c), -1 < layerIndex)) { AnimationLayer::RenderFrame ((AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar1 + 0x18)),&drawPos, - *(int *)((int)(this->_sprite)._animState._layerFrames + layerIndex * 4), + *(int *)(GHIDRA_INT((this->_sprite)._animState._layerFrames) + layerIndex * 4), &g_vectorZero,&g_vectorZero,animation); } topLayer = ((ANM2 *)(&this->_sprite))->ANM2::GetLayer((byte *)0x1); @@ -486,7 +486,7 @@ void GridEntity_Rock::BeginBatches() local_8 = 0xffffffff; puStack_c = &LAB_00afcb7d; local_10 = ExceptionList; - stackCookie = __security_cookie ^ (uint)&(&anm2Path)[1]._size; + stackCookie = __security_cookie ^ GHIDRA_UINT(&(&anm2Path)[1]._size); ExceptionList = &local_10; ((std::string *)((this->_anim)._buf))->std::string::assign((byte *)"normal",6); ((std::string *)((this->_rubbleAnim)._buf))->std::string::assign((byte *)"rubble",6); @@ -496,20 +496,20 @@ void GridEntity_Rock::BeginBatches() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x17; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/grid/grid_rock.anm2",0x18); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/grid/grid_rock.anm2",0x18); local_8 = 0; ((ANM2 *)(&this->_sprite))->ANM2::Load(&anm2Path,0); local_8 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar9 = anm2Path._capacity + 1; - pcVar6 = (char *)anm2Path._buf._0_4_; + pcVar6 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar9) { - pcVar6 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar6 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar9 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar6))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar6)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -518,14 +518,14 @@ void GridEntity_Rock::BeginBatches() } anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = anm2Path._buf._0_4_ & 0xffffff00; - iVar8 = (int)g_game->_room + 0x1bc8; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) & 0xffffff00; + iVar8 = GHIDRA_INT(g_game->_room) + 0x1bc8; iVar4 = *(int *)((char *)g_game->_room + 0x1d18) * 0x13c + 0x154 + iVar8; if (g_game->_challenge == 0x2d) { uVar9 = g_game->_dungeonPlacementSeed; uVar10 = (this->_desc)._spawnSeed; rngShift12 = 0x700000002; - local_48._0_1_ = 0x19; + (*(undefined1 *)((char *)&(local_48) + 0x0)) = 0x19; if (uVar10 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar1 = (code *)swi(3); @@ -536,7 +536,7 @@ void GridEntity_Rock::BeginBatches() uVar5 = uVar5 << 7 ^ uVar5; if ((uVar5 >> 0x19 ^ uVar5) % 10 == 0) { rngShift12 = 0x900000005; - local_48._0_1_ = 7; + (*(undefined1 *)((char *)&(local_48) + 0x0)) = 7; uVar9 = uVar10; } if (uVar9 == 0) { @@ -547,7 +547,7 @@ void GridEntity_Rock::BeginBatches() } uVar9 = uVar9 >> (sbyte)rngShift12 ^ uVar9; uVar9 = uVar9 << (sbyte)((ulonglong)rngShift12 >> 0x20) ^ uVar9; - iVar8 = (int)g_game->_room + ((uVar9 >> (sbyte)local_48 ^ uVar9) % 0x3e) * 0x13c + 0x1e58; + iVar8 = GHIDRA_INT(g_game->_room) + ((uVar9 >> (sbyte)local_48 ^ uVar9) % 0x3e) * 0x13c + 0x1e58; if ((iVar8 != 0) && (*(int *)(iVar8 + 0xa0) != 0)) { iVar4 = iVar8; } @@ -559,7 +559,7 @@ void GridEntity_Rock::BeginBatches() ((Sprite *)((Sprite *)&this->_sprite))->Sprite::ReplaceSpritesheet(uVar9,(std_string *)(iVar4 + 0x90)); uVar9 = uVar9 + 1; bVar3 = extraout_CL; - } while (uVar9 < (uint)(this->_sprite)._layerCount); + } while (uVar9 < GHIDRA_UINT((this->_sprite)._layerCount)); } animName = &this->_anim; ((ANM2 *)(&this->_sprite))->ANM2::LoadGraphics(bVar3); @@ -594,7 +594,7 @@ void GridEntity_Rock::BeginBatches() break; case 5: ((std::string *)(animName->_buf))->std::string::assign((byte *)"bombrock",8); - this->_frameCnt = (uint)((this->_desc)._state == 1) * 4 + -1; + this->_frameCnt = GHIDRA_UINT(((this->_desc)._state == 1)) * 4 + -1; goto LAB_0071a3d7; case 6: ((std::string *)(animName->_buf))->std::string::assign(&DAT_00b66e44,3); @@ -604,7 +604,7 @@ void GridEntity_Rock::BeginBatches() break; default: uVar9 = (this->_desc)._variant; - if ((uVar9 < 1000) || ((int)(uVar9 - 1000) < 0)) goto LAB_0071a3d7; + if ((uVar9 < 1000) || (GHIDRA_INT((uVar9 - 1000)) < 0)) goto LAB_0071a3d7; pcVar6 = &DAT_00b69228; uVar9 = 3; break; @@ -706,8 +706,8 @@ LAB_0071a3d7: uVar9 = uVar9 >> 5 ^ uVar9; uVar9 = uVar9 << 9 ^ uVar9; uVar9 = uVar9 >> 7 ^ uVar9; - dVar12 = floor((double)((float)((double)(int)uVar9 + - __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) * + dVar12 = floor((double)((float)((double)GHIDRA_INT(uVar9) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283062e-10 * 16.0)); fVar11 = 8.0 - (float)dVar12; if (uVar9 == 0) { @@ -719,8 +719,8 @@ LAB_0071a3d7: uVar9 = uVar9 >> 5 ^ uVar9; uVar9 = uVar9 << 9 ^ uVar9; uVar9 = uVar9 >> 7 ^ uVar9; - dVar12 = floor((double)((float)((double)(int)uVar9 + - __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) * + dVar12 = floor((double)((float)((double)GHIDRA_INT(uVar9) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283062e-10 * 16.0)); rubbleOffsetSlot = (this->_rubbleOffsets)._end; rubbleOffset.x = 8.0 - (float)dVar12; @@ -732,7 +732,7 @@ LAB_0071a3d7: *rubbleOffsetSlot = rubbleOffset.x; rubbleOffsetSlot[1] = fVar11; rubbleOffsetsEnd = &(this->_rubbleOffsets)._end; - *rubbleOffsetsEnd = (void *)((int)*rubbleOffsetsEnd + 8); + *rubbleOffsetsEnd = (void *)(GHIDRA_INT(*rubbleOffsetsEnd) + 8); } local_4c = local_4c + -1; } while (local_4c != 0); @@ -740,7 +740,7 @@ LAB_0071a3d7: } animName = &this->_anim; uVar9 = (this->_desc)._variant; - if ((uVar9 < 1000) || (local_4c = uVar9 - 1000, (int)(uVar9 - 1000) < 0)) { + if ((uVar9 < 1000) || (local_4c = uVar9 - 1000, GHIDRA_INT((uVar9 - 1000)) < 0)) { local_4c = uVar9; } if (0xf < (this->_anim)._capacity) { @@ -748,7 +748,7 @@ LAB_0071a3d7: } bVar3 = ((ANM2 *)(&this->_sprite))->ANM2::SetAnimation((byte *)animName,1); if (((bVar3 != 0) && ((this->_sprite)._animState._animData != (void *)0x0)) && - (((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)(int)local_4c), + (((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(local_4c)), (this->_sprite)._animState._animData != (void *)0x0)) { (this->_sprite)._animState._isPlaying = 0; } @@ -795,18 +795,18 @@ void GridEntity_Rock::guard_check_icall() int nextColumn; Room *room; - local_8 = (GridEntity_Rock *)(__security_cookie ^ (uint)(neighborRocks + 4)); + local_8 = (GridEntity_Rock *)(__security_cookie ^ GHIDRA_UINT((neighborRocks + 4))); rng._shift1 = 5; rng._shift2 = 9; rng._seed = (this->_desc)._spawnSeed; rng._shift3 = 7; if ((((((this->_desc)._type == 2) && ((this->_desc)._state == 1)) && ((this->_desc)._spawnCount == 1)) && - ((uVar2 = (this->_desc)._variant, uVar2 < 1000 || ((int)(uVar2 - 1000) < 0)))) && + ((uVar2 = (this->_desc)._variant, uVar2 < 1000 || (GHIDRA_INT((uVar2 - 1000)) < 0)))) && (rock = this, uVar2 = ((RNG *)(&rng))->RNG::RandomInt(4), uVar2 != 0)) { currentRoom = g_game->_room; - uVar2 = (uint)this->_gridIndex / (uint)currentRoom->_gridWidth; - uVar3 = (uint)this->_gridIndex % (uint)currentRoom->_gridWidth; + uVar2 = GHIDRA_UINT(this->_gridIndex) / GHIDRA_UINT(currentRoom->_gridWidth); + uVar3 = GHIDRA_UINT(this->_gridIndex) % GHIDRA_UINT(currentRoom->_gridWidth); nextColumn = uVar3 + 1; neighborIndices[0] = ((Room *)(currentRoom))->Room::GetGridIndexByTile(nextColumn,uVar2); nextRow = uVar2 + 1; @@ -820,7 +820,7 @@ void GridEntity_Rock::guard_check_icall() neighborRocks[2] = (GridEntity_Rock *)0x0; do { uVar1 = neighborIndices[uVar3]; - if (-1 < (int)uVar1) { + if (-1 < GHIDRA_INT(uVar1)) { if (uVar1 < 0x1c0) { neighborGrid = room->_gridEntities[uVar1]; } @@ -833,7 +833,7 @@ void GridEntity_Rock::guard_check_icall() &IsaacRepentancePlus::GridEntity_Rock::RTTI_Type_Descriptor,0 ); if (((neighborRock != (GridEntity_Rock *)0x0) && ((neighborRock->_desc)._type == 2)) && - ((uVar1 = (neighborRock->_desc)._variant, uVar1 < 1000 || ((int)(uVar1 - 1000) < 0)))) { + ((uVar1 = (neighborRock->_desc)._variant, uVar1 < 1000 || (GHIDRA_INT((uVar1 - 1000)) < 0)))) { uVar2 = uVar2 | 1 << (uVar3 & 0x1f); neighborRocks[uVar3] = neighborRock; } @@ -886,7 +886,7 @@ void GridEntity_Rock::SetBigRockFrame(uint param_2) RNG rng; anim = &this->_anim; - if ((int)param_2 < 0) { + if (GHIDRA_INT(param_2) < 0) { ((std::string *)(anim->_buf))->std::string::assign((byte *)"normal",6); name = anim; if (0xf < (this->_anim)._capacity) { @@ -914,7 +914,7 @@ void GridEntity_Rock::SetBigRockFrame(uint param_2) } else { ((std::string *)(anim->_buf))->std::string::assign(&DAT_00b69228,3); - if ((int)param_2 < 1) { + if (GHIDRA_INT(param_2) < 1) { param_2 = 0; } variant = 7; @@ -924,7 +924,7 @@ void GridEntity_Rock::SetBigRockFrame(uint param_2) variant = variant + 1000; LAB_0071a9e9: (this->_desc)._variant = variant; - if ((999 < variant) && (frame = variant - 1000, -1 < (int)(variant - 1000))) goto LAB_0071aa1f; + if ((999 < variant) && (frame = variant - 1000, -1 < GHIDRA_INT((variant - 1000)))) goto LAB_0071aa1f; } frame = variant; LAB_0071aa1f: @@ -933,7 +933,7 @@ LAB_0071aa1f: } isAnimSet = ((ANM2 *)(&this->_sprite))->ANM2::SetAnimation((byte *)anim,1); if (((isAnimSet != 0) && ((this->_sprite)._animState._animData != (void *)0x0)) && - (((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)(int)frame), + (((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(frame)), (this->_sprite)._animState._animData != (void *)0x0)) { (this->_sprite)._animState._isPlaying = 0; } @@ -961,7 +961,7 @@ void GridEntity_Rock::UpdateAnimFrame() uint variant; variant = (this->_desc)._variant; - if ((variant < 1000) || (frame = variant - 1000, (int)(variant - 1000) < 0)) { + if ((variant < 1000) || (frame = variant - 1000, GHIDRA_INT((variant - 1000)) < 0)) { frame = variant; } anim = &this->_anim; @@ -970,7 +970,7 @@ void GridEntity_Rock::UpdateAnimFrame() } isAnimSet = ((ANM2 *)(&this->_sprite))->ANM2::SetAnimation((byte *)anim,1); if ((isAnimSet != 0) && ((this->_sprite)._animState._animData != (void *)0x0)) { - ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)(int)frame); + ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(frame)); if ((this->_sprite)._animState._animData != (void *)0x0) { (this->_sprite)._animState._isPlaying = 0; } @@ -1010,29 +1010,29 @@ void GridEntity_Rock::UpdateNeighbors() } room = g_game->_room; uVar1 = *(uint *)((char *)room + 0xc); - row = (uint)this->_gridIndex / uVar1; - uVar2 = (uint)this->_gridIndex % uVar1; + row = GHIDRA_UINT(this->_gridIndex) / uVar1; + uVar2 = GHIDRA_UINT(this->_gridIndex) % uVar1; leftColumn = uVar2 - 1; - if ((((leftColumn < 0) || ((int)uVar1 <= leftColumn)) || ((int)row < 0)) || - (*(int *)((char *)room + 0x10) <= (int)row)) { + if ((((leftColumn < 0) || (GHIDRA_INT(uVar1) <= leftColumn)) || (GHIDRA_INT(row) < 0)) || + (*(int *)((char *)room + 0x10) <= GHIDRA_INT(row))) { leftIndex = 0xffffffff; } else { leftIndex = leftColumn + uVar1 * row; } rightColumn = uVar2 + 1; - if (((rightColumn < 0) || ((int)uVar1 <= rightColumn)) || - (((int)row < 0 || (*(int *)((char *)room + 0x10) <= (int)row)))) { + if (((rightColumn < 0) || (GHIDRA_INT(uVar1) <= rightColumn)) || + ((GHIDRA_INT(row) < 0 || (*(int *)((char *)room + 0x10) <= GHIDRA_INT(row))))) { rightIndex = 0xffffffff; } else { rightIndex = uVar1 * row + rightColumn; } upRow = row - 1; - if ((((int)uVar2 < 0) || ((int)uVar1 <= (int)uVar2)) || + if (((GHIDRA_INT(uVar2) < 0) || (GHIDRA_INT(uVar1) <= GHIDRA_INT(uVar2))) || ((upRow < 0 || (*(int *)((char *)room + 0x10) <= upRow)))) { upIndex = 0xffffffff; - if ((-1 < (int)uVar2) && (upIndex = 0xffffffff, (int)uVar2 < (int)uVar1)) goto LAB_0071abe5; + if ((-1 < GHIDRA_INT(uVar2)) && (upIndex = 0xffffffff, GHIDRA_INT(uVar2) < GHIDRA_INT(uVar1))) goto LAB_0071abe5; LAB_0071abf9: uVar2 = 0xffffffff; } @@ -1044,28 +1044,28 @@ LAB_0071abe5: uVar2 = uVar1 * downRowCheck + uVar2; } downRow = row + 1; - if ((((leftColumn < 0) || ((int)uVar1 <= leftColumn)) || (upRow < 0)) || + if ((((leftColumn < 0) || (GHIDRA_INT(uVar1) <= leftColumn)) || (upRow < 0)) || (*(int *)((char *)room + 0x10) <= upRow)) { upLeftIndex = 0xffffffff; } else { upLeftIndex = uVar1 * upRow + leftColumn; } - if (((rightColumn < 0) || ((int)uVar1 <= rightColumn)) || + if (((rightColumn < 0) || (GHIDRA_INT(uVar1) <= rightColumn)) || ((upRow < 0 || (*(int *)((char *)room + 0x10) <= upRow)))) { upRightIndex = 0xffffffff; } else { upRightIndex = uVar1 * upRow + rightColumn; } - if (((leftColumn < 0) || ((int)uVar1 <= leftColumn)) || + if (((leftColumn < 0) || (GHIDRA_INT(uVar1) <= leftColumn)) || ((downRow < 0 || (*(int *)((char *)room + 0x10) <= downRow)))) { downLeftIndex = 0xffffffff; } else { downLeftIndex = uVar1 * downRow + leftColumn; } - if ((((rightColumn < 0) || ((int)uVar1 <= rightColumn)) || (downRow < 0)) || + if ((((rightColumn < 0) || (GHIDRA_INT(uVar1) <= rightColumn)) || (downRow < 0)) || (*(int *)((char *)room + 0x10) <= downRow)) { uVar1 = 0xffffffff; } @@ -1249,36 +1249,36 @@ void GridEntity_Rock::TrySpawnWorms() float angle; float rockX; - local_20._4_4_ = 2; - local_20._8_4_ = 7; - local_20._0_4_ = (this->_desc)._spawnSeed; + (*(undefined4 *)((char *)&(local_20) + 0x4)) = 2; + (*(undefined4 *)((char *)&(local_20) + 0x8)) = 7; + (*(undefined4 *)((char *)&(local_20) + 0x0)) = (this->_desc)._spawnSeed; iVar1 = *(int *)((char *)g_game->_room + 0xc); local_14 = 1.26117e-44; rockX = (float)(this->_gridIndex % iVar1) * 40.0 + 40.0; rockY = (float)(this->_gridIndex / iVar1) * 40.0 + 120.0; - if (local_20._0_4_ == 0) { + if ((*(undefined4 *)((char *)&(local_20) + 0x0)) == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar2 = (code *)swi(3); (*pcVar2)(); return; } - local_20._0_4_ = (uint)local_20._0_4_ >> 2 ^ local_20._0_4_; - local_20._0_4_ = local_20._0_4_ << 7 ^ local_20._0_4_; - local_20._0_4_ = (uint)local_20._0_4_ >> 9 ^ local_20._0_4_; - if ((((local_20._0_4_ == ((uint)local_20._0_4_ / 0x32) * 0x32) && + (*(undefined4 *)((char *)&(local_20) + 0x0)) = (*(undefined4 *)((char *)&(GHIDRA_UINT(local_20)) + 0x0)) >> 2 ^ (*(undefined4 *)((char *)&(local_20) + 0x0)); + (*(undefined4 *)((char *)&(local_20) + 0x0)) = (*(undefined4 *)((char *)&(local_20) + 0x0)) << 7 ^ (*(undefined4 *)((char *)&(local_20) + 0x0)); + (*(undefined4 *)((char *)&(local_20) + 0x0)) = (*(undefined4 *)((char *)&(GHIDRA_UINT(local_20)) + 0x0)) >> 9 ^ (*(undefined4 *)((char *)&(local_20) + 0x0)); + if (((((*(undefined4 *)((char *)&(local_20) + 0x0)) == ((*(undefined4 *)((char *)&(GHIDRA_UINT(local_20)) + 0x0)) / 0x32) * 0x32) && (iVar1 = (this->_desc)._type, iVar1 != 3)) && (iVar1 != 0x18)) && ((iVar1 != 6 && (iVar1 != 0x1a)))) { wormCount = ((RNG *)((RNG *)local_20))->RNG::RandomInt(5); wormCount = ((RNG *)((RNG *)local_20))->RNG::RandomInt(wormCount + 1); - if (0 < (int)wormCount) { + if (0 < GHIDRA_INT(wormCount)) { do { seed = Random(); rngResult = Random(); - angle = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) + angle = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14; angle = angle + angle; trig = cos(angle); - local_20._8_4_ = trig * 20.0 + rockX; + (*(undefined4 *)((char *)&(local_20) + 0x8)) = trig * 20.0 + rockX; trig = sin(angle); local_14 = trig * 20.0 + rockY; worm = ((Game *)(g_game))->Game::Spawn(1000,0x3f,(Vector *)(local_20 + 8),&g_vectorZero,(Entity *)0x0,0, @@ -1353,16 +1353,16 @@ byte GridEntity_Rock::TrySpawnLadder() if ((player->_variant == 0) && (isHasStudFinder = ((Entity_Player *)(player))->Entity_Player::HasTrinket(0x4a,0), isHasStudFinder != 0)) { pvVar3 = (player->_trinketRNGs)._end; - if ((int)pvVar3 - (int)(player->_trinketRNGs)._begin >> 4 < 0x4b) { + if (GHIDRA_INT(pvVar3) - GHIDRA_INT((player->_trinketRNGs)._begin) >> 4 < 0x4b) { KAGE_LogMessage(0x10,(byte *)"Trinket ID out of bounds!\n"); pvVar3 = (player->_trinketRNGs)._end; } trinketRngBegin = (player->_trinketRNGs)._begin; - uVar2 = ((int)pvVar3 - (int)trinketRngBegin >> 4) - 1; + uVar2 = (GHIDRA_INT(pvVar3) - GHIDRA_INT(trinketRngBegin) >> 4) - 1; if (0x4a < uVar2) { uVar2 = 0x4a; } - studFinderRng = (RNG *)(uVar2 * 0x10 + (int)trinketRngBegin); + studFinderRng = (RNG *)(uVar2 * 0x10 + GHIDRA_INT(trinketRngBegin)); goto LAB_0071b23a; } playerIt = playerIt + 1; @@ -1381,12 +1381,12 @@ LAB_0071b23a: } if (((g_game->_levelStateFlags & 0x2000U) == 0) && (studFinderRng != (RNG *)0x0)) { iVar1 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::GetTrinketMultiplier(0x4a); - uVar2 = ((RNG *)(studFinderRng))->RNG::RandomInt((uint)(200 / (longlong)iVar1)); + uVar2 = ((RNG *)(studFinderRng))->RNG::RandomInt(GHIDRA_UINT((200 / (longlong)iVar1))); if (uVar2 == 0) { LAB_0071b300: game = g_game; room = g_game->_room; - if ((((uint)this->_gridIndex < 0x1c0) && + if (((GHIDRA_UINT(this->_gridIndex) < 0x1c0) && (pvVar3 = room->_gridEntities[this->_gridIndex], pvVar3 != (void *)0x0)) && (0 < *(int *)((char *)pvVar3 + 0x3c))) { *(undefined4 *)((char *)pvVar3 + 0x3c) = 0; @@ -1394,11 +1394,11 @@ LAB_0071b300: } Seed = Random(); uVar2 = this->_gridIndex; - if (((int)uVar2 < 0) || (0x1bf < (int)uVar2)) { + if ((GHIDRA_INT(uVar2) < 0) || (0x1bf < GHIDRA_INT(uVar2))) { KAGE_LogMessage(0x10,(byte *)"SpawnGridEntity: Grid index invalid\n"); } if ((uVar2 < 0x1c0) && - (gridCollision = ((Room *)(room))->Room::GetGridCollision(uVar2), (int)gridCollision < 1)) { + (gridCollision = ((Room *)(room))->Room::GetGridCollision(uVar2), GHIDRA_INT(gridCollision) < 1)) { stairs = operator_new(0x154); local_8 = 0x11; if (stairs == (GridEntity *)0x0) { diff --git a/src/game/grid_entity_spikes.cpp b/src/game/grid_entity_spikes.cpp index 8545087..ae32604 100644 --- a/src/game/grid_entity_spikes.cpp +++ b/src/game/grid_entity_spikes.cpp @@ -32,10 +32,10 @@ void GridEntity_Spikes::BeginBatches() local_8 = 0xffffffff; puStack_c = &LAB_00afcc05; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&local_2c)[1]._size; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&local_2c)[1]._size); ExceptionList = &local_10; this->_collisionClass = 0; - if ((uint)this->_gridIndex < 0x1c0) { + if (GHIDRA_UINT(this->_gridIndex) < 0x1c0) { *(undefined4 *)((char *)game->_room + this->_gridIndex * 4 + 0x76c) = 999; } sprite = &this->_sprite; @@ -45,21 +45,21 @@ void GridEntity_Spikes::BeginBatches() local_2c._buf[1] = '\0'; local_2c._buf[2] = '\0'; local_2c._buf[3] = '\0'; - local_2c._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) = std::_Allocate(0x20); local_2c._size = 0x19; local_2c._capacity = 0x1f; - builtin_strncpy((char *)local_2c._buf._0_4_,"gfx/grid/grid_spikes.anm2",0x1a); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_2c._buf) + 0x0)),"gfx/grid/grid_spikes.anm2",0x1a); local_8 = 0; ((ANM2 *)(sprite))->ANM2::Load(&local_2c,0); local_8 = 0xffffffff; isDisabled = extraout_CL; if (0xf < local_2c._capacity) { uVar5 = local_2c._capacity + 1; - pcVar4 = (char *)local_2c._buf._0_4_; + pcVar4 = (*(undefined4 *)((char *)&((char *)local_2c._buf) + 0x0)); if (0xfff < uVar5) { - pcVar4 = *(char **)(local_2c._buf._0_4_ + -4); + pcVar4 = *(char **)((*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) + -4); uVar5 = local_2c._capacity + 0x24; - if ((char *)0x1f < (char *)(local_2c._buf._0_4_ + (-4 - (int)pcVar4))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar4)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -67,22 +67,22 @@ void GridEntity_Spikes::BeginBatches() operator_delete(pcVar4,uVar5); isDisabled = extraout_CL_00; } - local_2c._12_8_ = local_2c._12_8_ & 0xffffffff; + (*(undefined8 *)((char *)&(local_2c) + 0xc)) = (*(undefined8 *)((char *)&(local_2c) + 0xc)) & 0xffffffff; local_2c._capacity = 0xf; - local_2c._buf._0_4_ = local_2c._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) = (*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) & 0xffffff00; local_34.y = 0.0; if ((this->_sprite)._layerCount != 0) { do { Sprite::ReplaceSpritesheet - ((Sprite *)sprite,(int)local_34.y, + ((Sprite *)sprite,GHIDRA_INT(local_34.y), (std_string *) - ((int)g_game->_room + *(int *)((char *)g_game->_room + 0x1d18) * 0x13c + 0x1e3c)); - local_34.y = (float)((int)local_34.y + 1); + (GHIDRA_INT(g_game->_room) + *(int *)((char *)g_game->_room + 0x1d18) * 0x13c + 0x1e3c)); + local_34.y = (float)(GHIDRA_INT(local_34.y) + 1); isDisabled = extraout_CL_01; - } while ((uint)local_34.y < (byte *)(this->_sprite)._layerCount); + } while (GHIDRA_UINT(local_34.y) < (byte *)(this->_sprite)._layerCount); } ((ANM2 *)(sprite))->ANM2::LoadGraphics(isDisabled); - if (((this->_desc)._type == 8) && ((uint)(this->_desc)._variant % 100 == 0)) { + if (((this->_desc)._type == 8) && (GHIDRA_UINT((this->_desc)._variant) % 100 == 0)) { uVar5 = (this->_desc)._spawnSeed; local_2c._buf[0xc] = '\x05'; local_2c._buf[0xd] = '\0'; @@ -142,7 +142,7 @@ LAB_0071e528: bVar6 = isDisabled < (byte)*pcVar4; if (isDisabled != *pcVar4) { LAB_0071e510: - uVar5 = -(uint)bVar6 | 1; + uVar5 = -GHIDRA_UINT(bVar6) | 1; goto LAB_0071e515; } if (isDisabled == 0) break; @@ -155,14 +155,14 @@ LAB_0071e510: uVar5 = 0; LAB_0071e515: if ((uVar5 != 0) || - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) != '\0' && + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) != '\0' && ((this->_sprite)._animState._isPlaying == 0)))) goto LAB_0071e528; } animData = (this->_sprite)._animState._animData; if (animData == (void *)0x0) { local_2c._capacity = 0xf; - local_2c._12_8_ = local_2c._12_8_ & 0xffffffff; - local_2c._buf._0_4_ = (std_string *)0x0; + (*(undefined8 *)((char *)&(local_2c) + 0xc)) = (*(undefined8 *)((char *)&(local_2c) + 0xc)) & 0xffffffff; + (*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) = (std_string *)0x0; } else { ((std::string *)(local_2c._buf))->std::string::string(animData); @@ -170,7 +170,7 @@ LAB_0071e515: local_8 = 1; psVar3 = &local_2c; if (0xf < local_2c._capacity) { - psVar3 = (std_string *)local_2c._buf._0_4_; + psVar3 = (*(undefined4 *)((char *)&((std_string *)local_2c._buf) + 0x0)); } isDisabled = ((ANM2 *)(&this->_sprite))->ANM2::SetAnimation((byte *)psVar3,1); if ((isDisabled != 0) && ((this->_sprite)._animState._animData != (void *)0x0)) { @@ -182,24 +182,24 @@ LAB_0071e515: local_8 = 0xffffffff; if (0xf < local_2c._capacity) { uVar5 = local_2c._capacity + 1; - psVar3 = (std_string *)local_2c._buf._0_4_; + psVar3 = (*(undefined4 *)((char *)&((std_string *)local_2c._buf) + 0x0)); if (0xfff < uVar5) { - psVar3 = (std_string *)((std_string *)(local_2c._buf._0_4_ + -0x18))->_capacity; + psVar3 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) + -0x18))->_capacity; uVar5 = local_2c._capacity + 0x24; - if ((byte *)0x1f < (byte *)(local_2c._buf._0_4_ + (-4 - (int)psVar3))) { + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(psVar3,uVar5); } - local_2c._12_8_ = local_2c._12_8_ & 0xffffffff; + (*(undefined8 *)((char *)&(local_2c) + 0xc)) = (*(undefined8 *)((char *)&(local_2c) + 0xc)) & 0xffffffff; local_2c._capacity = 0xf; - local_2c._buf._0_4_ = local_2c._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) = (*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) & 0xffffff00; if ((this->_sprite)._animState._animData != (void *)0x0) { AnimationState::AdvancePosition (&(this->_sprite)._animState, - *(int *)((int)(this->_sprite)._animState._animData + 0x30) + -1); + *(int *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x30) + -1); } (this->_desc)._state = 1; goto LAB_0071e7e6; @@ -217,7 +217,7 @@ LAB_0071e515: bVar6 = isDisabled < (byte)*pcVar4; if (isDisabled != *pcVar4) { LAB_0071e6e2: - uVar5 = -(uint)bVar6 | 1; + uVar5 = -GHIDRA_UINT(bVar6) | 1; goto LAB_0071e6e7; } if (isDisabled == 0) break; @@ -230,7 +230,7 @@ LAB_0071e6e2: uVar5 = 0; LAB_0071e6e7: if ((uVar5 == 0) && - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) == '\0' || + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) == '\0' || ((this->_sprite)._animState._isPlaying != 0)))) goto LAB_0071e7e6; } pcVar4 = "PaymentSpike"; @@ -247,7 +247,7 @@ LAB_0071e6e7: bVar6 = isDisabled < (byte)*pcVar4; if (isDisabled != *pcVar4) { LAB_0071e680: - uVar5 = -(uint)bVar6 | 1; + uVar5 = -GHIDRA_UINT(bVar6) | 1; goto LAB_0071e685; } if (isDisabled == 0) break; @@ -260,7 +260,7 @@ LAB_0071e680: uVar5 = 0; LAB_0071e685: if ((uVar5 == 0) && - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) == '\0' || + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) == '\0' || ((this->_sprite)._animState._isPlaying != 0)))) goto LAB_0071e7e6; } pcVar4 = "SummonPayment"; @@ -292,7 +292,7 @@ LAB_0071e685: bVar6 = isDisabled < *expectedAnim; if (isDisabled != *expectedAnim) { LAB_0071e7b0: - uVar5 = -(uint)bVar6 | 1; + uVar5 = -GHIDRA_UINT(bVar6) | 1; goto LAB_0071e7b5; } if (isDisabled == 0) break; @@ -305,7 +305,7 @@ LAB_0071e7b0: uVar5 = 0; LAB_0071e7b5: if ((uVar5 == 0) && - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) == '\0' || + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) == '\0' || ((this->_sprite)._animState._isPlaying != 0)))) goto LAB_0071e7e6; } pcVar4 = &DAT_00c80fa8; @@ -343,7 +343,7 @@ LAB_0071e7b5: bVar6 = isDisabled < *expectedAnim; if (isDisabled != *expectedAnim) { LAB_0071e477: - uVar5 = -(uint)bVar6 | 1; + uVar5 = -GHIDRA_UINT(bVar6) | 1; goto LAB_0071e47c; } if (isDisabled == 0) break; @@ -356,7 +356,7 @@ LAB_0071e477: uVar5 = 0; LAB_0071e47c: if ((uVar5 == 0) && - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) == '\0' || + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) == '\0' || ((this->_sprite)._animState._isPlaying != 0)))) goto LAB_0071e7e6; } isDisabled = ((ANM2 *)(&this->_sprite))->ANM2::SetAnimation((byte *)local_34.y,1); @@ -399,7 +399,7 @@ LAB_0071e3bb: bVar6 = isDisabled < *expectedAnim; if (isDisabled != *expectedAnim) { LAB_0071e3a0: - uVar5 = -(uint)bVar6 | 1; + uVar5 = -GHIDRA_UINT(bVar6) | 1; goto LAB_0071e3a5; } if (isDisabled == 0) break; @@ -412,7 +412,7 @@ LAB_0071e3a0: uVar5 = 0; LAB_0071e3a5: if ((uVar5 != 0) || - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) != '\0' && + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) != '\0' && ((this->_sprite)._animState._isPlaying == 0)))) goto LAB_0071e3bb; } this->_timeout = ((this->_desc)._variant + -5) * 0xc; @@ -451,7 +451,7 @@ LAB_0071e2db: bVar6 = isDisabled < *expectedAnim; if (isDisabled != *expectedAnim) { LAB_0071e2c0: - uVar5 = -(uint)bVar6 | 1; + uVar5 = -GHIDRA_UINT(bVar6) | 1; goto LAB_0071e2c5; } if (isDisabled == 0) break; @@ -464,20 +464,20 @@ LAB_0071e2c0: uVar5 = 0; LAB_0071e2c5: if ((uVar5 != 0) || - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) != '\0' && + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) != '\0' && ((this->_sprite)._animState._isPlaying == 0)))) goto LAB_0071e2db; } if ((this->_sprite)._animState._animData != (void *)0x0) { AnimationState::AdvancePosition (&(this->_sprite)._animState, - *(int *)((int)(this->_sprite)._animState._animData + 0x30) + -1); + *(int *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x30) + -1); } LAB_0071e7e6: isDisabled = is_disabled(this); if (isDisabled != 0) { unsummon(this,1); } - if (((this->_desc)._type == 8) && (99 < (uint)(this->_desc)._variant)) { + if (((this->_desc)._type == 8) && (99 < GHIDRA_UINT((this->_desc)._variant))) { uVar5 = (this->_desc)._spawnSeed; local_2c._buf[0xc] = '\x02'; local_2c._buf[0xd] = '\0'; @@ -522,12 +522,12 @@ byte GridEntity_Spikes::is_disabled() } roomDesc = ((Level *)((Level *)g_game))->Level::GetRoomByIdx(g_game->_currentRoomIdx, g_game->_currentDimensionIdx); - if ((((uint)roomDesc->Flags >> 1 & 1) != 0) || + if (((GHIDRA_UINT(roomDesc->Flags) >> 1 & 1) != 0) || (isFlatFileHeld = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(0x97), isFlatFileHeld != 0)) { return 1; } - if (((uint)(this->_desc)._variant < 100) && + if ((GHIDRA_UINT((this->_desc)._variant) < 100) && ((*(int *)((char *)g_game->_room + 8) == 0xe && (sanguineBondOwner = PlayerManager::FirstCollectibleOwner @@ -551,14 +551,14 @@ void GridEntity_Spikes::Update() char *summonAnim; if ((this->_desc)._state != 0) { - if ((uint)this->_gridIndex < 0x1c0) { + if (GHIDRA_UINT(this->_gridIndex) < 0x1c0) { *(undefined4 *)((char *)g_game->_room + this->_gridIndex * 4 + 0x76c) = 500; } goto LAB_0071ea6f; } damageFlags = 0x80; iVar2 = *(int *)((char *)g_game->_room + 8); - if ((((iVar2 == 0xd) || (99 < (uint)(this->_desc)._variant)) || ((this->_desc)._type == 0x1c)) && + if ((((iVar2 == 0xd) || (99 < GHIDRA_UINT((this->_desc)._variant))) || ((this->_desc)._type == 0x1c)) && (damageFlags = 0x10000080, iVar2 == 0xd)) { LAB_0071ea00: isCheck = 1; @@ -569,12 +569,12 @@ LAB_0071ea00: if (iVar2 != 0x1c) goto LAB_0071ea4a; goto LAB_0071ea00; } - if (99 < (uint)(this->_desc)._variant) goto LAB_0071ea00; + if (99 < GHIDRA_UINT((this->_desc)._variant)) goto LAB_0071ea00; LAB_0071ea4a: isCheck = 0; } GridEntity::hurt_surroundings((GridEntity *)this,11.0,11.0,8.0,2,(ulonglong)damageFlags,isCheck); - if ((uint)this->_gridIndex < 0x1c0) { + if (GHIDRA_UINT(this->_gridIndex) < 0x1c0) { *(undefined4 *)((char *)g_game->_room + this->_gridIndex * 4 + 0x76c) = 999; } LAB_0071ea6f: @@ -585,7 +585,7 @@ LAB_0071ea6f: this->_timeout = iVar2; if (iVar2 < 1) { this->_timeout = 0x3c; - (this->_desc)._state = (uint)((this->_desc)._state == 0); + (this->_desc)._state = GHIDRA_UINT(((this->_desc)._state == 0)); } else if (iVar2 == 5) { isCheck = FUN_0071df80(); @@ -640,7 +640,7 @@ void GridEntity_Spikes::unsummon(byte isInstant) local_8 = (byte ****)0xffffffff; puStack_c = &LAB_00af18ad; local_10 = ExceptionList; - securityCookie = __security_cookie ^ (uint)(curAnimName + 0xb); + securityCookie = __security_cookie ^ GHIDRA_UINT((curAnimName + 0xb)); ExceptionList = &local_10; gridType = (this->_desc)._type; (this->_desc)._state = 1; @@ -658,7 +658,7 @@ void GridEntity_Spikes::unsummon(byte isInstant) isLess = bVar1 < (byte)*animName; if (bVar1 != *animName) { LAB_0071ebb0: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0071ebb5; } if (bVar1 == 0) break; @@ -690,7 +690,7 @@ LAB_0071ebb5: isLess = bVar1 < (byte)*animName; if (bVar1 != *animName) { LAB_0071ec72: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0071ec77; } if (bVar1 == 0) break; @@ -719,7 +719,7 @@ LAB_0071ec77: isLess = bVar1 < (byte)*animName; if (bVar1 != *animName) { LAB_0071ec20: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0071ec25; } if (bVar1 == 0) break; @@ -772,7 +772,7 @@ LAB_0071ecaa: if (0xfff < uVar2) { curAnimNameData = (byte *****)curAnimName[0][-1]; uVar2 = curAnimNameCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)curAnimName[0] + (-4 - (int)curAnimNameData))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(curAnimName[0]) + (-4 - GHIDRA_INT(curAnimNameData)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -781,11 +781,11 @@ LAB_0071ecaa: } curAnimNameSize = 0; curAnimNameCapacity = 0xf; - curAnimName[0] = (byte *****)((uint)curAnimName[0] & 0xffffff00); + curAnimName[0] = (byte *****)(GHIDRA_UINT(curAnimName[0]) & 0xffffff00); if ((this->_sprite)._animState._animData != (void *)0x0) { AnimationState::AdvancePosition (&(this->_sprite)._animState, - *(int *)((int)(this->_sprite)._animState._animData + 0x30) + -1); + *(int *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x30) + -1); } } ExceptionList = local_10; diff --git a/src/game/grid_entity_stairs.cpp b/src/game/grid_entity_stairs.cpp index 2eee5b4..1ec1a75 100644 --- a/src/game/grid_entity_stairs.cpp +++ b/src/game/grid_entity_stairs.cpp @@ -31,7 +31,7 @@ void GridEntity_Stairs::BeginBatches() local_8 = 0xffffffff; puStack_c = &LAB_00afcc05; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(local_2c + 0x28); + local_14 = __security_cookie ^ GHIDRA_UINT((local_2c + 0x28)); ExceptionList = &local_10; pathSize = 0; if ((*(uint *)(*(int *)((char *)g_game->_room + 4) + 0x44) >> 0xd & 1) == 0) { @@ -41,21 +41,21 @@ void GridEntity_Stairs::BeginBatches() local_2c[1] = '\0'; local_2c[2] = '\0'; local_2c[3] = '\0'; - local_2c._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(local_2c) + 0x0)) = std::_Allocate(0x30); pathSize = 0x24; local_18 = 0x2f; - builtin_strncpy((char *)local_2c._0_4_,"gfx/grid/door_20_secrettrapdoor.anm2",0x25); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_2c) + 0x0)),"gfx/grid/door_20_secrettrapdoor.anm2",0x25); local_8 = 0; ((ANM2 *)(sprite))->ANM2::Load((std_string *)local_2c,0); local_8 = 0xffffffff; bVar1 = extraout_CL; if (0xf < local_18) { uVar3 = local_18 + 1; - pcVar2 = (char *)local_2c._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)local_2c) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(local_2c._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(local_2c) + 0x0)) + -4); uVar3 = local_18 + 0x24; - if ((char *)0x1f < (char *)(local_2c._0_4_ + (-4 - (int)pcVar2))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_2c) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -65,21 +65,21 @@ void GridEntity_Stairs::BeginBatches() } (this->_desc)._state = 0; if ((this->_desc)._variant == 2) { - local_2c._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(local_2c) + 0x0)) = std::_Allocate(0x30); pathSize = 0x20; local_18 = 0x2f; - builtin_strncpy((char *)local_2c._0_4_,"gfx/grid/secretshop_trapdoor.png",0x21); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_2c) + 0x0)),"gfx/grid/secretshop_trapdoor.png",0x21); local_8 = 1; ((Sprite *)((Sprite *)sprite))->Sprite::ReplaceSpritesheet(0,(std_string *)local_2c); local_8 = 0xffffffff; bVar1 = extraout_CL_01; if (0xf < local_18) { uVar3 = local_18 + 1; - pcVar2 = (char *)local_2c._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)local_2c) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(local_2c._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(local_2c) + 0x0)) + -4); uVar3 = local_18 + 0x24; - if ((char *)0x1f < (char *)(local_2c._0_4_ + (-4 - (int)pcVar2))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_2c) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -101,7 +101,7 @@ void GridEntity_Stairs::BeginBatches() isLess = bVar1 < (byte)*pcVar2; if (bVar1 != *pcVar2) { LAB_0099bcf0: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0099bcf5; } if (bVar1 == 0) break; @@ -135,8 +135,8 @@ LAB_0099bcf5: local_38 = 0; local_34 = 0; local_30 = 0; - local_2c._0_4_ = g_vectorZero.x; - local_2c._4_4_ = g_vectorZero.y; + (*(undefined4 *)((char *)&(local_2c) + 0x0)) = g_vectorZero.x; + (*(undefined4 *)((char *)&(local_2c) + 0x4)) = g_vectorZero.y; local_24 = g_vectorZero.x; local_20 = g_vectorZero.y; local_18 = 0; @@ -198,13 +198,13 @@ void GridEntity_Stairs::Update() fVar5 = ((float)(this->_gridIndex / iVar7) * 40.0 + 120.0) - (((Entity_Player *)local_24.y)->_pos).y; playerDistance = sqrtf(fVar5 * fVar5 + deltaX * deltaX); - local_18 = (float)CONCAT31((int3)((uint)extraout_ECX_00 >> 8),playerDistance < 50.0); + local_18 = (float)CONCAT31((int3)(GHIDRA_UINT(extraout_ECX_00) >> 8),playerDistance < 50.0); } iVar7 = *(int *)((char *)g_game->_room + 0xc); stairsPos.x = (float)(this->_gridIndex % iVar7) * 40.0 + 40.0; stairsPos.y = (float)(this->_gridIndex / iVar7) * 40.0 + 120.0; EntityList::QueryRadius - ((EntityList *)((int)g_game->_room + 0x1218),&nearbyEntities,&stairsPos,20.0,1); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&nearbyEntities,&stairsPos,20.0,1); game = g_game; cVar3 = SUB41(local_18,0); uVar4 = 0; @@ -216,19 +216,19 @@ void GridEntity_Stairs::Update() if (cVar3 != '\0') break; iVar7 = *(int *)((char *)nearbyEntities._data + uVar4 * 4); if ((*(int *)(iVar7 + 0x28) == 3) && - (fVar5 = (float)((uint)fVar5 & 0xff), *(int *)(iVar7 + 0x2c) == 900)) { + (fVar5 = (float)(GHIDRA_UINT(fVar5) & 0xff), *(int *)(iVar7 + 0x2c) == 900)) { fVar5 = 1.4013e-45; } cVar3 = SUB41(fVar5,0); uVar4 = uVar4 + 1; - } while (uVar4 < (uint)nearbyEntities._size); + } while (uVar4 < GHIDRA_UINT(nearbyEntities._size)); } if (((*(byte *)(*(int *)((char *)g_game->_room + 4) + 0x44) & 1) == 0) || (cVar3 != '\0')) { if ((this->_sprite)._animState._animData != (void *)0x0) { local_18 = (this->_sprite)._animState._animFrame; dVar6 = floor((double)local_18); local_18 = (float)dVar6; - if (9 < (int)dVar6) goto LAB_0099bf89; + if (9 < GHIDRA_INT(dVar6)) goto LAB_0099bf89; } LAB_0099c032: curAnimChar = (this->_sprite)._animState._animData; @@ -251,7 +251,7 @@ LAB_0099c083: isLess = bVar2 < (byte)*expectedName; if (bVar2 != *expectedName) { LAB_0099c068: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_0099c06d; } if (bVar2 == 0) break; @@ -264,7 +264,7 @@ LAB_0099c068: uVar4 = 0; LAB_0099c06d: if ((uVar4 != 0) || - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) != '\0' && + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) != '\0' && ((this->_sprite)._animState._isPlaying == 0)))) goto LAB_0099c083; } (this->_desc)._state = 0; @@ -292,7 +292,7 @@ LAB_0099bfeb: isLess = bVar2 < (byte)*expectedName; if (bVar2 != *expectedName) { LAB_0099bfd0: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_0099bfd5; } if (bVar2 == 0) break; @@ -305,7 +305,7 @@ LAB_0099bfd0: uVar4 = 0; LAB_0099bfd5: if ((uVar4 != 0) || - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) != '\0' && + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) != '\0' && ((this->_sprite)._animState._isPlaying == 0)))) goto LAB_0099bfeb; } if (((this->_sprite)._animState._animData == (void *)0x0) || @@ -340,7 +340,7 @@ LAB_0099c12a: fVar5 = g_vectorZero.y; local_24.y = (float)game->_currentRoomIdx; returnRoomIdx = game->_lastRoomIdx; - if ((int)local_24.y < 0) { + if (GHIDRA_INT(local_24.y) < 0) { (game->_dungeonReturnPosition).x = g_vectorZero.x; (game->_dungeonReturnPosition).y = fVar5; if (returnRoomIdx < -0x13) { @@ -353,9 +353,9 @@ LAB_0099c12a: else { iVar7 = this->_gridIndex; gridWidth = *(int *)((char *)game->_room + 0xc); - returnRoomIdx = (int)(Entity_Player *)0xa8; - if ((int)local_24.y < 0xa8) { - returnRoomIdx = (int)local_24.y; + returnRoomIdx = GHIDRA_INT((Entity_Player *)0xa8); + if (GHIDRA_INT(local_24.y) < 0xa8) { + returnRoomIdx = GHIDRA_INT(local_24.y); } (game->_dungeonReturnPosition).x = (float)(iVar7 % gridWidth) * 40.0 + 40.0; (game->_dungeonReturnPosition).y = (float)(iVar7 / gridWidth) * 40.0 + 120.0; @@ -367,20 +367,20 @@ LAB_0099c12a: ((AnimationState *)(&(this->_sprite)._overlayAnimState))->AnimationState::Update(); } LAB_0099c224: - if (nearbyEntities._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(nearbyEntities) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (nearbyEntities._data != (void *)0x0) { uVar4 = *(uint *)((char *)nearbyEntities._data + -4); qVar1 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar4; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar4; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar1 < uVar4); - free((void *)((int)nearbyEntities._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar4)); + free((void *)(GHIDRA_INT(nearbyEntities._data) + -4)); } } ExceptionList = local_10; diff --git a/src/game/grid_entity_statue.cpp b/src/game/grid_entity_statue.cpp index f016e3d..ef571b3 100644 --- a/src/game/grid_entity_statue.cpp +++ b/src/game/grid_entity_statue.cpp @@ -63,7 +63,7 @@ void GridEntity_Statue::BeginBatches() statueEffect = ((Game *)(g_game))->Game::SpawnEx(1000,variant,&spawnPos,&g_vectorZero,(Entity *)0x0,0,seed,0); *(Entity **)&(*(undefined1 *)((char *)(this) + 0x154)) = statueEffect; LAB_00838bf3: - if ((uint)this->_gridIndex < 0x1c0) { + if (GHIDRA_UINT(this->_gridIndex) < 0x1c0) { gridPathValue = 0; if ((this->_desc)._state == 1) { gridPathValue = 1000; diff --git a/src/game/grid_entity_teleporter.cpp b/src/game/grid_entity_teleporter.cpp index 97d28e0..6adac20 100644 --- a/src/game/grid_entity_teleporter.cpp +++ b/src/game/grid_entity_teleporter.cpp @@ -22,7 +22,7 @@ void GridEntity_Teleporter::Update() Vector local_10; GridEntity *otherTeleporter; - auVar5 = in_stack_ffffffd0._0_12_; + auVar5 = (*(undefined1 *)((char *)&(in_stack_ffffffd0) + 0x0)); iVar2 = (this->_desc)._state; if (iVar2 == 1) { iVar2 = FUN_00839070(); @@ -43,7 +43,7 @@ void GridEntity_Teleporter::Update() bVar4 = bVar1 < (byte)*wantAnimChar; if (bVar1 != *wantAnimChar) { LAB_00838ca0: - uVar3 = -(uint)bVar4 | 1; + uVar3 = -GHIDRA_UINT(bVar4) | 1; goto LAB_00838ca5; } if (bVar1 == 0) break; @@ -62,11 +62,11 @@ LAB_00838ca5: } if ((curAnimChar == (byte *)0x0) || ((this->_sprite)._animState._isPlaying == 0)) { LAB_00838d09: - auVar6._8_4_ = "IdleOn"; - auVar6._0_8_ = 0x838d1800000000; - auVar6._12_4_ = 0; + (*(undefined4 *)((char *)&(auVar6) + 0x8)) = "IdleOn"; + (*(undefined8 *)((char *)&(auVar6) + 0x0)) = 0x838d1800000000; + (*(undefined4 *)((char *)&(auVar6) + 0xc)) = 0; ((ANM2 *)(&this->_sprite))->ANM2::Play((byte *)"IdleOn",0); - auVar5 = auVar6._0_12_; + auVar5 = (*(undefined1 *)((char *)&(auVar6) + 0x0)); } else { if (0xf < *(uint *)(curAnimChar + 0x14)) { @@ -78,7 +78,7 @@ LAB_00838d09: bVar4 = bVar1 < (byte)*wantAnimChar; if (bVar1 != *wantAnimChar) { LAB_00838d00: - uVar3 = -(uint)bVar4 | 1; + uVar3 = -GHIDRA_UINT(bVar4) | 1; goto LAB_00838d05; } if (bVar1 == 0) break; @@ -92,27 +92,27 @@ LAB_00838d00: LAB_00838d05: if (uVar3 != 0) goto LAB_00838d09; } - auVar7._12_4_ = 0x838d1f; - auVar7._0_12_ = auVar5; + (*(undefined4 *)((char *)&(auVar7) + 0xc)) = 0x838d1f; + (*(undefined1 *)((char *)&(auVar7) + 0x0)) = auVar5; player = (Entity_Player *)FUN_00839070(); if (player != (Entity_Player *)0x0) { uVar3 = this->_gridIndex; local_10.x = (float)g_game->_room; cellsScanned = 0; iVar2 = *(int *)((char *)local_10.x + 0x10) * *(int *)((char *)local_10.x + 0xc); - auVar8._0_8_ = auVar7._0_8_; + (*(undefined8 *)((char *)&(auVar8) + 0x0)) = (*(undefined8 *)((char *)&(auVar7) + 0x0)); if (0 < iVar2 + -2) { do { - uVar3 = (int)(uVar3 + 1) % iVar2; + uVar3 = GHIDRA_INT((uVar3 + 1)) % iVar2; if ((((uVar3 < 0x1c0) && (otherTeleporter = *(GridEntity **)((char *)local_10.x + uVar3 * 4 + 0x24), otherTeleporter != (GridEntity *)0x0)) && ((otherTeleporter->_desc)._type == 0x17)) && ((otherTeleporter->_desc)._variant == (this->_desc)._variant)) { - auVar8._8_4_ = 1; - auVar8._12_4_ = 1; - auVar9._8_8_ = auVar8._8_8_; - auVar9._4_4_ = &local_10; - auVar9._0_4_ = 0x838dba; + (*(undefined4 *)((char *)&(auVar8) + 0x8)) = 1; + (*(undefined4 *)((char *)&(auVar8) + 0xc)) = 1; + (*(undefined8 *)((char *)&(auVar9) + 0x8)) = (*(undefined8 *)((char *)&(auVar8) + 0x8)); + (*(undefined4 *)((char *)&(auVar9) + 0x4)) = &local_10; + (*(undefined4 *)((char *)&(auVar9) + 0x0)) = 0x838dba; destPos = ((GridEntity *)(otherTeleporter))->GridEntity::Position(&local_10); Entity_Player::Teleport(player,destPos,auVar9[8],auVar9[0xc]); destPos = ((GridEntity *)(otherTeleporter))->GridEntity::Position(&local_10); @@ -139,7 +139,7 @@ LAB_00838d05: } } LAB_00838e61: - if ((uint)this->_gridIndex < 0x1c0) { + if (GHIDRA_UINT(this->_gridIndex) < 0x1c0) { *(undefined4 *)((char *)g_game->_room + this->_gridIndex * 4 + 0x76c) = 999; } if ((this->_sprite)._loaded != 0) { @@ -171,7 +171,7 @@ void GridEntity_Teleporter::BeginBatches() local_8 = 0xffffffff; puStack_c = &LAB_00af6ebd; local_10 = ExceptionList; - local_14 = __security_cookie ^ (int)&anm2Path + 0x28U; + local_14 = __security_cookie ^ GHIDRA_INT(&anm2Path) + 0x28U; ExceptionList = &local_10; if (g_game->_challenge == 0x2c) { uVar3 = ((Level *)((Level *)g_game))->Level::GetRoomStageType(g_game->_currentRoomIdx); @@ -191,24 +191,24 @@ LAB_00838f10: anm2Paths = &PTR_s_gfx_grid_grid_teleporter_anm2_00c5c454; } anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (void *)0x0; pbVar1 = anm2Paths[(this->_desc)._variant]; cursor = pbVar1; do { bVar2 = *cursor; cursor = cursor + 1; } while (bVar2 != 0); - ((std::string *)(anm2Path._buf))->std::string::assign(pbVar1,(int)cursor - (int)(pbVar1 + 1)); + ((std::string *)(anm2Path._buf))->std::string::assign(pbVar1,GHIDRA_INT(cursor) - GHIDRA_INT((pbVar1 + 1))); local_8 = 0; ((ANM2 *)(&this->_sprite))->ANM2::Load(&anm2Path,1); local_8 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - ptr = (void *)anm2Path._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((void *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - ptr = *(void **)(anm2Path._buf._0_4_ + -4); + ptr = *(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if (0x1f < (uint)(anm2Path._buf._0_4_ + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -218,7 +218,7 @@ LAB_00838f10: pbVar1 = (this->_sprite)._animState._animData; anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = anm2Path._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) & 0xffffff00; if (pbVar1 != (byte *)0x0) { cursor = pbVar1; if (0xf < *(uint *)(pbVar1 + 0x14)) { @@ -230,7 +230,7 @@ LAB_00838f10: isLess = bVar2 < (byte)*idleOnCursor; if (bVar2 != *idleOnCursor) { LAB_00839000: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_00839005; } if (bVar2 == 0) break; diff --git a/src/game/grid_entity_tnt.cpp b/src/game/grid_entity_tnt.cpp index 75693b4..41373d3 100644 --- a/src/game/grid_entity_tnt.cpp +++ b/src/game/grid_entity_tnt.cpp @@ -25,9 +25,9 @@ void GridEntity_TNT::BeginBatches() local_8 = 0xffffffff; puStack_c = &LAB_00af32ed; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&anm2Path)[1]._size; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&anm2Path)[1]._size); ExceptionList = &local_10; - if ((uint)this->_gridIndex < 0x1c0) { + if (GHIDRA_UINT(this->_gridIndex) < 0x1c0) { *(undefined4 *)((char *)g_game->_room + this->_gridIndex * 4 + 0x76c) = 1000; } anm2Path._size = 0; @@ -37,20 +37,20 @@ void GridEntity_TNT::BeginBatches() anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; self = this; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x16; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/grid/grid_tnt.anm2",0x17); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/grid/grid_tnt.anm2",0x17); local_8 = 0; ((ANM2 *)(&this->_sprite))->ANM2::Load(&anm2Path,1); local_8 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar2 = anm2Path._capacity + 1; - ptr = (char *)anm2Path._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar2) { - ptr = *(char **)(anm2Path._buf._0_4_ + -4); + ptr = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar2 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)ptr))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(ptr)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -60,13 +60,13 @@ void GridEntity_TNT::BeginBatches() anm2Path._size = 0; entityConfig = &g_manager->_entityConfig; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = anm2Path._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) & 0xffffff00; entityKey = 0x3e801b00; _Find_lower_bound<>(lowerBoundResult,&entityKey); if (((*(char *)((char *)lowerBoundNode + 0xd) == '\0') && (*(uint *)((char *)lowerBoundNode + 0x10) < 0x3e801b01)) && (lowerBoundNode != (entityConfig->_entities)._head)) { - entity = (EntityConfig_Entity *)((int)lowerBoundNode + 0x18); + entity = (EntityConfig_Entity *)(GHIDRA_INT(lowerBoundNode) + 0x18); } else { entity = ((EntityConfig *)(entityConfig))->EntityConfig::GetEntity(1000,0,0); @@ -86,7 +86,7 @@ void GridEntity_TNT::BeginBatches() isLess = bVar1 < *idleAnimChar; if (bVar1 != *idleAnimChar) { LAB_0071f028: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0071f02d; } if (bVar1 == 0) break; @@ -107,7 +107,7 @@ LAB_0071f02d: (this->_sprite)._animState._isPlaying = 1; } LAB_0071f059: - self->_frameCnt = (uint)((self->_desc)._state < 4) * 4 + -1; + self->_frameCnt = GHIDRA_UINT(((self->_desc)._state < 4)) * 4 + -1; ExceptionList = local_10; return; } @@ -159,7 +159,7 @@ void GridEntity_TNT::Update() spawn_rock_particles(); ((GridEntity *)((GridEntity *)this))->GridEntity::Position(&posBuf); FUN_0071f4b0((this->_desc)._spawnSeed,extraout_ECX); - if ((uint)this->_gridIndex < 0x1c0) { + if (GHIDRA_UINT(this->_gridIndex) < 0x1c0) { *(undefined4 *)((char *)g_game->_room + this->_gridIndex * 4 + 0x76c) = 900; return; } diff --git a/src/game/grid_entity_trap_door.cpp b/src/game/grid_entity_trap_door.cpp index 441c0a7..7192ddd 100644 --- a/src/game/grid_entity_trap_door.cpp +++ b/src/game/grid_entity_trap_door.cpp @@ -40,7 +40,7 @@ void GridEntity_TrapDoor::BeginBatches() local_8 = 0xffffffff; puStack_c = &LAB_00afcc85; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&anm2Path)[1]._size; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&anm2Path)[1]._size); ExceptionList = &local_10; local_4c = g_game->_stage; if ((g_game->_difficulty == 2) || (g_game->_difficulty == 3)) { @@ -59,39 +59,39 @@ void GridEntity_TrapDoor::BeginBatches() } local_4c = g_game->_currentRoomIdx; if (((iVar4 == 9) && (local_4c == -9)) || - (((GridEntityDesc *)((int)local_54.y + 4))->_varData == 1)) { + (((GridEntityDesc *)(GHIDRA_INT(local_54.y) + 4))->_varData == 1)) { anm2Path._size = 0; anm2Path._capacity = 0xf; anm2Path._buf[0] = '\0'; anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1a; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/grid/VoidTrapdoor.anm2",0x1b); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/grid/VoidTrapdoor.anm2",0x1b); local_8 = 0; - ((ANM2 *)((ANM2 *)((int)local_54.y + 0x40)))->ANM2::Load(&anm2Path,1); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(local_54.y) + 0x40)))->ANM2::Load(&anm2Path,1); local_8 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(freeBlock,uVar3); } - ((GridEntityDesc *)((int)local_54.y + 4))->_variant = 1; + ((GridEntityDesc *)(GHIDRA_INT(local_54.y) + 4))->_variant = 1; goto LAB_0071feb0; } room = g_game->_room; if (*(int *)((char *)room + 8) == 0x1b) { - sprite = (ANM2 *)((int)local_54.y + 0x40); + sprite = (ANM2 *)(GHIDRA_INT(local_54.y) + 0x40); iVar4 = *(int *)(*(int *)((char *)room + 4) + 0x10); if (iVar4 != 0) { iVar4 = *(int *)(iVar4 + 0x10); @@ -102,20 +102,20 @@ void GridEntity_TrapDoor::BeginBatches() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1f; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/grid/trapdoor_downpour.anm2",0x20); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/grid/trapdoor_downpour.anm2",0x20); local_8 = 1; ((ANM2 *)(sprite))->ANM2::Load(&anm2Path,1); local_8 = 0xffffffff; if (anm2Path._capacity < 0x10) goto LAB_0071feb0; uVar3 = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -129,28 +129,28 @@ void GridEntity_TrapDoor::BeginBatches() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1c; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/grid/trapdoor_mines.anm2",0x1d); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/grid/trapdoor_mines.anm2",0x1d); local_8 = 2; ((ANM2 *)(sprite))->ANM2::Load(&anm2Path,1); local_8 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(freeBlock,uVar3); } - if (1 < (uint)((ANM2 *)((int)local_54.y + 0x40))->_layerCount) { - layer = ((ANM2 *)((ANM2 *)((int)local_54.y + 0x40)))->ANM2::GetLayer((byte *)0x1); + if (1 < GHIDRA_UINT(((ANM2 *)(GHIDRA_INT(local_54.y) + 0x40))->_layerCount)) { + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(local_54.y) + 0x40)))->ANM2::GetLayer((byte *)0x1); layer->_visible = 0; } ((ANM2 *)(sprite))->ANM2::Play((byte *)"Closed",0); @@ -169,9 +169,9 @@ void GridEntity_TrapDoor::BeginBatches() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(iVar4 + 0x2d); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(iVar4 + 0x2d); anm2Path._size = 0x20; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/grid/trapdoor_mausoleum.anm2",0x21); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/grid/trapdoor_mausoleum.anm2",0x21); local_8 = 3; goto LAB_0071f766; } @@ -182,21 +182,21 @@ void GridEntity_TrapDoor::BeginBatches() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1e; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/grid/Door_11_TrapDoor.anm2",0x1f); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/grid/Door_11_TrapDoor.anm2",0x1f); local_8 = 4; ((ANM2 *)(sprite))->ANM2::Load(&anm2Path,1); local_8 = 0xffffffff; if (anm2Path._capacity < 0x10) goto LAB_0071feb0; uVar3 = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { uVar3 = anm2Path._capacity + 0x24; - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); if ((char *)0x1f < - (char *)(anm2Path._buf._0_4_ + (-4 - (int)*(char **)(anm2Path._buf._0_4_ + -4)))) { + (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(*(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -213,7 +213,7 @@ void GridEntity_TrapDoor::BeginBatches() tmpPath[0] = (char *)0x0; ((std::string *)((char *)tmpPath))->std::string::assign((byte *)"gfx/grid/Door_11_TrapDoor.anm2",0x1e); local_8 = 9; - ((ANM2 *)((ANM2 *)((int)local_54.y + 0x40)))->ANM2::Load((std_string *)tmpPath,1); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(local_54.y) + 0x40)))->ANM2::Load((std_string *)tmpPath,1); local_8 = 0xffffffff; if (0xf < tmpPathCapacity) { uVar3 = tmpPathCapacity + 1; @@ -221,13 +221,13 @@ void GridEntity_TrapDoor::BeginBatches() if (0xfff < uVar3) { freeBlock = *(char **)(tmpPath[0] + -4); uVar3 = tmpPathCapacity + 0x24; - if ((char *)0x1f < tmpPath[0] + (-4 - (int)freeBlock)) goto LAB_0071f7a4; + if ((char *)0x1f < tmpPath[0] + (-4 - GHIDRA_INT(freeBlock))) goto LAB_0071f7a4; } operator_delete(freeBlock,uVar3); } tmpPathSize = 0; tmpPathCapacity = 0xf; - tmpPath[0] = (char *)((uint)tmpPath[0] & 0xffffff00); + tmpPath[0] = (char *)(GHIDRA_UINT(tmpPath[0]) & 0xffffff00); goto LAB_0071feb0; } anm2Path._size = 0; @@ -236,34 +236,34 @@ void GridEntity_TrapDoor::BeginBatches() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1e; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/grid/Door_11_Wombhole.anm2",0x1f); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/grid/Door_11_Wombhole.anm2",0x1f); local_8 = 6; - ((ANM2 *)((ANM2 *)((int)local_54.y + 0x40)))->ANM2::Load(&anm2Path,0); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(local_54.y) + 0x40)))->ANM2::Load(&anm2Path,0); local_8 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)freeBlock))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) goto LAB_0071f7a4; } operator_delete(freeBlock,uVar3); } anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = anm2Path._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) & 0xffffff00; if (local_4c == -8) { tmpPath[0] = std::_Allocate(0x30); tmpPathSize = 0x22; tmpPathCapacity = 0x2f; builtin_strncpy(tmpPath[0],"gfx/grid/door_11_wombhole_blue.png",0x23); local_8 = 7; - ((Sprite *)((Sprite *)((int)local_54.y + 0x40)))->Sprite::ReplaceSpritesheet(0,(std_string *)tmpPath); + ((Sprite *)((Sprite *)(GHIDRA_INT(local_54.y) + 0x40)))->Sprite::ReplaceSpritesheet(0,(std_string *)tmpPath); local_8 = 0xffffffff; bVar1 = extraout_CL; if (0xf < tmpPathCapacity) { @@ -271,7 +271,7 @@ void GridEntity_TrapDoor::BeginBatches() freeBlock = tmpPath[0]; if (0xfff < uVar3) { freeBlock = *(char **)(tmpPath[0] + -4); - pcVar2 = tmpPath[0] + (-4 - (int)freeBlock); + pcVar2 = tmpPath[0] + (-4 - GHIDRA_INT(freeBlock)); joined_r0x0071fe08: uVar3 = tmpPathCapacity + 0x24; if ((char *)0x1f < pcVar2) { @@ -293,7 +293,7 @@ LAB_0071fe0e: if (iVar4 == 7) { bVar1 = ((Level *)((Level *)g_game))->Level::IsAltPath(); if (bVar1 == 0) { - ((ANM2 *)((ANM2 *)((int)local_54.y + 0x40)))->ANM2::LoadGraphics(unk); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(local_54.y) + 0x40)))->ANM2::LoadGraphics(unk); goto LAB_0071feb0; } } @@ -309,7 +309,7 @@ LAB_0071fe0e: tmpPathCapacity = 0x1f; builtin_strncpy(tmpPath[0],"gfx/grid/door_11_corpsehole.png",0x20); local_8 = 8; - ((Sprite *)((Sprite *)((int)local_54.y + 0x40)))->Sprite::ReplaceSpritesheet(0,(std_string *)tmpPath); + ((Sprite *)((Sprite *)(GHIDRA_INT(local_54.y) + 0x40)))->Sprite::ReplaceSpritesheet(0,(std_string *)tmpPath); local_8 = 0xffffffff; bVar1 = extraout_CL_03; if (0xf < tmpPathCapacity) { @@ -317,14 +317,14 @@ LAB_0071fe0e: freeBlock = tmpPath[0]; if (0xfff < uVar3) { freeBlock = *(char **)(tmpPath[0] + -4); - pcVar2 = tmpPath[0] + (-4 - (int)freeBlock); + pcVar2 = tmpPath[0] + (-4 - GHIDRA_INT(freeBlock)); goto joined_r0x0071fe08; } goto LAB_0071fe0e; } } LAB_0071fe18: - ((ANM2 *)((ANM2 *)((int)local_54.y + 0x40)))->ANM2::LoadGraphics(bVar1); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(local_54.y) + 0x40)))->ANM2::LoadGraphics(bVar1); goto LAB_0071feb0; } anm2Path._size = 0; @@ -333,22 +333,22 @@ LAB_0071fe18: anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x30); anm2Path._size = 0x21; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/grid/trapdoor_corpse_big.anm2",0x22); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/grid/trapdoor_corpse_big.anm2",0x22); local_8 = 5; LAB_0071f766: anm2Path._capacity = 0x2f; - ((ANM2 *)((ANM2 *)((int)local_54.y + 0x40)))->ANM2::Load(&anm2Path,1); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(local_54.y) + 0x40)))->ANM2::Load(&anm2Path,1); local_8 = 0xffffffff; if (anm2Path._capacity < 0x10) goto LAB_0071feb0; uVar3 = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { uVar3 = anm2Path._capacity + 0x24; - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); if ((char *)0x1f < - (char *)(anm2Path._buf._0_4_ + (-4 - (int)*(char **)(anm2Path._buf._0_4_ + -4)))) + (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(*(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4))))) goto LAB_0071f7a4; } } @@ -356,8 +356,8 @@ LAB_0071fb7a: local_8 = 0xffffffff; operator_delete(freeBlock,uVar3); LAB_0071feb0: - ((GridEntityDesc *)((int)local_54.y + 4))->_state = 0; - ((ANM2 *)((ANM2 *)((int)local_54.y + 0x40)))->ANM2::Play((byte *)"Closed",0); + ((GridEntityDesc *)(GHIDRA_INT(local_54.y) + 4))->_state = 0; + ((ANM2 *)((ANM2 *)(GHIDRA_INT(local_54.y) + 0x40)))->ANM2::Play((byte *)"Closed",0); ExceptionList = local_10; return; } @@ -425,7 +425,7 @@ void GridEntity_TrapDoor::Update() local_8 = (char ******)0xffffffff; puStack_c = &LAB_00afccc9; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(spritePath + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((spritePath + 10)); ExceptionList = &local_10; local_54 = 0; *(int *)&(*(undefined1 *)((char *)(this) + 0x154)) = *(int *)&(*(undefined1 *)((char *)(this) + 0x154)) + 1; @@ -434,7 +434,7 @@ void GridEntity_TrapDoor::Update() local_4c.y = (float)(this->_gridIndex / iVar15) * 40.0 + 120.0; savedTrapDoor = this; local_44 = Game::GetNearestPlayerEx(&local_4c,1,0,0); - local_34._0_1_ = false; + (*(undefined1 *)((char *)&(local_34) + 0x0)) = false; local_40 = 1e+09; local_58 = 21.0; pvVar14 = g_game->_room; @@ -450,53 +450,53 @@ void GridEntity_TrapDoor::Update() iVar15 = this->_gridIndex; if (local_44 == (Entity_Player *)0x0) { local_3c = *(int **)((char *)pvVar14 + 0xc); - local_34._1_3_ = extraout_var; + (*(undefined1 *)((char *)&(local_34) + 0x1)) = extraout_var; } else { local_3c = *(int **)((char *)pvVar14 + 0xc); - deltaY = ((float)(iVar15 / (int)local_3c) * 40.0 + 120.0) - (local_44->_pos).y; - deltaX = ((float)(iVar15 % (int)local_3c) * 40.0 + 40.0) - (local_44->_pos).x; + deltaY = ((float)(iVar15 / GHIDRA_INT(local_3c)) * 40.0 + 120.0) - (local_44->_pos).y; + deltaX = ((float)(iVar15 % GHIDRA_INT(local_3c)) * 40.0 + 40.0) - (local_44->_pos).x; local_40 = sqrtf(deltaY * deltaY + deltaX * deltaX); - local_34._0_1_ = local_40 < 50.0; - local_34._1_3_ = (undefined3)((uint)extraout_EDX >> 8); + (*(undefined1 *)((char *)&(local_34) + 0x0)) = local_40 < 50.0; + (*(undefined1 *)((char *)&(local_34) + 0x1)) = (undefined3)(GHIDRA_UINT(extraout_EDX) >> 8); } if (((g_manager->_netplayManager != *(NetplayManager *)(g_manager + 1)) && - (1 < (uint)((int)*(NetplayManager *)(g_manager + 1) - (int)g_manager->_netplayManager >> 2))) + (1 < GHIDRA_UINT((GHIDRA_INT(*(NetplayManager *)(g_manager + 1)) - GHIDRA_INT(g_manager->_netplayManager) >> 2)))) && (((this->_desc)._spawnCount < 2 && ((*(int *)((char *)pvVar14 + 8) == 5 && (local_35 == '\0'))) ))) { - local_34._1_3_ = (undefined3)((uint)this >> 8); + (*(undefined1 *)((char *)&(local_34) + 0x1)) = (undefined3)(GHIDRA_UINT(this) >> 8); if (((bool)(char)local_34 == false) && (0x95 < *(uint *)&(*(undefined1 *)((char *)(this) + 0x154)))) { - local_34._0_1_ = false; + (*(undefined1 *)((char *)&(local_34) + 0x0)) = false; } else { - local_34._0_1_ = true; + (*(undefined1 *)((char *)&(local_34) + 0x0)) = true; } } - uVar4 = local_34._1_3_; + uVar4 = (*(undefined1 *)((char *)&(local_34) + 0x1)); bVar17 = (bool)(char)local_34; - local_4c.x = (float)(iVar15 % (int)local_3c) * 40.0 + 40.0; - local_4c.y = (float)(iVar15 / (int)local_3c) * 40.0 + 120.0; - EntityList::QueryRadius((EntityList *)((int)pvVar14 + 0x1218),&nearbyEntities,&local_4c,20.0,1); + local_4c.x = (float)(iVar15 % GHIDRA_INT(local_3c)) * 40.0 + 40.0; + local_4c.y = (float)(iVar15 / GHIDRA_INT(local_3c)) * 40.0 + 120.0; + EntityList::QueryRadius((EntityList *)(GHIDRA_INT(pvVar14) + 0x1218),&nearbyEntities,&local_4c,20.0,1); preventedCurses = 0; local_8 = (char ******)0x0; if (nearbyEntities._size != 0) { do { - local_34._1_3_ = uVar4; - local_34._0_1_ = bVar17; + (*(undefined1 *)((char *)&(local_34) + 0x1)) = uVar4; + (*(undefined1 *)((char *)&(local_34) + 0x0)) = bVar17; if ((bool)(char)local_34 != false) break; iVar15 = *(int *)((char *)nearbyEntities._data + preventedCurses * 4); if (*(int *)(iVar15 + 0x28) == 3) { - local_34._0_1_ = false; - local_34._1_3_ = 0; + (*(undefined1 *)((char *)&(local_34) + 0x0)) = false; + (*(undefined1 *)((char *)&(local_34) + 0x1)) = 0; if (*(int *)(iVar15 + 0x2c) == 900) { - local_34._0_1_ = true; - local_34._1_3_ = 0; + (*(undefined1 *)((char *)&(local_34) + 0x0)) = true; + (*(undefined1 *)((char *)&(local_34) + 0x1)) = 0; } } preventedCurses = preventedCurses + 1; bVar17 = (bool)(char)local_34; - uVar4 = local_34._1_3_; - } while (preventedCurses < (uint)nearbyEntities._size); + uVar4 = (*(undefined1 *)((char *)&(local_34) + 0x1)); + } while (preventedCurses < GHIDRA_UINT(nearbyEntities._size)); } if ((((g_game->_difficulty != 2) && (g_game->_difficulty != 3)) && (pEVar6 = PlayerManager::FirstCollectibleOwner @@ -515,41 +515,41 @@ void GridEntity_TrapDoor::Update() if (iVar7 == 6) { if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (char ******)((uint)local_8._1_3_ << 8); + local_8 = (char ******)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8); _Init_thread_footer(&g_invalidRoomDescriptorGuard); } roomDesc = &g_roomDescriptorDummy; - if ((uint)game->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(game->_currentDimensionIdx) < 3) { roomDesc = game->_roomList + 0x1ff; } - if (((uint)roomDesc->Flags >> 3 & 1) == 0) { - local_34._0_1_ = '\x01'; + if ((GHIDRA_UINT(roomDesc->Flags) >> 3 & 1) == 0) { + (*(undefined1 *)((char *)&(local_34) + 0x0)) = '\x01'; } - local_34._1_3_ = 0; + (*(undefined1 *)((char *)&(local_34) + 0x1)) = 0; } } game = g_game; local_4c.y = *(float *)((char *)g_game->_room + 8); if (((Entity_Player *)local_4c.y == (Entity_Player *)0x1b) && ((*(byte *)(*(int *)((char *)g_game->_room + 4) + 0x44) & 1) == 0)) { - local_34._0_1_ = '\x01'; + (*(undefined1 *)((char *)&(local_34) + 0x0)) = '\x01'; } local_3c = (int *)g_game->_stage; - if (((0 < (int)local_3c) && ((int)local_3c < 7)) && + if (((0 < GHIDRA_INT(local_3c)) && (GHIDRA_INT(local_3c) < 7)) && ((g_game->_gameStateFlags & 0x1000000000000) != 0)) { - local_34._0_1_ = '\x01'; + (*(undefined1 *)((char *)&(local_34) + 0x0)) = '\x01'; } if ((g_game->_dailyChallenge)._id == 0) { pvVar14 = (g_manager->_challengeParams)._begin; - uVar11 = ((int)(g_manager->_challengeParams)._end - (int)pvVar14) / 0xa4 - 1; - preventedCurses = -(uint)(g_game->_challenge != 0) & g_game->_challenge; + uVar11 = (GHIDRA_INT((g_manager->_challengeParams)._end) - GHIDRA_INT(pvVar14)) / 0xa4 - 1; + preventedCurses = -GHIDRA_UINT((g_game->_challenge != 0)) & g_game->_challenge; if (uVar11 <= preventedCurses) { preventedCurses = uVar11; } - challengeParams = (ChallengeParam *)(preventedCurses * 0xa4 + (int)pvVar14); + challengeParams = (ChallengeParam *)(preventedCurses * 0xa4 + GHIDRA_INT(pvVar14)); } else { challengeParams = &(g_game->_dailyChallenge)._params; @@ -559,7 +559,7 @@ void GridEntity_TrapDoor::Update() uVar11 = g_game->_debugCurses; forcedCurses = Seeds::GetForcedCurses(); preventedCurses = Seeds::GetPreventedCurses(); - piVar12 = (int *)((int)local_3c + 1); + piVar12 = (int *)(GHIDRA_INT(local_3c) + 1); if ((~preventedCurses & (forcedCurses | preventedCurses | uVar11) & 2) == 0) { piVar12 = local_3c; } @@ -633,7 +633,7 @@ LAB_00720469: bVar17 = bVar5 < (byte)*pcVar13; if (bVar5 != *pcVar13) { LAB_00720453: - preventedCurses = -(uint)bVar17 | 1; + preventedCurses = -GHIDRA_UINT(bVar17) | 1; goto LAB_00720458; } if (bVar5 == 0) break; @@ -678,7 +678,7 @@ LAB_007205c9: bVar17 = bVar5 < (byte)*pcVar13; if (bVar5 != *pcVar13) { LAB_00720600: - preventedCurses = -(uint)bVar17 | 1; + preventedCurses = -GHIDRA_UINT(bVar17) | 1; goto LAB_00720605; } if (bVar5 == 0) break; @@ -712,7 +712,7 @@ LAB_00720605: bVar17 = bVar5 < (byte)*pcVar13; if (bVar5 != *pcVar13) { LAB_007205c0: - preventedCurses = -(uint)bVar17 | 1; + preventedCurses = -GHIDRA_UINT(bVar17) | 1; goto joined_r0x007205c7; } if (bVar5 == 0) break; @@ -734,7 +734,7 @@ LAB_007205c0: bVar17 = bVar5 < (byte)*pcVar13; if (bVar5 != *pcVar13) { LAB_00720580: - preventedCurses = -(uint)bVar17 | 1; + preventedCurses = -GHIDRA_UINT(bVar17) | 1; goto joined_r0x007205c7; } if (bVar5 == 0) break; @@ -767,7 +767,7 @@ LAB_00720701: bVar17 = bVar5 < (byte)*pcVar13; if (bVar5 != *pcVar13) { LAB_00720690: - preventedCurses = -(uint)bVar17 | 1; + preventedCurses = -GHIDRA_UINT(bVar17) | 1; goto LAB_00720695; } if (bVar5 == 0) break; @@ -783,7 +783,7 @@ LAB_00720695: local_4c.y = (trapDoor->_sprite)._animState._animFrame; dVar18 = floor((double)local_4c.y); local_4c.y = (float)dVar18; - if ((int)dVar18 != 1) goto LAB_00720701; + if (GHIDRA_INT(dVar18) != 1) goto LAB_00720701; ((std::string *)((char *)spritePath))->std::string::string(&trapDoor->_sprite); local_54 = 3; pppppppcVar9 = (char *******)spritePath; @@ -802,7 +802,7 @@ LAB_00720695: if (0xfff < preventedCurses) { pppppppcVar9 = (char *******)spritePath[0][-1]; preventedCurses = spritePathCapacity + 0x24; - if ((char *)0x1f < (char *)((int)spritePath[0] + (-4 - (int)pppppppcVar9))) { + if ((char *)0x1f < (char *)(GHIDRA_INT(spritePath[0]) + (-4 - GHIDRA_INT(pppppppcVar9)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -812,7 +812,7 @@ LAB_00720695: } spritePathSize = 0; spritePathCapacity = 0xf; - spritePath[0] = (char *******)((uint)spritePath[0] & 0xffffff00); + spritePath[0] = (char *******)(GHIDRA_UINT(spritePath[0]) & 0xffffff00); } manager = g_manager; if (local_2d != '\0') { @@ -856,7 +856,7 @@ LAB_007207ef: bVar17 = bVar5 < (byte)*pcVar13; if (bVar5 != *pcVar13) { LAB_007207d1: - preventedCurses = -(uint)bVar17 | 1; + preventedCurses = -GHIDRA_UINT(bVar17) | 1; goto LAB_007207d6; } if (bVar5 == 0) break; @@ -891,7 +891,7 @@ LAB_007207d6: bVar17 = bVar5 < (byte)*pcVar13; if (bVar5 != *pcVar13) { LAB_007208b0: - preventedCurses = -(uint)bVar17 | 1; + preventedCurses = -GHIDRA_UINT(bVar17) | 1; goto LAB_007208b5; } if (bVar5 == 0) break; @@ -936,24 +936,24 @@ LAB_007208e8: if (local_35 != '\0') { local_40 = 1.47417e-42; seed_fart_sound_override((int *)&local_40); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_40,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_40),1.0,2,0,1.0,0.0); game = g_game; g_game->_leaveDoor = -1; Game::StartRoomTransition(game,-10,-1,0x16,local_44,-1); preventedCurses = 0; playerManager = &g_game->_playerManager; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar14 = (playerManager->_playerList)._end; - if ((int)pvVar14 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar14) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar14 = (playerManager->_playerList)._end; game = g_game; } playerSlot = (playerManager->_playerList)._begin; - if (preventedCurses < (uint)((int)pvVar14 - (int)playerSlot >> 2)) { + if (preventedCurses < GHIDRA_UINT((GHIDRA_INT(pvVar14) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + preventedCurses; } pEVar6 = (Entity_Player *)*playerSlot; @@ -967,8 +967,8 @@ LAB_007208e8: } playerManager = &game->_playerManager; preventedCurses = preventedCurses + 1; - } while (preventedCurses < (uint)((int)(game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (preventedCurses < GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } goto LAB_00720a92; } @@ -978,21 +978,21 @@ LAB_007208e8: else { local_40 = 1.47417e-42; seed_fart_sound_override((int *)&local_40); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_40,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_40),1.0,2,0,1.0,0.0); if ((*(int *)((char *)g_game->_room + 8) == 0x1b) || (bVar5 = ((Level *)((Level *)g_game))->Level::IsMausoleumHeartStage(), bVar5 != 0)) { game = g_game; qVar3 = g_game->_gameStateFlags; - puVar1 = (uint *)((int)&g_game->_gameStateFlags + 4); + puVar1 = (uint *)(GHIDRA_INT(&g_game->_gameStateFlags) + 4); *puVar1 = *puVar1 | 0x1000; - *(int *)&game->_gameStateFlags = (int)qVar3; + *(int *)&game->_gameStateFlags = GHIDRA_INT(qVar3); bVar5 = ((Level *)((Level *)game))->Level::HasPhotoDoor(); game = g_game; if (bVar5 == 0) goto LAB_00720c10; qVar3 = g_game->_gameStateFlags; - puVar1 = (uint *)((int)&g_game->_gameStateFlags + 4); + puVar1 = (uint *)(GHIDRA_INT(&g_game->_gameStateFlags) + 4); *puVar1 = *puVar1 | 0x8000; - *(int *)&game->_gameStateFlags = (int)qVar3; + *(int *)&game->_gameStateFlags = GHIDRA_INT(qVar3); } else { LAB_00720c10: @@ -1051,8 +1051,8 @@ LAB_00720d35: Game::StartRoomTransition(g_game,g_game->_startingRoomIdx,-1,0x16,local_44,0); preventedCurses = 0; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { local_4c.y = (float)((Game *)(game))->Game::GetPlayer(preventedCurses); if (((Entity_Player *)local_4c.y)->_variant == 0) { @@ -1060,15 +1060,15 @@ LAB_00720d35: game = g_game; iVar15 = trapDoor->_gridIndex; iVar7 = *(int *)((char *)g_game->_room + 0xc); - ((Vector *)((int)local_4c.y + 0x1b1c))->x = (float)(iVar15 % iVar7) * 40.0 + 40.0; - ((Vector *)((int)local_4c.y + 0x1b1c))->y = (float)(iVar15 / iVar7) * 40.0 + 120.0; + ((Vector *)(GHIDRA_INT(local_4c.y) + 0x1b1c))->x = (float)(iVar15 % iVar7) * 40.0 + 40.0; + ((Vector *)(GHIDRA_INT(local_4c.y) + 0x1b1c))->y = (float)(iVar15 / iVar7) * 40.0 + 120.0; } else { game = g_game; } preventedCurses = preventedCurses + 1; - } while (preventedCurses < (uint)((int)(game->_playerManager)._playerList._end - - (int)(game->_playerManager)._playerList._begin >> 2)); + } while (preventedCurses < GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((game->_playerManager)._playerList._begin) >> 2))); pEVar6 = local_44; goto LAB_00720b0f; } @@ -1119,13 +1119,13 @@ LAB_00720a92: local_4c.y = (float)(iVar15 % *(int *)(pcVar13 + 0xc)) * 40.0 + 40.0; local_40 = (float)(iVar15 / *(int *)(pcVar13 + 0xc)) * 40.0 + 120.0; local_58 = (float)(*(uint *)(pcVar13 + 0x70fc) & 0x80000001); - if ((int)local_58 < 0) { - local_58 = (float)(((int)local_58 - 1U | 0xfffffffe) + 1); + if (GHIDRA_INT(local_58) < 0) { + local_58 = (float)((GHIDRA_INT(local_58) - 1U | 0xfffffffe) + 1); } - if (1 < (uint)local_58) { + if (1 < GHIDRA_UINT(local_58)) { KAGE_LogMessage(0x10,(byte *)"Shockwave id is too large!"); } - iVar15 = (int)local_58 + 0x407; + iVar15 = GHIDRA_INT(local_58) + 0x407; *(float *)(pcVar13 + iVar15 * 0x1c) = local_4c.y; *(float *)(pcVar13 + iVar15 * 0x1c + 4) = local_40; pcVar2 = pcVar13 + iVar15 * 0x1c + 8; @@ -1150,20 +1150,20 @@ LAB_00720a92: ((AnimationState *)(&(trapDoor->_sprite)._animState))->AnimationState::Update(); ((AnimationState *)(&(trapDoor->_sprite)._overlayAnimState))->AnimationState::Update(); } - if (nearbyEntities._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(nearbyEntities) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (nearbyEntities._data != (void *)0x0) { preventedCurses = *(uint *)((char *)nearbyEntities._data + -4); qVar3 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - preventedCurses; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - preventedCurses; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar3 < preventedCurses); - free((void *)((int)nearbyEntities._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar3) < preventedCurses)); + free((void *)(GHIDRA_INT(nearbyEntities._data) + -4)); } } ExceptionList = local_10; diff --git a/src/game/grid_entity_wall.cpp b/src/game/grid_entity_wall.cpp index 3f169a1..0f43225 100644 --- a/src/game/grid_entity_wall.cpp +++ b/src/game/grid_entity_wall.cpp @@ -22,11 +22,11 @@ void GridEntity_Wall::BeginBatches() local_8 = 0xffffffff; puStack_c = &LAB_00afcd0d; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&bossDungeonAnm2Path)[1]._size; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&bossDungeonAnm2Path)[1]._size); ExceptionList = &local_10; this->_collisionClass = 4; room = game->_room; - if ((uint)this->_gridIndex < 0x1c0) { + if (GHIDRA_UINT(this->_gridIndex) < 0x1c0) { *(undefined4 *)((char *)room + this->_gridIndex * 4 + 0x76c) = 1000; room = game->_room; } @@ -41,10 +41,10 @@ void GridEntity_Wall::BeginBatches() bossDungeonAnm2Path._buf[1] = '\0'; bossDungeonAnm2Path._buf[2] = '\0'; bossDungeonAnm2Path._buf[3] = '\0'; - bossDungeonAnm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(bossDungeonAnm2Path._buf) + 0x0)) = std::_Allocate(0x30); bossDungeonAnm2Path._size = 0x26; bossDungeonAnm2Path._capacity = 0x2f; - builtin_strncpy((char *)bossDungeonAnm2Path._buf._0_4_,"gfx/grid/Tiles_Itemdungeon_Gideon.anm2", + builtin_strncpy((*(undefined4 *)((char *)&((char *)bossDungeonAnm2Path._buf) + 0x0)),"gfx/grid/Tiles_Itemdungeon_Gideon.anm2", 0x27); local_8 = 0; } @@ -56,17 +56,17 @@ void GridEntity_Wall::BeginBatches() dungeonAnm2Path._buf[1] = '\0'; dungeonAnm2Path._buf[2] = '\0'; dungeonAnm2Path._buf[3] = '\0'; - dungeonAnm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(dungeonAnm2Path._buf) + 0x0)) = std::_Allocate(0x20); dungeonAnm2Path._size = 0x1f; dungeonAnm2Path._capacity = 0x1f; - builtin_strncpy((char *)dungeonAnm2Path._buf._0_4_,"gfx/grid/Tiles_Itemdungeon.anm2",0x20); + builtin_strncpy((*(undefined4 *)((char *)&((char *)dungeonAnm2Path._buf) + 0x0)),"gfx/grid/Tiles_Itemdungeon.anm2",0x20); local_8 = 2; ((ANM2 *)(&this->_sprite))->ANM2::Load(&dungeonAnm2Path,1); if (dungeonAnm2Path._capacity < 0x10) { ExceptionList = local_10; return; } - pathBuffer = (char *)dungeonAnm2Path._buf._0_4_; + pathBuffer = (*(undefined4 *)((char *)&((char *)dungeonAnm2Path._buf) + 0x0)); pathCapacity = dungeonAnm2Path._capacity; goto LAB_007211c8; } @@ -76,10 +76,10 @@ void GridEntity_Wall::BeginBatches() bossDungeonAnm2Path._buf[1] = '\0'; bossDungeonAnm2Path._buf[2] = '\0'; bossDungeonAnm2Path._buf[3] = '\0'; - bossDungeonAnm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(bossDungeonAnm2Path._buf) + 0x0)) = std::_Allocate(0x20); bossDungeonAnm2Path._size = 0x1a; bossDungeonAnm2Path._capacity = 0x1f; - builtin_strncpy((char *)bossDungeonAnm2Path._buf._0_4_,"gfx/grid/Tiles_Rotgut.anm2",0x1b); + builtin_strncpy((*(undefined4 *)((char *)&((char *)bossDungeonAnm2Path._buf) + 0x0)),"gfx/grid/Tiles_Rotgut.anm2",0x1b); local_8 = 1; } ((ANM2 *)(&this->_sprite))->ANM2::Load(&bossDungeonAnm2Path,1); @@ -87,7 +87,7 @@ void GridEntity_Wall::BeginBatches() ExceptionList = local_10; return; } - pathBuffer = (char *)bossDungeonAnm2Path._buf._0_4_; + pathBuffer = (*(undefined4 *)((char *)&((char *)bossDungeonAnm2Path._buf) + 0x0)); pathCapacity = bossDungeonAnm2Path._capacity; LAB_007211c8: size = pathCapacity + 1; @@ -95,7 +95,7 @@ LAB_007211c8: if (0xfff < size) { ptr = *(char **)(pathBuffer + -4); size = pathCapacity + 0x24; - if ((char *)0x1f < pathBuffer + (-4 - (int)ptr)) { + if ((char *)0x1f < pathBuffer + (-4 - GHIDRA_INT(ptr))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -121,7 +121,7 @@ void GridEntity_Wall::guard_check_icall() uint gridWidth; Room *room; - local_c = __security_cookie ^ (uint)&local_34; + local_c = __security_cookie ^ GHIDRA_UINT(&local_34); room = g_game->_room; if (room->_roomType != 0x10) { return; @@ -146,13 +146,13 @@ void GridEntity_Wall::guard_check_icall() return; } gridWidth = room->_gridWidth; - row = (uint)this->_gridIndex / gridWidth; - column = (uint)this->_gridIndex % gridWidth; + row = GHIDRA_UINT(this->_gridIndex) / gridWidth; + column = GHIDRA_UINT(this->_gridIndex) % gridWidth; iVar1 = row - 1; - if (((((int)column < 0) || ((int)gridWidth <= (int)column)) || (iVar1 < 0)) || + if ((((GHIDRA_INT(column) < 0) || (GHIDRA_INT(gridWidth) <= GHIDRA_INT(column))) || (iVar1 < 0)) || (room->_gridHeight <= iVar1)) { pvVar2 = (void *)0x0; - if ((-1 < (int)column) && ((int)column < (int)gridWidth)) goto LAB_00721391; + if ((-1 < GHIDRA_INT(column)) && (GHIDRA_INT(column) < GHIDRA_INT(gridWidth))) goto LAB_00721391; } else { iVar1 = gridWidth * iVar1 + column; @@ -186,7 +186,7 @@ LAB_007213a9: iVar1 = *(int *)((char *)pvVar2 + 0x30); isAnimSet = ((ANM2 *)(&this->_sprite))->ANM2::SetAnimation((byte *)local_34.x,1); if (((isAnimSet != 0) && ((this->_sprite)._animState._animData != (void *)0x0)) && - (((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)((int)column % iVar1)), + (((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)(GHIDRA_INT(column) % iVar1)), (this->_sprite)._animState._animData != (void *)0x0)) { (this->_sprite)._animState._isPlaying = 0; return; diff --git a/src/game/grid_entity_web.cpp b/src/game/grid_entity_web.cpp index d9f5580..f133135 100644 --- a/src/game/grid_entity_web.cpp +++ b/src/game/grid_entity_web.cpp @@ -19,7 +19,7 @@ void GridEntity_Web::BeginBatches() local_8 = 0xffffffff; puStack_c = &LAB_00afc99d; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&anmPath)[1]._size; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&anmPath)[1]._size); ExceptionList = &local_10; this->_collisionClass = 0; anmPath._size = 0; @@ -28,20 +28,20 @@ void GridEntity_Web::BeginBatches() anmPath._buf[1] = '\0'; anmPath._buf[2] = '\0'; anmPath._buf[3] = '\0'; - anmPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = std::_Allocate(0x20); anmPath._size = 0x16; anmPath._capacity = 0x1f; - builtin_strncpy((char *)anmPath._buf._0_4_,"gfx/grid/grid_web.anm2",0x17); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)),"gfx/grid/grid_web.anm2",0x17); local_8 = 0; ((ANM2 *)(&this->_sprite))->ANM2::Load(&anmPath,1); local_8 = 0xffffffff; if (0xf < anmPath._capacity) { startFrame = anmPath._capacity + 1; - pcVar2 = (char *)anmPath._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)); if (0xfff < startFrame) { - pcVar2 = *(char **)(anmPath._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + -4); startFrame = anmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(anmPath._buf._0_4_ + (-4 - (int)pcVar2))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -50,7 +50,7 @@ void GridEntity_Web::BeginBatches() } anmPath._size = 0; anmPath._capacity = 0xf; - anmPath._buf._0_4_ = anmPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) & 0xffffff00; if ((this->_desc)._state != 0) { bVar1 = ((ANM2 *)(&this->_sprite))->ANM2::SetAnimation((byte *)"Bombed",1); if (bVar1 == 0) { @@ -81,7 +81,7 @@ void GridEntity_Web::BeginBatches() bVar4 = bVar1 < (byte)*pcVar2; if (bVar1 != *pcVar2) { LAB_00721670: - startFrame = -(uint)bVar4 | 1; + startFrame = -GHIDRA_UINT(bVar4) | 1; goto LAB_00721675; } if (bVar1 == 0) break; @@ -94,7 +94,7 @@ LAB_00721670: startFrame = 0; LAB_00721675: if ((startFrame == 0) && - ((*(char *)((int)(this->_sprite)._animState._animData + 0x34) == '\0' || + ((*(char *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x34) == '\0' || ((this->_sprite)._animState._isPlaying != 0)))) goto LAB_007216ad; } bVar1 = ((ANM2 *)(&this->_sprite))->ANM2::SetAnimation((byte *)"Swaying",1); @@ -113,7 +113,7 @@ LAB_007216ad: animData = (this->_sprite)._animState._animData; } if ((animData != (void *)0x0) && - (((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)(int)startFrame), + (((AnimationState *)(&(this->_sprite)._animState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(startFrame)), (this->_sprite)._animState._animData != (void *)0x0)) { (this->_sprite)._animState._isPlaying = 0; } @@ -146,23 +146,23 @@ void GridEntity_Web::Update() if ((this->_desc)._state == 0) { uVar3 = g_game->_frameCount & 0x80000003; isEveryFourthFrame = uVar3 == 0; - if ((int)uVar3 < 0) { + if (GHIDRA_INT(uVar3) < 0) { isEveryFourthFrame = (uVar3 - 1 | 0xfffffffc) == 0xffffffff; } if (isEveryFourthFrame) { playerManager = &g_game->_playerManager; uVar3 = 0; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { playersEnd = (playerManager->_playerList)._end; puVar4 = (playerManager->_playerList)._begin; - if ((int)playersEnd - (int)puVar4 >> 2 == 0) { + if (GHIDRA_INT(playersEnd) - GHIDRA_INT(puVar4) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playersEnd = (playerManager->_playerList)._end; puVar4 = (playerManager->_playerList)._begin; } - if (uVar3 < (uint)((int)playersEnd - (int)puVar4 >> 2)) { + if (uVar3 < GHIDRA_UINT((GHIDRA_INT(playersEnd) - GHIDRA_INT(puVar4) >> 2))) { puVar4 = puVar4 + uVar3; } player = (Entity_Player *)*puVar4; @@ -196,14 +196,14 @@ void GridEntity_Web::Update() sourceRef._entity = (void *)0x0; auVar2 = ZEXT1632(CONCAT412(0x3f800000,CONCAT48(0x3fa66666,0x3f8000003f800000))); color._offset[0] = 0.15686275; - color._tint[0] = (float)auVar2._0_4_; - color._tint[1] = (float)auVar2._4_4_; - color._tint[2] = (float)auVar2._8_4_; - color._tint[3] = (float)auVar2._12_4_; - color._colorize[0] = (float)auVar2._16_4_; - color._colorize[1] = (float)auVar2._20_4_; - color._colorize[2] = (float)auVar2._24_4_; - color._colorize[3] = (float)auVar2._28_4_; + color._tint[0] = (*(undefined4 *)((char *)&((float)auVar2) + 0x0)); + color._tint[1] = (*(undefined4 *)((char *)&((float)auVar2) + 0x4)); + color._tint[2] = (*(undefined4 *)((char *)&((float)auVar2) + 0x8)); + color._tint[3] = (*(undefined4 *)((char *)&((float)auVar2) + 0xc)); + color._colorize[0] = (*(undefined4 *)((char *)&((float)auVar2) + 0x10)); + color._colorize[1] = (*(undefined4 *)((char *)&((float)auVar2) + 0x14)); + color._colorize[2] = (*(undefined4 *)((char *)&((float)auVar2) + 0x18)); + color._colorize[3] = (*(undefined4 *)((char *)&((float)auVar2) + 0x1c)); color._offset[1] = 0.15686275; color._offset[2] = 0.15686275; ((Entity *)((Entity *)player))->Entity::AddSlowing(&sourceRef,4,0.75,color,0); @@ -212,8 +212,8 @@ void GridEntity_Web::Update() LAB_007219cb: uVar3 = uVar3 + 1; playerManager = &g_game->_playerManager; - } while (uVar3 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar3 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } } diff --git a/src/game/hallucination_overlay.cpp b/src/game/hallucination_overlay.cpp index 49d992e..9470b28 100644 --- a/src/game/hallucination_overlay.cpp +++ b/src/game/hallucination_overlay.cpp @@ -14,7 +14,7 @@ void HallucinationOverlay::Render(Vector *offset) FUN_0040a400(); if (*(int *)((char *)this + 0x40) != 0) { AnimationState::SetFrameFloat - ((AnimationState *)((int)this + 0x3c), + ((AnimationState *)(GHIDRA_INT(this) + 0x3c), (float)*(int *)(*(int *)((char *)this + 8) + 0x1c)); } iVar1 = *(int *)((char *)this + 8); @@ -26,12 +26,12 @@ void HallucinationOverlay::Render(Vector *offset) (*(float *)(iVar1 + 0xc) - 140.0) * 0.65) * pixelScale + 0.5)); renderPos.x = renderPos.x + offset->x; renderPos.y = (float)dVar2 / pixelScale + offset->y; - ((ANM2 *)((ANM2 *)((int)this + 0xc)))->ANM2::Render(&renderPos,&g_vectorZero,&g_vectorZero); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0xc)))->ANM2::Render(&renderPos,&g_vectorZero,&g_vectorZero); if (-1 < *(int *)(*(int *)((char *)this + 8) + 0x20)) { FUN_0040a400(); if (*(int *)((char *)this + 0x40) != 0) { AnimationState::SetFrameFloat - ((AnimationState *)((int)this + 0x3c), + ((AnimationState *)(GHIDRA_INT(this) + 0x3c), (float)*(int *)(*(int *)((char *)this + 8) + 0x24)); } iVar1 = *(int *)((char *)this + 8); @@ -44,7 +44,7 @@ void HallucinationOverlay::Render(Vector *offset) dVar3 = floor((double)renderPos.x); renderPos.x = (float)dVar2 / pixelScale + offset->x; renderPos.y = (float)dVar3 / pixelScale + offset->y; - ((ANM2 *)((ANM2 *)((int)this + 0xc)))->ANM2::Render(&renderPos,&g_vectorZero,&g_vectorZero); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0xc)))->ANM2::Render(&renderPos,&g_vectorZero,&g_vectorZero); } } return; diff --git a/src/game/history.cpp b/src/game/history.cpp index f0e0cc3..5c26a7f 100644 --- a/src/game/history.cpp +++ b/src/game/history.cpp @@ -26,7 +26,7 @@ void History::AddHistoryItem(void *historyItem) do { if (*(int *)historyItem < *item) { FUN_00722250(&historyItem,item,historyItem); - iVar3 = ((int)item - (int)itemsBegin) / 0x1c + ((int)item - (int)itemsBegin >> 0x1f); + iVar3 = (GHIDRA_INT(item) - GHIDRA_INT(itemsBegin)) / 0x1c + (GHIDRA_INT(item) - GHIDRA_INT(itemsBegin) >> 0x1f); iVar2 = iVar3; goto LAB_00721b3f; } @@ -49,9 +49,9 @@ void History::AddHistoryItem(void *historyItem) *(undefined8 *)(itemsEnd + 4) = *(undefined8 *)((char *)historyItem + 0x10); itemsEnd[6] = *(int *)((char *)historyItem + 0x18); itemsEndPtr = &(this->_historyItems)._end; - *itemsEndPtr = (void *)((int)*itemsEndPtr + 0x1c); + *itemsEndPtr = (void *)(GHIDRA_INT(*itemsEndPtr) + 0x1c); } - iVar2 = (int)(this->_historyItems)._end - (int)(this->_historyItems)._begin; + iVar2 = GHIDRA_INT((this->_historyItems)._end) - GHIDRA_INT((this->_historyItems)._begin); iVar3 = iVar2 / 0x1c + (iVar2 >> 0x1f); iVar2 = iVar3 + -1; LAB_00721b3f: @@ -70,8 +70,8 @@ byte History::RemoveHistoryItemByIndex(int index) removedIndex = index; if (this->_isLocked == 0) { historyBegin = (this->_historyItems)._begin; - if (index < ((int)(this->_historyItems)._end - (int)historyBegin) / 0x1c) { - std::vector::erase(&index,(void *)((int)historyBegin + index * 0x1c)); + if (index < (GHIDRA_INT((this->_historyItems)._end) - GHIDRA_INT(historyBegin)) / 0x1c) { + std::vector::erase(&index,(void *)(GHIDRA_INT(historyBegin) + index * 0x1c)); remove_index_refs(this,removedIndex); HUD::mark_all_slots_dirty(&g_game->_hud,0,0); return 1; @@ -105,12 +105,12 @@ void History::merge(void *other) local_1c = ExceptionList; ExceptionList = &local_1c; if (this->_isLocked == 0) { - oldBegin._0_4_ = (int *)0x0; + (*(undefined4 *)((char *)&(oldBegin) + 0x0)) = (int *)0x0; oldCapacity = (void *)0x0; local_14 = 0; oldEnd = (int *)0x0; if ((History *)oldBegin != this) { - oldBegin._0_4_ = (this->_historyItems)._begin; + (*(undefined4 *)((char *)&(oldBegin) + 0x0)) = (this->_historyItems)._begin; oldCapacity = (this->_historyItems)._capacity; (this->_historyItems)._begin = (void *)0x0; oldEnd = (this->_historyItems)._end; @@ -119,16 +119,16 @@ void History::merge(void *other) } oldItem = *(int **)other; otherEnd = *(int **)((char *)other + 4); - oldItem = (int *)oldBegin._0_4_; - oldBegin._4_4_ = oldEnd; - oldBegin._8_4_ = oldCapacity; + oldItem = (*(undefined4 *)((char *)&((int *)oldBegin) + 0x0)); + (*(undefined4 *)((char *)&(oldBegin) + 0x4)) = oldEnd; + (*(undefined4 *)((char *)&(oldBegin) + 0x8)) = oldCapacity; history = this; while( true ) { while (oldItem != oldEnd) { if ((oldItem != otherEnd) && (*oldItem < *oldItem)) goto LAB_00721d9e; - oldBegin._12_4_ = (this->_historyItems)._end; - if ((void *)oldBegin._12_4_ == (this->_historyItems)._capacity) { - std::vector<28byte>::_Emplace_reallocate(oldBegin._12_4_,oldItem); + (*(undefined4 *)((char *)&(oldBegin) + 0xc)) = (this->_historyItems)._end; + if ((*(undefined4 *)((char *)&((void *)oldBegin) + 0xc)) == (this->_historyItems)._capacity) { + std::vector<28byte>::_Emplace_reallocate((*(undefined4 *)((char *)&(oldBegin) + 0xc)),oldItem); oldItem = oldItem + 7; this = history; } @@ -136,24 +136,24 @@ void History::merge(void *other) iVar2 = oldItem[1]; iVar3 = oldItem[2]; iVar4 = oldItem[3]; - *(int *)oldBegin._12_4_ = *oldItem; - *(int *)(oldBegin._12_4_ + 4) = iVar2; - *(int *)(oldBegin._12_4_ + 8) = iVar3; - *(int *)(oldBegin._12_4_ + 0xc) = iVar4; + *(*(undefined4 *)((char *)&((int *)oldBegin) + 0xc)) = *oldItem; + *(int *)((*(undefined4 *)((char *)&(oldBegin) + 0xc)) + 4) = iVar2; + *(int *)((*(undefined4 *)((char *)&(oldBegin) + 0xc)) + 8) = iVar3; + *(int *)((*(undefined4 *)((char *)&(oldBegin) + 0xc)) + 0xc) = iVar4; iVar2 = oldItem[5]; - *(int *)(oldBegin._12_4_ + 0x10) = oldItem[4]; - *(int *)(oldBegin._12_4_ + 0x14) = iVar2; - *(int *)(oldBegin._12_4_ + 0x18) = oldItem[6]; + *(int *)((*(undefined4 *)((char *)&(oldBegin) + 0xc)) + 0x10) = oldItem[4]; + *(int *)((*(undefined4 *)((char *)&(oldBegin) + 0xc)) + 0x14) = iVar2; + *(int *)((*(undefined4 *)((char *)&(oldBegin) + 0xc)) + 0x18) = oldItem[6]; ppvVar1 = &(this->_historyItems)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 0x1c); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 0x1c); oldItem = oldItem + 7; } } if (oldItem == otherEnd) break; LAB_00721d9e: - oldBegin._12_4_ = (this->_historyItems)._end; - if ((void *)oldBegin._12_4_ == (this->_historyItems)._capacity) { - std::vector<28byte>::_Emplace_reallocate(oldBegin._12_4_,oldItem); + (*(undefined4 *)((char *)&(oldBegin) + 0xc)) = (this->_historyItems)._end; + if ((*(undefined4 *)((char *)&((void *)oldBegin) + 0xc)) == (this->_historyItems)._capacity) { + std::vector<28byte>::_Emplace_reallocate((*(undefined4 *)((char *)&(oldBegin) + 0xc)),oldItem); oldItem = oldItem + 7; this = history; } @@ -161,27 +161,27 @@ LAB_00721d9e: iVar2 = oldItem[1]; iVar3 = oldItem[2]; iVar4 = oldItem[3]; - *(int *)oldBegin._12_4_ = *oldItem; - *(int *)(oldBegin._12_4_ + 4) = iVar2; - *(int *)(oldBegin._12_4_ + 8) = iVar3; - *(int *)(oldBegin._12_4_ + 0xc) = iVar4; + *(*(undefined4 *)((char *)&((int *)oldBegin) + 0xc)) = *oldItem; + *(int *)((*(undefined4 *)((char *)&(oldBegin) + 0xc)) + 4) = iVar2; + *(int *)((*(undefined4 *)((char *)&(oldBegin) + 0xc)) + 8) = iVar3; + *(int *)((*(undefined4 *)((char *)&(oldBegin) + 0xc)) + 0xc) = iVar4; iVar2 = oldItem[5]; - *(int *)(oldBegin._12_4_ + 0x10) = oldItem[4]; - *(int *)(oldBegin._12_4_ + 0x14) = iVar2; - *(int *)(oldBegin._12_4_ + 0x18) = oldItem[6]; + *(int *)((*(undefined4 *)((char *)&(oldBegin) + 0xc)) + 0x10) = oldItem[4]; + *(int *)((*(undefined4 *)((char *)&(oldBegin) + 0xc)) + 0x14) = iVar2; + *(int *)((*(undefined4 *)((char *)&(oldBegin) + 0xc)) + 0x18) = oldItem[6]; ppvVar1 = &(this->_historyItems)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 0x1c); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 0x1c); oldItem = oldItem + 7; } } HUD::mark_all_slots_dirty(&g_game->_hud,0,0); - if ((int *)oldBegin._0_4_ != (int *)0x0) { - size = (((int)oldCapacity - oldBegin._0_4_) / 0x1c) * 0x1c; - oldItem = (int *)oldBegin._0_4_; + if ((*(undefined4 *)((char *)&((int *)oldBegin) + 0x0)) != (int *)0x0) { + size = ((GHIDRA_INT(oldCapacity) - (*(undefined4 *)((char *)&(oldBegin) + 0x0))) / 0x1c) * 0x1c; + oldItem = (*(undefined4 *)((char *)&((int *)oldBegin) + 0x0)); if (0xfff < size) { - oldItem = *(int **)(oldBegin._0_4_ + -4); + oldItem = *(int **)((*(undefined4 *)((char *)&(oldBegin) + 0x0)) + -4); size = size + 0x23; - if (0x1f < (uint)(oldBegin._0_4_ + (-4 - (int)oldItem))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(oldBegin) + 0x0)) + (-4 - GHIDRA_INT(oldItem))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -213,8 +213,8 @@ void History::remove_index_refs(int index) if (storedIndex == (void *)index) { (slot->_historyItems)._begin = (void *)0xffffffff; } - else if (index < (int)storedIndex) { - (slot->_historyItems)._begin = (void *)((int)storedIndex + -1); + else if (index < GHIDRA_INT(storedIndex)) { + (slot->_historyItems)._begin = (void *)(GHIDRA_INT(storedIndex) + -1); } slot = (History *)&(slot->_historyItems)._end; iVar3 = iVar1 + -1; @@ -225,17 +225,17 @@ void History::remove_index_refs(int index) do { storedIndex = (compactSlot->_historyItems)._begin; iVar2 = iVar1; - if ((int)storedIndex < 0) { + if (GHIDRA_INT(storedIndex) < 0) { if (firstFreeSlot < 0) { - iVar2 = (-0x14 - (int)this) + (int)compactSlot; + iVar2 = (-0x14 - GHIDRA_INT(this)) + GHIDRA_INT(compactSlot); firstFreeSlot = iVar3; } } else if (-1 < firstFreeSlot) { firstFreeSlot = firstFreeSlot + 1; iVar2 = iVar1 + 4; - (compactSlot->_historyItems)._begin = *(void **)((int)&this[1]._historyItems._begin + iVar1); - *(void **)((int)&this[1]._historyItems._begin + iVar1) = storedIndex; + (compactSlot->_historyItems)._begin = *(void **)(GHIDRA_INT(&this[1]._historyItems._begin) + iVar1); + *(void **)(GHIDRA_INT(&this[1]._historyItems._begin) + iVar1) = storedIndex; } iVar3 = iVar3 + 1; compactSlot = (History *)&(compactSlot->_historyItems)._end; diff --git a/src/game/homing_laser.cpp b/src/game/homing_laser.cpp index c46bf7e..39ee967 100644 --- a/src/game/homing_laser.cpp +++ b/src/game/homing_laser.cpp @@ -124,18 +124,18 @@ void HomingLaser::build_bezier_path(int homingType, Entity *source) int *eraseAt; bool isEnemyFamiliar; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b0d97d; local_1c = ExceptionList; ExceptionList = &local_1c; sample = (bezierVec->_bezier)._end; bezierVec = &bezierVec->_bezier; - bezierByteSize = (int)sample - (int)bezierVec->_begin; + bezierByteSize = GHIDRA_INT(sample) - GHIDRA_INT(bezierVec->_begin); iVar5 = bezierByteSize >> 0x1f; local_ac.y = (float)bezierVec; self = bezierVec; - puVar2 = (undefined1 *)((int)register0x00000010 + -4); + puVar2 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); if (bezierByteSize / 0x18 + iVar5 == iVar5) { straightSampleX = *(float *)&(*(undefined1 *)((char *)(bezierVec) + 0x4)); straightSampleY = *(float *)&(*(undefined1 *)((char *)(bezierVec) + 0x8)); @@ -153,8 +153,8 @@ void HomingLaser::build_bezier_path(int homingType, Entity *source) sample[3] = straightSampleY; *(ulonglong *)(sample + 4) = CONCAT44(puStack_68,local_6c); bezierEndRef = &(bezierVec->_bezier)._end; - *bezierEndRef = (void *)((int)*bezierEndRef + 0x18); - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + *bezierEndRef = (void *)(GHIDRA_INT(*bezierEndRef) + 0x18); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); } straightSampleX = *(float *)&(*(undefined1 *)((char *)(bezierVec) + 0xc)); straightSampleY = *(float *)&(*(undefined1 *)((char *)(bezierVec) + 0x10)); @@ -175,7 +175,7 @@ void HomingLaser::build_bezier_path(int homingType, Entity *source) sample[4] = straightSampleX; sample[5] = straightSampleY; bezierEndRef = &(bezierVec->_bezier)._end; - *bezierEndRef = (void *)((int)*bezierEndRef + 0x18); + *bezierEndRef = (void *)(GHIDRA_INT(*bezierEndRef) + 0x18); puVar2 = puStack_20; } } @@ -246,15 +246,15 @@ void HomingLaser::build_bezier_path(int homingType, Entity *source) puVar7 = local_60; local_2c = *(Entity **)self; if (local_2c != (Entity *)0x0) { - tearFlags._0_4_ = SUB84(local_2c[1]._pendingDamageFlags,0); - tearFlags._4_4_ = *(undefined4 *)((int)&local_2c[1]._pendingDamageFlags + 4); + (*(undefined4 *)((char *)&(tearFlags) + 0x0)) = SUB84(local_2c[1]._pendingDamageFlags,0); + (*(undefined4 *)((char *)&(tearFlags) + 0x4)) = *(undefined4 *)(GHIDRA_INT(&local_2c[1]._pendingDamageFlags) + 4); VStack_88.x = (float)local_2c[1]._index; VStack_88.y = (float)local_2c[1]._collisionIndex; maskedFlags = BitSet128::operator_and ((BitSet128 *)occultMaskResult,(BitSet128 *)tearFlags,&g_tearFlagOccult) ; - if (((int)maskedFlags->_l != 0 || *(int *)((int)&maskedFlags->_l + 4) != 0) || - ((int)maskedFlags->_h != 0 || *(int *)((int)&maskedFlags->_h + 4) != 0)) { + if ((GHIDRA_INT(maskedFlags->_l) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_l) + 4) != 0) || + (GHIDRA_INT(maskedFlags->_h) != 0 || *(int *)(GHIDRA_INT(&maskedFlags->_h) + 4) != 0)) { local_3c = (Entity *)(local_2c->_targetPosition).x; local_44 = (Entity *)(local_2c->_targetPosition).y; playerSpawner = local_2c->_spawnerEntity; @@ -318,7 +318,7 @@ void HomingLaser::build_bezier_path(int homingType, Entity *source) puVar4[2] = newSampleX; puVar4[3] = newSampleY; *(ulonglong *)(puVar4 + 4) = CONCAT44(local_2c,local_34); - bezierVec->_end = (void *)((int)bezierVec->_end + 0x18); + bezierVec->_end = (void *)(GHIDRA_INT(bezierVec->_end) + 0x18); sample = bezierVec->_end; } newHandleInX = local_24; @@ -339,7 +339,7 @@ void HomingLaser::build_bezier_path(int homingType, Entity *source) sample[2] = (float)local_24; sample[3] = (float)local_38; *(ulonglong *)(sample + 4) = CONCAT44(newHandleOutY,newHandleOutX); - bezierVec->_end = (void *)((int)bezierVec->_end + 0x18); + bezierVec->_end = (void *)(GHIDRA_INT(bezierVec->_end) + 0x18); } newSampleX = *(Entity **)&(*(undefined1 *)((char *)(self) + 0xc)); newSampleY = *(Entity **)&(*(undefined1 *)((char *)(self) + 0x10)); @@ -352,23 +352,23 @@ void HomingLaser::build_bezier_path(int homingType, Entity *source) FUN_009a1770(&newSampleX); } else { - local_9c.y = (float)(((int)bezierVec->_end - (int)bezierVec->_begin) / 0x18); - iVar5 = (int)local_9c.y * 0x18; - if ((uint)local_9c.y < 2) { + local_9c.y = (float)((GHIDRA_INT(bezierVec->_end) - GHIDRA_INT(bezierVec->_begin)) / 0x18); + iVar5 = GHIDRA_INT(local_9c.y) * 0x18; + if (GHIDRA_UINT(local_9c.y) < 2) { local_38 = *(Entity **)&(*(undefined1 *)((char *)(self) + 0x4)); local_24 = *(Entity **)&(*(undefined1 *)((char *)(self) + 0x8)); if (local_9c.y == 0.0) { puVar4 = (undefined4 *)&(*(undefined1 *)((char *)(self) + 0xc)); } else { - puVar4 = (undefined4 *)((int)bezierVec->_begin + iVar5 + -0x18); + puVar4 = (undefined4 *)(GHIDRA_INT(bezierVec->_begin) + iVar5 + -0x18); } } else { pvVar6 = bezierVec->_begin; local_38 = *(Entity **)((char *)pvVar6 + iVar5 + -0x30); local_24 = *(Entity **)((char *)pvVar6 + iVar5 + -0x2c); - puVar4 = (undefined4 *)((int)pvVar6 + iVar5 + -0x18); + puVar4 = (undefined4 *)(GHIDRA_INT(pvVar6) + iVar5 + -0x18); } local_c0.y = (float)*puVar4; local_2c = (Entity *)puVar4[1]; @@ -393,9 +393,9 @@ void HomingLaser::build_bezier_path(int homingType, Entity *source) local_64 = (Entity *)((float)local_64 * (1.0 / fVar8)); local_40 = (Entity *)((float)local_40 * (1.0 / fVar8)); } - if (1 < (uint)local_9c.y) { + if (1 < GHIDRA_UINT(local_9c.y)) { bezierEndRef = &(self->_bezier)._end; - *bezierEndRef = (void *)((int)*bezierEndRef + -0x18); + *bezierEndRef = (void *)(GHIDRA_INT(*bezierEndRef) + -0x18); } if (bezierVec->_begin == bezierVec->_end) { local_9c.y = (float)local_64 * 50.0; @@ -434,7 +434,7 @@ void HomingLaser::build_bezier_path(int homingType, Entity *source) sample[2] = (float)newHandleInX; sample[3] = (float)newHandleInY; *(ulonglong *)(sample + 4) = CONCAT44(newHandleOutY,newHandleOutX); - bezierVec->_end = (void *)((int)bezierVec->_end + 0x18); + bezierVec->_end = (void *)(GHIDRA_INT(bezierVec->_end) + 0x18); sample = bezierVec->_end; } newHandleOutY = (Entity *)((float)local_40 + (float)local_44); @@ -453,7 +453,7 @@ void HomingLaser::build_bezier_path(int homingType, Entity *source) sample[2] = (float)newHandleInX; sample[3] = (float)newHandleInY; *(ulonglong *)(sample + 4) = CONCAT44(newHandleOutY,newHandleOutX); - bezierVec->_end = (void *)((int)bezierVec->_end + 0x18); + bezierVec->_end = (void *)(GHIDRA_INT(bezierVec->_end) + 0x18); puVar4 = bezierVec->_end; } newHandleInX = (Entity *)(local_c0.y - local_a4.y * 50.0); @@ -473,7 +473,7 @@ void HomingLaser::build_bezier_path(int homingType, Entity *source) puVar4[3] = newHandleInY; puVar4[4] = local_c0.y; puVar4[5] = local_2c; - bezierVec->_end = (void *)((int)bezierVec->_end + 0x18); + bezierVec->_end = (void *)(GHIDRA_INT(bezierVec->_end) + 0x18); compute_axis_bezier_handles(self); } } @@ -483,58 +483,58 @@ void HomingLaser::build_bezier_path(int homingType, Entity *source) if (homingType == 1) { local_44 = bezierVec->_end; local_24 = bezierVec->_begin; - if (((int)local_44 - (int)local_24) - 0x30U < 0x18) { + if ((GHIDRA_INT(local_44) - GHIDRA_INT(local_24)) - 0x30U < 0x18) { do { VStack_88.y = 0.0; local_25 = '\0'; - if (((int)local_44 - (int)local_24) / 0x18 == 1) break; + if ((GHIDRA_INT(local_44) - GHIDRA_INT(local_24)) / 0x18 == 1) break; local_a4.y = 0.0; do { pEVar13 = (Entity *)local_a4.y; if (local_25 != '\0') goto LAB_0099d600; - fVar10 = *(float *)((int)((int)local_a4.y + 0x18) + (int)local_24) - - *(float *)((int)(&(local_24->_sprite)._filename + 5) + - (int)((ANM2 *)((int)local_a4.y + 0x48) + -1) + 0xc); - fVar8 = *(float *)((undefined1 *)((int)((int)local_a4.y + 0x18) + 4) + (int)local_24) - - *(float *)((undefined1 *)((int)local_a4.y + 4) + (int)local_24); + fVar10 = *(float *)(GHIDRA_INT((GHIDRA_INT(local_a4.y) + 0x18)) + GHIDRA_INT(local_24)) - + *(float *)(GHIDRA_INT((&(local_24->_sprite)._filename + 5)) + + GHIDRA_INT(((ANM2 *)(GHIDRA_INT(local_a4.y) + 0x48) + -1)) + 0xc); + fVar8 = *(float *)((undefined1 *)(GHIDRA_INT((GHIDRA_INT(local_a4.y) + 0x18)) + 4) + GHIDRA_INT(local_24)) - + *(float *)((undefined1 *)(GHIDRA_INT(local_a4.y) + 4) + GHIDRA_INT(local_24)); if (14400.0 <= fVar8 * fVar8 + fVar10 * fVar10) { - local_34 = (Entity *)((int)local_60 - (int)piStack_70 >> 2); + local_34 = (Entity *)(GHIDRA_INT(local_60) - GHIDRA_INT(piStack_70) >> 2); local_2c = (Entity *)0x0; if (local_34 != (Entity *)0x0) { LAB_0099d384: - pvVar6 = (void *)((int)bezierVec->_begin + - (int)(&((ANM2 *)((int)pEVar13 + 0x48))->_filename + -3)); - local_9c.x = *(float *)(piStack_70[(int)local_2c] + 0x33c); - local_9c.y = *(float *)(piStack_70[(int)local_2c] + 0x340); + pvVar6 = (void *)(GHIDRA_INT(bezierVec->_begin) + + GHIDRA_INT((&((ANM2 *)(GHIDRA_INT(pEVar13) + 0x48))->_filename + -3))); + local_9c.x = *(float *)(piStack_70[GHIDRA_INT(local_2c)] + 0x33c); + local_9c.y = *(float *)(piStack_70[GHIDRA_INT(local_2c)] + 0x340); fVar9 = bezier_closest_point - (&local_9c,pvVar6,(void *)((int)pvVar6 + 0x18),(float *)0x0); + (&local_9c,pvVar6,(void *)(GHIDRA_INT(pvVar6) + 0x18),(float *)0x0); fVar10 = g_vectorZero.y; fVar8 = g_vectorZero.x; if (*(float *)&(*(undefined1 *)((char *)(self) + 0x14)) * *(float *)&(*(undefined1 *)((char *)(self) + 0x14)) <= fVar9) goto LAB_0099d46a; pvVar6 = bezierVec->_begin; - fVar9 = *(float *)((int)pvVar6 + - (int)(&((ANM2 *)((int)pEVar13 + 0x48))->_filename + -3) + 4); - fVar11 = *(float *)((int)pvVar6 + - (int)(&((ANM2 *)((int)pEVar13 + 0x48))->_filename + -3)); - if ((((*(float *)((int)pvVar6 + - (int)(&((ANM2 *)((int)pEVar13 + 0x48))->_filename + -3) + 0x14) - + fVar9 = *(float *)(GHIDRA_INT(pvVar6) + + GHIDRA_INT((&((ANM2 *)(GHIDRA_INT(pEVar13) + 0x48))->_filename + -3)) + 4); + fVar11 = *(float *)(GHIDRA_INT(pvVar6) + + GHIDRA_INT((&((ANM2 *)(GHIDRA_INT(pEVar13) + 0x48))->_filename + -3))); + if ((((*(float *)(GHIDRA_INT(pvVar6) + + GHIDRA_INT((&((ANM2 *)(GHIDRA_INT(pEVar13) + 0x48))->_filename + -3)) + 0x14) - fVar9) * (local_9c.y - fVar9) + (local_9c.x - fVar11) * - (*(float *)((int)pvVar6 + - (int)(&((ANM2 *)((int)pEVar13 + 0x48))->_filename + -3) + 0x10) - + (*(float *)(GHIDRA_INT(pvVar6) + + GHIDRA_INT((&((ANM2 *)(GHIDRA_INT(pEVar13) + 0x48))->_filename + -3)) + 0x10) - fVar11) <= 0.0) || ((local_9c.y - fVar9) * (local_9c.y - fVar9) + (local_9c.x - fVar11) * (local_9c.x - fVar11) <= 6400.0)) || (fVar9 = local_9c.y - - *(float *)((int)pvVar6 + - (int)(&((ANM2 *)((int)pEVar13 + 0x48))->_filename + -2) + 4), + *(float *)(GHIDRA_INT(pvVar6) + + GHIDRA_INT((&((ANM2 *)(GHIDRA_INT(pEVar13) + 0x48))->_filename + -2)) + 4), fVar11 = local_9c.x - - *(float *)((int)pvVar6 + - (int)(&((ANM2 *)((int)pEVar13 + 0x48))->_filename + -2)), + *(float *)(GHIDRA_INT(pvVar6) + + GHIDRA_INT((&((ANM2 *)(GHIDRA_INT(pEVar13) + 0x48))->_filename + -2))), fVar9 * fVar9 + fVar11 * fVar11 <= 6400.0)) goto LAB_0099d46a; - local_c0.y = (float)((int)pvVar6 + - (int)(&((ANM2 *)((int)pEVar13 + 0x48))->_filename + -2)); + local_c0.y = (float)(GHIDRA_INT(pvVar6) + + GHIDRA_INT((&((ANM2 *)(GHIDRA_INT(pEVar13) + 0x48))->_filename + -2))); dstSlot = bezierVec->_end; newSampleX = (Entity *)local_9c.x; newSampleY = (Entity *)local_9c.y; @@ -552,7 +552,7 @@ LAB_0099d384: (dstSlot->_damageEvents)._end = (void *)fVar10; (dstSlot->_damageEvents)._capacity = (void *)fVar8; dstSlot->_pendingDamage = fVar10; - bezierVec->_end = (void *)((int)bezierVec->_end + 0x18); + bezierVec->_end = (void *)(GHIDRA_INT(bezierVec->_end) + 0x18); } else { iVar5 = dstSlot[-1]._pitfallState; @@ -566,7 +566,7 @@ LAB_0099d384: fVar9 = *(float *)&(*(undefined1 *)((char *)&(dstSlot[-1]) + 0x40c)); (dstSlot->_damageEvents)._capacity = dstSlot[-1]._luaBridgeRef; dstSlot->_pendingDamage = fVar9; - bezierVec->_end = (void *)((int)bezierVec->_end + 0x18); + bezierVec->_end = (void *)(GHIDRA_INT(bezierVec->_end) + 0x18); if (local_34 != (Entity *)local_c0.y) { dstSlot = &dstSlot->_pendingDamage; srcSlot = (RNG *)&dstSlot[-1]._holdPosition; @@ -594,8 +594,8 @@ LAB_0099d384: (((Entity *)local_c0.y)->_damageEvents)._capacity = (void *)fVar8; ((Entity *)local_c0.y)->_pendingDamage = fVar10; } - eraseAt = piStack_70 + (int)local_2c; - memmove(eraseAt,eraseAt + 1,(int)local_60 - (int)(eraseAt + 1)); + eraseAt = piStack_70 + GHIDRA_INT(local_2c); + memmove(eraseAt,eraseAt + 1,GHIDRA_INT(local_60) - GHIDRA_INT((eraseAt + 1))); local_6c = local_60 + -1; local_25 = '\x01'; local_60 = local_6c; @@ -606,38 +606,38 @@ LAB_0099d5b3: local_24 = bezierVec->_begin; local_a4.y = (float)&pEVar13->_pendingDamageFlags; pEVar13 = bezierVec->_end; - VStack_88.y = (float)((int)VStack_88.y + 1); + VStack_88.y = (float)(GHIDRA_INT(VStack_88.y) + 1); local_44 = bezierVec->_end; local_34 = local_24; - } while ((uint)VStack_88.y < (undefined1 *)(((int)pEVar13 - (int)local_24) / 0x18 + -1)); + } while (GHIDRA_UINT(VStack_88.y) < (undefined1 *)((GHIDRA_INT(pEVar13) - GHIDRA_INT(local_24)) / 0x18 + -1)); local_44 = pEVar13; if (local_25 == '\0') break; LAB_0099d600: - } while ((uint)(((int)local_44 - (int)local_24) / 0x18) < 6); + } while (GHIDRA_UINT(((GHIDRA_INT(local_44) - GHIDRA_INT(local_24)) / 0x18)) < 6); } else { local_38 = (Entity *)0x1; VStack_88.y = -NAN; - if (1 < ((int)local_44 - (int)local_24) / 0x18 - 1U) { + if (1 < (GHIDRA_INT(local_44) - GHIDRA_INT(local_24)) / 0x18 - 1U) { local_24 = (Entity *)0x18; do { - local_34 = (Entity *)((int)puVar7 - (int)piStack_70 >> 2); + local_34 = (Entity *)(GHIDRA_INT(puVar7) - GHIDRA_INT(piStack_70) >> 2); local_2c = (Entity *)0x0; if (local_34 != (Entity *)0x0) { do { - local_ac.x = *(float *)(piStack_70[(int)local_2c] + 0x33c); - local_ac.y = *(float *)(piStack_70[(int)local_2c] + 0x340); - pvVar6 = (void *)((int)bezierVec->_begin + (int)(&(local_24->_sprite)._filename + -3)) + local_ac.x = *(float *)(piStack_70[GHIDRA_INT(local_2c)] + 0x33c); + local_ac.y = *(float *)(piStack_70[GHIDRA_INT(local_2c)] + 0x340); + pvVar6 = (void *)(GHIDRA_INT(bezierVec->_begin) + GHIDRA_INT((&(local_24->_sprite)._filename + -3))) ; fVar8 = bezier_closest_point - (&local_ac,pvVar6,(void *)((int)pvVar6 + 0x18),(float *)0x0); + (&local_ac,pvVar6,(void *)(GHIDRA_INT(pvVar6) + 0x18),(float *)0x0); if (fVar8 < *(float *)&(*(undefined1 *)((char *)(self) + 0x14)) * *(float *)&(*(undefined1 *)((char *)(self) + 0x14))) { - sample = (float *)((int)bezierVec->_begin + - (int)(&(local_24->_sprite)._filename + -3)); + sample = (float *)(GHIDRA_INT(bezierVec->_begin) + + GHIDRA_INT((&(local_24->_sprite)._filename + -3))); *sample = local_ac.x; sample[1] = local_ac.y; - eraseAt = piStack_70 + (int)local_2c; - memmove(eraseAt,eraseAt + 1,(int)puVar7 - (int)(eraseAt + 1)); + eraseAt = piStack_70 + GHIDRA_INT(local_2c); + memmove(eraseAt,eraseAt + 1,GHIDRA_INT(puVar7) - GHIDRA_INT((eraseAt + 1))); puVar7 = puVar7 + -1; if ((Entity *)VStack_88.y == (Entity *)0xffffffff) { VStack_88.y = (float)local_38; @@ -651,16 +651,16 @@ LAB_0099d600: local_38 = (Entity *)&(*(undefined1 *)((char *)(local_38) + 0x1)); local_24 = (Entity *)&local_24->_pendingDamageFlags; } while (local_38 < - (undefined1 *)(((int)bezierVec->_end - (int)bezierVec->_begin) / 0x18 + -1)); - if (-1 < (int)VStack_88.y) { + (undefined1 *)((GHIDRA_INT(bezierVec->_end) - GHIDRA_INT(bezierVec->_begin)) / 0x18 + -1)); + if (-1 < GHIDRA_INT(VStack_88.y)) { compute_axis_bezier_handles(self); } } } } else if (homingType == 4) { - if ((uint)((int)bezierVec->_end + (-0x30 - (int)bezierVec->_begin)) < 0x18) { - if ((int)puVar7 - (int)piStack_70 >> 2 != 0) { + if (GHIDRA_UINT((GHIDRA_INT(bezierVec->_end) + (-0x30 - GHIDRA_INT(bezierVec->_begin)))) < 0x18) { + if (GHIDRA_INT(puVar7) - GHIDRA_INT(piStack_70) >> 2 != 0) { local_34 = (Entity *)(piStack_70 + 1); do { newSampleX = *(Entity **)(*piStack_70 + 0x33c); @@ -671,29 +671,29 @@ LAB_0099d600: newHandleOutY = (Entity *)g_vectorZero.y; std::vector::insert (&local_ac.y, - (void *)((int)bezierVec->_begin + - ((((int)(self->_bezier)._end - (int)bezierVec->_begin) / 0x18) * 3 + -3 + (void *)(GHIDRA_INT(bezierVec->_begin) + + (((GHIDRA_INT((self->_bezier)._end) - GHIDRA_INT(bezierVec->_begin)) / 0x18) * 3 + -3 ) * 8),&newSampleX); puVar7 = local_60; - memmove(piStack_70,local_34,(int)local_60 - (int)local_34); + memmove(piStack_70,local_34,GHIDRA_INT(local_60) - GHIDRA_INT(local_34)); local_6c = puVar7 + -1; local_60 = local_6c; - } while ((int)local_6c - (int)piStack_70 >> 2 != 0); + } while (GHIDRA_INT(local_6c) - GHIDRA_INT(piStack_70) >> 2 != 0); } compute_axis_bezier_handles(self); } } else if (homingType == 5) { sample = bezierVec->_begin; - if ((uint)((int)bezierVec->_end + (-0x30 - (int)sample)) < 0x18) { + if (GHIDRA_UINT((GHIDRA_INT(bezierVec->_end) + (-0x30 - GHIDRA_INT(sample)))) < 0x18) { pvVar6 = (self->_bezier)._end; pEVar13 = (Entity *)(*(float *)((char *)pvVar6 + -0x18) - *sample); dstSlot = (Entity *)(*(float *)((char *)pvVar6 + -0x14) - sample[1]); local_40 = dstSlot; local_3c = pEVar13; if (0.01 <= (float)dstSlot * (float)dstSlot + (float)pEVar13 * (float)pEVar13) { - vector_LaserSample_erase(bezierVec,&local_34,(void *)((int)pvVar6 + -0x18)); - local_60 = (undefined4 *)((int)puVar7 - (int)piStack_70 >> 2); + vector_LaserSample_erase(bezierVec,&local_34,(void *)(GHIDRA_INT(pvVar6) + -0x18)); + local_60 = (undefined4 *)(GHIDRA_INT(puVar7) - GHIDRA_INT(piStack_70) >> 2); do { fVar9 = local_ac.y; fVar10 = INFINITY; @@ -705,7 +705,7 @@ LAB_0099d600: local_2c = (Entity *)0x0; candidateIndex = local_2c; do { - candidate = (Entity *)piStack_70[(int)candidateIndex]; + candidate = (Entity *)piStack_70[GHIDRA_INT(candidateIndex)]; fVar12 = (float)bezierEnd[-1]._pitfallState - (candidate->_pos).y; fVar11 = fVar8 - (candidate->_pos).x; fVar11 = fVar12 * fVar12 + fVar11 * fVar11; @@ -735,7 +735,7 @@ LAB_0099d600: VStack_88.y = (1.0 / local_c0.y) * (float)local_38; pEVar13 = (Entity *)((1.0 / local_c0.y) * (float)local_24); } - entityIndex = ((int)*(void **)((char *)fVar9 + 4) - (int)*(void **)fVar9) / 0x18; + entityIndex = (GHIDRA_INT(*(void **)((char *)fVar9 + 4)) - GHIDRA_INT(*(void **))fVar9) / 0x18; local_64 = (Entity *) (((float)local_64 * (float)pEVar13 + (float)local_2c * VStack_88.y + 1.0) * 0.5 ); @@ -788,19 +788,19 @@ LAB_0099d600: puVar7[2] = fVar8; puVar7[3] = fVar10; *(ulonglong *)(puVar7 + 4) = CONCAT44(fVar10,fVar8); - *(void **)((char *)fVar9 + 4) = (void *)((int)*(void **)((char *)fVar9 + 4) + 0x18); + *(void **)((char *)fVar9 + 4) = (void *)(GHIDRA_INT(*(void **)((char *)fVar9 + 4)) + 0x18); } bVar3 = ((Room *)(g_game->_room))->Room::IsPositionInRoom(&local_a4,0.0); if (bVar3 == 0) break; pEVar13 = local_3c; dstSlot = local_40; - } while ((uint)(((int)*(void **)((char *)fVar9 + 4) - (int)*(void **)fVar9) / 0x18) < 0x19); + } while (GHIDRA_UINT(((GHIDRA_INT(*(void **)((char *)fVar9 + 4)) - GHIDRA_INT(*(void **))fVar9) / 0x18)) < 0x19); compute_bezier_handles(self,0.4); } } } if (piStack_70 != (int *)0x0) { - deallocate(piStack_70,(int)targetsCapacity - (int)piStack_70 >> 2); + deallocate(piStack_70,GHIDRA_INT(targetsCapacity) - GHIDRA_INT(piStack_70) >> 2); } ExceptionList = local_1c; return; @@ -834,7 +834,7 @@ void HomingLaser::compute_axis_bezier_handles() int pointCount; bezierPoint = (this->_bezier)._begin; - if ((uint)(((int)(this->_bezier)._end - (int)bezierPoint) / 0x18) < 2) { + if (GHIDRA_UINT(((GHIDRA_INT((this->_bezier)._end) - GHIDRA_INT(bezierPoint)) / 0x18)) < 2) { return; } fVar1 = bezierPoint[1]; @@ -864,11 +864,11 @@ void HomingLaser::compute_axis_bezier_handles() bezierPoint[5] = fVar5 + fVar1; bezierPoint[9] = bezierPoint[7] - fVar5; bezierPoint[8] = bezierPoint[6] - nextDistance; - if (((int)(this->_bezier)._end - (int)bezierPoint) / 0x18 - 1U < 2) { + if ((GHIDRA_INT((this->_bezier)._end) - GHIDRA_INT(bezierPoint)) / 0x18 - 1U < 2) { bezierBegin = (this->_bezier)._begin; } else { - bezierPoint = (float *)((int)(this->_bezier)._begin + 4); + bezierPoint = (float *)(GHIDRA_INT((this->_bezier)._begin) + 4); do { fVar1 = bezierPoint[5]; fVar5 = bezierPoint[6]; @@ -914,7 +914,7 @@ void HomingLaser::compute_axis_bezier_handles() } local_2c = -(float)puVar7; if (nextDistance * tangentX + local_2c * fVar2 < 0.0) { - tangentX = (float)((uint)tangentX ^ 0x80000000); + tangentX = (float)(GHIDRA_UINT(tangentX) ^ 0x80000000); local_2c = -local_2c; handleX = tangentX; } @@ -932,9 +932,9 @@ void HomingLaser::compute_axis_bezier_handles() bezierPoint[8] = nextDistance * local_2c * 0.5 + fVar5; bezierPoint = bezierPoint + 6; bezierBegin = (this->_bezier)._begin; - } while (i < ((int)(this->_bezier)._end - (int)bezierBegin) / 0x18 - 1U); + } while (i < (GHIDRA_INT((this->_bezier)._end) - GHIDRA_INT(bezierBegin)) / 0x18 - 1U); } - pointCount = ((int)(this->_bezier)._end - (int)bezierBegin) / 0x18; + pointCount = (GHIDRA_INT((this->_bezier)._end) - GHIDRA_INT(bezierBegin)) / 0x18; fVar1 = *(float *)((char *)bezierBegin + pointCount * 0x18 + -0x18); fVar5 = *(float *)((char *)bezierBegin + pointCount * 0x18 + -0x14); nextDistance = *(float *)((char *)bezierBegin + pointCount * 0x18 + -0x30) - fVar1; @@ -970,11 +970,11 @@ void HomingLaser::compute_bezier_handles(float tension) pfVar1 = (this->_bezier)._begin; fVar4 = *(float *)((char *)pointsEnd + -0x18) - *pfVar1; fVar5 = *(float *)((char *)pointsEnd + -0x14) - pfVar1[1]; - if ((0.01 <= fVar5 * fVar5 + fVar4 * fVar4) || ((uint)(((int)pointsEnd - (int)pfVar1) / 0x18) < 3) + if ((0.01 <= fVar5 * fVar5 + fVar4 * fVar4) || (GHIDRA_UINT(((GHIDRA_INT(pointsEnd) - GHIDRA_INT(pfVar1)) / 0x18)) < 3) ) { isClosed = false; - iVar2 = (int)pointsEnd - (int)pfVar1 >> 0x1f; - if (((int)pointsEnd - (int)pfVar1) / 0x18 + iVar2 == iVar2) { + iVar2 = GHIDRA_INT(pointsEnd) - GHIDRA_INT(pfVar1) >> 0x1f; + if ((GHIDRA_INT(pointsEnd) - GHIDRA_INT(pfVar1)) / 0x18 + iVar2 == iVar2) { return; } isWrapFirst = false; @@ -989,7 +989,7 @@ void HomingLaser::compute_bezier_handles(float tension) fVar4 = g_vectorZero.x; fVar5 = g_vectorZero.y; if (isWrapFirst) { - iVar2 = ((int)pointsEnd - (int)pointsBegin) / 0x18; + iVar2 = (GHIDRA_INT(pointsEnd) - GHIDRA_INT(pointsBegin)) / 0x18; if (pointIndex != 0) { if (pointIndex == iVar2 - 1U) { fVar4 = pointsBegin[6] - pointsBegin[pointIndex * 6]; @@ -1009,7 +1009,7 @@ LAB_0099e26a: prevDy = pointsBegin[pointIndex * 6 + 1] - pointsBegin[pointIndex * 6 + -5]; } } - uVar3 = ((int)pointsEnd - (int)pointsBegin) / 0x18 - 1; + uVar3 = (GHIDRA_INT(pointsEnd) - GHIDRA_INT(pointsBegin)) / 0x18 - 1; if (pointIndex < uVar3) { fVar4 = pointsBegin[pointIndex * 6 + 6] - pointsBegin[pointIndex * 6]; fVar5 = pointsBegin[pointIndex * 6 + 7] - pointsBegin[pointIndex * 6 + 1]; @@ -1029,7 +1029,7 @@ LAB_0099e26a: pointsBegin = (this->_bezier)._begin; pointIndex = uVar3; isWrapFirst = isClosed; - if ((uint)(((int)pointsEnd - (int)pointsBegin) / 0x18) <= uVar3) { + if (GHIDRA_UINT(((GHIDRA_INT(pointsEnd) - GHIDRA_INT(pointsBegin)) / 0x18)) <= uVar3) { return; } } while( true ); @@ -1091,7 +1091,7 @@ void HomingLaser::CalculateSamples(float param_2) ExceptionList = &savedExceptionList; laser = this; blend = param_2; - if ((uint)(((int)(this->_bezier)._end - (int)(this->_bezier)._begin) / 0x18) < 2) { + if (GHIDRA_UINT(((GHIDRA_INT((this->_bezier)._end) - GHIDRA_INT((this->_bezier)._begin)) / 0x18)) < 2) { KAGE_LogMessage(0x10,(byte *)"Bezier Path Size is less than 2!\n"); } newSamples = (void *)0x0; @@ -1114,8 +1114,8 @@ void HomingLaser::CalculateSamples(float param_2) lengthsEnd = (undefined4 *)0x0; lengthsCapacity = (undefined4 *)0x0; lengthsCapacitySlot = (undefined4 *)0x0; - ehState = CONCAT31(ehState._1_3_,1); - uVar5 = ((int)(this->_bezier)._end - (int)(this->_bezier)._begin) / 0x18; + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),1); + uVar5 = (GHIDRA_INT((this->_bezier)._end) - GHIDRA_INT((this->_bezier)._begin)) / 0x18; newSamplesCapacitySlot = newSamplesCapacity; if (uVar5 != 0) { if (0x3fffffff < uVar5) { @@ -1142,7 +1142,7 @@ void HomingLaser::CalculateSamples(float param_2) puVar7 = lengthsEnd; lengthsBegin = local_18; lengthsCapacitySlot = lengthsCapacity; - if (((int)(this->_bezier)._end - (int)(this->_bezier)._begin) / 0x18 != 1) { + if ((GHIDRA_INT((this->_bezier)._end) - GHIDRA_INT((this->_bezier)._begin)) / 0x18 != 1) { local_24 = 0; pfVar6 = local_18; do { @@ -1164,7 +1164,7 @@ void HomingLaser::CalculateSamples(float param_2) local_40 = lengthsEnd; do { fVar11 = 1.0 - local_48; - nextT = (float)((double)(int)local_3c + __uint_to_double_fixup[-((int)local_3c >> 0x1f)]) / + nextT = (float)((double)GHIDRA_INT(local_3c) + __uint_to_double_fixup[-(GHIDRA_INT(local_3c) >> 0x1f)]) / 10.0; weight0 = fVar11 * fVar11 * fVar11; nextWeight1 = 1.0 - nextT; @@ -1191,21 +1191,21 @@ void HomingLaser::CalculateSamples(float param_2) fVar2 * weight2 + fVar12 * local_38); local_48 = nextT; nextWeight1 = sqrtf(fVar11 * fVar11 + nextWeight1 * nextWeight1); - fVar11 = pfVar6[(int)fVar10 + 1]; - local_3c = (float)((int)local_3c + 1); - pfVar6[(int)fVar10 + 1] = nextWeight1 + fVar11; - } while ((uint)local_3c < 0xb); + fVar11 = pfVar6[GHIDRA_INT(fVar10) + 1]; + local_3c = (float)(GHIDRA_INT(local_3c) + 1); + pfVar6[GHIDRA_INT(fVar10) + 1] = nextWeight1 + fVar11; + } while (GHIDRA_UINT(local_3c) < 0xb); local_24 = local_24 + 0x18; - local_38 = (float)((int)fVar10 + 1); + local_38 = (float)(GHIDRA_INT(fVar10) + 1); laser->_totalLength = nextWeight1 + fVar11 + laser->_totalLength; puVar7 = local_40; this = laser; - } while ((uint)local_38 < - ((int)(laser->_bezier)._end - (int)(laser->_bezier)._begin) / 0x18 - 1U); + } while (GHIDRA_UINT(local_38) < + (GHIDRA_INT((laser->_bezier)._end) - GHIDRA_INT((laser->_bezier)._begin)) / 0x18 - 1U); local_18 = pfVar6; } pfVar6 = local_18; - if ((this->_totalLength != 0.0) && (uVar5 = (int)puVar7 - (int)local_18 >> 2, uVar5 != 0)) { + if ((this->_totalLength != 0.0) && (uVar5 = GHIDRA_INT(puVar7) - GHIDRA_INT(local_18) >> 2, uVar5 != 0)) { uVar3 = 1; *local_18 = *local_18 / this->_totalLength; if (1 < uVar5) { @@ -1219,31 +1219,31 @@ void HomingLaser::CalculateSamples(float param_2) } local_40 = (undefined4 *)0x0; local_38 = 0.0; - local_50 = (undefined4 *)(((int)puVar7 - (int)local_18 >> 2) - 1); + local_50 = (undefined4 *)((GHIDRA_INT(puVar7) - GHIDRA_INT(local_18) >> 2) - 1); uVar5 = *(uint *)&(*(undefined1 *)((char *)(this) + 0x18)); do { - fVar10 = (float)((double)(int)local_38 + __uint_to_double_fixup[-((int)local_38 >> 0x1f)]) / - (float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]); + fVar10 = (float)((double)GHIDRA_INT(local_38) + __uint_to_double_fixup[-(GHIDRA_INT(local_38) >> 0x1f)]) / + (float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]); local_3c = fVar10; puVar7 = local_40; while ((lengthIdx = puVar7, lengthIdx < local_50 && - (fVar11 = pfVar6[(int)lengthIdx], fVar11 < fVar10))) { - local_3c = ((fVar10 - fVar11) / (pfVar6[(int)lengthIdx + 1] - fVar11)) / - (float)((double)(int)local_50 + __uint_to_double_fixup[-((int)local_50 >> 0x1f)]) + - (float)((double)(int)lengthIdx + __uint_to_double_fixup[-((int)lengthIdx >> 0x1f)]) - / (float)((double)(int)local_50 + __uint_to_double_fixup[-((int)local_50 >> 0x1f)]) + (fVar11 = pfVar6[GHIDRA_INT(lengthIdx)], fVar11 < fVar10))) { + local_3c = ((fVar10 - fVar11) / (pfVar6[GHIDRA_INT(lengthIdx) + 1] - fVar11)) / + (float)((double)GHIDRA_INT(local_50) + __uint_to_double_fixup[-(GHIDRA_INT(local_50) >> 0x1f)]) + + (float)((double)GHIDRA_INT(lengthIdx) + __uint_to_double_fixup[-(GHIDRA_INT(lengthIdx) >> 0x1f)]) + / (float)((double)GHIDRA_INT(local_50) + __uint_to_double_fixup[-(GHIDRA_INT(local_50) >> 0x1f)]) ; local_40 = lengthIdx; - puVar7 = (undefined4 *)((int)lengthIdx + 1); + puVar7 = (undefined4 *)(GHIDRA_INT(lengthIdx) + 1); } - if ((uint)(((int)(this->_bezier)._end - (int)(this->_bezier)._begin) / 0x18) < 2) { + if (GHIDRA_UINT(((GHIDRA_INT((this->_bezier)._end) - GHIDRA_INT((this->_bezier)._begin)) / 0x18)) < 2) { KAGE_LogMessage(0x10,(byte *)"Bezier Path Size less than 2!\n"); } pfVar8 = (this->_bezier)._begin; - iVar4 = ((int)(this->_bezier)._end - (int)pfVar8) / 0x18; + iVar4 = (GHIDRA_INT((this->_bezier)._end) - GHIDRA_INT(pfVar8)) / 0x18; fVar10 = (float)((double)(iVar4 + -1) + __uint_to_double_fixup[-(iVar4 + -1 >> 0x1f)]) * local_3c; - segment = (int)fVar10; + segment = GHIDRA_INT(fVar10); fVar10 = fVar10 - (float)segment; if (segment < 0) { local_4c = *pfVar8; @@ -1274,26 +1274,26 @@ void HomingLaser::CalculateSamples(float param_2) newSamplesEnd = newSamplesEnd + 2; } uVar5 = *(uint *)&(*(undefined1 *)((char *)(this) + 0x18)); - local_38 = (float)((int)local_38 + 1); - } while ((uint)local_38 <= uVar5); + local_38 = (float)(GHIDRA_INT(local_38) + 1); + } while (GHIDRA_UINT(local_38) <= uVar5); local_40 = *(undefined4 **)&(*(undefined1 *)((char *)(this) + 0x34)); oldSamples = &(*(undefined1 *)((char *)(this) + 0x34)); - local_24 = *(int *)&(*(undefined1 *)((char *)(this) + 0x38)) - (int)local_40 >> 3; + local_24 = *(int *)&(*(undefined1 *)((char *)(this) + 0x38)) - GHIDRA_INT(local_40) >> 3; pHVar9 = this; - if (local_24 == (int)newSamplesEnd - (int)newSamples >> 3) { + if (local_24 == GHIDRA_INT(newSamplesEnd) - GHIDRA_INT(newSamples) >> 3) { if (*(int *)&(*(undefined1 *)((char *)(this) + 0x40)) == 1) { if (local_24 != 0) { - local_50 = (undefined4 *)((int)newSamples - (int)local_40); + local_50 = (undefined4 *)(GHIDRA_INT(newSamples) - GHIDRA_INT(local_40)); uVar5 = 0; pfVar6 = (float *)(local_40 + 1); do { iVar4 = uVar5 * 8; uVar5 = uVar5 + 1; - fVar10 = *(float *)((char *)local_50 + (int)pfVar6); + fVar10 = *(float *)((char *)local_50 + GHIDRA_INT(pfVar6)); pfVar6[-1] = (*(float *)((char *)newSamples + iVar4) - pfVar6[-1]) * blend + pfVar6[-1]; *pfVar6 = (fVar10 - *pfVar6) * blend + *pfVar6; pfVar6 = pfVar6 + 2; - } while (uVar5 < (uint)(*(int *)&(*(undefined1 *)((char *)(this) + 0x38)) - *(int *)oldSamples >> 3)); + } while (uVar5 < GHIDRA_UINT((*(int *)&(*(undefined1 *)((char *)(this) + 0x38)) - *(int *)oldSamples >> 3))); pfVar6 = local_18; goto LAB_0099eb5f; } @@ -1310,11 +1310,11 @@ void HomingLaser::CalculateSamples(float param_2) blend = (blend - 0.0) * fVar10 + 0.0; if (local_24 != 0) { do { - uVar3 = -(uint)(uVar5 != 0) & uVar5; + uVar3 = -GHIDRA_UINT((uVar5 != 0)) & uVar5; iVar4 = (*(int *)&(*(undefined1 *)((char *)(this) + 0x38)) - *(int *)oldSamples >> 3) + -1; fVar10 = *(float *)((char *)newSamples + uVar5 * 8 + 4); fVar11 = (float)local_40[uVar5 * 2 + 1]; - fVar12 = 1.0 - ((float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)] + fVar12 = 1.0 - ((float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)] ) / (float)((double)iVar4 + __uint_to_double_fixup[-(iVar4 >> 0x1f)])) * blend; nextWeight1 = (float)local_40[uVar5 * 2 + 1]; @@ -1323,7 +1323,7 @@ void HomingLaser::CalculateSamples(float param_2) (float)local_40[uVar5 * 2]; local_40[uVar5 * 2 + 1] = (fVar10 - fVar11) * fVar12 + nextWeight1; uVar5 = uVar5 + 1; - } while (uVar5 < (uint)(*(int *)&(*(undefined1 *)((char *)(this) + 0x38)) - *(int *)oldSamples >> 3)); + } while (uVar5 < GHIDRA_UINT((*(int *)&(*(undefined1 *)((char *)(this) + 0x38)) - *(int *)oldSamples >> 3))); LAB_0099eb5f: pHVar9 = laser; } @@ -1337,22 +1337,22 @@ LAB_0099eb5f: ; } if (pfVar6 != (float *)0x0) { - uVar5 = (int)lengthsCapacity - (int)pfVar6 & 0xfffffffc; + uVar5 = GHIDRA_INT(lengthsCapacity) - GHIDRA_INT(pfVar6) & 0xfffffffc; pfVar8 = pfVar6; if (0xfff < uVar5) { pfVar8 = (float *)pfVar6[-1]; uVar5 = uVar5 + 0x23; - if (0x1f < (uint)((int)pfVar6 + (-4 - (int)pfVar8))) goto LAB_0099ebcf; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pfVar6) + (-4 - GHIDRA_INT(pfVar8))))) goto LAB_0099ebcf; } operator_delete(pfVar8,uVar5); } if (newSamples != (void *)0x0) { - uVar5 = (int)newSamplesCapacity - (int)newSamples & 0xfffffff8; + uVar5 = GHIDRA_INT(newSamplesCapacity) - GHIDRA_INT(newSamples) & 0xfffffff8; ptr = newSamples; if (0xfff < uVar5) { ptr = *(void **)((char *)newSamples + -4); uVar5 = uVar5 + 0x23; - if (0x1f < (uint)((int)newSamples + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(newSamples) + (-4 - GHIDRA_INT(ptr))))) { LAB_0099ebcf: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1384,7 +1384,7 @@ void HomingLaser::apply_sine_offset(float amplitude, float phase) if (*(int *)&(*(undefined1 *)((char *)(this) + 0x40)) == 1) { pvVar3 = (this->_samples)._begin; uVar4 = 0; - if ((int)(this->_samples)._end - (int)pvVar3 >> 3 != 0) { + if (GHIDRA_INT((this->_samples)._end) - GHIDRA_INT(pvVar3) >> 3 != 0) { do { radialX = *(float *)((char *)pvVar3 + uVar4 * 8) - *(float *)&(*(undefined1 *)((char *)(this) + 0x4)); fVar6 = *(float *)((char *)pvVar3 + uVar4 * 8 + 4); @@ -1394,15 +1394,15 @@ void HomingLaser::apply_sine_offset(float amplitude, float phase) radialX = radialX * (1.0 / fVar5); local_28 = local_28 * (1.0 / fVar5); } - iVar1 = ((int)(this->_samples)._end - (int)(this->_samples)._begin >> 3) + -1; - fVar5 = sin((((float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + iVar1 = (GHIDRA_INT((this->_samples)._end) - GHIDRA_INT((this->_samples)._begin) >> 3) + -1; + fVar5 = sin((((float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 37.699112) / (float)((double)iVar1 + __uint_to_double_fixup[-(iVar1 >> 0x1f)]) - (float)g_game->_frameCount * 0.1) - phase); fVar5 = fVar5 * 10.0 * amplitude; *(float *)((char *)pvVar3 + uVar4 * 8) = radialX * fVar5 + *(float *)((char *)pvVar3 + uVar4 * 8); *(float *)((char *)pvVar3 + uVar4 * 8 + 4) = local_28 * fVar5 + fVar6; uVar4 = uVar4 + 1; - } while (uVar4 < (uint)((int)(this->_samples)._end - (int)(this->_samples)._begin >> 3)); + } while (uVar4 < GHIDRA_UINT((GHIDRA_INT((this->_samples)._end) - GHIDRA_INT((this->_samples)._begin) >> 3))); return; } } @@ -1413,8 +1413,8 @@ void HomingLaser::apply_sine_offset(float amplitude, float phase) uVar4 = 0; pvVar3 = (this->_samples)._end; pointsBegin = (this->_samples)._begin; - if ((int)pvVar3 - (int)pointsBegin >> 3 != 1) { - pointCursor = (float *)((int)pointsBegin + 4); + if (GHIDRA_INT(pvVar3) - GHIDRA_INT(pointsBegin) >> 3 != 1) { + pointCursor = (float *)(GHIDRA_INT(pointsBegin) + 4); do { fVar5 = *pointCursor; segDy = pointCursor[2] - fVar5; @@ -1425,14 +1425,14 @@ void HomingLaser::apply_sine_offset(float amplitude, float phase) segDx = segDx * (1.0 / segDx); } if (uVar4 < 0x14) { - iVar1 = (int)pvVar3 - (int)pointsBegin; - segDx = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) / 20.0 + iVar1 = GHIDRA_INT(pvVar3) - GHIDRA_INT(pointsBegin); + segDx = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) / 20.0 ; LAB_0099eedf: local_28 = segDx * amplitude * 20.0; } else { - iVar1 = (int)pvVar3 - (int)pointsBegin; + iVar1 = GHIDRA_INT(pvVar3) - GHIDRA_INT(pointsBegin); local_28 = amplitude * 20.0; if ((iVar1 >> 3) - 0x16U < uVar4) { iVar2 = ((iVar1 >> 3) - uVar4) + 1; @@ -1441,7 +1441,7 @@ LAB_0099eedf: } } iVar1 = (iVar1 >> 3) + -2; - segDx = sin((((float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) / + segDx = sin((((float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) / (float)((double)iVar1 + __uint_to_double_fixup[-(iVar1 >> 0x1f)])) * (fVar6 / 200.0) * 15.0 - (float)g_game->_frameCount * 0.1) - phase); uVar4 = uVar4 + 1; @@ -1450,7 +1450,7 @@ LAB_0099eedf: pointCursor = pointCursor + 2; pointsBegin = (this->_samples)._begin; pvVar3 = (this->_samples)._end; - } while (uVar4 < ((int)pvVar3 - (int)pointsBegin >> 3) - 1U); + } while (uVar4 < (GHIDRA_INT(pvVar3) - GHIDRA_INT(pointsBegin) >> 3) - 1U); } } return; @@ -1501,7 +1501,7 @@ void HomingLaser::build_curl_path(float radius) samplesEnd[3] = fStack_2c; *(ulonglong *)(samplesEnd + 4) = CONCAT44(fStack_1c,local_20); ppvVar1 = &(this->_bezier)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 0x18); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 0x18); } baseAngle = *(float *)&(*(undefined1 *)((char *)(this) + 0x10)) - *(float *)&(*(undefined1 *)((char *)(this) + 0x8)); fVar7 = *(float *)&(*(undefined1 *)((char *)(this) + 0xc)) - *(float *)&(*(undefined1 *)((char *)(this) + 0x4)); @@ -1510,7 +1510,7 @@ void HomingLaser::build_curl_path(float radius) uStack_48 = 0; do { curlAngle = ((float)baseAngle - 0.7) - - ((float)((double)(int)uStack_48 + __uint_to_double_fixup[-((int)uStack_48 >> 0x1f)]) + ((float)((double)GHIDRA_INT(uStack_48) + __uint_to_double_fixup[-(GHIDRA_INT(uStack_48) >> 0x1f)]) / 5.0) * 3.1415927 * 6.0 * 0.25; dVar4 = (double)(curlAngle + 0.25); dVar5 = dVar4; @@ -1544,7 +1544,7 @@ void HomingLaser::build_curl_path(float radius) samplesEnd[3] = fStack_24; *(ulonglong *)(samplesEnd + 4) = CONCAT44(fStack_1c,fVar3); ppvVar1 = &(this->_bezier)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 0x18); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 0x18); } samplesEnd = (this->_bezier)._end; uStack_48 = uStack_48 + 1; @@ -1567,7 +1567,7 @@ void HomingLaser::build_curl_path(float radius) samplesEnd[3] = fStack_24; *(ulonglong *)(samplesEnd + 4) = CONCAT44(fStack_1c,local_20); ppvVar1 = &(this->_bezier)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 0x18); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 0x18); } local_30 = *(float *)&(*(undefined1 *)((char *)(this) + 0xc)); fStack_2c = *(float *)&(*(undefined1 *)((char *)(this) + 0x10)); @@ -1586,7 +1586,7 @@ void HomingLaser::build_curl_path(float radius) samplesEnd[3] = fStack_24; *(ulonglong *)(samplesEnd + 4) = CONCAT44(fStack_1c,local_20); ppvVar1 = &(this->_bezier)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 0x18); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 0x18); return; } @@ -1646,12 +1646,12 @@ void HomingLaser::build_wiggle_bezier() handleOffsetY = local_50 * 0.2; local_5c = local_54 * 0.5 - local_4c.x; local_58 = local_50 * 0.5 - local_44.x; - iVar1 = (int)(in_ECX[0x13] - in_ECX[0x12]) >> 0x1f; + iVar1 = GHIDRA_INT((in_ECX[0x13] - in_ECX[0x12])) >> 0x1f; fVar5 = local_4c.x + local_54 * 0.5; fVar4 = local_44.x + local_50 * 0.5; fVar2 = handleOffsetX; fVar3 = handleOffsetY; - if ((int)(in_ECX[0x13] - in_ECX[0x12]) / 0x18 + iVar1 == iVar1) { + if (GHIDRA_INT((in_ECX[0x13] - in_ECX[0x12])) / 0x18 + iVar1 == iVar1) { sampleCtrl2X = handleOffsetX + startPos.x; samplePosX = (float)in_ECX[1]; samplePosY = (float)in_ECX[2]; @@ -1814,30 +1814,30 @@ byte HomingLaser::clip_samples_to_grid(Vector *pos, int gridCollisionClass) psVar1 = &this->_samples; local_14 = psVar1->_begin; uVar2 = 0; - if ((int)samplesEnd - (int)local_14 >> 3 != 0) { + if (GHIDRA_INT(samplesEnd) - GHIDRA_INT(local_14) >> 3 != 0) { local_24.x = (float)g_game->_room; local_1c.x = (float)this; do { fVar3 = ((pos->x + *(float *)((char *)local_14 + uVar2 * 8)) - 40.0) / 40.0 + 0.5; - gridIndex = (int)fVar3; + gridIndex = GHIDRA_INT(fVar3); if ((((gridIndex < 0) || (*(int *)((char *)local_24.x + 0xc) <= gridIndex)) || - (gridIndex = (int)(((pos->y + *(float *)((char *)local_14 + uVar2 * 8 + 4)) - 120.0) / 40.0 - + 0.5), gridIndex < 0)) || + (gridIndex = GHIDRA_INT((((pos->y + *(float *)((char *)local_14 + uVar2 * 8 + 4)) - 120.0) / 40.0 + + 0.5)), gridIndex < 0)) || (*(int *)((char *)local_24.x + 0x10) <= gridIndex)) { gridIndex = -1; } else { - gridIndex = *(int *)((char *)local_24.x + 0xc) * gridIndex + (int)fVar3; + gridIndex = *(int *)((char *)local_24.x + 0xc) * gridIndex + GHIDRA_INT(fVar3); } ((Room *)((Room *)local_24.x))->Room::GetGridCollision(gridIndex); isBlocked = FUN_0070be60(); fVar3 = local_1c.x; if (isBlocked != '\0') { if (uVar2 < 2) { - if (2 < (uint)((int)samplesEnd - (int)local_14 >> 3)) { + if (2 < GHIDRA_UINT((GHIDRA_INT(samplesEnd) - GHIDRA_INT(local_14) >> 3))) { std::vector::erase - (&local_14,(int)local_14 + 0x10, - ((std_vector *)((int)local_1c.x + 0x1c))->_end); + (&local_14,GHIDRA_INT(local_14) + 0x10, + ((std_vector *)(GHIDRA_INT(local_1c.x) + 0x1c))->_end); } if (uVar2 == 0) { return 1; @@ -1845,11 +1845,11 @@ byte HomingLaser::clip_samples_to_grid(Vector *pos, int gridCollisionClass) } else { std::vector::erase - (&local_14,(void *)((int)local_14 + uVar2 * 8), - ((std_vector *)((int)local_1c.x + 0x1c))->_end); + (&local_14,(void *)(GHIDRA_INT(local_14) + uVar2 * 8), + ((std_vector *)(GHIDRA_INT(local_1c.x) + 0x1c))->_end); } samplesEnd = psVar1->_begin; - uVar2 = (int)(this->_samples)._end - (int)samplesEnd >> 3; + uVar2 = GHIDRA_INT((this->_samples)._end) - GHIDRA_INT(samplesEnd) >> 3; if (1 < uVar2) { local_1c.y = 0.0; local_1c.x = 0.0; @@ -1859,9 +1859,9 @@ byte HomingLaser::clip_samples_to_grid(Vector *pos, int gridCollisionClass) lineStart.x = pos->x + *(float *)((char *)samplesEnd + uVar2 * 8 + -0x10); lineStart.y = (float)local_14 + *(float *)((char *)samplesEnd + uVar2 * 8 + -0xc); Room::check_line_collision - (g_game->_room,&lineStart,&local_24,gridCollisionClass,1,(int)samplesEnd, + (g_game->_room,&lineStart,&local_24,gridCollisionClass,1,GHIDRA_INT(samplesEnd), &local_1c); - samplesEnd = ((std_vector *)((int)fVar3 + 0x1c))->_end; + samplesEnd = ((std_vector *)(GHIDRA_INT(fVar3) + 0x1c))->_end; *(float *)((char *)samplesEnd + -8) = local_1c.x - pos->x; *(float *)((char *)samplesEnd + -4) = local_1c.y - (float)local_14; } @@ -1870,7 +1870,7 @@ byte HomingLaser::clip_samples_to_grid(Vector *pos, int gridCollisionClass) samplesEnd = (this->_samples)._end; uVar2 = uVar2 + 1; local_14 = psVar1->_begin; - } while (uVar2 < (uint)((int)samplesEnd - (int)local_14 >> 3)); + } while (uVar2 < GHIDRA_UINT((GHIDRA_INT(samplesEnd) - GHIDRA_INT(local_14) >> 3))); } } return 0; @@ -1890,31 +1890,31 @@ void HomingLaser::truncate_samples_at_player() sampleIndex = 2; playerListEnd = (this->_samples)._begin; - if ((uint)((int)(this->_samples)._end - (int)playerListEnd >> 3) < 3) { + if (GHIDRA_UINT((GHIDRA_INT((this->_samples)._end) - GHIDRA_INT(playerListEnd) >> 3)) < 3) { return; } game = g_game; do { playerManager = &game->_playerManager; playerIndex = 0; - if ((int)(game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> 2 + if (GHIDRA_INT((game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { playerListEnd = (playerManager->_playerList)._end; - if ((int)playerListEnd - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (playerManager->_playerList)._end; game = g_game; } playerSlot = (playerManager->_playerList)._begin; - if (playerIndex < (uint)((int)playerListEnd - (int)playerSlot >> 2)) { + if (playerIndex < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + playerIndex; } playerListEnd = (this->_samples)._begin; dx = *(float *)(*playerSlot + 0x33c) - *(float *)((char *)playerListEnd + sampleIndex * 8); dy = *(float *)(*playerSlot + 0x340) - *(float *)((char *)playerListEnd + sampleIndex * 8 + 4); if (dy * dy + dx * dx < 100.0) { - playerListEnd = (void *)((int)playerListEnd + sampleIndex * 8); + playerListEnd = (void *)(GHIDRA_INT(playerListEnd) + sampleIndex * 8); if (playerListEnd == (this->_samples)._end) { return; } @@ -1924,11 +1924,11 @@ void HomingLaser::truncate_samples_at_player() playerManager = &game->_playerManager; playerIndex = playerIndex + 1; } while (playerIndex < - (uint)((int)(game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } sampleIndex = sampleIndex + 1; - if ((uint)((int)(this->_samples)._end - (int)playerListEnd >> 3) <= sampleIndex) { + if (GHIDRA_UINT((GHIDRA_INT((this->_samples)._end) - GHIDRA_INT(playerListEnd) >> 3)) <= sampleIndex) { return; } } while( true ); @@ -1953,7 +1953,7 @@ void HomingLaser::truncate_samples_at_obstacle(Vector *positionOffset) pvVar1 = (this->_samples)._end; pvVar2 = (this->_samples)._begin; - if ((pvVar2 != pvVar1) && (uVar3 = 1, 1 < ((int)pvVar1 - (int)pvVar2 >> 3) - 1U)) { + if ((pvVar2 != pvVar1) && (uVar3 = 1, 1 < (GHIDRA_INT(pvVar1) - GHIDRA_INT(pvVar2) >> 3) - 1U)) { while( true ) { segStartX = *(float *)((char *)pvVar2 + uVar3 * 8); segLength = *(float *)((char *)pvVar2 + uVar3 * 8 + 8); @@ -1979,14 +1979,14 @@ void HomingLaser::truncate_samples_at_obstacle(Vector *positionOffset) break; uVar3 = uVar3 + 1; pvVar2 = (this->_samples)._begin; - if (((int)(this->_samples)._end - (int)pvVar2 >> 3) - 1U <= uVar3) { + if ((GHIDRA_INT((this->_samples)._end) - GHIDRA_INT(pvVar2) >> 3) - 1U <= uVar3) { return; } } pvVar1 = (this->_samples)._begin; *(float *)((char *)pvVar1 + uVar3 * 8) = endPoint.x; *(float *)((char *)pvVar1 + uVar3 * 8 + 4) = endPoint.y; - pvVar1 = (void *)((int)pvVar1 + uVar3 * 8 + 8); + pvVar1 = (void *)(GHIDRA_INT(pvVar1) + uVar3 * 8 + 8); if (pvVar1 != (this->_samples)._end) { (this->_samples)._end = pvVar1; } @@ -2013,7 +2013,7 @@ void HomingLaser::remove_collinear_samples(float tolerance) if (&this->_nonOptimizedSamples != psVar1) { std::vector::assign(psVar1->_begin,(this->_samples)._end,this); } - iVar3 = (int)(this->_samples)._end - (int)psVar1->_begin >> 3; + iVar3 = GHIDRA_INT((this->_samples)._end) - GHIDRA_INT(psVar1->_begin) >> 3; if (iVar3 != 0) { lastIdx = iVar3 - 1; i = 1; @@ -2027,7 +2027,7 @@ void HomingLaser::remove_collinear_samples(float tolerance) inDir.x = inDir.x * (1.0 / length); inDir.y = inDir.y * (1.0 / length); } - shiftCursor = (float *)((int)pvVar2 + i * 8 + 8); + shiftCursor = (float *)(GHIDRA_INT(pvVar2) + i * 8 + 8); outDirX = *shiftCursor - *(float *)((char *)psVar1->_begin + i * 8); outDirY = *(float *)((char *)pvVar2 + i * 8 + 0xc) - *(float *)((char *)psVar1->_begin + i * 8 + 4); @@ -2071,31 +2071,31 @@ void HomingLaser::apply_sample_wiggle(float amplitude, float phase) samples = (this->_samples)._begin; pvVar1 = (this->_samples)._end; if (samples != pvVar1) { - iVar2 = (int)pvVar1 - (int)samples >> 3; + iVar2 = GHIDRA_INT(pvVar1) - GHIDRA_INT(samples) >> 3; if (*(int *)&(*(undefined1 *)((char *)(this) + 0x40)) == 1) { local_20 = 0.0; if (iVar2 != 0) { do { - radialX = *(float *)((char *)samples + (int)local_20 * 8) - *(float *)&(*(undefined1 *)((char *)(this) + 0x4)); - fVar4 = *(float *)((char *)samples + (int)local_20 * 8 + 4); + radialX = *(float *)((char *)samples + GHIDRA_INT(local_20) * 8) - *(float *)&(*(undefined1 *)((char *)(this) + 0x4)); + fVar4 = *(float *)((char *)samples + GHIDRA_INT(local_20) * 8 + 4); local_24 = fVar4 - *(float *)&(*(undefined1 *)((char *)(this) + 0x8)); fVar3 = sqrtf(radialX * radialX + local_24 * local_24); if (0.0 < fVar3) { radialX = radialX * (1.0 / fVar3); local_24 = local_24 * (1.0 / fVar3); } - iVar2 = ((int)(this->_samples)._end - (int)(this->_samples)._begin >> 3) + -1; - fVar3 = sin(((float)((double)(int)local_20 + - __uint_to_double_fixup[-((int)local_20 >> 0x1f)]) * 25.132742) / + iVar2 = (GHIDRA_INT((this->_samples)._end) - GHIDRA_INT((this->_samples)._begin) >> 3) + -1; + fVar3 = sin(((float)((double)GHIDRA_INT(local_20) + + __uint_to_double_fixup[-(GHIDRA_INT(local_20) >> 0x1f)]) * 25.132742) / (float)((double)iVar2 + __uint_to_double_fixup[-(iVar2 >> 0x1f)]) - (float)g_game->_frameCount * 0.16); - *(float *)((char *)samples + (int)local_20 * 8) = - radialX * fVar3 * 10.0 * amplitude + *(float *)((char *)samples + (int)local_20 * 8); - *(float *)((char *)samples + (int)local_20 * 8 + 4) = + *(float *)((char *)samples + GHIDRA_INT(local_20) * 8) = + radialX * fVar3 * 10.0 * amplitude + *(float *)((char *)samples + GHIDRA_INT(local_20) * 8); + *(float *)((char *)samples + GHIDRA_INT(local_20) * 8 + 4) = local_24 * fVar3 * 10.0 * amplitude + fVar4; - local_20 = (float)((int)local_20 + 1); - } while ((uint)local_20 < - (uint)((int)(this->_samples)._end - (int)(this->_samples)._begin >> 3)); + local_20 = (float)(GHIDRA_INT(local_20) + 1); + } while (GHIDRA_UINT(local_20) < + GHIDRA_UINT((GHIDRA_INT((this->_samples)._end) - GHIDRA_INT((this->_samples)._begin) >> 3))); return; } } @@ -2108,9 +2108,9 @@ void HomingLaser::apply_sample_wiggle(float amplitude, float phase) if (1.0 <= fVar4) { fVar4 = 1.0; } - wavePeriod = (int)(15.0 - fVar4 * 11.0); + wavePeriod = GHIDRA_INT((15.0 - fVar4 * 11.0)); if (2 < iVar2 - 3U) { - sampleY = (float *)((int)samples + 0x14); + sampleY = (float *)(GHIDRA_INT(samples) + 0x14); do { segDx = sampleY[1] - sampleY[-1]; fVar4 = *sampleY; @@ -2122,15 +2122,15 @@ void HomingLaser::apply_sample_wiggle(float amplitude, float phase) } fVar3 = sin((float)g_game->_frameCount * 0.1 + phase); fVar3 = fVar3 * 20.0 * amplitude; - if ((int)local_24 % (wavePeriod * 2) < wavePeriod) { + if (GHIDRA_INT(local_24) % (wavePeriod * 2) < wavePeriod) { fVar3 = -fVar3; } - local_24 = (float)((int)local_24 + 1); + local_24 = (float)(GHIDRA_INT(local_24) + 1); sampleY[-1] = local_20 * fVar3 + sampleY[-1]; *sampleY = -segDx * fVar3 + fVar4; sampleY = sampleY + 2; - } while ((uint)local_24 < - ((int)(this->_samples)._end - (int)(this->_samples)._begin >> 3) - 3U); + } while (GHIDRA_UINT(local_24) < + (GHIDRA_INT((this->_samples)._end) - GHIDRA_INT((this->_samples)._begin) >> 3) - 3U); } } } @@ -2175,7 +2175,7 @@ undefined4 HomingLaser::find_targets(float *param_1, float *param_2, int param_3 ExceptionList = &local_10; homingLaser = in_ECX; EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&candidates,param_3,param_4,-1,0,0); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&candidates,param_3,param_4,-1,0,0); local_8 = 0; param_4 = 1; if (1 < (*(int *)(in_ECX + 0x20) - *(int *)(in_ECX + 0x1c) >> 3) - 1U) { @@ -2233,27 +2233,27 @@ LAB_009a1371: candidateIndex = candidateIndex + 1; candidateCount = candidates._size; in_ECX = homingLaser; - } while (candidateIndex < (uint)candidates._size); + } while (candidateIndex < GHIDRA_UINT(candidates._size)); } param_4 = param_4 + 1; } while (param_4 < (*(int *)(in_ECX + 0x20) - *(int *)(in_ECX + 0x1c) >> 3) - 1U); } hitEntity = 0; LAB_009a13e5: - if (candidates._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(candidates) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (candidates._data != (void *)0x0) { candidateCount = *(uint *)((char *)candidates._data + -4); qVar1 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - candidateCount; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - candidateCount; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar1 < candidateCount); - free((void *)((int)candidates._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < candidateCount)); + free((void *)(GHIDRA_INT(candidates._data) + -4)); } } ExceptionList = local_10; @@ -2278,7 +2278,7 @@ byte HomingLaser::truncate_samples(float maxLength) sample = (this->_samples)._begin; if (sample != sample) { uVar4 = 0; - iVar3 = (int)sample - (int)sample >> 3; + iVar3 = GHIDRA_INT(sample) - GHIDRA_INT(sample) >> 3; if (iVar3 != 1) { remainingLength = maxLength; do { @@ -2288,7 +2288,7 @@ byte HomingLaser::truncate_samples(float maxLength) segmentLength = sqrtf(dy * dy + dx * dx); if (remainingLength <= segmentLength) { pvVar1 = (this->_samples)._begin; - sample = (float *)((int)pvVar1 + uVar4 * 8 + 8); + sample = (float *)(GHIDRA_INT(pvVar1) + uVar4 * 8 + 8); *sample = (dx * remainingLength) / segmentLength + *sample; *(float *)((char *)pvVar1 + uVar4 * 8 + 0xc) = (dy * remainingLength) / segmentLength + sampleY; diff --git a/src/game/hud.cpp b/src/game/hud.cpp index 0697e04..9b04885 100644 --- a/src/game/hud.cpp +++ b/src/game/hud.cpp @@ -24,31 +24,31 @@ void HUD::constructor() _eh_vector_constructor_iterator_(this,0x6dc,8,FUN_006efc70,FUN_006efde0); local_8 = 0; ((Font *)(&this->_font))->Font::Font(); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((Font *)(&this->_fontKR))->Font::Font(); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; ((ANM2 *)(&this->_chargeBarSprite))->ANM2::constructor(); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; ((ANM2 *)(&this->_chargeBarSmallSprite))->ANM2::constructor(); - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; ((ANM2 *)(&this->_heartsSprite))->ANM2::constructor(); - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; ((ANM2 *)(&this->_pickupHUDSprite))->ANM2::constructor(); - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; ((ANM2 *)(&this->_cardsPillsSprite))->ANM2::constructor(); - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; FUN_008405b0(); - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; _eh_vector_constructor_iterator_(this->_messageStack,500,6,FUN_008405b0,HUD_Message::~HUD_Message) ; - local_8._0_1_ = 9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; _eh_vector_constructor_iterator_ (this->_messagePlayerHUD,500,4,FUN_008405b0,HUD_Message::~HUD_Message); - local_8._0_1_ = 10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 10; ((ANM2 *)(&this->_fortuneSprite))->ANM2::constructor(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x536c)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x5370)) = 0; - local_8._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc; ((ANM2 *)(&this->_statsSprite))->ANM2::constructor(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x5488)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x548c)) = 0; @@ -62,17 +62,17 @@ void HUD::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x54c0)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x54c4)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x54c8)) = 0; - local_8._0_1_ = 0x13; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x13; ((ANM2 *)(&this->_coopMenuSprite))->ANM2::constructor(); - local_8._0_1_ = 0x14; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x14; ((ANM2 *)(&this->_inventorySprite))->ANM2::constructor(); - local_8._0_1_ = 0x15; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x15; ((ANM2 *)(&this->_craftingTableSprite))->ANM2::constructor(); - local_8._0_1_ = 0x16; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x16; ((ANM2 *)(&this->_poopSpellsSprite))->ANM2::constructor(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x592c)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x5930)) = 0; - local_8._0_1_ = 0x18; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x18; remaining = 4; cursor = (undefined4 *)&(*(undefined1 *)((char *)(this) + 0x5934)); do { @@ -92,7 +92,7 @@ void HUD::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x59a0)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x599c)) = 0; ((ANM2 *)((ANM2 *)&this->_statHUD))->ANM2::constructor(); - local_8._0_1_ = 0x19; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x19; cursor = (undefined4 *)&(*(undefined1 *)((char *)(this) + 0x5ab8)); remaining = 2; do { @@ -101,11 +101,11 @@ void HUD::constructor() cursor = cursor + 0x33; remaining = remaining + -1; } while (remaining != 0); - local_8._0_1_ = 0x1a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1a; _eh_vector_constructor_iterator_ (&this->_historyHUD,0x14,2,(_func_void_void_ptr *)&LAB_0083ab90, (_func_void_void_ptr *)&LAB_006f3050); - local_8._0_1_ = 0x1b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1b; text_image_cache_clear(&this->_historyHUD); this[1]._playerHUD[0x2c] = 0; this[1]._playerHUD[0x2d] = 0; @@ -119,13 +119,13 @@ void HUD::constructor() this[1]._playerHUD[0x35] = 0; this[1]._playerHUD[0x36] = 0; this[1]._playerHUD[0x37] = 0; - local_8._0_1_ = 0x1d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1d; ((ANM2 *)((ANM2 *)(this[1]._playerHUD + 0x38)))->ANM2::constructor(); - local_8._0_1_ = 0x1e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1e; ((ANM2 *)((ANM2 *)(this[1]._playerHUD + 0x14c)))->ANM2::constructor(); - local_8._0_1_ = 0x1f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1f; SharedPtrPair::constructor(); - local_8._0_1_ = 0x20; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x20; ((ANM2 *)((ANM2 *)(this[1]._playerHUD + 0x28c)))->ANM2::constructor(); this[1]._playerHUD[0x3a0] = 0xff; this[1]._playerHUD[0x3a1] = 0xff; @@ -153,7 +153,7 @@ void HUD::constructor() this[1]._playerHUD[0x3c2] = 0; this[1]._playerHUD[0x3c3] = 0; *pbVar1 = 0; - local_8 = CONCAT31(local_8._1_3_,0x22); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x22); ((Font *)((Font *)(this[1]._playerHUD + 0x3c4)))->Font::Font(); this[1]._playerHUD[0x410] = 0; this[1]._playerHUD[0x411] = 0; @@ -180,7 +180,7 @@ void HUD::destructor() puStack_c = &LAB_00afba80; local_10 = ExceptionList; ExceptionList = &local_10; - FUN_0083c4c0(__security_cookie ^ (int)register0x00000010 - 4U); + FUN_0083c4c0(__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); local_8 = 0; _eh_vector_destructor_iterator_(&this->_historyHUD,0x14,2,(_func_void_void_ptr *)&LAB_006f3050); local_8 = 1; @@ -320,14 +320,14 @@ void HUD::destructor() fontCharMap = &(this->_fontKR)._charsBlock; FID_conflict__Erase_tree_>_> (fontCharMap,(fuzzer_allocator_> *)fontCharMap, - *(_Tree_node **)((int)(this->_fontKR)._charsBlock._head + 4)); + *(_Tree_node **)(GHIDRA_INT((this->_fontKR)._charsBlock._head) + 4)); operator_delete(fontCharMap->_head,0x18); FUN_004b3950(); ((Font *)(&this->_font))->Font::Unload(); fontCharMap = &(this->_font)._charsBlock; FID_conflict__Erase_tree_>_> (fontCharMap,(fuzzer_allocator_> *)fontCharMap, - *(_Tree_node **)((int)(this->_font)._charsBlock._head + 4)); + *(_Tree_node **)(GHIDRA_INT((this->_font)._charsBlock._head) + 4)); operator_delete(fontCharMap->_head,0x18); FUN_004b3950(); _eh_vector_destructor_iterator_(this,0x6dc,8,FUN_006efde0); @@ -387,14 +387,14 @@ void HUD::render_extra_hud(float *param_2, byte param_3) int *itemImage; byte shaderFlags; - local_14 = __security_cookie ^ (uint)auStack_2b8; + local_14 = __security_cookie ^ GHIDRA_UINT(auStack_2b8); originY = param_2[1]; listX = *param_2; iconSize = 16.0; if (param_3 == 0) { iconSize = (float)&DAT_42000000; } - uVar2 = (uint)param_3 * 2 + 2; + uVar2 = GHIDRA_UINT(param_3) * 2 + 2; local_2a0.x = (((1.0 - (g_manager->_optionsConfig)._hudOffset) * 14.0 + (g_screenHeight - 64.0)) - originY) / iconSize; local_298 = uVar2; @@ -409,7 +409,7 @@ void HUD::render_extra_hud(float *param_2, byte param_3) secondListRows = ((*(int *)(this->_playerHUD + 0x20) - *(int *)(this->_playerHUD + 0x1c)) / 0x28 - 1U) / local_298; - if ((int)(uVar2 + 1) < (int)(secondListRows + 1)) { + if (GHIDRA_INT((uVar2 + 1)) < GHIDRA_INT((secondListRows + 1))) { uVar2 = secondListRows; } iVar3 = uVar2 + 1; @@ -421,8 +421,8 @@ void HUD::render_extra_hud(float *param_2, byte param_3) quadColor[0]._green = 0.5019608; quadColor[0]._blue = 0.5019608; quadColor[0]._alpha = 0.5019608; - if ((int)dVar5 < iVar3) { - iVar3 = (int)dVar5; + if (GHIDRA_INT(dVar5) < iVar3) { + iVar3 = GHIDRA_INT(dVar5); } local_290.y = (float)iVar3 * iconSize; local_2a0.x = listX + 32.0; @@ -436,7 +436,7 @@ void HUD::render_extra_hud(float *param_2, byte param_3) cachedBottomY = bottomY; cachedOriginY = originY; do { - if (*(int *)((HUD *)((int)local_2a0.x + -0xc))->_playerHUD == 0) break; + if (*(int *)((HUD *)(GHIDRA_INT(local_2a0.x) + -0xc))->_playerHUD == 0) break; local_2a4 = *(uint **)((char *)local_2a0.x + -4); itemIndex = 0; if (local_2a4 != *(uint **)local_2a0.x) { @@ -446,8 +446,8 @@ void HUD::render_extra_hud(float *param_2, byte param_3) quadColor[0]._green = 1.0; quadColor[0]._blue = 1.0; quadColor[0]._alpha = 0.5; - itemY = (float)(itemIndex / (int)local_298) * fVar4 + cachedOriginY; - itemX = (float)(itemIndex % (int)local_298) * fVar4 + listX; + itemY = (float)(itemIndex / GHIDRA_INT(local_298)) * fVar4 + cachedOriginY; + itemX = (float)(itemIndex % GHIDRA_INT(local_298)) * fVar4 + listX; if (cachedBottomY <= itemY) break; uVar2 = *local_2a4; shaderColor._offset[0] = 0.0; @@ -469,14 +469,14 @@ LAB_0083aeee: shader = g_currentShader; } uVar2 = g_manager->_framecount / 2 & 0x800000ff; - if ((int)uVar2 < 0) { + if (GHIDRA_INT(uVar2) < 0) { uVar2 = (uVar2 - 1 | 0xffffff00) + 1; } - shaderColor._colorize[3] = (float)(int)uVar2 * 0.00390625; + shaderColor._colorize[3] = (float)GHIDRA_INT(uVar2) * 0.00390625; g_currentShader = shader; } else { - if ((0 < (int)uVar2) && ((uVar2 & 0x88000) == 0x88000)) { + if ((0 < GHIDRA_INT(uVar2)) && ((uVar2 & 0x88000) == 0x88000)) { shader = &DAT_00c79208; shaderFlags = DAT_00c7920c; goto LAB_0083aeee; @@ -491,14 +491,14 @@ LAB_0083aeee: if (((char)local_2a4[4] != '\0') && (local_2a4[5] == 0x14)) { sourceQuad._topLeft.x = g_vectorZero.x + - (float)(3 - *(int *)(*(int *)((HUD *)((int)local_2a0.x + -0xc))->_playerHUD + + (float)(3 - *(int *)(*(int *)((HUD *)(GHIDRA_INT(local_2a0.x) + -0xc))->_playerHUD + 0x1394)) * 32.0; } sourceQuad._topRight.y = g_vectorZero.y; sourceQuad._topRight.x = sourceQuad._topLeft.x + 32.0; sourceQuad._topLeft.y = g_vectorZero.y; sourceQuad._bottomLeft.y = g_vectorZero.y + 32.0; - sourceQuad._coordinateSpace._0_1_ = 1; + (*(undefined1 *)((char *)&(sourceQuad._coordinateSpace) + 0x0)) = 1; whiteColor._unk = 0; whiteColor._red = 1.0; whiteColor._green = 1.0; @@ -544,7 +544,7 @@ LAB_0083aeee: copyDst = copyDst + 1; } if (local_2a4[1] == 0) { - if ((int)*local_2a4 < 0) { + if (GHIDRA_INT(*local_2a4) < 0) { local_290.x = (float)(auStackY_350 + 0x88); KAGE::SmartPointer::operator_assign (auStackY_350 + 0x88,&(g_game->_proceduralItemManager)._renderTarget); @@ -601,10 +601,10 @@ LAB_0083b1fb: } while (local_2a4 != *(uint **)local_2a0.x); } listX = listX + 33.0; - local_2a0.x = (float)((int)local_2a0.x + 0x14); + local_2a0.x = (float)(GHIDRA_INT(local_2a0.x) + 0x14); listIndex = listIndex + 1; } while (listIndex < 2); - shader_cache_find((int)local_2a0.x); + shader_cache_find(GHIDRA_INT(local_2a0.x)); } return; } @@ -680,7 +680,7 @@ void HUD::rebuild_player_item_icons(void *iconCaches, uint playerIdx, byte isReb local_1c = ExceptionList; ExceptionList = &local_1c; if (playerIdx < 2) { - piVar1 = (int *)((int)iconCaches + playerIdx * 0x14); + piVar1 = (int *)(GHIDRA_INT(iconCaches) + playerIdx * 0x14); local_38 = (int *)*piVar1; if (local_38 != (int *)0x0) { if (isRebuild == 0) { @@ -697,16 +697,16 @@ void HUD::rebuild_player_item_icons(void *iconCaches, uint playerIdx, byte isReb if (iconIt[1] != 0) { oldIconKey = *iconIt; ((KAGE::SmartPointer *)(oldIconImage))->KAGE::SmartPointer::operator_assign(iconIt + 1); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; uStack_160 = 0x83b33b; FUN_0083c320(); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (((local_50 != (int *)0x0) && (isLastRef = (**(code **)(*local_50 + 0xc))(), isLastRef != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(); } - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; } iconIt = iconIt + 10; } while (iconIt != (undefined4 *)piVar1[3]); @@ -722,7 +722,7 @@ void HUD::rebuild_player_item_icons(void *iconCaches, uint playerIdx, byte isReb local_30 = (int *)*historyEntry; LAB_0083b473: trinketId = 0; - itemConfig = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible((int)local_30); + itemConfig = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(GHIDRA_INT(local_30)); piVar1 = local_30; } else { @@ -748,8 +748,8 @@ LAB_0083b473: } } local_34 = (g_manager->_itemConfig)._trinkets._begin; - if ((int)(trinketId & 0x7fff) < - (int)(g_manager->_itemConfig)._trinkets._end - (int)local_34 >> 2) { + if (GHIDRA_INT((trinketId & 0x7fff)) < + GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(local_34) >> 2) { itemConfig = (ItemConfig_Item *)local_34[trinketId & 0x7fff]; } else { @@ -760,7 +760,7 @@ LAB_0083b473: if (itemConfig->id < 0) { ((KAGE::SmartPointer *)(&uStack_160))->KAGE::SmartPointer::SmartPointer((void *)0x0); newIcon = (void *)FUN_0083aae0(); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; emptyIconKey = itemConfig->id; ((KAGE::SmartPointer *)(emptyIconImage))->KAGE::SmartPointer::operator_assign(newIcon); local_7c = *(undefined4 *)((char *)newIcon + 8); @@ -770,15 +770,15 @@ LAB_0083b473: local_6c = *(undefined4 *)((char *)newIcon + 0x18); uStack_68 = *(undefined4 *)((char *)newIcon + 0x1c); local_64 = *(undefined4 *)((char *)newIcon + 0x20); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; FUN_0083bf90(); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; if (((emptyIconImageRef != (int *)0x0) && (isLastRef = (**(code **)(*emptyIconImageRef + 0xc))(), isLastRef != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(); } - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; if (tmpEmptyImageRef != (int *)0x0) { isLastRef = (**(code **)(*tmpEmptyImageRef + 0xc))(); joined_r0x0083b790: @@ -796,13 +796,13 @@ joined_r0x0083b790: local_34 = cacheKey; std::set::find_node(); if ((*(char *)((char *)local_50 + 0xd) != '\0') || - (local_30 = local_50, (int)cacheKey < local_50[4])) { + (local_30 = local_50, GHIDRA_INT(cacheKey) < local_50[4])) { local_30 = oldImagesHead; } if (local_30 != oldImagesHead) { ((KAGE::SmartPointer *)(&uStack_160))->KAGE::SmartPointer::operator_assign(local_30 + 5); newIcon = (void *)FUN_0083aae0(); - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; cachedIconKey = local_30[4]; ((KAGE::SmartPointer *)(cachedIconImage))->KAGE::SmartPointer::operator_assign(newIcon); local_a4 = *(undefined4 *)((char *)newIcon + 8); @@ -812,21 +812,21 @@ joined_r0x0083b790: local_94 = *(undefined4 *)((char *)newIcon + 0x18); uStack_90 = *(undefined4 *)((char *)newIcon + 0x1c); local_8c = *(undefined4 *)((char *)newIcon + 0x20); - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; FUN_0083bf90(); - local_14._0_1_ = 9; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; if (((cachedIconImageRef != (int *)0x0) && (isLastRef = (**(code **)(*cachedIconImageRef + 0xc))(), isLastRef != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(); } - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; if (((tmpCachedImageRef != (int *)0x0) && (isLastRef = (**(code **)(*tmpCachedImageRef + 0xc))(), isLastRef != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(); } - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; uStack_160 = 0x83b686; FUN_00414d60(); goto LAB_0083b7a8; @@ -837,11 +837,11 @@ joined_r0x0083b790: } uStack_160 = 0x83b6a3; Manager::LoadImage(&image,(byte *)path); - local_14._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; if (image != 0) { ((KAGE::SmartPointer *)(&uStack_160))->KAGE::SmartPointer::operator_assign(&image); newIcon = (void *)FUN_0083aae0(); - local_14._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; ((KAGE::SmartPointer *)(loadedIconImage))->KAGE::SmartPointer::operator_assign(newIcon); local_cc = *(undefined4 *)((char *)newIcon + 8); uStack_c8 = *(undefined4 *)((char *)newIcon + 0xc); @@ -850,28 +850,28 @@ joined_r0x0083b790: local_bc = *(undefined4 *)((char *)newIcon + 0x18); uStack_b8 = *(undefined4 *)((char *)newIcon + 0x1c); local_b4 = *(undefined4 *)((char *)newIcon + 0x20); - local_14._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xd; FUN_0083bf90(); - local_14._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xe; if (((loadedIconImageRef != (int *)0x0) && (isLastRef = (**(code **)(*loadedIconImageRef + 0xc))(), isLastRef != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(); } - local_14._0_1_ = 0xf; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xf; if (((tmpLoadedImageRef != (int *)0x0) && (isLastRef = (**(code **)(*tmpLoadedImageRef + 0xc))(), isLastRef != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(); } } - local_14._0_1_ = 0x10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x10; if (imageRef != (int *)0x0) { isLastRef = (**(code **)(*imageRef + 0xc))(); goto joined_r0x0083b790; } } - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; } LAB_0083b7a8: historyIt = historyIt + -0x1c; @@ -998,7 +998,7 @@ void HUD::update_player_hud_slots(byte param_2) if ((void **)(local_1c + 0xc) == &movedImagesBegin) { if (imagesBegin != (void *)0x0) { if (imagesBegin != pvVar6) { - iVar2 = (int)imagesBegin + 4; + iVar2 = GHIDRA_INT(imagesBegin) + 4; do { local_8 = 2; if (((*(int **)(iVar2 + 4) != (int *)0x0) && @@ -1012,12 +1012,12 @@ void HUD::update_player_hud_slots(byte param_2) } while (pvVar1 != pvVar6); } entry = local_1c; - uVar4 = ((movedImagesCapacity - (int)imagesBegin) / 0x28) * 0x28; + uVar4 = ((movedImagesCapacity - GHIDRA_INT(imagesBegin)) / 0x28) * 0x28; pvVar6 = imagesBegin; if (0xfff < uVar4) { pvVar6 = *(void **)((char *)imagesBegin + -4); uVar4 = uVar4 + 0x23; - if (0x1f < (uint)((int)imagesBegin + (-4 - (int)pvVar6))) goto LAB_0083bba5; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(imagesBegin) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_0083bba5; } operator_delete(pvVar6,uVar4); goto LAB_0083ba90; @@ -1043,12 +1043,12 @@ void HUD::update_player_hud_slots(byte param_2) } while ((byte *)piVar5 != pbVar3); piVar5 = *(int **)(entry + 0xc); } - uVar4 = ((*(int *)(entry + 0x14) - (int)piVar5) / 0x28) * 0x28; + uVar4 = ((*(int *)(entry + 0x14) - GHIDRA_INT(piVar5)) / 0x28) * 0x28; ptr = piVar5; if (0xfff < uVar4) { ptr = (int *)piVar5[-1]; uVar4 = uVar4 + 0x23; - if (0x1f < (uint)((int)piVar5 + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(piVar5) + (-4 - GHIDRA_INT(ptr))))) { LAB_0083bba5: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1069,25 +1069,25 @@ LAB_0083ba90: shiftIndex = shiftIndex + 1; uVar4 = slotIndex; pHVar7 = slotEntry; - } while ((int)shiftIndex < 2); + } while (GHIDRA_INT(shiftIndex) < 2); } } } slotIndex = uVar4 - 1; slotEntry = (HUD *)&(*(undefined1 *)((char *)&(pHVar7[0xffffffff]) + 0x5c44)); - if ((int)slotIndex < 1) { + if (GHIDRA_INT(slotIndex) < 1) { uVar4 = 0; playerManager = &g_game->_playerManager; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar6 = (playerManager->_playerList)._end; - if ((int)pvVar6 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar6) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar6 = (playerManager->_playerList)._end; } piVar5 = (playerManager->_playerList)._begin; - if (uVar4 < (uint)((int)pvVar6 - (int)piVar5 >> 2)) { + if (uVar4 < GHIDRA_UINT((GHIDRA_INT(pvVar6) - GHIDRA_INT(piVar5) >> 2))) { piVar5 = piVar5 + uVar4; } iVar2 = *piVar5; @@ -1102,8 +1102,8 @@ LAB_0083ba90: } uVar4 = uVar4 + 1; playerManager = &g_game->_playerManager; - } while (uVar4 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar4 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } ExceptionList = local_10; return; @@ -1128,26 +1128,26 @@ void HUD::load_item_info_graphics() undefined4 local_14; byte *currentAnim; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b0288d; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; - resourcePath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(resourcePath._buf) + 0x0)) = std::_Allocate(0x30); resourcePath._size = 0x20; resourcePath._capacity = 0x2f; - builtin_strncpy((char *)resourcePath._buf._0_4_,"font/TeamMeatEx/TeamMeatEx12.fnt",0x21); + builtin_strncpy((*(undefined4 *)((char *)&((char *)resourcePath._buf) + 0x0)),"font/TeamMeatEx/TeamMeatEx12.fnt",0x21); local_14 = 0; ((RichText *)(this->_playerHUD + 900))->RichText::load_font(&resourcePath); local_14 = 0xffffffff; if (0xf < resourcePath._capacity) { uVar3 = resourcePath._capacity + 1; - pcVar2 = (char *)resourcePath._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)resourcePath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(resourcePath._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(resourcePath._buf) + 0x0)) + -4); uVar3 = resourcePath._capacity + 0x24; - if ((char *)0x1f < (char *)(resourcePath._buf._0_4_ + (-4 - (int)pcVar2))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(resourcePath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1165,20 +1165,20 @@ void HUD::load_item_info_graphics() chargeIconsPath._buf[1] = '\0'; chargeIconsPath._buf[2] = '\0'; chargeIconsPath._buf[3] = '\0'; - chargeIconsPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(chargeIconsPath._buf) + 0x0)) = std::_Allocate(0x20); chargeIconsPath._size = 0x1b; chargeIconsPath._capacity = 0x1f; - builtin_strncpy((char *)chargeIconsPath._buf._0_4_,"gfx/ui/ui_charge_icons.anm2",0x1c); + builtin_strncpy((*(undefined4 *)((char *)&((char *)chargeIconsPath._buf) + 0x0)),"gfx/ui/ui_charge_icons.anm2",0x1c); local_14 = 1; ((ANM2 *)((ANM2 *)(this->_playerHUD + 0x124)))->ANM2::Load(&chargeIconsPath,1); local_14 = 0xffffffff; if (0xf < chargeIconsPath._capacity) { uVar3 = chargeIconsPath._capacity + 1; - pcVar2 = (char *)chargeIconsPath._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)chargeIconsPath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(chargeIconsPath._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(chargeIconsPath._buf) + 0x0)) + -4); uVar3 = chargeIconsPath._capacity + 0x24; - if ((char *)0x1f < (char *)(chargeIconsPath._buf._0_4_ + (-4 - (int)pcVar2))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(chargeIconsPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1197,7 +1197,7 @@ void HUD::load_item_info_graphics() isLess = bVar1 < (byte)*pcVar2; if (bVar1 != *pcVar2) { LAB_0083c7c0: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0083c7c5; } if (bVar1 == 0) break; @@ -1228,19 +1228,19 @@ LAB_0083c7f1: resourcePath._buf[1] = '\0'; resourcePath._buf[2] = '\0'; resourcePath._buf[3] = '\0'; - resourcePath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(resourcePath._buf) + 0x0)) = std::_Allocate(0x20); resourcePath._size = 0x19; resourcePath._capacity = 0x1f; - builtin_strncpy((char *)resourcePath._buf._0_4_,"gfx/ui/minimap_icons.anm2",0x1a); + builtin_strncpy((*(undefined4 *)((char *)&((char *)resourcePath._buf) + 0x0)),"gfx/ui/minimap_icons.anm2",0x1a); local_14 = 2; ((ANM2 *)((ANM2 *)(this->_playerHUD + 0x264)))->ANM2::Load(&resourcePath,1); if (0xf < resourcePath._capacity) { uVar3 = resourcePath._capacity + 1; - pcVar2 = (char *)resourcePath._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)resourcePath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(resourcePath._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(resourcePath._buf) + 0x0)) + -4); uVar3 = resourcePath._capacity + 0x24; - if ((char *)0x1f < (char *)(resourcePath._buf._0_4_ + (-4 - (int)pcVar2))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(resourcePath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1345,11 +1345,11 @@ void HUD::update_item_info() int *popupListHead; puStack_20 = (undefined1 *)(spindownText + 0x14); - ehState._0_1_ = 0xff; - ehState._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(ehState) + 0x1)) = 0xffffff; puStack_18 = &LAB_00b02924; prevExceptionList = ExceptionList; - uVar6 = __security_cookie ^ (uint)(spindownText + 0x11); + uVar6 = __security_cookie ^ GHIDRA_UINT((spindownText + 0x11)); ExceptionList = &prevExceptionList; gameData = (PersistentGameData *)(g_manager[1]._persistentGameData._achievements + 0xc); if (g_manager->_netplayManager == *(NetplayManager *)(g_manager + 1)) { @@ -1485,8 +1485,8 @@ LAB_0083cfa5: ehState = (void *)0x6; LAB_0083cf7d: ((KAGE::SmartPointer *)(this->_playerHUD + 8))->KAGE::SmartPointer::operator_assign(pvVar8); - ehState._0_1_ = 0xff; - ehState._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(ehState) + 0x1)) = 0xffffff; FUN_0040c440(); ((ANM2 *)((ANM2 *)(this->_playerHUD + 0x10)))->ANM2::Reset(); pHVar13 = extraout_ECX_00; @@ -1513,15 +1513,15 @@ LAB_0083d11f: ehState = (void *)0x7; LAB_0083d02f: ((ANM2 *)((ANM2 *)(this->_playerHUD + 0x10)))->ANM2::Load(&tmpString,1); - ehState._0_1_ = 0xff; - ehState._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(ehState) + 0x1)) = 0xffffff; if (0xf < tmpString._capacity) { uVar6 = tmpString._capacity + 1; - pvVar8 = (void *)tmpString._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)tmpString._buf) + 0x0)); if (0xfff < uVar6) { - pvVar8 = *(void **)(tmpString._buf._0_4_ + -4); + pvVar8 = *(void **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar6 = tmpString._capacity + 0x24; - if (0x1f < (uint)(tmpString._buf._0_4_ + (-4 - (int)pvVar8))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar8))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1640,8 +1640,8 @@ LAB_0083d199: *(int *)(this->_playerHUD + 0x378) = iVar7; *(float *)(this->_playerHUD + 0x37c) = local_f8; *(float *)(this->_playerHUD + 0x380) = local_f4; - ehState._0_1_ = 0xff; - ehState._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(ehState) + 0x1)) = 0xffffff; FUN_00420710(); } if ((*(int *)(this->_playerHUD + 0x378) != -1) && @@ -1683,14 +1683,14 @@ LAB_0083d199: local_f4 = fVar1; (**(code **)(*(int *)&(*(undefined1 *)((char *)&(g_manager[1]._gamestate) + 0xcf8)) + 0xc))(); this_01 = (int *)0x0; - popupListHead = *(int **)&(*(undefined1 *)((char *)&((((Manager *)((int)local_ec.y + 0x4b3dc))->_gamestate)) + 0xcf0)) + popupListHead = *(int **)&(*(undefined1 *)((char *)&((((Manager *)(GHIDRA_INT(local_ec.y) + 0x4b3dc))->_gamestate)) + 0xcf0)) ; popupNode = (int *)*popupListHead; if (popupNode != popupListHead) { while (this_01 = (int *)popupNode[2], *this_01 != *(int *)(this->_playerHUD + 0x378)) { popupNode = (int *)*popupNode; if (popupNode == popupListHead) { - (**(code **)(*(int *)&(((Manager *)((int)local_ec.y + 0x4b3dc))->_gamestate). + (**(code **)(*(int *)&(((Manager *)(GHIDRA_INT(local_ec.y) + 0x4b3dc))->_gamestate). field_0xcf8 + 0x10))(); this->_playerHUD[0x378] = 0xff; this->_playerHUD[0x379] = 0xff; @@ -1701,13 +1701,13 @@ LAB_0083d199: } } } - (**(code **)(*(int *)&(*(undefined1 *)((char *)&((((Manager *)((int)local_ec.y + 0x4b3dc))->_gamestate)) + 0xcf8)) + + (**(code **)(*(int *)&(*(undefined1 *)((char *)&((((Manager *)(GHIDRA_INT(local_ec.y) + 0x4b3dc))->_gamestate)) + 0xcf8)) + 0x10))(); if ((this_01 != (int *)0x0) && (this_01[1] < 3)) { elapsedMs = ((Popup *)(this_01))->Popup::get_elapsed_ms(); - if (((int)((ulonglong)elapsedMs >> 0x20) == 0) && ((uint)elapsedMs < (uint)this_01[0x15])) + if ((GHIDRA_INT(((ulonglong)elapsedMs >> 0x20)) == 0) && (GHIDRA_UINT(elapsedMs) < GHIDRA_UINT(this_01[0x15]))) { - this_01[6] = (int)local_f0; + this_01[6] = GHIDRA_INT(local_f0); this->_playerHUD[0x378] = 0xff; this->_playerHUD[0x379] = 0xff; this->_playerHUD[0x37a] = 0xff; @@ -1739,8 +1739,8 @@ code_r0x0083cc39: pEVar11 = local_dc; if (bVar4 == 0) goto LAB_0083cc16; LAB_0083cc50: - local_ec.y = (float)((int)local_ec.y + 1); - if ((int)local_ec.y < (int)pEVar11) goto LAB_0083cc16; + local_ec.y = (float)(GHIDRA_INT(local_ec.y) + 1); + if (GHIDRA_INT(local_ec.y) < GHIDRA_INT(pEVar11)) goto LAB_0083cc16; if (0 < iVar7) { iVar2 = *(int *)(this->_playerHUD + 4); tmpCStr = int_to_string(&tmpString,iVar7); @@ -1749,17 +1749,17 @@ LAB_0083cc50: prefixTextSize = 0x2f; prefixTextCapacity = 0x2f; builtin_strncpy(prefixText[0],"Spins down into std::string::concat_move((int)local_f4,prefixText,tmpCStr); - ehState._0_1_ = 2; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; + ((std::string *)((char *)spindownText))->std::string::concat_move(GHIDRA_INT(local_f4),prefixText,tmpCStr); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; FUN_0060c790(); ((InfoDisplayText *)(infoText))->InfoDisplayText::constructor(); - ehState = (void *)CONCAT31(ehState._1_3_,4); + ehState = (void *)CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),4); pppppppbVar9 = (byte *******)&local_110; - if (0xf < (uint)local_10c._unk) { + if (0xf < GHIDRA_UINT(local_10c._unk)) { pppppppbVar9 = local_110; } - ((std::string *)(this_00))->std::string::assign((byte *)pppppppbVar9,(uint)local_10c._alpha); + ((std::string *)(this_00))->std::string::assign((byte *)pppppppbVar9,GHIDRA_UINT(local_10c._alpha)); pvVar8 = *(void **)(iVar2 + 0x3c); if (pvVar8 == *(void **)(iVar2 + 0x40)) { std::vector<104byte>::_Emplace_reallocate(pvVar8,infoText); @@ -1775,54 +1775,54 @@ LAB_0083cc50: FID_conflict__Tidy(local_b4); FID_conflict__Tidy(local_c0); ((std::string *)(infoText))->std::string::_Tidy_deallocate(); - ehState._0_1_ = 2; - if (0xf < (uint)local_10c._unk) { + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; + if (0xf < GHIDRA_UINT(local_10c._unk)) { uVar6 = local_10c._unk + 1; pppppppbVar9 = local_110; if (0xfff < uVar6) { pppppppbVar9 = (byte *******)local_110[-1]; uVar6 = local_10c._unk + 0x24; - if ((byte *)0x1f < (byte *)((int)local_110 + (-4 - (int)pppppppbVar9))) goto LAB_0083cea2; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(local_110) + (-4 - GHIDRA_INT(pppppppbVar9)))) goto LAB_0083cea2; } operator_delete(pppppppbVar9,uVar6); } - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; local_10c._alpha = 0.0; local_10c._unk = 0xf; - local_110 = (byte *******)((uint)local_110 & 0xffffff00); + local_110 = (byte *******)(GHIDRA_UINT(local_110) & 0xffffff00); if (0xf < spindownTextCapacity) { uVar6 = spindownTextCapacity + 1; pvVar8 = spindownText[0]; if (0xfff < uVar6) { - pvVar8 = *(void **)((int)spindownText[0] + -4); + pvVar8 = *(void **)(GHIDRA_INT(spindownText[0]) + -4); uVar6 = spindownTextCapacity + 0x24; - if (0x1f < (uint)((int)spindownText[0] + (-4 - (int)pvVar8))) goto LAB_0083cea2; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(spindownText[0]) + (-4 - GHIDRA_INT(pvVar8))))) goto LAB_0083cea2; } operator_delete(pvVar8,uVar6); } - ehState._0_1_ = 0; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0; spindownTextSize = 0; spindownTextCapacity = 0xf; - spindownText[0] = (void *)((uint)spindownText[0] & 0xffffff00); + spindownText[0] = (void *)(GHIDRA_UINT(spindownText[0]) & 0xffffff00); if (0xf < prefixTextCapacity) { uVar6 = prefixTextCapacity + 1; ptr = prefixText[0]; if (0xfff < uVar6) { ptr = *(char **)(prefixText[0] + -4); uVar6 = prefixTextCapacity + 0x24; - if ((char *)0x1f < prefixText[0] + (-4 - (int)ptr)) goto LAB_0083cea2; + if ((char *)0x1f < prefixText[0] + (-4 - GHIDRA_INT(ptr))) goto LAB_0083cea2; } operator_delete(ptr,uVar6); } - ehState._0_1_ = 0xff; - ehState._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(ehState) + 0x1)) = 0xffffff; if (0xf < tmpString._capacity) { uVar6 = tmpString._capacity + 1; - pvVar8 = (void *)tmpString._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)tmpString._buf) + 0x0)); if (0xfff < uVar6) { - pvVar8 = *(void **)(tmpString._buf._0_4_ + -4); + pvVar8 = *(void **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar6 = tmpString._capacity + 0x24; - if (0x1f < (uint)(tmpString._buf._0_4_ + (-4 - (int)pvVar8))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar8))))) { LAB_0083cea2: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1832,7 +1832,7 @@ LAB_0083cea2: } tmpString._size = 0; tmpString._capacity = 0xf; - tmpString._buf._0_4_ = tmpString._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) & 0xffffff00; this = local_f0; } pHVar13 = local_e0; @@ -1886,7 +1886,7 @@ undefined4 HUD::ShowItemText(void *param_1) local_8 = (void *)0xffffffff; puStack_c = &LAB_00b03b3f; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(titleText + 0xb); + local_18 = __security_cookie ^ GHIDRA_UINT((titleText + 0xb)); ExceptionList = &local_10; refCleanupFlags = 0; local_5c = in_ECX; @@ -1897,7 +1897,7 @@ undefined4 HUD::ShowItemText(void *param_1) lua_pushvalue(param_1,3); arg3Ref = param_1; arg3RefId = luaL_ref(param_1,0xfff0b9d8); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; if (arg2RefId == -1) { LAB_0085e7ff: if (arg3RefId != -1) { @@ -2009,11 +2009,11 @@ LAB_0085e8d4: lua_pushvalue(param_1,4); arg4Ref = param_1; arg4RefId = luaL_ref(param_1,0xfff0b9d8); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; ((LuaRef *)(&arg4Ref))->LuaRef::push(param_1); uVar3 = lua_gettop(param_1); iVar2 = lua_toboolean(param_1,uVar3); - local_54 = CONCAT31(local_54._1_3_,iVar2 != 0); + local_54 = CONCAT31((*(undefined1 *)((char *)&(local_54) + 0x1)),iVar2 != 0); lua_settop(param_1,0xfffffffe); if (arg3RefId == -1) { LAB_0085e9c1: @@ -2025,7 +2025,7 @@ LAB_0085e9c1: lua_settop(param_1,0xfffffffe); if (iVar2 == 0) goto LAB_0085e9c1; local_60 = (ItemConfig_Item *)FUN_00872860(descriptionText); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; uVar6 = uVar6 | 4; refCleanupFlags = uVar6; if (0xf < *(uint *)((local_60->name)._buf + 0xc)) { @@ -2042,8 +2042,8 @@ LAB_0085ea17: lua_settop(param_1,0xfffffffe); if (iVar2 == 0) goto LAB_0085ea17; title = (byte *)FUN_00872860(titleText); - local_8._0_1_ = 4; - local_8._1_3_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0; uVar6 = uVar6 | 8; refCleanupFlags = uVar6; if (0xf < *(uint *)(title + 0x14)) { @@ -2066,24 +2066,24 @@ LAB_0085ea17: uVar4 = titleTextCapacity + 1; pvVar5 = titleText[0]; if (0xfff < uVar4) { - pvVar5 = *(void **)((int)titleText[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(titleText[0]) + -4); uVar4 = titleTextCapacity + 0x24; - if (0x1f < (uint)((int)titleText[0] + (-4 - (int)pvVar5))) goto LAB_0085eac1; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(titleText[0]) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_0085eac1; } operator_delete(pvVar5,uVar4); } titleTextSize = 0; titleTextCapacity = 0xf; - titleText[0] = (void *)((uint)titleText[0] & 0xffffff00); + titleText[0] = (void *)(GHIDRA_UINT(titleText[0]) & 0xffffff00); } if ((uVar6 & 4) != 0) { if (0xf < descriptionTextCapacity) { uVar6 = descriptionTextCapacity + 1; pvVar5 = descriptionText[0]; if (0xfff < uVar6) { - pvVar5 = *(void **)((int)descriptionText[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(descriptionText[0]) + -4); uVar6 = descriptionTextCapacity + 0x24; - if (0x1f < (uint)((int)descriptionText[0] + (-4 - (int)pvVar5))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(descriptionText[0]) + (-4 - GHIDRA_INT(pvVar5))))) { LAB_0085eac1: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -2093,7 +2093,7 @@ LAB_0085eac1: } descriptionTextSize = 0; descriptionTextCapacity = 0xf; - descriptionText[0] = (void *)((uint)descriptionText[0] & 0xffffff00); + descriptionText[0] = (void *)(GHIDRA_UINT(descriptionText[0]) & 0xffffff00); } unrefFn = luaL_unref_exref; luaL_unref(param_1,0xfff0b9d8,arg4RefId); @@ -2133,11 +2133,11 @@ void HUD::ShowFortuneText(int **param_2) undefined *puStack_18; undefined4 uStack_14; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); uStack_14 = 0xffffffff; puStack_18 = &DAT_00b03b9d; pvStack_1c = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 0x10U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &pvStack_1c; lineList = (undefined4 *)0x0; lineCount = 0; @@ -2163,11 +2163,11 @@ void HUD::ShowFortuneText(int **param_2) puVar2 = puStack_48; } if (puVar2 != (undefined4 *)&DAT_00000004) { - uStack_14 = (uint)uStack_14._1_3_ << 8; + uStack_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(uStack_14)) + 0x1)) << 8; luaL_unref(param_2,0xfff0b9d8,refId); break; } - uStack_14._0_1_ = 2; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 2; ((LuaRef *)(&argRef))->LuaRef::push(param_2); stackTop = lua_gettop(param_2); text = (byte *)luaL_checklstring(param_2,stackTop,&textLength); @@ -2176,13 +2176,13 @@ void HUD::ShowFortuneText(int **param_2) lineText = 0; ((std::string *)((char *)&lineText))->std::string::assign(text,textLength); lua_settop(param_2,0xfffffffe); - uStack_14 = CONCAT31(uStack_14._1_3_,3); + uStack_14 = CONCAT31((*(undefined1 *)((char *)&(uStack_14) + 0x1)),3); puStack_48 = lineList; if (lineCount == 0x7ffffff) { /* WARNING: Subroutine does not return */ std::_Xlength_error("list too long"); } - uStack_14._0_1_ = 4; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 4; listNode = operator_new(0x20); listNode[6] = 0; listNode[7] = 0; @@ -2197,7 +2197,7 @@ void HUD::ShowFortuneText(int **param_2) listNode[1] = puVar2; puStack_48[1] = listNode; *puVar2 = listNode; - uStack_14 = (uint)uStack_14._1_3_ << 8; + uStack_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(uStack_14)) + 0x1)) << 8; luaL_unref(param_2,0xfff0b9d8,refId); argIndex = argIndex + 1; } while (argIndex < 0x22); @@ -2245,16 +2245,16 @@ void HUD::render_modded_coop_portrait(int playerType, Vector *position, Vector * local_14 = (void *)0xffffffff; puStack_18 = &LAB_00af85cd; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(displayName + 0xb); + local_24 = __security_cookie ^ GHIDRA_UINT((displayName + 0xb)); if (playerType < 0) { return; } pvVar6 = (g_manager->_entityConfig)._players._begin; - playersBytes = (void *)((int)(g_manager->_entityConfig)._players._end - (int)pvVar6); - if ((int)playersBytes / 0x148 <= playerType) { + playersBytes = (void *)(GHIDRA_INT((g_manager->_entityConfig)._players._end) - GHIDRA_INT(pvVar6)); + if (GHIDRA_INT(playersBytes) / 0x148 <= playerType) { return; } - playerConfig = (EntityConfig_Player *)(playerType * 0x148 + (int)pvVar6); + playerConfig = (EntityConfig_Player *)(playerType * 0x148 + GHIDRA_INT(pvVar6)); if (playerConfig == (EntityConfig_Player *)0x0) { return; } @@ -2281,7 +2281,7 @@ void HUD::render_modded_coop_portrait(int playerType, Vector *position, Vector * isLess = bVar4 < (byte)nameCursor->_buf[0]; if (bVar4 != nameCursor->_buf[0]) { LAB_008f8fd0: - uVar5 = -(uint)isLess | 1; + uVar5 = -GHIDRA_UINT(isLess) | 1; goto LAB_008f8fd5; } if (bVar4 == 0) break; @@ -2307,9 +2307,9 @@ LAB_008f9000: uVar5 = displayNameCapacity + 1; pvVar6 = displayName[0]; if (0xfff < uVar5) { - pvVar6 = *(void **)((int)displayName[0] + -4); + pvVar6 = *(void **)(GHIDRA_INT(displayName[0]) + -4); uVar5 = displayNameCapacity + 0x24; - if (0x1f < (uint)((int)displayName[0] + (-4 - (int)pvVar6))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(displayName[0]) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2319,7 +2319,7 @@ LAB_008f9000: displayNameSize = 0; displayNameCapacity = 0xf; pvVar6 = playerConfig->_moddedCoopMenuANM2; - displayName[0] = (void *)((uint)displayName[0] & 0xffffff00); + displayName[0] = (void *)(GHIDRA_UINT(displayName[0]) & 0xffffff00); *(float *)((char *)pvVar6 + 0x9c) = scale->x; *(float *)((char *)pvVar6 + 0xa0) = scale->y; portrait = playerConfig->_moddedCoopMenuANM2; @@ -2391,44 +2391,44 @@ void HUD::LoadGraphics() local_14 = 0xffffffff; puStack_18 = &LAB_00b0db25; local_1c = ExceptionList; - stackCookie = __security_cookie ^ (uint)(tmpPath + 0x2c); + stackCookie = __security_cookie ^ GHIDRA_UINT((tmpPath + 0x2c)); ExceptionList = &local_1c; if (this->_isGraphicsLoaded == 0) { hud = this; - path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(path._buf) + 0x0)) = std::_Allocate(0x20); path._size = 0x12; path._capacity = 0x1f; - builtin_strncpy((char *)path._buf._0_4_,"font/MPlus_12b.fnt",0x13); + builtin_strncpy((*(undefined4 *)((char *)&((char *)path._buf) + 0x0)),"font/MPlus_12b.fnt",0x13); local_14 = 0; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath((std_string *)tmpPath,&path); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; redirectedPathChars = extraout_EAX; if (0xf < *(uint *)(extraout_EAX + 0x14)) { redirectedPathChars = *(byte **)extraout_EAX; } ((Font *)(&this->_font))->Font::Load(redirectedPathChars,0); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (0xf < tmpPathCapacity) { allocatedBytes = tmpPathCapacity + 1; - pvVar1 = (void *)tmpPath._0_4_; + pvVar1 = (*(undefined4 *)((char *)&((void *)tmpPath) + 0x0)); if (0xfff < allocatedBytes) { - pvVar1 = *(void **)(tmpPath._0_4_ + -4); + pvVar1 = *(void **)((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + -4); allocatedBytes = tmpPathCapacity + 0x24; - if (0x1f < (uint)(tmpPath._0_4_ + (-4 - (int)pvVar1))) goto LAB_009a1b64; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + (-4 - GHIDRA_INT(pvVar1))))) goto LAB_009a1b64; } operator_delete(pvVar1,allocatedBytes); } local_14 = -1; tmpPathSize = 0; tmpPathCapacity = 0xf; - tmpPath._0_4_ = tmpPath._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(tmpPath) + 0x0)) = (*(undefined4 *)((char *)&(tmpPath) + 0x0)) & 0xffffff00; if (0xf < path._capacity) { allocatedBytes = path._capacity + 1; - freeBlock = (char *)path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)path._buf) + 0x0)); if (0xfff < allocatedBytes) { - freeBlock = *(char **)(path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(path._buf) + 0x0)) + -4); allocatedBytes = path._capacity + 0x24; - if ((char *)0x1f < (char *)(path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { LAB_009a1b64: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -2437,40 +2437,40 @@ LAB_009a1b64: operator_delete(freeBlock,allocatedBytes); } manager = g_manager; - path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(path._buf) + 0x0)) = std::_Allocate(0x20); path._size = 0x12; path._capacity = 0x1f; - builtin_strncpy((char *)path._buf._0_4_,"font/KR_Font14.fnt",0x13); + builtin_strncpy((*(undefined4 *)((char *)&((char *)path._buf) + 0x0)),"font/KR_Font14.fnt",0x13); local_14 = 2; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath((std_string *)redirectedFontPath,&path); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; redirectedPathChars = extraout_EAX_00; if (0xf < *(uint *)(extraout_EAX_00 + 0x14)) { redirectedPathChars = *(byte **)extraout_EAX_00; } ((Font *)(&this->_fontKR))->Font::Load(redirectedPathChars,0); - local_14 = CONCAT31(local_14._1_3_,2); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); if (0xf < redirectedFontPathCapacity) { allocatedBytes = redirectedFontPathCapacity + 1; pvVar1 = redirectedFontPath[0]; if (0xfff < allocatedBytes) { - pvVar1 = *(void **)((int)redirectedFontPath[0] + -4); + pvVar1 = *(void **)(GHIDRA_INT(redirectedFontPath[0]) + -4); allocatedBytes = redirectedFontPathCapacity + 0x24; - if (0x1f < (uint)((int)redirectedFontPath[0] + (-4 - (int)pvVar1))) goto LAB_009a1c55; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedFontPath[0]) + (-4 - GHIDRA_INT(pvVar1))))) goto LAB_009a1c55; } operator_delete(pvVar1,allocatedBytes); } local_14 = 0xffffffff; redirectedFontPathSize = 0; redirectedFontPathCapacity = 0xf; - redirectedFontPath[0] = (void *)((uint)redirectedFontPath[0] & 0xffffff00); + redirectedFontPath[0] = (void *)(GHIDRA_UINT(redirectedFontPath[0]) & 0xffffff00); if (0xf < path._capacity) { allocatedBytes = path._capacity + 1; - freeBlock = (char *)path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)path._buf) + 0x0)); if (0xfff < allocatedBytes) { - freeBlock = *(char **)(path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(path._buf) + 0x0)) + -4); allocatedBytes = path._capacity + 0x24; - if ((char *)0x1f < (char *)(path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { LAB_009a1c55: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -2484,20 +2484,20 @@ LAB_009a1c55: tmpPath[1] = '\0'; tmpPath[2] = '\0'; tmpPath[3] = '\0'; - tmpPath._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(tmpPath) + 0x0)) = std::_Allocate(0x20); tmpPathSize = 0x15; tmpPathCapacity = 0x1f; - builtin_strncpy((char *)tmpPath._0_4_,"gfx/ui/ui_hearts.anm2",0x16); + builtin_strncpy((*(undefined4 *)((char *)&((char *)tmpPath) + 0x0)),"gfx/ui/ui_hearts.anm2",0x16); local_14 = 4; ((ANM2 *)(&this->_heartsSprite))->ANM2::Load((std_string *)tmpPath,1); local_14 = 0xffffffff; if (0xf < tmpPathCapacity) { allocatedBytes = tmpPathCapacity + 1; - freeBlock = (char *)tmpPath._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)tmpPath) + 0x0)); if (0xfff < allocatedBytes) { - freeBlock = *(char **)(tmpPath._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + -4); allocatedBytes = tmpPathCapacity + 0x24; - if ((char *)0x1f < (char *)(tmpPath._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2510,20 +2510,20 @@ LAB_009a1c55: tmpPath[1] = '\0'; tmpPath[2] = '\0'; tmpPath[3] = '\0'; - tmpPath._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(tmpPath) + 0x0)) = std::_Allocate(0x20); tmpPathSize = 0x16; tmpPathCapacity = 0x1f; - builtin_strncpy((char *)tmpPath._0_4_,"gfx/ui/hudpickups.anm2",0x17); + builtin_strncpy((*(undefined4 *)((char *)&((char *)tmpPath) + 0x0)),"gfx/ui/hudpickups.anm2",0x17); local_14 = 5; ((ANM2 *)(&this->_pickupHUDSprite))->ANM2::Load((std_string *)tmpPath,1); local_14 = 0xffffffff; if (0xf < tmpPathCapacity) { allocatedBytes = tmpPathCapacity + 1; - freeBlock = (char *)tmpPath._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)tmpPath) + 0x0)); if (0xfff < allocatedBytes) { - freeBlock = *(char **)(tmpPath._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + -4); allocatedBytes = tmpPathCapacity + 0x24; - if ((char *)0x1f < (char *)(tmpPath._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2536,20 +2536,20 @@ LAB_009a1c55: tmpPath[1] = '\0'; tmpPath[2] = '\0'; tmpPath[3] = '\0'; - tmpPath._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(tmpPath) + 0x0)) = std::_Allocate(0x20); tmpPathSize = 0x18; tmpPathCapacity = 0x1f; - builtin_strncpy((char *)tmpPath._0_4_,"gfx/ui/ui_chargebar.anm2",0x19); + builtin_strncpy((*(undefined4 *)((char *)&((char *)tmpPath) + 0x0)),"gfx/ui/ui_chargebar.anm2",0x19); local_14 = 6; ((ANM2 *)(&this->_chargeBarSprite))->ANM2::Load((std_string *)tmpPath,1); local_14 = 0xffffffff; if (0xf < tmpPathCapacity) { allocatedBytes = tmpPathCapacity + 1; - freeBlock = (char *)tmpPath._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)tmpPath) + 0x0)); if (0xfff < allocatedBytes) { - freeBlock = *(char **)(tmpPath._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + -4); allocatedBytes = tmpPathCapacity + 0x24; - if ((char *)0x1f < (char *)(tmpPath._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2562,20 +2562,20 @@ LAB_009a1c55: tmpPath[1] = '\0'; tmpPath[2] = '\0'; tmpPath[3] = '\0'; - tmpPath._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(tmpPath) + 0x0)) = std::_Allocate(0x20); tmpPathSize = 0x1e; tmpPathCapacity = 0x1f; - builtin_strncpy((char *)tmpPath._0_4_,"gfx/ui/ui_chargebar_small.anm2",0x1f); + builtin_strncpy((*(undefined4 *)((char *)&((char *)tmpPath) + 0x0)),"gfx/ui/ui_chargebar_small.anm2",0x1f); local_14 = 7; ((ANM2 *)(&this->_chargeBarSmallSprite))->ANM2::Load((std_string *)tmpPath,1); local_14 = 0xffffffff; if (0xf < tmpPathCapacity) { allocatedBytes = tmpPathCapacity + 1; - freeBlock = (char *)tmpPath._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)tmpPath) + 0x0)); if (0xfff < allocatedBytes) { - freeBlock = *(char **)(tmpPath._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + -4); allocatedBytes = tmpPathCapacity + 0x24; - if ((char *)0x1f < (char *)(tmpPath._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2588,20 +2588,20 @@ LAB_009a1c55: tmpPath[1] = '\0'; tmpPath[2] = '\0'; tmpPath[3] = '\0'; - tmpPath._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(tmpPath) + 0x0)) = std::_Allocate(0x20); tmpPathSize = 0x19; tmpPathCapacity = 0x1f; - builtin_strncpy((char *)tmpPath._0_4_,"gfx/ui/ui_cardspills.anm2",0x1a); + builtin_strncpy((*(undefined4 *)((char *)&((char *)tmpPath) + 0x0)),"gfx/ui/ui_cardspills.anm2",0x1a); local_14 = 8; ((ANM2 *)(&this->_cardsPillsSprite))->ANM2::Load((std_string *)tmpPath,1); local_14 = 0xffffffff; if (0xf < tmpPathCapacity) { allocatedBytes = tmpPathCapacity + 1; - freeBlock = (char *)tmpPath._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)tmpPath) + 0x0)); if (0xfff < allocatedBytes) { - freeBlock = *(char **)(tmpPath._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + -4); allocatedBytes = tmpPathCapacity + 0x24; - if ((char *)0x1f < (char *)(tmpPath._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2614,20 +2614,20 @@ LAB_009a1c55: tmpPath[1] = '\0'; tmpPath[2] = '\0'; tmpPath[3] = '\0'; - tmpPath._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(tmpPath) + 0x0)) = std::_Allocate(0x20); tmpPathSize = 0x14; tmpPathCapacity = 0x1f; - builtin_strncpy((char *)tmpPath._0_4_,"gfx/ui/hudstats.anm2",0x15); + builtin_strncpy((*(undefined4 *)((char *)&((char *)tmpPath) + 0x0)),"gfx/ui/hudstats.anm2",0x15); local_14 = 9; ((ANM2 *)(&this->_statsSprite))->ANM2::Load((std_string *)tmpPath,1); local_14 = 0xffffffff; if (0xf < tmpPathCapacity) { allocatedBytes = tmpPathCapacity + 1; - freeBlock = (char *)tmpPath._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)tmpPath) + 0x0)); if (0xfff < allocatedBytes) { - freeBlock = *(char **)(tmpPath._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + -4); allocatedBytes = tmpPathCapacity + 0x24; - if ((char *)0x1f < (char *)(tmpPath._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2637,7 +2637,7 @@ LAB_009a1c55: statsColor = &(this->_statsSprite)._color; tmpPathSize = 0; tmpPathCapacity = 0xf; - tmpPath._0_4_ = tmpPath._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(tmpPath) + 0x0)) = (*(undefined4 *)((char *)&(tmpPath) + 0x0)) & 0xffffff00; local_8c = 0; uStack_88 = 0; local_84 = 0; @@ -2715,20 +2715,20 @@ LAB_009a1c55: tmpPath[1] = '\0'; tmpPath[2] = '\0'; tmpPath[3] = '\0'; - tmpPath._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(tmpPath) + 0x0)) = std::_Allocate(0x20); tmpPathSize = 0x1b; tmpPathCapacity = 0x1f; - builtin_strncpy((char *)tmpPath._0_4_,"gfx/ui/ui_FortunePaper.anm2",0x1c); + builtin_strncpy((*(undefined4 *)((char *)&((char *)tmpPath) + 0x0)),"gfx/ui/ui_FortunePaper.anm2",0x1c); local_14 = 0x14; ((ANM2 *)(&this->_fortuneSprite))->ANM2::Load((std_string *)tmpPath,1); local_14 = 0xffffffff; if (0xf < tmpPathCapacity) { allocatedBytes = tmpPathCapacity + 1; - freeBlock = (char *)tmpPath._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)tmpPath) + 0x0)); if (0xfff < allocatedBytes) { - freeBlock = *(char **)(tmpPath._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + -4); allocatedBytes = tmpPathCapacity + 0x24; - if ((char *)0x1f < (char *)(tmpPath._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2737,18 +2737,18 @@ LAB_009a1c55: } tmpPathSize = 0; tmpPathCapacity = 0xf; - tmpPath._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(tmpPath) + 0x0)) = (void *)0x0; ((std::string *)(tmpPath))->std::string::assign((byte *)"gfx/ui/coop menu.anm2",0x15); local_14 = 0x15; ((ANM2 *)(&this->_coopMenuSprite))->ANM2::Load((std_string *)tmpPath,1); local_14 = 0xffffffff; if (0xf < tmpPathCapacity) { allocatedBytes = tmpPathCapacity + 1; - pvVar1 = (void *)tmpPath._0_4_; + pvVar1 = (*(undefined4 *)((char *)&((void *)tmpPath) + 0x0)); if (0xfff < allocatedBytes) { - pvVar1 = *(void **)(tmpPath._0_4_ + -4); + pvVar1 = *(void **)((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + -4); allocatedBytes = tmpPathCapacity + 0x24; - if (0x1f < (uint)(tmpPath._0_4_ + (-4 - (int)pvVar1))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2759,18 +2759,18 @@ LAB_009a1c55: ((ANM2 *)(&this->_coopMenuSprite))->ANM2::PlayOverlay((byte *)"Arrows",0); tmpPathSize = 0; tmpPathCapacity = 0xf; - tmpPath._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(tmpPath) + 0x0)) = (void *)0x0; ((std::string *)(tmpPath))->std::string::assign((byte *)"gfx/ui/ui_inventory.anm2",0x18); local_14 = 0x16; ((ANM2 *)(&this->_inventorySprite))->ANM2::Load((std_string *)tmpPath,1); local_14 = 0xffffffff; if (0xf < tmpPathCapacity) { allocatedBytes = tmpPathCapacity + 1; - pvVar1 = (void *)tmpPath._0_4_; + pvVar1 = (*(undefined4 *)((char *)&((void *)tmpPath) + 0x0)); if (0xfff < allocatedBytes) { - pvVar1 = *(void **)(tmpPath._0_4_ + -4); + pvVar1 = *(void **)((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + -4); allocatedBytes = tmpPathCapacity + 0x24; - if (0x1f < (uint)(tmpPath._0_4_ + (-4 - (int)pvVar1))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2780,18 +2780,18 @@ LAB_009a1c55: ((ANM2 *)(&this->_inventorySprite))->ANM2::Play(s_Idle,0); tmpPathSize = 0; tmpPathCapacity = 0xf; - tmpPath._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(tmpPath) + 0x0)) = (void *)0x0; ((std::string *)(tmpPath))->std::string::assign((byte *)"gfx/ui/ui_crafting.anm2",0x17); local_14 = 0x17; ((ANM2 *)(&this->_craftingTableSprite))->ANM2::Load((std_string *)tmpPath,1); local_14 = 0xffffffff; if (0xf < tmpPathCapacity) { allocatedBytes = tmpPathCapacity + 1; - pvVar1 = (void *)tmpPath._0_4_; + pvVar1 = (*(undefined4 *)((char *)&((void *)tmpPath) + 0x0)); if (0xfff < allocatedBytes) { - pvVar1 = *(void **)(tmpPath._0_4_ + -4); + pvVar1 = *(void **)((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + -4); allocatedBytes = tmpPathCapacity + 0x24; - if (0x1f < (uint)(tmpPath._0_4_ + (-4 - (int)pvVar1))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2801,18 +2801,18 @@ LAB_009a1c55: ((ANM2 *)(&this->_craftingTableSprite))->ANM2::Play(s_Idle,0); tmpPathSize = 0; tmpPathCapacity = 0xf; - tmpPath._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(tmpPath) + 0x0)) = (void *)0x0; ((std::string *)(tmpPath))->std::string::assign((byte *)"gfx/ui/ui_poops.anm2",0x14); local_14 = 0x18; ((ANM2 *)(&this->_poopSpellsSprite))->ANM2::Load((std_string *)tmpPath,1); local_14 = 0xffffffff; if (0xf < tmpPathCapacity) { allocatedBytes = tmpPathCapacity + 1; - pvVar1 = (void *)tmpPath._0_4_; + pvVar1 = (*(undefined4 *)((char *)&((void *)tmpPath) + 0x0)); if (0xfff < allocatedBytes) { - pvVar1 = *(void **)(tmpPath._0_4_ + -4); + pvVar1 = *(void **)((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + -4); allocatedBytes = tmpPathCapacity + 0x24; - if (0x1f < (uint)(tmpPath._0_4_ + (-4 - (int)pvVar1))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpPath) + 0x0)) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2875,18 +2875,18 @@ LAB_009a1c55: } path._size = 0; path._capacity = 0xf; - path._buf._0_4_ = (char *)0x0; + (*(undefined4 *)((char *)&(path._buf) + 0x0)) = (char *)0x0; ((std::string *)(path._buf))->std::string::assign((byte *)"gfx/ui/hudstats2.anm2",0x15); local_14 = 0x1f; ((ANM2 *)((ANM2 *)&self->_statHUD))->ANM2::Load(&path,1); local_14 = 0xffffffff; if (0xf < path._capacity) { allocatedBytes = path._capacity + 1; - freeBlock = (char *)path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)path._buf) + 0x0)); if (0xfff < allocatedBytes) { - freeBlock = *(char **)(path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(path._buf) + 0x0)) + -4); allocatedBytes = path._capacity + 0x24; - if ((char *)0x1f < (char *)(path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2895,7 +2895,7 @@ LAB_009a1c55: } path._size = 0; path._capacity = 0xf; - path._buf._0_4_ = path._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(path._buf) + 0x0)) = (*(undefined4 *)((char *)&(path._buf) + 0x0)) & 0xffffff00; isAnimSet = ((ANM2 *)((ANM2 *)&self->_statHUD))->ANM2::SetAnimation(s_Idle,1); if ((isAnimSet != 0) && (*(int *)&(*(undefined1 *)((char *)(self) + 0x59d8)) != 0)) { ((AnimationState *)((AnimationState *)&(*(undefined1 *)((char *)(self) + 0x59d4))))->AnimationState::SetFrameFloat(0.0); @@ -3038,7 +3038,7 @@ LAB_009a2aae: seed_fart_sound_override((int *)&local_8); Pitch = 1.5; } - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_8,0.5,2,0,Pitch,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_8),0.5,2,0,Pitch,0.0); LAB_009a2b1a: update_item_info((HUD *)(this[1]._playerHUD + 0x28)); return; @@ -3073,7 +3073,7 @@ void HUD::PostUpdate() } playerIdx = playerIdx + 1; pHVar1 = (HUD *)(pHVar1->_playerHUD + 0x14); - } while ((int)playerIdx < 2); + } while (GHIDRA_INT(playerIdx) < 2); } FUN_0084c170(); return; @@ -3088,7 +3088,7 @@ void HUD::FlashChargeBar(Entity_Player *player, int activeSlot) playerHudIndex = 0; do { if (*(Entity_Player **)this->_playerHUD == player) { - if ((-1 < activeSlot) && ((uint)activeSlot < 4)) { + if ((-1 < activeSlot) && (GHIDRA_UINT(activeSlot) < 4)) { flashTimer = this->_playerHUD + activeSlot * 0x1c + 0x1a8; flashTimer[0] = 8; flashTimer[1] = 0; @@ -3243,13 +3243,13 @@ void HUD::ShowItemText(Entity_Player *player, ItemConfig_Item *item) local_14 = 0xffffffff; puStack_18 = &LAB_00b0db73; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(local_6e + 0x5e); + local_24 = __security_cookie ^ GHIDRA_UINT((local_6e + 0x5e)); ExceptionList = &local_1c; local_c0 = item; ((ItemConfig_Item *)(item))->ItemConfig_Item::GetLocalizedName(&itemName,0x14); local_14 = 0; ItemConfig_Item::get_localized_description(item,&itemDescription,unused); - local_14 = CONCAT31(local_14._1_3_,1); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); iVar7 = item->type; if (((iVar7 == 1) || (iVar7 == 3)) || (iVar7 == 4)) { if (item->id == 0x7b) { @@ -3257,7 +3257,7 @@ void HUD::ShowItemText(Entity_Player *player, ItemConfig_Item *item) if (uVar6 % 3 == 0) { pbVar12 = (byte *)&itemName; if (0xf < itemName._capacity) { - pbVar12 = (byte *)itemName._buf._0_4_; + pbVar12 = (*(undefined4 *)((char *)&((byte *)itemName._buf) + 0x0)); } bVar5 = str_eq(pbVar12,itemName._size,(byte *)"Monster Manual",0xe); if (bVar5 != 0) { @@ -3302,7 +3302,7 @@ void HUD::ShowItemText(Entity_Player *player, ItemConfig_Item *item) bVar5 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar5 != 0); - ((std::string *)((char *)tmpString))->std::string::assign(pbVar12,(int)pbVar9 - (int)(pbVar12 + 1)); + ((std::string *)((char *)tmpString))->std::string::assign(pbVar12,GHIDRA_INT(pbVar9) - GHIDRA_INT((pbVar12 + 1))); FUN_004215a0(); if (&DAT_0000000f < local_74) { size = local_74 + 1; @@ -3310,12 +3310,12 @@ void HUD::ShowItemText(Entity_Player *player, ItemConfig_Item *item) if ((undefined1 *)0xfff < size) { pppppppbVar10 = (byte *******)tmpString[0][-1]; size = local_74 + 0x24; - if (0x1f < (uint)((int)tmpString[0] + (-4 - (int)pppppppbVar10))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(pppppppbVar10))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(pppppppbVar10,(uint)size); + operator_delete(pppppppbVar10,GHIDRA_UINT(size)); } } } @@ -3330,16 +3330,16 @@ void HUD::ShowItemText(Entity_Player *player, ItemConfig_Item *item) ((std::string *)(acStackY_178 + 0x84))->std::string::string(&itemName); scrambledText = string_scramble_seeded - (tmpString,in_stack_ffffff0c,in_stack_ffffff10,(int)in_stack_ffffff14,iVar7, - (uint)pppppppbVar10,(uint)textCapacity); + (tmpString,in_stack_ffffff0c,in_stack_ffffff10,GHIDRA_INT(in_stack_ffffff14),iVar7, + GHIDRA_UINT(pppppppbVar10),GHIDRA_UINT(textCapacity)); if (&itemName != (std_string *)scrambledText) { textCapacity = (ItemConfig_Item **)0x9a2fb7; ((std::string *)(itemName._buf))->std::string::_Tidy_deallocate(); - itemName._buf._0_4_ = *(undefined4 *)scrambledText; - itemName._buf._4_4_ = *(undefined4 *)(scrambledText + 4); - itemName._buf._8_4_ = *(undefined4 *)(scrambledText + 8); - itemName._buf._12_4_ = *(undefined4 *)(scrambledText + 0xc); - itemName._16_8_ = *(undefined8 *)(scrambledText + 0x10); + (*(undefined4 *)((char *)&(itemName._buf) + 0x0)) = *(undefined4 *)scrambledText; + (*(undefined4 *)((char *)&(itemName._buf) + 0x4)) = *(undefined4 *)(scrambledText + 4); + (*(undefined4 *)((char *)&(itemName._buf) + 0x8)) = *(undefined4 *)(scrambledText + 8); + (*(undefined4 *)((char *)&(itemName._buf) + 0xc)) = *(undefined4 *)(scrambledText + 0xc); + (*(undefined8 *)((char *)&(itemName) + 0x10)) = *(undefined8 *)(scrambledText + 0x10); scrambledText[0x10] = '\0'; scrambledText[0x11] = '\0'; scrambledText[0x12] = '\0'; @@ -3356,27 +3356,27 @@ void HUD::ShowItemText(Entity_Player *player, ItemConfig_Item *item) if ((ItemConfig_Item **)0xfff < textCapacity) { pppppppbVar10 = (byte *******)tmpString[0][-1]; textCapacity = (ItemConfig_Item **)(local_74 + 0x24); - if (0x1f < (uint)((int)tmpString[0] + (-4 - (int)pppppppbVar10))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(pppppppbVar10))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } iVar7 = 0x9a300f; - operator_delete(pppppppbVar10,(uint)textCapacity); + operator_delete(pppppppbVar10,GHIDRA_UINT(textCapacity)); } ((std::string *)(acStackY_178 + 0x84))->std::string::string(&itemDescription); scrambledText = string_scramble_seeded - (tmpString,in_stack_ffffff0c,in_stack_ffffff10,(int)in_stack_ffffff14,iVar7, - (uint)pppppppbVar10,(uint)textCapacity); + (tmpString,in_stack_ffffff0c,in_stack_ffffff10,GHIDRA_INT(in_stack_ffffff14),iVar7, + GHIDRA_UINT(pppppppbVar10),GHIDRA_UINT(textCapacity)); if (&itemDescription != (std_string *)scrambledText) { textCapacity = (ItemConfig_Item **)0x9a3041; ((std::string *)(itemDescription._buf))->std::string::_Tidy_deallocate(); - itemDescription._buf._0_4_ = *(undefined4 *)scrambledText; - itemDescription._buf._4_4_ = *(undefined4 *)(scrambledText + 4); - itemDescription._buf._8_4_ = *(undefined4 *)(scrambledText + 8); - itemDescription._buf._12_4_ = *(undefined4 *)(scrambledText + 0xc); - itemDescription._16_8_ = *(undefined8 *)(scrambledText + 0x10); + (*(undefined4 *)((char *)&(itemDescription._buf) + 0x0)) = *(undefined4 *)scrambledText; + (*(undefined4 *)((char *)&(itemDescription._buf) + 0x4)) = *(undefined4 *)(scrambledText + 4); + (*(undefined4 *)((char *)&(itemDescription._buf) + 0x8)) = *(undefined4 *)(scrambledText + 8); + (*(undefined4 *)((char *)&(itemDescription._buf) + 0xc)) = *(undefined4 *)(scrambledText + 0xc); + (*(undefined8 *)((char *)&(itemDescription) + 0x10)) = *(undefined8 *)(scrambledText + 0x10); scrambledText[0x10] = '\0'; scrambledText[0x11] = '\0'; scrambledText[0x12] = '\0'; @@ -3393,24 +3393,24 @@ void HUD::ShowItemText(Entity_Player *player, ItemConfig_Item *item) if ((ItemConfig_Item **)0xfff < textCapacity) { pppppppbVar10 = (byte *******)tmpString[0][-1]; textCapacity = (ItemConfig_Item **)(local_74 + 0x24); - if (0x1f < (uint)((int)tmpString[0] + (-4 - (int)pppppppbVar10))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(pppppppbVar10))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(pppppppbVar10,(uint)textCapacity); + operator_delete(pppppppbVar10,GHIDRA_UINT(textCapacity)); } } unused2 = (byte)textCapacity; bVar5 = (byte)pppppppbVar10; pbVar12 = (byte *)&itemName; if (0xf < itemName._capacity) { - pbVar12 = (byte *)itemName._buf._0_4_; + pbVar12 = (*(undefined4 *)((char *)&((byte *)itemName._buf) + 0x0)); } title = utf8_to_utf16_alloc(pbVar12); pbVar12 = (byte *)&itemDescription; if (0xf < itemDescription._capacity) { - pbVar12 = (byte *)itemDescription._buf._0_4_; + pbVar12 = (*(undefined4 *)((char *)&((byte *)itemDescription._buf) + 0x0)); } pIVar8 = (ItemConfig_Item *)utf8_to_utf16_alloc(pbVar12); local_c0 = pIVar8; @@ -3424,16 +3424,16 @@ void HUD::ShowItemText(Entity_Player *player, ItemConfig_Item *item) bVar5 = *pbVar12; pbVar12 = pbVar12 + 1; } while (bVar5 != 0); - ((std::string *)((char *)tmpString))->std::string::assign(pbVar9,(int)pbVar12 - (int)(pbVar9 + 1)); - local_14._0_1_ = 2; + ((std::string *)((char *)tmpString))->std::string::assign(pbVar9,GHIDRA_INT(pbVar12) - GHIDRA_INT((pbVar9 + 1))); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; pppppppbVar10 = (byte *******)tmpString; if ((local_74 < 0x10) || (pppppppbVar10 = tmpString[0], tmpString[0] != (byte *******)0x0)) { pppppppbVar11 = pppppppbVar10; do { bVar5 = *(byte *)pppppppbVar11; - pppppppbVar11 = (byte *******)((int)pppppppbVar11 + 1); + pppppppbVar11 = (byte *******)(GHIDRA_INT(pppppppbVar11) + 1); } while (bVar5 != 0); - iVar7 = (int)pppppppbVar11 - (int)((int)pppppppbVar10 + 1); + iVar7 = GHIDRA_INT(pppppppbVar11) - GHIDRA_INT((GHIDRA_INT(pppppppbVar10) + 1)); } else { iVar7 = 0; @@ -3446,16 +3446,16 @@ void HUD::ShowItemText(Entity_Player *player, ItemConfig_Item *item) wVar1 = *pwVar13; pwVar13 = pwVar13 + 1; } while (wVar1 != L'\0'); - uVar6 = (int)pwVar13 - (int)local_6e >> 1; + uVar6 = GHIDRA_INT(pwVar13) - GHIDRA_INT(local_6e) >> 1; piVar2 = &pIVar8->type; if (0x20 < uVar6) { uVar6 = 0x20; } do { piVar3 = &pIVar8->type; - pIVar8 = (ItemConfig_Item *)((int)&pIVar8->type + 2); + pIVar8 = (ItemConfig_Item *)(GHIDRA_INT(&pIVar8->type) + 2); } while ((wchar_t)*piVar3 != L'\0'); - descriptionLength = (int)pIVar8 - (int)((int)piVar2 + 2) >> 1; + descriptionLength = GHIDRA_INT(pIVar8) - GHIDRA_INT((GHIDRA_INT(piVar2) + 2)) >> 1; if (100 < descriptionLength) { descriptionLength = 100; } @@ -3469,14 +3469,14 @@ void HUD::ShowItemText(Entity_Player *player, ItemConfig_Item *item) charIndex = charIndex + 1; } while (charIndex < descriptionLength); } - local_14 = CONCAT31(local_14._1_3_,1); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); if (0xf < local_74) { - uVar6 = (int)local_74 + 1; + uVar6 = GHIDRA_INT(local_74) + 1; pppppppbVar10 = tmpString[0]; if (0xfff < uVar6) { pppppppbVar10 = (byte *******)tmpString[0][-1]; - uVar6 = (int)local_74 + 0x24; - if ((byte *)0x1f < (byte *)((int)tmpString[0] + (-4 - (int)pppppppbVar10))) { + uVar6 = GHIDRA_INT(local_74) + 0x24; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(pppppppbVar10)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -3487,7 +3487,7 @@ void HUD::ShowItemText(Entity_Player *player, ItemConfig_Item *item) } local_78 = 0; local_74 = &DAT_0000000f; - tmpString[0] = (byte *******)((uint)tmpString[0] & 0xffffff00); + tmpString[0] = (byte *******)(GHIDRA_UINT(tmpString[0]) & 0xffffff00); } pIVar8 = local_c0; if (g_manager->_netplayManager == *(NetplayManager *)(g_manager + 1)) { @@ -3521,49 +3521,49 @@ void HUD::ShowItemText(Entity_Player *player, ItemConfig_Item *item) *(undefined1 *)(hudMessage + 2) = 1; } } - heapCounter = (qword *)((int)g_mainHeap + 0x30); + heapCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); if (g_mainHeap == (void *)0x0) { heapCounter = &g_allocatedBytesNoHeap; } if (title != (wchar_t *)0x0) { uVar6 = *(uint *)(title + -2); qVar4 = *heapCounter; - *(uint *)heapCounter = (uint)*heapCounter - uVar6; - *(uint *)((char *)heapCounter + 4) = *(uint *)((char *)heapCounter + 4) - (uint)((uint)qVar4 < uVar6); + *(uint *)heapCounter = GHIDRA_UINT(*heapCounter) - uVar6; + *(uint *)((char *)heapCounter + 4) = *(uint *)((char *)heapCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar4) < uVar6)); free(title + -2); } - heapCounter = (qword *)((int)g_mainHeap + 0x30); + heapCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); if (g_mainHeap == (void *)0x0) { heapCounter = &g_allocatedBytesNoHeap; } if (pIVar8 != (ItemConfig_Item *)0x0) { uVar6 = pIVar8[-1]._initCharge; qVar4 = *heapCounter; - *(uint *)heapCounter = (uint)*heapCounter - uVar6; - *(uint *)((char *)heapCounter + 4) = *(uint *)((char *)heapCounter + 4) - (uint)((uint)qVar4 < uVar6); + *(uint *)heapCounter = GHIDRA_UINT(*heapCounter) - uVar6; + *(uint *)((char *)heapCounter + 4) = *(uint *)((char *)heapCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar4) < uVar6)); free(&pIVar8[-1]._initCharge); } if (0xf < itemDescription._capacity) { uVar6 = itemDescription._capacity + 1; - pbVar12 = (byte *)itemDescription._buf._0_4_; + pbVar12 = (*(undefined4 *)((char *)&((byte *)itemDescription._buf) + 0x0)); if (0xfff < uVar6) { - pbVar12 = *(byte **)(itemDescription._buf._0_4_ + 0xfffffffc); + pbVar12 = *(byte **)((*(undefined4 *)((char *)&(itemDescription._buf) + 0x0)) + 0xfffffffc); uVar6 = itemDescription._capacity + 0x24; - if ((byte *)0x1f < (byte *)(itemDescription._buf._0_4_ + (-4 - (int)pbVar12))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(itemDescription._buf) + 0x0)) + (-4 - GHIDRA_INT(pbVar12)))) goto LAB_009a33db; } operator_delete(pbVar12,uVar6); } itemDescription._size = 0; itemDescription._capacity = 0xf; - itemDescription._buf._0_4_ = itemDescription._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(itemDescription._buf) + 0x0)) = (*(undefined4 *)((char *)&(itemDescription._buf) + 0x0)) & 0xffffff00; if (0xf < itemName._capacity) { uVar6 = itemName._capacity + 1; - pbVar12 = (byte *)itemName._buf._0_4_; + pbVar12 = (*(undefined4 *)((char *)&((byte *)itemName._buf) + 0x0)); if (0xfff < uVar6) { - pbVar12 = *(byte **)(itemName._buf._0_4_ + 0xfffffffc); + pbVar12 = *(byte **)((*(undefined4 *)((char *)&(itemName._buf) + 0x0)) + 0xfffffffc); uVar6 = itemName._capacity + 0x24; - if ((byte *)0x1f < (byte *)(itemName._buf._0_4_ + (-4 - (int)pbVar12))) { + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(itemName._buf) + 0x0)) + (-4 - GHIDRA_INT(pbVar12)))) { LAB_009a33db: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3597,7 +3597,7 @@ void HUD::show_fortune_line(byte *text, int unused1, int unused2) local_8 = (void *)0xffffffff; puStack_c = &LAB_00b0dbb5; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(lineText + 0xb); + local_18 = __security_cookie ^ GHIDRA_UINT((lineText + 0xb)); ExceptionList = &local_10; lines = (undefined4 *)0x0; lineCount = 0; @@ -3613,17 +3613,17 @@ void HUD::show_fortune_line(byte *text, int unused1, int unused2) textChar = *textEnd; textEnd = textEnd + 1; } while (textChar != 0); - ((std::string *)((char *)lineText))->std::string::assign(text,(int)textEnd - (int)(text + 1)); - local_8._0_1_ = 1; + ((std::string *)((char *)lineText))->std::string::assign(text,GHIDRA_INT(textEnd) - GHIDRA_INT((text + 1))); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; list_string_push_back_move(lineText); - local_8 = (void *)((uint)local_8._1_3_ << 8); + local_8 = (void *)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8); if (0xf < lineTextCapacity) { allocSize = lineTextCapacity + 1; allocBlock = lineText[0]; if (0xfff < allocSize) { - allocBlock = *(void **)((int)lineText[0] + -4); + allocBlock = *(void **)(GHIDRA_INT(lineText[0]) + -4); allocSize = lineTextCapacity + 0x24; - if (0x1f < (uint)((int)lineText[0] + (-4 - (int)allocBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(lineText[0]) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -3684,7 +3684,7 @@ void HUD::show_fortune_text_impl(byte *text) local_14 = 0xffffffff; puStack_18 = &LAB_00b0dc11; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(lineBuffer + 0x118); + local_24 = __security_cookie ^ GHIDRA_UINT((lineBuffer + 0x118)); ExceptionList = &local_1c; font = &this->_font; if (((this->_font)._isLoaded == 0) && (font = &this->_fontKR, (this->_fontKR)._isLoaded == 0)) { @@ -3706,7 +3706,7 @@ void HUD::show_fortune_text_impl(byte *text) do { if (currentChar == 0) { text_convert_encoding - ((byte *)lineStart,(int)cursor - (int)lineStart >> 1,1,lineBuffer,0x100,0); + ((byte *)lineStart,GHIDRA_INT(cursor) - GHIDRA_INT(lineStart) >> 1,1,lineBuffer,0x100,0); pbVar5 = lineBuffer; lineTextSize = 0; lineTextCapacity = 0xf; @@ -3715,17 +3715,17 @@ void HUD::show_fortune_text_impl(byte *text) bVar1 = *pbVar5; pbVar5 = pbVar5 + 1; } while (bVar1 != 0); - ((std::string *)((char *)&lineText))->std::string::assign(lineBuffer,(int)pbVar5 - (int)(lineBuffer + 1)); - local_14._0_1_ = 3; + ((std::string *)((char *)&lineText))->std::string::assign(lineBuffer,GHIDRA_INT(pbVar5) - GHIDRA_INT((lineBuffer + 1))); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; list_string_push_back_move(&lineText); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (0xf < lineTextCapacity) { uVar7 = lineTextCapacity + 1; ptr = lineText; if (0xfff < uVar7) { ptr = *(void **)((char *)lineText + -4); uVar7 = lineTextCapacity + 0x24; - if (0x1f < (uint)((int)lineText + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(lineText) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -3736,13 +3736,13 @@ void HUD::show_fortune_text_impl(byte *text) allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar7 = *(uint *)(wideText + -2); qVar3 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar7; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar7; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar3 < uVar7); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar3) < uVar7)); free(wideText + -2); local_14 = local_14 & 0xffffff00; render_fortune_text(this,&lines); @@ -3759,19 +3759,19 @@ void HUD::show_fortune_text_impl(byte *text) return; } iVar4 = iswspace(currentChar); - charBuffer = CONCAT22(charBuffer._2_2_,*cursor); + charBuffer = CONCAT22((*(undefined2 *)((char *)&(charBuffer) + 0x2)),*cursor); if (iVar4 != 0) { lastSpace = cursor; } iVar4 = ((Font *)(font))->Font::get_string_width_utf16((short *)&charBuffer,-1); - local_144 = (undefined4 *)((int)local_144 + iVar4); + local_144 = (undefined4 *)(GHIDRA_INT(local_144) + iVar4); if (0x10e < local_144) { lineEnd = cursor; if (lastSpace != lineStart) { lineEnd = lastSpace; } text_convert_encoding - ((byte *)lineStart,(int)lineEnd - (int)lineStart >> 1,0,lineBuffer,0x100,1); + ((byte *)lineStart,GHIDRA_INT(lineEnd) - GHIDRA_INT(lineStart) >> 1,0,lineBuffer,0x100,1); pbVar5 = lineBuffer; lineTextSize = 0; lineTextCapacity = 0xf; @@ -3780,14 +3780,14 @@ void HUD::show_fortune_text_impl(byte *text) bVar1 = *pbVar5; pbVar5 = pbVar5 + 1; } while (bVar1 != 0); - ((std::string *)((char *)&lineText))->std::string::assign(lineBuffer,(int)pbVar5 - (int)(lineBuffer + 1)); - local_14 = CONCAT31(local_14._1_3_,1); + ((std::string *)((char *)&lineText))->std::string::assign(lineBuffer,GHIDRA_INT(pbVar5) - GHIDRA_INT((lineBuffer + 1))); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); local_144 = lines; if (lineCount == 0x7ffffff) { /* WARNING: Subroutine does not return */ std::_Xlength_error("list too long"); } - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; puVar6 = operator_new(0x20); puVar6[6] = 0; puVar6[7] = 0; @@ -3808,7 +3808,7 @@ void HUD::show_fortune_text_impl(byte *text) local_144[1] = puVar6; *puVar2 = puVar6; lastSpace = cursor + 1; - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; local_144 = (undefined4 *)0x0; lineStart = lastSpace; } @@ -3894,7 +3894,7 @@ void HUD::render_fortune_text(void *lines) if (piVar3 != *(int **)lines) { do { lineText = (byte *)(piVar3 + 2); - if (0xf < (uint)piVar3[7]) { + if (0xf < GHIDRA_UINT(piVar3[7])) { lineText = *(byte **)lineText; } lineWidth = ((Font *)(font))->Font::get_string_width_n(lineText,-1); @@ -3965,11 +3965,11 @@ void HUD::render_fortune_text(void *lines) local_40 = 0; lineText = (byte *)(lineNode + 2); local_8 = 0; - if (0xf < (uint)lineNode[7]) { + if (0xf < GHIDRA_UINT(lineNode[7])) { lineText = *(byte **)lineText; } glyphs = ((Font *)(font))->Font::measure_string(glyphBuffer,lineText,&drawSettings,&local_2c); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); color._alpha = 1.0; color._red = 0.0; color._green = 0.0; @@ -4113,7 +4113,7 @@ void HUD::Render() ehState = 0xffffffff; puStack_18 = &LAB_00b0dd45; savedExceptionList = ExceptionList; - stackCookie = __security_cookie ^ (uint)(ambushText + 0x1c); + stackCookie = __security_cookie ^ GHIDRA_UINT((ambushText + 0x1c)); ExceptionList = &savedExceptionList; this->_playerHUD[0x6bc] = 0x80; this->_playerHUD[0x6bd] = 0x96; @@ -4270,7 +4270,7 @@ void HUD::Render() local_94 = (pGVar7->_screenShakeOffset).y; update_hud_offset(this); local_ac = (Entity_Player *)(g_manager->_optionsConfig)._historyHudMode; - if ((0 < (int)local_ac) && (extraout_DL == '\0')) { + if ((0 < GHIDRA_INT(local_ac)) && (extraout_DL == '\0')) { fVar10 = 1.0 - (g_manager->_optionsConfig)._hudOffset; fVar11 = fVar10 * -14.0; fVar10 = fVar10 * 24.0; @@ -4326,7 +4326,7 @@ void HUD::Render() cursorPos.y = *(float *)&(*(undefined1 *)((char *)(this) + 0x5938)) + 46.0; local_7c = (Entity_Player *)0x41400000; local_78 = (void *)cursorPos.y; - if ((int)(pGVar7->_playerManager)._playerList._end - (int)piVar9 >> 2 == 0) { + if (GHIDRA_INT((pGVar7->_playerManager)._playerList._end) - GHIDRA_INT(piVar9) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); piVar9 = (pGVar7->_playerManager)._playerList._begin; pGVar7 = g_game; @@ -4607,8 +4607,8 @@ LAB_009a4ed3: iconFrames = (undefined4 *)0x0; local_c8.x = 0.0; local_c8.y = 0.0; - ehState._0_1_ = 7; - ehState._1_3_ = 0; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 7; + (*(undefined1 *)((char *)&(ehState) + 0x1)) = 0; std::vector::_Reallocate(3); if (isHardMode != '\0') { local_ac = (Entity_Player *)&DAT_00000004; @@ -4617,7 +4617,7 @@ LAB_009a4ed3: } else { *(undefined4 *)local_c8.x = 4; - local_c8.x = (float)((int)local_c8.x + 4); + local_c8.x = (float)(GHIDRA_INT(local_c8.x) + 4); } } if (isAchievementsDisabled == '\0') { @@ -4628,7 +4628,7 @@ LAB_009a4ed3: local_ac = (Entity_Player *)&DAT_00000005; if (local_c8.x != local_c8.y) { *(undefined4 *)local_c8.x = 5; - local_c8.x = (float)((int)local_c8.x + 4); + local_c8.x = (float)(GHIDRA_INT(local_c8.x) + 4); goto LAB_009a504a; } } @@ -4637,7 +4637,7 @@ LAB_009a500e: local_ac = (Entity_Player *)&DAT_00000008; if (local_c8.x != local_c8.y) { *(undefined4 *)local_c8.x = 8; - local_c8.x = (float)((int)local_c8.x + 4); + local_c8.x = (float)(GHIDRA_INT(local_c8.x) + 4); goto LAB_009a504a; } } @@ -4646,10 +4646,10 @@ LAB_009a500e: LAB_009a504a: if (isGreedMode != '\0') { if (isInClearedGreedBossRoom == '\0') { - local_ac = (Entity_Player *)((uint)(g_game->_difficulty == 3) * 4 + 7); + local_ac = (Entity_Player *)(GHIDRA_UINT((g_game->_difficulty == 3)) * 4 + 7); if (local_c8.x == local_c8.y) goto LAB_009a50b3; *(Entity_Player **)local_c8.x = local_ac; - local_c8.x = (float)((int)local_c8.x + 4); + local_c8.x = (float)(GHIDRA_INT(local_c8.x) + 4); } else { local_ac = (Entity_Player *)&DAT_00000009; @@ -4659,7 +4659,7 @@ LAB_009a50b3: } else { *(undefined4 *)local_c8.x = 9; - local_c8.x = (float)((int)local_c8.x + 4); + local_c8.x = (float)(GHIDRA_INT(local_c8.x) + 4); } } } @@ -4668,7 +4668,7 @@ LAB_009a50b3: local_bc = local_78; if (iconFrames != (undefined4 *)local_c8.x) { cursorPos.y = local_74 + 16.0; - pvVar8 = (void *)((int)local_c8.x - (int)iconFrames >> 2); + pvVar8 = (void *)(GHIDRA_INT(local_c8.x) - GHIDRA_INT(iconFrames) >> 2); local_74 = cursorPos.y; if (pvVar8 == (void *)0x1) { if ((local_7e == '\0') && ((isGreedMode == '\0' || (6 < g_game->_stage)))) { @@ -4683,7 +4683,7 @@ LAB_009a50b3: do { if ((this->_pickupHUDSprite)._animState._animData != (void *)0x0) { AnimationState::SetFrameFloat - (&(this->_pickupHUDSprite)._animState,(float)(int)iconFrames[(int)local_98]); + (&(this->_pickupHUDSprite)._animState,(float)GHIDRA_INT(iconFrames[GHIDRA_INT(local_98)])); pEVar4 = local_7c; } local_d4.x = (float)pEVar4 + (float)local_78; @@ -4704,7 +4704,7 @@ LAB_009a50b3: pEVar4 = local_7c; } cursorPos.x = (float)local_78 + 16.0; - local_98 = (HUD *)((int)local_98 + 1); + local_98 = (HUD *)(GHIDRA_INT(local_98) + 1); local_78 = (void *)cursorPos.x; } while (local_98 < pvVar8); } @@ -4725,11 +4725,11 @@ LAB_009a5258: local_fc = 0xffffffff; local_f8 = 0; local_f4 = 0; - ehState._0_1_ = 0xb; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xb; ((KColor *)(&local_120))->KColor::SetFromARGB(0xffffffff); ((Font *)((Font *)local_8c))->Font::DrawString(&DAT_00c94328,color_08,&drawSettings, local_90 + cursorPos.x + 18.0,local_74); - ehState._0_1_ = 7; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 7; fVar10 = local_74 - local_94; cursorPos.y = fVar10; goto LAB_009a5660; @@ -4756,7 +4756,7 @@ LAB_009a54b9: isLess = bVar2 < (byte)*destinationCursor; if (bVar2 != *destinationCursor) { LAB_009a5498: - uVar6 = -(uint)isLess | 1; + uVar6 = -GHIDRA_UINT(isLess) | 1; goto LAB_009a549d; } if (bVar2 == 0) break; @@ -4808,13 +4808,13 @@ LAB_009a55b0: break; case 10: if ((this->_pickupHUDSprite)._animState._animData != (void *)0x0) { - destinationFrame = 3 - (uint)(iVar3 != 1); + destinationFrame = 3 - GHIDRA_UINT((iVar3 != 1)); goto LAB_009a55b0; } break; case 0xb: if ((this->_pickupHUDSprite)._animState._animData != (void *)0x0) { - destinationFrame = 5 - (uint)(iVar3 != 1); + destinationFrame = 5 - GHIDRA_UINT((iVar3 != 1)); goto LAB_009a55b0; } } @@ -4840,7 +4840,7 @@ LAB_009a55b3: isLess = bVar2 < *idleCursor; if (bVar2 != *idleCursor) { LAB_009a5637: - uVar6 = -(uint)isLess | 1; + uVar6 = -GHIDRA_UINT(isLess) | 1; goto LAB_009a563c; } if (bVar2 == 0) break; @@ -4870,7 +4870,7 @@ LAB_009a565b: local_74 = local_94 + local_74; if (g_game->_stage < 7) { sprintf_s(&DAT_00c94328,0x10,(byte *)"%d/%d"); - ehState._0_1_ = 8; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 8; LAB_009a5404: local_f4 = 0; local_f8 = 0; @@ -4881,14 +4881,14 @@ LAB_009a5404: drawSettings = (FontSettings)0x0; ((KColor *)(&local_120))->KColor::SetFromARGB(0xffffffff); ((Font *)((Font *)local_8c))->Font::DrawString(&DAT_00c94328,color_07,&drawSettings,local_90 + 4.0,local_74); - ehState._0_1_ = 7; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 7; } else if (isInClearedGreedBossRoom != '\0') { data = &g_manager->_persistentGameData; if (g_manager->_netplayManager != *(NetplayManager *)(g_manager + 1)) { local_130.y = (float)g_userProfile; local_130.x = (float)KAGE::System::UserProfile::vftable; - ehState._0_1_ = 9; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 9; if (g_userProfile == (void *)0x0) { local_a8.y = 0.0; local_a8.x = 0.0; @@ -4898,7 +4898,7 @@ LAB_009a5404: local_a8.y = *(float *)((char *)g_userProfile + 0xc); } profileData = (PersistentGameData *)FUN_0090c300(&local_a8); - ehState._0_1_ = 7; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 7; if (profileData != (PersistentGameData *)0x0) { data = profileData; } @@ -4906,7 +4906,7 @@ LAB_009a5404: pEVar4 = ((Game *)(g_game))->Game::GetPlayer(0); ((Entity_Player *)(pEVar4))->Entity_Player::GetGreedDonationJamChance(data); sprintf_s(&DAT_00c94328,0x10,&DAT_00b6d148); - ehState._0_1_ = 10; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 10; goto LAB_009a5404; } fVar10 = local_74 - local_94; @@ -4918,15 +4918,15 @@ LAB_009a5660: local_a8.x = (float)local_bc + 0.0; StatHUD::Render(&local_a8); } - ehState._0_1_ = 0xff; - ehState._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(ehState) + 0x1)) = 0xffffff; if (iconFrames != (undefined4 *)0x0) { - uVar6 = ((int)local_c8.y - (int)iconFrames >> 2) * 4; + uVar6 = (GHIDRA_INT(local_c8.y) - GHIDRA_INT(iconFrames) >> 2) * 4; ptr = iconFrames; if (0xfff < uVar6) { ptr = (undefined4 *)iconFrames[-1]; uVar6 = uVar6 + 0x23; - if (0x1f < (uint)((int)iconFrames + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(iconFrames) + (-4 - GHIDRA_INT(ptr))))) { LAB_009a56f1: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -4947,14 +4947,14 @@ LAB_009a5887: render_player_hud(this,uVar6,iVar3); pGVar7 = local_8c; if (uVar6 < 4) { - local_7c = (Entity_Player *)((int)local_7c + 1); + local_7c = (Entity_Player *)(GHIDRA_INT(local_7c) + 1); } } } else { uVar12 = FUN_009a84c0(); pGVar7 = (Game *)((ulonglong)uVar12 >> 0x20); - if ((((int)uVar12 != 3) || (uVar6 == 0)) || (uVar6 == 4)) goto LAB_009a5887; + if (((GHIDRA_INT(uVar12) != 3) || (uVar6 == 0)) || (uVar6 == 4)) goto LAB_009a5887; } uVar6 = uVar6 + 1; local_8c = (Game *)(((HUD *)pGVar7)->_playerHUD + 0x6dc); @@ -4967,16 +4967,16 @@ LAB_009a5887: ehState = 0xc; ((std::shared_ptr *)(&local_120._alpha))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); local_120._blue = (float)KAGE::Network::Multiplayer::Lobby::vftable; - ehState._1_3_ = 0; + (*(undefined1 *)((char *)&(ehState) + 0x1)) = 0; local_8c = (Game *)0x0; - while (((ehState._0_1_ = 0xd, local_120._alpha != 0.0 && + while ((((*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xd, local_120._alpha != 0.0 && (local_8c < (Font *)(*(int *)((char *)local_120._alpha + 0x14) - *(int *)((char *)local_120._alpha + 0x10) >> 3))) && (local_7c < 4))) { local_d4.x = (float)KAGE::System::UserProfileBase::vftable; UserProfile::find_or_create - ((void *)(*(int *)((char *)local_120._alpha + 0x10) + (int)local_8c * 8)); - ehState._0_1_ = 0xe; + ((void *)(*(int *)((char *)local_120._alpha + 0x10) + GHIDRA_INT(local_8c) * 8)); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xe; local_d4.x = (float)KAGE::System::UserProfile::vftable; local_d4.y = (float)extraout_EAX; if (((extraout_EAX != (Entity_Player *)0x0) && @@ -4997,8 +4997,8 @@ LAB_009a5887: local_a8 = VVar1; } else { - userId = ((std_vector *)((int)local_d4.y + 8))->_begin; - local_ac = ((std_vector *)((int)local_d4.y + 8))->_end; + userId = ((std_vector *)(GHIDRA_INT(local_d4.y) + 8))->_begin; + local_ac = ((std_vector *)(GHIDRA_INT(local_d4.y) + 8))->_end; } pEVar4 = PlayerManager::get_player_by_user_id ((PlayerManager *)&g_manager->_netplayManager,(ulonglong *)&userId); @@ -5007,8 +5007,8 @@ LAB_009a5887: local_40._alpha = 1.12104e-44; statusText = (byte *******)0x4c204e49; local_40._red = (float)0x5942424f; - local_40._green._0_1_ = 0; - ehState = CONCAT31(ehState._1_3_,0x10); + (*(undefined1 *)((char *)&(local_40._green) + 0x0)) = 0; + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),0x10); if ((Entity_Player *)fVar10 == (Entity_Player *)0x0) { local_a8.x = 0.0; local_a8.y = 0.0; @@ -5020,8 +5020,8 @@ LAB_009a5887: local_a8 = VVar1; } else { - lobbyUserId = ((std_vector *)((int)fVar10 + 8))->_begin; - pvVar8 = ((std_vector *)((int)fVar10 + 8))->_end; + lobbyUserId = ((std_vector *)(GHIDRA_INT(fVar10) + 8))->_begin; + pvVar8 = ((std_vector *)(GHIDRA_INT(fVar10) + 8))->_end; } local_bc = pvVar8; local_98 = lobbyUserId; @@ -5033,7 +5033,7 @@ LAB_009a5887: ((void *)local_130.y != *(void **)local_b8)) { local_40._alpha = 9.80909e-45; memmove(&statusText,"WAITING",7); - local_40._red = (float)((uint)local_40._red & 0xffffff); + local_40._red = (float)(GHIDRA_UINT(local_40._red) & 0xffffff); uVar6 = g_manager->_framecount & 0x78; if (0x1d < uVar6) { if (uVar6 < 0x3c) { @@ -5051,9 +5051,9 @@ LAB_009a5887: } LAB_009a5af4: pEVar4 = local_7c; - get_player_hud_position(this,&local_128,(int)local_7c,4); + get_player_hud_position(this,&local_128,GHIDRA_INT(local_7c),4); render_player_net_status - (this,(int)pEVar4,KAGE::System::UserProfile::vftable,(void *)local_d4.y, + (this,GHIDRA_INT(pEVar4),KAGE::System::UserProfile::vftable,(void *)local_d4.y, local_128.x,local_128.y); temp_3fc998231f = g_manager; fVar10 = local_128.y + 8.0; @@ -5064,35 +5064,35 @@ LAB_009a5af4: local_fc = 0xffffffff; local_f8 = 0; local_f4 = 0; - ehState._0_1_ = 0x11; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x11; local_128.y = fVar10; ((KColor *)(&local_e8))->KColor::SetFromARGB(0xffffffff); statusTextBuf = (byte *******)&statusText; - if (0xf < (uint)local_40._unk) { + if (0xf < GHIDRA_UINT(local_40._unk)) { statusTextBuf = statusText; } pos_04.y = fVar10 - 14.0; pos_04.x = local_128.x; ((Font *)(&temp_3fc998231f->_font1_TeamMeatEx10))->Font::DrawString((byte *)statusTextBuf,pos_04, (Vector)0x3f8000003f800000,color_05,&drawSettings); - local_7c = (Entity_Player *)((int)local_7c + 1); - ehState._0_1_ = 0xf; - if (0xf < (uint)local_40._unk) { + local_7c = (Entity_Player *)(GHIDRA_INT(local_7c) + 1); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xf; + if (0xf < GHIDRA_UINT(local_40._unk)) { uVar6 = local_40._unk + 1; statusTextBuf = statusText; if (0xfff < uVar6) { statusTextBuf = (byte *******)statusText[-1]; uVar6 = local_40._unk + 0x24; - if ((byte *)0x1f < (byte *)((int)statusText + (-4 - (int)statusTextBuf))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(statusText) + (-4 - GHIDRA_INT(statusTextBuf)))) goto LAB_009a56f1; } operator_delete(statusTextBuf,uVar6); } local_40._alpha = 0.0; local_40._unk = 0xf; - statusText = (byte *******)((uint)statusText & 0xffffff00); + statusText = (byte *******)(GHIDRA_UINT(statusText) & 0xffffff00); } - local_8c = (Game *)((int)local_8c + 1); + local_8c = (Game *)(GHIDRA_INT(local_8c) + 1); local_d4.x = (float)KAGE::System::UserProfileBase::vftable; } local_120._blue = (float)KAGE::Network::Multiplayer::ConstLobby::vftable; @@ -5102,8 +5102,8 @@ LAB_009a5af4: (g_lobbyReleaseFn != (void *)0x0)) { (*g_lobbyReleaseFn)(&local_120._alpha); } - ehState._0_1_ = 0xff; - ehState._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(ehState) + 0x1)) = 0xffffff; } local_ac = (Entity_Player *)&(*(undefined1 *)((char *)(this) + 0x5954)); local_bc = (void *)0x0; @@ -5111,9 +5111,9 @@ LAB_009a5af4: pGVar7 = g_game; do { pvVar8 = local_bc; - if ((-1 < *(int *)((int)&(pGVar7->_playerManager)._coopSlots[0]._controllerIndex + (int)local_bc + if ((-1 < *(int *)(GHIDRA_INT(&(pGVar7->_playerManager)._coopSlots[0]._controllerIndex) + GHIDRA_INT(local_bc) )) && - (-1 < *(int *)((int)&(pGVar7->_playerManager)._coopSlots[0]._state + (int)local_bc))) { + (-1 < *(int *)(GHIDRA_INT(&(pGVar7->_playerManager)._coopSlots[0]._state) + GHIDRA_INT(local_bc)))) { local_94 = *(float *)&(*(undefined1 *)((char *)(local_ac) + 0x0)); local_90 = *(float *)&(*(undefined1 *)((char *)(local_ac) + 0x4)); local_a8.x = *(float *)&(*(undefined1 *)((char *)(local_ac) + 0x0)); @@ -5126,17 +5126,17 @@ LAB_009a5af4: local_90 = local_90 + g_screenHeight; local_a8.y = local_90; } - fVar10 = *(float *)((int)&(pGVar7->_playerManager)._coopSlots[0]._menuPosition + (int)local_bc + fVar10 = *(float *)(GHIDRA_INT(&(pGVar7->_playerManager)._coopSlots[0]._menuPosition) + GHIDRA_INT(local_bc) ); fVar11 = fVar10 + 1.0; - local_78 = (void *)(int)fVar11; - portraitEnd = (void *)(int)fVar11; - local_7c = (Entity_Player *)(int)(fVar10 - 1.0); - if ((int)local_7c <= (int)portraitEnd) { + local_78 = (void *)GHIDRA_INT(fVar11); + portraitEnd = (void *)GHIDRA_INT(fVar11); + local_7c = (Entity_Player *)GHIDRA_INT((fVar10 - 1.0)); + if (GHIDRA_INT(local_7c) <= GHIDRA_INT(portraitEnd)) { do { - fVar10 = (float)(int)local_7c - - *(float *)((int)&(pGVar7->_playerManager)._coopSlots[0]._menuPosition + - (int)pvVar8); + fVar10 = (float)GHIDRA_INT(local_7c) - + *(float *)(GHIDRA_INT(&(pGVar7->_playerManager)._coopSlots[0]._menuPosition) + + GHIDRA_INT(pvVar8)); local_74 = fVar10 * 24.0; fVar10 = ABS(fVar10); portraitAlpha = (void *)(1.0 - fVar10 * 0.5); @@ -5151,24 +5151,24 @@ LAB_009a5af4: } if (0.0 < (float)local_98) { pvVar8 = (pGVar7->_playerManager)._coopPlayerTypes._begin; - uVar6 = (int)(pGVar7->_playerManager)._coopPlayerTypes._end - (int)pvVar8 >> 2; - iVar3 = *(int *)((char *)pvVar8 + (((int)local_7c + uVar6) % uVar6) * 4); + uVar6 = GHIDRA_INT((pGVar7->_playerManager)._coopPlayerTypes._end) - GHIDRA_INT(pvVar8) >> 2; + iVar3 = *(int *)((char *)pvVar8 + ((GHIDRA_INT(local_7c) + uVar6) % uVar6) * 4); coopPlayerType = iVar3; if (iVar3 < 0x29) { if (((this->_coopMenuSprite)._animState._animData != (void *)0x0) && - ((0 < *(int *)((int)(this->_coopMenuSprite)._animState._animation + 0x80) || + ((0 < *(int *)(GHIDRA_INT((this->_coopMenuSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 0 < *(int *)((int)(this->_coopMenuSprite)._animState._animation + 0x80))))) { + 0 < *(int *)(GHIDRA_INT((this->_coopMenuSprite)._animState._animation) + 0x80))))) { pvVar8 = (this->_coopMenuSprite)._animState._animData; local_128.y = *(float *)((char *)pvVar8 + 0x38); if ((pvVar8 == (void *)0x0) || - (((int)local_128.y < 0 || (*(int *)((char *)pvVar8 + 0x1c) <= (int)local_128.y)))) { + ((GHIDRA_INT(local_128.y) < 0 || (*(int *)((char *)pvVar8 + 0x1c) <= GHIDRA_INT(local_128.y))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } *(undefined4 *) - ((int)(this->_coopMenuSprite)._animState._layerFrames + (int)local_128.y * 4) = 0; + (GHIDRA_INT((this->_coopMenuSprite)._animState._layerFrames) + GHIDRA_INT(local_128.y) * 4) = 0; AnimationState::AdvanceLayerPosition - (&(this->_coopMenuSprite)._animState,(int)local_128.y, + (&(this->_coopMenuSprite)._animState,GHIDRA_INT(local_128.y), (float)(coopPlayerType + 1)); } (this->_coopMenuSprite)._color._tint[3] = (float)local_98; @@ -5185,7 +5185,7 @@ LAB_009a5af4: AnimationLayer::RenderFrame ((AnimationLayer *)(iVar3 * 0x10 + *(int *)((char *)pvVar8 + 0x18)), &local_130, - *(int *)((int)(this->_coopMenuSprite)._animState._layerFrames + iVar3 * 4 + *(int *)(GHIDRA_INT((this->_coopMenuSprite)._animState._layerFrames) + iVar3 * 4 ),&g_vectorZero,&g_vectorZero,animation); } } @@ -5205,8 +5205,8 @@ LAB_009a5af4: portraitEnd = local_78; pvVar8 = local_bc; } - local_7c = (Entity_Player *)((int)local_7c + 1); - } while ((int)local_7c <= (int)portraitEnd); + local_7c = (Entity_Player *)(GHIDRA_INT(local_7c) + 1); + } while (GHIDRA_INT(local_7c) <= GHIDRA_INT(portraitEnd)); pGVar7 = g_game; } (this->_coopMenuSprite)._color._tint[3] = 1.0; @@ -5222,7 +5222,7 @@ LAB_009a5af4: local_8c = g_game; pGVar7 = g_game; } - local_bc = (void *)((int)pvVar8 + 0x14); + local_bc = (void *)(GHIDRA_INT(pvVar8) + 0x14); local_ac = (Entity_Player *)&local_ac->_damageEvents; } while (local_bc < 0x50); barPos.y = cursorPos.y; @@ -5288,7 +5288,7 @@ LAB_009a6204: outPosition->x = fVar2; } iVar1 = *(int *)(this->_playerHUD + iVar1); - if (((iVar1 != 0) && (1 < (uint)hudIndex)) && (*(char *)(iVar1 + 0x20a9) == '\0')) { + if (((iVar1 != 0) && (1 < GHIDRA_UINT(hudIndex))) && (*(char *)(iVar1 + 0x20a9) == '\0')) { iVar1 = *(int *)(iVar1 + 0x13c0); if (iVar1 == 0x15) { outPosition->y = outPosition->y - 22.0; @@ -5452,7 +5452,7 @@ void HUD::render_streak_texts() do { if (*(char *)(message + 2) != '\0') { textPos.x = centerX + 0.0; - textPos.y = (float)((double)(int)i + __uint_to_double_fixup[-((int)i >> 0x1f)]) * 35.0 + + textPos.y = (float)((double)GHIDRA_INT(i) + __uint_to_double_fixup[-(GHIDRA_INT(i) >> 0x1f)]) * 35.0 + (float)pHVar6; FUN_00840e10(textPos.x,textPos.y); } @@ -5469,7 +5469,7 @@ void HUD::render_streak_texts() fVar7 = 35.0; if (*(char *)local_a8.x != '\0') { if (*(int *)local_b8->_playerHUD == 0) { - ((HUD_Message *)((HUD_Message *)((int)local_a8.x + -8)))->HUD_Message::free_text_buffers(); + ((HUD_Message *)((HUD_Message *)(GHIDRA_INT(local_a8.x) + -8)))->HUD_Message::free_text_buffers(); *(char *)message = '\0'; } else { @@ -5526,7 +5526,7 @@ LAB_009a6c87: *(float *)((char *)local_a8.x + 0x130) = color._green; *(float *)((char *)local_a8.x + 0x134) = color._blue; *(float *)((char *)local_a8.x + 0x138) = color._alpha; - pcVar1 = (char *)((int)local_a8.x + 0x13c); + pcVar1 = (char *)(GHIDRA_INT(local_a8.x) + 0x13c); pcVar1[0] = '\0'; pcVar1[1] = '\0'; pcVar1[2] = '\0'; @@ -5612,7 +5612,7 @@ void HUD::render_player_hud(int playerHudIdx, int hudLayout) get_player_hud_position(this,&hudPos,playerHudIdx,hudLayout); this_00 = (PlayerHUD *)(this->_playerHUD + playerHudIdx * 0x6dc); - local_30.x = (float)(uint)(ushort)this_00->_playerHudIndex; + local_30.x = (float)GHIDRA_UINT((ushort)this_00->_playerHudIndex); pvVar1 = this_00->_player; if (pvVar1 == (void *)0x0) { return; @@ -5695,7 +5695,7 @@ LAB_009a71e5: PlayerHUD::RenderTrinket(this_00,trinketSlot,local_40,fVar4,1.0,0); local_40 = local_40 + -1; trinketSlot = trinketSlot - 1; - } while (-1 < (int)trinketSlot); + } while (-1 < GHIDRA_INT(trinketSlot)); if (*(int *)((char *)pvVar1 + 0x13c0) == 0x15) { hudPos.x = *(float *)&(*(undefined1 *)((char *)(this) + 0x5934)) + 58.0; hudPos.y = *(float *)&(*(undefined1 *)((char *)(this) + 0x5938)) + 45.0; @@ -5711,9 +5711,9 @@ LAB_009a71e5: PlayerHUD::RenderPocketItems(this_00,&hudPos,0,local_38,1.0); return; } - if ((local_30.x._0_2_ < 4) || (hudLayout != 1)) { + if (((*(undefined2 *)((char *)&(local_30.x) + 0x0)) < 4) || (hudLayout != 1)) { if (hudLayout == 3) { - if (local_28.x._0_2_ < 4) { + if ((*(undefined2 *)((char *)&(local_28.x) + 0x0)) < 4) { fVar4 = hudPos.x; fVar5 = hudPos.y; } @@ -5749,7 +5749,7 @@ LAB_009a71e5: } trinketEntrySmall = trinketEntrySmall + -6; trinketSlot = trinketSlot - 1; - } while (-1 < (int)trinketSlot); + } while (-1 < GHIDRA_INT(trinketSlot)); hudPos.x = fVar4 - 2.0; hudPos.y = hudPos.y + 1.0; hudLayout = 3; @@ -5777,9 +5777,9 @@ LAB_009a71e5: local_28.x = local_28.x + 16.0; isAnyTrinketDrawn = true; } - local_40 = (Vector *)((int)local_40 + -0x18); + local_40 = (Vector *)(GHIDRA_INT(local_40) + -0x18); trinketSlot = trinketSlot - 1; - } while (-1 < (int)trinketSlot); + } while (-1 < GHIDRA_INT(trinketSlot)); if (*(int *)((char *)pvVar1 + 0x13c0) == 0x15) { local_30.x = local_30.x + *(float *)&(*(undefined1 *)((char *)(this) + 0x5934)); local_30.y = hudPos.y + 33.0 + *(float *)&(*(undefined1 *)((char *)(this) + 0x5938)); @@ -5816,7 +5816,7 @@ LAB_009a71e5: } trinketEntry = trinketEntry + -6; trinketSlot = trinketSlot - 1; - } while (-1 < (int)trinketSlot); + } while (-1 < GHIDRA_INT(trinketSlot)); local_28.x = fVar4 + 0.0; if (((*(int *)((char *)pvVar1 + 0x17a4) == 0) || (*(int *)((char *)pvVar1 + 0x17a4) == 1)) && (*(int *)((char *)pvVar1 + 0x17a0) == 0)) { @@ -5876,7 +5876,7 @@ void HUD::render_boss_health_bar(Vector barPos) local_8 = -NAN; puStack_c = &LAB_00b0ddc8; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)((&barColor)[1]._colorize + 2); + local_14 = __security_cookie ^ GHIDRA_UINT(((&barColor)[1]._colorize + 2)); fillYOffset = 0.0; if (0.0 <= this->_bossHPBarFill) { iVar4 = *(int *)((char *)g_game->_room + 0x1bb0); @@ -5961,11 +5961,11 @@ void HUD::render_boss_health_bar(Vector barPos) if (local_1c.y == 7.56701e-44) { shader_stack_push(2); uVar5 = g_game->_frameCount & 0x800000ff; - if ((int)uVar5 < 0) { + if (GHIDRA_INT(uVar5) < 0) { uVar5 = (uVar5 - 1 | 0xffffff00) + 1; } other = &(*(undefined1 *)((char *)(this) + 0x54b0)); - barColor._colorize[3] = (float)(int)uVar5 * 0.00390625; + barColor._colorize[3] = (float)GHIDRA_INT(uVar5) * 0.00390625; pvVar6 = (void *)0x9a80a9; ((KAGE::SmartPointer *)(&barImage))->KAGE::SmartPointer::operator_assign(other); } @@ -5982,7 +5982,7 @@ void HUD::render_boss_health_bar(Vector barPos) if (this->_bossHPBarHealFlash < 1) { if (-1 < this->_bossHPBarDamageFlash) { uVar5 = this->_bossHPBarDamageFlash & 0x80000001; - if ((int)uVar5 < 0) { + if (GHIDRA_INT(uVar5) < 0) { uVar5 = (uVar5 - 1 | 0xfffffffe) + 1; } if (uVar5 != 1) { @@ -6012,7 +6012,7 @@ void HUD::render_boss_health_bar(Vector barPos) } else { uVar5 = this->_bossHPBarHealFlash & 0x80000001; - if ((int)uVar5 < 0) { + if (GHIDRA_INT(uVar5) < 0) { uVar5 = (uVar5 - 1 | 0xfffffffe) + 1; } if (uVar5 == 1) { @@ -6181,8 +6181,8 @@ void HUD::AssignPlayerHUDs() playerHud = (PlayerHUD *)&(*(undefined1 *)((char *)&(playerHud[1]) + 0x2c)); iVar4 = iVar4 + -1; } while (iVar4 != 0); - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { (g_game->_playerManager)._coopSlots[0]._controllerIndex = -1; i = 0; (game->_playerManager)._coopSlots[1]._controllerIndex = -1; @@ -6201,7 +6201,7 @@ void HUD::AssignPlayerHUDs() (game->_playerManager)._coopSlots[3]._menuPosition = 0.0; (game->_playerManager)._coopSlots[3]._playerType = 0; pvVar3 = (game->_playerManager)._playerList._begin; - if ((int)(game->_playerManager)._playerList._end - (int)pvVar3 >> 2 != 0) { + if (GHIDRA_INT((game->_playerManager)._playerList._end) - GHIDRA_INT(pvVar3) >> 2 != 0) { do { iVar4 = *(int *)((char *)pvVar3 + i * 4); iVar1 = *(int *)(iVar4 + 0x1e68); @@ -6213,21 +6213,21 @@ void HUD::AssignPlayerHUDs() pvVar3 = (game->_playerManager)._playerList._begin; } i = i + 1; - } while (i < (uint)((int)(game->_playerManager)._playerList._end - (int)pvVar3 >> 2)); + } while (i < GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - GHIDRA_INT(pvVar3) >> 2))); } } i = 0; playerManager = &g_game->_playerManager; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> 2 + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar3 = (playerManager->_playerList)._end; - if ((int)pvVar3 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar3) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar3 = (playerManager->_playerList)._end; } playerSlot = (playerManager->_playerList)._begin; - if (i < (uint)((int)pvVar3 - (int)playerSlot >> 2)) { + if (i < GHIDRA_UINT((GHIDRA_INT(pvVar3) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + i; } pvVar3 = (void *)*playerSlot; @@ -6275,8 +6275,8 @@ void HUD::AssignPlayerHUDs() } i = i + 1; playerManager = &g_game->_playerManager; - } while (i < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (i < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } return; } diff --git a/src/game/hud_message.cpp b/src/game/hud_message.cpp index ebf202c..e324c33 100644 --- a/src/game/hud_message.cpp +++ b/src/game/hud_message.cpp @@ -25,14 +25,14 @@ HUD_Message::~HUD_Message() glyphTree = sprite + 0x7a; FID_conflict__Erase_tree_>_> (glyphTree,(fuzzer_allocator_> *)glyphTree, - *(_Tree_node **)((int)sprite[0x7a] + 4)); + *(_Tree_node **)(GHIDRA_INT(sprite[0x7a]) + 4)); operator_delete((void *)*glyphTree,0x18); FUN_004b3950(); ((Font *)((Font *)(sprite + 0x57)))->Font::Unload(); glyphTree = sprite + 0x67; FID_conflict__Erase_tree_>_> (glyphTree,(fuzzer_allocator_> *)glyphTree, - *(_Tree_node **)((int)sprite[0x67] + 4)); + *(_Tree_node **)(GHIDRA_INT(sprite[0x67]) + 4)); operator_delete((void *)*glyphTree,0x18); FUN_004b3950(); local_8 = 0; @@ -86,7 +86,7 @@ void HUD_Message::load_graphics() local_14 = 0xffffffff; puStack_18 = &LAB_00b02ab5; local_1c = ExceptionList; - securityCookie = __security_cookie ^ (uint)(local_3c + 0x2c); + securityCookie = __security_cookie ^ GHIDRA_UINT((local_3c + 0x2c)); ExceptionList = &local_1c; local_2c = 0; local_28 = 0xf; @@ -94,20 +94,20 @@ void HUD_Message::load_graphics() local_3c[1] = '\0'; local_3c[2] = '\0'; local_3c[3] = '\0'; - local_3c._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = std::_Allocate(0x20); local_2c = 0x15; local_28 = 0x1f; - builtin_strncpy((char *)local_3c._0_4_,"gfx/ui/ui_streak.anm2",0x16); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_3c) + 0x0)),"gfx/ui/ui_streak.anm2",0x16); local_14 = 0; ((ANM2 *)((ANM2 *)(in_ECX + 8)))->ANM2::Load((std_string *)local_3c,1); local_14 = 0xffffffff; if (0xf < local_28) { freeSize = local_28 + 1; - freeBlock = (char *)local_3c._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)local_3c) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(char **)(local_3c._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + -4); freeSize = local_28 + 0x24; - if ((char *)0x1f < (char *)(local_3c._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -134,34 +134,34 @@ void HUD_Message::load_graphics() builtin_strncpy(local_54[0],"font/MPlus_12b.fnt",0x13); local_14 = 3; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath((std_string *)local_3c,(std_string *)local_54); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; fontPath = extraout_EAX; if (0xf < *(uint *)(extraout_EAX + 0x14)) { fontPath = *(byte **)extraout_EAX; } ((Font *)((Font *)(in_ECX + 0x57)))->Font::Load(fontPath,0); - local_14 = CONCAT31(local_14._1_3_,3); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),3); if (0xf < local_28) { freeSize = local_28 + 1; - freeBlock = (char *)local_3c._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)local_3c) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(char **)(local_3c._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + -4); freeSize = local_28 + 0x24; - if ((char *)0x1f < (char *)(local_3c._0_4_ + (-4 - (int)freeBlock))) goto LAB_008409ce; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_3c) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) goto LAB_008409ce; } operator_delete(freeBlock,freeSize); } local_14 = 0xffffffff; local_2c = 0; local_28 = 0xf; - local_3c._0_4_ = local_3c._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = (*(undefined4 *)((char *)&(local_3c) + 0x0)) & 0xffffff00; if (0xf < local_40) { freeSize = local_40 + 1; freeBlock = local_54[0]; if (0xfff < freeSize) { freeBlock = *(char **)(local_54[0] + -4); freeSize = local_40 + 0x24; - if ((char *)0x1f < local_54[0] + (-4 - (int)freeBlock)) { + if ((char *)0x1f < local_54[0] + (-4 - GHIDRA_INT(freeBlock))) { LAB_008409ce: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -177,7 +177,7 @@ LAB_008409ce: local_14 = 5; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath((std_string *)local_54,(std_string *)krFontPath) ; - local_14 = CONCAT31(local_14._1_3_,6); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),6); fontPath = extraout_EAX_00; if (0xf < *(uint *)(extraout_EAX_00 + 0x14)) { fontPath = *(byte **)extraout_EAX_00; @@ -189,20 +189,20 @@ LAB_008409ce: if (0xfff < freeSize) { freeBlock = *(char **)(local_54[0] + -4); freeSize = local_40 + 0x24; - if ((char *)0x1f < local_54[0] + (-4 - (int)freeBlock)) goto LAB_00840ab4; + if ((char *)0x1f < local_54[0] + (-4 - GHIDRA_INT(freeBlock))) goto LAB_00840ab4; } operator_delete(freeBlock,freeSize); } local_44 = 0; local_40 = 0xf; - local_54[0] = (char *)((uint)local_54[0] & 0xffffff00); + local_54[0] = (char *)(GHIDRA_UINT(local_54[0]) & 0xffffff00); if (0xf < krFontPathCapacity) { freeSize = krFontPathCapacity + 1; freeBlock = krFontPath[0]; if (0xfff < freeSize) { freeBlock = *(char **)(krFontPath[0] + -4); freeSize = krFontPathCapacity + 0x24; - if ((char *)0x1f < krFontPath[0] + (-4 - (int)freeBlock)) { + if ((char *)0x1f < krFontPath[0] + (-4 - GHIDRA_INT(freeBlock))) { LAB_00840ab4: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -307,14 +307,14 @@ void HUD_Message::text_out() isLess = bVar1 < (byte)*targetNameCursor; if (bVar1 != *targetNameCursor) { LAB_00840cb0: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_00840cb5; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)animNameCursor + 1); isLess = bVar1 < (byte)targetNameCursor[1]; if (bVar1 != targetNameCursor[1]) goto LAB_00840cb0; - animNameCursor = (byte *)((int)animNameCursor + 2); + animNameCursor = (byte *)(GHIDRA_INT(animNameCursor) + 2); targetNameCursor = targetNameCursor + 2; } while (bVar1 != 0); cmpResult = 0; @@ -356,14 +356,14 @@ void HUD_Message::free_text_buffers() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } blockSize = *(uint *)((char *)buffer + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - blockSize; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - blockSize; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < blockSize); - free((void *)((int)buffer + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < blockSize)); + free((void *)(GHIDRA_INT(buffer) + -4)); this[bufferIdx] = (HUD_Message)0x0; } bufferIdx = bufferIdx + 1; @@ -398,12 +398,12 @@ void HUD_Message::set_text_line(short *text, int lineIndex) ch = *textEnd; textEnd = textEnd + 1; } while (ch != 0); - charCount = ((int)textEnd - (int)(text + 1) >> 1) + 1; + charCount = (GHIDRA_INT(textEnd) - GHIDRA_INT((text + 1)) >> 1) + 1; byteSize = (ulonglong)charCount * 2; textCopy = (HUD_Message) tracked_alloc(0,(void *)0x0, (ulonglong) - (-(uint)((int)((ulonglong)byteSize >> 0x20) != 0) | (uint)byteSize)); + (-GHIDRA_UINT((GHIDRA_INT(((ulonglong)byteSize >> 0x20)) != 0)) | GHIDRA_UINT(byteSize))); this[lineIndex] = textCopy; memcpy((void *)textCopy,text,charCount * 2); ExceptionList = local_10; @@ -462,7 +462,7 @@ void HUD_Message::UpdateTextImage() g_graphicsManager_blendMode[3] = 1; g_graphicsManager_blendMode[4] = 7; text = *this; - fVar3 = (float)(*(uint *)((int)this[6] + 0x10) >> 1) + 0.0; + fVar3 = (float)(*(uint *)(GHIDRA_INT(this[6]) + 0x10) >> 1) + 0.0; local_1c = CONCAT44(fVar3,(undefined4)local_1c); if (text != (HUD_Message)0x0) { if (*(short *)text == 1) { @@ -473,7 +473,7 @@ void HUD_Message::UpdateTextImage() else { textY = 2.0; } - render_text_image(titleFont,(short *)((int)text + 2),fVar3,textY,&textColor,unused); + render_text_image(titleFont,(short *)(GHIDRA_INT(text) + 2),fVar3,textY,&textColor,unused); } else { uVar2 = ((Font *)(titleFont))->Font::get_string_width_utf16((short *)text,-1); @@ -497,7 +497,7 @@ void HUD_Message::UpdateTextImage() ; local_8 = 0xffffffff; } - fVar3 = local_1c._4_4_; + fVar3 = (*(undefined4 *)((char *)&(local_1c) + 0x4)); } text = this[1]; if (text != (HUD_Message)0x0) { @@ -512,7 +512,7 @@ void HUD_Message::UpdateTextImage() textY = 26.0; } if (*(short *)text == 1) { - render_text_image(subtitleFont,(short *)((int)text + 2),fVar3,textY,&textColor,unused_00); + render_text_image(subtitleFont,(short *)(GHIDRA_INT(text) + 2),fVar3,textY,&textColor,unused_00); } else { uVar2 = ((Font *)(subtitleFont))->Font::get_string_width_utf16((short *)text,-1); @@ -611,11 +611,11 @@ void HUD_Message::render_text_image(Font *font, short *text, float x, float y, K ehState = 0xffffffff; puStack_18 = &LAB_00b02bcf; savedExceptionList = ExceptionList; - stackCookie = __security_cookie ^ (uint)(colorScratch + 0x40); + stackCookie = __security_cookie ^ GHIDRA_UINT((colorScratch + 0x40)); ExceptionList = &savedExceptionList; charPtr = (ushort *)text; local_54 = (int *)0x0; - charBuf = (int *)(uint)(ushort)*text; + charBuf = (int *)GHIDRA_UINT((ushort)*text); if (*text != 0) { isFontLoaded = font->_isLoaded; local_58 = (ushort *)text; @@ -630,7 +630,7 @@ LAB_00841470: _Find_lower_bound<>(); if ((*(char *)((char *)local_94.y + 0xd) != '\0') || (pvVar3 = (void *)local_94.y, - ((uint)charBuf & 0xffff) < *(uint *)((char *)local_94.y + 0x10))) { + (GHIDRA_UINT(charBuf) & 0xffff) < *(uint *)((char *)local_94.y + 0x10))) { pvVar3 = (font->_charsBlock)._head; } if (pvVar3 == (font->_charsBlock)._head) { @@ -640,16 +640,16 @@ LAB_00841470: iVar2 = *(int *)((char *)pvVar3 + 0x14); } if ((iVar2 == -1) || - (iVar2 = (int)*(short *)((char *)font->_chars + iVar2 * 0x14 + 0x10), iVar2 == 0)) + (iVar2 = GHIDRA_INT(*(short *)((char *)font->_chars + iVar2 * 0x14 + 0x10)), iVar2 == 0)) goto LAB_00841470; } local_58 = local_58 + 1; - local_54 = (int *)((int)local_54 + iVar2); - charBuf = (int *)(uint)*local_58; + local_54 = (int *)(GHIDRA_INT(local_54) + iVar2); + charBuf = (int *)GHIDRA_UINT(*local_58); isFontLoaded = font->_isLoaded; } while (*local_58 != 0); - local_6c = (int *)((uint)local_5c & 0xffff); - local_58 = (ushort *)(x - ((float)((uint)local_54 >> 1) + 0.0)); + local_6c = (int *)(GHIDRA_UINT(local_5c) & 0xffff); + local_58 = (ushort *)(x - ((float)(GHIDRA_UINT(local_54) >> 1) + 0.0)); charBuf = (int *)0x0; do { if (font->_isLoaded == 0) { @@ -668,9 +668,9 @@ LAB_00841601: case (int *)0x0: pLVar5 = ((ANM2 *)(&(g_game->_hud)._heartsSprite))->ANM2::GetLayer((byte *)0x0); pvVar3 = ((LayerState *)(pLVar5))->LayerState::GetTexture(heartsTexture); - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; ((KAGE::SmartPointer *)(&local_64))->KAGE::SmartPointer::operator_assign(pvVar3); - ehState._0_1_ = 2; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; if (heartsTextureRef != (int *)0x0) { cVar1 = (**(code **)(*heartsTextureRef + 0xc))(); pvVar3 = g_imageReleaseFn; @@ -683,9 +683,9 @@ joined_r0x00841934: case (int *)0x1: pLVar5 = ((ANM2 *)(&(g_game->_hud)._chargeBarSprite))->ANM2::GetLayer((byte *)0x0); pvVar3 = ((LayerState *)(pLVar5))->LayerState::GetTexture(chargeBarTexture); - ehState._0_1_ = 3; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 3; ((KAGE::SmartPointer *)(&local_64))->KAGE::SmartPointer::operator_assign(pvVar3); - ehState._0_1_ = 4; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 4; if (chargeBarTextureRef != (int *)0x0) { cVar1 = (**(code **)(*chargeBarTextureRef + 0xc))(); pvVar3 = g_imageReleaseFn; @@ -695,9 +695,9 @@ joined_r0x00841934: case (int *)0x2: pLVar5 = ((ANM2 *)(&(g_game->_hud)._pickupHUDSprite))->ANM2::GetLayer((byte *)0x0); pvVar3 = ((LayerState *)(pLVar5))->LayerState::GetTexture(pickupTexture); - ehState._0_1_ = 5; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; ((KAGE::SmartPointer *)(&local_64))->KAGE::SmartPointer::operator_assign(pvVar3); - ehState._0_1_ = 6; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 6; if (pickupTextureRef != (int *)0x0) { cVar1 = (**(code **)(*pickupTextureRef + 0xc))(); pvVar3 = g_imageReleaseFn; @@ -707,9 +707,9 @@ joined_r0x00841934: case (int *)0x3: pLVar5 = ((ANM2 *)(&(g_game->_hud)._cardsPillsSprite))->ANM2::GetLayer((byte *)0x0); pvVar3 = ((LayerState *)(pLVar5))->LayerState::GetTexture(cardsPillsTexture); - ehState._0_1_ = 7; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 7; ((KAGE::SmartPointer *)(&local_64))->KAGE::SmartPointer::operator_assign(pvVar3); - ehState._0_1_ = 8; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 8; if (cardsPillsTextureRef != (int *)0x0) { cVar1 = (**(code **)(*cardsPillsTextureRef + 0xc))(); pvVar3 = g_imageReleaseFn; @@ -717,10 +717,10 @@ joined_r0x00841934: } break; case (int *)0x4: - ((shared_ptr *)(roomTargetA))->shared_ptr::assign((void *)((int)g_game->_room + 0x1bc8)); - ehState._0_1_ = 9; + ((shared_ptr *)(roomTargetA))->shared_ptr::assign((void *)(GHIDRA_INT(g_game->_room) + 0x1bc8)); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 9; ((KAGE::SmartPointer *)(&local_64))->KAGE::SmartPointer::operator_assign(roomTargetA); - ehState._0_1_ = 10; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 10; if (roomTargetARef != (int *)0x0) { cVar1 = (**(code **)(*roomTargetARef + 0xc))(); pvVar3 = g_renderTargetReleaseFn; @@ -728,10 +728,10 @@ joined_r0x00841934: } break; case (int *)0x5: - ((shared_ptr *)(roomTargetB))->shared_ptr::assign((void *)((int)g_game->_room + 0x1bd0)); - ehState._0_1_ = 0xb; + ((shared_ptr *)(roomTargetB))->shared_ptr::assign((void *)(GHIDRA_INT(g_game->_room) + 0x1bd0)); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xb; ((KAGE::SmartPointer *)(&local_64))->KAGE::SmartPointer::operator_assign(roomTargetB); - ehState._0_1_ = 0xc; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xc; if (roomTargetBRef != (int *)0x0) { cVar1 = (**(code **)(*roomTargetBRef + 0xc))(); pvVar3 = g_renderTargetReleaseFn; @@ -741,9 +741,9 @@ joined_r0x00841934: case (int *)0x6: pLVar5 = ((ANM2 *)(&(g_game->_hud)._statsSprite))->ANM2::GetLayer((byte *)0x0); pvVar3 = ((LayerState *)(pLVar5))->LayerState::GetTexture(statsTexture); - ehState._0_1_ = 0xd; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xd; ((KAGE::SmartPointer *)(&local_64))->KAGE::SmartPointer::operator_assign(pvVar3); - ehState._0_1_ = 0xe; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xe; if (statsTextureRef != (int *)0x0) { cVar1 = (**(code **)(*statsTextureRef + 0xc))(); pvVar3 = g_imageReleaseFn; @@ -752,29 +752,29 @@ joined_r0x00841934: break; case (int *)0x7: ((KAGE::SmartPointer *)(defaultTexture))->KAGE::SmartPointer::operator_assign(&DAT_00c798a8); - ehState._0_1_ = 0xf; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xf; ((KAGE::SmartPointer *)(&local_64))->KAGE::SmartPointer::operator_assign(defaultTexture); - ehState._0_1_ = 0x10; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x10; if (defaultTextureRef != (int *)0x0) { cVar1 = (**(code **)(*defaultTextureRef + 0xc))(); pvVar3 = g_imageReleaseFn; goto joined_r0x00841934; } } - ehState = (uint)ehState._1_3_ << 8; + ehState = (*(undefined1 *)((char *)&(GHIDRA_UINT(ehState)) + 0x1)) << 8; if (local_64 != (int *)0x0) { - uVar4 = (uint)local_64[4] >> 3; + uVar4 = GHIDRA_UINT(local_64[4]) >> 3; local_cc = 1; local_28 = 0.0; quadSize.x = 8.0; quadSize.y = 16.0; - iVar2 = (int)local_54 % (int)(((uint)local_64[5] >> 4) * uVar4); + iVar2 = GHIDRA_INT(local_54) % GHIDRA_INT(((GHIDRA_UINT(local_64[5]) >> 4) * uVar4)); local_94.x = (float)local_58; - uvY0 = (float)(iVar2 / (int)uVar4) * 16.0; + uvY0 = (float)(iVar2 / GHIDRA_INT(uVar4)) * 16.0; uvY2 = uvY0 + 16.0; - uvX0 = (float)(iVar2 % (int)uVar4) * 8.0; + uvX0 = (float)(iVar2 % GHIDRA_INT(uVar4)) * 8.0; uvX1 = uvX0 + 8.0; - colorScratch._24_4_ = 1.0; + (*(undefined4 *)((char *)&(colorScratch) + 0x18)) = 1.0; fStack_34 = 1.0; fStack_30 = 1.0; fStack_2c = 1.0; @@ -802,7 +802,7 @@ joined_r0x00841934: } local_54 = (int *)0x3f800000; g_currentShader = shader; - ((Shader *)(shader))->Shader::set_uniform((byte *)"Exposure",8,&local_5c,(int)shader); + ((Shader *)(shader))->Shader::set_uniform((byte *)"Exposure",8,&local_5c,GHIDRA_INT(shader)); ((Shader *)(g_currentShader))->Shader::set_uniform((byte *)"Gamma",8,&local_54,unused_00); } else { @@ -810,10 +810,10 @@ joined_r0x00841934: if ((DAT_00c7911c & 1) == 0) { shader = g_currentShader; } - colorScratch._0_4_ = 1.0; - colorScratch._4_4_ = 1.0; - colorScratch._8_4_ = 1.0; - colorScratch._12_4_ = 1.0; + (*(undefined4 *)((char *)&(colorScratch) + 0x0)) = 1.0; + (*(undefined4 *)((char *)&(colorScratch) + 0x4)) = 1.0; + (*(undefined4 *)((char *)&(colorScratch) + 0x8)) = 1.0; + (*(undefined4 *)((char *)&(colorScratch) + 0xc)) = 1.0; fStack_30 = 0.0; fStack_2c = 0.0; image = (int *)0x0; @@ -821,9 +821,9 @@ joined_r0x00841934: local_28 = 0.0; local_5c = textureRef; local_54 = local_64; - colorScratch._16_4_ = 0.0; - colorScratch._20_4_ = 0.0; - colorScratch._24_4_ = 0.0; + (*(undefined4 *)((char *)&(colorScratch) + 0x10)) = 0.0; + (*(undefined4 *)((char *)&(colorScratch) + 0x14)) = 0.0; + (*(undefined4 *)((char *)&(colorScratch) + 0x18)) = 0.0; fStack_34 = 0.0; g_currentShader = shader; if (textureRef != (int *)0x0) { @@ -854,7 +854,7 @@ LAB_00841bda: local_5c = local_6c; _Find_lower_bound<>(); if ((*(char *)((char *)charNode + 0xd) != '\0') || - (pvVar3 = charNode, ((uint)local_6c & 0xffff) < *(uint *)((char *)charNode + 0x10))) { + (pvVar3 = charNode, (GHIDRA_UINT(local_6c) & 0xffff) < *(uint *)((char *)charNode + 0x10))) { pvVar3 = (font->_charsBlock)._head; } if (pvVar3 == (font->_charsBlock)._head) { @@ -864,13 +864,13 @@ LAB_00841bda: iVar2 = *(int *)((char *)pvVar3 + 0x14); } if (iVar2 == -1) goto LAB_008415fb; - local_6c = (int *)(int)*(short *)((char *)font->_chars + iVar2 * 0x14 + 0x10); + local_6c = (int *)GHIDRA_INT(*(short *)((char *)font->_chars + iVar2 * 0x14 + 0x10)); ch = *charPtr; if (local_6c == (int *)0x0) goto LAB_00841601; - charBuf = (int *)(uint)ch; - colorScratch._16_4_ = 0.0; - colorScratch._20_4_ = 9.18341e-41; - colorScratch._24_4_ = 0.0; + charBuf = (int *)GHIDRA_UINT(ch); + (*(undefined4 *)((char *)&(colorScratch) + 0x10)) = 0.0; + (*(undefined4 *)((char *)&(colorScratch) + 0x14)) = 9.18341e-41; + (*(undefined4 *)((char *)&(colorScratch) + 0x18)) = 0.0; fStack_34 = 1.0; fStack_30 = -NAN; fStack_2c = 0.0; @@ -878,16 +878,16 @@ LAB_00841bda: ehState = 0x12; pvVar3 = ((Font *)(font))->Font::layout_glyphs(glyphLayout,(byte *)&charBuf,colorScratch + 0x10, &g_vectorOne); - ehState = CONCAT31(ehState._1_3_,0x13); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),0x13); Font::draw_glyph_run(font,(float)local_58,y,pvVar3,1.0,1.0,*color,colorScratch + 0x10); std::vector<12byte>::clear(); std::vector<12byte>::_Tidy(); } ehState = 0xffffffff; - iVar2 = (int)local_6c >> 0x1f; - advance = (double)(int)local_6c; + iVar2 = GHIDRA_INT(local_6c) >> 0x1f; + advance = (double)GHIDRA_INT(local_6c); charPtr = charPtr + 1; - local_6c = (int *)(uint)*charPtr; + local_6c = (int *)GHIDRA_UINT(*charPtr); local_58 = (ushort *)((float)(advance + __uint_to_double_fixup[-iVar2]) + (float)local_58); } while (*charPtr != 0); } diff --git a/src/game/image_base.cpp b/src/game/image_base.cpp index f44589b..08a112b 100644 --- a/src/game/image_base.cpp +++ b/src/game/image_base.cpp @@ -54,10 +54,10 @@ byte ImageBase::set_size(uint width, uint height, int unused) } *(uint *)((char *)this + 0x1c) = uVar2; *(float *)((char *)this + 0x20) = - (float)((double)(int)clampedWidth + __uint_to_double_fixup[-((int)clampedWidth >> 0x1f)]) / - (float)((double)(int)textureWidth + __uint_to_double_fixup[-((int)textureWidth >> 0x1f)]); + (float)((double)GHIDRA_INT(clampedWidth) + __uint_to_double_fixup[-(GHIDRA_INT(clampedWidth) >> 0x1f)]) / + (float)((double)GHIDRA_INT(textureWidth) + __uint_to_double_fixup[-(GHIDRA_INT(textureWidth) >> 0x1f)]); *(float *)((char *)this + 0x24) = - (float)((double)(int)clampedHeight + __uint_to_double_fixup[-((int)clampedHeight >> 0x1f)]) / - (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]); + (float)((double)GHIDRA_INT(clampedHeight) + __uint_to_double_fixup[-(GHIDRA_INT(clampedHeight) >> 0x1f)]) / + (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]); return 1; } diff --git a/src/game/image_png.cpp b/src/game/image_png.cpp index e306bdb..c28abba 100644 --- a/src/game/image_png.cpp +++ b/src/game/image_png.cpp @@ -45,7 +45,7 @@ byte ImagePng::load(void *stream, byte *path) local_8 = 0xffffffff; puStack_c = &LAB_00b131a0; local_10 = ExceptionList; - local_14 = __security_cookie ^ (int)register0x00000010 - 4U; + local_14 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; local_30 = stream; savedPath = path; @@ -71,7 +71,7 @@ byte ImagePng::load(void *stream, byte *path) uVar7 = 0; } else { - uVar7 = -(uint)bVar10 | 1; + uVar7 = -GHIDRA_UINT(bVar10) | 1; } goto LAB_00a64af1; } @@ -104,7 +104,7 @@ LAB_00a64af1: memset(pvVar9,0,0xb8); } } - piVar2[0x17] = (int)local_30; + piVar2[0x17] = GHIDRA_INT(local_30); *(undefined1 *)(piVar2 + 0x49) = 8; endInfo = pvVar9; png_read_info(); @@ -116,29 +116,29 @@ LAB_00a64af1: local_30 = (void *)0x0; local_24 = 0; if ((png != (int *)0x0) && (info != (ushort *)0x0)) { - local_28 = (uint)*info; - uVar7 = (uint)(byte)info[0xc]; - local_24 = (uint)info[2]; - local_30 = (void *)(uint)*(byte *)((char *)info + 0x19); + local_28 = GHIDRA_UINT(*info); + uVar7 = GHIDRA_UINT((byte)info[0xc]); + local_24 = GHIDRA_UINT(info[2]); + local_30 = (void *)GHIDRA_UINT(*(byte *)((char *)info + 0x19)); if (local_30 == (void *)0x3) { uVar5 = 1; } else { - uVar5 = (uint)local_30 & 2 | 1; + uVar5 = GHIDRA_UINT(local_30) & 2 | 1; } alpha = uVar5 + 1; if ((*(byte *)((char *)info + 0x19) & 4) == 0) { alpha = uVar5; } - if ((uint)(0x7fffffff / (ulonglong)(alpha * uVar7 + 7 >> 3)) < local_28) { + if (GHIDRA_UINT((0x7fffffff / (ulonglong)(alpha * uVar7 + 7 >> 3))) < local_28) { FUN_00a64630(); } } if (uVar7 == 8) { dimensions = FUN_00a976e0(); piVar6 = local_44; - local_28 = (uint)((dimensions & 0xffff0000ffff) >> 0x20); - bVar1 = ((ImageBase *)(local_44))->ImageBase::set_size(local_28,(uint)(dimensions & 0xffff0000ffff),local_28); + local_28 = GHIDRA_UINT(((dimensions & 0xffff0000ffff) >> 0x20)); + bVar1 = ((ImageBase *)(local_44))->ImageBase::set_size(local_28,GHIDRA_UINT((dimensions & 0xffff0000ffff)),local_28); if (bVar1 == 0) { KAGE_LogMessage(8,(byte *)"Failed to load image \'%s\' because set_size failed\n"); ExceptionList = local_10; @@ -163,7 +163,7 @@ LAB_00a64af1: } local_28 = uVar7 / local_28; texelSize = piVar6[6] * piVar6[7] * local_28; - allocSizeHigh = (int)texelSize >> 0x1f; + allocSizeHigh = GHIDRA_INT(texelSize) >> 0x1f; allocSize = texelSize; texels = KAGE_Memory::heap_alloc(2,(ulonglong *)&allocSize); if (texels == (byte *)0x0) { @@ -246,7 +246,7 @@ LAB_00a64de8: if (info != (ushort *)0x0) { if ((info[4] & 8) != 0) { local_30 = *(void **)(info + 8); - uVar7 = (uint)info[10]; + uVar7 = GHIDRA_UINT(info[10]); } if ((info != (ushort *)0x0) && ((info[4] & 0x10) != 0)) { if (*(char *)((char *)info + 0x19) == '\x03') { @@ -255,10 +255,10 @@ LAB_00a64de8: else { local_24 = 0; } - local_28 = (uint)info[0xb]; + local_28 = GHIDRA_UINT(info[0xb]); } } - uVar7 = -(uint)(uVar7 != 0) & uVar7; + uVar7 = -GHIDRA_UINT((uVar7 != 0)) & uVar7; uVar5 = 0x100; if (uVar7 < 0x100) { uVar5 = uVar7; @@ -268,7 +268,7 @@ LAB_00a64de8: if (uVar5 != 0) { paletteAlpha = (undefined1 *)(local_48 + 3); do { - if ((int)uVar7 < (int)local_28) { + if (GHIDRA_INT(uVar7) < GHIDRA_INT(local_28)) { alpha = *(undefined1 *)(uVar7 + local_24); } else { diff --git a/src/game/info_display.cpp b/src/game/info_display.cpp index 3e7d7d1..87e5a38 100644 --- a/src/game/info_display.cpp +++ b/src/game/info_display.cpp @@ -38,9 +38,9 @@ void InfoDisplay::load_xml(byte *path, void *modEntry) local_8 = 0xffffffff; puStack_c = &LAB_00b030d6; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (uint)(cardEntryName + 0x120); + uVar3 = __security_cookie ^ GHIDRA_UINT((cardEntryName + 0x120)); ExceptionList = &local_10; - pvVar9 = (void *)(-(uint)(modEntry != (void *)0x0) & (int)modEntry + 0xecU); + pvVar9 = (void *)(-GHIDRA_UINT((modEntry != (void *)0x0)) & GHIDRA_INT(modEntry) + 0xecU); local_14 = uVar3; if (modEntry == (void *)0x0) { iVar8 = *(int *)&(*(undefined1 *)((char *)(this) + 0x18)); @@ -61,13 +61,13 @@ void InfoDisplay::load_xml(byte *path, void *modEntry) game = g_game; do { if (game == (Game *)0x0) { - if (-1 < (int)id) goto LAB_0084ec8b; + if (-1 < GHIDRA_INT(id)) goto LAB_0084ec8b; } else { - if ((int)id < 0) { - if (((int)id < 0) && + if (GHIDRA_INT(id) < 0) { + if ((GHIDRA_INT(id) < 0) && (pvVar5 = (game->_proceduralItemManager)._proceduralItems._begin, - (int)~id < (int)(game->_proceduralItemManager)._proceduralItems._end - (int)pvVar5 >> 2 + GHIDRA_INT(~id) < GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar5) >> 2 )) { pIVar4 = (ItemConfig_Item *)**(undefined4 **)((char *)pvVar5 + (-4 - idOffset)); } @@ -78,9 +78,9 @@ void InfoDisplay::load_xml(byte *path, void *modEntry) else { LAB_0084ec8b: pvVar5 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar5 >> 2 <= (int)id) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar5) >> 2 <= GHIDRA_INT(id)) goto LAB_0084ecbb; - pIVar4 = *(ItemConfig_Item **)(idOffset + (int)pvVar5); + pIVar4 = *(ItemConfig_Item **)(idOffset + GHIDRA_INT(pvVar5)); } if (pIVar4 != (ItemConfig_Item *)0x0) { add_item_entry(this,pIVar4,0); @@ -100,7 +100,7 @@ LAB_0084ecbb: (this->_trinkets)._size = 0; do { pvVar5 = (g_manager->_itemConfig)._trinkets._begin; - if (((int)(id & 0x7fff) < (int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar5 >> 2) && + if ((GHIDRA_INT((id & 0x7fff)) < GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar5) >> 2) && (pIVar4 = *(ItemConfig_Item **)((char *)pvVar5 + (id & 0x7fff) * 4), pIVar4 != (ItemConfig_Item *)0x0)) { add_item_entry(this,pIVar4,0); @@ -115,9 +115,9 @@ LAB_0084ecbb: id = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1c)) = 0; do { - if (((-1 < (int)id) && + if (((-1 < GHIDRA_INT(id)) && (pvVar5 = (g_manager->_itemConfig)._cards._begin, - (int)id < (int)(g_manager->_itemConfig)._cards._end - (int)pvVar5 >> 2)) && + GHIDRA_INT(id) < GHIDRA_INT((g_manager->_itemConfig)._cards._end) - GHIDRA_INT(pvVar5) >> 2)) && (configEntry = *(undefined4 **)((char *)pvVar5 + id * 4), configEntry != (undefined4 *)0x0)) { ((InfoDisplayEntry *)(&cardEntry))->InfoDisplayEntry::InfoDisplayEntry(); local_8 = 0; @@ -125,7 +125,7 @@ LAB_0084ecbb: pbVar6 = (byte *)(configEntry + 2); cardEntry = 0; if (cardEntryName != pbVar6) { - if (0xf < (uint)configEntry[7]) { + if (0xf < GHIDRA_UINT(configEntry[7])) { pbVar6 = *(byte **)pbVar6; } ((std::string *)((char *)cardEntryName))->std::string::assign(pbVar6,configEntry[6]); @@ -149,9 +149,9 @@ LAB_0084ecbb: id = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x14)) = 0; do { - if (((-1 < (int)id) && + if (((-1 < GHIDRA_INT(id)) && (pvVar5 = (g_manager->_itemConfig)._pillEffects._begin, - (int)id < (int)(g_manager->_itemConfig)._pillEffects._end - (int)pvVar5 >> 2)) && + GHIDRA_INT(id) < GHIDRA_INT((g_manager->_itemConfig)._pillEffects._end) - GHIDRA_INT(pvVar5) >> 2)) && (configEntry = *(undefined4 **)((char *)pvVar5 + id * 4), configEntry != (undefined4 *)0x0)) { ((InfoDisplayEntry *)(&pillEntry))->InfoDisplayEntry::InfoDisplayEntry(); local_8 = 2; @@ -159,7 +159,7 @@ LAB_0084ecbb: pbVar6 = (byte *)(configEntry + 2); pillEntry = 2; if (pillEntryName != pbVar6) { - if (0xf < (uint)configEntry[7]) { + if (0xf < GHIDRA_UINT(configEntry[7])) { pbVar6 = *(byte **)pbVar6; } ((std::string *)((char *)pillEntryName))->std::string::assign(pbVar6,configEntry[6]); @@ -192,26 +192,26 @@ LAB_0084ecbb: isCaseSensitive = (byte)pbVar11; g_xmlParseError = (byte *)0x0; if (pbVar6 == (byte *)0x0) { - node = ((xml_node *)(document))->xml_node::first_node((byte *)"collectibles",(int)pvVar5,isCaseSensitive); + node = ((xml_node *)(document))->xml_node::first_node((byte *)"collectibles",GHIDRA_INT(pvVar5),isCaseSensitive); if (node != (void *)0x0) { pvVar5 = pvVar9; load_collectibles_xml(this,node,pvVar9); isCaseSensitive = (byte)pvVar5; pvVar5 = node; } - node = ((xml_node *)(document))->xml_node::first_node((byte *)"trinkets",(int)pvVar5,isCaseSensitive); + node = ((xml_node *)(document))->xml_node::first_node((byte *)"trinkets",GHIDRA_INT(pvVar5),isCaseSensitive); if (node != (void *)0x0) { info_display_xml_parse_trinkets(this,node,pvVar9); isCaseSensitive = (byte)pvVar9; pvVar5 = node; } - pvVar9 = ((xml_node *)(document))->xml_node::first_node((byte *)"pills",(int)pvVar5,isCaseSensitive); + pvVar9 = ((xml_node *)(document))->xml_node::first_node((byte *)"pills",GHIDRA_INT(pvVar5),isCaseSensitive); if (pvVar9 != (void *)0x0) { pvVar5 = (void *)0x84f017; info_display_xml_parse_pills(this,pvVar9); isCaseSensitive = (byte)pvVar9; } - pvVar9 = ((xml_node *)(document))->xml_node::first_node((byte *)"cards",(int)pvVar5,isCaseSensitive); + pvVar9 = ((xml_node *)(document))->xml_node::first_node((byte *)"cards",GHIDRA_INT(pvVar5),isCaseSensitive); if (pvVar9 != (void *)0x0) { this->InfoDisplayConfig::parse_item_node(pvVar9); } @@ -221,13 +221,13 @@ LAB_0084ecbb: allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar3 = *(uint *)(text + -4); qVar2 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar3; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar3; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar2 < uVar3); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < uVar3)); free(text + -4); } local_8 = 6; @@ -267,7 +267,7 @@ void InfoDisplay::add_item_entry(ItemConfig_Item *item, byte isWithDescription) local_8 = 0xffffffff; puStack_c = &LAB_00b0312e; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(trinketDescText + 0x78); + local_14 = __security_cookie ^ GHIDRA_UINT((trinketDescText + 0x78)); ExceptionList = &local_10; if (item != (ItemConfig_Item *)0x0) { itemIdPtr = &item->id; @@ -280,7 +280,7 @@ void InfoDisplay::add_item_entry(ItemConfig_Item *item, byte isWithDescription) if ((isWithDescription != 0) && ((item->desc)._size != 0)) { ((InfoDisplayText *)(trinketDescText))->InfoDisplayText::constructor(); descText = &item->desc; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); if ((std_string *)extraout_ECX != descText) { if (0xf < (item->desc)._capacity) { descText = *(std_string **)descText->_buf; @@ -292,7 +292,7 @@ void InfoDisplay::add_item_entry(ItemConfig_Item *item, byte isWithDescription) } else { ((InfoDisplayEntry *)(trinketTextsEnd))->InfoDisplayEntry::copy_constructor(trinketDescText); - trinketTextsEnd = (void *)((int)trinketTextsEnd + 0x68); + trinketTextsEnd = (void *)(GHIDRA_INT(trinketTextsEnd) + 0x68); } local_8 = local_8 & 0xffffff00; InfoDisplayText::destructor(); @@ -314,7 +314,7 @@ void InfoDisplay::add_item_entry(ItemConfig_Item *item, byte isWithDescription) if ((isWithDescription != 0) && ((item->desc)._size != 0)) { ((InfoDisplayText *)(itemDescText))->InfoDisplayText::constructor(); descText = &item->desc; - local_8 = CONCAT31(local_8._1_3_,3); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); if ((std_string *)extraout_ECX_00 != descText) { if (0xf < (item->desc)._capacity) { descText = *(std_string **)descText->_buf; @@ -326,9 +326,9 @@ void InfoDisplay::add_item_entry(ItemConfig_Item *item, byte isWithDescription) } else { ((InfoDisplayEntry *)(itemTextsEnd))->InfoDisplayEntry::copy_constructor(itemDescText); - itemTextsEnd = (void *)((int)itemTextsEnd + 0x68); + itemTextsEnd = (void *)(GHIDRA_INT(itemTextsEnd) + 0x68); } - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); InfoDisplayText::destructor(); } puVar1 = &itemEntry; @@ -366,7 +366,7 @@ void InfoDisplay::add_card_entry(undefined4 *param_1, char param_2) local_8 = 0xffffffff; puStack_c = &LAB_00b03178; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(local_7c + 0x78); + local_14 = __security_cookie ^ GHIDRA_UINT((local_7c + 0x78)); ExceptionList = &local_10; if (param_1 != (undefined4 *)0x0) { ((InfoDisplayEntry *)(&local_194))->InfoDisplayEntry::InfoDisplayEntry(); @@ -375,7 +375,7 @@ void InfoDisplay::add_card_entry(undefined4 *param_1, char param_2) pbVar1 = (byte *)(param_1 + 2); local_194 = 0; if (local_18c != pbVar1) { - if (0xf < (uint)param_1[7]) { + if (0xf < GHIDRA_UINT(param_1[7])) { pbVar1 = *(byte **)pbVar1; } ((std::string *)((char *)local_18c))->std::string::assign(pbVar1,param_1[6]); @@ -383,9 +383,9 @@ void InfoDisplay::add_card_entry(undefined4 *param_1, char param_2) if ((param_2 != '\0') && (param_1[0xc] != 0)) { ((InfoDisplayText *)(local_7c))->InfoDisplayText::constructor(); pbVar1 = (byte *)(param_1 + 8); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); if (extraout_ECX != pbVar1) { - if (0xf < (uint)param_1[0xd]) { + if (0xf < GHIDRA_UINT(param_1[0xd])) { pbVar1 = *(byte **)pbVar1; } ((std::string *)(local_7c))->std::string::assign(pbVar1,param_1[0xc]); @@ -395,7 +395,7 @@ void InfoDisplay::add_card_entry(undefined4 *param_1, char param_2) } else { ((InfoDisplayEntry *)(local_164))->InfoDisplayEntry::copy_constructor(local_7c); - local_164 = (void *)((int)local_164 + 0x68); + local_164 = (void *)(GHIDRA_INT(local_164) + 0x68); } local_8 = local_8 & 0xffffff00; InfoDisplayText::destructor(); @@ -433,7 +433,7 @@ void InfoDisplay::add_pill_entry(undefined4 *param_1, char param_2) local_8 = 0xffffffff; puStack_c = &LAB_00b03178; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(local_7c + 0x78); + local_14 = __security_cookie ^ GHIDRA_UINT((local_7c + 0x78)); ExceptionList = &local_10; if (param_1 != (undefined4 *)0x0) { ((InfoDisplayEntry *)(&local_194))->InfoDisplayEntry::InfoDisplayEntry(); @@ -442,7 +442,7 @@ void InfoDisplay::add_pill_entry(undefined4 *param_1, char param_2) pbVar1 = (byte *)(param_1 + 2); local_194 = 2; if (local_18c != pbVar1) { - if (0xf < (uint)param_1[7]) { + if (0xf < GHIDRA_UINT(param_1[7])) { pbVar1 = *(byte **)pbVar1; } ((std::string *)((char *)local_18c))->std::string::assign(pbVar1,param_1[6]); @@ -450,9 +450,9 @@ void InfoDisplay::add_pill_entry(undefined4 *param_1, char param_2) if ((param_2 != '\0') && (param_1[0xc] != 0)) { ((InfoDisplayText *)(local_7c))->InfoDisplayText::constructor(); pbVar1 = (byte *)(param_1 + 8); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); if (extraout_ECX != pbVar1) { - if (0xf < (uint)param_1[0xd]) { + if (0xf < GHIDRA_UINT(param_1[0xd])) { pbVar1 = *(byte **)pbVar1; } ((std::string *)(local_7c))->std::string::assign(pbVar1,param_1[0xc]); @@ -462,7 +462,7 @@ void InfoDisplay::add_pill_entry(undefined4 *param_1, char param_2) } else { ((InfoDisplayEntry *)(local_164))->InfoDisplayEntry::copy_constructor(local_7c); - local_164 = (void *)((int)local_164 + 0x68); + local_164 = (void *)(GHIDRA_INT(local_164) + 0x68); } local_8 = local_8 & 0xffffff00; InfoDisplayText::destructor(); @@ -506,7 +506,7 @@ int InfoDisplay::get_trinket(uint param_1) uVar1 = param_1 & 0xffff7fff; param_1 = uVar1; std::set::find_node(local_10,¶m_1); - if (((*(char *)(local_8 + 0xd) == '\0') && (*(int *)(local_8 + 0x10) <= (int)uVar1)) && + if (((*(char *)(local_8 + 0xd) == '\0') && (*(int *)(local_8 + 0x10) <= GHIDRA_INT(uVar1))) && (local_8 != *(int *)(in_ECX + 8))) { return local_8 + 0x14; } @@ -524,7 +524,7 @@ int InfoDisplay::get_pill(uint param_1) uVar1 = param_1 & 0xfffff7ff; param_1 = uVar1; std::set::find_node(local_10,¶m_1); - if (((*(char *)(local_8 + 0xd) == '\0') && (*(int *)(local_8 + 0x10) <= (int)uVar1)) && + if (((*(char *)(local_8 + 0xd) == '\0') && (*(int *)(local_8 + 0x10) <= GHIDRA_INT(uVar1))) && (local_8 != *(int *)(in_ECX + 0x10))) { return local_8 + 0x14; } @@ -604,7 +604,7 @@ void InfoDisplay::describe_pickup_stats(ItemConfig_Item *item, void *outEntry) local_14 = 0xffffffff; puStack_18 = &LAB_00b03290; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(line + 200); + local_24 = __security_cookie ^ GHIDRA_UINT((line + 200)); if (item == (ItemConfig_Item *)0x0) { return; } @@ -618,8 +618,8 @@ void InfoDisplay::describe_pickup_stats(ItemConfig_Item *item, void *outEntry) } puStack_20 = pcVar5; tmpStr = ((ItemConfig_Item *)(item))->ItemConfig_Item::GetLocalizedName((std_string *)&scratchText,0x14); - if ((std_string *)((int)outEntry + 8) != tmpStr) { - ((std::string *)((char *)((int)outEntry + 8)))->std::string::_Tidy_deallocate(); + if ((std_string *)(GHIDRA_INT(outEntry) + 8) != tmpStr) { + ((std::string *)((char *)(GHIDRA_INT(outEntry) + 8)))->std::string::_Tidy_deallocate(); uVar7 = *(undefined4 *)(tmpStr->_buf + 4); uVar3 = *(undefined4 *)(tmpStr->_buf + 8); uVar4 = *(undefined4 *)(tmpStr->_buf + 0xc); @@ -632,13 +632,13 @@ void InfoDisplay::describe_pickup_stats(ItemConfig_Item *item, void *outEntry) tmpStr->_capacity = 0xf; tmpStr->_buf[0] = '\0'; } - if (0xf < local_2c._4_4_) { - uVar10 = local_2c._4_4_ + 1; + if (0xf < (*(undefined4 *)((char *)&(local_2c) + 0x4))) { + uVar10 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 1; pvVar9 = scratchText; if (0xfff < uVar10) { pvVar9 = *(void **)((char *)scratchText + -4); - uVar10 = local_2c._4_4_ + 0x24; - if (0x1f < (uint)((int)scratchText + (-4 - (int)pvVar9))) { + uVar10 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(scratchText) + (-4 - GHIDRA_INT(pvVar9))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -651,18 +651,18 @@ void InfoDisplay::describe_pickup_stats(ItemConfig_Item *item, void *outEntry) local_14 = 0; if (item->addHearts < item->addMaxhearts) { tmpStr = int_to_string((std_string *)countText,value); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; tmpStr = std_string_insert(tmpStr,0,&DAT_00b6d15c,1); scratchText2 = *(void **)tmpStr->_buf; uStack_54 = *(undefined4 *)(tmpStr->_buf + 4); uStack_50 = *(undefined4 *)(tmpStr->_buf + 8); uStack_4c = *(undefined4 *)(tmpStr->_buf + 0xc); - local_48._0_4_ = tmpStr->_size; - local_48._4_4_ = tmpStr->_capacity; + (*(undefined4 *)((char *)&(local_48) + 0x0)) = tmpStr->_size; + (*(undefined4 *)((char *)&(local_48) + 0x4)) = tmpStr->_capacity; tmpStr->_size = 0; tmpStr->_capacity = 0xf; tmpStr->_buf[0] = '\0'; - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; appended = ((std::string *)((char *)&scratchText2))->std::string::append((byte *)" empty red health",0x11); scratchText = (void *)*appended; acStack_38 = (char [4])appended[1]; @@ -673,23 +673,23 @@ void InfoDisplay::describe_pickup_stats(ItemConfig_Item *item, void *outEntry) appended[5] = 0xf; *(undefined1 *)appended = 0; FUN_004215a0((std_string *)&scratchText); - if (0xf < local_2c._4_4_) { - uVar10 = local_2c._4_4_ + 1; + if (0xf < (*(undefined4 *)((char *)&(local_2c) + 0x4))) { + uVar10 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 1; pvVar9 = scratchText; if (0xfff < uVar10) { pvVar9 = *(void **)((char *)scratchText + -4); - uVar10 = local_2c._4_4_ + 0x24; - if (0x1f < (uint)((int)scratchText + (-4 - (int)pvVar9))) goto LAB_0084fa04; + uVar10 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(scratchText) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_0084fa04; } operator_delete(pvVar9,uVar10); } - local_14._0_1_ = 3; - if (0xf < local_48._4_4_) { - uVar10 = local_48._4_4_ + 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; + if (0xf < (*(undefined4 *)((char *)&(local_48) + 0x4))) { + uVar10 = (*(undefined4 *)((char *)&(local_48) + 0x4)) + 1; pvVar9 = scratchText2; if (0xfff < uVar10) { pvVar9 = *(void **)((char *)scratchText2 + -4); - uVar6 = (int)scratchText2 + (-4 - (int)pvVar9); + uVar6 = GHIDRA_INT(scratchText2) + (-4 - GHIDRA_INT(pvVar9)); goto joined_r0x0084fb02; } goto LAB_0084f9b2; @@ -697,18 +697,18 @@ void InfoDisplay::describe_pickup_stats(ItemConfig_Item *item, void *outEntry) } else { tmpStr = int_to_string((std_string *)countText,value); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; tmpStr = std_string_insert(tmpStr,0,&DAT_00b6d15c,1); scratchText2 = *(void **)tmpStr->_buf; uStack_54 = *(undefined4 *)(tmpStr->_buf + 4); uStack_50 = *(undefined4 *)(tmpStr->_buf + 8); uStack_4c = *(undefined4 *)(tmpStr->_buf + 0xc); - local_48._0_4_ = tmpStr->_size; - local_48._4_4_ = tmpStr->_capacity; + (*(undefined4 *)((char *)&(local_48) + 0x0)) = tmpStr->_size; + (*(undefined4 *)((char *)&(local_48) + 0x4)) = tmpStr->_capacity; tmpStr->_size = 0; tmpStr->_capacity = 0xf; tmpStr->_buf[0] = '\0'; - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; appended = ((std::string *)((char *)&scratchText2))->std::string::append((byte *)" health",7); scratchText = (void *)*appended; acStack_38 = (char [4])appended[1]; @@ -719,41 +719,41 @@ void InfoDisplay::describe_pickup_stats(ItemConfig_Item *item, void *outEntry) appended[5] = 0xf; *(undefined1 *)appended = 0; FUN_004215a0((std_string *)&scratchText); - if (0xf < local_2c._4_4_) { - uVar10 = local_2c._4_4_ + 1; + if (0xf < (*(undefined4 *)((char *)&(local_2c) + 0x4))) { + uVar10 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 1; pvVar9 = scratchText; if (0xfff < uVar10) { pvVar9 = *(void **)((char *)scratchText + -4); - uVar10 = local_2c._4_4_ + 0x24; - if (0x1f < (uint)((int)scratchText + (-4 - (int)pvVar9))) goto LAB_0084fa04; + uVar10 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(scratchText) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_0084fa04; } operator_delete(pvVar9,uVar10); } - local_14._0_1_ = 1; - if (0xf < local_48._4_4_) { - uVar10 = local_48._4_4_ + 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; + if (0xf < (*(undefined4 *)((char *)&(local_48) + 0x4))) { + uVar10 = (*(undefined4 *)((char *)&(local_48) + 0x4)) + 1; pvVar9 = scratchText2; if (0xfff < uVar10) { pvVar9 = *(void **)((char *)scratchText2 + -4); - uVar6 = (int)scratchText2 + (-4 - (int)pvVar9); + uVar6 = GHIDRA_INT(scratchText2) + (-4 - GHIDRA_INT(pvVar9)); joined_r0x0084fb02: - uVar10 = local_48._4_4_ + 0x24; + uVar10 = (*(undefined4 *)((char *)&(local_48) + 0x4)) + 0x24; if (0x1f < uVar6) goto LAB_0084fa04; } LAB_0084f9b2: operator_delete(pvVar9,uVar10); } } - local_14._0_1_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; local_48 = 0xf00000000; - scratchText2 = (void *)((uint)scratchText2 & 0xffffff00); + scratchText2 = (void *)(GHIDRA_UINT(scratchText2) & 0xffffff00); if (0xf < countTextCapacity) { uVar10 = countTextCapacity + 1; pvVar9 = countText[0]; if (0xfff < uVar10) { - pvVar9 = *(void **)((int)countText[0] + -4); + pvVar9 = *(void **)(GHIDRA_INT(countText[0]) + -4); uVar10 = countTextCapacity + 0x24; - if (0x1f < (uint)((int)countText[0] + (-4 - (int)pvVar9))) goto LAB_0084fa04; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(countText[0]) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_0084fa04; } operator_delete(pvVar9,uVar10); } @@ -776,45 +776,45 @@ LAB_0084f9b2: ((InfoDisplayText *)(line))->InfoDisplayText::constructor(); local_14 = 6; tmpStr = int_to_string((std_string *)countText,value_00); - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; FUN_00856390(tmpStr); - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; uVar7 = FUN_0060c790(" red heart"); FUN_004215a0(uVar7); - if (0xf < local_2c._4_4_) { - uVar10 = local_2c._4_4_ + 1; + if (0xf < (*(undefined4 *)((char *)&(local_2c) + 0x4))) { + uVar10 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 1; pvVar9 = scratchText; if (0xfff < uVar10) { pvVar9 = *(void **)((char *)scratchText + -4); - uVar10 = local_2c._4_4_ + 0x24; - if (0x1f < (uint)((int)scratchText + (-4 - (int)pvVar9))) goto LAB_0084fa04; + uVar10 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(scratchText) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_0084fa04; } operator_delete(pvVar9,uVar10); } - local_14._0_1_ = 7; - local_2c._0_4_ = 0; - local_2c._4_4_ = 0xf; - scratchText = (void *)((uint)scratchText & 0xffffff00); - if (0xf < local_48._4_4_) { - uVar10 = local_48._4_4_ + 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; + (*(undefined4 *)((char *)&(local_2c) + 0x0)) = 0; + (*(undefined4 *)((char *)&(local_2c) + 0x4)) = 0xf; + scratchText = (void *)(GHIDRA_UINT(scratchText) & 0xffffff00); + if (0xf < (*(undefined4 *)((char *)&(local_48) + 0x4))) { + uVar10 = (*(undefined4 *)((char *)&(local_48) + 0x4)) + 1; pvVar9 = scratchText2; if (0xfff < uVar10) { pvVar9 = *(void **)((char *)scratchText2 + -4); - uVar10 = local_48._4_4_ + 0x24; - if (0x1f < (uint)((int)scratchText2 + (-4 - (int)pvVar9))) goto LAB_0084fa04; + uVar10 = (*(undefined4 *)((char *)&(local_48) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(scratchText2) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_0084fa04; } operator_delete(pvVar9,uVar10); } - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; local_48 = 0xf00000000; - scratchText2 = (void *)((uint)scratchText2 & 0xffffff00); + scratchText2 = (void *)(GHIDRA_UINT(scratchText2) & 0xffffff00); if (0xf < countTextCapacity) { uVar10 = countTextCapacity + 1; pvVar9 = countText[0]; if (0xfff < uVar10) { - pvVar9 = *(void **)((int)countText[0] + -4); + pvVar9 = *(void **)(GHIDRA_INT(countText[0]) + -4); uVar10 = countTextCapacity + 0x24; - if (0x1f < (uint)((int)countText[0] + (-4 - (int)pvVar9))) goto LAB_0084fa04; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(countText[0]) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_0084fa04; } operator_delete(pvVar9,uVar10); } @@ -844,18 +844,18 @@ LAB_0084fd11: ((InfoDisplayText *)(&soulHeartLine))->InfoDisplayText::constructor(); local_14 = 9; tmpStr = int_to_string((std_string *)countText,item->addSoulHearts / 2); - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; tmpStr = std_string_insert(tmpStr,0,&DAT_00b6d15c,1); scratchText = *(void **)tmpStr->_buf; acStack_38 = *(char (*) [4])(tmpStr->_buf + 4); acStack_34 = *(char (*) [4])(tmpStr->_buf + 8); acStack_30 = *(char (*) [4])(tmpStr->_buf + 0xc); - local_2c._0_4_ = tmpStr->_size; - local_2c._4_4_ = tmpStr->_capacity; + (*(undefined4 *)((char *)&(local_2c) + 0x0)) = tmpStr->_size; + (*(undefined4 *)((char *)&(local_2c) + 0x4)) = tmpStr->_capacity; tmpStr->_size = 0; tmpStr->_capacity = 0xf; tmpStr->_buf[0] = '\0'; - local_14._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; appended = ((std::string *)((char *)&scratchText))->std::string::append((byte *)" soul heart",0xb); uStack_50 = *appended; uStack_4c = appended[1]; @@ -868,30 +868,30 @@ LAB_0084fd11: soulHeartLine = uStack_50; uStack_154 = uStack_4c; uStack_150 = (undefined4)local_48; - uStack_14c = local_48._4_4_; - local_14._0_1_ = 10; + uStack_14c = (*(undefined4 *)((char *)&(local_48) + 0x4)); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; local_148 = uVar1; - if (0xf < local_2c._4_4_) { - uVar10 = local_2c._4_4_ + 1; + if (0xf < (*(undefined4 *)((char *)&(local_2c) + 0x4))) { + uVar10 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 1; pvVar9 = scratchText; if (0xfff < uVar10) { pvVar9 = *(void **)((char *)scratchText + -4); - uVar10 = local_2c._4_4_ + 0x24; - if (0x1f < (uint)((int)scratchText + (-4 - (int)pvVar9))) goto LAB_0084fa04; + uVar10 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(scratchText) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_0084fa04; } operator_delete(pvVar9,uVar10); } - local_14._0_1_ = 9; - local_2c._0_4_ = 0; - local_2c._4_4_ = 0xf; - scratchText = (void *)((uint)scratchText & 0xffffff00); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; + (*(undefined4 *)((char *)&(local_2c) + 0x0)) = 0; + (*(undefined4 *)((char *)&(local_2c) + 0x4)) = 0xf; + scratchText = (void *)(GHIDRA_UINT(scratchText) & 0xffffff00); if (0xf < countTextCapacity) { uVar10 = countTextCapacity + 1; pvVar9 = countText[0]; if (0xfff < uVar10) { - pvVar9 = *(void **)((int)countText[0] + -4); + pvVar9 = *(void **)(GHIDRA_INT(countText[0]) + -4); uVar10 = countTextCapacity + 0x24; - if (0x1f < (uint)((int)countText[0] + (-4 - (int)pvVar9))) goto LAB_0084fa04; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(countText[0]) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_0084fa04; } operator_delete(pvVar9,uVar10); } @@ -913,18 +913,18 @@ LAB_0084fd11: ((InfoDisplayText *)(&blackHeartLine))->InfoDisplayText::constructor(); local_14 = 0xc; tmpStr = int_to_string((std_string *)countText,item->addBlackHearts / 2); - local_14._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xd; tmpStr = std_string_insert(tmpStr,0,&DAT_00b6d15c,1); scratchText = *(void **)tmpStr->_buf; acStack_38 = *(char (*) [4])(tmpStr->_buf + 4); acStack_34 = *(char (*) [4])(tmpStr->_buf + 8); acStack_30 = *(char (*) [4])(tmpStr->_buf + 0xc); - local_2c._0_4_ = tmpStr->_size; - local_2c._4_4_ = tmpStr->_capacity; + (*(undefined4 *)((char *)&(local_2c) + 0x0)) = tmpStr->_size; + (*(undefined4 *)((char *)&(local_2c) + 0x4)) = tmpStr->_capacity; tmpStr->_size = 0; tmpStr->_capacity = 0xf; tmpStr->_buf[0] = '\0'; - local_14._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xe; appended = ((std::string *)((char *)&scratchText))->std::string::append((byte *)" black heart",0xc); uStack_50 = *appended; uStack_4c = appended[1]; @@ -937,30 +937,30 @@ LAB_0084fd11: blackHeartLine = uStack_50; uStack_1bc = uStack_4c; uStack_1b8 = (undefined4)local_48; - uStack_1b4 = local_48._4_4_; - local_14._0_1_ = 0xd; + uStack_1b4 = (*(undefined4 *)((char *)&(local_48) + 0x4)); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xd; local_1b0 = uVar1; - if (0xf < local_2c._4_4_) { - uVar10 = local_2c._4_4_ + 1; + if (0xf < (*(undefined4 *)((char *)&(local_2c) + 0x4))) { + uVar10 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 1; pvVar9 = scratchText; if (0xfff < uVar10) { pvVar9 = *(void **)((char *)scratchText + -4); - uVar10 = local_2c._4_4_ + 0x24; - if (0x1f < (uint)((int)scratchText + (-4 - (int)pvVar9))) goto LAB_0084fa04; + uVar10 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(scratchText) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_0084fa04; } operator_delete(pvVar9,uVar10); } - local_14._0_1_ = 0xc; - local_2c._0_4_ = 0; - local_2c._4_4_ = 0xf; - scratchText = (void *)((uint)scratchText & 0xffffff00); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; + (*(undefined4 *)((char *)&(local_2c) + 0x0)) = 0; + (*(undefined4 *)((char *)&(local_2c) + 0x4)) = 0xf; + scratchText = (void *)(GHIDRA_UINT(scratchText) & 0xffffff00); if (0xf < countTextCapacity) { uVar10 = countTextCapacity + 1; pvVar9 = countText[0]; if (0xfff < uVar10) { - pvVar9 = *(void **)((int)countText[0] + -4); + pvVar9 = *(void **)(GHIDRA_INT(countText[0]) + -4); uVar10 = countTextCapacity + 0x24; - if (0x1f < (uint)((int)countText[0] + (-4 - (int)pvVar9))) goto LAB_0084fa04; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(countText[0]) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_0084fa04; } operator_delete(pvVar9,uVar10); } @@ -982,18 +982,18 @@ LAB_0084fd11: ((InfoDisplayText *)(&bombLine))->InfoDisplayText::constructor(); local_14 = 0xf; tmpStr = int_to_string((std_string *)countText,item->addBombs); - local_14._0_1_ = 0x10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x10; tmpStr = std_string_insert(tmpStr,0,&DAT_00b6d15c,1); scratchText = *(void **)tmpStr->_buf; acStack_38 = *(char (*) [4])(tmpStr->_buf + 4); acStack_34 = *(char (*) [4])(tmpStr->_buf + 8); acStack_30 = *(char (*) [4])(tmpStr->_buf + 0xc); - local_2c._0_4_ = tmpStr->_size; - local_2c._4_4_ = tmpStr->_capacity; + (*(undefined4 *)((char *)&(local_2c) + 0x0)) = tmpStr->_size; + (*(undefined4 *)((char *)&(local_2c) + 0x4)) = tmpStr->_capacity; tmpStr->_size = 0; tmpStr->_capacity = 0xf; tmpStr->_buf[0] = '\0'; - local_14._0_1_ = 0x11; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x11; appended = ((std::string *)((char *)&scratchText))->std::string::append((byte *)" bomb",5); uStack_50 = *appended; uStack_4c = appended[1]; @@ -1006,30 +1006,30 @@ LAB_0084fd11: bombLine = uStack_50; uStack_224 = uStack_4c; uStack_220 = (undefined4)local_48; - uStack_21c = local_48._4_4_; - local_14._0_1_ = 0x10; + uStack_21c = (*(undefined4 *)((char *)&(local_48) + 0x4)); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x10; local_218 = uVar1; - if (0xf < local_2c._4_4_) { - uVar10 = local_2c._4_4_ + 1; + if (0xf < (*(undefined4 *)((char *)&(local_2c) + 0x4))) { + uVar10 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 1; pvVar9 = scratchText; if (0xfff < uVar10) { pvVar9 = *(void **)((char *)scratchText + -4); - uVar10 = local_2c._4_4_ + 0x24; - if (0x1f < (uint)((int)scratchText + (-4 - (int)pvVar9))) goto LAB_0084fa04; + uVar10 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(scratchText) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_0084fa04; } operator_delete(pvVar9,uVar10); } - local_14._0_1_ = 0xf; - local_2c._0_4_ = 0; - local_2c._4_4_ = 0xf; - scratchText = (void *)((uint)scratchText & 0xffffff00); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xf; + (*(undefined4 *)((char *)&(local_2c) + 0x0)) = 0; + (*(undefined4 *)((char *)&(local_2c) + 0x4)) = 0xf; + scratchText = (void *)(GHIDRA_UINT(scratchText) & 0xffffff00); if (0xf < countTextCapacity) { uVar10 = countTextCapacity + 1; pvVar9 = countText[0]; if (0xfff < uVar10) { - pvVar9 = *(void **)((int)countText[0] + -4); + pvVar9 = *(void **)(GHIDRA_INT(countText[0]) + -4); uVar10 = countTextCapacity + 0x24; - if (0x1f < (uint)((int)countText[0] + (-4 - (int)pvVar9))) goto LAB_0084fa04; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(countText[0]) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_0084fa04; } operator_delete(pvVar9,uVar10); } @@ -1051,18 +1051,18 @@ LAB_0084fd11: ((InfoDisplayText *)(line))->InfoDisplayText::constructor(); local_14 = 0x12; tmpStr = int_to_string((std_string *)countText,item->addKeys); - local_14._0_1_ = 0x13; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x13; tmpStr = std_string_insert(tmpStr,0,&DAT_00b6d15c,1); scratchText = *(void **)tmpStr->_buf; acStack_38 = *(char (*) [4])(tmpStr->_buf + 4); acStack_34 = *(char (*) [4])(tmpStr->_buf + 8); acStack_30 = *(char (*) [4])(tmpStr->_buf + 0xc); - local_2c._0_4_ = tmpStr->_size; - local_2c._4_4_ = tmpStr->_capacity; + (*(undefined4 *)((char *)&(local_2c) + 0x0)) = tmpStr->_size; + (*(undefined4 *)((char *)&(local_2c) + 0x4)) = tmpStr->_capacity; tmpStr->_size = 0; tmpStr->_capacity = 0xf; tmpStr->_buf[0] = '\0'; - local_14._0_1_ = 0x14; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x14; appended = ((std::string *)((char *)&scratchText))->std::string::append(&DAT_00b6e3ac,4); scratchText2 = (void *)*appended; uStack_54 = appended[1]; @@ -1073,24 +1073,24 @@ LAB_0084fd11: appended[5] = 0xf; *(undefined1 *)appended = 0; FUN_004215a0(&scratchText2); - if (0xf < local_48._4_4_) { - uVar10 = local_48._4_4_ + 1; + if (0xf < (*(undefined4 *)((char *)&(local_48) + 0x4))) { + uVar10 = (*(undefined4 *)((char *)&(local_48) + 0x4)) + 1; pvVar9 = scratchText2; if (0xfff < uVar10) { pvVar9 = *(void **)((char *)scratchText2 + -4); - uVar10 = local_48._4_4_ + 0x24; - if (0x1f < (uint)((int)scratchText2 + (-4 - (int)pvVar9))) goto LAB_0084fa04; + uVar10 = (*(undefined4 *)((char *)&(local_48) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(scratchText2) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_0084fa04; } operator_delete(pvVar9,uVar10); } - local_14._0_1_ = 0x13; - if (0xf < local_2c._4_4_) { - uVar10 = local_2c._4_4_ + 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x13; + if (0xf < (*(undefined4 *)((char *)&(local_2c) + 0x4))) { + uVar10 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 1; pvVar9 = scratchText; if (0xfff < uVar10) { pvVar9 = *(void **)((char *)scratchText + -4); - uVar10 = local_2c._4_4_ + 0x24; - if (0x1f < (uint)((int)scratchText + (-4 - (int)pvVar9))) { + uVar10 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(scratchText) + (-4 - GHIDRA_INT(pvVar9))))) { LAB_0084fa04: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1098,10 +1098,10 @@ LAB_0084fa04: } operator_delete(pvVar9,uVar10); } - local_2c._0_4_ = 0; - local_2c._4_4_ = 0xf; - scratchText = (void *)((uint)scratchText & 0xffffff00); - local_14 = CONCAT31(local_14._1_3_,0x12); + (*(undefined4 *)((char *)&(local_2c) + 0x0)) = 0; + (*(undefined4 *)((char *)&(local_2c) + 0x4)) = 0xf; + scratchText = (void *)(GHIDRA_UINT(scratchText) & 0xffffff00); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x12); ((std::string *)((char *)countText))->std::string::_Tidy_deallocate(); if (1 < item->addKeys) { ((std::string *)(line))->std::string::append(&DAT_00b6614c,1); @@ -1121,14 +1121,14 @@ LAB_0084fa04: ((InfoDisplayText *)(line))->InfoDisplayText::constructor(); local_14 = 0x15; tmpStr = int_to_string(&coinCountText,item->addCoins); - local_14._0_1_ = 0x16; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x16; FUN_00856390(tmpStr); - local_14._0_1_ = 0x17; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x17; uVar7 = FUN_0060c790(" coin"); FUN_004215a0(uVar7); ((std::string *)((char *)countText))->std::string::_Tidy_deallocate(); ((std::string *)((char *)&scratchText2))->std::string::_Tidy_deallocate(); - local_14 = CONCAT31(local_14._1_3_,0x15); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x15); ((std::string *)(coinCountText._buf))->std::string::_Tidy_deallocate(); if (1 < item->addCoins) { ((std::string *)(line))->std::string::append(&DAT_00b6614c,1); @@ -1237,11 +1237,11 @@ void InfoDisplay::load_collectibles_xml(void *collectiblesNode, void *idMap) Game *game; Manager *manager; - local_8._0_1_ = 0xff; - local_8._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0xffffff; puStack_c = &LAB_00b0334d; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(attrValue + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((attrValue + 10)); ExceptionList = &local_10; local_210 = this; collectibleNode = @@ -1268,9 +1268,9 @@ void InfoDisplay::load_collectibles_xml(void *collectiblesNode, void *idMap) pbVar3 = (byte *)puVar15[2]; } if (pbVar3 == pbVar9 + -0xb1bfef) { - pbVar3 = pbVar3 + (int)pbVar13; + pbVar3 = pbVar3 + GHIDRA_INT(pbVar13); if (pbVar3 <= pbVar13) goto LAB_0085052e; - iVar11 = (int)s_id - (int)pbVar13; + iVar11 = GHIDRA_INT(s_id) - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar11]) { pbVar13 = pbVar13 + 1; if (pbVar3 <= pbVar13) goto LAB_0085052e; @@ -1292,8 +1292,8 @@ LAB_0085058d: local_8 = (void *)0x0; pvVar6 = (void *)std::map::operator_subscript(&collectibleId); ((InfoDisplayEntry *)(pvVar6))->InfoDisplayEntry::operator_assign(pvVar5); - local_8._0_1_ = 0xff; - local_8._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0xffffff; std::vector::_Tidy(); std::vector::_Tidy(); std::vector::_Tidy(); @@ -1305,15 +1305,15 @@ LAB_0085058d: *collectibleInfo = 0; collectibleInfo[1] = collectibleId; if (game == (Game *)0x0) { - if (-1 < (int)collectibleId) goto LAB_00850660; + if (-1 < GHIDRA_INT(collectibleId)) goto LAB_00850660; } else { - if ((int)collectibleId < 0) { - if (((int)collectibleId < 0) && + if (GHIDRA_INT(collectibleId) < 0) { + if ((GHIDRA_INT(collectibleId) < 0) && (pvVar5 = (game->_proceduralItemManager)._proceduralItems._begin, - (int)~(uint)collectibleId < - (int)(game->_proceduralItemManager)._proceduralItems._end - (int)pvVar5 >> 2)) { - item = (ItemConfig_Item *)**(undefined4 **)((char *)pvVar5 + ~(uint)collectibleId * 4); + GHIDRA_INT(~GHIDRA_UINT(collectibleId)) < + GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar5) >> 2)) { + item = (ItemConfig_Item *)**(undefined4 **)((char *)pvVar5 + ~GHIDRA_UINT(collectibleId) * 4); } else { item = (ItemConfig_Item *)0x0; @@ -1322,9 +1322,9 @@ LAB_0085058d: else { LAB_00850660: pvVar5 = (manager->_itemConfig)._collectibles._begin; - if ((int)(manager->_itemConfig)._collectibles._end - (int)pvVar5 >> 2 <= - (int)collectibleId) goto LAB_00851abd; - item = *(ItemConfig_Item **)((char *)pvVar5 + (int)collectibleId * 4); + if (GHIDRA_INT((manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar5) >> 2 <= + GHIDRA_INT(collectibleId)) goto LAB_00851abd; + item = *(ItemConfig_Item **)((char *)pvVar5 + GHIDRA_INT(collectibleId) * 4); } if (item != (ItemConfig_Item *)0x0) { describe_pickup_stats(item,collectibleInfo); @@ -1344,9 +1344,9 @@ LAB_00850660: pcVar14 = (char *)infoNode[2]; } if (pcVar14 == pcVar8 + -0xb6d1e3) { - pbVar9 = (byte *)(pcVar14 + (int)pbVar13); + pbVar9 = (byte *)(pcVar14 + GHIDRA_INT(pbVar13)); if (pbVar9 <= pbVar13) goto joined_r0x00850705; - iVar11 = (int)&DAT_00b6d1e4 - (int)pbVar13; + iVar11 = GHIDRA_INT(&DAT_00b6d1e4) - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar11]) { pbVar13 = pbVar13 + 1; if (pbVar9 <= pbVar13) goto joined_r0x00850705; @@ -1379,8 +1379,8 @@ joined_r0x00850705: notTrinketIdsCapacity = (undefined4 *)0x0; achievementId = 0; tagId = 0; - local_8._0_1_ = 1; - local_8._1_3_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0; pcVar14 = "text"; do { pcVar8 = pcVar14; @@ -1397,9 +1397,9 @@ joined_r0x00850705: pcVar14 = (char *)puVar15[2]; } if (pcVar14 == pcVar8 + -0xb6e37b) { - pbVar9 = (byte *)(pcVar14 + (int)pbVar13); + pbVar9 = (byte *)(pcVar14 + GHIDRA_INT(pbVar13)); if (pbVar9 <= pbVar13) goto LAB_008507a7; - iVar11 = (int)&DAT_00b6e37c - (int)pbVar13; + iVar11 = GHIDRA_INT(&DAT_00b6e37c) - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar11]) { pbVar13 = pbVar13 + 1; if (pbVar9 <= pbVar13) goto LAB_008507a7; @@ -1417,7 +1417,7 @@ LAB_008507a7: bVar1 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar1 != 0); - ((std::string *)((char *)infoEntry))->std::string::assign(pbVar13,(int)pbVar9 - (int)(pbVar13 + 1)); + ((std::string *)((char *)infoEntry))->std::string::assign(pbVar13,GHIDRA_INT(pbVar9) - GHIDRA_INT((pbVar13 + 1))); pcVar14 = "player"; do { pcVar8 = pcVar14; @@ -1436,9 +1436,9 @@ LAB_00850803: pcVar14 = (char *)piVar4[2]; } if (pcVar14 != pcVar8 + -0xb66eeb) break; - pbVar9 = pbVar13 + (int)pcVar14; + pbVar9 = pbVar13 + GHIDRA_INT(pcVar14); if (pbVar13 < pbVar9) { - iVar11 = (int)"player" - (int)pbVar13; + iVar11 = GHIDRA_INT("player") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar11]) { pbVar13 = pbVar13 + 1; if (pbVar9 <= pbVar13) goto LAB_00850833; @@ -1449,7 +1449,7 @@ LAB_00850833: playerTokens = (int *)0x0; playerTokensEnd = (int *)0x0; playerTokensCapacity = 0; - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; pcVar14 = "player"; do { pcVar8 = pcVar14; @@ -1481,31 +1481,31 @@ LAB_008508cd: bVar1 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar1 != 0); - ((std::string *)((char *)attrValue))->std::string::assign(pbVar13,(int)pbVar9 - (int)(pbVar13 + 1)); - local_8._0_1_ = 3; + ((std::string *)((char *)attrValue))->std::string::assign(pbVar13,GHIDRA_INT(pbVar9) - GHIDRA_INT((pbVar13 + 1))); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; string_split(attrValue, - (std_string *)CONCAT31((int3)((uint)extraout_EDX >> 8),0x2c), + (std_string *)CONCAT31((int3)(GHIDRA_UINT(extraout_EDX) >> 8),0x2c), (byte)&playerTokens); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; if (0xf < attrValueCapacity) { uVar12 = attrValueCapacity + 1; pvVar5 = attrValue[0]; if (0xfff < uVar12) { - pvVar5 = *(void **)((int)attrValue[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(attrValue[0]) + -4); uVar12 = attrValueCapacity + 0x24; - if (0x1f < (uint)((int)attrValue[0] + (-4 - (int)pvVar5))) goto LAB_00851b02; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(attrValue[0]) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_00851b02; } operator_delete(pvVar5,uVar12); } uVar12 = 0; local_1bc = playerTokens; - tokenCount = ((int)playerTokensEnd - (int)playerTokens) / 0x18; + tokenCount = (GHIDRA_INT(playerTokensEnd) - GHIDRA_INT(playerTokens)) / 0x18; piVar4 = playerTokens; if (tokenCount != 0) { do { puVar15 = playerIdsEnd; piVar7 = piVar4; - if (0xf < (uint)piVar4[5]) { + if (0xf < GHIDRA_UINT(piVar4[5])) { piVar7 = (int *)*piVar4; } local_1b0 = (int *)atoi((char *)piVar7); @@ -1522,7 +1522,7 @@ LAB_008508cd: } piVar2 = local_1bc; piVar7 = playerTokensEnd; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; piVar4 = local_1bc; if (local_1bc != (int *)0x0) { for (; piVar4 != piVar7; piVar4 = piVar4 + 6) { @@ -1534,7 +1534,7 @@ LAB_008508cd: if (0xfff < uVar10) { pvVar6 = *(void **)((char *)pvVar5 + -4); uVar10 = uVar12 + 0x24; - if (0x1f < (uint)((int)pvVar5 + (-4 - (int)pvVar6))) goto LAB_00851b02; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar5) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_00851b02; } operator_delete(pvVar6,uVar10); } @@ -1542,12 +1542,12 @@ LAB_008508cd: piVar4[5] = 0xf; *(undefined1 *)piVar4 = 0; } - uVar12 = ((playerTokensCapacity - (int)piVar2) / 0x18) * 0x18; + uVar12 = ((playerTokensCapacity - GHIDRA_INT(piVar2)) / 0x18) * 0x18; piVar4 = piVar2; if (0xfff < uVar12) { piVar4 = (int *)piVar2[-1]; uVar12 = uVar12 + 0x23; - if ((undefined1 *)0x1f < (undefined1 *)((int)piVar2 + (-4 - (int)piVar4))) + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(piVar2) + (-4 - GHIDRA_INT(piVar4)))) goto LAB_00851b02; } operator_delete(piVar4,uVar12); @@ -1558,9 +1558,9 @@ LAB_008508cd: goto LAB_00850aac; } } - pbVar9 = (byte *)(pcVar14 + (int)pbVar13); + pbVar9 = (byte *)(pcVar14 + GHIDRA_INT(pbVar13)); if (pbVar13 < pbVar9) { - iVar11 = (int)"player" - (int)pbVar13; + iVar11 = GHIDRA_INT("player") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar11]) { pbVar13 = pbVar13 + 1; if (pbVar9 <= pbVar13) goto LAB_008508cd; @@ -1588,9 +1588,9 @@ LAB_00850ad0: pcVar14 = (char *)piVar4[2]; } if (pcVar14 != pcVar8 + -0xb6e383) goto LAB_00850b4b; - pbVar9 = (byte *)(pcVar14 + (int)pbVar13); + pbVar9 = (byte *)(pcVar14 + GHIDRA_INT(pbVar13)); if (pbVar13 < pbVar9) { - iVar11 = (int)"notplayer" - (int)pbVar13; + iVar11 = GHIDRA_INT("notplayer") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar11]) { pbVar13 = pbVar13 + 1; if (pbVar9 <= pbVar13) goto LAB_00850b00; @@ -1601,7 +1601,7 @@ LAB_00850b00: notPlayerTokens = (int *)0x0; notPlayerTokensEnd = (int *)0x0; notPlayerTokensCapacity = 0; - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; pcVar14 = "notplayer"; do { pcVar8 = pcVar14; @@ -1633,31 +1633,31 @@ LAB_00850b9b: bVar1 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar1 != 0); - ((std::string *)((char *)attrValue))->std::string::assign(pbVar13,(int)pbVar9 - (int)(pbVar13 + 1)); - local_8._0_1_ = 5; + ((std::string *)((char *)attrValue))->std::string::assign(pbVar13,GHIDRA_INT(pbVar9) - GHIDRA_INT((pbVar13 + 1))); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; string_split(attrValue, - (std_string *)CONCAT31((int3)((uint)extraout_EDX_00 >> 8),0x2c), + (std_string *)CONCAT31((int3)(GHIDRA_UINT(extraout_EDX_00) >> 8),0x2c), (byte)¬PlayerTokens); - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; if (0xf < attrValueCapacity) { uVar12 = attrValueCapacity + 1; pvVar5 = attrValue[0]; if (0xfff < uVar12) { - pvVar5 = *(void **)((int)attrValue[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(attrValue[0]) + -4); uVar12 = attrValueCapacity + 0x24; - if (0x1f < (uint)((int)attrValue[0] + (-4 - (int)pvVar5))) goto LAB_00851b02; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(attrValue[0]) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_00851b02; } operator_delete(pvVar5,uVar12); } uVar12 = 0; local_1b0 = notPlayerTokens; - tokenCount = ((int)notPlayerTokensEnd - (int)notPlayerTokens) / 0x18; + tokenCount = (GHIDRA_INT(notPlayerTokensEnd) - GHIDRA_INT(notPlayerTokens)) / 0x18; piVar4 = notPlayerTokens; if (tokenCount != 0) { do { puVar15 = notPlayerIdsEnd; piVar7 = piVar4; - if (0xf < (uint)piVar4[5]) { + if (0xf < GHIDRA_UINT(piVar4[5])) { piVar7 = (int *)*piVar4; } local_1bc = (int *)atoi((char *)piVar7); @@ -1674,7 +1674,7 @@ LAB_00850b9b: } piVar2 = local_1b0; piVar7 = notPlayerTokensEnd; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; piVar4 = local_1b0; if (local_1b0 != (int *)0x0) { for (; piVar4 != piVar7; piVar4 = piVar4 + 6) { @@ -1686,7 +1686,7 @@ LAB_00850b9b: if (0xfff < uVar10) { pvVar6 = *(void **)((char *)pvVar5 + -4); uVar10 = uVar12 + 0x24; - if (0x1f < (uint)((int)pvVar5 + (-4 - (int)pvVar6))) goto LAB_00851b02; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar5) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_00851b02; } operator_delete(pvVar6,uVar10); } @@ -1694,12 +1694,12 @@ LAB_00850b9b: piVar4[5] = 0xf; *(undefined1 *)piVar4 = 0; } - uVar12 = ((notPlayerTokensCapacity - (int)piVar2) / 0x18) * 0x18; + uVar12 = ((notPlayerTokensCapacity - GHIDRA_INT(piVar2)) / 0x18) * 0x18; piVar4 = piVar2; if (0xfff < uVar12) { piVar4 = (int *)piVar2[-1]; uVar12 = uVar12 + 0x23; - if ((undefined1 *)0x1f < (undefined1 *)((int)piVar2 + (-4 - (int)piVar4))) + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(piVar2) + (-4 - GHIDRA_INT(piVar4)))) goto LAB_00851b02; } operator_delete(piVar4,uVar12); @@ -1710,9 +1710,9 @@ LAB_00850b9b: goto LAB_00850d7c; } } - pbVar9 = (byte *)(pcVar14 + (int)pbVar13); + pbVar9 = (byte *)(pcVar14 + GHIDRA_INT(pbVar13)); if (pbVar13 < pbVar9) { - iVar11 = (int)"notplayer" - (int)pbVar13; + iVar11 = GHIDRA_INT("notplayer") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar11]) { pbVar13 = pbVar13 + 1; if (pbVar9 <= pbVar13) goto LAB_00850b9b; @@ -1740,9 +1740,9 @@ LAB_00850da0: pcVar14 = (char *)piVar4[2]; } if (pcVar14 != pcVar8 + -0xb6e397) goto LAB_00850e1b; - pbVar9 = (byte *)(pcVar14 + (int)pbVar13); + pbVar9 = (byte *)(pcVar14 + GHIDRA_INT(pbVar13)); if (pbVar13 < pbVar9) { - iVar11 = (int)"collectible" - (int)pbVar13; + iVar11 = GHIDRA_INT("collectible") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar11]) { pbVar13 = pbVar13 + 1; if (pbVar9 <= pbVar13) goto LAB_00850dd0; @@ -1753,7 +1753,7 @@ LAB_00850dd0: collectibleTokens = (int *)0x0; collectibleTokensEnd = (int *)0x0; collectibleTokensCapacity = 0; - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; pcVar14 = "collectible"; do { pcVar8 = pcVar14; @@ -1785,30 +1785,30 @@ LAB_00850e6b: bVar1 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar1 != 0); - ((std::string *)((char *)attrValue))->std::string::assign(pbVar13,(int)pbVar9 - (int)(pbVar13 + 1)); - local_8._0_1_ = 7; + ((std::string *)((char *)attrValue))->std::string::assign(pbVar13,GHIDRA_INT(pbVar9) - GHIDRA_INT((pbVar13 + 1))); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; string_split(attrValue, - (std_string *)CONCAT31((int3)((uint)extraout_EDX_01 >> 8),0x2c),0); - local_8._0_1_ = 6; + (std_string *)CONCAT31((int3)(GHIDRA_UINT(extraout_EDX_01) >> 8),0x2c),0); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; if (0xf < attrValueCapacity) { uVar12 = attrValueCapacity + 1; pvVar5 = attrValue[0]; if (0xfff < uVar12) { - pvVar5 = *(void **)((int)attrValue[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(attrValue[0]) + -4); uVar12 = attrValueCapacity + 0x24; - if (0x1f < (uint)((int)attrValue[0] + (-4 - (int)pvVar5))) goto LAB_00851b02; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(attrValue[0]) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_00851b02; } operator_delete(pvVar5,uVar12); } uVar12 = 0; local_1b0 = collectibleTokens; - tokenCount = ((int)collectibleTokensEnd - (int)collectibleTokens) / 0x18; + tokenCount = (GHIDRA_INT(collectibleTokensEnd) - GHIDRA_INT(collectibleTokens)) / 0x18; piVar4 = collectibleTokens; if (tokenCount != 0) { do { puVar15 = collectibleIdsEnd; piVar7 = piVar4; - if (0xf < (uint)piVar4[5]) { + if (0xf < GHIDRA_UINT(piVar4[5])) { piVar7 = (int *)*piVar4; } local_1bc = (int *)atoi((char *)piVar7); @@ -1825,7 +1825,7 @@ LAB_00850e6b: } piVar2 = local_1b0; piVar7 = collectibleTokensEnd; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; piVar4 = local_1b0; if (local_1b0 != (int *)0x0) { for (; piVar4 != piVar7; piVar4 = piVar4 + 6) { @@ -1837,7 +1837,7 @@ LAB_00850e6b: if (0xfff < uVar10) { pvVar6 = *(void **)((char *)pvVar5 + -4); uVar10 = uVar12 + 0x24; - if (0x1f < (uint)((int)pvVar5 + (-4 - (int)pvVar6))) goto LAB_00851b02; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar5) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_00851b02; } operator_delete(pvVar6,uVar10); } @@ -1845,12 +1845,12 @@ LAB_00850e6b: piVar4[5] = 0xf; *(undefined1 *)piVar4 = 0; } - uVar12 = ((collectibleTokensCapacity - (int)piVar2) / 0x18) * 0x18; + uVar12 = ((collectibleTokensCapacity - GHIDRA_INT(piVar2)) / 0x18) * 0x18; piVar4 = piVar2; if (0xfff < uVar12) { piVar4 = (int *)piVar2[-1]; uVar12 = uVar12 + 0x23; - if ((undefined1 *)0x1f < (undefined1 *)((int)piVar2 + (-4 - (int)piVar4))) + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(piVar2) + (-4 - GHIDRA_INT(piVar4)))) goto LAB_00851b02; } operator_delete(piVar4,uVar12); @@ -1861,9 +1861,9 @@ LAB_00850e6b: goto LAB_0085104c; } } - pbVar9 = (byte *)(pcVar14 + (int)pbVar13); + pbVar9 = (byte *)(pcVar14 + GHIDRA_INT(pbVar13)); if (pbVar13 < pbVar9) { - iVar11 = (int)"collectible" - (int)pbVar13; + iVar11 = GHIDRA_INT("collectible") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar11]) { pbVar13 = pbVar13 + 1; if (pbVar9 <= pbVar13) goto LAB_00850e6b; @@ -1891,9 +1891,9 @@ LAB_00851070: pcVar14 = (char *)piVar4[2]; } if (pcVar14 != pcVar8 + -0xb6e35f) goto LAB_008510eb; - pbVar9 = (byte *)(pcVar14 + (int)pbVar13); + pbVar9 = (byte *)(pcVar14 + GHIDRA_INT(pbVar13)); if (pbVar13 < pbVar9) { - iVar11 = (int)"notcollectible" - (int)pbVar13; + iVar11 = GHIDRA_INT("notcollectible") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar11]) { pbVar13 = pbVar13 + 1; if (pbVar9 <= pbVar13) goto LAB_008510a0; @@ -1904,7 +1904,7 @@ LAB_008510a0: notCollectibleTokens = (int *)0x0; notCollectibleTokensEnd = (int *)0x0; notCollectibleTokensCapacity = 0; - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; pcVar14 = "notcollectible"; do { pcVar8 = pcVar14; @@ -1936,31 +1936,31 @@ LAB_0085113b: bVar1 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar1 != 0); - ((std::string *)((char *)attrValue))->std::string::assign(pbVar13,(int)pbVar9 - (int)(pbVar13 + 1)); - local_8._0_1_ = 9; + ((std::string *)((char *)attrValue))->std::string::assign(pbVar13,GHIDRA_INT(pbVar9) - GHIDRA_INT((pbVar13 + 1))); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; string_split(attrValue, - (std_string *)CONCAT31((int3)((uint)extraout_EDX_02 >> 8),0x2c), + (std_string *)CONCAT31((int3)(GHIDRA_UINT(extraout_EDX_02) >> 8),0x2c), (byte)¬CollectibleTokens); - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; if (0xf < attrValueCapacity) { uVar12 = attrValueCapacity + 1; pvVar5 = attrValue[0]; if (0xfff < uVar12) { - pvVar5 = *(void **)((int)attrValue[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(attrValue[0]) + -4); uVar12 = attrValueCapacity + 0x24; - if (0x1f < (uint)((int)attrValue[0] + (-4 - (int)pvVar5))) goto LAB_00851b02; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(attrValue[0]) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_00851b02; } operator_delete(pvVar5,uVar12); } uVar12 = 0; local_1b0 = notCollectibleTokens; - tokenCount = ((int)notCollectibleTokensEnd - (int)notCollectibleTokens) / 0x18; + tokenCount = (GHIDRA_INT(notCollectibleTokensEnd) - GHIDRA_INT(notCollectibleTokens)) / 0x18; piVar4 = notCollectibleTokens; if (tokenCount != 0) { do { puVar15 = notCollectibleIdsEnd; piVar7 = piVar4; - if (0xf < (uint)piVar4[5]) { + if (0xf < GHIDRA_UINT(piVar4[5])) { piVar7 = (int *)*piVar4; } local_1bc = (int *)atoi((char *)piVar7); @@ -1977,7 +1977,7 @@ LAB_0085113b: } piVar2 = local_1b0; piVar7 = notCollectibleTokensEnd; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; piVar4 = local_1b0; if (local_1b0 != (int *)0x0) { for (; piVar4 != piVar7; piVar4 = piVar4 + 6) { @@ -1989,7 +1989,7 @@ LAB_0085113b: if (0xfff < uVar10) { pvVar6 = *(void **)((char *)pvVar5 + -4); uVar10 = uVar12 + 0x24; - if (0x1f < (uint)((int)pvVar5 + (-4 - (int)pvVar6))) goto LAB_00851b02; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar5) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_00851b02; } operator_delete(pvVar6,uVar10); } @@ -1997,12 +1997,12 @@ LAB_0085113b: piVar4[5] = 0xf; *(undefined1 *)piVar4 = 0; } - uVar12 = ((notCollectibleTokensCapacity - (int)piVar2) / 0x18) * 0x18; + uVar12 = ((notCollectibleTokensCapacity - GHIDRA_INT(piVar2)) / 0x18) * 0x18; piVar4 = piVar2; if (0xfff < uVar12) { piVar4 = (int *)piVar2[-1]; uVar12 = uVar12 + 0x23; - if ((undefined1 *)0x1f < (undefined1 *)((int)piVar2 + (-4 - (int)piVar4))) + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(piVar2) + (-4 - GHIDRA_INT(piVar4)))) goto LAB_00851b02; } operator_delete(piVar4,uVar12); @@ -2013,9 +2013,9 @@ LAB_0085113b: goto LAB_0085131c; } } - pbVar9 = (byte *)(pcVar14 + (int)pbVar13); + pbVar9 = (byte *)(pcVar14 + GHIDRA_INT(pbVar13)); if (pbVar13 < pbVar9) { - iVar11 = (int)"notcollectible" - (int)pbVar13; + iVar11 = GHIDRA_INT("notcollectible") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar11]) { pbVar13 = pbVar13 + 1; if (pbVar9 <= pbVar13) goto LAB_0085113b; @@ -2043,9 +2043,9 @@ LAB_00851340: pcVar14 = (char *)piVar4[2]; } if (pcVar14 != pcVar8 + -0xb66fcf) goto LAB_008513bb; - pbVar9 = (byte *)(pcVar14 + (int)pbVar13); + pbVar9 = (byte *)(pcVar14 + GHIDRA_INT(pbVar13)); if (pbVar13 < pbVar9) { - iVar11 = (int)"trinket" - (int)pbVar13; + iVar11 = GHIDRA_INT("trinket") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar11]) { pbVar13 = pbVar13 + 1; if (pbVar9 <= pbVar13) goto LAB_00851370; @@ -2056,7 +2056,7 @@ LAB_00851370: trinketTokens = (char *)0x0; trinketTokensEnd = (char *)0x0; trinketTokensCapacity = 0; - local_8._0_1_ = 10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 10; pcVar14 = "trinket"; do { pcVar8 = pcVar14; @@ -2088,24 +2088,24 @@ LAB_0085140b: bVar1 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar1 != 0); - ((std::string *)((char *)attrValue))->std::string::assign(pbVar13,(int)pbVar9 - (int)(pbVar13 + 1)); - local_8._0_1_ = 0xb; + ((std::string *)((char *)attrValue))->std::string::assign(pbVar13,GHIDRA_INT(pbVar9) - GHIDRA_INT((pbVar13 + 1))); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; string_split(attrValue, - (std_string *)CONCAT31((int3)((uint)extraout_EDX_03 >> 8),0x2c), + (std_string *)CONCAT31((int3)(GHIDRA_UINT(extraout_EDX_03) >> 8),0x2c), (byte)&trinketTokens); - local_8._0_1_ = 10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 10; if (0xf < attrValueCapacity) { uVar12 = attrValueCapacity + 1; pvVar5 = attrValue[0]; if (0xfff < uVar12) { - pvVar5 = *(void **)((int)attrValue[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(attrValue[0]) + -4); uVar12 = attrValueCapacity + 0x24; - if (0x1f < (uint)((int)attrValue[0] + (-4 - (int)pvVar5))) goto LAB_00851b02; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(attrValue[0]) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_00851b02; } operator_delete(pvVar5,uVar12); } uVar12 = 0; - tokenCount = ((int)trinketTokensEnd - (int)trinketTokens) / 0x18; + tokenCount = (GHIDRA_INT(trinketTokensEnd) - GHIDRA_INT(trinketTokens)) / 0x18; if (tokenCount != 0) { pcVar14 = trinketTokens; do { @@ -2127,13 +2127,13 @@ LAB_0085140b: } while (uVar12 < tokenCount); } pcVar8 = trinketTokensEnd; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; pcVar14 = trinketTokens; if (trinketTokens != (char *)0x0) { for (; pcVar14 != pcVar8; pcVar14 = pcVar14 + 0x18) { ((std::string *)(pcVar14))->std::string::_Tidy_deallocate(); } - deallocate(trinketTokens,(trinketTokensCapacity - (int)trinketTokens) / 0x18); + deallocate(trinketTokens,(trinketTokensCapacity - GHIDRA_INT(trinketTokens)) / 0x18); trinketTokens = (char *)0x0; trinketTokensEnd = (char *)0x0; trinketTokensCapacity = 0; @@ -2141,9 +2141,9 @@ LAB_0085140b: goto LAB_00851588; } } - pbVar9 = pbVar13 + (int)pcVar14; + pbVar9 = pbVar13 + GHIDRA_INT(pcVar14); if (pbVar13 < pbVar9) { - iVar11 = (int)"trinket" - (int)pbVar13; + iVar11 = GHIDRA_INT("trinket") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar11]) { pbVar13 = pbVar13 + 1; if (pbVar9 <= pbVar13) goto LAB_0085140b; @@ -2171,9 +2171,9 @@ LAB_008515b0: pcVar14 = (char *)piVar4[2]; } if (pcVar14 != pcVar8 + -0xb6e36f) goto LAB_0085162b; - pbVar9 = (byte *)(pcVar14 + (int)pbVar13); + pbVar9 = (byte *)(pcVar14 + GHIDRA_INT(pbVar13)); if (pbVar13 < pbVar9) { - iVar11 = (int)"nottrinket" - (int)pbVar13; + iVar11 = GHIDRA_INT("nottrinket") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar11]) { pbVar13 = pbVar13 + 1; if (pbVar9 <= pbVar13) goto LAB_008515e0; @@ -2184,7 +2184,7 @@ LAB_008515e0: notTrinketTokens = (char *)0x0; notTrinketTokensEnd = (char *)0x0; notTrinketTokensCapacity = 0; - local_8._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc; pcVar14 = "nottrinket"; do { pcVar8 = pcVar14; @@ -2216,24 +2216,24 @@ LAB_0085167b: bVar1 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar1 != 0); - ((std::string *)((char *)attrValue))->std::string::assign(pbVar13,(int)pbVar9 - (int)(pbVar13 + 1)); - local_8._0_1_ = 0xd; + ((std::string *)((char *)attrValue))->std::string::assign(pbVar13,GHIDRA_INT(pbVar9) - GHIDRA_INT((pbVar13 + 1))); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xd; string_split(attrValue, - (std_string *)CONCAT31((int3)((uint)extraout_EDX_04 >> 8),0x2c), + (std_string *)CONCAT31((int3)(GHIDRA_UINT(extraout_EDX_04) >> 8),0x2c), (byte)¬TrinketTokens); - local_8._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc; if (0xf < attrValueCapacity) { uVar12 = attrValueCapacity + 1; pvVar5 = attrValue[0]; if (0xfff < uVar12) { - pvVar5 = *(void **)((int)attrValue[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(attrValue[0]) + -4); uVar12 = attrValueCapacity + 0x24; - if (0x1f < (uint)((int)attrValue[0] + (-4 - (int)pvVar5))) goto LAB_00851b02; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(attrValue[0]) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_00851b02; } operator_delete(pvVar5,uVar12); } uVar12 = 0; - tokenCount = ((int)notTrinketTokensEnd - (int)notTrinketTokens) / 0x18; + tokenCount = (GHIDRA_INT(notTrinketTokensEnd) - GHIDRA_INT(notTrinketTokens)) / 0x18; if (tokenCount != 0) { pcVar14 = notTrinketTokens; do { @@ -2255,14 +2255,14 @@ LAB_0085167b: } while (uVar12 < tokenCount); } pcVar8 = notTrinketTokensEnd; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; pcVar14 = notTrinketTokens; if (notTrinketTokens != (char *)0x0) { for (; pcVar14 != pcVar8; pcVar14 = pcVar14 + 0x18) { ((std::string *)(pcVar14))->std::string::_Tidy_deallocate(); } deallocate(notTrinketTokens, - (notTrinketTokensCapacity - (int)notTrinketTokens) / 0x18); + (notTrinketTokensCapacity - GHIDRA_INT(notTrinketTokens)) / 0x18); notTrinketTokens = (char *)0x0; notTrinketTokensEnd = (char *)0x0; notTrinketTokensCapacity = 0; @@ -2270,9 +2270,9 @@ LAB_0085167b: goto LAB_008517f8; } } - pbVar9 = pbVar13 + (int)pcVar14; + pbVar9 = pbVar13 + GHIDRA_INT(pcVar14); if (pbVar13 < pbVar9) { - iVar11 = (int)"nottrinket" - (int)pbVar13; + iVar11 = GHIDRA_INT("nottrinket") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar11]) { pbVar13 = pbVar13 + 1; if (pbVar9 <= pbVar13) goto LAB_0085167b; @@ -2300,9 +2300,9 @@ LAB_00851820: pcVar14 = (char *)piVar4[2]; } if (pcVar14 != pcVar8 + -0xb66fab) goto LAB_00851872; - pbVar9 = (byte *)(pcVar14 + (int)pbVar13); + pbVar9 = (byte *)(pcVar14 + GHIDRA_INT(pbVar13)); if (pbVar13 < pbVar9) { - iVar11 = (int)"achievement" - (int)pbVar13; + iVar11 = GHIDRA_INT("achievement") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar11]) { pbVar13 = pbVar13 + 1; if (pbVar9 <= pbVar13) goto LAB_00851850; @@ -2337,9 +2337,9 @@ LAB_008518bb: goto LAB_008518db; } } - pbVar9 = (byte *)(pcVar14 + (int)pbVar13); + pbVar9 = (byte *)(pcVar14 + GHIDRA_INT(pbVar13)); if (pbVar13 < pbVar9) { - iVar11 = (int)"achievement" - (int)pbVar13; + iVar11 = GHIDRA_INT("achievement") - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar11]) { pbVar13 = pbVar13 + 1; if (pbVar9 <= pbVar13) goto LAB_008518bb; @@ -2367,9 +2367,9 @@ LAB_00851900: pcVar14 = (char *)piVar4[2]; } if (pcVar14 != pcVar8 + -0xb6e3b3) goto LAB_00851952; - pbVar9 = pbVar13 + (int)pcVar14; + pbVar9 = pbVar13 + GHIDRA_INT(pcVar14); if (pbVar13 < pbVar9) { - iVar11 = (int)&DAT_00b6e3b4 - (int)pbVar13; + iVar11 = GHIDRA_INT(&DAT_00b6e3b4) - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar11]) { pbVar13 = pbVar13 + 1; if (pbVar9 <= pbVar13) goto LAB_00851930; @@ -2404,9 +2404,9 @@ LAB_0085199b: goto LAB_008519b5; } } - pbVar9 = (byte *)(pcVar14 + (int)pbVar13); + pbVar9 = (byte *)(pcVar14 + GHIDRA_INT(pbVar13)); if (pbVar13 < pbVar9) { - iVar11 = (int)&DAT_00b6e3b4 - (int)pbVar13; + iVar11 = GHIDRA_INT(&DAT_00b6e3b4) - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar11]) { pbVar13 = pbVar13 + 1; if (pbVar9 <= pbVar13) goto LAB_0085199b; @@ -2426,36 +2426,36 @@ LAB_008519b5: puVar15[0xc] = puVar15[0xc] + 0x68; } infoNode = (undefined4 *)infoNode[0xb]; - local_8._0_1_ = 0xff; - local_8._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0xffffff; if (notTrinketIdsBegin != (void *)0x0) { deallocate(notTrinketIdsBegin, - (int)notTrinketIdsCapacity - (int)notTrinketIdsBegin >> 2); + GHIDRA_INT(notTrinketIdsCapacity) - GHIDRA_INT(notTrinketIdsBegin) >> 2); } if (trinketIdsBegin != (void *)0x0) { - deallocate(trinketIdsBegin,(int)trinketIdsCapacity - (int)trinketIdsBegin >> 2); + deallocate(trinketIdsBegin,GHIDRA_INT(trinketIdsCapacity) - GHIDRA_INT(trinketIdsBegin) >> 2); } if (notCollectibleIdsBegin != (void *)0x0) { deallocate(notCollectibleIdsBegin, - (int)notCollectibleIdsCapacity - (int)notCollectibleIdsBegin >> 2); + GHIDRA_INT(notCollectibleIdsCapacity) - GHIDRA_INT(notCollectibleIdsBegin) >> 2); } if (collectibleIdsBegin != (void *)0x0) { deallocate(collectibleIdsBegin, - (int)collectibleIdsCapacity - (int)collectibleIdsBegin >> 2); + GHIDRA_INT(collectibleIdsCapacity) - GHIDRA_INT(collectibleIdsBegin) >> 2); } if (notPlayerIdsBegin != (void *)0x0) { - deallocate(notPlayerIdsBegin,(int)notPlayerIdsCapacity - (int)notPlayerIdsBegin >> 2); + deallocate(notPlayerIdsBegin,GHIDRA_INT(notPlayerIdsCapacity) - GHIDRA_INT(notPlayerIdsBegin) >> 2); } if (playerIdsBegin != (void *)0x0) { - deallocate(playerIdsBegin,(int)playerIdsCapacity - (int)playerIdsBegin >> 2); + deallocate(playerIdsBegin,GHIDRA_INT(playerIdsCapacity) - GHIDRA_INT(playerIdsBegin) >> 2); } if (0xf < textCapacity) { uVar12 = textCapacity + 1; pvVar5 = infoEntry[0]; if (0xfff < uVar12) { - pvVar5 = *(void **)((int)infoEntry[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(infoEntry[0]) + -4); uVar12 = textCapacity + 0x24; - if (0x1f < (uint)((int)infoEntry[0] + (-4 - (int)pvVar5))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(infoEntry[0]) + (-4 - GHIDRA_INT(pvVar5))))) { LAB_00851b02: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -2473,7 +2473,7 @@ LAB_00851abd: } else { std::set::find_node(idMapIter,&local_1b0); - if (((*(char *)(idMapNode + 0xd) == '\0') && (*(int *)(idMapNode + 0x10) <= (int)piVar4)) && + if (((*(char *)(idMapNode + 0xd) == '\0') && (*(int *)(idMapNode + 0x10) <= GHIDRA_INT(piVar4))) && (idMapNode != *(int *)idMap)) { piVar4 = *(int **)(idMapNode + 0x14); goto LAB_0085058d; @@ -2529,10 +2529,10 @@ InfoDisplay::~InfoDisplay() (&(*(undefined1 *)((char *)(this) + 0x10)),*(undefined4 *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x10)) + 4)); operator_delete(*(void **)&(*(undefined1 *)((char *)(this) + 0x10)),0x128); std::map::_Erase_tree - (&this->_trinkets,*(undefined4 *)((int)(this->_trinkets)._head + 4)); + (&this->_trinkets,*(undefined4 *)(GHIDRA_INT((this->_trinkets)._head) + 4)); operator_delete((this->_trinkets)._head,0x128); std::map::_Erase_tree - (this,*(undefined4 *)((int)(this->_collectibles)._head + 4)); + (this,*(undefined4 *)(GHIDRA_INT((this->_collectibles)._head) + 4)); operator_delete((this->_collectibles)._head,0x128); return; } diff --git a/src/game/info_display_config.cpp b/src/game/info_display_config.cpp index 282a2f4..b57258c 100644 --- a/src/game/info_display_config.cpp +++ b/src/game/info_display_config.cpp @@ -91,17 +91,17 @@ void InfoDisplayConfig::parse_item_node(void *groupNode) undefined4 local_14; Manager *manager; - ppvStack_20 = (void **)((int)&nameTmp + 0x38); - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; + ppvStack_20 = (void **)(GHIDRA_INT(&nameTmp) + 0x38); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; puStack_18 = &LAB_00b0340d; local_1c = ExceptionList; - stackCookie = __security_cookie ^ (int)&nameTmp + 0x2cU; + stackCookie = __security_cookie ^ GHIDRA_INT(&nameTmp) + 0x2cU; ExceptionList = &local_1c; itemNode = xml_node::first_node (groupNode,(byte *)&DAT_00b66f60,in_stack_fffffdbc,in_stack_fffffdc0); if (itemNode != (void *)0x0) { - entryMap = (int)this + 0x18; + entryMap = GHIDRA_INT(this) + 0x18; do { pbVar14 = s_id; do { @@ -120,9 +120,9 @@ void InfoDisplayConfig::parse_item_node(void *groupNode) pbVar12 = (byte *)puVar8[2]; } if (pbVar12 == local_1c4) { - pbVar12 = pbVar12 + (int)pbVar14; + pbVar12 = pbVar12 + GHIDRA_INT(pbVar14); if (pbVar12 <= pbVar14) goto LAB_00854a1d; - iVar15 = (int)s_id - (int)pbVar14; + iVar15 = GHIDRA_INT(s_id) - GHIDRA_INT(pbVar14); while (*pbVar14 == pbVar14[iVar15]) { pbVar14 = pbVar14 + 1; if (pbVar12 <= pbVar14) goto LAB_00854a1d; @@ -140,8 +140,8 @@ LAB_00854a1d: local_14 = 0; pvVar7 = (void *)std::map::operator_subscript(&cardId); ((InfoDisplayEntry *)(pvVar7))->InfoDisplayEntry::operator_assign(pvVar6); - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; std::vector::_Tidy(); std::vector::_Tidy(); std::vector::_Tidy(); @@ -152,7 +152,7 @@ LAB_00854a1d: puVar8[1] = cardId; if ((cardId < 0) || (pvVar6 = (manager->_itemConfig)._cards._begin, - (int)(manager->_itemConfig)._cards._end - (int)pvVar6 >> 2 <= cardId)) { + GHIDRA_INT((manager->_itemConfig)._cards._end) - GHIDRA_INT(pvVar6) >> 2 <= cardId)) { pvVar6 = (void *)0x0; } else { @@ -182,11 +182,11 @@ LAB_00854a1d: } if (0xf < nameTmp._capacity) { uVar16 = nameTmp._capacity + 1; - pvVar6 = (void *)nameTmp._buf._0_4_; + pvVar6 = (*(undefined4 *)((char *)&((void *)nameTmp._buf) + 0x0)); if (0xfff < uVar16) { - pvVar6 = *(void **)(nameTmp._buf._0_4_ + -4); + pvVar6 = *(void **)((*(undefined4 *)((char *)&(nameTmp._buf) + 0x0)) + -4); uVar16 = nameTmp._capacity + 0x24; - if (0x1f < (uint)(nameTmp._buf._0_4_ + (-4 - (int)pvVar6))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(nameTmp._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar6))))) { LAB_008560f7: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -210,9 +210,9 @@ LAB_008560f7: pcVar18 = (char *)infoNode[2]; } if (pcVar18 == pcVar10 + -0xb6d1e3) { - pbVar12 = (byte *)(pcVar18 + (int)pbVar14); + pbVar12 = (byte *)(pcVar18 + GHIDRA_INT(pbVar14)); if (pbVar12 <= pbVar14) goto LAB_00854bd4; - iVar15 = (int)&DAT_00b6d1e4 - (int)pbVar14; + iVar15 = GHIDRA_INT(&DAT_00b6d1e4) - GHIDRA_INT(pbVar14); while (*pbVar14 == pbVar14[iVar15]) { pbVar14 = pbVar14 + 1; if (pbVar12 <= pbVar14) goto LAB_00854bd4; @@ -247,8 +247,8 @@ LAB_00854bd4: notTrinketsCapacity = (undefined4 *)0x0; achievementId = 0; tagId = 0; - local_14._0_1_ = 1; - local_14._1_3_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; pcVar18 = "text"; do { pcVar10 = pcVar18; @@ -266,9 +266,9 @@ LAB_00854bd4: pcVar18 = (char *)puVar19[2]; } if ((byte *)pcVar18 == local_1c4) { - pbVar12 = (byte *)(pcVar18 + (int)pbVar14); + pbVar12 = (byte *)(pcVar18 + GHIDRA_INT(pbVar14)); if (pbVar12 <= pbVar14) goto LAB_00854c91; - iVar15 = (int)&DAT_00b6e37c - (int)pbVar14; + iVar15 = GHIDRA_INT(&DAT_00b6e37c) - GHIDRA_INT(pbVar14); while (*pbVar14 == pbVar14[iVar15]) { pbVar14 = pbVar14 + 1; if (pbVar12 <= pbVar14) goto LAB_00854c91; @@ -286,7 +286,7 @@ LAB_00854c91: bVar2 = *pbVar12; pbVar12 = pbVar12 + 1; } while (bVar2 != 0); - ((std::string *)((char *)entry))->std::string::assign(pbVar14,(int)pbVar12 - (int)(pbVar14 + 1)); + ((std::string *)((char *)entry))->std::string::assign(pbVar14,GHIDRA_INT(pbVar12) - GHIDRA_INT((pbVar14 + 1))); pcVar18 = "player"; do { pcVar10 = pcVar18; @@ -306,9 +306,9 @@ LAB_00854cf0: piVar11 = *(int **)(pbVar14 + 8); } if (piVar11 != local_1d4) goto LAB_00854d71; - pbVar1 = (byte *)((int)piVar11 + (int)pbVar12); + pbVar1 = (byte *)(GHIDRA_INT(piVar11) + GHIDRA_INT(pbVar12)); if (pbVar12 < pbVar1) { - iVar15 = (int)"player" - (int)pbVar12; + iVar15 = GHIDRA_INT("player") - GHIDRA_INT(pbVar12); while (*pbVar12 == pbVar12[iVar15]) { pbVar12 = pbVar12 + 1; if (pbVar1 <= pbVar12) goto LAB_00854d20; @@ -319,7 +319,7 @@ LAB_00854d20: playerPartsBegin = (int *)0x0; playerPartsEnd = (int *)0x0; playerPartsCapacity = 0; - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; pcVar18 = "player"; do { pcVar10 = pcVar18; @@ -345,36 +345,36 @@ LAB_00854dc7: pbVar14 = *(byte **)(local_1c4 + 4); } nameTmp._capacity = 0xf; - nameTmp._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(nameTmp._buf) + 0x0)) = (void *)0x0; pbVar12 = pbVar14; do { bVar2 = *pbVar12; pbVar12 = pbVar12 + 1; } while (bVar2 != 0); - ((std::string *)(nameTmp._buf))->std::string::assign(pbVar14,(int)pbVar12 - (int)(pbVar14 + 1)); - local_14._0_1_ = 3; - string_split(&nameTmp,(std_string *)CONCAT31((int3)((uint)extraout_EDX >> 8),0x2c) + ((std::string *)(nameTmp._buf))->std::string::assign(pbVar14,GHIDRA_INT(pbVar12) - GHIDRA_INT((pbVar14 + 1))); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; + string_split(&nameTmp,(std_string *)CONCAT31((int3)(GHIDRA_UINT(extraout_EDX) >> 8),0x2c) ,(byte)&playerPartsBegin); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < nameTmp._capacity) { uVar16 = nameTmp._capacity + 1; - pvVar6 = (void *)nameTmp._buf._0_4_; + pvVar6 = (*(undefined4 *)((char *)&((void *)nameTmp._buf) + 0x0)); if (0xfff < uVar16) { - pvVar6 = *(void **)(nameTmp._buf._0_4_ + -4); + pvVar6 = *(void **)((*(undefined4 *)((char *)&(nameTmp._buf) + 0x0)) + -4); uVar16 = nameTmp._capacity + 0x24; - if (0x1f < (uint)(nameTmp._buf._0_4_ + (-4 - (int)pvVar6))) goto LAB_008560f7; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(nameTmp._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_008560f7; } operator_delete(pvVar6,uVar16); } local_1c4 = (byte *)0x0; - partCount = (byte *)(((int)playerPartsEnd - (int)playerPartsBegin) / 0x18); + partCount = (byte *)((GHIDRA_INT(playerPartsEnd) - GHIDRA_INT(playerPartsBegin)) / 0x18); local_1cc = playerPartsBegin; if (partCount != (byte *)0x0) { piVar11 = playerPartsBegin; do { puVar19 = playersEnd; piVar9 = piVar11; - if (0xf < (uint)piVar11[5]) { + if (0xf < GHIDRA_UINT(piVar11[5])) { piVar9 = (int *)*piVar11; } local_1d4 = (int *)atoi((char *)piVar9); @@ -390,7 +390,7 @@ LAB_00854dc7: } while (local_1c4 < partCount); } piVar11 = local_1cc; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (local_1cc != (int *)0x0) { piVar9 = playerPartsEnd; piVar17 = local_1cc; @@ -404,7 +404,7 @@ LAB_00854dc7: if (0xfff < uVar13) { pvVar7 = *(void **)((char *)pvVar6 + -4); uVar13 = uVar16 + 0x24; - if (0x1f < (uint)((int)pvVar6 + (-4 - (int)pvVar7))) goto LAB_008560f7; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar6) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_008560f7; } operator_delete(pvVar7,uVar13); piVar9 = playerPartsEnd; @@ -415,12 +415,12 @@ LAB_00854dc7: piVar17 = piVar17 + 6; } while (piVar17 != piVar9); } - uVar16 = ((playerPartsCapacity - (int)piVar11) / 0x18) * 0x18; + uVar16 = ((playerPartsCapacity - GHIDRA_INT(piVar11)) / 0x18) * 0x18; piVar9 = piVar11; if (0xfff < uVar16) { piVar9 = (int *)piVar11[-1]; uVar16 = uVar16 + 0x23; - if ((char *)0x1f < (char *)((int)piVar11 + (-4 - (int)piVar9))) + if ((char *)0x1f < (char *)(GHIDRA_INT(piVar11) + (-4 - GHIDRA_INT(piVar9)))) goto LAB_008560f7; } operator_delete(piVar9,uVar16); @@ -431,9 +431,9 @@ LAB_00854dc7: goto LAB_00854fbe; } } - pbVar12 = (byte *)(pcVar18 + (int)pbVar14); + pbVar12 = (byte *)(pcVar18 + GHIDRA_INT(pbVar14)); if (pbVar14 < pbVar12) { - iVar15 = (int)"player" - (int)pbVar14; + iVar15 = GHIDRA_INT("player") - GHIDRA_INT(pbVar14); while (*pbVar14 == pbVar14[iVar15]) { pbVar14 = pbVar14 + 1; if (pbVar12 <= pbVar14) goto LAB_00854dc7; @@ -462,9 +462,9 @@ LAB_00854fe6: piVar11 = *(int **)(pbVar14 + 8); } if (piVar11 != local_1cc) goto LAB_00855066; - pbVar1 = (byte *)((int)piVar11 + (int)pbVar12); + pbVar1 = (byte *)(GHIDRA_INT(piVar11) + GHIDRA_INT(pbVar12)); if (pbVar12 < pbVar1) { - iVar15 = (int)"notplayer" - (int)pbVar12; + iVar15 = GHIDRA_INT("notplayer") - GHIDRA_INT(pbVar12); while (*pbVar12 == pbVar12[iVar15]) { pbVar12 = pbVar12 + 1; if (pbVar1 <= pbVar12) goto LAB_0085501c; @@ -475,7 +475,7 @@ LAB_0085501c: notPlayerPartsBegin = (int *)0x0; notPlayerPartsEnd = (int *)0x0; notPlayerPartsCapacity = 0; - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; pcVar18 = "notplayer"; do { pcVar10 = pcVar18; @@ -501,37 +501,37 @@ LAB_008550b7: pbVar14 = *(byte **)(local_1c4 + 4); } nameTmp._capacity = 0xf; - nameTmp._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(nameTmp._buf) + 0x0)) = (void *)0x0; pbVar12 = pbVar14; do { bVar2 = *pbVar12; pbVar12 = pbVar12 + 1; } while (bVar2 != 0); - ((std::string *)(nameTmp._buf))->std::string::assign(pbVar14,(int)pbVar12 - (int)(pbVar14 + 1)); - local_14._0_1_ = 5; + ((std::string *)(nameTmp._buf))->std::string::assign(pbVar14,GHIDRA_INT(pbVar12) - GHIDRA_INT((pbVar14 + 1))); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; string_split(&nameTmp,(std_string *) - CONCAT31((int3)((uint)extraout_EDX_00 >> 8),0x2c), + CONCAT31((int3)(GHIDRA_UINT(extraout_EDX_00) >> 8),0x2c), (byte)¬PlayerPartsBegin); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; if (0xf < nameTmp._capacity) { uVar16 = nameTmp._capacity + 1; - pvVar6 = (void *)nameTmp._buf._0_4_; + pvVar6 = (*(undefined4 *)((char *)&((void *)nameTmp._buf) + 0x0)); if (0xfff < uVar16) { - pvVar6 = *(void **)(nameTmp._buf._0_4_ + -4); + pvVar6 = *(void **)((*(undefined4 *)((char *)&(nameTmp._buf) + 0x0)) + -4); uVar16 = nameTmp._capacity + 0x24; - if (0x1f < (uint)(nameTmp._buf._0_4_ + (-4 - (int)pvVar6))) goto LAB_008560f7; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(nameTmp._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_008560f7; } operator_delete(pvVar6,uVar16); } local_1c4 = (byte *)0x0; - partCount = (byte *)(((int)notPlayerPartsEnd - (int)notPlayerPartsBegin) / 0x18); + partCount = (byte *)((GHIDRA_INT(notPlayerPartsEnd) - GHIDRA_INT(notPlayerPartsBegin)) / 0x18); local_1d4 = notPlayerPartsBegin; if (partCount != (byte *)0x0) { piVar11 = notPlayerPartsBegin; do { puVar19 = notPlayersEnd; piVar9 = piVar11; - if (0xf < (uint)piVar11[5]) { + if (0xf < GHIDRA_UINT(piVar11[5])) { piVar9 = (int *)*piVar11; } local_1cc = (int *)atoi((char *)piVar9); @@ -547,7 +547,7 @@ LAB_008550b7: } while (local_1c4 < partCount); } piVar11 = local_1d4; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (local_1d4 != (int *)0x0) { piVar9 = notPlayerPartsEnd; piVar17 = local_1d4; @@ -561,7 +561,7 @@ LAB_008550b7: if (0xfff < uVar13) { pvVar7 = *(void **)((char *)pvVar6 + -4); uVar13 = uVar16 + 0x24; - if (0x1f < (uint)((int)pvVar6 + (-4 - (int)pvVar7))) goto LAB_008560f7; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar6) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_008560f7; } operator_delete(pvVar7,uVar13); piVar9 = notPlayerPartsEnd; @@ -572,12 +572,12 @@ LAB_008550b7: piVar17 = piVar17 + 6; } while (piVar17 != piVar9); } - uVar16 = ((notPlayerPartsCapacity - (int)piVar11) / 0x18) * 0x18; + uVar16 = ((notPlayerPartsCapacity - GHIDRA_INT(piVar11)) / 0x18) * 0x18; piVar9 = piVar11; if (0xfff < uVar16) { piVar9 = (int *)piVar11[-1]; uVar16 = uVar16 + 0x23; - if ((char *)0x1f < (char *)((int)piVar11 + (-4 - (int)piVar9))) + if ((char *)0x1f < (char *)(GHIDRA_INT(piVar11) + (-4 - GHIDRA_INT(piVar9)))) goto LAB_008560f7; } operator_delete(piVar9,uVar16); @@ -588,9 +588,9 @@ LAB_008550b7: goto LAB_008552ae; } } - pbVar12 = (byte *)(pcVar18 + (int)pbVar14); + pbVar12 = (byte *)(pcVar18 + GHIDRA_INT(pbVar14)); if (pbVar14 < pbVar12) { - iVar15 = (int)"notplayer" - (int)pbVar14; + iVar15 = GHIDRA_INT("notplayer") - GHIDRA_INT(pbVar14); while (*pbVar14 == pbVar14[iVar15]) { pbVar14 = pbVar14 + 1; if (pbVar12 <= pbVar14) goto LAB_008550b7; @@ -619,9 +619,9 @@ LAB_008552d6: piVar11 = *(int **)(pbVar14 + 8); } if (piVar11 != local_1cc) goto LAB_00855356; - pbVar1 = (byte *)((int)piVar11 + (int)pbVar12); + pbVar1 = (byte *)(GHIDRA_INT(piVar11) + GHIDRA_INT(pbVar12)); if (pbVar12 < pbVar1) { - iVar15 = (int)"collectible" - (int)pbVar12; + iVar15 = GHIDRA_INT("collectible") - GHIDRA_INT(pbVar12); while (*pbVar12 == pbVar12[iVar15]) { pbVar12 = pbVar12 + 1; if (pbVar1 <= pbVar12) goto LAB_0085530c; @@ -632,7 +632,7 @@ LAB_0085530c: collectiblePartsBegin = (int *)0x0; collectiblePartsEnd = (int *)0x0; collectiblePartsCapacity = 0; - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; pcVar18 = "collectible"; do { pcVar10 = pcVar18; @@ -658,30 +658,30 @@ LAB_008553a7: pbVar14 = *(byte **)(local_1c4 + 4); } nameTmp._capacity = 0xf; - nameTmp._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(nameTmp._buf) + 0x0)) = (void *)0x0; pbVar12 = pbVar14; do { bVar2 = *pbVar12; pbVar12 = pbVar12 + 1; } while (bVar2 != 0); - ((std::string *)(nameTmp._buf))->std::string::assign(pbVar14,(int)pbVar12 - (int)(pbVar14 + 1)); - local_14._0_1_ = 7; + ((std::string *)(nameTmp._buf))->std::string::assign(pbVar14,GHIDRA_INT(pbVar12) - GHIDRA_INT((pbVar14 + 1))); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; string_split(&nameTmp,(std_string *) - CONCAT31((int3)((uint)extraout_EDX_01 >> 8),0x2c), + CONCAT31((int3)(GHIDRA_UINT(extraout_EDX_01) >> 8),0x2c), (byte)&collectiblePartsBegin); - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; if (0xf < nameTmp._capacity) { uVar16 = nameTmp._capacity + 1; - pvVar6 = (void *)nameTmp._buf._0_4_; + pvVar6 = (*(undefined4 *)((char *)&((void *)nameTmp._buf) + 0x0)); if (0xfff < uVar16) { - pvVar6 = *(void **)(nameTmp._buf._0_4_ + -4); + pvVar6 = *(void **)((*(undefined4 *)((char *)&(nameTmp._buf) + 0x0)) + -4); uVar16 = nameTmp._capacity + 0x24; - if (0x1f < (uint)(nameTmp._buf._0_4_ + (-4 - (int)pvVar6))) goto LAB_008560f7; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(nameTmp._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_008560f7; } operator_delete(pvVar6,uVar16); } local_1c4 = (byte *)0x0; - partCount = (byte *)(((int)collectiblePartsEnd - (int)collectiblePartsBegin) / + partCount = (byte *)((GHIDRA_INT(collectiblePartsEnd) - GHIDRA_INT(collectiblePartsBegin)) / 0x18); local_1d4 = collectiblePartsBegin; if (partCount != (byte *)0x0) { @@ -689,7 +689,7 @@ LAB_008553a7: do { puVar19 = collectiblesEnd; piVar9 = piVar11; - if (0xf < (uint)piVar11[5]) { + if (0xf < GHIDRA_UINT(piVar11[5])) { piVar9 = (int *)*piVar11; } local_1cc = (int *)atoi((char *)piVar9); @@ -705,7 +705,7 @@ LAB_008553a7: } while (local_1c4 < partCount); } piVar11 = local_1d4; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (local_1d4 != (int *)0x0) { piVar9 = collectiblePartsEnd; piVar17 = local_1d4; @@ -719,7 +719,7 @@ LAB_008553a7: if (0xfff < uVar13) { pvVar7 = *(void **)((char *)pvVar6 + -4); uVar13 = uVar16 + 0x24; - if (0x1f < (uint)((int)pvVar6 + (-4 - (int)pvVar7))) goto LAB_008560f7; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar6) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_008560f7; } operator_delete(pvVar7,uVar13); piVar9 = collectiblePartsEnd; @@ -730,12 +730,12 @@ LAB_008553a7: piVar17 = piVar17 + 6; } while (piVar17 != piVar9); } - uVar16 = ((collectiblePartsCapacity - (int)piVar11) / 0x18) * 0x18; + uVar16 = ((collectiblePartsCapacity - GHIDRA_INT(piVar11)) / 0x18) * 0x18; piVar9 = piVar11; if (0xfff < uVar16) { piVar9 = (int *)piVar11[-1]; uVar16 = uVar16 + 0x23; - if ((char *)0x1f < (char *)((int)piVar11 + (-4 - (int)piVar9))) + if ((char *)0x1f < (char *)(GHIDRA_INT(piVar11) + (-4 - GHIDRA_INT(piVar9)))) goto LAB_008560f7; } operator_delete(piVar9,uVar16); @@ -746,9 +746,9 @@ LAB_008553a7: goto LAB_0085559e; } } - pbVar12 = pbVar14 + (int)pcVar18; + pbVar12 = pbVar14 + GHIDRA_INT(pcVar18); if (pbVar14 < pbVar12) { - iVar15 = (int)"collectible" - (int)pbVar14; + iVar15 = GHIDRA_INT("collectible") - GHIDRA_INT(pbVar14); while (*pbVar14 == pbVar14[iVar15]) { pbVar14 = pbVar14 + 1; if (pbVar12 <= pbVar14) goto LAB_008553a7; @@ -777,9 +777,9 @@ LAB_008555c6: piVar11 = *(int **)(pbVar14 + 8); } if (piVar11 != local_1cc) goto LAB_00855646; - pbVar1 = (byte *)((int)piVar11 + (int)pbVar12); + pbVar1 = (byte *)(GHIDRA_INT(piVar11) + GHIDRA_INT(pbVar12)); if (pbVar12 < pbVar1) { - iVar15 = (int)"notcollectible" - (int)pbVar12; + iVar15 = GHIDRA_INT("notcollectible") - GHIDRA_INT(pbVar12); while (*pbVar12 == pbVar12[iVar15]) { pbVar12 = pbVar12 + 1; if (pbVar1 <= pbVar12) goto LAB_008555fc; @@ -790,7 +790,7 @@ LAB_008555fc: notCollectiblePartsBegin = (int *)0x0; notCollectiblePartsEnd = (int *)0x0; notCollectiblePartsCapacity = 0; - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; pcVar18 = "notcollectible"; do { pcVar10 = pcVar18; @@ -816,30 +816,30 @@ LAB_00855697: pbVar14 = *(byte **)(local_1c4 + 4); } nameTmp._capacity = 0xf; - nameTmp._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(nameTmp._buf) + 0x0)) = (void *)0x0; pbVar12 = pbVar14; do { bVar2 = *pbVar12; pbVar12 = pbVar12 + 1; } while (bVar2 != 0); - ((std::string *)(nameTmp._buf))->std::string::assign(pbVar14,(int)pbVar12 - (int)(pbVar14 + 1)); - local_14._0_1_ = 9; + ((std::string *)(nameTmp._buf))->std::string::assign(pbVar14,GHIDRA_INT(pbVar12) - GHIDRA_INT((pbVar14 + 1))); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; string_split(&nameTmp,(std_string *) - CONCAT31((int3)((uint)extraout_EDX_02 >> 8),0x2c), + CONCAT31((int3)(GHIDRA_UINT(extraout_EDX_02) >> 8),0x2c), (byte)¬CollectiblePartsBegin); - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; if (0xf < nameTmp._capacity) { uVar16 = nameTmp._capacity + 1; - pvVar6 = (void *)nameTmp._buf._0_4_; + pvVar6 = (*(undefined4 *)((char *)&((void *)nameTmp._buf) + 0x0)); if (0xfff < uVar16) { - pvVar6 = *(void **)(nameTmp._buf._0_4_ + -4); + pvVar6 = *(void **)((*(undefined4 *)((char *)&(nameTmp._buf) + 0x0)) + -4); uVar16 = nameTmp._capacity + 0x24; - if (0x1f < (uint)(nameTmp._buf._0_4_ + (-4 - (int)pvVar6))) goto LAB_008560f7; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(nameTmp._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_008560f7; } operator_delete(pvVar6,uVar16); } local_1c4 = (byte *)0x0; - partCount = (byte *)(((int)notCollectiblePartsEnd - (int)notCollectiblePartsBegin) + partCount = (byte *)((GHIDRA_INT(notCollectiblePartsEnd) - GHIDRA_INT(notCollectiblePartsBegin)) / 0x18); local_1d4 = notCollectiblePartsBegin; if (partCount != (byte *)0x0) { @@ -847,7 +847,7 @@ LAB_00855697: do { puVar19 = notCollectiblesEnd; piVar9 = piVar11; - if (0xf < (uint)piVar11[5]) { + if (0xf < GHIDRA_UINT(piVar11[5])) { piVar9 = (int *)*piVar11; } local_1cc = (int *)atoi((char *)piVar9); @@ -863,7 +863,7 @@ LAB_00855697: } while (local_1c4 < partCount); } piVar11 = local_1d4; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (local_1d4 != (int *)0x0) { piVar9 = notCollectiblePartsEnd; piVar17 = local_1d4; @@ -877,7 +877,7 @@ LAB_00855697: if (0xfff < uVar13) { pvVar7 = *(void **)((char *)pvVar6 + -4); uVar13 = uVar16 + 0x24; - if (0x1f < (uint)((int)pvVar6 + (-4 - (int)pvVar7))) goto LAB_008560f7; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar6) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_008560f7; } operator_delete(pvVar7,uVar13); piVar9 = notCollectiblePartsEnd; @@ -888,12 +888,12 @@ LAB_00855697: piVar17 = piVar17 + 6; } while (piVar17 != piVar9); } - uVar16 = ((notCollectiblePartsCapacity - (int)piVar11) / 0x18) * 0x18; + uVar16 = ((notCollectiblePartsCapacity - GHIDRA_INT(piVar11)) / 0x18) * 0x18; piVar9 = piVar11; if (0xfff < uVar16) { piVar9 = (int *)piVar11[-1]; uVar16 = uVar16 + 0x23; - if ((char *)0x1f < (char *)((int)piVar11 + (-4 - (int)piVar9))) + if ((char *)0x1f < (char *)(GHIDRA_INT(piVar11) + (-4 - GHIDRA_INT(piVar9)))) goto LAB_008560f7; } operator_delete(piVar9,uVar16); @@ -904,9 +904,9 @@ LAB_00855697: goto LAB_00855891; } } - pbVar12 = (byte *)(pcVar18 + (int)pbVar14); + pbVar12 = (byte *)(pcVar18 + GHIDRA_INT(pbVar14)); if (pbVar14 < pbVar12) { - iVar15 = (int)"notcollectible" - (int)pbVar14; + iVar15 = GHIDRA_INT("notcollectible") - GHIDRA_INT(pbVar14); while (*pbVar14 == pbVar14[iVar15]) { pbVar14 = pbVar14 + 1; if (pbVar12 <= pbVar14) goto LAB_00855697; @@ -935,9 +935,9 @@ LAB_008558c0: piVar11 = *(int **)(pbVar14 + 8); } if (piVar11 != local_1cc) goto LAB_00855943; - pbVar1 = (byte *)((int)piVar11 + (int)pbVar12); + pbVar1 = (byte *)(GHIDRA_INT(piVar11) + GHIDRA_INT(pbVar12)); if (pbVar12 < pbVar1) { - iVar15 = (int)"trinket" - (int)pbVar12; + iVar15 = GHIDRA_INT("trinket") - GHIDRA_INT(pbVar12); while (*pbVar12 == pbVar12[iVar15]) { pbVar12 = pbVar12 + 1; if (pbVar1 <= pbVar12) goto LAB_008558f4; @@ -948,7 +948,7 @@ LAB_008558f4: trinketPartsBegin = (char *)0x0; trinketPartsEnd = (char *)0x0; trinketPartsCapacity = 0; - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; pcVar18 = "trinket"; do { pcVar10 = pcVar18; @@ -974,30 +974,30 @@ LAB_00855997: pbVar14 = *(byte **)(local_1c4 + 4); } nameTmp._capacity = 0xf; - nameTmp._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(nameTmp._buf) + 0x0)) = (void *)0x0; pbVar12 = pbVar14; do { bVar2 = *pbVar12; pbVar12 = pbVar12 + 1; } while (bVar2 != 0); - ((std::string *)(nameTmp._buf))->std::string::assign(pbVar14,(int)pbVar12 - (int)(pbVar14 + 1)); - local_14._0_1_ = 0xb; + ((std::string *)(nameTmp._buf))->std::string::assign(pbVar14,GHIDRA_INT(pbVar12) - GHIDRA_INT((pbVar14 + 1))); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; string_split(&nameTmp,(std_string *) - CONCAT31((int3)((uint)extraout_EDX_03 >> 8),0x2c), + CONCAT31((int3)(GHIDRA_UINT(extraout_EDX_03) >> 8),0x2c), (byte)&trinketPartsBegin); - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; if (0xf < nameTmp._capacity) { uVar16 = nameTmp._capacity + 1; - pvVar6 = (void *)nameTmp._buf._0_4_; + pvVar6 = (*(undefined4 *)((char *)&((void *)nameTmp._buf) + 0x0)); if (0xfff < uVar16) { - pvVar6 = *(void **)(nameTmp._buf._0_4_ + -4); + pvVar6 = *(void **)((*(undefined4 *)((char *)&(nameTmp._buf) + 0x0)) + -4); uVar16 = nameTmp._capacity + 0x24; - if (0x1f < (uint)(nameTmp._buf._0_4_ + (-4 - (int)pvVar6))) goto LAB_008560f7; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(nameTmp._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_008560f7; } operator_delete(pvVar6,uVar16); } local_1c4 = (byte *)0x0; - partCount = (byte *)(((int)trinketPartsEnd - (int)trinketPartsBegin) / 0x18); + partCount = (byte *)((GHIDRA_INT(trinketPartsEnd) - GHIDRA_INT(trinketPartsBegin)) / 0x18); if (partCount != (byte *)0x0) { pcVar18 = trinketPartsBegin; do { @@ -1019,14 +1019,14 @@ LAB_00855997: } while (local_1c4 < partCount); } pcVar10 = trinketPartsEnd; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; pcVar18 = trinketPartsBegin; if (trinketPartsBegin != (char *)0x0) { for (; pcVar18 != pcVar10; pcVar18 = pcVar18 + 0x18) { ((std::string *)(pcVar18))->std::string::_Tidy_deallocate(); } deallocate(trinketPartsBegin, - (trinketPartsCapacity - (int)trinketPartsBegin) / 0x18); + (trinketPartsCapacity - GHIDRA_INT(trinketPartsBegin)) / 0x18); trinketPartsBegin = (char *)0x0; trinketPartsEnd = (char *)0x0; trinketPartsCapacity = 0; @@ -1034,9 +1034,9 @@ LAB_00855997: goto LAB_00855b29; } } - pbVar12 = pbVar14 + (int)pcVar18; + pbVar12 = pbVar14 + GHIDRA_INT(pcVar18); if (pbVar14 < pbVar12) { - iVar15 = (int)"trinket" - (int)pbVar14; + iVar15 = GHIDRA_INT("trinket") - GHIDRA_INT(pbVar14); while (*pbVar14 == pbVar14[iVar15]) { pbVar14 = pbVar14 + 1; if (pbVar12 <= pbVar14) goto LAB_00855997; @@ -1065,9 +1065,9 @@ LAB_00855b53: piVar11 = *(int **)(pbVar14 + 8); } if (piVar11 != local_1cc) goto LAB_00855bd6; - pbVar1 = (byte *)((int)piVar11 + (int)pbVar12); + pbVar1 = (byte *)(GHIDRA_INT(piVar11) + GHIDRA_INT(pbVar12)); if (pbVar12 < pbVar1) { - iVar15 = (int)"nottrinket" - (int)pbVar12; + iVar15 = GHIDRA_INT("nottrinket") - GHIDRA_INT(pbVar12); while (*pbVar12 == pbVar12[iVar15]) { pbVar12 = pbVar12 + 1; if (pbVar1 <= pbVar12) goto LAB_00855b8c; @@ -1078,7 +1078,7 @@ LAB_00855b8c: notTrinketPartsBegin = (char *)0x0; notTrinketPartsEnd = (char *)0x0; notTrinketPartsCapacity = 0; - local_14._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; pcVar18 = "nottrinket"; do { pcVar10 = pcVar18; @@ -1104,30 +1104,30 @@ LAB_00855c27: pbVar14 = *(byte **)(local_1c4 + 4); } nameTmp._capacity = 0xf; - nameTmp._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(nameTmp._buf) + 0x0)) = (void *)0x0; pbVar12 = pbVar14; do { bVar2 = *pbVar12; pbVar12 = pbVar12 + 1; } while (bVar2 != 0); - ((std::string *)(nameTmp._buf))->std::string::assign(pbVar14,(int)pbVar12 - (int)(pbVar14 + 1)); - local_14._0_1_ = 0xd; + ((std::string *)(nameTmp._buf))->std::string::assign(pbVar14,GHIDRA_INT(pbVar12) - GHIDRA_INT((pbVar14 + 1))); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xd; string_split(&nameTmp,(std_string *) - CONCAT31((int3)((uint)extraout_EDX_04 >> 8),0x2c), + CONCAT31((int3)(GHIDRA_UINT(extraout_EDX_04) >> 8),0x2c), (byte)¬TrinketPartsBegin); - local_14._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; if (0xf < nameTmp._capacity) { uVar16 = nameTmp._capacity + 1; - pvVar6 = (void *)nameTmp._buf._0_4_; + pvVar6 = (*(undefined4 *)((char *)&((void *)nameTmp._buf) + 0x0)); if (0xfff < uVar16) { - pvVar6 = *(void **)(nameTmp._buf._0_4_ + -4); + pvVar6 = *(void **)((*(undefined4 *)((char *)&(nameTmp._buf) + 0x0)) + -4); uVar16 = nameTmp._capacity + 0x24; - if (0x1f < (uint)(nameTmp._buf._0_4_ + (-4 - (int)pvVar6))) goto LAB_008560f7; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(nameTmp._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_008560f7; } operator_delete(pvVar6,uVar16); } local_1c4 = (byte *)0x0; - partCount = (byte *)(((int)notTrinketPartsEnd - (int)notTrinketPartsBegin) / 0x18) + partCount = (byte *)((GHIDRA_INT(notTrinketPartsEnd) - GHIDRA_INT(notTrinketPartsBegin)) / 0x18) ; if (partCount != (byte *)0x0) { pcVar18 = notTrinketPartsBegin; @@ -1150,14 +1150,14 @@ LAB_00855c27: } while (local_1c4 < partCount); } pcVar10 = notTrinketPartsEnd; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; pcVar18 = notTrinketPartsBegin; if (notTrinketPartsBegin != (char *)0x0) { for (; pcVar18 != pcVar10; pcVar18 = pcVar18 + 0x18) { ((std::string *)(pcVar18))->std::string::_Tidy_deallocate(); } deallocate(notTrinketPartsBegin, - (notTrinketPartsCapacity - (int)notTrinketPartsBegin) / 0x18); + (notTrinketPartsCapacity - GHIDRA_INT(notTrinketPartsBegin)) / 0x18); notTrinketPartsBegin = (char *)0x0; notTrinketPartsEnd = (char *)0x0; notTrinketPartsCapacity = 0; @@ -1165,9 +1165,9 @@ LAB_00855c27: goto LAB_00855db9; } } - pbVar12 = (byte *)(pcVar18 + (int)pbVar14); + pbVar12 = (byte *)(pcVar18 + GHIDRA_INT(pbVar14)); if (pbVar14 < pbVar12) { - iVar15 = (int)"nottrinket" - (int)pbVar14; + iVar15 = GHIDRA_INT("nottrinket") - GHIDRA_INT(pbVar14); while (*pbVar14 == pbVar14[iVar15]) { pbVar14 = pbVar14 + 1; if (pbVar12 <= pbVar14) goto LAB_00855c27; @@ -1196,9 +1196,9 @@ LAB_00855de3: piVar11 = (int *)puVar19[2]; } if (piVar11 != local_1cc) goto LAB_00855e41; - pbVar12 = pbVar14 + (int)piVar11; + pbVar12 = pbVar14 + GHIDRA_INT(piVar11); if (pbVar14 < pbVar12) { - iVar15 = (int)"achievement" - (int)pbVar14; + iVar15 = GHIDRA_INT("achievement") - GHIDRA_INT(pbVar14); while (*pbVar14 == pbVar14[iVar15]) { pbVar14 = pbVar14 + 1; if (pbVar12 <= pbVar14) goto LAB_00855e13; @@ -1233,9 +1233,9 @@ LAB_00855e8d: goto LAB_00855ead; } } - pbVar12 = pbVar14 + (int)pcVar18; + pbVar12 = pbVar14 + GHIDRA_INT(pcVar18); if (pbVar14 < pbVar12) { - iVar15 = (int)"achievement" - (int)pbVar14; + iVar15 = GHIDRA_INT("achievement") - GHIDRA_INT(pbVar14); while (*pbVar14 == pbVar14[iVar15]) { pbVar14 = pbVar14 + 1; if (pbVar12 <= pbVar14) goto LAB_00855e8d; @@ -1264,9 +1264,9 @@ LAB_00855ed5: piVar11 = *(int **)(pbVar14 + 8); } if (piVar11 != local_1cc) goto LAB_00855f34; - pbVar1 = pbVar12 + (int)piVar11; + pbVar1 = pbVar12 + GHIDRA_INT(piVar11); if (pbVar12 < pbVar1) { - iVar15 = (int)&DAT_00b6e3b4 - (int)pbVar12; + iVar15 = GHIDRA_INT(&DAT_00b6e3b4) - GHIDRA_INT(pbVar12); while (*pbVar12 == pbVar12[iVar15]) { pbVar12 = pbVar12 + 1; if (pbVar1 <= pbVar12) goto LAB_00855f0c; @@ -1301,9 +1301,9 @@ LAB_00855f87: goto LAB_00855fa1; } } - pbVar12 = (byte *)(pcVar18 + (int)pbVar14); + pbVar12 = (byte *)(pcVar18 + GHIDRA_INT(pbVar14)); if (pbVar14 < pbVar12) { - iVar15 = (int)&DAT_00b6e3b4 - (int)pbVar14; + iVar15 = GHIDRA_INT(&DAT_00b6e3b4) - GHIDRA_INT(pbVar14); while (*pbVar14 == pbVar14[iVar15]) { pbVar14 = pbVar14 + 1; if (pbVar12 <= pbVar14) goto LAB_00855f87; @@ -1322,35 +1322,35 @@ LAB_00855fa1: puVar8[0xc] = puVar8[0xc] + 0x68; } puVar19 = (undefined4 *)infoNode[0xb]; - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; infoNode = puVar19; if (notTrinketsBegin != (void *)0x0) { - deallocate(notTrinketsBegin,(int)notTrinketsCapacity - (int)notTrinketsBegin >> 2); + deallocate(notTrinketsBegin,GHIDRA_INT(notTrinketsCapacity) - GHIDRA_INT(notTrinketsBegin) >> 2); } if (trinketsBegin != (void *)0x0) { - deallocate(trinketsBegin,(int)trinketsCapacity - (int)trinketsBegin >> 2); + deallocate(trinketsBegin,GHIDRA_INT(trinketsCapacity) - GHIDRA_INT(trinketsBegin) >> 2); } if (notCollectiblesBegin != (void *)0x0) { deallocate(notCollectiblesBegin, - (int)notCollectiblesCapacity - (int)notCollectiblesBegin >> 2); + GHIDRA_INT(notCollectiblesCapacity) - GHIDRA_INT(notCollectiblesBegin) >> 2); } if (collectiblesBegin != (void *)0x0) { - deallocate(collectiblesBegin,(int)collectiblesCapacity - (int)collectiblesBegin >> 2); + deallocate(collectiblesBegin,GHIDRA_INT(collectiblesCapacity) - GHIDRA_INT(collectiblesBegin) >> 2); } if (notPlayersBegin != (void *)0x0) { - deallocate(notPlayersBegin,(int)notPlayersCapacity - (int)notPlayersBegin >> 2); + deallocate(notPlayersBegin,GHIDRA_INT(notPlayersCapacity) - GHIDRA_INT(notPlayersBegin) >> 2); } if (playersBegin != (void *)0x0) { - deallocate(playersBegin,(int)playersCapacity - (int)playersBegin >> 2); + deallocate(playersBegin,GHIDRA_INT(playersCapacity) - GHIDRA_INT(playersBegin) >> 2); } if (0xf < entryTextCapacity) { uVar16 = entryTextCapacity + 1; pvVar6 = entry[0]; if (0xfff < uVar16) { - pvVar6 = *(void **)((int)entry[0] + -4); + pvVar6 = *(void **)(GHIDRA_INT(entry[0]) + -4); uVar16 = entryTextCapacity + 0x24; - if (0x1f < (uint)((int)entry[0] + (-4 - (int)pvVar6))) goto LAB_008560f7; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(entry[0]) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_008560f7; } operator_delete(pvVar6,uVar16); } diff --git a/src/game/info_display_entry.cpp b/src/game/info_display_entry.cpp index 7b46904..1aacc0b 100644 --- a/src/game/info_display_entry.cpp +++ b/src/game/info_display_entry.cpp @@ -10,7 +10,7 @@ InfoDisplayEntry::InfoDisplayEntry() puStack_c = &LAB_00b02f81; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; *(undefined4 *)this = 0; *(undefined4 *)((char *)this + 4) = 0; @@ -57,9 +57,9 @@ int InfoDisplayEntry::count_lines(Entity_Player *param_1, uint param_2) local_c = 0; pvVar2 = (g_manager->_itemConfig)._playerForms._end; pvVar3 = (g_manager->_itemConfig)._playerForms._begin; - if ((int)pvVar2 - (int)pvVar3 >> 2 != 0) { + if (GHIDRA_INT(pvVar2) - GHIDRA_INT(pvVar3) >> 2 != 0) { do { - if (((-1 < (int)uVar8) && ((int)uVar8 < (int)pvVar2 - (int)pvVar3 >> 2)) && + if (((-1 < GHIDRA_INT(uVar8)) && (GHIDRA_INT(uVar8) < GHIDRA_INT(pvVar2) - GHIDRA_INT(pvVar3) >> 2)) && (piVar4 = *(int **)((char *)pvVar3 + uVar8 * 4), piVar4 != (int *)0x0)) { if (piVar4[2] == 0 && piVar4[3] == 0) { if (*piVar4 == 0xf) { @@ -89,7 +89,7 @@ LAB_0084e8f3: } LAB_0084e8fa: uVar8 = uVar8 + 1; - } while (uVar8 < (uint)((int)pvVar2 - (int)pvVar3 >> 2)); + } while (uVar8 < GHIDRA_UINT((GHIDRA_INT(pvVar2) - GHIDRA_INT(pvVar3) >> 2))); } iVar1 = (in_ECX[9] - in_ECX[8]) / 0x68; iVar7 = iVar1 + local_c; @@ -105,7 +105,7 @@ LAB_0084e8fa: iVar7 = iVar7 + 1; } uVar8 = uVar8 + 1; - } while (uVar8 < (uint)((in_ECX[0xc] - in_ECX[0xb]) / 0x68)); + } while (uVar8 < GHIDRA_UINT(((in_ECX[0xc] - in_ECX[0xb]) / 0x68))); } return iVar7; } @@ -120,28 +120,28 @@ void * InfoDisplayEntry::operator_assign(void *other) *(undefined4 *)this = *(undefined4 *)other; *(undefined4 *)((char *)this + 4) = *(undefined4 *)((char *)other + 4); - text = (byte *)((int)other + 8); - if ((byte *)((int)this + 8) != text) { + text = (byte *)(GHIDRA_INT(other) + 8); + if ((byte *)(GHIDRA_INT(this) + 8) != text) { if (0xf < *(uint *)((char *)other + 0x1c)) { text = *(byte **)text; } - ((std::string *)((char *)((int)this + 8)))->std::string::assign(text,*(uint *)((char *)other + 0x18)); + ((std::string *)((char *)(GHIDRA_INT(this) + 8)))->std::string::assign(text,*(uint *)((char *)other + 0x18)); } - if ((undefined4 *)((int)this + 0x20) != (undefined4 *)((int)other + 0x20)) { + if ((undefined4 *)(GHIDRA_INT(this) + 0x20) != (undefined4 *)(GHIDRA_INT(other) + 0x20)) { std::vector<104byte>::assign (*(undefined4 *)((char *)other + 0x20),*(undefined4 *)((char *)other + 0x24),other); } - if ((undefined4 *)((int)this + 0x2c) != (undefined4 *)((int)other + 0x2c)) { + if ((undefined4 *)(GHIDRA_INT(this) + 0x2c) != (undefined4 *)(GHIDRA_INT(other) + 0x2c)) { std::vector<104byte>::assign (*(undefined4 *)((char *)other + 0x2c),*(undefined4 *)((char *)other + 0x30),other); } - if ((undefined4 *)((int)this + 0x38) != (undefined4 *)((int)other + 0x38)) { + if ((undefined4 *)(GHIDRA_INT(this) + 0x38) != (undefined4 *)(GHIDRA_INT(other) + 0x38)) { std::vector<104byte>::assign (*(undefined4 *)((char *)other + 0x38),*(undefined4 *)((char *)other + 0x3c),other); } *(undefined1 *)((char *)this + 0x44) = *(undefined1 *)((char *)other + 0x44); - src = (undefined4 *)((int)other + 0x48); - dst = (undefined4 *)((int)this + 0x48); + src = (undefined4 *)(GHIDRA_INT(other) + 0x48); + dst = (undefined4 *)(GHIDRA_INT(this) + 0x48); for (dwordsLeft = 0x33; dwordsLeft != 0; dwordsLeft = dwordsLeft + -1) { *dst = *src; src = src + 1; @@ -163,17 +163,17 @@ void InfoDisplayEntry::copy_constructor(void *other) ExceptionList = &local_10; this->std::string::string(other); local_8 = 0; - std::vector::copy_constructor((int)other + 0x18); - local_8._0_1_ = 1; - std::vector::copy_constructor((int)other + 0x24); - local_8._0_1_ = 2; - std::vector::copy_constructor((int)other + 0x30); - local_8._0_1_ = 3; - std::vector::copy_constructor((int)other + 0x3c); - local_8._0_1_ = 4; - std::vector::copy_constructor((int)other + 0x48); - local_8 = CONCAT31(local_8._1_3_,5); - std::vector::copy_constructor((int)other + 0x54); + std::vector::copy_constructor(GHIDRA_INT(other) + 0x18); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; + std::vector::copy_constructor(GHIDRA_INT(other) + 0x24); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; + std::vector::copy_constructor(GHIDRA_INT(other) + 0x30); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; + std::vector::copy_constructor(GHIDRA_INT(other) + 0x3c); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; + std::vector::copy_constructor(GHIDRA_INT(other) + 0x48); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),5); + std::vector::copy_constructor(GHIDRA_INT(other) + 0x54); *(undefined4 *)((char *)this + 0x60) = *(undefined4 *)((char *)other + 0x60); *(undefined4 *)((char *)this + 100) = *(undefined4 *)((char *)other + 100); ExceptionList = local_10; diff --git a/src/game/info_display_item.cpp b/src/game/info_display_item.cpp index 0c292bb..5391b9d 100644 --- a/src/game/info_display_item.cpp +++ b/src/game/info_display_item.cpp @@ -10,14 +10,14 @@ byte InfoDisplayItem::is_line_visible(int lineIndex, Entity_Player *player, uint uint playerTypeCount; int iVar4; - if ((uint)lineIndex < (uint)((*(int *)((char *)this + 0x30) - *(int *)((char *)this + 0x2c)) / 0x68)) { + if (GHIDRA_UINT(lineIndex) < GHIDRA_UINT(((*(int *)((char *)this + 0x30) - *(int *)((char *)this + 0x2c)) / 0x68))) { if (*(int *)((char *)this + 4) == 0) { return 1; } uVar2 = 0; iVar4 = lineIndex * 0x68 + *(int *)((char *)this + 0x2c); playerTypeCursor = *(int **)(iVar4 + 0x18); - playerTypeCount = *(int *)(iVar4 + 0x1c) - (int)playerTypeCursor >> 2; + playerTypeCount = *(int *)(iVar4 + 0x1c) - GHIDRA_INT(playerTypeCursor) >> 2; if (playerTypeCount != 0) { do { if (*playerTypeCursor == player->_playerType) goto LAB_0084e62d; @@ -31,7 +31,7 @@ byte InfoDisplayItem::is_line_visible(int lineIndex, Entity_Player *player, uint LAB_0084e62d: uVar2 = 0; playerTypeCursor = *(int **)(iVar4 + 0x24); - playerTypeCount = *(int *)(iVar4 + 0x28) - (int)playerTypeCursor >> 2; + playerTypeCount = *(int *)(iVar4 + 0x28) - GHIDRA_INT(playerTypeCursor) >> 2; if (playerTypeCount != 0) { do { if (*playerTypeCursor == player->_playerType) { @@ -51,7 +51,7 @@ LAB_0084e62d: } uVar2 = uVar2 + 1; iVar3 = *(int *)(iVar4 + 0x30); - } while (uVar2 < (uint)(*(int *)(iVar4 + 0x34) - iVar3 >> 2)); + } while (uVar2 < GHIDRA_UINT((*(int *)(iVar4 + 0x34) - iVar3 >> 2))); } uVar2 = 0; iVar3 = *(int *)(iVar4 + 0x3c); @@ -63,7 +63,7 @@ LAB_0084e62d: } uVar2 = uVar2 + 1; iVar3 = *(int *)(iVar4 + 0x3c); - } while (uVar2 < (uint)(*(int *)(iVar4 + 0x40) - iVar3 >> 2)); + } while (uVar2 < GHIDRA_UINT((*(int *)(iVar4 + 0x40) - iVar3 >> 2))); } uVar2 = 0; iVar3 = *(int *)(iVar4 + 0x48); @@ -75,7 +75,7 @@ LAB_0084e62d: } uVar2 = uVar2 + 1; iVar3 = *(int *)(iVar4 + 0x48); - } while (uVar2 < (uint)(*(int *)(iVar4 + 0x4c) - iVar3 >> 2)); + } while (uVar2 < GHIDRA_UINT((*(int *)(iVar4 + 0x4c) - iVar3 >> 2))); } uVar2 = 0; iVar3 = *(int *)(iVar4 + 0x54); @@ -87,12 +87,12 @@ LAB_0084e62d: } uVar2 = uVar2 + 1; iVar3 = *(int *)(iVar4 + 0x54); - } while (uVar2 < (uint)(*(int *)(iVar4 + 0x58) - iVar3 >> 2)); + } while (uVar2 < GHIDRA_UINT((*(int *)(iVar4 + 0x58) - iVar3 >> 2))); } uVar2 = *(uint *)(iVar4 + 0x60); if ((uVar2 == 0) || ((uVar2 != 0xfffffffe && - (((int)uVar2 < 0 || + ((GHIDRA_INT(uVar2) < 0 || ((uVar2 < 0x282 && (((g_manager->_persistentGameData)._achievements[uVar2] != 0 || (((g_manager->_state == 2 && (g_game != (Game *)0x0)) && diff --git a/src/game/input_manager.cpp b/src/game/input_manager.cpp index 8aa4b54..9793ca3 100644 --- a/src/game/input_manager.cpp +++ b/src/game/input_manager.cpp @@ -22,10 +22,10 @@ void * InputManager::GetDeviceByPlayerEntity(Entity_Player *player) } deviceCursor = *(int **)this; deviceIdx = 0; - uVar2 = *(int *)((char *)this + 4) - (int)deviceCursor >> 2; + uVar2 = *(int *)((char *)this + 4) - GHIDRA_INT(deviceCursor) >> 2; if (uVar2 != 0) { piVar3 = (g_game->_playerManager)._playerList._begin; - uVar5 = (int)(g_game->_playerManager)._playerList._end - (int)piVar3 >> 2; + uVar5 = GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT(piVar3) >> 2; do { pvVar1 = (void *)*deviceCursor; uVar4 = 0; @@ -66,7 +66,7 @@ LAB_0090ada1: uVar5 = 0; deviceId = *(int *)(*(int *)(*(int *)this + uVar2 * 4) + 0xc); piVar3 = (g_game->_playerManager)._playerList._begin; - uVar4 = (int)(g_game->_playerManager)._playerList._end - (int)piVar3 >> 2; + uVar4 = GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT(piVar3) >> 2; if (uVar4 != 0) { do { if (*(int *)(piVar3[uVar5] + 0x1618) == deviceId) { @@ -91,7 +91,7 @@ LAB_0090ae80: KAGE_LogMessage(8,(byte *)" - Device\'s Player Type: %d \n "); LAB_0090ae42: uVar2 = uVar2 + 1; - if ((uint)(*(int *)((char *)this + 4) - *(int *)this >> 2) <= uVar2) goto LAB_0090ae59; + if (GHIDRA_UINT((*(int *)((char *)this + 4) - *(int *)this >> 2)) <= uVar2) goto LAB_0090ae59; goto LAB_0090ada1; } @@ -117,7 +117,7 @@ int InputManager::FirstLocalDeviceID() } slotIndex = slotIndex + 1; iVar1 = *(int *)this; - } while (slotIndex < (uint)(*(int *)((char *)this + 4) - iVar1 >> 2)); + } while (slotIndex < GHIDRA_UINT((*(int *)((char *)this + 4) - iVar1 >> 2))); } KAGE_LogMessage(8,(byte *) "[Frame %d] FirstLocalDeviceID() Could not find a device for the local user! \n " @@ -143,7 +143,7 @@ float InputManager::GetActionValue(int action, int controllerIndex, Entity *enti NVar1 = manager->_netplayManager; if ((NVar1 != *(NetplayManager *)(manager + 1)) && (controllerIndex == -1)) { deviceIndex = 0; - if ((int)*(NetplayManager *)(manager + 1) - (int)NVar1 >> 2 != 0) { + if (GHIDRA_INT(*(NetplayManager *)(manager + 1)) - GHIDRA_INT(NVar1) >> 2 != 0) { do { action = *(undefined4 *)(**(int **)((char *)NVar1 + deviceIndex * 4) + 0x38); value = (float10)(*(code *)action)(requestedAction); @@ -152,7 +152,7 @@ float InputManager::GetActionValue(int action, int controllerIndex, Entity *enti } deviceIndex = deviceIndex + 1; NVar1 = manager->_netplayManager; - } while (deviceIndex < (uint)(*(int *)(manager + 1) - (int)NVar1 >> 2)); + } while (deviceIndex < GHIDRA_UINT((*(int *)(manager + 1) - GHIDRA_INT(NVar1) >> 2))); } return 0.0; } @@ -179,13 +179,13 @@ void * InputManager::get_device(void *outDevice, int index) puStack_c = &LAB_00b1154d; local_10 = ExceptionList; ExceptionList = &local_10; - piVar1 = (int *)((int)this + 0x14); + piVar1 = (int *)(GHIDRA_INT(this) + 0x14); if (piVar1 == (int *)0x0) { KAGE_LogMessage(0x10,(byte *)"Invalid mutex object specified"); iVar2 = extraout_ECX; } else { - (**(code **)(*piVar1 + 0xc))(0xffffffff,__security_cookie ^ (int)register0x00000010 - 4U); + (**(code **)(*piVar1 + 0xc))(0xffffffff,__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); iVar2 = extraout_ECX_00; } local_8 = 0; @@ -226,7 +226,7 @@ byte InputManager::is_device_connected(int deviceIndex) local_10 = ExceptionList; ExceptionList = &local_10; deviceResult = (int *)(**(code **)(*(int *)this + 0x28)) - (local_1c,deviceIndex,__security_cookie ^ (uint)(local_1c + 0x18)) + (local_1c,deviceIndex,__security_cookie ^ GHIDRA_UINT((local_1c + 0x18))) ; devicePtr = *deviceResult; local_8 = 0; diff --git a/src/game/invite_friends_menu.cpp b/src/game/invite_friends_menu.cpp index c6fffb5..ae4cce8 100644 --- a/src/game/invite_friends_menu.cpp +++ b/src/game/invite_friends_menu.cpp @@ -46,15 +46,15 @@ void InviteFriendsMenu::load_graphics() ANM2 *cursorSprite; MenuManager *menuManager; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b0ee1d; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; local_68 = cursorSprite; - ((ANM2 *)((ANM2 *)((int)cursorSprite + 4)))->ANM2::Reset(); - cursorSprite = (ANM2 *)((int)cursorSprite + 0x118); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(cursorSprite) + 4)))->ANM2::Reset(); + cursorSprite = (ANM2 *)(GHIDRA_INT(cursorSprite) + 0x118); ((ANM2 *)(cursorSprite))->ANM2::Reset(); anm2Path._size = 0; anm2Path._capacity = 0xf; @@ -63,20 +63,20 @@ void InviteFriendsMenu::load_graphics() anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; if (g_menuManager == (MenuManager *)0x0) { - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x18; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/InviteWidget.anm2",0x19); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/InviteWidget.anm2",0x19); local_14 = 2; - ((ANM2 *)((ANM2 *)((int)cursorSprite + 4)))->ANM2::Load(&anm2Path,1); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(cursorSprite) + 4)))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar10 = anm2Path._capacity + 1; - pcVar9 = (char *)anm2Path._buf._0_4_; + pcVar9 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar10) { - pcVar9 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar9 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar10 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar9))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar9)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -89,20 +89,20 @@ void InviteFriendsMenu::load_graphics() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x18; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/InviteWidget.anm2",0x19); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/InviteWidget.anm2",0x19); local_14 = 3; ((ANM2 *)(cursorSprite))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar10 = anm2Path._capacity + 1; - pcVar9 = (char *)anm2Path._buf._0_4_; + pcVar9 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar10) { - pcVar9 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar9 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar10 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar9))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar9)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -112,20 +112,20 @@ void InviteFriendsMenu::load_graphics() *(undefined4 *)((char *)cursorSprite + 0x24c) = 0x3f400000; } else { - anm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x30); anm2Path._size = 0x27; anm2Path._capacity = 0x2f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/main menu/InviteFriendsMenu.anm2",0x28); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/main menu/InviteFriendsMenu.anm2",0x28); local_14 = 0; - ((ANM2 *)((ANM2 *)((int)cursorSprite + 4)))->ANM2::Load(&anm2Path,1); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(cursorSprite) + 4)))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar10 = anm2Path._capacity + 1; - pcVar9 = (char *)anm2Path._buf._0_4_; + pcVar9 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar10) { - pcVar9 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar9 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar10 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar9))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar9)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -138,20 +138,20 @@ void InviteFriendsMenu::load_graphics() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x30); anm2Path._size = 0x27; anm2Path._capacity = 0x2f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/main menu/InviteFriendsMenu.anm2",0x28); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/main menu/InviteFriendsMenu.anm2",0x28); local_14 = 1; ((ANM2 *)(cursorSprite))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar10 = anm2Path._capacity + 1; - pcVar9 = (char *)anm2Path._buf._0_4_; + pcVar9 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar10) { - pcVar9 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar9 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar10 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar9))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar9)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -164,7 +164,7 @@ void InviteFriendsMenu::load_graphics() LAB_009c4468: bVar4 = ((ANM2 *)(cursorSprite))->ANM2::SetAnimation((byte *)"Cursor",1); if (bVar4 != 0) { - ((AnimationState *)((AnimationState *)((int)cursorSprite + 0x148)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(cursorSprite) + 0x148)))->AnimationState::Rewind(); *(undefined1 *)((char *)cursorSprite + 0x15c) = 1; } } @@ -178,7 +178,7 @@ LAB_009c4468: isLess = bVar4 < (byte)*pcVar9; if (bVar4 != *pcVar9) { LAB_009c4450: - uVar10 = -(uint)isLess | 1; + uVar10 = -GHIDRA_UINT(isLess) | 1; goto LAB_009c4455; } if (bVar4 == 0) break; @@ -225,9 +225,9 @@ LAB_009c4455: pbVar5 = *(byte **)((char *)cursorSprite + 0x38); if (pbVar5 == (byte *)0x0) { LAB_009c455f: - bVar4 = ((ANM2 *)((ANM2 *)((int)cursorSprite + 4)))->ANM2::SetAnimation((byte *)"Appear",1); + bVar4 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(cursorSprite) + 4)))->ANM2::SetAnimation((byte *)"Appear",1); if (bVar4 != 0) { - ((AnimationState *)((AnimationState *)((int)cursorSprite + 0x34)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(cursorSprite) + 0x34)))->AnimationState::Rewind(); *(undefined1 *)((char *)cursorSprite + 0x48) = 1; } } @@ -242,7 +242,7 @@ LAB_009c455f: isLess = bVar4 < (byte)*pcVar9; if (bVar4 != *pcVar9) { LAB_009c4544: - uVar10 = -(uint)isLess | 1; + uVar10 = -GHIDRA_UINT(isLess) | 1; goto LAB_009c4549; } if (bVar4 == 0) break; @@ -262,7 +262,7 @@ LAB_009c4549: *(undefined4 *)((char *)cursorSprite + 0x23c) = 0; *(undefined4 *)((char *)cursorSprite + 0x240) = 0; FID_conflict__Erase_tree_>_> - ((void *)((int)cursorSprite + 0x244),(void *)((int)cursorSprite + 0x244), + ((void *)(GHIDRA_INT(cursorSprite) + 0x244),(void *)(GHIDRA_INT(cursorSprite) + 0x244), *(_Tree_node **)(iVar7 + 4)); *(int *)(iVar7 + 4) = iVar7; *(int *)iVar7 = iVar7; @@ -273,9 +273,9 @@ LAB_009c4549: onlineFriends = (int *)0x0; onlineFriendCount = (int *)0x0; listHead = operator_new(0x10); - *listHead = (int)listHead; - listHead[1] = (int)listHead; - local_14._0_1_ = 5; + *listHead = GHIDRA_INT(listHead); + listHead[1] = GHIDRA_INT(listHead); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; uVar10 = 0; onlineFriends = listHead; if (friendsEnd - friendsBegin >> 3 != 0) { @@ -289,23 +289,23 @@ LAB_009c4549: std::_Xlength_error("list too long"); } local_58 = &onlineFriends; - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; local_54 = (int *)0x0; puVar8 = operator_new(0x10); local_54 = (int *)0x0; puVar8[2] = KAGE::System::UserProfileBase::vftable; puVar8[3] = *(undefined4 *)((char *)local_5c + 4 + uVar10 * 8); puVar8[2] = KAGE::System::UserProfile::vftable; - onlineFriendCount = (int *)((int)onlineFriendCount + 1); + onlineFriendCount = (int *)(GHIDRA_INT(onlineFriendCount) + 1); puVar1 = (undefined4 *)piVar11[1]; *puVar8 = piVar11; puVar8[1] = puVar1; - piVar11[1] = (int)puVar8; + piVar11[1] = GHIDRA_INT(puVar8); *puVar1 = puVar8; - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; } uVar10 = uVar10 + 1; - } while (uVar10 < (uint)(friendsEnd - friendsBegin >> 3)); + } while (uVar10 < GHIDRA_UINT((friendsEnd - friendsBegin >> 3))); } local_5c = onlineFriendCount; listHead = onlineFriends; @@ -349,9 +349,9 @@ LAB_009c4549: *puVar8 = sortNode; puVar2 = (undefined4 *)sortNode[1]; *puVar2 = local_64; - sortNode[1] = (int)puVar8; - piVar11[1] = (int)puVar1; - local_64[1] = (int)puVar2; + sortNode[1] = GHIDRA_INT(puVar8); + piVar11[1] = GHIDRA_INT(puVar1); + local_64[1] = GHIDRA_INT(puVar2); if (piVar11 == local_70) goto LAB_009c480b; do { sortNode = (int *)*sortNode; @@ -364,10 +364,10 @@ LAB_009c4549: } while( true ); } LAB_009c4819: - local_50 = (int *)((int)local_68 + 0x22c); + local_50 = (int *)(GHIDRA_INT(local_68) + 0x22c); puVar1 = *(undefined4 **)((char *)local_68 + 0x230); puVar8 = (undefined4 *)*local_50; - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; local_54 = puVar1; if (puVar8 != puVar1) { do { @@ -376,8 +376,8 @@ LAB_009c4819: } while (puVar8 != puVar1); puVar8 = (undefined4 *)*local_50; } - local_14 = CONCAT31(local_14._1_3_,5); - local_50[1] = (int)puVar8; + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),5); + local_50[1] = GHIDRA_INT(puVar8); if ((int *)(local_50[2] - *local_50 >> 3) < onlineFriendCount) { if ((int *)0x1fffffff < onlineFriendCount) { /* WARNING: Subroutine does not return */ @@ -408,14 +408,14 @@ LAB_009c4819: } while (piVar11 != onlineFriends); } pvVar3 = local_68; - local_54 = (int *)((float)((double)((int)puVar8 - *profiles >> 3) + - __uint_to_double_fixup[-((int)puVar8 - *profiles >> 0x1f)]) / + local_54 = (int *)((float)((double)(GHIDRA_INT(puVar8) - *profiles >> 3) + + __uint_to_double_fixup[-(GHIDRA_INT(puVar8) - *profiles >> 0x1f)]) / (float)((double)*(int *)((char *)local_68 + 0x250) + __uint_to_double_fixup[-(*(int *)((char *)local_68 + 0x250) >> 0x1f)])); pageCount = ceil((double)(float)local_54); local_54 = (int *)(float)pageCount; - isArrowVisible = 1 < (int)pageCount; - arrowLayer = ((ANM2 *)((ANM2 *)((int)pvVar3 + 4)))->ANM2::GetLayer((byte *)"ArrowUp"); + isArrowVisible = 1 < GHIDRA_INT(pageCount); + arrowLayer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(pvVar3) + 4)))->ANM2::GetLayer((byte *)"ArrowUp"); arrowLayer->_visible = isArrowVisible; iVar7 = *(int *)((char *)pvVar3 + 0x230) - *(int *)((char *)pvVar3 + 0x22c); local_54 = (int *)((float)((double)(iVar7 >> 3) + __uint_to_double_fixup[-(iVar7 >> 0x1f)]) / @@ -423,25 +423,25 @@ LAB_009c4819: __uint_to_double_fixup[-(*(int *)((char *)pvVar3 + 0x250) >> 0x1f)])); pageCount = ceil((double)(float)local_54); local_54 = (int *)(float)pageCount; - isArrowVisible = 1 < (int)pageCount; - arrowLayer = ((ANM2 *)((ANM2 *)((int)pvVar3 + 4)))->ANM2::GetLayer((byte *)"ArrowDown"); + isArrowVisible = 1 < GHIDRA_INT(pageCount); + arrowLayer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(pvVar3) + 4)))->ANM2::GetLayer((byte *)"ArrowDown"); arrowLayer->_visible = isArrowVisible; *(undefined4 *)onlineFriends[1] = 0; puVar1 = (undefined4 *)*onlineFriends; while (puVar1 != (undefined4 *)0x0) { puVar8 = (undefined4 *)*puVar1; - local_14._0_1_ = 9; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; (**(code **)puVar1[2])(); operator_delete(puVar1,0x10); puVar1 = puVar8; } - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; operator_delete(onlineFriends,0x10); vector_UserProfile_destroy(&friendsBegin); ExceptionList = local_1c; return; LAB_009c480b: - *listHead = (int)local_5c; + *listHead = GHIDRA_INT(local_5c); goto LAB_009c4819; } @@ -542,7 +542,7 @@ void InviteFriendsMenu::Render() } } if (((*in_ECX == 2) && (statusFrame != (float *)0x0)) && (friendListFrame != (float *)0x0)) { - if ((uint)(in_ECX[0x8c] - in_ECX[0x8b]) < 8) { + if (GHIDRA_UINT((in_ECX[0x8c] - in_ECX[0x8b])) < 8) { statusFont = &g_manager->_font2_TeamMeatEx12; FUN_00a1a580(1); local_8 = 0; @@ -575,7 +575,7 @@ void InviteFriendsMenu::Render() highlightColor._alpha = 1.0; if (iVar1 != 0) { do { - if ((uint)(in_ECX[0x8c] - in_ECX[0x8b] >> 3) <= (uint)friendIndex) { + if (GHIDRA_UINT((in_ECX[0x8c] - in_ECX[0x8b] >> 3)) <= GHIDRA_UINT(friendIndex)) { ExceptionList = local_10; return; } @@ -592,16 +592,16 @@ void InviteFriendsMenu::Render() } AnimationState::Render(overlayAnim,&drawPos,&g_vectorZero,&g_vectorZero); cursorY = drawPos.y; - friendIndex = (int)local_20; + friendIndex = GHIDRA_INT(local_20); } cursorX = drawPos.x + (float)in_ECX[0x98]; nameFont = &g_manager->_font1_TeamMeatEx10; iVar1 = *(int *)(in_ECX[0x8b] + 4 + friendIndex * 8); if (iVar1 == 0) { local_3c = 0; - local_3c._4_4_ = (byte *)0x0; - local_3c._0_4_ = 0; - nameIdHigh = local_3c._4_4_; + (*(undefined4 *)((char *)&(local_3c) + 0x4)) = (byte *)0x0; + (*(undefined4 *)((char *)&(local_3c) + 0x0)) = 0; + nameIdHigh = (*(undefined4 *)((char *)&(local_3c) + 0x4)); nameIdLow = (undefined4)local_3c; } else { @@ -640,10 +640,10 @@ void InviteFriendsMenu::Render() iVar1 = *(int *)(in_ECX[0x8b] + 4 + friendIndex * 8); if (iVar1 == 0) { local_7c = 0; - local_7c._4_4_ = 0; - local_7c._0_4_ = 0; - statusIdLow = (uint)local_7c; - statusIdHigh = local_7c._4_4_; + (*(undefined4 *)((char *)&(local_7c) + 0x4)) = 0; + (*(undefined4 *)((char *)&(local_7c) + 0x0)) = 0; + statusIdLow = GHIDRA_UINT(local_7c); + statusIdHigh = (*(undefined4 *)((char *)&(local_7c) + 0x4)); } else { statusIdLow = *(uint *)(iVar1 + 8); @@ -668,15 +668,15 @@ void InviteFriendsMenu::Render() if (iVar1 != iVar2) { nameColor = &highlightColor; } - ((Font *)(nameFont))->Font::DrawStringScaled(local_3c._4_4_,&drawPos,nameColor,&local_70); + ((Font *)(nameFont))->Font::DrawStringScaled((*(undefined4 *)((char *)&(local_3c) + 0x4)),&drawPos,nameColor,&local_70); row = row + 1; local_8 = 0xffffffff; - friendIndex = (int)local_20 + 1; + friendIndex = GHIDRA_INT(local_20) + 1; cursorY = cursorY + (float)in_ECX[0x95] + (float)in_ECX[0x96]; drawPos.x = (cursorX - ((float)in_ECX[0x95] + (float)in_ECX[0x97])) - (float)in_ECX[0x98]; local_20 = (float)friendIndex; drawPos.y = cursorY; - } while (row < (uint)in_ECX[0x94]); + } while (row < GHIDRA_UINT(in_ECX[0x94])); } } } diff --git a/src/game/item.cpp b/src/game/item.cpp index a7c1508..a9916fe 100644 --- a/src/game/item.cpp +++ b/src/game/item.cpp @@ -15,8 +15,8 @@ byte Item::IsCollectible() // 005b1500 byte Item::HasTags(ulonglong tags) { - if (((uint)tags & *(uint *)((char *)this + 0xb8)) == 0 && - (*(uint *)((char *)this + 0xbc) & tags._4_4_) == 0) { + if ((GHIDRA_UINT(tags) & *(uint *)((char *)this + 0xb8)) == 0 && + (*(uint *)((char *)this + 0xbc) & (*(undefined4 *)((char *)&(tags) + 0x4))) == 0) { return 0; } return 1; @@ -46,5 +46,5 @@ byte Item::IsNull() // 0085dbc0 void * Item::Costume() { - return (void *)((int)this + 0x80); + return (void *)(GHIDRA_INT(this) + 0x80); } diff --git a/src/game/item_config.cpp b/src/game/item_config.cpp index c15e7db..f2625d1 100644 --- a/src/game/item_config.cpp +++ b/src/game/item_config.cpp @@ -24,7 +24,7 @@ void * ItemConfig::get_wisp_config(int collectibleId) } LAB_004362e9: pvVar1 = (manager->_itemConfig)._collectibles._begin; - if ((int)((int)(manager->_itemConfig)._collectibles._end - (int)pvVar1 & 0xfffffffcU) < 0x921) { + if (GHIDRA_INT((GHIDRA_INT((manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar1) & 0xfffffffcU)) < 0x921) { bookOfVirtues = 0; } else { @@ -56,7 +56,7 @@ void * ItemConfig::get_wisp_entry(int collectibleId, int index) } } collectibles = (manager->_itemConfig)._collectibles._begin; - if ((int)((int)(manager->_itemConfig)._collectibles._end - (int)collectibles & 0xfffffffcU) < 0x65 + if (GHIDRA_INT((GHIDRA_INT((manager->_itemConfig)._collectibles._end) - GHIDRA_INT(collectibles) & 0xfffffffcU)) < 0x65 ) { return pvRam000000d0; } @@ -105,7 +105,7 @@ ulonglong ItemConfig::parse_tags(void *tagString) local_8 = 0xffffffff; puStack_c = &LAB_00afce91; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(local_20 + 0x1c); + local_14 = __security_cookie ^ GHIDRA_UINT((local_20 + 0x1c)); ExceptionList = &local_10; if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < DAT_00c80fc8) && (_Init_thread_header(&DAT_00c80fc8,local_14), DAT_00c80fc8 == -1)) { @@ -130,12 +130,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 1; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -152,12 +152,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 2; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -173,12 +173,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 4; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -195,12 +195,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 8; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -217,12 +217,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x10; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -232,19 +232,19 @@ ulonglong ItemConfig::parse_tags(void *tagString) tagName = (undefined *)0x70707567; local_18 = (undefined1 *)0xf; local_1c = 5; - local_28 = CONCAT22(local_28._2_2_,0x79); + local_28 = CONCAT22((*(undefined2 *)((char *)&(local_28) + 0x2)),0x79); local_8 = 6; tagMask = (undefined4 *)FUN_00730eb0(&tagName); local_8 = 0xffffffff; *tagMask = 0x20; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -260,12 +260,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x40; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -281,12 +281,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x80; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -296,10 +296,10 @@ ulonglong ItemConfig::parse_tags(void *tagString) local_18 = (undefined1 *)0xf; local_1c = 8; tagName = (undefined *)0x6873756d; - local_28._0_1_ = 'r'; - local_28._1_1_ = 'o'; - local_28._2_1_ = 'o'; - local_28._3_1_ = 'm'; + (*(undefined1 *)((char *)&(local_28) + 0x0)) = 'r'; + (*(undefined1 *)((char *)&(local_28) + 0x1)) = 'o'; + (*(undefined1 *)((char *)&(local_28) + 0x2)) = 'o'; + (*(undefined1 *)((char *)&(local_28) + 0x3)) = 'm'; local_24 = 0; local_8 = 9; tagMask = (undefined4 *)FUN_00730eb0(&tagName); @@ -307,12 +307,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x100; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -329,12 +329,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x200; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -351,12 +351,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x400; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -373,12 +373,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x800; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -395,12 +395,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x1000; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -417,12 +417,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x2000; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -439,12 +439,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x4000; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -461,12 +461,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x8000; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -483,12 +483,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x10000; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -505,12 +505,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x20000; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -527,12 +527,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x40000; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -549,12 +549,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x80000; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -571,12 +571,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x100000; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -593,12 +593,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x200000; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -615,12 +615,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x400000; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -637,12 +637,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x800000; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -659,12 +659,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x1000000; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -681,12 +681,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x2000000; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -703,12 +703,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x8000000; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -725,12 +725,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x10000000; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -747,12 +747,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x20000000; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -769,12 +769,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x40000000; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -791,12 +791,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0x80000000; tagMask[1] = 0; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -813,12 +813,12 @@ ulonglong ItemConfig::parse_tags(void *tagString) *tagMask = 0; tagMask[1] = 1; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; puVar1 = tagName; if (0xfff < uVar2) { puVar1 = *(undefined **)(tagName + -4); - uVar2 = (int)local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + uVar2 = GHIDRA_INT(local_18) + 0x24; + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -840,21 +840,21 @@ ulonglong ItemConfig::parse_tags(void *tagString) if ((undefined1 *)0xfff < tagMask) { puVar1 = *(undefined **)(tagName + -4); tagMask = local_18 + 0x24; - if ((undefined *)0x1f < tagName + (-4 - (int)puVar1)) { + if ((undefined *)0x1f < tagName + (-4 - GHIDRA_INT(puVar1))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(puVar1,(uint)tagMask); + operator_delete(puVar1,GHIDRA_UINT(tagMask)); } } uStack_34 = 0; string_split(&tokensBegin,tagString,0x20); - uVar2 = uStack_34._4_4_; + uVar2 = (*(undefined4 *)((char *)&(uStack_34) + 0x4)); local_8 = 0x22; tokenIdx = 0; iVar4 = tokensEnd - tokensBegin >> 0x1f; - uStack_34._4_4_ = (uint)uStack_34; + (*(undefined4 *)((char *)&(uStack_34) + 0x4)) = GHIDRA_UINT(uStack_34); if ((tokensEnd - tokensBegin) / 0x18 + iVar4 != iVar4) { tokenOffset = 0; tagsHigh = uVar2; @@ -874,17 +874,17 @@ LAB_00723e2a: else { if (tagNode == tagMask) goto LAB_00723e2a; LAB_00723e4c: - uStack_34._4_4_ = uStack_34._4_4_ | *(uint *)(tagNode + 0x28); + (*(undefined4 *)((char *)&(uStack_34) + 0x4)) = (*(undefined4 *)((char *)&(uStack_34) + 0x4)) | *(uint *)(tagNode + 0x28); tagsHigh = tagsHigh | *(uint *)(tagNode + 0x2c); } tokenOffset = tokenOffset + 0x18; tokenIdx = tokenIdx + 1; - } while (tokenIdx < (uint)((tokensEnd - tokensBegin) / 0x18)); + } while (tokenIdx < GHIDRA_UINT(((tokensEnd - tokensBegin) / 0x18))); uVar2 = tagsHigh; } std::vector::_Tidy(); ExceptionList = local_10; - return CONCAT44(uVar2,uStack_34._4_4_); + return CONCAT44(uVar2,(*(undefined4 *)((char *)&(uStack_34) + 0x4))); } // 00723f20 @@ -914,7 +914,7 @@ uint ItemConfig::parse_cache_flags(std_string *text) local_8 = 0xffffffff; puStack_c = &LAB_00afcf41; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(lowerBound + 0x1c); + local_14 = __security_cookie ^ GHIDRA_UINT((lowerBound + 0x1c)); ExceptionList = &local_10; if (*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < DAT_00c80fd4) { _Init_thread_header(&DAT_00c80fd4,local_14); @@ -933,18 +933,18 @@ uint ItemConfig::parse_cache_flags(std_string *text) if (DAT_00c80fdc == 0) { local_18 = (undefined1 *)0xf; keySize = 6; - key = CONCAT17(key._7_1_,0x6567616d6164); + key = CONCAT17((*(undefined1 *)((char *)&(key) + 0x7)),0x6567616d6164); local_8 = 1; flagSlot = (undefined4 *)FUN_0069d630(&key); local_8 = 0xffffffff; *flagSlot = 1; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; allocBlock = (void *)key; if (0xfff < uVar2) { - allocBlock = *(void **)((int)(void *)key + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)(void *)key + (-4 - (int)allocBlock))) { + allocBlock = *(void **)(GHIDRA_INT((void *)key) + -4); + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT((void *)key) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -961,12 +961,12 @@ uint ItemConfig::parse_cache_flags(std_string *text) local_8 = 0xffffffff; *flagSlot = 2; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; allocBlock = (void *)key; if (0xfff < uVar2) { - allocBlock = *(void **)((int)(void *)key + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)(void *)key + (-4 - (int)allocBlock))) { + allocBlock = *(void **)(GHIDRA_INT((void *)key) + -4); + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT((void *)key) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -983,12 +983,12 @@ uint ItemConfig::parse_cache_flags(std_string *text) local_8 = 0xffffffff; *flagSlot = 4; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; allocBlock = (void *)key; if (0xfff < uVar2) { - allocBlock = *(void **)((int)(void *)key + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)(void *)key + (-4 - (int)allocBlock))) { + allocBlock = *(void **)(GHIDRA_INT((void *)key) + -4); + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT((void *)key) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1004,12 +1004,12 @@ uint ItemConfig::parse_cache_flags(std_string *text) local_8 = 0xffffffff; *flagSlot = 8; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; allocBlock = (void *)key; if (0xfff < uVar2) { - allocBlock = *(void **)((int)(void *)key + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)(void *)key + (-4 - (int)allocBlock))) { + allocBlock = *(void **)(GHIDRA_INT((void *)key) + -4); + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT((void *)key) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1025,12 +1025,12 @@ uint ItemConfig::parse_cache_flags(std_string *text) local_8 = 0xffffffff; *flagSlot = 0x10; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; allocBlock = (void *)key; if (0xfff < uVar2) { - allocBlock = *(void **)((int)(void *)key + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)(void *)key + (-4 - (int)allocBlock))) { + allocBlock = *(void **)(GHIDRA_INT((void *)key) + -4); + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT((void *)key) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1046,12 +1046,12 @@ uint ItemConfig::parse_cache_flags(std_string *text) local_8 = 0xffffffff; *flagSlot = 0x20; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; allocBlock = (void *)key; if (0xfff < uVar2) { - allocBlock = *(void **)((int)(void *)key + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)(void *)key + (-4 - (int)allocBlock))) { + allocBlock = *(void **)(GHIDRA_INT((void *)key) + -4); + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT((void *)key) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1067,12 +1067,12 @@ uint ItemConfig::parse_cache_flags(std_string *text) local_8 = 0xffffffff; *flagSlot = 0x40; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; allocBlock = (void *)key; if (0xfff < uVar2) { - allocBlock = *(void **)((int)(void *)key + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)(void *)key + (-4 - (int)allocBlock))) { + allocBlock = *(void **)(GHIDRA_INT((void *)key) + -4); + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT((void *)key) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1088,12 +1088,12 @@ uint ItemConfig::parse_cache_flags(std_string *text) local_8 = 0xffffffff; *flagSlot = 0x80; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; allocBlock = (void *)key; if (0xfff < uVar2) { - allocBlock = *(void **)((int)(void *)key + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)(void *)key + (-4 - (int)allocBlock))) { + allocBlock = *(void **)(GHIDRA_INT((void *)key) + -4); + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT((void *)key) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1109,12 +1109,12 @@ uint ItemConfig::parse_cache_flags(std_string *text) local_8 = 0xffffffff; *flagSlot = 0x100; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; allocBlock = (void *)key; if (0xfff < uVar2) { - allocBlock = *(void **)((int)(void *)key + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)(void *)key + (-4 - (int)allocBlock))) { + allocBlock = *(void **)(GHIDRA_INT((void *)key) + -4); + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT((void *)key) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1130,12 +1130,12 @@ uint ItemConfig::parse_cache_flags(std_string *text) local_8 = 0xffffffff; *flagSlot = 0x200; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; allocBlock = (void *)key; if (0xfff < uVar2) { - allocBlock = *(void **)((int)(void *)key + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)(void *)key + (-4 - (int)allocBlock))) { + allocBlock = *(void **)(GHIDRA_INT((void *)key) + -4); + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT((void *)key) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1151,12 +1151,12 @@ uint ItemConfig::parse_cache_flags(std_string *text) local_8 = 0xffffffff; *flagSlot = 0x400; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; allocBlock = (void *)key; if (0xfff < uVar2) { - allocBlock = *(void **)((int)(void *)key + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)(void *)key + (-4 - (int)allocBlock))) { + allocBlock = *(void **)(GHIDRA_INT((void *)key) + -4); + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT((void *)key) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1172,12 +1172,12 @@ uint ItemConfig::parse_cache_flags(std_string *text) local_8 = 0xffffffff; *flagSlot = 0x800; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; allocBlock = (void *)key; if (0xfff < uVar2) { - allocBlock = *(void **)((int)(void *)key + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)(void *)key + (-4 - (int)allocBlock))) { + allocBlock = *(void **)(GHIDRA_INT((void *)key) + -4); + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT((void *)key) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1193,12 +1193,12 @@ uint ItemConfig::parse_cache_flags(std_string *text) local_8 = 0xffffffff; *flagSlot = 0x1000; if (0xf < local_18) { - uVar2 = (int)local_18 + 1; + uVar2 = GHIDRA_INT(local_18) + 1; allocBlock = (void *)key; if (0xfff < uVar2) { - allocBlock = *(void **)((int)(void *)key + -4); - uVar2 = (int)local_18 + 0x24; - if (0x1f < (uint)((int)(void *)key + (-4 - (int)allocBlock))) { + allocBlock = *(void **)(GHIDRA_INT((void *)key) + -4); + uVar2 = GHIDRA_INT(local_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT((void *)key) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1217,14 +1217,14 @@ uint ItemConfig::parse_cache_flags(std_string *text) puVar3 = local_18 + 1; allocBlock = (void *)key; if ((undefined1 *)0xfff < puVar3) { - allocBlock = *(void **)((int)(void *)key + -4); + allocBlock = *(void **)(GHIDRA_INT((void *)key) + -4); puVar3 = local_18 + 0x24; - if (0x1f < (uint)((int)(void *)key + (-4 - (int)allocBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT((void *)key) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(allocBlock,(uint)puVar3); + operator_delete(allocBlock,GHIDRA_UINT(puVar3)); } } a = text; @@ -1271,7 +1271,7 @@ void ItemConfig::constructor() puStack_c = &LAB_00afd00d; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; (this->_collectibles)._begin = (void *)0x0; (this->_collectibles)._end = (void *)0x0; @@ -1307,7 +1307,7 @@ void ItemConfig::constructor() (this->_wispGfxRoot)._size = 0; (this->_wispGfxRoot)._capacity = 0xf; (this->_wispGfxRoot)._buf[0] = '\0'; - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; (this->_locustConfigs)._head = (void *)0x0; (this->_locustConfigs)._size = 0; containerHead = operator_new(0x54); @@ -1319,7 +1319,7 @@ void ItemConfig::constructor() (this->_availabilityFilters)._begin = (void *)0x0; (this->_availabilityFilters)._end = (void *)0x0; (this->_availabilityFilters)._capacity = (void *)0x0; - local_8._0_1_ = 9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; this[1]._collectibles._begin = (void *)0x0; this[1]._collectibles._end = (void *)0x0; containerHead = operator_new(0x20); @@ -1332,7 +1332,7 @@ void ItemConfig::constructor() this[1]._trinkets._begin = (void *)0x0; this[1]._trinkets._end = (void *)0x0; ppvVar1 = &this[1]._trinkets._capacity; - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; *ppvVar1 = (void *)0x0; this[1]._nullItems._begin = (void *)0x0; containerHead = operator_new(0x20); @@ -1341,7 +1341,7 @@ void ItemConfig::constructor() *(void **)((char *)containerHead + 8) = containerHead; *(undefined2 *)((char *)containerHead + 0xc) = 0x101; *ppvVar1 = containerHead; - local_8 = CONCAT31(local_8._1_3_,0xc); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xc); reset(this,uVar2); ExceptionList = local_10; return; @@ -1379,47 +1379,47 @@ void ItemConfig::reset() } byteOffset = byteOffset * 4; do { - *(undefined4 *)(byteOffset + (int)(this->_collectibles)._begin) = 0; + *(undefined4 *)(byteOffset + GHIDRA_INT((this->_collectibles)._begin)) = 0; byteOffset = byteOffset + 4; } while (byteOffset < 0xb74); std::vector<4byte>::resize(0xbe); byteOffset = 0; do { - *(undefined4 *)(byteOffset + (int)(this->_trinkets)._begin) = 0; + *(undefined4 *)(byteOffset + GHIDRA_INT((this->_trinkets)._begin)) = 0; byteOffset = byteOffset + 4; } while (byteOffset < 0x2f8); std::vector<4byte>::resize(0x85); byteOffset = 0; do { - *(undefined4 *)(byteOffset + (int)(this->_nullItems)._begin) = 0; + *(undefined4 *)(byteOffset + GHIDRA_INT((this->_nullItems)._begin)) = 0; byteOffset = byteOffset + 4; } while (byteOffset < 0x214); FUN_00731070(byteOffset); byteOffset = 0; do { - *(undefined4 *)(byteOffset + (int)(this->_cards)._begin) = 0; + *(undefined4 *)(byteOffset + GHIDRA_INT((this->_cards)._begin)) = 0; byteOffset = byteOffset + 4; } while (byteOffset < 0x188); FUN_00731000(byteOffset); byteOffset = 0; do { - *(undefined4 *)(byteOffset + (int)(this->_pillEffects)._begin) = 0; + *(undefined4 *)(byteOffset + GHIDRA_INT((this->_pillEffects)._begin)) = 0; byteOffset = byteOffset + 4; } while (byteOffset < 200); FUN_00730f90(byteOffset); byteOffset = 0; do { - *(undefined4 *)(byteOffset + (int)(this->_playerForms)._begin) = 0; + *(undefined4 *)(byteOffset + GHIDRA_INT((this->_playerForms)._begin)) = 0; byteOffset = byteOffset + 4; } while (byteOffset < 0x40); nullId = 0; - if ((int)(this->_nullItems)._end - (int)(this->_nullItems)._begin >> 2 != 0) { + if (GHIDRA_INT((this->_nullItems)._end) - GHIDRA_INT((this->_nullItems)._begin) >> 2 != 0) { do { if (g_mainHeap == (void *)0x0) { heapCounter = &g_allocatedBytesNoHeap; } else { - heapCounter = (qword *)((int)g_mainHeap + 0x30); + heapCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } allocBlock = malloc(0xec); if (allocBlock == (undefined4 *)0x0) { @@ -1436,16 +1436,16 @@ LAB_0072506f: else { *allocBlock = 0xec; qVar1 = *heapCounter; - *(uint *)heapCounter = (uint)*heapCounter + 0xec; + *(uint *)heapCounter = GHIDRA_UINT(*heapCounter) + 0xec; *(uint *)((char *)heapCounter + 4) = - *(uint *)((char *)heapCounter + 4) + (uint)(0xffffff13 < (uint)qVar1); + *(uint *)((char *)heapCounter + 4) + GHIDRA_UINT((0xffffff13 < GHIDRA_UINT(qVar1))); if ((ItemConfig_Item *)(allocBlock + 1) == (ItemConfig_Item *)0x0) goto LAB_0072506f; nullItem = ((ItemConfig_Item *)((ItemConfig_Item *)(allocBlock + 1)))->ItemConfig_Item::ItemConfig_Item(); } - *(ItemConfig_Item **)((int)(this->_nullItems)._begin + nullId * 4) = nullItem; - *(uint *)(*(int *)((int)(this->_nullItems)._begin + nullId * 4) + 4) = nullId; + *(ItemConfig_Item **)(GHIDRA_INT((this->_nullItems)._begin) + nullId * 4) = nullItem; + *(uint *)(*(int *)(GHIDRA_INT((this->_nullItems)._begin) + nullId * 4) + 4) = nullId; nullId = nullId + 1; - } while (nullId < (uint)((int)(this->_nullItems)._end - (int)(this->_nullItems)._begin >> 2)); + } while (nullId < GHIDRA_UINT((GHIDRA_INT((this->_nullItems)._end) - GHIDRA_INT((this->_nullItems)._begin) >> 2))); } nameMap = &this->_collectibleNameMap; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x84)) = 0; @@ -1490,25 +1490,25 @@ LAB_0072506f: (this->_collectibleNameMap)._size = 0; _Dst = this[1]._trinkets._begin; pvVar2 = *tailVectorBegin; - oldSize = (int)_Dst - (int)pvVar2 >> 2; + oldSize = GHIDRA_INT(_Dst) - GHIDRA_INT(pvVar2) >> 2; if (oldSize < 0x14) { if (0x12 < oldSize) goto LAB_0072516e; - if ((uint)((int)this[1]._trinkets._end - (int)pvVar2 >> 2) < 0x13) { + if (GHIDRA_UINT((GHIDRA_INT(this[1]._trinkets._end) - GHIDRA_INT(pvVar2) >> 2)) < 0x13) { FUN_00731f40(nameMap,mapRoot); goto LAB_0072516e; } _Size = (0x13 - oldSize) * 4; memset(_Dst,0,_Size); - pvVar2 = (void *)(_Size + (int)_Dst); + pvVar2 = (void *)(_Size + GHIDRA_INT(_Dst)); } else { - pvVar2 = (void *)((int)pvVar2 + 0x4c); + pvVar2 = (void *)(GHIDRA_INT(pvVar2) + 0x4c); } this[1]._trinkets._begin = pvVar2; LAB_0072516e: byteOffset = 0; do { - *(undefined4 *)(byteOffset + (int)*tailVectorBegin) = 0; + *(undefined4 *)(byteOffset + GHIDRA_INT(*tailVectorBegin)) = 0; byteOffset = byteOffset + 4; } while (byteOffset < 0x4c); return; @@ -1526,22 +1526,22 @@ void ItemConfig::destructor() puStack_c = &LAB_00af0a50; local_10 = ExceptionList; ExceptionList = &local_10; - clear(__security_cookie ^ (int)register0x00000010 - 4U); + clear(__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); this_00 = &this[1]._trinkets._capacity; FID_conflict__Erase_tree_>_> (this_00,(fuzzer_allocator_> *)this_00, - *(_Tree_node **)((int)this[1]._trinkets._capacity + 4)); + *(_Tree_node **)(GHIDRA_INT(this[1]._trinkets._capacity) + 4)); operator_delete(*this_00,0x20); FID_conflict__Tidy(&this[1]._collectibles._capacity); - FUN_007317d0(this + 1,*(undefined4 *)((int)this[1]._collectibles._begin + 4)); + FUN_007317d0(this + 1,*(undefined4 *)(GHIDRA_INT(this[1]._collectibles._begin) + 4)); operator_delete(this[1]._collectibles._begin,0x20); FID_conflict__Tidy(&this->_availabilityFilters); - FUN_00731820(&this->_locustConfigs,*(undefined4 *)((int)(this->_locustConfigs)._head + 4)); + FUN_00731820(&this->_locustConfigs,*(undefined4 *)(GHIDRA_INT((this->_locustConfigs)._head) + 4)); operator_delete((this->_locustConfigs)._head,0x54); ((std::string *)((this->_wispGfxRoot)._buf))->std::string::_Tidy_deallocate(); FID_conflict__Tidy(&this->_playerForms); FUN_004235c0(&this->_collectibleNameMap, - *(undefined4 *)((int)(this->_collectibleNameMap)._head + 4)); + *(undefined4 *)(GHIDRA_INT((this->_collectibleNameMap)._head) + 4)); operator_delete((this->_collectibleNameMap)._head,0x2c); FID_conflict__Tidy(&this->_pillEffects); FID_conflict__Tidy(&this->_cards); @@ -1578,7 +1578,7 @@ void ItemConfig::clear() *(undefined4 *)(*in_ECX + i * 4) = 0; i = i + 1; vectorBegin = *in_ECX; - } while (i < (uint)(in_ECX[1] - vectorBegin >> 2)); + } while (i < GHIDRA_UINT((in_ECX[1] - vectorBegin >> 2))); } vectorBegin = in_ECX[3]; i = 0; @@ -1592,7 +1592,7 @@ void ItemConfig::clear() *(undefined4 *)(in_ECX[3] + i * 4) = 0; i = i + 1; vectorBegin = in_ECX[3]; - } while (i < (uint)(in_ECX[4] - vectorBegin >> 2)); + } while (i < GHIDRA_UINT((in_ECX[4] - vectorBegin >> 2))); } vectorBegin = in_ECX[6]; i = 0; @@ -1606,7 +1606,7 @@ void ItemConfig::clear() *(undefined4 *)(in_ECX[6] + i * 4) = 0; i = i + 1; vectorBegin = in_ECX[6]; - } while (i < (uint)(in_ECX[7] - vectorBegin >> 2)); + } while (i < GHIDRA_UINT((in_ECX[7] - vectorBegin >> 2))); } vectorBegin = in_ECX[9]; i = 0; @@ -1614,15 +1614,15 @@ void ItemConfig::clear() do { entry = *(void **)(vectorBegin + i * 4); if (entry != (void *)0x0) { - ((std::string *)((char *)((int)entry + 0x38)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)entry + 0x20)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)entry + 8)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(entry) + 0x38)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(entry) + 0x20)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(entry) + 8)))->std::string::_Tidy_deallocate(); operator_delete(entry,0x70); } *(undefined4 *)(in_ECX[9] + i * 4) = 0; i = i + 1; vectorBegin = in_ECX[9]; - } while (i < (uint)(in_ECX[10] - vectorBegin >> 2)); + } while (i < GHIDRA_UINT((in_ECX[10] - vectorBegin >> 2))); } vectorBegin = in_ECX[0xc]; i = 0; @@ -1630,14 +1630,14 @@ void ItemConfig::clear() do { entry = *(void **)(vectorBegin + i * 4); if (entry != (void *)0x0) { - ((std::string *)((char *)((int)entry + 0x20)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)entry + 8)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(entry) + 0x20)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(entry) + 8)))->std::string::_Tidy_deallocate(); operator_delete(entry,0x54); } *(undefined4 *)(in_ECX[0xc] + i * 4) = 0; i = i + 1; vectorBegin = in_ECX[0xc]; - } while (i < (uint)(in_ECX[0xd] - vectorBegin >> 2)); + } while (i < GHIDRA_UINT((in_ECX[0xd] - vectorBegin >> 2))); } vectorBegin = in_ECX[0x11]; i = 0; @@ -1645,13 +1645,13 @@ void ItemConfig::clear() do { entry = *(void **)(vectorBegin + i * 4); if (entry != (void *)0x0) { - ((std::string *)((char *)((int)entry + 0x10)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(entry) + 0x10)))->std::string::_Tidy_deallocate(); operator_delete(entry,0x30); } *(undefined4 *)(in_ECX[0x11] + i * 4) = 0; i = i + 1; vectorBegin = in_ECX[0x11]; - } while (i < (uint)(in_ECX[0x12] - vectorBegin >> 2)); + } while (i < GHIDRA_UINT((in_ECX[0x12] - vectorBegin >> 2))); } std::vector<4byte>::resize(0x2dd); std::vector<4byte>::resize(0xbe); @@ -1677,14 +1677,14 @@ void ItemConfig::clear() do { entry = *(void **)(vectorBegin + i * 4); if (entry != (void *)0x0) { - ((std::string *)((char *)((int)entry + 0x174)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)entry + 0x15c)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(entry) + 0x174)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(entry) + 0x15c)))->std::string::_Tidy_deallocate(); operator_delete(entry,0x198); } *(undefined4 *)(in_ECX[0x46] + i * 4) = 0; i = i + 1; vectorBegin = in_ECX[0x46]; - } while (i < (uint)(in_ECX[0x47] - vectorBegin >> 2)); + } while (i < GHIDRA_UINT((in_ECX[0x47] - vectorBegin >> 2))); } return; } @@ -1736,31 +1736,31 @@ byte ItemConfig::Load(byte *xmlPath, void *modEntry) ehState = (void *)0xffffffff; puStack_18 = &LAB_00afd080; savedExceptionList = ExceptionList; - uVar5 = __security_cookie ^ (uint)((int)&scratchString + 0x78U); + uVar5 = __security_cookie ^ GHIDRA_UINT((GHIDRA_INT(&scratchString) + 0x78U)); ExceptionList = &savedExceptionList; - modData = -(uint)(modEntry != (void *)0x0) & (int)modEntry + 0xecU; + modData = -GHIDRA_UINT((modEntry != (void *)0x0)) & GHIDRA_INT(modEntry) + 0xecU; if (modData == 0) { uVar15 = 0; pvVar8 = (this->_collectibles)._begin; - if ((int)(this->_collectibles)._end - (int)pvVar8 >> 2 != 0) { + if (GHIDRA_INT((this->_collectibles)._end) - GHIDRA_INT(pvVar8) >> 2 != 0) { do { - tmpItem = *(ItemConfig_Item **)(uVar15 * 4 + (int)pvVar8); + tmpItem = *(ItemConfig_Item **)(uVar15 * 4 + GHIDRA_INT(pvVar8)); if (tmpItem != (ItemConfig_Item *)0x0) { ((ItemConfig_Item *)(tmpItem))->ItemConfig_Item::~ItemConfig_Item(); operator_delete(tmpItem,0xe8); } iVar7 = uVar15 * 4; uVar15 = uVar15 + 1; - *(undefined4 *)((int)(this->_collectibles)._begin + iVar7) = 0; + *(undefined4 *)(GHIDRA_INT((this->_collectibles)._begin) + iVar7) = 0; pvVar8 = (this->_collectibles)._begin; - } while (uVar15 < (uint)((int)(this->_collectibles)._end - (int)pvVar8 >> 2)); + } while (uVar15 < GHIDRA_UINT((GHIDRA_INT((this->_collectibles)._end) - GHIDRA_INT(pvVar8) >> 2))); } trinketList = &this->_trinkets; pvVar8 = trinketList->_begin; uVar15 = 0; - if ((int)(this->_trinkets)._end - (int)pvVar8 >> 2 != 0) { + if (GHIDRA_INT((this->_trinkets)._end) - GHIDRA_INT(pvVar8) >> 2 != 0) { do { - tmpItem = *(ItemConfig_Item **)(uVar15 * 4 + (int)pvVar8); + tmpItem = *(ItemConfig_Item **)(uVar15 * 4 + GHIDRA_INT(pvVar8)); if (tmpItem != (ItemConfig_Item *)0x0) { ((ItemConfig_Item *)(tmpItem))->ItemConfig_Item::~ItemConfig_Item(); operator_delete(tmpItem,0xe8); @@ -1769,7 +1769,7 @@ byte ItemConfig::Load(byte *xmlPath, void *modEntry) uVar15 = uVar15 + 1; *(undefined4 *)((char *)trinketList->_begin + iVar7) = 0; pvVar8 = trinketList->_begin; - } while (uVar15 < (uint)((int)(this->_trinkets)._end - (int)pvVar8 >> 2)); + } while (uVar15 < GHIDRA_UINT((GHIDRA_INT((this->_trinkets)._end) - GHIDRA_INT(pvVar8) >> 2))); } pvVar8 = (this->_collectibleNameMap)._head; FUN_004235c0(&this->_collectibleNameMap,*(undefined4 *)((char *)pvVar8 + 4)); @@ -1781,25 +1781,25 @@ byte ItemConfig::Load(byte *xmlPath, void *modEntry) std::vector<4byte>::resize(0xbe); uVar15 = 0; pvVar8 = this[1]._collectibles._capacity; - if ((int)this[1]._trinkets._begin - (int)pvVar8 >> 2 != 0) { + if (GHIDRA_INT(this[1]._trinkets._begin) - GHIDRA_INT(pvVar8) >> 2 != 0) { do { - pvVar8 = *(void **)(uVar15 * 4 + (int)pvVar8); + pvVar8 = *(void **)(uVar15 * 4 + GHIDRA_INT(pvVar8)); if (pvVar8 != (void *)0x0) { - ((std::string *)((char *)((int)pvVar8 + 0x174)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)pvVar8 + 0x15c)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(pvVar8) + 0x174)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(pvVar8) + 0x15c)))->std::string::_Tidy_deallocate(); operator_delete(pvVar8,0x198); } iVar7 = uVar15 * 4; uVar15 = uVar15 + 1; - *(undefined4 *)((int)this[1]._collectibles._capacity + iVar7) = 0; + *(undefined4 *)(GHIDRA_INT(this[1]._collectibles._capacity) + iVar7) = 0; pvVar8 = this[1]._collectibles._capacity; - } while (uVar15 < (uint)((int)this[1]._trinkets._begin - (int)pvVar8 >> 2)); + } while (uVar15 < GHIDRA_UINT((GHIDRA_INT(this[1]._trinkets._begin) - GHIDRA_INT(pvVar8) >> 2))); } pvVar8 = this[1]._trinkets._capacity; this_00 = &this[1]._trinkets._capacity; FID_conflict__Erase_tree_>_> (this_00,(fuzzer_allocator_> *)this_00, - *(_Tree_node **)((int)pvVar8 + 4)); + *(_Tree_node **)(GHIDRA_INT(pvVar8) + 4)); *(void **)((char *)pvVar8 + 4) = pvVar8; *(void **)pvVar8 = pvVar8; *(void **)((char *)pvVar8 + 8) = pvVar8; @@ -1833,14 +1833,14 @@ byte ItemConfig::Load(byte *xmlPath, void *modEntry) pbVar14 = text; ((rapidxml::xml_document *)(xmlDoc))->rapidxml::xml_document::parse(text); bVar4 = (byte)pbVar14; - pvVar8 = ((xml_node *)(xmlDoc))->xml_node::first_node(&DAT_00b66fc8,(int)pcVar17,bVar4); + pvVar8 = ((xml_node *)(xmlDoc))->xml_node::first_node(&DAT_00b66fc8,GHIDRA_INT(pcVar17),bVar4); if (pvVar8 == (void *)0x0) { pcVar17 = "Could not find root node \'items\' in %s\n"; pbVar14 = xmlPath; KAGE_LogMessage(0x10,(byte *)"Could not find root node \'items\' in %s\n"); bVar4 = (byte)pbVar14; } - pvVar9 = ((xml_node *)(pvVar8))->xml_node::first_attribute((byte *)"version",(uint)pcVar17,bVar4); + pvVar9 = ((xml_node *)(pvVar8))->xml_node::first_attribute((byte *)"version",GHIDRA_UINT(pcVar17),bVar4); pbVar13 = &DAT_00b63104; pbVar14 = &g_xmlNullStr; if (*(byte **)((char *)pvVar9 + 4) != (byte *)0x0) { @@ -1852,7 +1852,7 @@ byte ItemConfig::Load(byte *xmlPath, void *modEntry) bVar16 = bVar2 < *pbVar13; if (bVar2 != *pbVar13) { LAB_007258d0: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_007258d5; } if (bVar2 == 0) break; @@ -1869,7 +1869,7 @@ LAB_007258d5: bVar4 = (byte)xmlPath; pcVar17 = (char *)pbVar14; } - pvVar9 = ((xml_node *)(pvVar8))->xml_node::first_attribute(&DAT_00b6987c,(uint)pcVar17,bVar4); + pvVar9 = ((xml_node *)(pvVar8))->xml_node::first_attribute(&DAT_00b6987c,GHIDRA_UINT(pcVar17),bVar4); gfxRoot._size = 0; gfxRoot._capacity = 0xf; gfxRoot._buf[0] = '\0'; @@ -1885,11 +1885,11 @@ LAB_007258d5: bVar4 = *pbVar13; pbVar13 = pbVar13 + 1; } while (bVar4 != 0); - uVar5 = (int)pbVar13 - (int)(pbVar14 + 1); + uVar5 = GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar14 + 1)); ((std::string *)(gfxRoot._buf))->std::string::assign(pbVar14,uVar5); - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; if ((modEntry != (void *)0x0) && - (pvVar9 = ((xml_node *)(pvVar8))->xml_node::first_attribute((byte *)"deathanm2",(uint)pbVar14,(byte)uVar5), + (pvVar9 = ((xml_node *)(pvVar8))->xml_node::first_attribute((byte *)"deathanm2",GHIDRA_UINT(pbVar14),(byte)uVar5), pvVar9 != (void *)0x0)) { xmlString._size = 0; pbVar14 = &g_xmlNullStr; @@ -1906,17 +1906,17 @@ LAB_007258d5: bVar4 = *pbVar13; pbVar13 = pbVar13 + 1; } while (bVar4 != 0); - ((std::string *)(xmlString._buf))->std::string::assign(pbVar14,(int)pbVar13 - (int)(pbVar14 + 1)); - ehState._0_1_ = 2; + ((std::string *)(xmlString._buf))->std::string::assign(pbVar14,GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar14 + 1))); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; ((Mod *)(modEntry))->Mod::load_content_anm2(0xb,&xmlString); - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; if (0xf < xmlString._capacity) { uVar5 = xmlString._capacity + 1; - pvVar9 = (void *)xmlString._buf._0_4_; + pvVar9 = (*(undefined4 *)((char *)&((void *)xmlString._buf) + 0x0)); if (0xfff < uVar5) { - pvVar9 = *(void **)(xmlString._buf._0_4_ + -4); + pvVar9 = *(void **)((*(undefined4 *)((char *)&(xmlString._buf) + 0x0)) + -4); uVar5 = xmlString._capacity + 0x24; - if (0x1f < (xmlString._buf._0_4_ - (int)pvVar9) - 4U) goto LAB_007273ca; + if (0x1f < ((*(undefined4 *)((char *)&(xmlString._buf) + 0x0)) - GHIDRA_INT(pvVar9)) - 4U) goto LAB_007273ca; } operator_delete(pvVar9,uVar5); } @@ -1945,12 +1945,12 @@ LAB_007258d5: bVar4 = *pbVar13; pbVar13 = pbVar13 + 1; } while (bVar4 != 0); - ((std::string *)(xmlString._buf))->std::string::assign(pbVar14,(int)pbVar13 - (int)(pbVar14 + 1)); - ehState._0_1_ = 3; + ((std::string *)(xmlString._buf))->std::string::assign(pbVar14,GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar14 + 1))); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 3; pcVar17 = "passive"; psVar12 = &xmlString; if (0xf < xmlString._capacity) { - psVar12 = (std_string *)xmlString._buf._0_4_; + psVar12 = (*(undefined4 *)((char *)&((std_string *)xmlString._buf) + 0x0)); } uVar5 = xmlString._size; uVar15 = xmlString._size; @@ -1979,7 +1979,7 @@ LAB_00725ac6: && ((uVar3 == 0xffffffff || (bVar16 = (byte)psVar12->_buf[3] < (byte)pcVar17[3], psVar12->_buf[3] == pcVar17[3])))))))))))) goto LAB_00725afa; - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; } if (((uVar5 == 0) && (6 < xmlString._size)) && (xmlString._size < 8)) { newItem->type = 1; @@ -1988,7 +1988,7 @@ LAB_00725ac6: pcVar17 = "trinket"; psVar12 = &xmlString; if (0xf < xmlString._capacity) { - psVar12 = (std_string *)xmlString._buf._0_4_; + psVar12 = (*(undefined4 *)((char *)&((std_string *)xmlString._buf) + 0x0)); } while (uVar5 = uVar15 - 4, 3 < uVar15) { if (*(int *)psVar12->_buf != *(int *)pcVar17) goto LAB_00725b46; @@ -2012,7 +2012,7 @@ LAB_00725b46: ((uVar5 == 0xffffffff || (bVar16 = (byte)psVar12->_buf[3] < (byte)pcVar17[3], psVar12->_buf[3] == pcVar17[3])))))))))))) goto LAB_00725b7a; - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; } if (((uVar5 == 0) && (6 < xmlString._size)) && (xmlString._size < 8)) { newItem->type = 2; @@ -2020,7 +2020,7 @@ LAB_00725b46: else { psVar12 = &xmlString; if (0xf < xmlString._capacity) { - psVar12 = (std_string *)xmlString._buf._0_4_; + psVar12 = (*(undefined4 *)((char *)&((std_string *)xmlString._buf) + 0x0)); } pcVar17 = "active"; uVar5 = xmlString._size; @@ -2049,7 +2049,7 @@ LAB_00725bd6: ((uVar15 == 0xffffffff || (bVar16 = (byte)psVar12->_buf[3] < (byte)pcVar17[3], psVar12->_buf[3] == pcVar17[3])))))))))))) goto LAB_00725c0a; - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; } if (((uVar5 == 0) && (5 < xmlString._size)) && (xmlString._size < 7)) { newItem->type = 3; @@ -2059,7 +2059,7 @@ LAB_00725bd6: else { psVar12 = &xmlString; if (0xf < xmlString._capacity) { - psVar12 = (std_string *)xmlString._buf._0_4_; + psVar12 = (*(undefined4 *)((char *)&((std_string *)xmlString._buf) + 0x0)); } pcVar17 = "familiar"; uVar5 = xmlString._size; @@ -2089,7 +2089,7 @@ LAB_00725c6c: ((uVar15 == 0xffffffff || (bVar16 = (byte)psVar12->_buf[3] < (byte)pcVar17[3], psVar12->_buf[3] == pcVar17[3])))))))))))) goto LAB_00725ca0; - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; } if (((uVar5 == 0) && (7 < xmlString._size)) && (xmlString._size < 9)) { newItem->cacheFlags = newItem->cacheFlags | 0x200; @@ -2098,7 +2098,7 @@ LAB_00725c6c: else { psVar12 = &xmlString; if (0xf < xmlString._capacity) { - psVar12 = (std_string *)xmlString._buf._0_4_; + psVar12 = (*(undefined4 *)((char *)&((std_string *)xmlString._buf) + 0x0)); } pbVar14 = (byte *)&DAT_00b6982c; uVar5 = xmlString._size; @@ -2127,7 +2127,7 @@ LAB_00725cfc: ((uVar15 == 0xffffffff || (bVar16 = (byte)psVar12->_buf[3] < pbVar14[3], psVar12->_buf[3] == pbVar14[3])))))))))))) goto LAB_00725d30; - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; } if (((uVar5 == 0) && (3 < xmlString._size)) && (xmlString._size < 5)) { newItem->type = 0; @@ -2153,7 +2153,7 @@ LAB_00725cfc: bVar16 = bVar4 < *pbVar10; if (bVar4 != *pbVar10) { LAB_00725db7: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00725dbc; } if (bVar4 == 0) break; @@ -2184,7 +2184,7 @@ LAB_00725dbc: bVar16 = bVar4 < *pbVar10; if (bVar4 != *pbVar10) { LAB_00725e14: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00725e19; } if (bVar4 == 0) break; @@ -2206,7 +2206,7 @@ LAB_00725e19: bVar4 = *pbVar13; pbVar13 = pbVar13 + 1; } while (bVar4 != 0); - ((std::string *)((newItem->name)._buf))->std::string::assign(pbVar14,(int)pbVar13 - (int)(pbVar14 + 1)); + ((std::string *)((newItem->name)._buf))->std::string::assign(pbVar14,GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar14 + 1))); } else { pcVar17 = "description"; @@ -2219,7 +2219,7 @@ LAB_00725e19: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_00725e80: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00725e85; } if (bVar4 == 0) break; @@ -2241,7 +2241,7 @@ LAB_00725e85: bVar4 = *pbVar13; pbVar13 = pbVar13 + 1; } while (bVar4 != 0); - ((std::string *)((newItem->desc)._buf))->std::string::assign(pbVar14,(int)pbVar13 - (int)(pbVar14 + 1)); + ((std::string *)((newItem->desc)._buf))->std::string::assign(pbVar14,GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar14 + 1))); } else { pbVar10 = &DAT_00b66fec; @@ -2254,7 +2254,7 @@ LAB_00725e85: bVar16 = bVar4 < *pbVar10; if (bVar4 != *pbVar10) { LAB_00725ee8: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00725eed; } if (bVar4 == 0) break; @@ -2276,23 +2276,23 @@ LAB_00725eed: if (0x7fffffff - gfxRoot._size < 9) goto LAB_00727429; psVar12 = &gfxRoot; if (0xf < gfxRoot._capacity) { - psVar12 = (std_string *)gfxRoot._buf._0_4_; + psVar12 = (*(undefined4 *)((char *)&((std_string *)gfxRoot._buf) + 0x0)); } ((std::string *)(scratchString._buf))->std::string::concat(modData,(std_string *)gfxRoot._size, (byte *)psVar12,gfxRoot._size,(byte *)"trinkets/",9); - ehState._0_1_ = 4; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 4; pbVar14 = pbVar13; do { bVar4 = *pbVar14; pbVar14 = pbVar14 + 1; } while (bVar4 != 0); piVar11 = ((std::string *)(scratchString._buf))->std::string::append(pbVar13, - (int)pbVar14 - (int)(pbVar13 + 1)); + GHIDRA_INT(pbVar14) - GHIDRA_INT((pbVar13 + 1))); psVar12 = &newItem->gfxFilename; - trinketGfxPath._buf._0_4_ = *piVar11; - trinketGfxPath._buf._4_4_ = piVar11[1]; - trinketGfxPath._buf._8_4_ = piVar11[2]; - trinketGfxPath._buf._12_4_ = piVar11[3]; + (*(undefined4 *)((char *)&(trinketGfxPath._buf) + 0x0)) = *piVar11; + (*(undefined4 *)((char *)&(trinketGfxPath._buf) + 0x4)) = piVar11[1]; + (*(undefined4 *)((char *)&(trinketGfxPath._buf) + 0x8)) = piVar11[2]; + (*(undefined4 *)((char *)&(trinketGfxPath._buf) + 0xc)) = piVar11[3]; uVar5 = piVar11[4]; uVar15 = piVar11[5]; piVar11[4] = 0; @@ -2300,18 +2300,18 @@ LAB_00725eed: *(undefined1 *)piVar11 = 0; trinketGfxPath._size = uVar5; trinketGfxPath._capacity = uVar15; - attrValue._buf._8_4_ = trinketGfxPath._buf._0_4_; - attrValue._buf._12_4_ = trinketGfxPath._buf._4_4_; - attrValue._size = trinketGfxPath._buf._8_4_; - attrValue._capacity = trinketGfxPath._buf._12_4_; + (*(undefined4 *)((char *)&(attrValue._buf) + 0x8)) = (*(undefined4 *)((char *)&(trinketGfxPath._buf) + 0x0)); + (*(undefined4 *)((char *)&(attrValue._buf) + 0xc)) = (*(undefined4 *)((char *)&(trinketGfxPath._buf) + 0x4)); + attrValue._size = (*(undefined4 *)((char *)&(trinketGfxPath._buf) + 0x8)); + attrValue._capacity = (*(undefined4 *)((char *)&(trinketGfxPath._buf) + 0xc)); if (psVar12 == &trinketGfxPath) { if (0xf < uVar15) { uVar5 = uVar15 + 1; - pvVar8 = (void *)trinketGfxPath._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)trinketGfxPath._buf) + 0x0)); if (0xfff < uVar5) { - pvVar8 = *(void **)(trinketGfxPath._buf._0_4_ + -4); + pvVar8 = *(void **)((*(undefined4 *)((char *)&(trinketGfxPath._buf) + 0x0)) + -4); uVar5 = uVar15 + 0x24; - if (0x1f < (uint)(trinketGfxPath._buf._0_4_ + (-4 - (int)pvVar8))) + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(trinketGfxPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar8))))) goto LAB_007273ca; } operator_delete(pvVar8,uVar5); @@ -2319,21 +2319,21 @@ LAB_00725eed: } else { ((std::string *)(psVar12->_buf))->std::string::_Tidy_deallocate(); - *(undefined4 *)psVar12->_buf = attrValue._buf._8_4_; - *(undefined4 *)((newItem->gfxFilename)._buf + 4) = attrValue._buf._12_4_; + *(undefined4 *)psVar12->_buf = (*(undefined4 *)((char *)&(attrValue._buf) + 0x8)); + *(undefined4 *)((newItem->gfxFilename)._buf + 4) = (*(undefined4 *)((char *)&(attrValue._buf) + 0xc)); *(uint *)((newItem->gfxFilename)._buf + 8) = attrValue._size; *(uint *)((newItem->gfxFilename)._buf + 0xc) = attrValue._capacity; (newItem->gfxFilename)._size = uVar5; (newItem->gfxFilename)._capacity = uVar15; } - ehState._0_1_ = 3; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 3; if (0xf < scratchString._capacity) { uVar5 = scratchString._capacity + 1; - pvVar8 = (void *)scratchString._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)scratchString._buf) + 0x0)); if (0xfff < uVar5) { - pvVar8 = *(void **)(scratchString._buf._0_4_ + -4); + pvVar8 = *(void **)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + -4); uVar5 = scratchString._capacity + 0x24; - if (0x1f < (uint)(scratchString._buf._0_4_ + (-4 - (int)pvVar8))) + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar8))))) goto LAB_007273ca; } operator_delete(pvVar8,uVar5); @@ -2351,41 +2351,41 @@ LAB_00727429: } psVar12 = &gfxRoot; if (0xf < gfxRoot._capacity) { - psVar12 = (std_string *)gfxRoot._buf._0_4_; + psVar12 = (*(undefined4 *)((char *)&((std_string *)gfxRoot._buf) + 0x0)); } ((std::string *)(scratchString._buf))->std::string::concat(modData,(std_string *)gfxRoot._size, (byte *)psVar12,gfxRoot._size,(byte *)"collectibles/",0xd); - ehState._0_1_ = 5; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; pbVar14 = pbVar13; do { bVar4 = *pbVar14; pbVar14 = pbVar14 + 1; } while (bVar4 != 0); piVar11 = ((std::string *)(scratchString._buf))->std::string::append(pbVar13, - (int)pbVar14 - (int)(pbVar13 + 1)); + GHIDRA_INT(pbVar14) - GHIDRA_INT((pbVar13 + 1))); psVar12 = &newItem->gfxFilename; - collectibleGfxPath._buf._0_4_ = *piVar11; - collectibleGfxPath._buf._4_4_ = piVar11[1]; - collectibleGfxPath._buf._8_4_ = piVar11[2]; - collectibleGfxPath._buf._12_4_ = piVar11[3]; - uVar1._0_4_ = piVar11[4]; - uVar1._4_4_ = piVar11[5]; + (*(undefined4 *)((char *)&(collectibleGfxPath._buf) + 0x0)) = *piVar11; + (*(undefined4 *)((char *)&(collectibleGfxPath._buf) + 0x4)) = piVar11[1]; + (*(undefined4 *)((char *)&(collectibleGfxPath._buf) + 0x8)) = piVar11[2]; + (*(undefined4 *)((char *)&(collectibleGfxPath._buf) + 0xc)) = piVar11[3]; + (*(undefined4 *)((char *)&(uVar1) + 0x0)) = piVar11[4]; + (*(undefined4 *)((char *)&(uVar1) + 0x4)) = piVar11[5]; piVar11[4] = 0; piVar11[5] = 0xf; *(undefined1 *)piVar11 = 0; - collectibleGfxPath._16_8_ = uVar1; - attrValue._buf._8_4_ = collectibleGfxPath._buf._0_4_; - attrValue._buf._12_4_ = collectibleGfxPath._buf._4_4_; - attrValue._size = collectibleGfxPath._buf._8_4_; - attrValue._capacity = collectibleGfxPath._buf._12_4_; + (*(undefined8 *)((char *)&(collectibleGfxPath) + 0x10)) = uVar1; + (*(undefined4 *)((char *)&(attrValue._buf) + 0x8)) = (*(undefined4 *)((char *)&(collectibleGfxPath._buf) + 0x0)); + (*(undefined4 *)((char *)&(attrValue._buf) + 0xc)) = (*(undefined4 *)((char *)&(collectibleGfxPath._buf) + 0x4)); + attrValue._size = (*(undefined4 *)((char *)&(collectibleGfxPath._buf) + 0x8)); + attrValue._capacity = (*(undefined4 *)((char *)&(collectibleGfxPath._buf) + 0xc)); if (psVar12 == &collectibleGfxPath) { - if (0xf < uVar1._4_4_) { - uVar5 = uVar1._4_4_ + 1; - pvVar8 = (void *)collectibleGfxPath._buf._0_4_; + if (0xf < (*(undefined4 *)((char *)&(uVar1) + 0x4))) { + uVar5 = (*(undefined4 *)((char *)&(uVar1) + 0x4)) + 1; + pvVar8 = (*(undefined4 *)((char *)&((void *)collectibleGfxPath._buf) + 0x0)); if (0xfff < uVar5) { - pvVar8 = *(void **)(collectibleGfxPath._buf._0_4_ + -4); - uVar5 = uVar1._4_4_ + 0x24; - if (0x1f < (uint)(collectibleGfxPath._buf._0_4_ + (-4 - (int)pvVar8))) + pvVar8 = *(void **)((*(undefined4 *)((char *)&(collectibleGfxPath._buf) + 0x0)) + -4); + uVar5 = (*(undefined4 *)((char *)&(uVar1) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(collectibleGfxPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar8))))) goto LAB_007273ca; } operator_delete(pvVar8,uVar5); @@ -2400,27 +2400,27 @@ LAB_00727429: if (0xfff < uVar15) { pvVar9 = *(void **)((char *)pvVar8 + -4); uVar15 = uVar5 + 0x24; - if (0x1f < (uint)((int)pvVar8 + (-4 - (int)pvVar9))) goto LAB_007273ca; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar8) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_007273ca; } operator_delete(pvVar9,uVar15); } (newItem->gfxFilename)._size = 0; (newItem->gfxFilename)._capacity = 0xf; - *(undefined4 *)psVar12->_buf = attrValue._buf._8_4_; - *(undefined4 *)((newItem->gfxFilename)._buf + 4) = attrValue._buf._12_4_; + *(undefined4 *)psVar12->_buf = (*(undefined4 *)((char *)&(attrValue._buf) + 0x8)); + *(undefined4 *)((newItem->gfxFilename)._buf + 4) = (*(undefined4 *)((char *)&(attrValue._buf) + 0xc)); *(uint *)((newItem->gfxFilename)._buf + 8) = attrValue._size; *(uint *)((newItem->gfxFilename)._buf + 0xc) = attrValue._capacity; - (newItem->gfxFilename)._size = (uint)uVar1; - (newItem->gfxFilename)._capacity = uVar1._4_4_; + (newItem->gfxFilename)._size = GHIDRA_UINT(uVar1); + (newItem->gfxFilename)._capacity = (*(undefined4 *)((char *)&(uVar1) + 0x4)); } - ehState._0_1_ = 3; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 3; if (0xf < scratchString._capacity) { uVar5 = scratchString._capacity + 1; - pvVar8 = (void *)scratchString._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)scratchString._buf) + 0x0)); if (0xfff < uVar5) { - pvVar8 = *(void **)(scratchString._buf._0_4_ + -4); + pvVar8 = *(void **)((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + -4); uVar5 = scratchString._capacity + 0x24; - if (0x1f < (uint)(scratchString._buf._0_4_ + (-4 - (int)pvVar8))) + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(scratchString._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar8))))) goto LAB_007273ca; } operator_delete(pvVar8,uVar5); @@ -2438,7 +2438,7 @@ LAB_00727429: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_007261f0: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_007261f5; } if (bVar4 == 0) break; @@ -2469,7 +2469,7 @@ LAB_007261f5: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_00726250: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00726255; } if (bVar4 == 0) break; @@ -2497,18 +2497,18 @@ LAB_00726255: bVar4 = *pbVar13; pbVar13 = pbVar13 + 1; } while (bVar4 != 0); - ((std::string *)(attrValue._buf))->std::string::assign(pbVar14,(int)pbVar13 - (int)(pbVar14 + 1)); - ehState._0_1_ = 6; + ((std::string *)(attrValue._buf))->std::string::assign(pbVar14,GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar14 + 1))); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 6; uVar5 = parse_cache_flags(&attrValue); newItem->cacheFlags = newItem->cacheFlags | uVar5; - ehState._0_1_ = 3; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 3; if (0xf < attrValue._capacity) { uVar5 = attrValue._capacity + 1; - pvVar8 = (void *)attrValue._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); if (0xfff < uVar5) { - pvVar8 = *(void **)(attrValue._buf._0_4_ + -4); + pvVar8 = *(void **)((*(undefined4 *)((char *)&(attrValue._buf) + 0x0)) + -4); uVar5 = attrValue._capacity + 0x24; - if (0x1f < (attrValue._buf._0_4_ - (int)pvVar8) - 4U) goto LAB_007273ca; + if (0x1f < ((*(undefined4 *)((char *)&(attrValue._buf) + 0x0)) - GHIDRA_INT(pvVar8)) - 4U) goto LAB_007273ca; } operator_delete(pvVar8,uVar5); } @@ -2524,7 +2524,7 @@ LAB_00726255: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_00726322: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00726327; } if (bVar4 == 0) break; @@ -2555,7 +2555,7 @@ LAB_00726327: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_00726380: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00726385; } if (bVar4 == 0) break; @@ -2586,7 +2586,7 @@ LAB_00726385: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_007263e0: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_007263e5; } if (bVar4 == 0) break; @@ -2617,7 +2617,7 @@ LAB_007263e5: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_00726440: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00726445; } if (bVar4 == 0) break; @@ -2648,7 +2648,7 @@ LAB_00726445: bVar16 = bVar4 < *pbVar10; if (bVar4 != *pbVar10) { LAB_007264a0: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_007264a5; } if (bVar4 == 0) break; @@ -2679,7 +2679,7 @@ LAB_007264a5: bVar16 = bVar4 < *pbVar10; if (bVar4 != *pbVar10) { LAB_00726500: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00726505; } if (bVar4 == 0) break; @@ -2710,7 +2710,7 @@ LAB_00726505: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_00726560: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00726565; } if (bVar4 == 0) break; @@ -2741,7 +2741,7 @@ LAB_00726565: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_007265c0: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_007265c5; } if (bVar4 == 0) break; @@ -2772,7 +2772,7 @@ LAB_007265c5: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_00726620: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00726625; } if (bVar4 == 0) break; @@ -2803,7 +2803,7 @@ LAB_00726625: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_00726680: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00726685; } if (bVar4 == 0) break; @@ -2832,19 +2832,19 @@ LAB_00726685: pbVar13 = pbVar13 + 1; } while (bVar4 != 0); ((std::string *)(attrValue._buf))->std::string::assign(pbVar14, - (int)pbVar13 - (int)(pbVar14 + 1)); + GHIDRA_INT(pbVar13) - GHIDRA_INT((pbVar14 + 1))); uVar5 = attrValue._capacity; - pvVar8 = (void *)attrValue._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); if (attrValue._size == 0) { LAB_00726748: bVar4 = 0; - pvVar8 = (void *)attrValue._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); uVar5 = attrValue._capacity; } else { psVar12 = &attrValue; if (0xf < attrValue._capacity) { - psVar12 = (std_string *)attrValue._buf._0_4_; + psVar12 = (*(undefined4 *)((char *)&((std_string *)attrValue._buf) + 0x0)); } if (attrValue._size == 4) { iVar7 = memcmp_eq(psVar12,&DAT_00b64fe8,4); @@ -2866,7 +2866,7 @@ LAB_00726707: } iVar7 = atoi(psVar12->_buf); if (iVar7 == 0) goto LAB_00726748; - pvVar8 = (void *)attrValue._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); uVar5 = attrValue._capacity; } LAB_00726744: @@ -2880,7 +2880,7 @@ LAB_0072675c: if (0xfff < uVar15) { pvVar9 = *(void **)((char *)pvVar8 + -4); uVar15 = uVar5 + 0x24; - if (0x1f < (uint)((int)pvVar8 + (-4 - (int)pvVar9))) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar8) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_007273ca; } operator_delete(pvVar9,uVar15); @@ -2897,7 +2897,7 @@ LAB_0072675c: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_007268a0: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_007268a5; } if (bVar4 == 0) break; @@ -2928,7 +2928,7 @@ LAB_007268a5: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_00726900: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00726905; } if (bVar4 == 0) break; @@ -2959,7 +2959,7 @@ LAB_00726905: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_00726960: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00726965; } if (bVar4 == 0) break; @@ -2982,7 +2982,7 @@ LAB_00726965: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_007269c0: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_007269c5; } if (bVar4 == 0) break; @@ -3006,7 +3006,7 @@ LAB_007269c5: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_00726a05: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00726a0a; } if (bVar4 == 0) break; @@ -3032,7 +3032,7 @@ LAB_00726a0a: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_00726a48: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00726a4d; } if (bVar4 == 0) break; @@ -3058,7 +3058,7 @@ LAB_00726a4d: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_00726a90: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00726a95; } if (bVar4 == 0) break; @@ -3091,7 +3091,7 @@ LAB_00726a95: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_00726af6: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00726afb; } if (bVar4 == 0) break; @@ -3120,20 +3120,20 @@ LAB_00726afb: pbVar13 = pbVar13 + 1; } while (bVar4 != 0); ((std::string *)(attrValue._buf))->std::string::assign(pbVar14, - (int)pbVar13 - - (int)(pbVar14 + 1)); + GHIDRA_INT(pbVar13) - + GHIDRA_INT((pbVar14 + 1))); uVar5 = attrValue._capacity; - pvVar8 = (void *)attrValue._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); if (attrValue._size == 0) { LAB_00726bc7: newItem->passiveCache = 0; - pvVar8 = (void *)attrValue._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); uVar5 = attrValue._capacity; } else { psVar12 = &attrValue; if (0xf < attrValue._capacity) { - psVar12 = (std_string *)attrValue._buf._0_4_; + psVar12 = (*(undefined4 *)((char *)&((std_string *)attrValue._buf) + 0x0)); } if (attrValue._size == 4) { iVar7 = memcmp_eq(psVar12,&DAT_00b64fe8,4); @@ -3155,7 +3155,7 @@ LAB_00726b77: } iVar7 = atoi(psVar12->_buf); if (iVar7 == 0) goto LAB_00726bc7; - pvVar8 = (void *)attrValue._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); uVar5 = attrValue._capacity; } LAB_00726bb4: @@ -3173,7 +3173,7 @@ LAB_00726bb4: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_00726c10: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00726c15; } if (bVar4 == 0) break; @@ -3202,20 +3202,20 @@ LAB_00726c15: pbVar13 = pbVar13 + 1; } while (bVar4 != 0); ((std::string *)(attrValue._buf))->std::string::assign(pbVar14, - (int)pbVar13 - - (int)(pbVar14 + 1)); + GHIDRA_INT(pbVar13) - + GHIDRA_INT((pbVar14 + 1))); uVar5 = attrValue._capacity; - pvVar8 = (void *)attrValue._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); if (attrValue._size == 0) { LAB_00726ce7: newItem->addCostumeOnPickup = 0; - pvVar8 = (void *)attrValue._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); uVar5 = attrValue._capacity; } else { psVar12 = &attrValue; if (0xf < attrValue._capacity) { - psVar12 = (std_string *)attrValue._buf._0_4_; + psVar12 = (*(undefined4 *)((char *)&((std_string *)attrValue._buf) + 0x0)); } if (attrValue._size == 4) { iVar7 = memcmp_eq(psVar12,&DAT_00b64fe8,4); @@ -3237,7 +3237,7 @@ LAB_00726c97: } iVar7 = atoi(psVar12->_buf); if (iVar7 == 0) goto LAB_00726ce7; - pvVar8 = (void *)attrValue._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); uVar5 = attrValue._capacity; } LAB_00726cd4: @@ -3255,7 +3255,7 @@ LAB_00726cd4: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_00726d30: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00726d35; } if (bVar4 == 0) break; @@ -3284,20 +3284,20 @@ LAB_00726d35: pbVar13 = pbVar13 + 1; } while (bVar4 != 0); ((std::string *)(attrValue._buf))->std::string::assign(pbVar14, - (int)pbVar13 - - (int)(pbVar14 + 1)); + GHIDRA_INT(pbVar13) - + GHIDRA_INT((pbVar14 + 1))); uVar5 = attrValue._capacity; - pvVar8 = (void *)attrValue._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); if (attrValue._size == 0) { LAB_00726e07: newItem->clearEffectsOnRemove = 0; - pvVar8 = (void *)attrValue._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); uVar5 = attrValue._capacity; } else { psVar12 = &attrValue; if (0xf < attrValue._capacity) { - psVar12 = (std_string *)attrValue._buf._0_4_ + psVar12 = (*(undefined4 *)((char *)&((std_string *)attrValue._buf) + 0x0)) ; } if (attrValue._size == 4) { @@ -3321,7 +3321,7 @@ LAB_00726db7: } iVar7 = atoi(psVar12->_buf); if (iVar7 == 0) goto LAB_00726e07; - pvVar8 = (void *)attrValue._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); uVar5 = attrValue._capacity; } LAB_00726df4: @@ -3339,7 +3339,7 @@ LAB_00726df4: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_00726e50: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00726e55; } if (bVar4 == 0) break; @@ -3368,21 +3368,21 @@ LAB_00726e55: pbVar13 = pbVar13 + 1; } while (bVar4 != 0); ((std::string *)(attrValue._buf))->std::string::assign(pbVar14, - (int)pbVar13 - - (int)(pbVar14 + 1)); + GHIDRA_INT(pbVar13) - + GHIDRA_INT((pbVar14 + 1))); uVar5 = attrValue._capacity; - pvVar8 = (void *)attrValue._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); if (attrValue._size == 0) { LAB_00726f27: newItem->hidden = 0; - pvVar8 = (void *)attrValue._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); uVar5 = attrValue._capacity; } else { psVar12 = &attrValue; if (0xf < attrValue._capacity) { psVar12 = (std_string *) - attrValue._buf._0_4_; + (*(undefined4 *)((char *)&(attrValue._buf) + 0x0)); } if (attrValue._size == 4) { iVar7 = memcmp_eq(psVar12,&DAT_00b64fe8,4) @@ -3406,7 +3406,7 @@ LAB_00726ed7: } iVar7 = atoi(psVar12->_buf); if (iVar7 == 0) goto LAB_00726f27; - pvVar8 = (void *)attrValue._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); uVar5 = attrValue._capacity; } LAB_00726f14: @@ -3424,7 +3424,7 @@ LAB_00726f14: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_00726f70: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00726f75; } if (bVar4 == 0) break; @@ -3447,7 +3447,7 @@ LAB_00726f75: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_00727090: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00727095; } if (bVar4 == 0) break; @@ -3479,7 +3479,7 @@ LAB_00727095: bVar16 = bVar4 < (byte)*pcVar17; if (bVar4 != *pcVar17) { LAB_007270f0: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_007270f5; } if (bVar4 == 0) break; @@ -3511,7 +3511,7 @@ LAB_007270f5: bVar16 = bVar4 < *pbVar10; if (bVar4 != *pbVar10) { LAB_00727150: - uVar5 = -(uint)bVar16 | 1; + uVar5 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00727155; } if (bVar4 == 0) break; @@ -3532,10 +3532,10 @@ LAB_00727155: std::string::string_from_cstr (scratchString._buf,pbVar14) ; - ehState._0_1_ = 7; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 7; tagMask = parse_tags(&scratchString); newItem->tags = tagMask; - ehState._0_1_ = 3; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 3; std::string::_Tidy_deallocate (scratchString._buf); } @@ -3559,21 +3559,21 @@ LAB_00727155: pbVar13 = pbVar13 + 1; } while (bVar4 != 0); ((std::string *)(attrValue._buf))->std::string::assign(pbVar14, - (int)pbVar13 - - (int)(pbVar14 + 1)); + GHIDRA_INT(pbVar13) - + GHIDRA_INT((pbVar14 + 1))); uVar5 = attrValue._capacity; - pvVar8 = (void *)attrValue._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); if (attrValue._size == 0) { LAB_00727047: newItem->persistentEffect = 0; - pvVar8 = (void *)attrValue._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); uVar5 = attrValue._capacity; } else { psVar12 = &attrValue; if (0xf < attrValue._capacity) { psVar12 = (std_string *) - attrValue._buf._0_4_; + (*(undefined4 *)((char *)&(attrValue._buf) + 0x0)); } if (attrValue._size == 4) { iVar7 = memcmp_eq(psVar12,&DAT_00b64fe8,4) @@ -3597,7 +3597,7 @@ LAB_00726ff7: } iVar7 = atoi(psVar12->_buf); if (iVar7 == 0) goto LAB_00727047; - pvVar8 = (void *)attrValue._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)attrValue._buf) + 0x0)); uVar5 = attrValue._capacity; } LAB_00727034: @@ -3645,7 +3645,7 @@ LAB_00726790: if (((iVar7 == 1) || (iVar7 == 3)) || (iVar7 == 4)) { if (modData != 0) { idRef = &newItem->id; - iVar7 = (int)(this->_collectibles)._end - (int)(this->_collectibles)._begin >> 2; + iVar7 = GHIDRA_INT((this->_collectibles)._end) - GHIDRA_INT((this->_collectibles)._begin) >> 2; piVar11 = (int *)std::map::operator_index(idRef); *piVar11 = iVar7; *(int *)(newItem[1].name._buf + 8) = *idRef; @@ -3654,26 +3654,26 @@ LAB_00726790: uVar5 = iVar7 + 1; pvVar9 = (this->_collectibles)._end; pvVar8 = (this->_collectibles)._begin; - uVar15 = (int)pvVar9 - (int)pvVar8 >> 2; + uVar15 = GHIDRA_INT(pvVar9) - GHIDRA_INT(pvVar8) >> 2; if (uVar5 < uVar15) { - pvVar8 = (void *)((int)pvVar8 + uVar5 * 4); + pvVar8 = (void *)(GHIDRA_INT(pvVar8) + uVar5 * 4); LAB_00727307: (this->_collectibles)._end = pvVar8; } else if (uVar15 < uVar5) { - if (uVar5 <= (uint)((int)(this->_collectibles)._capacity - (int)pvVar8 >> 2)) { + if (uVar5 <= GHIDRA_UINT((GHIDRA_INT((this->_collectibles)._capacity) - GHIDRA_INT(pvVar8) >> 2))) { clearBytes = (uVar5 - uVar15) * 4; memset(pvVar9,0,clearBytes); - pvVar8 = (void *)((int)pvVar9 + clearBytes); + pvVar8 = (void *)(GHIDRA_INT(pvVar9) + clearBytes); goto LAB_00727307; } std::vector<4byte>::_Resize_reallocate(uVar5,uVar15); } } - *(ItemConfig_Item **)((int)(this->_collectibles)._begin + newItem->id * 4) = newItem; + *(ItemConfig_Item **)(GHIDRA_INT((this->_collectibles)._begin) + newItem->id * 4) = newItem; iVar7 = newItem->id; psVar12 = ((ItemConfig_Item *)(newItem))->ItemConfig_Item::GetLocalizedName(&scratchString,0x14); - ehState._0_1_ = 8; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 8; piVar11 = (int *)FUN_0069d630(psVar12); *piVar11 = iVar7; ((std::string *)(scratchString._buf))->std::string::_Tidy_deallocate(); @@ -3681,7 +3681,7 @@ LAB_00727307: else if (iVar7 == 2) { if (modData != 0) { idRef = &newItem->id; - newTrinketId = (int)(this->_trinkets)._end - (int)(this->_trinkets)._begin >> 2; + newTrinketId = GHIDRA_INT((this->_trinkets)._end) - GHIDRA_INT((this->_trinkets)._begin) >> 2; piVar11 = (int *)std::map::operator_index(idRef); *piVar11 = newTrinketId; iVar7 = *idRef; @@ -3691,61 +3691,61 @@ LAB_00727307: *(void **)(newItem[1].name._buf + 0xc) = modEntry; pvVar9 = (this->_trinkets)._end; pvVar8 = (this->_trinkets)._begin; - uVar15 = (int)pvVar9 - (int)pvVar8 >> 2; + uVar15 = GHIDRA_INT(pvVar9) - GHIDRA_INT(pvVar8) >> 2; if (uVar5 < uVar15) { - pvVar8 = (void *)((int)pvVar8 + uVar5 * 4); + pvVar8 = (void *)(GHIDRA_INT(pvVar8) + uVar5 * 4); } else { if (uVar5 <= uVar15) goto LAB_007271fb; - if ((uint)((int)(this->_trinkets)._capacity - (int)pvVar8 >> 2) < uVar5) { + if (GHIDRA_UINT((GHIDRA_INT((this->_trinkets)._capacity) - GHIDRA_INT(pvVar8) >> 2)) < uVar5) { std::vector<4byte>::_Resize_reallocate(uVar5,uVar15); - *(ItemConfig_Item **)((int)(this->_trinkets)._begin + newItem->id * 4) = newItem; + *(ItemConfig_Item **)(GHIDRA_INT((this->_trinkets)._begin) + newItem->id * 4) = newItem; goto LAB_00727355; } clearBytes = (uVar5 - uVar15) * 4; memset(pvVar9,0,clearBytes); - pvVar8 = (void *)((int)pvVar9 + clearBytes); + pvVar8 = (void *)(GHIDRA_INT(pvVar9) + clearBytes); } (this->_trinkets)._end = pvVar8; } LAB_007271fb: - *(ItemConfig_Item **)((int)(this->_trinkets)._begin + newItem->id * 4) = newItem; + *(ItemConfig_Item **)(GHIDRA_INT((this->_trinkets)._begin) + newItem->id * 4) = newItem; } else if (iVar7 == 0) { iVar7 = newItem->id; - tmpItem = *(ItemConfig_Item **)((int)(this->_nullItems)._begin + iVar7 * 4); + tmpItem = *(ItemConfig_Item **)(GHIDRA_INT((this->_nullItems)._begin) + iVar7 * 4); if (tmpItem != (ItemConfig_Item *)0x0) { ((ItemConfig_Item *)(tmpItem))->ItemConfig_Item::~ItemConfig_Item(); operator_delete(tmpItem,0xe8); iVar7 = newItem->id; } - *(ItemConfig_Item **)((int)(this->_nullItems)._begin + iVar7 * 4) = newItem; + *(ItemConfig_Item **)(GHIDRA_INT((this->_nullItems)._begin) + iVar7 * 4) = newItem; } else { ((ItemConfig_Item *)(newItem))->ItemConfig_Item::~ItemConfig_Item(); operator_delete(newItem,0xe8); } LAB_00727355: - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; if (0xf < xmlString._capacity) { uVar5 = xmlString._capacity + 1; - pvVar8 = (void *)xmlString._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)xmlString._buf) + 0x0)); if (0xfff < uVar5) { - pvVar8 = *(void **)(xmlString._buf._0_4_ + -4); + pvVar8 = *(void **)((*(undefined4 *)((char *)&(xmlString._buf) + 0x0)) + -4); uVar5 = xmlString._capacity + 0x24; - if (0x1f < (xmlString._buf._0_4_ - (int)pvVar8) - 4U) goto LAB_007273ca; + if (0x1f < ((*(undefined4 *)((char *)&(xmlString._buf) + 0x0)) - GHIDRA_INT(pvVar8)) - 4U) goto LAB_007273ca; } operator_delete(pvVar8,uVar5); } } - ehState._0_1_ = 0; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0; if (0xf < gfxRoot._capacity) { uVar5 = gfxRoot._capacity + 1; - pvVar8 = (void *)gfxRoot._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)gfxRoot._buf) + 0x0)); if (0xfff < uVar5) { - pvVar8 = *(void **)(gfxRoot._buf._0_4_ + -4); + pvVar8 = *(void **)((*(undefined4 *)((char *)&(gfxRoot._buf) + 0x0)) + -4); uVar5 = gfxRoot._capacity + 0x24; - if (0x1f < (uint)(gfxRoot._buf._0_4_ + (-4 - (int)pvVar8))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(gfxRoot._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar8))))) { LAB_007273ca: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3829,9 +3829,9 @@ byte ItemConfig::load_costumes_xml(byte *path, void *mod) local_14 = 0xffffffff; puStack_18 = &LAB_00afd0db; local_1c = ExceptionList; - local_EAX_52 = __security_cookie ^ (uint)(acStack_30 + 0x20); + local_EAX_52 = __security_cookie ^ GHIDRA_UINT((acStack_30 + 0x20)); ExceptionList = &local_1c; - modIdMap = -(uint)(mod != (void *)0x0) & (int)mod + 0xecU; + modIdMap = -GHIDRA_UINT((mod != (void *)0x0)) & GHIDRA_INT(mod) + 0xecU; itemConfig = rootNode; local_24 = local_EAX_52; pppppppbStack_100e8 = ((FileSystem *)(&PTR_vftable_00c37a10))->FileSystem::Open(path,(int *)0x0); @@ -3846,19 +3846,19 @@ byte ItemConfig::load_costumes_xml(byte *path, void *mod) xmlText[iVar5] = 0; (*(code *)**pppppppbStack_100e8)(1); FUN_00413b90(); - local_14._0_1_ = 0; - local_14._1_3_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; pcVar14 = (char *)0x727539; pbVar10 = xmlText; ((rapidxml::xml_document *)(xmlDoc))->rapidxml::xml_document::parse(xmlText); bVar4 = (byte)pbVar10; - rootNode = ((xml_node *)(xmlDoc))->xml_node::first_node((byte *)"costumes",(int)pcVar14,bVar4); + rootNode = ((xml_node *)(xmlDoc))->xml_node::first_node((byte *)"costumes",GHIDRA_INT(pcVar14),bVar4); if (rootNode == (void *)0x0) { pcVar14 = "Could not find root node \'costumes\' in %s\n"; KAGE_LogMessage(0x10,(byte *)"Could not find root node \'costumes\' in %s\n"); bVar4 = (byte)path; } - anm2RootAttr = ((xml_node *)(rootNode))->xml_node::first_attribute((byte *)"anm2root",(uint)pcVar14,bVar4); + anm2RootAttr = ((xml_node *)(rootNode))->xml_node::first_attribute((byte *)"anm2root",GHIDRA_UINT(pcVar14),bVar4); anm2RootSize = 0; anm2RootCapacity = 0xf; anm2Root[0] = (byte *******)0x0; @@ -3871,7 +3871,7 @@ byte ItemConfig::load_costumes_xml(byte *path, void *mod) bVar4 = *strEnd; strEnd = strEnd + 1; } while (bVar4 != 0); - ((std::string *)((char *)anm2Root))->std::string::assign(pbVar10,(int)strEnd - (int)(pbVar10 + 1)); + ((std::string *)((char *)anm2Root))->std::string::assign(pbVar10,GHIDRA_INT(strEnd) - GHIDRA_INT((pbVar10 + 1))); for (iVar5 = *(int *)((char *)rootNode + 0x18); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x2c)) { costumeId = (undefined1 [4])0x0; anm2PathSize = 0; @@ -3886,7 +3886,7 @@ byte ItemConfig::load_costumes_xml(byte *path, void *mod) typeTextSize = 0; typeTextCapacity = 0xf; typeText[0] = (byte *******)0x0; - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; pppppppbStack_100e8 = *(byte ********)(iVar5 + 0x20); if (pppppppbStack_100e8 != (byte *******)0x0) { do { @@ -3901,14 +3901,14 @@ byte ItemConfig::load_costumes_xml(byte *path, void *mod) bVar13 = bVar4 < *pbVar10; if (bVar4 != *pbVar10) { LAB_00727685: - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; goto LAB_0072768a; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)ppppppbVar6 + 1); bVar13 = bVar4 < pbVar10[1]; if (bVar4 != pbVar10[1]) goto LAB_00727685; - ppppppbVar6 = (byte ******)((int)ppppppbVar6 + 2); + ppppppbVar6 = (byte ******)(GHIDRA_INT(ppppppbVar6) + 2); pbVar10 = pbVar10 + 2; } while (bVar4 != 0); local_EAX_52 = 0; @@ -3931,14 +3931,14 @@ LAB_0072768a: bVar13 = bVar4 < *pbVar10; if (bVar4 != *pbVar10) { LAB_007276e5: - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; goto LAB_007276ea; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)ppppppbVar6 + 1); bVar13 = bVar4 < pbVar10[1]; if (bVar4 != pbVar10[1]) goto LAB_007276e5; - ppppppbVar6 = (byte ******)((int)ppppppbVar6 + 2); + ppppppbVar6 = (byte ******)(GHIDRA_INT(ppppppbVar6) + 2); pbVar10 = pbVar10 + 2; } while (bVar4 != 0); local_EAX_52 = 0; @@ -3951,10 +3951,10 @@ LAB_007276ea: ppppppbVar6 = ppppppbVar11; do { bVar4 = *(byte *)ppppppbVar6; - ppppppbVar6 = (byte ******)((int)ppppppbVar6 + 1); + ppppppbVar6 = (byte ******)(GHIDRA_INT(ppppppbVar6) + 1); } while (bVar4 != 0); ((std::string *)((char *)typeText))->std::string::assign((byte *)ppppppbVar11, - (int)ppppppbVar6 - (int)((int)ppppppbVar11 + 1)); + GHIDRA_INT(ppppppbVar6) - GHIDRA_INT((GHIDRA_INT(ppppppbVar11) + 1))); } else { pbVar10 = &DAT_00b66cc8; @@ -3967,14 +3967,14 @@ LAB_007276ea: bVar13 = bVar4 < *pbVar10; if (bVar4 != *pbVar10) { LAB_00727750: - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; goto LAB_00727755; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)ppppppbVar6 + 1); bVar13 = bVar4 < pbVar10[1]; if (bVar4 != pbVar10[1]) goto LAB_00727750; - ppppppbVar6 = (byte ******)((int)ppppppbVar6 + 2); + ppppppbVar6 = (byte ******)(GHIDRA_INT(ppppppbVar6) + 2); pbVar10 = pbVar10 + 2; } while (bVar4 != 0); local_EAX_52 = 0; @@ -3987,9 +3987,9 @@ LAB_00727755: ppppppbVar6 = ppppppbVar11; do { bVar4 = *(byte *)ppppppbVar6; - ppppppbVar6 = (byte ******)((int)ppppppbVar6 + 1); + ppppppbVar6 = (byte ******)(GHIDRA_INT(ppppppbVar6) + 1); } while (bVar4 != 0); - valueLength = (std_string *)((int)ppppppbVar6 - (int)((int)ppppppbVar11 + 1)); + valueLength = (std_string *)(GHIDRA_INT(ppppppbVar6) - GHIDRA_INT((GHIDRA_INT(ppppppbVar11) + 1))); if ((std_string *)(0x7fffffff - anm2RootSize) < valueLength) { /* WARNING: Subroutine does not return */ std::string::_Xlen(); @@ -3998,15 +3998,15 @@ LAB_00727755: if (0xf < anm2RootCapacity) { pppppppbVar8 = anm2Root[0]; } - ((std::string *)((char *)&attrValue))->std::string::concat((int)newItem,valueLength,(byte *)pppppppbVar8 - ,anm2RootSize,(byte *)ppppppbVar11,(uint)valueLength); + ((std::string *)((char *)&attrValue))->std::string::concat(GHIDRA_INT(newItem),valueLength,(byte *)pppppppbVar8 + ,anm2RootSize,(byte *)ppppppbVar11,GHIDRA_UINT(valueLength)); if (0xf < anm2PathCapacity) { local_EAX_52 = anm2PathCapacity + 1; pppppppbVar8 = anm2Path; if (0xfff < local_EAX_52) { pppppppbVar8 = (byte *******)anm2Path[-1]; local_EAX_52 = anm2PathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)anm2Path + (-4 - (int)pppppppbVar8))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(anm2Path) + (-4 - GHIDRA_INT(pppppppbVar8)))) goto LAB_007286ab; } operator_delete(pppppppbVar8,local_EAX_52); @@ -4038,7 +4038,7 @@ LAB_00727755: bVar13 = bVar4 < (byte)*pcVar14; if (bVar4 != *pcVar14) { LAB_00727840: - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; goto LAB_00727845; } if (bVar4 == 0) break; @@ -4046,7 +4046,7 @@ LAB_00727840: bVar13 = bVar4 < (byte)pcVar14[1]; if (bVar4 != pcVar14[1]) goto LAB_00727840; pcVar14 = pcVar14 + 2; - ppppppbVar6 = (byte ******)((int)ppppppbVar6 + 2); + ppppppbVar6 = (byte ******)(GHIDRA_INT(ppppppbVar6) + 2); } while (bVar4 != 0); local_EAX_52 = 0; LAB_00727845: @@ -4068,14 +4068,14 @@ LAB_00727845: bVar13 = bVar4 < (byte)*pcVar14; if (bVar4 != *pcVar14) { LAB_007278a0: - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; goto LAB_007278a5; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)ppppppbVar6 + 1); bVar13 = bVar4 < (byte)pcVar14[1]; if (bVar4 != pcVar14[1]) goto LAB_007278a0; - ppppppbVar6 = (byte ******)((int)ppppppbVar6 + 2); + ppppppbVar6 = (byte ******)(GHIDRA_INT(ppppppbVar6) + 2); pcVar14 = pcVar14 + 2; } while (bVar4 != 0); local_EAX_52 = 0; @@ -4091,10 +4091,10 @@ LAB_007278a5: ppppppbVar6 = ppppppbVar11; do { bVar4 = *(byte *)ppppppbVar6; - ppppppbVar6 = (byte ******)((int)ppppppbVar6 + 1); + ppppppbVar6 = (byte ******)(GHIDRA_INT(ppppppbVar6) + 1); } while (bVar4 != 0); ((std::string *)((char *)&attrValue))->std::string::assign((byte *)ppppppbVar11, - (int)ppppppbVar6 - (int)((int)ppppppbVar11 + 1)); + GHIDRA_INT(ppppppbVar6) - GHIDRA_INT((GHIDRA_INT(ppppppbVar11) + 1))); if (attrValueSize == 0) { LAB_007279b4: uStack_100c4 = uStack_100c4 & 0xff00; @@ -4116,7 +4116,7 @@ LAB_007279b4: local_EAX_52 = 0; } else { - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; } if (local_EAX_52 != 0) goto LAB_00727949; } @@ -4138,7 +4138,7 @@ LAB_00727949: local_EAX_52 = 0; } else { - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; } if (local_EAX_52 == 0) goto LAB_007279a8; } @@ -4150,7 +4150,7 @@ LAB_00727949: if (iVar7 == 0) goto LAB_007279b4; } LAB_007279a8: - uStack_100c4 = CONCAT11(uStack_100c4._1_1_,1); + uStack_100c4 = CONCAT11((*(undefined1 *)((char *)&(uStack_100c4) + 0x1)),1); } } else { @@ -4164,14 +4164,14 @@ LAB_007279a8: bVar13 = bVar4 < (byte)*pcVar14; if (bVar4 != *pcVar14) { LAB_007279f0: - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; goto LAB_007279f5; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)ppppppbVar6 + 1); bVar13 = bVar4 < (byte)pcVar14[1]; if (bVar4 != pcVar14[1]) goto LAB_007279f0; - ppppppbVar6 = (byte ******)((int)ppppppbVar6 + 2); + ppppppbVar6 = (byte ******)(GHIDRA_INT(ppppppbVar6) + 2); pcVar14 = pcVar14 + 2; } while (bVar4 != 0); local_EAX_52 = 0; @@ -4187,10 +4187,10 @@ LAB_007279f5: ppppppbVar6 = ppppppbVar11; do { bVar4 = *(byte *)ppppppbVar6; - ppppppbVar6 = (byte ******)((int)ppppppbVar6 + 1); + ppppppbVar6 = (byte ******)(GHIDRA_INT(ppppppbVar6) + 1); } while (bVar4 != 0); ((std::string *)((char *)&attrValue))->std::string::assign((byte *)ppppppbVar11, - (int)ppppppbVar6 - (int)((int)ppppppbVar11 + 1)); + GHIDRA_INT(ppppppbVar6) - GHIDRA_INT((GHIDRA_INT(ppppppbVar11) + 1))); if (attrValueSize == 0) { LAB_00727b04: isSkinAlt = 0; @@ -4212,7 +4212,7 @@ LAB_00727b04: local_EAX_52 = 0; } else { - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; } if (local_EAX_52 != 0) goto LAB_00727a99; } @@ -4234,7 +4234,7 @@ LAB_00727a99: local_EAX_52 = 0; } else { - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; } if (local_EAX_52 == 0) goto LAB_00727af8; } @@ -4260,14 +4260,14 @@ LAB_00727af8: bVar13 = bVar4 < (byte)*pcVar14; if (bVar4 != *pcVar14) { LAB_00727b40: - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; goto LAB_00727b45; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)ppppppbVar6 + 1); bVar13 = bVar4 < (byte)pcVar14[1]; if (bVar4 != pcVar14[1]) goto LAB_00727b40; - ppppppbVar6 = (byte ******)((int)ppppppbVar6 + 2); + ppppppbVar6 = (byte ******)(GHIDRA_INT(ppppppbVar6) + 2); pcVar14 = pcVar14 + 2; } while (bVar4 != 0); local_EAX_52 = 0; @@ -4290,14 +4290,14 @@ LAB_00727b45: bVar13 = bVar4 < (byte)*pcVar14; if (bVar4 != *pcVar14) { LAB_00727ba0: - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; goto LAB_00727ba5; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)ppppppbVar6 + 1); bVar13 = bVar4 < (byte)pcVar14[1]; if (bVar4 != pcVar14[1]) goto LAB_00727ba0; - ppppppbVar6 = (byte ******)((int)ppppppbVar6 + 2); + ppppppbVar6 = (byte ******)(GHIDRA_INT(ppppppbVar6) + 2); pcVar14 = pcVar14 + 2; } while (bVar4 != 0); local_EAX_52 = 0; @@ -4313,10 +4313,10 @@ LAB_00727ba5: ppppppbVar6 = ppppppbVar11; do { bVar4 = *(byte *)ppppppbVar6; - ppppppbVar6 = (byte ******)((int)ppppppbVar6 + 1); + ppppppbVar6 = (byte ******)(GHIDRA_INT(ppppppbVar6) + 1); } while (bVar4 != 0); ((std::string *)((char *)&attrValue))->std::string::assign((byte *)ppppppbVar11, - (int)ppppppbVar6 - (int)((int)ppppppbVar11 + 1)); + GHIDRA_INT(ppppppbVar6) - GHIDRA_INT((GHIDRA_INT(ppppppbVar11) + 1))); if (attrValueSize == 0) { LAB_00727cb4: uStack_100c4 = uStack_100c4 & 0xff; @@ -4338,7 +4338,7 @@ LAB_00727cb4: local_EAX_52 = 0; } else { - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; } if (local_EAX_52 != 0) goto LAB_00727c49; } @@ -4361,7 +4361,7 @@ LAB_00727c49: local_EAX_52 = 0; } else { - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; } if (local_EAX_52 == 0) goto LAB_00727ca8; } @@ -4387,14 +4387,14 @@ LAB_00727ca8: bVar13 = bVar4 < (byte)*pcVar14; if (bVar4 != *pcVar14) { LAB_00727cf0: - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; goto LAB_00727cf5; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)ppppppbVar6 + 1); bVar13 = bVar4 < (byte)pcVar14[1]; if (bVar4 != pcVar14[1]) goto LAB_00727cf0; - ppppppbVar6 = (byte ******)((int)ppppppbVar6 + 2); + ppppppbVar6 = (byte ******)(GHIDRA_INT(ppppppbVar6) + 2); pcVar14 = pcVar14 + 2; } while (bVar4 != 0); local_EAX_52 = 0; @@ -4410,10 +4410,10 @@ LAB_00727cf5: ppppppbVar6 = ppppppbVar11; do { bVar4 = *(byte *)ppppppbVar6; - ppppppbVar6 = (byte ******)((int)ppppppbVar6 + 1); + ppppppbVar6 = (byte ******)(GHIDRA_INT(ppppppbVar6) + 1); } while (bVar4 != 0); ((std::string *)((char *)&attrValue))->std::string::assign((byte *)ppppppbVar11, - (int)ppppppbVar6 - (int)((int)ppppppbVar11 + 1)); + GHIDRA_INT(ppppppbVar6) - GHIDRA_INT((GHIDRA_INT(ppppppbVar11) + 1))); if (attrValueSize == 0) { LAB_00727e04: uStack_100bc = uStack_100bc & 0xff00; @@ -4436,7 +4436,7 @@ LAB_00727e04: local_EAX_52 = 0; } else { - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; } if (local_EAX_52 != 0) goto LAB_00727d99; } @@ -4459,7 +4459,7 @@ LAB_00727d99: local_EAX_52 = 0; } else { - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; } if (local_EAX_52 == 0) goto LAB_00727df8; } @@ -4471,7 +4471,7 @@ LAB_00727d99: if (iVar7 == 0) goto LAB_00727e04; } LAB_00727df8: - uStack_100bc = CONCAT11(uStack_100bc._1_1_,1); + uStack_100bc = CONCAT11((*(undefined1 *)((char *)&(uStack_100bc) + 0x1)),1); } } else { @@ -4485,14 +4485,14 @@ LAB_00727df8: bVar13 = bVar4 < (byte)*pcVar14; if (bVar4 != *pcVar14) { LAB_00727e40: - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; goto LAB_00727e45; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)ppppppbVar6 + 1); bVar13 = bVar4 < (byte)pcVar14[1]; if (bVar4 != pcVar14[1]) goto LAB_00727e40; - ppppppbVar6 = (byte ******)((int)ppppppbVar6 + 2); + ppppppbVar6 = (byte ******)(GHIDRA_INT(ppppppbVar6) + 2); pcVar14 = pcVar14 + 2; } while (bVar4 != 0); local_EAX_52 = 0; @@ -4508,10 +4508,10 @@ LAB_00727e45: ppppppbVar6 = ppppppbVar11; do { bVar4 = *(byte *)ppppppbVar6; - ppppppbVar6 = (byte ******)((int)ppppppbVar6 + 1); + ppppppbVar6 = (byte ******)(GHIDRA_INT(ppppppbVar6) + 1); } while (bVar4 != 0); ((std::string *)((char *)&attrValue))->std::string::assign((byte *)ppppppbVar11, - (int)ppppppbVar6 - (int)((int)ppppppbVar11 + 1)); + GHIDRA_INT(ppppppbVar6) - GHIDRA_INT((GHIDRA_INT(ppppppbVar11) + 1))); if (attrValueSize == 0) { LAB_00727f54: uStack_100bc = uStack_100bc & 0xff; @@ -4534,7 +4534,7 @@ LAB_00727f54: local_EAX_52 = 0; } else { - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; } if (local_EAX_52 != 0) goto LAB_00727ee9; } @@ -4557,7 +4557,7 @@ LAB_00727ee9: local_EAX_52 = 0; } else { - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; } if (local_EAX_52 == 0) goto LAB_00727f48; } @@ -4583,14 +4583,14 @@ LAB_00727f48: bVar13 = bVar4 < (byte)*pcVar14; if (bVar4 != *pcVar14) { LAB_00727f90: - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; goto LAB_00727f95; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)ppppppbVar6 + 1); bVar13 = bVar4 < (byte)pcVar14[1]; if (bVar4 != pcVar14[1]) goto LAB_00727f90; - ppppppbVar6 = (byte ******)((int)ppppppbVar6 + 2); + ppppppbVar6 = (byte ******)(GHIDRA_INT(ppppppbVar6) + 2); pcVar14 = pcVar14 + 2; } while (bVar4 != 0); local_EAX_52 = 0; @@ -4606,10 +4606,10 @@ LAB_00727f95: ppppppbVar6 = ppppppbVar11; do { bVar4 = *(byte *)ppppppbVar6; - ppppppbVar6 = (byte ******)((int)ppppppbVar6 + 1); + ppppppbVar6 = (byte ******)(GHIDRA_INT(ppppppbVar6) + 1); } while (bVar4 != 0); ((std::string *)((char *)&attrValue))->std::string::assign((byte *)ppppppbVar11, - (int)ppppppbVar6 - (int)((int)ppppppbVar11 + 1)); + GHIDRA_INT(ppppppbVar6) - GHIDRA_INT((GHIDRA_INT(ppppppbVar11) + 1))); if (attrValueSize == 0) { LAB_007280a1: isForceBodyColor = 0; @@ -4632,7 +4632,7 @@ LAB_007280a1: local_EAX_52 = 0; } else { - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; } if (local_EAX_52 != 0) goto LAB_00728039; } @@ -4655,7 +4655,7 @@ LAB_00728039: local_EAX_52 = 0; } else { - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; } if (local_EAX_52 == 0) goto LAB_00728098; } @@ -4680,7 +4680,7 @@ LAB_00728098: if (0xfff < local_EAX_52) { pppppppbVar8 = (byte *******)attrValue[-1]; local_EAX_52 = attrValueCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)attrValue + (-4 - (int)pppppppbVar8))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(attrValue) + (-4 - GHIDRA_INT(pppppppbVar8)))) goto LAB_007286ab; } operator_delete(pppppppbVar8,local_EAX_52); @@ -4728,12 +4728,12 @@ LAB_00728146: ((uVar12 == 0xffffffff || (bVar13 = *(byte *)((char *)pppppppbVar8 + 3) < pbVar10[3], *(byte *)((char *)pppppppbVar8 + 3) == pbVar10[3])))))))))))) goto LAB_0072817a; - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; } if (((local_EAX_52 == 0) && (3 < typeTextSize)) && (typeTextSize < 5)) { if (modIdMap != 0) { costumeId = (undefined1 [4]) - ((int)(itemConfig->_nullItems)._end - (int)(itemConfig->_nullItems)._begin >> + (GHIDRA_INT((itemConfig->_nullItems)._end) - GHIDRA_INT((itemConfig->_nullItems)._begin) >> 2); newItem = operator_new(0xe8); if (newItem == (ItemConfig_Item *)0x0) { @@ -4749,11 +4749,11 @@ LAB_00728146: else { *vectorEnd = newItem; ppvVar1 = &(pIVar3->_nullItems)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 4); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 4); } - *(undefined1 (*) [4])(*(int *)((int)(pIVar3->_nullItems)._end + -4) + 4) = costumeId; + *(undefined1 (*) [4])(*(int *)(GHIDRA_INT((pIVar3->_nullItems)._end) + -4) + 4) = costumeId; } - iVar7 = *(int *)((int)(pIVar3->_nullItems)._begin + (int)costumeId * 4); + iVar7 = *(int *)(GHIDRA_INT((pIVar3->_nullItems)._begin) + GHIDRA_INT(costumeId) * 4); *(undefined1 (*) [4])(iVar7 + 0x80) = costumeId; if ((byte ********)(iVar7 + 0x84) != &anm2Path) { pppppppbVar8 = (byte *******)&anm2Path; @@ -4764,11 +4764,11 @@ LAB_00728146: } *(int *)(iVar7 + 0x9c) = iStack_100c8; *(byte *)(iVar7 + 0xa0) = (byte)uStack_100c4; - *(byte *)(iVar7 + 0xa1) = uStack_100c4._1_1_; + *(byte *)(iVar7 + 0xa1) = (*(undefined1 *)((char *)&(uStack_100c4) + 0x1)); *(byte *)(iVar7 + 0xa2) = isSkinAlt; *(int *)(iVar7 + 0xa4) = iStack_100c0; *(byte *)(iVar7 + 0xa8) = (byte)uStack_100bc; - *(undefined1 *)(iVar7 + 0xa9) = uStack_100bc._1_1_; + *(undefined1 *)(iVar7 + 0xa9) = (*(undefined1 *)((char *)&(uStack_100bc) + 0x1)); *(undefined1 *)(iVar7 + 0xaa) = isForceBodyColor; } else { @@ -4806,7 +4806,7 @@ LAB_007282ce: ((uVar2 == 0xffffffff || (bVar13 = *(byte *)((char *)pppppppbVar8 + 3) < (byte)pcVar14[3], *(byte *)((char *)pppppppbVar8 + 3) == pcVar14[3])))))))))))) goto LAB_00728302; - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; } if (((local_EAX_52 != 0) || (typeTextSize < 7)) || (7 < typeTextSize)) { pcVar14 = "active"; @@ -4841,7 +4841,7 @@ LAB_00728356: ((uVar2 == 0xffffffff || (bVar13 = *(byte *)((char *)pppppppbVar8 + 3) < (byte)pcVar14[3], *(byte *)((char *)pppppppbVar8 + 3) == pcVar14[3])))))))))))) goto LAB_0072838a; - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; } if (((local_EAX_52 != 0) || (typeTextSize < 6)) || (6 < typeTextSize)) { pcVar14 = "familiar"; @@ -4876,7 +4876,7 @@ LAB_007283d9: ((uVar2 == 0xffffffff || (bVar13 = *(byte *)((char *)pppppppbVar8 + 3) < (byte)pcVar14[3], *(byte *)((char *)pppppppbVar8 + 3) == pcVar14[3])))))))))))) goto LAB_0072840d; - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; } if (((local_EAX_52 != 0) || (typeTextSize < 8)) || (8 < typeTextSize)) { pcVar14 = "trinket"; @@ -4908,7 +4908,7 @@ LAB_0072854c: (bVar13 = *(byte *)((char *)pppppppbVar8 + 3) < (byte)pcVar14[3], *(byte *)((char *)pppppppbVar8 + 3) == pcVar14[3])))))))))))) goto LAB_00728580; - local_EAX_52 = -(uint)bVar13 | 1; + local_EAX_52 = -GHIDRA_UINT(bVar13) | 1; } if (((local_EAX_52 == 0) && (6 < typeTextSize)) && (typeTextSize < 8)) { if (modIdMap != 0) { @@ -4916,11 +4916,11 @@ LAB_0072854c: costumeId = (undefined1 [4])*piVar9; } pIVar3 = itemConfig; - if ((int)(itemConfig->_trinkets)._end - (int)(itemConfig->_trinkets)._begin >> 2 <= - (int)costumeId) { + if (GHIDRA_INT((itemConfig->_trinkets)._end) - GHIDRA_INT((itemConfig->_trinkets)._begin) >> 2 <= + GHIDRA_INT(costumeId)) { KAGE_LogMessage(0x10,(byte *)"Trinket ID out of bounds.\n"); } - iVar7 = *(int *)((int)(pIVar3->_trinkets)._begin + (int)costumeId * 4); + iVar7 = *(int *)(GHIDRA_INT((pIVar3->_trinkets)._begin) + GHIDRA_INT(costumeId) * 4); if (iVar7 != 0) { ItemConfig_Costume::operator_assign ((ItemConfig_Costume *)(iVar7 + 0x80),(ItemConfig_Costume *)costumeId); @@ -4936,11 +4936,11 @@ LAB_0072854c: } pIVar3 = itemConfig; rootNode = (itemConfig->_collectibles)._begin; - if ((int)(itemConfig->_collectibles)._end - (int)rootNode >> 2 <= (int)costumeId) { + if (GHIDRA_INT((itemConfig->_collectibles)._end) - GHIDRA_INT(rootNode) >> 2 <= GHIDRA_INT(costumeId)) { KAGE_LogMessage(0x10,(byte *)"Costume ID out of bounds.\n"); rootNode = (pIVar3->_collectibles)._begin; } - iVar7 = *(int *)((char *)rootNode + (int)costumeId * 4); + iVar7 = *(int *)((char *)rootNode + GHIDRA_INT(costumeId) * 4); if (iVar7 != 0) { *(undefined1 (*) [4])(iVar7 + 0x80) = costumeId; if ((byte ********)(iVar7 + 0x84) != &anm2Path) { @@ -4952,47 +4952,47 @@ LAB_0072854c: } *(int *)(iVar7 + 0x9c) = iStack_100c8; *(byte *)(iVar7 + 0xa0) = (byte)uStack_100c4; - *(byte *)(iVar7 + 0xa1) = uStack_100c4._1_1_; + *(byte *)(iVar7 + 0xa1) = (*(undefined1 *)((char *)&(uStack_100c4) + 0x1)); *(byte *)(iVar7 + 0xa2) = isSkinAlt; *(int *)(iVar7 + 0xa4) = iStack_100c0; *(byte *)(iVar7 + 0xa8) = (byte)uStack_100bc; - *(undefined1 *)(iVar7 + 0xa9) = uStack_100bc._1_1_; + *(undefined1 *)(iVar7 + 0xa9) = (*(undefined1 *)((char *)&(uStack_100bc) + 0x1)); *(undefined1 *)(iVar7 + 0xaa) = isForceBodyColor; } } LAB_007285f3: - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < typeTextCapacity) { local_EAX_52 = typeTextCapacity + 1; pppppppbVar8 = pppppppbStack_100e8; if (0xfff < local_EAX_52) { pppppppbVar8 = (byte *******)pppppppbStack_100e8[-1]; local_EAX_52 = typeTextCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)pppppppbStack_100e8 + (-4 - (int)pppppppbVar8))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(pppppppbStack_100e8) + (-4 - GHIDRA_INT(pppppppbVar8)))) goto LAB_007286ab; } operator_delete(pppppppbVar8,local_EAX_52); } - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (0xf < anm2PathCapacity) { local_EAX_52 = anm2PathCapacity + 1; pppppppbVar8 = anm2Path; if (0xfff < local_EAX_52) { pppppppbVar8 = (byte *******)anm2Path[-1]; local_EAX_52 = anm2PathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)anm2Path + (-4 - (int)pppppppbVar8))) goto LAB_007286ab; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(anm2Path) + (-4 - GHIDRA_INT(pppppppbVar8)))) goto LAB_007286ab; } operator_delete(pppppppbVar8,local_EAX_52); } } - local_14._0_1_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; if (0xf < anm2RootCapacity) { local_EAX_52 = anm2RootCapacity + 1; pppppppbVar8 = anm2Root[0]; if (0xfff < local_EAX_52) { pppppppbVar8 = (byte *******)anm2Root[0][-1]; local_EAX_52 = anm2RootCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)anm2Root[0] + (-4 - (int)pppppppbVar8))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(anm2Root[0]) + (-4 - GHIDRA_INT(pppppppbVar8)))) { LAB_007286ab: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -5048,9 +5048,9 @@ byte ItemConfig::load_metadata_xml(byte *path, void *modEntry) local_8 = (void *)0xffffffff; puStack_c = &LAB_00afd128; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(tagsText + 10); + uVar1 = __security_cookie ^ GHIDRA_UINT((tagsText + 10)); ExceptionList = &local_10; - idMap = -(uint)(modEntry != (void *)0x0) & (int)modEntry + 0xecU; + idMap = -GHIDRA_UINT((modEntry != (void *)0x0)) & GHIDRA_INT(modEntry) + 0xecU; local_14 = uVar1; piVar2 = ((FileSystem *)(&PTR_vftable_00c37a10))->FileSystem::Open(path,(int *)0x0); if (piVar2 == (int *)0x0) { @@ -5109,7 +5109,7 @@ byte ItemConfig::load_metadata_xml(byte *path, void *modEntry) bVar6 = curChar < *expectedByte; if (curChar != *expectedByte) { LAB_00728961: - uVar1 = -(uint)bVar6 | 1; + uVar1 = -GHIDRA_UINT(bVar6) | 1; goto LAB_00728966; } if (curChar == 0) break; @@ -5139,7 +5139,7 @@ LAB_00728966: bVar6 = curChar < (byte)*expectedChar; if (curChar != *expectedChar) { LAB_007289b7: - uVar1 = -(uint)bVar6 | 1; + uVar1 = -GHIDRA_UINT(bVar6) | 1; goto LAB_007289bc; } if (curChar == 0) break; @@ -5169,7 +5169,7 @@ LAB_007289bc: bVar6 = curChar < (byte)*expectedChar; if (curChar != *expectedChar) { LAB_00728a10: - uVar1 = -(uint)bVar6 | 1; + uVar1 = -GHIDRA_UINT(bVar6) | 1; goto LAB_00728a15; } if (curChar == 0) break; @@ -5199,7 +5199,7 @@ LAB_00728a15: bVar6 = curChar < *expectedByte; if (curChar != *expectedByte) { LAB_00728a66: - uVar1 = -(uint)bVar6 | 1; + uVar1 = -GHIDRA_UINT(bVar6) | 1; goto LAB_00728a6b; } if (curChar == 0) break; @@ -5224,17 +5224,17 @@ LAB_00728a6b: curChar = *cursor; cursor = cursor + 1; } while (curChar != 0); - ((std::string *)((char *)tagsText))->std::string::assign(pbVar4,(int)cursor - (int)(pbVar4 + 1)); - local_8._0_1_ = 1; + ((std::string *)((char *)tagsText))->std::string::assign(pbVar4,GHIDRA_INT(cursor) - GHIDRA_INT((pbVar4 + 1))); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; tags = parse_tags(tagsText); - local_8 = (void *)((uint)local_8._1_3_ << 8); + local_8 = (void *)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8); if (0xf < tagsTextCapacity) { uVar1 = tagsTextCapacity + 1; pvVar3 = tagsText[0]; if (0xfff < uVar1) { - pvVar3 = *(void **)((int)tagsText[0] + -4); + pvVar3 = *(void **)(GHIDRA_INT(tagsText[0]) + -4); uVar1 = tagsTextCapacity + 0x24; - if (0x1f < (uint)((int)tagsText[0] + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tagsText[0]) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -5258,7 +5258,7 @@ LAB_00728a6b: bVar6 = curChar < (byte)*expectedChar; if (curChar != *expectedChar) { LAB_00728b5f: - uVar1 = -(uint)bVar6 | 1; + uVar1 = -GHIDRA_UINT(bVar6) | 1; goto LAB_00728b64; } if (curChar == 0) break; @@ -5275,7 +5275,7 @@ LAB_00728b64: piVar2 = (int *)std::map::operator_index(&itemId); itemId = *piVar2; } - if ((int)(this->_trinkets)._end - (int)(this->_trinkets)._begin >> 2 <= itemId) { + if (GHIDRA_INT((this->_trinkets)._end) - GHIDRA_INT((this->_trinkets)._begin) >> 2 <= itemId) { KAGE_LogMessage(0x10,(byte *)"Trinket ID out of bounds.\n"); } pvVar3 = (this->_trinkets)._begin; @@ -5286,7 +5286,7 @@ LAB_00728b64: itemId = *piVar2; } pvVar3 = (this->_collectibles)._begin; - if ((int)(this->_collectibles)._end - (int)pvVar3 >> 2 <= itemId) { + if (GHIDRA_INT((this->_collectibles)._end) - GHIDRA_INT(pvVar3) >> 2 <= itemId) { KAGE_LogMessage(0x10,(byte *)"Collectible ID out of bounds.\n"); pvVar3 = (this->_collectibles)._begin; } @@ -5296,7 +5296,7 @@ LAB_00728b64: if (craftQuality == -0x70000001) { craftQuality = iStack_10080; } - *(int *)(iVar5 + 0xb8) = (int)tags; + *(int *)(iVar5 + 0xb8) = GHIDRA_INT(tags); *(undefined4 *)(iVar5 + 0xbc) = tagsHigh; *(int *)(iVar5 + 0xc0) = iStack_10080; *(int *)(iVar5 + 0xc4) = craftQuality; @@ -5308,14 +5308,14 @@ LAB_00728b64: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (text != (byte *)0x0) { uVar1 = *(uint *)(text + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar1; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar1; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar1); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar1)); free(text + -4); } curChar = 1; @@ -5381,10 +5381,10 @@ void ItemConfig::load_wisp_node(std_string *gfxRoot, void *node, float *entry, v undefined4 local_14; void *tokenBuffer; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00afd1d7; - uVar5 = __security_cookie ^ (int)register0x00000010 - 0x10U; + uVar5 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; parsedMask = (int *)0x0; local_50 = (int *)0x0; stackCookie = uVar5; @@ -5406,7 +5406,7 @@ void ItemConfig::load_wisp_node(std_string *gfxRoot, void *node, float *entry, v isLess = bVar4 < *shortKeyName; if (bVar4 != *shortKeyName) { LAB_00728d57: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_00728d5c; } if (bVar4 == 0) break; @@ -5437,7 +5437,7 @@ LAB_00728d5c: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_00728db0: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_00728db5; } if (bVar4 == 0) break; @@ -5468,7 +5468,7 @@ LAB_00728db5: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_00728e10: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_00728e15; } if (bVar4 == 0) break; @@ -5499,7 +5499,7 @@ LAB_00728e15: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_00728e70: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_00728e75; } if (bVar4 == 0) break; @@ -5530,7 +5530,7 @@ LAB_00728e75: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_00728ed0: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_00728ed5; } if (bVar4 == 0) break; @@ -5561,7 +5561,7 @@ LAB_00728ed5: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_00728f30: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_00728f35; } if (bVar4 == 0) break; @@ -5592,7 +5592,7 @@ LAB_00728f35: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_00728f90: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_00728f95; } if (bVar4 == 0) break; @@ -5617,7 +5617,7 @@ LAB_00728f95: bVar4 = *pbVar6; pbVar6 = pbVar6 + 1; } while (bVar4 != 0); - ((std::string *)((char *)&attrText))->std::string::assign(pbVar13,(int)pbVar6 - (int)(pbVar13 + 1)); + ((std::string *)((char *)&attrText))->std::string::assign(pbVar13,GHIDRA_INT(pbVar6) - GHIDRA_INT((pbVar13 + 1))); if (attrTextSize == (int ***)0x0) { LAB_00729093: isCanShoot = 0; @@ -5639,7 +5639,7 @@ LAB_00729093: uVar7 = 0; } else { - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; } if (uVar7 != 0) goto LAB_00729030; } @@ -5661,7 +5661,7 @@ LAB_00729030: uVar7 = 0; } else { - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; } if (uVar7 == 0) goto LAB_0072908f; } @@ -5680,18 +5680,18 @@ LAB_0072908f: entry = wispEntry; } else { - pppiVar15 = (int ***)((int)attrTextCapacity + 1); + pppiVar15 = (int ***)(GHIDRA_INT(attrTextCapacity) + 1); ppppiVar8 = attrText; if ((int ***)0xfff < pppiVar15) { ppppiVar8 = (int ****)attrText[-1]; pppiVar15 = attrTextCapacity + 9; - if (0x1f < (uint)((int)attrText + (-4 - (int)ppppiVar8))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(attrText) + (-4 - GHIDRA_INT(ppppiVar8))))) { LAB_0072a19f: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(ppppiVar8,(uint)pppiVar15); + operator_delete(ppppiVar8,GHIDRA_UINT(pppiVar15)); entry = wispEntry; } } @@ -5706,7 +5706,7 @@ LAB_0072a19f: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_00729110: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_00729115; } if (bVar4 == 0) break; @@ -5731,35 +5731,35 @@ LAB_00729115: bVar4 = *pbVar6; pbVar6 = pbVar6 + 1; } while (bVar4 != 0); - ((std::string *)((char *)&attrText))->std::string::assign(pbVar13,(int)pbVar6 - (int)(pbVar13 + 1)); + ((std::string *)((char *)&attrText))->std::string::assign(pbVar13,GHIDRA_INT(pbVar6) - GHIDRA_INT((pbVar13 + 1))); local_14 = 1; - local_50 = (int *)((uint)parsedMask | 1); + local_50 = (int *)(GHIDRA_UINT(parsedMask) | 1); tearFlagTokens = (int *)0x0; tearFlagTokensEnd = (int *)0x0; tearFlagTokensCapacity = 0; parsedMask = local_50; string_split(&attrText, - (std_string *)CONCAT31((int3)((uint)extraout_EDX >> 8),0x20), + (std_string *)CONCAT31((int3)(GHIDRA_UINT(extraout_EDX) >> 8),0x20), (byte)&tearFlagTokens); - local_14 = CONCAT31(local_14._1_3_,2); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); if ((int ***)0xf < attrTextCapacity) { - pppiVar15 = (int ***)((int)attrTextCapacity + 1); + pppiVar15 = (int ***)(GHIDRA_INT(attrTextCapacity) + 1); ppppiVar8 = attrText; if ((int ***)0xfff < pppiVar15) { ppppiVar8 = (int ****)attrText[-1]; pppiVar15 = attrTextCapacity + 9; - if (0x1f < (uint)((int)attrText + (-4 - (int)ppppiVar8))) goto LAB_0072a19f; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(attrText) + (-4 - GHIDRA_INT(ppppiVar8))))) goto LAB_0072a19f; } - operator_delete(ppppiVar8,(uint)pppiVar15); + operator_delete(ppppiVar8,GHIDRA_UINT(pppiVar15)); } piVar16 = (int *)0x0; local_54 = tearFlagTokens; - local_50 = (int *)(((int)tearFlagTokensEnd - (int)tearFlagTokens) / 0x18); + local_50 = (int *)((GHIDRA_INT(tearFlagTokensEnd) - GHIDRA_INT(tearFlagTokens)) / 0x18); piVar14 = tearFlagTokens; if (local_50 != (int *)0x0) { do { piVar10 = piVar14; - if (0xf < (uint)piVar14[5]) { + if (0xf < GHIDRA_UINT(piVar14[5])) { piVar10 = (int *)*piVar14; } uVar7 = atoi((char *)piVar10); @@ -5773,8 +5773,8 @@ LAB_00729115: if (0x3f < uVar7) { flagMaskHigh = uVar9; } - wispEntry[0x14] = (float)((uint)wispEntry[0x14] | uVar9); - wispEntry[0x15] = (float)((uint)wispEntry[0x15] | flagMaskHigh); + wispEntry[0x14] = (float)(GHIDRA_UINT(wispEntry[0x14]) | uVar9); + wispEntry[0x15] = (float)(GHIDRA_UINT(wispEntry[0x15]) | flagMaskHigh); } else { uVar7 = uVar7 - 0x40; @@ -5787,15 +5787,15 @@ LAB_00729115: if (0x3f < uVar7) { flagMaskHigh = uVar9; } - wispEntry[0x16] = (float)((uint)wispEntry[0x16] | uVar9); - wispEntry[0x17] = (float)((uint)wispEntry[0x17] | flagMaskHigh); + wispEntry[0x16] = (float)(GHIDRA_UINT(wispEntry[0x16]) | uVar9); + wispEntry[0x17] = (float)(GHIDRA_UINT(wispEntry[0x17]) | flagMaskHigh); } - piVar16 = (int *)((int)piVar16 + 1); + piVar16 = (int *)(GHIDRA_INT(piVar16) + 1); piVar14 = piVar14 + 6; } while (piVar16 < local_50); } piVar14 = local_54; - parsedMask = (int *)((uint)parsedMask & 0xfffffffe); + parsedMask = (int *)(GHIDRA_UINT(parsedMask) & 0xfffffffe); local_14 = 0xffffffff; if (local_54 == (int *)0x0) goto LAB_0072956a; piVar16 = tearFlagTokensEnd; @@ -5810,7 +5810,7 @@ LAB_00729115: if (0xfff < uVar9) { freeBlock = *(void **)((char *)tokenBuffer + -4); uVar9 = uVar7 + 0x24; - if (0x1f < (uint)((int)tokenBuffer + (-4 - (int)freeBlock))) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tokenBuffer) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_0072a19f; } operator_delete(freeBlock,uVar9); @@ -5822,12 +5822,12 @@ LAB_00729115: piVar10 = piVar10 + 6; } while (piVar10 != piVar16); } - uVar7 = ((tearFlagTokensCapacity - (int)piVar14) / 0x18) * 0x18; + uVar7 = ((tearFlagTokensCapacity - GHIDRA_INT(piVar14)) / 0x18) * 0x18; piVar16 = piVar14; if (0xfff < uVar7) { piVar16 = (int *)piVar14[-1]; uVar7 = uVar7 + 0x23; - if ((undefined1 *)0x1f < (undefined1 *)((int)piVar14 + (-4 - (int)piVar16))) + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(piVar14) + (-4 - GHIDRA_INT(piVar16)))) goto LAB_0072a19f; } operator_delete(piVar16,uVar7); @@ -5847,7 +5847,7 @@ LAB_00729115: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_00729355: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072935a; } if (bVar4 == 0) break; @@ -5872,36 +5872,36 @@ LAB_0072935a: bVar4 = *pbVar6; pbVar6 = pbVar6 + 1; } while (bVar4 != 0); - ((std::string *)((char *)&attrText))->std::string::assign(pbVar13,(int)pbVar6 - (int)(pbVar13 + 1)); + ((std::string *)((char *)&attrText))->std::string::assign(pbVar13,GHIDRA_INT(pbVar6) - GHIDRA_INT((pbVar13 + 1))); local_14 = 4; - local_50 = (int *)((uint)parsedMask | 2); + local_50 = (int *)(GHIDRA_UINT(parsedMask) | 2); tearFlags2Tokens = (int *)0x0; tearFlags2TokensEnd = (int *)0x0; tearFlags2TokensCapacity = 0; parsedMask = local_50; string_split(&attrText, - (std_string *)CONCAT31((int3)((uint)extraout_EDX_00 >> 8),0x20), + (std_string *)CONCAT31((int3)(GHIDRA_UINT(extraout_EDX_00) >> 8),0x20), (byte)&tearFlags2Tokens); - local_14 = CONCAT31(local_14._1_3_,5); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),5); if ((int ***)0xf < attrTextCapacity) { - pppiVar15 = (int ***)((int)attrTextCapacity + 1); + pppiVar15 = (int ***)(GHIDRA_INT(attrTextCapacity) + 1); ppppiVar8 = attrText; if ((int ***)0xfff < pppiVar15) { ppppiVar8 = (int ****)attrText[-1]; pppiVar15 = attrTextCapacity + 9; - if (0x1f < (uint)((int)attrText + (-4 - (int)ppppiVar8))) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(attrText) + (-4 - GHIDRA_INT(ppppiVar8))))) goto LAB_0072a19f; } - operator_delete(ppppiVar8,(uint)pppiVar15); + operator_delete(ppppiVar8,GHIDRA_UINT(pppiVar15)); } piVar16 = (int *)0x0; local_50 = tearFlags2Tokens; - local_54 = (int *)(((int)tearFlags2TokensEnd - (int)tearFlags2Tokens) / 0x18); + local_54 = (int *)((GHIDRA_INT(tearFlags2TokensEnd) - GHIDRA_INT(tearFlags2Tokens)) / 0x18); piVar14 = tearFlags2Tokens; if (local_54 != (int *)0x0) { do { piVar10 = piVar14; - if (0xf < (uint)piVar14[5]) { + if (0xf < GHIDRA_UINT(piVar14[5])) { piVar10 = (int *)*piVar14; } uVar7 = atoi((char *)piVar10); @@ -5915,8 +5915,8 @@ LAB_0072935a: if (0x3f < uVar7) { flagMaskHigh = uVar9; } - wispEntry[0x26] = (float)((uint)wispEntry[0x26] | uVar9); - wispEntry[0x27] = (float)((uint)wispEntry[0x27] | flagMaskHigh); + wispEntry[0x26] = (float)(GHIDRA_UINT(wispEntry[0x26]) | uVar9); + wispEntry[0x27] = (float)(GHIDRA_UINT(wispEntry[0x27]) | flagMaskHigh); } else { uVar7 = uVar7 - 0x40; @@ -5929,15 +5929,15 @@ LAB_0072935a: if (0x3f < uVar7) { flagMaskHigh = uVar9; } - wispEntry[0x28] = (float)((uint)wispEntry[0x28] | uVar9); - wispEntry[0x29] = (float)((uint)wispEntry[0x29] | flagMaskHigh); + wispEntry[0x28] = (float)(GHIDRA_UINT(wispEntry[0x28]) | uVar9); + wispEntry[0x29] = (float)(GHIDRA_UINT(wispEntry[0x29]) | flagMaskHigh); } - piVar16 = (int *)((int)piVar16 + 1); + piVar16 = (int *)(GHIDRA_INT(piVar16) + 1); piVar14 = piVar14 + 6; } while (piVar16 < local_54); } piVar14 = local_50; - parsedMask = (int *)((uint)parsedMask & 0xfffffffd); + parsedMask = (int *)(GHIDRA_UINT(parsedMask) & 0xfffffffd); local_14 = 0xffffffff; if (local_50 != (int *)0x0) { piVar16 = tearFlags2TokensEnd; @@ -5952,7 +5952,7 @@ LAB_0072935a: if (0xfff < uVar9) { freeBlock = *(void **)((char *)tokenBuffer + -4); uVar9 = uVar7 + 0x24; - if (0x1f < (uint)((int)tokenBuffer + (-4 - (int)freeBlock))) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tokenBuffer) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_0072a19f; } operator_delete(freeBlock,uVar9); @@ -5964,13 +5964,13 @@ LAB_0072935a: piVar10 = piVar10 + 6; } while (piVar10 != piVar16); } - uVar7 = ((tearFlags2TokensCapacity - (int)piVar14) / 0x18) * 0x18; + uVar7 = ((tearFlags2TokensCapacity - GHIDRA_INT(piVar14)) / 0x18) * 0x18; piVar16 = piVar14; if (0xfff < uVar7) { piVar16 = (int *)piVar14[-1]; uVar7 = uVar7 + 0x23; if ((undefined1 *)0x1f < - (undefined1 *)((int)piVar14 + (-4 - (int)piVar16))) goto LAB_0072a19f; + (undefined1 *)(GHIDRA_INT(piVar14) + (-4 - GHIDRA_INT(piVar16)))) goto LAB_0072a19f; } operator_delete(piVar16,uVar7); tearFlags2Tokens = (int *)0x0; @@ -5991,7 +5991,7 @@ LAB_0072956a: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_007295a1: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_007295a6; } if (bVar4 == 0) break; @@ -6022,7 +6022,7 @@ LAB_007295a6: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_00729600: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_00729605; } if (bVar4 == 0) break; @@ -6053,7 +6053,7 @@ LAB_00729605: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_00729660: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_00729665; } if (bVar4 == 0) break; @@ -6084,7 +6084,7 @@ LAB_00729665: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_007296c0: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_007296c5; } if (bVar4 == 0) break; @@ -6115,7 +6115,7 @@ LAB_007296c5: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_00729720: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_00729725; } if (bVar4 == 0) break; @@ -6146,7 +6146,7 @@ LAB_00729725: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_00729780: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_00729785; } if (bVar4 == 0) break; @@ -6177,7 +6177,7 @@ LAB_00729785: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_007297e0: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_007297e5; } if (bVar4 == 0) break; @@ -6203,7 +6203,7 @@ LAB_007297e5: pbVar6 = pbVar6 + 1; } while (bVar4 != 0); ((std::string *)((char *)&attrText))->std::string::assign(pbVar13, - (int)pbVar6 - (int)(pbVar13 + 1)); + GHIDRA_INT(pbVar6) - GHIDRA_INT((pbVar13 + 1))); local_14 = 6; colorPreset = (float *)color_preset_lookup(colorPresetsLocal, uVar5); @@ -6229,15 +6229,15 @@ LAB_007297e5: } local_14 = 0xffffffff; if ((int ***)0xf < attrTextCapacity) { - pppiVar15 = (int ***)((int)attrTextCapacity + 1); + pppiVar15 = (int ***)(GHIDRA_INT(attrTextCapacity) + 1); ppppiVar8 = attrText; if ((int ***)0xfff < pppiVar15) { ppppiVar8 = (int ****)attrText[-1]; pppiVar15 = attrTextCapacity + 9; - if (0x1f < (uint)((int)attrText + (-4 - (int)ppppiVar8))) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(attrText) + (-4 - GHIDRA_INT(ppppiVar8))))) goto LAB_0072a19f; } - operator_delete(ppppiVar8,(uint)pppiVar15); + operator_delete(ppppiVar8,GHIDRA_UINT(pppiVar15)); } } else { @@ -6251,7 +6251,7 @@ LAB_007297e5: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_007298e6: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_007298eb; } if (bVar4 == 0) break; @@ -6277,7 +6277,7 @@ LAB_007298eb: pbVar6 = pbVar6 + 1; } while (bVar4 != 0); ((std::string *)((char *)&attrText))->std::string::assign(pbVar13, - (int)pbVar6 - (int)(pbVar13 + 1)); + GHIDRA_INT(pbVar6) - GHIDRA_INT((pbVar13 + 1))); local_14 = 7; colorPreset = (float *)color_preset_lookup(colorPresetsLocal, uVar5); @@ -6303,15 +6303,15 @@ LAB_007298eb: } local_14 = 0xffffffff; if ((int ***)0xf < attrTextCapacity) { - pppiVar15 = (int ***)((int)attrTextCapacity + 1); + pppiVar15 = (int ***)(GHIDRA_INT(attrTextCapacity) + 1); ppppiVar8 = attrText; if ((int ***)0xfff < pppiVar15) { ppppiVar8 = (int ****)attrText[-1]; pppiVar15 = attrTextCapacity + 9; - if (0x1f < (uint)((int)attrText + (-4 - (int)ppppiVar8))) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(attrText) + (-4 - GHIDRA_INT(ppppiVar8))))) goto LAB_0072a19f; } - operator_delete(ppppiVar8,(uint)pppiVar15); + operator_delete(ppppiVar8,GHIDRA_UINT(pppiVar15)); } } else { @@ -6325,7 +6325,7 @@ LAB_007298eb: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_007299e7: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_007299ec; } if (bVar4 == 0) break; @@ -6351,7 +6351,7 @@ LAB_007299ec: pbVar6 = pbVar6 + 1; } while (bVar4 != 0); ((std::string *)((char *)&attrText))->std::string::assign(pbVar13, - (int)pbVar6 - (int)(pbVar13 + 1)); + GHIDRA_INT(pbVar6) - GHIDRA_INT((pbVar13 + 1))); local_14 = 8; colorPreset = (float *)color_preset_lookup(colorPresetsLocal ,uVar5); @@ -6377,15 +6377,15 @@ LAB_007299ec: } local_14 = 0xffffffff; if ((int ***)0xf < attrTextCapacity) { - pppiVar15 = (int ***)((int)attrTextCapacity + 1); + pppiVar15 = (int ***)(GHIDRA_INT(attrTextCapacity) + 1); ppppiVar8 = attrText; if ((int ***)0xfff < pppiVar15) { ppppiVar8 = (int ****)attrText[-1]; pppiVar15 = attrTextCapacity + 9; - if (0x1f < (uint)((int)attrText + (-4 - (int)ppppiVar8)) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(attrText) + (-4 - GHIDRA_INT(ppppiVar8)))) ) goto LAB_0072a19f; } - operator_delete(ppppiVar8,(uint)pppiVar15); + operator_delete(ppppiVar8,GHIDRA_UINT(pppiVar15)); } } else { @@ -6399,7 +6399,7 @@ LAB_007299ec: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_00729af0: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_00729af5; } if (bVar4 == 0) break; @@ -6425,7 +6425,7 @@ LAB_00729af5: pbVar6 = pbVar6 + 1; } while (bVar4 != 0); ((std::string *)((char *)&attrText))->std::string::assign(pbVar13, - (int)pbVar6 - (int)(pbVar13 + 1)); + GHIDRA_INT(pbVar6) - GHIDRA_INT((pbVar13 + 1))); local_14 = 9; colorPreset = (float *)color_preset_lookup( colorPresetsLocal,uVar5); @@ -6451,16 +6451,16 @@ LAB_00729af5: } local_14 = 0xffffffff; if ((int ***)0xf < attrTextCapacity) { - pppiVar15 = (int ***)((int)attrTextCapacity + 1); + pppiVar15 = (int ***)(GHIDRA_INT(attrTextCapacity) + 1); ppppiVar8 = attrText; if ((int ***)0xfff < pppiVar15) { ppppiVar8 = (int ****)attrText[-1]; pppiVar15 = attrTextCapacity + 9; - if (0x1f < (uint)((int)attrText + - (-4 - (int)ppppiVar8))) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(attrText) + + (-4 - GHIDRA_INT(ppppiVar8))))) goto LAB_0072a19f; } - operator_delete(ppppiVar8,(uint)pppiVar15); + operator_delete(ppppiVar8,GHIDRA_UINT(pppiVar15)); } } else { @@ -6474,7 +6474,7 @@ LAB_00729af5: isLess = bVar4 < *shortKeyName; if (bVar4 != *shortKeyName) { LAB_00729c00: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_00729c05; } if (bVar4 == 0) break; @@ -6497,7 +6497,7 @@ LAB_00729c05: pbVar6 = pbVar6 + 1; } while (bVar4 != 0); nameLength = (std_string *) - (pbVar6 + -(int)(pbVar13 + 1)); + (pbVar6 + -GHIDRA_INT((pbVar13 + 1))); if ((std_string *)(0x7fffffff - gfxRootLocal->_size) < nameLength) { LAB_0072a1a5: @@ -6508,25 +6508,25 @@ LAB_0072a1a5: if (0xf < gfxRootLocal->_capacity) { psVar12 = *(std_string **)gfxRootLocal->_buf; } - ((std::string *)((char *)&attrText))->std::string::concat((int)local_54, + ((std::string *)((char *)&attrText))->std::string::concat(GHIDRA_INT(local_54), nameLength,(byte *)psVar12, gfxRootLocal->_size,pbVar13, - (uint)nameLength); + GHIDRA_UINT(nameLength)); entry = wispEntry; - parsedMask = (int *)((uint)parsedMask | 4); + parsedMask = (int *)(GHIDRA_UINT(parsedMask) | 4); ppppiVar8 = (int ****)(wispEntry + 0x57); if ((int *****)ppppiVar8 == &attrText) { if ((int ***)0xf < attrTextCapacity) { - pppiVar15 = (int ***)((int)attrTextCapacity + 1); + pppiVar15 = (int ***)(GHIDRA_INT(attrTextCapacity) + 1); ppppiVar8 = attrText; if ((int ***)0xfff < pppiVar15) { ppppiVar8 = (int ****)attrText[-1]; pppiVar15 = attrTextCapacity + 9; - if (0x1f < (uint)((int)attrText + - (-4 - (int)ppppiVar8))) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(attrText) + + (-4 - GHIDRA_INT(ppppiVar8))))) goto LAB_0072a19f; } - operator_delete(ppppiVar8,(uint)pppiVar15); + operator_delete(ppppiVar8,GHIDRA_UINT(pppiVar15)); } } else { @@ -6552,7 +6552,7 @@ LAB_00729c71: isLess = bVar4 < *shortKeyName; if (bVar4 != *shortKeyName) { LAB_00729d00: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_00729d05; } if (bVar4 == 0) break; @@ -6575,33 +6575,33 @@ LAB_00729d05: pbVar6 = pbVar6 + 1; } while (bVar4 != 0); nameLength = (std_string *) - (pbVar6 + -(int)(pbVar13 + 1)); + (pbVar6 + -GHIDRA_INT((pbVar13 + 1))); if ((std_string *)(0x7fffffff - gfxRootLocal->_size) < nameLength) goto LAB_0072a1a5; psVar12 = gfxRootLocal; if (0xf < gfxRootLocal->_capacity) { psVar12 = *(std_string **)gfxRootLocal->_buf; } - ((std::string *)((char *)&attrText))->std::string::concat((int)local_54, + ((std::string *)((char *)&attrText))->std::string::concat(GHIDRA_INT(local_54), nameLength,(byte *)psVar12, gfxRootLocal->_size,pbVar13, - (uint)nameLength); + GHIDRA_UINT(nameLength)); entry = wispEntry; - parsedMask = (int *)((uint)parsedMask | 8); + parsedMask = (int *)(GHIDRA_UINT(parsedMask) | 8); ppppiVar8 = (int ****)(wispEntry + 0x5d); if ((int *****)ppppiVar8 != &attrText) goto LAB_00729c71; if ((int ***)0xf < attrTextCapacity) { - pppiVar15 = (int ***)((int)attrTextCapacity + 1); + pppiVar15 = (int ***)(GHIDRA_INT(attrTextCapacity) + 1); ppppiVar8 = attrText; if ((int ***)0xfff < pppiVar15) { ppppiVar8 = (int ****)attrText[-1]; pppiVar15 = attrTextCapacity + 9; - if (0x1f < (uint)((int)attrText + - (-4 - (int)ppppiVar8))) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(attrText) + + (-4 - GHIDRA_INT(ppppiVar8))))) goto LAB_0072a19f; } - operator_delete(ppppiVar8,(uint)pppiVar15); + operator_delete(ppppiVar8,GHIDRA_UINT(pppiVar15)); } } else { @@ -6615,7 +6615,7 @@ LAB_00729d05: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_00729de1: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_00729de6; } if (bVar4 == 0) break; @@ -6641,7 +6641,7 @@ LAB_00729de6: pbVar6 = pbVar6 + 1; } while (bVar4 != 0); ((std::string *)((char *)&attrText))->std::string::assign(pbVar13, - (int)pbVar6 - (int)(pbVar13 + 1)); + GHIDRA_INT(pbVar6) - GHIDRA_INT((pbVar13 + 1))); local_14 = 10; colorPreset = (float *)color_preset_lookup( colorPresetsLocal,uVar5); @@ -6667,16 +6667,16 @@ LAB_00729de6: } local_14 = 0xffffffff; if ((int ***)0xf < attrTextCapacity) { - pppiVar15 = (int ***)((int)attrTextCapacity + 1); + pppiVar15 = (int ***)(GHIDRA_INT(attrTextCapacity) + 1); ppppiVar8 = attrText; if ((int ***)0xfff < pppiVar15) { ppppiVar8 = (int ****)attrText[-1]; pppiVar15 = attrTextCapacity + 9; - if (0x1f < (uint)((int)attrText + - (-4 - (int)ppppiVar8))) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(attrText) + + (-4 - GHIDRA_INT(ppppiVar8))))) goto LAB_0072a19f; } - operator_delete(ppppiVar8,(uint)pppiVar15); + operator_delete(ppppiVar8,GHIDRA_UINT(pppiVar15)); } } else { @@ -6690,7 +6690,7 @@ LAB_00729de6: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_00729ef0: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_00729ef5; } if (bVar4 == 0) break; @@ -6716,8 +6716,8 @@ LAB_00729ef5: pbVar6 = pbVar6 + 1; } while (bVar4 != 0); ((std::string *)((char *)&attrText))->std::string::assign(pbVar13, - (int)pbVar6 - - (int)(pbVar13 + 1)); + GHIDRA_INT(pbVar6) - + GHIDRA_INT((pbVar13 + 1))); local_14 = 0xb; colorPreset = (float *)color_preset_lookup( colorPresetsLocal,uVar5); @@ -6743,17 +6743,17 @@ LAB_00729ef5: } local_14 = 0xffffffff; if ((int ***)0xf < attrTextCapacity) { - pppiVar15 = (int ***)((int)attrTextCapacity + 1) + pppiVar15 = (int ***)(GHIDRA_INT(attrTextCapacity) + 1) ; ppppiVar8 = attrText; if ((int ***)0xfff < pppiVar15) { ppppiVar8 = (int ****)attrText[-1]; pppiVar15 = attrTextCapacity + 9; - if (0x1f < (uint)((int)attrText + - (-4 - (int)ppppiVar8))) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(attrText) + + (-4 - GHIDRA_INT(ppppiVar8))))) goto LAB_0072a19f; } - operator_delete(ppppiVar8,(uint)pppiVar15); + operator_delete(ppppiVar8,GHIDRA_UINT(pppiVar15)); } } else { @@ -6767,7 +6767,7 @@ LAB_00729ef5: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_0072a000: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072a005; } if (bVar4 == 0) break; @@ -6798,7 +6798,7 @@ LAB_0072a005: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_0072a060: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072a065; } if (bVar4 == 0) break; @@ -6830,7 +6830,7 @@ LAB_0072a065: isLess = bVar4 < (byte)*keyName; if (bVar4 != *keyName) { LAB_0072a0c0: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072a0c5; } if (bVar4 == 0) break; @@ -6884,7 +6884,7 @@ LAB_0072a0c5: if (entry[0x19] <= 0.0 && entry[0x19] != 0.0) { entry[0x19] = entry[7]; } - if ((int)entry[0x1a] < 0) { + if (GHIDRA_INT(entry[0x1a]) < 0) { entry[0x1a] = entry[8]; } if (entry[0x1e] <= 0.0 && entry[0x1e] != 0.0) { @@ -6970,9 +6970,9 @@ byte ItemConfig::load_wisps_xml(byte *path, void *modEntry) gfxRoot._offset[2] = -NAN; gfxRoot._offset[1] = (float)&LAB_00afd25b; gfxRoot._offset[0] = (float)ExceptionList; - fVar2 = (float)(__security_cookie ^ (uint)(&parsedColor + 2)); + fVar2 = (float)(__security_cookie ^ GHIDRA_UINT((&parsedColor + 2))); ExceptionList = gfxRoot._offset; - modIdMap = -(uint)(modEntry != (void *)0x0) & (int)modEntry + 0xecU; + modIdMap = -GHIDRA_UINT((modEntry != (void *)0x0)) & GHIDRA_INT(modEntry) + 0xecU; savedThis = this; gfxRoot._colorize[2] = fVar2; piStack_10118 = ((FileSystem *)(&PTR_vftable_00c37a10))->FileSystem::Open(path,(int *)0x0); @@ -6992,13 +6992,13 @@ byte ItemConfig::load_wisps_xml(byte *path, void *modEntry) pbVar7 = fileBuffer; ((rapidxml::xml_document *)(xmlDoc))->rapidxml::xml_document::parse(fileBuffer); bVar1 = (byte)pbVar7; - pvVar4 = ((xml_node *)(xmlDoc))->xml_node::first_node((byte *)"wisps",(int)pcVar9,bVar1); + pvVar4 = ((xml_node *)(xmlDoc))->xml_node::first_node((byte *)"wisps",GHIDRA_INT(pcVar9),bVar1); if (pvVar4 == (void *)0x0) { pcVar9 = "Could not find root node \'wisps\' in %s\n"; KAGE_LogMessage(0x10,(byte *)"Could not find root node \'wisps\' in %s\n"); bVar1 = (byte)path; } - gfxRootAttr = ((xml_node *)(pvVar4))->xml_node::first_attribute(&DAT_00b6987c,(uint)pcVar9,bVar1); + gfxRootAttr = ((xml_node *)(pvVar4))->xml_node::first_attribute(&DAT_00b6987c,GHIDRA_UINT(pcVar9),bVar1); pbVar7 = &g_xmlNullStr; if (*(byte **)((char *)gfxRootAttr + 4) != (byte *)0x0) { pbVar7 = *(byte **)((char *)gfxRootAttr + 4); @@ -7011,8 +7011,8 @@ byte ItemConfig::load_wisps_xml(byte *path, void *modEntry) bVar1 = *attrNameChar; attrNameChar = attrNameChar + 1; } while (bVar1 != 0); - ((std::string *)((char *)&gfxRoot))->std::string::assign(pbVar7,(int)attrNameChar - (int)(pbVar7 + 1)); - gfxRoot._offset[2]._0_1_ = 1; + ((std::string *)((char *)&gfxRoot))->std::string::assign(pbVar7,GHIDRA_INT(attrNameChar) - GHIDRA_INT((pbVar7 + 1))); + (*(undefined1 *)((char *)&(gfxRoot._offset[2]) + 0x0)) = 1; pcVar9 = (char *)0x54; colorMapHead = (void *)0x0; colorMapSize = 0; @@ -7022,7 +7022,7 @@ byte ItemConfig::load_wisps_xml(byte *path, void *modEntry) *(void **)((char *)colorMapHead + 4) = colorMapHead; *(void **)((char *)colorMapHead + 8) = colorMapHead; *(undefined2 *)((char *)colorMapHead + 0xc) = 0x101; - gfxRoot._offset[2]._0_1_ = 2; + (*(undefined1 *)((char *)&(gfxRoot._offset[2]) + 0x0)) = 2; piStack_10118 = *(int **)((char *)pvVar4 + 0x18); if (piStack_10118 != (undefined4 *)0x0) { atoiFn = atoi_exref; @@ -7038,7 +7038,7 @@ byte ItemConfig::load_wisps_xml(byte *path, void *modEntry) isLessThan = bVar1 < (byte)*colorTagChar; if (bVar1 != *colorTagChar) { LAB_0072a3a7: - uVar5 = -(uint)isLessThan | 1; + uVar5 = -GHIDRA_UINT(isLessThan) | 1; goto LAB_0072a3ac; } if (bVar1 == 0) break; @@ -7070,7 +7070,7 @@ LAB_0072a3ac: parsedColor._colorize[1] = 0.0; parsedColor._colorize[2] = 0.0; parsedColor._colorize[3] = 0.0; - gfxRoot._offset[2]._0_1_ = 3; + (*(undefined1 *)((char *)&(gfxRoot._offset[2]) + 0x0)) = 3; attr = (undefined4 *)piStack_10118[8]; parsedColor._offset[0] = 0.0; parsedColor._offset[1] = parsedColor._offset[0]; @@ -7088,7 +7088,7 @@ LAB_0072a3ac: isLessThan = bVar1 < *expectedAttrChar; if (bVar1 != *expectedAttrChar) { LAB_0072a436: - uVar5 = -(uint)isLessThan | 1; + uVar5 = -GHIDRA_UINT(isLessThan) | 1; goto LAB_0072a43b; } if (bVar1 == 0) break; @@ -7108,10 +7108,10 @@ LAB_0072a43b: pfVar6 = text; do { bVar1 = *(byte *)pfVar6; - pfVar6 = (float *)((int)pfVar6 + 1); + pfVar6 = (float *)(GHIDRA_INT(pfVar6) + 1); } while (bVar1 != 0); - pcVar9 = (char *)((int)pfVar6 - (int)((int)text + 1)); - ((std::string *)((char *)colorName))->std::string::assign((byte *)text,(uint)pcVar9); + pcVar9 = (char *)(GHIDRA_INT(pfVar6) - GHIDRA_INT((GHIDRA_INT(text) + 1))); + ((std::string *)((char *)colorName))->std::string::assign((byte *)text,GHIDRA_UINT(pcVar9)); } else { expectedAttrChar = &DAT_00b6617c; @@ -7124,7 +7124,7 @@ LAB_0072a43b: isLessThan = bVar1 < *expectedAttrChar; if (bVar1 != *expectedAttrChar) { LAB_0072a498: - uVar5 = -(uint)isLessThan | 1; + uVar5 = -GHIDRA_UINT(isLessThan) | 1; goto LAB_0072a49d; } if (bVar1 == 0) break; @@ -7157,7 +7157,7 @@ LAB_0072a49d: isLessThan = bVar1 < *expectedAttrChar; if (bVar1 != *expectedAttrChar) { LAB_0072a500: - uVar5 = -(uint)isLessThan | 1; + uVar5 = -GHIDRA_UINT(isLessThan) | 1; goto LAB_0072a505; } if (bVar1 == 0) break; @@ -7190,7 +7190,7 @@ LAB_0072a505: isLessThan = bVar1 < *expectedAttrChar; if (bVar1 != *expectedAttrChar) { LAB_0072a566: - uVar5 = -(uint)isLessThan | 1; + uVar5 = -GHIDRA_UINT(isLessThan) | 1; goto LAB_0072a56b; } if (bVar1 == 0) break; @@ -7223,7 +7223,7 @@ LAB_0072a56b: isLessThan = bVar1 < *expectedAttrChar; if (bVar1 != *expectedAttrChar) { LAB_0072a5d0: - uVar5 = -(uint)isLessThan | 1; + uVar5 = -GHIDRA_UINT(isLessThan) | 1; goto LAB_0072a5d5; } if (bVar1 == 0) break; @@ -7256,7 +7256,7 @@ LAB_0072a5d5: isLessThan = bVar1 < *expectedAttrChar; if (bVar1 != *expectedAttrChar) { LAB_0072a636: - uVar5 = -(uint)isLessThan | 1; + uVar5 = -GHIDRA_UINT(isLessThan) | 1; goto LAB_0072a63b; } if (bVar1 == 0) break; @@ -7289,7 +7289,7 @@ LAB_0072a63b: isLessThan = bVar1 < *expectedAttrChar; if (bVar1 != *expectedAttrChar) { LAB_0072a6a0: - uVar5 = -(uint)isLessThan | 1; + uVar5 = -GHIDRA_UINT(isLessThan) | 1; goto LAB_0072a6a5; } if (bVar1 == 0) break; @@ -7322,7 +7322,7 @@ LAB_0072a6a5: isLessThan = bVar1 < *expectedAttrChar; if (bVar1 != *expectedAttrChar) { LAB_0072a706: - uVar5 = -(uint)isLessThan | 1; + uVar5 = -GHIDRA_UINT(isLessThan) | 1; goto LAB_0072a70b; } if (bVar1 == 0) break; @@ -7355,7 +7355,7 @@ LAB_0072a70b: isLessThan = bVar1 < *expectedAttrChar; if (bVar1 != *expectedAttrChar) { LAB_0072a770: - uVar5 = -(uint)isLessThan | 1; + uVar5 = -GHIDRA_UINT(isLessThan) | 1; goto LAB_0072a775; } if (bVar1 == 0) break; @@ -7388,7 +7388,7 @@ LAB_0072a775: isLessThan = bVar1 < *expectedAttrChar; if (bVar1 != *expectedAttrChar) { LAB_0072a7d6: - uVar5 = -(uint)isLessThan | 1; + uVar5 = -GHIDRA_UINT(isLessThan) | 1; goto LAB_0072a7db; } if (bVar1 == 0) break; @@ -7421,7 +7421,7 @@ LAB_0072a7db: isLessThan = bVar1 < *expectedAttrChar; if (bVar1 != *expectedAttrChar) { LAB_0072a840: - uVar5 = -(uint)isLessThan | 1; + uVar5 = -GHIDRA_UINT(isLessThan) | 1; goto LAB_0072a845; } if (bVar1 == 0) break; @@ -7454,7 +7454,7 @@ LAB_0072a845: isLessThan = bVar1 < *expectedAttrChar; if (bVar1 != *expectedAttrChar) { LAB_0072a8a3: - uVar5 = -(uint)isLessThan | 1; + uVar5 = -GHIDRA_UINT(isLessThan) | 1; goto LAB_0072a8a8; } if (bVar1 == 0) break; @@ -7510,22 +7510,22 @@ LAB_0072a8a8: colorCopy._colorize[3] = fStack_1014c; colorCopy._offset[0] = parsedColor._offset[0]; colorCopy._offset[1] = parsedColor._offset[1]; - gfxRoot._offset[2]._0_1_ = 4; + (*(undefined1 *)((char *)&(gfxRoot._offset[2]) + 0x0)) = 4; text = afStack_10160; FUN_00731d70(text,colorNameCopy); pcVar9 = (char *)0x72a96c; ((std::string *)(colorNameCopy))->std::string::_Tidy_deallocate(); } - gfxRoot._offset[2]._0_1_ = 2; + (*(undefined1 *)((char *)&(gfxRoot._offset[2]) + 0x0)) = 2; if (0xf < colorNameCapacity) { pcVar9 = (char *)(colorNameCapacity + 1); text = colorName[0]; if ((void **)0xfff < pcVar9) { text = (float *)colorName[0][-1]; pcVar9 = (char *)(colorNameCapacity + 0x24); - if ((byte *)0x1f < (byte *)((int)colorName[0] + (-4 - (int)text))) goto LAB_0072ac13; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(colorName[0]) + (-4 - GHIDRA_INT(text)))) goto LAB_0072ac13; } - operator_delete(text,(uint)pcVar9); + operator_delete(text,GHIDRA_UINT(pcVar9)); } LAB_0072aba5: atoiFn = atoi_exref; @@ -7541,7 +7541,7 @@ LAB_0072aba5: isLessThan = bVar1 < *expectedAttrChar; if (bVar1 != *expectedAttrChar) { LAB_0072a9e0: - uVar5 = -(uint)isLessThan | 1; + uVar5 = -GHIDRA_UINT(isLessThan) | 1; goto LAB_0072a9e5; } if (bVar1 == 0) break; @@ -7554,7 +7554,7 @@ LAB_0072a9e0: uVar5 = 0; LAB_0072a9e5: if ((uVar5 == 0) && - (pvVar4 = ((xml_node *)(piStack_10118))->xml_node::first_attribute(s_id,(uint)text,(byte)pcVar9), + (pvVar4 = ((xml_node *)(piStack_10118))->xml_node::first_attribute(s_id,GHIDRA_UINT(text),(byte)pcVar9), pvVar4 != (void *)0x0)) { idValue = *(void ***)((char *)pvVar4 + 4); idText = (void **)&g_xmlNullStr; @@ -7566,19 +7566,19 @@ LAB_0072a9e5: if (idValue != (void **)0x0) { idText = idValue; } - collectibleId = (void *)(*atoiFn)((byte *)((int)idText + 1)); + collectibleId = (void *)(*atoiFn)((byte *)(GHIDRA_INT(idText) + 1)); itemConfig = savedThis; - pvVar4 = *(void **)((int)savedThis[1]._collectibles._capacity + (int)collectibleId * 4 + pvVar4 = *(void **)(GHIDRA_INT(savedThis[1]._collectibles._capacity) + GHIDRA_INT(collectibleId) * 4 ); if (pvVar4 != (void *)0x0) { - ((std::string *)((char *)((int)pvVar4 + 0x174)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)pvVar4 + 0x15c)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(pvVar4) + 0x174)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(pvVar4) + 0x15c)))->std::string::_Tidy_deallocate(); operator_delete(pvVar4,0x198); - *(undefined4 *)((int)itemConfig[1]._collectibles._capacity + (int)collectibleId * 4) + *(undefined4 *)(GHIDRA_INT(itemConfig[1]._collectibles._capacity) + GHIDRA_INT(collectibleId) * 4) = 0; } attr = (undefined4 *) - ((int)itemConfig[1]._collectibles._capacity + (int)collectibleId * 4); + (GHIDRA_INT(itemConfig[1]._collectibles._capacity) + GHIDRA_INT(collectibleId) * 4); } else { pcVar9 = (char *)&g_xmlNullStr; @@ -7595,19 +7595,19 @@ LAB_0072a9e5: } itemConfig = savedThis; pvVar4 = (savedThis->_collectibles)._begin; - if ((int)(savedThis->_collectibles)._end - (int)pvVar4 >> 2 <= (int)collectibleId) { + if (GHIDRA_INT((savedThis->_collectibles)._end) - GHIDRA_INT(pvVar4) >> 2 <= GHIDRA_INT(collectibleId)) { pcVar9 = "Collectible ID out of bounds.\n"; text = (float *)0x10; KAGE_LogMessage(0x10,(byte *)"Collectible ID out of bounds.\n"); pvVar4 = (itemConfig->_collectibles)._begin; } - iVar3 = *(int *)((char *)pvVar4 + (int)collectibleId * 4); + iVar3 = *(int *)((char *)pvVar4 + GHIDRA_INT(collectibleId) * 4); if (iVar3 == 0) goto LAB_0072aba5; pvVar4 = *(void **)(iVar3 + 0xcc); puStack_10114 = (undefined4 *)(iVar3 + 0xcc); if (pvVar4 != (void *)0x0) { - ((std::string *)((char *)((int)pvVar4 + 0x174)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)pvVar4 + 0x15c)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(pvVar4) + 0x174)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(pvVar4) + 0x15c)))->std::string::_Tidy_deallocate(); operator_delete(pvVar4,0x198); *puStack_10114 = 0; } @@ -7616,7 +7616,7 @@ LAB_0072a9e5: attr = puStack_10114; } wispAlloc = operator_new(0x198); - gfxRoot._offset[2]._0_1_ = 5; + (*(undefined1 *)((char *)&(gfxRoot._offset[2]) + 0x0)) = 5; if (wispAlloc == (void *)0x0) { pfVar6 = (float *)0x0; } @@ -7625,7 +7625,7 @@ LAB_0072a9e5: pfVar6 = extraout_EAX; } pcVar9 = (char *)&colorMapHead; - gfxRoot._offset[2]._0_1_ = 2; + (*(undefined1 *)((char *)&(gfxRoot._offset[2]) + 0x0)) = 2; text = pfVar6; load_wisp_node((std_string *)&gfxRoot,piStack_10118,pfVar6,pcVar9); *attr = pfVar6; @@ -7637,14 +7637,14 @@ LAB_0072a9e5: } FUN_00731820(&colorMapHead,*(undefined4 *)((char *)colorMapHead + 4)); operator_delete(colorMapHead,0x54); - gfxRoot._offset[2]._0_1_ = 0; - if (0xf < (uint)gfxRoot._colorize[1]) { - uVar5 = (int)gfxRoot._colorize[1] + 1; + (*(undefined1 *)((char *)&(gfxRoot._offset[2]) + 0x0)) = 0; + if (0xf < GHIDRA_UINT(gfxRoot._colorize[1])) { + uVar5 = GHIDRA_INT(gfxRoot._colorize[1]) + 1; pvVar4 = (void *)gfxRoot._tint[0]; if (0xfff < uVar5) { - pvVar4 = *(void **)((int)gfxRoot._tint[0] + -4); - uVar5 = (int)gfxRoot._colorize[1] + 0x24; - if (0x1f < (uint)((int)gfxRoot._tint[0] + (-4 - (int)pvVar4))) { + pvVar4 = *(void **)(GHIDRA_INT(gfxRoot._tint[0]) + -4); + uVar5 = GHIDRA_INT(gfxRoot._colorize[1]) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(gfxRoot._tint[0]) + (-4 - GHIDRA_INT(pvVar4))))) { LAB_0072ac13: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -7654,21 +7654,21 @@ LAB_0072ac13: } gfxRoot._colorize[0] = 0.0; gfxRoot._colorize[1] = 2.10195e-44; - gfxRoot._tint[0] = (float)((uint)gfxRoot._tint[0] & 0xffffff00); + gfxRoot._tint[0] = (float)(GHIDRA_UINT(gfxRoot._tint[0]) & 0xffffff00); gfxRoot._offset[2] = 8.40779e-45; ((xml_memory_pool *)(xmlMemoryPool))->xml_memory_pool::clear(); if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (fileBuffer != (byte *)0x0) { uVar5 = *(uint *)(fileBuffer + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar5; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar5; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar5); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar5)); free(fileBuffer + -4); } bVar1 = 1; @@ -7708,7 +7708,7 @@ void ItemConfig::load_locust(void *xmlNode, void *locustEntry) isLess = curChar < (byte)*pcVar4; if (curChar != *pcVar4) { LAB_0072b281: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0072b286; } if (curChar == 0) break; @@ -7739,7 +7739,7 @@ LAB_0072b286: isLess = curChar < (byte)*pcVar4; if (curChar != *pcVar4) { LAB_0072b2d8: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0072b2dd; } if (curChar == 0) break; @@ -7770,7 +7770,7 @@ LAB_0072b2dd: isLess = curChar < (byte)*pcVar4; if (curChar != *pcVar4) { LAB_0072b330: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0072b335; } if (curChar == 0) break; @@ -7801,7 +7801,7 @@ LAB_0072b335: isLess = curChar < (byte)*pcVar4; if (curChar != *pcVar4) { LAB_0072b384: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0072b389; } if (curChar == 0) break; @@ -7848,7 +7848,7 @@ LAB_0072b389: isLess = curChar < *pbVar2; if (curChar != *pbVar2) { LAB_0072b4b0: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0072b4b5; } if (curChar == 0) break; @@ -7893,7 +7893,7 @@ LAB_0072b4df: isLess = curChar < *literalCursor; if (curChar != *literalCursor) { LAB_0072b550: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0072b555; } if (curChar == 0) break; @@ -7907,7 +7907,7 @@ LAB_0072b550: LAB_0072b555: if (cmpResult == 0) { LAB_0072b82c: - pcVar4 = (char *)((int)locustEntry + 0x84); + pcVar4 = (char *)(GHIDRA_INT(locustEntry) + 0x84); if (*(int *)((char *)locustEntry + 0x94) != 0) { ((std::string *)(pcVar4))->std::string::append(&DAT_00b69c5c,1); pbVar5 = (byte *)*attr; @@ -7922,7 +7922,7 @@ LAB_0072b82c: isLess = curChar < *literalCursor; if (curChar != *literalCursor) { LAB_0072b880: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0072b885; } if (curChar == 0) break; @@ -7950,7 +7950,7 @@ LAB_0072b915: isLess = curChar < *literalCursor; if (curChar != *literalCursor) { LAB_0072b8c4: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0072b8c9; } if (curChar == 0) break; @@ -7976,7 +7976,7 @@ LAB_0072b8c9: isLess = curChar < (byte)*pcVar6; if (curChar != *pcVar6) { LAB_0072b905: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0072b90a; } if (curChar == 0) break; @@ -8014,7 +8014,7 @@ LAB_0072b90a: isLess = curChar < *literalCursor; if (curChar != *literalCursor) { LAB_0072b590: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0072b595; } if (curChar == 0) break; @@ -8037,7 +8037,7 @@ LAB_0072b595: isLess = curChar < (byte)*pcVar4; if (curChar != *pcVar4) { LAB_0072b5d0: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0072b5d5; } if (curChar == 0) break; @@ -8060,7 +8060,7 @@ LAB_0072b5d5: isLess = curChar < (byte)*pcVar4; if (curChar != *pcVar4) { LAB_0072b610: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0072b615; } if (curChar == 0) break; @@ -8088,8 +8088,8 @@ LAB_0072b615: curChar = *pbVar2; pbVar2 = pbVar2 + 1; } while (curChar != 0); - ((std::string *)((char *)((int)locustEntry + 0x9c)))->std::string::assign(pbVar5, - (int)pbVar2 - (int)(pbVar5 + 1)); + ((std::string *)((char *)(GHIDRA_INT(locustEntry) + 0x9c)))->std::string::assign(pbVar5, + GHIDRA_INT(pbVar2) - GHIDRA_INT((pbVar5 + 1))); goto LAB_0072ba38; } } @@ -8104,7 +8104,7 @@ LAB_0072b615: isLess = curChar < (byte)*pcVar4; if (curChar != *pcVar4) { LAB_0072b694: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0072b699; } if (curChar == 0) break; @@ -8127,7 +8127,7 @@ LAB_0072b699: isLess = curChar < (byte)*pcVar4; if (curChar != *pcVar4) { LAB_0072b6d0: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0072b6d5; } if (curChar == 0) break; @@ -8150,7 +8150,7 @@ LAB_0072b6d5: isLess = curChar < (byte)*pcVar4; if (curChar != *pcVar4) { LAB_0072b708: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0072b70d; } if (curChar == 0) break; @@ -8165,7 +8165,7 @@ LAB_0072b70d: if (cmpResult != 0) goto LAB_0072ba38; } } - pcVar4 = (char *)((int)locustEntry + 0x9c); + pcVar4 = (char *)(GHIDRA_INT(locustEntry) + 0x9c); if (*(int *)((char *)locustEntry + 0xac) != 0) { ((std::string *)(pcVar4))->std::string::append(&DAT_00b69c5c,1); pbVar5 = (byte *)*attr; @@ -8180,7 +8180,7 @@ LAB_0072b70d: isLess = curChar < (byte)*pcVar6; if (curChar != *pcVar6) { LAB_0072b766: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0072b76b; } if (curChar == 0) break; @@ -8208,7 +8208,7 @@ LAB_0072b801: isLess = curChar < (byte)*pcVar6; if (curChar != *pcVar6) { LAB_0072b7b0: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0072b7b5; } if (curChar == 0) break; @@ -8234,7 +8234,7 @@ LAB_0072b7b5: isLess = curChar < (byte)*pcVar6; if (curChar != *pcVar6) { LAB_0072b7f1: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0072b7f6; } if (curChar == 0) break; @@ -8261,7 +8261,7 @@ LAB_0072b7f6: pbVar2 = pbVar2 + 1; } while (curChar != 0); } - ((std::string *)(pcVar4))->std::string::append(pbVar5,(int)pbVar2 - (int)(pbVar5 + 1)); + ((std::string *)(pcVar4))->std::string::append(pbVar5,GHIDRA_INT(pbVar2) - GHIDRA_INT((pbVar5 + 1))); goto LAB_0072ba38; } } @@ -8275,8 +8275,8 @@ LAB_0072b7f6: curChar = *pbVar2; pbVar2 = pbVar2 + 1; } while (curChar != 0); - ((std::string *)((char *)((int)locustEntry + 0x84)))->std::string::assign(pbVar5, - (int)pbVar2 - (int)(pbVar5 + 1)); + ((std::string *)((char *)(GHIDRA_INT(locustEntry) + 0x84)))->std::string::assign(pbVar5, + GHIDRA_INT(pbVar2) - GHIDRA_INT((pbVar5 + 1))); } else { pbVar5 = &g_xmlNullStr; @@ -8289,7 +8289,7 @@ LAB_0072b7f6: pbVar2 = pbVar2 + 1; } while (curChar != 0); ((std::string *)((char *)(iVar3 + 0x50)))->std::string::assign(pbVar5, - (int)pbVar2 - (int)(pbVar5 + 1)); + GHIDRA_INT(pbVar2) - GHIDRA_INT((pbVar5 + 1))); } } else { @@ -8303,7 +8303,7 @@ LAB_0072b7f6: pbVar2 = pbVar2 + 1; } while (curChar != 0); ((std::string *)((char *)(iVar3 + 0x38)))->std::string::assign(pbVar5, - (int)pbVar2 - (int)(pbVar5 + 1)); + GHIDRA_INT(pbVar2) - GHIDRA_INT((pbVar5 + 1))); } } else { @@ -8317,7 +8317,7 @@ LAB_0072b7f6: pbVar2 = pbVar2 + 1; } while (curChar != 0); ((std::string *)((char *)(iVar3 + 0x20)))->std::string::assign(pbVar5, - (int)pbVar2 - (int)(pbVar5 + 1)); + GHIDRA_INT(pbVar2) - GHIDRA_INT((pbVar5 + 1))); } } } @@ -8451,10 +8451,10 @@ void ItemConfig::LoadLocustConfig(byte *xmlpath, ModEntry *modentry) local_14 = (void *)0xffffffff; puStack_18 = &LAB_00afd2fe; local_1c = ExceptionList; - uVar2 = __security_cookie ^ (uint)(colorName + 0x16); + uVar2 = __security_cookie ^ GHIDRA_UINT((colorName + 0x16)); ExceptionList = &local_1c; cleanupFlags = 0; - modIdMap = -(uint)(modentry != (ModEntry *)0x0) & (uint)&(*(undefined1 *)((char *)(modentry) + 0xec)); + modIdMap = -GHIDRA_UINT((modentry != (ModEntry *)0x0)) & GHIDRA_UINT(&(*(undefined1 *)((char *)(modentry) + 0xec))); itemConfig = this; local_24 = uVar2; ((std::string *)((this->_wispGfxRoot)._buf))->std::string::assign(&s_empty,0); @@ -8479,14 +8479,14 @@ void ItemConfig::LoadLocustConfig(byte *xmlpath, ModEntry *modentry) pbVar4 = xmlBuffer; ((rapidxml::xml_document *)(xmlDoc))->rapidxml::xml_document::parse(xmlBuffer); bVar12 = (byte)pbVar4; - pbVar4 = ((xml_node *)(xmlDoc))->xml_node::first_node((byte *)"locusts",(int)pcVar11,bVar12); + pbVar4 = ((xml_node *)(xmlDoc))->xml_node::first_node((byte *)"locusts",GHIDRA_INT(pcVar11),bVar12); pbStack_101b4 = pbVar4; if (pbVar4 == (byte *)0x0) { pcVar11 = "Could not find root node \'locusts\' in %s\n"; KAGE_LogMessage(0x10,(byte *)"Could not find root node \'locusts\' in %s\n"); bVar12 = (byte)xmlpath; } - pvVar5 = ((xml_node *)(pbVar4))->xml_node::first_attribute(&DAT_00b6987c,(uint)pcVar11,bVar12); + pvVar5 = ((xml_node *)(pbVar4))->xml_node::first_attribute(&DAT_00b6987c,GHIDRA_UINT(pcVar11),bVar12); config = itemConfig; pbVar4 = &g_xmlNullStr; if (*(byte **)((char *)pvVar5 + 4) != (byte *)0x0) { @@ -8497,7 +8497,7 @@ void ItemConfig::LoadLocustConfig(byte *xmlpath, ModEntry *modentry) bVar12 = *pbVar8; pbVar8 = pbVar8 + 1; } while (bVar12 != 0); - ((std::string *)((itemConfig->_wispGfxRoot)._buf))->std::string::assign(pbVar4,(int)pbVar8 - (int)(pbVar4 + 1)); + ((std::string *)((itemConfig->_wispGfxRoot)._buf))->std::string::assign(pbVar4,GHIDRA_INT(pbVar8) - GHIDRA_INT((pbVar4 + 1))); locustConfigs = &config->_locustConfigs; pvVar5 = locustConfigs->_head; FUN_00731820(locustConfigs,*(undefined4 *)((char *)pvVar5 + 4)); @@ -8519,7 +8519,7 @@ LAB_0072bc65: isLess = bVar12 < (byte)*pcVar11; if (bVar12 != *pcVar11) { LAB_0072bc96: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072bc9b; } if (bVar12 == 0) break; @@ -8551,7 +8551,7 @@ LAB_0072bc9b: colorizeG = 0.0; colorizeB = 0.0; colorizeA = 0.0; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; puVar6 = (undefined4 *)locustNode[8]; offsetR = 0.0; offsetG = offsetR; @@ -8569,7 +8569,7 @@ LAB_0072bc9b: isLess = bVar12 < *pbVar7; if (bVar12 != *pbVar7) { LAB_0072bd25: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072bd2a; } if (bVar12 == 0) break; @@ -8591,7 +8591,7 @@ LAB_0072bd2a: bVar12 = *pbVar8; pbVar8 = pbVar8 + 1; } while (bVar12 != 0); - ((std::string *)((char *)colorName))->std::string::assign(pbVar4,(int)pbVar8 - (int)(pbVar4 + 1)); + ((std::string *)((char *)colorName))->std::string::assign(pbVar4,GHIDRA_INT(pbVar8) - GHIDRA_INT((pbVar4 + 1))); } else { pbVar7 = &DAT_00b6617c; @@ -8604,7 +8604,7 @@ LAB_0072bd2a: isLess = bVar12 < *pbVar7; if (bVar12 != *pbVar7) { LAB_0072bd87: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072bd8c; } if (bVar12 == 0) break; @@ -8636,7 +8636,7 @@ LAB_0072bd8c: isLess = bVar12 < *pbVar7; if (bVar12 != *pbVar7) { LAB_0072bdf0: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072bdf5; } if (bVar12 == 0) break; @@ -8668,7 +8668,7 @@ LAB_0072bdf5: isLess = bVar12 < *pbVar7; if (bVar12 != *pbVar7) { LAB_0072be56: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072be5b; } if (bVar12 == 0) break; @@ -8700,7 +8700,7 @@ LAB_0072be5b: isLess = bVar12 < *pbVar7; if (bVar12 != *pbVar7) { LAB_0072bec0: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072bec5; } if (bVar12 == 0) break; @@ -8732,7 +8732,7 @@ LAB_0072bec5: isLess = bVar12 < *pbVar7; if (bVar12 != *pbVar7) { LAB_0072bf26: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072bf2b; } if (bVar12 == 0) break; @@ -8764,7 +8764,7 @@ LAB_0072bf2b: isLess = bVar12 < *pbVar7; if (bVar12 != *pbVar7) { LAB_0072bf90: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072bf95; } if (bVar12 == 0) break; @@ -8796,7 +8796,7 @@ LAB_0072bf95: isLess = bVar12 < *pbVar7; if (bVar12 != *pbVar7) { LAB_0072bff6: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072bffb; } if (bVar12 == 0) break; @@ -8828,7 +8828,7 @@ LAB_0072bffb: isLess = bVar12 < *pbVar7; if (bVar12 != *pbVar7) { LAB_0072c060: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072c065; } if (bVar12 == 0) break; @@ -8860,7 +8860,7 @@ LAB_0072c065: isLess = bVar12 < *pbVar7; if (bVar12 != *pbVar7) { LAB_0072c0c6: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072c0cb; } if (bVar12 == 0) break; @@ -8892,7 +8892,7 @@ LAB_0072c0cb: isLess = bVar12 < *pbVar7; if (bVar12 != *pbVar7) { LAB_0072c130: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072c135; } if (bVar12 == 0) break; @@ -8924,7 +8924,7 @@ LAB_0072c135: isLess = bVar12 < *pbVar7; if (bVar12 != *pbVar7) { LAB_0072c193: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072c198; } if (bVar12 == 0) break; @@ -8981,18 +8981,18 @@ LAB_0072c198: entryColorizeA = stagedColorizeA; entryOffsetR = offsetR; entryOffsetG = offsetG; - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; FUN_00731d70(insertResult,colorNameCopy); ((std::string *)(colorNameCopy))->std::string::_Tidy_deallocate(); } - local_14 = (void *)((uint)local_14._1_3_ << 8); + local_14 = (void *)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8); if (0xf < colorNameCapacity) { uVar2 = colorNameCapacity + 1; pvVar5 = colorName[0]; if (0xfff < uVar2) { - pvVar5 = *(void **)((int)colorName[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(colorName[0]) + -4); uVar2 = colorNameCapacity + 0x24; - if (0x1f < (uint)((int)colorName[0] + (-4 - (int)pvVar5))) goto LAB_0072c899; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(colorName[0]) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_0072c899; } operator_delete(pvVar5,uVar2); } @@ -9008,7 +9008,7 @@ LAB_0072c198: isLess = bVar12 < (byte)*pcVar11; if (bVar12 != *pcVar11) { LAB_0072c2e0: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072c2e5; } if (bVar12 == 0) break; @@ -9038,7 +9038,7 @@ LAB_0072c2e5: isLess = bVar12 < (byte)*pcVar11; if (bVar12 != *pcVar11) { LAB_0072c343: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072c348; } if (bVar12 == 0) break; @@ -9069,7 +9069,7 @@ LAB_0072c348: isLess = bVar12 < (byte)*pcVar11; if (bVar12 != *pcVar11) { LAB_0072c3a7: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072c3ac; } if (bVar12 == 0) break; @@ -9109,7 +9109,7 @@ LAB_0072c3ac: isLess = bVar12 < (byte)*pcVar11; if (bVar12 != *pcVar11) { LAB_0072c443: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072c448; } if (bVar12 == 0) break; @@ -9139,7 +9139,7 @@ LAB_0072c448: pbVar8 = (byte *)puVar6[2]; } if (pbVar8 == pbStack_101b4) { - pbVar8 = pbVar8 + (int)pbVar4; + pbVar8 = pbVar8 + GHIDRA_INT(pbVar4); if (pbVar8 <= pbVar4) { LAB_0072c4b0: pbVar4 = &g_xmlNullStr; @@ -9153,12 +9153,12 @@ LAB_0072c4b0: } config = itemConfig; pvVar5 = (itemConfig->_collectibles)._begin; - if ((int)(itemConfig->_collectibles)._end - (int)pvVar5 >> 2 <= (int)piStack_101bc + if (GHIDRA_INT((itemConfig->_collectibles)._end) - GHIDRA_INT(pvVar5) >> 2 <= GHIDRA_INT(piStack_101bc) ) { KAGE_LogMessage(0x10,(byte *)"Collectible ID out of bounds.\n"); pvVar5 = (config->_collectibles)._begin; } - iVar3 = *(int *)((char *)pvVar5 + (int)piStack_101bc * 4); + iVar3 = *(int *)((char *)pvVar5 + GHIDRA_INT(piStack_101bc) * 4); if (iVar3 != 0) { pbStack_101b4 = (byte *)(iVar3 + 0xd0); FUN_00722740(); @@ -9176,7 +9176,7 @@ LAB_0072c4b0: newLocustTextBCapacity = 0xf; newLocustTextB = (void *)0x0; newLocust = 0x3f800000; - local_14 = (void *)CONCAT31(local_14._1_3_,3); + local_14 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),3); if (*(int *)(iVar3 + 0xd4) == *(int *)(iVar3 + 0xd8)) { std::vector<184byte>::_Emplace_reallocate(*(int *)(iVar3 + 0xd4),extraout_ECX) ; @@ -9185,28 +9185,28 @@ LAB_0072c4b0: FUN_00731870(); *(int *)(iVar3 + 0xd4) = *(int *)(iVar3 + 0xd4) + 0xb8; } - local_14 = (void *)((uint)local_14 & 0xffffff00); + local_14 = (void *)(GHIDRA_UINT(local_14) & 0xffffff00); if (0xf < newLocustTextBCapacity) { uVar2 = newLocustTextBCapacity + 1; pvVar5 = newLocustTextB; if (0xfff < uVar2) { pvVar5 = *(void **)((char *)newLocustTextB + -4); uVar2 = newLocustTextBCapacity + 0x24; - if (0x1f < (uint)((int)newLocustTextB + (-4 - (int)pvVar5))) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(newLocustTextB) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_0072c899; } operator_delete(pvVar5,uVar2); } newLocustTextBSize = 0; newLocustTextBCapacity = 0xf; - newLocustTextB = (void *)((uint)newLocustTextB & 0xffffff00); + newLocustTextB = (void *)(GHIDRA_UINT(newLocustTextB) & 0xffffff00); if (0xf < newLocustTextACapacity) { uVar2 = newLocustTextACapacity + 1; pvVar5 = newLocustTextA; if (0xfff < uVar2) { pvVar5 = *(void **)((char *)newLocustTextA + -4); uVar2 = newLocustTextACapacity + 0x24; - if (0x1f < (uint)((int)newLocustTextA + (-4 - (int)pvVar5))) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(newLocustTextA) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_0072c899; } operator_delete(pvVar5,uVar2); @@ -9214,7 +9214,7 @@ LAB_0072c4b0: nextElement = newLocustVecBegin; newLocustTextASize = 0; newLocustTextACapacity = 0xf; - newLocustTextA = (void *)((uint)newLocustTextA & 0xffffff00); + newLocustTextA = (void *)(GHIDRA_UINT(newLocustTextA) & 0xffffff00); if (newLocustVecBegin == (uint *)0x0) goto LAB_0072c804; if (newLocustVecBegin == newLocustVecEnd) goto LAB_0072c7a2; puVar9 = newLocustVecBegin + 0x19; @@ -9222,7 +9222,7 @@ LAB_0072c4b0: } break; } - iVar3 = (int)s_id - (int)pbVar4; + iVar3 = GHIDRA_INT(s_id) - GHIDRA_INT(pbVar4); while (*pbVar4 == pbVar4[iVar3]) { pbVar4 = pbVar4 + 1; if (pbVar8 <= pbVar4) goto LAB_0072c4b0; @@ -9241,14 +9241,14 @@ LAB_0072c878: heapAllocatedBytes = &g_allocatedBytesNoHeap; } else { - heapAllocatedBytes = (qword *)((int)g_mainHeap + 0x30); + heapAllocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (xmlBuffer != (byte *)0x0) { uVar2 = *(uint *)(xmlBuffer + -4); allocatedBefore = *heapAllocatedBytes; - *(uint *)heapAllocatedBytes = (uint)*heapAllocatedBytes - uVar2; + *(uint *)heapAllocatedBytes = GHIDRA_UINT(*heapAllocatedBytes) - uVar2; *(uint *)((char *)heapAllocatedBytes + 4) = - *(uint *)((char *)heapAllocatedBytes + 4) - (uint)((uint)allocatedBefore < uVar2); + *(uint *)((char *)heapAllocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBefore) < uVar2)); free(xmlBuffer + -4); } } @@ -9264,9 +9264,9 @@ LAB_0072c878: freeSize = uVar2 + 1; freeBlock = pvVar5; if (0xfff < freeSize) { - freeBlock = *(void **)((int)pvVar5 - 4); + freeBlock = *(void **)(GHIDRA_INT(pvVar5) - 4); freeSize = uVar2 + 0x24; - if (0x1f < (uint)((int)pvVar5 + (-4 - (int)freeBlock))) goto LAB_0072c899; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar5) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_0072c899; } operator_delete(freeBlock,freeSize); } @@ -9279,9 +9279,9 @@ LAB_0072c878: freeSize = uVar2 + 1; freeBlock = pvVar5; if (0xfff < freeSize) { - freeBlock = *(void **)((int)pvVar5 - 4); + freeBlock = *(void **)(GHIDRA_INT(pvVar5) - 4); freeSize = uVar2 + 0x24; - if (0x1f < (uint)((int)pvVar5 + (-4 - (int)freeBlock))) goto LAB_0072c899; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar5) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_0072c899; } operator_delete(freeBlock,freeSize); } @@ -9298,20 +9298,20 @@ LAB_0072c6c0: freeSize = uVar2 + 1; freeBlock = pvVar5; if (0xfff < freeSize) { - freeBlock = *(void **)((int)pvVar5 - 4); + freeBlock = *(void **)(GHIDRA_INT(pvVar5) - 4); freeSize = uVar2 + 0x24; - if (0x1f < (uint)((int)pvVar5 + (-4 - (int)freeBlock))) goto LAB_0072c899; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar5) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_0072c899; } operator_delete(freeBlock,freeSize); } } LAB_0072c7a2: - uVar2 = ((newLocustVecCapacity - (int)nextElement) / 0x68) * 0x68; + uVar2 = ((newLocustVecCapacity - GHIDRA_INT(nextElement)) / 0x68) * 0x68; puVar9 = nextElement; if (0xfff < uVar2) { puVar9 = (uint *)nextElement[-1]; uVar2 = uVar2 + 0x23; - if (0x1f < (uint)((int)nextElement + (-4 - (int)puVar9))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(nextElement) + (-4 - GHIDRA_INT(puVar9))))) { LAB_0072c899: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -9385,7 +9385,7 @@ byte ItemConfig::load_recipes_xml(byte *path, void *modEntry) local_8 = (byte ***)0xffffffff; puStack_c = &LAB_00afd340; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(local_34 + 0xc); + uVar2 = __security_cookie ^ GHIDRA_UINT((local_34 + 0xc)); ExceptionList = &local_10; if (DAT_00c7f080 == 0) { symbolIndex = 0; @@ -9432,7 +9432,7 @@ byte ItemConfig::load_recipes_xml(byte *path, void *modEntry) isLess = bVar1 < (byte)*pcVar5; if (bVar1 != *pcVar5) { LAB_0072cbc1: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072cbc6; } if (bVar1 == 0) break; @@ -9463,9 +9463,9 @@ LAB_0072cbc6: pcVar5 = (char *)inputAttr[2]; } if (pcVar5 == attrNameEnd + -0xb69d73) { - pbVar7 = pbVar6 + (int)pcVar5; + pbVar7 = pbVar6 + GHIDRA_INT(pcVar5); if (pbVar7 <= pbVar6) goto LAB_0072cc4b; - iVar4 = (int)"input" - (int)pbVar6; + iVar4 = GHIDRA_INT("input") - GHIDRA_INT(pbVar6); while (*pbVar6 == pbVar6[iVar4]) { pbVar6 = pbVar6 + 1; if (pbVar7 <= pbVar6) goto LAB_0072cc4b; @@ -9492,9 +9492,9 @@ LAB_0072cc4b: pcVar5 = (char *)outputAttr[2]; } if (pcVar5 == attrNameEnd + -0xb69d23) { - pbVar7 = (byte *)(pcVar5 + (int)pbVar6); + pbVar7 = (byte *)(pcVar5 + GHIDRA_INT(pbVar6)); if (pbVar7 <= pbVar6) goto LAB_0072ccc1; - iVar4 = (int)"output" - (int)pbVar6; + iVar4 = GHIDRA_INT("output") - GHIDRA_INT(pbVar6); while (*pbVar6 == pbVar6[iVar4]) { pbVar6 = pbVar6 + 1; if (pbVar7 <= pbVar6) goto LAB_0072ccc1; @@ -9519,9 +9519,9 @@ LAB_0072ccc1: pcVar5 = (char *)outputNameAttr[2]; } if (pcVar5 == attrNameEnd + -0xb69d17) { - pbVar7 = (byte *)(pcVar5 + (int)pbVar6); + pbVar7 = (byte *)(pcVar5 + GHIDRA_INT(pbVar6)); if (pbVar7 <= pbVar6) goto LAB_0072cd35; - iVar4 = (int)"outputName" - (int)pbVar6; + iVar4 = GHIDRA_INT("outputName") - GHIDRA_INT(pbVar6); while (*pbVar6 == pbVar6[iVar4]) { pbVar6 = pbVar6 + 1; if (pbVar7 <= pbVar6) goto LAB_0072cd35; @@ -9545,9 +9545,9 @@ LAB_0072cd35: pcVar5 = (char *)poolAttr[2]; } if (pcVar5 == attrNameEnd + -0xb69d37) { - pbVar7 = (byte *)(pcVar5 + (int)pbVar6); + pbVar7 = (byte *)(pcVar5 + GHIDRA_INT(pbVar6)); if (pbVar7 <= pbVar6) goto LAB_0072cd9f; - iVar4 = (int)&DAT_00b69d38 - (int)pbVar6; + iVar4 = GHIDRA_INT(&DAT_00b69d38) - GHIDRA_INT(pbVar6); while (*pbVar6 == pbVar6[iVar4]) { pbVar6 = pbVar6 + 1; if (pbVar7 <= pbVar6) goto LAB_0072cd9f; @@ -9556,8 +9556,8 @@ LAB_0072cd35: } poolAttr = (undefined4 *)0x0; LAB_0072cd9f: - if (local_1c._4_4_ != 0) { - piVar3 = (int *)(local_1c._4_4_ + 4); + if ((*(undefined4 *)((char *)&(local_1c) + 0x4)) != 0) { + piVar3 = (int *)((*(undefined4 *)((char *)&(local_1c) + 0x4)) + 4); local_1c = 0; pbVar6 = &g_xmlNullStr; if ((byte *)*piVar3 != (byte *)0x0) { @@ -9565,15 +9565,15 @@ LAB_0072cd9f: } uVar2 = 0; do { - inputCursor = (undefined1 *)((int)&local_1c + uVar2); - inputChar = inputCursor[(int)pbVar6 - (int)&local_1c]; + inputCursor = (undefined1 *)(GHIDRA_INT(&local_1c) + uVar2); + inputChar = inputCursor[GHIDRA_INT(pbVar6) - GHIDRA_INT(&local_1c)]; if (inputChar == '\0') break; uVar2 = uVar2 + 1; *inputCursor = (char)(&DAT_00c7f080)[inputChar]; } while (uVar2 < 8); iVar4 = 0; if ((outputNameAttr == (undefined4 *)0x0) || - ((-(uint)(modEntry != (void *)0x0) & (int)modEntry + 0xecU) == 0)) { + ((-GHIDRA_UINT((modEntry != (void *)0x0)) & GHIDRA_INT(modEntry) + 0xecU) == 0)) { if (outputAttr == (undefined4 *)0x0) goto LAB_0072cecc; pbVar6 = &g_xmlNullStr; if ((byte *)outputAttr[1] != (byte *)0x0) { @@ -9594,12 +9594,12 @@ LAB_0072cd9f: bVar1 = *pbVar7; pbVar7 = pbVar7 + 1; } while (bVar1 != 0); - ((std::string *)((char *)local_34))->std::string::assign(pbVar6,(int)pbVar7 - (int)(pbVar6 + 1)); + ((std::string *)((char *)local_34))->std::string::assign(pbVar6,GHIDRA_INT(pbVar7) - GHIDRA_INT((pbVar6 + 1))); std::map::_Find_lower_bound(auStack_100b0,local_34); outputNameBuf = local_34[0]; mapNode = pvStack_100a8; if (*(char *)((char *)pvStack_100a8 + 0xd) == '\0') { - pbVar6 = (byte *)((int)pvStack_100a8 + 0x10); + pbVar6 = (byte *)(GHIDRA_INT(pvStack_100a8) + 0x10); if (0xf < *(uint *)((char *)pvStack_100a8 + 0x24)) { pbVar6 = *(byte **)pbVar6; } @@ -9621,7 +9621,7 @@ LAB_0072ce82: if (0xfff < uVar2) { ppppbVar8 = (byte ****)outputNameBuf[-1]; uVar2 = outputNameCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)outputNameBuf + (-4 - (int)ppppbVar8))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(outputNameBuf) + (-4 - GHIDRA_INT(ppppbVar8)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -9662,14 +9662,14 @@ LAB_0072cecc: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (pbVar6 != (byte *)0x0) { uVar2 = *(uint *)(pbVar6 + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar2); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar2)); free(pbVar6 + -4); } bVar1 = 1; @@ -9747,43 +9747,43 @@ byte ItemConfig::load_pocketitems_xml(byte *path, void *modEntry) local_8 = (byte *****)0xffffffff; puStack_c = &LAB_00afd3ab; local_10 = ExceptionList; - uVar5 = __security_cookie ^ (uint)(attrText + 10); + uVar5 = __security_cookie ^ GHIDRA_UINT((attrText + 10)); ExceptionList = &local_10; itemConfig = this; local_14 = uVar5; if (modEntry == (void *)0x0) { uVar16 = 0; pvVar8 = (this->_cards)._begin; - if ((int)(this->_cards)._end - (int)pvVar8 >> 2 != 0) { + if (GHIDRA_INT((this->_cards)._end) - GHIDRA_INT(pvVar8) >> 2 != 0) { do { - pvVar8 = *(void **)(uVar16 * 4 + (int)pvVar8); + pvVar8 = *(void **)(uVar16 * 4 + GHIDRA_INT(pvVar8)); if (pvVar8 != (void *)0x0) { - ((std::string *)((char *)((int)pvVar8 + 0x38)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)pvVar8 + 0x20)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)pvVar8 + 8)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(pvVar8) + 0x38)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(pvVar8) + 0x20)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(pvVar8) + 8)))->std::string::_Tidy_deallocate(); operator_delete(pvVar8,0x70); } iVar7 = uVar16 * 4; uVar16 = uVar16 + 1; - *(undefined4 *)((int)(this->_cards)._begin + iVar7) = 0; + *(undefined4 *)(GHIDRA_INT((this->_cards)._begin) + iVar7) = 0; pvVar8 = (this->_cards)._begin; - } while (uVar16 < (uint)((int)(this->_cards)._end - (int)pvVar8 >> 2)); + } while (uVar16 < GHIDRA_UINT((GHIDRA_INT((this->_cards)._end) - GHIDRA_INT(pvVar8) >> 2))); } uVar16 = 0; pvVar8 = (this->_pillEffects)._begin; - if ((int)(this->_pillEffects)._end - (int)pvVar8 >> 2 != 0) { + if (GHIDRA_INT((this->_pillEffects)._end) - GHIDRA_INT(pvVar8) >> 2 != 0) { do { - pvVar8 = *(void **)(uVar16 * 4 + (int)pvVar8); + pvVar8 = *(void **)(uVar16 * 4 + GHIDRA_INT(pvVar8)); if (pvVar8 != (void *)0x0) { - ((std::string *)((char *)((int)pvVar8 + 0x20)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)pvVar8 + 8)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(pvVar8) + 0x20)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(pvVar8) + 8)))->std::string::_Tidy_deallocate(); operator_delete(pvVar8,0x54); } iVar7 = uVar16 * 4; uVar16 = uVar16 + 1; - *(undefined4 *)((int)(this->_pillEffects)._begin + iVar7) = 0; + *(undefined4 *)(GHIDRA_INT((this->_pillEffects)._begin) + iVar7) = 0; pvVar8 = (this->_pillEffects)._begin; - } while (uVar16 < (uint)((int)(this->_pillEffects)._end - (int)pvVar8 >> 2)); + } while (uVar16 < GHIDRA_UINT((GHIDRA_INT((this->_pillEffects)._end) - GHIDRA_INT(pvVar8) >> 2))); } FUN_00731070(pvVar8); FUN_00731000(extraout_ECX); @@ -9799,8 +9799,8 @@ byte ItemConfig::load_pocketitems_xml(byte *path, void *modEntry) text[iVar7] = 0; (**(code **)*piVar6)(1); FUN_00413b90(); - local_8._0_1_ = 0; - local_8._1_3_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0; iVar7 = 0x72d19c; pbVar11 = text; ((rapidxml::xml_document *)(document))->rapidxml::xml_document::parse(text); @@ -9824,7 +9824,7 @@ LAB_0072d1c8: bVar4 = *strEnd; strEnd = strEnd + 1; } while (bVar4 != 0); - ((std::string *)((char *)nodeName))->std::string::assign(pbVar11,(int)strEnd - (int)(pbVar11 + 1)); + ((std::string *)((char *)nodeName))->std::string::assign(pbVar11,GHIDRA_INT(strEnd) - GHIDRA_INT((pbVar11 + 1))); pppppbStack_100dc = (byte *****)0xffffffff; entryId = (byte *****)0x0; nameSize = (byte ******)0x0; @@ -9836,7 +9836,7 @@ LAB_0072d1c8: hudSize = (byte *****)0x0; hudCapacity = 0xf; hudText[0] = (byte ******)0x0; - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; ppppppbVar15 = (byte ******)piVar6[8]; isGreedMode = 1; cardType = (byte *****)0x3; @@ -9861,14 +9861,14 @@ joined_r0x0072d2b3: bVar17 = bVar4 < *pbVar11; if (bVar4 != *pbVar11) { LAB_0072d2f1: - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0072d2f6; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)pppppbVar9 + 1); bVar17 = bVar4 < pbVar11[1]; if (bVar4 != pbVar11[1]) goto LAB_0072d2f1; - pppppbVar9 = (byte *****)((int)pppppbVar9 + 2); + pppppbVar9 = (byte *****)(GHIDRA_INT(pppppbVar9) + 2); pbVar11 = pbVar11 + 2; } while (bVar4 != 0); uVar5 = 0; @@ -9891,14 +9891,14 @@ LAB_0072d2f6: bVar17 = bVar4 < (byte)*pcVar18; if (bVar4 != *pcVar18) { LAB_0072d347: - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0072d34c; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)pppppbVar9 + 1); bVar17 = bVar4 < (byte)pcVar18[1]; if (bVar4 != pcVar18[1]) goto LAB_0072d347; - pppppbVar9 = (byte *****)((int)pppppbVar9 + 2); + pppppbVar9 = (byte *****)(GHIDRA_INT(pppppbVar9) + 2); pcVar18 = pcVar18 + 2; } while (bVar4 != 0); uVar5 = 0; @@ -9921,14 +9921,14 @@ LAB_0072d34c: bVar17 = bVar4 < *pbVar11; if (bVar4 != *pbVar11) { LAB_0072d3a0: - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0072d3a5; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)pppppbVar9 + 1); bVar17 = bVar4 < pbVar11[1]; if (bVar4 != pbVar11[1]) goto LAB_0072d3a0; - pppppbVar9 = (byte *****)((int)pppppbVar9 + 2); + pppppbVar9 = (byte *****)(GHIDRA_INT(pppppbVar9) + 2); pbVar11 = pbVar11 + 2; } while (bVar4 != 0); uVar5 = 0; @@ -9941,10 +9941,10 @@ LAB_0072d3a5: pppppbVar9 = pppppbVar14; do { bVar4 = *(byte *)pppppbVar9; - pppppbVar9 = (byte *****)((int)pppppbVar9 + 1); + pppppbVar9 = (byte *****)(GHIDRA_INT(pppppbVar9) + 1); } while (bVar4 != 0); ((std::string *)((char *)nameText))->std::string::assign((byte *)pppppbVar14, - (int)pppppbVar9 - (int)((int)pppppbVar14 + 1)); + GHIDRA_INT(pppppbVar9) - GHIDRA_INT((GHIDRA_INT(pppppbVar14) + 1))); goto LAB_0072d62b; } pcVar18 = "description"; @@ -9957,14 +9957,14 @@ LAB_0072d3a5: bVar17 = bVar4 < (byte)*pcVar18; if (bVar4 != *pcVar18) { LAB_0072d407: - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0072d40c; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)pppppbVar9 + 1); bVar17 = bVar4 < (byte)pcVar18[1]; if (bVar4 != pcVar18[1]) goto LAB_0072d407; - pppppbVar9 = (byte *****)((int)pppppbVar9 + 2); + pppppbVar9 = (byte *****)(GHIDRA_INT(pppppbVar9) + 2); pcVar18 = pcVar18 + 2; } while (bVar4 != 0); uVar5 = 0; @@ -9977,10 +9977,10 @@ LAB_0072d40c: pppppbVar9 = pppppbVar14; do { bVar4 = *(byte *)pppppbVar9; - pppppbVar9 = (byte *****)((int)pppppbVar9 + 1); + pppppbVar9 = (byte *****)(GHIDRA_INT(pppppbVar9) + 1); } while (bVar4 != 0); ((std::string *)((char *)descriptionText))->std::string::assign((byte *)pppppbVar14, - (int)pppppbVar9 - (int)((int)pppppbVar14 + 1)); + GHIDRA_INT(pppppbVar9) - GHIDRA_INT((GHIDRA_INT(pppppbVar14) + 1))); goto LAB_0072d62b; } pbVar11 = &DAT_00b666a4; @@ -9993,14 +9993,14 @@ LAB_0072d40c: bVar17 = bVar4 < *pbVar11; if (bVar4 != *pbVar11) { LAB_0072d470: - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0072d475; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)pppppbVar9 + 1); bVar17 = bVar4 < pbVar11[1]; if (bVar4 != pbVar11[1]) goto LAB_0072d470; - pppppbVar9 = (byte *****)((int)pppppbVar9 + 2); + pppppbVar9 = (byte *****)(GHIDRA_INT(pppppbVar9) + 2); pbVar11 = pbVar11 + 2; } while (bVar4 != 0); uVar5 = 0; @@ -10013,10 +10013,10 @@ LAB_0072d475: pppppbVar9 = pppppbVar14; do { bVar4 = *(byte *)pppppbVar9; - pppppbVar9 = (byte *****)((int)pppppbVar9 + 1); + pppppbVar9 = (byte *****)(GHIDRA_INT(pppppbVar9) + 1); } while (bVar4 != 0); ((std::string *)((char *)hudText))->std::string::assign((byte *)pppppbVar14, - (int)pppppbVar9 - (int)((int)pppppbVar14 + 1)); + GHIDRA_INT(pppppbVar9) - GHIDRA_INT((GHIDRA_INT(pppppbVar14) + 1))); goto LAB_0072d62b; } pcVar18 = "greedmode"; @@ -10029,7 +10029,7 @@ LAB_0072d475: bVar17 = bVar4 < (byte)*pcVar18; if (bVar4 != *pcVar18) { LAB_0072d4e0: - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0072d4e5; } if (bVar4 == 0) break; @@ -10037,7 +10037,7 @@ LAB_0072d4e0: bVar17 = bVar4 < (byte)pcVar18[1]; if (bVar4 != pcVar18[1]) goto LAB_0072d4e0; pcVar18 = pcVar18 + 2; - pppppbVar9 = (byte *****)((int)pppppbVar9 + 2); + pppppbVar9 = (byte *****)(GHIDRA_INT(pppppbVar9) + 2); } while (bVar4 != 0); uVar5 = 0; LAB_0072d4e5: @@ -10052,10 +10052,10 @@ LAB_0072d4e5: pppppbVar9 = pppppbVar14; do { bVar4 = *(byte *)pppppbVar9; - pppppbVar9 = (byte *****)((int)pppppbVar9 + 1); + pppppbVar9 = (byte *****)(GHIDRA_INT(pppppbVar9) + 1); } while (bVar4 != 0); ((std::string *)((char *)attrText))->std::string::assign((byte *)pppppbVar14, - (int)pppppbVar9 - (int)((int)pppppbVar14 + 1)); + GHIDRA_INT(pppppbVar9) - GHIDRA_INT((GHIDRA_INT(pppppbVar14) + 1))); if (attrSize == 0) { LAB_0072d5e2: isGreedMode = 0; @@ -10077,7 +10077,7 @@ LAB_0072d5e2: uVar5 = 0; } else { - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; } if (uVar5 != 0) goto LAB_0072d57a; } @@ -10099,7 +10099,7 @@ LAB_0072d57a: uVar5 = 0; } else { - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; } if (uVar5 == 0) goto LAB_0072d5d9; } @@ -10119,7 +10119,7 @@ LAB_0072d5d9: if (uVar5 < 0x1000) goto LAB_0072d617; ppppppbVar15 = (byte ******)attrText[0][-1]; uVar5 = attrCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)attrText[0] + (-4 - (int)ppppppbVar15))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(attrText[0]) + (-4 - GHIDRA_INT(ppppppbVar15)))) goto LAB_0072e5e7; goto LAB_0072d617; } @@ -10135,14 +10135,14 @@ LAB_0072d5d9: bVar17 = bVar4 < *pbVar11; if (bVar4 != *pbVar11) { LAB_0072d6f8: - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0072d6fd; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)pppppbVar9 + 1); bVar17 = bVar4 < pbVar11[1]; if (bVar4 != pbVar11[1]) goto LAB_0072d6f8; - pppppbVar9 = (byte *****)((int)pppppbVar9 + 2); + pppppbVar9 = (byte *****)(GHIDRA_INT(pppppbVar9) + 2); pbVar11 = pbVar11 + 2; } while (bVar4 != 0); uVar5 = 0; @@ -10158,14 +10158,14 @@ LAB_0072d6fd: bVar17 = bVar4 < (byte)*pcVar18; if (bVar4 != *pcVar18) { LAB_0072db08: - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0072db0d; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)pppppbVar9 + 1); bVar17 = bVar4 < (byte)pcVar18[1]; if (bVar4 != pcVar18[1]) goto LAB_0072db08; - pppppbVar9 = (byte *****)((int)pppppbVar9 + 2); + pppppbVar9 = (byte *****)(GHIDRA_INT(pppppbVar9) + 2); pcVar18 = pcVar18 + 2; } while (bVar4 != 0); uVar5 = 0; @@ -10188,14 +10188,14 @@ LAB_0072db0d: bVar17 = bVar4 < (byte)*pcVar18; if (bVar4 != *pcVar18) { LAB_0072db60: - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0072db65; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)pppppbVar9 + 1); bVar17 = bVar4 < (byte)pcVar18[1]; if (bVar4 != pcVar18[1]) goto LAB_0072db60; - pppppbVar9 = (byte *****)((int)pppppbVar9 + 2); + pppppbVar9 = (byte *****)(GHIDRA_INT(pppppbVar9) + 2); pcVar18 = pcVar18 + 2; } while (bVar4 != 0); uVar5 = 0; @@ -10218,14 +10218,14 @@ LAB_0072db65: bVar17 = bVar4 < (byte)*pcVar18; if (bVar4 != *pcVar18) { LAB_0072dbb6: - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0072dbbb; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)pppppbVar9 + 1); bVar17 = bVar4 < (byte)pcVar18[1]; if (bVar4 != pcVar18[1]) goto LAB_0072dbb6; - pppppbVar9 = (byte *****)((int)pppppbVar9 + 2); + pppppbVar9 = (byte *****)(GHIDRA_INT(pppppbVar9) + 2); pcVar18 = pcVar18 + 2; } while (bVar4 != 0); uVar5 = 0; @@ -10248,14 +10248,14 @@ LAB_0072dbbb: bVar17 = bVar4 < (byte)*pcVar18; if (bVar4 != *pcVar18) { LAB_0072dc10: - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0072dc15; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)pppppbVar9 + 1); bVar17 = bVar4 < (byte)pcVar18[1]; if (bVar4 != pcVar18[1]) goto LAB_0072dc10; - pppppbVar9 = (byte *****)((int)pppppbVar9 + 2); + pppppbVar9 = (byte *****)(GHIDRA_INT(pppppbVar9) + 2); pcVar18 = pcVar18 + 2; } while (bVar4 != 0); uVar5 = 0; @@ -10278,14 +10278,14 @@ LAB_0072dc15: bVar17 = bVar4 < (byte)*pcVar18; if (bVar4 != *pcVar18) { LAB_0072dc66: - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0072dc6b; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)pppppbVar9 + 1); bVar17 = bVar4 < (byte)pcVar18[1]; if (bVar4 != pcVar18[1]) goto LAB_0072dc66; - pppppbVar9 = (byte *****)((int)pppppbVar9 + 2); + pppppbVar9 = (byte *****)(GHIDRA_INT(pppppbVar9) + 2); pcVar18 = pcVar18 + 2; } while (bVar4 != 0); uVar5 = 0; @@ -10308,14 +10308,14 @@ LAB_0072dc6b: bVar17 = bVar4 < (byte)*pcVar18; if (bVar4 != *pcVar18) { LAB_0072dcc0: - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; goto LAB_0072dcc5; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)pppppbVar9 + 1); bVar17 = bVar4 < (byte)pcVar18[1]; if (bVar4 != pcVar18[1]) goto LAB_0072dcc0; - pppppbVar9 = (byte *****)((int)pppppbVar9 + 2); + pppppbVar9 = (byte *****)(GHIDRA_INT(pppppbVar9) + 2); pcVar18 = pcVar18 + 2; } while (bVar4 != 0); uVar5 = 0; @@ -10353,11 +10353,11 @@ LAB_0072dcc5: pppppbVar9 = pppppbVar14; do { bVar4 = *(byte *)pppppbVar9; - pppppbVar9 = (byte *****)((int)pppppbVar9 + 1); + pppppbVar9 = (byte *****)(GHIDRA_INT(pppppbVar9) + 1); } while (bVar4 != 0); ((std::string *)((char *)attrText))->std::string::assign((byte *)pppppbVar14, - (int)pppppbVar9 - (int)((int)pppppbVar14 + 1)); - local_8._0_1_ = 5; + GHIDRA_INT(pppppbVar9) - GHIDRA_INT((GHIDRA_INT(pppppbVar14) + 1))); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; pcVar18 = "tarot"; ppppppbVar15 = (byte ******)attrText; if (0xf < attrCapacity) { @@ -10391,7 +10391,7 @@ LAB_0072d78a: ((uVar16 == 0xffffffff || (bVar17 = *(byte *)((char *)ppppppbVar15 + 3) < (byte)pcVar18[3], *(byte *)((char *)ppppppbVar15 + 3) == pcVar18[3])))))))))))) goto LAB_0072d7be; - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; } if (((uVar5 == 0) && (4 < attrSize)) && (attrSize < 6)) { cardType = (byte *****)0x0; @@ -10431,7 +10431,7 @@ LAB_0072d80e: ((uVar2 == 0xffffffff || (bVar17 = *(byte *)((char *)ppppppbVar15 + 3) < pbVar11[3], *(byte *)((char *)ppppppbVar15 + 3) == pbVar11[3])))))))))))) goto LAB_0072d842; - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; } if (((uVar5 == 0) && (3 < attrSize)) && (attrSize < 5)) { cardType = (byte *****)0x1; @@ -10465,7 +10465,7 @@ LAB_0072d896: ((uVar5 == 0xffffffff || (bVar17 = *(byte *)((char *)ppppppbVar15 + 3) < pbVar11[3], *(byte *)((char *)ppppppbVar15 + 3) == pbVar11[3])))))))))))) goto LAB_0072d8ca; - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; } if (((uVar5 == 0) && (3 < attrSize)) && (attrSize < 5)) { cardType = (byte *****)0x2; @@ -10504,7 +10504,7 @@ LAB_0072d928: (bVar17 = *(byte *)((char *)ppppppbVar15 + 3) < (byte)pcVar18[3], *(byte *)((char *)ppppppbVar15 + 3) == pcVar18[3])))))))))))) goto LAB_0072d95c; - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; } if (((uVar5 != 0) || (attrSize < 7)) || (7 < attrSize)) { ppppppbVar15 = (byte ******)attrText; @@ -10540,7 +10540,7 @@ LAB_0072d9a6: (bVar17 = *(byte *)((char *)ppppppbVar15 + 3) < (byte)pcVar18[3], *(byte *)((char *)ppppppbVar15 + 3) == pcVar18[3])))))))))))) goto LAB_0072d9da; - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; } if (((uVar5 == 0) && (5 < attrSize)) && (attrSize < 7)) { cardType = (byte *****)0x4; @@ -10579,7 +10579,7 @@ LAB_0072da2d: (bVar17 = *(byte *)((char *)ppppppbVar15 + 3) < (byte)pcVar18[3], *(byte *)((char *)ppppppbVar15 + 3) == pcVar18[3])))))))))))) goto LAB_0072da61; - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; } if (((uVar5 == 0) && (0xc < attrSize)) && (attrSize < 0xe)) { cardType = (byte *****)0x5; @@ -10592,14 +10592,14 @@ LAB_0072da2d: } } LAB_0072daa1: - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; if (0xf < attrCapacity) { uVar5 = attrCapacity + 1; ppppppbVar15 = attrText[0]; if (0xfff < uVar5) { ppppppbVar15 = (byte ******)attrText[0][-1]; uVar5 = attrCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)attrText[0] + (-4 - (int)ppppppbVar15))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(attrText[0]) + (-4 - GHIDRA_INT(ppppppbVar15)))) goto LAB_0072e5e7; } LAB_0072d617: @@ -10658,12 +10658,12 @@ LAB_0072d682: ((uVar2 == 0xffffffff || (bVar17 = *(byte *)((char *)ppppppbVar15 + 3) < pbVar11[3], *(byte *)((char *)ppppppbVar15 + 3) == pbVar11[3])))))))))))) goto LAB_0072dd1d; - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; } ppppppbStack_100e8 = nameText[0]; if (((uVar5 == 0) && (3 < nodeNameSize)) && (nodeNameSize < 5)) { LAB_0072ddb9: - if ((int)entryId < 0) { + if (GHIDRA_INT(entryId) < 0) { pcVar18 = "[warn] %s: Card ID %d out of range!\n"; LAB_0072e4eb: KAGE_LogMessage(1,(byte *)pcVar18); @@ -10701,13 +10701,13 @@ LAB_0072e4eb: } if (ppppppbStack_100f0 < nameSize) { if ((byte ******)0x7fffffff < nameSize) goto LAB_0072e63a; - pppppbVar14 = (byte *****)((uint)nameSize | 0xf); + pppppbVar14 = (byte *****)(GHIDRA_UINT(nameSize) | 0xf); if (pppppbVar14 < (byte *****)0x80000000) { - if ((byte ******)(0x7fffffff - ((uint)ppppppbStack_100f0 >> 1)) < ppppppbStack_100f0) { + if ((byte ******)(0x7fffffff - (GHIDRA_UINT(ppppppbStack_100f0) >> 1)) < ppppppbStack_100f0) { pppppbVar14 = (byte *****)0x7fffffff; } else { - pppppbVar9 = (byte *****)((int)ppppppbStack_100f0 + ((uint)ppppppbStack_100f0 >> 1)); + pppppbVar9 = (byte *****)(GHIDRA_INT(ppppppbStack_100f0) + (GHIDRA_UINT(ppppppbStack_100f0) >> 1)); if (pppppbVar14 < pppppbVar9) { pppppbVar14 = pppppbVar9; } @@ -10716,22 +10716,22 @@ LAB_0072e4eb: else { pppppbVar14 = (byte *****)0x7fffffff; } - pppppbVar9 = std::_Allocate((uint)((int)pppppbVar14 + 1)); + pppppbVar9 = std::_Allocate(GHIDRA_UINT((GHIDRA_INT(pppppbVar14) + 1))); ppppppbVar15[7] = pppppbVar14; ppppppbVar15[6] = (byte *****)nameSize; pppppbStack_100dc = pppppbVar9; memcpy(pppppbVar9,ppppppbStack_100ec,(size_t)nameSize); - *(byte *)((char *)pppppbVar9 + (int)nameSize) = 0; + *(byte *)((char *)pppppbVar9 + GHIDRA_INT(nameSize)) = 0; if (&DAT_0000000f < ppppppbStack_100f0) { pppppbVar14 = *ppppppbVar13; - ppppppbVar10 = (byte ******)((int)ppppppbStack_100f0 + 1); + ppppppbVar10 = (byte ******)(GHIDRA_INT(ppppppbStack_100f0) + 1); pppppbVar12 = pppppbVar14; if ((byte ******)0xfff < ppppppbVar10) { pppppbVar12 = (byte *****)pppppbVar14[-1]; ppppppbVar10 = ppppppbStack_100f0 + 9; - if (0x1f < (uint)((int)pppppbVar14 + (-4 - (int)pppppbVar12))) goto LAB_0072e5e7; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pppppbVar14) + (-4 - GHIDRA_INT(pppppbVar12))))) goto LAB_0072e5e7; } - operator_delete(pppppbVar12,(uint)ppppppbVar10); + operator_delete(pppppbVar12,GHIDRA_UINT(ppppppbVar10)); } *ppppppbVar13 = pppppbVar9; } @@ -10741,7 +10741,7 @@ LAB_0072e4eb: } ppppppbVar15[6] = (byte *****)nameSize; memmove(ppppppbVar13,ppppppbStack_100ec,(size_t)nameSize); - *(byte *)((char *)ppppppbVar13 + (int)nameSize) = 0; + *(byte *)((char *)ppppppbVar13 + GHIDRA_INT(nameSize)) = 0; } } ppppppbVar13 = ppppppbVar15 + 8; @@ -10753,13 +10753,13 @@ LAB_0072e4eb: } if (pppppbStack_100dc < descriptionSize) { if ((byte *****)0x7fffffff < descriptionSize) goto LAB_0072e63a; - pppppbVar14 = (byte *****)((uint)descriptionSize | 0xf); + pppppbVar14 = (byte *****)(GHIDRA_UINT(descriptionSize) | 0xf); if (pppppbVar14 < (byte *****)0x80000000) { - if ((byte *****)(0x7fffffff - ((uint)pppppbStack_100dc >> 1)) < pppppbStack_100dc) { + if ((byte *****)(0x7fffffff - (GHIDRA_UINT(pppppbStack_100dc) >> 1)) < pppppbStack_100dc) { pppppbVar14 = (byte *****)0x7fffffff; } else { - pppppbVar9 = (byte *****)((int)pppppbStack_100dc + ((uint)pppppbStack_100dc >> 1)); + pppppbVar9 = (byte *****)(GHIDRA_INT(pppppbStack_100dc) + (GHIDRA_UINT(pppppbStack_100dc) >> 1)); if (pppppbVar14 < pppppbVar9) { pppppbVar14 = pppppbVar9; } @@ -10768,22 +10768,22 @@ LAB_0072e4eb: else { pppppbVar14 = (byte *****)0x7fffffff; } - ppppppbVar10 = std::_Allocate((uint)((int)pppppbVar14 + 1)); + ppppppbVar10 = std::_Allocate(GHIDRA_UINT((GHIDRA_INT(pppppbVar14) + 1))); ppppppbVar15[0xd] = pppppbVar14; ppppppbVar15[0xc] = descriptionSize; ppppppbStack_100ec = ppppppbVar10; memcpy(ppppppbVar10,ppppppbStack_100f0,(size_t)descriptionSize); - *(byte *)((char *)ppppppbVar10 + (int)descriptionSize) = 0; + *(byte *)((char *)ppppppbVar10 + GHIDRA_INT(descriptionSize)) = 0; if (&DAT_0000000f < pppppbStack_100dc) { pppppbVar14 = *ppppppbVar13; - pppppbVar12 = (byte *****)((int)pppppbStack_100dc + 1); + pppppbVar12 = (byte *****)(GHIDRA_INT(pppppbStack_100dc) + 1); pppppbVar9 = pppppbVar14; if ((byte *****)0xfff < pppppbVar12) { pppppbVar9 = (byte *****)pppppbVar14[-1]; pppppbVar12 = pppppbStack_100dc + 9; - if (0x1f < (uint)((int)pppppbVar14 + (-4 - (int)pppppbVar9))) goto LAB_0072e5e7; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pppppbVar14) + (-4 - GHIDRA_INT(pppppbVar9))))) goto LAB_0072e5e7; } - operator_delete(pppppbVar9,(uint)pppppbVar12); + operator_delete(pppppbVar9,GHIDRA_UINT(pppppbVar12)); } *ppppppbVar13 = (byte *****)ppppppbVar10; } @@ -10793,7 +10793,7 @@ LAB_0072e4eb: } ppppppbVar15[0xc] = descriptionSize; memmove(ppppppbVar13,ppppppbStack_100f0,(size_t)descriptionSize); - *(byte *)((char *)ppppppbVar13 + (int)descriptionSize) = 0; + *(byte *)((char *)ppppppbVar13 + GHIDRA_INT(descriptionSize)) = 0; } } ppppppbVar13 = ppppppbVar15 + 0xe; @@ -10809,13 +10809,13 @@ LAB_0072e63a: /* WARNING: Subroutine does not return */ std::string::_Xlen(); } - pppppbVar14 = (byte *****)((uint)hudSize | 0xf); + pppppbVar14 = (byte *****)(GHIDRA_UINT(hudSize) | 0xf); if (pppppbVar14 < (byte *****)0x80000000) { - if ((byte *****)(0x7fffffff - ((uint)pppppbStack_100dc >> 1)) < pppppbStack_100dc) { + if ((byte *****)(0x7fffffff - (GHIDRA_UINT(pppppbStack_100dc) >> 1)) < pppppbStack_100dc) { pppppbVar14 = (byte *****)0x7fffffff; } else { - pppppbVar9 = (byte *****)((int)pppppbStack_100dc + ((uint)pppppbStack_100dc >> 1)); + pppppbVar9 = (byte *****)(GHIDRA_INT(pppppbStack_100dc) + (GHIDRA_UINT(pppppbStack_100dc) >> 1)); if (pppppbVar14 < pppppbVar9) { pppppbVar14 = pppppbVar9; } @@ -10824,22 +10824,22 @@ LAB_0072e63a: else { pppppbVar14 = (byte *****)0x7fffffff; } - ppppppbVar10 = std::_Allocate((uint)((int)pppppbVar14 + 1)); + ppppppbVar10 = std::_Allocate(GHIDRA_UINT((GHIDRA_INT(pppppbVar14) + 1))); ppppppbVar15[0x13] = pppppbVar14; ppppppbVar15[0x12] = hudSize; ppppppbStack_100ec = ppppppbVar10; memcpy(ppppppbVar10,ppppppbStack_100f0,(size_t)hudSize); - *(byte *)((char *)ppppppbVar10 + (int)hudSize) = 0; + *(byte *)((char *)ppppppbVar10 + GHIDRA_INT(hudSize)) = 0; if (&DAT_0000000f < pppppbStack_100dc) { pppppbVar14 = *ppppppbVar13; - pppppbVar12 = (byte *****)((int)pppppbStack_100dc + 1); + pppppbVar12 = (byte *****)(GHIDRA_INT(pppppbStack_100dc) + 1); pppppbVar9 = pppppbVar14; if ((byte *****)0xfff < pppppbVar12) { pppppbVar9 = (byte *****)pppppbVar14[-1]; pppppbVar12 = pppppbStack_100dc + 9; - if (0x1f < (uint)((int)pppppbVar14 + (-4 - (int)pppppbVar9))) goto LAB_0072e5e7; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pppppbVar14) + (-4 - GHIDRA_INT(pppppbVar9))))) goto LAB_0072e5e7; } - operator_delete(pppppbVar9,(uint)pppppbVar12); + operator_delete(pppppbVar9,GHIDRA_UINT(pppppbVar12)); } *ppppppbVar13 = (byte *****)ppppppbVar10; } @@ -10850,7 +10850,7 @@ LAB_0072e63a: } ppppppbVar15[0x12] = hudSize; memmove(ppppppbVar10,ppppppbStack_100f0,(size_t)hudSize); - *(byte *)((char *)ppppppbVar10 + (int)hudSize) = 0; + *(byte *)((char *)ppppppbVar10 + GHIDRA_INT(hudSize)) = 0; } } *(byte *)(ppppppbVar15 + 0x14) = isGreedMode; @@ -10861,18 +10861,18 @@ LAB_0072e63a: ppppppbVar15[0x19] = announcerDelay; ppppppbVar15[0x1a] = modEntry; if (modEntry == (void *)0x0) { - *(byte *******)((int)(itemConfig->_cards)._begin + (int)entryId * 4) = ppppppbVar15; + *(byte *******)(GHIDRA_INT((itemConfig->_cards)._begin) + GHIDRA_INT(entryId) * 4) = ppppppbVar15; } else { *ppppppbVar15 = - (byte *****)((int)(itemConfig->_cards)._end - (int)(itemConfig->_cards)._begin >> 2); + (byte *****)(GHIDRA_INT((itemConfig->_cards)._end) - GHIDRA_INT((itemConfig->_cards)._begin) >> 2); if (*(char *)((char *)modEntry + 0xaa9) != '\0') { if ((byte *****)0xf < ppppppbVar15[0x13]) { ppppppbVar13 = (byte ******)*ppppppbVar13; } - pvVar8 = ((ANM2 *)((ANM2 *)((int)modEntry + 0x9a0)))->ANM2::GetAnimationData((byte *)ppppppbVar13); + pvVar8 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(modEntry) + 0x9a0)))->ANM2::GetAnimationData((byte *)ppppppbVar13); if (pvVar8 != (void *)0x0) { - ppppppbVar15[0x1b] = (byte *****)((int)modEntry + 0x9a0); + ppppppbVar15[0x1b] = (byte *****)(GHIDRA_INT(modEntry) + 0x9a0); } } vectorEnd = (itemConfig->_cards)._end; @@ -10883,7 +10883,7 @@ LAB_0072e63a: else { *vectorEnd = ppppppbVar15; ppvVar1 = &(itemConfig->_cards)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 4); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 4); } InfoDisplay::add_card_entry(ppppppbVar15,1); } @@ -10918,7 +10918,7 @@ LAB_0072dd6c: ((uVar5 == 0xffffffff || (bVar17 = *(byte *)((char *)ppppppbVar15 + 3) < pbVar11[3], *(byte *)((char *)ppppppbVar15 + 3) == pbVar11[3])))))))))))) goto LAB_0072dda0; - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; } if (((uVar5 == 0) && (3 < nodeNameSize)) && (nodeNameSize < 5)) goto LAB_0072ddb9; pcVar18 = "pilleffect"; @@ -10953,13 +10953,13 @@ LAB_0072e258: ((uVar16 == 0xffffffff || (bVar17 = *(byte *)((char *)ppppppbVar15 + 3) < (byte)pcVar18[3], *(byte *)((char *)ppppppbVar15 + 3) == pcVar18[3])))))))))))) goto LAB_0072e28c; - uVar5 = -(uint)bVar17 | 1; + uVar5 = -GHIDRA_UINT(bVar17) | 1; } if (((uVar5 != 0) || (nodeNameSize < 10)) || (10 < nodeNameSize)) { pcVar18 = "[warn] %s: Unknown item tag %s\n"; goto LAB_0072e4eb; } - if ((int)entryId < 0) { + if (GHIDRA_INT(entryId) < 0) { pcVar18 = "[warn] %s: Pill Effect ID %d out of range!\n"; goto LAB_0072e4eb; } @@ -10987,13 +10987,13 @@ LAB_0072e258: } if (ppppppbStack_100e0 < nameSize) { if ((byte ******)0x7fffffff < nameSize) goto LAB_0072e63a; - newCapacity = (byte ****)((uint)nameSize | 0xf); + newCapacity = (byte ****)(GHIDRA_UINT(nameSize) | 0xf); if (newCapacity < (byte ****)0x80000000) { - if ((byte ******)(0x7fffffff - ((uint)ppppppbStack_100e0 >> 1)) < ppppppbStack_100e0) { + if ((byte ******)(0x7fffffff - (GHIDRA_UINT(ppppppbStack_100e0) >> 1)) < ppppppbStack_100e0) { newCapacity = (byte ****)0x7fffffff; } else { - grownCapacity = (byte ****)((int)ppppppbStack_100e0 + ((uint)ppppppbStack_100e0 >> 1)); + grownCapacity = (byte ****)(GHIDRA_INT(ppppppbStack_100e0) + (GHIDRA_UINT(ppppppbStack_100e0) >> 1)); if (newCapacity < grownCapacity) { newCapacity = grownCapacity; } @@ -11002,22 +11002,22 @@ LAB_0072e258: else { newCapacity = (byte ****)0x7fffffff; } - pppppbVar14 = std::_Allocate((uint)((int)newCapacity + 1)); + pppppbVar14 = std::_Allocate(GHIDRA_UINT((GHIDRA_INT(newCapacity) + 1))); pppppbVar9[7] = newCapacity; pppppbVar9[6] = (byte ****)nameSize; pppppbStack_100dc = pppppbVar14; memcpy(pppppbVar14,ppppppbStack_100f0,(size_t)nameSize); - *(byte *)((char *)pppppbVar14 + (int)nameSize) = 0; + *(byte *)((char *)pppppbVar14 + GHIDRA_INT(nameSize)) = 0; if (&DAT_0000000f < ppppppbStack_100e0) { pppppbVar12 = *ppppppbVar15; - ppppppbVar13 = (byte ******)((int)ppppppbStack_100e0 + 1); + ppppppbVar13 = (byte ******)(GHIDRA_INT(ppppppbStack_100e0) + 1); ptr = pppppbVar12; if ((byte ******)0xfff < ppppppbVar13) { ptr = (byte *****)pppppbVar12[-1]; ppppppbVar13 = ppppppbStack_100e0 + 9; - if (0x1f < (uint)((int)pppppbVar12 + (-4 - (int)ptr))) goto LAB_0072e5e7; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pppppbVar12) + (-4 - GHIDRA_INT(ptr))))) goto LAB_0072e5e7; } - operator_delete(ptr,(uint)ppppppbVar13); + operator_delete(ptr,GHIDRA_UINT(ppppppbVar13)); } *ppppppbVar15 = pppppbVar14; } @@ -11027,7 +11027,7 @@ LAB_0072e258: } pppppbVar9[6] = (byte ****)nameSize; memmove(ppppppbVar15,ppppppbStack_100f0,(size_t)nameSize); - *(byte *)((char *)ppppppbVar15 + (int)nameSize) = 0; + *(byte *)((char *)ppppppbVar15 + GHIDRA_INT(nameSize)) = 0; } pppppbVar14 = entryId; } @@ -11036,7 +11036,7 @@ LAB_0072e258: if (0xf < descriptionCapacity) { ppppppbVar15 = descriptionText[0]; } - ((std::string *)((char *)(pppppbVar9 + 8)))->std::string::assign((byte *)ppppppbVar15,(uint)descriptionSize); + ((std::string *)((char *)(pppppbVar9 + 8)))->std::string::assign((byte *)ppppppbVar15,GHIDRA_UINT(descriptionSize)); } *(byte *)(pppppbVar9 + 0xe) = isGreedMode; pppppbVar9[0xf] = (byte ****)pickupSubtype; @@ -11047,11 +11047,11 @@ LAB_0072e258: pppppbVar9[0x12] = (byte ****)announcerDelay; pppppbVar9[0x14] = modEntry; if (modEntry == (void *)0x0) { - *(byte ******)((int)(itemConfig->_pillEffects)._begin + (int)pppppbVar14 * 4) = pppppbVar9; + *(byte ******)(GHIDRA_INT((itemConfig->_pillEffects)._begin) + GHIDRA_INT(pppppbVar14) * 4) = pppppbVar9; } else { *pppppbVar9 = (byte ****) - ((int)(itemConfig->_pillEffects)._end - (int)(itemConfig->_pillEffects)._begin + (GHIDRA_INT((itemConfig->_pillEffects)._end) - GHIDRA_INT((itemConfig->_pillEffects)._begin) >> 2); vectorEnd = (itemConfig->_pillEffects)._end; if (vectorEnd == (itemConfig->_pillEffects)._capacity) { @@ -11061,54 +11061,54 @@ LAB_0072e258: else { *vectorEnd = pppppbVar9; ppvVar1 = &(itemConfig->_pillEffects)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 4); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 4); } InfoDisplay::add_pill_entry(pppppbVar9,1); } } - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; if (0xf < hudCapacity) { uVar5 = hudCapacity + 1; ppppppbVar15 = ppppppbVar3; if (0xfff < uVar5) { ppppppbVar15 = (byte ******)ppppppbVar3[-1]; uVar5 = hudCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)ppppppbVar3 + (-4 - (int)ppppppbVar15))) goto LAB_0072e5e7; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(ppppppbVar3) + (-4 - GHIDRA_INT(ppppppbVar15)))) goto LAB_0072e5e7; } operator_delete(ppppppbVar15,uVar5); } - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; if (0xf < descriptionCapacity) { uVar5 = descriptionCapacity + 1; ppppppbVar15 = descriptionText[0]; if (0xfff < uVar5) { ppppppbVar15 = (byte ******)descriptionText[0][-1]; uVar5 = descriptionCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)descriptionText[0] + (-4 - (int)ppppppbVar15))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(descriptionText[0]) + (-4 - GHIDRA_INT(ppppppbVar15)))) goto LAB_0072e5e7; } operator_delete(ppppppbVar15,uVar5); } - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; if (0xf < nameCapacity) { uVar5 = nameCapacity + 1; ppppppbVar15 = ppppppbStack_100e8; if (0xfff < uVar5) { ppppppbVar15 = (byte ******)ppppppbStack_100e8[-1]; uVar5 = nameCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)ppppppbStack_100e8 + (-4 - (int)ppppppbVar15))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(ppppppbStack_100e8) + (-4 - GHIDRA_INT(ppppppbVar15)))) goto LAB_0072e5e7; } operator_delete(ppppppbVar15,uVar5); } - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; if (0xf < nodeNameCapacity) { uVar5 = nodeNameCapacity + 1; ppppppbVar15 = nodeName[0]; if (0xfff < uVar5) { ppppppbVar15 = (byte ******)nodeName[0][-1]; uVar5 = nodeNameCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)nodeName[0] + (-4 - (int)ppppppbVar15))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(nodeName[0]) + (-4 - GHIDRA_INT(ppppppbVar15)))) { LAB_0072e5e7: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -11228,7 +11228,7 @@ byte ItemConfig::LoadBombCostumes(byte *path, byte isAppend) local_14 = (byte *****)0xffffffff; puStack_18 = &LAB_00afd4ee; local_1c = ExceptionList; - uVar2 = __security_cookie ^ (uint)(anm2Root + 0x11); + uVar2 = __security_cookie ^ GHIDRA_UINT((anm2Root + 0x11)); ExceptionList = &local_1c; pbStack_10194 = path; cleanupFlags = (int *)0x0; @@ -11257,20 +11257,20 @@ byte ItemConfig::LoadBombCostumes(byte *path, byte isAppend) fileBuffer[iVar4] = 0; (**(code **)*piVar3)(1); FUN_00413b90(); - local_14._0_1_ = 0; - local_14._1_3_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; pcVar14 = (char *)0x72edea; pbVar10 = fileBuffer; ((rapidxml::xml_document *)(xmlDoc))->rapidxml::xml_document::parse(fileBuffer); bVar1 = (byte)pbVar10; - pvVar5 = ((xml_node *)(xmlDoc))->xml_node::first_node((byte *)"bombcostumes",(int)pcVar14,bVar1); + pvVar5 = ((xml_node *)(xmlDoc))->xml_node::first_node((byte *)"bombcostumes",GHIDRA_INT(pcVar14),bVar1); if (pvVar5 == (void *)0x0) { pcVar14 = "Could not find root node \'bombcostumes\' in %s\n"; pbVar10 = pbStack_10194; KAGE_LogMessage(0x10,(byte *)"Could not find root node \'bombcostumes\' in %s\n"); bVar1 = (byte)pbVar10; } - pvVar6 = ((xml_node *)(pvVar5))->xml_node::first_attribute((byte *)"anm2root",(uint)pcVar14,bVar1); + pvVar6 = ((xml_node *)(pvVar5))->xml_node::first_attribute((byte *)"anm2root",GHIDRA_UINT(pcVar14),bVar1); anm2RootSize = 0; anm2RootCapacity = 0xf; anm2Root[0] = (byte ******)0x0; @@ -11283,9 +11283,9 @@ byte ItemConfig::LoadBombCostumes(byte *path, byte isAppend) bVar1 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar1 != 0); - uVar2 = (int)pbVar9 - (int)(pbVar10 + 1); + uVar2 = GHIDRA_INT(pbVar9) - GHIDRA_INT((pbVar10 + 1)); ((std::string *)((char *)anm2Root))->std::string::assign(pbVar10,uVar2); - for (pbStack_10194 = ((xml_node *)(pvVar5))->xml_node::first_node(&DAT_00b69f24,(int)pbVar10,(byte)uVar2); + for (pbStack_10194 = ((xml_node *)(pvVar5))->xml_node::first_node(&DAT_00b69f24,GHIDRA_INT(pbVar10),(byte)uVar2); pbStack_10194 != (void *)0x0; pbStack_10194 = *(byte **)((char *)pbStack_10194 + 0x2c)) { pcVar14 = "variant"; do { @@ -11305,9 +11305,9 @@ LAB_0072eeb0: piVar3 = (int *)puVar12[2]; } if (piVar3 != piStack_1018c) goto LAB_0072efc1; - pbVar9 = (byte *)((int)piVar3 + (int)pbVar10); + pbVar9 = (byte *)(GHIDRA_INT(piVar3) + GHIDRA_INT(pbVar10)); if (pbVar10 < pbVar9) { - iVar4 = (int)"variant" - (int)pbVar10; + iVar4 = GHIDRA_INT("variant") - GHIDRA_INT(pbVar10); while (*pbVar10 == pbVar10[iVar4]) { pbVar10 = pbVar10 + 1; if (pbVar9 <= pbVar10) goto LAB_0072eef0; @@ -11323,10 +11323,10 @@ LAB_0072eef0: emptyRulesBegin = 0; emptyRulesEnd = 0; emptyRulesCapacity = 0; - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; FUN_00731dd0(insertResult,&costumeVariant); vector_BombCostume_tidy(&emptyRulesBegin); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; costumeRules = insertResult[0] + 0x14; pcVar14 = "rule"; do { @@ -11344,9 +11344,9 @@ LAB_0072eef0: pcVar14 = (char *)ruleNode[2]; } if (pcVar14 == pcVar11 + -0xb69f6b) { - pbVar9 = (byte *)(pcVar14 + (int)pbVar10); + pbVar9 = (byte *)(pcVar14 + GHIDRA_INT(pbVar10)); if (pbVar9 <= pbVar10) goto LAB_0072f01f; - iVar4 = (int)&DAT_00b69f6c - (int)pbVar10; + iVar4 = GHIDRA_INT(&DAT_00b69f6c) - GHIDRA_INT(pbVar10); while (*pbVar10 == pbVar10[iVar4]) { pbVar10 = pbVar10 + 1; if (pbVar9 <= pbVar10) goto LAB_0072f01f; @@ -11365,13 +11365,13 @@ LAB_0072f030: bodyPathSize = 0; bodyPathCapacity = 0xf; bodyPath = (void *)0x0; - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; _eh_vector_constructor_iterator_ (&backPath,0x18,5,FUN_0040c380,std::string::_Tidy_deallocate); - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; _eh_vector_constructor_iterator_(local_88,0x18,2,FUN_0040c380,std::string::_Tidy_deallocate) ; - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; ruleAttribute = (undefined4 *)puVar12[8]; if (ruleAttribute != (undefined4 *)0x0) { LAB_0072f0c6: @@ -11387,7 +11387,7 @@ LAB_0072f0c6: isLess = bVar1 < (byte)*pcVar14; if (bVar1 != *pcVar14) { LAB_0072f0f7: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072f0fc; } if (bVar1 == 0) break; @@ -11412,34 +11412,34 @@ LAB_0072f0fc: bVar1 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar1 != 0); - ((std::string *)((char *)&tmpString))->std::string::assign(pbVar10,(int)pbVar9 - (int)(pbVar10 + 1)); - local_14._0_1_ = 9; - piStack_1018c = (int *)((uint)cleanupFlags | 1); + ((std::string *)((char *)&tmpString))->std::string::assign(pbVar10,GHIDRA_INT(pbVar9) - GHIDRA_INT((pbVar10 + 1))); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; + piStack_1018c = (int *)(GHIDRA_UINT(cleanupFlags) | 1); includeFlagTokens = (int *)0x0; includeFlagTokensEnd = (int *)0x0; includeFlagTokensCapacity = 0; cleanupFlags = piStack_1018c; - string_split(&tmpString,(std_string *)CONCAT31((int3)((uint)extraout_EDX >> 8),0x20), + string_split(&tmpString,(std_string *)CONCAT31((int3)(GHIDRA_UINT(extraout_EDX) >> 8),0x20), (byte)&includeFlagTokens); - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; if (0xf < tmpStringCapacity) { uVar2 = tmpStringCapacity + 1; pvVar5 = tmpString; if (0xfff < uVar2) { pvVar5 = *(void **)((char *)tmpString + -4); uVar2 = tmpStringCapacity + 0x24; - if (0x1f < (uint)((int)tmpString + (-4 - (int)pvVar5))) goto LAB_0072fc29; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_0072fc29; } operator_delete(pvVar5,uVar2); } piVar13 = (int *)0x0; piStack_101a0 = includeFlagTokens; - piStack_1018c = (int *)(((int)includeFlagTokensEnd - (int)includeFlagTokens) / 0x18); + piStack_1018c = (int *)((GHIDRA_INT(includeFlagTokensEnd) - GHIDRA_INT(includeFlagTokens)) / 0x18); piVar3 = includeFlagTokens; if (piStack_1018c != (int *)0x0) { do { token = piVar3; - if (0xf < (uint)piVar3[5]) { + if (0xf < GHIDRA_UINT(piVar3[5])) { token = (int *)*piVar3; } uVar2 = atoi((char *)token); @@ -11454,7 +11454,7 @@ LAB_0072f0fc: flagBitHigh = uVar7; } includeFlagsLow = - CONCAT44(includeFlagsLow._4_4_ | flagBitHigh,(uint)includeFlagsLow | uVar7); + CONCAT44((*(undefined4 *)((char *)&(includeFlagsLow) + 0x4)) | flagBitHigh,GHIDRA_UINT(includeFlagsLow) | uVar7); } else { uVar2 = uVar2 - 0x40; @@ -11468,16 +11468,16 @@ LAB_0072f0fc: flagBitHigh = uVar7; } includeFlagsHigh = - CONCAT44(includeFlagsHigh._4_4_ | flagBitHigh,(uint)includeFlagsHigh | uVar7) + CONCAT44((*(undefined4 *)((char *)&(includeFlagsHigh) + 0x4)) | flagBitHigh,GHIDRA_UINT(includeFlagsHigh) | uVar7) ; } - piVar13 = (int *)((int)piVar13 + 1); + piVar13 = (int *)(GHIDRA_INT(piVar13) + 1); piVar3 = piVar3 + 6; } while (piVar13 < piStack_1018c); } piVar3 = piStack_101a0; - cleanupFlags = (int *)((uint)cleanupFlags & 0xfffffffe); - local_14._0_1_ = 7; + cleanupFlags = (int *)(GHIDRA_UINT(cleanupFlags) & 0xfffffffe); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; if (piStack_101a0 != (int *)0x0) { piVar13 = includeFlagTokensEnd; token = piStack_101a0; @@ -11491,7 +11491,7 @@ LAB_0072f0fc: if (0xfff < uVar7) { pvVar6 = *(void **)((char *)pvVar5 + -4); uVar7 = uVar2 + 0x24; - if (0x1f < (uint)((int)pvVar5 + (-4 - (int)pvVar6))) goto LAB_0072fc29; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar5) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_0072fc29; } operator_delete(pvVar6,uVar7); piVar13 = includeFlagTokensEnd; @@ -11502,12 +11502,12 @@ LAB_0072f0fc: token = token + 6; } while (token != piVar13); } - uVar2 = ((includeFlagTokensCapacity - (int)piVar3) / 0x18) * 0x18; + uVar2 = ((includeFlagTokensCapacity - GHIDRA_INT(piVar3)) / 0x18) * 0x18; piVar13 = piVar3; if (0xfff < uVar2) { piVar13 = (int *)piVar3[-1]; uVar2 = uVar2 + 0x23; - if ((undefined1 *)0x1f < (undefined1 *)((int)piVar3 + (-4 - (int)piVar13))) + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(piVar3) + (-4 - GHIDRA_INT(piVar13)))) goto LAB_0072fc29; } operator_delete(piVar13,uVar2); @@ -11527,7 +11527,7 @@ LAB_0072f0fc: isLess = bVar1 < (byte)*pcVar14; if (bVar1 != *pcVar14) { LAB_0072f3c0: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072f3c5; } if (bVar1 == 0) break; @@ -11550,7 +11550,7 @@ LAB_0072f3c5: isLess = bVar1 < *attrNameCursor; if (bVar1 != *attrNameCursor) { LAB_0072f640: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072f645; } if (bVar1 == 0) break; @@ -11572,7 +11572,7 @@ LAB_0072f645: bVar1 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar1 != 0); - valueLength = (int)pbVar9 - (int)(pbVar10 + 1); + valueLength = GHIDRA_INT(pbVar9) - GHIDRA_INT((pbVar10 + 1)); if (0x7fffffff - anm2RootSize < valueLength) { LAB_0072fc88: /* WARNING: Subroutine does not return */ @@ -11584,14 +11584,14 @@ LAB_0072fc88: } ((std::string *)((char *)&tmpString))->std::string::concat(costumeRules,(std_string *)valueLength, (byte *)ppppppbVar8,anm2RootSize,pbVar10,valueLength); - cleanupFlags = (int *)((uint)cleanupFlags | 4); + cleanupFlags = (int *)(GHIDRA_UINT(cleanupFlags) | 4); if (0xf < bodyPathCapacity) { uVar2 = bodyPathCapacity + 1; pvVar5 = bodyPath; if (0xfff < uVar2) { pvVar5 = *(void **)((char *)bodyPath + -4); uVar2 = bodyPathCapacity + 0x24; - if (0x1f < (uint)((int)bodyPath + (-4 - (int)pvVar5))) goto LAB_0072fc29; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(bodyPath) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_0072fc29; } operator_delete(pvVar5,uVar2); } @@ -11613,7 +11613,7 @@ LAB_0072fc88: isLess = bVar1 < *attrNameCursor; if (bVar1 != *attrNameCursor) { LAB_0072f726: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072f72b; } if (bVar1 == 0) break; @@ -11635,7 +11635,7 @@ LAB_0072f72b: bVar1 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar1 != 0); - attrValueLength = (std_string *)(pbVar9 + -(int)(pbVar10 + 1)); + attrValueLength = (std_string *)(pbVar9 + -GHIDRA_INT((pbVar10 + 1))); if ((std_string *)(0x7fffffff - anm2RootSize) < attrValueLength) goto LAB_0072fc88; ppppppbVar8 = (byte ******)anm2Root; @@ -11643,8 +11643,8 @@ LAB_0072f72b: ppppppbVar8 = anm2Root[0]; } ((std::string *)((char *)&tmpString))->std::string::concat(costumeRules,attrValueLength, - (byte *)ppppppbVar8,anm2RootSize,pbVar10,(uint)attrValueLength); - cleanupFlags = (int *)((uint)cleanupFlags | 8); + (byte *)ppppppbVar8,anm2RootSize,pbVar10,GHIDRA_UINT(attrValueLength)); + cleanupFlags = (int *)(GHIDRA_UINT(cleanupFlags) | 8); ((std::string *)((char *)&backPath))->std::string::_Tidy_deallocate(); backPath = tmpString; uStack_fc = uStack_38; @@ -11664,7 +11664,7 @@ LAB_0072f72b: isLess = bVar1 < *attrNameCursor; if (bVar1 != *attrNameCursor) { LAB_0072f7d8: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072f7dd; } if (bVar1 == 0) break; @@ -11686,7 +11686,7 @@ LAB_0072f7dd: bVar1 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar1 != 0); - attrValueLength = (std_string *)(pbVar9 + -(int)(pbVar10 + 1)); + attrValueLength = (std_string *)(pbVar9 + -GHIDRA_INT((pbVar10 + 1))); if ((std_string *)(0x7fffffff - anm2RootSize) < attrValueLength) goto LAB_0072fc88; ppppppbVar8 = (byte ******)anm2Root; @@ -11695,8 +11695,8 @@ LAB_0072f7dd: } ((std::string *)((char *)&tmpString))->std::string::concat(costumeRules,attrValueLength, (byte *)ppppppbVar8,anm2RootSize,pbVar10, - (uint)attrValueLength); - cleanupFlags = (int *)((uint)cleanupFlags | 0x10); + GHIDRA_UINT(attrValueLength)); + cleanupFlags = (int *)(GHIDRA_UINT(cleanupFlags) | 0x10); ((std::string *)((char *)&body2Path))->std::string::_Tidy_deallocate(); body2Path = tmpString; uStack_e4 = uStack_38; @@ -11716,7 +11716,7 @@ LAB_0072f7dd: isLess = bVar1 < (byte)*pcVar14; if (bVar1 != *pcVar14) { LAB_0072f890: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072f895; } if (bVar1 == 0) break; @@ -11738,7 +11738,7 @@ LAB_0072f895: bVar1 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar1 != 0); - attrValueLength = (std_string *)(pbVar9 + -(int)(pbVar10 + 1)); + attrValueLength = (std_string *)(pbVar9 + -GHIDRA_INT((pbVar10 + 1))); if ((std_string *)(0x7fffffff - anm2RootSize) < attrValueLength) goto LAB_0072fc88; ppppppbVar8 = (byte ******)anm2Root; @@ -11747,8 +11747,8 @@ LAB_0072f895: } ((std::string *)((char *)&tmpString))->std::string::concat(costumeRules,attrValueLength, (byte *)ppppppbVar8,anm2RootSize,pbVar10, - (uint)attrValueLength); - cleanupFlags = (int *)((uint)cleanupFlags | 0x20); + GHIDRA_UINT(attrValueLength)); + cleanupFlags = (int *)(GHIDRA_UINT(cleanupFlags) | 0x20); ((std::string *)((char *)&frontPath))->std::string::_Tidy_deallocate(); frontPath = tmpString; uStack_cc = uStack_38; @@ -11768,7 +11768,7 @@ LAB_0072f895: isLess = bVar1 < (byte)*pcVar14; if (bVar1 != *pcVar14) { LAB_0072f947: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072f94c; } if (bVar1 == 0) break; @@ -11790,7 +11790,7 @@ LAB_0072f94c: bVar1 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar1 != 0); - attrValueLength = (std_string *)(pbVar9 + -(int)(pbVar10 + 1)); + attrValueLength = (std_string *)(pbVar9 + -GHIDRA_INT((pbVar10 + 1))); if ((std_string *)(0x7fffffff - anm2RootSize) < attrValueLength) goto LAB_0072fc88; ppppppbVar8 = (byte ******)anm2Root; @@ -11799,8 +11799,8 @@ LAB_0072f94c: } ((std::string *)((char *)&tmpString))->std::string::concat(costumeRules,attrValueLength, (byte *)ppppppbVar8,anm2RootSize,pbVar10, - (uint)attrValueLength); - cleanupFlags = (int *)((uint)cleanupFlags | 0x40); + GHIDRA_UINT(attrValueLength)); + cleanupFlags = (int *)(GHIDRA_UINT(cleanupFlags) | 0x40); ((std::string *)((char *)&front2Path))->std::string::_Tidy_deallocate(); front2Path = tmpString; uStack_b4 = uStack_38; @@ -11820,7 +11820,7 @@ LAB_0072f94c: isLess = bVar1 < (byte)*pcVar14; if (bVar1 != *pcVar14) { LAB_0072fa00: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072fa05; } if (bVar1 == 0) break; @@ -11843,7 +11843,7 @@ LAB_0072fa05: isLess = bVar1 < (byte)*pcVar14; if (bVar1 != *pcVar14) { LAB_0072fad1: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072fad6; } if (bVar1 == 0) break; @@ -11865,7 +11865,7 @@ LAB_0072fad6: bVar1 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar1 != 0); - ((std::string *)(local_88))->std::string::assign(pbVar10,(int)pbVar9 - (int)(pbVar10 + 1)); + ((std::string *)(local_88))->std::string::assign(pbVar10,GHIDRA_INT(pbVar9) - GHIDRA_INT((pbVar10 + 1))); } else { pcVar14 = "suffix2"; @@ -11878,7 +11878,7 @@ LAB_0072fad6: isLess = bVar1 < (byte)*pcVar14; if (bVar1 != *pcVar14) { LAB_0072fb37: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0072fb3c; } if (bVar1 == 0) break; @@ -11900,7 +11900,7 @@ LAB_0072fb3c: bVar1 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar1 != 0); - ((std::string *)(local_70))->std::string::assign(pbVar10,(int)pbVar9 - (int)(pbVar10 + 1)) + ((std::string *)(local_70))->std::string::assign(pbVar10,GHIDRA_INT(pbVar9) - GHIDRA_INT((pbVar10 + 1))) ; } } @@ -11915,7 +11915,7 @@ LAB_0072fb3c: bVar1 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar1 != 0); - attrValueLength = (std_string *)(pbVar9 + -(int)(pbVar10 + 1)); + attrValueLength = (std_string *)(pbVar9 + -GHIDRA_INT((pbVar10 + 1))); if ((std_string *)(0x7fffffff - anm2RootSize) < attrValueLength) goto LAB_0072fc88; ppppppbVar8 = (byte ******)anm2Root; @@ -11924,8 +11924,8 @@ LAB_0072fb3c: } ((std::string *)((char *)&tmpString))->std::string::concat(costumeRules,attrValueLength, (byte *)ppppppbVar8,anm2RootSize,pbVar10, - (uint)attrValueLength); - cleanupFlags = (int *)((uint)cleanupFlags | 0x80); + GHIDRA_UINT(attrValueLength)); + cleanupFlags = (int *)(GHIDRA_UINT(cleanupFlags) | 0x80); ((std::string *)((char *)&overlayPath))->std::string::_Tidy_deallocate(); overlayPath = tmpString; uStack_9c = uStack_38; @@ -11937,7 +11937,7 @@ LAB_0072fb3c: } tmpStringSize = 0; tmpStringCapacity = 0xf; - tmpString = (void *)((uint)tmpString & 0xffffff00); + tmpString = (void *)(GHIDRA_UINT(tmpString) & 0xffffff00); ((std::string *)((char *)&tmpString))->std::string::_Tidy_deallocate(); } } @@ -11956,34 +11956,34 @@ LAB_0072fb3c: bVar1 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar1 != 0); - ((std::string *)((char *)&tmpString))->std::string::assign(pbVar10,(int)pbVar9 - (int)(pbVar10 + 1)); - local_14._0_1_ = 0xc; - piStack_1018c = (int *)((uint)cleanupFlags | 2); + ((std::string *)((char *)&tmpString))->std::string::assign(pbVar10,GHIDRA_INT(pbVar9) - GHIDRA_INT((pbVar10 + 1))); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; + piStack_1018c = (int *)(GHIDRA_UINT(cleanupFlags) | 2); excludeFlagTokens = (int *)0x0; excludeFlagTokensEnd = (int *)0x0; excludeFlagTokensCapacity = 0; cleanupFlags = piStack_1018c; - string_split(&tmpString,(std_string *)CONCAT31((int3)((uint)extraout_EDX_00 >> 8),0x20), + string_split(&tmpString,(std_string *)CONCAT31((int3)(GHIDRA_UINT(extraout_EDX_00) >> 8),0x20), (byte)&excludeFlagTokens); - local_14._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xd; if (0xf < tmpStringCapacity) { uVar2 = tmpStringCapacity + 1; pvVar5 = tmpString; if (0xfff < uVar2) { pvVar5 = *(void **)((char *)tmpString + -4); uVar2 = tmpStringCapacity + 0x24; - if (0x1f < (uint)((int)tmpString + (-4 - (int)pvVar5))) goto LAB_0072fc29; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_0072fc29; } operator_delete(pvVar5,uVar2); } piVar13 = (int *)0x0; piStack_1018c = excludeFlagTokens; - piStack_101a0 = (int *)(((int)excludeFlagTokensEnd - (int)excludeFlagTokens) / 0x18); + piStack_101a0 = (int *)((GHIDRA_INT(excludeFlagTokensEnd) - GHIDRA_INT(excludeFlagTokens)) / 0x18); piVar3 = excludeFlagTokens; if (piStack_101a0 != (int *)0x0) { do { token = piVar3; - if (0xf < (uint)piVar3[5]) { + if (0xf < GHIDRA_UINT(piVar3[5])) { token = (int *)*piVar3; } uVar2 = atoi((char *)token); @@ -11998,7 +11998,7 @@ LAB_0072fb3c: flagBitHigh = uVar7; } excludeFlagsLow = - CONCAT44(excludeFlagsLow._4_4_ | flagBitHigh,(uint)excludeFlagsLow | uVar7); + CONCAT44((*(undefined4 *)((char *)&(excludeFlagsLow) + 0x4)) | flagBitHigh,GHIDRA_UINT(excludeFlagsLow) | uVar7); } else { uVar2 = uVar2 - 0x40; @@ -12012,16 +12012,16 @@ LAB_0072fb3c: flagBitHigh = uVar7; } excludeFlagsHigh = - CONCAT44(excludeFlagsHigh._4_4_ | flagBitHigh,(uint)excludeFlagsHigh | uVar7) + CONCAT44((*(undefined4 *)((char *)&(excludeFlagsHigh) + 0x4)) | flagBitHigh,GHIDRA_UINT(excludeFlagsHigh) | uVar7) ; } - piVar13 = (int *)((int)piVar13 + 1); + piVar13 = (int *)(GHIDRA_INT(piVar13) + 1); piVar3 = piVar3 + 6; } while (piVar13 < piStack_101a0); } piVar3 = piStack_1018c; - cleanupFlags = (int *)((uint)cleanupFlags & 0xfffffffd); - local_14._0_1_ = 7; + cleanupFlags = (int *)(GHIDRA_UINT(cleanupFlags) & 0xfffffffd); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; if (piStack_1018c != (int *)0x0) { piVar13 = excludeFlagTokensEnd; token = piStack_1018c; @@ -12035,7 +12035,7 @@ LAB_0072fb3c: if (0xfff < uVar7) { pvVar6 = *(void **)((char *)pvVar5 + -4); uVar7 = uVar2 + 0x24; - if (0x1f < (uint)((int)pvVar5 + (-4 - (int)pvVar6))) goto LAB_0072fc29; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar5) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_0072fc29; } operator_delete(pvVar6,uVar7); piVar13 = excludeFlagTokensEnd; @@ -12046,12 +12046,12 @@ LAB_0072fb3c: token = token + 6; } while (token != piVar13); } - uVar2 = ((excludeFlagTokensCapacity - (int)piVar3) / 0x18) * 0x18; + uVar2 = ((excludeFlagTokensCapacity - GHIDRA_INT(piVar3)) / 0x18) * 0x18; piVar13 = piVar3; if (0xfff < uVar2) { piVar13 = (int *)piVar3[-1]; uVar2 = uVar2 + 0x23; - if ((char *)0x1f < (char *)((int)piVar3 + (-4 - (int)piVar13))) goto LAB_0072fc29; + if ((char *)0x1f < (char *)(GHIDRA_INT(piVar3) + (-4 - GHIDRA_INT(piVar13)))) goto LAB_0072fc29; } operator_delete(piVar13,uVar2); excludeFlagTokens = (int *)0x0; @@ -12070,14 +12070,14 @@ LAB_0072f340: } LAB_0072fbe8: } - local_14._0_1_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; if (0xf < anm2RootCapacity) { uVar2 = anm2RootCapacity + 1; ppppppbVar8 = anm2Root[0]; if (0xfff < uVar2) { ppppppbVar8 = (byte ******)anm2Root[0][-1]; uVar2 = anm2RootCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)anm2Root[0] + (-4 - (int)ppppppbVar8))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(anm2Root[0]) + (-4 - GHIDRA_INT(ppppppbVar8)))) { LAB_0072fc29: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -12108,7 +12108,7 @@ LAB_0072f35d: FUN_007312c0(); *(int *)(iVar4 + 4) = *(int *)(iVar4 + 4) + 0xe0; } - local_14._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xe; _eh_vector_destructor_iterator_(local_88,0x18,2,std::string::_Tidy_deallocate); _eh_vector_destructor_iterator_(&backPath,0x18,5,std::string::_Tidy_deallocate); if (0xf < bodyPathCapacity) { @@ -12117,7 +12117,7 @@ LAB_0072f35d: if (0xfff < uVar2) { pvVar5 = *(void **)((char *)bodyPath + -4); uVar2 = bodyPathCapacity + 0x24; - if (0x1f < (uint)((int)bodyPath + (-4 - (int)pvVar5))) goto LAB_0072fc29; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(bodyPath) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_0072fc29; } operator_delete(pvVar5,uVar2); } @@ -12138,13 +12138,13 @@ ItemConfig_Item * ItemConfig::GetCollectible(int id) } else if (id < 0) { itemTable = (g_game->_proceduralItemManager)._proceduralItems._begin; - if (~id < (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)itemTable >> 2) { + if (~id < GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(itemTable) >> 2) { return (ItemConfig_Item *)**(undefined4 **)((char *)itemTable + ~id * 4); } return (ItemConfig_Item *)0x0; } itemTable = (this->_collectibles)._begin; - if (id < (int)(this->_collectibles)._end - (int)itemTable >> 2) { + if (id < GHIDRA_INT((this->_collectibles)._end) - GHIDRA_INT(itemTable) >> 2) { return *(ItemConfig_Item **)((char *)itemTable + id * 4); } return (ItemConfig_Item *)0x0; @@ -12156,7 +12156,7 @@ ItemConfig_Item * ItemConfig::GetTrinket(uint TrinketType) void *trinkets; trinkets = (this->_trinkets)._begin; - if ((int)(TrinketType & 0x7fff) < (int)(this->_trinkets)._end - (int)trinkets >> 2) { + if (GHIDRA_INT((TrinketType & 0x7fff)) < GHIDRA_INT((this->_trinkets)._end) - GHIDRA_INT(trinkets) >> 2) { return *(ItemConfig_Item **)((char *)trinkets + (TrinketType & 0x7fff) * 4); } return (ItemConfig_Item *)0x0; @@ -12167,7 +12167,7 @@ ItemConfig_Card * ItemConfig::GetCard(int id) { void *cards; - if ((id < 0) || (cards = (this->_cards)._begin, (int)(this->_cards)._end - (int)cards >> 2 <= id)) + if ((id < 0) || (cards = (this->_cards)._begin, GHIDRA_INT((this->_cards)._end) - GHIDRA_INT(cards) >> 2 <= id)) { return (ItemConfig_Card *)0x0; } @@ -12181,8 +12181,8 @@ byte ItemConfig::IsValidCollectible(int collectibleType) if ((((collectibleType != 0) && (collectibleType < - (int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2)) && (collectibleType != 0xeb)) && + GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2)) && (collectibleType != 0xeb)) && ((collectibleType != 0x2b && (collectibleType != 0x3d)))) { item = GetCollectible(&g_manager->_itemConfig,collectibleType); if (item != (ItemConfig_Item *)0x0) { @@ -12202,8 +12202,8 @@ uint ItemConfig::collectible_has_tags(uint param_1, uint param_2) pIVar1 = GetCollectible(&g_manager->_itemConfig,in_ECX); uVar2 = 0; if ((pIVar1 == (ItemConfig_Item *)0x0) || - (uVar2 = *(uint *)((int)&pIVar1->tags + 4) & param_2, - (param_1 & (uint)pIVar1->tags) == 0 && uVar2 == 0)) { + (uVar2 = *(uint *)(GHIDRA_INT(&pIVar1->tags) + 4) & param_2, + (param_1 & GHIDRA_UINT(pIVar1->tags)) == 0 && uVar2 == 0)) { return uVar2 & 0xffffff00; } return CONCAT31((int3)(uVar2 >> 8),1); @@ -12218,8 +12218,8 @@ uint ItemConfig::trinket_has_tags(uint param_1, uint param_2) uint in_ECX; pvVar1 = (g_manager->_itemConfig)._trinkets._begin; - uVar3 = (int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar1 >> 2; - if ((((int)(in_ECX & 0x7fff) < (int)uVar3) && + uVar3 = GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar1) >> 2; + if (((GHIDRA_INT((in_ECX & 0x7fff)) < GHIDRA_INT(uVar3)) && (iVar2 = *(int *)((char *)pvVar1 + (in_ECX & 0x7fff) * 4), uVar3 = 0, iVar2 != 0)) && (uVar3 = *(uint *)(iVar2 + 0xbc) & param_2, (param_1 & *(uint *)(iVar2 + 0xb8)) != 0 || uVar3 != 0)) { @@ -12253,10 +12253,10 @@ void * ItemConfig::GetTaggedItems(ulonglong tags) return &DAT_00c81020; } iVar3 = 1; - uVar4 = (uint)tags; - if ((uint)tags == 0) { + uVar4 = GHIDRA_UINT(tags); + if (GHIDRA_UINT(tags) == 0) { iVar3 = 0x21; - uVar4 = tags._4_4_; + uVar4 = (*(undefined4 *)((char *)&(tags) + 0x4)); } if ((uVar4 & 0xffff) == 0) { uVar4 = uVar4 >> 0x10; @@ -12275,7 +12275,7 @@ void * ItemConfig::GetTaggedItems(ulonglong tags) uVar4 = uVar4 >> 2; } uVar4 = iVar3 - (uVar4 & 1); - if ((int)uVar4 < 0x20) { + if (GHIDRA_INT(uVar4) < 0x20) { lowMask = 1 << (uVar4 & 0x1f); highMask = 0; if (0x1f < uVar4) { @@ -12295,7 +12295,7 @@ void * ItemConfig::GetTaggedItems(ulonglong tags) allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } allocBlock = malloc(0x10); if (allocBlock == (undefined4 *)0x0) { @@ -12303,10 +12303,10 @@ void * ItemConfig::GetTaggedItems(ulonglong tags) } else { oldAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes + 0x10; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) + 0x10; *allocBlock = 0x10; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) + (uint)(0xffffffef < (uint)oldAllocatedBytes); + *(uint *)((char *)allocatedBytes + 4) + GHIDRA_UINT((0xffffffef < GHIDRA_UINT(oldAllocatedBytes))); result = allocBlock + 1; if (result != (undefined4 *)0x0) { *result = 0; @@ -12325,15 +12325,15 @@ void * ItemConfig::GetTaggedItems(ulonglong tags) LAB_00730cd6: uVar4 = 0; pvVar2 = (this->_collectibles)._begin; - if ((int)(this->_collectibles)._end - (int)pvVar2 >> 2 != 0) { + if (GHIDRA_INT((this->_collectibles)._end) - GHIDRA_INT(pvVar2) >> 2 != 0) { do { iVar3 = *(int *)((char *)pvVar2 + uVar4 * 4); if ((iVar3 != 0) && - (((uint)tags & *(uint *)(iVar3 + 0xb8)) != 0 || (*(uint *)(iVar3 + 0xbc) & tags._4_4_) != 0 + ((GHIDRA_UINT(tags) & *(uint *)(iVar3 + 0xb8)) != 0 || (*(uint *)(iVar3 + 0xbc) & (*(undefined4 *)((char *)&(tags) + 0x4))) != 0 )) { piVar1 = (int *)result[1]; if (piVar1 == (int *)result[2]) { - std::vector::_Emplace_reallocate(piVar1,(void *)((int)pvVar2 + uVar4 * 4)); + std::vector::_Emplace_reallocate(piVar1,(void *)(GHIDRA_INT(pvVar2) + uVar4 * 4)); } else { *piVar1 = iVar3; @@ -12342,16 +12342,16 @@ LAB_00730cd6: } uVar4 = uVar4 + 1; pvVar2 = (this->_collectibles)._begin; - } while (uVar4 < (uint)((int)(this->_collectibles)._end - (int)pvVar2 >> 2)); + } while (uVar4 < GHIDRA_UINT((GHIDRA_INT((this->_collectibles)._end) - GHIDRA_INT(pvVar2) >> 2))); } uVar4 = 0; pvVar2 = (this->_trinkets)._begin; - if ((int)(this->_trinkets)._end - (int)pvVar2 >> 2 != 0) { + if (GHIDRA_INT((this->_trinkets)._end) - GHIDRA_INT(pvVar2) >> 2 != 0) { do { - piVar1 = (int *)((int)pvVar2 + uVar4 * 4); + piVar1 = (int *)(GHIDRA_INT(pvVar2) + uVar4 * 4); iVar3 = *piVar1; if ((iVar3 != 0) && - (((uint)tags & *(uint *)(iVar3 + 0xb8)) != 0 || (*(uint *)(iVar3 + 0xbc) & tags._4_4_) != 0 + ((GHIDRA_UINT(tags) & *(uint *)(iVar3 + 0xb8)) != 0 || (*(uint *)(iVar3 + 0xbc) & (*(undefined4 *)((char *)&(tags) + 0x4))) != 0 )) { resultEnd = (int *)result[1]; if (resultEnd == (int *)result[2]) { @@ -12364,7 +12364,7 @@ LAB_00730cd6: } uVar4 = uVar4 + 1; pvVar2 = (this->_trinkets)._begin; - } while (uVar4 < (uint)((int)(this->_trinkets)._end - (int)pvVar2 >> 2)); + } while (uVar4 < GHIDRA_UINT((GHIDRA_INT((this->_trinkets)._end) - GHIDRA_INT(pvVar2) >> 2))); } return result; } diff --git a/src/game/item_config_card.cpp b/src/game/item_config_card.cpp index 2432a94..57377a4 100644 --- a/src/game/item_config_card.cpp +++ b/src/game/item_config_card.cpp @@ -53,6 +53,6 @@ std_string * ItemConfig_Card::get_display_desc(std_string *outDescription, int u lengthChar = lengthCursor->_buf; lengthCursor = (std_string *)(lengthCursor->_buf + 1); } while (*lengthChar != '\0'); - ((std::string *)(outDescription->_buf))->std::string::assign((byte *)text,(int)lengthCursor - (int)(text->_buf + 1)); + ((std::string *)(outDescription->_buf))->std::string::assign((byte *)text,GHIDRA_INT(lengthCursor) - GHIDRA_INT((text->_buf + 1))); return outDescription; } diff --git a/src/game/item_config_item.cpp b/src/game/item_config_item.cpp index 42a4686..29c81a3 100644 --- a/src/game/item_config_item.cpp +++ b/src/game/item_config_item.cpp @@ -60,7 +60,7 @@ ItemConfig_Item::ItemConfig_Item() this->persistentEffect = 0; this->clearEffectsOnRemove = 1; *(undefined4 *)&this->tags = 0; - *(undefined4 *)((int)&this->tags + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&this->tags) + 4) = 0; this->quality = 0; this->craftingQuality = 0; this->_initCharge = -1; @@ -95,8 +95,8 @@ ItemConfig_Item::~ItemConfig_Item() ownedCostume = (void *)this[1].type; if (ownedCostume != (void *)0x0) { - ((std::string *)((char *)((int)ownedCostume + 0x174)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)ownedCostume + 0x15c)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(ownedCostume) + 0x174)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(ownedCostume) + 0x15c)))->std::string::_Tidy_deallocate(); operator_delete(ownedCostume,0x198); this[1].type = 0; } @@ -142,13 +142,13 @@ std_string * ItemConfig_Item::GetLocalizedName(std_string *outName, int language language = language & 0xffffff; StringTable::get_string (stringTable,(byte *)"Items",resolvedLanguage,(byte *)(text->_buf + 1), - (byte *)((int)&language + 3)); - if (language._3_1_ == '\0') { + (byte *)(GHIDRA_INT(&language) + 3)); + if ((*(undefined1 *)((char *)&(language) + 0x3)) == '\0') { language = language & 0xffffff; text = (std_string *) StringTable::get_string (stringTable,(byte *)"Items",resolvedLanguage,(byte *)(text->_buf + 1), - (byte *)((int)&language + 3)); + (byte *)(GHIDRA_INT(&language) + 3)); } } outName->_buf[0] = '\0'; @@ -163,7 +163,7 @@ std_string * ItemConfig_Item::GetLocalizedName(std_string *outName, int language ch = textEnd->_buf; textEnd = (std_string *)(textEnd->_buf + 1); } while (*ch != '\0'); - ((std::string *)(outName->_buf))->std::string::assign((byte *)text,(int)textEnd - (int)(text->_buf + 1)); + ((std::string *)(outName->_buf))->std::string::assign((byte *)text,GHIDRA_INT(textEnd) - GHIDRA_INT((text->_buf + 1))); return outName; } diff --git a/src/game/item_overlay.cpp b/src/game/item_overlay.cpp index 2a1018f..2ff716b 100644 --- a/src/game/item_overlay.cpp +++ b/src/game/item_overlay.cpp @@ -78,7 +78,7 @@ void ItemOverlay::Update(byte unk) else if ((this->_megaMushPlayerSprite)._animState._animData != (void *)0x0) { AnimationState::AdvancePosition (&(this->_megaMushPlayerSprite)._animState, - *(int *)((int)(this->_megaMushPlayerSprite)._animState._animData + 0x30) + -1); + *(int *)(GHIDRA_INT((this->_megaMushPlayerSprite)._animState._animData) + 0x30) + -1); } if (((this->_player != (EntityPtr)0x0) && (bVar1 = ((ANM2 *)(&this->_megaMushPlayerSprite))->ANM2::IsPlaying((byte *)"Transform"), bVar1 != 0)) && @@ -110,7 +110,7 @@ void ItemOverlay::Update(byte unk) } iVar2 = 1; } - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_8,1.0,iVar2,0,Pitch,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_8),1.0,iVar2,0,Pitch,0.0); } } LAB_009acc1b: @@ -140,14 +140,14 @@ LAB_009acc1b: if ((this->_sprite)._animState._animData == (void *)0x0) goto LAB_009accdf; AnimationState::AdvancePosition (&(this->_sprite)._animState, - *(int *)((int)(this->_sprite)._animState._animData + 0x30) + -1); + *(int *)(GHIDRA_INT((this->_sprite)._animState._animData) + 0x30) + -1); } if ((((this->_sprite)._animState._animData != (void *)0x0) && (bVar1 = ((AnimationState *)(&(this->_sprite)._animState))->AnimationState::IsEventTriggered((byte *)"Sound"), manager = g_manager, bVar1 != 0)) && (this->_overlayID == 0x27)) { local_8 = (AnimationState *)0x51; seed_fart_sound_override((int *)&local_8); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_8,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_8),1.0,2,0,1.0,0.0); } LAB_009accdf: local_8 = &(this->_sprite)._animState; @@ -155,16 +155,16 @@ LAB_009accdf: (bVar1 = ((AnimationState *)(local_8))->AnimationState::IsEventTriggered((byte *)"SleepFillHP"), bVar1 != 0)) { playerIndex = 0; playerManager = &g_game->_playerManager; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { playerListEnd = (playerManager->_playerList)._end; - if ((int)playerListEnd - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (playerManager->_playerList)._end; } playerSlot = (playerManager->_playerList)._begin; - if (playerIndex < (uint)((int)playerListEnd - (int)playerSlot >> 2)) { + if (playerIndex < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + playerIndex; } if (((Entity_Player *)*playerSlot)->_playerType != 0x28) { @@ -198,8 +198,8 @@ LAB_009ace00: playerIndex = playerIndex + 1; playerManager = &g_game->_playerManager; } while (playerIndex < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } ((PersistentGameData *)(&g_manager->_persistentGameData))->PersistentGameData::IncreaseEventCounter(0xca,1); isFastForward = (byte)_unk; @@ -302,7 +302,7 @@ void ItemOverlay::Render() ((ANM2 *)(sprite))->ANM2::Render(&scratchVec,&g_vectorZero,&g_vectorZero); unusedArg = extraout_ECX_00; LAB_009ad1ff: - shader_cache_find((int)unusedArg); + shader_cache_find(GHIDRA_INT(unusedArg)); return; } @@ -332,7 +332,7 @@ void ItemOverlay::Show(int eOverlayID, int delay, Entity_Player *player) EntityPtr *playerRef; ANM2 *sprite; - if (0x2f < (uint)eOverlayID) { + if (0x2f < GHIDRA_UINT(eOverlayID)) { return; } sprite = &this->_sprite; @@ -340,12 +340,12 @@ void ItemOverlay::Show(int eOverlayID, int delay, Entity_Player *player) ((ANM2 *)(sprite))->ANM2::Reset(); } else { - ((ANM2 *)(sprite))->ANM2::Load((std_string *)((int)(&this->_sprite + 1) + eOverlayID * 0x58 + 4),0); + ((ANM2 *)(sprite))->ANM2::Load((std_string *)(GHIDRA_INT((&this->_sprite + 1)) + eOverlayID * 0x58 + 4),0); bVar5 = extraout_CL; if (*(int *)((char *)(&this->_sprite + 1) + eOverlayID * 0x58 + 0x44) != 0) { Sprite::ReplaceSpritesheet ((Sprite *)sprite,0, - (std_string *)((int)(&this->_sprite + 1) + eOverlayID * 0x58 + 0x34)); + (std_string *)(GHIDRA_INT((&this->_sprite + 1)) + eOverlayID * 0x58 + 0x34)); bVar5 = extraout_CL_00; } ((ANM2 *)(sprite))->ANM2::LoadGraphics(bVar5); @@ -371,7 +371,7 @@ void ItemOverlay::Show(int eOverlayID, int delay, Entity_Player *player) if (iVar7 / 0x44 + iVar1 != iVar1) { player = (Entity_Player *)0x0; do { - pbVar10 = (byte *)((int)(&(player->_sprite)._filename + -3) + layerColors); + pbVar10 = (byte *)(GHIDRA_INT((&(player->_sprite)._filename + -3)) + layerColors); layerName = pbVar10; if (0xf < *(uint *)((player->_sprite)._filename._buf + layerColors + -0x34)) { layerName = *(byte **)pbVar10; @@ -385,7 +385,7 @@ void ItemOverlay::Show(int eOverlayID, int delay, Entity_Player *player) pbVar8 = &s_empty; } else { - pbVar8 = (byte *)((int)layerData + 8); + pbVar8 = (byte *)(GHIDRA_INT(layerData) + 8); if (0xf < *(uint *)((char *)layerData + 0x1c)) { pbVar8 = *(byte **)pbVar8; } @@ -396,7 +396,7 @@ void ItemOverlay::Show(int eOverlayID, int delay, Entity_Player *player) isLess = bVar5 < *pbVar6; if (bVar5 != *pbVar6) { LAB_009ad360: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_009ad365; } if (bVar5 == 0) break; @@ -435,10 +435,10 @@ LAB_009ad365: layerColorIndex = layerColorIndex + 1; layerColors = *(int *)((char *)(&this->_sprite + 1) + eOverlayID * 0x58 + 0x4c); } while (layerColorIndex < - (uint)((*(int *)((char *)(&this->_sprite + 1) + eOverlayID * 0x58 + 0x50) - layerColors) - / 0x44)); + GHIDRA_UINT(((*(int *)((char *)(&this->_sprite + 1) + eOverlayID * 0x58 + 0x50) - layerColors) + / 0x44))); } - pbVar10 = (byte *)((int)(&this->_sprite + 1) + eOverlayID * 0x58 + 0x1c); + pbVar10 = (byte *)(GHIDRA_INT((&this->_sprite + 1)) + eOverlayID * 0x58 + 0x1c); if (0xf < *(uint *)((char *)(&this->_sprite + 1) + eOverlayID * 0x58 + 0x30)) { pbVar10 = *(byte **)pbVar10; } @@ -454,7 +454,7 @@ LAB_009ad365: isLess = bVar5 < *pbVar6; if (bVar5 != *pbVar6) { LAB_009ad424: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_009ad429; } if (bVar5 == 0) break; @@ -476,7 +476,7 @@ LAB_009ad429: } } LAB_009ad452: - this->_state = 2 - (uint)(delay != 0); + this->_state = 2 - GHIDRA_UINT((delay != 0)); this->_delay = delay; return; } diff --git a/src/game/item_pool.cpp b/src/game/item_pool.cpp index 833fec6..72e48c1 100644 --- a/src/game/item_pool.cpp +++ b/src/game/item_pool.cpp @@ -19,7 +19,7 @@ void ItemPool::ReplaceBlacklistedPickup(int *param_2, uint *param_3, uint *param undefined1 auStack_8 [4]; bool isUnavailable; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); subTypeOut = param_4; uVar2 = Random(); local_38 = 0x900000005; @@ -94,7 +94,7 @@ void ItemPool::ReplaceBlacklistedPickup(int *param_2, uint *param_3, uint *param uVar2 = *param_4; if ((uVar2 == 0x19) || (((local_20 = uVar2, std::set::find_node(&local_38,&local_20), - *(char *)(local_30 + 0xd) == '\0' && (*(int *)(local_30 + 0x10) <= (int)uVar2)) && + *(char *)(local_30 + 0xd) == '\0' && (*(int *)(local_30 + 0x10) <= GHIDRA_INT(uVar2))) && (local_30 != this->_pools[0]._rng1._shift3)))) { isUnavailable = false; } @@ -129,20 +129,20 @@ void ItemPool::pick_collectible(Entity *timer) originY = (timer->_pos).y; do { uVar1 = Random(); - fVar3 = (float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) * + fVar3 = (float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283064e-10 * 3.14; fVar3 = fVar3 + fVar3; dirX = cos(fVar3); fVar3 = sin(fVar3); uVar1 = Random(); uVar2 = Random(); - rngFraction = (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + rngFraction = (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10; local_18.y = rngFraction * fVar3 * 4.0; local_18.x = rngFraction * dirX * 4.0; uVar2 = Random(); game = g_game; - rngFraction = (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + rngFraction = (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10; local_10.x = dirX * 15.0 * rngFraction + originX; local_10.y = fVar3 * 15.0 * rngFraction + originY; @@ -165,15 +165,15 @@ LAB_00450a46: uVar1 = Random(); projectile[1]._damageEvents._begin = (void *)0x40000000; projectile[1]._damageEvents._capacity = - (void *)((float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) * + (void *)((float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283064e-10 * 1.4); uVar1 = Random(); *(float *)&(*(undefined1 *)((char *)&(projectile[1]) + 0x4)) = - -15.0 - (float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) * + -15.0 - (float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283064e-10 * 60.0; uVar1 = Random(); *(float *)(projectile + 1) = - (float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) * 2.3283064e-10 + (float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283064e-10 * -15.0; projectile->Update(); shotsLeft = shotsLeft + -1; @@ -181,20 +181,20 @@ LAB_00450a46: shotsLeft = 2; do { uVar1 = Random(); - fVar3 = (float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) * + fVar3 = (float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283064e-10 * 3.14; fVar3 = fVar3 + fVar3; dirX = cos(fVar3); fVar3 = sin(fVar3); uVar1 = Random(); uVar2 = Random(); - rngFraction = (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + rngFraction = (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10; local_10.y = rngFraction * fVar3 * 2.5; local_10.x = rngFraction * dirX * 2.5; uVar2 = Random(); game = g_game; - rngFraction = (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + rngFraction = (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10; local_18.x = dirX * 15.0 * rngFraction + originX; local_18.y = fVar3 * 15.0 * rngFraction + originY; @@ -217,15 +217,15 @@ LAB_00450c97: uVar1 = Random(); projectile[1]._damageEvents._begin = (void *)0x40000000; projectile[1]._damageEvents._capacity = - (void *)((float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) * + (void *)((float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283064e-10 * 1.4); uVar1 = Random(); *(float *)&(*(undefined1 *)((char *)&(projectile[1]) + 0x4)) = - -15.0 - (float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) * + -15.0 - (float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283064e-10 * 60.0; uVar1 = Random(); *(float *)(projectile + 1) = - (float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) * 2.3283064e-10 + (float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283064e-10 * -1000.0; projectile->Update(); shotsLeft = shotsLeft + -1; @@ -240,7 +240,7 @@ void ItemPool::AddRoomBlacklist(int item) { uint *blacklistWord; - blacklistWord = (uint *)((int)(this->_roomBlacklistedCollectibles)._begin + ((uint)item >> 5) * 4) + blacklistWord = (uint *)(GHIDRA_INT((this->_roomBlacklistedCollectibles)._begin) + (GHIDRA_UINT(item) >> 5) * 4) ; *blacklistWord = *blacklistWord | 1 << (item & 0x1fU); return; @@ -258,12 +258,12 @@ void ItemPool::IdentifyPill(uint pillColor) uint pillIndex; uint pillColorId; - pillColorId = -(uint)((pillColor & 0x7ff) != 0) & pillColor & 0x7ff; + pillColorId = -GHIDRA_UINT(((pillColor & 0x7ff) != 0)) & pillColor & 0x7ff; pillIndex = 0xe; if (pillColorId < 0xe) { pillIndex = pillColorId; } - *(undefined1 *)((int)&this[1]._pools[1]._poolList._begin + pillIndex) = 1; + *(undefined1 *)(GHIDRA_INT(&this[1]._pools[1]._poolList._begin) + pillIndex) = 1; return; } @@ -282,10 +282,10 @@ byte ItemPool::is_collectible_available(int collectibleId, byte isFullCheck) int wordOffset; item = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(collectibleId); - wordOffset = ((uint)collectibleId >> 5) * 4; + wordOffset = (GHIDRA_UINT(collectibleId) >> 5) * 4; bitMask = 1 << ((byte)collectibleId & 0x1f); - if (((*(uint *)((int)(this->_removedCollectibles)._begin + wordOffset) & bitMask) == 0) && - ((*(uint *)((int)(this->_roomBlacklistedCollectibles)._begin + wordOffset) & bitMask) == 0)) { + if (((*(uint *)(GHIDRA_INT((this->_removedCollectibles)._begin) + wordOffset) & bitMask) == 0) && + ((*(uint *)(GHIDRA_INT((this->_roomBlacklistedCollectibles)._begin) + wordOffset) & bitMask) == 0)) { bVar1 = ((Item *)(item))->Item::IsAvailable((isFullCheck ^ 1) * 2 - 3); if (bVar1 != 0) { bVar1 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(0x58); @@ -305,7 +305,7 @@ int ItemPool::GetPoolForRoom(uint RoomType, uint Seed) uint seedHash; bool isGreedMode; - if (((int)RoomType < 0) || (0x1e < (int)RoomType)) { + if ((GHIDRA_INT(RoomType) < 0) || (0x1e < GHIDRA_INT(RoomType))) { KAGE_LogMessage(0x10,(byte *)"RoomType out of bounds\n"); } if ((g_game->_difficulty == 2) || (g_game->_difficulty == 3)) { @@ -329,7 +329,7 @@ int ItemPool::GetPoolForRoom(uint RoomType, uint Seed) } seedHash = Seed >> 1 ^ Seed; seedHash = seedHash << 0x15 ^ seedHash; - return *(int *)((int)&this->_pools[0]._totalWeight + + return *(int *)(GHIDRA_INT(&this->_pools[0]._totalWeight) + ((seedHash >> 0x14 ^ seedHash) % 0x1e) * 4 + poolTableOffset); } @@ -355,13 +355,13 @@ void ItemPool::GetItemPoolsForCollectible(int collectible, void *result) std::vector<4byte>::_Emplace_reallocate(resultEnd,&result); } else { - *resultEnd = (uint)poolType; + *resultEnd = GHIDRA_UINT(poolType); *(int *)((char *)pools + 4) = *(int *)((char *)pools + 4) + 4; } break; } } - poolType = (void *)((int)poolType + 1); + poolType = (void *)(GHIDRA_INT(poolType) + 1); poolListEnd = poolListEnd + 0xd; if ((void *)0x1e < poolType) { return; @@ -390,19 +390,19 @@ int ItemPool::GetFirstItemPoolForCollectible(int collectible) poolsCapacityEnd = 0; local_8 = 0; GetItemPoolsForCollectible(this,collectible,&poolsBegin); - if ((poolsEnd - (int)poolsBegin & 0xfffffffcU) == 0) { + if ((poolsEnd - GHIDRA_INT(poolsBegin) & 0xfffffffcU) == 0) { firstPool = 0; } else { firstPool = *poolsBegin; } if (poolsBegin != (int *)0x0) { - size = poolsCapacityEnd - (int)poolsBegin & 0xfffffffc; + size = poolsCapacityEnd - GHIDRA_INT(poolsBegin) & 0xfffffffc; ptr = poolsBegin; if (0xfff < size) { ptr = (int *)poolsBegin[-1]; size = size + 0x23; - if (0x1f < (uint)((int)poolsBegin + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(poolsBegin) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -478,18 +478,18 @@ uint * ItemPool::pick_weighted(float *poolList, uint flags, float roll) pickFraction = (fVar11 - roll) / fVar1; fVar11 = (float)entry[2]; if (g_game == (Game *)0x0) { - if (-1 < (int)uVar8) goto LAB_007330cc; + if (-1 < GHIDRA_INT(uVar8)) goto LAB_007330cc; LAB_00733143: itemConfig = (int *)0x0; LAB_0073314b: isAllowed = false; } else { - if ((int)uVar8 < 0) { - if (((int)uVar8 < 0) && + if (GHIDRA_INT(uVar8) < 0) { + if ((GHIDRA_INT(uVar8) < 0) && (pvVar2 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)~uVar8 < - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar2 >> 2)) { + GHIDRA_INT(~uVar8) < + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar2) >> 2)) { itemConfig = (int *)**(undefined4 **)((char *)pvVar2 + ~uVar8 * 4); } else { @@ -499,7 +499,7 @@ LAB_0073314b: else { LAB_007330cc: pvVar2 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar2 >> 2 <= (int)uVar8) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar2) >> 2 <= GHIDRA_INT(uVar8)) goto LAB_00733143; itemConfig = *(int **)((char *)pvVar2 + uVar8 * 4); } @@ -514,8 +514,8 @@ LAB_007330cc: if (1.0 - pickFraction < fVar11 / fVar1) { uVar8 = *entry >> 5; bitMask = 1 << ((byte)*entry & 0x1f); - if ((((*(uint *)((int)(this->_removedCollectibles)._begin + uVar8 * 4) & bitMask) == 0) && - ((*(uint *)((int)(this->_roomBlacklistedCollectibles)._begin + uVar8 * 4) & bitMask) + if ((((*(uint *)(GHIDRA_INT((this->_removedCollectibles)._begin) + uVar8 * 4) & bitMask) == 0) && + ((*(uint *)(GHIDRA_INT((this->_roomBlacklistedCollectibles)._begin) + uVar8 * 4) & bitMask) == 0)) && (isAllowed)) goto LAB_007331eb; } if (repicksLeft < 1) { @@ -547,17 +547,17 @@ joined_r0x0073322c: uVar8 = *puVar10; iVar7 = (uVar8 >> 5) * 4; bitMask = 1 << ((byte)uVar8 & 0x1f); - if (((*(uint *)((int)(this->_removedCollectibles)._begin + iVar7) & bitMask) == 0) && - ((*(uint *)((int)(this->_roomBlacklistedCollectibles)._begin + iVar7) & bitMask) == 0)) { + if (((*(uint *)(GHIDRA_INT((this->_removedCollectibles)._begin) + iVar7) & bitMask) == 0) && + ((*(uint *)(GHIDRA_INT((this->_roomBlacklistedCollectibles)._begin) + iVar7) & bitMask) == 0)) { if (g_game == (Game *)0x0) { - if (-1 < (int)uVar8) goto LAB_007332e6; + if (-1 < GHIDRA_INT(uVar8)) goto LAB_007332e6; } else { - if ((int)uVar8 < 0) { + if (GHIDRA_INT(uVar8) < 0) { iVar7 = -1 - uVar8; if ((iVar7 < 0) || (pvVar2 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar2 >> 2 <= + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar2) >> 2 <= iVar7)) { fallbackConfig = (int *)0x0; } @@ -568,7 +568,7 @@ joined_r0x0073322c: else { LAB_007332e6: pvVar2 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar2 >> 2 <= (int)uVar8) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar2) >> 2 <= GHIDRA_INT(uVar8)) goto LAB_00733347; fallbackConfig = *(int **)((char *)pvVar2 + uVar8 * 4); } @@ -595,11 +595,11 @@ LAB_007331eb: return (uint *)0x0; } if (((0.0 < (float)entry[2]) && ((~(byte)flags & 1) != 0)) && - (fVar11 = (float)entry[2] - (float)entry[3], entry[2] = (uint)fVar11, fVar11 < (float)entry[4]) + (fVar11 = (float)entry[2] - (float)entry[3], entry[2] = GHIDRA_UINT(fVar11), fVar11 < (float)entry[4]) ) { entry[2] = 0; uVar5 = *entry; - if ((-1 < (int)uVar5) && (g_game->_challenge != 0x2b)) { + if ((-1 < GHIDRA_INT(uVar5)) && (g_game->_challenge != 0x2b)) { if (uVar5 == 0x1e4) { RemoveCollectible(this,0x126,0,0); } @@ -643,7 +643,7 @@ byte ItemPool::should_force_magic_skin(uint seed) uVar5 = seed >> 7 ^ seed; uVar5 = uVar5 << 0x11 ^ uVar5; uVar5 = uVar5 >> 0x15 ^ uVar5; - if ((float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) * 2.3283062e-10 < + if ((float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283062e-10 < (float)g_game->_magicSkinUses * 0.01) { return 1; } @@ -667,8 +667,8 @@ byte ItemPool::should_force_magic_skin(uint seed) if ((*roomDesc != (void *)0x0) && (roomDesc[0xc] != (void *)0x0)) { entitySlot = ((std_vector *)(roomDesc + 0x19))->_begin; uVar8 = 0; - iVar1 = (int)roomDesc[0x1a] - (int)entitySlot >> 0x1f; - iVar7 = ((int)roomDesc[0x1a] - (int)entitySlot) / 0x78 + iVar1; + iVar1 = GHIDRA_INT(roomDesc[0x1a]) - GHIDRA_INT(entitySlot) >> 0x1f; + iVar7 = (GHIDRA_INT(roomDesc[0x1a]) - GHIDRA_INT(entitySlot)) / 0x78 + iVar1; if (iVar7 != iVar1) { do { if ((((*entitySlot == 5) && (entitySlot[1] == 100)) && (entitySlot[5] == 0)) && @@ -677,7 +677,7 @@ byte ItemPool::should_force_magic_skin(uint seed) } uVar8 = uVar8 + 1; entitySlot = entitySlot + 0x1e; - } while (uVar8 < (uint)(iVar7 - iVar1)); + } while (uVar8 < GHIDRA_UINT((iVar7 - iVar1))); } } roomIdx = roomIdx + 1; @@ -685,7 +685,7 @@ byte ItemPool::should_force_magic_skin(uint seed) } while (roomIdx < 0x20f); uVar6 = 4 - g_game->_magicSkinUses; uVar8 = 1; - if (1 < (int)uVar6) { + if (1 < GHIDRA_INT(uVar6)) { uVar8 = uVar6; } if (uVar5 == 0) { @@ -722,7 +722,7 @@ uint ItemPool::GetTrinket(byte DontAdvanceRNG) bool isGolden; int prevSeed; - securityCookie = __security_cookie ^ (uint)(auStack_8 + 4); + securityCookie = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); if (this->_numAvailableTrinkets < 1) { ResetTrinkets(this); } @@ -735,11 +735,11 @@ uint ItemPool::GetTrinket(byte DontAdvanceRNG) rng = &this->_trinketPoolRNG; } trinketId = 0; - uVar2 = ((RNG *)(rng))->RNG::RandomInt((int)(this->_trinketPoolItems)._end - - (int)(this->_trinketPoolItems)._begin >> 3); + uVar2 = ((RNG *)(rng))->RNG::RandomInt(GHIDRA_INT((this->_trinketPoolItems)._end) - + GHIDRA_INT((this->_trinketPoolItems)._begin) >> 3); retryRng._seed = rng->_seed; - triesLeft = (uint)((int)(this->_trinketPoolItems)._end - (int)(this->_trinketPoolItems)._begin >> - 3) >> 1; + triesLeft = GHIDRA_UINT((GHIDRA_INT((this->_trinketPoolItems)._end) - GHIDRA_INT((this->_trinketPoolItems)._begin) >> + 3)) >> 1; retryRng._shift1 = 5; retryRng._shift2 = 9; retryRng._shift3 = 7; @@ -750,7 +750,7 @@ uint ItemPool::GetTrinket(byte DontAdvanceRNG) (*(char *)((char *)pvVar4 + uVar2 * 8 + 5) != '\0')) { uVar3 = *(uint *)((char *)pvVar4 + uVar2 * 8) & 0x7fff; pvVar4 = (g_manager->_itemConfig)._trinkets._begin; - if ((int)uVar3 < (int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar4 >> 2) { + if (GHIDRA_INT(uVar3) < GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar4) >> 2) { pvVar4 = *(void **)((char *)pvVar4 + uVar3 * 4); } else { @@ -758,47 +758,47 @@ uint ItemPool::GetTrinket(byte DontAdvanceRNG) } isAvailable = ((Item *)(pvVar4))->Item::IsAvailable(0xffffffff); if (isAvailable != 0) { - if (-1 < (int)uVar2) { + if (-1 < GHIDRA_INT(uVar2)) { if (DontAdvanceRNG == 0) { - *(undefined1 *)((int)(this->_trinketPoolItems)._begin + uVar2 * 8 + 4) = 0; + *(undefined1 *)(GHIDRA_INT((this->_trinketPoolItems)._begin) + uVar2 * 8 + 4) = 0; this->_numAvailableTrinkets = this->_numAvailableTrinkets + -1; } - trinketId = *(uint *)((int)(this->_trinketPoolItems)._begin + uVar2 * 8); + trinketId = *(uint *)(GHIDRA_INT((this->_trinketPoolItems)._begin) + uVar2 * 8); goto LAB_00733ee0; } break; } } - uVar3 = (int)(this->_trinketPoolItems)._end - (int)(this->_trinketPoolItems)._begin >> 3; + uVar3 = GHIDRA_INT((this->_trinketPoolItems)._end) - GHIDRA_INT((this->_trinketPoolItems)._begin) >> 3; if (prevSeed == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar1 = (code *)swi(3); uVar2 = (*pcVar1)(); return uVar2; } - retryRng._seed = (uint)prevSeed >> ((byte)retryRng._shift1 & 0x1f) ^ prevSeed; + retryRng._seed = GHIDRA_UINT(prevSeed) >> ((byte)retryRng._shift1 & 0x1f) ^ prevSeed; retryRng._seed = retryRng._seed << ((byte)retryRng._shift2 & 0x1f) ^ retryRng._seed; - retryRng._seed = (uint)retryRng._seed >> 7 ^ retryRng._seed; + retryRng._seed = GHIDRA_UINT(retryRng._seed) >> 7 ^ retryRng._seed; uVar2 = 0; if (uVar3 != 0) { - uVar2 = (uint)retryRng._seed % uVar3; + uVar2 = GHIDRA_UINT(retryRng._seed) % uVar3; } triesLeft = triesLeft - 1; - } while (0 < (int)triesLeft); + } while (0 < GHIDRA_INT(triesLeft)); KAGE_LogMessage(1,(byte *)"GetTrinket: no tries left\n"); - uVar2 = ((RNG *)(&retryRng))->RNG::RandomInt((int)(this->_trinketPoolItems)._end - (int)(this->_trinketPoolItems)._begin + uVar2 = ((RNG *)(&retryRng))->RNG::RandomInt(GHIDRA_INT((this->_trinketPoolItems)._end) - GHIDRA_INT((this->_trinketPoolItems)._begin) >> 3); pvVar4 = (this->_trinketPoolItems)._end; poolBegin = (this->_trinketPoolItems)._begin; scanCount = 0; - if ((int)pvVar4 - (int)poolBegin >> 3 != 0) { + if (GHIDRA_INT(pvVar4) - GHIDRA_INT(poolBegin) >> 3 != 0) { do { - uVar2 = (uVar2 + 1) % (uint)((int)pvVar4 - (int)poolBegin >> 3); + uVar2 = (uVar2 + 1) % GHIDRA_UINT((GHIDRA_INT(pvVar4) - GHIDRA_INT(poolBegin) >> 3)); if ((*(char *)((char *)poolBegin + uVar2 * 8 + 4) != '\0') && (*(char *)((char *)poolBegin + uVar2 * 8 + 5) != '\0')) { uVar3 = *(uint *)((char *)poolBegin + uVar2 * 8) & 0x7fff; pvVar4 = (g_manager->_itemConfig)._trinkets._begin; - if ((int)uVar3 < (int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar4 >> 2) { + if (GHIDRA_INT(uVar3) < GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar4) >> 2) { pvVar4 = *(void **)((char *)pvVar4 + uVar3 * 4); } else { @@ -807,17 +807,17 @@ uint ItemPool::GetTrinket(byte DontAdvanceRNG) isAvailable = ((Item *)(pvVar4))->Item::IsAvailable(0xffffffff); if (isAvailable != 0) { if (DontAdvanceRNG == 0) { - *(undefined1 *)((int)(this->_trinketPoolItems)._begin + uVar2 * 8 + 4) = 0; + *(undefined1 *)(GHIDRA_INT((this->_trinketPoolItems)._begin) + uVar2 * 8 + 4) = 0; this->_numAvailableTrinkets = this->_numAvailableTrinkets + -1; } - trinketId = *(uint *)((int)(this->_trinketPoolItems)._begin + uVar2 * 8); + trinketId = *(uint *)(GHIDRA_INT((this->_trinketPoolItems)._begin) + uVar2 * 8); break; } } pvVar4 = (this->_trinketPoolItems)._end; scanCount = scanCount + 1; poolBegin = (this->_trinketPoolItems)._begin; - } while (scanCount < (uint)((int)pvVar4 - (int)poolBegin >> 3)); + } while (scanCount < GHIDRA_UINT((GHIDRA_INT(pvVar4) - GHIDRA_INT(poolBegin) >> 3))); } LAB_00733ee0: uVar2 = FUN_008658c0(trinketId,&this->_trinketPoolRNG); @@ -839,7 +839,7 @@ LAB_00733ee0: uVar2 = uVar2 >> 3 ^ uVar2; uVar2 = uVar2 << 3 ^ uVar2; uVar2 = uVar2 >> 0x1a ^ uVar2; - if ((uVar2 == (uVar2 / 0x32) * 0x32) || (((uint)g_game->_debugFlags >> 3 & 1) != 0)) { + if ((uVar2 == (uVar2 / 0x32) * 0x32) || ((GHIDRA_UINT(g_game->_debugFlags) >> 3 & 1) != 0)) { isGolden = true; goto LAB_00733fc4; } @@ -864,7 +864,7 @@ void ItemPool::ResetCollectible(int Collectible) if (-1 < Collectible) { collectibleBits = (this->_removedCollectibles)._begin; - wordIndex = (uint)Collectible >> 5; + wordIndex = GHIDRA_UINT(Collectible) >> 5; *(uint *)((char *)collectibleBits + wordIndex * 4) = *(uint *)((char *)collectibleBits + wordIndex * 4) & ~(1 << (Collectible & 0x1fU)); collectibleBits = (this->_roomBlacklistedCollectibles)._begin; @@ -896,7 +896,7 @@ byte ItemPool::RemoveTrinket(int trinketId) if ((((trinketId < 1) || (trinketPool = (this->_trinketPoolItems)._begin, - (int)(this->_trinketPoolItems)._end - (int)trinketPool >> 3 <= trinketId)) || + GHIDRA_INT((this->_trinketPoolItems)._end) - GHIDRA_INT(trinketPool) >> 3 <= trinketId)) || (*(char *)((char *)trinketPool + trinketId * 8 + 4) == '\0')) || (*(char *)((char *)trinketPool + trinketId * 8 + 5) == '\0')) { return 0; @@ -925,7 +925,7 @@ int ItemPool::GetCardEx(int Seed, int SpecialChance, int RuneChance, int SuitCha undefined1 auStack_8 [4]; void *cardsBegin; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); iVar3 = *(int *)ThreadLocalStoragePointer; if ((*(int *)(iVar3 + 0xc) < DAT_00c8102c) && (_Init_thread_header(&DAT_00c8102c), DAT_00c8102c == -1)) { @@ -956,13 +956,13 @@ int ItemPool::GetCardEx(int Seed, int SpecialChance, int RuneChance, int SuitCha DAT_00c81064 = DAT_00c81060; rng._shift1 = 3; rng._shift2 = 3; - local_28 = (int)(g_manager->_itemConfig)._cards._end - (int)(g_manager->_itemConfig)._cards._begin + local_28 = GHIDRA_INT((g_manager->_itemConfig)._cards._end) - GHIDRA_INT((g_manager->_itemConfig)._cards._begin) >> 2; if (1 < local_28) { do { - if (((int)uVar5 < 0) || + if ((GHIDRA_INT(uVar5) < 0) || (cardsBegin = (g_manager->_itemConfig)._cards._begin, - (int)(g_manager->_itemConfig)._cards._end - (int)cardsBegin >> 2 <= (int)uVar5)) { + GHIDRA_INT((g_manager->_itemConfig)._cards._end) - GHIDRA_INT(cardsBegin) >> 2 <= GHIDRA_INT(uVar5))) { iVar3 = 0; } else { @@ -1024,7 +1024,7 @@ switchD_007342be_default: uVar5 = uVar5 + 1; } while (uVar5 < local_28); } - uVar5 = (int)DAT_00c81044 - (int)DAT_00c81040 >> 2; + uVar5 = GHIDRA_INT(DAT_00c81044) - GHIDRA_INT(DAT_00c81040) >> 2; if ((uVar5 != 0) || (RuneChance == -1)) { while (uVar5 < 6) { local_28 = 0; @@ -1035,7 +1035,7 @@ switchD_007342be_default: *DAT_00c81044 = 0; DAT_00c81044 = DAT_00c81044 + 1; } - uVar5 = (int)DAT_00c81044 - (int)DAT_00c81040 >> 2; + uVar5 = GHIDRA_INT(DAT_00c81044) - GHIDRA_INT(DAT_00c81040) >> 2; } } local_20 = 1; @@ -1054,12 +1054,12 @@ LAB_00734488: iVar3 = (*pcVar1)(); return iVar3; } - rng._seed = (uint)Seed >> (rngShift1 & 0x1f) ^ Seed; + rng._seed = GHIDRA_UINT(Seed) >> (rngShift1 & 0x1f) ^ Seed; rng._seed = rng._seed << ((byte)rng._shift2 & 0x1f) ^ rng._seed; - rng._seed = (uint)rng._seed >> ((byte)rngShift3 & 0x1f) ^ rng._seed; + rng._seed = GHIDRA_UINT(rng._seed) >> ((byte)rngShift3 & 0x1f) ^ rng._seed; Seed = rng._seed; - if (((uint)rng._seed % local_20 == 0) && - (uVar4 = (int)DAT_00c81044 - (int)DAT_00c81040 >> 2, uVar4 != 0)) { + if ((GHIDRA_UINT(rng._seed) % local_20 == 0) && + (uVar4 = GHIDRA_INT(DAT_00c81044) - GHIDRA_INT(DAT_00c81040) >> 2, uVar4 != 0)) { uVar5 = ((RNG *)(&rng))->RNG::RandomInt(uVar4); uVar5 = DAT_00c81040[uVar5]; if (uVar5 != 0) goto LAB_0073467f; @@ -1080,12 +1080,12 @@ LAB_00734488: iVar3 = (*pcVar1)(); return iVar3; } - rng._seed = (uint)Seed >> (rngShift1 & 0x1f) ^ Seed; + rng._seed = GHIDRA_UINT(Seed) >> (rngShift1 & 0x1f) ^ Seed; rng._seed = rng._seed << ((byte)rng._shift2 & 0x1f) ^ rng._seed; - rng._seed = (uint)rng._seed >> ((byte)rngShift3 & 0x1f) ^ rng._seed; + rng._seed = GHIDRA_UINT(rng._seed) >> ((byte)rngShift3 & 0x1f) ^ rng._seed; Seed = rng._seed; - if (((uint)rng._seed % (uint)SuitChance == 0) && - (uVar4 = (int)DAT_00c81054 - (int)DAT_00c81050 >> 2, uVar4 != 0)) { + if ((GHIDRA_UINT(rng._seed) % GHIDRA_UINT(SuitChance) == 0) && + (uVar4 = GHIDRA_INT(DAT_00c81054) - GHIDRA_INT(DAT_00c81050) >> 2, uVar4 != 0)) { uVar5 = ((RNG *)(&rng))->RNG::RandomInt(uVar4); uVar5 = DAT_00c81050[uVar5]; if (uVar5 != 0) goto LAB_0073467f; @@ -1094,7 +1094,7 @@ LAB_00734488: Seed = rng._seed; } } - local_28 = (int)DAT_00c81064 - (int)DAT_00c81060 >> 2; + local_28 = GHIDRA_INT(DAT_00c81064) - GHIDRA_INT(DAT_00c81060) >> 2; if (local_28 != 0) { if (Seed == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -1102,10 +1102,10 @@ LAB_00734488: iVar3 = (*pcVar1)(); return iVar3; } - uVar5 = (uint)Seed >> (rngShift1 & 0x1f) ^ Seed; + uVar5 = GHIDRA_UINT(Seed) >> (rngShift1 & 0x1f) ^ Seed; uVar5 = uVar5 << ((byte)rng._shift2 & 0x1f) ^ uVar5; Seed = uVar5 >> ((byte)rngShift3 & 0x1f) ^ uVar5; - uVar5 = DAT_00c81060[(uint)Seed % local_28]; + uVar5 = DAT_00c81060[GHIDRA_UINT(Seed) % local_28]; goto LAB_007345f2; } } @@ -1117,12 +1117,12 @@ LAB_00734488: return iVar3; } rngShift1 = (byte)rng._shift1; - uVar4 = (uint)Seed >> (rngShift1 & 0x1f) ^ Seed; + uVar4 = GHIDRA_UINT(Seed) >> (rngShift1 & 0x1f) ^ Seed; uVar4 = uVar4 << ((byte)rng._shift2 & 0x1f) ^ uVar4; Seed = uVar4 >> ((byte)rngShift3 & 0x1f) ^ uVar4; rng._seed = Seed; - if (((uint)Seed % (uint)SpecialChance != 0) || - (uVar4 = (int)DAT_00c81034 - (int)DAT_00c81030 >> 2, uVar4 == 0)) goto LAB_00734488; + if ((GHIDRA_UINT(Seed) % GHIDRA_UINT(SpecialChance) != 0) || + (uVar4 = GHIDRA_INT(DAT_00c81034) - GHIDRA_INT(DAT_00c81030) >> 2, uVar4 == 0)) goto LAB_00734488; uVar5 = ((RNG *)(&rng))->RNG::RandomInt(uVar4); uVar5 = DAT_00c81030[uVar5]; if (uVar5 == 0) { @@ -1136,18 +1136,18 @@ LAB_0073467f: Seed = rng._seed; LAB_007345f2: uVar4 = uVar5; - if (0 < (int)uVar5) { - if (0x16 < (int)uVar5) goto LAB_007346b0; + if (0 < GHIDRA_INT(uVar5)) { + if (0x16 < GHIDRA_INT(uVar5)) goto LAB_007346b0; if (Seed == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar1 = (code *)swi(3); iVar3 = (*pcVar1)(); return iVar3; } - uVar4 = (uint)Seed >> (rngShift1 & 0x1f) ^ Seed; + uVar4 = GHIDRA_UINT(Seed) >> (rngShift1 & 0x1f) ^ Seed; uVar4 = uVar4 << ((byte)rng._shift2 & 0x1f) ^ uVar4; Seed = uVar4 >> ((byte)rngShift3 & 0x1f) ^ uVar4; - if (Seed != ((uint)Seed / 7) * 7) goto LAB_007346b0; + if (Seed != (GHIDRA_UINT(Seed) / 7) * 7) goto LAB_007346b0; uVar4 = uVar5 + 0x37; cVar2 = Card::IsAvailable(); if (cVar2 == '\0') goto LAB_007346b0; @@ -1172,7 +1172,7 @@ LAB_007346b0: iVar3 = (*pcVar1)(); return iVar3; } - uVar4 = (uint)Seed >> 6 ^ Seed; + uVar4 = GHIDRA_UINT(Seed) >> 6 ^ Seed; uVar4 = uVar4 << 3 ^ uVar4; uVar4 = uVar4 >> 0x11 ^ uVar4; if (uVar4 == (uVar4 / 10) * 10) { @@ -1194,7 +1194,7 @@ int ItemPool::GetCard(uint seed, byte isPlaying, byte isRunes, byte isOnlyRunes) RNG cardRng; undefined4 stackCookie; - stackCookie = __security_cookie ^ (int)register0x00000010 - 4U; + stackCookie = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; iVar1 = 0; if (isPlaying != 0) { iVar1 = 10; @@ -1288,7 +1288,7 @@ int ItemPool::GetPillEffect(uint pillColor, Entity_Player *player) if ((g_game->_dailyChallenge)._specialDailyId == 0x29) { return 4; } - pillEffect = *(int *)((int)this[1]._pools + (pillColor & 0x7ff) * 4 + -4); + pillEffect = *(int *)(GHIDRA_INT(this[1]._pools) + (pillColor & 0x7ff) * 4 + -4); if (player != (Entity_Player *)0x0) { bVar1 = ((Entity_Player *)(player))->Entity_Player::HasCollectible(0x4b,0); if ((((bVar1 == 0) && (bVar1 = ((Entity_Player *)(player))->Entity_Player::HasCollectible(0x12f,0), bVar1 == 0)) && @@ -1425,7 +1425,7 @@ void ItemPool::remove_deathmatch_pill_effects() puStack_c = &LAB_00afd66d; local_10 = ExceptionList; - uVar5 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar5 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; if (1 < *(int *)&g_game->_deathmatchManager) { piVar9 = (int *)0x0; @@ -1434,10 +1434,10 @@ void ItemPool::remove_deathmatch_pill_effects() pillEffects = &(g_manager->_itemConfig)._pillEffects; local_24 = 0; self = in_ECX; - if ((int)(g_manager->_itemConfig)._pillEffects._end - (int)pillEffects->_begin >> 2 != 0) { + if (GHIDRA_INT((g_manager->_itemConfig)._pillEffects._end) - GHIDRA_INT(pillEffects->_begin) >> 2 != 0) { do { - if (((int)local_24 < 0) || - ((int)pillEffects->_end - (int)pillEffects->_begin >> 2 <= (int)local_24)) { + if ((GHIDRA_INT(local_24) < 0) || + (GHIDRA_INT(pillEffects->_end) - GHIDRA_INT(pillEffects->_begin) >> 2 <= GHIDRA_INT(local_24))) { local_1c = (int *)0x0; } else { @@ -1472,7 +1472,7 @@ void ItemPool::remove_deathmatch_pill_effects() piVar9 = candidatesEnd; } else { - *piVar9 = (int)local_1c; + *piVar9 = GHIDRA_INT(local_1c); candidatesEnd = piVar9 + 1; piVar9 = candidatesEnd; } @@ -1481,8 +1481,8 @@ void ItemPool::remove_deathmatch_pill_effects() pillEffects = &(g_manager->_itemConfig)._pillEffects; local_24 = local_24 + 1; } while (local_24 < - (uint)((int)(g_manager->_itemConfig)._pillEffects._end - (int)pillEffects->_begin >> - 2)); + GHIDRA_UINT((GHIDRA_INT((g_manager->_itemConfig)._pillEffects._end) - GHIDRA_INT(pillEffects->_begin) >> + 2))); } local_1c = (int *)0x0; piVar8 = (int *)0x0; @@ -1492,7 +1492,7 @@ void ItemPool::remove_deathmatch_pill_effects() do { if (*piVar6 == -1) { uVar5 = *(uint *)(iVar7 + 0x654); - candidateCount = (int)piVar9 - (int)local_1c >> 2; + candidateCount = GHIDRA_INT(piVar9) - GHIDRA_INT(local_1c) >> 2; if (uVar5 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); uVar5 = *(uint *)(self + 0x654); @@ -1514,7 +1514,7 @@ void ItemPool::remove_deathmatch_pill_effects() } piVar1 = local_1c + pickIndex; *piVar6 = local_1c[pickIndex]; - memmove(piVar1,piVar1 + 1,(int)piVar9 - (int)(piVar1 + 1)); + memmove(piVar1,piVar1 + 1,GHIDRA_INT(piVar9) - GHIDRA_INT((piVar1 + 1))); piVar9 = piVar9 + -1; iVar7 = self; } @@ -1522,12 +1522,12 @@ void ItemPool::remove_deathmatch_pill_effects() local_24 = local_24 + -1; } while (local_24 != 0); if (piVar8 != (int *)0x0) { - uVar5 = -(int)piVar8 & 0xfffffffc; + uVar5 = -GHIDRA_INT(piVar8) & 0xfffffffc; piVar9 = piVar8; if (0xfff < uVar5) { piVar9 = (int *)piVar8[-1]; uVar5 = uVar5 + 0x23; - if (0x1f < (uint)((int)piVar8 + (-4 - (int)piVar9))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(piVar8) + (-4 - GHIDRA_INT(piVar9))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1578,7 +1578,7 @@ void ItemPool::Init(uint seed, byte *filename) local_14 = 0xffffffff; puStack_18 = &LAB_00afd6a8; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(pillClassByColor + 0x24); + local_24 = __security_cookie ^ GHIDRA_UINT((pillClassByColor + 0x24)); ExceptionList = &local_1c; this->_seed = seed; (this->_itemPoolRNG)._shift1 = 1; @@ -1607,50 +1607,50 @@ void ItemPool::Init(uint seed, byte *filename) (this->_trinketPoolRNG)._shift3 = 0x13; manager = g_manager; this->_lastPool = 0; - uVar2 = (int)(manager->_itemConfig)._collectibles._end - - (int)(manager->_itemConfig)._collectibles._begin >> 2; + uVar2 = GHIDRA_INT((manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((manager->_itemConfig)._collectibles._begin) >> 2; vector_bool_resize(&this->_removedCollectibles,uVar2,(byte)uVar2); - uVar2 = (int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2; + uVar2 = GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2; vector_bool_resize(&this->_roomBlacklistedCollectibles,uVar2,(byte)uVar2); trinketPoolItems = &this->_trinketPoolItems; pvVar4 = (this->_trinketPoolItems)._end; - local_64 = (SoundEffect)((int)pvVar4 - (int)trinketPoolItems->_begin >> 3); + local_64 = (SoundEffect)(GHIDRA_INT(pvVar4) - GHIDRA_INT(trinketPoolItems->_begin) >> 3); SVar6 = (SoundEffect) - ((int)(g_manager->_itemConfig)._trinkets._end - - (int)(g_manager->_itemConfig)._trinkets._begin >> 2); - if ((uint)SVar6 < (uint)local_64) { - (this->_trinketPoolItems)._end = (void *)((int)trinketPoolItems->_begin + (int)SVar6 * 8); + (GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - + GHIDRA_INT((g_manager->_itemConfig)._trinkets._begin) >> 2); + if (GHIDRA_UINT(SVar6) < GHIDRA_UINT(local_64)) { + (this->_trinketPoolItems)._end = (void *)(GHIDRA_INT(trinketPoolItems->_begin) + GHIDRA_INT(SVar6) * 8); } - else if ((uint)local_64 < (uint)SVar6) { - if ((uint)((int)(this->_trinketPoolItems)._capacity - (int)trinketPoolItems->_begin >> 3) < - (uint)SVar6) { + else if (GHIDRA_UINT(local_64) < GHIDRA_UINT(SVar6)) { + if (GHIDRA_UINT((GHIDRA_INT((this->_trinketPoolItems)._capacity) - GHIDRA_INT(trinketPoolItems->_begin) >> 3)) < + GHIDRA_UINT(SVar6)) { std::vector<8byte>::_Resize_reallocate(SVar6,pvVar4); } else { - iVar5 = (int)SVar6 - (int)local_64; + iVar5 = GHIDRA_INT(SVar6) - GHIDRA_INT(local_64); if (iVar5 != 0) { memset(pvVar4,0,iVar5 * 8); - pvVar4 = (void *)((int)pvVar4 + iVar5 * 8); + pvVar4 = (void *)(GHIDRA_INT(pvVar4) + iVar5 * 8); } (this->_trinketPoolItems)._end = pvVar4; } } local_6c = (SoundEffect)0x0; - if ((int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2 != 0) { + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2 != 0) { do { - uVar7 = (uint)local_6c >> 5; - uVar2 = ~(1 << (local_6c._0_1_ & 0x1f)); - local_6c = (SoundEffect)((int)local_6c + 1); - bitWord = (uint *)((int)(this->_removedCollectibles)._begin + uVar7 * 4); + uVar7 = GHIDRA_UINT(local_6c) >> 5; + uVar2 = ~(1 << ((*(undefined1 *)((char *)&(local_6c) + 0x0)) & 0x1f)); + local_6c = (SoundEffect)(GHIDRA_INT(local_6c) + 1); + bitWord = (uint *)(GHIDRA_INT((this->_removedCollectibles)._begin) + uVar7 * 4); *bitWord = *bitWord & uVar2; manager = g_manager; - bitWord = (uint *)((int)(this->_roomBlacklistedCollectibles)._begin + uVar7 * 4); + bitWord = (uint *)(GHIDRA_INT((this->_roomBlacklistedCollectibles)._begin) + uVar7 * 4); *bitWord = *bitWord & uVar2; - } while ((uint)local_6c < - (uint)((int)(manager->_itemConfig)._collectibles._end - - (int)(manager->_itemConfig)._collectibles._begin >> 2)); + } while (GHIDRA_UINT(local_6c) < + GHIDRA_UINT((GHIDRA_INT((manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((manager->_itemConfig)._collectibles._begin) >> 2))); } this->_unkFloat674 = 1.0; this->_unkFloat678 = 1.0; @@ -1681,7 +1681,7 @@ void ItemPool::Init(uint seed, byte *filename) this[1]._pools[1]._poolList._end = (void *)0x0; this[1]._pools[1]._poolList._capacity = (void *)0x0; *(undefined2 *)&this[1]._pools[1]._rng1._seed = 0; - *(undefined1 *)((int)&this[1]._pools[1]._rng1._seed + 2) = 0; + *(undefined1 *)(GHIDRA_INT(&this[1]._pools[1]._rng1._seed) + 2) = 0; pillClassByColor[4] = '\x02'; pillClassByColor[5] = '\x01'; pillClassByColor[6] = '\0'; @@ -1704,11 +1704,11 @@ void ItemPool::Init(uint seed, byte *filename) *pillColorsEnd = local_6c; pillColorsEnd = pillColorsEnd + 1; } - local_6c = (SoundEffect)((int)local_6c + 1); - } while ((uint)local_6c < 0xe); - local_68 = (int)pillColorsEnd >> 2; + local_6c = (SoundEffect)(GHIDRA_INT(local_6c) + 1); + } while (GHIDRA_UINT(local_6c) < 0xe); + local_68 = GHIDRA_INT(pillColorsEnd) >> 2; SVar6 = (SoundEffect)(local_68 - 1); - if (0 < (int)SVar6) { + if (0 < GHIDRA_INT(SVar6)) { local_64 = SVar6; do { uVar2 = (this->_itemPoolRNG)._seed; @@ -1732,11 +1732,11 @@ void ItemPool::Init(uint seed, byte *filename) local_6c = (SoundEffect)(uVar2 % local_68); } local_68 = local_68 - 1; - swapTmp = *(undefined4 *)((int)SVar6 * 4); - *(undefined4 *)((int)SVar6 * 4) = *(undefined4 *)((int)local_6c * 4); - SVar6 = (SoundEffect)((int)SVar6 + -1); - *(undefined4 *)((int)local_6c * 4) = swapTmp; - } while (0 < (int)SVar6); + swapTmp = *(undefined4 *)(GHIDRA_INT(SVar6) * 4); + *(undefined4 *)(GHIDRA_INT(SVar6) * 4) = *(undefined4 *)(GHIDRA_INT(local_6c) * 4); + SVar6 = (SoundEffect)(GHIDRA_INT(SVar6) + -1); + *(undefined4 *)(GHIDRA_INT(local_6c) * 4) = swapTmp; + } while (0 < GHIDRA_INT(SVar6)); } local_64 = (SoundEffect)0xe; if (pillColorsEnd == (SoundEffect *)0x0) { @@ -1747,28 +1747,28 @@ void ItemPool::Init(uint seed, byte *filename) pillColorsEnd = pillColorsEnd + 1; } pillEffectsEnd = (SoundEffect)0x0; - local_14 = CONCAT31(local_14._1_3_,1); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); local_70 = 0; manager = g_manager; - if ((int)(g_manager->_itemConfig)._pillEffects._end - - (int)(g_manager->_itemConfig)._pillEffects._begin >> 2 != 0) { + if (GHIDRA_INT((g_manager->_itemConfig)._pillEffects._end) - + GHIDRA_INT((g_manager->_itemConfig)._pillEffects._begin) >> 2 != 0) { game = g_game; do { - if (((int)local_70 < 0) || - ((int)(manager->_itemConfig)._pillEffects._end - - (int)(manager->_itemConfig)._pillEffects._begin >> 2 <= (int)local_70)) { + if ((GHIDRA_INT(local_70) < 0) || + (GHIDRA_INT((manager->_itemConfig)._pillEffects._end) - + GHIDRA_INT((manager->_itemConfig)._pillEffects._begin) >> 2 <= GHIDRA_INT(local_70))) { pSVar3 = (SoundEffect *)0x0; } else { - pSVar3 = *(SoundEffect **)((int)(manager->_itemConfig)._pillEffects._begin + local_70 * 4); + pSVar3 = *(SoundEffect **)(GHIDRA_INT((manager->_itemConfig)._pillEffects._begin) + local_70 * 4); } if (game == (Game *)0x0) { LAB_00735425: SVar6 = pSVar3[1]; - if (((int)SVar6 < 0) || - (((uint)SVar6 < 0x282 && + if ((GHIDRA_INT(SVar6) < 0) || + ((GHIDRA_UINT(SVar6) < 0x282 && (((SVar6 == (SoundEffect)0x0 || - ((manager->_persistentGameData)._achievements[(int)SVar6] != 0)) || + ((manager->_persistentGameData)._achievements[GHIDRA_INT(SVar6)] != 0)) || (((manager->_state == 2 && (game != (Game *)0x0)) && (((game->_dailyChallenge)._id != 0 || (game->_isDebug != 0)))))))))) { local_64 = *pSVar3; @@ -1779,15 +1779,15 @@ LAB_00735425: } else { *(SoundEffect *)pillEffectsEnd = local_64; - pillEffectsEnd = (SoundEffect)((int)pillEffectsEnd + 4); + pillEffectsEnd = (SoundEffect)(GHIDRA_INT(pillEffectsEnd) + 4); } local_64 = pSVar3[0xf]; - if ((-1 < (int)local_64) && - ((int)local_64 < - ((int)(manager->_sfxManager)._sounds._end - (int)(manager->_sfxManager)._sounds._begin + if ((-1 < GHIDRA_INT(local_64)) && + (GHIDRA_INT(local_64) < + (GHIDRA_INT((manager->_sfxManager)._sounds._end) - GHIDRA_INT((manager->_sfxManager)._sounds._begin) ) / 0x1b8)) { pSVar3 = (SoundEffect *) - ((int)local_64 * 0x1b8 + (int)(manager->_sfxManager)._sounds._begin); + (GHIDRA_INT(local_64) * 0x1b8 + GHIDRA_INT((manager->_sfxManager)._sounds._begin)); if (*(char *)(pSVar3 + 0x66) == '\0') { KAGE_LogMessage(1,(byte *)"Preload sound %d.\n"); ((SoundEffect *)(pSVar3))->SoundEffect::Load(); @@ -1818,12 +1818,12 @@ LAB_007353f3: LAB_0073551e: local_70 = local_70 + 1; } while (local_70 < - (uint)((int)(manager->_itemConfig)._pillEffects._end - - (int)(manager->_itemConfig)._pillEffects._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((manager->_itemConfig)._pillEffects._end) - + GHIDRA_INT((manager->_itemConfig)._pillEffects._begin) >> 2))); } - local_70 = (int)pillEffectsEnd >> 2; + local_70 = GHIDRA_INT(pillEffectsEnd) >> 2; SVar6 = (SoundEffect)(local_70 - 1); - if (0 < (int)SVar6) { + if (0 < GHIDRA_INT(SVar6)) { local_64 = SVar6; do { local_68 = (this->_itemPoolRNG)._seed; @@ -1847,32 +1847,32 @@ LAB_0073551e: local_68 = local_68 % local_70; } local_70 = local_70 - 1; - swapTmp = *(undefined4 *)((int)SVar6 * 4); - *(undefined4 *)((int)SVar6 * 4) = *(undefined4 *)(local_68 * 4); - SVar6 = (SoundEffect)((int)SVar6 + -1); + swapTmp = *(undefined4 *)(GHIDRA_INT(SVar6) * 4); + *(undefined4 *)(GHIDRA_INT(SVar6) * 4) = *(undefined4 *)(local_68 * 4); + SVar6 = (SoundEffect)(GHIDRA_INT(SVar6) + -1); *(undefined4 *)(local_68 * 4) = swapTmp; - } while (0 < (int)SVar6); + } while (0 < GHIDRA_INT(SVar6)); manager = g_manager; } local_68 = 0; - if ((int)pillColorsEnd >> 2 != 0) { + if (GHIDRA_INT(pillColorsEnd) >> 2 != 0) { do { if (((local_68 < 0xe) && (-1 < pillClassByColor[local_68])) && (SVar6 = (SoundEffect)0x0, pillEffectsEnd != (SoundEffect)0x0)) { do { pillEffectId = *(SoundEffect *)SVar6; - if (((int)pillEffectId < 0) || + if ((GHIDRA_INT(pillEffectId) < 0) || (pvVar4 = (manager->_itemConfig)._pillEffects._begin, - (int)(manager->_itemConfig)._pillEffects._end - (int)pvVar4 >> 2 <= (int)pillEffectId)) + GHIDRA_INT((manager->_itemConfig)._pillEffects._end) - GHIDRA_INT(pvVar4) >> 2 <= GHIDRA_INT(pillEffectId))) { iVar5 = 0; } else { - iVar5 = *(int *)((char *)pvVar4 + (int)pillEffectId * 4); + iVar5 = *(int *)((char *)pvVar4 + GHIDRA_INT(pillEffectId) * 4); } - nextEntry = (SoundEffect)((int)SVar6 + 4); + nextEntry = (SoundEffect)(GHIDRA_INT(SVar6) + 4); if (*(char *)(iVar5 + 0x4c) == pillClassByColor[local_68]) { - *(SoundEffect *)((int)this[1]._pools + *(int *)(local_68 * 4) * 4 + -4) = pillEffectId; + *(SoundEffect *)(GHIDRA_INT(this[1]._pools) + *(int *)(local_68 * 4) * 4 + -4) = pillEffectId; local_64 = nextEntry; goto LAB_0073570b; } @@ -1880,7 +1880,7 @@ LAB_0073551e: } while (nextEntry != pillEffectsEnd); } uVar2 = (this->_itemPoolRNG)._seed; - local_64 = (SoundEffect)((int)pillEffectsEnd >> 2); + local_64 = (SoundEffect)(GHIDRA_INT(pillEffectsEnd) >> 2); if (uVar2 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); uVar2 = (this->_itemPoolRNG)._seed; @@ -1897,33 +1897,33 @@ LAB_0073551e: uVar7 = 0; (this->_itemPoolRNG)._seed = uVar2; if (local_64 != (SoundEffect)0x0) { - uVar7 = uVar2 % (uint)local_64; + uVar7 = uVar2 % GHIDRA_UINT(local_64); } SVar6 = (SoundEffect)(uVar7 * 4); - *(SoundEffect *)((int)this[1]._pools + *(int *)(local_68 * 4) * 4 + -4) = + *(SoundEffect *)(GHIDRA_INT(this[1]._pools) + *(int *)(local_68 * 4) * 4 + -4) = *(SoundEffect *)SVar6; - nextEntry = (SoundEffect)((int)SVar6 + 4); + nextEntry = (SoundEffect)(GHIDRA_INT(SVar6) + 4); LAB_0073570b: - memmove((void *)SVar6,(void *)nextEntry,(int)pillEffectsEnd - (int)nextEntry); + memmove((void *)SVar6,(void *)nextEntry,GHIDRA_INT(pillEffectsEnd) - GHIDRA_INT(nextEntry)); local_68 = local_68 + 1; - pillEffectsEnd = (SoundEffect)((int)pillEffectsEnd + -4); - } while (local_68 < (uint)((int)pillColorsEnd >> 2)); + pillEffectsEnd = (SoundEffect)(GHIDRA_INT(pillEffectsEnd) + -4); + } while (local_68 < GHIDRA_UINT((GHIDRA_INT(pillColorsEnd) >> 2))); } this[1]._seed = -1; cardId = 0; - if ((int)(manager->_itemConfig)._cards._end - (int)(manager->_itemConfig)._cards._begin >> 2 != 0) + if (GHIDRA_INT((manager->_itemConfig)._cards._end) - GHIDRA_INT((manager->_itemConfig)._cards._begin) >> 2 != 0) { do { - if (((-1 < (int)cardId) && + if (((-1 < GHIDRA_INT(cardId)) && (pvVar4 = (manager->_itemConfig)._cards._begin, - (int)cardId < (int)(manager->_itemConfig)._cards._end - (int)pvVar4 >> 2)) && + GHIDRA_INT(cardId) < GHIDRA_INT((manager->_itemConfig)._cards._end) - GHIDRA_INT(pvVar4) >> 2)) && ((iVar5 = *(int *)((char *)pvVar4 + cardId * 4), iVar5 != 0 && ((-1 < *(int *)(iVar5 + 0x5c) && (*(int *)(iVar5 + 0x5c) < - ((int)(manager->_sfxManager)._sounds._end - (int)(manager->_sfxManager)._sounds._begin) + (GHIDRA_INT((manager->_sfxManager)._sounds._end) - GHIDRA_INT((manager->_sfxManager)._sounds._begin)) / 0x1b8)))))) { local_64 = (SoundEffect) - (*(int *)(iVar5 + 0x5c) * 0x1b8 + (int)(manager->_sfxManager)._sounds._begin); + (*(int *)(iVar5 + 0x5c) * 0x1b8 + GHIDRA_INT((manager->_sfxManager)._sounds._begin)); if (*(char *)((char *)local_64 + 0x198) == '\0') { KAGE_LogMessage(1,(byte *)"Preload sound %d.\n"); ((SoundEffect *)((SoundEffect *)local_64))->SoundEffect::Load(); @@ -1931,11 +1931,11 @@ LAB_0073570b: *(int *)loadedSoundCount = *(int *)loadedSoundCount + 1; manager = g_manager; } - (*(undefined1 *)((char *)(((SoundEffect *)((int)local_64 + 0x198))) + 0x1)) = 0; + (*(undefined1 *)((char *)(((SoundEffect *)(GHIDRA_INT(local_64) + 0x198))) + 0x1)) = 0; } cardId = cardId + 1; - } while (cardId < (uint)((int)(manager->_itemConfig)._cards._end - - (int)(manager->_itemConfig)._cards._begin >> 2)); + } while (cardId < GHIDRA_UINT((GHIDRA_INT((manager->_itemConfig)._cards._end) - + GHIDRA_INT((manager->_itemConfig)._cards._begin) >> 2))); } this[1]._pools[1]._rng1._shift1 = 0; this[1]._pools[1]._rng1._shift2 = 0; @@ -1984,14 +1984,14 @@ void ItemPool::shuffle_pools() void *poolData; undefined4 *swapEntry; - local_c = __security_cookie ^ (uint)auStack_9e8; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_9e8); local_18 = 0x271; ((MTRNG *)(mtRng))->MTRNG::Init((this->_itemPoolRNG)._seed); pool = this->_pools; poolsRemaining = 0x1f; do { poolList = &pool->_poolList; - remaining = ((int)poolList->_end - (int)poolList->_begin) / 0x18; + remaining = (GHIDRA_INT(poolList->_end) - GHIDRA_INT(poolList->_begin)) / 0x18; if ((1 < remaining) && (lastIndex = remaining - 1, lastIndex != 0)) { lastOffset = lastIndex * 0x18; do { @@ -1999,27 +1999,27 @@ void ItemPool::shuffle_pools() swapIndex = 0; if ((remaining == 0) || (swapIndex = randomValue % remaining, lastIndex != swapIndex)) { poolData = poolList->_begin; - swapEntry = (undefined4 *)((int)poolData + swapIndex * 0x18); + swapEntry = (undefined4 *)(GHIDRA_INT(poolData) + swapIndex * 0x18); uVar2 = swapEntry[1]; uVar3 = swapEntry[2]; uVar4 = swapEntry[3]; - lastEntry = (undefined4 *)((int)poolData + lastOffset); + lastEntry = (undefined4 *)(GHIDRA_INT(poolData) + lastOffset); uVar5 = *lastEntry; uVar6 = lastEntry[1]; uVar7 = lastEntry[2]; uVar8 = lastEntry[3]; uVar1 = *(undefined8 *)((char *)poolData + lastOffset + 0x10); - lastEntry = (undefined4 *)((int)poolData + lastOffset); + lastEntry = (undefined4 *)(GHIDRA_INT(poolData) + lastOffset); *lastEntry = *swapEntry; lastEntry[1] = uVar2; lastEntry[2] = uVar3; lastEntry[3] = uVar4; - swapEntry = (undefined4 *)((int)poolData + swapIndex * 0x18 + 0x10); + swapEntry = (undefined4 *)(GHIDRA_INT(poolData) + swapIndex * 0x18 + 0x10); uVar2 = swapEntry[1]; - lastEntry = (undefined4 *)((int)poolData + lastOffset + 0x10); + lastEntry = (undefined4 *)(GHIDRA_INT(poolData) + lastOffset + 0x10); *lastEntry = *swapEntry; lastEntry[1] = uVar2; - swapEntry = (undefined4 *)((int)poolData + swapIndex * 0x18); + swapEntry = (undefined4 *)(GHIDRA_INT(poolData) + swapIndex * 0x18); *swapEntry = uVar5; swapEntry[1] = uVar6; swapEntry[2] = uVar7; @@ -2107,7 +2107,7 @@ void ItemPool::load_pools(byte *xmlpath, byte ismod) local_14 = (byte *****)0xffffffff; puStack_18 = &LAB_00afd721; local_1c = ExceptionList; - uVar6 = __security_cookie ^ (uint)(tmpName + 0xb); + uVar6 = __security_cookie ^ GHIDRA_UINT((tmpName + 0xb)); ExceptionList = &local_1c; pbStack_100b8 = xmlpath; itemPool = this; @@ -2183,7 +2183,7 @@ void ItemPool::load_pools(byte *xmlpath, byte ismod) *(void **)((char *)poolNameMap + 4) = poolNameMap; *(void **)((char *)poolNameMap + 8) = poolNameMap; *(undefined2 *)((char *)poolNameMap + 0xc) = 0x101; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; uVar6 = 0; do { pbVar13 = (&PTR_s_treasure_00b1f3d0)[uVar6]; @@ -2195,13 +2195,13 @@ void ItemPool::load_pools(byte *xmlpath, byte ismod) bVar5 = *pbVar12; pbVar12 = pbVar12 + 1; } while (bVar5 != 0); - ((std::string *)((char *)tmpName))->std::string::assign(pbVar13,(int)pbVar12 - (int)(pbVar13 + 1)); + ((std::string *)((char *)tmpName))->std::string::assign(pbVar13,GHIDRA_INT(pbVar12) - GHIDRA_INT((pbVar13 + 1))); ppppppbVar10 = (byte ******)tmpName; - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; ppppppbVar19 = (byte ******)0x735cfb; puVar9 = (uint *)FUN_0069d630(ppppppbVar10); bVar5 = (byte)ppppppbVar10; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; *puVar9 = uVar6; if (0xf < tmpNameCapacity) { uVar7 = tmpNameCapacity + 1; @@ -2209,7 +2209,7 @@ void ItemPool::load_pools(byte *xmlpath, byte ismod) if (0xfff < uVar7) { ppppppbVar19 = (byte ******)tmpName[0][-1]; uVar7 = tmpNameCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)tmpName[0] + (-4 - (int)ppppppbVar19))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(tmpName[0]) + (-4 - GHIDRA_INT(ppppppbVar19)))) goto LAB_00735d8b; } operator_delete(ppppppbVar19,uVar7); @@ -2218,7 +2218,7 @@ void ItemPool::load_pools(byte *xmlpath, byte ismod) uVar6 = uVar6 + 1; } while (uVar6 < 0x1f); for (pbStack_100b8 = - ((xml_node *)(ppppppbStack_100a8))->xml_node::first_node(&DAT_00b6a1dc,(int)ppppppbVar19,bVar5); + ((xml_node *)(ppppppbStack_100a8))->xml_node::first_node(&DAT_00b6a1dc,GHIDRA_INT(ppppppbVar19),bVar5); pbStack_100b8 != (byte *)0x0; pbStack_100b8 = *(byte **)(pbStack_100b8 + 0x2c)) { pcVar15 = "Name"; do { @@ -2237,9 +2237,9 @@ void ItemPool::load_pools(byte *xmlpath, byte ismod) ppppppbVar10 = (byte ******)poolAttr[2]; } if (ppppppbVar10 == ppppppbStack_100a8) { - pbVar12 = (byte *)((int)ppppppbVar10 + (int)pbVar13); + pbVar12 = (byte *)(GHIDRA_INT(ppppppbVar10) + GHIDRA_INT(pbVar13)); if (pbVar12 <= pbVar13) goto LAB_00735dcd; - iVar17 = (int)&DAT_00b1b350 - (int)pbVar13; + iVar17 = GHIDRA_INT(&DAT_00b1b350) - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar17]) { pbVar13 = pbVar13 + 1; if (pbVar12 <= pbVar13) goto LAB_00735dcd; @@ -2261,13 +2261,13 @@ LAB_00735dcd: bVar5 = *pbVar12; pbVar12 = pbVar12 + 1; } while (bVar5 != 0); - ((std::string *)((char *)poolName))->std::string::assign(pbVar13,(int)pbVar12 - (int)(pbVar13 + 1)); - local_14 = (byte *****)CONCAT31(local_14._1_3_,3); + ((std::string *)((char *)poolName))->std::string::assign(pbVar13,GHIDRA_INT(pbVar12) - GHIDRA_INT((pbVar13 + 1))); + local_14 = (byte *****)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),3); std::map::_Find_lower_bound(poolLookup,poolName); pvVar1 = poolNameNode; ppppppbStack_100a8 = poolName[0]; if (*(char *)((char *)poolNameNode + 0xd) == '\0') { - pbVar13 = (byte *)((int)poolNameNode + 0x10); + pbVar13 = (byte *)(GHIDRA_INT(poolNameNode) + 0x10); if (0xf < *(uint *)((char *)poolNameNode + 0x24)) { pbVar13 = *(byte **)pbVar13; } @@ -2295,9 +2295,9 @@ LAB_00735dcd: pcVar15 = (char *)itemNode[2]; } if (pcVar15 == pcVar16 + -0xb677ff) { - pbVar12 = (byte *)(pcVar15 + (int)pbVar13); + pbVar12 = (byte *)(pcVar15 + GHIDRA_INT(pbVar13)); if (pbVar12 <= pbVar13) goto LAB_00735f03; - iVar17 = (int)&DAT_00b67800 - (int)pbVar13; + iVar17 = GHIDRA_INT(&DAT_00b67800) - GHIDRA_INT(pbVar13); while (*pbVar13 == pbVar13[iVar17]) { pbVar13 = pbVar13 + 1; if (pbVar12 <= pbVar13) goto LAB_00735f03; @@ -2336,14 +2336,14 @@ LAB_00735f03: isLess = bVar5 < *pbVar13; if (bVar5 != *pbVar13) { LAB_00735f71: - uVar6 = -(uint)isLess | 1; + uVar6 = -GHIDRA_UINT(isLess) | 1; goto LAB_00735f76; } if (bVar5 == 0) break; bVar5 = *(byte *)((char *)pppppbVar11 + 1); isLess = bVar5 < pbVar13[1]; if (bVar5 != pbVar13[1]) goto LAB_00735f71; - pppppbVar11 = (byte *****)((int)pppppbVar11 + 2); + pppppbVar11 = (byte *****)(GHIDRA_INT(pppppbVar11) + 2); pbVar13 = pbVar13 + 2; } while (bVar5 != 0); uVar6 = 0; @@ -2366,14 +2366,14 @@ LAB_00735f76: isLess = bVar5 < (byte)*pcVar15; if (bVar5 != *pcVar15) { LAB_00735fd0: - uVar6 = -(uint)isLess | 1; + uVar6 = -GHIDRA_UINT(isLess) | 1; goto LAB_00735fd5; } if (bVar5 == 0) break; bVar5 = *(byte *)((char *)pppppbVar11 + 1); isLess = bVar5 < (byte)pcVar15[1]; if (bVar5 != pcVar15[1]) goto LAB_00735fd0; - pppppbVar11 = (byte *****)((int)pppppbVar11 + 2); + pppppbVar11 = (byte *****)(GHIDRA_INT(pppppbVar11) + 2); pcVar15 = pcVar15 + 2; } while (bVar5 != 0); uVar6 = 0; @@ -2399,7 +2399,7 @@ LAB_00735fd5: isLess = bVar5 < (byte)*pcVar15; if (bVar5 != *pcVar15) { LAB_00736040: - uVar6 = -(uint)isLess | 1; + uVar6 = -GHIDRA_UINT(isLess) | 1; goto LAB_00736045; } if (bVar5 == 0) break; @@ -2407,7 +2407,7 @@ LAB_00736040: isLess = bVar5 < (byte)pcVar15[1]; if (bVar5 != pcVar15[1]) goto LAB_00736040; pcVar15 = pcVar15 + 2; - pppppbVar11 = (byte *****)((int)pppppbVar11 + 2); + pppppbVar11 = (byte *****)(GHIDRA_INT(pppppbVar11) + 2); } while (bVar5 != 0); uVar6 = 0; LAB_00736045: @@ -2431,7 +2431,7 @@ LAB_00736045: isLess = bVar5 < (byte)*pcVar15; if (bVar5 != *pcVar15) { LAB_007360a0: - uVar6 = -(uint)isLess | 1; + uVar6 = -GHIDRA_UINT(isLess) | 1; goto LAB_007360a5; } if (bVar5 == 0) break; @@ -2439,7 +2439,7 @@ LAB_007360a0: isLess = bVar5 < (byte)pcVar15[1]; if (bVar5 != pcVar15[1]) goto LAB_007360a0; pcVar15 = pcVar15 + 2; - pppppbVar11 = (byte *****)((int)pppppbVar11 + 2); + pppppbVar11 = (byte *****)(GHIDRA_INT(pppppbVar11) + 2); } while (bVar5 != 0); uVar6 = 0; LAB_007360a5: @@ -2463,7 +2463,7 @@ LAB_007360a5: isLess = bVar5 < *pbVar13; if (bVar5 != *pbVar13) { LAB_00736100: - piStack_100b0 = (int *)(-(uint)isLess | 1); + piStack_100b0 = (int *)(-GHIDRA_UINT(isLess) | 1); goto LAB_00736105; } if (bVar5 == 0) break; @@ -2471,7 +2471,7 @@ LAB_00736100: isLess = bVar5 < pbVar13[1]; if (bVar5 != pbVar13[1]) goto LAB_00736100; pbVar13 = pbVar13 + 2; - pppppbVar11 = (byte *****)((int)pppppbVar11 + 2); + pppppbVar11 = (byte *****)(GHIDRA_INT(pppppbVar11) + 2); } while (bVar5 != 0); piStack_100b0 = (int *)0x0; LAB_00736105: @@ -2480,13 +2480,13 @@ LAB_00736105: ppiStack_100e4 = ppiStack_100e8; piStack_100ac = piStack_100b0; piStack_100b0 = operator_new(0x2c); - *piStack_100b0 = (int)piStack_100b0; - piStack_100b0[1] = (int)piStack_100b0; - piStack_100b0[2] = (int)piStack_100b0; + *piStack_100b0 = GHIDRA_INT(piStack_100b0); + piStack_100b0[1] = GHIDRA_INT(piStack_100b0); + piStack_100b0[2] = GHIDRA_INT(piStack_100b0); *(undefined2 *)(piStack_100b0 + 3) = 0x101; - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; iVar17 = FUN_00738040(*(undefined4 *) - ((int)(manager->_itemConfig)._collectibleNameMap. + (GHIDRA_INT((manager->_itemConfig)._collectibleNameMap). _head + 4),piStack_100b0,poolOffset); piStack_100b0[1] = iVar17; piStack_100ac = (int *)(manager->_itemConfig)._collectibleNameMap._size; @@ -2499,7 +2499,7 @@ LAB_00736105: piVar8 = piVar4; piVar4 = (int *)*piVar4; } - *piStack_100b0 = (int)piVar8; + *piStack_100b0 = GHIDRA_INT(piVar8); iVar17 = *(int *)(piStack_100b0[1] + 8); isNil = *(char *)(iVar17 + 0xd); iVar3 = piStack_100b0[1]; @@ -2511,11 +2511,11 @@ LAB_00736105: piStack_100b0[2] = iVar3; } else { - *piStack_100b0 = (int)piStack_100b0; - piStack_100b0[2] = (int)piStack_100b0; + *piStack_100b0 = GHIDRA_INT(piStack_100b0); + piStack_100b0[2] = GHIDRA_INT(piStack_100b0); } ppiStack_100e4 = (int **)0x0; - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; tmpName[0] = (byte ******)0x0; pppppbVar14 = (byte *****)&g_xmlNullStr; if (ppppppbVar10[1] != (byte *****)0x0) { @@ -2526,16 +2526,16 @@ LAB_00736105: pppppbVar11 = pppppbVar14; do { bVar5 = *(byte *)pppppbVar11; - pppppbVar11 = (byte *****)((int)pppppbVar11 + 1); + pppppbVar11 = (byte *****)(GHIDRA_INT(pppppbVar11) + 1); } while (bVar5 != 0); ((std::string *)((char *)tmpName))->std::string::assign((byte *)pppppbVar14, - (int)pppppbVar11 - (int)((int)pppppbVar14 + 1)); + GHIDRA_INT(pppppbVar11) - GHIDRA_INT((GHIDRA_INT(pppppbVar14) + 1))); std::map::_Find_lower_bound(itemNameLookup,tmpName); ppppppbVar10 = tmpName[0]; piVar8 = itemNameNode; if (*(char *)((char *)itemNameNode + 0xd) == '\0') { pbVar13 = (byte *)(itemNameNode + 4); - if (0xf < (uint)itemNameNode[9]) { + if (0xf < GHIDRA_UINT(itemNameNode[9])) { pbVar13 = *(byte **)pbVar13; } ppppppbVar19 = (byte ******)tmpName; @@ -2555,12 +2555,12 @@ LAB_00736105: ppppppbVar19 = (byte ******)ppppppbVar10[-1]; uVar6 = tmpNameCapacity + 0x24; if ((byte *)0x1f < - (byte *)((int)ppppppbVar10 + (-4 - (int)ppppppbVar19))) + (byte *)(GHIDRA_INT(ppppppbVar10) + (-4 - GHIDRA_INT(ppppppbVar19)))) goto LAB_00735d8b; } operator_delete(ppppppbVar19,uVar6); } - local_14 = (byte *****)CONCAT31(local_14._1_3_,3); + local_14 = (byte *****)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),3); FUN_004235c0(&piStack_100b0,piStack_100b0[1]); operator_delete(piStack_100b0,0x2c); ppppppbVar10 = ppppppbStack_100a8; @@ -2577,7 +2577,7 @@ LAB_00736105: piVar8 = piStack_100b0; } if (g_game == (Game *)0x0) { - if (-1 < (int)itemId) goto LAB_00736343; + if (-1 < GHIDRA_INT(itemId)) goto LAB_00736343; LAB_00736382: iVar17 = 0; LAB_00736384: @@ -2587,11 +2587,11 @@ LAB_00736388: if (*(char *)(iVar17 + 0xb0) == '\0') goto LAB_00736398; } else { - if ((int)itemId < 0) { - if (((int)itemId < 0) && + if (GHIDRA_INT(itemId) < 0) { + if ((GHIDRA_INT(itemId) < 0) && (pvVar1 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)~itemId < - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar1 >> 2) + GHIDRA_INT(~itemId) < + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar1) >> 2) ) { iVar17 = **(int **)((char *)pvVar1 + ~itemId * 4); } @@ -2602,8 +2602,8 @@ LAB_00736388: else { LAB_00736343: pvVar1 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar1 >> 2 <= - (int)itemId) goto LAB_00736382; + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar1) >> 2 <= + GHIDRA_INT(itemId)) goto LAB_00736382; iVar17 = *(int *)((char *)pvVar1 + itemId * 4); } if (iVar17 != 0) { @@ -2621,35 +2621,35 @@ LAB_00736398: } poolOwner = itemPool; iVar17 = poolOffset; - puVar9 = *(uint **)((int)&itemPool->_pools[0]._poolList._end + poolOffset); - if (puVar9 == *(uint **)((int)&itemPool->_pools[0]._poolList._capacity + poolOffset)) + puVar9 = *(uint **)(GHIDRA_INT(&itemPool->_pools[0]._poolList._end) + poolOffset); + if (puVar9 == *(uint **)(GHIDRA_INT(&itemPool->_pools[0]._poolList._capacity) + poolOffset)) { std::vector<24byte>::_Emplace_reallocate(puVar9,&itemId); } else { *puVar9 = itemId; - puVar9[1] = (uint)weight; - puVar9[2] = (uint)initialWeight; - puVar9[3] = (uint)decreaseBy; + puVar9[1] = GHIDRA_UINT(weight); + puVar9[2] = GHIDRA_UINT(initialWeight); + puVar9[3] = GHIDRA_UINT(decreaseBy); *(ulonglong *)(puVar9 + 4) = CONCAT26(uStack_100c6,CONCAT15(uStack_100c7,CONCAT14(isUnlocked,removeOn))); - piVar8 = (int *)((int)&itemPool->_pools[0]._poolList._end + poolOffset); + piVar8 = (int *)(GHIDRA_INT(&itemPool->_pools[0]._poolList._end) + poolOffset); *piVar8 = *piVar8 + 0x18; } itemNode = (undefined4 *)itemNode[0xb]; - *(float *)((int)&poolOwner->_pools[0]._totalWeight + iVar17) = - initialWeight + *(float *)((int)&poolOwner->_pools[0]._totalWeight + iVar17); + *(float *)(GHIDRA_INT(&poolOwner->_pools[0]._totalWeight) + iVar17) = + initialWeight + *(float *)(GHIDRA_INT(&poolOwner->_pools[0]._totalWeight) + iVar17); } while (itemNode != (undefined4 *)0x0); ppppppbVar19 = poolName[0]; } - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (poolNameCapacity < 0x10) goto LAB_0073649d; uVar6 = poolNameCapacity + 1; ppppppbVar10 = ppppppbVar19; if (0xfff < uVar6) { ppppppbVar10 = (byte ******)ppppppbVar19[-1]; uVar6 = poolNameCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)ppppppbVar19 + (-4 - (int)ppppppbVar10))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(ppppppbVar19) + (-4 - GHIDRA_INT(ppppppbVar10)))) { LAB_00735d8b: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -2659,18 +2659,18 @@ LAB_00735d8b: else { LAB_0073644b: KAGE_LogMessage(1,(byte *)"Pool %s not found, please recheck config or item pool list"); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (poolNameCapacity < 0x10) goto LAB_0073649d; uVar6 = poolNameCapacity + 1; ppppppbVar10 = poolName[0]; if (0xfff < uVar6) { ppppppbVar10 = (byte ******)poolName[0][-1]; uVar6 = poolNameCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)poolName[0] + (-4 - (int)ppppppbVar10))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(poolName[0]) + (-4 - GHIDRA_INT(ppppppbVar10)))) goto LAB_00735d8b; } } - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; operator_delete(ppppppbVar10,uVar6); } LAB_0073649d: @@ -2715,20 +2715,20 @@ void ItemPool::RestoreGameState(GameStateItemPool *itemPoolState) poolList = &pool->_poolList; poolListBegin = poolList->_begin; bitIndex = 0; - iVar3 = (int)poolList->_end - (int)poolListBegin; + iVar3 = GHIDRA_INT(poolList->_end) - GHIDRA_INT(poolListBegin); iVar4 = iVar3 >> 0x1f; if (iVar3 / 0x18 + iVar4 != iVar4) { iVar4 = 0; do { pvVar1 = poolWeightsSrc->_poolsItemWeights[0]._begin; - if ((uint)((int)poolWeightsSrc->_poolsItemWeights[0]._end - (int)pvVar1 >> 2) <= bitIndex) + if (GHIDRA_UINT((GHIDRA_INT(poolWeightsSrc->_poolsItemWeights[0]._end) - GHIDRA_INT(pvVar1) >> 2)) <= bitIndex) break; iVar3 = bitIndex * 4; bitIndex = bitIndex + 1; *(undefined4 *)((char *)poolListBegin + iVar4 + 8) = *(undefined4 *)((char *)pvVar1 + iVar3); iVar4 = iVar4 + 0x18; poolListBegin = poolList->_begin; - } while (bitIndex < (uint)(((int)poolList->_end - (int)poolListBegin) / 0x18)); + } while (bitIndex < GHIDRA_UINT(((GHIDRA_INT(poolList->_end) - GHIDRA_INT(poolListBegin)) / 0x18))); } poolWeightsSrc = (GameStateItemPool *)(poolWeightsSrc->_poolsItemWeights + 1); iVar4 = *bibleUpgradeSrc; @@ -2759,28 +2759,28 @@ void ItemPool::RestoreGameState(GameStateItemPool *itemPoolState) do { wordIndex = local_14 >> 5; bitIndex = local_14 & 0x1f; - bitIndex = *(uint *)((int)(this->_removedCollectibles)._begin + wordIndex * 4); - if ((*(uint *)((int)(itemPoolState->_removedCollectibles)._begin + wordIndex * 4) & + bitIndex = *(uint *)(GHIDRA_INT((this->_removedCollectibles)._begin) + wordIndex * 4); + if ((*(uint *)(GHIDRA_INT((itemPoolState->_removedCollectibles)._begin) + wordIndex * 4) & 1 << (sbyte)bitIndex) == 0) { bitIndex = bitIndex & ~(1 << bitIndex); } else { bitIndex = bitIndex | 1 << bitIndex; } - *(uint *)((int)(this->_removedCollectibles)._begin + wordIndex * 4) = bitIndex; + *(uint *)(GHIDRA_INT((this->_removedCollectibles)._begin) + wordIndex * 4) = bitIndex; local_14 = local_14 + 1; } while (local_14 < uVar2); } bitIndex = (itemPoolState->_trinketPoolItems)._size; - uVar2 = (int)(this->_trinketPoolItems)._end - (int)(this->_trinketPoolItems)._begin >> 3; + uVar2 = GHIDRA_INT((this->_trinketPoolItems)._end) - GHIDRA_INT((this->_trinketPoolItems)._begin) >> 3; if (uVar2 < bitIndex) { bitIndex = uVar2; } uVar2 = 0; if (bitIndex != 0) { do { - *(bool *)((int)(this->_trinketPoolItems)._begin + uVar2 * 8 + 4) = - (*(uint *)((int)(itemPoolState->_trinketPoolItems)._begin + (uVar2 >> 5) * 4) & + *(bool *)(GHIDRA_INT((this->_trinketPoolItems)._begin) + uVar2 * 8 + 4) = + (*(uint *)(GHIDRA_INT((itemPoolState->_trinketPoolItems)._begin) + (uVar2 >> 5) * 4) & 1 << ((byte)uVar2 & 0x1f)) != 0; uVar2 = uVar2 + 1; } while (uVar2 < bitIndex); @@ -2788,14 +2788,14 @@ void ItemPool::RestoreGameState(GameStateItemPool *itemPoolState) this->_numAvailableTrinkets = 0; bitIndex = 0; pvVar1 = (this->_trinketPoolItems)._begin; - if ((int)(this->_trinketPoolItems)._end - (int)pvVar1 >> 3 != 0) { + if (GHIDRA_INT((this->_trinketPoolItems)._end) - GHIDRA_INT(pvVar1) >> 3 != 0) { do { if ((*(char *)((char *)pvVar1 + bitIndex * 8 + 4) != '\0') && (*(char *)((char *)pvVar1 + bitIndex * 8 + 5) != '\0')) { this->_numAvailableTrinkets = this->_numAvailableTrinkets + 1; } bitIndex = bitIndex + 1; - } while (bitIndex < (uint)((int)(this->_trinketPoolItems)._end - (int)pvVar1 >> 3)); + } while (bitIndex < GHIDRA_UINT((GHIDRA_INT((this->_trinketPoolItems)._end) - GHIDRA_INT(pvVar1) >> 3))); } bitIndex = 0; pillEffectDst = this + 1; @@ -2805,7 +2805,7 @@ void ItemPool::RestoreGameState(GameStateItemPool *itemPoolState) piVar5 = piVar5 + 1; pillEffectDst->_seed = iVar4; pillEffectDst = (ItemPool *)pillEffectDst->_pools; - *(byte *)((int)&this[1]._pools[1]._poolList._begin + bitIndex) = + *(byte *)(GHIDRA_INT(&this[1]._pools[1]._poolList._begin) + bitIndex) = itemPoolState->_identifiedPillEffects[bitIndex]; bitIndex = bitIndex + 1; } while (bitIndex < 0xf); @@ -2816,7 +2816,7 @@ void ItemPool::RestoreGameState(GameStateItemPool *itemPoolState) remainingGenesis = *genesisSrc; genesisSrc = genesisSrc + 1; *(short *)piVar5 = remainingGenesis; - piVar5 = (int *)((int)piVar5 + 2); + piVar5 = (int *)(GHIDRA_INT(piVar5) + 2); iVar4 = iVar4 + -1; } while (iVar4 != 0); return; @@ -2855,26 +2855,26 @@ void ItemPool::StoreGameState(GameStateItemPool *itemPoolState) do { poolList = &pool->_poolList; _Dst = *weightsEnd; - uVar6 = ((int)poolList->_end - (int)poolList->_begin) / 0x18; + uVar6 = (GHIDRA_INT(poolList->_end) - GHIDRA_INT(poolList->_begin)) / 0x18; pvVar1 = ((std_vector *)(weightsEnd + -1))->_begin; - uVar2 = (int)_Dst - (int)pvVar1 >> 2; + uVar2 = GHIDRA_INT(_Dst) - GHIDRA_INT(pvVar1) >> 2; if (uVar6 < uVar2) { - pvVar1 = (void *)((int)pvVar1 + uVar6 * 4); + pvVar1 = (void *)(GHIDRA_INT(pvVar1) + uVar6 * 4); LAB_0073686a: *weightsEnd = pvVar1; } else if (uVar2 < uVar6) { - if (uVar6 <= (uint)((int)weightsEnd[1] - (int)pvVar1 >> 2)) { + if (uVar6 <= GHIDRA_UINT((GHIDRA_INT(weightsEnd[1]) - GHIDRA_INT(pvVar1) >> 2))) { _Size = (uVar6 - uVar2) * 4; memset(_Dst,0,_Size); - pvVar1 = (void *)((int)_Dst + _Size); + pvVar1 = (void *)(GHIDRA_INT(_Dst) + _Size); goto LAB_0073686a; } std::vector<4byte>::_Resize_reallocate(uVar6,uVar2); } pvVar1 = poolList->_begin; itemIdx = 0; - iVar3 = (int)poolList->_end - (int)pvVar1; + iVar3 = GHIDRA_INT(poolList->_end) - GHIDRA_INT(pvVar1); iVar5 = iVar3 >> 0x1f; if (iVar3 / 0x18 + iVar5 != iVar5) { weightOut = ((std_vector *)(weightsEnd + -1))->_begin; @@ -2884,7 +2884,7 @@ LAB_0073686a: *weightOut = *(undefined4 *)((char *)pvVar1 + iVar5 + 8); weightOut = weightOut + 1; iVar5 = iVar5 + 0x18; - } while (itemIdx < (uint)(((int)poolList->_end - (int)poolList->_begin) / 0x18)); + } while (itemIdx < GHIDRA_UINT(((GHIDRA_INT(poolList->_end) - GHIDRA_INT(poolList->_begin)) / 0x18))); } weightsEnd = weightsEnd + 3; pool = (ItemPool_Item *)(poolList + 4); @@ -2907,7 +2907,7 @@ LAB_0073686a: wordIdx = local_18 >> 5; uVar2 = local_18 & 0x1f; uVar6 = *(uint *)((char *)pvVar1 + wordIdx * 4); - if ((*(uint *)((int)(this->_removedCollectibles)._begin + wordIdx * 4) & 1 << (sbyte)uVar2 + if ((*(uint *)(GHIDRA_INT((this->_removedCollectibles)._begin) + wordIdx * 4) & 1 << (sbyte)uVar2 ) == 0) { uVar6 = uVar6 & ~(1 << uVar2); } @@ -2920,11 +2920,11 @@ LAB_0073686a: } trinketBits = &itemPoolState->_trinketPoolItems; vector_bool_resize(trinketBits, - (int)(this->_trinketPoolItems)._end - (int)(this->_trinketPoolItems)._begin + GHIDRA_INT((this->_trinketPoolItems)._end) - GHIDRA_INT((this->_trinketPoolItems)._begin) >> 3,(byte)trinketBits); uVar6 = 0; pvVar1 = (this->_trinketPoolItems)._begin; - if ((int)(this->_trinketPoolItems)._end - (int)pvVar1 >> 3 != 0) { + if (GHIDRA_INT((this->_trinketPoolItems)._end) - GHIDRA_INT(pvVar1) >> 3 != 0) { do { wordIdx = uVar6 >> 5; uVar2 = *(uint *)((char *)trinketBits->_begin + wordIdx * 4); @@ -2937,7 +2937,7 @@ LAB_0073686a: uVar6 = uVar6 + 1; *(uint *)((char *)trinketBits->_begin + wordIdx * 4) = uVar2; pvVar1 = (this->_trinketPoolItems)._begin; - } while (uVar6 < (uint)((int)(this->_trinketPoolItems)._end - (int)pvVar1 >> 3)); + } while (uVar6 < GHIDRA_UINT((GHIDRA_INT((this->_trinketPoolItems)._end) - GHIDRA_INT(pvVar1) >> 3))); } pillCursor = this + 1; uVar6 = 0; @@ -2948,7 +2948,7 @@ LAB_0073686a: *piVar4 = *pillEffectSrc; piVar4 = piVar4 + 1; itemPoolState->_identifiedPillEffects[uVar6] = - *(byte *)((int)&this[1]._pools[1]._poolList._begin + uVar6); + *(byte *)(GHIDRA_INT(&this[1]._pools[1]._poolList._begin) + uVar6); uVar6 = uVar6 + 1; } while (uVar6 < 0xf); genesisItemOut = itemPoolState->_remainingGenesisItems; @@ -2956,7 +2956,7 @@ LAB_0073686a: iVar5 = 0x1f; do { iVar3 = *piVar4; - piVar4 = (int *)((int)piVar4 + 2); + piVar4 = (int *)(GHIDRA_INT(piVar4) + 2); *genesisItemOut = (short)iVar3; genesisItemOut = genesisItemOut + 1; iVar5 = iVar5 + -1; @@ -2975,35 +2975,35 @@ void ItemPool::ResetTrinkets() trinketId = 0; pvVar1 = (this->_trinketPoolItems)._begin; - if ((int)(this->_trinketPoolItems)._end - (int)pvVar1 >> 3 != 0) { + if (GHIDRA_INT((this->_trinketPoolItems)._end) - GHIDRA_INT(pvVar1) >> 3 != 0) { do { *(undefined1 *)((char *)pvVar1 + trinketId * 8 + 4) = 0; - *(undefined1 *)((int)(this->_trinketPoolItems)._begin + trinketId * 8 + 5) = 0; - *(uint *)((int)(this->_trinketPoolItems)._begin + trinketId * 8) = trinketId; + *(undefined1 *)(GHIDRA_INT((this->_trinketPoolItems)._begin) + trinketId * 8 + 5) = 0; + *(uint *)(GHIDRA_INT((this->_trinketPoolItems)._begin) + trinketId * 8) = trinketId; pvVar1 = (g_manager->_itemConfig)._trinkets._begin; - if (((((int)(trinketId & 0x7fff) < - (int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar1 >> 2) && + if ((((GHIDRA_INT((trinketId & 0x7fff)) < + GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar1) >> 2) && (pvVar1 = *(void **)((char *)pvVar1 + (trinketId & 0x7fff) * 4), pvVar1 != (void *)0x0)) && (*(int *)((char *)pvVar1 + 4) != 0x91)) && ((*(int *)((char *)pvVar1 + 4) != 0x7a || (g_game->_challenge != 0x29)))) { - *(undefined1 *)((int)(this->_trinketPoolItems)._begin + trinketId * 8 + 4) = 1; + *(undefined1 *)(GHIDRA_INT((this->_trinketPoolItems)._begin) + trinketId * 8 + 4) = 1; isAvailable = ((Item *)(pvVar1))->Item::IsAvailable(0xffffffff); - *(byte *)((int)(this->_trinketPoolItems)._begin + trinketId * 8 + 5) = isAvailable; + *(byte *)(GHIDRA_INT((this->_trinketPoolItems)._begin) + trinketId * 8 + 5) = isAvailable; } trinketId = trinketId + 1; pvVar1 = (this->_trinketPoolItems)._begin; - } while (trinketId < (uint)((int)(this->_trinketPoolItems)._end - (int)pvVar1 >> 3)); + } while (trinketId < GHIDRA_UINT((GHIDRA_INT((this->_trinketPoolItems)._end) - GHIDRA_INT(pvVar1) >> 3))); } this->_numAvailableTrinkets = 0; trinketId = 0; - if ((int)(this->_trinketPoolItems)._end - (int)pvVar1 >> 3 != 0) { + if (GHIDRA_INT((this->_trinketPoolItems)._end) - GHIDRA_INT(pvVar1) >> 3 != 0) { do { if ((*(char *)((char *)pvVar1 + trinketId * 8 + 4) != '\0') && (*(char *)((char *)pvVar1 + trinketId * 8 + 5) != '\0')) { this->_numAvailableTrinkets = this->_numAvailableTrinkets + 1; } trinketId = trinketId + 1; - } while (trinketId < (uint)((int)(this->_trinketPoolItems)._end - (int)pvVar1 >> 3)); + } while (trinketId < GHIDRA_UINT((GHIDRA_INT((this->_trinketPoolItems)._end) - GHIDRA_INT(pvVar1) >> 3))); if (0 < this->_numAvailableTrinkets) { return; } @@ -3076,19 +3076,19 @@ int ItemPool::on_pill_used(int pillColor, uint seed, uint *rngState) local_8 = 0xffffffff; puStack_c = &LAB_00afd76d; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; - *(undefined1 *)((int)&this[1]._pools[1]._poolList._begin + (pillColor & 0x7ffU)) = 0; + *(undefined1 *)(GHIDRA_INT(&this[1]._pools[1]._poolList._begin) + (pillColor & 0x7ffU)) = 0; local_1c = 0; usedEffectBits = (void *)0x0; - newEffect = (int)(g_manager->_itemConfig)._pillEffects._end - - (int)(g_manager->_itemConfig)._pillEffects._begin >> 2; + newEffect = GHIDRA_INT((g_manager->_itemConfig)._pillEffects._end) - + GHIDRA_INT((g_manager->_itemConfig)._pillEffects._begin) >> 2; usedEffectBitsEnd = (void *)0x0; uVar3 = newEffect + 0x1fU >> 5; itemPool = this; if (uVar3 != 0) { usedEffectBits = std::_Allocate(uVar3 * 4); - usedEffectBitsEnd = (void *)(uVar3 * 4 + (int)usedEffectBits); + usedEffectBitsEnd = (void *)(uVar3 * 4 + GHIDRA_INT(usedEffectBits)); FUN_0041d1b0(usedEffectBits,uVar3,&local_1c); } local_8 = 0; @@ -3097,7 +3097,7 @@ int ItemPool::on_pill_used(int pillColor, uint seed, uint *rngState) pIVar5 = itemPool + 1; do { pIVar5 = (ItemPool *)pIVar5->_pools; - puVar6 = (uint *)((int)usedEffectBits + ((uint)((ItemPool_Item *)pIVar5)->_totalWeight >> 5) * 4 + puVar6 = (uint *)(GHIDRA_INT(usedEffectBits) + (GHIDRA_UINT(((ItemPool_Item *)pIVar5)->_totalWeight) >> 5) * 4 ); *puVar6 = *puVar6 | 1 << (SUB41(((ItemPool_Item *)pIVar5)->_totalWeight,0) & 0x1f); newEffect = newEffect + -1; @@ -3108,11 +3108,11 @@ int ItemPool::on_pill_used(int pillColor, uint seed, uint *rngState) local_8 = 2; pillEffects = &(g_manager->_itemConfig)._pillEffects; local_1c = 0; - if ((int)(g_manager->_itemConfig)._pillEffects._end - (int)pillEffects->_begin >> 2 != 0) { + if (GHIDRA_INT((g_manager->_itemConfig)._pillEffects._end) - GHIDRA_INT(pillEffects->_begin) >> 2 != 0) { game = g_game; do { - if (((int)local_1c < 0) || - ((int)pillEffects->_end - (int)pillEffects->_begin >> 2 <= (int)local_1c)) { + if ((GHIDRA_INT(local_1c) < 0) || + (GHIDRA_INT(pillEffects->_end) - GHIDRA_INT(pillEffects->_begin) >> 2 <= GHIDRA_INT(local_1c))) { puVar4 = (uint *)0x0; } else { @@ -3123,7 +3123,7 @@ int ItemPool::on_pill_used(int pillColor, uint seed, uint *rngState) if (*(int *)&game->_deathmatchManager < 2) { LAB_00736dd7: uVar3 = puVar4[1]; - if ((((int)uVar3 < 0) || + if (((GHIDRA_INT(uVar3) < 0) || ((uVar3 < 0x282 && (((uVar3 == 0 || ((g_manager->_persistentGameData)._achievements[uVar3] != 0)) || (((g_manager->_state == 2 && (game != (Game *)0x0)) && @@ -3163,7 +3163,7 @@ LAB_00736e6c: local_1c = local_1c + 1; pillEffects = &(g_manager->_itemConfig)._pillEffects; } while (local_1c < - (uint)((int)(g_manager->_itemConfig)._pillEffects._end - (int)pillEffects->_begin >> 2) + GHIDRA_UINT((GHIDRA_INT((g_manager->_itemConfig)._pillEffects._end) - GHIDRA_INT(pillEffects->_begin) >> 2)) ); } if (seed == 0) { @@ -3174,21 +3174,21 @@ LAB_00736e6c: } uVar2 = seed >> 1 ^ seed; uVar2 = uVar2 << 9 ^ uVar2; - if ((int)puVar6 >> 2 == 0) { + if (GHIDRA_INT(puVar6) >> 2 == 0) { uVar2 = 0; } else { - uVar2 = (uVar2 >> 0x1d ^ uVar2) % (uint)((int)puVar6 >> 2); + uVar2 = (uVar2 >> 0x1d ^ uVar2) % GHIDRA_UINT((GHIDRA_INT(puVar6) >> 2)); } newEffect = *(int *)(uVar2 * 4); - *(int *)((int)itemPool[1]._pools + (pillColor & 0x7ffU) * 4 + -4) = newEffect; + *(int *)(GHIDRA_INT(itemPool[1]._pools) + (pillColor & 0x7ffU) * 4 + -4) = newEffect; if (usedEffectBits != (void *)0x0) { - uVar2 = (int)usedEffectBitsEnd - (int)usedEffectBits & 0xfffffffc; + uVar2 = GHIDRA_INT(usedEffectBitsEnd) - GHIDRA_INT(usedEffectBits) & 0xfffffffc; ptr = usedEffectBits; if (0xfff < uVar2) { ptr = *(void **)((char *)usedEffectBits + -4); uVar2 = uVar2 + 0x23; - if (0x1f < (uint)((int)usedEffectBits + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(usedEffectBits) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -3209,7 +3209,7 @@ void ItemPool::ResetRoomBlacklist() itemId = 0; if ((this->_roomBlacklistedCollectibles)._size != 0) { do { - blacklistWord = (uint *)((int)(this->_roomBlacklistedCollectibles)._begin + (itemId >> 5) * 4) + blacklistWord = (uint *)(GHIDRA_INT((this->_roomBlacklistedCollectibles)._begin) + (itemId >> 5) * 4) ; bit = itemId & 0x1f; itemId = itemId + 1; @@ -3229,7 +3229,7 @@ void ItemPool::AddBibleUpgrade(int Add, int PoolType) PoolType = 0; } if (PoolType < 0x1f) { - if ((uint)PoolType < 0x1f) { + if (GHIDRA_UINT(PoolType) < 0x1f) { bibleUpgrade = &this->_pools[PoolType]._bibleUpgrade; *bibleUpgrade = *bibleUpgrade + Add; return; @@ -3285,13 +3285,13 @@ int ItemPool::get_chaos_pool(RNG *rng) local_8 = 0; uVar6 = 0x10; do { - uVar5 = (int)outcomesEnd - (int)WVar4 >> 3; + uVar5 = GHIDRA_INT(outcomesEnd) - GHIDRA_INT(WVar4) >> 3; uVar2 = 0; - uVar7 = (uint)(pool->_totalWeight * 100.0); + uVar7 = GHIDRA_UINT((pool->_totalWeight * 100.0)); if (uVar5 != 0) { do { if (*(uint *)((char *)WVar4 + uVar2 * 8) == uVar6) { - outcomeWeight = (int *)((int)WVar4 + 4 + uVar2 * 8); + outcomeWeight = (int *)(GHIDRA_INT(WVar4) + 4 + uVar2 * 8); *outcomeWeight = *outcomeWeight + uVar7; if (*outcomeWeight < 0) { *(undefined4 *)((char *)WVar4 + 4 + uVar2 * 8) = 0; @@ -3301,7 +3301,7 @@ int ItemPool::get_chaos_pool(RNG *rng) uVar2 = uVar2 + 1; } while (uVar2 < uVar5); } - if (0 < (int)uVar7) { + if (0 < GHIDRA_INT(uVar7)) { newOutcomeId = uVar6; newOutcomeWeight = uVar7; if (outcomesEnd == pickerCapacity) { @@ -3343,11 +3343,11 @@ LAB_007372c9: ExceptionList = local_10; return uVar6; } - uVar2 = (int)pickerCapacity - (int)picker & 0xfffffff8; + uVar2 = GHIDRA_INT(pickerCapacity) - GHIDRA_INT(picker) & 0xfffffff8; WVar4 = picker; if (uVar2 < 0x1000) goto LAB_0073721f; WVar4 = *(WeightedOutcomePicker *)((char *)picker + -4); - iVar3 = (int)picker - (int)WVar4; + iVar3 = GHIDRA_INT(picker) - GHIDRA_INT(WVar4); } else { WVar4 = (WeightedOutcomePicker)0x0; @@ -3359,13 +3359,13 @@ LAB_007372c9: local_8 = 1; uVar6 = 0; do { - uVar7 = (int)outcomesEnd - (int)WVar4 >> 3; + uVar7 = GHIDRA_INT(outcomesEnd) - GHIDRA_INT(WVar4) >> 3; uVar2 = 0; - uVar5 = (uint)(pool->_totalWeight * 100.0); + uVar5 = GHIDRA_UINT((pool->_totalWeight * 100.0)); if (uVar7 != 0) { do { if (*(uint *)((char *)WVar4 + uVar2 * 8) == uVar6) { - outcomeWeight = (int *)((int)WVar4 + 4 + uVar2 * 8); + outcomeWeight = (int *)(GHIDRA_INT(WVar4) + 4 + uVar2 * 8); *outcomeWeight = *outcomeWeight + uVar5; if (*outcomeWeight < 0) { *(undefined4 *)((char *)WVar4 + 4 + uVar2 * 8) = 0; @@ -3375,7 +3375,7 @@ LAB_007372c9: uVar2 = uVar2 + 1; } while (uVar2 < uVar7); } - if (0 < (int)uVar5) { + if (0 < GHIDRA_INT(uVar5)) { newOutcomeId = uVar6; newOutcomeWeight = uVar5; if (outcomesEnd == pickerCapacity) { @@ -3397,13 +3397,13 @@ LAB_007370f1: uVar6 = 0x17; pool = itemPool->_pools + 0x17; do { - uVar7 = (int)outcomesEnd - (int)WVar4 >> 3; + uVar7 = GHIDRA_INT(outcomesEnd) - GHIDRA_INT(WVar4) >> 3; uVar2 = 0; - uVar5 = (uint)(pool->_totalWeight * 100.0); + uVar5 = GHIDRA_UINT((pool->_totalWeight * 100.0)); if (uVar7 != 0) { do { if (*(uint *)((char *)WVar4 + uVar2 * 8) == uVar6) { - outcomeWeight = (int *)((int)WVar4 + 4 + uVar2 * 8); + outcomeWeight = (int *)(GHIDRA_INT(WVar4) + 4 + uVar2 * 8); *outcomeWeight = *outcomeWeight + uVar5; if (*outcomeWeight < 0) { *(undefined4 *)((char *)WVar4 + 4 + uVar2 * 8) = 0; @@ -3413,7 +3413,7 @@ LAB_007370f1: uVar2 = uVar2 + 1; } while (uVar2 < uVar7); } - if (0 < (int)uVar5) { + if (0 < GHIDRA_INT(uVar5)) { newOutcomeId = uVar6; newOutcomeWeight = uVar5; if (outcomesEnd == pickerCapacity) { @@ -3455,11 +3455,11 @@ LAB_00737181: ExceptionList = local_10; return uVar6; } - uVar2 = (int)pickerCapacity - (int)picker & 0xfffffff8; + uVar2 = GHIDRA_INT(pickerCapacity) - GHIDRA_INT(picker) & 0xfffffff8; WVar4 = picker; if (uVar2 < 0x1000) goto LAB_0073721f; WVar4 = *(WeightedOutcomePicker *)((char *)picker + -4); - iVar3 = (int)picker - (int)WVar4; + iVar3 = GHIDRA_INT(picker) - GHIDRA_INT(WVar4); } uVar2 = uVar2 + 0x23; if (0x1f < iVar3 - 4U) { @@ -3515,11 +3515,11 @@ int ItemPool::GetCardImpl(code *param_1) newOutcome = 0; std::vector<8byte>::_Emplace_reallocate(0,&newOutcome); uVar3 = 0; - outcomeCount = (int)outcomesEnd - (int)poolPicker >> 3; + outcomeCount = GHIDRA_INT(outcomesEnd) - GHIDRA_INT(poolPicker) >> 3; if (outcomeCount != 0) { do { if (*(int *)((char *)poolPicker + uVar3 * 8) == 1) { - weight = (int *)((int)poolPicker + 4 + uVar3 * 8); + weight = (int *)(GHIDRA_INT(poolPicker) + 4 + uVar3 * 8); *weight = *weight + 0x1e; if (*weight < 0) { *(undefined4 *)((char *)poolPicker + 4 + uVar3 * 8) = 0; @@ -3541,11 +3541,11 @@ int ItemPool::GetCardImpl(code *param_1) } LAB_007377d7: uVar3 = 0; - outcomeCount = (int)outcomesEnd - (int)poolPicker >> 3; + outcomeCount = GHIDRA_INT(outcomesEnd) - GHIDRA_INT(poolPicker) >> 3; if (outcomeCount != 0) { do { if (*(int *)((char *)poolPicker + uVar3 * 8) == 2) { - weight = (int *)((int)poolPicker + 4 + uVar3 * 8); + weight = (int *)(GHIDRA_INT(poolPicker) + 4 + uVar3 * 8); *weight = *weight + 0x1e; if (*weight < 0) { *(undefined4 *)((char *)poolPicker + 4 + uVar3 * 8) = 0; @@ -3567,11 +3567,11 @@ LAB_007377d7: } LAB_0073783b: uVar3 = 0; - outcomeCount = (int)outcomesEnd - (int)poolPicker >> 3; + outcomeCount = GHIDRA_INT(outcomesEnd) - GHIDRA_INT(poolPicker) >> 3; if (outcomeCount != 0) { do { if (*(int *)((char *)poolPicker + uVar3 * 8) == 3) { - weight = (int *)((int)poolPicker + 4 + uVar3 * 8); + weight = (int *)(GHIDRA_INT(poolPicker) + 4 + uVar3 * 8); *weight = *weight + 10; if (*weight < 0) { *(undefined4 *)((char *)poolPicker + 4 + uVar3 * 8) = 0; @@ -3593,11 +3593,11 @@ LAB_0073783b: } LAB_0073789f: uVar3 = 0; - outcomeCount = (int)outcomesEnd - (int)poolPicker >> 3; + outcomeCount = GHIDRA_INT(outcomesEnd) - GHIDRA_INT(poolPicker) >> 3; if (outcomeCount != 0) { do { if (*(int *)((char *)poolPicker + uVar3 * 8) == 4) { - weight = (int *)((int)poolPicker + 4 + uVar3 * 8); + weight = (int *)(GHIDRA_INT(poolPicker) + 4 + uVar3 * 8); *weight = *weight + 10; if (*weight < 0) { *(undefined4 *)((char *)poolPicker + 4 + uVar3 * 8) = 0; @@ -3619,11 +3619,11 @@ LAB_0073789f: } LAB_00737907: uVar3 = 0; - outcomeCount = (int)outcomesEnd - (int)poolPicker >> 3; + outcomeCount = GHIDRA_INT(outcomesEnd) - GHIDRA_INT(poolPicker) >> 3; if (outcomeCount != 0) { do { if (*(int *)((char *)poolPicker + uVar3 * 8) == 5) { - weight = (int *)((int)poolPicker + 4 + uVar3 * 8); + weight = (int *)(GHIDRA_INT(poolPicker) + 4 + uVar3 * 8); *weight = *weight + 2; if (*weight < 0) { *(undefined4 *)((char *)poolPicker + 4 + uVar3 * 8) = 0; @@ -3650,7 +3650,7 @@ LAB_00737965: iVar2 = (*pcVar1)(); return iVar2; } - uVar3 = (uint)param_1 >> 4 ^ (uint)param_1; + uVar3 = GHIDRA_UINT(param_1) >> 4 ^ GHIDRA_UINT(param_1); uVar3 = uVar3 << 5 ^ uVar3; uVar3 = uVar3 >> 0xf ^ uVar3; rng._shift1 = 5; @@ -3667,7 +3667,7 @@ LAB_00737965: else { *filterSlot = FUN_00737af0; filtersEnd = &(manager->_itemConfig)._availabilityFilters._end; - *filtersEnd = (void *)((int)*filtersEnd + 4); + *filtersEnd = (void *)(GHIDRA_INT(*filtersEnd) + 4); } if (uVar3 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -3691,14 +3691,14 @@ LAB_00737965: iVar2 = GetCollectible(&g_game->_itemPool,0,uVar3 >> ((byte)seedShift & 0x1f) ^ uVar3,9,0x26,0); } filtersEnd = &(g_manager->_itemConfig)._availabilityFilters._end; - *filtersEnd = (void *)((int)*filtersEnd + -4); + *filtersEnd = (void *)(GHIDRA_INT(*filtersEnd) + -4); if (poolPicker != (WeightedOutcomePicker)0x0) { - uVar3 = (int)outcomesCapacity - (int)poolPicker & 0xfffffff8; + uVar3 = GHIDRA_INT(outcomesCapacity) - GHIDRA_INT(poolPicker) & 0xfffffff8; ptr = poolPicker; if (0xfff < uVar3) { ptr = *(WeightedOutcomePicker *)((char *)poolPicker + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)poolPicker - (int)ptr) - 4U) { + if (0x1f < (GHIDRA_INT(poolPicker) - GHIDRA_INT(ptr)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -3743,7 +3743,7 @@ int ItemPool::get_pool_from_room_entities(uint seed, RoomDescriptor *roomDesc, i entityConfig = &g_manager->_entityConfig; bossId = iVar4 + 4 + spawnOffset; do { - entryCount = (uint)*(byte *)(bossId + 4); + entryCount = GHIDRA_UINT(*(byte *)(bossId + 4)); bestEntry = -1; iVar5 = 0; bestWeight = 0.0; @@ -3789,8 +3789,8 @@ int ItemPool::get_pool_from_room_entities(uint seed, RoomDescriptor *roomDesc, i bestWeight = fVar8; } iVar5 = iVar5 + 4; - } while (iVar5 < (int)(entryCount - 3)); - for (; iVar5 < (int)entryCount; iVar5 = iVar5 + 1) { + } while (iVar5 < GHIDRA_INT((entryCount - 3))); + for (; iVar5 < GHIDRA_INT(entryCount); iVar5 = iVar5 + 1) { LAB_007ebf30: fVar9 = *(float *)(entries + 8 + iVar5 * 0xc); if (bestWeight < fVar9) { @@ -3802,8 +3802,8 @@ LAB_007ebf30: iVar5 = *(int *)(spawnOffset + 4 + iVar4); entityEntry = EntityConfig::GetEntity (entityConfig,*(int *)(iVar5 + bestEntry * 0xc), - (uint)*(ushort *)(iVar5 + 4 + bestEntry * 0xc), - (uint)*(ushort *)(iVar5 + 6 + bestEntry * 0xc)); + GHIDRA_UINT(*(ushort *)(iVar5 + 4 + bestEntry * 0xc)), + GHIDRA_UINT(*(ushort *)(iVar5 + 6 + bestEntry * 0xc))); if ((entityEntry != (EntityConfig_Entity *)0x0) && (iVar5 = entityEntry->bossID, iVar5 != 0) ) goto LAB_007ebfab; spawnOffset = spawnOffset + -0x10; @@ -3823,7 +3823,7 @@ LAB_007ebfab: (roomDesc->GridIndex != g_game->_greedModeTreasureRoomIdx)) { roomType = 5; } - else if (((uint)roomDesc->Flags >> 0xb & 1) != 0) { + else if ((GHIDRA_UINT(roomDesc->Flags) >> 0xb & 1) != 0) { roomType = 0xe; } } @@ -3852,10 +3852,10 @@ int ItemPool::GetSeededCollectible(uint seed, byte isNoDecrease, RoomDescriptor iVar1 = get_pool_from_room_entities(seed,roomDesc,0); if (iVar1 == -1) { - iVar1 = GetCollectible(&g_game->_itemPool,0,seed,(uint)isNoDecrease,0,0); + iVar1 = GetCollectible(&g_game->_itemPool,0,seed,GHIDRA_UINT(isNoDecrease),0,0); return iVar1; } - iVar1 = GetCollectible(&g_game->_itemPool,iVar1,seed,(uint)isNoDecrease,0,0); + iVar1 = GetCollectible(&g_game->_itemPool,iVar1,seed,GHIDRA_UINT(isNoDecrease),0,0); return iVar1; } @@ -3865,12 +3865,12 @@ byte ItemPool::IsPillIdentified(uint pillColor) uint pillIndex; uint pillColorId; - pillColorId = -(uint)((pillColor & 0x7ff) != 0) & pillColor & 0x7ff; + pillColorId = -GHIDRA_UINT(((pillColor & 0x7ff) != 0)) & pillColor & 0x7ff; pillIndex = 0xe; if (pillColorId < 0xe) { pillIndex = pillColorId; } - return *(byte *)((int)&this[1]._pools[1]._poolList._begin + pillIndex); + return *(byte *)(GHIDRA_INT(&this[1]._pools[1]._poolList._begin) + pillIndex); } // 009dcc70 @@ -3981,9 +3981,9 @@ int ItemPool::CreateGlitchedCollectible(ProceduralItemManager *manager, uint see ehState = 0xffffffff; puStack_18 = &LAB_00b0f6d5; prevExceptionList = ExceptionList; - stackCookie = __security_cookie ^ (uint)(local_3c + 0x2c); + stackCookie = __security_cookie ^ GHIDRA_UINT((local_3c + 0x2c)); ExceptionList = &prevExceptionList; - uVar22 = (int)(manager->_proceduralItems)._end - (int)(manager->_proceduralItems)._begin >> 2; + uVar22 = GHIDRA_INT((manager->_proceduralItems)._end) - GHIDRA_INT((manager->_proceduralItems)._begin) >> 2; procManager = manager; if (0x3ff < uVar22) { rng._seed = seed; @@ -3993,7 +3993,7 @@ int ItemPool::CreateGlitchedCollectible(ProceduralItemManager *manager, uint see puStack_20 = local_3c + 0x38; uVar22 = ((RNG *)(&rng))->RNG::RandomInt(uVar22); ExceptionList = prevExceptionList; - return *(int *)(**(int **)((int)(manager->_proceduralItems)._begin + uVar22 * 4) + 4); + return *(int *)(**(int **)(GHIDRA_INT((manager->_proceduralItems)._begin) + uVar22 * 4) + 4); } local_208 = &DAT_0000004f; std::set::find_node(); @@ -4012,15 +4012,15 @@ int ItemPool::CreateGlitchedCollectible(ProceduralItemManager *manager, uint see 0x41); ((std::string *)((pIVar8->name)._buf))->std::string::assign((byte *)"G FUEL!",7); ((std::string *)((pIVar8->desc)._buf))->std::string::assign(&s_empty,0); - uVar2 = *(undefined4 *)((int)&pIVar8->tags + 4); - *(uint *)&pIVar8->tags = (uint)pIVar8->tags | 0x8000; + uVar2 = *(undefined4 *)(GHIDRA_INT(&pIVar8->tags) + 4); + *(uint *)&pIVar8->tags = GHIDRA_UINT(pIVar8->tags) | 0x8000; pIVar8->cacheFlags = pIVar8->cacheFlags | 0xffff; - *(undefined4 *)((int)&pIVar8->tags + 4) = uVar2; + *(undefined4 *)(GHIDRA_INT(&pIVar8->tags) + 4) = uVar2; managerLocal = g_manager; pIVar8->type = 1; pIVar8->addCostumeOnPickup = 1; pvVar15 = (managerLocal->_itemConfig)._nullItems._begin; - if ((int)(managerLocal->_itemConfig)._nullItems._end - (int)pvVar15 >> 2 < 0x1e) { + if (GHIDRA_INT((managerLocal->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar15) >> 2 < 0x1e) { iVar9 = 0; } else { @@ -4044,7 +4044,7 @@ int ItemPool::CreateGlitchedCollectible(ProceduralItemManager *manager, uint see else { *imageRef = glitchGfx; ppvVar1 = &(procManager->_proceduralItems)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 4); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 4); } pfVar24 = local_204; pvVar15 = (procManager->_proceduralItems)._end; @@ -4061,7 +4061,7 @@ int ItemPool::CreateGlitchedCollectible(ProceduralItemManager *manager, uint see } pvVar3 = (procManager->_proceduralItems)._begin; local_204[2] = (float)seed; - local_204[1] = (float)(((int)pvVar15 - (int)pvVar3 >> 2) + -1); + local_204[1] = (float)((GHIDRA_INT(pvVar15) - GHIDRA_INT(pvVar3) >> 2) + -1); glitchGfx = local_204; VStack_214.y = (float)operator_new(0xe8); if ((ItemConfig_Item *)VStack_214.y == (ItemConfig_Item *)0x0) { @@ -4074,8 +4074,8 @@ int ItemPool::CreateGlitchedCollectible(ProceduralItemManager *manager, uint see item->type = 1; rng._shift1 = 4; rng._shift2 = 3; - item->id = -((int)(procManager->_proceduralItems)._end - - (int)(procManager->_proceduralItems)._begin >> 2); + item->id = -(GHIDRA_INT((procManager->_proceduralItems)._end) - + GHIDRA_INT((procManager->_proceduralItems)._begin) >> 2); local_20c = (ItemConfig_Item *)0x1b; rng._shift3 = 0x1b; itemNameCapacity = 0xf; @@ -4084,8 +4084,8 @@ int ItemPool::CreateGlitchedCollectible(ProceduralItemManager *manager, uint see itemDescCapacity = 0xf; itemDescSize = 0; itemDesc[0] = (byte *******)0x0; - ehState._0_1_ = 1; - ehState._1_3_ = 0; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; + (*(undefined1 *)((char *)&(ehState) + 0x1)) = 0; local_254.y = (float)itemDesc; local_254.x = (float)itemName; VStack_228.y = 0.0; @@ -4122,7 +4122,7 @@ int ItemPool::CreateGlitchedCollectible(ProceduralItemManager *manager, uint see uVar10 = uVar10 >> (bVar16 & 0x1f) ^ uVar10; uVar10 = uVar10 << (bVar17 & 0x1f) ^ uVar10; uVar10 = uVar10 >> (bVar18 & 0x1f) ^ uVar10; - glyphsLeft = (undefined1 *)(uVar22 & 7) + (int)local_204 + 4U + (uVar10 & 7); + glyphsLeft = (undefined1 *)(uVar22 & 7) + GHIDRA_INT(local_204) + 4U + (uVar10 & 7); if (uVar10 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar5 = (code *)swi(3); @@ -4144,8 +4144,8 @@ int ItemPool::CreateGlitchedCollectible(ProceduralItemManager *manager, uint see uVar10 = uVar10 >> (bVar18 & 0x1f) ^ uVar10; glyphsLeft = glyphsLeft + uVar10 % 0x28; } - uVar22 = (int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2; + uVar22 = GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2; if (uVar10 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar5 = (code *)swi(3); @@ -4159,28 +4159,28 @@ int ItemPool::CreateGlitchedCollectible(ProceduralItemManager *manager, uint see local_238 = (ItemConfig *)0x0; } else { - local_238 = (ItemConfig *)((uint)local_204 % uVar22); + local_238 = (ItemConfig *)(GHIDRA_UINT(local_204) % uVar22); } if (g_game == (Game *)0x0) { - if (-1 < (int)local_238) goto LAB_009dd205; + if (-1 < GHIDRA_INT(local_238)) goto LAB_009dd205; LAB_009dd227: local_208 = (g_manager->_itemConfig)._collectibles._begin; - uVar22 = (int)(g_manager->_itemConfig)._collectibles._end - (int)local_208 >> 2; + uVar22 = GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(local_208) >> 2; LAB_009dd240: do { - local_238 = (ItemConfig *)((uint)((int)&(local_238->_collectibles)._begin + 1U) % uVar22); + local_238 = (ItemConfig *)(GHIDRA_UINT((GHIDRA_INT(&(local_238->_collectibles)._begin) + 1U)) % uVar22); if (g_game == (Game *)0x0) { - if ((int)local_238 < 0) goto LAB_009dd240; + if (GHIDRA_INT(local_238) < 0) goto LAB_009dd240; LAB_009dd28d: - if ((int)uVar22 <= (int)local_238) goto LAB_009dd240; - local_230 = *(ItemConfig_Item **)(local_208 + (int)local_238 * 4); + if (GHIDRA_INT(uVar22) <= GHIDRA_INT(local_238)) goto LAB_009dd240; + local_230 = *(ItemConfig_Item **)(local_208 + GHIDRA_INT(local_238) * 4); } else { - if (-1 < (int)local_238) goto LAB_009dd28d; - iVar9 = -1 - (int)local_238; + if (-1 < GHIDRA_INT(local_238)) goto LAB_009dd28d; + iVar9 = -1 - GHIDRA_INT(local_238); if ((iVar9 < 0) || (pvVar15 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar15 >> 2 <= + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar15) >> 2 <= iVar9)) { local_230 = (ItemConfig_Item *)0x0; } @@ -4191,12 +4191,12 @@ LAB_009dd28d: } while (local_230 == (ItemConfig_Item *)0x0); } else { - if ((int)local_238 < 0) { - if (((int)local_238 < 0) && + if (GHIDRA_INT(local_238) < 0) { + if ((GHIDRA_INT(local_238) < 0) && (pvVar15 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)~(uint)local_238 < - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar15 >> 2)) { - local_230 = (ItemConfig_Item *)**(undefined4 **)((char *)pvVar15 + ~(uint)local_238 * 4); + GHIDRA_INT(~GHIDRA_UINT(local_238)) < + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar15) >> 2)) { + local_230 = (ItemConfig_Item *)**(undefined4 **)((char *)pvVar15 + ~GHIDRA_UINT(local_238) * 4); } else { local_230 = (ItemConfig_Item *)0x0; @@ -4205,23 +4205,23 @@ LAB_009dd28d: else { LAB_009dd205: pvVar15 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar15 >> 2 <= (int)local_238) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar15) >> 2 <= GHIDRA_INT(local_238)) goto LAB_009dd227; - local_230 = *(ItemConfig_Item **)((char *)pvVar15 + (int)local_238 * 4); + local_230 = *(ItemConfig_Item **)((char *)pvVar15 + GHIDRA_INT(local_238) * 4); } if (local_230 == (ItemConfig_Item *)0x0) goto LAB_009dd227; } - auStack_1a4._20_4_ = 0.0; + (*(undefined4 *)((char *)&(auStack_1a4) + 0x14)) = 0.0; fStack_17c = 2.10195e-44; local_180 = 1; uStack_17e = 0; - this = (byte ******)itemName[(int)&((ItemConfig_Item *)((int)VStack_228.y + -0xcc))->chargeType] + this = (byte ******)itemName[GHIDRA_INT(&((ItemConfig_Item *)(GHIDRA_INT(VStack_228.y) + -0xcc))->chargeType)] ; - auStack_1a4._20_4_ = (byte *****)0x1; + (*(undefined4 *)((char *)&(auStack_1a4) + 0x14)) = (byte *****)0x1; textString = this; if (this != (byte ******)(auStack_1a4 + 0x14)) { ((std::string *)((char *)this))->std::string::_Tidy_deallocate(); - *this = (byte *****)auStack_1a4._20_4_; + *this = (*(undefined4 *)((char *)&((byte *****)auStack_1a4) + 0x14)); this[1] = pppppbStack_18c; this[2] = pppppbStack_188; this[3] = pppppbStack_184; @@ -4229,14 +4229,14 @@ LAB_009dd205: } local_180 = 0; uStack_17e = 0; - auStack_1a4._20_4_ = auStack_1a4._20_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(auStack_1a4) + 0x14)) = (*(undefined4 *)((char *)&(auStack_1a4) + 0x14)) & 0xffffff00; if (local_204 == (float *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar5 = (code *)swi(3); iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)local_204 >> ((byte)rng._shift1 & 0x1f) ^ (uint)local_204; + uVar22 = GHIDRA_UINT(local_204) >> ((byte)rng._shift1 & 0x1f) ^ GHIDRA_UINT(local_204); uVar22 = uVar22 << ((byte)rng._shift2 & 0x1f) ^ uVar22; pIVar8 = (ItemConfig_Item *)(uVar22 >> ((byte)local_20c & 0x1f) ^ uVar22); if (pIVar8 == (ItemConfig_Item *)0x0) { @@ -4245,36 +4245,36 @@ LAB_009dd205: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)pIVar8 >> ((byte)rng._shift1 & 0x1f) ^ (uint)pIVar8; + uVar22 = GHIDRA_UINT(pIVar8) >> ((byte)rng._shift1 & 0x1f) ^ GHIDRA_UINT(pIVar8); local_58 = pIVar8; uVar22 = uVar22 << ((byte)rng._shift2 & 0x1f) ^ uVar22; uStack_54 = 0x150000000b; iVar9 = 0; VStack_214.y = (float)(uVar22 >> ((byte)local_20c & 0x1f) ^ uVar22); - rng._seed = (int)VStack_214.y; - VStack_240.y = (float)((uint)VStack_214.y & 0x3f); - pIStack_64 = (ItemConfig_Item *)((uint)VStack_214.y & 0x3f); + rng._seed = GHIDRA_INT(VStack_214.y); + VStack_240.y = (float)(GHIDRA_UINT(VStack_214.y) & 0x3f); + pIStack_64 = (ItemConfig_Item *)(GHIDRA_UINT(VStack_214.y) & 0x3f); ppppppbStack_5c = textString; iStack_6c = 0; local_68 = (ItemConfig_Item *)0x0; puStack_60 = glyphsLeft; local_204 = (float *)&DAT_0000000d; pfStack_4c = (float *)&DAT_0000000d; - if (0 < (int)glyphsLeft) { + if (0 < GHIDRA_INT(glyphsLeft)) { LAB_009dd400: ((ItemConfig_Item *)(local_230))->ItemConfig_Item::GetLocalizedName((std_string *)(auStack_1a4 + 0x14),0x14); - ehState._0_1_ = 2; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; ItemConfig_Item::get_localized_description(local_230,(std_string *)local_3c,unused); - ehState._0_1_ = 3; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 3; pIVar13 = local_230; - while ((local_230 = pIVar13, (int)VStack_240.y < 0x20 && (0 < (int)glyphsLeft))) { + while ((local_230 = pIVar13, GHIDRA_INT(VStack_240.y) < 0x20 && (0 < GHIDRA_INT(glyphsLeft)))) { if (pIVar8 == (ItemConfig_Item *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar5 = (code *)swi(3); iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)pIVar8 >> ((byte)uStack_54 & 0x1f) ^ (uint)pIVar8; + uVar22 = GHIDRA_UINT(pIVar8) >> ((byte)uStack_54 & 0x1f) ^ GHIDRA_UINT(pIVar8); uVar22 = uVar22 << ((byte)((ulonglong)uStack_54 >> 0x20) & 0x1f) ^ uVar22; local_218 = (ItemConfig_Item *)(uVar22 >> ((byte)local_204 & 0x1f) ^ uVar22); bVar16 = (byte)local_218; @@ -4282,7 +4282,7 @@ LAB_009dd400: if (iVar9 < 1) { if ((char)bVar16 < '\0') { bVar17 = bVar16 & 0x1f | 0xc2; - if (((uint)local_218 & 0x1e) != 0) { + if ((GHIDRA_UINT(local_218) & 0x1e) != 0) { bVar17 = bVar16 & 0x1f | 0xc0; } ((std::string *)((char *)textString))->std::string::push_back(bVar17); @@ -4293,7 +4293,7 @@ LAB_009dd400: if (bVar16 == 0) { bVar16 = 1; } - uVar22 = (uint)VStack_268.y >> 8; + uVar22 = GHIDRA_UINT(VStack_268.y) >> 8; VStack_268.y = (float)CONCAT31((int3)uVar22,bVar16); ((std::string *)((char *)textString))->std::string::push_back(bVar16); } @@ -4303,7 +4303,7 @@ LAB_009dd400: iVar9 = iVar9 + -1; iStack_6c = iVar9; } - VStack_240.y = (float)((int)(int *)VStack_240.y + 1); + VStack_240.y = (float)(GHIDRA_INT((int *)VStack_240.y) + 1); glyphsLeft = glyphsLeft + -1; pIStack_64 = (ItemConfig_Item *)VStack_240.y; puStack_60 = glyphsLeft; @@ -4311,58 +4311,58 @@ LAB_009dd400: pIVar13 = local_230; } local_68 = (ItemConfig_Item *)0x20; - if ((int)glyphsLeft < 1) { + if (GHIDRA_INT(glyphsLeft) < 1) { LAB_009dddbd: - ehState._0_1_ = 2; - if (0xf < (uint)KStack_38._unk) { + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; + if (0xf < GHIDRA_UINT(KStack_38._unk)) { uVar22 = KStack_38._unk + 1; auVar20 = local_3c; if (0xfff < uVar22) { - auVar20 = *(undefined1 (*) [4])((int)local_3c + -4); + auVar20 = *(undefined1 (*) [4])(GHIDRA_INT(local_3c) + -4); uVar22 = KStack_38._unk + 0x24; - if (0x1f < (uint)((int)local_3c + (-4 - (int)auVar20))) goto LAB_009dfb4f; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_3c) + (-4 - GHIDRA_INT(auVar20))))) goto LAB_009dfb4f; } operator_delete((void *)auVar20,uVar22); } - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; KStack_38._alpha = 0.0; KStack_38._unk = 0xf; - local_3c = (undefined1 [4])((uint)local_3c & 0xffffff00); - if ((uint)fStack_17c < 0x10) goto LAB_009dde45; - puVar19 = (undefined1 *)auStack_1a4._20_4_; + local_3c = (undefined1 [4])(GHIDRA_UINT(local_3c) & 0xffffff00); + if (GHIDRA_UINT(fStack_17c) < 0x10) goto LAB_009dde45; + puVar19 = (*(undefined4 *)((char *)&((undefined1 *)auStack_1a4) + 0x14)); goto LAB_009dde1d; } - local_208 = (undefined1 *)(uint)(ushort)pIVar13->id; + local_208 = (undefined1 *)GHIDRA_UINT((ushort)pIVar13->id); cVar7 = utf8_string_writer_write(); if (cVar7 != '\0') goto LAB_009dddbd; - local_208 = (undefined1 *)(uint)local_180; + local_208 = (undefined1 *)GHIDRA_UINT(local_180); cVar7 = utf8_string_writer_write(); - puVar19 = (undefined1 *)auStack_1a4._20_4_; + puVar19 = (*(undefined4 *)((char *)&((undefined1 *)auStack_1a4) + 0x14)); if (cVar7 != '\0') goto LAB_009dddbd; - local_208 = (undefined1 *)auStack_1a4._20_4_; + local_208 = (*(undefined4 *)((char *)&((undefined1 *)auStack_1a4) + 0x14)); cVar7 = utf8_string_writer_write(); if (cVar7 != '\0') { - ehState._0_1_ = 2; - if (0xf < (uint)KStack_38._unk) { + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; + if (0xf < GHIDRA_UINT(KStack_38._unk)) { uVar22 = KStack_38._unk + 1; auVar20 = local_3c; if (0xfff < uVar22) { - auVar20 = *(undefined1 (*) [4])((int)local_3c + -4); + auVar20 = *(undefined1 (*) [4])(GHIDRA_INT(local_3c) + -4); uVar22 = KStack_38._unk + 0x24; - if (0x1f < (uint)((int)local_3c + (-4 - (int)auVar20))) goto LAB_009dfb4f; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_3c) + (-4 - GHIDRA_INT(auVar20))))) goto LAB_009dfb4f; } operator_delete((void *)auVar20,uVar22); } - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; KStack_38._alpha = 0.0; KStack_38._unk = 0xf; - local_3c = (undefined1 [4])((uint)local_3c & 0xffffff00); - if ((uint)fStack_17c < 0x10) goto LAB_009dde45; - uVar22 = (int)fStack_17c + 1; + local_3c = (undefined1 [4])(GHIDRA_UINT(local_3c) & 0xffffff00); + if (GHIDRA_UINT(fStack_17c) < 0x10) goto LAB_009dde45; + uVar22 = GHIDRA_INT(fStack_17c) + 1; if (0xfff < uVar22) { puVar11 = *(undefined1 **)((undefined4)puVar19 + -4); - uVar22 = (int)fStack_17c + 0x24; - if ((undefined1 *)((undefined4)puVar19 + (-4 - (int)puVar11)) < (undefined1 *)0x20) + uVar22 = GHIDRA_INT(fStack_17c) + 0x24; + if ((undefined1 *)((undefined4)puVar19 + (-4 - GHIDRA_INT(puVar11))) < (undefined1 *)0x20) goto LAB_009dde3d; goto LAB_009dfb4f; } @@ -4370,192 +4370,192 @@ LAB_009dd9e2: puVar11 = puVar19; goto LAB_009dde3d; } - local_204 = (float *)((uint)KStack_38._alpha & 0xffff); + local_204 = (float *)(GHIDRA_UINT(KStack_38._alpha) & 0xffff); cVar7 = utf8_string_writer_write(); if (cVar7 != '\0') { - ehState._0_1_ = 2; - if (0xf < (uint)KStack_38._unk) { + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; + if (0xf < GHIDRA_UINT(KStack_38._unk)) { uVar22 = KStack_38._unk + 1; auVar20 = local_3c; if (0xfff < uVar22) { - auVar20 = *(undefined1 (*) [4])((int)local_3c + -4); + auVar20 = *(undefined1 (*) [4])(GHIDRA_INT(local_3c) + -4); uVar22 = KStack_38._unk + 0x24; - if (0x1f < (uint)((int)local_3c + (-4 - (int)auVar20))) goto LAB_009dfb4f; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_3c) + (-4 - GHIDRA_INT(auVar20))))) goto LAB_009dfb4f; } operator_delete((void *)auVar20,uVar22); } - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; KStack_38._alpha = 0.0; KStack_38._unk = 0xf; - local_3c = (undefined1 [4])((uint)local_3c & 0xffffff00); - if ((uint)fStack_17c < 0x10) goto LAB_009dde45; - uVar22 = (int)fStack_17c + 1; + local_3c = (undefined1 [4])(GHIDRA_UINT(local_3c) & 0xffffff00); + if (GHIDRA_UINT(fStack_17c) < 0x10) goto LAB_009dde45; + uVar22 = GHIDRA_INT(fStack_17c) + 1; if (uVar22 < 0x1000) goto LAB_009dd9e2; puVar11 = *(undefined1 **)((undefined4)puVar19 + -4); - uVar22 = (int)fStack_17c + 0x24; - if ((undefined1 *)((undefined4)puVar19 + (-4 - (int)puVar11)) < (undefined1 *)0x20) + uVar22 = GHIDRA_INT(fStack_17c) + 0x24; + if ((undefined1 *)((undefined4)puVar19 + (-4 - GHIDRA_INT(puVar11))) < (undefined1 *)0x20) goto LAB_009dde3d; goto LAB_009dfb4f; } local_22c = (void *)local_3c; cVar7 = utf8_string_writer_write(); if (cVar7 != '\0') { - ehState._0_1_ = 2; - if (0xf < (uint)KStack_38._unk) { + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; + if (0xf < GHIDRA_UINT(KStack_38._unk)) { uVar22 = KStack_38._unk + 1; pvVar15 = local_22c; if (0xfff < uVar22) { pvVar15 = *(void **)((char *)local_22c + -4); uVar22 = KStack_38._unk + 0x24; - if (0x1f < (uint)((int)local_22c + (-4 - (int)pvVar15))) goto LAB_009dfb4f; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_22c) + (-4 - GHIDRA_INT(pvVar15))))) goto LAB_009dfb4f; } operator_delete(pvVar15,uVar22); } - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; KStack_38._alpha = 0.0; KStack_38._unk = 0xf; - local_3c = (undefined1 [4])((uint)local_3c & 0xffffff00); - if ((uint)fStack_17c < 0x10) goto LAB_009dde45; - uVar22 = (int)fStack_17c + 1; + local_3c = (undefined1 [4])(GHIDRA_UINT(local_3c) & 0xffffff00); + if (GHIDRA_UINT(fStack_17c) < 0x10) goto LAB_009dde45; + uVar22 = GHIDRA_INT(fStack_17c) + 1; if (uVar22 < 0x1000) goto LAB_009dd9e2; puVar11 = *(undefined1 **)((undefined4)puVar19 + -4); - uVar22 = (int)fStack_17c + 0x24; - if ((undefined1 *)((undefined4)puVar19 + (-4 - (int)puVar11)) < (undefined1 *)0x20) + uVar22 = GHIDRA_INT(fStack_17c) + 0x24; + if ((undefined1 *)((undefined4)puVar19 + (-4 - GHIDRA_INT(puVar11))) < (undefined1 *)0x20) goto LAB_009dde3d; goto LAB_009dfb4f; } - local_204 = (float *)(uint)(ushort)pIVar13->type; + local_204 = (float *)GHIDRA_UINT((ushort)pIVar13->type); cVar7 = utf8_string_writer_write(); if (cVar7 != '\0') { - ehState._0_1_ = 2; - if (0xf < (uint)KStack_38._unk) { + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; + if (0xf < GHIDRA_UINT(KStack_38._unk)) { uVar22 = KStack_38._unk + 1; pvVar15 = local_22c; if (0xfff < uVar22) { pvVar15 = *(void **)((char *)local_22c + -4); uVar22 = KStack_38._unk + 0x24; - if (0x1f < (uint)((int)local_22c + (-4 - (int)pvVar15))) goto LAB_009dfb4f; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_22c) + (-4 - GHIDRA_INT(pvVar15))))) goto LAB_009dfb4f; } operator_delete(pvVar15,uVar22); } - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; KStack_38._alpha = 0.0; KStack_38._unk = 0xf; - local_3c = (undefined1 [4])((uint)local_3c & 0xffffff00); - if ((uint)fStack_17c < 0x10) goto LAB_009dde45; - uVar22 = (int)fStack_17c + 1; + local_3c = (undefined1 [4])(GHIDRA_UINT(local_3c) & 0xffffff00); + if (GHIDRA_UINT(fStack_17c) < 0x10) goto LAB_009dde45; + uVar22 = GHIDRA_INT(fStack_17c) + 1; if (uVar22 < 0x1000) goto LAB_009dd9e2; puVar11 = *(undefined1 **)((undefined4)puVar19 + -4); - uVar22 = (int)fStack_17c + 0x24; - if ((undefined1 *)((undefined4)puVar19 + (-4 - (int)puVar11)) < (undefined1 *)0x20) + uVar22 = GHIDRA_INT(fStack_17c) + 0x24; + if ((undefined1 *)((undefined4)puVar19 + (-4 - GHIDRA_INT(puVar11))) < (undefined1 *)0x20) goto LAB_009dde3d; goto LAB_009dfb4f; } - local_204 = (float *)(uint)(ushort)pIVar13->chargeType; + local_204 = (float *)GHIDRA_UINT((ushort)pIVar13->chargeType); cVar7 = utf8_string_writer_write(); if (cVar7 != '\0') { - ehState._0_1_ = 2; - if (0xf < (uint)KStack_38._unk) { + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; + if (0xf < GHIDRA_UINT(KStack_38._unk)) { uVar22 = KStack_38._unk + 1; pvVar15 = local_22c; if (0xfff < uVar22) { pvVar15 = *(void **)((char *)local_22c + -4); uVar22 = KStack_38._unk + 0x24; - if (0x1f < (uint)((int)local_22c + (-4 - (int)pvVar15))) goto LAB_009dfb4f; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_22c) + (-4 - GHIDRA_INT(pvVar15))))) goto LAB_009dfb4f; } operator_delete(pvVar15,uVar22); } - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; KStack_38._alpha = 0.0; KStack_38._unk = 0xf; - local_3c = (undefined1 [4])((uint)local_3c & 0xffffff00); - if ((uint)fStack_17c < 0x10) goto LAB_009dde45; - uVar22 = (int)fStack_17c + 1; + local_3c = (undefined1 [4])(GHIDRA_UINT(local_3c) & 0xffffff00); + if (GHIDRA_UINT(fStack_17c) < 0x10) goto LAB_009dde45; + uVar22 = GHIDRA_INT(fStack_17c) + 1; if (uVar22 < 0x1000) goto LAB_009dd9e2; puVar11 = *(undefined1 **)((undefined4)puVar19 + -4); - uVar22 = (int)fStack_17c + 0x24; - if ((undefined1 *)((undefined4)puVar19 + (-4 - (int)puVar11)) < (undefined1 *)0x20) + uVar22 = GHIDRA_INT(fStack_17c) + 0x24; + if ((undefined1 *)((undefined4)puVar19 + (-4 - GHIDRA_INT(puVar11))) < (undefined1 *)0x20) goto LAB_009dde3d; goto LAB_009dfb4f; } - local_204 = (float *)(uint)(ushort)pIVar13->_initCharge; + local_204 = (float *)GHIDRA_UINT((ushort)pIVar13->_initCharge); cVar7 = utf8_string_writer_write(); if (cVar7 != '\0') { - ehState._0_1_ = 2; - if (0xf < (uint)KStack_38._unk) { + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; + if (0xf < GHIDRA_UINT(KStack_38._unk)) { uVar22 = KStack_38._unk + 1; pvVar15 = local_22c; if (0xfff < uVar22) { pvVar15 = *(void **)((char *)local_22c + -4); uVar22 = KStack_38._unk + 0x24; - if (0x1f < (uint)((int)local_22c + (-4 - (int)pvVar15))) goto LAB_009dfb4f; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_22c) + (-4 - GHIDRA_INT(pvVar15))))) goto LAB_009dfb4f; } operator_delete(pvVar15,uVar22); } - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; KStack_38._alpha = 0.0; KStack_38._unk = 0xf; - local_3c = (undefined1 [4])((uint)local_3c & 0xffffff00); - if ((uint)fStack_17c < 0x10) goto LAB_009dde45; - uVar22 = (int)fStack_17c + 1; + local_3c = (undefined1 [4])(GHIDRA_UINT(local_3c) & 0xffffff00); + if (GHIDRA_UINT(fStack_17c) < 0x10) goto LAB_009dde45; + uVar22 = GHIDRA_INT(fStack_17c) + 1; if (uVar22 < 0x1000) goto LAB_009dd9e2; puVar11 = *(undefined1 **)((undefined4)puVar19 + -4); - uVar22 = (int)fStack_17c + 0x24; - if ((undefined1 *)((undefined4)puVar19 + (-4 - (int)puVar11)) < (undefined1 *)0x20) + uVar22 = GHIDRA_INT(fStack_17c) + 0x24; + if ((undefined1 *)((undefined4)puVar19 + (-4 - GHIDRA_INT(puVar11))) < (undefined1 *)0x20) goto LAB_009dde3d; goto LAB_009dfb4f; } - local_204 = (float *)(uint)(ushort)pIVar13->maxCharges; + local_204 = (float *)GHIDRA_UINT((ushort)pIVar13->maxCharges); cVar7 = utf8_string_writer_write(); if (cVar7 != '\0') { - ehState._0_1_ = 2; - if (0xf < (uint)KStack_38._unk) { + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; + if (0xf < GHIDRA_UINT(KStack_38._unk)) { uVar22 = KStack_38._unk + 1; pvVar15 = local_22c; if (0xfff < uVar22) { pvVar15 = *(void **)((char *)local_22c + -4); uVar22 = KStack_38._unk + 0x24; - if (0x1f < (uint)((int)local_22c + (-4 - (int)pvVar15))) goto LAB_009dfb4f; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_22c) + (-4 - GHIDRA_INT(pvVar15))))) goto LAB_009dfb4f; } operator_delete(pvVar15,uVar22); } - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; KStack_38._alpha = 0.0; KStack_38._unk = 0xf; - local_3c = (undefined1 [4])((uint)local_3c & 0xffffff00); - if ((uint)fStack_17c < 0x10) goto LAB_009dde45; - uVar22 = (int)fStack_17c + 1; + local_3c = (undefined1 [4])(GHIDRA_UINT(local_3c) & 0xffffff00); + if (GHIDRA_UINT(fStack_17c) < 0x10) goto LAB_009dde45; + uVar22 = GHIDRA_INT(fStack_17c) + 1; if (uVar22 < 0x1000) goto LAB_009dd9e2; puVar11 = *(undefined1 **)((undefined4)puVar19 + -4); - uVar22 = (int)fStack_17c + 0x24; - if ((undefined1 *)((undefined4)puVar19 + (-4 - (int)puVar11)) < (undefined1 *)0x20) + uVar22 = GHIDRA_INT(fStack_17c) + 0x24; + if ((undefined1 *)((undefined4)puVar19 + (-4 - GHIDRA_INT(puVar11))) < (undefined1 *)0x20) goto LAB_009dde3d; goto LAB_009dfb4f; } - local_204 = (float *)(uint)(ushort)pIVar13->maxCooldown; + local_204 = (float *)GHIDRA_UINT((ushort)pIVar13->maxCooldown); cVar7 = utf8_string_writer_write(); if (cVar7 != '\0') { - ehState._0_1_ = 2; - if (0xf < (uint)KStack_38._unk) { + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; + if (0xf < GHIDRA_UINT(KStack_38._unk)) { uVar22 = KStack_38._unk + 1; pvVar15 = local_22c; if (0xfff < uVar22) { pvVar15 = *(void **)((char *)local_22c + -4); uVar22 = KStack_38._unk + 0x24; - if (0x1f < (uint)((int)local_22c + (-4 - (int)pvVar15))) goto LAB_009dfb4f; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_22c) + (-4 - GHIDRA_INT(pvVar15))))) goto LAB_009dfb4f; } operator_delete(pvVar15,uVar22); } - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; KStack_38._alpha = 0.0; KStack_38._unk = 0xf; - local_3c = (undefined1 [4])((uint)local_3c & 0xffffff00); - if ((uint)fStack_17c < 0x10) goto LAB_009dde45; - uVar22 = (int)fStack_17c + 1; + local_3c = (undefined1 [4])(GHIDRA_UINT(local_3c) & 0xffffff00); + if (GHIDRA_UINT(fStack_17c) < 0x10) goto LAB_009dde45; + uVar22 = GHIDRA_INT(fStack_17c) + 1; if (uVar22 < 0x1000) goto LAB_009dd9e2; - uVar22 = (int)fStack_17c + 0x24; + uVar22 = GHIDRA_INT(fStack_17c) + 0x24; puVar11 = (undefined1 *) - ((undefined4)puVar19 + (-4 - (int)*(undefined1 **)((undefined4)puVar19 + -4))); + ((undefined4)puVar19 + (-4 - GHIDRA_INT(*(undefined1 **)((undefined4)puVar19 + -4)))); puVar19 = *(undefined1 **)((undefined4)puVar19 + -4); if (&DAT_0000001f < puVar11) goto LAB_009dfb4f; goto LAB_009dd9e2; @@ -4565,10 +4565,10 @@ LAB_009dd9e2: textString = ppppppbStack_5c; VStack_240.y = (float)&local_68->desc; local_218 = local_58; - if ((int)pIStack_64 < (int)&local_68->desc) { + if (GHIDRA_INT(pIStack_64) < GHIDRA_INT(&local_68->desc)) { iVar9 = iStack_6c; do { - if ((int)puStack_60 < 1) break; + if (GHIDRA_INT(puStack_60) < 1) break; glyphsLeft = puStack_60; if (local_218 == (ItemConfig_Item *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -4576,7 +4576,7 @@ LAB_009dd9e2: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)local_218 >> ((byte)uStack_54 & 0x1f) ^ (uint)local_218; + uVar22 = GHIDRA_UINT(local_218) >> ((byte)uStack_54 & 0x1f) ^ GHIDRA_UINT(local_218); uVar22 = uVar22 << ((byte)((ulonglong)uStack_54 >> 0x20) & 0x1f) ^ uVar22; local_218 = (ItemConfig_Item *)(uVar22 >> ((byte)local_204 & 0x1f) ^ uVar22); bVar16 = (byte)local_218; @@ -4584,7 +4584,7 @@ LAB_009dd9e2: if (iVar9 < 1) { if ((char)bVar16 < '\0') { bVar17 = bVar16 & 0x1f | 0xc2; - if (((uint)local_218 & 0x1e) != 0) { + if ((GHIDRA_UINT(local_218) & 0x1e) != 0) { bVar17 = bVar16 & 0x1f | 0xc0; } ((std::string *)((char *)textString))->std::string::push_back(bVar17); @@ -4595,7 +4595,7 @@ LAB_009dd9e2: if (bVar16 == 0) { bVar16 = 1; } - local_26c = (ColorMod *)CONCAT31(local_26c._1_3_,bVar16); + local_26c = (ColorMod *)CONCAT31((*(undefined1 *)((char *)&(local_26c) + 0x1)),bVar16); ((std::string *)((char *)textString))->std::string::push_back(bVar16); } } @@ -4604,96 +4604,96 @@ LAB_009dd9e2: iVar9 = iVar9 + -1; iStack_6c = iVar9; } - local_230 = (ItemConfig_Item *)((int)&local_230->type + 1); + local_230 = (ItemConfig_Item *)(GHIDRA_INT(&local_230->type) + 1); puStack_60 = glyphsLeft + -1; - } while ((int)local_230 < (int)VStack_240.y); + } while (GHIDRA_INT(local_230) < GHIDRA_INT(VStack_240.y)); } local_68 = (ItemConfig_Item *)VStack_240.y; glyphsLeft = puStack_60; - if (0 < (int)puStack_60) { + if (0 < GHIDRA_INT(puStack_60)) { local_25c = &g_manager->_itemConfig; - VStack_240.y = (float)((int)(g_manager->_itemConfig)._collectibles._end - - (int)(local_25c->_collectibles)._begin >> 2); + VStack_240.y = (float)(GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((local_25c->_collectibles)._begin) >> 2); pIVar23 = local_238; do { pIVar23 = (ItemConfig *) - ((uint)((int)&(pIVar23->_collectibles)._begin + 1U) % (uint)VStack_240.y); - local_230 = ((ItemConfig *)(local_25c))->ItemConfig::GetCollectible((int)pIVar23); + (GHIDRA_UINT((GHIDRA_INT(&(pIVar23->_collectibles)._begin) + 1U)) % GHIDRA_UINT(VStack_240.y)); + local_230 = ((ItemConfig *)(local_25c))->ItemConfig::GetCollectible(GHIDRA_INT(pIVar23)); iVar9 = iStack_6c; pIVar8 = local_218; } while (local_230 == (ItemConfig_Item *)0x0); VStack_240.y = 0.0; pIStack_64 = (ItemConfig_Item *)0x0; local_68 = (ItemConfig_Item *)0x0; - ehState._0_1_ = 2; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; local_238 = pIVar23; - if (0xf < (uint)KStack_38._unk) { + if (0xf < GHIDRA_UINT(KStack_38._unk)) { uVar22 = KStack_38._unk + 1; pvVar15 = local_22c; if (0xfff < uVar22) { pvVar15 = *(void **)((char *)local_22c + -4); uVar22 = KStack_38._unk + 0x24; - if (0x1f < (uint)((int)local_22c + (-4 - (int)pvVar15))) goto LAB_009dfb4f; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_22c) + (-4 - GHIDRA_INT(pvVar15))))) goto LAB_009dfb4f; } operator_delete(pvVar15,uVar22); } - ehState._0_1_ = 1; - if (0xf < (uint)fStack_17c) { - uVar22 = (int)fStack_17c + 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; + if (0xf < GHIDRA_UINT(fStack_17c)) { + uVar22 = GHIDRA_INT(fStack_17c) + 1; puVar19 = local_208; if (0xfff < uVar22) { puVar19 = *(undefined1 **)(local_208 + -4); - uVar22 = (int)fStack_17c + 0x24; - if ((undefined1 *)0x1f < local_208 + (-4 - (int)puVar19)) goto LAB_009dfb4f; + uVar22 = GHIDRA_INT(fStack_17c) + 0x24; + if ((undefined1 *)0x1f < local_208 + (-4 - GHIDRA_INT(puVar19))) goto LAB_009dfb4f; } operator_delete(puVar19,uVar22); } goto LAB_009dd400; } - ehState._0_1_ = 2; - if (0xf < (uint)KStack_38._unk) { + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; + if (0xf < GHIDRA_UINT(KStack_38._unk)) { uVar22 = KStack_38._unk + 1; pvVar15 = local_22c; if (0xfff < uVar22) { pvVar15 = *(void **)((char *)local_22c + -4); uVar22 = KStack_38._unk + 0x24; - if (0x1f < (uint)((int)local_22c + (-4 - (int)pvVar15))) goto LAB_009dfb4f; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_22c) + (-4 - GHIDRA_INT(pvVar15))))) goto LAB_009dfb4f; } operator_delete(pvVar15,uVar22); } - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; KStack_38._alpha = 0.0; KStack_38._unk = 0xf; - local_3c = (undefined1 [4])((uint)local_3c & 0xffffff00); - if (0xf < (uint)fStack_17c) { + local_3c = (undefined1 [4])(GHIDRA_UINT(local_3c) & 0xffffff00); + if (0xf < GHIDRA_UINT(fStack_17c)) { puVar19 = local_208; LAB_009dde1d: - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; KStack_38._unk = 0xf; KStack_38._alpha = 0.0; - uVar22 = (int)fStack_17c + 1; + uVar22 = GHIDRA_INT(fStack_17c) + 1; puVar11 = puVar19; if (0xfff < uVar22) { puVar11 = *(undefined1 **)(puVar19 + -4); - uVar22 = (int)fStack_17c + 0x24; - if ((undefined1 *)0x1f < puVar19 + (-4 - (int)puVar11)) goto LAB_009dfb4f; + uVar22 = GHIDRA_INT(fStack_17c) + 0x24; + if ((undefined1 *)0x1f < puVar19 + (-4 - GHIDRA_INT(puVar11))) goto LAB_009dfb4f; } LAB_009dde3d: - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; KStack_38._unk = 0xf; KStack_38._alpha = 0.0; operator_delete(puVar11,uVar22); } LAB_009dde45: fStack_17c = 2.10195e-44; - auStack_1a4._20_4_ = auStack_1a4._20_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(auStack_1a4) + 0x14)) = (*(undefined4 *)((char *)&(auStack_1a4) + 0x14)) & 0xffffff00; } pIVar8 = item; uStack_17e = 0; local_180 = 0; - VStack_228.y = (float)((int)(int *)VStack_228.y + 1); - seed = (uint)VStack_214.y; - } while ((uint)VStack_228.y < (ItemConfig_Item *)0x2); + VStack_228.y = (float)(GHIDRA_INT((int *)VStack_228.y) + 1); + seed = GHIDRA_UINT(VStack_214.y); + } while (GHIDRA_UINT(VStack_228.y) < (ItemConfig_Item *)0x2); if (&item->name != (std_string *)itemName) { strBuf = (byte *******)itemName; if (0xf < itemNameCapacity) { @@ -4709,7 +4709,7 @@ LAB_009dde45: ((std::string *)((pIVar8->desc)._buf))->std::string::assign((byte *)strBuf,itemDescSize); } ((RNG *)(&rng))->RNG::Next(); - switch((uint)rng._seed % 0xe) { + switch(GHIDRA_UINT(rng._seed) % 0xe) { case 0: uVar22 = ((RNG *)(&rng))->RNG::RandomInt(6); uVar10 = ((RNG *)(&rng))->RNG::RandomInt(3); @@ -4748,8 +4748,8 @@ LAB_009dde45: ((RNG *)(&rng))->RNG::Next(); managerLocal = g_manager; if ((rng._seed & 1U) == 0) { - uVar22 = ((RNG *)(&rng))->RNG::RandomInt((int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2); + uVar22 = ((RNG *)(&rng))->RNG::RandomInt(GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2); pIVar13 = ((ItemConfig *)(&managerLocal->_itemConfig))->ItemConfig::GetCollectible(uVar22); LAB_009de0b7: glitchGfx[4] = (float)pIVar13; @@ -4759,10 +4759,10 @@ LAB_009de0b7: } } else if ((rng._seed & 1U) == 1) { - uVar22 = ((RNG *)(&rng))->RNG::RandomInt((int)(g_manager->_itemConfig)._trinkets._end - - (int)(g_manager->_itemConfig)._trinkets._begin >> 2); + uVar22 = ((RNG *)(&rng))->RNG::RandomInt(GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - + GHIDRA_INT((g_manager->_itemConfig)._trinkets._begin) >> 2); pvVar15 = (managerLocal->_itemConfig)._trinkets._begin; - if ((int)(uVar22 & 0x7fff) < (int)(managerLocal->_itemConfig)._trinkets._end - (int)pvVar15 >> 2 + if (GHIDRA_INT((uVar22 & 0x7fff)) < GHIDRA_INT((managerLocal->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar15) >> 2 ) { pIVar13 = *(ItemConfig_Item **)((char *)pvVar15 + (uVar22 & 0x7fff) * 4); goto LAB_009de0b7; @@ -4771,37 +4771,37 @@ LAB_009de0b7: pfVar24 = glitchGfx; } ((RNG *)(&rng))->RNG::Next(); - if ((ItemConfig_Item *)rng._seed == (ItemConfig_Item *)(((uint)rng._seed / 0x28) * 0x28)) { + if ((ItemConfig_Item *)rng._seed == (ItemConfig_Item *)((GHIDRA_UINT(rng._seed) / 0x28) * 0x28)) { uVar22 = ((RNG *)(&rng))->RNG::RandomInt(6); pIVar8->addMaxhearts = pIVar8->addMaxhearts + uVar22; } ((RNG *)(&rng))->RNG::Next(); - if ((ItemConfig_Item *)rng._seed == (ItemConfig_Item *)(((uint)rng._seed / 0x28) * 0x28)) { + if ((ItemConfig_Item *)rng._seed == (ItemConfig_Item *)((GHIDRA_UINT(rng._seed) / 0x28) * 0x28)) { uVar22 = ((RNG *)(&rng))->RNG::RandomInt(6); pIVar8->addHearts = pIVar8->addHearts + uVar22; } ((RNG *)(&rng))->RNG::Next(); - if ((ItemConfig_Item *)rng._seed == (ItemConfig_Item *)(((uint)rng._seed / 0x28) * 0x28)) { + if ((ItemConfig_Item *)rng._seed == (ItemConfig_Item *)((GHIDRA_UINT(rng._seed) / 0x28) * 0x28)) { uVar22 = ((RNG *)(&rng))->RNG::RandomInt(6); pIVar8->addSoulHearts = pIVar8->addSoulHearts + uVar22; } ((RNG *)(&rng))->RNG::Next(); - if ((ItemConfig_Item *)rng._seed == (ItemConfig_Item *)(((uint)rng._seed / 0x28) * 0x28)) { + if ((ItemConfig_Item *)rng._seed == (ItemConfig_Item *)((GHIDRA_UINT(rng._seed) / 0x28) * 0x28)) { uVar22 = ((RNG *)(&rng))->RNG::RandomInt(6); pIVar8->addBlackHearts = pIVar8->addBlackHearts + uVar22; } ((RNG *)(&rng))->RNG::Next(); - if ((ItemConfig_Item *)rng._seed == (ItemConfig_Item *)(((uint)rng._seed / 0x28) * 0x28)) { + if ((ItemConfig_Item *)rng._seed == (ItemConfig_Item *)((GHIDRA_UINT(rng._seed) / 0x28) * 0x28)) { uVar22 = ((RNG *)(&rng))->RNG::RandomInt(6); pIVar8->addBombs = pIVar8->addBombs + uVar22; } ((RNG *)(&rng))->RNG::Next(); - if ((ItemConfig_Item *)rng._seed == (ItemConfig_Item *)(((uint)rng._seed / 0x28) * 0x28)) { + if ((ItemConfig_Item *)rng._seed == (ItemConfig_Item *)((GHIDRA_UINT(rng._seed) / 0x28) * 0x28)) { uVar22 = ((RNG *)(&rng))->RNG::RandomInt(6); pIVar8->addKeys = pIVar8->addKeys + uVar22; } ((RNG *)(&rng))->RNG::Next(); - if ((ItemConfig_Item *)rng._seed == (ItemConfig_Item *)(((uint)rng._seed / 0x28) * 0x28)) { + if ((ItemConfig_Item *)rng._seed == (ItemConfig_Item *)((GHIDRA_UINT(rng._seed) / 0x28) * 0x28)) { uVar22 = ((RNG *)(&rng))->RNG::RandomInt(6); pIVar8->addCoins = pIVar8->addCoins + uVar22; } @@ -4819,7 +4819,7 @@ LAB_009de0b7: uVar22 = ((RNG *)(&rng))->RNG::RandomInt(uVar22); if (uVar22 == 0) { uVar22 = 0; - auStack_1a4._20_4_ = (undefined1 *)0x0; + (*(undefined4 *)((char *)&(auStack_1a4) + 0x14)) = (undefined1 *)0x0; pppppbStack_18c = (byte *****)0x1; pppppbStack_188 = (byte *****)0x2; pppppbStack_184 = (byte *****)0x3; @@ -4848,12 +4848,12 @@ LAB_009de0b7: return iVar9; } bVar16 = (byte)rng._shift1; - uVar22 = (uint)rng._seed >> (bVar16 & 0x1f) ^ rng._seed; + uVar22 = GHIDRA_UINT(rng._seed) >> (bVar16 & 0x1f) ^ rng._seed; bVar17 = (byte)rng._shift2; uVar22 = uVar22 << (bVar17 & 0x1f) ^ uVar22; bVar18 = (byte)rng._shift3; local_218 = (ItemConfig_Item *)(uVar22 >> (bVar18 & 0x1f) ^ uVar22); - if (local_218 == (ItemConfig_Item *)(((uint)local_218 / 0x28) * 0x28)) { + if (local_218 == (ItemConfig_Item *)((GHIDRA_UINT(local_218) / 0x28) * 0x28)) { local_204 = glitchGfx + 5; VStack_228.y = (float)&DAT_00000006; do { @@ -4863,24 +4863,24 @@ LAB_009de0b7: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)local_218 >> (bVar16 & 0x1f) ^ (uint)local_218; + uVar22 = GHIDRA_UINT(local_218) >> (bVar16 & 0x1f) ^ GHIDRA_UINT(local_218); uVar22 = uVar22 << (bVar17 & 0x1f) ^ uVar22; local_208 = (undefined1 *)(uVar22 >> (bVar18 & 0x1f) ^ uVar22); - VStack_214.y = (float)((double)(int)local_208 + - __uint_to_double_fixup[-((int)local_208 >> 0x1f)]) * 2.3283062e-10; + VStack_214.y = (float)((double)GHIDRA_INT(local_208) + + __uint_to_double_fixup[-(GHIDRA_INT(local_208) >> 0x1f)]) * 2.3283062e-10; if (local_208 == (undefined1 *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar5 = (code *)swi(3); iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)local_208 >> (bVar16 & 0x1f) ^ (uint)local_208; + uVar22 = GHIDRA_UINT(local_208) >> (bVar16 & 0x1f) ^ GHIDRA_UINT(local_208); uVar22 = uVar22 << (bVar17 & 0x1f) ^ uVar22; pIVar13 = (ItemConfig_Item *)(uVar22 >> (bVar18 & 0x1f) ^ uVar22); local_218 = pIVar13; - *local_204 = (float)((double)(int)pIVar13 + __uint_to_double_fixup[-((int)pIVar13 >> 0x1f)]) + *local_204 = (float)((double)GHIDRA_INT(pIVar13) + __uint_to_double_fixup[-(GHIDRA_INT(pIVar13) >> 0x1f)]) * 2.3283062e-10 + VStack_214.y; - VStack_228.y = (float)((int)&((ItemConfig_Item *)((int)VStack_228.y + -0xcc))->_initCharge + + VStack_228.y = (float)(GHIDRA_INT(&((ItemConfig_Item *)(GHIDRA_INT(VStack_228.y) + -0xcc))->_initCharge) + 3); local_204 = local_204 + 1; } while ((ItemConfig_Item *)VStack_228.y != (ItemConfig_Item *)0x0); @@ -4892,12 +4892,12 @@ LAB_009de0b7: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)local_218 >> (bVar16 & 0x1f) ^ (uint)local_218; + uVar22 = GHIDRA_UINT(local_218) >> (bVar16 & 0x1f) ^ GHIDRA_UINT(local_218); uVar22 = uVar22 << (bVar17 & 0x1f) ^ uVar22; local_20c = (ItemConfig_Item *)(uVar22 >> (bVar18 & 0x1f) ^ uVar22); - fVar14 = (float)((double)(int)local_20c + __uint_to_double_fixup[-((int)local_20c >> 0x1f)]) * + fVar14 = (float)((double)GHIDRA_INT(local_20c) + __uint_to_double_fixup[-(GHIDRA_INT(local_20c) >> 0x1f)]) * 2.3283062e-10 + 0.25; - glitchGfx[(int)(auStack_1a4._20_4_ + 5)] = fVar14; + glitchGfx[GHIDRA_INT(((*(undefined4 *)((char *)&(auStack_1a4) + 0x14)) + 5))] = fVar14; if (fVar14 < 0.5) { LAB_009de603: if (local_20c == (ItemConfig_Item *)0x0) { @@ -4906,10 +4906,10 @@ LAB_009de603: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)local_20c >> (bVar16 & 0x1f) ^ (uint)local_20c; + uVar22 = GHIDRA_UINT(local_20c) >> (bVar16 & 0x1f) ^ GHIDRA_UINT(local_20c); uVar22 = uVar22 << (bVar17 & 0x1f) ^ uVar22; rng._seed = uVar22 >> (bVar18 & 0x1f) ^ uVar22; - glitchGfx[(int)pppppbStack_18c + 5] = + glitchGfx[GHIDRA_INT(pppppbStack_18c) + 5] = (float)((double)rng._seed + __uint_to_double_fixup[-(rng._seed >> 0x1f)]) * 2.3283062e-10 + 0.25; } @@ -4920,14 +4920,14 @@ LAB_009de603: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)local_20c >> (bVar16 & 0x1f) ^ (uint)local_20c; + uVar22 = GHIDRA_UINT(local_20c) >> (bVar16 & 0x1f) ^ GHIDRA_UINT(local_20c); uVar22 = uVar22 << (bVar17 & 0x1f) ^ uVar22; local_20c = (ItemConfig_Item *)(uVar22 >> (bVar18 & 0x1f) ^ uVar22); - rng._seed = (int)local_20c; - if (((uint)local_20c & 7) == 0) goto LAB_009de603; + rng._seed = GHIDRA_INT(local_20c); + if ((GHIDRA_UINT(local_20c) & 7) == 0) goto LAB_009de603; } uVar22 = 5; - if (1.0 < glitchGfx[(int)pppppbStack_18c + 5] + glitchGfx[(int)(auStack_1a4._20_4_ + 5)]) { + if (1.0 < glitchGfx[GHIDRA_INT(pppppbStack_18c) + 5] + glitchGfx[GHIDRA_INT(((*(undefined4 *)((char *)&(auStack_1a4) + 0x14)) + 5))]) { uVar22 = 2; } uVar22 = ((RNG *)(&rng))->RNG::RandomInt(uVar22); @@ -4939,25 +4939,25 @@ LAB_009de603: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)rng._seed >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; + uVar22 = GHIDRA_UINT(rng._seed) >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; uVar22 = uVar22 << ((byte)rng._shift2 & 0x1f) ^ uVar22; pIVar13 = (ItemConfig_Item *)(uVar22 >> ((byte)rng._shift3 & 0x1f) ^ uVar22); - glitchGfx[(int)pppppbStack_188 + 5] = - 0.1 - (float)((double)(int)pIVar13 + __uint_to_double_fixup[-((int)pIVar13 >> 0x1f)]) * + glitchGfx[GHIDRA_INT(pppppbStack_188) + 5] = + 0.1 - (float)((double)GHIDRA_INT(pIVar13) + __uint_to_double_fixup[-(GHIDRA_INT(pIVar13) >> 0x1f)]) * 2.3283062e-10 * 0.5; } } if (glitchGfx[5] != 0.0) { - item->cacheFlags = item->cacheFlags | (uint)local_3c; + item->cacheFlags = item->cacheFlags | GHIDRA_UINT(local_3c); } if (glitchGfx[6] != 0.0) { - item->cacheFlags = item->cacheFlags | (uint)KStack_38._red; + item->cacheFlags = item->cacheFlags | GHIDRA_UINT(KStack_38._red); } if (glitchGfx[7] != 0.0) { - item->cacheFlags = item->cacheFlags | (uint)KStack_38._green; + item->cacheFlags = item->cacheFlags | GHIDRA_UINT(KStack_38._green); } if (glitchGfx[8] != 0.0) { - item->cacheFlags = item->cacheFlags | (uint)KStack_38._blue; + item->cacheFlags = item->cacheFlags | GHIDRA_UINT(KStack_38._blue); } if (glitchGfx[9] != 0.0) { item->cacheFlags = item->cacheFlags | 4; @@ -4980,22 +4980,22 @@ LAB_009de603: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)pIVar13 >> (bVar17 & 0x1f) ^ (uint)pIVar13; + uVar22 = GHIDRA_UINT(pIVar13) >> (bVar17 & 0x1f) ^ GHIDRA_UINT(pIVar13); uVar22 = uVar22 << (bVar18 & 0x1f) ^ uVar22; local_208 = (undefined1 *)(uVar22 >> (bVar16 & 0x1f) ^ uVar22); - VStack_214.y = (float)((double)(int)local_208 + - __uint_to_double_fixup[-((int)local_208 >> 0x1f)]) * 2.3283062e-10; + VStack_214.y = (float)((double)GHIDRA_INT(local_208) + + __uint_to_double_fixup[-(GHIDRA_INT(local_208) >> 0x1f)]) * 2.3283062e-10; if (local_208 == (undefined1 *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar5 = (code *)swi(3); iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)local_208 >> (bVar17 & 0x1f) ^ (uint)local_208; + uVar22 = GHIDRA_UINT(local_208) >> (bVar17 & 0x1f) ^ GHIDRA_UINT(local_208); uVar22 = uVar22 << (bVar18 & 0x1f) ^ uVar22; local_208 = (undefined1 *)(uVar22 >> (bVar16 & 0x1f) ^ uVar22); local_20c = (ItemConfig_Item *) - ((float)((double)(int)local_208 + __uint_to_double_fixup[-((int)local_208 >> 0x1f)]) + ((float)((double)GHIDRA_INT(local_208) + __uint_to_double_fixup[-(GHIDRA_INT(local_208) >> 0x1f)]) * 2.3283062e-10); if (local_208 == (undefined1 *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -5003,12 +5003,12 @@ LAB_009de603: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)local_208 >> (bVar17 & 0x1f) ^ (uint)local_208; + uVar22 = GHIDRA_UINT(local_208) >> (bVar17 & 0x1f) ^ GHIDRA_UINT(local_208); uVar22 = uVar22 << (bVar18 & 0x1f) ^ uVar22; pIVar8 = (ItemConfig_Item *)(uVar22 >> (bVar16 & 0x1f) ^ uVar22); local_20c = (ItemConfig_Item *) ((float)local_20c + VStack_214.y + - (float)((double)(int)pIVar8 + __uint_to_double_fixup[-((int)pIVar8 >> 0x1f)]) * + (float)((double)GHIDRA_INT(pIVar8) + __uint_to_double_fixup[-(GHIDRA_INT(pIVar8) >> 0x1f)]) * 2.3283062e-10); } else { @@ -5034,13 +5034,13 @@ LAB_009de603: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)pIVar13 >> (bVar17 & 0x1f) ^ (uint)pIVar13; + uVar22 = GHIDRA_UINT(pIVar13) >> (bVar17 & 0x1f) ^ GHIDRA_UINT(pIVar13); uVar22 = uVar22 << (bVar18 & 0x1f) ^ uVar22; VStack_228.y = (float)(uVar22 >> (bVar16 & 0x1f) ^ uVar22); - local_208 = (undefined1 *)local_88[(uint)VStack_228.y & 0xf]; - item->maxCharges = (int)local_208; - item->_initCharge = (int)local_208; - if ((int)local_208 < 0xd) { + local_208 = (undefined1 *)local_88[GHIDRA_UINT(VStack_228.y) & 0xf]; + item->maxCharges = GHIDRA_INT(local_208); + item->_initCharge = GHIDRA_INT(local_208); + if (GHIDRA_INT(local_208) < 0xd) { item->chargeType = 0; if ((ItemConfig_Item *)VStack_228.y == (ItemConfig_Item *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -5048,11 +5048,11 @@ LAB_009de603: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)VStack_228.y >> (bVar17 & 0x1f) ^ (uint)VStack_228.y; + uVar22 = GHIDRA_UINT(VStack_228.y) >> (bVar17 & 0x1f) ^ GHIDRA_UINT(VStack_228.y); uVar22 = uVar22 << (bVar18 & 0x1f) ^ uVar22; pIVar8 = (ItemConfig_Item *)(uVar22 >> (bVar16 & 0x1f) ^ uVar22); - fVar14 = (float)((double)(int)pIVar8 + __uint_to_double_fixup[-((int)pIVar8 >> 0x1f)]) * - 2.3283062e-10 * (float)(int)local_208; + fVar14 = (float)((double)GHIDRA_INT(pIVar8) + __uint_to_double_fixup[-(GHIDRA_INT(pIVar8) >> 0x1f)]) * + 2.3283062e-10 * (float)GHIDRA_INT(local_208); local_20c = (ItemConfig_Item *)(fVar14 + fVar14 + 1.0); } else { @@ -5063,22 +5063,22 @@ LAB_009de603: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)VStack_228.y >> (bVar17 & 0x1f) ^ (uint)VStack_228.y; + uVar22 = GHIDRA_UINT(VStack_228.y) >> (bVar17 & 0x1f) ^ GHIDRA_UINT(VStack_228.y); uVar22 = uVar22 << (bVar18 & 0x1f) ^ uVar22; local_208 = (undefined1 *)(uVar22 >> (bVar16 & 0x1f) ^ uVar22); - VStack_214.y = (float)((double)(int)local_208 + - __uint_to_double_fixup[-((int)local_208 >> 0x1f)]) * 2.3283062e-10; + VStack_214.y = (float)((double)GHIDRA_INT(local_208) + + __uint_to_double_fixup[-(GHIDRA_INT(local_208) >> 0x1f)]) * 2.3283062e-10; if (local_208 == (undefined1 *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar5 = (code *)swi(3); iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)local_208 >> (bVar17 & 0x1f) ^ (uint)local_208; + uVar22 = GHIDRA_UINT(local_208) >> (bVar17 & 0x1f) ^ GHIDRA_UINT(local_208); uVar22 = uVar22 << (bVar18 & 0x1f) ^ uVar22; pIVar8 = (ItemConfig_Item *)(uVar22 >> (bVar16 & 0x1f) ^ uVar22); local_20c = (ItemConfig_Item *) - ((float)((double)(int)pIVar8 + __uint_to_double_fixup[-((int)pIVar8 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(pIVar8) + __uint_to_double_fixup[-(GHIDRA_INT(pIVar8) >> 0x1f)]) * 2.3283062e-10 + VStack_214.y); } } @@ -5086,7 +5086,7 @@ LAB_009de603: fVar14 = 0.0; do { if (((float)local_20c <= fVar14) || - (fVar14 = glitchGfx[0xc], 7 < (uint)((int)fVar14 - (int)glitchGfx[0xb] >> 2))) break; + (fVar14 = glitchGfx[0xc], 7 < GHIDRA_UINT((GHIDRA_INT(fVar14) - GHIDRA_INT(glitchGfx[0xb]) >> 2)))) break; bVar16 = (byte)rng._shift1; bVar17 = (byte)rng._shift3; bVar18 = (byte)rng._shift2; @@ -5099,8 +5099,8 @@ LAB_009de603: uStack_17e = 0; fStack_17c = 9.80909e-45; local_208 = (undefined1 *)fVar14; - auStack_1a4._16_4_ = 1.4013e-45; - auStack_1a4._20_4_ = (undefined1 *)0x2; + (*(undefined4 *)((char *)&(auStack_1a4) + 0x10)) = 1.4013e-45; + (*(undefined4 *)((char *)&(auStack_1a4) + 0x14)) = (undefined1 *)0x2; pppppbStack_18c = (byte *****)0x3; pppppbStack_188 = (byte *****)0x4; if (pIVar8 == (ItemConfig_Item *)0x0) { @@ -5109,10 +5109,10 @@ LAB_009de603: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)pIVar8 >> (bVar16 & 0x1f) ^ (uint)pIVar8; + uVar22 = GHIDRA_UINT(pIVar8) >> (bVar16 & 0x1f) ^ GHIDRA_UINT(pIVar8); uVar22 = uVar22 << (bVar18 & 0x1f) ^ uVar22; pIVar8 = (ItemConfig_Item *)(uVar22 >> (bVar17 & 0x1f) ^ uVar22); - VStack_228.y = (float)*(ItemConfig_Item **)(auStack_1a4 + ((uint)pIVar8 % 7) * 4 + 0x10); + VStack_228.y = (float)*(ItemConfig_Item **)(auStack_1a4 + (GHIDRA_UINT(pIVar8) % 7) * 4 + 0x10); } if (glitchGfx[0xb] != fVar14) { if (pIVar8 == (ItemConfig_Item *)0x0) { @@ -5121,10 +5121,10 @@ LAB_009de603: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)pIVar8 >> (bVar16 & 0x1f) ^ (uint)pIVar8; + uVar22 = GHIDRA_UINT(pIVar8) >> (bVar16 & 0x1f) ^ GHIDRA_UINT(pIVar8); uVar22 = uVar22 << (bVar18 & 0x1f) ^ uVar22; pIVar8 = (ItemConfig_Item *)(uVar22 >> (bVar17 & 0x1f) ^ uVar22); - if (((uint)pIVar8 & 3) != 0) { + if ((GHIDRA_UINT(pIVar8) & 3) != 0) { VStack_228.y = (float)&DAT_00000008; } } @@ -5142,10 +5142,10 @@ LAB_009de603: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)pIVar8 >> (bVar16 & 0x1f) ^ (uint)pIVar8; + uVar22 = GHIDRA_UINT(pIVar8) >> (bVar16 & 0x1f) ^ GHIDRA_UINT(pIVar8); uVar22 = uVar22 << (bVar18 & 0x1f) ^ uVar22; local_208 = (undefined1 *)(uVar22 >> (bVar17 & 0x1f) ^ uVar22); - VStack_214.y = (float)apvStack_44[(uint)local_208 & 7]; + VStack_214.y = (float)apvStack_44[GHIDRA_UINT(local_208) & 7]; pIVar23 = operator_new(0x68); local_25c = pIVar23; if (pIVar23 == (ItemConfig *)0x0) { @@ -5166,19 +5166,19 @@ LAB_009de603: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)local_208 >> ((byte)rng._shift1 & 0x1f) ^ (uint)local_208; + uVar22 = GHIDRA_UINT(local_208) >> ((byte)rng._shift1 & 0x1f) ^ GHIDRA_UINT(local_208); uVar22 = uVar22 << (bVar18 & 0x1f) ^ uVar22; pIVar8 = (ItemConfig_Item *)(uVar22 >> ((byte)rng._shift3 & 0x1f) ^ uVar22); - ((ProceduralEffect *)(pIVar23))->ProceduralEffect::roll_params((int)VStack_228.y,(int)VStack_214.y,(uint)pIVar8); + ((ProceduralEffect *)(pIVar23))->ProceduralEffect::roll_params(GHIDRA_INT(VStack_228.y),GHIDRA_INT(VStack_214.y),GHIDRA_UINT(pIVar8)); if ((local_204 == (float *)0x63) || (VStack_240.y + (float)(pIVar23->_wispGfxRoot)._size < (float)local_20c)) { LAB_009ded9d: if ((pIVar23->_collectibles)._begin == (void *)0x6) { - local_254.y = (float)((uint)(pIVar23->_trinkets)._begin & 0xffff); + local_254.y = (float)(GHIDRA_UINT((pIVar23->_trinkets)._begin) & 0xffff); if (local_254.y == 9.18341e-41) { local_254.y = -NAN; } - local_254.x = (float)(uint)*(ushort *)((int)&(pIVar23->_trinkets)._begin + 2); + local_254.x = (float)GHIDRA_UINT(*(ushort *)(GHIDRA_INT(&(pIVar23->_trinkets)._begin) + 2)); FUN_009e24f0(); } if ((undefined4 *)glitchGfx[0xc] == (undefined4 *)glitchGfx[0xd]) { @@ -5187,7 +5187,7 @@ LAB_009ded9d: } else { *(undefined4 *)glitchGfx[0xc] = pIVar23; - glitchGfx[0xc] = (float)((int)glitchGfx[0xc] + 4); + glitchGfx[0xc] = (float)(GHIDRA_INT(glitchGfx[0xc]) + 4); } VStack_240.y = VStack_240.y + (float)(pIVar23->_wispGfxRoot)._size; } @@ -5198,28 +5198,28 @@ LAB_009ded9d: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)pIVar8 >> ((byte)rng._shift1 & 0x1f) ^ (uint)pIVar8; + uVar22 = GHIDRA_UINT(pIVar8) >> ((byte)rng._shift1 & 0x1f) ^ GHIDRA_UINT(pIVar8); uVar22 = uVar22 << ((byte)rng._shift2 & 0x1f) ^ uVar22; pIVar8 = (ItemConfig_Item *)(uVar22 >> ((byte)rng._shift3 & 0x1f) ^ uVar22); - if (pIVar8 == (ItemConfig_Item *)(((uint)pIVar8 / 0x14) * 0x14)) goto LAB_009ded9d; + if (pIVar8 == (ItemConfig_Item *)((GHIDRA_UINT(pIVar8) / 0x14) * 0x14)) goto LAB_009ded9d; operator_delete(pIVar23,0x68); } - local_204 = (float *)((int)local_204 + 1); + local_204 = (float *)(GHIDRA_INT(local_204) + 1); fVar14 = VStack_240.y; } while (local_204 < 100); local_20c = pIVar8; KAGE_LogMessage(1,(byte *)"initialized with %d effects (score: %g)\n"); pfVar24 = glitchGfx; uVar22 = 0; - if ((int)glitchGfx[0xc] - (int)glitchGfx[0xb] >> 2 != 0) { + if (GHIDRA_INT(glitchGfx[0xc]) - GHIDRA_INT(glitchGfx[0xb]) >> 2 != 0) { do { func_0x009e1c30(); - ehState._0_1_ = 4; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 4; KAGE_LogMessage(1,&DAT_00b6ec00); - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; ((std::string *)(auStack_1a4 + 0x14))->std::string::_Tidy_deallocate(); uVar22 = uVar22 + 1; - } while (uVar22 < (uint)((int)pfVar24[0xc] - (int)pfVar24[0xb] >> 2)); + } while (uVar22 < GHIDRA_UINT((GHIDRA_INT(pfVar24[0xc]) - GHIDRA_INT(pfVar24[0xb]) >> 2))); pIVar8 = local_20c; } if (pIVar8 == (ItemConfig_Item *)0x0) { @@ -5228,7 +5228,7 @@ LAB_009ded9d: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)pIVar8 >> ((byte)rng._shift1 & 0x1f) ^ (uint)pIVar8; + uVar22 = GHIDRA_UINT(pIVar8) >> ((byte)rng._shift1 & 0x1f) ^ GHIDRA_UINT(pIVar8); bVar16 = (byte)rng._shift2; uVar22 = uVar22 << (bVar16 & 0x1f) ^ uVar22; bVar17 = (byte)rng._shift3; @@ -5240,28 +5240,28 @@ LAB_009ded9d: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)local_208 >> ((byte)rng._shift1 & 0x1f) ^ (uint)local_208; + uVar22 = GHIDRA_UINT(local_208) >> ((byte)rng._shift1 & 0x1f) ^ GHIDRA_UINT(local_208); uVar22 = uVar22 << (bVar16 & 0x1f) ^ uVar22; local_204 = (float *)(uVar22 >> (bVar17 & 0x1f) ^ uVar22); - item->shopPrice = (short)local_204 + (short)((uint)local_204 / 99) * -99 + 1; + item->shopPrice = (short)local_204 + (short)(GHIDRA_UINT(local_204) / 99) * -99 + 1; if (local_204 == (float *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar5 = (code *)swi(3); iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)local_204 >> ((byte)rng._shift1 & 0x1f) ^ (uint)local_204; + uVar22 = GHIDRA_UINT(local_204) >> ((byte)rng._shift1 & 0x1f) ^ GHIDRA_UINT(local_204); uVar22 = uVar22 << (bVar16 & 0x1f) ^ uVar22; VStack_228.y = (float)(uVar22 >> (bVar17 & 0x1f) ^ uVar22); - rng._seed = (int)VStack_228.y; + rng._seed = GHIDRA_INT(VStack_228.y); bVar17 = (byte)rng._shift1; - if (((uint)VStack_228.y & 1) == 0) { - fVar14 = (float)((RNG *)(&rng))->RNG::RandomInt(((int)(g_manager->_sfxManager)._sounds._end - - (int)(g_manager->_sfxManager)._sounds._begin) / 0x1b8); + if ((GHIDRA_UINT(VStack_228.y) & 1) == 0) { + fVar14 = (float)((RNG *)(&rng))->RNG::RandomInt((GHIDRA_INT((g_manager->_sfxManager)._sounds._end) - + GHIDRA_INT((g_manager->_sfxManager)._sounds._begin)) / 0x1b8); pvVar15 = (g_manager->_sfxManager)._sounds._begin; - if (*(int *)((char *)pvVar15 + (int)fVar14 * 0x1b8 + 400) != 0) { - _Str1 = (char *)((int)pvVar15 + (int)fVar14 * 0x1b8 + 8); - if (0xf < *(uint *)((char *)pvVar15 + (int)fVar14 * 0x1b8 + 0x1c)) { + if (*(int *)((char *)pvVar15 + GHIDRA_INT(fVar14) * 0x1b8 + 400) != 0) { + _Str1 = (char *)(GHIDRA_INT(pvVar15) + GHIDRA_INT(fVar14) * 0x1b8 + 8); + if (0xf < *(uint *)((char *)pvVar15 + GHIDRA_INT(fVar14) * 0x1b8 + 0x1c)) { _Str1 = *(char **)_Str1; } iVar9 = _strnicmp(_Str1,"sfx/voiceover",0xd); @@ -5277,7 +5277,7 @@ LAB_009ded9d: VStack_228.y = (float)rng._seed; std::vector::resize(&local_254); VStack_214.y = (float)std::deque::back(); - if ((byte *)((int)VStack_214.y + 4) != (byte *)0x0) { + if ((byte *)(GHIDRA_INT(VStack_214.y) + 4) != (byte *)0x0) { *(byte *)((char *)VStack_214.y + 4) = (byte)(g_graphicsManager_flags >> 5) & 1; } *(void **)VStack_214.y = g_graphicsManager_renderTarget; @@ -5300,21 +5300,21 @@ LAB_009ded9d: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)VStack_228.y >> (bVar17 & 0x1f) ^ (uint)VStack_228.y; + uVar22 = GHIDRA_UINT(VStack_228.y) >> (bVar17 & 0x1f) ^ GHIDRA_UINT(VStack_228.y); uVar22 = uVar22 << (bVar16 & 0x1f) ^ uVar22; bVar18 = (byte)rng._shift3; local_22c = (void *)(uVar22 >> (bVar18 & 0x1f) ^ uVar22); - if (local_22c == (void *)(((uint)local_22c / 5) * 5)) { + if (local_22c == (void *)((GHIDRA_UINT(local_22c) / 5) * 5)) { if (local_22c == (void *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar5 = (code *)swi(3); iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)local_22c >> (bVar17 & 0x1f) ^ (uint)local_22c; + uVar22 = GHIDRA_UINT(local_22c) >> (bVar17 & 0x1f) ^ GHIDRA_UINT(local_22c); uVar22 = uVar22 << (bVar16 & 0x1f) ^ uVar22; local_22c = (void *)(uVar22 >> (bVar18 & 0x1f) ^ uVar22); - local_218 = (ItemConfig_Item *)((uint)local_22c & 0x3f); + local_218 = (ItemConfig_Item *)(GHIDRA_UINT(local_22c) & 0x3f); } local_204 = (float *)0x0; local_20c = (ItemConfig_Item *)0x0; @@ -5324,7 +5324,7 @@ LAB_009ded9d: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)local_22c >> (bVar17 & 0x1f) ^ (uint)local_22c; + uVar22 = GHIDRA_UINT(local_22c) >> (bVar17 & 0x1f) ^ GHIDRA_UINT(local_22c); uVar22 = uVar22 << (bVar16 & 0x1f) ^ uVar22; uVar22 = uVar22 >> (bVar18 & 0x1f) ^ uVar22; rng._seed = uVar22; @@ -5336,12 +5336,12 @@ LAB_009ded9d: VStack_228.y = 0.0; pIVar8 = local_20c; do { - if (((uint)VStack_228.y & 0xfffffff8) < 0x39) { - pIVar13 = (ItemConfig_Item *)((int)&local_218->type + 1); - *(char *)((int)&((ItemConfig_Item *)((int)VStack_240.y + -0xcc))->_initCharge + 3) = + if ((GHIDRA_UINT(VStack_228.y) & 0xfffffff8) < 0x39) { + pIVar13 = (ItemConfig_Item *)(GHIDRA_INT(&local_218->type) + 1); + *(char *)(GHIDRA_INT(&((ItemConfig_Item *)(GHIDRA_INT(VStack_240.y) + -0xcc))->_initCharge) + 3) = (char)local_218; *(char *)(int *)VStack_240.y = (char)local_204; - *(char *)((int)(int *)VStack_240.y + 1) = (char)pIVar8; + *(char *)(GHIDRA_INT((int *)VStack_240.y) + 1) = (char)pIVar8; local_218 = pIVar13; if (uVar22 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -5366,7 +5366,7 @@ LAB_009ded9d: uVar22 = uVar22 >> (bVar18 & 0x1f) ^ uVar22; local_20c = (ItemConfig_Item *)(uVar22 & 3); } - if ((int)pIVar13 < 0x40) { + if (GHIDRA_INT(pIVar13) < 0x40) { if (uVar22 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar5 = (code *)swi(3); @@ -5380,9 +5380,9 @@ LAB_009ded9d: rng._seed = uVar22; if (uVar22 != (uVar22 / 0xc) * 0xc) goto LAB_009df4cc; } - local_204 = (float *)((int)local_204 + 1U & 0x80000003); - if ((int)local_204 < 0) { - local_204 = (float *)(((int)local_204 - 1U | 0xfffffffc) + 1); + local_204 = (float *)(GHIDRA_INT(local_204) + 1U & 0x80000003); + if (GHIDRA_INT(local_204) < 0) { + local_204 = (float *)((GHIDRA_INT(local_204) - 1U | 0xfffffffc) + 1); } local_218 = (ItemConfig_Item *)VStack_228.y; if (uVar22 == 0) { @@ -5394,8 +5394,8 @@ LAB_009ded9d: uVar22 = uVar22 >> (bVar17 & 0x1f) ^ uVar22; uVar22 = uVar22 << (bVar16 & 0x1f) ^ uVar22; local_238 = (ItemConfig *)(uVar22 >> (bVar18 & 0x1f) ^ uVar22); - if ((uint)local_238 % 0x14 == 0) { - local_218 = (ItemConfig_Item *)((int)(int *)VStack_228.y + 1); + if (GHIDRA_UINT(local_238) % 0x14 == 0) { + local_218 = (ItemConfig_Item *)(GHIDRA_INT((int *)VStack_228.y) + 1); } local_20c = (ItemConfig_Item *)0x0; if (local_238 == (ItemConfig *)0x0) { @@ -5404,7 +5404,7 @@ LAB_009ded9d: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)local_238 >> (bVar17 & 0x1f) ^ (uint)local_238; + uVar22 = GHIDRA_UINT(local_238) >> (bVar17 & 0x1f) ^ GHIDRA_UINT(local_238); uVar22 = uVar22 << (bVar16 & 0x1f) ^ uVar22; uVar22 = uVar22 >> (bVar18 & 0x1f) ^ uVar22; pIVar8 = local_20c; @@ -5425,25 +5425,25 @@ LAB_009ded9d: } } else { - *(undefined2 *)((int)&((ItemConfig_Item *)((int)VStack_240.y + -0xcc))->_initCharge + 3) = + *(undefined2 *)(GHIDRA_INT(&((ItemConfig_Item *)(GHIDRA_INT(VStack_240.y) + -0xcc))->_initCharge) + 3) = 0xffff; - *(undefined1 *)((int)(int *)VStack_240.y + 1) = 0; + *(undefined1 *)(GHIDRA_INT((int *)VStack_240.y) + 1) = 0; } LAB_009df4cc: - VStack_240.y = (float)((int)(int *)VStack_240.y + 3); - VStack_228.y = (float)((int)(int *)VStack_228.y + 1); - } while ((int)VStack_228.y < 0x40); + VStack_240.y = (float)(GHIDRA_INT((int *)VStack_240.y) + 3); + VStack_228.y = (float)(GHIDRA_INT((int *)VStack_228.y) + 1); + } while (GHIDRA_INT(VStack_228.y) < 0x40); _eh_vector_constructor_iterator_ - ((void *)((int)&IStack_167.tags + 7),8,4,(_func_void_void_ptr *)&LAB_0040c5b0, + ((void *)(GHIDRA_INT(&IStack_167.tags) + 7),8,4,(_func_void_void_ptr *)&LAB_0040c5b0, FUN_0040c440); - ehState = CONCAT31(ehState._1_3_,5); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),5); local_204 = (float *)0x0; do { iVar9 = 0; do { managerLocal = g_manager; - uVar22 = ((RNG *)(&rng))->RNG::RandomInt(((int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2) - 1); + uVar22 = ((RNG *)(&rng))->RNG::RandomInt((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2) - 1); pIVar8 = ((ItemConfig *)(&managerLocal->_itemConfig))->ItemConfig::GetCollectible(uVar22 + 1); if ((pIVar8 != (ItemConfig_Item *)0x0) && ((pIVar8->gfxFilename)._size != 0)) { path = &pIVar8->gfxFilename; @@ -5451,37 +5451,37 @@ LAB_009df4cc: path = *(std_string **)path->_buf; } pvVar15 = Manager::LoadImage(&VStack_214,(byte *)path); - ehState._0_1_ = 6; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 6; imageRef = ((KAGE::SmartPointer *)(&local_254))->KAGE::SmartPointer::operator_assign(pvVar15); pfVar24 = local_204; uVar2 = imageRef[1]; - imageRef[1] = *(undefined4 *)((char *)(&IStack_167.costume + 1) + (int)local_204 * 8 + 0x17); - uVar4 = *(undefined4 *)((char *)(&IStack_167.costume + 1) + (int)local_204 * 8 + 0x13); - *(undefined4 *)((char *)(&IStack_167.costume + 1) + (int)local_204 * 8 + 0x17) = uVar2; + imageRef[1] = *(undefined4 *)((char *)(&IStack_167.costume + 1) + GHIDRA_INT(local_204) * 8 + 0x17); + uVar4 = *(undefined4 *)((char *)(&IStack_167.costume + 1) + GHIDRA_INT(local_204) * 8 + 0x13); + *(undefined4 *)((char *)(&IStack_167.costume + 1) + GHIDRA_INT(local_204) * 8 + 0x17) = uVar2; uVar2 = *imageRef; *imageRef = uVar4; - *(undefined4 *)((char *)(&IStack_167.costume + 1) + (int)local_204 * 8 + 0x13) = uVar2; - ehState._0_1_ = 7; + *(undefined4 *)((char *)(&IStack_167.costume + 1) + GHIDRA_INT(local_204) * 8 + 0x13) = uVar2; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 7; if ((((int *)local_254.y != (int *)0x0) && (cVar7 = (**(code **)(*(int *)local_254.y + 0xc))(), cVar7 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(); } - ehState._0_1_ = 8; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 8; if ((((int *)VStack_214.y != (int *)0x0) && (cVar7 = (**(code **)(*(int *)VStack_214.y + 0xc))(), cVar7 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(); } - ehState = CONCAT31(ehState._1_3_,5); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),5); goto LAB_009df56b; } iVar9 = iVar9 + 1; } while (iVar9 < 10); pfVar24 = local_204; LAB_009df56b: - local_204 = (float *)((int)pfVar24 + 1); - } while ((int)local_204 < 4); + local_204 = (float *)(GHIDRA_INT(pfVar24) + 1); + } while (GHIDRA_INT(local_204) < 4); if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < DAT_00c9437c) && (_Init_thread_header(), DAT_00c9437c == -1)) { ((Color *)((Color *)&DAT_00c94380))->Color::Color(); @@ -5494,22 +5494,22 @@ LAB_009df56b: iVar9 = (*pcVar5)(); return iVar9; } - uVar22 = (uint)rng._seed >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; + uVar22 = GHIDRA_UINT(rng._seed) >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; uVar22 = uVar22 << ((byte)rng._shift2 & 0x1f) ^ uVar22; uVar22 = uVar22 >> ((byte)rng._shift3 & 0x1f) ^ uVar22; hueColor = hsv_to_rgb(&KStack_38, - (float)((double)(int)uVar22 + __uint_to_double_fixup[-((int)uVar22 >> 0x1f)] + (float)((double)GHIDRA_INT(uVar22) + __uint_to_double_fixup[-(GHIDRA_INT(uVar22) >> 0x1f)] ) * 2.3283062e-10 * 360.0,1.0,1.0,1.0); - pfVar24 = (float *)((int)&IStack_167.type + 1); - rng._seed = (int)&DAT_00c94380; + pfVar24 = (float *)(GHIDRA_INT(&IStack_167.type) + 1); + rng._seed = GHIDRA_INT(&DAT_00c94380); uVar22 = 0; - rng._shift2 = (int)&displayColor; - rng._shift1 = (int)&DAT_00c5d400; + rng._shift2 = GHIDRA_INT(&displayColor); + rng._shift1 = GHIDRA_INT(&DAT_00c5d400); displayColor._colorize[0] = hueColor->_red; displayColor._colorize[1] = hueColor->_green; displayColor._colorize[2] = hueColor->_blue; displayColor._colorize[3] = hueColor->_alpha; - rng._shift3 = (int)&DAT_00c5d42c; + rng._shift3 = GHIDRA_INT(&DAT_00c5d42c); local_204 = pfVar24; do { puVar19 = &DAT_42000000; @@ -5519,8 +5519,8 @@ LAB_009df56b: bVar16 = *(byte *)((char *)pfVar24 + -1); local_204 = pfVar24; if (bVar16 != 0xff) { - local_208 = (undefined1 *)(uint)bVar16; - if (*(int *)((char *)(&IStack_167.costume + 1) + (int)(uint)bVar16 * 8 + 0x13) != 0) { + local_208 = (undefined1 *)GHIDRA_UINT(bVar16); + if (*(int *)((char *)(&IStack_167.costume + 1) + GHIDRA_INT(GHIDRA_UINT(bVar16)) * 8 + 0x13) != 0) { uVar10 = *(byte *)((char *)pfVar24 + -2) & 7; local_254.x = 4.0; local_254.y = 4.0; @@ -5532,18 +5532,18 @@ LAB_009df56b: VStack_228.y = 4.0; uVar10 = ~item->id; uVar21 = uVar10 & 0x8000001f; - if ((int)uVar21 < 0) { + if (GHIDRA_INT(uVar21) < 0) { uVar21 = (uVar21 - 1 | 0xffffffe0) + 1; } - VStack_240.x = (float)(int)uVar21 * (float)puVar19 + (float)(int)VStack_214.y * fVar14; - VStack_240.y = (float)((int)(uVar10 + ((int)uVar10 >> 0x1f & 0x1fU)) >> 5) * (float)puVar19 - + (float)(int)local_25c * fVar14; + VStack_240.x = (float)GHIDRA_INT(uVar21) * (float)puVar19 + (float)GHIDRA_INT(VStack_214.y) * fVar14; + VStack_240.y = (float)(GHIDRA_INT((uVar10 + (GHIDRA_INT(uVar10) >> 0x1f & 0x1fU))) >> 5) * (float)puVar19 + + (float)GHIDRA_INT(local_25c) * fVar14; render_quad_set_rect(auStack_2e0,&VStack_240,&VStack_228,&KStack_38); - local_26c = *(ColorMod **)(IStack_167.name._buf + (uint)*(byte *)pfVar24 * 4 + -0x19); + local_26c = *(ColorMod **)(IStack_167.name._buf + GHIDRA_UINT(*(byte *)pfVar24) * 4 + -0x19); pIVar23 = (ItemConfig *)0x0; imageRefCount = (int *)0x0; - VStack_214.y = *(float *)((char *)(&IStack_167.costume + 1) + (int)local_208 * 8 + 0x17); - local_25c = *(ItemConfig **)((char *)(&IStack_167.costume + 1) + (int)local_208 * 8 + 0x13); + VStack_214.y = *(float *)((char *)(&IStack_167.costume + 1) + GHIDRA_INT(local_208) * 8 + 0x17); + local_25c = *(ItemConfig **)((char *)(&IStack_167.costume + 1) + GHIDRA_INT(local_208) * 8 + 0x13); if ((int *)VStack_214.y != (int *)0x0) { cVar7 = (**(code **)(*(int *)VStack_214.y + 4))(); if (cVar7 != '\0') { @@ -5563,14 +5563,14 @@ LAB_009df56b: KStack_38._blue = pCVar6->_tint[2]; KStack_38._alpha = pCVar6->_tint[3]; KStack_38._unk = 0; - (**(code **)(**(int **)((char *)(&IStack_167.costume + 1) + (int)local_208 * 8 + 0x13) + 0x14)) + (**(code **)(**(int **)((char *)(&IStack_167.costume + 1) + GHIDRA_INT(local_208) * 8 + 0x13) + 0x14)) (&iStack_6c); } } uVar22 = uVar22 + 1; - pfVar24 = (float *)((int)local_204 + 3); + pfVar24 = (float *)(GHIDRA_INT(local_204) + 3); local_204 = pfVar24; - } while ((int)uVar22 < 0x40); + } while (GHIDRA_INT(uVar22) < 0x40); _glfw_context_reset(); ((KAGE_Graphics *)(&DAT_00c798e0))->KAGE_Graphics::SetRenderTarget(*(void **)&(*(undefined1 *)((char *)(procManager) + 0x14)),0); ((BlendMode *)(&KStack_38))->BlendMode::SetMode(1,unusedArg_00); @@ -5585,7 +5585,7 @@ LAB_009df56b: } g_currentShader = shader; Manager::LoadImage(&piStack_260,(byte *)"gfx/ui/mod_defaults.png"); - ehState._0_1_ = 9; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 9; fVar14 = 16.0; local_254.x = 16.0; local_254.y = 16.0; @@ -5598,53 +5598,53 @@ LAB_009df56b: local_254.y = 32.0; uVar22 = ~item->id; uVar10 = uVar22 & 0x8000001f; - if ((int)uVar10 < 0) { + if (GHIDRA_INT(uVar10) < 0) { uVar10 = (uVar10 - 1 | 0xffffffe0) + 1; } - VStack_214.x = (float)(int)uVar10 * fVar14; + VStack_214.x = (float)GHIDRA_INT(uVar10) * fVar14; size = &local_254; - VStack_214.y = (float)((int)(uVar22 + ((int)uVar22 >> 0x1f & 0x1fU)) >> 5) * fVar14; + VStack_214.y = (float)(GHIDRA_INT((uVar22 + (GHIDRA_INT(uVar22) >> 0x1f & 0x1fU))) >> 5) * fVar14; render_quad_set_rect(auStack_2e0,&VStack_214,size,&KStack_38); pvVar15 = (void *)0x9dfa09; ((Color *)((Color *)auStack_1a4))->Color::Color(); ((KAGE::SmartPointer *)(auStack_2ea + -10))->KAGE::SmartPointer::operator_assign(&piStack_260); apply_sprite_shader_params(color,1,size,pvVar15); (**(code **)(*piStack_260 + 0x14))(&iStack_6c); - ehState._0_1_ = 10; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 10; if (((local_25c != (ItemConfig *)0x0) && - (cVar7 = (**(code **)((int)(local_25c->_collectibles)._begin + 0xc))(), cVar7 != '\0')) && + (cVar7 = (**(code **)(GHIDRA_INT((local_25c->_collectibles)._begin) + 0xc))(), cVar7 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(); } - ehState._0_1_ = 5; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; _glfw_context_reset(); pop_render_target(); shader_cache_find(unusedArg_01); ((InfoDisplay *)(&g_manager->_infoDisplay))->InfoDisplay::add_item_entry(pIVar8,1); pvVar15 = (procManager->_proceduralItems)._end; pvVar3 = (procManager->_proceduralItems)._begin; - ehState._0_1_ = 1; - _eh_vector_destructor_iterator_((void *)((int)&IStack_167.tags + 7),8,4,FUN_0040c440); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; + _eh_vector_destructor_iterator_((void *)(GHIDRA_INT(&IStack_167.tags) + 7),8,4,FUN_0040c440); if (0xf < itemDescCapacity) { uVar22 = itemDescCapacity + 1; strBuf = itemDesc[0]; if (0xfff < uVar22) { strBuf = (byte *******)itemDesc[0][-1]; uVar22 = itemDescCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)itemDesc[0] + (-4 - (int)strBuf))) goto LAB_009dfb4f; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(itemDesc[0]) + (-4 - GHIDRA_INT(strBuf)))) goto LAB_009dfb4f; } operator_delete(strBuf,uVar22); } itemDescSize = 0; itemDescCapacity = 0xf; - itemDesc[0] = (byte *******)((uint)itemDesc[0] & 0xffffff00); + itemDesc[0] = (byte *******)(GHIDRA_UINT(itemDesc[0]) & 0xffffff00); if (0xf < itemNameCapacity) { uVar22 = itemNameCapacity + 1; strBuf = itemName[0]; if (0xfff < uVar22) { strBuf = (byte *******)itemName[0][-1]; uVar22 = itemNameCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)itemName[0] + (-4 - (int)strBuf))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(itemName[0]) + (-4 - GHIDRA_INT(strBuf)))) { LAB_009dfb4f: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -5653,5 +5653,5 @@ LAB_009dfb4f: operator_delete(strBuf,uVar22); } ExceptionList = prevExceptionList; - return -((int)pvVar15 - (int)pvVar3 >> 2); + return -(GHIDRA_INT(pvVar15) - GHIDRA_INT(pvVar3) >> 2); } diff --git a/src/game/k_color.cpp b/src/game/k_color.cpp index 4d99ba8..d220996 100644 --- a/src/game/k_color.cpp +++ b/src/game/k_color.cpp @@ -25,10 +25,10 @@ void KColor::SetFromARGB(uint argb) KColor * KColor::set_from_argb_signed(uint argb) { this->_unk = 0; - this->_red = (float)((int)argb >> 0x10 & 0xff) / 255.0; - this->_green = (float)((int)argb >> 8 & 0xff) / 255.0; + this->_red = (float)(GHIDRA_INT(argb) >> 0x10 & 0xff) / 255.0; + this->_green = (float)(GHIDRA_INT(argb) >> 8 & 0xff) / 255.0; this->_blue = (float)(argb & 0xff) / 255.0; - this->_alpha = (float)((int)argb >> 0x18 & 0xff) / 255.0; + this->_alpha = (float)(GHIDRA_INT(argb) >> 0x18 & 0xff) / 255.0; return this; } diff --git a/src/game/kage/eos_manager.cpp b/src/game/kage/eos_manager.cpp index 609779e..14a27fa 100644 --- a/src/game/kage/eos_manager.cpp +++ b/src/game/kage/eos_manager.cpp @@ -42,7 +42,7 @@ undefined1 KAGE::EosManager::FUN_00a649b0() CHAR tempPath [1032]; uint local_c; - local_c = __security_cookie ^ (uint)auStack_48c; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_48c); if ((*(byte *)(in_ECX + 4) & 1) == 0) { FUN_00a24530(); FUN_00a24530(); @@ -51,7 +51,7 @@ undefined1 KAGE::EosManager::FUN_00a649b0() cVar1 = *lengthCursor; lengthCursor = lengthCursor + 1; } while (cVar1 != '\0'); - if (0x40 < (uint)((int)lengthCursor - (int)(DAT_00c79a14 + 1))) { + if (0x40 < GHIDRA_UINT((GHIDRA_INT(lengthCursor) - GHIDRA_INT((DAT_00c79a14 + 1))))) { KAGE_LogMessage(0x10,(byte *) "Specified product ID is not valid: It is longer than the allowed size of %d\n" ); @@ -61,7 +61,7 @@ undefined1 KAGE::EosManager::FUN_00a649b0() cVar1 = *lengthCursor; lengthCursor = lengthCursor + 1; } while (cVar1 != '\0'); - if (0x40 < (uint)((int)lengthCursor - (int)(DAT_00c79a18 + 1))) { + if (0x40 < GHIDRA_UINT((GHIDRA_INT(lengthCursor) - GHIDRA_INT((DAT_00c79a18 + 1))))) { KAGE_LogMessage(0x10,(byte *) "Specified sandbox ID is not valid: It is longer than the allowed size of %d\n" ); @@ -71,7 +71,7 @@ undefined1 KAGE::EosManager::FUN_00a649b0() cVar1 = *lengthCursor; lengthCursor = lengthCursor + 1; } while (cVar1 != '\0'); - if (0x40 < (uint)((int)lengthCursor - (int)(DAT_00c79a1c + 1))) { + if (0x40 < GHIDRA_UINT((GHIDRA_INT(lengthCursor) - GHIDRA_INT((DAT_00c79a1c + 1))))) { KAGE_LogMessage(0x10,(byte *) "Specified deployment ID is not valid: It is longer than the allowed size of %d\n" ); @@ -81,7 +81,7 @@ undefined1 KAGE::EosManager::FUN_00a649b0() cVar1 = *lengthCursor; lengthCursor = lengthCursor + 1; } while (cVar1 != '\0'); - if (0x40 < (uint)((int)lengthCursor - (int)(DAT_00c79a20 + 1))) { + if (0x40 < GHIDRA_UINT((GHIDRA_INT(lengthCursor) - GHIDRA_INT((DAT_00c79a20 + 1))))) { KAGE_LogMessage(0x10,(byte *) "Specified client ID is not valid: It is longer than the allowed size of %d\n" ); @@ -91,7 +91,7 @@ undefined1 KAGE::EosManager::FUN_00a649b0() cVar1 = *lengthCursor; lengthCursor = lengthCursor + 1; } while (cVar1 != '\0'); - if (0x40 < (uint)((int)lengthCursor - (int)(DAT_00c79a24 + 1))) { + if (0x40 < GHIDRA_UINT((GHIDRA_INT(lengthCursor) - GHIDRA_INT((DAT_00c79a24 + 1))))) { KAGE_LogMessage(0x10,(byte *) "Specified client secret is not valid: It is longer than the allowed size of %d\n" ); @@ -101,7 +101,7 @@ undefined1 KAGE::EosManager::FUN_00a649b0() cVar1 = *lengthCursor; lengthCursor = lengthCursor + 1; } while (cVar1 != '\0'); - if (0x40 < (uint)((int)lengthCursor - (int)(DAT_00c79a28 + 1))) { + if (0x40 < GHIDRA_UINT((GHIDRA_INT(lengthCursor) - GHIDRA_INT((DAT_00c79a28 + 1))))) { KAGE_LogMessage(0x10,(byte *) "Specified encryption key is not valid: It is longer than the allowed size of %d\n" ); @@ -158,7 +158,7 @@ undefined1 KAGE::EosManager::FUN_00a649b0() lobbyInterface = _EOS_Platform_GetLobbyInterface_4(g_eosPlatform,auStack_492 + -0x12,0,FUN_00a60c50); notifyId = _EOS_Lobby_AddNotifyJoinLobbyAccepted_16(lobbyInterface); - local_c = (uint)notifyId; + local_c = GHIDRA_UINT(notifyId); *(uint *)(in_ECX + 4) = *(uint *)(in_ECX + 4) | 1; *(undefined8 *)(in_ECX + 0x48) = notifyId; } diff --git a/src/game/kage/filesys/archived_file.cpp b/src/game/kage/filesys/archived_file.cpp index 089f336..ad1097d 100644 --- a/src/game/kage/filesys/archived_file.cpp +++ b/src/game/kage/filesys/archived_file.cpp @@ -22,7 +22,7 @@ void KAGE::Filesys::ArchivedFile::refill_buffer() byte *nextBlock; int *stream; - local_8 = __security_cookie ^ (uint)(xorKey + 0x84); + local_8 = __security_cookie ^ GHIDRA_UINT((xorKey + 0x84)); uVar5 = *(uint *)(*(int *)((char *)this + 0xc) + 0x10); if (uVar5 <= *(uint *)((char *)this + 0x18)) { *(undefined1 *)((char *)this + 0xc28) = 1; @@ -36,26 +36,26 @@ void KAGE::Filesys::ArchivedFile::refill_buffer() if ((void *)0x7ff < local_8c) { KAGE_LogMessage(0x10,(byte *)"ArchivedFile::refill_buffer LZW compressed buffer overflow.\n"); } - (**(code **)(**(int **)((char *)this + 8) + 0x14))((byte *)((int)this + 0x1c),1,local_8c); - bufferSize = lzw_decompress(*(void **)((char *)this + 0x10),(byte *)((int)this + 0x81c), - (byte *)((int)this + 0x1c),(uint)local_8c); + (**(code **)(**(int **)((char *)this + 8) + 0x14))((byte *)(GHIDRA_INT(this) + 0x1c),1,local_8c); + bufferSize = lzw_decompress(*(void **)((char *)this + 0x10),(byte *)(GHIDRA_INT(this) + 0x81c), + (byte *)(GHIDRA_INT(this) + 0x1c),GHIDRA_UINT(local_8c)); *(int *)((char *)this + 0xc20) = bufferSize; } else if (compression == '\x02') { (**(code **)(*stream + 0x14))(&local_8c,4,1); - pvVar2 = (void *)((uint)local_8c & 0x7fffffff); - uVar5 = (uint)local_8c >> 0x1f; + pvVar2 = (void *)(GHIDRA_UINT(local_8c) & 0x7fffffff); + uVar5 = GHIDRA_UINT(local_8c) >> 0x1f; local_8c = pvVar2; if ((void *)0x7ff < pvVar2) { KAGE_LogMessage(0x10,(byte *)"ArchivedFile::refill_buffer MiniZ compressed buffer overflow.\n" ); } - (**(code **)(**(int **)((char *)this + 8) + 0x14))((int)this + 0x1c,1,local_8c); - uVar1 = FUN_00a89f80((int)this + 0x81c,0x400,(int)this + 0x1c,local_8c,uVar5); + (**(code **)(**(int **)((char *)this + 8) + 0x14))(GHIDRA_INT(this) + 0x1c,1,local_8c); + uVar1 = FUN_00a89f80(GHIDRA_INT(this) + 0x81c,0x400,GHIDRA_INT(this) + 0x1c,local_8c,uVar5); *(undefined4 *)((char *)this + 0xc20) = uVar1; } else if (compression == '\x05') { - uVar1 = (**(code **)(*stream + 0x14))((int)this + 0x81c,1,0x400); + uVar1 = (**(code **)(*stream + 0x14))(GHIDRA_INT(this) + 0x81c,1,0x400); *(undefined4 *)((char *)this + 0xc20) = uVar1; xorKey[0] = 0xb0; xorKey[1] = 0x22; @@ -69,17 +69,17 @@ void KAGE::Filesys::ArchivedFile::refill_buffer() xorKey[9] = 0x37; xorKey[10] = 0xfb; xorKey[0xb] = 0xd2; - iVar7 = -0x81c - (int)this; + iVar7 = -0x81c - GHIDRA_INT(this); xorKey[0xc] = 0xc0; xorKey[0xd] = 0x31; xorKey[0xe] = 0x86; xorKey[0xf] = 0xfd; - iVar6 = -0x81b - (int)this; + iVar6 = -0x81b - GHIDRA_INT(this); xorKey[0x10] = 0xb5; xorKey[0x11] = 0xdd; xorKey[0x12] = 0xac; xorKey[0x13] = 0x4b; - bufferSize = -0x81a - (int)this; + bufferSize = -0x81a - GHIDRA_INT(this); xorKey[0x14] = 0xb4; xorKey[0x15] = 1; xorKey[0x16] = 0x15; @@ -88,7 +88,7 @@ void KAGE::Filesys::ArchivedFile::refill_buffer() xorKey[0x19] = 10; xorKey[0x1a] = 0x75; xorKey[0x1b] = 8; - iVar3 = -0x81d - (int)this; + iVar3 = -0x81d - GHIDRA_INT(this); xorKey[0x1c] = 0x5d; xorKey[0x1d] = 0x50; xorKey[0x1e] = 0xfe; @@ -189,16 +189,16 @@ void KAGE::Filesys::ArchivedFile::refill_buffer() xorKey[0x7d] = 0x28; xorKey[0x7e] = 0xb2; xorKey[0x7f] = 0x34; - byteCursor = (byte *)((int)this + 0x81d); + byteCursor = (byte *)(GHIDRA_INT(this) + 0x81d); do { - byteCursor[-1] = byteCursor[-1] ^ xorKey[(uint)(byteCursor + iVar3) & 0x7f]; - *byteCursor = *byteCursor ^ xorKey[(uint)(byteCursor + iVar7) & 0x7f]; - byteCursor[1] = byteCursor[1] ^ xorKey[(uint)(byteCursor + iVar6) & 0x7f]; + byteCursor[-1] = byteCursor[-1] ^ xorKey[GHIDRA_UINT((byteCursor + iVar3)) & 0x7f]; + *byteCursor = *byteCursor ^ xorKey[GHIDRA_UINT((byteCursor + iVar7)) & 0x7f]; + byteCursor[1] = byteCursor[1] ^ xorKey[GHIDRA_UINT((byteCursor + iVar6)) & 0x7f]; nextBlock = byteCursor + 4; - byteCursor[2] = byteCursor[2] ^ xorKey[(uint)(byteCursor + bufferSize) & 0x7f]; + byteCursor[2] = byteCursor[2] ^ xorKey[GHIDRA_UINT((byteCursor + bufferSize)) & 0x7f]; byteCursor = nextBlock; this = local_8c; - } while ((int)(nextBlock + iVar3) < 0x400); + } while (GHIDRA_INT((nextBlock + iVar3)) < 0x400); } else { bufferSize = (uVar5 - *(uint *)((char *)this + 0x18)) + 3 & 0xfffffffc; @@ -206,10 +206,10 @@ void KAGE::Filesys::ArchivedFile::refill_buffer() if (bufferSize < 0x400) { uVar5 = bufferSize; } - uVar1 = (**(code **)(*stream + 0x14))((int)this + 0x81c,1,uVar5); + uVar1 = (**(code **)(*stream + 0x14))(GHIDRA_INT(this) + 0x81c,1,uVar5); uVar5 = *(uint *)((char *)this + 0xc24); *(undefined4 *)((char *)this + 0xc20) = uVar1; - cursor = (undefined1 *)((int)this + 0x81d); + cursor = (undefined1 *)(GHIDRA_INT(this) + 0x81d); bufferSize = 0x100; do { decrypted = *(uint *)(cursor + -1) ^ uVar5; @@ -301,9 +301,9 @@ void KAGE::Filesys::ArchivedFile::refill_buffer(uint byteCount) int *innerStream; byte *nextXorCursor; - local_8 = __security_cookie ^ (int)register0x00000010 - 4U; + local_8 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; bufferSize = *(uint *)((char *)this + 0xc1c); - uVar3 = -(uint)(bufferSize < *(uint *)((char *)this + 0xc20)) & *(uint *)((char *)this + 0xc20) - bufferSize; + uVar3 = -GHIDRA_UINT((bufferSize < *(uint *)((char *)this + 0xc20))) & *(uint *)((char *)this + 0xc20) - bufferSize; uVar4 = byteCount; if (uVar3 < byteCount) { uVar4 = uVar3; @@ -327,9 +327,9 @@ void KAGE::Filesys::ArchivedFile::refill_buffer(uint byteCount) KAGE_LogMessage(0x10,(byte *) "ArchivedFile::refill_buffer LZW compressed buffer overflow.\n"); } - (**(code **)(**(int **)((char *)this + 8) + 0x14))((byte *)((int)this + 0x1c),1,lzwChunkSize); - iVar2 = lzw_decompress(*(void **)((char *)this + 0x10),(byte *)((int)this + 0x81c), - (byte *)((int)this + 0x1c),lzwChunkSize); + (**(code **)(**(int **)((char *)this + 8) + 0x14))((byte *)(GHIDRA_INT(this) + 0x1c),1,lzwChunkSize); + iVar2 = lzw_decompress(*(void **)((char *)this + 0x10),(byte *)(GHIDRA_INT(this) + 0x81c), + (byte *)(GHIDRA_INT(this) + 0x1c),lzwChunkSize); *(int *)((char *)this + 0xc20) = iVar2; } else if (compressionType == '\x02') { @@ -341,12 +341,12 @@ void KAGE::Filesys::ArchivedFile::refill_buffer(uint byteCount) KAGE_LogMessage(0x10,(byte *) "ArchivedFile::refill_buffer MiniZ compressed buffer overflow.\n"); } - (**(code **)(**(int **)((char *)this + 8) + 0x14))((int)this + 0x1c,1,minizChunkSize); - bufferSize = FUN_00a89f80((int)this + 0x81c,0x400,(int)this + 0x1c,minizChunkSize,bufferSize); + (**(code **)(**(int **)((char *)this + 8) + 0x14))(GHIDRA_INT(this) + 0x1c,1,minizChunkSize); + bufferSize = FUN_00a89f80(GHIDRA_INT(this) + 0x81c,0x400,GHIDRA_INT(this) + 0x1c,minizChunkSize,bufferSize); *(undefined4 *)((char *)this + 0xc20) = bufferSize; } else if (compressionType == '\x05') { - bufferSize = (**(code **)(*innerStream + 0x14))((int)this + 0x81c,1,0x400); + bufferSize = (**(code **)(*innerStream + 0x14))(GHIDRA_INT(this) + 0x81c,1,0x400); *(undefined4 *)((char *)this + 0xc20) = bufferSize; xorKey = 0x475d22b0; local_84 = 0xd1591bd3; @@ -380,22 +380,22 @@ void KAGE::Filesys::ArchivedFile::refill_buffer(uint byteCount) local_14 = 0x69e4c34b; local_10 = 0x2cbd3274; local_c = 0x34b22842; - xorCursor = (byte *)((int)this + 0x81d); + xorCursor = (byte *)(GHIDRA_INT(this) + 0x81d); do { xorCursor[-1] = xorCursor[-1] ^ - *(byte *)((int)&xorKey + ((uint)(xorCursor + (-0x81d - (int)this)) & 0x7f)); + *(byte *)(GHIDRA_INT(&xorKey) + (GHIDRA_UINT((xorCursor + (-0x81d - GHIDRA_INT(this)))) & 0x7f)); *xorCursor = *xorCursor ^ - *(byte *)((int)&xorKey + ((uint)(xorCursor + (-0x81c - (int)this)) & 0x7f)); + *(byte *)(GHIDRA_INT(&xorKey) + (GHIDRA_UINT((xorCursor + (-0x81c - GHIDRA_INT(this)))) & 0x7f)); xorCursor[1] = xorCursor[1] ^ - *(byte *)((int)&xorKey + ((uint)(xorCursor + (-0x81b - (int)this)) & 0x7f)) + *(byte *)(GHIDRA_INT(&xorKey) + (GHIDRA_UINT((xorCursor + (-0x81b - GHIDRA_INT(this)))) & 0x7f)) ; nextXorCursor = xorCursor + 4; xorCursor[2] = xorCursor[2] ^ - *(byte *)((int)&xorKey + ((uint)(xorCursor + (-0x81a - (int)this)) & 0x7f)) + *(byte *)(GHIDRA_INT(&xorKey) + (GHIDRA_UINT((xorCursor + (-0x81a - GHIDRA_INT(this)))) & 0x7f)) ; xorCursor = nextXorCursor; - } while ((int)(nextXorCursor + (-0x81d - (int)this)) < 0x400); + } while (GHIDRA_INT((nextXorCursor + (-0x81d - GHIDRA_INT(this)))) < 0x400); } else { uVar4 = (bufferSize - uVar3) + 3 & 0xfffffffc; @@ -403,10 +403,10 @@ void KAGE::Filesys::ArchivedFile::refill_buffer(uint byteCount) if (uVar4 < 0x400) { bufferSize = uVar4; } - bufferSize = (**(code **)(*innerStream + 0x14))((int)this + 0x81c,1,bufferSize); + bufferSize = (**(code **)(*innerStream + 0x14))(GHIDRA_INT(this) + 0x81c,1,bufferSize); bufferSize = *(uint *)((char *)this + 0xc24); *(undefined4 *)((char *)this + 0xc20) = bufferSize; - shuffleCursor = (undefined1 *)((int)this + 0x81d); + shuffleCursor = (undefined1 *)(GHIDRA_INT(this) + 0x81d); iVar2 = 0x100; do { uVar3 = *(uint *)(shuffleCursor + -1) ^ bufferSize; diff --git a/src/game/kage/filesys/buffered_stream.cpp b/src/game/kage/filesys/buffered_stream.cpp index d791790..8aca595 100644 --- a/src/game/kage/filesys/buffered_stream.cpp +++ b/src/game/kage/filesys/buffered_stream.cpp @@ -8,19 +8,19 @@ void * KAGE::Filesys::BufferedStream::operator_assign(void *other) int *buffer; void *srcData; - buffer = (int *)((int)this + 0xc); + buffer = (int *)(GHIDRA_INT(this) + 0xc); *(undefined4 *)((char *)this + 4) = *(undefined4 *)((char *)other + 4); *(undefined4 *)((char *)this + 8) = *(undefined4 *)((char *)other + 8); - if (buffer != (int *)((int)other + 0xc)) { + if (buffer != (int *)(GHIDRA_INT(other) + 0xc)) { srcData = *(void **)((char *)other + 0xc); dstData = (void *)*buffer; - dataSize = *(int *)((char *)other + 0x10) - (int)srcData; - if ((uint)(*(int *)((char *)this + 0x14) - (int)dstData) < dataSize) { + dataSize = *(int *)((char *)other + 0x10) - GHIDRA_INT(srcData); + if (GHIDRA_UINT((*(int *)((char *)this + 0x14) - GHIDRA_INT(dstData))) < dataSize) { std::vector::_Clear_and_reserve(dataSize); dstData = (void *)*buffer; } memmove(dstData,srcData,dataSize); - *(uint *)((char *)this + 0x10) = dataSize + (int)dstData; + *(uint *)((char *)this + 0x10) = dataSize + GHIDRA_INT(dstData); } *(undefined4 *)((char *)this + 0x18) = *(undefined4 *)((char *)other + 0x18); *(undefined4 *)((char *)this + 0x1c) = *(undefined4 *)((char *)other + 0x1c); @@ -42,7 +42,7 @@ byte KAGE::Filesys::BufferedStream::rebuffer() remainingBytes = *(int *)((char *)this + 4) - *(int *)((char *)this + 0x20); *(int *)((char *)this + 0x24) = *(int *)((char *)this + 0x20); readBytes = 0; - if (-1 < (int)remainingBytes) { + if (-1 < GHIDRA_INT(remainingBytes)) { readBytes = remainingBytes; } *(undefined4 *)((char *)this + 0x1c) = 0; @@ -91,7 +91,7 @@ KAGE::Filesys::BufferedStream::BufferedStream(int bufferSize) available = *(int *)((char *)this + 4) - *(int *)((char *)this + 0x20); *(int *)((char *)this + 0x24) = *(int *)((char *)this + 0x20); fillSize = 0; - if (-1 < (int)available) { + if (-1 < GHIDRA_INT(available)) { fillSize = available; } if (*(uint *)((char *)this + 8) < fillSize) { diff --git a/src/game/kage/filesys/file_map.cpp b/src/game/kage/filesys/file_map.cpp index fca32b3..243e7d0 100644 --- a/src/game/kage/filesys/file_map.cpp +++ b/src/game/kage/filesys/file_map.cpp @@ -30,19 +30,19 @@ void KAGE::Filesys::FileMap::scan_directory(byte *param_1, byte *param_2) local_8 = 0xffffffff; puStack_c = &LAB_00b132d5; local_10 = ExceptionList; - uVar5 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar5 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; pbVar6 = path_join(param_2,param_1,0,0); entriesBegin = (byte *)0x0; entriesEnd = (byte *)0x0; entriesCapacity = 0; local_8 = 0; - win32_opendir(pbVar6,(int)&entriesBegin); + win32_opendir(pbVar6,GHIDRA_INT(&entriesBegin)); subdirsEnd = (undefined4 *)0x0; local_38 = (undefined4 *)0x0; local_18 = (undefined4 *)0x0; - local_8 = CONCAT31(local_8._1_3_,1); - entryCount = (byte *)((int)entriesEnd - (int)entriesBegin >> 3); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); + entryCount = (byte *)(GHIDRA_INT(entriesEnd) - GHIDRA_INT(entriesBegin) >> 3); local_1c = (byte *)0x0; if (entryCount != (byte *)0x0) { pbVar6 = entriesBegin + 4; @@ -66,7 +66,7 @@ void KAGE::Filesys::FileMap::scan_directory(byte *param_1, byte *param_2) else { pbVar7 = path_join(*(byte **)pbVar6,param_2,0,0); pathHash = KAGE_Filesys_FileManager::GetPrimaryFilePathHash(pbVar7); - mapSlot = map_find_value(local_20 + 1,(uint)&pathHash); + mapSlot = map_find_value(local_20 + 1,GHIDRA_UINT(&pathHash)); *mapSlot = pbVar7; pbVar7 = local_1c; } @@ -75,7 +75,7 @@ void KAGE::Filesys::FileMap::scan_directory(byte *param_1, byte *param_2) } while (local_1c < entryCount); } subdirIndex = 0; - if ((int)subdirsEnd >> 2 != 0) { + if (GHIDRA_INT(subdirsEnd) >> 2 != 0) { do { (**(code **)(*local_20 + 0x18))(param_1,*(undefined4 *)(subdirIndex * 4),uVar5); iVar1 = *(int *)(subdirIndex * 4); @@ -84,19 +84,19 @@ void KAGE::Filesys::FileMap::scan_directory(byte *param_1, byte *param_2) allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar2 = *(uint *)(iVar1 + -4); qVar3 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar2; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar2; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar3 < uVar2); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar3) < uVar2)); free((void *)(iVar1 + -4)); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); *(undefined4 *)(subdirIndex * 4) = 0; } subdirIndex = subdirIndex + 1; - } while (subdirIndex < (uint)((int)subdirsEnd >> 2)); + } while (subdirIndex < GHIDRA_UINT((GHIDRA_INT(subdirsEnd) >> 2))); } pbVar4 = entriesEnd; pbVar7 = entriesBegin; @@ -108,13 +108,13 @@ void KAGE::Filesys::FileMap::scan_directory(byte *param_1, byte *param_2) allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar5 = *(uint *)(iVar1 + -4); qVar3 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar5; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar5; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar3 < uVar5); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar3) < uVar5)); free((void *)(iVar1 + -4)); pbVar6[4] = 0; pbVar6[5] = 0; @@ -122,12 +122,12 @@ void KAGE::Filesys::FileMap::scan_directory(byte *param_1, byte *param_2) pbVar6[7] = 0; } } - uVar5 = entriesCapacity - (int)pbVar7 & 0xfffffff8; + uVar5 = entriesCapacity - GHIDRA_INT(pbVar7) & 0xfffffff8; pbVar6 = pbVar7; if (0xfff < uVar5) { pbVar6 = *(byte **)(pbVar7 + -4); uVar5 = uVar5 + 0x23; - if ((byte *)0x1f < pbVar7 + (-4 - (int)pbVar6)) { + if ((byte *)0x1f < pbVar7 + (-4 - GHIDRA_INT(pbVar6))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } diff --git a/src/game/kage/graphics/graphics_buffer_object.cpp b/src/game/kage/graphics/graphics_buffer_object.cpp index a791114..0f6a0e6 100644 --- a/src/game/kage/graphics/graphics_buffer_object.cpp +++ b/src/game/kage/graphics/graphics_buffer_object.cpp @@ -11,7 +11,7 @@ KAGE::Graphics::GraphicsBufferObject::GraphicsBufferObject() puStack_c = &LAB_00b1329c; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; *(undefined4 *)((char *)this + 4) = 0; *(undefined4 *)((char *)this + 8) = 0; @@ -20,7 +20,7 @@ KAGE::Graphics::GraphicsBufferObject::GraphicsBufferObject() *(undefined ***)this = vftable; FUN_00a68360(uVar1); countedArray = operator_new_tracked(0x18); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); if (countedArray == (undefined4 *)0x0) { *(undefined4 *)((char *)this + 4) = 0; ExceptionList = local_10; diff --git a/src/game/kage/graphics/image_base.cpp b/src/game/kage/graphics/image_base.cpp index 58b9a3d..5e1d42a 100644 --- a/src/game/kage/graphics/image_base.cpp +++ b/src/game/kage/graphics/image_base.cpp @@ -17,7 +17,7 @@ void KAGE::Graphics::ImageBase::set_palette(undefined4 param_1, uint param_2) puStack_c = &LAB_00b10b9d; local_10 = ExceptionList; ExceptionList = &local_10; - cVar1 = (**(code **)(*in_ECX + 8))(__security_cookie ^ (int)register0x00000010 - 4U); + cVar1 = (**(code **)(*in_ECX + 8))(__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); if (cVar1 == '\0') { KAGE_LogMessage(0x10,(byte *)"Attempting to set palette on an image that isn\'t indexed\n"); } @@ -35,12 +35,12 @@ void KAGE::Graphics::ImageBase::set_palette(undefined4 param_1, uint param_2) } else { FUN_00a69950(); - *extraout_ECX = (int)ImagePalette::vftable; + *extraout_ECX = GHIDRA_INT(ImagePalette)::vftable; extraout_ECX[2] = extraout_ECX[2] | 4; extraout_ECX[3] = extraout_ECX[3]; piVar3 = extraout_ECX; } - in_ECX[0xb] = (int)piVar3; + in_ECX[0xb] = GHIDRA_INT(piVar3); stream = Filesys::BufferedStream::vftable; local_8 = 0; cVar1 = (**(code **)(*piVar3 + 0x38))(&stream,&DAT_00c943d8); diff --git a/src/game/kage/graphics/manager.cpp b/src/game/kage/graphics/manager.cpp index cc4fc2c..5da4dc2 100644 --- a/src/game/kage/graphics/manager.cpp +++ b/src/game/kage/graphics/manager.cpp @@ -31,7 +31,7 @@ KAGE::Graphics::Manager::Manager() _DAT_00c79914 = operator_new(8); _DAT_00c79914[1] = 0; *_DAT_00c79914 = &DAT_00c79914; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; _DAT_00c7994c = (undefined4 *)0x0; DAT_00c79950 = 0; DAT_00c79954 = 0; @@ -43,7 +43,7 @@ KAGE::Graphics::Manager::Manager() _DAT_00c79960 = 0; DAT_00c79964 = 0; DAT_00c79968 = 0; - local_8 = CONCAT31(local_8._1_3_,3); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); DAT_00c7996c = (void *)0x0; DAT_00c79970 = 0; DAT_00c7996c = operator_new(0x18); @@ -84,19 +84,19 @@ KAGE::Graphics::Manager::Manager() DAT_00c799b8 = operator_new(0x10); *(void **)DAT_00c799b8 = DAT_00c799b8; *(void **)((char *)DAT_00c799b8 + 4) = DAT_00c799b8; - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; _DAT_00c799c0 = (void *)0x0; _DAT_00c799c4 = 0; _DAT_00c799c0 = operator_new(0x10); *(void **)_DAT_00c799c0 = _DAT_00c799c0; *(void **)((char *)_DAT_00c799c0 + 4) = _DAT_00c799c0; - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; _DAT_00c799c8 = (void *)0x0; _DAT_00c799cc = 0; _DAT_00c799c8 = operator_new(0x10); *(void **)_DAT_00c799c8 = _DAT_00c799c8; *(void **)((char *)_DAT_00c799c8 + 4) = _DAT_00c799c8; - local_8 = CONCAT31(local_8._1_3_,7); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),7); DAT_00c799d0 = (void *)0x0; _DAT_00c799d4 = 0; DAT_00c799d0 = operator_new(0x10); @@ -139,7 +139,7 @@ undefined1 KAGE::Graphics::Manager::FUN_00a649b0() local_10 = ExceptionList; ExceptionList = &local_10; DAT_00c7de7c = FUN_00a19dd0; - iVar2 = glfwInit(__security_cookie ^ (int)register0x00000010 - 4U); + iVar2 = glfwInit(__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); if (iVar2 != 1) { KAGE_LogMessage(0x10,(byte *)"GLFW failed to initialize\n"); } diff --git a/src/game/kage/graphics/shader_base.cpp b/src/game/kage/graphics/shader_base.cpp index c9c4e23..2cce5dd 100644 --- a/src/game/kage/graphics/shader_base.cpp +++ b/src/game/kage/graphics/shader_base.cpp @@ -32,13 +32,13 @@ void KAGE::Graphics::ShaderBase::free_uniforms() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar3 = *(uint *)(iVar5 + -4); previousAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar3; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar3; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)previousAllocatedBytes < uVar3); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(previousAllocatedBytes) < uVar3)); free((void *)(iVar5 + -4)); *(undefined4 *)(*(int *)((char *)this + 0xc) + uVar2 * 8) = 0; } @@ -64,14 +64,14 @@ void KAGE::Graphics::ShaderBase::free_uniforms() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } blockSize = *(uint *)(iVar4 + -4); previousAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - blockSize; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - blockSize; *(uint *)((char *)allocatedBytes + 4) = *(uint *)((char *)allocatedBytes + 4) - - (uint)((uint)previousAllocatedBytes < blockSize); + GHIDRA_UINT((GHIDRA_UINT(previousAllocatedBytes) < blockSize)); free((void *)(iVar4 + -4)); *(undefined4 *)(*(int *)(iVar5 + 0xc) + uVar3 * 4) = 0; } @@ -84,7 +84,7 @@ void KAGE::Graphics::ShaderBase::free_uniforms() *(int *)(iVar5 + 0x10) = iVar1; iVar5 = *(int *)((char *)this + 0x38); iVar4 = *(int *)((char *)this + 0x34); - } while (uniformIndex < (uint)((iVar5 - iVar4) / 0x18)); + } while (uniformIndex < GHIDRA_UINT(((iVar5 - iVar4) / 0x18))); } if (iVar4 != iVar5) { do { @@ -95,7 +95,7 @@ void KAGE::Graphics::ShaderBase::free_uniforms() } *(int *)((char *)this + 0x38) = iVar4; iVar5 = 8; - bufferSlot = (int *)((int)this + 0x14); + bufferSlot = (int *)(GHIDRA_INT(this) + 0x14); do { iVar4 = *bufferSlot; if (iVar4 != 0) { @@ -103,13 +103,13 @@ void KAGE::Graphics::ShaderBase::free_uniforms() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar2 = *(uint *)(iVar4 + -4); previousAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar2; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar2; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)previousAllocatedBytes < uVar2); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(previousAllocatedBytes) < uVar2)); free((void *)(iVar4 + -4)); *bufferSlot = 0; } @@ -125,14 +125,14 @@ void KAGE::Graphics::ShaderBase::free_uniforms() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar2 = *(uint *)(iVar5 + -4); previousAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar2; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar2; freeFn = free_exref; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)previousAllocatedBytes < uVar2); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(previousAllocatedBytes) < uVar2)); free((void *)(iVar5 + -4)); *(undefined4 *)((char *)this + 8) = 0; } @@ -142,13 +142,13 @@ void KAGE::Graphics::ShaderBase::free_uniforms() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar2 = *(uint *)(iVar5 + -4); previousAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar2; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar2; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)previousAllocatedBytes < uVar2); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(previousAllocatedBytes) < uVar2)); (*freeFn)(iVar5 + -4); *(undefined4 *)((char *)this + 0xc) = 0; } diff --git a/src/game/kage/input/input_device.cpp b/src/game/kage/input/input_device.cpp index 38239f3..83412ba 100644 --- a/src/game/kage/input/input_device.cpp +++ b/src/game/kage/input/input_device.cpp @@ -152,7 +152,7 @@ LAB_00a1f4c9: bindSlot = *(int *)((char *)this + 0xcc); bindingTable = *(int *)((char *)this + 0x10); uVar3 = *(uint *)((char *)this + 200); - if ((uint)(*(int *)((char *)this + 0x14) - bindingTable >> 4) <= uVar3) { + if (GHIDRA_UINT((*(int *)((char *)this + 0x14) - bindingTable >> 4)) <= uVar3) { KAGE_LogMessage(0x10,(byte *)"ActionId is out of range\n"); bindingTable = *(int *)((char *)this + 0x10); } @@ -168,18 +168,18 @@ LAB_00a1f4c9: uVar6 = 0; fStack_10 = fVar8; timeNs = GetTimeNs(); - uVar5 = (uint)(timeNs >> 0x20); + uVar5 = GHIDRA_UINT((timeNs >> 0x20)); uVar10 = (ulonglong)uVar5 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); - uVar4 = (uint)(uVar10 >> 0x20); + uVar4 = GHIDRA_UINT((uVar10 >> 0x20)); fVar9 = *(float *)((char *)this + 0xd8); - uVar3 = (uint)((timeNs & 0xffffffff) * 0x431bde82 + (uVar10 & 0xffffffff) >> 0x20); + uVar3 = GHIDRA_UINT(((timeNs & 0xffffffff) * 0x431bde82 + (uVar10 & 0xffffffff) >> 0x20)); lVar1 = (ulonglong)uVar5 * 0x431bde82 + (ulonglong)CONCAT14(CARRY4(uVar4,uVar3),uVar4 + uVar3) ; - uVar5 = (uint)((ulonglong)lVar1 >> 0x20); - uVar3 = (uint)lVar1 >> 0x12 | uVar5 * 0x4000; + uVar5 = GHIDRA_UINT(((ulonglong)lVar1 >> 0x20)); + uVar3 = GHIDRA_UINT(lVar1) >> 0x12 | uVar5 * 0x4000; afStack_18[0] = fVar9; if (((uVar5 >> 0x12) - *(int *)((char *)this + 0xe4) != - (uint)(uVar3 < *(uint *)((char *)this + 0xe0))) || (uVar3 != *(uint *)((char *)this + 0xe0))) { + GHIDRA_UINT((uVar3 < *(uint *)((char *)this + 0xe0)))) || (uVar3 != *(uint *)((char *)this + 0xe0))) { FUN_00aefe20(); fVar9 = afStack_18[0] - (float)(double)CONCAT44(uVar6,fVar8) * 0.001; *(float *)((char *)this + 0xd8) = fVar9; @@ -194,15 +194,15 @@ LAB_00a1f4c9: } (**(code **)(*(int *)this + 0x84))(fVar9,fVar8); uVar10 = GetTimeNs(); - uVar5 = (uint)(uVar10 >> 0x20); + uVar5 = GHIDRA_UINT((uVar10 >> 0x20)); lVar1 = (uVar10 & 0xffffffff) * 0x431bde82; lVar2 = (ulonglong)uVar5 * 0xd7b634db + ((uVar10 & 0xffffffff) * 0xd7b634db >> 0x20); - uVar4 = (uint)((ulonglong)lVar2 >> 0x20); - uVar3 = (int)((ulonglong)lVar1 >> 0x20) + (uint)CARRY4((uint)lVar1,(uint)lVar2); + uVar4 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); + uVar3 = GHIDRA_INT(((ulonglong)lVar1 >> 0x20)) + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar1),GHIDRA_UINT(lVar2))); lVar1 = (ulonglong)uVar5 * 0x431bde82 + (ulonglong)CONCAT14(CARRY4(uVar4,uVar3),uVar4 + uVar3) ; - uVar3 = (uint)((ulonglong)lVar1 >> 0x20); - *(uint *)(unaff_ESI + 0xe0) = (uint)lVar1 >> 0x12 | uVar3 * 0x4000; + uVar3 = GHIDRA_UINT(((ulonglong)lVar1 >> 0x20)); + *(uint *)(unaff_ESI + 0xe0) = GHIDRA_UINT(lVar1) >> 0x12 | uVar3 * 0x4000; *(uint *)(unaff_ESI + 0xe4) = uVar3 >> 0x12; return 1; } diff --git a/src/game/kage/input/input_device_gamepad.cpp b/src/game/kage/input/input_device_gamepad.cpp index 925a380..7431fa2 100644 --- a/src/game/kage/input/input_device_gamepad.cpp +++ b/src/game/kage/input/input_device_gamepad.cpp @@ -20,7 +20,7 @@ void KAGE::Input::InputDeviceGamepad::vfunc_30() float axisRest; local_EAX_6 = 0; - local_ECX_26 = DAT_00c79bf0 - (int)g_gamepadDevices >> 2; + local_ECX_26 = DAT_00c79bf0 - GHIDRA_INT(g_gamepadDevices) >> 2; if (local_ECX_26 != 0) { do { piVar2 = g_gamepadDevices[local_EAX_6]; @@ -30,7 +30,7 @@ void KAGE::Input::InputDeviceGamepad::vfunc_30() } local_EAX_6 = 0; uVar1 = *(ushort *)((char *)this + 8) & 0x20; - isPassUnbound = (uint)uVar1; + isPassUnbound = GHIDRA_UINT(uVar1); if (piVar2[5] != 0) goto LAB_00a229a0; goto LAB_00a22a04; } @@ -42,7 +42,7 @@ LAB_00a229a0: do { if (0x1f < local_EAX_6) break; local_ECX_26 = 0; - bindingCursor = (uint *)((int)this + 0x38c); + bindingCursor = (uint *)(GHIDRA_INT(this) + 0x38c); do { if (*bindingCursor == local_EAX_6) { boundButton = *(int *)((char *)this + local_ECX_26 * 8 + 0x388); @@ -67,7 +67,7 @@ LAB_00a229c9: *(uint *)((char *)this + 0x24) = *(uint *)((char *)this + 0x24) | maskHigh; } local_EAX_6 = local_EAX_6 + 1; - } while (local_EAX_6 < (uint)piVar2[5]); + } while (local_EAX_6 < GHIDRA_UINT(piVar2[5])); LAB_00a22a04: axisHalf = 0; savedDevice = piVar2; @@ -88,7 +88,7 @@ LAB_00a22a04: axisButton = 0xffffffff; if ((short)isPassUnbound == 0) { local_EAX_6 = 0; - axisBindingCursor = (int *)((int)this + 0x38c); + axisBindingCursor = (int *)(GHIDRA_INT(this) + 0x38c); do { piVar2 = savedDevice; if (*axisBindingCursor == axisHalf + 0xabab) { @@ -140,7 +140,7 @@ LAB_00a22ae2: *(float *)((char *)this + axisHalf * 4 + 0x40) = axisValue; } axisHalf = axisHalf + 1; - } while (axisHalf < (uint)(piVar2[4] * 2)); + } while (axisHalf < GHIDRA_UINT((piVar2[4] * 2))); } *(ushort *)((char *)this + 8) = *(ushort *)((char *)this + 8) | 0x40; return 1; diff --git a/src/game/kage/input/input_device_keyboard.cpp b/src/game/kage/input/input_device_keyboard.cpp index efbec76..efc7f7b 100644 --- a/src/game/kage/input/input_device_keyboard.cpp +++ b/src/game/kage/input/input_device_keyboard.cpp @@ -119,33 +119,33 @@ void KAGE::Input::InputDeviceKeyboard::vfunc_30() (**(code **)(*self + 0x68))(&local_40,1,0xcdcd); iStack_68 = local_38; iStack_64 = local_34; - uStack_5c._0_4_ = local_2c; - uStack_5c._4_4_ = local_28; + (*(undefined4 *)((char *)&(uStack_5c) + 0x0)) = local_2c; + (*(undefined4 *)((char *)&(uStack_5c) + 0x4)) = local_28; iStack_6c = iStack_98; - local_80._4_4_ = 1; + (*(undefined4 *)((char *)&(local_80) + 0x4)) = 1; iStack_60 = 0xcdcd; iStack_70 = unaff_ESI; memset(self + 0x3a,0,0x284); if ((local_2c & 3) == 0) { iStack_64 = iStack_98; - uStack_78._4_4_ = iStack_98; - uStack_5c = CONCAT44(uStack_5c._4_4_,3); + (*(undefined4 *)((char *)&(uStack_78) + 0x4)) = iStack_98; + uStack_5c = CONCAT44((*(undefined4 *)((char *)&(uStack_5c) + 0x4)),3); iStack_68 = unaff_ESI; - uStack_78._0_4_ = unaff_ESI; + (*(undefined4 *)((char *)&(uStack_78) + 0x0)) = unaff_ESI; } else { iStack_68 = local_40; iStack_64 = local_3c; - uStack_78._0_4_ = iStack_48; - uStack_78._4_4_ = iStack_44; - uStack_5c = CONCAT44(uStack_5c._4_4_,2); + (*(undefined4 *)((char *)&(uStack_78) + 0x0)) = iStack_48; + (*(undefined4 *)((char *)&(uStack_78) + 0x4)) = iStack_44; + uStack_5c = CONCAT44((*(undefined4 *)((char *)&(uStack_5c) + 0x4)),2); } if ((char)uStack_5c == '\0') { return 1; } - self[0x3a] = local_80._4_4_; - self[0x3b] = (int)uStack_78; - self[0x3c] = uStack_78._4_4_; + self[0x3a] = (*(undefined4 *)((char *)&(local_80) + 0x4)); + self[0x3b] = GHIDRA_INT(uStack_78); + self[0x3c] = (*(undefined4 *)((char *)&(uStack_78) + 0x4)); self[0x3d] = iStack_70; self[0x3e] = iStack_6c; self[0x3f] = iStack_68; diff --git a/src/game/kage/network/multiplayer/connection_base.cpp b/src/game/kage/network/multiplayer/connection_base.cpp index 2a9facd..5253536 100644 --- a/src/game/kage/network/multiplayer/connection_base.cpp +++ b/src/game/kage/network/multiplayer/connection_base.cpp @@ -30,55 +30,55 @@ void KAGE::Network::Multiplayer::ConnectionBase::Update() undefined8 local_10; undefined4 local_8; - local_8 = __security_cookie ^ (uint)(pingMessage + 0x14); + local_8 = __security_cookie ^ GHIDRA_UINT((pingMessage + 0x14)); connection = this; uVar11 = GetTimeNs(); - uVar8 = (uint)(uVar11 >> 0x20); + uVar8 = GHIDRA_UINT((uVar11 >> 0x20)); lVar2 = (uVar11 & 0xffffffff) * 0x431bde82; - node = (int)((ulonglong)lVar2 >> 0x20); + node = GHIDRA_INT(((ulonglong)lVar2 >> 0x20)); lVar3 = (ulonglong)uVar8 * 0x431bde82; local_1c = (int *)lVar3; lVar4 = (ulonglong)uVar8 * 0xd7b634db + ((uVar11 & 0xffffffff) * 0xd7b634db >> 0x20); local_2c = (undefined4)(lVar4 + lVar2); lVar3 = lVar3 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar4 >> 0x20), - node + (uint)CARRY4((uint)lVar2,(uint)lVar4)), - (int)((ulonglong)(lVar4 + lVar2) >> 0x20)); - uVar9 = (uint)((ulonglong)lVar3 >> 0x20); - uVar8 = (uint)lVar3 >> 0x12 | uVar9 * 0x4000; + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)), + node + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar2),GHIDRA_UINT(lVar4)))), + GHIDRA_INT(((ulonglong)(lVar4 + lVar2) >> 0x20))); + uVar9 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); + uVar8 = GHIDRA_UINT(lVar3) >> 0x12 | uVar9 * 0x4000; local_28 = ((uVar9 >> 0x12) - *(int *)((char *)connection + 0x1c)) - - (uint)(uVar8 < *(uint *)((char *)connection + 0x18)); + GHIDRA_UINT((uVar8 < *(uint *)((char *)connection + 0x18))); if ((local_28 != 0) || (1000 < uVar8 - *(uint *)((char *)connection + 0x18))) { uVar11 = GetTimeNs(); - uVar8 = (uint)(uVar11 >> 0x20); + uVar8 = GHIDRA_UINT((uVar11 >> 0x20)); lVar2 = (uVar11 & 0xffffffff) * 0x431bde82; - node = (int)((ulonglong)lVar2 >> 0x20); + node = GHIDRA_INT(((ulonglong)lVar2 >> 0x20)); lVar3 = (ulonglong)uVar8 * 0xd7b634db + ((uVar11 & 0xffffffff) * 0xd7b634db >> 0x20); local_2c = (undefined4)(lVar3 + lVar2); lVar2 = (ulonglong)uVar8 * 0x431bde82 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar3 >> 0x20), - node + (uint)CARRY4((uint)lVar2,(uint)lVar3)), - (int)((ulonglong)(lVar3 + lVar2) >> 0x20)); - uVar8 = (uint)((ulonglong)lVar2 >> 0x20); + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)), + node + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar2),GHIDRA_UINT(lVar3)))), + GHIDRA_INT(((ulonglong)(lVar3 + lVar2) >> 0x20))); + uVar8 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); local_1c = (int *)(uVar8 >> 0x12); strncpy(pingMessage,"ping",4); - local_10 = CONCAT44(local_1c,(uint)lVar2 >> 0x12 | uVar8 * 0x4000); - FUN_00a2a030((int)connection + 0xc,extraout_ECX,pingMessage); + local_10 = CONCAT44(local_1c,GHIDRA_UINT(lVar2) >> 0x12 | uVar8 * 0x4000); + FUN_00a2a030(GHIDRA_INT(connection) + 0xc,extraout_ECX,pingMessage); uVar11 = GetTimeNs(); - uVar8 = (uint)(uVar11 >> 0x20); + uVar8 = GHIDRA_UINT((uVar11 >> 0x20)); lVar2 = (uVar11 & 0xffffffff) * 0x431bde82; lVar3 = (ulonglong)uVar8 * 0x431bde82; local_1c = (int *)lVar3; lVar4 = (ulonglong)uVar8 * 0xd7b634db + ((uVar11 & 0xffffffff) * 0xd7b634db >> 0x20); local_2c = (undefined4)(lVar4 + lVar2); lVar3 = lVar3 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar4 >> 0x20), - (int)((ulonglong)lVar2 >> 0x20) + - (uint)CARRY4((uint)lVar2,(uint)lVar4)), - (int)((ulonglong)(lVar4 + lVar2) >> 0x20)); - uVar8 = (uint)((ulonglong)lVar3 >> 0x20); - *(uint *)((char *)connection + 0x18) = (uint)lVar3 >> 0x12 | uVar8 * 0x4000; + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)), + GHIDRA_INT(((ulonglong)lVar2 >> 0x20)) + + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar2),GHIDRA_UINT(lVar4)))), + GHIDRA_INT(((ulonglong)(lVar4 + lVar2) >> 0x20))); + uVar8 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); + *(uint *)((char *)connection + 0x18) = GHIDRA_UINT(lVar3) >> 0x12 | uVar8 * 0x4000; *(uint *)((char *)connection + 0x1c) = uVar8 >> 0x12; } node = **(int **)((char *)connection + 0x2c); @@ -88,15 +88,15 @@ void KAGE::Network::Multiplayer::ConnectionBase::Update() uVar12 = FUN_00a585c0(); local_1c = (int *)uVar12; uVar8 = __ftoui3(); - if (((int)((ulonglong)uVar12 >> 0x20) != 0) || (uVar8 < local_1c)) { + if ((GHIDRA_INT(((ulonglong)uVar12 >> 0x20)) != 0) || (uVar8 < local_1c)) { FUN_00a5a2f0(); this_00 = g_multiplayerService; iVar1 = *(int *)((char *)connection + 0x10); if (iVar1 == 0) { local_10 = 0; - local_10._4_4_ = 0; - local_10._0_4_ = 0; - local_28 = local_10._4_4_; + (*(undefined4 *)((char *)&(local_10) + 0x4)) = 0; + (*(undefined4 *)((char *)&(local_10) + 0x0)) = 0; + local_28 = (*(undefined4 *)((char *)&(local_10) + 0x4)); local_2c = (undefined4)local_10; } else { @@ -121,17 +121,17 @@ void KAGE::Network::Multiplayer::ConnectionBase::Update() } send_message(this_00,(ulonglong *)&local_2c,0,packet,packetRefCount); uVar13 = GetTimeNs(); - uVar8 = (uint)(uVar13 >> 0x20); + uVar8 = GHIDRA_UINT((uVar13 >> 0x20)); uVar11 = (uVar13 & 0xffffffff) * 0xd7b634db; lVar2 = (ulonglong)uVar8 * 0x431bde82; local_1c = (int *)lVar2; uVar5 = (ulonglong)uVar8 * 0xd7b634db + (uVar11 >> 0x20); - local_10 = CONCAT44((int)((ulonglong)lVar2 >> 0x20),(int)uVar11); - uVar9 = (uint)(uVar5 >> 0x20); - uVar8 = (uint)((uVar13 & 0xffffffff) * 0x431bde82 + (uVar5 & 0xffffffff) >> 0x20); + local_10 = CONCAT44(GHIDRA_INT(((ulonglong)lVar2 >> 0x20)),GHIDRA_INT(uVar11)); + uVar9 = GHIDRA_UINT((uVar5 >> 0x20)); + uVar8 = GHIDRA_UINT(((uVar13 & 0xffffffff) * 0x431bde82 + (uVar5 & 0xffffffff) >> 0x20)); lVar2 = lVar2 + (ulonglong)CONCAT14(CARRY4(uVar9,uVar8),uVar9 + uVar8); - uVar8 = (uint)((ulonglong)lVar2 >> 0x20); - *(uint *)(iVar6 + 0x20) = (uint)lVar2 >> 0x12 | uVar8 * 0x4000; + uVar8 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); + *(uint *)(iVar6 + 0x20) = GHIDRA_UINT(lVar2) >> 0x12 | uVar8 * 0x4000; *(uint *)(iVar6 + 0x24) = uVar8 >> 0x12; } std:: @@ -140,17 +140,17 @@ void KAGE::Network::Multiplayer::ConnectionBase::Update() *)&node); } while (node != *(int *)((char *)connection + 0x2c)); } - piVar10 = (int *)((int)connection + 0x38); + piVar10 = (int *)(GHIDRA_INT(connection) + 0x38); node = **(int **)((char *)connection + 0x38); local_1c = piVar10; if ((int *)node != *(int **)((char *)connection + 0x38)) { do { if (*(char *)(node + 0x14) == '\0') { uVar12 = FUN_00a585c0(); - local_10 = CONCAT44((int)uVar12,(undefined4)local_10); + local_10 = CONCAT44(GHIDRA_INT(uVar12),(undefined4)local_10); uVar8 = __ftoui3(); piVar10 = local_1c; - if (((int)((ulonglong)uVar12 >> 0x20) == 0) && (local_10._4_4_ <= uVar8)) goto LAB_00a58c1d; + if ((GHIDRA_INT(((ulonglong)uVar12 >> 0x20)) == 0) && ((*(undefined4 *)((char *)&(local_10) + 0x4)) <= uVar8)) goto LAB_00a58c1d; node = FUN_00a598e0(); } else { diff --git a/src/game/kage/network/multiplayer/const_lobby.cpp b/src/game/kage/network/multiplayer/const_lobby.cpp index 4a72ad4..18c5d40 100644 --- a/src/game/kage/network/multiplayer/const_lobby.cpp +++ b/src/game/kage/network/multiplayer/const_lobby.cpp @@ -16,7 +16,7 @@ KAGE::Network::Multiplayer::ConstLobby::ConstLobby(void *lobbyPtr, void *lobbyCt puStack_c = &LAB_00b11c48; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (uint)(oldLobbyPtr + 0x18); + uVar3 = __security_cookie ^ GHIDRA_UINT((oldLobbyPtr + 0x18)); ExceptionList = &local_10; *(undefined ***)this = vftable; *(undefined4 *)((char *)this + 4) = 0; @@ -30,7 +30,7 @@ KAGE::Network::Multiplayer::ConstLobby::ConstLobby(void *lobbyPtr, void *lobbyCt uVar1 = *resolvedLobby; *resolvedLobby = *(undefined4 *)((char *)this + 4); *(undefined4 *)((char *)this + 4) = uVar1; - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); if (oldLobbyCtrl != (int *)0x0) { cVar2 = (**(code **)(*oldLobbyCtrl + 0xc))(uVar3); if ((cVar2 != '\0') && (g_lobbyReleaseFn != (void *)0x0)) { diff --git a/src/game/kage/network/multiplayer/lobby.cpp b/src/game/kage/network/multiplayer/lobby.cpp index 0387c3c..c02276e 100644 --- a/src/game/kage/network/multiplayer/lobby.cpp +++ b/src/game/kage/network/multiplayer/lobby.cpp @@ -19,7 +19,7 @@ void * KAGE::Network::Multiplayer::Lobby::get_member(void *outProfile, uint inde return outProfile; } ExceptionList = &local_10; - if ((uint)(*(int *)(iVar1 + 0x14) - *(int *)(iVar1 + 0x10) >> 3) <= index) { + if (GHIDRA_UINT((*(int *)(iVar1 + 0x14) - *(int *)(iVar1 + 0x10) >> 3)) <= index) { KAGE_LogMessage(0x10,(byte *)"Invalid lobby user index"); iVar1 = *(int *)((char *)this + 4); } @@ -83,7 +83,7 @@ void KAGE::Network::Multiplayer::Lobby::get_members(void *outMembers, byte isInc *(int *)((char *)outMembers + 4) = *(int *)((char *)outMembers + 4) + 8; } } - memberCursor = (void *)((int)memberCursor + 8); + memberCursor = (void *)(GHIDRA_INT(memberCursor) + 8); } while (memberCursor != *(void **)(*(int *)((char *)this + 4) + 0x14)); } ExceptionList = local_10; @@ -104,7 +104,7 @@ KAGE::Network::Multiplayer::Lobby::Lobby(void *other) *(undefined4 *)((char *)this + 4) = 0; *(undefined4 *)((char *)this + 8) = 0; local_8 = 0; - ((std::shared_ptr *)((undefined4 *)((int)this + 4)))->std::shared_ptr::assign((void *)((int)other + 4)); + ((std::shared_ptr *)((undefined4 *)(GHIDRA_INT(this) + 4)))->std::shared_ptr::assign((void *)(GHIDRA_INT(other) + 4)); *(undefined ***)this = vftable; ExceptionList = local_10; return; diff --git a/src/game/kage/network/multiplayer/lobby_localhost.cpp b/src/game/kage/network/multiplayer/lobby_localhost.cpp index d4386ec..d80cee0 100644 --- a/src/game/kage/network/multiplayer/lobby_localhost.cpp +++ b/src/game/kage/network/multiplayer/lobby_localhost.cpp @@ -35,12 +35,12 @@ void KAGE::Network::Multiplayer::LobbyLocalhost::add_member(ulonglong *param_1) local_8 = 0xffffffff; puStack_c = &LAB_00b14dcd; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(packetTag + 0x28); + uVar2 = __security_cookie ^ GHIDRA_UINT((packetTag + 0x28)); ExceptionList = &local_10; local_14 = uVar2; if ((((*(byte *)(in_ECX + 0x2c) == 0) || (membersEnd = *(int **)(in_ECX + 0x24), - (uint)*(byte *)(in_ECX + 0x2c) <= (uint)((int)membersEnd - *(int *)(in_ECX + 0x20) >> 3))) || + GHIDRA_UINT(*(byte *)(in_ECX + 0x2c)) <= GHIDRA_UINT((GHIDRA_INT(membersEnd) - *(int *)(in_ECX + 0x20) >> 3)))) || (*(char *)(in_ECX + 0x34) == '\0')) || (*(int *)(in_ECX + 0x30) == 0)) { local_30 = 0; local_34 = 0; @@ -51,12 +51,12 @@ void KAGE::Network::Multiplayer::LobbyLocalhost::add_member(ulonglong *param_1) replyData = (void *)FUN_00a9f4b0(&local_30,uVar2); local_8 = 0xffffffff; if (local_44 != (undefined **)0x0) { - uVar2 = (int)local_3c - (int)local_44 & 0xfffffff8; + uVar2 = GHIDRA_INT(local_3c) - GHIDRA_INT(local_44) & 0xfffffff8; ptr = local_44; if (0xfff < uVar2) { ptr = (undefined **)local_44[-1]; uVar2 = uVar2 + 0x23; - if (0x1f < (uint)((int)local_44 + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_44) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -83,16 +83,16 @@ void KAGE::Network::Multiplayer::LobbyLocalhost::add_member(ulonglong *param_1) } else { local_30 = *(int *)((char *)param_1 + 4); - if ((int)*param_1 != 0 || local_30 != 0) { + if (GHIDRA_INT(*param_1) != 0 || local_30 != 0) { if (membersEnd == *(int **)(in_ECX + 0x28)) { std::vector<8byte>::_Emplace_reallocate(membersEnd,param_1); } else { - *membersEnd = (int)*param_1; + *membersEnd = GHIDRA_INT(*param_1); membersEnd[1] = local_30; *(int *)(in_ECX + 0x24) = *(int *)(in_ECX + 0x24) + 8; } - local_34 = (uint)*(byte *)(in_ECX + 0x2c); + local_34 = GHIDRA_UINT(*(byte *)(in_ECX + 0x2c)); local_30 = 0; replyData = (void *)FUN_00a9f4b0(&local_30,uVar2); userProfile = System::UserProfileBase::vftable; @@ -182,12 +182,12 @@ void KAGE::Network::Multiplayer::LobbyLocalhost::find_or_create() lobby_registry_find_or_create(tmpLobby,in_ECX,in_EDX); tmpLobby[0] = vftable; if (pendingBegin != (void *)0x0) { - uVar1 = pendingCapacityEnd - (int)pendingBegin & 0xfffffff8; + uVar1 = pendingCapacityEnd - GHIDRA_INT(pendingBegin) & 0xfffffff8; pvVar2 = pendingBegin; if (0xfff < uVar1) { pvVar2 = *(void **)((char *)pendingBegin + -4); uVar1 = uVar1 + 0x23; - if (0x1f < (uint)((int)pendingBegin + (-4 - (int)pvVar2))) goto LAB_00a9f283; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pendingBegin) + (-4 - GHIDRA_INT(pvVar2))))) goto LAB_00a9f283; } operator_delete(pvVar2,uVar1); pendingBegin = (void *)0x0; @@ -196,12 +196,12 @@ void KAGE::Network::Multiplayer::LobbyLocalhost::find_or_create() } tmpLobby[0] = LobbyImplBase::vftable; if (membersBegin != (void *)0x0) { - uVar1 = membersCapacityEnd - (int)membersBegin & 0xfffffff8; + uVar1 = membersCapacityEnd - GHIDRA_INT(membersBegin) & 0xfffffff8; pvVar2 = membersBegin; if (0xfff < uVar1) { pvVar2 = *(void **)((char *)membersBegin + -4); uVar1 = uVar1 + 0x23; - if (0x1f < (uint)((int)membersBegin + (-4 - (int)pvVar2))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(membersBegin) + (-4 - GHIDRA_INT(pvVar2))))) { LAB_00a9f283: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); diff --git a/src/game/kage/network/multiplayer/lobby_steam.cpp b/src/game/kage/network/multiplayer/lobby_steam.cpp index 25784b3..b4d7d98 100644 --- a/src/game/kage/network/multiplayer/lobby_steam.cpp +++ b/src/game/kage/network/multiplayer/lobby_steam.cpp @@ -17,7 +17,7 @@ byte KAGE::Network::Multiplayer::LobbySteam::request_lobby_data(void *callback, local_14 = 0xffffffff; puStack_18 = &LAB_00b1244d; local_1c = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 0x10U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; matchmaking = (int *)SteamInternal_ContextInit(&PTR_FUN_00c5c504,uVar1); if (*matchmaking == 0) { @@ -32,7 +32,7 @@ byte KAGE::Network::Multiplayer::LobbySteam::request_lobby_data(void *callback, isRequested = (*requestLobbyDataFn)(uVar3); if (isRequested != 0) { local_14 = 0; - puVar2 = (undefined4 *)FUN_00a533d0((int)this + 8); + puVar2 = (undefined4 *)FUN_00a533d0(GHIDRA_INT(this) + 8); *puVar2 = callback; puVar2[1] = userData; } @@ -69,12 +69,12 @@ void * KAGE::Network::Multiplayer::LobbySteam::find_or_create(void *outLobby, ul lobby_registry_find_or_create(tmpLobby,outLobby,lobbyId); tmpLobby[0] = LobbyImplBase::vftable; if (membersBegin != (void *)0x0) { - size = membersCapacityEnd - (int)membersBegin & 0xfffffff8; + size = membersCapacityEnd - GHIDRA_INT(membersBegin) & 0xfffffff8; ptr = membersBegin; if (0xfff < size) { ptr = *(void **)((char *)membersBegin + -4); size = size + 0x23; - if (0x1f < (uint)((int)membersBegin + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(membersBegin) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } diff --git a/src/game/kage/network/multiplayer/service_base.cpp b/src/game/kage/network/multiplayer/service_base.cpp index 73d26df..f5ecd09 100644 --- a/src/game/kage/network/multiplayer/service_base.cpp +++ b/src/game/kage/network/multiplayer/service_base.cpp @@ -13,7 +13,7 @@ KAGE::Network::Multiplayer::ServiceBase::ServiceBase() local_8 = 0xffffffff; puStack_c = &LAB_00b140a7; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; *in_ECX = vftable; *(undefined1 *)(in_ECX + 1) = 0; @@ -40,7 +40,7 @@ KAGE::Network::Multiplayer::ServiceBase::ServiceBase() *(undefined1 *)(in_ECX + 10) = 0; in_ECX[9] = Mutex::vftable; in_ECX[0xb] = 0; - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; in_ECX[0xc] = 0; in_ECX[0xd] = 0; sentinelNode = operator_new(0x10); @@ -50,7 +50,7 @@ KAGE::Network::Multiplayer::ServiceBase::ServiceBase() *(undefined1 *)(in_ECX + 0xf) = 0; in_ECX[0xe] = Mutex::vftable; in_ECX[0x10] = 0; - local_8 = CONCAT31(local_8._1_3_,5); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),5); g_multiplayerRelease = FUN_00a79280; if (*(code **)(in_ECX[4] + 4) == FUN_00a15770) { FUN_00a15770(); @@ -90,13 +90,13 @@ KAGE::Network::Multiplayer::ServiceBase::~ServiceBase() uStack_8 = 0xffffffff; puStack_c = &LAB_00b03a50; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; - firstMutex = (int *)((int)this + 0x10); + firstMutex = (int *)(GHIDRA_INT(this) + 0x10); *(undefined ***)this = vftable; (**(code **)(*(int *)((char *)this + 0x10) + 0xc))(0xffffffff,uVar2); iVar1 = *(int *)((char *)this + 8); - connectionMap = (int *)((int)this + 8); + connectionMap = (int *)(GHIDRA_INT(this) + 8); std::map::_Erase_tree(connectionMap,*(undefined4 *)(iVar1 + 4)); *(int *)(iVar1 + 4) = iVar1; *(int *)iVar1 = iVar1; @@ -127,18 +127,18 @@ KAGE::Network::Multiplayer::ServiceBase::~ServiceBase() } *(byte *)((char *)this + 0x28) = *(byte *)((char *)this + 0x28) & 0xfe; *(undefined ***)((char *)this + 0x24) = MutexBase::vftable; - secondTree = (int *)((int)this + 0x1c); + secondTree = (int *)(GHIDRA_INT(this) + 0x1c); FUN_00a79d10(secondTree,*(undefined4 *)(*secondTree + 4)); operator_delete((void *)*secondTree,0x1c); criticalSection = *(LPCRITICAL_SECTION *)((char *)this + 0x18); - *firstMutex = (int)Mutex::vftable; + *firstMutex = GHIDRA_INT(Mutex)::vftable; if (criticalSection != (LPCRITICAL_SECTION)0x0) { DeleteCriticalSection(criticalSection); operator_delete(criticalSection,0x1c); *(undefined4 *)((char *)this + 0x18) = 0; } *(byte *)((char *)this + 0x14) = *(byte *)((char *)this + 0x14) & 0xfe; - *firstMutex = (int)MutexBase::vftable; + *firstMutex = GHIDRA_INT(MutexBase)::vftable; std::map::_Erase_tree(connectionMap,*(undefined4 *)(*connectionMap + 4)); operator_delete((void *)*connectionMap,0x20); ExceptionList = local_10; diff --git a/src/game/kage/network/multiplayer/service_eos.cpp b/src/game/kage/network/multiplayer/service_eos.cpp index 2199ba5..68ccd44 100644 --- a/src/game/kage/network/multiplayer/service_eos.cpp +++ b/src/game/kage/network/multiplayer/service_eos.cpp @@ -34,7 +34,7 @@ void KAGE::Network::Multiplayer::ServiceEOS::on_create_lobby_complete(int *param local_8 = 0xffffffff; puStack_c = &LAB_00b13eb5; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(userIdText + 0x50); + uVar1 = __security_cookie ^ GHIDRA_UINT((userIdText + 0x50)); ExceptionList = &local_10; local_14 = uVar1; service = __RTDynamicCast(g_multiplayerService,0,&ServiceBase::RTTI_Type_Descriptor, @@ -75,12 +75,12 @@ void KAGE::Network::Multiplayer::ServiceEOS::on_create_lobby_complete(int *param *(int *)(lobbyEos + 0x24) = eosLobbyId; pvVar3 = g_userProfile; local_6c = g_userProfile; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); if (g_userProfile == (void *)0x0) { local_64 = 0; - local_64._4_4_ = (int *)0x0; - local_64._0_4_ = 0; - uVar2 = local_64._4_4_; + (*(undefined4 *)((char *)&(local_64) + 0x4)) = (int *)0x0; + (*(undefined4 *)((char *)&(local_64) + 0x0)) = 0; + uVar2 = (*(undefined4 *)((char *)&(local_64) + 0x4)); uVar4 = (undefined4)local_64; } else { @@ -115,12 +115,12 @@ LAB_00a76b5e: uVar2 = *(undefined4 *)(service + 0x54); FUN_00a28840(&lobbyImpl); pvVar3 = ConstLobby::ConstLobby(&newLobby,userName,lobbyCtrl); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; (*lobbyCallback)(0,pvVar3,uVar2); newLobby = ConstLobby::vftable; - local_8 = CONCAT31(local_8._1_3_,3); - if (((local_64._4_4_ != (int *)0x0) && - (isLastRef = (**(code **)(*local_64._4_4_ + 0xc))(), isLastRef != '\0')) && + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); + if ((((*(undefined4 *)((char *)&(local_64) + 0x4)) != (int *)0x0) && + (isLastRef = (**(code **)(*(*(undefined4 *)((char *)&(local_64) + 0x4)) + 0xc))(), isLastRef != '\0')) && (g_lobbyReleaseFn != (void *)0x0)) { (*g_lobbyReleaseFn)(&local_64); } diff --git a/src/game/kage/network/multiplayer/service_localhost.cpp b/src/game/kage/network/multiplayer/service_localhost.cpp index 4b8c652..b2802a2 100644 --- a/src/game/kage/network/multiplayer/service_localhost.cpp +++ b/src/game/kage/network/multiplayer/service_localhost.cpp @@ -36,25 +36,25 @@ void KAGE::Network::Multiplayer::ServiceLocalhost::FUN_00a77f70() local_10 = ExceptionList; ExceptionList = &local_10; puVar3 = (ulonglong *)0x0; - local_18._4_4_ = (ulonglong *)0x0; + (*(undefined4 *)((char *)&(local_18) + 0x4)) = (ulonglong *)0x0; deadPeersBegin = (ulonglong *)0x0; deadPeersEnd = (ulonglong *)0x0; deadPeersLimit = (ulonglong *)0x0; deadPeersCap = (ulonglong *)0x0; - piVar1 = (int *)((int)this + 0x10); + piVar1 = (int *)(GHIDRA_INT(this) + 0x10); local_8 = 0; local_28 = piVar1; service = this; - (**(code **)(*piVar1 + 0xc))(0xffffffff,__security_cookie ^ (int)register0x00000010 - 4U); + (**(code **)(*piVar1 + 0xc))(0xffffffff,__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); peerNode = **(int **)((char *)service + 8); if ((int *)peerNode != *(int **)((char *)service + 8)) { do { iVar2 = *(int *)(*(int *)(peerNode + 0x18) + 0x10); if (iVar2 == 0) { local_18 = 0; - local_18._4_4_ = (ulonglong *)0x0; - local_18._0_4_ = (HWND)0x0; - userIdHigh = local_18._4_4_; + (*(undefined4 *)((char *)&(local_18) + 0x4)) = (ulonglong *)0x0; + (*(undefined4 *)((char *)&(local_18) + 0x0)) = (HWND)0x0; + userIdHigh = (*(undefined4 *)((char *)&(local_18) + 0x4)); hWnd = (HWND)local_18; } else { @@ -81,20 +81,20 @@ void KAGE::Network::Multiplayer::ServiceLocalhost::FUN_00a77f70() ::operator++((_Tree_unchecked_const_iterator_>,std::_Iterator_base0> *)&peerNode); } while (peerNode != *(int *)((char *)service + 8)); - local_18._4_4_ = deadPeersBegin; + (*(undefined4 *)((char *)&(local_18) + 0x4)) = deadPeersBegin; piVar1 = local_28; } (**(code **)(*piVar1 + 0x10))(); - userId = local_18._4_4_; - if (local_18._4_4_ != puVar3) { + userId = (*(undefined4 *)((char *)&(local_18) + 0x4)); + if ((*(undefined4 *)((char *)&(local_18) + 0x4)) != puVar3) { do { lobby = ConstLobby::vftable; lobbyImpl = 0; lobbyRefCount = (int *)0x0; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((std::shared_ptr *)(&lobbyImpl))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); lobby = Lobby::vftable; - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); if (lobbyImpl == 0) { iVar2 = 0; } @@ -109,13 +109,13 @@ void KAGE::Network::Multiplayer::ServiceLocalhost::FUN_00a77f70() if (member == *(int **)(iVar2 + 0x24)) goto LAB_00a73ce0; piVar1 = member + 2; puVar3 = deadPeersEnd; - } while ((*member != (int)*userId) || (member[1] != *(int *)((char *)userId + 4))); - memmove(member,piVar1,(int)*(int **)(iVar2 + 0x24) - (int)piVar1); + } while ((*member != GHIDRA_INT(*userId)) || (member[1] != *(int *)((char *)userId + 4))); + memmove(member,piVar1,GHIDRA_INT(*(int **)(iVar2 + 0x24)) - GHIDRA_INT(piVar1)); *(int *)(iVar2 + 0x24) = *(int *)(iVar2 + 0x24) + -8; puVar3 = savedDeadPeersEnd; LAB_00a73ce0: lobby = ConstLobby::vftable; - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; if (((lobbyRefCount != (int *)0x0) && (isLastRef = (**(code **)(*lobbyRefCount + 0xc))(), isLastRef != '\0')) && (g_lobbyReleaseFn != (void *)0x0)) { @@ -124,13 +124,13 @@ LAB_00a73ce0: statusLobby = ConstLobby::vftable; statusLobbyImpl = 0; statusLobbyRefCount = (int *)0x0; - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; ((std::shared_ptr *)(&statusLobbyImpl))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); statusLobby = Lobby::vftable; - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; ::Multiplayer::handle_member_status(&statusLobby,userId,1); statusLobby = ConstLobby::vftable; - local_8 = CONCAT31(local_8._1_3_,6); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),6); if (((statusLobbyRefCount != (int *)0x0) && (isLastRef = (**(code **)(*statusLobbyRefCount + 0xc))(), isLastRef != '\0')) && (g_lobbyReleaseFn != (void *)0x0)) { @@ -140,13 +140,13 @@ LAB_00a73ce0: } while (userId != puVar3); } local_8 = 0xffffffff; - if (local_18._4_4_ != (ulonglong *)0x0) { - size = (int)deadPeersLimit - (int)local_18._4_4_ & 0xfffffff8; - puVar3 = local_18._4_4_; + if ((*(undefined4 *)((char *)&(local_18) + 0x4)) != (ulonglong *)0x0) { + size = GHIDRA_INT(deadPeersLimit) - (*(undefined4 *)((char *)&(GHIDRA_INT(local_18)) + 0x4)) & 0xfffffff8; + puVar3 = (*(undefined4 *)((char *)&(local_18) + 0x4)); if (0xfff < size) { - puVar3 = *(ulonglong **)((char *)local_18._4_4_ + -4); + puVar3 = *(ulonglong **)((*(undefined4 *)((char *)&(GHIDRA_INT(local_18)) + 0x4)) + -4); size = size + 0x23; - if (0x1f < (uint)((int)local_18._4_4_ + (-4 - (int)puVar3))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(GHIDRA_INT(local_18)) + 0x4)) + (-4 - GHIDRA_INT(puVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } diff --git a/src/game/kage/network/multiplayer_manager.cpp b/src/game/kage/network/multiplayer_manager.cpp index ee26ec1..851329b 100644 --- a/src/game/kage/network/multiplayer_manager.cpp +++ b/src/game/kage/network/multiplayer_manager.cpp @@ -12,7 +12,7 @@ undefined * KAGE::Network::MultiplayerManager::dynamic_initializer() puStack_c = &LAB_00b11d65; local_10 = ExceptionList; - stackCookie = __security_cookie ^ (int)register0x00000010 - 4U; + stackCookie = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; _DAT_00c79a54 = 0; local_8 = 0; @@ -24,21 +24,21 @@ undefined * KAGE::Network::MultiplayerManager::dynamic_initializer() _DAT_00c79a70 = Multiplayer::ConstLobby::vftable; SmartPointer::SmartPointer(in_ECX); _DAT_00c79a70 = Multiplayer::Lobby::vftable; - local_8._0_1_ = 1; - g_multiplayerCommandThreadFlags._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; + (*(undefined1 *)((char *)&(g_multiplayerCommandThreadFlags) + 0x0)) = 0; FUN_00a28c20(stackCookie); DAT_00c79aac = 0; DAT_00c79aa8 = Thread::vftable; _DAT_00c79ab0 = 0; - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; _DAT_00c79ab4 = (void *)0x0; _DAT_00c79ab8 = 0; _DAT_00c79ab4 = operator_new(0x10); *(void **)_DAT_00c79ab4 = _DAT_00c79ab4; *(void **)((char *)_DAT_00c79ab4 + 4) = _DAT_00c79ab4; - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; FUN_00a28c20(); - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; _DAT_00c79ae4 = Multiplayer::ConstLobby::vftable; SmartPointer::SmartPointer(extraout_ECX); _DAT_00c79ae4 = Multiplayer::Lobby::vftable; @@ -59,21 +59,21 @@ undefined * KAGE::Network::MultiplayerManager::dynamic_initializer() uRam00c79b2c = 0; _DAT_00c79b30 = 0; _DAT_00c79b34 = 0; - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; FUN_00a28c20(); - local_8._0_1_ = 9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; DAT_00c79b60 = (void *)0x0; _DAT_00c79b64 = 0; DAT_00c79b60 = operator_new(0x10); *(void **)DAT_00c79b60 = DAT_00c79b60; *(void **)((char *)DAT_00c79b60 + 4) = DAT_00c79b60; - local_8._0_1_ = 10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 10; _DAT_00c79b68 = (void *)0x0; _DAT_00c79b6c = 0; _DAT_00c79b68 = operator_new(0x10); *(void **)_DAT_00c79b68 = _DAT_00c79b68; *(void **)((char *)_DAT_00c79b68 + 4) = _DAT_00c79b68; - local_8 = CONCAT31(local_8._1_3_,0xb); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xb); _DAT_00c79b70 = (void *)0x0; _DAT_00c79b74 = 0; _DAT_00c79b70 = operator_new(0x10); @@ -104,7 +104,7 @@ void KAGE::Network::MultiplayerManager::on_lobby_data_update(uint *param_1) local_8 = 0xffffffff; puStack_c = &LAB_00b126e5; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; uVar3 = *param_1; uVar4 = param_1[1]; @@ -118,7 +118,7 @@ void KAGE::Network::MultiplayerManager::on_lobby_data_update(uint *param_1) local_8 = 0; if (*(code **)callbackEntry != (code *)0x0) { (**(code **)callbackEntry) - ((-(uint)((char)param_1[4] != '\0') & 0xfffffff0) + 0x10,param_1, + ((-GHIDRA_UINT(((char)param_1[4] != '\0')) & 0xfffffff0) + 0x10,param_1, *(undefined4 *)((char *)callbackEntry + 4),uVar2); } FUN_00a551c0(param_1); @@ -134,10 +134,10 @@ void KAGE::Network::MultiplayerManager::on_lobby_data_update(uint *param_1) ((std::shared_ptr *)(&local_20))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); if (local_20 == 0) { local_18 = 0; - local_18._4_4_ = 0; - local_18._0_4_ = 0; - uVar3 = local_18._4_4_; - uVar4 = (uint)local_18; + (*(undefined4 *)((char *)&(local_18) + 0x4)) = 0; + (*(undefined4 *)((char *)&(local_18) + 0x0)) = 0; + uVar3 = (*(undefined4 *)((char *)&(local_18) + 0x4)); + uVar4 = GHIDRA_UINT(local_18); } else { uVar3 = *(uint *)(local_20 + 0xc); @@ -230,17 +230,17 @@ void KAGE::Network::MultiplayerManager::update_lobby_members() ExceptionList = &local_10; if ((*(int **)((char *)this + 0x88) != (int *)0x0) && (isLobbyValid = (**(code **)(**(int **)((char *)this + 0x88) + 0xc)) - (__security_cookie ^ (int)register0x00000010 - 4U), + (__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U), isLobbyValid != '\0')) { uVar3 = 0; iVar1 = *(int *)((char *)this + 0x90); if (*(int *)((char *)this + 0x94) - iVar1 >> 3 != 0) { do { - local_24 = CONCAT44(local_24._4_4_,System::UserProfileBase::vftable); + local_24 = CONCAT44((*(undefined4 *)((char *)&(local_24) + 0x4)),System::UserProfileBase::vftable); ((UserProfile *)((void *)(iVar1 + uVar3 * 8)))->UserProfile::find_or_create(); local_8 = 0; - local_24._0_4_ = System::UserProfile::vftable; - local_24._4_4_ = (int *)extraout_EAX; + (*(undefined4 *)((char *)&(local_24) + 0x0)) = System::UserProfile::vftable; + (*(undefined4 *)((char *)&(local_24) + 0x4)) = (int *)extraout_EAX; if (((extraout_EAX != 0) && (*(int *)(extraout_EAX + 8) != 0 || *(int *)(extraout_EAX + 0xc) != 0)) && (*(int *)(extraout_EAX + 0x14) == 0)) { @@ -248,18 +248,18 @@ void KAGE::Network::MultiplayerManager::update_lobby_members() } local_8 = 0xffffffff; iVar1 = FUN_00a28590(&local_24); - local_24 = CONCAT44(local_24._4_4_,System::UserProfileBase::vftable); + local_24 = CONCAT44((*(undefined4 *)((char *)&(local_24) + 0x4)),System::UserProfileBase::vftable); if (iVar1 == -1) goto LAB_00a725ee; uVar3 = uVar3 + 1; iVar1 = *(int *)((char *)this + 0x90); - } while (uVar3 < (uint)(*(int *)((char *)this + 0x94) - iVar1 >> 3)); + } while (uVar3 < GHIDRA_UINT((*(int *)((char *)this + 0x94) - iVar1 >> 3))); } local_38 = (code *)0x0; local_34 = (code *)0x0; local_30 = (undefined4 *)0x0; local_8 = 1; - Multiplayer::Lobby::get_members((void *)((int)this + 0x10),&local_38,0); - local_1c = (undefined4 *)((int)local_34 - (int)local_38 >> 3); + Multiplayer::Lobby::get_members((void *)(GHIDRA_INT(this) + 0x10),&local_38,0); + local_1c = (undefined4 *)(GHIDRA_INT(local_34) - GHIDRA_INT(local_38) >> 3); local_14 = (undefined4 *)0x0; if (local_1c != (undefined4 *)0x0) { pcVar2 = local_38; @@ -273,8 +273,8 @@ void KAGE::Network::MultiplayerManager::update_lobby_members() do { memberId = FUN_00a23920(); pcVar2 = extraout_ECX; - if ((*(int *)(lobbyMemberIds + uVar3 * 8) == (int)memberId) && - (*(int *)(lobbyMemberIds + 4 + uVar3 * 8) == (int)((ulonglong)memberId >> 0x20))) { + if ((*(int *)(lobbyMemberIds + uVar3 * 8) == GHIDRA_INT(memberId)) && + (*(int *)(lobbyMemberIds + 4 + uVar3 * 8) == GHIDRA_INT(((ulonglong)memberId >> 0x20)))) { if (uVar3 != 0xffffffff) { local_18 = extraout_ECX; goto LAB_00a72464; @@ -282,16 +282,16 @@ void KAGE::Network::MultiplayerManager::update_lobby_members() break; } uVar3 = uVar3 + 1; - } while (uVar3 < (uint)(*(int *)(*(int *)((char *)this + 0x88) + 0x14) - lobbyMemberIds >> - 3)); + } while (uVar3 < GHIDRA_UINT((*(int *)(*(int *)((char *)this + 0x88) + 0x14) - lobbyMemberIds >> + 3))); } } iVar1 = *(int *)(pcVar2 + 4); if (iVar1 == 0) { local_24 = 0; - local_24._4_4_ = (int *)0x0; - local_24._0_4_ = (undefined **)0x0; - memberIdHigh = local_24._4_4_; + (*(undefined4 *)((char *)&(local_24) + 0x4)) = (int *)0x0; + (*(undefined4 *)((char *)&(local_24) + 0x0)) = (undefined **)0x0; + memberIdHigh = (*(undefined4 *)((char *)&(local_24) + 0x4)); memberIdLow = (undefined **)local_24; } else { @@ -299,10 +299,10 @@ void KAGE::Network::MultiplayerManager::update_lobby_members() memberIdLow = *(undefined4 *)(iVar1 + 8); } local_2c = CONCAT44(memberIdHigh,memberIdLow); - ::Multiplayer::handle_member_status((void *)((int)this + 0x10),&local_2c,2); + ::Multiplayer::handle_member_status((void *)(GHIDRA_INT(this) + 0x10),&local_2c,2); LAB_00a72464: pcVar2 = local_18 + 8; - local_14 = (undefined4 *)((int)local_14 + 1); + local_14 = (undefined4 *)(GHIDRA_INT(local_14) + 1); } while (local_14 < local_1c); local_18 = pcVar2; } @@ -313,18 +313,18 @@ LAB_00a72464: commandArgsCapacityEnd = 0; uStack_4c = 0; local_48 = 0; - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; local_2c = 0; std::vector<8byte>::_Emplace_reallocate(0,&local_2c); this->CommandThread::post_command(&command); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; if (commandArgsBegin != (void *)0x0) { - uVar3 = (commandArgsCapacityEnd - (int)commandArgsBegin >> 3) * 8; + uVar3 = (commandArgsCapacityEnd - GHIDRA_INT(commandArgsBegin) >> 3) * 8; pvVar5 = commandArgsBegin; if (0xfff < uVar3) { pvVar5 = *(void **)((char *)commandArgsBegin + -4); uVar3 = uVar3 + 0x23; - if (0x1f < (uint)((int)commandArgsBegin + (-4 - (int)pvVar5))) goto LAB_00a7271d; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(commandArgsBegin) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_00a7271d; } operator_delete(pvVar5,uVar3); } @@ -334,20 +334,20 @@ LAB_00a72464: commandArgsCapacityEnd = 0; uStack_4c = 0; local_48 = 0; - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; local_2c = 1; std::vector<8byte>::_Emplace_reallocate(0,&local_2c); uStack_4c = *(undefined4 *)((char *)this + 0x9c); local_48 = *(undefined4 *)((char *)this + 0xa0); this->CommandThread::post_command(&command); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; if (commandArgsBegin != (void *)0x0) { - uVar3 = (commandArgsCapacityEnd - (int)commandArgsBegin >> 3) * 8; + uVar3 = (commandArgsCapacityEnd - GHIDRA_INT(commandArgsBegin) >> 3) * 8; pvVar5 = commandArgsBegin; if (0xfff < uVar3) { pvVar5 = *(void **)((char *)commandArgsBegin + -4); uVar3 = uVar3 + 0x23; - if (0x1f < (uint)((int)commandArgsBegin + (-4 - (int)pvVar5))) goto LAB_00a7271d; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(commandArgsBegin) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_00a7271d; } operator_delete(pvVar5,uVar3); } @@ -360,14 +360,14 @@ LAB_00a72464: pcVar4 = pcVar4 + 8; } while (pcVar4 != local_34); } - local_8._0_1_ = 0xff; - local_8._1_3_ = 0xffffff; - uVar3 = ((int)local_30 - (int)pcVar2 >> 3) * 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0xffffff; + uVar3 = (GHIDRA_INT(local_30) - GHIDRA_INT(pcVar2) >> 3) * 8; pcVar4 = pcVar2; if (0xfff < uVar3) { pcVar4 = *(code **)(pcVar2 + -4); uVar3 = uVar3 + 0x23; - if ((code *)0x1f < pcVar2 + (-4 - (int)pcVar4)) goto LAB_00a7271d; + if ((code *)0x1f < pcVar2 + (-4 - GHIDRA_INT(pcVar4))) goto LAB_00a7271d; } operator_delete(pcVar4,uVar3); } @@ -381,9 +381,9 @@ LAB_00a725ee: local_38 = (code *)0x0; local_34 = (code *)0x0; local_30 = (undefined4 *)0x0; - local_8._0_1_ = 5; - local_8._1_3_ = 0; - local_24 = CONCAT44((int)this + 0x78,(undefined **)local_24); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0; + local_24 = CONCAT44(GHIDRA_INT(this) + 0x78,(undefined **)local_24); while ((**(code **)(*(int *)((char *)this + 0x78) + 0xc))(0xffffffff), *(int *)((char *)this + 0x74) != 0) { local_14 = *(undefined4 **) @@ -392,14 +392,14 @@ LAB_00a725ee: queuedCommandType = *local_14; if (&queuedArgsBegin != (void **)(local_14 + 1)) { local_1c = (undefined4 *)local_14[1]; - local_18 = (code *)(local_14[2] - (int)local_1c); - if ((uint)((int)pcVar2 - (int)pvVar5 >> 3) < (uint)((int)local_18 >> 3)) { - std::vector<8byte>::_Clear_and_reserve((int)local_18 >> 3); + local_18 = (code *)(local_14[2] - GHIDRA_INT(local_1c)); + if (GHIDRA_UINT((GHIDRA_INT(pcVar2) - GHIDRA_INT(pvVar5) >> 3)) < GHIDRA_UINT((GHIDRA_INT(local_18) >> 3))) { + std::vector<8byte>::_Clear_and_reserve(GHIDRA_INT(local_18) >> 3); pcVar2 = local_38; pvVar5 = queuedArgsBegin; } memmove(pvVar5,local_1c,(size_t)local_18); - queuedArgsEnd = (int)local_18 + (int)pvVar5; + queuedArgsEnd = GHIDRA_INT(local_18) + GHIDRA_INT(pvVar5); } local_30 = (undefined4 *)local_14[5]; local_34 = (code *)local_14[4]; @@ -410,7 +410,7 @@ LAB_00a725ee: local_1c = local_30; local_18 = local_34; std::vector::_Tidy(); - queueCount = (int *)((int)this + 0x74); + queueCount = (int *)(GHIDRA_INT(this) + 0x74); *queueCount = *queueCount + -1; if (*queueCount == 0) { *(undefined4 *)((char *)this + 0x70) = 0; @@ -419,16 +419,16 @@ LAB_00a725ee: *(int *)((char *)this + 0x70) = *(int *)((char *)this + 0x70) + 1; } (**(code **)(*(int *)((char *)this + 0x78) + 0x10))(); - (*local_18)(0,(int)this + 0x10,local_1c); + (*local_18)(0,GHIDRA_INT(this) + 0x10,local_1c); } - (**(code **)(*local_24._4_4_ + 0x10))(); + (**(code **)(*(*(undefined4 *)((char *)&(local_24) + 0x4)) + 0x10))(); if (pvVar5 != (void *)0x0) { - uVar3 = (int)pcVar2 - (int)pvVar5 & 0xfffffff8; + uVar3 = GHIDRA_INT(pcVar2) - GHIDRA_INT(pvVar5) & 0xfffffff8; ptr = pvVar5; if (0xfff < uVar3) { ptr = *(void **)((char *)pvVar5 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < (uint)((int)pvVar5 + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar5) + (-4 - GHIDRA_INT(ptr))))) { LAB_00a7271d: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -464,7 +464,7 @@ void KAGE::Network::MultiplayerManager::join_lobby(void *lobby, int unknown, voi ExceptionList = &local_10; if (*(int **)((char *)this + 0x14) != (int *)0x0) { isInLobby = (**(code **)(**(int **)((char *)this + 0x14) + 0xc)) - (__security_cookie ^ (int)register0x00000010 - 4U); + (__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); if (isInLobby != '\0') { command = 3; commandArgsBegin = (void *)0x0; @@ -478,12 +478,12 @@ void KAGE::Network::MultiplayerManager::join_lobby(void *lobby, int unknown, voi this->CommandThread::post_command(&command); local_8 = 0xffffffff; if (commandArgsBegin != (void *)0x0) { - allocSize = ((int)commandArgsCap - (int)commandArgsBegin >> 3) * 8; + allocSize = (GHIDRA_INT(commandArgsCap) - GHIDRA_INT(commandArgsBegin) >> 3) * 8; allocBlock = commandArgsBegin; if (0xfff < allocSize) { allocBlock = *(void **)((char *)commandArgsBegin + -4); allocSize = allocSize + 0x23; - if (0x1f < (uint)((int)commandArgsBegin + (-4 - (int)allocBlock))) goto LAB_00a72b9e; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(commandArgsBegin) + (-4 - GHIDRA_INT(allocBlock))))) goto LAB_00a72b9e; } operator_delete(allocBlock,allocSize); } @@ -500,31 +500,31 @@ void KAGE::Network::MultiplayerManager::join_lobby(void *lobby, int unknown, voi std::vector<8byte>::_Emplace_reallocate(0,&arg); lobbyId = *(int *)((char *)lobby + 4); if (lobbyId == 0) { - arg._4_4_ = 0; - arg._0_4_ = 0; + (*(undefined4 *)((char *)&(arg) + 0x4)) = 0; + (*(undefined4 *)((char *)&(arg) + 0x0)) = 0; } else { - arg._0_4_ = *(undefined4 *)(lobbyId + 8); - arg._4_4_ = *(undefined4 *)(lobbyId + 0xc); + (*(undefined4 *)((char *)&(arg) + 0x0)) = *(undefined4 *)(lobbyId + 8); + (*(undefined4 *)((char *)&(arg) + 0x4)) = *(undefined4 *)(lobbyId + 0xc); } if (commandArgsEnd == commandArgsCap) { std::vector<8byte>::_Emplace_reallocate(commandArgsEnd,&arg); } else { *commandArgsEnd = (undefined4)arg; - commandArgsEnd[1] = arg._4_4_; + commandArgsEnd[1] = (*(undefined4 *)((char *)&(arg) + 0x4)); commandArgsEnd = commandArgsEnd + 2; } commandUserData = userData; commandCallback = FUN_00908660; this->CommandThread::post_command(&command); if (commandArgsBegin != (void *)0x0) { - allocSize = (int)commandArgsCap - (int)commandArgsBegin & 0xfffffff8; + allocSize = GHIDRA_INT(commandArgsCap) - GHIDRA_INT(commandArgsBegin) & 0xfffffff8; allocBlock = commandArgsBegin; if (0xfff < allocSize) { allocBlock = *(void **)((char *)commandArgsBegin + -4); allocSize = allocSize + 0x23; - if (0x1f < (uint)((int)commandArgsBegin + (-4 - (int)allocBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(commandArgsBegin) + (-4 - GHIDRA_INT(allocBlock))))) { LAB_00a72b9e: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); diff --git a/src/game/kage/smart_pointer.cpp b/src/game/kage/smart_pointer.cpp index 525448f..fb8649f 100644 --- a/src/game/kage/smart_pointer.cpp +++ b/src/game/kage/smart_pointer.cpp @@ -16,7 +16,7 @@ void * KAGE::SmartPointer::operator_assign(void *other) local_8 = 0xffffffff; puStack_c = &LAB_00af0cf0; local_10 = ExceptionList; - swapTmp = __security_cookie ^ (uint)(tmpCopy + 0x18); + swapTmp = __security_cookie ^ GHIDRA_UINT((tmpCopy + 0x18)); ExceptionList = &local_10; tmpCopyPtr = operator_assign(tmpCopy,other); swapTmp = tmpCopyPtr[1]; @@ -49,7 +49,7 @@ KAGE::SmartPointer::SmartPointer(void *image) local_8 = 0xffffffff; puStack_c = &LAB_00af0d44; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; *(undefined4 *)this = 0; *(undefined4 *)((char *)this + 4) = 0; @@ -89,7 +89,7 @@ void KAGE::SmartPointer::reset(void *image) local_8 = 0xffffffff; puStack_c = &LAB_00af0d44; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; refCount = operator_new(0x18); local_8 = 0; diff --git a/src/game/kage/sound/manager_open_al.cpp b/src/game/kage/sound/manager_open_al.cpp index a3c94a0..767191b 100644 --- a/src/game/kage/sound/manager_open_al.cpp +++ b/src/game/kage/sound/manager_open_al.cpp @@ -35,7 +35,7 @@ undefined1 KAGE::Sound::ManagerOpenAL::FUN_00a649b0() local_8 = 0xffffffff; puStack_c = &LAB_00b1456a; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(dllPath + 0x10c); + local_14 = __security_cookie ^ GHIDRA_UINT((dllPath + 0x10c)); ExceptionList = &local_10; iVar2 = alcOpenDevice(0,local_14); in_ECX[0xe] = iVar2; @@ -68,7 +68,7 @@ undefined1 KAGE::Sound::ManagerOpenAL::FUN_00a649b0() } else { iVar2 = 0x40; - sourceEntry = (undefined4 *)((int)sources + 8); + sourceEntry = (undefined4 *)(GHIDRA_INT(sources) + 8); do { sourceEntry[-2] = 0; sourceEntry[-1] = 0; @@ -79,7 +79,7 @@ undefined1 KAGE::Sound::ManagerOpenAL::FUN_00a649b0() } local_8 = 0xffffffff; sourceOffset = 0; - in_ECX[0xf] = (int)sources; + in_ECX[0xf] = GHIDRA_INT(sources); do { cVar1 = (**(code **)(*in_ECX + 0x30)) (in_ECX[0xf] + sourceOffset,in_ECX[0xf] + sourceOffset + 4,1); diff --git a/src/game/kage/system/friend_manager.cpp b/src/game/kage/system/friend_manager.cpp index 6a004ad..1c41a62 100644 --- a/src/game/kage/system/friend_manager.cpp +++ b/src/game/kage/system/friend_manager.cpp @@ -40,9 +40,9 @@ undefined4 KAGE::System::FriendManager::request_friend_lobbies(int param_1, int profile = *(int *)(friendCursor + 4); if (profile == 0) { local_20 = 0; - local_20._4_4_ = 0; - local_20._0_4_ = 0; - steamIdHigh = local_20._4_4_; + (*(undefined4 *)((char *)&(local_20) + 0x4)) = 0; + (*(undefined4 *)((char *)&(local_20) + 0x0)) = 0; + steamIdHigh = (*(undefined4 *)((char *)&(local_20) + 0x4)); steamIdLow = (undefined4)local_20; } else { diff --git a/src/game/kage/system/leaderboard_manager.cpp b/src/game/kage/system/leaderboard_manager.cpp index bdb3ede..640c45b 100644 --- a/src/game/kage/system/leaderboard_manager.cpp +++ b/src/game/kage/system/leaderboard_manager.cpp @@ -19,7 +19,7 @@ int KAGE::System::LeaderboardManager::get_result(uint handle) return 0; } ExceptionList = &local_10; - (**(code **)(DAT_00c5ab20 + 0xc))(0xffffffff,__security_cookie ^ (uint)(findResult + 0x18)); + (**(code **)(DAT_00c5ab20 + 0xc))(0xffffffff,__security_cookie ^ GHIDRA_UINT((findResult + 0x18))); _Find_lower_bound<>(findResult,&handle); if (((*(char *)(foundNode + 0xd) == '\0') && (*(uint *)(foundNode + 0x10) <= key)) && (foundNode != DAT_00c5ab18)) { @@ -52,7 +52,7 @@ void KAGE::System::LeaderboardManager::release_result(int handle) local_10 = ExceptionList; ExceptionList = &local_10; if ((((byte)DAT_00c5ab14 & 1) != 0) && (handle != 0)) { - (**(code **)(DAT_00c5ab20 + 0xc))(0xffffffff,__security_cookie ^ (uint)(foundIter + 0x18)); + (**(code **)(DAT_00c5ab20 + 0xc))(0xffffffff,__security_cookie ^ GHIDRA_UINT((foundIter + 0x18))); if (iVar1 == -1) { handle = *DAT_00c5ab18; mapHead = DAT_00c5ab18; @@ -80,14 +80,14 @@ void KAGE::System::LeaderboardManager::release_result(int handle) (&DAT_00c5ab18, (fuzzer_allocator_> *)&DAT_00c5ab18, (_Tree_node *)mapHead[1]); - mapHead[1] = (int)mapHead; - *mapHead = (int)mapHead; - mapHead[2] = (int)mapHead; + mapHead[1] = GHIDRA_INT(mapHead); + *mapHead = GHIDRA_INT(mapHead); + mapHead[2] = GHIDRA_INT(mapHead); _DAT_00c5ab1c = 0; } else { _Find_lower_bound<>(foundIter,&handle); - if (((*(char *)((char *)foundNode + 0xd) == '\0') && ((uint)foundNode[4] <= (uint)iVar1)) && + if (((*(char *)((char *)foundNode + 0xd) == '\0') && (GHIDRA_UINT(foundNode[4]) <= GHIDRA_UINT(iVar1))) && (foundNode != DAT_00c5ab18)) { if (foundNode[5] != 0) { FUN_008d0bc0(foundNode[5]); diff --git a/src/game/kage/system/user_profile.cpp b/src/game/kage/system/user_profile.cpp index 7bea372..fa39d4a 100644 --- a/src/game/kage/system/user_profile.cpp +++ b/src/game/kage/system/user_profile.cpp @@ -30,7 +30,7 @@ void KAGE::System::UserProfile::load_steam_avatar() local_8 = 0xffffffff; puStack_c = &LAB_00b119b0; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(imageName + 0x110); + local_14 = __security_cookie ^ GHIDRA_UINT((imageName + 0x110)); ExceptionList = &local_10; iVar2 = *(int *)((char *)this + 4); if (((((iVar2 != 0) && (lVar3 = __aullshr(local_14), lVar3 != 0xfefefefe)) && @@ -49,7 +49,7 @@ void KAGE::System::UserProfile::load_steam_avatar() steamId = FUN_00a23920(); iVar2 = (*steamFn)(steamId); if (0 < iVar2) { - local_11c._4_4_ = iVar2; + (*(undefined4 *)((char *)&(local_11c) + 0x4)) = iVar2; steamInterface = (undefined4 *)SteamInternal_ContextInit(&PTR_FUN_00c5c4ec); cVar1 = (**(code **)(*(int *)*steamInterface + 0x14))(iVar2,&avatarWidth,&avatarHeight); if (cVar1 != '\0') { @@ -64,10 +64,10 @@ void KAGE::System::UserProfile::load_steam_avatar() sprintf(buffer,(byte *)"Steam User Avatar - %llu"); steamInterface = (undefined4 *)SteamInternal_ContextInit(&PTR_FUN_00c5c4ec,buffer,pcVar4,steamId); - (**(code **)(*(int *)*steamInterface + 0x18))(local_11c._4_4_,rgbaBuffer + 2,iVar2); + (**(code **)(*(int *)*steamInterface + 0x18))((*(undefined4 *)((char *)&(local_11c) + 0x4)),rgbaBuffer + 2,iVar2); local_11c = FUN_00a23920(); ptr = rgbaBuffer; - KAGE_Graphics::create_image(&image,(int)rgbaBuffer,height,4,imageName); + KAGE_Graphics::create_image(&image,GHIDRA_INT(rgbaBuffer),height,4,imageName); local_8 = 0; if (image != (int *)0x0) { if ((image[0xc] != 1) || (image[0xd] != 1)) { @@ -150,15 +150,15 @@ void KAGE::System::UserProfile::set_id(ulonglong *userId, byte *displayName) local_10 = ExceptionList; ExceptionList = &local_10; local_14 = this; - if (((int)*userId != 0 || *(int *)((char *)userId + 4) != 0) && - ((profileId = (uint *)((int)this + 8), *(int *)((char *)this + 8) != (int)*userId || + if ((GHIDRA_INT(*userId) != 0 || *(int *)((char *)userId + 4) != 0) && + ((profileId = (uint *)(GHIDRA_INT(this) + 8), *(int *)((char *)this + 8) != GHIDRA_INT(*userId) || (*(int *)((char *)this + 0xc) != *(int *)((char *)userId + 4))))) { if (g_userProfile == (void *)0x0) { local_24 = 0; - local_24._4_4_ = (int *)0x0; - local_24._0_4_ = (byte *)0x0; - iVar3 = (int)local_24._4_4_; - localIdLow = (uint)(byte *)local_24; + (*(undefined4 *)((char *)&(local_24) + 0x4)) = (int *)0x0; + (*(undefined4 *)((char *)&(local_24) + 0x0)) = (byte *)0x0; + iVar3 = (*(undefined4 *)((char *)&(GHIDRA_INT(local_24)) + 0x4)); + localIdLow = GHIDRA_UINT((byte *)local_24); } else { iVar3 = *(int *)((char *)g_userProfile + 0xc); @@ -168,7 +168,7 @@ void KAGE::System::UserProfile::set_id(ulonglong *userId, byte *displayName) isLocalUser = false; } (**(code **)(PTR_vftable_00c5aa70 + 0xc)) - (0xffffffff,__security_cookie ^ (uint)(local_18 + 0x14)); + (0xffffffff,__security_cookie ^ GHIDRA_UINT((local_18 + 0x14))); if (((g_userProfile != (void *)0x0) && (*profileId == *(uint *)((char *)g_userProfile + 8))) && (*(int *)((char *)this + 0xc) == *(int *)((char *)g_userProfile + 0xc))) { g_userProfile = (void *)0x0; @@ -187,7 +187,7 @@ void KAGE::System::UserProfile::set_id(ulonglong *userId, byte *displayName) (**(code **)(PTR_vftable_00c5aa70 + 0x10))(); local_8 = 0xffffffff; uVar1 = *(undefined4 *)((char *)userId + 4); - *profileId = (uint)*userId; + *profileId = GHIDRA_UINT(*userId); *(undefined4 *)((char *)this + 0xc) = uVar1; eos_user_info_find_or_create(&DAT_00c5ac08,local_18,local_14); local_8 = 1; @@ -218,9 +218,9 @@ void KAGE::System::UserProfile::set_id(ulonglong *userId, byte *displayName) pbVar4 = *(byte **)(userInfo + 0x10); if (pbVar4 != displayName) { if (pbVar4 != (byte *)0x0) { - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; tracked_alloc(1,pbVar4,0); - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); userInfo[0x10] = 0; userInfo[0x11] = 0; userInfo[0x12] = 0; @@ -235,13 +235,13 @@ void KAGE::System::UserProfile::set_id(ulonglong *userId, byte *displayName) bVar5 = *pbVar4; pbVar4 = pbVar4 + 1; } while (bVar5 != 0); - nameCopy = operator_new_tracked((uint)(pbVar4 + (1 - (int)(displayName + 1)))); + nameCopy = operator_new_tracked(GHIDRA_UINT((pbVar4 + (1 - GHIDRA_INT((displayName + 1)))))); pbVar4 = displayName; do { bVar5 = *pbVar4; pbVar4 = pbVar4 + 1; } while (bVar5 != 0); - strncpy(nameCopy,(char *)displayName,(size_t)(pbVar4 + (1 - (int)(displayName + 1)))); + strncpy(nameCopy,(char *)displayName,(size_t)(pbVar4 + (1 - GHIDRA_INT((displayName + 1))))); } *(char **)(userInfo + 0x10) = nameCopy; bVar5 = *userInfo | 2; @@ -260,8 +260,8 @@ void KAGE::System::UserProfile::set_id(ulonglong *userId, byte *displayName) } } local_8 = 4; - if (local_24._4_4_ != (int *)0x0) { - cVar2 = (**(code **)(*local_24._4_4_ + 0xc))(); + if ((*(undefined4 *)((char *)&(local_24) + 0x4)) != (int *)0x0) { + cVar2 = (**(code **)(*(*(undefined4 *)((char *)&(local_24) + 0x4)) + 0xc))(); if ((cVar2 != '\0') && (g_profileReleaseFn != (void *)0x0)) { (*g_profileReleaseFn)(&local_24); } diff --git a/src/game/kage_filesys_file_manager.cpp b/src/game/kage_filesys_file_manager.cpp index 3d98659..7bfb76f 100644 --- a/src/game/kage_filesys_file_manager.cpp +++ b/src/game/kage_filesys_file_manager.cpp @@ -23,7 +23,7 @@ bool KAGE_Filesys_FileManager::OpenRead(int param_2, int param_3) default: return true; case 0x26f: - return 0 < (int)this[0x4d7]; + return 0 < GHIDRA_INT(this[0x4d7]); case 0x27b: iVar1 = FUN_005c92f0(); if (iVar1 != 0) { @@ -41,7 +41,7 @@ bool KAGE_Filesys_FileManager::OpenRead(int param_2, int param_3) break; case 0x282: iVar1 = ((Entity_Player *)((Entity_Player *)this))->Entity_Player::GetEffectiveMaxHearts(); - return 0 < iVar1 + (int)this[0x4d3]; + return 0 < iVar1 + GHIDRA_INT(this[0x4d3]); case 0x2c5: if ((this[0x7cb] == (KAGE_Filesys_FileManager)0x0) && (1.0 < (float)this[0xd8] * (float)this[0xd8] + (float)this[0xd9] * (float)this[0xd9])) { @@ -63,15 +63,15 @@ bool KAGE_Filesys_FileManager::OpenRead(int param_2, int param_3) if (0x127 < param_2) { if (param_2 != 0x1e7) { if (param_2 == 0x22b) { - return 4 < (int)this[0x4da]; + return 4 < GHIDRA_INT(this[0x4da]); } return true; } LAB_005ca662: - return 1 < (int)this[0x4d0]; + return 1 < GHIDRA_INT(this[0x4d0]); } if (param_2 == 0x127) { - return 0 < (int)this[0x4da]; + return 0 < GHIDRA_INT(this[0x4da]); } if (param_2 != 0x82) { if (param_2 == 0x85) goto LAB_005ca662; @@ -101,7 +101,7 @@ uint KAGE_Filesys_FileManager::GetPrimaryFilePathHash(byte *filePath) if (0x19 < (byte)(ch + 0xbf)) { lowerCh = ch; } - normalizedCh = (uint)lowerCh; + normalizedCh = GHIDRA_UINT(lowerCh); if (lowerCh == 0x5c) { normalizedCh = 0x2f; } @@ -149,7 +149,7 @@ void KAGE_Filesys_FileManager::LoadArchiveFile(byte *param_1, uint *param_2, ush local_8 = 0xffffffff; puStack_c = &LAB_00b11020; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(headerMagic + 0x18); + uVar1 = __security_cookie ^ GHIDRA_UINT((headerMagic + 0x18)); ExceptionList = &local_10; archivePath = param_1; local_14 = uVar1; @@ -170,7 +170,7 @@ void KAGE_Filesys_FileManager::LoadArchiveFile(byte *param_1, uint *param_2, ush isLess = ch < *resolvedPathChar; if (ch != *resolvedPathChar) { LAB_00a17a60: - isExpectedChecksum = -(uint)isLess | 1; + isExpectedChecksum = -GHIDRA_UINT(isLess) | 1; goto LAB_00a17a65; } if (ch == 0) break; @@ -258,12 +258,12 @@ LAB_00a17a65: local_e4c = *(uint *)(archivedFileRecord + 0x10); do { uVar5 = local_e4c; - if (0x200 < (int)local_e4c) { + if (0x200 < GHIDRA_INT(local_e4c)) { uVar5 = 0x200; } isExpectedChecksum = (**(code **)(archivedFile[0] + 0x14))(chunkBuffer,1,uVar5); iVar3 = 0; - dwordCount = (int)(((int)(isExpectedChecksum + 3) >> 0x1f & 3U) + isExpectedChecksum + 3) >> 2; + dwordCount = GHIDRA_INT(((GHIDRA_INT((isExpectedChecksum + 3)) >> 0x1f & 3U) + isExpectedChecksum + 3)) >> 2; if (0 < dwordCount) { do { piVar4 = chunkBuffer + iVar3; @@ -272,7 +272,7 @@ LAB_00a17a65: } while (iVar3 < dwordCount); } local_e4c = local_e4c - uVar5; - } while ((0 < (int)local_e4c) && (isExpectedChecksum == uVar5)); + } while ((0 < GHIDRA_INT(local_e4c)) && (isExpectedChecksum == uVar5)); if (uVar1 == *(uint *)(archivedFileRecord + 0x14)) { uVar5 = fileEntry[1] & 0x7fff; iVar3 = *(int *)(&DAT_00c37b18 + uVar5 * 4); diff --git a/src/game/kage_graphics.cpp b/src/game/kage_graphics.cpp index 8d6046f..070636f 100644 --- a/src/game/kage_graphics.cpp +++ b/src/game/kage_graphics.cpp @@ -29,7 +29,7 @@ void * KAGE_Graphics::create_image(void *outImage, int width, int height, int fo local_8 = 0xffffffff; puStack_c = &LAB_00b10a5e; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; local_18 = 0; ((KAGE::SmartPointer *)(&imageRef))->KAGE::SmartPointer::SmartPointer((void *)0x0); @@ -96,7 +96,7 @@ LAB_00a11e8b: } else { stream = KAGE::Filesys::BufferedStream::vftable; - local_8 = CONCAT31(local_8._1_3_,3); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); isLoaded = (**(code **)(*imageObj + 0x38))(&stream,name); if (isLoaded != '\0') { nameSrc = "unknown"; @@ -112,18 +112,18 @@ LAB_00a11e8b: bVar1 = *nameEnd; nameEnd = nameEnd + 1; } while (bVar1 != 0); - nameCopy = operator_new_tracked((uint)(nameEnd + (1 - (int)(nameSrc + 1)))); + nameCopy = operator_new_tracked(GHIDRA_UINT((nameEnd + (1 - GHIDRA_INT((nameSrc + 1)))))); nameEnd = (byte *)nameSrc; do { bVar1 = *nameEnd; nameEnd = nameEnd + 1; } while (bVar1 != 0); - strncpy(nameCopy,nameSrc,(size_t)(nameEnd + (1 - (int)(nameSrc + 1)))); + strncpy(nameCopy,nameSrc,(size_t)(nameEnd + (1 - GHIDRA_INT((nameSrc + 1))))); } - imageObj[0x10] = (int)nameCopy; + imageObj[0x10] = GHIDRA_INT(nameCopy); } FUN_00a12c00(); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); FUN_00a58200(); if (isLoaded == '\0') goto LAB_00a11e8b; (**(code **)(*imageRef + 0x40))(); @@ -166,7 +166,7 @@ void KAGE_Graphics::flush_batches() local_8 = 0xffffffff; puStack_c = &LAB_00b10c9d; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; piVar4 = *(int **)((char *)this + 0x80); local_24 = this; @@ -236,9 +236,9 @@ void KAGE_Graphics::flush_batches() FID_conflict__Erase_tree_>_> (local_18,(fuzzer_allocator_> *)local_18, (_Tree_node *)piVar4[1]); - piVar4[1] = (int)piVar4; - *piVar4 = (int)piVar4; - piVar4[2] = (int)piVar4; + piVar4[1] = GHIDRA_INT(piVar4); + *piVar4 = GHIDRA_INT(piVar4); + piVar4[2] = GHIDRA_INT(piVar4); local_18[1] = 0; if (piVar3 != (int *)0x0) { do { @@ -254,12 +254,12 @@ void KAGE_Graphics::flush_batches() batchIt = local_14; } if (batchIt != (int *)0x0) { - uVar2 = local_20 - (int)batchIt & 0xfffffffc; + uVar2 = local_20 - GHIDRA_INT(batchIt) & 0xfffffffc; piVar4 = batchIt; if (0xfff < uVar2) { piVar4 = (int *)batchIt[-1]; uVar2 = uVar2 + 0x23; - if (0x1f < (uint)((int)batchIt + (-4 - (int)piVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(batchIt) + (-4 - GHIDRA_INT(piVar4))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -340,7 +340,7 @@ void KAGE_Graphics::update_projection() undefined4 program; int renderTarget; - local_14 = (float)(__security_cookie ^ (uint)(local_58 + 0x12)); + local_14 = (float)(__security_cookie ^ GHIDRA_UINT((local_58 + 0x12))); if (g_currentShader == (void *)0x0) { return; } @@ -408,25 +408,25 @@ void KAGE_Graphics::update_depth_renderbuffer(byte isForced) undefined4 *renderbufferId; uVar1 = *(uint *)((char *)this + 0xb4); - if ((int)uVar1 < 1) { + if (GHIDRA_INT(uVar1) < 1) { uVar1 = (**(code **)(*(int *)this + 0x5c))(); } height = *(uint *)((char *)this + 0xb8); - if ((int)height < 1) { + if (GHIDRA_INT(height) < 1) { height = (**(code **)(*(int *)this + 0x60))(); } if ((isForced == 0) && (*(int *)((char *)this + 0xb0) != 0)) { (*(code *)epoxy_glBindRenderbuffer)(0x8d41,*(int *)((char *)this + 0xb0)); (*(code *)epoxy_glGetRenderbufferParameteriv)(0x8d41,0x8d42,&isForced); (*(code *)epoxy_glGetRenderbufferParameteriv)(0x8d41,0x8d43,¤tHeight); - if (((int)uVar1 <= _isForced) && ((int)height <= currentHeight)) { + if ((GHIDRA_INT(uVar1) <= _isForced) && (GHIDRA_INT(height) <= currentHeight)) { return; } } if (*(int *)((char *)this + 0xb0) != 0) { - (*(code *)epoxy_glDeleteRenderbuffers)(1,(int)this + 0xb0); + (*(code *)epoxy_glDeleteRenderbuffers)(1,GHIDRA_INT(this) + 0xb0); } - if ((int)uVar1 < 9) { + if (GHIDRA_INT(uVar1) < 9) { uVar1 = 8; uVar2 = 7; widthBits = 4; @@ -444,7 +444,7 @@ LAB_00a18808: if (widthBits != 0) goto LAB_00a18808; } _isForced = uVar2 + 1; - if ((int)height < 9) { + if (GHIDRA_INT(height) < 9) { height = 8; uVar1 = 7; uVar2 = 4; @@ -463,7 +463,7 @@ LAB_00a18808: LAB_00a18850: (*(code *)epoxy_glGetIntegerv)(0x8ca6,&prevFramebuffer); (*(code *)epoxy_glBindFramebuffer)(0x8d40,*(undefined4 *)((char *)this + 0xac)); - renderbufferId = (undefined4 *)((int)this + 0xb0); + renderbufferId = (undefined4 *)(GHIDRA_INT(this) + 0xb0); (*(code *)epoxy_glGenRenderbuffers)(1,renderbufferId); pow2Width = _isForced; KAGE_LogMessage(1,(byte *)"Renderbuffer ID: %d size %dx%d\n"); @@ -527,9 +527,9 @@ void KAGE_Graphics::set_fullscreen(byte isFullscreen, byte isExclusive) _glfwInputError(0x10001,0); } else { - *(uint *)((char *)pvVar1 + 4) = (uint)isResizable; + *(uint *)((char *)pvVar1 + 4) = GHIDRA_UINT(isResizable); if (*(int *)((char *)pvVar1 + 0x40) == 0) { - (*DAT_00c73778)(pvVar1,(uint)isResizable); + (*DAT_00c73778)(pvVar1,GHIDRA_UINT(isResizable)); } } uFlags = 3; @@ -554,9 +554,9 @@ void KAGE_Graphics::set_fullscreen(byte isFullscreen, byte isExclusive) piVar3 = (int *)0x0; } else { - currentModeAddr = (int)local_8 + 0x98; + currentModeAddr = GHIDRA_INT(local_8) + 0x98; iVar2 = (*DAT_00c736fc)(local_8,currentModeAddr); - piVar3 = (int *)(-(uint)(iVar2 != 0) & currentModeAddr); + piVar3 = (int *)(-GHIDRA_UINT((iVar2 != 0)) & currentModeAddr); } if (isExclusive != 0) { FUN_00a6b0a0(0,0,*piVar3,piVar3[1],piVar3[5]); @@ -648,7 +648,7 @@ LAB_00a1993f: viewportOffset = &g_vectorZero; } (*(code *)epoxy_glViewport) - ((int)viewportOffset->x,(int)viewportOffset->y,DAT_00c799a8,DAT_00c799ac); + (GHIDRA_INT(viewportOffset->x),GHIDRA_INT(viewportOffset->y),DAT_00c799a8,DAT_00c799ac); update_projection(&DAT_00c798e0); update_depth_renderbuffer(&DAT_00c798e0,0); pvVar1 = g_glfwWindow; @@ -663,7 +663,7 @@ LAB_00a1993f: return; } *(undefined4 *)((char *)pvVar1 + 0x70) = 0x34001; - (*DAT_00c736a0)(pvVar1,(int)pvVar1 + 0x1e0,(int)pvVar1 + 0x1e8); + (*DAT_00c736a0)(pvVar1,GHIDRA_INT(pvVar1) + 0x1e0,GHIDRA_INT(pvVar1) + 0x1e8); (*DAT_00c736a8)(pvVar1,0x34001); return; } @@ -679,7 +679,7 @@ LAB_00a1993f: return; } *(undefined4 *)((char *)pvVar1 + 0x70) = 0x34002; - (*DAT_00c736a0)(pvVar1,(int)pvVar1 + 0x1e0,(int)pvVar1 + 0x1e8); + (*DAT_00c736a0)(pvVar1,GHIDRA_INT(pvVar1) + 0x1e0,GHIDRA_INT(pvVar1) + 0x1e8); (*DAT_00c736a8)(pvVar1,0x34002); return; } @@ -768,7 +768,7 @@ undefined4 KAGE_Graphics::create_window() if (in_ECX[0x2f] != 0) { FUN_00a6af90(); } - lpIconName = (LPCSTR)(uint)DAT_00c79a40; + lpIconName = (LPCSTR)GHIDRA_UINT(DAT_00c79a40); hInstance = GetModuleHandleA((LPCSTR)0x0); dwNewLong = LoadIconA(hInstance,lpIconName); if (_glfw == 0) { @@ -969,16 +969,16 @@ uint KAGE_Graphics::submit_batch() (**(code **)(*(int *)(in_ECX + 0x34) + 4))(); local_24 = *(int **)(*(int *)(in_ECX + 0x38) + 0x10 + *(int *)(in_ECX + 0x3c) * 0x14); local_20 = (code *)FUN_00a24e10(); - vertexCount = vertexBytes / (uint)local_20; - if (vertexBytes % (uint)local_20 != 0) { + vertexCount = vertexBytes / GHIDRA_UINT(local_20); + if (vertexBytes % GHIDRA_UINT(local_20) != 0) { KAGE_LogMessage(0x10,(byte *)"Misaligned vertex data"); } iVar6 = DAT_00c7367c[2]; bufferRanges = DAT_00c7367c[1]; indexCount = *(uint *)(bufferRanges + 8 + iVar6 * 0x14) >> 1; - iVar5 = ((int)(vertexCount + ((int)vertexCount >> 0x1f & 3U)) >> 2) * 6 - indexCount; + iVar5 = (GHIDRA_INT((vertexCount + (GHIDRA_INT(vertexCount) >> 0x1f & 3U))) >> 2) * 6 - indexCount; if (0 < iVar5) { - uVar7 = (uint)((ulonglong)indexCount * 0xaaaaaaab >> 0x20) & 0xfffffffc; + uVar7 = GHIDRA_UINT(((ulonglong)indexCount * 0xaaaaaaab >> 0x20)) & 0xfffffffc; (**(code **)(*DAT_00c7367c + 8))((iVar5 + indexCount) * 2); iVar6 = DAT_00c7367c[2]; bufferRanges = DAT_00c7367c[1]; diff --git a/src/game/kage_graphics_image_manager.cpp b/src/game/kage_graphics_image_manager.cpp index 7799f54..4353362 100644 --- a/src/game/kage_graphics_image_manager.cpp +++ b/src/game/kage_graphics_image_manager.cpp @@ -31,7 +31,7 @@ void * KAGE_Graphics_ImageManager::load_image_file(void *param_1, byte *param_2) local_8 = 0xffffffff; puStack_c = &LAB_00b10a0f; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (uint)(cachedImage + 0x24); + uVar3 = __security_cookie ^ GHIDRA_UINT((cachedImage + 0x24)); ExceptionList = &local_10; local_18 = 0; ((KAGE::SmartPointer *)(&local_20))->KAGE::SmartPointer::SmartPointer((void *)0x0); @@ -43,7 +43,7 @@ void * KAGE_Graphics_ImageManager::load_image_file(void *param_1, byte *param_2) goto LAB_00a11c31; } pvVar5 = (void *)FUN_00a11780(cachedImage,pbVar4); - local_8 = CONCAT31(local_8._1_3_,3); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); local_18 = 2; piVar6 = ((KAGE::SmartPointer *)(&local_20))->KAGE::SmartPointer::operator_assign(pvVar5); iVar7 = *piVar6; @@ -55,16 +55,16 @@ void * KAGE_Graphics_ImageManager::load_image_file(void *param_1, byte *param_2) (*g_imageReleaseFn)(cachedImage); } if (iVar7 != 0) { - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; tracked_alloc(1,pbVar4,0); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); ((KAGE::SmartPointer *)(param_1))->KAGE::SmartPointer::operator_assign(&local_20); local_8 = 6; goto LAB_00a11c31; } - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; tracked_alloc(1,pbVar4,0); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); pbVar4 = path_join(param_2,(byte *)0x0,0,0); if (pbVar4 == (byte *)0x0) { pbVar10 = (byte *)0x0; @@ -75,8 +75,8 @@ void * KAGE_Graphics_ImageManager::load_image_file(void *param_1, byte *param_2) bVar1 = *pbVar10; pbVar10 = pbVar10 + 1; } while (bVar1 != 0); - bVar1 = pbVar4[(int)pbVar10 - (int)(pbVar4 + 1)]; - pbVar10 = pbVar4 + ((int)pbVar10 - (int)(pbVar4 + 1)); + bVar1 = pbVar4[GHIDRA_INT(pbVar10) - GHIDRA_INT((pbVar4 + 1))]; + pbVar10 = pbVar4 + (GHIDRA_INT(pbVar10) - GHIDRA_INT((pbVar4 + 1))); while ((bVar1 != 0x2e && (pbVar10 != pbVar4))) { pbVar10 = pbVar10 + -1; bVar1 = *pbVar10; @@ -132,7 +132,7 @@ LAB_00a11b63: bVar11 = bVar1 < *pbVar8; if (bVar1 != *pbVar8) { LAB_00a11b38: - uVar3 = -(uint)bVar11 | 1; + uVar3 = -GHIDRA_UINT(bVar11) | 1; goto LAB_00a11b3d; } if (bVar1 == 0) break; @@ -163,9 +163,9 @@ LAB_00a11bef: puVar9 = ((FileSystem *)(&PTR_vftable_00c37a10))->FileSystem::Open(pbVar4,piVar6 + 0x11); cVar2 = (**(code **)(*piVar6 + 0x38))(puVar9,piVar6[0x11]); if ((cVar2 == '\0') && ((void *)piVar6[0x11] != (void *)0x0)) { - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; tracked_alloc(1,(void *)piVar6[0x11],0); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); piVar6[0x11] = 0; } if (puVar9 != (undefined4 *)0x0) { @@ -177,9 +177,9 @@ LAB_00a11bef: FUN_00a120f0(&local_20); } if (pbVar4 != (byte *)0x0) { - local_8._0_1_ = 9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; tracked_alloc(1,pbVar4,0); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); } ((KAGE::SmartPointer *)(param_1))->KAGE::SmartPointer::operator_assign(&local_20); local_8 = 10; diff --git a/src/game/key_configs.cpp b/src/game/key_configs.cpp index 4155cae..a1b6c13 100644 --- a/src/game/key_configs.cpp +++ b/src/game/key_configs.cpp @@ -32,7 +32,7 @@ void KeyConfigs::apply_to_device(int deviceId) local_8 = (char *)0xffffffff; puStack_c = &LAB_00b0235b; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (uint)(newEntry + 0x45); + uVar3 = __security_cookie ^ GHIDRA_UINT((newEntry + 0x45)); ExceptionList = &local_10; local_14 = uVar3; ((InputManager *)(&PTR_vftable_00c57b18))->InputManager::get_device(&local_124,deviceId); @@ -51,7 +51,7 @@ void KeyConfigs::apply_to_device(int deviceId) isLess = ch < *configNameChar; if (ch != *configNameChar) { LAB_00835d40: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_00835d45; } if (ch == 0) break; @@ -65,9 +65,9 @@ LAB_00835d40: LAB_00835d45: if (uVar3 == 0) { ((InputManager *)(&PTR_vftable_00c57b18))->InputManager::get_device(&targetDevice,deviceId); - local_8 = (char *)CONCAT31(local_8._1_3_,1); + local_8 = (char *)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); if (targetDevice == 0) { - local_8 = (char *)CONCAT31(local_8._1_3_,2); + local_8 = (char *)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); if (targetDeviceRef != (int *)0x0) { cVar2 = (**(code **)(*targetDeviceRef + 0xc))(); if ((cVar2 != '\0') && (g_inputDeviceRelease != (void *)0x0)) { @@ -85,7 +85,7 @@ LAB_00835d45: iVar1 = targetDevice; binding = *puVar8; iVar4 = *(int *)(targetDevice + 0x10); - if ((uint)(*(int *)(targetDevice + 0x14) - iVar4 >> 4) <= actionId) { + if (GHIDRA_UINT((*(int *)(targetDevice + 0x14) - iVar4 >> 4)) <= actionId) { KAGE_LogMessage(0x10,(byte *)"ActionId is out of range\n"); iVar4 = *(int *)(iVar1 + 0x10); } @@ -96,7 +96,7 @@ LAB_00835d45: actionId = actionId + 1; actionOffset = actionOffset + 0x10; } while (actionOffset < 0x200); - local_8 = (char *)CONCAT31(local_8._1_3_,3); + local_8 = (char *)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); if (targetDeviceRef != (int *)0x0) { cVar2 = (**(code **)(*targetDeviceRef + 0xc))(); if ((cVar2 != '\0') && (g_inputDeviceRelease != (void *)0x0)) { @@ -119,7 +119,7 @@ LAB_00835d45: cVar2 = *pcVar5; pcVar5 = pcVar5 + 1; } while (cVar2 != '\0'); - pcVar5 = operator_new_tracked((uint)(pcVar5 + (1 - (int)pcVar7))); + pcVar5 = operator_new_tracked(GHIDRA_UINT((pcVar5 + (1 - GHIDRA_INT(pcVar7))))); newEntry[0] = pcVar5; pcVar6 = (char *)(**(code **)(*local_124 + 0xc))(); pcVar7 = pcVar6 + 1; @@ -127,7 +127,7 @@ LAB_00835d45: cVar2 = *pcVar6; pcVar6 = pcVar6 + 1; } while (cVar2 != '\0'); - pcVar6 = pcVar6 + (1 - (int)pcVar7); + pcVar6 = pcVar6 + (1 - GHIDRA_INT(pcVar7)); pcVar7 = (char *)(**(code **)(*local_124 + 0xc))(); strncpy(pcVar5,pcVar7,(size_t)pcVar6); FUN_00835ba0(deviceId); diff --git a/src/game/l_room_tile_desc.cpp b/src/game/l_room_tile_desc.cpp index 2af019a..9623044 100644 --- a/src/game/l_room_tile_desc.cpp +++ b/src/game/l_room_tile_desc.cpp @@ -15,13 +15,13 @@ void * LRoomTileDesc::GetRandomTile(void *ret, uint seed) uint areaRoll; uint width2; - uVar3 = (int)this[3] - (int)this[1]; - width1 = (int)this[2] - (int)*this; - height2 = (int)this[7] - (int)this[5]; - width2 = (int)this[6] - (int)this[4]; - area1 = (int)(uVar3 * width1) >> 0x1f; + uVar3 = GHIDRA_INT(this[3]) - GHIDRA_INT(this[1]); + width1 = GHIDRA_INT(this[2]) - GHIDRA_INT(*this); + height2 = GHIDRA_INT(this[7]) - GHIDRA_INT(this[5]); + width2 = GHIDRA_INT(this[6]) - GHIDRA_INT(this[4]); + area1 = GHIDRA_INT((uVar3 * width1)) >> 0x1f; area1 = (uVar3 * width1 ^ area1) - area1; - height2 = (int)(height2 * width2) >> 0x1f; + height2 = GHIDRA_INT((height2 * width2)) >> 0x1f; height2 = ((height2 * width2 ^ height2) - height2) + area1; if (seed == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -65,8 +65,8 @@ void * LRoomTileDesc::GetRandomTile(void *ret, uint seed) uVar3 = (rngState >> 0x1d ^ rngState) % uVar3; } LVar1 = this[1]; - *(uint *)ret = (int)*this + height2; - *(uint *)((char *)ret + 4) = (int)LVar1 + uVar3; + *(uint *)ret = GHIDRA_INT(*this) + height2; + *(uint *)((char *)ret + 4) = GHIDRA_INT(LVar1) + uVar3; return ret; } if (rngState == 0) { @@ -93,10 +93,10 @@ void * LRoomTileDesc::GetRandomTile(void *ret, uint seed) rngState = rngState << 9 ^ rngState; if (height2 == 0) { *(LRoomTileDesc *)((char *)ret + 4) = this[5]; - *(uint *)ret = (int)LVar1 + uVar3; + *(uint *)ret = GHIDRA_INT(LVar1) + uVar3; return ret; } - *(uint *)((char *)ret + 4) = (int)this[5] + (rngState >> 0x1d ^ rngState) % height2; - *(uint *)ret = (int)LVar1 + uVar3; + *(uint *)((char *)ret + 4) = GHIDRA_INT(this[5]) + (rngState >> 0x1d ^ rngState) % height2; + *(uint *)ret = GHIDRA_INT(LVar1) + uVar3; return ret; } diff --git a/src/game/layer_state.cpp b/src/game/layer_state.cpp index 90de128..b3ecf23 100644 --- a/src/game/layer_state.cpp +++ b/src/game/layer_state.cpp @@ -15,7 +15,7 @@ LayerState::~LayerState() local_8 = 0; if (*(int **)(in_ECX + 0x9c) != (int *)0x0) { isLastRef = (**(code **)(**(int **)(in_ECX + 0x9c) + 0xc)) - (__security_cookie ^ (int)register0x00000010 - 4U); + (__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); if ((isLastRef != '\0') && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(in_ECX + 0x98); } @@ -102,7 +102,7 @@ void LayerState::Init(void *param_2) local_8 = (void *)0xffffffff; puStack_c = &LAB_00af0ae7; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(emptyPath + 0xb); + local_18 = __security_cookie ^ GHIDRA_UINT((emptyPath + 0xb)); ExceptionList = &local_10; this->_layerData = param_2; isNoData = param_2 == (void *)0x0; @@ -114,25 +114,25 @@ void LayerState::Init(void *param_2) local_8 = (void *)0x1; } else { - text = ((std::string *)((char *)layerPath))->std::string::string((void *)((int)param_2 + 0x20)); + text = ((std::string *)((char *)layerPath))->std::string::string((void *)(GHIDRA_INT(param_2) + 0x20)); local_8 = (void *)0x0; } - local_8 = (void *)(uint)isNoData; + local_8 = (void *)GHIDRA_UINT(isNoData); if (&this->_spriteSheetPath != (std_string *)text) { textSize = text + 4; if ((void *)0xf < text[5]) { text = *text; } - ((std::string *)((this->_spriteSheetPath)._buf))->std::string::assign((byte *)text,(uint)*textSize); + ((std::string *)((this->_spriteSheetPath)._buf))->std::string::assign((byte *)text,GHIDRA_UINT(*textSize)); } local_8 = (void *)0x0; if ((isNoData) && (0xf < emptyPathCapacity)) { uVar1 = emptyPathCapacity + 1; allocBlock = emptyPath[0]; if (0xfff < uVar1) { - allocBlock = *(void **)((int)emptyPath[0] + -4); + allocBlock = *(void **)(GHIDRA_INT(emptyPath[0]) + -4); uVar1 = emptyPathCapacity + 0x24; - if (0x1f < (uint)((int)emptyPath[0] + (-4 - (int)allocBlock))) goto LAB_00408423; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(emptyPath[0]) + (-4 - GHIDRA_INT(allocBlock))))) goto LAB_00408423; } operator_delete(allocBlock,uVar1); } @@ -142,9 +142,9 @@ void LayerState::Init(void *param_2) uVar1 = layerPathCapacity + 1; allocBlock = layerPath[0]; if (0xfff < uVar1) { - allocBlock = *(void **)((int)layerPath[0] + -4); + allocBlock = *(void **)(GHIDRA_INT(layerPath[0]) + -4); uVar1 = layerPathCapacity + 0x24; - if (0x1f < (uint)((int)layerPath[0] + (-4 - (int)allocBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(layerPath[0]) + (-4 - GHIDRA_INT(allocBlock))))) { LAB_00408423: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -154,7 +154,7 @@ LAB_00408423: } layerPathSize = 0; layerPathCapacity = 0xf; - layerPath[0] = (void *)((uint)layerPath[0] & 0xffffff00); + layerPath[0] = (void *)(GHIDRA_UINT(layerPath[0]) & 0xffffff00); } ((KAGE::SmartPointer *)(&this->_spriteSheet))->KAGE::SmartPointer::reset((void *)0x0); this->_spriteSheetLoaded = 0; @@ -239,7 +239,7 @@ void LayerState::SetTexture(void *texture, void *textureRefCount) puStack_c = &LAB_00af0b1d; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; local_8 = 0; if (texture != (void *)0x0) { diff --git a/src/game/leaderboard.cpp b/src/game/leaderboard.cpp index 1842b64..0b75eb0 100644 --- a/src/game/leaderboard.cpp +++ b/src/game/leaderboard.cpp @@ -16,7 +16,7 @@ void Leaderboard::constructor() ((ANM2 *)((ANM2 *)(in_ECX + 0x10)))->ANM2::constructor(); local_8 = 0; ((ANM2 *)((ANM2 *)(in_ECX + 0x124)))->ANM2::constructor(); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); *(undefined4 *)(in_ECX + 0x238) = 0; *(undefined4 *)(in_ECX + 0x23c) = 0; *(undefined4 *)(in_ECX + 0x240) = 0; @@ -47,7 +47,7 @@ Leaderboard::~Leaderboard() local_8 = 0xffffffff; puStack_c = &LAB_00b03580; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; KAGE::System::LeaderboardManager::release_result(-1); entries = *(void **)(this + 0x49); @@ -56,7 +56,7 @@ Leaderboard::~Leaderboard() this[0x47]._state = 0; *(undefined4 *)(this + 0x47) = 0; if (entries != (void *)0x0) { - entriesBlock = (uint *)((int)entries + -4); + entriesBlock = (uint *)(GHIDRA_INT(entries) + -4); local_8 = 0; _eh_vector_destructor_iterator_(entries,0x28,*entriesBlock,FUN_00a51500); operator_delete(entriesBlock,*entriesBlock * 0x28 + 4); @@ -101,7 +101,7 @@ void Leaderboard::Update() return; } uVar2 = g_manager->_framecount & 0x80000001; - if ((int)uVar2 < 0) { + if (GHIDRA_INT(uVar2) < 0) { uVar2 = (uVar2 - 1 | 0xfffffffe) + 1; } if (uVar2 == 1) { @@ -136,7 +136,7 @@ void Leaderboard::Update() isLess = bVar1 < (byte)*targetName; if (bVar1 != *targetName) { LAB_00857630: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_00857635; } if (bVar1 == 0) break; @@ -239,10 +239,10 @@ void Leaderboard::update_input() char *closeAnim; Game *game; - local_8 = (float)(__security_cookie ^ (uint)&fadeColor[5]._alpha); + local_8 = (float)(__security_cookie ^ GHIDRA_UINT(&fadeColor[5]._alpha)); if (closeSprite->_state != 0) { if (*(int *)closeSprite == 0) { - if (((char)closeSprite[0x73]._state != '\0') && (*(char *)((int)&closeSprite[0x73]._state + 1) != '\0')) { + if (((char)closeSprite[0x73]._state != '\0') && (*(char *)(GHIDRA_INT(&closeSprite[0x73]._state) + 1) != '\0')) { buttonAction = 0xe; isTriggered = (**(code **)(PTR_vftable_00c57b18 + 0x74)) (0xffffffff,FUN_00a209e0,&buttonAction,0,0); @@ -288,7 +288,7 @@ void Leaderboard::update_input() (0xffffffff,FUN_00a209e0,&buttonAction,0,0); if (isTriggered != '\0') { uVar2 = *(int *)(closeSprite + 1) + 1U & 0x80000003; - if ((int)uVar2 < 0) { + if (GHIDRA_INT(uVar2) < 0) { uVar2 = (uVar2 - 1 | 0xfffffffc) + 1; } iVar3 = closeSprite[1]._state; @@ -488,7 +488,7 @@ void Leaderboard::Show(uint Date, ScoreSheet *ScoreSheet, byte SubmitScore, byte bVar3 = bVar1 < (byte)*targetName; if (bVar1 != *targetName) { LAB_00858140: - uVar2 = -(uint)bVar3 | 1; + uVar2 = -GHIDRA_UINT(bVar3) | 1; goto LAB_00858145; } if (bVar1 == 0) break; @@ -520,31 +520,31 @@ LAB_00858172: *(undefined4 *)(this + 0x48) = 0; this[0x47]._state = 0; *(undefined4 *)(this + 0x47) = 0; - this[0x61]._state = (int)*ScoreSheet; + this[0x61]._state = GHIDRA_INT(*ScoreSheet); *(ScoreSheet *)(this + 0x62) = ScoreSheet[1]; - this[0x62]._state = (int)ScoreSheet[2]; + this[0x62]._state = GHIDRA_INT(ScoreSheet[2]); *(ScoreSheet *)(this + 99) = ScoreSheet[3]; - this[99]._state = (int)ScoreSheet[4]; + this[99]._state = GHIDRA_INT(ScoreSheet[4]); *(ScoreSheet *)(this + 100) = ScoreSheet[5]; - this[100]._state = (int)ScoreSheet[6]; + this[100]._state = GHIDRA_INT(ScoreSheet[6]); *(ScoreSheet *)(this + 0x65) = ScoreSheet[7]; - this[0x65]._state = (int)ScoreSheet[8]; + this[0x65]._state = GHIDRA_INT(ScoreSheet[8]); *(ScoreSheet *)(this + 0x66) = ScoreSheet[9]; - this[0x66]._state = (int)ScoreSheet[10]; + this[0x66]._state = GHIDRA_INT(ScoreSheet[10]); *(ScoreSheet *)(this + 0x67) = ScoreSheet[0xb]; - this[0x67]._state = (int)ScoreSheet[0xc]; + this[0x67]._state = GHIDRA_INT(ScoreSheet[0xc]); *(ScoreSheet *)(this + 0x68) = ScoreSheet[0xd]; - this[0x68]._state = (int)ScoreSheet[0xe]; + this[0x68]._state = GHIDRA_INT(ScoreSheet[0xe]); *(ScoreSheet *)(this + 0x69) = ScoreSheet[0xf]; std::vector<12byte>::operator_assign(ScoreSheet + 0x10); *(ScoreSheet *)(this + 0x6b) = ScoreSheet[0x13]; - this[0x6b]._state = (int)ScoreSheet[0x14]; + this[0x6b]._state = GHIDRA_INT(ScoreSheet[0x14]); *(ScoreSheet *)(this + 0x6c) = ScoreSheet[0x15]; - this[0x6c]._state = (int)ScoreSheet[0x16]; + this[0x6c]._state = GHIDRA_INT(ScoreSheet[0x16]); std::vector<12byte>::operator_assign(ScoreSheet + 0x17); std::vector<12byte>::operator_assign(ScoreSheet + 0x1a); *(ScoreSheet *)(this + 0x70) = ScoreSheet[0x1d]; - this[0x70]._state = (int)ScoreSheet[0x1e]; + this[0x70]._state = GHIDRA_INT(ScoreSheet[0x1e]); std::vector<12byte>::operator_assign(ScoreSheet + 0x1f); *(undefined1 *)&this[0x72]._state = *(undefined1 *)(ScoreSheet + 0x22); *(ScoreSheet *)(this + 0x73) = ScoreSheet[0x23]; @@ -559,8 +559,8 @@ LAB_00858172: this[0x74]._state = 0; } *(bool *)&this[0x73]._state = bVar3; - *(bool *)((int)&this[0x73]._state + 1) = bVar3; - get_leaderboard(this,(uint)Group * 2,2); + *(bool *)(GHIDRA_INT(&this[0x73]._state) + 1) = bVar3; + get_leaderboard(this,GHIDRA_UINT(Group) * 2,2); return; } @@ -584,14 +584,14 @@ void Leaderboard::get_leaderboard(int RankingState, int LiveSelectionState) puStack_c = &LAB_00b03615; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(nameText2 + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((nameText2 + 10)); ExceptionList = &local_10; this[1]._state = LiveSelectionState; pvVar1 = *(void **)(this + 0x49); *(int *)(this + 1) = RankingState; this[0x75]._state = -1; if (pvVar1 != (void *)0x0) { - entriesBlock = (uint *)((int)pvVar1 + -4); + entriesBlock = (uint *)(GHIDRA_INT(pvVar1) + -4); local_8 = (void *)0x0; _eh_vector_destructor_iterator_(pvVar1,0x28,*entriesBlock,FUN_00a51500); operator_delete(entriesBlock,*entriesBlock * 0x28 + 4); @@ -616,9 +616,9 @@ joined_r0x008584dd: uVar2 = nameTextCapacity + 1; pvVar1 = nameText[0]; if (0xfff < uVar2) { - pvVar1 = *(void **)((int)nameText[0] + -4); + pvVar1 = *(void **)(GHIDRA_INT(nameText[0]) + -4); uVar2 = nameTextCapacity + 0x24; - if (0x1f < (uint)((int)nameText[0] + (-4 - (int)pvVar1))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(nameText[0]) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -649,9 +649,9 @@ joined_r0x00858578: uVar2 = nameText2Capacity + 1; pvVar1 = nameText2[0]; if (0xfff < uVar2) { - pvVar1 = *(void **)((int)nameText2[0] + -4); + pvVar1 = *(void **)(GHIDRA_INT(nameText2[0]) + -4); uVar2 = nameText2Capacity + 0x24; - if (0x1f < (uint)((int)nameText2[0] + (-4 - (int)pvVar1))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(nameText2[0]) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -660,7 +660,7 @@ joined_r0x00858578: } nameText2Size = 0; nameText2Capacity = 0xf; - nameText2[0] = (void *)((uint)nameText2[0] & 0xffffff00); + nameText2[0] = (void *)(GHIDRA_UINT(nameText2[0]) & 0xffffff00); goto LAB_00858490; } } @@ -700,11 +700,11 @@ void Leaderboard::download_entries(int param_1, int param_2) puStack_c = &LAB_00b03640; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; pvVar1 = (void *)in_ECX[0x92]; if (pvVar1 != (void *)0x0) { - entriesHeader = (uint *)((int)pvVar1 + -4); + entriesHeader = (uint *)(GHIDRA_INT(pvVar1) + -4); local_8 = 0; _eh_vector_destructor_iterator_(pvVar1,0x28,*entriesHeader,FUN_00a51500); operator_delete(entriesHeader,*entriesHeader * 0x28 + 4); @@ -742,7 +742,7 @@ LAB_0085881b: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } request = malloc(0xb4); if (request == (undefined4 *)0x0) { @@ -751,10 +751,10 @@ LAB_0085875f: } else { oldBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter + 0xb4; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) + 0xb4; *request = 0xb4; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) + (uint)(0xffffff4b < (uint)oldBytes); + *(uint *)((char *)allocCounter + 4) + GHIDRA_UINT((0xffffff4b < GHIDRA_UINT(oldBytes))); if (request != (undefined4 *)0xfffffffc) { handle = FUN_00a51570(5,handle,0,0,0,0,FUN_0085ab90,in_ECX); FUN_00a52100(handle); @@ -779,15 +779,15 @@ LAB_0085875f: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } request = malloc(0xb4); if (request == (undefined4 *)0x0) goto LAB_0085875f; oldBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter + 0xb4; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) + 0xb4; *request = 0xb4; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) + (uint)(0xffffff4b < (uint)oldBytes); + *(uint *)((char *)allocCounter + 4) + GHIDRA_UINT((0xffffff4b < GHIDRA_UINT(oldBytes))); if (request != (undefined4 *)0xfffffffc) { handle = FUN_00a51570(4,handle,9,0,0,0,FUN_0085ab90,in_ECX); FUN_00a52100(handle); @@ -842,7 +842,7 @@ void Leaderboard::render_daily_score_breakdown() local_8 = 0xffffffff; puStack_c = &LAB_00b0368b; local_10 = ExceptionList; - stackCookie = __security_cookie ^ (uint)(local_24 + 0x20); + stackCookie = __security_cookie ^ GHIDRA_UINT((local_24 + 0x20)); ExceptionList = &local_10; anchorX = (g_screenWidth - 480.0) * 0.5; anchorY = (g_screenHeight - 270.0) * 0.5; @@ -1154,7 +1154,7 @@ void Leaderboard::render_scores() local_14 = 0xffffffff; puStack_18 = &LAB_00b037a1; local_1c = ExceptionList; - stackCookie = __security_cookie ^ (uint)(rankText + 0x20); + stackCookie = __security_cookie ^ GHIDRA_UINT((rankText + 0x20)); ExceptionList = &local_1c; local_538 = (byte *)0x0; local_56c = sprite; @@ -1170,17 +1170,17 @@ void Leaderboard::render_scores() animNameHeap = local_520; cleanupFlags = &DAT_00000004; animNameText = (byte *****)&local_520; - if (0xf < (uint)local_51c._unk) { + if (0xf < GHIDRA_UINT(local_51c._unk)) { animNameText = local_520; } - local_526 = str_eq((byte *)animNameText,(uint)local_51c._alpha,s_Idle,4); - if (0xf < (uint)local_51c._unk) { + local_526 = str_eq((byte *)animNameText,GHIDRA_UINT(local_51c._alpha),s_Idle,4); + if (0xf < GHIDRA_UINT(local_51c._unk)) { uVar7 = local_51c._unk + 1; animNameText = animNameHeap; if (0xfff < uVar7) { animNameText = (byte *****)animNameHeap[-1]; uVar7 = local_51c._unk + 0x24; - if ((byte *)0x1f < (byte *)((int)animNameHeap + (-4 - (int)animNameText))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(animNameHeap) + (-4 - GHIDRA_INT(animNameText)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1210,64 +1210,64 @@ void Leaderboard::render_scores() else { ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,sprite[1]._state); } - local_52c = (byte *)(uint)(*(int *)sprite != 0); + local_52c = (byte *)GHIDRA_UINT((*(int *)sprite != 0)); pLVar5 = ((ANM2 *)((ANM2 *)sprite))->ANM2::GetLayer((byte *)"TextScore"); if (pLVar5 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,(int)local_52c); + ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,GHIDRA_INT(local_52c)); } - local_52c = (byte *)(uint)(*(int *)sprite != 0); + local_52c = (byte *)GHIDRA_UINT((*(int *)sprite != 0)); pLVar5 = ((ANM2 *)((ANM2 *)sprite))->ANM2::GetLayer((byte *)"TextTime"); if (pLVar5 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,(int)local_52c); + ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,GHIDRA_INT(local_52c)); } bVar3 = date_is_within_week(sprite); - local_52c = (byte *)(uint)(bVar3 == 0); + local_52c = (byte *)GHIDRA_UINT((bVar3 == 0)); pLVar5 = ((ANM2 *)((ANM2 *)sprite))->ANM2::GetLayer((byte *)"LeftArrow"); if (pLVar5 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,(int)local_52c); + ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,GHIDRA_INT(local_52c)); } bVar3 = date_is_after(sprite); - local_52c = (byte *)(uint)(bVar3 == 0); + local_52c = (byte *)GHIDRA_UINT((bVar3 == 0)); pLVar5 = ((ANM2 *)((ANM2 *)sprite))->ANM2::GetLayer((byte *)"RightArrow"); if (pLVar5 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,(int)local_52c); + ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,GHIDRA_INT(local_52c)); } - local_52c = (byte *)(uint)(sprite[0x75]._state < 1); + local_52c = (byte *)GHIDRA_UINT((sprite[0x75]._state < 1)); pLVar5 = ((ANM2 *)((ANM2 *)sprite))->ANM2::GetLayer((byte *)"UpArrow"); if (pLVar5 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,(int)local_52c); + ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,GHIDRA_INT(local_52c)); } cVar4 = FUN_00857ff0(); - local_52c = (byte *)(uint)(cVar4 == '\0'); + local_52c = (byte *)GHIDRA_UINT((cVar4 == '\0')); pLVar5 = ((ANM2 *)((ANM2 *)sprite))->ANM2::GetLayer((byte *)"DownArrow"); if (pLVar5 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,(int)local_52c); + ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,GHIDRA_INT(local_52c)); } - local_52c = (byte *)(uint)(*(int *)(sprite + 1) != 0); + local_52c = (byte *)GHIDRA_UINT((*(int *)(sprite + 1) != 0)); pLVar5 = ((ANM2 *)((ANM2 *)sprite))->ANM2::GetLayer((byte *)"SoloScore"); if (pLVar5 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,(int)local_52c); + ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,GHIDRA_INT(local_52c)); } if ((*(int *)(sprite + 1) == 0) || (local_548 = 1.4013e-45, *(int *)(sprite + 1) != 1)) { local_548 = 0.0; @@ -1277,7 +1277,7 @@ void Leaderboard::render_scores() KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,(int)local_548); + ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,GHIDRA_INT(local_548)); } local_52c = (byte *)0x2; if (*(int *)(sprite + 1) != 2) { @@ -1288,7 +1288,7 @@ void Leaderboard::render_scores() KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,(int)local_52c); + ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,GHIDRA_INT(local_52c)); } if ((*(int *)(sprite + 1) == 2) || (local_548 = 4.2039e-45, *(int *)(sprite + 1) != 3)) { local_548 = 0.0; @@ -1298,7 +1298,7 @@ void Leaderboard::render_scores() KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,(int)local_548); + ((ANM2 *)((ANM2 *)sprite))->ANM2::SetLayerFrame(*(int *)pLVar5->_layerData,GHIDRA_INT(local_548)); } } pLVar5 = ((ANM2 *)((ANM2 *)&sprite[0x24]._state))->ANM2::GetLayer((byte *)"Character"); @@ -1324,10 +1324,10 @@ void Leaderboard::render_scores() iVar9 = iVar9 + 1; break; case 10: - iVar9 = iVar9 + (3 - (uint)(*(int *)(sprite + 0x5d) != 1)); + iVar9 = iVar9 + (3 - GHIDRA_UINT((*(int *)(sprite + 0x5d) != 1))); break; case 0xb: - iVar9 = iVar9 + (5 - (uint)(*(int *)(sprite + 0x5d) != 1)); + iVar9 = iVar9 + (5 - GHIDRA_UINT((*(int *)(sprite + 0x5d) != 1))); } } else { @@ -1351,7 +1351,7 @@ void Leaderboard::render_scores() anchorPos.y = (g_screenHeight - 270.0) * 0.5; anchorPos.x = originX; originY = anchorPos.y; - if (*(char *)((int)&sprite[0x45]._state + 1) != '\0') { + if (*(char *)(GHIDRA_INT(&sprite[0x45]._state) + 1) != '\0') { if ((char)sprite[0x32]._state == '\0') { AnimationState::Render ((AnimationState *)&sprite[0x2a]._state,&anchorPos,&g_vectorZero,&g_vectorZero); @@ -1423,7 +1423,7 @@ void Leaderboard::render_scores() tStack_4e8.tm_isdst = gmTime->tm_isdst; bVar3 = (byte)dateTime; } - dateTime = CONCAT11(dateTime._1_1_,bVar3) & 0xfffc; + dateTime = CONCAT11((*(undefined1 *)((char *)&(dateTime) + 0x1)),bVar3) & 0xfffc; strftime((char *)messageText,0x48,"%a, %m/%d/%Y",&tStack_4e8); iVar9 = ((Font *)(font))->Font::get_string_width_n(messageText,-1); drawParams = 0; @@ -1473,7 +1473,7 @@ LAB_00859cda: bVar3 = *pbVar6; pbVar6 = pbVar6 + 1; } while (bVar3 != 0); - text_convert_encoding(messageText,(int)pbVar6 - (int)(messageText + 1),0,wideText,0x200,1); + text_convert_encoding(messageText,GHIDRA_INT(pbVar6) - GHIDRA_INT((messageText + 1)),0,wideText,0x200,1); iVar9 = ((Font *)(font))->Font::get_string_width_utf16(wideText,-1); fVar11 = (float)((double)iVar9 + __uint_to_double_fixup[-(iVar9 >> 0x1f)]) * 0.5; ((FontSettings *)(fontSettings))->FontSettings::constructor(); @@ -1489,22 +1489,22 @@ LAB_00859cda: local_538 = (byte *)sprite[0x75]._state; local_52c = local_538 + 10; sprite = (int *)&local_52c; - if (iVar9 < (int)(local_538 + 10)) { + if (iVar9 < GHIDRA_INT((local_538 + 10))) { sprite = &sprite[0x49]._state; } iVar9 = *sprite; } local_548 = originX + *scoresLeftFrame; - local_52c = (byte *)(iVar9 - (int)local_538); + local_52c = (byte *)(iVar9 - GHIDRA_INT(local_538)); rowY = originY + scoresLeftFrame[1]; - local_554 = (ScoreSheet)((float)(int)local_52c * -7.5); + local_554 = (ScoreSheet)((float)GHIDRA_INT(local_52c) * -7.5); dVar12 = floor((double)(float)local_554); local_554 = (ScoreSheet)(float)dVar12; local_548 = local_548 + 0.0; rowY = rowY + (float)local_554; - if ((int)local_538 < iVar9) { + if (GHIDRA_INT(local_538) < iVar9) { rankX = local_548 + 55.0; - entryOffset = (int)local_538 * 0x28; + entryOffset = GHIDRA_INT(local_538) * 0x28; nameX = local_548 + 75.0; do { iVar9 = entryOffset; @@ -1514,7 +1514,7 @@ LAB_00859cda: local_554 = local_c4; local_52d = true; local_525 = true; - if (0x47 < (uint)sprite[5]) { + if (0x47 < GHIDRA_UINT(sprite[5])) { entrySheet = (ScoreSheet *)sprite[4]; local_508 = 0; uStack_504 = 0; @@ -1526,7 +1526,7 @@ LAB_00859cda: local_148 = entrySheet[2]; local_144 = entrySheet[3]; SVar1 = entrySheet[0xe]; - tStack_4e8._16_8_ = *(undefined8 *)(entrySheet + 0xc); + (*(undefined8 *)((char *)&(tStack_4e8) + 0x10)) = *(undefined8 *)(entrySheet + 0xc); local_140 = entrySheet[4]; local_130 = entrySheet[5]; local_12c = entrySheet[6]; @@ -1537,13 +1537,13 @@ LAB_00859cda: local_114 = entrySheet[0xb]; local_104 = tStack_4e8.tm_mon; local_f8 = tStack_4e8.tm_year; - if (0x10900f7 < (uint)SVar1) { + if (0x10900f7 < GHIDRA_UINT(SVar1)) { local_138 = tStack_4e8.tm_yday; local_13c = tStack_4e8.tm_isdst; local_134 = local_4c4; } local_52d = tStack_4e8.tm_year != 1; - local_525 = (int)local_c4 < (int)SVar1; + local_525 = GHIDRA_INT(local_c4) < GHIDRA_INT(SVar1); local_c4 = SVar1; } cVar4 = (**(code **)(*sprite + 0x14))(); @@ -1580,7 +1580,7 @@ LAB_00859cda: bVar3 = *nameEnd; nameEnd = nameEnd + 1; } while (bVar3 != 0); - iVar8 = (int)nameEnd - (int)local_538; + iVar8 = GHIDRA_INT(nameEnd) - GHIDRA_INT(local_538); } text_convert_encoding(pbVar6,iVar8,0,&playerName,0x13,1); iVar8 = 0; @@ -1601,8 +1601,8 @@ LAB_00859cda: sprite = (int *)&DAT_00c799d8; } ((KAGE::SmartPointer *)(&profileAvatar))->KAGE::SmartPointer::operator_assign(sprite); - local_14 = CONCAT31(local_14._1_3_,2); - local_538 = (byte *)((uint)cleanupFlags | 9); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); + local_538 = (byte *)(GHIDRA_UINT(cleanupFlags) | 9); cleanupFlags = local_538; if (profileAvatar == 0) { LAB_0085a121: @@ -1615,14 +1615,14 @@ LAB_0085a121: } ((KAGE::SmartPointer *)(&local_574))->KAGE::SmartPointer::operator_assign(sprite); local_14 = 3; - local_538 = (byte *)((uint)cleanupFlags | 0x12); + local_538 = (byte *)(GHIDRA_UINT(cleanupFlags) | 0x12); cleanupFlags = local_538; cVar4 = (**(code **)*local_574)(); local_526 = '\x01'; if (cVar4 == '\0') goto LAB_0085a121; } - if (((uint)cleanupFlags & 2) != 0) { - local_538 = (byte *)((uint)cleanupFlags & 0xfffffffd); + if ((GHIDRA_UINT(cleanupFlags) & 2) != 0) { + local_538 = (byte *)(GHIDRA_UINT(cleanupFlags) & 0xfffffffd); local_14 = 4; cleanupFlags = local_538; if (((local_570 != (int *)0x0) && @@ -1631,9 +1631,9 @@ LAB_0085a121: (*g_imageReleaseFn)(); } } - local_14._1_3_ = 0; - if (((uint)cleanupFlags & 1) != 0) { - cleanupFlags = (undefined1 *)((uint)cleanupFlags & 0xfffffffe); + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; + if ((GHIDRA_UINT(cleanupFlags) & 1) != 0) { + cleanupFlags = (undefined1 *)(GHIDRA_UINT(cleanupFlags) & 0xfffffffe); local_14 = 5; if (((local_578 != (int *)0x0) && (cVar4 = (**(code **)(*local_578 + 0xc))(), cVar4 != '\0')) && @@ -1641,7 +1641,7 @@ LAB_0085a121: (*g_imageReleaseFn)(); } } - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (local_526 != '\0') { ((KColor *)(&local_51c))->KColor::SetFromARGB(0xffffffff); pvVar10 = (void *)(rowY + 2.0 + 16.0); @@ -1653,7 +1653,7 @@ LAB_0085a121: if ((DAT_00c7911c & 1) == 0) { shader = g_currentShader; } - local_4f0._4_4_ = 0x3f800000; + (*(undefined4 *)((char *)&(local_4f0) + 0x4)) = 0x3f800000; tStack_4e8.tm_sec = 0x3f800000; tStack_4e8.tm_min = 0x3f800000; tStack_4e8.tm_hour = 0x3f800000; @@ -1692,10 +1692,10 @@ LAB_0085a121: sprite = (int *)&DAT_00c799d8; } ((KAGE::SmartPointer *)(&avatarImage))->KAGE::SmartPointer::operator_assign(sprite); - cleanupFlags = (undefined1 *)((uint)prevCleanupFlags | 0x60); - local_14._0_1_ = 6; + cleanupFlags = (undefined1 *)(GHIDRA_UINT(prevCleanupFlags) | 0x60); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; (**(code **)(*avatarImage + 0x1c))(); - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; iVar9 = 0; if (avatarImageRefCount != (int *)0x0) { cVar4 = (**(code **)(*avatarImageRefCount + 0xc))(); @@ -1705,7 +1705,7 @@ LAB_0085a121: iVar9 = extraout_ECX_00; } } - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; shader_cache_find(iVar9); iVar9 = entryOffset; } @@ -1716,7 +1716,7 @@ LAB_0085a121: local_51c._blue = -NAN; local_51c._alpha = 0.0; local_51c._unk = 0; - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; iVar8 = ((Font *)(font))->Font::get_string_width_n(rankText,-1); ((Font *)(font))->Font::DrawString(rankText,&rowColorRed,&drawParams, rankX - (float)((double)iVar8 + __uint_to_double_fixup[-(iVar8 >> 0x1f)]) @@ -1736,16 +1736,16 @@ LAB_0085a121: if (1.0 <= nameScale.x) { nameScale.x = 1.0; } - local_14._0_1_ = 9; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; nameScale.y = nameScale.x; local_538 = (byte *)nameScale.x; pvVar10 = ((Font *)(font))->Font::layout_glyphs(glyphRun,(byte *)&playerName,&drawParams,&nameScale); - local_14 = CONCAT31(local_14._1_3_,10); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),10); color._green = rowColorRed._green; color._red = rowColorRed._red; color._blue = rowColorRed._blue; color._alpha = rowColorRed._alpha; - color._unk = (int)local_554; + color._unk = GHIDRA_INT(local_554); Font::draw_glyph_run (font,nameX,rowY,pvVar10,(float)local_538,(float)local_538,color,&drawParams); std::vector<12byte>::clear(); @@ -1767,11 +1767,11 @@ LAB_0085a121: local_51c._blue = -NAN; local_51c._alpha = 0.0; local_51c._unk = 0; - local_14._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; ((Font *)(font))->Font::DrawString(scoreText,&rowColorRed,&drawParams, (originX + *local_564) - (float)((double)iVar8 + __uint_to_double_fixup[-(iVar8 >> 0x1f)]),rowY); - local_14 = CONCAT31(local_14._1_3_,1); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); rowY = rowY + 15.0; cVar4 = (**(code **)(*(int *)(*(int *)(sprite + 0x49) + iVar9) + 0x14))(); if (cVar4 != '\0') { @@ -1786,7 +1786,7 @@ LAB_0085a121: std::vector<12byte>::_Tidy(); std::vector<12byte>::_Tidy(); entryOffset = iVar9 + 0x28; - local_52c = (byte *)((int)local_52c + -1); + local_52c = (byte *)(GHIDRA_INT(local_52c) + -1); } while (local_52c != (byte *)0x0); } } diff --git a/src/game/level.cpp b/src/game/level.cpp index 47b369f..b5b1a0d 100644 --- a/src/game/level.cpp +++ b/src/game/level.cpp @@ -16,7 +16,7 @@ void Level::SetStateFlag(int flag, byte isSet) flag = 0; } if (flag < 0x19) { - if (0x19 < (uint)flag) { + if (0x19 < GHIDRA_UINT(flag)) { /* WARNING: Subroutine does not return */ std::bitset::_Xran(); } @@ -24,7 +24,7 @@ void Level::SetStateFlag(int flag, byte isSet) else { flag = 0x19; } - flagWord = this->_ventricleRazorPortals + ((uint)flag >> 5) * 4 + 0x24; + flagWord = this->_ventricleRazorPortals + (GHIDRA_UINT(flag) >> 5) * 4 + 0x24; flagMask = 1 << ((byte)flag & 0x1f); if (isSet == 0) { *(uint *)flagWord = ~flagMask & *(uint *)flagWord; @@ -186,10 +186,10 @@ uint Level::CanStageHaveCurseOfLabyrinth() if (g_game->_challenge != 0x2c) { in_EAX = *in_ECX & 0x80000001; - if ((int)in_EAX < 0) { + if (GHIDRA_INT(in_EAX) < 0) { in_EAX = (in_EAX - 1 | 0xfffffffe) + 1; } - if ((((in_EAX == 1) && ((int)*in_ECX < 8)) && (in_EAX = g_game->_difficulty, in_EAX != 2)) && + if ((((in_EAX == 1) && (GHIDRA_INT(*in_ECX) < 8)) && (in_EAX = g_game->_difficulty, in_EAX != 2)) && (in_EAX != 3)) { return CONCAT31((int3)(in_EAX >> 8),1); } @@ -222,7 +222,7 @@ void Level::reset_room_list(byte resetLilPortalRoom) local_8 = 0xffffffff; puStack_c = &LAB_00afd8e1; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; room = this->_roomList; roomIdx = 0; @@ -237,7 +237,7 @@ void Level::reset_room_list(byte resetLilPortalRoom) (fuzzer_allocator_> *) &emptyDescriptor.RestrictedGridIndexes, *(_Tree_node **) - ((int)emptyDescriptor.RestrictedGridIndexes._head + 4)); + (GHIDRA_INT(emptyDescriptor.RestrictedGridIndexes._head) + 4)); operator_delete(emptyDescriptor.RestrictedGridIndexes._head,0x14); std::vector::_Tidy(); FUN_00708f90(); @@ -259,7 +259,7 @@ void Level::reset_room_list(byte resetLilPortalRoom) _Init_thread_footer(&g_invalidRoomDescriptorGuard); } } - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { room = this->_roomList + 0x20e; } else { @@ -300,7 +300,7 @@ byte Level::place_room(void *slot, void *data, uint seed, void *unused, RoomDesc bool isHasPit; bool isPitFound; - securityCookie = __security_cookie ^ (uint)(auStack_8 + 4); + securityCookie = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); dimension = this->_currentDimensionIdx; if (data == (void *)0x0) { KAGE_LogMessage(0x10,(byte *)"Level::place_room data is NULL!\n"); @@ -355,7 +355,7 @@ byte Level::place_room(void *slot, void *data, uint seed, void *unused, RoomDesc if (uVar4 == (uVar4 / 5) * 5) { isHasPit = false; isPitFound = false; - uVar4 = (uint)*(ushort *)((char *)desc->Data + 0x44); + uVar4 = GHIDRA_UINT(*(ushort *)((char *)desc->Data + 0x44)); if (uVar4 != 0) { spawnEntry = (undefined4 *)(*(int *)((char *)desc->Data + 0x40) + 4); do { @@ -438,7 +438,7 @@ undefined4 * Level::get_secret_room_excluded_cells(undefined4 *param_2) puStack_c = &LAB_00afd92e; local_10 = ExceptionList; - local_4c[0xd] = __security_cookie ^ (uint)(local_4c + 0x12); + local_4c[0xd] = __security_cookie ^ GHIDRA_UINT((local_4c + 0x12)); ExceptionList = &local_10; local_8 = 0; constructedFlags = 0; @@ -462,7 +462,7 @@ undefined4 * Level::get_secret_room_excluded_cells(undefined4 *param_2) local_4c[4] = 0xfffffff3; do { local_4c[0] = this->_startingRoomIndex + local_4c[uVar3 + 1]; - if ((-1 < (int)local_4c[0]) && (local_4c[0] < 0xa9)) { + if ((-1 < GHIDRA_INT(local_4c[0])) && (local_4c[0] < 0xa9)) { std::set::insert(local_68,local_4c); } uVar3 = uVar3 + 1; @@ -557,20 +557,20 @@ undefined4 * Level::get_secret_room_excluded_cells(undefined4 *param_2) LAB_00738ff3: if ((((*(uint *)((char *)setHead + (uVar3 >> 5) * 4 + 0x38) & uVar4) == 0) || (((gridIndex = *(int *)((char *)setHead + 8), gridIndex == 5 || (gridIndex == 8)) || - (gridIndex == 7)))) && (-1 < (int)*neighborIdx)) { + (gridIndex == 7)))) && (-1 < GHIDRA_INT(*neighborIdx))) { std::set::insert(local_4c + 3,neighborIdx); } } uVar3 = uVar3 + 1; - uVar4 = uVar4 << 1 | (uint)((int)uVar4 < 0); + uVar4 = uVar4 << 1 | GHIDRA_UINT((GHIDRA_INT(uVar4) < 0)); neighborIdx = neighborIdx + 1; - } while ((int)uVar3 < 8); + } while (GHIDRA_INT(uVar3) < 8); } pLVar1 = savedThis; } local_4c[0] = local_4c[0] + 1; roomDesc = roomDesc + 0x2e; - } while ((int)local_4c[0] < pLVar1->_roomCount); + } while (GHIDRA_INT(local_4c[0]) < pLVar1->_roomCount); } ExceptionList = local_10; return outSet; @@ -655,7 +655,7 @@ void * Level::pick_boss_room_config(int bossId, uint seed) (((((g_manager->_persistentGameData)._achievements[0x15a] == 0 && (((g_manager->_state != 2 || (g_game == (Game *)0x0)) || (((g_game->_dailyChallenge)._id == 0 && (g_game->_isDebug == 0)))))) && - ((0x38 < (uint)roomConfigRoom->Subtype && ((uint)roomConfigRoom->Subtype < 0x43)))) || + ((0x38 < GHIDRA_UINT(roomConfigRoom->Subtype) && (GHIDRA_UINT(roomConfigRoom->Subtype) < 0x43)))) || (((g_manager->_persistentGameData)._achievements[0x15b] == 0 && ((((g_manager->_state != 2 || (g_game == (Game *)0x0)) || (((g_game->_dailyChallenge)._id == 0 && (g_game->_isDebug == 0)))) && @@ -673,7 +673,7 @@ void * Level::pick_boss_room_config(int bossId, uint seed) roomConfigRoom = RoomConfig::GetRandomRoom (roomConfig,seed,1,0,5,0xd,uVar3,uVar3 + 0x31,1,10,local_14,0xffffffff,-1); - if ((int)local_14[2] < 1) { + if (GHIDRA_INT(local_14[2]) < 1) { return roomConfigRoom; } local_14[2] = local_14[2] + -1; @@ -733,7 +733,7 @@ int Level::GetTargetSlot(int roomIdx, int doorSlot, int unused) if (((*(uint *)((char *)roomData + (uVar1 >> 5) * 4 + 0x38) & slotBit) != 0) || ((*(uint *)((char *)roomData + (uVar1 >> 5) * 4 + 0x3c) & slotBit) != 0)) break; uVar1 = uVar1 + 1 & 0x80000007; - if ((int)uVar1 < 0) { + if (GHIDRA_INT(uVar1) < 0) { uVar1 = (uVar1 - 1 | 0xfffffff8) + 1; } attempt = attempt + 1; @@ -766,7 +766,7 @@ void Level::update_room_doors(RoomDescriptor *roomDesc) uint neighbors [11]; uint nextX; - neighbors[9] = __security_cookie ^ (uint)(neighbors + 0xb); + neighbors[9] = __security_cookie ^ GHIDRA_UINT((neighbors + 0xb)); iVar6 = roomDesc->GridIndex; if (iVar6 < 0) { if (roomDesc->Data != (void *)0x0) { @@ -776,7 +776,7 @@ void Level::update_room_doors(RoomDescriptor *roomDesc) } local_34 = iVar6 % 0xd; uVar5 = iVar6 / 0xd; - uVar3 = (uint)*(byte *)((char *)roomDesc->Data + 0x47); + uVar3 = GHIDRA_UINT(*(byte *)((char *)roomDesc->Data + 0x47)); uVar4 = uVar3 / 7; uVar3 = (uVar3 - uVar4 >> 1) + uVar4 >> 2; if ((local_34 - 1 < 0xd) && (uVar5 < 0xd)) { @@ -895,24 +895,24 @@ LAB_0073dcc1: neighbors[uVar5 + 1] = 0xffffffff; } uVar5 = uVar5 + 1; - uVar3 = uVar3 << 1 | (uint)((int)uVar3 < 0); + uVar3 = uVar3 << 1 | GHIDRA_UINT((GHIDRA_INT(uVar3) < 0)); } while (uVar5 < 8); uVar5 = 0; doorIndexOut = roomDesc->_doors; do { uVar3 = neighbors[uVar5 + 1]; *doorIndexOut = uVar3; - if (-1 < (int)uVar3) { + if (-1 < GHIDRA_INT(uVar3)) { uVar4 = uVar5 & 0x80000003; - if ((int)uVar4 < 0) { + if (GHIDRA_INT(uVar4) < 0) { uVar4 = (uVar4 - 1 | 0xfffffffc) + 1; } uVar4 = uVar4 + 2 & 0x80000003; - if ((int)uVar4 < 0) { + if (GHIDRA_INT(uVar4) < 0) { uVar4 = (uVar4 - 1 | 0xfffffffc) + 1; } local_34 = roomDesc->Dimension; - if ((int)local_34 < 0) { + if (GHIDRA_INT(local_34) < 0) { roomMap = this->_currentRoomMap; } else { @@ -962,7 +962,7 @@ LAB_0073e00a: LAB_0073dfd8: doorIndexOut = doorIndexOut + 1; uVar5 = uVar5 + 1; - if (7 < (int)uVar5) { + if (7 < GHIDRA_INT(uVar5)) { return; } } while( true ); @@ -1045,7 +1045,7 @@ void Level::load_room() local_14 = 0xffffffff; puStack_18 = &LAB_00afda20; local_1c = ExceptionList; - neighborOffsets[8] = __security_cookie ^ (uint)(neighborOffsets + 0xd); + neighborOffsets[8] = __security_cookie ^ GHIDRA_UINT((neighborOffsets + 0xd)); ExceptionList = &local_1c; level = (Game *)this; tmpDesc = GetRoomByIdx(this,this->_currentRoomIndex,-1); @@ -1056,46 +1056,46 @@ void Level::load_room() } pGVar10 = g_game; if (((*(int *)&g_game->_roomTransition != 0) && - (((uint)(g_game->_roomTransition)._flags >> 1 & 1) != 0)) && + ((GHIDRA_UINT((g_game->_roomTransition)._flags) >> 1 & 1) != 0)) && (*(int *)((char *)tmpDesc->Data + 8) == 2)) { tmpDesc->Flags = tmpDesc->Flags & 0xffffffef; } - if ((tmpDesc->VisitedCount == 0) && (((uint)tmpDesc->Flags >> 0xb & 1) != 0)) { + if ((tmpDesc->VisitedCount == 0) && ((GHIDRA_UINT(tmpDesc->Flags) >> 0xb & 1) != 0)) { local_84 = (Game *)((PlayerManager *)(&pGVar10->_playerManager))->PlayerManager::FirstTrinketOwner(0x92); if (local_84 != (Game *)0x0) { iVar4 = ((Entity_Player *)((Entity_Player *)local_84))->Entity_Player::GetTrinketMultiplier(0x92); if (iVar4 == 2) { - pvVar6 = ((std_vector *)((int)local_84 + 0x177c))->_end; - if ((int)pvVar6 - (int)((std_vector *)((int)local_84 + 0x177c))->_begin >> 4 < 0x93) { + pvVar6 = ((std_vector *)(GHIDRA_INT(local_84) + 0x177c))->_end; + if (GHIDRA_INT(pvVar6) - GHIDRA_INT(((std_vector *)(GHIDRA_INT(local_84) + 0x177c))->_begin) >> 4 < 0x93) { KAGE_LogMessage(0x10,(byte *)"Trinket ID out of bounds!\n"); - pvVar6 = ((std_vector *)((int)local_84 + 0x177c))->_end; + pvVar6 = ((std_vector *)(GHIDRA_INT(local_84) + 0x177c))->_end; } - trinketRngsBegin = ((std_vector *)((int)local_84 + 0x177c))->_begin; - uVar9 = ((int)pvVar6 - (int)trinketRngsBegin >> 4) - 1; + trinketRngsBegin = ((std_vector *)(GHIDRA_INT(local_84) + 0x177c))->_begin; + uVar9 = (GHIDRA_INT(pvVar6) - GHIDRA_INT(trinketRngsBegin) >> 4) - 1; if (0x92 < uVar9) { uVar9 = 0x92; } - uVar9 = ((RNG *)((RNG *)(uVar9 * 0x10 + (int)trinketRngsBegin)))->RNG::RandomInt(4); + uVar9 = ((RNG *)((RNG *)(uVar9 * 0x10 + GHIDRA_INT(trinketRngsBegin))))->RNG::RandomInt(4); } else { if (iVar4 < 3) goto LAB_0073e316; - pvVar6 = ((std_vector *)((int)local_84 + 0x177c))->_end; - if ((int)pvVar6 - (int)((std_vector *)((int)local_84 + 0x177c))->_begin >> 4 < 0x93) { + pvVar6 = ((std_vector *)(GHIDRA_INT(local_84) + 0x177c))->_end; + if (GHIDRA_INT(pvVar6) - GHIDRA_INT(((std_vector *)(GHIDRA_INT(local_84) + 0x177c))->_begin) >> 4 < 0x93) { KAGE_LogMessage(0x10,(byte *)"Trinket ID out of bounds!\n"); - pvVar6 = ((std_vector *)((int)local_84 + 0x177c))->_end; + pvVar6 = ((std_vector *)(GHIDRA_INT(local_84) + 0x177c))->_end; } - trinketRngsBegin = ((std_vector *)((int)local_84 + 0x177c))->_begin; - uVar9 = ((int)pvVar6 - (int)trinketRngsBegin >> 4) - 1; + trinketRngsBegin = ((std_vector *)(GHIDRA_INT(local_84) + 0x177c))->_begin; + uVar9 = (GHIDRA_INT(pvVar6) - GHIDRA_INT(trinketRngsBegin) >> 4) - 1; if (0x92 < uVar9) { uVar9 = 0x92; } - uVar9 = ((RNG *)((RNG *)(uVar9 * 0x10 + (int)trinketRngsBegin)))->RNG::RandomInt(3); + uVar9 = ((RNG *)((RNG *)(uVar9 * 0x10 + GHIDRA_INT(trinketRngsBegin))))->RNG::RandomInt(3); } if (uVar9 == 0) { local_98 = &g_game->_roomConfig; local_94 = (RoomConfig *)0xa; do { - if ((int)local_94 < 1) { + if (GHIDRA_INT(local_94) < 1) { tmpDesc = local_8c; goto LAB_0073e316; } @@ -1118,7 +1118,7 @@ void Level::load_room() pRVar5 = RoomConfig::GetRandomRoom (local_98,uVar9,1,0,0xe,0xd,0,99,1,10,(uint *)&local_8c->AllowedDoors,1 ,-1); - local_94 = (RoomConfig *)((int)(local_94 + -1) + 0x1c5f); + local_94 = (RoomConfig *)(GHIDRA_INT((local_94 + -1)) + 0x1c5f); } while (pRVar5 == (RoomConfig_Room *)0x0); local_8c->Flags = local_8c->Flags | 0x800; local_8c->Data = pRVar5; @@ -1175,7 +1175,7 @@ LAB_0073e3de: iVar4 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::GetTrinketMultiplier(0xbb); uVar9 = ((RNG *)(&trinketRng))->RNG::RandomInt(2); tmpDesc = local_8c; - if ((int)uVar9 < iVar4) goto LAB_0073e556; + if (GHIDRA_INT(uVar9) < iVar4) goto LAB_0073e556; } } local_84 = g_game; @@ -1199,7 +1199,7 @@ LAB_0073e556: (*pcVar2)(); return; } - uVar9 = (uint)local_98 >> 1 ^ (uint)local_98; + uVar9 = GHIDRA_UINT(local_98) >> 1 ^ GHIDRA_UINT(local_98); uVar9 = uVar9 << 5 ^ uVar9; local_90 = (int *)(uVar9 >> 0x10 ^ uVar9); if (*(int *)&(*(undefined1 *)((char *)(roomData) + 0x10)) == 0) { @@ -1216,7 +1216,7 @@ LAB_0073e556: roomShape = extraout_ECX_00; } pvVar6 = RoomConfig::GetRandomRoomWithFallbackStage - (&local_84->_roomConfig,(uint)local_90,1,uVar9,0,4,iVar4,in_stack_fffffed0, + (&local_84->_roomConfig,GHIDRA_UINT(local_90),1,uVar9,0,4,iVar4,in_stack_fffffed0, in_stack_fffffed4,1,10,(uint *)&(*(undefined1 *)((char *)(roomData) + 0x38)),uVar8,roomShape); local_84 = g_game; this = (Level *)level; @@ -1229,7 +1229,7 @@ LAB_0073e556: } LAB_0073e495: tmpDesc = local_8c; - if (((uint)local_8c->Flags >> 4 & 1) == 0) { + if ((GHIDRA_UINT(local_8c->Flags) >> 4 & 1) == 0) { local_88 = local_8c->Data; } else { @@ -1246,7 +1246,7 @@ LAB_0073e495: (*pcVar2)(); return; } - uVar9 = (uint)local_98 >> 1 ^ (uint)local_98; + uVar9 = GHIDRA_UINT(local_98) >> 1 ^ GHIDRA_UINT(local_98); uVar9 = uVar9 << 5 ^ uVar9; pvVar6 = local_8c->Data; local_90 = (int *)(uVar9 >> 0x10 ^ uVar9); @@ -1266,21 +1266,21 @@ LAB_0073e495: uVar9 = local_8c->GreedSubType; } if (uVar9 == 4) { - *(uint *)&local_84->_gameStateFlags = (uint)local_84->_gameStateFlags | 0x8000; + *(uint *)&local_84->_gameStateFlags = GHIDRA_UINT(local_84->_gameStateFlags) | 0x8000; LAB_0073e6d7: - *(undefined4 *)((int)&local_84->_gameStateFlags + 4) = - *(undefined4 *)((int)&local_84->_gameStateFlags + 4); + *(undefined4 *)(GHIDRA_INT(&local_84->_gameStateFlags) + 4) = + *(undefined4 *)(GHIDRA_INT(&local_84->_gameStateFlags) + 4); } else if (uVar9 == 0xb) { - *(uint *)&local_84->_gameStateFlags = (uint)local_84->_gameStateFlags | 0x10000; + *(uint *)&local_84->_gameStateFlags = GHIDRA_UINT(local_84->_gameStateFlags) | 0x10000; goto LAB_0073e6d7; } pvVar6 = local_8c->Data; } local_94 = &local_84->_roomConfig; local_88 = RoomConfig::GetRandomRoom - (local_94,(uint)local_90,1,0,6,*(int *)((char *)pvVar6 + 0x48),0,-1,1,1, - (uint *)((int)pvVar6 + 0x38),uVar9,0); + (local_94,GHIDRA_UINT(local_90),1,0,6,*(int *)((char *)pvVar6 + 0x48),0,-1,1,1, + (uint *)(GHIDRA_INT(pvVar6) + 0x38),uVar9,0); if (local_88 == (RoomConfig_Room *)0x0) { local_88 = tmpDesc->Data; tmpDesc->Flags = tmpDesc->Flags & 0xffffffef; @@ -1300,34 +1300,34 @@ LAB_0073e6d7: ((roomShape != -0xd && ((local_94 != (RoomConfig *)0x16 || (iVar4 == 0x10)))))))) { pGVar10 = (Game *)((Game *)this)->_enterDoor; local_84 = pGVar10; - if ((int)pGVar10 < 0) { + if (GHIDRA_INT(pGVar10) < 0) { LAB_0073e7e8: uVar9 = Random(); local_a0 = (float)(uVar9 & 7); - local_98 = (RoomConfig *)((int)tmpDesc->Data + 0x38); + local_98 = (RoomConfig *)(GHIDRA_INT(tmpDesc->Data) + 0x38); local_90 = (int *)0x0; do { - local_84 = (Game *)((uint)((int)local_90 + (int)local_a0) & 0x80000007); - if ((int)local_84 < 0) { - local_84 = (Game *)(((uint)&(*(undefined1 *)((char *)&(local_84[-1]._console) + 0x3)) | 0xfffffff8) + 1); + local_84 = (Game *)(GHIDRA_UINT((GHIDRA_INT(local_90) + GHIDRA_INT(local_a0))) & 0x80000007); + if (GHIDRA_INT(local_84) < 0) { + local_84 = (Game *)((GHIDRA_UINT(&(*(undefined1 *)((char *)&(local_84[-1]._console) + 0x3))) | 0xfffffff8) + 1); } - if ((*(uint *)(&(*(undefined1 *)((char *)(local_98) + 0x0)) + ((uint)local_84 >> 5) * 4) & + if ((*(uint *)(&(*(undefined1 *)((char *)(local_98) + 0x0)) + (GHIDRA_UINT(local_84) >> 5) * 4) & 1 << ((byte)local_84 & 0x1f)) != 0) { - ((Game *)this)->_enterDoor = (int)local_84; + ((Game *)this)->_enterDoor = GHIDRA_INT(local_84); pGVar10 = local_84; goto LAB_0073e863; } - local_90 = (int *)((int)local_90 + 1); - } while ((int)local_90 < 8); + local_90 = (int *)(GHIDRA_INT(local_90) + 1); + } while (GHIDRA_INT(local_90) < 8); pGVar10 = (Game *)((Game *)this)->_enterDoor; } - else if ((*(uint *)((char *)tmpDesc->Data + ((uint)pGVar10 >> 5) * 4 + 0x38) & + else if ((*(uint *)((char *)tmpDesc->Data + (GHIDRA_UINT(pGVar10) >> 5) * 4 + 0x38) & 1 << ((byte)pGVar10 & 0x1f)) == 0) { ((Game *)this)->_enterDoor = -1; goto LAB_0073e7e8; } LAB_0073e863: - if ((int)pGVar10 < 0) { + if (GHIDRA_INT(pGVar10) < 0) { KAGE_LogMessage(0x10,(byte *) "Level::load_room: could not choose a door from where to enter off grid room" ); @@ -1337,8 +1337,8 @@ LAB_0073e863: /* WARNING: Subroutine does not return */ std::bitset::_Xran(); } - tmpDesc->_doors[((uint)pGVar10 >> 5) - 1] = - tmpDesc->_doors[((uint)pGVar10 >> 5) - 1] | 1 << ((byte)pGVar10 & 0x1f); + tmpDesc->_doors[(GHIDRA_UINT(pGVar10) >> 5) - 1] = + tmpDesc->_doors[(GHIDRA_UINT(pGVar10) >> 5) - 1] | 1 << ((byte)pGVar10 & 0x1f); } ((Room *)(((Game *)this)->_room))->Room::Init(local_88,tmpDesc); pvVar6 = ((Game *)this)->_room; @@ -1349,10 +1349,10 @@ LAB_0073e863: uVar9 = uVar9 + 1; } while (uVar9 < 8); local_90 = *(int **)(*(int *)((char *)pvVar6 + 4) + 4); - if (-1 < (int)local_90) { + if (-1 < GHIDRA_INT(local_90)) { local_84 = (Game *)0x0; do { - iVar4 = GetNeighborRoomIdx(this,(int)local_90,(int)local_84); + iVar4 = GetNeighborRoomIdx(this,GHIDRA_INT(local_90),GHIDRA_INT(local_84)); if (-1 < iVar4) { neighborOffsets[0] = -1; neighborOffsets[1] = 0; @@ -1367,20 +1367,20 @@ LAB_0073e863: uVar9 = 0; local_88 = pRVar5; do { - iVar4 = (int)&pRVar5->StageId + neighborOffsets[uVar9 * 2 + 1]; - roomShape = neighborOffsets[uVar9 * 2] + (int)local_a0; + iVar4 = GHIDRA_INT(&pRVar5->StageId) + neighborOffsets[uVar9 * 2 + 1]; + roomShape = neighborOffsets[uVar9 * 2] + GHIDRA_INT(local_a0); if ((((-1 < roomShape) && (-1 < iVar4)) && (roomShape < 0xd)) && (iVar4 < 0xd)) { idx = (float *)(iVar4 * 0xd + roomShape); if (idx != (float *)local_90) { - tmpDesc = GetRoomByIdx(this,(int)idx,-1); + tmpDesc = GetRoomByIdx(this,GHIDRA_INT(idx),-1); pGVar10 = local_84; if (((tmpDesc->Data != (void *)0x0) && (tmpDesc->Group == -1)) && (*(int *)((char *)tmpDesc->Data + 8) != 10)) { - bVar3 = MakeRedRoomDoor(this,(int)local_90,(int)local_84); + bVar3 = MakeRedRoomDoor(this,GHIDRA_INT(local_90),GHIDRA_INT(local_84)); if (bVar3 != 0) { - if ((((undefined1 *)((int)&pGVar10->_stage + 1) < &DAT_00000009) && + if ((((undefined1 *)(GHIDRA_INT(&pGVar10->_stage) + 1) < &DAT_00000009) && (pGVar1 = *(GridEntity_Door **) - ((int)((Game *)this)->_room + (int)pGVar10 * 4 + 0x724), + (GHIDRA_INT(((Game *)this)->_room) + GHIDRA_INT(pGVar10) * 4 + 0x724), pGVar1 != (GridEntity_Door *)0x0)) && ((((GridEntity_Door *)(pGVar1))->GridEntity_Door::TryBlowOpen(0,(Entity *)0x0), (local_8c->Flags & 1) == 0 && ((pGVar1->_desc)._state != 1)))) { @@ -1403,7 +1403,7 @@ LAB_0073e863: uVar9 = uVar9 + 1; } while (uVar9 < 4); } - local_84 = (Game *)((int)&local_84->_stage + 1); + local_84 = (Game *)(GHIDRA_INT(&local_84->_stage) + 1); } while (local_84 <= (Game *)&DAT_00000007); } } @@ -1433,16 +1433,16 @@ LAB_0073eac8: pvVar6 = local_8c->Data; tmpDesc = local_8c; if ((((*(int *)((char *)pvVar6 + 8) == 1) && (*(int *)((char *)pvVar6 + 0x10) == 10)) && - (((uint)local_8c->Flags >> 2 & 1) != 0)) && + ((GHIDRA_UINT(local_8c->Flags) >> 2 & 1) != 0)) && (local_88 = (RoomConfig_Room *)0x0, *(short *)((char *)pvVar6 + 0x44) != 0)) { local_90 = (int *)0x0; do { - spawnEntry = (short *)(*(int *)((char *)pvVar6 + 0x40) + (int)local_90); + spawnEntry = (short *)(*(int *)((char *)pvVar6 + 0x40) + GHIDRA_INT(local_90)); if (((char)spawnEntry[4] != '\0') && (**(int **)(spawnEntry + 2) == 0xbba)) { local_a0 = (float)((*(byte *)((char *)pvVar6 + 0x46) + 2) * (spawnEntry[1] + 1) + - (int)*spawnEntry); - if ((((int)local_a0 + 1U < 0x1c0) && - ((pit = *(GridEntity_Pit **)((int)((Game *)this)->_room + (int)local_a0 * 4 + 0x28), + GHIDRA_INT(*spawnEntry)); + if (((GHIDRA_INT(local_a0) + 1U < 0x1c0) && + ((pit = *(GridEntity_Pit **)(GHIDRA_INT(((Game *)this)->_room) + GHIDRA_INT(local_a0) * 4 + 0x28), pit != (GridEntity_Pit *)0x0 && ((pit->_desc)._type == 7)))) && (pit->_collisionClass == 1)) { if ((pit->_desc)._state == 0) { @@ -1451,18 +1451,18 @@ LAB_0073eac8: tmpDesc = local_8c; } (pit->_desc)._variant = (pit->_desc)._variant & 0xffff01ffU | 0x100; - *(undefined1 *)((char *)g_game->_room + (int)local_a0 + 0x746dU) = 1; + *(undefined1 *)((char *)g_game->_room + GHIDRA_INT(local_a0) + 0x746dU) = 1; } } pvVar6 = tmpDesc->Data; local_90 = local_90 + 4; - local_88 = (RoomConfig_Room *)((int)&local_88->StageId + 1); - } while (local_88 < (RoomConfig_Room *)(uint)*(ushort *)((char *)pvVar6 + 0x44)); + local_88 = (RoomConfig_Room *)(GHIDRA_INT(&local_88->StageId) + 1); + } while (local_88 < (RoomConfig_Room *)GHIDRA_UINT(*(ushort *)((char *)pvVar6 + 0x44))); } } pGVar10 = level; iVar4 = level->_currentRoomIdx; - fVar11 = (float)((int)level->_room + 0x724); + fVar11 = (float)(GHIDRA_INT(level->_room) + 0x724); local_84 = (Game *)fVar11; if ((((((iVar4 == -1) || (iVar4 == -6)) || (iVar4 == -3)) || ((iVar4 == -5 || (iVar4 == -8)))) || ((iVar4 == -9 || ((iVar4 == -10 || (iVar4 == -0x11)))))) || (iVar4 == -0x12)) { @@ -1470,7 +1470,7 @@ LAB_0073eac8: if ((-1 < iVar4) && (roomShape = *(int *)((char *)fVar11 + iVar4 * 4), roomShape != 0)) { *(int *)(roomShape + 0x158) = iVar4; GridEntity_Door::SetRoomTypes - (*(GridEntity_Door **)((char *)fVar11 + level->_enterDoor * 4),(int)local_94,1); + (*(GridEntity_Door **)((char *)fVar11 + level->_enterDoor * 4),GHIDRA_INT(local_94),1); *(int *)(*(int *)((char *)fVar11 + pGVar10->_enterDoor * 4) + 0x394) = pGVar10->_lastRoomIdx; } } @@ -1478,28 +1478,28 @@ LAB_0073eac8: local_90 = tmpDesc->_doors; local_88 = (RoomConfig_Room *)0x0; do { - pGVar1 = *(GridEntity_Door **)((char *)local_84 + (int)local_88 * 4); + pGVar1 = *(GridEntity_Door **)((char *)local_84 + GHIDRA_INT(local_88) * 4); local_a0 = (float)*local_90; if (pGVar1 != (GridEntity_Door *)0x0) { if (local_a0 == -NAN) { - pGVar1->_slot = (int)local_88; + pGVar1->_slot = GHIDRA_INT(local_88); pGVar1->_targetRoomIdx = -2; iVar4 = 1; } else { - if (((int)local_a0 < 0) || - (*(int *)((char *)pGVar10->_currentRoomMap + (int)local_a0 * 4) < 0)) goto LAB_0073ecaa; - tmpDesc = GetRoomByIdx((Level *)pGVar10,(int)local_a0,-1); + if ((GHIDRA_INT(local_a0) < 0) || + (*(int *)((char *)pGVar10->_currentRoomMap + GHIDRA_INT(local_a0) * 4) < 0)) goto LAB_0073ecaa; + tmpDesc = GetRoomByIdx((Level *)pGVar10,GHIDRA_INT(local_a0),-1); iVar4 = *(int *)((char *)tmpDesc->Data + 8); - pGVar1->_slot = (int)local_88; - pGVar1->_targetRoomIdx = (int)local_a0; + pGVar1->_slot = GHIDRA_INT(local_88); + pGVar1->_targetRoomIdx = GHIDRA_INT(local_a0); } - ((GridEntity_Door *)(pGVar1))->GridEntity_Door::SetRoomTypes((int)local_94,iVar4); + ((GridEntity_Door *)(pGVar1))->GridEntity_Door::SetRoomTypes(GHIDRA_INT(local_94),iVar4); } LAB_0073ecaa: - local_88 = (RoomConfig_Room *)((int)&local_88->StageId + 1); + local_88 = (RoomConfig_Room *)(GHIDRA_INT(&local_88->StageId) + 1); local_90 = local_90 + 1; - } while ((int)local_88 < 8); + } while (GHIDRA_INT(local_88) < 8); } tmpDesc = GetRoomByIdx((Level *)pGVar10,pGVar10->_currentRoomIdx,-1); if ((tmpDesc->Flags & 1) != 0) { @@ -1545,9 +1545,9 @@ LAB_0073ee35: local_90 = (int *)0x0; local_88 = (RoomConfig_Room *)0x724; do { - local_90 = (int *)((int)local_90 + 1); + local_90 = (int *)(GHIDRA_INT(local_90) + 1); if (((local_90 < &DAT_00000009) && - (iVar4 = *(int *)((char *)local_88 + (int)pGVar10->_room), iVar4 != 0)) && + (iVar4 = *(int *)((char *)local_88 + GHIDRA_INT(pGVar10->_room)), iVar4 != 0)) && ((roomShape = *(int *)(iVar4 + 0x160), roomShape == 1 || (((roomShape == 4 || (roomShape == 6)) || (roomShape == 5)))))) { tmpDesc = GetRoomByIdx((Level *)pGVar10,*(int *)(iVar4 + 0x394),-1); @@ -1583,12 +1583,12 @@ LAB_0073ee35: uVar9 = uVar9 >> ((byte)rngShift12 & 0x1f) ^ uVar9; uVar9 = uVar9 << ((byte)((ulonglong)rngShift12 >> 0x20) & 0x1f) ^ uVar9; uVar9 = uVar9 >> ((byte)local_98 & 0x1f) ^ uVar9; - fVar11 = ((float)((double)(int)uVar9 + __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) + fVar11 = ((float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283062e-10 - 0.5) * (float)local_94 * 40.0; spawnPos.x = perpX * fVar11 + rowX; spawnPos.y = local_a0 + fVar11 * perpY; local_a8 = ((Game *)(g_game))->Game::Spawn(1000,7,&spawnPos,&g_vectorZero,(Entity *)0x0,0, - (uint)local_a8); + GHIDRA_UINT(local_a8)); if (uVar9 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar2 = (code *)swi(3); @@ -1602,8 +1602,8 @@ LAB_0073ee35: uVar9 = uVar9 >> ((byte)local_98 & 0x1f) ^ uVar9; tintColor._offset[2] = 0.0; effectColor = &(local_a8->_sprite)._color; - effectScale = (float)((double)(int)uVar9 + - __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) * 2.3283062e-10 * + effectScale = (float)((double)GHIDRA_INT(uVar9) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283062e-10 * (1.0 - (float)local_94) * 5.0 + 0.5; fVar11 = effectScale * g_vectorOne.x; (local_a8->_sprite)._scale.y = effectScale * g_vectorOne.y; @@ -1635,7 +1635,7 @@ LAB_0073ee35: pGVar10 = level; } } - local_88 = (RoomConfig_Room *)((int)local_88 + 4); + local_88 = (RoomConfig_Room *)(GHIDRA_INT(local_88) + 4); } while (local_88 < 0x744); } } @@ -1655,18 +1655,18 @@ LAB_0073ee35: local_94 = (RoomConfig *)0x0; playersCapacityEnd = (undefined4 *)0x0; local_14 = 0; - if ((int)(pGVar7->_playerManager)._playerList._end - - (int)(((PlayerManager *)local_98)->_playerList)._begin >> 2 != 0) { + if (GHIDRA_INT((pGVar7->_playerManager)._playerList._end) - + GHIDRA_INT((((PlayerManager *)local_98)->_playerList)._begin) >> 2 != 0) { uVar9 = 0; do { playersTail = playersEnd; pvVar6 = ((std_vector *)&(*(undefined1 *)((char *)(local_98) + 0x0)))->_end; - if ((int)pvVar6 - (int)((std_vector *)&(*(undefined1 *)((char *)(local_98) + 0x0)))->_begin >> 2 == 0) { + if (GHIDRA_INT(pvVar6) - GHIDRA_INT(((std_vector *)&(*(undefined1 *)((char *)(local_98) + 0x0)))->_begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar6 = ((std_vector *)&(*(undefined1 *)((char *)(local_98) + 0x0)))->_end; } playerSlot = ((std_vector *)&(*(undefined1 *)((char *)(local_98) + 0x0)))->_begin; - if (uVar9 < (uint)((int)pvVar6 - (int)playerSlot >> 2)) { + if (uVar9 < GHIDRA_UINT((GHIDRA_INT(pvVar6) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + uVar9; } local_a8 = (Entity *)*playerSlot; @@ -1680,12 +1680,12 @@ LAB_0073ee35: } uVar9 = uVar9 + 1; local_98 = (RoomConfig *)&g_game->_playerManager; - } while (uVar9 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(((PlayerManager *)local_98)->_playerList)._begin >> 2)); + } while (uVar9 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((((PlayerManager *)local_98)->_playerList)._begin) >> 2))); local_88 = playersBegin; pGVar10 = level; } - playerCount = (undefined1 *)((int)playersEnd - (int)local_88 >> 2); + playerCount = (undefined1 *)(GHIDRA_INT(playersEnd) - GHIDRA_INT(local_88) >> 2); local_98 = (RoomConfig *)0x0; playersBegin = local_88; if (playerCount != (undefined1 *)0x0) { @@ -1696,8 +1696,8 @@ LAB_0073ee35: } while (local_98 < playerCount); local_98 = (RoomConfig *)0x0; do { - Game::reset_players_for_greed((Entity_Player *)(&local_88->StageId)[(int)local_98]); - local_98 = (RoomConfig *)((int)local_98 + 1); + Game::reset_players_for_greed((Entity_Player *)(&local_88->StageId)[GHIDRA_INT(local_98)]); + local_98 = (RoomConfig *)(GHIDRA_INT(local_98) + 1); } while (local_98 < playerCount); } hud = &g_game->_hud; @@ -1705,12 +1705,12 @@ LAB_0073ee35: HUD::mark_all_slots_dirty(hud,0,0); local_14 = 0xffffffff; if (local_88 != (RoomConfig_Room *)0x0) { - uVar9 = (int)local_94 - (int)local_88 & 0xfffffffc; + uVar9 = GHIDRA_INT(local_94) - GHIDRA_INT(local_88) & 0xfffffffc; pRVar5 = local_88; if (0xfff < uVar9) { pRVar5 = (RoomConfig_Room *)local_88[-1].originalVariant; uVar9 = uVar9 + 0x23; - if (0x1f < (uint)((int)local_88 + (-4 - (int)pRVar5))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_88) + (-4 - GHIDRA_INT(pRVar5))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1721,16 +1721,16 @@ LAB_0073ee35: if (*(int *)&g_game->_deathmatchManager < 2) { ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::enter_level(); } - ((Camera *)((Camera *)((int)g_game->_room + 0x1618)))->Camera::Update(1); + ((Camera *)((Camera *)(GHIDRA_INT(g_game->_room) + 0x1618)))->Camera::Update(1); ((Room *)(pGVar10->_room))->Room::UpdateRedKey(); if ((g_game->_dailyChallenge)._id == 0) { pvVar6 = (g_manager->_challengeParams)._begin; - uVar9 = ((int)(g_manager->_challengeParams)._end - (int)pvVar6) / 0xa4 - 1; - uVar8 = -(uint)(g_game->_challenge != 0) & g_game->_challenge; + uVar9 = (GHIDRA_INT((g_manager->_challengeParams)._end) - GHIDRA_INT(pvVar6)) / 0xa4 - 1; + uVar8 = -GHIDRA_UINT((g_game->_challenge != 0)) & g_game->_challenge; if (uVar8 < uVar9) { uVar9 = uVar8; } - challengeParams = (ChallengeParam *)(uVar9 * 0xa4 + (int)pvVar6); + challengeParams = (ChallengeParam *)(uVar9 * 0xa4 + GHIDRA_INT(pvVar6)); } else { challengeParams = &(g_game->_dailyChallenge)._params; @@ -1818,7 +1818,7 @@ void Level::DEBUG_goto_room(RoomConfig_Room *roomConfig) ExceptionList = &local_10; if (*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard) { _Init_thread_header(&g_invalidRoomDescriptorGuard, - __security_cookie ^ (int)register0x00000010 - 4U); + __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); if (g_invalidRoomDescriptorGuard == -1) { local_8 = 0; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); @@ -1827,7 +1827,7 @@ void Level::DEBUG_goto_room(RoomConfig_Room *roomConfig) _Init_thread_footer(&g_invalidRoomDescriptorGuard); } } - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { pRVar3 = this->_roomList + 0x1fd; pRVar4 = this->_roomList + 0x1fd; pRVar2 = this->_roomList + 0x1fd; @@ -1872,7 +1872,7 @@ void Level::DEBUG_goto_room(RoomConfig_Room *roomConfig) savedEffects = &pRVar12->SavedEffects; uVar15 = 0; do { - *(undefined4 *)(uVar15 + (int)(debugRoom->SavedGridEntities)._begin) = 0; + *(undefined4 *)(uVar15 + GHIDRA_INT((debugRoom->SavedGridEntities)._begin)) = 0; uVar15 = uVar15 + 0x20; } while (uVar15 < 0x3800); pRVar5->Flags = pRVar5->Flags & 0xfffffffe; @@ -1882,7 +1882,7 @@ void Level::DEBUG_goto_room(RoomConfig_Room *roomConfig) if (entry != pvVar1) { do { invoke_pending_callbacks(entry); - entry = (void *)((int)entry + 0x78); + entry = (void *)(GHIDRA_INT(entry) + 0x78); } while (entry != pvVar1); entry = savedEntities->_begin; } @@ -1891,7 +1891,7 @@ void Level::DEBUG_goto_room(RoomConfig_Room *roomConfig) FID_conflict__Erase_tree_>_> (restrictedGridIndexes, (fuzzer_allocator_> *)restrictedGridIndexes, - *(_Tree_node **)((int)pvVar1 + 4)); + *(_Tree_node **)(GHIDRA_INT(pvVar1) + 4)); *(void **)((char *)pvVar1 + 4) = pvVar1; *(void **)pvVar1 = pvVar1; *(void **)((char *)pvVar1 + 8) = pvVar1; @@ -1901,7 +1901,7 @@ void Level::DEBUG_goto_room(RoomConfig_Room *roomConfig) if (entry != pvVar1) { do { invoke_pending_callbacks(entry); - entry = (void *)((int)entry + 0x78); + entry = (void *)(GHIDRA_INT(entry) + 0x78); } while (entry != pvVar1); entry = savedEffects->_begin; } @@ -1969,7 +1969,7 @@ void Level::ChangeRoom(int targetRoomIDX, int dimension) local_8 = 0xffffffff; puStack_c = &LAB_00afda9d; local_10 = ExceptionList; - uVar4 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar4 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; local_1c = 0; if (targetRoomIDX < -0x13) { @@ -1979,7 +1979,7 @@ void Level::ChangeRoom(int targetRoomIDX, int dimension) if (targetRoomIDX < 0xa8) { newRoomIdx = targetRoomIDX; } - if (0x7fffffff < (uint)dimension) { + if (0x7fffffff < GHIDRA_UINT(dimension)) { dimension = -1; } iVar12 = 2; @@ -1990,9 +1990,9 @@ void Level::ChangeRoom(int targetRoomIDX, int dimension) manager = g_manager; game = g_game; persistentData = &g_manager->_persistentGameData; - uVar11 = *(undefined4 *)((int)&g_game->_gameStateFlags + 4); - *(uint *)&g_game->_gameStateFlags = (uint)g_game->_gameStateFlags | 0x10; - *(undefined4 *)((int)&game->_gameStateFlags + 4) = uVar11; + uVar11 = *(undefined4 *)(GHIDRA_INT(&g_game->_gameStateFlags) + 4); + *(uint *)&g_game->_gameStateFlags = GHIDRA_UINT(g_game->_gameStateFlags) | 0x10; + *(undefined4 *)(GHIDRA_INT(&game->_gameStateFlags) + 4) = uVar11; if ((*(char *)persistentData != '\0') && ((manager->_persistentGameData)._isFileLoaded != 0)) { *(undefined1 *)persistentData = 0; ((Manager *)((Manager *)persistentData))->Manager::BackupSaveFile(); @@ -2012,10 +2012,10 @@ void Level::ChangeRoom(int targetRoomIDX, int dimension) if ((this->_currentDimensionIdx == 2) && (iVar12 != 2)) { this->_currentRoomIndex = this[1]._roomList[7].Flags; this->_previousRoomIndex = this[1]._roomList[7].GreedSubType; - iVar6 = (int)(char)this[1]._roomList[7].TotalMoneySpent; + iVar6 = GHIDRA_INT((char)this[1]._roomList[7].TotalMoneySpent); this->_currentDimensionIdx = iVar6; this->_currentRoomMap = this->_roomMap + iVar6 * 0xa9; - this->_lastRoomDimensionIdx = (int)(char)this[1]._roomList[7].PoopCount; + this->_lastRoomDimensionIdx = GHIDRA_INT((char)this[1]._roomList[7].PoopCount); this->_leaveDoor = this[1]._roomList[7].VisitedCount; } pRVar7 = GetRoomByIdx(this,newRoomIdx,iVar12); @@ -2083,23 +2083,23 @@ LAB_0073fe4e: do { treeNext = (RoomDescriptor *)treeNode->ListIndex; uVar4 = uVar4 + 1; - if (*(char *)((int)&treeNext->Dimension + 1) == '\0') { - isNil = *(char *)((int)&((RoomDescriptor *)treeNext->GridIndex)->Dimension + 1); + if (*(char *)(GHIDRA_INT(&treeNext->Dimension) + 1) == '\0') { + isNil = *(char *)(GHIDRA_INT(&((RoomDescriptor *)treeNext->GridIndex)->Dimension) + 1); treeNode = treeNext; treeNext = (RoomDescriptor *)treeNext->GridIndex; while (isNil == '\0') { - isNil = *(char *)((int)&((RoomDescriptor *)treeNext->GridIndex)->Dimension + 1); + isNil = *(char *)(GHIDRA_INT(&((RoomDescriptor *)treeNext->GridIndex)->Dimension) + 1); treeNode = treeNext; treeNext = (RoomDescriptor *)treeNext->GridIndex; } } else { - isNil = *(char *)((int)&((RoomDescriptor *)treeNode->SafeGridIndex)->Dimension + 1); + isNil = *(char *)(GHIDRA_INT(&((RoomDescriptor *)treeNode->SafeGridIndex)->Dimension) + 1); treeParent = (RoomDescriptor *)treeNode->SafeGridIndex; treeNext = treeNode; while ((treeNode = treeParent, isNil == '\0' && (treeNext == (RoomDescriptor *)treeNode->ListIndex))) { - isNil = *(char *)((int)&((RoomDescriptor *)treeNode->SafeGridIndex)->Dimension + 1); + isNil = *(char *)(GHIDRA_INT(&((RoomDescriptor *)treeNode->SafeGridIndex)->Dimension) + 1); treeParent = (RoomDescriptor *)treeNode->SafeGridIndex; treeNext = treeNode; } @@ -2117,23 +2117,23 @@ LAB_0073fe4e: *local_18 = pRVar7->Data; local_18 = local_18 + 1; treeNode = (RoomDescriptor *)pRVar7->ListIndex; - if (*(char *)((int)&treeNode->Dimension + 1) == '\0') { - isNil = *(char *)((int)&((RoomDescriptor *)treeNode->GridIndex)->Dimension + 1); + if (*(char *)(GHIDRA_INT(&treeNode->Dimension) + 1) == '\0') { + isNil = *(char *)(GHIDRA_INT(&((RoomDescriptor *)treeNode->GridIndex)->Dimension) + 1); pRVar7 = treeNode; treeNode = (RoomDescriptor *)treeNode->GridIndex; while (isNil == '\0') { - isNil = *(char *)((int)&((RoomDescriptor *)treeNode->GridIndex)->Dimension + 1); + isNil = *(char *)(GHIDRA_INT(&((RoomDescriptor *)treeNode->GridIndex)->Dimension) + 1); pRVar7 = treeNode; treeNode = (RoomDescriptor *)treeNode->GridIndex; } } else { - isNil = *(char *)((int)&((RoomDescriptor *)pRVar7->SafeGridIndex)->Dimension + 1); + isNil = *(char *)(GHIDRA_INT(&((RoomDescriptor *)pRVar7->SafeGridIndex)->Dimension) + 1); treeNext = (RoomDescriptor *)pRVar7->SafeGridIndex; treeNode = pRVar7; while ((pRVar7 = treeNext, isNil == '\0' && (treeNode == (RoomDescriptor *)pRVar7->ListIndex))) { - isNil = *(char *)((int)&((RoomDescriptor *)pRVar7->SafeGridIndex)->Dimension + 1); + isNil = *(char *)(GHIDRA_INT(&((RoomDescriptor *)pRVar7->SafeGridIndex)->Dimension) + 1); treeNext = (RoomDescriptor *)pRVar7->SafeGridIndex; treeNode = pRVar7; } @@ -2141,10 +2141,10 @@ LAB_0073fe4e: } while (pRVar7 != local_20); } } - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); FUN_00752de0(nearbyRooms,local_18); uVar4 = 0; - local_18 = (undefined4 *)((int)local_18 - (int)nearbyRooms >> 2); + local_18 = (undefined4 *)(GHIDRA_INT(local_18) - GHIDRA_INT(nearbyRooms) >> 2); if (local_18 != (undefined4 *)0x0) { do { local_20 = GetRoomByIdx(this,nearbyRooms[uVar4],-1); @@ -2165,7 +2165,7 @@ LAB_00740146: } uVar9 = GetTargetSlot(this,nearbyRooms[uVar4],dimension,iVar12); uVar8 = uVar9 & 0x80000003; - if ((int)uVar8 < 0) { + if (GHIDRA_INT(uVar8) < 0) { uVar8 = (uVar8 - 1 | 0xfffffffc) + 1; } if ((uVar8 == dimension) && @@ -2196,12 +2196,12 @@ LAB_00740146: } local_8 = local_8 & 0xffffff00; if (nearbyRooms != (undefined4 *)0x0) { - uVar4 = ((int)nearbyRoomsCapacityEnd - (int)nearbyRooms >> 2) * 4; + uVar4 = (GHIDRA_INT(nearbyRoomsCapacityEnd) - GHIDRA_INT(nearbyRooms) >> 2) * 4; ptr = nearbyRooms; if (0xfff < uVar4) { ptr = (undefined4 *)nearbyRooms[-1]; uVar4 = uVar4 + 0x23; - if (0x1f < (uint)((int)nearbyRooms + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(nearbyRooms) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2220,7 +2220,7 @@ LAB_00740146: (game->_minimap)._shakeDuration = 0x1e; local_20 = (RoomDescriptor *)0x16; seed_fart_sound_override((int *)&local_20); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_20,0.5,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_20),0.5,2,0,1.0,0.0); } } uVar4 = Random(); @@ -2237,11 +2237,11 @@ LAB_00740146: std::vector::_Emplace_reallocate(local_28,&local_20); } else { - local_28->GridIndex = (int)local_20; + local_28->GridIndex = GHIDRA_INT(local_20); local_28 = (RoomDescriptor *)&local_28->SafeGridIndex; } - local_20 = (RoomDescriptor *)((int)&local_20->GridIndex + 1); - } while ((int)local_20 < this->_roomCount); + local_20 = (RoomDescriptor *)(GHIDRA_INT(&local_20->GridIndex) + 1); + } while (GHIDRA_INT(local_20) < this->_roomCount); } FUN_00752de0(0,local_28); iVar12 = 0; @@ -2276,21 +2276,21 @@ LAB_00740146: uVar4 = iVar10 % 0xd - iVar12 % 0xd; uVar9 = iVar10 / 0xd - iVar12 / 0xd; iVar12 = newRoomIdx; - if ((int)((uVar9 ^ (int)uVar9 >> 0x1f) - ((int)uVar9 >> 0x1f)) < - (int)((uVar4 ^ (int)uVar4 >> 0x1f) - ((int)uVar4 >> 0x1f))) { + if (GHIDRA_INT(((uVar9 ^ GHIDRA_INT(uVar9) >> 0x1f) - (GHIDRA_INT(uVar9) >> 0x1f))) < + GHIDRA_INT(((uVar4 ^ GHIDRA_INT(uVar4) >> 0x1f) - (GHIDRA_INT(uVar4) >> 0x1f)))) { dimension = 2; - if (0 < (int)uVar4) { + if (0 < GHIDRA_INT(uVar4)) { dimension = 0; } } else { - dimension = (uint)((int)uVar9 < 1) * 2 + 1; + dimension = GHIDRA_UINT((GHIDRA_INT(uVar9) < 1)) * 2 + 1; } } else { if (dimension == -1) { uVar4 = this->_leaveDoor & 0x80000003; - if ((int)uVar4 < 0) { + if (GHIDRA_INT(uVar4) < 0) { uVar4 = (uVar4 - 1 | 0xfffffffc) + 1; } dimension = uVar4 + 2 & 0x80000003; @@ -2344,7 +2344,7 @@ LAB_007404a9: local_1c = *(int *)((char *)pRVar7->Data + 8); do { uVar9 = uVar9 + 1; - if ((uVar9 < 9) && (iVar12 = *(int *)(uVar4 + (int)this->_room), iVar12 != 0)) { + if ((uVar9 < 9) && (iVar12 = *(int *)(uVar4 + GHIDRA_INT(this->_room)), iVar12 != 0)) { pRVar7 = GetRoomByIdx(this,*(int *)(iVar12 + 0x394),-1); pRVar7->Flags = pRVar7->Flags & 0xfffbffff; } @@ -2387,7 +2387,7 @@ LAB_007405b4: bVar1 = true; if ((this_00 == (GridEntity_Door *)0x0) || ((pRVar7 = GetRoomByIdx((Level *)g_game,this_00->_targetRoomIdx,-1), - pRVar7 != (RoomDescriptor *)0x0 && (((uint)pRVar7->Flags >> 10 & 1) != 0)))) + pRVar7 != (RoomDescriptor *)0x0 && ((GHIDRA_UINT(pRVar7->Flags) >> 10 & 1) != 0)))) goto LAB_00740680; } else { @@ -2399,8 +2399,8 @@ LAB_00740680: local_20 = (RoomDescriptor *)(uVar4 & 7); iVar12 = 0; do { - uVar4 = (int)local_20->_doors + iVar12 + -0x1c & 0x80000007; - if ((int)uVar4 < 0) { + uVar4 = GHIDRA_INT(local_20->_doors) + iVar12 + -0x1c & 0x80000007; + if (GHIDRA_INT(uVar4) < 0) { uVar4 = (uVar4 - 1 | 0xfffffff8) + 1; } this->_enterDoor = uVar4; @@ -2413,7 +2413,7 @@ LAB_00740680: if (bVar1) { if (this_00 != (GridEntity_Door *)0x0) { pRVar7 = GetRoomByIdx((Level *)g_game,this_00->_targetRoomIdx,-1); - if ((pRVar7 == (RoomDescriptor *)0x0) || (((uint)pRVar7->Flags >> 10 & 1) == 0)) + if ((pRVar7 == (RoomDescriptor *)0x0) || ((GHIDRA_UINT(pRVar7->Flags) >> 10 & 1) == 0)) goto LAB_00740830; this_00 = (GridEntity_Door *)0x0; } @@ -2423,7 +2423,7 @@ LAB_00740708: if (this_00 == (GridEntity_Door *)0x0) goto LAB_00740708; LAB_00740830: if (this_00->_targetRoomType == 1) goto LAB_00740722; - dimension = (int)this_00; + dimension = GHIDRA_INT(this_00); } iVar12 = iVar12 + 1; } while (iVar12 < 8); @@ -2451,9 +2451,9 @@ LAB_00740722: (iVar12 = (this_00->_desc)._variant, iVar12 != 4)) { if (iVar12 == 5) { qVar2 = g_game->_gameStateFlags; - flagsPtr = (uint *)((int)&g_game->_gameStateFlags + 4); + flagsPtr = (uint *)(GHIDRA_INT(&g_game->_gameStateFlags) + 4); *flagsPtr = *flagsPtr | 0x20000; - *(int *)&game->_gameStateFlags = (int)qVar2; + *(int *)&game->_gameStateFlags = GHIDRA_INT(qVar2); } (this_00->_desc)._variant = 8; ((GridEntity_Door *)(this_00))->GridEntity_Door::UpdateAnimation(); @@ -2534,11 +2534,11 @@ int Level::GetRandomRoomIndex(byte IAmErrorRoom, uint Seed) } uVar3 = Seed >> 2 ^ Seed; uVar3 = uVar3 << 0xf ^ uVar3; - if ((int)candidatesCursor >> 2 == 0) { + if (GHIDRA_INT(candidatesCursor) >> 2 == 0) { uVar3 = 0; } else { - uVar3 = (uVar3 >> 0x19 ^ uVar3) % (uint)((int)candidatesCursor >> 2); + uVar3 = (uVar3 >> 0x19 ^ uVar3) % GHIDRA_UINT((GHIDRA_INT(candidatesCursor) >> 2)); } ExceptionList = local_10; return *(int *)(uVar3 * 4); @@ -2569,7 +2569,7 @@ int Level::GetNonCompleteRoomIndex() (this->_roomList[roomIdx].Dimension == this->_currentDimensionIdx)) && ((this->_roomList[roomIdx].Group == -1 || (this->_roomList[roomIdx].Group == *(int *)(*(int *)((char *)this->_room + 4) + 0xb4))))) { - if (*(int *)((int)this->_roomList[roomIdx].Data + 8) == 1) { + if (*(int *)(GHIDRA_INT(this->_roomList[roomIdx].Data) + 8) == 1) { ExceptionList = local_10; return this->_roomList[roomIdx].SafeGridIndex; } @@ -2586,7 +2586,7 @@ int Level::GetNonCompleteRoomIndex() roomIdx = roomIdx + 1; } while (roomIdx < this->_roomCount); } - if ((int)candidatesEnd >> 2 == 0) { + if (GHIDRA_INT(candidatesEnd) >> 2 == 0) { if (((this->_roomList[0x1fb].Flags & 1) == 0) || (isNextStageAvailable = IsNextStageAvailable(this), isNextStageAvailable == 0)) { result = -1; @@ -2618,7 +2618,7 @@ RoomDescriptor * Level::GetRoomByIdx(int idx, int dimension) ExceptionList = &local_10; if (*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard) { _Init_thread_header(&g_invalidRoomDescriptorGuard, - __security_cookie ^ (int)register0x00000010 - 4U); + __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); if (g_invalidRoomDescriptorGuard == -1) { local_8 = 0; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); @@ -2630,10 +2630,10 @@ RoomDescriptor * Level::GetRoomByIdx(int idx, int dimension) if (dimension < 0) { dimension = this->_currentDimensionIdx; } - if ((uint)dimension < 3) { + if (GHIDRA_UINT(dimension) < 3) { if (idx == -100) { if (-1 < this->_currentRoomIndex) { - room = GetRoomByIdx(this,this->_currentRoomIndex,(uint)(dimension == 0)); + room = GetRoomByIdx(this,this->_currentRoomIndex,GHIDRA_UINT((dimension == 0))); ExceptionList = local_10; return room; } @@ -2649,8 +2649,8 @@ RoomDescriptor * Level::GetRoomByIdx(int idx, int dimension) if (0 < this->_roomCount) { roomData = &this->_roomList[0].Data; do { - if (((roomData[-1] == (void *)0x0) && (*(int *)((int)*roomData + 8) == 1)) && - (*(int *)((int)*roomData + 0x10) == 10)) { + if (((roomData[-1] == (void *)0x0) && (*(int *)(GHIDRA_INT(*roomData) + 8) == 1)) && + (*(int *)(GHIDRA_INT(*roomData) + 0x10) == 10)) { ExceptionList = local_10; return (RoomDescriptor *)(roomData + -4); } @@ -2663,9 +2663,9 @@ RoomDescriptor * Level::GetRoomByIdx(int idx, int dimension) else if (idx + 0x14U < 0xbd) { if (idx < 0) { ExceptionList = local_10; - return (RoomDescriptor *)((int)this + idx * -0xb8 + 0x16bc4); + return (RoomDescriptor *)(GHIDRA_INT(this) + idx * -0xb8 + 0x16bc4); } - if ((uint)this->_roomMap[dimension * 0xa9 + idx] < 0x20f) { + if (GHIDRA_UINT(this->_roomMap[dimension * 0xa9 + idx]) < 0x20f) { ExceptionList = local_10; return this->_roomList + this->_roomMap[dimension * 0xa9 + idx]; } @@ -2688,7 +2688,7 @@ RoomDescriptor * Level::GetLastRoomDesc() void Level::GetRooms(int *param_2) { *param_2 = this->_roomCount; - param_2[1] = (int)this->_roomList; + param_2[1] = GHIDRA_INT(this->_roomList); return; } @@ -2767,8 +2767,8 @@ void Level::generate_dungeon(RNG *RNG) local_14 = 0xffffffff; puStack_18 = &DAT_00afdb9f; local_1c = *unaff_FS_OFFSET; - local_24 = __security_cookie ^ (uint)(local_5c + 0x13); - *unaff_FS_OFFSET = (int)&local_1c; + local_24 = __security_cookie ^ GHIDRA_UINT((local_5c + 0x13)); + *unaff_FS_OFFSET = GHIDRA_INT(&local_1c); uVar2 = (this->_generationRNG)._seed; local_430 = RNG; local_428 = this->_stage; @@ -2789,7 +2789,7 @@ void Level::generate_dungeon(RNG *RNG) uVar2 = uVar2 << ((byte)(this->_generationRNG)._shift2 & 0x1f) ^ uVar2; uVar2 = uVar2 >> ((byte)(this->_generationRNG)._shift3 & 0x1f) ^ uVar2; (this->_generationRNG)._seed = uVar2; - iVar3 = (int)(local_428 * 10) / 3 + 5 + (uVar2 & 1); + iVar3 = GHIDRA_INT((local_428 * 10)) / 3 + 5 + (uVar2 & 1); iVar8 = 0x14; if (iVar3 < 0x14) { iVar8 = iVar3; @@ -2816,8 +2816,8 @@ void Level::generate_dungeon(RNG *RNG) else { roomCountDouble = (double)targetRoomCount; targetRoomCount = 0x2d; - if ((int)(roomCountDouble * 1.8) < 0x2d) { - targetRoomCount = (int)(roomCountDouble * 1.8); + if (GHIDRA_INT((roomCountDouble * 1.8)) < 0x2d) { + targetRoomCount = GHIDRA_INT((roomCountDouble * 1.8)); } } curLevel = self; @@ -2938,7 +2938,7 @@ void Level::generate_dungeon(RNG *RNG) uVar5 = Seeds::GetPreventedCurses(); curLevel = self; if (((~uVar5 & (uVar4 | uVar2 | uVar6) & 2) == 0) && - (local_40c = self->_stage, (int)local_40c < 9)) { + (local_40c = self->_stage, GHIDRA_INT(local_40c) < 9)) { if (local_41c == 1) { if ((local_40c & 1) == 0) { maxRoomDifficulty = 0xf; @@ -2961,7 +2961,7 @@ void Level::generate_dungeon(RNG *RNG) else { local_40c = self->_stage; bVar10 = local_41c == 1; - local_41c = (uint)bVar10 * 4 + 1; + local_41c = GHIDRA_UINT(bVar10) * 4 + 1; maxRoomDifficulty = 10; if (bVar10) { maxRoomDifficulty = 0xf; @@ -2971,7 +2971,7 @@ void Level::generate_dungeon(RNG *RNG) roomsBegin = (int *)0x0; roomsEnd = (int *)0x0; roomsCap = 0; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; local_42c = (int *)RoomConfig::GetStageID(local_40c,self->_stageType,-1); if (local_40c == 0xc) { local_41c = 5; @@ -2983,16 +2983,16 @@ void Level::generate_dungeon(RNG *RNG) RoomConfig::CollectRooms (&g_game->_roomConfig,&stageRooms2Begin,local_40c,1,0xd,0,0xffffffff,5,0xf, &local_420,-1,-1); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; std::vector<4byte>::insert_range(piVar9,stageRooms2Begin,local_444,local_42c); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (stageRooms2Begin != (void *)0x0) { - uVar2 = (local_440 - (int)stageRooms2Begin >> 2) * 4; + uVar2 = (local_440 - GHIDRA_INT(stageRooms2Begin) >> 2) * 4; pvVar7 = stageRooms2Begin; if (0xfff < uVar2) { pvVar7 = *(void **)((char *)stageRooms2Begin + -4); uVar2 = uVar2 + 0x23; - if (0x1f < (uint)((int)stageRooms2Begin + (-4 - (int)pvVar7))) goto LAB_00741c6c; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(stageRooms2Begin) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_00741c6c; } operator_delete(pvVar7,uVar2); stageRooms2Begin = (void *)0x0; @@ -3007,15 +3007,15 @@ void Level::generate_dungeon(RNG *RNG) else { local_420 = 0; pvVar7 = RoomConfig::CollectRooms - (&g_game->_roomConfig,collectedTmp,(uint)local_42c,1,0xd,0,0xffffffff, + (&g_game->_roomConfig,collectedTmp,GHIDRA_UINT(local_42c),1,0xd,0,0xffffffff, local_41c,maxRoomDifficulty,&local_420,-1,-1); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; std::vector::assign(pvVar7); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; FID_conflict__Tidy(collectedTmp); piVar9 = roomsEnd; } - if ((uint)((int)piVar9 - (int)roomsBegin >> 2) < 0x14) { + if (GHIDRA_UINT((GHIDRA_INT(piVar9) - GHIDRA_INT(roomsBegin) >> 2)) < 0x14) { local_41c = 1; maxRoomDifficulty = 0xf; if (curLevel->_stage == 0xc) { @@ -3028,16 +3028,16 @@ void Level::generate_dungeon(RNG *RNG) RoomConfig::CollectRooms (&g_game->_roomConfig,&stageRoomsBegin,uVar2,1,0xd,0,0xffffffff,1,0xf,&local_420 ,-1,-1); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; std::vector<4byte>::insert_range(roomsBegin,stageRoomsBegin,stageRoomsEnd,local_42c); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (stageRoomsBegin != (void *)0x0) { - uVar6 = (stageRoomsCap - (int)stageRoomsBegin >> 2) * 4; + uVar6 = (stageRoomsCap - GHIDRA_INT(stageRoomsBegin) >> 2) * 4; pvVar7 = stageRoomsBegin; if (0xfff < uVar6) { pvVar7 = *(void **)((char *)stageRoomsBegin + -4); uVar6 = uVar6 + 0x23; - if (0x1f < (uint)((int)stageRoomsBegin + (-4 - (int)pvVar7))) goto LAB_00741c6c; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(stageRoomsBegin) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_00741c6c; } operator_delete(pvVar7,uVar6); stageRoomsBegin = (void *)0x0; @@ -3054,21 +3054,21 @@ void Level::generate_dungeon(RNG *RNG) local_420 = 0; collectedRooms = RoomConfig::CollectRooms - (&g_game->_roomConfig,collectedTmp2,(uint)local_42c,1,0xd,0,0xffffffff,1,0xf, + (&g_game->_roomConfig,collectedTmp2,GHIDRA_UINT(local_42c),1,0xd,0,0xffffffff,1,0xf, &local_420,-1,-1); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; if (&roomsBegin != collectedRooms) { local_42c = *collectedRooms; - local_40c = (int)collectedRooms[1] - (int)local_42c; - if ((uint)(roomsCap - (int)roomsBegin >> 2) < (uint)((int)local_40c >> 2)) { - std::vector::reserve_clear((int)local_40c >> 2); + local_40c = GHIDRA_INT(collectedRooms[1]) - GHIDRA_INT(local_42c); + if (GHIDRA_UINT((roomsCap - GHIDRA_INT(roomsBegin) >> 2)) < GHIDRA_UINT((GHIDRA_INT(local_40c) >> 2))) { + std::vector::reserve_clear(GHIDRA_INT(local_40c) >> 2); } piVar9 = roomsBegin; memmove(roomsBegin,local_42c,local_40c); - piVar9 = (int *)((int)piVar9 + local_40c); + piVar9 = (int *)(GHIDRA_INT(piVar9) + local_40c); roomsEnd = piVar9; } - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; FID_conflict__Tidy(collectedTmp2); } } @@ -3111,7 +3111,7 @@ void Level::generate_dungeon(RNG *RNG) curLevel = self; LAB_00741760: FUN_007382c0(); - uVar2 = (int)local_430 + 1; + uVar2 = GHIDRA_INT(local_430) + 1; bVar10 = 99 < local_430; local_430 = (RNG *)uVar2; if (bVar10) { @@ -3128,12 +3128,12 @@ LAB_0074183e: else { if ((g_game->_dailyChallenge)._id == 0) { pvVar7 = (g_manager->_challengeParams)._begin; - uVar2 = ((int)(g_manager->_challengeParams)._end - (int)pvVar7) / 0xa4 - 1; - uVar6 = -(uint)(local_42c != (int *)0x0) & (uint)local_42c; + uVar2 = (GHIDRA_INT((g_manager->_challengeParams)._end) - GHIDRA_INT(pvVar7)) / 0xa4 - 1; + uVar6 = -GHIDRA_UINT((local_42c != (int *)0x0)) & GHIDRA_UINT(local_42c); if (uVar2 <= uVar6) { uVar6 = uVar2; } - challengeParams = (ChallengeParam *)(uVar6 * 0xa4 + (int)pvVar7); + challengeParams = (ChallengeParam *)(uVar6 * 0xa4 + GHIDRA_INT(pvVar7)); } else { challengeParams = &(g_game->_dailyChallenge)._params; @@ -3172,7 +3172,7 @@ LAB_007418cb: } LAB_00741921: local_5c[5] = g_levelGenInvalidPos[0]; - aLStack_70[0]._0_1_ = 1; + (*(undefined1 *)((char *)&(aLStack_70[0]) + 0x0)) = 1; uStack_68 = 6; uStack_64 = 6; uStack_60 = 0; @@ -3194,10 +3194,10 @@ LAB_00741921: local_2c = local_2c & 0xffffff00; uStack_60 = _DAT_00c5d380; local_5c[0] = _DAT_00c5d384; - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; uVar2 = g_game->_debugCurses; uVar6 = curLevel->_curses; - local_420 = CONCAT31(local_420._1_3_,curLevel->_stage == 0xc); + local_420 = CONCAT31((*(undefined1 *)((char *)&(local_420) + 0x1)),curLevel->_stage == 0xc); uVar4 = Seeds::GetForcedCurses(); uVar5 = Seeds::GetPreventedCurses(); levelCopy = self; @@ -3211,19 +3211,19 @@ LAB_00741921: LevelGenerator::Generate ((LevelGenerator *)generator,targetRoomCount,self->_stage == 0xb,isPlaced, (byte)local_420,&local_40c,local_428,aLStack_70); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; FID_conflict__Erase_tree_>_> (&pvStack_40,(fuzzer_allocator_> *)&pvStack_40, - *(_Tree_node **)((int)pvStack_40 + 4)); + *(_Tree_node **)(GHIDRA_INT(pvStack_40) + 4)); operator_delete(pvStack_40,0x14); curLevel = levelCopy; if (cStack_75 == '\0') { KAGE_LogMessage(1,(byte *)"generated level is not usable\n"); goto LAB_00741760; } - if (iStack_94 - iStack_98 >> 2 < (int)local_428) { + if (iStack_94 - iStack_98 >> 2 < GHIDRA_INT(local_428)) { KAGE_LogMessage(1,(byte *)"not enough dead ends (%d/%d)\n"); - if (((9 < local_430) && (local_430 == (RNG *)(((uint)local_430 / 5) * 5))) && (iVar8 < 0x40)) { + if (((9 < local_430) && (local_430 == (RNG *)((GHIDRA_UINT(local_430) / 5) * 5))) && (iVar8 < 0x40)) { targetRoomCount = iVar8 + 1; } goto LAB_00741760; @@ -3278,12 +3278,12 @@ LAB_00741c0b: FUN_00421b50(); KAGE_LogMessage(1,(byte *)"Map Generated in %d Loops\n"); if (roomsBegin != (int *)0x0) { - uVar2 = roomsCap - (int)roomsBegin & 0xfffffffc; + uVar2 = roomsCap - GHIDRA_INT(roomsBegin) & 0xfffffffc; piVar9 = roomsBegin; if (0xfff < uVar2) { piVar9 = (int *)roomsBegin[-1]; uVar2 = uVar2 + 0x23; - if (0x1f < (uint)((int)roomsBegin + (-4 - (int)piVar9))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(roomsBegin) + (-4 - GHIDRA_INT(piVar9))))) { LAB_00741c6c: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3352,8 +3352,8 @@ void Level::generate_backwards() local_14 = 0xffffffff; puStack_18 = &DAT_00afdcc9; local_1c = *unaff_FS_OFFSET; - local_24 = __security_cookie ^ (uint)(local_5c + 0x13); - *unaff_FS_OFFSET = (int)&local_1c; + local_24 = __security_cookie ^ GHIDRA_UINT((local_5c + 0x13)); + *unaff_FS_OFFSET = GHIDRA_INT(&local_1c); if ((this->_stageType == 4) || (this->_stageType == 5)) { isAltPath = true; } @@ -3409,22 +3409,22 @@ void Level::generate_backwards() local_414 = (int *)0x0; collectedRooms = RoomConfig::CollectRooms - (&g_game->_roomConfig,collectedRoomsBuffer,0x24,1,0xd,0,0xffffffff,1,(int)local_420 + (&g_game->_roomConfig,collectedRoomsBuffer,0x24,1,0xd,0,0xffffffff,1,GHIDRA_INT(local_420) ,(uint *)&local_414,-1,-1); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (&candidateRooms != collectedRooms) { local_414 = *collectedRooms; - local_410 = (int)collectedRooms[1] - (int)local_414; + local_410 = GHIDRA_INT(collectedRooms[1]) - GHIDRA_INT(local_414); piVar3 = (int *)0x0; - if ((int)local_410 >> 2 != 0) { - std::vector::reserve_clear((int)local_410 >> 2); + if (GHIDRA_INT(local_410) >> 2 != 0) { + std::vector::reserve_clear(GHIDRA_INT(local_410) >> 2); candidateRoomsBegin = candidateRooms; piVar3 = candidateRooms; } memmove(piVar3,local_414,local_410); - candidateRoomsEnd = (int *)(local_410 + (int)piVar3); + candidateRoomsEnd = (int *)(local_410 + GHIDRA_INT(piVar3)); } - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; FID_conflict__Tidy(collectedRoomsBuffer); local_410 = 0; if ((backwardsStage->_stageType == 4) || (backwardsStage->_stageType == 5)) { @@ -3465,16 +3465,16 @@ void Level::generate_backwards() } switchD_0074313d_default: uVar2 = local_410; - if ((uint)((int)candidateRoomsEnd - (int)candidateRoomsBegin >> 2) < 0x14) { + if (GHIDRA_UINT((GHIDRA_INT(candidateRoomsEnd) - GHIDRA_INT(candidateRoomsBegin) >> 2)) < 0x14) { local_420 = (Game *)0xf; local_414 = (int *)0x0; fallbackRooms = RoomConfig::CollectRooms (&g_game->_roomConfig,fallbackRoomsBuffer,0x24,1,0xd,0,0xffffffff,1,0xf, (uint *)&local_414,-1,-1); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; std::vector::assign(fallbackRooms); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; FID_conflict__Tidy(fallbackRoomsBuffer); candidateRoomsBegin = candidateRooms; } @@ -3521,7 +3521,7 @@ LAB_00743295: KAGE_LogMessage(1,(byte *)"generate...\n"); memset(auStack_150,0,0xa9); local_5c[5] = g_levelGenInvalidPos[0]; - startRoom[0]._0_1_ = 1; + (*(undefined1 *)((char *)&(startRoom[0]) + 0x0)) = 1; uStack_68 = 6; uStack_64 = 6; uStack_60 = 0; @@ -3543,13 +3543,13 @@ LAB_00743295: local_2c = local_2c & 0xffffff00; uStack_60 = _DAT_00c5d380; local_5c[0] = _DAT_00c5d384; - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; LevelGenerator::Generate ((LevelGenerator *)generator,targetRoomCount,0,0,0,(uint *)&local_414,2,startRoom); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; FID_conflict__Erase_tree_>_> (&pvStack_40,(fuzzer_allocator_> *)&pvStack_40, - *(_Tree_node **)((int)pvStack_40 + 4)); + *(_Tree_node **)(GHIDRA_INT(pvStack_40) + 4)); operator_delete(pvStack_40,0x14); iVar4 = iVar5; if (isLevelUsable == '\0') { @@ -3567,7 +3567,7 @@ LAB_00743295: local_434->_roomCount = 0; isPlaced = place_rooms_backwards (local_434,(LevelGenerator *)generator,backwardsStage,local_410,1, - (uint)local_420); + GHIDRA_UINT(local_420)); if (isPlaced != 0) goto LAB_0074341a; reset_room_list(this_00,0); this = this_00; @@ -3582,12 +3582,12 @@ LAB_00743295: LAB_0074341a: KAGE_LogMessage(1,(byte *)"Map Generated in %d Loops\n"); if (candidateRoomsBegin != (int *)0x0) { - uVar2 = candidateRoomsCapacity - (int)candidateRoomsBegin & 0xfffffffc; + uVar2 = candidateRoomsCapacity - GHIDRA_INT(candidateRoomsBegin) & 0xfffffffc; piVar3 = candidateRoomsBegin; if (0xfff < uVar2) { piVar3 = (int *)candidateRoomsBegin[-1]; uVar2 = uVar2 + 0x23; - if (0x1f < (uint)((int)candidateRoomsBegin + (-4 - (int)piVar3))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(candidateRoomsBegin) + (-4 - GHIDRA_INT(piVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -3663,8 +3663,8 @@ void Level::generate_greed() uStack_8 = 0xffffffff; puStack_c = &DAT_00afdd93; local_10 = *unaff_FS_OFFSET; - local_14 = __security_cookie ^ (uint)(auStack_30 + 0x2c); - *unaff_FS_OFFSET = (int)&local_10; + local_14 = __security_cookie ^ GHIDRA_UINT((auStack_30 + 0x2c)); + *unaff_FS_OFFSET = GHIDRA_INT(&local_10); rng = &rng->_generationRNG; roomConfig = &g_game->_roomConfig; roomConfigLocal = roomConfig; @@ -3686,7 +3686,7 @@ void Level::generate_greed() rng->_seed = uVar3; ((RoomDescriptor *)(aRStack_3ac))->RoomDescriptor::Init(uVar3); uStack_8 = 0; - if ((uint)((generatorRoomsCapacity - generatorRooms[0]) / 0x48) < 7) { + if (GHIDRA_UINT(((generatorRoomsCapacity - generatorRooms[0]) / 0x48)) < 7) { vector_LevelGenerator_Room_reserve(generatorRooms,7); } pvVar4 = LevelGenerator::CreateRoom((LevelGenerator *)aRStack_3ac,6,6,4,-1,-1,-1); @@ -3717,8 +3717,8 @@ void Level::generate_greed() uVar3 = uVar3 >> ((byte)(rng->_generationRNG)._shift3 & 0x1f) ^ uVar3; rng->_seed = uVar3; pRVar6 = RoomConfig::GetRandomRoom - (roomConfigLocal,uVar3,1,(int)local_3c4,1,4,0,-1,1,10, - (uint *)((int)pvVar4 + 0x1c),0xffffffff,-1); + (roomConfigLocal,uVar3,1,GHIDRA_INT(local_3c4),1,4,0,-1,1,10, + (uint *)(GHIDRA_INT(pvVar4) + 0x1c),0xffffffff,-1); uVar3 = rng->_seed; if (uVar3 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -3736,7 +3736,7 @@ void Level::generate_greed() minVariant = 0; rng->_seed = uVar3; pRVar7 = RoomConfig::GetRandomRoom - (roomConfigLocal,uVar3,1,0,2,6,0,-1,1,10,(uint *)((int)pvVar5 + 0x1c), + (roomConfigLocal,uVar3,1,0,2,6,0,-1,1,10,(uint *)(GHIDRA_INT(pvVar5) + 0x1c), 0xffffffff,-1); treasureRoomA = (void *)0x0; treasureRoomB = (void *)0x0; @@ -3751,7 +3751,7 @@ void Level::generate_greed() if (1 < iVar8) { iVar10 = iVar8; } - rngResult = ((RNG *)(rng))->RNG::RandomInt((uint)(100 / (longlong)iVar10)); + rngResult = ((RNG *)(rng))->RNG::RandomInt(GHIDRA_UINT((100 / (longlong)iVar10))); iVar10 = extraout_ECX; if ((rngResult < 0xf) && (bVar2 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(0x52), @@ -3763,7 +3763,7 @@ void Level::generate_greed() uVar3 = 3; } } - puVar9 = (uint *)((int)treasureSlotA + 0x1c); + puVar9 = (uint *)(GHIDRA_INT(treasureSlotA) + 0x1c); maxDifficulty = 10; minDifficulty = 1; treasureRoomShape = 1; @@ -3774,7 +3774,7 @@ void Level::generate_greed() rngResult = ((RNG *)(rng))->RNG::Next(); treasureRoomA = RoomConfig::GetRandomRoomWithFallbackStage - (roomConfigLocal,rngResult,bVar2,(int)roomDesc,iVar8,treasureRoomType, + (roomConfigLocal,rngResult,bVar2,GHIDRA_INT(roomDesc),iVar8,treasureRoomType, treasureRoomShape,minVariant,treasureRoomType,minDifficulty,maxDifficulty,puVar9,uVar3, iVar10); uVar3 = 0; @@ -3787,7 +3787,7 @@ void Level::generate_greed() if (1 < iVar8) { iVar10 = iVar8; } - rngResult = ((RNG *)(rng))->RNG::RandomInt((uint)(100 / (longlong)iVar10)); + rngResult = ((RNG *)(rng))->RNG::RandomInt(GHIDRA_UINT((100 / (longlong)iVar10))); iVar10 = extraout_ECX_02; if ((rngResult < 0xf) && (bVar2 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(0x52), @@ -3799,7 +3799,7 @@ void Level::generate_greed() uVar3 = 3; } } - puVar9 = (uint *)((int)pvStack_3bc + 0x1c); + puVar9 = (uint *)(GHIDRA_INT(pvStack_3bc) + 0x1c); maxDifficulty = 10; minDifficulty = 1; treasureRoomShape = 1; @@ -3810,7 +3810,7 @@ void Level::generate_greed() rngResult = ((RNG *)(rng))->RNG::Next(); treasureRoomB = RoomConfig::GetRandomRoomWithFallbackStage - (roomConfigLocal,rngResult,bVar2,(int)roomDesc,iVar8,treasureRoomType, + (roomConfigLocal,rngResult,bVar2,GHIDRA_INT(roomDesc),iVar8,treasureRoomType, treasureRoomShape,minVariant,treasureRoomType,minDifficulty,maxDifficulty,puVar9,uVar3, iVar10); } @@ -3829,7 +3829,7 @@ void Level::generate_greed() uVar3 = uVar3 >> ((byte)(rng->_generationRNG)._shift3 & 0x1f) ^ uVar3; rng->_seed = uVar3; local_3c4 = RoomConfig::GetRandomRoom - (roomConfigLocal,uVar3,1,0,10,1,0,-1,1,10,(uint *)((int)slot + 0x1c), + (roomConfigLocal,uVar3,1,0,10,1,0,-1,1,10,(uint *)(GHIDRA_INT(slot) + 0x1c), 0xffffffff,-1); uVar3 = rng->_seed; if (uVar3 == 0) { @@ -3864,7 +3864,7 @@ void Level::generate_greed() rng->_seed = uVar3; pRStack_3b0 = RoomConfig::GetRandomRoom (roomConfigLocal,uVar3,1,0,8,1,0,-1,1,10, - (uint *)((int)pvStack_3b8 + 0x1c),0xffffffff,-1); + (uint *)(GHIDRA_INT(pvStack_3b8) + 0x1c),0xffffffff,-1); piVar11 = rng->_roomMap; for (treasureRoomType = 0x1fb; treasureRoomType != 0; treasureRoomType = treasureRoomType + -1) { *piVar11 = -1; @@ -4011,7 +4011,7 @@ void Level::generate_greed() rng->_seed = uVar3; *puVar9 = uVar3; puVar9 = puVar9 + 1; - pvStack_3b8 = (void *)((int)pvStack_3b8 + -1); + pvStack_3b8 = (void *)(GHIDRA_INT(pvStack_3b8) + -1); } while (pvStack_3b8 != (void *)0x0); pvStack_3b8 = (void *)0x0; } @@ -4032,7 +4032,7 @@ void Level::generate_greed() rng->_seed = uVar3; ((RoomDescriptor *)(aRStack_3ac))->RoomDescriptor::Init(uVar3); uStack_8 = 1; - if ((uint)((generatorRoomsCapacity - generatorRooms[0]) / 0x48) < 3) { + if (GHIDRA_UINT(((generatorRoomsCapacity - generatorRooms[0]) / 0x48)) < 3) { vector_LevelGenerator_Room_reserve(generatorRooms,3); } pvVar4 = LevelGenerator::CreateRoom((LevelGenerator *)aRStack_3ac,6,6,1,-1,-1,-1); @@ -4055,7 +4055,7 @@ void Level::generate_greed() rng->_seed = uVar3; pRVar7 = RoomConfig::GetRandomRoom (roomConfigLocal,uVar3,1,0x19,5,1,0,999,1,10, - (uint *)((int)pvStack_3b8 + 0x1c),0xffffffff,-1); + (uint *)(GHIDRA_INT(pvStack_3b8) + 0x1c),0xffffffff,-1); pRStack_3c0 = RoomConfig::GetRoomByStageTypeAndVariant(roomConfigLocal,0x19,5,1000,-1); pRVar6 = pRStack_3b0; piVar11 = rng->_roomMap; @@ -4128,7 +4128,7 @@ void Level::generate_greed() _Init_thread_footer(&g_invalidRoomDescriptorGuard); } roomDesc = &g_roomDescriptorDummy; - if ((uint)rng->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(rng->_currentDimensionIdx) < 3) { roomDesc = rng->_roomList + 0x1fc; } ((Seeds *)((Seeds *)roomDesc))->Seeds::Init3(rng); @@ -4163,7 +4163,7 @@ void Level::generate_greed() treasureRoomType = *piVar11; } roomDesc = &g_roomDescriptorDummy; - if ((uint)rng->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(rng->_currentDimensionIdx) < 3) { roomDesc = rng->_roomList + 0x1fc; } roomDesc->Data = pRStack_3b0; @@ -4176,7 +4176,7 @@ void Level::generate_greed() _Init_thread_footer(&g_invalidRoomDescriptorGuard); } roomDesc = &g_roomDescriptorDummy; - if ((uint)rng->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(rng->_currentDimensionIdx) < 3) { roomDesc = rng->_roomList + 0x200; } ((Seeds *)((Seeds *)roomDesc))->Seeds::Init3(rng); @@ -4211,7 +4211,7 @@ void Level::generate_greed() treasureRoomType = *piVar11; } roomDesc = &g_roomDescriptorDummy; - if ((uint)rng->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(rng->_currentDimensionIdx) < 3) { roomDesc = rng->_roomList + 0x200; } roomDesc->Data = pRStack_3b0; @@ -4224,7 +4224,7 @@ void Level::generate_greed() _Init_thread_footer(&g_invalidRoomDescriptorGuard); } roomDesc = &g_roomDescriptorDummy; - if ((uint)rng->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(rng->_currentDimensionIdx) < 3) { roomDesc = rng->_roomList + 0x1fe; } ((Seeds *)((Seeds *)roomDesc))->Seeds::Init3(rng); @@ -4255,7 +4255,7 @@ void Level::generate_greed() _Init_thread_footer(&g_invalidRoomDescriptorGuard); } roomDesc = &g_roomDescriptorDummy; - if ((uint)rng->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(rng->_currentDimensionIdx) < 3) { roomDesc = rng->_roomList + 0x1fe; } roomDesc->Data = pRStack_3b0; @@ -4278,7 +4278,7 @@ void Level::generate_greed() if (((g_manager->_persistentGameData)._achievements[0x9a] != 0) || (((g_manager->_state == 2 && (g_game != (Game *)0x0)) && (((g_game->_dailyChallenge)._id != 0 || (g_game->_isDebug != 0)))))) { - pvStack_3bc = (void *)((int)pvStack_3bc + 1); + pvStack_3bc = (void *)(GHIDRA_INT(pvStack_3bc) + 1); } uVar3 = rng->_seed; if (uVar3 == 0) { @@ -4304,7 +4304,7 @@ void Level::generate_greed() uVar3 = uVar3 >> 3 ^ uVar3; uVar3 = uVar3 << 3 ^ uVar3; uVar3 = uVar3 >> 0x1a ^ uVar3; - pRStack_3b0 = (RoomConfig_Room *)(uVar3 % (uint)pvStack_3bc); + pRStack_3b0 = (RoomConfig_Room *)(uVar3 % GHIDRA_UINT(pvStack_3bc)); if (uVar3 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar1 = (code *)swi(3); @@ -4315,7 +4315,7 @@ void Level::generate_greed() piVar11 = (int *)unaff_FS_OFFSET[0xb]; uVar3 = uVar3 << 3 ^ uVar3; pRStack_3b0 = (RoomConfig_Room *) - ((int)&pRStack_3b0->StageId + (uVar3 >> 0x1a ^ uVar3) % (uint)pRStack_3c0); + (GHIDRA_INT(&pRStack_3b0->StageId) + (uVar3 >> 0x1a ^ uVar3) % GHIDRA_UINT(pRStack_3c0)); if ((*(int *)(*piVar11 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { uStack_8 = 8; @@ -4325,7 +4325,7 @@ void Level::generate_greed() _Init_thread_footer(&g_invalidRoomDescriptorGuard); } roomDesc = &g_roomDescriptorDummy; - if ((uint)rng->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(rng->_currentDimensionIdx) < 3) { roomDesc = rng->_roomList + 0x207; } ((Seeds *)((Seeds *)roomDesc))->Seeds::Init3(rng); @@ -4346,7 +4346,7 @@ void Level::generate_greed() rng->_seed = uVar3; pRStack_3b0 = RoomConfig::GetRandomRoom (roomConfigLocal,uVar3,1,0,2,0xd,0,-1,1,10,(uint *)&pRStack_3c8, - (uint)pRStack_3b0,0); + GHIDRA_UINT(pRStack_3b0),0); if ((*(int *)(*piVar11 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { uStack_8 = 9; @@ -4356,7 +4356,7 @@ void Level::generate_greed() _Init_thread_footer(&g_invalidRoomDescriptorGuard); } roomDesc = &g_roomDescriptorDummy; - if ((uint)rng->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(rng->_currentDimensionIdx) < 3) { roomDesc = rng->_roomList + 0x207; } roomDesc->Data = pRStack_3b0; @@ -4383,7 +4383,7 @@ void Level::generate_greed() _Init_thread_footer(&g_invalidRoomDescriptorGuard); } roomDesc = &g_roomDescriptorDummy; - if ((uint)rng->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(rng->_currentDimensionIdx) < 3) { roomDesc = rng->_roomList + 0x20c; } ((Seeds *)((Seeds *)roomDesc))->Seeds::Init3(rng); @@ -4411,7 +4411,7 @@ void Level::generate_greed() _atexit(FUN_00b15b30); _Init_thread_footer(&g_invalidRoomDescriptorGuard); } - if ((uint)rng->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(rng->_currentDimensionIdx) < 3) { rng->_roomList[0x20c].Data = pRVar6; } else { @@ -4488,7 +4488,7 @@ void Level::generate_greed_chunk_rooms() if (1 < iVar4) { iVar7 = iVar4; } - rngResult = ((RNG *)(unaff_ESI))->RNG::RandomInt((uint)(100 / (longlong)iVar7)); + rngResult = ((RNG *)(unaff_ESI))->RNG::RandomInt(GHIDRA_UINT((100 / (longlong)iVar7))); iVar7 = extraout_ECX; if ((rngResult < 0xf) && (bVar2 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(0x52), @@ -4524,7 +4524,7 @@ void Level::generate_greed_chunk_rooms() if (1 < iVar4) { iVar7 = iVar4; } - rngResult = ((RNG *)(unaff_ESI))->RNG::RandomInt((uint)(100 / (longlong)iVar7)); + rngResult = ((RNG *)(unaff_ESI))->RNG::RandomInt(GHIDRA_UINT((100 / (longlong)iVar7))); iVar7 = extraout_ECX_02; if ((rngResult < 0xf) && (bVar2 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(0x52), @@ -4778,7 +4778,7 @@ void Level::generate_greed_chunk_rooms() _Init_thread_footer(); } roomDesc = &g_roomDescriptorDummy; - if ((uint)unaff_EBX->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(unaff_EBX->_currentDimensionIdx) < 3) { roomDesc = unaff_EBX->_roomList + 0x1fc; } ((Seeds *)((Seeds *)roomDesc))->Seeds::Init3(unaff_ESI); @@ -4816,7 +4816,7 @@ void Level::generate_greed_chunk_rooms() iVar7 = *(int *)pvVar6; } roomDesc = &g_roomDescriptorDummy; - if ((uint)unaff_EBX->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(unaff_EBX->_currentDimensionIdx) < 3) { roomDesc = unaff_EBX->_roomList + 0x1fc; } roomDesc->Data = *(void **)(unaff_EBP + -0x3ac); @@ -4829,7 +4829,7 @@ void Level::generate_greed_chunk_rooms() _Init_thread_footer(); } roomDesc = &g_roomDescriptorDummy; - if ((uint)unaff_EBX->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(unaff_EBX->_currentDimensionIdx) < 3) { roomDesc = unaff_EBX->_roomList + 0x200; } ((Seeds *)((Seeds *)roomDesc))->Seeds::Init3(unaff_ESI); @@ -4867,7 +4867,7 @@ void Level::generate_greed_chunk_rooms() iVar7 = *(int *)pvVar6; } roomDesc = &g_roomDescriptorDummy; - if ((uint)unaff_EBX->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(unaff_EBX->_currentDimensionIdx) < 3) { roomDesc = unaff_EBX->_roomList + 0x200; } roomDesc->Data = *(void **)(unaff_EBP + -0x3ac); @@ -4880,7 +4880,7 @@ void Level::generate_greed_chunk_rooms() _Init_thread_footer(); } roomDesc = &g_roomDescriptorDummy; - if ((uint)unaff_EBX->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(unaff_EBX->_currentDimensionIdx) < 3) { roomDesc = unaff_EBX->_roomList + 0x1fe; } ((Seeds *)((Seeds *)roomDesc))->Seeds::Init3(unaff_ESI); @@ -4915,7 +4915,7 @@ void Level::generate_greed_chunk_rooms() _Init_thread_footer(); } roomDesc = &g_roomDescriptorDummy; - if ((uint)unaff_EBX->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(unaff_EBX->_currentDimensionIdx) < 3) { roomDesc = unaff_EBX->_roomList + 0x1fe; } roomDesc->Data = *(void **)(unaff_EBP + -0x3ac); @@ -4995,7 +4995,7 @@ void Level::generate_greed_chunk_rooms() _Init_thread_footer(); } roomDesc = &g_roomDescriptorDummy; - if ((uint)unaff_EBX->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(unaff_EBX->_currentDimensionIdx) < 3) { roomDesc = unaff_EBX->_roomList + 0x207; } ((Seeds *)((Seeds *)roomDesc))->Seeds::Init3(unaff_ESI); @@ -5030,7 +5030,7 @@ void Level::generate_greed_chunk_rooms() _Init_thread_footer(); } roomDesc = &g_roomDescriptorDummy; - if ((uint)unaff_EBX->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(unaff_EBX->_currentDimensionIdx) < 3) { roomDesc = unaff_EBX->_roomList + 0x207; } roomDesc->Data = *(void **)(unaff_EBP + -0x3ac); @@ -5057,7 +5057,7 @@ void Level::generate_greed_chunk_rooms() _Init_thread_footer(); } roomDesc = &g_roomDescriptorDummy; - if ((uint)unaff_EBX->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(unaff_EBX->_currentDimensionIdx) < 3) { roomDesc = unaff_EBX->_roomList + 0x20c; } ((Seeds *)((Seeds *)roomDesc))->Seeds::Init3(unaff_ESI); @@ -5086,7 +5086,7 @@ void Level::generate_greed_chunk_rooms() _atexit(FUN_00b15b30); _Init_thread_footer(); } - if ((uint)unaff_EBX->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(unaff_EBX->_currentDimensionIdx) < 3) { unaff_EBX->_roomList[0x20c].Data = roomData; } else { @@ -5142,7 +5142,7 @@ void Level::generate_greed_chunk_place() _Init_thread_footer(); } roomDesc = &g_roomDescriptorDummy; - if ((uint)unaff_EBX->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(unaff_EBX->_currentDimensionIdx) < 3) { roomDesc = unaff_EBX->_roomList + 0x1fc; } ((Seeds *)((Seeds *)roomDesc))->Seeds::Init3(unaff_ESI); @@ -5180,7 +5180,7 @@ void Level::generate_greed_chunk_place() iVar4 = *(int *)pvVar1; } roomDesc = &g_roomDescriptorDummy; - if ((uint)unaff_EBX->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(unaff_EBX->_currentDimensionIdx) < 3) { roomDesc = unaff_EBX->_roomList + 0x1fc; } roomDesc->Data = *(void **)(unaff_EBP + -0x3ac); @@ -5193,7 +5193,7 @@ void Level::generate_greed_chunk_place() _Init_thread_footer(); } roomDesc = &g_roomDescriptorDummy; - if ((uint)unaff_EBX->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(unaff_EBX->_currentDimensionIdx) < 3) { roomDesc = unaff_EBX->_roomList + 0x200; } ((Seeds *)((Seeds *)roomDesc))->Seeds::Init3(unaff_ESI); @@ -5231,7 +5231,7 @@ void Level::generate_greed_chunk_place() iVar4 = *(int *)pvVar1; } roomDesc = &g_roomDescriptorDummy; - if ((uint)unaff_EBX->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(unaff_EBX->_currentDimensionIdx) < 3) { roomDesc = unaff_EBX->_roomList + 0x200; } roomDesc->Data = *(void **)(unaff_EBP + -0x3ac); @@ -5244,7 +5244,7 @@ void Level::generate_greed_chunk_place() _Init_thread_footer(); } roomDesc = &g_roomDescriptorDummy; - if ((uint)unaff_EBX->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(unaff_EBX->_currentDimensionIdx) < 3) { roomDesc = unaff_EBX->_roomList + 0x1fe; } ((Seeds *)((Seeds *)roomDesc))->Seeds::Init3(unaff_ESI); @@ -5279,7 +5279,7 @@ void Level::generate_greed_chunk_place() _Init_thread_footer(); } roomDesc = &g_roomDescriptorDummy; - if ((uint)unaff_EBX->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(unaff_EBX->_currentDimensionIdx) < 3) { roomDesc = unaff_EBX->_roomList + 0x1fe; } roomDesc->Data = *(void **)(unaff_EBP + -0x3ac); @@ -5359,7 +5359,7 @@ void Level::generate_greed_chunk_place() _Init_thread_footer(); } roomDesc = &g_roomDescriptorDummy; - if ((uint)unaff_EBX->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(unaff_EBX->_currentDimensionIdx) < 3) { roomDesc = unaff_EBX->_roomList + 0x207; } ((Seeds *)((Seeds *)roomDesc))->Seeds::Init3(unaff_ESI); @@ -5395,7 +5395,7 @@ void Level::generate_greed_chunk_place() _Init_thread_footer(); } roomDesc = &g_roomDescriptorDummy; - if ((uint)unaff_EBX->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(unaff_EBX->_currentDimensionIdx) < 3) { roomDesc = unaff_EBX->_roomList + 0x207; } roomDesc->Data = *(void **)(unaff_EBP + -0x3ac); @@ -5422,7 +5422,7 @@ void Level::generate_greed_chunk_place() _Init_thread_footer(); } roomDesc = &g_roomDescriptorDummy; - if ((uint)unaff_EBX->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(unaff_EBX->_currentDimensionIdx) < 3) { roomDesc = unaff_EBX->_roomList + 0x20c; } ((Seeds *)((Seeds *)roomDesc))->Seeds::Init3(unaff_ESI); @@ -5451,7 +5451,7 @@ void Level::generate_greed_chunk_place() _atexit(FUN_00b15b30); _Init_thread_footer(); } - if ((uint)unaff_EBX->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(unaff_EBX->_currentDimensionIdx) < 3) { unaff_EBX->_roomList[0x20c].Data = randomRoom; } else { @@ -5523,12 +5523,12 @@ void Level::Init(byte isResetLilPortalRoom) pvStack_14 = (void *)0xffffffff; puStack_18 = &LAB_00afddd5; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(neighborSet + 0x19); + local_24 = __security_cookie ^ GHIDRA_UINT((neighborSet + 0x19)); ExceptionList = &local_1c; oldGameStateFlags = g_game->_gameStateFlags; - gameStateFlagsHigh = (uint *)((int)&g_game->_gameStateFlags + 4); + gameStateFlagsHigh = (uint *)(GHIDRA_INT(&g_game->_gameStateFlags) + 4); *gameStateFlagsHigh = *gameStateFlagsHigh & 0xffffefff; - *(int *)&game->_gameStateFlags = (int)oldGameStateFlags; + *(int *)&game->_gameStateFlags = GHIDRA_INT(oldGameStateFlags); *(undefined1 *)&newSaveState[1]._roomList[7].DisplayFlags = 0; newSaveState->_levelStateFlag = newSaveState->_levelStateFlag & 0xfcffffff; level = (Game *)newSaveState; @@ -5538,7 +5538,7 @@ void Level::Init(byte isResetLilPortalRoom) if (pvVar11 != myosotisEnd) { do { invoke_pending_callbacks(pvVar11); - pvVar11 = (void *)((int)pvVar11 + 0x78); + pvVar11 = (void *)(GHIDRA_INT(pvVar11) + 0x78); } while (pvVar11 != myosotisEnd); pvVar11 = (level->_myosotisPickups)._begin; newSaveState = (Level *)level; @@ -5549,7 +5549,7 @@ void Level::Init(byte isResetLilPortalRoom) local_6c = 0x1fb; do { if ((*(int *)((char *)local_38 + -0x68) != 0) && (*(int *)((char *)local_38 + -0x38) != 0)) { - piVar9 = ((std_vector *)((int)local_38 + -4))->_begin; + piVar9 = ((std_vector *)(GHIDRA_INT(local_38) + -4))->_begin; pRVar3 = local_38; if (piVar9 != *(int **)local_38) { do { @@ -5566,7 +5566,7 @@ void Level::Init(byte isResetLilPortalRoom) else { ((EntitySaveState *)(newSaveState))->EntitySaveState::copy(piVar9); myosotisEndRef = &(((Game *)newSaveState)->_myosotisPickups)._end; - *myosotisEndRef = (void *)((int)*myosotisEndRef + 0x78); + *myosotisEndRef = (void *)(GHIDRA_INT(*myosotisEndRef) + 0x78); } } pRVar3 = local_38; @@ -5575,7 +5575,7 @@ void Level::Init(byte isResetLilPortalRoom) } while (piVar9 != *(int **)pRVar3); } } - local_38 = (RoomDescriptor *)((int)local_38 + 0xb8); + local_38 = (RoomDescriptor *)(GHIDRA_INT(local_38) + 0xb8); local_6c = local_6c + -1; } while (local_6c != 0); } @@ -5626,10 +5626,10 @@ void Level::Init(byte isResetLilPortalRoom) (((Game *)newSaveState)->_generationRNG)._shift1 = 5; (((Game *)newSaveState)->_generationRNG)._shift2 = 9; (((Game *)newSaveState)->_generationRNG)._shift3 = 7; - (((Game *)newSaveState)->_generationRNG)._seed = (int)local_3c; + (((Game *)newSaveState)->_generationRNG)._seed = GHIDRA_INT(local_3c); (((Game *)newSaveState)->_devilAngelRoomRNG)._shift1 = 1; (((Game *)newSaveState)->_devilAngelRoomRNG)._shift2 = 5; - (((Game *)newSaveState)->_devilAngelRoomRNG)._seed = (int)local_3c; + (((Game *)newSaveState)->_devilAngelRoomRNG)._seed = GHIDRA_INT(local_3c); (((Game *)newSaveState)->_devilAngelRoomRNG)._shift3 = 0x13; uVar4 = (((Game *)newSaveState)->_generationRNG)._seed; if (uVar4 == 0) { @@ -5711,11 +5711,11 @@ void Level::Init(byte isResetLilPortalRoom) local_3d = (g_manager->_persistentGameData)._achievements[0x21]; if ((local_3d != 0) || ((g_manager->_state == 2 && (((game->_dailyChallenge)._id != 0 || (game->_isDebug != 0)))))) { - local_38 = (RoomDescriptor *)((uint)(game->_difficulty != 1) * 4 + 6); + local_38 = (RoomDescriptor *)(GHIDRA_UINT((game->_difficulty != 1)) * 4 + 6); } if (((g_manager->_persistentGameData)._eventCounters[0xb] != 0) || ((game->_dailyChallenge)._id != 0)) { - local_38 = (RoomDescriptor *)((uint)(game->_difficulty != 1) * 2 + 3); + local_38 = (RoomDescriptor *)(GHIDRA_UINT((game->_difficulty != 1)) * 2 + 3); } iVar5 = ((Game *)newSaveState)->_stage; if (iVar5 == 1) { @@ -5748,7 +5748,7 @@ LAB_00744ea8: game = g_game; if ((player != (Entity_Player *)0x0) || ((g_game->_dailyChallenge)._specialDailyId == 0x12)) goto LAB_0074503d; - uVar4 = ((RNG *)(&curseRng))->RNG::RandomInt((uint)local_38); + uVar4 = ((RNG *)(&curseRng))->RNG::RandomInt(GHIDRA_UINT(local_38)); if (uVar4 != 0) goto LAB_00745005; if ((curseRng._seed == 0) && (KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"), curseRng._seed == 0)) { @@ -5757,10 +5757,10 @@ LAB_00744ea8: return; } game = g_game; - curseRng._seed = (uint)curseRng._seed >> ((byte)curseRng._shift1 & 0x1f) ^ curseRng._seed; + curseRng._seed = GHIDRA_UINT(curseRng._seed) >> ((byte)curseRng._shift1 & 0x1f) ^ curseRng._seed; curseRng._seed = curseRng._seed << ((byte)curseRng._shift2 & 0x1f) ^ curseRng._seed; - curseRng._seed = (uint)curseRng._seed >> ((byte)curseRng._shift3 & 0x1f) ^ curseRng._seed; - switch((uint)curseRng._seed % 6) { + curseRng._seed = GHIDRA_UINT(curseRng._seed) >> ((byte)curseRng._shift3 & 0x1f) ^ curseRng._seed; + switch(GHIDRA_UINT(curseRng._seed) % 6) { case 0: isLabyrinthAllowed = CanStageHaveCurseOfLabyrinth(((Game *)newSaveState)->_stage); if (isLabyrinthAllowed != '\0') { @@ -5814,19 +5814,19 @@ LAB_0074503d: if (local_3c != (RoomConfig *)0x0) { pvVar11 = (g_manager->_challengeParams)._begin; lastChallengeIdx = - (RoomConfig *)(((int)(g_manager->_challengeParams)._end - (int)pvVar11) / 0xa4 + -1); + (RoomConfig *)((GHIDRA_INT((g_manager->_challengeParams)._end) - GHIDRA_INT(pvVar11)) / 0xa4 + -1); pRVar10 = local_3c; if (lastChallengeIdx <= local_3c) { pRVar10 = lastChallengeIdx; } ((Game *)newSaveState)->_curses = - ((Game *)newSaveState)->_curses | *(uint *)((int)pRVar10 * 0xa4 + 0x84 + (int)pvVar11); + ((Game *)newSaveState)->_curses | *(uint *)(GHIDRA_INT(pRVar10) * 0xa4 + 0x84 + GHIDRA_INT(pvVar11)); game = g_game; - uVar4 = ~*(uint *)((int)pRVar10 * 0xa4 + 0x88 + (int)pvVar11) & ((Game *)newSaveState)->_curses; + uVar4 = ~*(uint *)(GHIDRA_INT(pRVar10) * 0xa4 + 0x88 + GHIDRA_INT(pvVar11)) & ((Game *)newSaveState)->_curses; ((Game *)newSaveState)->_curses = uVar4; if (game->_challenge != 0x2c) { uVar6 = ((Game *)newSaveState)->_stage & 0x80000001; - if ((int)uVar6 < 0) { + if (GHIDRA_INT(uVar6) < 0) { uVar6 = (uVar6 - 1 | 0xfffffffe) + 1; } if ((((uVar6 == 1) && (((Game *)newSaveState)->_stage < 8)) && (game->_difficulty != 2)) && @@ -5855,28 +5855,28 @@ LAB_007450e7: uVar4 = 1; } iVar5 = uVar4 * 0x2c; - if ((&(*(undefined1 *)((char *)(local_3c) + 0x0)))[(int)local_38 + iVar5 + 0x8c] == '\0') { - ((RoomConfig *)(local_3c))->RoomConfig::LoadStageBinary((uint)pRStack_48,uVar4); + if ((&(*(undefined1 *)((char *)(local_3c) + 0x0)))[GHIDRA_INT(local_38) + iVar5 + 0x8c] == '\0') { + ((RoomConfig *)(local_3c))->RoomConfig::LoadStageBinary(GHIDRA_UINT(pRStack_48),uVar4); } else { uVar4 = 0; - if (*(int *)(&(*(undefined1 *)((char *)(local_3c) + 0x0)) + (int)local_38 + iVar5 + 0x80) != 0) { + if (*(int *)(&(*(undefined1 *)((char *)(local_3c) + 0x0)) + GHIDRA_INT(local_38) + iVar5 + 0x80) != 0) { pRStack_44 = (RoomConfig *)0x0; do { uVar4 = uVar4 + 1; *(undefined4 *) - ((int)pRStack_44 + 0x34 + - *(int *)(&(*(undefined1 *)((char *)(local_3c) + 0x0)) + (int)local_38 + iVar5 + 0x7c)) = + (GHIDRA_INT(pRStack_44) + 0x34 + + *(int *)(&(*(undefined1 *)((char *)(local_3c) + 0x0)) + GHIDRA_INT(local_38) + iVar5 + 0x7c)) = *(undefined4 *) - ((int)pRStack_44 + 0x30 + - *(int *)(&(*(undefined1 *)((char *)(local_3c) + 0x0)) + (int)local_38 + iVar5 + 0x7c)); - pRStack_44 = (RoomConfig *)((int)pRStack_44 + 0x5c); - } while (uVar4 < *(uint *)(&(*(undefined1 *)((char *)(local_3c) + 0x64)) + iVar5 + (int)local_38 + 0x1c)); + (GHIDRA_INT(pRStack_44) + 0x30 + + *(int *)(&(*(undefined1 *)((char *)(local_3c) + 0x0)) + GHIDRA_INT(local_38) + iVar5 + 0x7c)); + pRStack_44 = (RoomConfig *)(GHIDRA_INT(pRStack_44) + 0x5c); + } while (uVar4 < *(uint *)(&(*(undefined1 *)((char *)(local_3c) + 0x64)) + iVar5 + GHIDRA_INT(local_38) + 0x1c)); } } } - local_38 = (RoomDescriptor *)((int)pRVar3 + 0xc4); - pRStack_48 = (RoomDescriptor *)((int)&pRStack_48->GridIndex + 1); + local_38 = (RoomDescriptor *)(GHIDRA_INT(pRVar3) + 0xc4); + pRStack_48 = (RoomDescriptor *)(GHIDRA_INT(&pRStack_48->GridIndex) + 1); } while (local_38 < 0xd05); LAB_0074526e: newSaveState = (Level *)level; @@ -5887,7 +5887,7 @@ LAB_00745271: local_3c = &g_game->_roomConfig; pRStack_44 = (RoomConfig *) RoomConfig::GetStageID(((Game *)newSaveState)->_stage,((Game *)newSaveState)->_stageType,-1); - local_38 = (RoomDescriptor *)(game->_ventricleRazorPortals + (int)pRStack_44 * 0xc4 + 0x598); + local_38 = (RoomDescriptor *)(game->_ventricleRazorPortals + GHIDRA_INT(pRStack_44) * 0xc4 + 0x598); if ((game == (Game *)0x0) || ((game->_difficulty != 2 && (game->_difficulty != 3)))) { uVar4 = 0; } @@ -5895,19 +5895,19 @@ LAB_00745271: uVar4 = 1; } pRStack_48 = (RoomDescriptor *)(uVar4 * 0x2c); - if (*(byte *)((int)&(pRStack_48->SavedEffects)._end + (int)local_38) == 0) { - ((RoomConfig *)(local_3c))->RoomConfig::LoadStageBinary((uint)pRStack_44,uVar4); + if (*(byte *)(GHIDRA_INT(&(pRStack_48->SavedEffects)._end) + GHIDRA_INT(local_38)) == 0) { + ((RoomConfig *)(local_3c))->RoomConfig::LoadStageBinary(GHIDRA_UINT(pRStack_44),uVar4); goto LAB_00745271; } - if (*(int *)((char *)local_38->_doors + (int)&pRStack_48->BossDeathSeed) != 0) { + if (*(int *)((char *)local_38->_doors + GHIDRA_INT(&pRStack_48->BossDeathSeed)) != 0) { uVar4 = 0; iVar5 = 0; do { - stageRooms = *(int *)((int)&(pRStack_48->SavedEntities)._capacity + (int)local_38); + stageRooms = *(int *)(GHIDRA_INT(&(pRStack_48->SavedEntities)._capacity) + GHIDRA_INT(local_38)); uVar4 = uVar4 + 1; *(undefined4 *)(iVar5 + 0x34 + stageRooms) = *(undefined4 *)(iVar5 + 0x30 + stageRooms); iVar5 = iVar5 + 0x5c; - } while (uVar4 < *(uint *)((char *)local_38->_doors + (int)&pRStack_48->BossDeathSeed)); + } while (uVar4 < *(uint *)((char *)local_38->_doors + GHIDRA_INT(&pRStack_48->BossDeathSeed))); goto LAB_0074526e; } } @@ -5925,19 +5925,19 @@ LAB_007452f7: uVar4 = 0; } local_3c = (RoomConfig *)(uVar4 * 0x2c); - if ((&(*(undefined1 *)((char *)(local_3c) + 0x16c0)))[(int)pRStack_44] == '\0') { + if ((&(*(undefined1 *)((char *)(local_3c) + 0x16c0)))[GHIDRA_INT(pRStack_44)] == '\0') { ((RoomConfig *)(pRStack_44))->RoomConfig::LoadStageBinary(0x1d,uVar4); } else { uVar4 = 0; - if (*(int *)(&(*(undefined1 *)((char *)(local_3c) + 0x16b4)) + (int)pRStack_44) == 0) goto LAB_0074536a; + if (*(int *)(&(*(undefined1 *)((char *)(local_3c) + 0x16b4)) + GHIDRA_INT(pRStack_44)) == 0) goto LAB_0074536a; iVar5 = 0; do { uVar4 = uVar4 + 1; - *(undefined4 *)(iVar5 + 0x34 + *(int *)(&(*(undefined1 *)((char *)(local_3c) + 0x16b0)) + (int)pRStack_44)) = - *(undefined4 *)(iVar5 + 0x30 + *(int *)(&(*(undefined1 *)((char *)(local_3c) + 0x16b0)) + (int)pRStack_44)); + *(undefined4 *)(iVar5 + 0x34 + *(int *)(&(*(undefined1 *)((char *)(local_3c) + 0x16b0)) + GHIDRA_INT(pRStack_44))) = + *(undefined4 *)(iVar5 + 0x30 + *(int *)(&(*(undefined1 *)((char *)(local_3c) + 0x16b0)) + GHIDRA_INT(pRStack_44))); iVar5 = iVar5 + 0x5c; - } while (uVar4 < *(uint *)(&(*(undefined1 *)((char *)(local_3c) + 0x16b4)) + (int)pRStack_44)); + } while (uVar4 < *(uint *)(&(*(undefined1 *)((char *)(local_3c) + 0x16b4)) + GHIDRA_INT(pRStack_44))); } game = g_game; } @@ -5962,19 +5962,19 @@ LAB_0074536a: uVar4 = 0; } pRStack_44 = (RoomConfig *)(uVar4 * 0x2c); - if ((&(*(undefined1 *)((char *)(pRStack_44) + 0x8c)))[(int)pRVar10] == '\0') { + if ((&(*(undefined1 *)((char *)(pRStack_44) + 0x8c)))[GHIDRA_INT(pRVar10)] == '\0') { ((RoomConfig *)(pRVar10))->RoomConfig::LoadStageBinary(0,uVar4); } else { uVar4 = 0; - if (*(int *)(&(*(undefined1 *)((char *)(pRStack_44) + 0x80)) + (int)pRVar10) != 0) { + if (*(int *)(&(*(undefined1 *)((char *)(pRStack_44) + 0x80)) + GHIDRA_INT(pRVar10)) != 0) { iVar5 = 0; do { iVar5 = iVar5 + 0x5c; uVar4 = uVar4 + 1; - *(undefined4 *)(*(int *)(&(*(undefined1 *)((char *)(pRStack_44) + 0x7c)) + (int)pRVar10) + -0x28 + iVar5) = - *(undefined4 *)(*(int *)(&(*(undefined1 *)((char *)(pRStack_44) + 0x7c)) + (int)pRVar10) + -0x2c + iVar5); - } while (uVar4 < *(uint *)(&(*(undefined1 *)((char *)(pRStack_44) + 0x80)) + (int)pRVar10)); + *(undefined4 *)(*(int *)(&(*(undefined1 *)((char *)(pRStack_44) + 0x7c)) + GHIDRA_INT(pRVar10)) + -0x28 + iVar5) = + *(undefined4 *)(*(int *)(&(*(undefined1 *)((char *)(pRStack_44) + 0x7c)) + GHIDRA_INT(pRVar10)) + -0x2c + iVar5); + } while (uVar4 < *(uint *)(&(*(undefined1 *)((char *)(pRStack_44) + 0x80)) + GHIDRA_INT(pRVar10))); } } currentLevel = level; @@ -6029,25 +6029,25 @@ LAB_0074536a: queueSize = 0; queueProxy = operator_new(8); queueProxy[1] = 0; - *queueProxy = (int)&queueProxy; - pvStack_14 = (void *)CONCAT31(pvStack_14._1_3_,1); + *queueProxy = GHIDRA_INT(&queueProxy); + pvStack_14 = (void *)CONCAT31((*(undefined1 *)((char *)&(pvStack_14) + 0x1)),1); pRStack_48 = (RoomDescriptor *)nearbyRooms->GridIndex; if (pRStack_48 != nearbyRooms) { do { pRVar3 = pRStack_48; - neighborRoom = GetRoomByIdx((Level *)currentLevel,(int)pRStack_48->Data,-1); + neighborRoom = GetRoomByIdx((Level *)currentLevel,GHIDRA_INT(pRStack_48->Data),-1); neighborRoom->DeliriumDistance = 1; if (((queueSize + queueOffset & 3) == 0) && (queueMapSize <= queueSize + 4U >> 2)) { std::deque<4byte>::_Growmap(queueOffset); } queueOffset = queueOffset & queueMapSize * 4 - 1; pRStack_44 = (RoomConfig *)(queueSize + queueOffset); - local_3c = (RoomConfig *)((uint)pRStack_44 >> 2 & queueMapSize - 1); - if (*(int *)(queueMap + (int)local_3c * 4) == 0) { + local_3c = (RoomConfig *)(GHIDRA_UINT(pRStack_44) >> 2 & queueMapSize - 1); + if (*(int *)(queueMap + GHIDRA_INT(local_3c) * 4) == 0) { pvVar11 = operator_new(0x10); - *(void **)(queueMap + (int)local_3c * 4) = pvVar11; + *(void **)(queueMap + GHIDRA_INT(local_3c) * 4) = pvVar11; } - *(void **)(*(int *)(queueMap + (int)local_3c * 4) + ((uint)pRStack_44 & 3) * 4) = + *(void **)(*(int *)(queueMap + GHIDRA_INT(local_3c) * 4) + (GHIDRA_UINT(pRStack_44) & 3) * 4) = pRVar3->Data; queueSize = queueSize + 1; std:: @@ -6071,9 +6071,9 @@ LAB_0074536a: (&nearbyRooms, (fuzzer_allocator_> *)&nearbyRooms, (_Tree_node *)nearbyRooms->SafeGridIndex); - pRVar3->SafeGridIndex = (int)pRVar3; - pRVar3->GridIndex = (int)pRVar3; - pRVar3->ListIndex = (int)pRVar3; + pRVar3->SafeGridIndex = GHIDRA_INT(pRVar3); + pRVar3->GridIndex = GHIDRA_INT(pRVar3); + pRVar3->ListIndex = GHIDRA_INT(pRVar3); pRVar3 = *(RoomDescriptor **)pRStack_44; uStack_50 = *(undefined4 *)&(*(undefined1 *)((char *)(pRStack_44) + 0x4)); *(RoomDescriptor **)pRStack_44 = nearbyRooms; @@ -6082,13 +6082,13 @@ LAB_0074536a: } FID_conflict__Erase_tree_>_> (neighborSet,(fuzzer_allocator_> *)neighborSet - ,*(_Tree_node **)((int)neighborSet[0] + 4)); + ,*(_Tree_node **)(GHIDRA_INT(neighborSet[0]) + 4)); operator_delete(neighborSet[0],0x14); local_38 = (RoomDescriptor *)nearbyRooms->GridIndex; if (local_38 != nearbyRooms) { do { pRVar3 = local_38; - neighborRoom = GetRoomByIdx((Level *)currentLevel,(int)local_38->Data,-1); + neighborRoom = GetRoomByIdx((Level *)currentLevel,GHIDRA_INT(local_38->Data),-1); if (neighborRoom->DeliriumDistance < 1) { neighborRoom->DeliriumDistance = pRStack_48->DeliriumDistance + 1; if (((queueSize + queueOffset & 3) == 0) && (queueMapSize <= queueSize + 4U >> 2)) { @@ -6096,12 +6096,12 @@ LAB_0074536a: } queueOffset = queueOffset & queueMapSize * 4 - 1; pRStack_44 = (RoomConfig *)(queueSize + queueOffset); - local_3c = (RoomConfig *)(queueMapSize - 1 & (uint)pRStack_44 >> 2); - if (*(int *)(queueMap + (int)local_3c * 4) == 0) { + local_3c = (RoomConfig *)(queueMapSize - 1 & GHIDRA_UINT(pRStack_44) >> 2); + if (*(int *)(queueMap + GHIDRA_INT(local_3c) * 4) == 0) { pvVar11 = operator_new(0x10); - *(void **)(queueMap + (int)local_3c * 4) = pvVar11; + *(void **)(queueMap + GHIDRA_INT(local_3c) * 4) = pvVar11; } - *(void **)(*(int *)(queueMap + (int)local_3c * 4) + ((uint)pRStack_44 & 3) * 4) = + *(void **)(*(int *)(queueMap + GHIDRA_INT(local_3c) * 4) + (GHIDRA_UINT(pRStack_44) & 3) * 4) = pRVar3->Data; queueSize = queueSize + 1; } @@ -6246,7 +6246,7 @@ std_string * Level::GetName(std_string *outName) seedEffectsEnd = pvVar1; } local_20 = (Level *)0x10; - local_1c = CONCAT31(local_1c._1_3_,pvVar1 != seedEffectsEnd); + local_1c = CONCAT31((*(undefined1 *)((char *)&(local_1c) + 0x1)),pvVar1 != seedEffectsEnd); std::set::find_node(local_14,&local_20); if (((*(char *)((char *)local_c + 0xd) == '\0') && (*(int *)((char *)local_c + 0x10) < 0x11)) && (local_c != seedEffectsEnd)) { @@ -6278,7 +6278,7 @@ std_string * Level::GetName(std_string *outName) seedEffectsEnd = pvVar1; } local_1c = 0x10; - local_18 = CONCAT31(local_18._1_3_,pvVar1 != seedEffectsEnd); + local_18 = CONCAT31((*(undefined1 *)((char *)&(local_18) + 0x1)),pvVar1 != seedEffectsEnd); std::set::find_node(local_14,&local_1c); if (((*(char *)((char *)local_c + 0xd) == '\0') && (*(int *)((char *)local_c + 0x10) < 0x11)) && (local_c != seedEffectsEnd)) { @@ -6296,7 +6296,7 @@ std_string * Level::GetName(std_string *outName) stage = local_20->_stage; isDyslexia = local_18; } - get_stage_display_name(outName,stage,stageType,curses,(int)numeral,(byte)isDyslexia,-1); + get_stage_display_name(outName,stage,stageType,curses,GHIDRA_INT(numeral),(byte)isDyslexia,-1); return outName; } @@ -6339,7 +6339,7 @@ std_string * Level::GetCurseName(std_string *outName) puStack_20 = findResult + 0x58; puStack_18 = &LAB_00afde9e; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(findResult + 0x4c); + local_24 = __security_cookie ^ GHIDRA_UINT((findResult + 0x4c)); ExceptionList = &local_1c; local_50 = outName; outNameLocal = outName; @@ -6355,7 +6355,7 @@ std_string * Level::GetCurseName(std_string *outName) curseIdx = 0; local_44 = this; puVar9 = findResult + 0x58; - if (0 < ((int)(g_game->_roomConfig)._curses._end - (int)(g_game->_roomConfig)._curses._begin) / + if (0 < (GHIDRA_INT((g_game->_roomConfig)._curses._end) - GHIDRA_INT((g_game->_roomConfig)._curses._begin)) / 0x1c) { do { puStack_20 = puVar9; @@ -6377,7 +6377,7 @@ std_string * Level::GetCurseName(std_string *outName) if (0xfff < preventedCurses) { freeBlock = *(void **)((char *)pvVar7 + -4); preventedCurses = uVar8 + 0x24; - if (0x1f < (uint)((int)pvVar7 + (-4 - (int)freeBlock))) goto LAB_00746425; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar7) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_00746425; } operator_delete(freeBlock,preventedCurses); } @@ -6400,11 +6400,11 @@ std_string * Level::GetCurseName(std_string *outName) } if (0xf < tmpString._capacity) { uVar8 = tmpString._capacity + 1; - pvVar7 = (void *)tmpString._buf._0_4_; + pvVar7 = (*(undefined4 *)((char *)&((void *)tmpString._buf) + 0x0)); if (0xfff < uVar8) { - pvVar7 = *(void **)(tmpString._buf._0_4_ + -4); + pvVar7 = *(void **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar8 = tmpString._capacity + 0x24; - if (0x1f < (uint)(tmpString._buf._0_4_ + (-4 - (int)pvVar7))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar7))))) { LAB_00746425: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -6414,12 +6414,12 @@ LAB_00746425: } tmpString._size = 0; tmpString._capacity = 0xf; - tmpString._buf._0_4_ = tmpString._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) & 0xffffff00; goto LAB_0074644d; } puVar9 = puStack_20; - } while ((int)curseIdx < - ((int)(g_game->_roomConfig)._curses._end - (int)(g_game->_roomConfig)._curses._begin) / + } while (GHIDRA_INT(curseIdx) < + (GHIDRA_INT((g_game->_roomConfig)._curses._end) - GHIDRA_INT((g_game->_roomConfig)._curses._begin)) / 0x1c); outName = outNameLocal; } @@ -6435,7 +6435,7 @@ LAB_0074644d: ((std::string *)(acStackY_108 + 0x84))->std::string::string(outName); psVar5 = string_scramble_seeded (&tmpString,in_stack_ffffff7c,in_stack_ffffff80,in_stack_ffffff84,textBuf3, - (uint)puVar9,(uint)textCapacity); + GHIDRA_UINT(puVar9),GHIDRA_UINT(textCapacity)); if (outName != psVar5) { uVar8 = outName->_capacity; if (0xf < uVar8) { @@ -6445,7 +6445,7 @@ LAB_0074644d: if (0xfff < preventedCurses) { freeBlock = *(void **)((char *)pvVar7 + -4); preventedCurses = uVar8 + 0x24; - if (0x1f < (uint)((int)pvVar7 + (-4 - (int)freeBlock))) goto LAB_0074652d; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar7) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_0074652d; } operator_delete(freeBlock,preventedCurses); } @@ -6468,11 +6468,11 @@ LAB_0074644d: } if (0xf < tmpString._capacity) { uVar8 = tmpString._capacity + 1; - pvVar7 = (void *)tmpString._buf._0_4_; + pvVar7 = (*(undefined4 *)((char *)&((void *)tmpString._buf) + 0x0)); if (0xfff < uVar8) { - pvVar7 = *(void **)(tmpString._buf._0_4_ + -4); + pvVar7 = *(void **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar8 = tmpString._capacity + 0x24; - if (0x1f < (uint)(tmpString._buf._0_4_ + (-4 - (int)pvVar7))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar7))))) { LAB_0074652d: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -6504,12 +6504,12 @@ void Level::ShowName(byte isSticky) local_8 = 0xffffffff; puStack_c = &LAB_00afdee5; local_10 = ExceptionList; - local_18 = __security_cookie ^ (int)&curseName + 0x2cU; + local_18 = __security_cookie ^ GHIDRA_INT(&curseName) + 0x2cU; ExceptionList = &local_10; GetName(this,&levelName); local_8 = 0; GetCurseName(this,&curseName); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); if (1 < *(int *)&g_game->_deathmatchManager) { deathmatchName = string_table_translate(&g_manager->_stringTable,(byte *)"#Online/DEATHMATCH_NAME"); @@ -6518,39 +6518,39 @@ void Level::ShowName(byte isSticky) ch = *textEnd; textEnd = textEnd + 1; } while (ch != 0); - ((std::string *)(levelName._buf))->std::string::assign(deathmatchName,(int)textEnd - (int)(deathmatchName + 1)); + ((std::string *)(levelName._buf))->std::string::assign(deathmatchName,GHIDRA_INT(textEnd) - GHIDRA_INT((deathmatchName + 1))); ((std::string *)(curseName._buf))->std::string::assign(&s_empty,0); } psVar1 = &curseName; if (0xf < curseName._capacity) { - psVar1 = (std_string *)curseName._buf._0_4_; + psVar1 = (*(undefined4 *)((char *)&((std_string *)curseName._buf) + 0x0)); } title = &levelName; if (0xf < levelName._capacity) { - title = (std_string *)levelName._buf._0_4_; + title = (*(undefined4 *)((char *)&((std_string *)levelName._buf) + 0x0)); } ((HUD_Message *)(&(g_game->_hud)._messageMain))->HUD_Message::Show((byte *)title,(byte *)psVar1,isSticky ^ 1, curseName._size != 0); if (0xf < curseName._capacity) { allocSize = curseName._capacity + 1; - psVar1 = (std_string *)curseName._buf._0_4_; + psVar1 = (*(undefined4 *)((char *)&((std_string *)curseName._buf) + 0x0)); if (0xfff < allocSize) { - psVar1 = (std_string *)((std_string *)(curseName._buf._0_4_ + -0x18))->_capacity; + psVar1 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(curseName._buf) + 0x0)) + -0x18))->_capacity; allocSize = curseName._capacity + 0x24; - if ((byte *)0x1f < (byte *)(curseName._buf._0_4_ + (-4 - (int)psVar1))) goto LAB_0074669a; + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(curseName._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar1)))) goto LAB_0074669a; } operator_delete(psVar1,allocSize); } curseName._size = 0; curseName._capacity = 0xf; - curseName._buf._0_4_ = curseName._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(curseName._buf) + 0x0)) = (*(undefined4 *)((char *)&(curseName._buf) + 0x0)) & 0xffffff00; if (0xf < levelName._capacity) { allocSize = levelName._capacity + 1; - psVar1 = (std_string *)levelName._buf._0_4_; + psVar1 = (*(undefined4 *)((char *)&((std_string *)levelName._buf) + 0x0)); if (0xfff < allocSize) { - psVar1 = (std_string *)((std_string *)(levelName._buf._0_4_ + -0x18))->_capacity; + psVar1 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(levelName._buf) + 0x0)) + -0x18))->_capacity; allocSize = levelName._capacity + 0x24; - if ((byte *)0x1f < (byte *)(levelName._buf._0_4_ + (-4 - (int)psVar1))) { + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(levelName._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar1)))) { LAB_0074669a: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -6956,7 +6956,7 @@ LAB_00746fe3: else { LAB_00746f09: nextStage = nextStage - 1; - if ((int)nextStage < 1) { + if (GHIDRA_INT(nextStage) < 1) { nextStage = 1; } } @@ -6981,10 +6981,10 @@ LAB_00746f09: nextStageType = 4; } } - if ((int)nextStage < 10) { - flagsHigh = *(undefined4 *)((int)&game->_gameStateFlags + 4); - *(uint *)&game->_gameStateFlags = (uint)game->_gameStateFlags & 0xfff7ffff; - *(undefined4 *)((int)&game->_gameStateFlags + 4) = flagsHigh; + if (GHIDRA_INT(nextStage) < 10) { + flagsHigh = *(undefined4 *)(GHIDRA_INT(&game->_gameStateFlags) + 4); + *(uint *)&game->_gameStateFlags = GHIDRA_UINT(game->_gameStateFlags) & 0xfff7ffff; + *(undefined4 *)(GHIDRA_INT(&game->_gameStateFlags) + 4) = flagsHigh; } else { if (nextStage == 10) { @@ -6999,7 +6999,7 @@ LAB_00746f09: bVar1 = ((Game *)(game))->Game::GetStateFlag(0x13); flagsHigh = 0; if (game->_challenge != 0x1f) { - flagsHigh = (uint)bVar1; + flagsHigh = GHIDRA_UINT(bVar1); } SetStage(this,10,flagsHigh); return; @@ -7096,7 +7096,7 @@ void Level::write_room_config(void *roomConfig, void *gameStateRoom, void *deque int slotOffset; if ((*(byte *)((char *)roomConfig + 0x4c) & 0x10) == 0) { - uVar1 = (uint)*(byte *)((char *)roomConfig + 4) << 0x10 | *(uint *)roomConfig; + uVar1 = GHIDRA_UINT(*(byte *)((char *)roomConfig + 4)) << 0x10 | *(uint *)roomConfig; *(uint *)gameStateRoom = uVar1; uVar2 = *(uint *)((char *)roomConfig + 0x4c); if ((uVar2 & 0x20) != 0) { @@ -7112,8 +7112,8 @@ void Level::write_room_config(void *roomConfig, void *gameStateRoom, void *deque } else if (deque != (void *)0x0) { *(undefined4 *)gameStateRoom = 0x80000000; - childIndexSlot = (undefined2 *)((int)gameStateRoom + 8); - childRoomConfig = (undefined4 *)((int)roomConfig + 0x50); + childIndexSlot = (undefined2 *)(GHIDRA_INT(gameStateRoom) + 8); + childRoomConfig = (undefined4 *)(GHIDRA_INT(roomConfig) + 0x50); *(undefined4 *)((char *)gameStateRoom + 4) = *(undefined4 *)((char *)roomConfig + 0x48); childrenLeft = 2; do { @@ -7170,12 +7170,12 @@ void * Level::get_room_config_from_saved_id(uint *savedId, void *mergeTable) uVar1 = savedId[1]; pRVar2 = get_room_config_from_saved_id (this,*(uint **)(*(int *)((char *)mergeTable + 4) + - ((uint)*(ushort *)((char *)savedId + 10) + + (GHIDRA_UINT(*(ushort *)((char *)savedId + 10)) + *(int *)((char *)mergeTable + 0xc) & *(int *)((char *)mergeTable + 8) - 1U) * 4),mergeTable); roomA = get_room_config_from_saved_id (this,*(uint **)(*(int *)((char *)mergeTable + 4) + - ((uint)(ushort)savedId[2] + *(int *)((char *)mergeTable + 0xc) + (GHIDRA_UINT((ushort)savedId[2]) + *(int *)((char *)mergeTable + 0xc) & *(int *)((char *)mergeTable + 8) - 1U) * 4),mergeTable); pRVar2 = RoomConfig::MergeRoomsIntoGenerated(&game->_roomConfig,roomA,pRVar2,uVar1); return pRVar2; @@ -7267,13 +7267,13 @@ void Level::RestoreGameState(GameState *gameState) portalWord = portalBit >> 5; portalBit = 1 << ((byte)portalBit & 0x1f); if ((&(*(undefined1 *)((char *)(gameState) + 0x10a)))[portalBit] == '\0') { - portalBit = *(uint *)(this->_ventricleRazorPortals + (uint)portalWord * 4 + 0x24) & ~portalBit; + portalBit = *(uint *)(this->_ventricleRazorPortals + GHIDRA_UINT(portalWord) * 4 + 0x24) & ~portalBit; } else { - portalBit = *(uint *)(this->_ventricleRazorPortals + (uint)portalWord * 4 + 0x24) | portalBit; + portalBit = *(uint *)(this->_ventricleRazorPortals + GHIDRA_UINT(portalWord) * 4 + 0x24) | portalBit; } portalBit = portalBit + 1; - *(uint *)(this->_ventricleRazorPortals + (uint)portalWord * 4 + 0x24) = portalBit; + *(uint *)(this->_ventricleRazorPortals + GHIDRA_UINT(portalWord) * 4 + 0x24) = portalBit; } while (portalBit < *(ushort *)&(*(undefined1 *)((char *)(gameState) + 0x108))); } portalBit = *(uint *)&(*(undefined1 *)((char *)(gameState) + 0x124)); @@ -7352,9 +7352,9 @@ void Level::RestoreGameState(GameState *gameState) } while (uStack_18 != 0); this->_currentRoomIndex = *(int *)&(*(undefined1 *)((char *)(gameState) + 0x19d1c)); bVar1 = (*(undefined1 *)((char *)(gameState) + 0x19d2c)); - this->_currentDimensionIdx = (uint)bVar1; - this->_currentRoomMap = this->_roomMap + (uint)bVar1 * 0xa9; - this->_lastRoomDimensionIdx = (*(undefined1 *)((char *)((uint)(byte)gameState) + 0x19d2d)); + this->_currentDimensionIdx = GHIDRA_UINT(bVar1); + this->_currentRoomMap = this->_roomMap + GHIDRA_UINT(bVar1) * 0xa9; + this->_lastRoomDimensionIdx = (*(undefined1 *)((char *)(GHIDRA_UINT((byte)gameState)) + 0x19d2d)); this->_previousRoomIndex = *(int *)&(*(undefined1 *)((char *)(gameState) + 0x19d20)); (this->_dungeonReturnPosition).x = *(float *)&(*(undefined1 *)((char *)(gameState) + 0x19d30)); (this->_dungeonReturnPosition).y = *(float *)&(*(undefined1 *)((char *)(gameState) + 0x19d34)); @@ -7425,17 +7425,17 @@ void Level::RestoreGameState(GameState *gameState) portalBit = 0; playerManager = &g_game->_playerManager; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar16 = (playerManager->_playerList)._end; - if ((int)pvVar16 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar16) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar16 = (playerManager->_playerList)._end; game = g_game; } piVar17 = (playerManager->_playerList)._begin; - if (portalBit < (uint)((int)pvVar16 - (int)piVar17 >> 2)) { + if (portalBit < GHIDRA_UINT((GHIDRA_INT(pvVar16) - GHIDRA_INT(piVar17) >> 2))) { piVar17 = piVar17 + portalBit; } iVar18 = *piVar17; @@ -7443,15 +7443,15 @@ void Level::RestoreGameState(GameState *gameState) portalBit = portalBit + 1; *(undefined1 *)(iVar18 + 0x1398) = 0; *(undefined1 *)(iVar18 + 0x139a) = 0; - } while (portalBit < (uint)((int)(game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (portalBit < GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } iVar18 = game->_startingRoomIdx; this->_previousRoomIndex = iVar18; this->_currentRoomIndex = iVar18; this->_leaveDoor = -1; load_room(this); - RoomTransition::start(&g_game->_roomTransition,(int)VStack_10.x,-1,0xf,(Entity_Player *)0x0,-1); + RoomTransition::start(&g_game->_roomTransition,GHIDRA_INT(VStack_10.x),-1,0xf,(Entity_Player *)0x0,-1); ((RoomTransition *)(&g_game->_roomTransition))->RoomTransition::Update(); roomDesc = GetRoomByIdx((Level *)g_game,g_game->_startingRoomIdx,-1); game = g_game; @@ -7501,7 +7501,7 @@ void Level::RestoreGameState(GameState *gameState) ((*(uint *)(*(int *)(*(int *)((char *)this->_room + 4) + 0x10) + 0x38 + (portalBit >> 5) * 4) & 1 << ((byte)portalBit & 0x1f)) != 0)) break; portalBit = portalBit + 1 & 0x80000007; - if ((int)portalBit < 0) { + if (GHIDRA_INT(portalBit) < 0) { portalBit = (portalBit - 1 | 0xfffffff8) + 1; } uStack_18 = uStack_18 + 1; @@ -7516,7 +7516,7 @@ void Level::RestoreGameState(GameState *gameState) VStack_10.y = (float)(iVar18 / iVar3) * 40.0 + 120.0; } portalBit = portalBit & 0x80000003; - if ((int)portalBit < 0) { + if (GHIDRA_INT(portalBit) < 0) { portalBit = (portalBit - 1 | 0xfffffffc) + 1; } switch(portalBit) { @@ -7557,7 +7557,7 @@ LAB_00747d60: } manager = g_manager; room = this->_room; - room->_brokenWatchState = (*(undefined1 *)((char *)((int)(char)gameState) + 0x19d24)); + room->_brokenWatchState = (*(undefined1 *)((char *)(GHIDRA_INT((char)gameState)) + 0x19d24)); timeScale = ((Room *)(room))->Room::time_scale_update(); (manager->_musicManager)._targetPitch = timeScale; iVar18 = *(int *)((char *)this->_room + 0x722c); @@ -7613,7 +7613,7 @@ void Level::store_game_state(GameState *state) roomBit = 0; do { (&(*(undefined1 *)((char *)(state) + 0x10a)))[roomBit] = - (*(uint *)(this->_ventricleRazorPortals + (uint)(roomBit >> 5) * 4 + 0x24) & + (*(uint *)(this->_ventricleRazorPortals + GHIDRA_UINT((roomBit >> 5)) * 4 + 0x24) & 1 << ((byte)roomBit & 0x1f)) != 0; roomBit = roomBit + 1; } while (roomBit < *(ushort *)&(*(undefined1 *)((char *)(state) + 0x108))); @@ -7662,7 +7662,7 @@ void Level::store_game_state(GameState *state) } tmpDequeProxy = operator_new(8); tmpDequeProxy[1] = 0; - *tmpDequeProxy = (int)&tmpDequeProxy; + *tmpDequeProxy = GHIDRA_INT(&tmpDequeProxy); FUN_007526b0(&(*(undefined1 *)((char *)(state) + 0x1951c))); if (tmpDequeSize != 0) { do { @@ -7689,7 +7689,7 @@ void Level::store_game_state(GameState *state) if (0xfff < size) { blockToFree = *(void **)((char *)dequeMap + -4); size = size + 0x23; - if (0x1f < (uint)((int)dequeMap + (-4 - (int)blockToFree))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(dequeMap) + (-4 - GHIDRA_INT(blockToFree))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -7713,7 +7713,7 @@ void Level::store_game_state(GameState *state) GameState::copy_room_list((RoomDescriptor *)(savedRoomEntry + -4),source); source = source + 1; *savedRoomEntry = 0; - savedRoomConfig = (void *)((int)savedRoomConfig + 0xc); + savedRoomConfig = (void *)(GHIDRA_INT(savedRoomConfig) + 0xc); savedRoomEntry = savedRoomEntry + 0x2e; roomsLeft = roomsLeft + -1; } while (roomsLeft != 0); @@ -7894,12 +7894,12 @@ LAB_0074839d: roomConfig = this->_roomList[stage].Data; newRoom = RoomConfig::GetRandomRoom (&game->_roomConfig,seed,1,0,5,*(int *)((char *)roomConfig + 0x48),0,-1,1, - 10,(uint *)((int)roomConfig + 0x38),horsemanBossId,-1); + 10,(uint *)(GHIDRA_INT(roomConfig) + 0x38),horsemanBossId,-1); game = g_game; if (newRoom != (RoomConfig_Room *)0x0) { this->_roomList[stage].Data = newRoom; removedBossBits = - (uint *)((int)(game->_bossPool)._removedBosses._begin + (horsemanBossId >> 5) * 4); + (uint *)(GHIDRA_INT((game->_bossPool)._removedBosses._begin) + (horsemanBossId >> 5) * 4); *removedBossBits = *removedBossBits | 1 << (horsemanBossId & 0x1f); if (horsemanBossId == 0x26) { removedBossBits = (game->_bossPool)._removedBosses._begin; @@ -7965,7 +7965,7 @@ int Level::QueryRoomTypeIndex(int roomType, byte isVisited, RNG *rng, byte isIgn if (0 < iVar1) { do { roomIdx[1] = 0; - if (((*(int *)((int)this->_roomList[roomIdx[0]].Data + 8) == roomType) && + if (((*(int *)(GHIDRA_INT(this->_roomList[roomIdx[0]].Data) + 8) == roomType) && (this->_roomList[roomIdx[0]].Dimension == this->_currentDimensionIdx)) && ((isIgnoreGroup != 0 || ((iVar1 = this->_roomList[roomIdx[0]].Group, iVar1 == -1 || @@ -7985,11 +7985,11 @@ int Level::QueryRoomTypeIndex(int roomType, byte isVisited, RNG *rng, byte isIgn } while (roomIdx[0] < iVar1); } roomIdx[1] = 0; - if ((int)candidatesEnd >> 2 == 0) { + if (GHIDRA_INT(candidatesEnd) >> 2 == 0) { _isVisited = 0; if (0 < iVar1) { do { - if (((*(int *)((int)this->_roomList[_isVisited].Data + 8) == 1) && + if (((*(int *)(GHIDRA_INT(this->_roomList[_isVisited].Data) + 8) == 1) && (this->_roomList[_isVisited].Dimension == this->_currentDimensionIdx)) && ((isIgnoreGroup != 0 || ((iVar1 = this->_roomList[_isVisited].Group, iVar1 == -1 || @@ -8005,11 +8005,11 @@ int Level::QueryRoomTypeIndex(int roomType, byte isVisited, RNG *rng, byte isIgn } } _isVisited = _isVisited + 1; - } while ((int)_isVisited < this->_roomCount); + } while (GHIDRA_INT(_isVisited) < this->_roomCount); } roomIdx[1] = 0; RNG::Shuffle(rng,(int *)0x0,candidatesEnd); - if ((int)candidatesEnd >> 2 == 0) { + if (GHIDRA_INT(candidatesEnd) >> 2 == 0) { iVar1 = -1; } else { @@ -8020,12 +8020,12 @@ int Level::QueryRoomTypeIndex(int roomType, byte isVisited, RNG *rng, byte isIgn RNG::Shuffle(rng,(int *)0x0,candidatesEnd); i = 0; do { - if ((uint)(this->_roomList[*(int *)(i * 4)].VisitedCount != 0) == (_isVisited & 0xff)) { + if (GHIDRA_UINT((this->_roomList[*(int *)(i * 4)].VisitedCount != 0)) == (_isVisited & 0xff)) { ExceptionList = local_10; return this->_roomList[*(int *)(i * 4)].SafeGridIndex; } i = i + 1; - } while (i < (uint)((int)candidatesEnd >> 2)); + } while (i < GHIDRA_UINT((GHIDRA_INT(candidatesEnd) >> 2))); iVar1 = this->_roomList[iRam00000000].SafeGridIndex; } ExceptionList = local_10; @@ -8045,12 +8045,12 @@ byte Level::CanOpenChallengeRoom(int roomIdx) if (roomDesc->Data == (void *)0x0) { return 0; } - if (((uint)roomDesc->Flags >> 3 & 1) == 0) { + if ((GHIDRA_UINT(roomDesc->Flags) >> 3 & 1) == 0) { if (*(int *)((char *)roomDesc->Data + 0x10) == 1) { Index = 0; isAllLowHealth = true; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 == 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 == 0) { return 1; } do { @@ -8060,8 +8060,8 @@ byte Level::CanOpenChallengeRoom(int roomIdx) isAllLowHealth = false; } Index = Index + 1; - } while (Index < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (Index < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); if (isAllLowHealth) { return 1; } @@ -8074,7 +8074,7 @@ byte Level::CanOpenChallengeRoom(int roomIdx) } LAB_00748822: if (((*(uint *)(*(int *)((char *)this->_room + 4) + 0x44) >> 10 & 1) == 0) && - (((uint)roomDesc->Flags >> 10 & 1) == 0)) { + ((GHIDRA_UINT(roomDesc->Flags) >> 10 & 1) == 0)) { return 0; } } @@ -8310,14 +8310,14 @@ void Level::RemoveCurses(uint curses) if (challengeIdx != 0) { challengeParamsBegin = (g_manager->_challengeParams)._begin; lastChallengeIdx = - ((int)(g_manager->_challengeParams)._end - (int)challengeParamsBegin) / 0xa4 - 1; + (GHIDRA_INT((g_manager->_challengeParams)._end) - GHIDRA_INT(challengeParamsBegin)) / 0xa4 - 1; if (lastChallengeIdx <= challengeIdx) { challengeIdx = lastChallengeIdx; } - newCurses = *(uint *)(challengeIdx * 0xa4 + 0x84 + (int)challengeParamsBegin) | newCurses; + newCurses = *(uint *)(challengeIdx * 0xa4 + 0x84 + GHIDRA_INT(challengeParamsBegin)) | newCurses; this->_curses = newCurses; game = g_game; - newCurses = ~*(uint *)(challengeIdx * 0xa4 + 0x88 + (int)challengeParamsBegin) & newCurses; + newCurses = ~*(uint *)(challengeIdx * 0xa4 + 0x88 + GHIDRA_INT(challengeParamsBegin)) & newCurses; this->_curses = newCurses; } uVar2 = uVar2 & ~newCurses; @@ -8328,30 +8328,30 @@ void Level::RemoveCurses(uint curses) } if ((uVar2 & 0x40) != 0) { level = this; - EntityList::QuerySublist((EntityList *)((int)this->_room + 0x1218),&pickups,5,100,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(this->_room) + 0x1218),&pickups,5,100,-1,0,0); local_8 = 0; uVar2 = 0; if (pickups._size != 0) { do { ((Entity_Pickup *)(*(Entity_Pickup **)((char *)pickups._data + uVar2 * 4)))->Entity_Pickup::UpdateSprite(0); uVar2 = uVar2 + 1; - } while (uVar2 < (uint)pickups._size); + } while (uVar2 < GHIDRA_UINT(pickups._size)); } ((HUD *)(&g_game->_hud))->HUD::InvalidateCraftingItem((Entity_Player *)0x0); - if (pickups._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(pickups) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (pickups._data != (void *)0x0) { uVar2 = *(uint *)((char *)pickups._data + -4); qVar1 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar1 < uVar2); - free((void *)((int)pickups._data + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar2)); + free((void *)(GHIDRA_INT(pickups._data) + -4)); } } } @@ -8382,7 +8382,7 @@ int Level::find_matching_room_idx(int param_1) local_8 = 0xffffffff; puStack_c = &LAB_00afdf5b; local_10 = ExceptionList; - roomCount = __security_cookie ^ (int)register0x00000010 - 4U; + roomCount = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; local_14 = roomCount; other = GetRoomByIdx(in_ECX,param_1,-1); @@ -8414,11 +8414,11 @@ int Level::find_matching_room_idx(int param_1) std::vector::_Emplace_reallocate(0,&local_d0); } else { - *roomIdxEnd = (int)local_d0; + *roomIdxEnd = GHIDRA_INT(local_d0); roomIdxEnd = roomIdxEnd + 1; } - local_d0 = (int *)((int)local_d0 + 1); - } while ((int)local_d0 < in_ECX->_roomCount); + local_d0 = (int *)(GHIDRA_INT(local_d0) + 1); + } while (GHIDRA_INT(local_d0) < in_ECX->_roomCount); } FUN_00752de0(0,roomIdxEnd,roomCount); i = 0; @@ -8429,8 +8429,8 @@ int Level::find_matching_room_idx(int param_1) if ((((((dimension != targetRoom.ListIndex) && (in_ECX->_roomList[dimension].VisitedCount != 0)) && (targetRoom.VisitedCount != 0)) && (((in_ECX->_roomList[dimension].Group == targetRoom.Group && - ((((byte)((uint)in_ECX->_roomList[dimension].Flags >> 10) ^ - (byte)((uint)targetRoom.Flags >> 10)) & 1) == 0)) && + ((((byte)(GHIDRA_UINT(in_ECX->_roomList[dimension].Flags) >> 10) ^ + (byte)(GHIDRA_UINT(targetRoom.Flags) >> 10)) & 1) == 0)) && ((dimension = in_ECX->_roomList[dimension].Dimension, dimension == targetRoom.Dimension && ((roomData = in_ECX->_roomList[dimension].Data, *(int *)((char *)roomData + 8) != 1 || (*(int *)((char *)roomData + 0x10) == 0)))))))) && @@ -8455,7 +8455,7 @@ LAB_00748fd9: (&targetRoom.RestrictedGridIndexes, (fuzzer_allocator_> *) &targetRoom.RestrictedGridIndexes, - *(_Tree_node **)((int)targetRoom.RestrictedGridIndexes._head + 4)); + *(_Tree_node **)(GHIDRA_INT(targetRoom.RestrictedGridIndexes._head) + 4)); operator_delete(targetRoom.RestrictedGridIndexes._head,0x14); std::vector::_Tidy(); FUN_00708f90(); @@ -8510,7 +8510,7 @@ byte Level::maze_swap_rooms(int roomIdx, int otherRoomIdx) undefined4 *roomGridEntry; void *roomSavedGrid; - stackCookie = __security_cookie ^ (uint)auStack_f0; + stackCookie = __security_cookie ^ GHIDRA_UINT(auStack_f0); roomDesc = GetRoomByIdx(this,roomIdx,-1); listRoom = this->_roomList + roomDesc->ListIndex; otherLookup = GetRoomByIdx(this,otherRoomIdx,-1); @@ -8529,7 +8529,7 @@ byte Level::maze_swap_rooms(int roomIdx, int otherRoomIdx) (&tmpDesc.RestrictedGridIndexes, (fuzzer_allocator_> *) &tmpDesc.RestrictedGridIndexes, - *(_Tree_node **)((int)tmpDesc.RestrictedGridIndexes._head + 4)); + *(_Tree_node **)(GHIDRA_INT(tmpDesc.RestrictedGridIndexes._head) + 4)); operator_delete(tmpDesc.RestrictedGridIndexes._head,0x14); std::vector::_Tidy(); FUN_00708f90(); @@ -8537,8 +8537,8 @@ byte Level::maze_swap_rooms(int roomIdx, int otherRoomIdx) if ((roomDesc != otherLookup) && (gridSize != &roomDesc->DisplayFlags)) { do { iVar22 = *gridSize; - *gridSize = *(int *)(((int)otherLookup - (int)roomDesc) + (int)gridSize); - *(int *)(((int)otherLookup - (int)roomDesc) + (int)gridSize) = iVar22; + *gridSize = *(int *)((GHIDRA_INT(otherLookup) - GHIDRA_INT(roomDesc)) + GHIDRA_INT(gridSize)); + *(int *)((GHIDRA_INT(otherLookup) - GHIDRA_INT(roomDesc)) + GHIDRA_INT(gridSize)) = iVar22; gridSize = gridSize + 1; } while (gridSize != &roomDesc->DisplayFlags); roomDesc = listRoom; @@ -8553,8 +8553,8 @@ byte Level::maze_swap_rooms(int roomIdx, int otherRoomIdx) iVar22 = roomDesc->ListIndex; roomDesc->ListIndex = otherLookup->ListIndex; otherLookup->ListIndex = iVar22; - roomWidth = (uint)*(byte *)((char *)roomDesc->Data + 0x46); - gridSize = (uint)*(byte *)((char *)roomDesc->Data + 0x47); + roomWidth = GHIDRA_UINT(*(byte *)((char *)roomDesc->Data + 0x46)); + gridSize = GHIDRA_UINT(*(byte *)((char *)roomDesc->Data + 0x47)); iVar22 = (gridSize + 1) * (roomWidth + 2); left0GridIdx = roomWidth * 4 + 8; right0GridIdx = roomWidth * 5 + 9; @@ -8566,11 +8566,11 @@ byte Level::maze_swap_rooms(int roomIdx, int otherRoomIdx) if (left0GridIdx < gridSize) { roomSavedGrid = (listRoom->SavedGridEntities)._begin; iVar22 = left0GridIdx * 0x20; - roomGridEntry = (undefined4 *)((int)roomSavedGrid + iVar22); + roomGridEntry = (undefined4 *)(GHIDRA_INT(roomSavedGrid) + iVar22); if ((*(int *)((char *)roomSavedGrid + iVar22) == 0x10) || (otherLookup = otherRoom, - *(int *)(iVar22 + (int)(otherRoom->SavedGridEntities)._begin) == 0x10)) { - otherGridEntry = (undefined4 *)((int)(otherRoom->SavedGridEntities)._begin + iVar22); + *(int *)(iVar22 + GHIDRA_INT((otherRoom->SavedGridEntities)._begin)) == 0x10)) { + otherGridEntry = (undefined4 *)(GHIDRA_INT((otherRoom->SavedGridEntities)._begin) + iVar22); down0GridIdx = otherGridEntry[1]; uVar2 = otherGridEntry[2]; left0GridIdx = otherGridEntry[3]; @@ -8607,7 +8607,7 @@ byte Level::maze_swap_rooms(int roomIdx, int otherRoomIdx) if ((7 < gridSize) && ((roomSavedGrid = (listRoom->SavedGridEntities)._begin, *(int *)((char *)roomSavedGrid + 0xe0) == 0x10 || - (*(int *)((int)(otherLookup->SavedGridEntities)._begin + 0xe0) == 0x10)))) { + (*(int *)(GHIDRA_INT((otherLookup->SavedGridEntities)._begin) + 0xe0) == 0x10)))) { otherSavedGrid = (otherLookup->SavedGridEntities)._begin; down0GridIdx = *(undefined4 *)((char *)roomSavedGrid + 0xe0); uVar2 = *(undefined4 *)((char *)roomSavedGrid + 0xe4); @@ -8643,10 +8643,10 @@ byte Level::maze_swap_rooms(int roomIdx, int otherRoomIdx) if (right0GridIdx < gridSize) { roomSavedGrid = (listRoom->SavedGridEntities)._begin; iVar22 = right0GridIdx * 0x20; - roomGridEntry = (undefined4 *)((int)roomSavedGrid + iVar22); + roomGridEntry = (undefined4 *)(GHIDRA_INT(roomSavedGrid) + iVar22); if ((*(int *)((char *)roomSavedGrid + iVar22) == 0x10) || - (*(int *)(iVar22 + (int)(otherLookup->SavedGridEntities)._begin) == 0x10)) { - otherGridEntry = (undefined4 *)((int)(otherLookup->SavedGridEntities)._begin + iVar22); + (*(int *)(iVar22 + GHIDRA_INT((otherLookup->SavedGridEntities)._begin)) == 0x10)) { + otherGridEntry = (undefined4 *)(GHIDRA_INT((otherLookup->SavedGridEntities)._begin) + iVar22); down0GridIdx = otherGridEntry[1]; uVar2 = otherGridEntry[2]; left0GridIdx = otherGridEntry[3]; @@ -8682,10 +8682,10 @@ byte Level::maze_swap_rooms(int roomIdx, int otherRoomIdx) if (down0GridIdx < gridSize) { roomSavedGrid = (listRoom->SavedGridEntities)._begin; iVar22 = down0GridIdx * 0x20; - roomGridEntry = (undefined4 *)((int)roomSavedGrid + iVar22); + roomGridEntry = (undefined4 *)(GHIDRA_INT(roomSavedGrid) + iVar22); if ((*(int *)((char *)roomSavedGrid + iVar22) == 0x10) || - (*(int *)(iVar22 + (int)(otherLookup->SavedGridEntities)._begin) == 0x10)) { - otherGridEntry = (undefined4 *)((int)(otherLookup->SavedGridEntities)._begin + iVar22); + (*(int *)(iVar22 + GHIDRA_INT((otherLookup->SavedGridEntities)._begin)) == 0x10)) { + otherGridEntry = (undefined4 *)(GHIDRA_INT((otherLookup->SavedGridEntities)._begin) + iVar22); down0GridIdx = otherGridEntry[1]; uVar2 = otherGridEntry[2]; left0GridIdx = otherGridEntry[3]; @@ -8721,10 +8721,10 @@ byte Level::maze_swap_rooms(int roomIdx, int otherRoomIdx) if (left1GridIdx < gridSize) { roomSavedGrid = (listRoom->SavedGridEntities)._begin; iVar22 = (roomWidth + 2) * 0x160; - roomGridEntry = (undefined4 *)((int)roomSavedGrid + iVar22); + roomGridEntry = (undefined4 *)(GHIDRA_INT(roomSavedGrid) + iVar22); if ((*(int *)((char *)roomSavedGrid + iVar22) == 0x10) || - (*(int *)(iVar22 + (int)(otherLookup->SavedGridEntities)._begin) == 0x10)) { - otherGridEntry = (undefined4 *)((int)(otherLookup->SavedGridEntities)._begin + iVar22); + (*(int *)(iVar22 + GHIDRA_INT((otherLookup->SavedGridEntities)._begin)) == 0x10)) { + otherGridEntry = (undefined4 *)(GHIDRA_INT((otherLookup->SavedGridEntities)._begin) + iVar22); down0GridIdx = otherGridEntry[1]; uVar2 = otherGridEntry[2]; left0GridIdx = otherGridEntry[3]; @@ -8760,7 +8760,7 @@ byte Level::maze_swap_rooms(int roomIdx, int otherRoomIdx) if ((0x14 < gridSize) && ((roomSavedGrid = (listRoom->SavedGridEntities)._begin, *(int *)((char *)roomSavedGrid + 0x280) == 0x10 || - (*(int *)((int)(otherLookup->SavedGridEntities)._begin + 0x280) == 0x10)))) { + (*(int *)(GHIDRA_INT((otherLookup->SavedGridEntities)._begin) + 0x280) == 0x10)))) { otherSavedGrid = (otherLookup->SavedGridEntities)._begin; down0GridIdx = *(undefined4 *)((char *)roomSavedGrid + 0x280); uVar2 = *(undefined4 *)((char *)roomSavedGrid + 0x284); @@ -8795,10 +8795,10 @@ byte Level::maze_swap_rooms(int roomIdx, int otherRoomIdx) } if (right1GridIdx < gridSize) { iVar22 = right1GridIdx * 0x20; - gridSize = (int *)(iVar22 + (int)(listRoom->SavedGridEntities)._begin); + gridSize = (int *)(iVar22 + GHIDRA_INT((listRoom->SavedGridEntities)._begin)); if ((*gridSize == 0x10) || - (*(int *)(iVar22 + (int)(otherLookup->SavedGridEntities)._begin) == 0x10)) { - otherGridEntryB = (int *)((int)(otherLookup->SavedGridEntities)._begin + iVar22); + (*(int *)(iVar22 + GHIDRA_INT((otherLookup->SavedGridEntities)._begin)) == 0x10)) { + otherGridEntryB = (int *)(GHIDRA_INT((otherLookup->SavedGridEntities)._begin) + iVar22); iVar22 = *gridSize; iVar12 = gridSize[1]; iVar13 = gridSize[2]; @@ -8833,14 +8833,14 @@ byte Level::maze_swap_rooms(int roomIdx, int otherRoomIdx) } if (down1GridIdx < gridSize) { iVar22 = down1GridIdx * 0x20; - gridSize = (int *)((int)(listRoom->SavedGridEntities)._begin + iVar22); + gridSize = (int *)(GHIDRA_INT((listRoom->SavedGridEntities)._begin) + iVar22); if ((*gridSize == 0x10) || - (*(int *)(iVar22 + (int)(otherLookup->SavedGridEntities)._begin) == 0x10)) { + (*(int *)(iVar22 + GHIDRA_INT((otherLookup->SavedGridEntities)._begin)) == 0x10)) { iVar12 = *gridSize; iVar13 = gridSize[1]; iVar14 = gridSize[2]; iVar15 = gridSize[3]; - otherGridEntryB = (int *)((int)(otherLookup->SavedGridEntities)._begin + iVar22); + otherGridEntryB = (int *)(GHIDRA_INT((otherLookup->SavedGridEntities)._begin) + iVar22); iVar22 = gridSize[4]; iVar16 = gridSize[5]; iVar17 = gridSize[6]; @@ -8942,8 +8942,8 @@ void * Level::get_rooms_within_two_doors(void *outRooms, int roomIdx) } neighbourDoorIdx = neighbourDoorIdx + 1; neighbourDoorSlot = neighbourDoorSlot + 1; - doorBit = doorBit << 1 | (uint)((int)doorBit < 0); - } while ((int)neighbourDoorSlot < 8); + doorBit = doorBit << 1 | GHIDRA_UINT((GHIDRA_INT(doorBit) < 0)); + } while (GHIDRA_INT(neighbourDoorSlot) < 8); doorBit = doorMask; uVar1 = doorSlot; } @@ -8952,8 +8952,8 @@ void * Level::get_rooms_within_two_doors(void *outRooms, int roomIdx) } doorSlot = uVar1 + 1; doorIdx = doorIdx + 1; - doorMask = doorBit << 1 | (uint)((int)doorBit < 0); - } while ((int)doorSlot < 8); + doorMask = doorBit << 1 | GHIDRA_UINT((GHIDRA_INT(doorBit) < 0)); + } while (GHIDRA_INT(doorSlot) < 8); ExceptionList = local_10; return outRooms; } @@ -9014,7 +9014,7 @@ byte Level::CanSpawnDevilRoom() } } } - uVar1 = *(uint *)((int)this->_roomList[this->_lastBossRoomListIndex].Data + 0x38); + uVar1 = *(uint *)(GHIDRA_INT(this->_roomList[this->_lastBossRoomListIndex].Data) + 0x38); uVar3 = uVar1 & 1; if ((uVar1 & 2) != 0) { uVar3 = uVar3 + 1; @@ -9089,7 +9089,7 @@ void Level::InitializeDevilAngelRoom(byte ForceAngel, byte ForceDevil) ExceptionList = &local_10; if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard, - __security_cookie ^ (int)register0x00000010 - 4U), + __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U), g_invalidRoomDescriptorGuard == -1)) { local_8 = 0; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); @@ -9098,7 +9098,7 @@ void Level::InitializeDevilAngelRoom(byte ForceAngel, byte ForceDevil) _Init_thread_footer(&g_invalidRoomDescriptorGuard); } devilRoomDesc = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { devilRoomDesc = this->_roomList + 0x1fb; } if (devilRoomDesc->Data != (void *)0x0) { @@ -9128,7 +9128,7 @@ void Level::InitializeDevilAngelRoom(byte ForceAngel, byte ForceDevil) (this->_devilAngelRoomRNG)._seed = uVar4; uVar6 = g_game->_debugCurses; iVar5 = g_game->_stage; - isAngelRoll = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + isAngelRoll = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283062e-10 < angelChance; uVar4 = this->_curses; forcedCurses = Seeds::GetForcedCurses(); @@ -9158,7 +9158,7 @@ void Level::InitializeDevilAngelRoom(byte ForceAngel, byte ForceDevil) roomType = 0xe; } bVar3 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(0xae); - roomSubtype = (uint)(bVar3 != 0); + roomSubtype = GHIDRA_UINT((bVar3 != 0)); LAB_00749b89: if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { @@ -9169,7 +9169,7 @@ LAB_00749b89: _Init_thread_footer(&g_invalidRoomDescriptorGuard); } devilRoomDesc = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { devilRoomDesc = this->_roomList + 0x1fb; } ((Seeds *)((Seeds *)devilRoomDesc))->Seeds::Init3(rng); @@ -9275,9 +9275,9 @@ LAB_00749b89: if (((uVar6 % 0x14 < _ForceAngel) && (minVariant < 100)) && (devilRoomDesc->Flags = devilRoomDesc->Flags | 0x10, (game->_dailyChallenge)._specialDailyId != 0x11)) { - flagsHigh = *(undefined4 *)((int)&game->_gameStateFlags + 4); - *(uint *)&game->_gameStateFlags = (uint)game->_gameStateFlags | 0x20000000; - *(undefined4 *)((int)&game->_gameStateFlags + 4) = flagsHigh; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&game->_gameStateFlags) + 4); + *(uint *)&game->_gameStateFlags = GHIDRA_UINT(game->_gameStateFlags) | 0x20000000; + *(undefined4 *)(GHIDRA_INT(&game->_gameStateFlags) + 4) = flagsHigh; } } ExceptionList = local_10; @@ -9368,7 +9368,7 @@ void Level::UncoverHiddenDoor(int roomIdx, int doorSlot) roomDesc = GetRoomByIdx(this,iVar2,-1); if (roomDesc->Data != (void *)0x0) { oppositeSlot = doorSlotLocal + 2U & 0x80000003; - if ((int)oppositeSlot < 0) { + if (GHIDRA_INT(oppositeSlot) < 0) { oppositeSlot = (oppositeSlot - 1 | 0xfffffffc) + 1; } iVar2 = GetTargetSlot(this,iVar2,oppositeSlot,unused); @@ -9376,7 +9376,7 @@ void Level::UncoverHiddenDoor(int roomIdx, int doorSlot) iVar2 = room_shape_get_door_grid_index (iVar2,*(byte *)((char *)pvVar1 + 0x46) + 2,*(byte *)((char *)pvVar1 + 0x47) + 2, *(int *)((char *)pvVar1 + 0x48)); - doorGridEntry = (int *)(iVar2 * 0x20 + (int)(roomDesc->SavedGridEntities)._begin); + doorGridEntry = (int *)(iVar2 * 0x20 + GHIDRA_INT((roomDesc->SavedGridEntities)._begin)); if (*doorGridEntry == 0) { *doorGridEntry = 0x10; doorGridEntry[1] = 8; @@ -9419,17 +9419,17 @@ void Level::AddCurse(uint curses, byte isShowName) local_14 = (std_string *)0xffffffff; puStack_18 = &LAB_00afe06d; local_1c = ExceptionList; - securityCookie = __security_cookie ^ (uint)(tmpCurseName + 0x11); + securityCookie = __security_cookie ^ GHIDRA_UINT((tmpCurseName + 0x11)); ExceptionList = &local_1c; this->_curses = this->_curses | curses; ppsVar1 = tmpCurseName + 0x14; if (isShowName != 0) { - curseNameSizeCapacity._0_4_ = 0; - curseNameSizeCapacity._4_4_ = 0xf; + (*(undefined4 *)((char *)&(curseNameSizeCapacity) + 0x0)) = 0; + (*(undefined4 *)((char *)&(curseNameSizeCapacity) + 0x4)) = 0xf; curseName = (std_string *)0x0; local_14 = (std_string *)0x0; - curseCount = ((int)(g_game->_roomConfig)._curses._end - - (int)(g_game->_roomConfig)._curses._begin) / 0x1c; + curseCount = (GHIDRA_INT((g_game->_roomConfig)._curses._end) - + GHIDRA_INT((g_game->_roomConfig)._curses._begin)) / 0x1c; uVar3 = 0; ppsVar1 = tmpCurseName + 0x14; if (0 < curseCount) { @@ -9443,8 +9443,8 @@ void Level::AddCurse(uint curses, byte isShowName) acStack_38 = *(char (*) [4])(psVar2->_buf + 4); acStack_34 = *(char (*) [4])(psVar2->_buf + 8); acStack_30 = *(char (*) [4])(psVar2->_buf + 0xc); - curseNameSizeCapacity._0_4_ = psVar2->_size; - curseNameSizeCapacity._4_4_ = psVar2->_capacity; + (*(undefined4 *)((char *)&(curseNameSizeCapacity) + 0x0)) = psVar2->_size; + (*(undefined4 *)((char *)&(curseNameSizeCapacity) + 0x4)) = psVar2->_capacity; psVar2->_size = 0; psVar2->_capacity = 0xf; psVar2->_buf[0] = '\0'; @@ -9455,7 +9455,7 @@ void Level::AddCurse(uint curses, byte isShowName) if (0xfff < uVar4) { in_stack_ffffff94 = (std_string *)tmpCurseName[0][-1]._capacity; uVar4 = tmpCurseNameCapacity + 0x24; - if (0x1f < (uint)((int)tmpCurseName[0] + (-4 - (int)in_stack_ffffff94))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpCurseName[0]) + (-4 - GHIDRA_INT(in_stack_ffffff94))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -9464,29 +9464,29 @@ void Level::AddCurse(uint curses, byte isShowName) } tmpCurseNameSize = 0; tmpCurseNameCapacity = 0xf; - tmpCurseName[0] = (std_string *)((uint)tmpCurseName[0] & 0xffffff00); + tmpCurseName[0] = (std_string *)(GHIDRA_UINT(tmpCurseName[0]) & 0xffffff00); in_stack_ffffff98 = uVar4; ppsVar1 = (std_string **)puStack_20; break; } uVar3 = uVar4; ppsVar1 = tmpCurseName + 0x14; - } while ((int)uVar4 < curseCount); + } while (GHIDRA_INT(uVar4) < curseCount); } puStack_20 = (undefined1 *)ppsVar1; psVar2 = (std_string *)&curseName; - if (0xf < curseNameSizeCapacity._4_4_) { + if (0xf < (*(undefined4 *)((char *)&(curseNameSizeCapacity) + 0x4))) { psVar2 = curseName; } - ((HUD *)(&g_game->_hud))->HUD::show_fortune_line((byte *)psVar2,(int)in_stack_ffffff94,in_stack_ffffff98); + ((HUD *)(&g_game->_hud))->HUD::show_fortune_line((byte *)psVar2,GHIDRA_INT(in_stack_ffffff94),in_stack_ffffff98); ppsVar1 = (std_string **)puStack_20; - if (0xf < curseNameSizeCapacity._4_4_) { - uVar3 = curseNameSizeCapacity._4_4_ + 1; + if (0xf < (*(undefined4 *)((char *)&(curseNameSizeCapacity) + 0x4))) { + uVar3 = (*(undefined4 *)((char *)&(curseNameSizeCapacity) + 0x4)) + 1; psVar2 = curseName; if (0xfff < uVar3) { psVar2 = (std_string *)curseName[-1]._capacity; - uVar3 = curseNameSizeCapacity._4_4_ + 0x24; - if ((byte *)0x1f < (byte *)((int)curseName + (-4 - (int)psVar2))) { + uVar3 = (*(undefined4 *)((char *)&(curseNameSizeCapacity) + 0x4)) + 0x24; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(curseName) + (-4 - GHIDRA_INT(psVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -9499,13 +9499,13 @@ void Level::AddCurse(uint curses, byte isShowName) game = g_game; if (g_game->_challenge != 0) { challengeParams = (g_manager->_challengeParams)._begin; - uVar4 = ((int)(g_manager->_challengeParams)._end - (int)challengeParams) / 0xa4 - 1; + uVar4 = (GHIDRA_INT((g_manager->_challengeParams)._end) - GHIDRA_INT(challengeParams)) / 0xa4 - 1; uVar3 = g_game->_challenge; - if (uVar4 <= (uint)g_game->_challenge) { + if (uVar4 <= GHIDRA_UINT(g_game->_challenge)) { uVar3 = uVar4; } - this->_curses = this->_curses | *(uint *)(uVar3 * 0xa4 + 0x84 + (int)challengeParams); - this->_curses = this->_curses & ~*(uint *)(uVar3 * 0xa4 + 0x88 + (int)challengeParams); + this->_curses = this->_curses | *(uint *)(uVar3 * 0xa4 + 0x84 + GHIDRA_INT(challengeParams)); + this->_curses = this->_curses & ~*(uint *)(uVar3 * 0xa4 + 0x88 + GHIDRA_INT(challengeParams)); } ((HUD *)(&game->_hud))->HUD::InvalidateCraftingItem((Entity_Player *)0x0); ExceptionList = local_1c; @@ -9552,7 +9552,7 @@ void Level::generate_home() local_8 = 0xffffffff; puStack_c = &LAB_00afe158; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(local_30 + 0x2c); + local_14 = __security_cookie ^ GHIDRA_UINT((local_30 + 0x2c)); ExceptionList = &local_10; seed = (roomConfig->_generationRNG)._seed; rng = &roomConfig->_generationRNG; @@ -9571,7 +9571,7 @@ void Level::generate_home() rng->_seed = seed; ((RoomDescriptor *)(generator))->RoomDescriptor::Init(seed); local_8 = 0; - if ((uint)((local_40 - local_48[0]) / 0x48) < 5) { + if (GHIDRA_UINT(((local_40 - local_48[0]) / 0x48)) < 5) { vector_LevelGenerator_Room_reserve(local_48,5); } pvVar2 = LevelGenerator::CreateRoom((LevelGenerator *)generator,6,6,4,-1,-1,-1); @@ -9598,8 +9598,8 @@ void Level::generate_home() seed = seed >> ((byte)(roomConfig->_generationRNG)._shift3 & 0x1f) ^ seed; rng->_seed = seed; data = RoomConfig::GetRandomRoom - (roomConfig,seed,1,0xd,2,1,0,-1,1,10,(uint *)((int)slot + 0x1c), - -(uint)(taintedKeeper != (Entity_Player *)0x0) & 100,-1); + (roomConfig,seed,1,0xd,2,1,0,-1,1,10,(uint *)(GHIDRA_INT(slot) + 0x1c), + -GHIDRA_UINT((taintedKeeper != (Entity_Player *)0x0)) & 100,-1); seed = rng->_seed; if (seed == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -9615,7 +9615,7 @@ void Level::generate_home() seed = seed >> ((byte)(roomConfig->_generationRNG)._shift3 & 0x1f) ^ seed; rng->_seed = seed; data_00 = RoomConfig::GetRandomRoom - (roomConfig,seed,1,0xd,4,1,0,-1,1,10,(uint *)((int)slot_00 + 0x1c),0xffffffff, + (roomConfig,seed,1,0xd,4,1,0,-1,1,10,(uint *)(GHIDRA_INT(slot_00) + 0x1c),0xffffffff, -1); seed = rng->_seed; if (seed == 0) { @@ -9632,7 +9632,7 @@ void Level::generate_home() seed = seed >> ((byte)(roomConfig->_generationRNG)._shift3 & 0x1f) ^ seed; rng->_seed = seed; data_01 = RoomConfig::GetRandomRoom - (roomConfig,seed,1,0xd,4,1,0,-1,1,10,(uint *)((int)slot_01 + 0x1c),0xffffffff, + (roomConfig,seed,1,0xd,4,1,0,-1,1,10,(uint *)(GHIDRA_INT(slot_01) + 0x1c),0xffffffff, -1); seed = rng->_seed; if (seed == 0) { @@ -9649,7 +9649,7 @@ void Level::generate_home() seed = seed >> ((byte)(roomConfig->_generationRNG)._shift3 & 0x1f) ^ seed; rng->_seed = seed; local_3b4 = RoomConfig::GetRandomRoom - (roomConfig,seed,1,0xd,5,8,0,-1,1,10,(uint *)((int)local_3b0 + 0x1c), + (roomConfig,seed,1,0xd,5,8,0,-1,1,10,(uint *)(GHIDRA_INT(local_3b0) + 0x1c), 0xffffffff,-1); piVar4 = roomConfig->_roomMap; for (iVar3 = 0x1fb; iVar3 != 0; iVar3 = iVar3 + -1) { @@ -9742,14 +9742,14 @@ void Level::generate_home() roomConfig->_lastBossRoomListIndex = *(int *)((char *)roomData + 4); if ((*(int *)(*(int *)pvVar2 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } specialRoom = &g_roomDescriptorDummy; - if ((uint)roomConfig->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(roomConfig->_currentDimensionIdx) < 3) { specialRoom = roomConfig->_roomList + 0x1fc; } ((Seeds *)((Seeds *)specialRoom))->Seeds::Init3(rng); @@ -9773,27 +9773,27 @@ void Level::generate_home() iVar3 = *(int *)pvVar2; if ((*(int *)(iVar3 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } specialRoom = &g_roomDescriptorDummy; - if ((uint)roomConfig->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(roomConfig->_currentDimensionIdx) < 3) { specialRoom = roomConfig->_roomList + 0x1fc; } specialRoom->Data = local_3b0; if ((*(int *)(iVar3 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } specialRoom = &g_roomDescriptorDummy; - if ((uint)roomConfig->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(roomConfig->_currentDimensionIdx) < 3) { specialRoom = roomConfig->_roomList + 0x200; } ((Seeds *)((Seeds *)specialRoom))->Seeds::Init3(rng); @@ -9817,27 +9817,27 @@ void Level::generate_home() iVar3 = *(int *)ThreadLocalStoragePointer; if ((*(int *)(iVar3 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } specialRoom = &g_roomDescriptorDummy; - if ((uint)roomConfig->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(roomConfig->_currentDimensionIdx) < 3) { specialRoom = roomConfig->_roomList + 0x200; } specialRoom->Data = local_3b0; if ((*(int *)(iVar3 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } specialRoom = &g_roomDescriptorDummy; - if ((uint)roomConfig->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(roomConfig->_currentDimensionIdx) < 3) { specialRoom = roomConfig->_roomList + 0x1fe; } ((Seeds *)((Seeds *)specialRoom))->Seeds::Init3(rng); @@ -9861,27 +9861,27 @@ void Level::generate_home() iVar3 = *(int *)ThreadLocalStoragePointer; if ((*(int *)(iVar3 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } specialRoom = &g_roomDescriptorDummy; - if ((uint)roomConfig->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(roomConfig->_currentDimensionIdx) < 3) { specialRoom = roomConfig->_roomList + 0x1fe; } specialRoom->Data = local_3b0; if ((*(int *)(iVar3 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } specialRoom = &g_roomDescriptorDummy; - if ((uint)roomConfig->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(roomConfig->_currentDimensionIdx) < 3) { specialRoom = roomConfig->_roomList + 0x201; } ((Seeds *)((Seeds *)specialRoom))->Seeds::Init3(rng); @@ -9905,27 +9905,27 @@ void Level::generate_home() iVar3 = *(int *)ThreadLocalStoragePointer; if ((*(int *)(iVar3 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } specialRoom = &g_roomDescriptorDummy; - if ((uint)roomConfig->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(roomConfig->_currentDimensionIdx) < 3) { specialRoom = roomConfig->_roomList + 0x201; } specialRoom->Data = local_3b0; if ((*(int *)(iVar3 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } specialRoom = &g_roomDescriptorDummy; - if ((uint)roomConfig->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(roomConfig->_currentDimensionIdx) < 3) { specialRoom = roomConfig->_roomList + 0x203; } ((Seeds *)((Seeds *)specialRoom))->Seeds::Init3(rng); @@ -9948,15 +9948,15 @@ void Level::generate_home() ; if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 10; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } manager = g_manager; specialRoom = &g_roomDescriptorDummy; - if ((uint)roomConfig->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(roomConfig->_currentDimensionIdx) < 3) { specialRoom = roomConfig->_roomList + 0x203; } specialRoom->Data = roomData; @@ -10017,14 +10017,14 @@ void Level::generate_home() piVar4 = &local_3b4->StageId; if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } specialRoom = &g_roomDescriptorDummy; - if ((uint)roomConfig->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(roomConfig->_currentDimensionIdx) < 3) { specialRoom = roomConfig->_roomList + 0x207; } ((Seeds *)((Seeds *)specialRoom))->Seeds::Init3(rng); @@ -10045,17 +10045,17 @@ void Level::generate_home() rng->_seed = nextSeed; roomData = RoomConfig::GetRandomRoom (roomConfig,nextSeed,1,0,2,0xd,0,-1,1,10,(uint *)&local_3b4, - (int)piVar4 + (seed >> 0x1a ^ seed) % local_3c0,-1); + GHIDRA_INT(piVar4) + (seed >> 0x1a ^ seed) % local_3c0,-1); if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } specialRoom = &g_roomDescriptorDummy; - if ((uint)roomConfig->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(roomConfig->_currentDimensionIdx) < 3) { specialRoom = roomConfig->_roomList + 0x207; } specialRoom->Data = roomData; @@ -10074,14 +10074,14 @@ void Level::generate_home() rng->_seed = seed >> ((byte)(roomConfig->_generationRNG)._shift3 & 0x1f) ^ seed; if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xd; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } specialRoom = &g_roomDescriptorDummy; - if ((uint)roomConfig->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(roomConfig->_currentDimensionIdx) < 3) { specialRoom = roomConfig->_roomList + 0x20c; } ((Seeds *)((Seeds *)specialRoom))->Seeds::Init3(rng); @@ -10104,12 +10104,12 @@ void Level::generate_home() (roomConfig,seed,1,0,0xf,0xd,0,-1,1,10,(uint *)&local_3b4,1,-1); if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8 = CONCAT31(local_8._1_3_,0xe); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xe); ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); _Init_thread_footer(&g_invalidRoomDescriptorGuard); } - if ((uint)roomConfig->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(roomConfig->_currentDimensionIdx) < 3) { specialRoom = roomConfig->_roomList + 0x20c; } else { @@ -10247,7 +10247,7 @@ LAB_0074b760: return 0; } isChallengeOrDaily = ((Game *)(game))->Game::IsChallengeOrDaily(); - if ((isChallengeOrDaily == '\0') || ((int)stage < challengeParams->_endStage)) { + if ((isChallengeOrDaily == '\0') || (GHIDRA_INT(stage) < challengeParams->_endStage)) { return 1; } return 0; @@ -10450,7 +10450,7 @@ RoomDescriptor * Level::get_secret_exit_room(int kind) local_14 = this; if (*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard) { _Init_thread_header(&g_invalidRoomDescriptorGuard, - __security_cookie ^ (int)register0x00000010 - 4U); + __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); if (g_invalidRoomDescriptorGuard == -1) { local_8 = 0; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); @@ -10460,7 +10460,7 @@ RoomDescriptor * Level::get_secret_exit_room(int kind) } } descriptor = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { descriptor = this->_roomList + 0x204; } if (descriptor->Data == (void *)0x0) { @@ -10513,7 +10513,7 @@ void Level::init_rotgut_dungeon_room() local_8 = 0xffffffff; puStack_c = &LAB_00afe03d; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; if ((this->_stageType == 4) || (this->_stageType == 5)) { isAltStage = true; @@ -10554,7 +10554,7 @@ void Level::init_rotgut_dungeon_room() } } roomDesc = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { roomDesc = this->_roomList + 0x208; } if (roomDesc->Data == (void *)0x0) { @@ -10567,7 +10567,7 @@ void Level::init_rotgut_dungeon_room() (*debugBreak)(); return; } - uVar2 = (uint)firstRoomRng._seed >> ((byte)firstRoomRng._shift1 & 0x1f) ^ firstRoomRng._seed; + uVar2 = GHIDRA_UINT(firstRoomRng._seed) >> ((byte)firstRoomRng._shift1 & 0x1f) ^ firstRoomRng._seed; uVar2 = uVar2 << ((byte)firstRoomRng._shift2 & 0x1f) ^ uVar2; roomConfig = RoomConfig::GetRandomRoom (local_18,uVar2 >> ((byte)firstRoomRng._shift3 & 0x1f) ^ uVar2,0,0,0x10, @@ -10584,7 +10584,7 @@ void Level::init_rotgut_dungeon_room() _Init_thread_footer(&g_invalidRoomDescriptorGuard); } } - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { roomDesc = this->_roomList + 0x209; } else { @@ -10599,7 +10599,7 @@ void Level::init_rotgut_dungeon_room() (*debugBreak)(); return; } - uVar1 = (uint)secondRoomRng._seed >> ((byte)secondRoomRng._shift1 & 0x1f) ^ secondRoomRng._seed; + uVar1 = GHIDRA_UINT(secondRoomRng._seed) >> ((byte)secondRoomRng._shift1 & 0x1f) ^ secondRoomRng._seed; uVar1 = uVar1 << ((byte)secondRoomRng._shift2 & 0x1f) ^ uVar1; roomConfig = RoomConfig::GetRandomRoom (&g_game->_roomConfig, @@ -10648,7 +10648,7 @@ int * Level::get_door_neighbor_pos(int *outPos, int *gridPos, int roomShape, uin int down1Y; uint local_c; - local_c = __security_cookie ^ (uint)auStack_84; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_84); local_74 = (uint *)*gridPos; roomY = gridPos[1]; outPosLocal = outPos; @@ -10666,17 +10666,17 @@ LAB_0074c1cf: local_80 = 2; LAB_0074c1e9: upX = local_74; - leftX = (uint *)((int)local_74 + -1); - left1X = (uint *)((int)local_74 + -1); + leftX = (uint *)(GHIDRA_INT(local_74) + -1); + left1X = (uint *)(GHIDRA_INT(local_74) + -1); downX = local_74; left1Y = roomY + 1; upY = roomY + -1; - rightX = roomWidth + (int)local_74; + rightX = roomWidth + GHIDRA_INT(local_74); up1Y = roomY + -1; right1Y = roomY + 1; - right1X = roomWidth + (int)local_74; - up1X = (int)local_74 + 1; - down1X = (int)local_74 + 1; + right1X = roomWidth + GHIDRA_INT(local_74); + up1X = GHIDRA_INT(local_74) + 1; + down1X = GHIDRA_INT(local_74) + 1; rightY = roomY; downY = local_80 + roomY; down1Y = local_80 + roomY; @@ -10778,8 +10778,8 @@ LAB_0074c1e9: else { neighborPos = g_levelGenInvalidPos; } - *outPosLocal = (int)*neighborPos; - outPosLocal[1] = (int)neighborPos[1]; + *outPosLocal = GHIDRA_INT(*neighborPos); + outPosLocal[1] = GHIDRA_INT(neighborPos[1]); return outPosLocal; } @@ -10805,7 +10805,7 @@ int Level::GetNeighborRoomIdx(int roomIdx, int doorSlot) uint local_c; void *roomData; - local_c = __security_cookie ^ (uint)&local_84; + local_c = __security_cookie ^ GHIDRA_UINT(&local_84); roomDesc = (RoomDescriptor *)0x0; roomDesc = GetRoomByIdx(this,roomIdx,-1); local_6c = (uint *)0x1; @@ -10817,7 +10817,7 @@ int Level::GetNeighborRoomIdx(int roomIdx, int doorSlot) } else { roomData = roomDesc->Data; - if ((*(uint *)((char *)roomData + ((uint)doorSlot >> 5) * 4 + 0x38) & 1 << ((byte)doorSlot & 0x1f)) + if ((*(uint *)((char *)roomData + (GHIDRA_UINT(doorSlot) >> 5) * 4 + 0x38) & 1 << ((byte)doorSlot & 0x1f)) == 0) { return -1; } @@ -10829,20 +10829,20 @@ int Level::GetNeighborRoomIdx(int roomIdx, int doorSlot) local_84 = (*(byte *)((char *)local_64 + 0x47) - uVar2 >> 1) + uVar2 >> 2; } neighborPos[1] = roomIdx / 0xd; - neighborPos[0] = (int)local_5c - 1U; - neighborPos[8] = (int)local_5c - 1U; - neighborPos[2] = (uint)local_5c; - neighborPos[6] = (uint)local_5c; + neighborPos[0] = GHIDRA_INT(local_5c) - 1U; + neighborPos[8] = GHIDRA_INT(local_5c) - 1U; + neighborPos[2] = GHIDRA_UINT(local_5c); + neighborPos[6] = GHIDRA_UINT(local_5c); neighborPos[9] = neighborPos[1] + 1; neighborPos[3] = neighborPos[1] + -1; neighborPos[7] = local_84 + neighborPos[1]; neighborPos[0xf] = local_84 + neighborPos[1]; - neighborPos[10] = (int)local_5c + 1; - neighborPos[4] = (int)local_80 + (int)local_5c; + neighborPos[10] = GHIDRA_INT(local_5c) + 1; + neighborPos[4] = GHIDRA_INT(local_80) + GHIDRA_INT(local_5c); neighborPos[0xb] = neighborPos[1] + -1; neighborPos[0xd] = neighborPos[1] + 1; - neighborPos[0xc] = (int)local_80 + (int)local_5c; - neighborPos[0xe] = (int)local_5c + 1; + neighborPos[0xc] = GHIDRA_INT(local_80) + GHIDRA_INT(local_5c); + neighborPos[0xe] = GHIDRA_INT(local_5c) + 1; neighborPos[5] = neighborPos[1]; local_84 = 0; switch(local_6c) { @@ -10919,7 +10919,7 @@ int Level::GetNeighborRoomIdx(int roomIdx, int doorSlot) FUN_00752640(&local_78); break; case (uint *)0x9: - neighborPos[0] = (uint)local_5c; + neighborPos[0] = GHIDRA_UINT(local_5c); neighborPos[3] = neighborPos[1]; break; case (uint *)0xa: @@ -10928,7 +10928,7 @@ int Level::GetNeighborRoomIdx(int roomIdx, int doorSlot) neighborPos[0xb] = neighborPos[1]; break; case (uint *)0xb: - neighborPos[8] = (uint)local_5c; + neighborPos[8] = GHIDRA_UINT(local_5c); neighborPos[9] = neighborPos[0xd]; neighborPos[7] = neighborPos[0xd]; break; @@ -10946,11 +10946,11 @@ int Level::GetNeighborRoomIdx(int roomIdx, int doorSlot) neighborPos[uVar2 * 2 + 1] = g_levelGenInvalidPos[1]; } uVar2 = uVar2 + 1; - uVar3 = uVar3 << 1 | (uint)((int)uVar3 < 0); + uVar3 = uVar3 << 1 | GHIDRA_UINT((GHIDRA_INT(uVar3) < 0)); } while (uVar2 < 8); uVar2 = neighborPos[doorSlot * 2]; uVar3 = neighborPos[doorSlot * 2 + 1]; - if (((((int)uVar2 < 0) || (0xc < (int)uVar2)) || ((int)uVar3 < 0)) || (0xc < (int)uVar3)) { + if ((((GHIDRA_INT(uVar2) < 0) || (0xc < GHIDRA_INT(uVar2))) || (GHIDRA_INT(uVar3) < 0)) || (0xc < GHIDRA_INT(uVar3))) { return -2; } if ((uVar2 < 0xd) && (uVar3 < 0xd)) { @@ -10971,7 +10971,7 @@ undefined4 Level::get_red_room_neighbor_slots(int param_1, int param_2, int *par idx = GetNeighborRoomIdx(in_ECX,param_1,param_2); iVar3 = idx % 0xd; - if ((((iVar3 < 0) || (0xc < iVar3)) || (0xc < (uint)(idx / 0xd))) || + if ((((iVar3 < 0) || (0xc < iVar3)) || (0xc < GHIDRA_UINT((idx / 0xd)))) || (pRVar2 = GetRoomByIdx(in_ECX,idx,-1), pRVar2->Data == (void *)0x0)) { if (param_3 != (int *)0x0) { *param_3 = -1; @@ -10982,7 +10982,7 @@ undefined4 Level::get_red_room_neighbor_slots(int param_1, int param_2, int *par return 1; } uVar4 = param_2 + 2U & 0x80000003; - if ((int)uVar4 < 0) { + if (GHIDRA_INT(uVar4) < 0) { uVar4 = (uVar4 - 1 | 0xfffffffc) + 1; } if ((((uVar4 == 3) || (uVar4 == 1)) && (pRVar2->GridIndex % 0xd < iVar3)) || @@ -11040,11 +11040,11 @@ LevelGenerator_Room * Level::get_door_neighbor_room(LevelGenerator_Room *outRoom do { if (!isIsolated) goto LAB_0074cd41; adjacentIdx = GetNeighborRoomIdx(this,neighborIdx,uVar2); - if (((uint)(adjacentIdx % 0xd) < 0xd) && ((uint)(adjacentIdx / 0xd) < 0xd)) { + if ((GHIDRA_UINT((adjacentIdx % 0xd)) < 0xd) && (GHIDRA_UINT((adjacentIdx / 0xd)) < 0xd)) { roomDesc = GetRoomByIdx(this,adjacentIdx,-1); if (roomDesc->Data == (void *)0x0) goto LAB_0074cce1; entrySlot = uVar2 + 2 & 0x80000003; - if ((int)entrySlot < 0) { + if (GHIDRA_INT(entrySlot) < 0) { entrySlot = (entrySlot - 1 | 0xfffffffc) + 1; } if (((entrySlot == 3) || (entrySlot == 1)) && @@ -11100,7 +11100,7 @@ byte Level::CanSpawnDoorOutline(int roomIDX, uint doorSlot) int local_48; uint local_c; - local_c = __security_cookie ^ (uint)&savedRoomIdx; + local_c = __security_cookie ^ GHIDRA_UINT(&savedRoomIdx); savedRoomIdx = roomIDX; room = GetRoomByIdx(this,roomIDX,-1); if (((((*(int *)((char *)room->Data + 8) != 5) || (room->ListIndex != g_game->_lastBossRoomListIdx)) @@ -11112,7 +11112,7 @@ byte Level::CanSpawnDoorOutline(int roomIDX, uint doorSlot) FUN_00738260(); return 0; } - if ((0 < local_48) && ((-1 < local_50 || (((uint)room->Flags >> 10 & 1) != 0)))) { + if ((0 < local_48) && ((-1 < local_50 || ((GHIDRA_UINT(room->Flags) >> 10 & 1) != 0)))) { FUN_00738260(); return 1; } @@ -11132,7 +11132,7 @@ int Level::roll_red_room_type() int local_90 [33]; uint local_c; - local_c = __security_cookie ^ (uint)local_90; + local_c = __security_cookie ^ GHIDRA_UINT(local_90); uVar3 = *in_ECX; if (uVar3 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -11181,7 +11181,7 @@ int Level::roll_red_room_type() local_90[0x1d] = 0x13; local_90[0x1e] = 7; local_90[0x1f] = 6; - while (iVar2 = uVar4 * 2, local_90[iVar2] <= (int)uVar3) { + while (iVar2 = uVar4 * 2, local_90[iVar2] <= GHIDRA_INT(uVar3)) { uVar4 = uVar4 + 1; uVar3 = uVar3 - local_90[iVar2]; if (0xf < uVar4) { @@ -11245,7 +11245,7 @@ byte Level::MakeRedRoomDoor(int roomIndex, int doorSlot) local_8 = (void *)0xffffffff; puStack_c = &LAB_00afe20d; local_10 = ExceptionList; - neighborSlot = __security_cookie ^ (uint)(local_2c + 10); + neighborSlot = __security_cookie ^ GHIDRA_UINT((local_2c + 10)); ExceptionList = &local_10; if (roomIndex < -0x13) { roomIndex = -0x14; @@ -11254,7 +11254,7 @@ byte Level::MakeRedRoomDoor(int roomIndex, int doorSlot) if (roomIndex < 0xa8) { iVar4 = roomIndex; } - if (0x7fffffff < (uint)doorSlot) { + if (0x7fffffff < GHIDRA_UINT(doorSlot)) { doorSlot = 0xffffffff; } slot = 7; @@ -11296,8 +11296,8 @@ LAB_0074d48f: roomSubtype = (RoomDescriptor *)&DAT_0000000b; LAB_0074d2a9: data = RoomConfig::GetRandomRoom - (&game->_roomConfig,neighborSlot,0,(int)pRVar3,1,iVar4,0,-1,1,maxDifficulty, - (uint *)requiredDoors,(uint)roomSubtype,-1); + (&game->_roomConfig,neighborSlot,0,GHIDRA_INT(pRVar3),1,iVar4,0,-1,1,maxDifficulty, + (uint *)requiredDoors,GHIDRA_UINT(roomSubtype),-1); unused_00 = extraout_ECX_01; if (data == (RoomConfig_Room *)0x0) { LAB_0074d2bb: @@ -11344,8 +11344,8 @@ LAB_0074d1e2: local_64 = (RoomDescriptor *)0xf; neighborSlot = ((RNG *)(&rng))->RNG::Next(); data = RoomConfig::GetRandomRoom - (roomConfig,neighborSlot,0,(int)local_60,iVar4,1,0,local_6c,minDifficultyFilter, - maxDifficultyFilter,(uint *)&local_64,(uint)subtypeFilter,-1); + (roomConfig,neighborSlot,0,GHIDRA_INT(local_60),iVar4,1,0,local_6c,minDifficultyFilter, + maxDifficultyFilter,(uint *)&local_64,GHIDRA_UINT(subtypeFilter),-1); game = g_game; unused_00 = extraout_ECX; if (data == (RoomConfig_Room *)0x0) { @@ -11354,7 +11354,7 @@ LAB_0074d1e2: neighborSlot = ((RNG *)(&rng))->RNG::Next(); data = RoomConfig::GetRandomRoom (&game->_roomConfig,neighborSlot,0,0,iVar4,1,0,local_6c,minDifficultyFilter, - maxDifficultyFilter,(uint *)&local_64,(uint)subtypeFilter,-1); + maxDifficultyFilter,(uint *)&local_64,GHIDRA_UINT(subtypeFilter),-1); game = g_game; unused_00 = extraout_ECX_00; if (data == (RoomConfig_Room *)0x0) { @@ -11380,15 +11380,15 @@ LAB_0074d1e2: local_60 = (RoomDescriptor *)GetNeighborRoomIdx(this,pRVar3->GridIndex,neighborSlot); get_red_room_neighbor_slots(pRVar3->GridIndex,neighborSlot,&local_64,&local_6c); neighborSlot = local_6c; - if (-1 < (int)local_64) { + if (-1 < GHIDRA_INT(local_64)) { if ((RoomDescriptor *)0x7 < local_64) goto LAB_0074d48f; - pRVar3->_doors[((uint)local_64 >> 5) - 1] = - pRVar3->_doors[((uint)local_64 >> 5) - 1] | 1 << ((byte)local_64 & 0x1f); + pRVar3->_doors[(GHIDRA_UINT(local_64) >> 5) - 1] = + pRVar3->_doors[(GHIDRA_UINT(local_64) >> 5) - 1] | 1 << ((byte)local_64 & 0x1f); pRVar3->AllowedDoors = pRVar3->AllowedDoors & *(uint *)((char *)pRVar3->Data + 0x38); - pRVar3->_doors[(int)local_64] = (int)local_60; + pRVar3->_doors[GHIDRA_INT(local_64)] = GHIDRA_INT(local_60); } - if ((-1 < (int)local_6c) && - (local_60 = GetRoomByIdx((Level *)level,(int)local_60,-1), local_60->Data != (void *)0x0)) + if ((-1 < GHIDRA_INT(local_6c)) && + (local_60 = GetRoomByIdx((Level *)level,GHIDRA_INT(local_60),-1), local_60->Data != (void *)0x0)) { if (7 < neighborSlot) goto LAB_0074d48f; local_60->_doors[(neighborSlot >> 5) - 1] = @@ -11406,7 +11406,7 @@ LAB_0074d412: ((Game *)((Game *)this))->Game::UpdateVisibility(); FID_conflict__Erase_tree_>_> (local_2c,(fuzzer_allocator_> *)local_2c, - *(_Tree_node **)((int)local_2c[0] + 4)); + *(_Tree_node **)(GHIDRA_INT(local_2c[0]) + 4)); operator_delete(local_2c[0],0x14); ExceptionList = local_10; return 1; @@ -11415,7 +11415,7 @@ LAB_0074d412: LAB_0074d2ca: FID_conflict__Erase_tree_>_> (local_2c,(fuzzer_allocator_> *)local_2c, - *(_Tree_node **)((int)local_2c[0] + 4)); + *(_Tree_node **)(GHIDRA_INT(local_2c[0]) + 4)); operator_delete(local_2c[0],0x14); ExceptionList = local_10; return 0; @@ -11445,7 +11445,7 @@ byte Level::prepare_blue_room(int currentRoomIdx, int targetRoomIdx, int directi local_8 = 0xffffffff; puStack_c = &LAB_00afe251; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar3 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; targetRoomIdxLocal = targetRoomIdx; if (((direction == -1) || (currentRoomIdx < 0)) || @@ -11464,7 +11464,7 @@ LAB_0074d6f3: local_8 = 0xffffffff; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } - if ((uint)blueRoom->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(blueRoom->_currentDimensionIdx) < 3) { blueRoom = blueRoom->_roomList + 0x20a; } else { @@ -11488,16 +11488,16 @@ LAB_0074d6f3: bVar2 = (*pcVar1)(); return bVar2; } - rng._seed = (uint)rng._seed >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; + rng._seed = GHIDRA_UINT(rng._seed) >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; rng._seed = rng._seed << ((byte)rng._shift2 & 0x1f) ^ rng._seed; - rng._seed = (uint)rng._seed >> ((byte)rng._shift3 & 0x1f) ^ rng._seed; - iVar5 = 7 - (uint)((rng._seed & 3U) != 0); + rng._seed = GHIDRA_UINT(rng._seed) >> ((byte)rng._shift3 & 0x1f) ^ rng._seed; + iVar5 = 7 - GHIDRA_UINT(((rng._seed & 3U) != 0)); allowedDoors = 5; } else { uVar3 = ((RNG *)(&rng))->RNG::RandomInt(4); allowedDoors = 10; - iVar5 = 5 - (uint)(uVar3 != 0); + iVar5 = 5 - GHIDRA_UINT((uVar3 != 0)); } game = g_game; uVar3 = ((RNG *)(&rng))->RNG::Next(); @@ -11563,7 +11563,7 @@ byte Level::TryInitializeExtraBossRoom(uint seed) ExceptionList = &local_10; if (*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard) { _Init_thread_header(&g_invalidRoomDescriptorGuard, - __security_cookie ^ (int)register0x00000010 - 4U); + __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); if (g_invalidRoomDescriptorGuard == -1) { local_8 = 0; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); @@ -11573,7 +11573,7 @@ byte Level::TryInitializeExtraBossRoom(uint seed) } } extraBossRoom = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { extraBossRoom = this->_roomList + 0x20b; } if (extraBossRoom->Data == (void *)0x0) { @@ -11656,7 +11656,7 @@ void Level::update_treasure_room_doors_for_trinket() std::set::insert(&scratchVec,&i); } i = i + 1; - } while ((int)i < in_ECX->_nbRooms); + } while (GHIDRA_INT(i) < in_ECX->_nbRooms); if (isAnyRoomChanged != '\0') { iVar3 = *(int *)((char *)in_ECX->_room + 8); if (((iVar3 != 7) && (iVar3 != 8)) && (iVar3 != 0x1d)) { @@ -11666,12 +11666,12 @@ void Level::update_treasure_room_doors_for_trinket() iVar3 = doorSlotOffset; i = i + 1; if (i < 9) { - pGVar1 = *(GridEntity_Door **)(doorSlotOffset + (int)in_ECX->_room); + pGVar1 = *(GridEntity_Door **)(doorSlotOffset + GHIDRA_INT(in_ECX->_room)); savedDoor = pGVar1; if (pGVar1 != (GridEntity_Door *)0x0) { if (pGVar1->_targetRoomType == 4) { uVar2 = pGVar1->_targetRoomIdx; - if (-1 < (int)uVar2) { + if (-1 < GHIDRA_INT(uVar2)) { if (uVar2 < 0x1fb) { roomMapEntry = in_ECX->_roomMap + uVar2; std::set::find_node(findResult,roomMapEntry); @@ -11705,7 +11705,7 @@ void Level::update_treasure_room_doors_for_trinket() FID_conflict__Erase_tree_>_> (&changedRoomsHead, (fuzzer_allocator_> *)&changedRoomsHead, - *(_Tree_node **)((int)changedRoomsHead + 4)); + *(_Tree_node **)(GHIDRA_INT(changedRoomsHead) + 4)); operator_delete(changedRoomsHead,0x14); ExceptionList = local_10; return; @@ -11830,7 +11830,7 @@ void Level::raise_mineshaft_rail() if (0 < railPit->_roomCount) { roomEntry = &railPit->_roomList[0].Data; do { - if ((roomEntry[-1] == (void *)0x0) && (*(int *)((int)*roomEntry + 8) == 1)) { + if ((roomEntry[-1] == (void *)0x0) && (*(int *)(GHIDRA_INT(*roomEntry) + 8) == 1)) { currentRoom = GetRoomByIdx(railPit,railPit->_currentRoomIndex,railPit->_currentDimensionIdx); pvVar3 = *roomEntry; if ((RoomDescriptor *)(roomEntry + -4) == currentRoom) { @@ -11857,9 +11857,9 @@ void Level::raise_mineshaft_rail() local_48 = piVar5 + 1; } piVar5 = local_48; - if ((*(int *)((int)((std_vector *)(roomEntry + 0x16))->_begin + + if ((*(int *)(GHIDRA_INT(((std_vector *)(roomEntry + 0x16))->_begin) + railGridIdx * 0x20) == 7) && - (*(int *)((int)((std_vector *)(roomEntry + 0x16))->_begin + + (*(int *)(GHIDRA_INT(((std_vector *)(roomEntry + 0x16))->_begin) + railGridIdx * 0x20 + 8) != 0)) { raisedRailCount = raisedRailCount + 1; } @@ -11880,16 +11880,16 @@ void Level::raise_mineshaft_rail() roomEntry = roomEntry + 0x2e; } while (roomIdx < railPit->_roomCount); if (((mineshaftRoom != (RoomDescriptor *)0x0) && (-1 < currentRoomOrdinal)) && - (currentRoomOrdinal < (int)piVar5 >> 2)) { + (currentRoomOrdinal < GHIDRA_INT(piVar5) >> 2)) { fVar6 = *(float *)(currentRoomOrdinal * 4); local_34 = (Level *)fVar6; currentRoom = GetRoomByIdx(railPit,railPit->_currentRoomIndex,railPit->_currentDimensionIdx); if (mineshaftRoom == currentRoom) { - if (0x1bf < (uint)fVar6) { + if (0x1bf < GHIDRA_UINT(fVar6)) { ExceptionList = local_10; return; } - railPit = *(GridEntity_Pit **)((char *)railPit->_room + (int)fVar6 * 4 + 0x24); + railPit = *(GridEntity_Pit **)((char *)railPit->_room + GHIDRA_INT(fVar6) * 4 + 0x24); if (railPit == (GridEntity_Pit *)0x0) { ExceptionList = local_10; return; @@ -11904,7 +11904,7 @@ void Level::raise_mineshaft_rail() } game = g_game; (railPit->_desc)._variant = (railPit->_desc)._variant & 0xffff01ffU | 0x100; - *(undefined1 *)((char *)game->_room + (int)local_34 + 0x746cU) = 1; + *(undefined1 *)((char *)game->_room + GHIDRA_INT(local_34) + 0x746cU) = 1; ((Game *)(game))->Game::ShakeScreen(0x14); manager = g_manager; local_30 = 0x254; @@ -11913,32 +11913,32 @@ void Level::raise_mineshaft_rail() uVar2 = local_30; } else { - if ((int)fVar6 < 0) { + if (GHIDRA_INT(fVar6) < 0) { ExceptionList = local_10; return; } pvVar3 = (mineshaftRoom->SavedGridEntities)._begin; - if ((int)(mineshaftRoom->SavedGridEntities)._end - (int)pvVar3 >> 5 <= (int)fVar6) { + if (GHIDRA_INT((mineshaftRoom->SavedGridEntities)._end) - GHIDRA_INT(pvVar3) >> 5 <= GHIDRA_INT(fVar6)) { ExceptionList = local_10; return; } - savedGridEntity = (undefined4 *)((int)fVar6 * 0x20 + (int)pvVar3); + savedGridEntity = (undefined4 *)(GHIDRA_INT(fVar6) * 0x20 + GHIDRA_INT(pvVar3)); *savedGridEntity = 7; savedGridEntity[2] = 2; savedGridEntity[1] = 0x100; *(undefined1 *)(savedGridEntity + 6) = 0; savedGridEntity[3] = 0; currentRoom = GetRoomByIdx(railPit,railPit->_currentRoomIndex,railPit->_currentDimensionIdx); - local_40._4_4_ = 2; - local_40._8_4_ = 0xf; - local_40._0_4_ = currentRoom->SpawnSeed; + (*(undefined4 *)((char *)&(local_40) + 0x4)) = 2; + (*(undefined4 *)((char *)&(local_40) + 0x8)) = 0xf; + (*(undefined4 *)((char *)&(local_40) + 0x0)) = currentRoom->SpawnSeed; local_34 = (Level *)0x19; uVar2 = ((RNG *)((RNG *)local_40))->RNG::Next(); savedGridEntity[4] = uVar2; currentRoom = GetRoomByIdx(railPit,railPit->_currentRoomIndex,railPit->_currentDimensionIdx); - local_40._4_4_ = 2; - local_40._8_4_ = 0x15; - local_40._0_4_ = currentRoom->SpawnSeed; + (*(undefined4 *)((char *)&(local_40) + 0x4)) = 2; + (*(undefined4 *)((char *)&(local_40) + 0x8)) = 0x15; + (*(undefined4 *)((char *)&(local_40) + 0x0)) = currentRoom->SpawnSeed; local_34 = (Level *)0x9; uVar2 = ((RNG *)((RNG *)local_40))->RNG::Next(); game = g_game; @@ -11949,18 +11949,18 @@ void Level::raise_mineshaft_rail() local_34 = (Level *)mineshaftRoom->GridIndex; fVar6 = 0.0; if (-1 < iVar4) { - local_40._8_4_ = - (float)(((iVar4 / 0xd - (int)local_34 / 0xd) * 0xd - iVar4) + (int)local_34); - local_34 = (Level *)(float)((int)local_34 / 0xd - iVar4 / 0xd); + (*(undefined4 *)((char *)&(local_40) + 0x8)) = + (float)(((iVar4 / 0xd - GHIDRA_INT(local_34) / 0xd) * 0xd - iVar4) + GHIDRA_INT(local_34)); + local_34 = (Level *)(float)(GHIDRA_INT(local_34) / 0xd - iVar4 / 0xd); ((Vector *)((Vector *)(local_40 + 8)))->Vector::Normalize(); - fVar6 = (float)local_40._8_4_; + fVar6 = (*(undefined4 *)((char *)&((float)local_40) + 0x8)); } uVar2 = 0x255; manager = g_manager; } iVar4 = 0x3f800000; ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(uVar2,1.5,2,0,1.0,fVar6); - if (raisedRailCount + 1 == (int)piVar5 >> 2) { + if (raisedRailCount + 1 == GHIDRA_INT(piVar5) >> 2) { ((Music *)((Music *)&g_manager->_musicManager))->Music::PlayJingle(0x55,iVar4,SUB41(fVar6,0)); } } @@ -12074,7 +12074,7 @@ void Level::generate_mirror_world() local_8 = 0xffffffff; puStack_c = &LAB_00afe3bd; local_10 = ExceptionList; - securityCookie = __security_cookie ^ (uint)(slot + 0x58); + securityCookie = __security_cookie ^ GHIDRA_UINT((slot + 0x58)); ExceptionList = &local_10; this->_currentDimensionIdx = 1; this->_currentRoomMap = this->_roomMap + 0xa9; @@ -12110,9 +12110,9 @@ LAB_0074f17b: uVar2 = uVar2 >> 2 ^ uVar2; uVar2 = uVar2 << 7 ^ uVar2; local_64 = RoomConfig::GetRandomRoomWithFallbackStage - (roomConfig,uVar2 >> 7 ^ uVar2,0,(int)local_64,0x1b,4,roomShape, + (roomConfig,uVar2 >> 7 ^ uVar2,0,GHIDRA_INT(local_64),0x1b,4,roomShape, in_stack_ffffff48,in_stack_ffffff4c,1,10, - (uint *)((int)srcRoomData + 0x38),0x22,7); + (uint *)(GHIDRA_INT(srcRoomData) + 0x38),0x22,7); isTreasureReplaced = true; } gridY = ((RoomDescriptor *)(srcDecorationSeed + -0x16))->GridIndex / 0xd; @@ -12150,7 +12150,7 @@ LAB_0074f17b: local_8 = 0xffffffff; FID_conflict__Erase_tree_>_> (&local_2c,(fuzzer_allocator_> *)&local_2c, - *(_Tree_node **)((int)local_2c + 4)); + *(_Tree_node **)(GHIDRA_INT(local_2c) + 4)); operator_delete(local_2c,0x14); srcDecorationSeed = srcDecorationSeed + 0x2e; roomsLeft = roomsLeft + -1; @@ -12192,7 +12192,7 @@ void Level::generate_mineshaft() local_8 = (void *)0xffffffff; puStack_c = &LAB_00afe400; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(genRooms + 0xc); + local_14 = __security_cookie ^ GHIDRA_UINT((genRooms + 0xc)); ExceptionList = &local_10; this->_currentDimensionIdx = 1; this->_currentRoomMap = this->_roomMap + 0xa9; @@ -12213,7 +12213,7 @@ void Level::generate_mineshaft() (this->_generationRNG)._seed = uVar1; ((RoomDescriptor *)(generator))->RoomDescriptor::Init(uVar1); local_8 = (void *)0x0; - if ((uint)((local_60 - local_68[0]) / 0x48) < 8) { + if (GHIDRA_UINT(((local_60 - local_68[0]) / 0x48)) < 8) { vector_LevelGenerator_Room_reserve(local_68,8); } roomConfig = &g_game->_roomConfig; @@ -12257,7 +12257,7 @@ void Level::generate_mineshaft() (this->_generationRNG)._seed = roomSeed; pvVar2 = RoomConfig::GetRandomRoomWithFallbackStage (roomConfig,roomSeed,1,stage,0x1d,1,roomShape,minVariant,maxVariant,0,0, - (uint *)((int)pvVar2 + 0x1c),roomSeed,mode); + (uint *)(GHIDRA_INT(pvVar2) + 0x1c),roomSeed,mode); roomSeed = (this->_generationRNG)._seed; if (roomSeed == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -12334,16 +12334,16 @@ int Level::GetRoomStageType(int roomIdx) if (4.999 <= secondBucket) { secondBucket = 4.999; } - return *(int *)(&DAT_00b6a878 + ((int)firstBucket * 5 + (int)secondBucket) * 4); + return *(int *)(&DAT_00b6a878 + (GHIDRA_INT(firstBucket) * 5 + GHIDRA_INT(secondBucket)) * 4); } if ((iVar2 == 7) || (iVar2 == 8)) { iVar2 = this->_roomList[this->_lastBossRoomListIndex].GridIndex; bossRow = iVar2 / 0xd; rowDelta = bossRow - roomIdx / 0xd; columnDelta = ((roomIdx / 0xd - bossRow) * 0xd - roomIdx) + iVar2; - columnSign = (int)columnDelta >> 0x1f; - rowSign = (int)rowDelta >> 0x1f; - if ((int)(((columnDelta ^ columnSign) - columnSign) + ((rowDelta ^ rowSign) - rowSign)) < 4) + columnSign = GHIDRA_INT(columnDelta) >> 0x1f; + rowSign = GHIDRA_INT(rowDelta) >> 0x1f; + if (GHIDRA_INT((((columnDelta ^ columnSign) - columnSign) + ((rowDelta ^ rowSign) - rowSign))) < 4) { return 4; } @@ -12361,7 +12361,7 @@ int Level::GetRoomStageType(int roomIdx) if (4.999 <= secondBucket) { secondBucket = 4.999; } - return *(int *)(&DAT_00b6a8e0 + ((int)firstBucket * 5 + (int)secondBucket) * 4); + return *(int *)(&DAT_00b6a8e0 + (GHIDRA_INT(firstBucket) * 5 + GHIDRA_INT(secondBucket)) * 4); } } } @@ -12395,7 +12395,7 @@ void Level::InitStageSeeds() float noiseNorm; game = g_game; - local_8 = (float)(__security_cookie ^ (uint)(noiseGrid + 0xac)); + local_8 = (float)(__security_cookie ^ GHIDRA_UINT((noiseGrid + 0xac))); if ((this->_stageType == 4) || (this->_stageType == 5)) { isAltPath = true; } @@ -12435,12 +12435,12 @@ void Level::InitStageSeeds() row4Base = row4Base << 5 ^ row4Base; row4Base = row4Base >> 0xf ^ row4Base; noiseGrid[uVar3] = - (float)((double)(int)row4Base + __uint_to_double_fixup[-((int)row4Base >> 0x1f)]) * + (float)((double)GHIDRA_INT(row4Base) + __uint_to_double_fixup[-(GHIDRA_INT(row4Base) >> 0x1f)]) * 2.3283062e-10; uVar3 = uVar3 + 1; } while (uVar3 < 0xa9); uVar3 = 0; - iVar4 = (int)noiseGrid - (int)columnDst; + iVar4 = GHIDRA_INT(noiseGrid) - GHIDRA_INT(columnDst); do { col2Base = uVar3 & 0xfffffffe; row = 0; @@ -12448,19 +12448,19 @@ void Level::InitStageSeeds() cellDst = columnDst; do { row2Base = row & 0xfffffffe; - fVar8 = (float)(int)(uVar3 - col2Base) * 0.5; - iVar5 = ((int)(row2Base + 2) % 0xd) * 0xd; - iVar2 = (int)(col2Base + 2) % 0xd; - fVar7 = (float)(int)(row - row2Base) * 0.5; + fVar8 = (float)GHIDRA_INT((uVar3 - col2Base)) * 0.5; + iVar5 = (GHIDRA_INT((row2Base + 2)) % 0xd) * 0xd; + iVar2 = GHIDRA_INT((col2Base + 2)) % 0xd; + fVar7 = (float)GHIDRA_INT((row - row2Base)) * 0.5; row4Base = row & 0xfffffffc; octave2 = (fVar8 * noiseGrid[iVar2 + row2Base * 0xd] + (1.0 - fVar8) * noiseGrid[row2Base * 0xd + col2Base]) * (1.0 - fVar7) + (fVar8 * noiseGrid[iVar2 + iVar5] + (1.0 - fVar8) * noiseGrid[iVar5 + col2Base]) * fVar7; - iVar5 = ((int)(row4Base + 4) % 0xd) * 0xd; - iVar2 = (int)(uVar1 + 4) % 0xd; - fVar8 = (float)(int)(uVar3 - uVar1) * 0.25; - fVar7 = (float)(int)(row - row4Base) * 0.25; + iVar5 = (GHIDRA_INT((row4Base + 4)) % 0xd) * 0xd; + iVar2 = GHIDRA_INT((uVar1 + 4)) % 0xd; + fVar8 = (float)GHIDRA_INT((uVar3 - uVar1)) * 0.25; + fVar7 = (float)GHIDRA_INT((row - row4Base)) * 0.25; row = row + 1; *cellDst = noiseNorm * (((fVar8 * noiseGrid[iVar2 + row4Base * 0xd] + @@ -12468,10 +12468,10 @@ void Level::InitStageSeeds() ((1.0 - fVar8) * noiseGrid[uVar1 + iVar5] + fVar8 * noiseGrid[iVar2 + iVar5]) * fVar7) * 4.0 + octave2 + octave2 + *(float *)((char *)cellDst + iVar4) + 0.0); cellDst = cellDst + 0xd; - } while ((int)row < 0xd); + } while (GHIDRA_INT(row) < 0xd); uVar3 = uVar3 + 1; columnDst = columnDst + 1; - } while ((int)uVar3 < 0xd); + } while (GHIDRA_INT(uVar3) < 0xd); mapIndex = mapIndex + 1; } while (mapIndex < 2); return; @@ -12557,7 +12557,7 @@ byte Level::try_place_random_room(LevelGenerator *generator, int unusedA, int un ehState = (void *)0xffffffff; puStack_c = &LAB_00afe469; savedExceptionList = ExceptionList; - stackCookie = __security_cookie ^ (uint)(local_78 + 0x1d); + stackCookie = __security_cookie ^ GHIDRA_UINT((local_78 + 0x1d)); ExceptionList = &savedExceptionList; roomConfig = &g_game->_roomConfig; levelGen = generator; @@ -12591,7 +12591,7 @@ byte Level::try_place_random_room(LevelGenerator *generator, int unusedA, int un if ((step == 2) || (step == 3)) { local_448 = g_game; pvVar5 = (g_manager->_itemConfig)._trinkets._begin; - if (((int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar5 >> 2 < 0x70) || + if ((GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar5) >> 2 < 0x70) || ((iVar4 = *(int *)((char *)pvVar5 + 0x1bc), iVar4 == 0 || (isCheckBackupPlayer = '\x01', (*(uint *)(iVar4 + 0xb8) & 0x80000000) == 0)))) { isCheckBackupPlayer = '\0'; @@ -12626,7 +12626,7 @@ LAB_0074fda5: if (step != 4) goto LAB_0074fe6b; local_448 = g_game; pvVar5 = (g_manager->_itemConfig)._trinkets._begin; - if ((((int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar5 >> 2 < 0x6f) || + if (((GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar5) >> 2 < 0x6f) || (iVar4 = *(int *)((char *)pvVar5 + 0x1b8), iVar4 == 0)) || (isCheckBackupPlayer = '\x01', (*(uint *)(iVar4 + 0xb8) & 0x80000000) == 0)) { isCheckBackupPlayer = '\0'; @@ -12738,7 +12738,7 @@ LAB_0074fe6b: stageId = stageId >> ((byte)(this->_generationRNG)._shift3 & 0x1f) ^ stageId; } else { - iVar4 = GetRoomStageType(this,(int)local_448 * 0xd + gridCol); + iVar4 = GetRoomStageType(this,GHIDRA_INT(local_448) * 0xd + gridCol); iVar4 = ((BossPool *)(&pGVar3->_bossPool))->BossPool::GetBossId(this->_stage,iVar4,rng); stageId = (this->_generationRNG)._seed; if (stageId == 0) { @@ -12760,7 +12760,7 @@ LAB_0074fe6b: stageId = gridCol; } else { - iVar4 = (int)local_448 * 0xd + stageId; + iVar4 = GHIDRA_INT(local_448) * 0xd + stageId; if (step < 4) { local_44c = (void *)0x0; uVar8 = GetRoomStageType(this,iVar4); @@ -12810,15 +12810,15 @@ LAB_0074fe6b: } pvVar5 = local_44c; room = LevelGenerator_Room::constructor - (generatorRoom,stageId,(uint)local_448,*(uint *)((char *)local_44c + 0x48)); - ehState._0_1_ = 1; + (generatorRoom,stageId,GHIDRA_UINT(local_448),*(uint *)((char *)local_44c + 0x48)); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; bVar2 = ((LevelGenerator *)((LevelGenerator *)generatorLocal))->LevelGenerator::place_room(room); pGVar3 = (Game *)CONCAT31(extraout_var,bVar2); - ehState = (void *)((uint)ehState._1_3_ << 8); + ehState = (void *)((*(undefined1 *)((char *)&(GHIDRA_UINT(ehState)) + 0x1)) << 8); local_448 = pGVar3; FID_conflict__Erase_tree_>_> (local_78,(fuzzer_allocator_> *)local_78, - *(_Tree_node **)((int)local_78[0] + 4)); + *(_Tree_node **)(GHIDRA_INT(local_78[0]) + 4)); operator_delete(local_78[0],0x14); pGVar3->_roomList[0].Dimension = -1; pGVar3->_roomList[0].OverrideData = (void *)0xffffffff; @@ -12845,7 +12845,7 @@ LAB_0074fe6b: this->_lastBossRoomListIndex = this->_roomCount + -1; } stageId = 0; - pvVar5 = (void *)((int)local_44c + 0x38); + pvVar5 = (void *)(GHIDRA_INT(local_44c) + 0x38); uVar8 = 1; local_44c = pvVar5; do { @@ -12861,13 +12861,13 @@ LAB_0074fe6b: placedRoom = local_448; this = self; stageId = stageId + 1; - uVar8 = uVar8 << 1 | (uint)((int)uVar8 < 0); - } while ((int)stageId < 8); - generateParams._0_1_ = *(undefined1 *)&local_448->_stage; + uVar8 = uVar8 << 1 | GHIDRA_UINT((GHIDRA_INT(uVar8) < 0)); + } while (GHIDRA_INT(stageId) < 8); + (*(undefined1 *)((char *)&(generateParams) + 0x0)) = *(undefined1 *)&local_448->_stage; local_5c = local_448->_stageType; - local_58._0_1_ = local_448->_bossChallenge; - local_58._1_1_ = local_448->_devilRoomDisabled; - local_58._2_2_ = *(undefined2 *)&(*(undefined1 *)((char *)(local_448) + 0xa)); + (*(undefined1 *)((char *)&(local_58) + 0x0)) = local_448->_bossChallenge; + (*(undefined1 *)((char *)&(local_58) + 0x1)) = local_448->_devilRoomDisabled; + (*(undefined2 *)((char *)&(local_58) + 0x2)) = *(undefined2 *)&(*(undefined1 *)((char *)(local_448) + 0xa)); local_54 = local_448->_curses; local_50 = *(undefined4 *)&(*(undefined1 *)((char *)(local_448) + 0x10)); local_4c = local_448->_roomList[0].GridIndex; @@ -12884,13 +12884,13 @@ LAB_0074fe6b: *(void **)((char *)doorSet + 4) = doorSet; *(void **)((char *)doorSet + 8) = doorSet; *(undefined2 *)((char *)doorSet + 0xc) = 0x101; - ehState._0_1_ = 2; - std_set_uint_copy(&doorSet,placedRoom->_roomList[0]._doors,(int)self); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; + std_set_uint_copy(&doorSet,placedRoom->_roomList[0]._doors,GHIDRA_INT(self)); local_28 = placedRoom->_roomList[0]._doors[2]; local_24 = (undefined1)placedRoom->_roomList[0]._doors[3]; local_20 = placedRoom->_roomList[0]._doors[4]; local_1c = (undefined1)placedRoom->_roomList[0]._doors[5]; - ehState = (void *)CONCAT31(ehState._1_3_,3); + ehState = (void *)CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),3); stageId = (this->_generationRNG)._seed; if (step < 2) { if (stageId == 0) { @@ -12930,7 +12930,7 @@ LAB_0074fe6b: if (local_ad == '\0') { FID_conflict__Erase_tree_>_> (&doorSet,(fuzzer_allocator_> *)&doorSet, - *(_Tree_node **)((int)doorSet + 4)); + *(_Tree_node **)(GHIDRA_INT(doorSet) + 4)); operator_delete(doorSet,0x14); FID_conflict__Tidy(local_c4); FID_conflict__Tidy(local_d0); @@ -12939,8 +12939,8 @@ LAB_0074fe6b: return 0; } ((LevelGenerator *)((LevelGenerator *)generatorLocal))->LevelGenerator::get_all_rooms(&allRooms); - ehState._0_1_ = 4; - piVar7 = (int *)((int)allRooms + 4); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 4; + piVar7 = (int *)(GHIDRA_INT(allRooms) + 4); iVar4 = extraout_ECX_00; if (piVar7 != allRoomsEnd) { do { @@ -12990,14 +12990,14 @@ LAB_0074fe6b: } pvVar5 = allRooms; ((LevelGenerator *)(levelGen))->LevelGenerator::block_cells_near_rooms(generatorLocal,iVar4); - ehState = (void *)CONCAT31(ehState._1_3_,3); + ehState = (void *)CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),3); if (pvVar5 != (void *)0x0) { - stageId = (allRoomsCapacity - (int)pvVar5 >> 2) * 4; + stageId = (allRoomsCapacity - GHIDRA_INT(pvVar5) >> 2) * 4; pvVar9 = pvVar5; if (0xfff < stageId) { pvVar9 = *(void **)((char *)pvVar5 + -4); stageId = stageId + 0x23; - if (0x1f < (uint)((int)pvVar5 + (-4 - (int)pvVar9))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar5) + (-4 - GHIDRA_INT(pvVar9))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -13009,7 +13009,7 @@ LAB_0074fe6b: } FID_conflict__Erase_tree_>_> (&doorSet,(fuzzer_allocator_> *)&doorSet, - *(_Tree_node **)((int)doorSet + 4)); + *(_Tree_node **)(GHIDRA_INT(doorSet) + 4)); operator_delete(doorSet,0x14); ehState = (void *)0xffffffff; FID_conflict__Tidy(local_c4); @@ -13054,7 +13054,7 @@ void Level::generate_random_layout() local_8 = 0xffffffff; puStack_c = &LAB_00afe570; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(local_30 + 0x2c); + local_14 = __security_cookie ^ GHIDRA_UINT((local_30 + 0x2c)); ExceptionList = &local_10; seed = (this->_generationRNG)._seed; rng = &this->_generationRNG; @@ -13113,7 +13113,7 @@ void Level::generate_random_layout() isPlaceable = ((LevelGenerator *)((LevelGenerator *)generator))->LevelGenerator::can_place_room(&startX,1); } while (isPlaceable == 0); local_3c0 = LevelGenerator::CreateRoom - ((LevelGenerator *)generator,iVar2,(int)local_3b0,1,-1,-1,-1); + ((LevelGenerator *)generator,iVar2,GHIDRA_INT(local_3b0),1,-1,-1,-1); local_3b4 = RoomConfig::GetRoomByStageTypeAndVariant(roomConfig,0,1,2,-1); seed = rng->_seed; if (seed == 0) { @@ -13132,17 +13132,17 @@ void Level::generate_random_layout() rng->_seed = seed; place_room(this,local_3c0,local_3b4,seed,pvVar1,(RoomDescriptor **)0x0); pvVar1 = ThreadLocalStoragePointer; - this->_startingRoomIndex = (int)local_3b0 * 0xd + iVar2; + this->_startingRoomIndex = GHIDRA_INT(local_3b0) * 0xd + iVar2; if ((*(int *)(*(int *)pvVar1 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } descriptor = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { descriptor = this->_roomList + 0x1fc; } ((Seeds *)((Seeds *)descriptor))->Seeds::Init3(rng); @@ -13166,27 +13166,27 @@ void Level::generate_random_layout() iVar2 = *(int *)pvVar1; if ((*(int *)(iVar2 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } descriptor = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { descriptor = this->_roomList + 0x1fc; } descriptor->Data = local_3b0; if ((*(int *)(iVar2 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } descriptor = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { descriptor = this->_roomList + 0x200; } ((Seeds *)((Seeds *)descriptor))->Seeds::Init3(rng); @@ -13210,27 +13210,27 @@ void Level::generate_random_layout() iVar2 = *(int *)ThreadLocalStoragePointer; if ((*(int *)(iVar2 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } descriptor = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { descriptor = this->_roomList + 0x200; } descriptor->Data = local_3b0; if ((*(int *)(iVar2 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } descriptor = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { descriptor = this->_roomList + 0x1fe; } ((Seeds *)((Seeds *)descriptor))->Seeds::Init3(rng); @@ -13253,15 +13253,15 @@ void Level::generate_random_layout() (roomConfig,seed,1,0,0x10,0xd,0,-1,1,10,(uint *)&local_3b4,0xffffffff,-1); if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } manager = g_manager; descriptor = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { descriptor = this->_roomList + 0x1fe; } descriptor->Data = randomRoom; @@ -13284,7 +13284,7 @@ void Level::generate_random_layout() if (((manager->_persistentGameData)._achievements[0x9a] != 0) || (((manager->_state == 2 && (g_game != (Game *)0x0)) && (((g_game->_dailyChallenge)._id != 0 || (g_game->_isDebug != 0)))))) { - local_3b0 = (RoomConfig_Room *)((int)local_3b0 + 1); + local_3b0 = (RoomConfig_Room *)(GHIDRA_INT(local_3b0) + 1); } localRng._seed = rng->_seed; if (localRng._seed == 0) { @@ -13297,12 +13297,12 @@ void Level::generate_random_layout() } } localRng._seed = - (uint)localRng._seed >> ((byte)(this->_generationRNG)._shift1 & 0x1f) ^ localRng._seed; + GHIDRA_UINT(localRng._seed) >> ((byte)(this->_generationRNG)._shift1 & 0x1f) ^ localRng._seed; localRng._shift1 = 3; localRng._shift2 = 3; localRng._seed = localRng._seed << ((byte)(this->_generationRNG)._shift2 & 0x1f) ^ localRng._seed; localRng._seed = - (uint)localRng._seed >> ((byte)(this->_generationRNG)._shift3 & 0x1f) ^ localRng._seed; + GHIDRA_UINT(localRng._seed) >> ((byte)(this->_generationRNG)._shift3 & 0x1f) ^ localRng._seed; local_3c0 = (void *)0x1a; rng->_seed = localRng._seed; localRng._shift3 = 0x1a; @@ -13312,30 +13312,30 @@ void Level::generate_random_layout() (*debugBreak)(); return; } - localRng._seed = (uint)localRng._seed >> 3 ^ localRng._seed; + localRng._seed = GHIDRA_UINT(localRng._seed) >> 3 ^ localRng._seed; localRng._seed = localRng._seed << 3 ^ localRng._seed; - localRng._seed = (uint)localRng._seed >> 0x1a ^ localRng._seed; - local_3b0 = (RoomConfig_Room *)((uint)localRng._seed % (uint)local_3b0); + localRng._seed = GHIDRA_UINT(localRng._seed) >> 0x1a ^ localRng._seed; + local_3b0 = (RoomConfig_Room *)(GHIDRA_UINT(localRng._seed) % GHIDRA_UINT(local_3b0)); if (localRng._seed == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); debugBreak = (code *)swi(3); (*debugBreak)(); return; } - localRng._seed = (uint)localRng._seed >> 3 ^ localRng._seed; + localRng._seed = GHIDRA_UINT(localRng._seed) >> 3 ^ localRng._seed; localRng._seed = localRng._seed << 3 ^ localRng._seed; - localRng._seed = (uint)localRng._seed >> 0x1a ^ localRng._seed; - local_3b4 = (RoomConfig_Room *)((int)local_3b0 + (uint)localRng._seed % (uint)local_3b4); + localRng._seed = GHIDRA_UINT(localRng._seed) >> 0x1a ^ localRng._seed; + local_3b4 = (RoomConfig_Room *)(GHIDRA_INT(local_3b0) + GHIDRA_UINT(localRng._seed) % GHIDRA_UINT(local_3b4)); if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } descriptor = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { descriptor = this->_roomList + 0x207; } ((Seeds *)((Seeds *)descriptor))->Seeds::Init3(&localRng); @@ -13346,21 +13346,21 @@ void Level::generate_random_layout() (*debugBreak)(); return; } - seed = (uint)localRng._seed >> ((byte)localRng._shift1 & 0x1f) ^ localRng._seed; + seed = GHIDRA_UINT(localRng._seed) >> ((byte)localRng._shift1 & 0x1f) ^ localRng._seed; seed = seed << ((byte)localRng._shift2 & 0x1f) ^ seed; randomRoom = RoomConfig::GetRandomRoom (roomConfig,seed >> ((byte)localRng._shift3 & 0x1f) ^ seed,1,0,2,0xd,0,-1,1 - ,10,(uint *)&local_3c0,(uint)local_3b4,-1); + ,10,(uint *)&local_3c0,GHIDRA_UINT(local_3b4),-1); if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } descriptor = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { descriptor = this->_roomList + 0x207; } descriptor->Data = randomRoom; @@ -13383,14 +13383,14 @@ void Level::generate_random_layout() localRng._shift3 = 0x1c; if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } descriptor = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { descriptor = this->_roomList + 0x20c; } ((Seeds *)((Seeds *)descriptor))->Seeds::Init3(&localRng); @@ -13401,21 +13401,21 @@ void Level::generate_random_layout() (*debugBreak)(); return; } - seed = (uint)localRng._seed >> ((byte)localRng._shift1 & 0x1f) ^ localRng._seed; + seed = GHIDRA_UINT(localRng._seed) >> ((byte)localRng._shift1 & 0x1f) ^ localRng._seed; seed = seed << ((byte)localRng._shift2 & 0x1f) ^ seed; randomRoom = RoomConfig::GetRandomRoom (roomConfig,seed >> ((byte)localRng._shift3 & 0x1f) ^ seed,1,0,0xf,0xd,0,-1 ,1,10,(uint *)&local_3b4,1,-1); if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 10; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } descriptor = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { descriptor = this->_roomList + 0x20c; } descriptor->Data = randomRoom; @@ -13437,14 +13437,14 @@ void Level::generate_random_layout() rng->_seed = seed >> ((byte)(this->_generationRNG)._shift3 & 0x1f) ^ seed; if ((*(int *)(iVar2 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; _Init_thread_footer(&g_invalidRoomDescriptorGuard); } descriptor = &g_roomDescriptorDummy; - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { descriptor = this->_roomList + 0x204; } ((Seeds *)((Seeds *)descriptor))->Seeds::Init3(rng); @@ -13467,12 +13467,12 @@ void Level::generate_random_layout() (roomConfig,seed,1,0x21,5,0xd,0,-1,1,10,(uint *)&local_3b4,0x58,-1); if ((*(int *)(*(int *)pvVar1 + 0xc) < g_invalidRoomDescriptorGuard) && (_Init_thread_header(&g_invalidRoomDescriptorGuard), g_invalidRoomDescriptorGuard == -1)) { - local_8 = CONCAT31(local_8._1_3_,0xc); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xc); ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); _atexit(FUN_00b15b30); _Init_thread_footer(&g_invalidRoomDescriptorGuard); } - if ((uint)this->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(this->_currentDimensionIdx) < 3) { descriptor = this->_roomList + 0x204; } else { @@ -13608,7 +13608,7 @@ void Level::generate_dark_closet() ehState = 0xffffffff; puStack_18 = &LAB_00afe5ef; savedExceptionList = ExceptionList; - stackCookie = __security_cookie ^ (uint)(local_5c + 0x13); + stackCookie = __security_cookie ^ GHIDRA_UINT((local_5c + 0x13)); ExceptionList = &savedExceptionList; savedDimension = in_ECX->_currentDimensionIdx; local_450 = (RoomConfig_Room *)(in_ECX->_roomMap + 0x152); @@ -13683,24 +13683,24 @@ void Level::generate_dark_closet() RoomConfig::CollectRooms (&g_game->_roomConfig,&tmpRoomsBegin,0x23,1,0xd,0,0xffffffff,1,0xf, (uint *)&local_448,0x22,0); - ehState._0_1_ = 2; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; if (&roomsVecBegin != collectedRooms) { local_448 = *collectedRooms; - _Size = (int)collectedRooms[1] - (int)local_448; - if ((int)_Size >> 2 == 0) { + _Size = GHIDRA_INT(collectedRooms[1]) - GHIDRA_INT(local_448); + if (GHIDRA_INT(_Size) >> 2 == 0) { NVar8 = (NetplayManager)0x0; } else { - std::vector::reserve_clear((int)_Size >> 2); + std::vector::reserve_clear(GHIDRA_INT(_Size) >> 2); roomsCap = roomsVecCap; roomsBegin = roomsVecBegin; NVar8 = roomsVecBegin; } memmove((void *)NVar8,(void *)local_448,_Size); - NVar8 = (NetplayManager)(_Size + (int)roomsBegin); + NVar8 = (NetplayManager)(_Size + GHIDRA_INT(roomsBegin)); roomsVecEnd = NVar8; } - ehState = CONCAT31(ehState._1_3_,1); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),1); FID_conflict__Tidy(&tmpRoomsBegin); manager = g_manager; local_444 = (void *)0x0; @@ -13717,7 +13717,7 @@ void Level::generate_dark_closet() piStack_38 = (int *)0x0; uStack_34 = 0; piStack_30 = (int *)0x0; - for (roomIt = roomsBegin; roomIt != NVar8; roomIt = (NetplayManager)((int)roomIt + 4)) { + for (roomIt = roomsBegin; roomIt != NVar8; roomIt = (NetplayManager)(GHIDRA_INT(roomIt) + 4)) { local_5c[*(int *)(*(int *)roomIt + 0x48)] = local_5c[*(int *)(*(int *)roomIt + 0x48)] + 1; } uVar3 = 0; @@ -13737,11 +13737,11 @@ void Level::generate_dark_closet() availableItemsEnd = (int *)0x0; availableItemsCap = (int *)0x0; availableItemsVecCap = (int *)0x0; - ehState = CONCAT31(ehState._1_3_,3); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),3); local_448 = (NetplayManager)g_manager; pvVar7 = (g_manager->_itemConfig)._collectibles._end; collectiblesBegin = (g_manager->_itemConfig)._collectibles._begin; - uVar3 = (int)pvVar7 - (int)collectiblesBegin >> 2; + uVar3 = GHIDRA_INT(pvVar7) - GHIDRA_INT(collectiblesBegin) >> 2; if (uVar3 != 0) { if (0x3fffffff < uVar3) { /* WARNING: Subroutine does not return */ @@ -13757,11 +13757,11 @@ void Level::generate_dark_closet() uVar3 = 0; availableItemsVecBegin = availableItemsBegin; availableItemsVecCap = availableItemsCap; - if ((int)pvVar7 - (int)collectiblesBegin >> 2 != 0) { + if (GHIDRA_INT(pvVar7) - GHIDRA_INT(collectiblesBegin) >> 2 != 0) { do { - pvVar7 = *(void **)(uVar3 * 4 + (int)collectiblesBegin); + pvVar7 = *(void **)(uVar3 * 4 + GHIDRA_INT(collectiblesBegin)); if ((pvVar7 != (void *)0x0) && (bVar2 = ((Item *)(pvVar7))->Item::IsAvailable(3), bVar2 != 0)) { - iVar5 = *(int *)((int)(((ItemConfig *)((int)NVar8 + 0x2a404))->_collectibles)._begin + + iVar5 = *(int *)(GHIDRA_INT((((ItemConfig *)(GHIDRA_INT(NVar8) + 0x2a404))->_collectibles)._begin) + uVar3 * 4); iVar1 = *(int *)(iVar5 + 4); if ((iVar1 != 0x29c) && (iVar1 != 0x274)) { @@ -13776,8 +13776,8 @@ void Level::generate_dark_closet() } } uVar3 = uVar3 + 1; - collectiblesBegin = (((ItemConfig *)((int)NVar8 + 0x2a404))->_collectibles)._begin; - } while (uVar3 < (uint)((int)*(void **)((char *)NVar8 + 0x2a408) - (int)collectiblesBegin >> 2)); + collectiblesBegin = (((ItemConfig *)(GHIDRA_INT(NVar8) + 0x2a404))->_collectibles)._begin; + } while (uVar3 < GHIDRA_UINT((GHIDRA_INT(*(void **)((char *)NVar8 + 0x2a408)) - GHIDRA_INT(collectiblesBegin) >> 2))); availableItemsBegin = availableItemsVecBegin; uVar6 = local_440; } @@ -13798,7 +13798,7 @@ void Level::generate_dark_closet() local_448 = (NetplayManager)&DAT_00000007; LevelGenerator::block_cell(&uStack_44c,extraout_ECX_00); local_5c[5] = g_levelGenInvalidPos[0]; - LStack_70._0_1_ = 1; + (*(undefined1 *)((char *)&(LStack_70) + 0x0)) = 1; uStack_68 = 2; uStack_64 = 6; uStack_60 = 0; @@ -13820,12 +13820,12 @@ void Level::generate_dark_closet() local_2c = local_2c & 0xffffff00; uStack_60 = _DAT_00c5d388; local_5c[0] = _DAT_00c5d38c; - ehState._0_1_ = 4; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 4; LevelGenerator::Generate((LevelGenerator *)generator,0x32,0,0,0,(uint *)&local_444,0,&LStack_70); - ehState._0_1_ = 3; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 3; FID_conflict__Erase_tree_>_> (&pvStack_40,(fuzzer_allocator_> *)&pvStack_40, - *(_Tree_node **)((int)pvStack_40 + 4)); + *(_Tree_node **)(GHIDRA_INT(pvStack_40) + 4)); operator_delete(pvStack_40,0x14); if (isLevelUsable == '\0') { KAGE_LogMessage(1,(byte *)"generated level is not usable\n"); @@ -13841,7 +13841,7 @@ void Level::generate_dark_closet() } firstNewRoom = self->_roomCount; ((LevelGenerator *)((LevelGenerator *)generator))->LevelGenerator::get_all_rooms(&tmpRoomsBegin); - ehState._0_1_ = 5; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; local_448 = tmpRoomsBegin; if (tmpRoomsBegin != tmpRoomsEnd) { do { @@ -13861,7 +13861,7 @@ void Level::generate_dark_closet() if ((*(int *)((char *)pvVar7 + 8) == 1) && (*(int *)((char *)pvVar7 + 0xc) == 100)) goto LAB_00751ceb; uVar3 = uVar3 + 1; - pvVar7 = (void *)((int)pvVar7 + 0x5c); + pvVar7 = (void *)(GHIDRA_INT(pvVar7) + 0x5c); } while (uVar3 < uVar6); } KAGE_LogMessage(1,(byte *)"[warn] StageID %d Room type %d, variant %d not found!\n"); @@ -13891,8 +13891,8 @@ LAB_00751ceb: uVar6 = uVar6 << ((byte)((ulonglong)rngShift12 >> 0x20) & 0x1f) ^ uVar6; uVar6 = uVar6 >> ((byte)rngShift3 & 0x1f) ^ uVar6; local_450 = RoomConfig::GetRandomRoom - (pRStack_46c,uVar6,1,0x23,1,(int)local_450,0,-1,1,10, - (uint *)((int)local_444 + 0x1c),0x22,0); + (pRStack_46c,uVar6,1,0x23,1,GHIDRA_INT(local_450),0,-1,1,10, + (uint *)(GHIDRA_INT(local_444) + 0x1c),0x22,0); pLVar9 = self; if (uVar6 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -13907,7 +13907,7 @@ LAB_00751ceb: place_room(self,local_444,local_450,uVar6,rngShift3,(RoomDescriptor **)0x0); local_444 = (void *)(pLVar9->_roomCount * 0xb8); local_450 = (RoomConfig_Room *)0x0; - iVar5 = *(int *)((char *)local_444 + (int)(pLVar9->_roomList + -1) + 0x10); + iVar5 = *(int *)((char *)local_444 + GHIDRA_INT((pLVar9->_roomList + -1)) + 0x10); gridWidth = *(byte *)(iVar5 + 0x46) + 2; if (*(short *)(iVar5 + 0x44) != 0) { local_440 = 0; @@ -13925,29 +13925,29 @@ LAB_00751ceb: spawnEntry = (short *)(*(int *)(iVar5 + 0x40) + local_440); pRStack_46c = (RoomConfig *)(*spawnEntry + 1 + (spawnEntry[1] + 1) * gridWidth); if ((((char)spawnEntry[4] != '\0') && - (piVar4 = ((Spawn *)(spawnEntry))->Spawn::PickEntry((float)((double)(int)uVar6 + - __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + (piVar4 = ((Spawn *)(spawnEntry))->Spawn::PickEntry((float)((double)GHIDRA_INT(uVar6) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283062e-10), *piVar4 == 5)) && ((short)piVar4[1] == 100)) { - if (nextItemIdx < (uint)((int)availableItemsEnd - (int)availableItemsBegin >> 2)) { + if (nextItemIdx < GHIDRA_UINT((GHIDRA_INT(availableItemsEnd) - GHIDRA_INT(availableItemsBegin) >> 2))) { uVar3 = *(uint *)((char *)availableItemsBegin + nextItemIdx * 4); if (g_game == (Game *)0x0) { - if (-1 < (int)uVar3) goto LAB_00751f76; + if (-1 < GHIDRA_INT(uVar3)) goto LAB_00751f76; LAB_00751f90: iVar5 = 0; } - else if ((int)uVar3 < 0) { - if ((-1 < (int)uVar3) || + else if (GHIDRA_INT(uVar3) < 0) { + if ((-1 < GHIDRA_INT(uVar3)) || (pvVar7 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar7 >> - 2 <= (int)~uVar3)) goto LAB_00751f90; + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar7) >> + 2 <= GHIDRA_INT(~uVar3))) goto LAB_00751f90; iVar5 = **(int **)((char *)pvVar7 + ~uVar3 * 4); } else { LAB_00751f76: pvVar7 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar7 >> 2 <= - (int)uVar3) goto LAB_00751f90; + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar7) >> 2 <= + GHIDRA_INT(uVar3)) goto LAB_00751f90; iVar5 = *(int *)((char *)pvVar7 + uVar3 * 4); } uStack_8c = 0; @@ -13967,12 +13967,12 @@ LAB_00751f76: local_5c[4] = 0x3f800000; local_5c[5] = 0x3f800000; local_5c[6] = 0; - pvStack_40 = (void *)CONCAT31(pvStack_40._1_3_,1); + pvStack_40 = (void *)CONCAT31((*(undefined1 *)((char *)&(pvStack_40) + 0x1)),1); local_3c = 0; piStack_38 = (int *)0x0; uStack_34 = 0; piStack_30 = (int *)0x0; - ehState = CONCAT31(ehState._1_3_,6); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),6); itemSaveState = 5; itemSaveStateVariant = 100; itemId = *(int *)((char *)availableItemsBegin + nextItemIdx * 4); @@ -13983,8 +13983,8 @@ LAB_00751f76: else { uStack_90 = *(undefined4 *)(iVar5 + 200); } - itemPosY = (float)((int)pRStack_46c / gridWidth) * 40.0 + 120.0; - itemPosX = (float)((int)pRStack_46c % gridWidth) * 40.0 + 40.0; + itemPosY = (float)(GHIDRA_INT(pRStack_46c) / gridWidth) * 40.0 + 120.0; + itemPosX = (float)(GHIDRA_INT(pRStack_46c) % gridWidth) * 40.0 + 40.0; if (uVar6 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); trapFn = (code *)swi(3); @@ -14008,10 +14008,10 @@ LAB_00751f76: uStack_6c = uVar6; local_5c[3] = ((ItemPool *)(&g_game->_itemPool))->ItemPool::GetFirstItemPoolForCollectible(itemId); saveStateEnd = *(EntitySaveState **) - ((int)local_444 + (int)(self->_roomList + -1) + 0x78); - iVar5 = (int)local_444 + (int)self; + (GHIDRA_INT(local_444) + GHIDRA_INT((self->_roomList + -1)) + 0x78); + iVar5 = GHIDRA_INT(local_444) + GHIDRA_INT(self); if (saveStateEnd == - *(EntitySaveState **)((char *)local_444 + (int)(self->_roomList + -1) + 0x7c)) { + *(EntitySaveState **)((char *)local_444 + GHIDRA_INT((self->_roomList + -1)) + 0x7c)) { std::vector::_Emplace_reallocate(saveStateEnd,&itemSaveState); } else { @@ -14019,44 +14019,44 @@ LAB_00751f76: piVar4 = (int *)(iVar5 + -0x2c); *piVar4 = *piVar4 + 0x78; } - ehState._0_1_ = 7; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 7; if (((piStack_30 != (int *)0x0) && (isReleasable = (**(code **)(*piStack_30 + 0xc))(), isReleasable != '\0')) && (g_entitySaveStateReleaseFn != (void *)0x0)) { (*g_entitySaveStateReleaseFn)(&uStack_34); } - ehState._0_1_ = 8; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 8; if (((piStack_38 != (int *)0x0) && (isReleasable = (**(code **)(*piStack_38 + 0xc))(), isReleasable != '\0')) && (g_entitySaveStateExtraDataReleaseFn != (void *)0x0)) { (*g_entitySaveStateExtraDataReleaseFn)(&local_3c); } - ehState._0_1_ = 5; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; uVar3 = local_440; } std::set::insert(itemCells,&pRStack_46c); } local_440 = uVar3 + 0x10; - local_450 = (RoomConfig_Room *)((int)local_450 + 1); - iVar5 = *(int *)((char *)local_444 + (int)(self->_roomList + -1) + 0x10); - } while (local_450 < (int *)(uint)*(ushort *)(iVar5 + 0x44)); + local_450 = (RoomConfig_Room *)(GHIDRA_INT(local_450) + 1); + iVar5 = *(int *)((char *)local_444 + GHIDRA_INT((self->_roomList + -1)) + 0x10); + } while (local_450 < (int *)GHIDRA_UINT(*(ushort *)(iVar5 + 0x44))); local_440 = uVar6; } pLVar9 = self; } - if ((uint)((int)availableItemsEnd - (int)availableItemsBegin >> 2) <= nextItemIdx) break; - local_448 = (NetplayManager)((int)local_448 + 4); + if (GHIDRA_UINT((GHIDRA_INT(availableItemsEnd) - GHIDRA_INT(availableItemsBegin) >> 2)) <= nextItemIdx) break; + local_448 = (NetplayManager)(GHIDRA_INT(local_448) + 4); uVar6 = local_440; } while (local_448 != tmpRoomsEnd); } - ehState._0_1_ = 3; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 3; if (tmpRoomsBegin != (NetplayManager)0x0) { - uVar6 = tmpRoomsCap - (int)tmpRoomsBegin & 0xfffffffc; + uVar6 = tmpRoomsCap - GHIDRA_INT(tmpRoomsBegin) & 0xfffffffc; NVar8 = tmpRoomsBegin; if (0xfff < uVar6) { NVar8 = *(NetplayManager *)((char *)tmpRoomsBegin + -4); uVar6 = uVar6 + 0x23; - if ((undefined1 *)0x1f < (undefined1 *)((int)tmpRoomsBegin + (-4 - (int)NVar8))) { + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(tmpRoomsBegin) + (-4 - GHIDRA_INT(NVar8)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -14076,22 +14076,22 @@ LAB_00751f76: pLVar9->_currentDimensionIdx = savedDimension; pLVar9->_currentRoomMap = pLVar9->_roomMap + savedDimension * 0xa9; if (availableItemsBegin != (void *)0x0) { - uVar6 = (int)availableItemsCap - (int)availableItemsBegin & 0xfffffffc; + uVar6 = GHIDRA_INT(availableItemsCap) - GHIDRA_INT(availableItemsBegin) & 0xfffffffc; pvVar7 = availableItemsBegin; if (0xfff < uVar6) { pvVar7 = *(void **)((char *)availableItemsBegin + -4); uVar6 = uVar6 + 0x23; - if (0x1f < (uint)((int)availableItemsBegin + (-4 - (int)pvVar7))) goto LAB_0075237a; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(availableItemsBegin) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_0075237a; } operator_delete(pvVar7,uVar6); } if (roomsBegin != (NetplayManager)0x0) { - uVar6 = roomsCap - (int)roomsBegin & 0xfffffffc; + uVar6 = roomsCap - GHIDRA_INT(roomsBegin) & 0xfffffffc; NVar8 = roomsBegin; if (0xfff < uVar6) { NVar8 = *(NetplayManager *)((char *)roomsBegin + -4); uVar6 = uVar6 + 0x23; - if (0x1f < (uint)((int)roomsBegin + (-4 - (int)NVar8))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(roomsBegin) + (-4 - GHIDRA_INT(NVar8))))) { LAB_0075237a: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -14218,8 +14218,8 @@ void * Level::get_door_neighbor_indices(void *outIndices) std::set::insert(insertResult,local_24); } doorSlot = doorSlot + 1; - doorBit = doorBit << 1 | (uint)((int)doorBit < 0); - } while ((int)doorSlot < 8); + doorBit = doorBit << 1 | GHIDRA_UINT((GHIDRA_INT(doorBit) < 0)); + } while (GHIDRA_INT(doorSlot) < 8); } level = local_18; } @@ -14296,7 +14296,7 @@ byte Level::UpdateBackwardsPathStages() if ((g_game->_stageType == 4) || (local_14 = (float)iVar2, g_game->_stageType == 5)) { local_14 = (float)(iVar2 + 1); } - stageOffset = (int)local_14 * 800; + stageOffset = GHIDRA_INT(local_14) * 800; uVar4 = 0; pGVar6 = g_game; fVar7 = local_14; @@ -14304,21 +14304,21 @@ byte Level::UpdateBackwardsPathStages() pGVar5 = pGVar6; if ((fVar7 != local_14) || (*(int *)(*(int *)((char *)pGVar6->_room + 4) + 8) != pGVar6->_lastBossRoomListIdx)) { - if (((int)fVar7 < 1) || (7 < (int)fVar7)) { + if ((GHIDRA_INT(fVar7) < 1) || (7 < GHIDRA_INT(fVar7))) { KAGE_LogMessage(0x10,(byte *)"Invalid backwards path stage ID"); pGVar5 = g_game; } iVar2 = *(int *)((char *)(pGVar6->_glowingHourglassStates + 2) + stageOffset + 0xd8); if ((iVar2 == 4) || (iVar2 == 5)) { - layer = ((int)fVar7 + -2) / 2 + 3; + layer = (GHIDRA_INT(fVar7) + -2) / 2 + 3; } else { - layer = ((int)fVar7 + -1) / 2; + layer = (GHIDRA_INT(fVar7) + -1) / 2; } uVar4 = uVar4 | 1 << (layer & 0x1f); } stageOffset = stageOffset + 800; - fVar7 = (float)((int)fVar7 + 1); + fVar7 = (float)(GHIDRA_INT(fVar7) + 1); pGVar6 = pGVar5; } while (stageOffset < 0x15e1); layer = 0; @@ -14337,8 +14337,8 @@ byte Level::UpdateBackwardsPathStages() *piVar1 = *piVar1 | 1 << ((byte)layer & 0x1f); } layer = layer + 1; - layerMask = layerMask << 1 | (uint)((int)layerMask < 0); - } while ((int)layer < 6); + layerMask = layerMask << 1 | GHIDRA_UINT((GHIDRA_INT(layerMask) < 0)); + } while (GHIDRA_INT(layer) < 6); return uVar4 != 0; } local_14 = 0.0; @@ -14354,8 +14354,8 @@ byte Level::UpdateBackwardsPathStages() } } uVar4 = 0; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { player = ((Game *)(g_game))->Game::GetPlayer(uVar4); isHasEffect = ((TemporaryEffects *)(&player->_temporaryeffects))->TemporaryEffects::HasCollectibleEffect(0x2c0); @@ -14364,8 +14364,8 @@ byte Level::UpdateBackwardsPathStages() break; } uVar4 = uVar4 + 1; - } while (uVar4 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (uVar4 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); } extraHp = 10000.0; fVar7 = local_14; @@ -14389,7 +14389,7 @@ LAB_007ebb35: fVar7 = local_14; } uVar4 = uVar4 + 1; - } while (uVar4 < (uint)this->_roomList[0x19].DecorationSeed); + } while (uVar4 < GHIDRA_UINT(this->_roomList[0x19].DecorationSeed)); } if (fVar7 <= 0.0) goto LAB_007ebbfe; if (pGVar6->_challenge == 0x2c) { @@ -14433,7 +14433,7 @@ std_string * Level::GetCurseNameByIdx(std_string *outName, uint curseIdx) manager = g_manager; if (curseIdx != 0) { iVar1 = this->_roomList[0x27]._doors[7]; - if (curseIdx < (uint)((this->_roomList[0x27].DisplayFlags - iVar1) / 0x1c)) { + if (curseIdx < GHIDRA_UINT(((this->_roomList[0x27].DisplayFlags - iVar1) / 0x1c))) { if (*(int *)(iVar1 + 0x14 + curseIdx * 0x1c) == 0) { text = &s_empty; } @@ -14447,12 +14447,12 @@ std_string * Level::GetCurseNameByIdx(std_string *outName, uint curseIdx) curseIdx = curseIdx & 0xffffff; StringTable::get_string (&g_manager->_stringTable,(byte *)"Curses",iVar1,text + 1, - (byte *)((int)&curseIdx + 3)); - if (curseIdx._3_1_ == '\0') { + (byte *)(GHIDRA_INT(&curseIdx) + 3)); + if ((*(undefined1 *)((char *)&(curseIdx) + 0x3)) == '\0') { curseIdx = curseIdx & 0xffffff; text = StringTable::get_string (&manager->_stringTable,(byte *)"Curses",iVar1,text + 1, - (byte *)((int)&curseIdx + 3)); + (byte *)(GHIDRA_INT(&curseIdx) + 3)); } } } @@ -14468,7 +14468,7 @@ std_string * Level::GetCurseNameByIdx(std_string *outName, uint curseIdx) ch = *textEnd; textEnd = textEnd + 1; } while (ch != 0); - ((std::string *)(outName->_buf))->std::string::assign(text,(int)textEnd - (int)(text + 1)); + ((std::string *)(outName->_buf))->std::string::assign(text,GHIDRA_INT(textEnd) - GHIDRA_INT((text + 1))); return outName; } } @@ -14543,7 +14543,7 @@ void Level::InitializeGenesisRoom(undefined **param_2, int *param_3, int *param_ puStack_c = &LAB_00b06556; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(lobbyText + 0xb); + local_18 = __security_cookie ^ GHIDRA_UINT((lobbyText + 0xb)); ExceptionList = &local_10; local_8 = (void *)0x0; if (param_3 == (int *)0x0) { @@ -14553,16 +14553,16 @@ void Level::InitializeGenesisRoom(undefined **param_2, int *param_3, int *param_ membersEnd = param_3[5]; membersBegin = param_3[4]; uVar3 = (**(code **)(*param_3 + 0x1c))(); - cVar1 = '\x01' - ((uint)(membersEnd - membersBegin >> 3) < uVar3); + cVar1 = '\x01' - (GHIDRA_UINT((membersEnd - membersBegin >> 3)) < uVar3); } if (cVar1 == '\0') { local_38.y = (float)(auStackY_178 + 0x84); propertiesVtable = KAGE::Network::Multiplayer::ConstLobby::vftable; pvVar4 = (void *)0x0; propertiesRefCount = (void *)0x0; - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; ((std::shared_ptr *)(auStackY_178 + 0x88))->std::shared_ptr::assign(¶m_3); - local_8 = (void *)((uint)local_8._1_3_ << 8); + local_8 = (void *)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8); bVar2 = online_check_game_version(propertiesVtable,pvVar4,propertiesRefCount); if (bVar2 != 0) { bVar2 = online_lobby_is_user_banned(¶m_2); @@ -14575,25 +14575,25 @@ void Level::InitializeGenesisRoom(undefined **param_2, int *param_3, int *param_ } uVar5 = 0x8e130e; ((std::string *)((char *)lobbyText))->std::string::string_from_cstr(text); - local_8 = (void *)CONCAT31(local_8._1_3_,3); + local_8 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); if (lobbyTextSize == 8) { local_38.y = (float)(auStackY_178 + 0x84); - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; ((std::shared_ptr *)(auStackY_178 + 0x88))->std::shared_ptr::assign(¶m_3); - local_8 = (void *)CONCAT31(local_8._1_3_,3); + local_8 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); LobbyPasswordPrompt::open(); } else { online_lobby_join(&g_manager->_netplayManager,¶m_2,CONCAT44(text,uVar5)); } - local_8 = (void *)((uint)local_8 & 0xffffff00); + local_8 = (void *)(GHIDRA_UINT(local_8) & 0xffffff00); if (0xf < lobbyTextCapacity) { uVar3 = lobbyTextCapacity + 1; pvVar4 = lobbyText[0]; if (0xfff < uVar3) { - pvVar4 = *(void **)((int)lobbyText[0] + -4); + pvVar4 = *(void **)(GHIDRA_INT(lobbyText[0]) + -4); uVar3 = lobbyTextCapacity + 0x24; - if (0x1f < (uint)((int)lobbyText[0] + (-4 - (int)pvVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(lobbyText[0]) + (-4 - GHIDRA_INT(pvVar4))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -14608,7 +14608,7 @@ void Level::InitializeGenesisRoom(undefined **param_2, int *param_3, int *param_ local_38.y = (float)&DAT_bf800000; MessagePopup::MessagePopup (popup,&g_manager->_font2_TeamMeatEx12,(void *)0x0,(void *)0x0,&local_38); - local_8 = (void *)CONCAT31(local_8._1_3_,1); + local_8 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); MessagePopup::add_ok_button((byte *)"##GAME###Online/ERROR_LOBBY_FULL",popup); ((PopupQueue *)(&(*(undefined1 *)((char *)&(g_manager[1]._gamestate) + 0xcf0))))->PopupQueue::push(popup); local_64 = 0; diff --git a/src/game/level_generator.cpp b/src/game/level_generator.cpp index 51e698d..50bf597 100644 --- a/src/game/level_generator.cpp +++ b/src/game/level_generator.cpp @@ -36,7 +36,7 @@ byte LevelGenerator::try_add_dead_end(int unused, void *excludedGridIndices) local_10 = ExceptionList; ExceptionList = &local_10; LVar4 = this[0xda]; - uVar8 = ((int)LVar4 - (int)this[0xd9]) / 0x48; + uVar8 = (GHIDRA_INT(LVar4) - GHIDRA_INT(this[0xd9])) / 0x48; roomOrder = (int *)0x0; local_18 = (int *)0x0; local_30 = (int *)0x0; @@ -55,41 +55,41 @@ byte LevelGenerator::try_add_dead_end(int unused, void *excludedGridIndices) LVar4 = this[0xda]; local_30 = piVar6; } - local_8._0_1_ = 0; - local_8._1_3_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0; uVar8 = 0; - iVar3 = (int)LVar4 - (int)this[0xd9] >> 0x1f; - if (((int)LVar4 - (int)this[0xd9]) / 0x48 + iVar3 != iVar3) { + iVar3 = GHIDRA_INT(LVar4) - GHIDRA_INT(this[0xd9]) >> 0x1f; + if ((GHIDRA_INT(LVar4) - GHIDRA_INT(this[0xd9])) / 0x48 + iVar3 != iVar3) { do { roomOrder[uVar8] = uVar8; uVar8 = uVar8 + 1; - } while (uVar8 < (uint)(((int)this[0xda] - (int)this[0xd9]) / 0x48)); + } while (uVar8 < GHIDRA_UINT(((GHIDRA_INT(this[0xda]) - GHIDRA_INT(this[0xd9])) / 0x48))); } RNG::Shuffle((RNG *)this,roomOrder,local_18); pvVar1 = excludedGridIndices; LVar4 = this[0xd9]; local_18 = (int *)0x0; - iVar3 = (int)this[0xda] - (int)LVar4 >> 0x1f; - if (((int)this[0xda] - (int)LVar4) / 0x48 + iVar3 != iVar3) { + iVar3 = GHIDRA_INT(this[0xda]) - GHIDRA_INT(LVar4) >> 0x1f; + if ((GHIDRA_INT(this[0xda]) - GHIDRA_INT(LVar4)) / 0x48 + iVar3 != iVar3) { do { get_neighbor_candidates - (this,&candidates,*(uint *)((char *)LVar4 + 4 + roomOrder[(int)local_18] * 0x48),1); - local_8._0_1_ = 1; + (this,&candidates,*(uint *)((char *)LVar4 + 4 + roomOrder[GHIDRA_INT(local_18)] * 0x48),1); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; uVar5 = extraout_ECX; LVar7 = candidatesLast; candidate = candidates; if (candidates != candidatesLast) { do { if (*(LevelGenerator_Room *)((char *)candidate + 0x18) == (LevelGenerator_Room)0x1) { - bVar2 = can_place_room(generator,(int *)((int)candidate + 8),1); + bVar2 = can_place_room(generator,(int *)(GHIDRA_INT(candidate) + 8),1); uVar5 = extraout_ECX_00; if ((bVar2 != 0) && - (iVar3 = count_neighbor_rooms(generator,(int *)((int)candidate + 0x28)), + (iVar3 = count_neighbor_rooms(generator,(int *)(GHIDRA_INT(candidate) + 0x28)), uVar5 = extraout_ECX_01, iVar3 < 2)) { if (pvVar1 != (void *)0x0) { LVar7 = *(LevelGenerator_Room *)((char *)candidate + 8); - if (((uint)LVar7 < 0xd) && (*(uint *)((char *)candidate + 0xc) < 0xd)) { - candidateGridIndex = (void *)(*(uint *)((char *)candidate + 0xc) * 0xd + (int)LVar7); + if ((GHIDRA_UINT(LVar7) < 0xd) && (*(uint *)((char *)candidate + 0xc) < 0xd)) { + candidateGridIndex = (void *)(*(uint *)((char *)candidate + 0xc) * 0xd + GHIDRA_INT(LVar7)); } else { candidateGridIndex = (void *)0xffffffff; @@ -97,7 +97,7 @@ byte LevelGenerator::try_add_dead_end(int unused, void *excludedGridIndices) excludedGridIndices = candidateGridIndex; std::set::find_node(local_40,&excludedGridIndices); if (((*(char *)(local_38 + 0xd) == '\0') && - (*(int *)(local_38 + 0x10) <= (int)candidateGridIndex)) && + (*(int *)(local_38 + 0x10) <= GHIDRA_INT(candidateGridIndex))) && (uVar5 = extraout_ECX_02, local_38 != *(int *)pvVar1)) goto LAB_009adfbd; } bVar2 = place_room(generator,(LevelGenerator_Room *)candidate); @@ -108,19 +108,19 @@ byte LevelGenerator::try_add_dead_end(int unused, void *excludedGridIndices) LAB_009adfbd: LVar7 = candidatesLast; } - candidate = (LevelGenerator_Room)((int)candidate + 0x48); + candidate = (LevelGenerator_Room)(GHIDRA_INT(candidate) + 0x48); } while (candidate != LVar7); this = generator; } - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; if (candidates != (LevelGenerator_Room)0x0) { FUN_00752e40(uVar5); - uVar8 = ((candidatesCapacityEnd - (int)candidates) / 0x48) * 0x48; + uVar8 = ((candidatesCapacityEnd - GHIDRA_INT(candidates)) / 0x48) * 0x48; LVar7 = candidates; if (0xfff < uVar8) { LVar7 = *(LevelGenerator_Room *)((char *)candidates + -4); uVar8 = uVar8 + 0x23; - if (0x1f < ((int)candidates - (int)LVar7) - 4U) goto LAB_009ae094; + if (0x1f < (GHIDRA_INT(candidates) - GHIDRA_INT(LVar7)) - 4U) goto LAB_009ae094; } operator_delete((void *)LVar7,uVar8); candidates = (LevelGenerator_Room)0x0; @@ -128,18 +128,18 @@ LAB_009adfbd: candidatesCapacityEnd = 0; } LVar4 = this[0xd9]; - local_18 = (int *)((int)local_18 + 1); - } while (local_18 < (uint)(((int)this[0xda] - (int)LVar4) / 0x48)); + local_18 = (int *)(GHIDRA_INT(local_18) + 1); + } while (local_18 < GHIDRA_UINT(((GHIDRA_INT(this[0xda]) - GHIDRA_INT(LVar4)) / 0x48))); } bVar2 = 0; LAB_009ae06b: if (roomOrder != (int *)0x0) { - uVar8 = (int)roomOrderCapacityEnd - (int)roomOrder & 0xfffffffc; + uVar8 = GHIDRA_INT(roomOrderCapacityEnd) - GHIDRA_INT(roomOrder) & 0xfffffffc; piVar6 = roomOrder; if (0xfff < uVar8) { piVar6 = (int *)roomOrder[-1]; uVar8 = uVar8 + 0x23; - if (0x1f < (uint)((int)roomOrder + (-4 - (int)piVar6))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(roomOrder) + (-4 - GHIDRA_INT(piVar6))))) { LAB_009ae094: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -163,11 +163,11 @@ LevelGenerator_Room * LevelGenerator::GetNewEndRoom(int roomShape, uint *possibl if ((LevelGenerator)deadEndIt != this[0xdd]) { do { nextIt = (LevelGenerator)(deadEndIt + 1); - room = (LevelGenerator_Room *)((int)this[0xd9] + *deadEndIt * 0x48); + room = (LevelGenerator_Room *)(GHIDRA_INT(this[0xd9]) + *deadEndIt * 0x48); isResized = try_resize_room(this,room,roomShape,possibleDoors); if (isResized != 0) { - memmove(deadEndIt,(void *)nextIt,(int)this[0xdd] - (int)nextIt); - this[0xdd] = (LevelGenerator)((int)this[0xdd] + -4); + memmove(deadEndIt,(void *)nextIt,GHIDRA_INT(this[0xdd]) - GHIDRA_INT(nextIt)); + this[0xdd] = (LevelGenerator)(GHIDRA_INT(this[0xdd]) + -4); return room; } deadEndIt = (int *)nextIt; @@ -217,7 +217,7 @@ void * LevelGenerator::place_secret_room(void *excludedIndices) puStack_c = &LAB_00b0e1e8; local_10 = ExceptionList; - neighborOffsets[8] = __security_cookie ^ (uint)(neighborOffsets + 0xd); + neighborOffsets[8] = __security_cookie ^ GHIDRA_UINT((neighborOffsets + 0xd)); ExceptionList = &local_10; puVar7 = (uint *)0x0; neighborOffsets[0] = -1; @@ -242,10 +242,10 @@ void * LevelGenerator::place_secret_room(void *excludedIndices) do { pLVar9 = cellSlot; uVar4 = cellIndex; - if ((int)*cellSlot < 0) { + if (GHIDRA_INT(*cellSlot) < 0) { local_98 = cellIndex; std::set::find_node(local_c0,&local_98); - if ((((*(char *)(foundNode + 0xd) == '\0') && (*(int *)(foundNode + 0x10) <= (int)uVar4)) && + if ((((*(char *)(foundNode + 0xd) == '\0') && (*(int *)(foundNode + 0x10) <= GHIDRA_INT(uVar4))) && (foundNode != *(int *)excludedIndices)) || ((&(*(undefined1 *)((char *)&(this[0xae]) + 0x0)))[uVar4] != '\0')) { puVar2 = local_84; puVar7 = cellsBegin; @@ -263,23 +263,23 @@ void * LevelGenerator::place_secret_room(void *excludedIndices) return pvVar3; } } - uVar4 = (uint)rngState >> (SUB41(this[1],0) & 0x1f) ^ (uint)rngState; + uVar4 = GHIDRA_UINT(rngState) >> (SUB41(this[1],0) & 0x1f) ^ GHIDRA_UINT(rngState); local_98 = 0; uVar4 = uVar4 << (SUB41(this[2],0) & 0x1f) ^ uVar4; rngState = (LevelGenerator)(uVar4 >> (SUB41(this[3],0) & 0x1f) ^ uVar4); *this = rngState; - iVar8 = (uint)rngState % 5 + 10; + iVar8 = GHIDRA_UINT(rngState) % 5 + 10; dir = 0; cellScore = iVar8; do { uVar6 = local_98; - if ((uint)((int)local_9c + neighborOffsets[dir * 2]) < 0xd) { + if (GHIDRA_UINT((GHIDRA_INT(local_9c) + neighborOffsets[dir * 2])) < 0xd) { if (neighborOffsets[dir * 2 + 1] + local_90 < 0xd) { iVar5 = (neighborOffsets[dir * 2 + 1] + local_90) * 0xd + - (int)local_9c + neighborOffsets[dir * 2]; + GHIDRA_INT(local_9c) + neighborOffsets[dir * 2]; if (-1 < iVar5) { - if (-1 < (int)this[iVar5 + 5]) { - iVar8 = (int)this[0xd9] + (int)this[iVar5 + 5] * 0x48; + if (-1 < GHIDRA_INT(this[iVar5 + 5])) { + iVar8 = GHIDRA_INT(this[0xd9]) + GHIDRA_INT(this[iVar5 + 5]) * 0x48; doorTarget = get_door_target_position (doorTargetPos,(int *)(iVar8 + 8),*(int *)(iVar8 + 0x18), dir - 2 & 3,0); @@ -302,11 +302,11 @@ void * LevelGenerator::place_secret_room(void *excludedIndices) } while (dir < 4); if ((uVar6 != 0) && (-1 < iVar8)) { iVar5 = iVar8 + -3; - if (2 < (int)local_98) { + if (2 < GHIDRA_INT(local_98)) { iVar5 = iVar8; } iVar8 = iVar5 + -3; - if (1 < (int)local_98) { + if (1 < GHIDRA_INT(local_98)) { iVar8 = iVar5; } if (bestScore < iVar8) { @@ -348,7 +348,7 @@ void * LevelGenerator::place_secret_room(void *excludedIndices) cellIndex = uVar4 + 1; cellSlot = pLVar9 + 1; } while (cellIndex < 0xa9); - local_84 = (uint *)((int)puVar2 - (int)puVar7 >> 2); + local_84 = (uint *)(GHIDRA_INT(puVar2) - GHIDRA_INT(puVar7) >> 2); if (local_84 == (uint *)0x0) { pvVar3 = (void *)0x0; } @@ -363,42 +363,42 @@ void * LevelGenerator::place_secret_room(void *excludedIndices) return pvVar3; } } - uVar4 = (uint)rngState >> (SUB41(this[1],0) & 0x1f) ^ (uint)rngState; + uVar4 = GHIDRA_UINT(rngState) >> (SUB41(this[1],0) & 0x1f) ^ GHIDRA_UINT(rngState); uVar4 = uVar4 ^ uVar4 << (SUB41(this[2],0) & 0x1f); rngState = (LevelGenerator)(uVar4 ^ uVar4 >> (SUB41(this[3],0) & 0x1f)); *this = rngState; - uVar4 = cellsBegin[(uint)rngState % (uint)local_84]; - local_90 = (int)uVar4 % 0xd; - ((LevelGenerator_Room *)(newRoom))->LevelGenerator_Room::constructor(local_90,(int)uVar4 / 0xd,1); - local_8 = CONCAT31(local_8._1_3_,1); + uVar4 = cellsBegin[GHIDRA_UINT(rngState) % GHIDRA_UINT(local_84)]; + local_90 = GHIDRA_INT(uVar4) % 0xd; + ((LevelGenerator_Room *)(newRoom))->LevelGenerator_Room::constructor(local_90,GHIDRA_INT(uVar4) / 0xd,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); local_3c = 1; place_room(this,newRoom); - local_9c = (void *)((int)this[0xd9] + (int)this[uVar4 + 5] * 0x48); + local_9c = (void *)(GHIDRA_INT(this[0xd9]) + GHIDRA_INT(this[uVar4 + 5]) * 0x48); update_room_neighbors(this,local_9c); dir = 0; do { - uVar6 = neighborOffsets[dir * 2 + 1] + (int)uVar4 / 0xd; + uVar6 = neighborOffsets[dir * 2 + 1] + GHIDRA_INT(uVar4) / 0xd; if ((((local_90 + neighborOffsets[dir * 2] < 0xd) && (uVar6 < 0xd)) && (iVar8 = uVar6 * 0xd + local_90 + neighborOffsets[dir * 2], -1 < iVar8)) && - (-1 < (int)this[iVar8 + 5])) { - update_room_neighbors(this,(void *)((int)this[0xd9] + (int)this[iVar8 + 5] * 0x48)); + (-1 < GHIDRA_INT(this[iVar8 + 5]))) { + update_room_neighbors(this,(void *)(GHIDRA_INT(this[0xd9]) + GHIDRA_INT(this[iVar8 + 5]) * 0x48)); } dir = dir + 1; } while (dir < 4); FID_conflict__Erase_tree_>_> (local_50,(fuzzer_allocator_> *)local_50, - *(_Tree_node **)((int)local_50[0] + 4)); + *(_Tree_node **)(GHIDRA_INT(local_50[0]) + 4)); operator_delete(local_50[0],0x14); puVar7 = cellsBegin; pvVar3 = local_9c; } if (puVar7 != (uint *)0x0) { - uVar4 = (int)cellsCapacity - (int)puVar7 & 0xfffffffc; + uVar4 = GHIDRA_INT(cellsCapacity) - GHIDRA_INT(puVar7) & 0xfffffffc; puVar2 = puVar7; if (0xfff < uVar4) { puVar2 = (uint *)puVar7[-1]; uVar4 = uVar4 + 0x23; - if (0x1f < (uint)((int)puVar7 + (-4 - (int)puVar2))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(puVar7) + (-4 - GHIDRA_INT(puVar2))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -456,7 +456,7 @@ void * LevelGenerator::try_place_room(void *allowedIndices) puStack_c = &LAB_00b0e23b; local_10 = ExceptionList; - neighborOffsets[0x18] = __security_cookie ^ (uint)(neighborOffsets + 0x1d); + neighborOffsets[0x18] = __security_cookie ^ GHIDRA_UINT((neighborOffsets + 0x1d)); ExceptionList = &local_10; puVar6 = (uint *)0x0; neighborOffsets[0x10] = 0xffffffff; @@ -497,8 +497,8 @@ void * LevelGenerator::try_place_room(void *allowedIndices) local_104 = this; do { uVar3 = gridIndex; - if ((int)*gridSlot < 0) { - if (*(char *)((int)&(*(undefined1 *)((char *)&(this[0xae]) + 0x0)) + gridIndex) == '\0') { + if (GHIDRA_INT(*gridSlot) < 0) { + if (*(char *)(GHIDRA_INT(&(*(undefined1 *)((char *)&(this[0xae]) + 0x0))) + gridIndex) == '\0') { if (allowedIndices == (void *)0x0) { LAB_009ae755: seed = *this; @@ -511,11 +511,11 @@ LAB_009ae755: return result; } } - uVar3 = (uint)seed >> (SUB41(this[1],0) & 0x1f) ^ (uint)seed; + uVar3 = GHIDRA_UINT(seed) >> (SUB41(this[1],0) & 0x1f) ^ GHIDRA_UINT(seed); uVar3 = uVar3 << (SUB41(this[2],0) & 0x1f) ^ uVar3; seed = (LevelGenerator)(uVar3 >> (SUB41(this[3],0) & 0x1f) ^ uVar3); *this = seed; - uVar7 = (uint)seed % 5; + uVar7 = GHIDRA_UINT(seed) % 5; score = uVar7 + 10; local_d8 = 0; local_f0 = (void *)(gridIndex / 0xd); @@ -523,28 +523,28 @@ LAB_009ae755: uVar3 = 0; do { if (((column + neighborOffsets[uVar3 * 2 + 0x10] < 0xd) && - ((uint)(neighborOffsets[uVar3 * 2 + 0x11] + (int)local_f0) < 0xd)) && - ((iVar4 = (neighborOffsets[uVar3 * 2 + 0x11] + (int)local_f0) * 0xd + + (GHIDRA_UINT((neighborOffsets[uVar3 * 2 + 0x11] + GHIDRA_INT(local_f0))) < 0xd)) && + ((iVar4 = (neighborOffsets[uVar3 * 2 + 0x11] + GHIDRA_INT(local_f0)) * 0xd + column + neighborOffsets[uVar3 * 2 + 0x10], -1 < iVar4 && - ((-1 < (int)this[iVar4 + 5] || (*(char *)((char *)this + iVar4 + 0x2b8) != '\0')))))) { + ((-1 < GHIDRA_INT(this[iVar4 + 5]) || (*(char *)((char *)this + iVar4 + 0x2b8) != '\0')))))) { score = uVar7 - 0x5a; - if ((int)score < 0) goto LAB_009aeaab; + if (GHIDRA_INT(score) < 0) goto LAB_009aeaab; break; } uVar3 = uVar3 + 1; } while (uVar3 < 4); neighborDir = 0; do { - if ((int)score < 0) break; + if (GHIDRA_INT(score) < 0) break; iVar4 = neighborOffsets[neighborDir * 2]; offsetX = iVar4; if ((column + iVar4 < 0xd) && - ((uint)(neighborOffsets[neighborDir * 2 + 1] + (int)local_f0) < 0xd)) { - iVar5 = (neighborOffsets[neighborDir * 2 + 1] + (int)local_f0) * 0xd + column + iVar4; + (GHIDRA_UINT((neighborOffsets[neighborDir * 2 + 1] + GHIDRA_INT(local_f0))) < 0xd)) { + iVar5 = (neighborOffsets[neighborDir * 2 + 1] + GHIDRA_INT(local_f0)) * 0xd + column + iVar4; if (-1 < iVar5) { - if (-1 < (int)this[iVar5 + 5]) { + if (-1 < GHIDRA_INT(this[iVar5 + 5])) { uVar3 = 0; - iVar5 = (int)this[0xd9] + (int)this[iVar5 + 5] * 0x48; + iVar5 = GHIDRA_INT(this[0xd9]) + GHIDRA_INT(this[iVar5 + 5]) * 0x48; neighborRoom = iVar5; do { if (0 < neighborOffsets[uVar3 * 2 + 0x11] * neighborOffsets[neighborDir * 2 + 1] @@ -555,11 +555,11 @@ LAB_009ae755: if ((doorTargetX < 0xd) && (doorTargetY < 0xd)) { uVar7 = doorTargetY * 0xd + doorTargetX; local_cc = uVar7; - if ((-1 < (int)uVar7) && + if ((-1 < GHIDRA_INT(uVar7)) && ((((allowedIndices == (void *)0x0 || (std::set::find_node(local_128,&local_cc), *(char *)(local_120 + 0xd) != '\0')) || - ((int)uVar7 < *(int *)(local_120 + 0x10))) || + (GHIDRA_INT(uVar7) < *(int *)(local_120 + 0x10))) || (local_120 == *(int *)allowedIndices)))) { iVar5 = neighborRoom; iVar4 = offsetX; @@ -583,16 +583,16 @@ LAB_009ae936: neighborDir = neighborDir + 1; } while (neighborDir < 8); uVar3 = gridIndex; - if ((local_d8 != 0) && (-1 < (int)score)) { + if ((local_d8 != 0) && (-1 < GHIDRA_INT(score))) { uVar7 = score - 3; - if (2 < (int)local_d8) { + if (2 < GHIDRA_INT(local_d8)) { uVar7 = score; } uVar8 = uVar7 - 3; - if (1 < (int)local_d8) { + if (1 < GHIDRA_INT(local_d8)) { uVar8 = uVar7; } - if ((int)uVar8 <= (int)local_e0) { + if (GHIDRA_INT(uVar8) <= GHIDRA_INT(local_e0)) { if (uVar8 == local_e0) { local_cc = gridIndex; if (local_c4 == candidatesCapacity) { @@ -630,7 +630,7 @@ LAB_009aeaab: else { local_cc = gridIndex; std::set::find_node(local_11c,&local_cc); - if (((*(char *)(local_114 + 0xd) != '\0') || ((int)uVar3 < *(int *)(local_114 + 0x10))) || + if (((*(char *)(local_114 + 0xd) != '\0') || (GHIDRA_INT(uVar3) < *(int *)(local_114 + 0x10))) || (local_114 == *(int *)allowedIndices)) goto LAB_009ae755; } LAB_009aeab1: @@ -641,7 +641,7 @@ LAB_009aeab1: gridIndex = uVar3 + 1; gridSlot = gridSlot + 1; if (0xa8 < gridIndex) { - local_c4 = (uint *)((int)puVar2 - (int)puVar6 >> 2); + local_c4 = (uint *)(GHIDRA_INT(puVar2) - GHIDRA_INT(puVar6) >> 2); if (local_c4 == (uint *)0x0) { result = (void *)0x0; } @@ -656,19 +656,19 @@ LAB_009aeab1: return result; } } - uVar3 = (uint)seed >> (SUB41(this[1],0) & 0x1f) ^ (uint)seed; + uVar3 = GHIDRA_UINT(seed) >> (SUB41(this[1],0) & 0x1f) ^ GHIDRA_UINT(seed); uVar3 = uVar3 ^ uVar3 << (SUB41(this[2],0) & 0x1f); seed = (LevelGenerator)(uVar3 ^ uVar3 >> (SUB41(this[3],0) & 0x1f)); *this = seed; - uVar3 = candidatesBegin[(uint)seed % (uint)local_c4]; - uVar7 = (int)uVar3 / 0xd; - local_d8 = (int)uVar3 % 0xd; + uVar3 = candidatesBegin[GHIDRA_UINT(seed) % GHIDRA_UINT(local_c4)]; + uVar7 = GHIDRA_INT(uVar3) / 0xd; + local_d8 = GHIDRA_INT(uVar3) % 0xd; local_e0 = uVar7; ((LevelGenerator_Room *)(newRoom))->LevelGenerator_Room::constructor(local_d8,uVar7,1); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); local_7c = 1; place_room(this,newRoom); - local_f0 = (void *)((int)this[0xd9] + (int)this[uVar3 + 5] * 0x48); + local_f0 = (void *)(GHIDRA_INT(this[0xd9]) + GHIDRA_INT(this[uVar3 + 5]) * 0x48); update_room_neighbors(this,local_f0); local_cc = 0; uVar3 = local_d8; @@ -678,18 +678,18 @@ LAB_009aeab1: iVar4 = (neighborOffsets[local_cc * 2 + 1] + uVar7) * 0xd + neighborOffsets[local_cc * 2] + uVar3; if (-1 < iVar4) { - if (-1 < (int)this[iVar4 + 5]) { + if (-1 < GHIDRA_INT(this[iVar4 + 5])) { uVar3 = 0; - iVar4 = (int)this[0xd9] + (int)this[iVar4 + 5] * 0x48; + iVar4 = GHIDRA_INT(this[0xd9]) + GHIDRA_INT(this[iVar4 + 5]) * 0x48; do { get_door_target_position ((int *)&doorTargetX,(int *)(iVar4 + 8),*(int *)(iVar4 + 0x18),uVar3,0 ); if (((doorTargetX < 0xd) && (doorTargetY < 0xd)) && ((iVar5 = doorTargetY * 0xd + doorTargetX, -1 < iVar5 && - (((int)local_104[iVar5 + 5] < 0 && - (uVar7 = (int)(doorTargetY - local_e0) >> 0x1f, - uVar8 = (int)(doorTargetX - local_d8) >> 0x1f, + ((GHIDRA_INT(local_104[iVar5 + 5]) < 0 && + (uVar7 = GHIDRA_INT((doorTargetY - local_e0)) >> 0x1f, + uVar8 = GHIDRA_INT((doorTargetX - local_d8)) >> 0x1f, ((doorTargetY - local_e0 ^ uVar7) - uVar7) + ((doorTargetX - local_d8 ^ uVar8) - uVar8) == 1)))))) { if (7 < uVar3) { @@ -700,7 +700,7 @@ LAB_009aeab1: *puVar2 = *puVar2 | 1 << ((byte)uVar3 & 0x1f); } uVar3 = uVar3 + 1; - } while ((int)uVar3 < 8); + } while (GHIDRA_INT(uVar3) < 8); uVar7 = local_e0; uVar3 = local_d8; this = local_104; @@ -712,18 +712,18 @@ LAB_009aeab1: } while (local_cc < 8); FID_conflict__Erase_tree_>_> (local_90,(fuzzer_allocator_> *)local_90, - *(_Tree_node **)((int)local_90[0] + 4)); + *(_Tree_node **)(GHIDRA_INT(local_90[0]) + 4)); operator_delete(local_90[0],0x14); puVar6 = candidatesBegin; result = local_f0; } if (puVar6 != (uint *)0x0) { - uVar3 = (int)candidatesCapacity - (int)puVar6 & 0xfffffffc; + uVar3 = GHIDRA_INT(candidatesCapacity) - GHIDRA_INT(puVar6) & 0xfffffffc; puVar2 = puVar6; if (0xfff < uVar3) { puVar2 = (uint *)puVar6[-1]; uVar3 = uVar3 + 0x23; - if (0x1f < (uint)((int)puVar6 + (-4 - (int)puVar2))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(puVar6) + (-4 - GHIDRA_INT(puVar2))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -758,8 +758,8 @@ void LevelGenerator::DetermineBossRoom(int shape, uint *possibleDoors) } do { roomIndex = *(LevelGenerator *)candidateIter; - room = (void *)((int)this[0xd9] + (int)roomIndex * 0x48); - if (1 < *(int *)((int)this[0xd9] + 0x40 + (int)roomIndex * 0x48)) { + room = (void *)(GHIDRA_INT(this[0xd9]) + GHIDRA_INT(roomIndex) * 0x48); + if (1 < *(int *)(GHIDRA_INT(this[0xd9]) + 0x40 + GHIDRA_INT(roomIndex) * 0x48)) { gridX = *(uint *)((char *)room + 0x28); gridY = *(uint *)((char *)room + 0x2c); if (*(char *)(this + 0xe4) != '\0') { @@ -768,8 +768,8 @@ void LevelGenerator::DetermineBossRoom(int shape, uint *possibleDoors) do { gridY = gridY + (&DAT_00c5d3e4)[*(int *)((char *)room + 0x20) * 2]; gridX = gridX + (&DAT_00c5d3e0)[*(int *)((char *)room + 0x20) * 2]; - if (((((int)gridX < 0) || (0xc < (int)gridX)) || ((int)gridY < 0)) || - ((0xc < (int)gridY || (iVar1 = gridY * 0xd + gridX, iVar1 < 0)))) { + if ((((GHIDRA_INT(gridX) < 0) || (0xc < GHIDRA_INT(gridX))) || (GHIDRA_INT(gridY) < 0)) || + ((0xc < GHIDRA_INT(gridY) || (iVar1 = gridY * 0xd + gridX, iVar1 < 0)))) { LAB_009aee2e: isStepFree = false; } @@ -785,7 +785,7 @@ LAB_009aee2e: if ((0xc < gridX) || (0xc < gridY)) { iVar1 = -1; } - if (-1 < (int)this[iVar1 + 5]) goto LAB_009aee2e; + if (-1 < GHIDRA_INT(this[iVar1 + 5])) goto LAB_009aee2e; } } iVar1 = 0; @@ -794,11 +794,11 @@ LAB_009aee2e: if ((((*neighborOffset + gridX < 0xd) && (neighborOffset[1] + gridY < 0xd)) && (cellIndex = (neighborOffset[1] + gridY) * 0xd + *neighborOffset + gridX, -1 < cellIndex)) && - ((-1 < (int)this[cellIndex + 5] && (this[cellIndex + 5] != roomIndex)))) { + ((-1 < GHIDRA_INT(this[cellIndex + 5]) && (this[cellIndex + 5] != roomIndex)))) { iVar1 = iVar1 + 1; } neighborOffset = neighborOffset + 2; - } while ((int)neighborOffset < 0xc5d400); + } while (GHIDRA_INT(neighborOffset) < 0xc5d400); isCandidateValid = false; if (iVar1 < 1) { isCandidateValid = isStepFree; @@ -810,14 +810,14 @@ LAB_009aee2e: isResized = try_resize_room(this,room,shape,possibleDoors); if (isResized != 0) { this[0xe2] = roomIndex; - memmove((void *)candidateIter,(int *)((int)candidateIter + 4), - (int)this[0xdd] - ((int)candidateIter + 4)); - this[0xdd] = (LevelGenerator)((int)this[0xdd] + -4); + memmove((void *)candidateIter,(int *)(GHIDRA_INT(candidateIter) + 4), + GHIDRA_INT(this[0xdd]) - (GHIDRA_INT(candidateIter) + 4)); + this[0xdd] = (LevelGenerator)(GHIDRA_INT(this[0xdd]) + -4); return; } } LAB_009aeebf: - candidateIter = (LevelGenerator)((int)candidateIter + 4); + candidateIter = (LevelGenerator)(GHIDRA_INT(candidateIter) + 4); if (candidateIter == this[0xdd]) { return; } @@ -845,7 +845,7 @@ void * LevelGenerator::get_all_rooms(void *outRooms) roomPtr[1] = 1; if (indexIter != this[0xe0]) { do { - roomPtr[0] = (int)this[0xd9] + *(int *)indexIter * 0x48; + roomPtr[0] = GHIDRA_INT(this[0xd9]) + *(int *)indexIter * 0x48; outEnd = *(int **)((char *)outRooms + 4); if (outEnd == *(int **)((char *)outRooms + 8)) { std::vector<4byte>::_Emplace_reallocate(outEnd,roomPtr); @@ -854,13 +854,13 @@ void * LevelGenerator::get_all_rooms(void *outRooms) *outEnd = roomPtr[0]; *(int *)((char *)outRooms + 4) = *(int *)((char *)outRooms + 4) + 4; } - indexIter = (LevelGenerator)((int)indexIter + 4); + indexIter = (LevelGenerator)(GHIDRA_INT(indexIter) + 4); } while (indexIter != this[0xe0]); } indexIter = this[0xdc]; if (indexIter != this[0xdd]) { do { - roomPtr[0] = (int)this[0xd9] + *(int *)indexIter * 0x48; + roomPtr[0] = GHIDRA_INT(this[0xd9]) + *(int *)indexIter * 0x48; outEnd = *(int **)((char *)outRooms + 4); if (outEnd == *(int **)((char *)outRooms + 8)) { std::vector<4byte>::_Emplace_reallocate(outEnd,roomPtr); @@ -869,7 +869,7 @@ void * LevelGenerator::get_all_rooms(void *outRooms) *outEnd = roomPtr[0]; *(int *)((char *)outRooms + 4) = *(int *)((char *)outRooms + 4) + 4; } - indexIter = (LevelGenerator)((int)indexIter + 4); + indexIter = (LevelGenerator)(GHIDRA_INT(indexIter) + 4); } while (indexIter != this[0xdd]); } ExceptionList = local_10; @@ -902,42 +902,42 @@ undefined4 LevelGenerator::add_dead_end() local_8 = 0xffffffff; puStack_c = &LAB_00b0e2ed; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; LVar6 = in_ECX[0xd9]; local_14 = 0; - if (((int)in_ECX[0xda] - (int)LVar6) / 0x48 != 0) { + if ((GHIDRA_INT(in_ECX[0xda]) - GHIDRA_INT(LVar6)) / 0x48 != 0) { iVar5 = 0; do { - get_neighbor_candidates(in_ECX,&local_24,*(uint *)(iVar5 + 4 + (int)LVar6),1); + get_neighbor_candidates(in_ECX,&local_24,*(uint *)(iVar5 + 4 + GHIDRA_INT(LVar6)),1); local_8 = 0; uVar4 = extraout_ECX; LVar7 = local_24; if (local_24 != local_20) { do { - bVar1 = can_place_room(in_ECX,(int *)((int)LVar7 + 8), - (int)*(LevelGenerator_Room *)((char *)LVar7 + 0x18)); + bVar1 = can_place_room(in_ECX,(int *)(GHIDRA_INT(LVar7) + 8), + GHIDRA_INT(*(LevelGenerator_Room *)((char *)LVar7 + 0x18))); uVar4 = extraout_ECX_00; if ((bVar1 != 0) && - (iVar3 = count_neighbor_rooms(in_ECX,(int *)((int)LVar7 + 0x28)), + (iVar3 = count_neighbor_rooms(in_ECX,(int *)(GHIDRA_INT(LVar7) + 0x28)), uVar4 = extraout_ECX_01, iVar3 < 2)) { place_room(in_ECX,(LevelGenerator_Room *)LVar7); vector_LevelGenerator_Room_tidy(&local_24); ExceptionList = local_10; return 1; } - LVar7 = (LevelGenerator_Room)((int)LVar7 + 0x48); + LVar7 = (LevelGenerator_Room)(GHIDRA_INT(LVar7) + 0x48); } while (LVar7 != local_20); } local_8 = 0xffffffff; if (local_24 != (LevelGenerator_Room)0x0) { FUN_00752e40(uVar4,uVar2); - size = ((local_1c - (int)local_24) / 0x48) * 0x48; + size = ((local_1c - GHIDRA_INT(local_24)) / 0x48) * 0x48; LVar7 = local_24; if (0xfff < size) { LVar7 = *(LevelGenerator_Room *)((char *)local_24 + -4); size = size + 0x23; - if (0x1f < ((int)local_24 - (int)LVar7) - 4U) { + if (0x1f < (GHIDRA_INT(local_24) - GHIDRA_INT(LVar7)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -950,7 +950,7 @@ undefined4 LevelGenerator::add_dead_end() LVar6 = in_ECX[0xd9]; iVar5 = iVar5 + 0x48; local_14 = local_14 + 1; - } while (local_14 < (uint)(((int)in_ECX[0xda] - (int)LVar6) / 0x48)); + } while (local_14 < GHIDRA_UINT(((GHIDRA_INT(in_ECX[0xda]) - GHIDRA_INT(LVar6)) / 0x48))); } ExceptionList = local_10; return 0; @@ -1105,10 +1105,10 @@ void LevelGenerator::update_room_neighbors(void *room) local_8 = 0xffffffff; puStack_c = &LAB_00b0e31d; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(findBuf + 0x3c); + uVar1 = __security_cookie ^ GHIDRA_UINT((findBuf + 0x3c)); ExceptionList = &local_10; - doorMask = (undefined4 *)((int)room + 0x1c); - neighborSet = (int *)((int)room + 0x30); + doorMask = (undefined4 *)(GHIDRA_INT(room) + 0x1c); + neighborSet = (int *)(GHIDRA_INT(room) + 0x30); *doorMask = 0; iVar2 = *neighborSet; generator = this; @@ -1122,9 +1122,9 @@ void LevelGenerator::update_room_neighbors(void *room) *(undefined4 *)((char *)room + 0x34) = 0; do { get_door_target_position - ((int *)&targetX,(int *)((int)room + 8),*(int *)((char *)room + 0x18),doorSlot,0); + ((int *)&targetX,(int *)(GHIDRA_INT(room) + 8),*(int *)((char *)room + 0x18),doorSlot,0); if ((((targetX < 0xd) && (targetY < 0xd)) && (iVar2 = targetY * 0xd + targetX, -1 < iVar2)) && - (gridCell = generator + iVar2 + 5, -1 < (int)generator[iVar2 + 5])) { + (gridCell = generator + iVar2 + 5, -1 < GHIDRA_INT(generator[iVar2 + 5]))) { if (7 < doorSlot) { /* WARNING: Subroutine does not return */ std::bitset::_Xran(); @@ -1133,13 +1133,13 @@ void LevelGenerator::update_room_neighbors(void *room) findResult = (undefined8 *)std::set::find_node(findBuf,gridCell); insertHint = *findResult; if ((*(char *)(*(int *)(findResult + 1) + 0xd) != '\0') || - ((int)*gridCell < *(int *)(*(int *)(findResult + 1) + 0x10))) { + (GHIDRA_INT(*gridCell) < *(int *)(*(int *)(findResult + 1) + 0x10))) { if (*(int *)((char *)room + 0x34) == 0xccccccc) { /* WARNING: Subroutine does not return */ FUN_004170d0(uVar1); } setHead = *(undefined4 *)((char *)room + 0x30); - neighborSetRef = (int)room + 0x30; + neighborSetRef = GHIDRA_INT(room) + 0x30; local_8 = 0; local_24 = 0; newNode = operator_new(0x14); @@ -1151,11 +1151,11 @@ void LevelGenerator::update_room_neighbors(void *room) *(undefined2 *)(newNode + 3) = 0; local_24 = 0; std::_Tree::_Insert_node - ((void *)((int)room + 0x30),(void *)insertHint,insertHint._4_4_,newNode); + ((void *)(GHIDRA_INT(room) + 0x30),(void *)insertHint,(*(undefined4 *)((char *)&(insertHint) + 0x4)),newNode); } } doorSlot = doorSlot + 1; - } while ((int)doorSlot < 8); + } while (GHIDRA_INT(doorSlot) < 8); *(undefined4 *)((char *)room + 0x38) = *(undefined4 *)((char *)room + 0x34); ExceptionList = local_10; return; @@ -1175,36 +1175,36 @@ void LevelGenerator::mark_dead_ends() roomIdx = 0; LVar2 = this[0xda]; roomsBegin = this[0xd9]; - iVar1 = (int)LVar2 - (int)roomsBegin >> 0x1f; - if (((int)LVar2 - (int)roomsBegin) / 0x48 + iVar1 != iVar1) { + iVar1 = GHIDRA_INT(LVar2) - GHIDRA_INT(roomsBegin) >> 0x1f; + if ((GHIDRA_INT(LVar2) - GHIDRA_INT(roomsBegin)) / 0x48 + iVar1 != iVar1) { roomOffset = 0; do { if (roomIdx != 0) { - iVar1 = count_neighbor_rooms(this,(int *)(roomOffset + 0x28 + (int)roomsBegin)); + iVar1 = count_neighbor_rooms(this,(int *)(roomOffset + 0x28 + GHIDRA_INT(roomsBegin))); if (iVar1 < 2) { - *(undefined1 *)(roomOffset + 0x3c + (int)roomsBegin) = 1; + *(undefined1 *)(roomOffset + 0x3c + GHIDRA_INT(roomsBegin)) = 1; } } roomOffset = roomOffset + 0x48; roomsBegin = this[0xd9]; roomIdx = roomIdx + 1; - } while (roomIdx < (uint)(((int)this[0xda] - (int)roomsBegin) / 0x48)); + } while (roomIdx < GHIDRA_UINT(((GHIDRA_INT(this[0xda]) - GHIDRA_INT(roomsBegin)) / 0x48))); LVar2 = this[0xda]; } roomIdx = 0; - iVar1 = (int)LVar2 - (int)roomsBegin >> 0x1f; - if (((int)LVar2 - (int)roomsBegin) / 0x48 + iVar1 != iVar1) { + iVar1 = GHIDRA_INT(LVar2) - GHIDRA_INT(roomsBegin) >> 0x1f; + if ((GHIDRA_INT(LVar2) - GHIDRA_INT(roomsBegin)) / 0x48 + iVar1 != iVar1) { roomOffset = 0; do { if ((roomIdx != 0) && - ((iVar1 = *(int *)(roomOffset + 0x28 + (int)roomsBegin), iVar1 != g_levelGenInvalidPos[0] - || (*(int *)(roomOffset + 0x2c + (int)roomsBegin) != g_levelGenInvalidPos[1])))) { - uVar3 = *(int *)(roomOffset + 0x20 + (int)roomsBegin) + 2U & 0x80000003; - if ((int)uVar3 < 0) { + ((iVar1 = *(int *)(roomOffset + 0x28 + GHIDRA_INT(roomsBegin)), iVar1 != g_levelGenInvalidPos[0] + || (*(int *)(roomOffset + 0x2c + GHIDRA_INT(roomsBegin)) != g_levelGenInvalidPos[1])))) { + uVar3 = *(int *)(roomOffset + 0x20 + GHIDRA_INT(roomsBegin)) + 2U & 0x80000003; + if (GHIDRA_INT(uVar3) < 0) { uVar3 = (uVar3 - 1 | 0xfffffffc) + 1; } neighborX = iVar1 + (&DAT_00c5d3e0)[uVar3 * 2]; - uVar3 = *(int *)(roomOffset + 0x2c + (int)roomsBegin) + (&DAT_00c5d3e4)[uVar3 * 2]; + uVar3 = *(int *)(roomOffset + 0x2c + GHIDRA_INT(roomsBegin)) + (&DAT_00c5d3e4)[uVar3 * 2]; if ((neighborX < 0xd) && (uVar3 < 0xd)) { iVar1 = uVar3 * 0xd + neighborX; } @@ -1212,15 +1212,15 @@ void LevelGenerator::mark_dead_ends() iVar1 = -1; } LVar2 = this[iVar1 + 5]; - if ((int)LVar2 < 0) { + if (GHIDRA_INT(LVar2) < 0) { KAGE_LogMessage(0x10,(byte *)"invalid connecting neighbor\n"); } - *(undefined1 *)((int)this[0xd9] + 0x3c + (int)LVar2 * 0x48) = 0; + *(undefined1 *)(GHIDRA_INT(this[0xd9]) + 0x3c + GHIDRA_INT(LVar2) * 0x48) = 0; } roomsBegin = this[0xd9]; roomOffset = roomOffset + 0x48; roomIdx = roomIdx + 1; - } while (roomIdx < (uint)(((int)this[0xda] - (int)roomsBegin) / 0x48)); + } while (roomIdx < GHIDRA_UINT(((GHIDRA_INT(this[0xda]) - GHIDRA_INT(roomsBegin)) / 0x48))); } return; } @@ -1239,17 +1239,17 @@ void LevelGenerator::update_dead_end_lists() mark_dead_ends(this); LVar2 = this[0xd9]; roomIndex = 0; - iVar1 = (int)this[0xda] - (int)LVar2 >> 0x1f; - if (((int)this[0xda] - (int)LVar2) / 0x48 + iVar1 != iVar1) { + iVar1 = GHIDRA_INT(this[0xda]) - GHIDRA_INT(LVar2) >> 0x1f; + if ((GHIDRA_INT(this[0xda]) - GHIDRA_INT(LVar2)) / 0x48 + iVar1 != iVar1) { roomOffset = 0; do { - update_room_neighbors(this,(void *)((int)LVar2 + roomOffset)); + update_room_neighbors(this,(void *)(GHIDRA_INT(LVar2) + roomOffset)); indexToPush[0] = roomIndex; if (*(char *)((char *)LVar2 + roomOffset + 0x3c) == '\0') { LVar2 = this[0xe0]; if (LVar2 == this[0xe1]) goto LAB_009afd26; *(uint *)LVar2 = roomIndex; - this[0xe0] = (LevelGenerator)((int)this[0xe0] + 4); + this[0xe0] = (LevelGenerator)(GHIDRA_INT(this[0xe0]) + 4); } else { LVar2 = this[0xdd]; @@ -1259,13 +1259,13 @@ LAB_009afd26: } else { *(uint *)LVar2 = roomIndex; - this[0xdd] = (LevelGenerator)((int)this[0xdd] + 4); + this[0xdd] = (LevelGenerator)(GHIDRA_INT(this[0xdd]) + 4); } } LVar2 = this[0xd9]; roomIndex = roomIndex + 1; roomOffset = roomOffset + 0x48; - } while (roomIndex < (uint)(((int)this[0xda] - (int)LVar2) / 0x48)); + } while (roomIndex < GHIDRA_UINT(((GHIDRA_INT(this[0xda]) - GHIDRA_INT(LVar2)) / 0x48))); } return; } @@ -1420,14 +1420,14 @@ LAB_009b01b5: return 1; } uVar1 = *gridPos + cellOffset[-1]; - if ((uVar1 < 0xd) && ((uint)(*cellOffset + gridPos[1]) < 0xd)) { + if ((uVar1 < 0xd) && (GHIDRA_UINT((*cellOffset + gridPos[1])) < 0xd)) { cellIndex = (*cellOffset + gridPos[1]) * 0xd + uVar1; } else { cellIndex = -1; } if (((((*(undefined1 *)((char *)&(this[0xe4]) + 0x1)) != '\0') && (cellIndex == lastRoomCellIndex)) || (cellIndex < 0)) || - ((-1 < (int)this[cellIndex + 5] || ((&(*(undefined1 *)((char *)&(this[0xae]) + 0x0)))[cellIndex] != '\0')))) break; + ((-1 < GHIDRA_INT(this[cellIndex + 5]) || ((&(*(undefined1 *)((char *)&(this[0xae]) + 0x0)))[cellIndex] != '\0')))) break; cellOffset = cellOffset + 2; } return 0; @@ -1453,12 +1453,12 @@ byte LevelGenerator::is_placement_valid(uint *position, uint shape) get_door_target_position((int *)&targetX,(int *)position,shape,doorSlot,1); iVar1 = sourceY; if ((((targetX < 0xd) && (targetY < 0xd)) && (iVar2 = targetY * 0xd + targetX, -1 < iVar2)) && - (-1 < (int)this[iVar2 + 5])) { + (-1 < GHIDRA_INT(this[iVar2 + 5]))) { if ((sourceX == g_levelGenInvalidPos[0]) && (sourceY == g_levelGenInvalidPos[1])) { return 0; } neighborDoorSlot = 0; - iVar2 = (int)this[0xd9] + (int)this[iVar2 + 5] * 0x48; + iVar2 = GHIDRA_INT(this[0xd9]) + GHIDRA_INT(this[iVar2 + 5]) * 0x48; while ((neighborDoorTarget = get_door_target_position (neighborDoorPos,(int *)(iVar2 + 8),*(int *)(iVar2 + 0x18), @@ -1490,16 +1490,16 @@ byte LevelGenerator::place_room(LevelGenerator_Room *room) LevelGenerator roomsEnd; roomsEnd = this[0xda]; - roomIndex = (LevelGenerator)(((int)roomsEnd - (int)this[0xd9]) / 0x48); + roomIndex = (LevelGenerator)((GHIDRA_INT(roomsEnd) - GHIDRA_INT(this[0xd9])) / 0x48); if (roomsEnd == this[0xdb]) { std::vector::_Emplace_reallocate(roomsEnd,room); } else { ((LevelGenerator_Room *)((LevelGenerator_Room *)roomsEnd))->LevelGenerator_Room::LevelGenerator_Room(room); - this[0xda] = (LevelGenerator)((int)this[0xda] + 0x48); + this[0xda] = (LevelGenerator)(GHIDRA_INT(this[0xda]) + 0x48); } - *(LevelGenerator *)((int)this[0xda] + -0x44) = roomIndex; - offsetTable = get_room_placement_offsets((int)room[6]); + *(LevelGenerator *)(GHIDRA_INT(this[0xda]) + -0x44) = roomIndex; + offsetTable = get_room_placement_offsets(GHIDRA_INT(room[6])); if (room[6] != (LevelGenerator_Room)0x1) { KAGE_LogMessage(1,(byte *)"place_room: shape %d\n"); } @@ -1510,8 +1510,8 @@ byte LevelGenerator::place_room(LevelGenerator_Room *room) (*(int *)((char *)offsets + offsetBytes + 4) == g_levelGenInvalidPos[1])) { return SUB41(this[0xda],0) + 0xb8; } - cellX = *(int *)((char *)offsets + offsetBytes) + (int)room[2]; - cellY = (int)room[3] + *(int *)((char *)offsets + offsetBytes + 4); + cellX = *(int *)((char *)offsets + offsetBytes) + GHIDRA_INT(room[2]); + cellY = GHIDRA_INT(room[3]) + *(int *)((char *)offsets + offsetBytes + 4); if ((cellX < 0xd) && (cellY < 0xd)) { cellIndex = cellY * 0xd + cellX; if (cellIndex < 0) goto LAB_009b03fb; @@ -1541,14 +1541,14 @@ int LevelGenerator::count_neighbor_rooms(int *gridPos) gridY = gridPos[1]; dirOffset = &DAT_00c5d3e0; do { - if (((((uint)(gridX + *dirOffset) < 0xd) && ((uint)(dirOffset[1] + gridY) < 0xd)) && + if ((((GHIDRA_UINT((gridX + *dirOffset)) < 0xd) && (GHIDRA_UINT((dirOffset[1] + gridY)) < 0xd)) && (cellIdx = (dirOffset[1] + gridY) * 0xd + gridX + *dirOffset, -1 < cellIdx)) && - ((cellRoom = this[cellIdx + 5], -1 < (int)cellRoom && + ((cellRoom = this[cellIdx + 5], -1 < GHIDRA_INT(cellRoom) && (cellIdx = FUN_009afd70(), cellRoom != this[cellIdx + 5])))) { neighborCount = neighborCount + 1; } dirOffset = dirOffset + 2; - } while ((int)dirOffset < 0xc5d400); + } while (GHIDRA_INT(dirOffset) < 0xc5d400); return neighborCount; } @@ -1629,12 +1629,12 @@ byte LevelGenerator::try_resize_room(void *room, int roomShape, uint *possibleDo void *resizedRoom; undefined4 shapeSizeY; - local_c = __security_cookie ^ (uint)auStack_114; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_114); roomCopy = room; shapeCopy = roomShape; iVar1 = *(int *)((char *)room + 0x20); candidateDoorSlots[0] = iVar1 + 2U & 0x80000003; - if ((int)candidateDoorSlots[0] < 0) { + if (GHIDRA_INT(candidateDoorSlots[0]) < 0) { candidateDoorSlots[0] = (candidateDoorSlots[0] - 1 | 0xfffffffc) + 1; } if ((iVar1 == 2) || (iVar1 == 3)) { @@ -1699,10 +1699,10 @@ byte LevelGenerator::try_resize_room(void *room, int roomShape, uint *possibleDo spotShape10 = 0xc; goto LAB_009b1491; default: - spotShape8 = (int)local_10c; - spotShape10 = (int)local_10c; - spotShape6 = (int)local_10c; - spotShape7 = (int)local_10c; + spotShape8 = GHIDRA_INT(local_10c); + spotShape10 = GHIDRA_INT(local_10c); + spotShape6 = GHIDRA_INT(local_10c); + spotShape7 = GHIDRA_INT(local_10c); if ((iVar1 != 0) && (iVar1 != 2)) { local_104 = (int *)0x3; goto LAB_009b1491; @@ -1713,9 +1713,9 @@ LAB_009b1491: if ((iVar1 == 0) || (local_108 = 5, iVar1 == 2)) { local_108 = 7; } - spotShape2 = (int)local_10c; - spotShape3 = (int)local_10c; - spotShape12 = (int)local_104; + spotShape2 = GHIDRA_INT(local_10c); + spotShape3 = GHIDRA_INT(local_10c); + spotShape12 = GHIDRA_INT(local_104); candidateShapes[0] = 1; spotShape4 = 8; spotShape5 = 8; @@ -1782,7 +1782,7 @@ LAB_009b1491: uVar4 = *piVar3 + offset[-1]; uVar2 = *offset + piVar3[1]; if (((0xc < uVar4) || ((0xc < uVar2 || (iVar1 = uVar2 * 0xd + uVar4, iVar1 < 0)))) || - ((-1 < (int)generator[iVar1 + 5] && (generator[iVar1 + 5] != local_10c)))) { + ((-1 < GHIDRA_INT(generator[iVar1 + 5]) && (generator[iVar1 + 5] != local_10c)))) { isFits = '\0'; } } @@ -1796,10 +1796,10 @@ LAB_009b1491: neighborCount = uVar2; if ((((*doorTargetPos < 0xd) && (doorTargetPos[1] < 0xd)) && (iVar1 = doorTargetPos[1] * 0xd + *doorTargetPos, -1 < iVar1)) && - ((cellRoomIdx = generatorCopy[iVar1 + 5], -1 < (int)cellRoomIdx && + ((cellRoomIdx = generatorCopy[iVar1 + 5], -1 < GHIDRA_INT(cellRoomIdx) && (cellRoomIdx != local_10c)))) { neighborCount = uVar2 + 1; - if (*(char *)((int)generatorCopy[0xd9] + 0x44 + (int)cellRoomIdx * 0x48) != '\0') { + if (*(char *)(GHIDRA_INT(generatorCopy[0xd9]) + 0x44 + GHIDRA_INT(cellRoomIdx) * 0x48) != '\0') { neighborCount = uVar2; } if ((possibleDoors[doorSlot >> 5] & uVar4) == 0) { @@ -1807,7 +1807,7 @@ LAB_009b1491: } } doorSlot = doorSlot + 1; - uVar4 = uVar4 << 1 | (uint)((int)uVar4 < 0); + uVar4 = uVar4 << 1 | GHIDRA_UINT((GHIDRA_INT(uVar4) < 0)); uVar2 = neighborCount; } while (doorSlot < 8); isPlacementValid = '\0'; @@ -1832,13 +1832,13 @@ LAB_009b1491: } while( true ); LAB_009b1700: resizedRoom = roomCopy; - piVar3 = (int *)((int)*local_f0[0] + iVar1); + piVar3 = (int *)(GHIDRA_INT(*local_f0[0]) + iVar1); if ((*piVar3 == g_levelGenInvalidPos[0]) && (piVar3[1] == g_levelGenInvalidPos[1])) { for (iVar1 = 0; - (piVar3 = (int *)((int)*newShapeOffsets + iVar1), *piVar3 != g_levelGenInvalidPos[0] || + (piVar3 = (int *)(GHIDRA_INT(*newShapeOffsets) + iVar1), *piVar3 != g_levelGenInvalidPos[0] || (piVar3[1] != g_levelGenInvalidPos[1])); iVar1 = iVar1 + 8) { - if (((uint)(*piVar3 + candidatePositions[local_108 * 2]) < 0xd) && - ((uint)(candidatePositions[local_108 * 2 + 1] + piVar3[1]) < 0xd)) { + if ((GHIDRA_UINT((*piVar3 + candidatePositions[local_108 * 2])) < 0xd) && + (GHIDRA_UINT((candidatePositions[local_108 * 2 + 1] + piVar3[1])) < 0xd)) { gridIdx = (candidatePositions[local_108 * 2 + 1] + piVar3[1]) * 0xd + *piVar3 + candidatePositions[local_108 * 2]; } @@ -1858,7 +1858,7 @@ LAB_009b1700: if (local_10c != *(LevelGenerator *)((char *)roomCopy + 0x30)) { do { update_room_neighbors - (generator,(void *)((int)generator[0xd9] + *(int *)((char *)local_10c + 0x10) * 0x48) + (generator,(void *)(GHIDRA_INT(generator[0xd9]) + *(int *)((char *)local_10c + 0x10) * 0x48) ); std:: _Tree_unchecked_const_iterator_>,std::_Iterator_base0> @@ -1872,7 +1872,7 @@ LAB_009b1700: local_104 = (int *)(*(int *)((char *)roomCopy + 8) + *piVar3); uVar2 = *(int *)((char *)roomCopy + 0xc) + piVar3[1]; if ((local_104 < (int *)0xd) && (uVar2 < 0xd)) { - gridIdx = uVar2 * 0xd + (int)local_104; + gridIdx = uVar2 * 0xd + GHIDRA_INT(local_104); if (gridIdx < 0) goto LAB_009b1744; } else { @@ -1900,19 +1900,19 @@ void LevelGenerator::block_room_area(void *room, int unused) placementOffsets = get_room_placement_offsets(*(int *)((char *)room + 0x18)); piVar1 = *placementOffsets; for (cellOffset = 0; - (*(int *)(cellOffset + (int)piVar1) != g_levelGenInvalidPos[0] || - (*(int *)(cellOffset + 4 + (int)piVar1) != g_levelGenInvalidPos[1])); + (*(int *)(cellOffset + GHIDRA_INT(piVar1)) != g_levelGenInvalidPos[0] || + (*(int *)(cellOffset + 4 + GHIDRA_INT(piVar1)) != g_levelGenInvalidPos[1])); cellOffset = cellOffset + 8) { neighborOffset = 0; piVar2 = piVar1; do { - cellX = *(int *)(cellOffset + (int)piVar1) + - *(int *)((int)&DAT_00c35e9c + neighborOffset) + *(int *)((char *)room + 8); + cellX = *(int *)(cellOffset + GHIDRA_INT(piVar1)) + + *(int *)(GHIDRA_INT(&DAT_00c35e9c) + neighborOffset) + *(int *)((char *)room + 8); cellY = *(int *)((char *)room + 0xc) + - *(int *)((int)&DAT_00c35ea0 + neighborOffset) + *(int *)(cellOffset + 4 + (int)piVar1) + *(int *)(GHIDRA_INT(&DAT_00c35ea0) + neighborOffset) + *(int *)(cellOffset + 4 + GHIDRA_INT(piVar1)) ; if (((cellX < 0xd) && (cellY < 0xd)) && (gridIndex = cellY * 0xd + cellX, -1 < gridIndex)) { - *(undefined1 *)(gridIndex + 0x2b8 + (int)this) = 1; + *(undefined1 *)(gridIndex + 0x2b8 + GHIDRA_INT(this)) = 1; piVar1 = *placementOffsets; piVar2 = piVar1; } @@ -1929,7 +1929,7 @@ void LevelGenerator::block_cell(int *param_1) int iVar1; int in_ECX; - if ((((uint)(*param_1 + DAT_00c35e9c) < 0xd) && ((uint)(DAT_00c35ea0 + param_1[1]) < 0xd)) && + if (((GHIDRA_UINT((*param_1 + DAT_00c35e9c)) < 0xd) && (GHIDRA_UINT((DAT_00c35ea0 + param_1[1])) < 0xd)) && (iVar1 = (DAT_00c35ea0 + param_1[1]) * 0xd + *param_1 + DAT_00c35e9c, -1 < iVar1)) { *(undefined1 *)(iVar1 + 0x2b8 + in_ECX) = 1; } @@ -1962,8 +1962,8 @@ void LevelGenerator::block_cells_near_rooms(void *otherLayout, int unused) neighbourByteOffset = 0; do { if ((&(*(undefined1 *)((char *)&(this[0xae]) + 0x0)))[cellIndex] != '\0') break; - neighbourX = *(int *)((int)&DAT_00c35e9c + neighbourByteOffset) + x; - neighbourY = *(int *)((int)&DAT_00c35ea0 + neighbourByteOffset) + y; + neighbourX = *(int *)(GHIDRA_INT(&DAT_00c35e9c) + neighbourByteOffset) + x; + neighbourY = *(int *)(GHIDRA_INT(&DAT_00c35ea0) + neighbourByteOffset) + y; if ((((neighbourX < 0xd) && (neighbourY < 0xd)) && (neighbourIndex = neighbourY * 0xd + neighbourX, -1 < neighbourIndex)) && (-1 < *(int *)((char *)otherLayout + neighbourIndex * 4 + 0x14))) { @@ -1995,16 +1995,16 @@ void LevelGenerator::block_unused_door_cells(void *room, uint *doorMask) do { if (((doorMask[doorSlot >> 5] & doorBit) == 0) && ((get_door_target_position - (&cellX,(int *)((int)room + 8),*(int *)((char *)room + 0x18),doorSlot,1), + (&cellX,(int *)(GHIDRA_INT(room) + 8),*(int *)((char *)room + 0x18),doorSlot,1), cellX != g_levelGenInvalidPos[0] || (cellY != g_levelGenInvalidPos[1])))) { - if (((uint)(cellX + DAT_00c35e9c) < 0xd) && - (((uint)(DAT_00c35ea0 + cellY) < 0xd && + if ((GHIDRA_UINT((cellX + DAT_00c35e9c)) < 0xd) && + ((GHIDRA_UINT((DAT_00c35ea0 + cellY)) < 0xd && (cellIndex = (DAT_00c35ea0 + cellY) * 0xd + cellX + DAT_00c35e9c, -1 < cellIndex)))) { - *(undefined1 *)(cellIndex + 0x2b8 + (int)this) = 1; + *(undefined1 *)(cellIndex + 0x2b8 + GHIDRA_INT(this)) = 1; } } doorSlot = doorSlot + 1; - doorBit = doorBit << 1 | (uint)((int)doorBit < 0); + doorBit = doorBit << 1 | GHIDRA_UINT((GHIDRA_INT(doorBit) < 0)); } while (doorSlot < 8); return; } diff --git a/src/game/level_generator_room.cpp b/src/game/level_generator_room.cpp index 6ac5011..fa5fb71 100644 --- a/src/game/level_generator_room.cpp +++ b/src/game/level_generator_room.cpp @@ -68,7 +68,7 @@ LevelGenerator_Room::LevelGenerator_Room(void *other) *(undefined2 *)((char *)setHead + 0xc) = 0x101; *indexSet = setHead; local_8 = 0; - std_set_uint_copy(indexSet,(void *)((int)other + 0x30),(int)other); + std_set_uint_copy(indexSet,(void *)(GHIDRA_INT(other) + 0x30),GHIDRA_INT(other)); this[0xe] = *(LevelGenerator_Room *)((char *)other + 0x38); *(undefined1 *)(this + 0xf) = *(undefined1 *)((char *)other + 0x3c); this[0x10] = *(LevelGenerator_Room *)((char *)other + 0x40); diff --git a/src/game/lobby.cpp b/src/game/lobby.cpp index cbf8788..7633330 100644 --- a/src/game/lobby.cpp +++ b/src/game/lobby.cpp @@ -27,23 +27,23 @@ void Lobby::refresh_members() local_8 = 0xffffffff; puStack_c = &LAB_00b1371d; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; - members = (int *)((int)this + 0x10); - local_1c = (ulonglong)(uint)local_1c; + members = (int *)(GHIDRA_INT(this) + 0x10); + local_1c = (ulonglong)GHIDRA_UINT(local_1c); FUN_00915d70(members); local_8 = 0; *(int *)((char *)this + 0x14) = *members; (**(code **)(*(int *)this + 0x18))(members,uVar2); memberCount = *(int *)((char *)this + 0x14) - *members >> 3; - bVar5 = oldMembersEnd - (int)oldMember >> 3 != memberCount; + bVar5 = oldMembersEnd - GHIDRA_INT(oldMember) >> 3 != memberCount; uVar2 = 0; if (memberCount != 0) { - iVar4 = *members - (int)oldMember; + iVar4 = *members - GHIDRA_INT(oldMember); do { if (bVar5) goto LAB_00a71cd9; - if ((*oldMember == *(int *)(iVar4 + (int)oldMember)) && - (oldMember[1] == *(int *)(iVar4 + 4 + (int)oldMember))) { + if ((*oldMember == *(int *)(iVar4 + GHIDRA_INT(oldMember))) && + (oldMember[1] == *(int *)(iVar4 + 4 + GHIDRA_INT(oldMember)))) { bVar5 = false; } else { @@ -60,17 +60,17 @@ LAB_00a71cd9: ppuStack_28 = KAGE::Network::Multiplayer::ConstLobby::vftable; iStack_24 = 0; local_20 = (int *)0x0; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((std::shared_ptr *)(&iStack_24))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; uVar2 = 7; ppuStack_28 = KAGE::Network::Multiplayer::Lobby::vftable; if (iStack_24 == 0) { local_1c = 0; - local_1c._4_4_ = 0; - local_1c._0_4_ = 0; - iVar4 = local_1c._4_4_; - iVar3 = (uint)local_1c; + (*(undefined4 *)((char *)&(local_1c) + 0x4)) = 0; + (*(undefined4 *)((char *)&(local_1c) + 0x0)) = 0; + iVar4 = (*(undefined4 *)((char *)&(local_1c) + 0x4)); + iVar3 = GHIDRA_UINT(local_1c); } else { iVar4 = *(int *)(iStack_24 + 0xc); @@ -83,20 +83,20 @@ LAB_00a71cd9: } else { LAB_00a71d47: - uVar2 = local_1c._4_4_; + uVar2 = (*(undefined4 *)((char *)&(local_1c) + 0x4)); } bVar5 = false; LAB_00a71d4c: if ((uVar2 & 1) != 0) { ppuStack_28 = KAGE::Network::Multiplayer::ConstLobby::vftable; - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; if (local_20 != (int *)0x0) { cVar1 = (**(code **)(*local_20 + 0xc))(); if ((cVar1 != '\0') && (g_lobbyReleaseFn != (void *)0x0)) { (*g_lobbyReleaseFn)(&iStack_24); } } - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; } if (bVar5) { memberEvent = 1; @@ -105,15 +105,15 @@ LAB_00a71d4c: ppuStack_28 = (undefined **)0x0; iStack_24 = 0; local_20 = (int *)0x0; - local_8 = CONCAT31(local_8._1_3_,3); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); FUN_00a2a5a0(&memberEvent); if (local_30 != (void *)0x0) { - uVar2 = (int)ppuStack_28 - (int)local_30 & 0xfffffff8; + uVar2 = GHIDRA_INT(ppuStack_28) - GHIDRA_INT(local_30) & 0xfffffff8; ptr = local_30; if (0xfff < uVar2) { ptr = *(void **)((char *)local_30 + -4); uVar2 = uVar2 + 0x23; - if (0x1f < (uint)((int)local_30 + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_30) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } diff --git a/src/game/lobby_list.cpp b/src/game/lobby_list.cpp index 7b0f3bc..0c195e1 100644 --- a/src/game/lobby_list.cpp +++ b/src/game/lobby_list.cpp @@ -6,7 +6,7 @@ void LobbyList::clear() int *piVar1; int *local_8; - ((std::string *)((char *)((int)this + 0xc)))->std::string::assign(&s_empty,0); + ((std::string *)((char *)(GHIDRA_INT(this) + 0xc)))->std::string::assign(&s_empty,0); std::vector<12byte>::clear(); piVar1 = *(int **)this; local_8 = (int *)*piVar1; @@ -21,9 +21,9 @@ void LobbyList::clear() } while (local_8 != piVar1); } std::map::_Erase_tree(this,piVar1[1]); - piVar1[1] = (int)piVar1; - *piVar1 = (int)piVar1; - piVar1[2] = (int)piVar1; + piVar1[1] = GHIDRA_INT(piVar1); + *piVar1 = GHIDRA_INT(piVar1); + piVar1[2] = GHIDRA_INT(piVar1); *(undefined4 *)((char *)this + 4) = 0; return; } diff --git a/src/game/lobby_localhost.cpp b/src/game/lobby_localhost.cpp index 27e3ff1..eb5e570 100644 --- a/src/game/lobby_localhost.cpp +++ b/src/game/lobby_localhost.cpp @@ -25,7 +25,7 @@ void LobbyLocalhost::read_welcome_message(void *data) local_8 = 0xffffffff; puStack_c = &LAB_00b14e3d; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(local_14 + 0x10); + uVar1 = __security_cookie ^ GHIDRA_UINT((local_14 + 0x10)); ExceptionList = &local_10; strncpy(this,"lhwm",4); bufferBegin = (void *)0x0; @@ -56,10 +56,10 @@ void LobbyLocalhost::read_welcome_message(void *data) if (externalData != (void *)0x0) { pvVar2 = externalData; } - *(uint *)((char *)this + 8) = (int)pvVar2 + position; - position = position + (int)data * 8; + *(uint *)((char *)this + 8) = GHIDRA_INT(pvVar2) + position; + position = position + GHIDRA_INT(data) * 8; *(void **)((char *)this + 4) = data; - data = (void *)((int)bufferEnd - (int)bufferBegin); + data = (void *)(GHIDRA_INT(bufferEnd) - GHIDRA_INT(bufferBegin)); if (externalData != (void *)0x0) { data = externalSize; } @@ -85,12 +85,12 @@ void LobbyLocalhost::read_welcome_message(void *data) position = 0; bufferStart = 0; if (bufferBegin != (void *)0x0) { - uVar1 = bufferCapacityEnd - (int)bufferBegin; + uVar1 = bufferCapacityEnd - GHIDRA_INT(bufferBegin); pvVar2 = bufferBegin; if (0xfff < uVar1) { pvVar2 = *(void **)((char *)bufferBegin + -4); uVar1 = uVar1 + 0x23; - if (0x1f < (uint)((int)bufferBegin + (-4 - (int)pvVar2))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(bufferBegin) + (-4 - GHIDRA_INT(pvVar2))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } diff --git a/src/game/lobby_password_prompt.cpp b/src/game/lobby_password_prompt.cpp index 1f4d5db..124ca62 100644 --- a/src/game/lobby_password_prompt.cpp +++ b/src/game/lobby_password_prompt.cpp @@ -16,7 +16,7 @@ void LobbyPasswordPrompt::open(undefined4 param_1, undefined1 param_2, int *para puStack_c = &LAB_00b0ef7d; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; local_8 = 0; if ((*(int *)(in_ECX + 0x34) == 0) || (*(char *)(in_ECX + 0x44) == '\0')) { @@ -77,7 +77,7 @@ void LobbyPasswordPrompt::Update() local_8 = 0xffffffff; puStack_c = &LAB_00b0efb8; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(local_3c + 0x38); + uVar1 = __security_cookie ^ GHIDRA_UINT((local_3c + 0x38)); ExceptionList = &local_10; if ((*(int *)((char *)this + 0x34) != 0) && (*(char *)((char *)this + 0x44) != '\0')) { local_14 = uVar1; @@ -92,7 +92,7 @@ void LobbyPasswordPrompt::Update() manager = g_manager; if (isTriggered != '\0') { if (*(int *)((char *)this + 0x144) == 8) { - KAGE::Network::Multiplayer::ConstLobby::ConstLobby((void *)((int)this + 0x14c)); + KAGE::Network::Multiplayer::ConstLobby::ConstLobby((void *)(GHIDRA_INT(this) + 0x14c)); FUN_0085b160(in_stack_fffffeac,in_stack_fffffeb0,uVar2); local_8 = 0; isTriggered = FUN_0040c790(); @@ -110,7 +110,7 @@ void LobbyPasswordPrompt::Update() local_7c.y = (float)&DAT_bf800000; MessagePopup::MessagePopup (popup,&g_manager->_font2_TeamMeatEx12,(void *)0x0,(void *)0x0,&local_7c); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); MessagePopup::add_ok_button(wrongPassText,popup); ((PopupQueue *)(&(*(undefined1 *)((char *)&(g_manager[1]._gamestate) + 0xcf0))))->PopupQueue::push(popup); local_a8 = 0; @@ -124,7 +124,7 @@ void LobbyPasswordPrompt::Update() } else { NetplayManager::join_pending_lobby - (&g_manager->_netplayManager,(void *)((int)this + 0x14c)); + (&g_manager->_netplayManager,(void *)(GHIDRA_INT(this) + 0x14c)); FUN_009c62c0(); } local_8 = 0xffffffff; diff --git a/src/game/lua_engine.cpp b/src/game/lua_engine.cpp index 99f8b54..97b0408 100644 --- a/src/game/lua_engine.cpp +++ b/src/game/lua_engine.cpp @@ -46,10 +46,10 @@ void LuaEngine::RunScript(int param_2, char param_3) puStack_18 = &LAB_00aff8fd; local_1c = ExceptionList; puStack_20 = local_50 + 0x4c; - local_24 = __security_cookie ^ (uint)(local_50 + 0x40); + local_24 = __security_cookie ^ GHIDRA_UINT((local_50 + 0x40)); ExceptionList = &local_1c; local_ac = (LuaEngine)this; - if (-1 < (int)this[0x587]) { + if (-1 < GHIDRA_INT(this[0x587])) { ((Entity_Player *)((Entity_Player *)this))->Entity_Player::Revive(); } roomData = *(int **)(*(int *)((char *)g_game->_room + 4) + 0x10); @@ -72,7 +72,7 @@ void LuaEngine::RunScript(int param_2, char param_3) this[0x4d3] = (LuaEngine)0x4; this[0x4d4] = (LuaEngine)0xffffffff; ((Entity_Player *)((Entity_Player *)this))->Entity_Player::UpdateBlackHeartMask(); - this[0x55d] = (LuaEngine)((uint)this[0x55d] | 0xffff); + this[0x55d] = (LuaEngine)(GHIDRA_UINT(this[0x55d]) | 0xffff); ((Entity_Player *)((Entity_Player *)this))->Entity_Player::EvaluateItems(); ((Entity_Player *)((Entity_Player *)this))->Entity_Player::update_player_skin(); if (param_3 != '\0') { @@ -135,18 +135,18 @@ void LuaEngine::RunScript(int param_2, char param_3) LAB_007a29c3: game = g_game; uVar6 = g_game->_enterDoor; - if ((int)uVar6 < 0) { + if (GHIDRA_INT(uVar6) < 0) { leaveDoor = 0xffffffff; } else { leaveDoor = uVar6; - if (6 < (int)uVar6) { + if (6 < GHIDRA_INT(uVar6)) { leaveDoor = 7; } } g_game->_leaveDoor = leaveDoor; uVar6 = uVar6 & 0x80000003; - if ((int)uVar6 < 0) { + if (GHIDRA_INT(uVar6) < 0) { uVar6 = (uVar6 - 1 | 0xfffffffc) + 1; } Game::StartRoomTransition @@ -169,13 +169,13 @@ switchD_007a244f_caseD_c: local_14 = 0; KAGE_LogMessage(4,(byte *)"No revival effect associated with collectible %d (%s)\n"); local_14 = 0xffffffff; - if (0xf < (uint)local_28) { - uVar6 = (int)local_28 + 1; - pvVar4 = (void *)local_50._20_4_; + if (0xf < GHIDRA_UINT(local_28)) { + uVar6 = GHIDRA_INT(local_28) + 1; + pvVar4 = (*(undefined4 *)((char *)&((void *)local_50) + 0x14)); if (0xfff < uVar6) { - pvVar4 = *(void **)(local_50._20_4_ + -4); - uVar6 = (int)local_28 + 0x24; - if (0x1f < (uint)(local_50._20_4_ + (-4 - (int)pvVar4))) { + pvVar4 = *(void **)((*(undefined4 *)((char *)&(local_50) + 0x14)) + -4); + uVar6 = GHIDRA_INT(local_28) + 0x24; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_50) + 0x14)) + (-4 - GHIDRA_INT(pvVar4))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -241,7 +241,7 @@ LAB_007a267e: if (this[0x4f0] != (LuaEngine)0x19) { this[0x4f0] = (LuaEngine)0x4; } - this[0x55d] = (LuaEngine)((uint)this[0x55d] | 0xffff); + this[0x55d] = (LuaEngine)(GHIDRA_UINT(this[0x55d]) | 0xffff); ((Entity_Player *)((Entity_Player *)this))->Entity_Player::EvaluateItems(); ((Entity_Player *)((Entity_Player *)this))->Entity_Player::update_player_skin(); if (param_3 != '\0') { @@ -266,7 +266,7 @@ LAB_007a267e: this[0x763] = (LuaEngine)0x0; this[0x762] = (LuaEngine)0x0; this[0x769] = (LuaEngine)0x0; - if ((int)this[0x4d0] < 1) { + if (GHIDRA_INT(this[0x4d0]) < 1) { iVar7 = ((Entity_Player *)((Entity_Player *)this))->Entity_Player::GetHealthType(); if (iVar7 == 4) { this[0x4d1] = (LuaEngine)0x0; @@ -318,7 +318,7 @@ LAB_007a267e: ((Entity_Player *)((Entity_Player *)this))->Entity_Player::RemoveSkinCostume(); } pvVar4 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar4 & 0xfffffffcU) < + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar4) & 0xfffffffcU)) < 0x531) { item = (ItemConfig_Item *)0x0; } @@ -331,14 +331,14 @@ LAB_007a267e: this[0x4d4] = (LuaEngine)0x0; this[0x4d2] = (LuaEngine)0x0; LVar5 = (LuaEngine)0x2; - if (2 < (int)this[0x4d0] + -2) { - LVar5 = (LuaEngine)((int)this[0x4d0] + -2); + if (2 < GHIDRA_INT(this[0x4d0]) + -2) { + LVar5 = (LuaEngine)(GHIDRA_INT(this[0x4d0]) + -2); } this[0x763] = (LuaEngine)0x0; this[0x4d0] = LVar5; this[0x762] = (LuaEngine)0x0; pLVar2 = &local_ac; - if ((int)LVar5 < 3) { + if (GHIDRA_INT(LVar5) < 3) { pLVar2 = this + 0x4d0; } this[0x769] = (LuaEngine)0x0; @@ -352,9 +352,9 @@ LAB_007a267e: this[0x4f0] = (LuaEngine)0xb; } manager = g_manager; - this[0x55d] = (LuaEngine)((uint)this[0x55d] | 0xffff); + this[0x55d] = (LuaEngine)(GHIDRA_UINT(this[0x55d]) | 0xffff); pvVar4 = (manager->_itemConfig)._nullItems._begin; - if ((0xc4 < (int)((int)(manager->_itemConfig)._nullItems._end - (int)pvVar4 & 0xfffffffcU)) && + if ((0xc4 < GHIDRA_INT((GHIDRA_INT((manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar4) & 0xfffffffcU))) && (fVar8 = *(float *)((char *)pvVar4 + 0xc4), fVar8 != 0.0)) { local_2c = *(float *)((char *)fVar8 + 0x78); local_30 = 0.0; @@ -394,7 +394,7 @@ LAB_007a267e: ((Game *)(g_game))->Game::Spawn(1000,0x90,(Vector *)(this + 0xcf),&g_vectorZero,(Entity *)0x0,2,uVar6); uVar6 = Random(); (spawnedEffect->_sprite)._rotation = - (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * 2.3283064e-10 + (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 360.0; iVar7 = *(int *)spawnedEffect; fVar8 = g_vectorOne.x * 1.5; @@ -405,11 +405,11 @@ LAB_007a267e: manager = g_manager; local_ac = (LuaEngine)0x50; seed_fart_sound_override((int *)&local_ac); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_ac,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_ac),1.0,2,0,1.0,0.0); manager = g_manager; local_ac = (LuaEngine)0x10a; seed_fart_sound_override((int *)&local_ac); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_ac,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_ac),1.0,2,0,1.0,0.0); ((Game *)(g_game))->Game::ShakeScreen(0xe); } else { @@ -421,7 +421,7 @@ LAB_007a267e: this[0x763] = (LuaEngine)0x0; this[0x762] = (LuaEngine)0x0; this[0x769] = (LuaEngine)0x0; - if ((int)this[0x4d0] < 1) { + if (GHIDRA_INT(this[0x4d0]) < 1) { iVar7 = ((Entity_Player *)((Entity_Player *)this))->Entity_Player::GetHealthType(); if (iVar7 == 4) { this[0x4d1] = (LuaEngine)0x0; @@ -463,11 +463,11 @@ LAB_007a267e: if ((LVar5 == (LuaEngine)0x10) || (LVar5 == (LuaEngine)0x23)) { local_ac = (LuaEngine)0x1b; seed_fart_sound_override((int *)&local_ac); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_ac,1.25,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_ac),1.25,2,0,1.0,0.0); manager = g_manager; local_ac = (LuaEngine)0x50; seed_fart_sound_override((int *)&local_ac); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_ac,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_ac),1.0,2,0,1.0,0.0); ((Color *)(&local_7c))->Color::Color(); local_ac = (LuaEngine)0xf; iVar7 = 0x7a2e79; @@ -482,7 +482,7 @@ LAB_007a2e82: if (((LVar5 == (LuaEngine)0xa) || (LVar5 == (LuaEngine)0x1f)) || (LVar5 == (LuaEngine)0x27)) { local_ac = (LuaEngine)0x50; seed_fart_sound_override((int *)&local_ac); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_ac,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_ac),1.0,2,0,1.0,0.0); uVar6 = Random(); iVar7 = 0xf; ((Game *)(g_game))->Game::Spawn(1000,0xf,(Vector *)(this + 0xcf),&g_vectorZero,(Entity *)0x0,0,uVar6); @@ -491,11 +491,11 @@ LAB_007a2e82: } local_ac = (LuaEngine)0x1c; seed_fart_sound_override((int *)&local_ac); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_ac,1.25,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_ac),1.25,2,0,1.0,0.0); manager = g_manager; local_ac = (LuaEngine)0x50; seed_fart_sound_override((int *)&local_ac); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_ac,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_ac),1.0,2,0,1.0,0.0); uVar6 = Random(); position = (Vector *)(this + 0xcf); ((Game *)(g_game))->Game::Spawn(1000,2,position,&g_vectorZero,(Entity *)0x0,3,uVar6); @@ -512,11 +512,11 @@ LAB_007a2e82: Game::DamageRadius((Vector *)(this + 0xcf),(Entity *)this,0,0,iVar7,50.0,g_tearFlagsNone,35.0, 60.0); } - pLVar2 = (LuaEngine *)((int)this + 0x13bc); + pLVar2 = (LuaEngine *)(GHIDRA_INT(this) + 0x13bc); *(byte *)((char *)this + 0x171) = 1; local_ac = (LuaEngine)0x5a; pLVar3 = &local_ac; - if (0x59 < (int)*pLVar2) { + if (0x59 < GHIDRA_INT(*pLVar2)) { pLVar3 = pLVar2; } *pLVar2 = *pLVar3; @@ -560,13 +560,13 @@ void LuaEngine::Init(byte Debug) void *mainHeap; uVar7 = GetTimeNs(); - timeNsHigh = (uint)(uVar7 >> 0x20); + timeNsHigh = GHIDRA_UINT((uVar7 >> 0x20)); uVar2 = (ulonglong)timeNsHigh * 0xd7b634db + ((uVar7 & 0xffffffff) * 0xd7b634db >> 0x20); - uVar6 = (uint)(uVar2 >> 0x20); - uVar5 = (uint)((uVar7 & 0xffffffff) * 0x431bde82 + (uVar2 & 0xffffffff) >> 0x20); + uVar6 = GHIDRA_UINT((uVar2 >> 0x20)); + uVar5 = GHIDRA_UINT(((uVar7 & 0xffffffff) * 0x431bde82 + (uVar2 & 0xffffffff) >> 0x20)); lVar3 = (ulonglong)timeNsHigh * 0x431bde82 + (ulonglong)CONCAT14(CARRY4(uVar6,uVar5),uVar6 + uVar5); - uVar5 = (uint)lVar3 >> 0x12 | (int)((ulonglong)lVar3 >> 0x20) * 0x4000; + uVar5 = GHIDRA_UINT(lVar3) >> 0x12 | GHIDRA_INT(((ulonglong)lVar3 >> 0x20)) * 0x4000; uVar5 = uVar5 ^ uVar5 >> 4; uVar5 = (uVar5 ^ 0xdeadbeef) + uVar5 * 0x20; this[8] = (LuaEngine)(uVar5 >> 0xb ^ uVar5); @@ -609,7 +609,7 @@ void LuaEngine::Init(byte Debug) allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } refBlock = malloc(0xc); if (refBlock == (undefined4 *)0x0) { @@ -619,10 +619,10 @@ LAB_00860699: } else { allocatedBefore = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes + 0xc; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) + 0xc; *refBlock = 0xc; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) + (uint)(0xfffffff3 < (uint)allocatedBefore); + *(uint *)((char *)allocatedBytes + 4) + GHIDRA_UINT((0xfffffff3 < GHIDRA_UINT(allocatedBefore))); LVar4 = (LuaEngine)(refBlock + 1); if (LVar4 == (LuaEngine)0x0) goto LAB_00860699; LVar1 = this[6]; @@ -637,7 +637,7 @@ LAB_00860699: allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(mainHeap) + 0x30); } refBlock = malloc(0xc); if (refBlock == (undefined4 *)0x0) { @@ -645,10 +645,10 @@ LAB_00860699: } else { allocatedBefore = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes + 0xc; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) + 0xc; *refBlock = 0xc; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) + (uint)(0xfffffff3 < (uint)allocatedBefore); + *(uint *)((char *)allocatedBytes + 4) + GHIDRA_UINT((0xfffffff3 < GHIDRA_UINT(allocatedBefore))); LVar4 = (LuaEngine)(refBlock + 1); if (LVar4 != (LuaEngine)0x0) { LVar1 = this[6]; @@ -687,7 +687,7 @@ int LuaEngine::PreNPCCollision(Entity_NPC *npc, Entity *collider, byte low) puStack_c = &LAB_00b03d40; local_10 = ExceptionList; - uStack_3c = __security_cookie ^ (int)register0x00000010 - 4U; + uStack_3c = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; local_14 = (undefined1 *)&uStack_3c; ExceptionList = &local_10; if ((**(uint **)g_luaEngine & 0x40000000) != 0) { @@ -815,7 +815,7 @@ void LuaEngine::PostKnifeInit(Entity_Knife *knife) puStack_c = &LAB_00b03e80; local_10 = ExceptionList; - uStack_3c = __security_cookie ^ (int)register0x00000010 - 4U; + uStack_3c = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; local_14 = (undefined1 *)&uStack_3c; ExceptionList = &local_10; if ((*(uint *)(*(int *)g_luaEngine + 4) & 0x40000) != 0) { @@ -1098,7 +1098,7 @@ int LuaEngine::PreTearCollision(Entity_Tear *tear, Entity *collider, byte low) puStack_c = &LAB_00b04060; local_10 = ExceptionList; - uStack_3c = __security_cookie ^ (int)register0x00000010 - 4U; + uStack_3c = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; local_14 = (undefined1 *)&uStack_3c; ExceptionList = &local_10; if ((*(uint *)(*(int *)g_luaEngine + 4) & 0x400) != 0) { @@ -1144,7 +1144,7 @@ int LuaEngine::PrePickupCollision(Entity_Pickup *pickup, Entity *collider, byte puStack_c = &LAB_00b040e0; local_10 = ExceptionList; - uStack_3c = __security_cookie ^ (int)register0x00000010 - 4U; + uStack_3c = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; local_14 = (undefined1 *)&uStack_3c; ExceptionList = &local_10; if ((*(byte *)(*(int *)g_luaEngine + 4) & 0x40) != 0) { @@ -1187,7 +1187,7 @@ void LuaEngine::PostRender() puStack_c = &LAB_00b04140; local_10 = ExceptionList; - uStack_3c = __security_cookie ^ (int)register0x00000010 - 4U; + uStack_3c = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; local_14 = (undefined1 *)&uStack_3c; ExceptionList = &local_10; if ((**(byte **)g_luaEngine & 4) != 0) { @@ -1219,7 +1219,7 @@ byte LuaEngine::UseItem(int collectibleType, RNG *rng, Entity_Player *player, ui puStack_c = &LAB_00b04180; local_10 = ExceptionList; - uStack_4c = __security_cookie ^ (int)register0x00000010 - 4U; + uStack_4c = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; local_14 = (undefined1 *)&uStack_4c; ExceptionList = &local_10; isShowAnim = 0; @@ -1295,7 +1295,7 @@ void LuaEngine::UsePill(int pillEffect, Entity_Player *player, uint useFlags) puStack_c = &LAB_00b041e0; local_10 = ExceptionList; - uStack_40 = __security_cookie ^ (int)register0x00000010 - 4U; + uStack_40 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; local_14 = (undefined1 *)&uStack_40; ExceptionList = &local_10; if ((**(uint **)g_luaEngine & 0x400) != 0) { @@ -1320,7 +1320,7 @@ void LuaEngine::EvaluateItems(Entity_Player *player, int cacheFlag) puStack_c = &LAB_00b04200; local_10 = ExceptionList; - uStack_3c = __security_cookie ^ (int)register0x00000010 - 4U; + uStack_3c = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; local_14 = (undefined1 *)&uStack_3c; ExceptionList = &local_10; if ((**(uint **)g_luaEngine & 0x100) != 0) { @@ -1345,7 +1345,7 @@ void LuaEngine::PostPlayerInit(Entity_Player *player) puStack_c = &LAB_00b04240; local_10 = ExceptionList; - uStack_3c = __security_cookie ^ (int)register0x00000010 - 4U; + uStack_3c = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; local_14 = (undefined1 *)&uStack_3c; ExceptionList = &local_10; if ((**(uint **)g_luaEngine & 0x200) != 0) { @@ -1455,7 +1455,7 @@ void LuaEngine::PostGameStart(uint state) puStack_c = &LAB_00b04360; local_10 = ExceptionList; - uStack_40 = __security_cookie ^ (int)register0x00000010 - 4U; + uStack_40 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; local_14 = (undefined1 *)&uStack_40; ExceptionList = &local_10; if ((**(uint **)g_luaEngine & 0x8000) != 0) { @@ -1530,7 +1530,7 @@ void LuaEngine::PostEntityKill(Entity *ent) puStack_c = &LAB_00b04550; local_10 = ExceptionList; - uStack_40 = __security_cookie ^ (int)register0x00000010 - 4U; + uStack_40 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; local_14 = (undefined1 *)&uStack_40; ExceptionList = &local_10; callbackId = 0x44; @@ -1606,18 +1606,18 @@ void LuaEngine::RegisterAPI() puStack_c = &LAB_00b04a88; local_10 = ExceptionList; ExceptionList = &local_10; - luaBuilder = FUN_0085dab0(__security_cookie ^ (uint)(local_30 + 0x2c)); + luaBuilder = FUN_0085dab0(__security_cookie ^ GHIDRA_UINT((local_30 + 0x2c))); local_8 = 0; luabridge::Namespace::Class::Class("EntityPtr",luaBuilder); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; lua_pushcclosure(local_20,FUN_008bb1c0,0); FUN_0085bf90("__call"); FUN_008a06a0(EntityPtr::SetReference); luaBuilder = FUN_00875130(&DAT_00b701d8,EntityPtr::Ref); FUN_0085d910(luaBuilder); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; FUN_0085cce0(local_4c); - local_8 = CONCAT31(local_8._1_3_,3); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); FUN_0085cce0(local_1c); local_8 = 4; FUN_0085cce0(local_44); @@ -1625,7 +1625,7 @@ void LuaEngine::RegisterAPI() luaBuilder = FUN_0085dab0(); local_8 = 5; luabridge::Namespace::Class::Class("Vector",luaBuilder); - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; lua_pushcclosure(local_18,FUN_008bb260,0); FUN_0085bf90("__call"); FUN_008a05a0(Vector::Normalize); @@ -1656,9 +1656,9 @@ void LuaEngine::RegisterAPI() FUN_00875230(&DAT_00b6a748,0,1); luaBuilder = FUN_00875230(&DAT_00b6d134,4,1); FUN_0085d910(luaBuilder); - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; FUN_0085cce0(local_4c); - local_8 = CONCAT31(local_8._1_3_,8); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),8); FUN_0085cce0(local_14); local_8 = 9; FUN_0085cce0(local_44); @@ -1666,7 +1666,7 @@ void LuaEngine::RegisterAPI() luaBuilder = FUN_0085dab0(); local_8 = 10; luabridge::Namespace::Class::Class("KColor",luaBuilder); - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; lua_pushcclosure(local_28,FUN_008bb3b0,0); FUN_0085bf90("__call"); FUN_008753a0("Alpha",0xc,1); @@ -1674,9 +1674,9 @@ void LuaEngine::RegisterAPI() FUN_008753a0("Green",4,1); luaBuilder = FUN_008753a0(&DAT_00b634c0,8,1); FUN_0085d910(luaBuilder); - local_8._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc; luabridge::Namespace::Class::Class("FontRenderSettings",local_50); - local_8._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xd; lua_pushcclosure(local_18,FUN_008bb4f0,0); FUN_0085bf90("__call"); FUN_0089fe80(Font::SetAlignment); @@ -1692,9 +1692,9 @@ void LuaEngine::RegisterAPI() FUN_0089fae0(Font::SetMissingCharacterOverride); FUN_0089fa40(Room::GetGridHeight); FUN_0085d910(&local_18); - local_8._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xe; luabridge::Namespace::Class::Class(&DAT_00b70424,local_48); - local_8._0_1_ = 0xf; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xf; lua_pushcclosure(local_20,FUN_008bb570,0); FUN_0085bf90("__call"); FUN_0089f9e0(Font::Load); @@ -1707,17 +1707,17 @@ void LuaEngine::RegisterAPI() FUN_0089f660(Font::DrawString); FUN_0089f600(Font::SetMissingCharacter); FUN_0085d910(&local_20); - local_8._0_1_ = 0x10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x10; FUN_0085cce0(local_8c); - local_8._0_1_ = 0x11; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x11; FUN_0085cce0(local_1c); - local_8._0_1_ = 0x12; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x12; FUN_0085cce0(local_44); - local_8._0_1_ = 0x13; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x13; FUN_0085cce0(local_14); - local_8._0_1_ = 0x14; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x14; FUN_0085cce0(local_4c); - local_8 = CONCAT31(local_8._1_3_,0x15); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x15); FUN_0085cce0(local_24); local_8 = 0x16; FUN_0085cce0(local_2c); @@ -1725,7 +1725,7 @@ void LuaEngine::RegisterAPI() luaBuilder = FUN_0085dab0(); local_8 = 0x17; luabridge::Namespace::Class::Class("Color",luaBuilder); - local_8._0_1_ = 0x18; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x18; lua_pushcclosure(local_28,FUN_008bb5c0,0); FUN_0085bf90("__call"); FUN_00875510(&DAT_00b70450,Color::R,FUN_005cd370); @@ -1745,9 +1745,9 @@ void LuaEngine::RegisterAPI() FUN_0085bf90(&DAT_00b70244); FUN_0089f250(Color::__mul); FUN_0085d910(puVar1); - local_8._0_1_ = 0x19; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x19; FUN_0085cce0(local_2c); - local_8 = CONCAT31(local_8._1_3_,0x1a); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x1a); FUN_0085cce0(local_24); local_8 = 0x1b; FUN_0085cce0(local_8c); @@ -1755,7 +1755,7 @@ void LuaEngine::RegisterAPI() luaBuilder = FUN_0085dab0(); local_8 = 0x1c; luabridge::Namespace::Class::Class("Sprite",luaBuilder); - local_8._0_1_ = 0x1d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1d; lua_pushcclosure(local_18,FUN_008bb720,0); FUN_0085bf90("__call"); FUN_0089f1b0(Sprite::IsFinished); @@ -1803,9 +1803,9 @@ void LuaEngine::RegisterAPI() FUN_0089edd0(Sprite::GetAnimation); FUN_0089edd0(Sprite::GetOverlayAnimation); FUN_0085d910(luaBuilder); - local_8._0_1_ = 0x1e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1e; FUN_0085cce0(local_2c); - local_8 = CONCAT31(local_8._1_3_,0x1f); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x1f); FUN_0085cce0(local_14); local_8 = 0x20; FUN_0085cce0(local_8c); @@ -1813,7 +1813,7 @@ void LuaEngine::RegisterAPI() luaBuilder = FUN_0085dab0(); local_8 = 0x21; luabridge::Namespace::Class::Class("EntityRef",luaBuilder); - local_8 = CONCAT31(local_8._1_3_,0x22); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x22); lua_pushcclosure(local_28,FUN_008bb770,0); FUN_0085bf90("__call"); luabridge::Namespace::Class::addData_Type(&DAT_00b6d1a4,0,1); @@ -1832,7 +1832,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x23; FUN_00876530(local_30,&DAT_00b70764); - local_8 = CONCAT31(local_8._1_3_,0x24); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x24); FUN_00876550(); FUN_008765a0("GetSeed",EntityPtr::Ref); FUN_00876650("SetSeed",RNG::SetSeed); @@ -1847,7 +1847,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x25; FUN_008767d0(local_c0,"ProjectileParams"); - local_8 = CONCAT31(local_8._1_3_,0x26); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x26); FUN_008767f0(); luabridge::Namespace::Class::addData_GridCollision("GridCollision",0,1); FUN_008769c0("HeightModifier",4,1); @@ -1880,7 +1880,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x27; FUN_00877100(local_c8,"BitSet128"); - local_8 = CONCAT31(local_8._1_3_,0x28); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x28); FUN_00877120(); FUN_00877170("__band",BitSet128::__band); FUN_00877170("__bor",BitSet128::__bor); @@ -1900,7 +1900,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x29; FUN_00877660(local_70,"PathFinder"); - local_8 = CONCAT31(local_8._1_3_,0x2a); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x2a); FUN_00877680("Reset",PathFinder::Reset); FUN_008776e0("MoveRandomly",PathFinder::MoveRandomly); FUN_00877740("MoveRandomlyBoss",PathFinder::MoveRandomlyBoss); @@ -1922,9 +1922,9 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x2b; FUN_0085da00(local_70,"ItemConfig"); - local_8._0_1_ = 0x2c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2c; FUN_00877ae0(local_78,&DAT_00b70a1c); - local_8 = CONCAT31(local_8._1_3_,0x2d); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x2d); FUN_00877b00(&DAT_00b6d1bc,0,1); FUN_00877b00("AchievementID",4,1); FUN_00877c70(&DAT_00b1b350,8,1); @@ -1948,9 +1948,9 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x2e; FUN_0085da00(local_78,"ItemConfig"); - local_8._0_1_ = 0x2f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2f; FUN_00878490(local_80,"PillEffect"); - local_8 = CONCAT31(local_8._1_3_,0x30); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x30); FUN_008784b0(&DAT_00b6d1bc,0,1); FUN_008784b0("AchievementID",4,1); luabridge::Namespace::Class::addData_Name(&DAT_00b1b350,8,1); @@ -1971,9 +1971,9 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x31; FUN_0085da00(local_80,"ItemConfig"); - local_8._0_1_ = 0x32; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x32; FUN_00878cb0(local_88,&DAT_00b67800); - local_8 = CONCAT31(local_8._1_3_,0x33); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x33); FUN_00878cd0("IsCollectible",Item::IsCollectible); FUN_00878cd0("IsTrinket",Item::IsTrinket); FUN_00878cd0("IsNull",Item::IsNull); @@ -2018,9 +2018,9 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x34; FUN_0085da00(local_88,"ItemConfig"); - local_8._0_1_ = 0x35; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x35; FUN_00879a10(local_58,"Costume"); - local_8 = CONCAT31(local_8._1_3_,0x36); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x36); FUN_00879a30(&DAT_00b6d1bc,0,1); luabridge::Namespace::Class::addData_Anm2Path("Anm2Path",4,1); FUN_00879a30("Priority",0x1c,1); @@ -2042,9 +2042,9 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x37; FUN_0085da00(local_58,"ItemConfig"); - local_8._0_1_ = 0x38; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x38; FUN_0087ac50(local_98,"Config"); - local_8 = CONCAT31(local_8._1_3_,0x39); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x39); FUN_0087ac70("IsValidCollectible",ItemConfig::IsValidCollectible); FUN_0087acd0("GetCollectible",ItemConfig::GetCollectible); FUN_0087acd0("GetTrinket",ItemConfig::GetTrinket); @@ -2066,7 +2066,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x3a; FUN_0087b130(local_a0,"TearParams"); - local_8 = CONCAT31(local_8._1_3_,0x3b); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x3b); FUN_0087b150("TearVariant",0,1); FUN_0087b150("BombVariant",4,1); luabridge::Namespace::Class::addData_TearColor("TearColor",8,1); @@ -2082,7 +2082,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x3c; FUN_0087b730(local_a8,"QueueItemData"); - local_8 = CONCAT31(local_8._1_3_,0x3d); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x3d); luabridge::Namespace::Class::addData_Item(&DAT_00b67800,0,1); luabridge::Namespace::Class::addData_Charge("Charge",4,1); luabridge::Namespace::Class::addProperty_Touched @@ -2096,7 +2096,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x3e; FUN_0087bee0(local_68,"TemporaryEffect"); - local_8 = CONCAT31(local_8._1_3_,0x3f); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x3f); luabridge::Namespace::Class::addData_Item(&DAT_00b67800,0,1); FUN_0087c090("Count",4,1); FUN_0087c090("Cooldown",8,1); @@ -2109,7 +2109,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x40; FUN_0087c510(local_40,"TemporaryEffects"); - local_8 = CONCAT31(local_8._1_3_,0x41); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x41); FUN_0087c530("AddCollectibleEffect",TemporaryEffects::AddCollectibleEffect); FUN_0087c590("AddTrinketEffect",TemporaryEffects::AddTrinketEffect); FUN_0087c5f0("AddNullEffect",TemporaryEffects::AddNullEffect); @@ -2135,9 +2135,9 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x42; FUN_0085da00(local_40,"CppContainer"); - local_8._0_1_ = 0x43; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x43; FUN_0087ce60(local_38,"EntityList"); - local_8 = CONCAT31(local_8._1_3_,0x44); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x44); FUN_0087ce80(s_Size,EntityList::Size); FUN_0087cfb0("__len",EntityList::Size); FUN_0087d060(s_Get,EntityList::Get); @@ -2150,15 +2150,15 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x45; FUN_0085da00(local_68,"PlayerTypes"); - local_8._0_1_ = 0x46; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x46; FUN_0087d110(local_40,"PosVel"); - local_8._0_1_ = 0x47; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x47; FUN_0087d130("Position",0,1); FUN_0087d130("Velocity",8,1); FUN_00872510(local_38); - local_8._0_1_ = 0x48; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x48; FUN_0087d2a0(local_60,"ActiveItemDesc"); - local_8 = CONCAT31(local_8._1_3_,0x49); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x49); FUN_0087d2c0(&DAT_00b67800,0,1); FUN_0087d2c0("Charge",8,1); FUN_0087d2c0("BatteryCharge",0xc,1); @@ -2177,7 +2177,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x4a; FUN_0087d5b0(&local_20,"Entity"); - local_8._0_1_ = 0x4b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x4b; luabridge::Namespace::Class::addData_Friction("Friction",0x36c,1); FUN_0087d750("GetData",Entity::GetData); FUN_0087d7b0("Position",Entity::Position,Entity::SetPosition); @@ -2282,9 +2282,9 @@ void LuaEngine::RegisterAPI() FUN_0087fc70("ToTear"); FUN_0087fd10("ToProjectile"); FUN_00872510(&local_28); - local_8._0_1_ = 0x4c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x4c; FUN_0087fdb0(local_48,"EntityTear"); - local_8._0_1_ = 0x4d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x4d; FUN_0087fdd0("Height",Entity_Tear::Height,Entity_Projectile::SetHeight); FUN_0087fdd0("FallingSpeed",Entity_Tear::FallingSpeed,FUN_00444c70); FUN_0087fdd0("FallingAcceleration",Entity_Tear::FallingAcceleration, @@ -2314,9 +2314,9 @@ void LuaEngine::RegisterAPI() FUN_00880b80("PosDisplacement",Entity_Tear::PosDisplacement); FUN_00880710("ParentOffset",0x7f4,1); FUN_00872510(local_50); - local_8._0_1_ = 0x4e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x4e; FUN_00880c80(entityPlayerClass,"EntityPlayer"); - local_8._0_1_ = 0x4f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x4f; FUN_00880ca0("RenderGlow",Entity_Player::RenderGlow); FUN_00880ca0("RenderBody",Entity_Player::RenderBody); FUN_00880ca0("RenderHead",Entity_Player::RenderHead); @@ -2600,9 +2600,9 @@ void LuaEngine::RegisterAPI() FUN_00884240("SamsonBerserkCharge",0x209c,1); FUN_00883940("IBSCharge",0x20a0,1); FUN_00872510(local_30); - local_8._0_1_ = 0x50; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x50; FUN_00884930(local_c0,"EntityPickup"); - local_8._0_1_ = 0x51; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x51; FUN_00884950("Morph",Entity_Pickup::Morph); FUN_008849b0("Charge",Entity_Pickup::Charge,FUN_005b1920); FUN_00884b20("IsShopItem",Entity_Pickup::IsShopItem); @@ -2621,9 +2621,9 @@ void LuaEngine::RegisterAPI() FUN_00884c70("AutoUpdatePrice",Entity_Pickup::AutoUpdatePrice,FUN_0071df70); luabridge::Namespace::Class::addData_State("State",0x584,1); FUN_00872510(local_c8); - local_8._0_1_ = 0x52; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x52; FUN_00885020(local_70,"EntityEffect"); - local_8._0_1_ = 0x53; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x53; FUN_00885040("SetTimeout",Entity_Effect::SetTimeout); FUN_008850a0("Rotation",Entity_Effect::Rotation,Entity_Effect::set_rotation); FUN_00885210("FollowParent",Entity_Effect::FollowParent); @@ -2644,9 +2644,9 @@ void LuaEngine::RegisterAPI() luabridge::Namespace::Class::addData_ParentOffset("ParentOffset",0x468,1); FUN_008854a0("DamageSource",0x470,1); FUN_00872510(local_78); - local_8._0_1_ = 0x54; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x54; FUN_00885910(local_80,"EntityFamiliar"); - local_8._0_1_ = 0x55; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x55; FUN_00885930("AddCoins",Entity_Familiar::AddCoins); FUN_00885930("AddHearts",Entity_Familiar::AddHearts); FUN_00885930("AddKeys",Entity_Familiar::AddKeys); @@ -2688,9 +2688,9 @@ void LuaEngine::RegisterAPI() FUN_008863e0("IsDelayed",0xd75,1); FUN_008863e0("IsFollower",0xd74,1); FUN_00872510(local_88); - local_8._0_1_ = 0x56; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x56; FUN_00886550(local_58,"EntityProjectile"); - local_8._0_1_ = 0x57; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x57; FUN_00886570("Height",Entity_Tear::Height,FUN_00450880); FUN_008866e0("AddHeight",Entity_Projectile::AddHeight); FUN_00886570("FallingSpeed",Entity_Tear::FallingSpeed,FUN_00444c70); @@ -2714,9 +2714,9 @@ void LuaEngine::RegisterAPI() FUN_00886570("DepthOffset",Entity::DepthOffset,set_field_358); FUN_00886570("Damage",Entity_Projectile::Damage,FUN_0085e340); FUN_00872510(local_98); - local_8._0_1_ = 0x58; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x58; FUN_00886a80(local_a0,"EntityNPC"); - local_8._0_1_ = 0x59; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x59; FUN_00886aa0("Morph",Entity_NPC::Morph); FUN_00886b00("KillUnique",Entity_NPC::KillUnique); luabridge::Namespace::Class::addProperty_CanShutDoors @@ -2758,9 +2758,9 @@ void LuaEngine::RegisterAPI() FUN_008877e0(&DAT_00b72c64,0xbc4,1); FUN_008877e0("GroupIdx",0xc7c,1); FUN_00872510(local_a8); - local_8._0_1_ = 0x5a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x5a; FUN_00887dc0(local_68,"EntityBomb"); - local_8._0_1_ = 0x5b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x5b; luabridge::Namespace::Class::addProperty_Flags ("Flags",Entity_Bomb::Flags,FUN_006a6910); luabridge::Namespace::Class::addProperty_IsFetus @@ -2770,9 +2770,9 @@ void LuaEngine::RegisterAPI() FUN_00888260("SetExplosionCountdown",Entity_Bomb::SetExplosionCountdown); FUN_008880f0("RadiusMultiplier",Entity_Bomb::RadiusMultiplier,FUN_00435e70); FUN_00872510(local_40); - local_8._0_1_ = 0x5c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x5c; FUN_008882c0(local_38,"EntityLaser"); - local_8._0_1_ = 0x5d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x5d; FUN_008882e0("ShootAngle",Entity_Laser::ShootAngle); luabridge::Namespace::Class::addProperty_TearFlags ("TearFlags",Entity_Tear::TearFlags,FUN_00456830); @@ -2818,9 +2818,9 @@ void LuaEngine::RegisterAPI() FUN_00889050("OneHit",0x515,1); FUN_00889050("GridHit",0x516,1); FUN_00872510(local_60); - local_8._0_1_ = 0x5e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x5e; FUN_00889940(local_b0,"EntityKnife"); - local_8 = CONCAT31(local_8._1_3_,0x5f); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x5f); luabridge::Namespace::Class::addProperty_TearFlags ("TearFlags",Entity_Knife::TearFlags,FUN_005cd5c0); FUN_00889ae0("Rotation",Entity_Knife::Rotation,FUN_005b15d0); @@ -2866,7 +2866,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x60; FUN_0088a0e0(local_b8,"GridEntityDesc"); - local_8 = CONCAT31(local_8._1_3_,0x61); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x61); FUN_0088a100(&DAT_00b6d1a4,0,1); FUN_0088a270("Variant",4,1); FUN_0088a100("State",8,1); @@ -2883,7 +2883,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x62; FUN_0088a560(local_70,"GridEntity"); - local_8._0_1_ = 99; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 99; FUN_0088a580("Position",GridEntity::Position); FUN_0088a680("SetType",GridEntity::SetType); FUN_0088a6e0("SetVariant",GridEntity::SetVariant); @@ -2914,9 +2914,9 @@ void LuaEngine::RegisterAPI() FUN_0088b4a0("ToSpikes"); FUN_0088b540("ToTNT"); FUN_00872510(local_78); - local_8._0_1_ = 100; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 100; FUN_0088b5e0(local_80,"GridEntityDoor"); - local_8._0_1_ = 0x65; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x65; FUN_0088b600("Direction",GridEntity_Door::Direction,FUN_00711530); FUN_0088b600("TargetRoomIndex",GridEntity_Door::TargetRoomIndex,FUN_00738150); FUN_0088b770("SetRoomTypes",GridEntity_Door::SetRoomTypes); @@ -2950,26 +2950,26 @@ void LuaEngine::RegisterAPI() luabridge::Namespace::Class::addData("LockedAnimation",0x3d4,1); luabridge::Namespace::Class::addData("OpenLockedAnimation",0x3ec,1); FUN_00872510(local_88); - local_8._0_1_ = 0x66; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x66; FUN_0088c440(local_58,"GridEntityPoop"); - local_8._0_1_ = 0x67; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x67; FUN_0088c460("RespawnRedPoop",GridEntity_Poop::RespawnRedPoop); FUN_0088c460("ReduceSpawnRate",GridEntity_Poop::ReduceSpawnRate); luabridge::Namespace::Class::addData_ReviveTimer("ReviveTimer",0x154,1); luabridge::Namespace::Class::addData_StateAnimation("StateAnimation",0x158,1); luabridge::Namespace::Class::addData_UnderPlayer("UnderPlayer",0x170,1); FUN_00872510(local_98); - local_8._0_1_ = 0x68; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x68; FUN_0088c940(local_a0,"GridEntityPit"); - local_8._0_1_ = 0x69; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x69; FUN_0088c960("MakeBridge",GridEntity_Pit::MakeBridge); FUN_0088c9c0("SetLadder",GridEntity_Pit::SetLadder); FUN_0088ca20("UpdateCollision",GridEntity_Pit::UpdateCollision); luabridge::Class::addData_HasLadder("HasLadder",0x154,1); FUN_00872510(local_a8); - local_8._0_1_ = 0x6a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x6a; FUN_0088cc00(local_68,"GridEntityRock"); - local_8._0_1_ = 0x6b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x6b; FUN_0088cc20("GetRubbleAnim",GridEntity_Rock::GetRubbleAnim); FUN_0088ccd0("SetBigRockFrame",GridEntity_Rock::SetBigRockFrame); FUN_0088cd30("GetBigRockFrame",GridEntity_Rock::GetBigRockFrame); @@ -2978,23 +2978,23 @@ void LuaEngine::RegisterAPI() luabridge::Namespace::Class::addData("RubbleAnim",0x16c,1); luabridge::Class::addData_FrameCnt("FrameCnt",400,1); FUN_00872510(local_40); - local_8._0_1_ = 0x6c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x6c; FUN_0088d130(local_38,"GridEntityTNT"); - local_8._0_1_ = 0x6d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x6d; luabridge::Class::addData_FrameCnt("FrameCnt",0x154,1); FUN_00872510(local_60); - local_8._0_1_ = 0x6e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x6e; FUN_0088d2d0(local_b0,"GridEntityPressurePlate"); - local_8._0_1_ = 0x6f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x6f; FUN_0088d2f0("Reward",GridEntity_PressurePlate::Reward); luabridge::Class::addData_TimerPlate("TimerPlate",0x154,1); luabridge::Class::addData_NextGreedAnimation ("NextGreedAnimation",0x268,1); luabridge::Class::addData_GreedModeRNG("GreedModeRNG",0x26c,1); FUN_00872510(local_b8); - local_8._0_1_ = 0x70; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x70; FUN_0088d7d0(local_d0,"GridEntitySpikes"); - local_8 = CONCAT31(local_8._1_3_,0x71); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x71); luabridge::Class::addData_Timeout("Timeout",0x154,1); FUN_00872510(local_d8); ((luabridge::Namespace *)(local_d8))->luabridge::Namespace::~Namespace(); @@ -3020,17 +3020,17 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x72; FUN_0085da00(local_38,"RoomConfig"); - local_8._0_1_ = 0x73; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x73; FUN_0088def0(local_60,"Entry"); - local_8._0_1_ = 0x74; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x74; luabridge::Class::addData_Type(&DAT_00b6d1a4,0,1); luabridge::Namespace::Class::addData("Variant",4,1); luabridge::Namespace::Class::addData("Subtype",6,1); luabridge::Class::addData_Weight("Weight",8,1); FUN_00872510(local_b0); - local_8._0_1_ = 0x75; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x75; FUN_0088e380(local_b8,s_Spawn); - local_8._0_1_ = 0x76; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x76; FUN_0088e3a0("PickEntry",Spawn::PickEntry); luabridge::Namespace::Class::addData(&DAT_00b6a748,0,1); luabridge::Namespace::Class::addData(&DAT_00b6d134,2,1); @@ -3038,9 +3038,9 @@ void LuaEngine::RegisterAPI() luabridge::Class::addData_EntryCount("EntryCount",8,1); luabridge::Class::addData_SumWeights("SumWeights",0xc,1); FUN_00872510(local_d0); - local_8._0_1_ = 0x77; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x77; FUN_0088e9c0(local_d8,&DAT_00b734f0); - local_8 = CONCAT31(local_8._1_3_,0x78); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x78); FUN_0088e9e0("StageID",0,0); FUN_0088e9e0(&DAT_00b6d1a4,8,0); FUN_0088ead0("Variant",0xc,0); @@ -3070,7 +3070,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x79; FUN_0088f2a0(local_e0,"RoomDescriptor"); - local_8 = CONCAT31(local_8._1_3_,0x7a); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x7a); luabridge::Namespace::Class::addData("GridIndex",0,1); luabridge::Namespace::Class::addData("SafeGridIndex",4,1); luabridge::Namespace::Class::addData("ListIndex",8,1); @@ -3111,7 +3111,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x7b; FUN_0088fcf0(local_e8,&DAT_00b734f0); - local_8 = CONCAT31(local_8._1_3_,0x7c); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x7c); FUN_0088fd10("GetBackdropType",Room::GetBackdropType); FUN_0088fdb0("Update",Room::Update); FUN_0088fdb0("Render",Room::Render); @@ -3238,7 +3238,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x7d; FUN_00891a10(local_f0,"Level"); - local_8 = CONCAT31(local_8._1_3_,0x7e); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x7e); FUN_00891a30("Update",Level::Update); FUN_00891a90("SetStage",Level::SetStage); FUN_00891a30("SetNextStage",Level::SetNextStage); @@ -3314,7 +3314,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x7f; FUN_00892b40(local_f8,"Seeds"); - local_8 = CONCAT31(local_8._1_3_,0x80); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x80); FUN_00892b60("SetStartSeed",Seeds::SetStartSeed); FUN_00892bc0("ClearStartSeed",Seeds::ClearStartSeed); FUN_00892c20("IsCustomRun",Room::IsInitialized); @@ -3350,7 +3350,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x81; FUN_00893330(local_100,"ItemPool"); - local_8 = CONCAT31(local_8._1_3_,0x82); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x82); FUN_00893350("GetCollectible",ItemPool::GetCollectible); FUN_008933b0("RemoveCollectible",ItemPool::RemoveCollectible); FUN_00893410("RemoveTrinket",ItemPool::RemoveTrinket); @@ -3375,7 +3375,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x83; FUN_00893a20(local_108,&DAT_00b6b338); - local_8 = CONCAT31(local_8._1_3_,0x84); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x84); FUN_00893a40("FlashChargeBar",HUD::FlashChargeBar); FUN_00893a40("InvalidateActiveItem",HUD::InvalidateActiveItem); FUN_00893aa0("InvalidateCraftingItem",HUD::InvalidateCraftingItem); @@ -3395,7 +3395,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x85; FUN_00893c70(local_110,&DAT_00b74634); - local_8 = CONCAT31(local_8._1_3_,0x86); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x86); FUN_00893c90("Update",Game::Update); FUN_00893c90("Render",Game::Render); FUN_00893cf0("IsPaused",Game::IsPaused); @@ -3493,7 +3493,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x87; FUN_00895430(local_118,"SFXManager"); - local_8 = CONCAT31(local_8._1_3_,0x88); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x88); FUN_00895450(&DAT_00b70498,SoundEffects::Play); FUN_008954b0("AdjustVolume",SFXManager::AdjustVolume); FUN_008954b0("AdjustPitch",SFXManager::AdjustPitch); @@ -3511,7 +3511,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x89; FUN_008956f0(local_120,"MusicManager"); - local_8 = CONCAT31(local_8._1_3_,0x8a); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x8a); FUN_00895710(&DAT_00b70498,Music::Play); FUN_008957d0("Fadein",Music::Fadein); FUN_00895770("Crossfade",MusicManager::Crossfade); @@ -3544,7 +3544,7 @@ void LuaEngine::RegisterAPI() FUN_00895d30("SFXManager",MusicManager::SFXManager); FUN_00895d90("MusicManager",MusicManager::MusicManager); FUN_0085da00(local_130,"Isaac"); - local_8 = CONCAT31(local_8._1_3_,0x8c); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x8c); FUN_00895df0("DebugString",Isaac::DebugString); FUN_0085da20("GetPlayer",Isaac::GetPlayer); FUN_00895e50("GetFrameCount",Isaac::GetFrameCount); @@ -3601,7 +3601,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x8d; FUN_0085da00(local_138,"Input"); - local_8 = CONCAT31(local_8._1_3_,0x8e); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x8e); FUN_008966f0("IsButtonTriggered",Input::IsButtonTriggered); FUN_008966f0("IsButtonPressed",Input::IsButtonPressed); FUN_00896750("GetButtonValue",Input::GetButtonValue); @@ -3616,7 +3616,7 @@ void LuaEngine::RegisterAPI() FUN_0085dab0(); local_8 = 0x8f; FUN_0085da00(optionsNamespace,"Options"); - local_8 = CONCAT31(local_8._1_3_,0x90); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x90); FUN_008968b0("MusicVolume",Options::MusicVolume,FUN_00896820); FUN_008968b0("SFXVolume",Options::SFXVolume,FUN_008969f0); FUN_008968b0("MapOpacity",Options::MapOpacity,FUN_00896a60); @@ -3674,8 +3674,8 @@ void LuaEngine::destroy() } while (node != DAT_00c7985c); } FUN_008975d0(); - *DAT_00c7985c = (int)DAT_00c7985c; - DAT_00c7985c[1] = (int)DAT_00c7985c; + *DAT_00c7985c = GHIDRA_INT(DAT_00c7985c); + DAT_00c7985c[1] = GHIDRA_INT(DAT_00c7985c); DAT_00c79860 = 0; luaRef = this[4]; if (luaRef != (LuaEngine)0x0) { @@ -3709,7 +3709,7 @@ int LuaEngine::Isaac_GetItemIdByName(std_string *name) std::map::_Find_lower_bound(findResult,name); nameMapHead = nameMap[0]; if (*(char *)((char *)foundNode + 0xd) == '\0') { - keyText = (byte *)((int)foundNode + 0x10); + keyText = (byte *)(GHIDRA_INT(foundNode) + 0x10); if (0xf < *(uint *)((char *)foundNode + 0x24)) { keyText = *(byte **)keyText; } @@ -3764,11 +3764,11 @@ byte * LuaEngine::LuamodCMD(byte *modname) void *local_8; uint *nameSize; - local_8._0_1_ = 0xff; - local_8._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0xffffff; puStack_c = &LAB_00b0795d; local_10 = (LuaEngine)ExceptionList; - local_14 = __security_cookie ^ (uint)(modsDir + 0x16); + local_14 = __security_cookie ^ GHIDRA_UINT((modsDir + 0x16)); ExceptionList = &local_10; modIter = *this; pLVar3 = ExceptionList; @@ -3794,7 +3794,7 @@ byte * LuaEngine::LuamodCMD(byte *modname) pbVar4 = pbVar1; pbVar1 = pbVar4 + 1; } while (*pbVar4 != 0); - ((std::string *)((char *)modsDir))->std::string::assign(g_modsDirectory,(uint)(pbVar4 + -0xc72e28)); + ((std::string *)((char *)modsDir))->std::string::assign(g_modsDirectory,GHIDRA_UINT((pbVar4 + -0xc72e28))); local_8 = (void *)0x0; nameSize = (uint *)(pbVar2 + 0x10); if (0xf < *(uint *)(pbVar2 + 0x14)) { @@ -3809,7 +3809,7 @@ byte * LuaEngine::LuamodCMD(byte *modname) appendResult[4] = 0; appendResult[5] = 0xf; *(undefined1 *)appendResult = 0; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; appendResult = ((std::string *)((char *)&modPath))->std::string::append((byte *)"/main.lua",9); scriptPath = (byte *******)*appendResult; uStack_28 = appendResult[1]; @@ -3820,27 +3820,27 @@ byte * LuaEngine::LuamodCMD(byte *modname) appendResult[4] = 0; appendResult[5] = 0xf; *(undefined1 *)appendResult = 0; - local_8._0_1_ = 3; - if (0xf < local_34._4_4_) { - allocSize = local_34._4_4_ + 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; + if (0xf < (*(undefined4 *)((char *)&(local_34) + 0x4))) { + allocSize = (*(undefined4 *)((char *)&(local_34) + 0x4)) + 1; allocBlock = modPath; if (0xfff < allocSize) { allocBlock = *(void **)((char *)modPath + -4); - allocSize = local_34._4_4_ + 0x24; - if (0x1f < (uint)((int)modPath + (-4 - (int)allocBlock))) goto LAB_008f73d3; + allocSize = (*(undefined4 *)((char *)&(local_34) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(modPath) + (-4 - GHIDRA_INT(allocBlock))))) goto LAB_008f73d3; } operator_delete(allocBlock,allocSize); } local_34 = 0xf00000000; - modPath = (void *)((uint)modPath & 0xffffff00); - local_8._0_1_ = 4; + modPath = (void *)(GHIDRA_UINT(modPath) & 0xffffff00); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; if (0xf < modsDirCapacity) { allocSize = modsDirCapacity + 1; allocBlock = modsDir[0]; if (0xfff < allocSize) { - allocBlock = *(void **)((int)modsDir[0] + -4); + allocBlock = *(void **)(GHIDRA_INT(modsDir[0]) + -4); allocSize = modsDirCapacity + 0x24; - if (0x1f < (uint)((int)modsDir[0] + (-4 - (int)allocBlock))) goto LAB_008f73d3; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(modsDir[0]) + (-4 - GHIDRA_INT(allocBlock))))) goto LAB_008f73d3; } operator_delete(allocBlock,allocSize); } @@ -3850,12 +3850,12 @@ byte * LuaEngine::LuamodCMD(byte *modname) scriptPathText = scriptPath; } modsDirCapacity = 0xf; - modsDir[0] = (void *)((uint)modsDir[0] & 0xffffff00); + modsDir[0] = (void *)(GHIDRA_UINT(modsDir[0]) & 0xffffff00); pbVar2 = FileSystem::ResolvePath((byte *)scriptPathText); if (pbVar2 != (byte *)0x0) { - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; tracked_alloc(1,pbVar2,0); - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; DAT_00c71698 = *(int *)modIter; scriptPathText = (byte *******)&scriptPath; if (0xf < scriptPathCapacity) { @@ -3873,7 +3873,7 @@ byte * LuaEngine::LuamodCMD(byte *modname) if (0xfff < allocSize) { scriptPathText = (byte *******)scriptPath[-1]; allocSize = scriptPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)scriptPath + (-4 - (int)scriptPathText))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(scriptPath) + (-4 - GHIDRA_INT(scriptPathText)))) { LAB_008f73d3: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3881,27 +3881,27 @@ LAB_008f73d3: } operator_delete(scriptPathText,allocSize); ExceptionList = (void *)local_10; - return (byte *)CONCAT31((int3)((uint)extraout_EAX >> 8),(char)pbVar2); + return (byte *)CONCAT31((int3)(GHIDRA_UINT(extraout_EAX) >> 8),(char)pbVar2); } - local_8._0_1_ = 0xff; - local_8._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0xffffff; if (0xf < scriptPathCapacity) { allocSize = scriptPathCapacity + 1; scriptPathText = scriptPath; if (0xfff < allocSize) { scriptPathText = (byte *******)scriptPath[-1]; allocSize = scriptPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)scriptPath + (-4 - (int)scriptPathText))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(scriptPath) + (-4 - GHIDRA_INT(scriptPathText)))) goto LAB_008f73d3; } operator_delete(scriptPathText,allocSize); } } } - modIter = (LuaEngine)((int)modIter + 4); + modIter = (LuaEngine)(GHIDRA_INT(modIter) + 4); pLVar3 = this; } while (modIter != this[1]); } ExceptionList = (void *)local_10; - return (byte *)((uint)pLVar3 & 0xffffff00); + return (byte *)(GHIDRA_UINT(pLVar3) & 0xffffff00); } diff --git a/src/game/manager.cpp b/src/game/manager.cpp index 08ce814..a32cdbe 100644 --- a/src/game/manager.cpp +++ b/src/game/manager.cpp @@ -40,7 +40,7 @@ void Manager::update_ingame_input() } piVar6 = (pGVar1->_playerManager)._playerList._begin; local_10 = (g_manager->_persistentGameData)._eventCounters[0x15]; - if ((int)(pGVar1->_playerManager)._playerList._end - (int)piVar6 >> 2 == 0) { + if (GHIDRA_INT((pGVar1->_playerManager)._playerList._end) - GHIDRA_INT(piVar6) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); piVar6 = (pGVar1->_playerManager)._playerList._begin; } @@ -48,12 +48,12 @@ void Manager::update_ingame_input() bVar3 = is_any_player_restart_held(); netplayManager = &g_manager->_netplayManager; if ((*netplayManager != *(NetplayManager *)(g_manager + 1)) && - (1 < (uint)((int)*(NetplayManager *)(g_manager + 1) - (int)*netplayManager >> 2))) { + (1 < GHIDRA_UINT((GHIDRA_INT(*(NetplayManager *)(g_manager + 1)) - GHIDRA_INT(*netplayManager) >> 2)))) { bVar3 = 1; playerIndex = 0; do { NVar7 = *netplayManager; - if ((uint)((int)netplayManager[1] - (int)NVar7 >> 2) <= playerIndex) { + if (GHIDRA_UINT((GHIDRA_INT(netplayManager[1]) - GHIDRA_INT(NVar7) >> 2)) <= playerIndex) { KAGE_LogMessage(0x10,(byte *)"Out of bounds\n"); NVar7 = *netplayManager; } @@ -94,7 +94,7 @@ void Manager::update_ingame_input() } playerIndex = playerIndex + 1; netplayManager = &g_manager->_netplayManager; - } while (playerIndex < (uint)(*(int *)(g_manager + 1) - (int)*netplayManager >> 2)); + } while (playerIndex < GHIDRA_UINT((*(int *)(g_manager + 1) - GHIDRA_INT(*netplayManager) >> 2))); } if (bVar3 == 0) { pGVar1->_restartHoldFrames = 0; @@ -140,7 +140,7 @@ void Manager::update_ingame_input() if (g_manager->_netplayManager == *(NetplayManager *)(g_manager + 1)) { return; } - if (((int)*(NetplayManager *)(g_manager + 1) - (int)g_manager->_netplayManager & 0xfffffffcU) == + if ((GHIDRA_INT(*(NetplayManager *)(g_manager + 1)) - GHIDRA_INT(g_manager->_netplayManager) & 0xfffffffcU) == 4) { return; } @@ -177,8 +177,8 @@ LAB_006fa894: statsPlayer = (pGVar1->_onlineStatsScreen)._players._begin; if (statsPlayer != statsPlayersEnd) { do { - ((std::string *)((char *)((int)statsPlayer + 8)))->std::string::_Tidy_deallocate(); - statsPlayer = (void *)((int)statsPlayer + 0x38); + ((std::string *)((char *)(GHIDRA_INT(statsPlayer) + 8)))->std::string::_Tidy_deallocate(); + statsPlayer = (void *)(GHIDRA_INT(statsPlayer) + 0x38); } while (statsPlayer != statsPlayersEnd); statsPlayer = (pGVar1->_onlineStatsScreen)._players._begin; } @@ -342,7 +342,7 @@ void Manager::BackupSaveFile() local_8 = 0xffffffff; puStack_c = &LAB_00b0a9c0; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(backupPath + 0x510); + local_14 = __security_cookie ^ GHIDRA_UINT((backupPath + 0x510)); ExceptionList = &local_10; if (g_manager->_netplayManager == *(NetplayManager *)(g_manager + 1)) { now = _time64((__time64_t *)0x0); @@ -383,7 +383,7 @@ Manager * Manager::constructor() ((PersistentGameData *)(&this->_persistentGameData))->PersistentGameData::constructor(); local_8 = 0; ((GameState *)(&this->_gamestate))->GameState::constructor(); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; this->_isSavingGameState = 0; _eh_vector_constructor_iterator_ (&(*(undefined1 *)((char *)&((this->_cutsceneManager)) + 0x4)),0x4c,0x1b,CutsceneEntry::Constructor, @@ -401,15 +401,15 @@ Manager * Manager::constructor() *(undefined4 *)&(*(undefined1 *)((char *)&((this->_nightmareScene)) + 0x14)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_nightmareScene)) + 0x18)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_nightmareScene)) + 0x1c)) = 0; - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)&((this->_nightmareScene)) + 0x20))))->ANM2::constructor(); - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)&((this->_nightmareScene)) + 0x134))))->ANM2::constructor(); - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)&((this->_nightmareScene)) + 0x248))))->ANM2::constructor(); - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x219d0))))->ANM2::constructor(); - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; container = &(*(undefined1 *)((char *)(this) + 0x21ae8)); *(undefined4 *)container = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x21aec)) = 0; @@ -419,11 +419,11 @@ Manager * Manager::constructor() containerProxy = operator_new(8); containerProxy[1] = 0; *(int **)container = containerProxy; - *containerProxy = (int)container; - local_8._0_1_ = 9; + *containerProxy = GHIDRA_INT(container); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x21afc))))->ANM2::constructor(); pAVar2 = &this->_achievementOverlay; - local_8._0_1_ = 10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 10; (pAVar2->_queue)._proxy = (void *)0x0; (this->_achievementOverlay)._queue._map = (void *)0x0; (this->_achievementOverlay)._queue._mapSize = 0; @@ -432,22 +432,22 @@ Manager * Manager::constructor() containerProxy = operator_new(8); containerProxy[1] = 0; (pAVar2->_queue)._proxy = containerProxy; - *containerProxy = (int)pAVar2; - local_8._0_1_ = 0xb; + *containerProxy = GHIDRA_INT(pAVar2); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; ((ANM2 *)(&(this->_achievementOverlay)._sprite))->ANM2::constructor(); - local_8._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc; _eh_vector_constructor_iterator_ ((this->_achievementOverlay)._entries,0x34,0x282,(_func_void_void_ptr *)&LAB_00931490, FUN_00420b00); (this->_achievementOverlay)._currentEntry = 0; (this->_achievementOverlay)._state = 0; - local_8._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xd; entry = (this->_musicManager)._channels; _eh_vector_constructor_iterator_(entry,0x184,2,FUN_007df300,FUN_007df3f0); (this->_musicManager)._entries._begin = (void *)0x0; (this->_musicManager)._entries._end = (void *)0x0; (this->_musicManager)._entries._capacity = (void *)0x0; - local_8._0_1_ = 0xf; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xf; ((SoundInstance *)(&(*(undefined1 *)((char *)(this) + 0x2a2e8))))->SoundInstance::SoundInstance(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x2a300)) = 0x3f800000; remaining = 2; @@ -489,11 +489,11 @@ Manager * Manager::constructor() (this->_optionsConfig)._optionsIniFilePath._size = 0; (this->_optionsConfig)._optionsIniFilePath._capacity = 0xf; (pOVar3->_optionsIniFilePath)._buf[0] = '\0'; - local_8._0_1_ = 0x12; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x12; ((OptionsConfig *)())->OptionsConfig::reset_defaults(); - local_8._0_1_ = 0x13; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x13; ((ItemConfig *)(&this->_itemConfig))->ItemConfig::constructor(); - local_8._0_1_ = 0x14; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x14; (this->_infoDisplay)._collectibles._head = (void *)0x0; (this->_infoDisplay)._collectibles._size = 0; headNode = operator_new(0x128); @@ -502,7 +502,7 @@ Manager * Manager::constructor() *(void **)((char *)headNode + 8) = headNode; *(undefined2 *)((char *)headNode + 0xc) = 0x101; (this->_infoDisplay)._collectibles._head = headNode; - local_8._0_1_ = 0x15; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x15; psVar1 = &(this->_infoDisplay)._trinkets; psVar1->_head = (void *)0x0; (this->_infoDisplay)._trinkets._size = 0; @@ -512,7 +512,7 @@ Manager * Manager::constructor() *(void **)((char *)headNode + 8) = headNode; *(undefined2 *)((char *)headNode + 0xc) = 0x101; psVar1->_head = headNode; - local_8._0_1_ = 0x16; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x16; container = &(*(undefined1 *)((char *)&((this->_infoDisplay)) + 0x10)); *(undefined4 *)container = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_infoDisplay)) + 0x14)) = 0; @@ -522,7 +522,7 @@ Manager * Manager::constructor() *(void **)((char *)headNode + 8) = headNode; *(undefined2 *)((char *)headNode + 0xc) = 0x101; *(void **)container = headNode; - local_8._0_1_ = 0x17; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x17; container = &(*(undefined1 *)((char *)&((this->_infoDisplay)) + 0x18)); *(undefined4 *)container = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_infoDisplay)) + 0x1c)) = 0; @@ -532,12 +532,12 @@ Manager * Manager::constructor() *(void **)((char *)headNode + 8) = headNode; *(undefined2 *)((char *)headNode + 0xc) = 0x101; *(void **)container = headNode; - local_8._0_1_ = 0x18; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x18; ((InfoDisplayEntry *)(&(this->_infoDisplay)._defaultEntry))->InfoDisplayEntry::InfoDisplayEntry(); (this->_challengeParams)._begin = (void *)0x0; (this->_challengeParams)._end = (void *)0x0; (this->_challengeParams)._capacity = (void *)0x0; - local_8._0_1_ = 0x1a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1a; (this->_entityConfig)._entities._head = (void *)0x0; (this->_entityConfig)._entities._size = 0; headNode = operator_new(0x180); @@ -576,19 +576,19 @@ Manager * Manager::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x4a6ec)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x4a6f0)) = 0xf; (*(undefined1 *)((char *)(this) + 0x4a6dc)) = 0; - local_8._0_1_ = 0x1f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x1f; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x4a6f4))))->ANM2::constructor(); - local_8._0_1_ = 0x20; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x20; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x4a808))))->ANM2::constructor(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x4a91c)) = 0; if (DAT_00c79860 != 0) { *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x4a91c)) = 3; } - local_8._0_1_ = 0x21; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x21; StringTable::constructor(); - local_8._0_1_ = 0x22; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x22; StringTable::constructor(); - local_8._0_1_ = 0x23; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x23; _eh_vector_constructor_iterator_(&this->_popupButtons,0x130,2,FUN_00951130,FUN_008ba170); (this->_popupButtons)._callback = (void *)0x0; (this->_popupButtons)._callbackContext = (void *)0x0; @@ -598,42 +598,42 @@ Manager * Manager::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x4abd8)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x4abdc)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x4abe0)) = 0; - local_8._0_1_ = 0x25; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x25; ((ANM2 *)(&this->_buttonsSprite))->ANM2::constructor(); - local_8._0_1_ = 0x26; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x26; ((ANM2 *)(&this->_platformIconsSprite))->ANM2::constructor(); - local_8._0_1_ = 0x27; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x27; _eh_vector_constructor_iterator_ (&(*(undefined1 *)((char *)(this) + 0x4ae0c)),8,2,(_func_void_void_ptr *)&LAB_0040c5b0,FUN_0040c440); - local_8._0_1_ = 0x28; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x28; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x4ae20)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x4ae24)) = 0; ((Font *)(&this->_font1_TeamMeatEx10))->Font::Font(); - local_8._0_1_ = 0x29; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x29; ((Font *)(&this->_font2_TeamMeatEx12))->Font::Font(); - local_8._0_1_ = 0x2a; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2a; ((Font *)(&this->_font3_TeamMeatEx16))->Font::Font(); - local_8._0_1_ = 0x2b; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2b; ((Font *)(&this->_font4_terminus))->Font::Font(); - local_8._0_1_ = 0x2c; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2c; ((Font *)(&this->_font5_terminus8))->Font::Font(); - local_8._0_1_ = 0x2d; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2d; ((Font *)(&this->_font6_PFTempestaSevenCondensed))->Font::Font(); - local_8._0_1_ = 0x2e; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2e; ((Font *)(&this->_font7_Upheaval))->Font::Font(); - local_8._0_1_ = 0x2f; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x2f; ((Font *)(&this->_font8_LuaMiniOutlined))->Font::Font(); - local_8._0_1_ = 0x30; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x30; ((Font *)(&this->_font9_PFTempestaSevenCondensedAgain))->Font::Font(); - local_8._0_1_ = 0x31; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x31; ((LobbySettings *)(&this->_lobbySettings))->LobbySettings::reset(); - local_8._0_1_ = 0x32; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x32; Seeds::constructor(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x4b1a8)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x4b1b8)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x4b1bc)) = 0xf; (*(undefined1 *)((char *)(this) + 0x4b1a8)) = 0; - local_8._0_1_ = 0x34; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x34; ((ChallengeParams *)(&(this->_dailyChallenge)._params))->ChallengeParams::ChallengeParams(); (this->_dailyChallenge)._id = 0; (this->_dailyChallenge)._seed = 0; @@ -643,20 +643,20 @@ Manager * Manager::constructor() (this->_lobbyMembers)._begin = (void *)0x0; (this->_lobbyMembers)._end = (void *)0x0; (this->_lobbyMembers)._capacity = (void *)0x0; - local_8._0_1_ = 0x35; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x35; (this->_pendingMenuFadeColor)._unk = 0; (this->_pendingMenuFadeColor)._red = 0.0; (this->_pendingMenuFadeColor)._green = 0.0; (this->_pendingMenuFadeColor)._blue = 0.0; (this->_pendingMenuFadeColor)._alpha = 0.0; ((ANM2 *)(&this->_cursorSprite))->ANM2::constructor(); - local_8._0_1_ = 0x36; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x36; (this->_lastMousePosition).y = 0.0; (this->_lastMousePosition).x = 0.0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x4b3d0)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x4b3cc)) = 0; SaveSlotManager::constructor(); - local_8._0_1_ = 0x37; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x37; container = &(*(undefined1 *)((char *)&(this[1]._gamestate) + 0xcf0)); *(undefined4 *)container = 0; *(undefined4 *)&(*(undefined1 *)((char *)&(this[1]._gamestate) + 0xcf4)) = 0; @@ -667,7 +667,7 @@ Manager * Manager::constructor() (*(undefined1 *)((char *)&(this[1]._gamestate) + 0xcfc)) = 0; *(undefined ***)&(*(undefined1 *)((char *)&(this[1]._gamestate) + 0xcf8)) = KAGE::Mutex::vftable; *(undefined4 *)&(*(undefined1 *)((char *)&(this[1]._gamestate) + 0xd00)) = 0; - local_8 = CONCAT31(local_8._1_3_,0x39); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x39); FUN_00a15770(); (*(undefined1 *)((char *)(this) + 0x4b3d4)) = DAT_00c71673; ExceptionList = local_10; @@ -727,7 +727,7 @@ void Manager::destructor() seedEffectsTree = &(this->_startSeeds)._seedEffects; FID_conflict__Erase_tree_>_> (seedEffectsTree,(fuzzer_allocator_> *)seedEffectsTree, - *(_Tree_node **)((int)(this->_startSeeds)._seedEffects + 4)); + *(_Tree_node **)(GHIDRA_INT((this->_startSeeds)._seedEffects) + 4)); operator_delete(*seedEffectsTree,0x14); std::vector::_Tidy(); ((std::string *)((this->_lobbySettings)._password._buf))->std::string::_Tidy_deallocate(); @@ -737,7 +737,7 @@ void Manager::destructor() FID_conflict__Erase_tree_>_> (fontCharsTree,(fuzzer_allocator_> *)fontCharsTree, *(_Tree_node **) - ((int)(this->_font9_PFTempestaSevenCondensedAgain)._charsBlock._head + 4)); + (GHIDRA_INT((this->_font9_PFTempestaSevenCondensedAgain)._charsBlock._head) + 4)); operator_delete(fontCharsTree->_head,0x18); FUN_004b3950(); ((Font *)(&this->_font8_LuaMiniOutlined))->Font::Unload(); @@ -745,7 +745,7 @@ void Manager::destructor() FID_conflict__Erase_tree_>_> (fontCharsTree,(fuzzer_allocator_> *)fontCharsTree, *(_Tree_node **) - ((int)(this->_font8_LuaMiniOutlined)._charsBlock._head + 4)); + (GHIDRA_INT((this->_font8_LuaMiniOutlined)._charsBlock._head) + 4)); operator_delete(fontCharsTree->_head,0x18); FUN_004b3950(); ((Font *)(&this->_font7_Upheaval))->Font::Unload(); @@ -753,7 +753,7 @@ void Manager::destructor() FID_conflict__Erase_tree_>_> (fontCharsTree,(fuzzer_allocator_> *)fontCharsTree, *(_Tree_node **) - ((int)(this->_font7_Upheaval)._charsBlock._head + 4)); + (GHIDRA_INT((this->_font7_Upheaval)._charsBlock._head) + 4)); operator_delete(fontCharsTree->_head,0x18); FUN_004b3950(); ((Font *)(&this->_font6_PFTempestaSevenCondensed))->Font::Unload(); @@ -761,7 +761,7 @@ void Manager::destructor() FID_conflict__Erase_tree_>_> (fontCharsTree,(fuzzer_allocator_> *)fontCharsTree, *(_Tree_node **) - ((int)(this->_font6_PFTempestaSevenCondensed)._charsBlock._head + 4)); + (GHIDRA_INT((this->_font6_PFTempestaSevenCondensed)._charsBlock._head) + 4)); operator_delete(fontCharsTree->_head,0x18); FUN_004b3950(); ((Font *)(&this->_font5_terminus8))->Font::Unload(); @@ -769,7 +769,7 @@ void Manager::destructor() FID_conflict__Erase_tree_>_> (fontCharsTree,(fuzzer_allocator_> *)fontCharsTree, *(_Tree_node **) - ((int)(this->_font5_terminus8)._charsBlock._head + 4)); + (GHIDRA_INT((this->_font5_terminus8)._charsBlock._head) + 4)); operator_delete(fontCharsTree->_head,0x18); FUN_004b3950(); ((Font *)(&this->_font4_terminus))->Font::Unload(); @@ -777,7 +777,7 @@ void Manager::destructor() FID_conflict__Erase_tree_>_> (fontCharsTree,(fuzzer_allocator_> *)fontCharsTree, *(_Tree_node **) - ((int)(this->_font4_terminus)._charsBlock._head + 4)); + (GHIDRA_INT((this->_font4_terminus)._charsBlock._head) + 4)); operator_delete(fontCharsTree->_head,0x18); FUN_004b3950(); ((Font *)(&this->_font3_TeamMeatEx16))->Font::Unload(); @@ -785,7 +785,7 @@ void Manager::destructor() FID_conflict__Erase_tree_>_> (fontCharsTree,(fuzzer_allocator_> *)fontCharsTree, *(_Tree_node **) - ((int)(this->_font3_TeamMeatEx16)._charsBlock._head + 4)); + (GHIDRA_INT((this->_font3_TeamMeatEx16)._charsBlock._head) + 4)); operator_delete(fontCharsTree->_head,0x18); FUN_004b3950(); ((Font *)(&this->_font2_TeamMeatEx12))->Font::Unload(); @@ -793,7 +793,7 @@ void Manager::destructor() FID_conflict__Erase_tree_>_> (fontCharsTree,(fuzzer_allocator_> *)fontCharsTree, *(_Tree_node **) - ((int)(this->_font2_TeamMeatEx12)._charsBlock._head + 4)); + (GHIDRA_INT((this->_font2_TeamMeatEx12)._charsBlock._head) + 4)); operator_delete(fontCharsTree->_head,0x18); FUN_004b3950(); ((Font *)(&this->_font1_TeamMeatEx10))->Font::Unload(); @@ -801,7 +801,7 @@ void Manager::destructor() FID_conflict__Erase_tree_>_> (fontCharsTree,(fuzzer_allocator_> *)fontCharsTree, *(_Tree_node **) - ((int)(this->_font1_TeamMeatEx10)._charsBlock._head + 4)); + (GHIDRA_INT((this->_font1_TeamMeatEx10)._charsBlock._head) + 4)); operator_delete(fontCharsTree->_head,0x18); FUN_004b3950(); _eh_vector_destructor_iterator_(&(*(undefined1 *)((char *)(this) + 0x4ae0c)),8,2,FUN_0040c440); @@ -825,7 +825,7 @@ void Manager::destructor() ((StringTable *)(&this->_stringTablePc))->StringTable::clear(); fontCharsTree = &(this->_stringTablePc)._categories; std::map::_Erase_tree - (fontCharsTree,*(undefined4 *)((int)(this->_stringTablePc)._categories._head + 4)); + (fontCharsTree,*(undefined4 *)(GHIDRA_INT((this->_stringTablePc)._categories._head) + 4)); operator_delete(fontCharsTree->_head,0x28); stringTableIndexTree = &(*(undefined1 *)((char *)&((this->_stringTablePc)) + 0x4)); FID_conflict__Erase_tree_>_> @@ -835,7 +835,7 @@ void Manager::destructor() ((StringTable *)(&this->_stringTable))->StringTable::clear(); fontCharsTree = &(this->_stringTable)._categories; std::map::_Erase_tree - (fontCharsTree,*(undefined4 *)((int)(this->_stringTable)._categories._head + 4)); + (fontCharsTree,*(undefined4 *)(GHIDRA_INT((this->_stringTable)._categories._head) + 4)); operator_delete(fontCharsTree->_head,0x28); stringTableIndexTree = &(*(undefined1 *)((char *)&((this->_stringTable)) + 0x4)); FID_conflict__Erase_tree_>_> @@ -892,7 +892,7 @@ void Manager::create_render_surfaces() local_8 = 0xffffffff; puStack_c = &LAB_00b0bdbd; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(tmpSurface + 0x14); + uVar1 = __security_cookie ^ GHIDRA_UINT((tmpSurface + 0x14)); ExceptionList = &local_10; if ((DAT_00c79890 == (int *)0x0) && ((this->_optionsConfig)._enableFilter != 0)) { KAGE_LogMessage(1,(byte *)"HQ4X size: %dx%d\n"); @@ -986,7 +986,7 @@ void Manager::load_fonts() local_14 = (void *)0xffffffff; puStack_18 = &LAB_00b0be35; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(redirectedPathA + 0x11); + local_24 = __security_cookie ^ GHIDRA_UINT((redirectedPathA + 0x11)); ExceptionList = &local_1c; ((Font *)(&this->_font9_PFTempestaSevenCondensedAgain))->Font::Unload(); ((Font *)(&this->_font7_Upheaval))->Font::Unload(); @@ -1011,43 +1011,43 @@ LAB_009519b0: local_70 = &g_manager->_modManager; local_3c._size = 0; local_3c._capacity = 0xf; - local_3c._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) = (void *)0x0; pbVar2 = (byte *)pcVar3; do { bVar1 = *pbVar2; pbVar2 = pbVar2 + 1; } while (bVar1 != 0); - ((std::string *)(local_3c._buf))->std::string::assign((byte *)pcVar3,(int)pbVar2 - (int)(pcVar3 + 1)); + ((std::string *)(local_3c._buf))->std::string::assign((byte *)pcVar3,GHIDRA_INT(pbVar2) - GHIDRA_INT((pcVar3 + 1))); local_14 = (void *)0x0; ((ModManager *)(local_70))->ModManager::TryRedirectPath((std_string *)redirectedPathA,&local_3c); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; pbVar2 = extraout_EAX; if (0xf < *(uint *)(extraout_EAX + 0x14)) { pbVar2 = *(byte **)extraout_EAX; } ((Font *)(&this->_font7_Upheaval))->Font::Load(pbVar2,0); - local_14 = (void *)((uint)local_14._1_3_ << 8); + local_14 = (void *)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8); if (0xf < redirectedPathACapacity) { freeSize = redirectedPathACapacity + 1; freeBlock = redirectedPathA[0]; if (0xfff < freeSize) { - freeBlock = *(void **)((int)redirectedPathA[0] + -4); + freeBlock = *(void **)(GHIDRA_INT(redirectedPathA[0]) + -4); freeSize = redirectedPathACapacity + 0x24; - if (0x1f < (uint)((int)redirectedPathA[0] + (-4 - (int)freeBlock))) goto LAB_00951a98; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPathA[0]) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_00951a98; } operator_delete(freeBlock,freeSize); } local_14 = (void *)0xffffffff; redirectedPathASize = 0; redirectedPathACapacity = 0xf; - redirectedPathA[0] = (void *)((uint)redirectedPathA[0] & 0xffffff00); + redirectedPathA[0] = (void *)(GHIDRA_UINT(redirectedPathA[0]) & 0xffffff00); if (0xf < local_3c._capacity) { freeSize = local_3c._capacity + 1; - freeBlock = (void *)local_3c._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)local_3c._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(local_3c._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) + -4); freeSize = local_3c._capacity + 0x24; - if ((void *)0x1f < (void *)(local_3c._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((void *)0x1f < (void *)((*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { LAB_00951a98: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1058,44 +1058,44 @@ LAB_00951a98: local_70 = &g_manager->_modManager; local_3c._size = 0; local_3c._capacity = 0xf; - local_3c._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) = (void *)0x0; pbVar2 = (byte *)secondaryFontPath; do { bVar1 = *pbVar2; pbVar2 = pbVar2 + 1; } while (bVar1 != 0); ((std::string *)(local_3c._buf))->std::string::assign((byte *)secondaryFontPath, - (int)pbVar2 - (int)(secondaryFontPath + 1)); + GHIDRA_INT(pbVar2) - GHIDRA_INT((secondaryFontPath + 1))); local_14 = (void *)0x2; ((ModManager *)(local_70))->ModManager::TryRedirectPath((std_string *)redirectedPathB,&local_3c); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; pbVar2 = extraout_EAX_00; if (0xf < *(uint *)(extraout_EAX_00 + 0x14)) { pbVar2 = *(byte **)extraout_EAX_00; } ((Font *)(&this->_font9_PFTempestaSevenCondensedAgain))->Font::Load(pbVar2,0); - local_14 = (void *)CONCAT31(local_14._1_3_,2); + local_14 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); if (0xf < redirectedPathBCapacity) { freeSize = redirectedPathBCapacity + 1; freeBlock = redirectedPathB[0]; if (0xfff < freeSize) { - freeBlock = *(void **)((int)redirectedPathB[0] + -4); + freeBlock = *(void **)(GHIDRA_INT(redirectedPathB[0]) + -4); freeSize = redirectedPathBCapacity + 0x24; - if (0x1f < (uint)((int)redirectedPathB[0] + (-4 - (int)freeBlock))) goto LAB_00951b8a; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPathB[0]) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_00951b8a; } operator_delete(freeBlock,freeSize); } local_14 = (void *)0xffffffff; redirectedPathBSize = 0; redirectedPathBCapacity = 0xf; - redirectedPathB[0] = (void *)((uint)redirectedPathB[0] & 0xffffff00); + redirectedPathB[0] = (void *)(GHIDRA_UINT(redirectedPathB[0]) & 0xffffff00); if (0xf < local_3c._capacity) { freeSize = local_3c._capacity + 1; - freeBlock = (void *)local_3c._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)local_3c._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(local_3c._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) + -4); freeSize = local_3c._capacity + 0x24; - if ((void *)0x1f < (void *)(local_3c._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((void *)0x1f < (void *)((*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { LAB_00951b8a: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1104,40 +1104,40 @@ LAB_00951b8a: operator_delete(freeBlock,freeSize); } manager = g_manager; - local_3c._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) = std::_Allocate(0x30); local_3c._size = 0x20; local_3c._capacity = 0x2f; - builtin_strncpy((char *)local_3c._buf._0_4_,"font/TeamMeatEx/TeamMeatEx10.fnt",0x21); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_3c._buf) + 0x0)),"font/TeamMeatEx/TeamMeatEx10.fnt",0x21); local_14 = (void *)0x4; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath((std_string *)redirectedPathA,&local_3c); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; pbVar2 = extraout_EAX_01; if (0xf < *(uint *)(extraout_EAX_01 + 0x14)) { pbVar2 = *(byte **)extraout_EAX_01; } ((Font *)(&this->_font1_TeamMeatEx10))->Font::Load(pbVar2,0); - local_14 = (void *)CONCAT31(local_14._1_3_,4); + local_14 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),4); if (0xf < redirectedPathACapacity) { freeSize = redirectedPathACapacity + 1; freeBlock = redirectedPathA[0]; if (0xfff < freeSize) { - freeBlock = *(void **)((int)redirectedPathA[0] + -4); + freeBlock = *(void **)(GHIDRA_INT(redirectedPathA[0]) + -4); freeSize = redirectedPathACapacity + 0x24; - if (0x1f < (uint)((int)redirectedPathA[0] + (-4 - (int)freeBlock))) goto LAB_00951c7b; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPathA[0]) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_00951c7b; } operator_delete(freeBlock,freeSize); } local_14 = (void *)0xffffffff; redirectedPathASize = 0; redirectedPathACapacity = 0xf; - redirectedPathA[0] = (void *)((uint)redirectedPathA[0] & 0xffffff00); + redirectedPathA[0] = (void *)(GHIDRA_UINT(redirectedPathA[0]) & 0xffffff00); if (0xf < local_3c._capacity) { freeSize = local_3c._capacity + 1; - pcVar3 = (char *)local_3c._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)local_3c._buf) + 0x0)); if (0xfff < freeSize) { - pcVar3 = *(char **)(local_3c._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) + -4); freeSize = local_3c._capacity + 0x24; - if ((char *)0x1f < (char *)(local_3c._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { LAB_00951c7b: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1146,40 +1146,40 @@ LAB_00951c7b: operator_delete(pcVar3,freeSize); } manager = g_manager; - local_3c._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) = std::_Allocate(0x30); local_3c._size = 0x20; local_3c._capacity = 0x2f; - builtin_strncpy((char *)local_3c._buf._0_4_,"font/TeamMeatEx/TeamMeatEx12.fnt",0x21); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_3c._buf) + 0x0)),"font/TeamMeatEx/TeamMeatEx12.fnt",0x21); local_14 = (void *)0x6; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath((std_string *)redirectedPathB,&local_3c); - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; pbVar2 = extraout_EAX_02; if (0xf < *(uint *)(extraout_EAX_02 + 0x14)) { pbVar2 = *(byte **)extraout_EAX_02; } ((Font *)(&this->_font2_TeamMeatEx12))->Font::Load(pbVar2,0); - local_14 = (void *)CONCAT31(local_14._1_3_,6); + local_14 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),6); if (0xf < redirectedPathBCapacity) { freeSize = redirectedPathBCapacity + 1; freeBlock = redirectedPathB[0]; if (0xfff < freeSize) { - freeBlock = *(void **)((int)redirectedPathB[0] + -4); + freeBlock = *(void **)(GHIDRA_INT(redirectedPathB[0]) + -4); freeSize = redirectedPathBCapacity + 0x24; - if (0x1f < (uint)((int)redirectedPathB[0] + (-4 - (int)freeBlock))) goto LAB_00951d6c; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPathB[0]) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_00951d6c; } operator_delete(freeBlock,freeSize); } local_14 = (void *)0xffffffff; redirectedPathBSize = 0; redirectedPathBCapacity = 0xf; - redirectedPathB[0] = (void *)((uint)redirectedPathB[0] & 0xffffff00); + redirectedPathB[0] = (void *)(GHIDRA_UINT(redirectedPathB[0]) & 0xffffff00); if (0xf < local_3c._capacity) { freeSize = local_3c._capacity + 1; - pcVar3 = (char *)local_3c._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)local_3c._buf) + 0x0)); if (0xfff < freeSize) { - pcVar3 = *(char **)(local_3c._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) + -4); freeSize = local_3c._capacity + 0x24; - if ((char *)0x1f < (char *)(local_3c._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { LAB_00951d6c: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1188,13 +1188,13 @@ LAB_00951d6c: operator_delete(pcVar3,freeSize); } manager = g_manager; - local_3c._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) = std::_Allocate(0x30); local_3c._size = 0x20; local_3c._capacity = 0x2f; - builtin_strncpy((char *)local_3c._buf._0_4_,"font/TeamMeatEx/TeamMeatEx16.fnt",0x21); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_3c._buf) + 0x0)),"font/TeamMeatEx/TeamMeatEx16.fnt",0x21); local_14 = (void *)0x8; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath((std_string *)redirectedPathA,&local_3c); - local_14 = (void *)CONCAT31(local_14._1_3_,9); + local_14 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),9); pbVar2 = extraout_EAX_03; if (0xf < *(uint *)(extraout_EAX_03 + 0x14)) { pbVar2 = *(byte **)extraout_EAX_03; @@ -1204,22 +1204,22 @@ LAB_00951d6c: freeSize = redirectedPathACapacity + 1; freeBlock = redirectedPathA[0]; if (0xfff < freeSize) { - freeBlock = *(void **)((int)redirectedPathA[0] + -4); + freeBlock = *(void **)(GHIDRA_INT(redirectedPathA[0]) + -4); freeSize = redirectedPathACapacity + 0x24; - if (0x1f < (uint)((int)redirectedPathA[0] + (-4 - (int)freeBlock))) goto LAB_00951e52; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPathA[0]) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_00951e52; } operator_delete(freeBlock,freeSize); } redirectedPathASize = 0; redirectedPathACapacity = 0xf; - redirectedPathA[0] = (void *)((uint)redirectedPathA[0] & 0xffffff00); + redirectedPathA[0] = (void *)(GHIDRA_UINT(redirectedPathA[0]) & 0xffffff00); if ((void *)0xf < local_3c._capacity) { freeSize = local_3c._capacity + 1; - pcVar3 = (char *)local_3c._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)local_3c._buf) + 0x0)); if (0xfff < freeSize) { - pcVar3 = *(char **)(local_3c._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) + -4); freeSize = local_3c._capacity + 0x24; - if ((char *)0x1f < (char *)(local_3c._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { LAB_00951e52: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1229,7 +1229,7 @@ LAB_00951e52: } (this->_font1_TeamMeatEx10)._missingCharacter = -1; local_70 = (ModManager *)0x3f; - _Find_lower_bound<>((undefined1 *)((int)&local_3c + 0xc),&local_70); + _Find_lower_bound<>((undefined1 *)(GHIDRA_INT(&local_3c) + 0xc),&local_70); if (((*(char *)(local_3c._capacity + 0xd) == '\0') && (*(uint *)(local_3c._capacity + 0x10) < 0x40)) && ((void *)local_3c._capacity != (this->_font1_TeamMeatEx10)._charsBlock._head)) { @@ -1241,7 +1241,7 @@ LAB_00951e52: (this->_font1_TeamMeatEx10)._missingCharacter = fallbackGlyph; (this->_font2_TeamMeatEx12)._missingCharacter = -1; local_70 = (ModManager *)0x3f; - _Find_lower_bound<>((undefined1 *)((int)&local_3c + 0xc),&local_70); + _Find_lower_bound<>((undefined1 *)(GHIDRA_INT(&local_3c) + 0xc),&local_70); if (((*(char *)(local_3c._capacity + 0xd) == '\0') && (*(uint *)(local_3c._capacity + 0x10) < 0x40)) && ((void *)local_3c._capacity != (this->_font2_TeamMeatEx12)._charsBlock._head)) { @@ -1253,7 +1253,7 @@ LAB_00951e52: (this->_font2_TeamMeatEx12)._missingCharacter = fallbackGlyph; (this->_font3_TeamMeatEx16)._missingCharacter = -1; local_70 = (ModManager *)0x3f; - _Find_lower_bound<>((undefined1 *)((int)&local_3c + 0xc),&local_70); + _Find_lower_bound<>((undefined1 *)(GHIDRA_INT(&local_3c) + 0xc),&local_70); if (((*(char *)(local_3c._capacity + 0xd) == '\0') && (*(uint *)(local_3c._capacity + 0x10) < 0x40)) && ((void *)local_3c._capacity != (this->_font3_TeamMeatEx16)._charsBlock._head)) { @@ -1290,20 +1290,20 @@ void Manager::render_loading_icon(float alpha) local_8 = 0xffffffff; puStack_c = &LAB_00b05d9d; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; blinkFrame = g_manager->_framecount & 0x8000000f; - if ((int)blinkFrame < 0) { + if (GHIDRA_INT(blinkFrame) < 0) { blinkFrame = (blinkFrame - 1 | 0xfffffff0) + 1; } iconSlot = 0; - if (*(int *)((char *)(&g_manager->_platformIconsSprite + 1) + (uint)(7 < (int)blinkFrame) * 8) != 0) + if (*(int *)((char *)(&g_manager->_platformIconsSprite + 1) + GHIDRA_UINT((7 < GHIDRA_INT(blinkFrame))) * 8) != 0) { - iconSlot = (uint)(7 < (int)blinkFrame); + iconSlot = GHIDRA_UINT((7 < GHIDRA_INT(blinkFrame))); } alphaLocal = alpha; KAGE::SmartPointer::operator_assign - (&icon,(void *)((int)(&g_manager->_platformIconsSprite + 1) + iconSlot * 8)); + (&icon,(void *)(GHIDRA_INT((&g_manager->_platformIconsSprite + 1)) + iconSlot * 8)); local_8 = 0; if (icon != (int *)0x0) { local_2c = alphaLocal; @@ -1370,7 +1370,7 @@ void Manager::Init() local_8 = 0xffffffff; puStack_c = &LAB_00b0bf11; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(oldOptionsIniPath + 0x110); + local_14 = __security_cookie ^ GHIDRA_UINT((oldOptionsIniPath + 0x110)); ExceptionList = &local_10; savedManager = g_manager; stringTable = &g_manager->_stringTable; @@ -1396,11 +1396,11 @@ void Manager::Init() pbVar3 = pbVar3 + 1; } while (bVar1 != 0); strncpy((char *)oldOptionsIniPath,(char *)optionsIniPath, - (size_t)(pbVar3 + (-0x28 - (int)(optionsIniPath + 1)))); + (size_t)(pbVar3 + (-0x28 - GHIDRA_INT((optionsIniPath + 1))))); pbVar3 = oldOptionsIniPath; do { local_230 = (Game *)pbVar3; - pbVar3 = (byte *)((int)local_230 + 1); + pbVar3 = (byte *)(GHIDRA_INT(local_230) + 1); } while (*(byte *)local_230 != 0); strncpy((char *)local_230,"Binding of Isaac Repentance",0x1c); pcVar5 = &cStack_115; @@ -1520,20 +1520,20 @@ void Manager::Init() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x12; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/cursor.anm2",0x13); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/cursor.anm2",0x13); local_8 = 2; ((ANM2 *)(&manager->_cursorSprite))->ANM2::Load(&anm2Path,1); local_8 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar6 = anm2Path._capacity + 1; - pcVar5 = (char *)anm2Path._buf._0_4_; + pcVar5 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar6) { - pcVar5 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar5 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar6 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar5))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar5)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1560,7 +1560,7 @@ LAB_00952994: isLess = bVar1 < *wantedAnimNameChar; if (bVar1 != *wantedAnimNameChar) { LAB_00952970: - uVar6 = -(uint)isLess | 1; + uVar6 = -GHIDRA_UINT(isLess) | 1; goto LAB_00952975; } if (bVar1 == 0) break; @@ -1599,20 +1599,20 @@ LAB_00952975: anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; local_230 = (Game *)&manager->_buttonsSprite; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x13; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/Buttons.anm2",0x14); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/Buttons.anm2",0x14); local_8 = 3; ((ANM2 *)(&manager->_buttonsSprite))->ANM2::Load(&anm2Path,1); local_8 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar6 = anm2Path._capacity + 1; - pcVar5 = (char *)anm2Path._buf._0_4_; + pcVar5 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar6) { - pcVar5 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar5 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar6 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar5))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar5)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1625,20 +1625,20 @@ LAB_00952975: anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x19; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/PlatformIcons.anm2",0x1a); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/PlatformIcons.anm2",0x1a); local_8 = 4; ((ANM2 *)(&manager->_platformIconsSprite))->ANM2::Load(&anm2Path,1); local_8 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar6 = anm2Path._capacity + 1; - pcVar5 = (char *)anm2Path._buf._0_4_; + pcVar5 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar6) { - pcVar5 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar5 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar6 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar5))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar5)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1646,7 +1646,7 @@ LAB_00952975: operator_delete(pcVar5,uVar6); } buttonsSprite = local_230; - pbVar3 = ((AnimationState *)((int)local_230 + 0x30))->_animData; + pbVar3 = ((AnimationState *)(GHIDRA_INT(local_230) + 0x30))->_animData; if (pbVar3 != (byte *)0x0) { animNameChar = pbVar3; if (0xf < *(uint *)(pbVar3 + 0x14)) { @@ -1658,7 +1658,7 @@ LAB_00952975: isLess = bVar1 < *wantedAnimNameChar; if (bVar1 != *wantedAnimNameChar) { LAB_00952c05: - uVar6 = -(uint)isLess | 1; + uVar6 = -GHIDRA_UINT(isLess) | 1; goto LAB_00952c0a; } if (bVar1 == 0) break; @@ -1671,13 +1671,13 @@ LAB_00952c05: uVar6 = 0; LAB_00952c0a: if ((uVar6 == 0) && - ((pbVar3[0x34] == 0 || (((AnimationState *)((int)local_230 + 0x30))->_isPlaying != 0)))) + ((pbVar3[0x34] == 0 || (((AnimationState *)(GHIDRA_INT(local_230) + 0x30))->_isPlaying != 0)))) goto LAB_00952c36; } bVar1 = ((ANM2 *)((ANM2 *)local_230))->ANM2::SetAnimation(&DAT_00b7b76c,1); if (bVar1 != 0) { - ((AnimationState *)((AnimationState *)((int)buttonsSprite + 0x30)))->AnimationState::Rewind(); - ((AnimationState *)((int)buttonsSprite + 0x30))->_isPlaying = 1; + ((AnimationState *)((AnimationState *)(GHIDRA_INT(buttonsSprite) + 0x30)))->AnimationState::Rewind(); + ((AnimationState *)(GHIDRA_INT(buttonsSprite) + 0x30))->_isPlaying = 1; } LAB_00952c36: std::list>::push_back(FUN_0095b290,0); @@ -1688,7 +1688,7 @@ LAB_00952c36: local_8 = 5; (**(code **)(PTR_vftable_00c57b2c + 0x10))(); local_8 = 0xffffffff; - if ((uint)(iVar7 >> 3) <= uVar6) break; + if (GHIDRA_UINT((iVar7 >> 3)) <= uVar6) break; ((KAGE::Input::Manager *)((Manager *)&PTR_vftable_00c57b18))->KAGE::Input::Manager::get_device(&device,uVar6); piVar4 = deviceRefCount; local_8 = 6; @@ -1706,10 +1706,10 @@ LAB_00952c36: deviceCopyRefCount = piVar4; deviceCopy = (ANM2 *)local_230; } - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; KeyConfigs::apply_to_device (&(*(undefined1 *)((char *)(g_manager) + 0x4abd8)),*(int *)((deviceCopy->_filename)._buf + 0xc)); - local_8 = CONCAT31(local_8._1_3_,8); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),8); if (((deviceCopyRefCount != (int *)0x0) && (cVar2 = (**(code **)(*deviceCopyRefCount + 0xc))(), cVar2 != '\0')) && (g_inputDeviceRelease != (void *)0x0)) { @@ -1775,10 +1775,10 @@ void Manager::load_configs() undefined4 local_14; Manager *manager; - ppcStack_20 = (char **)((int)&tmpPath + 0x50); + ppcStack_20 = (char **)(GHIDRA_INT(&tmpPath) + 0x50); puStack_18 = &LAB_00b0c0c5; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)&tmpPath + 0x44U; + local_24 = __security_cookie ^ GHIDRA_INT(&tmpPath) + 0x44U; ExceptionList = &local_1c; fileName._capacity = 0xf; fileName._size = 9; @@ -1787,34 +1787,34 @@ void Manager::load_configs() fileName._buf[9] = '\0'; local_14 = 0; ((ModManager *)(&g_manager->_modManager))->ModManager::TryRedirectPath(&redirectedPath,&fileName); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; pathBytes = extraout_EAX; if (0xf < *(uint *)(extraout_EAX + 0x14)) { pathBytes = *(byte **)extraout_EAX; } ((Music *)((Music *)&itemConfig->_musicManager))->Music::LoadConfig(pathBytes,0); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (0xf < redirectedPath._capacity) { freeSize = redirectedPath._capacity + 1; - freeBlock = (void *)redirectedPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)redirectedPath._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(redirectedPath._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(redirectedPath._buf) + 0x0)) + -4); freeSize = redirectedPath._capacity + 0x24; - if (0x1f < (uint)(redirectedPath._buf._0_4_ + (-4 - (int)freeBlock))) goto LAB_00952f07; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(redirectedPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_00952f07; } operator_delete(freeBlock,freeSize); } local_14 = -1; redirectedPath._size = 0; redirectedPath._capacity = 0xf; - redirectedPath._buf._0_4_ = redirectedPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(redirectedPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(redirectedPath._buf) + 0x0)) & 0xffffff00; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { LAB_00952f07: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1828,34 +1828,34 @@ LAB_00952f07: builtin_strncpy(fileName._buf,"cutscene",8); local_14 = 2; ((ModManager *)(&g_manager->_modManager))->ModManager::TryRedirectPath(&tmpPath,&fileName); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; pathBytes = extraout_EAX_00; if (0xf < *(uint *)(extraout_EAX_00 + 0x14)) { pathBytes = *(byte **)extraout_EAX_00; } ((Cutscene *)(&itemConfig->_cutsceneManager))->Cutscene::load_xml(pathBytes); - local_14 = CONCAT31(local_14._1_3_,2); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); if (0xf < tmpPath._capacity) { freeSize = tmpPath._capacity + 1; - freeChars = (char *)tmpPath._buf._0_4_; + freeChars = (*(undefined4 *)((char *)&((char *)tmpPath._buf) + 0x0)); if (0xfff < freeSize) { - freeChars = *(char **)(tmpPath._buf._0_4_ + -4); + freeChars = *(char **)((*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) + -4); freeSize = tmpPath._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpPath._buf._0_4_ + (-4 - (int)freeChars))) goto LAB_00952ff1; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeChars)))) goto LAB_00952ff1; } operator_delete(freeChars,freeSize); } local_14 = 0xffffffff; tmpPath._size = 0; tmpPath._capacity = 0xf; - tmpPath._buf._0_4_ = tmpPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) & 0xffffff00; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { LAB_00952ff1: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1865,13 +1865,13 @@ LAB_00952ff1: } ((AchievementOverlay *)(&itemConfig->_achievementOverlay))->AchievementOverlay::load_graphics(); manager = g_manager; - tmpPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) = std::_Allocate(0x20); tmpPath._size = 0x10; tmpPath._capacity = 0x1f; - builtin_strncpy((char *)tmpPath._buf._0_4_,"achievements.xml",0x11); + builtin_strncpy((*(undefined4 *)((char *)&((char *)tmpPath._buf) + 0x0)),"achievements.xml",0x11); local_14 = 4; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&redirectedPath,&tmpPath); - local_14 = CONCAT31(local_14._1_3_,5); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),5); pathBytes = extraout_EAX_01; if (0xf < *(uint *)(extraout_EAX_01 + 0x14)) { pathBytes = *(byte **)extraout_EAX_01; @@ -1881,11 +1881,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < tmpPath._capacity) { freeSize = tmpPath._capacity + 1; - freeChars = (char *)tmpPath._buf._0_4_; + freeChars = (*(undefined4 *)((char *)&((char *)tmpPath._buf) + 0x0)); if (0xfff < freeSize) { - freeChars = *(char **)(tmpPath._buf._0_4_ + -4); + freeChars = *(char **)((*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) + -4); freeSize = tmpPath._capacity + 0x24; - if ((char *)0x1f < (char *)(tmpPath._buf._0_4_ + (-4 - (int)freeChars))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(tmpPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeChars)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1895,11 +1895,11 @@ LAB_00952ff1: manager = g_manager; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"sounds.xml",10); local_14 = 6; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&tmpPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,7); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),7); pathBytes = extraout_EAX_02; if (0xf < *(uint *)(extraout_EAX_02 + 0x14)) { pathBytes = *(byte **)extraout_EAX_02; @@ -1909,11 +1909,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1945,11 +1945,11 @@ LAB_00952ff1: (itemConfig->_nightmareScene)._stageBarIcons[0xd] = 0x11; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"nightmares.xml",0xe); local_14 = 8; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&tmpPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,9); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),9); pathBytes = extraout_EAX_03; if (0xf < *(uint *)(extraout_EAX_03 + 0x14)) { pathBytes = *(byte **)extraout_EAX_03; @@ -1959,11 +1959,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1974,11 +1974,11 @@ LAB_00952ff1: itemConfig = &itemConfig->_itemConfig; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"items.xml",9); local_14 = 10; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&redirectedPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,0xb); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0xb); pathBytes = extraout_EAX_04; if (0xf < *(uint *)(extraout_EAX_04 + 0x14)) { pathBytes = *(byte **)extraout_EAX_04; @@ -1988,11 +1988,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2002,11 +2002,11 @@ LAB_00952ff1: manager = g_manager; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"costumes2.xml",0xd); local_14 = 0xc; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&tmpPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,0xd); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0xd); pathBytes = extraout_EAX_05; if (0xf < *(uint *)(extraout_EAX_05 + 0x14)) { pathBytes = *(byte **)extraout_EAX_05; @@ -2016,11 +2016,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2030,11 +2030,11 @@ LAB_00952ff1: manager = g_manager; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"items_metadata.xml",0x12); local_14 = 0xe; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&redirectedPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,0xf); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0xf); pathBytes = extraout_EAX_06; if (0xf < *(uint *)(extraout_EAX_06 + 0x14)) { pathBytes = *(byte **)extraout_EAX_06; @@ -2044,11 +2044,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2058,11 +2058,11 @@ LAB_00952ff1: manager = g_manager; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"pocketitems.xml",0xf); local_14 = 0x10; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&tmpPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,0x11); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x11); pathBytes = extraout_EAX_07; if (0xf < *(uint *)(extraout_EAX_07 + 0x14)) { pathBytes = *(byte **)extraout_EAX_07; @@ -2072,11 +2072,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2086,11 +2086,11 @@ LAB_00952ff1: manager = g_manager; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"playerforms.xml",0xf); local_14 = 0x12; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&redirectedPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,0x13); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x13); pathBytes = extraout_EAX_08; if (0xf < *(uint *)(extraout_EAX_08 + 0x14)) { pathBytes = *(byte **)extraout_EAX_08; @@ -2100,11 +2100,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2114,11 +2114,11 @@ LAB_00952ff1: manager = g_manager; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"bombcostumes.xml",0x10); local_14 = 0x14; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&tmpPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,0x15); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x15); pathBytes = extraout_EAX_09; if (0xf < *(uint *)(extraout_EAX_09 + 0x14)) { pathBytes = *(byte **)extraout_EAX_09; @@ -2128,11 +2128,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2142,11 +2142,11 @@ LAB_00952ff1: manager = g_manager; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"wisps.xml",9); local_14 = 0x16; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&redirectedPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,0x17); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x17); pathBytes = extraout_EAX_10; if (0xf < *(uint *)(extraout_EAX_10 + 0x14)) { pathBytes = *(byte **)extraout_EAX_10; @@ -2156,11 +2156,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2170,11 +2170,11 @@ LAB_00952ff1: manager = g_manager; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"locusts.xml",0xb); local_14 = 0x18; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&tmpPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,0x19); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x19); pathBytes = extraout_EAX_11; if (0xf < *(uint *)(extraout_EAX_11 + 0x14)) { pathBytes = *(byte **)extraout_EAX_11; @@ -2184,11 +2184,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2198,11 +2198,11 @@ LAB_00952ff1: manager = g_manager; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"recipes.xml",0xb); local_14 = 0x1a; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&redirectedPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,0x1b); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x1b); pathBytes = extraout_EAX_12; if (0xf < *(uint *)(extraout_EAX_12 + 0x14)) { pathBytes = *(byte **)extraout_EAX_12; @@ -2212,11 +2212,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2230,11 +2230,11 @@ LAB_00952ff1: manager = g_manager; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"challenges.xml",0xe); local_14 = 0x1c; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&tmpPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,0x1d); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x1d); pathBytes = extraout_EAX_13; if (0xf < *(uint *)(extraout_EAX_13 + 0x14)) { pathBytes = *(byte **)extraout_EAX_13; @@ -2244,11 +2244,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2258,11 +2258,11 @@ LAB_00952ff1: manager = g_manager; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"entities2.xml",0xd); local_14 = 0x1e; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&redirectedPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,0x1f); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x1f); pathBytes = extraout_EAX_14; if (0xf < *(uint *)(extraout_EAX_14 + 0x14)) { pathBytes = *(byte **)extraout_EAX_14; @@ -2272,11 +2272,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2286,11 +2286,11 @@ LAB_00952ff1: manager = g_manager; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"bosscolors.xml",0xe); local_14 = 0x20; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&tmpPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,0x21); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x21); pathBytes = extraout_EAX_15; if (0xf < *(uint *)(extraout_EAX_15 + 0x14)) { pathBytes = *(byte **)extraout_EAX_15; @@ -2300,11 +2300,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2314,11 +2314,11 @@ LAB_00952ff1: manager = g_manager; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"players.xml",0xb); local_14 = 0x22; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&redirectedPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,0x23); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x23); pathBytes = extraout_EAX_16; if (0xf < *(uint *)(extraout_EAX_16 + 0x14)) { pathBytes = *(byte **)extraout_EAX_16; @@ -2328,11 +2328,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2342,11 +2342,11 @@ LAB_00952ff1: manager = g_manager; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"babies.xml",10); local_14 = 0x24; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&tmpPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,0x25); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x25); pathBytes = extraout_EAX_17; if (0xf < *(uint *)(extraout_EAX_17 + 0x14)) { pathBytes = *(byte **)extraout_EAX_17; @@ -2356,11 +2356,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2370,11 +2370,11 @@ LAB_00952ff1: manager = g_manager; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"bossportraits.xml",0x11); local_14 = 0x26; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&redirectedPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,0x27); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x27); pathBytes = extraout_EAX_18; if (0xf < *(uint *)(extraout_EAX_18 + 0x14)) { pathBytes = *(byte **)extraout_EAX_18; @@ -2384,11 +2384,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2398,11 +2398,11 @@ LAB_00952ff1: manager = g_manager; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"font/terminus.fnt",0x11); local_14 = 0x28; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&tmpPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,0x29); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x29); pathBytes = extraout_EAX_19; if (0xf < *(uint *)(extraout_EAX_19 + 0x14)) { pathBytes = *(byte **)extraout_EAX_19; @@ -2412,11 +2412,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2426,11 +2426,11 @@ LAB_00952ff1: manager = g_manager; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"font/terminus8.fnt",0x12); local_14 = 0x2a; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&redirectedPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,0x2b); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x2b); pathBytes = extraout_EAX_20; if (0xf < *(uint *)(extraout_EAX_20 + 0x14)) { pathBytes = *(byte **)extraout_EAX_20; @@ -2440,11 +2440,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2454,11 +2454,11 @@ LAB_00952ff1: manager = g_manager; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"font/PFTempestaSevenCondensed.fnt",0x21); local_14 = 0x2c; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&tmpPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,0x2d); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x2d); pathBytes = extraout_EAX_21; if (0xf < *(uint *)(extraout_EAX_21 + 0x14)) { pathBytes = *(byte **)extraout_EAX_21; @@ -2468,11 +2468,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2482,11 +2482,11 @@ LAB_00952ff1: manager = g_manager; fileName._size = 0; fileName._capacity = 0xf; - fileName._buf._0_8_ = fileName._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) = (*(undefined8 *)((char *)&(fileName._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(fileName._buf))->std::string::assign((byte *)"font/LuaMiniOutlined.fnt",0x18); local_14 = 0x2e; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&fontPath,&fileName); - local_14 = CONCAT31(local_14._1_3_,0x2f); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x2f); pathBytes = extraout_EAX_22; if (0xf < *(uint *)(extraout_EAX_22 + 0x14)) { pathBytes = *(byte **)extraout_EAX_22; @@ -2496,11 +2496,11 @@ LAB_00952ff1: local_14 = 0xffffffff; if (0xf < fileName._capacity) { freeSize = fileName._capacity + 1; - freeBlock = (void *)fileName._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(fileName._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); freeSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2609,16 +2609,16 @@ void Manager::unload_configs() if (challengeBegin != pvVar2) { do { FUN_004269f0(); - challengeCursor = (void *)((int)challengeCursor + 0xa4); + challengeCursor = (void *)(GHIDRA_INT(challengeCursor) + 0xa4); } while (challengeCursor != pvVar2); manager = savedManager; } - size = (((int)challengeCapacity - (int)challengeBegin) / 0xa4) * 0xa4; + size = ((GHIDRA_INT(challengeCapacity) - GHIDRA_INT(challengeBegin)) / 0xa4) * 0xa4; pvVar2 = challengeBegin; if (0xfff < size) { pvVar2 = *(void **)((char *)challengeBegin + -4); size = size + 0x23; - if (0x1f < (uint)((int)challengeBegin + (-4 - (int)pvVar2))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(challengeBegin) + (-4 - GHIDRA_INT(pvVar2))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2887,7 +2887,7 @@ void Manager::update_hotkeys() undefined4 local_8; Manager *manager; - local_8 = __security_cookie ^ (uint)(local_28 + 0x24); + local_8 = __security_cookie ^ GHIDRA_UINT((local_28 + 0x24)); if (this->_isHotkeysEnabled == 0) goto LAB_009549c7; bVar2 = input_is_action_triggered(this,0x11,-1,(Entity *)0x0,0); manager = g_manager; @@ -2916,7 +2916,7 @@ void Manager::update_hotkeys() LAB_0095497c: bVar2 = 1; } - local_40 = CONCAT31(local_40._1_3_,bVar2); + local_40 = CONCAT31((*(undefined1 *)((char *)&(local_40) + 0x1)),bVar2); if (bVar2 != (this->_optionsConfig)._isFullscreen) { ((OptionsConfig *)(&this->_optionsConfig))->OptionsConfig::set_fullscreen(bVar2); } @@ -3047,10 +3047,10 @@ void Manager::Update(char param_1) Game *game; pMVar4 = g_manager; - stackCookie = __security_cookie ^ (uint)auStack_488; + stackCookie = __security_cookie ^ GHIDRA_UINT(auStack_488); local_47c = g_manager; uVar7 = g_manager->_framecount & 0x80000001; - if ((int)uVar7 < 0) { + if (GHIDRA_INT(uVar7) < 0) { uVar7 = (uVar7 - 1 | 0xfffffffe) + 1; } if ((uVar7 == 1) && ((g_manager->_optionsConfig)._enableInterpolation == 0)) { @@ -3264,7 +3264,7 @@ joined_r0x00954dfc: } game = g_game; local_484 = *(Camera **)((char *)g_game->_room + 0x11f8); - local_480 = (PopupButtons *)(CONCAT31(local_480._1_3_,(char)pMVar4->_framecount) & 0xffffff01); + local_480 = (PopupButtons *)(CONCAT31((*(undefined1 *)((char *)&(local_480) + 0x1)),(char)pMVar4->_framecount) & 0xffffff01); bVar6 = ((Game *)(g_game))->Game::IsPaused(); pCVar12 = local_484; if ((bVar6 == 0) || @@ -3285,8 +3285,8 @@ LAB_009552c4: coopSlot = (g_game->_playerManager)._coopSlots; do { if (-1 < coopSlot->_controllerIndex) { - iVar10 = (int)(game->_playerManager)._coopPlayerTypes._end - - (int)(game->_playerManager)._coopPlayerTypes._begin; + iVar10 = GHIDRA_INT((game->_playerManager)._coopPlayerTypes._end) - + GHIDRA_INT((game->_playerManager)._coopPlayerTypes._begin); fVar14 = (float)((double)(iVar10 >> 2) + __uint_to_double_fixup[-(iVar10 >> 0x1f)]); for (fVar13 = (float)coopSlot->_state - coopSlot->_menuPosition; fVar14 * 0.5 <= fVar13; fVar13 = fVar13 - fVar14) { @@ -3460,7 +3460,7 @@ void Manager::Render() local_14 = 0xffffffff; puStack_18 = &LAB_00b0c12d; local_1c = ExceptionList; - uVar3 = __security_cookie ^ (uint)(local_38 + 0x28); + uVar3 = __security_cookie ^ GHIDRA_UINT((local_38 + 0x28)); if (((g_manager->_framecount & 1) == 0) && ((g_manager->_optionsConfig)._enableInterpolation == 0) ) { return; @@ -3563,7 +3563,7 @@ LAB_00955727: cutsceneAnimsEnd = piVar4 + 1; scratchVec.y = (float)piVar4; if (local_40 != (float)*cutsceneAnimsEnd) { - (**(code **)(**(int **)((char *)local_40 + -4 + (*cutsceneAnimsEnd - (int)local_40 >> 2) * 4) + (**(code **)(**(int **)((char *)local_40 + -4 + (*cutsceneAnimsEnd - GHIDRA_INT(local_40) >> 2) * 4) + 0x14))(&(*(undefined1 *)((char *)&((temp_3f5a48c29e->_cutsceneManager)) + 0x820))); piVar4 = (int *)scratchVec.y; } @@ -3577,7 +3577,7 @@ LAB_00955727: && (((char)(temp_3f5a48c29e->_nightmareScene)._stageBarIcons[iVar7 * 0x13 + -0x2de] != '\0' || (*cutsceneAnimsEnd - *piVar4 >> 2 <= (temp_3f5a48c29e->_nightmareScene)._stageBarIcons[iVar7 * 0x13 + -0x2e0])))) - || (*(char *)((int)(temp_3f5a48c29e->_nightmareScene)._stageBarIcons + + || (*(char *)(GHIDRA_INT((temp_3f5a48c29e->_nightmareScene)._stageBarIcons) + iVar7 * 0x4c + -0xb97) != '\0')) { (temp_3f5a48c29e->_nightmareScene)._stageBarIcons[iVar7 * 0x13 + -0x2e2] = (temp_3f5a48c29e->_nightmareScene)._stageBarIcons[iVar7 * 0x13 + -0x2df]; @@ -3751,13 +3751,13 @@ LAB_00955727: } g_graphicsManager_blendMode[3] = 1; g_graphicsManager_blendMode[4] = 7; - local_38._8_4_ = + (*(undefined4 *)((char *)&(local_38) + 0x8)) = (BADTYPE)((double)DAT_00c79890[6] + __uint_to_double_fixup[-(DAT_00c79890[6] >> 0x1f)]); scratchVec.y = g_displayPixelRatio * g_screenPointScale * 0.5; scratchVec.x = (float)((double)DAT_00c79890[7] + __uint_to_double_fixup[-(DAT_00c79890[7] >> 0x1f)]); g_currentShader = renderTargetEntry; - ((Shader *)(renderTargetEntry))->Shader::set_uniform((byte *)"ScreenSizePow2",10,local_38 + 8,(int)DAT_00c79890); + ((Shader *)(renderTargetEntry))->Shader::set_uniform((byte *)"ScreenSizePow2",10,local_38 + 8,GHIDRA_INT(DAT_00c79890)); local_54 = 0; drawParams = 0; local_58 = 0; @@ -3808,12 +3808,12 @@ ChallengeParam * Manager::GetChallengeParams(int challengeID) void *paramsBegin; paramsBegin = (g_manager->_challengeParams)._begin; - index = ((int)(g_manager->_challengeParams)._end - (int)paramsBegin) / 0xa4 - 1; - requestedIndex = -(uint)(challengeID != 0) & challengeID; + index = (GHIDRA_INT((g_manager->_challengeParams)._end) - GHIDRA_INT(paramsBegin)) / 0xa4 - 1; + requestedIndex = -GHIDRA_UINT((challengeID != 0)) & challengeID; if (requestedIndex < index) { index = requestedIndex; } - return (ChallengeParam *)(index * 0xa4 + (int)paramsBegin); + return (ChallengeParam *)(index * 0xa4 + GHIDRA_INT(paramsBegin)); } // 009588a0 @@ -3840,28 +3840,28 @@ void * Manager::LoadImage(void *outImage, byte *path) local_8 = 0xffffffff; puStack_c = &LAB_00b0c295; local_10 = ExceptionList; - local_14 = __security_cookie ^ (int)&pathString + 0x28U; + local_14 = __security_cookie ^ GHIDRA_INT(&pathString) + 0x28U; ExceptionList = &local_10; pathString._size = 0; pathString._capacity = 0xf; - pathString._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(pathString._buf) + 0x0)) = (void *)0x0; pathEnd = path; do { bVar1 = *pathEnd; pathEnd = pathEnd + 1; } while (bVar1 != 0); - ((std::string *)(pathString._buf))->std::string::assign(path,(int)pathEnd - (int)(path + 1)); + ((std::string *)(pathString._buf))->std::string::assign(path,GHIDRA_INT(pathEnd) - GHIDRA_INT((path + 1))); local_8 = 1; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath((std_string *)redirectedPath,&pathString); - local_8 = CONCAT31(local_8._1_3_,3); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); uVar3 = extraout_ECX; if (0xf < pathString._capacity) { allocSize = pathString._capacity + 1; - ptr = (void *)pathString._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((void *)pathString._buf) + 0x0)); if (0xfff < allocSize) { - ptr = *(void **)(pathString._buf._0_4_ + -4); + ptr = *(void **)((*(undefined4 *)((char *)&(pathString._buf) + 0x0)) + -4); allocSize = pathString._capacity + 0x24; - if (0x1f < (uint)(pathString._buf._0_4_ + (-4 - (int)ptr))) goto LAB_00958992; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(pathString._buf) + 0x0)) + (-4 - GHIDRA_INT(ptr))))) goto LAB_00958992; } operator_delete(ptr,allocSize); uVar3 = extraout_ECX_00; @@ -3877,7 +3877,7 @@ void * Manager::LoadImage(void *outImage, byte *path) if (0xfff < allocSize) { psVar2 = (std_string *)redirectedPath[0][-1]._capacity; allocSize = redirectedPathCapacity + 0x24; - if (0x1f < (uint)((int)redirectedPath[0] + (-4 - (int)psVar2))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPath[0]) + (-4 - GHIDRA_INT(psVar2))))) { LAB_00958992: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3924,10 +3924,10 @@ void Manager::queue_achievement_popup(int achievementId) mapSlotOffset = uVar2 * 4; if (*(int *)((char *)pvVar3 + uVar2 * 4) == 0) { pvVar3 = operator_new(0x10); - *(void **)(mapSlotOffset + (int)(manager->_achievementOverlay)._queue._map) = pvVar3; + *(void **)(mapSlotOffset + GHIDRA_INT((manager->_achievementOverlay)._queue._map)) = pvVar3; pvVar3 = (manager->_achievementOverlay)._queue._map; } - *(int *)(*(int *)(mapSlotOffset + (int)pvVar3) + (uVar4 & 3) * 4) = achievementId; + *(int *)(*(int *)(mapSlotOffset + GHIDRA_INT(pvVar3)) + (uVar4 & 3) * 4) = achievementId; queueSize = &(manager->_achievementOverlay)._queue._size; *queueSize = *queueSize + 1; ((AchievementOverlay *)(&manager->_achievementOverlay))->AchievementOverlay::Update(); @@ -3949,7 +3949,7 @@ void Manager::StartNewGame(int playerType, int challenge, Seeds unk, int difficu manager = g_manager; puStack_c = &LAB_00b0c2d5; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&seedsCopy)[1]._rng._shift2; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&seedsCopy)[1]._rng._shift2); ExceptionList = &local_10; local_8 = 0; g_manager->_startPlayerType = playerType; @@ -3958,12 +3958,12 @@ void Manager::StartNewGame(int playerType, int challenge, Seeds unk, int difficu manager->_startingFromRerun = 0; manager->_debugStart = 0; ((Seeds *)(&seedsCopy))->Seeds::construct_from_copy(&unk); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); ((Seeds *)(&manager->_startSeeds))->Seeds::operator_assign(other); FID_conflict__Erase_tree_>_> (&seedsCopy._seedEffects, (fuzzer_allocator_> *)&seedsCopy._seedEffects, - *(_Tree_node **)((int)seedsCopy._seedEffects + 4)); + *(_Tree_node **)(GHIDRA_INT(seedsCopy._seedEffects) + 4)); operator_delete(seedsCopy._seedEffects,0x14); manager->_startDifficulty = difficulty; (manager->_dailyChallenge)._id = 0; @@ -3977,7 +3977,7 @@ void Manager::StartNewGame(int playerType, int challenge, Seeds unk, int difficu FID_conflict__Erase_tree_>_> (&unk._seedEffects, (fuzzer_allocator_> *)&unk._seedEffects, - *(_Tree_node **)((int)unk._seedEffects + 4)); + *(_Tree_node **)(GHIDRA_INT(unk._seedEffects) + 4)); operator_delete(unk._seedEffects,0x14); ExceptionList = local_10; return; @@ -4005,20 +4005,20 @@ void Manager::RestartGame() manager = g_manager; puStack_c = &LAB_00b0c315; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&seedsCopy)[1]._rng._shift2; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&seedsCopy)[1]._rng._shift2); ExceptionList = &local_10; local_8 = 0; if (g_game == (Game *)0x0) { KAGE_LogMessage(0x10,(byte *)"Game must not be NULL"); } ((Seeds *)(&seedsCopy))->Seeds::construct_from_copy(&SStack00000004); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((Seeds *)(&manager->_startSeeds))->Seeds::operator_assign(other); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; FID_conflict__Erase_tree_>_> (&seedsCopy._seedEffects, (fuzzer_allocator_> *)&seedsCopy._seedEffects, - *(_Tree_node **)((int)seedsCopy._seedEffects + 4)); + *(_Tree_node **)(GHIDRA_INT(seedsCopy._seedEffects) + 4)); operator_delete(seedsCopy._seedEffects,0x14); if (((manager->_startSeeds)._isCustomRun == 0) || (g_game->_challenge != 0)) { seed = 0; @@ -4034,7 +4034,7 @@ void Manager::RestartGame() FID_conflict__Erase_tree_>_> (seedEffectsTree, (fuzzer_allocator_> *)seedEffectsTree, - *(_Tree_node **)((int)seedEffectsHead + 4)); + *(_Tree_node **)(GHIDRA_INT(seedEffectsHead) + 4)); *(void **)((char *)seedEffectsHead + 4) = seedEffectsHead; *(void **)seedEffectsHead = seedEffectsHead; *(void **)((char *)seedEffectsHead + 8) = seedEffectsHead; @@ -4061,10 +4061,10 @@ void Manager::RestartGame() (manager->_popupButtons)._buttons[1]._targetSlideOffset = 96.0; ((PersistentGameData *)(&pMVar2->_persistentGameData))->PersistentGameData::set_run_mask(0,0); FID_conflict__Erase_tree_>_> - ((undefined4 *)((int)register0x00000010 + 0x58), + ((undefined4 *)(GHIDRA_INT(register0x00000010) + 0x58), (fuzzer_allocator_> *) - ((int)register0x00000010 + 0x58), - *(_Tree_node **)((int)SStack00000004._seedEffects + 4)); + (GHIDRA_INT(register0x00000010) + 0x58), + *(_Tree_node **)(GHIDRA_INT(SStack00000004._seedEffects) + 4)); operator_delete(SStack00000004._seedEffects,0x14); ExceptionList = local_10; return; @@ -4315,7 +4315,7 @@ void Manager::start_pending_game() local_8 = 0xffffffff; puStack_c = &LAB_00b0c36d; local_10 = ExceptionList; - stackCookie = __security_cookie ^ (uint)&(&rerunSeeds)[1]._rng._shift3; + stackCookie = __security_cookie ^ GHIDRA_UINT(&(&rerunSeeds)[1]._rng._shift3); ExceptionList = &local_10; if ((profileMap->_starting != 0) && ((local_e0 = profileMap, profileMap->_networkPlay == 0 || @@ -4388,10 +4388,10 @@ void Manager::start_pending_game() iVar2 = *(int *)((char *)pvVar3 + 4); if (iVar2 == 0) { local_ec = 0; - local_ec._4_4_ = (Manager *)0x0; - local_ec._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(local_ec) + 0x4)) = (Manager *)0x0; + (*(undefined4 *)((char *)&(local_ec) + 0x0)) = (void *)0x0; local_e4 = (void *)local_ec; - pMVar4 = local_ec._4_4_; + pMVar4 = (*(undefined4 *)((char *)&(local_ec) + 0x4)); } else { local_e4 = *(void **)(iVar2 + 8); @@ -4416,7 +4416,7 @@ void Manager::start_pending_game() } } } - pvVar3 = (void *)((int)pvVar3 + 0x14); + pvVar3 = (void *)(GHIDRA_INT(pvVar3) + 0x14); } while (pvVar3 != (profileMap->_lobbyMembers)._end); } netplayManager = &profileMap->_netplayManager; @@ -4449,28 +4449,28 @@ void Manager::start_pending_game() ((Seeds *)&aSStackY_2fd4[0x81]._gameStartSeed,&profileMap->_startSeeds); seeds._stageSeeds[8] = in_stack_fffffec4; seeds._isCustomRun = in_stack_fffffe8c[0]; - seeds._1_3_ = in_stack_fffffe8c._1_3_; - seeds._gameStartSeed = in_stack_fffffe8c._4_4_; - seeds._rng._seed = in_stack_fffffe8c._8_4_; - seeds._rng._shift1 = in_stack_fffffe8c._12_4_; - seeds._rng._shift2 = in_stack_fffffe8c._16_4_; - seeds._rng._shift3 = in_stack_fffffe8c._20_4_; - seeds._stageSeeds[0] = in_stack_fffffe8c._24_4_; - seeds._stageSeeds[1] = in_stack_fffffe8c._28_4_; - seeds._stageSeeds[2] = in_stack_fffffe8c._32_4_; - seeds._stageSeeds[3] = in_stack_fffffe8c._36_4_; - seeds._stageSeeds[4] = in_stack_fffffe8c._40_4_; - seeds._stageSeeds[5] = in_stack_fffffe8c._44_4_; - seeds._stageSeeds[6] = in_stack_fffffe8c._48_4_; - seeds._stageSeeds[7] = in_stack_fffffe8c._52_4_; + (*(undefined1 *)((char *)&(seeds) + 0x1)) = (*(undefined1 *)((char *)&(in_stack_fffffe8c) + 0x1)); + seeds._gameStartSeed = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x4)); + seeds._rng._seed = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x8)); + seeds._rng._shift1 = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0xc)); + seeds._rng._shift2 = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x10)); + seeds._rng._shift3 = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x14)); + seeds._stageSeeds[0] = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x18)); + seeds._stageSeeds[1] = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x1c)); + seeds._stageSeeds[2] = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x20)); + seeds._stageSeeds[3] = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x24)); + seeds._stageSeeds[4] = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x28)); + seeds._stageSeeds[5] = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x2c)); + seeds._stageSeeds[6] = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x30)); + seeds._stageSeeds[7] = (*(undefined4 *)((char *)&(in_stack_fffffe8c) + 0x34)); seeds._stageSeeds[9] = in_stack_fffffec8; seeds._stageSeeds[10] = in_stack_fffffecc; seeds._stageSeeds[0xb] = in_stack_fffffed0; - seeds._stageSeeds[0xc] = (int)in_stack_fffffed4; - seeds._stageSeeds[0xd] = (int)((ulonglong)in_stack_fffffed4 >> 0x20); + seeds._stageSeeds[0xc] = GHIDRA_INT(in_stack_fffffed4); + seeds._stageSeeds[0xd] = GHIDRA_INT(((ulonglong)in_stack_fffffed4 >> 0x20)); seeds._playerInitSeed = in_stack_fffffedc; seeds._seedEffects = (void *)in_stack_fffffee0; - seeds._seedEffectsCount = (int)in_stack_fffffee4; + seeds._seedEffectsCount = GHIDRA_INT(in_stack_fffffee4); ((Game *)(netplayManager))->Game::Start(iVar1,iVar2,seeds,frameParity); } else { @@ -4478,9 +4478,9 @@ void Manager::start_pending_game() iVar1 = *(int *)&(*(undefined1 *)((char *)(profileMap) + 0x4b1a0)); ((std::string *)(acStack_112 + -0x1a))->std::string::string(&(*(undefined1 *)((char *)(profileMap) + 0x4b1a8))); roomFile._buf[8] = (char)in_stack_fffffedc; - roomFile._buf[9] = (char)((uint)in_stack_fffffedc >> 8); - roomFile._buf[10] = (char)((uint)in_stack_fffffedc >> 0x10); - roomFile._buf[0xb] = (char)((uint)in_stack_fffffedc >> 0x18); + roomFile._buf[9] = (char)(GHIDRA_UINT(in_stack_fffffedc) >> 8); + roomFile._buf[10] = (char)(GHIDRA_UINT(in_stack_fffffedc) >> 0x10); + roomFile._buf[0xb] = (char)(GHIDRA_UINT(in_stack_fffffedc) >> 0x18); roomFile._buf[0] = (char)in_stack_fffffed4; roomFile._buf[1] = (char)((ulonglong)in_stack_fffffed4 >> 8); roomFile._buf[2] = (char)((ulonglong)in_stack_fffffed4 >> 0x10); @@ -4490,12 +4490,12 @@ void Manager::start_pending_game() roomFile._buf[6] = (char)((ulonglong)in_stack_fffffed4 >> 0x30); roomFile._buf[7] = (char)((ulonglong)in_stack_fffffed4 >> 0x38); roomFile._buf[0xc] = (char)in_stack_fffffee0; - roomFile._buf[0xd] = (char)((uint)in_stack_fffffee0 >> 8); - roomFile._buf[0xe] = (char)((uint)in_stack_fffffee0 >> 0x10); - roomFile._buf[0xf] = (char)((uint)in_stack_fffffee0 >> 0x18); - roomFile._size = (uint)in_stack_fffffee4; - roomFile._capacity = (uint)ppvVar5; - ((Game *)(hud))->Game::StartDebug(iVar1,iVar2,(int)local_e0,roomFile); + roomFile._buf[0xd] = (char)(GHIDRA_UINT(in_stack_fffffee0) >> 8); + roomFile._buf[0xe] = (char)(GHIDRA_UINT(in_stack_fffffee0) >> 0x10); + roomFile._buf[0xf] = (char)(GHIDRA_UINT(in_stack_fffffee0) >> 0x18); + roomFile._size = GHIDRA_UINT(in_stack_fffffee4); + roomFile._capacity = GHIDRA_UINT(ppvVar5); + ((Game *)(hud))->Game::StartDebug(iVar1,iVar2,GHIDRA_INT(local_e0),roomFile); } } else { @@ -4516,7 +4516,7 @@ void Manager::start_pending_game() (&savedRunSeeds._seedEffects, (fuzzer_allocator_> *) &savedRunSeeds._seedEffects, - *(_Tree_node **)((int)savedRunSeeds._seedEffects + 4)); + *(_Tree_node **)(GHIDRA_INT(savedRunSeeds._seedEffects) + 4)); operator_delete(savedRunSeeds._seedEffects,0x14); Game::StartFromRerunState(&profileMap->_gamestate); } @@ -4534,7 +4534,7 @@ void Manager::start_pending_game() (&rerunSeeds._seedEffects, (fuzzer_allocator_> *) &rerunSeeds._seedEffects, - *(_Tree_node **)((int)rerunSeeds._seedEffects + 4)); + *(_Tree_node **)(GHIDRA_INT(rerunSeeds._seedEffects) + 4)); operator_delete(rerunSeeds._seedEffects,0x14); game = g_game; hud = &g_game->_hud; @@ -4571,7 +4571,7 @@ void Manager::start_pending_game() FUN_00959500(); } frameParity = profileMap->_framecount & 0x80000001; - if ((int)frameParity < 0) { + if (GHIDRA_INT(frameParity) < 0) { frameParity = (frameParity - 1 | 0xfffffffe) + 1; } if (frameParity == 1) { @@ -4608,7 +4608,7 @@ void Manager::start_pending_menu() if ((g_game->_challenge != 0) || (isNormalRun = 1, (g_game->_dailyChallenge)._id != 0)) { isNormalRun = 0; } - FUN_0090cd10(0,isNormalRun,__security_cookie ^ (int)register0x00000010 - 4U); + FUN_0090cd10(0,isNormalRun,__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); unused2 = 1; iVar1 = 0x959d8c; ((NetplayManager *)(&this->_netplayManager))->NetplayManager::reset(1); @@ -4662,7 +4662,7 @@ void Manager::SetSaveSlot(uint slot) uint local_c; undefined1 auStack_8 [4]; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); ((PersistentGameData *)(&this->_persistentGameData))->PersistentGameData::Clear(1); if (slot != 0) { steamContext = (int *)SteamInternal_ContextInit(&PTR_FUN_00c5c3a4); @@ -4680,7 +4680,7 @@ void Manager::SetSaveSlot(uint slot) nameEnd = nameEnd + 1; } while (isLoaded != 0); ((std::string *)(&(*(undefined1 *)((char *)&((this->_persistentGameData)) + 0x20))))->std::string::assign(fileName, - (int)nameEnd - (int)(fileName + 1)); + GHIDRA_INT(nameEnd) - GHIDRA_INT((fileName + 1))); isLoaded = ((PersistentGameData *)(&this->_persistentGameData))->PersistentGameData::LoadFromSteamCloud(); } if (isLoaded == 0) { @@ -4753,7 +4753,7 @@ void Manager::apply_device_key_config(int deviceId) local_8 = 0xffffffff; puStack_c = &LAB_00b0c42d; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; ((InputManager *)(&PTR_vftable_00c57b18))->InputManager::get_device(&local_1c,deviceId); local_8 = 0; @@ -4773,7 +4773,7 @@ void Manager::apply_device_key_config(int deviceId) isLess = nameChar < *savedNameChar; if (nameChar != *savedNameChar) { LAB_0095b217: - nameCompare = -(uint)isLess | 1; + nameCompare = -GHIDRA_UINT(isLess) | 1; goto LAB_0095b21c; } if (nameChar == 0) break; @@ -4870,7 +4870,7 @@ void Manager::update_controller_popups() puStack_c = &LAB_00b0c4b3; savedExceptionList = ExceptionList; - uVar6 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar6 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &savedExceptionList; manager = menuManager; if (*(int *)&(*(undefined1 *)((char *)(menuManager) + 0x4abc8)) == -1) { @@ -4882,7 +4882,7 @@ void Manager::update_controller_popups() ehState = 0; (**(code **)(PTR_vftable_00c57b2c + 0x10))(); ehState = 0xffffffff; - if ((uint)(iVar11 >> 3) <= uVar10) break; + if (GHIDRA_UINT((iVar11 >> 3)) <= uVar10) break; ((KAGE::Input::Manager *)((Manager *)&PTR_vftable_00c57b18))->KAGE::Input::Manager::get_device(&local_34,uVar10); ehState = 1; if (local_34 == 0) { @@ -4894,7 +4894,7 @@ void Manager::update_controller_popups() if ((iVar11 != 0) && (((*(byte *)(iVar11 + 8) & 0x20) != 0 || (*(int *)(iVar11 + 900) == 3)))) { iVar12 = *(int *)(iVar11 + 0x10); - if ((uint)(*(int *)(iVar11 + 0x14) - iVar12 >> 4) < 0xf) { + if (GHIDRA_UINT((*(int *)(iVar11 + 0x14) - iVar12 >> 4)) < 0xf) { KAGE_LogMessage(0x10,(byte *)"ActionId is out of range\n"); iVar12 = *(int *)(iVar11 + 0x10); } @@ -4903,7 +4903,7 @@ void Manager::update_controller_popups() local_3c.y = (float)&DAT_bf800000; MessagePopup::MessagePopup (popup,&g_manager->_font2_TeamMeatEx12,(void *)0x0,(void *)0x0,&local_3c); - ehState = CONCAT31(ehState._1_3_,3); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),3); local_140 = 3; MessagePopup::add_blank_footer ((byte *)"##PLATFORM###UNRECOGNIZED_CONTROLLER_HEADER", @@ -4927,30 +4927,30 @@ void Manager::update_controller_popups() } controllerIds = (void *)0x0; idsEnd = (int *)0x0; - ehState._0_1_ = 5; - ehState._1_3_ = 0; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; + (*(undefined1 *)((char *)&(ehState) + 0x1)) = 0; piVar7 = (int *)0x0; if (g_menuManager == (MenuManager *)0x0) { if (g_game != (Game *)0x0) { NVar1 = menuManager->_netplayManager; if ((NVar1 == *(NetplayManager *)(menuManager + 1)) || - ((uint)((int)*(NetplayManager *)(menuManager + 1) - (int)NVar1) < 4)) { + (GHIDRA_UINT((GHIDRA_INT(*(NetplayManager *)(menuManager + 1)) - GHIDRA_INT(NVar1))) < 4)) { if (g_game->_fadeOutTarget == 0) { playerManager = &g_game->_playerManager; uVar6 = 0; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar9 = (playerManager->_playerList)._end; - if ((int)pvVar9 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar9) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n" ); pvVar9 = (playerManager->_playerList)._end; game = g_game; } piVar7 = (playerManager->_playerList)._begin; - if (uVar6 < (uint)((int)pvVar9 - (int)piVar7 >> 2)) { + if (uVar6 < GHIDRA_UINT((GHIDRA_INT(pvVar9) - GHIDRA_INT(piVar7) >> 2))) { piVar7 = piVar7 + uVar6; } controllerId = *(int *)(*piVar7 + 0x1618); @@ -4964,8 +4964,8 @@ void Manager::update_controller_popups() } playerManager = &game->_playerManager; uVar6 = uVar6 + 1; - } while (uVar6 < (uint)((int)(game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar6 < GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); piVar7 = idsEnd; menuManager = manager; controllerCount = idsEnd; @@ -4997,26 +4997,26 @@ LAB_0095b634: (*(undefined1 *)((char *)(menuManager) + 0x4abd0)) = 0; } slot = 0; - controllerCount = (int *)((int)piVar7 - (int)controllerIds >> 2); + controllerCount = (int *)(GHIDRA_INT(piVar7) - GHIDRA_INT(controllerIds) >> 2); if (controllerCount != (int *)0x0) { do { controllerId = -1; if (*piVar8 == -1) { piVar7 = (int *)(**(code **)(PTR_vftable_00c57b18 + 0x28))(defaultDevice); iVar11 = *piVar7; - ehState._0_1_ = 6; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 6; if (((defaultDeviceCtrl != (int *)0x0) && (cVar5 = (**(code **)(*defaultDeviceCtrl + 0xc))(), cVar5 != '\0')) && (g_inputDeviceRelease != (void *)0x0)) { (*g_inputDeviceRelease)(defaultDevice); } - ehState._0_1_ = 5; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; if (iVar11 == 0) { popupPos.x = (float)&DAT_bf800000; popupPos.y = (float)&DAT_bf800000; MessagePopup::MessagePopup (popup,&g_manager->_font2_TeamMeatEx12,(void *)0x0,(void *)0x0,&popupPos); - ehState = CONCAT31(ehState._1_3_,7); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),7); lineColor._red = 0.21568628; lineColor._green = 0.16862746; lineColor._blue = 0.1764706; @@ -5062,13 +5062,13 @@ LAB_0095b634: else if (menuManager->_selectedMenuID == 0xc) { g_manager->_isHotkeysEnabled = 1; pvVar9 = (menuManager->_menuStateHistory)._end; - if (1 < (uint)((int)pvVar9 - (int)(menuManager->_menuStateHistory)._begin >> 2)) { - pvVar9 = (void *)((int)pvVar9 + -4); + if (1 < GHIDRA_UINT((GHIDRA_INT(pvVar9) - GHIDRA_INT((menuManager->_menuStateHistory)._begin) >> 2))) { + pvVar9 = (void *)(GHIDRA_INT(pvVar9) + -4); (menuManager->_menuStateHistory)._end = pvVar9; } ((MenuManager *)(menuManager))->MenuManager::SetState(*(int *)((char *)pvVar9 + -4),0); } - ehState._0_1_ = 5; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; local_d8 = 0; local_d4 = 0; local_e0 = 0; @@ -5083,30 +5083,30 @@ LAB_0095b634: piVar7 = (int *)(**(code **)(PTR_vftable_00c57b18 + 0x28)) (device,*(undefined4 *)((char *)controllerIds + slot * 4)); iVar11 = *piVar7; - ehState._0_1_ = 8; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 8; if (((deviceCtrl != (int *)0x0) && (cVar5 = (**(code **)(*deviceCtrl + 0xc))(), cVar5 != '\0')) && (g_inputDeviceRelease != (void *)0x0)) { (*g_inputDeviceRelease)(device); } - ehState._0_1_ = 5; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; if (iVar11 == 0) { uVar6 = 0; while( true ) { - ehState._0_1_ = 5; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; deviceIdx = uVar6; (**(code **)(PTR_vftable_00c57b2c + 0xc))(0xffffffff); iVar12 = DAT_00c57b24 - _DAT_00c57b20; - ehState._0_1_ = 9; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 9; (**(code **)(PTR_vftable_00c57b2c + 0x10))(); iVar11 = controllerId; game = g_game; - ehState._0_1_ = 5; - if ((uint)(iVar12 >> 3) <= uVar6) break; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; + if (GHIDRA_UINT((iVar12 >> 3)) <= uVar6) break; ((KAGE::Input::Manager *)((Manager *)&PTR_vftable_00c57b18))->KAGE::Input::Manager::get_device(&local_3c,uVar6); - ehState = CONCAT31(ehState._1_3_,10); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),10); if ((int *)local_3c.x == (int *)0x0) { - ehState._0_1_ = 0xb; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xb; if ((int *)local_3c.y == (int *)0x0) goto LAB_0095bc03; cVar5 = (**(code **)(*(int *)local_3c.y + 0xc))(); if ((cVar5 == '\0') || (g_inputDeviceRelease == (void *)0x0)) goto LAB_0095bc03; @@ -5130,11 +5130,11 @@ LAB_0095b9fd: playerManager = &g_game->_playerManager; uVar6 = 0; game = g_game; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar9 = (playerManager->_playerList)._end; - if ((int)pvVar9 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar9) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *) "((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n" ); @@ -5142,7 +5142,7 @@ LAB_0095b9fd: game = g_game; } piVar7 = (playerManager->_playerList)._begin; - if (uVar6 < (uint)((int)pvVar9 - (int)piVar7 >> 2)) { + if (uVar6 < GHIDRA_UINT((GHIDRA_INT(pvVar9) - GHIDRA_INT(piVar7) >> 2))) { piVar7 = piVar7 + uVar6; } if (*(int *)(*piVar7 + 0x1618) == iVar11) { @@ -5151,8 +5151,8 @@ LAB_0095b9fd: } playerManager = &game->_playerManager; uVar6 = uVar6 + 1; - } while (uVar6 < (uint)((int)(game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar6 < GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } menuManager = manager; } @@ -5172,23 +5172,23 @@ LAB_0095bae2: if ((piVar7 != (int *)0x0) && (piVar7[1] < 3)) { timeNs = GetTimeNs(); piVar7 = openPopup; - uVar6 = (uint)(timeNs >> 0x20); + uVar6 = GHIDRA_UINT((timeNs >> 0x20)); uVar2 = (timeNs & 0xffffffff) * 0xd7b634db; - local_34 = (int)uVar2; + local_34 = GHIDRA_INT(uVar2); lVar3 = (timeNs & 0xffffffff) * 0x431bde82; local_30 = (int *)((ulonglong)lVar3 >> 0x20); lVar4 = (ulonglong)uVar6 * 0xd7b634db + (uVar2 >> 0x20); local_ac = (undefined4)(lVar4 + lVar3); lVar3 = (ulonglong)uVar6 * 0x431bde82 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar4 >> 0x20), - (int)local_30 + - (uint)CARRY4((uint)lVar3,(uint)lVar4)), - (int)((ulonglong)(lVar4 + lVar3) >> 0x20)); - uVar10 = (uint)((ulonglong)lVar3 >> 0x20); - uVar6 = (uint)lVar3 >> 0x12 | uVar10 * 0x4000; - if (((uVar10 >> 0x12) - openPopup[5] == (uint)(uVar6 < (uint)openPopup[4])) - && (uVar6 - openPopup[4] < (uint)openPopup[0x15])) { + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)), + GHIDRA_INT(local_30) + + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar3),GHIDRA_UINT(lVar4)))), + GHIDRA_INT(((ulonglong)(lVar4 + lVar3) >> 0x20))); + uVar10 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); + uVar6 = GHIDRA_UINT(lVar3) >> 0x12 | uVar10 * 0x4000; + if (((uVar10 >> 0x12) - openPopup[5] == GHIDRA_UINT((uVar6 < GHIDRA_UINT(openPopup[4])))) + && (uVar6 - openPopup[4] < GHIDRA_UINT(openPopup[0x15]))) { openPopup[6] = popupResult; } else { @@ -5220,7 +5220,7 @@ LAB_0095bae2: } } LAB_0095bbd5: - ehState._0_1_ = 0xc; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xc; if ((((int *)local_3c.y != (int *)0x0) && (cVar5 = (**(code **)(*(int *)local_3c.y + 0xc))(), cVar5 != '\0')) && (g_inputDeviceRelease != (void *)0x0)) { @@ -5237,14 +5237,14 @@ LAB_0095bc03: if (menuManager->_netplayManager == *(NetplayManager *)(menuManager + 1)) { pvVar9 = (g_game->_playerManager)._playerList._end; playerIt = (g_game->_playerManager)._playerList._begin; - if ((int)pvVar9 - (int)playerIt >> 2 == 0) { + if (GHIDRA_INT(pvVar9) - GHIDRA_INT(playerIt) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *) "((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar9 = (game->_playerManager)._playerList._end; playerIt = (game->_playerManager)._playerList._begin; } uVar6 = slot; - if (slot < (uint)((int)pvVar9 - (int)playerIt >> 2)) { + if (slot < GHIDRA_UINT((GHIDRA_INT(pvVar9) - GHIDRA_INT(playerIt) >> 2))) { playerIt = playerIt + slot; } ((Entity_Player *)((Entity_Player *)*playerIt))->Entity_Player::SetControllerIndex(iVar11,1); @@ -5287,12 +5287,12 @@ LAB_0095bc03: } while (slot < controllerCount); } if (controllerIds != (void *)0x0) { - uVar6 = -(int)controllerIds & 0xfffffffc; + uVar6 = -GHIDRA_INT(controllerIds) & 0xfffffffc; pvVar9 = controllerIds; if (0xfff < uVar6) { pvVar9 = *(void **)((char *)controllerIds + -4); uVar6 = uVar6 + 0x23; - if (0x1f < (uint)((int)controllerIds + (-4 - (int)pvVar9))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(controllerIds) + (-4 - GHIDRA_INT(pvVar9))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -5359,7 +5359,7 @@ void Manager::update_state_loading() local_14 = -NAN; puStack_18 = &LAB_00b0c6e8; local_1c = ExceptionList; - uVar5 = __security_cookie ^ (uint)(local_44 + 0xd); + uVar5 = __security_cookie ^ GHIDRA_UINT((local_44 + 0xd)); iVar6 = *in_ECX; loader = in_ECX; if ((iVar6 != 1) && (iVar6 != 2)) { @@ -5386,7 +5386,7 @@ void Manager::update_state_loading() if (in_ECX[0x20e] == -1) { puStack_20 = (undefined1 *)(local_44 + 0x10); uVar13 = GetTimeNs(); - uVar5 = (uint)(uVar13 >> 0x20); + uVar5 = GHIDRA_UINT((uVar13 >> 0x20)); lVar1 = (uVar13 & 0xffffffff) * 0x431bde82; local_4c = (int *)((ulonglong)lVar1 >> 0x20); lVar2 = (ulonglong)uVar5 * 0xd7b634db; @@ -5395,14 +5395,14 @@ void Manager::update_state_loading() local_44[0] = (float)((ulonglong)lVar3 >> 0x20); local_2c = (float)lVar3; uVar13 = lVar2 + ((uVar13 & 0xffffffff) * 0xd7b634db >> 0x20); - uVar10 = (uint)(uVar13 >> 0x20); + uVar10 = GHIDRA_UINT((uVar13 >> 0x20)); lVar1 = lVar1 + (uVar13 & 0xffffffff); local_38.x = (float)lVar1; - uVar5 = (uint)((ulonglong)lVar1 >> 0x20); + uVar5 = GHIDRA_UINT(((ulonglong)lVar1 >> 0x20)); lVar1 = lVar3 + (ulonglong)CONCAT14(CARRY4(uVar10,uVar5),uVar10 + uVar5); - uVar5 = (uint)((ulonglong)lVar1 >> 0x20); - uVar10 = (uint)lVar1 >> 0x12 | uVar5 * 0x4000; - if (((uVar5 >> 0x12) - loader[0x20d] == (uint)(uVar10 < (uint)loader[0x20c])) && + uVar5 = GHIDRA_UINT(((ulonglong)lVar1 >> 0x20)); + uVar10 = GHIDRA_UINT(lVar1) >> 0x12 | uVar5 * 0x4000; + if (((uVar5 >> 0x12) - loader[0x20d] == GHIDRA_UINT((uVar10 < GHIDRA_UINT(loader[0x20c])))) && (uVar10 - loader[0x20c] < 0x1f5)) { local_38.y = 0.0; } @@ -5468,10 +5468,10 @@ LAB_0095e179: local_2c = (float)(iVar6 * 0x4c); ExceptionList = &local_1c; pfVar7 = local_44 + 0x10; - if ((uint)in_ECX[iVar6 * 0x13 + 0x11] < - (uint)(in_ECX[iVar6 * 0x13 + 9] - in_ECX[iVar6 * 0x13 + 8] >> 2)) { + if (GHIDRA_UINT(in_ECX[iVar6 * 0x13 + 0x11]) < + GHIDRA_UINT((in_ECX[iVar6 * 0x13 + 9] - in_ECX[iVar6 * 0x13 + 8] >> 2))) { nowNs = GetTimeNs(); - uVar10 = (uint)(nowNs >> 0x20); + uVar10 = GHIDRA_UINT((nowNs >> 0x20)); uVar13 = (nowNs & 0xffffffff) * 0xd7b634db; local_38.x = (float)uVar13; lVar2 = (nowNs & 0xffffffff) * 0x431bde82; @@ -5480,19 +5480,19 @@ LAB_0095e179: local_44[0] = (float)((ulonglong)lVar3 >> 0x20); lVar1 = (ulonglong)uVar10 * 0x431bde82; uVar13 = lVar3 + (uVar13 >> 0x20); - uVar11 = (uint)(uVar13 >> 0x20); + uVar11 = GHIDRA_UINT((uVar13 >> 0x20)); lVar2 = lVar2 + (uVar13 & 0xffffffff); local_48 = (undefined4)lVar2; - uVar10 = (uint)((ulonglong)lVar2 >> 0x20); + uVar10 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); lVar2 = lVar1 + (ulonglong)CONCAT14(CARRY4(uVar11,uVar10),uVar11 + uVar10); - uVar10 = (uint)((ulonglong)lVar2 >> 0x20); - uVar11 = (uint)lVar2 >> 0x12 | uVar10 * 0x4000; - iVar6 = *(int *)(*(int *)((char *)local_2c + 0x20 + (int)loader) + + uVar10 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); + uVar11 = GHIDRA_UINT(lVar2) >> 0x12 | uVar10 * 0x4000; + iVar6 = *(int *)(*(int *)((char *)local_2c + 0x20 + GHIDRA_INT(loader)) + loader[loader[0x202] * 0x13 + 0x11] * 4); entryStartTime = (uint *)(iVar6 + 0x38); pfVar7 = (float *)puStack_20; - if (((uVar10 >> 0x12) - *(int *)(iVar6 + 0x3c) != (uint)(uVar11 < *entryStartTime)) || - (piVar9 = loader, (uint)loader[0x20a] <= uVar11 - *entryStartTime)) goto LAB_0095e290; + if (((uVar10 >> 0x12) - *(int *)(iVar6 + 0x3c) != GHIDRA_UINT((uVar11 < *entryStartTime))) || + (piVar9 = loader, GHIDRA_UINT(loader[0x20a]) <= uVar11 - *entryStartTime)) goto LAB_0095e290; } else { LAB_0095e290: @@ -5540,7 +5540,7 @@ LAB_0095e290: } manager = g_manager; if ((g_manager->_netplayManager != *(NetplayManager *)(g_manager + 1)) && - (1 < (uint)((int)*(NetplayManager *)(g_manager + 1) - (int)g_manager->_netplayManager >> 2))) + (1 < GHIDRA_UINT((GHIDRA_INT(*(NetplayManager *)(g_manager + 1)) - GHIDRA_INT(g_manager->_netplayManager) >> 2)))) { iVar6 = online_vote_get_local_choice(); (manager->_popupButtons)._buttons[1]._isVisible = iVar6 == 2; @@ -5556,8 +5556,8 @@ LAB_0095e290: lVar1 = CONCAT44(local_38.y,local_28); if ((isMenuConfirm != 0) || (isMenuBack != 0)) { if ((manager->_netplayManager == *(NetplayManager *)(manager + 1)) || - ((uint)((int)*(NetplayManager *)(manager + 1) - (int)manager->_netplayManager >> 2) < 2)) { - *(undefined1 *)((char *)local_2c + 0x4c + (int)piVar9) = 1; + (GHIDRA_UINT((GHIDRA_INT(*(NetplayManager *)(manager + 1)) - GHIDRA_INT(manager->_netplayManager) >> 2)) < 2)) { + *(undefined1 *)((char *)local_2c + 0x4c + GHIDRA_INT(piVar9)) = 1; } else { online_vote_send(0); @@ -5568,47 +5568,47 @@ LAB_0095e290: cutsceneEntryOffset = local_2c; local_38.y = (float)((ulonglong)lVar1 >> 0x20); local_28 = (float)lVar1; - if ((*(char *)((char *)local_2c + 0x4c + (int)piVar9) != '\0') || - (((*(char *)((char *)piVar9 + (int)local_2c + 0x2c) != '\0' && - (*(int *)((char *)piVar9 + (int)local_2c + 0x24) - *(int *)((char *)piVar9 + (int)local_2c + 0x20) - >> 2 <= *(int *)((char *)piVar9 + (int)local_2c + 0x44))) || - (*(char *)((char *)piVar9 + (int)local_2c + 0x2d) != '\0')))) { - *(float *)((char *)piVar9 + (int)local_2c + 0x48) = - *(float *)((char *)piVar9 + (int)local_2c + 0x48) + 0.05; + if ((*(char *)((char *)local_2c + 0x4c + GHIDRA_INT(piVar9)) != '\0') || + (((*(char *)((char *)piVar9 + GHIDRA_INT(local_2c) + 0x2c) != '\0' && + (*(int *)((char *)piVar9 + GHIDRA_INT(local_2c) + 0x24) - *(int *)((char *)piVar9 + GHIDRA_INT(local_2c) + 0x20) + >> 2 <= *(int *)((char *)piVar9 + GHIDRA_INT(local_2c) + 0x44))) || + (*(char *)((char *)piVar9 + GHIDRA_INT(local_2c) + 0x2d) != '\0')))) { + *(float *)((char *)piVar9 + GHIDRA_INT(local_2c) + 0x48) = + *(float *)((char *)piVar9 + GHIDRA_INT(local_2c) + 0x48) + 0.05; } - iVar6 = *(int *)((char *)piVar9 + (int)local_2c + 0x44); + iVar6 = *(int *)((char *)piVar9 + GHIDRA_INT(local_2c) + 0x44); piVar12 = piVar9; if (iVar6 < 0) { - firstCutsceneEntry = *(undefined4 **)((char *)piVar9 + (int)local_2c + 0x20); - if (firstCutsceneEntry == *(undefined4 **)((char *)piVar9 + (int)local_2c + 0x24)) + firstCutsceneEntry = *(undefined4 **)((char *)piVar9 + GHIDRA_INT(local_2c) + 0x20); + if (firstCutsceneEntry == *(undefined4 **)((char *)piVar9 + GHIDRA_INT(local_2c) + 0x24)) goto LAB_0095e570; - *(undefined4 *)((char *)piVar9 + (int)local_2c + 0x44) = 0; + *(undefined4 *)((char *)piVar9 + GHIDRA_INT(local_2c) + 0x44) = 0; (**(code **)(*(int *)*firstCutsceneEntry + 0xc))(); - iVar6 = *(int *)(*(int *)((char *)piVar9 + (int)cutsceneEntryOffset + 0x20) + - *(int *)((char *)piVar9 + (int)cutsceneEntryOffset + 0x44) * 4); - local_38.y = (float)CONCAT31((int3)((uint)iVar6 >> 8),*(undefined1 *)(iVar6 + 8)); + iVar6 = *(int *)(*(int *)((char *)piVar9 + GHIDRA_INT(cutsceneEntryOffset) + 0x20) + + *(int *)((char *)piVar9 + GHIDRA_INT(cutsceneEntryOffset) + 0x44) * 4); + local_38.y = (float)CONCAT31((int3)(GHIDRA_UINT(iVar6) >> 8),*(undefined1 *)(iVar6 + 8)); iVar6 = ((Window *)(&DAT_00c798e0))->Window::get_framebuffer_height(); iVar8 = ((GraphicsWindow *)(&DAT_00c798e0))->GraphicsWindow::get_framebuffer_width(); } else { - iVar8 = *(int *)((char *)piVar9 + (int)local_2c + 0x20); - if (*(int *)((char *)piVar9 + (int)local_2c + 0x24) - iVar8 >> 2 <= iVar6) goto LAB_0095e570; + iVar8 = *(int *)((char *)piVar9 + GHIDRA_INT(local_2c) + 0x20); + if (*(int *)((char *)piVar9 + GHIDRA_INT(local_2c) + 0x24) - iVar8 >> 2 <= iVar6) goto LAB_0095e570; (**(code **)(**(int **)(iVar8 + iVar6 * 4) + 0x10))(); - cVar4 = (**(code **)(**(int **)(*(int *)((char *)piVar9 + (int)cutsceneEntryOffset + 0x20) + - *(int *)((char *)piVar9 + (int)cutsceneEntryOffset + 0x44) * 4) + + cVar4 = (**(code **)(**(int **)(*(int *)((char *)piVar9 + GHIDRA_INT(cutsceneEntryOffset) + 0x20) + + *(int *)((char *)piVar9 + GHIDRA_INT(cutsceneEntryOffset) + 0x44) * 4) + 0x18))(); lVar1 = CONCAT44(local_38.y,local_28); if (cVar4 == '\0') goto LAB_0095e570; - iVar8 = *(int *)((char *)piVar9 + (int)cutsceneEntryOffset + 0x44) + 1; - *(int *)((char *)piVar9 + (int)cutsceneEntryOffset + 0x44) = iVar8; - iVar6 = *(int *)((char *)piVar9 + (int)cutsceneEntryOffset + 0x20); + iVar8 = *(int *)((char *)piVar9 + GHIDRA_INT(cutsceneEntryOffset) + 0x44) + 1; + *(int *)((char *)piVar9 + GHIDRA_INT(cutsceneEntryOffset) + 0x44) = iVar8; + iVar6 = *(int *)((char *)piVar9 + GHIDRA_INT(cutsceneEntryOffset) + 0x20); lVar1 = CONCAT44(local_38.y,local_28); - if (*(int *)((char *)piVar9 + (int)cutsceneEntryOffset + 0x24) - iVar6 >> 2 <= iVar8) + if (*(int *)((char *)piVar9 + GHIDRA_INT(cutsceneEntryOffset) + 0x24) - iVar6 >> 2 <= iVar8) goto LAB_0095e570; (**(code **)(**(int **)(iVar6 + iVar8 * 4) + 0xc))(); - iVar6 = *(int *)(*(int *)((char *)piVar9 + (int)cutsceneEntryOffset + 0x20) + - *(int *)((char *)piVar9 + (int)cutsceneEntryOffset + 0x44) * 4); - local_38.y = (float)CONCAT31((int3)((uint)iVar6 >> 8),*(undefined1 *)(iVar6 + 8)); + iVar6 = *(int *)(*(int *)((char *)piVar9 + GHIDRA_INT(cutsceneEntryOffset) + 0x20) + + *(int *)((char *)piVar9 + GHIDRA_INT(cutsceneEntryOffset) + 0x44) * 4); + local_38.y = (float)CONCAT31((int3)(GHIDRA_UINT(iVar6) >> 8),*(undefined1 *)(iVar6 + 8)); iVar6 = ((Window *)(&DAT_00c798e0))->Window::get_framebuffer_height(); iVar8 = ((GraphicsWindow *)(&DAT_00c798e0))->GraphicsWindow::get_framebuffer_width(); } @@ -5618,18 +5618,18 @@ LAB_0095e290: LAB_0095e570: local_38.y = (float)((ulonglong)lVar1 >> 0x20); local_28 = (float)lVar1; - iVar6 = *(int *)((char *)piVar9 + (int)cutsceneEntryOffset + 0x20); - iVar8 = *(int *)((char *)piVar9 + (int)cutsceneEntryOffset + 0x24); + iVar6 = *(int *)((char *)piVar9 + GHIDRA_INT(cutsceneEntryOffset) + 0x20); + iVar8 = *(int *)((char *)piVar9 + GHIDRA_INT(cutsceneEntryOffset) + 0x24); if ((((iVar6 == iVar8) || - ((iVar8 - iVar6 >> 2 <= *(int *)((char *)piVar9 + (int)cutsceneEntryOffset + 0x44) && - ((*(char *)((char *)piVar9 + (int)cutsceneEntryOffset + 0x2c) == '\0' || - (1.0 <= *(float *)((char *)piVar9 + (int)cutsceneEntryOffset + 0x48))))))) || - ((*(char *)((char *)piVar9 + (int)cutsceneEntryOffset + 0x4c) != '\0' && - (1.0 <= *(float *)((char *)piVar9 + (int)cutsceneEntryOffset + 0x48))))) || - ((*(char *)((char *)piVar9 + (int)cutsceneEntryOffset + 0x2d) != '\0' && - (1.0 <= *(float *)((char *)piVar9 + (int)cutsceneEntryOffset + 0x48))))) { - ((CutsceneEntry *)((CutsceneEntry *)((int)piVar9 + (int)cutsceneEntryOffset + 4)))->CutsceneEntry::Unload(); - if (*(char *)((char *)piVar9 + (int)cutsceneEntryOffset + 0x4d) != '\0') { + ((iVar8 - iVar6 >> 2 <= *(int *)((char *)piVar9 + GHIDRA_INT(cutsceneEntryOffset) + 0x44) && + ((*(char *)((char *)piVar9 + GHIDRA_INT(cutsceneEntryOffset) + 0x2c) == '\0' || + (1.0 <= *(float *)((char *)piVar9 + GHIDRA_INT(cutsceneEntryOffset) + 0x48))))))) || + ((*(char *)((char *)piVar9 + GHIDRA_INT(cutsceneEntryOffset) + 0x4c) != '\0' && + (1.0 <= *(float *)((char *)piVar9 + GHIDRA_INT(cutsceneEntryOffset) + 0x48))))) || + ((*(char *)((char *)piVar9 + GHIDRA_INT(cutsceneEntryOffset) + 0x2d) != '\0' && + (1.0 <= *(float *)((char *)piVar9 + GHIDRA_INT(cutsceneEntryOffset) + 0x48))))) { + ((CutsceneEntry *)((CutsceneEntry *)(GHIDRA_INT(piVar9) + GHIDRA_INT(cutsceneEntryOffset) + 4)))->CutsceneEntry::Unload(); + if (*(char *)((char *)piVar9 + GHIDRA_INT(cutsceneEntryOffset) + 0x4d) != '\0') { TheoraVideoManager::destroyVideoClip((void *)piVar12[0x204]); piVar12[0x204] = 0; piVar12[0x203] = 0; @@ -5643,24 +5643,24 @@ LAB_0095e570: set_viewport_size(*piVar9,iVar6); lVar1 = CONCAT44(local_28,local_4c); if ((g_manager->_netplayManager == *(NetplayManager *)(g_manager + 1)) || - ((uint)((int)*(NetplayManager *)(g_manager + 1) - (int)g_manager->_netplayManager >> 2) < 2)) + (GHIDRA_UINT((GHIDRA_INT(*(NetplayManager *)(g_manager + 1)) - GHIDRA_INT(g_manager->_netplayManager) >> 2)) < 2)) { iVar6 = 0; } else { uVar13 = GetTimeNs(); - uVar5 = (uint)(uVar13 >> 0x20); + uVar5 = GHIDRA_UINT((uVar13 >> 0x20)); lVar2 = (uVar13 & 0xffffffff) * 0x431bde82; local_44[0] = (float)((ulonglong)lVar2 >> 0x20); lVar1 = (ulonglong)uVar5 * 0x431bde82; uVar13 = (ulonglong)uVar5 * 0xd7b634db + ((uVar13 & 0xffffffff) * 0xd7b634db >> 0x20); - uVar10 = (uint)(uVar13 >> 0x20); + uVar10 = GHIDRA_UINT((uVar13 >> 0x20)); lVar2 = lVar2 + (uVar13 & 0xffffffff); local_38.x = (float)lVar2; - uVar5 = (uint)((ulonglong)lVar2 >> 0x20); + uVar5 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); lVar2 = lVar1 + (ulonglong)CONCAT14(CARRY4(uVar10,uVar5),uVar10 + uVar5); - uVar5 = (uint)((ulonglong)lVar2 >> 0x20); - loader[0x20c] = (uint)lVar2 >> 0x12 | uVar5 * 0x4000; + uVar5 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); + loader[0x20c] = GHIDRA_UINT(lVar2) >> 0x12 | uVar5 * 0x4000; iVar6 = 3; loader[0x20d] = uVar5 >> 0x12; } @@ -5720,15 +5720,15 @@ void Manager::ResizeWindowCallback(void *window, int windowWidth, int windowHeig cutsceneEntries = (g_manager->_nightmareScene)._stageBarIcons[cutsceneEntries * 0x13 + -0x2e9]; if (iVar2 < (g_manager->_nightmareScene)._stageBarIcons[cutsceneEntries * 0x13 + -0x2e8] - cutsceneEntries >> 2) { - update_screen_scale((int)window,windowWidth, + update_screen_scale(GHIDRA_INT(window),windowWidth, *(byte *)(*(int *)(cutsceneEntries + iVar2 * 4) + 8)); return; } } - update_screen_scale((int)window,windowWidth,0); + update_screen_scale(GHIDRA_INT(window),windowWidth,0); return; } - set_viewport_size((int)window,windowWidth); + set_viewport_size(GHIDRA_INT(window),windowWidth); } } return; diff --git a/src/game/menu_bestiary.cpp b/src/game/menu_bestiary.cpp index 0e9feb5..f606d3b 100644 --- a/src/game/menu_bestiary.cpp +++ b/src/game/menu_bestiary.cpp @@ -18,11 +18,11 @@ void Menu_Bestiary::load_graphics() undefined4 local_14; Menu_Bestiary animData; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00af1f85; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; menuAnmPath._size = 0; menuAnmPath._capacity = 0xf; @@ -30,20 +30,20 @@ void Menu_Bestiary::load_graphics() menuAnmPath._buf[1] = '\0'; menuAnmPath._buf[2] = '\0'; menuAnmPath._buf[3] = '\0'; - menuAnmPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(menuAnmPath._buf) + 0x0)) = std::_Allocate(0x30); menuAnmPath._size = 0x22; menuAnmPath._capacity = 0x2f; - builtin_strncpy((char *)menuAnmPath._buf._0_4_,"gfx/ui/main menu/BestiaryMenu.anm2",0x23); + builtin_strncpy((*(undefined4 *)((char *)&((char *)menuAnmPath._buf) + 0x0)),"gfx/ui/main menu/BestiaryMenu.anm2",0x23); local_14 = 0; ((ANM2 *)((ANM2 *)(this + 2)))->ANM2::Load(&menuAnmPath,1); local_14 = 0xffffffff; if (0xf < menuAnmPath._capacity) { uVar5 = menuAnmPath._capacity + 1; - pcVar4 = (char *)menuAnmPath._buf._0_4_; + pcVar4 = (*(undefined4 *)((char *)&((char *)menuAnmPath._buf) + 0x0)); if (0xfff < uVar5) { - pcVar4 = *(char **)(menuAnmPath._buf._0_4_ + -4); + pcVar4 = *(char **)((*(undefined4 *)((char *)&(menuAnmPath._buf) + 0x0)) + -4); uVar5 = menuAnmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(menuAnmPath._buf._0_4_ + (-4 - (int)pcVar4))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(menuAnmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar4)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -62,14 +62,14 @@ void Menu_Bestiary::load_graphics() bVar6 = bVar1 < *pbVar3; if (bVar1 != *pbVar3) { LAB_008c6365: - uVar5 = -(uint)bVar6 | 1; + uVar5 = -GHIDRA_UINT(bVar6) | 1; goto LAB_008c636a; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)MVar2 + 1); bVar6 = bVar1 < pbVar3[1]; if (bVar1 != pbVar3[1]) goto LAB_008c6365; - MVar2 = (Menu_Bestiary)((int)MVar2 + 2); + MVar2 = (Menu_Bestiary)(GHIDRA_INT(MVar2) + 2); pbVar3 = pbVar3 + 2; } while (bVar1 != 0); uVar5 = 0; @@ -89,20 +89,20 @@ LAB_008c6396: deathScreenAnmPath._buf[1] = '\0'; deathScreenAnmPath._buf[2] = '\0'; deathScreenAnmPath._buf[3] = '\0'; - deathScreenAnmPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(deathScreenAnmPath._buf) + 0x0)) = std::_Allocate(0x20); deathScreenAnmPath._size = 0x18; deathScreenAnmPath._capacity = 0x1f; - builtin_strncpy((char *)deathScreenAnmPath._buf._0_4_,"gfx/ui/Death Screen.anm2",0x19); + builtin_strncpy((*(undefined4 *)((char *)&((char *)deathScreenAnmPath._buf) + 0x0)),"gfx/ui/Death Screen.anm2",0x19); local_14 = 1; ((ANM2 *)((ANM2 *)(this + 0x47)))->ANM2::Load(&deathScreenAnmPath,1); local_14 = 0xffffffff; if (0xf < deathScreenAnmPath._capacity) { uVar5 = deathScreenAnmPath._capacity + 1; - pcVar4 = (char *)deathScreenAnmPath._buf._0_4_; + pcVar4 = (*(undefined4 *)((char *)&((char *)deathScreenAnmPath._buf) + 0x0)); if (0xfff < uVar5) { - pcVar4 = *(char **)(deathScreenAnmPath._buf._0_4_ + -4); + pcVar4 = *(char **)((*(undefined4 *)((char *)&(deathScreenAnmPath._buf) + 0x0)) + -4); uVar5 = deathScreenAnmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(deathScreenAnmPath._buf._0_4_ + (-4 - (int)pcVar4))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(deathScreenAnmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar4)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -112,7 +112,7 @@ LAB_008c6396: animData = this[0x54]; deathScreenAnmPath._size = 0; deathScreenAnmPath._capacity = 0xf; - deathScreenAnmPath._buf._0_4_ = deathScreenAnmPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(deathScreenAnmPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(deathScreenAnmPath._buf) + 0x0)) & 0xffffff00; if (animData != (Menu_Bestiary)0x0) { MVar2 = animData; if (0xf < *(uint *)((char *)animData + 0x14)) { @@ -124,14 +124,14 @@ LAB_008c6396: bVar6 = bVar1 < (byte)*pcVar4; if (bVar1 != *pcVar4) { LAB_008c6487: - uVar5 = -(uint)bVar6 | 1; + uVar5 = -GHIDRA_UINT(bVar6) | 1; goto LAB_008c648c; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)MVar2 + 1); bVar6 = bVar1 < (byte)pcVar4[1]; if (bVar1 != pcVar4[1]) goto LAB_008c6487; - MVar2 = (Menu_Bestiary)((int)MVar2 + 2); + MVar2 = (Menu_Bestiary)(GHIDRA_INT(MVar2) + 2); pcVar4 = pcVar4 + 2; } while (bVar1 != 0); uVar5 = 0; @@ -177,7 +177,7 @@ void Menu_Bestiary::Update() local_8 = (void *)0xffffffff; puStack_c = &LAB_00aff10d; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(currentAnim + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((currentAnim + 10)); ExceptionList = &local_10; MVar1 = this[0xd2]; MVar2 = this[0xd1]; @@ -207,9 +207,9 @@ void Menu_Bestiary::Update() uVar3 = local_18 + 1; ptr = currentAnim[0]; if (0xfff < uVar3) { - ptr = *(void **)((int)currentAnim[0] + -4); + ptr = *(void **)(GHIDRA_INT(currentAnim[0]) + -4); uVar3 = local_18 + 0x24; - if (0x1f < (uint)((int)currentAnim[0] + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(currentAnim[0]) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -224,12 +224,12 @@ void Menu_Bestiary::Update() MVar4 = this[0xd1]; } MVar1 = this[0xd3]; - uVar3 = ((int)this[0xd8] - (int)this[0xd7] >> 2) - 1; + uVar3 = (GHIDRA_INT(this[0xd8]) - GHIDRA_INT(this[0xd7]) >> 2) - 1; arrowLayer = ((ANM2 *)((ANM2 *)(this + 2)))->ANM2::GetLayer(&DAT_00000007); - arrowLayer->_visible = 0 < (int)MVar4; + arrowLayer->_visible = 0 < GHIDRA_INT(MVar4); MVar2 = this[0xd1]; arrowLayer = ((ANM2 *)((ANM2 *)(this + 2)))->ANM2::GetLayer(&DAT_00000008); - arrowLayer->_visible = (int)MVar2 < (int)((int)MVar1 + 1 + ((-(uint)(uVar3 != 0) & uVar3) >> 2)); + arrowLayer->_visible = GHIDRA_INT(MVar2) < GHIDRA_INT((GHIDRA_INT(MVar1) + 1 + ((-GHIDRA_UINT((uVar3 != 0)) & uVar3) >> 2))); ExceptionList = local_10; return; } @@ -316,7 +316,7 @@ void Menu_Bestiary::Render() local_14 = 0xffffffff; puStack_18 = &LAB_00b0577e; local_1c = ExceptionList; - stackCookie = __security_cookie ^ (uint)(textBuffer + 0x118); + stackCookie = __security_cookie ^ GHIDRA_UINT((textBuffer + 0x118)); ExceptionList = &local_1c; local_19c.x = (g_menuManager->_ViewPosition).x + (float)*frontAnimState; local_19c.y = (g_menuManager->_ViewPosition).y + (float)frontAnimState[1]; @@ -343,36 +343,36 @@ void Menu_Bestiary::Render() MVar10 = (Menu_Bestiary)0x3f000000; fVar11 = (g_menuManager->_ViewPosition).x + (float)*frontAnimState; fVar12 = (g_menuManager->_ViewPosition).y + (float)frontAnimState[1]; - if ((int)frontAnimState[0xd3] < (int)MVar7) { + if (GHIDRA_INT(frontAnimState[0xd3]) < GHIDRA_INT(MVar7)) { fVar11 = fVar11 + 60.0; fVar12 = fVar12 + 142.0; - local_168 = (PersistentGameData *)(((int)MVar7 - (int)frontAnimState[0xd3]) * 4); - local_16c = (Menu_Bestiary)((int)local_168 - 4); + local_168 = (PersistentGameData *)((GHIDRA_INT(MVar7) - GHIDRA_INT(frontAnimState[0xd3])) * 4); + local_16c = (Menu_Bestiary)(GHIDRA_INT(local_168) - 4); local_148 = fVar12; local_144 = fVar11; - if ((int)local_16c < (int)local_168) { + if (GHIDRA_INT(local_16c) < GHIDRA_INT(local_168)) { fVar8 = 80.0; local_160 = (Menu_Bestiary)0x0; do { - if ((int)frontAnimState[0xd8] - (int)frontAnimState[0xd7] >> 2 <= (int)local_16c) break; - local_154 = (std_map *)((int)frontAnimState[0xd7] + (int)local_16c * 4); + if (GHIDRA_INT(frontAnimState[0xd8]) - GHIDRA_INT(frontAnimState[0xd7]) >> 2 <= GHIDRA_INT(local_16c)) break; + local_154 = (std_map *)(GHIDRA_INT(frontAnimState[0xd7]) + GHIDRA_INT(local_16c) * 4); _Find_lower_bound<>(local_1b0,local_154); pvVar5 = local_1a8; if (((*(char *)((char *)local_1a8 + 0xd) == '\0') && (*(void **)((char *)local_1a8 + 0x10) <= local_154->_head)) && (local_1a8 != (local_14c->_entities)._head)) { - uVar1 = (uint)local_16c & 0x80000001; - if ((int)uVar1 < 0) { + uVar1 = GHIDRA_UINT(local_16c) & 0x80000001; + if (GHIDRA_INT(uVar1) < 0) { uVar1 = (uVar1 - 1 | 0xfffffffe) + 1; } - pFVar6 = (Font *)((float)(int)uVar1 * fVar8); - uVar1 = (uint)local_16c & 0x80000003; - if ((int)uVar1 < 0) { + pFVar6 = (Font *)((float)GHIDRA_INT(uVar1) * fVar8); + uVar1 = GHIDRA_UINT(local_16c) & 0x80000003; + if (GHIDRA_INT(uVar1) < 0) { uVar1 = (uVar1 - 1 | 0xfffffffc) + 1; } local_1a0 = &g_manager->_persistentGameData; - local_150 = (PersistentGameData *)((int)local_1a8 + 0x18); - cellOffsetY = (float)((int)uVar1 / 2) * fVar8; + local_150 = (PersistentGameData *)(GHIDRA_INT(local_1a8) + 0x18); + cellOffsetY = (float)(GHIDRA_INT(uVar1) / 2) * fVar8; local_194 = pFVar6; local_154 = (std_map *)cellOffsetY; bestiaryConfig = @@ -410,22 +410,22 @@ void Menu_Bestiary::Render() MStack_1e4 = MVar10; if (iVar2 < 1) { if (frontAnimState[0x54] != (Menu_Bestiary)0x0) { - if (*(int *)((int)frontAnimState[0x53] + 0x80) < 6) { + if (*(int *)(GHIDRA_INT(frontAnimState[0x53]) + 0x80) < 6) { KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"); fVar9 = 0.0; fVar11 = local_144; fVar12 = local_148; - if (*(int *)((int)frontAnimState[0x53] + 0x80) < 6) goto LAB_008c6d94; + if (*(int *)(GHIDRA_INT(frontAnimState[0x53]) + 0x80) < 6) goto LAB_008c6d94; } MVar7 = frontAnimState[0x54]; local_150 = *(PersistentGameData **)((char *)MVar7 + 0x4c); - if (((MVar7 == (Menu_Bestiary)0x0) || ((int)local_150 < 0)) || - (*(int *)((char *)MVar7 + 0x1c) <= (int)local_150)) { + if (((MVar7 == (Menu_Bestiary)0x0) || (GHIDRA_INT(local_150) < 0)) || + (*(int *)((char *)MVar7 + 0x1c) <= GHIDRA_INT(local_150))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)frontAnimState[0x55] + (int)local_150 * 4) = 0; + *(undefined4 *)(GHIDRA_INT(frontAnimState[0x55]) + GHIDRA_INT(local_150) * 4) = 0; AnimationState::AdvanceLayerPosition - ((AnimationState *)(frontAnimState + 0x53),(int)local_150,152.0); + ((AnimationState *)(frontAnimState + 0x53),GHIDRA_INT(local_150),152.0); fVar9 = 0.0; fVar11 = local_144; fVar12 = local_148; @@ -437,12 +437,12 @@ LAB_008c6d94: if (*(char *)(frontAnimState + 99) == '\0') { MVar7 = frontAnimState[0x54]; if (MVar7 != (Menu_Bestiary)0x0) { - if (5 < *(int *)((int)frontAnimState[0x53] + 0x80)) { + if (5 < *(int *)(GHIDRA_INT(frontAnimState[0x53]) + 0x80)) { iVar2 = *(int *)((char *)MVar7 + 0x4c); if (-1 < iVar2) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar2 * 0x10 + *(int *)((char *)MVar7 + 0x18)), - &local_15c,*(int *)((int)frontAnimState[0x55] + iVar2 * 4),&g_vectorZero, + &local_15c,*(int *)(GHIDRA_INT(frontAnimState[0x55]) + iVar2 * 4),&g_vectorZero, &g_vectorZero,(ANM2 *)frontAnimState[0x53]); fVar9 = 0.0; fVar11 = local_144; @@ -462,12 +462,12 @@ LAB_008c6d94: else { MVar7 = frontAnimState[0x5c]; if (MVar7 != (Menu_Bestiary)0x0) { - if (5 < *(int *)((int)frontAnimState[0x5b] + 0x80)) { + if (5 < *(int *)(GHIDRA_INT(frontAnimState[0x5b]) + 0x80)) { iVar2 = *(int *)((char *)MVar7 + 0x4c); if (-1 < iVar2) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar2 * 0x10 + *(int *)((char *)MVar7 + 0x18)), - &local_15c,*(int *)((int)frontAnimState[0x5d] + iVar2 * 4),&g_vectorZero, + &local_15c,*(int *)(GHIDRA_INT(frontAnimState[0x5d]) + iVar2 * 4),&g_vectorZero, &g_vectorZero,(ANM2 *)frontAnimState[0x5b]); fVar9 = 0.0; fVar11 = local_144; @@ -498,22 +498,22 @@ LAB_008c6f2c: if ((*(int *)((char *)pvVar5 + 0x178) == 0) || (*(char *)((char *)pvVar5 + 0x17c) == '\0')) { local_1a0 = *(PersistentGameData **)((char *)pvVar5 + 0x7c); if (frontAnimState[0x54] != (Menu_Bestiary)0x0) { - if (*(int *)((int)frontAnimState[0x53] + 0x80) < 4) { + if (*(int *)(GHIDRA_INT(frontAnimState[0x53]) + 0x80) < 4) { KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"); fVar9 = 0.0; fVar11 = local_144; fVar12 = local_148; - if (*(int *)((int)frontAnimState[0x53] + 0x80) < 4) goto LAB_008c6b3e; + if (*(int *)(GHIDRA_INT(frontAnimState[0x53]) + 0x80) < 4) goto LAB_008c6b3e; } MVar7 = frontAnimState[0x54]; local_150 = *(PersistentGameData **)((char *)MVar7 + 0x44); - if (((MVar7 == (Menu_Bestiary)0x0) || ((int)local_150 < 0)) || - (*(int *)((char *)MVar7 + 0x1c) <= (int)local_150)) { + if (((MVar7 == (Menu_Bestiary)0x0) || (GHIDRA_INT(local_150) < 0)) || + (*(int *)((char *)MVar7 + 0x1c) <= GHIDRA_INT(local_150))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)frontAnimState[0x55] + (int)local_150 * 4) = 0; + *(undefined4 *)(GHIDRA_INT(frontAnimState[0x55]) + GHIDRA_INT(local_150) * 4) = 0; AnimationState::AdvanceLayerPosition - ((AnimationState *)(frontAnimState + 0x53),(int)local_150,(float)(int)local_1a0); + ((AnimationState *)(frontAnimState + 0x53),GHIDRA_INT(local_150),(float)GHIDRA_INT(local_1a0)); fVar9 = 0.0; fVar11 = local_144; fVar12 = local_148; @@ -525,12 +525,12 @@ LAB_008c6b3e: if (*(char *)(frontAnimState + 99) == '\0') { MVar7 = frontAnimState[0x54]; if (MVar7 != (Menu_Bestiary)0x0) { - if (3 < *(int *)((int)frontAnimState[0x53] + 0x80)) { + if (3 < *(int *)(GHIDRA_INT(frontAnimState[0x53]) + 0x80)) { iVar2 = *(int *)((char *)MVar7 + 0x44); if (-1 < iVar2) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar2 * 0x10 + *(int *)((char *)MVar7 + 0x18)), - &local_19c,*(int *)((int)frontAnimState[0x55] + iVar2 * 4),&g_vectorZero, + &local_19c,*(int *)(GHIDRA_INT(frontAnimState[0x55]) + iVar2 * 4),&g_vectorZero, &g_vectorZero,(ANM2 *)frontAnimState[0x53]); fVar9 = 0.0; fVar11 = local_144; @@ -543,7 +543,7 @@ LAB_008c6b3e: (MVar10 = frontAnimState[0x5b], 3 < *(int *)((char *)MVar10 + 0x80))) && (iVar2 = *(int *)((char *)MVar7 + 0x44), -1 < iVar2)) { layer = (AnimationLayer *)(iVar2 * 0x10 + *(int *)((char *)MVar7 + 0x18)); - iVar2 = *(int *)((int)frontAnimState[0x5d] + iVar2 * 4); + iVar2 = *(int *)(GHIDRA_INT(frontAnimState[0x5d]) + iVar2 * 4); layerPos = &local_19c; goto LAB_008c6f13; } @@ -551,12 +551,12 @@ LAB_008c6b3e: else { MVar7 = frontAnimState[0x5c]; if (MVar7 != (Menu_Bestiary)0x0) { - if (3 < *(int *)((int)frontAnimState[0x5b] + 0x80)) { + if (3 < *(int *)(GHIDRA_INT(frontAnimState[0x5b]) + 0x80)) { iVar2 = *(int *)((char *)MVar7 + 0x44); if (-1 < iVar2) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar2 * 0x10 + *(int *)((char *)MVar7 + 0x18)), - &local_19c,*(int *)((int)frontAnimState[0x5d] + iVar2 * 4),&g_vectorZero, + &local_19c,*(int *)(GHIDRA_INT(frontAnimState[0x5d]) + iVar2 * 4),&g_vectorZero, &g_vectorZero,(ANM2 *)frontAnimState[0x5b]); fVar9 = 0.0; fVar11 = local_144; @@ -569,7 +569,7 @@ LAB_008c6b3e: (MVar10 = frontAnimState[0x53], 3 < *(int *)((char *)MVar10 + 0x80))) && (iVar2 = *(int *)((char *)MVar7 + 0x44), -1 < iVar2)) { layer = (AnimationLayer *)(iVar2 * 0x10 + *(int *)((char *)MVar7 + 0x18)); - iVar2 = *(int *)((int)frontAnimState[0x55] + iVar2 * 4); + iVar2 = *(int *)(GHIDRA_INT(frontAnimState[0x55]) + iVar2 * 4); layerPos = &local_19c; goto LAB_008c6f13; } @@ -598,36 +598,36 @@ LAB_008c6f19: MVar10 = (Menu_Bestiary)0x3f000000; fVar8 = 80.0; } - local_160 = (Menu_Bestiary)((int)local_160 + 1); - local_16c = (Menu_Bestiary)((int)local_16c + 1); - } while ((int)local_16c < (int)local_168); + local_160 = (Menu_Bestiary)(GHIDRA_INT(local_160) + 1); + local_16c = (Menu_Bestiary)(GHIDRA_INT(local_16c) + 1); + } while (GHIDRA_INT(local_16c) < GHIDRA_INT(local_168)); } } else { fVar11 = fVar11 + 42.0; fVar12 = fVar12 + 120.0; - local_168 = (PersistentGameData *)((int)MVar7 * 0x10); - local_15c.y = (float)((int)local_168 + 0x10); + local_168 = (PersistentGameData *)(GHIDRA_INT(MVar7) * 0x10); + local_15c.y = (float)(GHIDRA_INT(local_168) + 0x10); local_148 = fVar11; local_144 = fVar12; - if ((int)local_168 < (int)local_15c.y) { + if (GHIDRA_INT(local_168) < GHIDRA_INT(local_15c.y)) { fVar8 = 40.0; local_16c = (Menu_Bestiary)0x0; do { - if ((int)frontAnimState[0xd5] - (int)frontAnimState[0xd4] >> 2 <= (int)local_168) break; - local_150 = (PersistentGameData *)((int)frontAnimState[0xd4] + (int)local_168 * 4); - _Find_lower_bound<>((undefined1 *)((int)&local_140 + 0xc),local_150); + if (GHIDRA_INT(frontAnimState[0xd5]) - GHIDRA_INT(frontAnimState[0xd4]) >> 2 <= GHIDRA_INT(local_168)) break; + local_150 = (PersistentGameData *)(GHIDRA_INT(frontAnimState[0xd4]) + GHIDRA_INT(local_168) * 4); + _Find_lower_bound<>((undefined1 *)(GHIDRA_INT(&local_140) + 0xc),local_150); uVar1 = local_140._capacity; if (((*(char *)(local_140._capacity + 0xd) == '\0') && (*(uint *)(local_140._capacity + 0x10) <= *(uint *)local_150)) && ((void *)local_140._capacity != (local_14c->_entities)._head)) { - uVar3 = (uint)local_168 & 0x80000003; - if ((int)uVar3 < 0) { + uVar3 = GHIDRA_UINT(local_168) & 0x80000003; + if (GHIDRA_INT(uVar3) < 0) { uVar3 = (uVar3 - 1 | 0xfffffffc) + 1; } - MVar7 = (Menu_Bestiary)((float)(int)uVar3 * fVar8); - uVar3 = (uint)local_168 & 0x8000000f; - if ((int)uVar3 < 0) { + MVar7 = (Menu_Bestiary)((float)GHIDRA_INT(uVar3) * fVar8); + uVar3 = GHIDRA_UINT(local_168) & 0x8000000f; + if (GHIDRA_INT(uVar3) < 0) { uVar3 = (uVar3 - 1 | 0xfffffff0) + 1; } local_164 = (uint *)(local_140._capacity + 0x18); @@ -635,13 +635,13 @@ LAB_008c6f19: ((*(int *)(local_140._capacity + 0x18) << 0xc | *(uint *)(local_140._capacity + 0x1c)) << 8); local_154 = &(g_manager->_persistentGameData)._bestiaryEncounters; - fVar8 = (float)((int)(uVar3 + ((int)uVar3 >> 0x1f & 3U)) >> 2) * fVar8; + fVar8 = (float)(GHIDRA_INT((uVar3 + (GHIDRA_INT(uVar3) >> 0x1f & 3U))) >> 2) * fVar8; local_194 = (Font *)fVar8; local_160 = MVar7; local_150 = local_1a0; std::set::find_node(&local_1c4._blue,&local_150); if ((*(char *)(local_1c4._unk + 0xd) == '\0') && - (*(int *)(local_1c4._unk + 0x10) <= (int)local_1a0)) { + (*(int *)(local_1c4._unk + 0x10) <= GHIDRA_INT(local_1a0))) { pvVar5 = (void *)local_1c4._unk; } else { @@ -678,22 +678,22 @@ LAB_008c6f19: MStack_210 = MVar10; if (iVar2 < 1) { if (frontAnimState[0x54] != (Menu_Bestiary)0x0) { - if (*(int *)((int)frontAnimState[0x53] + 0x80) < 6) { + if (*(int *)(GHIDRA_INT(frontAnimState[0x53]) + 0x80) < 6) { KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"); fVar9 = 0.0; fVar11 = local_148; fVar12 = local_144; - if (*(int *)((int)frontAnimState[0x53] + 0x80) < 6) goto LAB_008c7578; + if (*(int *)(GHIDRA_INT(frontAnimState[0x53]) + 0x80) < 6) goto LAB_008c7578; } MVar7 = frontAnimState[0x54]; local_164 = *(uint **)((char *)MVar7 + 0x4c); - if (((MVar7 == (Menu_Bestiary)0x0) || ((int)local_164 < 0)) || - (*(int *)((char *)MVar7 + 0x1c) <= (int)local_164)) { + if (((MVar7 == (Menu_Bestiary)0x0) || (GHIDRA_INT(local_164) < 0)) || + (*(int *)((char *)MVar7 + 0x1c) <= GHIDRA_INT(local_164))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)frontAnimState[0x55] + (int)local_164 * 4) = 0; + *(undefined4 *)(GHIDRA_INT(frontAnimState[0x55]) + GHIDRA_INT(local_164) * 4) = 0; AnimationState::AdvanceLayerPosition - ((AnimationState *)(frontAnimState + 0x53),(int)local_164,152.0); + ((AnimationState *)(frontAnimState + 0x53),GHIDRA_INT(local_164),152.0); fVar9 = 0.0; fVar11 = local_148; fVar12 = local_144; @@ -705,12 +705,12 @@ LAB_008c7578: if (*(char *)(frontAnimState + 99) == '\0') { MVar7 = frontAnimState[0x54]; if (MVar7 != (Menu_Bestiary)0x0) { - if (5 < *(int *)((int)frontAnimState[0x53] + 0x80)) { + if (5 < *(int *)(GHIDRA_INT(frontAnimState[0x53]) + 0x80)) { iVar2 = *(int *)((char *)MVar7 + 0x4c); if (-1 < iVar2) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar2 * 0x10 + *(int *)((char *)MVar7 + 0x18)), - &renderPos,*(int *)((int)frontAnimState[0x55] + iVar2 * 4),&g_vectorZero, + &renderPos,*(int *)(GHIDRA_INT(frontAnimState[0x55]) + iVar2 * 4),&g_vectorZero, &g_vectorZero,(ANM2 *)frontAnimState[0x53]); fVar9 = 0.0; fVar11 = local_148; @@ -730,12 +730,12 @@ LAB_008c7578: else { MVar7 = frontAnimState[0x5c]; if (MVar7 != (Menu_Bestiary)0x0) { - if (5 < *(int *)((int)frontAnimState[0x5b] + 0x80)) { + if (5 < *(int *)(GHIDRA_INT(frontAnimState[0x5b]) + 0x80)) { iVar2 = *(int *)((char *)MVar7 + 0x4c); if (-1 < iVar2) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar2 * 0x10 + *(int *)((char *)MVar7 + 0x18)), - &renderPos,*(int *)((int)frontAnimState[0x5d] + iVar2 * 4),&g_vectorZero, + &renderPos,*(int *)(GHIDRA_INT(frontAnimState[0x5d]) + iVar2 * 4),&g_vectorZero, &g_vectorZero,(ANM2 *)frontAnimState[0x5b]); fVar9 = 0.0; fVar11 = local_148; @@ -766,22 +766,22 @@ LAB_008c7712: if ((*(int *)(uVar1 + 0x178) == 0) || (*(char *)(uVar1 + 0x17c) == '\0')) { local_150 = *(PersistentGameData **)(uVar1 + 0x7c); if (frontAnimState[0x54] != (Menu_Bestiary)0x0) { - if (*(int *)((int)frontAnimState[0x53] + 0x80) < 6) { + if (*(int *)(GHIDRA_INT(frontAnimState[0x53]) + 0x80) < 6) { KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"); fVar9 = 0.0; fVar11 = local_148; fVar12 = local_144; - if (*(int *)((int)frontAnimState[0x53] + 0x80) < 6) goto LAB_008c7320; + if (*(int *)(GHIDRA_INT(frontAnimState[0x53]) + 0x80) < 6) goto LAB_008c7320; } MVar7 = frontAnimState[0x54]; local_164 = *(uint **)((char *)MVar7 + 0x4c); - if (((MVar7 == (Menu_Bestiary)0x0) || ((int)local_164 < 0)) || - (*(int *)((char *)MVar7 + 0x1c) <= (int)local_164)) { + if (((MVar7 == (Menu_Bestiary)0x0) || (GHIDRA_INT(local_164) < 0)) || + (*(int *)((char *)MVar7 + 0x1c) <= GHIDRA_INT(local_164))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)frontAnimState[0x55] + (int)local_164 * 4) = 0; + *(undefined4 *)(GHIDRA_INT(frontAnimState[0x55]) + GHIDRA_INT(local_164) * 4) = 0; AnimationState::AdvanceLayerPosition - ((AnimationState *)(frontAnimState + 0x53),(int)local_164,(float)(int)local_150); + ((AnimationState *)(frontAnimState + 0x53),GHIDRA_INT(local_164),(float)GHIDRA_INT(local_150)); fVar9 = 0.0; fVar11 = local_148; fVar12 = local_144; @@ -793,12 +793,12 @@ LAB_008c7320: if (*(char *)(frontAnimState + 99) == '\0') { MVar7 = frontAnimState[0x54]; if (MVar7 != (Menu_Bestiary)0x0) { - if (5 < *(int *)((int)frontAnimState[0x53] + 0x80)) { + if (5 < *(int *)(GHIDRA_INT(frontAnimState[0x53]) + 0x80)) { iVar2 = *(int *)((char *)MVar7 + 0x4c); if (-1 < iVar2) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar2 * 0x10 + *(int *)((char *)MVar7 + 0x18)), - &local_19c,*(int *)((int)frontAnimState[0x55] + iVar2 * 4),&g_vectorZero, + &local_19c,*(int *)(GHIDRA_INT(frontAnimState[0x55]) + iVar2 * 4),&g_vectorZero, &g_vectorZero,(ANM2 *)frontAnimState[0x53]); fVar9 = 0.0; fVar11 = local_148; @@ -811,7 +811,7 @@ LAB_008c7320: (MVar10 = frontAnimState[0x5b], 5 < *(int *)((char *)MVar10 + 0x80))) && (iVar2 = *(int *)((char *)MVar7 + 0x4c), -1 < iVar2)) { layer = (AnimationLayer *)(iVar2 * 0x10 + *(int *)((char *)MVar7 + 0x18)); - iVar2 = *(int *)((int)frontAnimState[0x5d] + iVar2 * 4); + iVar2 = *(int *)(GHIDRA_INT(frontAnimState[0x5d]) + iVar2 * 4); layerPos = &local_19c; goto LAB_008c76f9; } @@ -819,12 +819,12 @@ LAB_008c7320: else { MVar7 = frontAnimState[0x5c]; if (MVar7 != (Menu_Bestiary)0x0) { - if (5 < *(int *)((int)frontAnimState[0x5b] + 0x80)) { + if (5 < *(int *)(GHIDRA_INT(frontAnimState[0x5b]) + 0x80)) { iVar2 = *(int *)((char *)MVar7 + 0x4c); if (-1 < iVar2) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar2 * 0x10 + *(int *)((char *)MVar7 + 0x18)), - &local_19c,*(int *)((int)frontAnimState[0x5d] + iVar2 * 4),&g_vectorZero, + &local_19c,*(int *)(GHIDRA_INT(frontAnimState[0x5d]) + iVar2 * 4),&g_vectorZero, &g_vectorZero,(ANM2 *)frontAnimState[0x5b]); fVar9 = 0.0; fVar11 = local_148; @@ -837,7 +837,7 @@ LAB_008c7320: (MVar10 = frontAnimState[0x53], 5 < *(int *)((char *)MVar10 + 0x80))) && (iVar2 = *(int *)((char *)MVar7 + 0x4c), -1 < iVar2)) { layer = (AnimationLayer *)(iVar2 * 0x10 + *(int *)((char *)MVar7 + 0x18)); - iVar2 = *(int *)((int)frontAnimState[0x55] + iVar2 * 4); + iVar2 = *(int *)(GHIDRA_INT(frontAnimState[0x55]) + iVar2 * 4); layerPos = &local_19c; goto LAB_008c76f9; } @@ -846,7 +846,7 @@ LAB_008c7320: goto LAB_008c7712; } local_1a8 = (void *)((fVar8 + fVar12 + fVar9) - 30.0); - local_1b0._4_4_ = (float)MVar7 + fVar11 + fVar9 + 21.0; + (*(undefined4 *)((char *)&(local_1b0) + 0x4)) = (float)MVar7 + fVar11 + fVar9 + 21.0; if (((local_164 != (uint *)0x0) && (uVar1 = local_164[0x58], uVar1 != 0)) && (sprite = (ANM2 *)(uVar1 + 0xdf0), *(char *)(uVar1 + 0xef9) != '\0')) { ((ANM2 *)(sprite))->ANM2::SetFrame((std_string *)(uVar1 + 0xe08),local_164[0x19]); @@ -864,16 +864,16 @@ LAB_008c76ff: MVar10 = (Menu_Bestiary)0x3f000000; fVar8 = 40.0; } - local_16c = (Menu_Bestiary)((int)local_16c + 1); - local_168 = (PersistentGameData *)((int)local_168 + 1); - } while ((int)local_168 < (int)local_15c.y); + local_16c = (Menu_Bestiary)(GHIDRA_INT(local_16c) + 1); + local_168 = (PersistentGameData *)(GHIDRA_INT(local_168) + 1); + } while (GHIDRA_INT(local_168) < GHIDRA_INT(local_15c.y)); } } MVar7 = frontAnimState[0xd1]; - if ((int)frontAnimState[0xd3] < (int)MVar7) { + if (GHIDRA_INT(frontAnimState[0xd3]) < GHIDRA_INT(MVar7)) { if (frontAnimState[0xd7] != frontAnimState[0xd8]) { - local_15c.y = (float)((int)frontAnimState[0xd7] + - ((int)frontAnimState[0xd2] + ((int)MVar7 - (int)frontAnimState[0xd3]) * 4 + -4) * 4); + local_15c.y = (float)(GHIDRA_INT(frontAnimState[0xd7]) + + (GHIDRA_INT(frontAnimState[0xd2]) + (GHIDRA_INT(MVar7) - GHIDRA_INT(frontAnimState[0xd3])) * 4 + -4) * 4); goto LAB_008c7794; } LAB_008c77ce: @@ -881,7 +881,7 @@ LAB_008c77ce: } else { if (frontAnimState[0xd4] == frontAnimState[0xd5]) goto LAB_008c77ce; - local_15c.y = (float)((int)frontAnimState[0xd4] + ((int)MVar7 * 0x10 + (int)frontAnimState[0xd2]) * 4); + local_15c.y = (float)(GHIDRA_INT(frontAnimState[0xd4]) + (GHIDRA_INT(MVar7) * 0x10 + GHIDRA_INT(frontAnimState[0xd2])) * 4); LAB_008c7794: _Find_lower_bound<>(&local_1c4._blue,local_15c.y); if ((*(char *)(local_1c4._unk + 0xd) != '\0') || @@ -902,7 +902,7 @@ LAB_008c7794: local_144 = fVar11; bestiaryConfig = EntityConfig::GetBestiaryConfig - ((EntityConfig *)local_1a0,(int)local_150,*(int *)((char *)pvVar5 + 0x1c)); + ((EntityConfig *)local_1a0,GHIDRA_INT(local_150),*(int *)((char *)pvVar5 + 0x1c)); if ((bestiaryConfig == (EntityConfig_Entity *)0x0) || (bestiaryConfig->bestiary == 0)) { LAB_008c78c8: local_148 = 0.0; @@ -913,7 +913,7 @@ LAB_008c78c8: local_15c.y = (float)local_164; std::set::find_node(&local_1c4._blue,&local_15c.y); if ((*(char *)(local_1c4._unk + 0xd) == '\0') && - (*(int *)(local_1c4._unk + 0x10) <= (int)local_164)) { + (*(int *)(local_1c4._unk + 0x10) <= GHIDRA_INT(local_164))) { encounterNode = (void *)local_1c4._unk; } else { @@ -923,11 +923,11 @@ LAB_008c78c8: local_148 = *(float *)((char *)encounterNode + 0x14); } local_19c.y = (float)PersistentGameData::GetBestiaryDeathCount - (local_168,(int)local_150,*(int *)((char *)pvVar5 + 0x1c)); + (local_168,GHIDRA_INT(local_150),*(int *)((char *)pvVar5 + 0x1c)); local_150 = *(PersistentGameData **)((char *)pvVar5 + 0x18); bestiaryConfig = EntityConfig::GetBestiaryConfig - ((EntityConfig *)local_1a0,(int)local_150,*(int *)((char *)pvVar5 + 0x1c)); + ((EntityConfig *)local_1a0,GHIDRA_INT(local_150),*(int *)((char *)pvVar5 + 0x1c)); if ((bestiaryConfig == (EntityConfig_Entity *)0x0) || (bestiaryConfig->bestiary == 0)) { LAB_008c7985: local_160 = (Menu_Bestiary)0x0; @@ -938,14 +938,14 @@ LAB_008c7985: local_15c.y = (float)local_164; std::set::find_node(&local_1c4._blue,&local_15c.y); if ((*(char *)(local_1c4._unk + 0xd) != '\0') || - ((int)local_164 < *(int *)(local_1c4._unk + 0x10))) { - local_1c4._unk = (int)local_154->_head; + (GHIDRA_INT(local_164) < *(int *)(local_1c4._unk + 0x10))) { + local_1c4._unk = GHIDRA_INT(local_154->_head); } if ((void *)local_1c4._unk == local_154->_head) goto LAB_008c7985; local_160 = *(Menu_Bestiary *)(local_1c4._unk + 0x14); } local_164 = (uint *)PersistentGameData::GetBestiaryKillCount - (local_168,(int)local_150,*(int *)((char *)pvVar5 + 0x1c)); + (local_168,GHIDRA_INT(local_150),*(int *)((char *)pvVar5 + 0x1c)); local_15c.y = (float)(frontAnimState + 0x71); whiteColor._offset[0] = 0.0; whiteColor._offset[1] = 0.0; @@ -968,48 +968,48 @@ LAB_008c7985: if ((*(int *)((char *)pvVar5 + 0x178) == 0) || (*(char *)((char *)pvVar5 + 0x17c) == '\0')) { local_16c = (Menu_Bestiary)(frontAnimState + 0x47); local_154 = *(std_map **)((char *)pvVar5 + 0x7c); - if ((int)frontAnimState[0xd3] < (int)frontAnimState[0xd1]) { + if (GHIDRA_INT(frontAnimState[0xd3]) < GHIDRA_INT(frontAnimState[0xd1])) { if ((frontAnimState[0x54] != (Menu_Bestiary)0x0) && - ((3 < *(int *)((int)frontAnimState[0x53] + 0x80) || + ((3 < *(int *)(GHIDRA_INT(frontAnimState[0x53]) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 3 < *(int *)((int)frontAnimState[0x53] + 0x80))))) { + 3 < *(int *)(GHIDRA_INT(frontAnimState[0x53]) + 0x80))))) { MVar7 = frontAnimState[0x54]; local_15c.y = *(float *)((char *)MVar7 + 0x44); if ((MVar7 == (Menu_Bestiary)0x0) || - (((int)local_15c.y < 0 || (*(int *)((char *)MVar7 + 0x1c) <= (int)local_15c.y)))) { + ((GHIDRA_INT(local_15c.y) < 0 || (*(int *)((char *)MVar7 + 0x1c) <= GHIDRA_INT(local_15c.y))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)frontAnimState[0x55] + (int)local_15c.y * 4) = 0; + *(undefined4 *)(GHIDRA_INT(frontAnimState[0x55]) + GHIDRA_INT(local_15c.y) * 4) = 0; AnimationState::AdvanceLayerPosition - ((AnimationState *)(frontAnimState + 0x53),(int)local_15c.y,(float)(int)local_154); + ((AnimationState *)(frontAnimState + 0x53),GHIDRA_INT(local_15c.y),(float)GHIDRA_INT(local_154)); } iVar2 = 3; } else { if ((frontAnimState[0x54] != (Menu_Bestiary)0x0) && - ((5 < *(int *)((int)frontAnimState[0x53] + 0x80) || + ((5 < *(int *)(GHIDRA_INT(frontAnimState[0x53]) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 5 < *(int *)((int)frontAnimState[0x53] + 0x80))))) { + 5 < *(int *)(GHIDRA_INT(frontAnimState[0x53]) + 0x80))))) { MVar7 = frontAnimState[0x54]; local_15c.y = *(float *)((char *)MVar7 + 0x4c); if ((MVar7 == (Menu_Bestiary)0x0) || - (((int)local_15c.y < 0 || (*(int *)((char *)MVar7 + 0x1c) <= (int)local_15c.y)))) { + ((GHIDRA_INT(local_15c.y) < 0 || (*(int *)((char *)MVar7 + 0x1c) <= GHIDRA_INT(local_15c.y))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)frontAnimState[0x55] + (int)local_15c.y * 4) = 0; + *(undefined4 *)(GHIDRA_INT(frontAnimState[0x55]) + GHIDRA_INT(local_15c.y) * 4) = 0; AnimationState::AdvanceLayerPosition - ((AnimationState *)(frontAnimState + 0x53),(int)local_15c.y,(float)(int)local_154); + ((AnimationState *)(frontAnimState + 0x53),GHIDRA_INT(local_15c.y),(float)GHIDRA_INT(local_154)); } iVar2 = 5; } local_1a8 = (void *)((float)local_14c + 120.0); - local_1b0._4_4_ = local_144 + 340.0; + (*(undefined4 *)((char *)&(local_1b0) + 0x4)) = local_144 + 340.0; ((Sprite *)((Sprite *)local_16c))->Sprite::RenderLayer(iVar2,(Vector *)(local_1b0 + 4),&g_vectorZero, &g_vectorZero); } else { local_1a8 = (void *)(fVar9 + 150.0); - local_1b0._4_4_ = fVar11 + 319.0; + (*(undefined4 *)((char *)&(local_1b0) + 0x4)) = fVar11 + 319.0; if (((pvVar5 != (void *)0xffffffe8) && (iVar2 = *(int *)((char *)pvVar5 + 0x178), iVar2 != 0)) && (sprite = (ANM2 *)(iVar2 + 0xdf0), *(char *)(iVar2 + 0xef9) != '\0')) { ((ANM2 *)(sprite))->ANM2::SetFrame((std_string *)(iVar2 + 0xe08),*(int *)((char *)pvVar5 + 0x7c)); @@ -1036,12 +1036,12 @@ LAB_008c7985: ((AnimationState *)(frontAnimState + 0x98),&renderPos,&g_vectorZero,&g_vectorZero); } } - ((EntityConfig_Entity *)((EntityConfig_Entity *)((int)pvVar5 + 0x18)))->EntityConfig_Entity::GetName(&local_140,0x14); + ((EntityConfig_Entity *)((EntityConfig_Entity *)(GHIDRA_INT(pvVar5) + 0x18)))->EntityConfig_Entity::GetName(&local_140,0x14); pFVar6 = local_194; local_14 = 1; pbVar4 = (byte *)&local_140; if ((void *)0xf < local_140._capacity) { - pbVar4 = (byte *)local_140._buf._0_4_; + pbVar4 = (*(undefined4 *)((char *)&((byte *)local_140._buf) + 0x0)); } uVar1 = ((Font *)(local_194))->Font::get_string_width_n(pbVar4,-1); fontSettings = (FontSettings)0x1; @@ -1052,10 +1052,10 @@ LAB_008c7985: local_174 = 0; local_170 = 0; if (uVar1 < 0xc9) { - local_14 = CONCAT31(local_14._1_3_,3); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),3); pbVar4 = (byte *)&local_140; if ((void *)0xf < local_140._capacity) { - pbVar4 = (byte *)local_140._buf._0_4_; + pbVar4 = (*(undefined4 *)((char *)&((byte *)local_140._buf) + 0x0)); } local_1c4._red = 0.2; local_1c4._green = 0.2; @@ -1066,27 +1066,27 @@ LAB_008c7985: ((Font *)(pFVar6))->Font::DrawString(pbVar4,&local_1c4,&fontSettings,local_144,(float)local_14c + 160.0); } else { - fVar11 = 200.0 / (float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]); - local_14 = CONCAT31(local_14._1_3_,2); + fVar11 = 200.0 / (float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); local_1c4._red = 0.2; local_1c4._green = 0.2; local_1c4._blue = 0.2; local_1c4._alpha = 1.0; pbVar4 = (byte *)&local_140; if ((void *)0xf < local_140._capacity) { - pbVar4 = (byte *)local_140._buf._0_4_; + pbVar4 = (*(undefined4 *)((char *)&((byte *)local_140._buf) + 0x0)); } local_1c4._unk = 0; local_144 = local_144 + 360.0; pos.y = (float)local_14c + 160.0 + - ((float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) / 200.0 - + ((float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) / 200.0 - 1.0) * (float)(ushort)pFVar6->_base; pos.x = local_144; scale.y = fVar11; scale.x = fVar11; ((Font *)(pFVar6))->Font::DrawString(pbVar4,pos,scale,&local_1c4,&fontSettings); } - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; local_1b0 = (undefined1 [8])(double)*(float *)((char *)pvVar5 + 0x68); string_table_translate(&g_manager->_stringTable,(byte *)"#BESTIARY_HP"); sprintf_s(textBuffer,0x100,(byte *)"%s: %.f"); @@ -1097,14 +1097,14 @@ LAB_008c7985: local_178 = 0xffffffff; local_174 = 0; local_170 = 0; - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; local_15c.y = (float)local_14c + 180.0; - local_1b0._4_4_ = 0x3f000000; + (*(undefined4 *)((char *)&(local_1b0) + 0x4)) = 0x3f000000; local_1a8 = (void *)0x3f000000; pvVar5 = Font::measure_string (pFVar6,&local_1c4._green,textBuffer,&fontSettings,(Vector *)(local_1b0 + 4)) ; - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; color._blue = 0.2; color._red = 0.2; color._green = 0.2; @@ -1113,7 +1113,7 @@ LAB_008c7985: Font::render_glyph_quads(pFVar6,pvVar5,local_144,local_15c.y,0.5,0.5,color,&fontSettings); std::vector<12byte>::clear(); std::vector<12byte>::_Tidy(); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; string_table_translate(&g_manager->_stringTable,(byte *)"#BESTIARY_HITS"); sprintf_s(textBuffer,0x100,(byte *)"%s: %d"); fontSettings = (FontSettings)0x1; @@ -1123,14 +1123,14 @@ LAB_008c7985: local_178 = 0xffffffff; local_174 = 0; local_170 = 0; - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; local_15c.y = (float)local_14c + 190.0; - local_1b0._4_4_ = 0x3f000000; + (*(undefined4 *)((char *)&(local_1b0) + 0x4)) = 0x3f000000; local_1a8 = (void *)0x3f000000; pvVar5 = Font::measure_string (pFVar6,&local_1c4._green,textBuffer,&fontSettings,(Vector *)(local_1b0 + 4)) ; - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; color_00._blue = 0.2; color_00._red = 0.2; color_00._green = 0.2; @@ -1139,7 +1139,7 @@ LAB_008c7985: Font::render_glyph_quads(pFVar6,pvVar5,local_144,local_15c.y,0.5,0.5,color_00,&fontSettings); std::vector<12byte>::clear(); std::vector<12byte>::_Tidy(); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; string_table_translate(&g_manager->_stringTable,(byte *)"#BESTIARY_DEATHS"); sprintf_s(textBuffer,0x100,(byte *)"%s: %d"); fontSettings = (FontSettings)0x1; @@ -1149,7 +1149,7 @@ LAB_008c7985: local_178 = 0xffffffff; local_174 = 0; local_170 = 0; - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; local_1c4._red = 0.2; local_1c4._green = 0.2; local_1c4._blue = 0.2; @@ -1158,7 +1158,7 @@ LAB_008c7985: pos_00.y = (float)local_14c + 200.0; pos_00.x = local_144; ((Font *)(pFVar6))->Font::DrawString(textBuffer,pos_00,(Vector)0x3f0000003f000000,&local_1c4,&fontSettings); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; string_table_translate(&g_manager->_stringTable,(byte *)"#BESTIARY_KILLS"); sprintf_s(textBuffer,0x100,(byte *)"%s: %d"); fontSettings = (FontSettings)0x1; @@ -1168,7 +1168,7 @@ LAB_008c7985: local_178 = 0xffffffff; local_174 = 0; local_170 = 0; - local_14._0_1_ = 9; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; local_1c4._red = 0.2; local_1c4._green = 0.2; local_1c4._blue = 0.2; @@ -1177,7 +1177,7 @@ LAB_008c7985: pos_01.y = (float)local_14c + 210.0; pos_01.x = local_144; ((Font *)(pFVar6))->Font::DrawString(textBuffer,pos_01,(Vector)0x3f0000003f000000,&local_1c4,&fontSettings); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; string_table_translate(&g_manager->_stringTable,(byte *)"#BESTIARY_ENCOUNTERS"); sprintf_s(textBuffer,0x100,(byte *)"%s: %d"); fontSettings = (FontSettings)0x1; @@ -1187,7 +1187,7 @@ LAB_008c7985: local_178 = 0xffffffff; local_174 = 0; local_170 = 0; - local_14 = CONCAT31(local_14._1_3_,10); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),10); local_1c4._unk = 0; local_1c4._red = 0.2; local_1c4._green = 0.2; @@ -1201,17 +1201,17 @@ LAB_008c7985: return; } if ((frontAnimState[0x54] != (Menu_Bestiary)0x0) && - ((5 < *(int *)((int)frontAnimState[0x53] + 0x80) || - (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), 5 < *(int *)((int)frontAnimState[0x53] + 0x80) + ((5 < *(int *)(GHIDRA_INT(frontAnimState[0x53]) + 0x80) || + (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), 5 < *(int *)(GHIDRA_INT(frontAnimState[0x53]) + 0x80) )))) { MVar7 = frontAnimState[0x54]; local_15c.y = *(float *)((char *)MVar7 + 0x4c); if ((MVar7 == (Menu_Bestiary)0x0) || - (((int)local_15c.y < 0 || (*(int *)((char *)MVar7 + 0x1c) <= (int)local_15c.y)))) { + ((GHIDRA_INT(local_15c.y) < 0 || (*(int *)((char *)MVar7 + 0x1c) <= GHIDRA_INT(local_15c.y))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)frontAnimState[0x55] + (int)local_15c.y * 4) = 0; - ((AnimationState *)((AnimationState *)(frontAnimState + 0x53)))->AnimationState::AdvanceLayerPosition((int)local_15c.y,152.0); + *(undefined4 *)(GHIDRA_INT(frontAnimState[0x55]) + GHIDRA_INT(local_15c.y) * 4) = 0; + ((AnimationState *)((AnimationState *)(frontAnimState + 0x53)))->AnimationState::AdvanceLayerPosition(GHIDRA_INT(local_15c.y),152.0); } renderPos.y = (float)local_14c + 120.0; renderPos.x = local_144 + 340.0; @@ -1219,11 +1219,11 @@ LAB_008c7985: if ((*(undefined1 *)((char *)&(frontAnimState[0x89]) + 0x1)) != '\0') { if (*(char *)(frontAnimState + 99) == '\0') { MVar7 = frontAnimState[0x54]; - if (((MVar7 != (Menu_Bestiary)0x0) && (5 < *(int *)((int)frontAnimState[0x53] + 0x80))) && + if (((MVar7 != (Menu_Bestiary)0x0) && (5 < *(int *)(GHIDRA_INT(frontAnimState[0x53]) + 0x80))) && (iVar2 = *(int *)((char *)MVar7 + 0x4c), -1 < iVar2)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar2 * 0x10 + *(int *)((char *)MVar7 + 0x18)),&renderPos, - *(int *)((int)frontAnimState[0x55] + iVar2 * 4),&g_vectorZero,&g_vectorZero, + *(int *)(GHIDRA_INT(frontAnimState[0x55]) + iVar2 * 4),&g_vectorZero,&g_vectorZero, (ANM2 *)frontAnimState[0x53]); } MVar7 = frontAnimState[0x5c]; @@ -1234,11 +1234,11 @@ LAB_008c7985: } else { MVar7 = frontAnimState[0x5c]; - if (((MVar7 != (Menu_Bestiary)0x0) && (5 < *(int *)((int)frontAnimState[0x5b] + 0x80))) && + if (((MVar7 != (Menu_Bestiary)0x0) && (5 < *(int *)(GHIDRA_INT(frontAnimState[0x5b]) + 0x80))) && (iVar2 = *(int *)((char *)MVar7 + 0x4c), -1 < iVar2)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar2 * 0x10 + *(int *)((char *)MVar7 + 0x18)),&renderPos, - *(int *)((int)frontAnimState[0x5d] + iVar2 * 4),&g_vectorZero,&g_vectorZero, + *(int *)(GHIDRA_INT(frontAnimState[0x5d]) + iVar2 * 4),&g_vectorZero,&g_vectorZero, (ANM2 *)frontAnimState[0x5b]); } MVar7 = frontAnimState[0x54]; @@ -1290,21 +1290,21 @@ void Menu_Bestiary::update_cursor() Menu_Bestiary cursorIdx; cursorIdx = this[0xd3]; - iVar2 = (int)this[0xd8] - (int)this[0xd7] >> 2; + iVar2 = GHIDRA_INT(this[0xd8]) - GHIDRA_INT(this[0xd7]) >> 2; uVar1 = iVar2 - 1; - lastPage = (Menu_Bestiary)((int)cursorIdx + 1 + ((-(uint)(uVar1 != 0) & uVar1) >> 2)); - local_1c = (Menu_Bestiary)(((int)this[0xd5] - (int)this[0xd4] >> 2) - 1U & 0x8000000f); - if ((int)local_1c < 0) { - local_1c = (Menu_Bestiary)(((int)local_1c - 1U | 0xfffffff0) + 1); + lastPage = (Menu_Bestiary)(GHIDRA_INT(cursorIdx) + 1 + ((-GHIDRA_UINT((uVar1 != 0)) & uVar1) >> 2)); + local_1c = (Menu_Bestiary)((GHIDRA_INT(this[0xd5]) - GHIDRA_INT(this[0xd4]) >> 2) - 1U & 0x8000000f); + if (GHIDRA_INT(local_1c) < 0) { + local_1c = (Menu_Bestiary)((GHIDRA_INT(local_1c) - 1U | 0xfffffff0) + 1); } newPage = this[0xd1]; repeatDelay = 0xf; - if ((int)cursorIdx < (int)newPage) { + if (GHIDRA_INT(cursorIdx) < GHIDRA_INT(newPage)) { columns = 2; if (newPage == lastPage) { maxCursorIdx = (Menu_Bestiary)(iVar2 - 1U & 0x80000003); - if ((int)maxCursorIdx < 0) { - maxCursorIdx = (Menu_Bestiary)(((int)maxCursorIdx - 1U | 0xfffffffc) + 1); + if (GHIDRA_INT(maxCursorIdx) < 0) { + maxCursorIdx = (Menu_Bestiary)((GHIDRA_INT(maxCursorIdx) - 1U | 0xfffffffc) + 1); } } else { @@ -1329,7 +1329,7 @@ void Menu_Bestiary::update_cursor() *heldFrames = (Menu_Bestiary)0x0; } else { - *heldFrames = (Menu_Bestiary)((int)*heldFrames + 1); + *heldFrames = (Menu_Bestiary)(GHIDRA_INT(*heldFrames) + 1); } local_8[0] = '\x16'; local_8[1] = '\0'; @@ -1340,7 +1340,7 @@ void Menu_Bestiary::update_cursor() this[0xdb] = (Menu_Bestiary)0x0; } else { - this[0xdb] = (Menu_Bestiary)((int)this[0xdb] + 1); + this[0xdb] = (Menu_Bestiary)(GHIDRA_INT(this[0xdb]) + 1); } local_8[0] = '\x15'; local_8[1] = '\0'; @@ -1351,7 +1351,7 @@ void Menu_Bestiary::update_cursor() this[0xdc] = (Menu_Bestiary)0x0; } else { - this[0xdc] = (Menu_Bestiary)((int)this[0xdc] + 1); + this[0xdc] = (Menu_Bestiary)(GHIDRA_INT(this[0xdc]) + 1); } local_8[0] = '\x17'; local_8[1] = '\0'; @@ -1363,7 +1363,7 @@ void Menu_Bestiary::update_cursor() cursorIdx = (Menu_Bestiary)0x0; } else { - this[0xdd] = (Menu_Bestiary)((int)this[0xdd] + 1); + this[0xdd] = (Menu_Bestiary)(GHIDRA_INT(this[0xdd]) + 1); cursorIdx = this[0xdd]; } if (*heldFrames == (Menu_Bestiary)0x0) { @@ -1398,9 +1398,9 @@ LAB_008c89a7: local_8[3] = '\0'; do { cursorIdx = *heldFrames; - if ((((cursorIdx != (Menu_Bestiary)0x0) && ((uint)cursorIdx % repeatDelay == 0)) || - ((0x3c < (uint)cursorIdx && ((uint)cursorIdx % 10 == 0)))) || - ((0xb4 < (uint)cursorIdx && ((uint)cursorIdx % 5 == 0)))) { + if ((((cursorIdx != (Menu_Bestiary)0x0) && (GHIDRA_UINT(cursorIdx) % repeatDelay == 0)) || + ((0x3c < GHIDRA_UINT(cursorIdx) && (GHIDRA_UINT(cursorIdx) % 10 == 0)))) || + ((0xb4 < GHIDRA_UINT(cursorIdx) && (GHIDRA_UINT(cursorIdx) % 5 == 0)))) { local_8[iVar2] = '\x01'; } iVar2 = iVar2 + 1; @@ -1416,35 +1416,35 @@ LAB_008c89a7: (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a209e0,&local_24,0,0); if ((isActionActive != '\0') || (local_8[2] != '\0')) { newPage = heldFrames[0xd2]; - cursorIdx = (Menu_Bestiary)((int)newPage + 1); + cursorIdx = (Menu_Bestiary)(GHIDRA_INT(newPage) + 1); heldFrames[0xd2] = cursorIdx; - if (((int)cursorIdx <= (int)maxCursorIdx) && ((int)cursorIdx % columns != 0)) { + if ((GHIDRA_INT(cursorIdx) <= GHIDRA_INT(maxCursorIdx)) && (GHIDRA_INT(cursorIdx) % columns != 0)) { return; } - if ((int)lastPage <= (int)heldFrames[0xd1]) { + if (GHIDRA_INT(lastPage) <= GHIDRA_INT(heldFrames[0xd1])) { heldFrames[0xd2] = newPage; return; } - cursorIdx = (Menu_Bestiary)((int)cursorIdx - columns); - newPage = (Menu_Bestiary)((int)heldFrames[0xd1] + 1); + cursorIdx = (Menu_Bestiary)(GHIDRA_INT(cursorIdx) - columns); + newPage = (Menu_Bestiary)(GHIDRA_INT(heldFrames[0xd1]) + 1); heldFrames[0xd1] = newPage; heldFrames[0xd2] = cursorIdx; - if (newPage == (Menu_Bestiary)((int)heldFrames[0xd3] + 1)) { + if (newPage == (Menu_Bestiary)(GHIDRA_INT(heldFrames[0xd3]) + 1)) { LAB_008c8be2: heldFrames[0xd2] = (Menu_Bestiary)0x0; return; } if (newPage == lastPage) { - uVar1 = (int)heldFrames[0xd8] - (int)heldFrames[0xd7] >> 2 & 0x80000003; - if ((int)uVar1 < 0) { + uVar1 = GHIDRA_INT(heldFrames[0xd8]) - GHIDRA_INT(heldFrames[0xd7]) >> 2 & 0x80000003; + if (GHIDRA_INT(uVar1) < 0) { uVar1 = (uVar1 - 1 | 0xfffffffc) + 1; } - if ((int)uVar1 <= (int)cursorIdx) goto LAB_008c8be2; + if (GHIDRA_INT(uVar1) <= GHIDRA_INT(cursorIdx)) goto LAB_008c8be2; } if (newPage != heldFrames[0xd3]) { return; } - if ((int)local_1c < (int)cursorIdx) { + if (GHIDRA_INT(local_1c) < GHIDRA_INT(cursorIdx)) { cursorIdx = local_1c; } heldFrames[0xd2] = cursorIdx; @@ -1468,32 +1468,32 @@ LAB_008c8be2: return; } cursorIdx = heldFrames[0xd2]; - if (columns + -1 <= (int)cursorIdx / columns) { + if (columns + -1 <= GHIDRA_INT(cursorIdx) / columns) { return; } - heldFrames[0xd2] = (Menu_Bestiary)((int)cursorIdx + columns); - if ((int)maxCursorIdx < (int)cursorIdx + columns) { + heldFrames[0xd2] = (Menu_Bestiary)(GHIDRA_INT(cursorIdx) + columns); + if (GHIDRA_INT(maxCursorIdx) < GHIDRA_INT(cursorIdx) + columns) { heldFrames[0xd2] = cursorIdx; return; } return; } - if ((int)heldFrames[0xd2] / columns < 1) { + if (GHIDRA_INT(heldFrames[0xd2]) / columns < 1) { return; } - newPage = (Menu_Bestiary)((int)heldFrames[0xd2] - columns); + newPage = (Menu_Bestiary)(GHIDRA_INT(heldFrames[0xd2]) - columns); } else { newPage = local_24[0xd2]; - cursorIdx = (Menu_Bestiary)((int)newPage + -1); + cursorIdx = (Menu_Bestiary)(GHIDRA_INT(newPage) + -1); local_24[0xd2] = cursorIdx; - if ((-1 < (int)cursorIdx) && ((int)cursorIdx % columns != columns + -1)) { + if ((-1 < GHIDRA_INT(cursorIdx)) && (GHIDRA_INT(cursorIdx) % columns != columns + -1)) { return; } - if (0 < (int)local_24[0xd1]) { - newPage = (Menu_Bestiary)((int)local_24[0xd1] + -1); + if (0 < GHIDRA_INT(local_24[0xd1])) { + newPage = (Menu_Bestiary)(GHIDRA_INT(local_24[0xd1]) + -1); local_24[0xd1] = newPage; - local_24[0xd2] = (Menu_Bestiary)((int)cursorIdx + columns); + local_24[0xd2] = (Menu_Bestiary)(GHIDRA_INT(cursorIdx) + columns); if (newPage == local_24[0xd3]) { local_24[0xd2] = local_1c; return; @@ -1548,11 +1548,11 @@ void Menu_Bestiary::LoadPreview() void *local_14; puStack_20 = (undefined1 *)(resolvedPath + 0x1a); - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; puStack_18 = &LAB_00b057ee; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(resolvedPath + 0x17); + local_24 = __security_cookie ^ GHIDRA_UINT((resolvedPath + 0x17)); ExceptionList = &local_1c; cleanupFlags = (LayerState *)0x0; local_90 = (LayerState *)0x0; @@ -1561,10 +1561,10 @@ void Menu_Bestiary::LoadPreview() ((ANM2 *)(previewSprite))->ANM2::Reset(); entityConfig = &g_manager->_entityConfig; MVar10 = this[0xd1]; - if ((int)this[0xd3] < (int)MVar10) { + if (GHIDRA_INT(this[0xd3]) < GHIDRA_INT(MVar10)) { if (this[0xd7] != this[0xd8]) { local_80 = (Menu_Bestiary) - ((int)this[0xd7] + ((int)this[0xd2] + ((int)MVar10 - (int)this[0xd3]) * 4 + -4) * 4 + (GHIDRA_INT(this[0xd7]) + (GHIDRA_INT(this[0xd2]) + (GHIDRA_INT(MVar10) - GHIDRA_INT(this[0xd3])) * 4 + -4) * 4 ); goto LAB_008c8d25; } @@ -1573,7 +1573,7 @@ LAB_008c8d47: } else { if (this[0xd4] == this[0xd5]) goto LAB_008c8d47; - local_80 = (Menu_Bestiary)((int)this[0xd4] + ((int)MVar10 * 0x10 + (int)this[0xd2]) * 4); + local_80 = (Menu_Bestiary)(GHIDRA_INT(this[0xd4]) + (GHIDRA_INT(MVar10) * 0x10 + GHIDRA_INT(this[0xd2])) * 4); LAB_008c8d25: _Find_lower_bound<>(local_3c._buf + 0xc,local_80); if ((*(char *)(local_3c._capacity + 0xd) != '\0') || @@ -1592,91 +1592,91 @@ LAB_008c8d25: if (*(int *)((char *)entityEntry + 0x120) == 0) { iVar2 = 0x8c; } - ((ANM2 *)(previewSprite))->ANM2::Load((std_string *)(iVar2 + (int)entityEntry),0); + ((ANM2 *)(previewSprite))->ANM2::Load((std_string *)(iVar2 + GHIDRA_INT(entityEntry)),0); if ((*(int *)((char *)entityEntry + 0x168) != 0) && (MVar10 = (Menu_Bestiary)0x0, menu[0xac] != (Menu_Bestiary)0x0)) { do { pLVar3 = ((ANM2 *)(previewSprite))->ANM2::GetLayer((byte *)MVar10); local_3c._capacity = 0xf; local_3c._size = 0; - local_3c._buf._0_4_ = (LayerState *)0x0; + (*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) = (LayerState *)0x0; local_14 = (void *)0x0; - cleanupFlags = (LayerState *)((uint)cleanupFlags | 4); + cleanupFlags = (LayerState *)(GHIDRA_UINT(cleanupFlags) | 4); if (pLVar3->_layerData == (void *)0x0) { layerString._capacity = 0xf; layerString._size = 0; - layerString._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(layerString._buf) + 0x0)) = (std_string *)0x0; } else { - ((std::string *)(layerString._buf))->std::string::string((void *)((int)pLVar3->_layerData + 0x20)); + ((std::string *)(layerString._buf))->std::string::string((void *)(GHIDRA_INT(pLVar3->_layerData) + 0x20)); } - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; anm2_resolve_spritesheet_path - ((std_string *)resolvedPath,&layerString,(std_string *)((int)entityEntry + 0x158), + ((std_string *)resolvedPath,&layerString,(std_string *)(GHIDRA_INT(entityEntry) + 0x158), &local_3c,(byte *)0x0); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; if (0xf < layerString._capacity) { uVar8 = layerString._capacity + 1; - psVar6 = (std_string *)layerString._buf._0_4_; + psVar6 = (*(undefined4 *)((char *)&((std_string *)layerString._buf) + 0x0)); if (0xfff < uVar8) { - psVar6 = (std_string *)((std_string *)(layerString._buf._0_4_ + -0x18))->_capacity; + psVar6 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(layerString._buf) + 0x0)) + -0x18))->_capacity; uVar8 = layerString._capacity + 0x24; - if ((char *)0x1f < (char *)(layerString._buf._0_4_ + (-4 - (int)psVar6))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(layerString._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar6)))) goto LAB_008c9312; } operator_delete(psVar6,uVar8); } - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; if ((void *)0xf < local_3c._capacity) { uVar8 = local_3c._capacity + 1; - pLVar3 = (LayerState *)local_3c._buf._0_4_; + pLVar3 = (*(undefined4 *)((char *)&((LayerState *)local_3c._buf) + 0x0)); if (0xfff < uVar8) { - pLVar3 = (LayerState *)((LayerState *)(local_3c._buf._0_4_ + -0x9c))->_spriteSheet; + pLVar3 = (LayerState *)((LayerState *)((*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) + -0x9c))->_spriteSheet; uVar8 = local_3c._capacity + 0x24; - if (0x1f < (uint)(local_3c._buf._0_4_ + (-4 - (int)pLVar3))) goto LAB_008c9312; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) + (-4 - GHIDRA_INT(pLVar3))))) goto LAB_008c9312; } operator_delete(pLVar3,uVar8); } - ((Sprite *)((Sprite *)previewSprite))->Sprite::ReplaceSpritesheet((int)MVar10,(std_string *)resolvedPath); - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; + ((Sprite *)((Sprite *)previewSprite))->Sprite::ReplaceSpritesheet(GHIDRA_INT(MVar10),(std_string *)resolvedPath); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; if (0xf < resolvedPathCapacity) { uVar8 = resolvedPathCapacity + 1; ptr = resolvedPath[0]; if (0xfff < uVar8) { - ptr = *(void **)((int)resolvedPath[0] + -4); + ptr = *(void **)(GHIDRA_INT(resolvedPath[0]) + -4); uVar8 = resolvedPathCapacity + 0x24; - if (0x1f < (uint)((int)resolvedPath[0] + (-4 - (int)ptr))) goto LAB_008c9312; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(resolvedPath[0]) + (-4 - GHIDRA_INT(ptr))))) goto LAB_008c9312; } operator_delete(ptr,uVar8); } - MVar10 = (Menu_Bestiary)((int)MVar10 + 1); - } while ((uint)MVar10 < (uint)menu[0xac]); + MVar10 = (Menu_Bestiary)(GHIDRA_INT(MVar10) + 1); + } while (GHIDRA_UINT(MVar10) < GHIDRA_UINT(menu[0xac])); } if ((((*(int *)((char *)entityEntry + 0x18) == 0x110) || (*(int *)((char *)entityEntry + 0x18) == 0x10f) ) && (*(int *)((char *)entityEntry + 0x1c) == 1)) && (layerIdx = (Menu_Bestiary)0x0, menu[0xac] != (Menu_Bestiary)0x0)) { do { pLVar3 = ((ANM2 *)(previewSprite))->ANM2::GetLayer((byte *)layerIdx); - cleanupFlags = (LayerState *)((uint)cleanupFlags | 8); + cleanupFlags = (LayerState *)(GHIDRA_UINT(cleanupFlags) | 8); if (pLVar3->_layerData == (void *)0x0) { local_3c._capacity = 0xf; local_3c._size = 0; - local_3c._buf._0_4_ = (LayerState *)0x0; + (*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) = (LayerState *)0x0; } else { - ((std::string *)(local_3c._buf))->std::string::string((void *)((int)pLVar3->_layerData + 0x20)); + ((std::string *)(local_3c._buf))->std::string::string((void *)(GHIDRA_INT(pLVar3->_layerData) + 0x20)); } local_14 = (void *)0x5; local_90 = (LayerState *)&local_3c; if ((void *)0xf < local_3c._capacity) { - local_90 = (LayerState *)local_3c._buf._0_4_; + local_90 = (*(undefined4 *)((char *)&((LayerState *)local_3c._buf) + 0x0)); } - local_78 = (LayerState *)local_3c._buf._0_4_; + local_78 = (*(undefined4 *)((char *)&((LayerState *)local_3c._buf) + 0x0)); if (4 < local_3c._size) { local_8c = (std_string *)((local_90->_spriteSheetPath)._buf + (local_3c._size - 0xc)); - for (pbVar4 = memchr(local_90,0x41,(int)local_8c - (int)local_90); pbVar4 != (byte *)0x0; - pbVar4 = memchr(pbVar4 + 1,0x41,(int)local_8c - (int)(pbVar4 + 1))) { + for (pbVar4 = memchr(local_90,0x41,GHIDRA_INT(local_8c) - GHIDRA_INT(local_90)); pbVar4 != (byte *)0x0; + pbVar4 = memchr(pbVar4 + 1,0x41,GHIDRA_INT(local_8c) - GHIDRA_INT((pbVar4 + 1)))) { local_80 = (Menu_Bestiary)0x1; pcVar9 = "Angel"; pbVar5 = pbVar4; @@ -1694,10 +1694,10 @@ LAB_008c8d25: uVar8 = 0; } else { - uVar8 = -(uint)bVar13 | 1; + uVar8 = -GHIDRA_UINT(bVar13) | 1; } if (uVar8 == 0) { - if ((int)pbVar4 - (int)local_90 != -1) { + if (GHIDRA_INT(pbVar4) - GHIDRA_INT(local_90) != -1) { uVar8 = local_3c._size - 4; if (local_3c._size < uVar8) { ((std::string *)(local_3c._buf))->std::string::append_n(uVar8 - local_3c._size,0); @@ -1713,8 +1713,8 @@ LAB_008c8d25: } ((std::string *)(local_3c._buf))->std::string::append((byte *)"Black.png",9); MVar10 = layerIdx; - ((Sprite *)((Sprite *)previewSprite))->Sprite::ReplaceSpritesheet((int)layerIdx,&local_3c); - pLVar3 = (LayerState *)local_3c._buf._0_4_; + ((Sprite *)((Sprite *)previewSprite))->Sprite::ReplaceSpritesheet(GHIDRA_INT(layerIdx),&local_3c); + pLVar3 = (*(undefined4 *)((char *)&((LayerState *)local_3c._buf) + 0x0)); goto LAB_008c9015; } break; @@ -1724,79 +1724,79 @@ LAB_008c8d25: pLVar3 = local_78; MVar10 = layerIdx; LAB_008c9015: - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; if ((void *)0xf < local_3c._capacity) { uVar8 = local_3c._capacity + 1; pLVar7 = pLVar3; if (0xfff < uVar8) { pLVar7 = (LayerState *)pLVar3[-1]._spriteSheet; uVar8 = local_3c._capacity + 0x24; - if (0x1f < (uint)((int)pLVar3 + (-4 - (int)pLVar7))) goto LAB_008c9312; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pLVar3) + (-4 - GHIDRA_INT(pLVar7))))) goto LAB_008c9312; } operator_delete(pLVar7,uVar8); } - layerIdx = (Menu_Bestiary)((int)MVar10 + 1); - } while ((uint)layerIdx < (uint)menu[0xac]); + layerIdx = (Menu_Bestiary)(GHIDRA_INT(MVar10) + 1); + } while (GHIDRA_UINT(layerIdx) < GHIDRA_UINT(menu[0xac])); } local_80 = (Menu_Bestiary)0x0; if (menu[0xac] != (Menu_Bestiary)0x0) { do { pLVar3 = ((ANM2 *)(previewSprite))->ANM2::GetLayer((byte *)local_80); - cleanupFlags = (LayerState *)((uint)cleanupFlags | 0x10); + cleanupFlags = (LayerState *)(GHIDRA_UINT(cleanupFlags) | 0x10); local_78 = pLVar3; if (pLVar3->_layerData == (void *)0x0) { layerString._capacity = 0xf; layerString._size = 0; - layerString._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(layerString._buf) + 0x0)) = (std_string *)0x0; } else { - ((std::string *)(layerString._buf))->std::string::string((void *)((int)pLVar3->_layerData + 8)); + ((std::string *)(layerString._buf))->std::string::string((void *)(GHIDRA_INT(pLVar3->_layerData) + 8)); } - local_14._0_1_ = 6; - local_14._1_3_ = 0; - local_90 = (LayerState *)((uint)cleanupFlags | 1); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; + local_90 = (LayerState *)(GHIDRA_UINT(cleanupFlags) | 1); psVar6 = &layerString; if (0xf < layerString._capacity) { - psVar6 = (std_string *)layerString._buf._0_4_; + psVar6 = (*(undefined4 *)((char *)&((std_string *)layerString._buf) + 0x0)); } - local_8c = (std_string *)layerString._buf._0_4_; + local_8c = (*(undefined4 *)((char *)&((std_string *)layerString._buf) + 0x0)); cleanupFlags = local_90; bVar1 = str_eq((byte *)psVar6,layerString._size,&DAT_00b64428,4); if (bVar1 == 0) { - cleanupFlags = (LayerState *)((uint)cleanupFlags | 0x20); + cleanupFlags = (LayerState *)(GHIDRA_UINT(cleanupFlags) | 0x20); if (pLVar3->_layerData == (void *)0x0) { local_3c._capacity = 0xf; - local_3c._buf._0_4_ = (LayerState *)0x0; + (*(undefined4 *)((char *)&(local_3c._buf) + 0x0)) = (LayerState *)0x0; local_3c._size = 0; } else { - ((std::string *)(local_3c._buf))->std::string::string((void *)((int)pLVar3->_layerData + 8)); + ((std::string *)(local_3c._buf))->std::string::string((void *)(GHIDRA_INT(pLVar3->_layerData) + 8)); } - pLVar3 = (LayerState *)local_3c._buf._0_4_; - cleanupFlags = (LayerState *)((uint)cleanupFlags | 2); + pLVar3 = (*(undefined4 *)((char *)&((LayerState *)local_3c._buf) + 0x0)); + cleanupFlags = (LayerState *)(GHIDRA_UINT(cleanupFlags) | 2); pLVar7 = (LayerState *)&local_3c; if ((void *)0xf < local_3c._capacity) { - pLVar7 = (LayerState *)local_3c._buf._0_4_; + pLVar7 = (*(undefined4 *)((char *)&((LayerState *)local_3c._buf) + 0x0)); } bVar1 = str_eq((byte *)pLVar7,local_3c._size,&DAT_00b1d57c,4); if (bVar1 != 0) goto LAB_008c91ab; isBrightLayer = '\0'; } else { - pLVar3 = (LayerState *)local_3c._buf._0_4_; + pLVar3 = (*(undefined4 *)((char *)&((LayerState *)local_3c._buf) + 0x0)); LAB_008c91ab: isBrightLayer = '\x01'; } - if ((((uint)cleanupFlags & 2) != 0) && - (cleanupFlags = (LayerState *)((uint)cleanupFlags & 0xfffffffd), + if (((GHIDRA_UINT(cleanupFlags) & 2) != 0) && + (cleanupFlags = (LayerState *)(GHIDRA_UINT(cleanupFlags) & 0xfffffffd), (void *)0xf < local_3c._capacity)) { uVar8 = local_3c._capacity + 1; pLVar7 = pLVar3; if (0xfff < uVar8) { pLVar7 = (LayerState *)pLVar3[-1]._spriteSheet; uVar8 = local_3c._capacity + 0x24; - if (0x1f < (uint)((int)pLVar3 + (-4 - (int)pLVar7))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pLVar3) + (-4 - GHIDRA_INT(pLVar7))))) { LAB_008c9312: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1804,17 +1804,17 @@ LAB_008c9312: } operator_delete(pLVar7,uVar8); } - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; - if ((((uint)cleanupFlags & 1) != 0) && - (cleanupFlags = (LayerState *)((uint)cleanupFlags & 0xfffffffe), + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; + if (((GHIDRA_UINT(cleanupFlags) & 1) != 0) && + (cleanupFlags = (LayerState *)(GHIDRA_UINT(cleanupFlags) & 0xfffffffe), 0xf < layerString._capacity)) { uVar8 = layerString._capacity + 1; psVar6 = local_8c; if (0xfff < uVar8) { psVar6 = (std_string *)local_8c[-1]._capacity; uVar8 = layerString._capacity + 0x24; - if ((char *)0x1f < (char *)((int)local_8c + (-4 - (int)psVar6))) goto LAB_008c9312; + if ((char *)0x1f < (char *)(GHIDRA_INT(local_8c) + (-4 - GHIDRA_INT(psVar6)))) goto LAB_008c9312; } operator_delete(psVar6,uVar8); } @@ -1836,8 +1836,8 @@ LAB_008c9312: (local_78->_color)._offset[2] = 0.0; } } - local_80 = (Menu_Bestiary)((int)local_80 + 1); - } while ((uint)local_80 < (uint)menu[0xac]); + local_80 = (Menu_Bestiary)(GHIDRA_INT(local_80) + 1); + } while (GHIDRA_UINT(local_80) < GHIDRA_UINT(menu[0xac])); } pAVar12 = previewSprite; MVar10 = (Menu_Bestiary)0x60; @@ -1847,7 +1847,7 @@ LAB_008c9312: menu[0xd0] = MVar10; ((ANM2 *)(previewSprite))->ANM2::LoadGraphics((byte)menu); pAVar11 = previewSprite; - local_78 = (LayerState *)((int)entityEntry + 0x128); + local_78 = (LayerState *)(GHIDRA_INT(entityEntry) + 0x128); if (0xf < *(uint *)((char *)entityEntry + 0x13c)) { local_78 = *(LayerState **)local_78; } @@ -1872,7 +1872,7 @@ LAB_008c9339: bVar13 = bVar1 < *(byte *)pLVar3; if (bVar1 != *(byte *)pLVar3) { LAB_008c9318: - uVar8 = -(uint)bVar13 | 1; + uVar8 = -GHIDRA_UINT(bVar13) | 1; goto LAB_008c931d; } if (bVar1 == 0) break; @@ -1880,7 +1880,7 @@ LAB_008c9318: bVar13 = bVar1 < *(byte *)((char *)pLVar3 + 1); if (bVar1 != *(byte *)((char *)pLVar3 + 1)) goto LAB_008c9318; pbVar5 = pbVar5 + 2; - pLVar3 = (LayerState *)((int)pLVar3 + 2); + pLVar3 = (LayerState *)(GHIDRA_INT(pLVar3) + 2); } while (bVar1 != 0); uVar8 = 0; LAB_008c931d: @@ -1889,7 +1889,7 @@ LAB_008c931d: } pAVar12 = previewSprite; if (*(int *)((char *)entityEntry + 0x150) != 0) { - local_78 = (LayerState *)((int)entityEntry + 0x140); + local_78 = (LayerState *)(GHIDRA_INT(entityEntry) + 0x140); if (0xf < *(uint *)((char *)entityEntry + 0x154)) { local_78 = *(LayerState **)local_78; } @@ -1905,7 +1905,7 @@ LAB_008c931d: bVar13 = bVar1 < *(byte *)pLVar3; if (bVar1 != *(byte *)pLVar3) { LAB_008c93b0: - uVar8 = -(uint)bVar13 | 1; + uVar8 = -GHIDRA_UINT(bVar13) | 1; goto LAB_008c93b5; } if (bVar1 == 0) break; @@ -1913,7 +1913,7 @@ LAB_008c93b0: bVar13 = bVar1 < *(byte *)((char *)pLVar3 + 1); if (bVar1 != *(byte *)((char *)pLVar3 + 1)) goto LAB_008c93b0; pbVar5 = pbVar5 + 2; - pLVar3 = (LayerState *)((int)pLVar3 + 2); + pLVar3 = (LayerState *)(GHIDRA_INT(pLVar3) + 2); } while (bVar1 != 0); uVar8 = 0; LAB_008c93b5: diff --git a/src/game/menu_challenge.cpp b/src/game/menu_challenge.cpp index ce3833d..5b8ffbf 100644 --- a/src/game/menu_challenge.cpp +++ b/src/game/menu_challenge.cpp @@ -50,7 +50,7 @@ void Menu_Challenge::render_seed_text() local_14 = (undefined4 *****)0xffffffff; puStack_18 = &LAB_00b05ad0; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(seedText + 0xb); + local_24 = __security_cookie ^ GHIDRA_UINT((seedText + 0xb)); ExceptionList = &local_1c; if (*(int *)(in_ECX + 0x34) != 0) { menu = in_ECX; @@ -79,8 +79,8 @@ void Menu_Challenge::render_seed_text() textPos.y = (float)-*(int *)(in_ECX + 0x590) + (float)local_5c + nullFrame[1]; textY = textPos.y; ((std::string *)((char *)seedText))->std::string::string(&(g_manager->_lobbySettings)._seed); - local_14._0_1_ = 0; - local_14._1_3_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; if (seedTextSize < &DAT_00000009) { ppppppuVar11 = seedTextSize; ppppppuVar10 = seedTextCapacity; @@ -89,18 +89,18 @@ LAB_008cd921: ppppppuVar5 = seedText[0]; if (ppppppuVar11 == (undefined4 ******)&DAT_00000004) { if (ppppppuVar10 < &DAT_00000005) { - if ((undefined4 ******)(0x7fffffff - ((uint)ppppppuVar10 >> 1)) < ppppppuVar10) { + if ((undefined4 ******)(0x7fffffff - (GHIDRA_UINT(ppppppuVar10) >> 1)) < ppppppuVar10) { ppppppuVar8 = (undefined4 ******)0x7fffffff; } else { - ppppppuVar11 = (undefined4 ******)((int)ppppppuVar10 + ((uint)ppppppuVar10 >> 1)); + ppppppuVar11 = (undefined4 ******)(GHIDRA_INT(ppppppuVar10) + (GHIDRA_UINT(ppppppuVar10) >> 1)); ppppppuVar8 = (undefined4 ******)&DAT_0000000f; if (&DAT_0000000f < ppppppuVar11) { ppppppuVar8 = ppppppuVar11; } } local_60 = ppppppuVar10; - local_64 = std::_Allocate((uint)((int)ppppppuVar8 + 1)); + local_64 = std::_Allocate(GHIDRA_UINT((GHIDRA_INT(ppppppuVar8) + 1))); ppppppuVar11 = (undefined4 ******)&DAT_00000005; local_58 = (undefined4 ******)&DAT_00000005; seedTextSize = (undefined4 ******)&DAT_00000005; @@ -112,16 +112,16 @@ LAB_008cd921: seedText[0] = local_64; } else { - ppppppuVar8 = (undefined4 ******)((int)local_60 + 1); + ppppppuVar8 = (undefined4 ******)(GHIDRA_INT(local_60) + 1); *local_64 = *ppppppuVar5; *(undefined2 *)(local_64 + 1) = 0x20; ppppppuVar11 = ppppppuVar5; if ((undefined4 ******)0xfff < ppppppuVar8) { ppppppuVar11 = (undefined4 ******)ppppppuVar5[-1]; ppppppuVar8 = local_60 + 9; - if (0x1f < (uint)((int)ppppppuVar5 + (-4 - (int)ppppppuVar11))) goto LAB_008cddb4; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(ppppppuVar5) + (-4 - GHIDRA_INT(ppppppuVar11))))) goto LAB_008cddb4; } - operator_delete(ppppppuVar11,(uint)ppppppuVar8); + operator_delete(ppppppuVar11,GHIDRA_UINT(ppppppuVar8)); seedText[0] = local_64; ppppppuVar11 = local_58; } @@ -137,12 +137,12 @@ LAB_008cd921: ppppppuVar8 = seedTextCapacity; } else if (ppppppuVar11 < ppppppuVar10) { - seedTextSize = (undefined4 ******)((int)ppppppuVar11 + 1); + seedTextSize = (undefined4 ******)(GHIDRA_INT(ppppppuVar11) + 1); ppppppuVar5 = seedText; if (&DAT_0000000f < ppppppuVar10) { ppppppuVar5 = seedText[0]; } - *(undefined2 *)((char *)ppppppuVar5 + (int)ppppppuVar11) = 0x2d; + *(undefined2 *)((char *)ppppppuVar5 + GHIDRA_INT(ppppppuVar11)) = 0x2d; ppppppuVar11 = seedTextSize; ppppppuVar8 = seedTextCapacity; } @@ -152,14 +152,14 @@ LAB_008cd921: /* WARNING: Subroutine does not return */ std::string::_Xlen(); } - local_58 = (undefined4 ******)((int)ppppppuVar11 + 1); - ppppppuVar8 = (undefined4 ******)((uint)local_58 | 0xf); + local_58 = (undefined4 ******)(GHIDRA_INT(ppppppuVar11) + 1); + ppppppuVar8 = (undefined4 ******)(GHIDRA_UINT(local_58) | 0xf); if (ppppppuVar8 < (undefined4 ******)0x80000000) { - if ((undefined4 ******)(0x7fffffff - ((uint)ppppppuVar10 >> 1)) < ppppppuVar10) { + if ((undefined4 ******)(0x7fffffff - (GHIDRA_UINT(ppppppuVar10) >> 1)) < ppppppuVar10) { ppppppuVar8 = (undefined4 ******)0x7fffffff; } else { - ppppppuVar11 = (undefined4 ******)((int)ppppppuVar10 + ((uint)ppppppuVar10 >> 1)); + ppppppuVar11 = (undefined4 ******)(GHIDRA_INT(ppppppuVar10) + (GHIDRA_UINT(ppppppuVar10) >> 1)); if (ppppppuVar8 < ppppppuVar11) { ppppppuVar8 = ppppppuVar11; } @@ -169,25 +169,25 @@ LAB_008cd921: ppppppuVar8 = (undefined4 ******)0x7fffffff; } local_64 = ppppppuVar10; - local_60 = std::_Allocate((uint)((int)ppppppuVar8 + 1)); + local_60 = std::_Allocate(GHIDRA_UINT((GHIDRA_INT(ppppppuVar8) + 1))); ppppppuVar11 = local_5c; seedTextSize = local_58; seedTextCapacity = ppppppuVar8; if (local_64 < (undefined4 ******)0x10) { memcpy(local_60,seedText,(size_t)local_5c); - *(undefined2 *)((char *)ppppppuVar11 + (int)local_60) = 0x2d; + *(undefined2 *)((char *)ppppppuVar11 + GHIDRA_INT(local_60)) = 0x2d; } else { memcpy(local_60,ppppppuVar5,(size_t)local_5c); - *(undefined2 *)((char *)local_5c + (int)local_60) = 0x2d; - ppppppuVar10 = (undefined4 ******)((int)local_64 + 1); + *(undefined2 *)((char *)local_5c + GHIDRA_INT(local_60)) = 0x2d; + ppppppuVar10 = (undefined4 ******)(GHIDRA_INT(local_64) + 1); ppppppuVar11 = ppppppuVar5; if ((undefined4 ******)0xfff < ppppppuVar10) { ppppppuVar11 = (undefined4 ******)ppppppuVar5[-1]; ppppppuVar10 = local_64 + 9; - if (0x1f < (uint)((int)ppppppuVar5 + (-4 - (int)ppppppuVar11))) goto LAB_008cddb4; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(ppppppuVar5) + (-4 - GHIDRA_INT(ppppppuVar11))))) goto LAB_008cddb4; } - operator_delete(ppppppuVar11,(uint)ppppppuVar10); + operator_delete(ppppppuVar11,GHIDRA_UINT(ppppppuVar10)); } ppppppuVar11 = local_58; seedText[0] = local_60; @@ -199,18 +199,18 @@ LAB_008cd921: linesBegin = (std_string *)0x0; linesEnd = (std_string *)0x0; linesCapacity = (std_string *)0x0; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; psVar6 = (std_string *)FUN_00651a90(&seedPart,0,4); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; vector_string_emplace_reallocate_move(&linesBegin,(std_string *)0x0,psVar6); - local_14._0_1_ = 1; - if (0xf < (uint)local_50._unk) { + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; + if (0xf < GHIDRA_UINT(local_50._unk)) { uVar9 = local_50._unk + 1; pvVar4 = seedPart; if (0xfff < uVar9) { pvVar4 = *(void **)((char *)seedPart + -4); uVar9 = local_50._unk + 0x24; - if (0x1f < (uint)((int)seedPart + (-4 - (int)pvVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(seedPart) + (-4 - GHIDRA_INT(pvVar4))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -218,7 +218,7 @@ LAB_008cd921: operator_delete(pvVar4,uVar9); } psVar6 = (std_string *)FUN_00651a90(&seedPart,5,4); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; if (linesEnd == linesCapacity) { vector_string_emplace_reallocate_move(&linesBegin,linesEnd,psVar6); } @@ -245,14 +245,14 @@ LAB_008cd921: psVar6->_buf[0] = '\0'; } psVar6 = linesEnd; - local_14._0_1_ = 1; - if (0xf < (uint)local_50._unk) { + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; + if (0xf < GHIDRA_UINT(local_50._unk)) { uVar9 = local_50._unk + 1; pvVar4 = seedPart; if (0xfff < uVar9) { pvVar4 = *(void **)((char *)seedPart + -4); uVar9 = local_50._unk + 0x24; - if (0x1f < (uint)((int)seedPart + (-4 - (int)pvVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(seedPart) + (-4 - GHIDRA_INT(pvVar4))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -261,7 +261,7 @@ LAB_008cd921: } ((KColor *)(&local_50))->KColor::SetFromARGB(0xff362f2d); local_50._alpha = *(float *)(in_ECX + 0x7e8); - ppppppuVar11 = (undefined4 ******)(((int)psVar6 - (int)linesBegin) / 0x18); + ppppppuVar11 = (undefined4 ******)((GHIDRA_INT(psVar6) - GHIDRA_INT(linesBegin)) / 0x18); local_64 = ppppppuVar11; if (ppppppuVar11 != (undefined4 ******)0x0) { psVar6 = linesBegin; @@ -273,17 +273,17 @@ LAB_008cd921: local_8c = 0xffffffff; local_88 = 0; local_84 = 0; - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; psVar7 = psVar6; if (0xf < psVar6->_capacity) { psVar7 = *(std_string **)psVar6->_buf; } Font::DrawStringScaled (&g_manager->_font3_TeamMeatEx16,(byte *)psVar7,&textPos,&local_50,&drawParams); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; psVar6 = psVar6 + 1; textPos.y = (float)(ushort)(g_manager->_font3_TeamMeatEx16)._base + textY; - ppppppuVar11 = (undefined4 ******)((int)ppppppuVar11 + -1); + ppppppuVar11 = (undefined4 ******)(GHIDRA_INT(ppppppuVar11) + -1); textY = textPos.y; } while (ppppppuVar11 != (undefined4 ******)0x0); psVar6 = linesEnd; @@ -299,7 +299,7 @@ LAB_008cd921: if (0xfff < size) { ptr = *(void **)((char *)pvVar4 + -4); size = uVar9 + 0x24; - if (0x1f < (uint)((int)pvVar4 + (-4 - (int)ptr))) goto LAB_008cddb4; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar4) + (-4 - GHIDRA_INT(ptr))))) goto LAB_008cddb4; } operator_delete(ptr,size); } @@ -307,28 +307,28 @@ LAB_008cd921: psVar7->_capacity = 0xf; psVar7->_buf[0] = 0; } - uVar9 = (((int)linesCapacity - (int)linesBegin) / 0x18) * 0x18; + uVar9 = ((GHIDRA_INT(linesCapacity) - GHIDRA_INT(linesBegin)) / 0x18) * 0x18; psVar6 = linesBegin; if (0xfff < uVar9) { psVar6 = (std_string *)linesBegin[-1]._capacity; uVar9 = uVar9 + 0x23; - if ((byte *)0x1f < (byte *)((int)linesBegin + (-4 - (int)psVar6))) goto LAB_008cddb4; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(linesBegin) + (-4 - GHIDRA_INT(psVar6)))) goto LAB_008cddb4; } operator_delete(psVar6,uVar9); } if (&DAT_0000000f < seedTextCapacity) { - ppppppuVar10 = (undefined4 ******)((int)seedTextCapacity + 1); + ppppppuVar10 = (undefined4 ******)(GHIDRA_INT(seedTextCapacity) + 1); ppppppuVar11 = seedText[0]; if ((undefined4 ******)0xfff < ppppppuVar10) { ppppppuVar11 = (undefined4 ******)seedText[0][-1]; ppppppuVar10 = seedTextCapacity + 9; - if ((undefined1 *)0x1f < (undefined1 *)((int)seedText[0] + (-4 - (int)ppppppuVar11))) { + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(seedText[0]) + (-4 - GHIDRA_INT(ppppppuVar11)))) { LAB_008cddb4: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(ppppppuVar11,(uint)ppppppuVar10); + operator_delete(ppppppuVar11,GHIDRA_UINT(ppppppuVar10)); } } LAB_008cddc4: @@ -352,7 +352,7 @@ void Menu_Challenge::destructor() if (*(int **)(in_ECX + 300) != (int *)0x0) { isLastImageRef = (**(code **)(**(int **)(in_ECX + 300) + 0xc)) - (__security_cookie ^ (int)register0x00000010 - 4U); + (__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); if ((isLastImageRef != '\0') && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(in_ECX + 0x128); } @@ -421,7 +421,7 @@ void Menu_Challenge::Update() local_8 = (void *)0xffffffff; puStack_c = &LAB_00af32ed; local_10 = ExceptionList; - stackCookie = __security_cookie ^ (uint)(seedText + 10); + stackCookie = __security_cookie ^ GHIDRA_UINT((seedText + 10)); ExceptionList = &local_10; if (((g_manager->_framecount & 1) == 0) && (*(char *)((char *)in_ECX + 0x11d) != '\0')) { ((AnimationState *)((AnimationState *)(in_ECX + 0x11)))->AnimationState::Update(); @@ -461,7 +461,7 @@ void Menu_Challenge::Update() do { uVar1 = iVar5 + 1; in_ECX[1] = uVar1; - if ((int)uVar1 < 0x2e) { + if (GHIDRA_INT(uVar1) < 0x2e) { if (uVar1 < 0x2e) { iVar5 = *(int *)(&DAT_00b7b0b0 + uVar1 * 4); } @@ -488,7 +488,7 @@ void Menu_Challenge::Update() do { uVar1 = iVar5 - 1; in_ECX[1] = uVar1; - if ((int)uVar1 < 1) { + if (GHIDRA_INT(uVar1) < 1) { in_ECX[1] = 0x2d; iVar5 = 0x204; } @@ -506,10 +506,10 @@ void Menu_Challenge::Update() } } else { - uVar1 = (int)(g_menuManager->_menuStateHistory)._end - - (int)(g_menuManager->_menuStateHistory)._begin >> 2; + uVar1 = GHIDRA_INT((g_menuManager->_menuStateHistory)._end) - + GHIDRA_INT((g_menuManager->_menuStateHistory)._begin) >> 2; if ((uVar1 < 2) || - (*(int *)((int)(g_menuManager->_menuStateHistory)._begin + uVar1 * 4 + -8) != 0x15)) { + (*(int *)(GHIDRA_INT((g_menuManager->_menuStateHistory)._begin) + uVar1 * 4 + -8) != 0x15)) { ((KColor *)((KColor *)(acStack_4a + -0x2a)))->KColor::SetFromARGB(0xff000000); fadeColor._green = (float)in_stack_ffffff90; fadeColor._red = (float)in_stack_ffffff8c; @@ -551,35 +551,35 @@ void Menu_Challenge::Update() uVar1 = in_ECX[1]; challengeParams = (g_manager->_challengeParams)._begin; seedTextCapacity = 0xf; - uVar2 = ((int)(g_manager->_challengeParams)._end - (int)challengeParams) / 0xa4 - 1; + uVar2 = (GHIDRA_INT((g_manager->_challengeParams)._end) - GHIDRA_INT(challengeParams)) / 0xa4 - 1; seedTextSize = 0; seedText[0] = (void *)0x0; - challengeIdx = -(uint)(uVar1 != 0) & uVar1; + challengeIdx = -GHIDRA_UINT((uVar1 != 0)) & uVar1; if (uVar2 <= challengeIdx) { challengeIdx = uVar2; } - iVar5 = *(int *)(challengeIdx * 0xa4 + 0x44 + (int)challengeParams); + iVar5 = *(int *)(challengeIdx * 0xa4 + 0x44 + GHIDRA_INT(challengeParams)); local_8 = (void *)0x0; uVar3 = 0x945f3b; ((std::string *)(acStack_4a + -0x1a))->std::string::string(seedText); uVar4 = 0x945f46; seed._buf[4] = (char)in_stack_ffffffa0; - seed._buf[5] = (char)((uint)in_stack_ffffffa0 >> 8); - seed._buf[6] = (char)((uint)in_stack_ffffffa0 >> 0x10); - seed._buf[7] = (char)((uint)in_stack_ffffffa0 >> 0x18); + seed._buf[5] = (char)(GHIDRA_UINT(in_stack_ffffffa0) >> 8); + seed._buf[6] = (char)(GHIDRA_UINT(in_stack_ffffffa0) >> 0x10); + seed._buf[7] = (char)(GHIDRA_UINT(in_stack_ffffffa0) >> 0x18); seed._buf[0] = (char)in_stack_ffffff9c; - seed._buf[1] = (char)((uint)in_stack_ffffff9c >> 8); - seed._buf[2] = (char)((uint)in_stack_ffffff9c >> 0x10); - seed._buf[3] = (char)((uint)in_stack_ffffff9c >> 0x18); + seed._buf[1] = (char)(GHIDRA_UINT(in_stack_ffffff9c) >> 8); + seed._buf[2] = (char)(GHIDRA_UINT(in_stack_ffffff9c) >> 0x10); + seed._buf[3] = (char)(GHIDRA_UINT(in_stack_ffffff9c) >> 0x18); seed._buf[8] = (char)in_stack_ffffffa4; - seed._buf[9] = (char)((uint)in_stack_ffffffa4 >> 8); - seed._buf[10] = (char)((uint)in_stack_ffffffa4 >> 0x10); - seed._buf[0xb] = (char)((uint)in_stack_ffffffa4 >> 0x18); + seed._buf[9] = (char)(GHIDRA_UINT(in_stack_ffffffa4) >> 8); + seed._buf[10] = (char)(GHIDRA_UINT(in_stack_ffffffa4) >> 0x10); + seed._buf[0xb] = (char)(GHIDRA_UINT(in_stack_ffffffa4) >> 0x18); seed._buf[0xc] = (char)in_stack_ffffffa8; - seed._buf[0xd] = (char)((uint)in_stack_ffffffa8 >> 8); - seed._buf[0xe] = (char)((uint)in_stack_ffffffa8 >> 0x10); - seed._buf[0xf] = (char)((uint)in_stack_ffffffa8 >> 0x18); - seed._size = (uint)in_stack_ffffffac; + seed._buf[0xd] = (char)(GHIDRA_UINT(in_stack_ffffffa8) >> 8); + seed._buf[0xe] = (char)(GHIDRA_UINT(in_stack_ffffffa8) >> 0x10); + seed._buf[0xf] = (char)(GHIDRA_UINT(in_stack_ffffffa8) >> 0x18); + seed._size = GHIDRA_UINT(in_stack_ffffffac); seed._capacity = in_stack_ffffffb0; ((Seeds *)(&menuManager->_seedsObject))->Seeds::SetStartSeed(seed); local_8 = (void *)0xffffffff; @@ -587,9 +587,9 @@ void Menu_Challenge::Update() uVar2 = seedTextCapacity + 1; in_stack_ffffffac = seedText[0]; if (0xfff < uVar2) { - in_stack_ffffffac = *(void **)((int)seedText[0] + -4); + in_stack_ffffffac = *(void **)(GHIDRA_INT(seedText[0]) + -4); uVar2 = seedTextCapacity + 0x24; - if (0x1f < (uint)((int)seedText[0] + (-4 - (int)in_stack_ffffffac))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(seedText[0]) + (-4 - GHIDRA_INT(in_stack_ffffffac))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -599,22 +599,22 @@ void Menu_Challenge::Update() } seeds = &g_menuManager->_seedsObject; seeds->_isCustomRun = 1; - difficulty = *(int *)(challengeIdx * 0xa4 + 0x70 + (int)challengeParams); + difficulty = *(int *)(challengeIdx * 0xa4 + 0x70 + GHIDRA_INT(challengeParams)); ((Seeds *)(aSStackY_2f08 + 0x81))->Seeds::construct_from_copy(seeds); unk._stageSeeds[6] = in_stack_ffffff84; unk._isCustomRun = in_stack_ffffff54[0]; - unk._1_3_ = in_stack_ffffff54._1_3_; - unk._gameStartSeed = in_stack_ffffff54._4_4_; - unk._rng._seed = in_stack_ffffff54._8_4_; - unk._rng._shift1 = in_stack_ffffff54._12_4_; - unk._rng._shift2 = in_stack_ffffff54._16_4_; - unk._rng._shift3 = in_stack_ffffff54._20_4_; - unk._stageSeeds[0] = in_stack_ffffff54._24_4_; - unk._stageSeeds[1] = in_stack_ffffff54._28_4_; - unk._stageSeeds[2] = in_stack_ffffff54._32_4_; - unk._stageSeeds[3] = in_stack_ffffff54._36_4_; - unk._stageSeeds[4] = in_stack_ffffff54._40_4_; - unk._stageSeeds[5] = in_stack_ffffff54._44_4_; + (*(undefined1 *)((char *)&(unk) + 0x1)) = (*(undefined1 *)((char *)&(in_stack_ffffff54) + 0x1)); + unk._gameStartSeed = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0x4)); + unk._rng._seed = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0x8)); + unk._rng._shift1 = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0xc)); + unk._rng._shift2 = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0x10)); + unk._rng._shift3 = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0x14)); + unk._stageSeeds[0] = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0x18)); + unk._stageSeeds[1] = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0x1c)); + unk._stageSeeds[2] = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0x20)); + unk._stageSeeds[3] = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0x24)); + unk._stageSeeds[4] = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0x28)); + unk._stageSeeds[5] = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0x2c)); unk._stageSeeds[7] = in_stack_ffffff88; unk._stageSeeds[8] = in_stack_ffffff8c; unk._stageSeeds[9] = in_stack_ffffff90; @@ -624,7 +624,7 @@ void Menu_Challenge::Update() unk._stageSeeds[0xd] = in_stack_ffffffa0; unk._playerInitSeed = in_stack_ffffffa4; unk._seedEffects = (void *)in_stack_ffffffa8; - unk._seedEffectsCount = (int)in_stack_ffffffac; + unk._seedEffectsCount = GHIDRA_INT(in_stack_ffffffac); this->Manager::StartNewGame(iVar5,uVar1,unk,difficulty); } ExceptionList = local_10; @@ -652,13 +652,13 @@ void Menu_Challenge::Render() byte isChallengeDone; byte isLayerVisible; - uVar2 = (int)(g_menuManager->_menuStateHistory)._end - - (int)(g_menuManager->_menuStateHistory)._begin >> 2; + uVar2 = GHIDRA_INT((g_menuManager->_menuStateHistory)._end) - + GHIDRA_INT((g_menuManager->_menuStateHistory)._begin) >> 2; if (uVar2 < 2) { prevMenuState = 0; } else { - prevMenuState = *(int *)((int)(g_menuManager->_menuStateHistory)._begin + uVar2 * 4 + -8); + prevMenuState = *(int *)(GHIDRA_INT((g_menuManager->_menuStateHistory)._begin) + uVar2 * 4 + -8); } if ((g_menuControllerIndex != 0) || (isLayerVisible = 1, prevMenuState == 0x15)) { isLayerVisible = 0; @@ -701,7 +701,7 @@ void Menu_Challenge::Render() isLayerVisible = 0; } else { - if ((int)uVar2 < 0) goto LAB_00946450; + if (GHIDRA_INT(uVar2) < 0) goto LAB_00946450; if (uVar2 < 0x282) { if (((uVar2 == 0) || ((g_manager->_persistentGameData)._achievements[uVar2] != 0)) || (((g_manager->_state == 2 && (g_game != (Game *)0x0)) && @@ -719,59 +719,59 @@ LAB_00946450: isLayerVisible = 1; } if ((this->ChallengeMenuSprite)._animState._animData != (void *)0x0) { - if ((0xe < *(int *)((int)(this->ChallengeMenuSprite)._animState._animation + 0x80)) || + if ((0xe < *(int *)(GHIDRA_INT((this->ChallengeMenuSprite)._animState._animation) + 0x80)) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 0xe < *(int *)((int)(this->ChallengeMenuSprite)._animState._animation + 0x80))) { + 0xe < *(int *)(GHIDRA_INT((this->ChallengeMenuSprite)._animState._animation) + 0x80))) { pvVar1 = (this->ChallengeMenuSprite)._animState._animData; local_24.y = *(float *)((char *)pvVar1 + 0x70); if ((pvVar1 == (void *)0x0) || - (((int)local_24.y < 0 || (*(int *)((char *)pvVar1 + 0x1c) <= (int)local_24.y)))) { + ((GHIDRA_INT(local_24.y) < 0 || (*(int *)((char *)pvVar1 + 0x1c) <= GHIDRA_INT(local_24.y))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } *(undefined4 *) - ((int)(this->ChallengeMenuSprite)._animState._layerFrames + (int)local_24.y * 4) = 0; + (GHIDRA_INT((this->ChallengeMenuSprite)._animState._layerFrames) + GHIDRA_INT(local_24.y) * 4) = 0; AnimationState::AdvanceLayerPosition - (&(this->ChallengeMenuSprite)._animState,(int)local_24.y, - (float)(int)(challengeIndex - 1)); + (&(this->ChallengeMenuSprite)._animState,GHIDRA_INT(local_24.y), + (float)GHIDRA_INT((challengeIndex - 1))); } if ((this->ChallengeMenuSprite)._animState._animData != (void *)0x0) { - if ((0xf < *(int *)((int)(this->ChallengeMenuSprite)._animState._animation + 0x80)) || + if ((0xf < *(int *)(GHIDRA_INT((this->ChallengeMenuSprite)._animState._animation) + 0x80)) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 0xf < *(int *)((int)(this->ChallengeMenuSprite)._animState._animation + 0x80))) { + 0xf < *(int *)(GHIDRA_INT((this->ChallengeMenuSprite)._animState._animation) + 0x80))) { pvVar1 = (this->ChallengeMenuSprite)._animState._animData; local_24.y = *(float *)((char *)pvVar1 + 0x74); if ((pvVar1 == (void *)0x0) || - (((int)local_24.y < 0 || (*(int *)((char *)pvVar1 + 0x1c) <= (int)local_24.y)))) { + ((GHIDRA_INT(local_24.y) < 0 || (*(int *)((char *)pvVar1 + 0x1c) <= GHIDRA_INT(local_24.y))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } *(undefined4 *) - ((int)(this->ChallengeMenuSprite)._animState._layerFrames + (int)local_24.y * 4) = 0; + (GHIDRA_INT((this->ChallengeMenuSprite)._animState._layerFrames) + GHIDRA_INT(local_24.y) * 4) = 0; AnimationState::AdvanceLayerPosition - (&(this->ChallengeMenuSprite)._animState,(int)local_24.y, - (float)(int)(challengeIndex - 1)); + (&(this->ChallengeMenuSprite)._animState,GHIDRA_INT(local_24.y), + (float)GHIDRA_INT((challengeIndex - 1))); } if (((this->ChallengeMenuSprite)._animState._animData != (void *)0x0) && - ((0xd < *(int *)((int)(this->ChallengeMenuSprite)._animState._animation + 0x80) || + ((0xd < *(int *)(GHIDRA_INT((this->ChallengeMenuSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 0xd < *(int *)((int)(this->ChallengeMenuSprite)._animState._animation + 0x80))))) { + 0xd < *(int *)(GHIDRA_INT((this->ChallengeMenuSprite)._animState._animation) + 0x80))))) { pvVar1 = (this->ChallengeMenuSprite)._animState._animData; local_24.y = *(float *)((char *)pvVar1 + 0x6c); if ((pvVar1 == (void *)0x0) || - (((int)local_24.y < 0 || (*(int *)((char *)pvVar1 + 0x1c) <= (int)local_24.y)))) { + ((GHIDRA_INT(local_24.y) < 0 || (*(int *)((char *)pvVar1 + 0x1c) <= GHIDRA_INT(local_24.y))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } *(undefined4 *) - ((int)(this->ChallengeMenuSprite)._animState._layerFrames + (int)local_24.y * 4) = 0; + (GHIDRA_INT((this->ChallengeMenuSprite)._animState._layerFrames) + GHIDRA_INT(local_24.y) * 4) = 0; AnimationState::AdvanceLayerPosition - (&(this->ChallengeMenuSprite)._animState,(int)local_24.y, - (float)(int)(challengeIndex - 1)); + (&(this->ChallengeMenuSprite)._animState,GHIDRA_INT(local_24.y), + (float)GHIDRA_INT((challengeIndex - 1))); } } } layer = ((ANM2 *)(&this->ChallengeMenuSprite))->ANM2::GetLayer(&DAT_0000000e); layer->_visible = isLayerVisible; isChallengeDone = - *(byte *)((int)(g_manager->_persistentGameData)._cutsceneCounters + (challengeIndex - 0x31) + *(byte *)(GHIDRA_INT((g_manager->_persistentGameData)._cutsceneCounters) + (challengeIndex - 0x31) ); layer = ((ANM2 *)(&this->ChallengeMenuSprite))->ANM2::GetLayer(&DAT_0000000f); isLayerVisible = isLayerVisible ^ 1; @@ -786,7 +786,7 @@ LAB_00946450: && (iVar3 = *(int *)((char *)pvVar1 + 0x70), -1 < iVar3)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar3 * 0x10 + *(int *)((char *)pvVar1 + 0x18)),&menuPos, - *(int *)((int)(this->ChallengeMenuSprite)._animState._layerFrames + iVar3 * 4), + *(int *)(GHIDRA_INT((this->ChallengeMenuSprite)._animState._layerFrames) + iVar3 * 4), &g_vectorZero,&g_vectorZero,pAVar4); } pvVar1 = (this->ChallengeMenuSprite)._overlayAnimState._animData; @@ -805,7 +805,7 @@ LAB_00946450: 0xe < pAVar4->_layerCount)) && (iVar3 = *(int *)((char *)pvVar1 + 0x70), -1 < iVar3)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar3 * 0x10 + *(int *)((char *)pvVar1 + 0x18)),&menuPos, - *(int *)((int)(this->ChallengeMenuSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((this->ChallengeMenuSprite)._overlayAnimState._layerFrames) + iVar3 * 4),&g_vectorZero,&g_vectorZero,pAVar4); } pvVar1 = (this->ChallengeMenuSprite)._animState._animData; @@ -828,7 +828,7 @@ LAB_009466e1: )) && (iVar3 = *(int *)((char *)pvVar1 + 0x74), -1 < iVar3)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar3 * 0x10 + *(int *)((char *)pvVar1 + 0x18)),&menuPos, - *(int *)((int)(this->ChallengeMenuSprite)._animState._layerFrames + iVar3 * 4 + *(int *)(GHIDRA_INT((this->ChallengeMenuSprite)._animState._layerFrames) + iVar3 * 4 ),&g_vectorZero,&g_vectorZero,pAVar4); } pvVar1 = (this->ChallengeMenuSprite)._overlayAnimState._animData; @@ -847,7 +847,7 @@ LAB_009466e1: 0xf < pAVar4->_layerCount)) && (iVar3 = *(int *)((char *)pvVar1 + 0x74), -1 < iVar3)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar3 * 0x10 + *(int *)((char *)pvVar1 + 0x18)),&menuPos, - *(int *)((int)(this->ChallengeMenuSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((this->ChallengeMenuSprite)._overlayAnimState._layerFrames) + iVar3 * 4),&g_vectorZero,&g_vectorZero,pAVar4); } pvVar1 = (this->ChallengeMenuSprite)._animState._animData; @@ -870,7 +870,7 @@ LAB_009467de: 0xd < pAVar4->_layerCount)) && (iVar3 = *(int *)((char *)pvVar1 + 0x6c), -1 < iVar3)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar3 * 0x10 + *(int *)((char *)pvVar1 + 0x18)),&menuPos, - *(int *)((int)(this->ChallengeMenuSprite)._animState._layerFrames + + *(int *)(GHIDRA_INT((this->ChallengeMenuSprite)._animState._layerFrames) + iVar3 * 4),&g_vectorZero,&g_vectorZero,pAVar4); } pvVar1 = (this->ChallengeMenuSprite)._overlayAnimState._animData; @@ -889,7 +889,7 @@ LAB_009467de: 0xd < pAVar4->_layerCount)) && (iVar3 = *(int *)((char *)pvVar1 + 0x6c), -1 < iVar3)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar3 * 0x10 + *(int *)((char *)pvVar1 + 0x18)),&menuPos, - *(int *)((int)(this->ChallengeMenuSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((this->ChallengeMenuSprite)._overlayAnimState._layerFrames) + iVar3 * 4),&g_vectorZero,&g_vectorZero,pAVar4); } pvVar1 = (this->ChallengeMenuSprite)._animState._animData; @@ -908,22 +908,22 @@ LAB_009468db: } } challengeIndex = challengeIndex + 1; - } while ((int)challengeIndex < 0x2e); + } while (GHIDRA_INT(challengeIndex) < 0x2e); challengeIndex = this->SelectedChallengeID + -1; if (((this->ChallengeMenuSprite)._animState._animData != (void *)0x0) && - ((2 < *(int *)((int)(this->ChallengeMenuSprite)._animState._animation + 0x80) || + ((2 < *(int *)(GHIDRA_INT((this->ChallengeMenuSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 2 < *(int *)((int)(this->ChallengeMenuSprite)._animState._animation + 0x80))))) { + 2 < *(int *)(GHIDRA_INT((this->ChallengeMenuSprite)._animState._animation) + 0x80))))) { pvVar1 = (this->ChallengeMenuSprite)._animState._animData; local_24.y = *(float *)((char *)pvVar1 + 0x40); if ((pvVar1 == (void *)0x0) || - (((int)local_24.y < 0 || (*(int *)((char *)pvVar1 + 0x1c) <= (int)local_24.y)))) { + ((GHIDRA_INT(local_24.y) < 0 || (*(int *)((char *)pvVar1 + 0x1c) <= GHIDRA_INT(local_24.y))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(this->ChallengeMenuSprite)._animState._layerFrames + (int)local_24.y * 4) + *(undefined4 *)(GHIDRA_INT((this->ChallengeMenuSprite)._animState._layerFrames) + GHIDRA_INT(local_24.y) * 4) = 0; AnimationState::AdvanceLayerPosition - (&(this->ChallengeMenuSprite)._animState,(int)local_24.y,(float)(int)challengeIndex); + (&(this->ChallengeMenuSprite)._animState,GHIDRA_INT(local_24.y),(float)GHIDRA_INT(challengeIndex)); } local_24.x = (g_menuManager->_ViewPosition).x + this->PositionX; local_24.y = (g_menuManager->_ViewPosition).y + this->PositionY; @@ -935,7 +935,7 @@ LAB_009468db: (iVar3 = *(int *)((char *)pvVar1 + 0x40), -1 < iVar3)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar3 * 0x10 + *(int *)((char *)pvVar1 + 0x18)),&local_24, - *(int *)((int)(this->ChallengeMenuSprite)._animState._layerFrames + iVar3 * 4), + *(int *)(GHIDRA_INT((this->ChallengeMenuSprite)._animState._layerFrames) + iVar3 * 4), &g_vectorZero,&g_vectorZero,pAVar4); } pvVar1 = (this->ChallengeMenuSprite)._overlayAnimState._animData; @@ -953,7 +953,7 @@ LAB_009468db: 2 < pAVar4->_layerCount)) && (iVar3 = *(int *)((char *)pvVar1 + 0x40), -1 < iVar3)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar3 * 0x10 + *(int *)((char *)pvVar1 + 0x18)),&local_24, - *(int *)((int)(this->ChallengeMenuSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((this->ChallengeMenuSprite)._overlayAnimState._layerFrames) + iVar3 * 4),&g_vectorZero,&g_vectorZero,pAVar4); } pvVar1 = (this->ChallengeMenuSprite)._animState._animData; @@ -1009,13 +1009,13 @@ void Menu_Challenge::reset() Manager *manager; MenuManager *menuManager; - uVar2 = (int)(g_menuManager->_menuStateHistory)._end - - (int)(g_menuManager->_menuStateHistory)._begin >> 2; + uVar2 = GHIDRA_INT((g_menuManager->_menuStateHistory)._end) - + GHIDRA_INT((g_menuManager->_menuStateHistory)._begin) >> 2; if (uVar2 < 2) { previousMenuState = 0; } else { - previousMenuState = *(int *)((int)(g_menuManager->_menuStateHistory)._begin + uVar2 * 4 + -8); + previousMenuState = *(int *)(GHIDRA_INT((g_menuManager->_menuStateHistory)._begin) + uVar2 * 4 + -8); } animData = (this->ChallengeMenuSprite)._animState._animData; if (animData != (byte *)0x0) { @@ -1029,7 +1029,7 @@ void Menu_Challenge::reset() isLess = bVar1 < *idleName; if (bVar1 != *idleName) { LAB_00946be4: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_00946be9; } if (bVar1 == 0) break; @@ -1065,7 +1065,7 @@ LAB_00946c23: do { this->SelectedChallengeID = this->SelectedChallengeID + 1; uVar2 = this->SelectedChallengeID; - if ((int)uVar2 < 0x2e) { + if (GHIDRA_INT(uVar2) < 0x2e) { if (0x2d < uVar2) { return; } @@ -1076,7 +1076,7 @@ LAB_00946c23: } uVar2 = *(uint *)(&DAT_00b7b0b0 + uVar2 * 4); } while ((uVar2 == 0xfffffffe) || - ((-1 < (int)uVar2 && + ((-1 < GHIDRA_INT(uVar2) && ((0x281 < uVar2 || (((uVar2 != 0 && ((manager->_persistentGameData)._achievements[uVar2] == 0)) && (((manager->_state != 2 || (game == (Game *)0x0)) || diff --git a/src/game/menu_character.cpp b/src/game/menu_character.cpp index 41559f9..d9ad9df 100644 --- a/src/game/menu_character.cpp +++ b/src/game/menu_character.cpp @@ -22,20 +22,20 @@ std_string * Menu_Character::ChangeCharacterPage(std_string *param_2, std_string int sourceNameSize; game = g_game; - pcStack_20 = (char *)((int)register0x00000010 + 0xfffffffc); + pcStack_20 = (char *)(GHIDRA_INT(register0x00000010) + 0xfffffffc); puStack_18 = &LAB_00afa6c5; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)((int)register0x00000010 + 0xfffffff0U); + local_24 = __security_cookie ^ GHIDRA_UINT((GHIDRA_INT(register0x00000010) + 0xfffffff0U)); ExceptionList = &local_1c; sheetPath._size = 0; sheetPath._capacity = 0xf; - sheetPath._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) = (void *)0x0; local_14 = 0; uVar3 = (this->_SeedEntrySprite)._animDefaultName._size; - if ((int)uVar3 < 0) { + if (GHIDRA_INT(uVar3) < 0) { LAB_006ba908: - suffix = (char *)((int)register0x00000010 + 0xfffffffc); - if (*(char *)((int)(this->_GreedDecoOverlaySprite)._color._offset[0] + 0xcd) != '\0') { + suffix = (char *)(GHIDRA_INT(register0x00000010) + 0xfffffffc); + if (*(char *)(GHIDRA_INT((this->_GreedDecoOverlaySprite)._color._offset[0]) + 0xcd) != '\0') { uVar3 = Level::GetStageID(); ((std::string *)(tmpString._buf))->std::string::string(game->_ventricleRazorPortals + uVar3 * 0xc4 + 0x5e4); sheetPath._buf[0] = tmpString._buf[0]; @@ -62,21 +62,21 @@ LAB_006ba908: else { fVar2 = (this->_GreedDecoOverlaySprite)._color._offset[0]; sourceNameSize = *(int *)((char *)fVar2 + 0x68); - if ((*(int *)((char *)fVar2 + 0x6c) - sourceNameSize) / 0x7c <= (int)uVar3) goto LAB_006ba908; + if ((*(int *)((char *)fVar2 + 0x6c) - sourceNameSize) / 0x7c <= GHIDRA_INT(uVar3)) goto LAB_006ba908; sourceName = (void **)(uVar3 * 0x7c + 0x2c + sourceNameSize); - suffix = (char *)((int)register0x00000010 + 0xfffffffc); + suffix = (char *)(GHIDRA_INT(register0x00000010) + 0xfffffffc); if (&sheetPath != (std_string *)sourceName) { - sourceNameSize = (int)(sourceName + 4); + sourceNameSize = GHIDRA_INT((sourceName + 4)); if (0xf < sourceName[5]) { sourceName = *sourceName; } - pcStack_20 = (char *)((int)register0x00000010 + 0xfffffffc); + pcStack_20 = (char *)(GHIDRA_INT(register0x00000010) + 0xfffffffc); ((std::string *)(sheetPath._buf))->std::string::assign((byte *)sourceName,*(uint *)sourceNameSize); suffix = pcStack_20; } } pcStack_20 = suffix; - if ((((*(char *)((int)&(this->_SeedEntrySprite)._filename._size + 3) == '\0') || + if ((((*(char *)(GHIDRA_INT(&(this->_SeedEntrySprite)._filename._size) + 3) == '\0') || (uVar3 = (this->_SeedEntrySprite)._filename._capacity, 0x19 < uVar3)) || (sourceNameSize = uVar3 * 0x40, sourceNameSize == -0xc354c0)) || (*(float *)(&DAT_00c354cc + sourceNameSize) <= 0.0)) { @@ -91,32 +91,32 @@ LAB_006ba908: if (!isChampion) { suffix = (char *)&s_empty; } - tmpString._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (void *)0x0; suffixCursor = (byte *)suffix; do { bVar1 = *suffixCursor; suffixCursor = suffixCursor + 1; } while (bVar1 != 0); - ((std::string *)(tmpString._buf))->std::string::assign((byte *)suffix,(int)suffixCursor - (int)(suffix + 1)); - local_14 = CONCAT31(local_14._1_3_,1); + ((std::string *)(tmpString._buf))->std::string::assign((byte *)suffix,GHIDRA_INT(suffixCursor) - GHIDRA_INT((suffix + 1))); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); anm2_resolve_spritesheet_path(param_2,param_3,&sheetPath,&tmpString,(byte *)0x0); if (0xf < tmpString._capacity) { uVar3 = tmpString._capacity + 1; - freeBlock = (void *)tmpString._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)tmpString._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(void **)(tmpString._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar3 = tmpString._capacity + 0x24; - if (0x1f < (uint)(tmpString._buf._0_4_ + (-4 - (int)freeBlock))) goto LAB_006baa37; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_006baa37; } operator_delete(freeBlock,uVar3); } if (0xf < sheetPath._capacity) { uVar3 = sheetPath._capacity + 1; - freeBlock = (void *)sheetPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)sheetPath._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(void **)(sheetPath._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) + -4); uVar3 = sheetPath._capacity + 0x24; - if (0x1f < (uint)(sheetPath._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { LAB_006baa37: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -144,25 +144,25 @@ Menu_Character * Menu_Character::constructor() ((ANM2 *)(&this->_BigCharPageSprite))->ANM2::constructor(); local_8 = 0; ((ANM2 *)(&this->_DifficultyOverlaySprite))->ANM2::constructor(); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((ANM2 *)(&this->_GreedDecoOverlaySprite))->ANM2::constructor(); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; ((ANM2 *)(&this->_CharacterMenuBGSprite))->ANM2::constructor(); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x494))))->ANM2::constructor(); - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; ((ANM2 *)(&this->_DifficultyPageSprite))->ANM2::constructor(); - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; ((ANM2 *)(&this->_SeedPageSprite))->ANM2::constructor(); - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; ((ANM2 *)(&this->_WinStreakPageSprite))->ANM2::constructor(); - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; ((ANM2 *)(&this->_EastereggPageSprite))->ANM2::constructor(); - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; (this->_eastereggPagePosition).y = 0.0; (this->_eastereggPagePosition).x = 0.0; ((ANM2 *)(&this->_SeedUnlockPageSprite))->ANM2::constructor(); - local_8._0_1_ = 9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; ((ANM2 *)(&this->_CharacterPortraitsSprite))->ANM2::constructor(); (this->_portraitPositions)._begin = (void *)0x0; (this->_portraitPositions)._end = (void *)0x0; @@ -170,7 +170,7 @@ Menu_Character * Menu_Character::constructor() (this->_portraitScales)._begin = (void *)0x0; (this->_portraitScales)._end = (void *)0x0; (this->_portraitScales)._capacity = (void *)0x0; - local_8._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc; ((ANM2 *)(&this->_SeedEntrySprite))->ANM2::constructor(); (this->_seedText)._buf[0] = '\0'; (this->_seedText)._buf[1] = '\0'; @@ -187,9 +187,9 @@ Menu_Character * Menu_Character::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xdac)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xdb0)) = 0xf; (*(undefined1 *)((char *)(this) + 0xd9c)) = 0; - local_8._0_1_ = 0x10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x10; ((ANM2 *)(&this->_PageSwapWidgetSprite))->ANM2::constructor(); - local_8 = CONCAT31(local_8._1_3_,0x11); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x11); ((ANM2 *)(&this->_TaintedMenuBGDecoSprite))->ANM2::constructor(); this[1].Status = 0; *(undefined4 *)&(*(undefined1 *)((char *)&(this[1]) + 0x4)) = 0; @@ -211,7 +211,7 @@ void Menu_Character::destructor() local_8 = 0; if (*(int **)&(*(undefined1 *)((char *)&(this[1]) + 0x4)) != (int *)0x0) { isLastRef = (**(code **)(**(int **)&(*(undefined1 *)((char *)&(this[1]) + 0x4)) + 0xc)) - (__security_cookie ^ (int)register0x00000010 - 4U); + (__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); if ((isLastRef != '\0') && (g_renderTargetReleaseFn != (void *)0x0)) { (*g_renderTargetReleaseFn)(this + 1); } @@ -337,7 +337,7 @@ void Menu_Character::LoadGraphics() local_14 = 0xffffffff; puStack_18 = &LAB_00b0b7c5; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(auStackY_f8 + 0xe8); + local_24 = __security_cookie ^ GHIDRA_UINT((auStackY_f8 + 0xe8)); ExceptionList = &local_1c; sprite = &this->_CharacterMenuBGSprite; anmPath._size = 0; @@ -346,23 +346,23 @@ void Menu_Character::LoadGraphics() anmPath._buf[1] = '\0'; anmPath._buf[2] = '\0'; anmPath._buf[3] = '\0'; - anmPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = std::_Allocate(0x30); anmPath._size = 0x25; anmPath._capacity = 0x2f; - builtin_strncpy(((std_string *)anmPath._buf._0_4_)->_buf,"gfx/ui/main menu",0x10); - ((std_string *)anmPath._buf._0_4_)->_size = 0x6168432f; - ((std_string *)anmPath._buf._0_4_)->_capacity = 0x74636172; - builtin_strncpy(((std_string *)(anmPath._buf._0_4_ + 0x18))->_buf,"erMenuBG.anm2",0xe); + builtin_strncpy(((*(undefined4 *)((char *)&((std_string *)anmPath._buf) + 0x0)))->_buf,"gfx/ui/main menu",0x10); + ((*(undefined4 *)((char *)&((std_string *)anmPath._buf) + 0x0)))->_size = 0x6168432f; + ((*(undefined4 *)((char *)&((std_string *)anmPath._buf) + 0x0)))->_capacity = 0x74636172; + builtin_strncpy(((std_string *)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + 0x18))->_buf,"erMenuBG.anm2",0xe); local_14 = 0; ((ANM2 *)(sprite))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; - psVar2 = (std_string *)anmPath._buf._0_4_; + psVar2 = (*(undefined4 *)((char *)&((std_string *)anmPath._buf) + 0x0)); if (0xfff < uVar3) { - psVar2 = (std_string *)((std_string *)(anmPath._buf._0_4_ + -0x18))->_capacity; + psVar2 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + -0x18))->_capacity; uVar3 = anmPath._capacity + 0x24; - if ((byte *)0x1f < (byte *)(anmPath._buf._0_4_ + (-4 - (int)psVar2))) { + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -378,25 +378,25 @@ void Menu_Character::LoadGraphics() if (layer->_layerData == (void *)0x0) { anmPath._capacity = 0xf; anmPath._size = 0; - anmPath._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = (std_string *)0x0; } else { - ((std::string *)(anmPath._buf))->std::string::string((void *)((int)layer->_layerData + 0x20)); + ((std::string *)(anmPath._buf))->std::string::string((void *)(GHIDRA_INT(layer->_layerData) + 0x20)); } local_14 = 1; psVar2 = &anmPath; if (0xf < anmPath._capacity) { - psVar2 = (std_string *)anmPath._buf._0_4_; + psVar2 = (*(undefined4 *)((char *)&((std_string *)anmPath._buf) + 0x0)); } TextureCache::Release((byte *)psVar2); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; - psVar2 = (std_string *)anmPath._buf._0_4_; + psVar2 = (*(undefined4 *)((char *)&((std_string *)anmPath._buf) + 0x0)); if (0xfff < uVar3) { - psVar2 = (std_string *)((std_string *)(anmPath._buf._0_4_ + -0x18))->_capacity; + psVar2 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + -0x18))->_capacity; uVar3 = anmPath._capacity + 0x24; - if ((byte *)0x1f < (byte *)(anmPath._buf._0_4_ + (-4 - (int)psVar2))) { + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -423,7 +423,7 @@ LAB_009483f9: bVar5 = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_009483e6: - uVar3 = -(uint)bVar5 | 1; + uVar3 = -GHIDRA_UINT(bVar5) | 1; goto LAB_009483eb; } if (bVar1 == 0) break; @@ -445,20 +445,20 @@ LAB_009483eb: anmPath._buf[1] = '\0'; anmPath._buf[2] = '\0'; anmPath._buf[3] = '\0'; - anmPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = std::_Allocate(0x30); anmPath._size = 0x24; anmPath._capacity = 0x2f; - builtin_strncpy((char *)anmPath._buf._0_4_,"gfx/ui/main menu/PageSwapWidget.anm2",0x25); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)),"gfx/ui/main menu/PageSwapWidget.anm2",0x25); local_14 = 2; ((ANM2 *)(&this->_PageSwapWidgetSprite))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; - pcVar7 = (char *)anmPath._buf._0_4_; + pcVar7 = (*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar7 = *(char **)(anmPath._buf._0_4_ + -4); + pcVar7 = *(char **)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + -4); uVar3 = anmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(anmPath._buf._0_4_ + (-4 - (int)pcVar7))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar7)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -485,7 +485,7 @@ LAB_00948513: bVar5 = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_00948500: - uVar3 = -(uint)bVar5 | 1; + uVar3 = -GHIDRA_UINT(bVar5) | 1; goto LAB_00948505; } if (bVar1 == 0) break; @@ -507,20 +507,20 @@ LAB_00948505: anmPath._buf[1] = '\0'; anmPath._buf[2] = '\0'; anmPath._buf[3] = '\0'; - anmPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = std::_Allocate(0x30); anmPath._size = 0x2a; anmPath._capacity = 0x2f; - builtin_strncpy((char *)anmPath._buf._0_4_,"gfx/ui/main menu/CharacterMenuBGExtra.anm2",0x2b); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)),"gfx/ui/main menu/CharacterMenuBGExtra.anm2",0x2b); local_14 = 3; ((ANM2 *)(&this->_TaintedMenuBGDecoSprite))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; - pcVar7 = (char *)anmPath._buf._0_4_; + pcVar7 = (*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar7 = *(char **)(anmPath._buf._0_4_ + -4); + pcVar7 = *(char **)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + -4); uVar3 = anmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(anmPath._buf._0_4_ + (-4 - (int)pcVar7))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar7)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -530,7 +530,7 @@ LAB_00948505: expectedName = (this->_TaintedMenuBGDecoSprite)._animState._animData; anmPath._size = 0; anmPath._capacity = 0xf; - anmPath._buf._0_4_ = anmPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) & 0xffffff00; if (expectedName == (byte *)0x0) { LAB_00948653: bVar1 = ((ANM2 *)(&this->_TaintedMenuBGDecoSprite))->ANM2::SetAnimation(s_Idle,1); @@ -550,7 +550,7 @@ LAB_00948653: bVar5 = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_00948640: - uVar3 = -(uint)bVar5 | 1; + uVar3 = -GHIDRA_UINT(bVar5) | 1; goto LAB_00948645; } if (bVar1 == 0) break; @@ -580,35 +580,35 @@ LAB_00948645: if ((this->_TaintedMenuBGDecoSprite)._animState._animData != (void *)0x0) { AnimationState::AdvancePosition (&(this->_TaintedMenuBGDecoSprite)._animState, - *(int *)((int)(this->_TaintedMenuBGDecoSprite)._animState._animData + 0x30) + -1); + *(int *)(GHIDRA_INT((this->_TaintedMenuBGDecoSprite)._animState._animData) + 0x30) + -1); } anmPath._size = 0; anmPath._capacity = 0xf; - anmPath._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = (void *)0x0; expectedName = (&PTR_s_gfx_ui_main_menu_CharacterMenu_a_00b24120)[this->_characterMenuShown * 3]; nameCursor = expectedName; do { bVar1 = *nameCursor; nameCursor = nameCursor + 1; } while (bVar1 != 0); - ((std::string *)(anmPath._buf))->std::string::assign(expectedName,(int)nameCursor - (int)(expectedName + 1)); + ((std::string *)(anmPath._buf))->std::string::assign(expectedName,GHIDRA_INT(nameCursor) - GHIDRA_INT((expectedName + 1))); local_14 = 4; ((ANM2 *)(&this->_BigCharPageSprite))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; - pvVar6 = (void *)anmPath._buf._0_4_; + pvVar6 = (*(undefined4 *)((char *)&((void *)anmPath._buf) + 0x0)); if (0xfff < uVar3) { - pvVar6 = *(void **)(anmPath._buf._0_4_ + -4); + pvVar6 = *(void **)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + -4); uVar3 = anmPath._capacity + 0x24; - if (0x1f < (uint)(anmPath._buf._0_4_ + (-4 - (int)pvVar6))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar6,uVar3); } - if ((uint)this->SelectedCharacterID < 0x12) { + if (GHIDRA_UINT(this->SelectedCharacterID) < 0x12) { ((ANM2 *)(&this->_BigCharPageSprite))->ANM2::Play((&PTR_s_00_Random_00b24140) [(this->SelectedCharacterID + this->_characterMenuShown * 0x12) * 6],0); } @@ -616,24 +616,24 @@ LAB_00948645: sprite = &this->_DifficultyOverlaySprite; anmPath._size = 0; anmPath._capacity = 0xf; - anmPath._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = (void *)0x0; expectedName = (&PTR_s_gfx_ui_main_menu_CharacterMenu_a_00b24120)[this->_characterMenuShown * 3]; nameCursor = expectedName; do { bVar1 = *nameCursor; nameCursor = nameCursor + 1; } while (bVar1 != 0); - ((std::string *)(anmPath._buf))->std::string::assign(expectedName,(int)nameCursor - (int)(expectedName + 1)); + ((std::string *)(anmPath._buf))->std::string::assign(expectedName,GHIDRA_INT(nameCursor) - GHIDRA_INT((expectedName + 1))); local_14 = 5; ((ANM2 *)(sprite))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; - pvVar6 = (void *)anmPath._buf._0_4_; + pvVar6 = (*(undefined4 *)((char *)&((void *)anmPath._buf) + 0x0)); if (0xfff < uVar3) { - pvVar6 = *(void **)(anmPath._buf._0_4_ + -4); + pvVar6 = *(void **)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + -4); uVar3 = anmPath._capacity + 0x24; - if (0x1f < (uint)(anmPath._buf._0_4_ + (-4 - (int)pvVar6))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -660,7 +660,7 @@ LAB_00948883: bVar5 = bVar1 < (byte)*pcVar7; if (bVar1 != *pcVar7) { LAB_00948870: - uVar3 = -(uint)bVar5 | 1; + uVar3 = -GHIDRA_UINT(bVar5) | 1; goto LAB_00948875; } if (bVar1 == 0) break; @@ -694,20 +694,20 @@ LAB_00948875: anmPath._buf[1] = '\0'; anmPath._buf[2] = '\0'; anmPath._buf[3] = '\0'; - anmPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = std::_Allocate(0x30); anmPath._size = 0x23; anmPath._capacity = 0x2f; - builtin_strncpy((char *)anmPath._buf._0_4_,"gfx/ui/main menu/CharacterMenu.anm2",0x24); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)),"gfx/ui/main menu/CharacterMenu.anm2",0x24); local_14 = 6; ((ANM2 *)(&this->_GreedDecoOverlaySprite))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; - pcVar7 = (char *)anmPath._buf._0_4_; + pcVar7 = (*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar7 = *(char **)(anmPath._buf._0_4_ + -4); + pcVar7 = *(char **)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + -4); uVar3 = anmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(anmPath._buf._0_4_ + (-4 - (int)pcVar7))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar7)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -734,7 +734,7 @@ LAB_00948a03: bVar5 = bVar1 < (byte)*pcVar7; if (bVar1 != *pcVar7) { LAB_009489f0: - uVar3 = -(uint)bVar5 | 1; + uVar3 = -GHIDRA_UINT(bVar5) | 1; goto LAB_009489f5; } if (bVar1 == 0) break; @@ -752,24 +752,24 @@ LAB_009489f5: } anmPath._size = 0; anmPath._capacity = 0xf; - anmPath._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = (void *)0x0; expectedName = (&PTR_s_gfx_ui_main_menu_CharacterPortra_00b24124)[this->_characterMenuShown * 3]; nameCursor = expectedName; do { bVar1 = *nameCursor; nameCursor = nameCursor + 1; } while (bVar1 != 0); - ((std::string *)(anmPath._buf))->std::string::assign(expectedName,(int)nameCursor - (int)(expectedName + 1)); + ((std::string *)(anmPath._buf))->std::string::assign(expectedName,GHIDRA_INT(nameCursor) - GHIDRA_INT((expectedName + 1))); local_14 = 7; ((ANM2 *)(&this->_CharacterPortraitsSprite))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; - pvVar6 = (void *)anmPath._buf._0_4_; + pvVar6 = (*(undefined4 *)((char *)&((void *)anmPath._buf) + 0x0)); if (0xfff < uVar3) { - pvVar6 = *(void **)(anmPath._buf._0_4_ + -4); + pvVar6 = *(void **)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + -4); uVar3 = anmPath._capacity + 0x24; - if (0x1f < (uint)(anmPath._buf._0_4_ + (-4 - (int)pvVar6))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -796,7 +796,7 @@ LAB_00948b05: bVar5 = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_00948af2: - uVar3 = -(uint)bVar5 | 1; + uVar3 = -GHIDRA_UINT(bVar5) | 1; goto LAB_00948af7; } if (bVar1 == 0) break; @@ -818,20 +818,20 @@ LAB_00948af7: anmPath._buf[1] = '\0'; anmPath._buf[2] = '\0'; anmPath._buf[3] = '\0'; - anmPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = std::_Allocate(0x20); anmPath._size = 0x1f; anmPath._capacity = 0x1f; - builtin_strncpy((char *)anmPath._buf._0_4_,"gfx/ui/main menu/SeedEntry.anm2",0x20); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)),"gfx/ui/main menu/SeedEntry.anm2",0x20); local_14 = 8; ((ANM2 *)(&this->_SeedEntrySprite))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; - pcVar7 = (char *)anmPath._buf._0_4_; + pcVar7 = (*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar7 = *(char **)(anmPath._buf._0_4_ + -4); + pcVar7 = *(char **)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + -4); uVar3 = anmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(anmPath._buf._0_4_ + (-4 - (int)pcVar7))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar7)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -850,7 +850,7 @@ LAB_00948af7: bVar5 = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_00948c20: - uVar3 = -(uint)bVar5 | 1; + uVar3 = -GHIDRA_UINT(bVar5) | 1; goto LAB_00948c25; } if (bVar1 == 0) break; @@ -878,20 +878,20 @@ LAB_00948c51: anmPath._buf[1] = '\0'; anmPath._buf[2] = '\0'; anmPath._buf[3] = '\0'; - anmPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = std::_Allocate(0x30); anmPath._size = 0x26; anmPath._capacity = 0x2f; - builtin_strncpy((char *)anmPath._buf._0_4_,"gfx/ui/main menu/DifficultyWidget.anm2",0x27); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)),"gfx/ui/main menu/DifficultyWidget.anm2",0x27); local_14 = 9; ((ANM2 *)(&this->_DifficultyPageSprite))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; - pcVar7 = (char *)anmPath._buf._0_4_; + pcVar7 = (*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar7 = *(char **)(anmPath._buf._0_4_ + -4); + pcVar7 = *(char **)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + -4); uVar3 = anmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(anmPath._buf._0_4_ + (-4 - (int)pcVar7))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar7)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -900,7 +900,7 @@ LAB_00948c51: } anmPath._size = 0; anmPath._capacity = 0xf; - anmPath._buf._0_4_ = anmPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) & 0xffffff00; if (((g_manager->_persistentGameData)._achievements[0x155] == 0) && (((g_manager->_state != 2 || (g_game == (Game *)0x0)) || (((g_game->_dailyChallenge)._id == 0 && (g_game->_isDebug == 0)))))) { @@ -916,18 +916,18 @@ LAB_00948c51: ((ANM2 *)(&this->_DifficultyPageSprite))->ANM2::Play((byte *)pcVar7,0); anmPath._size = 0; anmPath._capacity = 0xf; - anmPath._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = (void *)0x0; ((std::string *)(anmPath._buf))->std::string::assign((byte *)"gfx/ui/main menu/SeedWidget.anm2",0x20); local_14 = 10; ((ANM2 *)(&this->_SeedPageSprite))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; - pvVar6 = (void *)anmPath._buf._0_4_; + pvVar6 = (*(undefined4 *)((char *)&((void *)anmPath._buf) + 0x0)); if (0xfff < uVar3) { - pvVar6 = *(void **)(anmPath._buf._0_4_ + -4); + pvVar6 = *(void **)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + -4); uVar3 = anmPath._capacity + 0x24; - if (0x1f < (uint)(anmPath._buf._0_4_ + (-4 - (int)pvVar6))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -937,18 +937,18 @@ LAB_00948c51: ((ANM2 *)(&this->_SeedPageSprite))->ANM2::Play(s_Idle,0); anmPath._size = 0; anmPath._capacity = 0xf; - anmPath._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = (void *)0x0; ((std::string *)(anmPath._buf))->std::string::assign((byte *)"gfx/ui/main menu/WinStreakWidget.anm2",0x25); local_14 = 0xb; ((ANM2 *)(&this->_WinStreakPageSprite))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; - pvVar6 = (void *)anmPath._buf._0_4_; + pvVar6 = (*(undefined4 *)((char *)&((void *)anmPath._buf) + 0x0)); if (0xfff < uVar3) { - pvVar6 = *(void **)(anmPath._buf._0_4_ + -4); + pvVar6 = *(void **)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + -4); uVar3 = anmPath._capacity + 0x24; - if (0x1f < (uint)(anmPath._buf._0_4_ + (-4 - (int)pvVar6))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -958,18 +958,18 @@ LAB_00948c51: ((ANM2 *)(&this->_WinStreakPageSprite))->ANM2::Play(s_Idle,0); anmPath._size = 0; anmPath._capacity = 0xf; - anmPath._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = (void *)0x0; ((std::string *)(anmPath._buf))->std::string::assign((byte *)"gfx/ui/main menu/SeedSelectionWidget.anm2",0x29); local_14 = 0xc; ((ANM2 *)(&this->_EastereggPageSprite))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; - pvVar6 = (void *)anmPath._buf._0_4_; + pvVar6 = (*(undefined4 *)((char *)&((void *)anmPath._buf) + 0x0)); if (0xfff < uVar3) { - pvVar6 = *(void **)(anmPath._buf._0_4_ + -4); + pvVar6 = *(void **)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + -4); uVar3 = anmPath._capacity + 0x24; - if (0x1f < (uint)(anmPath._buf._0_4_ + (-4 - (int)pvVar6))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -979,17 +979,17 @@ LAB_00948c51: ((ANM2 *)(&this->_EastereggPageSprite))->ANM2::Play(&DAT_00b7bd88,0); seedUnlockPath._size = 0; seedUnlockPath._capacity = 0xf; - seedUnlockPath._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(seedUnlockPath._buf) + 0x0)) = (void *)0x0; ((std::string *)(seedUnlockPath._buf))->std::string::assign((byte *)"gfx/ui/main menu/SeedUnlockPaper.anm2",0x25); local_14 = 0xd; ((ANM2 *)(&this->_SeedUnlockPageSprite))->ANM2::Load(&seedUnlockPath,1); if (0xf < seedUnlockPath._capacity) { uVar3 = seedUnlockPath._capacity + 1; - pvVar6 = (void *)seedUnlockPath._buf._0_4_; + pvVar6 = (*(undefined4 *)((char *)&((void *)seedUnlockPath._buf) + 0x0)); if (0xfff < uVar3) { - pvVar6 = *(void **)(seedUnlockPath._buf._0_4_ + -4); + pvVar6 = *(void **)((*(undefined4 *)((char *)&(seedUnlockPath._buf) + 0x0)) + -4); uVar3 = seedUnlockPath._capacity + 0x24; - if (0x1f < (uint)(seedUnlockPath._buf._0_4_ + (-4 - (int)pvVar6))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(seedUnlockPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1048,7 +1048,7 @@ void Menu_Character::Reset() local_8 = (void *)0xffffffff; puStack_c = &LAB_00b0b805; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(emptyString + 0xc); + local_14 = __security_cookie ^ GHIDRA_UINT((emptyString + 0xc)); ExceptionList = &local_10; this->Status = 0; local_3c = this; @@ -1067,7 +1067,7 @@ void Menu_Character::Reset() isLess = bVar1 < (byte)*pcVar4; if (bVar1 != *pcVar4) { LAB_00949062: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_00949067; } if (bVar1 == 0) break; @@ -1098,7 +1098,7 @@ LAB_00949067: isLess = bVar1 < (byte)*pcVar4; if (bVar1 != *pcVar4) { LAB_009490c2: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_009490c7; } if (bVar1 == 0) break; @@ -1129,9 +1129,9 @@ LAB_00949100: if (this->Status == 1) { auVar6 = ZEXT812(0xc3f00000); } - auVar7._12_4_ = 0; - auVar7._0_12_ = auVar6; - g_menuManager->_viewPositionSet[5].x = auVar6._0_4_; + (*(undefined4 *)((char *)&(auVar7) + 0xc)) = 0; + (*(undefined1 *)((char *)&(auVar7) + 0x0)) = auVar6; + g_menuManager->_viewPositionSet[5].x = (*(undefined4 *)((char *)&(auVar6) + 0x0)); characterEntry = &PTR_s_00_Random_00b24140; menuManager->_state = 1; iVar5 = 0x12; @@ -1140,7 +1140,7 @@ LAB_00949100: do { if ((*(char *)(characterEntry + 2) == '\0') || (bVar1 = Menu_Character_Entry::IsCharacterAvailable - ((Menu_Character_Entry *)characterEntry,(int)pcVar4), + ((Menu_Character_Entry *)characterEntry,GHIDRA_INT(pcVar4)), pcVar4 = (char *)extraout_ECX_01, bVar1 != 0)) { this->_numCharacters = this->_numCharacters + 1; } @@ -1151,11 +1151,11 @@ LAB_00949100: DAT_00c79888 = g_modCharacters; local_38 = 5.74532e-44; modCharactersEnd = g_modCharacters; - if (0x29 < (uint)(((int)(g_manager->_entityConfig)._players._end - (int)playerConfigs->_begin) / - 0x148)) { + if (0x29 < GHIDRA_UINT(((GHIDRA_INT((g_manager->_entityConfig)._players._end) - GHIDRA_INT(playerConfigs->_begin)) / + 0x148))) { iVar5 = 0x3488; do { - playerConfig = (int *)((int)playerConfigs->_begin + iVar5); + playerConfig = (int *)(GHIDRA_INT(playerConfigs->_begin) + iVar5); if (((char)playerConfig[0x4a] == '\0') && (playerConfig[0x47] == 0)) { modCharacterId = *playerConfig; local_18 = (float)playerConfig[0x49]; @@ -1165,23 +1165,23 @@ LAB_00949100: } else { *modCharactersEnd = modCharacterId; - modCharactersEnd[1] = (int)local_18; + modCharactersEnd[1] = GHIDRA_INT(local_18); DAT_00c79888 = DAT_00c79888 + 2; modCharactersEnd = DAT_00c79888; } } - local_38 = (float)((int)local_38 + 1); + local_38 = (float)(GHIDRA_INT(local_38) + 1); playerConfigs = &(g_manager->_entityConfig)._players; iVar5 = iVar5 + 0x148; - } while ((uint)local_38 < - (uint)(((int)(g_manager->_entityConfig)._players._end - (int)playerConfigs->_begin) / - 0x148)); + } while (GHIDRA_UINT(local_38) < + GHIDRA_UINT(((GHIDRA_INT((g_manager->_entityConfig)._players._end) - GHIDRA_INT(playerConfigs->_begin)) / + 0x148))); this = local_3c; } - iVar5 = ((int)modCharactersEnd - (int)g_modCharacters >> 3) + this->_numCharacters; + iVar5 = (GHIDRA_INT(modCharactersEnd) - GHIDRA_INT(g_modCharacters) >> 3) + this->_numCharacters; this->_numCharacters = iVar5; FUN_0094e3b0(); - fVar8 = (float)auVar7._0_8_ * 0.01 + 2.0; + fVar8 = (*(undefined8 *)((char *)&((float)auVar7) + 0x0)) * 0.01 + 2.0; this->_characterWheelDepth = fVar8; local_38 = (fVar8 - 1.0) * 0.5; local_18 = local_38 + 1.0; @@ -1197,8 +1197,8 @@ LAB_00949100: this->_scrollSpeed = (360.0 / (float)iVar5) / (fVar8 * 50.0); local_3c = (Menu_Character *)0x43070000; if (local_18 != 0.0) { - if ((uint)((int)(this->_portraitPositions)._capacity - (int)portraitPositions >> 3) < - (uint)local_18) { + if (GHIDRA_UINT((GHIDRA_INT((this->_portraitPositions)._capacity) - GHIDRA_INT(portraitPositions) >> 3)) < + GHIDRA_UINT(local_18)) { std::vector::_Resize_reallocate(local_18,&defaultPortraitX); } else { @@ -1206,12 +1206,12 @@ LAB_00949100: portraitPositions[1] = 0x43070000; fillSrc = portraitPositions; fillDst = portraitPositions + 2; - for (uVar2 = (int)local_18 * 8 - 5U >> 2; uVar2 != 0; uVar2 = uVar2 - 1) { + for (uVar2 = GHIDRA_INT(local_18) * 8 - 5U >> 2; uVar2 != 0; uVar2 = uVar2 - 1) { *fillDst = *fillSrc; fillSrc = fillSrc + 1; fillDst = fillDst + 1; } - (this->_portraitPositions)._end = portraitPositions + (int)local_18 * 2; + (this->_portraitPositions)._end = portraitPositions + GHIDRA_INT(local_18) * 2; } } pvVar3 = (this->_portraitScales)._begin; @@ -1219,7 +1219,7 @@ LAB_00949100: uVar2 = this->_numCharacters; local_38 = 1.0; if (uVar2 != 0) { - if ((uint)((int)(this->_portraitScales)._capacity - (int)pvVar3 >> 2) < uVar2) { + if (GHIDRA_UINT((GHIDRA_INT((this->_portraitScales)._capacity) - GHIDRA_INT(pvVar3) >> 2)) < uVar2) { std::vector::_Resize_reallocate(uVar2,&local_38); } else { @@ -1249,17 +1249,17 @@ LAB_00949100: emptyString[0] = (void *)0x0; local_8 = (void *)0x0; ((std::string *)((char *)seedString))->std::string::string(emptyString); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; uVar2 = Seeds::String2Seed((std_string *)seedString); ((Seeds *)(&menuManager->_seedsObject))->Seeds::set_start_seed(uVar2); - local_8 = (void *)((uint)local_8._1_3_ << 8); + local_8 = (void *)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8); if (0xf < seedStringCapacity) { uVar2 = seedStringCapacity + 1; pvVar3 = seedString[0]; if (0xfff < uVar2) { - pvVar3 = *(void **)((int)seedString[0] + -4); + pvVar3 = *(void **)(GHIDRA_INT(seedString[0]) + -4); uVar2 = seedStringCapacity + 0x24; - if (0x1f < (uint)((int)seedString[0] + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(seedString[0]) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1269,14 +1269,14 @@ LAB_00949100: local_8 = (void *)0xffffffff; seedStringSize = 0; seedStringCapacity = 0xf; - seedString[0] = (void *)((uint)seedString[0] & 0xffffff00); + seedString[0] = (void *)(GHIDRA_UINT(seedString[0]) & 0xffffff00); if (0xf < emptyStringCapacity) { uVar2 = emptyStringCapacity + 1; pvVar3 = emptyString[0]; if (0xfff < uVar2) { - pvVar3 = *(void **)((int)emptyString[0] + -4); + pvVar3 = *(void **)(GHIDRA_INT(emptyString[0]) + -4); uVar2 = emptyStringCapacity + 0x24; - if (0x1f < (uint)((int)emptyString[0] + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(emptyString[0]) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1298,7 +1298,7 @@ LAB_00949100: if ((this->_TaintedMenuBGDecoSprite)._animState._animData != (void *)0x0) { AnimationState::AdvancePosition (&(this->_TaintedMenuBGDecoSprite)._animState, - *(int *)((int)(this->_TaintedMenuBGDecoSprite)._animState._animData + 0x30) + -1); + *(int *)(GHIDRA_INT((this->_TaintedMenuBGDecoSprite)._animState._animData) + 0x30) + -1); } if (((this->_PageSwapWidgetSprite)._color._tint[3] == 0.0) && (this->_characterMenuShown != 0)) { DoPageSwap(this); @@ -1347,36 +1347,36 @@ void Menu_Character::set_character_menu_shown(int characterMenuShown) local_8 = 0xffffffff; puStack_c = &LAB_00b0b84d; local_10 = ExceptionList; - stackCookie = __security_cookie ^ (uint)((int)register0x00000010 + 0xfffffffcU); + stackCookie = __security_cookie ^ GHIDRA_UINT((GHIDRA_INT(register0x00000010) + 0xfffffffcU)); ExceptionList = &local_10; this->_characterMenuShown = characterMenuShown; local_30._size = 0; local_30._capacity = 0xf; pbVar4 = (&PTR_s_gfx_ui_main_menu_CharacterMenu_a_00b24120)[characterMenuShown * 3]; - local_30._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(local_30._buf) + 0x0)) = (void *)0x0; strCursor = pbVar4; do { bVar1 = *strCursor; strCursor = strCursor + 1; } while (bVar1 != 0); - ((std::string *)(local_30._buf))->std::string::assign(pbVar4,(int)strCursor - (int)(pbVar4 + 1)); + ((std::string *)(local_30._buf))->std::string::assign(pbVar4,GHIDRA_INT(strCursor) - GHIDRA_INT((pbVar4 + 1))); local_8 = 0; ((ANM2 *)(&this->_BigCharPageSprite))->ANM2::Load(&local_30,1); local_8 = 0xffffffff; if (0xf < local_30._capacity) { uVar3 = local_30._capacity + 1; - freeBlock = (void *)local_30._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)local_30._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(void **)(local_30._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(local_30._buf) + 0x0)) + -4); uVar3 = local_30._capacity + 0x24; - if (0x1f < (uint)(local_30._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_30._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(freeBlock,uVar3); } - if ((uint)this->SelectedCharacterID < 0x12) { + if (GHIDRA_UINT(this->SelectedCharacterID) < 0x12) { ((ANM2 *)(&this->_BigCharPageSprite))->ANM2::Play((&PTR_s_00_Random_00b24140) [(this->SelectedCharacterID + this->_characterMenuShown * 0x12) * 6],0); } @@ -1393,7 +1393,7 @@ void Menu_Character::set_character_menu_shown(int characterMenuShown) isLess = bVar1 < *expectedAnim; if (bVar1 != *expectedAnim) { LAB_00949715: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094971a; } if (bVar1 == 0) break; @@ -1420,24 +1420,24 @@ LAB_0094974d: difficultyOverlaySprite = &this->_DifficultyOverlaySprite; local_30._size = 0; local_30._capacity = 0xf; - local_30._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(local_30._buf) + 0x0)) = (void *)0x0; pbVar4 = (&PTR_s_gfx_ui_main_menu_CharacterMenu_a_00b24120)[this->_characterMenuShown * 3]; strCursor = pbVar4; do { bVar1 = *strCursor; strCursor = strCursor + 1; } while (bVar1 != 0); - ((std::string *)(local_30._buf))->std::string::assign(pbVar4,(int)strCursor - (int)(pbVar4 + 1)); + ((std::string *)(local_30._buf))->std::string::assign(pbVar4,GHIDRA_INT(strCursor) - GHIDRA_INT((pbVar4 + 1))); local_8 = 1; ((ANM2 *)(difficultyOverlaySprite))->ANM2::Load(&local_30,1); local_8 = 0xffffffff; if (0xf < local_30._capacity) { uVar3 = local_30._capacity + 1; - freeBlock = (void *)local_30._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)local_30._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(void **)(local_30._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(local_30._buf) + 0x0)) + -4); uVar3 = local_30._capacity + 0x24; - if (0x1f < (uint)(local_30._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_30._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1464,7 +1464,7 @@ LAB_00949835: isLess = bVar1 < (byte)*expectedName; if (bVar1 != *expectedName) { LAB_00949822: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_00949827; } if (bVar1 == 0) break; @@ -1494,24 +1494,24 @@ LAB_00949827: } local_30._size = 0; local_30._capacity = 0xf; - local_30._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(local_30._buf) + 0x0)) = (void *)0x0; pbVar4 = (&PTR_s_gfx_ui_main_menu_CharacterPortra_00b24124)[this->_characterMenuShown * 3]; strCursor = pbVar4; do { bVar1 = *strCursor; strCursor = strCursor + 1; } while (bVar1 != 0); - ((std::string *)(local_30._buf))->std::string::assign(pbVar4,(int)strCursor - (int)(pbVar4 + 1)); + ((std::string *)(local_30._buf))->std::string::assign(pbVar4,GHIDRA_INT(strCursor) - GHIDRA_INT((pbVar4 + 1))); local_8 = 2; ((ANM2 *)(&this->_CharacterPortraitsSprite))->ANM2::Load(&local_30,1); local_8 = 0xffffffff; if (0xf < local_30._capacity) { uVar3 = local_30._capacity + 1; - freeBlock = (void *)local_30._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)local_30._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(void **)(local_30._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(local_30._buf) + 0x0)) + -4); uVar3 = local_30._capacity + 0x24; - if (0x1f < (uint)(local_30._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_30._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1521,7 +1521,7 @@ LAB_00949827: pbVar4 = (this->_CharacterPortraitsSprite)._animState._animData; local_30._size = 0; local_30._capacity = 0xf; - local_30._buf._0_4_ = local_30._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(local_30._buf) + 0x0)) = (*(undefined4 *)((char *)&(local_30._buf) + 0x0)) & 0xffffff00; if (pbVar4 != (byte *)0x0) { strCursor = pbVar4; if (0xf < *(uint *)(pbVar4 + 0x14)) { @@ -1533,7 +1533,7 @@ LAB_00949827: isLess = bVar1 < *expectedAnim; if (bVar1 != *expectedAnim) { LAB_00949990: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_00949995; } if (bVar1 == 0) break; @@ -1586,7 +1586,7 @@ LAB_009499c1: else { ((MusicManager *)(&manager->_musicManager))->MusicManager::EnableLayer(0,0); psVar2 = &local_30; - local_30._buf._0_4_ = (void *)0x3f800000; + (*(undefined4 *)((char *)&(local_30._buf) + 0x0)) = (void *)0x3f800000; local_30._buf[4] = '\n'; local_30._buf[5] = -0x29; local_30._buf[6] = -0x7d; @@ -1677,7 +1677,7 @@ void Menu_Character::Update() uint *animNameSize; Manager *manager; - local_8 = (void *)(__security_cookie ^ (uint)(animName + 7)); + local_8 = (void *)(__security_cookie ^ GHIDRA_UINT((animName + 7))); if ((g_manager->_framecount & 1) == 0) { if ((this->_BigCharPageSprite)._loaded != 0) { ((AnimationState *)(&(this->_BigCharPageSprite)._animState))->AnimationState::Update(); @@ -1799,33 +1799,33 @@ code_r0x00949d90: iVar2 = this->SelectedCharacterID; if (iVar2 < 0x12) { iVar2 = *(int *)(&DAT_00b24144 + - ((-(uint)(this->_characterMenuShown != 0) & 0x12) + iVar2) * 0x18); + ((-GHIDRA_UINT((this->_characterMenuShown != 0)) & 0x12) + iVar2) * 0x18); } else { - iVar2 = *(int *)((int)g_modCharacters + - ((-(uint)(this->_characterMenuShown != 0) & 4) - 0x90) + iVar2 * 8); + iVar2 = *(int *)(GHIDRA_INT(g_modCharacters) + + ((-GHIDRA_UINT((this->_characterMenuShown != 0)) & 4) - 0x90) + iVar2 * 8); } difficulty = this->Difficulty; ((Seeds *)(aSStackY_2ef0 + 0x81))->Seeds::construct_from_copy(&g_menuManager->_seedsObject); unk._stageSeeds[0xb] = in_stack_ffffffb0; unk._isCustomRun = in_stack_ffffff6c[0]; - unk._1_3_ = in_stack_ffffff6c._1_3_; - unk._gameStartSeed = in_stack_ffffff6c._4_4_; - unk._rng._seed = in_stack_ffffff6c._8_4_; - unk._rng._shift1 = in_stack_ffffff6c._12_4_; - unk._rng._shift2 = in_stack_ffffff6c._16_4_; - unk._rng._shift3 = in_stack_ffffff6c._20_4_; - unk._stageSeeds[0] = in_stack_ffffff6c._24_4_; - unk._stageSeeds[1] = in_stack_ffffff6c._28_4_; - unk._stageSeeds[2] = in_stack_ffffff6c._32_4_; - unk._stageSeeds[3] = in_stack_ffffff6c._36_4_; - unk._stageSeeds[4] = in_stack_ffffff6c._40_4_; - unk._stageSeeds[5] = in_stack_ffffff6c._44_4_; - unk._stageSeeds[6] = in_stack_ffffff6c._48_4_; - unk._stageSeeds[7] = in_stack_ffffff6c._52_4_; - unk._stageSeeds[8] = in_stack_ffffff6c._56_4_; - unk._stageSeeds[9] = in_stack_ffffff6c._60_4_; - unk._stageSeeds[10] = in_stack_ffffff6c._64_4_; + (*(undefined1 *)((char *)&(unk) + 0x1)) = (*(undefined1 *)((char *)&(in_stack_ffffff6c) + 0x1)); + unk._gameStartSeed = (*(undefined4 *)((char *)&(in_stack_ffffff6c) + 0x4)); + unk._rng._seed = (*(undefined4 *)((char *)&(in_stack_ffffff6c) + 0x8)); + unk._rng._shift1 = (*(undefined4 *)((char *)&(in_stack_ffffff6c) + 0xc)); + unk._rng._shift2 = (*(undefined4 *)((char *)&(in_stack_ffffff6c) + 0x10)); + unk._rng._shift3 = (*(undefined4 *)((char *)&(in_stack_ffffff6c) + 0x14)); + unk._stageSeeds[0] = (*(undefined4 *)((char *)&(in_stack_ffffff6c) + 0x18)); + unk._stageSeeds[1] = (*(undefined4 *)((char *)&(in_stack_ffffff6c) + 0x1c)); + unk._stageSeeds[2] = (*(undefined4 *)((char *)&(in_stack_ffffff6c) + 0x20)); + unk._stageSeeds[3] = (*(undefined4 *)((char *)&(in_stack_ffffff6c) + 0x24)); + unk._stageSeeds[4] = (*(undefined4 *)((char *)&(in_stack_ffffff6c) + 0x28)); + unk._stageSeeds[5] = (*(undefined4 *)((char *)&(in_stack_ffffff6c) + 0x2c)); + unk._stageSeeds[6] = (*(undefined4 *)((char *)&(in_stack_ffffff6c) + 0x30)); + unk._stageSeeds[7] = (*(undefined4 *)((char *)&(in_stack_ffffff6c) + 0x34)); + unk._stageSeeds[8] = (*(undefined4 *)((char *)&(in_stack_ffffff6c) + 0x38)); + unk._stageSeeds[9] = (*(undefined4 *)((char *)&(in_stack_ffffff6c) + 0x3c)); + unk._stageSeeds[10] = (*(undefined4 *)((char *)&(in_stack_ffffff6c) + 0x40)); unk._stageSeeds[0xc] = in_stack_ffffffb4; unk._stageSeeds[0xd] = in_stack_ffffffb8; unk._playerInitSeed = in_stack_ffffffbc; @@ -1853,9 +1853,9 @@ code_r0x00949d90: uVar3 = animNameCapacity + 1; ptr = animName[0]; if (0xfff < uVar3) { - ptr = *(void **)((int)animName[0] + -4); + ptr = *(void **)(GHIDRA_INT(animName[0]) + -4); uVar3 = animNameCapacity + 0x24; - if (0x1f < (uint)((int)animName[0] + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(animName[0]) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1890,7 +1890,7 @@ code_r0x00949d90: isLess = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_0094a0d8: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094a0dd; } if (bVar1 == 0) break; @@ -1938,7 +1938,7 @@ LAB_0094a176: isLess = bVar1 < (byte)*expectedNameText; if (bVar1 != *expectedNameText) { LAB_0094a160: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094a165; } if (bVar1 == 0) break; @@ -1980,7 +1980,7 @@ LAB_0094a21b: isLess = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_0094a205: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094a20a; } if (bVar1 == 0) break; @@ -2027,7 +2027,7 @@ LAB_0094a2d8: isLess = bVar1 < (byte)*expectedNameText; if (bVar1 != *expectedNameText) { LAB_0094a2c2: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094a2c7; } if (bVar1 == 0) break; @@ -2061,7 +2061,7 @@ LAB_0094a2c7: isLess = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_0094a3b5: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094a3ba; } if (bVar1 == 0) break; @@ -2091,7 +2091,7 @@ LAB_0094a3ba: isLess = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_0094a366: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094a36b; } if (bVar1 == 0) break; @@ -2131,7 +2131,7 @@ LAB_0094a3e6: isLess = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_0094a4a0: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094a4a5; } if (bVar1 == 0) break; @@ -2167,7 +2167,7 @@ LAB_0094a4a5: isLess = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_0094a430: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094a435; } if (bVar1 == 0) break; @@ -2277,9 +2277,9 @@ void Menu_Character::Render() pvStack_20 = local_44 + 0x20; ehState = -1; - local_1c._size = (uint)&LAB_00b0b8da; + local_1c._size = GHIDRA_UINT(&LAB_00b0b8da); local_1c._head = ExceptionList; - local_24 = __security_cookie ^ (uint)(local_44 + 0x1a); + local_24 = __security_cookie ^ GHIDRA_UINT((local_44 + 0x1a)); ExceptionList = &((Font *)textBuf)->_charsBlock; basePos.x = (g_menuManager->_ViewPosition).x + this->_PositionX; basePos.y = (g_menuManager->_ViewPosition).y + this->_PositionY; @@ -2312,7 +2312,7 @@ void Menu_Character::Render() 0 < bgAnimation->_layerCount)) && (iVar10 = *(int *)((char *)pvVar5 + 0x38), -1 < iVar10)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar10 * 0x10 + *(int *)((char *)pvVar5 + 0x18)),&basePos, - *(int *)((int)(this->_CharacterMenuBGSprite)._animState._layerFrames + iVar10 * 4 + *(int *)(GHIDRA_INT((this->_CharacterMenuBGSprite)._animState._layerFrames) + iVar10 * 4 ),&g_vectorZero,&g_vectorZero,bgAnimation); } pvVar5 = (this->_CharacterMenuBGSprite)._overlayAnimState._animData; @@ -2331,7 +2331,7 @@ void Menu_Character::Render() 0 < bgAnimation->_layerCount)) && (iVar10 = *(int *)((char *)pvVar5 + 0x38), -1 < iVar10)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar10 * 0x10 + *(int *)((char *)pvVar5 + 0x18)),&basePos, - *(int *)((int)(this->_CharacterMenuBGSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((this->_CharacterMenuBGSprite)._overlayAnimState._layerFrames) + iVar10 * 4),&g_vectorZero,&g_vectorZero,bgAnimation); } pvVar5 = (this->_CharacterMenuBGSprite)._animState._animData; @@ -2369,7 +2369,7 @@ LAB_0094a6ef: 1 < bgAnimation->_layerCount)) && (iVar10 = *(int *)((char *)pvVar5 + 0x3c), -1 < iVar10)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar10 * 0x10 + *(int *)((char *)pvVar5 + 0x18)),&basePos, - *(int *)((int)(this->_CharacterMenuBGSprite)._animState._layerFrames + iVar10 * 4 + *(int *)(GHIDRA_INT((this->_CharacterMenuBGSprite)._animState._layerFrames) + iVar10 * 4 ),&g_vectorZero,&g_vectorZero,bgAnimation); } pvVar5 = (this->_CharacterMenuBGSprite)._overlayAnimState._animData; @@ -2388,7 +2388,7 @@ LAB_0094a6ef: 1 < bgAnimation->_layerCount)) && (iVar10 = *(int *)((char *)pvVar5 + 0x3c), -1 < iVar10)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar10 * 0x10 + *(int *)((char *)pvVar5 + 0x18)),&basePos, - *(int *)((int)(this->_CharacterMenuBGSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((this->_CharacterMenuBGSprite)._overlayAnimState._layerFrames) + iVar10 * 4),&g_vectorZero,&g_vectorZero,bgAnimation); } pvVar5 = (this->_CharacterMenuBGSprite)._animState._animData; @@ -2412,7 +2412,7 @@ LAB_0094a86f: { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar10 * 0x10 + *(int *)((char *)pvVar5 + 0x18)),&basePos, - *(int *)((int)(this->_CharacterMenuBGSprite)._animState._layerFrames + + *(int *)(GHIDRA_INT((this->_CharacterMenuBGSprite)._animState._layerFrames) + iVar10 * 4),&g_vectorZero,&g_vectorZero,bgAnimation); } pvVar5 = (this->_CharacterMenuBGSprite)._overlayAnimState._animData; @@ -2433,7 +2433,7 @@ LAB_0094a86f: { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar10 * 0x10 + *(int *)((char *)pvVar5 + 0x18)),&basePos, - *(int *)((int)(this->_CharacterMenuBGSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((this->_CharacterMenuBGSprite)._overlayAnimState._layerFrames) + iVar10 * 4),&g_vectorZero,&g_vectorZero,bgAnimation); } pvVar5 = (this->_CharacterMenuBGSprite)._animState._animData; @@ -2462,7 +2462,7 @@ LAB_0094aa0a: { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar10 * 0x10 + *(int *)((char *)pvVar5 + 0x18)),&basePos, - *(int *)((int)(this->_CharacterMenuBGSprite)._animState._layerFrames + + *(int *)(GHIDRA_INT((this->_CharacterMenuBGSprite)._animState._layerFrames) + iVar10 * 4),&g_vectorZero,&g_vectorZero,bgAnimation); } pvVar5 = (this->_CharacterMenuBGSprite)._overlayAnimState._animData; @@ -2483,7 +2483,7 @@ LAB_0094aa0a: { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar10 * 0x10 + *(int *)((char *)pvVar5 + 0x18)),&basePos, - *(int *)((int)(this->_CharacterMenuBGSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((this->_CharacterMenuBGSprite)._overlayAnimState._layerFrames) + iVar10 * 4),&g_vectorZero,&g_vectorZero,bgAnimation); } pvVar5 = (this->_CharacterMenuBGSprite)._animState._animData; @@ -2503,16 +2503,16 @@ LAB_0094ab18: if ((this->_CharacterMenuBGSprite)._animState._animData == (void *)0x0) { KAGE_LogMessage(0x10,(byte *)"AnimationData is NULL\n"); } - if (*(int *)((int)(this->_CharacterMenuBGSprite)._animState._animation + 0x80) < 4) { + if (*(int *)(GHIDRA_INT((this->_CharacterMenuBGSprite)._animState._animation) + 0x80) < 4) { KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"); } pvVar5 = (this->_CharacterMenuBGSprite)._animState._animData; if (((pvVar5 != (void *)0x0) && - (2 < *(int *)((int)(this->_CharacterMenuBGSprite)._animState._animation + 0x80))) && + (2 < *(int *)(GHIDRA_INT((this->_CharacterMenuBGSprite)._animState._animation) + 0x80))) && ((iVar10 = *(int *)((char *)pvVar5 + 0x44), -1 < iVar10 && (iVar10 < *(int *)((char *)pvVar5 + 0x1c))))) { iVar7 = iVar10 * 0x10 + *(int *)((char *)pvVar5 + 0x18); - iVar10 = *(int *)((int)(this->_CharacterMenuBGSprite)._animState._layerFrames + iVar10 * 4); + iVar10 = *(int *)(GHIDRA_INT((this->_CharacterMenuBGSprite)._animState._layerFrames) + iVar10 * 4); if (((-1 < iVar10) && (iVar10 < *(int *)(iVar7 + 8))) && ((iVar10 = iVar10 * 0x6c + *(int *)(iVar7 + 4), iVar10 != 0 && (*(char *)(iVar10 + 0x2c) != '\0')))) { @@ -2538,7 +2538,7 @@ LAB_0094ab18: isLess = bVar2 < *pbVar9; if (bVar2 != *pbVar9) { LAB_0094a9f0: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094a9f5; } if (bVar2 == 0) break; @@ -2561,7 +2561,7 @@ LAB_0094a9f5: 2 < bgAnimation->_layerCount)) && (iVar10 = *(int *)((char *)pvVar5 + 0x40), -1 < iVar10)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar10 * 0x10 + *(int *)((char *)pvVar5 + 0x18)),&basePos, - *(int *)((int)(this->_CharacterMenuBGSprite)._animState._layerFrames + iVar10 * 4 + *(int *)(GHIDRA_INT((this->_CharacterMenuBGSprite)._animState._layerFrames) + iVar10 * 4 ),&g_vectorZero,&g_vectorZero,bgAnimation); } pvVar5 = (this->_CharacterMenuBGSprite)._overlayAnimState._animData; @@ -2579,7 +2579,7 @@ LAB_0094a9f5: 2 < bgAnimation->_layerCount)) && (iVar10 = *(int *)((char *)pvVar5 + 0x40), -1 < iVar10)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar10 * 0x10 + *(int *)((char *)pvVar5 + 0x18)),&basePos, - *(int *)((int)(this->_CharacterMenuBGSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((this->_CharacterMenuBGSprite)._overlayAnimState._layerFrames) + iVar10 * 4),&g_vectorZero,&g_vectorZero,bgAnimation); } pvVar5 = (this->_CharacterMenuBGSprite)._animState._animData; @@ -2713,17 +2713,17 @@ LAB_0094ad1d: if ((this->_SeedPageSprite)._animState._animData == (void *)0x0) { KAGE_LogMessage(0x10,(byte *)"AnimationData is NULL\n"); } - if (*(int *)((int)(this->_SeedPageSprite)._animState._animation + 0x80) < 3) { + if (*(int *)(GHIDRA_INT((this->_SeedPageSprite)._animState._animation) + 0x80) < 3) { KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"); } pvVar5 = (this->_SeedPageSprite)._animState._animData; pFVar11 = local_74; pFVar8 = local_70; if ((((pvVar5 != (void *)0x0) && - (1 < *(int *)((int)(this->_SeedPageSprite)._animState._animation + 0x80))) && + (1 < *(int *)(GHIDRA_INT((this->_SeedPageSprite)._animState._animation) + 0x80))) && (iVar10 = *(int *)((char *)pvVar5 + 0x40), -1 < iVar10)) && (iVar10 < *(int *)((char *)pvVar5 + 0x1c))) { - iVar7 = *(int *)((int)(this->_SeedPageSprite)._animState._layerFrames + iVar10 * 4); + iVar7 = *(int *)(GHIDRA_INT((this->_SeedPageSprite)._animState._layerFrames) + iVar10 * 4); iVar10 = iVar10 * 0x10 + *(int *)((char *)pvVar5 + 0x18); if (((-1 < iVar7) && (iVar7 < *(int *)(iVar10 + 8))) && (iVar10 = iVar7 * 0x6c + *(int *)(iVar10 + 4), iVar10 != 0)) { @@ -2830,9 +2830,9 @@ LAB_0094ad1d: textEnd = &((Font *)textBuf)->_chars; do { cVar1 = *(char *)textEnd; - textEnd = (void **)((int)textEnd + 1); + textEnd = (void **)(GHIDRA_INT(textEnd) + 1); } while (cVar1 != '\0'); - if (textEnd != (void **)((int)&((Font *)textBuf)->_chars + 1U)) { + if (textEnd != (void **)(GHIDRA_INT(&((Font *)textBuf)->_chars) + 1U)) { ((FontSettings *)(&fontSettings))->FontSettings::constructor(); ehState = 2; ((KColor *)(&local_b0))->KColor::SetFromARGB(0xff362f2d); @@ -2967,9 +2967,9 @@ LAB_0094ad1d: pFVar8 = textBuf[0]; } if (pFVar8 != (Font *)(&pFVar11->_isLoaded + textBufSize)) { - iVar10 = (int)pFVar11 - (int)pFVar8; + iVar10 = GHIDRA_INT(pFVar11) - GHIDRA_INT(pFVar8); do { - iVar7 = toupper((int)(char)pFVar8->_isLoaded); + iVar7 = toupper(GHIDRA_INT((char)pFVar8->_isLoaded)); *(byte *)((char *)pFVar8 + iVar10) = (byte)iVar7; pFVar8 = (Font *)&(*(undefined1 *)((char *)(pFVar8) + 0x1)); } while (pFVar8 != local_74); @@ -2990,7 +2990,7 @@ LAB_0094ad1d: local_c4 = 0; local_c0 = 0; fVar12 = (float)((double)iVar10 + __uint_to_double_fixup[-(iVar10 >> 0x1f)]) * 0.5; - ehState._0_1_ = 6; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 6; ((KColor *)(&local_b0))->KColor::SetFromARGB(0xff362f2d); pFVar8 = (Font *)textBuf; if (0xf < textBufCapacity) { @@ -2999,7 +2999,7 @@ LAB_0094ad1d: ((Font *)(pFVar11))->Font::DrawString(&pFVar8->_isLoaded,&local_b0,&fontSettings, g_screenWidth * fVar13 - fVar12,g_screenHeight * fVar13 - 26.0); pbVar3 = &(*(undefined1 *)((char *)(this) + 0xd9c)); - ehState._0_1_ = 5; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; if ((Font *)textBuf != (Font *)pbVar3) { if (0xf < *(uint *)&(*(undefined1 *)((char *)(this) + 0xdb0))) { pbVar3 = *(byte **)pbVar3; @@ -3020,7 +3020,7 @@ LAB_0094ad1d: local_c4 = 0; local_c0 = 0; fVar12 = (float)((double)iVar10 + __uint_to_double_fixup[-(iVar10 >> 0x1f)]) * 0.5; - ehState = CONCAT31(ehState._1_3_,7); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),7); ((KColor *)(&local_b0))->KColor::SetFromARGB(0xff362f2d); pFVar8 = (Font *)textBuf; if (0xf < textBufCapacity) { @@ -3034,7 +3034,7 @@ LAB_0094ad1d: if (0xfff < uVar4) { pFVar11 = (Font *)textBuf[0][-1]._missingCharacter; uVar4 = textBufCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)textBuf[0] + (-4 - (int)pFVar11))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(textBuf[0]) + (-4 - GHIDRA_INT(pFVar11)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -3085,7 +3085,7 @@ void Menu_Character::render_wheel(Vector *param_2, char param_3) local_14 = 0xffffffff; puStack_18 = &LAB_00b0b920; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(edenTokensText + 0x98); + local_24 = __security_cookie ^ GHIDRA_UINT((edenTokensText + 0x98)); ExceptionList = &local_1c; savedPosition = param_2; savedThis = this; @@ -3095,8 +3095,8 @@ void Menu_Character::render_wheel(Vector *param_2, char param_3) } else { ModManager::RenderCustomCharacterMenu - (*(int *)((int)g_modCharacters + - ((-(uint)(this->_characterMenuShown != 0) & 4) - 0x90) + + (*(int *)(GHIDRA_INT(g_modCharacters) + + ((-GHIDRA_UINT((this->_characterMenuShown != 0)) & 4) - 0x90) + this->SelectedCharacterID * 8),param_2,(Sprite *)&this->_BigCharPageSprite); } if (param_3 == '\0') { @@ -3206,7 +3206,7 @@ void Menu_Character::render_portraits(Vector *position, Vector *offset, Vector * void *orderList; ColorMod *portraitColor; - local_c = __security_cookie ^ (uint)&local_84; + local_c = __security_cookie ^ GHIDRA_UINT(&local_84); if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < DAT_00c94174) && (_Init_thread_header(&DAT_00c94174), DAT_00c94174 == -1)) { _atexit((_func_4879 *)&LAB_00b16750); @@ -3217,7 +3217,7 @@ void Menu_Character::render_portraits(Vector *position, Vector *offset, Vector * local_84 = g_characterPortraitOrder; orderList = g_characterPortraitOrder; if (uVar1 != 0) { - if ((uint)(DAT_00c94180 - (int)g_characterPortraitOrder >> 4) < uVar1) { + if (GHIDRA_UINT((DAT_00c94180 - GHIDRA_INT(g_characterPortraitOrder) >> 4)) < uVar1) { std::vector<16byte>::_Resize_reallocate(uVar1,&local_80); orderList = extraout_ECX; } @@ -3235,23 +3235,23 @@ void Menu_Character::render_portraits(Vector *position, Vector *offset, Vector * do { if ((*(char *)((char *)local_7c.x + 8) == '\0') || (bVar2 = Menu_Character_Entry::IsCharacterAvailable - ((Menu_Character_Entry *)local_7c.x,(int)orderList), bVar2 != 0)) { - *(float *)(iVar4 + (int)local_84) = local_74.x; + ((Menu_Character_Entry *)local_7c.x,GHIDRA_INT(orderList)), bVar2 != 0)) { + *(float *)(iVar4 + GHIDRA_INT(local_84)) = local_74.x; orderList = g_characterPortraitOrder; orderList = (this->_portraitPositions)._begin; - *(undefined4 *)(iVar4 + 4 + (int)g_characterPortraitOrder) = + *(undefined4 *)(iVar4 + 4 + GHIDRA_INT(g_characterPortraitOrder)) = *(undefined4 *)((char *)orderList + iVar6 * 8); - *(undefined4 *)(iVar4 + 8 + (int)orderList) = *(undefined4 *)((char *)orderList + iVar6 * 8 + 4); + *(undefined4 *)(iVar4 + 8 + GHIDRA_INT(orderList)) = *(undefined4 *)((char *)orderList + iVar6 * 8 + 4); iVar5 = iVar6 * 4; iVar6 = iVar6 + 1; - *(undefined4 *)(iVar4 + 0xc + (int)g_characterPortraitOrder) = - *(undefined4 *)((int)(this->_portraitScales)._begin + iVar5); + *(undefined4 *)(iVar4 + 0xc + GHIDRA_INT(g_characterPortraitOrder)) = + *(undefined4 *)(GHIDRA_INT((this->_portraitScales)._begin) + iVar5); iVar4 = iVar4 + 0x10; local_84 = g_characterPortraitOrder; } - local_74.x = (float)((int)local_74.x + 1); - local_7c.x = (float)((int)local_7c.x + 0x18); - local_80 = (void *)((int)local_80 + -1); + local_74.x = (float)(GHIDRA_INT(local_74.x) + 1); + local_7c.x = (float)(GHIDRA_INT(local_7c.x) + 0x18); + local_80 = (void *)(GHIDRA_INT(local_80) + -1); orderList = local_84; } while (local_80 != (void *)0x0); iVar4 = this->_numCharacters; @@ -3260,16 +3260,16 @@ void Menu_Character::render_portraits(Vector *position, Vector *offset, Vector * local_80 = (void *)(0x12 - iVar6); iVar5 = iVar6 << 4; while( true ) { - *(int *)(iVar5 + (int)orderList) = (int)local_80 + iVar6; + *(int *)(iVar5 + GHIDRA_INT(orderList)) = GHIDRA_INT(local_80) + iVar6; orderList = g_characterPortraitOrder; orderList = (this->_portraitPositions)._begin; - *(undefined4 *)(iVar5 + 4 + (int)g_characterPortraitOrder) = + *(undefined4 *)(iVar5 + 4 + GHIDRA_INT(g_characterPortraitOrder)) = *(undefined4 *)((char *)orderList + iVar6 * 8); - *(undefined4 *)(iVar5 + 8 + (int)orderList) = *(undefined4 *)((char *)orderList + iVar6 * 8 + 4); + *(undefined4 *)(iVar5 + 8 + GHIDRA_INT(orderList)) = *(undefined4 *)((char *)orderList + iVar6 * 8 + 4); iVar4 = iVar6 * 4; iVar6 = iVar6 + 1; - *(undefined4 *)(iVar5 + 0xc + (int)g_characterPortraitOrder) = - *(undefined4 *)((int)(this->_portraitScales)._begin + iVar4); + *(undefined4 *)(iVar5 + 0xc + GHIDRA_INT(g_characterPortraitOrder)) = + *(undefined4 *)(GHIDRA_INT((this->_portraitScales)._begin) + iVar4); iVar4 = this->_numCharacters; if (iVar4 <= iVar6) break; orderList = g_characterPortraitOrder; @@ -3281,25 +3281,25 @@ void Menu_Character::render_portraits(Vector *position, Vector *offset, Vector * if (0 < this->_numCharacters) { iVar4 = 0; do { - if (*(int *)(iVar4 + (int)g_characterPortraitOrder) < 0x12) { - iVar6 = *(int *)(iVar4 + (int)g_characterPortraitOrder) + this->_characterMenuShown * 0x12; + if (*(int *)(iVar4 + GHIDRA_INT(g_characterPortraitOrder)) < 0x12) { + iVar6 = *(int *)(iVar4 + GHIDRA_INT(g_characterPortraitOrder)) + this->_characterMenuShown * 0x12; local_80 = (void *)(iVar6 * 3); bVar2 = ((ANM2 *)(&this->_CharacterPortraitsSprite))->ANM2::SetAnimation((&PTR_s_00_Random_00b24140)[iVar6 * 6],1); if (bVar2 != 0) { ((AnimationState *)(&(this->_CharacterPortraitsSprite)._animState))->AnimationState::Rewind(); (this->_CharacterPortraitsSprite)._animState._isPlaying = 1; } - iVar6 = *(int *)(&DAT_00b24144 + (int)local_80 * 8); + iVar6 = *(int *)(&DAT_00b24144 + GHIDRA_INT(local_80) * 8); if ((iVar6 < 0) || (local_80 = (g_manager->_entityConfig)._players._begin, - ((int)(g_manager->_entityConfig)._players._end - (int)local_80) / 0x148 <= iVar6)) { + (GHIDRA_INT((g_manager->_entityConfig)._players._end) - GHIDRA_INT(local_80)) / 0x148 <= iVar6)) { orderList = (void *)0x0; } else { - orderList = (void *)(iVar6 * 0x148 + (int)local_80); + orderList = (void *)(iVar6 * 0x148 + GHIDRA_INT(local_80)); } uVar1 = *(uint *)((char *)orderList + 0xe8); - if (((int)uVar1 < 0) || + if ((GHIDRA_INT(uVar1) < 0) || (((uVar1 < 0x282 && (((uVar1 == 0 || ((g_manager->_persistentGameData)._achievements[uVar1] != 0)) || (((g_manager->_state == 2 && (g_game != (Game *)0x0)) && @@ -3315,15 +3315,15 @@ void Menu_Character::render_portraits(Vector *position, Vector *offset, Vector * ((AnimationState *)(&(this->_CharacterPortraitsSprite)._animState))->AnimationState::SetFrameFloat((float)iVar6); } } - characterIndex = *(ModManager **)(iVar4 + (int)g_characterPortraitOrder); - fVar7 = *(float *)(iVar4 + 0xc + (int)g_characterPortraitOrder); - if ((int)characterIndex < 0x12) { + characterIndex = *(ModManager **)(iVar4 + GHIDRA_INT(g_characterPortraitOrder)); + fVar7 = *(float *)(iVar4 + 0xc + GHIDRA_INT(g_characterPortraitOrder)); + if (GHIDRA_INT(characterIndex) < 0x12) { portraitColor = &(this->_CharacterPortraitsSprite)._color; uStack_58 = 0x3f800000; fVar8 = scale->y; (this->_CharacterPortraitsSprite)._scale.x = fVar7 * scale->x; (this->_CharacterPortraitsSprite)._scale.y = fVar7 * fVar8; - local_64 = *(float *)(iVar4 + 0xc + (int)g_characterPortraitOrder); + local_64 = *(float *)(iVar4 + 0xc + GHIDRA_INT(g_characterPortraitOrder)); fVar7 = 1.0 - local_64; offsetR = (fVar7 * 231.0) / 255.0; offsetB = (fVar7 * 220.0) / 255.0; @@ -3341,9 +3341,9 @@ void Menu_Character::render_portraits(Vector *position, Vector *offset, Vector * ; (this->_CharacterPortraitsSprite)._color._offset[2] = offsetB; } - local_7c.x = scale->x * *(float *)(iVar4 + 4 + (int)g_characterPortraitOrder) + + local_7c.x = scale->x * *(float *)(iVar4 + 4 + GHIDRA_INT(g_characterPortraitOrder)) + position->x + offset->x; - local_7c.y = *(float *)(iVar4 + 8 + (int)g_characterPortraitOrder) * scale->y + + local_7c.y = *(float *)(iVar4 + 8 + GHIDRA_INT(g_characterPortraitOrder)) * scale->y + offset->y + position->y; fStack_60 = local_64; fStack_5c = local_64; @@ -3380,23 +3380,23 @@ void Menu_Character::render_portraits(Vector *position, Vector *offset, Vector * customPortraitColor._offset[2] = (fVar8 * 220.0) / 255.0; customPortraitPos.x = position->x + offset->x + - scale->x * *(float *)(iVar4 + 4 + (int)g_characterPortraitOrder); + scale->x * *(float *)(iVar4 + 4 + GHIDRA_INT(g_characterPortraitOrder)); customPortraitPos.y = - scale->y * *(float *)(iVar4 + 8 + (int)g_characterPortraitOrder) + + scale->y * *(float *)(iVar4 + 8 + GHIDRA_INT(g_characterPortraitOrder)) + offset->y + position->y; customPortraitColor._tint[0] = fVar7; customPortraitColor._tint[1] = fVar7; customPortraitColor._tint[2] = fVar7; ModManager::RenderCustomCharacterPortraits (characterIndex, - *(int *)((int)g_modCharacters + - (int)characterIndex * 8 + - ((-(uint)(this->_characterMenuShown != 0) & 4) - 0x90)), + *(int *)(GHIDRA_INT(g_modCharacters) + + GHIDRA_INT(characterIndex) * 8 + + ((-GHIDRA_UINT((this->_characterMenuShown != 0)) & 4) - 0x90)), &customPortraitPos,&customPortraitColor,&local_74); } - local_84 = (void *)((int)local_84 + 1); + local_84 = (void *)(GHIDRA_INT(local_84) + 1); iVar4 = iVar4 + 0x10; - } while ((int)local_84 < this->_numCharacters); + } while (GHIDRA_INT(local_84) < this->_numCharacters); } return; } @@ -3484,7 +3484,7 @@ void Menu_Character::handle_input() local_8 = (void *)0xffffffff; puStack_c = &LAB_00afd29d; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(emptySeed + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((emptySeed + 10)); ExceptionList = &local_10; if (this->Status == 0) { ppcVar13 = &local_30; @@ -3551,7 +3551,7 @@ LAB_0094c92d: local_34 = characterId; } while (characterId < 0x12); } - if ((DAT_00c79888 - (int)g_modCharacters >> 3) + 0x12 <= characterId) { + if ((DAT_00c79888 - GHIDRA_INT(g_modCharacters) >> 3) + 0x12 <= characterId) { this->SelectedCharacterID = 0; } local_34 = 0xc3; @@ -3565,7 +3565,7 @@ LAB_0094c9ac: iVar15 = this->_numCharacters_MINUS_SelectedEntry + 1; this->_numCharacters_MINUS_SelectedEntry = iVar15; if (*piVar1 < 0) { - characterId = (DAT_00c79888 - (int)g_modCharacters >> 3) + 0x11; + characterId = (DAT_00c79888 - GHIDRA_INT(g_modCharacters) >> 3) + 0x11; this->SelectedCharacterID = characterId; } wrappedEntry = iVar15; @@ -3709,7 +3709,7 @@ LAB_0094cce6: if ((this->_seedText)._size < 9) { isSeedEffectsPressed = 'A'; pcVar6 = (char *)0x41; - local_34 = CONCAT31(local_34._1_3_,0x41); + local_34 = CONCAT31((*(undefined1 *)((char *)&(local_34) + 0x1)),0x41); do { local_30 = pcVar6; isKeyPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0,FUN_00a207d0,&local_30,0); @@ -3718,7 +3718,7 @@ LAB_0094cce6: } isSeedEffectsPressed = isSeedEffectsPressed + '\x01'; pcVar6 = pcVar6 + 1; - local_34 = CONCAT31(local_34._1_3_,isSeedEffectsPressed); + local_34 = CONCAT31((*(undefined1 *)((char *)&(local_34) + 0x1)),isSeedEffectsPressed); } while (isSeedEffectsPressed < '['); pcVar6 = (char *)0x30; do { @@ -3728,7 +3728,7 @@ LAB_0094cce6: seed_add_char(this,(byte)pcVar6); } pcVar6 = pcVar6 + 1; - } while ((int)pcVar6 < 0x3a); + } while (GHIDRA_INT(pcVar6) < 0x3a); pcVar6 = (char *)0x140; do { local_30 = pcVar6; @@ -3737,7 +3737,7 @@ LAB_0094cce6: seed_add_char(this,(char)pcVar6 - 0x10); } pcVar6 = pcVar6 + 1; - } while ((int)pcVar6 < 0x14a); + } while (GHIDRA_INT(pcVar6) < 0x14a); } } else { @@ -3767,7 +3767,7 @@ LAB_0094cdef: seed_add_char(this,pcVar5[uVar10]); uVar10 = uVar10 + 1; pcVar5 = local_30; - } while (uVar10 < (uint)((int)pcVar7 - (int)pcVar6)); + } while (uVar10 < GHIDRA_UINT((GHIDRA_INT(pcVar7) - GHIDRA_INT(pcVar6)))); } } } @@ -3840,21 +3840,21 @@ LAB_0094ceb0: local_8 = (void *)0x0; ((std::string *)(acStackY_138 + 0x90))->std::string::string(emptySeed); seed._buf[4] = (char)uVar11; - seed._buf[5] = (char)((uint)uVar11 >> 8); - seed._buf[6] = (char)((uint)uVar11 >> 0x10); - seed._buf[7] = (char)((uint)uVar11 >> 0x18); + seed._buf[5] = (char)(GHIDRA_UINT(uVar11) >> 8); + seed._buf[6] = (char)(GHIDRA_UINT(uVar11) >> 0x10); + seed._buf[7] = (char)(GHIDRA_UINT(uVar11) >> 0x18); seed._buf[0] = (char)iVar15; - seed._buf[1] = (char)((uint)iVar15 >> 8); - seed._buf[2] = (char)((uint)iVar15 >> 0x10); - seed._buf[3] = (char)((uint)iVar15 >> 0x18); + seed._buf[1] = (char)(GHIDRA_UINT(iVar15) >> 8); + seed._buf[2] = (char)(GHIDRA_UINT(iVar15) >> 0x10); + seed._buf[3] = (char)(GHIDRA_UINT(iVar15) >> 0x18); seed._buf[8] = (char)uVar14; - seed._buf[9] = (char)((uint)uVar14 >> 8); - seed._buf[10] = (char)((uint)uVar14 >> 0x10); - seed._buf[0xb] = (char)((uint)uVar14 >> 0x18); + seed._buf[9] = (char)(GHIDRA_UINT(uVar14) >> 8); + seed._buf[10] = (char)(GHIDRA_UINT(uVar14) >> 0x10); + seed._buf[0xb] = (char)(GHIDRA_UINT(uVar14) >> 0x18); seed._buf[0xc] = (char)uVar8; - seed._buf[0xd] = (char)((uint)uVar8 >> 8); - seed._buf[0xe] = (char)((uint)uVar8 >> 0x10); - seed._buf[0xf] = (char)((uint)uVar8 >> 0x18); + seed._buf[0xd] = (char)(GHIDRA_UINT(uVar8) >> 8); + seed._buf[0xe] = (char)(GHIDRA_UINT(uVar8) >> 0x10); + seed._buf[0xf] = (char)(GHIDRA_UINT(uVar8) >> 0x18); seed._size = uVar9; seed._capacity = uVar10; ((Seeds *)(&menuManager->_seedsObject))->Seeds::SetStartSeed(seed); @@ -3863,9 +3863,9 @@ LAB_0094ceb0: uVar10 = emptySeedCapacity + 1; ptr = emptySeed[0]; if (0xfff < uVar10) { - ptr = *(void **)((int)emptySeed[0] + -4); + ptr = *(void **)(GHIDRA_INT(emptySeed[0]) + -4); uVar10 = emptySeedCapacity + 0x24; - if (0x1f < (uint)((int)emptySeed[0] + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(emptySeed[0]) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -3918,25 +3918,25 @@ void Menu_Character::submit_seed() Manager *manager; MenuManager *menuManager; - local_8 = __security_cookie ^ (uint)((&tmpText)[1]._buf + 4); + local_8 = __security_cookie ^ GHIDRA_UINT(((&tmpText)[1]._buf + 4)); local_28 = this; ((std::string *)(acStackY_d8 + 0x84))->std::string::string(&this->_seedText); seedString._buf[4] = (char)in_stack_ffffffb0; - seedString._buf[5] = (char)((uint)in_stack_ffffffb0 >> 8); - seedString._buf[6] = (char)((uint)in_stack_ffffffb0 >> 0x10); - seedString._buf[7] = (char)((uint)in_stack_ffffffb0 >> 0x18); + seedString._buf[5] = (char)(GHIDRA_UINT(in_stack_ffffffb0) >> 8); + seedString._buf[6] = (char)(GHIDRA_UINT(in_stack_ffffffb0) >> 0x10); + seedString._buf[7] = (char)(GHIDRA_UINT(in_stack_ffffffb0) >> 0x18); seedString._buf[0] = (char)in_stack_ffffffac; - seedString._buf[1] = (char)((uint)in_stack_ffffffac >> 8); - seedString._buf[2] = (char)((uint)in_stack_ffffffac >> 0x10); - seedString._buf[3] = (char)((uint)in_stack_ffffffac >> 0x18); + seedString._buf[1] = (char)(GHIDRA_UINT(in_stack_ffffffac) >> 8); + seedString._buf[2] = (char)(GHIDRA_UINT(in_stack_ffffffac) >> 0x10); + seedString._buf[3] = (char)(GHIDRA_UINT(in_stack_ffffffac) >> 0x18); seedString._buf[8] = (char)in_stack_ffffffb4; - seedString._buf[9] = (char)((uint)in_stack_ffffffb4 >> 8); - seedString._buf[10] = (char)((uint)in_stack_ffffffb4 >> 0x10); - seedString._buf[0xb] = (char)((uint)in_stack_ffffffb4 >> 0x18); + seedString._buf[9] = (char)(GHIDRA_UINT(in_stack_ffffffb4) >> 8); + seedString._buf[10] = (char)(GHIDRA_UINT(in_stack_ffffffb4) >> 0x10); + seedString._buf[0xb] = (char)(GHIDRA_UINT(in_stack_ffffffb4) >> 0x18); seedString._buf[0xc] = (char)in_stack_ffffffb8; - seedString._buf[0xd] = (char)((uint)in_stack_ffffffb8 >> 8); - seedString._buf[0xe] = (char)((uint)in_stack_ffffffb8 >> 0x10); - seedString._buf[0xf] = (char)((uint)in_stack_ffffffb8 >> 0x18); + seedString._buf[0xd] = (char)(GHIDRA_UINT(in_stack_ffffffb8) >> 8); + seedString._buf[0xe] = (char)(GHIDRA_UINT(in_stack_ffffffb8) >> 0x10); + seedString._buf[0xf] = (char)(GHIDRA_UINT(in_stack_ffffffb8) >> 0x18); seedString._size = in_stack_ffffffbc; seedString._capacity = in_stack_ffffffc0; seedEffect = Seeds::GetSeedEffect(seedString); @@ -3953,22 +3953,22 @@ void Menu_Character::submit_seed() uVar7 = 0; uVar6 = 0x3f800000; pMVar5 = local_28; - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_28,1.0,0,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_28),1.0,0,0,1.0,0.0); menuManager = g_menuManager; ((std::string *)(acStackY_d8 + 0x84))->std::string::string(seedTextPtr); seed._buf[4] = (char)uVar6; - seed._buf[5] = (char)((uint)uVar6 >> 8); - seed._buf[6] = (char)((uint)uVar6 >> 0x10); - seed._buf[7] = (char)((uint)uVar6 >> 0x18); - seed._buf._0_4_ = pMVar5; + seed._buf[5] = (char)(GHIDRA_UINT(uVar6) >> 8); + seed._buf[6] = (char)(GHIDRA_UINT(uVar6) >> 0x10); + seed._buf[7] = (char)(GHIDRA_UINT(uVar6) >> 0x18); + (*(undefined4 *)((char *)&(seed._buf) + 0x0)) = pMVar5; seed._buf[8] = (char)uVar7; - seed._buf[9] = (char)((uint)uVar7 >> 8); - seed._buf[10] = (char)((uint)uVar7 >> 0x10); - seed._buf[0xb] = (char)((uint)uVar7 >> 0x18); + seed._buf[9] = (char)(GHIDRA_UINT(uVar7) >> 8); + seed._buf[10] = (char)(GHIDRA_UINT(uVar7) >> 0x10); + seed._buf[0xb] = (char)(GHIDRA_UINT(uVar7) >> 0x18); seed._buf[0xc] = (char)uVar8; - seed._buf[0xd] = (char)((uint)uVar8 >> 8); - seed._buf[0xe] = (char)((uint)uVar8 >> 0x10); - seed._buf[0xf] = (char)((uint)uVar8 >> 0x18); + seed._buf[0xd] = (char)(GHIDRA_UINT(uVar8) >> 8); + seed._buf[0xe] = (char)(GHIDRA_UINT(uVar8) >> 0x10); + seed._buf[0xf] = (char)(GHIDRA_UINT(uVar8) >> 0x18); seed._size = uVar9; seed._capacity = uVar4; ((Seeds *)(&menuManager->_seedsObject))->Seeds::SetStartSeed(seed); @@ -3977,7 +3977,7 @@ void Menu_Character::submit_seed() } local_28 = (Menu_Character *)0xbb; seed_fart_sound_override((int *)&local_28); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_28,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_28),1.0,2,0,1.0,0.0); if (0xf < (this->_seedText)._capacity) { seedTextPtr = *(std_string **)seedTextPtr->_buf; } @@ -3988,28 +3988,28 @@ void Menu_Character::submit_seed() } ((std::string *)(acStackY_d8 + 0x84))->std::string::string(seedTextPtr); seedString_00._buf[4] = (char)in_stack_ffffffb0; - seedString_00._buf[5] = (char)((uint)in_stack_ffffffb0 >> 8); - seedString_00._buf[6] = (char)((uint)in_stack_ffffffb0 >> 0x10); - seedString_00._buf[7] = (char)((uint)in_stack_ffffffb0 >> 0x18); + seedString_00._buf[5] = (char)(GHIDRA_UINT(in_stack_ffffffb0) >> 8); + seedString_00._buf[6] = (char)(GHIDRA_UINT(in_stack_ffffffb0) >> 0x10); + seedString_00._buf[7] = (char)(GHIDRA_UINT(in_stack_ffffffb0) >> 0x18); seedString_00._buf[0] = (char)in_stack_ffffffac; - seedString_00._buf[1] = (char)((uint)in_stack_ffffffac >> 8); - seedString_00._buf[2] = (char)((uint)in_stack_ffffffac >> 0x10); - seedString_00._buf[3] = (char)((uint)in_stack_ffffffac >> 0x18); + seedString_00._buf[1] = (char)(GHIDRA_UINT(in_stack_ffffffac) >> 8); + seedString_00._buf[2] = (char)(GHIDRA_UINT(in_stack_ffffffac) >> 0x10); + seedString_00._buf[3] = (char)(GHIDRA_UINT(in_stack_ffffffac) >> 0x18); seedString_00._buf[8] = (char)in_stack_ffffffb4; - seedString_00._buf[9] = (char)((uint)in_stack_ffffffb4 >> 8); - seedString_00._buf[10] = (char)((uint)in_stack_ffffffb4 >> 0x10); - seedString_00._buf[0xb] = (char)((uint)in_stack_ffffffb4 >> 0x18); + seedString_00._buf[9] = (char)(GHIDRA_UINT(in_stack_ffffffb4) >> 8); + seedString_00._buf[10] = (char)(GHIDRA_UINT(in_stack_ffffffb4) >> 0x10); + seedString_00._buf[0xb] = (char)(GHIDRA_UINT(in_stack_ffffffb4) >> 0x18); seedString_00._buf[0xc] = (char)in_stack_ffffffb8; - seedString_00._buf[0xd] = (char)((uint)in_stack_ffffffb8 >> 8); - seedString_00._buf[0xe] = (char)((uint)in_stack_ffffffb8 >> 0x10); - seedString_00._buf[0xf] = (char)((uint)in_stack_ffffffb8 >> 0x18); + seedString_00._buf[0xd] = (char)(GHIDRA_UINT(in_stack_ffffffb8) >> 8); + seedString_00._buf[0xe] = (char)(GHIDRA_UINT(in_stack_ffffffb8) >> 0x10); + seedString_00._buf[0xf] = (char)(GHIDRA_UINT(in_stack_ffffffb8) >> 0x18); seedString_00._size = in_stack_ffffffbc; seedString_00._capacity = in_stack_ffffffc0; seedEffect = Seeds::GetSeedEffect(seedString_00); manager = g_manager; - local_21 = *(byte *)((int)(g_manager->_persistentGameData)._cutsceneCounters + seedEffect + 0x74); + local_21 = *(byte *)(GHIDRA_INT((g_manager->_persistentGameData)._cutsceneCounters) + seedEffect + 0x74); if ((g_manager->_persistentGameData)._isReadOnly == 0) { - *(undefined1 *)((int)(g_manager->_persistentGameData)._cutsceneCounters + seedEffect + 0x74) = 1 + *(undefined1 *)(GHIDRA_INT((g_manager->_persistentGameData)._cutsceneCounters) + seedEffect + 0x74) = 1 ; (*(undefined1 *)((char *)&((manager->_persistentGameData)) + 0xf14)) = 0; *(undefined1 *)&manager->_persistentGameData = 1; @@ -4038,7 +4038,7 @@ void Menu_Character::submit_seed() localizedText + 1,&local_21); } } - tmpText._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(tmpText._buf) + 0x0)) = (void *)0x0; tmpText._size = 0; tmpText._capacity = 0xf; strCursor = localizedText; @@ -4046,7 +4046,7 @@ void Menu_Character::submit_seed() bVar1 = *strCursor; strCursor = strCursor + 1; } while (bVar1 != 0); - ((std::string *)(tmpText._buf))->std::string::assign(localizedText,(int)strCursor - (int)(localizedText + 1)); + ((std::string *)(tmpText._buf))->std::string::assign(localizedText,GHIDRA_INT(strCursor) - GHIDRA_INT((localizedText + 1))); pMVar5 = local_28; seedTitleText = (undefined4 *)&(*(undefined1 *)((char *)(local_28) + 0xd84)); if ((std_string *)seedTitleText != &tmpText) { @@ -4058,7 +4058,7 @@ void Menu_Character::submit_seed() if (0xfff < size) { ptr = *(void **)((char *)specialSeedEntry + -4); size = uVar4 + 0x24; - if (0x1f < (uint)((int)specialSeedEntry + (-4 - (int)ptr))) goto LAB_0094d3a4; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(specialSeedEntry) + (-4 - GHIDRA_INT(ptr))))) goto LAB_0094d3a4; } operator_delete(ptr,size); } @@ -4069,11 +4069,11 @@ void Menu_Character::submit_seed() LAB_0094d2cc: if (0xf < tmpText._capacity) { uVar4 = tmpText._capacity + 1; - specialSeedEntry = (void *)tmpText._buf._0_4_; + specialSeedEntry = (*(undefined4 *)((char *)&((void *)tmpText._buf) + 0x0)); if (0xfff < uVar4) { - specialSeedEntry = *(void **)(tmpText._buf._0_4_ + -4); + specialSeedEntry = *(void **)((*(undefined4 *)((char *)&(tmpText._buf) + 0x0)) + -4); uVar4 = tmpText._capacity + 0x24; - if (0x1f < (uint)(tmpText._buf._0_4_ + (-4 - (int)specialSeedEntry))) goto LAB_0094d3a4; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpText._buf) + 0x0)) + (-4 - GHIDRA_INT(specialSeedEntry))))) goto LAB_0094d3a4; } operator_delete(specialSeedEntry,uVar4); } @@ -4096,7 +4096,7 @@ LAB_0094d2cc: localizedText + 1,&local_21); } } - tmpText._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(tmpText._buf) + 0x0)) = (void *)0x0; tmpText._size = 0; tmpText._capacity = 0xf; strCursor = localizedText; @@ -4104,20 +4104,20 @@ LAB_0094d2cc: bVar1 = *strCursor; strCursor = strCursor + 1; } while (bVar1 != 0); - ((std::string *)(tmpText._buf))->std::string::assign(localizedText,(int)strCursor - (int)(localizedText + 1)); + ((std::string *)(tmpText._buf))->std::string::assign(localizedText,GHIDRA_INT(strCursor) - GHIDRA_INT((localizedText + 1))); seedTitleText = (undefined4 *)&(*(undefined1 *)((char *)(local_28) + 0xd84)); if ((std_string *)seedTitleText == &tmpText) goto LAB_0094d2cc; ((std::string *)((char *)seedTitleText))->std::string::_Tidy_deallocate(); LAB_0094d2b9: - *seedTitleText = tmpText._buf._0_4_; - seedTitleText[1] = tmpText._buf._4_4_; - seedTitleText[2] = tmpText._buf._8_4_; - seedTitleText[3] = tmpText._buf._12_4_; + *seedTitleText = (*(undefined4 *)((char *)&(tmpText._buf) + 0x0)); + seedTitleText[1] = (*(undefined4 *)((char *)&(tmpText._buf) + 0x4)); + seedTitleText[2] = (*(undefined4 *)((char *)&(tmpText._buf) + 0x8)); + seedTitleText[3] = (*(undefined4 *)((char *)&(tmpText._buf) + 0xc)); *(ulonglong *)(seedTitleText + 4) = CONCAT44(tmpText._capacity,tmpText._size); } uVar4 = 0; specialSeedEntry = *(void **)&(*(undefined1 *)((char *)(g_menuManager) + 0x267c)); - iVar3 = *(int *)&(*(undefined1 *)((char *)(g_menuManager) + 0x2680)) - (int)specialSeedEntry; + iVar3 = *(int *)&(*(undefined1 *)((char *)(g_menuManager) + 0x2680)) - GHIDRA_INT(specialSeedEntry); iVar2 = iVar3 >> 0x1f; iVar3 = iVar3 / 0x28 + iVar2; if (iVar3 != iVar2) { @@ -4127,10 +4127,10 @@ LAB_0094d2b9: goto LAB_0094d345; } uVar4 = uVar4 + 1; - specialSeedEntry = (void *)((int)specialSeedEntry + 0x28); - } while (uVar4 < (uint)(iVar3 - iVar2)); + specialSeedEntry = (void *)(GHIDRA_INT(specialSeedEntry) + 0x28); + } while (uVar4 < GHIDRA_UINT((iVar3 - iVar2))); } - tmpText._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(tmpText._buf) + 0x0)) = (void *)0x0; tmpText._capacity = 0xf; tmpText._size = 0; LAB_0094d345: @@ -4138,11 +4138,11 @@ LAB_0094d345: if ((std_string *)&(*(undefined1 *)((char *)(local_28) + 0xd9c)) == &tmpText) { if (0xf < tmpText._capacity) { uVar4 = tmpText._capacity + 1; - specialSeedEntry = (void *)tmpText._buf._0_4_; + specialSeedEntry = (*(undefined4 *)((char *)&((void *)tmpText._buf) + 0x0)); if (0xfff < uVar4) { - specialSeedEntry = *(void **)(tmpText._buf._0_4_ + -4); + specialSeedEntry = *(void **)((*(undefined4 *)((char *)&(tmpText._buf) + 0x0)) + -4); uVar4 = tmpText._capacity + 0x24; - if (0x1f < (uint)(tmpText._buf._0_4_ + (-4 - (int)specialSeedEntry))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpText._buf) + 0x0)) + (-4 - GHIDRA_INT(specialSeedEntry))))) { LAB_0094d3a4: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -4222,18 +4222,18 @@ void Menu_Character::UpdateRotations() (this->_PageSwapWidgetSprite)._color._tint[3] = 0.0; local_18 = 0; do { - iVar3 = *(int *)((int)&DAT_00b242f4 + local_18); + iVar3 = *(int *)(GHIDRA_INT(&DAT_00b242f4) + local_18); if ((iVar3 < 0) || (local_10 = (manager->_entityConfig)._players._begin, - ((int)(manager->_entityConfig)._players._end - (int)local_10) / 0x148 <= iVar3)) { + (GHIDRA_INT((manager->_entityConfig)._players._end) - GHIDRA_INT(local_10)) / 0x148 <= iVar3)) { pvVar2 = (void *)0x0; } else { - pvVar2 = (void *)(iVar3 * 0x148 + (int)local_10); + pvVar2 = (void *)(iVar3 * 0x148 + GHIDRA_INT(local_10)); } uVar4 = *(uint *)((char *)pvVar2 + 0xe8); fVar10 = 1.0; - if (((int)uVar4 < 0) || + if ((GHIDRA_INT(uVar4) < 0) || ((uVar4 < 0x282 && ((((uVar4 == 0 || ((manager->_persistentGameData)._achievements[uVar4] != 0)) || (((manager->_state == 2 && (g_game != (Game *)0x0)) && @@ -4246,14 +4246,14 @@ void Menu_Character::UpdateRotations() local_18 = local_18 + 0x18; } while (local_18 < 0x1b0); uVar4 = 0; - if (DAT_00c79888 - (int)g_modCharacters >> 3 != 0) { + if (DAT_00c79888 - GHIDRA_INT(g_modCharacters) >> 3 != 0) { do { if (g_modCharacters[uVar4 * 2] != g_modCharacters[uVar4 * 2 + 1]) { (this->_PageSwapWidgetSprite)._color._tint[3] = 1.0; break; } uVar4 = uVar4 + 1; - } while (uVar4 < (uint)(DAT_00c79888 - (int)g_modCharacters >> 3)); + } while (uVar4 < GHIDRA_UINT((DAT_00c79888 - GHIDRA_INT(g_modCharacters) >> 3))); } iVar3 = this->SelectedCharacterID; if ((iVar3 < 0x12) && @@ -4268,27 +4268,27 @@ void Menu_Character::UpdateRotations() layer = ((ANM2 *)(bigCharSprite))->ANM2::GetLayer(pbVar5); pbVar5 = pbVar5 + 1; layer->_visible = 0; - } while ((int)pbVar5 < 0x10); + } while (GHIDRA_INT(pbVar5) < 0x10); layer = ((ANM2 *)(bigCharSprite))->ANM2::GetLayer((byte *)0x10); layer->_visible = 1; layer = ((ANM2 *)(bigCharSprite))->ANM2::GetLayer((byte *)0x3); layer->_visible = 1; if (((this->_BigCharPageSprite)._animState._animData != (void *)0x0) && - ((3 < *(int *)((int)(this->_BigCharPageSprite)._animState._animation + 0x80) || + ((3 < *(int *)(GHIDRA_INT((this->_BigCharPageSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 3 < *(int *)((int)(this->_BigCharPageSprite)._animState._animation + 0x80))))) { + 3 < *(int *)(GHIDRA_INT((this->_BigCharPageSprite)._animState._animation) + 0x80))))) { pvVar2 = (this->_BigCharPageSprite)._animState._animData; local_10 = *(void **)((char *)pvVar2 + 0x44); if ((pvVar2 == (void *)0x0) || - (((int)local_10 < 0 || (*(int *)((char *)pvVar2 + 0x1c) <= (int)local_10)))) { + ((GHIDRA_INT(local_10) < 0 || (*(int *)((char *)pvVar2 + 0x1c) <= GHIDRA_INT(local_10))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } fVar9 = 1.0; LAB_0094d92f: - *(undefined4 *)((int)(this->_BigCharPageSprite)._animState._layerFrames + (int)local_10 * 4) = + *(undefined4 *)(GHIDRA_INT((this->_BigCharPageSprite)._animState._layerFrames) + GHIDRA_INT(local_10) * 4) = 0; AnimationState::AdvanceLayerPosition - (&(this->_BigCharPageSprite)._animState,(int)local_10,fVar9); + (&(this->_BigCharPageSprite)._animState,GHIDRA_INT(local_10),fVar9); } } else { @@ -4299,13 +4299,13 @@ LAB_0094d92f: layer = ((ANM2 *)(&this->_BigCharPageSprite))->ANM2::GetLayer(pbVar5); pbVar5 = pbVar5 + 1; layer->_visible = 1; - } while ((int)pbVar5 < 0x10); + } while (GHIDRA_INT(pbVar5) < 0x10); if (this->SelectedCharacterID < 0x12) { iVar3 = (this->SelectedCharacterID + this->_characterMenuShown * 0x12) * 0x18; uVar4 = *(uint *)(&DAT_00b2414c + iVar3); if ((uVar4 == 0) || ((uVar4 != 0xfffffffe && - (((int)uVar4 < 0 || + ((GHIDRA_INT(uVar4) < 0 || ((uVar4 < 0x282 && (((g_manager->_persistentGameData)._achievements[uVar4] != 0 || (((g_manager->_state == 2 && (g_game != (Game *)0x0)) && @@ -4323,7 +4323,7 @@ LAB_0094d92f: uVar4 = *(uint *)(&DAT_00b24150 + iVar3); if ((uVar4 == 0) || ((uVar4 != 0xfffffffe && - (((int)uVar4 < 0 || + ((GHIDRA_INT(uVar4) < 0 || ((uVar4 < 0x282 && (((g_manager->_persistentGameData)._achievements[uVar4] != 0 || (((g_manager->_state == 2 && (g_game != (Game *)0x0)) && @@ -4340,7 +4340,7 @@ LAB_0094d92f: uVar4 = *(uint *)(&DAT_00b24154 + iVar3); if ((uVar4 == 0) || ((uVar4 != 0xfffffffe && - (((int)uVar4 < 0 || + ((GHIDRA_INT(uVar4) < 0 || ((uVar4 < 0x282 && (((g_manager->_persistentGameData)._achievements[uVar4] != 0 || (((g_manager->_state == 2 && (g_game != (Game *)0x0)) && @@ -4360,13 +4360,13 @@ LAB_0094d92f: layer = ((ANM2 *)(&this->_BigCharPageSprite))->ANM2::GetLayer((byte *)0x3); layer->_visible = 1; if (((this->_BigCharPageSprite)._animState._animData != (void *)0x0) && - ((3 < *(int *)((int)(this->_BigCharPageSprite)._animState._animation + 0x80) || + ((3 < *(int *)(GHIDRA_INT((this->_BigCharPageSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 3 < *(int *)((int)(this->_BigCharPageSprite)._animState._animation + 0x80))))) { + 3 < *(int *)(GHIDRA_INT((this->_BigCharPageSprite)._animState._animation) + 0x80))))) { pvVar2 = (this->_BigCharPageSprite)._animState._animData; local_10 = *(void **)((char *)pvVar2 + 0x44); if ((pvVar2 == (void *)0x0) || - (((int)local_10 < 0 || (*(int *)((char *)pvVar2 + 0x1c) <= (int)local_10)))) { + ((GHIDRA_INT(local_10) < 0 || (*(int *)((char *)pvVar2 + 0x1c) <= GHIDRA_INT(local_10))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } fVar9 = 0.0; @@ -4380,12 +4380,12 @@ LAB_0094d956: local_18 = this->_numCharacters; this->IsInputPossible = 0; local_1c = 0.0; - if (0 < (int)local_18) { + if (0 < GHIDRA_INT(local_18)) { do { portraitIdx = local_1c; fVar8 = this->_scrollSpeed; - local_10 = (void *)-(((float)(int)local_1c * 6.2831855) / (float)(int)local_18); - fVar7 = (360.0 / (float)(int)local_18) * (float)this->_numCharacters_MINUS_SelectedEntry; + local_10 = (void *)-(((float)GHIDRA_INT(local_1c) * 6.2831855) / (float)GHIDRA_INT(local_18)); + fVar7 = (360.0 / (float)GHIDRA_INT(local_18)) * (float)this->_numCharacters_MINUS_SelectedEntry; if (this->Status == 2) { fVar6 = ((float)this->_randomRotationAmount - 60.0) / -60.0; if (fVar6 <= fVar9) { @@ -4436,14 +4436,14 @@ LAB_0094d956: local_14 = local_14 + 6; this->SelectedCharacterID = local_18; iVar3 = extraout_ECX; - } while ((int)local_18 < 0x12); + } while (GHIDRA_INT(local_18) < 0x12); } - if ((DAT_00c79888 - (int)g_modCharacters >> 3) + 0x12 <= (int)local_18) { + if ((DAT_00c79888 - GHIDRA_INT(g_modCharacters) >> 3) + 0x12 <= GHIDRA_INT(local_18)) { this->SelectedCharacterID = 0; } local_14 = (Menu_Character_Entry *)0xc3; seed_fart_sound_override((int *)&local_14); - ((SoundEffects *)(&cachedManager->_sfxManager))->SoundEffects::Play((int)local_14,1.0,0,0,1.0,0.0); + ((SoundEffects *)(&cachedManager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_14),1.0,0,0,1.0,0.0); if (this->SelectedCharacterID < 0x12) { pbVar5 = (this->_BigCharPageSprite)._animState._animData; local_14 = (Menu_Character_Entry *) @@ -4460,7 +4460,7 @@ LAB_0094d956: isLess = bVar1 < *(byte *)wantedAnimName; if (bVar1 != *(byte *)wantedAnimName) { LAB_0094dc27: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094dc2c; } if (bVar1 == 0) break; @@ -4547,22 +4547,22 @@ LAB_0094dc62: } fVar6 = (this->_characterWheelDepth - 1.0) * fVar8 + 1.0; fVar8 = this->_characterWheelWidth; - *(float *)((int)(this->_portraitScales)._begin + (int)portraitIdx * 4) = 1.0 / fVar6; + *(float *)(GHIDRA_INT((this->_portraitScales)._begin) + GHIDRA_INT(portraitIdx) * 4) = 1.0 / fVar6; pvVar2 = (this->_portraitPositions)._begin; - *(float *)((char *)pvVar2 + (int)portraitIdx * 8) = + *(float *)((char *)pvVar2 + GHIDRA_INT(portraitIdx) * 8) = ((((float)local_14 * cosPortraitAngle - fVar10 * fVar9) * 70.0) / fVar6) * fVar8 + 240.0; fVar10 = 1.0; - *(float *)((char *)pvVar2 + (int)portraitIdx * 8 + 4) = ((fVar7 * 70.0) / fVar6) * 0.4 + 85.0; - local_1c = (float)((int)portraitIdx + 1); + *(float *)((char *)pvVar2 + GHIDRA_INT(portraitIdx) * 8 + 4) = ((fVar7 * 70.0) / fVar6) * 0.4 + 85.0; + local_1c = (float)(GHIDRA_INT(portraitIdx) + 1); local_18 = this->_numCharacters; fVar9 = 0.0; - } while ((int)local_1c < (int)local_18); + } while (GHIDRA_INT(local_1c) < GHIDRA_INT(local_18)); } if (this->SelectedCharacterID < 0x12) { this->_completionWidget = *(CompletionWidget *) (&DAT_00b24144 + - ((-(uint)(this->_characterMenuShown != 0) & 0x12) + this->SelectedCharacterID) * 0x18); + ((-GHIDRA_UINT((this->_characterMenuShown != 0)) & 0x12) + this->SelectedCharacterID) * 0x18); CompletionMarks::update_layers(); } return; @@ -4598,12 +4598,12 @@ void Menu_Character::SelectRandomChar() local_14 = (void *)0xffffffff; puStack_18 = &LAB_00b0b95d; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(displayName + 0xb); + local_24 = __security_cookie ^ GHIDRA_UINT((displayName + 0xb)); ExceptionList = &local_1c; uVar4 = 0; - allocBytes = (ulonglong)((DAT_00c79888 - (int)g_modCharacters >> 3) + 0x12) * 4; + allocBytes = (ulonglong)((DAT_00c79888 - GHIDRA_INT(g_modCharacters) >> 3) + 0x12) * 4; candidates = operator_new_tracked - (-(uint)((int)((ulonglong)allocBytes >> 0x20) != 0) | (uint)allocBytes); + (-GHIDRA_UINT((GHIDRA_INT(((ulonglong)allocBytes >> 0x20)) != 0)) | GHIDRA_UINT(allocBytes)); iVar5 = 1; *candidates = 0xffffffffffffffff; candidates[1] = 0xffffffffffffffff; @@ -4618,14 +4618,14 @@ void Menu_Character::SelectRandomChar() iVar2 = *(int *)(&DAT_00b24144 + (iVar5 + this->_characterMenuShown * 0x12) * 0x18); if ((iVar2 < 0) || (pvVar1 = (g_manager->_entityConfig)._players._begin, - ((int)(g_manager->_entityConfig)._players._end - (int)pvVar1) / 0x148 <= iVar2)) { + (GHIDRA_INT((g_manager->_entityConfig)._players._end) - GHIDRA_INT(pvVar1)) / 0x148 <= iVar2)) { pvVar1 = (void *)0x0; } else { - pvVar1 = (void *)(iVar2 * 0x148 + (int)pvVar1); + pvVar1 = (void *)(iVar2 * 0x148 + GHIDRA_INT(pvVar1)); } uVar3 = *(uint *)((char *)pvVar1 + 0xe8); - if (((int)uVar3 < 0) || + if ((GHIDRA_INT(uVar3) < 0) || (((uVar3 < 0x282 && (((uVar3 == 0 || ((g_manager->_persistentGameData)._achievements[uVar3] != 0)) || (((g_manager->_state == 2 && (g_game != (Game *)0x0)) && @@ -4638,12 +4638,12 @@ void Menu_Character::SelectRandomChar() iVar5 = iVar5 + 1; } while (iVar5 < 0x12); iVar5 = 0x12; - if (0x12 < (DAT_00c79888 - (int)g_modCharacters >> 3) + 0x12) { + if (0x12 < (DAT_00c79888 - GHIDRA_INT(g_modCharacters) >> 3) + 0x12) { do { *(int *)((char *)candidates + uVar4 * 4) = iVar5; iVar5 = iVar5 + 1; uVar4 = uVar4 + 1; - } while (iVar5 < (DAT_00c79888 - (int)g_modCharacters >> 3) + 0x12); + } while (iVar5 < (DAT_00c79888 - GHIDRA_INT(g_modCharacters) >> 3) + 0x12); } if (uVar4 == 0) { uVar3 = 0; @@ -4661,7 +4661,7 @@ void Menu_Character::SelectRandomChar() if (0 < iVar5) { menuEntry = &PTR_s_00_Random_00b24140; do { - if (0xb242ef < (int)menuEntry) break; + if (0xb242ef < GHIDRA_INT(menuEntry)) break; if ((*(char *)(menuEntry + 2) != '\0') && (isAvailable = Menu_Character_Entry::IsCharacterAvailable ((Menu_Character_Entry *)menuEntry,iVar2), iVar2 = extraout_ECX, @@ -4674,14 +4674,14 @@ void Menu_Character::SelectRandomChar() } if (iVar5 < 0x12) { iVar5 = *(int *)(&DAT_00b24144 + - ((-(uint)(this->_characterMenuShown != 0) & 0x12) + iVar5) * 0x18); + ((-GHIDRA_UINT((this->_characterMenuShown != 0)) & 0x12) + iVar5) * 0x18); } else { - iVar5 = *(int *)((int)g_modCharacters + - ((-(uint)(this->_characterMenuShown != 0) & 4) - 0x90) + iVar5 * 8); + iVar5 = *(int *)(GHIDRA_INT(g_modCharacters) + + ((-GHIDRA_UINT((this->_characterMenuShown != 0)) & 4) - 0x90) + iVar5 * 8); } playerConfig = (EntityConfig_Player *) - (iVar5 * 0x148 + (int)(g_manager->_entityConfig)._players._begin); + (iVar5 * 0x148 + GHIDRA_INT((g_manager->_entityConfig)._players._begin)); ((EntityConfig_Player *)(playerConfig))->EntityConfig_Player::GetDisplayName((std_string *)displayName,playerConfig); local_14 = (void *)0x0; KAGE_LogMessage(1,(byte *)"random: %s\n"); @@ -4689,9 +4689,9 @@ void Menu_Character::SelectRandomChar() uVar4 = displayNameCapacity + 1; pvVar1 = displayName[0]; if (0xfff < uVar4) { - pvVar1 = *(void **)((int)displayName[0] + -4); + pvVar1 = *(void **)(GHIDRA_INT(displayName[0]) + -4); uVar4 = displayNameCapacity + 0x24; - if (0x1f < (uint)((int)displayName[0] + (-4 - (int)pvVar1))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(displayName[0]) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -4700,19 +4700,19 @@ void Menu_Character::SelectRandomChar() } displayNameSize = 0; displayNameCapacity = 0xf; - displayName[0] = (void *)((uint)displayName[0] & 0xffffff00); + displayName[0] = (void *)(GHIDRA_UINT(displayName[0]) & 0xffffff00); if (g_mainHeap == (void *)0x0) { heapBytes = &g_allocatedBytesNoHeap; } else { - heapBytes = (qword *)((int)g_mainHeap + 0x30); + heapBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (candidates != (undefined8 *)0x0) { uVar4 = *(uint *)((char *)candidates + -4); prevBytes = *heapBytes; - *(uint *)heapBytes = (uint)*heapBytes - uVar4; - *(uint *)((char *)heapBytes + 4) = *(uint *)((char *)heapBytes + 4) - (uint)((uint)prevBytes < uVar4); - free((uint *)((int)candidates + -4)); + *(uint *)heapBytes = GHIDRA_UINT(*heapBytes) - uVar4; + *(uint *)((char *)heapBytes + 4) = *(uint *)((char *)heapBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevBytes) < uVar4)); + free((uint *)(GHIDRA_INT(candidates) + -4)); } ExceptionList = local_1c; return; @@ -4779,7 +4779,7 @@ LAB_0094e273: isLess = local_AL_108 < (byte)*wantedAnimName; if (local_AL_108 != *wantedAnimName) { LAB_0094e260: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0094e265; } if (local_AL_108 == 0) break; @@ -4808,7 +4808,7 @@ LAB_0094e265: isLess = local_AL_108 < *faceNameCursor; if (local_AL_108 != *faceNameCursor) { LAB_0094e2e0: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0094e2e5; } if (local_AL_108 == 0) break; @@ -4849,6 +4849,6 @@ LAB_0094e310: } manager = g_manager; seed_fart_sound_override((int *)&local_8); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_8,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_8),1.0,2,0,1.0,0.0); return; } diff --git a/src/game/menu_character_entry.cpp b/src/game/menu_character_entry.cpp index 187dcf0..980c9b2 100644 --- a/src/game/menu_character_entry.cpp +++ b/src/game/menu_character_entry.cpp @@ -11,12 +11,12 @@ byte Menu_Character_Entry::IsCharacterAvailable(int unused) manager = g_manager; playerType = *(int *)(this + 1); if ((playerType < 0) || - (((int)(g_manager->_entityConfig)._players._end - - (int)(g_manager->_entityConfig)._players._begin) / 0x148 <= playerType)) { + ((GHIDRA_INT((g_manager->_entityConfig)._players._end) - + GHIDRA_INT((g_manager->_entityConfig)._players._begin)) / 0x148 <= playerType)) { playerConfig = (void *)0x0; } else { - playerConfig = (void *)(playerType * 0x148 + (int)(g_manager->_entityConfig)._players._begin); + playerConfig = (void *)(playerType * 0x148 + GHIDRA_INT((g_manager->_entityConfig)._players._begin)); } if (-1 < *(int *)((char *)playerConfig + 0xe8)) { isUnlocked = PersistentGameData::Unlocked diff --git a/src/game/menu_collection.cpp b/src/game/menu_collection.cpp index 506d14e..1f4df9a 100644 --- a/src/game/menu_collection.cpp +++ b/src/game/menu_collection.cpp @@ -40,18 +40,18 @@ void Menu_Collection::render_item_pool_icons(int collectibleId, Vector *position poolsCapacity = 0; local_8 = 0; ((ItemPool *)(&g_game->_itemPool))->ItemPool::GetItemPoolsForCollectible(collectibleId,&poolsBegin); - pVVar3 = (Vector *)(poolsEnd - (int)poolsBegin >> 2); + pVVar3 = (Vector *)(poolsEnd - GHIDRA_INT(poolsBegin) >> 2); position = (Vector *)0x0; pools = poolsBegin; if (pVVar3 == (Vector *)0x0) { LAB_008d7c66: if (pools != (void *)0x0) { - cmpResult = poolsCapacity - (int)pools & 0xfffffffc; + cmpResult = poolsCapacity - GHIDRA_INT(pools) & 0xfffffffc; ptr = pools; if (0xfff < cmpResult) { ptr = *(void **)((char *)pools + -4); cmpResult = cmpResult + 0x23; - if (0x1f < (uint)((int)pools + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pools) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -63,7 +63,7 @@ LAB_008d7c66: } LAB_008d6c00: if ((g_game->_difficulty != 2) && (g_game->_difficulty != 3)) { - iVar2 = *(int *)((char *)pools + (int)position * 4); + iVar2 = *(int *)((char *)pools + GHIDRA_INT(position) * 4); if (iVar2 == 0) { curAnimation = (byte *)(topAnimState->DeathScreenSprite)._championColor._offset[2]; if (curAnimation == (byte *)0x0) goto LAB_008d7371; @@ -221,7 +221,7 @@ LAB_008d6c00: isLess = bVar1 < (byte)*iconAnimName; if (bVar1 != *iconAnimName) { LAB_008d6f00: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_008d6f05; } if (bVar1 == 0) break; @@ -547,7 +547,7 @@ LAB_008d6e61: isLess = bVar1 < (byte)*iconAnimName; if (bVar1 != *iconAnimName) { LAB_008d6e43: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_008d6e48; } if (bVar1 == 0) break; @@ -564,7 +564,7 @@ LAB_008d6e48: goto LAB_008d6e61; goto LAB_008d7bea; } - iVar2 = *(int *)((char *)pools + (int)position * 4); + iVar2 = *(int *)((char *)pools + GHIDRA_INT(position) * 4); if (iVar2 == 0) { curAnimation = (byte *)(topAnimState->DeathScreenSprite)._championColor._offset[2]; if (curAnimation != (byte *)0x0) { @@ -603,7 +603,7 @@ LAB_008d734f: isLess = bVar1 < (byte)*iconAnimName; if (bVar1 != *iconAnimName) { LAB_008d73e0: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_008d73e5; } if (bVar1 == 0) break; @@ -1023,7 +1023,7 @@ LAB_008d7b8c: } goto LAB_008d7c59; LAB_008d7b90: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; LAB_008d7b95: if ((cmpResult != 0) || ((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0')))) { @@ -1033,7 +1033,7 @@ LAB_008d7ba6: } goto LAB_008d7bce; LAB_008d7b20: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; LAB_008d7b25: if ((cmpResult == 0) && ((curAnimation[0x34] == 0 || ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex != '\0')))) @@ -1042,7 +1042,7 @@ LAB_008d7b3e: iconAnimName = "IconUltraSecretRoom"; goto LAB_008d7378; LAB_008d7a80: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; LAB_008d7a85: if ((cmpResult != 0) || ((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0')))) { @@ -1052,7 +1052,7 @@ LAB_008d7a96: } goto LAB_008d7abe; LAB_008d79e1: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; LAB_008d79e6: if ((cmpResult != 0) || ((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0')))) { @@ -1069,7 +1069,7 @@ LAB_008d79f7: fVar4 = 4.0; goto LAB_008d7bdf; LAB_008d7193: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; LAB_008d7198: if ((cmpResult != 0) || ((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0')))) { @@ -1089,7 +1089,7 @@ LAB_008d7bce: fVar4 = 5.0; goto LAB_008d7bdf; LAB_008d78f2: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; LAB_008d78f7: if ((cmpResult != 0) || ((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0')))) { @@ -1106,7 +1106,7 @@ LAB_008d7908: fVar4 = 3.0; goto LAB_008d7bdf; LAB_008d7858: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; LAB_008d785d: if ((cmpResult != 0) || ((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0')))) { @@ -1116,7 +1116,7 @@ LAB_008d786e: } goto LAB_008d7896; LAB_008d77c3: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; LAB_008d77c8: if ((cmpResult != 0) || ((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0')))) { @@ -1126,7 +1126,7 @@ LAB_008d77d9: } goto LAB_008d7801; LAB_008d7038: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; LAB_008d703d: if ((cmpResult != 0) || ((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0')))) { @@ -1146,7 +1146,7 @@ LAB_008d7896: fVar4 = 2.0; goto LAB_008d7bdf; LAB_008d6fd0: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; LAB_008d6fd5: if ((cmpResult != 0) || ((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0')))) { @@ -1166,7 +1166,7 @@ LAB_008d7abe: fVar4 = 1.0; goto LAB_008d7bdf; LAB_008d6f68: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; LAB_008d6f6d: if ((cmpResult != 0) || ((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0')))) { @@ -1189,7 +1189,7 @@ LAB_008d7bdf: ((AnimationState *)((topAnimState->DeathScreenSprite)._championColor._offset + 1),fVar4); goto LAB_008d7bea; LAB_008d7660: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; LAB_008d7665: if ((cmpResult == 0) && ((curAnimation[0x34] == 0 || ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex != '\0')))) @@ -1198,7 +1198,7 @@ LAB_008d767e: iconAnimName = "IconCurseRoom"; goto LAB_008d7378; LAB_008d75f4: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; LAB_008d75f9: if ((cmpResult == 0) && ((curAnimation[0x34] == 0 || ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex != '\0')))) @@ -1207,7 +1207,7 @@ LAB_008d7612: iconAnimName = "IconSecretRoom"; goto LAB_008d7378; LAB_008d7588: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; LAB_008d758d: if ((cmpResult == 0) && ((curAnimation[0x34] == 0 || ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex != '\0')))) @@ -1216,7 +1216,7 @@ LAB_008d75a6: iconAnimName = "IconDevilRoom"; goto LAB_008d7378; LAB_008d7520: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; LAB_008d7525: if ((cmpResult == 0) && ((curAnimation[0x34] == 0 || ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex != '\0')))) @@ -1225,7 +1225,7 @@ LAB_008d753e: iconAnimName = "IconAngelRoom"; goto LAB_008d7378; LAB_008d74b0: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; LAB_008d74b5: if ((cmpResult == 0) && ((curAnimation[0x34] == 0 || ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex != '\0')))) @@ -1234,7 +1234,7 @@ LAB_008d74ce: iconAnimName = "IconBoss"; goto LAB_008d7378; LAB_008d7448: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; LAB_008d744d: if ((cmpResult == 0) && ((curAnimation[0x34] == 0 || ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex != '\0')))) @@ -1243,7 +1243,7 @@ LAB_008d7466: iconAnimName = "IconShop"; goto LAB_008d7378; LAB_008d7353: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; LAB_008d7358: if ((cmpResult == 0) && ((curAnimation[0x34] == 0 || ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex != '\0')))) @@ -1258,7 +1258,7 @@ LAB_008d7378: *(undefined1 *)&(topAnimState->DeathScreenSprite)._shadowLayerIndex = 1; } LAB_008d7bea: - if (*(char *)((int)&topAnimState[1].CollectionMenuSprite._nullLayerNames + 1) != '\0') { + if (*(char *)(GHIDRA_INT(&topAnimState[1].CollectionMenuSprite._nullLayerNames) + 1) != '\0') { if ((char)topAnimState[1].HoldInputTimer == '\0') { AnimationState::Render ((AnimationState *)((topAnimState->DeathScreenSprite)._championColor._offset + 1),&iconPos, @@ -1275,7 +1275,7 @@ LAB_008d7bea: iconPos.x = iconPos.x + 16.0; pools = poolsBegin; LAB_008d7c59: - position = (Vector *)((int)&position->x + 1); + position = (Vector *)(GHIDRA_INT(&position->x) + 1); if (pVVar3 <= position) goto LAB_008d7c66; goto LAB_008d6c00; } @@ -1293,9 +1293,9 @@ void Menu_Collection::destructor() local_8 = 0xffffffff; puStack_c = &LAB_00afb440; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; - if ((uint)(*(int *)(in_ECX + 600) - *(int *)(in_ECX + 0x250) >> 2) < 0x2dd) { + if (GHIDRA_UINT((*(int *)(in_ECX + 600) - *(int *)(in_ECX + 0x250) >> 2)) < 0x2dd) { std::vector::_Reallocate(0x2dd); } FID_conflict__Tidy((void *)(in_ECX + 0x250)); @@ -1356,7 +1356,7 @@ void Menu_Collection::Update() local_14 = 0xffffffff; puStack_18 = &LAB_00b0b99d; local_1c = ExceptionList; - uVar3 = __security_cookie ^ (uint)(loadedImage + 0x30); + uVar3 = __security_cookie ^ GHIDRA_UINT((loadedImage + 0x30)); ExceptionList = &local_1c; lastPage = in_ECX[0x97] / 0x78; lastSlot = (in_ECX[0x97] - 1) % 0x78; @@ -1417,8 +1417,8 @@ void Menu_Collection::Update() menuManager = g_menuManager; if (cVar2 != '\0') { pvVar4 = (g_menuManager->_menuStateHistory)._end; - if (1 < (uint)((int)pvVar4 - (int)(g_menuManager->_menuStateHistory)._begin >> 2)) { - pvVar4 = (void *)((int)pvVar4 + -4); + if (1 < GHIDRA_UINT((GHIDRA_INT(pvVar4) - GHIDRA_INT((g_menuManager->_menuStateHistory)._begin) >> 2))) { + pvVar4 = (void *)(GHIDRA_INT(pvVar4) + -4); (g_menuManager->_menuStateHistory)._end = pvVar4; } ((MenuManager *)(menuManager))->MenuManager::SetState(*(int *)((char *)pvVar4 + -4),0); @@ -1431,21 +1431,21 @@ LAB_0094eba6: uVar3 = in_ECX[4]; newSlot = uVar3 - 1; in_ECX[4] = newSlot; - if ((int)newSlot < 0) { + if (GHIDRA_INT(newSlot) < 0) { page = in_ECX + 1; *page = *page - 1; in_ECX[4] = uVar3 + 0x77; - if ((int)*page < 0) { + if (GHIDRA_INT(*page) < 0) { in_ECX[1] = lastPage; in_ECX[4] = lastSlot; } } *(undefined1 *)(in_ECX + 0x8f) = 1; } - else if (0x13 < (int)uVar3) { + else if (0x13 < GHIDRA_INT(uVar3)) { uVar3 = uVar3 & 0x80000003; isRepeatTick = uVar3 == 0; - if ((int)uVar3 < 0) { + if (GHIDRA_INT(uVar3) < 0) { isRepeatTick = (uVar3 - 1 | 0xfffffffc) == 0xffffffff; } if (isRepeatTick) goto LAB_0094eba6; @@ -1458,21 +1458,21 @@ LAB_0094ebf5: uVar3 = in_ECX[4]; newSlot = uVar3 + 1; in_ECX[4] = newSlot; - if ((0x77 < (int)newSlot) || ((in_ECX[1] == lastPage && (lastSlot < (int)newSlot)))) { + if ((0x77 < GHIDRA_INT(newSlot)) || ((in_ECX[1] == lastPage && (lastSlot < GHIDRA_INT(newSlot))))) { in_ECX[4] = uVar3 - 0x77; uVar3 = in_ECX[1]; in_ECX[1] = uVar3 + 1; - if ((int)lastPage < (int)(uVar3 + 1)) { + if (GHIDRA_INT(lastPage) < GHIDRA_INT((uVar3 + 1))) { in_ECX[1] = 0; in_ECX[4] = 0; } } *(undefined1 *)(in_ECX + 0x8f) = 1; } - else if (0x13 < (int)uVar3) { + else if (0x13 < GHIDRA_INT(uVar3)) { uVar3 = uVar3 & 0x80000003; isRepeatTick = uVar3 == 0; - if ((int)uVar3 < 0) { + if (GHIDRA_INT(uVar3) < 0) { isRepeatTick = (uVar3 - 1 | 0xfffffffc) == 0xffffffff; } if (isRepeatTick) goto LAB_0094ebf5; @@ -1484,28 +1484,28 @@ LAB_0094ebf5: if (uVar3 == 0) { LAB_0094ec64: local_3c = (int *)in_ECX[4]; - in_ECX[4] = (uint)(local_3c + -5); - if ((int)(local_3c + -5) < 0) { + in_ECX[4] = GHIDRA_UINT((local_3c + -5)); + if (GHIDRA_INT((local_3c + -5)) < 0) { page = in_ECX + 1; *page = *page - 1; - if ((int)*page < 0) { + if (GHIDRA_INT(*page) < 0) { in_ECX[1] = lastPage; - clampedSlot = (int *)((int)local_3c % 0x14 + ((uint)lastSlot / 0x14) * 0x14); - if (lastSlot < (int)clampedSlot) { + clampedSlot = (int *)(GHIDRA_INT(local_3c) % 0x14 + (GHIDRA_UINT(lastSlot) / 0x14) * 0x14); + if (lastSlot < GHIDRA_INT(clampedSlot)) { clampedSlot = (int *)lastSlot; } } else { clampedSlot = local_3c + 0x19; } - in_ECX[4] = (uint)clampedSlot; + in_ECX[4] = GHIDRA_UINT(clampedSlot); } *(undefined1 *)(in_ECX + 0x8f) = 1; } - else if (0x13 < (int)uVar3) { + else if (0x13 < GHIDRA_INT(uVar3)) { uVar3 = uVar3 & 0x80000003; isRepeatTick = uVar3 == 0; - if ((int)uVar3 < 0) { + if (GHIDRA_INT(uVar3) < 0) { isRepeatTick = (uVar3 - 1 | 0xfffffffc) == 0xffffffff; } if (isRepeatTick) goto LAB_0094ec64; @@ -1514,31 +1514,31 @@ LAB_0094ec64: if (inputY <= 0.5) goto LAB_0094ed66; uVar3 = *in_ECX; if (uVar3 != 0) { - if ((int)uVar3 < 0x14) goto LAB_0094ed66; + if (GHIDRA_INT(uVar3) < 0x14) goto LAB_0094ed66; uVar3 = uVar3 & 0x80000003; isRepeatTick = uVar3 == 0; - if ((int)uVar3 < 0) { + if (GHIDRA_INT(uVar3) < 0) { isRepeatTick = (uVar3 - 1 | 0xfffffffc) == 0xffffffff; } if (!isRepeatTick) goto LAB_0094ed66; } local_3c = (int *)(in_ECX[4] + 0x14); - in_ECX[4] = (uint)local_3c; - if ((in_ECX[1] == lastPage) && (lastSlot < (int)local_3c)) { - if ((int *)((int)local_3c / 0x14) != (int *)((uint)lastSlot / 0x14)) { + in_ECX[4] = GHIDRA_UINT(local_3c); + if ((in_ECX[1] == lastPage) && (lastSlot < GHIDRA_INT(local_3c))) { + if ((int *)(GHIDRA_INT(local_3c) / 0x14) != (int *)(GHIDRA_UINT(lastSlot) / 0x14)) { in_ECX[1] = 0; - lastSlot = (int)local_3c % 0x14; + lastSlot = GHIDRA_INT(local_3c) % 0x14; } in_ECX[4] = lastSlot; - local_3c = (int *)((int)local_3c / 0x14); + local_3c = (int *)(GHIDRA_INT(local_3c) / 0x14); } - else if (0x77 < (int)local_3c) { + else if (0x77 < GHIDRA_INT(local_3c)) { uVar3 = in_ECX[1] + 1; in_ECX[1] = uVar3; - in_ECX[4] = (int)local_3c % 0x14; + in_ECX[4] = GHIDRA_INT(local_3c) % 0x14; if (uVar3 == lastPage) { uVar3 = in_ECX[4]; - if (((int)local_3c % 0x14) / lastSlot != 0) { + if ((GHIDRA_INT(local_3c) % 0x14) / lastSlot != 0) { uVar3 = lastSlot; } in_ECX[4] = uVar3; @@ -1548,12 +1548,12 @@ LAB_0094ec64: LAB_0094ed66: if ((char)in_ECX[0x8f] != '\0') { local_3c = *(int **)(in_ECX[0x94] + (in_ECX[4] + (in_ECX[1] * 0x10 - in_ECX[1]) * 8) * 4); - if ((0x2dc < (int)local_3c) || - ((&(*(undefined1 *)((char *)&((g_manager->_persistentGameData)) + 0xae8)))[(int)local_3c] != '\0')) { + if ((0x2dc < GHIDRA_INT(local_3c)) || + ((&(*(undefined1 *)((char *)&((g_manager->_persistentGameData)) + 0xae8)))[GHIDRA_INT(local_3c)] != '\0')) { if (in_ECX[0x90] != 0) { ((KAGE::SmartPointer *)(in_ECX + 0x90))->KAGE::SmartPointer::reset((void *)0x0); } - collectible = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible((int)local_3c); + collectible = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(GHIDRA_INT(local_3c)); if (collectible != (ItemConfig_Item *)0x0) { gfxPath = &collectible->gfxFilename; if (0xf < (collectible->gfxFilename)._capacity) { @@ -1580,8 +1580,8 @@ LAB_0094ed66: else { *in_ECX = *in_ECX + 1; } - in_ECX[0x92] = (uint)inputX; - in_ECX[0x93] = (uint)inputY; + in_ECX[0x92] = GHIDRA_UINT(inputX); + in_ECX[0x93] = GHIDRA_UINT(inputY); isArrowVisible = in_ECX[1] != 0; arrowLayer = ((ANM2 *)((ANM2 *)(in_ECX + 5)))->ANM2::GetLayer(&DAT_00000004); arrowLayer->_visible = isArrowVisible; @@ -1696,7 +1696,7 @@ void Menu_Collection::Render() local_14 = 0xffffffff; puStack_18 = &LAB_00b0b9fc; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(textBuffer + 0x218); + local_24 = __security_cookie ^ GHIDRA_UINT((textBuffer + 0x218)); ExceptionList = &local_1c; local_338 = 0; local_324.x = (g_menuManager->_ViewPosition).x + font->PositionX; @@ -1734,33 +1734,33 @@ void Menu_Collection::Render() local_360 = (Font *)(local_32c[4] - *(float *)(iVar6 + 0x10)); local_314 = (Menu_Collection *)((font->SelectedPage * 0x10 - font->SelectedPage) * 8); local_324.y = local_32c[5] - *(float *)(iVar6 + 0x14); - if ((int)local_314 < font->NumItems) { - while (iVar6 = font->SelectedPage * 0x10 - font->SelectedPage, (int)local_314 < iVar6 * 8 + 0x78 + if (GHIDRA_INT(local_314) < font->NumItems) { + while (iVar6 = font->SelectedPage * 0x10 - font->SelectedPage, GHIDRA_INT(local_314) < iVar6 * 8 + 0x78 ) { - local_334 = *(uint *)(*(int *)&(*(undefined1 *)((char *)(font) + 0x250)) + (int)local_314 * 4); - if (((int)local_334 < 0x2dd) && - (*(char *)((int)(g_manager->_persistentGameData)._eventCounters + local_334 + 0x82c) == + local_334 = *(uint *)(*(int *)&(*(undefined1 *)((char *)(font) + 0x250)) + GHIDRA_INT(local_314) * 4); + if ((GHIDRA_INT(local_334) < 0x2dd) && + (*(char *)(GHIDRA_INT((g_manager->_persistentGameData)._eventCounters) + local_334 + 0x82c) == '\0')) { layer = ((ANM2 *)(&font->CollectionMenuSprite))->ANM2::GetLayer(&DAT_00000005); layer->_visible = 1; if (((font->CollectionMenuSprite)._animState._animData != (void *)0x0) && - ((5 < *(int *)((int)(font->CollectionMenuSprite)._animState._animation + 0x80) || + ((5 < *(int *)(GHIDRA_INT((font->CollectionMenuSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 5 < *(int *)((int)(font->CollectionMenuSprite)._animState._animation + 0x80))))) { + 5 < *(int *)(GHIDRA_INT((font->CollectionMenuSprite)._animState._animation) + 0x80))))) { pvVar2 = (font->CollectionMenuSprite)._animState._animData; local_340 = *(int *)((char *)pvVar2 + 0x4c); if ((pvVar2 == (void *)0x0) || ((local_340 < 0 || (*(int *)((char *)pvVar2 + 0x1c) <= local_340)))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(font->CollectionMenuSprite)._animState._layerFrames + local_340 * 4) + *(undefined4 *)(GHIDRA_INT((font->CollectionMenuSprite)._animState._layerFrames) + local_340 * 4) = 0; AnimationState::AdvanceLayerPosition (&(font->CollectionMenuSprite)._animState,local_340,2.0); } - iconPos.y = (float)(((int)local_314 + (font->SelectedPage * 0x10 - font->SelectedPage) * -8) + iconPos.y = (float)((GHIDRA_INT(local_314) + (font->SelectedPage * 0x10 - font->SelectedPage) * -8) / 0x14) * 16.0 + originY; - iconPos.x = (float)((int)local_314 % 0x14) * 16.0 + originX; + iconPos.x = (float)(GHIDRA_INT(local_314) % 0x14) * 16.0 + originX; if ((font->CollectionMenuSprite)._loaded != 0) { if ((font->CollectionMenuSprite)._overlayRenderFirst == 0) { pvVar2 = (font->CollectionMenuSprite)._animState._animData; @@ -1769,7 +1769,7 @@ void Menu_Collection::Render() 5 < pageAnm->_layerCount)) && (iVar6 = *(int *)((char *)pvVar2 + 0x4c), -1 < iVar6)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar6 * 0x10 + *(int *)((char *)pvVar2 + 0x18)),&iconPos, - *(int *)((int)(font->CollectionMenuSprite)._animState._layerFrames + + *(int *)(GHIDRA_INT((font->CollectionMenuSprite)._animState._layerFrames) + iVar6 * 4),&g_vectorZero,&g_vectorZero,pageAnm); } pvVar2 = (font->CollectionMenuSprite)._overlayAnimState._animData; @@ -1788,7 +1788,7 @@ void Menu_Collection::Render() 5 < pageAnm->_layerCount)) && (iVar6 = *(int *)((char *)pvVar2 + 0x4c), -1 < iVar6)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar6 * 0x10 + *(int *)((char *)pvVar2 + 0x18)),&iconPos, - *(int *)((int)(font->CollectionMenuSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((font->CollectionMenuSprite)._overlayAnimState._layerFrames) + iVar6 * 4),&g_vectorZero,&g_vectorZero,pageAnm); } pvVar2 = (font->CollectionMenuSprite)._animState._animData; @@ -1808,26 +1808,26 @@ LAB_0094f2e6: layer->_visible = 0; } else { - local_330 = (float)((int)local_314 % 0x14); - local_340 = ((int)local_314 + iVar6 * -8) / 0x14; - if ((int)local_334 < 0x2dd) { + local_330 = (float)(GHIDRA_INT(local_314) % 0x14); + local_340 = (GHIDRA_INT(local_314) + iVar6 * -8) / 0x14; + if (GHIDRA_INT(local_334) < 0x2dd) { if (((font->DeathScreenSprite)._animState._animData != (void *)0x0) && - ((6 < *(int *)((int)(font->DeathScreenSprite)._animState._animation + 0x80) || + ((6 < *(int *)(GHIDRA_INT((font->DeathScreenSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 6 < *(int *)((int)(font->DeathScreenSprite)._animState._animation + 0x80))))) { + 6 < *(int *)(GHIDRA_INT((font->DeathScreenSprite)._animState._animation) + 0x80))))) { pvVar2 = (font->DeathScreenSprite)._animState._animData; local_344 = *(float *)((char *)pvVar2 + 0x50); if ((pvVar2 == (void *)0x0) || - (((int)local_344 < 0 || (*(int *)((char *)pvVar2 + 0x1c) <= (int)local_344)))) { + ((GHIDRA_INT(local_344) < 0 || (*(int *)((char *)pvVar2 + 0x1c) <= GHIDRA_INT(local_344))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } *(undefined4 *) - ((int)(font->DeathScreenSprite)._animState._layerFrames + (int)local_344 * 4) = 0; + (GHIDRA_INT((font->DeathScreenSprite)._animState._layerFrames) + GHIDRA_INT(local_344) * 4) = 0; AnimationState::AdvanceLayerPosition - (&(font->DeathScreenSprite)._animState,(int)local_344, - (float)(int)(local_334 - 1)); + (&(font->DeathScreenSprite)._animState,GHIDRA_INT(local_344), + (float)GHIDRA_INT((local_334 - 1))); } - local_34c.x = (float)(int)local_330 * 16.0 + (float)local_360 + originX; + local_34c.x = (float)GHIDRA_INT(local_330) * 16.0 + (float)local_360 + originX; local_34c.y = (float)local_340 * 16.0 + local_324.y + originY; if ((font->DeathScreenSprite)._loaded != 0) { if ((font->DeathScreenSprite)._overlayRenderFirst == 0) { @@ -1839,7 +1839,7 @@ LAB_0094f2e6: AnimationLayer::RenderFrame ((AnimationLayer *)(iVar6 * 0x10 + *(int *)((char *)pvVar2 + 0x18)), &local_34c, - *(int *)((int)(font->DeathScreenSprite)._animState._layerFrames + + *(int *)(GHIDRA_INT((font->DeathScreenSprite)._animState._layerFrames) + iVar6 * 4),&g_vectorZero,&g_vectorZero,pageAnm); } pvVar2 = (font->DeathScreenSprite)._overlayAnimState._animData; @@ -1861,7 +1861,7 @@ LAB_0094f2e6: AnimationLayer::RenderFrame ((AnimationLayer *)(iVar6 * 0x10 + *(int *)((char *)pvVar2 + 0x18)), &local_34c, - *(int *)((int)(font->DeathScreenSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((font->DeathScreenSprite)._overlayAnimState._layerFrames) + iVar6 * 4),&g_vectorZero,&g_vectorZero,pageAnm); } pvVar2 = (font->DeathScreenSprite)._animState._animData; @@ -1901,15 +1901,15 @@ LAB_0094f63c: renderColor._colorize[1] = 0.0; renderColor._colorize[2] = 0.0; renderColor._colorize[3] = 0.0; - local_354.x = (float)(int)local_330 * 16.0 + fVar8 + local_32c[4]; + local_354.x = (float)GHIDRA_INT(local_330) * 16.0 + fVar8 + local_32c[4]; local_354.y = (float)local_340 * 16.0 + fVar7 + local_32c[5]; ModManager::RenderCustomCollectionItem (&g_manager->_modManager,local_334,&local_354,&g_vectorOne,&renderColor, &local_26c); } } - local_314 = (Menu_Collection *)((int)&local_314->HoldInputTimer + 1); - if (font->NumItems <= (int)local_314) break; + local_314 = (Menu_Collection *)(GHIDRA_INT(&local_314->HoldInputTimer) + 1); + if (font->NumItems <= GHIDRA_INT(local_314)) break; fVar7 = originY; fVar8 = originX; } @@ -1926,21 +1926,21 @@ LAB_0094f63c: uVar4 = *(uint *)(*(int *)&(*(undefined1 *)((char *)(font) + 0x250)) + (font->SelectedElement + (font->SelectedPage * 0x10 - font->SelectedPage) * 8) * 4); - if ((0x2dc < (int)uVar4) || - (*(char *)((int)(g_manager->_persistentGameData)._eventCounters + uVar4 + 0x82c) != '\0')) { + if ((0x2dc < GHIDRA_INT(uVar4)) || + (*(char *)(GHIDRA_INT((g_manager->_persistentGameData)._eventCounters) + uVar4 + 0x82c) != '\0')) { local_360 = &g_manager->_font2_TeamMeatEx12; _eh_vector_constructor_iterator_(&nameStrings,0x18,2,FUN_0040c380,std::string::_Tidy_deallocate) ; local_14 = 0; if (g_game == (Game *)0x0) { - if (-1 < (int)uVar4) goto LAB_0094f7c9; + if (-1 < GHIDRA_INT(uVar4)) goto LAB_0094f7c9; } else { - if ((int)uVar4 < 0) { - if (((int)uVar4 < 0) && + if (GHIDRA_INT(uVar4) < 0) { + if ((GHIDRA_INT(uVar4) < 0) && (pvVar2 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)~uVar4 < - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar2 >> 2)) { + GHIDRA_INT(~uVar4) < + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar2) >> 2)) { local_314 = (Menu_Collection *)**(undefined4 **)((char *)pvVar2 + ~uVar4 * 4); } else { @@ -1950,7 +1950,7 @@ LAB_0094f63c: else { LAB_0094f7c9: pvVar2 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar2 >> 2 <= (int)uVar4) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar2) >> 2 <= GHIDRA_INT(uVar4)) goto LAB_0094f92f; local_314 = *(Menu_Collection **)((char *)pvVar2 + uVar4 * 4); } @@ -1960,23 +1960,23 @@ LAB_0094f7c9: lineString = &nameStrings; if (lineString != (std_string *)local_324.y) { ((std::string *)(lineString->_buf))->std::string::_Tidy_deallocate(); - nameStrings._buf._0_4_ = *(undefined4 *)(char *)local_324.y; - nameStrings._buf._4_4_ = *(undefined4 *)((char *)local_324.y + 4); - nameStrings._buf._8_4_ = *(undefined4 *)((char *)local_324.y + 8); - nameStrings._buf._12_4_ = *(undefined4 *)((char *)local_324.y + 0xc); - nameStrings._16_8_ = *(undefined8 *)((char *)local_324.y + 0x10); + (*(undefined4 *)((char *)&(nameStrings._buf) + 0x0)) = *(undefined4 *)(char *)local_324.y; + (*(undefined4 *)((char *)&(nameStrings._buf) + 0x4)) = *(undefined4 *)((char *)local_324.y + 4); + (*(undefined4 *)((char *)&(nameStrings._buf) + 0x8)) = *(undefined4 *)((char *)local_324.y + 8); + (*(undefined4 *)((char *)&(nameStrings._buf) + 0xc)) = *(undefined4 *)((char *)local_324.y + 0xc); + (*(undefined8 *)((char *)&(nameStrings) + 0x10)) = *(undefined8 *)((char *)local_324.y + 0x10); *(uint *)((char *)local_324.y + 0x10) = 0; *(uint *)((char *)local_324.y + 0x14) = 0xf; *(char *)local_324.y = '\0'; lineString = extraout_ECX; } - if (0xf < (uint)local_26c._unk) { + if (0xf < GHIDRA_UINT(local_26c._unk)) { allocSize = local_26c._unk + 1; pvVar2 = tmpString; if (0xfff < allocSize) { pvVar2 = *(void **)((char *)tmpString + -4); allocSize = local_26c._unk + 0x24; - if (0x1f < (uint)((int)tmpString + (-4 - (int)pvVar2))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString) + (-4 - GHIDRA_INT(pvVar2))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1986,25 +1986,25 @@ LAB_0094f7c9: } local_324.y = (float)ItemConfig_Item::get_localized_description ((ItemConfig_Item *)local_314,(std_string *)&tmpString, - (int)lineString); + GHIDRA_INT(lineString)); if (&descriptionString != (std_string *)local_324.y) { ((std::string *)(descriptionString._buf))->std::string::_Tidy_deallocate(); - descriptionString._buf._0_4_ = *(undefined4 *)(char *)local_324.y; - descriptionString._buf._4_4_ = *(undefined4 *)((char *)local_324.y + 4); - descriptionString._buf._8_4_ = *(undefined4 *)((char *)local_324.y + 8); - descriptionString._buf._12_4_ = *(undefined4 *)((char *)local_324.y + 0xc); - descriptionString._16_8_ = *(undefined8 *)((char *)local_324.y + 0x10); + (*(undefined4 *)((char *)&(descriptionString._buf) + 0x0)) = *(undefined4 *)(char *)local_324.y; + (*(undefined4 *)((char *)&(descriptionString._buf) + 0x4)) = *(undefined4 *)((char *)local_324.y + 4); + (*(undefined4 *)((char *)&(descriptionString._buf) + 0x8)) = *(undefined4 *)((char *)local_324.y + 8); + (*(undefined4 *)((char *)&(descriptionString._buf) + 0xc)) = *(undefined4 *)((char *)local_324.y + 0xc); + (*(undefined8 *)((char *)&(descriptionString) + 0x10)) = *(undefined8 *)((char *)local_324.y + 0x10); *(uint *)((char *)local_324.y + 0x10) = 0; *(uint *)((char *)local_324.y + 0x14) = 0xf; *(char *)local_324.y = '\0'; } - if (0xf < (uint)local_26c._unk) { + if (0xf < GHIDRA_UINT(local_26c._unk)) { allocSize = local_26c._unk + 1; pvVar2 = tmpString; if (0xfff < allocSize) { pvVar2 = *(void **)((char *)tmpString + -4); allocSize = local_26c._unk + 0x24; - if (0x1f < (uint)((int)tmpString + (-4 - (int)pvVar2))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString) + (-4 - GHIDRA_INT(pvVar2))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2013,7 +2013,7 @@ LAB_0094f7c9: } local_26c._alpha = 0.0; local_26c._unk = 0xf; - tmpString = (void *)((uint)tmpString & 0xffffff00); + tmpString = (void *)(GHIDRA_UINT(tmpString) & 0xffffff00); } } LAB_0094f92f: @@ -2052,10 +2052,10 @@ LAB_0094f92f: renderColor._colorize[3] = 0.0; if (uVar4 == 0x279) { uVar4 = g_manager->_framecount / 2 & 0x800000ff; - if ((int)uVar4 < 0) { + if (GHIDRA_INT(uVar4) < 0) { uVar4 = (uVar4 - 1 | 0xffffff00) + 1; } - renderColor._colorize[3] = (float)(int)uVar4 * 0.00390625; + renderColor._colorize[3] = (float)GHIDRA_INT(uVar4) * 0.00390625; } srcCorner3X = srcCorner1X; srcCorner3Y = srcCorner2Y; @@ -2090,7 +2090,7 @@ LAB_0094f92f: charCursor = textCursor->_buf; textCursor = (std_string *)(textCursor->_buf + 1); } while (*charCursor != 0); - iVar6 = (int)textCursor - (int)local_324.y; + iVar6 = GHIDRA_INT(textCursor) - GHIDRA_INT(local_324.y); } text_convert_encoding((byte *)text,iVar6,0,textBuffer,0x100,1); layoutParams = 0; @@ -2100,9 +2100,9 @@ LAB_0094f92f: local_26c._blue = -NAN; local_26c._alpha = 0.0; local_26c._unk = 0; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; pvVar2 = ((Font *)(font))->Font::layout_glyphs(glyphRun,textBuffer,&layoutParams,&g_vectorOne); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; color._blue = 0.38039216; color._red = 0.47058824; color._green = 0.44705883; @@ -2112,11 +2112,11 @@ LAB_0094f92f: ; std::vector<12byte>::clear(); std::vector<12byte>::_Tidy(); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; } local_314 = (Menu_Collection *)((float)local_314 + 15.0); lineString = lineString + 1; - local_32c = (float *)((int)local_32c + -1); + local_32c = (float *)(GHIDRA_INT(local_32c) + -1); } while (local_32c != (float *)0x0); local_32c = (float *)0x0; font = local_33c; @@ -2125,7 +2125,7 @@ LAB_0094f92f: local_14 = 0xffffffff; _eh_vector_destructor_iterator_(&nameStrings,0x18,2,std::string::_Tidy_deallocate); } - uVar4 = (uint)font->NumItems / 0x78; + uVar4 = GHIDRA_UINT(font->NumItems) / 0x78; local_334 = uVar4; if ((font->CollectionMenuSprite)._animState._animData == (void *)0x0) { local_314 = (Menu_Collection *)0x0; @@ -2162,7 +2162,7 @@ LAB_0094fd15: originX = originX + (float)local_314->HoldInputTimer + 0.0; local_33c = (Menu_Collection *) (-local_330 * (float)uVar4 * 0.5 + originY + (float)local_314->SelectedPage); - if (-1 < (int)local_334) { + if (-1 < GHIDRA_INT(local_334)) { do { pageMarkersTop = (float)local_33c; pvVar2 = ((ANM2 *)(&font->CollectionMenuSprite))->ANM2::GetAnimationData(s_Idle); @@ -2229,7 +2229,7 @@ LAB_0094fd15: local_36c = 1; local_26c._unk = 0; local_354.y = (((float)iVar6 * local_330 + pageMarkersTop) - framePivotY) + - ((float)iVar6 * -1.0) / (float)(int)local_334; + ((float)iVar6 * -1.0) / (float)GHIDRA_INT(local_334); local_354.x = originX - framePivotX; local_26c._red = 1.0; local_26c._green = 1.0; @@ -2275,7 +2275,7 @@ LAB_0094fd15: } iVar6 = iVar6 + 1; local_14 = 0xffffffff; - } while (iVar6 <= (int)local_334); + } while (iVar6 <= GHIDRA_INT(local_334)); } } uVar4 = 0x1505; @@ -2287,7 +2287,7 @@ LAB_0094fd15: if (0x19 < (byte)(shaderNameChar + 0xbf)) { lowerChar = shaderNameChar; } - allocSize = (uint)lowerChar; + allocSize = GHIDRA_UINT(lowerChar); if (lowerChar == 0x5c) { allocSize = 0x2f; } @@ -2349,7 +2349,7 @@ LAB_00950319: bVar4 = bVar1 < *idleName; if (bVar1 != *idleName) { LAB_00950306: - uVar2 = -(uint)bVar4 | 1; + uVar2 = -GHIDRA_UINT(bVar4) | 1; goto LAB_0095030b; } if (bVar1 == 0) break; @@ -2379,7 +2379,7 @@ LAB_0095030b: bVar4 = bVar1 < (byte)*diaryName; if (bVar1 != *diaryName) { LAB_00950382: - uVar2 = -(uint)bVar4 | 1; + uVar2 = -GHIDRA_UINT(bVar4) | 1; goto LAB_00950387; } if (bVar1 == 0) break; @@ -2405,7 +2405,7 @@ LAB_009503b3: layer = ((ANM2 *)(diarySprite))->ANM2::GetLayer(pbVar3); pbVar3 = pbVar3 + 1; layer->_visible = 0; - } while ((int)pbVar3 < 7); + } while (GHIDRA_INT(pbVar3) < 7); layer = ((ANM2 *)(diarySprite))->ANM2::GetLayer(&DAT_00000006); manager = g_manager; uVar2 = 0; @@ -2417,20 +2417,20 @@ LAB_009503b3: in_ECX[0x97] = 0; in_ECX[0x95] = in_ECX[0x94]; *(undefined1 *)(in_ECX + 0x8f) = 1; - if ((int)(manager->_itemConfig)._collectibles._end - - (int)(manager->_itemConfig)._collectibles._begin >> 2 != 0) { + if (GHIDRA_INT((manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((manager->_itemConfig)._collectibles._begin) >> 2 != 0) { game = g_game; do { if (game == (Game *)0x0) { - if (-1 < (int)uVar2) goto LAB_0095047b; + if (-1 < GHIDRA_INT(uVar2)) goto LAB_0095047b; } else { - if ((int)uVar2 < 0) { - if (((int)uVar2 < 0) && - ((int)~uVar2 < - (int)(game->_proceduralItemManager)._proceduralItems._end - - (int)(game->_proceduralItemManager)._proceduralItems._begin >> 2)) { - itemConfig = **(int **)((int)(game->_proceduralItemManager)._proceduralItems._begin + + if (GHIDRA_INT(uVar2) < 0) { + if ((GHIDRA_INT(uVar2) < 0) && + (GHIDRA_INT(~uVar2) < + GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._end) - + GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._begin) >> 2)) { + itemConfig = **(int **)(GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._begin) + ~uVar2 * 4); } else { @@ -2440,8 +2440,8 @@ LAB_009503b3: else { LAB_0095047b: collectibleConfigs = (manager->_itemConfig)._collectibles._begin; - if ((int)(manager->_itemConfig)._collectibles._end - (int)collectibleConfigs >> 2 <= - (int)uVar2) goto LAB_009504e4; + if (GHIDRA_INT((manager->_itemConfig)._collectibles._end) - GHIDRA_INT(collectibleConfigs) >> 2 <= + GHIDRA_INT(uVar2)) goto LAB_009504e4; itemConfig = *(int *)((char *)collectibleConfigs + uVar2 * 4); } if (((itemConfig != 0) && (*(int *)(itemConfig + 0x48) != 0)) && @@ -2462,8 +2462,8 @@ LAB_0095047b: } LAB_009504e4: uVar2 = uVar2 + 1; - } while (uVar2 < (uint)((int)(manager->_itemConfig)._collectibles._end - - (int)(manager->_itemConfig)._collectibles._begin >> 2)); + } while (uVar2 < GHIDRA_UINT((GHIDRA_INT((manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((manager->_itemConfig)._collectibles._begin) >> 2))); } return; } diff --git a/src/game/menu_controller_select.cpp b/src/game/menu_controller_select.cpp index a7b86dc..79e4271 100644 --- a/src/game/menu_controller_select.cpp +++ b/src/game/menu_controller_select.cpp @@ -31,7 +31,7 @@ void Menu_ControllerSelect::Update() local_8 = 0xffffffff; puStack_c = &LAB_00b05835; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar3 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; piVar5 = in_ECX; if (*(char *)((char *)in_ECX + 0x119) != '\0') { @@ -64,7 +64,7 @@ void Menu_ControllerSelect::Update() buffer = operator_new_tracked(0x40); deviceId = 0; *buffer = 0; - local_8 = CONCAT31(local_8._1_3_,3); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); newEntry = buffer; (**(code **)(*device + 0xc))(); sprintf_s(buffer,0x40,&DAT_00b62fdc); @@ -73,7 +73,7 @@ void Menu_ControllerSelect::Update() ch = *pbVar6; pbVar6 = pbVar6 + 1; } while (ch != 0); - if (0x12 < (uint)((int)pbVar6 - (int)(buffer + 1))) { + if (0x12 < GHIDRA_UINT((GHIDRA_INT(pbVar6) - GHIDRA_INT((buffer + 1))))) { buffer[0x10] = 0x2e; buffer[0x11] = 0x2e; buffer[0x12] = 0; @@ -93,19 +93,19 @@ void Menu_ControllerSelect::Update() in_ECX[0x4a] = in_ECX[0x4a] + 8; iVar4 = in_ECX[0x4a]; } - if (5 < (uint)(iVar4 - in_ECX[0x49] >> 3)) { + if (5 < GHIDRA_UINT((iVar4 - in_ECX[0x49] >> 3))) { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (buffer != (byte *)0x0) { uVar3 = *(uint *)(buffer + -4); qVar1 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar3; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar3; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar1 < uVar3); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar3)); free(buffer + -4); } local_8 = 5; @@ -120,14 +120,14 @@ void Menu_ControllerSelect::Update() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (buffer != (byte *)0x0) { uVar3 = *(uint *)(buffer + -4); qVar1 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar3; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar3; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar1 < uVar3); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar3)); free(buffer + -4); } local_8 = 7; @@ -144,7 +144,7 @@ void Menu_ControllerSelect::Update() local_8 = 0xffffffff; piVar5 = in_ECX + 0x49; uVar3 = in_ECX[0x4a] - *piVar5 >> 3; - if (uVar3 <= (uint)in_ECX[1]) { + if (uVar3 <= GHIDRA_UINT(in_ECX[1])) { in_ECX[1] = uVar3 - 1; } local_18 = 0xe; @@ -178,8 +178,8 @@ void Menu_ControllerSelect::Update() } else { historyEnd = (g_menuManager->_menuStateHistory)._end; - if (1 < (uint)((int)historyEnd - (int)(g_menuManager->_menuStateHistory)._begin >> 2)) { - historyEnd = (void *)((int)historyEnd + -4); + if (1 < GHIDRA_UINT((GHIDRA_INT(historyEnd) - GHIDRA_INT((g_menuManager->_menuStateHistory)._begin) >> 2))) { + historyEnd = (void *)(GHIDRA_INT(historyEnd) + -4); (g_menuManager->_menuStateHistory)._end = historyEnd; } ((MenuManager *)(menuManager))->MenuManager::SetState(*(int *)((char *)historyEnd + -4),0); @@ -243,7 +243,7 @@ void Menu_ControllerSelect::Render() local_8 = 0xffffffff; puStack_c = &LAB_00b0587b; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(nameText + 0x110); + local_14 = __security_cookie ^ GHIDRA_UINT((nameText + 0x110)); ExceptionList = &local_10; cursorLayer = ((ANM2 *)(&this->ControllerSelectSprite))->ANM2::GetLayer((byte *)0x2); cursorLayer->_visible = 0; @@ -279,7 +279,7 @@ void Menu_ControllerSelect::Render() ch = *textEnd; textEnd = textEnd + 1; } while (ch != 0); - iVar2 = (int)textEnd - (int)(text + 1); + iVar2 = GHIDRA_INT(textEnd) - GHIDRA_INT((text + 1)); } text_convert_encoding(text,iVar2,0,nameText,0x80,1); font = &g_manager->_font2_TeamMeatEx12; @@ -294,11 +294,11 @@ void Menu_ControllerSelect::Render() local_134 = 0; local_130 = 0; local_8 = 0; - textY = (float)((double)(int)row + __uint_to_double_fixup[-((int)row >> 0x1f)]) * 20.0 + listY + textY = (float)((double)GHIDRA_INT(row) + __uint_to_double_fixup[-(GHIDRA_INT(row) >> 0x1f)]) * 20.0 + listY ; - textX = listX - (float)((double)(int)row + __uint_to_double_fixup[-((int)row >> 0x1f)]) * 4.0; + textX = listX - (float)((double)GHIDRA_INT(row) + __uint_to_double_fixup[-(GHIDRA_INT(row) >> 0x1f)]) * 4.0; pvVar1 = ((Font *)(font))->Font::layout_glyphs(glyphRun,nameText,&fontParams,&g_vectorOne); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); color._blue = 0.1764706; color._red = 0.21176471; color._green = 0.18431373; @@ -310,7 +310,7 @@ void Menu_ControllerSelect::Render() local_8 = 0xffffffff; row = row + 1; iVar2 = this[1].HoldInputTimer; - } while (row < (uint)(this[1].SelectedElement - iVar2 >> 3)); + } while (row < GHIDRA_UINT((this[1].SelectedElement - iVar2 >> 3))); } cursorLayer = ((ANM2 *)(&this->ControllerSelectSprite))->ANM2::GetLayer((byte *)0x2); cursorLayer->_visible = 1; @@ -326,7 +326,7 @@ void Menu_ControllerSelect::Render() 2 < animation->_layerCount)) && (iVar2 = *(int *)((char *)pvVar1 + 0x40), -1 < iVar2)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar2 * 0x10 + *(int *)((char *)pvVar1 + 0x18)),&renderPos, - *(int *)((int)(this->ControllerSelectSprite)._animState._layerFrames + iVar2 * 4) + *(int *)(GHIDRA_INT((this->ControllerSelectSprite)._animState._layerFrames) + iVar2 * 4) ,&g_vectorZero,&g_vectorZero,animation); } pvVar1 = (this->ControllerSelectSprite)._overlayAnimState._animData; @@ -353,7 +353,7 @@ void Menu_ControllerSelect::Render() 2 < animation->_layerCount)) && (iVar2 = *(int *)((char *)pvVar1 + 0x40), -1 < iVar2)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar2 * 0x10 + *(int *)((char *)pvVar1 + 0x18)),&renderPos, - *(int *)((int)(this->ControllerSelectSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((this->ControllerSelectSprite)._overlayAnimState._layerFrames) + iVar2 * 4),&g_vectorZero,&g_vectorZero,animation); } pvVar1 = (this->ControllerSelectSprite)._animState._animData; diff --git a/src/game/menu_create_lobby.cpp b/src/game/menu_create_lobby.cpp index f04695e..a5709b6 100644 --- a/src/game/menu_create_lobby.cpp +++ b/src/game/menu_create_lobby.cpp @@ -17,14 +17,14 @@ void Menu_CreateLobby::unload_graphics() local_10 = ExceptionList; ExceptionList = &local_10; this->ANM2::Reset(); - spriteFields = (undefined4 *)((int)this + 0x13c); + spriteFields = (undefined4 *)(GHIDRA_INT(this) + 0x13c); remaining = 6; do { if (spriteFields[-6] != 0) { AnmCache::RemoveRef((std_string *)(spriteFields + -10)); } animNameBuf = spriteFields + -10; - if (0xf < (uint)spriteFields[-5]) { + if (0xf < GHIDRA_UINT(spriteFields[-5])) { animNameBuf = (undefined4 *)*animNameBuf; } spriteFields[-6] = 0; @@ -32,7 +32,7 @@ void Menu_CreateLobby::unload_graphics() ((AnimationState *)((AnimationState *)(spriteFields + 2)))->AnimationState::SetAnimationData((void *)0x0); ((AnimationState *)((AnimationState *)(spriteFields + 10)))->AnimationState::SetAnimationData((void *)0x0); animNameBuf = spriteFields + -4; - if (0xf < (uint)spriteFields[1]) { + if (0xf < GHIDRA_UINT(spriteFields[1])) { animNameBuf = (undefined4 *)*animNameBuf; } *spriteFields = 0; @@ -41,7 +41,7 @@ void Menu_CreateLobby::unload_graphics() spriteFields[0x13] = 0; spriteFields[0x14] = 0; if (layerStates != (void *)0x0) { - ptr = (uint *)((int)layerStates + -4); + ptr = (uint *)(GHIDRA_INT(layerStates) + -4); local_8 = 0; _eh_vector_destructor_iterator_(layerStates,0xa0,*ptr,LayerState::~LayerState); operator_delete(ptr,*ptr * 0xa0 + 4); @@ -113,11 +113,11 @@ void Menu_CreateLobby::load_graphics(ANM2 *menuSprite) undefined4 local_14; byte *currentAnim; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00af1f85; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; menuAnmPath._size = 0; menuAnmPath._capacity = 0xf; @@ -125,20 +125,20 @@ void Menu_CreateLobby::load_graphics(ANM2 *menuSprite) menuAnmPath._buf[1] = '\0'; menuAnmPath._buf[2] = '\0'; menuAnmPath._buf[3] = '\0'; - menuAnmPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(menuAnmPath._buf) + 0x0)) = std::_Allocate(0x30); menuAnmPath._size = 0x25; menuAnmPath._capacity = 0x2f; - builtin_strncpy((char *)menuAnmPath._buf._0_4_,"gfx/ui/main menu/CreateLobbyMenu.anm2",0x26); + builtin_strncpy((*(undefined4 *)((char *)&((char *)menuAnmPath._buf) + 0x0)),"gfx/ui/main menu/CreateLobbyMenu.anm2",0x26); local_14 = 0; ((ANM2 *)(menuSprite))->ANM2::Load(&menuAnmPath,1); local_14 = 0xffffffff; if (0xf < menuAnmPath._capacity) { uVar2 = menuAnmPath._capacity + 1; - freeBlock = (char *)menuAnmPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)menuAnmPath._buf) + 0x0)); if (0xfff < uVar2) { - freeBlock = *(char **)(menuAnmPath._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(menuAnmPath._buf) + 0x0)) + -4); uVar2 = menuAnmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(menuAnmPath._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(menuAnmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { LAB_008cbe44: local_14 = 0xffffffff; /* WARNING: Subroutine does not return */ @@ -159,7 +159,7 @@ LAB_008cbe44: isLess = bVar1 < *idleNameCursor; if (bVar1 != *idleNameCursor) { LAB_008cbe90: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_008cbe95; } if (bVar1 == 0) break; @@ -189,27 +189,27 @@ LAB_008cbec1: boxesAnmPath._buf[1] = '\0'; boxesAnmPath._buf[2] = '\0'; boxesAnmPath._buf[3] = '\0'; - boxesAnmPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(boxesAnmPath._buf) + 0x0)) = std::_Allocate(0x30); boxesAnmPath._size = 0x26; boxesAnmPath._capacity = 0x2f; - builtin_strncpy((char *)boxesAnmPath._buf._0_4_,"gfx/ui/main menu/CreateLobbyBoxes.anm2",0x27); + builtin_strncpy((*(undefined4 *)((char *)&((char *)boxesAnmPath._buf) + 0x0)),"gfx/ui/main menu/CreateLobbyBoxes.anm2",0x27); local_14 = 1; ((ANM2 *)(boxSprite))->ANM2::Load(&boxesAnmPath,1); local_14 = 0xffffffff; if (0xf < boxesAnmPath._capacity) { uVar2 = boxesAnmPath._capacity + 1; - freeBlock = (char *)boxesAnmPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)boxesAnmPath._buf) + 0x0)); if (0xfff < uVar2) { - freeBlock = *(char **)(boxesAnmPath._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(boxesAnmPath._buf) + 0x0)) + -4); uVar2 = boxesAnmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(boxesAnmPath._buf._0_4_ + (-4 - (int)freeBlock))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(boxesAnmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) goto LAB_008cbe44; } operator_delete(freeBlock,uVar2); } boxesAnmPath._size = 0; boxesAnmPath._capacity = 0xf; - boxesAnmPath._buf._0_4_ = boxesAnmPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(boxesAnmPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(boxesAnmPath._buf) + 0x0)) & 0xffffff00; FUN_008cd670(boxIndex); boxIndex = boxIndex + 1; boxSprite = (ANM2 *)(boxSprite[1]._filename._buf + 0xc); @@ -241,7 +241,7 @@ void Menu_CreateLobby::update_paper_layers() lobbyMode = *(int *)&g_manager->_lobbySettings; do { layerIndex = (byte *)0x0; - paper = (ANM2 *)((int)paper + paperIndex * 0x120 + 0x114); + paper = (ANM2 *)(GHIDRA_INT(paper) + paperIndex * 0x120 + 0x114); if (paper->_layerCount != 0) { do { pLVar2 = ((ANM2 *)(paper))->ANM2::GetLayer(layerIndex); @@ -292,7 +292,7 @@ void Menu_CreateLobby::update_paper_layers() LAB_008cc99f: pLVar2 = ((ANM2 *)(paper))->ANM2::GetLayer((byte *)"Password"); pLVar2->_visible = 1; - frame = (uint)((manager->_lobbySettings)._password._size != 0); + frame = GHIDRA_UINT(((manager->_lobbySettings)._password._size != 0)); pLVar2 = ((ANM2 *)(paper))->ANM2::GetLayer((byte *)"Password"); if (pLVar2 != (LayerState *)0x0) goto LAB_008cc9e5; KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); @@ -308,7 +308,7 @@ LAB_008cc99f: KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(paper))->ANM2::SetLayerFrame(*(int *)pLVar2->_layerData,(uint)(settingValue != 0)); + ((ANM2 *)(paper))->ANM2::SetLayerFrame(*(int *)pLVar2->_layerData,GHIDRA_UINT((settingValue != 0))); } pLVar2 = ((ANM2 *)(paper))->ANM2::GetLayer(&DAT_00b75640); if (pLVar2 == (LayerState *)0x0) { @@ -346,7 +346,7 @@ LAB_008cc99f: KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(paper))->ANM2::SetLayerFrame(*(int *)pLVar2->_layerData,(uint)(0 < settingValue)); + ((ANM2 *)(paper))->ANM2::SetLayerFrame(*(int *)pLVar2->_layerData,GHIDRA_UINT((0 < settingValue))); } pLVar2 = ((ANM2 *)(paper))->ANM2::GetLayer((byte *)"Challenge"); pLVar2->_visible = 1; diff --git a/src/game/menu_custom_challenge.cpp b/src/game/menu_custom_challenge.cpp index ede9121..7a5413e 100644 --- a/src/game/menu_custom_challenge.cpp +++ b/src/game/menu_custom_challenge.cpp @@ -48,7 +48,7 @@ void Menu_CustomChallenge::Update() local_8 = (void *)0xffffffff; puStack_c = &LAB_00af32ed; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(seedText + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((seedText + 10)); ExceptionList = &local_10; if (((g_manager->_framecount & 1) == 0) && ((*(undefined1 *)((char *)&(this[0x46]) + 0x1)) != '\0')) { ((AnimationState *)((AnimationState *)(this + 0x10)))->AnimationState::Update(); @@ -79,30 +79,30 @@ void Menu_CustomChallenge::Update() else { MVar1 = this[1]; if (((MVar1 == (Menu_CustomChallenge)0x0) || - ((0x31 < (int)MVar1 && ((int)MVar1 % 10 == 0)))) && - (MVar1 = *this, *this = (Menu_CustomChallenge)((int)MVar1 + 1), - ((int)(manager->_challengeParams)._end - (int)(manager->_challengeParams)._begin) / - 0xa4 <= (int)MVar1 + 1)) { + ((0x31 < GHIDRA_INT(MVar1) && (GHIDRA_INT(MVar1) % 10 == 0)))) && + (MVar1 = *this, *this = (Menu_CustomChallenge)(GHIDRA_INT(MVar1) + 1), + (GHIDRA_INT((manager->_challengeParams)._end) - GHIDRA_INT((manager->_challengeParams)._begin)) / + 0xa4 <= GHIDRA_INT(MVar1) + 1)) { *this = (Menu_CustomChallenge)0x2e; } } } else { MVar1 = this[1]; - if (((MVar1 == (Menu_CustomChallenge)0x0) || ((0x31 < (int)MVar1 && ((int)MVar1 % 10 == 0))) - ) && (MVar1 = *this, *this = (Menu_CustomChallenge)((int)MVar1 + -1), - (int)MVar1 + -1 < 0x2e)) { + if (((MVar1 == (Menu_CustomChallenge)0x0) || ((0x31 < GHIDRA_INT(MVar1) && (GHIDRA_INT(MVar1) % 10 == 0))) + ) && (MVar1 = *this, *this = (Menu_CustomChallenge)(GHIDRA_INT(MVar1) + -1), + GHIDRA_INT(MVar1) + -1 < 0x2e)) { *this = (Menu_CustomChallenge) - (((int)(g_manager->_challengeParams)._end - - (int)(g_manager->_challengeParams)._begin) / 0xa4 + -1); + ((GHIDRA_INT((g_manager->_challengeParams)._end) - + GHIDRA_INT((g_manager->_challengeParams)._begin)) / 0xa4 + -1); } } } - else if (((int)(manager->_challengeParams)._end - (int)(manager->_challengeParams)._begin) / + else if ((GHIDRA_INT((manager->_challengeParams)._end) - GHIDRA_INT((manager->_challengeParams)._begin)) / 0xa4 == 0x2e) { local_34 = (Menu_CustomChallenge)0xbb; seed_fart_sound_override((int *)&local_34); - ((SoundEffects *)(&pMVar2->_sfxManager))->SoundEffects::Play((int)local_34,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&pMVar2->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_34),1.0,2,0,1.0,0.0); } else { ((KColor *)((KColor *)(acStack_4a + -0x2a)))->KColor::SetFromARGB(0xff000000); @@ -122,16 +122,16 @@ void Menu_CustomChallenge::Update() ExceptionList = local_10; return; } - this[1] = (Menu_CustomChallenge)((int)this[1] + 1); + this[1] = (Menu_CustomChallenge)(GHIDRA_INT(this[1]) + 1); } else if (1.0 <= g_menuManager->_fadeOutProgress) { challengeParams = (g_manager->_challengeParams)._begin; local_34 = *this; - uVar3 = ((int)(g_manager->_challengeParams)._end - (int)challengeParams) / 0xa4 - 1; + uVar3 = (GHIDRA_INT((g_manager->_challengeParams)._end) - GHIDRA_INT(challengeParams)) / 0xa4 - 1; local_18 = 0xf; local_1c = 0; seedText[0] = (void *)0x0; - selectedIndex = -(uint)(local_34 != (Menu_CustomChallenge)0x0) & (uint)local_34; + selectedIndex = -GHIDRA_UINT((local_34 != (Menu_CustomChallenge)0x0)) & GHIDRA_UINT(local_34); if (uVar3 <= selectedIndex) { selectedIndex = uVar3; } @@ -141,22 +141,22 @@ void Menu_CustomChallenge::Update() ((std::string *)(acStack_4a + -0x1a))->std::string::string(seedText); uVar5 = 0x8ce178; seed._buf[4] = (char)in_stack_ffffffa0; - seed._buf[5] = (char)((uint)in_stack_ffffffa0 >> 8); - seed._buf[6] = (char)((uint)in_stack_ffffffa0 >> 0x10); - seed._buf[7] = (char)((uint)in_stack_ffffffa0 >> 0x18); + seed._buf[5] = (char)(GHIDRA_UINT(in_stack_ffffffa0) >> 8); + seed._buf[6] = (char)(GHIDRA_UINT(in_stack_ffffffa0) >> 0x10); + seed._buf[7] = (char)(GHIDRA_UINT(in_stack_ffffffa0) >> 0x18); seed._buf[0] = (char)in_stack_ffffff9c; - seed._buf[1] = (char)((uint)in_stack_ffffff9c >> 8); - seed._buf[2] = (char)((uint)in_stack_ffffff9c >> 0x10); - seed._buf[3] = (char)((uint)in_stack_ffffff9c >> 0x18); + seed._buf[1] = (char)(GHIDRA_UINT(in_stack_ffffff9c) >> 8); + seed._buf[2] = (char)(GHIDRA_UINT(in_stack_ffffff9c) >> 0x10); + seed._buf[3] = (char)(GHIDRA_UINT(in_stack_ffffff9c) >> 0x18); seed._buf[8] = (char)in_stack_ffffffa4; - seed._buf[9] = (char)((uint)in_stack_ffffffa4 >> 8); - seed._buf[10] = (char)((uint)in_stack_ffffffa4 >> 0x10); - seed._buf[0xb] = (char)((uint)in_stack_ffffffa4 >> 0x18); + seed._buf[9] = (char)(GHIDRA_UINT(in_stack_ffffffa4) >> 8); + seed._buf[10] = (char)(GHIDRA_UINT(in_stack_ffffffa4) >> 0x10); + seed._buf[0xb] = (char)(GHIDRA_UINT(in_stack_ffffffa4) >> 0x18); seed._buf[0xc] = (char)in_stack_ffffffa8; - seed._buf[0xd] = (char)((uint)in_stack_ffffffa8 >> 8); - seed._buf[0xe] = (char)((uint)in_stack_ffffffa8 >> 0x10); - seed._buf[0xf] = (char)((uint)in_stack_ffffffa8 >> 0x18); - seed._size = (uint)in_stack_ffffffac; + seed._buf[0xd] = (char)(GHIDRA_UINT(in_stack_ffffffa8) >> 8); + seed._buf[0xe] = (char)(GHIDRA_UINT(in_stack_ffffffa8) >> 0x10); + seed._buf[0xf] = (char)(GHIDRA_UINT(in_stack_ffffffa8) >> 0x18); + seed._size = GHIDRA_UINT(in_stack_ffffffac); seed._capacity = in_stack_ffffffb0; ((Seeds *)(&menuManager->_seedsObject))->Seeds::SetStartSeed(seed); local_8 = (void *)0xffffffff; @@ -164,9 +164,9 @@ void Menu_CustomChallenge::Update() uVar3 = local_18 + 1; in_stack_ffffffac = seedText[0]; if (0xfff < uVar3) { - in_stack_ffffffac = *(void **)((int)seedText[0] + -4); + in_stack_ffffffac = *(void **)(GHIDRA_INT(seedText[0]) + -4); uVar3 = local_18 + 0x24; - if (0x1f < (uint)((int)seedText[0] + (-4 - (int)in_stack_ffffffac))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(seedText[0]) + (-4 - GHIDRA_INT(in_stack_ffffffac))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -180,18 +180,18 @@ void Menu_CustomChallenge::Update() ((Seeds *)(aSStackY_2f08 + 0x81))->Seeds::construct_from_copy(menuSeeds); unk._stageSeeds[6] = in_stack_ffffff84; unk._isCustomRun = in_stack_ffffff54[0]; - unk._1_3_ = in_stack_ffffff54._1_3_; - unk._gameStartSeed = in_stack_ffffff54._4_4_; - unk._rng._seed = in_stack_ffffff54._8_4_; - unk._rng._shift1 = in_stack_ffffff54._12_4_; - unk._rng._shift2 = in_stack_ffffff54._16_4_; - unk._rng._shift3 = in_stack_ffffff54._20_4_; - unk._stageSeeds[0] = in_stack_ffffff54._24_4_; - unk._stageSeeds[1] = in_stack_ffffff54._28_4_; - unk._stageSeeds[2] = in_stack_ffffff54._32_4_; - unk._stageSeeds[3] = in_stack_ffffff54._36_4_; - unk._stageSeeds[4] = in_stack_ffffff54._40_4_; - unk._stageSeeds[5] = in_stack_ffffff54._44_4_; + (*(undefined1 *)((char *)&(unk) + 0x1)) = (*(undefined1 *)((char *)&(in_stack_ffffff54) + 0x1)); + unk._gameStartSeed = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0x4)); + unk._rng._seed = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0x8)); + unk._rng._shift1 = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0xc)); + unk._rng._shift2 = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0x10)); + unk._rng._shift3 = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0x14)); + unk._stageSeeds[0] = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0x18)); + unk._stageSeeds[1] = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0x1c)); + unk._stageSeeds[2] = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0x20)); + unk._stageSeeds[3] = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0x24)); + unk._stageSeeds[4] = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0x28)); + unk._stageSeeds[5] = (*(undefined4 *)((char *)&(in_stack_ffffff54) + 0x2c)); unk._stageSeeds[7] = in_stack_ffffff88; unk._stageSeeds[8] = in_stack_ffffff8c; unk._stageSeeds[9] = in_stack_ffffff90; @@ -201,8 +201,8 @@ void Menu_CustomChallenge::Update() unk._stageSeeds[0xd] = in_stack_ffffffa0; unk._playerInitSeed = in_stack_ffffffa4; unk._seedEffects = (void *)in_stack_ffffffa8; - unk._seedEffectsCount = (int)in_stack_ffffffac; - ((Manager *)(this_00))->Manager::StartNewGame(iVar6,(int)local_34,unk,difficulty); + unk._seedEffectsCount = GHIDRA_INT(in_stack_ffffffac); + ((Manager *)(this_00))->Manager::StartNewGame(iVar6,GHIDRA_INT(local_34),unk,difficulty); } ExceptionList = local_10; return; @@ -258,7 +258,7 @@ void Menu_CustomChallenge::Render() local_8 = 0xffffffff; puStack_c = &LAB_00b05b1b; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(textBuf + 0x50); + local_14 = __security_cookie ^ GHIDRA_UINT((textBuf + 0x50)); ExceptionList = &local_10; sprite = (ANM2 *)(this + 4); animData = this[0x11]; @@ -285,14 +285,14 @@ LAB_008ce4e8: isLess = bVar3 < *wantAnimChar; if (bVar3 != *wantAnimChar) { LAB_008ce4d5: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_008ce4da; } if (bVar3 == 0) break; bVar3 = *(byte *)((char *)curAnimChar + 1); isLess = bVar3 < wantAnimChar[1]; if (bVar3 != wantAnimChar[1]) goto LAB_008ce4d5; - curAnimChar = (Menu_CustomChallenge)((int)curAnimChar + 2); + curAnimChar = (Menu_CustomChallenge)(GHIDRA_INT(curAnimChar) + 2); wantAnimChar = wantAnimChar + 2; } while (bVar3 != 0); uVar4 = 0; @@ -318,8 +318,8 @@ LAB_008ce4da: manager = g_manager; rngShifts = 0x900000005; row = 0; - local_64 = ((uint)((((int)(g_manager->_challengeParams)._end - - (int)(g_manager->_challengeParams)._begin) / 0xa4 + -0x2e) * 0x19) >> 5) + 1; + local_64 = (GHIDRA_UINT((((GHIDRA_INT((g_manager->_challengeParams)._end) - + GHIDRA_INT((g_manager->_challengeParams)._begin)) / 0xa4 + -0x2e) * 0x19)) >> 5) + 1; fVar7 = 1.7299e-41; if (local_64 != 0) { do { @@ -329,7 +329,7 @@ LAB_008ce4da: (*pcVar1)(); return; } - uVar4 = (uint)fVar7 >> ((byte)rngShifts & 0x1f) ^ (uint)fVar7; + uVar4 = GHIDRA_UINT(fVar7) >> ((byte)rngShifts & 0x1f) ^ GHIDRA_UINT(fVar7); uVar4 = uVar4 << ((byte)((ulonglong)rngShifts >> 0x20) & 0x1f) ^ uVar4; local_74.y = (float)(uVar4 >> (SUB41(local_78,0) & 0x1f) ^ uVar4); sprintf_s(textBuf,0x40,(byte *)"Piece%d"); @@ -353,14 +353,14 @@ LAB_008ce698: isLess = bVar3 < *wantAnimChar; if (bVar3 != *wantAnimChar) { LAB_008ce685: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_008ce68a; } if (bVar3 == 0) break; bVar3 = *(byte *)((char *)curAnimChar + 1); isLess = bVar3 < wantAnimChar[1]; if (bVar3 != wantAnimChar[1]) goto LAB_008ce685; - curAnimChar = (Menu_CustomChallenge)((int)curAnimChar + 2); + curAnimChar = (Menu_CustomChallenge)(GHIDRA_INT(curAnimChar) + 2); wantAnimChar = wantAnimChar + 2; } while (bVar3 != 0); uVar4 = 0; @@ -400,14 +400,14 @@ LAB_008ce68a: isLess = bVar3 < (byte)*wantAnimStr; if (bVar3 != *wantAnimStr) { LAB_008ce780: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_008ce785; } if (bVar3 == 0) break; bVar3 = *(byte *)((char *)curAnimChar + 1); isLess = bVar3 < (byte)wantAnimStr[1]; if (bVar3 != wantAnimStr[1]) goto LAB_008ce780; - curAnimChar = (Menu_CustomChallenge)((int)curAnimChar + 2); + curAnimChar = (Menu_CustomChallenge)(GHIDRA_INT(curAnimChar) + 2); wantAnimStr = wantAnimStr + 2; } while (bVar3 != 0); uVar4 = 0; @@ -434,8 +434,8 @@ LAB_008ce7b1: } AnimationState::Render(secondAnimState,&local_74,&g_vectorZero,&g_vectorZero); } - if (0x2e < (uint)(((int)(manager->_challengeParams)._end - (int)(manager->_challengeParams)._begin - ) / 0xa4)) { + if (0x2e < GHIDRA_UINT(((GHIDRA_INT((manager->_challengeParams)._end) - GHIDRA_INT((manager->_challengeParams)._begin) + ) / 0xa4))) { textScale.x = 0.8; local_78 = menuX - 90.0; textScale.y = 1.0; @@ -456,7 +456,7 @@ LAB_008ce7b1: glyphs = Font::measure_string (&g_manager->_font2_TeamMeatEx12,glyphQuads,textBuf,&measureParams, &textScale); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); color._alpha = 1.0; color._red = 0.0; color._green = 0.0; @@ -489,14 +489,14 @@ LAB_008cea15: isLess = bVar3 < (byte)*wantAnimStr; if (bVar3 != *wantAnimStr) { LAB_008cea02: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_008cea07; } if (bVar3 == 0) break; bVar3 = *(byte *)((char *)curAnimChar + 1); isLess = bVar3 < (byte)wantAnimStr[1]; if (bVar3 != wantAnimStr[1]) goto LAB_008cea02; - curAnimChar = (Menu_CustomChallenge)((int)curAnimChar + 2); + curAnimChar = (Menu_CustomChallenge)(GHIDRA_INT(curAnimChar) + 2); wantAnimStr = wantAnimStr + 2; } while (bVar3 != 0); uVar4 = 0; @@ -524,19 +524,19 @@ LAB_008cea07: local_64 = local_64 + 0xa4; uVar4 = row + 0x2e; row = row + 1; - } while (uVar4 < (uint)(((int)(manager->_challengeParams)._end - - (int)(manager->_challengeParams)._begin) / 0xa4)); + } while (uVar4 < GHIDRA_UINT(((GHIDRA_INT((manager->_challengeParams)._end) - + GHIDRA_INT((manager->_challengeParams)._begin)) / 0xa4))); } menuManager = g_menuManager; - selectedRow = (int)*this + -0x2e; + selectedRow = GHIDRA_INT(*this) + -0x2e; fVar7 = -216.0; - iVar6 = (int)(g_manager->_challengeParams)._end - (int)(g_manager->_challengeParams)._begin; + iVar6 = GHIDRA_INT((g_manager->_challengeParams)._end) - GHIDRA_INT((g_manager->_challengeParams)._begin); iVar5 = iVar6 >> 0x1f; iVar6 = iVar6 / 0xa4 + iVar5; iVar5 = -iVar5; if (4 < selectedRow) { if (selectedRow < iVar6 + -0x31 + iVar5) { - iVar5 = (int)*this + -0x32; + iVar5 = GHIDRA_INT(*this) + -0x32; } else { iVar5 = iVar6 + -0x35 + iVar5; diff --git a/src/game/menu_cutscenes.cpp b/src/game/menu_cutscenes.cpp index d73d65a..78df55a 100644 --- a/src/game/menu_cutscenes.cpp +++ b/src/game/menu_cutscenes.cpp @@ -74,8 +74,8 @@ LAB_008cefaa: } else { historyEnd = (g_menuManager->_menuStateHistory)._end; - if (1 < (uint)((int)historyEnd - (int)(g_menuManager->_menuStateHistory)._begin >> 2)) { - historyEnd = (void *)((int)historyEnd + -4); + if (1 < GHIDRA_UINT((GHIDRA_INT(historyEnd) - GHIDRA_INT((g_menuManager->_menuStateHistory)._begin) >> 2))) { + historyEnd = (void *)(GHIDRA_INT(historyEnd) + -4); (g_menuManager->_menuStateHistory)._end = historyEnd; } ((MenuManager *)(menuManager))->MenuManager::SetState(*(int *)((char *)historyEnd + -4),0); @@ -165,7 +165,7 @@ void Menu_Cutscenes::Render() layer = ((ANM2 *)((ANM2 *)(in_ECX + 0x10)))->ANM2::GetLayer((byte *)*puVar2); puVar2 = puVar2 + 1; layer->_visible = 0; - } while ((int)puVar2 < 0xb24010); + } while (GHIDRA_INT(puVar2) < 0xb24010); if (*(char *)(in_ECX + 0x119) != '\0') { if (*(char *)(in_ECX + 0x80) == '\0') { AnimationState::Render((AnimationState *)(in_ECX + 0x40),&drawPos,&g_vectorZero,&g_vectorZero) @@ -205,18 +205,18 @@ void Menu_Cutscenes::Render() if (*(char *)(in_ECX + 0x119) != '\0') { if (*(char *)(in_ECX + 0x80) == '\0') { iVar1 = *(int *)(in_ECX + 0x44); - if ((((iVar1 != 0) && (-1 < (int)layerName)) && - ((int)layerName < (*(ANM2 **)(in_ECX + 0x40))->_layerCount)) && - (animLayerIndex = *(int *)(iVar1 + 0x38 + (int)layerName * 4), -1 < animLayerIndex)) { + if ((((iVar1 != 0) && (-1 < GHIDRA_INT(layerName))) && + (GHIDRA_INT(layerName) < (*(ANM2 **)(in_ECX + 0x40))->_layerCount)) && + (animLayerIndex = *(int *)(iVar1 + 0x38 + GHIDRA_INT(layerName) * 4), -1 < animLayerIndex)) { AnimationLayer::RenderFrame ((AnimationLayer *)(animLayerIndex * 0x10 + *(int *)(iVar1 + 0x18)),&drawPos, *(int *)(*(int *)(in_ECX + 0x48) + animLayerIndex * 4),&g_vectorZero, &g_vectorZero,*(ANM2 **)(in_ECX + 0x40)); } iVar1 = *(int *)(in_ECX + 100); - if (((iVar1 != 0) && (-1 < (int)layerName)) && - ((anm2 = *(ANM2 **)(in_ECX + 0x60), (int)layerName < anm2->_layerCount && - (animLayerIndex = *(int *)(iVar1 + 0x38 + (int)layerName * 4), -1 < animLayerIndex)))) + if (((iVar1 != 0) && (-1 < GHIDRA_INT(layerName))) && + ((anm2 = *(ANM2 **)(in_ECX + 0x60), GHIDRA_INT(layerName) < anm2->_layerCount && + (animLayerIndex = *(int *)(iVar1 + 0x38 + GHIDRA_INT(layerName) * 4), -1 < animLayerIndex)))) { layerFrames = *(int *)(in_ECX + 0x68); goto LAB_008cf3fe; @@ -224,9 +224,9 @@ void Menu_Cutscenes::Render() } else { iVar1 = *(int *)(in_ECX + 100); - if (((iVar1 != 0) && (-1 < (int)layerName)) && - (((int)layerName < (*(ANM2 **)(in_ECX + 0x60))->_layerCount && - (animLayerIndex = *(int *)(iVar1 + 0x38 + (int)layerName * 4), -1 < animLayerIndex)))) + if (((iVar1 != 0) && (-1 < GHIDRA_INT(layerName))) && + ((GHIDRA_INT(layerName) < (*(ANM2 **)(in_ECX + 0x60))->_layerCount && + (animLayerIndex = *(int *)(iVar1 + 0x38 + GHIDRA_INT(layerName) * 4), -1 < animLayerIndex)))) { AnimationLayer::RenderFrame ((AnimationLayer *)(animLayerIndex * 0x10 + *(int *)(iVar1 + 0x18)),&drawPos, @@ -234,9 +234,9 @@ void Menu_Cutscenes::Render() &g_vectorZero,*(ANM2 **)(in_ECX + 0x60)); } iVar1 = *(int *)(in_ECX + 0x44); - if ((((iVar1 != 0) && (-1 < (int)layerName)) && - (anm2 = *(ANM2 **)(in_ECX + 0x40), (int)layerName < anm2->_layerCount)) && - (animLayerIndex = *(int *)(iVar1 + 0x38 + (int)layerName * 4), -1 < animLayerIndex)) { + if ((((iVar1 != 0) && (-1 < GHIDRA_INT(layerName))) && + (anm2 = *(ANM2 **)(in_ECX + 0x40), GHIDRA_INT(layerName) < anm2->_layerCount)) && + (animLayerIndex = *(int *)(iVar1 + 0x38 + GHIDRA_INT(layerName) * 4), -1 < animLayerIndex)) { layerFrames = *(int *)(in_ECX + 0x48); LAB_008cf3fe: AnimationLayer::RenderFrame @@ -268,9 +268,9 @@ LAB_008cf3fe: if (*(char *)(in_ECX + 0x119) != '\0') { if (*(char *)(in_ECX + 0x80) == '\0') { iVar1 = *(int *)(in_ECX + 0x44); - if (((iVar1 != 0) && (-1 < (int)layerName)) && - (((int)layerName < (*(ANM2 **)(in_ECX + 0x40))->_layerCount && - (animLayerIndex = *(int *)(iVar1 + 0x38 + (int)layerName * 4), -1 < animLayerIndex)))) + if (((iVar1 != 0) && (-1 < GHIDRA_INT(layerName))) && + ((GHIDRA_INT(layerName) < (*(ANM2 **)(in_ECX + 0x40))->_layerCount && + (animLayerIndex = *(int *)(iVar1 + 0x38 + GHIDRA_INT(layerName) * 4), -1 < animLayerIndex)))) { AnimationLayer::RenderFrame ((AnimationLayer *)(animLayerIndex * 0x10 + *(int *)(iVar1 + 0x18)),&drawPos, @@ -278,9 +278,9 @@ LAB_008cf3fe: &g_vectorZero,*(ANM2 **)(in_ECX + 0x40)); } iVar1 = *(int *)(in_ECX + 100); - if (((iVar1 != 0) && (-1 < (int)layerName)) && - ((anm2 = *(ANM2 **)(in_ECX + 0x60), (int)layerName < anm2->_layerCount && - (animLayerIndex = *(int *)(iVar1 + 0x38 + (int)layerName * 4), -1 < animLayerIndex)))) + if (((iVar1 != 0) && (-1 < GHIDRA_INT(layerName))) && + ((anm2 = *(ANM2 **)(in_ECX + 0x60), GHIDRA_INT(layerName) < anm2->_layerCount && + (animLayerIndex = *(int *)(iVar1 + 0x38 + GHIDRA_INT(layerName) * 4), -1 < animLayerIndex)))) { layerFrames = *(int *)(in_ECX + 0x68); goto LAB_008cf2a5; @@ -288,18 +288,18 @@ LAB_008cf3fe: } else { iVar1 = *(int *)(in_ECX + 100); - if ((((iVar1 != 0) && (-1 < (int)layerName)) && - ((int)layerName < (*(ANM2 **)(in_ECX + 0x60))->_layerCount)) && - (animLayerIndex = *(int *)(iVar1 + 0x38 + (int)layerName * 4), -1 < animLayerIndex)) { + if ((((iVar1 != 0) && (-1 < GHIDRA_INT(layerName))) && + (GHIDRA_INT(layerName) < (*(ANM2 **)(in_ECX + 0x60))->_layerCount)) && + (animLayerIndex = *(int *)(iVar1 + 0x38 + GHIDRA_INT(layerName) * 4), -1 < animLayerIndex)) { AnimationLayer::RenderFrame ((AnimationLayer *)(animLayerIndex * 0x10 + *(int *)(iVar1 + 0x18)),&drawPos, *(int *)(*(int *)(in_ECX + 0x68) + animLayerIndex * 4),&g_vectorZero, &g_vectorZero,*(ANM2 **)(in_ECX + 0x60)); } iVar1 = *(int *)(in_ECX + 0x44); - if (((iVar1 != 0) && (-1 < (int)layerName)) && - ((anm2 = *(ANM2 **)(in_ECX + 0x40), (int)layerName < anm2->_layerCount && - (animLayerIndex = *(int *)(iVar1 + 0x38 + (int)layerName * 4), -1 < animLayerIndex)))) + if (((iVar1 != 0) && (-1 < GHIDRA_INT(layerName))) && + ((anm2 = *(ANM2 **)(in_ECX + 0x40), GHIDRA_INT(layerName) < anm2->_layerCount && + (animLayerIndex = *(int *)(iVar1 + 0x38 + GHIDRA_INT(layerName) * 4), -1 < animLayerIndex)))) { layerFrames = *(int *)(in_ECX + 0x48); LAB_008cf2a5: @@ -311,7 +311,7 @@ LAB_008cf2a5: } } layerNameCursor = layerNameCursor + 1; - if (0xb2400f < (int)layerNameCursor) { + if (0xb2400f < GHIDRA_INT(layerNameCursor)) { return; } } while( true ); diff --git a/src/game/menu_daily_challenge.cpp b/src/game/menu_daily_challenge.cpp index 0fe216b..66db411 100644 --- a/src/game/menu_daily_challenge.cpp +++ b/src/game/menu_daily_challenge.cpp @@ -25,7 +25,7 @@ void Menu_DailyChallenge::Update() undefined4 local_8; Menu_DailyChallenge animData; - local_8 = __security_cookie ^ (uint)(serverTime + 0x40); + local_8 = __security_cookie ^ GHIDRA_UINT((serverTime + 0x40)); bVar1 = ((NetplayManager *)(&g_manager->_netplayManager))->NetplayManager::check_connection(); if (bVar1 == 0) { return; @@ -84,17 +84,17 @@ void Menu_DailyChallenge::Update() isActionTriggered = (**(code **)(PTR_vftable_00c57b18 + 0x74))(); if ((isActionTriggered != '\0') && ((animData = this[1], animData == (Menu_DailyChallenge)0x0 || - ((0x31 < (int)animData && ((int)animData % 10 == 0)))))) { - animData = (Menu_DailyChallenge)((int)this[2] + 1); + ((0x31 < GHIDRA_INT(animData) && (GHIDRA_INT(animData) % 10 == 0)))))) { + animData = (Menu_DailyChallenge)(GHIDRA_INT(this[2]) + 1); this[2] = animData; - if (3 < (int)animData) { + if (3 < GHIDRA_INT(animData)) { this[2] = (Menu_DailyChallenge)0x0; animData = (Menu_DailyChallenge)0x0; } while (((animData == (Menu_DailyChallenge)0x0 || (animData == (Menu_DailyChallenge)0x1)) && (*this != (Menu_DailyChallenge)0x2) )) { - animData = (Menu_DailyChallenge)((int)animData + 1); + animData = (Menu_DailyChallenge)(GHIDRA_INT(animData) + 1); this[2] = animData; } if (animData == (Menu_DailyChallenge)0x2) { @@ -109,8 +109,8 @@ void Menu_DailyChallenge::Update() else { animData = this[1]; if ((animData == (Menu_DailyChallenge)0x0) || - ((0x31 < (int)animData && ((int)animData % 10 == 0)))) { - animData = (Menu_DailyChallenge)((int)this[2] + -1); + ((0x31 < GHIDRA_INT(animData) && (GHIDRA_INT(animData) % 10 == 0)))) { + animData = (Menu_DailyChallenge)(GHIDRA_INT(this[2]) + -1); this[2] = animData; if ((animData == (Menu_DailyChallenge)0x2) && (*this != (Menu_DailyChallenge)0x3)) { this[2] = (Menu_DailyChallenge)0x1; @@ -119,10 +119,10 @@ void Menu_DailyChallenge::Update() while (((animData == (Menu_DailyChallenge)0x0 || (animData == (Menu_DailyChallenge)0x1)) && (*this != (Menu_DailyChallenge)0x2) )) { - animData = (Menu_DailyChallenge)((int)animData + -1); + animData = (Menu_DailyChallenge)(GHIDRA_INT(animData) + -1); this[2] = animData; } - if ((int)animData < 0) { + if (GHIDRA_INT(animData) < 0) { this[2] = (Menu_DailyChallenge)0x3; } } @@ -150,7 +150,7 @@ void Menu_DailyChallenge::Update() fadeColor._red = (float)uVar2; fadeColor._blue = (float)pMVar4; fadeColor._alpha = (float)cmpResult; - fadeColor._unk = (int)puVar6; + fadeColor._unk = GHIDRA_INT(puVar6); MenuManager::start_game(fadeColor); break; case (Menu_DailyChallenge)0x3: @@ -178,14 +178,14 @@ code_r0x008cf92b: isLess = bVar1 < (byte)*animName; if (bVar1 != *animName) { code_r0x008cf907: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto code_r0x008cf90c; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)curAnimChar + 1); isLess = bVar1 < (byte)animName[1]; if (bVar1 != animName[1]) goto code_r0x008cf907; - curAnimChar = (Menu_DailyChallenge)((int)curAnimChar + 2); + curAnimChar = (Menu_DailyChallenge)(GHIDRA_INT(curAnimChar) + 2); animName = animName + 2; } while (bVar1 != 0); cmpResult = 0; @@ -197,11 +197,11 @@ code_r0x008cf90c: this[0x17c] = (Menu_DailyChallenge)0xffffffff; this[0x17e] = local_48; this[0x17d] = local_48; - ((DailyChallenge *)((DailyChallenge *)(this + 0x17f)))->DailyChallenge::Init((uint)local_48); - KAGE::System::LeaderboardManager::release_result((int)this[0x177]); - KAGE::System::LeaderboardManager::release_result((int)this[0x178]); - KAGE::System::LeaderboardManager::release_result((int)this[0x179]); - KAGE::System::LeaderboardManager::release_result((int)this[0x17a]); + ((DailyChallenge *)((DailyChallenge *)(this + 0x17f)))->DailyChallenge::Init(GHIDRA_UINT(local_48)); + KAGE::System::LeaderboardManager::release_result(GHIDRA_INT(this[0x177])); + KAGE::System::LeaderboardManager::release_result(GHIDRA_INT(this[0x178])); + KAGE::System::LeaderboardManager::release_result(GHIDRA_INT(this[0x179])); + KAGE::System::LeaderboardManager::release_result(GHIDRA_INT(this[0x17a])); this[0x17a] = (Menu_DailyChallenge)0x0; this[0x179] = (Menu_DailyChallenge)0x0; this[0x178] = (Menu_DailyChallenge)0x0; @@ -243,7 +243,7 @@ LAB_008cfb19: animData = this[2]; while (((animData == (Menu_DailyChallenge)0x0 || (animData == (Menu_DailyChallenge)0x1)) && (*this == (Menu_DailyChallenge)0x3))) { - animData = (Menu_DailyChallenge)((int)animData + 1); + animData = (Menu_DailyChallenge)(GHIDRA_INT(animData) + 1); this[2] = animData; } if ((animData == (Menu_DailyChallenge)0x2) && (*this == (Menu_DailyChallenge)0x2)) { @@ -259,7 +259,7 @@ LAB_008cfb19: goto LAB_008cfbf4; } } - this[1] = (Menu_DailyChallenge)((int)this[1] + 1); + this[1] = (Menu_DailyChallenge)(GHIDRA_INT(this[1]) + 1); LAB_008cfbf4: Leaderboard::Update(); FUN_008d0840(); @@ -270,22 +270,22 @@ LAB_008cfbf4: } if ((serverTime[0] & 3) != 0) { gmTime = _gmtime64(&serverTime64); - serverTm.tm_sec._0_1_ = (char)gmTime->tm_sec; - serverTm.tm_sec._1_1_ = *(undefined1 *)((int)&gmTime->tm_sec + 1); - serverTm.tm_sec._2_1_ = *(undefined1 *)((int)&gmTime->tm_sec + 2); - serverTm.tm_sec._3_1_ = *(undefined1 *)((int)&gmTime->tm_sec + 3); - serverTm.tm_min._0_1_ = (char)gmTime->tm_min; - serverTm.tm_min._1_1_ = *(undefined1 *)((int)&gmTime->tm_min + 1); - serverTm.tm_min._2_1_ = *(undefined1 *)((int)&gmTime->tm_min + 2); - serverTm.tm_min._3_1_ = *(undefined1 *)((int)&gmTime->tm_min + 3); - serverTm.tm_hour._0_1_ = (char)gmTime->tm_hour; - serverTm.tm_hour._1_1_ = *(undefined1 *)((int)&gmTime->tm_hour + 1); - serverTm.tm_hour._2_1_ = *(undefined1 *)((int)&gmTime->tm_hour + 2); - serverTm.tm_hour._3_1_ = *(undefined1 *)((int)&gmTime->tm_hour + 3); - serverTm.tm_mday._0_1_ = (undefined1)gmTime->tm_mday; - serverTm.tm_mday._1_1_ = *(undefined1 *)((int)&gmTime->tm_mday + 1); - serverTm.tm_mday._2_1_ = *(undefined1 *)((int)&gmTime->tm_mday + 2); - serverTm.tm_mday._3_1_ = *(undefined1 *)((int)&gmTime->tm_mday + 3); + (*(undefined1 *)((char *)&(serverTm.tm_sec) + 0x0)) = (char)gmTime->tm_sec; + (*(undefined1 *)((char *)&(serverTm.tm_sec) + 0x1)) = *(undefined1 *)(GHIDRA_INT(&gmTime->tm_sec) + 1); + (*(undefined1 *)((char *)&(serverTm.tm_sec) + 0x2)) = *(undefined1 *)(GHIDRA_INT(&gmTime->tm_sec) + 2); + (*(undefined1 *)((char *)&(serverTm.tm_sec) + 0x3)) = *(undefined1 *)(GHIDRA_INT(&gmTime->tm_sec) + 3); + (*(undefined1 *)((char *)&(serverTm.tm_min) + 0x0)) = (char)gmTime->tm_min; + (*(undefined1 *)((char *)&(serverTm.tm_min) + 0x1)) = *(undefined1 *)(GHIDRA_INT(&gmTime->tm_min) + 1); + (*(undefined1 *)((char *)&(serverTm.tm_min) + 0x2)) = *(undefined1 *)(GHIDRA_INT(&gmTime->tm_min) + 2); + (*(undefined1 *)((char *)&(serverTm.tm_min) + 0x3)) = *(undefined1 *)(GHIDRA_INT(&gmTime->tm_min) + 3); + (*(undefined1 *)((char *)&(serverTm.tm_hour) + 0x0)) = (char)gmTime->tm_hour; + (*(undefined1 *)((char *)&(serverTm.tm_hour) + 0x1)) = *(undefined1 *)(GHIDRA_INT(&gmTime->tm_hour) + 1); + (*(undefined1 *)((char *)&(serverTm.tm_hour) + 0x2)) = *(undefined1 *)(GHIDRA_INT(&gmTime->tm_hour) + 2); + (*(undefined1 *)((char *)&(serverTm.tm_hour) + 0x3)) = *(undefined1 *)(GHIDRA_INT(&gmTime->tm_hour) + 3); + (*(undefined1 *)((char *)&(serverTm.tm_mday) + 0x0)) = (undefined1)gmTime->tm_mday; + (*(undefined1 *)((char *)&(serverTm.tm_mday) + 0x1)) = *(undefined1 *)(GHIDRA_INT(&gmTime->tm_mday) + 1); + (*(undefined1 *)((char *)&(serverTm.tm_mday) + 0x2)) = *(undefined1 *)(GHIDRA_INT(&gmTime->tm_mday) + 2); + (*(undefined1 *)((char *)&(serverTm.tm_mday) + 0x3)) = *(undefined1 *)(GHIDRA_INT(&gmTime->tm_mday) + 3); serverTm.tm_mon = gmTime->tm_mon; serverTm.tm_year = gmTime->tm_year; serverTm.tm_wday = gmTime->tm_wday; @@ -364,7 +364,7 @@ void Menu_DailyChallenge::Render() local_8 = 0xffffffff; puStack_c = &LAB_00b05b94; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(local_28 + 0x24); + uVar1 = __security_cookie ^ GHIDRA_UINT((local_28 + 0x24)); ExceptionList = &local_10; selectedFont = &g_manager->_font2_TeamMeatEx12; if (*(int *)&g_manager->_stringTable == 0) { @@ -373,7 +373,7 @@ void Menu_DailyChallenge::Render() font = selectedFont; renderX = (g_menuManager->_ViewPosition).x + (float)this[3]; renderY = (g_menuManager->_ViewPosition).y + (float)this[4]; - local_28._12_4_ = renderX; + (*(undefined4 *)((char *)&(local_28) + 0xc)) = renderX; local_18 = (undefined *)renderY; local_14 = uVar1; if ((*(undefined1 *)((char *)&(this[0x47]) + 0x1)) != '\0') { @@ -407,31 +407,31 @@ void Menu_DailyChallenge::Render() bVar5 = nameChar < *pbVar3; if (nameChar != *pbVar3) { LAB_008cfe70: - animCompare = -(uint)bVar5 | 1; + animCompare = -GHIDRA_UINT(bVar5) | 1; goto LAB_008cfe75; } if (nameChar == 0) break; nameChar = *(byte *)((char *)pbVar2 + 1); bVar5 = nameChar < pbVar3[1]; if (nameChar != pbVar3[1]) goto LAB_008cfe70; - pbVar2 = (byte *)((int)pbVar2 + 2); + pbVar2 = (byte *)(GHIDRA_INT(pbVar2) + 2); pbVar3 = pbVar3 + 2; } while (nameChar != 0); animCompare = 0; LAB_008cfe75: renderY = (float)local_18; - renderX = (float)local_28._12_4_; + renderX = (*(undefined4 *)((char *)&((float)local_28) + 0xc)); if (animCompare == 0) { if ((animName != (Menu_DailyChallenge)0x0) && (playerNameNullFrame = ((AnimationState *)((AnimationState *)(this + 0x11)))->AnimationState::GetNullFrame((byte *)"PlayerName"), playerNameNullFrame != (float *)0x0)) { local_18 = g_userProfile; - local_28._12_4_ = KAGE::System::UserProfile::vftable; + (*(undefined4 *)((char *)&(local_28) + 0xc)) = KAGE::System::UserProfile::vftable; local_8 = 0; pbVar2 = (byte *)FUN_00a5f1c0(uVar1); local_8 = 0xffffffff; - local_28._12_4_ = KAGE::System::UserProfileBase::vftable; + (*(undefined4 *)((char *)&(local_28) + 0xc)) = KAGE::System::UserProfileBase::vftable; if (pbVar2 == (byte *)0x0) { iVar4 = 0; } @@ -441,7 +441,7 @@ LAB_008cfe75: nameChar = *pbVar3; pbVar3 = pbVar3 + 1; } while (nameChar != 0); - iVar4 = (int)pbVar3 - (int)(pbVar2 + 1); + iVar4 = GHIDRA_INT(pbVar3) - GHIDRA_INT((pbVar2 + 1)); } text_convert_encoding(pbVar2,iVar4,0,playerNameWide,0x200,1); iVar4 = ((Font *)(font))->Font::get_string_width_utf16(playerNameWide,-1); @@ -503,8 +503,8 @@ LAB_008cfe75: if (scoreNullFrame != (float *)0x0) { local_18 = &DAT_00b75810; pbVar2 = s__d; - if ((uint)(g_manager->_persistentGameData)._eventCounters[0xc0] < - (uint)(g_manager->_persistentGameData)._eventCounters[0x20a]) { + if (GHIDRA_UINT((g_manager->_persistentGameData)._eventCounters[0xc0]) < + GHIDRA_UINT((g_manager->_persistentGameData)._eventCounters[0x20a])) { pbVar2 = &DAT_00b75810; } sprintf_s(local_28 + 4,0x10,pbVar2); @@ -585,11 +585,11 @@ void Menu_DailyChallenge::load_graphics() undefined1 *puStack_18; undefined4 local_14; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b05bdd; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; anm2Path._size = 0; anm2Path._capacity = 0xf; @@ -597,20 +597,20 @@ void Menu_DailyChallenge::load_graphics() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x30); anm2Path._size = 0x23; anm2Path._capacity = 0x2f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/main menu/Menu_DailyRun.anm2",0x24); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/main menu/Menu_DailyRun.anm2",0x24); local_14 = 0; ((ANM2 *)((ANM2 *)(this + 5)))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { freeSize = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); freeSize = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -625,20 +625,20 @@ void Menu_DailyChallenge::load_graphics() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x15; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/ScoreMenu.anm2",0x16); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/ScoreMenu.anm2",0x16); local_14 = 1; ((ANM2 *)((ANM2 *)(this + 0xed)))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { freeSize = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); freeSize = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -651,20 +651,20 @@ void Menu_DailyChallenge::load_graphics() leaderboardPath._buf[1] = '\0'; leaderboardPath._buf[2] = '\0'; leaderboardPath._buf[3] = '\0'; - leaderboardPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(leaderboardPath._buf) + 0x0)) = std::_Allocate(0x20); leaderboardPath._size = 0x1b; leaderboardPath._capacity = 0x1f; - builtin_strncpy((char *)leaderboardPath._buf._0_4_,"gfx/ui/LeaderboardMenu.anm2",0x1c); + builtin_strncpy((*(undefined4 *)((char *)&((char *)leaderboardPath._buf) + 0x0)),"gfx/ui/LeaderboardMenu.anm2",0x1c); local_14 = 2; ((ANM2 *)((ANM2 *)(this + 0x132)))->ANM2::Load(&leaderboardPath,1); local_14 = 0xffffffff; if (0xf < leaderboardPath._capacity) { freeSize = leaderboardPath._capacity + 1; - freeBlock = (char *)leaderboardPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)leaderboardPath._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(char **)(leaderboardPath._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(leaderboardPath._buf) + 0x0)) + -4); freeSize = leaderboardPath._capacity + 0x24; - if ((char *)0x1f < (char *)(leaderboardPath._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(leaderboardPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -673,7 +673,7 @@ void Menu_DailyChallenge::load_graphics() } leaderboardPath._size = 0; leaderboardPath._capacity = 0xf; - leaderboardPath._buf._0_4_ = leaderboardPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(leaderboardPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(leaderboardPath._buf) + 0x0)) & 0xffffff00; FUN_008370f0(); FUN_00837740(extraout_ECX); ((GenericPrompt *)((GenericPrompt *)(this + 0x9c)))->GenericPrompt::Initialize(0); diff --git a/src/game/menu_dialog.cpp b/src/game/menu_dialog.cpp index 2cab920..71b6b87 100644 --- a/src/game/menu_dialog.cpp +++ b/src/game/menu_dialog.cpp @@ -13,13 +13,13 @@ void MenuDialog::constructor() local_10 = ExceptionList; ExceptionList = &local_10; *(undefined4 *)this = 0; - ((ANM2 *)((ANM2 *)((int)this + 4)))->ANM2::constructor(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 4)))->ANM2::constructor(); local_8 = 0; - ((ANM2 *)((ANM2 *)((int)this + 0x118)))->ANM2::constructor(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x118)))->ANM2::constructor(); *(undefined4 *)((char *)this + 0x22c) = 0; *(undefined4 *)((char *)this + 0x230) = 0; *(undefined4 *)((char *)this + 0x234) = 0; - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); *(undefined4 *)((char *)this + 0x238) = 0; *(undefined4 *)((char *)this + 0x23c) = 0; *(undefined4 *)((char *)this + 0x240) = 0; @@ -50,27 +50,27 @@ MenuDialog::~MenuDialog() puStack_c = &LAB_00af1f50; local_10 = ExceptionList; ExceptionList = &local_10; - ((ANM2 *)((ANM2 *)((int)this + 4)))->ANM2::Reset(); - secondSprite = (ANM2 *)((int)this + 0x118); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 4)))->ANM2::Reset(); + secondSprite = (ANM2 *)(GHIDRA_INT(this) + 0x118); ((ANM2 *)(secondSprite))->ANM2::Reset(); - secondSprite = (undefined4 *)((int)this + 0x244); + secondSprite = (undefined4 *)(GHIDRA_INT(this) + 0x244); FID_conflict__Erase_tree_>_> (secondSprite,(fuzzer_allocator_> *)secondSprite, *(_Tree_node **)(*(int *)((char *)this + 0x244) + 4)); operator_delete((void *)*secondSprite,0x20); - vector_UserProfile_destroy((void *)((int)this + 0x22c)); + vector_UserProfile_destroy((void *)(GHIDRA_INT(this) + 0x22c)); local_8 = 0; ((ANM2 *)(secondSprite))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)this + 0x168)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)this + 0x148)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)this + 0x130)))->std::string::_Tidy_deallocate(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x168)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x148)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x130)))->std::string::_Tidy_deallocate(); ((std::string *)((char *)secondSprite))->std::string::_Tidy_deallocate(); local_8 = 1; - ((ANM2 *)((ANM2 *)((int)this + 4)))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)this + 0x54)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)this + 0x34)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)this + 0x1c)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)this + 4)))->std::string::_Tidy_deallocate(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 4)))->ANM2::Reset(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x54)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x34)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x1c)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(this) + 4)))->std::string::_Tidy_deallocate(); ExceptionList = local_10; return; } diff --git a/src/game/menu_game.cpp b/src/game/menu_game.cpp index 6cef0f1..50b80f7 100644 --- a/src/game/menu_game.cpp +++ b/src/game/menu_game.cpp @@ -15,7 +15,7 @@ void Menu_Game::destructor() if ((int *)this[1].SelectedElement != (int *)0x0) { isTargetValid = (**(code **)(*(int *)this[1].SelectedElement + 0xc)) - (__security_cookie ^ (int)register0x00000010 - 4U); + (__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); if ((isTargetValid != '\0') && (g_renderTargetReleaseFn != (void *)0x0)) { (*g_renderTargetReleaseFn)(this + 1); } @@ -55,11 +55,11 @@ void Menu_Game::LoadGraphics() undefined4 local_14; byte *animData; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00af1f85; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; menuAnmPath._size = 0; menuAnmPath._capacity = 0xf; @@ -67,20 +67,20 @@ void Menu_Game::LoadGraphics() menuAnmPath._buf[1] = '\0'; menuAnmPath._buf[2] = '\0'; menuAnmPath._buf[3] = '\0'; - menuAnmPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(menuAnmPath._buf) + 0x0)) = std::_Allocate(0x20); menuAnmPath._size = 0x1e; menuAnmPath._capacity = 0x1f; - builtin_strncpy((char *)menuAnmPath._buf._0_4_,"gfx/ui/main menu/GameMenu.anm2",0x1f); + builtin_strncpy((*(undefined4 *)((char *)&((char *)menuAnmPath._buf) + 0x0)),"gfx/ui/main menu/GameMenu.anm2",0x1f); local_14 = 0; ((ANM2 *)((ANM2 *)(in_ECX + 0x10)))->ANM2::Load(&menuAnmPath,1); local_14 = 0xffffffff; if (0xf < menuAnmPath._capacity) { uVar2 = menuAnmPath._capacity + 1; - freeBlock = (char *)menuAnmPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)menuAnmPath._buf) + 0x0)); if (0xfff < uVar2) { - freeBlock = *(char **)(menuAnmPath._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(menuAnmPath._buf) + 0x0)) + -4); uVar2 = menuAnmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(menuAnmPath._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(menuAnmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -99,7 +99,7 @@ void Menu_Game::LoadGraphics() bVar3 = bVar1 < *idleName; if (bVar1 != *idleName) { LAB_00980fe1: - uVar2 = -(uint)bVar3 | 1; + uVar2 = -GHIDRA_UINT(bVar3) | 1; goto LAB_00980fe6; } if (bVar1 == 0) break; @@ -126,21 +126,21 @@ LAB_00981012: widgetAnmPath._buf[1] = '\0'; widgetAnmPath._buf[2] = '\0'; widgetAnmPath._buf[3] = '\0'; - widgetAnmPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(widgetAnmPath._buf) + 0x0)) = std::_Allocate(0x30); widgetAnmPath._size = 0x2d; widgetAnmPath._capacity = 0x2f; - builtin_strncpy((char *)widgetAnmPath._buf._0_4_,"gfx/ui/main menu/ContinueProgress_Widget.anm2", + builtin_strncpy((*(undefined4 *)((char *)&((char *)widgetAnmPath._buf) + 0x0)),"gfx/ui/main menu/ContinueProgress_Widget.anm2", 0x2e); local_14 = 1; ((ANM2 *)((ANM2 *)(in_ECX + 0x124)))->ANM2::Load(&widgetAnmPath,1); local_14 = 0xffffffff; if (0xf < widgetAnmPath._capacity) { uVar2 = widgetAnmPath._capacity + 1; - freeBlock = (char *)widgetAnmPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)widgetAnmPath._buf) + 0x0)); if (0xfff < uVar2) { - freeBlock = *(char **)(widgetAnmPath._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(widgetAnmPath._buf) + 0x0)) + -4); uVar2 = widgetAnmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(widgetAnmPath._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(widgetAnmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -149,7 +149,7 @@ LAB_00981012: } widgetAnmPath._size = 0; widgetAnmPath._capacity = 0xf; - widgetAnmPath._buf._0_4_ = widgetAnmPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(widgetAnmPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(widgetAnmPath._buf) + 0x0)) & 0xffffff00; ((ANM2 *)((ANM2 *)(in_ECX + 0x124)))->ANM2::SetAnimation((byte *)"Dissapear",1); if (*(int *)(in_ECX + 0x158) != 0) { AnimationState::AdvancePosition @@ -207,7 +207,7 @@ void Menu_Game::Update() local_14 = 0xffffffff; puStack_18 = &LAB_00b0cd63; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)((&seedsCopy)[1]._stageSeeds + 1); + local_24 = __security_cookie ^ GHIDRA_UINT(((&seedsCopy)[1]._stageSeeds + 1)); ExceptionList = &local_1c; piVar1 = (&seedsCopy)[1]._stageSeeds + 4; if ((g_menuManager->_selectedMenuID != 3) && @@ -216,7 +216,7 @@ void Menu_Game::Update() { AnimationState::AdvancePosition (&(this->ContinueWidgetSprite)._animState, - *(int *)((int)(this->ContinueWidgetSprite)._animState._animData + 0x30) + -1); + *(int *)(GHIDRA_INT((this->ContinueWidgetSprite)._animState._animData) + 0x30) + -1); piVar1 = (int *)puStack_20; } puStack_20 = (undefined1 *)piVar1; @@ -331,7 +331,7 @@ LAB_00981778: LAB_0098177b: local_d4 = (Manager *)0x11a; seed_fart_sound_override((int *)&local_d4); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_d4,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_d4),1.0,2,0,1.0,0.0); } } } @@ -346,18 +346,18 @@ LAB_0098177b: menuManager = g_menuManager; local_14 = 0; ((Seeds *)(&seedsCopy))->Seeds::construct_from_copy(&local_148); - local_14 = CONCAT31(local_14._1_3_,1); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); ((Seeds *)(&menuManager->_seedsObject))->Seeds::operator_assign(other); FID_conflict__Erase_tree_>_> (&seedsCopy._seedEffects, (fuzzer_allocator_> *)&seedsCopy._seedEffects - ,*(_Tree_node **)((int)seedsCopy._seedEffects + 4)); + ,*(_Tree_node **)(GHIDRA_INT(seedsCopy._seedEffects) + 4)); operator_delete(seedsCopy._seedEffects,0x14); local_14 = 0xffffffff; FID_conflict__Erase_tree_>_> (&local_148._seedEffects, (fuzzer_allocator_> *)&local_148._seedEffects - ,*(_Tree_node **)((int)local_148._seedEffects + 4)); + ,*(_Tree_node **)(GHIDRA_INT(local_148._seedEffects) + 4)); iVar5 = 0x14; cmpResult = 0x98141e; pvVar11 = local_148._seedEffects; @@ -385,7 +385,7 @@ LAB_0098177b: local_148._stageSeeds[10] = 0x3e2cacad; local_148._stageSeeds[0xb] = 0x3e34b4b5; local_148._stageSeeds[0xc] = 0x3f800000; - local_148._playerInitSeed = (int)g_vectorZero.x; + local_148._playerInitSeed = GHIDRA_INT(g_vectorZero.x); local_148._stageSeeds[5] = 0; local_148._stageSeeds[6] = 0xb78894; local_148._stageSeeds[7] = -1; @@ -484,7 +484,7 @@ LAB_00981912: bVar7 = bVar3 < (byte)*pcVar6; if (bVar3 != *pcVar6) { LAB_00981960: - cmpResult = -(uint)bVar7 | 1; + cmpResult = -GHIDRA_UINT(bVar7) | 1; goto LAB_00981965; } if (bVar3 == 0) break; @@ -512,7 +512,7 @@ LAB_00981965: bVar7 = bVar3 < (byte)*pcVar6; if (bVar3 != *pcVar6) { LAB_009818f3: - cmpResult = -(uint)bVar7 | 1; + cmpResult = -GHIDRA_UINT(bVar7) | 1; goto LAB_009818f8; } if (bVar3 == 0) break; @@ -542,7 +542,7 @@ LAB_00981881: bVar7 = bVar3 < (byte)*pcVar6; if (bVar3 != *pcVar6) { LAB_009819c0: - cmpResult = -(uint)bVar7 | 1; + cmpResult = -GHIDRA_UINT(bVar7) | 1; goto LAB_009819c5; } if (bVar3 == 0) break; @@ -560,24 +560,24 @@ LAB_009819c5: LAB_009819e5: manager = g_manager; seed_fart_sound_override((int *)&local_d4); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_d4,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_d4),1.0,2,0,1.0,0.0); } } LAB_00981a25: local_e4.y = (float)this->SelectedElement; if (((this->GameMenuSprite)._animState._animData != (void *)0x0) && - ((6 < *(int *)((int)(this->GameMenuSprite)._animState._animation + 0x80) || + ((6 < *(int *)(GHIDRA_INT((this->GameMenuSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 6 < *(int *)((int)(this->GameMenuSprite)._animState._animation + 0x80))))) { + 6 < *(int *)(GHIDRA_INT((this->GameMenuSprite)._animState._animation) + 0x80))))) { pvVar11 = (this->GameMenuSprite)._animState._animData; local_d4 = *(Manager **)((char *)pvVar11 + 0x50); if ((pvVar11 == (void *)0x0) || - (((int)local_d4 < 0 || (*(int *)((char *)pvVar11 + 0x1c) <= (int)local_d4)))) { + ((GHIDRA_INT(local_d4) < 0 || (*(int *)((char *)pvVar11 + 0x1c) <= GHIDRA_INT(local_d4))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(this->GameMenuSprite)._animState._layerFrames + (int)local_d4 * 4) = 0; + *(undefined4 *)(GHIDRA_INT((this->GameMenuSprite)._animState._layerFrames) + GHIDRA_INT(local_d4) * 4) = 0; AnimationState::AdvanceLayerPosition - (&(this->GameMenuSprite)._animState,(int)local_d4,(float)(int)local_e4.y); + (&(this->GameMenuSprite)._animState,GHIDRA_INT(local_d4),(float)GHIDRA_INT(local_e4.y)); } if ((g_manager->_gamestate)._isSaveAvailable == 0) { if ((this->GameMenuSprite)._animState._animData == (void *)0x0) goto LAB_00981c09; @@ -585,11 +585,11 @@ LAB_00981a25: if ((g_manager->_gamestate)._isRerunAvailable == 0) { if ((*(int *)((char *)pvVar11 + 0x80) < 3) && (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - *(int *)((int)(this->GameMenuSprite)._animState._animation + 0x80) < 3)) goto LAB_00981c09; + *(int *)(GHIDRA_INT((this->GameMenuSprite)._animState._animation) + 0x80) < 3)) goto LAB_00981c09; pvVar11 = (this->GameMenuSprite)._animState._animData; local_e4.y = *(float *)((char *)pvVar11 + 0x40); if ((pvVar11 == (void *)0x0) || - (((int)local_e4.y < 0 || (*(int *)((char *)pvVar11 + 0x1c) <= (int)local_e4.y)))) { + ((GHIDRA_INT(local_e4.y) < 0 || (*(int *)((char *)pvVar11 + 0x1c) <= GHIDRA_INT(local_e4.y))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } fVar4 = 1.0; @@ -597,11 +597,11 @@ LAB_00981a25: else { if ((*(int *)((char *)pvVar11 + 0x80) < 3) && (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - *(int *)((int)(this->GameMenuSprite)._animState._animation + 0x80) < 3)) goto LAB_00981c09; + *(int *)(GHIDRA_INT((this->GameMenuSprite)._animState._animation) + 0x80) < 3)) goto LAB_00981c09; pvVar11 = (this->GameMenuSprite)._animState._animData; local_e4.y = *(float *)((char *)pvVar11 + 0x40); if ((pvVar11 == (void *)0x0) || - (((int)local_e4.y < 0 || (*(int *)((char *)pvVar11 + 0x1c) <= (int)local_e4.y)))) { + ((GHIDRA_INT(local_e4.y) < 0 || (*(int *)((char *)pvVar11 + 0x1c) <= GHIDRA_INT(local_e4.y))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } fVar4 = 2.0; @@ -609,20 +609,20 @@ LAB_00981a25: } else { if (((this->GameMenuSprite)._animState._animData == (void *)0x0) || - ((*(int *)((int)(this->GameMenuSprite)._animState._animation + 0x80) < 3 && + ((*(int *)(GHIDRA_INT((this->GameMenuSprite)._animState._animation) + 0x80) < 3 && (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - *(int *)((int)(this->GameMenuSprite)._animState._animation + 0x80) < 3)))) + *(int *)(GHIDRA_INT((this->GameMenuSprite)._animState._animation) + 0x80) < 3)))) goto LAB_00981c09; pvVar11 = (this->GameMenuSprite)._animState._animData; local_e4.y = *(float *)((char *)pvVar11 + 0x40); if ((pvVar11 == (void *)0x0) || - (((int)local_e4.y < 0 || (*(int *)((char *)pvVar11 + 0x1c) <= (int)local_e4.y)))) { + ((GHIDRA_INT(local_e4.y) < 0 || (*(int *)((char *)pvVar11 + 0x1c) <= GHIDRA_INT(local_e4.y))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } fVar4 = 0.0; } - *(undefined4 *)((int)(this->GameMenuSprite)._animState._layerFrames + (int)local_e4.y * 4) = 0; - ((AnimationState *)(&(this->GameMenuSprite)._animState))->AnimationState::AdvanceLayerPosition((int)local_e4.y,fVar4); + *(undefined4 *)(GHIDRA_INT((this->GameMenuSprite)._animState._layerFrames) + GHIDRA_INT(local_e4.y) * 4) = 0; + ((AnimationState *)(&(this->GameMenuSprite)._animState))->AnimationState::AdvanceLayerPosition(GHIDRA_INT(local_e4.y),fVar4); LAB_00981c09: if ((g_menuControllerIndex == 0) || (isModsKeyVisible = 0, g_menuControllerIndex == -1)) { isModsKeyVisible = 1; @@ -675,7 +675,7 @@ void Menu_Game::Render() float local_14; int continueImage; - local_14 = (float)(__security_cookie ^ (uint)((&guideColor)[1]._tint + 3)); + local_14 = (float)(__security_cookie ^ GHIDRA_UINT(((&guideColor)[1]._tint + 3))); menuX = (g_menuManager->_ViewPosition).x + this->PositionX; menuY = (g_menuManager->_ViewPosition).y + this->PositionY; if ((this->GameMenuSprite)._loaded != 0) { @@ -716,14 +716,14 @@ void Menu_Game::Render() color._offset[1] = (float)uStack_60; color._offset[0] = (float)uStack_60; auVar2 = ZEXT1632(CONCAT412(0x3f800000,CONCAT48(0x3f800000,0x3f8000003f800000))); - color._tint[0] = (float)auVar2._0_4_; - color._tint[1] = (float)auVar2._4_4_; - color._tint[2] = (float)auVar2._8_4_; - color._tint[3] = (float)auVar2._12_4_; - color._colorize[0] = (float)auVar2._16_4_; - color._colorize[1] = (float)auVar2._20_4_; - color._colorize[2] = (float)auVar2._24_4_; - color._colorize[3] = (float)auVar2._28_4_; + color._tint[0] = (*(undefined4 *)((char *)&((float)auVar2) + 0x0)); + color._tint[1] = (*(undefined4 *)((char *)&((float)auVar2) + 0x4)); + color._tint[2] = (*(undefined4 *)((char *)&((float)auVar2) + 0x8)); + color._tint[3] = (*(undefined4 *)((char *)&((float)auVar2) + 0xc)); + color._colorize[0] = (*(undefined4 *)((char *)&((float)auVar2) + 0x10)); + color._colorize[1] = (*(undefined4 *)((char *)&((float)auVar2) + 0x14)); + color._colorize[2] = (*(undefined4 *)((char *)&((float)auVar2) + 0x18)); + color._colorize[3] = (*(undefined4 *)((char *)&((float)auVar2) + 0x1c)); color._offset[2] = 0.0; pos.y = scratchVec[0].y; pos.x = scratchVec[0].x; @@ -745,7 +745,7 @@ void Menu_Game::Render() bVar3 = bVar1 < (byte)*unusedArg; if (bVar1 != *unusedArg) { LAB_00981e47: - cmpResult = -(uint)bVar3 | 1; + cmpResult = -GHIDRA_UINT(bVar3) | 1; goto LAB_00981e4c; } if (bVar1 == 0) break; @@ -820,7 +820,7 @@ LAB_00981e4c: unusedArg = (char *)extraout_ECX_00; } LAB_00982038: - shader_cache_find((int)unusedArg); + shader_cache_find(GHIDRA_INT(unusedArg)); return; } @@ -892,7 +892,7 @@ void Menu_Game::PreRenderContinueImg() local_14 = 0xffffffff; puStack_18 = &LAB_00b0cdea; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(stageNameWide + 0x110); + local_24 = __security_cookie ^ GHIDRA_UINT((stageNameWide + 0x110)); ExceptionList = &local_1c; imageCenter.x = 0.0; imageCenter.y = 0.0; @@ -923,7 +923,7 @@ LAB_0098228c: } else { pfVar7 = local_29c; - if (0xf < (uint)local_29c[5]) { + if (0xf < GHIDRA_UINT(local_29c[5])) { pfVar7 = (float *)*local_29c; } expectedAnimName = "Character"; @@ -932,14 +932,14 @@ LAB_0098228c: isLess = bVar6 < (byte)*expectedAnimName; if (bVar6 != *expectedAnimName) { LAB_00982260: - uVar8 = -(uint)isLess | 1; + uVar8 = -GHIDRA_UINT(isLess) | 1; goto LAB_00982265; } if (bVar6 == 0) break; bVar6 = *(byte *)((char *)pfVar7 + 1); isLess = bVar6 < (byte)expectedAnimName[1]; if (bVar6 != expectedAnimName[1]) goto LAB_00982260; - pfVar7 = (float *)((int)pfVar7 + 2); + pfVar7 = (float *)(GHIDRA_INT(pfVar7) + 2); expectedAnimName = expectedAnimName + 2; } while (bVar6 != 0); uVar8 = 0; @@ -949,39 +949,39 @@ LAB_00982265: ((this->ContinueWidgetSprite)._animState._isPlaying == 0)))) goto LAB_0098228c; } local_294 = *(NetplayManager *)&(*(undefined1 *)((char *)&((((Manager *)NVar17)->_gamestate)) + 0x19d7c)); - if ((uint)local_294 < 0x29) { + if (GHIDRA_UINT(local_294) < 0x29) { if (((this->ContinueWidgetSprite)._animState._animData != (void *)0x0) && - ((0 < *(int *)((int)(this->ContinueWidgetSprite)._animState._animation + 0x80) || + ((0 < *(int *)(GHIDRA_INT((this->ContinueWidgetSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 0 < *(int *)((int)(this->ContinueWidgetSprite)._animState._animation + 0x80))))) { + 0 < *(int *)(GHIDRA_INT((this->ContinueWidgetSprite)._animState._animation) + 0x80))))) { pvVar10 = (this->ContinueWidgetSprite)._animState._animData; local_29c = *(float **)((char *)pvVar10 + 0x38); if ((pvVar10 == (void *)0x0) || - (((int)local_29c < 0 || (*(int *)((char *)pvVar10 + 0x1c) <= (int)local_29c)))) { + ((GHIDRA_INT(local_29c) < 0 || (*(int *)((char *)pvVar10 + 0x1c) <= GHIDRA_INT(local_29c))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } *(undefined4 *) - ((int)(this->ContinueWidgetSprite)._animState._layerFrames + (int)local_29c * 4) = 0; + (GHIDRA_INT((this->ContinueWidgetSprite)._animState._layerFrames) + GHIDRA_INT(local_29c) * 4) = 0; AnimationState::AdvanceLayerPosition - (&(this->ContinueWidgetSprite)._animState,(int)local_29c,(float)(int)local_294); + (&(this->ContinueWidgetSprite)._animState,GHIDRA_INT(local_29c),(float)GHIDRA_INT(local_294)); } layer = ((ANM2 *)(&this->ContinueWidgetSprite))->ANM2::GetLayer((byte *)0x0); layer->_visible = 1; local_294 = *(NetplayManager *)&(*(undefined1 *)((char *)&((((Manager *)NVar17)->_gamestate)) + 0x19d7c)); if (((this->ContinueWidgetSprite)._animState._animData != (void *)0x0) && - ((3 < *(int *)((int)(this->ContinueWidgetSprite)._animState._animation + 0x80) || + ((3 < *(int *)(GHIDRA_INT((this->ContinueWidgetSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 3 < *(int *)((int)(this->ContinueWidgetSprite)._animState._animation + 0x80))))) { + 3 < *(int *)(GHIDRA_INT((this->ContinueWidgetSprite)._animState._animation) + 0x80))))) { pvVar10 = (this->ContinueWidgetSprite)._animState._animData; local_29c = *(float **)((char *)pvVar10 + 0x44); if ((pvVar10 == (void *)0x0) || - (((int)local_29c < 0 || (*(int *)((char *)pvVar10 + 0x1c) <= (int)local_29c)))) { + ((GHIDRA_INT(local_29c) < 0 || (*(int *)((char *)pvVar10 + 0x1c) <= GHIDRA_INT(local_29c))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } *(undefined4 *) - ((int)(this->ContinueWidgetSprite)._animState._layerFrames + (int)local_29c * 4) = 0; + (GHIDRA_INT((this->ContinueWidgetSprite)._animState._layerFrames) + GHIDRA_INT(local_29c) * 4) = 0; AnimationState::AdvanceLayerPosition - (&(this->ContinueWidgetSprite)._animState,(int)local_29c,(float)(int)local_294); + (&(this->ContinueWidgetSprite)._animState,GHIDRA_INT(local_29c),(float)GHIDRA_INT(local_294)); } layer = ((ANM2 *)(&this->ContinueWidgetSprite))->ANM2::GetLayer((byte *)0x3); layer->_visible = 1; @@ -994,19 +994,19 @@ LAB_00982265: } local_294 = *(NetplayManager *)&(*(undefined1 *)((char *)&((((Manager *)NVar17)->_gamestate)) + 0x8)); if (((this->ContinueWidgetSprite)._animState._animData != (void *)0x0) && - ((2 < *(int *)((int)(this->ContinueWidgetSprite)._animState._animation + 0x80) || + ((2 < *(int *)(GHIDRA_INT((this->ContinueWidgetSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 2 < *(int *)((int)(this->ContinueWidgetSprite)._animState._animation + 0x80))))) { + 2 < *(int *)(GHIDRA_INT((this->ContinueWidgetSprite)._animState._animation) + 0x80))))) { pvVar10 = (this->ContinueWidgetSprite)._animState._animData; local_29c = *(float **)((char *)pvVar10 + 0x40); if ((pvVar10 == (void *)0x0) || - (((int)local_29c < 0 || (*(int *)((char *)pvVar10 + 0x1c) <= (int)local_29c)))) { + ((GHIDRA_INT(local_29c) < 0 || (*(int *)((char *)pvVar10 + 0x1c) <= GHIDRA_INT(local_29c))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(this->ContinueWidgetSprite)._animState._layerFrames + (int)local_29c * 4) + *(undefined4 *)(GHIDRA_INT((this->ContinueWidgetSprite)._animState._layerFrames) + GHIDRA_INT(local_29c) * 4) = 0; AnimationState::AdvanceLayerPosition - (&(this->ContinueWidgetSprite)._animState,(int)local_29c,(float)(int)local_294); + (&(this->ContinueWidgetSprite)._animState,GHIDRA_INT(local_29c),(float)GHIDRA_INT(local_294)); } if ((this->ContinueWidgetSprite)._loaded != 0) { if ((this->ContinueWidgetSprite)._overlayRenderFirst == 0) { @@ -1038,7 +1038,7 @@ LAB_00982265: iVar9 = ((Font *)(&g_manager->_font2_TeamMeatEx12))->Font::get_string_width_n((byte *)&local_30,-1); fVar19 = fVar19 - 6.0; timeFontSettings = (FontSettings)0x0; - local_260._buf._0_4_ = (std_string *)0xffff; + (*(undefined4 *)((char *)&(local_260._buf) + 0x0)) = (std_string *)0xffff; local_260._buf[4] = '\0'; local_260._buf[5] = '\0'; local_260._buf[6] = '\0'; @@ -1074,9 +1074,9 @@ LAB_00982265: else { iVar9 = 0; } - bVar6 = ((Seeds *)((Seeds *)((int)NVar17 + 0x1f6c8)))->Seeds::HasSeedEffect(9); - local_294._0_1_ = bVar6; - bVar6 = ((Seeds *)((Seeds *)((int)NVar17 + 0x1f6c8)))->Seeds::HasSeedEffect(0x10); + bVar6 = ((Seeds *)((Seeds *)(GHIDRA_INT(NVar17) + 0x1f6c8)))->Seeds::HasSeedEffect(9); + (*(undefined1 *)((char *)&(local_294) + 0x0)) = bVar6; + bVar6 = ((Seeds *)((Seeds *)(GHIDRA_INT(NVar17) + 0x1f6c8)))->Seeds::HasSeedEffect(0x10); if (bVar6 == 0) { iVar12 = 0; } @@ -1085,7 +1085,7 @@ LAB_00982265: } Level::get_stage_display_name (&local_260,*(int *)((char *)local_298 + 0x1088),*(int *)((char *)local_298 + 0x108c), - *(uint *)((char *)local_298 + 0x1098),iVar12,local_294._0_1_,iVar9); + *(uint *)((char *)local_298 + 0x1098),iVar12,(*(undefined1 *)((char *)&(local_294) + 0x0)),iVar9); local_30 = (NetplayManager)0x0; stageLinesEnd = (NetplayManager)0x0; stageLinesCapacityEnd = 0; @@ -1093,7 +1093,7 @@ LAB_00982265: local_2a4 = (Menu_Game *)&g_manager->_font2_TeamMeatEx12; psVar13 = &local_260; if (0xf < local_260._capacity) { - psVar13 = (std_string *)local_260._buf._0_4_; + psVar13 = (*(undefined4 *)((char *)&((std_string *)local_260._buf) + 0x0)); } uVar8 = ((Font *)((Font *)local_2a4))->Font::get_string_width_n((byte *)psVar13,-1); if (uVar8 < 0x58) { @@ -1107,43 +1107,43 @@ LAB_00982265: std::vector::_Tidy(); local_2a0 = 0.0; local_298 = stageLinesEnd; - iVar9 = (int)stageLinesEnd - (int)local_30 >> 0x1f; + iVar9 = GHIDRA_INT(stageLinesEnd) - GHIDRA_INT(local_30) >> 0x1f; NVar17 = local_30; NVar16 = stageLinesEnd; - if (((int)stageLinesEnd - (int)local_30) / 0x18 + iVar9 != iVar9) { + if ((GHIDRA_INT(stageLinesEnd) - GHIDRA_INT(local_30)) / 0x18 + iVar9 != iVar9) { local_294 = (NetplayManager)0x0; do { if (local_2a0 == 0.0) { LAB_009829b7: - local_2a0 = (float)((int)local_2a0 + 1); - local_294 = (NetplayManager)((int)local_294 + 0x18); + local_2a0 = (float)(GHIDRA_INT(local_2a0) + 1); + local_294 = (NetplayManager)(GHIDRA_INT(local_294) + 0x18); } else { - uVar8 = *(uint *)((int)((int)local_294 + 0x10) + (int)NVar17); - stageLine = (byte *)((int)local_294 + (int)NVar17); + uVar8 = *(uint *)(GHIDRA_INT((GHIDRA_INT(local_294) + 0x10)) + GHIDRA_INT(NVar17)); + stageLine = (byte *)(GHIDRA_INT(local_294) + GHIDRA_INT(NVar17)); if (2 < uVar8) goto LAB_009829b7; if (uVar8 == 0x7fffffff) goto LAB_009830f2; pbVar14 = stageLine; if (0xf < *(uint *)(stageLine + 0x14)) { pbVar14 = *(byte **)stageLine; } - ((std::string *)((char *)&local_248))->std::string::concat((int)stageLine,(std_string *)stageLine, + ((std::string *)((char *)&local_248))->std::string::concat(GHIDRA_INT(stageLine),(std_string *)stageLine, &DAT_00b656ec,1,pbVar14,uVar8); pbVar14 = stageLine; - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; joinedBuf = (byte *****)&local_248; - if (0xf < (uint)local_244._unk) { + if (0xf < GHIDRA_UINT(local_244._unk)) { joinedBuf = local_248; } - ((std::string *)((char *)(stageLine + -0x18)))->std::string::append((byte *)joinedBuf,(uint)local_244._alpha); - local_14 = CONCAT31(local_14._1_3_,2); - if (0xf < (uint)local_244._unk) { + ((std::string *)((char *)(stageLine + -0x18)))->std::string::append((byte *)joinedBuf,GHIDRA_UINT(local_244._alpha)); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); + if (0xf < GHIDRA_UINT(local_244._unk)) { uVar8 = local_244._unk + 1; joinedBuf = local_248; if (0xfff < uVar8) { joinedBuf = (byte *****)local_248[-1]; uVar8 = local_244._unk + 0x24; - if ((byte *)0x1f < (byte *)((int)local_248 + (-4 - (int)joinedBuf))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(local_248) + (-4 - GHIDRA_INT(joinedBuf)))) goto LAB_00983056; } operator_delete(joinedBuf,uVar8); @@ -1153,15 +1153,15 @@ LAB_009829b7: NVar17 = local_30; NVar16 = stageLinesEnd; } - } while ((uint)local_2a0 < (uint)(((int)NVar16 - (int)NVar17) / 0x18)); + } while (GHIDRA_UINT(local_2a0) < GHIDRA_UINT(((GHIDRA_INT(NVar16) - GHIDRA_INT(NVar17)) / 0x18))); } - if (2 < (uint)(((int)NVar16 - (int)NVar17) / 0x18)) { + if (2 < GHIDRA_UINT(((GHIDRA_INT(NVar16) - GHIDRA_INT(NVar17)) / 0x18))) { uVar8 = *(uint *)((char *)NVar17 + 0x28); local_2a0 = (float)(local_260._size >> 1); NVar11 = NVar16; - if (*(int *)((char *)NVar17 + 0x10) + 1 + uVar8 < (uint)local_2a0) { + if (*(int *)((char *)NVar17 + 0x10) + 1 + uVar8 < GHIDRA_UINT(local_2a0)) { do { - psVar13 = (std_string *)((int)NVar17 + 0x18); + psVar13 = (std_string *)(GHIDRA_INT(NVar17) + 0x18); if (uVar8 == 0x7fffffff) goto LAB_009830f2; lineCStr = psVar13; if (0xf < *(uint *)((char *)NVar17 + 0x2c)) { @@ -1169,28 +1169,28 @@ LAB_009829b7: } ((std::string *)((char *)&local_248))->std::string::concat(local_2b4,psVar13,&DAT_00b656ec,1, (byte *)lineCStr,uVar8); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; joinedBuf = (byte *****)&local_248; - if (0xf < (uint)local_244._unk) { + if (0xf < GHIDRA_UINT(local_244._unk)) { joinedBuf = local_248; } - ((std::string *)((char *)NVar17))->std::string::append((byte *)joinedBuf,(uint)local_244._alpha); - local_14 = CONCAT31(local_14._1_3_,2); - if (0xf < (uint)local_244._unk) { + ((std::string *)((char *)NVar17))->std::string::append((byte *)joinedBuf,GHIDRA_UINT(local_244._alpha)); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); + if (0xf < GHIDRA_UINT(local_244._unk)) { uVar8 = local_244._unk + 1; joinedBuf = local_248; if (0xfff < uVar8) { joinedBuf = (byte *****)local_248[-1]; uVar8 = local_244._unk + 0x24; - if ((byte *)0x1f < (byte *)((int)local_248 + (-4 - (int)joinedBuf))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(local_248) + (-4 - GHIDRA_INT(joinedBuf)))) goto LAB_00983056; } operator_delete(joinedBuf,uVar8); } - local_294 = (NetplayManager)((int)NVar17 + 0x30); + local_294 = (NetplayManager)(GHIDRA_INT(NVar17) + 0x30); if (local_294 != NVar11) { do { - NVar16 = (NetplayManager)((int)NVar17 + 0x18); + NVar16 = (NetplayManager)(GHIDRA_INT(NVar17) + 0x18); if (NVar16 != local_294) { ((std::string *)((char *)NVar16))->std::string::_Tidy_deallocate(); iVar9 = *(int *)((char *)local_294 + 4); @@ -1207,36 +1207,36 @@ LAB_009829b7: *(int *)((char *)NVar17 + 0x44) = 0xf; *(undefined1 *)local_294 = 0; } - local_294 = (NetplayManager)((int)local_294 + 0x18); + local_294 = (NetplayManager)(GHIDRA_INT(local_294) + 0x18); NVar17 = NVar16; } while (local_294 != NVar11); NVar17 = local_30; } NVar15 = *(NetplayManager *)((char *)NVar11 + -4); - NVar16 = (NetplayManager)((int)NVar11 + -0x18); + NVar16 = (NetplayManager)(GHIDRA_INT(NVar11) + -0x18); local_298 = NVar16; - if (0xf < (uint)NVar15) { + if (0xf < GHIDRA_UINT(NVar15)) { pvVar10 = *(void **)NVar16; - uVar8 = (int)NVar15 + 1; + uVar8 = GHIDRA_INT(NVar15) + 1; allocBase = pvVar10; if (0xfff < uVar8) { allocBase = *(void **)((char *)pvVar10 + -4); - uVar8 = (int)NVar15 + 0x24; - if (0x1f < (uint)((int)pvVar10 + (-4 - (int)allocBase))) goto LAB_00983056; + uVar8 = GHIDRA_INT(NVar15) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar10) + (-4 - GHIDRA_INT(allocBase))))) goto LAB_00983056; } operator_delete(allocBase,uVar8); } - ((Vector *)((int)NVar11 + -8))->x = 0.0; + ((Vector *)(GHIDRA_INT(NVar11) + -8))->x = 0.0; *(NetplayManager *)((char *)NVar11 + -4) = (NetplayManager)0xf; *(undefined1 *)NVar16 = 0; uVar8 = *(uint *)((char *)NVar17 + 0x28); NVar11 = NVar16; stageLinesEnd = NVar16; - } while (*(int *)((char *)NVar17 + 0x10) + 1 + uVar8 < (uint)local_2a0); + } while (*(int *)((char *)NVar17 + 0x10) + 1 + uVar8 < GHIDRA_UINT(local_2a0)); } - if (2 < (uint)(((int)NVar16 - (int)NVar17) / 0x18)) { + if (2 < GHIDRA_UINT(((GHIDRA_INT(NVar16) - GHIDRA_INT(NVar17)) / 0x18))) { do { - psVar13 = (std_string *)((int)NVar17 + 0x30); + psVar13 = (std_string *)(GHIDRA_INT(NVar17) + 0x30); if (*(uint *)((char *)NVar17 + 0x40) == 0x7fffffff) { LAB_009830f2: /* WARNING: Subroutine does not return */ @@ -1248,28 +1248,28 @@ LAB_009830f2: } ((std::string *)((char *)&local_248))->std::string::concat(local_2b4,psVar13,&DAT_00b656ec,1, (byte *)lineCStr,*(uint *)((char *)NVar17 + 0x40)); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; joinedBuf = (byte *****)&local_248; - if (0xf < (uint)local_244._unk) { + if (0xf < GHIDRA_UINT(local_244._unk)) { joinedBuf = local_248; } - ((std::string *)((char *)((int)NVar17 + 0x18)))->std::string::append((byte *)joinedBuf, - (uint)local_244._alpha); - local_14 = CONCAT31(local_14._1_3_,2); - if (0xf < (uint)local_244._unk) { + ((std::string *)((char *)(GHIDRA_INT(NVar17) + 0x18)))->std::string::append((byte *)joinedBuf, + GHIDRA_UINT(local_244._alpha)); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); + if (0xf < GHIDRA_UINT(local_244._unk)) { uVar8 = local_244._unk + 1; joinedBuf = local_248; if (0xfff < uVar8) { joinedBuf = (byte *****)local_248[-1]; uVar8 = local_244._unk + 0x24; - if ((byte *)0x1f < (byte *)((int)local_248 + (-4 - (int)joinedBuf))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(local_248) + (-4 - GHIDRA_INT(joinedBuf)))) goto LAB_00983056; } operator_delete(joinedBuf,uVar8); } - NVar16 = (NetplayManager)((int)NVar17 + 0x48); + NVar16 = (NetplayManager)(GHIDRA_INT(NVar17) + 0x48); if (NVar16 != local_298) { - NVar17 = (NetplayManager)((int)NVar17 + 0x30); + NVar17 = (NetplayManager)(GHIDRA_INT(NVar17) + 0x30); NVar11 = local_298; do { if (NVar17 != NVar16) { @@ -1281,13 +1281,13 @@ LAB_009830f2: *(int *)((char *)NVar17 + 4) = iVar9; *(int *)((char *)NVar17 + 8) = iVar12; *(int *)((char *)NVar17 + 0xc) = iVar1; - pPVar2 = (PersistentGameData *)((int)NVar16 + 0x14); + pPVar2 = (PersistentGameData *)(GHIDRA_INT(NVar16) + 0x14); uVar3 = (*(undefined1 *)((char *)(pPVar2) + 0x0)); bVar6 = pPVar2->_isReadOnly; bVar4 = pPVar2->_isSteamAchievementsEnabled; uVar5 = (*(undefined1 *)((char *)(pPVar2) + 0x3)); *(int *)((char *)NVar17 + 0x10) = *(int *)((char *)NVar16 + 0x10); - pPVar2 = (PersistentGameData *)((int)NVar17 + 0x14); + pPVar2 = (PersistentGameData *)(GHIDRA_INT(NVar17) + 0x14); (*(undefined1 *)((char *)(pPVar2) + 0x0)) = uVar3; pPVar2->_isReadOnly = bVar6; pPVar2->_isSteamAchievementsEnabled = bVar4; @@ -1297,23 +1297,23 @@ LAB_009830f2: *(undefined1 *)NVar16 = 0; NVar11 = local_298; } - NVar16 = (NetplayManager)((int)NVar16 + 0x18); - NVar17 = (NetplayManager)((int)NVar17 + 0x18); + NVar16 = (NetplayManager)(GHIDRA_INT(NVar16) + 0x18); + NVar17 = (NetplayManager)(GHIDRA_INT(NVar17) + 0x18); } while (NVar16 != NVar11); NVar17 = local_30; } NVar15 = local_298; - NVar16 = (NetplayManager)((int)local_298 + -0x18); + NVar16 = (NetplayManager)(GHIDRA_INT(local_298) + -0x18); NVar11 = *(NetplayManager *)((char *)local_298 + -4); local_298 = NVar16; - if (0xf < (uint)NVar11) { + if (0xf < GHIDRA_UINT(NVar11)) { pvVar10 = *(void **)NVar16; - uVar8 = (int)NVar11 + 1; + uVar8 = GHIDRA_INT(NVar11) + 1; allocBase = pvVar10; if (0xfff < uVar8) { allocBase = *(void **)((char *)pvVar10 + -4); - uVar8 = (int)NVar11 + 0x24; - if (0x1f < (uint)((int)pvVar10 + (-4 - (int)allocBase))) goto LAB_00983056; + uVar8 = GHIDRA_INT(NVar11) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar10) + (-4 - GHIDRA_INT(allocBase))))) goto LAB_00983056; } operator_delete(allocBase,uVar8); } @@ -1321,7 +1321,7 @@ LAB_009830f2: *(NetplayManager *)((char *)NVar15 + -4) = (NetplayManager)0xf; *(undefined1 *)NVar16 = 0; stageLinesEnd = NVar16; - } while (2 < (uint)(((int)NVar16 - (int)NVar17) / 0x18)); + } while (2 < GHIDRA_UINT(((GHIDRA_INT(NVar16) - GHIDRA_INT(NVar17)) / 0x18))); } } } @@ -1338,9 +1338,9 @@ LAB_009830f2: NVar15 = NVar11; do { strChar = *(char *)NVar15; - NVar15 = (NetplayManager)((int)NVar15 + 1); + NVar15 = (NetplayManager)(GHIDRA_INT(NVar15) + 1); } while (strChar != '\0'); - iVar9 = (int)NVar15 - (int)((int)NVar11 + 1); + iVar9 = GHIDRA_INT(NVar15) - GHIDRA_INT((GHIDRA_INT(NVar11) + 1)); } local_294 = NVar17; text_convert_encoding((byte *)NVar11,iVar9,0,stageNameWide,0x100,1); @@ -1351,7 +1351,7 @@ LAB_009830f2: tmpColor._offset[0] = -NAN; tmpColor._offset[1] = 0.0; tmpColor._offset[2] = 0.0; - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; ((KColor *)(&local_244))->KColor::SetFromARGB(0xff372b2d); fVar18 = local_29c[5]; fVar19 = local_29c[4]; @@ -1359,10 +1359,10 @@ LAB_009830f2: Font::draw_string_wide ((Font *)local_2a4,stageNameWide,(float)local_298 - ((float)(uVar8 >> 1) + 0.0), local_2a0,fVar19,fVar18,color_01,tmpColor._colorize); - local_14._0_1_ = 2; - if (1 < (uint)(((int)NVar16 - (int)local_294) / 0x18)) { + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; + if (1 < GHIDRA_UINT(((GHIDRA_INT(NVar16) - GHIDRA_INT(local_294)) / 0x18))) { local_298 = (NetplayManager)((float)local_298 + 4.0); - pbVar14 = (byte *)((int)local_30 + 0x18); + pbVar14 = (byte *)(GHIDRA_INT(local_30) + 0x18); local_2a0 = local_2a0 + 14.0; if (0xf < *(uint *)((char *)local_30 + 0x2c)) { pbVar14 = *(byte **)pbVar14; @@ -1376,7 +1376,7 @@ LAB_009830f2: bVar6 = *strEnd; strEnd = strEnd + 1; } while (bVar6 != 0); - iVar9 = (int)strEnd - (int)(pbVar14 + 1); + iVar9 = GHIDRA_INT(strEnd) - GHIDRA_INT((pbVar14 + 1)); } text_convert_encoding(pbVar14,iVar9,0,stageNameWide,0x100,1); tmpColor._colorize[0] = 0.0; @@ -1386,7 +1386,7 @@ LAB_009830f2: tmpColor._offset[0] = -NAN; tmpColor._offset[1] = 0.0; tmpColor._offset[2] = 0.0; - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; ((KColor *)(&local_244))->KColor::SetFromARGB(0xff372b2d); fVar18 = local_29c[5]; fVar19 = local_29c[4]; @@ -1395,8 +1395,8 @@ LAB_009830f2: ((Font *)local_2a4,stageNameWide,(float)local_298 - ((float)(uVar8 >> 1) + 0.0), local_2a0,fVar19,fVar18,color_02,tmpColor._colorize); } - local_14 = CONCAT31(local_14._1_3_,1); - for (NVar17 = local_294; NVar17 != NVar16; NVar17 = (NetplayManager)((int)NVar17 + 0x18)) { + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); + for (NVar17 = local_294; NVar17 != NVar16; NVar17 = (NetplayManager)(GHIDRA_INT(NVar17) + 0x18)) { uVar8 = *(uint *)((char *)NVar17 + 0x14); if (0xf < uVar8) { pvVar10 = *(void **)NVar17; @@ -1405,7 +1405,7 @@ LAB_009830f2: if (0xfff < size) { allocBase = *(void **)((char *)pvVar10 + -4); size = uVar8 + 0x24; - if (0x1f < (uint)((int)pvVar10 + (-4 - (int)allocBase))) goto LAB_00983056; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar10) + (-4 - GHIDRA_INT(allocBase))))) goto LAB_00983056; } operator_delete(allocBase,size); } @@ -1413,22 +1413,22 @@ LAB_009830f2: *(int *)((char *)NVar17 + 0x14) = 0xf; *(undefined1 *)NVar17 = 0; } - uVar8 = ((stageLinesCapacityEnd - (int)local_30) / 0x18) * 0x18; + uVar8 = ((stageLinesCapacityEnd - GHIDRA_INT(local_30)) / 0x18) * 0x18; NVar17 = local_30; if (0xfff < uVar8) { NVar17 = *(NetplayManager *)((char *)local_30 + -4); uVar8 = uVar8 + 0x23; - if (0x1f < ((int)local_30 - (int)NVar17) - 4U) goto LAB_00983056; + if (0x1f < (GHIDRA_INT(local_30) - GHIDRA_INT(NVar17)) - 4U) goto LAB_00983056; } operator_delete((void *)NVar17,uVar8); local_14 = 0xffffffff; if (0xf < local_260._capacity) { uVar8 = local_260._capacity + 1; - psVar13 = (std_string *)local_260._buf._0_4_; + psVar13 = (*(undefined4 *)((char *)&((std_string *)local_260._buf) + 0x0)); if (0xfff < uVar8) { - psVar13 = (std_string *)((std_string *)(local_260._buf._0_4_ + -0x18))->_capacity; + psVar13 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(local_260._buf) + 0x0)) + -0x18))->_capacity; uVar8 = local_260._capacity + 0x24; - if ((byte *)0x1f < (byte *)(local_260._buf._0_4_ + (-4 - (int)psVar13))) { + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(local_260._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar13)))) { LAB_00983056: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1438,7 +1438,7 @@ LAB_00983056: } local_260._size = 0; local_260._capacity = 0xf; - local_260._buf._0_4_ = local_260._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(local_260._buf) + 0x0)) = (*(undefined4 *)((char *)&(local_260._buf) + 0x0)) & 0xffffff00; } LAB_00983081: _glfw_context_reset(1); @@ -1480,7 +1480,7 @@ void Menu_Game::on_online_connect_result(int result, void *menuGame) local_10 = ExceptionList; ExceptionList = &local_10; closedPopupId = -1; - ((PopupManager *)(&(*(undefined1 *)((char *)&(g_manager[1]._gamestate) + 0xcf0))))->PopupManager::close((int *)((int)menuGame + 0x240), + ((PopupManager *)(&(*(undefined1 *)((char *)&(g_manager[1]._gamestate) + 0xcf0))))->PopupManager::close((int *)(GHIDRA_INT(menuGame) + 0x240), &closedPopupId); *(int *)((char *)menuGame + 0x240) = -1; if (result == 0) { diff --git a/src/game/menu_key_config.cpp b/src/game/menu_key_config.cpp index 487c0a4..1f8a4bd 100644 --- a/src/game/menu_key_config.cpp +++ b/src/game/menu_key_config.cpp @@ -29,7 +29,7 @@ void Menu_KeyConfig::Update() local_8 = 0xffffffff; puStack_c = &LAB_00b06005; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; g_manager->_isHotkeysEnabled = (char)this->State == '\0'; local_1c = this; @@ -48,8 +48,8 @@ void Menu_KeyConfig::Update() g_menuControllerIndex = 0; g_manager->_isHotkeysEnabled = 1; historyEnd = (menuManager->_menuStateHistory)._end; - if (1 < (uint)((int)historyEnd - (int)(menuManager->_menuStateHistory)._begin >> 2)) { - historyEnd = (void *)((int)historyEnd + -4); + if (1 < GHIDRA_UINT((GHIDRA_INT(historyEnd) - GHIDRA_INT((menuManager->_menuStateHistory)._begin) >> 2))) { + historyEnd = (void *)(GHIDRA_INT(historyEnd) + -4); (menuManager->_menuStateHistory)._end = historyEnd; } ((MenuManager *)(menuManager))->MenuManager::SetState(*(int *)((char *)historyEnd + -4),0); @@ -212,13 +212,13 @@ LAB_008d8f99: } } iVar2 = 0; - iVar5 = (uint)(iVar5 == 0) * 4 + 0xf; + iVar5 = GHIDRA_UINT((iVar5 == 0)) * 4 + 0xf; local_18 = iVar5; do { uVar1 = (&DAT_00b24010)[iVar2]; local_1c = device; fVar3 = device->PositionY; - if ((uint)(*(int *)(device->KeyConfigSprite)._filename._buf - (int)fVar3 >> 4) <= uVar1) { + if (GHIDRA_UINT((*(int *)(device->KeyConfigSprite)._filename._buf - GHIDRA_INT(fVar3) >> 4)) <= uVar1) { KAGE_LogMessage(0x10,(byte *)"ActionId is out of range\n"); fVar3 = local_1c->PositionY; iVar5 = local_18; @@ -228,7 +228,7 @@ LAB_008d8f99: (*(int *)((char *)fVar3 + 4 + uVar1 * 0x10) == -1)) { local_1c = (Menu_KeyConfig *)0xbb; seed_fart_sound_override((int *)&local_1c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_1c,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_1c),1.0,2,0,1.0,0.0); iVar5 = local_18; break; } @@ -260,7 +260,7 @@ LAB_008d8f99: *(undefined1 *)&this->State = 0; ((InputManager *)(&PTR_vftable_00c57b18))->InputManager::get_device(&rebindDevice,iVar5); iVar5 = local_18; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); local_24 = 0x13; if (g_menuControllerIndex != 0) { local_24 = 0xf; @@ -270,7 +270,7 @@ LAB_008d8f99: uVar1 = (&DAT_00b24010)[iVar2]; local_20 = rebindDevice; iVar4 = *(int *)(rebindDevice + 0x10); - if ((uint)(*(int *)(rebindDevice + 0x14) - iVar4 >> 4) <= uVar1) { + if (GHIDRA_UINT((*(int *)(rebindDevice + 0x14) - iVar4 >> 4)) <= uVar1) { KAGE_LogMessage(0x10,(byte *)"ActionId is out of range\n"); iVar4 = *(int *)(local_20 + 0x10); } @@ -279,7 +279,7 @@ LAB_008d8f99: uVar1 = (&DAT_00b24010)[iVar2]; local_20 = rebindDevice; iVar4 = *(int *)(rebindDevice + 0x10); - if ((uint)(*(int *)(rebindDevice + 0x14) - iVar4 >> 4) <= uVar1) { + if (GHIDRA_UINT((*(int *)(rebindDevice + 0x14) - iVar4 >> 4)) <= uVar1) { KAGE_LogMessage(0x10,(byte *)"ActionId is out of range\n"); iVar4 = *(int *)(local_20 + 0x10); } @@ -289,7 +289,7 @@ LAB_008d8f99: uVar1 = (&DAT_00b24010)[iVar2]; local_20 = rebindDevice; iVar4 = *(int *)(rebindDevice + 0x10); - if ((uint)(*(int *)(rebindDevice + 0x14) - iVar4 >> 4) <= uVar1) { + if (GHIDRA_UINT((*(int *)(rebindDevice + 0x14) - iVar4 >> 4)) <= uVar1) { KAGE_LogMessage(0x10,(byte *)"ActionId is out of range\n"); iVar4 = *(int *)(local_20 + 0x10); } @@ -298,28 +298,28 @@ LAB_008d8f99: this = local_1c; iVar2 = iVar2 + 1; } while (iVar2 < local_24); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; if (((rebindDeviceRef != (int *)0x0) && (isActionTriggered = (**(code **)(*rebindDeviceRef + 0xc))(), isActionTriggered != '\0')) && (g_inputDeviceRelease != (void *)0x0)) { (*g_inputDeviceRelease)(&rebindDevice); } - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; FUN_00a24330(this->SelectedColumn,(&DAT_00b24010)[this->SelectedElement],local_18); } } LAB_008d9290: if (((this->KeyConfigSprite)._animState._animData != (void *)0x0) && - ((6 < *(int *)((int)(this->KeyConfigSprite)._animState._animation + 0x80) || + ((6 < *(int *)(GHIDRA_INT((this->KeyConfigSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 6 < *(int *)((int)(this->KeyConfigSprite)._animState._animation + 0x80))))) { + 6 < *(int *)(GHIDRA_INT((this->KeyConfigSprite)._animState._animation) + 0x80))))) { historyEnd = (this->KeyConfigSprite)._animState._animData; iVar5 = *(int *)((char *)historyEnd + 0x50); if ((historyEnd == (void *)0x0) || ((iVar5 < 0 || (*(int *)((char *)historyEnd + 0x1c) <= iVar5)))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(this->KeyConfigSprite)._animState._layerFrames + iVar5 * 4) = 0; + *(undefined4 *)(GHIDRA_INT((this->KeyConfigSprite)._animState._layerFrames) + iVar5 * 4) = 0; ((AnimationState *)(&(this->KeyConfigSprite)._animState))->AnimationState::AdvanceLayerPosition(iVar5,0.0); } LAB_008d92f5: @@ -411,7 +411,7 @@ void Menu_KeyConfig::Render() local_14 = (char *)0xffffffff; puStack_18 = &LAB_00b06061; local_1c = ExceptionList; - uVar2 = __security_cookie ^ (uint)(actionLabels + 0x1a); + uVar2 = __security_cookie ^ GHIDRA_UINT((actionLabels + 0x1a)); ExceptionList = &local_1c; local_24 = uVar2; ((InputManager *)(&PTR_vftable_00c57b18))->InputManager::get_device(&device,g_menuControllerIndex); @@ -463,7 +463,7 @@ LAB_008d94f9: isNameLess = bVar1 < *expectedAnimChar; if (bVar1 != *expectedAnimChar) { LAB_008d94f0: - uVar2 = -(uint)isNameLess | 1; + uVar2 = -GHIDRA_UINT(isNameLess) | 1; goto LAB_008d94f5; } if (bVar1 == 0) break; @@ -512,7 +512,7 @@ LAB_008d94f5: uVar2 = (&DAT_00b24010)[row]; local_a0 = device; layerIndex = device[4]; - if ((uint)(device[5] - layerIndex >> 4) <= uVar2) { + if (GHIDRA_UINT((device[5] - layerIndex >> 4)) <= uVar2) { KAGE_LogMessage(0x10,(byte *)"ActionId is out of range\n"); layerIndex = local_a0[4]; } @@ -540,11 +540,11 @@ LAB_008d94f5: local_d8 = 0xffffffff; local_d4 = 0; local_d0 = 0; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; keyName = string_table_translate(&g_manager->_stringTable,(byte *)actionLabels[row]); local_a0 = (int *)((float)(rowOffset + -0x41) + fVar4); ((Font *)(font))->Font::DrawString(keyName,&rowColor,&fontSettings,x,(float)local_a0); - local_14 = (char *)((uint)local_14._1_3_ << 8); + local_14 = (char *)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8); rowOffsetY = (float)rowOffset; if (controllerIndex == 0) { LAB_008d97fd: @@ -555,14 +555,14 @@ LAB_008d97fd: local_d8 = 0xffffffff; local_d4 = 0; local_d0 = 0; - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; keyName = (byte *)(**(code **)(*device + 0x10))(primaryKey); layerIndex = ((Font *)(font))->Font::get_string_width_n(keyName,-1); keyTextX = (originX + 400.0) - (float)((double)layerIndex + __uint_to_double_fixup[-(layerIndex >> 0x1f)]); keyName = (byte *)(**(code **)(*device + 0x10))(primaryKey); ((Font *)(font))->Font::DrawString(keyName,&rowColor,&fontSettings,keyTextX,(float)local_a0); - local_14 = (char *)((uint)local_14._1_3_ << 8); + local_14 = (char *)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8); } else { local_d0 = 0; @@ -591,14 +591,14 @@ LAB_008d9977: local_d8 = 0xffffffff; local_d4 = 0; local_d0 = 0; - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; keyName = (byte *)(**(code **)(*device + 0x10))(secondaryKey); layerIndex = ((Font *)(font))->Font::get_string_width_n(keyName,-1); keyTextX = (originX + 300.0) - (float)((double)layerIndex + __uint_to_double_fixup[-(layerIndex >> 0x1f)]); keyName = (byte *)(**(code **)(*device + 0x10))(secondaryKey); ((Font *)(font))->Font::DrawString(keyName,&rowColor,&fontSettings,keyTextX,(float)local_a0); - local_14 = (char *)((uint)local_14._1_3_ << 8); + local_14 = (char *)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8); } else { secondaryGlyphPos.y = rowOffsetY + originY; @@ -629,23 +629,23 @@ LAB_008d9977: if ((this->KeyConfigSprite)._overlayRenderFirst == 0) { pvVar3 = (this->KeyConfigSprite)._animState._animData; if (((pvVar3 != (void *)0x0) && - (6 < *(int *)((int)(this->KeyConfigSprite)._animState._animation + 0x80))) && + (6 < *(int *)(GHIDRA_INT((this->KeyConfigSprite)._animState._animation) + 0x80))) && (layerIndex = *(int *)((char *)pvVar3 + 0x50), -1 < layerIndex)) { AnimationLayer::RenderFrame ((AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar3 + 0x18)), &cursorPos, - *(int *)((int)(this->KeyConfigSprite)._animState._layerFrames + + *(int *)(GHIDRA_INT((this->KeyConfigSprite)._animState._layerFrames) + layerIndex * 4),&g_vectorZero,&g_vectorZero, (this->KeyConfigSprite)._animState._animation); } pvVar3 = (this->KeyConfigSprite)._overlayAnimState._animData; if (((pvVar3 != (void *)0x0) && - (6 < *(int *)((int)(this->KeyConfigSprite)._overlayAnimState._animation + 0x80))) && + (6 < *(int *)(GHIDRA_INT((this->KeyConfigSprite)._overlayAnimState._animation) + 0x80))) && (layerIndex = *(int *)((char *)pvVar3 + 0x50), -1 < layerIndex)) { AnimationLayer::RenderFrame ((AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar3 + 0x18)), &cursorPos, - *(int *)((int)(this->KeyConfigSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((this->KeyConfigSprite)._overlayAnimState._layerFrames) + layerIndex * 4),&g_vectorZero,&g_vectorZero, (this->KeyConfigSprite)._overlayAnimState._animation); } @@ -653,23 +653,23 @@ LAB_008d9977: else { pvVar3 = (this->KeyConfigSprite)._overlayAnimState._animData; if (((pvVar3 != (void *)0x0) && - (6 < *(int *)((int)(this->KeyConfigSprite)._overlayAnimState._animation + 0x80))) && + (6 < *(int *)(GHIDRA_INT((this->KeyConfigSprite)._overlayAnimState._animation) + 0x80))) && (layerIndex = *(int *)((char *)pvVar3 + 0x50), -1 < layerIndex)) { AnimationLayer::RenderFrame ((AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar3 + 0x18)), &cursorPos, - *(int *)((int)(this->KeyConfigSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((this->KeyConfigSprite)._overlayAnimState._layerFrames) + layerIndex * 4),&g_vectorZero,&g_vectorZero, (this->KeyConfigSprite)._overlayAnimState._animation); } pvVar3 = (this->KeyConfigSprite)._animState._animData; if (((pvVar3 != (void *)0x0) && - (6 < *(int *)((int)(this->KeyConfigSprite)._animState._animation + 0x80))) && + (6 < *(int *)(GHIDRA_INT((this->KeyConfigSprite)._animState._animation) + 0x80))) && (layerIndex = *(int *)((char *)pvVar3 + 0x50), -1 < layerIndex)) { AnimationLayer::RenderFrame ((AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar3 + 0x18)), &cursorPos, - *(int *)((int)(this->KeyConfigSprite)._animState._layerFrames + + *(int *)(GHIDRA_INT((this->KeyConfigSprite)._animState._layerFrames) + layerIndex * 4),&g_vectorZero,&g_vectorZero, (this->KeyConfigSprite)._animState._animation); } @@ -703,18 +703,18 @@ LAB_008d9977: if ((this->KeyConfigSprite)._overlayRenderFirst == 0) { pvVar3 = (this->KeyConfigSprite)._animState._animData; if (((pvVar3 != (void *)0x0) && - (6 < *(int *)((int)(this->KeyConfigSprite)._animState._animation + 0x80))) && + (6 < *(int *)(GHIDRA_INT((this->KeyConfigSprite)._animState._animation) + 0x80))) && (layerIndex = *(int *)((char *)pvVar3 + 0x50), -1 < layerIndex)) { AnimationLayer::RenderFrame ((AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar3 + 0x18)), &selectedCursorPos, - *(int *)((int)(this->KeyConfigSprite)._animState._layerFrames + + *(int *)(GHIDRA_INT((this->KeyConfigSprite)._animState._layerFrames) + layerIndex * 4),&g_vectorZero,&g_vectorZero, (this->KeyConfigSprite)._animState._animation); } pvVar3 = (this->KeyConfigSprite)._overlayAnimState._animData; if (((pvVar3 != (void *)0x0) && - (6 < *(int *)((int)(this->KeyConfigSprite)._overlayAnimState._animation + 0x80))) && + (6 < *(int *)(GHIDRA_INT((this->KeyConfigSprite)._overlayAnimState._animation) + 0x80))) && (layerIndex = *(int *)((char *)pvVar3 + 0x50), -1 < layerIndex)) { cursorAnm2 = (this->KeyConfigSprite)._overlayAnimState._animation; animLayer = (AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar3 + 0x18)); @@ -725,18 +725,18 @@ LAB_008d9977: else { pvVar3 = (this->KeyConfigSprite)._overlayAnimState._animData; if (((pvVar3 != (void *)0x0) && - (6 < *(int *)((int)(this->KeyConfigSprite)._overlayAnimState._animation + 0x80))) && + (6 < *(int *)(GHIDRA_INT((this->KeyConfigSprite)._overlayAnimState._animation) + 0x80))) && (layerIndex = *(int *)((char *)pvVar3 + 0x50), -1 < layerIndex)) { AnimationLayer::RenderFrame ((AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar3 + 0x18)), &selectedCursorPos, - *(int *)((int)(this->KeyConfigSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((this->KeyConfigSprite)._overlayAnimState._layerFrames) + layerIndex * 4),&g_vectorZero,&g_vectorZero, (this->KeyConfigSprite)._overlayAnimState._animation); } pvVar3 = (this->KeyConfigSprite)._animState._animData; if (((pvVar3 != (void *)0x0) && - (6 < *(int *)((int)(this->KeyConfigSprite)._animState._animation + 0x80))) && + (6 < *(int *)(GHIDRA_INT((this->KeyConfigSprite)._animState._animation) + 0x80))) && (layerIndex = *(int *)((char *)pvVar3 + 0x50), -1 < layerIndex)) { cursorAnm2 = (this->KeyConfigSprite)._animState._animation; animLayer = (AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar3 + 0x18)); @@ -773,7 +773,7 @@ LAB_008d9c3c: } row = currentRow + 1; rowOffset = rowOffset + rowHeight; - } while (row < (int)((uint)isNameLess * 4 + 0xf)); + } while (row < GHIDRA_INT((GHIDRA_UINT(isNameLess) * 4 + 0xf))); if (layerIndex != 0x13) goto LAB_008d9fde; cursorLayer = ((ANM2 *)(&this->KeyConfigSprite))->ANM2::GetLayer(&DAT_00000006); cursorPos.x = originX + 75.0; @@ -787,7 +787,7 @@ LAB_008d9c3c: && (layerIndex = *(int *)((char *)pvVar3 + 0x50), -1 < layerIndex)) { AnimationLayer::RenderFrame ((AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar3 + 0x18)),&cursorPos, - *(int *)((int)(this->KeyConfigSprite)._animState._layerFrames + layerIndex * 4), + *(int *)(GHIDRA_INT((this->KeyConfigSprite)._animState._layerFrames) + layerIndex * 4), &g_vectorZero,&g_vectorZero,cursorAnm2); } pvVar3 = (this->KeyConfigSprite)._overlayAnimState._animData; @@ -808,7 +808,7 @@ LAB_008d9c3c: (layerIndex = *(int *)((char *)pvVar3 + 0x50), -1 < layerIndex)) { AnimationLayer::RenderFrame ((AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar3 + 0x18)),&cursorPos, - *(int *)((int)(this->KeyConfigSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((this->KeyConfigSprite)._overlayAnimState._layerFrames) + layerIndex * 4),&g_vectorZero,&g_vectorZero,cursorAnm2); } pvVar3 = (this->KeyConfigSprite)._animState._animData; @@ -862,7 +862,7 @@ void Menu_KeyConfig::update_gamepad_layout() local_8 = 0xffffffff; puStack_c = &LAB_00b0609d; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(local_1c + 6); + uVar2 = __security_cookie ^ GHIDRA_UINT((local_1c + 6)); ExceptionList = &local_10; ((InputManager *)(&PTR_vftable_00c57b18))->InputManager::get_device(&device,g_menuControllerIndex); local_8 = 0; @@ -962,7 +962,7 @@ LAB_008da335: uVar2 = (&DAT_00b24060)[this->SelectedElement]; local_1c[0] = this->SelectedColumn; iVar3 = device[4]; - if ((uint)(device[5] - iVar3 >> 4) <= uVar2) { + if (GHIDRA_UINT((device[5] - iVar3 >> 4)) <= uVar2) { KAGE_LogMessage(0x10,(byte *)"ActionId is out of range\n"); iVar3 = local_20[4]; } @@ -1010,15 +1010,15 @@ LAB_008da439: } LAB_008da445: if (((this->KeyConfigSprite)._animState._animData != (void *)0x0) && - ((6 < *(int *)((int)(this->KeyConfigSprite)._animState._animation + 0x80) || + ((6 < *(int *)(GHIDRA_INT((this->KeyConfigSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 6 < *(int *)((int)(this->KeyConfigSprite)._animState._animation + 0x80))))) { + 6 < *(int *)(GHIDRA_INT((this->KeyConfigSprite)._animState._animation) + 0x80))))) { pvVar1 = (this->KeyConfigSprite)._animState._animData; iVar4 = *(int *)((char *)pvVar1 + 0x50); if ((pvVar1 == (void *)0x0) || ((iVar4 < 0 || (*(int *)((char *)pvVar1 + 0x1c) <= iVar4)))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(this->KeyConfigSprite)._animState._layerFrames + iVar4 * 4) = 0; + *(undefined4 *)(GHIDRA_INT((this->KeyConfigSprite)._animState._layerFrames) + iVar4 * 4) = 0; ((AnimationState *)(&(this->KeyConfigSprite)._animState))->AnimationState::AdvanceLayerPosition(iVar4,0.0); } LAB_008da4aa: @@ -1112,7 +1112,7 @@ void Menu_KeyConfig::render_gamepad_layout() local_14 = (char *)0xffffffff; puStack_18 = &LAB_00b060f1; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(actionLabels + 0x1a); + local_24 = __security_cookie ^ GHIDRA_UINT((actionLabels + 0x1a)); ExceptionList = &local_1c; if (((this->KeyConfigSprite)._animState._animData == (void *)0x0) || ((this->KeyConfigSprite)._animState._isPlaying == 0)) { @@ -1129,7 +1129,7 @@ LAB_008da599: isLess = bVar2 < *idleNameIter; if (bVar2 != *idleNameIter) { LAB_008da5d0: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_008da5d5; } if (bVar2 == 0) break; @@ -1165,7 +1165,7 @@ LAB_008da5d5: isLess = bVar2 < *pbVar5; if (bVar2 != *pbVar5) { LAB_008da590: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_008da595; } if (bVar2 == 0) break; @@ -1197,7 +1197,7 @@ LAB_008da64e: isLess = bVar2 < (byte)*idleUDNameIter; if (bVar2 != *idleUDNameIter) { LAB_008da684: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_008da689; } if (bVar2 == 0) break; @@ -1230,7 +1230,7 @@ LAB_008da689: isLess = bVar2 < (byte)*idleUDNameIter; if (bVar2 != *idleUDNameIter) { LAB_008da645: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_008da64a; } if (bVar2 == 0) break; @@ -1282,7 +1282,7 @@ LAB_008da6bd: do { layerIndex = local_9c[4]; uVar3 = (&DAT_00b24060)[row]; - if ((uint)(local_9c[5] - layerIndex >> 4) <= uVar3) { + if (GHIDRA_UINT((local_9c[5] - layerIndex >> 4)) <= uVar3) { local_84 = local_9c; KAGE_LogMessage(0x10,(byte *)"ActionId is out of range\n"); layerIndex = local_84[4]; @@ -1311,7 +1311,7 @@ LAB_008da6bd: local_b4 = 0xffffffff; local_b0 = 0; local_ac = 0; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; buttonName = string_table_translate(&g_manager->_stringTable,(byte *)actionLabels[row]); local_84 = (int *)((float)rowOffsetY + rowBaseY); ((Font *)(font))->Font::DrawString(buttonName,&drawColor,&drawParams,x,(float)local_84); @@ -1322,7 +1322,7 @@ LAB_008da6bd: local_b4 = 0xffffffff; local_b0 = 0; local_ac = 0; - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; buttonName = (byte *)(**(code **)(*local_9c + 0x10))(primaryButton); layerIndex = ((Font *)(font))->Font::get_string_width_n(buttonName,-1); buttonTextX = local_XMM1_Da_745 - @@ -1336,14 +1336,14 @@ LAB_008da6bd: local_b4 = 0xffffffff; local_b0 = 0; local_ac = 0; - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; buttonName = (byte *)(**(code **)(*local_9c + 0x10))(secondaryButton); layerIndex = ((Font *)(font))->Font::get_string_width_n(buttonName,-1); buttonTextX = (float)local_a8 - (float)((double)layerIndex + __uint_to_double_fixup[-(layerIndex >> 0x1f)]); buttonName = (byte *)(**(code **)(*local_9c + 0x10))(secondaryButton); ((Font *)(font))->Font::DrawString(buttonName,&drawColor,&drawParams,buttonTextX,(float)local_84); - local_14 = (char *)((uint)local_14._1_3_ << 8); + local_14 = (char *)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8); layerIndex = this->SelectedElement; if (currentRow == layerIndex) { highlightLayer = ((ANM2 *)(&this->KeyConfigSprite))->ANM2::GetLayer(&DAT_00000006); @@ -1358,23 +1358,23 @@ LAB_008da6bd: if ((this->KeyConfigSprite)._overlayRenderFirst == 0) { pvVar4 = (this->KeyConfigSprite)._animState._animData; if (((pvVar4 != (void *)0x0) && - (6 < *(int *)((int)(this->KeyConfigSprite)._animState._animation + 0x80))) && + (6 < *(int *)(GHIDRA_INT((this->KeyConfigSprite)._animState._animation) + 0x80))) && (layerIndex = *(int *)((char *)pvVar4 + 0x50), -1 < layerIndex)) { AnimationLayer::RenderFrame ((AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar4 + 0x18)), &cursorPos, - *(int *)((int)(this->KeyConfigSprite)._animState._layerFrames + + *(int *)(GHIDRA_INT((this->KeyConfigSprite)._animState._layerFrames) + layerIndex * 4),&g_vectorZero,&g_vectorZero, (this->KeyConfigSprite)._animState._animation); } pvVar4 = (this->KeyConfigSprite)._overlayAnimState._animData; if (((pvVar4 != (void *)0x0) && - (6 < *(int *)((int)(this->KeyConfigSprite)._overlayAnimState._animation + 0x80))) && + (6 < *(int *)(GHIDRA_INT((this->KeyConfigSprite)._overlayAnimState._animation) + 0x80))) && (layerIndex = *(int *)((char *)pvVar4 + 0x50), -1 < layerIndex)) { AnimationLayer::RenderFrame ((AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar4 + 0x18)), &cursorPos, - *(int *)((int)(this->KeyConfigSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((this->KeyConfigSprite)._overlayAnimState._layerFrames) + layerIndex * 4),&g_vectorZero,&g_vectorZero, (this->KeyConfigSprite)._overlayAnimState._animation); } @@ -1382,23 +1382,23 @@ LAB_008da6bd: else { pvVar4 = (this->KeyConfigSprite)._overlayAnimState._animData; if (((pvVar4 != (void *)0x0) && - (6 < *(int *)((int)(this->KeyConfigSprite)._overlayAnimState._animation + 0x80))) && + (6 < *(int *)(GHIDRA_INT((this->KeyConfigSprite)._overlayAnimState._animation) + 0x80))) && (layerIndex = *(int *)((char *)pvVar4 + 0x50), -1 < layerIndex)) { AnimationLayer::RenderFrame ((AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar4 + 0x18)), &cursorPos, - *(int *)((int)(this->KeyConfigSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((this->KeyConfigSprite)._overlayAnimState._layerFrames) + layerIndex * 4),&g_vectorZero,&g_vectorZero, (this->KeyConfigSprite)._overlayAnimState._animation); } pvVar4 = (this->KeyConfigSprite)._animState._animData; if (((pvVar4 != (void *)0x0) && - (6 < *(int *)((int)(this->KeyConfigSprite)._animState._animation + 0x80))) && + (6 < *(int *)(GHIDRA_INT((this->KeyConfigSprite)._animState._animation) + 0x80))) && (layerIndex = *(int *)((char *)pvVar4 + 0x50), -1 < layerIndex)) { AnimationLayer::RenderFrame ((AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar4 + 0x18)), &cursorPos, - *(int *)((int)(this->KeyConfigSprite)._animState._layerFrames + + *(int *)(GHIDRA_INT((this->KeyConfigSprite)._animState._layerFrames) + layerIndex * 4),&g_vectorZero,&g_vectorZero, (this->KeyConfigSprite)._animState._animation); } @@ -1432,18 +1432,18 @@ LAB_008da6bd: if ((this->KeyConfigSprite)._overlayRenderFirst == 0) { pvVar4 = (this->KeyConfigSprite)._animState._animData; if (((pvVar4 != (void *)0x0) && - (6 < *(int *)((int)(this->KeyConfigSprite)._animState._animation + 0x80))) && + (6 < *(int *)(GHIDRA_INT((this->KeyConfigSprite)._animState._animation) + 0x80))) && (layerIndex = *(int *)((char *)pvVar4 + 0x50), -1 < layerIndex)) { AnimationLayer::RenderFrame ((AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar4 + 0x18)), &editCursorPos, - *(int *)((int)(this->KeyConfigSprite)._animState._layerFrames + + *(int *)(GHIDRA_INT((this->KeyConfigSprite)._animState._layerFrames) + layerIndex * 4),&g_vectorZero,&g_vectorZero, (this->KeyConfigSprite)._animState._animation); } pvVar4 = (this->KeyConfigSprite)._overlayAnimState._animData; if (((pvVar4 != (void *)0x0) && - (6 < *(int *)((int)(this->KeyConfigSprite)._overlayAnimState._animation + 0x80))) && + (6 < *(int *)(GHIDRA_INT((this->KeyConfigSprite)._overlayAnimState._animation) + 0x80))) && (layerIndex = *(int *)((char *)pvVar4 + 0x50), -1 < layerIndex)) { layerAnimState = (this->KeyConfigSprite)._overlayAnimState._animation; animLayer = (AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar4 + 0x18)); @@ -1454,18 +1454,18 @@ LAB_008da6bd: else { pvVar4 = (this->KeyConfigSprite)._overlayAnimState._animData; if (((pvVar4 != (void *)0x0) && - (6 < *(int *)((int)(this->KeyConfigSprite)._overlayAnimState._animation + 0x80))) && + (6 < *(int *)(GHIDRA_INT((this->KeyConfigSprite)._overlayAnimState._animation) + 0x80))) && (layerIndex = *(int *)((char *)pvVar4 + 0x50), -1 < layerIndex)) { AnimationLayer::RenderFrame ((AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar4 + 0x18)), &editCursorPos, - *(int *)((int)(this->KeyConfigSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((this->KeyConfigSprite)._overlayAnimState._layerFrames) + layerIndex * 4),&g_vectorZero,&g_vectorZero, (this->KeyConfigSprite)._overlayAnimState._animation); } pvVar4 = (this->KeyConfigSprite)._animState._animData; if (((pvVar4 != (void *)0x0) && - (6 < *(int *)((int)(this->KeyConfigSprite)._animState._animation + 0x80))) && + (6 < *(int *)(GHIDRA_INT((this->KeyConfigSprite)._animState._animation) + 0x80))) && (layerIndex = *(int *)((char *)pvVar4 + 0x50), -1 < layerIndex)) { layerAnimState = (this->KeyConfigSprite)._animState._animation; animLayer = (AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar4 + 0x18)); @@ -1518,7 +1518,7 @@ LAB_008daca2: (layerIndex = *(int *)((char *)pvVar4 + 0x50), -1 < layerIndex)) { AnimationLayer::RenderFrame ((AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar4 + 0x18)),&cursorPos, - *(int *)((int)(this->KeyConfigSprite)._animState._layerFrames + layerIndex * 4), + *(int *)(GHIDRA_INT((this->KeyConfigSprite)._animState._layerFrames) + layerIndex * 4), &g_vectorZero,&g_vectorZero,layerAnimState); } pvVar4 = (this->KeyConfigSprite)._overlayAnimState._animData; @@ -1539,7 +1539,7 @@ LAB_008daca2: (layerIndex = *(int *)((char *)pvVar4 + 0x50), -1 < layerIndex)) { AnimationLayer::RenderFrame ((AnimationLayer *)(layerIndex * 0x10 + *(int *)((char *)pvVar4 + 0x18)),&cursorPos, - *(int *)((int)(this->KeyConfigSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((this->KeyConfigSprite)._overlayAnimState._layerFrames) + layerIndex * 4),&g_vectorZero,&g_vectorZero,layerAnimState); } pvVar4 = (this->KeyConfigSprite)._animState._animData; diff --git a/src/game/menu_lobby_list.cpp b/src/game/menu_lobby_list.cpp index bacfe23..ebd8520 100644 --- a/src/game/menu_lobby_list.cpp +++ b/src/game/menu_lobby_list.cpp @@ -65,7 +65,7 @@ void Menu_LobbyList::render_lobbies() local_14 = 0xffffffff; puStack_18 = &LAB_00b0640f; savedExceptionList = ExceptionList; - stackCookie = __security_cookie ^ (uint)(countText + 0x98); + stackCookie = __security_cookie ^ GHIDRA_UINT((countText + 0x98)); ExceptionList = &savedExceptionList; drawX = (g_menuManager->_ViewPosition).x + *(float *)this; local_d4 = (g_menuManager->_ViewPosition).y + *(float *)((char *)this + 4); @@ -76,19 +76,19 @@ void Menu_LobbyList::render_lobbies() } else { loadingFrame = AnimationState::GetNullFrame - ((AnimationState *)((int)this + 0x38),(byte *)"Loading"); + ((AnimationState *)(GHIDRA_INT(this) + 0x38),(byte *)"Loading"); local_d0 = loadingFrame; if (*(int *)((char *)this + 0x3c) == 0) { lobbyListFrame = (float *)0x0; } else { lobbyListFrame = - ((AnimationState *)((AnimationState *)((int)this + 0x38)))->AnimationState::GetNullFrame((byte *)"LobbyList"); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x38)))->AnimationState::GetNullFrame((byte *)"LobbyList"); local_d0 = loadingFrame; } } local_14 = (*(int *)((char *)this + 0x360) - *(int *)((char *)this + 0x35c)) / 0x18; - if ((local_14 == 0) && ((uint)(*(int *)((char *)this + 0x354) - *(int *)((char *)this + 0x350)) < 0x20)) + if ((local_14 == 0) && (GHIDRA_UINT((*(int *)((char *)this + 0x354) - *(int *)((char *)this + 0x350))) < 0x20)) { fontSettings = 1; local_f8 = 0xffff; @@ -101,7 +101,7 @@ void Menu_LobbyList::render_lobbies() local_e8 = local_14; local_e4 = local_14; pbVar1 = string_table_translate(&g_manager->_stringTable,(byte *)"#Online/NO_LOBBIES"); - ((Font *)(font))->Font::DrawString(pbVar1,&textPos,(Vector *)(local_d0 + 4),(KColor *)((int)this + 0x374), + ((Font *)(font))->Font::DrawString(pbVar1,&textPos,(Vector *)(local_d0 + 4),(KColor *)(GHIDRA_INT(this) + 0x374), &fontSettings); } else { @@ -119,22 +119,22 @@ void Menu_LobbyList::render_lobbies() lobbyCtrl = (int *)0x0; local_14 = 1; std::shared_ptr::assign - (&lobbyImpl,(void *)(*(int *)((char *)this + 0x350) + (int)local_d0 + 0xc)); + (&lobbyImpl,(void *)(*(int *)((char *)this + 0x350) + GHIDRA_INT(local_d0) + 0xc)); local_14 = 2; local_d4 = cursorX; if (iVar2 == *(int *)((char *)this + 0x36c)) { if (*(char *)((char *)this + 0x225) != '\0') { if (*(char *)((char *)this + 0x18c) == '\0') { AnimationState::Render - ((AnimationState *)((int)this + 0x14c),&drawPos,&g_vectorZero,&g_vectorZero) + ((AnimationState *)(GHIDRA_INT(this) + 0x14c),&drawPos,&g_vectorZero,&g_vectorZero) ; - animState = (AnimationState *)((int)this + 0x16c); + animState = (AnimationState *)(GHIDRA_INT(this) + 0x16c); } else { AnimationState::Render - ((AnimationState *)((int)this + 0x16c),&drawPos,&g_vectorZero,&g_vectorZero) + ((AnimationState *)(GHIDRA_INT(this) + 0x16c),&drawPos,&g_vectorZero,&g_vectorZero) ; - animState = (AnimationState *)((int)this + 0x14c); + animState = (AnimationState *)(GHIDRA_INT(this) + 0x14c); } AnimationState::Render(animState,&drawPos,&g_vectorZero,&g_vectorZero); cursorX = drawPos.x; @@ -143,9 +143,9 @@ void Menu_LobbyList::render_lobbies() ppuVar6 = KAGE::Network::Multiplayer::ConstLobby::vftable; pvVar7 = (void *)0x0; pvVar8 = (void *)0x0; - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; ((std::shared_ptr *)(auStack_1ba + -10))->std::shared_ptr::assign(&lobbyImpl); - local_14 = CONCAT31(local_14._1_3_,2); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); render_lobby_info(this,ppuVar6,pvVar7,pvVar8); } fVar5 = drawPos.y - 2.0; @@ -153,28 +153,28 @@ void Menu_LobbyList::render_lobbies() drawPos.y = fVar5; ((KColor *)((KColor *)(stageName._buf + 4)))->KColor::SetFromARGB(0xffffffff); render_quad_set_uniform_color(quad,drawX,fVar5 + 4.0,drawX + 12.0,fVar5 + 12.0 + 4.0,color); - iVar2 = *(int *)(*(int *)((char *)this + 0x350) + (int)local_d0 + 4); + iVar2 = *(int *)(*(int *)((char *)this + 0x350) + GHIDRA_INT(local_d0) + 4); if ((iVar2 == 0) || (other = (int *)(iVar2 + 0x14), *other == 0)) { other = (int *)&DAT_00c799d8; } ((KAGE::SmartPointer *)(&image))->KAGE::SmartPointer::operator_assign(other); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; (**(code **)(*image + 0x1c))(); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; if (((imageRefCount != (int *)0x0) && (isLastRef = (**(code **)(*imageRefCount + 0xc))(), isLastRef != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(); } - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; drawX = cursorX + 24.0 + 16.0; font = &g_manager->_font1_TeamMeatEx10; - iVar2 = *(int *)(*(int *)((char *)this + 0x350) + (int)local_d0 + 4); + iVar2 = *(int *)(*(int *)((char *)this + 0x350) + GHIDRA_INT(local_d0) + 4); if (iVar2 == 0) { local_120 = 0; - local_120._4_4_ = 0.0; - local_120._0_4_ = 0; - userIdHigh = local_120._4_4_; + (*(undefined4 *)((char *)&(local_120) + 0x4)) = 0.0; + (*(undefined4 *)((char *)&(local_120) + 0x0)) = 0; + userIdHigh = (*(undefined4 *)((char *)&(local_120) + 0x4)); userIdLow = (undefined4)local_120; } else { @@ -190,9 +190,9 @@ void Menu_LobbyList::render_lobbies() local_ec = 0xffffffff; local_e8 = 0; local_e4 = 0; - local_14._0_1_ = 6; - ((Font *)(font))->Font::DrawStringScaled(pbVar1,&drawPos,(KColor *)((int)this + 0x374),&fontSettings); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; + ((Font *)(font))->Font::DrawStringScaled(pbVar1,&drawPos,(KColor *)(GHIDRA_INT(this) + 0x374),&fontSettings); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; drawX = drawX + 85.0; drawPos.x = drawX; if (lobbyImpl != (int *)0x0) { @@ -206,11 +206,11 @@ void Menu_LobbyList::render_lobbies() local_ec = 0xffffffff; local_e8 = 0; local_e4 = 0; - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; Font::DrawStringScaled - (&g_manager->_font1_TeamMeatEx10,countText,&drawPos,(KColor *)((int)this + 0x374), + (&g_manager->_font1_TeamMeatEx10,countText,&drawPos,(KColor *)(GHIDRA_INT(this) + 0x374), &fontSettings); - local_14 = CONCAT31(local_14._1_3_,2); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); iVar2 = (g_manager->_optionsConfig)._eosCrossplay; if ((iVar2 == 2) || (iVar2 == 3)) { if (lobbyImpl == (int *)0x0) { @@ -252,15 +252,15 @@ void Menu_LobbyList::render_lobbies() if (*(char *)((char *)this + 0x225) != '\0') { if (*(char *)((char *)this + 0x18c) == '\0') { AnimationState::Render - ((AnimationState *)((int)this + 0x14c),&drawPos,&g_vectorZero,&g_vectorZero) + ((AnimationState *)(GHIDRA_INT(this) + 0x14c),&drawPos,&g_vectorZero,&g_vectorZero) ; - animState = (AnimationState *)((int)this + 0x16c); + animState = (AnimationState *)(GHIDRA_INT(this) + 0x16c); } else { AnimationState::Render - ((AnimationState *)((int)this + 0x16c),&drawPos,&g_vectorZero,&g_vectorZero) + ((AnimationState *)(GHIDRA_INT(this) + 0x16c),&drawPos,&g_vectorZero,&g_vectorZero) ; - animState = (AnimationState *)((int)this + 0x14c); + animState = (AnimationState *)(GHIDRA_INT(this) + 0x14c); } AnimationState::Render(animState,&drawPos,&g_vectorZero,&g_vectorZero); cursorX = drawPos.x; @@ -269,9 +269,9 @@ void Menu_LobbyList::render_lobbies() ppuVar6 = KAGE::Network::Multiplayer::ConstLobby::vftable; pvVar7 = (void *)0x0; pvVar8 = (void *)0x0; - local_14._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; ((std::shared_ptr *)(auStack_1ba + -10))->std::shared_ptr::assign(&otherLobbyImpl); - local_14 = CONCAT31(local_14._1_3_,10); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),10); render_lobby_info(this,ppuVar6,pvVar7,pvVar8); } drawPos.x = cursorX + 20.0; @@ -281,18 +281,18 @@ void Menu_LobbyList::render_lobbies() else { iVar2 = (**(code **)(*otherLobbyImpl + 0x30))(); } - animState = (AnimationState *)((int)this + 0x260); + animState = (AnimationState *)(GHIDRA_INT(this) + 0x260); if (*(int *)((char *)this + 0x264) != 0) { ((AnimationState *)(animState))->AnimationState::SetFrameFloat((float)iVar2); } if (*(char *)((char *)this + 0x339) != '\0') { if (*(char *)((char *)this + 0x2a0) == '\0') { AnimationState::Render(animState,&drawPos,&g_vectorZero,&g_vectorZero); - animState = (AnimationState *)((int)this + 0x280); + animState = (AnimationState *)(GHIDRA_INT(this) + 0x280); } else { AnimationState::Render - ((AnimationState *)((int)this + 0x280),&drawPos,&g_vectorZero,&g_vectorZero); + ((AnimationState *)(GHIDRA_INT(this) + 0x280),&drawPos,&g_vectorZero,&g_vectorZero); } AnimationState::Render(animState,&drawPos,&g_vectorZero,&g_vectorZero); } @@ -321,36 +321,36 @@ LAB_008e0315: local_ec = 0xffffffff; local_e8 = 0; local_e4 = 0; - local_14._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; local_f0 = 0x3f333333; if (iVar2 == 0) { font = &g_manager->_font1_TeamMeatEx10; pbVar1 = string_table_translate(&g_manager->_stringTable,(byte *)"#Online/IN_LOBBY"); - ((Font *)(font))->Font::DrawStringScaled(pbVar1,&drawPos,(KColor *)((int)this + 0x374),&fontSettings); + ((Font *)(font))->Font::DrawStringScaled(pbVar1,&drawPos,(KColor *)(GHIDRA_INT(this) + 0x374),&fontSettings); } else if (iVar2 == 0x3e9) { font = &g_manager->_font1_TeamMeatEx10; pbVar1 = string_table_translate(&g_manager->_stringTable,(byte *)"#Online/IN_DEATHMATCH"); - ((Font *)(font))->Font::DrawStringScaled(pbVar1,&drawPos,(KColor *)((int)this + 0x374),&fontSettings); + ((Font *)(font))->Font::DrawStringScaled(pbVar1,&drawPos,(KColor *)(GHIDRA_INT(this) + 0x374),&fontSettings); } else { - Level::get_stage_display_name(&stageName,iVar2,(int)fVar5,0,0,0,(uint)(1 < iVar3)); - local_14._0_1_ = 0xd; + Level::get_stage_display_name(&stageName,iVar2,GHIDRA_INT(fVar5),0,0,0,GHIDRA_UINT((1 < iVar3))); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xd; text = &stageName; if (0xf < stageName._capacity) { - text = (std_string *)stageName._buf._0_4_; + text = (*(undefined4 *)((char *)&((std_string *)stageName._buf) + 0x0)); } Font::DrawStringScaled (&g_manager->_font1_TeamMeatEx10,(byte *)text,&drawPos, - (KColor *)((int)this + 0x374),&fontSettings); - local_14._0_1_ = 0xc; + (KColor *)(GHIDRA_INT(this) + 0x374),&fontSettings); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; if (0xf < stageName._capacity) { uVar4 = stageName._capacity + 1; - pvVar7 = (void *)stageName._buf._0_4_; + pvVar7 = (*(undefined4 *)((char *)&((void *)stageName._buf) + 0x0)); if (0xfff < uVar4) { - pvVar7 = *(void **)(stageName._buf._0_4_ + -4); + pvVar7 = *(void **)((*(undefined4 *)((char *)&(stageName._buf) + 0x0)) + -4); uVar4 = stageName._capacity + 0x24; - if (0x1f < (stageName._buf._0_4_ - (int)pvVar7) - 4U) { + if (0x1f < ((*(undefined4 *)((char *)&(stageName._buf) + 0x0)) - GHIDRA_INT(pvVar7)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -365,7 +365,7 @@ LAB_008e0315: } sprintf(countText,(byte *)"%d / %d"); Font::DrawStringScaled - (&g_manager->_font1_TeamMeatEx10,countText,&drawPos,(KColor *)((int)this + 0x374), + (&g_manager->_font1_TeamMeatEx10,countText,&drawPos,(KColor *)(GHIDRA_INT(this) + 0x374), &fontSettings); iVar2 = (g_manager->_optionsConfig)._eosCrossplay; if ((iVar2 == 2) || (iVar2 == 3)) { @@ -385,8 +385,8 @@ LAB_008e0315: position_00.x = textPos.x; render_online_icon(iVar3,position_00,g_vectorOne.x,g_vectorOne.y); } - cursorX = local_120._4_4_; - drawPos.x = local_120._4_4_; + cursorX = (*(undefined4 *)((char *)&(local_120) + 0x4)); + drawPos.x = (*(undefined4 *)((char *)&(local_120) + 0x4)); drawPos.y = drawPos.y + 16.0; otherLobby = KAGE::Network::Multiplayer::ConstLobby::vftable; local_14 = 0xe; @@ -399,9 +399,9 @@ joined_r0x008e0604: } } row = row + 1; - local_d0 = (float *)((int)local_d0 + 0x20); + local_d0 = (float *)(GHIDRA_INT(local_d0) + 0x20); entryIndex = entryIndex + 1; - if (8 < (uint)row) { + if (8 < GHIDRA_UINT(row)) { ExceptionList = savedExceptionList; return; } diff --git a/src/game/menu_lobby_list_filters.cpp b/src/game/menu_lobby_list_filters.cpp index be7e1a7..8eda229 100644 --- a/src/game/menu_lobby_list_filters.cpp +++ b/src/game/menu_lobby_list_filters.cpp @@ -13,11 +13,11 @@ void Menu_LobbyListFilters::constructor() ExceptionList = &local_10; *(undefined4 *)((char *)this + 4) = 0; *(undefined4 *)this = 0; - ((ANM2 *)((ANM2 *)((int)this + 8)))->ANM2::constructor(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 8)))->ANM2::constructor(); local_8 = 0; - ((ANM2 *)((ANM2 *)((int)this + 0x11c)))->ANM2::constructor(); - local_8._0_1_ = 1; - ((ANM2 *)((ANM2 *)((int)this + 0x230)))->ANM2::constructor(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x11c)))->ANM2::constructor(); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x230)))->ANM2::constructor(); *(undefined1 *)((char *)this + 0x344) = 0; *(undefined4 *)((char *)this + 0x348) = 0; *(undefined4 *)((char *)this + 0x34c) = 0; @@ -27,7 +27,7 @@ void Menu_LobbyListFilters::constructor() *(undefined4 *)((char *)this + 0x35c) = 0; *(undefined4 *)((char *)this + 0x360) = 0; *(undefined4 *)((char *)this + 0x364) = 0; - local_8 = CONCAT31(local_8._1_3_,4); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),4); *(undefined4 *)((char *)this + 0x368) = 0; *(undefined4 *)((char *)this + 0x36c) = 0; *(undefined4 *)((char *)this + 0x370) = 0; @@ -37,7 +37,7 @@ void Menu_LobbyListFilters::constructor() *(undefined4 *)((char *)this + 0x37c) = 0x3e34b4b5; *(undefined4 *)((char *)this + 0x380) = 0x3f800000; *(char **)((char *)this + 0x388) = "gfx/ui/main menu/LobbyListFiltersMenu.anm2"; - ((ANM2 *)((ANM2 *)((int)this + 0x38c)))->ANM2::constructor(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x38c)))->ANM2::constructor(); *(undefined4 *)((char *)this + 0x4a0) = 0; *(undefined4 *)((char *)this + 0x4a8) = 0; *(undefined4 *)((char *)this + 0x4a4) = 0; diff --git a/src/game/menu_manager.cpp b/src/game/menu_manager.cpp index 4de5e51..ec37bce 100644 --- a/src/game/menu_manager.cpp +++ b/src/game/menu_manager.cpp @@ -28,27 +28,27 @@ void MenuManager::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x16c)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x170)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x174)) = 0; - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; Seeds::constructor(); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; (this->_menuTitle).PositionY = 0.0; (this->_menuTitle).PositionX = 0.0; ((ANM2 *)(&(this->_menuTitle).TitleScreenSprite))->ANM2::constructor(); *(undefined2 *)&(*(undefined1 *)((char *)(this) + 0x2f0)) = 0; - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x308)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x304)) = 0; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x30c))))->ANM2::constructor(); - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; _eh_vector_constructor_iterator_(&(*(undefined1 *)((char *)(this) + 0x420)),0x114,3,ANM2::constructor,ANM2::~ANM2); - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x764))))->ANM2::constructor(); - local_14._0_1_ = 9; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x878))))->ANM2::constructor(); - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; *(undefined ***)&(*(undefined1 *)((char *)(this) + 0x98c)) = KAGE::Network::Multiplayer::ConstLobby::vftable; KAGE::SmartPointer::SmartPointer(&(*(undefined1 *)((char *)(this) + 0x990))); - local_14._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x998))))->ANM2::constructor(); (*(undefined1 *)((char *)(this) + 0xac8)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xaac)) = 0; @@ -56,23 +56,23 @@ void MenuManager::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xab4)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xab8)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xabc)) = 0; - local_14._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; (this->_menuGame).PositionY = 0.0; (this->_menuGame).PositionX = 0.0; ((ANM2 *)(&(this->_menuGame).GameMenuSprite))->ANM2::constructor(); - local_14._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xd; ((ANM2 *)(&(this->_menuGame).ContinueWidgetSprite))->ANM2::constructor(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xdc8)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xdcc)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xdd0)) = 0xffffffff; - local_14._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xe; this->_menuDailyChallenge = (Menu_DailyChallenge)0x0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xdd8)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xddc)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xde4)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xde0)) = 0; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0xde8))))->ANM2::constructor(); - local_14._0_1_ = 0xf; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xf; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xefc)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xf00)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xf04)) = 0; @@ -83,7 +83,7 @@ void MenuManager::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1038)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x103c)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1040)) = 0; - local_14._0_1_ = 0x10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x10; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x1044))))->ANM2::constructor(); (*(undefined1 *)((char *)(this) + 0x1174)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1158)) = 0; @@ -91,13 +91,13 @@ void MenuManager::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1160)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1164)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1168)) = 0; - local_14._0_1_ = 0x11; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x11; Leaderboard::constructor(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x152c)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1530)) = 0; - local_14._0_1_ = 0x12; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x12; ((Menu_Character *)(&this->_menuCharacter))->Menu_Character::constructor(); - local_14._0_1_ = 0x13; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x13; (this->_menuSpecialSeeds).SelectedElement = 0; (this->_menuSpecialSeeds).State = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_menuSpecialSeeds)) + 0x18)) = 0; @@ -115,19 +115,19 @@ void MenuManager::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x2680)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x2684)) = 0; (this->_menuSpecialSeeds).HoldInputTimer = 0; - (this->_menuSpecialSeeds).State = (int)g_vectorZero.x; - (this->_menuSpecialSeeds).SelectedElement = (int)g_vectorZero.y; - local_14._0_1_ = 0x14; + (this->_menuSpecialSeeds).State = GHIDRA_INT(g_vectorZero.x); + (this->_menuSpecialSeeds).SelectedElement = GHIDRA_INT(g_vectorZero.y); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x14; (this->_menuChallenge).PositionY = 0.0; (this->_menuChallenge).PositionX = 0.0; ((ANM2 *)(&(this->_menuChallenge).ChallengeMenuSprite))->ANM2::constructor(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x27b0)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x27b4)) = 0; - local_14._0_1_ = 0x15; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x15; (this->_menuCollection).PositionY = 0.0; (this->_menuCollection).PositionX = 0.0; ((ANM2 *)(&(this->_menuCollection).CollectionMenuSprite))->ANM2::constructor(); - local_14._0_1_ = 0x16; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x16; ((ANM2 *)(&(this->_menuCollection).DeathScreenSprite))->ANM2::constructor(); *(undefined4 *)&(*(undefined1 *)((char *)&((this->_menuCollection)) + 0x240)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_menuCollection)) + 0x244)) = 0; @@ -136,43 +136,43 @@ void MenuManager::constructor() *(undefined4 *)&(*(undefined1 *)((char *)&((this->_menuCollection)) + 0x250)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_menuCollection)) + 0x254)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_menuCollection)) + 0x258)) = 0; - local_14._0_1_ = 0x17; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x17; (this->_menuStats)._PositionY = 0.0; (this->_menuStats)._PositionX = 0.0; ((ANM2 *)(&(this->_menuStats)._StatsMenuSprite))->ANM2::constructor(); - local_14._0_1_ = 0x18; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x18; ((ANM2 *)(&(this->_menuStats)._achievementsSprite))->ANM2::constructor(); - local_14._0_1_ = 0x19; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x19; _eh_vector_constructor_iterator_ (&(this->_menuStats)._achievementMiniSprite1,0x114,0xb,ANM2::constructor,ANM2::~ANM2); - local_14._0_1_ = 0x1a; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1a; _eh_vector_constructor_iterator_ ((this->_menuStats)._achievementOverlayEntries,0x34,0x282, (_func_void_void_ptr *)&LAB_009ec190,FUN_00420b00); - local_14._0_1_ = 0x1b; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1b; ((Menu_Options *)(&this->_menuOptions))->Menu_Options::constructor(); - local_14._0_1_ = 0x1c; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1c; (this->_menuControllerSelect).PositionY = 0.0; (this->_menuControllerSelect).PositionX = 0.0; ((ANM2 *)(&(this->_menuControllerSelect).ControllerSelectSprite))->ANM2::constructor(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xd278)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xd27c)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xd280)) = 0; - local_14._0_1_ = 0x1d; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1d; (this->_menuKeyConfig).PositionY = 0.0; (this->_menuKeyConfig).PositionX = 0.0; ((ANM2 *)(&(this->_menuKeyConfig).KeyConfigSprite))->ANM2::constructor(); - local_14._0_1_ = 0x1e; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1e; (this->_menuCutscenes).PositionY = 0.0; (this->_menuCutscenes).PositionX = 0.0; ((ANM2 *)(&(this->_menuCutscenes).CutscenesMenuSprite))->ANM2::constructor(); - local_14._0_1_ = 0x1f; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1f; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xd4d4)) = 0; this->_menuBestiary = (Menu_Bestiary)0x0; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0xd4d8))))->ANM2::constructor(); - local_14._0_1_ = 0x20; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x20; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0xd5ec))))->ANM2::constructor(); - local_14._0_1_ = 0x21; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x21; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0xd700))))->ANM2::constructor(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xd820)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xd824)) = 0; @@ -180,21 +180,21 @@ void MenuManager::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xd82c)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xd830)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xd834)) = 0; - local_14._0_1_ = 0x22; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x22; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xd854)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xd850)) = 0; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0xd858))))->ANM2::constructor(); - local_14._0_1_ = 0x23; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x23; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xd978)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xd974)) = 0; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0xd97c))))->ANM2::constructor(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xda94)) = 0; - local_14._0_1_ = 0x24; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x24; *(char **)&this->_menuOnline = "gfx/ui/main menu/OnlineMenu.anm2"; ((ANM2 *)(&(this->_menuOnline)._anm2))->ANM2::constructor(); - local_14._0_1_ = 0x25; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x25; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)&((this->_menuOnline)) + 0x118))))->ANM2::constructor(); - local_14._0_1_ = 0x26; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x26; (this->_menuOnline)._prevState = 1; (this->_menuOnline)._state = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xdcd0)) = 0; @@ -202,17 +202,17 @@ void MenuManager::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xdcd4)) = 0xffffffff; *(undefined ***)&(*(undefined1 *)((char *)(this) + 0xdcd8)) = KAGE::Network::Multiplayer::ConstLobby::vftable; KAGE::SmartPointer::SmartPointer(&(*(undefined1 *)((char *)(this) + 0xdcdc))); - local_14._0_1_ = 0x27; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x27; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xdcf4)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xdcf0)) = 0; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0xdcf8))))->ANM2::constructor(); - local_14._0_1_ = 0x28; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x28; _eh_vector_constructor_iterator_(&(*(undefined1 *)((char *)(this) + 0xde0c)),0x114,3,ANM2::constructor,ANM2::~ANM2); - local_14._0_1_ = 0x29; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x29; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0xe148))))->ANM2::constructor(); - local_14._0_1_ = 0x2a; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x2a; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0xe25c))))->ANM2::constructor(); - local_14._0_1_ = 0x2b; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x2b; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xe370)) = 0xffffffff; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xe374)) = 0xffffffff; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xe378)) = 0xffffffff; @@ -224,7 +224,7 @@ void MenuManager::constructor() *(void **)((char *)mapHead + 8) = mapHead; *(undefined2 *)((char *)mapHead + 0xc) = 0x101; *(void **)&(*(undefined1 *)((char *)(this) + 0xe37c)) = mapHead; - local_14._0_1_ = 0x2c; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x2c; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xe388)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xe38c)) = 0; (*(undefined1 *)((char *)(this) + 0xe390)) = 0; @@ -243,7 +243,7 @@ void MenuManager::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xe3c4)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xe3c8)) = 0; ((MenuDialog *)(&(*(undefined1 *)((char *)(this) + 0xe3cc))))->MenuDialog::constructor(); - local_14._0_1_ = 0x2d; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x2d; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xe634)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xe638)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xe63c)) = 0; @@ -252,13 +252,13 @@ void MenuManager::constructor() std::list>::push_back(FUN_008ee4d0,&(*(undefined1 *)((char *)(this) + 0xdce8))); std::list>::push_back (online_lobby_members_changed_callback,&(*(undefined1 *)((char *)(this) + 0xdce8))); - local_14._0_1_ = 0x2e; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x2e; ((Menu_LobbyListFilters *)(&(*(undefined1 *)((char *)(this) + 0xe648))))->Menu_LobbyListFilters::constructor(); - local_14._0_1_ = 0x2f; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x2f; ((Menu_Options *)((Menu_Options *)&(*(undefined1 *)((char *)(this) + 0xeb50))))->Menu_Options::constructor(); - local_14._0_1_ = 0x30; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x30; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0xedd8))))->ANM2::constructor(); - local_14._0_1_ = 0x31; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x31; _eh_vector_constructor_iterator_(&(*(undefined1 *)((char *)(this) + 0xeeec)),0x120,6,FUN_008cb780,FUN_005cc630); (*(undefined1 *)((char *)(this) + 0xf5ac)) = 1; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xf5b0)) = 0; @@ -268,7 +268,7 @@ void MenuManager::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xf5c0)) = 0x3f800000; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xf5c4)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xf5c8)) = 0; - local_14._0_1_ = 0x32; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x32; ((ANM2 *)(&this->_onlineStatsMenuSprite))->ANM2::constructor(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xf6f0)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xf6f8)) = 0; @@ -277,7 +277,7 @@ void MenuManager::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xf6e4)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xf6e8)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xf6ec)) = 0; - local_14._0_1_ = 0x33; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x33; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xf6fc)) = 0; viewPositionsLeft = 0x17; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xf700)) = 0xc4a8c000; @@ -311,7 +311,7 @@ void MenuManager::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xf814)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xf810)) = 0; ((ANM2 *)(&this->_flySprite))->ANM2::constructor(); - local_14 = CONCAT31(local_14._1_3_,0x34); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x34); create_menu_colormod_surface(); (this->_currentColorModState)._red = 1.0; (this->_currentColorModState)._green = 1.0; @@ -340,84 +340,84 @@ MenuManager::~MenuManager() puStack_c = &LAB_00b0d220; local_10 = ExceptionList; ExceptionList = &local_10; - ((KAGE::SmartPointer *)((void *)((int)in_ECX + 0x168)))->KAGE::SmartPointer::reset((void *)0x0); - ((KAGE::SmartPointer *)((void *)((int)in_ECX + 0x160)))->KAGE::SmartPointer::reset((void *)0x0); + ((KAGE::SmartPointer *)((void *)(GHIDRA_INT(in_ECX) + 0x168)))->KAGE::SmartPointer::reset((void *)0x0); + ((KAGE::SmartPointer *)((void *)(GHIDRA_INT(in_ECX) + 0x160)))->KAGE::SmartPointer::reset((void *)0x0); KAGE::SmartPointer::reset(extraout_ECX); local_8 = 0; - ((ANM2 *)((ANM2 *)((int)in_ECX + 0xf818)))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)in_ECX + 0xf868)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)in_ECX + 0xf848)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)in_ECX + 0xf830)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)in_ECX + 0xf818)))->std::string::_Tidy_deallocate(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(in_ECX) + 0xf818)))->ANM2::Reset(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(in_ECX) + 0xf868)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(in_ECX) + 0xf848)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(in_ECX) + 0xf830)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(in_ECX) + 0xf818)))->std::string::_Tidy_deallocate(); local_8 = 1; - ((ANM2 *)((ANM2 *)((int)in_ECX + 0xf5cc)))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)in_ECX + 0xf61c)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)in_ECX + 0xf5fc)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)in_ECX + 0xf5e4)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)in_ECX + 0xf5cc)))->std::string::_Tidy_deallocate(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(in_ECX) + 0xf5cc)))->ANM2::Reset(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(in_ECX) + 0xf61c)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(in_ECX) + 0xf5fc)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(in_ECX) + 0xf5e4)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(in_ECX) + 0xf5cc)))->std::string::_Tidy_deallocate(); local_8 = 2; - _eh_vector_destructor_iterator_((void *)((int)in_ECX + 0xeeec),0x120,6,FUN_005cc630); - local_8 = CONCAT31(local_8._1_3_,3); - ((ANM2 *)((ANM2 *)((int)in_ECX + 0xedd8)))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)in_ECX + 0xee28)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)in_ECX + 0xee08)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)in_ECX + 0xedf0)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)in_ECX + 0xedd8)))->std::string::_Tidy_deallocate(); - ((Menu_Options *)((Menu_Options *)((int)in_ECX + 0xeb50)))->Menu_Options::~Menu_Options(); + _eh_vector_destructor_iterator_((void *)(GHIDRA_INT(in_ECX) + 0xeeec),0x120,6,FUN_005cc630); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(in_ECX) + 0xedd8)))->ANM2::Reset(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(in_ECX) + 0xee28)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(in_ECX) + 0xee08)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(in_ECX) + 0xedf0)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(in_ECX) + 0xedd8)))->std::string::_Tidy_deallocate(); + ((Menu_Options *)((Menu_Options *)(GHIDRA_INT(in_ECX) + 0xeb50)))->Menu_Options::~Menu_Options(); FUN_008dc3c0(); FUN_008e7630(); FUN_008e4a20(); local_8 = 4; - ((ANM2 *)((ANM2 *)((int)in_ECX + 0xd97c)))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)in_ECX + 0xd9cc)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)in_ECX + 0xd9ac)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)in_ECX + 0xd994)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)in_ECX + 0xd97c)))->std::string::_Tidy_deallocate(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(in_ECX) + 0xd97c)))->ANM2::Reset(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(in_ECX) + 0xd9cc)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(in_ECX) + 0xd9ac)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(in_ECX) + 0xd994)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(in_ECX) + 0xd97c)))->std::string::_Tidy_deallocate(); local_8 = 5; - ((ANM2 *)((ANM2 *)((int)in_ECX + 0xd858)))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)in_ECX + 0xd8a8)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)in_ECX + 0xd888)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)in_ECX + 0xd870)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)in_ECX + 0xd858)))->std::string::_Tidy_deallocate(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(in_ECX) + 0xd858)))->ANM2::Reset(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(in_ECX) + 0xd8a8)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(in_ECX) + 0xd888)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(in_ECX) + 0xd870)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(in_ECX) + 0xd858)))->std::string::_Tidy_deallocate(); FUN_008c5d70(); local_8 = 6; - ((ANM2 *)((ANM2 *)((int)in_ECX + 0xd3bc)))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)in_ECX + 0xd40c)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)in_ECX + 0xd3ec)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)in_ECX + 0xd3d4)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)in_ECX + 0xd3bc)))->std::string::_Tidy_deallocate(); - this = (ANM2 *)((int)in_ECX + 0xd298); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(in_ECX) + 0xd3bc)))->ANM2::Reset(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(in_ECX) + 0xd40c)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(in_ECX) + 0xd3ec)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(in_ECX) + 0xd3d4)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(in_ECX) + 0xd3bc)))->std::string::_Tidy_deallocate(); + this = (ANM2 *)(GHIDRA_INT(in_ECX) + 0xd298); local_8 = 7; this->ANM2::Reset(); - local_8 = CONCAT31(local_8._1_3_,8); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),8); this->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)in_ECX + 0xd2e8)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)in_ECX + 0xd2c8)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)in_ECX + 0xd2b0)))->std::string::_Tidy_deallocate(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(in_ECX) + 0xd2e8)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(in_ECX) + 0xd2c8)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(in_ECX) + 0xd2b0)))->std::string::_Tidy_deallocate(); ((std::string *)((char *)this))->std::string::_Tidy_deallocate(); FUN_008c9e10(); local_8 = 9; - ((ANM2 *)((ANM2 *)((int)in_ECX + 0xd164)))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)in_ECX + 0xd1b4)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)in_ECX + 0xd194)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)in_ECX + 0xd17c)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)in_ECX + 0xd164)))->std::string::_Tidy_deallocate(); - ((Menu_Options *)((Menu_Options *)((int)in_ECX + 0xcecc)))->Menu_Options::~Menu_Options(); - ((Menu_Stats *)((Menu_Stats *)((int)in_ECX + 0x2a18)))->Menu_Stats::~Menu_Stats(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(in_ECX) + 0xd164)))->ANM2::Reset(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(in_ECX) + 0xd1b4)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(in_ECX) + 0xd194)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(in_ECX) + 0xd17c)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(in_ECX) + 0xd164)))->std::string::_Tidy_deallocate(); + ((Menu_Options *)((Menu_Options *)(GHIDRA_INT(in_ECX) + 0xcecc)))->Menu_Options::~Menu_Options(); + ((Menu_Stats *)((Menu_Stats *)(GHIDRA_INT(in_ECX) + 0x2a18)))->Menu_Stats::~Menu_Stats(); Menu_Collection::destructor(); Menu_Challenge::destructor(); FUN_008f0120(); - ((Menu_Character *)((Menu_Character *)((int)in_ECX + 0x1534)))->Menu_Character::destructor(); + ((Menu_Character *)((Menu_Character *)(GHIDRA_INT(in_ECX) + 0x1534)))->Menu_Character::destructor(); FUN_008cf510(); - ((Menu_Game *)((Menu_Game *)((int)in_ECX + 0xb90)))->Menu_Game::destructor(); - ((Menu_Save *)((Menu_Save *)((int)in_ECX + 0x2f4)))->Menu_Save::~Menu_Save(); + ((Menu_Game *)((Menu_Game *)(GHIDRA_INT(in_ECX) + 0xb90)))->Menu_Game::destructor(); + ((Menu_Save *)((Menu_Save *)(GHIDRA_INT(in_ECX) + 0x2f4)))->Menu_Save::~Menu_Save(); local_8 = 10; - ((ANM2 *)((ANM2 *)((int)in_ECX + 0x1dc)))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)in_ECX + 0x22c)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)in_ECX + 0x20c)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)in_ECX + 500)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)in_ECX + 0x1dc)))->std::string::_Tidy_deallocate(); - stringSet = (undefined4 *)((int)in_ECX + 0x1cc); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(in_ECX) + 0x1dc)))->ANM2::Reset(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(in_ECX) + 0x22c)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(in_ECX) + 0x20c)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(in_ECX) + 500)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(in_ECX) + 0x1dc)))->std::string::_Tidy_deallocate(); + stringSet = (undefined4 *)(GHIDRA_INT(in_ECX) + 0x1cc); FID_conflict__Erase_tree_>_> (stringSet,(fuzzer_allocator_> *)stringSet, *(_Tree_node **)(*(int *)((char *)in_ECX + 0x1cc) + 4)); @@ -426,29 +426,29 @@ MenuManager::~MenuManager() if (*(int **)((char *)in_ECX + 0x174) != (int *)0x0) { isLastRef = (**(code **)(**(int **)((char *)in_ECX + 0x174) + 0xc))(); if ((isLastRef != '\0') && (g_imageReleaseFn != (void *)0x0)) { - (*g_imageReleaseFn)((int)in_ECX + 0x170); + (*g_imageReleaseFn)(GHIDRA_INT(in_ECX) + 0x170); } } local_8 = 0xc; if (*(int **)((char *)in_ECX + 0x16c) != (int *)0x0) { isLastRef = (**(code **)(**(int **)((char *)in_ECX + 0x16c) + 0xc))(); if ((isLastRef != '\0') && (g_imageReleaseFn != (void *)0x0)) { - (*g_imageReleaseFn)((void *)((int)in_ECX + 0x168)); + (*g_imageReleaseFn)((void *)(GHIDRA_INT(in_ECX) + 0x168)); } } local_8 = 0xd; if (*(int **)((char *)in_ECX + 0x164) != (int *)0x0) { isLastRef = (**(code **)(**(int **)((char *)in_ECX + 0x164) + 0xc))(); if ((isLastRef != '\0') && (g_imageReleaseFn != (void *)0x0)) { - (*g_imageReleaseFn)((int)in_ECX + 0x160); + (*g_imageReleaseFn)(GHIDRA_INT(in_ECX) + 0x160); } } local_8 = 0xe; - ((ANM2 *)((ANM2 *)((int)in_ECX + 0x4c)))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)in_ECX + 0x9c)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)in_ECX + 0x7c)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)in_ECX + 100)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)in_ECX + 0x4c)))->std::string::_Tidy_deallocate(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(in_ECX) + 0x4c)))->ANM2::Reset(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(in_ECX) + 0x9c)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(in_ECX) + 0x7c)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(in_ECX) + 100)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(in_ECX) + 0x4c)))->std::string::_Tidy_deallocate(); FID_conflict__Tidy(in_ECX); ExceptionList = local_10; return; @@ -496,7 +496,7 @@ void MenuManager::Init() pvStack_14 = (void *)0xffffffff; puStack_18 = &LAB_00b0d316; local_1c = ExceptionList; - stackCookie = __security_cookie ^ (uint)(tmpSeeds + 0x15); + stackCookie = __security_cookie ^ GHIDRA_UINT((tmpSeeds + 0x15)); ExceptionList = &local_1c; g_menuManager->_selectedMenuID = 0; KAGE_LogMessage(1,(byte *)"Menu Manager preCrossfade\n"); @@ -512,7 +512,7 @@ void MenuManager::Init() pvStack_14 = (void *)0xffffffff; FID_conflict__Erase_tree_>_> (tmpSeeds,(fuzzer_allocator_> *)tmpSeeds, - *(_Tree_node **)((int)tmpSeeds[0] + 4)); + *(_Tree_node **)(GHIDRA_INT(tmpSeeds[0]) + 4)); operator_delete(tmpSeeds[0],0x14); pMVar1->_viewPositionSet[0].x = 0.0; pMVar1->_viewPositionSet[0].y = 0.0; @@ -598,20 +598,20 @@ void MenuManager::Init() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x30); anm2Path._size = 0x20; anm2Path._capacity = 0x2f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/main menu/MenuShadow.anm2",0x21); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/main menu/MenuShadow.anm2",0x21); pvStack_14 = (void *)0x5; ((ANM2 *)(&pMVar1->_MenuShadowSprite))->ANM2::Load(&anm2Path,1); pvStack_14 = (void *)0xffffffff; if (0xf < anm2Path._capacity) { uVar4 = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar4 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -638,7 +638,7 @@ LAB_00987942: isLess = bVar2 < *expectedAnimName; if (bVar2 != *expectedAnimName) { LAB_00987924: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00987929; } if (bVar2 == 0) break; @@ -660,20 +660,20 @@ LAB_00987929: anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x19; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/main menu/fly.anm2",0x1a); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/main menu/fly.anm2",0x1a); pvStack_14 = (void *)0x6; ((ANM2 *)(&pMVar1->_flySprite))->ANM2::Load(&anm2Path,1); pvStack_14 = (void *)0xffffffff; if (0xf < anm2Path._capacity) { uVar4 = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar4 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -700,7 +700,7 @@ LAB_00987a6a: isLess = bVar2 < *expectedAnimName; if (bVar2 != *expectedAnimName) { LAB_00987a46: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00987a4b; } if (bVar2 == 0) break; @@ -725,20 +725,20 @@ LAB_00987a4b: anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1f; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/main menu/TitleMenu.anm2",0x20); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/main menu/TitleMenu.anm2",0x20); pvStack_14 = (void *)0x7; ((ANM2 *)(titleSprite))->ANM2::Load(&anm2Path,1); pvStack_14 = (void *)0xffffffff; if (0xf < anm2Path._capacity) { uVar4 = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar4 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -757,7 +757,7 @@ LAB_00987a4b: isLess = bVar2 < *expectedAnimName; if (bVar2 != *expectedAnimName) { LAB_00987bc4: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_00987bc9; } if (bVar2 == 0) break; @@ -799,20 +799,20 @@ LAB_00987c03: anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x30); anm2Path._size = 0x23; anm2Path._capacity = 0x2f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/main menu/Menu_DailyRun.anm2",0x24); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/main menu/Menu_DailyRun.anm2",0x24); pvStack_14 = (void *)0x8; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(pMVar1) + 0xde8))))->ANM2::Load(&anm2Path,1); pvStack_14 = (void *)0xffffffff; if (0xf < anm2Path._capacity) { uVar4 = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar4 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -828,7 +828,7 @@ LAB_00987c03: *(float *)&(*(undefined1 *)((char *)(pMVar1) + 0xde0)) = aVStack_c0[0].y; *(int **)&(*(undefined1 *)((char *)(pMVar1) + 0xde4)) = piStack_c4; uVar4 = (manager->_persistentGameData)._eventCounters[0xc0]; - if ((uint)(manager->_persistentGameData)._eventCounters[0x209] < uVar4) { + if (GHIDRA_UINT((manager->_persistentGameData)._eventCounters[0x209]) < uVar4) { (manager->_persistentGameData)._eventCounters[0x209] = uVar4; } KAGE_LogMessage(1,(byte *)"Menu Character Init\n"); @@ -844,20 +844,20 @@ LAB_00987c03: anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1f; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/main menu/SeedsMenu.anm2",0x20); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/main menu/SeedsMenu.anm2",0x20); pvStack_14 = (void *)0x9; ((ANM2 *)(&(pMVar1->_menuSpecialSeeds).SpecialSeedsSprite))->ANM2::Load(&anm2Path,1); pvStack_14 = (void *)0xffffffff; if (0xf < anm2Path._capacity) { uVar4 = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar4 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -876,20 +876,20 @@ LAB_00987c03: anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x30); anm2Path._size = 0x23; anm2Path._capacity = 0x2f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/main menu/ChallengeMenu.anm2",0x24); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/main menu/ChallengeMenu.anm2",0x24); pvStack_14 = (void *)0xa; ((ANM2 *)(&(pMVar1->_menuChallenge).ChallengeMenuSprite))->ANM2::Load(&anm2Path,1); pvStack_14 = (void *)0xffffffff; if (0xf < anm2Path._capacity) { uVar4 = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar4 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -905,18 +905,18 @@ LAB_00987c03: piStack_c4 = (int *)-pMVar1->_viewPositionSet[8].y; anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (void *)0x0; ((std::string *)(anm2Path._buf))->std::string::assign((byte *)"gfx/ui/main menu/CollectionMenu.anm2",0x24); pvStack_14 = (void *)0xb; ((ANM2 *)(&(pMVar1->_menuCollection).CollectionMenuSprite))->ANM2::Load(&anm2Path,1); pvStack_14 = (void *)0xffffffff; if (0xf < anm2Path._capacity) { uVar4 = anm2Path._capacity + 1; - pvVar3 = (void *)anm2Path._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(anm2Path._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar4 = anm2Path._capacity + 0x24; - if (0x1f < (uint)(anm2Path._buf._0_4_ + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -925,18 +925,18 @@ LAB_00987c03: } anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (void *)0x0; ((std::string *)(anm2Path._buf))->std::string::assign((byte *)"gfx/ui/Death Screen.anm2",0x18); pvStack_14 = (void *)0xc; ((ANM2 *)(&(pMVar1->_menuCollection).DeathScreenSprite))->ANM2::Load(&anm2Path,1); pvStack_14 = (void *)0xffffffff; if (0xf < anm2Path._capacity) { uVar4 = anm2Path._capacity + 1; - pvVar3 = (void *)anm2Path._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(anm2Path._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar4 = anm2Path._capacity + 0x24; - if (0x1f < (uint)(anm2Path._buf._0_4_ + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -955,18 +955,18 @@ LAB_00987c03: piStack_c4 = (int *)-pMVar1->_viewPositionSet[0x10].y; anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (void *)0x0; ((std::string *)(anm2Path._buf))->std::string::assign((byte *)"gfx/ui/main menu/ModsMenu.anm2",0x1e); pvStack_14 = (void *)0xd; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(pMVar1) + 0xd97c))))->ANM2::Load(&anm2Path,1); pvStack_14 = (void *)0xffffffff; if (0xf < anm2Path._capacity) { uVar4 = anm2Path._capacity + 1; - pvVar3 = (void *)anm2Path._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(anm2Path._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar4 = anm2Path._capacity + 0x24; - if (0x1f < (uint)(anm2Path._buf._0_4_ + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -986,18 +986,18 @@ LAB_00987c03: piStack_c4 = (int *)-pMVar1->_viewPositionSet[0xb].y; anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (void *)0x0; ((std::string *)(anm2Path._buf))->std::string::assign((byte *)"gfx/ui/main menu/ControllerSelectMenu.anm2",0x2a); pvStack_14 = (void *)0xe; ((ANM2 *)(&(pMVar1->_menuControllerSelect).ControllerSelectSprite))->ANM2::Load(&anm2Path,1); pvStack_14 = (void *)0xffffffff; if (0xf < anm2Path._capacity) { uVar4 = anm2Path._capacity + 1; - pvVar3 = (void *)anm2Path._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(anm2Path._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar4 = anm2Path._capacity + 0x24; - if (0x1f < (uint)(anm2Path._buf._0_4_ + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1013,18 +1013,18 @@ LAB_00987c03: piStack_c4 = (int *)-pMVar1->_viewPositionSet[0xc].y; anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (void *)0x0; ((std::string *)(anm2Path._buf))->std::string::assign((byte *)"gfx/ui/main menu/KeyConfigMenu.anm2",0x23); pvStack_14 = (void *)0xf; ((ANM2 *)(&(pMVar1->_menuKeyConfig).KeyConfigSprite))->ANM2::Load(&anm2Path,1); pvStack_14 = (void *)0xffffffff; if (0xf < anm2Path._capacity) { uVar4 = anm2Path._capacity + 1; - pvVar3 = (void *)anm2Path._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(anm2Path._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar4 = anm2Path._capacity + 0x24; - if (0x1f < (uint)(anm2Path._buf._0_4_ + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1045,18 +1045,18 @@ LAB_00987c03: piStack_c4 = (int *)-pMVar1->_viewPositionSet[0xd].y; anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (void *)0x0; ((std::string *)(anm2Path._buf))->std::string::assign((byte *)"gfx/ui/main menu/EndingsMenu.anm2",0x21); pvStack_14 = (void *)0x10; ((ANM2 *)(&(pMVar1->_menuCutscenes).CutscenesMenuSprite))->ANM2::Load(&anm2Path,1); pvStack_14 = (void *)0xffffffff; if (0xf < anm2Path._capacity) { uVar4 = anm2Path._capacity + 1; - pvVar3 = (void *)anm2Path._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(anm2Path._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar4 = anm2Path._capacity + 0x24; - if (0x1f < (uint)(anm2Path._buf._0_4_ + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1075,18 +1075,18 @@ LAB_00987c03: piStack_c4 = (int *)-pMVar1->_viewPositionSet[0xf].y; anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (void *)0x0; ((std::string *)(anm2Path._buf))->std::string::assign((byte *)"gfx/ui/main menu/ChallengeMenuCustom.anm2",0x29); pvStack_14 = (void *)0x11; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(pMVar1) + 0xd858))))->ANM2::Load(&anm2Path,1); pvStack_14 = (void *)0xffffffff; if (0xf < anm2Path._capacity) { uVar4 = anm2Path._capacity + 1; - pvVar3 = (void *)anm2Path._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(anm2Path._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar4 = anm2Path._capacity + 0x24; - if (0x1f < (uint)(anm2Path._buf._0_4_ + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1114,18 +1114,18 @@ LAB_00987c03: ((std::string *)(anm2Path._buf))->std::string::_Tidy_deallocate(); anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (void *)0x0; ((std::string *)(anm2Path._buf))->std::string::assign((byte *)"gfx/ui/main menu/OnlineMenuSketches.anm2",0x28); pvStack_14 = (void *)0x13; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)&((pMVar1->_menuOnline)) + 0x118))))->ANM2::Load(&anm2Path,1); pvStack_14 = (void *)0xffffffff; if (0xf < anm2Path._capacity) { uVar4 = anm2Path._capacity + 1; - pvVar3 = (void *)anm2Path._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - pvVar3 = *(void **)(anm2Path._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar4 = anm2Path._capacity + 0x24; - if (0x1f < (uint)(anm2Path._buf._0_4_ + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1158,9 +1158,9 @@ LAB_00987c03: uVar4 = onlineStatsPathCapacity + 1; pvVar3 = onlineStatsPath[0]; if (0xfff < uVar4) { - pvVar3 = *(void **)((int)onlineStatsPath[0] + -4); + pvVar3 = *(void **)(GHIDRA_INT(onlineStatsPath[0]) + -4); uVar4 = onlineStatsPathCapacity + 0x24; - if (0x1f < (uint)((int)onlineStatsPath[0] + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(onlineStatsPath[0]) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1169,7 +1169,7 @@ LAB_00987c03: } onlineStatsPathSize = 0; onlineStatsPathCapacity = 0xf; - onlineStatsPath[0] = (void *)((uint)onlineStatsPath[0] & 0xffffff00); + onlineStatsPath[0] = (void *)(GHIDRA_UINT(onlineStatsPath[0]) & 0xffffff00); FUN_008e71c0(); *(float *)&(*(undefined1 *)((char *)(pMVar1) + 0xf6f4)) = aVStack_c0[0].y; *(int **)&(*(undefined1 *)((char *)(pMVar1) + 0xf6f8)) = piStack_c4; @@ -1259,11 +1259,11 @@ void MenuManager::LoadGraphics() ANM2 *titleSprite; temp_3fd96d67c4 = g_menuManager; - ppvStack_20 = (void **)((int)&statsMenuAnm2Path + 0x50); + ppvStack_20 = (void **)(GHIDRA_INT(&statsMenuAnm2Path) + 0x50); local_14 = 0xffffffff; puStack_18 = &LAB_00b0d3a5; local_1c = ExceptionList; - stackCookie = __security_cookie ^ (int)&statsMenuAnm2Path + 0x44U; + stackCookie = __security_cookie ^ GHIDRA_INT(&statsMenuAnm2Path) + 0x44U; ExceptionList = &local_1c; anm2Path._size = 0; anm2Path._capacity = 0xf; @@ -1272,20 +1272,20 @@ void MenuManager::LoadGraphics() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1f; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/main menu/TitleMenu.anm2",0x20); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/main menu/TitleMenu.anm2",0x20); local_14 = 0; ((ANM2 *)(titleSprite))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1312,7 +1312,7 @@ LAB_00988edb: isLess = bVar2 < *expectedName; if (bVar2 != *expectedName) { LAB_00988ec0: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_00988ec5; } if (bVar2 == 0) break; @@ -1339,20 +1339,20 @@ LAB_00988ec5: anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1f; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/main menu/SeedsMenu.anm2",0x20); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/main menu/SeedsMenu.anm2",0x20); local_14 = 1; ((ANM2 *)(&(temp_3fd96d67c4->_menuSpecialSeeds).SpecialSeedsSprite))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1365,20 +1365,20 @@ LAB_00988ec5: anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x30); anm2Path._size = 0x23; anm2Path._capacity = 0x2f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/main menu/ChallengeMenu.anm2",0x24); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/main menu/ChallengeMenu.anm2",0x24); local_14 = 2; ((ANM2 *)(&(temp_3fd96d67c4->_menuChallenge).ChallengeMenuSprite))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1392,20 +1392,20 @@ LAB_00988ec5: anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x30); anm2Path._size = 0x24; anm2Path._capacity = 0x2f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/main menu/CollectionMenu.anm2",0x25); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/main menu/CollectionMenu.anm2",0x25); local_14 = 3; ((ANM2 *)(&(temp_3fd96d67c4->_menuCollection).CollectionMenuSprite))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1418,20 +1418,20 @@ LAB_00988ec5: anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x18; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/Death Screen.anm2",0x19); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/Death Screen.anm2",0x19); local_14 = 4; ((ANM2 *)(&(temp_3fd96d67c4->_menuCollection).DeathScreenSprite))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1447,20 +1447,20 @@ LAB_00988ec5: anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x30); anm2Path._size = 0x2a; anm2Path._capacity = 0x2f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/main menu/ControllerSelectMenu.anm2",0x2b); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/main menu/ControllerSelectMenu.anm2",0x2b); local_14 = 5; ((ANM2 *)(&(temp_3fd96d67c4->_menuControllerSelect).ControllerSelectSprite))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1479,7 +1479,7 @@ LAB_00988ec5: isLess = bVar2 < *expectedName; if (bVar2 != *expectedName) { LAB_00989310: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_00989315; } if (bVar2 == 0) break; @@ -1510,20 +1510,20 @@ LAB_00989352: anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x30); anm2Path._size = 0x23; anm2Path._capacity = 0x2f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/main menu/KeyConfigMenu.anm2",0x24); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/main menu/KeyConfigMenu.anm2",0x24); local_14 = 6; ((ANM2 *)(&(temp_3fd96d67c4->_menuKeyConfig).KeyConfigSprite))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - freeBlock = (char *)anm2Path._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - freeBlock = *(char **)(anm2Path._buf._0_4_ + -4); + freeBlock = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)freeBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1532,18 +1532,18 @@ LAB_00989352: } anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (void *)0x0; ((std::string *)(anm2Path._buf))->std::string::assign((byte *)"gfx/ui/main menu/EndingsMenu.anm2",0x21); local_14 = 7; ((ANM2 *)(&(temp_3fd96d67c4->_menuCutscenes).CutscenesMenuSprite))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - freeBuf = (void *)anm2Path._buf._0_4_; + freeBuf = (*(undefined4 *)((char *)&((void *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - freeBuf = *(void **)(anm2Path._buf._0_4_ + -4); + freeBuf = *(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if (0x1f < (uint)(anm2Path._buf._0_4_ + (-4 - (int)freeBuf))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBuf))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1555,18 +1555,18 @@ LAB_00989352: ((Menu_Bestiary *)(&temp_3fd96d67c4->_menuBestiary))->Menu_Bestiary::load_graphics(); anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (void *)0x0; ((std::string *)(anm2Path._buf))->std::string::assign((byte *)"gfx/ui/main menu/ChallengeMenuCustom.anm2",0x29); local_14 = 8; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(temp_3fd96d67c4) + 0xd858))))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - freeBuf = (void *)anm2Path._buf._0_4_; + freeBuf = (*(undefined4 *)((char *)&((void *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - freeBuf = *(void **)(anm2Path._buf._0_4_ + -4); + freeBuf = *(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if (0x1f < (uint)(anm2Path._buf._0_4_ + (-4 - (int)freeBuf))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBuf))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1576,18 +1576,18 @@ LAB_00989352: ((Menu_ModChallenges *)(&temp_3fd96d67c4->_menuCustomChallenge))->Menu_ModChallenges::reset(); anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (void *)0x0; ((std::string *)(anm2Path._buf))->std::string::assign((byte *)"gfx/ui/main menu/ModsMenu.anm2",0x1e); local_14 = 9; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(temp_3fd96d67c4) + 0xd97c))))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - freeBuf = (void *)anm2Path._buf._0_4_; + freeBuf = (*(undefined4 *)((char *)&((void *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - freeBuf = *(void **)(anm2Path._buf._0_4_ + -4); + freeBuf = *(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if (0x1f < (uint)(anm2Path._buf._0_4_ + (-4 - (int)freeBuf))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBuf))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1600,23 +1600,23 @@ LAB_00989352: pbVar1 = *(byte **)&temp_3fd96d67c4->_menuOnline; anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (void *)0x0; strCursor = pbVar1; do { bVar2 = *strCursor; strCursor = strCursor + 1; } while (bVar2 != 0); - ((std::string *)(anm2Path._buf))->std::string::assign(pbVar1,(int)strCursor - (int)(pbVar1 + 1)); + ((std::string *)(anm2Path._buf))->std::string::assign(pbVar1,GHIDRA_INT(strCursor) - GHIDRA_INT((pbVar1 + 1))); local_14 = 10; ((ANM2 *)(&(temp_3fd96d67c4->_menuOnline)._anm2))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - freeBuf = (void *)anm2Path._buf._0_4_; + freeBuf = (*(undefined4 *)((char *)&((void *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - freeBuf = *(void **)(anm2Path._buf._0_4_ + -4); + freeBuf = *(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if (0x1f < (uint)(anm2Path._buf._0_4_ + (-4 - (int)freeBuf))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBuf))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1628,18 +1628,18 @@ LAB_00989352: Menu_CreateLobby::load_graphics((ANM2 *)&(*(undefined1 *)((char *)(temp_3fd96d67c4) + 0xedd8))); statsMenuAnm2Path._size = 0; statsMenuAnm2Path._capacity = 0xf; - statsMenuAnm2Path._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(statsMenuAnm2Path._buf) + 0x0)) = (void *)0x0; ((std::string *)(statsMenuAnm2Path._buf))->std::string::assign((byte *)"gfx/ui/main menu/OnlineStatsMenu.anm2",0x25); local_14 = 0xb; ((ANM2 *)(&temp_3fd96d67c4->_onlineStatsMenuSprite))->ANM2::Load(&statsMenuAnm2Path,1); local_14 = 0xffffffff; if (0xf < statsMenuAnm2Path._capacity) { uVar3 = statsMenuAnm2Path._capacity + 1; - freeBuf = (void *)statsMenuAnm2Path._buf._0_4_; + freeBuf = (*(undefined4 *)((char *)&((void *)statsMenuAnm2Path._buf) + 0x0)); if (0xfff < uVar3) { - freeBuf = *(void **)(statsMenuAnm2Path._buf._0_4_ + -4); + freeBuf = *(void **)((*(undefined4 *)((char *)&(statsMenuAnm2Path._buf) + 0x0)) + -4); uVar3 = statsMenuAnm2Path._capacity + 0x24; - if (0x1f < (uint)(statsMenuAnm2Path._buf._0_4_ + (-4 - (int)freeBuf))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(statsMenuAnm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBuf))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1648,7 +1648,7 @@ LAB_00989352: } statsMenuAnm2Path._size = 0; statsMenuAnm2Path._capacity = 0xf; - statsMenuAnm2Path._buf._0_4_ = statsMenuAnm2Path._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(statsMenuAnm2Path._buf) + 0x0)) = (*(undefined4 *)((char *)&(statsMenuAnm2Path._buf) + 0x0)) & 0xffffff00; ((ANM2 *)(&temp_3fd96d67c4->_onlineStatsMenuSprite))->ANM2::Play(s_Idle,0); ExceptionList = local_1c; return; @@ -1809,7 +1809,7 @@ void MenuManager::Update() local_14 = 1; (**(code **)(PTR_vftable_00c57b2c + 0x10))(); local_14 = 0xffffffff; - if ((uint)(iVar4 >> 3) <= index) break; + if (GHIDRA_UINT((iVar4 >> 3)) <= index) break; ((KAGE::Input::Manager *)((Manager *)&PTR_vftable_00c57b18))->KAGE::Input::Manager::get_device(&local_2c,index); local_14 = 2; if ((int *)local_2c.x == (int *)0x0) { @@ -1852,7 +1852,7 @@ void MenuManager::Update() cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74)) (0xffffffff,FUN_00a209e0,&local_30,0,&local_34); if (cVar2 != '\0') { - g_menuControllerIndex = (int)local_34; + g_menuControllerIndex = GHIDRA_INT(local_34); push_menu(2,unused); } local_30 = (MenuManager *)&DAT_0000000f; @@ -2020,7 +2020,7 @@ void MenuManager::Render() float prevVignetteIntensity; menuManager = g_menuManager; - local_14 = (float)(__security_cookie ^ (uint)((&shaderColor)[1]._tint + 1)); + local_14 = (float)(__security_cookie ^ GHIDRA_UINT(((&shaderColor)[1]._tint + 1))); isColorModifierEnabled = (g_manager->_optionsConfig)._enableColorModifier; savedMenuManager = g_menuManager; if (isColorModifierEnabled != 0) { @@ -2189,7 +2189,7 @@ switchD_0098a35a_default: render_quad_set_uniform_color(quad,-0.5,-0.5,g_screenWidth + 0.5,g_screenHeight + 0.5,color_01); (*drawFn)(); menuManager = savedMenuManager; - renderPos = (Vector)((ulonglong)(uint)(g_screenHeight - 148.0) << 0x20); + renderPos = (Vector)((ulonglong)GHIDRA_UINT((g_screenHeight - 148.0)) << 0x20); unusedArg = extraout_ECX; if ((savedMenuManager->_MenuShadowSprite)._loaded != 0) { if ((savedMenuManager->_MenuShadowSprite)._overlayRenderFirst == 0) { @@ -2284,7 +2284,7 @@ switchD_0098a35a_default: g_graphicsManager_blendMode[4] = 0; g_currentShader = shader; ((Shader *)(shader))->Shader::set_uniform((byte *)"Amount",8,&(menuManager->_currentColorModState)._amount, - (int)shader); + GHIDRA_INT(shader)); ((Shader *)(g_currentShader))->Shader::set_uniform((byte *)"Brightness",8, &(menuManager->_currentColorModState)._brightness,unused); ((Shader *)(g_currentShader))->Shader::set_uniform((byte *)"Contrast",8, @@ -2297,7 +2297,7 @@ switchD_0098a35a_default: shaderColor._colorize[0] = 1.0; shaderColor._offset[1] = 1.0; shaderColor._colorize[3] = 1.0; - shaderColor._offset[2] = (float)((uint)shaderColor._offset[2] & 0xffffff00); + shaderColor._offset[2] = (float)(GHIDRA_UINT(shaderColor._offset[2]) & 0xffffff00); ((KColor *)(&scratchKColor))->KColor::SetFromARGB(0xffffffff); render_quad_set_uniform_color(quad,0.0,0.0,g_screenWidth,g_screenHeight,color_03); quadColor._red = (menuManager->_currentColorModState)._red; @@ -2317,7 +2317,7 @@ switchD_0098a35a_default: g_graphicsManager_blendMode[4] = 7; } iVar3 = 1; - shader_cache_find((int)unusedArg); + shader_cache_find(GHIDRA_INT(unusedArg)); if (menuManager->_fadeOutActive != 0) { g_graphicsManager_blendMode[1] = 1; if ((g_graphicsManager_flags & 4) == 0) { @@ -2386,14 +2386,14 @@ void MenuManager::SetState(int state, byte isRebuildStack) pvVar2 = (this->_menuStateHistory)._end; this_00 = (this->_menuStateHistory)._begin; if (isRebuildStack == 0) { - if ((((int)pvVar2 - (int)this_00 & 0xfffffffcU) == 0) && (state != 1)) { + if (((GHIDRA_INT(pvVar2) - GHIDRA_INT(this_00) & 0xfffffffcU) == 0) && (state != 1)) { KAGE_LogMessage(4,(byte *)"Setting the intitial menu state to %d, are you sure about that? \n" ); this_00 = extraout_ECX_03; } } else { - if (((int)pvVar2 - (int)this_00 >> 2 != 0) && (*(int *)((char *)pvVar2 + -4) == 4)) { + if ((GHIDRA_INT(pvVar2) - GHIDRA_INT(this_00) >> 2 != 0) && (*(int *)((char *)pvVar2 + -4) == 4)) { FUN_008d0730(); this_00 = (this->_menuStateHistory)._begin; } @@ -2410,7 +2410,7 @@ void MenuManager::SetState(int state, byte isRebuildStack) else { *historyEnd = iVar3; ppvVar1 = &(this->_menuStateHistory)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 4); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 4); } iVar3 = iVar3 + 1; } while (iVar3 < 4); @@ -2425,7 +2425,7 @@ void MenuManager::SetState(int state, byte isRebuildStack) else { *stackEnd = 0x13; ppvVar1 = &(this->_menuStateHistory)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 4); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 4); } stackEnd = (this->_menuStateHistory)._end; local_10[0] = 0x11; @@ -2437,7 +2437,7 @@ LAB_0098ab0d: else { *stackEnd = 0x11; ppvVar1 = &(this->_menuStateHistory)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 4); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 4); } } else if (state == 0x13) { @@ -2446,7 +2446,7 @@ LAB_0098ab0d: if (stackEnd == (this->_menuStateHistory)._capacity) goto LAB_0098ab0d; *stackEnd = 0x13; ppvVar1 = &(this->_menuStateHistory)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 4); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 4); } else { KAGE_LogMessage(0x10,(byte *)"Unhandled Menu State trying to create a menu stack"); @@ -2486,7 +2486,7 @@ LAB_0098abe2: ppvVar1 = &(this->_seedsObject)._seedEffects; FID_conflict__Erase_tree_>_> (ppvVar1,(fuzzer_allocator_> *)ppvVar1, - *(_Tree_node **)((int)pvVar2 + 4)); + *(_Tree_node **)(GHIDRA_INT(pvVar2) + 4)); *(void **)((char *)pvVar2 + 4) = pvVar2; *(void **)pvVar2 = pvVar2; *(void **)((char *)pvVar2 + 8) = pvVar2; @@ -2503,13 +2503,13 @@ LAB_0098ac76: if ((iVar3 == 3) && (state == 2)) { iVar3 = g_manager->_currentSaveSlot; Menu_Save::replace_slot_graphics - (this_00,(ANM2 *)((int)(&this->_menuTitle + 1) + iVar3 * 0x114 + 0x1c)); + (this_00,(ANM2 *)(GHIDRA_INT((&this->_menuTitle + 1)) + iVar3 * 0x114 + 0x1c)); slotStatus = save_slot_get_status(); (this->_menuGame).GameMenuSprite._filename._buf[iVar3 + -0x445] = (char)slotStatus; isAllMarks = has_all_completion_marks(); (this->_menuGame).GameMenuSprite._filename._buf[iVar3 + -0x442] = isAllMarks; ((Menu_Save *)(&this->_menuSave))->Menu_Save::update_save_drawings(); - ((ANM2 *)((ANM2 *)((int)(&this->_menuTitle + 1) + iVar3 * 0x114 + 0x1c)))->ANM2::LoadGraphics(unk); + ((ANM2 *)((ANM2 *)(GHIDRA_INT((&this->_menuTitle + 1)) + iVar3 * 0x114 + 0x1c)))->ANM2::LoadGraphics(unk); ((Menu_Character *)(&this->_menuCharacter))->Menu_Character::set_character_menu_shown(0); } else if (state == 4) { @@ -2593,7 +2593,7 @@ void MenuManager::push_menu(int menuId, int unused) else { *historyEnd = state; ppvVar1 = &(menuManager->_menuStateHistory)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 4); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 4); } } if (menuManager->_selectedMenuID != state) { diff --git a/src/game/menu_mod_challenges.cpp b/src/game/menu_mod_challenges.cpp index 0f0960a..d783b19 100644 --- a/src/game/menu_mod_challenges.cpp +++ b/src/game/menu_mod_challenges.cpp @@ -23,7 +23,7 @@ void Menu_ModChallenges::reset() isLess = bVar1 < *defaultAnimName; if (bVar1 != *defaultAnimName) { LAB_008cebd0: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_008cebd5; } if (bVar1 == 0) break; @@ -38,9 +38,9 @@ LAB_008cebd5: if ((compareResult == 0) && ((animData[0x34] == 0 || (*(char *)((char *)this + 0x54) != '\0')))) goto LAB_008cec02; } - bVar1 = ((ANM2 *)((ANM2 *)((int)this + 0x10)))->ANM2::SetAnimation(&DAT_00b6767c,1); + bVar1 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x10)))->ANM2::SetAnimation(&DAT_00b6767c,1); if (bVar1 != 0) { - ((AnimationState *)((AnimationState *)((int)this + 0x40)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x40)))->AnimationState::Rewind(); *(undefined1 *)((char *)this + 0x54) = 1; } LAB_008cec02: diff --git a/src/game/menu_mods.cpp b/src/game/menu_mods.cpp index 4657bdb..75ea487 100644 --- a/src/game/menu_mods.cpp +++ b/src/game/menu_mods.cpp @@ -41,7 +41,7 @@ void Menu_Mods::Update() local_14 = 0xffffffff; puStack_18 = &LAB_00af9dbd; local_1c = ExceptionList; - securityCookie = __security_cookie ^ (uint)(local_4c + 0x3c); + securityCookie = __security_cookie ^ GHIDRA_UINT((local_4c + 0x3c)); ExceptionList = &local_1c; nameMapHead = (undefined1 *)0x0; local_64 = 0; @@ -51,17 +51,17 @@ void Menu_Mods::Update() *(undefined1 **)(nameMapHead + 4) = nameMapHead; *(undefined1 **)(nameMapHead + 8) = nameMapHead; *(undefined2 *)(nameMapHead + 0xc) = 0x101; - local_14._0_1_ = 0; - local_14._1_3_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; playersEnd = this[3]; playersBegin = this[2]; local_5c = 0x29; local_60 = nameMapHead; - if (0x29 < (uint)(((int)playersEnd - (int)playersBegin) / 0x148)) { + if (0x29 < GHIDRA_UINT(((GHIDRA_INT(playersEnd) - GHIDRA_INT(playersBegin)) / 0x148))) { iVar2 = 0x3488; do { - playerConfig = (EntityConfig_Player *)(iVar2 + (int)playersBegin); - if ((*(char *)(iVar2 + 0x128 + (int)playersBegin) == '\0') && + playerConfig = (EntityConfig_Player *)(iVar2 + GHIDRA_INT(playersBegin)); + if ((*(char *)(iVar2 + 0x128 + GHIDRA_INT(playersBegin)) == '\0') && ((playerConfig->_bSkinParentName)._size == 0)) { displayName = EntityConfig_Player::GetDisplayName (playerConfig,(std_string *)displayNameBuf,playerConfig); @@ -75,51 +75,51 @@ void Menu_Mods::Update() displayName->_capacity = 0xf; displayName->_buf[0] = '\0'; local_28 = local_5c; - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; FUN_006a00d0(local_74,&nameKey); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (0xf < nameKeyCapacity) { size = nameKeyCapacity + 1; freeBlock = nameKey; if (0xfff < size) { freeBlock = *(void **)((char *)nameKey + -4); size = nameKeyCapacity + 0x24; - if (0x1f < (uint)((int)nameKey + (-4 - (int)freeBlock))) goto LAB_0069d502; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(nameKey) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_0069d502; } operator_delete(freeBlock,size); } - local_14._0_1_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; if (&DAT_0000000f < local_44) { nameSize = local_44 + 1; freeBlock = displayNameBuf[0]; if ((undefined1 *)0xfff < nameSize) { - freeBlock = *(void **)((int)displayNameBuf[0] + -4); + freeBlock = *(void **)(GHIDRA_INT(displayNameBuf[0]) + -4); nameSize = local_44 + 0x24; - if (0x1f < (uint)((int)displayNameBuf[0] + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(displayNameBuf[0]) + (-4 - GHIDRA_INT(freeBlock))))) { LAB_0069d502: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(freeBlock,(uint)nameSize); + operator_delete(freeBlock,GHIDRA_UINT(nameSize)); } } iVar2 = iVar2 + 0x148; local_5c = local_5c + 1; playersEnd = self[3]; playersBegin = self[2]; - } while (local_5c < (uint)(((int)playersEnd - (int)playersBegin) / 0x148)); + } while (local_5c < GHIDRA_UINT(((GHIDRA_INT(playersEnd) - GHIDRA_INT(playersBegin)) / 0x148))); local_60 = nameMapHead; } playerIndex = 0x29; nameSize = local_60; nameMapHead = local_60; - if (0x29 < (uint)(((int)playersEnd - (int)playersBegin) / 0x148)) { + if (0x29 < GHIDRA_UINT(((GHIDRA_INT(playersEnd) - GHIDRA_INT(playersBegin)) / 0x148))) { local_5c = 0x3488; do { - if ((*(char *)(local_5c + 0x128 + (int)playersBegin) == '\0') && - (*(int *)(local_5c + 0x11c + (int)playersBegin) != 0)) { - a = (byte *)((int)playersBegin + local_5c + 0x10c); + if ((*(char *)(local_5c + 0x128 + GHIDRA_INT(playersBegin)) == '\0') && + (*(int *)(local_5c + 0x11c + GHIDRA_INT(playersBegin)) != 0)) { + a = (byte *)(GHIDRA_INT(playersBegin) + local_5c + 0x10c); std::map::_Find_lower_bound(local_4c,a); nameSize = local_44; if (local_44[0xd] == '\0') { @@ -133,7 +133,7 @@ LAB_0069d502: } iVar2 = string_compare(a,*nameSize,b,*(uint *)(local_44 + 0x20)); if ((-1 < iVar2) && (nameSize != local_60)) { - *(uint *)(*(int *)(nameSize + 0x28) * 0x148 + 0x124 + (int)self[2]) = playerIndex; + *(uint *)(*(int *)(nameSize + 0x28) * 0x148 + 0x124 + GHIDRA_INT(self[2])) = playerIndex; local_60 = nameMapHead; } } @@ -142,7 +142,7 @@ LAB_0069d502: local_5c = local_5c + 0x148; playerIndex = playerIndex + 1; playersBegin = self[2]; - } while (playerIndex < (uint)(((int)self[3] - (int)playersBegin) / 0x148)); + } while (playerIndex < GHIDRA_UINT(((GHIDRA_INT(self[3]) - GHIDRA_INT(playersBegin)) / 0x148))); } FUN_004235c0(&nameMapHead,*(undefined4 *)(nameSize + 4)); operator_delete(nameMapHead,0x2c); @@ -173,14 +173,14 @@ void Menu_Mods::reset() isLess = bVar1 < *defaultName; if (bVar1 != *defaultName) { LAB_008e49b0: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_008e49b5; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)currentName + 1); isLess = bVar1 < defaultName[1]; if (bVar1 != defaultName[1]) goto LAB_008e49b0; - currentName = (Menu_Mods)((int)currentName + 2); + currentName = (Menu_Mods)(GHIDRA_INT(currentName) + 2); defaultName = defaultName + 2; } while (bVar1 != 0); compareResult = 0; diff --git a/src/game/menu_online.cpp b/src/game/menu_online.cpp index 671521d..301f705 100644 --- a/src/game/menu_online.cpp +++ b/src/game/menu_online.cpp @@ -28,7 +28,7 @@ void Menu_Online::render_mode_select() byte isKeyboard; undefined4 local_14; - local_14 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_14 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; isKeyboard = g_menuControllerIndex == 0; lobbyGameMode = (g_manager->_lobbySettings)._gameMode; backKeyLayer = ((ANM2 *)(in_ECX))->ANM2::GetLayer((byte *)"BackKey"); @@ -291,11 +291,11 @@ void Menu_Online::Render() float menuX; float menuY; - puStack_20 = (undefined1 *)((int)&descriptor + 0x40); + puStack_20 = (undefined1 *)(GHIDRA_INT(&descriptor) + 0x40); local_14 = (void *)0xffffffff; puStack_18 = &LAB_00b069dd; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)((int)&descriptor + 0x34U); + local_24 = __security_cookie ^ GHIDRA_UINT((GHIDRA_INT(&descriptor) + 0x34U)); ExceptionList = &local_1c; isKeyboard = g_menuControllerIndex == 0; backKeyLayer = ((ANM2 *)(&this->_anm2))->ANM2::GetLayer((byte *)"BackKey"); @@ -322,23 +322,23 @@ void Menu_Online::Render() string_table_translate(&g_manager->_stringTable,(byte *)"#Online/ONLINE_QUICK_DESCRIPTOR"); descriptor._size = 0; descriptor._capacity = 0xf; - descriptor._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(descriptor._buf) + 0x0)) = (void *)0x0; pbVar3 = translatedText; do { bVar1 = *pbVar3; pbVar3 = pbVar3 + 1; } while (bVar1 != 0); - ((std::string *)(descriptor._buf))->std::string::assign(translatedText,(int)pbVar3 - (int)(translatedText + 1)); + ((std::string *)(descriptor._buf))->std::string::assign(translatedText,GHIDRA_INT(pbVar3) - GHIDRA_INT((translatedText + 1))); local_14 = (void *)0x0; LAB_008e4f9b: render_descriptor(this,&descriptor); local_14 = (void *)0xffffffff; if (descriptor._capacity < 0x10) goto LAB_008e4fe1; freeSize = descriptor._capacity + 1; - freeBlock = (void *)descriptor._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)descriptor._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(descriptor._buf._0_4_ + -4); - iVar2 = descriptor._buf._0_4_ - (int)freeBlock; + freeBlock = *(void **)((*(undefined4 *)((char *)&(descriptor._buf) + 0x0)) + -4); + iVar2 = (*(undefined4 *)((char *)&(descriptor._buf) + 0x0)) - GHIDRA_INT(freeBlock); joined_r0x008e5119: freeSize = descriptor._capacity + 0x24; if (0x1f < iVar2 - 4U) { @@ -355,13 +355,13 @@ joined_r0x008e5119: (&g_manager->_stringTable,(byte *)"#Online/ONLINE_PUBLIC_DESCRIPTOR"); descriptor._size = 0; descriptor._capacity = 0xf; - descriptor._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(descriptor._buf) + 0x0)) = (void *)0x0; pbVar3 = translatedText; do { bVar1 = *pbVar3; pbVar3 = pbVar3 + 1; } while (bVar1 != 0); - ((std::string *)(descriptor._buf))->std::string::assign(translatedText,(int)pbVar3 - (int)(translatedText + 1)); + ((std::string *)(descriptor._buf))->std::string::assign(translatedText,GHIDRA_INT(pbVar3) - GHIDRA_INT((translatedText + 1))); local_14 = (void *)0x1; goto LAB_008e4f9b; } @@ -388,10 +388,10 @@ joined_r0x008e5119: local_14 = (void *)0xffffffff; if (descriptor._capacity < 0x10) goto LAB_008e4fe1; freeSize = descriptor._capacity + 1; - freeBlock = (void *)descriptor._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)descriptor._buf) + 0x0)); if (0xfff < freeSize) { - freeBlock = *(void **)(descriptor._buf._0_4_ + -4); - iVar2 = descriptor._buf._0_4_ - (int)freeBlock; + freeBlock = *(void **)((*(undefined4 *)((char *)&(descriptor._buf) + 0x0)) + -4); + iVar2 = (*(undefined4 *)((char *)&(descriptor._buf) + 0x0)) - GHIDRA_INT(freeBlock); goto joined_r0x008e5119; } } @@ -469,7 +469,7 @@ void Menu_Online::enter() local_8 = 0xffffffff; puStack_c = &LAB_00b06a35; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar3 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; animData = (this->_anm2)._animState._animData; if (animData == (byte *)0x0) { @@ -491,7 +491,7 @@ LAB_008e52d3: bVar5 = bVar1 < *idleName; if (bVar1 != *idleName) { LAB_008e52c0: - uVar4 = -(uint)bVar5 | 1; + uVar4 = -GHIDRA_UINT(bVar5) | 1; goto LAB_008e52c5; } if (bVar1 == 0) break; @@ -633,7 +633,7 @@ void Menu_Online::start_quick_match() local_1c = (void *)0x0; local_18 = 0.0; local_14 = 0; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); local_30 = 1; uStack_2c = 1; iVar1 = (g_manager->_optionsConfig)._eosCrossplay; @@ -648,22 +648,22 @@ void Menu_Online::start_quick_match() (&DAT_00c79a50,&local_34,on_quick_match_search_result,in_ECX); FUN_00a539f0(); if (local_1c != (void *)0x0) { - freeSize = ((local_14 - (int)local_1c) / 0x18) * 0x18; + freeSize = ((local_14 - GHIDRA_INT(local_1c)) / 0x18) * 0x18; freeBlock = local_1c; if (0xfff < freeSize) { freeBlock = *(void **)((char *)local_1c + -4); freeSize = freeSize + 0x23; - if (0x1f < (uint)((int)local_1c + (-4 - (int)freeBlock))) goto LAB_008e5642; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_1c) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_008e5642; } operator_delete(freeBlock,freeSize); } if (pvStack_28 != (void *)0x0) { - freeSize = ((local_20 - (int)pvStack_28) / 0x18) * 0x18; + freeSize = ((local_20 - GHIDRA_INT(pvStack_28)) / 0x18) * 0x18; freeBlock = pvStack_28; if (0xfff < freeSize) { freeBlock = *(void **)((char *)pvStack_28 + -4); freeSize = freeSize + 0x23; - if (0x1f < (uint)((int)pvStack_28 + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvStack_28) + (-4 - GHIDRA_INT(freeBlock))))) { LAB_008e5642: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -730,17 +730,17 @@ void Menu_Online::render_descriptor(std_string *text) undefined4 local_14; uint *lastLineSizePtr; - pcStack_20 = (char *)((int)register0x00000010 + 0xfffffffc); + pcStack_20 = (char *)(GHIDRA_INT(register0x00000010) + 0xfffffffc); local_14 = 0xffffffff; puStack_18 = &LAB_00b06ad8; local_1c = ExceptionList; - stackCookie = __security_cookie ^ (uint)((int)register0x00000010 + 0xfffffff0U); + stackCookie = __security_cookie ^ GHIDRA_UINT((GHIDRA_INT(register0x00000010) + 0xfffffff0U)); ExceptionList = &local_1c; textX = (g_menuManager->_ViewPosition).x + *(float *)(this + 1); textY = (g_menuManager->_ViewPosition).y + *(float *)this[1]._anm2._filename._buf; if ((this->_anm2)._animState._animData == (void *)0x0) { nullFrame = (float *)0x0; - pcStack_20 = (char *)((int)register0x00000010 + 0xfffffffc); + pcStack_20 = (char *)(GHIDRA_INT(register0x00000010) + 0xfffffffc); } else { nullFrame = AnimationState::GetNullFrame @@ -752,21 +752,21 @@ void Menu_Online::render_descriptor(std_string *text) lines = (std_string *)0x0; linesEnd = (std_string *)0x0; linesCapacity = (std_string *)0x0; - tmpLine._capacity = (uint)&DAT_0000000f; + tmpLine._capacity = GHIDRA_UINT(&DAT_0000000f); tmpLine._size = 0; - tmpLine._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(tmpLine._buf) + 0x0)) = (std_string *)0x0; local_14 = 1; vector_string_emplace_reallocate_move(&lines,(std_string *)0x0,&tmpLine); local_14 = local_14 & 0xffffff00; if (&DAT_0000000f < tmpLine._capacity) { puVar5 = (undefined1 *)(tmpLine._capacity + 1); - lineChars = (std_string *)tmpLine._buf._0_4_; + lineChars = (*(undefined4 *)((char *)&((std_string *)tmpLine._buf) + 0x0)); if ((undefined1 *)0xfff < puVar5) { - lineChars = (std_string *)((std_string *)(tmpLine._buf._0_4_ + -0x18))->_capacity; + lineChars = (std_string *)((std_string *)((*(undefined4 *)((char *)&(tmpLine._buf) + 0x0)) + -0x18))->_capacity; puVar5 = (undefined1 *)(tmpLine._capacity + 0x24); - if (0x1f < (uint)(tmpLine._buf._0_4_ + (-4 - (int)lineChars))) goto LAB_008e5f00; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpLine._buf) + 0x0)) + (-4 - GHIDRA_INT(lineChars))))) goto LAB_008e5f00; } - operator_delete(lineChars,(uint)puVar5); + operator_delete(lineChars,GHIDRA_UINT(puVar5)); } charIndex = 0; if (text->_size != 0) { @@ -779,10 +779,10 @@ LAB_008e58d0: } local_70 = psVar3; if (lineChars->_buf[charIndex] == '\n') { - tmpLine._capacity = (uint)&DAT_0000000f; + tmpLine._capacity = GHIDRA_UINT(&DAT_0000000f); tmpLine._size = 0; - tmpLine._buf._0_4_ = (std_string *)0x0; - local_14._0_1_ = 2; + (*(undefined4 *)((char *)&(tmpLine._buf) + 0x0)) = (std_string *)0x0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (linesEnd == linesCapacity) { vector_string_emplace_reallocate_move(&lines,linesEnd,&tmpLine); } @@ -797,24 +797,24 @@ LAB_008e58d0: linesEnd->_buf[1] = '\0'; linesEnd->_buf[2] = '\0'; linesEnd->_buf[3] = '\0'; - *(undefined4 *)(linesEnd->_buf + 4) = tmpLine._buf._4_4_; - *(undefined4 *)(linesEnd->_buf + 8) = tmpLine._buf._8_4_; - *(undefined4 *)(linesEnd->_buf + 0xc) = tmpLine._buf._12_4_; - tmpLine._buf._0_4_ = (std_string *)0x0; + *(undefined4 *)(linesEnd->_buf + 4) = (*(undefined4 *)((char *)&(tmpLine._buf) + 0x4)); + *(undefined4 *)(linesEnd->_buf + 8) = (*(undefined4 *)((char *)&(tmpLine._buf) + 0x8)); + *(undefined4 *)(linesEnd->_buf + 0xc) = (*(undefined4 *)((char *)&(tmpLine._buf) + 0xc)); + (*(undefined4 *)((char *)&(tmpLine._buf) + 0x0)) = (std_string *)0x0; linesEnd->_size = 0; linesEnd->_capacity = 0xf; linesEnd = linesEnd + 1; } - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (&DAT_0000000f < tmpLine._capacity) { puVar5 = (undefined1 *)(tmpLine._capacity + 1); - lineChars = (std_string *)tmpLine._buf._0_4_; + lineChars = (*(undefined4 *)((char *)&((std_string *)tmpLine._buf) + 0x0)); if ((undefined1 *)0xfff < puVar5) { - lineChars = (std_string *)((std_string *)(tmpLine._buf._0_4_ + -0x18))->_capacity; + lineChars = (std_string *)((std_string *)((*(undefined4 *)((char *)&(tmpLine._buf) + 0x0)) + -0x18))->_capacity; puVar5 = (undefined1 *)(tmpLine._capacity + 0x24); - if (0x1f < (uint)(tmpLine._buf._0_4_ + (-4 - (int)lineChars))) goto LAB_008e5f00; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpLine._buf) + 0x0)) + (-4 - GHIDRA_INT(lineChars))))) goto LAB_008e5f00; } - operator_delete(lineChars,(uint)puVar5); + operator_delete(lineChars,GHIDRA_UINT(puVar5)); } } else { @@ -827,13 +827,13 @@ LAB_008e58d0: ch = lineChars->_buf[charIndex]; lastLineSize = &linesEnd[-1]._size; if (puVar5 < local_4c) { - *lastLineSize = (uint)(puVar5 + 1); + *lastLineSize = GHIDRA_UINT((puVar5 + 1)); lineChars = psVar3; if (&DAT_0000000f < local_4c) { lineChars = *(std_string **)psVar3->_buf; } - lineChars->_buf[(int)puVar5] = ch; - (lineChars->_buf + 1)[(int)puVar5] = 0; + lineChars->_buf[GHIDRA_INT(puVar5)] = ch; + (lineChars->_buf + 1)[GHIDRA_INT(puVar5)] = 0; } else { if (puVar5 == (undefined1 *)0x7fffffff) { @@ -841,40 +841,40 @@ LAB_008e5f30: /* WARNING: Subroutine does not return */ std::string::_Xlen(); } - local_50 = (undefined1 *)((uint)(puVar5 + 1) | 0xf); + local_50 = (undefined1 *)(GHIDRA_UINT((puVar5 + 1)) | 0xf); if (local_50 < (undefined1 *)0x80000000) { - local_44 = (undefined1 *)((uint)local_4c >> 1); - if ((undefined1 *)(0x7fffffff - (int)local_44) < local_4c) { + local_44 = (undefined1 *)(GHIDRA_UINT(local_4c) >> 1); + if ((undefined1 *)(0x7fffffff - GHIDRA_INT(local_44)) < local_4c) { local_50 = (undefined1 *)0x7fffffff; } - else if (local_50 < local_44 + (int)local_4c) { - local_50 = local_44 + (int)local_4c; + else if (local_50 < local_44 + GHIDRA_INT(local_4c)) { + local_50 = local_44 + GHIDRA_INT(local_4c); } } else { local_50 = (undefined1 *)0x7fffffff; } - local_48 = std::_Allocate((uint)(local_50 + 1)); - *lastLineSize = (uint)(puVar5 + 1); - psVar1[-1]._capacity = (uint)local_50; + local_48 = std::_Allocate(GHIDRA_UINT((local_50 + 1))); + *lastLineSize = GHIDRA_UINT((puVar5 + 1)); + psVar1[-1]._capacity = GHIDRA_UINT(local_50); if (local_4c < (undefined1 *)0x10) { memcpy(local_48,psVar3,(size_t)puVar5); - local_48->_buf[(int)puVar5] = ch; - (local_48->_buf + 1)[(int)puVar5] = '\0'; + local_48->_buf[GHIDRA_INT(puVar5)] = ch; + (local_48->_buf + 1)[GHIDRA_INT(puVar5)] = '\0'; } else { local_44 = *(undefined1 **)psVar3->_buf; memcpy(local_48,local_44,(size_t)puVar5); - local_48->_buf[(int)puVar5] = ch; + local_48->_buf[GHIDRA_INT(puVar5)] = ch; puVar6 = local_4c + 1; - (local_48->_buf + 1)[(int)puVar5] = '\0'; + (local_48->_buf + 1)[GHIDRA_INT(puVar5)] = '\0'; puVar5 = local_44; if ((undefined1 *)0xfff < puVar6) { puVar5 = *(undefined1 **)(local_44 + -4); puVar6 = local_4c + 0x24; - if ((undefined1 *)0x1f < local_44 + (-4 - (int)puVar5)) goto LAB_008e5f00; + if ((undefined1 *)0x1f < local_44 + (-4 - GHIDRA_INT(puVar5))) goto LAB_008e5f00; } - operator_delete(puVar5,(uint)puVar6); + operator_delete(puVar5,GHIDRA_UINT(puVar6)); } *(std_string **)psVar3->_buf = local_48; } @@ -892,13 +892,13 @@ LAB_008e5f30: if (0xf < psVar1[-1]._capacity) { lineChars = *(std_string **)psVar3->_buf; } - if (lineChars->_buf[(int)puVar5] == 0x20) { + if (lineChars->_buf[GHIDRA_INT(puVar5)] == 0x20) { puVar6 = (undefined1 *)0x0; tmpLine._size = 0; - tmpLine._capacity = (uint)&DAT_0000000f; - tmpLine._buf._0_4_ = (std_string *)0x0; + tmpLine._capacity = GHIDRA_UINT(&DAT_0000000f); + (*(undefined4 *)((char *)&(tmpLine._buf) + 0x0)) = (std_string *)0x0; local_50 = puVar5 + 1; - local_14 = CONCAT31(local_14._1_3_,3); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),3); if (local_44 <= local_50) goto LAB_008e5c86; lineChars = psVar3; puVar5 = &DAT_0000000f; @@ -914,7 +914,7 @@ LAB_008e5f30: } lineChars = linesEnd; LAB_008e5d36: - psVar3 = (std_string *)(((int)lineChars - (int)lines) / 0x18); + psVar3 = (std_string *)((GHIDRA_INT(lineChars) - GHIDRA_INT(lines)) / 0x18); local_70 = psVar3; if (psVar3 < (std_string *)0x2) { if (psVar3 != (std_string *)0x0) goto LAB_008e5d7f; @@ -931,13 +931,13 @@ LAB_008e5d7f: local_88 = 0xffffffff; local_84 = 0; local_80 = 0; - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; psVar1 = lineChars; if (0xf < lineChars->_capacity) { psVar1 = *(std_string **)lineChars->_buf; } pvVar2 = ((Font *)(font))->Font::measure_string(tmpLine._buf + 8,(byte *)psVar1,&fontParams,&g_vectorOne); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; color._blue = 0.1764706; color._red = 0.21176471; color._green = 0.18431373; @@ -947,9 +947,9 @@ LAB_008e5d7f: std::vector<12byte>::clear(); std::vector<12byte>::_Tidy(); lineChars = lineChars + 1; - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; textY = (float)(ushort)font->_base + textY; - psVar3 = (std_string *)((int)&psVar3[-1]._capacity + 3); + psVar3 = (std_string *)(GHIDRA_INT(&psVar3[-1]._capacity) + 3); } while (psVar3 != (std_string *)0x0); lineChars = linesEnd; } @@ -964,7 +964,7 @@ LAB_008e5d7f: if (0xfff < size) { ptr = *(void **)((char *)pvVar2 + -4); size = uVar4 + 0x24; - if (0x1f < (uint)((int)pvVar2 + (-4 - (int)ptr))) goto LAB_008e5f00; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar2) + (-4 - GHIDRA_INT(ptr))))) goto LAB_008e5f00; } operator_delete(ptr,size); } @@ -972,12 +972,12 @@ LAB_008e5d7f: psVar3->_capacity = 0xf; psVar3->_buf[0] = 0; } - uVar4 = (((int)linesCapacity - (int)lines) / 0x18) * 0x18; + uVar4 = ((GHIDRA_INT(linesCapacity) - GHIDRA_INT(lines)) / 0x18) * 0x18; lineChars = lines; if (0xfff < uVar4) { lineChars = (std_string *)lines[-1]._capacity; uVar4 = uVar4 + 0x23; - if ((byte *)0x1f < (byte *)((int)lines + (-4 - (int)lineChars))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(lines) + (-4 - GHIDRA_INT(lineChars)))) { LAB_008e5f00: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -992,66 +992,66 @@ LAB_008e5f00: local_44 = (undefined1 *)*lastLineSize; lineChars = psVar3; puVar5 = puVar7; - local_48 = (std_string *)tmpLine._buf._0_4_; + local_48 = (*(undefined4 *)((char *)&((std_string *)tmpLine._buf) + 0x0)); if (local_44 <= local_50) break; LAB_008e5b47: psVar3 = local_70; if (0xf < lineChars->_capacity) { lineChars = *(std_string **)lineChars->_buf; } - ch = lineChars->_buf[(int)local_50]; + ch = lineChars->_buf[GHIDRA_INT(local_50)]; if (puVar6 < puVar5) { - tmpLine._size = (uint)(puVar6 + 1); + tmpLine._size = GHIDRA_UINT((puVar6 + 1)); lineChars = &tmpLine; if (&DAT_0000000f < puVar5) { - lineChars = (std_string *)tmpLine._buf._0_4_; + lineChars = (*(undefined4 *)((char *)&((std_string *)tmpLine._buf) + 0x0)); } - lineChars->_buf[(int)puVar6] = ch; - (lineChars->_buf + 1)[(int)puVar6] = '\0'; + lineChars->_buf[GHIDRA_INT(puVar6)] = ch; + (lineChars->_buf + 1)[GHIDRA_INT(puVar6)] = '\0'; puVar6 = (undefined1 *)tmpLine._size; puVar7 = (undefined1 *)tmpLine._capacity; } else { local_4c = puVar6; - local_48 = (std_string *)tmpLine._buf._0_4_; + local_48 = (*(undefined4 *)((char *)&((std_string *)tmpLine._buf) + 0x0)); if (puVar6 == (undefined1 *)0x7fffffff) goto LAB_008e5f30; local_44 = puVar6 + 1; - puVar7 = (undefined1 *)((uint)local_44 | 0xf); + puVar7 = (undefined1 *)(GHIDRA_UINT(local_44) | 0xf); if (puVar7 < (undefined1 *)0x80000000) { - if ((undefined1 *)(0x7fffffff - ((uint)puVar5 >> 1)) < puVar5) { + if ((undefined1 *)(0x7fffffff - (GHIDRA_UINT(puVar5) >> 1)) < puVar5) { puVar7 = (undefined1 *)0x7fffffff; } - else if (puVar7 < puVar5 + ((uint)puVar5 >> 1)) { - puVar7 = puVar5 + ((uint)puVar5 >> 1); + else if (puVar7 < puVar5 + (GHIDRA_UINT(puVar5) >> 1)) { + puVar7 = puVar5 + (GHIDRA_UINT(puVar5) >> 1); } } else { puVar7 = (undefined1 *)0x7fffffff; } local_7c = puVar5; - local_74 = std::_Allocate((uint)(puVar7 + 1)); - tmpLine._size = (uint)local_44; - tmpLine._capacity = (uint)puVar7; + local_74 = std::_Allocate(GHIDRA_UINT((puVar7 + 1))); + tmpLine._size = GHIDRA_UINT(local_44); + tmpLine._capacity = GHIDRA_UINT(puVar7); if (local_7c < (undefined1 *)0x10) { memcpy(local_74,&tmpLine,(size_t)local_4c); - local_74->_buf[(int)local_4c] = ch; - (local_74->_buf + 1)[(int)local_4c] = '\0'; + local_74->_buf[GHIDRA_INT(local_4c)] = ch; + (local_74->_buf + 1)[GHIDRA_INT(local_4c)] = '\0'; } else { memcpy(local_74,local_48,(size_t)local_4c); - local_74->_buf[(int)local_4c] = ch; - (local_74->_buf + 1)[(int)local_4c] = '\0'; + local_74->_buf[GHIDRA_INT(local_4c)] = ch; + (local_74->_buf + 1)[GHIDRA_INT(local_4c)] = '\0'; puVar5 = local_7c + 1; lineChars = local_48; if ((undefined1 *)0xfff < puVar5) { lineChars = (std_string *)local_48[-1]._capacity; puVar5 = local_7c + 0x24; - if (0x1f < (uint)((int)local_48 + (-4 - (int)lineChars))) goto LAB_008e5f00; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_48) + (-4 - GHIDRA_INT(lineChars))))) goto LAB_008e5f00; } - operator_delete(lineChars,(uint)puVar5); + operator_delete(lineChars,GHIDRA_UINT(puVar5)); } puVar6 = local_44; - tmpLine._buf._0_4_ = local_74; + (*(undefined4 *)((char *)&(tmpLine._buf) + 0x0)) = local_74; } } LAB_008e5c86: @@ -1077,8 +1077,8 @@ LAB_008e5c86: if (0xf < psVar3->_capacity) { psVar3 = *(std_string **)psVar3->_buf; } - *lastLineSizePtr = (uint)(puVar5 + -1); - psVar3->_buf[(int)(puVar5 + -1)] = 0; + *lastLineSizePtr = GHIDRA_UINT((puVar5 + -1)); + psVar3->_buf[GHIDRA_INT((puVar5 + -1))] = 0; if (linesEnd == linesCapacity) { vector_string_emplace_reallocate(&lines,linesEnd,&tmpLine); } @@ -1090,13 +1090,13 @@ LAB_008e5c86: local_14 = local_14 & 0xffffff00; if (&DAT_0000000f < tmpLine._capacity) { puVar5 = (undefined1 *)(tmpLine._capacity + 1); - psVar3 = (std_string *)tmpLine._buf._0_4_; + psVar3 = (*(undefined4 *)((char *)&((std_string *)tmpLine._buf) + 0x0)); if ((undefined1 *)0xfff < puVar5) { - psVar3 = (std_string *)((std_string *)(tmpLine._buf._0_4_ + -0x18))->_capacity; + psVar3 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(tmpLine._buf) + 0x0)) + -0x18))->_capacity; puVar5 = (undefined1 *)(tmpLine._capacity + 0x24); - if (0x1f < (uint)(tmpLine._buf._0_4_ + (-4 - (int)psVar3))) goto LAB_008e5f00; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpLine._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar3))))) goto LAB_008e5f00; } - operator_delete(psVar3,(uint)puVar5); + operator_delete(psVar3,GHIDRA_UINT(puVar5)); } LAB_008e5995: charIndex = charIndex + 1; @@ -1153,13 +1153,13 @@ void Menu_Online::on_quick_match_search_result(int *param_1, int param_2) local_8 = 0xffffffff; puStack_c = &LAB_00b06b72; local_10 = ExceptionList; - stackCookie = __security_cookie ^ (uint)((&lobbySettings)[1]._seed._buf + 8); + stackCookie = __security_cookie ^ GHIDRA_UINT(((&lobbySettings)[1]._seed._buf + 8)); ExceptionList = &local_10; candidateList = (int *)0x0; candidateCount = 0; candidateList = operator_new(0x18); - *candidateList = (int)candidateList; - candidateList[1] = (int)candidateList; + *candidateList = GHIDRA_INT(candidateList); + candidateList[1] = GHIDRA_INT(candidateList); local_8 = 0; lobbyIt = *param_1; if (lobbyIt != param_1[1]) { @@ -1182,10 +1182,10 @@ void Menu_Online::on_quick_match_search_result(int *param_1, int param_2) iVar6 = *piVar9; if (iVar6 == 0) { local_74 = 0; - local_74._4_4_ = (int *)0x0; - local_74._0_4_ = (int *)0x0; + (*(undefined4 *)((char *)&(local_74) + 0x4)) = (int *)0x0; + (*(undefined4 *)((char *)&(local_74) + 0x0)) = (int *)0x0; local_9c = (int *)local_74; - sortEnd = local_74._4_4_; + sortEnd = (*(undefined4 *)((char *)&(local_74) + 0x4)); } else { local_9c = *(int **)(iVar6 + 8); @@ -1205,7 +1205,7 @@ void Menu_Online::on_quick_match_search_result(int *param_1, int param_2) } if (iVar6 == iVar8) { KAGE::SmartPointer::SmartPointer(); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); ((std::shared_ptr *)(lobbyRef))->std::shared_ptr::assign(piVar9); if ((int *)*piVar9 == (int *)0x0) { lobbySortKey = 0; @@ -1218,17 +1218,17 @@ void Menu_Online::on_quick_match_search_result(int *param_1, int param_2) lobbyHandleVtable = KAGE::Network::Multiplayer::ConstLobby::vftable; pvVar11 = (void *)0x0; lobbyRefCount = (void *)0x0; - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; ((std::shared_ptr *)(auStackY_164 + 0x88))->std::shared_ptr::assign(lobbyRef); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; Menu_Save::select_save_slot ((Menu_Save *)&lobbySettings,lobbyHandleVtable,pvVar11,lobbyRefCount); if (g_userProfile == (void *)0x0) { local_74 = 0; - local_74._4_4_ = (int *)0x0; - local_74._0_4_ = (int *)0x0; - iVar6 = (int)local_74._4_4_; - iVar8 = (int)(int *)local_74; + (*(undefined4 *)((char *)&(local_74) + 0x4)) = (int *)0x0; + (*(undefined4 *)((char *)&(local_74) + 0x0)) = (int *)0x0; + iVar6 = (*(undefined4 *)((char *)&(GHIDRA_INT(local_74)) + 0x4)); + iVar8 = GHIDRA_INT((int *)local_74); } else { iVar6 = *(int *)((char *)g_userProfile + 0xc); @@ -1249,14 +1249,14 @@ void Menu_Online::on_quick_match_search_result(int *param_1, int param_2) std::_Xlength_error("list too long"); } local_90 = &candidateList; - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; local_8c = (int *)0x0; puVar7 = operator_new(0x18); local_74 = CONCAT44(puVar7 + 2,(int *)local_74); puVar7[2] = KAGE::Network::Multiplayer::ConstLobby::vftable; puVar7[3] = 0; puVar7[4] = 0; - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; local_8c = puVar7; ((std::shared_ptr *)(puVar7 + 3))->std::shared_ptr::assign(lobbyRef); puVar7[5] = lobbySortKey; @@ -1265,26 +1265,26 @@ void Menu_Online::on_quick_match_search_result(int *param_1, int param_2) puVar2 = (undefined4 *)listHead[1]; *puVar7 = listHead; puVar7[1] = puVar2; - listHead[1] = (int)puVar7; + listHead[1] = GHIDRA_INT(puVar7); *puVar2 = puVar7; LAB_008e61df: std::vector::_Tidy(); ((std::string *)(lobbySettings._password._buf))->std::string::_Tidy_deallocate(); ((std::string *)(lobbySettings._seed._buf))->std::string::_Tidy_deallocate(); - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; if (((local_a4 != (int *)0x0) && (cVar5 = (**(code **)(*local_a4 + 0xc))(), cVar5 != '\0')) && (g_lobbyReleaseFn != (void *)0x0)) { (*g_lobbyReleaseFn)(); } - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; } } } lobbyIt = lobbyIt + 0xc; } while (lobbyIt != param_1[1]); } - local_84 = (int *)((uint)local_84 & 0xffffff00); + local_84 = (int *)(GHIDRA_UINT(local_84) & 0xffffff00); listHead = candidateList; if ((candidateCount != 0) && (candidateCount != 1)) { local_80 = (int *)FUN_008e69a0(); @@ -1293,7 +1293,7 @@ LAB_008e61df: local_84 = (int *)*listHead; sortEnd = local_84; piVar9 = local_80; - if ((uint)local_80[5] < (uint)local_84[5]) { + if (GHIDRA_UINT(local_80[5]) < GHIDRA_UINT(local_84[5])) { local_84 = local_80; piVar4 = local_80; } @@ -1302,7 +1302,7 @@ LAB_008e61df: sortEnd = (int *)*sortEnd; if (sortEnd == local_80) goto LAB_008e6318; piVar4 = local_80; - } while ((uint)sortEnd[5] <= (uint)local_80[5]); + } while (GHIDRA_UINT(sortEnd[5]) <= GHIDRA_UINT(local_80[5])); } LAB_008e62d0: local_8c = piVar4; @@ -1315,32 +1315,32 @@ LAB_008e6323: if ((candidateCount == 0) || (cVar5 = FUN_009c38e0(), cVar5 == '\0')) { local_94 = KAGE::Network::Multiplayer::ConstLobby::vftable; KAGE::SmartPointer::SmartPointer(); - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; pvVar11 = (void *)FUN_00a71f00(); - local_8._0_1_ = 9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; ((std::shared_ptr *)(&local_90))->std::shared_ptr::assign(pvVar11); - local_8._0_1_ = 10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 10; if ((local_98 != (int *)0x0) && ((cVar5 = (**(code **)(*local_98 + 0xc))(), cVar5 != '\0' && (g_lobbyReleaseFn != (void *)0x0)))) { (*g_lobbyReleaseFn)(); } - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; ((std::shared_ptr *)((void *)(param_2 + 0x244)))->std::shared_ptr::assign(&local_90); local_94 = KAGE::Network::Multiplayer::ConstLobby::vftable; - local_8._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc; if (((local_8c != (int *)0x0) && (cVar5 = (**(code **)(*local_8c + 0xc))(), cVar5 != '\0')) && (g_lobbyReleaseFn != (void *)0x0)) { (*g_lobbyReleaseFn)(); } - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; } else { ((std::shared_ptr *)((void *)(param_2 + 0x244)))->std::shared_ptr::assign((void *)(*candidateList + 0xc)); } local_74 = CONCAT44(0xffffffff,(int *)local_74); ((PopupManager *)(&(*(undefined1 *)((char *)&(g_manager[1]._gamestate) + 0xcf0))))->PopupManager::close((int *)(param_2 + 0x23c), - (int *)((int)&local_74 + 4)); + (int *)(GHIDRA_INT(&local_74) + 4)); local_8 = 0xffffffff; *(int *)(param_2 + 0x23c) = -1; *(undefined4 *)candidateList[1] = 0; @@ -1363,7 +1363,7 @@ LAB_008e6323: return; code_r0x008e62d6: piVar4 = local_8c; - if ((uint)piVar9[5] < (uint)sortEnd[5]) goto LAB_008e62d0; + if (GHIDRA_UINT(piVar9[5]) < GHIDRA_UINT(sortEnd[5])) goto LAB_008e62d0; LAB_008e62de: puVar2 = (undefined4 *)local_8c[1]; *puVar2 = piVar9; @@ -1371,19 +1371,19 @@ LAB_008e62de: *puVar7 = sortEnd; puVar3 = (undefined4 *)sortEnd[1]; *puVar3 = local_8c; - sortEnd[1] = (int)puVar7; - piVar9[1] = (int)puVar2; - local_8c[1] = (int)puVar3; + sortEnd[1] = GHIDRA_INT(puVar7); + piVar9[1] = GHIDRA_INT(puVar2); + local_8c[1] = GHIDRA_INT(puVar3); if (piVar9 != sortEnd) { do { sortEnd = (int *)*sortEnd; if (sortEnd == piVar9) goto LAB_008e6318; piVar4 = piVar9; - } while ((uint)sortEnd[5] <= (uint)piVar9[5]); + } while (GHIDRA_UINT(sortEnd[5]) <= GHIDRA_UINT(piVar9[5])); goto LAB_008e62d0; } LAB_008e6318: - *listHead = (int)local_84; + *listHead = GHIDRA_INT(local_84); goto LAB_008e6323; } @@ -1436,7 +1436,7 @@ void Menu_Online::render_descriptions() local_8 = 0xffffffff; puStack_c = &LAB_00b06c45; local_10 = ExceptionList; - stackCookie = __security_cookie ^ (uint)(countText + 0x30); + stackCookie = __security_cookie ^ GHIDRA_UINT((countText + 0x30)); ExceptionList = &local_10; local_88.x = (g_menuManager->_ViewPosition).x + *(float *)(in_ECX + 0x128); local_88.y = (g_menuManager->_ViewPosition).y + *(float *)(in_ECX + 300); @@ -1524,28 +1524,28 @@ void Menu_Online::render_descriptions() strCursor = strCursor + 1; } while (strChar != 0); ((std::string *)((char *)tmpString))->std::string::assign(translatedText, - (int)strCursor - (int)(translatedText + 1)); - local_8._0_1_ = 1; + GHIDRA_INT(strCursor) - GHIDRA_INT((translatedText + 1))); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; pppppbVar4 = (byte *****)tmpString; if (0xf < tmpStringCapacity) { pppppbVar4 = tmpString[0]; } ((Font *)(pFVar3))->Font::DrawStringScaled((byte *)pppppbVar4,&labelPos,&textColor,&fontSettings); - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; if (0xf < tmpStringCapacity) { uVar5 = tmpStringCapacity + 1; pppppbVar4 = tmpString[0]; if (0xfff < uVar5) { pppppbVar4 = (byte *****)tmpString[0][-1]; uVar5 = tmpStringCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)tmpString[0] + (-4 - (int)pppppbVar4))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(pppppbVar4)))) goto LAB_008e718e; } operator_delete(pppppbVar4,uVar5); } tmpStringSize = 0; tmpStringCapacity = 0xf; - tmpString[0] = (byte *****)((uint)tmpString[0] & 0xffffff00); + tmpString[0] = (byte *****)(GHIDRA_UINT(tmpString[0]) & 0xffffff00); local_8 = 2; valuePos.x = columnX + 102.0; textColor._red = 0.21176471; @@ -1597,7 +1597,7 @@ void Menu_Online::render_descriptions() else { keySize = *(std_string **)(statKey + 0x10); pFVar3 = &g_manager->_font1_TeamMeatEx10; - if (0x7fffffffU - (int)keySize < 5) { + if (0x7fffffffU - GHIDRA_INT(keySize) < 5) { /* WARNING: Subroutine does not return */ std::string::_Xlen(); } @@ -1605,9 +1605,9 @@ void Menu_Online::render_descriptions() if (0xf < *(uint *)(statKey + 0x14)) { strCursor = *(byte **)statKey; } - ((std::string *)((char *)tmpString))->std::string::concat((int)local_88.y,keySize,strCursor, - (uint)keySize,(byte *)"_DESC",5); - local_8._0_1_ = 6; + ((std::string *)((char *)tmpString))->std::string::concat(GHIDRA_INT(local_88.y),keySize,strCursor, + GHIDRA_UINT(keySize),(byte *)"_DESC",5); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; pppppbVar4 = (byte *****)tmpString; if (0xf < tmpStringCapacity) { pppppbVar4 = tmpString[0]; @@ -1622,36 +1622,36 @@ void Menu_Online::render_descriptions() strCursor = strCursor + 1; } while (strChar != 0); ((std::string *)((char *)descriptionText))->std::string::assign(translatedText, - (int)strCursor - (int)(translatedText + 1)); - local_8._0_1_ = 5; + GHIDRA_INT(strCursor) - GHIDRA_INT((translatedText + 1))); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; if (0xf < tmpStringCapacity) { uVar5 = tmpStringCapacity + 1; pppppbVar4 = tmpString[0]; if (0xfff < uVar5) { pppppbVar4 = (byte *****)tmpString[0][-1]; uVar5 = tmpStringCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)tmpString[0] + (-4 - (int)pppppbVar4))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(pppppbVar4)))) goto LAB_008e718e; } operator_delete(pppppbVar4,uVar5); } tmpStringSize = 0; tmpStringCapacity = 0xf; - tmpString[0] = (byte *****)((uint)tmpString[0] & 0xffffff00); - local_8._0_1_ = 7; + tmpString[0] = (byte *****)(GHIDRA_UINT(tmpString[0]) & 0xffffff00); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; pppppbVar4 = (byte *****)descriptionText; if (0xf < descriptionTextCapacity) { pppppbVar4 = descriptionText[0]; } ((Font *)(pFVar3))->Font::DrawStringScaled((byte *)pppppbVar4,&descriptionPos,&textColor,&fontSettings); - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; if (0xf < descriptionTextCapacity) { uVar5 = descriptionTextCapacity + 1; pppppbVar4 = descriptionText[0]; if (0xfff < uVar5) { pppppbVar4 = (byte *****)descriptionText[0][-1]; uVar5 = descriptionTextCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)descriptionText[0] + (-4 - (int)pppppbVar4))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(descriptionText[0]) + (-4 - GHIDRA_INT(pppppbVar4)))) { LAB_008e718e: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1661,7 +1661,7 @@ LAB_008e718e: } descriptionTextSize = 0; descriptionTextCapacity = 0xf; - descriptionText[0] = (byte *****)((uint)descriptionText[0] & 0xffffff00); + descriptionText[0] = (byte *****)(GHIDRA_UINT(descriptionText[0]) & 0xffffff00); } } local_8 = 0xffffffff; diff --git a/src/game/menu_online_lobby.cpp b/src/game/menu_online_lobby.cpp index 4a22148..8bdb939 100644 --- a/src/game/menu_online_lobby.cpp +++ b/src/game/menu_online_lobby.cpp @@ -403,7 +403,7 @@ void Menu_OnlineLobby::render_player_slots() isKeyboard = g_menuControllerIndex == 0; local_20.y = (float)g_manager; pbVar2 = *(byte **)((char *)sprite + 0x38); - sprite = (ANM2 *)((int)sprite + 4); + sprite = (ANM2 *)(GHIDRA_INT(sprite) + 4); if (*(int *)&g_manager->_lobbySettings == 2) { if (pbVar2 != (byte *)0x0) { if (0xf < *(uint *)(pbVar2 + 0x14)) { @@ -415,7 +415,7 @@ void Menu_OnlineLobby::render_player_slots() bVar7 = bVar1 < (byte)*pcVar5; if (bVar1 != *pcVar5) { LAB_008db962: - uVar3 = -(uint)bVar7 | 1; + uVar3 = -GHIDRA_UINT(bVar7) | 1; goto LAB_008db967; } if (bVar1 == 0) break; @@ -444,7 +444,7 @@ LAB_008db967: bVar7 = bVar1 < *pbVar6; if (bVar1 != *pbVar6) { LAB_008db9b6: - uVar3 = -(uint)bVar7 | 1; + uVar3 = -GHIDRA_UINT(bVar7) | 1; goto LAB_008db9bb; } if (bVar1 == 0) break; @@ -464,199 +464,199 @@ LAB_008db9bb: } bVar1 = ((ANM2 *)(sprite))->ANM2::SetAnimation((byte *)pcVar5,1); if (bVar1 != 0) { - ((AnimationState *)((AnimationState *)((int)sprite + 0x34)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(sprite) + 0x34)))->AnimationState::Rewind(); *(undefined1 *)((char *)sprite + 0x48) = 1; } LAB_008db9ec: pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer((byte *)"BackKey"); pLVar4->_visible = isKeyboard; if (*(int *)((char *)local_20.y + 0x4b0d8) == 2) { - local_20.y = (float)(uint)(*(char *)((char *)sprite + 0x141) != '\0'); + local_20.y = (float)GHIDRA_UINT((*(char *)((char *)sprite + 0x141) != '\0')); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer(&DAT_00b75678); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); bVar7 = *(char *)((char *)sprite + 0x142) == '\0'; } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); bVar7 = *(char *)((char *)sprite + 0x142) == '\0'; } } else { - local_20.y = (float)(uint)(*(char *)((char *)sprite + 0x130) != '\0'); + local_20.y = (float)GHIDRA_UINT((*(char *)((char *)sprite + 0x130) != '\0')); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer(&DAT_00b75678); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); } bVar7 = *(char *)((char *)sprite + 0x131) == '\0'; } - local_20.y = (float)(uint)!bVar7; + local_20.y = (float)GHIDRA_UINT(!bVar7); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer(&DAT_00b75680); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); } - local_20.y = (float)(uint)(*(char *)((char *)sprite + 0x132) != '\0'); + local_20.y = (float)GHIDRA_UINT((*(char *)((char *)sprite + 0x132) != '\0')); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer(&DAT_00b75668); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); } - local_20.y = (float)(uint)(*(char *)((char *)sprite + 0x133) != '\0'); + local_20.y = (float)GHIDRA_UINT((*(char *)((char *)sprite + 0x133) != '\0')); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer(&DAT_00b75670); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); } - local_20.y = (float)(uint)(*(char *)((char *)sprite + 0x134) != '\0'); + local_20.y = (float)GHIDRA_UINT((*(char *)((char *)sprite + 0x134) != '\0')); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer(&DAT_00b756d4); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); } - local_20.y = (float)(uint)(*(char *)((char *)sprite + 0x13f) != '\0'); + local_20.y = (float)GHIDRA_UINT((*(char *)((char *)sprite + 0x13f) != '\0')); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer(&DAT_00b75c14); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); } - local_20.y = (float)(uint)(*(char *)((char *)sprite + 0x140) != '\0'); + local_20.y = (float)GHIDRA_UINT((*(char *)((char *)sprite + 0x140) != '\0')); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer(&DAT_00b75bf8); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); } - local_20.y = (float)(uint)(*(char *)((char *)sprite + 0x136) != '\0'); + local_20.y = (float)GHIDRA_UINT((*(char *)((char *)sprite + 0x136) != '\0')); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer(&DAT_00b75c00); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); } - local_20.y = (float)(uint)(*(char *)((char *)sprite + 0x137) != '\0'); + local_20.y = (float)GHIDRA_UINT((*(char *)((char *)sprite + 0x137) != '\0')); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer(&DAT_00b75be8); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); } - local_20.y = (float)(uint)(*(char *)((char *)sprite + 0x138) != '\0'); + local_20.y = (float)GHIDRA_UINT((*(char *)((char *)sprite + 0x138) != '\0')); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer((byte *)"Box10"); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); } - local_20.y = (float)(uint)(*(char *)((char *)sprite + 0x139) != '\0'); + local_20.y = (float)GHIDRA_UINT((*(char *)((char *)sprite + 0x139) != '\0')); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer((byte *)"Box11"); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); } - local_20.y = (float)(uint)(*(char *)((char *)sprite + 0x13a) != '\0'); + local_20.y = (float)GHIDRA_UINT((*(char *)((char *)sprite + 0x13a) != '\0')); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer((byte *)"Box12"); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); } - local_20.y = (float)(uint)(*(char *)((char *)sprite + 0x13b) != '\0'); + local_20.y = (float)GHIDRA_UINT((*(char *)((char *)sprite + 0x13b) != '\0')); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer((byte *)"Box13"); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); } - local_20.y = (float)(uint)(*(char *)((char *)sprite + 0x13c) != '\0'); + local_20.y = (float)GHIDRA_UINT((*(char *)((char *)sprite + 0x13c) != '\0')); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer((byte *)"Box14"); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); } - local_20.y = (float)(uint)(*(char *)((char *)sprite + 0x13d) != '\0'); + local_20.y = (float)GHIDRA_UINT((*(char *)((char *)sprite + 0x13d) != '\0')); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer((byte *)"Box15"); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); } - local_20.y = (float)(uint)(*(char *)((char *)sprite + 0x13e) != '\0'); + local_20.y = (float)GHIDRA_UINT((*(char *)((char *)sprite + 0x13e) != '\0')); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer((byte *)"Box16"); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); } - local_20.y = (float)(uint)(*(int *)((char *)sprite + 300) == 3); + local_20.y = (float)GHIDRA_UINT((*(int *)((char *)sprite + 300) == 3)); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer((byte *)"Box17"); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); } - local_20.y = (float)(uint)(*(int *)((char *)sprite + 300) == 0); + local_20.y = (float)GHIDRA_UINT((*(int *)((char *)sprite + 300) == 0)); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer((byte *)"Box18"); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); } - local_20.y = (float)(uint)(*(int *)((char *)sprite + 300) == 1); + local_20.y = (float)GHIDRA_UINT((*(int *)((char *)sprite + 300) == 1)); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer((byte *)"Box19"); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); } - local_20.y = (float)(uint)(*(int *)((char *)sprite + 300) == 2); + local_20.y = (float)GHIDRA_UINT((*(int *)((char *)sprite + 300) == 2)); pLVar4 = ((ANM2 *)(sprite))->ANM2::GetLayer((byte *)"Box20"); if (pLVar4 == (LayerState *)0x0) { KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,(int)local_20.y); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar4->_layerData,GHIDRA_INT(local_20.y)); } local_20.x = (g_menuManager->_ViewPosition).x + *(float *)((char *)sprite + 0x11c); local_20.y = (g_menuManager->_ViewPosition).y + *(float *)((char *)sprite + 0x120); if (*(char *)((char *)sprite + 0x10d) != '\0') { if (*(char *)((char *)sprite + 0x74) == '\0') { AnimationState::Render - ((AnimationState *)((int)sprite + 0x34),&local_20,&g_vectorZero,&g_vectorZero); - otherAnimState = (AnimationState *)((int)sprite + 0x54); + ((AnimationState *)(GHIDRA_INT(sprite) + 0x34),&local_20,&g_vectorZero,&g_vectorZero); + otherAnimState = (AnimationState *)(GHIDRA_INT(sprite) + 0x54); } else { AnimationState::Render - ((AnimationState *)((int)sprite + 0x54),&local_20,&g_vectorZero,&g_vectorZero); - otherAnimState = (AnimationState *)((int)sprite + 0x34); + ((AnimationState *)(GHIDRA_INT(sprite) + 0x54),&local_20,&g_vectorZero,&g_vectorZero); + otherAnimState = (AnimationState *)(GHIDRA_INT(sprite) + 0x34); } AnimationState::Render(otherAnimState,&local_20,&g_vectorZero,&g_vectorZero); } @@ -666,7 +666,7 @@ LAB_008db9ec: } else { backButtonOffset = - ((AnimationState *)((AnimationState *)((int)sprite + 0x34)))->AnimationState::GetNullFrame((byte *)"BackButton"); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(sprite) + 0x34)))->AnimationState::GetNullFrame((byte *)"BackButton"); } local_20.y = backButtonOffset[1] + local_20.y; local_20.x = *backButtonOffset + local_20.x; @@ -736,7 +736,7 @@ void Menu_OnlineLobby::Render() AnimationState *animState; Font *font; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b0622d; local_1c = ExceptionList; @@ -748,21 +748,21 @@ void Menu_OnlineLobby::Render() local_78.y = (float)this; originY = local_70.y; originX = local_70.x; - puVar6 = (undefined1 *)((int)register0x00000010 + -4); + puVar6 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); if ((*(int *)((char *)this + 0x3c) != 0) && - ((puVar6 = (undefined1 *)((int)register0x00000010 + -4), + ((puVar6 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4), 2 < *(int *)(*(int *)((char *)this + 0x38) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), puVar6 = puStack_20, 2 < *(int *)(*(int *)((char *)this + 0x38) + 0x80))))) { puStack_20 = puVar6; iVar7 = *(int *)((char *)this + 0x3c); local_34 = *(float *)(iVar7 + 0x40); - if ((iVar7 == 0) || (((int)local_34 < 0 || (*(int *)(iVar7 + 0x1c) <= (int)local_34)))) { + if ((iVar7 == 0) || ((GHIDRA_INT(local_34) < 0 || (*(int *)(iVar7 + 0x1c) <= GHIDRA_INT(local_34))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)(*(int *)((char *)this + 0x40) + (int)local_34 * 4) = 0; + *(undefined4 *)(*(int *)((char *)this + 0x40) + GHIDRA_INT(local_34) * 4) = 0; AnimationState::AdvanceLayerPosition - ((AnimationState *)((int)this + 0x38),(int)local_34,(float)(int)local_30); + ((AnimationState *)(GHIDRA_INT(this) + 0x38),GHIDRA_INT(local_34),(float)GHIDRA_INT(local_30)); puVar6 = puStack_20; } puStack_20 = puVar6; @@ -773,13 +773,13 @@ void Menu_OnlineLobby::Render() dVar11 = ceil((double)local_34); local_34 = (float)dVar11; isLayerVisible = 1; - if ((int)dVar11 < 2) goto LAB_008ddc52; + if (GHIDRA_INT(dVar11) < 2) goto LAB_008ddc52; } else { LAB_008ddc52: isLayerVisible = 0; } - layer = ((ANM2 *)((ANM2 *)((int)this + 8)))->ANM2::GetLayer((byte *)"ArrowUp"); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 8)))->ANM2::GetLayer((byte *)"ArrowUp"); layer->_visible = isLayerVisible; if (*(char *)((char *)this + 0x344) == '\0') { iVar7 = *(int *)((char *)this + 0x354) - *(int *)((char *)this + 0x350); @@ -787,62 +787,62 @@ LAB_008ddc52: dVar11 = ceil((double)local_34); local_34 = (float)dVar11; isLayerVisible = 1; - if ((uint)((int)dVar11 + (*(int *)((char *)this + 0x360) - *(int *)((char *)this + 0x35c)) / 0x18) < 2 + if (GHIDRA_UINT((GHIDRA_INT(dVar11) + (*(int *)((char *)this + 0x360) - *(int *)((char *)this + 0x35c)) / 0x18)) < 2 ) goto LAB_008ddce7; } else { LAB_008ddce7: isLayerVisible = 0; } - layer = ((ANM2 *)((ANM2 *)((int)this + 8)))->ANM2::GetLayer((byte *)"ArrowDown"); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 8)))->ANM2::GetLayer((byte *)"ArrowDown"); isKeyboard = g_menuControllerIndex == 0; layer->_visible = isLayerVisible; isLayerVisible = isKeyboard; - layer = ((ANM2 *)((ANM2 *)((int)this + 8)))->ANM2::GetLayer((byte *)"CreateButton"); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 8)))->ANM2::GetLayer((byte *)"CreateButton"); layer->_visible = isLayerVisible; - layer = ((ANM2 *)((ANM2 *)((int)this + 8)))->ANM2::GetLayer((byte *)"RefreshButton"); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 8)))->ANM2::GetLayer((byte *)"RefreshButton"); layer->_visible = isLayerVisible; - layer = ((ANM2 *)((ANM2 *)((int)this + 8)))->ANM2::GetLayer((byte *)"FiltersButton"); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 8)))->ANM2::GetLayer((byte *)"FiltersButton"); layer->_visible = isLayerVisible; - layer = ((ANM2 *)((ANM2 *)((int)this + 8)))->ANM2::GetLayer((byte *)"BackButton"); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 8)))->ANM2::GetLayer((byte *)"BackButton"); layer->_visible = isLayerVisible; if (((local_30 == (float *)0x1) || (g_menuControllerIndex != 0)) || (*(char *)((char *)this + 0x500) != '\0')) { - layer = ((ANM2 *)((ANM2 *)((int)this + 8)))->ANM2::GetLayer((byte *)"EnterPasswordButton"); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 8)))->ANM2::GetLayer((byte *)"EnterPasswordButton"); layer->_visible = 0; if (local_30 != (float *)0x1) goto LAB_008ddd97; LAB_008ddda4: isLayerVisible = 0; } else { - layer = ((ANM2 *)((ANM2 *)((int)this + 8)))->ANM2::GetLayer((byte *)"EnterPasswordButton"); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 8)))->ANM2::GetLayer((byte *)"EnterPasswordButton"); layer->_visible = 1; LAB_008ddd97: isLayerVisible = 1; if (*(char *)((char *)this + 0x500) != '\0') goto LAB_008ddda4; } - layer = ((ANM2 *)((ANM2 *)((int)this + 8)))->ANM2::GetLayer((byte *)"EnterPasswordText"); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 8)))->ANM2::GetLayer((byte *)"EnterPasswordText"); layer->_visible = isLayerVisible; - layer = ((ANM2 *)((ANM2 *)((int)this + 8)))->ANM2::GetLayer((byte *)"EnterPasswordPaper"); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 8)))->ANM2::GetLayer((byte *)"EnterPasswordPaper"); layer->_visible = isPasswordPaperVisible; if (*(char *)((char *)this + 0x111) != '\0') { if (*(char *)((char *)this + 0x78) == '\0') { AnimationState::Render - ((AnimationState *)((int)this + 0x38),&local_70,&g_vectorZero,&g_vectorZero); + ((AnimationState *)(GHIDRA_INT(this) + 0x38),&local_70,&g_vectorZero,&g_vectorZero); AnimationState::Render - ((AnimationState *)((int)this + 0x58),&local_70,&g_vectorZero,&g_vectorZero); + ((AnimationState *)(GHIDRA_INT(this) + 0x58),&local_70,&g_vectorZero,&g_vectorZero); } else { AnimationState::Render - ((AnimationState *)((int)this + 0x58),&local_70,&g_vectorZero,&g_vectorZero); + ((AnimationState *)(GHIDRA_INT(this) + 0x58),&local_70,&g_vectorZero,&g_vectorZero); AnimationState::Render - ((AnimationState *)((int)this + 0x38),&local_70,&g_vectorZero,&g_vectorZero); + ((AnimationState *)(GHIDRA_INT(this) + 0x38),&local_70,&g_vectorZero,&g_vectorZero); } originX = local_70.x; originY = local_70.y; } if (g_menuControllerIndex != 0) { - animState = (AnimationState *)((int)this + 0x38); + animState = (AnimationState *)(GHIDRA_INT(this) + 0x38); if (*(int *)((char *)this + 0x3c) == 0) { nullFrame = (float *)0x0; } @@ -875,14 +875,14 @@ LAB_008ddd97: local_70.x = originX + *nullFrame; auVar5 = ZEXT1632(CONCAT412(0x3f800000,CONCAT48(0x3f800000,0x3f8000003f800000))); color._offset[0] = (float)local_60; - color._tint[0] = (float)auVar5._0_4_; - color._tint[1] = (float)auVar5._4_4_; - color._tint[2] = (float)auVar5._8_4_; - color._tint[3] = (float)auVar5._12_4_; - color._colorize[0] = (float)auVar5._16_4_; - color._colorize[1] = (float)auVar5._20_4_; - color._colorize[2] = (float)auVar5._24_4_; - color._colorize[3] = (float)auVar5._28_4_; + color._tint[0] = (*(undefined4 *)((char *)&((float)auVar5) + 0x0)); + color._tint[1] = (*(undefined4 *)((char *)&((float)auVar5) + 0x4)); + color._tint[2] = (*(undefined4 *)((char *)&((float)auVar5) + 0x8)); + color._tint[3] = (*(undefined4 *)((char *)&((float)auVar5) + 0xc)); + color._colorize[0] = (*(undefined4 *)((char *)&((float)auVar5) + 0x10)); + color._colorize[1] = (*(undefined4 *)((char *)&((float)auVar5) + 0x14)); + color._colorize[2] = (*(undefined4 *)((char *)&((float)auVar5) + 0x18)); + color._colorize[3] = (*(undefined4 *)((char *)&((float)auVar5) + 0x1c)); color._offset[1] = (float)local_60; color._offset[2] = 0.0; pos_00.y = local_70.y; @@ -901,14 +901,14 @@ LAB_008ddd97: local_70.x = originX + *nullFrame; auVar5 = ZEXT1632(CONCAT412(0x3f800000,CONCAT48(0x3f800000,0x3f8000003f800000))); color_00._offset[0] = (float)local_60; - color_00._tint[0] = (float)auVar5._0_4_; - color_00._tint[1] = (float)auVar5._4_4_; - color_00._tint[2] = (float)auVar5._8_4_; - color_00._tint[3] = (float)auVar5._12_4_; - color_00._colorize[0] = (float)auVar5._16_4_; - color_00._colorize[1] = (float)auVar5._20_4_; - color_00._colorize[2] = (float)auVar5._24_4_; - color_00._colorize[3] = (float)auVar5._28_4_; + color_00._tint[0] = (*(undefined4 *)((char *)&((float)auVar5) + 0x0)); + color_00._tint[1] = (*(undefined4 *)((char *)&((float)auVar5) + 0x4)); + color_00._tint[2] = (*(undefined4 *)((char *)&((float)auVar5) + 0x8)); + color_00._tint[3] = (*(undefined4 *)((char *)&((float)auVar5) + 0xc)); + color_00._colorize[0] = (*(undefined4 *)((char *)&((float)auVar5) + 0x10)); + color_00._colorize[1] = (*(undefined4 *)((char *)&((float)auVar5) + 0x14)); + color_00._colorize[2] = (*(undefined4 *)((char *)&((float)auVar5) + 0x18)); + color_00._colorize[3] = (*(undefined4 *)((char *)&((float)auVar5) + 0x1c)); color_00._offset[1] = (float)local_60; color_00._offset[2] = 0.0; pos_01.y = local_70.y; @@ -927,14 +927,14 @@ LAB_008ddd97: local_70.x = originX + *nullFrame; auVar5 = ZEXT1632(CONCAT412(0x3f800000,CONCAT48(0x3f800000,0x3f8000003f800000))); color_01._offset[0] = (float)local_60; - color_01._tint[0] = (float)auVar5._0_4_; - color_01._tint[1] = (float)auVar5._4_4_; - color_01._tint[2] = (float)auVar5._8_4_; - color_01._tint[3] = (float)auVar5._12_4_; - color_01._colorize[0] = (float)auVar5._16_4_; - color_01._colorize[1] = (float)auVar5._20_4_; - color_01._colorize[2] = (float)auVar5._24_4_; - color_01._colorize[3] = (float)auVar5._28_4_; + color_01._tint[0] = (*(undefined4 *)((char *)&((float)auVar5) + 0x0)); + color_01._tint[1] = (*(undefined4 *)((char *)&((float)auVar5) + 0x4)); + color_01._tint[2] = (*(undefined4 *)((char *)&((float)auVar5) + 0x8)); + color_01._tint[3] = (*(undefined4 *)((char *)&((float)auVar5) + 0xc)); + color_01._colorize[0] = (*(undefined4 *)((char *)&((float)auVar5) + 0x10)); + color_01._colorize[1] = (*(undefined4 *)((char *)&((float)auVar5) + 0x14)); + color_01._colorize[2] = (*(undefined4 *)((char *)&((float)auVar5) + 0x18)); + color_01._colorize[3] = (*(undefined4 *)((char *)&((float)auVar5) + 0x1c)); color_01._offset[1] = (float)local_60; color_01._offset[2] = 0.0; pos_02.y = local_70.y; @@ -963,13 +963,13 @@ LAB_008ddd97: local_30 = (float *)0x0; } else { - local_30 = ((AnimationState *)((AnimationState *)((int)this + 0x38)))->AnimationState::GetNullFrame((byte *)"Loading"); + local_30 = ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x38)))->AnimationState::GetNullFrame((byte *)"Loading"); if (*(int *)((char *)this + 0x3c) == 0) { pvVar8 = (void *)0x0; } else { pvVar8 = AnimationState::GetNullFrame - ((AnimationState *)((int)this + 0x38),(byte *)"LobbyList"); + ((AnimationState *)(GHIDRA_INT(this) + 0x38),(byte *)"LobbyList"); } } lVar4 = CONCAT44(local_70.y,local_34); @@ -977,7 +977,7 @@ LAB_008ddd97: if (*(char *)((char *)this + 0x344) == '\0') { timeNs = GetTimeNs(); this = (void *)local_78.y; - uVar9 = (uint)(timeNs >> 0x20); + uVar9 = GHIDRA_UINT((timeNs >> 0x20)); uVar1 = (timeNs & 0xffffffff) * 0xd7b634db; local_70.x = (float)uVar1; lVar2 = (timeNs & 0xffffffff) * 0x431bde82; @@ -988,15 +988,15 @@ LAB_008ddd97: local_70.y = (float)((ulonglong)lVar4 >> 0x20); local_34 = (float)lVar4; uVar1 = lVar3 + (uVar1 >> 0x20); - uVar10 = (uint)(uVar1 >> 0x20); + uVar10 = GHIDRA_UINT((uVar1 >> 0x20)); lVar2 = lVar2 + (uVar1 & 0xffffffff); local_50 = (undefined4)lVar2; - uVar9 = (uint)((ulonglong)lVar2 >> 0x20); + uVar9 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); lVar2 = lVar4 + (ulonglong)CONCAT14(CARRY4(uVar10,uVar9),uVar10 + uVar9); - uVar9 = (uint)((ulonglong)lVar2 >> 0x20); - uVar10 = (uint)lVar2 >> 0x12 | uVar9 * 0x4000; + uVar9 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); + uVar10 = GHIDRA_UINT(lVar2) >> 0x12 | uVar9 * 0x4000; pvVar8 = (void *)(((uVar9 >> 0x12) - *(int *)((char *)local_78.y + 0x34c)) - - (uint)(uVar10 < *(uint *)((char *)local_78.y + 0x348))); + GHIDRA_UINT((uVar10 < *(uint *)((char *)local_78.y + 0x348)))); if ((pvVar8 != (void *)0x0) || (999 < uVar10 - *(uint *)((char *)local_78.y + 0x348))) { iVar7 = *(int *)&g_manager->_lobbySettings; local_78.y = (float)pvVar8; @@ -1030,7 +1030,7 @@ LAB_008ddd97: local_78.y = originY + local_30[1]; loadingText = string_table_translate(&g_manager->_stringTable,(byte *)"#LOADING"); ((Font *)(font))->Font::DrawString(loadingText,&local_78,(Vector *)(local_30 + 4), - (KColor *)((int)this + 0x374),&local_60); + (KColor *)(GHIDRA_INT(this) + 0x374),&local_60); local_14 = 0xffffffff; } LAB_008de313: @@ -1040,14 +1040,14 @@ LAB_008de313: } else { nullFrame = AnimationState::GetNullFrame - ((AnimationState *)((int)this + 0x38),(byte *)"Password Position"); + ((AnimationState *)(GHIDRA_INT(this) + 0x38),(byte *)"Password Position"); } local_78.x = *nullFrame + originX; local_78.y = nullFrame[1] + originY; lobby_password_render(&(g_manager->_lobbySettings)._password,&local_78,1.0); } if (*(char *)((char *)this + 0x4ac) != '\0') { - render_player_slots((void *)((int)this + 0x388)); + render_player_slots((void *)(GHIDRA_INT(this) + 0x388)); } ExceptionList = local_1c; return; @@ -1102,7 +1102,7 @@ void Menu_OnlineLobby::render_lobby_list() local_14 = 0xffffffff; puStack_18 = &LAB_00b062d5; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(countText + 0x98); + local_24 = __security_cookie ^ GHIDRA_UINT((countText + 0x98)); ExceptionList = &local_1c; cursorX = (g_menuManager->_ViewPosition).x + *(float *)cursorAnim; local_bc = (g_menuManager->_ViewPosition).y + *(float *)((char *)cursorAnim + 4); @@ -1112,16 +1112,16 @@ void Menu_OnlineLobby::render_lobby_list() puStack_20 = countText + 0xa4; } else { - local_b0 = ((AnimationState *)((AnimationState *)((int)cursorAnim + 0x38)))->AnimationState::GetNullFrame((byte *)"Loading"); + local_b0 = ((AnimationState *)((AnimationState *)(GHIDRA_INT(cursorAnim) + 0x38)))->AnimationState::GetNullFrame((byte *)"Loading"); if (*(int *)((char *)cursorAnim + 0x3c) == 0) { pfVar1 = (float *)0x0; } else { pfVar1 = AnimationState::GetNullFrame - ((AnimationState *)((int)cursorAnim + 0x38),(byte *)"LobbyList"); + ((AnimationState *)(GHIDRA_INT(cursorAnim) + 0x38),(byte *)"LobbyList"); } } - if ((uint)(*(int *)((char *)cursorAnim + 0x354) - *(int *)((char *)cursorAnim + 0x350)) < 0x20) { + if (GHIDRA_UINT((*(int *)((char *)cursorAnim + 0x354) - *(int *)((char *)cursorAnim + 0x350))) < 0x20) { drawParams = 1; local_d4 = 0xffff; local_d0._red = 0.0; @@ -1134,7 +1134,7 @@ void Menu_OnlineLobby::render_lobby_list() textPos.x = cursorX + *local_b0; textPos.y = local_bc + local_b0[1]; text = string_table_translate(&g_manager->_stringTable,(byte *)"#Online/NO_FRIEND_LOBBIES"); - ((Font *)(font))->Font::DrawString(text,&textPos,(Vector *)(local_b0 + 4),(KColor *)((int)cursorAnim + 0x374), + ((Font *)(font))->Font::DrawString(text,&textPos,(Vector *)(local_b0 + 4),(KColor *)(GHIDRA_INT(cursorAnim) + 0x374), &drawParams); } else { @@ -1146,7 +1146,7 @@ void Menu_OnlineLobby::render_lobby_list() cursorX = drawPos.x; do { pfVar1 = local_b0; - if ((uint)(*(int *)((char *)cursorAnim + 0x354) - *(int *)((char *)cursorAnim + 0x350) >> 5) <= (uint)local_bc) + if (GHIDRA_UINT((*(int *)((char *)cursorAnim + 0x354) - *(int *)((char *)cursorAnim + 0x350) >> 5)) <= GHIDRA_UINT(local_bc)) { ExceptionList = local_1c; return; @@ -1156,20 +1156,20 @@ void Menu_OnlineLobby::render_lobby_list() entryLobbyRefCount = (int *)0x0; local_14 = 1; std::shared_ptr::assign - (&entryLobby,(void *)(*(int *)((char *)cursorAnim + 0x350) + 0xc + (int)local_b0)); + (&entryLobby,(void *)(*(int *)((char *)cursorAnim + 0x350) + 0xc + GHIDRA_INT(local_b0))); local_14 = 2; rowStartX = cursorX; if (row == *(int *)((char *)cursorAnim + 0x36c)) { if (*(char *)((char *)cursorAnim + 0x225) != '\0') { if (*(char *)((char *)cursorAnim + 0x18c) == '\0') { AnimationState::Render - ((AnimationState *)((int)cursorAnim + 0x14c),&drawPos,&g_vectorZero,&g_vectorZero); - cursorAnim = (AnimationState *)((int)cursorAnim + 0x16c); + ((AnimationState *)(GHIDRA_INT(cursorAnim) + 0x14c),&drawPos,&g_vectorZero,&g_vectorZero); + cursorAnim = (AnimationState *)(GHIDRA_INT(cursorAnim) + 0x16c); } else { AnimationState::Render - ((AnimationState *)((int)cursorAnim + 0x16c),&drawPos,&g_vectorZero,&g_vectorZero); - cursorAnim = (AnimationState *)((int)cursorAnim + 0x14c); + ((AnimationState *)(GHIDRA_INT(cursorAnim) + 0x16c),&drawPos,&g_vectorZero,&g_vectorZero); + cursorAnim = (AnimationState *)(GHIDRA_INT(cursorAnim) + 0x14c); } AnimationState::Render(cursorAnim,&drawPos,&g_vectorZero,&g_vectorZero); cursorX = drawPos.x; @@ -1179,9 +1179,9 @@ void Menu_OnlineLobby::render_lobby_list() lobbyHandleVtable = KAGE::Network::Multiplayer::ConstLobby::vftable; lobby = (void *)0x0; lobbyRefCount = (void *)0x0; - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; ((std::shared_ptr *)(auStack_182 + -10))->std::shared_ptr::assign(&entryLobby); - local_14 = CONCAT31(local_14._1_3_,2); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); ::render_lobby_info(cursorAnim,lobbyHandleVtable,lobby,lobbyRefCount); } drawPos.y = drawPos.y - 2.0; @@ -1194,28 +1194,28 @@ void Menu_OnlineLobby::render_lobby_list() render_quad_set_uniform_color (avatarQuad,cursorX,drawPos.y + 4.0,cursorX + 12.0,drawPos.y + 12.0 + 4.0,&local_d0) ; - iVar2 = *(int *)(*(int *)((char *)cursorAnim + 0x350) + 4 + (int)pfVar1); + iVar2 = *(int *)(*(int *)((char *)cursorAnim + 0x350) + 4 + GHIDRA_INT(pfVar1)); if ((iVar2 == 0) || (other = (int *)(iVar2 + 0x14), *other == 0)) { other = (int *)&DAT_00c799d8; } ((KAGE::SmartPointer *)(&avatarImage))->KAGE::SmartPointer::operator_assign(other); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; (**(code **)(*avatarImage + 0x1c))(); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; if (((avatarImageRefCount != (int *)0x0) && (isLastRef = (**(code **)(*avatarImageRefCount + 0xc))(), isLastRef != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(); } - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; drawPos.x = cursorX + 16.0; font = &g_manager->_font1_TeamMeatEx10; - iVar2 = *(int *)(*(int *)((char *)cursorAnim + 0x350) + (int)local_b0 + 4); + iVar2 = *(int *)(*(int *)((char *)cursorAnim + 0x350) + GHIDRA_INT(local_b0) + 4); if (iVar2 == 0) { zeroUserId = 0; - zeroUserId._4_4_ = 0; - zeroUserId._0_4_ = 0; - userIdHigh = zeroUserId._4_4_; + (*(undefined4 *)((char *)&(zeroUserId) + 0x4)) = 0; + (*(undefined4 *)((char *)&(zeroUserId) + 0x0)) = 0; + userIdHigh = (*(undefined4 *)((char *)&(zeroUserId) + 0x4)); userIdLow = (undefined4)zeroUserId; } else { @@ -1231,9 +1231,9 @@ void Menu_OnlineLobby::render_lobby_list() local_d0._blue = -NAN; local_d0._alpha = 0.0; local_d0._unk = 0; - local_14._0_1_ = 6; - ((Font *)(font))->Font::DrawStringScaled(text,&drawPos,(KColor *)((int)cursorAnim + 0x374),&drawParams); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; + ((Font *)(font))->Font::DrawStringScaled(text,&drawPos,(KColor *)(GHIDRA_INT(cursorAnim) + 0x374),&drawParams); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; drawPos.x = cursorX + 85.0; cursorX = drawPos.x; if (entryLobby != (int *)0x0) { @@ -1247,11 +1247,11 @@ void Menu_OnlineLobby::render_lobby_list() local_d0._blue = -NAN; local_d0._alpha = 0.0; local_d0._unk = 0; - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; Font::DrawStringScaled - (&g_manager->_font1_TeamMeatEx10,countText,&drawPos,(KColor *)((int)cursorAnim + 0x374), + (&g_manager->_font1_TeamMeatEx10,countText,&drawPos,(KColor *)(GHIDRA_INT(cursorAnim) + 0x374), &drawParams); - local_14 = CONCAT31(local_14._1_3_,2); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); cursorX = cursorX + 35.0; iVar2 = (g_manager->_optionsConfig)._eosCrossplay; if ((iVar2 == 2) || (iVar2 == 3)) { @@ -1282,9 +1282,9 @@ void Menu_OnlineLobby::render_lobby_list() (*g_lobbyReleaseFn)(); } row = row + 1; - local_bc = (float)((int)local_bc + 1); - local_b0 = (float *)((int)local_b0 + 0x20); - } while ((uint)row < 9); + local_bc = (float)(GHIDRA_INT(local_bc) + 1); + local_b0 = (float *)(GHIDRA_INT(local_b0) + 0x20); + } while (GHIDRA_UINT(row) < 9); } ExceptionList = local_1c; return; @@ -1306,15 +1306,15 @@ void Menu_OnlineLobby::unload_graphics() puStack_c = &LAB_00b05a30; local_10 = ExceptionList; ExceptionList = &local_10; - ((ANM2 *)((ANM2 *)((int)this + 0x10)))->ANM2::Reset(); - spriteCursor = (undefined4 *)((int)this + 0x14c); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x10)))->ANM2::Reset(); + spriteCursor = (undefined4 *)(GHIDRA_INT(this) + 0x14c); remaining = 3; do { if (spriteCursor[-6] != 0) { AnmCache::RemoveRef((std_string *)(spriteCursor + -10)); } strBuf = spriteCursor + -10; - if (0xf < (uint)spriteCursor[-5]) { + if (0xf < GHIDRA_UINT(spriteCursor[-5])) { strBuf = (undefined4 *)*strBuf; } spriteCursor[-6] = 0; @@ -1322,7 +1322,7 @@ void Menu_OnlineLobby::unload_graphics() ((AnimationState *)((AnimationState *)(spriteCursor + 2)))->AnimationState::SetAnimationData((void *)0x0); ((AnimationState *)((AnimationState *)(spriteCursor + 10)))->AnimationState::SetAnimationData((void *)0x0); strBuf = spriteCursor + -4; - if (0xf < (uint)spriteCursor[1]) { + if (0xf < GHIDRA_UINT(spriteCursor[1])) { strBuf = (undefined4 *)*strBuf; } *spriteCursor = 0; @@ -1331,7 +1331,7 @@ void Menu_OnlineLobby::unload_graphics() spriteCursor[0x13] = 0; spriteCursor[0x14] = 0; if (layerStates != (void *)0x0) { - ptr = (uint *)((int)layerStates + -4); + ptr = (uint *)(GHIDRA_INT(layerStates) + -4); local_8 = 0; _eh_vector_destructor_iterator_(layerStates,0xa0,*ptr,LayerState::~LayerState); operator_delete(ptr,*ptr * 0xa0 + 4); @@ -1407,11 +1407,11 @@ void Menu_OnlineLobby::load_graphics() int animLayers; int gameMode; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00af79f5; local_1c = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 0x10U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; lobbyAnmPath._size = 0; lobbyAnmPath._capacity = 0xf; @@ -1420,20 +1420,20 @@ void Menu_OnlineLobby::load_graphics() lobbyAnmPath._buf[2] = '\0'; lobbyAnmPath._buf[3] = '\0'; securityCookie = uVar2; - lobbyAnmPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(lobbyAnmPath._buf) + 0x0)) = std::_Allocate(0x30); lobbyAnmPath._size = 0x21; lobbyAnmPath._capacity = 0x2f; - builtin_strncpy((char *)lobbyAnmPath._buf._0_4_,"gfx/ui/main menu/OnlineLobby.anm2",0x22); + builtin_strncpy((*(undefined4 *)((char *)&((char *)lobbyAnmPath._buf) + 0x0)),"gfx/ui/main menu/OnlineLobby.anm2",0x22); local_14 = 0; ((ANM2 *)((ANM2 *)(in_ECX + 0x10)))->ANM2::Load(&lobbyAnmPath,1); local_14 = 0xffffffff; if (0xf < lobbyAnmPath._capacity) { size = lobbyAnmPath._capacity + 1; - pcVar3 = (char *)lobbyAnmPath._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)lobbyAnmPath._buf) + 0x0)); if (0xfff < size) { - pcVar3 = *(char **)(lobbyAnmPath._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(lobbyAnmPath._buf) + 0x0)) + -4); size = lobbyAnmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(lobbyAnmPath._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(lobbyAnmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { LAB_008e803b: local_14 = 0xffffffff; /* WARNING: Subroutine does not return */ @@ -1447,7 +1447,7 @@ LAB_008e803b: if (*(int *)(in_ECX + 0x44) != 0) { if (*(int *)(*(int *)(in_ECX + 0x40) + 0x80) < 0xd) { KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"); - if (*(int *)((int)((AnimationState *)(in_ECX + 0x40))->_animation + 0x80) < 0xd) + if (*(int *)(GHIDRA_INT(((AnimationState *)(in_ECX + 0x40))->_animation) + 0x80) < 0xd) goto LAB_008e80ce; } animLayers = *(int *)(in_ECX + 0x44); @@ -1468,20 +1468,20 @@ LAB_008e80ce: playerInfoAnmPath._buf[1] = '\0'; playerInfoAnmPath._buf[2] = '\0'; playerInfoAnmPath._buf[3] = '\0'; - playerInfoAnmPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(playerInfoAnmPath._buf) + 0x0)) = std::_Allocate(0x30); playerInfoAnmPath._size = 0x21; playerInfoAnmPath._capacity = 0x2f; - builtin_strncpy((char *)playerInfoAnmPath._buf._0_4_,"gfx/ui/main menu/OnlineLobby.anm2",0x22); + builtin_strncpy((*(undefined4 *)((char *)&((char *)playerInfoAnmPath._buf) + 0x0)),"gfx/ui/main menu/OnlineLobby.anm2",0x22); local_14 = 1; ((ANM2 *)((ANM2 *)(playerInfoAnim + -0xd)))->ANM2::Load(&playerInfoAnmPath,1); local_14 = 0xffffffff; if (0xf < playerInfoAnmPath._capacity) { uVar2 = playerInfoAnmPath._capacity + 1; - pcVar3 = (char *)playerInfoAnmPath._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)playerInfoAnmPath._buf) + 0x0)); if (0xfff < uVar2) { - pcVar3 = *(char **)(playerInfoAnmPath._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(playerInfoAnmPath._buf) + 0x0)) + -4); uVar2 = playerInfoAnmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(playerInfoAnmPath._buf._0_4_ + (-4 - (int)pcVar3))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(playerInfoAnmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) goto LAB_008e803b; } operator_delete(pcVar3,uVar2); @@ -1489,7 +1489,7 @@ LAB_008e80ce: animData = (byte *)*playerInfoAnim; playerInfoAnmPath._size = 0; playerInfoAnmPath._capacity = 0xf; - playerInfoAnmPath._buf._0_4_ = playerInfoAnmPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(playerInfoAnmPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(playerInfoAnmPath._buf) + 0x0)) & 0xffffff00; if (animData == (byte *)0x0) { LAB_008e81e3: bVar1 = ((ANM2 *)((ANM2 *)(playerInfoAnim + -0xd)))->ANM2::SetAnimation((byte *)"PlayerInfo",1); @@ -1509,7 +1509,7 @@ LAB_008e81e3: isLess = bVar1 < (byte)*pcVar3; if (bVar1 != *pcVar3) { LAB_008e81d0: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_008e81d5; } if (bVar1 == 0) break; @@ -1586,7 +1586,7 @@ void Menu_OnlineLobby::Update() local_14 = 0xffffffff; puStack_18 = &LAB_00b06d7a; local_1c = ExceptionList; - uVar6 = __security_cookie ^ (uint)(serverTimeBuf + 0x50); + uVar6 = __security_cookie ^ GHIDRA_UINT((serverTimeBuf + 0x50)); ExceptionList = &local_1c; local_80.y = (float)in_ECX; local_24 = uVar6; @@ -1650,16 +1650,16 @@ LAB_008e82fe: ((Multiplayer *)(&DAT_00c79a50))->Multiplayer::get_lobby(lobbyRef); local_14 = 3; uVar7 = FUN_00a286f0(); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; FUN_00a29fd0(&connection,uVar7); local_98 = KAGE::System::UserProfileBase::vftable; - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; ((KAGE::Network::Multiplayer::ConstLobby *)(lobbyRef))->KAGE::Network::Multiplayer::ConstLobby::~ConstLobby(); lVar4 = CONCAT44(local_88,local_68); if (in_ECX[0x1a4] == 0xffffffff) { nowNs = GetTimeNs(); in_ECX = (uint *)local_80.y; - uVar6 = (uint)(nowNs >> 0x20); + uVar6 = GHIDRA_UINT((nowNs >> 0x20)); uVar1 = (nowNs & 0xffffffff) * 0xd7b634db; local_90 = (undefined **)uVar1; lVar2 = (nowNs & 0xffffffff) * 0x431bde82; @@ -1668,18 +1668,18 @@ LAB_008e82fe: local_74[0] = (uint *)((ulonglong)lVar3 >> 0x20); lVar4 = (ulonglong)uVar6 * 0x431bde82; local_88 = (uint *)((ulonglong)lVar4 >> 0x20); - local_68 = (int)lVar4; + local_68 = GHIDRA_INT(lVar4); uVar1 = lVar3 + (uVar1 >> 0x20); - uVar9 = (uint)(uVar1 >> 0x20); + uVar9 = GHIDRA_UINT((uVar1 >> 0x20)); lVar2 = lVar2 + (uVar1 & 0xffffffff); local_78 = (undefined4)lVar2; - uVar6 = (uint)((ulonglong)lVar2 >> 0x20); + uVar6 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); lVar2 = lVar4 + (ulonglong)CONCAT14(CARRY4(uVar9,uVar6),uVar9 + uVar6); - uVar9 = (uint)((ulonglong)lVar2 >> 0x20); - uVar11 = (uint)lVar2 >> 0x12 | uVar9 * 0x4000; + uVar9 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); + uVar11 = GHIDRA_UINT(lVar2) >> 0x12 | uVar9 * 0x4000; uVar6 = *(uint *)local_80.y; local_80.y = (float)(((uVar9 >> 0x12) - *(uint *)((char *)local_80.y + 4)) - - (uint)(uVar11 < *(uint *)local_80.y)); + GHIDRA_UINT((uVar11 < *(uint *)local_80.y))); if ((((uint *)local_80.y != (uint *)0x0) || (10000 < uVar11 - uVar6)) && ((connection != 0 && (*(int *)(connection + 0x20) == 0 && *(int *)(connection + 0x24) == 0))) ) { @@ -1687,7 +1687,7 @@ LAB_008e82fe: local_80.y = (float)&DAT_bf800000; MessagePopup::MessagePopup (popup,&g_manager->_font2_TeamMeatEx12,(void *)0x0,(void *)0x0,&local_80); - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; MessagePopup::add_ok_button((byte *)"##GAME###Online/NO_CONNECTION_TO_HOST",popup); iVar8 = 0x8e8529; uVar6 = ((PopupQueue *)(&(*(undefined1 *)((char *)&(g_manager[1]._gamestate) + 0xcf0))))->PopupQueue::push(popup); @@ -1699,13 +1699,13 @@ LAB_008e82fe: netplay_leave_lobby(&g_manager->_netplayManager,iVar8,unused2); ((NetplayManager *)(&g_manager->_netplayManager))->NetplayManager::reset(1); init_lobby_view(in_ECX); - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; FUN_00420710(); lVar4 = CONCAT44(local_88,local_68); } } local_88 = (uint *)((ulonglong)lVar4 >> 0x20); - local_68 = (int)lVar4; + local_68 = GHIDRA_INT(lVar4); cVar5 = FUN_009c3990(); isChatClosed = cVar5 == '\0'; local_68 = (g_manager->_lobbySettings)._gameMode; @@ -1733,12 +1733,12 @@ LAB_008e85f9: animState = (AnimationState *)(in_ECX + 0x55); local_74[0] = (void *)0x3; do { - if (*(char *)((int)&animState[6]._currentlyTriggeredEvents + 1) != '\0') { + if (*(char *)(GHIDRA_INT(&animState[6]._currentlyTriggeredEvents) + 1) != '\0') { ((AnimationState *)(animState))->AnimationState::Update(); ((AnimationState *)(animState + 1))->AnimationState::Update(); } animState = (AnimationState *)&animState[8]._isPlaying; - local_74[0] = (uint *)((int)local_74[0] + -1); + local_74[0] = (uint *)(GHIDRA_INT(local_74[0]) + -1); } while (local_74[0] != (void *)0x0); } puVar12 = in_ECX + 0x1a5; @@ -1762,10 +1762,10 @@ LAB_008e85f9: LAB_008e872d: FUN_00949bc0(); if ((local_74[0] != (void *)0x0) && - (((uint *)(uint)*(byte *)((int)local_74[0] + 8) != (uint *)local_80.y || - (*(char *)((int)local_74[0] + 9) != local_62)))) { - *(char *)((int)local_74[0] + 8) = SUB41(local_80.y,0); - *(char *)((int)local_74[0] + 9) = local_62; + (((uint *)GHIDRA_UINT(*(byte *)(GHIDRA_INT(local_74[0]) + 8)) != (uint *)local_80.y || + (*(char *)(GHIDRA_INT(local_74[0]) + 9) != local_62)))) { + *(char *)(GHIDRA_INT(local_74[0]) + 8) = SUB41(local_80.y,0); + *(char *)(GHIDRA_INT(local_74[0]) + 9) = local_62; iVar8 = online_lobby_find_member_index(local_74[0]); load_member_sprite(in_ECX,iVar8); FUN_008ee3b0(); @@ -1795,12 +1795,12 @@ LAB_008e872d: uVar6 = Random(); local_88 = (uint *)(uVar6 & 3); puVar12 = (uint *)0x0; - local_80.y = (float)((int)local_88 + 1); + local_80.y = (float)(GHIDRA_INT(local_88) + 1); if ((uint *)local_80.y != (uint *)0x0) { do { change_character(in_ECX,1,puVar12 == local_88); - puVar12 = (uint *)((int)puVar12 + 1); - } while (puVar12 < (uint)local_80.y); + puVar12 = (uint *)(GHIDRA_INT(puVar12) + 1); + } while (puVar12 < GHIDRA_UINT(local_80.y)); } localMember = lobby_member_map_get_or_add(in_ECX + 0x1a5,(ulonglong *)(in_ECX + 0x1a8)); if (*(char *)((char *)localMember + 8) == '\0') { @@ -1838,7 +1838,7 @@ LAB_008e8854: local_90 = KAGE::Network::Multiplayer::ConstLobby::vftable; lobby = 0; local_88 = (uint *)0x0; - local_14._0_1_ = 9; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; ((std::shared_ptr *)(&lobby))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); if (lobby == 0) { iVar8 = 0; @@ -1847,22 +1847,22 @@ LAB_008e8854: iVar8 = *(int *)(lobby + 0x14) - *(int *)(lobby + 0x10) >> 3; } local_90 = KAGE::Network::Multiplayer::ConstLobby::vftable; - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; if (((local_88 != (uint *)0x0) && (cVar5 = (**(code **)(*local_88 + 0xc))(), cVar5 != '\0')) && (g_lobbyReleaseFn != (void *)0x0)) { (*g_lobbyReleaseFn)(); } - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; if (iVar8 == 1) { local_80.x = (float)&DAT_bf800000; local_80.y = (float)&DAT_bf800000; MessagePopup::MessagePopup (popup,&g_manager->_font2_TeamMeatEx12,(void *)0x0,(void *)0x0,&local_80); - local_14._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; MessagePopup::add_ok_button((byte *)"##GAME###Online/MATCH_ENDED",popup); uVar6 = ((PopupQueue *)(&(*(undefined1 *)((char *)&(g_manager[1]._gamestate) + 0xcf0))))->PopupQueue::push(popup); in_ECX[0x1a3] = uVar6; - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; FUN_00420710(); } } @@ -1873,7 +1873,7 @@ LAB_008e8854: iVar8 = date_to_yyyymmdd((byte)*serverTime,serverTime[1],*(longlong *)(serverTime + 2), serverTime[4],serverTime[5],serverTime[6],serverTime[7],serverTime[8], serverTime[9],serverTime[10],serverTime[0xb], - (int)*(undefined8 *)(serverTime + 0xc)); + GHIDRA_INT(*(undefined8 *)(serverTime + 0xc))); if ((g_manager->_dailyChallenge)._id != iVar8) { daily_challenge_refresh(); } @@ -1958,11 +1958,11 @@ void Menu_OnlineLobby::init_lobby_view() Manager *manager; uint *memberMap; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b06e75; local_1c = ExceptionList; - uVar4 = __security_cookie ^ (int)register0x00000010 - 0x10U; + uVar4 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; local_40 = (undefined4 *)0x0; *(undefined4 *)((char *)this + 0x6b4) = 0; @@ -1980,7 +1980,7 @@ void Menu_OnlineLobby::init_lobby_view() *(undefined4 *)((char *)this + 0x950) = 0; local_44 = this; FUN_008ed090(uVar4); - puVar8 = (undefined4 *)((int)this + 0x158); + puVar8 = (undefined4 *)(GHIDRA_INT(this) + 0x158); index = 3; do { curAnimData = (byte *)*puVar8; @@ -2003,7 +2003,7 @@ LAB_008e9be8: isLess = bVar2 < (byte)*expectedAnimName; if (bVar2 != *expectedAnimName) { LAB_008e9bd5: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_008e9bda; } if (bVar2 == 0) break; @@ -2023,7 +2023,7 @@ LAB_008e9bda: index = index - 1; if (index == 0) { iVar1 = *(int *)((char *)local_44 + 0x694); - local_3c = (uint *)((int)local_44 + 0x694); + local_3c = (uint *)(GHIDRA_INT(local_44) + 0x694); FUN_008ef400(local_3c,*(undefined4 *)(iVar1 + 4)); *(int *)(iVar1 + 4) = iVar1; *(int *)iVar1 = iVar1; @@ -2045,17 +2045,17 @@ LAB_008e9bda: ((std::shared_ptr *)(&lobbyPtr))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); local_6c = KAGE::Network::Multiplayer::Lobby::vftable; puVar9 = (ulonglong *)0x0; - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; ((KAGE::Network::Multiplayer::Lobby *)(&local_6c))->KAGE::Network::Multiplayer::Lobby::get_members(&members,1); local_6c = KAGE::Network::Multiplayer::ConstLobby::vftable; - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; if (((lobbyRefCount != (int *)0x0) && (cVar3 = (**(code **)(*lobbyRefCount + 0xc))(), cVar3 != '\0')) && (g_lobbyReleaseFn != (void *)0x0)) { (*g_lobbyReleaseFn)(&lobbyPtr); } - local_14 = (uint)local_14._1_3_ << 8; - if (7 < (uint)(membersEnd - members)) { + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; + if (7 < GHIDRA_UINT((membersEnd - members))) { local_40 = (undefined4 *)(membersEnd - members >> 3); index = 0; if (local_40 != (undefined4 *)0x0) { @@ -2065,9 +2065,9 @@ LAB_008e9bda: iVar1 = *memberIter; if (iVar1 == 0) { local_50 = 0; - local_50._4_4_ = (undefined **)0x0; - local_50._0_4_ = (undefined **)0x0; - local_2c = (int)local_50._4_4_; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = (undefined **)0x0; + (*(undefined4 *)((char *)&(local_50) + 0x0)) = (undefined **)0x0; + local_2c = (*(undefined4 *)((char *)&(GHIDRA_INT(local_50)) + 0x4)); local_30 = (undefined **)local_50; } else { @@ -2076,7 +2076,7 @@ LAB_008e9bda: } profile = KAGE::System::UserProfileBase::vftable; ((UserProfile *)(&local_30))->UserProfile::find_or_create(); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; profile = KAGE::System::UserProfile::vftable; local_84 = extraout_EAX; if (((extraout_EAX != 0) && @@ -2086,13 +2086,13 @@ LAB_008e9bda: } local_80 = 1; local_7c = local_7c & 0xffffff00; - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; iVar1 = *memberIter; if (iVar1 == 0) { local_50 = 0; - local_50._4_4_ = (undefined **)0x0; - local_50._0_4_ = (undefined **)0x0; - memberIdHigh = local_50._4_4_; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = (undefined **)0x0; + (*(undefined4 *)((char *)&(local_50) + 0x0)) = (undefined **)0x0; + memberIdHigh = (*(undefined4 *)((char *)&(local_50) + 0x4)); memberIdLow = (undefined **)local_50; } else { @@ -2100,23 +2100,23 @@ LAB_008e9bda: memberIdLow = *(undefined4 *)(iVar1 + 8); } memberKey = CONCAT44(memberIdHigh,memberIdLow); - pvVar5 = lobby_member_map_get_or_add((undefined1 *)((int)lobbyMenu + 0x694),&memberKey); + pvVar5 = lobby_member_map_get_or_add((undefined1 *)(GHIDRA_INT(lobbyMenu) + 0x694),&memberKey); *(int *)((char *)pvVar5 + 4) = local_84; *(undefined1 *)((char *)pvVar5 + 8) = (undefined1)local_80; - *(undefined1 *)((char *)pvVar5 + 9) = local_80._1_1_; - *(undefined1 *)((char *)pvVar5 + 10) = local_80._2_1_; - *(undefined1 *)((char *)pvVar5 + 0xb) = local_80._3_1_; + *(undefined1 *)((char *)pvVar5 + 9) = (*(undefined1 *)((char *)&(local_80) + 0x1)); + *(undefined1 *)((char *)pvVar5 + 10) = (*(undefined1 *)((char *)&(local_80) + 0x2)); + *(undefined1 *)((char *)pvVar5 + 0xb) = (*(undefined1 *)((char *)&(local_80) + 0x3)); *(undefined1 *)((char *)pvVar5 + 0xc) = (undefined1)local_7c; - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; profile = KAGE::System::UserProfileBase::vftable; cVar3 = (**(code **)(memberIter[-1] + 0x14))(); if (cVar3 != '\0') { iVar1 = *memberIter; if (iVar1 == 0) { local_50 = 0; - local_50._4_4_ = (undefined **)0x0; - local_50._0_4_ = (undefined **)0x0; - memberIdHigh = local_50._4_4_; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = (undefined **)0x0; + (*(undefined4 *)((char *)&(local_50) + 0x0)) = (undefined **)0x0; + memberIdHigh = (*(undefined4 *)((char *)&(local_50) + 0x4)); memberIdLow = (undefined **)local_50; } else { @@ -2130,9 +2130,9 @@ LAB_008e9bda: iVar1 = *memberIter; if (iVar1 == 0) { local_50 = 0; - local_50._4_4_ = (undefined **)0x0; - local_50._0_4_ = (undefined **)0x0; - local_5c = local_50._4_4_; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = (undefined **)0x0; + (*(undefined4 *)((char *)&(local_50) + 0x0)) = (undefined **)0x0; + local_5c = (*(undefined4 *)((char *)&(local_50) + 0x4)); local_60 = (undefined **)local_50; } else { @@ -2140,7 +2140,7 @@ LAB_008e9bda: local_60 = *(undefined ***)(iVar1 + 8); } pvVar5 = lobby_member_map_get_or_add - ((undefined1 *)((int)lobbyMenu + 0x694),(ulonglong *)&local_60); + ((undefined1 *)(GHIDRA_INT(lobbyMenu) + 0x694),(ulonglong *)&local_60); *(byte *)((char *)pvVar5 + 9) = local_21; } memberIter = memberIter + 2; @@ -2152,17 +2152,17 @@ LAB_008e9bda: index = 0; local_40 = (g_manager->_lobbyMembers)._end; puVar8 = (g_manager->_lobbyMembers)._begin; - iVar1 = (int)local_40 - (int)puVar8 >> 0x1f; - if (((int)local_40 - (int)puVar8) / 0x14 + iVar1 != iVar1) { + iVar1 = GHIDRA_INT(local_40) - GHIDRA_INT(puVar8) >> 0x1f; + if ((GHIDRA_INT(local_40) - GHIDRA_INT(puVar8)) / 0x14 + iVar1 != iVar1) { local_2c = 0; do { iVar1 = *(int *)((char *)puVar8 + local_2c + 4); if (iVar1 == 0) { memberKey = 0; - memberKey._4_4_ = (uint *)0x0; - memberKey._0_4_ = 0; - local_3c = memberKey._4_4_; - local_40 = (undefined4 *)(uint)memberKey; + (*(undefined4 *)((char *)&(memberKey) + 0x4)) = (uint *)0x0; + (*(undefined4 *)((char *)&(memberKey) + 0x0)) = 0; + local_3c = (*(undefined4 *)((char *)&(memberKey) + 0x4)); + local_40 = (undefined4 *)GHIDRA_UINT(memberKey); } else { local_3c = *(uint **)(iVar1 + 0xc); @@ -2179,15 +2179,15 @@ LAB_008e9bda: local_40 = (undefined4 *)0x12; pvVar5 = lobby_member_map_get_or_add(memberMap,&local_50); manager = local_34; - FUN_00949bc0((int)pvVar5 + 9); + FUN_00949bc0(GHIDRA_INT(pvVar5) + 9); pvVar5 = lobby_member_map_get_or_add(memberMap,&local_50); - *(undefined1 *)((char *)pvVar5 + 8) = local_40._0_1_; + *(undefined1 *)((char *)pvVar5 + 8) = (*(undefined1 *)((char *)&(local_40) + 0x0)); puVar8 = (manager->_lobbyMembers)._begin; } index = index + 1; local_2c = local_2c + 0x14; local_40 = (local_34->_lobbyMembers)._end; - } while (index < (uint)(((int)local_40 - (int)puVar8) / 0x14)); + } while (index < GHIDRA_UINT(((GHIDRA_INT(local_40) - GHIDRA_INT(puVar8)) / 0x14))); lobbyMenu = local_44; } if (puVar8 != local_40) { @@ -2199,13 +2199,13 @@ LAB_008e9bda: } (local_34->_lobbyMembers)._end = puVar8; pvVar5 = lobby_member_map_get_or_add - ((undefined1 *)((int)lobbyMenu + 0x694),lobbyMenu + 0xd4); + ((undefined1 *)(GHIDRA_INT(lobbyMenu) + 0x694),lobbyMenu + 0xd4); FUN_008ee3b0(pvVar5); NetplayManager::store_local_persistent_game_data(); local_6c = KAGE::Network::Multiplayer::ConstLobby::vftable; lobbyPtr = (int *)0x0; lobbyRefCount = (int *)0x0; - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; ((std::shared_ptr *)(&lobbyPtr))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); if (lobbyPtr == (int *)0x0) { local_44 = (ulonglong *)0x0; @@ -2214,14 +2214,14 @@ LAB_008e9bda: local_44 = (ulonglong *)(lobbyPtr[5] - lobbyPtr[4] >> 3); } local_6c = KAGE::Network::Multiplayer::ConstLobby::vftable; - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; if (((lobbyRefCount != (int *)0x0) && (cVar3 = (**(code **)(*lobbyRefCount + 0xc))(), cVar3 != '\0')) && (g_lobbyReleaseFn != (void *)0x0)) { (*g_lobbyReleaseFn)(&lobbyPtr); } manager = g_manager; - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; puVar9 = (ulonglong *)0x0; if (local_44 != (ulonglong *)0x0) { local_40 = (undefined4 *)(**(code **)(*(int *)&(*(undefined1 *)((char *)&(g_manager[1]._gamestate) + 0x6c)) + 4))(); @@ -2238,19 +2238,19 @@ LAB_008e9bda: } messageRefCount = (void *)0x0; puVar8 = local_40; - NetConnection::send_message(g_multiplayerService,&local_50,1,pvVar5,(uint)local_40,0); + NetConnection::send_message(g_multiplayerService,&local_50,1,pvVar5,GHIDRA_UINT(local_40),0); manager = g_manager; local_44 = (ulonglong *)&DAT_0000003f; - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; FUN_008ef1d0(&local_50); ((NetplayManager *)(&manager->_netplayManager))->NetplayManager::send_message(1,puVar8,messageRefCount); - local_14._0_1_ = 9; - if (((local_50._4_4_ != (undefined **)0x0) && - (cVar3 = (**(code **)((int)*local_50._4_4_ + 0xc))(), cVar3 != '\0')) && + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; + if ((((*(undefined4 *)((char *)&(local_50) + 0x4)) != (undefined **)0x0) && + (cVar3 = (**(code **)(GHIDRA_INT(*(*(undefined4 *)((char *)&(local_50) + 0x4))) + 0xc))(), cVar3 != '\0')) && (g_multiplayerRelease != (void *)0x0)) { (*g_multiplayerRelease)(&local_50); } - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; puVar9 = local_44; } FUN_008ed320(); @@ -2259,23 +2259,23 @@ LAB_008e9bda: local_6c = KAGE::Network::Multiplayer::ConstLobby::vftable; lobbyPtr = (int *)0x0; lobbyRefCount = (int *)0x0; - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; ((std::shared_ptr *)(&lobbyPtr))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); local_6c = KAGE::Network::Multiplayer::Lobby::vftable; - local_14._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; if (lobbyPtr == (int *)0x0) { local_5c = 0; ownerProfile = &local_60; local_60 = KAGE::System::UserProfile::vftable; - uVar4 = (uint)puVar9 | 0x2c0; + uVar4 = GHIDRA_UINT(puVar9) | 0x2c0; } else { ownerProfile = (undefined ***)(**(code **)(*lobbyPtr + 0x20))(&local_60); - uVar4 = (uint)puVar9 | 0x1c0; + uVar4 = GHIDRA_UINT(puVar9) | 0x1c0; } - local_50 = CONCAT44(local_50._4_4_,KAGE::System::UserProfileBase::vftable); - local_50._4_4_ = ownerProfile[1]; - local_50._0_4_ = KAGE::System::UserProfile::vftable; + local_50 = CONCAT44((*(undefined4 *)((char *)&(local_50) + 0x4)),KAGE::System::UserProfileBase::vftable); + (*(undefined4 *)((char *)&(local_50) + 0x4)) = ownerProfile[1]; + (*(undefined4 *)((char *)&(local_50) + 0x0)) = KAGE::System::UserProfile::vftable; uVar6 = uVar4 & 0xfffffdff; if ((uVar4 & 0x200) == 0) { uVar6 = uVar4; @@ -2284,28 +2284,28 @@ LAB_008e9bda: if ((uVar6 & 0x100) == 0) { ppuVar7 = local_60; } - local_14._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; local_60 = ppuVar7; local_21 = ((KAGE::System::UserProfile *)(&local_50))->KAGE::System::UserProfile::is_local_user(); - local_50 = CONCAT44(local_50._4_4_,KAGE::System::UserProfileBase::vftable); + local_50 = CONCAT44((*(undefined4 *)((char *)&(local_50) + 0x4)),KAGE::System::UserProfileBase::vftable); local_6c = KAGE::Network::Multiplayer::ConstLobby::vftable; - local_14._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xd; if (((lobbyRefCount != (int *)0x0) && (cVar3 = (**(code **)(*lobbyRefCount + 0xc))(), cVar3 != '\0')) && (g_lobbyReleaseFn != (void *)0x0)) { (*g_lobbyReleaseFn)(&lobbyPtr); } - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (local_21 != 0) { ((KAGE::Network::Multiplayer::Lobby *)(&local_6c))->KAGE::Network::Multiplayer::Lobby::Lobby(&DAT_00c79a70); - local_14._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xe; FUN_00a2a970("current_stage",0); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; ((KAGE::Network::Multiplayer::ConstLobby *)(&local_6c))->KAGE::Network::Multiplayer::ConstLobby::~ConstLobby(); ((Multiplayer *)(&DAT_00c79a50))->Multiplayer::get_lobby(&local_84); - local_14._0_1_ = 0xf; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xf; FUN_00a2a970("current_stage_type",0); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; ((KAGE::Network::Multiplayer::ConstLobby *)(&local_84))->KAGE::Network::Multiplayer::ConstLobby::~ConstLobby(); } manager = g_manager; @@ -2372,7 +2372,7 @@ void Menu_OnlineLobby::handle_kicked() puStack_c = &LAB_00b06ef1; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(local_8c + 0x88); + uVar2 = __security_cookie ^ GHIDRA_UINT((local_8c + 0x88)); ExceptionList = &local_10; isLobbyCopyHeld = false; local_44 = ZEXT48((undefined **)local_44); @@ -2409,8 +2409,8 @@ LAB_008ea42a: *(undefined4 *)((char *)in_ECX + 0x954) = 0; *(undefined4 *)((char *)in_ECX + 0x958) = 0; historyEnd = (menuManager->_menuStateHistory)._end; - if (1 < (uint)((int)historyEnd - (int)(menuManager->_menuStateHistory)._begin >> 2)) { - historyEnd = (void *)((int)historyEnd + -4); + if (1 < GHIDRA_UINT((GHIDRA_INT(historyEnd) - GHIDRA_INT((menuManager->_menuStateHistory)._begin) >> 2))) { + historyEnd = (void *)(GHIDRA_INT(historyEnd) + -4); (menuManager->_menuStateHistory)._end = historyEnd; } ((MenuManager *)(menuManager))->MenuManager::SetState(*(int *)((char *)historyEnd + -4),0); @@ -2452,9 +2452,9 @@ LAB_008ea42a: local_8 = 7; if (kickedLobby == (undefined **)0x0) { local_44 = 0; - local_44._4_4_ = (int *)0x0; - local_44._0_4_ = (undefined **)0x0; - local_20.x = (float)local_44._4_4_; + (*(undefined4 *)((char *)&(local_44) + 0x4)) = (int *)0x0; + (*(undefined4 *)((char *)&(local_44) + 0x0)) = (undefined **)0x0; + local_20.x = (*(undefined4 *)((char *)&((float)local_44) + 0x4)); local_24 = (undefined **)local_44; } else { @@ -2478,7 +2478,7 @@ LAB_008ea42a: } } local_8 = 0xffffffff; - netplay_leave_lobby(&g_manager->_netplayManager,unused1,(int)key); + netplay_leave_lobby(&g_manager->_netplayManager,unused1,GHIDRA_INT(key)); ((NetplayManager *)(&g_manager->_netplayManager))->NetplayManager::reset(1); init_lobby_view(in_ECX); local_20.x = (float)&DAT_bf800000; @@ -2539,7 +2539,7 @@ void Menu_OnlineLobby::update_force_restart() local_8 = 0xffffffff; puStack_c = &LAB_00b06fa6; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(lobbyCheckHandle + 0x1c); + uVar1 = __security_cookie ^ GHIDRA_UINT((lobbyCheckHandle + 0x1c)); ExceptionList = &local_10; local_34 = 0; iVar5 = 0; @@ -2583,7 +2583,7 @@ void Menu_OnlineLobby::update_force_restart() tmpProfile = KAGE::System::UserProfileBase::vftable; } uVar4 = 0; - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); isLocalOwner = ((KAGE::System::UserProfile *)(&ownerProfile))->KAGE::System::UserProfile::is_local_user(); ownerProfile = KAGE::System::UserProfileBase::vftable; lobby = KAGE::Network::Multiplayer::ConstLobby::vftable; @@ -2687,7 +2687,7 @@ LAB_008eab31: nameEnd = nameNext; nameNext = nameEnd + 1; } while (*nameEnd != '\0'); - ((std::string *)((char *)leaderboardName))->std::string::assign(&DAT_00c7f490,(uint)(nameEnd + -0xc7f490)); + ((std::string *)((char *)leaderboardName))->std::string::assign(&DAT_00c7f490,GHIDRA_UINT((nameEnd + -0xc7f490))); local_8 = 7; pppppppbVar3 = (byte *******)leaderboardName; if (0xf < local_18) { @@ -2701,7 +2701,7 @@ LAB_008eab31: if (0xfff < uVar1) { pppppppbVar3 = (byte *******)leaderboardName[0][-1]; uVar1 = local_18 + 0x24; - if ((byte *)0x1f < (byte *)((int)leaderboardName[0] + (-4 - (int)pppppppbVar3))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(leaderboardName[0]) + (-4 - GHIDRA_INT(pppppppbVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2782,7 +2782,7 @@ void Menu_OnlineLobby::update_controls() puStack_20 = messageHeader + 0x3c; puStack_18 = &LAB_00b07039; local_1c = ExceptionList; - uVar4 = __security_cookie ^ (uint)(messageHeader + 0x30); + uVar4 = __security_cookie ^ GHIDRA_UINT((messageHeader + 0x30)); ExceptionList = &local_1c; local_28 = 0.0; lobby = KAGE::Network::Multiplayer::ConstLobby::vftable; @@ -2813,7 +2813,7 @@ void Menu_OnlineLobby::update_controls() local_50.x = (float)KAGE::System::UserProfileBase::vftable; } local_30 = (int *)(uVar4 | 0x20); - local_14 = CONCAT31(local_14._1_3_,2); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); isLocalUser = ((KAGE::System::UserProfile *)(&userProfile))->KAGE::System::UserProfile::is_local_user(); userProfile = KAGE::System::UserProfileBase::vftable; lobby = KAGE::Network::Multiplayer::ConstLobby::vftable; @@ -2832,7 +2832,7 @@ void Menu_OnlineLobby::update_controls() cVar3 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a209e0,&local_28,0,0); if ((cVar3 != '\0') && (pvVar6 = lobby_member_map_get_or_add - ((void *)((int)this + 0x694),(ulonglong *)((int)this + 0x6a0)), + ((void *)(GHIDRA_INT(this) + 0x694),(ulonglong *)(GHIDRA_INT(this) + 0x6a0)), *(char *)((char *)pvVar6 + 8) == '\0')) { *(undefined4 *)((char *)this + 0x6b8) = 1; *(undefined4 *)((char *)this + 0x6bc) = 0; @@ -2875,7 +2875,7 @@ LAB_008eb094: ((std::shared_ptr *)(&local_38))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); lobby = KAGE::Network::Multiplayer::Lobby::vftable; local_14 = 6; - local_30 = (int *)((uint)local_30 | 0xc1); + local_30 = (int *)(GHIDRA_UINT(local_30) | 0xc1); local_28 = (float)local_30; if (local_38 == (int *)0x0) { bVar10 = false; @@ -2884,12 +2884,12 @@ LAB_008eb094: iVar7 = local_38[5]; iVar1 = local_38[4]; uVar4 = (**(code **)(*local_38 + 0x1c))(); - bVar10 = uVar4 <= (uint)(iVar7 - iVar1 >> 3); + bVar10 = uVar4 <= GHIDRA_UINT((iVar7 - iVar1 >> 3)); } local_21 = '\x01'; if (bVar10) goto LAB_008eb094; } - if (((uint)local_30 & 1) != 0) { + if ((GHIDRA_UINT(local_30) & 1) != 0) { lobby = KAGE::Network::Multiplayer::ConstLobby::vftable; local_14 = 7; if (((local_34 != (int *)0x0) && (cVar3 = (**(code **)(*local_34 + 0xc))(), cVar3 != '\0')) && @@ -2899,17 +2899,17 @@ LAB_008eb094: } local_14 = 0xffffffff; if (local_21 != '\0') { - ((InviteFriendsMenu *)((void *)((int)this + 0x6e4)))->InviteFriendsMenu::load_graphics(); + ((InviteFriendsMenu *)((void *)(GHIDRA_INT(this) + 0x6e4)))->InviteFriendsMenu::load_graphics(); } } else { pvVar6 = lobby_member_map_get_or_add - ((void *)((int)this + 0x694),(ulonglong *)((int)this + 0x6a0)); + ((void *)(GHIDRA_INT(this) + 0x694),(ulonglong *)(GHIDRA_INT(this) + 0x6a0)); bVar10 = *(char *)((char *)pvVar6 + 8) != '\0'; if (bVar10) { toggle_ready(this); } - *(uint *)((char *)this + 0x6b8) = (uint)!bVar10; + *(uint *)((char *)this + 0x6b8) = GHIDRA_UINT(!bVar10); *(undefined4 *)((char *)this + 0x6bc) = 0; } local_28 = 4.06377e-44; @@ -2920,7 +2920,7 @@ LAB_008eb094: *(bool *)((char *)this + 0x6c0) = *(char *)((char *)this + 0x6c0) == '\0'; } if (isCharacterChangeAllowed == '\0') goto LAB_008eb2be; - pvVar6 = lobby_member_map_get_or_add((void *)((int)this + 0x694),(ulonglong *)((int)this + 0x6a0)) + pvVar6 = lobby_member_map_get_or_add((void *)(GHIDRA_INT(this) + 0x694),(ulonglong *)(GHIDRA_INT(this) + 0x6a0)) ; if ((*(char *)((char *)pvVar6 + 10) != '\0') || (*(int *)((char *)this + 0x6b8) != 0)) goto LAB_008eb2be; @@ -2952,7 +2952,7 @@ LAB_008eb224: change_character(this,-1,1); *(int *)((char *)this + 0x6b4) = *(int *)((char *)this + 0x6b4) + 1; } - pvVar6 = lobby_member_map_get_or_add((void *)((int)this + 0x694),(ulonglong *)((int)this + 0x6a0)) + pvVar6 = lobby_member_map_get_or_add((void *)(GHIDRA_INT(this) + 0x694),(ulonglong *)(GHIDRA_INT(this) + 0x6a0)) ; local_28 = 3.50325e-44; cVar3 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a209e0,&local_28,0,0); @@ -3057,12 +3057,12 @@ LAB_008eb2be: cVar3 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a209e0,&local_28,0,0); piVar8 = local_30; if (cVar3 != '\0') { - *(int *)((char *)this + 0x950) = (*(int *)((char *)this + 0x950) + 1) % ((int)local_30 + 1); + *(int *)((char *)this + 0x950) = (*(int *)((char *)this + 0x950) + 1) % (GHIDRA_INT(local_30) + 1); } local_28 = 3.08286e-44; cVar3 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a209e0,&local_28,0,0); if (cVar3 != '\0') { - memberActionPtr = (int *)((int)this + 0x950); + memberActionPtr = (int *)(GHIDRA_INT(this) + 0x950); *memberActionPtr = *memberActionPtr + -1; piVar9 = (int *)*(int *)((char *)this + 0x950); if (*memberActionPtr < 0) { @@ -3166,7 +3166,7 @@ void Menu_OnlineLobby::start_game() local_14 = 0xffffffff; puStack_18 = &LAB_00b070a1; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)&(&lobbySettings)[1]._seed._size; + local_24 = __security_cookie ^ GHIDRA_UINT(&(&lobbySettings)[1]._seed._size); ExceptionList = &local_1c; *(undefined4 *)((char *)this + 0x958) = 0; *(undefined4 *)&(*(undefined1 *)((char *)&(manager[1]._gamestate) + 0x87c)) = 0x3f000000; @@ -3215,19 +3215,19 @@ void Menu_OnlineLobby::start_game() lobbyHandleVtable = KAGE::Network::Multiplayer::ConstLobby::vftable; lobby = (void *)0x0; lobbyRefCount = (void *)0x0; - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; ((std::shared_ptr *)(auStack_b2 + -10))->std::shared_ptr::assign(&local_a8._alpha); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; ((Menu_Save *)((Menu_Save *)&lobbySettings))->Menu_Save::select_save_slot(lobbyHandleVtable,lobby,lobbyRefCount); local_a8._blue = (float)KAGE::Network::Multiplayer::ConstLobby::vftable; - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; if ((int *)local_a8._unk != (int *)0x0) { cVar1 = (**(code **)(*(int *)local_a8._unk + 0xc))(); if ((cVar1 != '\0') && (g_lobbyReleaseFn != (void *)0x0)) { (*g_lobbyReleaseFn)(); } } - local_14 = CONCAT31(local_14._1_3_,3); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),3); manager->_rerunAvailable = isRerunAvailable; manager->_debugStart = 0; manager->_startingFromRerun = 0; @@ -3335,7 +3335,7 @@ LAB_008ebba9: isLess = bVar1 < *pbVar4; if (bVar1 != *pbVar4) { LAB_008ebb91: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_008ebb96; } if (bVar1 == 0) break; @@ -3398,7 +3398,7 @@ LAB_008ebce3: isLess = bVar1 < *pbVar5; if (bVar1 != *pbVar5) { LAB_008ebcd0: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_008ebcd5; } if (bVar1 == 0) break; @@ -3464,7 +3464,7 @@ void Menu_OnlineLobby::change_character(int step, byte isReloadSprite) Manager *manager; iVar1 = step; - user = lobby_member_map_get_or_add((void *)((int)this + 0x694),(ulonglong *)((int)this + 0x6a0)); + user = lobby_member_map_get_or_add((void *)(GHIDRA_INT(this) + 0x694),(ulonglong *)(GHIDRA_INT(this) + 0x6a0)); if (step == 0x3e9) { cVar4 = *(char *)((char *)user + 9); iVar2 = 0; @@ -3475,8 +3475,8 @@ void Menu_OnlineLobby::change_character(int step, byte isReloadSprite) isAvailable = Menu_Character_Entry::IsCharacterAvailable ((Menu_Character_Entry *) (&PTR_s_00_Random_00b24140 + - (iVar2 + (uint)*(byte *)((char *)user + 8)) * 6), - CONCAT31((int3)((uint)extraout_ECX >> 8),cVar4)); + (iVar2 + GHIDRA_UINT(*(byte *)((char *)user + 8))) * 6), + CONCAT31((int3)(GHIDRA_UINT(extraout_ECX) >> 8),cVar4)); manager = g_manager; soundId = 0x23b; seed_fart_sound_override(&soundId); @@ -3486,7 +3486,7 @@ void Menu_OnlineLobby::change_character(int step, byte isReloadSprite) } taintedOffset = 0; iVar2 = 0x12; - uVar3 = (uint)CONCAT11(*(undefined1 *)((char *)user + 8),*(undefined1 *)((char *)user + 8)); + uVar3 = GHIDRA_UINT(CONCAT11(*(undefined1 *)((char *)user + 8),*(undefined1 *)((char *)user + 8))); if (*(char *)((char *)user + 9) != '\0') { taintedOffset = 0x12; } @@ -3501,7 +3501,7 @@ void Menu_OnlineLobby::change_character(int step, byte isReloadSprite) } else if (0x11 < isAvailable) { *(undefined1 *)((char *)user + 8) = 0; - uVar3 = (uint)uVar5 << 8; + uVar3 = GHIDRA_UINT(uVar5) << 8; } isAvailable = Menu_Character_Entry::IsCharacterAvailable ((Menu_Character_Entry *) @@ -3574,7 +3574,7 @@ void Menu_OnlineLobby::load_member_sprite(void *lobby, int memberIndex) local_14 = (void *)0xffffffff; puStack_18 = &LAB_00b071c0; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(memberNumberText + 0xb); + local_24 = __security_cookie ^ GHIDRA_UINT((memberNumberText + 0xb)); ExceptionList = &local_1c; memberSprite = lobby_member_sprite_get(lobby,memberIndex); if (memberSprite == (ANM2 *)0x0) { @@ -3582,19 +3582,19 @@ void Menu_OnlineLobby::load_member_sprite(void *lobby, int memberIndex) return; } piStack_a4 = lobby_get_member_info(lobby,memberIndex); - pbVar6 = (byte *)((int)&local_88 + 1); + pbVar6 = (byte *)(GHIDRA_INT(&local_88) + 1); local_a0 = (PersistentGameData *)(memberIndex + 1); do { pbVar6 = pbVar6 + -1; - uVar5 = (uint)local_a0 / 10; + uVar5 = GHIDRA_UINT(local_a0) / 10; *pbVar6 = (char)local_a0 + (char)uVar5 * -10 + 0x30; local_a0 = (PersistentGameData *)uVar5; } while (uVar5 != 0); local_2c = 0; local_28 = 0xf; memberNumberText[0] = (void *)0x0; - if (pbVar6 != (byte *)((int)&local_88 + 1)) { - ((std::string *)((char *)memberNumberText))->std::string::assign(pbVar6,((int)&local_88 + 1) - (int)pbVar6); + if (pbVar6 != (byte *)(GHIDRA_INT(&local_88) + 1)) { + ((std::string *)((char *)memberNumberText))->std::string::assign(pbVar6,(GHIDRA_INT(&local_88) + 1) - GHIDRA_INT(pbVar6)); } builtin_strncpy(local_94,"Play",4); local_88 = 0xf; @@ -3603,46 +3603,46 @@ void Menu_OnlineLobby::load_member_sprite(void *lobby, int memberIndex) local_90 = 0x7265; local_8e = 0; local_14 = (void *)0x1; - ((std::string *)((char *)&pppppbStack_6c))->std::string::concat_move((int)piStack_a4,&local_9c,memberNumberText); - local_14._0_1_ = 2; + ((std::string *)((char *)&pppppbStack_6c))->std::string::concat_move(GHIDRA_INT(piStack_a4),&local_9c,memberNumberText); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; pppppbVar3 = (byte *****)&pppppbStack_6c; if (0xf < uStack_58) { pppppbVar3 = pppppbStack_6c; } if (*(int *)((char *)lobby + 0x44) != 0) { - ((AnimationState *)((AnimationState *)((int)lobby + 0x40)))->AnimationState::GetNullFrame((byte *)pppppbVar3); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(lobby) + 0x40)))->AnimationState::GetNullFrame((byte *)pppppbVar3); } - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (0xf < uStack_58) { uVar5 = uStack_58 + 1; pppppbVar3 = pppppbStack_6c; if (0xfff < uVar5) { pppppbVar3 = (byte *****)pppppbStack_6c[-1]; uVar5 = uStack_58 + 0x24; - if (0x1f < (uint)((int)pppppbStack_6c + (-4 - (int)pppppbVar3))) goto LAB_008ed547; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pppppbStack_6c) + (-4 - GHIDRA_INT(pppppbVar3))))) goto LAB_008ed547; } operator_delete(pppppbVar3,uVar5); } - local_14._0_1_ = 0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; if (0xf < local_88) { uVar5 = local_88 + 1; pvVar4 = (void *)local_9c; if (0xfff < uVar5) { - pvVar4 = *(void **)((int)(void *)local_9c + -4); + pvVar4 = *(void **)(GHIDRA_INT((void *)local_9c) + -4); uVar5 = local_88 + 0x24; - if (0x1f < (uint)((int)(void *)local_9c + (-4 - (int)pvVar4))) goto LAB_008ed547; + if (0x1f < GHIDRA_UINT((GHIDRA_INT((void *)local_9c) + (-4 - GHIDRA_INT(pvVar4))))) goto LAB_008ed547; } operator_delete(pvVar4,uVar5); } - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; if (0xf < local_28) { uVar5 = local_28 + 1; pvVar4 = memberNumberText[0]; if (0xfff < uVar5) { - pvVar4 = *(void **)((int)memberNumberText[0] + -4); + pvVar4 = *(void **)(GHIDRA_INT(memberNumberText[0]) + -4); uVar5 = local_28 + 0x24; - if (0x1f < (uint)((int)memberNumberText[0] + (-4 - (int)pvVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(memberNumberText[0]) + (-4 - GHIDRA_INT(pvVar4))))) { LAB_008ed547: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3674,33 +3674,33 @@ LAB_008ed547: } playerType = *(byte *)(piStack_a4 + 2); if (((memberSprite->_animState)._animData != (void *)0x0) && - ((2 < *(int *)((int)(memberSprite->_animState)._animation + 0x80) || + ((2 < *(int *)(GHIDRA_INT((memberSprite->_animState)._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 2 < *(int *)((int)(memberSprite->_animState)._animation + 0x80))))) { + 2 < *(int *)(GHIDRA_INT((memberSprite->_animState)._animation) + 0x80))))) { pvVar4 = (memberSprite->_animState)._animData; piStack_a4 = *(int **)((char *)pvVar4 + 0x40); if ((pvVar4 == (void *)0x0) || - (((int)piStack_a4 < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= (int)piStack_a4)))) { + ((GHIDRA_INT(piStack_a4) < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= GHIDRA_INT(piStack_a4))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(memberSprite->_animState)._layerFrames + (int)piStack_a4 * 4) = 0; + *(undefined4 *)(GHIDRA_INT((memberSprite->_animState)._layerFrames) + GHIDRA_INT(piStack_a4) * 4) = 0; AnimationState::AdvanceLayerPosition - (&memberSprite->_animState,(int)piStack_a4,(float)(iVar7 + (uint)playerType)); + (&memberSprite->_animState,GHIDRA_INT(piStack_a4),(float)(iVar7 + GHIDRA_UINT(playerType))); } cVar1 = *(char *)((char *)memberInfo + 10); if (((memberSprite->_animState)._animData != (void *)0x0) && - ((5 < *(int *)((int)(memberSprite->_animState)._animation + 0x80) || + ((5 < *(int *)(GHIDRA_INT((memberSprite->_animState)._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 5 < *(int *)((int)(memberSprite->_animState)._animation + 0x80))))) { + 5 < *(int *)(GHIDRA_INT((memberSprite->_animState)._animation) + 0x80))))) { pvVar4 = (memberSprite->_animState)._animData; piStack_a4 = *(int **)((char *)pvVar4 + 0x4c); if ((pvVar4 == (void *)0x0) || - (((int)piStack_a4 < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= (int)piStack_a4)))) { + ((GHIDRA_INT(piStack_a4) < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= GHIDRA_INT(piStack_a4))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(memberSprite->_animState)._layerFrames + (int)piStack_a4 * 4) = 0; + *(undefined4 *)(GHIDRA_INT((memberSprite->_animState)._layerFrames) + GHIDRA_INT(piStack_a4) * 4) = 0; AnimationState::AdvanceLayerPosition - (&memberSprite->_animState,(int)piStack_a4,(float)(cVar1 != '\0')); + (&memberSprite->_animState,GHIDRA_INT(piStack_a4),(float)(cVar1 != '\0')); } if ((char)memberInfo[2] != '\0') { iVar7 = memberInfo[1]; @@ -3747,7 +3747,7 @@ LAB_008ed547: else { local_a0 = &g_manager->_persistentGameData; } - uVar5 = (uint)*(byte *)(memberInfo + 2); + uVar5 = GHIDRA_UINT(*(byte *)(memberInfo + 2)); if (uVar5 < 0x12) { iVar7 = 0; if (*(char *)((char *)memberInfo + 9) != '\0') { @@ -3791,7 +3791,7 @@ LAB_008ed547: iVar2 = 4; } pbVar6 = *(byte **)((char *)markLayerIds + uVar5); - ((ANM2 *)(memberSprite))->ANM2::SetLayerFrame((int)pbVar6,iVar2); + ((ANM2 *)(memberSprite))->ANM2::SetLayerFrame(GHIDRA_INT(pbVar6),iVar2); layer = ((ANM2 *)(memberSprite))->ANM2::GetLayer(pbVar6); uVar5 = uVar5 + 4; layer->_visible = 1; @@ -3828,16 +3828,16 @@ void Menu_OnlineLobby::update_ready_state() undefined1 *puStack_18; undefined4 local_14; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b07245; local_1c = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 0x10U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; *(undefined1 *)((char *)this + 0x6a8) = 1; ownerProfile = 0; local_24 = **(int **)((char *)this + 0x694); - puVar1 = (undefined1 *)((int)register0x00000010 + -4); + puVar1 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); if ((int *)local_24 != *(int **)((char *)this + 0x694)) { do { if (*(char *)(local_24 + 0x22) == '\0') { @@ -3894,7 +3894,7 @@ void Menu_OnlineLobby::update_ready_state() local_48 = KAGE::System::UserProfileBase::vftable; } local_2c = KAGE::System::UserProfile::vftable; - local_14 = CONCAT31(local_14._1_3_,5); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),5); if (g_multiplayerService == (void *)0x0) { KAGE::SmartPointer::SmartPointer(0); } @@ -3909,7 +3909,7 @@ void Menu_OnlineLobby::update_ready_state() } ((NetworkManager *)(g_multiplayerService))->NetworkManager::get_peer(&peer,(ulonglong *)&peerId); } - local_14._0_1_ = 9; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; if (lobbyRefCount != (int *)0x0) { isLastRef = (**(code **)(*lobbyRefCount + 0xc))(); if ((isLastRef != '\0') && (g_lobbyReleaseFn != (void *)0x0)) { @@ -3925,9 +3925,9 @@ void Menu_OnlineLobby::update_ready_state() } local_54 = (int *)0x0; lobbyRefCount = (int *)0x0; - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; ((std::shared_ptr *)(&local_54))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); - local_14._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; if (local_54 == (int *)0x0) { uVar3 = 0; } @@ -3935,7 +3935,7 @@ void Menu_OnlineLobby::update_ready_state() uVar3 = (**(code **)(*local_54 + 0x3c))(); } *(undefined4 *)((char *)this + 0x6c4) = uVar3; - local_14 = CONCAT31(local_14._1_3_,0xc); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0xc); if (lobbyRefCount != (int *)0x0) { isLastRef = (**(code **)(*lobbyRefCount + 0xc))(); if ((isLastRef != '\0') && (g_lobbyReleaseFn != (void *)0x0)) { @@ -3948,13 +3948,13 @@ void Menu_OnlineLobby::update_ready_state() if ((ownerProfile < local_24) && (*(char *)((char *)this + 0x6c1) != '\0')) { local_54 = (int *)0x0; lobbyRefCount = (int *)0x0; - local_14._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xd; ((std::shared_ptr *)(&local_54))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); - local_14._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xe; if (local_54 != (int *)0x0) { (**(code **)(*local_54 + 0x38))(*(undefined4 *)((char *)this + 0x6c4)); } - local_14 = CONCAT31(local_14._1_3_,0xf); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0xf); if (lobbyRefCount != (int *)0x0) { isLastRef = (**(code **)(*lobbyRefCount + 0xc))(); if ((isLastRef != '\0') && (g_lobbyReleaseFn != (void *)0x0)) { @@ -3999,12 +3999,12 @@ void Menu_OnlineLobby::toggle_ready() code *listenerCallback; Manager *manager; - userId = (ulonglong *)((int)this + 0x6a0); - pvVar1 = lobby_member_map_get_or_add((void *)((int)this + 0x694),userId); + userId = (ulonglong *)(GHIDRA_INT(this) + 0x6a0); + pvVar1 = lobby_member_map_get_or_add((void *)(GHIDRA_INT(this) + 0x694),userId); isReady = *(char *)((char *)pvVar1 + 10); - pvVar1 = lobby_member_map_get_or_add((void *)((int)this + 0x694),userId); + pvVar1 = lobby_member_map_get_or_add((void *)(GHIDRA_INT(this) + 0x694),userId); *(bool *)((char *)pvVar1 + 10) = isReady == '\0'; - pvVar1 = (void *)((int)this + 0x694); + pvVar1 = (void *)(GHIDRA_INT(this) + 0x694); pvVar2 = lobby_member_map_get_or_add(pvVar1,userId); memberIndex = online_lobby_find_member_index(pvVar2); load_member_sprite(this,memberIndex); @@ -4059,7 +4059,7 @@ void Menu_OnlineLobby::leave_popup_callback(int *popupResult, void *lobbyMenu) local_8 = 0xffffffff; puStack_c = &LAB_00b07417; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; local_1c = ZEXT48((int *)local_1c); if (*popupResult != 1) { return; @@ -4068,8 +4068,8 @@ void Menu_OnlineLobby::leave_popup_callback(int *popupResult, void *lobbyMenu) *(undefined4 *)((char *)lobbyMenu + 0x954) = 0; *(undefined4 *)((char *)lobbyMenu + 0x958) = 0; menuStateHistoryEnd = (this->_menuStateHistory)._end; - if (1 < (uint)((int)menuStateHistoryEnd - (int)(this->_menuStateHistory)._begin >> 2)) { - menuStateHistoryEnd = (void *)((int)menuStateHistoryEnd + -4); + if (1 < GHIDRA_UINT((GHIDRA_INT(menuStateHistoryEnd) - GHIDRA_INT((this->_menuStateHistory)._begin) >> 2))) { + menuStateHistoryEnd = (void *)(GHIDRA_INT(menuStateHistoryEnd) + -4); (this->_menuStateHistory)._end = menuStateHistoryEnd; } this->MenuManager::SetState(*(int *)((char *)menuStateHistoryEnd + -4),0); @@ -4149,9 +4149,9 @@ LAB_008eea62: local_8 = 7; if (lobbyPtr == (int *)0x0) { local_1c = 0; - local_1c._4_4_ = 0; - local_1c._0_4_ = (int *)0x0; - lobbyIdHigh = local_1c._4_4_; + (*(undefined4 *)((char *)&(local_1c) + 0x4)) = 0; + (*(undefined4 *)((char *)&(local_1c) + 0x0)) = (int *)0x0; + lobbyIdHigh = (*(undefined4 *)((char *)&(local_1c) + 0x4)); lobbyIdLow = (int *)local_1c; } else { @@ -4174,7 +4174,7 @@ LAB_008eea62: } } local_8 = 0xffffffff; - netplay_leave_lobby(&g_manager->_netplayManager,unused1,(int)key); + netplay_leave_lobby(&g_manager->_netplayManager,unused1,GHIDRA_INT(key)); ((NetplayManager *)(&g_manager->_netplayManager))->NetplayManager::reset(1); init_lobby_view(lobbyMenu); persistentGameData = &g_manager->_persistentGameData; diff --git a/src/game/menu_online_lobby_list.cpp b/src/game/menu_online_lobby_list.cpp index 45b21d3..bdcc9f1 100644 --- a/src/game/menu_online_lobby_list.cpp +++ b/src/game/menu_online_lobby_list.cpp @@ -19,11 +19,11 @@ void Menu_OnlineLobbyList::load_graphics() undefined1 *puStack_18; undefined4 local_14; - ppvStack_20 = (void **)((int)&anm2Path + 0x50); + ppvStack_20 = (void **)(GHIDRA_INT(&anm2Path) + 0x50); local_14 = 0xffffffff; puStack_18 = &LAB_00b05bdd; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)&anm2Path + 0x44U; + local_24 = __security_cookie ^ GHIDRA_INT(&anm2Path) + 0x44U; ExceptionList = &local_1c; menuAnm2Path._size = 0; menuAnm2Path._capacity = 0xf; @@ -31,20 +31,20 @@ void Menu_OnlineLobbyList::load_graphics() menuAnm2Path._buf[1] = '\0'; menuAnm2Path._buf[2] = '\0'; menuAnm2Path._buf[3] = '\0'; - menuAnm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(menuAnm2Path._buf) + 0x0)) = std::_Allocate(0x30); menuAnm2Path._size = 0x23; menuAnm2Path._capacity = 0x2f; - builtin_strncpy((char *)menuAnm2Path._buf._0_4_,"gfx/ui/main menu/LobbyListMenu.anm2",0x24); + builtin_strncpy((*(undefined4 *)((char *)&((char *)menuAnm2Path._buf) + 0x0)),"gfx/ui/main menu/LobbyListMenu.anm2",0x24); local_14 = 0; - ((ANM2 *)((ANM2 *)((int)this + 8)))->ANM2::Load(&menuAnm2Path,1); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 8)))->ANM2::Load(&menuAnm2Path,1); local_14 = 0xffffffff; if (0xf < menuAnm2Path._capacity) { uVar4 = menuAnm2Path._capacity + 1; - pcVar3 = (char *)menuAnm2Path._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)menuAnm2Path._buf) + 0x0)); if (0xfff < uVar4) { - pcVar3 = *(char **)(menuAnm2Path._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(menuAnm2Path._buf) + 0x0)) + -4); uVar4 = menuAnm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(menuAnm2Path._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(menuAnm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -57,20 +57,20 @@ void Menu_OnlineLobbyList::load_graphics() menuAnm2Path._buf[1] = '\0'; menuAnm2Path._buf[2] = '\0'; menuAnm2Path._buf[3] = '\0'; - menuAnm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(menuAnm2Path._buf) + 0x0)) = std::_Allocate(0x30); menuAnm2Path._size = 0x23; menuAnm2Path._capacity = 0x2f; - builtin_strncpy((char *)menuAnm2Path._buf._0_4_,"gfx/ui/main menu/LobbyListMenu.anm2",0x24); + builtin_strncpy((*(undefined4 *)((char *)&((char *)menuAnm2Path._buf) + 0x0)),"gfx/ui/main menu/LobbyListMenu.anm2",0x24); local_14 = 1; - ((ANM2 *)((ANM2 *)((int)this + 0x11c)))->ANM2::Load(&menuAnm2Path,1); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x11c)))->ANM2::Load(&menuAnm2Path,1); local_14 = 0xffffffff; if (0xf < menuAnm2Path._capacity) { uVar4 = menuAnm2Path._capacity + 1; - pcVar3 = (char *)menuAnm2Path._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)menuAnm2Path._buf) + 0x0)); if (0xfff < uVar4) { - pcVar3 = *(char **)(menuAnm2Path._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(menuAnm2Path._buf) + 0x0)) + -4); uVar4 = menuAnm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(menuAnm2Path._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(menuAnm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -80,9 +80,9 @@ void Menu_OnlineLobbyList::load_graphics() pbVar1 = *(byte **)((char *)this + 0x3c); if (pbVar1 == (byte *)0x0) { LAB_008dcc49: - bVar2 = ((ANM2 *)((ANM2 *)((int)this + 8)))->ANM2::SetAnimation(s_Idle,1); + bVar2 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 8)))->ANM2::SetAnimation(s_Idle,1); if (bVar2 != 0) { - ((AnimationState *)((AnimationState *)((int)this + 0x38)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x38)))->AnimationState::Rewind(); *(undefined1 *)((char *)this + 0x4c) = 1; } } @@ -97,7 +97,7 @@ LAB_008dcc49: bVar5 = bVar2 < *idleNameCursor; if (bVar2 != *idleNameCursor) { LAB_008dcc36: - uVar4 = -(uint)bVar5 | 1; + uVar4 = -GHIDRA_UINT(bVar5) | 1; goto LAB_008dcc3b; } if (bVar2 == 0) break; @@ -124,7 +124,7 @@ LAB_008dcc3b: bVar5 = bVar2 < (byte)*pcVar3; if (bVar2 != *pcVar3) { LAB_008dcca3: - uVar4 = -(uint)bVar5 | 1; + uVar4 = -GHIDRA_UINT(bVar5) | 1; goto LAB_008dcca8; } if (bVar2 == 0) break; @@ -139,32 +139,32 @@ LAB_008dcca8: if ((uVar4 == 0) && ((pbVar1[0x34] == 0 || (*(char *)((char *)this + 0x160) != '\0')))) goto LAB_008dcce1; } - bVar2 = ((ANM2 *)((ANM2 *)((int)this + 0x11c)))->ANM2::SetAnimation((byte *)"Cursor",1); + bVar2 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x11c)))->ANM2::SetAnimation((byte *)"Cursor",1); if (bVar2 != 0) { - ((AnimationState *)((AnimationState *)((int)this + 0x14c)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x14c)))->AnimationState::Rewind(); *(undefined1 *)((char *)this + 0x160) = 1; } LAB_008dcce1: anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (void *)0x0; pbVar1 = *(byte **)((char *)this + 0x388); nameCursor = pbVar1; do { bVar2 = *nameCursor; nameCursor = nameCursor + 1; } while (bVar2 != 0); - ((std::string *)(anm2Path._buf))->std::string::assign(pbVar1,(int)nameCursor - (int)(pbVar1 + 1)); + ((std::string *)(anm2Path._buf))->std::string::assign(pbVar1,GHIDRA_INT(nameCursor) - GHIDRA_INT((pbVar1 + 1))); local_14 = 2; - ((ANM2 *)((ANM2 *)((int)this + 0x38c)))->ANM2::Load(&anm2Path,1); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x38c)))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar4 = anm2Path._capacity + 1; - ptr = (void *)anm2Path._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((void *)anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - ptr = *(void **)(anm2Path._buf._0_4_ + -4); + ptr = *(void **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar4 = anm2Path._capacity + 0x24; - if (0x1f < (uint)(anm2Path._buf._0_4_ + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -174,7 +174,7 @@ LAB_008dcce1: pbVar1 = *(byte **)((char *)this + 0x3c0); anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = anm2Path._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) & 0xffffff00; if (pbVar1 != (byte *)0x0) { nameCursor = pbVar1; if (0xf < *(uint *)(pbVar1 + 0x14)) { @@ -186,7 +186,7 @@ LAB_008dcce1: bVar5 = bVar2 < *idleNameCursor; if (bVar2 != *idleNameCursor) { LAB_008dcdc0: - uVar4 = -(uint)bVar5 | 1; + uVar4 = -GHIDRA_UINT(bVar5) | 1; goto LAB_008dcdc5; } if (bVar2 == 0) break; @@ -209,9 +209,9 @@ LAB_008dcdc5: } } } - bVar2 = ((ANM2 *)((ANM2 *)((int)this + 0x38c)))->ANM2::SetAnimation(s_Idle,1); + bVar2 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x38c)))->ANM2::SetAnimation(s_Idle,1); if (bVar2 != 0) { - ((AnimationState *)((AnimationState *)((int)this + 0x3bc)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x3bc)))->AnimationState::Rewind(); *(undefined1 *)((char *)this + 0x3d0) = 1; } ExceptionList = local_1c; @@ -259,8 +259,8 @@ void Menu_OnlineLobbyList::Update() return; } if (((g_manager->_framecount & 1) == 0) && (*(char *)((char *)menuManager + 0x111) != '\0')) { - ((AnimationState *)((AnimationState *)((int)menuManager + 0x38)))->AnimationState::Update(); - ((AnimationState *)((AnimationState *)((int)menuManager + 0x58)))->AnimationState::Update(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(menuManager) + 0x38)))->AnimationState::Update(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(menuManager) + 0x58)))->AnimationState::Update(); } if (*(char *)((char *)menuManager + 0x4ac) != '\0') goto LAB_008ddac2; if (*(char *)((char *)menuManager + 0x500) != '\0') { @@ -273,28 +273,28 @@ void Menu_OnlineLobbyList::Update() if (isTriggered != '\0') { reset(menuManager); } - piVar1 = (int *)((int)menuManager + 0x4d0); + piVar1 = (int *)(GHIDRA_INT(menuManager) + 0x4d0); if (*(int *)((char *)menuManager + 0x4e8) == *piVar1) { - filterCursor = (char *)((int)menuManager + 0x4d4); + filterCursor = (char *)(GHIDRA_INT(menuManager) + 0x4d4); do { if (filterCursor[0x18] != *filterCursor) goto LAB_008dcf67; filterCursor = filterCursor + 1; - } while ((int)(filterCursor + (-4 - (int)piVar1)) < 6); - filterCursor = (char *)((int)menuManager + 0x4da); + } while (GHIDRA_INT((filterCursor + (-4 - GHIDRA_INT(piVar1)))) < 6); + filterCursor = (char *)(GHIDRA_INT(menuManager) + 0x4da); do { if (filterCursor[0x18] != *filterCursor) goto LAB_008dcf67; filterCursor = filterCursor + 1; - } while ((int)(filterCursor + (-10 - (int)piVar1)) < 6); - filterCursor = (char *)((int)menuManager + 0x4e0); + } while (GHIDRA_INT((filterCursor + (-10 - GHIDRA_INT(piVar1)))) < 6); + filterCursor = (char *)(GHIDRA_INT(menuManager) + 0x4e0); do { if (filterCursor[0x18] != *filterCursor) goto LAB_008dcf67; filterCursor = filterCursor + 1; - } while ((int)(filterCursor + (-0x10 - (int)piVar1)) < 3); - filterCursor = (char *)((int)menuManager + 0x4e3); + } while (GHIDRA_INT((filterCursor + (-0x10 - GHIDRA_INT(piVar1)))) < 3); + filterCursor = (char *)(GHIDRA_INT(menuManager) + 0x4e3); do { if (filterCursor[0x18] != *filterCursor) goto LAB_008dcf67; filterCursor = filterCursor + 1; - } while ((int)(filterCursor + (-0x13 - (int)piVar1)) < 2); + } while (GHIDRA_INT((filterCursor + (-0x13 - GHIDRA_INT(piVar1)))) < 2); iVar8 = 0; do { if (*(char *)((char *)menuManager + iVar8 + 0x4fd) != *(char *)((char *)menuManager + iVar8 + 0x4e5)) @@ -330,27 +330,27 @@ LAB_008dcf67: else { KAGE_LogMessage(0x10,(byte *)"Unhandled scope type (%d) in Menu Lobby List \n"); } - local_1c = (float)((double)(int)uVar10 + __uint_to_double_fixup[-((int)uVar10 >> 0x1f)]) / 9.0; + local_1c = (float)((double)GHIDRA_INT(uVar10) + __uint_to_double_fixup[-(GHIDRA_INT(uVar10) >> 0x1f)]) / 9.0; dVar11 = ceil((double)local_1c); local_1c = (float)dVar11; local_14 = local_1c; if (*(char *)((char *)menuManager + 0x344) == '\0') { timeNs = GetTimeNs(); menuManager = self; - uVar10 = (uint)(timeNs >> 0x20); + uVar10 = GHIDRA_UINT((timeNs >> 0x20)); lVar2 = (timeNs & 0xffffffff) * 0x431bde82; - local_18 = (uint)((ulonglong)lVar2 >> 0x20); + local_18 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); lVar3 = (ulonglong)uVar10 * 0x431bde82; local_1c = (float)lVar3; lVar4 = (ulonglong)uVar10 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); lVar3 = lVar3 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar4 >> 0x20), - local_18 + CARRY4((uint)lVar2,(uint)lVar4)), - (int)((ulonglong)(lVar4 + lVar2) >> 0x20)); - uVar9 = (uint)((ulonglong)lVar3 >> 0x20); - uVar10 = (uint)lVar3 >> 0x12 | uVar9 * 0x4000; + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)), + local_18 + CARRY4(GHIDRA_UINT(lVar2),GHIDRA_UINT(lVar4))), + GHIDRA_INT(((ulonglong)(lVar4 + lVar2) >> 0x20))); + uVar9 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); + uVar10 = GHIDRA_UINT(lVar3) >> 0x12 | uVar9 * 0x4000; local_30[0] = ((uVar9 >> 0x12) - *(int *)((char *)self + 0x34c)) - - (uint)(uVar10 < *(uint *)((char *)self + 0x348)); + GHIDRA_UINT((uVar10 < *(uint *)((char *)self + 0x348))); if ((local_30[0] != 0) || (999 < uVar10 - *(uint *)((char *)self + 0x348))) { local_1c = 3.08286e-44; isTriggered = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a20940,&local_1c,0); @@ -364,16 +364,16 @@ LAB_008dcf67: uVar10 = 9; local_18 = *(int *)((char *)menuManager + 0x36c) + 1; *(uint *)((char *)menuManager + 0x36c) = local_18; - if ((int)local_14 == 1) { + if (GHIDRA_INT(local_14) == 1) { uVar10 = lobbyCount; } - else if (*(int *)((char *)menuManager + 0x368) == (int)local_14 + -1) { - uVar10 = (int)lobbyCount % 9; + else if (*(int *)((char *)menuManager + 0x368) == GHIDRA_INT(local_14) + -1) { + uVar10 = GHIDRA_INT(lobbyCount) % 9; } - if ((int)uVar10 <= (int)local_18) { + if (GHIDRA_INT(uVar10) <= GHIDRA_INT(local_18)) { iVar8 = *(int *)((char *)menuManager + 0x368) + 1; *(undefined4 *)((char *)menuManager + 0x36c) = 0; - if ((int)local_14 <= iVar8) { + if (GHIDRA_INT(local_14) <= iVar8) { iVar8 = 0; } *(int *)((char *)menuManager + 0x368) = iVar8; @@ -391,16 +391,16 @@ LAB_008dcf67: iVar6 = iVar8 + -1; *(int *)((char *)menuManager + 0x36c) = iVar6; if (iVar6 < 0) { - piVar1 = (int *)((int)menuManager + 0x368); + piVar1 = (int *)(GHIDRA_INT(menuManager) + 0x368); *piVar1 = *piVar1 + -1; *(int *)((char *)menuManager + 0x36c) = iVar8 + 8; if (*piVar1 < 0) { - *(int *)((char *)menuManager + 0x368) = (int)local_14 + -1; - if ((int)local_14 == 1) { + *(int *)((char *)menuManager + 0x368) = GHIDRA_INT(local_14) + -1; + if (GHIDRA_INT(local_14) == 1) { *(uint *)((char *)menuManager + 0x36c) = lobbyCount - 1; } else { - *(int *)((char *)menuManager + 0x36c) = (int)lobbyCount % 9 + -1; + *(int *)((char *)menuManager + 0x36c) = GHIDRA_INT(lobbyCount) % 9 + -1; } } } @@ -455,28 +455,28 @@ LAB_008dd39b: local_14 = (float)(entryOffset * 0xd8); entryOffset = entryOffset * 0x120; do { - local_30[0] = (int)((ulonglong)lVar2 >> 0x20); - local_28 = (int)lVar2; + local_30[0] = GHIDRA_INT(((ulonglong)lVar2 >> 0x20)); + local_28 = GHIDRA_INT(lVar2); if (lobbyCount <= local_18) break; iVar8 = *(int *)&g_manager->_lobbySettings; if (iVar8 == 0) { timeNs = GetTimeNs(); - uVar10 = (uint)(timeNs >> 0x20); + uVar10 = GHIDRA_UINT((timeNs >> 0x20)); lVar2 = (timeNs & 0xffffffff) * 0x431bde82; - local_28 = (int)((ulonglong)lVar2 >> 0x20); + local_28 = GHIDRA_INT(((ulonglong)lVar2 >> 0x20)); lVar3 = (ulonglong)uVar10 * 0x431bde82; - local_24 = (int)lVar3; + local_24 = GHIDRA_INT(lVar3); lVar4 = (ulonglong)uVar10 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); lVar3 = lVar3 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar4 >> 0x20), - local_28 + (uint)CARRY4((uint)lVar2,(uint)lVar4)), - (int)((ulonglong)(lVar4 + lVar2) >> 0x20)); + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)), + local_28 + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar2),GHIDRA_UINT(lVar4)))), + GHIDRA_INT(((ulonglong)(lVar4 + lVar2) >> 0x20))); iVar8 = *(int *)((char *)self + 0x35c); - uVar9 = (uint)((ulonglong)lVar3 >> 0x20); - uVar10 = (uint)lVar3 >> 0x12 | uVar9 * 0x4000; - lastRequestTime = (uint *)((int)local_14 + 0x10 + iVar8); + uVar9 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); + uVar10 = GHIDRA_UINT(lVar3) >> 0x12 | uVar9 * 0x4000; + lastRequestTime = (uint *)(GHIDRA_INT(local_14) + 0x10 + iVar8); local_30[0] = ((uVar9 >> 0x12) - *(int *)((char *)local_14 + 0x14 + iVar8)) - - (uint)(uVar10 < *lastRequestTime); + GHIDRA_UINT((uVar10 < *lastRequestTime)); lVar2 = CONCAT44(local_30[0],local_28); if ((local_30[0] != 0) || (menuManager = self, 5000 < uVar10 - *lastRequestTime)) { iVar8 = *(int *)((char *)local_14 + 4 + iVar8); @@ -489,41 +489,41 @@ LAB_008dd39b: (pvVar7,(void *)0x0,(void *)0x0); } timeNs = GetTimeNs(); - uVar10 = (uint)(timeNs >> 0x20); + uVar10 = GHIDRA_UINT((timeNs >> 0x20)); lVar3 = (timeNs & 0xffffffff) * 0x431bde82; - local_24 = (int)((ulonglong)lVar3 >> 0x20); + local_24 = GHIDRA_INT(((ulonglong)lVar3 >> 0x20)); lVar4 = (ulonglong)uVar10 * 0x431bde82; - lVar2 = CONCAT44(local_30[0],(int)lVar4); + lVar2 = CONCAT44(local_30[0],GHIDRA_INT(lVar4)); lVar5 = (ulonglong)uVar10 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); lVar4 = lVar4 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar5 >> 0x20), - local_24 + (uint)CARRY4((uint)lVar3,(uint)lVar5)), - (int)((ulonglong)(lVar5 + lVar3) >> 0x20)); - uVar10 = (uint)((ulonglong)lVar4 >> 0x20); + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar5 >> 0x20)), + local_24 + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar3),GHIDRA_UINT(lVar5)))), + GHIDRA_INT(((ulonglong)(lVar5 + lVar3) >> 0x20))); + uVar10 = GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)); iVar8 = *(int *)((char *)self + 0x35c); - *(uint *)((char *)local_14 + 0x10 + iVar8) = (uint)lVar4 >> 0x12 | uVar10 * 0x4000; + *(uint *)((char *)local_14 + 0x10 + iVar8) = GHIDRA_UINT(lVar4) >> 0x12 | uVar10 * 0x4000; *(uint *)((char *)local_14 + 0x14 + iVar8) = uVar10 >> 0x12; menuManager = self; } } else if (iVar8 == 1) { timeNs = GetTimeNs(); - uVar10 = (uint)(timeNs >> 0x20); + uVar10 = GHIDRA_UINT((timeNs >> 0x20)); lVar2 = (timeNs & 0xffffffff) * 0x431bde82; - local_24 = (int)((ulonglong)lVar2 >> 0x20); + local_24 = GHIDRA_INT(((ulonglong)lVar2 >> 0x20)); lVar3 = (ulonglong)uVar10 * 0x431bde82; - local_28 = (int)lVar3; + local_28 = GHIDRA_INT(lVar3); lVar4 = (ulonglong)uVar10 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); lVar3 = lVar3 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar4 >> 0x20), - local_24 + (uint)CARRY4((uint)lVar2,(uint)lVar4)), - (int)((ulonglong)(lVar4 + lVar2) >> 0x20)); + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)), + local_24 + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar2),GHIDRA_UINT(lVar4)))), + GHIDRA_INT(((ulonglong)(lVar4 + lVar2) >> 0x20))); iVar8 = *(int *)((char *)self + 0x350); - uVar9 = (uint)((ulonglong)lVar3 >> 0x20); - uVar10 = (uint)lVar3 >> 0x12 | uVar9 * 0x4000; + uVar9 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); + uVar10 = GHIDRA_UINT(lVar3) >> 0x12 | uVar9 * 0x4000; lastRequestTime = (uint *)(entryOffset + 0x18 + iVar8); local_30[0] = ((uVar9 >> 0x12) - *(int *)(entryOffset + 0x1c + iVar8)) - - (uint)(uVar10 < *lastRequestTime); + GHIDRA_UINT((uVar10 < *lastRequestTime)); lVar2 = CONCAT44(local_30[0],local_28); if ((local_30[0] != 0) || (menuManager = self, 5000 < uVar10 - *lastRequestTime)) { iVar8 = *(int *)(entryOffset + 0xc + iVar8); @@ -536,42 +536,42 @@ LAB_008dd39b: (pvVar7,(void *)0x0,(void *)0x0); } timeNs = GetTimeNs(); - uVar10 = (uint)(timeNs >> 0x20); + uVar10 = GHIDRA_UINT((timeNs >> 0x20)); lVar3 = (timeNs & 0xffffffff) * 0x431bde82; - local_24 = (int)((ulonglong)lVar3 >> 0x20); + local_24 = GHIDRA_INT(((ulonglong)lVar3 >> 0x20)); lVar4 = (ulonglong)uVar10 * 0x431bde82; - lVar2 = CONCAT44(local_30[0],(int)lVar4); + lVar2 = CONCAT44(local_30[0],GHIDRA_INT(lVar4)); lVar5 = (ulonglong)uVar10 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); lVar4 = lVar4 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar5 >> 0x20), - local_24 + (uint)CARRY4((uint)lVar3,(uint)lVar5)), - (int)((ulonglong)(lVar5 + lVar3) >> 0x20)); - uVar10 = (uint)((ulonglong)lVar4 >> 0x20); + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar5 >> 0x20)), + local_24 + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar3),GHIDRA_UINT(lVar5)))), + GHIDRA_INT(((ulonglong)(lVar5 + lVar3) >> 0x20))); + uVar10 = GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)); iVar8 = *(int *)((char *)self + 0x350); - *(uint *)(entryOffset + 0x18 + iVar8) = (uint)lVar4 >> 0x12 | uVar10 * 0x4000; + *(uint *)(entryOffset + 0x18 + iVar8) = GHIDRA_UINT(lVar4) >> 0x12 | uVar10 * 0x4000; *(uint *)(entryOffset + 0x1c + iVar8) = uVar10 >> 0x12; menuManager = self; } } else if (iVar8 == 2) { - if (local_18 < (uint)(*(int *)((char *)menuManager + 0x354) - *(int *)((char *)menuManager + 0x350) >> 5)) { + if (local_18 < GHIDRA_UINT((*(int *)((char *)menuManager + 0x354) - *(int *)((char *)menuManager + 0x350) >> 5))) { timeNs = GetTimeNs(); - uVar10 = (uint)(timeNs >> 0x20); + uVar10 = GHIDRA_UINT((timeNs >> 0x20)); lVar2 = (timeNs & 0xffffffff) * 0x431bde82; - local_24 = (int)((ulonglong)lVar2 >> 0x20); + local_24 = GHIDRA_INT(((ulonglong)lVar2 >> 0x20)); lVar3 = (ulonglong)uVar10 * 0x431bde82; - local_28 = (int)lVar3; + local_28 = GHIDRA_INT(lVar3); lVar4 = (ulonglong)uVar10 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); lVar3 = lVar3 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar4 >> 0x20), - local_24 + (uint)CARRY4((uint)lVar2,(uint)lVar4)), - (int)((ulonglong)(lVar4 + lVar2) >> 0x20)); + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)), + local_24 + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar2),GHIDRA_UINT(lVar4)))), + GHIDRA_INT(((ulonglong)(lVar4 + lVar2) >> 0x20))); iVar8 = *(int *)((char *)self + 0x350); - uVar9 = (uint)((ulonglong)lVar3 >> 0x20); - uVar10 = (uint)lVar3 >> 0x12 | uVar9 * 0x4000; + uVar9 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); + uVar10 = GHIDRA_UINT(lVar3) >> 0x12 | uVar9 * 0x4000; lastRequestTime = (uint *)(entryOffset + 0x18 + iVar8); local_30[0] = ((uVar9 >> 0x12) - *(int *)(entryOffset + 0x1c + iVar8)) - - (uint)(uVar10 < *lastRequestTime); + GHIDRA_UINT((uVar10 < *lastRequestTime)); lVar2 = CONCAT44(local_30[0],local_28); if ((local_30[0] != 0) || (menuManager = self, 5000 < uVar10 - *lastRequestTime)) { iVar8 = *(int *)(entryOffset + 0xc + iVar8); @@ -584,41 +584,41 @@ LAB_008dd39b: (pvVar7,(void *)0x0,(void *)0x0); } timeNs = GetTimeNs(); - uVar10 = (uint)(timeNs >> 0x20); + uVar10 = GHIDRA_UINT((timeNs >> 0x20)); lVar3 = (timeNs & 0xffffffff) * 0x431bde82; - local_24 = (int)((ulonglong)lVar3 >> 0x20); + local_24 = GHIDRA_INT(((ulonglong)lVar3 >> 0x20)); lVar4 = (ulonglong)uVar10 * 0x431bde82; - lVar2 = CONCAT44(local_30[0],(int)lVar4); + lVar2 = CONCAT44(local_30[0],GHIDRA_INT(lVar4)); lVar5 = (ulonglong)uVar10 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); lVar4 = lVar4 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar5 >> 0x20), - local_24 + (uint)CARRY4((uint)lVar3,(uint)lVar5)), - (int)((ulonglong)(lVar5 + lVar3) >> 0x20)); - uVar10 = (uint)((ulonglong)lVar4 >> 0x20); + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar5 >> 0x20)), + local_24 + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar3),GHIDRA_UINT(lVar5)))), + GHIDRA_INT(((ulonglong)(lVar5 + lVar3) >> 0x20))); + uVar10 = GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)); iVar8 = *(int *)((char *)self + 0x350); - *(uint *)(entryOffset + 0x18 + iVar8) = (uint)lVar4 >> 0x12 | uVar10 * 0x4000; + *(uint *)(entryOffset + 0x18 + iVar8) = GHIDRA_UINT(lVar4) >> 0x12 | uVar10 * 0x4000; *(uint *)(entryOffset + 0x1c + iVar8) = uVar10 >> 0x12; menuManager = self; } } else { timeNs = GetTimeNs(); - uVar10 = (uint)(timeNs >> 0x20); + uVar10 = GHIDRA_UINT((timeNs >> 0x20)); lVar2 = (timeNs & 0xffffffff) * 0x431bde82; - local_24 = (int)((ulonglong)lVar2 >> 0x20); + local_24 = GHIDRA_INT(((ulonglong)lVar2 >> 0x20)); lVar3 = (ulonglong)uVar10 * 0x431bde82; - local_28 = (int)lVar3; + local_28 = GHIDRA_INT(lVar3); lVar4 = (ulonglong)uVar10 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); lVar3 = lVar3 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar4 >> 0x20), - local_24 + (uint)CARRY4((uint)lVar2,(uint)lVar4)), - (int)((ulonglong)(lVar4 + lVar2) >> 0x20)); + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)), + local_24 + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar2),GHIDRA_UINT(lVar4)))), + GHIDRA_INT(((ulonglong)(lVar4 + lVar2) >> 0x20))); iVar8 = *(int *)((char *)self + 0x35c); - uVar9 = (uint)((ulonglong)lVar3 >> 0x20); - uVar10 = (uint)lVar3 >> 0x12 | uVar9 * 0x4000; - lastRequestTime = (uint *)((int)local_14 + 0x10 + iVar8); + uVar9 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); + uVar10 = GHIDRA_UINT(lVar3) >> 0x12 | uVar9 * 0x4000; + lastRequestTime = (uint *)(GHIDRA_INT(local_14) + 0x10 + iVar8); local_30[0] = ((uVar9 >> 0x12) - *(int *)((char *)local_14 + 0x14 + iVar8)) - - (uint)(uVar10 < *lastRequestTime); + GHIDRA_UINT((uVar10 < *lastRequestTime)); lVar2 = CONCAT44(local_30[0],local_28); if ((local_30[0] != 0) || (menuManager = self, 5000 < uVar10 - *lastRequestTime)) { iVar8 = *(int *)((char *)local_14 + 4 + iVar8); @@ -631,19 +631,19 @@ LAB_008dd39b: (pvVar7,(void *)0x0,(void *)0x0); } timeNs = GetTimeNs(); - uVar10 = (uint)(timeNs >> 0x20); + uVar10 = GHIDRA_UINT((timeNs >> 0x20)); lVar3 = (timeNs & 0xffffffff) * 0x431bde82; - local_24 = (int)((ulonglong)lVar3 >> 0x20); + local_24 = GHIDRA_INT(((ulonglong)lVar3 >> 0x20)); lVar2 = (ulonglong)uVar10 * 0x431bde82; lVar4 = (ulonglong)uVar10 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); lVar3 = lVar2 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar4 >> 0x20), - local_24 + (uint)CARRY4((uint)lVar3,(uint)lVar4)), - (int)((ulonglong)(lVar4 + lVar3) >> 0x20)); - uVar10 = (uint)((ulonglong)lVar3 >> 0x20); + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)), + local_24 + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar3),GHIDRA_UINT(lVar4)))), + GHIDRA_INT(((ulonglong)(lVar4 + lVar3) >> 0x20))); + uVar10 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); iVar6 = local_18 - (*(int *)((char *)self + 0x354) - *(int *)((char *)self + 0x350) >> 5); iVar8 = *(int *)((char *)self + 0x35c); - *(uint *)(iVar8 + 0x10 + iVar6 * 0x18) = (uint)lVar3 >> 0x12 | uVar10 * 0x4000; + *(uint *)(iVar8 + 0x10 + iVar6 * 0x18) = GHIDRA_UINT(lVar3) >> 0x12 | uVar10 * 0x4000; *(uint *)(iVar8 + 0x14 + iVar6 * 0x18) = uVar10 >> 0x12; menuManager = self; } @@ -653,12 +653,12 @@ LAB_008dd39b: KAGE_LogMessage(0x10,(byte *)"Unhandled scope type (%d) in Menu Lobby List \n"); lVar2 = CONCAT44(local_30[0],local_28); } - local_28 = (int)lVar2; - local_1c = (float)((int)local_1c + 1); + local_28 = GHIDRA_INT(lVar2); + local_1c = (float)(GHIDRA_INT(local_1c) + 1); entryOffset = entryOffset + 0x20; local_18 = local_18 + 1; - local_14 = (float)((int)local_14 + 0x18); - } while ((uint)local_1c < 9); + local_14 = (float)(GHIDRA_INT(local_14) + 0x18); + } while (GHIDRA_UINT(local_1c) < 9); } } local_30[0] = 0xf; @@ -666,8 +666,8 @@ LAB_008dd39b: menuManager = g_menuManager; if (isTriggered != '\0') { pvVar7 = (g_menuManager->_menuStateHistory)._end; - if (1 < (uint)((int)pvVar7 - (int)(g_menuManager->_menuStateHistory)._begin >> 2)) { - pvVar7 = (void *)((int)pvVar7 + -4); + if (1 < GHIDRA_UINT((GHIDRA_INT(pvVar7) - GHIDRA_INT((g_menuManager->_menuStateHistory)._begin) >> 2))) { + pvVar7 = (void *)(GHIDRA_INT(pvVar7) + -4); (g_menuManager->_menuStateHistory)._end = pvVar7; } ((MenuManager *)(menuManager))->MenuManager::SetState(*(int *)((char *)pvVar7 + -4),0); @@ -688,7 +688,7 @@ LAB_008dd39b: isTriggered = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a209e0,local_30,0,0); if (isTriggered != '\0') { *(undefined1 *)((char *)menuManager + 0x4ac) = 1; - *(undefined4 **)((char *)menuManager + 0x4b0) = (undefined4 *)((int)menuManager + 0x4e8); + *(undefined4 **)((char *)menuManager + 0x4b0) = (undefined4 *)(GHIDRA_INT(menuManager) + 0x4e8); *(undefined4 *)((char *)menuManager + 0x4b4) = *(undefined4 *)((char *)menuManager + 0x4e8); *(undefined4 *)((char *)menuManager + 0x4b8) = *(undefined4 *)((char *)menuManager + 0x4ec); *(undefined4 *)((char *)menuManager + 0x4bc) = *(undefined4 *)((char *)menuManager + 0x4f0); @@ -734,9 +734,9 @@ void Menu_OnlineLobbyList::reset() animData = *(byte **)((char *)this + 0x3c); if (animData == (byte *)0x0) { LAB_008de435: - bVar3 = ((ANM2 *)((ANM2 *)((int)this + 8)))->ANM2::SetAnimation(s_Idle,1); + bVar3 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 8)))->ANM2::SetAnimation(s_Idle,1); if (bVar3 != 0) { - ((AnimationState *)((AnimationState *)((int)this + 0x38)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x38)))->AnimationState::Rewind(); *(undefined1 *)((char *)this + 0x4c) = 1; } } @@ -751,7 +751,7 @@ LAB_008de435: isLess = bVar3 < *idleNameChar; if (bVar3 != *idleNameChar) { LAB_008de422: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_008de427; } if (bVar3 == 0) break; @@ -769,9 +769,9 @@ LAB_008de427: animData = *(byte **)((char *)this + 0x150); if (animData == (byte *)0x0) { LAB_008de4a6: - bVar3 = ((ANM2 *)((ANM2 *)((int)this + 0x11c)))->ANM2::SetAnimation((byte *)"Cursor",1); + bVar3 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x11c)))->ANM2::SetAnimation((byte *)"Cursor",1); if (bVar3 != 0) { - ((AnimationState *)((AnimationState *)((int)this + 0x14c)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x14c)))->AnimationState::Rewind(); *(undefined1 *)((char *)this + 0x160) = 1; } } @@ -786,7 +786,7 @@ LAB_008de4a6: isLess = bVar3 < (byte)*cursorNameChar; if (bVar3 != *cursorNameChar) { LAB_008de490: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_008de495; } if (bVar3 == 0) break; @@ -803,23 +803,23 @@ LAB_008de495: } *(undefined1 *)((char *)this + 0x344) = 1; timeNs = GetTimeNs(); - uVar4 = (uint)(timeNs >> 0x20); + uVar4 = GHIDRA_UINT((timeNs >> 0x20)); lVar1 = (timeNs & 0xffffffff) * 0x431bde82; lVar2 = (ulonglong)uVar4 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); lVar1 = (ulonglong)uVar4 * 0x431bde82 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar2 >> 0x20), - (int)((ulonglong)lVar1 >> 0x20) + (uint)CARRY4((uint)lVar1,(uint)lVar2)), - (int)((ulonglong)(lVar2 + lVar1) >> 0x20)); - uVar4 = (uint)((ulonglong)lVar1 >> 0x20); - *(uint *)((char *)this + 0x348) = (uint)lVar1 >> 0x12 | uVar4 * 0x4000; + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)), + GHIDRA_INT(((ulonglong)lVar1 >> 0x20)) + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar1),GHIDRA_UINT(lVar2)))), + GHIDRA_INT(((ulonglong)(lVar2 + lVar1) >> 0x20))); + uVar4 = GHIDRA_UINT(((ulonglong)lVar1 >> 0x20)); + *(uint *)((char *)this + 0x348) = GHIDRA_UINT(lVar1) >> 0x12 | uVar4 * 0x4000; *(uint *)((char *)this + 0x34c) = uVar4 >> 0x12; *(undefined4 *)((char *)this + 0x368) = 0; *(undefined4 *)((char *)this + 0x36c) = 0; *(undefined4 *)((char *)this + 0x370) = 0; - arrowLayer = ((ANM2 *)((ANM2 *)((int)this + 8)))->ANM2::GetLayer((byte *)"ArrowUp"); + arrowLayer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 8)))->ANM2::GetLayer((byte *)"ArrowUp"); arrowLayer->_visible = 0; - arrowLayer = ((ANM2 *)((ANM2 *)((int)this + 8)))->ANM2::GetLayer((byte *)"ArrowDown"); + arrowLayer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 8)))->ANM2::GetLayer((byte *)"ArrowDown"); manager = g_manager; arrowLayer->_visible = 0; *(bool *)((char *)this + 0x4d9) = *(int *)&manager->_lobbySettings != 0; @@ -827,9 +827,9 @@ LAB_008de495: animData = *(byte **)((char *)this + 0x3c0); if (animData == (byte *)0x0) { LAB_008de5fd: - bVar3 = ((ANM2 *)((ANM2 *)((int)this + 0x38c)))->ANM2::SetAnimation(s_Idle,1); + bVar3 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x38c)))->ANM2::SetAnimation(s_Idle,1); if (bVar3 != 0) { - ((AnimationState *)((AnimationState *)((int)this + 0x3bc)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x3bc)))->AnimationState::Rewind(); *(undefined1 *)((char *)this + 0x3d0) = 1; } } @@ -844,7 +844,7 @@ LAB_008de5fd: isLess = bVar3 < *idleNameChar; if (bVar3 != *idleNameChar) { LAB_008de5e7: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_008de5ec; } if (bVar3 == 0) break; @@ -928,7 +928,7 @@ void Menu_OnlineLobbyList::update_password_entry() local_28 = (undefined4 *)0x57; isKeyTriggered = (**(code **)(PTR_vftable_00c57b18 + 0x74)) - (0,FUN_00a207d0,&local_28,0,0,__security_cookie ^ (uint)(local_54 + 0x44)); + (0,FUN_00a207d0,&local_28,0,0,__security_cookie ^ GHIDRA_UINT((local_54 + 0x44))); if (isKeyTriggered == '\0') { local_28 = (undefined4 *)0x41; isKeyTriggered = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0,FUN_00a207d0,&local_28,0,0); @@ -1044,18 +1044,18 @@ LAB_008de88b: pcVar4 = psVar3->_buf; psVar3 = (std_string *)(psVar3->_buf + 1); } while (*pcVar4 != '\0'); - pcVar4 = operator_new_tracked((uint)((int)psVar3 + (1 - (int)(password->_buf + 1)))); + pcVar4 = operator_new_tracked(GHIDRA_UINT((GHIDRA_INT(psVar3) + (1 - GHIDRA_INT((password->_buf + 1)))))); psVar3 = password; do { copyCursor = psVar3->_buf; psVar3 = (std_string *)(psVar3->_buf + 1); } while (*copyCursor != '\0'); - strncpy(pcVar4,password->_buf,(size_t)((int)psVar3 + (1 - (int)(password->_buf + 1)))); + strncpy(pcVar4,password->_buf,(size_t)(GHIDRA_INT(psVar3) + (1 - GHIDRA_INT((password->_buf + 1))))); } local_28[4] = 2; local_28[2] = pcVar4; manager = g_manager; - local_28[3] = (int)pcVar4 >> 0x1f; + local_28[3] = GHIDRA_INT(pcVar4) >> 0x1f; serviceProvider = (manager->_optionsConfig)._eosCrossplay; if ((serviceProvider == 2) || (serviceProvider == 3)) { serviceProvider = 3; @@ -1082,7 +1082,7 @@ LAB_008de88b: password->_buf[0] = '\0'; local_28 = (undefined4 *)0xbb; seed_fart_sound_override((int *)&local_28); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_28,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_28),1.0,2,0,1.0,0.0); } *(undefined1 *)((char *)menu + 0x500) = 0; ExceptionList = local_1c; @@ -1119,7 +1119,7 @@ void Menu_OnlineLobbyList::request_lobby_list() undefined1 *puStack_18; undefined4 local_14; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); puStack_18 = &LAB_00b0658d; local_1c = ExceptionList; ExceptionList = &local_1c; @@ -1346,12 +1346,12 @@ LAB_008e17a0: (&DAT_00c79a50,&maxResults,on_lobby_list_received,pvVar2); FUN_00a539f0(); if (filtersBegin != (void *)0x0) { - allocSize = (((int)filtersCapacityEnd - (int)filtersBegin) / 0x18) * 0x18; + allocSize = ((GHIDRA_INT(filtersCapacityEnd) - GHIDRA_INT(filtersBegin)) / 0x18) * 0x18; pvVar2 = filtersBegin; if (0xfff < allocSize) { pvVar2 = *(void **)((char *)filtersBegin + -4); allocSize = allocSize + 0x23; - if (0x1f < (uint)((int)filtersBegin + (-4 - (int)pvVar2))) goto LAB_008e1889; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(filtersBegin) + (-4 - GHIDRA_INT(pvVar2))))) goto LAB_008e1889; } operator_delete(pvVar2,allocSize); filtersBegin = (void *)0x0; @@ -1359,12 +1359,12 @@ LAB_008e17a0: filtersCapacityEnd = (undefined4 *)0x0; } if (otherFiltersBegin != (void *)0x0) { - allocSize = ((otherFiltersCapacityEnd - (int)otherFiltersBegin) / 0x18) * 0x18; + allocSize = ((otherFiltersCapacityEnd - GHIDRA_INT(otherFiltersBegin)) / 0x18) * 0x18; pvVar2 = otherFiltersBegin; if (0xfff < allocSize) { pvVar2 = *(void **)((char *)otherFiltersBegin + -4); allocSize = allocSize + 0x23; - if (0x1f < (uint)((int)otherFiltersBegin + (-4 - (int)pvVar2))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(otherFiltersBegin) + (-4 - GHIDRA_INT(pvVar2))))) { LAB_008e1889: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1417,10 +1417,10 @@ void Menu_OnlineLobbyList::lobby_search_callback(int *param_1, int param_2) lobbyList = (uint *)0x0; lobbyListSize = 0; lobbyList = operator_new(0x1c); - *lobbyList = (uint)lobbyList; - lobbyList[1] = (uint)lobbyList; - local_8._0_1_ = 0; - local_8._1_3_ = 0; + *lobbyList = GHIDRA_UINT(lobbyList); + lobbyList[1] = GHIDRA_UINT(lobbyList); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0; local_14 = (uint *)0x0; iVar4 = *param_1; iVar8 = param_1[1] - iVar4 >> 0x1f; @@ -1431,9 +1431,9 @@ void Menu_OnlineLobbyList::lobby_search_callback(int *param_1, int param_2) do { local_30 = &local_78; local_78 = KAGE::Network::Multiplayer::ConstLobby::vftable; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((std::shared_ptr *)(local_50 + -0x24))->std::shared_ptr::assign((void *)(iVar8 + 0xc + iVar4)); - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; cVar3 = FUN_0085bd40(); if ((cVar3 != '\0') && ((*(int *)&g_manager->_lobbySettings != 2 || @@ -1446,7 +1446,7 @@ void Menu_OnlineLobbyList::lobby_search_callback(int *param_1, int param_2) std::_Xlength_error("list too long"); } local_1c = &lobbyList; - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; local_18 = (uint *)0x0; puVar5 = operator_new(0x1c); local_2c = (undefined ***)(puVar5 + 2); @@ -1454,24 +1454,24 @@ void Menu_OnlineLobbyList::lobby_search_callback(int *param_1, int param_2) puVar5[3] = *(undefined4 *)(iVar4 + 4 + iVar8); *local_2c = KAGE::System::UserProfile::vftable; local_20 = puVar5 + 4; - *local_20 = (uint)KAGE::Network::Multiplayer::ConstLobby::vftable; + *local_20 = GHIDRA_UINT(KAGE)::Network::Multiplayer::ConstLobby::vftable; puVar5[5] = 0; puVar5[6] = 0; - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; local_18 = puVar5; ((std::shared_ptr *)(puVar5 + 5))->std::shared_ptr::assign((void *)(iVar4 + 0xc + iVar8)); - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; lobbyListSize = lobbyListSize + 1; puVar2 = (undefined4 *)local_24[1]; *puVar5 = local_24; puVar5[1] = puVar2; - local_24[1] = (uint)puVar5; + local_24[1] = GHIDRA_UINT(puVar5); local_18 = (uint *)0x0; *puVar2 = puVar5; } iVar4 = *param_1; iVar8 = iVar8 + 0x14; - local_14 = (uint *)((int)local_14 + 1); + local_14 = (uint *)(GHIDRA_INT(local_14) + 1); } while (local_14 < (uint *)((param_1[1] - iVar4) / 0x14)); local_24 = lobbyList; } @@ -1518,10 +1518,10 @@ void Menu_OnlineLobbyList::lobby_search_callback(int *param_1, int param_2) puVar5 = (undefined4 *)puVar7[1]; *puVar5 = local_14; puVar6 = (uint *)local_14[1]; - *puVar6 = (uint)local_30; - local_14[1] = (uint)puVar5; - puVar7[1] = (uint)puVar2; - local_30[1] = (uint)puVar6; + *puVar6 = GHIDRA_UINT(local_30); + local_14[1] = GHIDRA_UINT(puVar5); + puVar7[1] = GHIDRA_UINT(puVar2); + local_30[1] = GHIDRA_UINT(puVar6); puVar6 = local_14; if (puVar7 == local_20) goto LAB_008e1d71; do { @@ -1543,17 +1543,17 @@ LAB_008e1d7c: do { local_30 = &local_78; local_78 = KAGE::Network::Multiplayer::ConstLobby::vftable; - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; ((std::shared_ptr *)(local_50 + -0x24))->std::shared_ptr::assign(puVar6 + 5); cVar3 = FUN_008e18f0(); if (cVar3 == '\0') { local_2c = &local_5c; local_58 = 0; local_5c = KAGE::System::UserProfile::vftable; - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; local_54 = KAGE::Network::Multiplayer::ConstLobby::vftable; KAGE::SmartPointer::SmartPointer(); - local_8 = CONCAT31(local_8._1_3_,8); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),8); local_58 = puVar6[3]; ((std::shared_ptr *)(local_50))->std::shared_ptr::assign(puVar6 + 5); local_44 = 0; @@ -1566,7 +1566,7 @@ LAB_008e1d7c: *(int *)(param_2 + 0x354) = *(int *)(param_2 + 0x354) + 0x20; } local_54 = KAGE::Network::Multiplayer::ConstLobby::vftable; - local_8._0_1_ = 9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; if (((entryRefCount != (int *)0x0) && (cVar3 = (**(code **)(*entryRefCount + 0xc))(), cVar3 != '\0')) && (g_lobbyReleaseFn != (void *)0x0)) { @@ -1600,7 +1600,7 @@ LAB_008e1d7c: ExceptionList = local_10; return; LAB_008e1d71: - *local_24 = (uint)local_28; + *local_24 = GHIDRA_UINT(local_28); goto LAB_008e1d7c; } @@ -1649,15 +1649,15 @@ void Menu_OnlineLobbyList::on_lobby_list_received(int *param_1, int param_2) local_8 = 0xffffffff; puStack_c = &LAB_00b06691; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)((&settings)[1]._seed._buf + 8); + local_14 = __security_cookie ^ GHIDRA_UINT(((&settings)[1]._seed._buf + 8)); ExceptionList = &local_10; results = param_1; local_78 = param_2; lobbyList = (int *)0x0; lobbyListSize = 0; lobbyList = operator_new(0x14); - *lobbyList = (int)lobbyList; - lobbyList[1] = (int)lobbyList; + *lobbyList = GHIDRA_INT(lobbyList); + lobbyList[1] = GHIDRA_INT(lobbyList); local_8 = 0; iVar5 = *param_1; lobbyIndex = 0; @@ -1674,7 +1674,7 @@ void Menu_OnlineLobbyList::on_lobby_list_received(int *param_1, int param_2) iVar5 = piVar7[5]; iVar8 = piVar7[4]; uVar3 = (**(code **)(*piVar7 + 0x1c))(); - cVar2 = '\x01' - ((uint)(iVar5 - iVar8 >> 3) < uVar3); + cVar2 = '\x01' - (GHIDRA_UINT((iVar5 - iVar8 >> 3)) < uVar3); } if (cVar2 == '\0') { piVar7 = *(int **)(*param_1 + 4 + iVar6); @@ -1690,14 +1690,14 @@ void Menu_OnlineLobbyList::on_lobby_list_received(int *param_1, int param_2) pcVar4 = pcVar4 + 1; } while (cVar2 != '\0'); if (pcVar4 == passwordStart) { - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((std::shared_ptr *)(auStackY_2dc + 0x82))->std::shared_ptr::assign((void *)(*param_1 + 4 + iVar6)); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; cVar2 = FUN_008e18f0(); if (cVar2 == '\0') { - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; ((std::shared_ptr *)(auStackY_2dc + 0x82))->std::shared_ptr::assign((void *)(*param_1 + 4 + iVar6)); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; cVar2 = FUN_0085bd40(); if (cVar2 != '\0') { ((LobbySettings *)(&settings))->LobbySettings::reset(); @@ -1705,17 +1705,17 @@ void Menu_OnlineLobbyList::on_lobby_list_received(int *param_1, int param_2) lobbyHandleVtable = KAGE::Network::Multiplayer::ConstLobby::vftable; lobby = (void *)0x0; lobbyRefCount = (void *)0x0; - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; ((std::shared_ptr *)(auStackY_2dc + 0x82))->std::shared_ptr::assign((void *)(*param_1 + 4 + iVar6)); - local_8 = CONCAT31(local_8._1_3_,3); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); Menu_Save::select_save_slot ((Menu_Save *)&settings,lobbyHandleVtable,lobby,lobbyRefCount); if (g_userProfile == (void *)0x0) { local_8c = 0; - local_8c._4_4_ = 0; - local_8c._0_4_ = 0; - iVar5 = (int)local_8c; - iVar8 = local_8c._4_4_; + (*(undefined4 *)((char *)&(local_8c) + 0x4)) = 0; + (*(undefined4 *)((char *)&(local_8c) + 0x0)) = 0; + iVar5 = GHIDRA_INT(local_8c); + iVar8 = (*(undefined4 *)((char *)&(local_8c) + 0x4)); } else { iVar5 = *(int *)((char *)g_userProfile + 8); @@ -1740,7 +1740,7 @@ LAB_008e21eb: isChallengeLocked = false; } else { - if ((uint)settings._challenge < 0x2e) { + if (GHIDRA_UINT(settings._challenge) < 0x2e) { iVar5 = *(int *)(&DAT_00b7b0b0 + settings._challenge * 4); } else { @@ -1759,21 +1759,21 @@ LAB_008e21eb: std::_Xlength_error("list too long"); } local_9c = &lobbyList; - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; newNode = (undefined4 *)0x0; node = operator_new(0x14); node[2] = KAGE::Network::Multiplayer::ConstLobby::vftable; - local_8c = CONCAT44(node + 2,(int)local_8c); + local_8c = CONCAT44(node + 2,GHIDRA_INT(local_8c)); node[3] = 0; node[4] = 0; - local_8 = CONCAT31(local_8._1_3_,6); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),6); newNode = node; ((std::shared_ptr *)(node + 3))->std::shared_ptr::assign((void *)(iVar5 + iVar6 + 4)); lobbyListSize = lobbyListSize + 1; puVar1 = (undefined4 *)piVar7[1]; *node = piVar7; node[1] = puVar1; - piVar7[1] = (int)node; + piVar7[1] = GHIDRA_INT(node); newNode = (undefined4 *)0x0; *puVar1 = node; iVar6 = lobbyOffset; @@ -1790,7 +1790,7 @@ LAB_008e21eb: iVar5 = *param_1; lobbyOffset = iVar6 + 0xc; lobbyIndex = lobbyIndex + 1; - } while (lobbyIndex < (uint)((param_1[1] - iVar5) / 0xc)); + } while (lobbyIndex < GHIDRA_UINT(((param_1[1] - iVar5) / 0xc))); param_2 = local_78; } FUN_008e34e0(); @@ -1800,7 +1800,7 @@ LAB_008e21eb: if (piVar7 != lobbyList) { do { KAGE::SmartPointer::SmartPointer(); - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; ((std::shared_ptr *)(lobbyEntry))->std::shared_ptr::assign(piVar7 + 3); local_a4 = 0; puVar1 = *(undefined4 **)(local_78 + 0x360); @@ -1811,20 +1811,20 @@ LAB_008e21eb: *puVar1 = KAGE::Network::Multiplayer::ConstLobby::vftable; puVar1[1] = 0; puVar1[2] = 0; - local_8._0_1_ = 9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; local_94 = puVar1; ((std::shared_ptr *)(puVar1 + 1))->std::shared_ptr::assign(lobbyEntry); puVar1[4] = (undefined4)local_a4; - puVar1[5] = local_a4._4_4_; + puVar1[5] = (*(undefined4 *)((char *)&(local_a4) + 0x4)); *(int *)(param_2 + 0x360) = *(int *)(param_2 + 0x360) + 0x18; } - local_8._0_1_ = 10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 10; if (((lobbyEntryRefCount != (int *)0x0) && (cVar2 = (**(code **)(*lobbyEntryRefCount + 0xc))(), cVar2 != '\0')) && (g_lobbyReleaseFn != (void *)0x0)) { (*g_lobbyReleaseFn)(); } - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; piVar7 = (int *)*piVar7; } while (piVar7 != lobbyList); } @@ -1897,17 +1897,17 @@ void Menu_OnlineLobbyList::on_password_search_result(int *param_1, int param_2) local_8 = (byte ****)0xffffffff; puStack_c = &LAB_00b066f9; local_10 = ExceptionList; - stackCookie = __security_cookie ^ (uint)(lobbyPassword + 10); + stackCookie = __security_cookie ^ GHIDRA_UINT((lobbyPassword + 10)); ExceptionList = &local_10; *(undefined1 *)(param_2 + 0x344) = 0; ((std::string *)((char *)enteredPassword))->std::string::string(&(g_manager->_lobbySettings)._password); - local_8._0_1_ = 0; - local_8._1_3_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0; if (enteredPasswordSize == 8) { piVar3 = operator_new(0x14); - *piVar3 = (int)piVar3; - piVar3[1] = (int)piVar3; - local_8._0_1_ = 1; + *piVar3 = GHIDRA_INT(piVar3); + piVar3[1] = GHIDRA_INT(piVar3); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; lobbiesBegin = *param_1; lobbyIdx = 0; iVar1 = param_1[1] - lobbiesBegin >> 0x1f; @@ -1930,9 +1930,9 @@ void Menu_OnlineLobbyList::on_password_search_result(int *param_1, int param_2) bVar2 = *textEnd; textEnd = textEnd + 1; } while (bVar2 != 0); - ((std::string *)((char *)lobbyPassword))->std::string::assign(text,(int)textEnd - (int)(text + 1)); + ((std::string *)((char *)lobbyPassword))->std::string::assign(text,GHIDRA_INT(textEnd) - GHIDRA_INT((text + 1))); pppppbVar6 = lobbyPassword[0]; - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; if (lobbyPasswordSize == 8) { pppppbVar4 = (byte *****)enteredPassword; if (0xf < enteredPasswordCapacity) { @@ -1948,9 +1948,9 @@ void Menu_OnlineLobbyList::on_password_search_result(int *param_1, int param_2) lobbyHandleVtable = KAGE::Network::Multiplayer::ConstLobby::vftable; lobby = (void *)0x0; lobbyRefCount = (void *)0x0; - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; ((std::shared_ptr *)(auStack_d2 + -10))->std::shared_ptr::assign((void *)(*param_1 + 4 + lobbyOffset)); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; Menu_Save::select_save_slot ((Menu_Save *)&lobbySettings,lobbyHandleVtable,lobby,lobbyRefCount); manager = g_manager; @@ -1987,14 +1987,14 @@ LAB_008e2714: std::vector::_Tidy(); ((std::string *)(lobbySettings._password._buf))->std::string::_Tidy_deallocate(); ((std::string *)(lobbySettings._seed._buf))->std::string::_Tidy_deallocate(); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; if (0xf < lobbyPasswordCapacity) { uVar5 = lobbyPasswordCapacity + 1; pppppbVar4 = pppppbVar6; if (0xfff < uVar5) { pppppbVar4 = (byte *****)pppppbVar6[-1]; uVar5 = lobbyPasswordCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)pppppbVar6 + (-4 - (int)pppppbVar4))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(pppppbVar6) + (-4 - GHIDRA_INT(pppppbVar4)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2006,31 +2006,31 @@ LAB_008e2714: listNode = (undefined4 *)*local_a0; while (listNode != (undefined4 *)0x0) { nextNode = (undefined4 *)*listNode; - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; (**(code **)listNode[2])(); operator_delete(listNode,0x14); listNode = nextNode; } - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; operator_delete(piVar3,0x14); goto LAB_008e28fb; } LAB_008e27d6: - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; if (lobbyPasswordCapacity < 0x10) goto LAB_008e280d; uVar5 = lobbyPasswordCapacity + 1; pppppbVar4 = pppppbVar6; if (0xfff < uVar5) { pppppbVar4 = (byte *****)pppppbVar6[-1]; uVar5 = lobbyPasswordCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)pppppbVar6 + (-4 - (int)pppppbVar4))) goto LAB_008e2927; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(pppppbVar6) + (-4 - GHIDRA_INT(pppppbVar4)))) goto LAB_008e2927; } operator_delete(pppppbVar4,uVar5); LAB_008e280d: lobbiesBegin = *param_1; lobbyOffset = lobbyOffset + 0xc; lobbyIdx = lobbyIdx + 1; - } while (lobbyIdx < (uint)((param_1[1] - lobbiesBegin) / 0xc)); + } while (lobbyIdx < GHIDRA_UINT(((param_1[1] - lobbiesBegin) / 0xc))); piVar3 = (int *)local_a0[1]; } ptr = local_a0; @@ -2038,12 +2038,12 @@ LAB_008e280d: listNode = (undefined4 *)*local_a0; while (listNode != (undefined4 *)0x0) { nextNode = (undefined4 *)*listNode; - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; (**(code **)listNode[2])(); operator_delete(listNode,0x14); listNode = nextNode; } - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; operator_delete(ptr,0x14); } manager = g_manager; @@ -2055,7 +2055,7 @@ LAB_008e280d: managerPassword->_buf[0] = '\0'; local_a0 = (int *)0xbb; seed_fart_sound_override((int *)&local_a0); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_a0,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_a0),1.0,2,0,1.0,0.0); LAB_008e28fb: if (0xf < enteredPasswordCapacity) { uVar5 = enteredPasswordCapacity + 1; @@ -2063,7 +2063,7 @@ LAB_008e28fb: if (0xfff < uVar5) { pppppbVar6 = (byte *****)enteredPassword[0][-1]; uVar5 = enteredPasswordCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)enteredPassword[0] + (-4 - (int)pppppbVar6))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(enteredPassword[0]) + (-4 - GHIDRA_INT(pppppbVar6)))) { LAB_008e2927: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); diff --git a/src/game/menu_online_mode.cpp b/src/game/menu_online_mode.cpp index 01ab803..90eb051 100644 --- a/src/game/menu_online_mode.cpp +++ b/src/game/menu_online_mode.cpp @@ -20,8 +20,8 @@ void Menu_OnlineMode::Update() play_idle_animation(); iVar2 = extraout_ECX; if (*(char *)((char *)this + 0x109) != '\0') { - ((AnimationState *)((AnimationState *)((int)this + 0x30)))->AnimationState::Update(); - ((AnimationState *)((AnimationState *)((int)this + 0x50)))->AnimationState::Update(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x30)))->AnimationState::Update(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x50)))->AnimationState::Update(); iVar2 = extraout_ECX_00; } if (*(char *)((char *)this + 0x7d4) == '\0') { @@ -52,7 +52,7 @@ void Menu_OnlineMode::Update() } } iVar2 = 0; - modeEntry = (undefined8 *)((int)this + 0x1dc); + modeEntry = (undefined8 *)(GHIDRA_INT(this) + 0x1dc); do { FUN_008cd670(iVar2); if (*(char *)((char *)modeEntry + 0x41) != '\0') { @@ -145,7 +145,7 @@ void Menu_OnlineMode::play_idle_animation() local_14 = 0xffffffff; puStack_18 = &LAB_00b05a78; local_1c = ExceptionList; - securityCookie = __security_cookie ^ (uint)(local_38 + 0x28); + securityCookie = __security_cookie ^ GHIDRA_UINT((local_38 + 0x28)); ExceptionList = &local_1c; if ((g_manager->_lobbySettings)._gameMode != 4) { local_5c = 0xf; @@ -191,7 +191,7 @@ void Menu_OnlineMode::play_idle_animation() isLess = bVar1 < *idleNameChar; if (bVar1 != *idleNameChar) { LAB_008ccc04: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_008ccc09; } if (bVar1 == 0) break; @@ -229,7 +229,7 @@ LAB_008ccc34: isLess = bVar1 < (byte)*challengeNameChar; if (bVar1 != *challengeNameChar) { LAB_008ccaa0: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_008ccaa5; } if (bVar1 == 0) break; @@ -308,7 +308,7 @@ void Menu_OnlineMode::update_mode_select() (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a209e0,&actionId,0,0); if ((isActionTriggered != '\0') && (selection = *(int *)((char *)lobbySettings + 0x7d8), - *(char *)(selection * 0x120 + 0x229 + (int)lobbySettings) == '\0')) { + *(char *)(selection * 0x120 + 0x229 + GHIDRA_INT(lobbySettings)) == '\0')) { if (iVar3 == 2) { if (selection != 0) { bVar4 = selection == 1; @@ -341,7 +341,7 @@ LAB_008cd11b: } else { selection = *(int *)((char *)lobbySettings + 0x7d8); - if (*(char *)(selection * 0x120 + 0x229 + (int)lobbySettings) == '\0') { + if (*(char *)(selection * 0x120 + 0x229 + GHIDRA_INT(lobbySettings)) == '\0') { if (iVar3 == 2) { if (selection == 2) { *(undefined4 *)((char *)lobbySettings + 0x7d8) = 0; @@ -380,7 +380,7 @@ LAB_008ccffc: } else { selection = *(int *)((char *)lobbySettings + 0x7d8); - if (*(char *)(selection * 0x120 + 0x229 + (int)lobbySettings) == '\0') { + if (*(char *)(selection * 0x120 + 0x229 + GHIDRA_INT(lobbySettings)) == '\0') { if (iVar3 == 2) { if (selection == 0) { *(undefined4 *)((char *)lobbySettings + 0x7d8) = 1; @@ -426,7 +426,7 @@ LAB_008cd059: else if (selection == 0) { if (*(int *)lobbySettings == 2) { uVar2 = *(int *)((char *)lobbySettings + 0x7f0) + 1U & 0x80000001; - if ((int)uVar2 < 0) { + if (GHIDRA_INT(uVar2) < 0) { uVar2 = (uVar2 - 1 | 0xfffffffe) + 1; } *(uint *)((char *)lobbySettings + 0x7f0) = uVar2; @@ -450,7 +450,7 @@ LAB_008cd059: } else { selection = *(int *)((char *)lobbySettings + 0x7d8); - if (*(char *)(selection * 0x120 + 0x229 + (int)lobbySettings) == '\0') { + if (*(char *)(selection * 0x120 + 0x229 + GHIDRA_INT(lobbySettings)) == '\0') { if (iVar3 == 2) { if (selection == 1) { *(undefined4 *)((char *)lobbySettings + 0x7d8) = 0; @@ -532,8 +532,8 @@ LAB_008cd119: if (*(int *)((char *)lobbySettings + 0x7d8) != local_c) { iVar3 = local_c * 0x120; local_c = 0x11a; - *(undefined1 *)(iVar3 + 0x228 + (int)lobbySettings) = 0; - *(undefined1 *)(*(int *)((char *)lobbySettings + 0x7d8) * 0x120 + 0x228 + (int)lobbySettings) = 1; + *(undefined1 *)(iVar3 + 0x228 + GHIDRA_INT(lobbySettings)) = 0; + *(undefined1 *)(*(int *)((char *)lobbySettings + 0x7d8) * 0x120 + 0x228 + GHIDRA_INT(lobbySettings)) = 1; seed_fart_sound_override(&local_c); ((SoundEffects *)(&pMVar1->_sfxManager))->SoundEffects::Play(local_c,1.0,2,0,1.0,0.0); } @@ -547,14 +547,14 @@ LAB_008cd119: (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a209e0,&actionId,0,0); if (isActionTriggered != '\0') { iVar3 = *(int *)((char *)lobbySettings + 0x7d8) * 0x120; - if (*(char *)(iVar3 + 0x229 + (int)lobbySettings) == '\0') { + if (*(char *)(iVar3 + 0x229 + GHIDRA_INT(lobbySettings)) == '\0') { savedLobbyType = *(undefined4 *)lobbySettings; ((LobbySettings *)(lobbySettings))->LobbySettings::reset(); *(undefined4 *)lobbySettings = savedLobbyType; FUN_0098aec0(); } else { - *(undefined1 *)(iVar3 + 0x229 + (int)lobbySettings) = 0; + *(undefined1 *)(iVar3 + 0x229 + GHIDRA_INT(lobbySettings)) = 0; if (((*(int *)((char *)lobbySettings + 0x7d8) == 0) && ((manager->_lobbySettings)._gameMode == 4)) && ((manager->_lobbySettings)._challenge == 0)) { (manager->_lobbySettings)._gameMode = 0; @@ -701,7 +701,7 @@ void Menu_OnlineMode::update_seed_input() cVar1 = *textEnd; textEnd = textEnd + 1; } while (cVar1 != '\0'); - ((std::string *)(seed->_buf))->std::string::append((byte *)&local_8,(int)textEnd - ((int)&local_8 + 1)); + ((std::string *)(seed->_buf))->std::string::append((byte *)&local_8,GHIDRA_INT(textEnd) - (GHIDRA_INT(&local_8) + 1)); } keyChar = keyChar + 1; keyCode = keyCode + 1; @@ -718,7 +718,7 @@ void Menu_OnlineMode::update_seed_input() cVar1 = *textEnd; textEnd = textEnd + 1; } while (cVar1 != '\0'); - ((std::string *)(seed->_buf))->std::string::append((byte *)&local_8,(int)textEnd - ((int)&local_8 + 1)); + ((std::string *)(seed->_buf))->std::string::append((byte *)&local_8,GHIDRA_INT(textEnd) - (GHIDRA_INT(&local_8) + 1)); } keyChar = keyChar + 1; keyCode = keyCode + 1; @@ -730,7 +730,7 @@ void Menu_OnlineMode::update_seed_input() cVar1 = *textEnd; textEnd = textEnd + 1; } while (cVar1 != '\0'); - ((std::string *)(seed->_buf))->std::string::append((byte *)&local_8,(int)textEnd - ((int)&local_8 + 1)); + ((std::string *)(seed->_buf))->std::string::append((byte *)&local_8,GHIDRA_INT(textEnd) - (GHIDRA_INT(&local_8) + 1)); } } queryKey = 0x103; @@ -839,21 +839,21 @@ void Menu_OnlineMode::apply_lobby_seed() if ((manager->_lobbySettings)._seed._size == 9) { ((std::string *)(acStackY_b0 + 0x84))->std::string::string(seedText); seedString._buf[4] = (char)in_stack_ffffffd8; - seedString._buf[5] = (char)((uint)in_stack_ffffffd8 >> 8); - seedString._buf[6] = (char)((uint)in_stack_ffffffd8 >> 0x10); - seedString._buf[7] = (char)((uint)in_stack_ffffffd8 >> 0x18); + seedString._buf[5] = (char)(GHIDRA_UINT(in_stack_ffffffd8) >> 8); + seedString._buf[6] = (char)(GHIDRA_UINT(in_stack_ffffffd8) >> 0x10); + seedString._buf[7] = (char)(GHIDRA_UINT(in_stack_ffffffd8) >> 0x18); seedString._buf[0] = (char)in_stack_ffffffd4; - seedString._buf[1] = (char)((uint)in_stack_ffffffd4 >> 8); - seedString._buf[2] = (char)((uint)in_stack_ffffffd4 >> 0x10); - seedString._buf[3] = (char)((uint)in_stack_ffffffd4 >> 0x18); + seedString._buf[1] = (char)(GHIDRA_UINT(in_stack_ffffffd4) >> 8); + seedString._buf[2] = (char)(GHIDRA_UINT(in_stack_ffffffd4) >> 0x10); + seedString._buf[3] = (char)(GHIDRA_UINT(in_stack_ffffffd4) >> 0x18); seedString._buf[8] = (char)in_stack_ffffffdc; - seedString._buf[9] = (char)((uint)in_stack_ffffffdc >> 8); - seedString._buf[10] = (char)((uint)in_stack_ffffffdc >> 0x10); - seedString._buf[0xb] = (char)((uint)in_stack_ffffffdc >> 0x18); + seedString._buf[9] = (char)(GHIDRA_UINT(in_stack_ffffffdc) >> 8); + seedString._buf[10] = (char)(GHIDRA_UINT(in_stack_ffffffdc) >> 0x10); + seedString._buf[0xb] = (char)(GHIDRA_UINT(in_stack_ffffffdc) >> 0x18); seedString._buf[0xc] = (char)in_stack_ffffffe0; - seedString._buf[0xd] = (char)((uint)in_stack_ffffffe0 >> 8); - seedString._buf[0xe] = (char)((uint)in_stack_ffffffe0 >> 0x10); - seedString._buf[0xf] = (char)((uint)in_stack_ffffffe0 >> 0x18); + seedString._buf[0xd] = (char)(GHIDRA_UINT(in_stack_ffffffe0) >> 8); + seedString._buf[0xe] = (char)(GHIDRA_UINT(in_stack_ffffffe0) >> 0x10); + seedString._buf[0xf] = (char)(GHIDRA_UINT(in_stack_ffffffe0) >> 0x18); seedString._size = in_stack_ffffffe4; seedString._capacity = in_stack_ffffffe8; iVar2 = Seeds::GetSeedEffect(seedString); @@ -885,21 +885,21 @@ void Menu_OnlineMode::apply_lobby_seed() menuManager = g_menuManager; ((std::string *)(acStackY_b0 + 0x84))->std::string::string(seedText); seed._buf[4] = (char)uVar4; - seed._buf[5] = (char)((uint)uVar4 >> 8); - seed._buf[6] = (char)((uint)uVar4 >> 0x10); - seed._buf[7] = (char)((uint)uVar4 >> 0x18); + seed._buf[5] = (char)(GHIDRA_UINT(uVar4) >> 8); + seed._buf[6] = (char)(GHIDRA_UINT(uVar4) >> 0x10); + seed._buf[7] = (char)(GHIDRA_UINT(uVar4) >> 0x18); seed._buf[0] = (char)iVar2; - seed._buf[1] = (char)((uint)iVar2 >> 8); - seed._buf[2] = (char)((uint)iVar2 >> 0x10); - seed._buf[3] = (char)((uint)iVar2 >> 0x18); + seed._buf[1] = (char)(GHIDRA_UINT(iVar2) >> 8); + seed._buf[2] = (char)(GHIDRA_UINT(iVar2) >> 0x10); + seed._buf[3] = (char)(GHIDRA_UINT(iVar2) >> 0x18); seed._buf[8] = (char)uVar5; - seed._buf[9] = (char)((uint)uVar5 >> 8); - seed._buf[10] = (char)((uint)uVar5 >> 0x10); - seed._buf[0xb] = (char)((uint)uVar5 >> 0x18); + seed._buf[9] = (char)(GHIDRA_UINT(uVar5) >> 8); + seed._buf[10] = (char)(GHIDRA_UINT(uVar5) >> 0x10); + seed._buf[0xb] = (char)(GHIDRA_UINT(uVar5) >> 0x18); seed._buf[0xc] = (char)uVar6; - seed._buf[0xd] = (char)((uint)uVar6 >> 8); - seed._buf[0xe] = (char)((uint)uVar6 >> 0x10); - seed._buf[0xf] = (char)((uint)uVar6 >> 0x18); + seed._buf[0xd] = (char)(GHIDRA_UINT(uVar6) >> 8); + seed._buf[0xe] = (char)(GHIDRA_UINT(uVar6) >> 0x10); + seed._buf[0xf] = (char)(GHIDRA_UINT(uVar6) >> 0x18); seed._size = uVar7; seed._capacity = uVar3; ((Seeds *)(&menuManager->_seedsObject))->Seeds::SetStartSeed(seed); @@ -908,27 +908,27 @@ void Menu_OnlineMode::apply_lobby_seed() else { ((std::string *)(acStackY_b0 + 0x84))->std::string::string(seedText); seedString_00._buf[4] = (char)in_stack_ffffffd8; - seedString_00._buf[5] = (char)((uint)in_stack_ffffffd8 >> 8); - seedString_00._buf[6] = (char)((uint)in_stack_ffffffd8 >> 0x10); - seedString_00._buf[7] = (char)((uint)in_stack_ffffffd8 >> 0x18); + seedString_00._buf[5] = (char)(GHIDRA_UINT(in_stack_ffffffd8) >> 8); + seedString_00._buf[6] = (char)(GHIDRA_UINT(in_stack_ffffffd8) >> 0x10); + seedString_00._buf[7] = (char)(GHIDRA_UINT(in_stack_ffffffd8) >> 0x18); seedString_00._buf[0] = (char)in_stack_ffffffd4; - seedString_00._buf[1] = (char)((uint)in_stack_ffffffd4 >> 8); - seedString_00._buf[2] = (char)((uint)in_stack_ffffffd4 >> 0x10); - seedString_00._buf[3] = (char)((uint)in_stack_ffffffd4 >> 0x18); + seedString_00._buf[1] = (char)(GHIDRA_UINT(in_stack_ffffffd4) >> 8); + seedString_00._buf[2] = (char)(GHIDRA_UINT(in_stack_ffffffd4) >> 0x10); + seedString_00._buf[3] = (char)(GHIDRA_UINT(in_stack_ffffffd4) >> 0x18); seedString_00._buf[8] = (char)in_stack_ffffffdc; - seedString_00._buf[9] = (char)((uint)in_stack_ffffffdc >> 8); - seedString_00._buf[10] = (char)((uint)in_stack_ffffffdc >> 0x10); - seedString_00._buf[0xb] = (char)((uint)in_stack_ffffffdc >> 0x18); + seedString_00._buf[9] = (char)(GHIDRA_UINT(in_stack_ffffffdc) >> 8); + seedString_00._buf[10] = (char)(GHIDRA_UINT(in_stack_ffffffdc) >> 0x10); + seedString_00._buf[0xb] = (char)(GHIDRA_UINT(in_stack_ffffffdc) >> 0x18); seedString_00._buf[0xc] = (char)in_stack_ffffffe0; - seedString_00._buf[0xd] = (char)((uint)in_stack_ffffffe0 >> 8); - seedString_00._buf[0xe] = (char)((uint)in_stack_ffffffe0 >> 0x10); - seedString_00._buf[0xf] = (char)((uint)in_stack_ffffffe0 >> 0x18); + seedString_00._buf[0xd] = (char)(GHIDRA_UINT(in_stack_ffffffe0) >> 8); + seedString_00._buf[0xe] = (char)(GHIDRA_UINT(in_stack_ffffffe0) >> 0x10); + seedString_00._buf[0xf] = (char)(GHIDRA_UINT(in_stack_ffffffe0) >> 0x18); seedString_00._size = in_stack_ffffffe4; seedString_00._capacity = in_stack_ffffffe8; iVar2 = Seeds::GetSeedEffect(seedString_00); manager = g_manager; if ((g_manager->_persistentGameData)._isReadOnly == 0) { - *(undefined1 *)((int)(g_manager->_persistentGameData)._cutsceneCounters + iVar2 + 0x74) = 1; + *(undefined1 *)(GHIDRA_INT((g_manager->_persistentGameData)._cutsceneCounters) + iVar2 + 0x74) = 1; (*(undefined1 *)((char *)&((manager->_persistentGameData)) + 0xf14)) = 0; *(undefined1 *)&manager->_persistentGameData = 1; KAGE_LogMessage(1,(byte *)"Seed %d added to SaveState\n"); diff --git a/src/game/menu_options.cpp b/src/game/menu_options.cpp index 65b9efc..dcf3746 100644 --- a/src/game/menu_options.cpp +++ b/src/game/menu_options.cpp @@ -87,11 +87,11 @@ void Menu_Options::Init(Vector *position, byte isPauseScreen) undefined1 *puStack_18; undefined4 local_14; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00af18ad; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; anm2Path._size = 0; anm2Path._capacity = 0xf; @@ -99,20 +99,20 @@ void Menu_Options::Init(Vector *position, byte isPauseScreen) anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x30); anm2Path._size = 0x21; anm2Path._capacity = 0x2f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/main menu/OptionsMenu.anm2",0x22); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/main menu/OptionsMenu.anm2",0x22); local_14 = 0; ((ANM2 *)(&this->OptionsSprite))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { size = anm2Path._capacity + 1; - ptr = (char *)anm2Path._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < size) { - ptr = *(char **)(anm2Path._buf._0_4_ + -4); + ptr = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); size = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)ptr))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(ptr)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -121,7 +121,7 @@ void Menu_Options::Init(Vector *position, byte isPauseScreen) } anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = anm2Path._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) & 0xffffff00; *(undefined4 *)this = _isPauseScreen; load_graphics(this); this->PositionX_duplicate = position->x; @@ -145,11 +145,11 @@ void Menu_Options::load_menu_anm2() undefined1 *puStack_18; undefined4 local_14; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00af84fd; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; anm2Path._size = 0; anm2Path._capacity = 0xf; @@ -157,19 +157,19 @@ void Menu_Options::load_menu_anm2() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x30); anm2Path._size = 0x21; anm2Path._capacity = 0x2f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/main menu/OptionsMenu.anm2",0x22); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/main menu/OptionsMenu.anm2",0x22); local_14 = 0; ((ANM2 *)(&this->OptionsSprite))->ANM2::Load(&anm2Path,1); if (0xf < anm2Path._capacity) { size = anm2Path._capacity + 1; - ptr = (char *)anm2Path._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < size) { - ptr = *(char **)(anm2Path._buf._0_4_ + -4); + ptr = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); size = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)ptr))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(ptr)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -222,7 +222,7 @@ void Menu_Options::Update() local_8 = -NAN; puStack_c = &LAB_00b0e44d; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(actionIds + 10); + uVar2 = __security_cookie ^ GHIDRA_UINT((actionIds + 10)); ExceptionList = &local_10; if ((*(int *)this == 1) || (isPauseMenu = '\0', *(int *)this == 2)) { isPauseMenu = '\x01'; @@ -274,10 +274,10 @@ void Menu_Options::Update() if (g_menuManager != (MenuManager *)0x0) { ((Menu_Character *)(&g_menuManager->_menuCharacter))->Menu_Character::Reset(); } - uVar2 = (int)(g_menuManager->_menuStateHistory)._end - - (int)(g_menuManager->_menuStateHistory)._begin >> 2; + uVar2 = GHIDRA_INT((g_menuManager->_menuStateHistory)._end) - + GHIDRA_INT((g_menuManager->_menuStateHistory)._begin) >> 2; if ((uVar2 < 2) || - (*(int *)((int)(g_menuManager->_menuStateHistory)._begin + uVar2 * 4 + -8) != + (*(int *)(GHIDRA_INT((g_menuManager->_menuStateHistory)._begin) + uVar2 * 4 + -8) != *(int *)&(*(undefined1 *)((char *)&(this[1]) + 0x4)))) { ((MenuManager *)(g_menuManager))->MenuManager::SetState(*(int *)&(*(undefined1 *)((char *)&(this[1]) + 0x4)),0); *(undefined1 *)(this + 1) = 0; @@ -287,8 +287,8 @@ void Menu_Options::Update() ((OptionsConfig *)(&g_manager->_optionsConfig))->OptionsConfig::Save(); menuManager = g_menuManager; pvVar8 = (g_menuManager->_menuStateHistory)._end; - if (1 < (uint)((int)pvVar8 - (int)(g_menuManager->_menuStateHistory)._begin >> 2)) { - pvVar8 = (void *)((int)pvVar8 + -4); + if (1 < GHIDRA_UINT((GHIDRA_INT(pvVar8) - GHIDRA_INT((g_menuManager->_menuStateHistory)._begin) >> 2))) { + pvVar8 = (void *)(GHIDRA_INT(pvVar8) + -4); (g_menuManager->_menuStateHistory)._end = pvVar8; } ((MenuManager *)(menuManager))->MenuManager::SetState(*(int *)((char *)pvVar8 + -4),0); @@ -500,12 +500,12 @@ void Menu_Options::Update() pvVar8 = (g_game->_playerManager)._playerList._end; piVar9 = (g_game->_playerManager)._playerList._begin; uVar2 = (g_game->_pauseScreen)._playerIdx; - if ((int)pvVar8 - (int)piVar9 >> 2 == 0) { + if (GHIDRA_INT(pvVar8) - GHIDRA_INT(piVar9) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar8 = (game->_playerManager)._playerList._end; piVar9 = (game->_playerManager)._playerList._begin; } - if (uVar2 < (uint)((int)pvVar8 - (int)piVar9 >> 2)) { + if (uVar2 < GHIDRA_UINT((GHIDRA_INT(pvVar8) - GHIDRA_INT(piVar9) >> 2))) { piVar9 = piVar9 + uVar2; } ((InputManager *)(&PTR_vftable_00c57b18))->InputManager::get_device(&device,*(int *)(*piVar9 + 0x1618)); @@ -605,10 +605,10 @@ LAB_009b2b22: break; case 9: uVar2 = (manager->_optionsConfig)._popupsMode + scrollStep; - if ((int)uVar2 < 0) { + if (GHIDRA_INT(uVar2) < 0) { uVar2 = 2; } - (manager->_optionsConfig)._popupsMode = -(uint)(uVar2 < 3) & uVar2; + (manager->_optionsConfig)._popupsMode = -GHIDRA_UINT((uVar2 < 3)) & uVar2; break; case 0xb: iVar3 = (manager->_optionsConfig)._cameraStyle + scrollStep; @@ -648,7 +648,7 @@ LAB_009b2b22: LAB_009b2c21: local_1c = (Manager *)0xed; seed_fart_sound_override((int *)&local_1c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_1c,1.0,0,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_1c),1.0,0,0,1.0,0.0); LAB_009b300c: manager = g_manager; break; @@ -682,14 +682,14 @@ LAB_009b300c: break; case 0x14: uVar2 = (manager->_optionsConfig)._jacobEsauControls + scrollStep; - if ((int)uVar2 < 0) { + if (GHIDRA_INT(uVar2) < 0) { uVar2 = 1; } - (manager->_optionsConfig)._jacobEsauControls = -(uint)(uVar2 < 2) & uVar2; + (manager->_optionsConfig)._jacobEsauControls = -GHIDRA_UINT((uVar2 < 2)) & uVar2; break; case 0x15: uVar2 = (manager->_optionsConfig)._onlineHud + scrollStep; - if ((int)uVar2 < 0) { + if (GHIDRA_INT(uVar2) < 0) { uVar2 = 3; } onlineHudMode = 0; @@ -836,7 +836,7 @@ void Menu_Options::Render() Manager *manager; uint shaderStackSize; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b0e488; local_1c = ExceptionList; @@ -864,7 +864,7 @@ void Menu_Options::Render() menuY = (g_menuManager->_ViewPosition).y + font->PositionY; local_34.x = menuX; local_34.y = menuY; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); } sprite = &font->OptionsSprite; animName = "Background"; @@ -1031,18 +1031,18 @@ LAB_009b4475: (font->OptionsSprite)._animState._isPlaying = 0; } if (((font->OptionsSprite)._animState._animData != (void *)0x0) && - ((3 < *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80) || + ((3 < *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 3 < *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80))))) { + 3 < *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80))))) { pvVar4 = (font->OptionsSprite)._animState._animData; local_28 = *(uint *)((char *)pvVar4 + 0x44); if ((pvVar4 == (void *)0x0) || - (((int)local_28 < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= (int)local_28)))) { + ((GHIDRA_INT(local_28) < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= GHIDRA_INT(local_28))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(font->OptionsSprite)._animState._layerFrames + local_28 * 4) = 0; + *(undefined4 *)(GHIDRA_INT((font->OptionsSprite)._animState._layerFrames) + local_28 * 4) = 0; AnimationState::AdvanceLayerPosition - (&(font->OptionsSprite)._animState,local_28,(float)(int)sfxVolume); + (&(font->OptionsSprite)._animState,local_28,(float)GHIDRA_INT(sfxVolume)); } break; case 3: @@ -1053,18 +1053,18 @@ LAB_009b4475: (font->OptionsSprite)._animState._isPlaying = 0; } if (((font->OptionsSprite)._animState._animData != (void *)0x0) && - ((3 < *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80) || + ((3 < *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 3 < *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80))))) { + 3 < *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80))))) { pvVar4 = (font->OptionsSprite)._animState._animData; local_28 = *(uint *)((char *)pvVar4 + 0x44); if ((pvVar4 == (void *)0x0) || - (((int)local_28 < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= (int)local_28)))) { + ((GHIDRA_INT(local_28) < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= GHIDRA_INT(local_28))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(font->OptionsSprite)._animState._layerFrames + local_28 * 4) = 0; + *(undefined4 *)(GHIDRA_INT((font->OptionsSprite)._animState._layerFrames) + local_28 * 4) = 0; AnimationState::AdvanceLayerPosition - (&(font->OptionsSprite)._animState,local_28,(float)(int)musicVolume); + (&(font->OptionsSprite)._animState,local_28,(float)GHIDRA_INT(musicVolume)); } break; case 4: @@ -1080,18 +1080,18 @@ LAB_009b39a1: (font->OptionsSprite)._animState._isPlaying = 0; } if (((font->OptionsSprite)._animState._animData != (void *)0x0) && - ((3 < *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80) || + ((3 < *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 3 < *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80))))) { + 3 < *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80))))) { pvVar4 = (font->OptionsSprite)._animState._animData; local_28 = *(uint *)((char *)pvVar4 + 0x44); if ((pvVar4 == (void *)0x0) || - (((int)local_28 < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= (int)local_28)))) { + ((GHIDRA_INT(local_28) < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= GHIDRA_INT(local_28))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(font->OptionsSprite)._animState._layerFrames + local_28 * 4) = 0; + *(undefined4 *)(GHIDRA_INT((font->OptionsSprite)._animState._layerFrames) + local_28 * 4) = 0; AnimationState::AdvanceLayerPosition - (&(font->OptionsSprite)._animState,local_28,(float)(int)local_4c); + (&(font->OptionsSprite)._animState,local_28,(float)GHIDRA_INT(local_4c)); } break; case 6: @@ -1101,20 +1101,20 @@ LAB_009b39a1: (font->OptionsSprite)._animState._animData != (void *)0x0)) { (font->OptionsSprite)._animState._isPlaying = 0; } - local_24 = (float)(uint)((g_manager->_optionsConfig)._isFullscreen == 0); + local_24 = (float)GHIDRA_UINT(((g_manager->_optionsConfig)._isFullscreen == 0)); if (((font->OptionsSprite)._animState._animData != (void *)0x0) && - ((4 < *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80) || + ((4 < *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 4 < *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80))))) { + 4 < *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80))))) { pvVar4 = (font->OptionsSprite)._animState._animData; local_28 = *(uint *)((char *)pvVar4 + 0x48); if ((pvVar4 == (void *)0x0) || - (((int)local_28 < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= (int)local_28)))) { + ((GHIDRA_INT(local_28) < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= GHIDRA_INT(local_28))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(font->OptionsSprite)._animState._layerFrames + local_28 * 4) = 0; + *(undefined4 *)(GHIDRA_INT((font->OptionsSprite)._animState._layerFrames) + local_28 * 4) = 0; AnimationState::AdvanceLayerPosition - (&(font->OptionsSprite)._animState,local_28,(float)(int)local_24); + (&(font->OptionsSprite)._animState,local_28,(float)GHIDRA_INT(local_24)); } break; case 7: @@ -1140,7 +1140,7 @@ LAB_009b39a1: gammaCounterY = local_48 + menuY + 0.0; position.y = gammaCounterY; position.x = gammaCounterX; - render_counter(font,(int)local_34.y,iVar2,position); + render_counter(font,GHIDRA_INT(local_34.y),iVar2,position); break; case 9: bVar1 = ((ANM2 *)(sprite))->ANM2::SetAnimation((byte *)"Popups",1); @@ -1152,54 +1152,54 @@ LAB_009b39a1: iVar2 = (g_manager->_optionsConfig)._popupsMode; if (iVar2 == 1) { if (((font->OptionsSprite)._animState._animData != (void *)0x0) && - ((4 < *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80) || + ((4 < *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 4 < *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80))))) { + 4 < *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80))))) { pvVar4 = (font->OptionsSprite)._animState._animData; local_24 = *(float *)((char *)pvVar4 + 0x48); if ((pvVar4 == (void *)0x0) || - (((int)local_24 < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= (int)local_24)))) { + ((GHIDRA_INT(local_24) < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= GHIDRA_INT(local_24))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(font->OptionsSprite)._animState._layerFrames + (int)local_24 * 4) + *(undefined4 *)(GHIDRA_INT((font->OptionsSprite)._animState._layerFrames) + GHIDRA_INT(local_24) * 4) = 0; AnimationState::AdvanceLayerPosition - (&(font->OptionsSprite)._animState,(int)local_24,0.0); + (&(font->OptionsSprite)._animState,GHIDRA_INT(local_24),0.0); } } else { pvVar4 = (font->OptionsSprite)._animState._animData; if (iVar2 == 2) { if ((pvVar4 != (void *)0x0) && - ((4 < *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80) || + ((4 < *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 4 < *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80))))) { + 4 < *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80))))) { pvVar4 = (font->OptionsSprite)._animState._animData; local_24 = *(float *)((char *)pvVar4 + 0x48); if ((pvVar4 == (void *)0x0) || - (((int)local_24 < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= (int)local_24)))) { + ((GHIDRA_INT(local_24) < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= GHIDRA_INT(local_24))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } *(undefined4 *) - ((int)(font->OptionsSprite)._animState._layerFrames + (int)local_24 * 4) = 0; + (GHIDRA_INT((font->OptionsSprite)._animState._layerFrames) + GHIDRA_INT(local_24) * 4) = 0; AnimationState::AdvanceLayerPosition - (&(font->OptionsSprite)._animState,(int)local_24,1.0); + (&(font->OptionsSprite)._animState,GHIDRA_INT(local_24),1.0); } } else if ((pvVar4 != (void *)0x0) && - ((4 < *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80) || + ((4 < *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 4 < *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80))))) { + 4 < *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80))))) { pvVar4 = (font->OptionsSprite)._animState._animData; local_24 = *(float *)((char *)pvVar4 + 0x48); if ((pvVar4 == (void *)0x0) || - (((int)local_24 < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= (int)local_24)))) { + ((GHIDRA_INT(local_24) < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= GHIDRA_INT(local_24))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(font->OptionsSprite)._animState._layerFrames + (int)local_24 * 4) + *(undefined4 *)(GHIDRA_INT((font->OptionsSprite)._animState._layerFrames) + GHIDRA_INT(local_24) * 4) = 0; AnimationState::AdvanceLayerPosition - (&(font->OptionsSprite)._animState,(int)local_24,2.0); + (&(font->OptionsSprite)._animState,GHIDRA_INT(local_24),2.0); } } break; @@ -1210,7 +1210,7 @@ LAB_009b39a1: (font->OptionsSprite)._animState._animData != (void *)0x0)) { (font->OptionsSprite)._animState._isPlaying = 0; } - local_28 = (uint)((g_manager->_optionsConfig)._cameraStyle != 1); + local_28 = GHIDRA_UINT(((g_manager->_optionsConfig)._cameraStyle != 1)); goto LAB_009b3b63; case 0xc: bVar1 = ((ANM2 *)(sprite))->ANM2::SetAnimation((byte *)"ExtraHUD",1); @@ -1228,36 +1228,36 @@ LAB_009b39a1: (font->OptionsSprite)._animState._animData != (void *)0x0)) { (font->OptionsSprite)._animState._isPlaying = 0; } - local_28 = (uint)((float)(int)local_2c != 10.0); + local_28 = GHIDRA_UINT(((float)GHIDRA_INT(local_2c) != 10.0)); if (((font->OptionsSprite)._animState._animData != (void *)0x0) && - ((4 < *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80) || + ((4 < *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 4 < *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80))))) { + 4 < *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80))))) { pvVar4 = (font->OptionsSprite)._animState._animData; local_24 = *(float *)((char *)pvVar4 + 0x48); if ((pvVar4 == (void *)0x0) || - (((int)local_24 < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= (int)local_24)))) { + ((GHIDRA_INT(local_24) < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= GHIDRA_INT(local_24))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(font->OptionsSprite)._animState._layerFrames + (int)local_24 * 4) = + *(undefined4 *)(GHIDRA_INT((font->OptionsSprite)._animState._layerFrames) + GHIDRA_INT(local_24) * 4) = 0; AnimationState::AdvanceLayerPosition - (&(font->OptionsSprite)._animState,(int)local_24,(float)(int)local_28); + (&(font->OptionsSprite)._animState,GHIDRA_INT(local_24),(float)GHIDRA_INT(local_28)); } if (((font->OptionsSprite)._animState._animData != (void *)0x0) && - ((3 < *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80) || + ((3 < *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 3 < *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80))))) { + 3 < *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80))))) { pvVar4 = (font->OptionsSprite)._animState._animData; local_24 = *(float *)((char *)pvVar4 + 0x44); if ((pvVar4 == (void *)0x0) || - (((int)local_24 < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= (int)local_24)))) { + ((GHIDRA_INT(local_24) < 0 || (*(int *)((char *)pvVar4 + 0x1c) <= GHIDRA_INT(local_24))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(font->OptionsSprite)._animState._layerFrames + (int)local_24 * 4) = + *(undefined4 *)(GHIDRA_INT((font->OptionsSprite)._animState._layerFrames) + GHIDRA_INT(local_24) * 4) = 0; AnimationState::AdvanceLayerPosition - (&(font->OptionsSprite)._animState,(int)local_24,(float)(int)local_2c); + (&(font->OptionsSprite)._animState,GHIDRA_INT(local_24),(float)GHIDRA_INT(local_2c)); } break; case 0xe: @@ -1328,7 +1328,7 @@ LAB_009b39a1: (font->OptionsSprite)._animState._animData != (void *)0x0)) { (font->OptionsSprite)._animState._isPlaying = 0; } - local_28 = (uint)((g_manager->_optionsConfig)._jacobEsauControls != 1); + local_28 = GHIDRA_UINT(((g_manager->_optionsConfig)._jacobEsauControls != 1)); goto LAB_009b3b63; case 0x15: bVar1 = ((ANM2 *)(sprite))->ANM2::SetAnimation((byte *)"MultiplayerHUD",1); @@ -1376,9 +1376,9 @@ LAB_009b39a1: local_28 = (g_manager->_optionsConfig)._onlinePlayerOpacity; LAB_009b434b: if (((font->OptionsSprite)._animState._animData == (void *)0x0) || - ((*(int *)((int)(font->OptionsSprite)._animState._animation + 0x80) < 4 && + ((*(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80) < 4 && (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80) < 4)))) break; + *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80) < 4)))) break; pvVar4 = (font->OptionsSprite)._animState._animData; local_24 = *(float *)((char *)pvVar4 + 0x44); goto LAB_009b3ba4; @@ -1395,14 +1395,14 @@ LAB_009b434b: KAGE_LogMessage(4,(byte *)"[warn] no layer named %s\n"); } else { - ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar3->_layerData,(int)local_24); + ((ANM2 *)(sprite))->ANM2::SetLayerFrame(*(int *)pLVar3->_layerData,GHIDRA_INT(local_24)); } break; case 0x1b: local_24 = (float)(g_manager->_optionsConfig)._onlineInputDelay; bVar1 = ((ANM2 *)(sprite))->ANM2::SetAnimation((byte *)"InputDelay",1); if ((bVar1 != 0) && ((font->OptionsSprite)._animState._animData != (void *)0x0)) { - fVar5 = (float)(int)local_24; + fVar5 = (float)GHIDRA_INT(local_24); goto LAB_009b4475; } break; @@ -1415,23 +1415,23 @@ LAB_009b434b: } isOptionOff = (g_manager->_optionsConfig)._itemInfoDisplayEnabled == 0; LAB_009b3b5d: - local_28 = (uint)isOptionOff; + local_28 = GHIDRA_UINT(isOptionOff); LAB_009b3b63: if (((font->OptionsSprite)._animState._animData != (void *)0x0) && - ((4 < *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80) || + ((4 < *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 4 < *(int *)((int)(font->OptionsSprite)._animState._animation + 0x80))))) { + 4 < *(int *)(GHIDRA_INT((font->OptionsSprite)._animState._animation) + 0x80))))) { pvVar4 = (font->OptionsSprite)._animState._animData; local_24 = *(float *)((char *)pvVar4 + 0x48); LAB_009b3ba4: - if (((pvVar4 == (void *)0x0) || ((int)local_24 < 0)) || - (*(int *)((char *)pvVar4 + 0x1c) <= (int)local_24)) { + if (((pvVar4 == (void *)0x0) || (GHIDRA_INT(local_24) < 0)) || + (*(int *)((char *)pvVar4 + 0x1c) <= GHIDRA_INT(local_24))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(font->OptionsSprite)._animState._layerFrames + (int)local_24 * 4) = + *(undefined4 *)(GHIDRA_INT((font->OptionsSprite)._animState._layerFrames) + GHIDRA_INT(local_24) * 4) = 0; AnimationState::AdvanceLayerPosition - (&(font->OptionsSprite)._animState,(int)local_24,(float)(int)local_28); + (&(font->OptionsSprite)._animState,GHIDRA_INT(local_24),(float)GHIDRA_INT(local_28)); } } if (local_38 == font->SelectedElement) { @@ -1512,7 +1512,7 @@ LAB_009b3ba4: local_24 = (g_screenWidth - (float)((double)iVar2 + __uint_to_double_fixup[-(iVar2 >> 0x1f)])) * 0.5; pvVar4 = ((Font *)(font))->Font::measure_string(glyphRun,str,&local_78,&g_vectorOne); - local_14 = CONCAT31(local_14._1_3_,1); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); color._blue = 1.0; color._red = 1.0; color._green = 1.0; @@ -1549,11 +1549,11 @@ void Menu_Options::load_graphics() void *layerData; undefined4 *optionIdsEnd; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00af19c5; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; optionIdsEnd = *(undefined4 **)this[1].OptionsSprite._filename._buf; *(undefined4 **)(this[1].OptionsSprite._filename._buf + 4) = optionIdsEnd; @@ -1564,7 +1564,7 @@ void Menu_Options::load_graphics() *optionIdsEnd = 0; pcVar2 = this[1].OptionsSprite._filename._buf + 4; *(int *)pcVar2 = *(int *)pcVar2 + 4; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); } else { optionId = 1; @@ -1576,7 +1576,7 @@ LAB_009b489a: *optionIdsEnd = 1; pcVar2 = this[1].OptionsSprite._filename._buf + 4; *(int *)pcVar2 = *(int *)pcVar2 + 4; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); } } if (*(int *)this != 3) { @@ -1766,7 +1766,7 @@ LAB_009b4d28: nameText = &s_empty; } else { - nameText = (byte *)((int)layerData + 8); + nameText = (byte *)(GHIDRA_INT(layerData) + 8); if (0xf < *(uint *)((char *)layerData + 0x1c)) { nameText = *(byte **)nameText; } @@ -1778,7 +1778,7 @@ LAB_009b4d28: } layerCount = (this->OptionsSprite)._layerCount; pbVar4 = pbVar4 + 1; - } while ((int)pbVar4 < layerCount); + } while (GHIDRA_INT(pbVar4) < layerCount); } pbVar4 = (byte *)0x0; if (0 < layerCount) { @@ -1791,26 +1791,26 @@ LAB_009b4d28: uVar3 = std::string::find((byte *)haystack,(layer->_spriteSheetPath)._size,0, (byte *)"OptionsMenu.png",0xf); if (uVar3 != 0xffffffff) { - path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(path._buf) + 0x0)) = std::_Allocate(0x30); path._size = 0x24; path._capacity = 0x2f; - builtin_strncpy((char *)path._buf._0_4_,"gfx/ui/main menu/OptionsMenuDark.png",0x25); + builtin_strncpy((*(undefined4 *)((char *)&((char *)path._buf) + 0x0)),"gfx/ui/main menu/OptionsMenuDark.png",0x25); local_14 = 0; - ((Sprite *)((Sprite *)&this->OptionsSprite))->Sprite::ReplaceSpritesheet((int)pbVar4,&path); + ((Sprite *)((Sprite *)&this->OptionsSprite))->Sprite::ReplaceSpritesheet(GHIDRA_INT(pbVar4),&path); local_14 = 0xffffffff; if (0xf < path._capacity) { uVar3 = path._capacity + 1; - pcVar2 = (char *)path._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)path._buf) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(path._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(path._buf) + 0x0)) + -4); uVar3 = path._capacity + 0x24; - if ((char *)0x1f < (char *)(path._buf._0_4_ + (-4 - (int)pcVar2))) goto LAB_009b4f13; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) goto LAB_009b4f13; } operator_delete(pcVar2,uVar3); } } pbVar4 = pbVar4 + 1; - } while ((int)pbVar4 < (this->OptionsSprite)._layerCount); + } while (GHIDRA_INT(pbVar4) < (this->OptionsSprite)._layerCount); } ((ANM2 *)(&this->OptionsSprite))->ANM2::LoadGraphics((byte)&this->OptionsSprite); } @@ -1893,20 +1893,20 @@ LAB_009b4d28: path._buf[1] = '\0'; path._buf[2] = '\0'; path._buf[3] = '\0'; - path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(path._buf) + 0x0)) = std::_Allocate(0x20); path._size = 0x1f; path._capacity = 0x1f; - builtin_strncpy((char *)path._buf._0_4_,"gfx/ui/main menu/GammaMenu.anm2",0x20); + builtin_strncpy((*(undefined4 *)((char *)&((char *)path._buf) + 0x0)),"gfx/ui/main menu/GammaMenu.anm2",0x20); local_14 = 1; ((ANM2 *)(&this->GammaMenuSprite))->ANM2::Load(&path,1); local_14 = 0xffffffff; if (0xf < path._capacity) { uVar3 = path._capacity + 1; - pcVar2 = (char *)path._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)path._buf) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(path._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(path._buf) + 0x0)) + -4); uVar3 = path._capacity + 0x24; - if ((char *)0x1f < (char *)(path._buf._0_4_ + (-4 - (int)pcVar2))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) { LAB_009b4f13: local_14 = 0xffffffff; /* WARNING: Subroutine does not return */ @@ -1927,7 +1927,7 @@ LAB_009b4f13: isLess = bVar1 < (byte)*pcVar2; if (bVar1 != *pcVar2) { LAB_009b4f60: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_009b4f65; } if (bVar1 == 0) break; @@ -1980,7 +1980,7 @@ void Menu_Options::render_counter(int value, int unused, Vector position) } do { if ((digitAnim->GammaMenuSprite)._animState._animData != (void *)0x0) { - ((AnimationState *)(digitAnim))->AnimationState::SetFrameFloat((float)((int)remainingValue % 10)); + ((AnimationState *)(digitAnim))->AnimationState::SetFrameFloat((float)(GHIDRA_INT(remainingValue) % 10)); } if ((digitAnim->GammaMenuSprite)._loaded != 0) { if ((digitAnim->GammaMenuSprite)._overlayRenderFirst == 0) { @@ -1996,7 +1996,7 @@ void Menu_Options::render_counter(int value, int unused, Vector position) AnimationState::Render(pAVar1,&position,&g_vectorZero,&g_vectorZero); } position.x = position.x - 11.0; - remainingValue = (uint)(((int)remainingValue / 10) * 10) / 10; + remainingValue = GHIDRA_UINT(((GHIDRA_INT(remainingValue) / 10) * 10)) / 10; position.y = position.y + 0.0; digitGroupCounter = digitGroupCounter + -1; if (digitGroupCounter == 0) { diff --git a/src/game/menu_save.cpp b/src/game/menu_save.cpp index af90b64..a095f5f 100644 --- a/src/game/menu_save.cpp +++ b/src/game/menu_save.cpp @@ -44,7 +44,7 @@ void Menu_Save::select_save_slot(void *lobbyHandleVtable, void *lobby, void *lob puStack_c = &LAB_00b038ea; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(attrKey + 0x7c); + local_18 = __security_cookie ^ GHIDRA_UINT((attrKey + 0x7c)); ExceptionList = &local_10; uVar7 = 0; local_b4 = 0; @@ -56,8 +56,8 @@ void Menu_Save::select_save_slot(void *lobbyHandleVtable, void *lobby, void *lob else { iVar2 = (**(code **)(*(int *)lobby + 0x3c))(local_18); } - MVar3._1_3_ = 0; - MVar3._0_1_ = iVar2 != 3; + (*(undefined1 *)((char *)&(MVar3) + 0x1)) = 0; + (*(undefined1 *)((char *)&(MVar3) + 0x0)) = iVar2 != 3; *this = MVar3; if (lobby == (void *)0x0) { MVar3 = (Menu_Save)0x0; @@ -98,7 +98,7 @@ void Menu_Save::select_save_slot(void *lobbyHandleVtable, void *lobby, void *lob ch = *attrEnd; attrEnd = attrEnd + 1; } while (ch != 0); - ((std::string *)((char *)(this + 6)))->std::string::assign(attrValue,(int)attrEnd - (int)(attrValue + 1)); + ((std::string *)((char *)(this + 6)))->std::string::assign(attrValue,GHIDRA_INT(attrEnd) - GHIDRA_INT((attrValue + 1))); if (lobby == (void *)0x0) { attrValue = (byte *)0x0; } @@ -110,7 +110,7 @@ void Menu_Save::select_save_slot(void *lobbyHandleVtable, void *lobby, void *lob ch = *attrEnd; attrEnd = attrEnd + 1; } while (ch != 0); - ((std::string *)((char *)(this + 0xc)))->std::string::assign(attrValue,(int)attrEnd - (int)(attrValue + 1)); + ((std::string *)((char *)(this + 0xc)))->std::string::assign(attrValue,GHIDRA_INT(attrEnd) - GHIDRA_INT((attrValue + 1))); this[0x13] = this[0x12]; bannedChunkIndex = 0; if (lobby == (void *)0x0) { @@ -127,27 +127,27 @@ void Menu_Save::select_save_slot(void *lobbyHandleVtable, void *lobby, void *lob ch = *attrEnd; attrEnd = attrEnd + 1; } while (ch != 0); - ((std::string *)((char *)bannedText))->std::string::assign(attrValue,(int)attrEnd - (int)(attrValue + 1)); + ((std::string *)((char *)bannedText))->std::string::assign(attrValue,GHIDRA_INT(attrEnd) - GHIDRA_INT((attrValue + 1))); uVar5 = extraout_EDX; if (bannedTextSize != 0) { while( true ) { - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); local_b4 = uVar7 | 1; tokensBegin = (int *)0x0; tokensEnd = (int *)0x0; tokensCapEnd = 0; local_9c = local_b4; - string_split(bannedText,(std_string *)CONCAT31((int3)((uint)uVar5 >> 8),0x2c), + string_split(bannedText,(std_string *)CONCAT31((int3)(GHIDRA_UINT(uVar5) >> 8),0x2c), (byte)&tokensBegin); tokenArray = tokensBegin; uVar7 = 0; - tokenCount = ((int)tokensEnd - (int)tokensBegin) / 0x18; + tokenCount = (GHIDRA_INT(tokensEnd) - GHIDRA_INT(tokensBegin)) / 0x18; if (tokenCount != 0) { piVar6 = tokensBegin; do { errnoPtr = _errno(); piVar8 = piVar6; - if (0xf < (uint)piVar6[5]) { + if (0xf < GHIDRA_UINT(piVar6[5])) { piVar8 = (int *)*piVar6; } *errnoPtr = 0; @@ -167,7 +167,7 @@ void Menu_Save::select_save_slot(void *lobbyHandleVtable, void *lobby, void *lob } else { *(undefined8 *)MVar3 = bannedUserId; - settings[0x13] = (Menu_Save)((int)settings[0x13] + 8); + settings[0x13] = (Menu_Save)(GHIDRA_INT(settings[0x13]) + 8); } uVar7 = uVar7 + 1; piVar6 = piVar6 + 6; @@ -187,10 +187,10 @@ void Menu_Save::select_save_slot(void *lobbyHandleVtable, void *lobby, void *lob ch = *attrEnd; attrEnd = attrEnd + 1; } while (ch != 0); - ((std::string *)((char *)bannedText))->std::string::assign(attrValue,(int)attrEnd - (int)(attrValue + 1)); + ((std::string *)((char *)bannedText))->std::string::assign(attrValue,GHIDRA_INT(attrEnd) - GHIDRA_INT((attrValue + 1))); tokensEndCopy = tokensEnd; local_9c = local_9c & 0xfffffffe; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); uVar5 = extraout_EDX_00; piVar8 = piVar6; if (piVar6 != (int *)0x0) { @@ -203,7 +203,7 @@ void Menu_Save::select_save_slot(void *lobbyHandleVtable, void *lobby, void *lob if (0xfff < size) { ptr = *(void **)((char *)pvVar4 + -4); size = uVar7 + 0x24; - if (0x1f < (uint)((int)pvVar4 + (-4 - (int)ptr))) goto LAB_0085b728; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar4) + (-4 - GHIDRA_INT(ptr))))) goto LAB_0085b728; } operator_delete(ptr,size); } @@ -211,12 +211,12 @@ void Menu_Save::select_save_slot(void *lobbyHandleVtable, void *lobby, void *lob piVar8[5] = 0xf; *(undefined1 *)piVar8 = 0; } - uVar7 = ((tokensCapEnd - (int)piVar6) / 0x18) * 0x18; + uVar7 = ((tokensCapEnd - GHIDRA_INT(piVar6)) / 0x18) * 0x18; piVar8 = piVar6; if (0xfff < uVar7) { piVar8 = (int *)piVar6[-1]; uVar7 = uVar7 + 0x23; - if ((undefined1 *)0x1f < (undefined1 *)((int)piVar6 + (-4 - (int)piVar8))) + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(piVar6) + (-4 - GHIDRA_INT(piVar8)))) goto LAB_0085b728; } operator_delete(piVar8,uVar7); @@ -235,9 +235,9 @@ LAB_0085b6fb: uVar7 = bannedTextCapacity + 1; pvVar4 = bannedText[0]; if (0xfff < uVar7) { - pvVar4 = *(void **)((int)bannedText[0] + -4); + pvVar4 = *(void **)(GHIDRA_INT(bannedText[0]) + -4); uVar7 = bannedTextCapacity + 0x24; - if (0x1f < (uint)((int)bannedText[0] + (-4 - (int)pvVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(bannedText[0]) + (-4 - GHIDRA_INT(pvVar4))))) { LAB_0085b728: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -339,7 +339,7 @@ void Menu_Save::load_slot_data() local_14 = 0xffffffff; puStack_18 = &LAB_00b0a002; local_1c = ExceptionList; - uVar2 = __security_cookie ^ (uint)(timestamp + 0x2c); + uVar2 = __security_cookie ^ GHIDRA_UINT((timestamp + 0x2c)); ExceptionList = &local_1c; stackCookie = uVar2; sprintf(fileName,(byte *)"sharedsave%d.dat"); @@ -386,18 +386,18 @@ LAB_00919ab9: iStack_70 = utcTime->tm_wday; iStack_6c = utcTime->tm_yday; local_68 = utcTime->tm_isdst; - local_2ffc = (int *)(int)(char)utcTime->tm_sec; + local_2ffc = (int *)GHIDRA_INT((char)utcTime->tm_sec); sprintf_s(timestamp,0x18,(byte *)"%02d_%02d_%d__%02d_%02d_%02d"); LAB_00919b8b: local_2ff0 = (PersistentGameData *)0x0; (**(code **)(*piVar3 + 0x14))(&local_2ff0,4,1); pPVar1 = local_2ff0; - local_2ff4 = operator_new_tracked((uint)local_2ff0); + local_2ff4 = operator_new_tracked(GHIDRA_UINT(local_2ff0)); (**(code **)(*piVar3 + 0x14))(local_2ff4,1,pPVar1); local_2ff0 = (PersistentGameData *)0x0; (**(code **)(*piVar3 + 0x14))(&local_2ff0,4,1); pPVar5 = local_2ff0; - local_2ff0 = operator_new_tracked((uint)local_2ff0); + local_2ff0 = operator_new_tracked(GHIDRA_UINT(local_2ff0)); (**(code **)(*piVar3 + 0x14))(local_2ff0,1,pPVar5); (**(code **)*piVar3)(1); ((KAGE::Filesys::BufferedStream *)(&shareStartStream))->KAGE::Filesys::BufferedStream::BufferedStream(0); @@ -414,7 +414,7 @@ LAB_00919b8b: uStack_cc = 0; local_14 = 1; ((KAGE::Filesys::BufferedStream *)(shareEndStream))->KAGE::Filesys::BufferedStream::BufferedStream(0); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; (**(code **)(shareEndStream[0] + 8))(); (**(code **)(shareEndStream[0] + 4))(0,0xffffffff); shareEndReader = 0; @@ -434,10 +434,10 @@ LAB_00919b8b: iStack_6c = 0; iStack_70 = 0; iStack_7c = 0; - local_90._4_4_ = KAGE::Filesys::BufferedStream::vftable; + (*(undefined4 *)((char *)&(local_90) + 0x4)) = KAGE::Filesys::BufferedStream::vftable; local_64 = KAGE::Filesys::BufferedStream::vftable; - local_14._0_1_ = 4; - ((KAGE::Filesys::BufferedStream *)(&shareStartStream))->KAGE::Filesys::BufferedStream::operator_assign((void *)((int)&local_90 + 4)); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; + ((KAGE::Filesys::BufferedStream *)(&shareStartStream))->KAGE::Filesys::BufferedStream::operator_assign((void *)(GHIDRA_INT(&local_90) + 4)); FUN_00a58200(); pPVar1 = local_2ff0; iStack_80 = 0; @@ -449,11 +449,11 @@ LAB_00919b8b: iStack_6c = 0; iStack_70 = 0; iStack_7c = 0; - local_90._4_4_ = KAGE::Filesys::BufferedStream::vftable; + (*(undefined4 *)((char *)&(local_90) + 0x4)) = KAGE::Filesys::BufferedStream::vftable; local_64 = KAGE::Filesys::BufferedStream::vftable; - local_14._0_1_ = 5; - ((KAGE::Filesys::BufferedStream *)(shareEndStream))->KAGE::Filesys::BufferedStream::operator_assign((void *)((int)&local_90 + 4)); - local_14 = CONCAT31(local_14._1_3_,3); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; + ((KAGE::Filesys::BufferedStream *)(shareEndStream))->KAGE::Filesys::BufferedStream::operator_assign((void *)(GHIDRA_INT(&local_90) + 4)); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),3); FUN_00a58200(); if (1 < local_2fea) { local_a8 = local_c4 - 0x20; @@ -471,29 +471,29 @@ LAB_00919b8b: pPVar5 = &g_manager->_persistentGameData; local_2ff0 = pPVar5; ((PersistentGameData *)(&previousGameData))->PersistentGameData::copy_constructor(pPVar5); - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; ((PersistentGameData *)(&shareStartData))->PersistentGameData::constructor(); - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; ((PersistentGameData *)(&shareEndData))->PersistentGameData::constructor(); - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; ((PersistentGameDataReader *)(&shareStartReader))->PersistentGameDataReader::read(&shareStartData); ((PersistentGameDataReader *)(&shareEndReader))->PersistentGameDataReader::read(&shareEndData); if (local_2ff4 != (void *)0x0) { - local_14._0_1_ = 9; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; tracked_alloc(1,local_2ff4,0); - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; } if (pPVar1 != (PersistentGameData *)0x0) { - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; tracked_alloc(1,pPVar1,0); - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; } ((Manager *)(g_manager))->Manager::SetSaveSlot(g_manager->_currentSaveSlot); local_2ff4 = (void *)0x6b; - iVar6 = (int)&shareEndData + (1 - (int)pPVar5); + iVar6 = GHIDRA_INT(&shareEndData) + (1 - GHIDRA_INT(pPVar5)); achievement = (manager->_persistentGameData)._achievements + 1; - shareEndOffset = (int)&shareEndData - (int)pPVar5; - iVar4 = (int)&shareEndData + (2 - (int)pPVar5); + shareEndOffset = GHIDRA_INT(&shareEndData) - GHIDRA_INT(pPVar5); + iVar4 = GHIDRA_INT(&shareEndData) + (2 - GHIDRA_INT(pPVar5)); shareEndAchievement = shareEndData._achievements; do { if ((achievement[-1] == 0) && (*shareEndAchievement == 0)) { @@ -524,14 +524,14 @@ LAB_00919b8b: isAchieved = 1; } achievement[2] = isAchieved; - if ((achievement[3] == 0) && (achievement[(int)&shareEndData + (3 - (int)pPVar5)] == 0)) { + if ((achievement[3] == 0) && (achievement[GHIDRA_INT(&shareEndData) + (3 - GHIDRA_INT(pPVar5))] == 0)) { isAchieved = 0; } else { isAchieved = 1; } achievement[3] = isAchieved; - if ((achievement[4] == 0) && (achievement[(int)&shareEndData + (4 - (int)pPVar5)] == 0)) { + if ((achievement[4] == 0) && (achievement[GHIDRA_INT(&shareEndData) + (4 - GHIDRA_INT(pPVar5))] == 0)) { isAchieved = 0; } else { @@ -540,13 +540,13 @@ LAB_00919b8b: achievement[4] = isAchieved; shareEndAchievement = shareEndAchievement + 6; achievement = achievement + 6; - local_2ff4 = (void *)((int)local_2ff4 + -1); + local_2ff4 = (void *)(GHIDRA_INT(local_2ff4) + -1); } while (local_2ff4 != (void *)0x0); - shareStartOffset = (int)&shareStartData - (int)local_2ff0; + shareStartOffset = GHIDRA_INT(&shareStartData) - GHIDRA_INT(local_2ff0); piVar3 = local_2ff0->_eventCounters; remaining = 0x20b; do { - gain = *(int *)((char *)piVar3 + shareEndOffset) - *(int *)(shareStartOffset + (int)piVar3); + gain = *(int *)((char *)piVar3 + shareEndOffset) - *(int *)(shareStartOffset + GHIDRA_INT(piVar3)); if (gain < 0) { gain = 0; } @@ -565,7 +565,7 @@ LAB_00919b8b: } *flagCursor = isFlagSet; flagCursor = flagCursor + 1; - local_2ff4 = (void *)((int)local_2ff4 + -1); + local_2ff4 = (void *)(GHIDRA_INT(local_2ff4) + -1); } while (local_2ff4 != (void *)0x0); piVar3 = (int *)&(*(undefined1 *)((char *)(local_2ff0) + 0xdc8)); remaining = 0xe; @@ -578,49 +578,49 @@ LAB_00919b8b: piVar3 = piVar3 + 1; remaining = remaining + -1; } while (remaining != 0); - if (((*(undefined1 *)((char *)(local_2ff0) + 0xe00)) == '\0') && (shareEndData._3584_1_ == '\0')) { + if (((*(undefined1 *)((char *)(local_2ff0) + 0xe00)) == '\0') && ((*(undefined1 *)((char *)&(shareEndData) + 0xe00)) == '\0')) { isMerged = 0; } else { isMerged = 1; } (*(undefined1 *)((char *)(local_2ff0) + 0xe00)) = isMerged; - if (((*(undefined1 *)((char *)(local_2ff0) + 0xe01)) == '\0') && (shareEndData._3585_1_ == '\0')) { + if (((*(undefined1 *)((char *)(local_2ff0) + 0xe01)) == '\0') && ((*(undefined1 *)((char *)&(shareEndData) + 0xe01)) == '\0')) { isMerged = 0; } else { isMerged = 1; } (*(undefined1 *)((char *)(local_2ff0) + 0xe01)) = isMerged; - if (((*(undefined1 *)((char *)(local_2ff0) + 0xe02)) == '\0') && (shareEndData._3586_1_ == '\0')) { + if (((*(undefined1 *)((char *)(local_2ff0) + 0xe02)) == '\0') && ((*(undefined1 *)((char *)&(shareEndData) + 0xe02)) == '\0')) { isMerged = 0; } else { isMerged = 1; } (*(undefined1 *)((char *)(local_2ff0) + 0xe02)) = isMerged; - if (((*(undefined1 *)((char *)(local_2ff0) + 0xe03)) == '\0') && (shareEndData._3587_1_ == '\0')) { + if (((*(undefined1 *)((char *)(local_2ff0) + 0xe03)) == '\0') && ((*(undefined1 *)((char *)&(shareEndData) + 0xe03)) == '\0')) { isMerged = 0; } else { isMerged = 1; } (*(undefined1 *)((char *)(local_2ff0) + 0xe03)) = isMerged; - if (((*(undefined1 *)((char *)(local_2ff0) + 0xe04)) == '\0') && (shareEndData._3588_1_ == '\0')) { + if (((*(undefined1 *)((char *)(local_2ff0) + 0xe04)) == '\0') && ((*(undefined1 *)((char *)&(shareEndData) + 0xe04)) == '\0')) { isMerged = 0; } else { isMerged = 1; } (*(undefined1 *)((char *)(local_2ff0) + 0xe04)) = isMerged; - if (((*(undefined1 *)((char *)(local_2ff0) + 0xe05)) == '\0') && (shareEndData._3589_1_ == '\0')) { + if (((*(undefined1 *)((char *)(local_2ff0) + 0xe05)) == '\0') && ((*(undefined1 *)((char *)&(shareEndData) + 0xe05)) == '\0')) { isMerged = 0; } else { isMerged = 1; } (*(undefined1 *)((char *)(local_2ff0) + 0xe05)) = isMerged; - if (((*(undefined1 *)((char *)(local_2ff0) + 0xe06)) == '\0') && (shareEndData._3590_1_ == '\0')) { + if (((*(undefined1 *)((char *)(local_2ff0) + 0xe06)) == '\0') && ((*(undefined1 *)((char *)&(shareEndData) + 0xe06)) == '\0')) { isMerged = 0; } else { @@ -661,7 +661,7 @@ LAB_00919b8b: dstFlag[2] = isFlagSet; flagCursor = flagCursor + 4; dstFlag = dstFlag + 4; - local_2ff4 = (void *)((int)local_2ff4 + -1); + local_2ff4 = (void *)(GHIDRA_INT(local_2ff4) + -1); } while (local_2ff4 != (void *)0x0); iVar6 = 0x1b; piVar3 = local_2ff0->_cutsceneCounters; @@ -836,7 +836,7 @@ void Menu_Save::unload_graphics() AnmCache::RemoveRef((std_string *)(spriteFields + -10)); } stringBuf = (Menu_Save)(spriteFields + -10); - if (0xf < (uint)spriteFields[-5]) { + if (0xf < GHIDRA_UINT(spriteFields[-5])) { stringBuf = *(Menu_Save *)stringBuf; } spriteFields[-6] = (Menu_Save)0x0; @@ -844,7 +844,7 @@ void Menu_Save::unload_graphics() ((AnimationState *)((AnimationState *)(spriteFields + 2)))->AnimationState::SetAnimationData((void *)0x0); ((AnimationState *)((AnimationState *)(spriteFields + 10)))->AnimationState::SetAnimationData((void *)0x0); stringBuf = (Menu_Save)(spriteFields + -4); - if (0xf < (uint)spriteFields[1]) { + if (0xf < GHIDRA_UINT(spriteFields[1])) { stringBuf = *(Menu_Save *)stringBuf; } *spriteFields = (Menu_Save)0x0; @@ -853,7 +853,7 @@ void Menu_Save::unload_graphics() spriteFields[0x13] = (Menu_Save)0x0; spriteFields[0x14] = (Menu_Save)0x0; if (stringBuf != (Menu_Save)0x0) { - ptr = (uint *)((int)stringBuf + -4); + ptr = (uint *)(GHIDRA_INT(stringBuf) + -4); local_8 = 0; _eh_vector_destructor_iterator_((void *)stringBuf,0xa0,*ptr,LayerState::~LayerState); operator_delete(ptr,*ptr * 0xa0 + 4); @@ -922,11 +922,11 @@ void Menu_Save::LoadGraphics() undefined1 *puStack_18; undefined4 local_14; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b0f425; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; menuPath._size = 0; menuPath._capacity = 0xf; @@ -934,20 +934,20 @@ void Menu_Save::LoadGraphics() menuPath._buf[1] = '\0'; menuPath._buf[2] = '\0'; menuPath._buf[3] = '\0'; - menuPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(menuPath._buf) + 0x0)) = std::_Allocate(0x30); menuPath._size = 0x24; menuPath._capacity = 0x2f; - builtin_strncpy((char *)menuPath._buf._0_4_,"gfx/ui/main menu/SaveSelectMenu.anm2",0x25); + builtin_strncpy((*(undefined4 *)((char *)&((char *)menuPath._buf) + 0x0)),"gfx/ui/main menu/SaveSelectMenu.anm2",0x25); local_14 = 0; ((ANM2 *)((ANM2 *)(in_ECX + 6)))->ANM2::Load(&menuPath,1); local_14 = 0xffffffff; if (0xf < menuPath._capacity) { uVar1 = menuPath._capacity + 1; - allocBlock = (char *)menuPath._buf._0_4_; + allocBlock = (*(undefined4 *)((char *)&((char *)menuPath._buf) + 0x0)); if (0xfff < uVar1) { - allocBlock = *(char **)(menuPath._buf._0_4_ + -4); + allocBlock = *(char **)((*(undefined4 *)((char *)&(menuPath._buf) + 0x0)) + -4); uVar1 = menuPath._capacity + 0x24; - if ((char *)0x1f < (char *)(menuPath._buf._0_4_ + (-4 - (int)allocBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(menuPath._buf) + 0x0)) + (-4 - GHIDRA_INT(allocBlock)))) { LAB_009d963b: local_14 = 0xffffffff; /* WARNING: Subroutine does not return */ @@ -962,20 +962,20 @@ LAB_009d963b: menuPath._buf[1] = '\0'; menuPath._buf[2] = '\0'; menuPath._buf[3] = '\0'; - menuPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(menuPath._buf) + 0x0)) = std::_Allocate(0x30); menuPath._size = 0x24; menuPath._capacity = 0x2f; - builtin_strncpy((char *)menuPath._buf._0_4_,"gfx/ui/main menu/SaveSelectMenu.anm2",0x25); + builtin_strncpy((*(undefined4 *)((char *)&((char *)menuPath._buf) + 0x0)),"gfx/ui/main menu/SaveSelectMenu.anm2",0x25); local_14 = 1; ((ANM2 *)((ANM2 *)(in_ECX + 0x11c)))->ANM2::Load(&menuPath,1); local_14 = 0xffffffff; if (0xf < menuPath._capacity) { uVar1 = menuPath._capacity + 1; - allocBlock = (char *)menuPath._buf._0_4_; + allocBlock = (*(undefined4 *)((char *)&((char *)menuPath._buf) + 0x0)); if (0xfff < uVar1) { - allocBlock = *(char **)(menuPath._buf._0_4_ + -4); + allocBlock = *(char **)((*(undefined4 *)((char *)&(menuPath._buf) + 0x0)) + -4); uVar1 = menuPath._capacity + 0x24; - if ((char *)0x1f < (char *)(menuPath._buf._0_4_ + (-4 - (int)allocBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(menuPath._buf) + 0x0)) + (-4 - GHIDRA_INT(allocBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -988,20 +988,20 @@ LAB_009d963b: menuPath._buf[1] = '\0'; menuPath._buf[2] = '\0'; menuPath._buf[3] = '\0'; - menuPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(menuPath._buf) + 0x0)) = std::_Allocate(0x30); menuPath._size = 0x24; menuPath._capacity = 0x2f; - builtin_strncpy((char *)menuPath._buf._0_4_,"gfx/ui/main menu/SaveSelectMenu.anm2",0x25); + builtin_strncpy((*(undefined4 *)((char *)&((char *)menuPath._buf) + 0x0)),"gfx/ui/main menu/SaveSelectMenu.anm2",0x25); local_14 = 2; ((ANM2 *)((ANM2 *)(in_ECX + 0x161)))->ANM2::Load(&menuPath,1); local_14 = 0xffffffff; if (0xf < menuPath._capacity) { uVar1 = menuPath._capacity + 1; - allocBlock = (char *)menuPath._buf._0_4_; + allocBlock = (*(undefined4 *)((char *)&((char *)menuPath._buf) + 0x0)); if (0xfff < uVar1) { - allocBlock = *(char **)(menuPath._buf._0_4_ + -4); + allocBlock = *(char **)((*(undefined4 *)((char *)&(menuPath._buf) + 0x0)) + -4); uVar1 = menuPath._capacity + 0x24; - if ((char *)0x1f < (char *)(menuPath._buf._0_4_ + (-4 - (int)allocBlock))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(menuPath._buf) + 0x0)) + (-4 - GHIDRA_INT(allocBlock)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1018,28 +1018,28 @@ LAB_009d963b: drawingPath._buf[1] = '\0'; drawingPath._buf[2] = '\0'; drawingPath._buf[3] = '\0'; - drawingPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(drawingPath._buf) + 0x0)) = std::_Allocate(0x30); drawingPath._size = 0x2c; drawingPath._capacity = 0x2f; - builtin_strncpy((char *)drawingPath._buf._0_4_,"gfx/ui/main menu/SaveSelectMenu_Drawing.anm2", + builtin_strncpy((*(undefined4 *)((char *)&((char *)drawingPath._buf) + 0x0)),"gfx/ui/main menu/SaveSelectMenu_Drawing.anm2", 0x2d); local_14 = 3; ((ANM2 *)((ANM2 *)(slotDrawing + -0xd)))->ANM2::Load(&drawingPath,0); local_14 = 0xffffffff; if (0xf < drawingPath._capacity) { size = drawingPath._capacity + 1; - allocBlock = (char *)drawingPath._buf._0_4_; + allocBlock = (*(undefined4 *)((char *)&((char *)drawingPath._buf) + 0x0)); if (0xfff < size) { - allocBlock = *(char **)(drawingPath._buf._0_4_ + -4); + allocBlock = *(char **)((*(undefined4 *)((char *)&(drawingPath._buf) + 0x0)) + -4); size = drawingPath._capacity + 0x24; - if ((char *)0x1f < (char *)(drawingPath._buf._0_4_ + (-4 - (int)allocBlock))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(drawingPath._buf) + 0x0)) + (-4 - GHIDRA_INT(allocBlock)))) goto LAB_009d963b; } operator_delete(allocBlock,size); } drawingPath._size = 0; drawingPath._capacity = 0xf; - drawingPath._buf._0_4_ = drawingPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(drawingPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(drawingPath._buf) + 0x0)) & 0xffffff00; isAnimSet = ((ANM2 *)((ANM2 *)(slotDrawing + -0xd)))->ANM2::SetAnimation(s_Idle,1); if ((isAnimSet != 0) && (*slotDrawing != (Menu_Save)0x0)) { ((AnimationState *)((AnimationState *)(slotDrawing + -1)))->AnimationState::SetFrameFloat(0.0); @@ -1091,14 +1091,14 @@ void Menu_Save::select_slot(uint slot) local_8 = 0xffffffff; puStack_c = &LAB_00b0f479; local_10 = ExceptionList; - securityCookie = __security_cookie ^ (uint)(backupLineText + 0x7c); + securityCookie = __security_cookie ^ GHIDRA_UINT((backupLineText + 0x7c)); ExceptionList = &local_10; menu = this; ((Manager *)(g_manager))->Manager::SetSaveSlot(slot); if ((g_manager->_persistentGameData)._isFileLoaded == 0) { local_84 = (Menu_Save)save_backup_find_latest(&g_manager->_persistentGameData); this[0x1f6] = local_84; - if ((int)local_84 < 1) { + if (GHIDRA_INT(local_84) < 1) { pbVar3 = string_table_translate (&g_manager->_stringTable,(byte *)"#SAVE_DATA_CORRUPTED_NO_BACKUP_LINE_5"); local_90 = CONCAT44(pbVar3,(undefined4)local_90); @@ -1229,7 +1229,7 @@ void Menu_Save::Update() local_8 = 0xffffffff; puStack_c = &LAB_00b0f4c0; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(backupFileName + 0x610); + local_14 = __security_cookie ^ GHIDRA_UINT((backupFileName + 0x610)); ExceptionList = &local_10; local_640 = 0; local_634 = 0xe; @@ -1258,14 +1258,14 @@ void Menu_Save::Update() isLess = bVar1 < (byte)*animName; if (bVar1 != *animName) { LAB_009d9dc0: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_009d9dc5; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)MVar2 + 1); isLess = bVar1 < (byte)animName[1]; if (bVar1 != animName[1]) goto LAB_009d9dc0; - MVar2 = (Menu_Save)((int)MVar2 + 2); + MVar2 = (Menu_Save)(GHIDRA_INT(MVar2) + 2); animName = animName + 2; } while (bVar1 != 0); uVar7 = 0; @@ -1273,7 +1273,7 @@ LAB_009d9dc5: if (uVar7 == 0) { if (this[2] == (Menu_Save)0x0) { local_63c = (ANM2 *)g_manager->_currentSaveSlot; - ((Manager *)(g_manager))->Manager::SetSaveSlot((int)this[1] + 1); + ((Manager *)(g_manager))->Manager::SetSaveSlot(GHIDRA_INT(this[1]) + 1); ((GameState *)(&manager->_gamestate))->GameState::Delete(); ((PersistentGameData *)(&manager->_persistentGameData))->PersistentGameData::Clear(0); local_638 = g_manager; @@ -1284,7 +1284,7 @@ LAB_009d9dc5: else { ((PersistentGameData *)(&manager->_persistentGameData))->PersistentGameData::SaveToSteamCloud(); } - ((Manager *)(manager))->Manager::SetSaveSlot((uint)local_63c); + ((Manager *)(manager))->Manager::SetSaveSlot(GHIDRA_UINT(local_63c)); slotSprite = (ANM2 *)(this + 0x4b); pbVar5 = &(*(undefined1 *)((char *)&(this[0x11a]) + 0x3)); local_634 = 3; @@ -1314,7 +1314,7 @@ LAB_009d9dc5: iVar3 = iVar3 + -1; uVar6 = extraout_ECX_00; } while (iVar3 != 0); - ((Manager *)(g_manager))->Manager::SetSaveSlot((uint)local_638); + ((Manager *)(g_manager))->Manager::SetSaveSlot(GHIDRA_UINT(local_638)); ((Menu_Character *)(&g_menuManager->_menuCharacter))->Menu_Character::Reset(); } MVar2 = *(Menu_Save *)((char *)this + 0x5b8); @@ -1329,14 +1329,14 @@ LAB_009d9dc5: isLess = bVar1 < (byte)*animName; if (bVar1 != *animName) { LAB_009d9f43: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_009d9f48; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)MVar4 + 1); isLess = bVar1 < (byte)animName[1]; if (bVar1 != animName[1]) goto LAB_009d9f43; - MVar4 = (Menu_Save)((int)MVar4 + 2); + MVar4 = (Menu_Save)(GHIDRA_INT(MVar4) + 2); animName = animName + 2; } while (bVar1 != 0); uVar7 = 0; @@ -1345,9 +1345,9 @@ LAB_009d9f48: ((*(byte *)((char *)MVar2 + 0x34) == 0 || (*(char *)((char *)this + 0x5c8) != '\0')))) goto LAB_009da447; } - bVar1 = ((ANM2 *)((ANM2 *)((int)this + 0x584)))->ANM2::SetAnimation((byte *)"DeleteConfirmationDissapear",1); + bVar1 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x584)))->ANM2::SetAnimation((byte *)"DeleteConfirmationDissapear",1); if (bVar1 != 0) { - ((AnimationState *)((AnimationState *)((int)this + 0x5b4)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x5b4)))->AnimationState::Rewind(); *(undefined1 *)((char *)this + 0x5c8) = 1; } } @@ -1461,14 +1461,14 @@ LAB_009da318: isLess = bVar1 < *pbVar5; if (bVar1 != *pbVar5) { LAB_009da305: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_009da30a; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)MVar4 + 1); isLess = bVar1 < pbVar5[1]; if (bVar1 != pbVar5[1]) goto LAB_009da305; - MVar4 = (Menu_Save)((int)MVar4 + 2); + MVar4 = (Menu_Save)(GHIDRA_INT(MVar4) + 2); pbVar5 = pbVar5 + 2; } while (bVar1 != 0); uVar7 = 0; @@ -1487,13 +1487,13 @@ LAB_009da30a: } else { MVar2 = this[3]; - if ((MVar2 == (Menu_Save)0x0) || ((0x31 < (uint)MVar2 && ((uint)MVar2 % 10 == 0)))) { + if ((MVar2 == (Menu_Save)0x0) || ((0x31 < GHIDRA_UINT(MVar2) && (GHIDRA_UINT(MVar2) % 10 == 0)))) { if (*this == (Menu_Save)0x2) { - MVar2._1_3_ = 0; - MVar2._0_1_ = this[2] == (Menu_Save)0x0; + (*(undefined1 *)((char *)&(MVar2) + 0x1)) = 0; + (*(undefined1 *)((char *)&(MVar2) + 0x0)) = this[2] == (Menu_Save)0x0; this[2] = MVar2; } - else if ((*this != (Menu_Save)0x3) && (MVar2 = this[1], (int)MVar2 < 3)) { + else if ((*this != (Menu_Save)0x3) && (MVar2 = this[1], GHIDRA_INT(MVar2) < 3)) { if (MVar2 == (Menu_Save)0x0) { animName = "File1Deselect"; LAB_009da182: @@ -1532,14 +1532,14 @@ LAB_009da1e8: isLess = bVar1 < *pbVar5; if (bVar1 != *pbVar5) { LAB_009da1d5: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_009da1da; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)MVar4 + 1); isLess = bVar1 < pbVar5[1]; if (bVar1 != pbVar5[1]) goto LAB_009da1d5; - MVar4 = (Menu_Save)((int)MVar4 + 2); + MVar4 = (Menu_Save)(GHIDRA_INT(MVar4) + 2); pbVar5 = pbVar5 + 2; } while (bVar1 != 0); uVar7 = 0; @@ -1551,9 +1551,9 @@ LAB_009da1da: pMVar8 = pMVar8 + 0x45; local_634 = local_634 + -1; } while (local_634 != 0); - this[1] = (Menu_Save)((int)this[1] + 1); + this[1] = (Menu_Save)(GHIDRA_INT(this[1]) + 1); local_634 = 0; - if (2 < (int)this[1]) { + if (2 < GHIDRA_INT(this[1])) { this[1] = (Menu_Save)0x0; } } @@ -1562,13 +1562,13 @@ LAB_009da1da: } else { MVar2 = this[3]; - if ((MVar2 == (Menu_Save)0x0) || ((0x31 < (uint)MVar2 && ((uint)MVar2 % 10 == 0)))) { + if ((MVar2 == (Menu_Save)0x0) || ((0x31 < GHIDRA_UINT(MVar2) && (GHIDRA_UINT(MVar2) % 10 == 0)))) { if (*this == (Menu_Save)0x2) { - MVar4._1_3_ = 0; - MVar4._0_1_ = this[2] == (Menu_Save)0x0; + (*(undefined1 *)((char *)&(MVar4) + 0x1)) = 0; + (*(undefined1 *)((char *)&(MVar4) + 0x0)) = this[2] == (Menu_Save)0x0; this[2] = MVar4; } - else if ((*this != (Menu_Save)0x3) && (MVar2 = this[1], (int)MVar2 < 3)) { + else if ((*this != (Menu_Save)0x3) && (MVar2 = this[1], GHIDRA_INT(MVar2) < 3)) { if (MVar2 == (Menu_Save)0x0) { animName = "File1Deselect"; LAB_009da038: @@ -1607,14 +1607,14 @@ LAB_009da098: isLess = bVar1 < *pbVar5; if (bVar1 != *pbVar5) { LAB_009da085: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_009da08a; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)MVar4 + 1); isLess = bVar1 < pbVar5[1]; if (bVar1 != pbVar5[1]) goto LAB_009da085; - MVar4 = (Menu_Save)((int)MVar4 + 2); + MVar4 = (Menu_Save)(GHIDRA_INT(MVar4) + 2); pbVar5 = pbVar5 + 2; } while (bVar1 != 0); uVar7 = 0; @@ -1627,9 +1627,9 @@ LAB_009da08a: local_634 = local_634 + -1; } while (local_634 != 0); pMVar8 = this + 1; - *pMVar8 = (Menu_Save)((int)*pMVar8 + -1); + *pMVar8 = (Menu_Save)(GHIDRA_INT(*pMVar8) + -1); local_634 = 0; - if ((int)*pMVar8 < 0) { + if (GHIDRA_INT(*pMVar8) < 0) { this[1] = (Menu_Save)0x2; } } @@ -1648,10 +1648,10 @@ LAB_009da447: } else { LAB_009da4ae: - *(Menu_Save *)((char *)this + 0xc) = (Menu_Save)((int)*(Menu_Save *)((char *)this + 0xc) + 1); + *(Menu_Save *)((char *)this + 0xc) = (Menu_Save)(GHIDRA_INT(*(Menu_Save *)((char *)this + 0xc)) + 1); } update_sprites(this); - ((GenericPrompt *)((GenericPrompt *)((int)this + 0x6a4)))->GenericPrompt::Update(1); + ((GenericPrompt *)((GenericPrompt *)(GHIDRA_INT(this) + 0x6a4)))->GenericPrompt::Update(1); if ((*(Menu_Save *)((char *)this + 0x6d8) != (Menu_Save)0x0) && (*(char *)((char *)this + 0x6e8) != '\0')) { ExceptionList = local_10; @@ -1669,21 +1669,21 @@ LAB_009da4ae: } MVar2 = *(Menu_Save *)((char *)this + 0x7d8); local_630 = MVar2; - if ((int)MVar2 < 1) { + if (GHIDRA_INT(MVar2) < 1) { FUN_00926460(1); MVar2 = extraout_ECX_05; goto LAB_009da665; } persistentGameData = &g_manager->_persistentGameData; - if ((Menu_Save *)0x4c4b3ff < (Menu_Save *)((int)MVar2 + 0xfeced300U)) goto LAB_009da665; + if ((Menu_Save *)0x4c4b3ff < (Menu_Save *)(GHIDRA_INT(MVar2) + 0xfeced300U)) goto LAB_009da665; ((std::string *)((char *)savedDataPath))->std::string::string(&(*(undefined1 *)((char *)&((g_manager->_persistentGameData)) + 0x8))); local_8 = 0; pbVar5 = ((PersistentGameData *)(persistentGameData))->PersistentGameData::get_save_file_name(); sprintf(&DAT_00c93e50,(byte *)"%s/save_backups/"); sprintf_s(backupFileName,0x600,(byte *)"%s%d.%s"); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; tracked_alloc(1,pbVar5,0); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; ((PersistentGameData *)(persistentGameData))->PersistentGameData::Load(backupFileName); *(undefined1 *)persistentGameData = 1; MVar2 = (Menu_Save)&(*(undefined1 *)((char *)&((manager->_persistentGameData)) + 0x8)); @@ -1717,9 +1717,9 @@ LAB_009da5d2: uVar7 = savedDataPathCapacity + 1; MVar2 = savedDataPath[0]; if (0xfff < uVar7) { - MVar2 = *(Menu_Save *)((int)savedDataPath[0] + -4); + MVar2 = *(Menu_Save *)(GHIDRA_INT(savedDataPath[0]) + -4); uVar7 = savedDataPathCapacity + 0x24; - if (0x1f < ((int)savedDataPath[0] - (int)MVar2) - 4U) { + if (0x1f < (GHIDRA_INT(savedDataPath[0]) - GHIDRA_INT(MVar2)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1728,7 +1728,7 @@ LAB_009da5d2: MVar2 = extraout_ECX_04; } LAB_009da665: - slotSprite = (ANM2 *)((int)this + (g_manager->_currentSaveSlot * 0x45 + 6) * 4); + slotSprite = (ANM2 *)(GHIDRA_INT(this) + (g_manager->_currentSaveSlot * 0x45 + 6) * 4); replace_slot_graphics((Menu_Save *)MVar2,slotSprite); ((ANM2 *)(slotSprite))->ANM2::LoadGraphics(unk); ((Menu_Character *)(&g_menuManager->_menuCharacter))->Menu_Character::Reset(); @@ -1952,14 +1952,14 @@ LAB_009dad97: isLess = bVar1 < *pbVar5; if (bVar1 != *pbVar5) { LAB_009dad84: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_009dad89; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)MVar2 + 1); isLess = bVar1 < pbVar5[1]; if (bVar1 != pbVar5[1]) goto LAB_009dad84; - MVar2 = (Menu_Save)((int)MVar2 + 2); + MVar2 = (Menu_Save)(GHIDRA_INT(MVar2) + 2); pbVar5 = pbVar5 + 2; } while (bVar1 != 0); uVar3 = 0; @@ -1987,14 +1987,14 @@ LAB_009dae14: isLess = bVar1 < *pbVar5; if (bVar1 != *pbVar5) { LAB_009dadf0: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_009dadf5; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)MVar2 + 1); isLess = bVar1 < pbVar5[1]; if (bVar1 != pbVar5[1]) goto LAB_009dadf0; - MVar2 = (Menu_Save)((int)MVar2 + 2); + MVar2 = (Menu_Save)(GHIDRA_INT(MVar2) + 2); pbVar5 = pbVar5 + 2; } while (bVar1 != 0); uVar3 = 0; @@ -2003,12 +2003,12 @@ LAB_009dadf5: goto LAB_009dae14; } pbVar5 = (byte *)0x0; - if (0 < (int)this[0x13c]) { + if (0 < GHIDRA_INT(this[0x13c])) { do { layer = ((ANM2 *)(sprite))->ANM2::GetLayer(pbVar5); pbVar5 = pbVar5 + 1; layer->_visible = 0; - } while ((int)pbVar5 < (int)this[0x13c]); + } while (GHIDRA_INT(pbVar5) < GHIDRA_INT(this[0x13c])); } layer = ((ANM2 *)(sprite))->ANM2::GetLayer(&DAT_00000005); layer->_visible = 1; @@ -2024,7 +2024,7 @@ LAB_009dadf5: this[2] = (Menu_Save)0x0; this[3] = (Menu_Save)0x0; MVar6 = (Menu_Save)0x0; - if (0 < (int)MVar2) { + if (0 < GHIDRA_INT(MVar2)) { MVar6 = MVar2; } this[1] = MVar6; @@ -2051,14 +2051,14 @@ LAB_009daf23: isLess = bVar1 < (byte)*expectedName; if (bVar1 != *expectedName) { LAB_009daf10: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_009daf15; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)MVar2 + 1); isLess = bVar1 < (byte)expectedName[1]; if (bVar1 != expectedName[1]) goto LAB_009daf10; - MVar2 = (Menu_Save)((int)MVar2 + 2); + MVar2 = (Menu_Save)(GHIDRA_INT(MVar2) + 2); expectedName = expectedName + 2; } while (bVar1 != 0); uVar3 = 0; @@ -2079,14 +2079,14 @@ LAB_009daf15: isLess = bVar1 < (byte)*expectedName; if (bVar1 != *expectedName) { LAB_009daf80: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_009daf85; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)MVar2 + 1); isLess = bVar1 < (byte)expectedName[1]; if (bVar1 != expectedName[1]) goto LAB_009daf80; - MVar2 = (Menu_Save)((int)MVar2 + 2); + MVar2 = (Menu_Save)(GHIDRA_INT(MVar2) + 2); expectedName = expectedName + 2; } while (bVar1 != 0); uVar3 = 0; @@ -2122,14 +2122,14 @@ LAB_009db018: isLess = bVar1 < (byte)*expectedName; if (bVar1 != *expectedName) { LAB_009db005: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_009db00a; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)MVar2 + 1); isLess = bVar1 < (byte)expectedName[1]; if (bVar1 != expectedName[1]) goto LAB_009db005; - MVar2 = (Menu_Save)((int)MVar2 + 2); + MVar2 = (Menu_Save)(GHIDRA_INT(MVar2) + 2); expectedName = expectedName + 2; } while (bVar1 != 0); uVar3 = 0; @@ -2149,14 +2149,14 @@ LAB_009db00a: isLess = bVar1 < (byte)*expectedName; if (bVar1 != *expectedName) { LAB_009db070: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_009db075; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)MVar2 + 1); isLess = bVar1 < (byte)expectedName[1]; if (bVar1 != expectedName[1]) goto LAB_009db070; - MVar2 = (Menu_Save)((int)MVar2 + 2); + MVar2 = (Menu_Save)(GHIDRA_INT(MVar2) + 2); expectedName = expectedName + 2; } while (bVar1 != 0); uVar3 = 0; @@ -2191,14 +2191,14 @@ LAB_009db108: isLess = bVar1 < (byte)*expectedName; if (bVar1 != *expectedName) { LAB_009db0f5: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_009db0fa; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)MVar2 + 1); isLess = bVar1 < (byte)expectedName[1]; if (bVar1 != expectedName[1]) goto LAB_009db0f5; - MVar2 = (Menu_Save)((int)MVar2 + 2); + MVar2 = (Menu_Save)(GHIDRA_INT(MVar2) + 2); expectedName = expectedName + 2; } while (bVar1 != 0); uVar3 = 0; @@ -2218,14 +2218,14 @@ LAB_009db0fa: isLess = bVar1 < (byte)*expectedName; if (bVar1 != *expectedName) { LAB_009db160: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_009db165; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)MVar2 + 1); isLess = bVar1 < (byte)expectedName[1]; if (bVar1 != expectedName[1]) goto LAB_009db160; - MVar2 = (Menu_Save)((int)MVar2 + 2); + MVar2 = (Menu_Save)(GHIDRA_INT(MVar2) + 2); expectedName = expectedName + 2; } while (bVar1 != 0); uVar3 = 0; @@ -2294,7 +2294,7 @@ void Menu_Save::replace_slot_graphics(ANM2 *sprite) local_8 = 0xffffffff; puStack_c = &LAB_00b0f535; local_10 = ExceptionList; - local_18 = __security_cookie ^ (int)&sheetPath + 0x2cU; + local_18 = __security_cookie ^ GHIDRA_INT(&sheetPath) + 0x2cU; ExceptionList = &local_10; negativePath = (char *)0x0; heartPieces = 0; @@ -2462,23 +2462,23 @@ switchD_009db728_caseD_0: } sheetPath._size = 0; sheetPath._capacity = 0xf; - sheetPath._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) = (void *)0x0; pathCursor = (byte *)drawingPath; do { pathChar = *pathCursor; pathCursor = pathCursor + 1; } while (pathChar != 0); - ((std::string *)(sheetPath._buf))->std::string::assign((byte *)drawingPath,(int)pathCursor - (int)(drawingPath + 1)); + ((std::string *)(sheetPath._buf))->std::string::assign((byte *)drawingPath,GHIDRA_INT(pathCursor) - GHIDRA_INT((drawingPath + 1))); local_8 = 0; ((Sprite *)((Sprite *)sprite))->Sprite::ReplaceSpritesheet(0,&sheetPath); local_8 = 0xffffffff; if (0xf < sheetPath._capacity) { uVar1 = sheetPath._capacity + 1; - freeBlock = (void *)sheetPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)sheetPath._buf) + 0x0)); if (0xfff < uVar1) { - freeBlock = *(void **)(sheetPath._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) + -4); uVar1 = sheetPath._capacity + 0x24; - if (0x1f < (uint)(sheetPath._buf._0_4_ + (-4 - (int)freeBlock))) goto LAB_009db696; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_009db696; } operator_delete(freeBlock,uVar1); } @@ -2491,24 +2491,24 @@ switchD_009db728_caseD_0: else { sheetPath._size = 0; sheetPath._capacity = 0xf; - sheetPath._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) = (void *)0x0; pathCursor = (byte *)negativePath; do { pathChar = *pathCursor; pathCursor = pathCursor + 1; } while (pathChar != 0); ((std::string *)(sheetPath._buf))->std::string::assign((byte *)negativePath, - (int)pathCursor - (int)(negativePath + 1)); + GHIDRA_INT(pathCursor) - GHIDRA_INT((negativePath + 1))); local_8 = 1; ((Sprite *)((Sprite *)sprite))->Sprite::ReplaceSpritesheet(1,&sheetPath); local_8 = 0xffffffff; if (0xf < sheetPath._capacity) { uVar1 = sheetPath._capacity + 1; - freeBlock = (void *)sheetPath._buf._0_4_; + freeBlock = (*(undefined4 *)((char *)&((void *)sheetPath._buf) + 0x0)); if (0xfff < uVar1) { - freeBlock = *(void **)(sheetPath._buf._0_4_ + -4); + freeBlock = *(void **)((*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) + -4); uVar1 = sheetPath._capacity + 0x24; - if (0x1f < (uint)(sheetPath._buf._0_4_ + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(sheetPath._buf) + 0x0)) + (-4 - GHIDRA_INT(freeBlock))))) { LAB_009db696: local_8 = 0xffffffff; /* WARNING: Subroutine does not return */ @@ -2566,7 +2566,7 @@ void Menu_Save::update_sprites() uint *animNameSize; Menu_Save *newColor; - local_8 = (void *)(__security_cookie ^ (uint)(curAnim + 7)); + local_8 = (void *)(__security_cookie ^ GHIDRA_UINT((curAnim + 7))); cleanupFlags = 0; if ((g_manager->_framecount & 1) == 0) { if ((*(undefined1 *)((char *)&(this[0x48]) + 0x1)) != '\0') { @@ -2576,7 +2576,7 @@ void Menu_Save::update_sprites() slotAnimState = (AnimationState *)(this + 0x57); iVar4 = 3; do { - if (*(char *)((int)&slotAnimState[6]._currentlyTriggeredEvents + 1) != '\0') { + if (*(char *)(GHIDRA_INT(&slotAnimState[6]._currentlyTriggeredEvents) + 1) != '\0') { ((AnimationState *)(slotAnimState))->AnimationState::Update(); ((AnimationState *)(slotAnimState + 1))->AnimationState::Update(); } @@ -2641,9 +2641,9 @@ LAB_009db9d0: uVar3 = curAnimCapacity + 1; allocBlock = curAnim[0]; if (0xfff < uVar3) { - allocBlock = *(void **)((int)curAnim[0] + -4); + allocBlock = *(void **)(GHIDRA_INT(curAnim[0]) + -4); uVar3 = curAnimCapacity + 0x24; - if (0x1f < (uint)((int)curAnim[0] + (-4 - (int)allocBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(curAnim[0]) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2678,9 +2678,9 @@ LAB_009dba7b: uVar3 = curAnimCapacity + 1; allocBlock = curAnim[0]; if (0xfff < uVar3) { - allocBlock = *(void **)((int)curAnim[0] + -4); + allocBlock = *(void **)(GHIDRA_INT(curAnim[0]) + -4); uVar3 = curAnimCapacity + 0x24; - if (0x1f < (uint)((int)curAnim[0] + (-4 - (int)allocBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(curAnim[0]) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2714,9 +2714,9 @@ LAB_009dbb26: uVar3 = curAnimCapacity + 1; allocBlock = curAnim[0]; if (0xfff < uVar3) { - allocBlock = *(void **)((int)curAnim[0] + -4); + allocBlock = *(void **)(GHIDRA_INT(curAnim[0]) + -4); uVar3 = curAnimCapacity + 0x24; - if (0x1f < (uint)((int)curAnim[0] + (-4 - (int)allocBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(curAnim[0]) + (-4 - GHIDRA_INT(allocBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2742,14 +2742,14 @@ LAB_009dbb26: isLess = bVar1 < (byte)*wantedAnimNameStr; if (bVar1 != *wantedAnimNameStr) { LAB_009dbbd2: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_009dbbd7; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)MVar2 + 1); isLess = bVar1 < (byte)wantedAnimNameStr[1]; if (bVar1 != wantedAnimNameStr[1]) goto LAB_009dbbd2; - MVar2 = (Menu_Save)((int)MVar2 + 2); + MVar2 = (Menu_Save)(GHIDRA_INT(MVar2) + 2); wantedAnimNameStr = wantedAnimNameStr + 2; } while (bVar1 != 0); uVar3 = 0; @@ -2775,14 +2775,14 @@ LAB_009dbbd7: isLess = bVar1 < (byte)*wantedAnimNameStr; if (bVar1 != *wantedAnimNameStr) { LAB_009dbc42: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_009dbc47; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)MVar2 + 1); isLess = bVar1 < (byte)wantedAnimNameStr[1]; if (bVar1 != wantedAnimNameStr[1]) goto LAB_009dbc42; - MVar2 = (Menu_Save)((int)MVar2 + 2); + MVar2 = (Menu_Save)(GHIDRA_INT(MVar2) + 2); wantedAnimNameStr = wantedAnimNameStr + 2; } while (bVar1 != 0); uVar3 = 0; @@ -2800,14 +2800,14 @@ LAB_009dbc47: isLess = bVar1 < (byte)*wantedAnimNameStr; if (bVar1 != *wantedAnimNameStr) { LAB_009dbc88: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_009dbc8d; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)curAnimName + 1); isLess = bVar1 < (byte)wantedAnimNameStr[1]; if (bVar1 != wantedAnimNameStr[1]) goto LAB_009dbc88; - curAnimName = (Menu_Save)((int)curAnimName + 2); + curAnimName = (Menu_Save)(GHIDRA_INT(curAnimName) + 2); wantedAnimNameStr = wantedAnimNameStr + 2; } while (bVar1 != 0); uVar3 = 0; @@ -2835,14 +2835,14 @@ LAB_009dbc8d: isLess = bVar1 < (byte)*wantedAnimNameStr; if (bVar1 != *wantedAnimNameStr) { LAB_009dbd10: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_009dbd15; } if (bVar1 == 0) break; bVar1 = *(byte *)((char *)MVar2 + 1); isLess = bVar1 < (byte)wantedAnimNameStr[1]; if (bVar1 != wantedAnimNameStr[1]) goto LAB_009dbd10; - MVar2 = (Menu_Save)((int)MVar2 + 2); + MVar2 = (Menu_Save)(GHIDRA_INT(MVar2) + 2); wantedAnimNameStr = wantedAnimNameStr + 2; } while (bVar1 != 0); uVar3 = 0; @@ -2854,17 +2854,17 @@ LAB_009dbd15: LAB_009dbd1b: MVar2 = this[2]; if ((this[0x16e] != (Menu_Save)0x0) && - ((8 < *(int *)((int)this[0x16d] + 0x80) || + ((8 < *(int *)(GHIDRA_INT(this[0x16d]) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 8 < *(int *)((int)this[0x16d] + 0x80))))) { + 8 < *(int *)(GHIDRA_INT(this[0x16d]) + 0x80))))) { curAnimName = this[0x16e]; iVar4 = *(int *)((char *)curAnimName + 0x58); if ((curAnimName == (Menu_Save)0x0) || ((iVar4 < 0 || (*(int *)((char *)curAnimName + 0x1c) <= iVar4)))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)this[0x16f] + iVar4 * 4) = 0; - ((AnimationState *)((AnimationState *)(this + 0x16d)))->AnimationState::AdvanceLayerPosition(iVar4,(float)(int)MVar2); + *(undefined4 *)(GHIDRA_INT(this[0x16f]) + iVar4 * 4) = 0; + ((AnimationState *)((AnimationState *)(this + 0x16d)))->AnimationState::AdvanceLayerPosition(iVar4,(float)GHIDRA_INT(MVar2)); } return; } @@ -2906,7 +2906,7 @@ void Menu_Save::update_save_drawings() puStack_18 = &LAB_00b0f59d; local_1c = ExceptionList; puStack_20 = (undefined1 *)(pathString + 0xe); - local_24 = __security_cookie ^ (uint)(pathString + 0xb); + local_24 = __security_cookie ^ GHIDRA_UINT((pathString + 0xb)); ExceptionList = &local_1c; highestSlotState = 0; pMVar2 = (Menu_Save *)&highestSlotState; @@ -2969,12 +2969,12 @@ LAB_009dbec6: bVar1 = *pbVar7; pbVar7 = pbVar7 + 1; } while (bVar1 != 0); - ((std::string *)((char *)pathString))->std::string::assign((byte *)pngPath,(int)pbVar7 - (int)(pngPath + 1)); + ((std::string *)((char *)pathString))->std::string::assign((byte *)pngPath,GHIDRA_INT(pbVar7) - GHIDRA_INT((pngPath + 1))); pathData = pathString[0]; local_14 = (byte ****)0x6; - if (0 < (int)slotSheets[1]) { + if (0 < GHIDRA_INT(slotSheets[1])) { sheet = *slotSheets; - pppppbVar9 = (byte *****)((int)sheet + 8); + pppppbVar9 = (byte *****)(GHIDRA_INT(sheet) + 8); pppppbVar6 = pppppbVar9; if (0xf < *(uint *)((char *)sheet + 0x1c)) { pppppbVar6 = (byte *****)*pppppbVar9; @@ -2994,7 +2994,7 @@ LAB_009dbec6: pppppbVar6 = pathData; } ((std::string *)((char *)pppppbVar9))->std::string::assign((byte *)pppppbVar6,pathSize); - *(undefined1 *)((int)*slotSheets + 0x30) = 0; + *(undefined1 *)(GHIDRA_INT(*slotSheets) + 0x30) = 0; pathData = pathString[0]; } } @@ -3006,7 +3006,7 @@ LAB_009dbec6: if (0xfff < freeSize) { pppppbVar9 = (byte *****)pathData[-1]; freeSize = pathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)pathData + (-4 - (int)pppppbVar9))) goto LAB_009dc591; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(pathData) + (-4 - GHIDRA_INT(pppppbVar9)))) goto LAB_009dc591; } operator_delete(pppppbVar9,freeSize); } @@ -3039,16 +3039,16 @@ LAB_009dbec6: *(byte *)((char *)pathData + 0x2b) = 0; local_14 = (byte ****)0x0; pathString[0] = pathData; - if (0 < (int)this[0x6b]) { + if (0 < GHIDRA_INT(this[0x6b])) { sheet = this[0x6a]; - pbVar7 = (byte *)((int)sheet + 8); + pbVar7 = (byte *)(GHIDRA_INT(sheet) + 8); if (0xf < *(uint *)((char *)sheet + 0x1c)) { pbVar7 = *(byte **)((char *)sheet + 8); } bVar1 = str_eq((byte *)pathData,0x2b,pbVar7,*(uint *)((char *)sheet + 0x18)); if (bVar1 == 0) { - if ((byte ******)((int)sheet + 8) != pathString) { - ((std::string *)((char *)((int)sheet + 8)))->std::string::assign((byte *)pathData,0x2b); + if ((byte ******)(GHIDRA_INT(sheet) + 8) != pathString) { + ((std::string *)((char *)(GHIDRA_INT(sheet) + 8)))->std::string::assign((byte *)pathData,0x2b); sheet = this[0x6a]; pathData = pathString[0]; } @@ -3062,7 +3062,7 @@ LAB_009dbec6: if (0xfff < freeSize) { pppppbVar9 = (byte *****)pathData[-1]; freeSize = pathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)pathData + (-4 - (int)pppppbVar9))) goto LAB_009dc591; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(pathData) + (-4 - GHIDRA_INT(pppppbVar9)))) goto LAB_009dc591; } operator_delete(pppppbVar9,freeSize); } @@ -3084,16 +3084,16 @@ LAB_009dbec6: *(byte *)((char *)pathData + 0x2b) = 0; local_14 = (byte ****)0x1; pathString[0] = pathData; - if (0 < (int)this[0xb0]) { + if (0 < GHIDRA_INT(this[0xb0])) { sheet = this[0xaf]; - pbVar7 = (byte *)((int)sheet + 8); + pbVar7 = (byte *)(GHIDRA_INT(sheet) + 8); if (0xf < *(uint *)((char *)sheet + 0x1c)) { pbVar7 = *(byte **)((char *)sheet + 8); } bVar1 = str_eq((byte *)pathData,0x2b,pbVar7,*(uint *)((char *)sheet + 0x18)); if (bVar1 == 0) { - if ((byte ******)((int)sheet + 8) != pathString) { - ((std::string *)((char *)((int)sheet + 8)))->std::string::assign((byte *)pathData,0x2b); + if ((byte ******)(GHIDRA_INT(sheet) + 8) != pathString) { + ((std::string *)((char *)(GHIDRA_INT(sheet) + 8)))->std::string::assign((byte *)pathData,0x2b); sheet = this[0xaf]; pathData = pathString[0]; } @@ -3107,7 +3107,7 @@ LAB_009dbec6: if (0xfff < freeSize) { pppppbVar9 = (byte *****)pathData[-1]; freeSize = pathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)pathData + (-4 - (int)pppppbVar9))) goto LAB_009dc591; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(pathData) + (-4 - GHIDRA_INT(pppppbVar9)))) goto LAB_009dc591; } operator_delete(pppppbVar9,freeSize); } @@ -3123,8 +3123,8 @@ LAB_009dbec6: pathString[0][8] = (byte ****)0x696e6966; pathString[0][9] = (byte ****)0x2e337974; *(undefined2 *)(pathString[0] + 10) = 0x6e70; - *(char *)((int)pathString[0] + 0x2a) = 'g'; - *(char *)((int)pathString[0] + 0x2b) = '\0'; + *(char *)(GHIDRA_INT(pathString[0]) + 0x2a) = 'g'; + *(char *)(GHIDRA_INT(pathString[0]) + 0x2b) = '\0'; local_14 = (byte ****)0x2; } else { @@ -3146,16 +3146,16 @@ LAB_009dbec6: *(byte *)((char *)pathData + 0x2b) = 0; local_14 = (byte ****)0x3; pathString[0] = pathData; - if (0 < (int)this[0x6b]) { + if (0 < GHIDRA_INT(this[0x6b])) { sheet = this[0x6a]; - pbVar7 = (byte *)((int)sheet + 8); + pbVar7 = (byte *)(GHIDRA_INT(sheet) + 8); if (0xf < *(uint *)((char *)sheet + 0x1c)) { pbVar7 = *(byte **)((char *)sheet + 8); } bVar1 = str_eq((byte *)pathData,0x2b,pbVar7,*(uint *)((char *)sheet + 0x18)); if (bVar1 == 0) { - if ((byte ******)((int)sheet + 8) != pathString) { - ((std::string *)((char *)((int)sheet + 8)))->std::string::assign((byte *)pathData,0x2b); + if ((byte ******)(GHIDRA_INT(sheet) + 8) != pathString) { + ((std::string *)((char *)(GHIDRA_INT(sheet) + 8)))->std::string::assign((byte *)pathData,0x2b); sheet = this[0x6a]; pathData = pathString[0]; } @@ -3169,7 +3169,7 @@ LAB_009dbec6: if (0xfff < freeSize) { pppppbVar9 = (byte *****)pathData[-1]; freeSize = pathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)pathData + (-4 - (int)pppppbVar9))) goto LAB_009dc591; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(pathData) + (-4 - GHIDRA_INT(pppppbVar9)))) goto LAB_009dc591; } operator_delete(pppppbVar9,freeSize); } @@ -3191,16 +3191,16 @@ LAB_009dbec6: *(byte *)((char *)pathData + 0x2b) = 0; local_14 = (byte ****)0x4; pathString[0] = pathData; - if (0 < (int)this[0xb0]) { + if (0 < GHIDRA_INT(this[0xb0])) { sheet = this[0xaf]; - pbVar7 = (byte *)((int)sheet + 8); + pbVar7 = (byte *)(GHIDRA_INT(sheet) + 8); if (0xf < *(uint *)((char *)sheet + 0x1c)) { pbVar7 = *(byte **)((char *)sheet + 8); } bVar1 = str_eq((byte *)pathData,0x2b,pbVar7,*(uint *)((char *)sheet + 0x18)); if (bVar1 == 0) { - if ((byte ******)((int)sheet + 8) != pathString) { - ((std::string *)((char *)((int)sheet + 8)))->std::string::assign((byte *)pathData,0x2b); + if ((byte ******)(GHIDRA_INT(sheet) + 8) != pathString) { + ((std::string *)((char *)(GHIDRA_INT(sheet) + 8)))->std::string::assign((byte *)pathData,0x2b); sheet = this[0xaf]; pathData = pathString[0]; } @@ -3214,7 +3214,7 @@ LAB_009dbec6: if (0xfff < freeSize) { pppppbVar9 = (byte *****)pathData[-1]; freeSize = pathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)pathData + (-4 - (int)pppppbVar9))) goto LAB_009dc591; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(pathData) + (-4 - GHIDRA_INT(pppppbVar9)))) goto LAB_009dc591; } operator_delete(pppppbVar9,freeSize); } @@ -3230,23 +3230,23 @@ LAB_009dbec6: pathString[0][8] = (byte ****)0x656c706d; pathString[0][9] = (byte ****)0x2e336574; *(undefined2 *)(pathString[0] + 10) = 0x6e70; - *(char *)((int)pathString[0] + 0x2a) = 'g'; - *(char *)((int)pathString[0] + 0x2b) = '\0'; + *(char *)(GHIDRA_INT(pathString[0]) + 0x2a) = 'g'; + *(char *)(GHIDRA_INT(pathString[0]) + 0x2b) = '\0'; local_14 = (byte ****)0x5; } pathData = pathString[0]; pathCapacity = 0x2f; pathSize = 0x2b; - if (0 < (int)this[0xf5]) { + if (0 < GHIDRA_INT(this[0xf5])) { sheet = this[0xf4]; - pbVar7 = (byte *)((int)sheet + 8); + pbVar7 = (byte *)(GHIDRA_INT(sheet) + 8); if (0xf < *(uint *)((char *)sheet + 0x1c)) { pbVar7 = *(byte **)((char *)sheet + 8); } bVar1 = str_eq((byte *)pathString[0],0x2b,pbVar7,*(uint *)((char *)sheet + 0x18)); if (bVar1 == 0) { - if ((byte ******)((int)sheet + 8) != pathString) { - ((std::string *)((char *)((int)sheet + 8)))->std::string::assign((byte *)pathData,0x2b); + if ((byte ******)(GHIDRA_INT(sheet) + 8) != pathString) { + ((std::string *)((char *)(GHIDRA_INT(sheet) + 8)))->std::string::assign((byte *)pathData,0x2b); sheet = this[0xf4]; pathData = pathString[0]; } @@ -3260,7 +3260,7 @@ LAB_009dbec6: if (0xfff < freeSize) { pppppbVar9 = (byte *****)pathData[-1]; freeSize = pathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)pathData + (-4 - (int)pppppbVar9))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(pathData) + (-4 - GHIDRA_INT(pppppbVar9)))) { LAB_009dc591: local_14 = (byte ****)0xffffffff; /* WARNING: Subroutine does not return */ diff --git a/src/game/menu_special_seeds.cpp b/src/game/menu_special_seeds.cpp index bf7a75a..fb75c66 100644 --- a/src/game/menu_special_seeds.cpp +++ b/src/game/menu_special_seeds.cpp @@ -73,18 +73,18 @@ LAB_008f0261: } else { fVar4 = seedEffectSet->PositionY; - if ((fVar4 == 0.0) || ((0x1d < (int)fVar4 && ((int)fVar4 % 5 == 0)))) { - seedEffectSet->PositionX = (float)((int)seedEffectSet->PositionX + 1); + if ((fVar4 == 0.0) || ((0x1d < GHIDRA_INT(fVar4) && (GHIDRA_INT(fVar4) % 5 == 0)))) { + seedEffectSet->PositionX = (float)(GHIDRA_INT(seedEffectSet->PositionX) + 1); entries = seedEffectSet[1].SpecialSeedsSprite._filename._capacity; fVar4 = seedEffectSet->PositionX; - if ((int)fVar4 < - (int)(*(int *)seedEffectSet[1].SpecialSeedsSprite._animDefaultName._buf - entries) / 0x28) { + if (GHIDRA_INT(fVar4) < + GHIDRA_INT((*(int *)seedEffectSet[1].SpecialSeedsSprite._animDefaultName._buf - entries)) / 0x28) { do { - if (*(int *)(entries + (int)fVar4 * 0x28) != 0) goto LAB_008f0594; - fVar4 = (float)((int)fVar4 + 1); + if (*(int *)(entries + GHIDRA_INT(fVar4) * 0x28) != 0) goto LAB_008f0594; + fVar4 = (float)(GHIDRA_INT(fVar4) + 1); seedEffectSet->PositionX = fVar4; - } while ((int)fVar4 < - (int)(*(int *)seedEffectSet[1].SpecialSeedsSprite._animDefaultName._buf - entries) / + } while (GHIDRA_INT(fVar4) < + GHIDRA_INT((*(int *)seedEffectSet[1].SpecialSeedsSprite._animDefaultName._buf - entries)) / 0x28); } seedEffectSet->PositionX = 0.0; @@ -93,49 +93,49 @@ LAB_008f0261: } else { fVar4 = seedEffectSet->PositionY; - if ((fVar4 == 0.0) || ((0x1d < (int)fVar4 && ((int)fVar4 % 5 == 0)))) { + if ((fVar4 == 0.0) || ((0x1d < GHIDRA_INT(fVar4) && (GHIDRA_INT(fVar4) % 5 == 0)))) { pfVar1 = &seedEffectSet->PositionX; - *pfVar1 = (float)((int)*pfVar1 + -1); + *pfVar1 = (float)(GHIDRA_INT(*pfVar1) + -1); fVar4 = seedEffectSet->PositionX; fVar5 = *pfVar1; - while (-1 < (int)fVar5) { - if (*(int *)(seedEffectSet[1].SpecialSeedsSprite._filename._capacity + (int)fVar4 * 0x28) != 0) + while (-1 < GHIDRA_INT(fVar5)) { + if (*(int *)(seedEffectSet[1].SpecialSeedsSprite._filename._capacity + GHIDRA_INT(fVar4) * 0x28) != 0) goto LAB_008f0594; - fVar4 = (float)((int)fVar4 + -1); + fVar4 = (float)(GHIDRA_INT(fVar4) + -1); seedEffectSet->PositionX = fVar4; fVar5 = fVar4; } seedEffectSet->PositionX = - (float)((int)(*(int *)seedEffectSet[1].SpecialSeedsSprite._animDefaultName._buf - - seedEffectSet[1].SpecialSeedsSprite._filename._capacity) / 0x28 + -1); + (float)(GHIDRA_INT((*(int *)seedEffectSet[1].SpecialSeedsSprite._animDefaultName._buf - + seedEffectSet[1].SpecialSeedsSprite._filename._capacity)) / 0x28 + -1); } } } else { fVar4 = seedEffectSet->PositionX; entries = seedEffectSet[1].SpecialSeedsSprite._filename._capacity; - if (*(int *)(entries + (int)fVar4 * 0x28) == 3) { + if (*(int *)(entries + GHIDRA_INT(fVar4) * 0x28) == 3) { if ((g_manager->_persistentGameData)._isReadOnly == 0) { *(undefined1 *) - ((int)(g_manager->_persistentGameData)._cutsceneCounters + - *(int *)(entries + 0xc + (int)fVar4 * 0x28) + 0x74) = 0; + (GHIDRA_INT((g_manager->_persistentGameData)._cutsceneCounters) + + *(int *)(entries + 0xc + GHIDRA_INT(fVar4) * 0x28) + 0x74) = 0; *(undefined1 *)&manager->_persistentGameData = 1; } - local_18[0] = *(uint *)(entries + 0xc + (int)fVar4 * 0x28); + local_18[0] = *(uint *)(entries + 0xc + GHIDRA_INT(fVar4) * 0x28); std_set_int_erase_key(&(g_menuManager->_seedsObject)._seedEffects,(int *)local_18); fVar4 = seedEffectSet->PositionX; Reset(seedEffectSet); - iVar2 = (int)(*(int *)seedEffectSet[1].SpecialSeedsSprite._animDefaultName._buf - - seedEffectSet[1].SpecialSeedsSprite._filename._capacity) / 0x28; - if ((int)fVar4 < iVar2) { - entryIt = (int *)(seedEffectSet[1].SpecialSeedsSprite._filename._capacity + (int)fVar4 * 0x28); + iVar2 = GHIDRA_INT((*(int *)seedEffectSet[1].SpecialSeedsSprite._animDefaultName._buf - + seedEffectSet[1].SpecialSeedsSprite._filename._capacity)) / 0x28; + if (GHIDRA_INT(fVar4) < iVar2) { + entryIt = (int *)(seedEffectSet[1].SpecialSeedsSprite._filename._capacity + GHIDRA_INT(fVar4) * 0x28); do { if (*entryIt != 0) break; - fVar4 = (float)((int)fVar4 + 1); + fVar4 = (float)(GHIDRA_INT(fVar4) + 1); entryIt = entryIt + 10; - } while ((int)fVar4 < iVar2); + } while (GHIDRA_INT(fVar4) < iVar2); } - if (iVar2 + -1 < (int)fVar4) { + if (iVar2 + -1 < GHIDRA_INT(fVar4)) { fVar4 = (float)(iVar2 + -1); } seedEffectSet->PositionX = fVar4; @@ -144,40 +144,40 @@ LAB_008f0261: } else { local_18[0] = seedEffectSet[1].SpecialSeedsSprite._filename._capacity; - local_10 = (Seeds *)((int)seedEffectSet->PositionX * 5); - iVar2 = *(int *)(local_18[0] + (int)seedEffectSet->PositionX * 0x28); + local_10 = (Seeds *)(GHIDRA_INT(seedEffectSet->PositionX) * 5); + iVar2 = *(int *)(local_18[0] + GHIDRA_INT(seedEffectSet->PositionX) * 0x28); if (iVar2 == 1) { seedEffectSet = &(g_menuManager->_seedsObject)._seedEffects; pvVar3 = *seedEffectSet; FID_conflict__Erase_tree_>_> (seedEffectSet, (fuzzer_allocator_> *)seedEffectSet, - *(_Tree_node **)((int)pvVar3 + 4)); + *(_Tree_node **)(GHIDRA_INT(pvVar3) + 4)); *(void **)((char *)pvVar3 + 4) = pvVar3; *(void **)pvVar3 = pvVar3; *(void **)((char *)pvVar3 + 8) = pvVar3; (menuManager->_seedsObject)._seedEffectsCount = 0; - iVar2 = *(int *)(local_18[0] + (int)local_10 * 8); + iVar2 = *(int *)(local_18[0] + GHIDRA_INT(local_10) * 8); } scaledIndex = local_10; entries = local_18[0]; menuManager = g_menuManager; if (iVar2 == 2) { pvVar3 = (g_menuManager->_menuStateHistory)._end; - if (1 < (uint)((int)pvVar3 - (int)(g_menuManager->_menuStateHistory)._begin >> 2)) { - pvVar3 = (void *)((int)pvVar3 + -4); + if (1 < GHIDRA_UINT((GHIDRA_INT(pvVar3) - GHIDRA_INT((g_menuManager->_menuStateHistory)._begin) >> 2))) { + pvVar3 = (void *)(GHIDRA_INT(pvVar3) + -4); (g_menuManager->_menuStateHistory)._end = pvVar3; } ((MenuManager *)(menuManager))->MenuManager::SetState(*(int *)((char *)pvVar3 + -4),0); } - if (*(int *)(entries + (int)scaledIndex * 8) == 3) { + if (*(int *)(entries + GHIDRA_INT(scaledIndex) * 8) == 3) { local_10 = &g_menuManager->_seedsObject; - isSeedActive = ((Seeds *)(local_10))->Seeds::HasSeedEffect(*(uint *)(entries + 0xc + (int)scaledIndex * 8)); - seedEffect = *(uint *)(entries + 0xc + (int)scaledIndex * 8); + isSeedActive = ((Seeds *)(local_10))->Seeds::HasSeedEffect(*(uint *)(entries + 0xc + GHIDRA_INT(scaledIndex) * 8)); + seedEffect = *(uint *)(entries + 0xc + GHIDRA_INT(scaledIndex) * 8); if (isSeedActive == 0) { ((Seeds *)(local_10))->Seeds::RemoveBlockingSeedEffects(seedEffect); Seeds::AddSeedEffect - (&g_menuManager->_seedsObject,*(int *)(entries + 0xc + (int)scaledIndex * 8)); + (&g_menuManager->_seedsObject,*(int *)(entries + 0xc + GHIDRA_INT(scaledIndex) * 8)); } else { local_18[0] = seedEffect; @@ -211,14 +211,14 @@ LAB_008f0594: goto LAB_008f0642; } } - seedEffectSet->PositionY = (float)((int)seedEffectSet->PositionY + 1); + seedEffectSet->PositionY = (float)(GHIDRA_INT(seedEffectSet->PositionY) + 1); LAB_008f0642: menuManager = g_menuManager; entries = seedEffectSet[1].SpecialSeedsSprite._filename._capacity; - fVar4 = DAT_00c35e24 + *(float *)(entries + 8 + (int)seedEffectSet->PositionX * 0x28) + DAT_00c35e4c; - fVar5 = DAT_00c35e20 + *(float *)(entries + 4 + (int)seedEffectSet->PositionX * 0x28) + _DAT_00c35e48; - seedEffectSet->SelectedElement = (int)fVar4; - seedEffectSet->State = (int)fVar5; + fVar4 = DAT_00c35e24 + *(float *)(entries + 8 + GHIDRA_INT(seedEffectSet->PositionX) * 0x28) + DAT_00c35e4c; + fVar5 = DAT_00c35e20 + *(float *)(entries + 4 + GHIDRA_INT(seedEffectSet->PositionX) * 0x28) + _DAT_00c35e48; + seedEffectSet->SelectedElement = GHIDRA_INT(fVar4); + seedEffectSet->State = GHIDRA_INT(fVar5); menuManager->_viewPositionSet[6].x = *(float *)&(*(undefined1 *)((char *)(menuManager) + 0xf6fc)); menuManager->_viewPositionSet[6].y = *(float *)&(*(undefined1 *)((char *)(menuManager) + 0xf700)); menuManager->_state = 1; @@ -307,7 +307,7 @@ void Menu_SpecialSeeds::Render() local_14 = -1; puStack_18 = &LAB_00b07527; local_1c = ExceptionList; - stackCookie = __security_cookie ^ (uint)(local_27 + 0x17); + stackCookie = __security_cookie ^ GHIDRA_UINT((local_27 + 0x17)); ExceptionList = &local_1c; sprite = &sprite->SpecialSeedsSprite; baseX = (g_menuManager->_ViewPosition).x + *(float *)&(*(undefined1 *)((char *)(sprite) + 0x14)); @@ -384,7 +384,7 @@ void Menu_SpecialSeeds::Render() local_4b8 = 0; } else { - local_4b8 = local_4bc % (uint)local_490; + local_4b8 = local_4bc % GHIDRA_UINT(local_490); } textBuf2 = 1.3136013e-38; nullFrameOffset = @@ -402,7 +402,7 @@ void Menu_SpecialSeeds::Render() if (((isEffectAddable != 0) && ((sprite->SpecialSeedsSprite)._animState._animData != (void *)0x0)) && (AnimationState::SetFrameFloat - (&(sprite->SpecialSeedsSprite)._animState,(float)(int)local_4b8), + (&(sprite->SpecialSeedsSprite)._animState,(float)GHIDRA_INT(local_4b8)), (sprite->SpecialSeedsSprite)._animState._animData != (void *)0x0)) { (sprite->SpecialSeedsSprite)._animState._isPlaying = 0; } @@ -456,8 +456,8 @@ void Menu_SpecialSeeds::Render() do { uVar5 = sprite[1].SpecialSeedsSprite._filename._capacity; isChecked = '\0'; - fVar7 = *(float *)(uVar5 + 4 + (int)local_4a8 * 0x28); - this_00 = (int *)(uVar5 + (int)local_4a8 * 0x28); + fVar7 = *(float *)(uVar5 + 4 + GHIDRA_INT(local_4a8) * 0x28); + this_00 = (int *)(uVar5 + GHIDRA_INT(local_4a8) * 0x28); iVar3 = *this_00; paperBottomY = (float)this_00[2]; if (((iVar3 == 3) || (iVar3 == 2)) || (iVar3 == 1)) { @@ -467,27 +467,27 @@ void Menu_SpecialSeeds::Render() local_490 = &g_menuManager->_seedsObject; std::set::find_node(); if ((*(char *)((char *)activeEffectNode + 0xd) == '\0') && - (*(int *)((char *)activeEffectNode + 0x10) <= (int)local_494)) { + (*(int *)((char *)activeEffectNode + 0x10) <= GHIDRA_INT(local_494))) { strBuf = activeEffectNode; } else { strBuf = local_490->_seedEffects; } if (strBuf == local_490->_seedEffects) { - isEffectAddable = ((Seeds *)(local_490))->Seeds::CanAddSeedEffect((uint)local_494); + isEffectAddable = ((Seeds *)(local_490))->Seeds::CanAddSeedEffect(GHIDRA_UINT(local_494)); if (isEffectAddable == 0) { local_4ac = -NAN; } } else { fVar6 = sprite->PositionX; - local_490 = (Seeds *)((int)fVar6 * 5); + local_490 = (Seeds *)(GHIDRA_INT(fVar6) * 5); uVar5 = sprite[1].SpecialSeedsSprite._filename._capacity; - seedListBytes = *(int *)(uVar5 + (int)fVar6 * 0x28); + seedListBytes = *(int *)(uVar5 + GHIDRA_INT(fVar6) * 0x28); if (seedListBytes == 3) { - local_490 = *(Seeds **)(uVar5 + 0xc + (int)fVar6 * 0x28); + local_490 = *(Seeds **)(uVar5 + 0xc + GHIDRA_INT(fVar6) * 0x28); if ((((Font *)&DAT_00000050 <= local_494) || ((Seeds *)&DAT_00000050 <= local_490)) || - (comboBan = (int *)((int)g_seedComboBans + (int)local_494 * 8), + (comboBan = (int *)(GHIDRA_INT(g_seedComboBans) + GHIDRA_INT(local_494) * 8), setFindResult = (int *)std::set::find(), *setFindResult != *comboBan)) goto LAB_008f0d0d; } @@ -516,7 +516,7 @@ LAB_008f0d3c: local_490 = (Seeds *)(checkmarkSeed % 3); isEffectAddable = ((ANM2 *)(sprite))->ANM2::SetAnimation((byte *)"Checkmark",1); if (((isEffectAddable != 0) && ((sprite->_animState)._animData != (void *)0x0)) && - (((AnimationState *)(&sprite->_animState))->AnimationState::SetFrameFloat((float)(int)local_490), + (((AnimationState *)(&sprite->_animState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(local_490)), (sprite->_animState)._animData != (void *)0x0)) { (sprite->_animState)._isPlaying = 0; } @@ -563,25 +563,25 @@ LAB_008f0d3c: numSeedsText._buf[2] = '\0'; numSeedsText._buf[3] = '\0'; if (text != local_27) { - ((std::string *)(numSeedsText._buf))->std::string::assign(text,(int)local_27 - (int)text); + ((std::string *)(numSeedsText._buf))->std::string::assign(text,GHIDRA_INT(local_27) - GHIDRA_INT(text)); } local_458[0]._lineHeight = 0xf; local_458[0]._base = 0; local_458[0]._spacingVert = 10; local_458[0]._outline = 0; - local_458[0]._18_2_ = 0; + (*(undefined2 *)((char *)&(local_458[0]) + 0x12)) = 0; local_458[0]._isLoaded = 0x7b; - local_458[0]._1_3_ = 0x6d756e; + (*(undefined1 *)((char *)&(local_458[0]) + 0x1)) = 0x6d756e; local_458[0]._fontSize = 0x6573; local_458[0]._infoBitField = 0x65; local_458[0]._charSet = 100; local_458[0]._stretchH = 0x7d73; local_458[0]._aa = 0; - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; uVar5 = displayName._size; local_494 = (Font *)&displayName; if (0xf < displayName._capacity) { - local_494 = (Font *)displayName._buf._0_4_; + local_494 = (*(undefined4 *)((char *)&((Font *)displayName._buf) + 0x0)); } formattedName._buf[0] = '\0'; formattedName._buf[1] = '\0'; @@ -591,21 +591,21 @@ LAB_008f0d3c: formattedName._capacity = 0; local_490 = (Seeds *)displayName._size; if (displayName._size < 0x10) { - formattedName._buf._0_4_ = *(undefined4 *)((std_string *)local_494)->_buf; - formattedName._buf._4_4_ = *(undefined4 *)(((std_string *)local_494)->_buf + 4); - formattedName._buf._8_4_ = *(undefined4 *)(((std_string *)local_494)->_buf + 8); - formattedName._buf._12_4_ = *(undefined4 *)(((std_string *)local_494)->_buf + 0xc); - formattedName._capacity = (uint)&DAT_0000000f; + (*(undefined4 *)((char *)&(formattedName._buf) + 0x0)) = *(undefined4 *)((std_string *)local_494)->_buf; + (*(undefined4 *)((char *)&(formattedName._buf) + 0x4)) = *(undefined4 *)(((std_string *)local_494)->_buf + 4); + (*(undefined4 *)((char *)&(formattedName._buf) + 0x8)) = *(undefined4 *)(((std_string *)local_494)->_buf + 8); + (*(undefined4 *)((char *)&(formattedName._buf) + 0xc)) = *(undefined4 *)(((std_string *)local_494)->_buf + 0xc); + formattedName._capacity = GHIDRA_UINT(&DAT_0000000f); } else { local_4b0 = (std_string *)(displayName._size | 0xf); if ((std_string *)0x7fffffff < local_4b0) { local_4b0 = (std_string *)0x7fffffff; } - formattedName._buf._0_4_ = std::_Allocate((uint)(local_4b0->_buf + 1)); + (*(undefined4 *)((char *)&(formattedName._buf) + 0x0)) = std::_Allocate(GHIDRA_UINT((local_4b0->_buf + 1))); textBuf2 = 1.3138286e-38; - memcpy((void *)formattedName._buf._0_4_,local_494,uVar5 + 1); - formattedName._capacity = (uint)local_4b0; + memcpy((*(undefined4 *)((char *)&((void *)formattedName._buf) + 0x0)),local_494,uVar5 + 1); + formattedName._capacity = GHIDRA_UINT(local_4b0); } acStack_528[4] = formattedName._buf[0xc]; acStack_528[5] = formattedName._buf[0xd]; @@ -616,21 +616,21 @@ LAB_008f0d3c: acStack_528[2] = formattedName._buf[10]; acStack_528[3] = formattedName._buf[0xb]; formattedName._size = uVar5; - local_14._0_1_ = 3; - local_494 = (Font *)local_458[0]._0_4_; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; + local_494 = (*(undefined4 *)((char *)&((Font *)local_458[0]) + 0x0)); local_490 = (Seeds *)formattedName._size; if (uVar5 != 0) { uVar5 = 0; - local_530 = (char [4])formattedName._buf._0_4_; - acStack_52c = (char [4])formattedName._buf._4_4_; + local_530 = (*(undefined4 *)((char *)&((char [4])formattedName._buf) + 0x0)); + acStack_52c = (*(undefined4 *)((char *)&((char [4])formattedName._buf) + 0x4)); while( true ) { needle = local_458; - if (0xf < (uint)local_458[0]._20_4_) { + if (0xf < (*(undefined4 *)((char *)&(GHIDRA_UINT(local_458[0])) + 0x14))) { needle = local_494; } psVar4 = &formattedName; if (0xf < formattedName._capacity) { - psVar4 = (std_string *)formattedName._buf._0_4_; + psVar4 = (*(undefined4 *)((char *)&((std_string *)formattedName._buf) + 0x0)); } textBuf2 = 1.3138455e-38; uVar5 = std::string::find((byte *)psVar4,formattedName._size,uVar5,&needle->_isLoaded,10 @@ -638,7 +638,7 @@ LAB_008f0d3c: if (uVar5 == 0xffffffff) break; psVar4 = &numSeedsText; if (0xf < numSeedsText._capacity) { - psVar4 = (std_string *)numSeedsText._buf._0_4_; + psVar4 = (*(undefined4 *)((char *)&((std_string *)numSeedsText._buf) + 0x0)); } in_stack_fffffa50 = (Seeds *)0x8f10e2; ((std::string *)(formattedName._buf))->std::string::replace(uVar5,10,(byte *)psVar4,numSeedsText._size); @@ -646,7 +646,7 @@ LAB_008f0d3c: } sprite = spriteCopy; } - local_530 = (char [4])formattedName._buf._0_4_; + local_530 = (*(undefined4 *)((char *)&((char [4])formattedName._buf) + 0x0)); acStack_528[4] = formattedName._buf[0xc]; acStack_528[5] = formattedName._buf[0xd]; acStack_528[6] = formattedName._buf[0xe]; @@ -655,12 +655,12 @@ LAB_008f0d3c: acStack_528[1] = formattedName._buf[9]; acStack_528[2] = formattedName._buf[10]; acStack_528[3] = formattedName._buf[0xb]; - formattedName._buf._0_4_ = formattedName._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(formattedName._buf) + 0x0)) = (*(undefined4 *)((char *)&(formattedName._buf) + 0x0)) & 0xffffff00; local_4a0.y = (float)formattedName._capacity; local_4a0.x = (float)formattedName._size; formattedName._capacity = 0xf; formattedName._size = 0; - acStack_52c = (char [4])formattedName._buf._4_4_; + acStack_52c = (*(undefined4 *)((char *)&((char [4])formattedName._buf) + 0x4)); ((std::string *)(displayName._buf))->std::string::_Tidy_deallocate(); displayName._buf[0] = local_530[0]; displayName._buf[1] = local_530[1]; @@ -680,20 +680,20 @@ LAB_008f0d3c: displayName._buf[0xf] = acStack_528[7]; local_458[0]._lineHeight = 0xf; local_458[0]._base = 0; - local_14 = (uint)local_14._1_3_ << 8; - displayName._size = (uint)local_4a0.x; - displayName._capacity = (uint)local_4a0.y; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; + displayName._size = GHIDRA_UINT(local_4a0.x); + displayName._capacity = GHIDRA_UINT(local_4a0.y); local_458[0]._spacingVert = 0; local_458[0]._outline = 0; - local_458[0]._18_2_ = 0; - local_458[0]._0_8_ = local_458[0]._0_8_ & 0xffffffffffffff00; + (*(undefined2 *)((char *)&(local_458[0]) + 0x12)) = 0; + (*(undefined8 *)((char *)&(local_458[0]) + 0x0)) = (*(undefined8 *)((char *)&(local_458[0]) + 0x0)) & 0xffffffffffffff00; if (0xf < numSeedsText._capacity) { uVar5 = numSeedsText._capacity + 1; - strBuf = (void *)numSeedsText._buf._0_4_; + strBuf = (*(undefined4 *)((char *)&((void *)numSeedsText._buf) + 0x0)); if (0xfff < uVar5) { - strBuf = *(void **)(numSeedsText._buf._0_4_ + -4); + strBuf = *(void **)((*(undefined4 *)((char *)&(numSeedsText._buf) + 0x0)) + -4); uVar5 = numSeedsText._capacity + 0x24; - if (0x1f < (numSeedsText._buf._0_4_ - (int)strBuf) - 4U) goto LAB_008f19db; + if (0x1f < ((*(undefined4 *)((char *)&(numSeedsText._buf) + 0x0)) - GHIDRA_INT(strBuf)) - 4U) goto LAB_008f19db; } operator_delete(strBuf,uVar5); } @@ -702,7 +702,7 @@ LAB_008f0d3c: textSize = local_578; numSeedsText._size = 0; numSeedsText._capacity = 0xf; - numSeedsText._buf._0_4_ = numSeedsText._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(numSeedsText._buf) + 0x0)) = (*(undefined4 *)((char *)&(numSeedsText._buf) + 0x0)) & 0xffffff00; local_4b0 = (std_string *)&DAT_00000009; seedListBytes = 0x8f1223; std::set::find_node(); @@ -714,56 +714,56 @@ LAB_008f0d3c: (sprite->HoldInputTimer - 1U < 0x1d)) && (*(int *)&g_manager->_stringTable == 0)) { ((std::string *)(acStackY_640 + 0x8c))->std::string::string(&displayName); local_4b0 = string_scramble_seeded - (local_458,in_stack_fffffa4c,(int)in_stack_fffffa50,(int)textBuf2, - seedListBytes,(uint)textSize,(uint)textCapacity); + (local_458,in_stack_fffffa4c,GHIDRA_INT(in_stack_fffffa50),GHIDRA_INT(textBuf2), + seedListBytes,GHIDRA_UINT(textSize),GHIDRA_UINT(textCapacity)); if (&displayName != local_4b0) { if (0xf < displayName._capacity) { uVar5 = displayName._capacity + 1; - strBuf = (void *)displayName._buf._0_4_; + strBuf = (*(undefined4 *)((char *)&((void *)displayName._buf) + 0x0)); if (0xfff < uVar5) { - strBuf = *(void **)(displayName._buf._0_4_ + -4); + strBuf = *(void **)((*(undefined4 *)((char *)&(displayName._buf) + 0x0)) + -4); uVar5 = displayName._capacity + 0x24; - if (0x1f < (displayName._buf._0_4_ - (int)strBuf) - 4U) goto LAB_008f19db; + if (0x1f < ((*(undefined4 *)((char *)&(displayName._buf) + 0x0)) - GHIDRA_INT(strBuf)) - 4U) goto LAB_008f19db; } operator_delete(strBuf,uVar5); } - displayName._buf._0_4_ = *(undefined4 *)local_4b0->_buf; - displayName._buf._4_4_ = *(undefined4 *)(local_4b0->_buf + 4); - displayName._buf._8_4_ = *(undefined4 *)(local_4b0->_buf + 8); - displayName._buf._12_4_ = *(undefined4 *)(local_4b0->_buf + 0xc); + (*(undefined4 *)((char *)&(displayName._buf) + 0x0)) = *(undefined4 *)local_4b0->_buf; + (*(undefined4 *)((char *)&(displayName._buf) + 0x4)) = *(undefined4 *)(local_4b0->_buf + 4); + (*(undefined4 *)((char *)&(displayName._buf) + 0x8)) = *(undefined4 *)(local_4b0->_buf + 8); + (*(undefined4 *)((char *)&(displayName._buf) + 0xc)) = *(undefined4 *)(local_4b0->_buf + 0xc); displayName._size = local_4b0->_size; displayName._capacity = local_4b0->_capacity; local_4b0->_size = 0; local_4b0->_capacity = 0xf; local_4b0->_buf[0] = 0; } - if (0xf < (uint)local_458[0]._20_4_) { - uVar5 = local_458[0]._20_4_ + 1; - strBuf = (void *)local_458[0]._0_4_; + if (0xf < (*(undefined4 *)((char *)&(GHIDRA_UINT(local_458[0])) + 0x14))) { + uVar5 = (*(undefined4 *)((char *)&(local_458[0]) + 0x14)) + 1; + strBuf = (*(undefined4 *)((char *)&((void *)local_458[0]) + 0x0)); if (0xfff < uVar5) { - strBuf = *(void **)(local_458[0]._0_4_ + -4); - uVar5 = local_458[0]._20_4_ + 0x24; - if (0x1f < (uint)(local_458[0]._0_4_ + (-4 - (int)strBuf))) goto LAB_008f19db; + strBuf = *(void **)((*(undefined4 *)((char *)&(local_458[0]) + 0x0)) + -4); + uVar5 = (*(undefined4 *)((char *)&(local_458[0]) + 0x14)) + 0x24; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_458[0]) + 0x0)) + (-4 - GHIDRA_INT(strBuf))))) goto LAB_008f19db; } operator_delete(strBuf,uVar5); } local_458[0]._spacingVert = 0; local_458[0]._outline = 0; - local_458[0]._18_2_ = 0; + (*(undefined2 *)((char *)&(local_458[0]) + 0x12)) = 0; local_458[0]._lineHeight = 0xf; local_458[0]._base = 0; - local_458[0]._0_8_ = local_458[0]._0_8_ & 0xffffffffffffff00; + (*(undefined8 *)((char *)&(local_458[0]) + 0x0)) = (*(undefined8 *)((char *)&(local_458[0]) + 0x0)) & 0xffffffffffffff00; } psVar4 = &displayName; if ((displayName._capacity < 0x10) || - (psVar4 = (std_string *)displayName._buf._0_4_, displayName._buf._0_4_ != 0)) { + (psVar4 = (*(undefined4 *)((char *)&((std_string *)displayName._buf) + 0x0)), (*(undefined4 *)((char *)&(displayName._buf) + 0x0)) != 0)) { local_4b0 = (std_string *)(psVar4->_buf + 1); strChar = psVar4; do { pcVar2 = strChar->_buf; strChar = (std_string *)(strChar->_buf + 1); } while (*pcVar2 != 0); - seedListBytes = (int)strChar - (int)local_4b0; + seedListBytes = GHIDRA_INT(strChar) - GHIDRA_INT(local_4b0); } else { seedListBytes = 0; @@ -777,7 +777,7 @@ LAB_008f0d3c: fVar6 = baseX + DAT_00c35e20; local_45c = 0; local_458[0]._isLoaded = 0xff; - local_458[0]._1_3_ = 0xff; + (*(undefined1 *)((char *)&(local_458[0]) + 0x1)) = 0xff; local_458[0]._fontSize = 0; local_458[0]._infoBitField = 0; local_458[0]._charSet = 0; @@ -791,22 +791,22 @@ LAB_008f0d3c: local_458[0]._spacingHoriz = 0xff; local_458[0]._spacingVert = 0; local_458[0]._outline = 0; - local_458[0]._18_2_ = 0; + (*(undefined2 *)((char *)&(local_458[0]) + 0x12)) = 0; local_458[0]._lineHeight = 0; local_458[0]._base = 0; - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; acStack_528[8] = '\0'; acStack_528[9] = '\0'; acStack_528[10] = '\0'; acStack_528[0xb] = '\0'; - local_4b0 = (std_string *)(((float)((uint)local_4ac >> 0x10 & 0xff) + 0.0) / 255.0); - uVar5 = (uint)local_4ac >> 0x18; - local_490 = (Seeds *)(((float)((uint)local_4ac >> 8 & 0xff) + 0.0) / 255.0); - local_4ac = ((float)((uint)local_4ac & 0xff) + 0.0) / 255.0; + local_4b0 = (std_string *)(((float)(GHIDRA_UINT(local_4ac) >> 0x10 & 0xff) + 0.0) / 255.0); + uVar5 = GHIDRA_UINT(local_4ac) >> 0x18; + local_490 = (Seeds *)(((float)(GHIDRA_UINT(local_4ac) >> 8 & 0xff) + 0.0) / 255.0); + local_4ac = ((float)(GHIDRA_UINT(local_4ac) & 0xff) + 0.0) / 255.0; colorAlpha = ((float)uVar5 + 0.0) / 255.0; strBuf = ((Font *)(local_494))->Font::layout_glyphs(glyphRun,(byte *)&local_458[0]._scaleW,&local_45c, &g_vectorOne); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; color._green = (float)local_490; color._red = (float)local_4b0; color._blue = local_4ac; @@ -818,10 +818,10 @@ LAB_008f0d3c: Font::draw_glyph_run(local_494,fVar6 + fVar7,local_4f4,strBuf,1.0,1.0,color,&local_45c); std::vector<12byte>::clear(); std::vector<12byte>::_Tidy(); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; local_458[0]._spacingVert = 0; local_458[0]._outline = 0; - local_458[0]._18_2_ = 0; + (*(undefined2 *)((char *)&(local_458[0]) + 0x12)) = 0; local_458[0]._lineHeight = 0; local_458[0]._base = 0; seedListBytes = ((Font *)(local_494))->Font::get_string_width_utf16(&local_458[0]._scaleW,-1); @@ -834,7 +834,7 @@ LAB_008f0d3c: LAB_008f174b: isEffectAddable = ((ANM2 *)(sprite))->ANM2::SetAnimation((byte *)"NoAchievement",1); if (((isEffectAddable != 0) && ((sprite->_animState)._animData != (void *)0x0)) && - (((AnimationState *)(&sprite->_animState))->AnimationState::SetFrameFloat((float)(int)local_490), + (((AnimationState *)(&sprite->_animState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(local_490)), (sprite->_animState)._animData != (void *)0x0)) { (sprite->_animState)._isPlaying = 0; } @@ -878,7 +878,7 @@ LAB_008f16d6: else { strBuf = *(void **)local_490; } - local_490 = (Seeds *)(uint)(strBuf == *(void **)local_490); + local_490 = (Seeds *)GHIDRA_UINT((strBuf == *(void **)local_490)); goto LAB_008f174b; } } @@ -886,11 +886,11 @@ LAB_008f1841: local_14 = -1; if (0xf < displayName._capacity) { uVar5 = displayName._capacity + 1; - strBuf = (void *)displayName._buf._0_4_; + strBuf = (*(undefined4 *)((char *)&((void *)displayName._buf) + 0x0)); if (0xfff < uVar5) { - strBuf = *(void **)(displayName._buf._0_4_ + -4); + strBuf = *(void **)((*(undefined4 *)((char *)&(displayName._buf) + 0x0)) + -4); uVar5 = displayName._capacity + 0x24; - if (0x1f < (displayName._buf._0_4_ - (int)strBuf) - 4U) { + if (0x1f < ((*(undefined4 *)((char *)&(displayName._buf) + 0x0)) - GHIDRA_INT(strBuf)) - 4U) { LAB_008f19db: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -929,10 +929,10 @@ LAB_008f19db: AnimationState::Render(otherAnimState,&cursorPos,&g_vectorZero,&g_vectorZero); } } - local_4a8 = (float)((int)local_4a8 + 1); - } while ((uint)local_4a8 < - (uint)((int)(*(int *)sprite[1].SpecialSeedsSprite._animDefaultName._buf - - sprite[1].SpecialSeedsSprite._filename._capacity) / 0x28)); + local_4a8 = (float)(GHIDRA_INT(local_4a8) + 1); + } while (GHIDRA_UINT(local_4a8) < + GHIDRA_UINT((GHIDRA_INT((*(int *)sprite[1].SpecialSeedsSprite._animDefaultName._buf - + sprite[1].SpecialSeedsSprite._filename._capacity)) / 0x28))); } ExceptionList = local_1c; return; @@ -1001,7 +1001,7 @@ void Menu_SpecialSeeds::Reset() local_14 = (int *****)0xffffffff; puStack_18 = &LAB_00b07590; local_1c = ExceptionList; - uVar5 = __security_cookie ^ (uint)(implementedText + 0x15); + uVar5 = __security_cookie ^ GHIDRA_UINT((implementedText + 0x15)); ExceptionList = &local_1c; this->PositionX = 0.0; this->PositionY = 0.0; @@ -1033,7 +1033,7 @@ void Menu_SpecialSeeds::Reset() pbVar15 = (byte *)0x8f1b22; pbVar9 = text; ((rapidxml::xml_document *)(xmlDoc))->rapidxml::xml_document::parse(text); - pvVar7 = ((xml_node *)(xmlDoc))->xml_node::first_node((byte *)"entryDialog",(int)pbVar15,(byte)pbVar9); + pvVar7 = ((xml_node *)(xmlDoc))->xml_node::first_node((byte *)"entryDialog",GHIDRA_INT(pbVar15),(byte)pbVar9); for (puVar12 = *(undefined4 **)((char *)pvVar7 + 0x20); bVar4 = (byte)pbVar9, puVar12 != (undefined4 *)0x0; puVar12 = (undefined4 *)puVar12[6]) { pbVar10 = (byte *)*puVar12; @@ -1047,7 +1047,7 @@ void Menu_SpecialSeeds::Reset() bVar14 = bVar4 < (byte)*pcVar8; if (bVar4 != *pcVar8) { LAB_008f1b71: - uVar5 = -(uint)bVar14 | 1; + uVar5 = -GHIDRA_UINT(bVar14) | 1; goto LAB_008f1b76; } if (bVar4 == 0) break; @@ -1069,10 +1069,10 @@ LAB_008f1b76: bVar4 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar4 != 0); - pbVar9 = pbVar9 + -(int)(pbVar15 + 1); + pbVar9 = pbVar9 + -GHIDRA_INT((pbVar15 + 1)); targetString = this + 1; LAB_008f1c08: - ((std::string *)((char *)targetString))->std::string::assign(pbVar15,(uint)pbVar9); + ((std::string *)((char *)targetString))->std::string::assign(pbVar15,GHIDRA_UINT(pbVar9)); } else { pcVar8 = "enable"; @@ -1085,7 +1085,7 @@ LAB_008f1c08: bVar14 = bVar4 < (byte)*pcVar8; if (bVar4 != *pcVar8) { LAB_008f1bd7: - uVar5 = -(uint)bVar14 | 1; + uVar5 = -GHIDRA_UINT(bVar14) | 1; goto LAB_008f1bdc; } if (bVar4 == 0) break; @@ -1107,7 +1107,7 @@ LAB_008f1bdc: bVar4 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar4 != 0); - pbVar9 = pbVar9 + -(int)(pbVar15 + 1); + pbVar9 = pbVar9 + -GHIDRA_INT((pbVar15 + 1)); targetString = (Menu_SpecialSeeds *)&(*(undefined1 *)((char *)&(this[1]) + 0x18)); goto LAB_008f1c08; } @@ -1115,7 +1115,7 @@ LAB_008f1bdc: bVar4 = (byte)pbVar9; if (puVar12[4] == 0) break; } - pvVar7 = ((xml_node *)(xmlDoc))->xml_node::first_node((byte *)"seedmenu",(int)pbVar15,bVar4); + pvVar7 = ((xml_node *)(xmlDoc))->xml_node::first_node((byte *)"seedmenu",GHIDRA_INT(pbVar15),bVar4); for (puVar12 = *(undefined4 **)((char *)pvVar7 + 0x18); puVar12 != (undefined4 *)0x0; puVar12 = (undefined4 *)puVar12[0xb]) { pbVar15 = (byte *)*puVar12; @@ -1129,7 +1129,7 @@ LAB_008f1bdc: bVar14 = bVar4 < (byte)*pcVar8; if (bVar4 != *pcVar8) { LAB_008f1c77: - uVar5 = -(uint)bVar14 | 1; + uVar5 = -GHIDRA_UINT(bVar14) | 1; goto LAB_008f1c7c; } if (bVar4 == 0) break; @@ -1148,8 +1148,8 @@ LAB_008f1c7c: newEntryNameSize = 0; newEntryNameCapacity = 0xf; newEntryName = (void *)0x0; - local_14._1_3_ = (uint3)((uint)local_14 >> 8); - local_14 = (int *****)CONCAT31(local_14._1_3_,1); + (*(undefined1 *)((char *)&(local_14) + 0x1)) = (uint3)(GHIDRA_UINT(local_14) >> 8); + local_14 = (int *****)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); newEntryType = 1; pbVar15 = s_name; do { @@ -1168,9 +1168,9 @@ LAB_008f1cd0: pbVar10 = (byte *)puVar11[2]; } if (pbVar10 != pbVar9 + -0xb1c13b) goto LAB_008f1d83; - pbVar10 = pbVar10 + (int)pbVar15; + pbVar10 = pbVar10 + GHIDRA_INT(pbVar15); if (pbVar15 < pbVar10) { - iVar6 = (int)s_name - (int)pbVar15; + iVar6 = GHIDRA_INT(s_name) - GHIDRA_INT(pbVar15); while (*pbVar15 == pbVar15[iVar6]) { pbVar15 = pbVar15 + 1; if (pbVar10 <= pbVar15) goto LAB_008f1d10; @@ -1187,7 +1187,7 @@ LAB_008f1d10: bVar4 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar4 != 0); - ((std::string *)((char *)&newEntryName))->std::string::assign(pbVar15,(int)pbVar9 - (int)(pbVar15 + 1)); + ((std::string *)((char *)&newEntryName))->std::string::assign(pbVar15,GHIDRA_INT(pbVar9) - GHIDRA_INT((pbVar15 + 1))); } LAB_008f1d45: puVar11 = *(undefined4 **)this[1].SpecialSeedsSprite._animDefaultName._buf; @@ -1203,14 +1203,14 @@ LAB_008f1d45: entriesEndField = &this[1].SpecialSeedsSprite._animDefaultName; *(int *)entriesEndField->_buf = *(int *)entriesEndField->_buf + 0x28; } - local_14 = (int *****)((uint)local_14 & 0xffffff00); + local_14 = (int *****)(GHIDRA_UINT(local_14) & 0xffffff00); if (0xf < newEntryNameCapacity) { uVar5 = newEntryNameCapacity + 1; pvVar7 = newEntryName; if (0xfff < uVar5) { pvVar7 = *(void **)((char *)newEntryName + -4); uVar5 = newEntryNameCapacity + 0x24; - if (0x1f < (uint)((int)newEntryName + (-4 - (int)pvVar7))) goto LAB_008f2464; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(newEntryName) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_008f2464; } operator_delete(pvVar7,uVar5); } @@ -1226,7 +1226,7 @@ LAB_008f1d45: bVar14 = bVar4 < (byte)*pcVar8; if (bVar4 != *pcVar8) { LAB_008f1e12: - uVar5 = -(uint)bVar14 | 1; + uVar5 = -GHIDRA_UINT(bVar14) | 1; goto LAB_008f1e17; } if (bVar4 == 0) break; @@ -1245,7 +1245,7 @@ LAB_008f1e17: newEntryNameSize = 0; newEntryNameCapacity = 0xf; newEntryName = (void *)0x0; - local_14 = (int *****)CONCAT31(local_14._1_3_,2); + local_14 = (int *****)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); newEntryType = 2; pbVar15 = s_name; do { @@ -1264,9 +1264,9 @@ LAB_008f1e70: pbVar10 = (byte *)puVar11[2]; } if (pbVar10 != pbVar9 + -0xb1c13b) goto LAB_008f1f23; - pbVar10 = pbVar10 + (int)pbVar15; + pbVar10 = pbVar10 + GHIDRA_INT(pbVar15); if (pbVar15 < pbVar10) { - iVar6 = (int)s_name - (int)pbVar15; + iVar6 = GHIDRA_INT(s_name) - GHIDRA_INT(pbVar15); while (*pbVar15 == pbVar15[iVar6]) { pbVar15 = pbVar15 + 1; if (pbVar10 <= pbVar15) goto LAB_008f1eb0; @@ -1283,7 +1283,7 @@ LAB_008f1eb0: bVar4 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar4 != 0); - ((std::string *)((char *)&newEntryName))->std::string::assign(pbVar15,(int)pbVar9 - (int)(pbVar15 + 1)); + ((std::string *)((char *)&newEntryName))->std::string::assign(pbVar15,GHIDRA_INT(pbVar9) - GHIDRA_INT((pbVar15 + 1))); } LAB_008f1ee5: puVar11 = *(undefined4 **)this[1].SpecialSeedsSprite._animDefaultName._buf; @@ -1299,14 +1299,14 @@ LAB_008f1ee5: entriesEndField = &this[1].SpecialSeedsSprite._animDefaultName; *(int *)entriesEndField->_buf = *(int *)entriesEndField->_buf + 0x28; } - local_14 = (int *****)((uint)local_14 & 0xffffff00); + local_14 = (int *****)(GHIDRA_UINT(local_14) & 0xffffff00); if (0xf < newEntryNameCapacity) { uVar5 = newEntryNameCapacity + 1; pvVar7 = newEntryName; if (0xfff < uVar5) { pvVar7 = *(void **)((char *)newEntryName + -4); uVar5 = newEntryNameCapacity + 0x24; - if (0x1f < (uint)((int)newEntryName + (-4 - (int)pvVar7))) goto LAB_008f2464; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(newEntryName) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_008f2464; } operator_delete(pvVar7,uVar5); } @@ -1322,7 +1322,7 @@ LAB_008f1ee5: bVar14 = bVar4 < *pbVar10; if (bVar4 != *pbVar10) { LAB_008f1fb0: - uVar5 = -(uint)bVar14 | 1; + uVar5 = -GHIDRA_UINT(bVar14) | 1; goto LAB_008f1fb5; } if (bVar4 == 0) break; @@ -1341,7 +1341,7 @@ LAB_008f1fb5: newEntryId = 0; newEntryNameSize = 0; newEntryName = (void *)0x0; - local_14 = (int *****)CONCAT31(local_14._1_3_,3); + local_14 = (int *****)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),3); puVar11 = (undefined4 *)puVar12[8]; newEntryType = 3; bVar14 = true; @@ -1357,7 +1357,7 @@ LAB_008f1fb5: isLess = bVar4 < *pbVar10; if (bVar4 != *pbVar10) { LAB_008f2038: - uVar5 = -(uint)isLess | 1; + uVar5 = -GHIDRA_UINT(isLess) | 1; goto LAB_008f203d; } if (bVar4 == 0) break; @@ -1387,7 +1387,7 @@ LAB_008f203d: isLess = bVar4 < *pbVar10; if (bVar4 != *pbVar10) { LAB_008f2091: - uVar5 = -(uint)isLess | 1; + uVar5 = -GHIDRA_UINT(isLess) | 1; goto LAB_008f2096; } if (bVar4 == 0) break; @@ -1409,7 +1409,7 @@ LAB_008f2096: bVar4 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar4 != 0); - ((std::string *)((char *)&newEntryName))->std::string::assign(pbVar15,(int)pbVar9 - (int)(pbVar15 + 1)); + ((std::string *)((char *)&newEntryName))->std::string::assign(pbVar15,GHIDRA_INT(pbVar9) - GHIDRA_INT((pbVar15 + 1))); } else { pcVar8 = "implemented"; @@ -1422,7 +1422,7 @@ LAB_008f2096: isLess = bVar4 < (byte)*pcVar8; if (bVar4 != *pcVar8) { LAB_008f20f7: - uVar5 = -(uint)isLess | 1; + uVar5 = -GHIDRA_UINT(isLess) | 1; goto LAB_008f20fc; } if (bVar4 == 0) break; @@ -1447,7 +1447,7 @@ LAB_008f20fc: bVar4 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar4 != 0); - ((std::string *)((char *)implementedText))->std::string::assign(pbVar15,(int)pbVar9 - (int)(pbVar15 + 1)); + ((std::string *)((char *)implementedText))->std::string::assign(pbVar15,GHIDRA_INT(pbVar9) - GHIDRA_INT((pbVar15 + 1))); if (implementedTextSize == 0) { LAB_008f2201: bVar14 = false; @@ -1469,7 +1469,7 @@ LAB_008f2201: uVar5 = 0; } else { - uVar5 = -(uint)bVar14 | 1; + uVar5 = -GHIDRA_UINT(bVar14) | 1; } if (uVar5 != 0) goto LAB_008f2199; } @@ -1491,7 +1491,7 @@ LAB_008f2199: uVar5 = 0; } else { - uVar5 = -(uint)bVar14 | 1; + uVar5 = -GHIDRA_UINT(bVar14) | 1; } if (uVar5 == 0) goto LAB_008f21f8; } @@ -1511,14 +1511,14 @@ LAB_008f21f8: if (0xfff < uVar5) { implementedChars = (int ******)implementedText[0][-1]; uVar5 = implementedTextCapacity + 0x24; - if (0x1f < (uint)((int)implementedText[0] + (-4 - (int)implementedChars))) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(implementedText[0]) + (-4 - GHIDRA_INT(implementedChars))))) goto LAB_008f2464; } operator_delete(implementedChars,uVar5); } implementedTextSize = 0; implementedTextCapacity = 0xf; - implementedText[0] = (int ******)((uint)implementedText[0] & 0xffffff00); + implementedText[0] = (int ******)(GHIDRA_UINT(implementedText[0]) & 0xffffff00); } } } @@ -1526,7 +1526,7 @@ LAB_008f21f8: } manager = g_manager; if (bVar14) { - if (*(char *)((int)(g_manager->_persistentGameData)._cutsceneCounters + newEntryId + 0x74) + if (*(char *)(GHIDRA_INT((g_manager->_persistentGameData)._cutsceneCounters) + newEntryId + 0x74) != '\0') { puVar11 = *(undefined4 **)this[1].SpecialSeedsSprite._animDefaultName._buf; if (puVar11 == *(undefined4 **)(this[1].SpecialSeedsSprite._animDefaultName._buf + 4)) { @@ -1545,17 +1545,17 @@ LAB_008f21f8: } else if ((g_manager->_persistentGameData)._isReadOnly == 0) { *(undefined1 *) - ((int)(g_manager->_persistentGameData)._cutsceneCounters + newEntryId + 0x74) = 0; + (GHIDRA_INT((g_manager->_persistentGameData)._cutsceneCounters) + newEntryId + 0x74) = 0; *(undefined1 *)&manager->_persistentGameData = 1; } - local_14 = (int *****)((uint)local_14 & 0xffffff00); + local_14 = (int *****)(GHIDRA_UINT(local_14) & 0xffffff00); if (0xf < newEntryNameCapacity) { uVar5 = newEntryNameCapacity + 1; pvVar7 = newEntryName; if (0xfff < uVar5) { pvVar7 = *(void **)((char *)newEntryName + -4); uVar5 = newEntryNameCapacity + 0x24; - if (0x1f < (uint)((int)newEntryName + (-4 - (int)pvVar7))) goto LAB_008f2464; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(newEntryName) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_008f2464; } operator_delete(pvVar7,uVar5); } @@ -1571,7 +1571,7 @@ LAB_008f21f8: bVar14 = bVar4 < (byte)*pcVar8; if (bVar4 != *pcVar8) { LAB_008f2360: - uVar5 = -(uint)bVar14 | 1; + uVar5 = -GHIDRA_UINT(bVar14) | 1; goto LAB_008f2365; } if (bVar4 == 0) break; @@ -1593,7 +1593,7 @@ LAB_008f2365: newEntryNameSize = 0; newEntryNameCapacity = 0xf; newEntryName = (void *)0x0; - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; if (puVar11 == *(undefined4 **)(this[1].SpecialSeedsSprite._animDefaultName._buf + 4)) { FUN_008f27b0(puVar11,&newEntryType); } @@ -1614,14 +1614,14 @@ LAB_008f2365: entriesEndField = &this[1].SpecialSeedsSprite._animDefaultName; *(int *)entriesEndField->_buf = *(int *)entriesEndField->_buf + 0x28; } - local_14 = (int *****)((uint)local_14._1_3_ << 8); + local_14 = (int *****)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8); if (0xf < newEntryNameCapacity) { uVar5 = newEntryNameCapacity + 1; pvVar7 = newEntryName; if (0xfff < uVar5) { pvVar7 = *(void **)((char *)newEntryName + -4); uVar5 = newEntryNameCapacity + 0x24; - if (0x1f < (uint)((int)newEntryName + (-4 - (int)pvVar7))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(newEntryName) + (-4 - GHIDRA_INT(pvVar7))))) { LAB_008f2464: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1634,7 +1634,7 @@ LAB_008f2464: puVar12 = *(undefined4 **)this[1].SpecialSeedsSprite._animDefaultName._buf; if (puVar12[-10] == 0) { uVar5 = this[1].SpecialSeedsSprite._filename._capacity; - eraseDst = (undefined4 *)(uVar5 + (((int)((int)puVar12 - uVar5) / 0x28) * 5 + -5) * 8); + eraseDst = (undefined4 *)(uVar5 + ((GHIDRA_INT((GHIDRA_INT(puVar12) - uVar5)) / 0x28) * 5 + -5) * 8); eraseSrc = eraseDst + 10; if (eraseSrc != puVar12) { pcVar8 = (char *)(eraseDst + 4); @@ -1677,14 +1677,14 @@ LAB_008f2464: allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (text != (byte *)0x0) { uVar5 = *(uint *)(text + -4); oldAllocated = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar5; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar5; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)oldAllocated < uVar5); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocated) < uVar5)); free(text + -4); } uVar5 = this[1].SpecialSeedsSprite._filename._capacity; @@ -1698,7 +1698,7 @@ LAB_008f2464: do { *entryPos = layoutX; entryPos[1] = layoutY; - entryType = (int)entryPos[-1]; + entryType = GHIDRA_INT(entryPos[-1]); if ((entryType == 1) || (entryType == 2)) { layoutX = layoutX + _DAT_00c35e40; layoutY = layoutY + _DAT_00c35e44; @@ -1713,8 +1713,8 @@ LAB_008f2464: } uVar13 = uVar13 + 1; entryPos = entryPos + 10; - } while (uVar13 < (uint)((int)(*(int *)this[1].SpecialSeedsSprite._animDefaultName._buf - - this[1].SpecialSeedsSprite._filename._capacity) / 0x28)); + } while (uVar13 < GHIDRA_UINT((GHIDRA_INT((*(int *)this[1].SpecialSeedsSprite._animDefaultName._buf - + this[1].SpecialSeedsSprite._filename._capacity)) / 0x28))); } } ExceptionList = local_1c; diff --git a/src/game/menu_stats.cpp b/src/game/menu_stats.cpp index 57514ff..7d70f38 100644 --- a/src/game/menu_stats.cpp +++ b/src/game/menu_stats.cpp @@ -53,7 +53,7 @@ void Menu_Stats::Render(int param_2) local_8 = 0xffffffff; puStack_c = &LAB_00af6e25; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(orbitList + 0x78); + local_14 = __security_cookie ^ GHIDRA_UINT((orbitList + 0x78)); ExceptionList = &local_10; this->_IconIDtoUseForAchievementID[0xa7] = *(int *)(param_2 + 0x2c); this->_IconIDtoUseForAchievementID[0xa8] = 4; @@ -116,7 +116,7 @@ void Menu_Stats::Render(int param_2) if ((this->_StatsMenuSprite)._overlayAnimState._animFrame != 0.0) { AnimationState::AdvancePosition ((AnimationState *)&(this->_StatsMenuSprite)._overlayAnimState._nullLayerFrames, - *(int *)((int)(this->_StatsMenuSprite)._overlayAnimState._animFrame + 0x30) + -1) + *(int *)(GHIDRA_INT((this->_StatsMenuSprite)._overlayAnimState._animFrame) + 0x30) + -1) ; } } @@ -129,7 +129,7 @@ void Menu_Stats::Render(int param_2) if (*(int *)(param_2 + 0x1c) < 0) { fVar6 = *(float *)(this->_achievementMiniSprite2)._filename._buf; local_5c = fVar6; - if (-1 < (int)fVar6) { + if (-1 < GHIDRA_INT(fVar6)) { if ((this->_achievementMiniSprite2)._filename._buf[7] == '\0') { if (((*(int *)((this->_StatsMenuSprite)._filename._buf + 0xc) == 3) && (uVar7 == 0xce)) && (((this->_StatsMenuSprite)._filename._capacity == 0x4d || @@ -140,11 +140,11 @@ void Menu_Stats::Render(int param_2) isFastOrbit = '\0'; } EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&familiars,3,-1,-1,0,0); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&familiars,3,-1,-1,0,0); iVar5 = familiars._size; local_8 = 0; buffer_init(orbitList,familiars._size + 1); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); local_54 = 0; familiarsData = familiars._data; local_4c = orbitListData; @@ -172,13 +172,13 @@ void Menu_Stats::Render(int param_2) { isFastOrbit = '\x01'; } - local_48 = (float)((int)local_48 + 1); - if (orbitListCapacity < (uint)local_48) { + local_48 = (float)(GHIDRA_INT(local_48) + 1); + if (orbitListCapacity < GHIDRA_UINT(local_48)) { KAGE_LogMessage(0x10,(byte *)"EL: not enough space for push_back\n"); } - *(Entity_Familiar **)(local_4c + (int)fVar6 * 4) = otherFamiliar; + *(Entity_Familiar **)(local_4c + GHIDRA_INT(fVar6) * 4) = otherFamiliar; fVar6 = local_5c; - orbitListSize = (uint)local_48; + orbitListSize = GHIDRA_UINT(local_48); } else { fVar6 = local_5c; @@ -202,25 +202,25 @@ void Menu_Stats::Render(int param_2) if (isHasCollectible != 0) { local_48 = 0.33333334; } - if ((int)fVar6 < 1) { + if (GHIDRA_INT(fVar6) < 1) { fVar6 = 0.0; } orbitDistanceIndex = 1.4013e-44; - if ((int)fVar6 < 10) { + if (GHIDRA_INT(fVar6) < 10) { orbitDistanceIndex = fVar6; } uVar7 = 0; - local_54 = (int)orbitDistanceIndex * 0x14; + local_54 = GHIDRA_INT(orbitDistanceIndex) * 0x14; if (orbitCount != 0.0) { - local_5c = (float)((double)(int)orbitCount + - __uint_to_double_fixup[-((int)orbitCount >> 0x1f)]); + local_5c = (float)((double)GHIDRA_INT(orbitCount) + + __uint_to_double_fixup[-(GHIDRA_INT(orbitCount) >> 0x1f)]); do { local_50 = (EntityPtr *) __RTDynamicCast(*(undefined4 *)(local_4c + uVar7 * 4),0, &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Familiar::RTTI_Type_Descriptor ,0); - local_50[0x358] = (EntityPtr)(((float)(int)uVar7 * 6.2831855) / local_5c); + local_50[0x358] = (EntityPtr)(((float)GHIDRA_INT(uVar7) * 6.2831855) / local_5c); isHasCollectible = Entity_Player::HasCollectible ((Entity_Player *)this->_IconIDtoUseForAchievementID[0xb4],0x70,0); @@ -235,35 +235,35 @@ void Menu_Stats::Render(int param_2) local_50[0x35b] = (EntityPtr)(fVar6 * local_48 * 3.0); } uVar7 = uVar7 + 1; - } while (uVar7 < (uint)orbitCount); + } while (uVar7 < GHIDRA_UINT(orbitCount)); } if (orbitList[0] == '\0') { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } if (local_4c != 0) { uVar7 = *(uint *)(local_4c - 4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar7; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar7; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar7); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar7)); free((void *)(local_4c - 4)); } } local_8 = 0xffffffff; - if (familiars._0_1_ == '\0') { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + if ((*(undefined1 *)((char *)&(familiars) + 0x0)) == '\0') { + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } if (familiarsData != (void *)0x0) { uVar7 = *(uint *)((char *)familiarsData + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar7; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar7; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar7); - free((void *)((int)familiarsData + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar7)); + free((void *)(GHIDRA_INT(familiarsData) + -4)); } } local_8 = 0xffffffff; @@ -317,11 +317,11 @@ LAB_00630acd: pEVar4->Update(); (pEVar4->_sprite)._flipX = (byte)this->_IconIDtoUseForAchievementID[2]; fVar6 = *(float *)(param_2 + 0x28); - flagsHigh = (uint *)((int)&pEVar4->_flags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&pEVar4->_flags) + 4); *flagsHigh = *flagsHigh | 0x80; pEVar4->_health = fVar6; - *(int *)&pEVar4->_flags = (int)pEVar4->_flags; - ((EntityList *)((EntityList *)((int)g_game->_room + 0x1218)))->EntityList::AddPersistentEntity(pEVar4); + *(int *)&pEVar4->_flags = GHIDRA_INT(pEVar4->_flags); + ((EntityList *)((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218)))->EntityList::AddPersistentEntity(pEVar4); if (childSlot->_animation != (void *)0x0) { local_50 = (EntityPtr *)childSlot; std::multiset::erase(&local_50); @@ -426,7 +426,7 @@ void Menu_Stats::unload_graphics() spriteFields[0x13] = 0; spriteFields[0x14] = 0; if (layerStates != (void *)0x0) { - ptr = (uint *)((int)layerStates + -4); + ptr = (uint *)(GHIDRA_INT(layerStates) + -4); local_8 = 0; _eh_vector_destructor_iterator_(layerStates,0xa0,*ptr,LayerState::~LayerState); operator_delete(ptr,*ptr * 0xa0 + 4); @@ -438,10 +438,10 @@ void Menu_Stats::unload_graphics() spriteFields[0x18] = 0; spriteFields[0x19] = 0; spriteFields[0x1a] = 0; - spriteFields[0x1b] = (uint)g_vectorZero.x; - spriteFields[0x1c] = (uint)g_vectorZero.y; - spriteFields[0x1d] = (uint)g_vectorOne.x; - spriteFields[0x1e] = (uint)g_vectorOne.y; + spriteFields[0x1b] = GHIDRA_UINT(g_vectorZero.x); + spriteFields[0x1c] = GHIDRA_UINT(g_vectorZero.y); + spriteFields[0x1d] = GHIDRA_UINT(g_vectorOne.x); + spriteFields[0x1e] = GHIDRA_UINT(g_vectorOne.y); spriteFields[0x1f] = 0; spriteFields[0x20] = 0x3f800000; spriteFields[0x21] = 0x3f800000; @@ -497,11 +497,11 @@ void Menu_Stats::LoadGraphics() undefined4 local_14; byte *currentAnim; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b0fd1d; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; anmPath._size = 0; anmPath._capacity = 0xf; @@ -509,20 +509,20 @@ void Menu_Stats::LoadGraphics() anmPath._buf[1] = '\0'; anmPath._buf[2] = '\0'; anmPath._buf[3] = '\0'; - anmPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = std::_Allocate(0x20); anmPath._size = 0x1f; anmPath._capacity = 0x1f; - builtin_strncpy((char *)anmPath._buf._0_4_,"gfx/ui/main menu/StatsMenu.anm2",0x20); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)),"gfx/ui/main menu/StatsMenu.anm2",0x20); local_14 = 0; ((ANM2 *)(&this->_StatsMenuSprite))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; - pcVar2 = (char *)anmPath._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(anmPath._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + -4); uVar3 = anmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(anmPath._buf._0_4_ + (-4 - (int)pcVar2))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) { LAB_009ec971: local_14 = 0xffffffff; /* WARNING: Subroutine does not return */ @@ -537,20 +537,20 @@ LAB_009ec971: anmPath._buf[1] = '\0'; anmPath._buf[2] = '\0'; anmPath._buf[3] = '\0'; - anmPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = std::_Allocate(0x30); anmPath._size = 0x24; anmPath._capacity = 0x2f; - builtin_strncpy((char *)anmPath._buf._0_4_,"gfx/ui/achievement/achievements.anm2",0x25); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)),"gfx/ui/achievement/achievements.anm2",0x25); local_14 = 1; ((ANM2 *)(&this->_achievementsSprite))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; - pcVar2 = (char *)anmPath._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(anmPath._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + -4); uVar3 = anmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(anmPath._buf._0_4_ + (-4 - (int)pcVar2))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -566,28 +566,28 @@ LAB_009ec971: componentsPath._buf[1] = '\0'; componentsPath._buf[2] = '\0'; componentsPath._buf[3] = '\0'; - componentsPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(componentsPath._buf) + 0x0)) = std::_Allocate(0x30); componentsPath._size = 0x2b; componentsPath._capacity = 0x2f; - builtin_strncpy((char *)componentsPath._buf._0_4_,"gfx/ui/main menu/SecretsMenuComponents.anm2", + builtin_strncpy((*(undefined4 *)((char *)&((char *)componentsPath._buf) + 0x0)),"gfx/ui/main menu/SecretsMenuComponents.anm2", 0x2c); local_14 = 2; ((ANM2 *)((ANM2 *)(miniSpriteAnimData + -0xd)))->ANM2::Load(&componentsPath,1); local_14 = 0xffffffff; if (0xf < componentsPath._capacity) { uVar3 = componentsPath._capacity + 1; - pcVar2 = (char *)componentsPath._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)componentsPath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(componentsPath._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(componentsPath._buf) + 0x0)) + -4); uVar3 = componentsPath._capacity + 0x24; - if ((char *)0x1f < (char *)(componentsPath._buf._0_4_ + (-4 - (int)pcVar2))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(componentsPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) goto LAB_009ec971; } operator_delete(pcVar2,uVar3); } componentsPath._size = 0; componentsPath._capacity = 0xf; - componentsPath._buf._0_4_ = componentsPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(componentsPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(componentsPath._buf) + 0x0)) & 0xffffff00; if (miniSpriteIndex < 9) { currentAnim = *miniSpriteAnimData; if (currentAnim != (byte *)0x0) { @@ -601,7 +601,7 @@ LAB_009ec971: isLess = bVar1 < (byte)*pcVar2; if (bVar1 != *pcVar2) { LAB_009ecb50: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_009ecb55; } if (bVar1 == 0) break; @@ -652,7 +652,7 @@ void Menu_Stats::Update() this->_countItemsInCollection = 0; iVar1 = 0; do { - if (*(char *)((int)(manager->_persistentGameData)._eventCounters + iVar1 + 0x82c) != '\0') { + if (*(char *)(GHIDRA_INT((manager->_persistentGameData)._eventCounters) + iVar1 + 0x82c) != '\0') { this->_countItemsInCollection = this->_countItemsInCollection + 1; } game = g_game; @@ -669,7 +669,7 @@ void Menu_Stats::Update() this->_countTotalAchievements = this->_countTotalAchievements + 1; } achievementId = achievementId + 1; - } while ((int)achievementId < 0x282); + } while (GHIDRA_INT(achievementId) < 0x282); this->_countDeaths = (manager->_persistentGameData)._eventCounters[10]; this->_countMomKills = (manager->_persistentGameData)._eventCounters[1]; if ((this->_StatsMenuSprite)._animState._animData != (void *)0x0) { @@ -677,7 +677,7 @@ void Menu_Stats::Update() if (this->_countTotalAchievements < 1) { if ((*(int *)((char *)animPtr + 0x80) < 9) && (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - *(int *)((int)(this->_StatsMenuSprite)._animState._animation + 0x80) < 9)) + *(int *)(GHIDRA_INT((this->_StatsMenuSprite)._animState._animation) + 0x80) < 9)) goto LAB_009ecd3e; animPtr = (this->_StatsMenuSprite)._animState._animData; iVar1 = *(int *)((char *)animPtr + 0x58); @@ -689,7 +689,7 @@ void Menu_Stats::Update() else { if ((*(int *)((char *)animPtr + 0x80) < 9) && (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - *(int *)((int)(this->_StatsMenuSprite)._animState._animation + 0x80) < 9)) + *(int *)(GHIDRA_INT((this->_StatsMenuSprite)._animState._animation) + 0x80) < 9)) goto LAB_009ecd3e; animPtr = (this->_StatsMenuSprite)._animState._animData; iVar1 = *(int *)((char *)animPtr + 0x58); @@ -698,7 +698,7 @@ void Menu_Stats::Update() } targetFrame = 0.0; } - *(undefined4 *)((int)(this->_StatsMenuSprite)._animState._layerFrames + iVar1 * 4) = 0; + *(undefined4 *)(GHIDRA_INT((this->_StatsMenuSprite)._animState._layerFrames) + iVar1 * 4) = 0; ((AnimationState *)(&(this->_StatsMenuSprite)._animState))->AnimationState::AdvanceLayerPosition(iVar1,targetFrame); } LAB_009ecd3e: @@ -710,9 +710,9 @@ LAB_009ecd3e: } iVar1 = this->_statsMenuCurrentSelection; if ((this->_StatsMenuSprite)._animState._animData != (void *)0x0) { - if ((*(int *)((int)(this->_StatsMenuSprite)._animState._animation + 0x80) < 5) && + if ((*(int *)(GHIDRA_INT((this->_StatsMenuSprite)._animState._animation) + 0x80) < 5) && (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - *(int *)((int)(this->_StatsMenuSprite)._animState._animation + 0x80) < 5)) { + *(int *)(GHIDRA_INT((this->_StatsMenuSprite)._animState._animation) + 0x80) < 5)) { return; } animPtr = (this->_StatsMenuSprite)._animState._animData; @@ -720,7 +720,7 @@ LAB_009ecd3e: if (((animPtr == (void *)0x0) || (layerId < 0)) || (*(int *)((char *)animPtr + 0x1c) <= layerId)) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(this->_StatsMenuSprite)._animState._layerFrames + layerId * 4) = 0; + *(undefined4 *)(GHIDRA_INT((this->_StatsMenuSprite)._animState._layerFrames) + layerId * 4) = 0; ((AnimationState *)(&(this->_StatsMenuSprite)._animState))->AnimationState::AdvanceLayerPosition(layerId,(float)iVar1); } return; @@ -770,7 +770,7 @@ void Menu_Stats::Render() local_14 = 0xffffffff; puStack_18 = &LAB_00b0fd5d; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(countText + 0x24); + local_24 = __security_cookie ^ GHIDRA_UINT((countText + 0x24)); ExceptionList = &local_1c; local_58.y = (g_menuManager->_ViewPosition).x + this->_PositionX; local_50.y = (g_menuManager->_ViewPosition).y + this->_PositionY; @@ -876,13 +876,13 @@ void Menu_Stats::Render() (float)((double)iVar4 + __uint_to_double_fixup[-(iVar4 >> 0x1f)]) * 0.5,y); local_14 = 0xffffffff; local_58.y = 0.0; - animState = &((ANM2 *)((int)fVar3 + 0xc5c))->_animState; + animState = &((ANM2 *)(GHIDRA_INT(fVar3) + 0xc5c))->_animState; do { local_44.y = (g_menuManager->_ViewPosition).y + *(float *)((char *)fVar3 + 0x18) + *(float *)((char *)fVar3 + 0x134); - local_44.x = (float)(int)local_58.y * 35.0 + *(float *)((char *)fVar3 + 0x138) + 100.0 + + local_44.x = (float)GHIDRA_INT(local_58.y) * 35.0 + *(float *)((char *)fVar3 + 0x138) + 100.0 + (g_menuManager->_ViewPosition).x + *(float *)((char *)fVar3 + 0x14); - if (*(char *)((int)&animState[6]._currentlyTriggeredEvents + 1) != '\0') { + if (*(char *)(GHIDRA_INT(&animState[6]._currentlyTriggeredEvents) + 1) != '\0') { if (*(char *)&animState[2]._animation == '\0') { AnimationState::Render(animState,&local_44,&g_vectorZero,&g_vectorZero); secondAnimState = animState + 1; @@ -893,42 +893,42 @@ void Menu_Stats::Render() } AnimationState::Render(secondAnimState,&local_44,&g_vectorZero,&g_vectorZero); } - local_58.y = (float)((int)local_58.y + 1); + local_58.y = (float)(GHIDRA_INT(local_58.y) + 1); animState = (AnimationState *)&animState[8]._isPlaying; - } while ((int)local_58.y < 9); + } while (GHIDRA_INT(local_58.y) < 9); local_44.x = (g_menuManager->_ViewPosition).x + *(float *)((char *)fVar3 + 0x14) + 95.0; local_44.y = (g_menuManager->_ViewPosition).y + *(float *)((char *)fVar3 + 0x18) + *(float *)((char *)fVar3 + 0x134); - if (((ANM2 *)((int)fVar3 + 0x1610))->_loaded != 0) { - if (((ANM2 *)((int)fVar3 + 0x1610))->_overlayRenderFirst == 0) { + if (((ANM2 *)(GHIDRA_INT(fVar3) + 0x1610))->_loaded != 0) { + if (((ANM2 *)(GHIDRA_INT(fVar3) + 0x1610))->_overlayRenderFirst == 0) { AnimationState::Render - (&((ANM2 *)((int)fVar3 + 0x1610))->_animState,&local_44,&g_vectorZero, + (&((ANM2 *)(GHIDRA_INT(fVar3) + 0x1610))->_animState,&local_44,&g_vectorZero, &g_vectorZero); - animState = &((ANM2 *)((int)fVar3 + 0x1610))->_overlayAnimState; + animState = &((ANM2 *)(GHIDRA_INT(fVar3) + 0x1610))->_overlayAnimState; } else { AnimationState::Render - (&((ANM2 *)((int)fVar3 + 0x1610))->_overlayAnimState,&local_44,&g_vectorZero, + (&((ANM2 *)(GHIDRA_INT(fVar3) + 0x1610))->_overlayAnimState,&local_44,&g_vectorZero, &g_vectorZero); - animState = &((ANM2 *)((int)fVar3 + 0x1610))->_animState; + animState = &((ANM2 *)(GHIDRA_INT(fVar3) + 0x1610))->_animState; } AnimationState::Render(animState,&local_44,&g_vectorZero,&g_vectorZero); } local_44.x = (g_menuManager->_ViewPosition).x + *(float *)((char *)fVar3 + 0x14) + 380.0; local_44.y = (g_menuManager->_ViewPosition).y + *(float *)((char *)fVar3 + 0x18) + *(float *)((char *)fVar3 + 0x134); - if (((ANM2 *)((int)fVar3 + 0x1724))->_loaded != 0) { - if (((ANM2 *)((int)fVar3 + 0x1724))->_overlayRenderFirst == 0) { + if (((ANM2 *)(GHIDRA_INT(fVar3) + 0x1724))->_loaded != 0) { + if (((ANM2 *)(GHIDRA_INT(fVar3) + 0x1724))->_overlayRenderFirst == 0) { AnimationState::Render - (&((ANM2 *)((int)fVar3 + 0x1724))->_animState,&local_44,&g_vectorZero, + (&((ANM2 *)(GHIDRA_INT(fVar3) + 0x1724))->_animState,&local_44,&g_vectorZero, &g_vectorZero); - animState = &((ANM2 *)((int)fVar3 + 0x1724))->_overlayAnimState; + animState = &((ANM2 *)(GHIDRA_INT(fVar3) + 0x1724))->_overlayAnimState; } else { AnimationState::Render - (&((ANM2 *)((int)fVar3 + 0x1724))->_overlayAnimState,&local_44,&g_vectorZero, + (&((ANM2 *)(GHIDRA_INT(fVar3) + 0x1724))->_overlayAnimState,&local_44,&g_vectorZero, &g_vectorZero); - animState = &((ANM2 *)((int)fVar3 + 0x1724))->_animState; + animState = &((ANM2 *)(GHIDRA_INT(fVar3) + 0x1724))->_animState; } AnimationState::Render(animState,&local_44,&g_vectorZero,&g_vectorZero); } @@ -971,7 +971,7 @@ LAB_009ed415: isLess = bVar1 < *idleName; if (bVar1 != *idleName) { LAB_009ed402: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_009ed407; } if (bVar1 == 0) break; @@ -1009,7 +1009,7 @@ LAB_009ed496: isLess = bVar1 < (byte)*cursorAnimName; if (bVar1 != *cursorAnimName) { LAB_009ed480: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_009ed485; } if (bVar1 == 0) break; @@ -1037,7 +1037,7 @@ LAB_009ed485: isLess = bVar1 < (byte)*cursorAnimName; if (bVar1 != *cursorAnimName) { LAB_009ed4f7: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_009ed4fc; } if (bVar1 == 0) break; @@ -1095,16 +1095,16 @@ int Menu_Stats::render_number(uint value, Vector position) do { remainingValue = value / 10; if (((this->_StatsMenuSprite)._animState._animData != (void *)0x0) && - ((7 < *(int *)((int)(this->_StatsMenuSprite)._animState._animation + 0x80) || + ((7 < *(int *)(GHIDRA_INT((this->_StatsMenuSprite)._animState._animation) + 0x80) || (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), - 7 < *(int *)((int)(this->_StatsMenuSprite)._animState._animation + 0x80))))) { + 7 < *(int *)(GHIDRA_INT((this->_StatsMenuSprite)._animState._animation) + 0x80))))) { animData = (this->_StatsMenuSprite)._animState._animData; layerId = *(int *)((char *)animData + 0x54); if ((animData == (void *)0x0) || ((layerId < 0 || (*(int *)((char *)animData + 0x1c) <= layerId)))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)((int)(this->_StatsMenuSprite)._animState._layerFrames + layerId * 4) = 0; + *(undefined4 *)(GHIDRA_INT((this->_StatsMenuSprite)._animState._layerFrames) + layerId * 4) = 0; AnimationState::AdvanceLayerPosition (&(this->_StatsMenuSprite)._animState,layerId,(float)(value % 10)); } @@ -1116,7 +1116,7 @@ int Menu_Stats::render_number(uint value, Vector position) ) && (layerId = *(int *)((char *)animData + 0x54), -1 < layerId)) { AnimationLayer::RenderFrame ((AnimationLayer *)(layerId * 0x10 + *(int *)((char *)animData + 0x18)),&position, - *(int *)((int)(this->_StatsMenuSprite)._animState._layerFrames + layerId * 4), + *(int *)(GHIDRA_INT((this->_StatsMenuSprite)._animState._layerFrames) + layerId * 4), &g_vectorZero,&g_vectorZero,animation); } animData = (this->_StatsMenuSprite)._overlayAnimState._animData; @@ -1136,7 +1136,7 @@ int Menu_Stats::render_number(uint value, Vector position) ) { AnimationLayer::RenderFrame ((AnimationLayer *)(layerId * 0x10 + *(int *)((char *)animData + 0x18)),&position, - *(int *)((int)(this->_StatsMenuSprite)._overlayAnimState._layerFrames + + *(int *)(GHIDRA_INT((this->_StatsMenuSprite)._overlayAnimState._layerFrames) + layerId * 4),&g_vectorZero,&g_vectorZero,animation); } animData = (this->_StatsMenuSprite)._animState._animData; @@ -1210,46 +1210,46 @@ void Menu_Stats::load_achievements_xml() local_14 = 0xffffffff; puStack_18 = &LAB_00b0fdc3; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(auStack_10070 + 0x10060); + local_24 = __security_cookie ^ GHIDRA_UINT((auStack_10070 + 0x10060)); ExceptionList = &local_1c; - tmpString._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = std::_Allocate(0x20); tmpString._size = 0x10; tmpString._capacity = 0x1f; - *(undefined4 *)tmpString._buf._0_4_ = 0x69686361; - *(undefined4 *)(tmpString._buf._0_4_ + 4) = 0x6d657665; - *(undefined4 *)(tmpString._buf._0_4_ + 8) = 0x73746e65; - *(undefined4 *)(tmpString._buf._0_4_ + 0xc) = 0x6c6d782e; - *(byte *)(tmpString._buf._0_4_ + 0x10) = 0; + *(*(undefined4 *)((char *)&((undefined4 *)tmpString._buf) + 0x0)) = 0x69686361; + *(undefined4 *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + 4) = 0x6d657665; + *(undefined4 *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + 8) = 0x73746e65; + *(undefined4 *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + 0xc) = 0x6c6d782e; + *(byte *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + 0x10) = 0; local_14 = 0; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath(&gfxRoot,&tmpString); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; pbVar10 = extraout_EAX; if (0xf < *(uint *)(extraout_EAX + 0x14)) { pbVar10 = *(byte **)extraout_EAX; } file = ((FileSystem *)(&PTR_vftable_00c37a10))->FileSystem::Open(pbVar10,(int *)0x0); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (0xf < gfxRoot._capacity) { uVar7 = gfxRoot._capacity + 1; - psVar6 = (std_string *)gfxRoot._buf._0_4_; + psVar6 = (*(undefined4 *)((char *)&((std_string *)gfxRoot._buf) + 0x0)); if (0xfff < uVar7) { - psVar6 = (std_string *)((std_string *)(gfxRoot._buf._0_4_ + 0xffffffe8))->_capacity; + psVar6 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(gfxRoot._buf) + 0x0)) + 0xffffffe8))->_capacity; uVar7 = gfxRoot._capacity + 0x24; - if (0x1f < (uint)(gfxRoot._buf._0_4_ + (-4 - (int)psVar6))) goto LAB_009ed8ac; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(gfxRoot._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar6))))) goto LAB_009ed8ac; } operator_delete(psVar6,uVar7); } local_14 = -1; gfxRoot._size = 0; gfxRoot._capacity = 0xf; - gfxRoot._buf._0_4_ = gfxRoot._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(gfxRoot._buf) + 0x0)) = (*(undefined4 *)((char *)&(gfxRoot._buf) + 0x0)) & 0xffffff00; if (0xf < tmpString._capacity) { uVar7 = tmpString._capacity + 1; - pppppppbVar3 = (byte *******)tmpString._buf._0_4_; + pppppppbVar3 = (*(undefined4 *)((char *)&((byte *******)tmpString._buf) + 0x0)); if (0xfff < uVar7) { - pppppppbVar3 = *(byte ********)(tmpString._buf._0_4_ + -4); + pppppppbVar3 = *(byte ********)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar7 = tmpString._capacity + 0x24; - if ((byte *)0x1f < (byte *)(tmpString._buf._0_4_ + (-4 - (int)pppppppbVar3))) { + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pppppppbVar3)))) { LAB_009ed8ac: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1269,12 +1269,12 @@ LAB_009ed8ac: pbVar4 = fileText; ((rapidxml::xml_document *)(xmlDoc))->rapidxml::xml_document::parse(fileText); bVar11 = (byte)pbVar4; - node = ((xml_node *)(xmlDoc))->xml_node::first_node((byte *)"achievements",(int)pbVar10,bVar11); + node = ((xml_node *)(xmlDoc))->xml_node::first_node((byte *)"achievements",GHIDRA_INT(pbVar10),bVar11); gfxRoot._size = 0; gfxRoot._capacity = 0xf; - gfxRoot._buf._0_4_ = (std_string *)0x0; - local_14._0_1_ = 3; - gfxRootAttr = ((xml_node *)(node))->xml_node::first_attribute(&DAT_00b6987c,(uint)pbVar10,bVar11); + (*(undefined4 *)((char *)&(gfxRoot._buf) + 0x0)) = (std_string *)0x0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; + gfxRootAttr = ((xml_node *)(node))->xml_node::first_attribute(&DAT_00b6987c,GHIDRA_UINT(pbVar10),bVar11); if (gfxRootAttr != (void *)0x0) { pbVar10 = &g_xmlNullStr; if (*(byte **)((char *)gfxRootAttr + 4) != (byte *)0x0) { @@ -1285,11 +1285,11 @@ LAB_009ed8ac: bVar11 = *pbVar4; pbVar4 = pbVar4 + 1; } while (bVar11 != 0); - uVar7 = (int)pbVar4 - (int)(pbVar10 + 1); + uVar7 = GHIDRA_INT(pbVar4) - GHIDRA_INT((pbVar10 + 1)); ((std::string *)(gfxRoot._buf))->std::string::assign(pbVar10,uVar7); bVar11 = (byte)uVar7; } - for (node = ((xml_node *)(node))->xml_node::first_node((byte *)"achievement",(int)pbVar10,bVar11); + for (node = ((xml_node *)(node))->xml_node::first_node((byte *)"achievement",GHIDRA_INT(pbVar10),bVar11); node != (void *)0x0; node = *(void **)((char *)node + 0x2c)) { achievementId = 0xffffffff; nameSize = 0; @@ -1298,7 +1298,7 @@ LAB_009ed8ac: gfxPathSize = 0; gfxPathCapacity = 0xf; gfxPath = (byte *******)0x0; - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; attribute = *(undefined4 **)((char *)node + 0x20); if (attribute != (undefined4 *)0x0) { do { @@ -1313,7 +1313,7 @@ LAB_009ed8ac: bVar9 = bVar11 < *pbVar5; if (bVar11 != *pbVar5) { LAB_009eda43: - uVar7 = -(uint)bVar9 | 1; + uVar7 = -GHIDRA_UINT(bVar9) | 1; goto LAB_009eda48; } if (bVar11 == 0) break; @@ -1343,7 +1343,7 @@ LAB_009eda48: bVar9 = bVar11 < *pbVar5; if (bVar11 != *pbVar5) { LAB_009edaa0: - uVar7 = -(uint)bVar9 | 1; + uVar7 = -GHIDRA_UINT(bVar9) | 1; goto LAB_009edaa5; } if (bVar11 == 0) break; @@ -1365,7 +1365,7 @@ LAB_009edaa5: bVar11 = *pbVar4; pbVar4 = pbVar4 + 1; } while (bVar11 != 0); - ((std::string *)((char *)name))->std::string::assign(pbVar10,(int)pbVar4 - (int)(pbVar10 + 1)); + ((std::string *)((char *)name))->std::string::assign(pbVar10,GHIDRA_INT(pbVar4) - GHIDRA_INT((pbVar10 + 1))); } else { pbVar5 = &DAT_00b66fec; @@ -1378,7 +1378,7 @@ LAB_009edaa5: bVar9 = bVar11 < *pbVar5; if (bVar11 != *pbVar5) { LAB_009edb10: - uVar7 = -(uint)bVar9 | 1; + uVar7 = -GHIDRA_UINT(bVar9) | 1; goto LAB_009edb15; } if (bVar11 == 0) break; @@ -1400,29 +1400,29 @@ LAB_009edb15: bVar11 = *pbVar4; pbVar4 = pbVar4 + 1; } while (bVar11 != 0); - psVar6 = (std_string *)(pbVar4 + -(int)(pbVar10 + 1)); + psVar6 = (std_string *)(pbVar4 + -GHIDRA_INT((pbVar10 + 1))); if ((std_string *)(0x7fffffff - gfxRoot._size) < psVar6) { /* WARNING: Subroutine does not return */ std::string::_Xlen(); } left = &gfxRoot; if (0xf < gfxRoot._capacity) { - left = (std_string *)gfxRoot._buf._0_4_; + left = (*(undefined4 *)((char *)&((std_string *)gfxRoot._buf) + 0x0)); } - ((std::string *)(tmpString._buf))->std::string::concat((int)this,psVar6,(byte *)left,gfxRoot._size, - pbVar10,(uint)psVar6); + ((std::string *)(tmpString._buf))->std::string::concat(GHIDRA_INT(this),psVar6,(byte *)left,gfxRoot._size, + pbVar10,GHIDRA_UINT(psVar6)); if (0xf < gfxPathCapacity) { uVar7 = gfxPathCapacity + 1; pppppppbVar3 = gfxPath; if (0xfff < uVar7) { pppppppbVar3 = (byte *******)gfxPath[-1]; uVar7 = gfxPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)gfxPath + (-4 - (int)pppppppbVar3))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(gfxPath) + (-4 - GHIDRA_INT(pppppppbVar3)))) goto LAB_009edddd; } operator_delete(pppppppbVar3,uVar7); } - gfxPath = (byte *******)tmpString._buf._0_4_; + gfxPath = (*(undefined4 *)((char *)&((byte *******)tmpString._buf) + 0x0)); acStack_100b4[0] = tmpString._buf[4]; acStack_100b4[1] = tmpString._buf[5]; acStack_100b4[2] = tmpString._buf[6]; @@ -1463,14 +1463,14 @@ LAB_009edb15: } } uVar7 = nameCapacity; - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; if (0xf < gfxPathCapacity) { uVar8 = gfxPathCapacity + 1; pppppppbVar3 = gfxPath; if (0xfff < uVar8) { pppppppbVar3 = (byte *******)gfxPath[-1]; uVar8 = gfxPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)gfxPath + (-4 - (int)pppppppbVar3))) goto LAB_009edddd; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(gfxPath) + (-4 - GHIDRA_INT(pppppppbVar3)))) goto LAB_009edddd; } operator_delete(pppppppbVar3,uVar8); } @@ -1480,7 +1480,7 @@ LAB_009edb15: if (0xfff < uVar8) { pppppppbVar3 = (byte *******)name[0][-1]; uVar8 = uVar7 + 0x24; - if ((byte *)0x1f < (byte *)((int)name[0] + (-4 - (int)pppppppbVar3))) goto LAB_009edddd; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(name[0]) + (-4 - GHIDRA_INT(pppppppbVar3)))) goto LAB_009edddd; } operator_delete(pppppppbVar3,uVar8); } @@ -1517,14 +1517,14 @@ LAB_009edb15: uVar7 = iVar2 + 4; iVar2 = iVar2 + 6; } while (uVar7 < 0x282); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < gfxRoot._capacity) { uVar7 = gfxRoot._capacity + 1; - psVar6 = (std_string *)gfxRoot._buf._0_4_; + psVar6 = (*(undefined4 *)((char *)&((std_string *)gfxRoot._buf) + 0x0)); if (0xfff < uVar7) { - psVar6 = (std_string *)((std_string *)(gfxRoot._buf._0_4_ + -0x18))->_capacity; + psVar6 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(gfxRoot._buf) + 0x0)) + -0x18))->_capacity; uVar7 = gfxRoot._capacity + 0x24; - if ((byte *)0x1f < (byte *)(gfxRoot._buf._0_4_ + (-4 - (int)psVar6))) { + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(gfxRoot._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar6)))) { LAB_009edddd: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1538,14 +1538,14 @@ LAB_009edddd: allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (fileText != (byte *)0x0) { uVar7 = *(uint *)(fileText + -4); qVar1 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar7; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar7; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar1 < uVar7); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar7)); free(fileText + -4); } } @@ -1591,7 +1591,7 @@ void Menu_Stats::update_stats_screen() local_14 = 0xffffffff; puStack_18 = &LAB_00af556d; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(local_50 + 0x40); + local_24 = __security_cookie ^ GHIDRA_UINT((local_50 + 0x40)); ExceptionList = &local_1c; selectAction = 0xe; local_54 = persistentData; @@ -1675,22 +1675,22 @@ void Menu_Stats::update_stats_screen() ((ANM2 *)(&local_54->_achievementsSprite))->ANM2::Play((byte *)"Appear",0); bVar3 = ((PersistentGameData *)(&g_manager->_persistentGameData))->PersistentGameData::Unlocked(local_58); if (bVar3 == 0) { - local_50._20_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(local_50) + 0x14)) = std::_Allocate(0x30); local_2c = 5.74532e-44; local_28 = 6.5861e-44; - builtin_strncpy((char *)local_50._20_4_,"gfx/ui/achievement/Achievement_Locked.png",0x2a); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_50) + 0x14)),"gfx/ui/achievement/Achievement_Locked.png",0x2a); local_14 = 0; Sprite::ReplaceSpritesheet ((Sprite *)&persistentData->_achievementsSprite,3,(std_string *)(local_50 + 0x14)); local_14 = 0xffffffff; bVar3 = extraout_CL_00; - if (0xf < (uint)local_28) { - uVar5 = (int)local_28 + 1; - ptr = (char *)local_50._20_4_; + if (0xf < GHIDRA_UINT(local_28)) { + uVar5 = GHIDRA_INT(local_28) + 1; + ptr = (*(undefined4 *)((char *)&((char *)local_50) + 0x14)); if (0xfff < uVar5) { - ptr = *(char **)(local_50._20_4_ + -4); - uVar5 = (int)local_28 + 0x24; - if ((char *)0x1f < (char *)(local_50._20_4_ + (-4 - (int)ptr))) { + ptr = *(char **)((*(undefined4 *)((char *)&(local_50) + 0x14)) + -4); + uVar5 = GHIDRA_INT(local_28) + 0x24; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_50) + 0x14)) + (-4 - GHIDRA_INT(ptr)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1707,52 +1707,52 @@ void Menu_Stats::update_stats_screen() } ((ANM2 *)(&persistentData->_achievementsSprite))->ANM2::LoadGraphics(bVar3); persistentData->_achievementScrollThruListPosition = 0.0; - local_50._16_4_ = 0.0; - local_50._20_4_ = 0.0; + (*(undefined4 *)((char *)&(local_50) + 0x10)) = 0.0; + (*(undefined4 *)((char *)&(local_50) + 0x14)) = 0.0; fStack_38 = 0.0; fStack_34 = 0.0; local_30 = 0.0; - local_50._0_4_ = 1.0; - local_50._4_4_ = 1.0; - local_50._8_4_ = 1.0; - local_50._12_4_ = 0.0; + (*(undefined4 *)((char *)&(local_50) + 0x0)) = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0x8)) = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0xc)) = 0.0; local_2c = 0.0; local_28 = 0.0; ((Sprite *)((Sprite *)&persistentData->_achievementMiniSprite1))->Sprite::SetColor((ColorMod *)local_50); local_30 = 0.0; - local_50._16_4_ = 0.0; - local_50._20_4_ = 0.0; + (*(undefined4 *)((char *)&(local_50) + 0x10)) = 0.0; + (*(undefined4 *)((char *)&(local_50) + 0x14)) = 0.0; fStack_38 = 0.0; fStack_34 = 0.0; local_2c = 0.0; - local_50._0_4_ = 1.0; - local_50._4_4_ = 1.0; - local_50._8_4_ = 1.0; - local_50._12_4_ = 0.0; + (*(undefined4 *)((char *)&(local_50) + 0x0)) = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0x8)) = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0xc)) = 0.0; local_28 = 0.0; ((Sprite *)((Sprite *)&persistentData->_achievementMiniSprite9))->Sprite::SetColor((ColorMod *)local_50); local_30 = 0.0; - local_50._16_4_ = 0.0; - local_50._20_4_ = 0.0; + (*(undefined4 *)((char *)&(local_50) + 0x10)) = 0.0; + (*(undefined4 *)((char *)&(local_50) + 0x14)) = 0.0; fStack_38 = 0.0; fStack_34 = 0.0; local_2c = 0.0; - local_50._0_4_ = 1.0; - local_50._4_4_ = 1.0; - local_50._8_4_ = 1.0; - local_50._12_4_ = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0x0)) = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0x8)) = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0xc)) = 1.0; local_28 = 0.0; ((Sprite *)((Sprite *)&persistentData->_achievementMiniSprite2))->Sprite::SetColor((ColorMod *)local_50); local_30 = 0.0; - local_50._16_4_ = 0.0; - local_50._20_4_ = 0.0; + (*(undefined4 *)((char *)&(local_50) + 0x10)) = 0.0; + (*(undefined4 *)((char *)&(local_50) + 0x14)) = 0.0; fStack_38 = 0.0; fStack_34 = 0.0; local_2c = 0.0; - local_50._0_4_ = 1.0; - local_50._4_4_ = 1.0; - local_50._8_4_ = 1.0; - local_50._12_4_ = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0x0)) = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0x8)) = 1.0; + (*(undefined4 *)((char *)&(local_50) + 0xc)) = 1.0; local_28 = 0.0; ((Sprite *)((Sprite *)&persistentData->_achievementMiniSprite8))->Sprite::SetColor((ColorMod *)local_50); } @@ -1826,7 +1826,7 @@ void Menu_Stats::update_achievements() puStack_18 = &LAB_00b0fe05; local_1c = ExceptionList; puStack_20 = (undefined1 *)(lockedGfxPath + 0xe); - uVar2 = __security_cookie ^ (uint)(lockedGfxPath + 0xb); + uVar2 = __security_cookie ^ GHIDRA_UINT((lockedGfxPath + 0xb)); stackCookie = uVar2; ExceptionList = &local_1c; if (((g_manager->_framecount & 1) == 0) || (0x3c < this->_holdInputTimer)) { @@ -1837,12 +1837,12 @@ void Menu_Stats::update_achievements() miniAnimState = &(this->_achievementMiniSprite1)._animState; local_6c = (void *)0xb; do { - if (*(char *)((int)&miniAnimState[6]._currentlyTriggeredEvents + 1) != '\0') { + if (*(char *)(GHIDRA_INT(&miniAnimState[6]._currentlyTriggeredEvents) + 1) != '\0') { ((AnimationState *)(miniAnimState))->AnimationState::Update(); ((AnimationState *)(miniAnimState + 1))->AnimationState::Update(); } miniAnimState = (AnimationState *)&miniAnimState[8]._isPlaying; - local_6c = (void *)((int)local_6c + -1); + local_6c = (void *)(GHIDRA_INT(local_6c) + -1); } while (local_6c != (void *)0x0); pvVar8 = (void *)0x3f800000; local_6c = (void *)0x0; @@ -1897,7 +1897,7 @@ void Menu_Stats::update_achievements() bVar7 = bVar1 < *pbVar3; if (bVar1 != *pbVar3) { LAB_009ee632: - uVar2 = -(uint)bVar7 | 1; + uVar2 = -GHIDRA_UINT(bVar7) | 1; goto LAB_009ee637; } if (bVar1 == 0) break; @@ -1922,7 +1922,7 @@ LAB_009ee637: bVar7 = bVar1 < (byte)*animName; if (bVar1 != *animName) { LAB_009ee678: - uVar2 = -(uint)bVar7 | 1; + uVar2 = -GHIDRA_UINT(bVar7) | 1; goto LAB_009ee67d; } if (bVar1 == 0) break; @@ -1959,7 +1959,7 @@ LAB_009ee67d: bVar7 = bVar1 < *pbVar3; if (bVar1 != *pbVar3) { LAB_009ee528: - uVar2 = -(uint)bVar7 | 1; + uVar2 = -GHIDRA_UINT(bVar7) | 1; goto LAB_009ee52d; } if (bVar1 == 0) break; @@ -1984,7 +1984,7 @@ LAB_009ee52d: bVar7 = bVar1 < (byte)*animName; if (bVar1 != *animName) { LAB_009ee570: - uVar2 = -(uint)bVar7 | 1; + uVar2 = -GHIDRA_UINT(bVar7) | 1; goto LAB_009ee575; } if (bVar1 == 0) break; @@ -2036,7 +2036,7 @@ LAB_009ee474: bVar7 = bVar1 < (byte)*animName; if (bVar1 != *animName) { LAB_009ee450: - uVar2 = -(uint)bVar7 | 1; + uVar2 = -GHIDRA_UINT(bVar7) | 1; goto LAB_009ee455; } if (bVar1 == 0) break; @@ -2069,7 +2069,7 @@ LAB_009ee6cd: bVar7 = bVar1 < (byte)*animName; if (bVar1 != *animName) { LAB_009ee716: - uVar2 = -(uint)bVar7 | 1; + uVar2 = -GHIDRA_UINT(bVar7) | 1; goto LAB_009ee71b; } if (bVar1 == 0) break; @@ -2094,7 +2094,7 @@ LAB_009ee71b: bVar7 = bVar1 < (byte)*animName; if (bVar1 != *animName) { LAB_009ee764: - uVar2 = -(uint)bVar7 | 1; + uVar2 = -GHIDRA_UINT(bVar7) | 1; goto LAB_009ee769; } if (bVar1 == 0) break; @@ -2117,7 +2117,7 @@ LAB_009ee769: } uVar2 = this->_achievementIDList[iVar5]; if ((uVar2 == 0xfffffffe) || - ((-1 < (int)uVar2 && + ((-1 < GHIDRA_INT(uVar2) && ((0x281 < uVar2 || (((uVar2 != 0 && ((g_manager->_persistentGameData)._achievements[uVar2] == 0)) && (((g_manager->_state != 2 || (g_game == (Game *)0x0)) || @@ -2171,15 +2171,15 @@ LAB_009ee769: lockedGfxPath[0] = pbVar4; if (3 < (this->_achievementsSprite)._layerCount) { local_6c = (this->_achievementsSprite)._layerState; - pbVar3 = (byte *)((int)local_6c + 0x1e8); + pbVar3 = (byte *)(GHIDRA_INT(local_6c) + 0x1e8); if (0xf < *(uint *)((char *)local_6c + 0x1fc)) { pbVar3 = *(byte **)((char *)local_6c + 0x1e8); } bVar1 = str_eq(pbVar4,0x29,pbVar3,*(uint *)((char *)local_6c + 0x1f8)); if (bVar1 == 0) { pvVar8 = local_6c; - if ((byte **)((int)local_6c + 0x1e8) != lockedGfxPath) { - ((std::string *)((char *)((int)local_6c + 0x1e8)))->std::string::assign(pbVar4,0x29); + if ((byte **)(GHIDRA_INT(local_6c) + 0x1e8) != lockedGfxPath) { + ((std::string *)((char *)(GHIDRA_INT(local_6c) + 0x1e8)))->std::string::assign(pbVar4,0x29); pvVar8 = (this->_achievementsSprite)._layerState; pbVar4 = lockedGfxPath[0]; } @@ -2194,7 +2194,7 @@ LAB_009ee769: if (0xfff < uVar2) { pbVar3 = *(byte **)(pbVar4 + -4); uVar2 = lockedGfxPathCapacity + 0x24; - if ((byte *)0x1f < pbVar4 + (-4 - (int)pbVar3)) goto LAB_009eeec0; + if ((byte *)0x1f < pbVar4 + (-4 - GHIDRA_INT(pbVar3))) goto LAB_009eeec0; } operator_delete(pbVar3,uVar2); uVar2 = extraout_ECX; @@ -2223,7 +2223,7 @@ LAB_009ee769: bVar7 = bVar1 < (byte)*animName; if (bVar1 != *animName) { LAB_009ee975: - uVar2 = -(uint)bVar7 | 1; + uVar2 = -GHIDRA_UINT(bVar7) | 1; goto LAB_009ee97a; } if (bVar1 == 0) break; @@ -2251,7 +2251,7 @@ LAB_009ee97a: pbVar3 = (this->_achievementsSprite)._animState._animData; if (animNameChar != *animName) { LAB_009ee9e6: - uVar2 = -(uint)bVar7 | 1; + uVar2 = -GHIDRA_UINT(bVar7) | 1; goto LAB_009ee9eb; } if (animNameChar == 0) break; @@ -2279,7 +2279,7 @@ LAB_009ee9eb: pbVar3 = (this->_achievementsSprite)._animState._animData; if (animNameChar != *animName) { LAB_009eea46: - uVar2 = -(uint)bVar7 | 1; + uVar2 = -GHIDRA_UINT(bVar7) | 1; goto LAB_009eea4b; } if (animNameChar == 0) break; @@ -2307,7 +2307,7 @@ LAB_009eea4b: bVar7 = bVar1 < (byte)*animName; if (bVar1 != *animName) { LAB_009eeaa0: - uVar2 = -(uint)bVar7 | 1; + uVar2 = -GHIDRA_UINT(bVar7) | 1; goto LAB_009eeaa5; } if (bVar1 == 0) break; @@ -2355,7 +2355,7 @@ LAB_009eeb44: bVar7 = bVar1 < *pbVar6; if (bVar1 != *pbVar6) { LAB_009eeb20: - uVar2 = -(uint)bVar7 | 1; + uVar2 = -GHIDRA_UINT(bVar7) | 1; goto LAB_009eeb25; } if (bVar1 == 0) break; @@ -2463,7 +2463,7 @@ LAB_009eed44: bVar7 = bVar1 < (byte)*animName; if (bVar1 != *animName) { LAB_009eed20: - uVar2 = -(uint)bVar7 | 1; + uVar2 = -GHIDRA_UINT(bVar7) | 1; goto LAB_009eed25; } if (bVar1 == 0) break; @@ -2486,7 +2486,7 @@ LAB_009eed25: } uVar2 = this->_achievementIDList[iVar5]; if ((uVar2 == 0xfffffffe) || - ((-1 < (int)uVar2 && + ((-1 < GHIDRA_INT(uVar2) && ((0x281 < uVar2 || (((uVar2 != 0 && ((g_manager->_persistentGameData)._achievements[uVar2] == 0)) && (((g_manager->_state != 2 || (g_game == (Game *)0x0)) || @@ -2540,15 +2540,15 @@ LAB_009eed25: lockedGfxPath[0] = pbVar4; if (3 < (this->_achievementsSprite)._layerCount) { local_6c = (this->_achievementsSprite)._layerState; - pbVar3 = (byte *)((int)local_6c + 0x1e8); + pbVar3 = (byte *)(GHIDRA_INT(local_6c) + 0x1e8); if (0xf < *(uint *)((char *)local_6c + 0x1fc)) { pbVar3 = *(byte **)((char *)local_6c + 0x1e8); } bVar1 = str_eq(pbVar4,0x29,pbVar3,*(uint *)((char *)local_6c + 0x1f8)); if (bVar1 == 0) { pvVar8 = local_6c; - if ((byte **)((int)local_6c + 0x1e8) != lockedGfxPath) { - ((std::string *)((char *)((int)local_6c + 0x1e8)))->std::string::assign(pbVar4,0x29); + if ((byte **)(GHIDRA_INT(local_6c) + 0x1e8) != lockedGfxPath) { + ((std::string *)((char *)(GHIDRA_INT(local_6c) + 0x1e8)))->std::string::assign(pbVar4,0x29); pvVar8 = (this->_achievementsSprite)._layerState; pbVar4 = lockedGfxPath[0]; } @@ -2563,7 +2563,7 @@ LAB_009eed25: if (0xfff < uVar2) { pbVar3 = *(byte **)(pbVar4 + -4); uVar2 = lockedGfxPathCapacity + 0x24; - if ((byte *)0x1f < pbVar4 + (-4 - (int)pbVar3)) { + if ((byte *)0x1f < pbVar4 + (-4 - GHIDRA_INT(pbVar3))) { LAB_009eeec0: local_14 = (byte *)0xffffffff; /* WARNING: Subroutine does not return */ @@ -2601,7 +2601,7 @@ LAB_009eeedc: bVar7 = bVar1 < (byte)*animName; if (bVar1 != *animName) { LAB_009eef64: - uVar2 = -(uint)bVar7 | 1; + uVar2 = -GHIDRA_UINT(bVar7) | 1; goto LAB_009eef69; } if (bVar1 == 0) break; @@ -2624,7 +2624,7 @@ LAB_009eef69: bVar7 = bVar1 < (byte)*animName; if (bVar1 != *animName) { LAB_009eefa0: - uVar2 = -(uint)bVar7 | 1; + uVar2 = -GHIDRA_UINT(bVar7) | 1; goto LAB_009eefa5; } if (bVar1 == 0) break; @@ -2705,7 +2705,7 @@ LAB_009ef0f9: bVar7 = bVar1 < (byte)*animName; if (bVar1 != *animName) { LAB_009ef146: - uVar2 = -(uint)bVar7 | 1; + uVar2 = -GHIDRA_UINT(bVar7) | 1; goto LAB_009ef14b; } if (bVar1 == 0) break; @@ -2728,7 +2728,7 @@ LAB_009ef14b: bVar7 = bVar1 < (byte)*animName; if (bVar1 != *animName) { LAB_009ef182: - uVar2 = -(uint)bVar7 | 1; + uVar2 = -GHIDRA_UINT(bVar7) | 1; goto LAB_009ef187; } if (bVar1 == 0) break; @@ -2801,7 +2801,7 @@ LAB_009ef2cd: do { pvVar8 = local_6c; iVar5 = this->_maxAchievementID; - rawListIndex = (int)local_6c + this->_selectedAchievmentId + -4; + rawListIndex = GHIDRA_INT(local_6c) + this->_selectedAchievmentId + -4; if (rawListIndex < 0) { rawListIndex = rawListIndex + iVar5; } @@ -2813,7 +2813,7 @@ LAB_009ef2cd: if (uVar2 == 0xfffffffe) { bVar7 = false; } - else if ((int)uVar2 < 0) { + else if (GHIDRA_INT(uVar2) < 0) { LAB_009ef353: bVar7 = true; } @@ -2841,7 +2841,7 @@ LAB_009ef353: bVar7 = bVar1 < *pbVar6; if (bVar1 != *pbVar6) { LAB_009ef3d0: - uVar2 = -(uint)bVar7 | 1; + uVar2 = -GHIDRA_UINT(bVar7) | 1; goto LAB_009ef3d5; } if (bVar1 == 0) break; @@ -2866,10 +2866,10 @@ LAB_009ef3d5: sprintf(unlockedAnimName,(byte *)"Icon%dUnlocked"); pbVar4 = unlockedAnimName; LAB_009ef4ef: - bVar1 = ((ANM2 *)(&this->_achievementMiniSprite1 + (int)pvVar8))->ANM2::SetAnimation(pbVar4,1); + bVar1 = ((ANM2 *)(&this->_achievementMiniSprite1 + GHIDRA_INT(pvVar8)))->ANM2::SetAnimation(pbVar4,1); if (bVar1 != 0) { - ((AnimationState *)(&(&this->_achievementMiniSprite1)[(int)pvVar8]._animState))->AnimationState::Rewind(); - (&this->_achievementMiniSprite1)[(int)pvVar8]._animState._isPlaying = 1; + ((AnimationState *)(&(&this->_achievementMiniSprite1)[GHIDRA_INT(pvVar8)]._animState))->AnimationState::Rewind(); + (&this->_achievementMiniSprite1)[GHIDRA_INT(pvVar8)]._animState._isPlaying = 1; } } else { @@ -2891,7 +2891,7 @@ LAB_009ef4ef: bVar7 = bVar1 < *pbVar6; if (bVar1 != *pbVar6) { LAB_009ef490: - uVar2 = -(uint)bVar7 | 1; + uVar2 = -GHIDRA_UINT(bVar7) | 1; goto LAB_009ef495; } if (bVar1 == 0) break; @@ -2916,8 +2916,8 @@ LAB_009ef4bb: } } LAB_009ef521: - local_6c = (void *)((int)local_6c + 1); - if (8 < (int)local_6c) { + local_6c = (void *)(GHIDRA_INT(local_6c) + 1); + if (8 < GHIDRA_INT(local_6c)) { ExceptionList = local_1c; return; } diff --git a/src/game/menu_title.cpp b/src/game/menu_title.cpp index df0a178..a58d6a3 100644 --- a/src/game/menu_title.cpp +++ b/src/game/menu_title.cpp @@ -28,7 +28,7 @@ void Menu_Title::load_graphics() local_14 = (byte ***)0xffffffff; puStack_18 = &LAB_00b0fe7d; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(sheetPath + 0x11); + local_24 = __security_cookie ^ GHIDRA_UINT((sheetPath + 0x11)); ExceptionList = &local_1c; sheetPath[0] = std::_Allocate(0x20); sheetPathSize = 0x11; @@ -38,9 +38,9 @@ void Menu_Title::load_graphics() sheetPath[0][2] = (byte ***)0x206e6961; sheetPath[0][3] = (byte ***)0x756e656d; *(byte *)(sheetPath[0] + 4) = 0x2f; - *(byte *)((int)sheetPath[0] + 0x11) = 0; + *(byte *)(GHIDRA_INT(sheetPath[0]) + 0x11) = 0; local_14 = (byte ***)0x0; - if (*(char *)((int)&this[1].PositionX + 1) == '\0') { + if (*(char *)(GHIDRA_INT(&this[1].PositionX) + 1) == '\0') { if (*(char *)&this[1].PositionX == '\0') { sheetName = "titlemenu.png"; uVar2 = 0xd; @@ -66,20 +66,20 @@ void Menu_Title::load_graphics() ppppbVar3 = ppppbVar5; do { bVar1 = *(byte *)ppppbVar3; - ppppbVar3 = (byte ****)((int)ppppbVar3 + 1); + ppppbVar3 = (byte ****)(GHIDRA_INT(ppppbVar3) + 1); } while (bVar1 != 0); - ((std::string *)((char *)pathCopy))->std::string::assign((byte *)ppppbVar5,(int)ppppbVar3 - (int)((int)ppppbVar5 + 1)) + ((std::string *)((char *)pathCopy))->std::string::assign((byte *)ppppbVar5,GHIDRA_INT(ppppbVar3) - GHIDRA_INT((GHIDRA_INT(ppppbVar5) + 1))) ; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; ((Sprite *)((Sprite *)titleSprite))->Sprite::ReplaceSpritesheet(0,(std_string *)pathCopy); - local_14 = (byte ***)((uint)local_14._1_3_ << 8); + local_14 = (byte ***)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8); if (0xf < pathCopyCapacity) { uVar2 = pathCopyCapacity + 1; pvVar4 = pathCopy[0]; if (0xfff < uVar2) { - pvVar4 = *(void **)((int)pathCopy[0] + -4); + pvVar4 = *(void **)(GHIDRA_INT(pathCopy[0]) + -4); uVar2 = pathCopyCapacity + 0x24; - if (0x1f < (uint)((int)pathCopy[0] + (-4 - (int)pvVar4))) goto LAB_009ef92e; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pathCopy[0]) + (-4 - GHIDRA_INT(pvVar4))))) goto LAB_009ef92e; } operator_delete(pvVar4,uVar2); } @@ -93,21 +93,21 @@ void Menu_Title::load_graphics() ppppbVar3 = ppppbVar5; do { bVar1 = *(byte *)ppppbVar3; - ppppbVar3 = (byte ****)((int)ppppbVar3 + 1); + ppppbVar3 = (byte ****)(GHIDRA_INT(ppppbVar3) + 1); } while (bVar1 != 0); - ((std::string *)((char *)pathCopy))->std::string::assign((byte *)ppppbVar5,(int)ppppbVar3 - (int)((int)ppppbVar5 + 1)) + ((std::string *)((char *)pathCopy))->std::string::assign((byte *)ppppbVar5,GHIDRA_INT(ppppbVar3) - GHIDRA_INT((GHIDRA_INT(ppppbVar5) + 1))) ; - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; ((Sprite *)((Sprite *)titleSprite))->Sprite::ReplaceSpritesheet(1,(std_string *)pathCopy); - local_14 = (byte ***)((uint)local_14._1_3_ << 8); + local_14 = (byte ***)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8); bVar1 = extraout_CL; if (0xf < pathCopyCapacity) { uVar2 = pathCopyCapacity + 1; pvVar4 = pathCopy[0]; if (0xfff < uVar2) { - pvVar4 = *(void **)((int)pathCopy[0] + -4); + pvVar4 = *(void **)(GHIDRA_INT(pathCopy[0]) + -4); uVar2 = pathCopyCapacity + 0x24; - if (0x1f < (uint)((int)pathCopy[0] + (-4 - (int)pvVar4))) goto LAB_009ef92e; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pathCopy[0]) + (-4 - GHIDRA_INT(pvVar4))))) goto LAB_009ef92e; } operator_delete(pvVar4,uVar2); bVar1 = extraout_CL_00; @@ -119,7 +119,7 @@ void Menu_Title::load_graphics() if (0xfff < uVar2) { ppppbVar5 = (byte ****)sheetPath[0][-1]; uVar2 = sheetPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)sheetPath[0] + (-4 - (int)ppppbVar5))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(sheetPath[0]) + (-4 - GHIDRA_INT(ppppbVar5)))) { LAB_009ef92e: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); diff --git a/src/game/message_popup.cpp b/src/game/message_popup.cpp index d5d17e6..2f0440b 100644 --- a/src/game/message_popup.cpp +++ b/src/game/message_popup.cpp @@ -22,7 +22,7 @@ MessagePopup::MessagePopup(void *font, void *callback, void *userData, Vector *p *(undefined4 *)((char *)this + 0x34) = 1; *(undefined4 *)((char *)this + 0x38) = 0x3f800000; *(undefined4 *)((char *)this + 0x3c) = 0; - ((KColor *)((KColor *)((int)this + 0x40)))->KColor::SetFromARGB(0xffffffff); + ((KColor *)((KColor *)(GHIDRA_INT(this) + 0x40)))->KColor::SetFromARGB(0xffffffff); *(undefined4 *)((char *)this + 0x54) = 0; *(undefined4 *)((char *)this + 0x58) = 0; *(undefined4 *)((char *)this + 0x5c) = 0; @@ -37,7 +37,7 @@ MessagePopup::MessagePopup(void *font, void *callback, void *userData, Vector *p *(undefined4 *)((char *)this + 0x80) = 0; *(undefined4 *)((char *)this + 0x84) = 0xffffffff; *(undefined4 *)((char *)this + 0x88) = 0xffffffff; - ((KColor *)((KColor *)((int)this + 0x8c)))->KColor::SetFromARGB(0xffd3d3d3); + ((KColor *)((KColor *)(GHIDRA_INT(this) + 0x8c)))->KColor::SetFromARGB(0xffd3d3d3); *(byte *)this = *(byte *)this | 7; *(void **)((char *)this + 0x7c) = callback; *(undefined1 *)((char *)this + 0xa0) = 1; diff --git a/src/game/minimap.cpp b/src/game/minimap.cpp index 26db03b..1f6908e 100644 --- a/src/game/minimap.cpp +++ b/src/game/minimap.cpp @@ -19,7 +19,7 @@ Minimap::~Minimap() local_8 = 0xffffffff; puStack_c = &LAB_00b0d410; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; ((KAGE::SmartPointer *)(&(*(undefined1 *)((char *)(this) + 0x614))))->KAGE::SmartPointer::reset((void *)0x0); i = 2; @@ -44,14 +44,14 @@ Minimap::~Minimap() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar1 = *(uint *)((char *)frameBlock + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar1; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar1; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar1); - free((void *)((int)frameBlock + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar1)); + free((void *)(GHIDRA_INT(frameBlock) + -4)); (this->_iconsSprite)._overlayAnimState._layerFrames = (void *)0x0; } frameBlock = (this->_iconsSprite)._overlayAnimState._nullLayerFrames; @@ -60,14 +60,14 @@ Minimap::~Minimap() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar1 = *(uint *)((char *)frameBlock + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar1; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar1; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar1); - free((void *)((int)frameBlock + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar1)); + free((void *)(GHIDRA_INT(frameBlock) + -4)); (this->_iconsSprite)._overlayAnimState._nullLayerFrames = (void *)0x0; } frameBlock = (this->_iconsSprite)._animState._layerFrames; @@ -76,14 +76,14 @@ Minimap::~Minimap() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar1 = *(uint *)((char *)frameBlock + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar1; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar1; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar1); - free((void *)((int)frameBlock + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar1)); + free((void *)(GHIDRA_INT(frameBlock) + -4)); (this->_iconsSprite)._animState._layerFrames = (void *)0x0; } frameBlock = (this->_iconsSprite)._animState._nullLayerFrames; @@ -92,14 +92,14 @@ Minimap::~Minimap() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar1 = *(uint *)((char *)frameBlock + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar1; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar1; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar1); - free((void *)((int)frameBlock + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar1)); + free((void *)(GHIDRA_INT(frameBlock) + -4)); (this->_iconsSprite)._animState._nullLayerFrames = (void *)0x0; } ((std::string *)((this->_iconsSprite)._animDefaultName._buf))->std::string::_Tidy_deallocate(); @@ -112,14 +112,14 @@ Minimap::~Minimap() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar1 = *(uint *)((char *)frameBlock + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar1; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar1; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar1); - free((void *)((int)frameBlock + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar1)); + free((void *)(GHIDRA_INT(frameBlock) + -4)); (this->_hudPickupSprite)._overlayAnimState._layerFrames = (void *)0x0; } frameBlock = (this->_hudPickupSprite)._overlayAnimState._nullLayerFrames; @@ -128,14 +128,14 @@ Minimap::~Minimap() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar1 = *(uint *)((char *)frameBlock + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar1; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar1; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar1); - free((void *)((int)frameBlock + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar1)); + free((void *)(GHIDRA_INT(frameBlock) + -4)); (this->_hudPickupSprite)._overlayAnimState._nullLayerFrames = (void *)0x0; } frameBlock = (this->_hudPickupSprite)._animState._layerFrames; @@ -144,14 +144,14 @@ Minimap::~Minimap() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar1 = *(uint *)((char *)frameBlock + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar1; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar1; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar1); - free((void *)((int)frameBlock + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar1)); + free((void *)(GHIDRA_INT(frameBlock) + -4)); (this->_hudPickupSprite)._animState._layerFrames = (void *)0x0; } frameBlock = (this->_hudPickupSprite)._animState._nullLayerFrames; @@ -160,14 +160,14 @@ Minimap::~Minimap() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar1 = *(uint *)((char *)frameBlock + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar1; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar1; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar1); - free((void *)((int)frameBlock + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar1)); + free((void *)(GHIDRA_INT(frameBlock) + -4)); (this->_hudPickupSprite)._animState._nullLayerFrames = (void *)0x0; } ((std::string *)((this->_hudPickupSprite)._animDefaultName._buf))->std::string::_Tidy_deallocate(); @@ -180,14 +180,14 @@ Minimap::~Minimap() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar1 = *(uint *)((char *)frameBlock + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar1; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar1; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar1); - free((void *)((int)frameBlock + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar1)); + free((void *)(GHIDRA_INT(frameBlock) + -4)); (this->_itemIconsSprite)._overlayAnimState._layerFrames = (void *)0x0; } frameBlock = (this->_itemIconsSprite)._overlayAnimState._nullLayerFrames; @@ -196,14 +196,14 @@ Minimap::~Minimap() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar1 = *(uint *)((char *)frameBlock + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar1; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar1; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar1); - free((void *)((int)frameBlock + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar1)); + free((void *)(GHIDRA_INT(frameBlock) + -4)); (this->_itemIconsSprite)._overlayAnimState._nullLayerFrames = (void *)0x0; } frameBlock = (this->_itemIconsSprite)._animState._layerFrames; @@ -212,14 +212,14 @@ Minimap::~Minimap() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar1 = *(uint *)((char *)frameBlock + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar1; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar1; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar1); - free((void *)((int)frameBlock + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar1)); + free((void *)(GHIDRA_INT(frameBlock) + -4)); (this->_itemIconsSprite)._animState._layerFrames = (void *)0x0; } frameBlock = (this->_itemIconsSprite)._animState._nullLayerFrames; @@ -228,14 +228,14 @@ Minimap::~Minimap() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar1 = *(uint *)((char *)frameBlock + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar1; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar1; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar1); - free((void *)((int)frameBlock + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar1)); + free((void *)(GHIDRA_INT(frameBlock) + -4)); (this->_itemIconsSprite)._animState._nullLayerFrames = (void *)0x0; } ((std::string *)((this->_itemIconsSprite)._animDefaultName._buf))->std::string::_Tidy_deallocate(); @@ -335,8 +335,8 @@ void Minimap::refresh_room_icons() roomGrid = g_game->_currentRoomMap; iconSpriteOwner = *(int *)&(*(undefined1 *)((char *)&(this->_config[0]) + 0x144)); iconSpriteRef = (ANM2 *)(iconSpriteOwner + 0x500); - local_b8._0_4_ = 0; - local_b8._4_4_ = 0; + (*(undefined4 *)((char *)&(local_b8) + 0x0)) = 0; + (*(undefined4 *)((char *)&(local_b8) + 0x4)) = 0; roomList = pRVar7; self = this; std::vector::resize(local_b8); @@ -357,7 +357,7 @@ void Minimap::refresh_room_icons() g_graphicsManager_blendMode[3] = 1; g_graphicsManager_blendMode[4] = 7; uVar6 = g_game->_currentRoomIdx; - if ((int)uVar6 < 0) { + if (GHIDRA_INT(uVar6) < 0) { _glfw_context_reset(); pop_render_target(); } @@ -375,71 +375,71 @@ void Minimap::refresh_room_icons() uVar6 = pRVar7[uVar6].SafeGridIndex; } fVar9 = this->_config[0]._vec1.x; - if ((int)uVar6 < 1) { + if (GHIDRA_INT(uVar6) < 1) { uVar6 = 0; } local_5c = (float)0xa9; - if ((int)uVar6 < 0xa9) { + if (GHIDRA_INT(uVar6) < 0xa9) { local_5c = (float)uVar6; } - local_88 = pRVar7 + *(int *)((char *)roomGrid + (int)local_5c * 4); - if (0xd < (int)fVar9) { + local_88 = pRVar7 + *(int *)((char *)roomGrid + GHIDRA_INT(local_5c) * 4); + if (0xd < GHIDRA_INT(fVar9)) { fVar9 = 1.82169e-44; } this->_config[0]._vec1.x = fVar9; fVar14 = this->_config[0]._vec1.y; - if (0xd < (int)fVar14) { + if (0xd < GHIDRA_INT(fVar14)) { fVar14 = 1.82169e-44; } this->_config[0]._vec1.y = fVar14; - pbVar10 = (byte *)((((int)local_5c / 0xd) * -0xd - (int)fVar9 / 2) + (int)local_5c); - if (0xd - (int)fVar9 < (int)pbVar10) { - pbVar10 = (byte *)(0xd - (int)fVar9); + pbVar10 = (byte *)(((GHIDRA_INT(local_5c) / 0xd) * -0xd - GHIDRA_INT(fVar9) / 2) + GHIDRA_INT(local_5c)); + if (0xd - GHIDRA_INT(fVar9) < GHIDRA_INT(pbVar10)) { + pbVar10 = (byte *)(0xd - GHIDRA_INT(fVar9)); } startCol = (byte *)0x0; - if (0 < (int)pbVar10) { + if (0 < GHIDRA_INT(pbVar10)) { startCol = pbVar10; } fVar9 = *(float *)&(*(undefined1 *)((char *)&(self->_config[0]) + 0x118)); cellStepX = fVar9 + (float)self->_config[0]._mapSprite._shadowLayerIndex; - fVar16 = (float)((int)local_5c / 0xd - (int)fVar14 / 2); + fVar16 = (float)(GHIDRA_INT(local_5c) / 0xd - GHIDRA_INT(fVar14) / 2); fVar9 = fVar9 + (float)self->_config[0]._mapSprite._bitflags; - if ((int)(0xdU - (int)fVar14) < (int)fVar16) { - fVar16 = (float)(0xdU - (int)fVar14); + if (GHIDRA_INT((0xdU - GHIDRA_INT(fVar14))) < GHIDRA_INT(fVar16)) { + fVar16 = (float)(0xdU - GHIDRA_INT(fVar14)); } fVar14 = self->_config[0]._mapSprite._championColor._offset[2]; cellWidth = 0.0; - if (0 < (int)fVar16) { + if (0 < GHIDRA_INT(fVar16)) { cellWidth = fVar16; } iVar13 = *(int *)((char *)fVar14 + 0x10); iVar17 = *(int *)((char *)fVar14 + 0x14); self->_config[0]._borderScale = (float)((double)iVar13 + __uint_to_double_fixup[-(iVar13 >> 0x1f)]); - self->_config[0]._i1 = (int)(float)((double)iVar17 + __uint_to_double_fixup[-(iVar17 >> 0x1f)]); - self->_config[0]._i2 = (int)g_vectorZero.x; - self->_config[0]._minimapIconNum = (int)g_vectorZero.y; + self->_config[0]._i1 = GHIDRA_INT((float)((double)iVar17 + __uint_to_double_fixup[-(iVar17 >> 0x1f)])); + self->_config[0]._i2 = GHIDRA_INT(g_vectorZero.x); + self->_config[0]._minimapIconNum = GHIDRA_INT(g_vectorZero.y); fVar14 = self->_config[0]._vec1.y; local_34 = (RNG *)0x0; pMVar15 = self; startRow = cellWidth; local_7c = cellWidth; cellStepY = fVar9; - if ((int)cellWidth < (int)fVar14 + (int)cellWidth) { + if (GHIDRA_INT(cellWidth) < GHIDRA_INT(fVar14) + GHIDRA_INT(cellWidth)) { do { local_4c = (byte *)0x0; local_58.y = (float)startCol; pRVar18 = local_34; - if ((int)startCol < (int)(startCol + (int)pMVar15->_config[0]._vec1.x)) { - local_8c = (int)local_7c * 0xd; + if (GHIDRA_INT(startCol) < GHIDRA_INT((startCol + GHIDRA_INT(pMVar15->_config[0]._vec1.x)))) { + local_8c = GHIDRA_INT(local_7c) * 0xd; pbVar10 = startCol; fVar9 = cellStepX; local_74.y = (float)local_34; do { pMVar4 = self; - pbVar11 = (byte *)((int)local_58.y + local_8c); - if ((-1 < (int)pbVar11) && (pbVar11 < (byte *)0xa9)) { - iVar13 = *(int *)((char *)roomGrid + (int)pbVar11 * 4); + pbVar11 = (byte *)(GHIDRA_INT(local_58.y) + local_8c); + if ((-1 < GHIDRA_INT(pbVar11)) && (pbVar11 < (byte *)0xa9)) { + iVar13 = *(int *)((char *)roomGrid + GHIDRA_INT(pbVar11) * 4); if (-1 < iVar13) { pvVar12 = roomList[iVar13].Data; pMVar15 = pMVar4; @@ -449,76 +449,76 @@ void Minimap::refresh_room_icons() iVar17 = *(int *)((char *)pvVar12 + 0x48); if (iVar17 == 4) { local_5c = (float)roomList[iVar13].AllowedDoors; - if (((uint)local_5c & 7) != 0) { + if ((GHIDRA_UINT(local_5c) & 7) != 0) { pbVar10 = pbVar11 + 0xd; - if (((int)pbVar10 < 0) || ((byte *)0xa8 < pbVar10)) { + if ((GHIDRA_INT(pbVar10) < 0) || ((byte *)0xa8 < pbVar10)) { isOutlineVisible = false; } else { - isOutlineVisible = *(int *)((char *)roomGrid + (int)pbVar10 * 4) == iVar13; + isOutlineVisible = *(int *)((char *)roomGrid + GHIDRA_INT(pbVar10) * 4) == iVar13; } } - if (((uint)local_5c & 0x58) != 0) { - if (((int)(pbVar11 + -0xd) < 0) || ((byte *)0xa8 < pbVar11 + -0xd)) + if ((GHIDRA_UINT(local_5c) & 0x58) != 0) { + if ((GHIDRA_INT((pbVar11 + -0xd)) < 0) || ((byte *)0xa8 < pbVar11 + -0xd)) goto LAB_0098ba08; isOutlineVisible = - *(int *)((char *)roomGrid + (int)(pbVar11 + -0xd) * 4) == iVar13; + *(int *)((char *)roomGrid + GHIDRA_INT((pbVar11 + -0xd)) * 4) == iVar13; } } else if (iVar17 == 6) { uVar6 = roomList[iVar13].AllowedDoors; if ((uVar6 & 0xb) == 0) { if (((uVar6 & 0x24) != 0) || ((uVar6 >> 7 & 1) != 0)) { - if (((int)pbVar11 < 1) || ((byte *)0xa8 < pbVar11 + -1)) + if ((GHIDRA_INT(pbVar11) < 1) || ((byte *)0xa8 < pbVar11 + -1)) goto LAB_0098ba08; isOutlineVisible = - *(int *)((char *)roomGrid + (int)pbVar11 * 4 + -4) == iVar13; + *(int *)((char *)roomGrid + GHIDRA_INT(pbVar11) * 4 + -4) == iVar13; } } else { - if (((int)(pbVar11 + 1) < 0) || ((byte *)0xa8 < pbVar11 + 1)) + if ((GHIDRA_INT((pbVar11 + 1)) < 0) || ((byte *)0xa8 < pbVar11 + 1)) goto LAB_0098ba08; - isOutlineVisible = *(int *)((char *)roomGrid + (int)pbVar11 * 4 + 4) == iVar13; + isOutlineVisible = *(int *)((char *)roomGrid + GHIDRA_INT(pbVar11) * 4 + 4) == iVar13; } } else if (iVar17 == 8) { local_5c = (float)roomList[iVar13].AllowedDoors; - if (((uint)local_5c & 3) == 0) { - if (((uint)local_5c & 0x24) == 0) { - if (((uint)local_5c & 0x18) == 0) { - if ((((uint)local_5c >> 7 & 1) != 0) || (((uint)local_5c >> 6 & 1) != 0) + if ((GHIDRA_UINT(local_5c) & 3) == 0) { + if ((GHIDRA_UINT(local_5c) & 0x24) == 0) { + if ((GHIDRA_UINT(local_5c) & 0x18) == 0) { + if (((GHIDRA_UINT(local_5c) >> 7 & 1) != 0) || ((GHIDRA_UINT(local_5c) >> 6 & 1) != 0) ) { - if (((int)pbVar11 < 1) || + if ((GHIDRA_INT(pbVar11) < 1) || (((((byte *)0xa8 < pbVar11 + -1 || - (*(int *)((char *)roomGrid + (int)pbVar11 * 4 + -4) != iVar13)) || - ((int)(pbVar11 + -0xd) < 0)) || + (*(int *)((char *)roomGrid + GHIDRA_INT(pbVar11) * 4 + -4) != iVar13)) || + (GHIDRA_INT((pbVar11 + -0xd)) < 0)) || (((byte *)0xa8 < pbVar11 + -0xd || - (*(int *)((char *)roomGrid + (int)(pbVar11 + -0xd) * 4) != iVar13))) + (*(int *)((char *)roomGrid + GHIDRA_INT((pbVar11 + -0xd)) * 4) != iVar13))) ))) goto LAB_0098ba08; isOutlineVisible = true; } } else { - if ((((int)(pbVar11 + 1) < 0) || ((byte *)0xa8 < pbVar11 + 1)) || - ((*(int *)((char *)roomGrid + (int)pbVar11 * 4 + 4) != iVar13 || - ((((int)(pbVar11 + -0xd) < 0 || ((byte *)0xa8 < pbVar11 + -0xd)) || - (*(int *)((char *)roomGrid + (int)(pbVar11 + -0xd) * 4) != iVar13))))) + if (((GHIDRA_INT((pbVar11 + 1)) < 0) || ((byte *)0xa8 < pbVar11 + 1)) || + ((*(int *)((char *)roomGrid + GHIDRA_INT(pbVar11) * 4 + 4) != iVar13 || + (((GHIDRA_INT((pbVar11 + -0xd)) < 0 || ((byte *)0xa8 < pbVar11 + -0xd)) || + (*(int *)((char *)roomGrid + GHIDRA_INT((pbVar11 + -0xd)) * 4) != iVar13))))) ) goto LAB_0098ba08; isOutlineVisible = true; } goto LAB_0098ba0a; } - if ((0 < (int)pbVar11) && (pbVar11 + -1 < (byte *)0xa9)) { - iVar17 = *(int *)((char *)roomGrid + (int)pbVar11 * 4 + -4); + if ((0 < GHIDRA_INT(pbVar11)) && (pbVar11 + -1 < (byte *)0xa9)) { + iVar17 = *(int *)((char *)roomGrid + GHIDRA_INT(pbVar11) * 4 + -4); goto LAB_0098b9f4; } } - else if ((-1 < (int)(pbVar11 + 1)) && (pbVar11 + 1 < (byte *)0xa9)) { - iVar17 = *(int *)((char *)roomGrid + (int)pbVar11 * 4 + 4); + else if ((-1 < GHIDRA_INT((pbVar11 + 1))) && (pbVar11 + 1 < (byte *)0xa9)) { + iVar17 = *(int *)((char *)roomGrid + GHIDRA_INT(pbVar11) * 4 + 4); LAB_0098b9f4: - if ((((iVar17 == iVar13) && (pbVar11 = pbVar11 + 0xd, -1 < (int)pbVar11)) && + if ((((iVar17 == iVar13) && (pbVar11 = pbVar11 + 0xd, -1 < GHIDRA_INT(pbVar11))) && (pbVar11 < (byte *)0xa9)) && - (*(int *)((char *)roomGrid + (int)pbVar11 * 4) == iVar13)) + (*(int *)((char *)roomGrid + GHIDRA_INT(pbVar11) * 4) == iVar13)) goto LAB_0098ba0a; } LAB_0098ba08: @@ -540,20 +540,20 @@ LAB_0098ba0a: fVar16 = *(float *)&(*(undefined1 *)((char *)&(self->_config[0]) + 0x114)) + *(float *)&(*(undefined1 *)((char *)&(self->_config[0]) + 0x118)); fVar9 = (float)self->_config[0]._mapSprite._shadowLayerIndex; - self->_config[0]._i1 = (int)pRVar3; + self->_config[0]._i1 = GHIDRA_INT(pRVar3); fVar14 = (float)self->_config[0]._i2; fVar16 = fVar16 + fVar16; fVar9 = (float)local_4c + fVar9 + fVar16; if (fVar9 <= fVar14) { fVar9 = fVar14; } - self->_config[0]._i2 = (int)fVar9; + self->_config[0]._i2 = GHIDRA_INT(fVar9); fVar9 = (float)self->_config[0]._minimapIconNum; fVar16 = (float)pRVar18 + (float)self->_config[0]._mapSprite._bitflags + fVar16; if (fVar16 <= fVar9) { fVar16 = fVar9; } - self->_config[0]._minimapIconNum = (int)fVar16; + self->_config[0]._minimapIconNum = GHIDRA_INT(fVar16); local_74.x = (float)local_4c; bVar5 = ((ANM2 *)((ANM2 *)self))->ANM2::SetAnimation((byte *)"RoomOutline",1); if (((bVar5 != 0) && @@ -565,7 +565,7 @@ LAB_0098ba0a: *(undefined1 *)&pMVar4->_config[0]._mapSprite._animDefaultName._capacity = 0; } if ((!isOutlineVisible) || - (*(char *)((int)pMVar4->_config[0]._mapSprite._championColor._colorize + 0xd) + (*(char *)(GHIDRA_INT(pMVar4->_config[0]._mapSprite._championColor._colorize) + 0xd) == '\0')) { pRVar18 = local_34; fVar9 = cellStepX; @@ -601,50 +601,50 @@ LAB_0098ba0a: pbVar10 = startCol; } local_4c = (byte *)((float)local_4c + fVar9); - local_58.y = (float)((int)local_58.y + 1); - } while ((int)local_58.y < (int)(pbVar10 + (int)pMVar15->_config[0]._vec1.x)); + local_58.y = (float)(GHIDRA_INT(local_58.y) + 1); + } while (GHIDRA_INT(local_58.y) < GHIDRA_INT((pbVar10 + GHIDRA_INT(pMVar15->_config[0]._vec1.x)))); cellWidth = startRow; fVar9 = cellStepY; } fVar14 = pMVar15->_config[0]._vec1.y; local_34 = (RNG *)((float)pRVar18 + fVar9); - local_7c = (float)((int)local_7c + 1); - } while ((int)local_7c < (int)fVar14 + (int)cellWidth); + local_7c = (float)(GHIDRA_INT(local_7c) + 1); + } while (GHIDRA_INT(local_7c) < GHIDRA_INT(fVar14) + GHIDRA_INT(cellWidth)); } local_4c = (byte *)0x0; local_74.x = 0.0; cellX = 0.0; local_2c = (byte *)0x0; - if (0 < (int)cellWidth) { + if (0 < GHIDRA_INT(cellWidth)) { local_2c = (byte *)(0.0 - fVar9); } - if (0 < (int)startCol) { + if (0 < GHIDRA_INT(startCol)) { cellX = 0.0 - cellStepX; } - if ((int)cellWidth < 1) { + if (GHIDRA_INT(cellWidth) < 1) { local_64 = cellWidth; } else { - local_64 = (float)((int)cellWidth - 1); + local_64 = (float)(GHIDRA_INT(cellWidth) - 1); } local_74.y = (float)local_34; - if ((int)local_64 < (int)fVar14 + (int)cellWidth) { - local_5c = (float)((int)local_64 * 0xd); + if (GHIDRA_INT(local_64) < GHIDRA_INT(fVar14) + GHIDRA_INT(cellWidth)) { + local_5c = (float)(GHIDRA_INT(local_64) * 0xd); pMVar15 = self; do { local_4c = startCol; - if (0 < (int)startCol) { + if (0 < GHIDRA_INT(startCol)) { local_4c = startCol + -1; } pbVar10 = local_2c; fVar14 = cellStepX; - if ((int)local_4c < (int)(startCol + (int)pMVar15->_config[0]._vec1.x)) { - local_6c = local_4c + (int)local_5c; - local_68 = (int *)((int)roomGrid + (int)local_6c * 4); + if (GHIDRA_INT(local_4c) < GHIDRA_INT((startCol + GHIDRA_INT(pMVar15->_config[0]._vec1.x)))) { + local_6c = local_4c + GHIDRA_INT(local_5c); + local_68 = (int *)(GHIDRA_INT(roomGrid) + GHIDRA_INT(local_6c) * 4); pbVar11 = startCol; do { pRVar7 = roomList; - if ((-1 < (int)local_6c) && (local_6c < (byte *)0xa9)) { + if ((-1 < GHIDRA_INT(local_6c)) && (local_6c < (byte *)0xa9)) { iVar13 = *local_68; if (-1 < iVar13) { if ((byte *)roomList[iVar13].GridIndex == local_6c) { @@ -724,7 +724,7 @@ LAB_0098bf06: local_34 = (RNG *)g_vectorOne.y; } LAB_0098bf22: - uVar6 = (uint)pRVar7[iVar13].Flags >> 10; + uVar6 = GHIDRA_UINT(pRVar7[iVar13].Flags) >> 10; if ((uVar6 & 1) != 0) { self->_config[0]._mapSprite._numEvents = 0x3f800000; self->_config[0]._mapSprite._offset.x = 0.29411766; @@ -741,7 +741,7 @@ LAB_0098bf22: *(int *)(pMVar4->_config[0]._mapSprite._animDefaultName._buf + 4) != 0)) { *(undefined1 *)&pMVar4->_config[0]._mapSprite._animDefaultName._capacity = 0; } - if (*(char *)((int)pMVar4->_config[0]._mapSprite._championColor._colorize + 0xd) + if (*(char *)(GHIDRA_INT(pMVar4->_config[0]._mapSprite._championColor._colorize) + 0xd) != '\0') { lastState = (AnimationState *) &pMVar4->_config[0]._mapSprite._animState._layerFrames; @@ -773,7 +773,7 @@ LAB_0098bf22: ((roomList[iVar13].DisplayFlags & 1) == 0)) { if ((((roomList[iVar13].Data == (void *)0x0) || (((roomList[iVar13].DisplayFlags & 1) == 0 || - (iVar13 = *(int *)((int)roomList[iVar13].Data + 8), iVar13 == 7)))) || + (iVar13 = *(int *)(GHIDRA_INT(roomList[iVar13].Data) + 8), iVar13 == 7)))) || (iVar13 == 8)) || (iVar13 == 0x1d)) goto LAB_0098c150; uVar20 = 0x100b7d3e0; } @@ -790,7 +790,7 @@ LAB_0098bf22: *(int *)(pMVar4->_config[0]._mapSprite._animDefaultName._buf + 4) != 0)) { *(undefined1 *)&pMVar4->_config[0]._mapSprite._animDefaultName._capacity = 0; } - if (*(char *)((int)pMVar4->_config[0]._mapSprite._championColor._colorize + 0xd) + if (*(char *)(GHIDRA_INT(pMVar4->_config[0]._mapSprite._championColor._colorize) + 0xd) != '\0') { ppvVar1 = &pMVar4->_config[0]._mapSprite._animState._layerFrames; if (*(char *)&pMVar4->_config[0]._mapSprite._overlayAnimState._layerFrames == @@ -822,7 +822,7 @@ LAB_0098c150: } } else if ((byte *)roomList[iVar13].GridIndex + 1 == local_6c) { - if (*(int *)((int)roomList[iVar13].Data + 0x48) == 9) goto LAB_0098bdb8; + if (*(int *)(GHIDRA_INT(roomList[iVar13].Data) + 0x48) == 9) goto LAB_0098bdb8; } pbVar11 = startCol; } @@ -831,51 +831,51 @@ LAB_0098c150: local_4c = local_4c + 1; local_6c = local_6c + 1; local_68 = local_68 + 1; - } while ((int)local_4c < (int)(pbVar11 + (int)pMVar15->_config[0]._vec1.x)); + } while (GHIDRA_INT(local_4c) < GHIDRA_INT((pbVar11 + GHIDRA_INT(pMVar15->_config[0]._vec1.x)))); fVar9 = cellStepY; } cellX = 0.0; - if (0 < (int)startCol) { + if (0 < GHIDRA_INT(startCol)) { cellX = 0.0 - fVar14; } local_2c = (byte *)((float)pbVar10 + fVar9); fVar14 = pMVar15->_config[0]._vec1.y; - local_64 = (float)((int)local_64 + 1); - local_5c = (float)((int)local_5c + 0xd); - } while ((int)local_64 < (int)startRow + (int)fVar14); + local_64 = (float)(GHIDRA_INT(local_64) + 1); + local_5c = (float)(GHIDRA_INT(local_5c) + 0xd); + } while (GHIDRA_INT(local_64) < GHIDRA_INT(startRow) + GHIDRA_INT(fVar14)); pMVar15 = self; cellWidth = startRow; } cellX = 0.0; local_6c = (byte *)0x0; - if (0 < (int)cellWidth) { + if (0 < GHIDRA_INT(cellWidth)) { local_6c = (byte *)(0.0 - fVar9); } - if (0 < (int)startCol) { + if (0 < GHIDRA_INT(startCol)) { cellX = 0.0 - cellStepX; } - if ((int)cellWidth < 1) { + if (GHIDRA_INT(cellWidth) < 1) { local_5c = cellWidth; } else { - local_5c = (float)((int)cellWidth - 1); + local_5c = (float)(GHIDRA_INT(cellWidth) - 1); } - if ((int)local_5c < (int)fVar14 + (int)cellWidth) { + if (GHIDRA_INT(local_5c) < GHIDRA_INT(fVar14) + GHIDRA_INT(cellWidth)) { do { - if ((int)startCol < 1) { + if (GHIDRA_INT(startCol) < 1) { local_48 = startCol; } else { local_48 = startCol + -1; } fVar14 = cellStepX; - if ((int)local_48 < (int)(startCol + (int)pMVar15->_config[0]._vec1.x)) { - local_4c = (byte *)((int)local_5c * 0xd); + if (GHIDRA_INT(local_48) < GHIDRA_INT((startCol + GHIDRA_INT(pMVar15->_config[0]._vec1.x)))) { + local_4c = (byte *)(GHIDRA_INT(local_5c) * 0xd); do { - pbVar10 = local_4c + (int)local_48; - if (-1 < (int)pbVar10) { + pbVar10 = local_4c + GHIDRA_INT(local_48); + if (-1 < GHIDRA_INT(pbVar10)) { if (pbVar10 < (byte *)0xa9) { - iVar13 = *(int *)((char *)roomGrid + (int)pbVar10 * 4); + iVar13 = *(int *)((char *)roomGrid + GHIDRA_INT(pbVar10) * 4); if (-1 < iVar13) { roomIconName = (char *)0x0; local_2c = (byte *)0x0; @@ -931,7 +931,7 @@ switchD_0098c2e6_caseD_3: } else { roomIconName = "IconTreasureRoomRed"; - if (((uint)local_34[4]._shift1 >> 0xb & 1) == 0) { + if ((GHIDRA_UINT(local_34[4]._shift1) >> 0xb & 1) == 0) { roomIconName = "IconTreasureRoom"; } } @@ -1000,7 +1000,7 @@ LAB_0098c47d: uVar6 = 0; heartIconFrame = 0; chestIconFrame = 0; - fVar9 = (float)(uint)((byte *)roomIconName != (byte *)0x0); + fVar9 = (float)GHIDRA_UINT(((byte *)roomIconName != (byte *)0x0)); keyIconFrame = 0; local_74.y = 0.0; local_58.y = 0.0; @@ -1010,10 +1010,10 @@ LAB_0098c47d: local_8c = 0; iconSlot = fVar9; if (local_34[3]._shift3 != 0) { - pRVar7 = ((Level *)((Level *)g_game))->Level::GetRoomByIdx((int)(local_48 + (int)local_4c),-1) + pRVar7 = ((Level *)((Level *)g_game))->Level::GetRoomByIdx(GHIDRA_INT((local_48 + GHIDRA_INT(local_4c))),-1) ; savedEntry = (pRVar7->SavedEntities)._begin; - pRVar7 = ((Level *)((Level *)g_game))->Level::GetRoomByIdx((int)(local_48 + (int)local_4c),-1) + pRVar7 = ((Level *)((Level *)g_game))->Level::GetRoomByIdx(GHIDRA_INT((local_48 + GHIDRA_INT(local_4c))),-1) ; if (savedEntry != (pRVar7->SavedEntities)._end) { do { @@ -1028,7 +1028,7 @@ LAB_0098c47d: if (iVar13 == 10) { if ((uVar6 & 1) == 0) { uVar6 = uVar6 | 1; - fVar9 = (float)((int)fVar9 + 1); + fVar9 = (float)(GHIDRA_INT(fVar9) + 1); } switch(savedEntry[2]) { case 2: @@ -1100,7 +1100,7 @@ LAB_0098c47d: else if (iVar13 == 0x14) { if ((uVar6 & 2) == 0) { uVar6 = uVar6 | 2; - fVar9 = (float)((int)fVar9 + 1); + fVar9 = (float)(GHIDRA_INT(fVar9) + 1); } switch(savedEntry[2]) { case 2: @@ -1137,16 +1137,16 @@ LAB_0098c47d: else if (iVar13 == 0x28) { if ((uVar6 & 0x10) == 0) { uVar6 = uVar6 | 0x10; - fVar9 = (float)((int)fVar9 + 1); + fVar9 = (float)(GHIDRA_INT(fVar9) + 1); } - if ((uint)local_74.y < (RNG *)(uint)(savedEntry[2] == 4)) { - local_74.y = (float)(uint)(savedEntry[2] == 4); + if (GHIDRA_UINT(local_74.y) < (RNG *)GHIDRA_UINT((savedEntry[2] == 4))) { + local_74.y = (float)GHIDRA_UINT((savedEntry[2] == 4)); } } else if (iVar13 == 0x1e) { if ((uVar6 & 8) == 0) { uVar6 = uVar6 | 8; - fVar9 = (float)((int)fVar9 + 1); + fVar9 = (float)(GHIDRA_INT(fVar9) + 1); } if (savedEntry[2] == 2) { uVar8 = 1; @@ -1169,7 +1169,7 @@ LAB_0098c47d: iVar13 = savedEntry[2]; if (((iVar13 < 0) || (pvVar12 = (g_manager->_itemConfig)._cards._begin, - (int)(g_manager->_itemConfig)._cards._end - (int)pvVar12 >> 2 <= + GHIDRA_INT((g_manager->_itemConfig)._cards._end) - GHIDRA_INT(pvVar12) >> 2 <= iVar13)) || ((iVar13 = *(int *)((char *)pvVar12 + iVar13 * 4), iVar13 == 0 || (*(int *)(iVar13 + 0x58) != 2)))) { @@ -1195,7 +1195,7 @@ LAB_0098c8c3: } if ((uVar6 & 0x200) == 0) { uVar6 = uVar6 | 0x200; - fVar9 = (float)((int)fVar9 + 1); + fVar9 = (float)(GHIDRA_INT(fVar9) + 1); } if (extraout_ECX < 0x46) { if (extraout_ECX == 0x45) { @@ -1239,24 +1239,24 @@ switchD_0098c8f3_caseD_36: if ((uVar6 & 0x400) != 0) goto LAB_0098c8c3; uVar6 = uVar6 | 0x400; LAB_0098ca30: - fVar9 = (float)((int)fVar9 + 1); + fVar9 = (float)(GHIDRA_INT(fVar9) + 1); } else if (iVar13 == 0x5a) { if ((uVar6 & 0x100) == 0) { uVar6 = uVar6 | 0x100; - fVar9 = (float)((int)fVar9 + 1); + fVar9 = (float)(GHIDRA_INT(fVar9) + 1); } if (local_8c < (savedEntry[2] == 4)) { - local_8c = (uint)(savedEntry[2] == 4); + local_8c = GHIDRA_UINT((savedEntry[2] == 4)); } } else { if (iVar13 != 0x46) goto LAB_0098c8c3; if (-1 < (char)uVar6) { uVar6 = uVar6 | 0x80; - fVar9 = (float)((int)fVar9 + 1); + fVar9 = (float)(GHIDRA_INT(fVar9) + 1); } - uVar8 = (uint)((savedEntry[2] & 0x7ffU) == 0xe); + uVar8 = GHIDRA_UINT(((savedEntry[2] & 0x7ffU) == 0xe)); if (pillIconFrame < uVar8) { pillIconFrame = uVar8; } @@ -1326,9 +1326,9 @@ LAB_0098ca30: LAB_0098c9d2: if ((uVar6 & 0x2000) == 0) { uVar6 = uVar6 | 0x2000; - fVar9 = (float)((int)fVar9 + 1); + fVar9 = (float)(GHIDRA_INT(fVar9) + 1); } - if ((uint)local_7c < (uint)fVar14) { + if (GHIDRA_UINT(local_7c) < GHIDRA_UINT(fVar14)) { local_7c = fVar14; } goto switchD_0098c8f3_caseD_34; @@ -1337,30 +1337,30 @@ LAB_0098c9d2: } if ((uVar6 & 0x800) == 0) { uVar6 = uVar6 | 0x800; - fVar9 = (float)((int)fVar9 + 1); + fVar9 = (float)(GHIDRA_INT(fVar9) + 1); } - if ((uint)local_58.y < pbVar10) { + if (GHIDRA_UINT(local_58.y) < pbVar10) { local_58.y = (float)pbVar10; } switchD_0098c8f3_caseD_34: savedEntry = savedEntry + 0x1e; - pRVar7 = ((Level *)((Level *)g_game))->Level::GetRoomByIdx((int)(local_48 + (int)local_4c) + pRVar7 = ((Level *)((Level *)g_game))->Level::GetRoomByIdx(GHIDRA_INT((local_48 + GHIDRA_INT(local_4c))) ,-1); } while (savedEntry != (pRVar7->SavedEntities)._end); } savedEntry = ((std_vector *)&local_34[6]._shift2)->_begin; - for (iVar13 = (int)local_34[6]._shift3 - (int)savedEntry >> 5; iVar13 != 0; + for (iVar13 = GHIDRA_INT(local_34[6]._shift3) - GHIDRA_INT(savedEntry) >> 5; iVar13 != 0; iVar13 = iVar13 + -1) { if ((*savedEntry == 0x12) && ((uVar6 & 0x4000) == 0)) { uVar6 = uVar6 | 0x4000; - fVar9 = (float)((int)fVar9 + 1); + fVar9 = (float)(GHIDRA_INT(fVar9) + 1); } savedEntry = savedEntry + 8; } } - if (((byte *)local_34->_seed == local_48 + (int)local_4c) || - (((byte *)local_34->_seed + 1 == local_48 + (int)local_4c && - (*(int *)((int)local_34[1]._seed + 0x48) == 9)))) { + if (((byte *)local_34->_seed == local_48 + GHIDRA_INT(local_4c)) || + (((byte *)local_34->_seed + 1 == local_48 + GHIDRA_INT(local_4c) && + (*(int *)(GHIDRA_INT(local_34[1]._seed) + 0x48) == 9)))) { fVar14 = *(float *)&(*(undefined1 *)((char *)&(self->_config[0]) + 0x114)) + *(float *)&(*(undefined1 *)((char *)&(self->_config[0]) + 0x118)); local_64 = cellX; @@ -1368,7 +1368,7 @@ switchD_0098c8f3_caseD_34: fVar14 = fVar14 * g_vectorOne.y; local_68 = (int *)local_6c; if ((g_game->_stage == 0xc) && (*(int *)(local_34[1]._seed + 8) == 5)) { - iVar13 = *(int *)((int)local_34[1]._seed + 0x48); + iVar13 = *(int *)(GHIDRA_INT(local_34[1]._seed) + 0x48); if (iVar13 == 4) { if ((local_34[1]._shift2 & 0x58) != 0) { LAB_0098cb43: @@ -1394,7 +1394,7 @@ LAB_0098cb31: } else { LAB_0098cb4f: - iVar13 = *(int *)((int)local_34[1]._seed + 0x48); + iVar13 = *(int *)(GHIDRA_INT(local_34[1]._seed) + 0x48); if (iVar13 == 4) { LAB_0098cb7c: fVar14 = fVar14 + (float)self->_config[0]._mapSprite._bitflags * 0.5; @@ -1412,15 +1412,15 @@ LAB_0098cb7c: cellWidth = (float)self->_config[0]._mapSprite._shadowLayerIndex; cellHeight = (float)self->_config[0]._mapSprite._bitflags; maxIcons = self->_config[0]._borderPadding.x; - if ((uint)maxIcons < (uint)fVar9) { + if (GHIDRA_UINT(maxIcons) < GHIDRA_UINT(fVar9)) { fVar9 = maxIcons; } - local_c8._seed = (int)(cellWidth * 0.25 + fVar16); + local_c8._seed = GHIDRA_INT((cellWidth * 0.25 + fVar16)); quadIconOffsets[1].x = cellWidth * 0.75 + fVar16; - local_c8._shift3 = (int)(cellHeight * 0.5 + fVar14); - local_b8._4_4_ = local_c8._shift3; - local_b8._0_4_ = cellWidth * 0.5 + fVar16; - local_c8._shift2 = (int)quadIconOffsets[1].x; + local_c8._shift3 = GHIDRA_INT((cellHeight * 0.5 + fVar14)); + (*(undefined4 *)((char *)&(local_b8) + 0x4)) = local_c8._shift3; + (*(undefined4 *)((char *)&(local_b8) + 0x0)) = cellWidth * 0.5 + fVar16; + local_c8._shift2 = GHIDRA_INT(quadIconOffsets[1].x); local_c8._shift1 = local_c8._shift3; quadIconOffsets[0].y = cellHeight * 0.25 + fVar14; quadIconOffsets[2].y = cellHeight * 0.75 + fVar14; @@ -1429,12 +1429,12 @@ LAB_0098cb7c: quadIconOffsets[2].x = (float)local_c8._seed; quadIconOffsets[3].x = quadIconOffsets[1].x; quadIconOffsets[3].y = quadIconOffsets[2].y; - if ((uint)fVar9 < 5) { - if ((uint)fVar9 < 2) { + if (GHIDRA_UINT(fVar9) < 5) { + if (GHIDRA_UINT(fVar9) < 2) { local_34 = (RNG *)local_b8; } else { - if (2 < (uint)fVar9) goto LAB_0098cc6f; + if (2 < GHIDRA_UINT(fVar9)) goto LAB_0098cc6f; local_34 = &local_c8; } } @@ -1478,7 +1478,7 @@ LAB_0098cc6f: pbVar10 = local_2c; } } - while ((local_2c = pbVar10, (uint)iconSlot < (uint)fVar9 && (uVar6 != 0))) { + while ((local_2c = pbVar10, GHIDRA_UINT(iconSlot) < GHIDRA_UINT(fVar9) && (uVar6 != 0))) { if ((uVar6 & 1) == 0) { if ((uVar6 & 0x40) == 0) { if ((uVar6 & 0x400) == 0) { @@ -1490,7 +1490,7 @@ LAB_0098cc6f: if (((bVar5 != 0) && ((iconSprite->_animState)._animData != (void *)0x0)) && (AnimationState::SetFrameFloat - (&iconSprite->_animState,(float)(int)pillIconFrame + (&iconSprite->_animState,(float)GHIDRA_INT(pillIconFrame) ), *(int *)(iconSpriteOwner + 0x534) != 0)) { (iconSprite->_animState)._isPlaying = 0; } @@ -1539,7 +1539,7 @@ LAB_0098cc6f: (void *)0x0)) && (AnimationState::SetFrameFloat (&iconSprite->_animState, - (float)(int)local_58.y), + (float)GHIDRA_INT(local_58.y)), *(int *)(iconSpriteOwner + 0x534) != 0)) { (iconSprite->_animState)._isPlaying = 0; } @@ -1552,7 +1552,7 @@ LAB_0098cc6f: ((iconSprite->_animState)._animData != (void *)0x0 )) && (AnimationState::SetFrameFloat (&iconSprite->_animState, - (float)(int)local_7c), + (float)GHIDRA_INT(local_7c)), *(int *)(iconSpriteOwner + 0x534) != 0)) { (iconSprite->_animState)._isPlaying = 0; } @@ -1565,7 +1565,7 @@ LAB_0098cc6f: ((iconSprite->_animState)._animData != (void *)0x0)) && (AnimationState::SetFrameFloat (&iconSprite->_animState, - (float)(int)local_8c), + (float)GHIDRA_INT(local_8c)), *(int *)(iconSpriteOwner + 0x534) != 0)) { (iconSprite->_animState)._isPlaying = 0; } @@ -1578,7 +1578,7 @@ LAB_0098cc6f: ((iconSprite->_animState)._animData != (void *)0x0)) && (AnimationState::SetFrameFloat (&iconSprite->_animState, - (float)(int)local_88), + (float)GHIDRA_INT(local_88)), *(int *)(iconSpriteOwner + 0x534) != 0)) { (iconSprite->_animState)._isPlaying = 0; } @@ -1602,7 +1602,7 @@ LAB_0098cc6f: if (((bVar5 != 0) && ((iconSprite->_animState)._animData != (void *)0x0)) && (AnimationState::SetFrameFloat - (&iconSprite->_animState,(float)(int)local_74.y) + (&iconSprite->_animState,(float)GHIDRA_INT(local_74.y)) , *(int *)(iconSpriteOwner + 0x534) != 0)) { (iconSprite->_animState)._isPlaying = 0; } @@ -1614,7 +1614,7 @@ LAB_0098cc6f: if (((bVar5 != 0) && ((iconSprite->_animState)._animData != (void *)0x0)) && (AnimationState::SetFrameFloat - (&iconSprite->_animState,(float)(int)keyIconFrame) + (&iconSprite->_animState,(float)GHIDRA_INT(keyIconFrame)) , *(int *)(iconSpriteOwner + 0x534) != 0)) { (iconSprite->_animState)._isPlaying = 0; } @@ -1648,7 +1648,7 @@ LAB_0098cc6f: if (((bVar5 != 0) && ((iconSprite->_animState)._animData != (void *)0x0)) && (AnimationState::SetFrameFloat - (&iconSprite->_animState,(float)(int)chestIconFrame), + (&iconSprite->_animState,(float)GHIDRA_INT(chestIconFrame)), *(int *)(iconSpriteOwner + 0x534) != 0)) { (iconSprite->_animState)._isPlaying = 0; } @@ -1679,18 +1679,18 @@ LAB_0098cc6f: bVar5 = ((ANM2 *)(iconSprite))->ANM2::SetAnimation((byte *)"IconHeart",1); if (((bVar5 != 0) && ((iconSprite->_animState)._animData != (void *)0x0)) && (AnimationState::SetFrameFloat - (&iconSprite->_animState,(float)(int)heartIconFrame), + (&iconSprite->_animState,(float)GHIDRA_INT(heartIconFrame)), *(int *)(iconSpriteOwner + 0x534) != 0)) { (iconSprite->_animState)._isPlaying = 0; } uVar6 = uVar6 & 0xfffffffe; } - local_2c = (byte *)((local_64 + (float)(&local_34->_seed)[(int)iconSlot * 2]) + local_2c = (byte *)((local_64 + (float)(&local_34->_seed)[GHIDRA_INT(iconSlot) * 2]) - 6.0); dVar19 = floor((double)(float)local_2c); - local_b8._8_4_ = (BADTYPE)dVar19; + (*(undefined4 *)((char *)&(local_b8) + 0x8)) = (BADTYPE)dVar19; local_2c = (byte *)(((float)local_68 + - (float)(&local_34->_shift1)[(int)iconSlot * 2]) - 6.0); + (float)(&local_34->_shift1)[GHIDRA_INT(iconSlot) * 2]) - 6.0); dVar19 = floor((double)(float)local_2c); local_ac = (float)dVar19; if (iconSprite->_loaded != 0) { @@ -1709,7 +1709,7 @@ LAB_0098cc6f: AnimationState::Render (lastState,(Vector *)(local_b8 + 8),&g_vectorZero,&g_vectorZero); } - iconSlot = (float)((int)iconSlot + 1); + iconSlot = (float)(GHIDRA_INT(iconSlot) + 1); pbVar10 = local_2c; } } @@ -1720,17 +1720,17 @@ LAB_0098cc6f: } local_48 = local_48 + 1; cellX = cellX + fVar14; - } while ((int)local_48 < (int)(startCol + (int)pMVar15->_config[0]._vec1.x)); + } while (GHIDRA_INT(local_48) < GHIDRA_INT((startCol + GHIDRA_INT(pMVar15->_config[0]._vec1.x)))); cellWidth = startRow; fVar9 = cellStepY; } cellX = 0.0; - if (0 < (int)startCol) { + if (0 < GHIDRA_INT(startCol)) { cellX = 0.0 - fVar14; } local_6c = (byte *)((float)local_6c + fVar9); - local_5c = (float)((int)local_5c + 1); - } while ((int)local_5c < (int)pMVar15->_config[0]._vec1.y + (int)cellWidth); + local_5c = (float)(GHIDRA_INT(local_5c) + 1); + } while (GHIDRA_INT(local_5c) < GHIDRA_INT(pMVar15->_config[0]._vec1.y) + GHIDRA_INT(cellWidth)); } _glfw_context_reset(); if (g_renderTargetStackSize == 0) { @@ -1781,7 +1781,7 @@ void Minimap::Init() local_14 = 0xffffffff; puStack_18 = &LAB_00b0d46d; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(anm2Path + 0x2c); + local_24 = __security_cookie ^ GHIDRA_UINT((anm2Path + 0x2c)); ExceptionList = &local_1c; local_38._alpha = 0.0; local_38._unk = 0xf; @@ -1797,13 +1797,13 @@ void Minimap::Init() local_14 = 0; ((ANM2 *)(&this->_config[0]._mapSprite))->ANM2::Load((std_string *)anm2Path,1); local_14 = 0xffffffff; - if (0xf < (uint)local_38._unk) { + if (0xf < GHIDRA_UINT(local_38._unk)) { uVar11 = local_38._unk + 1; auVar10 = anm2Path; if (0xfff < uVar11) { - auVar10 = *(undefined1 (*) [4])((int)anm2Path + -4); + auVar10 = *(undefined1 (*) [4])(GHIDRA_INT(anm2Path) + -4); uVar11 = local_38._unk + 0x24; - if ((char *)0x1f < (char *)((int)anm2Path + (-4 - (int)auVar10))) { + if ((char *)0x1f < (char *)(GHIDRA_INT(anm2Path) + (-4 - GHIDRA_INT(auVar10)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1832,13 +1832,13 @@ void Minimap::Init() local_14 = 1; ((ANM2 *)((ANM2 *)(this->_config[1]._mapSprite._filename._buf + 4)))->ANM2::Load((std_string *)anm2Path,1); local_14 = 0xffffffff; - if (0xf < (uint)local_38._unk) { + if (0xf < GHIDRA_UINT(local_38._unk)) { uVar11 = local_38._unk + 1; auVar10 = anm2Path; if (0xfff < uVar11) { - auVar10 = *(undefined1 (*) [4])((int)anm2Path + -4); + auVar10 = *(undefined1 (*) [4])(GHIDRA_INT(anm2Path) + -4); uVar11 = local_38._unk + 0x24; - if ((char *)0x1f < (char *)((int)anm2Path + (-4 - (int)auVar10))) { + if ((char *)0x1f < (char *)(GHIDRA_INT(anm2Path) + (-4 - GHIDRA_INT(auVar10)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1887,7 +1887,7 @@ void Minimap::Init() *(float *)&(*(undefined1 *)((char *)&(pMVar3[-1]) + 0x140)) = g_vectorZero.x; *(float *)&(*(undefined1 *)((char *)&(pMVar3[-1]) + 0x144)) = g_vectorZero.y; pMVar3[-1]._alpha = 0.0; - mapLayer = (MinimapConfig *)((int)(pMVar3 + 1) + 4); + mapLayer = (MinimapConfig *)(GHIDRA_INT((pMVar3 + 1)) + 4); layersLeft = layersLeft + -1; this = minimap; } while (layersLeft != 0); @@ -1904,13 +1904,13 @@ void Minimap::Init() local_14 = 4; ((ANM2 *)(&pMVar2->_itemIconsSprite))->ANM2::Load((std_string *)anm2Path,1); local_14 = 0xffffffff; - if (0xf < (uint)local_38._unk) { + if (0xf < GHIDRA_UINT(local_38._unk)) { uVar11 = local_38._unk + 1; auVar10 = anm2Path; if (0xfff < uVar11) { - auVar10 = *(undefined1 (*) [4])((int)anm2Path + -4); + auVar10 = *(undefined1 (*) [4])(GHIDRA_INT(anm2Path) + -4); uVar11 = local_38._unk + 0x24; - if ((char *)0x1f < (char *)((int)anm2Path + (-4 - (int)auVar10))) { + if ((char *)0x1f < (char *)(GHIDRA_INT(anm2Path) + (-4 - GHIDRA_INT(auVar10)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1930,13 +1930,13 @@ void Minimap::Init() local_14 = 5; ((ANM2 *)(&pMVar2->_hudPickupSprite))->ANM2::Load((std_string *)anm2Path,1); local_14 = 0xffffffff; - if (0xf < (uint)local_38._unk) { + if (0xf < GHIDRA_UINT(local_38._unk)) { uVar11 = local_38._unk + 1; auVar10 = anm2Path; if (0xfff < uVar11) { - auVar10 = *(undefined1 (*) [4])((int)anm2Path + -4); + auVar10 = *(undefined1 (*) [4])(GHIDRA_INT(anm2Path) + -4); uVar11 = local_38._unk + 0x24; - if ((char *)0x1f < (char *)((int)anm2Path + (-4 - (int)auVar10))) { + if ((char *)0x1f < (char *)(GHIDRA_INT(anm2Path) + (-4 - GHIDRA_INT(auVar10)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1945,7 +1945,7 @@ void Minimap::Init() } local_38._alpha = 0.0; local_38._unk = 0xf; - anm2Path = (undefined1 [4])((uint)anm2Path & 0xffffff00); + anm2Path = (undefined1 [4])(GHIDRA_UINT(anm2Path) & 0xffffff00); pvVar9 = Manager::LoadImage(tmpHandle,(byte *)"gfx/ui/minimap_questionmark.png"); local_14 = 6; ((KAGE::SmartPointer *)(&(*(undefined1 *)((char *)(pMVar2) + 0x614))))->KAGE::SmartPointer::operator_assign(pvVar9); @@ -1963,19 +1963,19 @@ void Minimap::Init() iconsPath._buf[1] = '\0'; iconsPath._buf[2] = '\0'; iconsPath._buf[3] = '\0'; - iconsPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(iconsPath._buf) + 0x0)) = std::_Allocate(0x20); iconsPath._size = 0x19; iconsPath._capacity = 0x1f; - builtin_strncpy((char *)iconsPath._buf._0_4_,"gfx/ui/minimap_icons.anm2",0x1a); + builtin_strncpy((*(undefined4 *)((char *)&((char *)iconsPath._buf) + 0x0)),"gfx/ui/minimap_icons.anm2",0x1a); local_14 = 8; ((ANM2 *)(&pMVar2->_iconsSprite))->ANM2::Load(&iconsPath,1); if (0xf < iconsPath._capacity) { uVar11 = iconsPath._capacity + 1; - ptr = (char *)iconsPath._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((char *)iconsPath._buf) + 0x0)); if (0xfff < uVar11) { - ptr = *(char **)(iconsPath._buf._0_4_ + -4); + ptr = *(char **)((*(undefined4 *)((char *)&(iconsPath._buf) + 0x0)) + -4); uVar11 = iconsPath._capacity + 0x24; - if ((char *)0x1f < (char *)(iconsPath._buf._0_4_ + (-4 - (int)ptr))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(iconsPath._buf) + 0x0)) + (-4 - GHIDRA_INT(ptr)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2039,7 +2039,7 @@ void Minimap::render_icons(float *param_2) undefined1 auStack_8 [4]; void *animData; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); iconColor = &(this->_itemIconsSprite)._color; iconPos.x = *param_2; iconPos.y = param_2[1]; @@ -2072,7 +2072,7 @@ void Minimap::render_icons(float *param_2) if (itemOwner != (Entity_Player *)0x0) { iconFrames[0] = 0; } - iconCount = (uint)(itemOwner != (Entity_Player *)0x0); + iconCount = GHIDRA_UINT((itemOwner != (Entity_Player *)0x0)); itemOwner = PlayerManager::FirstCollectibleOwner (&g_game->_playerManager,0xf6,(RNG **)&g_game->_playerManager,1); if (itemOwner != (Entity_Player *)0x0) { @@ -2144,17 +2144,17 @@ void Minimap::render_icons(float *param_2) } } else { - iconSpacing = (float)((double)(int)(iconCount - 3) + - __uint_to_double_fixup[-((int)(iconCount - 3) >> 0x1f)]) - 16.0; + iconSpacing = (float)((double)GHIDRA_INT((iconCount - 3)) + + __uint_to_double_fixup[-(GHIDRA_INT((iconCount - 3)) >> 0x1f)]) - 16.0; } iconsSprite = &minimap->_itemIconsSprite; iconIndex = 0; do { uVar3 = iconFrames[iconIndex]; - if ((int)uVar3 < 0) { + if (GHIDRA_INT(uVar3) < 0) { isAnimSet = ((ANM2 *)(iconsSprite))->ANM2::SetAnimation((byte *)"curses",1); if ((isAnimSet != 0) && ((pMVar2->_itemIconsSprite)._animState._animData != (void *)0x0)) { - ((AnimationState *)(&(pMVar2->_itemIconsSprite)._animState))->AnimationState::SetFrameFloat((float)(int)~uVar3); + ((AnimationState *)(&(pMVar2->_itemIconsSprite)._animState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(~uVar3)); animData = (pMVar2->_itemIconsSprite)._animState._animData; LAB_0098e430: if (animData != (void *)0x0) { @@ -2165,7 +2165,7 @@ LAB_0098e430: else { isAnimSet = ((ANM2 *)(iconsSprite))->ANM2::SetAnimation((byte *)"icons",1); if ((isAnimSet != 0) && ((pMVar2->_itemIconsSprite)._animState._animData != (void *)0x0)) { - ((AnimationState *)(&(pMVar2->_itemIconsSprite)._animState))->AnimationState::SetFrameFloat((float)(int)uVar3); + ((AnimationState *)(&(pMVar2->_itemIconsSprite)._animState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(uVar3)); animData = (pMVar2->_itemIconsSprite)._animState._animData; goto LAB_0098e430; } @@ -2262,7 +2262,7 @@ void Minimap::Render() curseMask = Seeds::GetPreventedCurses(); game = g_game; local_144 = (float)(CONCAT31((uint3)(~curseMask >> 10), - (byte)(~curseMask >> 2) & local_144._0_1_) & 0xffffff01); + (byte)(~curseMask >> 2) & (*(undefined1 *)((char *)&(local_144) + 0x0))) & 0xffffff01); hudAlpha = ((RoomTransition *)(&g_game->_roomTransition))->RoomTransition::get_hud_alpha(); local_118 = hudAlpha * this->_config[0]._alpha; piVar1 = *(int **)(*(int *)((char *)game->_room + 4) + 0x10); @@ -2289,7 +2289,7 @@ void Minimap::Render() ((ANM2 *)(&this->_config[0]._mapSprite))->ANM2::SetFrame((std_string *)"Frame",0); ((Sprite *)((Sprite *)this->_config))->Sprite::SetColor(&local_d0); ((ANM2 *)(&this->_config[0]._mapSprite))->ANM2::Render((Vector *)&local_114,&g_vectorZero,&g_vectorZero); - if (local_144._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_144) + 0x0)) == '\0') { ((Color *)((Color *)&local_d0))->Color::Color(); ((Sprite *)((Sprite *)this->_config))->Sprite::SetColor(color); dVar7 = floor((double)*(float *)&(*(undefined1 *)((char *)&(this->_config[0]) + 0x140))); @@ -2323,7 +2323,7 @@ void Minimap::Render() if (clipTop <= 0.0) { local_100._green = 0.0; } - local_e0 = (float)CONCAT31(local_e0._1_3_,1); + local_e0 = (float)CONCAT31((*(undefined1 *)((char *)&(local_e0) + 0x1)),1); textureWidth = (float)((double)iVar3 + __uint_to_double_fixup[-(iVar3 >> 0x1f)]); local_100._blue = (float)local_128; if (textureWidth <= (float)local_128) { @@ -2334,7 +2334,7 @@ void Minimap::Render() local_100._red = 0.0; } local_100._alpha = local_100._green; - local_100._unk = (int)local_100._red; + local_100._unk = GHIDRA_INT(local_100._red); pMStack_e8 = (Minimap *)local_100._blue; fStack_e4 = fStack_ec; isMirrorWorld = ((Room *)(g_game->_room))->Room::IsMirrorWorld(); @@ -2361,10 +2361,10 @@ void Minimap::Render() local_100._blue = fVar5; local_100._alpha = local_100._green; local_d0._colorize[2] = fVar5; - local_100._unk = (int)pMStack_e8; + local_100._unk = GHIDRA_INT(pMStack_e8); fStack_ec = fStack_e4; pMStack_e8 = (Minimap *)fVar5; - local_d0._offset[0] = (float)CONCAT31(local_d0._offset[0]._1_3_,1); + local_d0._offset[0] = (float)CONCAT31((*(undefined1 *)((char *)&(local_d0._offset[0]) + 0x1)),1); local_e0 = local_d0._offset[0]; iVar3 = *piVar1; fVar4 = mirroredOffsetX * g_vectorOne.x + local_114._red + (fVar6 - fVar4); @@ -2402,7 +2402,7 @@ void Minimap::Render() local_100._green = 1.0; local_100._blue = 1.0; local_100._alpha = hudAlpha; - if (local_144._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_144) + 0x0)) == '\0') { iVar3 = *(int *)&(*(undefined1 *)((char *)&(this->_config[1]) + 0x118)); iVar2 = *(int *)(iVar3 + 0x10); iVar3 = *(int *)(iVar3 + 0x14); @@ -2439,7 +2439,7 @@ void Minimap::Render() local_d0._tint[2] = 0.0; local_d0._colorize[3] = 1.0; local_d0._colorize[1] = 1.0; - local_d0._offset[0] = (float)((uint)local_d0._offset[0] & 0xffffff00); + local_d0._offset[0] = (float)(GHIDRA_UINT(local_d0._offset[0]) & 0xffffff00); fVar4 = ((local_13c - ((float)((double)*(int *)(iVar3 + 0x10) + __uint_to_double_fixup[-(*(int *)(iVar3 + 0x10) >> 0x1f)]) - @@ -2538,7 +2538,7 @@ void Minimap::render_score_time() local_14 = 0xffffffff; puStack_18 = &LAB_00b0d501; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(valueText + 0x58); + local_24 = __security_cookie ^ GHIDRA_UINT((valueText + 0x58)); if ((g_game->_hud)._isVisible == 0) { return; } @@ -2646,10 +2646,10 @@ void Minimap::render_score_time() local_7c = (float)((iVar1 % 0x1a5e0) / 0x708); if (iVar1 < 1) { uVar3 = g_game->_frameCount & 0x80000007; - if ((int)uVar3 < 0) { + if (GHIDRA_INT(uVar3) < 0) { uVar3 = (uVar3 - 1 | 0xfffffff8) + 1; } - if (3 < (int)uVar3) { + if (3 < GHIDRA_INT(uVar3)) { local_6c = (StringTable *)((float)pSVar5 + shakeX); fontCopy = font; goto LAB_0098f558; diff --git a/src/game/mod.cpp b/src/game/mod.cpp index d31e895..ce142b1 100644 --- a/src/game/mod.cpp +++ b/src/game/mod.cpp @@ -37,9 +37,9 @@ std_string * Mod::GetContentPath(std_string *outPath, std_string *name) local_14 = (void *)0xffffffff; puStack_18 = &LAB_00b07b5d; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(contentDirTrimmed + 0x11); + local_24 = __security_cookie ^ GHIDRA_UINT((contentDirTrimmed + 0x11)); ExceptionList = &local_1c; - contentDir = (byte *)((int)this + 0x48); + contentDir = (byte *)(GHIDRA_INT(this) + 0x48); uVar4 = *(int *)((char *)this + 0x58) - 1; if (*(uint *)((char *)this + 0x58) < uVar4) { uVar4 = *(uint *)((char *)this + 0x58); @@ -62,14 +62,14 @@ std_string * Mod::GetContentPath(std_string *outPath, std_string *name) appendResult[4] = 0; appendResult[5] = 0xf; *(undefined1 *)appendResult = 0; - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < local_40) { uVar4 = local_40 + 1; ptr = contentDirTrimmed[0]; if (0xfff < uVar4) { - ptr = *(void **)((int)contentDirTrimmed[0] + -4); + ptr = *(void **)(GHIDRA_INT(contentDirTrimmed[0]) + -4); uVar4 = local_40 + 0x24; - if (0x1f < (uint)((int)contentDirTrimmed[0] + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(contentDirTrimmed[0]) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -79,13 +79,13 @@ std_string * Mod::GetContentPath(std_string *outPath, std_string *name) psVar5 = (std_string *)name->_size; local_44 = 0; local_40 = 0xf; - contentDirTrimmed[0] = (void *)((uint)contentDirTrimmed[0] & 0xffffff00); - if ((std_string *)(0x7fffffff - (uint)local_5c) < psVar5) { + contentDirTrimmed[0] = (void *)(GHIDRA_UINT(contentDirTrimmed[0]) & 0xffffff00); + if ((std_string *)(0x7fffffff - GHIDRA_UINT(local_5c)) < psVar5) { /* WARNING: Subroutine does not return */ std::string::_Xlen(); } ppppbVar1 = (byte ****)&dlcDir; - if (0xf < local_5c._4_4_) { + if (0xf < (*(undefined4 *)((char *)&(local_5c) + 0x4))) { ppppbVar1 = dlcDir; } nameText = name; @@ -93,9 +93,9 @@ std_string * Mod::GetContentPath(std_string *outPath, std_string *name) nameText = *(std_string **)name->_buf; psVar5 = (std_string *)name->_size; } - ((std::string *)((char *)&dlcPath))->std::string::concat((int)contentDir,psVar5,(byte *)ppppbVar1,(uint)local_5c, - (byte *)nameText,(uint)psVar5); - local_14._0_1_ = 3; + ((std::string *)((char *)&dlcPath))->std::string::concat(GHIDRA_INT(contentDir),psVar5,(byte *)ppppbVar1,GHIDRA_UINT(local_5c), + (byte *)nameText,GHIDRA_UINT(psVar5)); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; ppppbVar1 = (byte ****)&dlcPath; if (0xf < uStack_28) { ppppbVar1 = dlcPath; @@ -115,7 +115,7 @@ std_string * Mod::GetContentPath(std_string *outPath, std_string *name) if (0xf < name->_capacity) { name = *(std_string **)name->_buf; } - ((std::string *)(outPath->_buf))->std::string::concat((int)contentDir,psVar5,pbVar2,*(uint *)((char *)this + 0x58), + ((std::string *)(outPath->_buf))->std::string::concat(GHIDRA_INT(contentDir),psVar5,pbVar2,*(uint *)((char *)this + 0x58), (byte *)name,*nameSize); if (0xf < uStack_28) { uVar4 = uStack_28 + 1; @@ -123,52 +123,52 @@ std_string * Mod::GetContentPath(std_string *outPath, std_string *name) if (0xfff < uVar4) { ppppbVar1 = (byte ****)dlcPath[-1]; uVar4 = uStack_28 + 0x24; - if ((byte *)0x1f < (byte *)((int)dlcPath + (-4 - (int)ppppbVar1))) goto LAB_008f9c94; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(dlcPath) + (-4 - GHIDRA_INT(ppppbVar1)))) goto LAB_008f9c94; } operator_delete(ppppbVar1,uVar4); } - dlcPath = (byte ****)((uint)dlcPath & 0xffffff00); - if (local_5c._4_4_ < 0x10) { + dlcPath = (byte ****)(GHIDRA_UINT(dlcPath) & 0xffffff00); + if ((*(undefined4 *)((char *)&(local_5c) + 0x4)) < 0x10) { ExceptionList = local_1c; return outPath; } - uVar4 = local_5c._4_4_ + 1; + uVar4 = (*(undefined4 *)((char *)&(local_5c) + 0x4)) + 1; ppppbVar1 = dlcDir; if (uVar4 < 0x1000) goto LAB_008f9bb7; ppppbVar1 = (byte ****)dlcDir[-1]; - iVar3 = (int)dlcDir - (int)ppppbVar1; + iVar3 = GHIDRA_INT(dlcDir) - GHIDRA_INT(ppppbVar1); } else { - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; tracked_alloc(1,pbVar2,0); ppppbVar1 = dlcPath; - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; outPath->_buf[0] = '\0'; outPath->_buf[1] = '\0'; outPath->_buf[2] = '\0'; outPath->_buf[3] = '\0'; outPath->_size = 0; outPath->_capacity = 0; - dlcPath = (byte ****)((uint)dlcPath & 0xffffff00); + dlcPath = (byte ****)(GHIDRA_UINT(dlcPath) & 0xffffff00); *(byte *****)outPath->_buf = ppppbVar1; *(undefined4 *)(outPath->_buf + 4) = uStack_38; *(undefined4 *)(outPath->_buf + 8) = uStack_34; *(undefined4 *)(outPath->_buf + 0xc) = uStack_30; outPath->_size = local_2c; outPath->_capacity = uStack_28; - if (local_5c._4_4_ < 0x10) { + if ((*(undefined4 *)((char *)&(local_5c) + 0x4)) < 0x10) { ExceptionList = local_1c; return outPath; } - uVar4 = local_5c._4_4_ + 1; + uVar4 = (*(undefined4 *)((char *)&(local_5c) + 0x4)) + 1; ppppbVar1 = dlcDir; if (uVar4 < 0x1000) goto LAB_008f9bb7; ppppbVar1 = (byte ****)dlcDir[-1]; - iVar3 = (int)dlcDir - (int)ppppbVar1; + iVar3 = GHIDRA_INT(dlcDir) - GHIDRA_INT(ppppbVar1); } uStack_28 = 0xf; local_2c = 0; - uVar4 = local_5c._4_4_ + 0x24; + uVar4 = (*(undefined4 *)((char *)&(local_5c) + 0x4)) + 0x24; if (0x1f < iVar3 - 4U) { LAB_008f9c94: /* WARNING: Subroutine does not return */ @@ -203,42 +203,42 @@ void Mod::load_menu_sprites() undefined1 *puStack_c; undefined4 local_8; - local_8._0_1_ = 0xff; - local_8._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0xffffff; puStack_c = &LAB_00b07ba5; local_10 = ExceptionList; - local_14 = __security_cookie ^ (int)&relativePath + 0x28U; + local_14 = __security_cookie ^ GHIDRA_INT(&relativePath) + 0x28U; ExceptionList = &local_10; - sprite = (ANM2 *)((int)in_ECX + 0x100); + sprite = (ANM2 *)(GHIDRA_INT(in_ECX) + 0x100); pathTableOffset = 0; do { - pbVar4 = *(byte **)((int)&PTR_s_gfx_CharacterMenu_anm2_00b240c0 + pathTableOffset); + pbVar4 = *(byte **)(GHIDRA_INT(&PTR_s_gfx_CharacterMenu_anm2_00b240c0) + pathTableOffset); if (pbVar4 != (byte *)0x0) { relativePath._size = 0; relativePath._capacity = 0xf; - relativePath._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(relativePath._buf) + 0x0)) = (void *)0x0; pbVar3 = pbVar4; do { bVar1 = *pbVar3; pbVar3 = pbVar3 + 1; } while (bVar1 != 0); - ((std::string *)(relativePath._buf))->std::string::assign(pbVar4,(int)pbVar3 - (int)(pbVar4 + 1)); + ((std::string *)(relativePath._buf))->std::string::assign(pbVar4,GHIDRA_INT(pbVar3) - GHIDRA_INT((pbVar4 + 1))); local_8 = 0; GetContentPath(in_ECX,&contentPath,&relativePath); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; if (0xf < relativePath._capacity) { uVar6 = relativePath._capacity + 1; - pvVar5 = (void *)relativePath._buf._0_4_; + pvVar5 = (*(undefined4 *)((char *)&((void *)relativePath._buf) + 0x0)); if (0xfff < uVar6) { - pvVar5 = *(void **)(relativePath._buf._0_4_ + -4); + pvVar5 = *(void **)((*(undefined4 *)((char *)&(relativePath._buf) + 0x0)) + -4); uVar6 = relativePath._capacity + 0x24; - if (0x1f < (uint)(relativePath._buf._0_4_ + (-4 - (int)pvVar5))) goto LAB_008f9e44; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(relativePath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_008f9e44; } operator_delete(pvVar5,uVar6); } path = &contentPath; if (0xf < contentPath._capacity) { - path = (std_string *)contentPath._buf._0_4_; + path = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } pbVar4 = FileSystem::ResolvePath((byte *)path); if (pbVar4 != (byte *)0x0) { @@ -246,28 +246,28 @@ void Mod::load_menu_sprites() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar6 = *(uint *)(pbVar4 + -4); qVar2 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar6; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar6; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar2 < uVar6); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < uVar6)); free(pbVar4 + -4); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; } if (pbVar4 != (byte *)0x0) { ((ANM2 *)(sprite))->ANM2::Load(&contentPath,1); } - local_8._0_1_ = 0xff; - local_8._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0xffffff; if (0xf < contentPath._capacity) { uVar6 = contentPath._capacity + 1; - pvVar5 = (void *)contentPath._buf._0_4_; + pvVar5 = (*(undefined4 *)((char *)&((void *)contentPath._buf) + 0x0)); if (0xfff < uVar6) { - pvVar5 = *(void **)(contentPath._buf._0_4_ + -4); + pvVar5 = *(void **)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + -4); uVar6 = contentPath._capacity + 0x24; - if (0x1f < (contentPath._buf._0_4_ - (int)pvVar5) - 4U) { + if (0x1f < ((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) - GHIDRA_INT(pvVar5)) - 4U) { LAB_008f9e44: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -305,22 +305,22 @@ void Mod::load_content_anm2(int slot, std_string *relativePath) local_8 = 0; path = &contentPath; if (0xf < contentPath._capacity) { - path = (std_string *)contentPath._buf._0_4_; + path = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } resolvedPath = FileSystem::ResolvePath((byte *)path); if (resolvedPath != (byte *)0x0) { - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; tracked_alloc(1,resolvedPath,0); - local_8 = (uint)local_8._1_3_ << 8; - ((ANM2 *)((ANM2 *)(slot * 0x114 + 0x100 + (int)this)))->ANM2::Load(&contentPath,1); + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; + ((ANM2 *)((ANM2 *)(slot * 0x114 + 0x100 + GHIDRA_INT(this))))->ANM2::Load(&contentPath,1); } if (0xf < contentPath._capacity) { size = contentPath._capacity + 1; - resolvedPath = (void *)contentPath._buf._0_4_; + resolvedPath = (*(undefined4 *)((char *)&((void *)contentPath._buf) + 0x0)); if (0xfff < size) { - resolvedPath = *(void **)(contentPath._buf._0_4_ + -4); + resolvedPath = *(void **)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + -4); size = contentPath._capacity + 0x24; - if (0x1f < (contentPath._buf._0_4_ - (int)resolvedPath) - 4U) { + if (0x1f < ((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) - GHIDRA_INT(resolvedPath)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } diff --git a/src/game/mod_entry.cpp b/src/game/mod_entry.cpp index ed24777..5109e90 100644 --- a/src/game/mod_entry.cpp +++ b/src/game/mod_entry.cpp @@ -57,7 +57,7 @@ ModEntry::ModEntry() *(void **)sentinelNode = sentinelNode; *(void **)((char *)sentinelNode + 4) = sentinelNode; *(void **)&(*(undefined1 *)((char *)(this) + 0xe4)) = sentinelNode; - local_8._0_1_ = 10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 10; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xec)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xf0)) = 0; sentinelNode = operator_new(0x18); @@ -66,7 +66,7 @@ ModEntry::ModEntry() *(void **)((char *)sentinelNode + 8) = sentinelNode; *(undefined2 *)((char *)sentinelNode + 0xc) = 0x101; *(void **)&(*(undefined1 *)((char *)(this) + 0xec)) = sentinelNode; - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xf4)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xf8)) = 0; sentinelNode = operator_new(0x18); @@ -75,7 +75,7 @@ ModEntry::ModEntry() *(void **)((char *)sentinelNode + 8) = sentinelNode; *(undefined2 *)((char *)sentinelNode + 0xc) = 0x101; *(void **)&(*(undefined1 *)((char *)(this) + 0xf4)) = sentinelNode; - local_8 = CONCAT31(local_8._1_3_,0xc); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xc); this->_enabled = 1; this->_loaded = 1; *(undefined1 *)(this + 1) = 0; @@ -124,7 +124,7 @@ void ModEntry::parse_metadata_xml() local_8 = (byte ***)0xffffffff; puStack_c = &LAB_00b07b08; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(modPath + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((modPath + 10)); ExceptionList = &local_10; FUN_00413b90(local_14); local_8 = (byte ***)0x0; @@ -178,7 +178,7 @@ void ModEntry::parse_metadata_xml() cVar1 = *pcVar5; } childNode[1] = pcVar4; - childNode[3] = (int)pcVar5 - (int)pcVar4; + childNode[3] = GHIDRA_INT(pcVar5) - GHIDRA_INT(pcVar4); if (metadataNode[6] == 0) { childNode[10] = 0; metadataNode[6] = childNode; @@ -215,7 +215,7 @@ void ModEntry::parse_metadata_xml() cVar1 = *(char *)pMVar6; } childNode[1] = pMVar9; - childNode[3] = (int)pMVar6 - (int)pMVar9; + childNode[3] = GHIDRA_INT(pMVar6) - GHIDRA_INT(pMVar9); if (metadataNode[6] == 0) { childNode[10] = 0; metadataNode[6] = childNode; @@ -252,7 +252,7 @@ void ModEntry::parse_metadata_xml() cVar1 = *pcVar5; } childNode[1] = pcVar4; - childNode[3] = (int)pcVar5 - (int)pcVar4; + childNode[3] = GHIDRA_INT(pcVar5) - GHIDRA_INT(pcVar4); if (metadataNode[6] == 0) { childNode[10] = 0; metadataNode[6] = childNode; @@ -289,7 +289,7 @@ void ModEntry::parse_metadata_xml() cVar1 = *pcVar5; } childNode[1] = pcVar4; - childNode[3] = (int)pcVar5 - (int)pcVar4; + childNode[3] = GHIDRA_INT(pcVar5) - GHIDRA_INT(pcVar4); if (metadataNode[6] == 0) { childNode[10] = 0; metadataNode[6] = childNode; @@ -326,7 +326,7 @@ void ModEntry::parse_metadata_xml() cVar1 = *pcVar5; } childNode[1] = pcVar4; - childNode[3] = (int)pcVar5 - (int)pcVar4; + childNode[3] = GHIDRA_INT(pcVar5) - GHIDRA_INT(pcVar4); if (metadataNode[6] == 0) { childNode[10] = 0; metadataNode[6] = childNode; @@ -380,7 +380,7 @@ void ModEntry::parse_metadata_xml() cVar1 = *pcVar5; } idAttribute[1] = pcVar4; - idAttribute[3] = (int)pcVar5 - (int)pcVar4; + idAttribute[3] = GHIDRA_INT(pcVar5) - GHIDRA_INT(pcVar4); if (childNode[8] == 0) { idAttribute[5] = 0; childNode[8] = idAttribute; @@ -405,7 +405,7 @@ void ModEntry::parse_metadata_xml() childNode[4] = metadataNode; childNode[0xb] = 0; tagIndex = tagIndex + 1; - } while (tagIndex < (uint)((*(int *)&(*(undefined1 *)((char *)(this) + 0xdc)) - *(int *)&(*(undefined1 *)((char *)(this) + 0xd8))) / 0x18)); + } while (tagIndex < GHIDRA_UINT(((*(int *)&(*(undefined1 *)((char *)(this) + 0xdc)) - *(int *)&(*(undefined1 *)((char *)(this) + 0xd8))) / 0x18))); } pbVar7 = operator_new_tracked(0x1000); textEnd = rapidxml::internal::print_node(pbVar7,document,0,0); @@ -418,8 +418,8 @@ void ModEntry::parse_metadata_xml() pbVar11 = pbVar8; pbVar8 = pbVar11 + 1; } while (*pbVar11 != 0); - ((std::string *)((char *)modPath))->std::string::assign(g_modsDirectory,(uint)(pbVar11 + -0xc72e28)); - local_8 = (byte ***)CONCAT31(local_8._1_3_,1); + ((std::string *)((char *)modPath))->std::string::assign(g_modsDirectory,GHIDRA_UINT((pbVar11 + -0xc72e28))); + local_8 = (byte ***)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); directorySize = &(*(undefined1 *)((char *)(this) + 0x10)); if (0xf < *(uint *)&(*(undefined1 *)((char *)(this) + 0x14))) { this = *(ModEntry **)this; @@ -435,7 +435,7 @@ void ModEntry::parse_metadata_xml() operator_delete(pbVar8,1); } if (file != (int *)0x0) { - (**(code **)(*file + 0x1c))(pbVar7,1,(int)textEnd - (int)pbVar7); + (**(code **)(*file + 0x1c))(pbVar7,1,GHIDRA_INT(textEnd) - GHIDRA_INT(pbVar7)); (**(code **)*file)(1); } if (pbVar7 != (byte *)0x0) { @@ -443,23 +443,23 @@ void ModEntry::parse_metadata_xml() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar13 = *(uint *)(pbVar7 + -4); qVar3 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar13; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar13; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar3 < uVar13); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar3) < uVar13)); free(pbVar7 + -4); } - local_8 = (byte ***)((uint)local_8 & 0xffffff00); + local_8 = (byte ***)(GHIDRA_UINT(local_8) & 0xffffff00); if (0xf < local_18) { uVar13 = local_18 + 1; ppppbVar12 = modPath[0]; if (0xfff < uVar13) { ppppbVar12 = (byte ****)modPath[0][-1]; uVar13 = local_18 + 0x24; - if ((byte *)0x1f < (byte *)((int)modPath[0] + (-4 - (int)ppppbVar12))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(modPath[0]) + (-4 - GHIDRA_INT(ppppbVar12)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -468,7 +468,7 @@ void ModEntry::parse_metadata_xml() } local_1c = 0; local_18 = 0xf; - modPath[0] = (byte ****)((uint)modPath[0] & 0xffffff00); + modPath[0] = (byte ****)(GHIDRA_UINT(modPath[0]) & 0xffffff00); local_8 = (byte ***)0x3; ((xml_memory_pool *)(auStack_10044))->xml_memory_pool::clear(); ExceptionList = local_10; diff --git a/src/game/mod_manager.cpp b/src/game/mod_manager.cpp index 916eccd..12c231f 100644 --- a/src/game/mod_manager.cpp +++ b/src/game/mod_manager.cpp @@ -59,15 +59,15 @@ void ModManager::LoadModContent() undefined4 local_14; uint *dirNameSize; - pcStack_20 = (char *)((int)register0x00000010 + 0xfffffffc); + pcStack_20 = (char *)(GHIDRA_INT(register0x00000010) + 0xfffffffc); local_14 = 0xffffffff; puStack_18 = &LAB_00b0773d; local_1c = ExceptionList; - uVar5 = __security_cookie ^ (uint)((int)register0x00000010 + 0xfffffff0U); + uVar5 = __security_cookie ^ GHIDRA_UINT((GHIDRA_INT(register0x00000010) + 0xfffffff0U)); ExceptionList = &local_1c; modSlot = *this; local_24 = uVar5; - pcVar8 = (char *)((int)register0x00000010 + 0xfffffffc); + pcVar8 = (char *)(GHIDRA_INT(register0x00000010) + 0xfffffffc); if (modSlot != this[1]) { do { if (*(char *)(*(int *)modSlot + 0xfd) != '\0') { @@ -77,20 +77,20 @@ void ModManager::LoadModContent() local_54._size = 0xd; local_14 = 0; ((Mod *)(*(void **)modSlot))->Mod::GetContentPath(&contentPath,&local_54); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < local_54._capacity) { uVar12 = local_54._capacity + 1; - pvVar9 = (void *)local_54._buf._0_4_; + pvVar9 = (*(undefined4 *)((char *)&((void *)local_54._buf) + 0x0)); if (0xfff < uVar12) { - pvVar9 = *(void **)(local_54._buf._0_4_ + -4); + pvVar9 = *(void **)((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + -4); uVar12 = local_54._capacity + 0x24; - if (0x1f < (uint)(local_54._buf._0_4_ + (-4 - (int)pvVar9))) goto LAB_008f46dd; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_008f46dd; } operator_delete(pvVar9,uVar12); } psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } pbVar6 = FileSystem::ResolvePath((byte *)psVar7); if (pbVar6 != (byte *)0x0) { @@ -98,20 +98,20 @@ void ModManager::LoadModContent() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar12 = *(uint *)(pbVar6 + -4); qVar1 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar12; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar12; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar1 < uVar12); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar12)); free(pbVar6 + -4); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; } if (pbVar6 != (byte *)0x0) { psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } ((EntityConfig *)(&g_manager->_entityConfig))->EntityConfig::LoadEntities((byte *)psVar7,*(void **)modSlot); } @@ -120,14 +120,14 @@ void ModManager::LoadModContent() builtin_strncpy(local_54._buf,"items.xm",8); local_54._buf[8] = 'l'; local_54._buf[9] = '\0'; - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; psVar7 = ((Mod *)(*(void **)modSlot))->Mod::GetContentPath(&pathTmp,&local_54); if (&contentPath != psVar7) { ((std::string *)(contentPath._buf))->std::string::_Tidy_deallocate(); - contentPath._buf._0_4_ = *(undefined4 *)psVar7->_buf; - contentPath._buf._4_4_ = *(undefined4 *)(psVar7->_buf + 4); - contentPath._buf._8_4_ = *(undefined4 *)(psVar7->_buf + 8); - contentPath._buf._12_4_ = *(undefined4 *)(psVar7->_buf + 0xc); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) = *(undefined4 *)psVar7->_buf; + (*(undefined4 *)((char *)&(contentPath._buf) + 0x4)) = *(undefined4 *)(psVar7->_buf + 4); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x8)) = *(undefined4 *)(psVar7->_buf + 8); + (*(undefined4 *)((char *)&(contentPath._buf) + 0xc)) = *(undefined4 *)(psVar7->_buf + 0xc); contentPath._size = psVar7->_size; contentPath._capacity = psVar7->_capacity; psVar7->_size = 0; @@ -136,31 +136,31 @@ void ModManager::LoadModContent() } if (0xf < pathTmp._capacity) { uVar12 = pathTmp._capacity + 1; - psVar7 = (std_string *)pathTmp._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)pathTmp._buf) + 0x0)); if (0xfff < uVar12) { - psVar7 = (std_string *)((std_string *)(pathTmp._buf._0_4_ + -0x18))->_capacity; + psVar7 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)) + -0x18))->_capacity; uVar12 = pathTmp._capacity + 0x24; - if ((byte *)0x1f < (byte *)(pathTmp._buf._0_4_ + (-4 - (int)psVar7))) goto LAB_008f46dd; + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar7)))) goto LAB_008f46dd; } operator_delete(psVar7,uVar12); } - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; pathTmp._size = 0; pathTmp._capacity = 0xf; - pathTmp._buf._0_4_ = pathTmp._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)) = (*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)) & 0xffffff00; if (0xf < local_54._capacity) { uVar12 = local_54._capacity + 1; - pvVar9 = (void *)local_54._buf._0_4_; + pvVar9 = (*(undefined4 *)((char *)&((void *)local_54._buf) + 0x0)); if (0xfff < uVar12) { - pvVar9 = *(void **)(local_54._buf._0_4_ + -4); + pvVar9 = *(void **)((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + -4); uVar12 = local_54._capacity + 0x24; - if (0x1f < (uint)(local_54._buf._0_4_ + (-4 - (int)pvVar9))) goto LAB_008f46dd; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_008f46dd; } operator_delete(pvVar9,uVar12); } psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } pbVar6 = FileSystem::ResolvePath((byte *)psVar7); if (pbVar6 != (byte *)0x0) { @@ -168,20 +168,20 @@ void ModManager::LoadModContent() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar12 = *(uint *)(pbVar6 + -4); qVar1 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar12; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar12; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar1 < uVar12); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar12)); free(pbVar6 + -4); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; } if (pbVar6 != (byte *)0x0) { psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::Load((byte *)psVar7,*(void **)modSlot); } @@ -190,25 +190,25 @@ void ModManager::LoadModContent() local_54._size = 0x10; local_54._capacity = 0x1f; builtin_strncpy(pcVar8,"info_display.xml",0x11); - local_54._buf._0_4_ = pcVar8; - local_14._0_1_ = 6; + (*(undefined4 *)((char *)&(local_54._buf) + 0x0)) = pcVar8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; psVar7 = ((Mod *)(pvVar9))->Mod::GetContentPath(&pathTmp,&local_54); if (&contentPath != psVar7) { if (0xf < contentPath._capacity) { uVar12 = contentPath._capacity + 1; - psVar10 = (std_string *)contentPath._buf._0_4_; + psVar10 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); if (0xfff < uVar12) { - psVar10 = (std_string *)((std_string *)(contentPath._buf._0_4_ + -0x18))->_capacity; + psVar10 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + -0x18))->_capacity; uVar12 = contentPath._capacity + 0x24; - if ((byte *)0x1f < (byte *)(contentPath._buf._0_4_ + (-4 - (int)psVar10))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar10)))) goto LAB_008f46dd; } operator_delete(psVar10,uVar12); } - contentPath._buf._0_4_ = *(undefined4 *)psVar7->_buf; - contentPath._buf._4_4_ = *(undefined4 *)(psVar7->_buf + 4); - contentPath._buf._8_4_ = *(undefined4 *)(psVar7->_buf + 8); - contentPath._buf._12_4_ = *(undefined4 *)(psVar7->_buf + 0xc); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) = *(undefined4 *)psVar7->_buf; + (*(undefined4 *)((char *)&(contentPath._buf) + 0x4)) = *(undefined4 *)(psVar7->_buf + 4); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x8)) = *(undefined4 *)(psVar7->_buf + 8); + (*(undefined4 *)((char *)&(contentPath._buf) + 0xc)) = *(undefined4 *)(psVar7->_buf + 0xc); contentPath._size = psVar7->_size; contentPath._capacity = psVar7->_capacity; psVar7->_size = 0; @@ -217,31 +217,31 @@ void ModManager::LoadModContent() } if (0xf < pathTmp._capacity) { uVar12 = pathTmp._capacity + 1; - psVar7 = (std_string *)pathTmp._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)pathTmp._buf) + 0x0)); if (0xfff < uVar12) { - psVar7 = (std_string *)((std_string *)(pathTmp._buf._0_4_ + -0x18))->_capacity; + psVar7 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)) + -0x18))->_capacity; uVar12 = pathTmp._capacity + 0x24; - if ((byte *)0x1f < (byte *)(pathTmp._buf._0_4_ + (-4 - (int)psVar7))) goto LAB_008f46dd; + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar7)))) goto LAB_008f46dd; } operator_delete(psVar7,uVar12); } - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; pathTmp._size = 0; pathTmp._capacity = 0xf; - pathTmp._buf._0_4_ = pathTmp._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)) = (*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)) & 0xffffff00; if (0xf < local_54._capacity) { uVar12 = local_54._capacity + 1; - pvVar9 = (void *)local_54._buf._0_4_; + pvVar9 = (*(undefined4 *)((char *)&((void *)local_54._buf) + 0x0)); if (0xfff < uVar12) { - pvVar9 = *(void **)(local_54._buf._0_4_ + -4); + pvVar9 = *(void **)((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + -4); uVar12 = local_54._capacity + 0x24; - if (0x1f < (uint)(local_54._buf._0_4_ + (-4 - (int)pvVar9))) goto LAB_008f46dd; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_008f46dd; } operator_delete(pvVar9,uVar12); } psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } pbVar6 = FileSystem::ResolvePath((byte *)psVar7); if (pbVar6 != (byte *)0x0) { @@ -249,44 +249,44 @@ void ModManager::LoadModContent() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar12 = *(uint *)(pbVar6 + -4); qVar1 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar12; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar12; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar1 < uVar12); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar12)); free(pbVar6 + -4); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; } if (pbVar6 != (byte *)0x0) { psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } ((InfoDisplay *)(&g_manager->_infoDisplay))->InfoDisplay::load_xml((byte *)psVar7,*(void **)modSlot); } builtin_strncpy(local_54._buf,"pocketitems.xml",0x10); local_54._capacity = 0xf; local_54._size = 0xf; - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; psVar7 = ((Mod *)(*(void **)modSlot))->Mod::GetContentPath(&pathTmp,&local_54); if (&contentPath != psVar7) { if (0xf < contentPath._capacity) { uVar12 = contentPath._capacity + 1; - psVar10 = (std_string *)contentPath._buf._0_4_; + psVar10 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); if (0xfff < uVar12) { - psVar10 = (std_string *)((std_string *)(contentPath._buf._0_4_ + -0x18))->_capacity; + psVar10 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + -0x18))->_capacity; uVar12 = contentPath._capacity + 0x24; - if ((byte *)0x1f < (byte *)(contentPath._buf._0_4_ + (-4 - (int)psVar10))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar10)))) goto LAB_008f46dd; } operator_delete(psVar10,uVar12); } - contentPath._buf._0_4_ = *(undefined4 *)psVar7->_buf; - contentPath._buf._4_4_ = *(undefined4 *)(psVar7->_buf + 4); - contentPath._buf._8_4_ = *(undefined4 *)(psVar7->_buf + 8); - contentPath._buf._12_4_ = *(undefined4 *)(psVar7->_buf + 0xc); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) = *(undefined4 *)psVar7->_buf; + (*(undefined4 *)((char *)&(contentPath._buf) + 0x4)) = *(undefined4 *)(psVar7->_buf + 4); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x8)) = *(undefined4 *)(psVar7->_buf + 8); + (*(undefined4 *)((char *)&(contentPath._buf) + 0xc)) = *(undefined4 *)(psVar7->_buf + 0xc); contentPath._size = psVar7->_size; contentPath._capacity = psVar7->_capacity; psVar7->_size = 0; @@ -295,31 +295,31 @@ void ModManager::LoadModContent() } if (0xf < pathTmp._capacity) { uVar12 = pathTmp._capacity + 1; - psVar7 = (std_string *)pathTmp._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)pathTmp._buf) + 0x0)); if (0xfff < uVar12) { - psVar7 = (std_string *)((std_string *)(pathTmp._buf._0_4_ + -0x18))->_capacity; + psVar7 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)) + -0x18))->_capacity; uVar12 = pathTmp._capacity + 0x24; - if ((byte *)0x1f < (byte *)(pathTmp._buf._0_4_ + (-4 - (int)psVar7))) goto LAB_008f46dd; + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar7)))) goto LAB_008f46dd; } operator_delete(psVar7,uVar12); } - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; pathTmp._size = 0; pathTmp._capacity = 0xf; - pathTmp._buf._0_4_ = pathTmp._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)) = (*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)) & 0xffffff00; if (0xf < local_54._capacity) { uVar12 = local_54._capacity + 1; - pvVar9 = (void *)local_54._buf._0_4_; + pvVar9 = (*(undefined4 *)((char *)&((void *)local_54._buf) + 0x0)); if (0xfff < uVar12) { - pvVar9 = *(void **)(local_54._buf._0_4_ + -4); + pvVar9 = *(void **)((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + -4); uVar12 = local_54._capacity + 0x24; - if (0x1f < (uint)(local_54._buf._0_4_ + (-4 - (int)pvVar9))) goto LAB_008f46dd; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_008f46dd; } operator_delete(pvVar9,uVar12); } psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } pbVar6 = FileSystem::ResolvePath((byte *)psVar7); if (pbVar6 != (byte *)0x0) { @@ -327,20 +327,20 @@ void ModManager::LoadModContent() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar12 = *(uint *)(pbVar6 + -4); qVar1 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar12; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar12; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar1 < uVar12); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar12)); free(pbVar6 + -4); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; } if (pbVar6 != (byte *)0x0) { psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::load_pocketitems_xml((byte *)psVar7,*(void **)modSlot) ; @@ -348,24 +348,24 @@ void ModManager::LoadModContent() builtin_strncpy(local_54._buf,"costumes2.xml",0xe); local_54._capacity = 0xf; local_54._size = 0xd; - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; psVar7 = ((Mod *)(*(void **)modSlot))->Mod::GetContentPath(&pathTmp,&local_54); if (&contentPath != psVar7) { if (0xf < contentPath._capacity) { uVar12 = contentPath._capacity + 1; - psVar10 = (std_string *)contentPath._buf._0_4_; + psVar10 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); if (0xfff < uVar12) { - psVar10 = (std_string *)((std_string *)(contentPath._buf._0_4_ + -0x18))->_capacity; + psVar10 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + -0x18))->_capacity; uVar12 = contentPath._capacity + 0x24; - if ((byte *)0x1f < (byte *)(contentPath._buf._0_4_ + (-4 - (int)psVar10))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar10)))) goto LAB_008f46dd; } operator_delete(psVar10,uVar12); } - contentPath._buf._0_4_ = *(undefined4 *)psVar7->_buf; - contentPath._buf._4_4_ = *(undefined4 *)(psVar7->_buf + 4); - contentPath._buf._8_4_ = *(undefined4 *)(psVar7->_buf + 8); - contentPath._buf._12_4_ = *(undefined4 *)(psVar7->_buf + 0xc); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) = *(undefined4 *)psVar7->_buf; + (*(undefined4 *)((char *)&(contentPath._buf) + 0x4)) = *(undefined4 *)(psVar7->_buf + 4); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x8)) = *(undefined4 *)(psVar7->_buf + 8); + (*(undefined4 *)((char *)&(contentPath._buf) + 0xc)) = *(undefined4 *)(psVar7->_buf + 0xc); contentPath._size = psVar7->_size; contentPath._capacity = psVar7->_capacity; psVar7->_size = 0; @@ -374,66 +374,66 @@ void ModManager::LoadModContent() } if (0xf < pathTmp._capacity) { uVar12 = pathTmp._capacity + 1; - psVar7 = (std_string *)pathTmp._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)pathTmp._buf) + 0x0)); if (0xfff < uVar12) { - psVar7 = (std_string *)((std_string *)(pathTmp._buf._0_4_ + -0x18))->_capacity; + psVar7 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)) + -0x18))->_capacity; uVar12 = pathTmp._capacity + 0x24; - if ((byte *)0x1f < (byte *)(pathTmp._buf._0_4_ + (-4 - (int)psVar7))) goto LAB_008f46dd; + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar7)))) goto LAB_008f46dd; } operator_delete(psVar7,uVar12); } - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; pathTmp._size = 0; pathTmp._capacity = 0xf; - pathTmp._buf._0_4_ = pathTmp._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)) = (*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)) & 0xffffff00; if (0xf < local_54._capacity) { uVar12 = local_54._capacity + 1; - pvVar9 = (void *)local_54._buf._0_4_; + pvVar9 = (*(undefined4 *)((char *)&((void *)local_54._buf) + 0x0)); if (0xfff < uVar12) { - pvVar9 = *(void **)(local_54._buf._0_4_ + -4); + pvVar9 = *(void **)((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + -4); uVar12 = local_54._capacity + 0x24; - if (0x1f < (uint)(local_54._buf._0_4_ + (-4 - (int)pvVar9))) goto LAB_008f46dd; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_008f46dd; } operator_delete(pvVar9,uVar12); } psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } pbVar6 = FileSystem::ResolvePath((byte *)psVar7); if (pbVar6 != (byte *)0x0) { - local_14._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; tracked_alloc(1,pbVar6,0); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::load_costumes_xml((byte *)psVar7,*(void **)modSlot); } pvVar9 = *(void **)modSlot; local_54._size = 0; local_54._capacity = 0xf; - local_54._buf._0_8_ = local_54._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) = (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(local_54._buf))->std::string::assign((byte *)"items_metadata.xml",0x12); - local_14._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; psVar7 = ((Mod *)(pvVar9))->Mod::GetContentPath(&local_84,&local_54); if (&contentPath != psVar7) { if (0xf < contentPath._capacity) { uVar12 = contentPath._capacity + 1; - psVar10 = (std_string *)contentPath._buf._0_4_; + psVar10 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); if (0xfff < uVar12) { - psVar10 = (std_string *)((std_string *)(contentPath._buf._0_4_ + -0x18))->_capacity; + psVar10 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + -0x18))->_capacity; uVar12 = contentPath._capacity + 0x24; - if ((byte *)0x1f < (byte *)(contentPath._buf._0_4_ + (-4 - (int)psVar10))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar10)))) goto LAB_008f46dd; } operator_delete(psVar10,uVar12); } - contentPath._buf._0_4_ = *(undefined4 *)psVar7->_buf; - contentPath._buf._4_4_ = *(undefined4 *)(psVar7->_buf + 4); - contentPath._buf._8_4_ = *(undefined4 *)(psVar7->_buf + 8); - contentPath._buf._12_4_ = *(undefined4 *)(psVar7->_buf + 0xc); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) = *(undefined4 *)psVar7->_buf; + (*(undefined4 *)((char *)&(contentPath._buf) + 0x4)) = *(undefined4 *)(psVar7->_buf + 4); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x8)) = *(undefined4 *)(psVar7->_buf + 8); + (*(undefined4 *)((char *)&(contentPath._buf) + 0xc)) = *(undefined4 *)(psVar7->_buf + 0xc); contentPath._size = psVar7->_size; contentPath._capacity = psVar7->_capacity; psVar7->_size = 0; @@ -441,55 +441,55 @@ void ModManager::LoadModContent() psVar7->_buf[0] = '\0'; } ((std::string *)(local_84._buf))->std::string::_Tidy_deallocate(); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < local_54._capacity) { uVar12 = local_54._capacity + 1; - pvVar9 = (void *)local_54._buf._0_4_; + pvVar9 = (*(undefined4 *)((char *)&((void *)local_54._buf) + 0x0)); if (0xfff < uVar12) { - pvVar9 = *(void **)(local_54._buf._0_4_ + -4); + pvVar9 = *(void **)((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + -4); uVar12 = local_54._capacity + 0x24; - if (0x1f < (uint)(local_54._buf._0_4_ + (-4 - (int)pvVar9))) goto LAB_008f46dd; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_008f46dd; } operator_delete(pvVar9,uVar12); } psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } pbVar6 = FileSystem::ResolvePath((byte *)psVar7); if (pbVar6 != (byte *)0x0) { - local_14._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xd; tracked_alloc(1,pbVar6,0); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::load_metadata_xml((byte *)psVar7,*(void **)modSlot); } pvVar9 = *(void **)modSlot; local_54._size = 0; local_54._capacity = 0xf; - local_54._buf._0_8_ = local_54._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) = (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(local_54._buf))->std::string::assign((byte *)"wisps.xml",9); - local_14._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xe; psVar7 = ((Mod *)(pvVar9))->Mod::GetContentPath(&local_84,&local_54); if (&contentPath != psVar7) { if (0xf < contentPath._capacity) { uVar12 = contentPath._capacity + 1; - psVar10 = (std_string *)contentPath._buf._0_4_; + psVar10 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); if (0xfff < uVar12) { - psVar10 = (std_string *)((std_string *)(contentPath._buf._0_4_ + -0x18))->_capacity; + psVar10 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + -0x18))->_capacity; uVar12 = contentPath._capacity + 0x24; - if ((byte *)0x1f < (byte *)(contentPath._buf._0_4_ + (-4 - (int)psVar10))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar10)))) goto LAB_008f46dd; } operator_delete(psVar10,uVar12); } - contentPath._buf._0_4_ = *(undefined4 *)psVar7->_buf; - contentPath._buf._4_4_ = *(undefined4 *)(psVar7->_buf + 4); - contentPath._buf._8_4_ = *(undefined4 *)(psVar7->_buf + 8); - contentPath._buf._12_4_ = *(undefined4 *)(psVar7->_buf + 0xc); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) = *(undefined4 *)psVar7->_buf; + (*(undefined4 *)((char *)&(contentPath._buf) + 0x4)) = *(undefined4 *)(psVar7->_buf + 4); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x8)) = *(undefined4 *)(psVar7->_buf + 8); + (*(undefined4 *)((char *)&(contentPath._buf) + 0xc)) = *(undefined4 *)(psVar7->_buf + 0xc); contentPath._size = psVar7->_size; contentPath._capacity = psVar7->_capacity; psVar7->_size = 0; @@ -497,55 +497,55 @@ void ModManager::LoadModContent() psVar7->_buf[0] = '\0'; } ((std::string *)(local_84._buf))->std::string::_Tidy_deallocate(); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < local_54._capacity) { uVar12 = local_54._capacity + 1; - pvVar9 = (void *)local_54._buf._0_4_; + pvVar9 = (*(undefined4 *)((char *)&((void *)local_54._buf) + 0x0)); if (0xfff < uVar12) { - pvVar9 = *(void **)(local_54._buf._0_4_ + -4); + pvVar9 = *(void **)((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + -4); uVar12 = local_54._capacity + 0x24; - if (0x1f < (uint)(local_54._buf._0_4_ + (-4 - (int)pvVar9))) goto LAB_008f46dd; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_008f46dd; } operator_delete(pvVar9,uVar12); } psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } pbVar6 = FileSystem::ResolvePath((byte *)psVar7); if (pbVar6 != (byte *)0x0) { - local_14._0_1_ = 0xf; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xf; tracked_alloc(1,pbVar6,0); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::load_wisps_xml((byte *)psVar7,*(void **)modSlot); } pvVar9 = *(void **)modSlot; local_54._size = 0; local_54._capacity = 0xf; - local_54._buf._0_8_ = local_54._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) = (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(local_54._buf))->std::string::assign((byte *)"locusts.xml",0xb); - local_14._0_1_ = 0x10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x10; psVar7 = ((Mod *)(pvVar9))->Mod::GetContentPath(&local_84,&local_54); if (&contentPath != psVar7) { if (0xf < contentPath._capacity) { uVar12 = contentPath._capacity + 1; - psVar10 = (std_string *)contentPath._buf._0_4_; + psVar10 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); if (0xfff < uVar12) { - psVar10 = (std_string *)((std_string *)(contentPath._buf._0_4_ + -0x18))->_capacity; + psVar10 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + -0x18))->_capacity; uVar12 = contentPath._capacity + 0x24; - if ((byte *)0x1f < (byte *)(contentPath._buf._0_4_ + (-4 - (int)psVar10))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar10)))) goto LAB_008f46dd; } operator_delete(psVar10,uVar12); } - contentPath._buf._0_4_ = *(undefined4 *)psVar7->_buf; - contentPath._buf._4_4_ = *(undefined4 *)(psVar7->_buf + 4); - contentPath._buf._8_4_ = *(undefined4 *)(psVar7->_buf + 8); - contentPath._buf._12_4_ = *(undefined4 *)(psVar7->_buf + 0xc); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) = *(undefined4 *)psVar7->_buf; + (*(undefined4 *)((char *)&(contentPath._buf) + 0x4)) = *(undefined4 *)(psVar7->_buf + 4); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x8)) = *(undefined4 *)(psVar7->_buf + 8); + (*(undefined4 *)((char *)&(contentPath._buf) + 0xc)) = *(undefined4 *)(psVar7->_buf + 0xc); contentPath._size = psVar7->_size; contentPath._capacity = psVar7->_capacity; psVar7->_size = 0; @@ -553,29 +553,29 @@ void ModManager::LoadModContent() psVar7->_buf[0] = '\0'; } ((std::string *)(local_84._buf))->std::string::_Tidy_deallocate(); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < local_54._capacity) { uVar12 = local_54._capacity + 1; - pvVar9 = (void *)local_54._buf._0_4_; + pvVar9 = (*(undefined4 *)((char *)&((void *)local_54._buf) + 0x0)); if (0xfff < uVar12) { - pvVar9 = *(void **)(local_54._buf._0_4_ + -4); + pvVar9 = *(void **)((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + -4); uVar12 = local_54._capacity + 0x24; - if (0x1f < (uint)(local_54._buf._0_4_ + (-4 - (int)pvVar9))) goto LAB_008f46dd; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_008f46dd; } operator_delete(pvVar9,uVar12); } psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } pbVar6 = FileSystem::ResolvePath((byte *)psVar7); if (pbVar6 != (byte *)0x0) { - local_14._0_1_ = 0x11; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x11; tracked_alloc(1,pbVar6,0); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::LoadLocustConfig((byte *)psVar7,*(ModEntry **)modSlot) ; @@ -583,26 +583,26 @@ void ModManager::LoadModContent() pvVar9 = *(void **)modSlot; local_54._size = 0; local_54._capacity = 0xf; - local_54._buf._0_8_ = local_54._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) = (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(local_54._buf))->std::string::assign((byte *)"recipes.xml",0xb); - local_14._0_1_ = 0x12; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x12; psVar7 = ((Mod *)(pvVar9))->Mod::GetContentPath(&local_84,&local_54); if (&contentPath != psVar7) { if (0xf < contentPath._capacity) { uVar12 = contentPath._capacity + 1; - psVar10 = (std_string *)contentPath._buf._0_4_; + psVar10 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); if (0xfff < uVar12) { - psVar10 = (std_string *)((std_string *)(contentPath._buf._0_4_ + -0x18))->_capacity; + psVar10 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + -0x18))->_capacity; uVar12 = contentPath._capacity + 0x24; - if ((byte *)0x1f < (byte *)(contentPath._buf._0_4_ + (-4 - (int)psVar10))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar10)))) goto LAB_008f46dd; } operator_delete(psVar10,uVar12); } - contentPath._buf._0_4_ = *(undefined4 *)psVar7->_buf; - contentPath._buf._4_4_ = *(undefined4 *)(psVar7->_buf + 4); - contentPath._buf._8_4_ = *(undefined4 *)(psVar7->_buf + 8); - contentPath._buf._12_4_ = *(undefined4 *)(psVar7->_buf + 0xc); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) = *(undefined4 *)psVar7->_buf; + (*(undefined4 *)((char *)&(contentPath._buf) + 0x4)) = *(undefined4 *)(psVar7->_buf + 4); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x8)) = *(undefined4 *)(psVar7->_buf + 8); + (*(undefined4 *)((char *)&(contentPath._buf) + 0xc)) = *(undefined4 *)(psVar7->_buf + 0xc); contentPath._size = psVar7->_size; contentPath._capacity = psVar7->_capacity; psVar7->_size = 0; @@ -610,55 +610,55 @@ void ModManager::LoadModContent() psVar7->_buf[0] = '\0'; } ((std::string *)(local_84._buf))->std::string::_Tidy_deallocate(); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < local_54._capacity) { uVar12 = local_54._capacity + 1; - pvVar9 = (void *)local_54._buf._0_4_; + pvVar9 = (*(undefined4 *)((char *)&((void *)local_54._buf) + 0x0)); if (0xfff < uVar12) { - pvVar9 = *(void **)(local_54._buf._0_4_ + -4); + pvVar9 = *(void **)((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + -4); uVar12 = local_54._capacity + 0x24; - if (0x1f < (uint)(local_54._buf._0_4_ + (-4 - (int)pvVar9))) goto LAB_008f46dd; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_008f46dd; } operator_delete(pvVar9,uVar12); } psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } pbVar6 = FileSystem::ResolvePath((byte *)psVar7); if (pbVar6 != (byte *)0x0) { - local_14._0_1_ = 0x13; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x13; tracked_alloc(1,pbVar6,0); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::load_recipes_xml((byte *)psVar7,*(void **)modSlot); } pvVar9 = *(void **)modSlot; local_54._size = 0; local_54._capacity = 0xf; - local_54._buf._0_8_ = local_54._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) = (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(local_54._buf))->std::string::assign((byte *)"bombcostumes.xml",0x10); - local_14._0_1_ = 0x14; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x14; psVar7 = ((Mod *)(pvVar9))->Mod::GetContentPath(&local_84,&local_54); if (&contentPath != psVar7) { if (0xf < contentPath._capacity) { uVar12 = contentPath._capacity + 1; - psVar10 = (std_string *)contentPath._buf._0_4_; + psVar10 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); if (0xfff < uVar12) { - psVar10 = (std_string *)((std_string *)(contentPath._buf._0_4_ + -0x18))->_capacity; + psVar10 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + -0x18))->_capacity; uVar12 = contentPath._capacity + 0x24; - if ((byte *)0x1f < (byte *)(contentPath._buf._0_4_ + (-4 - (int)psVar10))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar10)))) goto LAB_008f46dd; } operator_delete(psVar10,uVar12); } - contentPath._buf._0_4_ = *(undefined4 *)psVar7->_buf; - contentPath._buf._4_4_ = *(undefined4 *)(psVar7->_buf + 4); - contentPath._buf._8_4_ = *(undefined4 *)(psVar7->_buf + 8); - contentPath._buf._12_4_ = *(undefined4 *)(psVar7->_buf + 0xc); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) = *(undefined4 *)psVar7->_buf; + (*(undefined4 *)((char *)&(contentPath._buf) + 0x4)) = *(undefined4 *)(psVar7->_buf + 4); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x8)) = *(undefined4 *)(psVar7->_buf + 8); + (*(undefined4 *)((char *)&(contentPath._buf) + 0xc)) = *(undefined4 *)(psVar7->_buf + 0xc); contentPath._size = psVar7->_size; contentPath._capacity = psVar7->_capacity; psVar7->_size = 0; @@ -666,55 +666,55 @@ void ModManager::LoadModContent() psVar7->_buf[0] = '\0'; } ((std::string *)(local_84._buf))->std::string::_Tidy_deallocate(); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < local_54._capacity) { uVar12 = local_54._capacity + 1; - pvVar9 = (void *)local_54._buf._0_4_; + pvVar9 = (*(undefined4 *)((char *)&((void *)local_54._buf) + 0x0)); if (0xfff < uVar12) { - pvVar9 = *(void **)(local_54._buf._0_4_ + -4); + pvVar9 = *(void **)((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + -4); uVar12 = local_54._capacity + 0x24; - if (0x1f < (uint)(local_54._buf._0_4_ + (-4 - (int)pvVar9))) goto LAB_008f46dd; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_008f46dd; } operator_delete(pvVar9,uVar12); } psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } pbVar6 = FileSystem::ResolvePath((byte *)psVar7); if (pbVar6 != (byte *)0x0) { - local_14._0_1_ = 0x15; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x15; tracked_alloc(1,pbVar6,0); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::LoadBombCostumes((byte *)psVar7,1); } pvVar9 = *(void **)modSlot; local_54._size = 0; local_54._capacity = 0xf; - local_54._buf._0_8_ = local_54._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) = (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(local_54._buf))->std::string::assign((byte *)"challenges.xml",0xe); - local_14._0_1_ = 0x16; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x16; psVar7 = ((Mod *)(pvVar9))->Mod::GetContentPath(&local_84,&local_54); if (&contentPath != psVar7) { if (0xf < contentPath._capacity) { uVar12 = contentPath._capacity + 1; - psVar10 = (std_string *)contentPath._buf._0_4_; + psVar10 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); if (0xfff < uVar12) { - psVar10 = (std_string *)((std_string *)(contentPath._buf._0_4_ + -0x18))->_capacity; + psVar10 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + -0x18))->_capacity; uVar12 = contentPath._capacity + 0x24; - if ((byte *)0x1f < (byte *)(contentPath._buf._0_4_ + (-4 - (int)psVar10))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar10)))) goto LAB_008f46dd; } operator_delete(psVar10,uVar12); } - contentPath._buf._0_4_ = *(undefined4 *)psVar7->_buf; - contentPath._buf._4_4_ = *(undefined4 *)(psVar7->_buf + 4); - contentPath._buf._8_4_ = *(undefined4 *)(psVar7->_buf + 8); - contentPath._buf._12_4_ = *(undefined4 *)(psVar7->_buf + 0xc); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) = *(undefined4 *)psVar7->_buf; + (*(undefined4 *)((char *)&(contentPath._buf) + 0x4)) = *(undefined4 *)(psVar7->_buf + 4); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x8)) = *(undefined4 *)(psVar7->_buf + 8); + (*(undefined4 *)((char *)&(contentPath._buf) + 0xc)) = *(undefined4 *)(psVar7->_buf + 0xc); contentPath._size = psVar7->_size; contentPath._capacity = psVar7->_capacity; psVar7->_size = 0; @@ -722,55 +722,55 @@ void ModManager::LoadModContent() psVar7->_buf[0] = '\0'; } ((std::string *)(local_84._buf))->std::string::_Tidy_deallocate(); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < local_54._capacity) { uVar12 = local_54._capacity + 1; - pvVar9 = (void *)local_54._buf._0_4_; + pvVar9 = (*(undefined4 *)((char *)&((void *)local_54._buf) + 0x0)); if (0xfff < uVar12) { - pvVar9 = *(void **)(local_54._buf._0_4_ + -4); + pvVar9 = *(void **)((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + -4); uVar12 = local_54._capacity + 0x24; - if (0x1f < (uint)(local_54._buf._0_4_ + (-4 - (int)pvVar9))) goto LAB_008f46dd; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_008f46dd; } operator_delete(pvVar9,uVar12); } psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } pbVar6 = FileSystem::ResolvePath((byte *)psVar7); if (pbVar6 != (byte *)0x0) { - local_14._0_1_ = 0x17; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x17; tracked_alloc(1,pbVar6,0); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } challenges_xml_load(g_manager,(byte *)psVar7,1); } pvVar9 = *(void **)modSlot; local_54._size = 0; local_54._capacity = 0xf; - local_54._buf._0_8_ = local_54._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) = (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(local_54._buf))->std::string::assign((byte *)"players.xml",0xb); - local_14._0_1_ = 0x18; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x18; psVar7 = ((Mod *)(pvVar9))->Mod::GetContentPath(&local_84,&local_54); if (&contentPath != psVar7) { if (0xf < contentPath._capacity) { uVar12 = contentPath._capacity + 1; - psVar10 = (std_string *)contentPath._buf._0_4_; + psVar10 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); if (0xfff < uVar12) { - psVar10 = (std_string *)((std_string *)(contentPath._buf._0_4_ + -0x18))->_capacity; + psVar10 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + -0x18))->_capacity; uVar12 = contentPath._capacity + 0x24; - if ((byte *)0x1f < (byte *)(contentPath._buf._0_4_ + (-4 - (int)psVar10))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar10)))) goto LAB_008f46dd; } operator_delete(psVar10,uVar12); } - contentPath._buf._0_4_ = *(undefined4 *)psVar7->_buf; - contentPath._buf._4_4_ = *(undefined4 *)(psVar7->_buf + 4); - contentPath._buf._8_4_ = *(undefined4 *)(psVar7->_buf + 8); - contentPath._buf._12_4_ = *(undefined4 *)(psVar7->_buf + 0xc); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) = *(undefined4 *)psVar7->_buf; + (*(undefined4 *)((char *)&(contentPath._buf) + 0x4)) = *(undefined4 *)(psVar7->_buf + 4); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x8)) = *(undefined4 *)(psVar7->_buf + 8); + (*(undefined4 *)((char *)&(contentPath._buf) + 0xc)) = *(undefined4 *)(psVar7->_buf + 0xc); contentPath._size = psVar7->_size; contentPath._capacity = psVar7->_capacity; psVar7->_size = 0; @@ -778,29 +778,29 @@ void ModManager::LoadModContent() psVar7->_buf[0] = '\0'; } ((std::string *)(local_84._buf))->std::string::_Tidy_deallocate(); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < local_54._capacity) { uVar12 = local_54._capacity + 1; - pvVar9 = (void *)local_54._buf._0_4_; + pvVar9 = (*(undefined4 *)((char *)&((void *)local_54._buf) + 0x0)); if (0xfff < uVar12) { - pvVar9 = *(void **)(local_54._buf._0_4_ + -4); + pvVar9 = *(void **)((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + -4); uVar12 = local_54._capacity + 0x24; - if (0x1f < (uint)(local_54._buf._0_4_ + (-4 - (int)pvVar9))) goto LAB_008f46dd; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_008f46dd; } operator_delete(pvVar9,uVar12); } psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } pbVar6 = FileSystem::ResolvePath((byte *)psVar7); if (pbVar6 != (byte *)0x0) { - local_14._0_1_ = 0x19; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x19; tracked_alloc(1,pbVar6,0); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } ((EntityConfig *)(&g_manager->_entityConfig))->EntityConfig::load_players_xml((byte *)psVar7,*(void **)modSlot) ; @@ -808,26 +808,26 @@ void ModManager::LoadModContent() pvVar9 = *(void **)modSlot; local_54._size = 0; local_54._capacity = 0xf; - local_54._buf._0_8_ = local_54._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) = (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(local_54._buf))->std::string::assign((byte *)"sounds.xml",10); - local_14._0_1_ = 0x1a; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1a; psVar7 = ((Mod *)(pvVar9))->Mod::GetContentPath(&local_84,&local_54); if (&contentPath != psVar7) { if (0xf < contentPath._capacity) { uVar12 = contentPath._capacity + 1; - psVar10 = (std_string *)contentPath._buf._0_4_; + psVar10 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); if (0xfff < uVar12) { - psVar10 = (std_string *)((std_string *)(contentPath._buf._0_4_ + -0x18))->_capacity; + psVar10 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + -0x18))->_capacity; uVar12 = contentPath._capacity + 0x24; - if ((byte *)0x1f < (byte *)(contentPath._buf._0_4_ + (-4 - (int)psVar10))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar10)))) goto LAB_008f46dd; } operator_delete(psVar10,uVar12); } - contentPath._buf._0_4_ = *(undefined4 *)psVar7->_buf; - contentPath._buf._4_4_ = *(undefined4 *)(psVar7->_buf + 4); - contentPath._buf._8_4_ = *(undefined4 *)(psVar7->_buf + 8); - contentPath._buf._12_4_ = *(undefined4 *)(psVar7->_buf + 0xc); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) = *(undefined4 *)psVar7->_buf; + (*(undefined4 *)((char *)&(contentPath._buf) + 0x4)) = *(undefined4 *)(psVar7->_buf + 4); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x8)) = *(undefined4 *)(psVar7->_buf + 8); + (*(undefined4 *)((char *)&(contentPath._buf) + 0xc)) = *(undefined4 *)(psVar7->_buf + 0xc); contentPath._size = psVar7->_size; contentPath._capacity = psVar7->_capacity; psVar7->_size = 0; @@ -835,55 +835,55 @@ void ModManager::LoadModContent() psVar7->_buf[0] = '\0'; } ((std::string *)(local_84._buf))->std::string::_Tidy_deallocate(); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < local_54._capacity) { uVar12 = local_54._capacity + 1; - pvVar9 = (void *)local_54._buf._0_4_; + pvVar9 = (*(undefined4 *)((char *)&((void *)local_54._buf) + 0x0)); if (0xfff < uVar12) { - pvVar9 = *(void **)(local_54._buf._0_4_ + -4); + pvVar9 = *(void **)((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + -4); uVar12 = local_54._capacity + 0x24; - if (0x1f < (uint)(local_54._buf._0_4_ + (-4 - (int)pvVar9))) goto LAB_008f46dd; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_008f46dd; } operator_delete(pvVar9,uVar12); } psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } pbVar6 = FileSystem::ResolvePath((byte *)psVar7); if (pbVar6 != (byte *)0x0) { - local_14._0_1_ = 0x1b; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1b; tracked_alloc(1,pbVar6,0); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } ((SFXManager *)(&g_manager->_sfxManager))->SFXManager::load_xml((byte *)psVar7,1); } pvVar9 = *(void **)modSlot; local_54._size = 0; local_54._capacity = 0xf; - local_54._buf._0_8_ = local_54._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) = (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(local_54._buf))->std::string::assign((byte *)"music.xml",9); - local_14._0_1_ = 0x1c; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1c; psVar7 = ((Mod *)(pvVar9))->Mod::GetContentPath(&local_84,&local_54); if (&contentPath != psVar7) { if (0xf < contentPath._capacity) { uVar12 = contentPath._capacity + 1; - psVar10 = (std_string *)contentPath._buf._0_4_; + psVar10 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); if (0xfff < uVar12) { - psVar10 = (std_string *)((std_string *)(contentPath._buf._0_4_ + -0x18))->_capacity; + psVar10 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + -0x18))->_capacity; uVar12 = contentPath._capacity + 0x24; - if ((byte *)0x1f < (byte *)(contentPath._buf._0_4_ + (-4 - (int)psVar10))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar10)))) goto LAB_008f46dd; } operator_delete(psVar10,uVar12); } - contentPath._buf._0_4_ = *(undefined4 *)psVar7->_buf; - contentPath._buf._4_4_ = *(undefined4 *)(psVar7->_buf + 4); - contentPath._buf._8_4_ = *(undefined4 *)(psVar7->_buf + 8); - contentPath._buf._12_4_ = *(undefined4 *)(psVar7->_buf + 0xc); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) = *(undefined4 *)psVar7->_buf; + (*(undefined4 *)((char *)&(contentPath._buf) + 0x4)) = *(undefined4 *)(psVar7->_buf + 4); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x8)) = *(undefined4 *)(psVar7->_buf + 8); + (*(undefined4 *)((char *)&(contentPath._buf) + 0xc)) = *(undefined4 *)(psVar7->_buf + 0xc); contentPath._size = psVar7->_size; contentPath._capacity = psVar7->_capacity; psVar7->_size = 0; @@ -891,52 +891,52 @@ void ModManager::LoadModContent() psVar7->_buf[0] = '\0'; } ((std::string *)(local_84._buf))->std::string::_Tidy_deallocate(); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < local_54._capacity) { uVar12 = local_54._capacity + 1; - pvVar9 = (void *)local_54._buf._0_4_; + pvVar9 = (*(undefined4 *)((char *)&((void *)local_54._buf) + 0x0)); if (0xfff < uVar12) { - pvVar9 = *(void **)(local_54._buf._0_4_ + -4); + pvVar9 = *(void **)((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + -4); uVar12 = local_54._capacity + 0x24; - if (0x1f < (uint)(local_54._buf._0_4_ + (-4 - (int)pvVar9))) goto LAB_008f46dd; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_008f46dd; } operator_delete(pvVar9,uVar12); } psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } isFileFound = file_exists((byte *)psVar7); if (isFileFound != 0) { psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } ((Music *)((Music *)&g_manager->_musicManager))->Music::LoadConfig((byte *)psVar7,1); } pvVar9 = *(void **)modSlot; local_54._size = 0; local_54._capacity = 0xf; - local_54._buf._0_8_ = local_54._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) = (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(local_54._buf))->std::string::assign((byte *)"nightmares.xml",0xe); - local_14._0_1_ = 0x1d; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1d; psVar7 = ((Mod *)(pvVar9))->Mod::GetContentPath(&local_84,&local_54); if (&contentPath != psVar7) { if (0xf < contentPath._capacity) { uVar12 = contentPath._capacity + 1; - psVar10 = (std_string *)contentPath._buf._0_4_; + psVar10 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); if (0xfff < uVar12) { - psVar10 = (std_string *)((std_string *)(contentPath._buf._0_4_ + -0x18))->_capacity; + psVar10 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + -0x18))->_capacity; uVar12 = contentPath._capacity + 0x24; - if ((byte *)0x1f < (byte *)(contentPath._buf._0_4_ + (-4 - (int)psVar10))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar10)))) goto LAB_008f46dd; } operator_delete(psVar10,uVar12); } - contentPath._buf._0_4_ = *(undefined4 *)psVar7->_buf; - contentPath._buf._4_4_ = *(undefined4 *)(psVar7->_buf + 4); - contentPath._buf._8_4_ = *(undefined4 *)(psVar7->_buf + 8); - contentPath._buf._12_4_ = *(undefined4 *)(psVar7->_buf + 0xc); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) = *(undefined4 *)psVar7->_buf; + (*(undefined4 *)((char *)&(contentPath._buf) + 0x4)) = *(undefined4 *)(psVar7->_buf + 4); + (*(undefined4 *)((char *)&(contentPath._buf) + 0x8)) = *(undefined4 *)(psVar7->_buf + 8); + (*(undefined4 *)((char *)&(contentPath._buf) + 0xc)) = *(undefined4 *)(psVar7->_buf + 0xc); contentPath._size = psVar7->_size; contentPath._capacity = psVar7->_capacity; psVar7->_size = 0; @@ -944,63 +944,63 @@ void ModManager::LoadModContent() psVar7->_buf[0] = '\0'; } ((std::string *)(local_84._buf))->std::string::_Tidy_deallocate(); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < local_54._capacity) { uVar12 = local_54._capacity + 1; - pvVar9 = (void *)local_54._buf._0_4_; + pvVar9 = (*(undefined4 *)((char *)&((void *)local_54._buf) + 0x0)); if (0xfff < uVar12) { - pvVar9 = *(void **)(local_54._buf._0_4_ + -4); + pvVar9 = *(void **)((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + -4); uVar12 = local_54._capacity + 0x24; - if (0x1f < (uint)(local_54._buf._0_4_ + (-4 - (int)pvVar9))) goto LAB_008f46dd; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_008f46dd; } operator_delete(pvVar9,uVar12); } psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } isFileFound = file_exists((byte *)psVar7); if (isFileFound != 0) { psVar7 = &contentPath; if (0xf < contentPath._capacity) { - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); } ((NightmareScene *)(&g_manager->_nightmareScene))->NightmareScene::load_nightmares_xml((byte *)psVar7); } pbVar6 = *(byte **)modSlot; local_54._size = 0; local_54._capacity = 0xf; - local_54._buf._0_8_ = local_54._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) = (*(undefined8 *)((char *)&(local_54._buf) + 0x0)) & 0xffffffff00000000; pbVar4 = g_modsDirectory; do { pbVar11 = pbVar4; pbVar4 = pbVar11 + 1; } while (*pbVar11 != 0); - ((std::string *)(local_54._buf))->std::string::assign(g_modsDirectory,(uint)(pbVar11 + -0xc72e28)); - local_14._0_1_ = 0x1e; + ((std::string *)(local_54._buf))->std::string::assign(g_modsDirectory,GHIDRA_UINT((pbVar11 + -0xc72e28))); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1e; dirNameSize = (uint *)(pbVar6 + 0x10); if (0xf < *(uint *)(pbVar6 + 0x14)) { pbVar6 = *(byte **)pbVar6; } pvVar9 = ((std::string *)(local_54._buf))->std::string::append(pbVar6,*dirNameSize); FUN_00417100(pvVar9); - local_14._0_1_ = 0x1f; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1f; pvVar9 = ((std::string *)(local_84._buf))->std::string::append((byte *)"/main.lua",9); FUN_00417100(pvVar9); if (0xf < contentPath._capacity) { uVar12 = contentPath._capacity + 1; - psVar7 = (std_string *)contentPath._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)contentPath._buf) + 0x0)); if (0xfff < uVar12) { - psVar7 = (std_string *)((std_string *)(contentPath._buf._0_4_ + -0x18))->_capacity; + psVar7 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + -0x18))->_capacity; uVar12 = contentPath._capacity + 0x24; - if ((byte *)0x1f < (byte *)(contentPath._buf._0_4_ + (-4 - (int)psVar7))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(contentPath._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar7)))) goto LAB_008f46dd; } operator_delete(psVar7,uVar12); } - uVar2 = pathTmp._buf._0_4_; - pathTmp._buf._0_4_ = pathTmp._buf._0_4_ & 0xffffff00; - uVar3 = pathTmp._buf._0_4_; + uVar2 = (*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)); + (*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)) = (*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)) & 0xffffff00; + uVar3 = (*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)); pathTmp._buf[0] = (char)uVar2; pathTmp._buf[1] = SUB41(uVar2,1); pathTmp._buf[2] = SUB41(uVar2,2); @@ -1025,17 +1025,17 @@ void ModManager::LoadModContent() contentPath._size = pathTmp._size; pathTmp._size = 0; pathTmp._capacity = 0xf; - pathTmp._buf._0_4_ = uVar3; + (*(undefined4 *)((char *)&(pathTmp._buf) + 0x0)) = uVar3; ((std::string *)(pathTmp._buf))->std::string::_Tidy_deallocate(); ((std::string *)(local_84._buf))->std::string::_Tidy_deallocate(); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < local_54._capacity) { uVar12 = local_54._capacity + 1; - pvVar9 = (void *)local_54._buf._0_4_; + pvVar9 = (*(undefined4 *)((char *)&((void *)local_54._buf) + 0x0)); if (0xfff < uVar12) { - pvVar9 = *(void **)(local_54._buf._0_4_ + -4); + pvVar9 = *(void **)((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + -4); uVar12 = local_54._capacity + 0x24; - if (0x1f < (uint)(local_54._buf._0_4_ + (-4 - (int)pvVar9))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_54._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar9))))) { LAB_008f46dd: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1054,7 +1054,7 @@ LAB_008f46dd: local_14 = 0xffffffff; ((std::string *)(contentPath._buf))->std::string::_Tidy_deallocate(); } - modSlot = (ModManager)((int)modSlot + 4); + modSlot = (ModManager)(GHIDRA_INT(modSlot) + 4); pcVar8 = pcStack_20; } while (modSlot != this[1]); } @@ -1086,25 +1086,25 @@ void ModManager::LoadModItemPools() puStack_c = &LAB_00b07785; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&fileName)[1]._size; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&fileName)[1]._size); ExceptionList = &local_10; if ((g_game != (Game *)0x0) && (modSlot = *this, modSlot != this[1])) { do { - if (*(char *)((int)*(void **)modSlot + 0xfd) != '\0') { + if (*(char *)(GHIDRA_INT(*(void **))modSlot + 0xfd) != '\0') { builtin_strncpy(fileName._buf + 8,"s.xml",6); fileName._capacity = 0xf; fileName._size = 0xd; builtin_strncpy(fileName._buf,"itempool",8); local_8 = 0; ((Mod *)(*(void **)modSlot))->Mod::GetContentPath((std_string *)contentPath,&fileName); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; if (0xf < fileName._capacity) { uVar2 = fileName._capacity + 1; - resolvedPath = (void *)fileName._buf._0_4_; + resolvedPath = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < uVar2) { - resolvedPath = *(void **)(fileName._buf._0_4_ + -4); + resolvedPath = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); uVar2 = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)resolvedPath))) goto LAB_008f4883; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(resolvedPath))))) goto LAB_008f4883; } operator_delete(resolvedPath,uVar2); } @@ -1114,24 +1114,24 @@ void ModManager::LoadModItemPools() } resolvedPath = FileSystem::ResolvePath((byte *)psVar1); if (resolvedPath != (byte *)0x0) { - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; tracked_alloc(1,resolvedPath,0); - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); psVar1 = (std_string *)contentPath; if (0xf < contentPathCapacity) { psVar1 = contentPath[0]; } ((ItemPool *)(&g_game->_itemPool))->ItemPool::load_pools((byte *)psVar1,1); } - local_8._0_1_ = 0xff; - local_8._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0xffffff; if (0xf < contentPathCapacity) { uVar2 = contentPathCapacity + 1; psVar1 = contentPath[0]; if (0xfff < uVar2) { psVar1 = (std_string *)contentPath[0][-1]._capacity; uVar2 = contentPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)contentPath[0] + (-4 - (int)psVar1))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(contentPath[0]) + (-4 - GHIDRA_INT(psVar1)))) { LAB_008f4883: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1140,7 +1140,7 @@ LAB_008f4883: operator_delete(psVar1,uVar2); } } - modSlot = (ModManager)((int)modSlot + 4); + modSlot = (ModManager)(GHIDRA_INT(modSlot) + 4); } while (modSlot != this[1]); } ExceptionList = local_10; @@ -1166,26 +1166,26 @@ void ModManager::LoadModBossPools() puStack_c = &LAB_00b07785; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&fileName)[1]._size; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&fileName)[1]._size); ExceptionList = &local_10; if ((g_game != (Game *)0x0) && (modSlot = (undefined4 *)*in_ECX, modSlot != (undefined4 *)in_ECX[1])) { do { - if (*(char *)((int)*modSlot + 0xfd) != '\0') { + if (*(char *)(GHIDRA_INT(*modSlot) + 0xfd) != '\0') { builtin_strncpy(fileName._buf + 8,"s.xml",6); fileName._capacity = 0xf; fileName._size = 0xd; builtin_strncpy(fileName._buf,"bosspool",8); local_8 = 0; ((Mod *)((void *)*modSlot))->Mod::GetContentPath((std_string *)contentPath,&fileName); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; if (0xf < fileName._capacity) { allocSize = fileName._capacity + 1; - allocBase = (void *)fileName._buf._0_4_; + allocBase = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < allocSize) { - allocBase = *(void **)(fileName._buf._0_4_ + -4); + allocBase = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); allocSize = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)allocBase))) goto LAB_008f4a23; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(allocBase))))) goto LAB_008f4a23; } operator_delete(allocBase,allocSize); } @@ -1195,24 +1195,24 @@ void ModManager::LoadModBossPools() } resolvedPath = FileSystem::ResolvePath((byte *)psVar1); if (resolvedPath != (byte *)0x0) { - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; tracked_alloc(1,resolvedPath,0); - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); psVar1 = (std_string *)contentPath; if (0xf < contentPathCapacity) { psVar1 = contentPath[0]; } BossPool::load_xml(psVar1,*modSlot); } - local_8._0_1_ = 0xff; - local_8._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0xffffff; if (0xf < contentPathCapacity) { allocSize = contentPathCapacity + 1; psVar1 = contentPath[0]; if (0xfff < allocSize) { psVar1 = (std_string *)contentPath[0][-1]._capacity; allocSize = contentPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)contentPath[0] + (-4 - (int)psVar1))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(contentPath[0]) + (-4 - GHIDRA_INT(psVar1)))) { LAB_008f4a23: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1287,31 +1287,31 @@ void ModManager::LoadShaders() qword allocatedBytes; longlong attribArrayBytes; - ppsStack_20 = (std_string **)((int)&configPath + 0x80); + ppsStack_20 = (std_string **)(GHIDRA_INT(&configPath) + 0x80); puStack_18 = &LAB_00b0783f; local_1c = ExceptionList; - stackCookie = __security_cookie ^ (int)&configPath + 0x74U; + stackCookie = __security_cookie ^ GHIDRA_INT(&configPath) + 0x74U; ExceptionList = &local_1c; modIt = *this; cleanupFlags = 0; if (modIt != this[1]) { do { curModIt = modIt; - if (*(char *)((int)*(void **)modIt + 0xfd) != '\0') { + if (*(char *)(GHIDRA_INT(*(void **))modIt + 0xfd) != '\0') { builtin_strncpy(tmpString._buf + 8,"xml",4); tmpString._capacity = 0xf; tmpString._size = 0xb; builtin_strncpy(tmpString._buf,"shaders.",8); local_14 = 0; ((Mod *)(*(void **)modIt))->Mod::GetContentPath(&configPath,&tmpString); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < tmpString._capacity) { uVar13 = tmpString._capacity + 1; - pvVar8 = (void *)tmpString._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)tmpString._buf) + 0x0)); if (0xfff < uVar13) { - pvVar8 = *(void **)(tmpString._buf._0_4_ + -4); + pvVar8 = *(void **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar13 = tmpString._capacity + 0x24; - if (0x1f < (uint)(tmpString._buf._0_4_ + (-4 - (int)pvVar8))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar8))))) { LAB_008f5943: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1321,7 +1321,7 @@ LAB_008f5943: } pathCStr = &configPath; if (0xf < configPath._capacity) { - pathCStr = (std_string *)configPath._buf._0_4_; + pathCStr = (*(undefined4 *)((char *)&((std_string *)configPath._buf) + 0x0)); } pbVar6 = FileSystem::ResolvePath((byte *)pathCStr); bStack_100e9 = pbVar6 != (byte *)0x0; @@ -1330,20 +1330,20 @@ LAB_008f5943: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar13 = *(uint *)(pbVar6 + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar13; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar13; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar13); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar13)); free(pbVar6 + -4); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; } if (bStack_100e9 != 0) { pathCStr = &configPath; if (0xf < configPath._capacity) { - pathCStr = (std_string *)configPath._buf._0_4_; + pathCStr = (*(undefined4 *)((char *)&((std_string *)configPath._buf) + 0x0)); } piStack_100fc = ((FileSystem *)(&PTR_vftable_00c37a10))->FileSystem::Open((byte *)pathCStr,(int *)0x0); if (piStack_100fc == (int *)0x0) { @@ -1356,22 +1356,22 @@ LAB_008f5943: fileBuffer[iVar7] = 0; (**(code **)*piStack_100fc)(1); FUN_00413b90(); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; pcVar16 = (char *)0x8f4c1d; pbVar6 = fileBuffer; ((rapidxml::xml_document *)(xmlDoc))->rapidxml::xml_document::parse(fileBuffer); bVar17 = (byte)pbVar6; - pvVar8 = ((xml_node *)(xmlDoc))->xml_node::first_node((byte *)"shaders",(int)pcVar16,bVar17); + pvVar8 = ((xml_node *)(xmlDoc))->xml_node::first_node((byte *)"shaders",GHIDRA_INT(pcVar16),bVar17); if (pvVar8 == (void *)0x0) { piVar9 = *(int **)curModIt; - if (0xf < (uint)piVar9[5]) { + if (0xf < GHIDRA_UINT(piVar9[5])) { piVar9 = (int *)*piVar9; } bVar17 = (byte)piVar9; pcVar16 = "Could not find root node \'shaders\' in mod %s\n"; KAGE_LogMessage(0x10,(byte *)"Could not find root node \'shaders\' in mod %s\n"); } - for (piStack_100fc = ((xml_node *)(pvVar8))->xml_node::first_node((byte *)"shader",(int)pcVar16,bVar17); + for (piStack_100fc = ((xml_node *)(pvVar8))->xml_node::first_node((byte *)"shader",GHIDRA_INT(pcVar16),bVar17); piStack_100fc != (int *)0x0; piStack_100fc = (int *)piStack_100fc[0xb]) { pbVar6 = operator_new(0x80); if (pbVar6 == (byte *)0x0) { @@ -1403,7 +1403,7 @@ LAB_008f5943: pbVar6[0x6e] = 0; pbVar6[0x6f] = 0; pbVar14 = pbVar6 + 0x70; - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; uStack_10108 = CONCAT44(pbVar14,(undefined4)uStack_10108); pbVar14[0] = 0; pbVar14[1] = 0; @@ -1420,7 +1420,7 @@ LAB_008f5943: *(undefined2 *)((char *)pvVar8 + 0xc) = 0x101; *(void **)pbVar14 = pvVar8; } - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; pbVar6 = s_name; do { pbStack_100f4 = pbVar6; @@ -1438,10 +1438,10 @@ LAB_008f5943: pbVar14 = *(byte **)((char *)pbStack_100f0 + 8); } if (pbVar14 == pbStack_100f4) { - pbVar14 = pbVar14 + (int)pbVar6; + pbVar14 = pbVar14 + GHIDRA_INT(pbVar6); puVar10 = (undefined4 *)pbStack_100f0; if (pbVar14 <= pbVar6) goto LAB_008f4d93; - iVar7 = (int)s_name - (int)pbVar6; + iVar7 = GHIDRA_INT(s_name) - GHIDRA_INT(pbVar6); while (*pbVar6 == pbVar6[iVar7]) { pbVar6 = pbVar6 + 1; if (pbVar14 <= pbVar6) goto LAB_008f4d93; @@ -1459,7 +1459,7 @@ LAB_008f4d93: bVar17 = *pbVar14; pbVar14 = pbVar14 + 1; } while (bVar17 != 0); - ((std::string *)((char *)shaderEntry))->std::string::assign(pbVar6,(int)pbVar14 - (int)(pbVar6 + 1)); + ((std::string *)((char *)shaderEntry))->std::string::assign(pbVar6,GHIDRA_INT(pbVar14) - GHIDRA_INT((pbVar6 + 1))); pcVar16 = "parameters"; do { pcVar15 = pcVar16; @@ -1477,9 +1477,9 @@ LAB_008f4df0: pcVar16 = *(char **)((char *)pbStack_100f0 + 8); } if (pcVar16 != pcVar15 + -0xb76d4b) goto LAB_008f4e81; - pbVar14 = (byte *)(pcVar16 + (int)pbVar6); + pbVar14 = (byte *)(pcVar16 + GHIDRA_INT(pbVar6)); if (pbVar6 < pbVar14) { - iVar7 = (int)"parameters" - (int)pbVar6; + iVar7 = GHIDRA_INT("parameters") - GHIDRA_INT(pbVar6); while (*pbVar6 == pbVar6[iVar7]) { pbVar6 = pbVar6 + 1; if (pbVar14 <= pbVar6) goto LAB_008f4e26; @@ -1509,9 +1509,9 @@ LAB_008f4e26: pcVar16 = *(char **)(pbStack_100f4 + 8); } if (pcVar16 == pcVar15 + -0xb76d43) { - pbVar14 = (byte *)(pcVar16 + (int)pbVar6); + pbVar14 = (byte *)(pcVar16 + GHIDRA_INT(pbVar6)); if (pbVar14 <= pbVar6) goto joined_r0x008f4f6b; - iVar7 = (int)"param" - (int)pbVar6; + iVar7 = GHIDRA_INT("param") - GHIDRA_INT(pbVar6); while (*pbVar6 == pbVar6[iVar7]) { pbVar6 = pbVar6 + 1; if (pbVar14 <= pbVar6) goto joined_r0x008f4f6b; @@ -1540,10 +1540,10 @@ joined_r0x008f4f6b: pbVar14 = *(byte **)((char *)pbStack_100f0 + 8); } if ((std_string *)pbVar14 == psStack_1010c) { - pbVar14 = pbVar14 + (int)pbVar6; + pbVar14 = pbVar14 + GHIDRA_INT(pbVar6); puVar10 = (undefined4 *)pbStack_100f0; if (pbVar14 <= pbVar6) goto LAB_008f4fef; - iVar7 = (int)s_name - (int)pbVar6; + iVar7 = GHIDRA_INT(s_name) - GHIDRA_INT(pbVar6); while (*pbVar6 == pbVar6[iVar7]) { pbVar6 = pbVar6 + 1; if (pbVar14 <= pbVar6) goto LAB_008f4fef; @@ -1558,14 +1558,14 @@ LAB_008f4fef: pbVar6 = (byte *)puVar10[1]; } tmpString._capacity = 0xf; - tmpString._buf._0_8_ = tmpString._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(tmpString._buf) + 0x0)) = (*(undefined8 *)((char *)&(tmpString._buf) + 0x0)) & 0xffffffff00000000; pbVar14 = pbVar6; do { bVar17 = *pbVar14; pbVar14 = pbVar14 + 1; } while (bVar17 != 0); - ((std::string *)(tmpString._buf))->std::string::assign(pbVar6,(int)pbVar14 - (int)(pbVar6 + 1)); - local_14._0_1_ = 9; + ((std::string *)(tmpString._buf))->std::string::assign(pbVar6,GHIDRA_INT(pbVar14) - GHIDRA_INT((pbVar6 + 1))); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; uStack_10108 = uStack_10108 & 0xffffffff; uVar4 = uStack_10108; pcVar16 = "type"; @@ -1585,9 +1585,9 @@ LAB_008f4fef: pathCStr = (std_string *)puVar10[2]; } if (pathCStr == psStack_1010c) { - pbVar14 = pbVar6 + (int)pathCStr; + pbVar14 = pbVar6 + GHIDRA_INT(pathCStr); if (pbVar14 <= pbVar6) goto LAB_008f50c3; - iVar7 = (int)&DAT_00b69a0c - (int)pbVar6; + iVar7 = GHIDRA_INT(&DAT_00b69a0c) - GHIDRA_INT(pbVar6); while (*pbVar6 == pbVar6[iVar7]) { pbVar6 = pbVar6 + 1; if (pbVar14 <= pbVar6) goto LAB_008f50c3; @@ -1607,7 +1607,7 @@ LAB_008f50c3: isLess = bStack_100e9 < (byte)*pcVar16; if (bStack_100e9 != *pcVar16) { LAB_008f5122: - uVar13 = -(uint)isLess | 1; + uVar13 = -GHIDRA_UINT(isLess) | 1; goto LAB_008f5127; } if (bStack_100e9 == 0) break; @@ -1630,7 +1630,7 @@ LAB_008f5127: isLess = bStack_100e9 < *pbVar14; if (bStack_100e9 != *pbVar14) { LAB_008f5182: - uVar13 = -(uint)isLess | 1; + uVar13 = -GHIDRA_UINT(isLess) | 1; goto LAB_008f5187; } if (bStack_100e9 == 0) break; @@ -1653,7 +1653,7 @@ LAB_008f5187: isLess = bStack_100e9 < *pbVar14; if (bStack_100e9 != *pbVar14) { LAB_008f51e2: - uVar13 = -(uint)isLess | 1; + uVar13 = -GHIDRA_UINT(isLess) | 1; goto LAB_008f51e7; } if (bStack_100e9 == 0) break; @@ -1676,7 +1676,7 @@ LAB_008f51e7: isLess = bVar17 < *pbVar14; if (bVar17 != *pbVar14) { LAB_008f5215: - uVar13 = -(uint)isLess | 1; + uVar13 = -GHIDRA_UINT(isLess) | 1; goto LAB_008f521a; } if (bVar17 == 0) break; @@ -1688,8 +1688,8 @@ LAB_008f5215: } while (bVar17 != 0); uVar13 = 0; LAB_008f521a: - uStack_10108._4_4_ = 0; - iVar7 = uStack_10108._4_4_; + (*(undefined4 *)((char *)&(uStack_10108) + 0x4)) = 0; + iVar7 = (*(undefined4 *)((char *)&(uStack_10108) + 0x4)); if (uVar13 == 0) { iVar7 = 4; } @@ -1700,14 +1700,14 @@ LAB_008f521a: piVar9 = (int *)FUN_008fc6e0(&tmpString); *piVar9 = iVar7; *(int *)(shaderEntry + 0x78) = *(int *)(shaderEntry + 0x78) + iVar7; - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; if (0xf < tmpString._capacity) { uVar13 = tmpString._capacity + 1; - pvVar8 = (void *)tmpString._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)tmpString._buf) + 0x0)); if (0xfff < uVar13) { - pvVar8 = *(void **)(tmpString._buf._0_4_ + -4); + pvVar8 = *(void **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar13 = tmpString._capacity + 0x24; - if (0x1f < (uint)(tmpString._buf._0_4_ + (-4 - (int)pvVar8))) + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar8))))) goto LAB_008f5943; } operator_delete(pvVar8,uVar13); @@ -1742,10 +1742,10 @@ LAB_008f4e9f: pcVar16 = *(char **)(pbStack_100f4 + 8); } if (pcVar16 == pcVar15 + -0xb76e4b) { - pbVar14 = (byte *)(pcVar16 + (int)pbVar6); + pbVar14 = (byte *)(pcVar16 + GHIDRA_INT(pbVar6)); childNode = pbStack_100f4; if (pbVar14 <= pbVar6) goto LAB_008f52e7; - iVar7 = (int)"vertex" - (int)pbVar6; + iVar7 = GHIDRA_INT("vertex") - GHIDRA_INT(pbVar6); while (*pbVar6 == pbVar6[iVar7]) { pbVar6 = pbVar6 + 1; if (pbVar14 <= pbVar6) goto LAB_008f52e7; @@ -1776,10 +1776,10 @@ LAB_008f52e7: pcVar16 = *(char **)(pbStack_100f0 + 8); } if (pcVar16 == pcVar15) { - pbVar14 = (byte *)(pcVar16 + (int)pbVar6); + pbVar14 = (byte *)(pcVar16 + GHIDRA_INT(pbVar6)); childNode = pbStack_100f0; if (pbVar14 <= pbVar6) goto LAB_008f5377; - iVar7 = (int)"fragment" - (int)pbVar6; + iVar7 = GHIDRA_INT("fragment") - GHIDRA_INT(pbVar6); while (*pbVar6 == pbVar6[iVar7]) { pbVar6 = pbVar6 + 1; if (pbVar14 <= pbVar6) goto LAB_008f5377; @@ -1804,27 +1804,27 @@ LAB_008f5377: fragmentText._buf[1] = '\0'; fragmentText._buf[2] = '\0'; fragmentText._buf[3] = '\0'; - local_14._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; psStack_1010c = vertexSource; if (vertexSource->_buf[0] != 0x23) { tmpString._size = 0; tmpString._capacity = 0xf; - tmpString._buf._0_8_ = tmpString._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(tmpString._buf) + 0x0)) = (*(undefined8 *)((char *)&(tmpString._buf) + 0x0)) & 0xffffffff00000000; pcVar16 = std::_Allocate(0x40); tmpString._size = 0x3c; tmpString._capacity = 0x3f; builtin_strncpy(pcVar16, "#ifndef GL_ES\n#define lowp \n#define mediump \n#endif\n#line 1\n", 0x3d); - tmpString._buf._0_4_ = pcVar16; - local_14._0_1_ = 0xc; + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = pcVar16; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; pathCStr = vertexSource; do { pcVar16 = pathCStr->_buf; pathCStr = (std_string *)(pathCStr->_buf + 1); } while (*pcVar16 != '\0'); pcVar16 = ((std::string *)(tmpString._buf))->std::string::append((byte *)vertexSource, - (int)pathCStr - (int)(vertexSource->_buf + 1)); + GHIDRA_INT(pathCStr) - GHIDRA_INT((vertexSource->_buf + 1))); cleanupFlags = cleanupFlags | 1; acStack_98 = *(char (*) [4])pcVar16; acStack_94 = *(char (*) [4])(pcVar16 + 4); @@ -1842,73 +1842,73 @@ LAB_008f5377: *pcVar16 = '\0'; if (0xf < vertexText._capacity) { uVar13 = vertexText._capacity + 1; - pvVar8 = (void *)vertexText._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)vertexText._buf) + 0x0)); if (0xfff < uVar13) { - pvVar8 = *(void **)(vertexText._buf._0_4_ + -4); + pvVar8 = *(void **)((*(undefined4 *)((char *)&(vertexText._buf) + 0x0)) + -4); uVar13 = vertexText._capacity + 0x24; - if (0x1f < (vertexText._buf._0_4_ - (int)pvVar8) - 4U) goto LAB_008f5943; + if (0x1f < ((*(undefined4 *)((char *)&(vertexText._buf) + 0x0)) - GHIDRA_INT(pvVar8)) - 4U) goto LAB_008f5943; } operator_delete(pvVar8,uVar13); } - local_14._0_1_ = 0xb; - vertexText._buf._0_4_ = acStack_98; - vertexText._buf._4_4_ = acStack_94; - vertexText._buf._8_4_ = uStack_90; - vertexText._buf._12_4_ = uStack_8c; - vertexText._16_8_ = uStack_10108; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; + (*(undefined4 *)((char *)&(vertexText._buf) + 0x0)) = acStack_98; + (*(undefined4 *)((char *)&(vertexText._buf) + 0x4)) = acStack_94; + (*(undefined4 *)((char *)&(vertexText._buf) + 0x8)) = uStack_90; + (*(undefined4 *)((char *)&(vertexText._buf) + 0xc)) = uStack_8c; + (*(undefined8 *)((char *)&(vertexText) + 0x10)) = uStack_10108; if (0xf < tmpString._capacity) { uVar13 = tmpString._capacity + 1; - pvVar8 = (void *)tmpString._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)tmpString._buf) + 0x0)); if (0xfff < uVar13) { - pvVar8 = *(void **)(tmpString._buf._0_4_ + -4); + pvVar8 = *(void **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar13 = tmpString._capacity + 0x24; - if (0x1f < (uint)(tmpString._buf._0_4_ + (-4 - (int)pvVar8))) goto LAB_008f5943; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar8))))) goto LAB_008f5943; } operator_delete(pvVar8,uVar13); } vertexSource = &vertexText; if (0xf < vertexText._capacity) { - vertexSource = (std_string *)vertexText._buf._0_4_; + vertexSource = (*(undefined4 *)((char *)&((std_string *)vertexText._buf) + 0x0)); } } if (fragmentSource->_buf[0] != 0x23) { tmpString._size = 0; tmpString._capacity = 0xf; - tmpString._buf._0_8_ = tmpString._buf._0_8_ & 0xffffffff00000000; + (*(undefined8 *)((char *)&(tmpString._buf) + 0x0)) = (*(undefined8 *)((char *)&(tmpString._buf) + 0x0)) & 0xffffffff00000000; ((std::string *)(tmpString._buf))->std::string::assign((byte *) "#ifndef GL_ES\n#define lowp \n#define mediump \n#endif\n#line 1\n" ,0x3c); - local_14._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xd; pathCStr = fragmentSource; do { pcVar16 = pathCStr->_buf; pathCStr = (std_string *)(pathCStr->_buf + 1); } while (*pcVar16 != '\0'); pvVar8 = ((std::string *)(tmpString._buf))->std::string::append((byte *)fragmentSource, - (int)pathCStr - (int)(fragmentSource->_buf + 1)); + GHIDRA_INT(pathCStr) - GHIDRA_INT((fragmentSource->_buf + 1))); FUN_00417100(pvVar8); cleanupFlags = cleanupFlags | 2; if (0xf < fragmentText._capacity) { uVar13 = fragmentText._capacity + 1; - pvVar8 = (void *)fragmentText._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)fragmentText._buf) + 0x0)); if (0xfff < uVar13) { - pvVar8 = *(void **)(fragmentText._buf._0_4_ + -4); + pvVar8 = *(void **)((*(undefined4 *)((char *)&(fragmentText._buf) + 0x0)) + -4); uVar13 = fragmentText._capacity + 0x24; - if (0x1f < (fragmentText._buf._0_4_ - (int)pvVar8) - 4U) goto LAB_008f5943; + if (0x1f < ((*(undefined4 *)((char *)&(fragmentText._buf) + 0x0)) - GHIDRA_INT(pvVar8)) - 4U) goto LAB_008f5943; } operator_delete(pvVar8,uVar13); } uVar13 = local_a0; local_a0 = local_a0 & 0xffffff00; uVar5 = local_a0; - local_a0._0_1_ = (undefined1)uVar13; - local_a0._1_1_ = SUB41(uVar13,1); - local_a0._2_1_ = SUB41(uVar13,2); - local_a0._3_1_ = SUB41(uVar13,3); + (*(undefined1 *)((char *)&(local_a0) + 0x0)) = (undefined1)uVar13; + (*(undefined1 *)((char *)&(local_a0) + 0x1)) = SUB41(uVar13,1); + (*(undefined1 *)((char *)&(local_a0) + 0x2)) = SUB41(uVar13,2); + (*(undefined1 *)((char *)&(local_a0) + 0x3)) = SUB41(uVar13,3); fragmentText._buf[0] = (undefined1)local_a0; - fragmentText._buf[1] = local_a0._1_1_; - fragmentText._buf[2] = local_a0._2_1_; - fragmentText._buf[3] = local_a0._3_1_; + fragmentText._buf[1] = (*(undefined1 *)((char *)&(local_a0) + 0x1)); + fragmentText._buf[2] = (*(undefined1 *)((char *)&(local_a0) + 0x2)); + fragmentText._buf[3] = (*(undefined1 *)((char *)&(local_a0) + 0x3)); fragmentText._buf[4] = acStack_9c[0]; fragmentText._buf[5] = acStack_9c[1]; fragmentText._buf[6] = acStack_9c[2]; @@ -1927,26 +1927,26 @@ LAB_008f5377: uStack_8c = 0xf; local_a0 = uVar5; ((std::string *)((char *)&local_a0))->std::string::_Tidy_deallocate(); - local_14._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; if (0xf < tmpString._capacity) { uVar13 = tmpString._capacity + 1; - pvVar8 = (void *)tmpString._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)tmpString._buf) + 0x0)); if (0xfff < uVar13) { - pvVar8 = *(void **)(tmpString._buf._0_4_ + -4); + pvVar8 = *(void **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + -4); uVar13 = tmpString._capacity + 0x24; - if (0x1f < (uint)(tmpString._buf._0_4_ + (-4 - (int)pvVar8))) goto LAB_008f5943; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar8))))) goto LAB_008f5943; } operator_delete(pvVar8,uVar13); } fragmentSource = &fragmentText; if (0xf < fragmentText._capacity) { - fragmentSource = (std_string *)fragmentText._buf._0_4_; + fragmentSource = (*(undefined4 *)((char *)&((std_string *)fragmentText._buf) + 0x0)); } } attribArrayBytes = (ulonglong)(*(int *)(shaderEntry + 0x74) + 6) * 8; puVar10 = operator_new_tracked - (-(uint)((int)((ulonglong)attribArrayBytes >> 0x20) != 0) | - (uint)attribArrayBytes); + (-GHIDRA_UINT((GHIDRA_INT(((ulonglong)attribArrayBytes >> 0x20)) != 0)) | + GHIDRA_UINT(attribArrayBytes)); *(undefined4 **)(shaderEntry + 0x7c) = puVar10; *puVar10 = "Position"; puVar10[1] = 5; @@ -1973,14 +1973,14 @@ LAB_008f5377: pvVar8 = operator_new_tracked(piVar9[8] + 1); piVar11 = piVar9 + 4; uStack_10108 = CONCAT44(pvVar8,(undefined4)uStack_10108); - if (0xf < (uint)piVar9[9]) { + if (0xf < GHIDRA_UINT(piVar9[9])) { piVar11 = (int *)*piVar11; } piVar12 = piVar11; do { iVar2 = *piVar12; - piVar12 = (int *)((int)piVar12 + 1); - *(char *)((char *)pvVar8 + (-1 - (int)piVar11) + (int)piVar12) = (char)iVar2; + piVar12 = (int *)(GHIDRA_INT(piVar12) + 1); + *(char *)((char *)pvVar8 + (-1 - GHIDRA_INT(piVar11)) + GHIDRA_INT(piVar12)) = (char)iVar2; } while ((char)iVar2 != '\0'); iVar2 = piVar9[10]; iVar3 = *(int *)(shaderEntry + 0x7c); @@ -2023,51 +2023,51 @@ LAB_008f5377: /* WARNING: Subroutine does not return */ std::_Xlength_error("list too long"); } - local_14._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xe; piVar9 = operator_new(0xc); - piVar9[2] = (int)shaderEntry; + piVar9[2] = GHIDRA_INT(shaderEntry); *(int *)(iVar7 + 0xe8) = *(int *)(iVar7 + 0xe8) + 1; - puVar10 = *(undefined4 **)(uStack_10108._4_4_ + 4); - *piVar9 = uStack_10108._4_4_; - piVar9[1] = (int)puVar10; - *(int **)(uStack_10108._4_4_ + 4) = piVar9; + puVar10 = *(undefined4 **)((*(undefined4 *)((char *)&(uStack_10108) + 0x4)) + 4); + *piVar9 = (*(undefined4 *)((char *)&(uStack_10108) + 0x4)); + piVar9[1] = GHIDRA_INT(puVar10); + *(int **)((*(undefined4 *)((char *)&(uStack_10108) + 0x4)) + 4) = piVar9; *puVar10 = piVar9; - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; if (0xf < fragmentText._capacity) { uVar13 = fragmentText._capacity + 1; - pvVar8 = (void *)fragmentText._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)fragmentText._buf) + 0x0)); if (0xfff < uVar13) { - pvVar8 = *(void **)(fragmentText._buf._0_4_ + -4); + pvVar8 = *(void **)((*(undefined4 *)((char *)&(fragmentText._buf) + 0x0)) + -4); uVar13 = fragmentText._capacity + 0x24; - if (0x1f < (fragmentText._buf._0_4_ - (int)pvVar8) - 4U) goto LAB_008f5943; + if (0x1f < ((*(undefined4 *)((char *)&(fragmentText._buf) + 0x0)) - GHIDRA_INT(pvVar8)) - 4U) goto LAB_008f5943; } operator_delete(pvVar8,uVar13); } - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; fragmentText._size = 0; fragmentText._capacity = 0xf; - fragmentText._buf._0_4_ = fragmentText._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(fragmentText._buf) + 0x0)) = (*(undefined4 *)((char *)&(fragmentText._buf) + 0x0)) & 0xffffff00; if (0xf < vertexText._capacity) { uVar13 = vertexText._capacity + 1; - pvVar8 = (void *)vertexText._buf._0_4_; + pvVar8 = (*(undefined4 *)((char *)&((void *)vertexText._buf) + 0x0)); if (0xfff < uVar13) { - pvVar8 = *(void **)(vertexText._buf._0_4_ + -4); + pvVar8 = *(void **)((*(undefined4 *)((char *)&(vertexText._buf) + 0x0)) + -4); uVar13 = vertexText._capacity + 0x24; - if (0x1f < (vertexText._buf._0_4_ - (int)pvVar8) - 4U) goto LAB_008f5943; + if (0x1f < ((*(undefined4 *)((char *)&(vertexText._buf) + 0x0)) - GHIDRA_INT(pvVar8)) - 4U) goto LAB_008f5943; } operator_delete(pvVar8,uVar13); } } - local_14._0_1_ = 0xf; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xf; tracked_alloc(1,fileBuffer,0); - local_14 = CONCAT31(local_14._1_3_,0x10); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x10); ((xml_memory_pool *)(auStack_100b8))->xml_memory_pool::clear(); } } local_14 = 0xffffffff; ((std::string *)(configPath._buf))->std::string::_Tidy_deallocate(); } - modIt = (ModManager)((int)curModIt + 4); + modIt = (ModManager)(GHIDRA_INT(curModIt) + 4); } while (modIt != this[1]); } ExceptionList = local_1c; @@ -2128,11 +2128,11 @@ void ModManager::TryRedirectPath(std_string *result, std_string *filePath) void *local_14; puStack_20 = (undefined1 *)(modDirCopy + 0x20); - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; puStack_18 = &LAB_00b07895; local_1c = ExceptionList; - uVar1 = __security_cookie ^ (uint)(modDirCopy + 0x1d); + uVar1 = __security_cookie ^ GHIDRA_UINT((modDirCopy + 0x1d)); ExceptionList = &local_1c; filePathStr = filePath; if (0xf < filePath->_capacity) { @@ -2154,7 +2154,7 @@ void ModManager::TryRedirectPath(std_string *result, std_string *filePath) } while (cacheEntry != (ModManager)0x0); if (uVar3 == 0x8000) { if (cacheEntry != (ModManager)0x0) { - ((std::string *)((char *)((int)cacheEntry + 0xc)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(cacheEntry) + 0xc)))->std::string::_Tidy_deallocate(); operator_delete((void *)cacheEntry,0x24); } } @@ -2213,7 +2213,7 @@ void ModManager::TryRedirectPath(std_string *result, std_string *filePath) modDirSize = uVar2; modDirCapacity = uVar1; ((std::string *)((char *)modDirCopy))->std::string::assign((byte *)ppppbVar4,uVar3); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; appended = ((std::string *)((char *)modDirCopy))->std::string::append((byte *)"-dlc3/",6); dlcDir = (void *)*appended; uStack_68 = appended[1]; @@ -2223,7 +2223,7 @@ void ModManager::TryRedirectPath(std_string *result, std_string *filePath) appended[4] = 0; appended[5] = 0xf; *(undefined1 *)appended = 0; - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; filePathStr = filePath; if (0xf < filePath->_capacity) { filePathStr = *(std_string **)filePath->_buf; @@ -2237,37 +2237,37 @@ void ModManager::TryRedirectPath(std_string *result, std_string *filePath) appended[4] = 0; appended[5] = 0xf; *(undefined1 *)appended = 0; - local_14._0_1_ = 4; - if (0xf < local_5c._4_4_) { - uVar1 = local_5c._4_4_ + 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; + if (0xf < (*(undefined4 *)((char *)&(local_5c) + 0x4))) { + uVar1 = (*(undefined4 *)((char *)&(local_5c) + 0x4)) + 1; pvVar7 = dlcDir; if (0xfff < uVar1) { pvVar7 = *(void **)((char *)dlcDir + -4); - uVar1 = local_5c._4_4_ + 0x24; - if (0x1f < (uint)((int)dlcDir + (-4 - (int)pvVar7))) goto LAB_008f6140; + uVar1 = (*(undefined4 *)((char *)&(local_5c) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(dlcDir) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_008f6140; } operator_delete(pvVar7,uVar1); } local_5c = 0xf00000000; - dlcDir = (void *)((uint)dlcDir & 0xffffff00); - local_14._0_1_ = 5; + dlcDir = (void *)(GHIDRA_UINT(dlcDir) & 0xffffff00); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; if (0xf < modDirCopyCapacity) { uVar1 = modDirCopyCapacity + 1; pvVar7 = modDirCopy[0]; if (0xfff < uVar1) { - pvVar7 = *(void **)((int)modDirCopy[0] + -4); + pvVar7 = *(void **)(GHIDRA_INT(modDirCopy[0]) + -4); uVar1 = modDirCopyCapacity + 0x24; - if (0x1f < (uint)((int)modDirCopy[0] + (-4 - (int)pvVar7))) goto LAB_008f6140; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(modDirCopy[0]) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_008f6140; } operator_delete(pvVar7,uVar1); } modDirCopySize = 0; ppppuVar5 = (uint ****)&candidatePath; - if (0xf < local_2c._4_4_) { + if (0xf < (*(undefined4 *)((char *)&(local_2c) + 0x4))) { ppppuVar5 = candidatePath; } modDirCopyCapacity = 0xf; - modDirCopy[0] = (void *)((uint)modDirCopy[0] & 0xffffff00); + modDirCopy[0] = (void *)(GHIDRA_UINT(modDirCopy[0]) & 0xffffff00); resolvedPath = FileSystem::ResolvePath((byte *)ppppuVar5); if (resolvedPath == (byte *)0x0) { if (0x7fffffff - modDirSize < filePath->_size) { @@ -2282,15 +2282,15 @@ void ModManager::TryRedirectPath(std_string *result, std_string *filePath) if (0xf < filePath->_capacity) { filePathStr = *(std_string **)filePath->_buf; } - ((std::string *)((char *)&fallbackPath))->std::string::concat((int)result,filePathStr,(byte *)ppppbVar4, + ((std::string *)((char *)&fallbackPath))->std::string::concat(GHIDRA_INT(result),filePathStr,(byte *)ppppbVar4, modDirSize,(byte *)filePathStr,filePath->_size); - if (0xf < local_2c._4_4_) { - uVar1 = local_2c._4_4_ + 1; + if (0xf < (*(undefined4 *)((char *)&(local_2c) + 0x4))) { + uVar1 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 1; ppppuVar5 = candidatePath; if (0xfff < uVar1) { ppppuVar5 = (uint ****)candidatePath[-1]; - uVar1 = local_2c._4_4_ + 0x24; - if (0x1f < (uint)((int)candidatePath + (-4 - (int)ppppuVar5))) goto LAB_008f6140; + uVar1 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(candidatePath) + (-4 - GHIDRA_INT(ppppuVar5))))) goto LAB_008f6140; } operator_delete(ppppuVar5,uVar1); } @@ -2305,107 +2305,107 @@ void ModManager::TryRedirectPath(std_string *result, std_string *filePath) local_2c = CONCAT44(uStack_88,local_8c); resolvedPath = FileSystem::ResolvePath((byte *)ppppuVar5); if (resolvedPath != (byte *)0x0) { - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; tracked_alloc(1,resolvedPath,0); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; } if (resolvedPath == (byte *)0x0) { - if (0xf < local_2c._4_4_) { - uVar1 = local_2c._4_4_ + 1; + if (0xf < (*(undefined4 *)((char *)&(local_2c) + 0x4))) { + uVar1 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 1; ppppuVar5 = candidatePath; if (0xfff < uVar1) { ppppuVar5 = (uint ****)candidatePath[-1]; - uVar1 = local_2c._4_4_ + 0x24; - local_14._0_1_ = 0; - if (0x1f < (uint)((int)candidatePath + (-4 - (int)ppppuVar5))) goto LAB_008f6140; + uVar1 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 0x24; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(candidatePath) + (-4 - GHIDRA_INT(ppppuVar5))))) goto LAB_008f6140; } - local_14._0_1_ = resolvedPath != (byte *)0x0; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = resolvedPath != (byte *)0x0; operator_delete(ppppuVar5,uVar1); } - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; local_2c = 0xf00000000; - candidatePath = (uint ****)((uint)candidatePath & 0xffffff00); + candidatePath = (uint ****)(GHIDRA_UINT(candidatePath) & 0xffffff00); if (0xf < modDirCapacity) { uVar1 = modDirCapacity + 1; ppppbVar4 = modDir; if (0xfff < uVar1) { ppppbVar4 = (byte ****)modDir[-1]; uVar1 = modDirCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)modDir + (-4 - (int)ppppbVar4))) goto LAB_008f6140; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(modDir) + (-4 - GHIDRA_INT(ppppbVar4)))) goto LAB_008f6140; } operator_delete(ppppbVar4,uVar1); } goto LAB_008f5fd3; } *(uint *)((char *)cacheEntry + 8) = *(uint *)modIt; - if ((uint *****)((int)cacheEntry + 0xc) != &candidatePath) { + if ((uint *****)(GHIDRA_INT(cacheEntry) + 0xc) != &candidatePath) { ppppuVar5 = (uint ****)&candidatePath; - if (0xf < local_2c._4_4_) { + if (0xf < (*(undefined4 *)((char *)&(local_2c) + 0x4))) { ppppuVar5 = candidatePath; } - ((std::string *)((char *)((int)cacheEntry + 0xc)))->std::string::assign((byte *)ppppuVar5,(uint)local_2c); + ((std::string *)((char *)(GHIDRA_INT(cacheEntry) + 0xc)))->std::string::assign((byte *)ppppuVar5,GHIDRA_UINT(local_2c)); } - local_14._0_1_ = 0; - if (0xf < local_2c._4_4_) { - uVar1 = local_2c._4_4_ + 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; + if (0xf < (*(undefined4 *)((char *)&(local_2c) + 0x4))) { + uVar1 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 1; ppppuVar5 = candidatePath; if (0xfff < uVar1) { ppppuVar5 = (uint ****)candidatePath[-1]; - uVar1 = local_2c._4_4_ + 0x24; - if (0x1f < (uint)((int)candidatePath + (-4 - (int)ppppuVar5))) goto LAB_008f6140; + uVar1 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(candidatePath) + (-4 - GHIDRA_INT(ppppuVar5))))) goto LAB_008f6140; } operator_delete(ppppuVar5,uVar1); } - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; local_2c = 0xf00000000; - candidatePath = (uint ****)((uint)candidatePath & 0xffffff00); + candidatePath = (uint ****)(GHIDRA_UINT(candidatePath) & 0xffffff00); if (modDirCapacity < 0x10) break; uVar1 = modDirCapacity + 1; ppppbVar4 = modDir; if (0xfff < uVar1) { ppppbVar4 = (byte ****)modDir[-1]; - iVar6 = (int)modDir - (int)ppppbVar4; + iVar6 = GHIDRA_INT(modDir) - GHIDRA_INT(ppppbVar4); goto joined_r0x008f613a; } } else { - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; tracked_alloc(1,resolvedPath,0); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; *(uint *)((char *)cacheEntry + 8) = *(uint *)modIt; - if ((uint *****)((int)cacheEntry + 0xc) != &candidatePath) { + if ((uint *****)(GHIDRA_INT(cacheEntry) + 0xc) != &candidatePath) { ppppuVar5 = (uint ****)&candidatePath; - if (0xf < local_2c._4_4_) { + if (0xf < (*(undefined4 *)((char *)&(local_2c) + 0x4))) { ppppuVar5 = candidatePath; } - ((std::string *)((char *)((int)cacheEntry + 0xc)))->std::string::assign((byte *)ppppuVar5,(uint)local_2c); + ((std::string *)((char *)(GHIDRA_INT(cacheEntry) + 0xc)))->std::string::assign((byte *)ppppuVar5,GHIDRA_UINT(local_2c)); } - local_14._0_1_ = 0; - if (0xf < local_2c._4_4_) { - uVar1 = local_2c._4_4_ + 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0; + if (0xf < (*(undefined4 *)((char *)&(local_2c) + 0x4))) { + uVar1 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 1; ppppuVar5 = candidatePath; if (0xfff < uVar1) { ppppuVar5 = (uint ****)candidatePath[-1]; - uVar1 = local_2c._4_4_ + 0x24; - if (0x1f < (uint)((int)candidatePath + (-4 - (int)ppppuVar5))) goto LAB_008f6140; + uVar1 = (*(undefined4 *)((char *)&(local_2c) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(candidatePath) + (-4 - GHIDRA_INT(ppppuVar5))))) goto LAB_008f6140; } operator_delete(ppppuVar5,uVar1); } - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; local_2c = 0xf00000000; - candidatePath = (uint ****)((uint)candidatePath & 0xffffff00); + candidatePath = (uint ****)(GHIDRA_UINT(candidatePath) & 0xffffff00); if (modDirCapacity < 0x10) break; uVar1 = modDirCapacity + 1; ppppbVar4 = modDir; if (0xfff < uVar1) { ppppbVar4 = (byte ****)modDir[-1]; - iVar6 = (int)modDir - (int)ppppbVar4; + iVar6 = GHIDRA_INT(modDir) - GHIDRA_INT(ppppbVar4); joined_r0x008f613a: - local_14._1_3_ = 0xffffff; - local_14._0_1_ = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; local_2c = 0xf00000000; uVar1 = modDirCapacity + 0x24; if (0x1f < iVar6 - 4U) { @@ -2416,18 +2416,18 @@ LAB_008f6140: } } local_2c = 0xf00000000; - local_14._1_3_ = 0xffffff; - local_14._0_1_ = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; operator_delete(ppppbVar4,uVar1); break; } LAB_008f5fd3: - modIt = (ModManager)((int)modIt + 4); + modIt = (ModManager)(GHIDRA_INT(modIt) + 4); } while (modIt != this[1]); } LAB_008f608f: if (*(uint *)((char *)cacheEntry + 8) != 0) { - filePath = (std_string *)((int)cacheEntry + 0xc); + filePath = (std_string *)(GHIDRA_INT(cacheEntry) + 0xc); } ((std::string *)(result->_buf))->std::string::string(filePath); ExceptionList = local_1c; @@ -2517,7 +2517,7 @@ void ModManager::ListMods() ehState = 0xffffffff; puStack_18 = &LAB_00b0790d; savedExceptionList = ExceptionList; - uVar5 = __security_cookie ^ (uint)(tmpString + 0x30); + uVar5 = __security_cookie ^ GHIDRA_UINT((tmpString + 0x30)); ExceptionList = &savedExceptionList; cleanupFlags = 0; pMStack_100e0 = (ModEntry *)0x0; @@ -2542,7 +2542,7 @@ void ModManager::ListMods() pbVar11 = pbVar6; pbVar6 = pbVar11 + 1; } while (*pbVar11 != 0); - ((std::string *)((char *)modPath))->std::string::assign(g_modsDirectory,(uint)(pbVar11 + -0xc72e28)); + ((std::string *)((char *)modPath))->std::string::assign(g_modsDirectory,GHIDRA_UINT((pbVar11 + -0xc72e28))); ehState = 0; pbVar6 = *(byte **)((char *)pvVar9 + uVar16 * 8 + 4); pbVar11 = pbVar6; @@ -2550,20 +2550,20 @@ void ModManager::ListMods() bVar3 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar3 != 0); - ((std::string *)((char *)modPath))->std::string::append(pbVar6,(int)pbVar11 - (int)(pbVar6 + 1)); + ((std::string *)((char *)modPath))->std::string::append(pbVar6,GHIDRA_INT(pbVar11) - GHIDRA_INT((pbVar6 + 1))); pMVar8 = (ModEntry *)modPath; if (0xf < modPathCapacity) { pMVar8 = modPath[0]; } - pMStack_100fc = (ModEntry *)(modPathSize->_buf + (int)&(*(undefined1 *)((char *)(pMVar8) + 0x0))); + pMStack_100fc = (ModEntry *)(modPathSize->_buf + GHIDRA_INT(&(*(undefined1 *)((char *)(pMVar8) + 0x0)))); pMVar10 = (ModEntry *)modPath; if (0xf < modPathCapacity) { pMVar10 = modPath[0]; } if (pMVar10 != pMStack_100fc) { - ptrDelta = (int)pMVar8 - (int)pMVar10; + ptrDelta = GHIDRA_INT(pMVar8) - GHIDRA_INT(pMVar10); do { - bVar3 = (*tolowerFn)((int)(char)*(byte *)pMVar10); + bVar3 = (*tolowerFn)(GHIDRA_INT((char)*(byte *)pMVar10)); *(byte *)((char *)pMVar10 + ptrDelta) = bVar3; pMVar10 = (ModEntry *)&(*(undefined1 *)((char *)(pMVar10) + 0x1)); } while (pMVar10 != pMStack_100fc); @@ -2578,7 +2578,7 @@ void ModManager::ListMods() operator_delete(pbVar6,1); } pMVar8 = operator_new(0xf04); - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; if (pMVar8 == (ModEntry *)0x0) { modEntry = (ModEntry *)0x0; } @@ -2586,15 +2586,15 @@ void ModManager::ListMods() ((ModEntry *)(pMVar8))->ModEntry::ModEntry(); modEntry = extraout_EAX; } - ehState = (uint)ehState._1_3_ << 8; + ehState = (*(undefined1 *)((char *)&(GHIDRA_UINT(ehState)) + 0x1)) << 8; pMStack_100fc = modEntry; if (piVar7 != (int *)0x0) { fileSize = (ModEntry **)(**(code **)(*piVar7 + 4))(); - pMStack_100e0 = operator_new_tracked((int)fileSize + 1); + pMStack_100e0 = operator_new_tracked(GHIDRA_INT(fileSize) + 1); pbVar6 = (byte *)0x1; ppMVar18 = fileSize; (**(code **)(*piVar7 + 0x14))(pMStack_100e0); - (&(*(undefined1 *)((char *)(pMStack_100e0) + 0x0)))[(int)fileSize] = 0; + (&(*(undefined1 *)((char *)(pMStack_100e0) + 0x0)))[GHIDRA_INT(fileSize)] = 0; (**(code **)*piVar7)(1); xmlPool = xmlPoolBuffer; xmlDoc = 0; @@ -2605,7 +2605,7 @@ void ModManager::ListMods() puStack_10098 = &uStack_94; uStack_94 = 0; uStack_90 = 0; - ehState = CONCAT31(ehState._1_3_,2); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),2); docFirstNode = (undefined4 *)0x0; uStack_100b0 = 0; pMStack_100d8 = pMStack_100e0; @@ -2663,9 +2663,9 @@ LAB_008f6596: pMVar8 = (ModEntry *)node[2]; } if (pMVar8 != pMStack_100d8) goto LAB_008f67da; - cmpEnd = pbVar11 + (int)&(*(undefined1 *)((char *)(pMVar8) + 0x0)); + cmpEnd = pbVar11 + GHIDRA_INT(&(*(undefined1 *)((char *)(pMVar8) + 0x0))); if (pbVar11 < cmpEnd) { - ptrDelta = (int)"metadata" - (int)pbVar11; + ptrDelta = GHIDRA_INT("metadata") - GHIDRA_INT(pbVar11); while (*pbVar11 == pbVar11[ptrDelta]) { pbVar11 = pbVar11 + 1; if (cmpEnd <= pbVar11) goto LAB_008f65d0; @@ -2673,7 +2673,7 @@ LAB_008f6596: goto LAB_008f67da; } LAB_008f65d0: - pvVar9 = ((xml_node *)(node))->xml_node::first_node(s_name,(int)pbVar6,bVar3); + pvVar9 = ((xml_node *)(node))->xml_node::first_node(s_name,GHIDRA_INT(pbVar6),bVar3); if (pvVar9 != (void *)0x0) { pbVar6 = &g_xmlNullStr; if (*(byte **)((char *)pvVar9 + 4) != (byte *)0x0) { @@ -2685,11 +2685,11 @@ LAB_008f65d0: bVar3 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar3 != 0); - uVar16 = (int)pbVar11 - (int)pMStack_100d8; + uVar16 = GHIDRA_INT(pbVar11) - GHIDRA_INT(pMStack_100d8); ((std::string *)(&(*(undefined1 *)((char *)(modEntry) + 0x18))))->std::string::assign(pbVar6,uVar16); bVar3 = (byte)uVar16; } - pvVar9 = ((xml_node *)(node))->xml_node::first_node((byte *)"directory",(int)pbVar6,bVar3); + pvVar9 = ((xml_node *)(node))->xml_node::first_node((byte *)"directory",GHIDRA_INT(pbVar6),bVar3); if (pvVar9 != (void *)0x0) { pbVar6 = &g_xmlNullStr; if (*(byte **)((char *)pvVar9 + 4) != (byte *)0x0) { @@ -2700,11 +2700,11 @@ LAB_008f65d0: bVar3 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar3 != 0); - uVar16 = (int)pbVar11 - (int)(pbVar6 + 1); + uVar16 = GHIDRA_INT(pbVar11) - GHIDRA_INT((pbVar6 + 1)); ((std::string *)((char *)modEntry))->std::string::assign(pbVar6,uVar16); bVar3 = (byte)uVar16; } - pvVar9 = ((xml_node *)(node))->xml_node::first_node((byte *)"description",(int)pbVar6,bVar3); + pvVar9 = ((xml_node *)(node))->xml_node::first_node((byte *)"description",GHIDRA_INT(pbVar6),bVar3); if (pvVar9 != (void *)0x0) { pbVar6 = &g_xmlNullStr; if (*(byte **)((char *)pvVar9 + 4) != (byte *)0x0) { @@ -2716,11 +2716,11 @@ LAB_008f65d0: bVar3 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar3 != 0); - uVar16 = (int)pbVar11 - (int)pMStack_100d8; + uVar16 = GHIDRA_INT(pbVar11) - GHIDRA_INT(pMStack_100d8); ((std::string *)(&(*(undefined1 *)((char *)(modEntry) + 0xa8))))->std::string::assign(pbVar6,uVar16); bVar3 = (byte)uVar16; } - pvVar9 = ((xml_node *)(node))->xml_node::first_node((byte *)"version",(int)pbVar6,bVar3); + pvVar9 = ((xml_node *)(node))->xml_node::first_node((byte *)"version",GHIDRA_INT(pbVar6),bVar3); if (pvVar9 != (void *)0x0) { pbVar6 = &g_xmlNullStr; if (*(byte **)((char *)pvVar9 + 4) != (byte *)0x0) { @@ -2732,11 +2732,11 @@ LAB_008f65d0: bVar3 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar3 != 0); - uVar16 = (int)pbVar11 - (int)pMStack_100d8; + uVar16 = GHIDRA_INT(pbVar11) - GHIDRA_INT(pMStack_100d8); ((std::string *)(&(*(undefined1 *)((char *)(modEntry) + 0x78))))->std::string::assign(pbVar6,uVar16); bVar3 = (byte)uVar16; } - pvVar9 = ((xml_node *)(node))->xml_node::first_node(s_id,(int)pbVar6,bVar3); + pvVar9 = ((xml_node *)(node))->xml_node::first_node(s_id,GHIDRA_INT(pbVar6),bVar3); if (pvVar9 != (void *)0x0) { pbVar6 = &g_xmlNullStr; if (*(byte **)((char *)pvVar9 + 4) != (byte *)0x0) { @@ -2748,11 +2748,11 @@ LAB_008f65d0: bVar3 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar3 != 0); - uVar16 = (int)pbVar11 - (int)pMStack_100d8; + uVar16 = GHIDRA_INT(pbVar11) - GHIDRA_INT(pMStack_100d8); ((std::string *)(&(*(undefined1 *)((char *)(modEntry) + 0x90))))->std::string::assign(pbVar6,uVar16); bVar3 = (byte)uVar16; } - pvVar9 = ((xml_node *)(node))->xml_node::first_node((byte *)"visibility",(int)pbVar6,bVar3); + pvVar9 = ((xml_node *)(node))->xml_node::first_node((byte *)"visibility",GHIDRA_INT(pbVar6),bVar3); if (pvVar9 != (void *)0x0) { pbVar6 = &g_xmlNullStr; if (*(byte **)((char *)pvVar9 + 4) != (byte *)0x0) { @@ -2764,11 +2764,11 @@ LAB_008f65d0: bVar3 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar3 != 0); - uVar16 = (int)pbVar11 - (int)pMStack_100d8; + uVar16 = GHIDRA_INT(pbVar11) - GHIDRA_INT(pMStack_100d8); ((std::string *)(&(*(undefined1 *)((char *)(modEntry) + 0xc0))))->std::string::assign(pbVar6,uVar16); bVar3 = (byte)uVar16; } - pMStack_100d8 = ((xml_node *)(node))->xml_node::first_node(&DAT_00b6e3b4,(int)pbVar6,bVar3); + pMStack_100d8 = ((xml_node *)(node))->xml_node::first_node(&DAT_00b6e3b4,GHIDRA_INT(pbVar6),bVar3); if (pMStack_100d8 != (ModEntry *)0x0) { LAB_008f67a0: pMVar8 = modEntry; @@ -2789,9 +2789,9 @@ LAB_008f67a0: pbVar11 = (byte *)node[2]; } if (pbVar11 == pbStack_100e4) { - pbVar11 = pbVar11 + (int)pbVar6; + pbVar11 = pbVar11 + GHIDRA_INT(pbVar6); if (pbVar11 <= pbVar6) goto LAB_008f6921; - ptrDelta = (int)s_id - (int)pbVar6; + ptrDelta = GHIDRA_INT(s_id) - GHIDRA_INT(pbVar6); while (*pbVar6 == pbVar6[ptrDelta]) { pbVar6 = pbVar6 + 1; if (pbVar11 <= pbVar6) goto LAB_008f6921; @@ -2807,15 +2807,15 @@ LAB_008f6921: } tmpStringSize = 0; tmpStringCapacity = 0xf; - tmpString._0_4_ = (byte *)0x0; + (*(undefined4 *)((char *)&(tmpString) + 0x0)) = (byte *)0x0; pbVar11 = pbVar6; do { bVar3 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar3 != 0); - ((std::string *)(tmpString))->std::string::assign(pbVar6,(int)pbVar11 - (int)(pbVar6 + 1)); - uVar2 = tmpString._0_4_; - ehState._0_1_ = 3; + ((std::string *)(tmpString))->std::string::assign(pbVar6,GHIDRA_INT(pbVar11) - GHIDRA_INT((pbVar6 + 1))); + uVar2 = (*(undefined4 *)((char *)&(tmpString) + 0x0)); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 3; psVar12 = *(std_string **)&(*(undefined1 *)((char *)(pMVar8) + 0xdc)); if (psVar12 == *(std_string **)&(*(undefined1 *)((char *)(pMVar8) + 0xe0))) { vector_string_emplace_reallocate_move @@ -2823,24 +2823,24 @@ LAB_008f6921: uVar16 = tmpStringCapacity; } else { - tmpString._0_4_ = tmpString._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(tmpString) + 0x0)) = (*(undefined4 *)((char *)&(tmpString) + 0x0)) & 0xffffff00; *(undefined4 *)psVar12->_buf = uVar2; - *(undefined4 *)(psVar12->_buf + 4) = tmpString._4_4_; - *(undefined4 *)(psVar12->_buf + 8) = tmpString._8_4_; + *(undefined4 *)(psVar12->_buf + 4) = (*(undefined4 *)((char *)&(tmpString) + 0x4)); + *(undefined4 *)(psVar12->_buf + 8) = (*(undefined4 *)((char *)&(tmpString) + 0x8)); *(int *)(psVar12->_buf + 0xc) = iStack_34; psVar12->_size = tmpStringSize; psVar12->_capacity = tmpStringCapacity; *(int *)&(*(undefined1 *)((char *)(pMVar8) + 0xdc)) = *(int *)&(*(undefined1 *)((char *)(pMVar8) + 0xdc)) + 0x18; uVar16 = 0xf; } - ehState = CONCAT31(ehState._1_3_,2); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),2); if (0xf < uVar16) { size = uVar16 + 1; - pbVar6 = (byte *)tmpString._0_4_; + pbVar6 = (*(undefined4 *)((char *)&((byte *)tmpString) + 0x0)); if (0xfff < size) { - pbVar6 = *(byte **)(tmpString._0_4_ + -4); + pbVar6 = *(byte **)((*(undefined4 *)((char *)&(tmpString) + 0x0)) + -4); size = uVar16 + 0x24; - if ((byte *)0x1f < (byte *)(tmpString._0_4_ + (-4 - (int)pbVar6))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(tmpString) + 0x0)) + (-4 - GHIDRA_INT(pbVar6)))) goto LAB_008f70a8; } operator_delete(pbVar6,size); @@ -2863,9 +2863,9 @@ LAB_008f6921: pcVar15 = *(char **)&(*(undefined1 *)((char *)(pMStack_100d8) + 0x8)); } if (pcVar15 == pcVar17 + -0xb6e3b3) { - pbVar11 = pbVar6 + (int)pcVar15; + pbVar11 = pbVar6 + GHIDRA_INT(pcVar15); if (pbVar11 <= pbVar6) goto LAB_008f67a0; - ptrDelta = (int)&DAT_00b6e3b4 - (int)pbVar6; + ptrDelta = GHIDRA_INT(&DAT_00b6e3b4) - GHIDRA_INT(pbVar6); while (*pbVar6 == pbVar6[ptrDelta]) { pbVar6 = pbVar6 + 1; if (pbVar11 <= pbVar6) goto LAB_008f67a0; @@ -2878,11 +2878,11 @@ LAB_008f6921: } } LAB_008f67e5: - ehState._0_1_ = 4; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 4; tracked_alloc(1,pMStack_100e0,0); - ehState._0_1_ = 5; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; ((xml_memory_pool *)(&xmlPool))->xml_memory_pool::clear(); - ehState = (uint)ehState._1_3_ << 8; + ehState = (*(undefined1 *)((char *)&(GHIDRA_UINT(ehState)) + 0x1)) << 8; } cStack_100d1 = '\0'; if (*(int *)&(*(undefined1 *)((char *)(modEntry) + 0x28)) == 0) { @@ -2892,7 +2892,7 @@ LAB_008f67e5: bVar3 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar3 != 0); - ((std::string *)(&(*(undefined1 *)((char *)(modEntry) + 0x18))))->std::string::assign(pbVar6,(int)pbVar11 - (int)(pbVar6 + 1)); + ((std::string *)(&(*(undefined1 *)((char *)(modEntry) + 0x18))))->std::string::assign(pbVar6,GHIDRA_INT(pbVar11) - GHIDRA_INT((pbVar6 + 1))); cStack_100d1 = '\x01'; } if (*(int *)&(*(undefined1 *)((char *)(modEntry) + 0x10)) == 0) { @@ -2902,7 +2902,7 @@ LAB_008f67e5: bVar3 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar3 != 0); - ((std::string *)((char *)modEntry))->std::string::assign(pbVar6,(int)pbVar11 - (int)(pbVar6 + 1)); + ((std::string *)((char *)modEntry))->std::string::assign(pbVar6,GHIDRA_INT(pbVar11) - GHIDRA_INT((pbVar6 + 1))); cStack_100d1 = '\x01'; } if (*(int *)&(*(undefined1 *)((char *)(modEntry) + 0x88)) == 0) { @@ -2923,10 +2923,10 @@ LAB_008f6a7e: pMVar8 = *(ModEntry **)modEntry; } if (pMVar8 != pMStack_100e0) { - ptrDelta = (int)pMVar10 - (int)pMVar8; + ptrDelta = GHIDRA_INT(pMVar10) - GHIDRA_INT(pMVar8); do { - bVar3 = (*tolowerFn)((int)(char)*(byte *)pMVar8); - *(byte *)(ptrDelta + (int)pMVar8) = bVar3; + bVar3 = (*tolowerFn)(GHIDRA_INT((char)*(byte *)pMVar8)); + *(byte *)(ptrDelta + GHIDRA_INT(pMVar8)) = bVar3; pMVar8 = (ModEntry *)&(*(undefined1 *)((char *)(pMVar8) + 0x1)); } while (pMVar8 != pMStack_100e0); } @@ -2946,10 +2946,10 @@ LAB_008f6a7e: if (0xf < *(uint *)&(*(undefined1 *)((char *)(modEntry) + 0x14))) { pMVar10 = *(ModEntry **)modEntry; } - ((std::string *)((char *)modSaveDirTmp))->std::string::concat((int)pbStack_100e4,psVar12,&DAT_00c73228, - (uint)psVar12,(byte *)pMVar10,*(uint *)&(*(undefined1 *)((char *)(modEntry) + 0x10))); + ((std::string *)((char *)modSaveDirTmp))->std::string::concat(GHIDRA_INT(pbStack_100e4),psVar12,&DAT_00c73228, + GHIDRA_UINT(psVar12),(byte *)pMVar10,*(uint *)&(*(undefined1 *)((char *)(modEntry) + 0x10))); cleanupFlags = cleanupFlags | 1; - ehState = CONCAT31(ehState._1_3_,6); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),6); piVar7 = ((std::string *)((char *)modSaveDirTmp))->std::string::append((byte *)&DAT_00b6db28,1); puVar14 = &(*(undefined1 *)((char *)(pMVar8) + 0x60)); pvStack_70 = (void *)*piVar7; @@ -2963,7 +2963,7 @@ LAB_008f6a7e: *(undefined1 *)piVar7 = 0; saveDirTmpSize = saveDirSize; saveDirTmpCapacity = pbStack_100e4; - tmpString._8_4_ = pvStack_70; + (*(undefined4 *)((char *)&(tmpString) + 0x8)) = pvStack_70; iStack_34 = iStack_6c; tmpStringSize = uStack_68; tmpStringCapacity = uStack_64; @@ -2974,14 +2974,14 @@ LAB_008f6a7e: if ((byte *)0xfff < pbVar6) { pvVar9 = *(void **)((char *)pvStack_70 + -4); pbVar6 = pbStack_100e4 + 0x24; - if (0x1f < (uint)((int)pvStack_70 + (-4 - (int)pvVar9))) goto LAB_008f70a8; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvStack_70) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_008f70a8; } - operator_delete(pvVar9,(uint)pbVar6); + operator_delete(pvVar9,GHIDRA_UINT(pbVar6)); } } else { ((std::string *)(puVar14))->std::string::_Tidy_deallocate(); - *(undefined4 *)puVar14 = tmpString._8_4_; + *(undefined4 *)puVar14 = (*(undefined4 *)((char *)&(tmpString) + 0x8)); *(int *)&(*(undefined1 *)((char *)(pMVar8) + 0x64)) = iStack_34; *(uint *)&(*(undefined1 *)((char *)(pMVar8) + 0x68)) = tmpStringSize; *(uint *)&(*(undefined1 *)((char *)(pMVar8) + 0x6c)) = tmpStringCapacity; @@ -2993,9 +2993,9 @@ LAB_008f6a7e: uVar16 = modSaveDirTmpCapacity + 1; pvVar9 = modSaveDirTmp[0]; if (0xfff < uVar16) { - pvVar9 = *(void **)((int)modSaveDirTmp[0] + -4); + pvVar9 = *(void **)(GHIDRA_INT(modSaveDirTmp[0]) + -4); uVar16 = modSaveDirTmpCapacity + 0x24; - if (0x1f < (uint)((int)modSaveDirTmp[0] + (-4 - (int)pvVar9))) goto LAB_008f70a8; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(modSaveDirTmp[0]) + (-4 - GHIDRA_INT(pvVar9))))) goto LAB_008f70a8; } operator_delete(pvVar9,uVar16); } @@ -3014,10 +3014,10 @@ LAB_008f6c13: puVar14 = puVar13; } if (pcVar15 != pcVar17) { - pbStack_100e4 = puVar14 + -(int)pcVar15; + pbStack_100e4 = puVar14 + -GHIDRA_INT(pcVar15); do { - cVar4 = (*tolowerFn)((int)*pcVar15); - pcVar15[(int)pbStack_100e4] = cVar4; + cVar4 = (*tolowerFn)(GHIDRA_INT(*pcVar15)); + pcVar15[GHIDRA_INT(pbStack_100e4)] = cVar4; pcVar15 = pcVar15 + 1; } while (pcVar15 != pcVar17); } @@ -3027,7 +3027,7 @@ LAB_008f6c13: bVar3 = *pbVar11; pbVar11 = pbVar11 + 1; } while (bVar3 != 0); - ((std::string *)((char *)modEntry))->std::string::assign(pbVar6,(int)pbVar11 - (int)(pbVar6 + 1)); + ((std::string *)((char *)modEntry))->std::string::assign(pbVar6,GHIDRA_INT(pbVar11) - GHIDRA_INT((pbVar6 + 1))); if (*(uint *)&(*(undefined1 *)((char *)(modEntry) + 0x14)) < 0x10) { pMStack_100e0 = (ModEntry *)(&(*(undefined1 *)((char *)(modEntry) + 0x0)) + *(int *)&(*(undefined1 *)((char *)(modEntry) + 0x10))); pMVar8 = modEntry; @@ -3042,14 +3042,14 @@ LAB_008f6c95: pMVar8 = *(ModEntry **)modEntry; } if (pMVar8 != pMStack_100e0) { - ptrDelta = (int)pMVar10 - (int)pMVar8; + ptrDelta = GHIDRA_INT(pMVar10) - GHIDRA_INT(pMVar8); do { - bVar3 = (*tolowerFn)((int)(char)*(byte *)pMVar8); + bVar3 = (*tolowerFn)(GHIDRA_INT((char)*(byte *)pMVar8)); *(byte *)((char *)pMVar8 + ptrDelta) = bVar3; pMVar8 = (ModEntry *)&(*(undefined1 *)((char *)(pMVar8) + 0x1)); } while (pMVar8 != pMStack_100e0); } - if (0x7fffffffU - (int)modPathSize < 0xb) { + if (0x7fffffffU - GHIDRA_INT(modPathSize) < 0xb) { LAB_008f70e6: /* WARNING: Subroutine does not return */ std::string::_Xlen(); @@ -3058,71 +3058,71 @@ LAB_008f70e6: if (0xf < modPathCapacity) { pMVar8 = modPath[0]; } - ((std::string *)(tmpString))->std::string::concat((int)pbStack_100e4,modPathSize,(byte *)pMVar8, - (uint)modPathSize,(byte *)"/resources/",0xb); + ((std::string *)(tmpString))->std::string::concat(GHIDRA_INT(pbStack_100e4),modPathSize,(byte *)pMVar8, + GHIDRA_UINT(modPathSize),(byte *)"/resources/",0xb); pMVar8 = modEntry; puVar14 = &(*(undefined1 *)((char *)(modEntry) + 0x30)); if (puVar14 == tmpString) { if (0xf < tmpStringCapacity) { uVar16 = tmpStringCapacity + 1; - pbVar6 = (byte *)tmpString._0_4_; + pbVar6 = (*(undefined4 *)((char *)&((byte *)tmpString) + 0x0)); if (0xfff < uVar16) { - pbVar6 = *(byte **)(tmpString._0_4_ + -4); + pbVar6 = *(byte **)((*(undefined4 *)((char *)&(tmpString) + 0x0)) + -4); uVar16 = tmpStringCapacity + 0x24; - if ((byte *)0x1f < (byte *)(tmpString._0_4_ + (-4 - (int)pbVar6))) goto LAB_008f70a8; + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(tmpString) + 0x0)) + (-4 - GHIDRA_INT(pbVar6)))) goto LAB_008f70a8; } operator_delete(pbVar6,uVar16); } } else { ((std::string *)(puVar14))->std::string::_Tidy_deallocate(); - *(undefined4 *)puVar14 = tmpString._0_4_; - *(undefined4 *)&(*(undefined1 *)((char *)(pMVar8) + 0x34)) = tmpString._4_4_; - *(undefined4 *)&(*(undefined1 *)((char *)(pMVar8) + 0x38)) = tmpString._8_4_; + *(undefined4 *)puVar14 = (*(undefined4 *)((char *)&(tmpString) + 0x0)); + *(undefined4 *)&(*(undefined1 *)((char *)(pMVar8) + 0x34)) = (*(undefined4 *)((char *)&(tmpString) + 0x4)); + *(undefined4 *)&(*(undefined1 *)((char *)(pMVar8) + 0x38)) = (*(undefined4 *)((char *)&(tmpString) + 0x8)); *(int *)&(*(undefined1 *)((char *)(pMVar8) + 0x3c)) = iStack_34; *(uint *)&(*(undefined1 *)((char *)(pMVar8) + 0x40)) = tmpStringSize; *(uint *)&(*(undefined1 *)((char *)(pMVar8) + 0x44)) = tmpStringCapacity; } - if (0x7fffffffU - (int)modPathSize < 9) goto LAB_008f70e6; + if (0x7fffffffU - GHIDRA_INT(modPathSize) < 9) goto LAB_008f70e6; pMVar10 = (ModEntry *)modPath; if (0xf < modPathCapacity) { pMVar10 = modPath[0]; } - ((std::string *)(tmpString))->std::string::concat((int)pbStack_100e4,modPathSize,(byte *)pMVar10, - (uint)modPathSize,(byte *)"/content/",9); + ((std::string *)(tmpString))->std::string::concat(GHIDRA_INT(pbStack_100e4),modPathSize,(byte *)pMVar10, + GHIDRA_UINT(modPathSize),(byte *)"/content/",9); puVar14 = &(*(undefined1 *)((char *)(pMVar8) + 0x48)); if (puVar14 == tmpString) { if (0xf < tmpStringCapacity) { uVar16 = tmpStringCapacity + 1; - pbVar6 = (byte *)tmpString._0_4_; + pbVar6 = (*(undefined4 *)((char *)&((byte *)tmpString) + 0x0)); if (0xfff < uVar16) { - pbVar6 = *(byte **)(tmpString._0_4_ + -4); + pbVar6 = *(byte **)((*(undefined4 *)((char *)&(tmpString) + 0x0)) + -4); uVar16 = tmpStringCapacity + 0x24; - if ((byte *)0x1f < (byte *)(tmpString._0_4_ + (-4 - (int)pbVar6))) goto LAB_008f70a8; + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(tmpString) + 0x0)) + (-4 - GHIDRA_INT(pbVar6)))) goto LAB_008f70a8; } operator_delete(pbVar6,uVar16); } } else { ((std::string *)(puVar14))->std::string::_Tidy_deallocate(); - *(undefined4 *)puVar14 = tmpString._0_4_; - *(undefined4 *)&(*(undefined1 *)((char *)(pMVar8) + 0x4c)) = tmpString._4_4_; - *(undefined4 *)&(*(undefined1 *)((char *)(pMVar8) + 0x50)) = tmpString._8_4_; + *(undefined4 *)puVar14 = (*(undefined4 *)((char *)&(tmpString) + 0x0)); + *(undefined4 *)&(*(undefined1 *)((char *)(pMVar8) + 0x4c)) = (*(undefined4 *)((char *)&(tmpString) + 0x4)); + *(undefined4 *)&(*(undefined1 *)((char *)(pMVar8) + 0x50)) = (*(undefined4 *)((char *)&(tmpString) + 0x8)); *(int *)&(*(undefined1 *)((char *)(pMVar8) + 0x54)) = iStack_34; *(uint *)&(*(undefined1 *)((char *)(pMVar8) + 0x58)) = tmpStringSize; *(uint *)&(*(undefined1 *)((char *)(pMVar8) + 0x5c)) = tmpStringCapacity; } - if (0x7fffffffU - (int)modPathSize < 0xb) goto LAB_008f70e6; + if (0x7fffffffU - GHIDRA_INT(modPathSize) < 0xb) goto LAB_008f70e6; pMVar10 = (ModEntry *)modPath; if (0xf < modPathCapacity) { pMVar10 = modPath[0]; } - ((std::string *)(tmpString))->std::string::concat((int)pbStack_100e4,modPathSize,(byte *)pMVar10, - (uint)modPathSize,(byte *)"/disable.it",0xb); - ehState = CONCAT31(ehState._1_3_,7); + ((std::string *)(tmpString))->std::string::concat(GHIDRA_INT(pbStack_100e4),modPathSize,(byte *)pMVar10, + GHIDRA_UINT(modPathSize),(byte *)"/disable.it",0xb); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),7); pbVar6 = tmpString; if (0xf < tmpStringCapacity) { - pbVar6 = (byte *)tmpString._0_4_; + pbVar6 = (*(undefined4 *)((char *)&((byte *)tmpString) + 0x0)); } pbVar6 = FileSystem::ResolvePath(pbVar6); cStack_100d1 = pbVar6 != (byte *)0x0; @@ -3131,29 +3131,29 @@ LAB_008f70e6: allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar16 = *(uint *)(pbVar6 + -4); prevAllocated = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar16; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar16; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocated < uVar16); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocated) < uVar16)); free(pbVar6 + -4); } ehState = ehState & 0xffffff00; if (0xf < tmpStringCapacity) { uVar16 = tmpStringCapacity + 1; - pbVar6 = (byte *)tmpString._0_4_; + pbVar6 = (*(undefined4 *)((char *)&((byte *)tmpString) + 0x0)); if (0xfff < uVar16) { - pbVar6 = *(byte **)(tmpString._0_4_ + -4); + pbVar6 = *(byte **)((*(undefined4 *)((char *)&(tmpString) + 0x0)) + -4); uVar16 = tmpStringCapacity + 0x24; - if ((byte *)0x1f < (byte *)(tmpString._0_4_ + (-4 - (int)pbVar6))) goto LAB_008f70a8; + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(tmpString) + 0x0)) + (-4 - GHIDRA_INT(pbVar6)))) goto LAB_008f70a8; } operator_delete(pbVar6,uVar16); } tmpStringSize = 0; tmpStringCapacity = 0xf; - tmpString._0_4_ = tmpString._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(tmpString) + 0x0)) = (*(undefined4 *)((char *)&(tmpString) + 0x0)) & 0xffffff00; if (cStack_100d1 == '\0') { bVar3 = (g_manager->_optionsConfig)._enableMods; } @@ -3162,26 +3162,26 @@ LAB_008f70e6: } pMVar8->_loaded = bVar3; pMVar8->_enabled = cStack_100d1 == '\0'; - if (0x7fffffffU - (int)modPathSize < 10) goto LAB_008f70e6; + if (0x7fffffffU - GHIDRA_INT(modPathSize) < 10) goto LAB_008f70e6; pMVar10 = (ModEntry *)modPath; if (0xf < modPathCapacity) { pMVar10 = modPath[0]; } - ((std::string *)(tmpString))->std::string::concat((int)freeFn,modPathSize,(byte *)pMVar10,(uint)modPathSize, + ((std::string *)(tmpString))->std::string::concat(GHIDRA_INT(freeFn),modPathSize,(byte *)pMVar10,GHIDRA_UINT(modPathSize), (byte *)"/update.it",10); cleanupFlags = cleanupFlags | 0x3e; - ehState._0_1_ = 9; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 9; pbVar6 = tmpString; if (0xf < tmpStringCapacity) { - pbVar6 = (byte *)tmpString._0_4_; + pbVar6 = (*(undefined4 *)((char *)&((byte *)tmpString) + 0x0)); } pbVar6 = FileSystem::ResolvePath(pbVar6); cStack_100d1 = pbVar6 != (byte *)0x0; if (pbVar6 != (byte *)0x0) { - ehState._0_1_ = 10; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 10; tracked_alloc(1,pbVar6,0); } - ehState = (uint)ehState._1_3_ << 8; + ehState = (*(undefined1 *)((char *)&(GHIDRA_UINT(ehState)) + 0x1)) << 8; ((std::string *)(tmpString))->std::string::_Tidy_deallocate(); if (cStack_100d1 != '\0') { pMVar8->_enabled = 0; @@ -3198,7 +3198,7 @@ LAB_008f70e6: } else { *(ModEntry **)MVar1 = pMVar8; - this[1] = (ModManager)((int)this[1] + 4); + this[1] = (ModManager)(GHIDRA_INT(this[1]) + 4); } KAGE_LogMessage(1,(byte *)"LOADED MOD %s\n"); ehState = 0xffffffff; @@ -3208,7 +3208,7 @@ LAB_008f70e6: if (0xfff < uVar16) { pMVar8 = *(ModEntry **)&(*(undefined1 *)((char *)&(modPath[0][-1]) + 0xfa)); uVar16 = modPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)modPath[0] + (-4 - (int)pMVar8))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(modPath[0]) + (-4 - GHIDRA_INT(pMVar8)))) { LAB_008f70a8: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3223,13 +3223,13 @@ LAB_008f70a8: } while (dirIndex < dirEntryCount); } if (dirEntries != (void *)0x0) { - ptr = (uint *)((int)dirEntries + -4); + ptr = (uint *)(GHIDRA_INT(dirEntries) + -4); ehState = 0xb; _eh_vector_destructor_iterator_(dirEntries,8,*ptr,FUN_00a5a420); operator_delete(ptr,*ptr * 8 + 4); ehState = 0xffffffff; } - std::_Sort_unchecked((int)this[1] - (int)*this >> 2,FUN_008f6190,uVar5); + std::_Sort_unchecked(GHIDRA_INT(this[1]) - GHIDRA_INT(*this) >> 2,FUN_008f6190,uVar5); MVar1 = this[0x8097]; if (MVar1 != (ModManager)0x3) { if (enabledModCount == 0) { @@ -3286,7 +3286,7 @@ void ModManager::create_shader_render_targets() local_8 = 0xffffffff; puStack_c = &LAB_00b079dd; local_10 = ExceptionList; - uVar4 = __security_cookie ^ (uint)(tmpTarget + 0x1c); + uVar4 = __security_cookie ^ GHIDRA_UINT((tmpTarget + 0x1c)); ExceptionList = &local_10; modSlot = *this; modManager = this; @@ -3317,7 +3317,7 @@ void ModManager::create_shader_render_targets() uVar2 = *extraout_EAX; *extraout_EAX = *shaderTarget; *shaderTarget = uVar2; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); if (((tmpTargetRefCount != (int *)0x0) && (cVar3 = (**(code **)(*tmpTargetRefCount + 0xc))(uVar4), cVar3 != '\0')) && (g_renderTargetReleaseFn != (void *)0x0)) { @@ -3340,7 +3340,7 @@ void ModManager::create_shader_render_targets() shaderNode = (int *)*shaderNode; } while (shaderNode != (int *)*(int *)(*(int *)modSlot + 0xe4)); } - modSlot = (ModManager)((int)modSlot + 4); + modSlot = (ModManager)(GHIDRA_INT(modSlot) + 4); } while (modSlot != modManager[1]); } ExceptionList = local_10; @@ -3372,7 +3372,7 @@ void ModManager::unload_shaders() local_8 = 0xffffffff; puStack_c = &LAB_00b07a00; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; modIter = *this; if (modIter != this[1]) { @@ -3390,7 +3390,7 @@ void ModManager::unload_shaders() if (5 < *(int *)(iVar2 + 0x74) + 5U) { do { iVar2 = *(int *)(*(int *)(iVar2 + 0x7c) + uVar3 * 8); - allocCounter = (qword *)((int)mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(mainHeap) + 0x30); if (mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } @@ -3398,9 +3398,9 @@ void ModManager::unload_shaders() allocHeader = (uint *)(iVar2 + -4); blockSize = *allocHeader; oldBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - blockSize; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - blockSize; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)oldBytes < blockSize); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(oldBytes) < blockSize)); free(allocHeader); mainHeap = g_mainHeap; } @@ -3413,14 +3413,14 @@ void ModManager::unload_shaders() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(mainHeap) + 0x30); } if (iVar2 != 0) { uVar3 = *(uint *)(iVar2 + -4); oldBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar3; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar3; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)oldBytes < uVar3); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(oldBytes) < uVar3)); free((void *)(iVar2 + -4)); } local_8 = 0xffffffff; @@ -3459,7 +3459,7 @@ void ModManager::unload_shaders() *(int *)(*(int *)(iVar2 + 0xe4) + 4) = *(int *)(iVar2 + 0xe4); *(undefined4 *)(iVar2 + 0xe8) = 0; } - modIter = (ModManager)((int)modIter + 4); + modIter = (ModManager)(GHIDRA_INT(modIter) + 4); } while (modIter != this[1]); } ExceptionList = local_10; @@ -3517,11 +3517,11 @@ void ModManager::LoadModRooms(int stageId, int mode) void *local_14; puStack_20 = (undefined1 *)(baseName + 0x14); - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; puStack_18 = &LAB_00b07a78; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(baseName + 0x11); + local_24 = __security_cookie ^ GHIDRA_UINT((baseName + 0x11)); ExceptionList = &local_1c; savedStageId = stageId; savedMode = mode; @@ -3535,15 +3535,15 @@ void ModManager::LoadModRooms(int stageId, int mode) ((RoomConfigStage *)(local_90))->RoomConfigStage::GetDisplayName((std_string *)displayName,0x14); local_14 = (void *)0x0; KAGE_LogMessage(1,(byte *)"[ModManager] load stage %d: %s (mode %d)\n"); - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; if (0xf < uStack_70) { uVar6 = uStack_70 + 1; pvVar5 = displayName[0]; if (0xfff < uVar6) { - pvVar5 = *(void **)((int)displayName[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(displayName[0]) + -4); uVar6 = uStack_70 + 0x24; - if (0x1f < (uint)((int)displayName[0] + (-4 - (int)pvVar5))) goto LAB_008f868f; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(displayName[0]) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_008f868f; } operator_delete(pvVar5,uVar6); } @@ -3552,15 +3552,15 @@ void ModManager::LoadModRooms(int stageId, int mode) uStack_44 = 0; uStack_40 = 0xf; baseName[0] = (void *)0x0; - length = (RoomConfig_Stage)((int)RVar2 - 3U); - if ((uint)RVar2 < (int)RVar2 - 3U) { + length = (RoomConfig_Stage)(GHIDRA_INT(RVar2) - 3U); + if (GHIDRA_UINT(RVar2) < GHIDRA_INT(RVar2) - 3U) { length = RVar2; } RVar2 = RVar4; - if (0xf < (uint)*(RoomConfig_Stage *)((char *)RVar4 + 0x14)) { + if (0xf < GHIDRA_UINT(*(RoomConfig_Stage *)((char *)RVar4 + 0x14))) { RVar2 = *(RoomConfig_Stage *)RVar4; } - ((std::string *)((char *)baseName))->std::string::assign((byte *)RVar2,(uint)length); + ((std::string *)((char *)baseName))->std::string::assign((byte *)RVar2,GHIDRA_UINT(length)); local_14 = (void *)0x1; appendedPath = ((std::string *)((char *)baseName))->std::string::append(&UNK_00b6cb40,3); fileName = (void *)*appendedPath; @@ -3572,27 +3572,27 @@ void ModManager::LoadModRooms(int stageId, int mode) appendedPath[4] = 0; appendedPath[5] = 0xf; *(undefined1 *)appendedPath = 0; - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; ((Mod *)(local_90))->Mod::GetContentPath((std_string *)contentPath,(std_string *)&fileName); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; if (0xf < uStack_58) { uVar6 = uStack_58 + 1; pvVar5 = fileName; if (0xfff < uVar6) { pvVar5 = *(void **)((char *)fileName + -4); uVar6 = uStack_58 + 0x24; - if (0x1f < (uint)((int)fileName + (-4 - (int)pvVar5))) goto LAB_008f868f; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(fileName) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_008f868f; } operator_delete(pvVar5,uVar6); } - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; if (0xf < uStack_40) { uVar6 = uStack_40 + 1; pvVar5 = baseName[0]; if (0xfff < uVar6) { - pvVar5 = *(void **)((int)baseName[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(baseName[0]) + -4); uVar6 = uStack_40 + 0x24; - if (0x1f < (uint)((int)baseName[0] + (-4 - (int)pvVar5))) goto LAB_008f868f; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(baseName[0]) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_008f868f; } operator_delete(pvVar5,uVar6); } @@ -3602,13 +3602,13 @@ void ModManager::LoadModRooms(int stageId, int mode) psVar3 = contentPath[0]; } uStack_40 = 0xf; - baseName[0] = (void *)((uint)baseName[0] & 0xffffff00); + baseName[0] = (void *)(GHIDRA_UINT(baseName[0]) & 0xffffff00); ptr_00 = FileSystem::ResolvePath((byte *)psVar3); isPathFound = ptr_00 != (byte *)0x0; if (ptr_00 != (byte *)0x0) { - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; tracked_alloc(1,ptr_00,0); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; } if (isPathFound != '\0') { psVar3 = (std_string *)contentPath; @@ -3637,7 +3637,7 @@ LAB_008f8695: } psVar3 = (std_string *)contentPath[0][-1]._capacity; uVar6 = uStack_28 + 0x24; - if ((byte *)((int)contentPath[0] + (-4 - (int)psVar3)) < (byte *)0x20) + if ((byte *)(GHIDRA_INT(contentPath[0]) + (-4 - GHIDRA_INT(psVar3))) < (byte *)0x20) goto LAB_008f8695; goto LAB_008f868f; } @@ -3650,11 +3650,11 @@ LAB_008f8695: KAGE_LogMessage(1,(byte *)"reallocate %d rooms.\n"); pRStack_b4 = (RoomConfig_Stage *)(*(int *)((char *)RVar4 + 0x1c) + roomCount); local_90 = (RoomConfig_Stage *)0x0; - uVar6 = -(uint)((int)(ZEXT48(pRStack_b4) * 0x5c >> 0x20) != 0) | - (uint)(ZEXT48(pRStack_b4) * 0x5c); - uStack_8c = (uint)pRStack_b4; - puStack_9c = operator_new_tracked(-(uint)(0xfffffffb < uVar6) | uVar6 + 4); - local_14._0_1_ = 7; + uVar6 = -GHIDRA_UINT((GHIDRA_INT((ZEXT48(pRStack_b4) * 0x5c >> 0x20)) != 0)) | + GHIDRA_UINT((ZEXT48(pRStack_b4) * 0x5c)); + uStack_8c = GHIDRA_UINT(pRStack_b4); + puStack_9c = operator_new_tracked(-GHIDRA_UINT((0xfffffffb < uVar6)) | uVar6 + 4); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; if (puStack_9c == (uint *)0x0) { puStack_9c = (uint *)0x0; } @@ -3665,7 +3665,7 @@ LAB_008f8695: (puStack_9c,0x5c,uStack_8c,(_func_void_void_ptr *)&UNK_00828b20, RoomConfigRoom::dtor); } - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; oldRoom = *(RoomConfig_Stage **)((char *)RVar4 + 0x18); pRStack_b4 = oldRoom + *(int *)((char *)RVar4 + 0x1c) * 0x17; if (oldRoom != pRStack_b4) { @@ -3679,10 +3679,10 @@ LAB_008f8695: local_90[2] = pRVar8[-6]; if (local_90 + 3 != pRVar8 + -5) { RVar4 = (RoomConfig_Stage)(pRVar8 + -5); - if (0xf < (uint)*pRVar8) { + if (0xf < GHIDRA_UINT(*pRVar8)) { RVar4 = *(RoomConfig_Stage *)RVar4; } - ((std::string *)((char *)(local_90 + 3)))->std::string::assign((byte *)RVar4,(uint)pRVar8[-1]); + ((std::string *)((char *)(local_90 + 3)))->std::string::assign((byte *)RVar4,GHIDRA_UINT(pRVar8[-1])); } oldRoom = oldRoom + 0x17; local_90[9] = pRVar8[1]; @@ -3709,10 +3709,10 @@ LAB_008f8695: } if (oldRoom != (RoomConfig_Stage *)0x0) { pRVar8 = oldRoom + -1; - local_14._0_1_ = 8; - _eh_vector_destructor_iterator_(oldRoom,0x5c,(uint)*pRVar8,RoomConfigRoom::dtor); - operator_delete(pRVar8,(int)*pRVar8 * 0x5c + 4); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; + _eh_vector_destructor_iterator_(oldRoom,0x5c,GHIDRA_UINT(*pRVar8),RoomConfigRoom::dtor); + operator_delete(pRVar8,GHIDRA_INT(*pRVar8) * 0x5c + 4); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; RVar4 = roomSet; } *(uint **)((char *)RVar4 + 0x18) = puStack_9c; @@ -3751,15 +3751,15 @@ LAB_008f8695: (**(code **)*file)(1); } } - local_14._0_1_ = 0xff; - local_14._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0xffffff; if (0xf < uStack_28) { uVar6 = uStack_28 + 1; psVar3 = contentPath[0]; if (0xfff < uVar6) { psVar3 = (std_string *)contentPath[0][-1]._capacity; uVar6 = uStack_28 + 0x24; - if ((byte *)0x1f < (byte *)((int)contentPath[0] + (-4 - (int)psVar3))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(contentPath[0]) + (-4 - GHIDRA_INT(psVar3)))) { LAB_008f868f: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3770,7 +3770,7 @@ LAB_008f868f: stageId = savedStageId; mode = savedMode; } - modIt = (ModManager)((int)MVar7 + 4); + modIt = (ModManager)(GHIDRA_INT(MVar7) + 4); } while (modIt != this[1]); } ExceptionList = local_1c; @@ -3796,25 +3796,25 @@ void ModManager::LoadModCurses() puStack_c = &LAB_00b07ac5; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(contentPath + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((contentPath + 10)); ExceptionList = &local_10; if ((g_game != (Game *)0x0) && (modIt = (undefined4 *)*in_ECX, modIt != (undefined4 *)in_ECX[1])) { do { - if (*(char *)((int)*modIt + 0xfd) != '\0') { + if (*(char *)(GHIDRA_INT(*modIt) + 0xfd) != '\0') { fileName._capacity = 0xf; fileName._size = 10; builtin_strncpy(fileName._buf,"curses.xml",0xb); local_8 = (std_string *)0x0; ((Mod *)((void *)*modIt))->Mod::GetContentPath((std_string *)contentPath,&fileName); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; if (0xf < fileName._capacity) { uVar2 = fileName._capacity + 1; - resolvedPath = (void *)fileName._buf._0_4_; + resolvedPath = (*(undefined4 *)((char *)&((void *)fileName._buf) + 0x0)); if (0xfff < uVar2) { - resolvedPath = *(void **)(fileName._buf._0_4_ + -4); + resolvedPath = *(void **)((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + -4); uVar2 = fileName._capacity + 0x24; - if (0x1f < (uint)(fileName._buf._0_4_ + (-4 - (int)resolvedPath))) goto LAB_008f884d; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(fileName._buf) + 0x0)) + (-4 - GHIDRA_INT(resolvedPath))))) goto LAB_008f884d; } operator_delete(resolvedPath,uVar2); } @@ -3824,24 +3824,24 @@ void ModManager::LoadModCurses() } resolvedPath = FileSystem::ResolvePath((byte *)psVar1); if (resolvedPath != (byte *)0x0) { - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; tracked_alloc(1,resolvedPath,0); - local_8 = (std_string *)CONCAT31(local_8._1_3_,2); + local_8 = (std_string *)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); psVar1 = (std_string *)contentPath; if (0xf < contentPathCapacity) { psVar1 = contentPath[0]; } ((RoomConfig *)(&g_game->_roomConfig))->RoomConfig::LoadCursesXml((byte *)psVar1,1); } - local_8._0_1_ = 0xff; - local_8._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0xffffff; if (0xf < contentPathCapacity) { uVar2 = contentPathCapacity + 1; psVar1 = contentPath[0]; if (0xfff < uVar2) { psVar1 = (std_string *)contentPath[0][-1]._capacity; uVar2 = contentPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)contentPath[0] + (-4 - (int)psVar1))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(contentPath[0]) + (-4 - GHIDRA_INT(psVar1)))) { LAB_008f884d: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3882,16 +3882,16 @@ void ModManager::RenderCustomGameOver(int playerType, Vector *position) local_8 = (void *)0xffffffff; puStack_c = &LAB_00aff10d; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(displayNameText + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((displayNameText + 10)); if (playerType < 0) { return; } pvVar3 = (g_manager->_entityConfig)._players._begin; - unused = (void *)((int)(g_manager->_entityConfig)._players._end - (int)pvVar3); - if ((int)unused / 0x148 <= playerType) { + unused = (void *)(GHIDRA_INT((g_manager->_entityConfig)._players._end) - GHIDRA_INT(pvVar3)); + if (GHIDRA_INT(unused) / 0x148 <= playerType) { return; } - playerConfig = (EntityConfig_Player *)(playerType * 0x148 + (int)pvVar3); + playerConfig = (EntityConfig_Player *)(playerType * 0x148 + GHIDRA_INT(pvVar3)); if (playerConfig == (EntityConfig_Player *)0x0) { return; } @@ -3918,7 +3918,7 @@ void ModManager::RenderCustomGameOver(int playerType, Vector *position) isLess = bVar1 < (byte)nameChar->_buf[0]; if (bVar1 != nameChar->_buf[0]) { LAB_008f8b40: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_008f8b45; } if (bVar1 == 0) break; @@ -3944,9 +3944,9 @@ LAB_008f8b70: uVar2 = displayNameTextCapacity + 1; pvVar3 = displayNameText[0]; if (0xfff < uVar2) { - pvVar3 = *(void **)((int)displayNameText[0] + -4); + pvVar3 = *(void **)(GHIDRA_INT(displayNameText[0]) + -4); uVar2 = displayNameTextCapacity + 0x24; - if (0x1f < (uint)((int)displayNameText[0] + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(displayNameText[0]) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -3955,7 +3955,7 @@ LAB_008f8b70: } displayNameTextSize = 0; displayNameTextCapacity = 0xf; - displayNameText[0] = (void *)((uint)displayNameText[0] & 0xffffff00); + displayNameText[0] = (void *)(GHIDRA_UINT(displayNameText[0]) & 0xffffff00); ((ANM2 *)(playerConfig->_moddedGameOverANM2))->ANM2::Render(position,&g_vectorZero,&g_vectorZero); ExceptionList = local_10; return; @@ -4031,7 +4031,7 @@ void ModManager::RenderCustomCharacterMenu(int characterId, Vector *renderPos, S local_8 = (void *)0xffffffff; puStack_c = &LAB_00af85cd; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(displayNameStr + 0xb); + local_18 = __security_cookie ^ GHIDRA_UINT((displayNameStr + 0xb)); ExceptionList = &local_10; if (characterId < 0) { LAB_008f8e9e: @@ -4040,9 +4040,9 @@ LAB_008f8e9e: return; } pvVar5 = (g_manager->_entityConfig)._players._begin; - unused = (void *)((int)(g_manager->_entityConfig)._players._end - (int)pvVar5); - if ((((int)unused / 0x148 <= characterId) || - (playerConfig = (EntityConfig_Player *)(characterId * 0x148 + (int)pvVar5), + unused = (void *)(GHIDRA_INT((g_manager->_entityConfig)._players._end) - GHIDRA_INT(pvVar5)); + if (((GHIDRA_INT(unused) / 0x148 <= characterId) || + (playerConfig = (EntityConfig_Player *)(characterId * 0x148 + GHIDRA_INT(pvVar5)), playerConfig == (EntityConfig_Player *)0x0)) || (menuSprite = playerConfig->_moddedMenuBackgroundANM2, menuSprite == (ANM2 *)0x0)) goto LAB_008f8e9e; @@ -4069,7 +4069,7 @@ LAB_008f8e9e: isLess = bVar1 < (byte)psVar4->_buf[0]; if (bVar1 != psVar4->_buf[0]) { LAB_008f8e05: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_008f8e0a; } if (bVar1 == 0) break; @@ -4095,9 +4095,9 @@ LAB_008f8e35: uVar3 = displayNameCapacity + 1; pvVar5 = displayNameStr[0]; if (0xfff < uVar3) { - pvVar5 = *(void **)((int)displayNameStr[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(displayNameStr[0]) + -4); uVar3 = displayNameCapacity + 0x24; - if (0x1f < (uint)((int)displayNameStr[0] + (-4 - (int)pvVar5))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(displayNameStr[0]) + (-4 - GHIDRA_INT(pvVar5))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -4106,7 +4106,7 @@ LAB_008f8e35: } displayNameSize = 0; displayNameCapacity = 0xf; - displayNameStr[0] = (void *)((uint)displayNameStr[0] & 0xffffff00); + displayNameStr[0] = (void *)(GHIDRA_UINT(displayNameStr[0]) & 0xffffff00); ((ANM2 *)(playerConfig->_moddedMenuBackgroundANM2))->ANM2::Render(renderPos,&g_vectorZero,&g_vectorZero); ExceptionList = local_10; return; @@ -4152,7 +4152,7 @@ void ModManager::add_mod_entry(std_string *name, std_string *dir, std_string *pa local_8 = (byte ***)0xffffffff; puStack_c = &LAB_00b07c40; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(modPath + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((modPath + 10)); ExceptionList = &local_10; ((std::string *)((char *)modPath))->std::string::string(path); entryNameSize = 0; @@ -4164,8 +4164,8 @@ void ModManager::add_mod_entry(std_string *name, std_string *dir, std_string *pa entryPathSize = 0; entryPathCapacity = 0xf; entryPath[0] = (void *)0x0; - local_8._0_1_ = 1; - local_8._1_3_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0; if ((std_string *)entryName != name) { puVar1 = &name->_size; if (0xf < name->_capacity) { @@ -4184,8 +4184,8 @@ void ModManager::add_mod_entry(std_string *name, std_string *dir, std_string *pa if (0xf < modPathCapacity) { ppppbVar2 = modPath[0]; } - ((std::string *)((char *)entryPath))->std::string::assign((byte *)ppppbVar2,(uint)modPathSize); - if (0x7fffffffU - (int)modPathSize < 0xb) { + ((std::string *)((char *)entryPath))->std::string::assign((byte *)ppppbVar2,GHIDRA_UINT(modPathSize)); + if (0x7fffffffU - GHIDRA_INT(modPathSize) < 0xb) { LAB_008fa37c: /* WARNING: Subroutine does not return */ std::string::_Xlen(); @@ -4194,9 +4194,9 @@ LAB_008fa37c: if (0xf < modPathCapacity) { ppppbVar2 = modPath[0]; } - ((std::string *)((char *)disablePath))->std::string::concat((int)this,modPathSize,(byte *)ppppbVar2,(uint)modPathSize, + ((std::string *)((char *)disablePath))->std::string::concat(GHIDRA_INT(this),modPathSize,(byte *)ppppbVar2,GHIDRA_UINT(modPathSize), (byte *)"/disable.it",0xb); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; ppppbVar2 = (byte ****)disablePath; if (0xf < disablePathCapacity) { ppppbVar2 = disablePath[0]; @@ -4204,37 +4204,37 @@ LAB_008fa37c: resolvedPath = FileSystem::ResolvePath((byte *)ppppbVar2); isDisabled = resolvedPath != (byte *)0x0; if (resolvedPath != (byte *)0x0) { - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; tracked_alloc(1,resolvedPath,0); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; } - if (0x7fffffffU - (int)modPathSize < 0xd) goto LAB_008fa37c; + if (0x7fffffffU - GHIDRA_INT(modPathSize) < 0xd) goto LAB_008fa37c; ppppbVar2 = (byte ****)modPath; if (0xf < modPathCapacity) { ppppbVar2 = modPath[0]; } - ((std::string *)((char *)metadataPath))->std::string::concat((int)this,modPathSize,(byte *)ppppbVar2,(uint)modPathSize + ((std::string *)((char *)metadataPath))->std::string::concat(GHIDRA_INT(this),modPathSize,(byte *)ppppbVar2,GHIDRA_UINT(modPathSize) ,(byte *)"/metadata.xml",0xd); - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; ppppbVar2 = (byte ****)metadataPath; if (0xf < metadataPathCapacity) { ppppbVar2 = metadataPath[0]; } resolvedPath = FileSystem::ResolvePath((byte *)ppppbVar2); if (resolvedPath != (byte *)0x0) { - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; tracked_alloc(1,resolvedPath,0); - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; } isMetadataMissing = resolvedPath != (byte *)0x0 ^ 1; - if (0x7fffffffU - (int)modPathSize < 0xe) goto LAB_008fa37c; + if (0x7fffffffU - GHIDRA_INT(modPathSize) < 0xe) goto LAB_008fa37c; ppppbVar2 = (byte ****)modPath; if (0xf < modPathCapacity) { ppppbVar2 = modPath[0]; } - ((std::string *)((char *)unfinishedPath))->std::string::concat((int)this,modPathSize,(byte *)ppppbVar2, - (uint)modPathSize,(byte *)"/unfinished.it",0xe); - local_8 = (byte ***)CONCAT31(local_8._1_3_,6); + ((std::string *)((char *)unfinishedPath))->std::string::concat(GHIDRA_INT(this),modPathSize,(byte *)ppppbVar2, + GHIDRA_UINT(modPathSize),(byte *)"/unfinished.it",0xe); + local_8 = (byte ***)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),6); ppppbVar2 = (byte ****)unfinishedPath; if (0xf < unfinishedPathCapacity) { ppppbVar2 = unfinishedPath[0]; @@ -4250,47 +4250,47 @@ LAB_008fa37c: if (0xfff < uVar4) { ppppbVar2 = (byte ****)unfinishedPath[0][-1]; uVar4 = unfinishedPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)unfinishedPath[0] + (-4 - (int)ppppbVar2))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(unfinishedPath[0]) + (-4 - GHIDRA_INT(ppppbVar2)))) goto LAB_008fa34e; } operator_delete(ppppbVar2,uVar4); } unfinishedPathSize = 0; unfinishedPathCapacity = 0xf; - unfinishedPath[0] = (byte ****)((uint)unfinishedPath[0] & 0xffffff00); + unfinishedPath[0] = (byte ****)(GHIDRA_UINT(unfinishedPath[0]) & 0xffffff00); if (0xf < metadataPathCapacity) { uVar4 = metadataPathCapacity + 1; ppppbVar2 = metadataPath[0]; if (0xfff < uVar4) { ppppbVar2 = (byte ****)metadataPath[0][-1]; uVar4 = metadataPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)metadataPath[0] + (-4 - (int)ppppbVar2))) goto LAB_008fa34e; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(metadataPath[0]) + (-4 - GHIDRA_INT(ppppbVar2)))) goto LAB_008fa34e; } operator_delete(ppppbVar2,uVar4); } metadataPathSize = 0; metadataPathCapacity = 0xf; - metadataPath[0] = (byte ****)((uint)metadataPath[0] & 0xffffff00); + metadataPath[0] = (byte ****)(GHIDRA_UINT(metadataPath[0]) & 0xffffff00); if (0xf < disablePathCapacity) { uVar4 = disablePathCapacity + 1; ppppbVar2 = disablePath[0]; if (0xfff < uVar4) { ppppbVar2 = (byte ****)disablePath[0][-1]; uVar4 = disablePathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)disablePath[0] + (-4 - (int)ppppbVar2))) goto LAB_008fa34e; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(disablePath[0]) + (-4 - GHIDRA_INT(ppppbVar2)))) goto LAB_008fa34e; } operator_delete(ppppbVar2,uVar4); } disablePathSize = 0; disablePathCapacity = 0xf; - disablePath[0] = (byte ****)((uint)disablePath[0] & 0xffffff00); + disablePath[0] = (byte ****)(GHIDRA_UINT(disablePath[0]) & 0xffffff00); if (0xf < entryPathCapacity) { uVar4 = entryPathCapacity + 1; pvVar3 = entryPath[0]; if (0xfff < uVar4) { - pvVar3 = *(void **)((int)entryPath[0] + -4); + pvVar3 = *(void **)(GHIDRA_INT(entryPath[0]) + -4); uVar4 = entryPathCapacity + 0x24; - if (0x1f < (uint)((int)entryPath[0] + (-4 - (int)pvVar3))) goto LAB_008fa34e; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(entryPath[0]) + (-4 - GHIDRA_INT(pvVar3))))) goto LAB_008fa34e; } operator_delete(pvVar3,uVar4); } @@ -4298,9 +4298,9 @@ LAB_008fa37c: uVar4 = entryDirCapacity + 1; pvVar3 = entryDir[0]; if (0xfff < uVar4) { - pvVar3 = *(void **)((int)entryDir[0] + -4); + pvVar3 = *(void **)(GHIDRA_INT(entryDir[0]) + -4); uVar4 = entryDirCapacity + 0x24; - if (0x1f < (uint)((int)entryDir[0] + (-4 - (int)pvVar3))) goto LAB_008fa34e; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(entryDir[0]) + (-4 - GHIDRA_INT(pvVar3))))) goto LAB_008fa34e; } operator_delete(pvVar3,uVar4); } @@ -4308,9 +4308,9 @@ LAB_008fa37c: uVar4 = entryNameCapacity + 1; pvVar3 = entryName[0]; if (0xfff < uVar4) { - pvVar3 = *(void **)((int)entryName[0] + -4); + pvVar3 = *(void **)(GHIDRA_INT(entryName[0]) + -4); uVar4 = entryNameCapacity + 0x24; - if (0x1f < (uint)((int)entryName[0] + (-4 - (int)pvVar3))) goto LAB_008fa34e; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(entryName[0]) + (-4 - GHIDRA_INT(pvVar3))))) goto LAB_008fa34e; } operator_delete(pvVar3,uVar4); } @@ -4320,7 +4320,7 @@ LAB_008fa37c: if (0xfff < uVar4) { ppppbVar2 = (byte ****)modPath[0][-1]; uVar4 = modPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)modPath[0] + (-4 - (int)ppppbVar2))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(modPath[0]) + (-4 - GHIDRA_INT(ppppbVar2)))) { LAB_008fa34e: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -4397,11 +4397,11 @@ void ModManager::UpdateWorkshopMods() undefined4 local_8; qword allocatedBytes; - local_8._0_1_ = 0xff; - local_8._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0xffffff; puStack_c = &LAB_00b07cb7; local_10 = ExceptionList; - stackCookie = __security_cookie ^ (uint)(installingText + 0x110); + stackCookie = __security_cookie ^ GHIDRA_UINT((installingText + 0x110)); ExceptionList = &local_10; workshopEntries = in_stack_00000004; entryIdx = 0; @@ -4420,7 +4420,7 @@ void ModManager::UpdateWorkshopMods() pbVar6 = pbVar6 + 1; } while (bVar3 != 0); ((std::string *)(&(*(undefined1 *)((char *)(g_manager) + 0x4a6dc))))->std::string::assign(uninstallingText, - (int)pbVar6 - (int)(uninstallingText + 1)); + GHIDRA_INT(pbVar6) - GHIDRA_INT((uninstallingText + 1))); local_29c = (int ****)ppppiVar15[0xb]; ppppiVar14 = ppppiVar15 + 7; uninstallPath = (LPCSTR ***)0x0; @@ -4430,12 +4430,12 @@ void ModManager::UpdateWorkshopMods() ppppiVar14 = (int ****)*ppppiVar14; } if (&DAT_0000000f < local_29c) { - ppppiVar15 = (int ****)((uint)local_29c | 0xf); + ppppiVar15 = (int ****)(GHIDRA_UINT(local_29c) | 0xf); if ((int ****)0x7fffffff < ppppiVar15) { ppppiVar15 = (int ****)0x7fffffff; } - uninstallPath = std::_Allocate((uint)((int)ppppiVar15 + 1)); - memcpy(uninstallPath,ppppiVar14,(size_t)((int)local_29c + 1)); + uninstallPath = std::_Allocate(GHIDRA_UINT((GHIDRA_INT(ppppiVar15) + 1))); + memcpy(uninstallPath,ppppiVar14,(size_t)(GHIDRA_INT(local_29c) + 1)); uninstallPathCapacity = ppppiVar15; } else { @@ -4445,8 +4445,8 @@ void ModManager::UpdateWorkshopMods() pppiStack_238 = ppppiVar14[3]; uninstallPathCapacity = (int ****)&DAT_0000000f; } - local_8._0_1_ = 6; - local_8._1_3_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0; uninstallPathSize = local_29c; ((std::string *)((char *)&uninstallPath))->std::string::append(&DAT_00b76eac,1); ppppiVar11 = (int ****)0x0; @@ -4459,36 +4459,36 @@ void ModManager::UpdateWorkshopMods() if (&DAT_0000000f < ppppiVar14) { ppppCVar10 = ppppCVar12; } - if (*(char *)((char *)ppppCVar10 + (int)ppppiVar11) == '/') { + if (*(char *)((char *)ppppCVar10 + GHIDRA_INT(ppppiVar11)) == '/') { ppppCVar10 = (LPCSTR ***)&uninstallPath; if (&DAT_0000000f < ppppiVar14) { ppppCVar10 = ppppCVar12; } - *(undefined1 *)((char *)ppppCVar10 + (int)ppppiVar11) = 0x5c; + *(undefined1 *)((char *)ppppCVar10 + GHIDRA_INT(ppppiVar11)) = 0x5c; ppppCVar12 = uninstallPath; ppppiVar15 = uninstallPathSize; ppppiVar14 = uninstallPathCapacity; } - ppppiVar11 = (int ****)((int)ppppiVar11 + 1); + ppppiVar11 = (int ****)(GHIDRA_INT(ppppiVar11) + 1); } while (ppppiVar11 < ppppiVar15); } if (ppppiVar15 < ppppiVar14) { - uninstallPathSize = (int ****)((int)ppppiVar15 + 1); + uninstallPathSize = (int ****)(GHIDRA_INT(ppppiVar15) + 1); ppppCVar10 = (LPCSTR ***)&uninstallPath; if (&DAT_0000000f < ppppiVar14) { ppppCVar10 = ppppCVar12; } - *(undefined2 *)((char *)ppppCVar10 + (int)ppppiVar15) = 0; + *(undefined2 *)((char *)ppppCVar10 + GHIDRA_INT(ppppiVar15)) = 0; } else { if (ppppiVar15 == (int ****)0x7fffffff) goto LAB_008fb119; - local_290 = (int ****)((uint)((int)ppppiVar15 + 1) | 0xf); + local_290 = (int ****)(GHIDRA_UINT((GHIDRA_INT(ppppiVar15) + 1)) | 0xf); if (local_290 < (int ****)0x80000000) { - if ((int ****)(0x7fffffff - ((uint)ppppiVar14 >> 1)) < ppppiVar14) { + if ((int ****)(0x7fffffff - (GHIDRA_UINT(ppppiVar14) >> 1)) < ppppiVar14) { local_290 = (int ****)0x7fffffff; } else { - ppppiVar11 = (int ****)((int)ppppiVar14 + ((uint)ppppiVar14 >> 1)); + ppppiVar11 = (int ****)(GHIDRA_INT(ppppiVar14) + (GHIDRA_UINT(ppppiVar14) >> 1)); if (local_290 < ppppiVar11) { local_290 = ppppiVar11; } @@ -4497,12 +4497,12 @@ void ModManager::UpdateWorkshopMods() else { local_290 = (int ****)0x7fffffff; } - local_294 = std::_Allocate((uint)((int)local_290 + 1)); + local_294 = std::_Allocate(GHIDRA_UINT((GHIDRA_INT(local_290) + 1))); ppppCVar12 = uninstallPath; - uninstallPathSize = (int ****)((int)ppppiVar15 + 1); + uninstallPathSize = (int ****)(GHIDRA_INT(ppppiVar15) + 1); uninstallPathCapacity = local_290; - local_29c = (int ****)((int)local_294 + (int)ppppiVar15); - local_298 = (int ****)((undefined1 *)((int)ppppiVar15 + 1) + (int)local_294); + local_29c = (int ****)(GHIDRA_INT(local_294) + GHIDRA_INT(ppppiVar15)); + local_298 = (int ****)((undefined1 *)(GHIDRA_INT(ppppiVar15) + 1) + GHIDRA_INT(local_294)); if (ppppiVar14 < (int ****)0x10) { memcpy(local_294,&uninstallPath,(size_t)ppppiVar15); *(undefined1 *)local_29c = 0; @@ -4510,17 +4510,17 @@ void ModManager::UpdateWorkshopMods() } else { memcpy(local_294,uninstallPath,(size_t)ppppiVar15); - ppppiVar15 = (int ****)((int)ppppiVar14 + 1); + ppppiVar15 = (int ****)(GHIDRA_INT(ppppiVar14) + 1); *(undefined1 *)local_29c = 0; *(undefined1 *)local_298 = 0; ppppCVar10 = ppppCVar12; if ((int ****)0xfff < ppppiVar15) { ppppCVar10 = (LPCSTR ***)ppppCVar12[-1]; ppppiVar15 = ppppiVar14 + 9; - if ((undefined1 *)0x1f < (undefined1 *)((int)ppppCVar12 + (-4 - (int)ppppCVar10))) + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(ppppCVar12) + (-4 - GHIDRA_INT(ppppCVar10)))) goto LAB_008fb113; } - operator_delete(ppppCVar10,(uint)ppppiVar15); + operator_delete(ppppCVar10,GHIDRA_UINT(ppppiVar15)); } uninstallPath = local_294; } @@ -4528,9 +4528,9 @@ void ModManager::UpdateWorkshopMods() deleteOp.wFunc = 0; deleteOp.pFrom = (LPCSTR)0x0; deleteOp.pTo = (LPCSTR)0x0; - deleteOp._24_4_ = 0; - deleteOp._16_8_ = 0; - deleteOp.lpszProgressTitle._2_2_ = 0; + (*(undefined4 *)((char *)&(deleteOp) + 0x18)) = 0; + (*(undefined8 *)((char *)&(deleteOp) + 0x10)) = 0; + (*(undefined2 *)((char *)&(deleteOp.lpszProgressTitle) + 0x2)) = 0; if (_glfw == 0) { _glfwInputError(0x10001,0); deleteOp.hwnd = (HWND)0x0; @@ -4549,22 +4549,22 @@ void ModManager::UpdateWorkshopMods() } deleteOp.wFunc = 3; SHFileOperationA(&deleteOp); - local_8._0_1_ = 0xff; - local_8._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0xffffff; if (&DAT_0000000f < uninstallPathCapacity) { - ppppiVar15 = (int ****)((int)uninstallPathCapacity + 1); + ppppiVar15 = (int ****)(GHIDRA_INT(uninstallPathCapacity) + 1); ppppCVar12 = uninstallPath; if ((int ****)0xfff < ppppiVar15) { ppppCVar12 = (LPCSTR ***)uninstallPath[-1]; ppppiVar15 = uninstallPathCapacity + 9; - if ((undefined1 *)0x1f < (undefined1 *)((int)uninstallPath + (-4 - (int)ppppCVar12))) + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(uninstallPath) + (-4 - GHIDRA_INT(ppppCVar12)))) goto LAB_008fb113; } - operator_delete(ppppCVar12,(uint)ppppiVar15); + operator_delete(ppppCVar12,GHIDRA_UINT(ppppiVar15)); } uninstallPathSize = (int ****)0x0; uninstallPathCapacity = (int ****)&DAT_0000000f; - uninstallPath = (LPCSTR ***)((uint)uninstallPath & 0xffffff00); + uninstallPath = (LPCSTR ***)(GHIDRA_UINT(uninstallPath) & 0xffffff00); } else { statusKey = "#MOD_INSTALLING"; @@ -4579,7 +4579,7 @@ void ModManager::UpdateWorkshopMods() pbVar6 = pbVar6 + 1; } while (bVar3 != 0); ((std::string *)(&(*(undefined1 *)((char *)(g_manager) + 0x4a6dc))))->std::string::assign(installingText, - (int)pbVar6 - (int)(installingText + 1)); + GHIDRA_INT(pbVar6) - GHIDRA_INT((installingText + 1))); local_290 = (int ****)ppppiVar15[0xb]; ppppiVar14 = ppppiVar15 + 7; sourcePath = (int ****)0x0; @@ -4589,12 +4589,12 @@ void ModManager::UpdateWorkshopMods() ppppiVar14 = (int ****)*ppppiVar14; } if (&DAT_0000000f < local_290) { - ppppiVar15 = (int ****)((uint)local_290 | 0xf); + ppppiVar15 = (int ****)(GHIDRA_UINT(local_290) | 0xf); if ((int ****)0x7fffffff < ppppiVar15) { ppppiVar15 = (int ****)0x7fffffff; } - sourcePath = std::_Allocate((uint)((int)ppppiVar15 + 1)); - memcpy(sourcePath,ppppiVar14,(size_t)((int)local_290 + 1)); + sourcePath = std::_Allocate(GHIDRA_UINT((GHIDRA_INT(ppppiVar15) + 1))); + memcpy(sourcePath,ppppiVar14,(size_t)(GHIDRA_INT(local_290) + 1)); sourcePathSize = local_290; sourcePathCapacity = ppppiVar15; } @@ -4617,12 +4617,12 @@ void ModManager::UpdateWorkshopMods() local_290 = (int ****)*modDirString; } if (&DAT_0000000f < ppppiVar15) { - ppppiVar14 = (int ****)((uint)ppppiVar15 | 0xf); + ppppiVar14 = (int ****)(GHIDRA_UINT(ppppiVar15) | 0xf); if ((int ****)0x7fffffff < ppppiVar14) { ppppiVar14 = (int ****)0x7fffffff; } - modPath = std::_Allocate((uint)((int)ppppiVar14 + 1)); - memcpy(modPath,local_290,(size_t)((int)ppppiVar15 + 1)); + modPath = std::_Allocate(GHIDRA_UINT((GHIDRA_INT(ppppiVar14) + 1))); + memcpy(modPath,local_290,(size_t)(GHIDRA_INT(ppppiVar15) + 1)); modPathCapacity = ppppiVar14; } else { @@ -4632,7 +4632,7 @@ void ModManager::UpdateWorkshopMods() pppiStack_220 = local_290[3]; modPathCapacity = (int ****)&DAT_0000000f; } - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; modPathSize = ppppiVar15; ((std::string *)((char *)&sourcePath))->std::string::append(&DAT_00b76eac,1); ((std::string *)((char *)&modPath))->std::string::append(&DAT_00b76eac,1); @@ -4646,17 +4646,17 @@ void ModManager::UpdateWorkshopMods() if (&DAT_0000000f < ppppiVar14) { ppppiVar8 = ppppiVar11; } - if (*(char *)((char *)ppppiVar8 + (int)ppppiVar15) == '/') { + if (*(char *)((char *)ppppiVar8 + GHIDRA_INT(ppppiVar15)) == '/') { ppppiVar7 = (int ****)&sourcePath; if (&DAT_0000000f < ppppiVar14) { ppppiVar7 = ppppiVar11; } - *(undefined1 *)((char *)ppppiVar7 + (int)ppppiVar15) = 0x5c; + *(undefined1 *)((char *)ppppiVar7 + GHIDRA_INT(ppppiVar15)) = 0x5c; ppppiVar14 = sourcePathCapacity; ppppiVar11 = sourcePath; ppppiVar7 = sourcePathSize; } - ppppiVar15 = (int ****)((int)ppppiVar15 + 1); + ppppiVar15 = (int ****)(GHIDRA_INT(ppppiVar15) + 1); } while (ppppiVar15 < ppppiVar7); } ppppiVar15 = (int ****)0x0; @@ -4669,17 +4669,17 @@ void ModManager::UpdateWorkshopMods() if (&DAT_0000000f < ppppiVar11) { ppppiVar8 = ppppiVar7; } - if (*(char *)((char *)ppppiVar8 + (int)ppppiVar15) == '/') { + if (*(char *)((char *)ppppiVar8 + GHIDRA_INT(ppppiVar15)) == '/') { ppppiVar14 = (int ****)&modPath; if (&DAT_0000000f < ppppiVar11) { ppppiVar14 = ppppiVar7; } - *(undefined1 *)((char *)ppppiVar14 + (int)ppppiVar15) = 0x5c; + *(undefined1 *)((char *)ppppiVar14 + GHIDRA_INT(ppppiVar15)) = 0x5c; ppppiVar14 = modPathSize; ppppiVar11 = modPathCapacity; ppppiVar7 = modPath; } - ppppiVar15 = (int ****)((int)ppppiVar15 + 1); + ppppiVar15 = (int ****)(GHIDRA_INT(ppppiVar15) + 1); } while (ppppiVar15 < ppppiVar14); } ((std::string *)((char *)&sourcePath))->std::string::append(&DAT_00b76fc0,3); @@ -4690,19 +4690,19 @@ void ModManager::UpdateWorkshopMods() if (&DAT_0000000f < sourcePathCapacity) { ppppiVar15 = sourcePath; } - puVar1 = (undefined2 *)((int)ppppiVar15 + (int)sourcePathSize); - sourcePathSize = (int ****)((int)sourcePathSize + 1); + puVar1 = (undefined2 *)(GHIDRA_INT(ppppiVar15) + GHIDRA_INT(sourcePathSize)); + sourcePathSize = (int ****)(GHIDRA_INT(sourcePathSize) + 1); *puVar1 = 0; } else { if (sourcePathSize == (int ****)0x7fffffff) goto LAB_008fb119; - ppppiVar14 = (int ****)((uint)((int)sourcePathSize + 1) | 0xf); + ppppiVar14 = (int ****)(GHIDRA_UINT((GHIDRA_INT(sourcePathSize) + 1)) | 0xf); if (ppppiVar14 < (int ****)0x80000000) { - if ((int ****)(0x7fffffff - ((uint)sourcePathCapacity >> 1)) < sourcePathCapacity) { + if ((int ****)(0x7fffffff - (GHIDRA_UINT(sourcePathCapacity) >> 1)) < sourcePathCapacity) { ppppiVar14 = (int ****)0x7fffffff; } else { - ppppiVar11 = (int ****)(((uint)sourcePathCapacity >> 1) + (int)sourcePathCapacity); + ppppiVar11 = (int ****)((GHIDRA_UINT(sourcePathCapacity) >> 1) + GHIDRA_INT(sourcePathCapacity)); if (ppppiVar14 < ppppiVar11) { ppppiVar14 = ppppiVar11; } @@ -4711,11 +4711,11 @@ void ModManager::UpdateWorkshopMods() else { ppppiVar14 = (int ****)0x7fffffff; } - local_298 = std::_Allocate((uint)((int)ppppiVar14 + 1)); + local_298 = std::_Allocate(GHIDRA_UINT((GHIDRA_INT(ppppiVar14) + 1))); ppppiVar11 = sourcePath; - sourcePathSize = (int ****)((int)ppppiVar15 + 1); - local_294 = (LPCSTR ***)((undefined1 *)((int)ppppiVar15 + 1) + (int)local_298); - puVar2 = (undefined1 *)((int)ppppiVar15 + (int)local_298); + sourcePathSize = (int ****)(GHIDRA_INT(ppppiVar15) + 1); + local_294 = (LPCSTR ***)((undefined1 *)(GHIDRA_INT(ppppiVar15) + 1) + GHIDRA_INT(local_298)); + puVar2 = (undefined1 *)(GHIDRA_INT(ppppiVar15) + GHIDRA_INT(local_298)); local_2a8 = puVar2; sourcePathCapacity = ppppiVar14; if (local_290 < (int ****)0x10) { @@ -4725,17 +4725,17 @@ void ModManager::UpdateWorkshopMods() } else { memcpy(local_298,sourcePath,(size_t)ppppiVar15); - ppppiVar14 = (int ****)((int)local_290 + 1); + ppppiVar14 = (int ****)(GHIDRA_INT(local_290) + 1); *local_2a8 = 0; *(undefined1 *)local_294 = 0; ppppiVar15 = ppppiVar11; if ((int ****)0xfff < ppppiVar14) { ppppiVar15 = (int ****)ppppiVar11[-1]; ppppiVar14 = local_290 + 9; - if ((undefined1 *)0x1f < (undefined1 *)((int)ppppiVar11 + (-4 - (int)ppppiVar15))) + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(ppppiVar11) + (-4 - GHIDRA_INT(ppppiVar15)))) goto LAB_008fb113; } - operator_delete(ppppiVar15,(uint)ppppiVar14); + operator_delete(ppppiVar15,GHIDRA_UINT(ppppiVar14)); } sourcePath = local_298; } @@ -4746,19 +4746,19 @@ void ModManager::UpdateWorkshopMods() if (&DAT_0000000f < modPathCapacity) { ppppiVar15 = modPath; } - puVar1 = (undefined2 *)((int)ppppiVar15 + (int)modPathSize); - modPathSize = (int ****)((int)modPathSize + 1); + puVar1 = (undefined2 *)(GHIDRA_INT(ppppiVar15) + GHIDRA_INT(modPathSize)); + modPathSize = (int ****)(GHIDRA_INT(modPathSize) + 1); *puVar1 = 0; } else { if (modPathSize == (int ****)0x7fffffff) goto LAB_008fb119; - ppppiVar14 = (int ****)((uint)((int)modPathSize + 1) | 0xf); + ppppiVar14 = (int ****)(GHIDRA_UINT((GHIDRA_INT(modPathSize) + 1)) | 0xf); if (ppppiVar14 < (int ****)0x80000000) { - if ((int ****)(0x7fffffff - ((uint)modPathCapacity >> 1)) < modPathCapacity) { + if ((int ****)(0x7fffffff - (GHIDRA_UINT(modPathCapacity) >> 1)) < modPathCapacity) { ppppiVar14 = (int ****)0x7fffffff; } else { - ppppiVar11 = (int ****)(((uint)modPathCapacity >> 1) + (int)modPathCapacity); + ppppiVar11 = (int ****)((GHIDRA_UINT(modPathCapacity) >> 1) + GHIDRA_INT(modPathCapacity)); if (ppppiVar14 < ppppiVar11) { ppppiVar14 = ppppiVar11; } @@ -4767,11 +4767,11 @@ void ModManager::UpdateWorkshopMods() else { ppppiVar14 = (int ****)0x7fffffff; } - local_290 = std::_Allocate((uint)((int)ppppiVar14 + 1)); + local_290 = std::_Allocate(GHIDRA_UINT((GHIDRA_INT(ppppiVar14) + 1))); ppppiVar11 = modPath; - modPathSize = (int ****)((int)ppppiVar15 + 1); - local_294 = (LPCSTR ***)((undefined1 *)((int)ppppiVar15 + 1) + (int)local_290); - puVar2 = (undefined1 *)((int)local_290 + (int)ppppiVar15); + modPathSize = (int ****)(GHIDRA_INT(ppppiVar15) + 1); + local_294 = (LPCSTR ***)((undefined1 *)(GHIDRA_INT(ppppiVar15) + 1) + GHIDRA_INT(local_290)); + puVar2 = (undefined1 *)(GHIDRA_INT(local_290) + GHIDRA_INT(ppppiVar15)); local_2a8 = puVar2; modPathCapacity = ppppiVar14; if (local_298 < (int ****)0x10) { @@ -4781,17 +4781,17 @@ void ModManager::UpdateWorkshopMods() } else { memcpy(local_290,modPath,(size_t)ppppiVar15); - ppppiVar14 = (int ****)((int)local_298 + 1); + ppppiVar14 = (int ****)(GHIDRA_INT(local_298) + 1); *local_2a8 = 0; *(undefined1 *)local_294 = 0; ppppiVar15 = ppppiVar11; if ((int ****)0xfff < ppppiVar14) { ppppiVar15 = (int ****)ppppiVar11[-1]; ppppiVar14 = local_298 + 9; - if ((undefined1 *)0x1f < (undefined1 *)((int)ppppiVar11 + (-4 - (int)ppppiVar15))) + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(ppppiVar11) + (-4 - GHIDRA_INT(ppppiVar15)))) goto LAB_008fb113; } - operator_delete(ppppiVar15,(uint)ppppiVar14); + operator_delete(ppppiVar15,GHIDRA_UINT(ppppiVar14)); } modPath = local_290; } @@ -4799,9 +4799,9 @@ void ModManager::UpdateWorkshopMods() fileOp.wFunc = 0; fileOp.pFrom = (LPCSTR)0x0; fileOp.pTo = (LPCSTR)0x0; - fileOp._24_4_ = 0; - fileOp._16_8_ = 0; - fileOp.lpszProgressTitle._2_2_ = 0; + (*(undefined4 *)((char *)&(fileOp) + 0x18)) = 0; + (*(undefined8 *)((char *)&(fileOp) + 0x10)) = 0; + (*(undefined2 *)((char *)&(fileOp.lpszProgressTitle) + 0x2)) = 0; if (_glfw == 0) { _glfwInputError(0x10001,0); fileOp.hwnd = (HWND)0x0; @@ -4827,7 +4827,7 @@ void ModManager::UpdateWorkshopMods() CreateDirectoryA((LPCSTR)ppppiVar15,(LPSECURITY_ATTRIBUTES)0x0); ppppiVar15 = modDirString; psVar4 = (std_string *)modDirString[4]; - if (0x7fffffffU - (int)psVar4 < 0xe) { + if (0x7fffffffU - GHIDRA_INT(psVar4) < 0xe) { LAB_008fb119: /* WARNING: Subroutine does not return */ std::string::_Xlen(); @@ -4836,9 +4836,9 @@ LAB_008fb119: if ((int ***)0xf < modDirString[5]) { ppppiVar14 = (int ****)*modDirString; } - ((std::string *)((char *)markerPath))->std::string::concat((int)modDirString,psVar4,(byte *)ppppiVar14, - (uint)psVar4,(byte *)"/unfinished.it",0xe); - local_8 = CONCAT31(local_8._1_3_,2); + ((std::string *)((char *)markerPath))->std::string::concat(GHIDRA_INT(modDirString),psVar4,(byte *)ppppiVar14, + GHIDRA_UINT(psVar4),(byte *)"/unfinished.it",0xe); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); ppppbVar9 = (byte ****)markerPath; if (0xf < markerPathCapacity) { ppppbVar9 = markerPath[0]; @@ -4847,14 +4847,14 @@ LAB_008fb119: if (markerFile != (undefined4 *)0x0) { (**(code **)*markerFile)(1); } - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; if (0xf < markerPathCapacity) { uVar13 = markerPathCapacity + 1; ppppbVar9 = markerPath[0]; if (0xfff < uVar13) { ppppbVar9 = (byte ****)markerPath[0][-1]; uVar13 = markerPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)markerPath[0] + (-4 - (int)ppppbVar9))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(markerPath[0]) + (-4 - GHIDRA_INT(ppppbVar9)))) goto LAB_008fb113; } operator_delete(ppppbVar9,uVar13); @@ -4871,14 +4871,14 @@ LAB_008fb119: SHFileOperationA(&fileOp); if (*(char *)(local_29c + 0x13) != '\0') { psVar4 = (std_string *)ppppiVar15[4]; - if (0x7fffffffU - (int)psVar4 < 0xb) goto LAB_008fb119; + if (0x7fffffffU - GHIDRA_INT(psVar4) < 0xb) goto LAB_008fb119; ppppiVar14 = ppppiVar15; if ((int ***)0xf < ppppiVar15[5]) { ppppiVar14 = (int ****)*ppppiVar15; } - ((std::string *)((char *)markerPath))->std::string::concat((int)modDirString,psVar4,(byte *)ppppiVar14, - (uint)psVar4,(byte *)"/disable.it",0xb); - local_8 = CONCAT31(local_8._1_3_,3); + ((std::string *)((char *)markerPath))->std::string::concat(GHIDRA_INT(modDirString),psVar4,(byte *)ppppiVar14, + GHIDRA_UINT(psVar4),(byte *)"/disable.it",0xb); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); ppppbVar9 = (byte ****)markerPath; if (0xf < markerPathCapacity) { ppppbVar9 = markerPath[0]; @@ -4887,27 +4887,27 @@ LAB_008fb119: if (markerFile != (undefined4 *)0x0) { (**(code **)*markerFile)(1); } - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; if (0xf < markerPathCapacity) { uVar13 = markerPathCapacity + 1; ppppbVar9 = markerPath[0]; if (0xfff < uVar13) { ppppbVar9 = (byte ****)markerPath[0][-1]; uVar13 = markerPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)markerPath[0] + (-4 - (int)ppppbVar9))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(markerPath[0]) + (-4 - GHIDRA_INT(ppppbVar9)))) goto LAB_008fb113; } operator_delete(ppppbVar9,uVar13); } } psVar4 = (std_string *)ppppiVar15[4]; - if (0x7fffffffU - (int)psVar4 < 0xe) goto LAB_008fb119; + if (0x7fffffffU - GHIDRA_INT(psVar4) < 0xe) goto LAB_008fb119; if ((int ***)0xf < ppppiVar15[5]) { ppppiVar15 = (int ****)*ppppiVar15; } - ((std::string *)((char *)unfinishedPath))->std::string::concat((int)modDirString,psVar4,(byte *)ppppiVar15, - (uint)psVar4,(byte *)"/unfinished.it",0xe); - local_8 = CONCAT31(local_8._1_3_,4); + ((std::string *)((char *)unfinishedPath))->std::string::concat(GHIDRA_INT(modDirString),psVar4,(byte *)ppppiVar15, + GHIDRA_UINT(psVar4),(byte *)"/unfinished.it",0xe); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),4); ppppbVar9 = (byte ****)unfinishedPath; if (0xf < unfinishedPathCapacity) { ppppbVar9 = unfinishedPath[0]; @@ -4919,13 +4919,13 @@ LAB_008fb119: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar13 = *(uint *)(pbVar6 + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar13; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar13; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar13); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar13)); free(pbVar6 + -4); } if (isUnfinishedExists != '\0') { @@ -4935,56 +4935,56 @@ LAB_008fb119: } remove((char *)ppppbVar9); } - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; if (0xf < unfinishedPathCapacity) { uVar13 = unfinishedPathCapacity + 1; ppppbVar9 = unfinishedPath[0]; if (0xfff < uVar13) { ppppbVar9 = (byte ****)unfinishedPath[0][-1]; uVar13 = unfinishedPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)unfinishedPath[0] + (-4 - (int)ppppbVar9))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(unfinishedPath[0]) + (-4 - GHIDRA_INT(ppppbVar9)))) goto LAB_008fb113; } operator_delete(ppppbVar9,uVar13); } - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; unfinishedPathSize = 0; unfinishedPathCapacity = 0xf; - unfinishedPath[0] = (byte ****)((uint)unfinishedPath[0] & 0xffffff00); + unfinishedPath[0] = (byte ****)(GHIDRA_UINT(unfinishedPath[0]) & 0xffffff00); if (&DAT_0000000f < modPathCapacity) { - ppppiVar14 = (int ****)((int)modPathCapacity + 1); + ppppiVar14 = (int ****)(GHIDRA_INT(modPathCapacity) + 1); ppppiVar15 = modPath; if ((int ****)0xfff < ppppiVar14) { ppppiVar15 = (int ****)modPath[-1]; ppppiVar14 = modPathCapacity + 9; - if ((undefined1 *)0x1f < (undefined1 *)((int)modPath + (-4 - (int)ppppiVar15))) + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(modPath) + (-4 - GHIDRA_INT(ppppiVar15)))) goto LAB_008fb113; } - operator_delete(ppppiVar15,(uint)ppppiVar14); + operator_delete(ppppiVar15,GHIDRA_UINT(ppppiVar14)); } - local_8._0_1_ = 0xff; - local_8._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0xffffff; modPathSize = (int ****)0x0; modPathCapacity = (int ****)&DAT_0000000f; - modPath = (int ****)((uint)modPath & 0xffffff00); + modPath = (int ****)(GHIDRA_UINT(modPath) & 0xffffff00); if (&DAT_0000000f < sourcePathCapacity) { - ppppiVar14 = (int ****)((int)sourcePathCapacity + 1); + ppppiVar14 = (int ****)(GHIDRA_INT(sourcePathCapacity) + 1); ppppiVar15 = sourcePath; if ((int ****)0xfff < ppppiVar14) { ppppiVar15 = (int ****)sourcePath[-1]; ppppiVar14 = sourcePathCapacity + 9; - if ((undefined1 *)0x1f < (undefined1 *)((int)sourcePath + (-4 - (int)ppppiVar15))) { + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(sourcePath) + (-4 - GHIDRA_INT(ppppiVar15)))) { LAB_008fb113: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(ppppiVar15,(uint)ppppiVar14); + operator_delete(ppppiVar15,GHIDRA_UINT(ppppiVar14)); } } entryIdx = entryIdx + 1; entriesBegin = *workshopEntries; - } while (entryIdx < (uint)((workshopEntries[1] - entriesBegin) / 0x50)); + } while (entryIdx < GHIDRA_UINT(((workshopEntries[1] - entriesBegin) / 0x50))); } *(undefined1 *)(workshopEntries + 3) = 1; ExceptionList = local_10; diff --git a/src/game/mtrng.cpp b/src/game/mtrng.cpp index 7990003..79bbc63 100644 --- a/src/game/mtrng.cpp +++ b/src/game/mtrng.cpp @@ -9,11 +9,11 @@ void MTRNG::Init(uint seed) this[0x270] = (MTRNG)0x1; do { index = this[0x270]; - this[(int)index] = - (MTRNG)(((uint)this[(int)index + -1] >> 0x1e ^ (uint)this[(int)index + -1]) * 0x6c078965 + - (int)index); - this[0x270] = (MTRNG)((int)this[0x270] + 1); - } while ((int)this[0x270] < 0x270); + this[GHIDRA_INT(index)] = + (MTRNG)((GHIDRA_UINT(this[GHIDRA_INT(index) + -1]) >> 0x1e ^ GHIDRA_UINT(this[GHIDRA_INT(index) + -1])) * 0x6c078965 + + GHIDRA_INT(index)); + this[0x270] = (MTRNG)(GHIDRA_INT(this[0x270]) + 1); + } while (GHIDRA_INT(this[0x270]) < 0x270); return; } @@ -26,29 +26,29 @@ uint MTRNG::Next() MTRNG word; index = this[0x270]; - if (0x26f < (int)index) { + if (0x26f < GHIDRA_INT(index)) { if (index == (MTRNG)0x271) { Init(this,0x1571); } kk = 0; do { - y = ((uint)this[kk + 1] ^ (uint)this[kk]) & 0x7fffffff ^ (uint)this[kk]; - this[kk] = (MTRNG)(y >> 1 ^ (uint)(&PTR_00b67f8c)[y & 1] ^ (uint)this[kk + 0x18d]); + y = (GHIDRA_UINT(this[kk + 1]) ^ GHIDRA_UINT(this[kk])) & 0x7fffffff ^ GHIDRA_UINT(this[kk]); + this[kk] = (MTRNG)(y >> 1 ^ GHIDRA_UINT((&PTR_00b67f8c)[y & 1]) ^ GHIDRA_UINT(this[kk + 0x18d])); kk = kk + 1; } while (kk < 0xe3); do { - y = ((uint)this[kk + 1] ^ (uint)this[kk]) & 0x7fffffff ^ (uint)this[kk]; - this[kk] = (MTRNG)(y >> 1 ^ (uint)(&PTR_00b67f8c)[y & 1] ^ (uint)this[kk + -0xe3]); + y = (GHIDRA_UINT(this[kk + 1]) ^ GHIDRA_UINT(this[kk])) & 0x7fffffff ^ GHIDRA_UINT(this[kk]); + this[kk] = (MTRNG)(y >> 1 ^ GHIDRA_UINT((&PTR_00b67f8c)[y & 1]) ^ GHIDRA_UINT(this[kk + -0xe3])); kk = kk + 1; } while (kk < 0x26f); - y = ((uint)*this ^ (uint)this[0x26f]) & 0x7fffffff ^ (uint)this[0x26f]; - this[0x26f] = (MTRNG)((uint)(&PTR_00b67f8c)[y & 1] ^ (uint)this[0x18c] ^ y >> 1); + y = (GHIDRA_UINT(*this) ^ GHIDRA_UINT(this[0x26f])) & 0x7fffffff ^ GHIDRA_UINT(this[0x26f]); + this[0x26f] = (MTRNG)(GHIDRA_UINT((&PTR_00b67f8c)[y & 1]) ^ GHIDRA_UINT(this[0x18c]) ^ y >> 1); index = (MTRNG)0x0; this[0x270] = (MTRNG)0x0; } - word = this[(int)index]; - this[0x270] = (MTRNG)((int)index + 1); - y = (uint)word ^ (uint)word >> 0xb; + word = this[GHIDRA_INT(index)]; + this[0x270] = (MTRNG)(GHIDRA_INT(index) + 1); + y = GHIDRA_UINT(word) ^ GHIDRA_UINT(word) >> 0xb; y = y ^ (y & 0xff3a58ad) << 7; y = y ^ (y & 0xffffdf8c) << 0xf; return y >> 0x12 ^ y; diff --git a/src/game/multiplayer.cpp b/src/game/multiplayer.cpp index 245f2f2..da3ce41 100644 --- a/src/game/multiplayer.cpp +++ b/src/game/multiplayer.cpp @@ -13,19 +13,19 @@ void Multiplayer::set_service_provider(int providerType) undefined1 *puStack_18; undefined4 local_14; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b11e69; local_1c = ExceptionList; ExceptionList = &local_1c; if (g_multiplayerService == (void *)0x0) { currentProviderType = 0; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); } else { currentProviderType = (*(code *)**(undefined4 **)g_multiplayerService) - (__security_cookie ^ (int)register0x00000010 - 0x10U); + (__security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U); } if (providerType == currentProviderType) { ExceptionList = local_1c; @@ -54,10 +54,10 @@ void Multiplayer::set_service_provider(int providerType) puVar1[0x17] = 0; puVar1[0x18] = 0; puVar1[0x19] = 0; - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; puVar1[0x1a] = KAGE::Network::Multiplayer::ConstLobby::vftable; KAGE::SmartPointer::SmartPointer(puVar1 + 0x1b); - local_14 = CONCAT31(local_14._1_3_,5); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),5); if (_glfw == 0) { _glfwInputError(0x10001,0); ChangeWindowMessageFilterEx((HWND)0x0,0x4a,1,(PCHANGEFILTERSTRUCT)0x0); @@ -174,8 +174,8 @@ void Multiplayer::flush_channel(int *param_1) ExceptionList = &local_10; if (g_multiplayerService != (void *)0x0) { (**(code **)(*(int *)((char *)g_multiplayerService + 0x38) + 0xc)) - (0xffffffff,__security_cookie ^ (int)register0x00000010 - 4U); - _Var3 = param_1._0_1_; + (0xffffffff,__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); + _Var3 = (*(undefined1 *)((char *)&(param_1) + 0x0)); piVar5 = (int *)**(int **)((char *)pvVar2 + 0x30); if (piVar5 != *(int **)((char *)pvVar2 + 0x30)) { do { @@ -250,16 +250,16 @@ void Multiplayer::leave_lobby(void *callback, void *userData) puStack_c = &LAB_00b11f45; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; local_24 = 0xb9c1bc; lobbyRefCount = (int *)0x0; local_8 = 0; - ((std::shared_ptr *)((void *)((int)&local_24 + 4)))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); - local_24 = CONCAT44(local_24._4_4_,KAGE::Network::Multiplayer::Lobby::vftable); + ((std::shared_ptr *)((void *)(GHIDRA_INT(&local_24) + 4)))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); + local_24 = CONCAT44((*(undefined4 *)((char *)&(local_24) + 0x4)),KAGE::Network::Multiplayer::Lobby::vftable); local_8 = 1; - if (local_24._4_4_ != (int *)0x0) { - isLastRef = (**(code **)(*local_24._4_4_ + 0xc))(uVar1); + if ((*(undefined4 *)((char *)&(local_24) + 0x4)) != (int *)0x0) { + isLastRef = (**(code **)(*(*(undefined4 *)((char *)&(local_24) + 0x4)) + 0xc))(uVar1); if (isLastRef != '\0') { isNoLobby = false; goto LAB_00a29d75; @@ -267,12 +267,12 @@ void Multiplayer::leave_lobby(void *callback, void *userData) } isNoLobby = true; LAB_00a29d75: - local_24 = CONCAT44(local_24._4_4_,KAGE::Network::Multiplayer::ConstLobby::vftable); + local_24 = CONCAT44((*(undefined4 *)((char *)&(local_24) + 0x4)),KAGE::Network::Multiplayer::ConstLobby::vftable); local_8 = 2; if (lobbyRefCount != (int *)0x0) { isLastRef = (**(code **)(*lobbyRefCount + 0xc))(); if ((isLastRef != '\0') && (g_lobbyReleaseFn != (void *)0x0)) { - (*g_lobbyReleaseFn)((int)&local_24 + 4); + (*g_lobbyReleaseFn)(GHIDRA_INT(&local_24) + 4); } } local_8 = 0xffffffff; @@ -306,12 +306,12 @@ LAB_00a29d75: local_28 = userData; ((CommandThread *)(&DAT_00c79a60))->CommandThread::post_command(&command); if (commandCallbacks != (void *)0x0) { - uVar1 = (int)ppuStack_30 - (int)commandCallbacks & 0xfffffff8; + uVar1 = GHIDRA_INT(ppuStack_30) - GHIDRA_INT(commandCallbacks) & 0xfffffff8; ptr = commandCallbacks; if (0xfff < uVar1) { ptr = *(void **)((char *)commandCallbacks + -4); uVar1 = uVar1 + 0x23; - if (0x1f < (uint)((int)commandCallbacks + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(commandCallbacks) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -337,7 +337,7 @@ void * Multiplayer::get_lobby(void *outLobby) *(undefined4 *)((char *)outLobby + 4) = 0; *(undefined4 *)((char *)outLobby + 8) = 0; local_8 = 0; - ((std::shared_ptr *)((undefined4 *)((int)outLobby + 4)))->std::shared_ptr::assign((void *)((int)this + 0x24)); + ((std::shared_ptr *)((undefined4 *)(GHIDRA_INT(outLobby) + 4)))->std::shared_ptr::assign((void *)(GHIDRA_INT(this) + 0x24)); *(undefined ***)outLobby = KAGE::Network::Multiplayer::Lobby::vftable; ExceptionList = local_10; return outLobby; @@ -371,7 +371,7 @@ void Multiplayer::handle_member_status(void *lobby, ulonglong *userId, int statu puStack_c = &LAB_00b11fc5; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; ppuStack_2c = KAGE::Network::Multiplayer::ConstLobby::vftable; pvStack_28 = (void *)0x0; @@ -380,10 +380,10 @@ void Multiplayer::handle_member_status(void *lobby, ulonglong *userId, int statu ((std::shared_ptr *)(&pvStack_28))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); if (pvStack_28 == (void *)0x0) { local_20 = 0; - local_20._4_4_ = (int *)0x0; - local_20._0_4_ = 0; - iVar2 = (int)local_20._4_4_; - currentLobbyIdLow = (int)local_20; + (*(undefined4 *)((char *)&(local_20) + 0x4)) = (int *)0x0; + (*(undefined4 *)((char *)&(local_20) + 0x0)) = 0; + iVar2 = (*(undefined4 *)((char *)&(GHIDRA_INT(local_20)) + 0x4)); + currentLobbyIdLow = GHIDRA_INT(local_20); } else { iVar2 = *(int *)((char *)pvStack_28 + 0xc); @@ -392,10 +392,10 @@ void Multiplayer::handle_member_status(void *lobby, ulonglong *userId, int statu iVar4 = *(int *)((char *)lobby + 4); if (iVar4 == 0) { local_20 = 0; - local_20._4_4_ = (int *)0x0; - local_20._0_4_ = 0; - lobbyIdHigh = (int)local_20._4_4_; - iVar4 = (int)local_20; + (*(undefined4 *)((char *)&(local_20) + 0x4)) = (int *)0x0; + (*(undefined4 *)((char *)&(local_20) + 0x0)) = 0; + lobbyIdHigh = (*(undefined4 *)((char *)&(GHIDRA_INT(local_20)) + 0x4)); + iVar4 = GHIDRA_INT(local_20); } else { lobbyIdHigh = *(int *)(iVar4 + 0xc); @@ -433,7 +433,7 @@ void Multiplayer::handle_member_status(void *lobby, ulonglong *userId, int statu (**(code **)(*(int *)((char *)pvVar3 + 0x10) + 0xc))(0xffffffff); std::map::erase(userId); (**(code **)(*(int *)((char *)pvVar3 + 0x10) + 0x10))(); - queueMutex = (int *)((int)pvVar3 + 0x38); + queueMutex = (int *)(GHIDRA_INT(pvVar3) + 0x38); if (queueMutex == (int *)0x0) { KAGE_LogMessage(0x10,(byte *)"Invalid mutex object specified"); } @@ -444,8 +444,8 @@ void Multiplayer::handle_member_status(void *lobby, ulonglong *userId, int statu if (queuedNode != *(int **)((char *)pvVar3 + 0x30)) { do { nextNode = (int *)*queuedNode; - local_20 = CONCAT44(nextNode,(int)local_20); - if ((*(int *)queuedNode[2] == (int)*userId) && + local_20 = CONCAT44(nextNode,GHIDRA_INT(local_20)); + if ((*(int *)queuedNode[2] == GHIDRA_INT(*userId)) && (*(int *)(queuedNode[2] + 4) == *(int *)((char *)userId + 4))) { *(int **)queuedNode[1] = nextNode; *(int *)(*queuedNode + 4) = queuedNode[1]; @@ -457,7 +457,7 @@ void Multiplayer::handle_member_status(void *lobby, ulonglong *userId, int statu (*g_multiplayerRelease)(queuedNode + 2); } operator_delete(queuedNode,0x10); - nextNode = local_20._4_4_; + nextNode = (*(undefined4 *)((char *)&(local_20) + 0x4)); } queuedNode = nextNode; } while (nextNode != *(int **)((char *)pvVar3 + 0x30)); @@ -490,12 +490,12 @@ void Multiplayer::handle_member_status(void *lobby, ulonglong *userId, int statu local_8 = 7; iVar2 = *(int *)((char *)lobby + 4); if (iVar2 == 0) { - local_20._4_4_ = (int *)0x0; - local_20._0_4_ = 0; + (*(undefined4 *)((char *)&(local_20) + 0x4)) = (int *)0x0; + (*(undefined4 *)((char *)&(local_20) + 0x0)) = 0; } else { - local_20._0_4_ = *(undefined4 *)(iVar2 + 8); - local_20._4_4_ = *(int **)(iVar2 + 0xc); + (*(undefined4 *)((char *)&(local_20) + 0x0)) = *(undefined4 *)(iVar2 + 8); + (*(undefined4 *)((char *)&(local_20) + 0x4)) = *(int **)(iVar2 + 0xc); } std::vector<8byte>::_Emplace_reallocate(0,&local_20); if ((undefined **)eventArgsEnd == ppuStack_2c) { @@ -503,7 +503,7 @@ void Multiplayer::handle_member_status(void *lobby, ulonglong *userId, int statu } else { iVar2 = *(int *)((char *)userId + 4); - *eventArgsEnd = (int)*userId; + *eventArgsEnd = GHIDRA_INT(*userId); eventArgsEnd[1] = iVar2; eventArgsEnd = eventArgsEnd + 2; } @@ -518,12 +518,12 @@ void Multiplayer::handle_member_status(void *lobby, ulonglong *userId, int statu } FUN_00a2a5a0(&local_38); if (eventArgsBegin != (void *)0x0) { - uVar1 = (int)ppuStack_2c - (int)eventArgsBegin & 0xfffffff8; + uVar1 = GHIDRA_INT(ppuStack_2c) - GHIDRA_INT(eventArgsBegin) & 0xfffffff8; pvVar3 = eventArgsBegin; if (0xfff < uVar1) { pvVar3 = *(void **)((char *)eventArgsBegin + -4); uVar1 = uVar1 + 0x23; - if (0x1f < (uint)((int)eventArgsBegin + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(eventArgsBegin) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } diff --git a/src/game/music.cpp b/src/game/music.cpp index 6c5de4e..207db83 100644 --- a/src/game/music.cpp +++ b/src/game/music.cpp @@ -156,11 +156,11 @@ void Music::LoadConfig(byte *xmlpath, byte ismod) Manager *manager; puStack_20 = (undefined1 *)(rootPath + 0xe); - ehState._0_1_ = 0xff; - ehState._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(ehState) + 0x1)) = 0xffffff; puStack_18 = &LAB_00b00897; savedExceptionList = ExceptionList; - uVar2 = __security_cookie ^ (uint)(rootPath + 0xb); + uVar2 = __security_cookie ^ GHIDRA_UINT((rootPath + 0xb)); ExceptionList = &savedExceptionList; uVar14 = 0; pbStack_10214 = xmlpath; @@ -172,27 +172,27 @@ void Music::LoadConfig(byte *xmlpath, byte ismod) MVar3 = this[199]; pMVar9 = this + 199; MStack_10220 = (Music)0x0; - iVar4 = (int)this[200] - (int)MVar3 >> 0x1f; + iVar4 = GHIDRA_INT(this[200]) - GHIDRA_INT(MVar3) >> 0x1f; pMStack_1022c = pMVar9; - if (((int)this[200] - (int)MVar3) / 0x60 + iVar4 != iVar4) { + if ((GHIDRA_INT(this[200]) - GHIDRA_INT(MVar3)) / 0x60 + iVar4 != iVar4) { MStack_10228 = (Music)0x0; do { - pvVar5 = *(void **)((int)((int)MVar3 + 0x58) + (int)MStack_10228); + pvVar5 = *(void **)(GHIDRA_INT((GHIDRA_INT(MVar3) + 0x58)) + GHIDRA_INT(MStack_10228)); if (pvVar5 != (void *)0x0) { - xmlpath = (byte *)((int)pvVar5 + -4); + xmlpath = (byte *)(GHIDRA_INT(pvVar5) + -4); ehState = (byte ******)0x0; _eh_vector_destructor_iterator_(pvVar5,0x34,*(uint *)xmlpath,FUN_007e1430); uVar14 = *(uint *)xmlpath * 0x34 + 4; operator_delete(xmlpath,uVar14); - ehState._0_1_ = 0xff; - ehState._1_3_ = 0xffffff; - *(undefined4 *)((int)*pMStack_1022c + 0x58 + (int)MStack_10228) = 0; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(ehState) + 0x1)) = 0xffffff; + *(undefined4 *)(GHIDRA_INT(*pMStack_1022c) + 0x58 + GHIDRA_INT(MStack_10228)) = 0; pMVar9 = pMStack_1022c; } MVar3 = *pMVar9; - MStack_10228 = (Music)((int)MStack_10228 + 0x60); - MStack_10220 = (Music)((int)MStack_10220 + 1); - } while ((uint)MStack_10220 < (uint)(((int)pMVar9[1] - (int)MVar3) / 0x60)); + MStack_10228 = (Music)(GHIDRA_INT(MStack_10228) + 0x60); + MStack_10220 = (Music)(GHIDRA_INT(MStack_10220) + 1); + } while (GHIDRA_UINT(MStack_10220) < GHIDRA_UINT(((GHIDRA_INT(pMVar9[1]) - GHIDRA_INT(MVar3)) / 0x60))); } if (&layersBegin != pMVar9) { MStack_10220 = pMVar9[1]; @@ -202,7 +202,7 @@ void Music::LoadConfig(byte *xmlpath, byte ismod) pMVar9[2] = (Music)0x0; if (MVar3 != (Music)0x0) { if (MVar3 != MStack_10220) { - puVar10 = (uint *)((int)MVar3 + 0x48); + puVar10 = (uint *)(GHIDRA_INT(MVar3) + 0x48); do { uVar14 = *puVar10; if (0xf < uVar14) { @@ -210,9 +210,9 @@ void Music::LoadConfig(byte *xmlpath, byte ismod) uVar7 = uVar14 + 1; pvVar6 = pvVar5; if (0xfff < uVar7) { - pvVar6 = *(void **)((int)pvVar5 - 4); + pvVar6 = *(void **)(GHIDRA_INT(pvVar5) - 4); uVar7 = uVar14 + 0x24; - if (0x1f < (uint)((int)pvVar5 + (-4 - (int)pvVar6))) goto LAB_007e13a8; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar5) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_007e13a8; } operator_delete(pvVar6,uVar7); } @@ -225,9 +225,9 @@ void Music::LoadConfig(byte *xmlpath, byte ismod) uVar7 = uVar14 + 1; pvVar6 = pvVar5; if (0xfff < uVar7) { - pvVar6 = *(void **)((int)pvVar5 - 4); + pvVar6 = *(void **)(GHIDRA_INT(pvVar5) - 4); uVar7 = uVar14 + 0x24; - if (0x1f < (uint)((int)pvVar5 + (-4 - (int)pvVar6))) goto LAB_007e13a8; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar5) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_007e13a8; } operator_delete(pvVar6,uVar7); } @@ -240,9 +240,9 @@ void Music::LoadConfig(byte *xmlpath, byte ismod) uVar7 = uVar14 + 1; pvVar6 = pvVar5; if (0xfff < uVar7) { - pvVar6 = *(void **)((int)pvVar5 - 4); + pvVar6 = *(void **)(GHIDRA_INT(pvVar5) - 4); uVar7 = uVar14 + 0x24; - if (0x1f < (uint)((int)pvVar5 + (-4 - (int)pvVar6))) goto LAB_007e13a8; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar5) + (-4 - GHIDRA_INT(pvVar6))))) goto LAB_007e13a8; } operator_delete(pvVar6,uVar7); } @@ -254,21 +254,21 @@ void Music::LoadConfig(byte *xmlpath, byte ismod) } while (MVar1 != MStack_10220); pMVar9 = pMStack_1022c; } - uVar14 = (((int)MStack_10228 - (int)MVar3) / 0x60) * 0x60; + uVar14 = ((GHIDRA_INT(MStack_10228) - GHIDRA_INT(MVar3)) / 0x60) * 0x60; xmlpath = (byte *)MVar3; if (0xfff < uVar14) { xmlpath = *(byte **)((char *)MVar3 + -4); uVar14 = uVar14 + 0x23; - if (0x1f < ((int)MVar3 - (int)xmlpath) - 4U) goto LAB_007e13a8; + if (0x1f < (GHIDRA_INT(MVar3) - GHIDRA_INT(xmlpath)) - 4U) goto LAB_007e13a8; } operator_delete(xmlpath,uVar14); } } MStack_10220 = pMVar9[1]; - uVar7 = ((int)MStack_10220 - (int)*pMVar9) / 0x60; + uVar7 = (GHIDRA_INT(MStack_10220) - GHIDRA_INT(*pMVar9)) / 0x60; if (uVar7 < 0x79) { if (uVar7 < 0x78) { - if ((uint)(((int)pMVar9[2] - (int)*pMVar9) / 0x60) < 0x78) { + if (GHIDRA_UINT(((GHIDRA_INT(pMVar9[2]) - GHIDRA_INT(*pMVar9)) / 0x60)) < 0x78) { FUN_007e2fa0(xmlpath,uVar14); } else { @@ -279,15 +279,15 @@ void Music::LoadConfig(byte *xmlpath, byte ismod) } else { MVar3 = *pMVar9; - FUN_007e2e00((int)MStack_10220 - (int)*pMVar9,uVar2); - this[200] = (Music)((int)MVar3 + 0x2d00); + FUN_007e2e00(GHIDRA_INT(MStack_10220) - GHIDRA_INT(*pMVar9),uVar2); + this[200] = (Music)(GHIDRA_INT(MVar3) + 0x2d00); } } MVar3 = MStack_10218; iVar4 = (**(code **)(*(int *)MStack_10218 + 4))(); pMStack_1022c = operator_new_tracked(iVar4 + 1); (**(code **)(*(int *)MVar3 + 0x14))(pMStack_1022c,1,iVar4); - *(undefined1 *)((int)&(*(undefined1 *)((char *)(pMStack_1022c) + 0x0)) + iVar4) = 0; + *(undefined1 *)(GHIDRA_INT(&(*(undefined1 *)((char *)(pMStack_1022c) + 0x0))) + iVar4) = 0; (*(code *)**(undefined4 **)MVar3)(1); FUN_00413b90(); ehState = (byte ******)0x1; @@ -309,8 +309,8 @@ void Music::LoadConfig(byte *xmlpath, byte ismod) ch = *strCursor; strCursor = strCursor + 1; } while (ch != 0); - ((std::string *)((char *)rootPath))->std::string::assign(pbVar8,(int)strCursor - (int)(pbVar8 + 1)); - ehState._0_1_ = 2; + ((std::string *)((char *)rootPath))->std::string::assign(pbVar8,GHIDRA_INT(strCursor) - GHIDRA_INT((pbVar8 + 1))); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; if (pvVar5 == (void *)0x0) { KAGE_LogMessage(0x10,(byte *)"Could not find root node \'music\' in %s\n"); } @@ -343,7 +343,7 @@ void Music::LoadConfig(byte *xmlpath, byte ismod) trackLayerPathCapacity = (void *)0xf; trackLayerPath = (void *)0x0; trackLayerMul = 1.0; - ehState._0_1_ = 5; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; pbStack_10214 = *(byte **)((char *)MStack_10220 + 0x20); atoiFn = atoi_exref; if (pbStack_10214 != (byte *)0x0) { @@ -360,7 +360,7 @@ void Music::LoadConfig(byte *xmlpath, byte ismod) isLess = ch < *literalCursor; if (ch != *literalCursor) { LAB_007e0078: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_007e007d; } if (ch == 0) break; @@ -390,7 +390,7 @@ LAB_007e007d: isLess = ch < *literalCursor; if (ch != *literalCursor) { LAB_007e00d4: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_007e00d9; } if (ch == 0) break; @@ -412,7 +412,7 @@ LAB_007e00d9: ch = *strCursor; strCursor = strCursor + 1; } while (ch != 0); - ((std::string *)((char *)trackName))->std::string::assign(pbVar8,(int)strCursor - (int)(pbVar8 + 1)); + ((std::string *)((char *)trackName))->std::string::assign(pbVar8,GHIDRA_INT(strCursor) - GHIDRA_INT((pbVar8 + 1))); } else { pcVar11 = "intro"; @@ -425,7 +425,7 @@ LAB_007e00d9: isLess = ch < (byte)*pcVar11; if (ch != *pcVar11) { LAB_007e0140: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_007e0145; } if (ch == 0) break; @@ -447,29 +447,29 @@ LAB_007e0145: ch = *strCursor; strCursor = strCursor + 1; } while (ch != 0); - valueLength = (std_string *)(strCursor + -(int)(pbVar8 + 1)); + valueLength = (std_string *)(strCursor + -GHIDRA_INT((pbVar8 + 1))); if ((std_string *)(0x7fffffff - rootSize) < valueLength) goto LAB_007e1407; strBuffer = (byte *******)rootPath; if (0xf < rootCapacity) { strBuffer = rootPath[0]; } - ((std::string *)(joinedPath._buf))->std::string::concat((int)fStack_10224,valueLength,(byte *)strBuffer, - rootSize,pbVar8,(uint)valueLength); + ((std::string *)(joinedPath._buf))->std::string::concat(GHIDRA_INT(fStack_10224),valueLength,(byte *)strBuffer, + rootSize,pbVar8,GHIDRA_UINT(valueLength)); tempStringFlags = tempStringFlags | 1; - ehState._0_1_ = 6; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 6; ModManager::TryRedirectPath (&manager->_modManager,(std_string *)redirectedIntro,&joinedPath); if (&introPath != (byte ********)extraout_EAX) { if ((byte ******)0xf < introPathCapacity) { - freeSize = (byte ******)((int)introPathCapacity + 1); + freeSize = (byte ******)(GHIDRA_INT(introPathCapacity) + 1); strBuffer = introPath; if ((byte ******)0xfff < freeSize) { strBuffer = (byte *******)introPath[-1]; freeSize = introPathCapacity + 9; - if ((byte *)0x1f < (byte *)((int)introPath + (-4 - (int)strBuffer))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(introPath) + (-4 - GHIDRA_INT(strBuffer)))) goto LAB_007e13a8; } - operator_delete(strBuffer,(uint)freeSize); + operator_delete(strBuffer,GHIDRA_UINT(freeSize)); } introPath = (byte *******)*extraout_EAX; ppppppbStack_101f0 = extraout_EAX[1]; @@ -485,25 +485,25 @@ LAB_007e0145: uVar2 = redirectedIntroCapacity + 1; pvVar5 = redirectedIntro[0]; if (0xfff < uVar2) { - pvVar5 = *(void **)((int)redirectedIntro[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(redirectedIntro[0]) + -4); uVar2 = redirectedIntroCapacity + 0x24; - if (0x1f < (uint)((int)redirectedIntro[0] + (-4 - (int)pvVar5))) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedIntro[0]) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_007e13a8; } operator_delete(pvVar5,uVar2); } redirectedIntroSize = 0; redirectedIntroCapacity = 0xf; - redirectedIntro[0] = (void *)((uint)redirectedIntro[0] & 0xffffff00); + redirectedIntro[0] = (void *)(GHIDRA_UINT(redirectedIntro[0]) & 0xffffff00); LAB_007e028f: - ehState._0_1_ = 5; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; if (0xf < joinedPath._capacity) { uVar2 = joinedPath._capacity + 1; - pvVar5 = (void *)joinedPath._buf._0_4_; + pvVar5 = (*(undefined4 *)((char *)&((void *)joinedPath._buf) + 0x0)); if (0xfff < uVar2) { - pvVar5 = *(void **)(joinedPath._buf._0_4_ + -4); + pvVar5 = *(void **)((*(undefined4 *)((char *)&(joinedPath._buf) + 0x0)) + -4); uVar2 = joinedPath._capacity + 0x24; - if (0x1f < (uint)(joinedPath._buf._0_4_ + (-4 - (int)pvVar5))) + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(joinedPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_007e13a8; } operator_delete(pvVar5,uVar2); @@ -520,7 +520,7 @@ LAB_007e028f: isLess = ch < *literalCursor; if (ch != *literalCursor) { LAB_007e0385: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_007e038a; } if (ch == 0) break; @@ -542,29 +542,29 @@ LAB_007e038a: ch = *strCursor; strCursor = strCursor + 1; } while (ch != 0); - valueLength = (std_string *)(strCursor + -(int)(pbVar8 + 1)); + valueLength = (std_string *)(strCursor + -GHIDRA_INT((pbVar8 + 1))); if ((std_string *)(0x7fffffff - rootSize) < valueLength) goto LAB_007e1407; strBuffer = (byte *******)rootPath; if (0xf < rootCapacity) { strBuffer = rootPath[0]; } - ((std::string *)(joinedPath._buf))->std::string::concat((int)fStack_10224,valueLength, - (byte *)strBuffer,rootSize,pbVar8,(uint)valueLength); + ((std::string *)(joinedPath._buf))->std::string::concat(GHIDRA_INT(fStack_10224),valueLength, + (byte *)strBuffer,rootSize,pbVar8,GHIDRA_UINT(valueLength)); tempStringFlags = tempStringFlags | 2; - ehState._0_1_ = 7; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 7; ModManager::TryRedirectPath (&manager->_modManager,(std_string *)redirectedPath,&joinedPath); if (&trackPath != (byte ********)extraout_EAX_00) { if ((byte ******)0xf < trackPathCapacity) { - freeSize = (byte ******)((int)trackPathCapacity + 1); + freeSize = (byte ******)(GHIDRA_INT(trackPathCapacity) + 1); strBuffer = trackPath; if ((byte ******)0xfff < freeSize) { strBuffer = (byte *******)trackPath[-1]; freeSize = trackPathCapacity + 9; - if ((byte *)0x1f < (byte *)((int)trackPath + (-4 - (int)strBuffer))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(trackPath) + (-4 - GHIDRA_INT(strBuffer)))) goto LAB_007e13a8; } - operator_delete(strBuffer,(uint)freeSize); + operator_delete(strBuffer,GHIDRA_UINT(freeSize)); } trackPath = (byte *******)*extraout_EAX_00; ppppppbStack_101d8 = extraout_EAX_00[1]; @@ -580,16 +580,16 @@ LAB_007e038a: uVar2 = redirectedPathCapacity + 1; pvVar5 = redirectedPath[0]; if (0xfff < uVar2) { - pvVar5 = *(void **)((int)redirectedPath[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(redirectedPath[0]) + -4); uVar2 = redirectedPathCapacity + 0x24; - if (0x1f < (uint)((int)redirectedPath[0] + (-4 - (int)pvVar5))) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPath[0]) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_007e13a8; } operator_delete(pvVar5,uVar2); } redirectedPathSize = 0; redirectedPathCapacity = 0xf; - redirectedPath[0] = (void *)((uint)redirectedPath[0] & 0xffffff00); + redirectedPath[0] = (void *)(GHIDRA_UINT(redirectedPath[0]) & 0xffffff00); goto LAB_007e028f; } pcVar11 = "layerintro"; @@ -602,7 +602,7 @@ LAB_007e038a: isLess = ch < (byte)*pcVar11; if (ch != *pcVar11) { LAB_007e0503: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_007e0508; } if (ch == 0) break; @@ -624,26 +624,26 @@ LAB_007e0508: ch = *strCursor; strCursor = strCursor + 1; } while (ch != 0); - valueLength = (std_string *)(strCursor + -(int)(pbVar8 + 1)); + valueLength = (std_string *)(strCursor + -GHIDRA_INT((pbVar8 + 1))); if ((std_string *)(0x7fffffff - rootSize) < valueLength) goto LAB_007e1407; strBuffer = (byte *******)rootPath; if (0xf < rootCapacity) { strBuffer = rootPath[0]; } - ((std::string *)(joinedPath._buf))->std::string::concat((int)fStack_10224,valueLength, - (byte *)strBuffer,rootSize,pbVar8,(uint)valueLength); + ((std::string *)(joinedPath._buf))->std::string::concat(GHIDRA_INT(fStack_10224),valueLength, + (byte *)strBuffer,rootSize,pbVar8,GHIDRA_UINT(valueLength)); tempStringFlags = tempStringFlags | 4; - ehState._0_1_ = 8; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 8; ModManager::TryRedirectPath (&manager->_modManager,(std_string *)redirectedLayerIntro,&joinedPath); if (&trackLayerIntro != extraout_EAX_01) { if ((void *)0xf < trackLayerIntroCapacity) { - uVar2 = (int)trackLayerIntroCapacity + 1; + uVar2 = GHIDRA_INT(trackLayerIntroCapacity) + 1; pvVar5 = trackLayerIntro; if (0xfff < uVar2) { pvVar5 = *(void **)((char *)trackLayerIntro + -4); - uVar2 = (int)trackLayerIntroCapacity + 0x24; - if (0x1f < (uint)((int)trackLayerIntro + (-4 - (int)pvVar5))) + uVar2 = GHIDRA_INT(trackLayerIntroCapacity) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(trackLayerIntro) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_007e13a8; } operator_delete(pvVar5,uVar2); @@ -662,16 +662,16 @@ LAB_007e0508: uVar2 = redirectedLayerIntroCapacity + 1; pvVar5 = redirectedLayerIntro[0]; if (0xfff < uVar2) { - pvVar5 = *(void **)((int)redirectedLayerIntro[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(redirectedLayerIntro[0]) + -4); uVar2 = redirectedLayerIntroCapacity + 0x24; - if (0x1f < (uint)((int)redirectedLayerIntro[0] + (-4 - (int)pvVar5))) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedLayerIntro[0]) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_007e13a8; } operator_delete(pvVar5,uVar2); } redirectedLayerIntroSize = 0; redirectedLayerIntroCapacity = 0xf; - redirectedLayerIntro[0] = (void *)((uint)redirectedLayerIntro[0] & 0xffffff00); + redirectedLayerIntro[0] = (void *)(GHIDRA_UINT(redirectedLayerIntro[0]) & 0xffffff00); goto LAB_007e028f; } pcVar11 = "layer"; @@ -684,7 +684,7 @@ LAB_007e0508: isLess = ch < (byte)*pcVar11; if (ch != *pcVar11) { LAB_007e0680: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_007e0685; } if (ch == 0) break; @@ -706,7 +706,7 @@ LAB_007e0685: ch = *strCursor; strCursor = strCursor + 1; } while (ch != 0); - valueLength = (std_string *)(strCursor + -(int)(pbVar8 + 1)); + valueLength = (std_string *)(strCursor + -GHIDRA_INT((pbVar8 + 1))); if ((std_string *)(0x7fffffff - rootSize) < valueLength) { LAB_007e1407: /* WARNING: Subroutine does not return */ @@ -716,20 +716,20 @@ LAB_007e1407: if (0xf < rootCapacity) { strBuffer = rootPath[0]; } - ((std::string *)(joinedPath._buf))->std::string::concat((int)fStack_10224,valueLength, - (byte *)strBuffer,rootSize,pbVar8,(uint)valueLength); + ((std::string *)(joinedPath._buf))->std::string::concat(GHIDRA_INT(fStack_10224),valueLength, + (byte *)strBuffer,rootSize,pbVar8,GHIDRA_UINT(valueLength)); tempStringFlags = tempStringFlags | 8; - ehState._0_1_ = 9; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 9; ModManager::TryRedirectPath (&manager->_modManager,(std_string *)redirectedLayerPath,&joinedPath); if (&trackLayerPath != extraout_EAX_02) { if ((void *)0xf < trackLayerPathCapacity) { - uVar2 = (int)trackLayerPathCapacity + 1; + uVar2 = GHIDRA_INT(trackLayerPathCapacity) + 1; pvVar5 = trackLayerPath; if (0xfff < uVar2) { pvVar5 = *(void **)((char *)trackLayerPath + -4); - uVar2 = (int)trackLayerPathCapacity + 0x24; - if (0x1f < (uint)((int)trackLayerPath + (-4 - (int)pvVar5))) + uVar2 = GHIDRA_INT(trackLayerPathCapacity) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(trackLayerPath) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_007e13a8; } operator_delete(pvVar5,uVar2); @@ -748,16 +748,16 @@ LAB_007e1407: uVar2 = redirectedLayerPathCapacity + 1; pvVar5 = redirectedLayerPath[0]; if (0xfff < uVar2) { - pvVar5 = *(void **)((int)redirectedLayerPath[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(redirectedLayerPath[0]) + -4); uVar2 = redirectedLayerPathCapacity + 0x24; - if (0x1f < (uint)((int)redirectedLayerPath[0] + (-4 - (int)pvVar5))) + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedLayerPath[0]) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_007e13a8; } operator_delete(pvVar5,uVar2); } redirectedLayerPathSize = 0; redirectedLayerPathCapacity = 0xf; - redirectedLayerPath[0] = (void *)((uint)redirectedLayerPath[0] & 0xffffff00); + redirectedLayerPath[0] = (void *)(GHIDRA_UINT(redirectedLayerPath[0]) & 0xffffff00); goto LAB_007e028f; } literalCursor = &DAT_00b6be9c; @@ -770,7 +770,7 @@ LAB_007e1407: isLess = ch < *literalCursor; if (ch != *literalCursor) { LAB_007e07f4: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_007e07f9; } if (ch == 0) break; @@ -793,7 +793,7 @@ LAB_007e07f9: isLess = ch < (byte)*pcVar11; if (ch != *pcVar11) { LAB_007e0984: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_007e0989; } if (ch == 0) break; @@ -824,7 +824,7 @@ LAB_007e0989: isLess = ch < *literalCursor; if (ch != *literalCursor) { LAB_007e09e0: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_007e09e5; } if (ch == 0) break; @@ -855,7 +855,7 @@ LAB_007e09e5: isLess = ch < (byte)*pcVar11; if (ch != *pcVar11) { LAB_007e0a40: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_007e0a45; } if (ch == 0) break; @@ -886,7 +886,7 @@ LAB_007e0a45: isLess = ch < (byte)*pcVar11; if (ch != *pcVar11) { LAB_007e0aa0: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_007e0aa5; } if (ch == 0) break; @@ -923,7 +923,7 @@ LAB_007e0aa5: ch = *strCursor; strCursor = strCursor + 1; } while (ch != 0); - ((std::string *)((char *)loopText))->std::string::assign(pbVar8,(int)strCursor - (int)(pbVar8 + 1)); + ((std::string *)((char *)loopText))->std::string::assign(pbVar8,GHIDRA_INT(strCursor) - GHIDRA_INT((pbVar8 + 1))); if (loopTextSize == 0) { LAB_007e0901: loopAndLayerMode = loopAndLayerMode & 0xff00; @@ -945,7 +945,7 @@ LAB_007e0901: uVar2 = 0; } else { - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; } if (uVar2 != 0) goto LAB_007e0899; } @@ -967,7 +967,7 @@ LAB_007e0899: uVar2 = 0; } else { - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; } if (uVar2 == 0) goto LAB_007e08f8; } @@ -979,7 +979,7 @@ LAB_007e0899: if (iVar4 == 0) goto LAB_007e0901; } LAB_007e08f8: - loopAndLayerMode = CONCAT11(loopAndLayerMode._1_1_,1); + loopAndLayerMode = CONCAT11((*(undefined1 *)((char *)&(loopAndLayerMode) + 0x1)),1); } if (0xf < loopTextCapacity) { uVar2 = loopTextCapacity + 1; @@ -987,13 +987,13 @@ LAB_007e08f8: if (0xfff < uVar2) { loopChars = (int *******)loopText[0][-1]; uVar2 = loopTextCapacity + 0x24; - if (0x1f < (uint)((int)loopText[0] + (-4 - (int)loopChars))) goto LAB_007e13a8; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(loopText[0]) + (-4 - GHIDRA_INT(loopChars))))) goto LAB_007e13a8; } operator_delete(loopChars,uVar2); } loopTextSize = 0; loopTextCapacity = 0xf; - loopText[0] = (int *******)((uint)loopText[0] & 0xffffff00); + loopText[0] = (int *******)(GHIDRA_UINT(loopText[0]) & 0xffffff00); } atoiFn = atoi_exref; } @@ -1023,9 +1023,9 @@ LAB_007e02cd: pcVar11 = *(char **)(pbStack_10214 + 8); } if (pcVar11 == layerLiteralEnd + -0xb69bd7) { - strCursor = (byte *)(pcVar11 + (int)pbVar8); + strCursor = (byte *)(pcVar11 + GHIDRA_INT(pbVar8)); if (strCursor <= pbVar8) goto LAB_007e0b23; - iVar4 = (int)"layer" - (int)pbVar8; + iVar4 = GHIDRA_INT("layer") - GHIDRA_INT(pbVar8); while (*pbVar8 == pbVar8[iVar4]) { pbVar8 = pbVar8 + 1; if (strCursor <= pbVar8) goto LAB_007e0b23; @@ -1044,24 +1044,24 @@ LAB_007e0b23: newLayerPathCapacity = 0xf; newLayerPath = (void *)0x0; newLayerMul = 0x3f800000; - ehState = (byte ******)CONCAT31(ehState._1_3_,0xb); + ehState = (byte ******)CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),0xb); if (layersEnd == MStack_10228) { FUN_007e28f0(layersEnd,newLayerIntro); MStack_10228 = layersCapacity; } else { FUN_007e2870(); - layersEnd = (Music)((int)MVar3 + 0x34); + layersEnd = (Music)(GHIDRA_INT(MVar3) + 0x34); } MVar3 = layersEnd; - ehState._0_1_ = 5; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; if (0xf < newLayerPathCapacity) { uVar2 = newLayerPathCapacity + 1; pvVar5 = newLayerPath; if (0xfff < uVar2) { pvVar5 = *(void **)((char *)newLayerPath + -4); uVar2 = newLayerPathCapacity + 0x24; - if (0x1f < (uint)((int)newLayerPath + (-4 - (int)pvVar5))) goto LAB_007e13a8; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(newLayerPath) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_007e13a8; } operator_delete(pvVar5,uVar2); } @@ -1069,9 +1069,9 @@ LAB_007e0b23: uVar2 = newLayerIntroCapacity + 1; pvVar5 = newLayerIntro[0]; if (0xfff < uVar2) { - pvVar5 = *(void **)((int)newLayerIntro[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(newLayerIntro[0]) + -4); uVar2 = newLayerIntroCapacity + 0x24; - if (0x1f < (uint)((int)newLayerIntro[0] + (-4 - (int)pvVar5))) goto LAB_007e13a8; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(newLayerIntro[0]) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_007e13a8; } operator_delete(pvVar5,uVar2); } @@ -1090,7 +1090,7 @@ LAB_007e0b23: isLess = ch < (byte)*pcVar11; if (ch != *pcVar11) { LAB_007e0c98: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_007e0c9d; } if (ch == 0) break; @@ -1112,20 +1112,20 @@ LAB_007e0c9d: ch = *strCursor; strCursor = strCursor + 1; } while (ch != 0); - valueLength = (std_string *)(strCursor + -(int)(pbVar8 + 1)); + valueLength = (std_string *)(strCursor + -GHIDRA_INT((pbVar8 + 1))); if ((std_string *)(0x7fffffff - rootSize) < valueLength) goto LAB_007e1407; strBuffer = (byte *******)rootPath; if (0xf < rootCapacity) { strBuffer = rootPath[0]; } - ((std::string *)(joinedPath._buf))->std::string::concat((int)fStack_10224,valueLength,(byte *)strBuffer, - rootSize,pbVar8,(uint)valueLength); + ((std::string *)(joinedPath._buf))->std::string::concat(GHIDRA_INT(fStack_10224),valueLength,(byte *)strBuffer, + rootSize,pbVar8,GHIDRA_UINT(valueLength)); tempStringFlags = tempStringFlags | 0x10; - ehState = (byte ******)CONCAT31(ehState._1_3_,0xc); + ehState = (byte ******)CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),0xc); ModManager::TryRedirectPath (&manager->_modManager,&redirectedNewLayerIntro,&joinedPath); MVar3 = layersEnd; - piVar12 = (int *)((int)layersEnd + -0x34); + piVar12 = (int *)(GHIDRA_INT(layersEnd) + -0x34); if (piVar12 != extraout_EAX_03) { ((std::string *)((char *)piVar12))->std::string::_Tidy_deallocate(); iVar4 = extraout_EAX_03[1]; @@ -1145,7 +1145,7 @@ LAB_007e0c9d: valueLength = &redirectedNewLayerIntro; LAB_007e0e57: ((std::string *)(valueLength->_buf))->std::string::_Tidy_deallocate(); - ehState._0_1_ = 5; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; ((std::string *)(joinedPath._buf))->std::string::_Tidy_deallocate(); } else { @@ -1159,7 +1159,7 @@ LAB_007e0e57: isLess = ch < *literalCursor; if (ch != *literalCursor) { LAB_007e0d90: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_007e0d95; } if (ch == 0) break; @@ -1181,20 +1181,20 @@ LAB_007e0d95: ch = *strCursor; strCursor = strCursor + 1; } while (ch != 0); - valueLength = (std_string *)(strCursor + -(int)(pbVar8 + 1)); + valueLength = (std_string *)(strCursor + -GHIDRA_INT((pbVar8 + 1))); if (valueLength <= (std_string *)(0x7fffffff - rootSize)) { strBuffer = (byte *******)rootPath; if (0xf < rootCapacity) { strBuffer = rootPath[0]; } - ((std::string *)(joinedPath._buf))->std::string::concat((int)fStack_10224,valueLength, - (byte *)strBuffer,rootSize,pbVar8,(uint)valueLength); + ((std::string *)(joinedPath._buf))->std::string::concat(GHIDRA_INT(fStack_10224),valueLength, + (byte *)strBuffer,rootSize,pbVar8,GHIDRA_UINT(valueLength)); tempStringFlags = tempStringFlags | 0x20; - ehState = (byte ******)CONCAT31(ehState._1_3_,0xd); + ehState = (byte ******)CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),0xd); ModManager::TryRedirectPath (&manager->_modManager,&redirectedNewLayerPath,&joinedPath); MVar3 = layersEnd; - piVar12 = (int *)((int)layersEnd + -0x1c); + piVar12 = (int *)(GHIDRA_INT(layersEnd) + -0x1c); if (piVar12 != extraout_EAX_04) { ((std::string *)((char *)piVar12))->std::string::_Tidy_deallocate(); iVar4 = extraout_EAX_04[1]; @@ -1226,7 +1226,7 @@ LAB_007e0d95: isLess = ch < *literalCursor; if (ch != *literalCursor) { LAB_007e0ea0: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_007e0ea5; } if (ch == 0) break; @@ -1259,13 +1259,13 @@ LAB_007e0ea5: MStack_10218 = layersBegin; } if (MStack_10218 != layersEnd) { - pbVar8 = (byte *)(((int)layersEnd - (int)MStack_10218) / 0x34); + pbVar8 = (byte *)((GHIDRA_INT(layersEnd) - GHIDRA_INT(MStack_10218)) / 0x34); fStack_10224 = 0.0; - uVar2 = -(uint)((int)(ZEXT48(pbVar8) * 0x34 >> 0x20) != 0) | (uint)(ZEXT48(pbVar8) * 0x34); + uVar2 = -GHIDRA_UINT((GHIDRA_INT((ZEXT48(pbVar8) * 0x34 >> 0x20)) != 0)) | GHIDRA_UINT((ZEXT48(pbVar8) * 0x34)); pbStack_10214 = pbVar8; layerCount = pbVar8; - layerAlloc = operator_new_tracked(-(uint)(0xfffffffb < uVar2) | uVar2 + 4); - ehState._0_1_ = 0xe; + layerAlloc = operator_new_tracked(-GHIDRA_UINT((0xfffffffb < uVar2)) | uVar2 + 4); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xe; if (layerAlloc == (undefined4 *)0x0) { layerArray = (undefined4 *)0x0; } @@ -1273,14 +1273,14 @@ LAB_007e0ea5: layerArray = layerAlloc + 1; *layerAlloc = pbVar8; _eh_vector_constructor_iterator_ - (layerArray,0x34,(uint)pbVar8,(_func_void_void_ptr *)&LAB_007df270,FUN_007e1430) + (layerArray,0x34,GHIDRA_UINT(pbVar8),(_func_void_void_ptr *)&LAB_007df270,FUN_007e1430) ; } - ehState._0_1_ = 5; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; layers = layerArray; if (pbVar8 != (byte *)0x0) { layerDst = layerArray + 6; - puVar10 = (uint *)((int)MStack_10218 + 0x2c); + puVar10 = (uint *)(GHIDRA_INT(MStack_10218) + 0x2c); do { if (layerDst != puVar10 + -5) { srcChars = puVar10 + -0xb; @@ -1305,16 +1305,16 @@ LAB_007e0ea5: if (ismod == 0) { if (trackId - 1U < 0x77) { iVar4 = trackId * 0x60; - pvVar5 = *(void **)((int)this[199] + 0x58 + iVar4); + pvVar5 = *(void **)(GHIDRA_INT(this[199]) + 0x58 + iVar4); if (pvVar5 != (void *)0x0) { - puVar10 = (uint *)((int)pvVar5 + -4); - ehState._0_1_ = 0xf; + puVar10 = (uint *)(GHIDRA_INT(pvVar5) + -4); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xf; _eh_vector_destructor_iterator_(pvVar5,0x34,*puVar10,FUN_007e1430); operator_delete(puVar10,*puVar10 * 0x34 + 4); - ehState._0_1_ = 5; - *(undefined4 *)((int)this[199] + 0x58 + iVar4) = 0; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; + *(undefined4 *)(GHIDRA_INT(this[199]) + 0x58 + iVar4) = 0; } - piVar12 = (int *)((int)this[199] + iVar4); + piVar12 = (int *)(GHIDRA_INT(this[199]) + iVar4); *piVar12 = trackId; if ((byte ********)(piVar12 + 1) != trackName) { strBuffer = (byte *******)trackName; @@ -1328,95 +1328,95 @@ LAB_007e0ea5: if ((byte ******)0xf < introPathCapacity) { strBuffer = introPath; } - ((std::string *)((char *)(piVar12 + 7)))->std::string::assign((byte *)strBuffer,(uint)introPathSize); + ((std::string *)((char *)(piVar12 + 7)))->std::string::assign((byte *)strBuffer,GHIDRA_UINT(introPathSize)); } if ((byte ********)(piVar12 + 0xd) != &trackPath) { strBuffer = (byte *******)&trackPath; if ((byte ******)0xf < trackPathCapacity) { strBuffer = trackPath; } - ((std::string *)((char *)(piVar12 + 0xd)))->std::string::assign((byte *)strBuffer,(uint)trackPathSize); + ((std::string *)((char *)(piVar12 + 0xd)))->std::string::assign((byte *)strBuffer,GHIDRA_UINT(trackPathSize)); } *(undefined1 *)(piVar12 + 0x13) = (undefined1)loopAndLayerMode; - *(undefined1 *)((char *)piVar12 + 0x4d) = loopAndLayerMode._1_1_; - piVar12[0x14] = (int)volumeMul; - piVar12[0x16] = (int)layers; - piVar12[0x15] = (int)fadeSpeed; - piVar12[0x17] = (int)layerCount; + *(undefined1 *)((char *)piVar12 + 0x4d) = (*(undefined1 *)((char *)&(loopAndLayerMode) + 0x1)); + piVar12[0x14] = GHIDRA_INT(volumeMul); + piVar12[0x16] = GHIDRA_INT(layers); + piVar12[0x15] = GHIDRA_INT(fadeSpeed); + piVar12[0x17] = GHIDRA_INT(layerCount); } } else { MVar3 = this[200]; - trackId = ((int)MVar3 - (int)this[199]) / 0x60; + trackId = (GHIDRA_INT(MVar3) - GHIDRA_INT(this[199])) / 0x60; if (MVar3 == this[0xc9]) { FUN_007e2c90(MVar3,&trackId); } else { FUN_007e2bf0(); - this[200] = (Music)((int)this[200] + 0x60); + this[200] = (Music)(GHIDRA_INT(this[200]) + 0x60); } } - ehState._0_1_ = 4; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 4; if ((void *)0xf < trackLayerPathCapacity) { - uVar2 = (int)trackLayerPathCapacity + 1; + uVar2 = GHIDRA_INT(trackLayerPathCapacity) + 1; pvVar5 = trackLayerPath; if (0xfff < uVar2) { pvVar5 = *(void **)((char *)trackLayerPath + -4); - uVar2 = (int)trackLayerPathCapacity + 0x24; - if (0x1f < (uint)((int)trackLayerPath + (-4 - (int)pvVar5))) goto LAB_007e13a8; + uVar2 = GHIDRA_INT(trackLayerPathCapacity) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(trackLayerPath) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_007e13a8; } operator_delete(pvVar5,uVar2); } if ((void *)0xf < trackLayerIntroCapacity) { - uVar2 = (int)trackLayerIntroCapacity + 1; + uVar2 = GHIDRA_INT(trackLayerIntroCapacity) + 1; pvVar5 = trackLayerIntro; if (0xfff < uVar2) { pvVar5 = *(void **)((char *)trackLayerIntro + -4); - uVar2 = (int)trackLayerIntroCapacity + 0x24; - if (0x1f < (uint)((int)trackLayerIntro + (-4 - (int)pvVar5))) goto LAB_007e13a8; + uVar2 = GHIDRA_INT(trackLayerIntroCapacity) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(trackLayerIntro) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_007e13a8; } operator_delete(pvVar5,uVar2); } MVar1 = layersEnd; - ehState._0_1_ = 3; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 3; MVar3 = MStack_10218; if (MStack_10218 != (Music)0x0) { - for (; MVar3 != MVar1; MVar3 = (Music)((int)MVar3 + 0x34)) { - ((std::string *)((char *)((int)MVar3 + 0x18)))->std::string::_Tidy_deallocate(); + for (; MVar3 != MVar1; MVar3 = (Music)(GHIDRA_INT(MVar3) + 0x34)) { + ((std::string *)((char *)(GHIDRA_INT(MVar3) + 0x18)))->std::string::_Tidy_deallocate(); ((std::string *)((char *)MVar3))->std::string::_Tidy_deallocate(); } - uVar2 = (((int)MStack_10228 - (int)MStack_10218) / 0x34) * 0x34; + uVar2 = ((GHIDRA_INT(MStack_10228) - GHIDRA_INT(MStack_10218)) / 0x34) * 0x34; MVar3 = MStack_10218; if (0xfff < uVar2) { MVar3 = *(Music *)((char *)MStack_10218 + -4); uVar2 = uVar2 + 0x23; - if (0x1f < ((int)MStack_10218 - (int)MVar3) - 4U) goto LAB_007e13a8; + if (0x1f < (GHIDRA_INT(MStack_10218) - GHIDRA_INT(MVar3)) - 4U) goto LAB_007e13a8; } operator_delete((void *)MVar3,uVar2); layersBegin = (Music)0x0; layersEnd = (Music)0x0; layersCapacity = (Music)0x0; } - ehState._0_1_ = 2; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; if ((byte ******)0xf < trackPathCapacity) { - freeSize = (byte ******)((int)trackPathCapacity + 1); + freeSize = (byte ******)(GHIDRA_INT(trackPathCapacity) + 1); strBuffer = trackPath; if ((byte ******)0xfff < freeSize) { strBuffer = (byte *******)trackPath[-1]; freeSize = trackPathCapacity + 9; - if ((byte *)0x1f < (byte *)((int)trackPath + (-4 - (int)strBuffer))) goto LAB_007e13a8; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(trackPath) + (-4 - GHIDRA_INT(strBuffer)))) goto LAB_007e13a8; } - operator_delete(strBuffer,(uint)freeSize); + operator_delete(strBuffer,GHIDRA_UINT(freeSize)); } if ((byte ******)0xf < introPathCapacity) { - freeSize = (byte ******)((int)introPathCapacity + 1); + freeSize = (byte ******)(GHIDRA_INT(introPathCapacity) + 1); strBuffer = introPath; if ((byte ******)0xfff < freeSize) { strBuffer = (byte *******)introPath[-1]; freeSize = introPathCapacity + 9; - if ((byte *)0x1f < (byte *)((int)introPath + (-4 - (int)strBuffer))) goto LAB_007e13a8; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(introPath) + (-4 - GHIDRA_INT(strBuffer)))) goto LAB_007e13a8; } - operator_delete(strBuffer,(uint)freeSize); + operator_delete(strBuffer,GHIDRA_UINT(freeSize)); } if (0xf < trackNameCapacity) { uVar2 = trackNameCapacity + 1; @@ -1424,19 +1424,19 @@ LAB_007e0ea5: if (0xfff < uVar2) { strBuffer = (byte *******)trackName[0][-1]; uVar2 = trackNameCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)trackName[0] + (-4 - (int)strBuffer))) goto LAB_007e13a8; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(trackName[0]) + (-4 - GHIDRA_INT(strBuffer)))) goto LAB_007e13a8; } operator_delete(strBuffer,uVar2); } } - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; if (0xf < rootCapacity) { uVar2 = rootCapacity + 1; strBuffer = rootPath[0]; if (0xfff < uVar2) { strBuffer = (byte *******)rootPath[0][-1]; uVar2 = rootCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)rootPath[0] + (-4 - (int)strBuffer))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(rootPath[0]) + (-4 - GHIDRA_INT(strBuffer)))) { LAB_007e13a8: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1477,7 +1477,7 @@ void Music::Update() DAT_00c7167c = (g_manager->_optionsConfig)._sfxVolume; FUN_007e15a0(1); fVar3 = 1.0; - if ((*(char *)(channel + 0xd5) == '\0') || ((int)channel[0xd9] < 1)) { + if ((*(char *)(channel + 0xd5) == '\0') || (GHIDRA_INT(channel[0xd9]) < 1)) { MVar2 = channel[0xd8]; if (channel[0xd9] == (Music)0xffffff9c) { MVar2 = (Music)((1.0 - (float)MVar2) * 0.04 + (float)MVar2); @@ -1495,7 +1495,7 @@ void Music::Update() } } else { - channel[0xd9] = (Music)((int)channel[0xd9] + -1); + channel[0xd9] = (Music)(GHIDRA_INT(channel[0xd9]) + -1); MVar2 = (Music)((0.1 - (float)channel[0xd8]) * 0.08 + (float)channel[0xd8]); } channel[0xd8] = MVar2; @@ -1509,16 +1509,16 @@ void Music::Update() do { ((MusicChannel *)(local_1c))->MusicChannel::update_volume(MVar2 != *channel); manager = g_manager; - MVar2 = (Music)((int)MVar2 + 1); + MVar2 = (Music)(GHIDRA_INT(MVar2) + 1); local_1c = local_1c + 1; - } while ((uint)MVar2 < 2); + } while (GHIDRA_UINT(MVar2) < 2); isPitchChanged = '\0'; local_11 = '\0'; if (g_game != (Game *)0x0) { local_1c = (MusicChannel *)&DAT_0000002a; local_18 = &(g_game->_seedEffects)._seedEffects; std::set::find_node(&local_30,&local_1c); - if (((*(char *)((char *)local_28 + 0xd) == '\0') && ((int)local_28[4] < 0x2b)) && + if (((*(char *)((char *)local_28 + 0xd) == '\0') && (GHIDRA_INT(local_28[4]) < 0x2b)) && (local_28 != *local_18)) { channel[0xc5] = (Music)0x3e19999a; isPitchChanged = '\x01'; @@ -1615,16 +1615,16 @@ void Music::Update() } manager = g_manager; LAB_007e1c86: - if ((*(char *)(channel + ((int)*channel + 1) * 0x61) == '\0') && (channel[0xc4] != (Music)0x0)) { + if ((*(char *)(channel + (GHIDRA_INT(*channel) + 1) * 0x61) == '\0') && (channel[0xc4] != (Music)0x0)) { if ((manager->_musicManager)._isEnabled != 0) { musicVolume = (Music)(manager->_optionsConfig)._musicVolume; } - if (-1 < (int)channel[0xc4]) { - if ((int)channel[0xc4] < ((int)channel[200] - (int)channel[199]) / 0x60) { - Play(channel,(int)channel[0xc4],0.0); - channel[(int)*channel * 0x61 + 0x5e] = (Music)0x0; - channel[(int)*channel * 0x61 + 0x5f] = musicVolume; - channel[(int)*channel * 0x61 + 0x60] = (Music)0x3da3d70a; + if (-1 < GHIDRA_INT(channel[0xc4])) { + if (GHIDRA_INT(channel[0xc4]) < (GHIDRA_INT(channel[200]) - GHIDRA_INT(channel[199])) / 0x60) { + Play(channel,GHIDRA_INT(channel[0xc4]),0.0); + channel[GHIDRA_INT(*channel) * 0x61 + 0x5e] = (Music)0x0; + channel[GHIDRA_INT(*channel) * 0x61 + 0x5f] = musicVolume; + channel[GHIDRA_INT(*channel) * 0x61 + 0x60] = (Music)0x3da3d70a; } } channel[0xc4] = (Music)0x0; @@ -1639,10 +1639,10 @@ void Music::Play(int musicid, float volume) int channelsLeft; Music channel; - if ((((-1 < musicid) && (musicid < ((int)this[200] - (int)this[199]) / 0x60)) || + if ((((-1 < musicid) && (musicid < (GHIDRA_INT(this[200]) - GHIDRA_INT(this[199])) / 0x60)) || (KAGE_LogMessage(0x10,(byte *)"Music ID %d out of bounds.\n"), -1 < musicid)) && - (musicid < ((int)this[200] - (int)this[199]) / 0x60)) { - track = musicid * 0x60 + (int)this[199]; + (musicid < (GHIDRA_INT(this[200]) - GHIDRA_INT(this[199])) / 0x60)) { + track = musicid * 0x60 + GHIDRA_INT(this[199]); if (*(int *)(track + 0x44) == 0) { KAGE_LogMessage(1,(byte *)"[warn] no music for ID %d (%s).\n"); return; @@ -1655,8 +1655,8 @@ void Music::Play(int musicid, float volume) channel = *this; this[0xc3] = (Music)musicid; this[0xc4] = (Music)0x0; - this[(int)channel * 0x61 + 0x5f] = (Music)volume; - this[(int)channel * 0x61 + 0x5e] = (Music)volume; + this[GHIDRA_INT(channel) * 0x61 + 0x5f] = (Music)volume; + this[GHIDRA_INT(channel) * 0x61 + 0x5e] = (Music)volume; MusicChannel::play_track(track); FUN_007df5b0(); } @@ -1666,11 +1666,11 @@ void Music::Play(int musicid, float volume) // 007e2080 void Music::Fadein(uint Id, float Volume, float FadeRate) { - if ((-1 < (int)Id) && ((int)Id < ((int)this[200] - (int)this[199]) / 0x60)) { + if ((-1 < GHIDRA_INT(Id)) && (GHIDRA_INT(Id) < (GHIDRA_INT(this[200]) - GHIDRA_INT(this[199])) / 0x60)) { Play(this,Id,0.0); - this[(int)*this * 0x61 + 0x5e] = (Music)0x0; - this[(int)*this * 0x61 + 0x5f] = (Music)Volume; - this[(int)*this * 0x61 + 0x60] = (Music)FadeRate; + this[GHIDRA_INT(*this) * 0x61 + 0x5e] = (Music)0x0; + this[GHIDRA_INT(*this) * 0x61 + 0x5f] = (Music)Volume; + this[GHIDRA_INT(*this) * 0x61 + 0x60] = (Music)FadeRate; } return; } @@ -1678,8 +1678,8 @@ void Music::Fadein(uint Id, float Volume, float FadeRate) // 007e2100 void Music::Fadeout(float FadeRate) { - this[(int)*this * 0x61 + 0x5f] = (Music)0x0; - this[(int)*this * 0x61 + 0x60] = (Music)FadeRate; + this[GHIDRA_INT(*this) * 0x61 + 0x5f] = (Music)0x0; + this[GHIDRA_INT(*this) * 0x61 + 0x60] = (Music)FadeRate; this[0xc4] = (Music)0x0; return; } @@ -1741,18 +1741,18 @@ void Music::Resume() Music channel; channel = *this; - if (this[(int)channel * 0x61 + 1] != (Music)0x0) { - isPaused = (**(code **)(*(int *)this[(int)channel * 0x61 + 1] + 0x28))(); + if (this[GHIDRA_INT(channel) * 0x61 + 1] != (Music)0x0) { + isPaused = (**(code **)(*(int *)this[GHIDRA_INT(channel) * 0x61 + 1] + 0x28))(); if (isPaused != '\0') { - if ((this[(int)channel * 0x61 + 1] != (Music)0x0) && - ((*(undefined1 *)((char *)&(this[(int)channel * 0x61 + 3]) + 0x2)) != '\0')) { - (**(code **)(*(int *)this[(int)channel * 0x61 + 1] + 0x34))(); - *(undefined2 *)&(*(undefined1 *)((char *)&(this[(int)channel * 0x61 + 3]) + 0x1)) = 1; + if ((this[GHIDRA_INT(channel) * 0x61 + 1] != (Music)0x0) && + ((*(undefined1 *)((char *)&(this[GHIDRA_INT(channel) * 0x61 + 3]) + 0x2)) != '\0')) { + (**(code **)(*(int *)this[GHIDRA_INT(channel) * 0x61 + 1] + 0x34))(); + *(undefined2 *)&(*(undefined1 *)((char *)&(this[GHIDRA_INT(channel) * 0x61 + 3]) + 0x1)) = 1; } - *(undefined1 *)(this + (int)channel * 0x61 + 0xb) = 1; + *(undefined1 *)(this + GHIDRA_INT(channel) * 0x61 + 0xb) = 1; } } - layer = this + (int)channel * 0x61 + 0xe; + layer = this + GHIDRA_INT(channel) * 0x61 + 0xe; layersLeft = 6; do { if (*layer != (Music)0x0) { @@ -1768,17 +1768,17 @@ void Music::Resume() layer = layer + 0xd; layersLeft = layersLeft + -1; } while (layersLeft != 0); - *(undefined1 *)(this + (int)channel * 0x61 + 0x61) = - *(undefined1 *)(this + (int)channel * 0x61 + 0xb); + *(undefined1 *)(this + GHIDRA_INT(channel) * 0x61 + 0x61) = + *(undefined1 *)(this + GHIDRA_INT(channel) * 0x61 + 0xb); return; } // 007e2410 void Music::DisableLayer(int id) { - if ((uint)id < 6) { - this[((uint)id >> 5) + (int)*this * 0x61 + 0x5c] = - (Music)((uint)this[((uint)id >> 5) + (int)*this * 0x61 + 0x5c] & ~(1 << ((byte)id & 0x1f))) + if (GHIDRA_UINT(id) < 6) { + this[(GHIDRA_UINT(id) >> 5) + GHIDRA_INT(*this) * 0x61 + 0x5c] = + (Music)(GHIDRA_UINT(this[(GHIDRA_UINT(id) >> 5) + GHIDRA_INT(*this) * 0x61 + 0x5c]) & ~(1 << ((byte)id & 0x1f))) ; } return; @@ -1788,7 +1788,7 @@ void Music::DisableLayer(int id) byte Music::IsLayerEnabled(uint id) { if (id < 6) { - return ((uint)this[(id >> 5) + (int)*this * 0x61 + 0x5c] & 1 << ((byte)id & 0x1f)) != 0; + return (GHIDRA_UINT(this[(id >> 5) + GHIDRA_INT(*this) * 0x61 + 0x5c]) & 1 << ((byte)id & 0x1f)) != 0; } return 0; } @@ -1798,15 +1798,15 @@ void Music::ResetPitch() { this[0xc5] = (Music)0x3f800000; this[0xc6] = (Music)0x3f800000; - SetPitchAll(this + (int)*this * 0x61 + 1,1.0); + SetPitchAll(this + GHIDRA_INT(*this) * 0x61 + 1,1.0); return; } // 007e2510 void Music::VolumeSlide(float TargetVolume, float FadeRate) { - this[(int)*this * 0x61 + 0x5f] = (Music)(TargetVolume * (g_manager->_optionsConfig)._musicVolume); - this[(int)*this * 0x61 + 0x60] = (Music)FadeRate; + this[GHIDRA_INT(*this) * 0x61 + 0x5f] = (Music)(TargetVolume * (g_manager->_optionsConfig)._musicVolume); + this[GHIDRA_INT(*this) * 0x61 + 0x60] = (Music)FadeRate; return; } @@ -1816,8 +1816,8 @@ void Music::UpdateVolume() Manager *manager; manager = g_manager; - this[(int)*this * 0x61 + 0x5e] = (Music)(g_manager->_optionsConfig)._musicVolume; - this[(int)*this * 0x61 + 0x5f] = (Music)(manager->_optionsConfig)._musicVolume; + this[GHIDRA_INT(*this) * 0x61 + 0x5e] = (Music)(g_manager->_optionsConfig)._musicVolume; + this[GHIDRA_INT(*this) * 0x61 + 0x5f] = (Music)(manager->_optionsConfig)._musicVolume; return; } @@ -1827,8 +1827,8 @@ void Music::PlayJingle(int musicid, int unusedInt, byte unusedBool) int track; undefined4 extraout_ECX; - if ((-1 < musicid) && (musicid < ((int)this[200] - (int)this[199]) / 0x60)) { - track = musicid * 0x60 + (int)this[199]; + if ((-1 < musicid) && (musicid < (GHIDRA_INT(this[200]) - GHIDRA_INT(this[199])) / 0x60)) { + track = musicid * 0x60 + GHIDRA_INT(this[199]); if ((this[0xc3] != (Music)0x34) && ((this[0xc3] != (Music)0x76 && (*(int *)(track + 0x44) != 0)))) { MusicStream::play(track + 0x34,*(undefined1 *)(track + 0x4c),this[0xc5]); diff --git a/src/game/music_channel.cpp b/src/game/music_channel.cpp index 4d75632..c461fab 100644 --- a/src/game/music_channel.cpp +++ b/src/game/music_channel.cpp @@ -25,14 +25,14 @@ void MusicChannel::play_track(int param_1) } } layerIndex = 0; - in_ECX[0x5c] = (uint)*(byte *)(param_1 + 0x4d); + in_ECX[0x5c] = GHIDRA_UINT(*(byte *)(param_1 + 0x4d)); in_ECX[8] = 0x3f800000; in_ECX[7] = 0x3f800000; in_ECX[6] = *(int *)(param_1 + 0x50); in_ECX[9] = *(int *)(param_1 + 0x54); in_ECX[0x5b] = 0; piVar1 = in_ECX + 0x10; - layerBias = -0x40 - (int)in_ECX; + layerBias = -0x40 - GHIDRA_INT(in_ECX); do { if ((char)piVar1[7] != '\0') { if ((int *)piVar1[-3] != (int *)0x0) { @@ -49,15 +49,15 @@ void MusicChannel::play_track(int param_1) piVar1[8] = 0; } if ((layerIndex < *(uint *)(param_1 + 0x5c)) && - (trackLayer = (int)piVar1 + *(int *)(param_1 + 0x58) + layerBias, + (trackLayer = GHIDRA_INT(piVar1) + *(int *)(param_1 + 0x58) + layerBias, *(int *)(trackLayer + 0x28) != 0)) { if (*(int *)(trackLayer + 0x10) == 0) { MusicStream::play(trackLayer + 0x18,1,in_XMM3_Da); } else { MusicStream::play(trackLayer,0,in_XMM3_Da); - layerPath = (undefined4 *)((int)piVar1 + *(int *)(param_1 + 0x58) + 0x18 + layerBias); - if (0xf < (uint)layerPath[5]) { + layerPath = (undefined4 *)(GHIDRA_INT(piVar1) + *(int *)(param_1 + 0x58) + 0x18 + layerBias); + if (0xf < GHIDRA_UINT(layerPath[5])) { layerPath = (undefined4 *)*layerPath; } if ((int *)piVar1[-3] != (int *)0x0) { diff --git a/src/game/music_manager.cpp b/src/game/music_manager.cpp index 7c2733f..70ae19b 100644 --- a/src/game/music_manager.cpp +++ b/src/game/music_manager.cpp @@ -14,7 +14,7 @@ Vector * MusicManager::RandomVector(Vector *outVec) float fVar2; randomValue = ::Random(); - fVar1 = (float)((double)(int)randomValue + __uint_to_double_fixup[-((int)randomValue >> 0x1f)]) * + fVar1 = (float)((double)GHIDRA_INT(randomValue) + __uint_to_double_fixup[-(GHIDRA_INT(randomValue) >> 0x1f)]) * 2.3283064e-10 * 3.14; fVar1 = fVar1 + fVar1; fVar2 = cos(fVar1); @@ -78,7 +78,7 @@ MusicManager::~MusicManager() *(undefined4 *)(in_ECX + 0x338) = 0x3f800000; *(undefined4 *)(in_ECX + 0x33c) = 0; *(undefined4 *)(in_ECX + 0x340) = 0x3f800000; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); if (*(int **)(in_ECX + 0x330) != (int *)0x0) { isLastRef = (**(code **)(**(int **)(in_ECX + 0x330) + 0xc))(); if ((isLastRef != '\0') && (g_soundReleaseFn != (void *)0x0)) { @@ -122,9 +122,9 @@ void MusicManager::Crossfade(int musicId, float fadeRate) Manager *manager; if ((((-1 < musicId) && - (musicId < ((int)(this->_entries)._end - (int)(this->_entries)._begin) / 0x60)) || + (musicId < (GHIDRA_INT((this->_entries)._end) - GHIDRA_INT((this->_entries)._begin)) / 0x60)) || (KAGE_LogMessage(0x10,(byte *)"Music ID %d out of bounds.\n"), -1 < musicId)) && - (pvVar1 = (this->_entries)._begin, musicId < ((int)(this->_entries)._end - (int)pvVar1) / 0x60) + (pvVar1 = (this->_entries)._begin, musicId < (GHIDRA_INT((this->_entries)._end) - GHIDRA_INT(pvVar1)) / 0x60) ) { if (musicId == this->_currentMusicID) { KAGE_LogMessage(1,(byte *) @@ -137,7 +137,7 @@ void MusicManager::Crossfade(int musicId, float fadeRate) (g_manager->_optionsConfig)._musicVolume; return; } - pvVar1 = (void *)(musicId * 0x60 + (int)pvVar1); + pvVar1 = (void *)(musicId * 0x60 + GHIDRA_INT(pvVar1)); if (*(int *)((char *)pvVar1 + 0x44) == 0) { KAGE_LogMessage(1,(byte *)"[warn] no music for ID %d (%s).\n"); return; @@ -168,7 +168,7 @@ void MusicManager::Crossfade(int musicId, float fadeRate) } while (layersLeft != 0); this->_channels[this->_currentChannel]._fadeRate = fadeRate; newChannel = this->_currentChannel + 1U & 0x80000001; - if ((int)newChannel < 0) { + if (GHIDRA_INT(newChannel) < 0) { newChannel = (newChannel - 1 | 0xfffffffe) + 1; } this->_currentChannel = newChannel; @@ -195,8 +195,8 @@ void MusicManager::EnableLayer(int layerId, byte isInstant) undefined4 volume; int *enabledLayers; - if (((uint)layerId < 6) && - (enabledLayers = &this->_channels[this->_currentChannel]._enabledLayers + ((uint)layerId >> 5), + if ((GHIDRA_UINT(layerId) < 6) && + (enabledLayers = &this->_channels[this->_currentChannel]._enabledLayers + (GHIDRA_UINT(layerId) >> 5), *enabledLayers = *enabledLayers | 1 << ((byte)layerId & 0x1f), isInstant != 0)) { iVar1 = this->_currentChannel; channelOffset = iVar1 * 0x184; @@ -280,7 +280,7 @@ void MusicManager::EnableLayer(int layerId, byte isInstant) void MusicManager::Queue(int musicId) { if ((-1 < musicId) && - (musicId < ((int)(this->_entries)._end - (int)(this->_entries)._begin) / 0x60)) { + (musicId < (GHIDRA_INT((this->_entries)._end) - GHIDRA_INT((this->_entries)._begin)) / 0x60)) { this->_queuedMusicID = musicId; } return; diff --git a/src/game/mutex.cpp b/src/game/mutex.cpp index 2ed273e..716d9d6 100644 --- a/src/game/mutex.cpp +++ b/src/game/mutex.cpp @@ -19,7 +19,7 @@ void Mutex::lock() local_8 = 0xffffffff; puStack_c = &LAB_00b14fd0; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(buffer + 0x410); + uVar2 = __security_cookie ^ GHIDRA_UINT((buffer + 0x410)); ExceptionList = &local_10; local_14 = uVar2; EnterCriticalSection(*(LPCRITICAL_SECTION *)this); @@ -38,16 +38,16 @@ void Mutex::lock() bVar1 = *messageEnd; messageEnd = messageEnd + 1; } while (bVar1 != 0); - ((std::string *)((char *)message))->std::string::assign(buffer,(int)messageEnd - (int)(buffer + 1)); + ((std::string *)((char *)message))->std::string::assign(buffer,GHIDRA_INT(messageEnd) - GHIDRA_INT((buffer + 1))); local_8 = 0; (*(code *)PTR_FUN_00c5aa7c)(message,uVar2); if (0xf < messageCapacity) { uVar2 = messageCapacity + 1; allocBase = message[0]; if (0xfff < uVar2) { - allocBase = *(void **)((int)message[0] + -4); + allocBase = *(void **)(GHIDRA_INT(message[0]) + -4); uVar2 = messageCapacity + 0x24; - if (0x1f < (uint)((int)message[0] + (-4 - (int)allocBase))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(message[0]) + (-4 - GHIDRA_INT(allocBase))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } diff --git a/src/game/mutex/scope_lock.cpp b/src/game/mutex/scope_lock.cpp index bba852e..a706213 100644 --- a/src/game/mutex/scope_lock.cpp +++ b/src/game/mutex/scope_lock.cpp @@ -20,7 +20,7 @@ Mutex::ScopeLock::~ScopeLock() uStack_8 = 0xffffffff; puStack_c = &LAB_00b14f90; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(msgBuf + 0x410); + uVar2 = __security_cookie ^ GHIDRA_UINT((msgBuf + 0x410)); ExceptionList = &local_10; puVar1 = *(undefined4 **)this; if (puVar1 != (undefined4 *)0x0) { @@ -39,15 +39,15 @@ Mutex::ScopeLock::~ScopeLock() ch = *msgEnd; msgEnd = msgEnd + 1; } while (ch != 0); - ((std::string *)((char *)logString))->std::string::assign(msgBuf,(int)msgEnd - (int)(msgBuf + 1)); + ((std::string *)((char *)logString))->std::string::assign(msgBuf,GHIDRA_INT(msgEnd) - GHIDRA_INT((msgBuf + 1))); (*(code *)PTR_FUN_00c5aa7c)(logString,uVar2); if (0xf < logCapacity) { uVar2 = logCapacity + 1; ptr = logString[0]; if (0xfff < uVar2) { - ptr = *(void **)((int)logString[0] + -4); + ptr = *(void **)(GHIDRA_INT(logString[0]) + -4); uVar2 = logCapacity + 0x24; - if (0x1f < (uint)((int)logString[0] + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(logString[0]) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } diff --git a/src/game/net_desync_handler.cpp b/src/game/net_desync_handler.cpp index 5c72b20..3c6207c 100644 --- a/src/game/net_desync_handler.cpp +++ b/src/game/net_desync_handler.cpp @@ -59,17 +59,17 @@ void NetDesyncHandler::Update() if (iVar4 == 1) { uStack_38 = uStack_38 & 0xffffffff; local_3c = g_manager->_netplayManager; - local_44 = (NetplayManager)(*(int *)(g_manager + 1) - (int)local_3c >> 2); + local_44 = (NetplayManager)(*(int *)(g_manager + 1) - GHIDRA_INT(local_3c) >> 2); uVar6 = local_24; if (local_44 != (NetplayManager)0x0) { do { iVar4 = *(int *)(*(int *)local_3c + 0x374); if (iVar4 == 0) { sentMessage = 0; - sentMessage._4_4_ = (int *)0x0; - sentMessage._0_4_ = (float *)0x0; + (*(undefined4 *)((char *)&(sentMessage) + 0x4)) = (int *)0x0; + (*(undefined4 *)((char *)&(sentMessage) + 0x0)) = (float *)0x0; local_30 = (float *)sentMessage; - piVar13 = sentMessage._4_4_; + piVar13 = (*(undefined4 *)((char *)&(sentMessage) + 0x4)); } else { local_30 = *(float **)(iVar4 + 8); @@ -79,7 +79,7 @@ void NetDesyncHandler::Update() if (g_userProfile == (void *)0x0) { sentMessage = 0; local_2c = (int *)0x0; - sentMessage._0_4_ = (float *)0x0; + (*(undefined4 *)((char *)&(sentMessage) + 0x0)) = (float *)0x0; puVar12 = (undefined1 *)(float *)sentMessage; } else { @@ -90,7 +90,7 @@ void NetDesyncHandler::Update() if (((float *)puVar12 != local_30) || (local_2c != piVar13)) { uVar7 = 0; piVar9 = *(int **)((char *)this + 0x10); - idCount = *(int *)((char *)this + 0x14) - (int)piVar9 >> 3; + idCount = *(int *)((char *)this + 0x14) - GHIDRA_INT(piVar9) >> 3; if (idCount == 0) { ExceptionList = local_1c; return; @@ -106,10 +106,10 @@ void NetDesyncHandler::Update() } } local_24 = local_24 & 0xfffffffe; - uVar7 = uStack_38._4_4_ + 1; - local_3c = (NetplayManager)((int)local_3c + 4); + uVar7 = (*(undefined4 *)((char *)&(uStack_38) + 0x4)) + 1; + local_3c = (NetplayManager)(GHIDRA_INT(local_3c) + 4); uStack_38 = CONCAT44(uVar7,(undefined4)uStack_38); - } while (uVar7 < (uint)local_44); + } while (uVar7 < GHIDRA_UINT(local_44)); } local_24 = uVar6; write_desync_diff(); @@ -135,15 +135,15 @@ void NetDesyncHandler::Update() "[Frame: %d] NetDesyncHandler::process_desync_confirm_message() Local Save Checksum : %u \n" ); local_44 = (NetplayManager)0x0; - if (*(int *)(g_manager + 1) - (int)g_manager->_netplayManager >> 2 != 0) { + if (*(int *)(g_manager + 1) - GHIDRA_INT(g_manager->_netplayManager) >> 2 != 0) { do { - iVar4 = *(int *)((char *)g_manager->_netplayManager + (int)local_44 * 4); + iVar4 = *(int *)((char *)g_manager->_netplayManager + GHIDRA_INT(local_44) * 4); local_2c = (int *)(iVar4 + 0x370); cVar3 = (**(code **)(*(int *)(iVar4 + 0x370) + 0x14))(); if (cVar3 == '\0') { - resyncFramePtr = (NetplayManager *)((int)this + 0xc); + resyncFramePtr = (NetplayManager *)(GHIDRA_INT(this) + 0xc); maxFramePtr = &local_3c; - if ((uint)g_manager[1]._state <= (uint)*resyncFramePtr) { + if (GHIDRA_UINT(g_manager[1]._state) <= GHIDRA_UINT(*resyncFramePtr)) { maxFramePtr = resyncFramePtr; } local_28 = *maxFramePtr; @@ -279,20 +279,20 @@ LAB_008fdc8f: FUN_008ef1d0(&sentMessage); multiplayer_send_message(local_2c,pvVar11,messageRefCount); uStack_14 = 1; - if (((sentMessage._4_4_ != (int *)0x0) && - (cVar3 = (**(code **)(*sentMessage._4_4_ + 0xc))(), cVar3 != '\0')) && + if ((((*(undefined4 *)((char *)&(sentMessage) + 0x4)) != (int *)0x0) && + (cVar3 = (**(code **)(*(*(undefined4 *)((char *)&(sentMessage) + 0x4)) + 0xc))(), cVar3 != '\0')) && (g_multiplayerRelease != (void *)0x0)) { (*g_multiplayerRelease)(); } uStack_14 = 0xffffffff; } - local_44 = (NetplayManager)((int)local_44 + 1); - } while ((uint)local_44 < - (uint)(*(int *)(g_manager + 1) - (int)g_manager->_netplayManager >> 2)); + local_44 = (NetplayManager)(GHIDRA_INT(local_44) + 1); + } while (GHIDRA_UINT(local_44) < + GHIDRA_UINT((*(int *)(g_manager + 1) - GHIDRA_INT(g_manager->_netplayManager) >> 2))); } uVar6 = 0; manager = g_manager; - if (*(int *)(g_manager + 1) - (int)g_manager->_netplayManager >> 2 != 0) { + if (*(int *)(g_manager + 1) - GHIDRA_INT(g_manager->_netplayManager) >> 2 != 0) { do { local_48 = *(int **)(*(int *)((char *)manager->_netplayManager + uVar6 * 4) + 0x3bc); if (local_48 != (int *)0x0) { @@ -302,7 +302,7 @@ LAB_008fdc8f: *(undefined4 *)(*(int *)((char *)g_manager->_netplayManager + uVar6 * 4) + 0x3bc) = 0; } uVar6 = uVar6 + 1; - } while (uVar6 < (uint)(*(int *)(manager + 1) - (int)manager->_netplayManager >> 2)); + } while (uVar6 < GHIDRA_UINT((*(int *)(manager + 1) - GHIDRA_INT(manager->_netplayManager) >> 2))); } *(undefined4 *)this = 2; iVar4 = *(int *)((char *)this + 0x50) - *(int *)((char *)this + 0x4c); @@ -335,7 +335,7 @@ LAB_008fdc8f: if (iVar4 == 2) { local_2c = *(int **)((char *)this + 0x10); local_44 = (NetplayManager)0x0; - uVar6 = *(int *)((char *)this + 0x14) - (int)local_2c >> 3; + uVar6 = *(int *)((char *)this + 0x14) - GHIDRA_INT(local_2c) >> 3; _uStack_40 = CONCAT44(uVar6,uStack_40); if (uVar6 != 0) { local_48 = (int *)(*(int *)((char *)this + 0x20) - *(int *)((char *)this + 0x1c) >> 3); @@ -347,17 +347,17 @@ LAB_008fdc8f: } piVar9 = *(int **)((char *)this + 0x1c); while ((*piVar9 != *local_2c || (piVar9[1] != local_2c[1]))) { - piVar13 = (int *)((int)piVar13 + 1); + piVar13 = (int *)(GHIDRA_INT(piVar13) + 1); piVar9 = piVar9 + 2; if (local_48 <= piVar13) { ExceptionList = local_1c; return; } } - local_44 = (NetplayManager)((int)local_44 + 1); + local_44 = (NetplayManager)(GHIDRA_INT(local_44) + 1); local_2c = local_2c + 2; this = (void *)local_28; - } while ((uint)local_44 < uVar6); + } while (GHIDRA_UINT(local_44) < uVar6); } *(undefined4 *)this = 3; KAGE_LogMessage(1,(byte *) @@ -366,7 +366,7 @@ LAB_008fdc8f: return; } if (iVar4 == 3) { - if (*(uint *)((char *)this + 0xc) <= (uint)g_manager[1]._state) { + if (*(uint *)((char *)this + 0xc) <= GHIDRA_UINT(g_manager[1]._state)) { *(undefined4 *)this = 4; KAGE_LogMessage(1,(byte *)"[Frame: %d] Finalizing resync! Resync Frame = %d \n"); local_48 = (int *)0x4; @@ -383,8 +383,8 @@ LAB_008fdc8f: FUN_008ef1d0(&sentMessage); ((NetplayManager *)(&manager->_netplayManager))->NetplayManager::send_message(8,puVar12,pvVar11); uStack_14 = 4; - if (((sentMessage._4_4_ != (int *)0x0) && - (cVar3 = (**(code **)(*sentMessage._4_4_ + 0xc))(), cVar3 != '\0')) && + if ((((*(undefined4 *)((char *)&(sentMessage) + 0x4)) != (int *)0x0) && + (cVar3 = (**(code **)(*(*(undefined4 *)((char *)&(sentMessage) + 0x4)) + 0xc))(), cVar3 != '\0')) && (g_multiplayerRelease != (void *)0x0)) { (*g_multiplayerRelease)(); ExceptionList = local_1c; @@ -395,7 +395,7 @@ LAB_008fdc8f: else if (iVar4 == 4) { local_2c = *(int **)((char *)this + 0x1c); local_44 = (NetplayManager)0x0; - local_3c = (NetplayManager)(*(int *)((char *)this + 0x20) - (int)local_2c >> 3); + local_3c = (NetplayManager)(*(int *)((char *)this + 0x20) - GHIDRA_INT(local_2c) >> 3); if (local_3c != (NetplayManager)0x0) { local_48 = (int *)(*(int *)((char *)this + 0x2c) - *(int *)((char *)this + 0x28) >> 3); do { @@ -406,17 +406,17 @@ LAB_008fdc8f: } piVar9 = *(int **)((char *)this + 0x28); while ((*piVar9 != *local_2c || (piVar9[1] != local_2c[1]))) { - piVar13 = (int *)((int)piVar13 + 1); + piVar13 = (int *)(GHIDRA_INT(piVar13) + 1); piVar9 = piVar9 + 2; if (local_48 <= piVar13) { ExceptionList = local_1c; return; } } - local_44 = (NetplayManager)((int)local_44 + 1); + local_44 = (NetplayManager)(GHIDRA_INT(local_44) + 1); local_2c = local_2c + 2; this = (void *)local_28; - } while ((uint)local_44 < (uint)local_3c); + } while (GHIDRA_UINT(local_44) < GHIDRA_UINT(local_3c)); } iVar4 = *(int *)((char *)this + 0x40); uVar6 = *(int *)((char *)this + 0x44) - iVar4 >> 3; @@ -427,7 +427,7 @@ LAB_008fdc8f: droppedPlayer = PlayerManager::get_player_by_user_id ((PlayerManager *)&manager->_netplayManager, - (ulonglong *)(iVar4 + (int)local_2c * 8)); + (ulonglong *)(iVar4 + GHIDRA_INT(local_2c) * 8)); if (droppedPlayer != (Entity_Player *)0x0) { local_30 = &droppedPlayer->_size; fVar1 = (droppedPlayer->_sizeMulti).x; @@ -451,10 +451,10 @@ LAB_008fdc8f: iVar4 = *(int *)(*piVar9 + 0x374); if (iVar4 == 0) { local_60 = 0; - local_60._4_4_ = (NetplayManager)0x0; - local_60._0_4_ = (NetplayManager)0x0; - NVar5 = local_60._4_4_; - NVar10 = local_60._0_4_; + (*(undefined4 *)((char *)&(local_60) + 0x4)) = (NetplayManager)0x0; + (*(undefined4 *)((char *)&(local_60) + 0x0)) = (NetplayManager)0x0; + NVar5 = (*(undefined4 *)((char *)&(local_60) + 0x4)); + NVar10 = (*(undefined4 *)((char *)&(local_60) + 0x0)); } else { NVar5 = *(NetplayManager *)(iVar4 + 0xc); @@ -464,7 +464,7 @@ LAB_008fdc8f: FUN_00913a10(); break; } - piVar13 = (int *)((int)piVar13 + 1); + piVar13 = (int *)(GHIDRA_INT(piVar13) + 1); piVar9 = piVar9 + 6; } while (piVar13 < local_48); } @@ -472,10 +472,10 @@ LAB_008fdc8f: manager = g_manager; } iVar4 = *(int *)((char *)this + 0x40); - local_2c = (int *)((int)local_2c - 1); - } while (local_2c < (uint)(*(int *)((char *)this + 0x44) - iVar4 >> 3)); + local_2c = (int *)(GHIDRA_INT(local_2c) - 1); + } while (local_2c < GHIDRA_UINT((*(int *)((char *)this + 0x44) - iVar4 >> 3))); } - if ((*(int *)(g_manager + 1) - (int)g_manager->_netplayManager & 0xfffffffcU) == 4) { + if ((*(int *)(g_manager + 1) - GHIDRA_INT(g_manager->_netplayManager) & 0xfffffffcU) == 4) { KAGE_LogMessage(1,(byte *)"[Frame: %d] Desync Handler creating new lobby\n"); FUN_00907830(); } @@ -600,7 +600,7 @@ LAB_008ff0a5: local_28 = *(ulonglong **)((char *)messageData + 4); local_30 = *(PlayerManager **)(desyncHandler + 0x2c); piVar5 = *(int **)(desyncHandler + 0x28); - local_24 = (int)local_30 - (int)piVar5 >> 3; + local_24 = GHIDRA_INT(local_30) - GHIDRA_INT(piVar5) >> 3; if (local_24 != 0) { do { if (((void *)*piVar5 == *(void **)messageData) && ((ulonglong *)piVar5[1] == local_28)) { @@ -683,14 +683,14 @@ void NetDesyncHandler::write_desync_diff() local_14 = 0xffffffff; puStack_18 = &LAB_00b0815b; local_1c = ExceptionList; - uVar4 = __security_cookie ^ (uint)(line + 0x218); + uVar4 = __security_cookie ^ GHIDRA_UINT((line + 0x218)); ExceptionList = &local_1c; bVar3 = false; uVar9 = 0; NVar8 = g_manager->_netplayManager; local_24 = uVar4; pbVar2 = line + 0x224; - if (*(int *)(g_manager + 1) - (int)NVar8 >> 2 != 0) { + if (*(int *)(g_manager + 1) - GHIDRA_INT(NVar8) >> 2 != 0) { do { iVar7 = *(int *)((char *)NVar8 + uVar9 * 4); if (*(int *)(iVar7 + 0x3bc) == 0) { @@ -702,7 +702,7 @@ void NetDesyncHandler::write_desync_diff() bVar3 = true; } uVar9 = uVar9 + 1; - } while (uVar9 < (uint)(*(int *)(manager + 1) - (int)NVar8 >> 2)); + } while (uVar9 < GHIDRA_UINT((*(int *)(manager + 1) - GHIDRA_INT(NVar8) >> 2))); pbVar2 = puStack_20; if (bVar3) { ExceptionList = local_1c; @@ -720,11 +720,11 @@ void NetDesyncHandler::write_desync_diff() local_14 = 0xffffffff; if (0xf < local_240._capacity) { uVar4 = local_240._capacity + 1; - ptr = (void *)local_240._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((void *)local_240._buf) + 0x0)); if (0xfff < uVar4) { - ptr = *(void **)(local_240._buf._0_4_ + -4); + ptr = *(void **)((*(undefined4 *)((char *)&(local_240._buf) + 0x0)) + -4); uVar4 = local_240._capacity + 0x24; - if (0x1f < (uint)(local_240._buf._0_4_ + (-4 - (int)ptr))) goto LAB_008ffe40; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_240._buf) + 0x0)) + (-4 - GHIDRA_INT(ptr))))) goto LAB_008ffe40; } operator_delete(ptr,uVar4); } @@ -741,7 +741,7 @@ void NetDesyncHandler::write_desync_diff() if (0xfff < uVar4) { psVar5 = (std_string *)path[0][-1]._capacity; uVar4 = pathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)path[0] + (-4 - (int)psVar5))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(path[0]) + (-4 - GHIDRA_INT(psVar5)))) { LAB_008ffe40: local_14 = 0xffffffff; /* WARNING: Subroutine does not return */ @@ -752,7 +752,7 @@ LAB_008ffe40: } pathSize = 0; pathCapacity = 0xf; - path[0] = (std_string *)((uint)path[0] & 0xffffff00); + path[0] = (std_string *)(GHIDRA_UINT(path[0]) & 0xffffff00); if (file == (int *)0x0) { ExceptionList = local_1c; return; @@ -766,7 +766,7 @@ LAB_008ffe40: KAGE_LogMessage(8,line); uVar4 = 0; NVar8 = manager->_netplayManager; - if (*(int *)(manager + 1) - (int)NVar8 >> 2 != 0) { + if (*(int *)(manager + 1) - GHIDRA_INT(NVar8) >> 2 != 0) { do { (**(code **)(*(int *)(*(int *)((char *)NVar8 + uVar4 * 4) + 0x370) + 4))(); iVar6 = sprintf_s(line,0x200,(byte *)" - Player %d: Username = %s, ID = %llu \r\n"); @@ -774,7 +774,7 @@ LAB_008ffe40: KAGE_LogMessage(8,line); uVar4 = uVar4 + 1; NVar8 = manager->_netplayManager; - } while (uVar4 < (uint)(*(int *)(manager + 1) - (int)NVar8 >> 2)); + } while (uVar4 < GHIDRA_UINT((*(int *)(manager + 1) - GHIDRA_INT(NVar8) >> 2))); } iVar6 = sprintf_s(line,0x200, (byte *) @@ -784,7 +784,7 @@ LAB_008ffe40: KAGE_LogMessage(8,line); uVar4 = 0; maxEntityCount = (*(int *)(iVar7 + 8) - *(int *)(iVar7 + 4)) / 0x38; - if (*(int *)(manager + 1) - (int)manager->_netplayManager >> 2 != 0) { + if (*(int *)(manager + 1) - GHIDRA_INT(manager->_netplayManager) >> 2 != 0) { do { iVar7 = *(int *)(*(int *)((char *)manager->_netplayManager + uVar4 * 4) + 0x3bc); iVar6 = sprintf(line,(byte *)" - Player%d: Checksum (%08x), Global RNG checksum (%08x) \r\n"); @@ -795,7 +795,7 @@ LAB_008ffe40: maxEntityCount = uVar9; } uVar4 = uVar4 + 1; - } while (uVar4 < (uint)(*(int *)(manager + 1) - (int)manager->_netplayManager >> 2)); + } while (uVar4 < GHIDRA_UINT((*(int *)(manager + 1) - GHIDRA_INT(manager->_netplayManager) >> 2))); } iVar7 = sprintf_s(line,0x200, (byte *) @@ -811,7 +811,7 @@ LAB_008ffe40: iVar7 = *(int *)(manager + 1); NVar8 = manager->_netplayManager; uVar9 = 0; - uVar4 = iVar7 - (int)NVar8 >> 2; + uVar4 = iVar7 - GHIDRA_INT(NVar8) >> 2; local_240._buf[8] = 0; local_240._buf[9] = 0; local_240._buf[10] = 0; @@ -826,7 +826,7 @@ LAB_008ffe40: do { iVar6 = *(int *)(*(int *)((char *)NVar8 + uVar9 * 4) + 0x3bc); iVar1 = *(int *)(iVar6 + 4); - if (entityIndex < (uint)((*(int *)(iVar6 + 8) - iVar1) / 0x38)) { + if (entityIndex < GHIDRA_UINT(((*(int *)(iVar6 + 8) - iVar1) / 0x38))) { *(int *)(local_240._buf + uVar9 * 4 + 8) = entityOffset + iVar1; } uVar9 = uVar9 + 1; @@ -843,7 +843,7 @@ LAB_008ffe40: isSeedMismatch = false; isGlobalSeedMismatch = false; do { - if (otherPlayerStart < (uint)(iVar7 - (int)NVar8 >> 2)) { + if (otherPlayerStart < GHIDRA_UINT((iVar7 - GHIDRA_INT(NVar8) >> 2))) { state = *(int **)stateIt; uVar9 = otherPlayerStart; do { @@ -888,7 +888,7 @@ LAB_008ffe40: NVar8 = manager->_netplayManager; } stateIt = stateIt + 4; - isGlobalSeedMismatch = otherPlayerStart < (uint)(iVar7 - (int)NVar8 >> 2); + isGlobalSeedMismatch = otherPlayerStart < GHIDRA_UINT((iVar7 - GHIDRA_INT(NVar8) >> 2)); otherPlayerStart = otherPlayerStart + 1; } while (isGlobalSeedMismatch); if (((((bVar3) || (isTypeMismatch)) || (isPrePositionMismatch)) || @@ -899,7 +899,7 @@ LAB_008ffe40: (**(code **)(*file + 0x1c))(line,1,iVar7); KAGE_LogMessage(8,line); uVar4 = 0; - if (*(int *)(manager + 1) - (int)manager->_netplayManager >> 2 != 0) { + if (*(int *)(manager + 1) - GHIDRA_INT(manager->_netplayManager) >> 2 != 0) { do { iVar7 = sprintf_s(line,0x200,(byte *)" - Player %d: "); (**(code **)(*file + 0x1c))(line,1,iVar7); @@ -953,7 +953,7 @@ LAB_008ffe40: (**(code **)(*file + 0x1c))(); KAGE_LogMessage(8,line); uVar4 = uVar4 + 1; - } while (uVar4 < (uint)(*(int *)(manager + 1) - (int)manager->_netplayManager >> 2)); + } while (uVar4 < GHIDRA_UINT((*(int *)(manager + 1) - GHIDRA_INT(manager->_netplayManager) >> 2))); } } } @@ -1000,7 +1000,7 @@ void NetDesyncHandler::save_desync_files() puStack_20 = (undefined1 *)(tmpPath + 0xe); puStack_18 = &LAB_00b084f5; local_1c = ExceptionList; - uVar2 = __security_cookie ^ (uint)(tmpPath + 0xb); + uVar2 = __security_cookie ^ GHIDRA_UINT((tmpPath + 0xb)); ExceptionList = &local_1c; builtin_strncpy(logName._buf,"desync_log.txt",0xf); logName._capacity = 0xf; @@ -1008,7 +1008,7 @@ void NetDesyncHandler::save_desync_files() local_14 = (char *)0x0; local_24 = uVar2; logPath = online_log_make_path((std_string *)tmpPath,&logName,1); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (0xf < logPath->_capacity) { logPath = *(std_string **)logPath->_buf; } @@ -1017,28 +1017,28 @@ void NetDesyncHandler::save_desync_files() uVar3 = (**(code **)(*(int *)g_logFile + 0x38))(logPath); FUN_00a25130(uVar3,logPath); } - local_14 = (char *)((uint)local_14._1_3_ << 8); + local_14 = (char *)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8); if (0xf < tmpPathCapacity) { uVar2 = tmpPathCapacity + 1; pcVar6 = tmpPath[0]; if (0xfff < uVar2) { pcVar6 = *(char **)(tmpPath[0] + -4); uVar2 = tmpPathCapacity + 0x24; - if ((char *)0x1f < tmpPath[0] + (-4 - (int)pcVar6)) goto LAB_00903402; + if ((char *)0x1f < tmpPath[0] + (-4 - GHIDRA_INT(pcVar6))) goto LAB_00903402; } operator_delete(pcVar6,uVar2); } local_14 = (char *)0xffffffff; tmpPathSize = 0; tmpPathCapacity = 0xf; - tmpPath[0] = (char *)((uint)tmpPath[0] & 0xffffff00); + tmpPath[0] = (char *)(GHIDRA_UINT(tmpPath[0]) & 0xffffff00); if (0xf < logName._capacity) { uVar2 = logName._capacity + 1; - ptr = (void *)logName._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((void *)logName._buf) + 0x0)); if (0xfff < uVar2) { - ptr = *(void **)(logName._buf._0_4_ + -4); + ptr = *(void **)((*(undefined4 *)((char *)&(logName._buf) + 0x0)) + -4); uVar2 = logName._capacity + 0x24; - if (0x1f < (uint)(logName._buf._0_4_ + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(logName._buf) + 0x0)) + (-4 - GHIDRA_INT(ptr))))) { LAB_00903402: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1063,33 +1063,33 @@ LAB_00903402: builtin_strncpy(sharedSaveName[0],"desync_shared_save.dat",0x17); local_14 = (char *)0x2; logPath = online_log_make_path((std_string *)tmpPath,(std_string *)sharedSaveName,1); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; if (0xf < logPath->_capacity) { logPath = *(std_string **)logPath->_buf; } saveFile = ((SaveDataManager *)(&PTR_vftable_00c5aa80))->SaveDataManager::open_file_write((byte *)logPath,0); - local_14 = (char *)CONCAT31(local_14._1_3_,2); + local_14 = (char *)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); if (0xf < tmpPathCapacity) { uVar2 = tmpPathCapacity + 1; pcVar6 = tmpPath[0]; if (0xfff < uVar2) { pcVar6 = *(char **)(tmpPath[0] + -4); uVar2 = tmpPathCapacity + 0x24; - if ((char *)0x1f < tmpPath[0] + (-4 - (int)pcVar6)) goto LAB_00903558; + if ((char *)0x1f < tmpPath[0] + (-4 - GHIDRA_INT(pcVar6))) goto LAB_00903558; } operator_delete(pcVar6,uVar2); } local_14 = (char *)0xffffffff; tmpPathSize = 0; tmpPathCapacity = 0xf; - tmpPath[0] = (char *)((uint)tmpPath[0] & 0xffffff00); + tmpPath[0] = (char *)(GHIDRA_UINT(tmpPath[0]) & 0xffffff00); if (0xf < sharedSaveNameCapacity) { uVar2 = sharedSaveNameCapacity + 1; pcVar6 = sharedSaveName[0]; if (0xfff < uVar2) { pcVar6 = *(char **)(sharedSaveName[0] + -4); uVar2 = sharedSaveNameCapacity + 0x24; - if ((char *)0x1f < sharedSaveName[0] + (-4 - (int)pcVar6)) { + if ((char *)0x1f < sharedSaveName[0] + (-4 - GHIDRA_INT(pcVar6))) { LAB_00903558: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1110,30 +1110,30 @@ LAB_00903558: builtin_strncpy(tmpPath[0],"desync_screenshot",0x12); local_14 = (char *)0x4; online_log_make_path((std_string *)sharedSaveName,(std_string *)tmpPath,0); - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; save_screenshot(); - local_14 = (char *)CONCAT31(local_14._1_3_,4); + local_14 = (char *)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),4); if (0xf < sharedSaveNameCapacity) { uVar2 = sharedSaveNameCapacity + 1; pcVar6 = sharedSaveName[0]; if (0xfff < uVar2) { pcVar6 = *(char **)(sharedSaveName[0] + -4); uVar2 = sharedSaveNameCapacity + 0x24; - if ((char *)0x1f < sharedSaveName[0] + (-4 - (int)pcVar6)) goto LAB_0090365d; + if ((char *)0x1f < sharedSaveName[0] + (-4 - GHIDRA_INT(pcVar6))) goto LAB_0090365d; } operator_delete(pcVar6,uVar2); } local_14 = (char *)0xffffffff; sharedSaveNameSize = 0; sharedSaveNameCapacity = 0xf; - sharedSaveName[0] = (char *)((uint)sharedSaveName[0] & 0xffffff00); + sharedSaveName[0] = (char *)(GHIDRA_UINT(sharedSaveName[0]) & 0xffffff00); if (0xf < tmpPathCapacity) { uVar2 = tmpPathCapacity + 1; pcVar6 = tmpPath[0]; if (0xfff < uVar2) { pcVar6 = *(char **)(tmpPath[0] + -4); uVar2 = tmpPathCapacity + 0x24; - if ((char *)0x1f < tmpPath[0] + (-4 - (int)pcVar6)) { + if ((char *)0x1f < tmpPath[0] + (-4 - GHIDRA_INT(pcVar6))) { LAB_0090365d: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); diff --git a/src/game/net_input_device.cpp b/src/game/net_input_device.cpp index b54e282..fce6876 100644 --- a/src/game/net_input_device.cpp +++ b/src/game/net_input_device.cpp @@ -16,14 +16,14 @@ NetInputDevice::NetInputDevice(void *userProfile) puStack_c = &LAB_00b082e1; local_10 = ExceptionList; ExceptionList = &local_10; - FUN_00a1e050(__security_cookie ^ (int)register0x00000010 - 4U); + FUN_00a1e050(__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); *(undefined ***)historyMap = IsaacRepentancePlus::NetInputDevice::vftable; *(undefined ***)((char *)historyMap + 0x370) = KAGE::System::UserProfileBase::vftable; *(undefined4 *)((char *)historyMap + 0x374) = *(undefined4 *)((char *)userProfile + 4); *(undefined ***)((char *)historyMap + 0x370) = KAGE::System::UserProfile::vftable; local_8 = 1; - KAGE::SmartPointer::SmartPointer((int)historyMap + 0x378); - local_8._0_1_ = 2; + KAGE::SmartPointer::SmartPointer(GHIDRA_INT(historyMap) + 0x378); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; *(undefined4 *)((char *)historyMap + 0x394) = 0; *(undefined4 *)((char *)historyMap + 0x390) = 0; *(undefined4 *)((char *)historyMap + 0x39c) = 0; @@ -37,8 +37,8 @@ NetInputDevice::NetInputDevice(void *userProfile) *(undefined2 *)((char *)pvVar1 + 0xc) = 0x101; *(undefined4 *)((char *)historyMap + 0x3a0) = pvVar1; *(undefined4 *)((char *)historyMap + 0x3a8) = 0xffff; - historyMap = (undefined4 *)((int)historyMap + 0x3ac); - local_8._0_1_ = 3; + historyMap = (undefined4 *)(GHIDRA_INT(historyMap) + 0x3ac); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; *historyMap = 0; *(undefined4 *)((char *)historyMap + 0x3b0) = 0; pvVar1 = operator_new(0x24); @@ -48,7 +48,7 @@ NetInputDevice::NetInputDevice(void *userProfile) *(undefined2 *)((char *)pvVar1 + 0xc) = 0x101; *historyMap = pvVar1; *(undefined4 *)((char *)historyMap + 0x3b4) = 0xffff; - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; *(undefined4 *)((char *)historyMap + 0x3bc) = 0; *(undefined4 *)((char *)historyMap + 0x3c0) = 0; *(undefined4 *)((char *)historyMap + 0x3c8) = 0; @@ -61,8 +61,8 @@ NetInputDevice::NetInputDevice(void *userProfile) *(undefined4 *)((char *)historyMap + 0x3d8) = 0; *(undefined4 *)((char *)historyMap + 0x3dc) = 0; *(undefined4 *)((char *)historyMap + 0x3e0) = 0; - local_8 = CONCAT31(local_8._1_3_,6); - containerProxySlot = (undefined4 *)((int)historyMap + 0x3e4); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),6); + containerProxySlot = (undefined4 *)(GHIDRA_INT(historyMap) + 0x3e4); *containerProxySlot = 0; *(undefined4 *)((char *)historyMap + 1000) = 0; *(undefined4 *)((char *)historyMap + 0x3ec) = 0; @@ -123,17 +123,17 @@ undefined1 NetInputDevice::is_input_ready(undefined1 param_1, int *param_2) goto LAB_00901fc3; } cVar2 = (**(code **)(*(int *)(in_ECX + 0x370) + 0x14)) - (__security_cookie ^ (uint)(local_20 + 0x1c)); + (__security_cookie ^ GHIDRA_UINT((local_20 + 0x1c))); if (cVar2 == '\0') { piVar3 = (int *)FUN_00a29fd0(local_20,in_ECX + 0x370); iVar4 = *piVar3; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; if (((connectionRefCount != (int *)0x0) && (cVar2 = (**(code **)(*connectionRefCount + 0xc))(), cVar2 != '\0')) && (g_connectionReleaseFn != (void *)0x0)) { (*g_connectionReleaseFn)(local_20); } - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; if (iVar4 != 0) { piVar3 = (int *)(in_ECX + 0x3c8); local_18 = FUN_00a58670(); @@ -142,16 +142,16 @@ undefined1 NetInputDevice::is_input_ready(undefined1 param_1, int *param_2) /* WARNING: Subroutine does not return */ std::_Xlength_error("list too long"); } - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; local_24 = 0; local_28 = piVar3; node = operator_new(0x10); *(undefined8 *)(node + 2) = local_18; - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; *(int *)(in_ECX + 0x3cc) = *(int *)(in_ECX + 0x3cc) + 1; tail = *(undefined4 **)(iVar4 + 4); *node = iVar4; - node[1] = (int)tail; + node[1] = GHIDRA_INT(tail); *(int **)(iVar4 + 4) = node; *tail = node; uVar5 = *(uint *)(in_ECX + 0x3cc); @@ -175,43 +175,43 @@ LAB_00901f19: pMVar6 = g_manager; } else { - local_18._4_4_ = *(undefined4 *)(in_ECX + 0x3a0); + (*(undefined4 *)((char *)&(local_18) + 0x4)) = *(undefined4 *)(in_ECX + 0x3a0); uVar8 = FUN_009012b0(); uVar5 = *(int *)uVar8 + 1; pMVar6 = (Manager *)((ulonglong)uVar8 >> 0x20); } - local_18 = CONCAT44(local_18._4_4_,(undefined4)local_18); - if (uVar5 <= (uint)(pMVar6[1]._previousState + pMVar6[1]._state)) { - local_18 = CONCAT44(local_18._4_4_,(undefined4)local_18); + local_18 = CONCAT44((*(undefined4 *)((char *)&(local_18) + 0x4)),(undefined4)local_18); + if (uVar5 <= GHIDRA_UINT((pMVar6[1]._previousState + pMVar6[1]._state))) { + local_18 = CONCAT44((*(undefined4 *)((char *)&(local_18) + 0x4)),(undefined4)local_18); if (g_game != (Game *)0x0) { iVar7 = *(int *)(in_ECX + 0x378); - local_18._4_4_ = 0x3c; + (*(undefined4 *)((char *)&(local_18) + 0x4)) = 0x3c; if (iVar7 != 0) { iVar1 = *(int *)&(*(undefined1 *)((char *)&(pMVar6[1]._gamestate) + 0x92c)); if (iVar1 == 0x3c) { if ((*(int *)&(*(undefined1 *)((char *)&(pMVar6[1]._gamestate) + 0x290)) != 0) || (0 < *(int *)&(*(undefined1 *)((char *)&(pMVar6[1]._gamestate) + 0x2d8)))) { - local_18._4_4_ = 0x15; + (*(undefined4 *)((char *)&(local_18) + 0x4)) = 0x15; } } else { *(undefined4 *)&(*(undefined1 *)((char *)&(pMVar6[1]._gamestate) + 0x92c)) = 0x3c; iVar4 = *(int *)(in_ECX + 0x3a4); iVar7 = *(int *)(in_ECX + 0x378); - local_18._4_4_ = iVar1; + (*(undefined4 *)((char *)&(local_18) + 0x4)) = iVar1; } } if (iVar4 == 0) { frame = pMVar6[1]._state; } else { - local_18._0_4_ = *(undefined4 *)(in_ECX + 0x3a0); + (*(undefined4 *)((char *)&(local_18) + 0x0)) = *(undefined4 *)(in_ECX + 0x3a0); piVar3 = (int *)FUN_009012b0(); frame = *piVar3 + 1; } local_2c = 0x7fff0000; local_28 = (int *)0x7fff7fff; - local_24 = (uint)CONCAT12((char)local_18._4_4_,0x7fff); + local_24 = GHIDRA_UINT(CONCAT12((*(undefined4 *)((char *)&((char)local_18) + 0x4)),0x7fff)); if (iVar7 != 0) { deviceRefCount = (void *)0x901dfa; player = (Entity_Player *)FUN_004253d0(); @@ -239,12 +239,12 @@ LAB_00901f19: pMVar6 = g_manager; } else { - local_18._0_4_ = *(undefined4 *)(in_ECX + 0x3a0); + (*(undefined4 *)((char *)&(local_18) + 0x0)) = *(undefined4 *)(in_ECX + 0x3a0); uVar8 = FUN_009012b0(); uVar5 = *(int *)uVar8 + 1; pMVar6 = (Manager *)((ulonglong)uVar8 >> 0x20); } - if ((uint)(pMVar6[1]._state + iVar4) < uVar5) { + if (GHIDRA_UINT((pMVar6[1]._state + iVar4)) < uVar5) { iVar4 = FUN_00901190(pMVar6[1]._state); if (((iVar4 != 0) && (((*(ushort *)(iVar4 + 4) & 0x4000) == 0 || (*(int *)(in_ECX + 0x3f4) != 0)))) && @@ -304,7 +304,7 @@ byte NetInputDevice::ProcessInputMessage(void *message, void *messageRefCount) puStack_c = &LAB_00b083f5; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; local_8 = 0; if (*(char *)(*(int *)(**(int **)((char *)message + 8) + 0x14) + 5) != '\x01') { @@ -328,7 +328,7 @@ byte NetInputDevice::ProcessInputMessage(void *message, void *messageRefCount) streamBufEnd = (void *)0x0; stream = KAGE::Filesys::BufferedStream::vftable; streamVtable = KAGE::Filesys::BufferedStream::vftable; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); local_30 = 1; checksum = 0; local_38 = 0; @@ -382,7 +382,7 @@ byte NetInputDevice::ProcessInputMessage(void *message, void *messageRefCount) else { (*(code *)streamVtable[5])(&readValue); } - local_28 = CONCAT22(local_28._2_2_,(undefined2)readValue); + local_28 = CONCAT22((*(undefined2 *)((char *)&(local_28) + 0x2)),(undefined2)readValue); readValue = 0; if ((code *)streamVtable[5] == memory_stream_read) { ((KAGE::Filesys::BufferedStream *)(&stream))->KAGE::Filesys::BufferedStream::read(&readValue,2,1); @@ -398,7 +398,7 @@ byte NetInputDevice::ProcessInputMessage(void *message, void *messageRefCount) else { (*(code *)streamVtable[5])(&readValue); } - local_24 = CONCAT22(local_24._2_2_,(undefined2)readValue); + local_24 = CONCAT22((*(undefined2 *)((char *)&(local_24) + 0x2)),(undefined2)readValue); readValue = 0; if ((code *)streamVtable[5] == memory_stream_read) { ((KAGE::Filesys::BufferedStream *)(&stream))->KAGE::Filesys::BufferedStream::read(&readValue,2,1); @@ -414,7 +414,7 @@ byte NetInputDevice::ProcessInputMessage(void *message, void *messageRefCount) else { (*(code *)streamVtable[5])(&readValue); } - local_20 = CONCAT22(local_20._2_2_,(undefined2)readValue); + local_20 = CONCAT22((*(undefined2 *)((char *)&(local_20) + 0x2)),(undefined2)readValue); readByte = 0; if ((code *)streamVtable[5] == memory_stream_read) { ((KAGE::Filesys::BufferedStream *)(&stream))->KAGE::Filesys::BufferedStream::read(&readByte,1,1); @@ -422,7 +422,7 @@ byte NetInputDevice::ProcessInputMessage(void *message, void *messageRefCount) else { (*(code *)streamVtable[5])(&readByte); } - local_20._0_3_ = CONCAT12(readByte,(undefined2)local_20); + (*(undefined1 *)((char *)&(local_20) + 0x0)) = CONCAT12(readByte,(undefined2)local_20); readByte = 0; if ((code *)streamVtable[5] == memory_stream_read) { ((KAGE::Filesys::BufferedStream *)(&stream))->KAGE::Filesys::BufferedStream::read(&readByte,1,1); @@ -432,7 +432,7 @@ byte NetInputDevice::ProcessInputMessage(void *message, void *messageRefCount) } local_20 = CONCAT13(readByte,(undefined3)local_20); ((Checksum *)(&checksum))->Checksum::Update((byte *)&inputFrame,0x10); - if (uVar2 < (uint)g_manager[1]._state) { + if (uVar2 < GHIDRA_UINT(g_manager[1]._state)) { format = "NetInputDevice::ProcessInputMessage - Dropping input packet outside of match scope. Received Frame: %d, Current Frame: %d\n" ; @@ -444,7 +444,7 @@ LAB_0090244d: if (iVar4 == 0) { if ((local_30 == 0) && (local_38 != 0)) { if (local_38 < 4) { - memset((void *)((int)&checksum + (uint)local_38),0,(uint)(byte)(4 - local_38)); + memset((void *)(GHIDRA_INT(&checksum) + GHIDRA_UINT(local_38)),0,GHIDRA_UINT((byte)(4 - local_38))); } uVar2 = local_34 * -0x80000000 + (local_34 >> 1) + checksum; } @@ -478,12 +478,12 @@ LAB_00902459: local_48 = 0; local_44 = 0; if (streamBufBegin != (void *)0x0) { - uVar2 = streamBufCapacity - (int)streamBufBegin; + uVar2 = streamBufCapacity - GHIDRA_INT(streamBufBegin); pvVar3 = streamBufBegin; if (0xfff < uVar2) { pvVar3 = *(void **)((char *)streamBufBegin + -4); uVar2 = uVar2 + 0x23; - if (0x1f < (uint)((int)streamBufBegin + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(streamBufBegin) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -547,7 +547,7 @@ void NetInputDevice::broadcast_frame_input(undefined4 param_1) local_1c = ExceptionList; ExceptionList = &local_1c; cVar2 = (**(code **)(*(int *)(in_ECX + 0x370) + 0x14)) - (__security_cookie ^ (uint)(inputMessage + 0x28)); + (__security_cookie ^ GHIDRA_UINT((inputMessage + 0x28))); if (cVar2 == '\0') { KAGE_LogMessage(0x10,(byte *) "NetInputDevice::broadcast_frame_input should only be called on the local player" @@ -559,16 +559,16 @@ void NetInputDevice::broadcast_frame_input(undefined4 param_1) if (g_manager[1]._state - 1U <= **(uint **)(*(int *)&(*(undefined1 *)((char *)&(g_manager[1]._persistentGameData) + 0x14)) + (*(int *)&(*(undefined1 *)((char *)&(g_manager[1]._persistentGameData) + 0x18)) - 1U & - (uint)(local_2c + -1)) * 4)) { + GHIDRA_UINT((local_2c + -1))) * 4)) { checksumEntry = *(undefined8 **) (*(int *)&(*(undefined1 *)((char *)&(g_manager[1]._persistentGameData) + 0x14)) + - (*(int *)&(*(undefined1 *)((char *)&(g_manager[1]._persistentGameData) + 0x18)) - 1U & (uint)(local_2c + -1)) * 4) + (*(int *)&(*(undefined1 *)((char *)&(g_manager[1]._persistentGameData) + 0x18)) - 1U & GHIDRA_UINT((local_2c + -1))) * 4) ; uVar1 = *checksumEntry; checksumTail = *(undefined4 *)(checksumEntry + 1); - frameChecksum._4_4_ = (undefined4)((ulonglong)uVar1 >> 0x20); - checksumHigh = frameChecksum._4_4_; + (*(undefined4 *)((char *)&(frameChecksum) + 0x4)) = (undefined4)((ulonglong)uVar1 >> 0x20); + checksumHigh = (*(undefined4 *)((char *)&(frameChecksum) + 0x4)); frameChecksum = uVar1; goto LAB_00902a25; } @@ -597,15 +597,15 @@ LAB_00902a25: data = local_2c; local_2c = *(byte **)local_2c; (**(code **)(local_58 + 0x1c))(&local_2c,4,1); - local_2c = (byte *)(uint)*(ushort *)(data + 4); + local_2c = (byte *)GHIDRA_UINT(*(ushort *)(data + 4)); (**(code **)(local_58 + 0x1c))(&local_2c,2,1); - local_2c = (byte *)(uint)*(ushort *)(data + 6); + local_2c = (byte *)GHIDRA_UINT(*(ushort *)(data + 6)); (**(code **)(local_58 + 0x1c))(&local_2c,2,1); - local_2c = (byte *)(uint)*(ushort *)(data + 8); + local_2c = (byte *)GHIDRA_UINT(*(ushort *)(data + 8)); (**(code **)(local_58 + 0x1c))(&local_2c,2,1); - local_2c = (byte *)(uint)*(ushort *)(data + 10); + local_2c = (byte *)GHIDRA_UINT(*(ushort *)(data + 10)); (**(code **)(local_58 + 0x1c))(&local_2c,2,1); - local_2c = (byte *)(uint)*(ushort *)(data + 0xc); + local_2c = (byte *)GHIDRA_UINT(*(ushort *)(data + 0xc)); (**(code **)(local_58 + 0x1c))(&local_2c,2,1); tmpByte = data[0xe]; (**(code **)(local_58 + 0x1c))(&tmpByte,1,1); @@ -615,7 +615,7 @@ LAB_00902a25: this->Checksum::Update(data,0x10); if ((local_48 == 0) && (local_50 != 0)) { if (local_50 < 4) { - memset((void *)(extraout_ECX + (uint)local_50),0,(uint)(byte)(4 - local_50)); + memset((void *)(extraout_ECX + GHIDRA_UINT(local_50)),0,GHIDRA_UINT((byte)(4 - local_50))); } checksum = checksumAcc * -0x80000000 + (checksumAcc >> 1) + checksumState; } @@ -636,12 +636,12 @@ LAB_00902a25: "Attempting to create a message when there is no multiplayer service\n"); } messageRefCount = (void *)0x1; - NetConnection::send_message(g_multiplayerService,inputMessage,1,streamData,(uint)streamSize,1); + NetConnection::send_message(g_multiplayerService,inputMessage,1,streamData,GHIDRA_UINT(streamSize),1); manager = g_manager; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; FUN_008ef1d0(inputMessage); ((NetplayManager *)(&manager->_netplayManager))->NetplayManager::send_message(8,streamSize,messageRefCount); - local_14 = CONCAT31(local_14._1_3_,2); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); if (inputMessageRefCount != (int *)0x0) { cVar2 = (**(code **)(*inputMessageRefCount + 0xc))(); if ((cVar2 != '\0') && (g_multiplayerRelease != (void *)0x0)) { diff --git a/src/game/netplay_manager.cpp b/src/game/netplay_manager.cpp index 5d84b55..bdda4a6 100644 --- a/src/game/netplay_manager.cpp +++ b/src/game/netplay_manager.cpp @@ -64,7 +64,7 @@ byte NetplayManager::process_consolidated_messages() } local_14 = 2; if (((local_3c != (NetplayManager *)0x0) && - (isLastRef = (**(code **)((int)*local_3c + 0xc))(), isLastRef != '\0')) && + (isLastRef = (**(code **)(GHIDRA_INT(*local_3c) + 0xc))(), isLastRef != '\0')) && (g_multiplayerRelease != (void *)0x0)) { (*g_multiplayerRelease)(&local_40); } @@ -82,7 +82,7 @@ byte NetplayManager::process_consolidated_messages() uVar3 = local_38; piStack_34 = (int *)0x0; local_38 = 0; - userIdHigh = (uint)piStack_34; + userIdHigh = GHIDRA_UINT(piStack_34); userIdLow = local_38; local_38 = uVar3; } @@ -100,7 +100,7 @@ byte NetplayManager::process_consolidated_messages() ExceptionList = local_1c; return 1; } - entryCursor = (NetplayManager)((int)entryCursor + 4); + entryCursor = (NetplayManager)(GHIDRA_INT(entryCursor) + 4); } while (entryCursor != entriesEnd); } pNVar4 = self; @@ -109,7 +109,7 @@ byte NetplayManager::process_consolidated_messages() entryCursor = *this_00; FID_conflict__Erase_tree_>_> (this_00,(fuzzer_allocator_> *)this_00, - *(_Tree_node **)((int)entryCursor + 4)); + *(_Tree_node **)(GHIDRA_INT(entryCursor) + 4)); *(NetplayManager *)((char *)entryCursor + 4) = entryCursor; *(NetplayManager *)entryCursor = entryCursor; *(NetplayManager *)((char *)entryCursor + 8) = entryCursor; @@ -134,7 +134,7 @@ NetplayManager::~NetplayManager() local_8 = 0xffffffff; puStack_c = &LAB_00b08a50; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar3 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; FUN_00a1d6b0(netplay_lobby_join_requested_callback); NetplayTextPopup::clear(uVar3); @@ -145,7 +145,7 @@ NetplayManager::~NetplayManager() pNVar1 = this + 0x627; FID_conflict__Erase_tree_>_> (pNVar1,(fuzzer_allocator_> *)pNVar1, - *(_Tree_node **)((int)this[0x627] + 4)); + *(_Tree_node **)(GHIDRA_INT(this[0x627]) + 4)); operator_delete((void *)*pNVar1,0x20); this[0x624] = (NetplayManager)KAGE::Network::Multiplayer::ConstLobby::vftable; local_8 = 0; @@ -158,14 +158,14 @@ NetplayManager::~NetplayManager() FUN_004b3950(); std::vector<32byte>::_Tidy(); std::vector<24byte>::_Tidy(); - FUN_00914d90(this + 0x619,*(undefined4 *)((int)this[0x619] + 4)); + FUN_00914d90(this + 0x619,*(undefined4 *)(GHIDRA_INT(this[0x619]) + 4)); operator_delete((void *)this[0x619],0x30); FUN_00913df0(); OnlineChat::destructor(); pNVar1 = this + 0x489; FID_conflict__Erase_tree_>_> (pNVar1,(fuzzer_allocator_> *)pNVar1, - *(_Tree_node **)((int)this[0x489] + 4)); + *(_Tree_node **)(GHIDRA_INT(this[0x489]) + 4)); operator_delete((void *)*pNVar1,0x20); FUN_00900940(); std::vector::_Tidy(); @@ -175,7 +175,7 @@ NetplayManager::~NetplayManager() std::vector::_Tidy(); local_8 = 1; NetplayTextPopup::clear(); - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); ((ANM2 *)((ANM2 *)(this + 0x42d)))->ANM2::Reset(); ((AnimationState *)((AnimationState *)(this + 0x441)))->AnimationState::~AnimationState(); ((AnimationState *)((AnimationState *)(this + 0x439)))->AnimationState::~AnimationState(); @@ -185,9 +185,9 @@ NetplayManager::~NetplayManager() std::deque<4byte>::~deque(); std::deque<12byte>::~deque(); std::map::destroy_subtree - (this + 0x41c,*(undefined4 *)((int)this[0x41c] + 4)); + (this + 0x41c,*(undefined4 *)(GHIDRA_INT(this[0x41c]) + 4)); operator_delete((void *)this[0x41c],0xe8); - FUN_009156e0(this + 0x41a,*(undefined4 *)((int)this[0x41a] + 4)); + FUN_009156e0(this + 0x41a,*(undefined4 *)(GHIDRA_INT(this[0x41a]) + 4)); operator_delete((void *)this[0x41a],0xfa8); FUN_00a58200(); FUN_00a58200(); @@ -203,7 +203,7 @@ NetplayManager::~NetplayManager() pNVar1 = this + 0xf; FID_conflict__Erase_tree_>_> (pNVar1,(fuzzer_allocator_> *)pNVar1, - *(_Tree_node **)((int)this[0xf] + 4)); + *(_Tree_node **)(GHIDRA_INT(this[0xf]) + 4)); operator_delete((void *)*pNVar1,0x1c); std::deque<12byte>::_Tidy(); ptr = this[10]; @@ -251,7 +251,7 @@ void NetplayManager::Init() local_14 = 0xffffffff; puStack_18 = &LAB_00b08a9d; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(chatMessage + 0x7c); + local_24 = __security_cookie ^ GHIDRA_UINT((chatMessage + 0x7c)); ExceptionList = &local_1c; local_40._size = 0; local_40._capacity = 0xf; @@ -260,20 +260,20 @@ void NetplayManager::Init() local_40._buf[2] = '\0'; local_40._buf[3] = '\0'; self = this; - local_40._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_40._buf) + 0x0)) = std::_Allocate(0x20); local_40._size = 0x15; local_40._capacity = 0x1f; - builtin_strncpy((char *)local_40._buf._0_4_,"gfx/ui/ui_streak.anm2",0x16); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_40._buf) + 0x0)),"gfx/ui/ui_streak.anm2",0x16); local_14 = 0; ((ANM2 *)((ANM2 *)(this + 0x42d)))->ANM2::Load(&local_40,1); local_14 = 0xffffffff; if (0xf < local_40._capacity) { size = local_40._capacity + 1; - strBuf = (char *)local_40._buf._0_4_; + strBuf = (*(undefined4 *)((char *)&((char *)local_40._buf) + 0x0)); if (0xfff < size) { - strBuf = *(char **)(local_40._buf._0_4_ + -4); + strBuf = *(char **)((*(undefined4 *)((char *)&(local_40._buf) + 0x0)) + -4); size = local_40._capacity + 0x24; - if ((char *)0x1f < (char *)(local_40._buf._0_4_ + (-4 - (int)strBuf))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_40._buf) + 0x0)) + (-4 - GHIDRA_INT(strBuf)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -302,7 +302,7 @@ void NetplayManager::Init() strBuf = operator_new_tracked(10); strncpy(strBuf,"v1.9.7.17",10); jsonEntry[2] = strBuf; - jsonEntry[3] = (int)strBuf >> 0x1f; + jsonEntry[3] = GHIDRA_INT(strBuf) >> 0x1f; local_40._buf[8] = '\0'; local_40._buf[9] = '\0'; local_40._buf[10] = '\0'; @@ -321,7 +321,7 @@ void NetplayManager::Init() strBuf = operator_new_tracked(5); strncpy(strBuf,"J460",5); jsonEntry[2] = strBuf; - jsonEntry[3] = (int)strBuf >> 0x1f; + jsonEntry[3] = GHIDRA_INT(strBuf) >> 0x1f; local_40._buf[0] = '\0'; local_40._buf[1] = '\0'; local_40._buf[2] = '\0'; @@ -349,7 +349,7 @@ void NetplayManager::Init() strncpy(strBuf,"v1.9.7.17",10); jsonEntry[4] = 2; jsonEntry[2] = strBuf; - jsonEntry[3] = (int)strBuf >> 0x1f; + jsonEntry[3] = GHIDRA_INT(strBuf) >> 0x1f; local_40._buf[0] = '\0'; local_40._buf[1] = '\0'; local_40._buf[2] = '\0'; @@ -376,13 +376,13 @@ void NetplayManager::Init() strBuf = operator_new_tracked(5); strncpy(strBuf,"J460",5); pNVar1 = self; - local_40._capacity = (uint)g_userProfile; + local_40._capacity = GHIDRA_UINT(g_userProfile); jsonEntry[2] = strBuf; manager = g_manager; - jsonEntry[3] = (int)strBuf >> 0x1f; + jsonEntry[3] = GHIDRA_INT(strBuf) >> 0x1f; jsonEntry[4] = 2; chat = self + 0x48c; - local_40._size = (uint)KAGE::System::UserProfile::vftable; + local_40._size = GHIDRA_UINT(KAGE)::System::UserProfile::vftable; self[0x602] = (NetplayManager)&manager->_font2_TeamMeatEx12; local_14 = 1; if ((void *)local_40._capacity == (void *)0x0) { @@ -399,12 +399,12 @@ void NetplayManager::Init() local_54 = (undefined1 *)*(undefined4 *)(local_40._capacity + 0xc); } local_44 = (NetplayManager)(self + 0x48f); - if (0xf < (uint)self[0x494]) { + if (0xf < GHIDRA_UINT(self[0x494])) { local_44 = *(NetplayManager *)local_44; } _local_60 = CONCAT44(auStack_9a + -10,local_60); ((UserProfile *)(&local_58))->UserProfile::find_or_create(); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; ppuVar3 = KAGE::System::UserProfile::vftable; userRefCount = extraout_EAX; if (((extraout_EAX != (void *)0x0) && @@ -412,9 +412,9 @@ void NetplayManager::Init() (*(int *)((char *)extraout_EAX + 0x14) == 0)) { ((KAGE::System::UserProfile *)(auStack_9a + -10))->KAGE::System::UserProfile::load_steam_avatar(); } - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; ((OnlineChatMessage *)(chatMessage))->OnlineChatMessage::constructor(chat,(byte *)local_44,ppuVar3,userRefCount,1.0); - local_14 = CONCAT31(local_14._1_3_,3); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),3); pNVar1[0x495] = *extraout_EAX_00; pNVar1[0x497] = extraout_EAX_00[2]; ((FormattedText *)(pNVar1 + 0x498))->FormattedText::operator_assign(extraout_EAX_00 + 3); @@ -445,7 +445,7 @@ void NetplayManager::Init() local_14 = 0xffffffff; FUN_008370f0(); NVar2 = (NetplayManager)(pNVar1 + 0x71b); - if (0xf < (uint)pNVar1[0x720]) { + if (0xf < GHIDRA_UINT(pNVar1[0x720])) { NVar2 = pNVar1[0x71b]; } pNVar1[0x71f] = (NetplayManager)0x0; @@ -466,10 +466,10 @@ byte NetplayManager::is_user_in_player_list(ulonglong userId) playerSlot = *(Entity_Player ***)this; playerIndex = 0; - playerCount = (int)this[1] - (int)playerSlot >> 2; + playerCount = GHIDRA_INT(this[1]) - GHIDRA_INT(playerSlot) >> 2; if (playerCount != 0) { do { - profile = *(int *)((int)*playerSlot + 0x374); + profile = *(int *)(GHIDRA_INT(*playerSlot) + 0x374); if (profile == 0) { idHigh = 0; idLow = 0; @@ -482,7 +482,7 @@ byte NetplayManager::is_user_in_player_list(ulonglong userId) return 1; } playerIndex = playerIndex + 1; - playerSlot = (Entity_Player **)((int)playerSlot + 4); + playerSlot = (Entity_Player **)(GHIDRA_INT(playerSlot) + 4); } while (playerIndex < playerCount); } return 0; @@ -519,21 +519,21 @@ void NetplayManager::QueueRemovePlayer(float *param_1) if (((Vector *)(param_1 + 1))->x == 0.0) { local_20 = 0; } - (**(code **)((int)*param_1 + 4))(__security_cookie ^ (int)register0x00000010 - 4U); + (**(code **)(GHIDRA_INT(*param_1) + 4))(__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); KAGE_LogMessage(1,(byte *) "[Frame: %d] NetManager::QueueRemovePlayer() Queueing remove player \"%s\" %llu \n" ); fVar6 = ((Vector *)(param_1 + 1))->x; if (fVar6 == 0.0) { - local_20._4_4_ = (Entity_Player *)0x0; - local_20._0_4_ = 0; + (*(undefined4 *)((char *)&(local_20) + 0x4)) = (Entity_Player *)0x0; + (*(undefined4 *)((char *)&(local_20) + 0x0)) = 0; } else { - local_20._0_4_ = *(undefined4 *)((char *)fVar6 + 8); - local_20._4_4_ = *(Entity_Player **)((char *)fVar6 + 0xc); + (*(undefined4 *)((char *)&(local_20) + 0x0)) = *(undefined4 *)((char *)fVar6 + 8); + (*(undefined4 *)((char *)&(local_20) + 0x4)) = *(Entity_Player **)((char *)fVar6 + 0xc); } pEVar3 = ((PlayerManager *)(in_ECX))->PlayerManager::get_player_by_user_id(&local_20); - local_20._4_4_ = pEVar3; + (*(undefined4 *)((char *)&(local_20) + 0x4)) = pEVar3; if (pEVar3 != (Entity_Player *)0x0) { if ((char)in_ECX[0x15]._coopSlots[0]._state == '\0') { cVar1 = FUN_008feaa0(pEVar3); @@ -541,16 +541,16 @@ void NetplayManager::QueueRemovePlayer(float *param_1) if (fVar6 == 0.0) { uStack_28 = 0; } - (**(code **)((int)*param_1 + 4))(); + (**(code **)(GHIDRA_INT(*param_1) + 4))(); KAGE_LogMessage(1,(byte *) "[Frame: %d] NetManager::QueueRemovePlayer() Player \"%s\" %llu is already queued to by dropped by the Desync Handler (Removing player from Desync Handler) \n" ); - fVar6 = ((local_20._4_4_)->_sizeMulti).x; + fVar6 = (((*(undefined4 *)((char *)&(local_20) + 0x4)))->_sizeMulti).x; if (fVar6 == 0.0) { uStack_28 = 0; - uStack_28._4_4_ = 0; - uStack_28._0_4_ = 0; - uVar4 = uStack_28._4_4_; + (*(undefined4 *)((char *)&(uStack_28) + 0x4)) = 0; + (*(undefined4 *)((char *)&(uStack_28) + 0x0)) = 0; + uVar4 = (*(undefined4 *)((char *)&(uStack_28) + 0x4)); uVar5 = (undefined4)uStack_28; } else { @@ -562,9 +562,9 @@ void NetplayManager::QueueRemovePlayer(float *param_1) } if (fVar6 == 0.0) { uStack_28 = 0; - uStack_28._4_4_ = 0; - uStack_28._0_4_ = 0; - uVar4 = uStack_28._4_4_; + (*(undefined4 *)((char *)&(uStack_28) + 0x4)) = 0; + (*(undefined4 *)((char *)&(uStack_28) + 0x0)) = 0; + uVar4 = (*(undefined4 *)((char *)&(uStack_28) + 0x4)); uVar5 = (undefined4)uStack_28; } else { @@ -576,7 +576,7 @@ void NetplayManager::QueueRemovePlayer(float *param_1) if (fVar6 == 0.0) { uStack_28 = 0; } - (**(code **)((int)*param_1 + 4))(); + (**(code **)(GHIDRA_INT(*param_1) + 4))(); KAGE_LogMessage(1,(byte *) "[Frame: %d] NetManager::QueueRemovePlayer() Player \"%s\" %llu is already queued for removal (Ignoring queue request) \n" ); @@ -586,12 +586,12 @@ void NetplayManager::QueueRemovePlayer(float *param_1) if (fVar6 == 0.0) { uStack_28 = 0; } - (**(code **)((int)*param_1 + 4))(); + (**(code **)(GHIDRA_INT(*param_1) + 4))(); KAGE_LogMessage(1,(byte *) "[Frame: %d] NetManager::QueueRemovePlayer() Adding player \"%s\" %llu to pending removals\n" ); uStack_40 = 0; - pEStack_3c = local_20._4_4_; + pEStack_3c = (*(undefined4 *)((char *)&(local_20) + 0x4)); uStack_38 = 0; pvStack_34 = (void *)0x0; uStack_30 = 0; @@ -602,12 +602,12 @@ void NetplayManager::QueueRemovePlayer(float *param_1) ExceptionList = local_10; return; } - size = iStack_2c - (int)pvStack_34 & 0xfffffff8; + size = iStack_2c - GHIDRA_INT(pvStack_34) & 0xfffffff8; ptr = pvStack_34; if (0xfff < size) { ptr = *(void **)((char *)pvStack_34 + -4); size = size + 0x23; - if (0x1f < (uint)((int)pvStack_34 + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvStack_34) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -634,12 +634,12 @@ byte NetplayManager::is_player_removal_queued(ulonglong userId) undefined4 uStack_8; int profile; - iVar2 = (int)this[0x61c] - (int)this[0x61b]; + iVar2 = GHIDRA_INT(this[0x61c]) - GHIDRA_INT(this[0x61b]); profile = iVar2 >> 0x1f; iVar2 = iVar2 / 0x18 + profile; i = 0; if (iVar2 != profile) { - entryPlayer = (int *)((int)this[0x61b] + 4); + entryPlayer = (int *)(GHIDRA_INT(this[0x61b]) + 4); do { profile = *(int *)(*entryPlayer + 0x374); if (profile == 0) { @@ -655,7 +655,7 @@ byte NetplayManager::is_player_removal_queued(ulonglong userId) } i = i + 1; entryPlayer = entryPlayer + 6; - } while (i < (uint)(iVar2 - profile)); + } while (i < GHIDRA_UINT((iVar2 - profile))); } return 0; } @@ -716,7 +716,7 @@ void NetplayManager::RemoveRemotePlayer(void *userProfile) local_14 = 0xffffffff; puStack_18 = &LAB_00b08dd5; local_1c = ExceptionList; - uVar6 = __security_cookie ^ (uint)(dropMessage + 0xc); + uVar6 = __security_cookie ^ GHIDRA_UINT((dropMessage + 0xc)); ExceptionList = &local_1c; local_54 = (EntityPtr)userProfile; iVar8 = *(int *)((char *)userProfile + 4); @@ -781,14 +781,14 @@ void NetplayManager::RemoveRemotePlayer(void *userProfile) local_14 = 0xffffffff; } local_4c = 0.0; - if ((int)this[0x617] - (int)this[0x616] >> 4 != 0) { + if (GHIDRA_INT(this[0x617]) - GHIDRA_INT(this[0x616]) >> 4 != 0) { local_50 = 0; do { scratchVec = (Vector)FUN_00a23920(uVar6); FUN_00914480(&scratchVec); - local_4c = (float)((int)local_4c + 1); + local_4c = (float)(GHIDRA_INT(local_4c) + 1); local_50 = local_50 + 0x10; - } while ((uint)local_4c < (uint)((int)this[0x617] - (int)this[0x616] >> 4)); + } while (GHIDRA_UINT(local_4c) < GHIDRA_UINT((GHIDRA_INT(this[0x617]) - GHIDRA_INT(this[0x616]) >> 4))); userProfile = (void *)local_54; } iVar8 = *(int *)((char *)userProfile + 4); @@ -821,17 +821,17 @@ LAB_009093b4: local_4c = *(float *)(iVar8 + 8); local_50 = *(undefined4 *)(iVar8 + 0xc); } - pvVar12 = (void *)((int)pvVar14 + 0x14); + pvVar12 = (void *)(GHIDRA_INT(pvVar14) + 0x14); userId = FUN_00a23920(); if (userId != CONCAT44(local_50,local_4c)) goto LAB_009093f2; if (pvVar12 == pEStack_5c) { pEVar7 = pEStack_5c; } else { - puVar15 = (undefined1 *)((int)pvVar14 + 8); + puVar15 = (undefined1 *)(GHIDRA_INT(pvVar14) + 8); do { *(undefined4 *)(puVar15 + -4) = *(undefined4 *)(puVar15 + 0x10); - pvVar12 = (void *)((int)pvVar12 + 0x14); + pvVar12 = (void *)(GHIDRA_INT(pvVar12) + 0x14); *puVar15 = puVar15[0x14]; *(undefined4 *)(puVar15 + 4) = *(undefined4 *)(puVar15 + 0x18); *(undefined4 *)(puVar15 + 8) = *(undefined4 *)(puVar15 + 0x1c); @@ -842,7 +842,7 @@ LAB_009093b4: manager = g_manager; *(undefined ***)((char *)pEVar7 + -0x14) = KAGE::System::UserProfileBase::vftable; ppvVar1 = &(manager->_lobbyMembers)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + -0x14); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + -0x14); } LAB_00909444: iVar8 = *(int *)((char *)local_54 + 4); @@ -863,17 +863,17 @@ LAB_00909444: FUN_008feaf0(idLow,fVar11); NVar13 = this[1]; local_64 = *this; - fVar11 = (float)((int)NVar13 - (int)local_64 >> 2); + fVar11 = (float)(GHIDRA_INT(NVar13) - GHIDRA_INT(local_64) >> 2); local_4c = 0.0; scratchVec.y = fVar11; if (fVar11 == 0.0) { LAB_00909b6b: local_64 = (NetplayManager)0x0; VStack_7c.y = *(float *)this; - uVar6 = (int)NVar13 - (int)VStack_7c.y >> 2; + uVar6 = GHIDRA_INT(NVar13) - GHIDRA_INT(VStack_7c.y) >> 2; if (uVar6 != 0) { playerList = (g_game->_playerManager)._playerList._begin; - playerCount = (int)(g_game->_playerManager)._playerList._end - (int)playerList >> 2; + playerCount = GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT(playerList) >> 2; do { playerIndex = 0; if (playerCount != 0) { @@ -891,14 +891,14 @@ LAB_00909b6b: playerSlot = playerSlot + 1; } while (playerIndex < playerCount); } - local_64 = (NetplayManager)((int)local_64 + 1); - VStack_7c.y = (float)((int)VStack_7c.y + 4); - } while ((uint)local_64 < uVar6); + local_64 = (NetplayManager)(GHIDRA_INT(local_64) + 1); + VStack_7c.y = (float)(GHIDRA_INT(VStack_7c.y) + 4); + } while (GHIDRA_UINT(local_64) < uVar6); this = self; } if (*(int *)&g_game->_deathmatchManager < 2) { this[0x62d] = (NetplayManager)0x0; - this[0x62c] = (NetplayManager)((int)this[3] + 0x3c); + this[0x62c] = (NetplayManager)(GHIDRA_INT(this[3]) + 0x3c); } ExceptionList = local_1c; return; @@ -918,9 +918,9 @@ LAB_00909b6b: local_50 = iVar8; userId = FUN_00a23920(); if (userId == CONCAT44(VStack_7c.y,pEStack_5c)) break; - local_4c = (float)((int)local_4c + 1); - local_64 = (NetplayManager)((int)local_64 + 4); - if ((uint)scratchVec.y <= (uint)local_4c) goto LAB_00909b68; + local_4c = (float)(GHIDRA_INT(local_4c) + 1); + local_64 = (NetplayManager)(GHIDRA_INT(local_64) + 4); + if (GHIDRA_UINT(scratchVec.y) <= GHIDRA_UINT(local_4c)) goto LAB_00909b68; } if (iVar8 != 0) { pEVar7 = (Entity_Player *)FUN_004253d0(); @@ -938,7 +938,7 @@ LAB_00909b6b: spawnPos = Room::FindFreePickupSpawnPosition (g_game->_room,&VStack_7c,&scratchVec,0.0,0,0,0); ((Entity_Player *)(pEVar7))->Entity_Player::DropTrinket(spawnPos,bVar5); - local_64 = (NetplayManager)((int)local_64 + -1); + local_64 = (NetplayManager)(GHIDRA_INT(local_64) + -1); } while (local_64 != (NetplayManager)0x0); local_64 = (NetplayManager)0x0; pocketOwner = (Entity_Player *)FUN_004253d0(); @@ -951,11 +951,11 @@ LAB_00909b6b: scratchVec.y = *(float *)(iVar8 + 0x340); spawnPos = Room::FindFreePickupSpawnPosition(room,&VStack_7c,&scratchVec,0.0,0,0,0); NVar13 = local_64; - ((Entity_Player *)(pEVar7))->Entity_Player::DropPocketItem((int)local_64,spawnPos); - local_64 = (NetplayManager)((int)NVar13 + 1); + ((Entity_Player *)(pEVar7))->Entity_Player::DropPocketItem(GHIDRA_INT(local_64),spawnPos); + local_64 = (NetplayManager)(GHIDRA_INT(NVar13) + 1); pocketOwner = (Entity_Player *)FUN_004253d0(); NVar9 = (NetplayManager)((Entity_Player *)(pocketOwner))->Entity_Player::GetMaxPocketItems(); - } while ((uint)((int)NVar13 + 1) < (uint)NVar9); + } while (GHIDRA_UINT((GHIDRA_INT(NVar13) + 1)) < GHIDRA_UINT(NVar9)); } bVar5 = ((Entity_Player *)(pEVar7))->Entity_Player::HasCollectible(0x147,0); if (bVar5 != 0) { @@ -1012,23 +1012,23 @@ LAB_00909b6b: ((Game *)(g_game))->Game::Spawn(5,100,&scratchVec,&g_vectorZero,(Entity *)0x0,0x273,uVar6); } EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),(EntityList_EL *)auStack_70,6,0xb,-1, + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),(EntityList_EL *)auStack_70,6,0xb,-1, 0,0); NVar13 = (NetplayManager)0x0; local_14 = 2; if (local_64 != (NetplayManager)0x0) { do { - if (*(Entity_Player **)(*(int *)(auStack_70._4_4_ + (int)NVar13 * 4) + 0x3c8) == pEVar7) + if (*(Entity_Player **)(*(int *)((*(undefined4 *)((char *)&(auStack_70) + 0x4)) + GHIDRA_INT(NVar13) * 4) + 0x3c8) == pEVar7) { uVar6 = Random(); - iVar8 = *(int *)(auStack_70._4_4_ + (int)NVar13 * 4); + iVar8 = *(int *)((*(undefined4 *)((char *)&(auStack_70) + 0x4)) + GHIDRA_INT(NVar13) * 4); scratchVec.x = *(float *)(iVar8 + 0x33c); scratchVec.y = *(float *)(iVar8 + 0x340); ((Game *)(g_game))->Game::Spawn(1000,0xf,&scratchVec,&g_vectorZero,(Entity *)0x0,0,uVar6); - (**(code **)(**(int **)(auStack_70._4_4_ + (int)NVar13 * 4) + 0x28))(); + (**(code **)(**(int **)((*(undefined4 *)((char *)&(auStack_70) + 0x4)) + GHIDRA_INT(NVar13) * 4) + 0x28))(); } - NVar13 = (NetplayManager)((int)NVar13 + 1); - } while ((uint)NVar13 < (uint)local_64); + NVar13 = (NetplayManager)(GHIDRA_INT(NVar13) + 1); + } while (GHIDRA_UINT(NVar13) < GHIDRA_UINT(local_64)); } local_14 = 0xffffffff; if (auStack_70[0] == '\0') { @@ -1036,15 +1036,15 @@ LAB_00909b6b: allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } - if ((void *)auStack_70._4_4_ != (void *)0x0) { - uVar6 = *(uint *)(auStack_70._4_4_ + -4); + if ((*(undefined4 *)((char *)&((void *)auStack_70) + 0x4)) != (void *)0x0) { + uVar6 = *(uint *)((*(undefined4 *)((char *)&(auStack_70) + 0x4)) + -4); qVar2 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar6; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar6; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar2 < uVar6); - free((uint *)(auStack_70._4_4_ + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < uVar6)); + free((uint *)((*(undefined4 *)((char *)&(auStack_70) + 0x4)) + -4)); } } local_14 = 0xffffffff; @@ -1070,14 +1070,14 @@ LAB_00909b6b: ((Entity_Player *)(pEStack_5c))->Entity_Player::TriggerDeath(0); ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::RemoveCoPlayer(pEStack_5c,unusedBool); pvVar14 = g_game->_room; - ((EntityList_EL *)((EntityList_EL *)((int)pvVar14 + 0x1238)))->EntityList_EL::remove((Entity *)pEStack_5c); - ((EntityList_EL *)((EntityList_EL *)((int)pvVar14 + 0x1258)))->EntityList_EL::remove((Entity *)pEStack_5c); - ((EntityList_EL *)((EntityList_EL *)((int)pvVar14 + 0x1248)))->EntityList_EL::remove((Entity *)pEStack_5c); - ((EntityList_EL *)((EntityList_EL *)((int)pvVar14 + 0x1268)))->EntityList_EL::remove((Entity *)pEStack_5c); - ((EntityList_EL *)((EntityList_EL *)((int)pvVar14 + 0x12a8)))->EntityList_EL::remove((Entity *)pEStack_5c); + ((EntityList_EL *)((EntityList_EL *)(GHIDRA_INT(pvVar14) + 0x1238)))->EntityList_EL::remove((Entity *)pEStack_5c); + ((EntityList_EL *)((EntityList_EL *)(GHIDRA_INT(pvVar14) + 0x1258)))->EntityList_EL::remove((Entity *)pEStack_5c); + ((EntityList_EL *)((EntityList_EL *)(GHIDRA_INT(pvVar14) + 0x1248)))->EntityList_EL::remove((Entity *)pEStack_5c); + ((EntityList_EL *)((EntityList_EL *)(GHIDRA_INT(pvVar14) + 0x1268)))->EntityList_EL::remove((Entity *)pEStack_5c); + ((EntityList_EL *)((EntityList_EL *)(GHIDRA_INT(pvVar14) + 0x12a8)))->EntityList_EL::remove((Entity *)pEStack_5c); pEStack_5c->_valid = 0; EntityList::invalidate_type_cache - ((EntityList *)((int)pvVar14 + 0x1218),pEStack_5c->_type,pEStack_5c->_variant, + ((EntityList *)(GHIDRA_INT(pvVar14) + 0x1218),pEStack_5c->_type,pEStack_5c->_variant, pEStack_5c->_subtype); game = g_game; if (*(Entity_Player **)&(*(undefined1 *)((char *)&((g_game->_playerManager)) + 0x7c)) == pEStack_5c) { @@ -1085,14 +1085,14 @@ LAB_00909b6b: } if (local_54 != (EntityPtr)0x0) { pvVar14 = game->_room; - ((EntityList_EL *)((EntityList_EL *)((int)pvVar14 + 0x1238)))->EntityList_EL::remove((Entity *)local_54); - ((EntityList_EL *)((EntityList_EL *)((int)pvVar14 + 0x1258)))->EntityList_EL::remove((Entity *)local_54); - ((EntityList_EL *)((EntityList_EL *)((int)pvVar14 + 0x1248)))->EntityList_EL::remove((Entity *)local_54); - ((EntityList_EL *)((EntityList_EL *)((int)pvVar14 + 0x1268)))->EntityList_EL::remove((Entity *)local_54); - ((EntityList_EL *)((EntityList_EL *)((int)pvVar14 + 0x12a8)))->EntityList_EL::remove((Entity *)local_54); + ((EntityList_EL *)((EntityList_EL *)(GHIDRA_INT(pvVar14) + 0x1238)))->EntityList_EL::remove((Entity *)local_54); + ((EntityList_EL *)((EntityList_EL *)(GHIDRA_INT(pvVar14) + 0x1258)))->EntityList_EL::remove((Entity *)local_54); + ((EntityList_EL *)((EntityList_EL *)(GHIDRA_INT(pvVar14) + 0x1248)))->EntityList_EL::remove((Entity *)local_54); + ((EntityList_EL *)((EntityList_EL *)(GHIDRA_INT(pvVar14) + 0x1268)))->EntityList_EL::remove((Entity *)local_54); + ((EntityList_EL *)((EntityList_EL *)(GHIDRA_INT(pvVar14) + 0x12a8)))->EntityList_EL::remove((Entity *)local_54); *(undefined1 *)((char *)local_54 + 0x170) = 0; EntityList::invalidate_type_cache - ((EntityList *)((int)pvVar14 + 0x1218),*(int *)((char *)local_54 + 0x28), + ((EntityList *)(GHIDRA_INT(pvVar14) + 0x1218),*(int *)((char *)local_54 + 0x28), *(int *)((char *)local_54 + 0x2c),*(int *)((char *)local_54 + 0x30)); EVar3 = local_54; (**(code **)(*(int *)local_54 + 0x44))(); @@ -1104,10 +1104,10 @@ LAB_00909b6b: iVar8 = local_50; } KAGE_LogMessage(1,(byte *)"[Frame %d] Removing input device with ID %d \n"); - pvVar12 = (void *)((int)*this + (int)local_4c * 4); - pvVar14 = (void *)((int)pvVar12 + 4); - memmove(pvVar12,pvVar14,(int)this[1] - (int)pvVar14); - this[1] = (NetplayManager)((int)this[1] + -4); + pvVar12 = (void *)(GHIDRA_INT(*this) + GHIDRA_INT(local_4c) * 4); + pvVar14 = (void *)(GHIDRA_INT(pvVar12) + 4); + memmove(pvVar12,pvVar14,GHIDRA_INT(this[1]) - GHIDRA_INT(pvVar14)); + this[1] = (NetplayManager)(GHIDRA_INT(this[1]) + -4); FUN_00906020(iVar8); LAB_00909b68: NVar13 = this[1]; @@ -1140,14 +1140,14 @@ void * NetplayManager::get_drop_entry(ulonglong userId) local_10 = ExceptionList; NVar2 = this[0x616]; i = 0; - entryCount = (int)this[0x617] - (int)NVar2 >> 4; + entryCount = GHIDRA_INT(this[0x617]) - GHIDRA_INT(NVar2) >> 4; if (entryCount != 0) { do { - if ((*(int *)NVar2 == (int)userId) && (*(int *)((char *)NVar2 + 4) == userId._4_4_)) { + if ((*(int *)NVar2 == GHIDRA_INT(userId)) && (*(int *)((char *)NVar2 + 4) == (*(undefined4 *)((char *)&(userId) + 0x4)))) { return (void *)NVar2; } i = i + 1; - NVar2 = (NetplayManager)((int)NVar2 + 0x10); + NVar2 = (NetplayManager)(GHIDRA_INT(NVar2) + 0x10); } while (i < entryCount); } pendingMap = (void *)0x0; @@ -1179,16 +1179,16 @@ void * NetplayManager::get_drop_entry(ulonglong userId) *(void **)((char *)NVar2 + 8) = pendingMap; swapTmp = *(undefined4 *)((char *)NVar2 + 0xc); *(undefined4 *)((char *)NVar2 + 0xc) = pendingMapSize; - this[0x617] = (NetplayManager)((int)this[0x617] + 0x10); + this[0x617] = (NetplayManager)(GHIDRA_INT(this[0x617]) + 0x10); pendingMap = newMapHead; pendingMapSize = swapTmp; } FID_conflict__Erase_tree_>_> (&pendingMap,(fuzzer_allocator_> *)&pendingMap, - *(_Tree_node **)((int)pendingMap + 4)); + *(_Tree_node **)(GHIDRA_INT(pendingMap) + 4)); operator_delete(pendingMap,0x20); ExceptionList = local_10; - return (void *)((int)pNVar1[0x617] + -0x10); + return (void *)(GHIDRA_INT(pNVar1[0x617]) + -0x10); } // 0090a150 @@ -1222,7 +1222,7 @@ void NetplayManager::ban_user(undefined **param_1, undefined4 param_2) puStack_c = &LAB_00b08ee1; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (uint)(userIdText + 0x30); + uVar3 = __security_cookie ^ GHIDRA_UINT((userIdText + 0x30)); ExceptionList = &local_10; local_c8 = KAGE::Network::Multiplayer::ConstLobby::vftable; lobbyImpl = (int *)0x0; @@ -1256,9 +1256,9 @@ void NetplayManager::ban_user(undefined **param_1, undefined4 param_2) appuStack_d0[0] = KAGE::System::UserProfileBase::vftable; } ppuStack_bc = KAGE::System::UserProfile::vftable; - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; bVar2 = ((KAGE::System::UserProfile *)(&ppuStack_bc))->KAGE::System::UserProfile::is_local_user(); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); if (bVar2 != 0) { sprintf_s(userIdText,0x20,&UNK_00b78d18); pbVar4 = userIdText; @@ -1281,9 +1281,9 @@ void NetplayManager::ban_user(undefined **param_1, undefined4 param_2) bVar2 = *pbVar5; pbVar5 = pbVar5 + 1; } while (bVar2 != 0); - ((std::string *)((char *)banList))->std::string::assign(metadataValue,(int)pbVar5 - (int)(metadataValue + 1)); - local_8 = CONCAT31(local_8._1_3_,3); - while ((byte *)0x64 < pbVar4 + iStack_a4 + (1 - (int)(userIdText + 1))) { + ((std::string *)((char *)banList))->std::string::assign(metadataValue,GHIDRA_INT(pbVar5) - GHIDRA_INT((metadataValue + 1))); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); + while ((byte *)0x64 < pbVar4 + iStack_a4 + (1 - GHIDRA_INT((userIdText + 1)))) { sprintf_s(metadataKey,100,&DAT_00b69520); if (lobbyImpl == (int *)0x0) { metadataValue = (byte *)0x0; @@ -1296,14 +1296,14 @@ void NetplayManager::ban_user(undefined **param_1, undefined4 param_2) bVar2 = *pbVar5; pbVar5 = pbVar5 + 1; } while (bVar2 != 0); - ((std::string *)((char *)banList))->std::string::assign(metadataValue,(int)pbVar5 - (int)(metadataValue + 1)); + ((std::string *)((char *)banList))->std::string::assign(metadataValue,GHIDRA_INT(pbVar5) - GHIDRA_INT((metadataValue + 1))); } pbVar4 = userIdText; do { bVar2 = *pbVar4; pbVar4 = pbVar4 + 1; } while (bVar2 != 0); - ((std::string *)((char *)banList))->std::string::append(userIdText,(int)pbVar4 - (int)(userIdText + 1)); + ((std::string *)((char *)banList))->std::string::append(userIdText,GHIDRA_INT(pbVar4) - GHIDRA_INT((userIdText + 1))); ppppuVar6 = banList; if (0xf < uStack_a0) { ppppuVar6 = banList[0]; @@ -1311,14 +1311,14 @@ void NetplayManager::ban_user(undefined **param_1, undefined4 param_2) if (lobbyImpl != (int *)0x0) { (**(code **)(*lobbyImpl + 0x28))(metadataKey,ppppuVar6); } - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); if (0xf < uStack_a0) { uVar3 = uStack_a0 + 1; ppppuVar6 = banList[0]; if (0xfff < uVar3) { ppppuVar6 = (undefined4 ****)banList[0][-1]; uVar3 = uStack_a0 + 0x24; - if (0x1f < (uint)((int)banList[0] + (-4 - (int)ppppuVar6))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(banList[0]) + (-4 - GHIDRA_INT(ppppuVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1361,7 +1361,7 @@ void NetplayManager::reset(byte isReleaseDevices) local_8 = 0xffffffff; puStack_c = &LAB_00b08f8d; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(device + 0x14); + uVar2 = __security_cookie ^ GHIDRA_UINT((device + 0x14)); ExceptionList = &local_10; this[3] = (NetplayManager)0x0; this[0x62c] = (NetplayManager)0x0; @@ -1381,13 +1381,13 @@ void NetplayManager::reset(byte isReleaseDevices) allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar2 = *(uint *)(iVar4 + -4); qVar1 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar1 < uVar2); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar2)); free((void *)(iVar4 + -4)); local_8 = 0xffffffff; *(int *)((char *)NVar3 + 0x14) = 0; @@ -1401,7 +1401,7 @@ void NetplayManager::reset(byte isReleaseDevices) } FID_conflict__Erase_tree_>_> (this + 0xf,(fuzzer_allocator_> *)(this + 0xf), - *(_Tree_node **)((int)NVar3 + 4)); + *(_Tree_node **)(GHIDRA_INT(NVar3) + 4)); *(NetplayManager *)((char *)NVar3 + 4) = NVar3; *(NetplayManager *)NVar3 = NVar3; *(NetplayManager *)((char *)NVar3 + 8) = NVar3; @@ -1421,7 +1421,7 @@ void NetplayManager::reset(byte isReleaseDevices) *(undefined1 *)(this + 0x48b) = 0; FID_conflict__Erase_tree_>_> (tree,(fuzzer_allocator_> *)tree, - *(_Tree_node **)((int)NVar3 + 4)); + *(_Tree_node **)(GHIDRA_INT(NVar3) + 4)); *(NetplayManager *)((char *)NVar3 + 4) = NVar3; *(NetplayManager *)NVar3 = NVar3; *(NetplayManager *)((char *)NVar3 + 8) = NVar3; @@ -1445,14 +1445,14 @@ void NetplayManager::reset(byte isReleaseDevices) if (NVar3 != this[1]) { do { FUN_00901b70(); - NVar3 = (NetplayManager)((int)NVar3 + 4); + NVar3 = (NetplayManager)(GHIDRA_INT(NVar3) + 4); } while (NVar3 != this[1]); } ExceptionList = local_10; return; } NVar3 = *this; - if (3 < (uint)((int)this[1] - (int)NVar3)) { + if (3 < GHIDRA_UINT((GHIDRA_INT(this[1]) - GHIDRA_INT(NVar3)))) { do { iVar4 = *(int *)(*(int *)NVar3 + 0xc); outDevice = device; @@ -1468,14 +1468,14 @@ void NetplayManager::reset(byte isReleaseDevices) } local_8 = 0xffffffff; NVar3 = *this; - } while (((int)this[1] - (int)NVar3 & 0xfffffffcU) != 0); + } while ((GHIDRA_INT(this[1]) - GHIDRA_INT(NVar3) & 0xfffffffcU) != 0); } NVar3 = this[0x61c]; elementCursor = this[0x61b]; if (elementCursor != NVar3) { do { std::vector::_Tidy(); - elementCursor = (NetplayManager)((int)elementCursor + 0x18); + elementCursor = (NetplayManager)(GHIDRA_INT(elementCursor) + 0x18); } while (elementCursor != NVar3); elementCursor = this[0x61b]; } @@ -1485,7 +1485,7 @@ void NetplayManager::reset(byte isReleaseDevices) if (elementCursor != NVar3) { do { std::vector::_Tidy(); - elementCursor = (NetplayManager)((int)elementCursor + 0x20); + elementCursor = (NetplayManager)(GHIDRA_INT(elementCursor) + 0x20); } while (elementCursor != NVar3); elementCursor = this[0x61e]; } @@ -1511,7 +1511,7 @@ byte NetplayManager::IsIdxLocalPlayer(uint idx) playerSlot = *this; i = 0; - playerCount = (int)this[1] - (int)playerSlot >> 2; + playerCount = GHIDRA_INT(this[1]) - GHIDRA_INT(playerSlot) >> 2; if (playerCount != 0) { do { if (*(uint *)(*(int *)playerSlot + 0xc) == idx) { @@ -1519,7 +1519,7 @@ byte NetplayManager::IsIdxLocalPlayer(uint idx) return isLocal; } i = i + 1; - playerSlot = (NetplayManager)((int)playerSlot + 4); + playerSlot = (NetplayManager)(GHIDRA_INT(playerSlot) + 4); } while (i < playerCount); } return 1; @@ -1579,9 +1579,9 @@ byte NetplayManager::Update() if (cVar4 != '\0') { daily_lobby_join_reset(this_00); } - this[0x637] = (NetplayManager)((int)this[0x637] + 1); + this[0x637] = (NetplayManager)(GHIDRA_INT(this[0x637]) + 1); puVar3 = puStack_20; - if (0x5a < (uint)this[0x637]) { + if (0x5a < GHIDRA_UINT(this[0x637])) { dailyJoinStatus = *this_00; if (dailyJoinStatus == (NetplayManager)0x2) { daily_lobby_join_reset(this_00); @@ -1638,7 +1638,7 @@ byte NetplayManager::Update() } local_14 = 0xffffffff; if (iVar1 == 0) break; - cleanupFlags = (int *)((uint)cleanupFlags | 2); + cleanupFlags = (int *)(GHIDRA_UINT(cleanupFlags) | 2); if (g_multiplayerService == (void *)0x0) { KAGE::SmartPointer::reset(); } @@ -1663,7 +1663,7 @@ byte NetplayManager::Update() } local_14 = 0xffffffff; if (iVar1 == 0) break; - cleanupFlags = (int *)((uint)cleanupFlags | 4); + cleanupFlags = (int *)(GHIDRA_UINT(cleanupFlags) | 4); if (g_multiplayerService == (void *)0x0) { KAGE::SmartPointer::reset(); } @@ -1697,7 +1697,7 @@ byte NetplayManager::Update() local_14 = 6; ((std::shared_ptr *)(&local_50))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); local_14 = 7; - local_30 = (int *)((uint)cleanupFlags | 0x19); + local_30 = (int *)(GHIDRA_UINT(cleanupFlags) | 0x19); cleanupFlags = local_30; if (local_50 != (int *)0x0) { cVar4 = (**(code **)(*local_50 + 0xc))(); @@ -1707,8 +1707,8 @@ byte NetplayManager::Update() } isNoLobby = '\x01'; LAB_0090b5d1: - if (((uint)cleanupFlags & 1) != 0) { - cleanupFlags = (int *)((uint)cleanupFlags & 0xfffffffe); + if ((GHIDRA_UINT(cleanupFlags) & 1) != 0) { + cleanupFlags = (int *)(GHIDRA_UINT(cleanupFlags) & 0xfffffffe); local_14 = 8; if (((local_4c != (int *)0x0) && (cVar4 = (**(code **)(*local_4c + 0xc))(), cVar4 != '\0')) && (g_lobbyReleaseFn != (void *)0x0)) { @@ -1722,7 +1722,7 @@ LAB_0090b5d1: dailyJoinStatus = this[4]; inputDelay = (NetplayManager)(g_manager->_optionsConfig)._onlineInputDelay; this[4] = inputDelay; - if ((uint)dailyJoinStatus < (uint)inputDelay) { + if (GHIDRA_UINT(dailyJoinStatus) < GHIDRA_UINT(inputDelay)) { *(undefined1 *)(this + 6) = 1; } if (manager->_state == 2) { @@ -1740,7 +1740,7 @@ LAB_0090b5d1: } local_14 = 0xffffffff; if (iVar1 == 0) break; - cleanupFlags = (int *)((uint)cleanupFlags | 0x20); + cleanupFlags = (int *)(GHIDRA_UINT(cleanupFlags) | 0x20); if (g_multiplayerService == (void *)0x0) { KAGE::SmartPointer::reset(); } @@ -1806,13 +1806,13 @@ LAB_0090b5d1: return 0; } uVar7 = 0; - if ((int)this[1] - (int)*this >> 2 != 0) { + if (GHIDRA_INT(this[1]) - GHIDRA_INT(*this) >> 2 != 0) { do { - iVar1 = *(int *)((int)*this + uVar7 * 4); + iVar1 = *(int *)(GHIDRA_INT(*this) + uVar7 * 4); uVar7 = uVar7 + 1; *(undefined4 *)(iVar1 + 0x388) = 0; *(undefined4 *)(iVar1 + 0x38c) = 0; - } while (uVar7 < (uint)((int)this[1] - (int)*this >> 2)); + } while (uVar7 < GHIDRA_UINT((GHIDRA_INT(this[1]) - GHIDRA_INT(*this) >> 2))); } } ExceptionList = local_1c; @@ -1845,7 +1845,7 @@ void NetplayManager::Render() local_8 = 0xffffffff; puStack_c = &LAB_00b0904d; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; if (topAnimState[0x42c] != (NetplayManager)0x0) { drawPos.x = g_screenWidth * 0.5; @@ -1881,7 +1881,7 @@ void NetplayManager::Render() local_30 = 0; local_8 = 0; ((KColor *)(&white))->KColor::SetFromARGB(0xffffffff); - str = *(byte **)((int)topAnimState[0x429] + ((int)topAnimState[0x42a] - 1U & (uint)topAnimState[0x42b]) * 4); + str = *(byte **)(GHIDRA_INT(topAnimState[0x429]) + (GHIDRA_INT(topAnimState[0x42a]) - 1U & GHIDRA_UINT(topAnimState[0x42b])) * 4); if (0xf < *(uint *)(str + 0x14)) { str = *(byte **)str; } @@ -1977,7 +1977,7 @@ void NetplayManager::join_pending_lobby(void *lobby) } _local_28 = CONCAT44(auStackY_dc + 0x84,local_28); local_14 = 1; - ((std::shared_ptr *)(auStackY_dc + 0x88))->std::shared_ptr::assign((void *)((int)lobby + 4)); + ((std::shared_ptr *)(auStackY_dc + 0x88))->std::shared_ptr::assign((void *)(GHIDRA_INT(lobby) + 4)); local_14 = 0xffffffff; FUN_009db250(); } @@ -1986,7 +1986,7 @@ void NetplayManager::join_pending_lobby(void *lobby) } else { puStack_20 = auStack_4a + 0x46; - ((std::shared_ptr *)(this + 0x625))->std::shared_ptr::assign((void *)((int)lobby + 4)); + ((std::shared_ptr *)(this + 0x625))->std::shared_ptr::assign((void *)(GHIDRA_INT(lobby) + 4)); if (*this == this[1]) { _local_28 = 0; KAGE::Network::Multiplayer::ConstLobby::ConstLobby(); @@ -2034,7 +2034,7 @@ void NetplayManager::store_local_persistent_game_data() local_14 = 0xffffffff; puStack_18 = &LAB_00b09145; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(bufferedStream + 0x12); + local_24 = __security_cookie ^ GHIDRA_UINT((bufferedStream + 0x12)); ExceptionList = &local_1c; piVar1 = (int *)(in_ECX + 0xfec); (**(code **)(*piVar1 + 8))(local_24); @@ -2062,13 +2062,13 @@ void NetplayManager::store_local_persistent_game_data() pvStack_84 = *(void **)((char *)g_userProfile + 0xc); } FUN_0091b0f0(&g_manager->_persistentGameData,&local_88); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; local_8c = (void *)0x0; pvVar2 = ((PersistentGameDataWriter *)(&gameDataWriter))->PersistentGameDataWriter::compress((uint *)&local_8c); pvStack_84 = pvVar2; (**(code **)(*piVar1 + 4))(0,0xffffffff); pvVar2 = local_8c; - (**(code **)(*piVar1 + 0xc))((int)local_8c + 5); + (**(code **)(*piVar1 + 0xc))(GHIDRA_INT(local_8c) + 5); messageType = 2; (**(code **)(*(int *)(in_ECX + 0x1014) + 0x1c))(&messageType,1,1); local_8c = pvVar2; @@ -2076,14 +2076,14 @@ void NetplayManager::store_local_persistent_game_data() compressedData = pvStack_84; (**(code **)(*(int *)(in_ECX + 0x1014) + 0x1c))(pvStack_84,pvVar2,1); if (compressedData != (void *)0x0) { - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; tracked_alloc(1,compressedData,0); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; } PersistentGameData::operator_assign ((PersistentGameData *)(in_ECX + 0x5c),&g_manager->_persistentGameData); local_8c = g_userProfile; - local_14 = CONCAT31(local_14._1_3_,4); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),4); if (g_userProfile == (void *)0x0) { uStack_94 = 0; local_98 = 0; @@ -2170,7 +2170,7 @@ int NetplayManager::restore_player_state(ulonglong *userId, Entity_Player *playe local_8 = (GameStatePlayer)0xffffffff; puStack_c = &LAB_00b091d0; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(gameState + 0x17b); + uVar2 = __security_cookie ^ GHIDRA_UINT((gameState + 0x17b)); ExceptionList = &local_10; local_5f8 = userId; local_5fc = player; @@ -2186,7 +2186,7 @@ int NetplayManager::restore_player_state(ulonglong *userId, Entity_Player *playe return 0; } if ((*(uint *)((char *)userId + 4) <= *(uint *)((char *)lowerBound + 0x14)) && - ((uint)*userId < *(uint *)((char *)lowerBound + 0x10))) { + (GHIDRA_UINT(*userId) < *(uint *)((char *)lowerBound + 0x10))) { ExceptionList = local_10; return 0; } @@ -2211,7 +2211,7 @@ int NetplayManager::restore_player_state(ulonglong *userId, Entity_Player *playe local_604 = 1; local_610 = 0; local_60c = 0; - reader = -(uint)(piVar3 != (int *)0xfffffff8) & (uint)(piVar3 + 0xc); + reader = -GHIDRA_UINT((piVar3 != (int *)0xfffffff8)) & GHIDRA_UINT((piVar3 + 0xc)); local_608 = 0xfedcba76; input_state_reset(gameState); local_8 = (GameStatePlayer)0x0; @@ -2305,9 +2305,9 @@ void NetplayManager::save_frame_snapshot(byte isResetEntities) local_14 = (undefined **)0xffffffff; puStack_18 = &LAB_00b09285; local_1c = ExceptionList; - uVar3 = __security_cookie ^ (uint)(local_30 + 8); + uVar3 = __security_cookie ^ GHIDRA_UINT((local_30 + 8)); ExceptionList = &local_1c; - entityList = (EntityList *)((int)g_game->_room + 0x1218); + entityList = (EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218); entityListRef = entityList; netplay = snapshotDeque; local_24 = uVar3; @@ -2321,7 +2321,7 @@ void NetplayManager::save_frame_snapshot(byte isResetEntities) pNVar1 = netplay; snapshotDeque = netplay + 10; dequeMap = netplay[0xd]; - local_80 = (NetplayManager)((int)netplay[0xe] + (int)dequeMap); + local_80 = (NetplayManager)(GHIDRA_INT(netplay[0xe]) + GHIDRA_INT(dequeMap)); NVar7 = *snapshotDeque; while( true ) { if (dequeMap == local_80) { @@ -2343,7 +2343,7 @@ void NetplayManager::save_frame_snapshot(byte isResetEntities) frameNumber = netplay + 3; _Find_lower_bound<>(&local_94,frameNumber); if (((*(char *)((char *)lowerBoundNode + 0xd) == '\0') && - ((uint)*(NetplayManager *)((char *)lowerBoundNode + 0x10) <= (uint)*frameNumber)) && + (GHIDRA_UINT(*(NetplayManager *)((char *)lowerBoundNode + 0x10)) <= GHIDRA_UINT(*frameNumber))) && (lowerBoundNode != netplay[0xf])) { piVar5 = (int *)std::map::try_emplace(&local_84,frameNumber); if (*(int *)(*piVar5 + 0x14) != 0) { @@ -2353,17 +2353,17 @@ void NetplayManager::save_frame_snapshot(byte isResetEntities) allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (iVar4 != 0) { uVar3 = *(uint *)(iVar4 + -4); allocatedBefore = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar3; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar3; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)allocatedBefore < uVar3); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBefore) < uVar3)); free((void *)(iVar4 + -4)); } - local_14 = (undefined **)CONCAT31(local_14._1_3_,1); + local_14 = (undefined **)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); piVar5 = (int *)std::map::try_emplace(&local_84,frameNumber); *(undefined4 *)(*piVar5 + 0x14) = 0; } @@ -2381,24 +2381,24 @@ void NetplayManager::save_frame_snapshot(byte isResetEntities) local_94 = netplay[3]; iStack_90 = entityListRef[1]._updateEL._capacity; NVar7 = pNVar1[0xe]; - if ((uint)dequeMap <= (int)NVar7 + 1U) { - std_deque_growmap(snapshotDeque,(uint)NVar7); + if (GHIDRA_UINT(dequeMap) <= GHIDRA_INT(NVar7) + 1U) { + std_deque_growmap(snapshotDeque,GHIDRA_UINT(NVar7)); dequeMap = pNVar1[0xc]; NVar7 = pNVar1[0xe]; } - pNVar1[0xd] = (NetplayManager)((uint)pNVar1[0xd] & (int)dequeMap - 1U); - uVar3 = (int)NVar7 + (int)pNVar1[0xd] & (int)dequeMap - 1U; + pNVar1[0xd] = (NetplayManager)(GHIDRA_UINT(pNVar1[0xd]) & GHIDRA_INT(dequeMap) - 1U); + uVar3 = GHIDRA_INT(NVar7) + GHIDRA_INT(pNVar1[0xd]) & GHIDRA_INT(dequeMap) - 1U; dequeMap = pNVar1[0xb]; iVar4 = uVar3 * 4; if (*(int *)((char *)dequeMap + uVar3 * 4) == 0) { pvVar6 = operator_new(0xc); - *(void **)(iVar4 + (int)pNVar1[0xb]) = pvVar6; + *(void **)(iVar4 + GHIDRA_INT(pNVar1[0xb])) = pvVar6; dequeMap = pNVar1[0xb]; } snapshotEntry = *(undefined8 **)((char *)dequeMap + iVar4); *snapshotEntry = CONCAT44(iStack_90,local_94); *(NetplayManager *)(snapshotEntry + 1) = local_80; - pNVar1[0xe] = (NetplayManager)((int)pNVar1[0xe] + 1); + pNVar1[0xe] = (NetplayManager)(GHIDRA_INT(pNVar1[0xe]) + 1); local_30[0] = KAGE::Filesys::StreamBase::vftable; stream = KAGE::Filesys::BufferedStreamBase::vftable; local_54 = 0; @@ -2418,18 +2418,18 @@ void NetplayManager::save_frame_snapshot(byte isResetEntities) else { iVar4 = *(int *)NVar7; } - if (**(NetplayManager **)(*(int *)(iVar4 + 4) + (*(int *)(iVar4 + 8) - 1U & (uint)dequeMap) * 4) + if (**(NetplayManager **)(*(int *)(iVar4 + 4) + (*(int *)(iVar4 + 8) - 1U & GHIDRA_UINT(dequeMap)) * 4) == netplay[3]) break; - dequeMap = (NetplayManager)((int)dequeMap + 1); + dequeMap = (NetplayManager)(GHIDRA_INT(dequeMap) + 1); } iVar4 = entityListRef[1]._updateEL._capacity; if (NVar7 == (NetplayManager)0x0) { - *(int *)(*(int *)(_DAT_00000004 + (_DAT_00000008 - 1U & (uint)dequeMap) * 4) + 4) = iVar4; + *(int *)(*(int *)(_DAT_00000004 + (_DAT_00000008 - 1U & GHIDRA_UINT(dequeMap)) * 4) + 4) = iVar4; ExceptionList = local_1c; return; } *(int *)(*(int *)(*(int *)(*(int *)NVar7 + 4) + - (*(int *)(*(int *)NVar7 + 8) - 1U & (uint)dequeMap) * 4) + 4) = iVar4; + (*(int *)(*(int *)NVar7 + 8) - 1U & GHIDRA_UINT(dequeMap)) * 4) + 4) = iVar4; ExceptionList = local_1c; return; } @@ -2482,7 +2482,7 @@ void NetplayManager::add_new_players() Manager *manager; NetplayManager *netplayManager; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); uStack_14 = 0xffffffff; puStack_18 = &LAB_00b0931f; local_1c = ExceptionList; @@ -2505,7 +2505,7 @@ void NetplayManager::add_new_players() *(NetplayManager *)((char *)NStack_3c + 4) = NStack_3c; *(NetplayManager *)((char *)NStack_3c + 8) = NStack_3c; *(undefined2 *)((char *)NStack_3c + 0xc) = 0x101; - uStack_14._0_1_ = 1; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 1; NStack_2c = *(NetplayManager *)this[0x619]; if (NStack_2c != this[0x619]) { do { @@ -2513,26 +2513,26 @@ void NetplayManager::add_new_players() lobby = KAGE::Network::Multiplayer::ConstLobby::vftable; lobbyPtr = (int *)0x0; lobbyRefCount = (int *)0x0; - uStack_14._0_1_ = 2; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 2; ((std::shared_ptr *)(&lobbyPtr))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); - local_28 = (undefined **)((uint)local_28 | 0xc); + local_28 = (undefined **)(GHIDRA_UINT(local_28) | 0xc); lobby = KAGE::Network::Multiplayer::Lobby::vftable; - uStack_14._0_1_ = 3; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 3; ppuStack_48 = (undefined **)FUN_00a28590(); - ppuStack_44 = (undefined **)((int)ppuStack_48 >> 0x1f); + ppuStack_44 = (undefined **)(GHIDRA_INT(ppuStack_48) >> 0x1f); playerEntry = FUN_00913ba0(); *(undefined4 *)(playerEntry + 4) = *(undefined4 *)((char *)NVar2 + 0x1c); *(undefined1 *)(playerEntry + 8) = *(undefined1 *)((char *)NVar2 + 0x20); *(undefined4 *)(playerEntry + 0xc) = *(undefined4 *)((char *)NVar2 + 0x24); *(undefined4 *)(playerEntry + 0x10) = *(undefined4 *)((char *)NVar2 + 0x28); lobby = KAGE::Network::Multiplayer::ConstLobby::vftable; - uStack_14._0_1_ = 4; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 4; if (((lobbyRefCount != (int *)0x0) && (cVar3 = (**(code **)(*lobbyRefCount + 0xc))(), cVar3 != '\0')) && (g_lobbyReleaseFn != (void *)0x0)) { (*g_lobbyReleaseFn)(); } - uStack_14._0_1_ = 1; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 1; std:: _Tree_unchecked_const_iterator_>,std::_Iterator_base0> ::operator++((_Tree_unchecked_const_iterator_>,std::_Iterator_base0> @@ -2565,7 +2565,7 @@ void NetplayManager::add_new_players() local_34 = (undefined **)newPlayersBegin; recipient = (undefined **)newPlayersBegin; } - uStack_14 = (uint)uStack_14._1_3_ << 8; + uStack_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(uStack_14)) + 0x1)) << 8; FUN_00914d90(); operator_delete((void *)NStack_3c,0x30); manager = g_manager; @@ -2583,7 +2583,7 @@ void NetplayManager::add_new_players() puVar6[3] = recipient[3]; puVar6[4] = recipient[4]; ppvVar1 = &(manager->_lobbyMembers)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 0x14); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 0x14); } recipient = recipient + 5; } while (recipient != (undefined **)newPlayersEnd); @@ -2592,22 +2592,22 @@ void NetplayManager::add_new_players() lobby = KAGE::Network::Multiplayer::ConstLobby::vftable; lobbyPtr = (int *)0x0; lobbyRefCount = (int *)0x0; - uStack_14._0_1_ = 5; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 5; ((std::shared_ptr *)(&lobbyPtr))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); ppuVar4 = local_28; lobby = KAGE::Network::Multiplayer::Lobby::vftable; - uStack_14 = CONCAT31(uStack_14._1_3_,6); - local_28 = (undefined **)((uint)local_28 | 0x31); + uStack_14 = CONCAT31((*(undefined1 *)((char *)&(uStack_14) + 0x1)),6); + local_28 = (undefined **)(GHIDRA_UINT(local_28) | 0x31); local_34 = local_28; if (lobbyPtr == (int *)0x0) { ppuStack_44 = (undefined **)0x0; ownerProfile = &ppuStack_48; ppuStack_48 = KAGE::System::UserProfile::vftable; - uVar5 = (uint)ppuVar4 | 0xb1; + uVar5 = GHIDRA_UINT(ppuVar4) | 0xb1; } else { ownerProfile = (undefined ***)(**(code **)(*lobbyPtr + 0x20))(); - uVar5 = (uint)local_28 | 0x40; + uVar5 = GHIDRA_UINT(local_28) | 0x40; } NStack_3c = (NetplayManager)KAGE::System::UserProfileBase::vftable; ppuStack_38 = ownerProfile[1]; @@ -2627,12 +2627,12 @@ void NetplayManager::add_new_players() isLobbyOwner = '\0'; } ppuVar4 = local_28; - if (((uint)local_28 & 2) != 0) { - ppuVar4 = (undefined **)((uint)local_28 & 0xfffffffd); + if ((GHIDRA_UINT(local_28) & 2) != 0) { + ppuVar4 = (undefined **)(GHIDRA_UINT(local_28) & 0xfffffffd); NStack_3c = (NetplayManager)KAGE::System::UserProfileBase::vftable; } uStack_14 = 0; - if (((uint)ppuVar4 & 1) != 0) { + if ((GHIDRA_UINT(ppuVar4) & 1) != 0) { lobby = KAGE::Network::Multiplayer::ConstLobby::vftable; uStack_14 = 8; if (((lobbyRefCount != (int *)0x0) && @@ -2644,7 +2644,7 @@ void NetplayManager::add_new_players() } if (isLobbyOwner != '\0') { ((KAGE::Filesys::BufferedStream *)(&stream))->KAGE::Filesys::BufferedStream::BufferedStream(0); - uStack_14 = CONCAT31(uStack_14._1_3_,9); + uStack_14 = CONCAT31((*(undefined1 *)((char *)&(uStack_14) + 0x1)),9); write_player_game_states_message(); local_34 = ppuStack_88; pvVar7 = pvStack_80; @@ -2656,15 +2656,15 @@ void NetplayManager::add_new_players() "Attempting to create a message when there is no multiplayer service\n" ); } - NetConnection::send_message(g_multiplayerService,&ppuStack_48,1,pvVar7,(uint)local_34,0); + NetConnection::send_message(g_multiplayerService,&ppuStack_48,1,pvVar7,GHIDRA_UINT(local_34),0); puVar6 = newPlayersEnd; - uStack_14._0_1_ = 10; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 10; for (; recipient != (undefined **)puVar6; recipient = recipient + 5) { - NStack_2c = (NetplayManager)((int)auStack_9a + -10); + NStack_2c = (NetplayManager)(GHIDRA_INT(auStack_9a) + -10); pvVar7 = (void *)0x0; messageRefCount = (void *)0x0; local_34 = ppuStack_44; - NVar2 = (NetplayManager)((int)auStack_9a + -10); + NVar2 = (NetplayManager)(GHIDRA_INT(auStack_9a) + -10); local_28 = ppuStack_48; if (ppuStack_44 != (undefined **)0x0) { cVar3 = (**(code **)(*ppuStack_44 + 4))(); @@ -2683,13 +2683,13 @@ void NetplayManager::add_new_players() NStack_2c = NVar2; multiplayer_send_message(recipient,pvVar7,messageRefCount); } - uStack_14._0_1_ = 0xb; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 0xb; if (((ppuStack_44 != (undefined **)0x0) && (cVar3 = (**(code **)(*ppuStack_44 + 0xc))(), cVar3 != '\0')) && (g_multiplayerRelease != (void *)0x0)) { (*g_multiplayerRelease)(); } - uStack_14 = (uint)uStack_14._1_3_ << 8; + uStack_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(uStack_14)) + 0x1)) << 8; ppuStack_64 = KAGE::Filesys::StreamBase::vftable; stream = KAGE::Filesys::BufferedStreamBase::vftable; ppuStack_88 = (undefined **)0x0; @@ -2714,12 +2714,12 @@ void NetplayManager::add_new_players() for (; puVar6 != newPlayersEnd; puVar6 = puVar6 + 5) { *puVar6 = KAGE::System::UserProfileBase::vftable; } - uVar5 = (((int)newPlayersCapacity - (int)newPlayersBegin) / 0x14) * 0x14; + uVar5 = ((GHIDRA_INT(newPlayersCapacity) - GHIDRA_INT(newPlayersBegin)) / 0x14) * 0x14; puVar6 = newPlayersBegin; if (0xfff < uVar5) { puVar6 = (undefined4 *)newPlayersBegin[-1]; uVar5 = uVar5 + 0x23; - if (0x1f < (uint)((int)newPlayersBegin + (-4 - (int)puVar6))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(newPlayersBegin) + (-4 - GHIDRA_INT(puVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2763,7 +2763,7 @@ void NetplayManager::process_pending_joins(byte isForce) pvStack_8 = (void *)0xffffffff; puStack_c = &LAB_00b0938e; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(challengeString + 10); + uVar2 = __security_cookie ^ GHIDRA_UINT((challengeString + 10)); ExceptionList = &local_10; if ((this[0x61a] != (NetplayManager)0x0) || (isForce != 0)) { local_14 = uVar2; @@ -2788,7 +2788,7 @@ void NetplayManager::process_pending_joins(byte isForce) ppuStack_90 = KAGE::System::UserProfileBase::vftable; } ownerProfile = KAGE::System::UserProfile::vftable; - pvStack_8 = (void *)CONCAT31(pvStack_8._1_3_,2); + pvStack_8 = (void *)CONCAT31((*(undefined1 *)((char *)&(pvStack_8) + 0x1)),2); isLobbyOwner = ((KAGE::System::UserProfile *)(&ownerProfile))->KAGE::System::UserProfile::is_local_user(); ownerProfile = KAGE::System::UserProfileBase::vftable; lobby = KAGE::Network::Multiplayer::ConstLobby::vftable; @@ -2805,29 +2805,29 @@ void NetplayManager::process_pending_joins(byte isForce) pvStack_8 = (void *)0x4; if (isForce == 0) { FUN_009193b0(); - pvStack_8._0_1_ = 6; + (*(undefined1 *)((char *)&(pvStack_8) + 0x0)) = 6; ((PersistentGameDataWriter *)(gameDataWriter))->PersistentGameDataWriter::write(&g_manager->_persistentGameData,this + 0x406) ; piStack_18 = (int *)0xf; piStack_1c = (int *)0x0; challengeString[0] = (void *)0x0; - pvStack_8._0_1_ = 7; + (*(undefined1 *)((char *)&(pvStack_8) + 0x0)) = 7; FUN_00916f70(g_game->_challenge,challengeString,gameDataWriter,0); - pvStack_8._0_1_ = 6; + (*(undefined1 *)((char *)&(pvStack_8) + 0x0)) = 6; if (0xf < piStack_18) { - uVar2 = (int)piStack_18 + 1; + uVar2 = GHIDRA_INT(piStack_18) + 1; pvVar4 = challengeString[0]; if (0xfff < uVar2) { - pvVar4 = *(void **)((int)challengeString[0] + -4); - uVar2 = (int)piStack_18 + 0x24; - if (0x1f < (uint)((int)challengeString[0] + (-4 - (int)pvVar4))) { + pvVar4 = *(void **)(GHIDRA_INT(challengeString[0]) + -4); + uVar2 = GHIDRA_INT(piStack_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(challengeString[0]) + (-4 - GHIDRA_INT(pvVar4))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar4,uVar2); } - pvStack_8 = (void *)CONCAT31(pvStack_8._1_3_,4); + pvStack_8 = (void *)CONCAT31((*(undefined1 *)((char *)&(pvStack_8) + 0x1)),4); FUN_00a58200(); } else { @@ -2836,14 +2836,14 @@ void NetplayManager::process_pending_joins(byte isForce) challengeString[0] = (void *)0x0; pvStack_8 = (void *)0x5; FUN_00916f70(g_game->_challenge,challengeString,this + 0x406,_isForce); - pvStack_8 = (void *)CONCAT31(pvStack_8._1_3_,4); + pvStack_8 = (void *)CONCAT31((*(undefined1 *)((char *)&(pvStack_8) + 0x1)),4); if (0xf < piStack_18) { - uVar2 = (int)piStack_18 + 1; + uVar2 = GHIDRA_INT(piStack_18) + 1; pvVar4 = challengeString[0]; if (0xfff < uVar2) { - pvVar4 = *(void **)((int)challengeString[0] + -4); - uVar2 = (int)piStack_18 + 0x24; - if (0x1f < (uint)((int)challengeString[0] + (-4 - (int)pvVar4))) { + pvVar4 = *(void **)(GHIDRA_INT(challengeString[0]) + -4); + uVar2 = GHIDRA_INT(piStack_18) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(challengeString[0]) + (-4 - GHIDRA_INT(pvVar4))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2863,11 +2863,11 @@ void NetplayManager::process_pending_joins(byte isForce) } messageRefCount = (void *)0x0; message = pvStack_84; - NetConnection::send_message(g_multiplayerService,&ppuStack_90,1,pvVar4,(uint)pvStack_84,0); - pvStack_8._0_1_ = 8; + NetConnection::send_message(g_multiplayerService,&ppuStack_90,1,pvVar4,GHIDRA_UINT(pvStack_84),0); + (*(undefined1 *)((char *)&(pvStack_8) + 0x0)) = 8; FUN_008ef1d0(&ppuStack_90); send_message(this,0x1c,message,messageRefCount); - pvStack_8 = (void *)CONCAT31(pvStack_8._1_3_,9); + pvStack_8 = (void *)CONCAT31((*(undefined1 *)((char *)&(pvStack_8) + 0x1)),9); if (piStack_8c != (int *)0x0) { cVar1 = (**(code **)(*piStack_8c + 0xc))(); if ((cVar1 != '\0') && (g_multiplayerRelease != (void *)0x0)) { @@ -2902,7 +2902,7 @@ byte NetplayManager::check_connection() puVar1 = local_d0 + 0xcc; if ((g_multiplayerService != (void *)0x0) && (isConnected = (**(code **)(*(int *)g_multiplayerService + 0x10)) - (__security_cookie ^ (uint)(local_d0 + 0xc0)), puVar1 = puStack_20, + (__security_cookie ^ GHIDRA_UINT((local_d0 + 0xc0))), puVar1 = puStack_20, isConnected != '\0')) { ExceptionList = local_1c; return 1; @@ -2973,7 +2973,7 @@ void NetplayManager::send_message(uint flags, void *message, void *messageRefCou undefined4 local_14; int userImpl; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); puStack_18 = &LAB_00b09533; local_1c = ExceptionList; ExceptionList = &local_1c; @@ -2996,9 +2996,9 @@ void NetplayManager::send_message(uint flags, void *message, void *messageRefCou local_84 = KAGE::Network::Multiplayer::ConstLobby::vftable; lobbyImpl = 0; lobbyRefCount = (int *)0x0; - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; ((std::shared_ptr *)(&lobbyImpl))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); - cleanupFlags = (NetplayManager *)((uint)pNVar8 | 0x18); + cleanupFlags = (NetplayManager *)(GHIDRA_UINT(pNVar8) | 0x18); if (lobbyImpl == 0) { pvVar5 = (void *)0x0; } @@ -3006,7 +3006,7 @@ void NetplayManager::send_message(uint flags, void *message, void *messageRefCou pvVar5 = (void *)(*(int *)(lobbyImpl + 0x14) - *(int *)(lobbyImpl + 0x10) >> 3); } local_84 = KAGE::Network::Multiplayer::ConstLobby::vftable; - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; if (((lobbyRefCount != (int *)0x0) && (cVar2 = (**(code **)(*lobbyRefCount + 0xc))(), cVar2 != '\0')) && (g_lobbyReleaseFn != (void *)0x0)) { @@ -3016,20 +3016,20 @@ void NetplayManager::send_message(uint flags, void *message, void *messageRefCou local_90 = KAGE::Network::Multiplayer::ConstLobby::vftable; local_8c = 0; memberLobbyRefCount = (int *)0x0; - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; ((std::shared_ptr *)(&local_8c))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); - cleanupFlags = (NetplayManager *)((uint)pNVar8 | 0x78); + cleanupFlags = (NetplayManager *)(GHIDRA_UINT(pNVar8) | 0x78); local_90 = KAGE::Network::Multiplayer::Lobby::vftable; - local_14._0_1_ = 5; - ((KAGE::Network::Multiplayer::Lobby *)(&local_90))->KAGE::Network::Multiplayer::Lobby::get_member(&local_58,(uint)local_2c); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; + ((KAGE::Network::Multiplayer::Lobby *)(&local_90))->KAGE::Network::Multiplayer::Lobby::get_member(&local_58,GHIDRA_UINT(local_2c)); local_90 = KAGE::Network::Multiplayer::ConstLobby::vftable; - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; if (((memberLobbyRefCount != (int *)0x0) && (cVar2 = (**(code **)(*memberLobbyRefCount + 0xc))(), cVar2 != '\0')) && (g_lobbyReleaseFn != (void *)0x0)) { (*g_lobbyReleaseFn)(); } - local_14 = CONCAT31(local_14._1_3_,7); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),7); pvVar5 = (g_manager->_lobbyMembers)._begin; pvVar6 = (g_manager->_lobbyMembers)._end; local_40 = CONCAT44(pvVar6,(NetplayManager *)local_40); @@ -3048,16 +3048,16 @@ void NetplayManager::send_message(uint flags, void *message, void *messageRefCou } localUserId = FUN_00a23920(); if (localUserId == CONCAT44(pNVar8,pNStack_34)) goto LAB_0090ef7c; - pvVar5 = (void *)((int)pvVar5 + 0x14); - } while ((NetplayManager)pvVar5 != local_40._4_4_); + pvVar5 = (void *)(GHIDRA_INT(pvVar5) + 0x14); + } while ((NetplayManager)pvVar5 != (*(undefined4 *)((char *)&(local_40) + 0x4))); } userImpl = local_54; if (local_54 == 0) { local_40 = 0; - local_40._4_4_ = (NetplayManager)0x0; - local_40._0_4_ = (NetplayManager *)0x0; + (*(undefined4 *)((char *)&(local_40) + 0x4)) = (NetplayManager)0x0; + (*(undefined4 *)((char *)&(local_40) + 0x0)) = (NetplayManager *)0x0; userIdLow = (NetplayManager *)local_40; - memberIdHigh = (uint)local_40._4_4_; + memberIdHigh = (*(undefined4 *)((char *)&(GHIDRA_UINT(local_40)) + 0x4)); } else { userIdLow = *(NetplayManager **)(local_54 + 8); @@ -3080,10 +3080,10 @@ LAB_0090ef7c: else { if (userImpl == 0) { local_40 = 0; - local_40._4_4_ = (NetplayManager)0x0; - local_40._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(local_40) + 0x4)) = (NetplayManager)0x0; + (*(undefined4 *)((char *)&(local_40) + 0x0)) = (void *)0x0; peerIdLow = (NetplayManager *)local_40; - peerIdHigh = (NetplayManager *)local_40._4_4_; + peerIdHigh = (*(undefined4 *)((char *)&((NetplayManager *)local_40) + 0x4)); } else { peerIdLow = *(void **)(userImpl + 8); @@ -3091,17 +3091,17 @@ LAB_0090ef7c: } ((NetworkManager *)(g_multiplayerService))->NetworkManager::get_peer(&local_60,(ulonglong *)&peerIdLow); } - local_14 = CONCAT31(local_14._1_3_,9); - cleanupFlags = (NetplayManager *)((uint)cleanupFlags | 0x81); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),9); + cleanupFlags = (NetplayManager *)(GHIDRA_UINT(cleanupFlags) | 0x81); pNStack_34 = cleanupFlags; if ((local_60 == 0) && ((bVar1 = ((KAGE::System::UserProfile *)(&local_58))->KAGE::System::UserProfile::is_local_user(), bVar1 == 0 || ((flags & 0x10) == 0)))) goto LAB_0090ef7c; isRecipient = '\x01'; } - local_14._1_3_ = 0; - if (((uint)cleanupFlags & 1) != 0) { - cleanupFlags = (NetplayManager *)((uint)cleanupFlags & 0xfffffffe); + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; + if ((GHIDRA_UINT(cleanupFlags) & 1) != 0) { + cleanupFlags = (NetplayManager *)(GHIDRA_UINT(cleanupFlags) & 0xfffffffe); local_14 = 10; if (((peerRefCount != (int *)0x0) && (cVar2 = (**(code **)(*peerRefCount + 0xc))(), cVar2 != '\0')) && @@ -3110,7 +3110,7 @@ LAB_0090ef7c: } } pvVar5 = messageRefCount; - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; if (isRecipient != '\0') { pvVar6 = (void *)0x0; piVar7 = (int *)0x0; @@ -3122,15 +3122,15 @@ LAB_0090ef7c: (g_multiplayerRelease != (void *)0x0)))) { (*g_multiplayerRelease)(auStackY_138 + 0x84); } - pvVar6 = (void *)local_40._4_4_; + pvVar6 = (*(undefined4 *)((char *)&((void *)local_40) + 0x4)); piVar7 = pvVar5; } multiplayer_send_message(&local_58,pvVar6,piVar7); if (local_54 == 0) { local_40 = 0; - local_40._4_4_ = (NetplayManager)0x0; - local_40._0_4_ = (NetplayManager *)0x0; - uVar3 = local_40._4_4_; + (*(undefined4 *)((char *)&(local_40) + 0x4)) = (NetplayManager)0x0; + (*(undefined4 *)((char *)&(local_40) + 0x0)) = (NetplayManager *)0x0; + uVar3 = (*(undefined4 *)((char *)&(local_40) + 0x4)); uVar4 = (NetplayManager *)local_40; } else { @@ -3141,13 +3141,13 @@ LAB_0090ef7c: sentFlag = map_u64_bool_subscript(&sentIds,&idKey); *sentFlag = 1; } - local_2c = (void *)((int)local_2c + 1); + local_2c = (void *)(GHIDRA_INT(local_2c) + 1); local_58 = KAGE::System::UserProfileBase::vftable; pNVar8 = cleanupFlags; } this = local_44; } - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if ((flags & 4) != 0) { peerNode = *(NetplayManager *)this[0x619]; local_40 = CONCAT44(peerNode,(NetplayManager *)local_40); @@ -3156,9 +3156,9 @@ LAB_0090ef7c: userImpl = *(int *)((char *)peerNode + 0x1c); if (userImpl == 0) { idKey = 0; - idKey._4_4_ = (NetplayManager *)0x0; - idKey._0_4_ = (void *)0x0; - peerIdHigh = idKey._4_4_; + (*(undefined4 *)((char *)&(idKey) + 0x4)) = (NetplayManager *)0x0; + (*(undefined4 *)((char *)&(idKey) + 0x0)) = (void *)0x0; + peerIdHigh = (*(undefined4 *)((char *)&(idKey) + 0x4)); peerIdLow = (NetplayManager *)idKey; } else { @@ -3182,10 +3182,10 @@ LAB_0090f165: else { if (userImpl == 0) { idKey = 0; - idKey._4_4_ = (NetplayManager *)0x0; - idKey._0_4_ = (NetplayManager *)0x0; + (*(undefined4 *)((char *)&(idKey) + 0x4)) = (NetplayManager *)0x0; + (*(undefined4 *)((char *)&(idKey) + 0x0)) = (NetplayManager *)0x0; userIdLow = (NetplayManager *)idKey; - userIdHigh = (uint)idKey._4_4_; + userIdHigh = (*(undefined4 *)((char *)&(GHIDRA_UINT(idKey)) + 0x4)); } else { userIdLow = *(NetplayManager **)(userImpl + 8); @@ -3193,17 +3193,17 @@ LAB_0090f165: } ((NetworkManager *)(g_multiplayerService))->NetworkManager::get_peer(&local_60,(ulonglong *)&userIdLow); } - local_14 = CONCAT31(local_14._1_3_,0xb); - cleanupFlags = (NetplayManager *)((uint)cleanupFlags | 0x102); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0xb); + cleanupFlags = (NetplayManager *)(GHIDRA_UINT(cleanupFlags) | 0x102); pNStack_34 = cleanupFlags; if ((local_60 == 0) && ((cVar2 = (**(code **)(*(int *)((char *)peerNode + 0x18) + 0x14))(), cVar2 == '\0' || ((flags & 0x10) == 0)))) goto LAB_0090f165; isRecipient = '\x01'; } - local_14._1_3_ = 0; - if (((uint)cleanupFlags & 2) != 0) { - cleanupFlags = (NetplayManager *)((uint)cleanupFlags & 0xfffffffd); + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; + if ((GHIDRA_UINT(cleanupFlags) & 2) != 0) { + cleanupFlags = (NetplayManager *)(GHIDRA_UINT(cleanupFlags) & 0xfffffffd); local_14 = 0xc; if (((peerRefCount != (int *)0x0) && (cVar2 = (**(code **)(*peerRefCount + 0xc))(), cVar2 != '\0')) && @@ -3211,7 +3211,7 @@ LAB_0090f165: (*g_connectionReleaseFn)(); } } - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (isRecipient != '\0') { pvVar5 = (void *)0x0; pNVar8 = (NetplayManager *)0x0; @@ -3220,20 +3220,20 @@ LAB_0090f165: if ((messageRefCount != (void *)0x0) && (cVar2 = (**(code **)(*(int *)messageRefCount + 4))(), cVar2 != '\0')) { if ((pNVar8 != (NetplayManager *)0x0) && - ((cVar2 = (**(code **)((int)*pNVar8 + 0xc))(), cVar2 != '\0' && + ((cVar2 = (**(code **)(GHIDRA_INT(*pNVar8) + 0xc))(), cVar2 != '\0' && (g_multiplayerRelease != (void *)0x0)))) { (*g_multiplayerRelease)(auStackY_138 + 0x84); } pvVar5 = local_2c; pNVar8 = pNStack_34; } - multiplayer_send_message((void *)((int)peerNode + 0x18),pvVar5,pNVar8); + multiplayer_send_message((void *)(GHIDRA_INT(peerNode) + 0x18),pvVar5,pNVar8); userImpl = *(int *)((char *)peerNode + 0x1c); if (userImpl == 0) { idKey = 0; - idKey._4_4_ = (NetplayManager *)0x0; - idKey._0_4_ = (NetplayManager *)0x0; - local_54 = (int)idKey._4_4_; + (*(undefined4 *)((char *)&(idKey) + 0x4)) = (NetplayManager *)0x0; + (*(undefined4 *)((char *)&(idKey) + 0x0)) = (NetplayManager *)0x0; + local_54 = (*(undefined4 *)((char *)&(GHIDRA_INT(idKey)) + 0x4)); local_58 = (undefined **)(NetplayManager *)idKey; } else { @@ -3246,9 +3246,9 @@ LAB_0090f165: std:: _Tree_unchecked_const_iterator_>,std::_Iterator_base0> ::operator++((_Tree_unchecked_const_iterator_>,std::_Iterator_base0> - *)((int)&local_40 + 4)); - peerNode = local_40._4_4_; - } while (local_40._4_4_ != local_44[0x619]); + *)(GHIDRA_INT(&local_40) + 4)); + peerNode = (*(undefined4 *)((char *)&(local_40) + 0x4)); + } while ((*(undefined4 *)((char *)&(local_40) + 0x4)) != local_44[0x619]); } } if (((flags & 8) != 0) && @@ -3257,9 +3257,9 @@ LAB_0090f165: userImpl = piVar7[1]; if (userImpl == 0) { idKey = 0; - idKey._4_4_ = (NetplayManager *)0x0; - idKey._0_4_ = (void *)0x0; - peerIdHigh = idKey._4_4_; + (*(undefined4 *)((char *)&(idKey) + 0x4)) = (NetplayManager *)0x0; + (*(undefined4 *)((char *)&(idKey) + 0x0)) = (void *)0x0; + peerIdHigh = (*(undefined4 *)((char *)&(idKey) + 0x4)); peerIdLow = (NetplayManager *)idKey; } else { @@ -3272,7 +3272,7 @@ LAB_0090f165: if ((((*(char *)((char *)foundIt + 0xd) == '\0') && (*(NetplayManager **)((char *)foundIt + 0x14) <= local_44)) && ((*(NetplayManager **)((char *)foundIt + 0x14) < local_44 || - (*(uint *)((char *)foundIt + 0x10) <= (uint)local_40._4_4_)))) && (foundIt != sentIds)) { + (*(uint *)((char *)foundIt + 0x10) <= (*(undefined4 *)((char *)&(GHIDRA_UINT(local_40)) + 0x4)))))) && (foundIt != sentIds)) { LAB_0090f35f: isRecipient = '\0'; } @@ -3283,10 +3283,10 @@ LAB_0090f35f: else { if (userImpl == 0) { idKey = 0; - idKey._4_4_ = (NetplayManager *)0x0; - idKey._0_4_ = (NetplayManager *)0x0; + (*(undefined4 *)((char *)&(idKey) + 0x4)) = (NetplayManager *)0x0; + (*(undefined4 *)((char *)&(idKey) + 0x0)) = (NetplayManager *)0x0; userIdLow = (NetplayManager *)idKey; - userIdHigh = (uint)idKey._4_4_; + userIdHigh = (*(undefined4 *)((char *)&(GHIDRA_UINT(idKey)) + 0x4)); } else { userIdLow = *(NetplayManager **)(userImpl + 8); @@ -3294,17 +3294,17 @@ LAB_0090f35f: } ((NetworkManager *)(g_multiplayerService))->NetworkManager::get_peer(&local_60,(ulonglong *)&userIdLow); } - local_14 = CONCAT31(local_14._1_3_,0xd); - cleanupFlags = (NetplayManager *)((uint)cleanupFlags | 0x204); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0xd); + cleanupFlags = (NetplayManager *)(GHIDRA_UINT(cleanupFlags) | 0x204); pNStack_34 = cleanupFlags; if ((local_60 == 0) && ((cVar2 = (**(code **)(*piVar7 + 0x14))(), cVar2 == '\0' || ((flags & 0x10) == 0)))) goto LAB_0090f35f; isRecipient = '\x01'; } - local_14._1_3_ = 0; - if (((uint)cleanupFlags & 4) != 0) { - cleanupFlags = (NetplayManager *)((uint)cleanupFlags & 0xfffffffb); + (*(undefined1 *)((char *)&(local_14) + 0x1)) = 0; + if ((GHIDRA_UINT(cleanupFlags) & 4) != 0) { + cleanupFlags = (NetplayManager *)(GHIDRA_UINT(cleanupFlags) & 0xfffffffb); local_14 = 0xe; if (((peerRefCount != (int *)0x0) && (cVar2 = (**(code **)(*peerRefCount + 0xc))(), cVar2 != '\0')) && @@ -3312,7 +3312,7 @@ LAB_0090f35f: (*g_connectionReleaseFn)(); } } - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (isRecipient != '\0') { pvVar5 = (void *)0x0; pNVar8 = (NetplayManager *)0x0; @@ -3321,20 +3321,20 @@ LAB_0090f35f: if ((messageRefCount != (void *)0x0) && (cVar2 = (**(code **)(*(int *)messageRefCount + 4))(), cVar2 != '\0')) { if ((pNVar8 != (NetplayManager *)0x0) && - ((cVar2 = (**(code **)((int)*pNVar8 + 0xc))(), cVar2 != '\0' && + ((cVar2 = (**(code **)(GHIDRA_INT(*pNVar8) + 0xc))(), cVar2 != '\0' && (g_multiplayerRelease != (void *)0x0)))) { (*g_multiplayerRelease)(auStackY_138 + 0x84); } - pvVar5 = (void *)local_40._4_4_; + pvVar5 = (*(undefined4 *)((char *)&((void *)local_40) + 0x4)); pNVar8 = local_44; } multiplayer_send_message(piVar7,pvVar5,pNVar8); userImpl = piVar7[1]; if (userImpl == 0) { idKey = 0; - idKey._4_4_ = (NetplayManager *)0x0; - idKey._0_4_ = (NetplayManager *)0x0; - local_54 = (int)idKey._4_4_; + (*(undefined4 *)((char *)&(idKey) + 0x4)) = (NetplayManager *)0x0; + (*(undefined4 *)((char *)&(idKey) + 0x0)) = (NetplayManager *)0x0; + local_54 = (*(undefined4 *)((char *)&(GHIDRA_INT(idKey)) + 0x4)); local_58 = (undefined **)(NetplayManager *)idKey; } else { @@ -3349,11 +3349,11 @@ LAB_0090f35f: } FID_conflict__Erase_tree_>_> (&sentIds,(fuzzer_allocator_> *)&sentIds, - *(_Tree_node **)((int)sentIds + 4)); + *(_Tree_node **)(GHIDRA_INT(sentIds) + 4)); operator_delete(sentIds,0x20); } else { - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); FUN_008ef1d0(&message); FUN_00a29a40((byte)(flags >> 4) & 1); } @@ -3473,7 +3473,7 @@ void NetplayManager::process_drop_player_message() puStack_20 = acStack_34 + 0x30; puStack_18 = &LAB_00b09748; savedExceptionList = ExceptionList; - uVar3 = __security_cookie ^ (uint)(acStack_34 + 0x24); + uVar3 = __security_cookie ^ GHIDRA_UINT((acStack_34 + 0x24)); ExceptionList = &savedExceptionList; stackCookie = uVar3; do { @@ -3502,11 +3502,11 @@ void NetplayManager::process_drop_player_message() ((NetworkManager *)(g_multiplayerService))->NetworkManager::receive_message(&messageData,5,1); } ehState = 1; - local_90._4_4_ = messageData; + (*(undefined4 *)((char *)&(local_90) + 0x4)) = messageData; if (messageData[3] != 1) { KAGE_LogMessage(0x10,(byte *)"This function should only be called on consolidated messages"); } - if (*(int *)(*(int *)local_90._4_4_[2] + 0x18) != 0x20) { + if (*(int *)(*(*(undefined4 *)((char *)&((int *)local_90) + 0x4))[2] + 0x18) != 0x20) { KAGE_LogMessage(0x10,(byte *)"Invalid data size recieved for Drop Player Message \n"); } puVar6 = messageData; @@ -3521,7 +3521,7 @@ void NetplayManager::process_drop_player_message() ); } else { - iVar8 = *local_90._4_4_; + iVar8 = *(*(undefined4 *)((char *)&(local_90) + 0x4)); if (iVar8 == 0) { senderIdLow = *messageData; senderIdHigh = messageData[1]; @@ -3529,19 +3529,19 @@ void NetplayManager::process_drop_player_message() logSenderIdLow = senderIdLow; local_a4 = senderIdHigh; ((UserProfile *)(&senderIdLow))->UserProfile::find_or_create(); - ehState._0_1_ = 2; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; senderProfile[0] = KAGE::System::UserProfile::vftable; if (((extraout_EAX != 0) && (*(int *)(extraout_EAX + 8) != 0 || *(int *)(extraout_EAX + 0xc) != 0)) && (*(int *)(extraout_EAX + 0x14) == 0)) { ((KAGE::System::UserProfile *)(senderProfile))->KAGE::System::UserProfile::load_steam_avatar(); } - ehState._0_1_ = 3; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 3; uVar5 = (*(code *)senderProfile[0][1])(); uStack_98 = CONCAT44(uVar5,(undefined4)uStack_98); targetProfile = KAGE::System::UserProfileBase::vftable; ((UserProfile *)(dropEntry))->UserProfile::find_or_create(); - ehState._0_1_ = 4; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 4; targetProfile = KAGE::System::UserProfile::vftable; targetProfileData = extraout_EAX_00; if (((extraout_EAX_00 != 0) && @@ -3549,7 +3549,7 @@ void NetplayManager::process_drop_player_message() (*(int *)(extraout_EAX_00 + 0x14) == 0)) { ((KAGE::System::UserProfile *)(&targetProfile))->KAGE::System::UserProfile::load_steam_avatar(); } - ehState._0_1_ = 5; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; if (targetProfileData == 0) { local_a0 = local_a0 & 0xffffffff; local_90 = 0; @@ -3560,19 +3560,19 @@ void NetplayManager::process_drop_player_message() } targetNameProfile[0] = KAGE::System::UserProfileBase::vftable; ((UserProfile *)(dropEntry))->UserProfile::find_or_create(); - ehState._0_1_ = 6; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 6; targetNameProfile[0] = KAGE::System::UserProfile::vftable; if (((extraout_EAX_01 != 0) && (*(int *)(extraout_EAX_01 + 8) != 0 || *(int *)(extraout_EAX_01 + 0xc) != 0)) && (*(int *)(extraout_EAX_01 + 0x14) == 0)) { ((KAGE::System::UserProfile *)(targetNameProfile))->KAGE::System::UserProfile::load_steam_avatar(); } - ehState._0_1_ = 7; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 7; (*(code *)targetNameProfile[0][1])(); KAGE_LogMessage(1,(byte *) "[Frame: %d] Recieved eDropMessageType::MSG_DROP_ON for player \"%s\" %llu from player \"%s\" %llu \n" ); - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; targetNameProfile[0] = KAGE::System::UserProfileBase::vftable; targetProfile = KAGE::System::UserProfileBase::vftable; senderProfile[0] = KAGE::System::UserProfileBase::vftable; @@ -3580,31 +3580,31 @@ void NetplayManager::process_drop_player_message() voterIdHigh = messageData[1]; piVar4 = (int *)FUN_00915960(voteIter,&voterIdLow); *(undefined1 *)(*piVar4 + 0x18) = 1; - if ((int)dropEntry[1] - (int)*dropEntry >> 2 != 0) { + if (GHIDRA_INT(dropEntry[1]) - GHIDRA_INT(*dropEntry) >> 2 != 0) { targetCheckProfile[0] = KAGE::System::UserProfileBase::vftable; ((UserProfile *)(dropEntry))->UserProfile::find_or_create(); - ehState._0_1_ = 8; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 8; targetCheckProfile[0] = KAGE::System::UserProfile::vftable; if (((extraout_EAX_02 != 0) && (*(int *)(extraout_EAX_02 + 8) != 0 || *(int *)(extraout_EAX_02 + 0xc) != 0)) && (*(int *)(extraout_EAX_02 + 0x14) == 0)) { ((KAGE::System::UserProfile *)(targetCheckProfile))->KAGE::System::UserProfile::load_steam_avatar(); } - ehState._0_1_ = 9; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 9; cVar1 = (*(code *)targetCheckProfile[0][5])(); - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; targetCheckProfile[0] = KAGE::System::UserProfileBase::vftable; if (cVar1 == '\0') { targetChatProfile[0] = KAGE::System::UserProfileBase::vftable; ((UserProfile *)(dropEntry))->UserProfile::find_or_create(); - ehState._0_1_ = 10; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 10; targetChatProfile[0] = KAGE::System::UserProfile::vftable; if (((extraout_EAX_03 != 0) && (*(int *)(extraout_EAX_03 + 8) != 0 || *(int *)(extraout_EAX_03 + 0xc) != 0)) && (*(int *)(extraout_EAX_03 + 0x14) == 0)) { ((KAGE::System::UserProfile *)(targetChatProfile))->KAGE::System::UserProfile::load_steam_avatar(); } - ehState._0_1_ = 0xb; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xb; profileName = (byte *)(*(code *)targetChatProfile[0][1])(); acStack_34[8] = '\0'; acStack_34[9] = '\0'; @@ -3618,9 +3618,9 @@ void NetplayManager::process_drop_player_message() bVar2 = *nameEnd; nameEnd = nameEnd + 1; } while (bVar2 != 0); - ((std::string *)((char *)&nameText))->std::string::assign(profileName,(int)nameEnd - (int)(profileName + 1)) + ((std::string *)((char *)&nameText))->std::string::assign(profileName,GHIDRA_INT(nameEnd) - GHIDRA_INT((profileName + 1))) ; - ehState._0_1_ = 0xc; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xc; puVar6 = ((std::string *)((char *)&nameText))->std::string::append((byte *)" RECEIVED A KICK VOTE",0x15); kickVoteText = (byte *******)*puVar6; kickVoteTextSize = puVar6[4]; @@ -3631,7 +3631,7 @@ void NetplayManager::process_drop_player_message() puVar6[4] = 0; puVar6[5] = 0xf; *(undefined1 *)puVar6 = 0; - ehState._0_1_ = 0xd; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xd; chatLineSize = 0; textBuffer = (byte *******)&kickVoteText; if (0xf < kickVoteTextCapacity) { @@ -3639,47 +3639,47 @@ void NetplayManager::process_drop_player_message() } chatLineCapacity = 0xf; chatLine[0] = (void *)0x0; - uStack_98 = CONCAT44((byte *)((int)textBuffer + 1),(undefined4)uStack_98); + uStack_98 = CONCAT44((byte *)(GHIDRA_INT(textBuffer) + 1),(undefined4)uStack_98); textEnd = textBuffer; do { bVar2 = *(byte *)textEnd; - textEnd = (byte *******)((int)textEnd + 1); + textEnd = (byte *******)(GHIDRA_INT(textEnd) + 1); } while (bVar2 != 0); - uVar7 = (int)textEnd - ((int)textBuffer + 1); + uVar7 = GHIDRA_INT(textEnd) - (GHIDRA_INT(textBuffer) + 1); ((std::string *)((char *)chatLine))->std::string::assign((byte *)textBuffer,uVar7); - ehState._0_1_ = 0xe; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xe; FUN_00428b60(chatLine,0x6e,textBuffer,uVar7); - ehState._0_1_ = 0xd; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xd; if (0xf < chatLineCapacity) { uVar7 = chatLineCapacity + 1; freeBlock = chatLine[0]; if (0xfff < uVar7) { - freeBlock = *(void **)((int)chatLine[0] + -4); + freeBlock = *(void **)(GHIDRA_INT(chatLine[0]) + -4); uVar7 = chatLineCapacity + 0x24; - if (0x1f < (uint)((int)chatLine[0] + (-4 - (int)freeBlock))) goto LAB_0091061f; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(chatLine[0]) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_0091061f; } operator_delete(freeBlock,uVar7); } - ehState._0_1_ = 0xc; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xc; if (0xf < kickVoteTextCapacity) { uVar7 = kickVoteTextCapacity + 1; textBuffer = kickVoteText; if (0xfff < uVar7) { textBuffer = (byte *******)kickVoteText[-1]; uVar7 = kickVoteTextCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)kickVoteText + (-4 - (int)textBuffer))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(kickVoteText) + (-4 - GHIDRA_INT(textBuffer)))) goto LAB_0091061f; } operator_delete(textBuffer,uVar7); } - ehState._0_1_ = 0xb; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xb; if (0xf < nameTextCapacity) { uVar7 = nameTextCapacity + 1; freeBlock = (void *)nameText; if (0xfff < uVar7) { - freeBlock = *(void **)((int)(void *)nameText + -4); + freeBlock = *(void **)(GHIDRA_INT((void *)nameText) + -4); uVar7 = nameTextCapacity + 0x24; - if (0x1f < (uint)((int)(void *)nameText + (-4 - (int)freeBlock))) goto LAB_0091061f; + if (0x1f < GHIDRA_UINT((GHIDRA_INT((void *)nameText) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_0091061f; } operator_delete(freeBlock,uVar7); } @@ -3691,19 +3691,19 @@ void NetplayManager::process_drop_player_message() nameText = nameText & 0xffffffffffffff00; targetChatProfile[0] = KAGE::System::UserProfileBase::vftable; } - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; local_90 = CONCAT44(&g_manager->_netplayManager,(undefined4)local_90); bVar2 = is_user_in_player_list(&g_manager->_netplayManager,*dropEntry); if (bVar2 == 0) { - uVar7 = local_90._4_4_[1] - *local_90._4_4_ >> 2; + uVar7 = (*(undefined4 *)((char *)&(local_90) + 0x4))[1] - *(*(undefined4 *)((char *)&(local_90) + 0x4)) >> 2; } else { - uVar7 = (local_90._4_4_[1] - *local_90._4_4_ >> 2) - 1; + uVar7 = ((*(undefined4 *)((char *)&(local_90) + 0x4))[1] - *(*(undefined4 *)((char *)&(local_90) + 0x4)) >> 2) - 1; } if (uVar7 <= *(uint *)((char *)dropEntry + 0xc)) { banProfile = KAGE::System::UserProfileBase::vftable; ((UserProfile *)(dropEntry))->UserProfile::find_or_create(); - ehState._0_1_ = 0xf; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xf; banProfile = KAGE::System::UserProfile::vftable; banProfileData = extraout_EAX_04; if (((extraout_EAX_04 != 0) && @@ -3711,12 +3711,12 @@ void NetplayManager::process_drop_player_message() (*(int *)(extraout_EAX_04 + 0x14) == 0)) { ((KAGE::System::UserProfile *)(&banProfile))->KAGE::System::UserProfile::load_steam_avatar(); } - ehState._0_1_ = 0x10; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x10; if (banProfileData == 0) { uStack_98 = 0; - uStack_98._4_4_ = 0; - uStack_98._0_4_ = 0; - uVar5 = uStack_98._4_4_; + (*(undefined4 *)((char *)&(uStack_98) + 0x4)) = 0; + (*(undefined4 *)((char *)&(uStack_98) + 0x0)) = 0; + uVar5 = (*(undefined4 *)((char *)&(uStack_98) + 0x4)); userIdLow = (undefined4)uStack_98; } else { @@ -3724,33 +3724,33 @@ void NetplayManager::process_drop_player_message() userIdLow = *(undefined4 *)(banProfileData + 8); } ban_user(userIdLow,uVar5); - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; banProfile = KAGE::System::UserProfileBase::vftable; banCheckProfile[0] = KAGE::System::UserProfileBase::vftable; ((UserProfile *)(dropEntry))->UserProfile::find_or_create(); - ehState._0_1_ = 0x11; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x11; banCheckProfile[0] = KAGE::System::UserProfile::vftable; if (((extraout_EAX_05 != 0) && (*(int *)(extraout_EAX_05 + 8) != 0 || *(int *)(extraout_EAX_05 + 0xc) != 0)) && (*(int *)(extraout_EAX_05 + 0x14) == 0)) { ((KAGE::System::UserProfile *)(banCheckProfile))->KAGE::System::UserProfile::load_steam_avatar(); } - ehState._0_1_ = 0x12; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x12; uVar5 = 0x90fe2f; cVar1 = (*(code *)banCheckProfile[0][5])(); - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; banCheckProfile[0] = KAGE::System::UserProfileBase::vftable; if (cVar1 == '\0') { removeProfile[0] = KAGE::System::UserProfileBase::vftable; ((UserProfile *)(dropEntry))->UserProfile::find_or_create(); - ehState._0_1_ = 0x14; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x14; removeProfile[0] = KAGE::System::UserProfile::vftable; if (((extraout_EAX_06 != 0) && (*(int *)(extraout_EAX_06 + 8) != 0 || *(int *)(extraout_EAX_06 + 0xc) != 0)) && (*(int *)(extraout_EAX_06 + 0x14) == 0)) { ((KAGE::System::UserProfile *)(removeProfile))->KAGE::System::UserProfile::load_steam_avatar(); } - ehState = CONCAT31(ehState._1_3_,0x15); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),0x15); QueueRemovePlayer(removeProfile); removeProfile[0] = KAGE::System::UserProfileBase::vftable; } @@ -3762,16 +3762,16 @@ void NetplayManager::process_drop_player_message() acStack_34[10] = '\0'; acStack_34[0xb] = '\0'; nameText = 0x4552455720554f59; - ehState._0_1_ = 0x13; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x13; FUN_00428b60(&nameText,0x6e,userIdLow,uVar5); - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; if (0xf < nameTextCapacity) { uVar7 = nameTextCapacity + 1; freeBlock = (void *)nameText; if (0xfff < uVar7) { - freeBlock = *(void **)((int)(void *)nameText + -4); + freeBlock = *(void **)(GHIDRA_INT((void *)nameText) + -4); uVar7 = nameTextCapacity + 0x24; - if (0x1f < (uint)((int)(void *)nameText + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT((void *)nameText) + (-4 - GHIDRA_INT(freeBlock))))) { LAB_0091061f: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3794,18 +3794,18 @@ LAB_0091061f: offSenderProfile[0] = KAGE::System::UserProfileBase::vftable; logSenderIdLow = offSenderIdLow; ((UserProfile *)(&offSenderIdLow))->UserProfile::find_or_create(); - ehState._0_1_ = 0x16; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x16; offSenderProfile[0] = KAGE::System::UserProfile::vftable; if (((extraout_EAX_07 != 0) && (*(int *)(extraout_EAX_07 + 8) != 0 || *(int *)(extraout_EAX_07 + 0xc) != 0)) && (*(int *)(extraout_EAX_07 + 0x14) == 0)) { ((KAGE::System::UserProfile *)(offSenderProfile))->KAGE::System::UserProfile::load_steam_avatar(); } - ehState._0_1_ = 0x17; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x17; local_a4 = (*(code *)offSenderProfile[0][1])(); offTargetProfile = KAGE::System::UserProfileBase::vftable; ((UserProfile *)(dropEntry))->UserProfile::find_or_create(); - ehState._0_1_ = 0x18; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x18; offTargetProfile = KAGE::System::UserProfile::vftable; offTargetProfileData = extraout_EAX_08; if (((extraout_EAX_08 != 0) && @@ -3813,7 +3813,7 @@ LAB_0091061f: (*(int *)(extraout_EAX_08 + 0x14) == 0)) { ((KAGE::System::UserProfile *)(&offTargetProfile))->KAGE::System::UserProfile::load_steam_avatar(); } - ehState._0_1_ = 0x19; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x19; if (offTargetProfileData == 0) { local_90 = local_90 & 0xffffffff; local_a0 = 0; @@ -3824,14 +3824,14 @@ LAB_0091061f: } offTargetNameProfile[0] = KAGE::System::UserProfileBase::vftable; ((UserProfile *)(dropEntry))->UserProfile::find_or_create(); - ehState._0_1_ = 0x1a; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x1a; offTargetNameProfile[0] = KAGE::System::UserProfile::vftable; if (((extraout_EAX_09 != 0) && (*(int *)(extraout_EAX_09 + 8) != 0 || *(int *)(extraout_EAX_09 + 0xc) != 0)) && (*(int *)(extraout_EAX_09 + 0x14) == 0)) { ((KAGE::System::UserProfile *)(offTargetNameProfile))->KAGE::System::UserProfile::load_steam_avatar(); } - ehState = CONCAT31(ehState._1_3_,0x1b); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),0x1b); (*(code *)offTargetNameProfile[0][1])(); KAGE_LogMessage(1,(byte *) "[Frame: %d] Recieved eDropMessageType::MSG_DROP_OFF for player \"%s\" %llu from player \"%s\" %llu \n" @@ -3850,18 +3850,18 @@ LAB_0091061f: execSenderProfile[0] = KAGE::System::UserProfileBase::vftable; logSenderIdLow = execSenderIdLow; ((UserProfile *)(&execSenderIdLow))->UserProfile::find_or_create(); - ehState._0_1_ = 0x1c; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x1c; execSenderProfile[0] = KAGE::System::UserProfile::vftable; if (((extraout_EAX_10 != 0) && (*(int *)(extraout_EAX_10 + 8) != 0 || *(int *)(extraout_EAX_10 + 0xc) != 0)) && (*(int *)(extraout_EAX_10 + 0x14) == 0)) { ((KAGE::System::UserProfile *)(execSenderProfile))->KAGE::System::UserProfile::load_steam_avatar(); } - ehState._0_1_ = 0x1d; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x1d; local_a4 = (*(code *)execSenderProfile[0][1])(); execTargetProfile = KAGE::System::UserProfileBase::vftable; ((UserProfile *)(dropEntry))->UserProfile::find_or_create(); - ehState._0_1_ = 0x1e; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x1e; execTargetProfile = KAGE::System::UserProfile::vftable; execTargetProfileData = extraout_EAX_11; if (((extraout_EAX_11 != 0) && @@ -3869,7 +3869,7 @@ LAB_0091061f: (*(int *)(extraout_EAX_11 + 0x14) == 0)) { ((KAGE::System::UserProfile *)(&execTargetProfile))->KAGE::System::UserProfile::load_steam_avatar(); } - ehState._0_1_ = 0x1f; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x1f; if (execTargetProfileData == 0) { local_90 = local_90 & 0xffffffff; local_a0 = 0; @@ -3880,50 +3880,50 @@ LAB_0091061f: } execTargetNameProfile[0] = KAGE::System::UserProfileBase::vftable; ((UserProfile *)(dropEntry))->UserProfile::find_or_create(); - ehState._0_1_ = 0x20; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x20; execTargetNameProfile[0] = KAGE::System::UserProfile::vftable; if (((extraout_EAX_12 != 0) && (*(int *)(extraout_EAX_12 + 8) != 0 || *(int *)(extraout_EAX_12 + 0xc) != 0)) && (*(int *)(extraout_EAX_12 + 0x14) == 0)) { ((KAGE::System::UserProfile *)(execTargetNameProfile))->KAGE::System::UserProfile::load_steam_avatar(); } - ehState._0_1_ = 0x21; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x21; (*(code *)execTargetNameProfile[0][1])(); KAGE_LogMessage(1,(byte *) "[Frame: %d] Recieved eDropMessageType::MSG_DROP_EXECUTE for player \"%s\" %llu from player \"%s\" %llu \n" ); - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; execTargetNameProfile[0] = KAGE::System::UserProfileBase::vftable; execTargetProfile = KAGE::System::UserProfileBase::vftable; execSenderProfile[0] = KAGE::System::UserProfileBase::vftable; execCheckProfile[0] = KAGE::System::UserProfileBase::vftable; ((UserProfile *)(dropEntry))->UserProfile::find_or_create(); - ehState._0_1_ = 0x22; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x22; execCheckProfile[0] = KAGE::System::UserProfile::vftable; if (((extraout_EAX_13 != 0) && (*(int *)(extraout_EAX_13 + 8) != 0 || *(int *)(extraout_EAX_13 + 0xc) != 0)) && (*(int *)(extraout_EAX_13 + 0x14) == 0)) { ((KAGE::System::UserProfile *)(execCheckProfile))->KAGE::System::UserProfile::load_steam_avatar(); } - ehState._0_1_ = 0x23; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x23; cVar1 = (*(code *)execCheckProfile[0][5])(); - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; iVar8 = *(int *)((char *)dropEntry + 4); - unused1 = (int)*dropEntry; + unused1 = GHIDRA_INT(*dropEntry); execCheckProfile[0] = KAGE::System::UserProfileBase::vftable; if (cVar1 == '\0') { bVar2 = is_user_in_player_list(dropEntry,*dropEntry); if (bVar2 != 0) { kickedChatProfile[0] = KAGE::System::UserProfileBase::vftable; ((UserProfile *)(dropEntry))->UserProfile::find_or_create(); - ehState._0_1_ = 0x24; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x24; kickedChatProfile[0] = KAGE::System::UserProfile::vftable; if (((extraout_EAX_14 != 0) && (*(int *)(extraout_EAX_14 + 8) != 0 || *(int *)(extraout_EAX_14 + 0xc) != 0)) && (*(int *)(extraout_EAX_14 + 0x14) == 0)) { ((KAGE::System::UserProfile *)(kickedChatProfile))->KAGE::System::UserProfile::load_steam_avatar(); } - ehState._0_1_ = 0x25; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x25; profileName = (byte *)(*(code *)kickedChatProfile[0][1])(); acStack_34[8] = '\0'; acStack_34[9] = '\0'; @@ -3937,9 +3937,9 @@ LAB_0091061f: bVar2 = *nameEnd; nameEnd = nameEnd + 1; } while (bVar2 != 0); - ((std::string *)((char *)&nameText))->std::string::assign(profileName,(int)nameEnd - (int)(profileName + 1)) + ((std::string *)((char *)&nameText))->std::string::assign(profileName,GHIDRA_INT(nameEnd) - GHIDRA_INT((profileName + 1))) ; - ehState._0_1_ = 0x26; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x26; puVar6 = ((std::string *)((char *)&nameText))->std::string::append((byte *)" WAS KICKED",0xb); kickedText = (byte *******)*puVar6; kickedTextSize = puVar6[4]; @@ -3950,7 +3950,7 @@ LAB_0091061f: puVar6[4] = 0; puVar6[5] = 0xf; *(undefined1 *)puVar6 = 0; - ehState._0_1_ = 0x27; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x27; chatLineSize = 0; textBuffer = (byte *******)&kickedText; if (0xf < kickedTextCapacity) { @@ -3958,51 +3958,51 @@ LAB_0091061f: } chatLineCapacity = 0xf; chatLine[0] = (void *)0x0; - uStack_98 = CONCAT44((byte *)((int)textBuffer + 1),(undefined4)uStack_98); + uStack_98 = CONCAT44((byte *)(GHIDRA_INT(textBuffer) + 1),(undefined4)uStack_98); textEnd = textBuffer; do { bVar2 = *(byte *)textEnd; - textEnd = (byte *******)((int)textEnd + 1); + textEnd = (byte *******)(GHIDRA_INT(textEnd) + 1); } while (bVar2 != 0); - uVar7 = (int)textEnd - ((int)textBuffer + 1); + uVar7 = GHIDRA_INT(textEnd) - (GHIDRA_INT(textBuffer) + 1); ((std::string *)((char *)chatLine))->std::string::assign((byte *)textBuffer,uVar7); - ehState._0_1_ = 0x28; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x28; FUN_00428b60(chatLine,0x6e,textBuffer,uVar7); - ehState._0_1_ = 0x27; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x27; if (0xf < chatLineCapacity) { uVar7 = chatLineCapacity + 1; freeBlock = chatLine[0]; if (0xfff < uVar7) { - freeBlock = *(void **)((int)chatLine[0] + -4); + freeBlock = *(void **)(GHIDRA_INT(chatLine[0]) + -4); uVar7 = chatLineCapacity + 0x24; - if (0x1f < (uint)((int)chatLine[0] + (-4 - (int)freeBlock))) goto LAB_0091061f; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(chatLine[0]) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_0091061f; } operator_delete(freeBlock,uVar7); } - ehState._0_1_ = 0x26; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x26; if (0xf < kickedTextCapacity) { uVar7 = kickedTextCapacity + 1; textBuffer = kickedText; if (0xfff < uVar7) { textBuffer = (byte *******)kickedText[-1]; uVar7 = kickedTextCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)kickedText + (-4 - (int)textBuffer))) + if ((byte *)0x1f < (byte *)(GHIDRA_INT(kickedText) + (-4 - GHIDRA_INT(textBuffer)))) goto LAB_0091061f; } operator_delete(textBuffer,uVar7); } - ehState._0_1_ = 0x25; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0x25; if (0xf < nameTextCapacity) { uVar7 = nameTextCapacity + 1; freeBlock = (void *)nameText; if (0xfff < uVar7) { - freeBlock = *(void **)((int)(void *)nameText + -4); + freeBlock = *(void **)(GHIDRA_INT((void *)nameText) + -4); uVar7 = nameTextCapacity + 0x24; - if (0x1f < (uint)((int)(void *)nameText + (-4 - (int)freeBlock))) goto LAB_0091061f; + if (0x1f < GHIDRA_UINT((GHIDRA_INT((void *)nameText) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_0091061f; } operator_delete(freeBlock,uVar7); } - ehState = CONCAT31(ehState._1_3_,1); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),1); kickedIdLow = (undefined4)*dropEntry; kickedIdHigh = *(undefined4 *)((char *)dropEntry + 4); kickedChatProfile[0] = KAGE::System::UserProfileBase::vftable; @@ -4072,10 +4072,10 @@ void NetplayManager::update_status_messages() Manager *manager; PlayerManager *players; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); puStack_18 = &LAB_00b09795; local_1c = ExceptionList; - uVar4 = __security_cookie ^ (int)register0x00000010 - 0x10U; + uVar4 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; netplay = in_ECX; while( true ) { @@ -4135,16 +4135,16 @@ void NetplayManager::update_status_messages() lVar2 = (uVar8 >> 0x20) * 0xd7b634db; lVar3 = (uVar8 >> 0x20) * 0x431bde82; uVar8 = lVar2 + ((uVar8 & 0xffffffff) * 0xd7b634db >> 0x20); - uVar7 = (uint)(uVar8 >> 0x20); - _local_2c = CONCAT44((int)lVar3,(int)((ulonglong)lVar2 >> 0x20)); + uVar7 = GHIDRA_UINT((uVar8 >> 0x20)); + _local_2c = CONCAT44(GHIDRA_INT(lVar3),GHIDRA_INT(((ulonglong)lVar2 >> 0x20))); lVar1 = lVar1 + (uVar8 & 0xffffffff); local_30 = (undefined4)lVar1; - uVar4 = (uint)((ulonglong)lVar1 >> 0x20); + uVar4 = GHIDRA_UINT(((ulonglong)lVar1 >> 0x20)); lVar3 = lVar3 + (ulonglong)CONCAT14(CARRY4(uVar7,uVar4),uVar7 + uVar4); - uVar4 = (uint)((ulonglong)lVar3 >> 0x20); - uVar7 = (uint)lVar3 >> 0x12 | uVar4 * 0x4000; + uVar4 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); + uVar7 = GHIDRA_UINT(lVar3) >> 0x12 | uVar4 * 0x4000; if (((uVar4 >> 0x12) - *(int *)&(*(undefined1 *)((char *)&(netplay[0x1c]) + 0xac)) != - (uint)(uVar7 < *(uint *)&(*(undefined1 *)((char *)&(netplay[0x1c]) + 0xa8)))) || + GHIDRA_UINT((uVar7 < *(uint *)&(*(undefined1 *)((char *)&(netplay[0x1c]) + 0xa8))))) || (1000 < uVar7 - *(int *)&(*(undefined1 *)((char *)&(netplay[0x1c]) + 0xa8)))) { statusMessage = (undefined4 *)0x0; statusMessageRefCount = *(int **)&(*(undefined1 *)((char *)(g_manager) + 0x4b12c)); @@ -4169,11 +4169,11 @@ void NetplayManager::update_status_messages() uVar8 = GetTimeNs(); lVar1 = (uVar8 & 0xffffffff) * 0x431bde82; lVar2 = (uVar8 >> 0x20) * 0xd7b634db + ((uVar8 & 0xffffffff) * 0xd7b634db >> 0x20); - uVar7 = (uint)((ulonglong)lVar2 >> 0x20); - uVar4 = (int)((ulonglong)lVar1 >> 0x20) + (uint)CARRY4((uint)lVar1,(uint)lVar2); + uVar7 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); + uVar4 = GHIDRA_INT(((ulonglong)lVar1 >> 0x20)) + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar1),GHIDRA_UINT(lVar2))); lVar1 = (uVar8 >> 0x20) * 0x431bde82 + (ulonglong)CONCAT14(CARRY4(uVar7,uVar4),uVar7 + uVar4); - uVar4 = (uint)((ulonglong)lVar1 >> 0x20); - *(uint *)&(*(undefined1 *)((char *)&(netplay[0x1c]) + 0xa8)) = (uint)lVar1 >> 0x12 | uVar4 * 0x4000; + uVar4 = GHIDRA_UINT(((ulonglong)lVar1 >> 0x20)); + *(uint *)&(*(undefined1 *)((char *)&(netplay[0x1c]) + 0xa8)) = GHIDRA_UINT(lVar1) >> 0x12 | uVar4 * 0x4000; *(uint *)&(*(undefined1 *)((char *)&(netplay[0x1c]) + 0xac)) = uVar4 >> 0x12; } } @@ -4231,7 +4231,7 @@ byte NetplayManager::try_advance_frame() isReady = 1; local_28 = this; puVar2 = auStack_62 + 0x5e; - if ((int)this[1] - (int)NVar14 >> 2 != 0) { + if (GHIDRA_INT(this[1]) - GHIDRA_INT(NVar14) >> 2 != 0) { do { if (g_multiplayerService == (void *)0x0) { KAGE::SmartPointer::SmartPointer(auStack_62 + -10); @@ -4257,14 +4257,14 @@ byte NetplayManager::try_advance_frame() uVar11 = uVar11 + 1; NVar14 = *this; puVar2 = puStack_20; - } while (uVar11 < (uint)((int)this[1] - (int)NVar14 >> 2)); + } while (uVar11 < GHIDRA_UINT((GHIDRA_INT(this[1]) - GHIDRA_INT(NVar14) >> 2))); } puStack_20 = puVar2; - iVar12 = ((int)this[0x61c] - (int)this[0x61b]) / 0x18; + iVar12 = (GHIDRA_INT(this[0x61c]) - GHIDRA_INT(this[0x61b])) / 0x18; if (iVar12 == 0) { } else { - pNVar8 = (NetplayManager *)((int)this[0x61b] + 8); + pNVar8 = (NetplayManager *)(GHIDRA_INT(this[0x61b]) + 8); do { bVar4 = 0; if (*pNVar8 != this[3]) { @@ -4276,9 +4276,9 @@ byte NetplayManager::try_advance_frame() } while (iVar12 != 0); this = local_28; } - iVar12 = (int)this[0x61f] - (int)this[0x61e] >> 5; + iVar12 = GHIDRA_INT(this[0x61f]) - GHIDRA_INT(this[0x61e]) >> 5; if (iVar12 != 0) { - pNVar8 = (NetplayManager *)((int)this[0x61e] + 0x10); + pNVar8 = (NetplayManager *)(GHIDRA_INT(this[0x61e]) + 0x10); do { bVar4 = 0; if (*pNVar8 != this[3]) { @@ -4290,9 +4290,9 @@ byte NetplayManager::try_advance_frame() } while (iVar12 != 0); this = local_28; } - iVar12 = (int)this[0x622] - (int)this[0x621] >> 4; + iVar12 = GHIDRA_INT(this[0x622]) - GHIDRA_INT(this[0x621]) >> 4; if (iVar12 != 0) { - pNVar8 = (NetplayManager *)((int)this[0x621] + 0xc); + pNVar8 = (NetplayManager *)(GHIDRA_INT(this[0x621]) + 0xc); do { bVar4 = 0; if (*pNVar8 != this[3]) { @@ -4304,7 +4304,7 @@ byte NetplayManager::try_advance_frame() } while (iVar12 != 0); this = local_28; } - if ((this[0x472] != (NetplayManager)0x0) && ((uint)this[0x475] <= (uint)this[3])) { + if ((this[0x472] != (NetplayManager)0x0) && (GHIDRA_UINT(this[0x475]) <= GHIDRA_UINT(this[3]))) { ExceptionList = local_1c; return 0; } @@ -4315,13 +4315,13 @@ byte NetplayManager::try_advance_frame() *(undefined1 *)(this + 6) = 0; uVar11 = 0; NVar14 = *this; - if ((int)this[1] - (int)NVar14 >> 2 == 0) { + if (GHIDRA_INT(this[1]) - GHIDRA_INT(NVar14) >> 2 == 0) { LAB_00910f99: NVar14 = this[0xe]; - if ((uint)((int)this[4] * 2) < (uint)NVar14) { + if (GHIDRA_UINT((GHIDRA_INT(this[4]) * 2)) < GHIDRA_UINT(NVar14)) { do { pNVar8 = (NetplayManager *) - **(undefined4 **)((int)this[0xb] + ((int)this[0xc] - 1U & (uint)this[0xd]) * 4); + **(undefined4 **)(GHIDRA_INT(this[0xb]) + (GHIDRA_INT(this[0xc]) - 1U & GHIDRA_UINT(this[0xd])) * 4); local_28 = pNVar8; _Find_lower_bound<>(); if (((*(char *)((char *)local_50 + 0xd) == '\0') && @@ -4334,14 +4334,14 @@ LAB_00910f99: pqVar10 = &g_allocatedBytesNoHeap; } else { - pqVar10 = (qword *)((int)g_mainHeap + 0x30); + pqVar10 = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (iVar12 != 0) { uVar11 = *(uint *)(iVar12 + -4); qVar1 = *pqVar10; - *(uint *)pqVar10 = (uint)*pqVar10 - uVar11; + *(uint *)pqVar10 = GHIDRA_UINT(*pqVar10) - uVar11; *(uint *)((char *)pqVar10 + 4) = - *(uint *)((char *)pqVar10 + 4) - (uint)((uint)qVar1 < uVar11); + *(uint *)((char *)pqVar10 + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar11)); free((void *)(iVar12 + -4)); } local_14 = 0xffffffff; @@ -4351,31 +4351,31 @@ LAB_00910f99: std::map::erase(); NVar14 = this[0xe]; } - NVar14 = (NetplayManager)((int)NVar14 - 1); + NVar14 = (NetplayManager)(GHIDRA_INT(NVar14) - 1); this[0xe] = NVar14; if (NVar14 == (NetplayManager)0x0) { this[0xd] = (NetplayManager)0x0; } else { - this[0xd] = (NetplayManager)((int)this[0xd] + 1); + this[0xd] = (NetplayManager)(GHIDRA_INT(this[0xd]) + 1); } - } while ((uint)((int)this[4] * 2) < (uint)NVar14); + } while (GHIDRA_UINT((GHIDRA_INT(this[4]) * 2)) < GHIDRA_UINT(NVar14)); } save_frame_snapshot(this,0); game = g_game; if (((this[0x62c] != (NetplayManager)0x0 || this[0x62d] != (NetplayManager)0x0) && - (this[0x62d] == (NetplayManager)0x0)) && ((uint)this[0x62c] <= (uint)this[3])) { + (this[0x62d] == (NetplayManager)0x0)) && (GHIDRA_UINT(this[0x62c]) <= GHIDRA_UINT(this[3]))) { this[0x62c] = (NetplayManager)0x0; this[0x62d] = (NetplayManager)0x0; ((Game *)(game))->Game::End(1); } - this[3] = (NetplayManager)((int)this[3] + 1); + this[3] = (NetplayManager)(GHIDRA_INT(this[3]) + 1); ExceptionList = local_1c; return isReady; } LAB_00910b70: local_3c = *(int **)((char *)NVar14 + uVar11 * 4); - if (((uint)local_3c[2] & 1) == 0) { + if ((GHIDRA_UINT(local_3c[2]) & 1) == 0) { local_3c[0xe2] = 0; local_3c[0xe3] = 0; local_3c[0xe0] = 0; @@ -4388,13 +4388,13 @@ LAB_00910b70: else { inputState = FUN_00901190(); uVar13 = 0; - local_38._4_4_ = 0; + (*(undefined4 *)((char *)&(local_38) + 0x4)) = 0; local_38 = 0; - uVar15 = local_38._4_4_; + uVar15 = (*(undefined4 *)((char *)&(local_38) + 0x4)); do { iVar12 = FUN_00900f50(); if ((iVar12 != 0xff) && - (((uint)*(ushort *)(inputState + 4) & 1 << ((byte)iVar12 & 0x1f)) != 0)) { + ((GHIDRA_UINT(*(ushort *)(inputState + 4)) & 1 << ((byte)iVar12 & 0x1f)) != 0)) { uVar7 = 1 << (uVar13 & 0x1f); uVar9 = 0; if (0x1f < uVar13) { @@ -4404,35 +4404,35 @@ LAB_00910b70: if (0x3f < uVar13) { uVar9 = uVar7; } - local_38 = CONCAT44(local_38._4_4_ | uVar7,(undefined4)local_38); + local_38 = CONCAT44((*(undefined4 *)((char *)&(local_38) + 0x4)) | uVar7,(undefined4)local_38); uVar15 = uVar15 | uVar9; } uVar13 = uVar13 + 1; } while (uVar13 < 0x20); uVar13 = local_3c[0xe0]; - local_3c[0xe0] = local_38._4_4_; - local_3c[0xe2] = ~uVar13 & local_38._4_4_; + local_3c[0xe0] = (*(undefined4 *)((char *)&(local_38) + 0x4)); + local_3c[0xe2] = ~uVar13 & (*(undefined4 *)((char *)&(local_38) + 0x4)); local_3c[0xe3] = ~local_3c[0xe1] & uVar15; local_3c[0xe1] = uVar15; - local_3c[0xe4] = (int)((float)*(ushort *)(inputState + 6) / 32767.0 - 1.0); - local_3c[0xe5] = (int)((float)*(ushort *)(inputState + 8) / 32767.0 - 1.0); + local_3c[0xe4] = GHIDRA_INT(((float)*(ushort *)(inputState + 6) / 32767.0 - 1.0)); + local_3c[0xe5] = GHIDRA_INT(((float)*(ushort *)(inputState + 8) / 32767.0 - 1.0)); bVar16 = (*(byte *)(inputState + 0xf) & 2) == 0; if (bVar16) { - local_3c[0xe6] = (int)((float)*(ushort *)(inputState + 10) / 32767.0 - 1.0); + local_3c[0xe6] = GHIDRA_INT(((float)*(ushort *)(inputState + 10) / 32767.0 - 1.0)); fVar17 = (float)*(ushort *)(inputState + 0xc) / 32767.0 - 1.0; } else { - local_3c[0xe6] = (int)(float)(int)*(short *)(inputState + 10); - fVar17 = (float)(int)*(short *)(inputState + 0xc); + local_3c[0xe6] = GHIDRA_INT((float)GHIDRA_INT(*(short *)(inputState + 10))); + fVar17 = (float)GHIDRA_INT(*(short *)(inputState + 0xc)); } - local_3c[0xe7] = (int)fVar17; + local_3c[0xe7] = GHIDRA_INT(fVar17); *(bool *)(local_3c + 0xf5) = !bVar16; game = g_game; uVar15 = 0; iVar12 = local_3c[3]; - local_3c[0xf4] = (int)*(char *)(inputState + 0xf) & 1; + local_3c[0xf4] = GHIDRA_INT(*(char *)(inputState + 0xf)) & 1; piVar6 = (game->_playerManager)._playerList._begin; - uVar13 = (int)(game->_playerManager)._playerList._end - (int)piVar6 >> 2; + uVar13 = GHIDRA_INT((game->_playerManager)._playerList._end) - GHIDRA_INT(piVar6) >> 2; if (uVar13 != 0) { do { matchedPlayer = piVar6[uVar15]; @@ -4470,7 +4470,7 @@ LAB_00910daa: if (emoteId == '<') goto LAB_00910f7e; uVar15 = 0; piVar6 = (g_game->_playerManager)._playerList._begin; - uVar13 = (int)(g_game->_playerManager)._playerList._end - (int)piVar6 >> 2; + uVar13 = GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT(piVar6) >> 2; if (uVar13 != 0) { do { player = (Entity_Player *)*piVar6; @@ -4481,7 +4481,7 @@ LAB_00910daa: } player = (Entity_Player *)0x0; LAB_00910e26: - iVar12 = (int)emoteId; + iVar12 = GHIDRA_INT(emoteId); if (iVar12 != 0x15) { Player_stats_add(&g_game->_onlinePlayerStats,8,player,1.0); } @@ -4515,7 +4515,7 @@ LAB_00910ee9: bVar16 = bVar4 < (byte)*piVar6; if (bVar4 != (byte)*piVar6) { LAB_00910ed0: - uVar15 = -(uint)bVar16 | 1; + uVar15 = -GHIDRA_UINT(bVar16) | 1; goto LAB_00910ed5; } if (bVar4 == 0) break; @@ -4523,7 +4523,7 @@ LAB_00910ed0: bVar16 = bVar4 < *(byte *)((char *)piVar6 + 1); if (bVar4 != *(byte *)((char *)piVar6 + 1)) goto LAB_00910ed0; pbVar5 = pbVar5 + 2; - piVar6 = (int *)((int)piVar6 + 2); + piVar6 = (int *)(GHIDRA_INT(piVar6) + 2); } while (bVar4 != 0); uVar15 = 0; LAB_00910ed5: @@ -4538,7 +4538,7 @@ LAB_00910f7e: uVar11 = uVar11 + 1; NVar14 = *local_28; this = local_28; - if ((uint)((int)local_28[1] - (int)NVar14 >> 2) <= uVar11) goto LAB_00910f99; + if (GHIDRA_UINT((GHIDRA_INT(local_28[1]) - GHIDRA_INT(NVar14) >> 2)) <= uVar11) goto LAB_00910f99; goto LAB_00910b70; while( true ) { uVar15 = uVar15 + 1; @@ -4615,39 +4615,39 @@ void NetplayManager::update_player_removal() ehState = 0xffffffff; puStack_18 = &LAB_00b09828; savedExceptionList = ExceptionList; - stackCookie = __security_cookie ^ (uint)(local_34 + 0x24); + stackCookie = __security_cookie ^ GHIDRA_UINT((local_34 + 0x24)); ExceptionList = &savedExceptionList; self = (PlayerManager *)this; puStack_20 = local_34 + 0x30; - if ((int)this[1] - (int)*this >> 2 != 0) { + if (GHIDRA_INT(this[1]) - GHIDRA_INT(*this) >> 2 != 0) { NVar6 = this[0x616]; - uVar4 = (int)this[0x617] - (int)NVar6 >> 4; + uVar4 = GHIDRA_INT(this[0x617]) - GHIDRA_INT(NVar6) >> 4; local_5c = (NetplayManager *)(uVar4 - 1); puStack_20 = local_34 + 0x30; if (local_5c < uVar4) { - local_40 = (NetplayManager *)((int)local_5c * 0x10); + local_40 = (NetplayManager *)(GHIDRA_INT(local_5c) * 0x10); puStack_20 = local_34 + 0x30; do { - this_00 = (ulonglong *)((int)&(*(undefined1 *)((char *)(local_40) + 0x0)) + (int)NVar6); - uStack_68 = CONCAT44(&g_manager->_netplayManager,(int)uStack_68); + this_00 = (ulonglong *)(GHIDRA_INT(&(*(undefined1 *)((char *)(local_40) + 0x0))) + GHIDRA_INT(NVar6)); + uStack_68 = CONCAT44(&g_manager->_netplayManager,GHIDRA_INT(uStack_68)); isInPlayerList = is_user_in_player_list (&g_manager->_netplayManager, - CONCAT44(*(undefined4 *)((int)&(*(undefined1 *)((char *)&(local_40[1]) + 0x0)) + (int)NVar6), - (int)*this_00)); + CONCAT44(*(undefined4 *)(GHIDRA_INT(&(*(undefined1 *)((char *)&(local_40[1]) + 0x0))) + GHIDRA_INT(NVar6)), + GHIDRA_INT(*this_00))); if (isInPlayerList == 0) { - uVar4 = uStack_68._4_4_[1] - *uStack_68._4_4_ >> 2; + uVar4 = (*(undefined4 *)((char *)&(uStack_68) + 0x4))[1] - *(*(undefined4 *)((char *)&(uStack_68) + 0x4)) >> 2; } else { - uVar4 = (uStack_68._4_4_[1] - *uStack_68._4_4_ >> 2) - 1; + uVar4 = ((*(undefined4 *)((char *)&(uStack_68) + 0x4))[1] - *(*(undefined4 *)((char *)&(uStack_68) + 0x4)) >> 2) - 1; } if ((uVar4 <= *(uint *)((char *)this_00 + 0xc)) && (isInPlayerList = is_player_removal_queued(this,*this_00), isInPlayerList == 0)) { - local_50 = CONCAT44(local_50._4_4_,KAGE::System::UserProfileBase::vftable); + local_50 = CONCAT44((*(undefined4 *)((char *)&(local_50) + 0x4)),KAGE::System::UserProfileBase::vftable); ((UserProfile *)(this_00))->UserProfile::find_or_create(); ehState = 0; - local_50._0_4_ = KAGE::System::UserProfile::vftable; - local_50._4_4_ = (undefined1 *)extraout_EAX; + (*(undefined4 *)((char *)&(local_50) + 0x0)) = KAGE::System::UserProfile::vftable; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = (undefined1 *)extraout_EAX; if ((extraout_EAX != 0) && ((*(int *)(extraout_EAX + 8) != 0 || *(int *)(extraout_EAX + 0xc) != 0 && (*(int *)(extraout_EAX + 0x14) == 0)))) { @@ -4656,7 +4656,7 @@ void NetplayManager::update_player_removal() ehState = 1; cVar3 = (*(code *)((undefined **)local_50)[5])(); ehState = 0xffffffff; - local_50 = CONCAT44(local_50._4_4_,KAGE::System::UserProfileBase::vftable); + local_50 = CONCAT44((*(undefined4 *)((char *)&(local_50) + 0x4)),KAGE::System::UserProfileBase::vftable); if (cVar3 == '\0') { ban_user(); local_58 = KAGE::System::UserProfileBase::vftable; @@ -4677,7 +4677,7 @@ void NetplayManager::update_player_removal() } else { remove_drop_entry(this,*this_00); - if (1 < (uint)((int)this[1] - (int)*this >> 2)) { + if (1 < GHIDRA_UINT((GHIDRA_INT(this[1]) - GHIDRA_INT(*this) >> 2))) { builtin_strncpy(local_34," KIC",4); local_28 = 0xf; local_2c = 0xf; @@ -4690,9 +4690,9 @@ void NetplayManager::update_player_removal() uVar4 = local_28 + 1; pvVar7 = (void *)local_3c; if (0xfff < uVar4) { - pvVar7 = *(void **)((int)(void *)local_3c + -4); + pvVar7 = *(void **)(GHIDRA_INT((void *)local_3c) + -4); uVar4 = local_28 + 0x24; - if (0x1f < (uint)((int)(void *)local_3c + (-4 - (int)pvVar7))) goto LAB_00911409; + if (0x1f < GHIDRA_UINT((GHIDRA_INT((void *)local_3c) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_00911409; } operator_delete(pvVar7,uVar4); } @@ -4704,58 +4704,58 @@ void NetplayManager::update_player_removal() NVar6 = this[0x616]; local_5c = (NetplayManager *)&(*(undefined1 *)((char *)&(local_5c[-1]) + 0x3)); local_40 = local_40 + -4; - } while (local_5c < (undefined1 *)((int)this[0x617] - (int)NVar6 >> 4)); + } while (local_5c < (undefined1 *)(GHIDRA_INT(this[0x617]) - GHIDRA_INT(NVar6) >> 4)); } } local_40 = this + 0x61b; local_54 = (void *)0x0; - iVar10 = (int)this[0x61c] - (int)*local_40 >> 0x1f; - if (((int)this[0x61c] - (int)*local_40) / 0x18 + iVar10 != iVar10) { + iVar10 = GHIDRA_INT(this[0x61c]) - GHIDRA_INT(*local_40) >> 0x1f; + if ((GHIDRA_INT(this[0x61c]) - GHIDRA_INT(*local_40)) / 0x18 + iVar10 != iVar10) { iVar10 = 0; do { - if (*(int *)(iVar10 + (int)this[0x61b]) == 0) { - if (*(int *)(*(int *)(iVar10 + 4 + (int)this[0x61b]) + 0x374) == 0) { + if (*(int *)(iVar10 + GHIDRA_INT(this[0x61b])) == 0) { + if (*(int *)(*(int *)(iVar10 + 4 + GHIDRA_INT(this[0x61b])) + 0x374) == 0) { local_50 = 0; } send_remove_frame(); - local_50 = CONCAT44((int)this[0x61b] + iVar10,(undefined **)local_50); - local_5c = (NetplayManager *)((int)this[0x61b] + iVar10 + 0xc); + local_50 = CONCAT44(GHIDRA_INT(this[0x61b]) + iVar10,(undefined **)local_50); + local_5c = (NetplayManager *)(GHIDRA_INT(this[0x61b]) + iVar10 + 0xc); iVar5 = FUN_0090b070(); iVar5 = *(int *)(iVar5 + 0x374); if (iVar5 == 0) { local_70 = 0; senderIdHigh = local_70; - local_70._4_4_ = (NetplayManager *)0x0; - local_70._0_1_ = 0; - local_70._1_3_ = 0; - local_84 = (int *)local_70._4_4_; - removeMessage._16_4_ = (undefined4)local_70; + (*(undefined4 *)((char *)&(local_70) + 0x4)) = (NetplayManager *)0x0; + (*(undefined1 *)((char *)&(local_70) + 0x0)) = 0; + (*(undefined1 *)((char *)&(local_70) + 0x1)) = 0; + local_84 = (*(undefined4 *)((char *)&((int *)local_70) + 0x4)); + (*(undefined4 *)((char *)&(removeMessage) + 0x10)) = (undefined4)local_70; local_70 = senderIdHigh; } else { local_84 = *(int **)(iVar5 + 0xc); - removeMessage._16_4_ = *(undefined4 *)(iVar5 + 8); + (*(undefined4 *)((char *)&(removeMessage) + 0x10)) = *(undefined4 *)(iVar5 + 8); } - uStack_68 = CONCAT44(local_84,(int)uStack_68); - puVar1 = *(undefined4 **)((char *)local_50._4_4_ + 0x10); - if (puVar1 == *(undefined4 **)((char *)local_50._4_4_ + 0x14)) { + uStack_68 = CONCAT44(local_84,GHIDRA_INT(uStack_68)); + puVar1 = *(undefined4 **)((*(undefined4 *)((char *)&(GHIDRA_INT(local_50)) + 0x4)) + 0x10); + if (puVar1 == *(undefined4 **)((*(undefined4 *)((char *)&(GHIDRA_INT(local_50)) + 0x4)) + 0x14)) { std::vector<8byte>::_Emplace_reallocate(); } else { - *puVar1 = removeMessage._16_4_; + *puVar1 = (*(undefined4 *)((char *)&(removeMessage) + 0x10)); puVar1[1] = local_84; - local_5c[1] = (NetplayManager)((int)local_5c[1] + 8); + local_5c[1] = (NetplayManager)(GHIDRA_INT(local_5c[1]) + 8); } - latestFrameSrc = (NetplayManager *)((int)this[0x61b] + 8 + iVar10); - if ((uint)*latestFrameSrc < (uint)this[3]) { + latestFrameSrc = (NetplayManager *)(GHIDRA_INT(this[0x61b]) + 8 + iVar10); + if (GHIDRA_UINT(*latestFrameSrc) < GHIDRA_UINT(this[3])) { latestFrameSrc = this + 3; } - *(NetplayManager *)((int)this[0x61b] + 8 + iVar10) = *latestFrameSrc; - *(undefined4 *)((int)this[0x61b] + iVar10) = 1; + *(NetplayManager *)(GHIDRA_INT(this[0x61b]) + 8 + iVar10) = *latestFrameSrc; + *(undefined4 *)(GHIDRA_INT(this[0x61b]) + iVar10) = 1; } iVar10 = iVar10 + 0x18; - local_54 = (void *)((int)local_54 + 1); - } while (local_54 < (void *)(((int)local_40[1] - (int)*local_40) / 0x18)); + local_54 = (void *)(GHIDRA_INT(local_54) + 1); + } while (local_54 < (void *)((GHIDRA_INT(local_40[1]) - GHIDRA_INT(*local_40)) / 0x18)); } do { if (g_multiplayerService == (void *)0x0) { @@ -4774,11 +4774,11 @@ void NetplayManager::update_player_removal() cVar3 = isMessageReceived; } if (cVar3 == '\0') { - local_54 = *(void **)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x60)); - iVar10 = *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x5c)); + local_54 = *(void **)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x60)); + iVar10 = *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x5c)); uStack_68 = uStack_68 & 0xffffffff; - iVar5 = (int)local_54 - iVar10 >> 0x1f; - if (((int)local_54 - iVar10) / 0x18 + iVar5 == iVar5) goto LAB_00911aa4; + iVar5 = GHIDRA_INT(local_54) - iVar10 >> 0x1f; + if ((GHIDRA_INT(local_54) - iVar10) / 0x18 + iVar5 == iVar5) goto LAB_00911aa4; iVar5 = 0; local_70 = local_70 & 0xffffffff; break; @@ -4797,9 +4797,9 @@ void NetplayManager::update_player_removal() ehState = 7; piVar12 = (int *)0x0; local_50 = CONCAT44(local_5c,(undefined **)local_50); - uStack_68 = CONCAT44(message,(int)uStack_68); + uStack_68 = CONCAT44(message,GHIDRA_INT(uStack_68)); if ((((local_5c != (NetplayManager *)0x0) && - (cVar3 = (**(code **)((int)*local_5c + 4))(), cVar3 != '\0')) && (piVar12 != (int *)0x0)) + (cVar3 = (**(code **)(GHIDRA_INT(*local_5c) + 4))(), cVar3 != '\0')) && (piVar12 != (int *)0x0)) && ((cVar3 = (**(code **)(*piVar12 + 0xc))(), cVar3 != '\0' && (g_multiplayerRelease != (void *)0x0)))) { (*g_multiplayerRelease)(auStack_ba + -10); @@ -4812,36 +4812,36 @@ void NetplayManager::update_player_removal() "[FRAME: %d] Recieved eRemoveMessageType::MSG_REMOVE_FRAME from User(%llu), for User(%llu) \n" ); uVar11 = 0; - uVar4 = (*(int *)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x60)) - - *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x5c))) / 0x18; + uVar4 = (*(int *)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x60)) - + *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x5c))) / 0x18; local_50 = CONCAT44(uVar4,(undefined **)local_50); if (uVar4 != 0) { - piVar12 = (int *)(*(int *)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x5c)) + 4); + piVar12 = (int *)(*(int *)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x5c)) + 4); do { iVar10 = *(int *)(*piVar12 + 0x374); if (iVar10 == 0) { uStack_68 = 0; - uStack_68._4_4_ = (int *)0x0; - uStack_68._0_4_ = 0; - iVar5 = (int)uStack_68._4_4_; - iVar10 = (int)uStack_68; + (*(undefined4 *)((char *)&(uStack_68) + 0x4)) = (int *)0x0; + (*(undefined4 *)((char *)&(uStack_68) + 0x0)) = 0; + iVar5 = (*(undefined4 *)((char *)&(GHIDRA_INT(uStack_68)) + 0x4)); + iVar10 = GHIDRA_INT(uStack_68); } else { iVar5 = *(int *)(iVar10 + 0xc); iVar10 = *(int *)(iVar10 + 8); } - if ((iVar10 == (int)targetUserId) && (iVar5 == targetUserId._4_4_)) { + if ((iVar10 == GHIDRA_INT(targetUserId)) && (iVar5 == (*(undefined4 *)((char *)&(targetUserId) + 0x4)))) { iVar10 = uVar11 * 0x18; entryFrameSrc = (CoopJoinSlot *) - (*(int *)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x5c)) + 8 + iVar10); + (*(int *)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x5c)) + 8 + iVar10); latestFrameSrc = &removeMessage; - if ((uint)removeMessage._controllerIndex <= (uint)entryFrameSrc->_controllerIndex) { + if (GHIDRA_UINT(removeMessage._controllerIndex) <= GHIDRA_UINT(entryFrameSrc->_controllerIndex)) { latestFrameSrc = entryFrameSrc; } - *(int *)(iVar10 + 8 + *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x5c))) = + *(int *)(iVar10 + 8 + *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x5c))) = latestFrameSrc->_controllerIndex; - iVar10 = *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x5c)) + iVar10; + iVar10 = *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x5c)) + iVar10; senderIdHigh = *(undefined4 *)((char *)message + 4); local_50 = CONCAT44(senderIdHigh,(undefined **)local_50); puVar1 = *(undefined4 **)(iVar10 + 0x10); @@ -4853,15 +4853,15 @@ void NetplayManager::update_player_removal() puVar1[1] = senderIdHigh; *(int *)(iVar10 + 0x10) = *(int *)(iVar10 + 0x10) + 8; } - if (local_70._4_4_ == (NetplayManager *)0x0) goto LAB_0091189c; + if ((*(undefined4 *)((char *)&(local_70) + 0x4)) == (NetplayManager *)0x0) goto LAB_0091189c; goto LAB_00911863; } uVar11 = uVar11 + 1; piVar12 = piVar12 + 6; } while (uVar11 < uVar4); } - if (local_70._4_4_ != (NetplayManager *)0x0) { - local_3c = ZEXT48(local_70._4_4_) << 0x20; + if ((*(undefined4 *)((char *)&(local_70) + 0x4)) != (NetplayManager *)0x0) { + local_3c = ZEXT48((*(undefined4 *)((char *)&(local_70) + 0x4))) << 0x20; local_34[0] = '\0'; local_34[1] = '\0'; local_34[2] = '\0'; @@ -4870,31 +4870,31 @@ void NetplayManager::update_player_removal() local_2c = 0; uStack_68 = uStack_68 & 0xffffffff; local_28 = 0; - ehState = CONCAT31(ehState._1_3_,8); - puVar1 = *(undefined4 **)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x60)); - if (puVar1 == *(undefined4 **)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x64))) { + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),8); + puVar1 = *(undefined4 **)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x60)); + if (puVar1 == *(undefined4 **)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x64))) { FUN_00914ba0(); - uStack_68 = CONCAT44(local_28,(int)uStack_68); + uStack_68 = CONCAT44(local_28,GHIDRA_INT(uStack_68)); } else { *puVar1 = 0; - puVar1[1] = local_70._4_4_; + puVar1[1] = (*(undefined4 *)((char *)&(local_70) + 0x4)); puVar1[2] = 0; puVar1[3] = 0; puVar1[4] = 0; puVar1[5] = 0; - *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x60)) = - *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x60)) + 0x18; + *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x60)) = + *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x60)) + 0x18; } pvVar7 = local_30; latestFrameSrc = &removeMessage; - if ((uint)removeMessage._controllerIndex < - (uint)((PlayerManager *)this)->_coopSlots[0]._controllerIndex) { + if (GHIDRA_UINT(removeMessage._controllerIndex) < + GHIDRA_UINT(((PlayerManager *)this)->_coopSlots[0]._controllerIndex)) { latestFrameSrc = ((PlayerManager *)this)->_coopSlots; } - *(int *)(*(int *)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x60)) + -0x10) = + *(int *)(*(int *)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x60)) + -0x10) = latestFrameSrc->_controllerIndex; - iVar10 = *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x60)); + iVar10 = *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x60)); senderIdHigh = *(undefined4 *)((char *)message + 4); local_80 = *message; local_50 = CONCAT44(senderIdHigh,(undefined **)local_50); @@ -4907,14 +4907,14 @@ void NetplayManager::update_player_removal() puVar1[1] = senderIdHigh; *(int *)(iVar10 + -8) = *(int *)(iVar10 + -8) + 8; } - ehState = CONCAT31(ehState._1_3_,7); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),7); if (pvVar7 != (void *)0x0) { - uVar4 = ((int)uStack_68._4_4_ - (int)pvVar7 >> 3) * 8; + uVar4 = ((*(undefined4 *)((char *)&(GHIDRA_INT(uStack_68)) + 0x4)) - GHIDRA_INT(pvVar7) >> 3) * 8; ptr = pvVar7; if (0xfff < uVar4) { ptr = *(void **)((char *)pvVar7 + -4); uVar4 = uVar4 + 0x23; - if (0x1f < (uint)((int)pvVar7 + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar7) + (-4 - GHIDRA_INT(ptr))))) { LAB_00911409: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -4924,32 +4924,32 @@ LAB_00911409: } LAB_00911863: uVar4 = 0; - iVar10 = removeMessage._state - (int)local_54 >> 4; + iVar10 = removeMessage._state - GHIDRA_INT(local_54) >> 4; local_50 = CONCAT44(iVar10,(undefined **)local_50); if (iVar10 != 0) { - uStack_68 = CONCAT44((int)local_70._4_4_ + 0x3a0,(int)uStack_68); + uStack_68 = CONCAT44((*(undefined4 *)((char *)&(GHIDRA_INT(local_70)) + 0x4)) + 0x3a0,GHIDRA_INT(uStack_68)); do { FUN_00901070(); uVar4 = uVar4 + 1; this = (NetplayManager *)self; - } while (uVar4 < local_50._4_4_); + } while (uVar4 < (*(undefined4 *)((char *)&(local_50) + 0x4))); } } LAB_0091189c: - ehState = CONCAT31(ehState._1_3_,6); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),6); if (local_54 != (void *)0x0) { - uVar4 = (int)removeMessage._menuPosition - (int)local_54 & 0xfffffff0; + uVar4 = GHIDRA_INT(removeMessage._menuPosition) - GHIDRA_INT(local_54) & 0xfffffff0; pvVar7 = local_54; if (0xfff < uVar4) { - pvVar7 = *(void **)((int)local_54 - 4); + pvVar7 = *(void **)(GHIDRA_INT(local_54) - 4); uVar4 = uVar4 + 0x23; - if (0x1f < (uint)((int)local_54 + (-4 - (int)pvVar7))) goto LAB_00911409; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_54) + (-4 - GHIDRA_INT(pvVar7))))) goto LAB_00911409; } operator_delete(pvVar7,uVar4); } ehState = 9; if (((local_5c != (NetplayManager *)0x0) && - (cVar3 = (**(code **)((int)*local_5c + 0xc))(), cVar3 != '\0')) && + (cVar3 = (**(code **)(GHIDRA_INT(*local_5c) + 0xc))(), cVar3 != '\0')) && (g_multiplayerRelease != (void *)0x0)) { (*g_multiplayerRelease)(); } @@ -4966,7 +4966,7 @@ LAB_00911940: local_5c = *(NetplayManager **)(iVar5 + 8); local_40 = *(NetplayManager **)(iVar5 + 0xc); } - iVar5 = (int)local_54 - iVar10; + iVar5 = GHIDRA_INT(local_54) - iVar10; local_54 = (void *)0x0; iVar5 = iVar5 / 0x18; local_50 = CONCAT44(iVar5,(undefined **)local_50); @@ -4982,9 +4982,9 @@ LAB_00911a68: userImpl = *(int *)(*(int *)(iVar10 + 4) + 0x374); if (userImpl == 0) { local_80 = 0; - local_80._4_4_ = (NetplayManager *)0x0; - local_80._0_4_ = (NetplayManager *)0x0; - latestFrameSrc = local_80._4_4_; + (*(undefined4 *)((char *)&(local_80) + 0x4)) = (NetplayManager *)0x0; + (*(undefined4 *)((char *)&(local_80) + 0x0)) = (NetplayManager *)0x0; + latestFrameSrc = (*(undefined4 *)((char *)&(local_80) + 0x4)); pNVar9 = (NetplayManager *)local_80; } else { @@ -5000,19 +5000,19 @@ LAB_00911a68: this = (NetplayManager *)self; if (local_54 == (void *)0x0) goto LAB_00911c37; local_40 = (self->_playerList)._begin; - iVar10 = (int)(self->_playerList)._end - (int)local_40 >> 2; + iVar10 = GHIDRA_INT((self->_playerList)._end) - GHIDRA_INT(local_40) >> 2; local_50 = CONCAT44(iVar10,(undefined **)local_50); local_5c = (NetplayManager *)0x0; latestFrameSrc = (NetplayManager *)0x0; if (iVar10 != 0) { do { - iVar10 = *(int *)((int)*local_40 + 0x374); + iVar10 = *(int *)(GHIDRA_INT(*local_40) + 0x374); if (iVar10 == 0) { local_80 = 0; - local_80._4_4_ = (NetplayManager *)0x0; - local_80._0_4_ = (NetplayManager *)0x0; - iVar5 = (int)(NetplayManager *)local_80; - iVar10 = (int)local_80._4_4_; + (*(undefined4 *)((char *)&(local_80) + 0x4)) = (NetplayManager *)0x0; + (*(undefined4 *)((char *)&(local_80) + 0x0)) = (NetplayManager *)0x0; + iVar5 = GHIDRA_INT((NetplayManager *)local_80); + iVar10 = (*(undefined4 *)((char *)&(GHIDRA_INT(local_80)) + 0x4)); } else { iVar5 = *(int *)(iVar10 + 8); @@ -5022,7 +5022,7 @@ LAB_00911a68: if (isInPlayerList == 0) { uVar4 = 0; piVar12 = *(int **)((char *)local_54 + 0xc); - uVar11 = *(int *)((char *)local_54 + 0x10) - (int)piVar12 >> 3; + uVar11 = *(int *)((char *)local_54 + 0x10) - GHIDRA_INT(piVar12) >> 3; if (uVar11 == 0) { LAB_00911a65: this = (NetplayManager *)self; @@ -5036,35 +5036,35 @@ LAB_00911a65: } local_5c = (NetplayManager *)&(*(undefined1 *)((char *)(local_5c) + 0x1)); local_40 = local_40 + 1; - } while (local_5c < local_50._4_4_); + } while (local_5c < (*(undefined4 *)((char *)&(local_50) + 0x4))); latestFrameSrc = local_5c; } local_5c = latestFrameSrc; this = (NetplayManager *)self; - if (*(uint *)(*(int *)&(*(undefined1 *)((char *)&(self[0x1c]) + 0x5c)) + 8 + (int)local_70._4_4_) <= - (uint)self->_coopSlots[0]._controllerIndex) { - *(undefined4 *)(*(int *)&(*(undefined1 *)((char *)&(self[0x1c]) + 0x5c)) + (int)local_70._4_4_) = 2; + if (*(uint *)(*(int *)&(*(undefined1 *)((char *)&(self[0x1c]) + 0x5c)) + 8 + (*(undefined4 *)((char *)&(GHIDRA_INT(local_70)) + 0x4))) <= + GHIDRA_UINT(self->_coopSlots[0]._controllerIndex)) { + *(undefined4 *)(*(int *)&(*(undefined1 *)((char *)&(self[0x1c]) + 0x5c)) + (*(undefined4 *)((char *)&(GHIDRA_INT(local_70)) + 0x4))) = 2; } } - local_54 = *(void **)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x60)); - iVar5 = (int)local_70._4_4_ + 0x18; - iVar10 = *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x5c)); - uVar4 = (int)uStack_68._4_4_ + 1; - uStack_68 = CONCAT44(uVar4,(int)uStack_68); + local_54 = *(void **)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x60)); + iVar5 = (*(undefined4 *)((char *)&(GHIDRA_INT(local_70)) + 0x4)) + 0x18; + iVar10 = *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x5c)); + uVar4 = (*(undefined4 *)((char *)&(GHIDRA_INT(uStack_68)) + 0x4)) + 1; + uStack_68 = CONCAT44(uVar4,GHIDRA_INT(uStack_68)); local_70 = CONCAT44(iVar5,(undefined4)local_70); - if ((uint)(((int)local_54 - iVar10) / 0x18) <= uVar4) { + if (GHIDRA_UINT(((GHIDRA_INT(local_54) - iVar10) / 0x18)) <= uVar4) { LAB_00911aa4: - uVar11 = ((int)local_54 - iVar10) / 0x18; + uVar11 = (GHIDRA_INT(local_54) - iVar10) / 0x18; uVar4 = uVar11 - 1; - uStack_68 = CONCAT44(uVar4,(int)uStack_68); + uStack_68 = CONCAT44(uVar4,GHIDRA_INT(uStack_68)); if (uVar4 < uVar11) { local_54 = (void *)(uVar4 * 0x18); do { - if (*(int *)(iVar10 + (int)local_54) == 2) { - RemoveRemotePlayer(this,(void *)(*(int *)(iVar10 + (int)local_54 + 4) + 0x370)); + if (*(int *)(iVar10 + GHIDRA_INT(local_54)) == 2) { + RemoveRemotePlayer(this,(void *)(*(int *)(iVar10 + GHIDRA_INT(local_54) + 4) + 0x370)); local_40 = (NetplayManager *) - (*(int *)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x5c)) + (int)local_54); - pNVar9 = *(NetplayManager **)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x60)); + (*(int *)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x5c)) + GHIDRA_INT(local_54)); + pNVar9 = *(NetplayManager **)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x60)); latestFrameSrc = local_40 + 6; local_50 = CONCAT44(latestFrameSrc,(undefined **)local_50); local_5c = pNVar9; @@ -5079,16 +5079,16 @@ LAB_00911aa4: if (dstField != srcField) { std::vector::_Tidy(); dstField[-2] = srcField[-2]; - local_70._4_4_[-1] = srcField[-1]; - *local_70._4_4_ = *srcField; + (*(undefined4 *)((char *)&(local_70) + 0x4))[-1] = srcField[-1]; + *(*(undefined4 *)((char *)&(local_70) + 0x4)) = *srcField; srcField[-2] = (NetplayManager)0x0; srcField[-1] = (NetplayManager)0x0; *srcField = (NetplayManager)0x0; - dstField = local_70._4_4_; + dstField = (*(undefined4 *)((char *)&(local_70) + 0x4)); pNVar9 = local_5c; } local_40 = local_40 + 6; - latestFrameSrc = (NetplayManager *)((int)local_50._4_4_ + 0x18); + latestFrameSrc = (NetplayManager *)((*(undefined4 *)((char *)&(GHIDRA_INT(local_50)) + 0x4)) + 0x18); dstField = dstField + 6; local_50 = CONCAT44(latestFrameSrc,(undefined **)local_50); srcField = srcField + 6; @@ -5097,16 +5097,16 @@ LAB_00911aa4: this = (NetplayManager *)self; } std::vector::_Tidy(); - *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x60)) = - *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x60)) + -0x18; - uVar4 = (uint)uStack_68._4_4_; + *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x60)) = + *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x60)) + -0x18; + uVar4 = (*(undefined4 *)((char *)&(GHIDRA_UINT(uStack_68)) + 0x4)); } - local_54 = (void *)((int)local_54 + -0x18); - iVar10 = *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x5c)); + local_54 = (void *)(GHIDRA_INT(local_54) + -0x18); + iVar10 = *(int *)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x5c)); uVar4 = uVar4 - 1; - uStack_68 = CONCAT44(uVar4,(int)uStack_68); - } while (uVar4 < (uint)((*(int *)&(*(undefined1 *)((char *)(((PlayerManager *)((int)this + 0x1810))) + 0x60)) - iVar10 - ) / 0x18)); + uStack_68 = CONCAT44(uVar4,GHIDRA_INT(uStack_68)); + } while (uVar4 < GHIDRA_UINT(((*(int *)&(*(undefined1 *)((char *)(((PlayerManager *)(GHIDRA_INT(this) + 0x1810))) + 0x60)) - iVar10 + ) / 0x18))); } ExceptionList = savedExceptionList; return; @@ -5168,30 +5168,30 @@ void NetplayManager::update_revives() local_14 = 0xffffffff; puStack_18 = &LAB_00b0987d; local_1c = ExceptionList; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); - uVar2 = __security_cookie ^ (uint)(newRevive + 0x20); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); + uVar2 = __security_cookie ^ GHIDRA_UINT((newRevive + 0x20)); ExceptionList = &local_1c; netplayManager = (PlayerManager *)this; NVar9 = this[0x61e]; pNVar5 = this + 0x61e; local_30 = (NetplayManager)0x0; reviveQueue = pNVar5; - if ((int)this[0x61f] - (int)NVar9 >> 5 != 0) { + if (GHIDRA_INT(this[0x61f]) - GHIDRA_INT(NVar9) >> 5 != 0) { iVar11 = 0; do { - if (*(int *)(iVar11 + (int)NVar9) == 0) { + if (*(int *)(iVar11 + GHIDRA_INT(NVar9)) == 0) { local_4c = (NetplayManager) (netplayManager->_coopSlots[0]._playerType + netplayManager->_coopSlots[0]._controllerIndex); - entryFramePtr = (NetplayManager *)((int)NVar9 + 0x10 + iVar11); + entryFramePtr = (NetplayManager *)(GHIDRA_INT(NVar9) + 0x10 + iVar11); pNVar5 = &local_4c; - if ((uint)local_4c <= (uint)*entryFramePtr) { + if (GHIDRA_UINT(local_4c) <= GHIDRA_UINT(*entryFramePtr)) { pNVar5 = entryFramePtr; } - reviveMessage = *(undefined4 *)(iVar11 + 8 + (int)NVar9); + reviveMessage = *(undefined4 *)(iVar11 + 8 + GHIDRA_INT(NVar9)); local_4c = *pNVar5; - reviveUserIdHigh = *(undefined4 *)(iVar11 + 0xc + (int)NVar9); - local_68 = CONCAT44(local_68._4_4_,local_4c); + reviveUserIdHigh = *(undefined4 *)(iVar11 + 0xc + GHIDRA_INT(NVar9)); + local_68 = CONCAT44((*(undefined4 *)((char *)&(local_68) + 0x4)),local_4c); if (g_multiplayerService == (void *)0x0) { KAGE_LogMessage(0x10,(byte *) "Attempting to create a message when there is no multiplayer service\n" @@ -5211,15 +5211,15 @@ void NetplayManager::update_revives() (*g_multiplayerRelease)(&local_40); } local_14 = 0xffffffff; - queueEntry = (int)*reviveQueue + iVar11; + queueEntry = GHIDRA_INT(*reviveQueue) + iVar11; iVar3 = FUN_0090b070(); iVar3 = *(int *)(iVar3 + 0x374); if (iVar3 == 0) { local_48 = 0; - local_48._4_4_ = (uint *)0x0; - local_48._0_4_ = 0; + (*(undefined4 *)((char *)&(local_48) + 0x4)) = (uint *)0x0; + (*(undefined4 *)((char *)&(local_48) + 0x0)) = 0; local_38 = (undefined4)local_48; - local_34 = (int *)local_48._4_4_; + local_34 = (*(undefined4 *)((char *)&((int *)local_48) + 0x4)); } else { local_38 = *(undefined4 *)(iVar3 + 8); @@ -5234,14 +5234,14 @@ void NetplayManager::update_revives() puVar1[1] = local_34; *(int *)(queueEntry + 0x18) = *(int *)(queueEntry + 0x18) + 8; } - *(NetplayManager *)((int)*reviveQueue + 0x10 + iVar11) = local_4c; - *(undefined4 *)((int)*reviveQueue + iVar11) = 1; + *(NetplayManager *)(GHIDRA_INT(*reviveQueue) + 0x10 + iVar11) = local_4c; + *(undefined4 *)(GHIDRA_INT(*reviveQueue) + iVar11) = 1; pNVar5 = reviveQueue; } - local_30 = (NetplayManager)((int)local_30 + 1); + local_30 = (NetplayManager)(GHIDRA_INT(local_30) + 1); NVar9 = *pNVar5; iVar11 = iVar11 + 0x20; - } while ((uint)local_30 < (uint)((int)pNVar5[1] - (int)NVar9 >> 5)); + } while (GHIDRA_UINT(local_30) < GHIDRA_UINT((GHIDRA_INT(pNVar5[1]) - GHIDRA_INT(NVar9) >> 5))); } LAB_00911e30: pNVar5 = reviveQueue; @@ -5264,8 +5264,8 @@ LAB_00911e30: } NVar9 = local_40; local_14 = 3; - senderUserId._0_4_ = *(NetplayManager *)local_40; - senderUserId._4_4_ = *(NetplayManager *)((char *)local_40 + 4); + (*(undefined4 *)((char *)&(senderUserId) + 0x0)) = *(NetplayManager *)local_40; + (*(undefined4 *)((char *)&(senderUserId) + 0x4)) = *(NetplayManager *)((char *)local_40 + 4); player = ((PlayerManager *)(netplayManager))->PlayerManager::get_player_by_user_id(&senderUserId); if (player != (Entity_Player *)0x0) { local_4c = NVar9; @@ -5282,7 +5282,7 @@ LAB_00911e30: piVar4 = local_2c; NVar9 = *pNVar5; local_30 = (NetplayManager)0x0; - local_4c = (NetplayManager)((int)pNVar5[1] - (int)NVar9 >> 5); + local_4c = (NetplayManager)(GHIDRA_INT(pNVar5[1]) - GHIDRA_INT(NVar9) >> 5); if (local_4c != (NetplayManager)0x0) { do { if ((*(int *)((char *)NVar9 + 8) == *local_2c) && @@ -5290,16 +5290,16 @@ LAB_00911e30: if (NVar9 != (NetplayManager)0x0) { NVar7 = (NetplayManager)0x0; pNVar5 = *(NetplayManager **)((char *)NVar9 + 0x14); - local_4c = (NetplayManager)(*(int *)((char *)NVar9 + 0x18) - (int)pNVar5 >> 3); + local_4c = (NetplayManager)(*(int *)((char *)NVar9 + 0x18) - GHIDRA_INT(pNVar5) >> 3); if (local_4c == (NetplayManager)0x0) goto LAB_00912059; local_30 = *(NetplayManager *)local_40; goto LAB_00912042; } break; } - local_30 = (NetplayManager)((int)local_30 + 1); - NVar9 = (NetplayManager)((int)NVar9 + 0x20); - } while ((uint)local_30 < (uint)local_4c); + local_30 = (NetplayManager)(GHIDRA_INT(local_30) + 1); + NVar9 = (NetplayManager)(GHIDRA_INT(NVar9) + 0x20); + } while (GHIDRA_UINT(local_30) < GHIDRA_UINT(local_4c)); } KAGE_LogMessage(1,(byte *) "[FRAME: %d] - No pending revival found for user(%llu), creating one \n"); @@ -5310,7 +5310,7 @@ LAB_00911e30: pvStack_7c = (void *)0x0; uStack_78 = 0; iStack_74 = 0; - local_14 = CONCAT31(local_14._1_3_,4); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),4); local_68 = *(undefined8 *)local_40; std::vector<8byte>::_Emplace_reallocate(0,&local_68); iStack_80 = piVar4[2]; @@ -5324,16 +5324,16 @@ LAB_00911e30: puVar1[3] = iStack_84; puVar1[4] = iStack_80; FUN_00915d70(&pvStack_7c); - pNVar5[1] = (NetplayManager)((int)pNVar5[1] + 0x20); + pNVar5[1] = (NetplayManager)(GHIDRA_INT(pNVar5[1]) + 0x20); } - local_14 = CONCAT31(local_14._1_3_,3); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),3); if (pvStack_7c != (void *)0x0) { - uVar8 = (iStack_74 - (int)pvStack_7c >> 3) * 8; + uVar8 = (iStack_74 - GHIDRA_INT(pvStack_7c) >> 3) * 8; pvVar12 = pvStack_7c; if (0xfff < uVar8) { pvVar12 = *(void **)((char *)pvStack_7c + -4); uVar8 = uVar8 + 0x23; - if (0x1f < (uint)((int)pvStack_7c + (-4 - (int)pvVar12))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvStack_7c) + (-4 - GHIDRA_INT(pvVar12))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -5347,22 +5347,22 @@ LAB_00911e30: NVar9 = pNVar5[1]; NVar7 = *pNVar5; local_30 = (NetplayManager)0x0; - if ((int)NVar9 - (int)NVar7 >> 5 == 0) { + if (GHIDRA_INT(NVar9) - GHIDRA_INT(NVar7) >> 5 == 0) { LAB_009122d0: - uVar2 = (int)NVar9 - (int)NVar7 >> 5; + uVar2 = GHIDRA_INT(NVar9) - GHIDRA_INT(NVar7) >> 5; local_30 = (NetplayManager)(uVar2 - 1); - if ((uint)local_30 < uVar2) { - local_2c = (int *)((int)local_30 * 0x20); + if (GHIDRA_UINT(local_30) < uVar2) { + local_2c = (int *)(GHIDRA_INT(local_30) * 0x20); do { game = g_game; - if (*(int *)((char *)NVar7 + (int)local_2c) == 2) { + if (*(int *)((char *)NVar7 + GHIDRA_INT(local_2c)) == 2) { playerManager = &g_game->_playerManager; local_4c = (NetplayManager)playerManager; player = PlayerManager::get_player_by_user_id - (netplayManager,(ulonglong *)((int)local_2c + 8 + (int)NVar7)); + (netplayManager,(ulonglong *)(GHIDRA_INT(local_2c) + 8 + GHIDRA_INT(NVar7))); uVar2 = 0; piVar4 = (playerManager->_playerList)._begin; - uVar8 = (int)(game->_playerManager)._playerList._end - (int)piVar4 >> 2; + uVar8 = GHIDRA_INT((game->_playerManager)._playerList._end) - GHIDRA_INT(piVar4) >> 2; if (uVar8 != 0) { do { iVar11 = piVar4[uVar2]; @@ -5383,7 +5383,7 @@ LAB_00912346: uVar2 = 0xffffffff; LAB_00912357: PlayerManager::ReviveCoopPlayer(uVar2); - local_34 = (int *)((int)local_2c + *(int *)&(*(undefined1 *)((char *)&(netplayManager[0x1c]) + 0x68))); + local_34 = (int *)(GHIDRA_INT(local_2c) + *(int *)&(*(undefined1 *)((char *)&(netplayManager[0x1c]) + 0x68))); NVar9 = *(NetplayManager *)&(*(undefined1 *)((char *)&(netplayManager[0x1c]) + 0x6c)); local_4c = (NetplayManager)(local_34 + 8); local_3c = NVar9; @@ -5400,16 +5400,16 @@ LAB_00912357: if (piVar4 != piVar10) { std::vector::_Tidy(); piVar4[-2] = piVar10[-2]; - local_48._4_4_[-1] = piVar10[-1]; - *local_48._4_4_ = *piVar10; + (*(undefined4 *)((char *)&(local_48) + 0x4))[-1] = piVar10[-1]; + *(*(undefined4 *)((char *)&(local_48) + 0x4)) = *piVar10; piVar10[-2] = 0; piVar10[-1] = 0; *piVar10 = 0; - piVar4 = (int *)local_48._4_4_; + piVar4 = (*(undefined4 *)((char *)&((int *)local_48) + 0x4)); NVar9 = local_3c; } piVar4 = piVar4 + 8; - local_4c = (NetplayManager)((int)local_4c + 0x20); + local_4c = (NetplayManager)(GHIDRA_INT(local_4c) + 0x20); local_34 = local_34 + 8; local_48 = CONCAT44(piVar4,(undefined4)local_48); piVar10 = piVar10 + 8; @@ -5420,10 +5420,10 @@ LAB_00912357: *(int *)&(*(undefined1 *)((char *)&(playerManager[0x1c]) + 0x6c)) = *(int *)&(*(undefined1 *)((char *)&(playerManager[0x1c]) + 0x6c)) + -0x20; pNVar5 = reviveQueue; } - local_30 = (NetplayManager)((int)local_30 - 1); + local_30 = (NetplayManager)(GHIDRA_INT(local_30) - 1); NVar7 = *pNVar5; - local_2c = (int *)((int)local_2c + -0x20); - } while ((uint)local_30 < (uint)((int)pNVar5[1] - (int)NVar7 >> 5)); + local_2c = (int *)(GHIDRA_INT(local_2c) + -0x20); + } while (GHIDRA_UINT(local_30) < GHIDRA_UINT((GHIDRA_INT(pNVar5[1]) - GHIDRA_INT(NVar7) >> 5))); } ExceptionList = local_1c; return; @@ -5432,11 +5432,11 @@ LAB_00912357: LAB_00912180: piVar4 = local_2c; uVar8 = 0; - uVar2 = (int)NVar9 - (int)NVar7 >> 5; + uVar2 = GHIDRA_INT(NVar9) - GHIDRA_INT(NVar7) >> 5; NVar9 = NVar7; if (uVar2 != 0) { - local_4c = *(NetplayManager *)((int)((int)NVar7 + 8) + (int)local_2c); - iVar11 = *(int *)((int)((int)NVar7 + 0xc) + (int)local_2c); + local_4c = *(NetplayManager *)(GHIDRA_INT((GHIDRA_INT(NVar7) + 8)) + GHIDRA_INT(local_2c)); + iVar11 = *(int *)(GHIDRA_INT((GHIDRA_INT(NVar7) + 0xc)) + GHIDRA_INT(local_2c)); local_48 = CONCAT44(iVar11,(undefined4)local_48); local_3c = NVar7; do { @@ -5446,27 +5446,27 @@ LAB_00912180: if (NVar7 != (NetplayManager)0x0) { local_34 = (int *)0x0; playerListBegin = (NetplayManager)(netplayManager->_playerList)._begin; - piVar10 = (int *)((int)(netplayManager->_playerList)._end - (int)playerListBegin >> 2); + piVar10 = (int *)(GHIDRA_INT((netplayManager->_playerList)._end) - GHIDRA_INT(playerListBegin) >> 2); local_48 = CONCAT44(piVar10,(undefined4)local_48); local_3c = playerListBegin; if (piVar10 == (int *)0x0) goto LAB_00912262; local_4c = *(NetplayManager *)((char *)NVar7 + 0x14); - uVar2 = *(int *)((char *)NVar7 + 0x18) - (int)local_4c >> 3; + uVar2 = *(int *)((char *)NVar7 + 0x18) - GHIDRA_INT(local_4c) >> 3; goto LAB_00912202; } break; } uVar8 = uVar8 + 1; - NVar7 = (NetplayManager)((int)NVar7 + 0x20); + NVar7 = (NetplayManager)(GHIDRA_INT(NVar7) + 0x20); NVar9 = *(NetplayManager *)&(*(undefined1 *)((char *)&(netplayManager[0x1c]) + 0x68)); local_3c = NVar9; } while (uVar8 < uVar2); } goto LAB_00912283; while( true ) { - NVar7 = (NetplayManager)((int)NVar7 + 1); + NVar7 = (NetplayManager)(GHIDRA_INT(NVar7) + 1); pNVar5 = pNVar5 + 2; - if ((uint)local_4c <= (uint)NVar7) break; + if (GHIDRA_UINT(local_4c) <= GHIDRA_UINT(NVar7)) break; LAB_00912042: if ((*pNVar5 == local_30) && (pNVar5[1] == *(NetplayManager *)((char *)local_40 + 4))) { KAGE_LogMessage(8,(byte *) @@ -5478,20 +5478,20 @@ LAB_00912042: LAB_00912059: KAGE_LogMessage(1,(byte *) "[FRAME: %d] - Adding revival confirmation to existing pending revival \n"); - puVar6 = (uint *)((int)NVar9 + 0x10); - if (*(uint *)((char *)NVar9 + 0x10) < *local_48._4_4_) { - puVar6 = local_48._4_4_; + puVar6 = (uint *)(GHIDRA_INT(NVar9) + 0x10); + if (*(uint *)((char *)NVar9 + 0x10) < *(*(undefined4 *)((char *)&(local_48) + 0x4))) { + puVar6 = (*(undefined4 *)((char *)&(local_48) + 0x4)); } *(uint *)((char *)NVar9 + 0x10) = *puVar6; pNVar5 = *(NetplayManager **)((char *)NVar9 + 0x18); - confirmUserId._0_4_ = *(NetplayManager *)local_40; - confirmUserId._4_4_ = *(NetplayManager *)((char *)local_40 + 4); + (*(undefined4 *)((char *)&(confirmUserId) + 0x0)) = *(NetplayManager *)local_40; + (*(undefined4 *)((char *)&(confirmUserId) + 0x4)) = *(NetplayManager *)((char *)local_40 + 4); if (pNVar5 == *(NetplayManager **)((char *)NVar9 + 0x1c)) { std::vector<8byte>::_Emplace_reallocate(pNVar5,&confirmUserId); } else { - *pNVar5 = confirmUserId._0_4_; - pNVar5[1] = confirmUserId._4_4_; + *pNVar5 = (*(undefined4 *)((char *)&(confirmUserId) + 0x0)); + pNVar5[1] = (*(undefined4 *)((char *)&(confirmUserId) + 0x4)); *(int *)((char *)NVar9 + 0x18) = *(int *)((char *)NVar9 + 0x18) + 8; } LAB_0091211f: @@ -5507,20 +5507,20 @@ LAB_0091211f: NVar9 = local_4c; while ((*(int *)NVar9 != iVar3 || (*(int *)((char *)NVar9 + 4) != iVar11))) { uVar8 = uVar8 + 1; - NVar9 = (NetplayManager)((int)NVar9 + 8); + NVar9 = (NetplayManager)(GHIDRA_INT(NVar9) + 8); if (uVar2 <= uVar8) goto LAB_00912241; } - local_34 = (int *)((int)local_34 + 1); - local_3c = (NetplayManager)((int)local_3c + 4); + local_34 = (int *)(GHIDRA_INT(local_34) + 1); + local_3c = (NetplayManager)(GHIDRA_INT(local_3c) + 4); if (piVar10 <= local_34) break; LAB_00912202: iVar11 = *(int *)(*(int *)local_3c + 0x374); if (iVar11 == 0) { local_68 = 0; - local_68._4_4_ = 0; - local_68._0_4_ = 0; - iVar3 = (int)local_68; - iVar11 = local_68._4_4_; + (*(undefined4 *)((char *)&(local_68) + 0x4)) = 0; + (*(undefined4 *)((char *)&(local_68) + 0x0)) = 0; + iVar3 = GHIDRA_INT(local_68); + iVar11 = (*(undefined4 *)((char *)&(local_68) + 0x4)); } else { iVar3 = *(int *)(iVar11 + 8); @@ -5536,24 +5536,24 @@ LAB_00912241: NVar9 = *reviveQueue; LAB_00912262: if (netplayManager->_coopSlots[0]._controllerIndex == - ((undefined4 *)((int)NVar9 + (int)local_2c))[4]) { - *(undefined4 *)((char *)NVar9 + (int)local_2c) = 2; + ((undefined4 *)(GHIDRA_INT(NVar9) + GHIDRA_INT(local_2c)))[4]) { + *(undefined4 *)((char *)NVar9 + GHIDRA_INT(local_2c)) = 2; } else { LAB_00912283: - if (*(uint *)((int)((int)NVar9 + 0x10) + (int)local_2c) < - (uint)netplayManager->_coopSlots[0]._controllerIndex) { + if (*(uint *)(GHIDRA_INT((GHIDRA_INT(NVar9) + 0x10)) + GHIDRA_INT(local_2c)) < + GHIDRA_UINT(netplayManager->_coopSlots[0]._controllerIndex)) { KAGE_LogMessage(8,(byte *) "[FRAME: %d] Revival Frame for User(%llu) has passed without being revived! (Revive Frame = %d) \n" ); } } - local_2c = (int *)((int)piVar4 + 0x20); - local_30 = (NetplayManager)((int)local_30 + 1); + local_2c = (int *)(GHIDRA_INT(piVar4) + 0x20); + local_30 = (NetplayManager)(GHIDRA_INT(local_30) + 1); NVar9 = reviveQueue[1]; NVar7 = *reviveQueue; pNVar5 = reviveQueue; - if ((uint)((int)NVar9 - (int)NVar7 >> 5) <= (uint)local_30) goto LAB_009122d0; + if (GHIDRA_UINT((GHIDRA_INT(NVar9) - GHIDRA_INT(NVar7) >> 5)) <= GHIDRA_UINT(local_30)) goto LAB_009122d0; goto LAB_00912180; } @@ -5571,26 +5571,26 @@ void NetplayManager::remove_drop_entry(ulonglong userId) nextEntry = this[0x616]; index = 0; - entryCount = (int)this[0x617] - (int)nextEntry >> 4; + entryCount = GHIDRA_INT(this[0x617]) - GHIDRA_INT(nextEntry) >> 4; if (entryCount != 0) { - while ((*(int *)nextEntry != (int)userId || - ((undefined4 *)*(int *)((char *)nextEntry + 4) != userId._4_4_))) { + while ((*(int *)nextEntry != GHIDRA_INT(userId) || + ((undefined4 *)*(int *)((char *)nextEntry + 4) != (*(undefined4 *)((char *)&(userId) + 0x4))))) { index = index + 1; - nextEntry = (NetplayManager)((int)nextEntry + 0x10); + nextEntry = (NetplayManager)(GHIDRA_INT(nextEntry) + 0x10); if (entryCount <= index) { return; } } entriesEnd = this[0x617]; - userId._4_4_ = (undefined4 *)((int)this[0x616] + index * 0x10); - nextEntry = (NetplayManager)(userId._4_4_ + 4); + (*(undefined4 *)((char *)&(userId) + 0x4)) = (undefined4 *)(GHIDRA_INT(this[0x616]) + index * 0x10); + nextEntry = (NetplayManager)((*(undefined4 *)((char *)&(userId) + 0x4)) + 4); if (nextEntry != entriesEnd) { - nextSet = userId._4_4_ + 6; - piVar2 = userId._4_4_ + 2; + nextSet = (*(undefined4 *)((char *)&(userId) + 0x4)) + 6; + piVar2 = (*(undefined4 *)((char *)&(userId) + 0x4)) + 2; do { userIdHigh = *(undefined4 *)((char *)nextEntry + 4); - *userId._4_4_ = *(undefined4 *)nextEntry; - userId._4_4_[1] = userIdHigh; + *(*(undefined4 *)((char *)&(userId) + 0x4)) = *(undefined4 *)nextEntry; + (*(undefined4 *)((char *)&(userId) + 0x4))[1] = userIdHigh; if (piVar2 != nextSet) { iVar1 = *piVar2; FID_conflict__Erase_tree_>_> @@ -5607,19 +5607,19 @@ void NetplayManager::remove_drop_entry(ulonglong userId) piVar2[1] = nextSet[1]; nextSet[1] = iVar1; } - userId._4_4_ = userId._4_4_ + 4; - nextEntry = (NetplayManager)((int)nextEntry + 0x10); + (*(undefined4 *)((char *)&(userId) + 0x4)) = (*(undefined4 *)((char *)&(userId) + 0x4)) + 4; + nextEntry = (NetplayManager)(GHIDRA_INT(nextEntry) + 0x10); nextSet = nextSet + 4; piVar2 = piVar2 + 4; } while (nextEntry != entriesEnd); entriesEnd = this[0x617]; } - piVar2 = (int *)((int)entriesEnd + -8); + piVar2 = (int *)(GHIDRA_INT(entriesEnd) + -8); FID_conflict__Erase_tree_>_> (piVar2,(fuzzer_allocator_> *)piVar2, *(_Tree_node **)(*piVar2 + 4)); operator_delete((void *)*piVar2,0x20); - this[0x617] = (NetplayManager)((int)this[0x617] + -0x10); + this[0x617] = (NetplayManager)(GHIDRA_INT(this[0x617]) + -0x10); } return; } @@ -5660,7 +5660,7 @@ void NetplayManager::receive_vote_end_message() puStack_20 = local_48 + 0x44; puStack_18 = &LAB_00b098b5; local_1c = ExceptionList; - uVar2 = __security_cookie ^ (uint)(local_48 + 0x38); + uVar2 = __security_cookie ^ GHIDRA_UINT((local_48 + 0x38)); ExceptionList = &local_1c; netplayManager = this; while (local_14 = 0xffffffff, g_multiplayerService != (void *)0x0) { @@ -5696,11 +5696,11 @@ void NetplayManager::receive_vote_end_message() } } local_14 = 0xffffffff; - entryCount = (int)this[0x622] - (int)this[0x621] >> 4; + entryCount = GHIDRA_INT(this[0x622]) - GHIDRA_INT(this[0x621]) >> 4; if (entryCount != 0) { local_28 = *this; local_24 = (void *)0x0; - local_2c = (void *)((int)this[1] - (int)local_28 >> 2); + local_2c = (void *)(GHIDRA_INT(this[1]) - GHIDRA_INT(local_28) >> 2); if (local_2c != (void *)0x0) { do { uVar2 = 0; @@ -5709,26 +5709,26 @@ void NetplayManager::receive_vote_end_message() while( true ) { if (iVar8 == 0) { local_50 = 0; - local_50._4_4_ = 0; - local_50._0_4_ = 0; - iVar4 = (int)local_50; - iVar5 = local_50._4_4_; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = 0; + (*(undefined4 *)((char *)&(local_50) + 0x0)) = 0; + iVar4 = GHIDRA_INT(local_50); + iVar5 = (*(undefined4 *)((char *)&(local_50) + 0x4)); } else { iVar4 = *(int *)(iVar8 + 8); iVar5 = *(int *)(iVar8 + 0xc); } if (((*(int *)NVar3 == iVar4) && (*(int *)((char *)NVar3 + 4) == iVar5)) && - ((uint)*(NetplayManager *)((char *)NVar3 + 0xc) <= (uint)netplayManager[3])) break; + (GHIDRA_UINT(*(NetplayManager *)((char *)NVar3 + 0xc)) <= GHIDRA_UINT(netplayManager[3]))) break; uVar2 = uVar2 + 1; - NVar3 = (NetplayManager)((int)NVar3 + 0x10); + NVar3 = (NetplayManager)(GHIDRA_INT(NVar3) + 0x10); if (entryCount <= uVar2) { ExceptionList = local_1c; return; } } - local_24 = (void *)((int)local_24 + 1); - local_28 = (NetplayManager)((int)local_28 + 4); + local_24 = (void *)(GHIDRA_INT(local_24) + 1); + local_28 = (NetplayManager)(GHIDRA_INT(local_28) + 4); } while (local_24 < local_2c); } game = g_game; @@ -5744,11 +5744,11 @@ void NetplayManager::receive_vote_end_message() missingProfilesCapacity = (undefined4 *)0x0; local_14 = 3; pvVar6 = *(void **)&(*(undefined1 *)((char *)&(g_manager[1]._gamestate) + 0x8dc)); - entryCount = *(int *)&(*(undefined1 *)((char *)&(g_manager[1]._gamestate) + 0x8e0)) - (int)pvVar6 >> 4; + entryCount = *(int *)&(*(undefined1 *)((char *)&(g_manager[1]._gamestate) + 0x8e0)) - GHIDRA_INT(pvVar6) >> 4; if (entryCount != 0) { iVar8 = 0; do { - profileEntry = (undefined4 *)((int)pvVar6 + iVar8); + profileEntry = (undefined4 *)(GHIDRA_INT(pvVar6) + iVar8); if (profileEntry[2] == 0) { if ((NetplayManager)profileEntry == local_28) { std::vector<8byte>::_Emplace_reallocate(profileEntry,profileEntry); @@ -5765,10 +5765,10 @@ void NetplayManager::receive_vote_end_message() } if (g_userProfile == (void *)0x0) { local_50 = 0; - local_50._4_4_ = 0; - local_50._0_4_ = 0; - iVar4 = local_50._4_4_; - iVar5 = (int)local_50; + (*(undefined4 *)((char *)&(local_50) + 0x4)) = 0; + (*(undefined4 *)((char *)&(local_50) + 0x0)) = 0; + iVar4 = (*(undefined4 *)((char *)&(local_50) + 0x4)); + iVar5 = GHIDRA_INT(local_50); } else { iVar4 = *(int *)((char *)g_userProfile + 0xc); @@ -5790,12 +5790,12 @@ void NetplayManager::receive_vote_end_message() NVar3 = (NetplayManager)missingProfilesCapacity; } if (missingProfiles != (void *)0x0) { - uVar2 = (int)NVar3 - (int)missingProfiles & 0xfffffff8; + uVar2 = GHIDRA_INT(NVar3) - GHIDRA_INT(missingProfiles) & 0xfffffff8; pvVar6 = missingProfiles; if (0xfff < uVar2) { pvVar6 = *(void **)((char *)missingProfiles + -4); uVar2 = uVar2 + 0x23; - if (0x1f < (uint)((int)missingProfiles + (-4 - (int)pvVar6))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(missingProfiles) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -5852,7 +5852,7 @@ void NetplayManager::update_lobby_stage_info() local_34 = KAGE::System::UserProfileBase::vftable; } ownerProfile = KAGE::System::UserProfile::vftable; - local_14 = CONCAT31(local_14._1_3_,2); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); isLobbyOwner = ((KAGE::System::UserProfile *)(&ownerProfile))->KAGE::System::UserProfile::is_local_user(); ownerProfile = KAGE::System::UserProfileBase::vftable; local_40 = KAGE::Network::Multiplayer::ConstLobby::vftable; @@ -5961,7 +5961,7 @@ void NetplayManager::send_remove_frame(undefined4 param_1, undefined4 param_2) local_14 = 0xffffffff; puStack_18 = &LAB_00b09c8d; local_1c = ExceptionList; - uVar4 = __security_cookie ^ (uint)(netMessage + 0x38); + uVar4 = __security_cookie ^ GHIDRA_UINT((netMessage + 0x38)); ExceptionList = &local_1c; ((KAGE::Filesys::BufferedStream *)(&local_80))->KAGE::Filesys::BufferedStream::BufferedStream(0); local_14 = 0; @@ -5980,13 +5980,13 @@ void NetplayManager::send_remove_frame(undefined4 param_1, undefined4 param_2) local_50 = (undefined4 *)0x0; local_34 = (undefined4 *)0x0; local_4c = (undefined4 *)0x0; - local_14 = CONCAT31(local_14._1_3_,1); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); if ((local_3c != (Entity_Player *)0x0) && (local_30 = *(float *)local_3c->_slowingAmount, (int *)local_30 != (int *)local_3c->_slowingAmount)) { do { if (entriesEnd == entriesCapacity) { - std::vector<16byte>::_Emplace_reallocate(entriesEnd,(undefined4 *)((int)local_30 + 0x14)); + std::vector<16byte>::_Emplace_reallocate(entriesEnd,(undefined4 *)(GHIDRA_INT(local_30) + 0x14)); local_28 = local_50; entriesCapacity = local_4c; } @@ -6011,7 +6011,7 @@ void NetplayManager::send_remove_frame(undefined4 param_1, undefined4 param_2) local_34 = entriesCapacity; } entriesCapacity = local_34; - local_28 = (undefined4 *)((int)entriesEnd - (int)local_2c >> 4); + local_28 = (undefined4 *)(GHIDRA_INT(entriesEnd) - GHIDRA_INT(local_2c) >> 4); entryCountByte = SUB41(local_28,0); local_54 = local_2c; (*(code *)streamWriter[7])(&entryCountByte,1,1); @@ -6021,9 +6021,9 @@ void NetplayManager::send_remove_frame(undefined4 param_1, undefined4 param_2) pvVar5 = local_2c; do { buffered_stream_write(&streamWriter,pvVar5,0x10,1); - pvVar5 = (void *)((int)pvVar5 + 0x10); - local_30 = (float)((int)local_30 + 1); - } while ((uint)local_30 < entriesEnd); + pvVar5 = (void *)(GHIDRA_INT(pvVar5) + 0x10); + local_30 = (float)(GHIDRA_INT(local_30) + 1); + } while (GHIDRA_UINT(local_30) < entriesEnd); entriesCapacity = local_34; } local_3c = local_7c; @@ -6037,24 +6037,24 @@ void NetplayManager::send_remove_frame(undefined4 param_1, undefined4 param_2) } messageRefCount = &DAT_00000006; message = local_3c; - NetConnection::send_message(g_multiplayerService,netMessage,1,pvVar5,(uint)local_3c,6); + NetConnection::send_message(g_multiplayerService,netMessage,1,pvVar5,GHIDRA_UINT(local_3c),6); manager = g_manager; - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; FUN_008ef1d0(netMessage); send_message(&manager->_netplayManager,8,message,messageRefCount); - local_14 = CONCAT31(local_14._1_3_,3); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),3); if (((netMessageRefCount != (int *)0x0) && (isLastRef = (**(code **)(*netMessageRefCount + 0xc))(), isLastRef != '\0')) && (g_multiplayerRelease != (void *)0x0)) { (*g_multiplayerRelease)(netMessage); } if (local_2c != (void *)0x0) { - uVar4 = (int)entriesCapacity - (int)local_2c & 0xfffffff0; + uVar4 = GHIDRA_INT(entriesCapacity) - GHIDRA_INT(local_2c) & 0xfffffff0; pvVar5 = local_2c; if (0xfff < uVar4) { pvVar5 = *(void **)((char *)local_2c + -4); uVar4 = uVar4 + 0x23; - if (0x1f < (uint)((int)local_2c + (-4 - (int)pvVar5))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_2c) + (-4 - GHIDRA_INT(pvVar5))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -6135,7 +6135,7 @@ void NetplayManager::process_lobby_messages() local_14[3] = 0xff; puStack_18 = &LAB_00b09d5f; local_1c = ExceptionList; - stackCookie = __security_cookie ^ (uint)(local_14 + 4); + stackCookie = __security_cookie ^ GHIDRA_UINT((local_14 + 4)); ExceptionList = &local_1c; cVar3 = FUN_00a29b10(0); if (cVar3 == '\0') { @@ -6171,10 +6171,10 @@ void NetplayManager::process_lobby_messages() pMVar8 = senderIdHigh; streamData = (void *)(*(int *)(**(int **)(puVar1 + 1) + 0x14) + 8); local_cc = (void *)0x0; - local_c4._0_1_ = 0; - local_c4._1_1_ = 0; - local_c4._2_1_ = 0; - local_c4._3_1_ = 0; + (*(undefined1 *)((char *)&(local_c4) + 0x0)) = 0; + (*(undefined1 *)((char *)&(local_c4) + 0x1)) = 0; + (*(undefined1 *)((char *)&(local_c4) + 0x2)) = 0; + (*(undefined1 *)((char *)&(local_c4) + 0x3)) = 0; local_b4 = 0; local_b8 = 0; local_bc = 0; @@ -6207,13 +6207,13 @@ void NetplayManager::process_lobby_messages() if (g_menuManager == (MenuManager *)0x0) { local_94 = g_manager; for (member = (g_manager->_lobbyMembers)._begin; member != (g_manager->_lobbyMembers)._end; - member = (void *)((int)member + 0x14)) { + member = (void *)(GHIDRA_INT(member) + 0x14)) { iVar6 = *(int *)((char *)member + 4); if (iVar6 == 0) { uStack_88 = 0; - uStack_88._4_4_ = (Manager *)0x0; - uStack_88._0_4_ = (Manager *)0x0; - pMVar8 = uStack_88._4_4_; + (*(undefined4 *)((char *)&(uStack_88) + 0x4)) = (Manager *)0x0; + (*(undefined4 *)((char *)&(uStack_88) + 0x0)) = (Manager *)0x0; + pMVar8 = (*(undefined4 *)((char *)&(uStack_88) + 0x4)); pMVar5 = (Manager *)uStack_88; } else { @@ -6229,7 +6229,7 @@ void NetplayManager::process_lobby_messages() KAGE_LogMessage(1,(byte *)"[Frame %d] Adding pending join for player %llu \n"); func_0x008e74a0(); local_14[0] = 4; - uStack_88._0_4_ = (Manager *)KAGE::System::UserProfileBase::vftable; + (*(undefined4 *)((char *)&(uStack_88) + 0x0)) = (Manager *)KAGE::System::UserProfileBase::vftable; ((UserProfile *)(&senderIdLow))->UserProfile::find_or_create(); local_14[0] = 5; uStack_88 = CONCAT44(extraout_EAX_00,KAGE::System::UserProfile::vftable); @@ -6239,7 +6239,7 @@ void NetplayManager::process_lobby_messages() *(int *)(extraout_EAX_00 + 8) != 0 || *(int *)(extraout_EAX_00 + 0xc) != 0)) && (iVar6 = extraout_EAX_00, *(int *)(extraout_EAX_00 + 0x14) == 0)) { ((KAGE::System::UserProfile *)(&uStack_88))->KAGE::System::UserProfile::load_steam_avatar(); - iVar6 = (int)uStack_88._4_4_; + iVar6 = (*(undefined4 *)((char *)&(GHIDRA_INT(uStack_88)) + 0x4)); } local_14[0] = 4; uVar4 = FUN_00949b90(); @@ -6258,7 +6258,7 @@ void NetplayManager::process_lobby_messages() local_14[0] = 6; uStack_88 = ZEXT48(&(*(undefined1 *)((char *)&(local_94[1]._gamestate) + 0x8bc))); pMVar8 = operator_new(0x30); - pMVar8->_currentSaveSlot = (int)senderIdLow; + pMVar8->_currentSaveSlot = GHIDRA_INT(senderIdLow); *(Manager **)&pMVar8->_persistentGameData = senderIdHigh; *(undefined4 *)&(*(undefined1 *)((char *)&((pMVar8->_persistentGameData)) + 0x8)) = 0; (pMVar8->_persistentGameData)._saveFile = KAGE::System::UserProfile::vftable; @@ -6267,11 +6267,11 @@ void NetplayManager::process_lobby_messages() *(undefined4 *)&(*(undefined1 *)((char *)&((pMVar8->_persistentGameData)) + 0x14)) = 5; *(Manager **)pMVar8 = pMVar5; *(Manager **)&(*(undefined1 *)((char *)(pMVar8) + 0x4)) = pMVar5; - pMVar8->_state = (int)pMVar5; + pMVar8->_state = GHIDRA_INT(pMVar5); *(undefined2 *)&pMVar8->_previousState = 0; pendingJoinNode = std::_Tree::_Insert_node - (&(*(undefined1 *)((char *)&(local_94[1]._gamestate) + 0x8bc)),pvStack_e4,(int)pMStack_e0,pMVar8); + (&(*(undefined1 *)((char *)&(local_94[1]._gamestate) + 0x8bc)),pvStack_e4,GHIDRA_INT(pMStack_e0),pMVar8); pMVar5 = pMStack_e0; } *(undefined1 *)((char *)pendingJoinNode + 0x20) = uStack_f0; @@ -6328,7 +6328,7 @@ void NetplayManager::process_lobby_messages() } FUN_00a296e0(replyMessage,1,iVar6,pMVar5,0); local_14[0] = 8; - uStack_88._0_4_ = (Manager *)KAGE::System::UserProfileBase::vftable; + (*(undefined4 *)((char *)&(uStack_88) + 0x0)) = (Manager *)KAGE::System::UserProfileBase::vftable; puVar7 = (undefined1 *)0x916d0c; ((UserProfile *)(&senderIdLow))->UserProfile::find_or_create(); local_14[0] = 9; @@ -6348,7 +6348,7 @@ void NetplayManager::process_lobby_messages() break; case '\x04': case '\x05': - pMStack_9c = (Manager *)CONCAT31(pMStack_9c._1_3_,*messageData == '\x04'); + pMStack_9c = (Manager *)CONCAT31((*(undefined1 *)((char *)&(pMStack_9c) + 0x1)),*messageData == '\x04'); if (g_menuManager == (MenuManager *)0x0) { pMVar5 = (Manager *)&stream; pMVar8 = pMStack_9c; @@ -6462,9 +6462,9 @@ void NetplayManager::load_game_start_packet(void *message, void *netplayState) local_8 = 0xffffffff; puStack_c = &LAB_00b09e13; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&local_74)[1]._rng._shift3; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&local_74)[1]._rng._shift3); ExceptionList = &local_10; - piVar1 = (int *)((int)message + 0x28); + piVar1 = (int *)(GHIDRA_INT(message) + 0x28); local_75 = 0; lobbyMembers = &g_manager->_lobbyMembers; local_c0 = message; @@ -6480,7 +6480,7 @@ void NetplayManager::load_game_start_packet(void *message, void *netplayState) member = lobbyMembers->_begin; } (manager->_lobbyMembers)._end = member; - for (local_7c = (uint)local_75; local_7c != 0; local_7c = local_7c - 1) { + for (local_7c = GHIDRA_UINT(local_75); local_7c != 0; local_7c = local_7c - 1) { local_dc = 0; profile = KAGE::System::UserProfile::vftable; local_d8 = 0; @@ -6492,7 +6492,7 @@ void NetplayManager::load_game_start_packet(void *message, void *netplayState) local_a4 = local_b4; tmpProfile = KAGE::System::UserProfileBase::vftable; ((UserProfile *)(&local_a4))->UserProfile::find_or_create(); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; tmpProfile = KAGE::System::UserProfile::vftable; local_8c = extraout_EAX; if (((extraout_EAX != 0) && @@ -6500,7 +6500,7 @@ void NetplayManager::load_game_start_packet(void *message, void *netplayState) (*(int *)(extraout_EAX + 0x14) == 0)) { ((KAGE::System::UserProfile *)(&tmpProfile))->KAGE::System::UserProfile::load_steam_avatar(); } - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; tmpProfile = KAGE::System::UserProfileBase::vftable; local_84 = 0; (**(code **)(*piVar1 + 0x14))(&local_84,4,1); @@ -6522,7 +6522,7 @@ void NetplayManager::load_game_start_packet(void *message, void *netplayState) vecEnd[3] = local_84; vecEnd[4] = local_88; ppvVar4 = &(manager->_lobbyMembers)._end; - *ppvVar4 = (void *)((int)*ppvVar4 + 0x14); + *ppvVar4 = (void *)(GHIDRA_INT(*ppvVar4) + 0x14); } local_8 = 0xffffffff; } @@ -6536,40 +6536,40 @@ void NetplayManager::load_game_start_packet(void *message, void *netplayState) (**(code **)(*piVar1 + 0x14))(&local_84,4,1); local_75 = 0; (**(code **)(*piVar1 + 0x14))(&local_75,1,1); - local_8c = (uint)local_75; + local_8c = GHIDRA_UINT(local_75); challenge = 0; (**(code **)(*piVar1 + 0x14))(&challenge,4,1); local_a4 = 0; (**(code **)(*piVar1 + 0x14))(&local_a4,8,1); entryCount = 0; (**(code **)(*piVar1 + 0x14))(&entryCount,8,1); - local_b4 = CONCAT44((int)entryCount,(undefined4)local_b4); - entryCountHigh = entryCount._4_4_; + local_b4 = CONCAT44(GHIDRA_INT(entryCount),(undefined4)local_b4); + entryCountHigh = (*(undefined4 *)((char *)&(entryCount) + 0x4)); entry = 0; - if ((entryCount._4_4_ != 0) || ((int)entryCount != 0)) { - entry._0_4_ = 0; + if (((*(undefined4 *)((char *)&(entryCount) + 0x4)) != 0) || (GHIDRA_INT(entryCount) != 0)) { + (*(undefined4 *)((char *)&(entry) + 0x0)) = 0; local_7c = 0; - i = (uint)entry; + i = GHIDRA_UINT(entry); do { manager = g_manager; entry = 0; (**(code **)(*piVar1 + 0x14))(&entry,8,1); vecEnd = *(undefined4 **)&(*(undefined1 *)((char *)&(manager[1]._persistentGameData) + 0x30)); - local_ec = (uint)entry; - local_e8 = entry._4_4_; + local_ec = GHIDRA_UINT(entry); + local_e8 = (*(undefined4 *)((char *)&(entry) + 0x4)); if (vecEnd == *(undefined4 **)&(*(undefined1 *)((char *)&(manager[1]._persistentGameData) + 0x34))) { std::vector<8byte>::_Emplace_reallocate(vecEnd,&local_ec); } else { - *vecEnd = (uint)entry; - vecEnd[1] = entry._4_4_; + *vecEnd = GHIDRA_UINT(entry); + vecEnd[1] = (*(undefined4 *)((char *)&(entry) + 0x4)); puVar2 = &(*(undefined1 *)((char *)&(manager[1]._persistentGameData) + 0x30)); *(int *)puVar2 = *(int *)puVar2 + 8; } bVar5 = 0xfffffffe < i; i = i + 1; local_7c = local_7c + bVar5; - } while ((local_7c < entryCountHigh) || ((local_7c <= entryCountHigh && (i < local_b4._4_4_)))); + } while ((local_7c < entryCountHigh) || ((local_7c <= entryCountHigh && (i < (*(undefined4 *)((char *)&(local_b4) + 0x4)))))); isCustomRun = isCustomRunSaved; } local_7c = 0; @@ -6593,7 +6593,7 @@ void NetplayManager::load_game_start_packet(void *message, void *netplayState) FID_conflict__Erase_tree_>_> (&local_74._seedEffects, (fuzzer_allocator_> *)&local_74._seedEffects, - *(_Tree_node **)((int)treeHead + 4)); + *(_Tree_node **)(GHIDRA_INT(treeHead) + 4)); *(void **)((char *)treeHead + 4) = treeHead; *(void **)treeHead = treeHead; *(void **)((char *)treeHead + 8) = treeHead; @@ -6607,7 +6607,7 @@ void NetplayManager::load_game_start_packet(void *message, void *netplayState) treeHead = *ppvVar4; FID_conflict__Erase_tree_>_> (ppvVar4,(fuzzer_allocator_> *)ppvVar4, - *(_Tree_node **)((int)treeHead + 4)); + *(_Tree_node **)(GHIDRA_INT(treeHead) + 4)); pMVar3 = g_manager; *(void **)((char *)treeHead + 4) = treeHead; *(void **)treeHead = treeHead; @@ -6617,7 +6617,7 @@ void NetplayManager::load_game_start_packet(void *message, void *netplayState) manager = g_manager; g_manager->_startDifficulty = local_8c; manager->_startChallenge = challenge; - *(undefined4 *)&(*(undefined1 *)((char *)&(manager[1]._persistentGameData) + 0xc)) = local_a4._4_4_; + *(undefined4 *)&(*(undefined1 *)((char *)&(manager[1]._persistentGameData) + 0xc)) = (*(undefined4 *)((char *)&(local_a4) + 0x4)); manager->_rerunAvailable = 0; *(undefined4 *)&(*(undefined1 *)((char *)&(manager[1]._persistentGameData) + 0x8)) = (undefined4)local_a4; reset(&manager->_netplayManager,0); @@ -6635,7 +6635,7 @@ void NetplayManager::load_game_start_packet(void *message, void *netplayState) FID_conflict__Erase_tree_>_> (&local_74._seedEffects, (fuzzer_allocator_> *)&local_74._seedEffects, - *(_Tree_node **)((int)local_74._seedEffects + 4)); + *(_Tree_node **)(GHIDRA_INT(local_74._seedEffects) + 4)); operator_delete(local_74._seedEffects,0x14); ExceptionList = local_10; return; @@ -6683,7 +6683,7 @@ void NetplayManager::write_player_game_states_message() local_8 = 0xffffffff; puStack_c = &LAB_00b09e9d; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; totalSize = 1; ((KAGE::Filesys::BufferedStream *)(&stream))->KAGE::Filesys::BufferedStream::BufferedStream(0); @@ -6704,7 +6704,7 @@ void NetplayManager::write_player_game_states_message() *)&playerStateNode); } while (playerStateNode != *(int *)&(*(undefined1 *)((char *)&(manager[1]._gamestate) + 0xc8))); } - if ((uint)(local_44 - local_4c) < totalSize) { + if (GHIDRA_UINT((local_44 - local_4c)) < totalSize) { if (0x7fffffff < totalSize) { /* WARNING: Subroutine does not return */ std::_Xlen(); @@ -6792,7 +6792,7 @@ void NetplayManager::write_player_game_states_message() } while (playerStateNode != *(int *)&(*(undefined1 *)((char *)&(manager[1]._gamestate) + 0xc8))); } piVar8 = streamSize; - pvVar7 = operator_new_tracked((uint)streamSize); + pvVar7 = operator_new_tracked(GHIDRA_UINT(streamSize)); iVar6 = local_4c; if (local_40 != 0) { iVar6 = local_40; @@ -6824,14 +6824,14 @@ void NetplayManager::write_player_game_states_message() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar2 = *(uint *)((char *)pvVar7 + -4); qVar1 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar1 < uVar2); - free((void *)((int)pvVar7 + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar2)); + free((void *)(GHIDRA_INT(pvVar7) + -4)); } local_30 = KAGE::Filesys::StreamBase::vftable; stream = KAGE::Filesys::BufferedStreamBase::vftable; @@ -6880,38 +6880,38 @@ void NetplayManager::read_player_game_states_message() ExceptionList = &local_10; local_28 = g_manager; readByte = 0; - (**(code **)((int)this[10] + 0x14)) - (&readByte,1,1,__security_cookie ^ (int)register0x00000010 - 4U); + (**(code **)(GHIDRA_INT(this[10]) + 0x14)) + (&readByte,1,1,__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); if (readByte != 7) { KAGE_LogMessage(0x10,(byte *)"Specified data is not a report player game states message\n"); } - local_1c = (ulonglong)(uint)local_1c; - (**(code **)((int)this[10] + 0x14))((int)&local_1c + 4,4,1); + local_1c = (ulonglong)GHIDRA_UINT(local_1c); + (**(code **)(GHIDRA_INT(this[10]) + 0x14))(GHIDRA_INT(&local_1c) + 4,4,1); shift = 1; - uVar4 = local_1c._4_4_ - 1; - uVar1 = local_1c._4_4_ >> 1; + uVar4 = (*(undefined4 *)((char *)&(local_1c) + 0x4)) - 1; + uVar1 = (*(undefined4 *)((char *)&(local_1c) + 0x4)) >> 1; while (uVar1 != 0) { uVar4 = uVar4 | uVar1; shift = shift + 1; - uVar1 = local_1c._4_4_ >> (shift & 0x1f); + uVar1 = (*(undefined4 *)((char *)&(local_1c) + 0x4)) >> (shift & 0x1f); } - local_1c._4_4_ = uVar4 + 1; + (*(undefined4 *)((char *)&(local_1c) + 0x4)) = uVar4 + 1; decompressBuffer = operator_new_tracked(uVar4 + 1); - iVar2 = (**(code **)((int)this[10] + 8))(); - iVar3 = (**(code **)((int)this[10] + 4))(); + iVar2 = (**(code **)(GHIDRA_INT(this[10]) + 8))(); + iVar3 = (**(code **)(GHIDRA_INT(this[10]) + 4))(); local_20 = iVar3 - iVar2; NVar5 = this[6]; if (NVar5 == (NetplayManager)0x0) { NVar5 = this[3]; } - iVar2 = (**(code **)((int)this[10] + 8))(); - buffer_decompress(decompressBuffer,local_1c._4_4_,(void *)(iVar2 + (int)NVar5),local_20); + iVar2 = (**(code **)(GHIDRA_INT(this[10]) + 8))(); + buffer_decompress(decompressBuffer,(*(undefined4 *)((char *)&(local_1c) + 0x4)),(void *)(iVar2 + GHIDRA_INT(NVar5)),local_20); stream = KAGE::Filesys::BufferedStream::vftable; local_8 = 0; readByte = 0; memory_stream_read(&stream,&readByte,1,1); manager = local_28; - uVar4 = (uint)readByte; + uVar4 = GHIDRA_UINT(readByte); local_28 = (Manager *)&(*(undefined1 *)((char *)&(local_28[1]._gamestate) + 0xc8)); iVar2 = *(int *)local_28; local_20 = uVar4; @@ -6928,14 +6928,14 @@ void NetplayManager::read_player_game_states_message() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar4 = *(uint *)((char *)decompressBuffer + -4); oldAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar4; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar4; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)oldAllocatedBytes < uVar4); - (*freeFn)((uint *)((int)decompressBuffer + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocatedBytes) < uVar4)); + (*freeFn)((uint *)(GHIDRA_INT(decompressBuffer) + -4)); } ExceptionList = local_10; return; @@ -6947,8 +6947,8 @@ void NetplayManager::read_player_game_states_message() else { (*(code *)stream[5])(&local_1c); } - peerIdLow = (uint)local_1c; - peerIdHigh = local_1c._4_4_; + peerIdLow = GHIDRA_UINT(local_1c); + peerIdHigh = (*(undefined4 *)((char *)&(local_1c) + 0x4)); peerState = (uint *)FUN_00913e50(&peerIdLow); readByte = 0; if ((code *)stream[5] == memory_stream_read) { @@ -6957,7 +6957,7 @@ void NetplayManager::read_player_game_states_message() else { (*(code *)stream[5])(&readByte); } - *peerState = (uint)readByte; + *peerState = GHIDRA_UINT(readByte); readByte = 0; if ((code *)stream[5] == memory_stream_read) { memory_stream_read(&stream,&readByte,1,1); @@ -6965,17 +6965,17 @@ void NetplayManager::read_player_game_states_message() else { (*(code *)stream[5])(&readByte); } - peerState[1] = (uint)readByte; + peerState[1] = GHIDRA_UINT(readByte); (**(code **)(peerState[2] + 4))(0,0xffffffff); local_1c = local_1c & 0xffffffff; if ((code *)stream[5] == memory_stream_read) { - memory_stream_read(&stream,(void *)((int)&local_1c + 4),2,1); + memory_stream_read(&stream,(void *)(GHIDRA_INT(&local_1c) + 4),2,1); } else { - (*(code *)stream[5])((int)&local_1c + 4); + (*(code *)stream[5])(GHIDRA_INT(&local_1c) + 4); } if ((short)(local_1c >> 0x20) != 0) { - uVar4 = local_1c._4_4_ & 0xffff; + uVar4 = (*(undefined4 *)((char *)&(local_1c) + 0x4)) & 0xffff; stateBlob = operator_new_tracked(uVar4); memory_stream_read(&stream,stateBlob,1,uVar4); (**(code **)(peerState[0xc] + 0x1c))(stateBlob,1,uVar4); @@ -6984,14 +6984,14 @@ void NetplayManager::read_player_game_states_message() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar4 = *(uint *)((char *)stateBlob + -4); oldAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar4; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar4; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)oldAllocatedBytes < uVar4); - free((void *)((int)stateBlob + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocatedBytes) < uVar4)); + free((void *)(GHIDRA_INT(stateBlob) + -4)); local_8 = local_8 & 0xffffff00; } } @@ -7002,7 +7002,7 @@ void NetplayManager::read_player_game_states_message() else { (*(code *)stream[5])(&readByte); } - peerState[0xd] = (uint)readByte; + peerState[0xd] = GHIDRA_UINT(readByte); readByte = 0; if ((code *)stream[5] == memory_stream_read) { memory_stream_read(&stream,&readByte,1,1); @@ -7010,17 +7010,17 @@ void NetplayManager::read_player_game_states_message() else { (*(code *)stream[5])(&readByte); } - peerState[0xe] = (uint)readByte; + peerState[0xe] = GHIDRA_UINT(readByte); (**(code **)(peerState[0xf] + 4))(0,0xffffffff); local_1c = local_1c & 0xffffffff; if ((code *)stream[5] == memory_stream_read) { - memory_stream_read(&stream,(void *)((int)&local_1c + 4),2,1); + memory_stream_read(&stream,(void *)(GHIDRA_INT(&local_1c) + 4),2,1); } else { - (*(code *)stream[5])((int)&local_1c + 4); + (*(code *)stream[5])(GHIDRA_INT(&local_1c) + 4); } if ((short)(local_1c >> 0x20) != 0) { - uVar4 = local_1c._4_4_ & 0xffff; + uVar4 = (*(undefined4 *)((char *)&(local_1c) + 0x4)) & 0xffff; stateBlob = operator_new_tracked(uVar4); memory_stream_read(&stream,stateBlob,1,uVar4); (**(code **)(peerState[0x19] + 0x1c))(stateBlob,1,uVar4); @@ -7029,14 +7029,14 @@ void NetplayManager::read_player_game_states_message() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar4 = *(uint *)((char *)stateBlob + -4); oldAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar4; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar4; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)oldAllocatedBytes < uVar4); - free((void *)((int)stateBlob + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocatedBytes) < uVar4)); + free((void *)(GHIDRA_INT(stateBlob) + -4)); local_8 = local_8 & 0xffffff00; } } @@ -7047,7 +7047,7 @@ void NetplayManager::read_player_game_states_message() else { (*(code *)stream[5])(&readByte); } - peerState[0x1a] = (uint)readByte; + peerState[0x1a] = GHIDRA_UINT(readByte); readByte = 0; if ((code *)stream[5] == memory_stream_read) { memory_stream_read(&stream,&readByte,1,1); @@ -7055,17 +7055,17 @@ void NetplayManager::read_player_game_states_message() else { (*(code *)stream[5])(&readByte); } - peerState[0x1b] = (uint)readByte; + peerState[0x1b] = GHIDRA_UINT(readByte); (**(code **)(peerState[0x1c] + 4))(0,0xffffffff); local_1c = local_1c & 0xffffffff; if ((code *)stream[5] == memory_stream_read) { - memory_stream_read(&stream,(void *)((int)&local_1c + 4),2,1); + memory_stream_read(&stream,(void *)(GHIDRA_INT(&local_1c) + 4),2,1); } else { - (*(code *)stream[5])((int)&local_1c + 4); + (*(code *)stream[5])(GHIDRA_INT(&local_1c) + 4); } if ((short)(local_1c >> 0x20) != 0) { - uVar4 = local_1c._4_4_ & 0xffff; + uVar4 = (*(undefined4 *)((char *)&(local_1c) + 0x4)) & 0xffff; stateBlob = operator_new_tracked(uVar4); memory_stream_read(&stream,stateBlob,1,uVar4); (**(code **)(peerState[0x26] + 0x1c))(stateBlob,1,uVar4); @@ -7074,14 +7074,14 @@ void NetplayManager::read_player_game_states_message() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar4 = *(uint *)((char *)stateBlob + -4); oldAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar4; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar4; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)oldAllocatedBytes < uVar4); - free((void *)((int)stateBlob + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocatedBytes) < uVar4)); + free((void *)(GHIDRA_INT(stateBlob) + -4)); local_8 = local_8 & 0xffffff00; } } @@ -7092,7 +7092,7 @@ void NetplayManager::read_player_game_states_message() else { (*(code *)stream[5])(&readByte); } - peerState[0x27] = (uint)readByte; + peerState[0x27] = GHIDRA_UINT(readByte); readByte = 0; if ((code *)stream[5] == memory_stream_read) { memory_stream_read(&stream,&readByte,1,1); @@ -7100,21 +7100,21 @@ void NetplayManager::read_player_game_states_message() else { (*(code *)stream[5])(&readByte); } - peerState[0x28] = (uint)readByte; + peerState[0x28] = GHIDRA_UINT(readByte); (**(code **)(peerState[0x29] + 4))(0,0xffffffff); - local_1c._4_4_ = 0; + (*(undefined4 *)((char *)&(local_1c) + 0x4)) = 0; if ((code *)stream[5] == memory_stream_read) { - memory_stream_read(&stream,(void *)((int)&local_1c + 4),2,1); + memory_stream_read(&stream,(void *)(GHIDRA_INT(&local_1c) + 4),2,1); } else { - (*(code *)stream[5])((int)&local_1c + 4); + (*(code *)stream[5])(GHIDRA_INT(&local_1c) + 4); } - if ((short)local_1c._4_4_ == 0) { + if ((*(undefined4 *)((char *)&((short)local_1c) + 0x4)) == 0) { LAB_009192e4: freeFn = free_exref; } else { - uVar4 = local_1c._4_4_ & 0xffff; + uVar4 = (*(undefined4 *)((char *)&(local_1c) + 0x4)) & 0xffff; stateBlob = operator_new_tracked(uVar4); memory_stream_read(&stream,stateBlob,1,uVar4); (**(code **)(peerState[0x33] + 0x1c))(stateBlob,1,uVar4); @@ -7123,15 +7123,15 @@ LAB_009192e4: allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar4 = *(uint *)((char *)stateBlob + -4); oldAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar4; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar4; freeFn = free_exref; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)oldAllocatedBytes < uVar4); - free((void *)((int)stateBlob + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocatedBytes) < uVar4)); + free((void *)(GHIDRA_INT(stateBlob) + -4)); local_8 = local_8 & 0xffffff00; } local_20 = local_20 - 1; @@ -7169,7 +7169,7 @@ void NetplayManager::load_mute_list() local_8 = (undefined4 ***)0xffffffff; puStack_c = &LAB_00af32ed; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(lineString + 10); + uVar2 = __security_cookie ^ GHIDRA_UINT((lineString + 10)); ExceptionList = &local_10; local_14 = uVar2; if (DAT_00c72620 == '\0') { @@ -7208,7 +7208,7 @@ void NetplayManager::load_mute_list() lineCursor = pcVar1; pcVar1 = lineCursor + 1; } while (*lineCursor != '\0'); - ((std::string *)((char *)lineString))->std::string::assign(&DAT_00c93a50,(uint)(lineCursor + -0xc93a50)); + ((std::string *)((char *)lineString))->std::string::assign(&DAT_00c93a50,GHIDRA_UINT((lineCursor + -0xc93a50))); local_8 = (undefined4 ***)0x0; errnoPtr = _errno(); ppppuVar4 = lineString; @@ -7237,7 +7237,7 @@ void NetplayManager::load_mute_list() if (0xfff < uVar2) { ppppuVar4 = (undefined4 ****)lineString[0][-1]; uVar2 = lineCapacity + 0x24; - if (0x1f < (uint)((int)lineString[0] + (-4 - (int)ppppuVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(lineString[0]) + (-4 - GHIDRA_INT(ppppuVar4))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -7246,7 +7246,7 @@ void NetplayManager::load_mute_list() } lineSize = 0; lineCapacity = 0xf; - lineString[0] = (undefined4 ****)((uint)lineString[0] & 0xffffff00); + lineString[0] = (undefined4 ****)(GHIDRA_UINT(lineString[0]) & 0xffffff00); pcVar5 = strchr_exref; } isEof = (**(code **)(*file + 0x10))(); @@ -7278,21 +7278,21 @@ void NetplayManager::update_text_popup() int message; int messageTimer; - local_8 = (std_string *)(__security_cookie ^ (uint)((int)&animName + 0x1cU)); + local_8 = (std_string *)(__security_cookie ^ GHIDRA_UINT((GHIDRA_INT(&animName) + 0x1cU))); bVar12 = false; if ((*(undefined1 *)((char *)&(this[0x47]) + 0x1)) != '\0') { ((AnimationState *)((AnimationState *)(this + 0x11)))->AnimationState::Update(); ((AnimationState *)((AnimationState *)(this + 0x19)))->AnimationState::Update(); } if (this[0x12] == (NetplayManager)0x0) { - animName._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(animName._buf) + 0x0)) = (std_string *)0x0; animName._capacity = 0xf; animName._size = 0; LAB_00923989: - psVar6 = (std_string *)animName._buf._0_4_; + psVar6 = (*(undefined4 *)((char *)&((std_string *)animName._buf) + 0x0)); psVar7 = &animName; if (0xf < animName._capacity) { - psVar7 = (std_string *)animName._buf._0_4_; + psVar7 = (*(undefined4 *)((char *)&((std_string *)animName._buf) + 0x0)); } bVar12 = true; bVar4 = str_eq((byte *)psVar7,animName._size,(byte *)"TextIn",6); @@ -7304,7 +7304,7 @@ LAB_00923989: ((std::string *)(animName._buf))->std::string::string((void *)this[0x12]); goto LAB_00923989; } - psVar6 = (std_string *)animName._buf._0_4_; + psVar6 = (*(undefined4 *)((char *)&((std_string *)animName._buf) + 0x0)); LAB_009239ae: bVar2 = false; } @@ -7314,7 +7314,7 @@ LAB_009239ae: if (0xfff < uVar8) { psVar7 = (std_string *)psVar6[-1]._capacity; uVar8 = animName._capacity + 0x24; - if ((byte *)0x1f < (byte *)((int)psVar6 + (-4 - (int)psVar7))) goto LAB_00923ac5; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(psVar6) + (-4 - GHIDRA_INT(psVar7)))) goto LAB_00923ac5; } operator_delete(psVar7,uVar8); } @@ -7332,14 +7332,14 @@ LAB_009239ae: bVar12 = bVar4 < (byte)*pcVar9; if (bVar4 != *pcVar9) { LAB_00923a30: - uVar8 = -(uint)bVar12 | 1; + uVar8 = -GHIDRA_UINT(bVar12) | 1; goto LAB_00923a35; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)NVar5 + 1); bVar12 = bVar4 < (byte)pcVar9[1]; if (bVar4 != pcVar9[1]) goto LAB_00923a30; - NVar5 = (NetplayManager)((int)NVar5 + 2); + NVar5 = (NetplayManager)(GHIDRA_INT(NVar5) + 2); pcVar9 = pcVar9 + 2; } while (bVar4 != 0); uVar8 = 0; @@ -7357,17 +7357,17 @@ LAB_00923a35: goto LAB_00923c61; } if (this[0x12] == (NetplayManager)0x0) { - animName._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(animName._buf) + 0x0)) = (std_string *)0x0; animName._capacity = 0xf; animName._size = 0; } else { ((std::string *)(animName._buf))->std::string::string((void *)this[0x12]); } - uVar3 = animName._buf._0_4_; + uVar3 = (*(undefined4 *)((char *)&(animName._buf) + 0x0)); psVar6 = &animName; if (0xf < animName._capacity) { - psVar6 = (std_string *)animName._buf._0_4_; + psVar6 = (*(undefined4 *)((char *)&((std_string *)animName._buf) + 0x0)); } bVar4 = str_eq((byte *)psVar6,animName._size,(byte *)"TextStay",8); if (0xf < animName._capacity) { @@ -7376,7 +7376,7 @@ LAB_00923a35: if (0xfff < uVar8) { psVar6 = (std_string *)((std_string *)(uVar3 + -0x18))->_capacity; uVar8 = animName._capacity + 0x24; - if ((byte *)0x1f < (byte *)(uVar3 + (-4 - (int)psVar6))) { + if ((byte *)0x1f < (byte *)(uVar3 + (-4 - GHIDRA_INT(psVar6)))) { LAB_00923ac5: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -7388,7 +7388,7 @@ LAB_00923ac5: NVar10 = this[2]; NVar5 = this[3]; NVar11 = this[1]; - message = *(int *)((char *)NVar11 + ((int)NVar10 - 1U & (uint)NVar5) * 4); + message = *(int *)((char *)NVar11 + (GHIDRA_INT(NVar10) - 1U & GHIDRA_UINT(NVar5)) * 4); messageTimer = *(int *)(message + 0x18); if (0 < messageTimer) { *(int *)(message + 0x18) = messageTimer + -1; @@ -7396,7 +7396,7 @@ LAB_00923ac5: NVar10 = this[2]; NVar11 = this[1]; } - if (0 < *(int *)(*(int *)((char *)NVar11 + ((int)NVar10 - 1U & (uint)NVar5) * 4) + 0x18)) { + if (0 < *(int *)(*(int *)((char *)NVar11 + (GHIDRA_INT(NVar10) - 1U & GHIDRA_UINT(NVar5)) * 4) + 0x18)) { return; } NVar10 = this[0x12]; @@ -7411,14 +7411,14 @@ LAB_00923ac5: bVar12 = bVar4 < (byte)*pcVar9; if (bVar4 != *pcVar9) { LAB_00923b50: - uVar8 = -(uint)bVar12 | 1; + uVar8 = -GHIDRA_UINT(bVar12) | 1; goto LAB_00923b55; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)NVar5 + 1); bVar12 = bVar4 < (byte)pcVar9[1]; if (bVar4 != pcVar9[1]) goto LAB_00923b50; - NVar5 = (NetplayManager)((int)NVar5 + 2); + NVar5 = (NetplayManager)(GHIDRA_INT(NVar5) + 2); pcVar9 = pcVar9 + 2; } while (bVar4 != 0); uVar8 = 0; @@ -7451,11 +7451,11 @@ LAB_00923bbc: } if ((bVar12) && (0xf < animName._capacity)) { uVar8 = animName._capacity + 1; - psVar6 = (std_string *)animName._buf._0_4_; + psVar6 = (*(undefined4 *)((char *)&((std_string *)animName._buf) + 0x0)); if (0xfff < uVar8) { - psVar6 = (std_string *)((std_string *)(animName._buf._0_4_ + -0x18))->_capacity; + psVar6 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(animName._buf) + 0x0)) + -0x18))->_capacity; uVar8 = animName._capacity + 0x24; - if ((byte *)0x1f < (byte *)(animName._buf._0_4_ + (-4 - (int)psVar6))) { + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(animName._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar6)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -7481,14 +7481,14 @@ LAB_00923bbc: bVar12 = bVar4 < (byte)*pcVar9; if (bVar4 != *pcVar9) { LAB_00923c47: - uVar8 = -(uint)bVar12 | 1; + uVar8 = -GHIDRA_UINT(bVar12) | 1; goto LAB_00923c4c; } if (bVar4 == 0) break; bVar4 = *(byte *)((char *)NVar5 + 1); bVar12 = bVar4 < (byte)pcVar9[1]; if (bVar4 != pcVar9[1]) goto LAB_00923c47; - NVar5 = (NetplayManager)((int)NVar5 + 2); + NVar5 = (NetplayManager)(GHIDRA_INT(NVar5) + 2); pcVar9 = pcVar9 + 2; } while (bVar4 != 0); uVar8 = 0; diff --git a/src/game/netplay_text_popup.cpp b/src/game/netplay_text_popup.cpp index c78a00d..ffcc98d 100644 --- a/src/game/netplay_text_popup.cpp +++ b/src/game/netplay_text_popup.cpp @@ -11,13 +11,13 @@ void NetplayTextPopup::destructor() puStack_c = &LAB_00af09f0; local_10 = ExceptionList; ExceptionList = &local_10; - clear(__security_cookie ^ (int)register0x00000010 - 4U); + clear(__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); local_8 = 0; - ((ANM2 *)((ANM2 *)((int)this + 0x14)))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)this + 100)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)this + 0x44)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)this + 0x2c)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)this + 0x14)))->std::string::_Tidy_deallocate(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x14)))->ANM2::Reset(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 100)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x44)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x2c)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x14)))->std::string::_Tidy_deallocate(); std::deque<36byte>::_Tidy(); ExceptionList = local_10; return; diff --git a/src/game/network_manager.cpp b/src/game/network_manager.cpp index 3b26d2f..5d71f45 100644 --- a/src/game/network_manager.cpp +++ b/src/game/network_manager.cpp @@ -34,7 +34,7 @@ void * NetworkManager::receive_message(void *outMessage, byte channel, byte isRe puStack_c = &LAB_00b1425e; local_10 = ExceptionList; ExceptionList = &local_10; - piVar1 = (int *)((int)this + 0x38); + piVar1 = (int *)(GHIDRA_INT(this) + 0x38); local_8 = 0; local_20 = 0; lockedMutex = piVar1; @@ -43,7 +43,7 @@ void * NetworkManager::receive_message(void *outMessage, byte channel, byte isRe senderIdLow = extraout_ECX; } else { - (**(code **)(*piVar1 + 0xc))(0xffffffff,__security_cookie ^ (uint)(findResult + 0x50)); + (**(code **)(*piVar1 + 0xc))(0xffffffff,__security_cookie ^ GHIDRA_UINT((findResult + 0x50))); senderIdLow = extraout_ECX_00; } local_8 = 1; @@ -56,8 +56,8 @@ void * NetworkManager::receive_message(void *outMessage, byte channel, byte isRe *(void **)((char *)blockedSenders + 4) = blockedSenders; *(void **)((char *)blockedSenders + 8) = blockedSenders; *(undefined2 *)((char *)blockedSenders + 0xc) = 0x101; - queue = (int *)((int)this + 0x30); - local_8 = CONCAT31(local_8._1_3_,2); + queue = (int *)(GHIDRA_INT(this) + 0x30); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); node = *(int **)*queue; if (node != (int *)*queue) { do { @@ -103,7 +103,7 @@ LAB_00a788d1: FID_conflict__Erase_tree_>_> (&blockedSenders, (fuzzer_allocator_> *)&blockedSenders, - *(_Tree_node **)((int)blockedSenders + 4)); + *(_Tree_node **)(GHIDRA_INT(blockedSenders) + 4)); operator_delete(blockedSenders,0x20); local_8 = 3; (**(code **)(*piVar1 + 0x10))(); @@ -145,12 +145,12 @@ void NetworkManager::receive_packet(ulonglong *sender, void *buffer, int size) ExceptionList = &local_10; local_18 = (int *)0x0; (**(code **)(*(int *)((char *)this + 0x10) + 0xc)) - (0xffffffff,__security_cookie ^ (uint)(local_34 + 0x30)); + (0xffffffff,__security_cookie ^ GHIDRA_UINT((local_34 + 0x30))); FUN_00731ee0(local_40,sender); if (*(char *)((char *)local_38 + 0xd) == '\0') { - if (((uint)local_38[5] <= *(uint *)((char *)sender + 4)) && - ((piVar6 = local_38, (uint)local_38[5] < *(uint *)((char *)sender + 4) || - ((uint)local_38[4] <= (uint)*sender)))) goto LAB_00a78a78; + if ((GHIDRA_UINT(local_38[5]) <= *(uint *)((char *)sender + 4)) && + ((piVar6 = local_38, GHIDRA_UINT(local_38[5]) < *(uint *)((char *)sender + 4) || + (GHIDRA_UINT(local_38[4]) <= GHIDRA_UINT(*sender))))) goto LAB_00a78a78; } piVar6 = *(int **)((char *)this + 8); LAB_00a78a78: @@ -162,7 +162,7 @@ LAB_00a78a78: puVar2[1] = connectionRefCount; newConnection = (void *)*puVar2; *puVar2 = local_2c; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; local_2c = newConnection; connectionRefCount = piVar6; if (((local_30 != (int *)0x0) && @@ -170,39 +170,39 @@ LAB_00a78a78: (g_connectionReleaseFn != (void *)0x0)) { (*g_connectionReleaseFn)(local_34); } - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; } (**(code **)(*(int *)((char *)this + 0x10) + 0x10))(); if (local_2c == (void *)0x0) { if ((*(byte *)((char *)buffer + 4) & 1) == 0) { (**(code **)(*(int *)((char *)this + 0x38) + 0xc))(0xffffffff); newConnection = operator_new(0x20); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; if (newConnection == (void *)0x0) { uVar3 = 0; } else { uVar3 = FUN_00a59d50(buffer,size,sender); } - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; FUN_00a2a690(uVar3); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; FUN_00a2a510(&local_1c); - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; if (((local_18 != (int *)0x0) && (isLastRef = (**(code **)(*local_18 + 0xc))(), isLastRef != '\0')) && (g_multiplayerRelease != (void *)0x0)) { (*g_multiplayerRelease)(&local_1c); } - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; (**(code **)(*(int *)((char *)this + 0x38) + 0x10))(); } } else { KAGE::Network::Connection::send_message(local_2c,&message,buffer,(void *)size); - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; if (message != 0) { - piVar6 = (int *)((int)this + 0x38); + piVar6 = (int *)(GHIDRA_INT(this) + 0x38); (**(code **)(*(int *)((char *)this + 0x38) + 0xc))(0xffffffff); FUN_00a2a510(&message); (**(code **)(*piVar6 + 0x10))(); @@ -214,12 +214,12 @@ LAB_00a78a78: } else { uVar3 = FUN_00a590c0(local_3c); - local_8 = CONCAT31(local_8._1_3_,6); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),6); local_18 = (int *)0x1; } KAGE::SmartPointer::operator_assign(uVar3); - if (((uint)local_18 & 2) != 0) { - local_18 = (int *)((uint)local_18 & 0xfffffffd); + if ((GHIDRA_UINT(local_18) & 2) != 0) { + local_18 = (int *)(GHIDRA_UINT(local_18) & 0xfffffffd); local_8 = 8; if (((local_30 != (int *)0x0) && (isLastRef = (**(code **)(*local_30 + 0xc))(), isLastRef != '\0')) && @@ -227,8 +227,8 @@ LAB_00a78a78: (*g_multiplayerRelease)(local_34); } } - local_8._1_3_ = 0; - if (((uint)local_18 & 1) != 0) { + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0; + if ((GHIDRA_UINT(local_18) & 1) != 0) { local_8 = 9; if (((local_38 != (int *)0x0) && (isLastRef = (**(code **)(*local_38 + 0xc))(), isLastRef != '\0')) && @@ -238,36 +238,36 @@ LAB_00a78a78: } if (message != 0) { do { - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; (**(code **)(*piVar6 + 0xc))(0xffffffff); iVar1 = *(int *)((char *)this + 0x30); if (*(int *)((char *)this + 0x34) == 0xfffffff) { /* WARNING: Subroutine does not return */ std::_Xlength_error("list too long"); } - local_8._0_1_ = 10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 10; local_18 = (int *)0x0; - local_1c = (int *)((int)this + 0x30); + local_1c = (int *)(GHIDRA_INT(this) + 0x30); piVar4 = operator_new(0x10); local_18 = piVar4; FUN_008ef1d0(&message); - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; *(int *)((char *)this + 0x34) = *(int *)((char *)this + 0x34) + 1; local_18 = (int *)0x0; puVar2 = *(undefined4 **)(iVar1 + 4); *piVar4 = iVar1; - piVar4[1] = (int)puVar2; + piVar4[1] = GHIDRA_INT(puVar2); *(int **)(iVar1 + 4) = piVar4; *puVar2 = piVar4; (**(code **)(*piVar6 + 0x10))(); uVar3 = FUN_00a590c0(local_34); - local_8._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc; piVar5 = (int *)FUN_008ef1d0(uVar3); piVar4 = (int *)piVar5[1]; - piVar5[1] = (int)messageRefCount; + piVar5[1] = GHIDRA_INT(messageRefCount); iVar1 = *piVar5; *piVar5 = message; - local_8._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xd; message = iVar1; messageRefCount = piVar4; if (((local_38 != (int *)0x0) && @@ -275,18 +275,18 @@ LAB_00a78a78: (g_multiplayerRelease != (void *)0x0)) { (*g_multiplayerRelease)(local_3c); } - local_8._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xe; if (((local_30 != (int *)0x0) && (isLastRef = (**(code **)(*local_30 + 0xc))(), isLastRef != '\0')) && (g_multiplayerRelease != (void *)0x0)) { (*g_multiplayerRelease)(local_34); } - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; } while (message != 0); FUN_00a59200(); } } - local_8 = CONCAT31(local_8._1_3_,0xf); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xf); if (((messageRefCount != (int *)0x0) && (isLastRef = (**(code **)(*messageRefCount + 0xc))(), isLastRef != '\0')) && (g_multiplayerRelease != (void *)0x0)) { @@ -318,20 +318,20 @@ void * NetworkManager::get_peer(void *outPeer, ulonglong *userId) puStack_c = &LAB_00b1436d; local_10 = ExceptionList; ExceptionList = &local_10; - piVar1 = (int *)((int)this + 0x10); + piVar1 = (int *)(GHIDRA_INT(this) + 0x10); mutexRef = piVar1; if (piVar1 == (int *)0x0) { KAGE_LogMessage(0x10,(byte *)"Invalid mutex object specified"); } else { - (**(code **)(*piVar1 + 0xc))(0xffffffff,__security_cookie ^ (uint)(lowerBound + 0x1c)); + (**(code **)(*piVar1 + 0xc))(0xffffffff,__security_cookie ^ GHIDRA_UINT((lowerBound + 0x1c))); } local_8 = 0; FUN_00731ee0(lowerBound,userId); if (*(char *)(node + 0xd) == '\0') { if ((*(uint *)(node + 0x14) <= *(uint *)((char *)userId + 4)) && ((*(uint *)(node + 0x14) < *(uint *)((char *)userId + 4) || - (*(uint *)(node + 0x10) <= (uint)*userId)))) goto LAB_00a79132; + (*(uint *)(node + 0x10) <= GHIDRA_UINT(*userId))))) goto LAB_00a79132; } node = *(int *)((char *)this + 8); LAB_00a79132: diff --git a/src/game/nightmare_scene.cpp b/src/game/nightmare_scene.cpp index 99b7c51..5df3d55 100644 --- a/src/game/nightmare_scene.cpp +++ b/src/game/nightmare_scene.cpp @@ -61,7 +61,7 @@ int NightmareScene::load_nightmares_xml(byte *path) local_14 = (byte ***)0xffffffff; puStack_18 = &LAB_00b0a680; local_1c = ExceptionList; - uVar2 = __security_cookie ^ (uint)(root + 0xb); + uVar2 = __security_cookie ^ GHIDRA_UINT((root + 0xb)); ExceptionList = &local_1c; local_24 = uVar2; file = ((FileSystem *)(&PTR_vftable_00c37a10))->FileSystem::Open(path,(int *)0x0); @@ -69,8 +69,8 @@ int NightmareScene::load_nightmares_xml(byte *path) fileSize = 0; } else { - local_74._0_4_ = 0; - local_74._4_4_ = 0xf; + (*(undefined4 *)((char *)&(local_74) + 0x0)) = 0; + (*(undefined4 *)((char *)&(local_74) + 0x4)) = 0xf; progressAnm2Path = (byte *)0x0; backgroundAnm2PathCapacity = 0xf; backgroundAnm2PathSize = 0; @@ -82,7 +82,7 @@ int NightmareScene::load_nightmares_xml(byte *path) xmlText[fileSize] = 0; (**(code **)*file)(1); FUN_00413b90(); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; uVar2 = 0x91ffb1; pbVar3 = xmlText; ((rapidxml::xml_document *)(xmlDoc))->rapidxml::xml_document::parse(xmlText); @@ -102,10 +102,10 @@ int NightmareScene::load_nightmares_xml(byte *path) bVar9 = *pbVar6; pbVar6 = pbVar6 + 1; } while (bVar9 != 0); - uVar2 = (int)pbVar6 - (int)pbVar8; + uVar2 = GHIDRA_INT(pbVar6) - GHIDRA_INT(pbVar8); ((std::string *)((char *)root))->std::string::assign(pbVar3,uVar2); - local_14._0_1_ = 3; - attribute = ((xml_node *)(node))->xml_node::first_attribute((byte *)"progressAnm2",(uint)pbVar3,(byte)uVar2); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; + attribute = ((xml_node *)(node))->xml_node::first_attribute((byte *)"progressAnm2",GHIDRA_UINT(pbVar3),(byte)uVar2); pbVar3 = &g_xmlNullStr; if (*(byte **)((char *)attribute + 4) != (byte *)0x0) { pbVar3 = *(byte **)((char *)attribute + 4); @@ -115,7 +115,7 @@ int NightmareScene::load_nightmares_xml(byte *path) bVar9 = *pbVar6; pbVar6 = pbVar6 + 1; } while (bVar9 != 0); - psVar7 = (std_string *)(pbVar6 + -(int)(pbVar3 + 1)); + psVar7 = (std_string *)(pbVar6 + -GHIDRA_INT((pbVar3 + 1))); if ((std_string *)(0x7fffffff - rootSize) < psVar7) { LAB_00920436: /* WARNING: Subroutine does not return */ @@ -125,16 +125,16 @@ LAB_00920436: if (0xf < rootCapacity) { ppppbVar4 = root[0]; } - ((std::string *)((char *)&joinedPath))->std::string::concat((int)pbVar8,psVar7,(byte *)ppppbVar4,rootSize,pbVar3, - (uint)psVar7); + ((std::string *)((char *)&joinedPath))->std::string::concat(GHIDRA_INT(pbVar8),psVar7,(byte *)ppppbVar4,rootSize,pbVar3, + GHIDRA_UINT(psVar7)); bVar9 = (byte)psVar7; - if (0xf < local_74._4_4_) { - uVar2 = local_74._4_4_ + 1; + if (0xf < (*(undefined4 *)((char *)&(local_74) + 0x4))) { + uVar2 = (*(undefined4 *)((char *)&(local_74) + 0x4)) + 1; pbVar3 = progressAnm2Path; if (0xfff < uVar2) { pbVar3 = *(byte **)(progressAnm2Path + -4); - uVar2 = local_74._4_4_ + 0x24; - if ((byte *)0x1f < progressAnm2Path + (-4 - (int)pbVar3)) goto LAB_0092030e; + uVar2 = (*(undefined4 *)((char *)&(local_74) + 0x4)) + 0x24; + if ((byte *)0x1f < progressAnm2Path + (-4 - GHIDRA_INT(pbVar3))) goto LAB_0092030e; } operator_delete(pbVar3,uVar2); bVar9 = (byte)uVar2; @@ -152,9 +152,9 @@ LAB_00920436: acStack_78[1] = acStack_60[1]; acStack_78[2] = acStack_60[2]; acStack_78[3] = acStack_60[3]; - local_74._4_4_ = joinedPathCapacity; - local_74._0_4_ = joinedPathSize; - attribute = ((xml_node *)(node))->xml_node::first_attribute((byte *)"backgroundAnm2",(uint)pbVar3,bVar9); + (*(undefined4 *)((char *)&(local_74) + 0x4)) = joinedPathCapacity; + (*(undefined4 *)((char *)&(local_74) + 0x0)) = joinedPathSize; + attribute = ((xml_node *)(node))->xml_node::first_attribute((byte *)"backgroundAnm2",GHIDRA_UINT(pbVar3),bVar9); if (attribute == (void *)0x0) { pbVar3 = (byte *)"nightmare_bg.anm2"; } @@ -169,14 +169,14 @@ LAB_00920436: bVar9 = *pbVar6; pbVar6 = pbVar6 + 1; } while (bVar9 != 0); - psVar7 = (std_string *)(pbVar6 + -(int)(pbVar3 + 1)); + psVar7 = (std_string *)(pbVar6 + -GHIDRA_INT((pbVar3 + 1))); if ((std_string *)(0x7fffffff - rootSize) < psVar7) goto LAB_00920436; ppppbVar4 = (byte ****)root; if (0xf < rootCapacity) { ppppbVar4 = root[0]; } - ((std::string *)((char *)&joinedPath))->std::string::concat((int)pbVar8,psVar7,(byte *)ppppbVar4,rootSize,pbVar3, - (uint)psVar7); + ((std::string *)((char *)&joinedPath))->std::string::concat(GHIDRA_INT(pbVar8),psVar7,(byte *)ppppbVar4,rootSize,pbVar3, + GHIDRA_UINT(psVar7)); bVar9 = (byte)psVar7; if (0xf < backgroundAnm2PathCapacity) { uVar2 = backgroundAnm2PathCapacity + 1; @@ -184,7 +184,7 @@ LAB_00920436: if (0xfff < uVar2) { pbVar3 = *(byte **)(backgroundAnm2Path + -4); uVar2 = backgroundAnm2PathCapacity + 0x24; - if ((byte *)0x1f < backgroundAnm2Path + (-4 - (int)pbVar3)) goto LAB_0092030e; + if ((byte *)0x1f < backgroundAnm2Path + (-4 - GHIDRA_INT(pbVar3))) goto LAB_0092030e; } operator_delete(pbVar3,uVar2); bVar9 = (byte)uVar2; @@ -204,7 +204,7 @@ LAB_00920436: acStack_48[3] = acStack_60[3]; backgroundAnm2PathSize = joinedPathSize; backgroundAnm2PathCapacity = joinedPathCapacity; - for (node = ((xml_node *)(node))->xml_node::first_node((byte *)"nightmare",(int)pbVar3,bVar9); + for (node = ((xml_node *)(node))->xml_node::first_node((byte *)"nightmare",GHIDRA_INT(pbVar3),bVar9); node != (void *)0x0; node = *(void **)((char *)node + 0x2c)) { for (nightmareAttr = *(undefined4 **)((char *)node + 0x20); nightmareAttr != (undefined4 *)0x0; nightmareAttr = (undefined4 *)nightmareAttr[6]) { @@ -218,7 +218,7 @@ LAB_00920436: isLess = bVar9 < *pbVar8; if (bVar9 != *pbVar8) { LAB_009201e1: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_009201e6; } if (bVar9 == 0) break; @@ -240,16 +240,16 @@ LAB_009201e6: bVar9 = *pbVar8; pbVar8 = pbVar8 + 1; } while (bVar9 != 0); - psVar7 = (std_string *)(pbVar8 + -(int)(pbVar3 + 1)); + psVar7 = (std_string *)(pbVar8 + -GHIDRA_INT((pbVar3 + 1))); if ((std_string *)(0x7fffffff - rootSize) < psVar7) goto LAB_00920436; ppppbVar4 = (byte ****)root; if (0xf < rootCapacity) { ppppbVar4 = root[0]; } - ((std::string *)((char *)&joinedPath))->std::string::concat((int)(pbVar3 + 1),psVar7,(byte *)ppppbVar4, - rootSize,pbVar3,(uint)psVar7); + ((std::string *)((char *)&joinedPath))->std::string::concat(GHIDRA_INT((pbVar3 + 1)),psVar7,(byte *)ppppbVar4, + rootSize,pbVar3,GHIDRA_UINT(psVar7)); pbVar3 = joinedPath; - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; psVar7 = *(std_string **)&(*(undefined1 *)((char *)(this) + 0xc)); if (psVar7 == *(std_string **)&(*(undefined1 *)((char *)(this) + 0x10))) { vector_string_emplace_reallocate_move(&(*(undefined1 *)((char *)(this) + 0x8)),psVar7,(std_string *)&joinedPath) @@ -257,7 +257,7 @@ LAB_009201e6: uVar2 = joinedPathCapacity; } else { - joinedPath = (byte *)((uint)joinedPath & 0xffffff00); + joinedPath = (byte *)(GHIDRA_UINT(joinedPath) & 0xffffff00); *(byte **)psVar7->_buf = pbVar3; *(char (*) [4])(psVar7->_buf + 4) = acStack_68; *(char (*) [4])(psVar7->_buf + 8) = acStack_64; @@ -267,14 +267,14 @@ LAB_009201e6: *(int *)&(*(undefined1 *)((char *)(this) + 0xc)) = *(int *)&(*(undefined1 *)((char *)(this) + 0xc)) + 0x18; uVar2 = 0xf; } - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; if (0xf < uVar2) { size = uVar2 + 1; pbVar3 = joinedPath; if (0xfff < size) { pbVar3 = *(byte **)(joinedPath + -4); size = uVar2 + 0x24; - if ((byte *)0x1f < joinedPath + (-4 - (int)pbVar3)) goto LAB_0092030e; + if ((byte *)0x1f < joinedPath + (-4 - GHIDRA_INT(pbVar3))) goto LAB_0092030e; } operator_delete(pbVar3,size); } @@ -282,14 +282,14 @@ LAB_009201e6: if (nightmareAttr[4] == 0) break; } } - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xf < rootCapacity) { uVar2 = rootCapacity + 1; ppppbVar4 = root[0]; if (0xfff < uVar2) { ppppbVar4 = (byte ****)root[0][-1]; uVar2 = rootCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)root[0] + (-4 - (int)ppppbVar4))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(root[0]) + (-4 - GHIDRA_INT(ppppbVar4)))) { LAB_0092030e: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -297,25 +297,25 @@ LAB_0092030e: } operator_delete(ppppbVar4,uVar2); } - local_14 = (byte ***)CONCAT31(local_14._1_3_,5); + local_14 = (byte ***)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),5); ((xml_memory_pool *)(xmlPool))->xml_memory_pool::clear(); if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar5 = extraout_ECX; if (xmlText != (byte *)0x0) { uVar2 = *(uint *)(xmlText + -4); qVar1 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar2; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar2; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar1 < uVar2); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar2)); free(xmlText + -4); uVar5 = extraout_ECX_00; } - local_14 = (byte ***)CONCAT31(local_14._1_3_,1); + local_14 = (byte ***)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); if ((*(undefined1 *)((char *)(this) + 0x351)) == '\0') { ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x248))))->ANM2::Load((std_string *)&progressAnm2Path,1); uVar5 = extraout_ECX_01; @@ -334,21 +334,21 @@ LAB_0092030e: if (0xfff < uVar2) { pbVar3 = *(byte **)(backgroundAnm2Path + -4); uVar2 = backgroundAnm2PathCapacity + 0x24; - if ((byte *)0x1f < backgroundAnm2Path + (-4 - (int)pbVar3)) goto LAB_0092041f; + if ((byte *)0x1f < backgroundAnm2Path + (-4 - GHIDRA_INT(pbVar3))) goto LAB_0092041f; } operator_delete(pbVar3,uVar2); uVar5 = extraout_EAX; } backgroundAnm2PathSize = 0; backgroundAnm2PathCapacity = 0xf; - backgroundAnm2Path = (byte *)((uint)backgroundAnm2Path & 0xffffff00); - if (0xf < local_74._4_4_) { - uVar2 = local_74._4_4_ + 1; + backgroundAnm2Path = (byte *)(GHIDRA_UINT(backgroundAnm2Path) & 0xffffff00); + if (0xf < (*(undefined4 *)((char *)&(local_74) + 0x4))) { + uVar2 = (*(undefined4 *)((char *)&(local_74) + 0x4)) + 1; pbVar3 = progressAnm2Path; if (0xfff < uVar2) { pbVar3 = *(byte **)(progressAnm2Path + -4); - uVar2 = local_74._4_4_ + 0x24; - if ((byte *)0x1f < progressAnm2Path + (-4 - (int)pbVar3)) { + uVar2 = (*(undefined4 *)((char *)&(local_74) + 0x4)) + 0x24; + if ((byte *)0x1f < progressAnm2Path + (-4 - GHIDRA_INT(pbVar3))) { LAB_0092041f: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -357,7 +357,7 @@ LAB_0092041f: operator_delete(pbVar3,uVar2); uVar5 = extraout_EAX_00; } - fileSize = CONCAT31((int3)((uint)uVar5 >> 8),1); + fileSize = CONCAT31((int3)(GHIDRA_UINT(uVar5) >> 8),1); } ExceptionList = local_1c; return fileSize; @@ -429,7 +429,7 @@ void NightmareScene::Update() (*(undefined1 *)((char *)(this) + 0x178)) = 1; } if (((((*(undefined1 *)((char *)&(this[1]) + 0x118)) != '\0') && (*(int *)&(*(undefined1 *)((char *)&(this[1]) + 0x12c)) != 0)) && - ((uint)(*(int *)(this + 1) * 2) < *(uint *)&(*(undefined1 *)((char *)(this) + 0x4)))) && + (GHIDRA_UINT((*(int *)(this + 1) * 2)) < *(uint *)&(*(undefined1 *)((char *)(this) + 0x4)))) && ((*(int *)&(*(undefined1 *)((char *)(this) + 0x168)) == 0 || ((*(undefined1 *)((char *)(this) + 0x178)) == '\0')))) { if (*(int *)&(*(undefined1 *)((char *)(this) + 0x188)) == 0) { LAB_00920712: @@ -503,7 +503,7 @@ LAB_00920712: else { uVar3 = *(uint *)&(*(undefined1 *)((char *)(this) + 0x4)); framesLeft = *(int *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x188)) + 0x30) - - (int)*(float *)&(*(undefined1 *)((char *)(this) + 0x194)); + GHIDRA_INT(*(float *)&(*(undefined1 *)((char *)(this) + 0x194))); } } fadeProgress = (float)framesLeft / 15.0; @@ -598,7 +598,7 @@ void NightmareScene::Render() KColor local_28; uint stackCookie; - stackCookie = __security_cookie ^ (uint)(stageIcons + 0xf); + stackCookie = __security_cookie ^ GHIDRA_UINT((stageIcons + 0xf)); if ((g_game->_difficulty == 2) || (isGreedMode = '\0', g_game->_difficulty == 3)) { isGreedMode = '\x01'; } @@ -611,19 +611,19 @@ void NightmareScene::Render() local_58 = 0.0; do { pbVar9 = *(byte **)((char *)local_58 + *(int *)((char *)local_74 + 0x18)); - local_60 = ((AnimationState *)((AnimationState *)&(*(undefined1 *)((char *)(this) + 0x50))))->AnimationState::GetLayerFrame((int)pbVar9); + local_60 = ((AnimationState *)((AnimationState *)&(*(undefined1 *)((char *)(this) + 0x50))))->AnimationState::GetLayerFrame(GHIDRA_INT(pbVar9)); layer = ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x20))))->ANM2::GetLayer(pbVar9); if (((layer->_visible != 0) && (local_60 != (void *)0x0)) && (*(char *)((char *)local_60 + 0x2c) != '\0')) { - local_64 = (Game *)(*(int *)((char *)local_74 + 0x18) + (int)local_58); - if (((((int)pbVar9 < 0) || (*(int *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x50)) + 0x80) <= (int)pbVar9)) && - (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), (int)pbVar9 < 0)) || - (*(int *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x50)) + 0x80) <= (int)pbVar9)) { + local_64 = (Game *)(*(int *)((char *)local_74 + 0x18) + GHIDRA_INT(local_58)); + if ((((GHIDRA_INT(pbVar9) < 0) || (*(int *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x50)) + 0x80) <= GHIDRA_INT(pbVar9))) && + (KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"), GHIDRA_INT(pbVar9) < 0)) || + (*(int *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x50)) + 0x80) <= GHIDRA_INT(pbVar9))) { iVar6 = 0; } else { iVar6 = *(int *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x58)) + - *(int *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x54)) + 0x38 + (int)pbVar9 * 4) * 4); + *(int *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x54)) + 0x38 + GHIDRA_INT(pbVar9) * 4) * 4); } AnimationLayer::RenderFrame ((AnimationLayer *)local_64,&g_vectorZero,iVar6,&g_vectorZero,&g_vectorZero, @@ -637,7 +637,7 @@ void NightmareScene::Render() local_60 = (void *)(-*(float *)((char *)local_60 + 0x20) * *(float *)((char *)local_60 + 0x18)); local_7c = cos((float)local_64); fVar12 = sin((float)local_64); - if ((undefined4 *)&(*(undefined1 *)((char *)&(this[1]) + 0x1d8)) == (undefined4 *)((int)pvVar11 + 0x30)) { + if ((undefined4 *)&(*(undefined1 *)((char *)&(this[1]) + 0x1d8)) == (undefined4 *)(GHIDRA_INT(pvVar11) + 0x30)) { fVar8 = local_70; } else { @@ -687,7 +687,7 @@ void NightmareScene::Render() } } local_78 = local_78 + 1; - local_58 = (float)((int)local_58 + 0x10); + local_58 = (float)(GHIDRA_INT(local_58) + 0x10); } while (local_78 < *(uint *)((char *)local_74 + 0x1c)); } if ((*(undefined1 *)((char *)&(this[1]) + 0x118)) == '\0') { @@ -722,7 +722,7 @@ void NightmareScene::Render() pbVar9 = (byte *)*local_5c; if (pbVar9 == &DAT_00000006) { uVar10 = *(uint *)(iVar6 + 4); - if ((int)uVar10 < 0x2dd) { + if (GHIDRA_INT(uVar10) < 0x2dd) { local_60 = (void *)(uVar10 - 1); goto LAB_00920dfe; } @@ -748,12 +748,12 @@ void NightmareScene::Render() local_88.x = *(float *)&(*(undefined1 *)((char *)&(this[1]) + 0x98)) + *nullFrame; local_88.y = *(float *)&(*(undefined1 *)((char *)&(this[1]) + 0x9c)) + nullFrame[1]; if (*(char *)((char *)local_60 + 0xef9) != '\0') { - ((ANM2 *)((ANM2 *)((int)local_60 + 0xdf0)))->ANM2::SetFrame((std_string *)((int)local_60 + 0xe08), + ((ANM2 *)((ANM2 *)(GHIDRA_INT(local_60) + 0xdf0)))->ANM2::SetFrame((std_string *)(GHIDRA_INT(local_60) + 0xe08), *(int *)(iVar6 + 100)); - ((Sprite *)((Sprite *)((int)local_60 + 0xdf0)))->Sprite::SetColor((ColorMod *)(nullFrame + 6)); + ((Sprite *)((Sprite *)(GHIDRA_INT(local_60) + 0xdf0)))->Sprite::SetColor((ColorMod *)(nullFrame + 6)); *(float *)((char *)local_60 + 0xe8c) = nullFrame[4]; *(float *)((char *)local_60 + 0xe90) = nullFrame[5]; - ((ANM2 *)((ANM2 *)((int)local_60 + 0xdf0)))->ANM2::Render(&local_88,&g_vectorZero,&g_vectorZero); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(local_60) + 0xdf0)))->ANM2::Render(&local_88,&g_vectorZero,&g_vectorZero); } } else { @@ -787,7 +787,7 @@ LAB_00920dfe: (layer->_color)._offset[1] = fVar12; (layer->_color)._offset[2] = nullFrame[0x10]; } - ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)&(this[1]) + 0x4))))->ANM2::SetLayerFrame(*local_5c,(int)local_60); + ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)&(this[1]) + 0x4))))->ANM2::SetLayerFrame(*local_5c,GHIDRA_INT(local_60)); iVar6 = *local_5c; if ((*(undefined1 *)((char *)&(this[1]) + 0x10d)) != '\0') { if ((*(undefined1 *)((char *)&(this[1]) + 0x74)) == '\0') { @@ -834,7 +834,7 @@ LAB_00920f90: } } local_5c = local_5c + 5; - local_58 = (float)((int)local_58 + -1); + local_58 = (float)(GHIDRA_INT(local_58) + -1); } while (local_58 != 0.0); local_58 = 0.0; } @@ -874,7 +874,7 @@ LAB_0092100d: local_58 = fVar12; LAB_0092110a: local_5c = (int *)fVar12; - if ((int)fVar12 < (int)local_58) { + if (GHIDRA_INT(fVar12) < GHIDRA_INT(local_58)) { local_5c = (int *)local_58; } lastSlot = -NAN; @@ -883,7 +883,7 @@ LAB_0092110a: local_74 = -NAN; local_78 = 0; fVar12 = lastSlot; - if (-1 < (int)local_5c) goto LAB_00921130; + if (-1 < GHIDRA_INT(local_5c)) goto LAB_00921130; } else { local_58 = 9.80909e-45; @@ -908,9 +908,9 @@ LAB_00921130: } } else if ((fVar8 != 1.26117e-44) || (this->_stageBarIcons[9] != 0x11)) { - iVar6 = this->_stageBarIcons[(int)fVar8]; + iVar6 = this->_stageBarIcons[GHIDRA_INT(fVar8)]; LAB_0092117e: - stageIcons[(int)iconCount] = iVar6; + stageIcons[GHIDRA_INT(iconCount)] = iVar6; if ((fVar8 == local_58) && (*(float *)&(*(undefined1 *)((char *)(this) + 0x364)) != local_58)) { local_7c = iconCount; } @@ -928,19 +928,19 @@ LAB_0092117e: local_78 = 0; } } - iconCount = (float)((int)iconCount + 1); + iconCount = (float)(GHIDRA_INT(iconCount) + 1); } - fVar8 = (float)((int)fVar8 + 1); + fVar8 = (float)(GHIDRA_INT(fVar8) + 1); fVar12 = lastSlot; - } while ((int)fVar8 <= (int)local_5c); + } while (GHIDRA_INT(fVar8) <= GHIDRA_INT(local_5c)); } - for (; (fVar8 = iconCount, -1 < (int)fVar12 && (stageIcons[(int)fVar12] == 0x11)); - fVar12 = (float)((int)fVar12 + -1)) { - stageIcons[(int)fVar12] = -1; + for (; (fVar8 = iconCount, -1 < GHIDRA_INT(fVar12) && (stageIcons[GHIDRA_INT(fVar12)] == 0x11)); + fVar12 = (float)(GHIDRA_INT(fVar12) + -1)) { + stageIcons[GHIDRA_INT(fVar12)] = -1; } stageBarSprite = &(*(undefined1 *)((char *)(this) + 0x248)); pbVar9 = *(byte **)&(*(undefined1 *)((char *)(this) + 0x27c)); - local_5c = (int *)((g_screenWidth * 0.5 - (float)((int)iconCount * 0x1b + -4) * 0.5) + 11.5); + local_5c = (int *)((g_screenWidth * 0.5 - (float)(GHIDRA_INT(iconCount) * 0x1b + -4) * 0.5) + 11.5); local_58 = (float)local_5c + 13.5; if (pbVar9 == (byte *)0x0) { LAB_009212c6: @@ -961,7 +961,7 @@ LAB_009212c6: isLess = bVar5 < (byte)*animName; if (bVar5 != *animName) { LAB_009212a0: - uVar10 = -(uint)isLess | 1; + uVar10 = -GHIDRA_UINT(isLess) | 1; goto LAB_009212a5; } if (bVar5 == 0) break; @@ -977,14 +977,14 @@ LAB_009212a5: ((*(char *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x27c)) + 0x34) != '\0' && ((*(undefined1 *)((char *)(this) + 0x28c)) == '\0')))) goto LAB_009212c6; } - local_60 = (void *)((int)fVar8 + -1); + local_60 = (void *)(GHIDRA_INT(fVar8) + -1); connectorIndex = (Game *)0x0; fVar12 = local_58; - if (0 < (int)local_60) { + if (0 < GHIDRA_INT(local_60)) { do { - local_64 = (Game *)((int)&connectorIndex->_stage + 1); + local_64 = (Game *)(GHIDRA_INT(&connectorIndex->_stage) + 1); iconPos.y = 24.0; - iconPos.x = (float)(int)connectorIndex * 27.0 + fVar12; + iconPos.x = (float)GHIDRA_INT(connectorIndex) * 27.0 + fVar12; if ((*(undefined1 *)((char *)(this) + 0x351)) != '\0') { if ((*(undefined1 *)((char *)(this) + 0x2b8)) == '\0') { AnimationState::Render @@ -999,7 +999,7 @@ LAB_009212a5: AnimationState::Render(renderState,&iconPos,&g_vectorZero,&g_vectorZero); fVar12 = local_58; } - local_60 = (void *)((int)local_60 + -1); + local_60 = (void *)(GHIDRA_INT(local_60) + -1); connectorIndex = local_64; } while (local_60 != (void *)0x0); } @@ -1023,7 +1023,7 @@ LAB_009213f6: isLess = bVar5 < (byte)*animName; if (bVar5 != *animName) { LAB_009213d0: - uVar10 = -(uint)isLess | 1; + uVar10 = -GHIDRA_UINT(isLess) | 1; goto LAB_009213d5; } if (bVar5 == 0) break; @@ -1040,15 +1040,15 @@ LAB_009213d5: goto LAB_009213f6; } local_58 = 0.0; - if (0 < (int)fVar8) { + if (0 < GHIDRA_INT(fVar8)) { do { - if (-1 < stageIcons[(int)local_58]) { + if (-1 < stageIcons[GHIDRA_INT(local_58)]) { if (*(int *)&(*(undefined1 *)((char *)(this) + 0x27c)) != 0) { AnimationState::SetFrameFloat - ((AnimationState *)&(*(undefined1 *)((char *)(this) + 0x278)),(float)stageIcons[(int)local_58]); + ((AnimationState *)&(*(undefined1 *)((char *)(this) + 0x278)),(float)stageIcons[GHIDRA_INT(local_58)]); } iconPos.y = 24.0; - iconPos.x = (float)(int)local_58 * 27.0 + (float)local_5c; + iconPos.x = (float)GHIDRA_INT(local_58) * 27.0 + (float)local_5c; if ((*(undefined1 *)((char *)(this) + 0x351)) != '\0') { if ((*(undefined1 *)((char *)(this) + 0x2b8)) == '\0') { AnimationState::Render @@ -1063,8 +1063,8 @@ LAB_009213d5: AnimationState::Render(renderState,&iconPos,&g_vectorZero,&g_vectorZero); } } - local_58 = (float)((int)local_58 + 1); - } while ((int)local_58 < (int)fVar8); + local_58 = (float)(GHIDRA_INT(local_58) + 1); + } while (GHIDRA_INT(local_58) < GHIDRA_INT(fVar8)); } pbVar9 = *(byte **)&(*(undefined1 *)((char *)(this) + 0x27c)); if (pbVar9 == (byte *)0x0) { @@ -1086,7 +1086,7 @@ LAB_00921544: isLess = bVar5 < (byte)*animName; if (bVar5 != *animName) { LAB_00921520: - uVar10 = -(uint)isLess | 1; + uVar10 = -GHIDRA_UINT(isLess) | 1; goto LAB_00921525; } if (bVar5 == 0) break; @@ -1102,11 +1102,11 @@ LAB_00921525: } fVar8 = 0.0; fVar12 = iconCount; - if (0 < (int)iconCount) { + if (0 < GHIDRA_INT(iconCount)) { do { - if ((-1 < stageIcons[(int)fVar8]) && (fVar8 != local_74)) { + if ((-1 < stageIcons[GHIDRA_INT(fVar8)]) && (fVar8 != local_74)) { iconPos.y = 24.0; - iconPos.x = (float)(int)fVar8 * 27.0 + (float)local_5c; + iconPos.x = (float)GHIDRA_INT(fVar8) * 27.0 + (float)local_5c; if ((*(undefined1 *)((char *)(this) + 0x351)) != '\0') { if ((*(undefined1 *)((char *)(this) + 0x2b8)) == '\0') { AnimationState::Render @@ -1122,8 +1122,8 @@ LAB_00921525: fVar12 = iconCount; } } - fVar8 = (float)((int)fVar8 + 1); - } while ((int)fVar8 < (int)fVar12); + fVar8 = (float)(GHIDRA_INT(fVar8) + 1); + } while (GHIDRA_INT(fVar8) < GHIDRA_INT(fVar12)); } pbVar9 = *(byte **)&(*(undefined1 *)((char *)(this) + 0x27c)); if (pbVar9 == (byte *)0x0) { @@ -1145,7 +1145,7 @@ LAB_0092166b: isLess = bVar5 < (byte)*animName; if (bVar5 != *animName) { LAB_00921647: - uVar10 = -(uint)isLess | 1; + uVar10 = -GHIDRA_UINT(isLess) | 1; goto LAB_0092164c; } if (bVar5 == 0) break; @@ -1161,11 +1161,11 @@ LAB_0092164c: } fVar12 = iconCount; local_60 = (void *)0x0; - if (0 < (int)iconCount) { + if (0 < GHIDRA_INT(iconCount)) { do { - if (stageIcons[(int)local_60] < 0) { + if (stageIcons[GHIDRA_INT(local_60)] < 0) { iconPos.y = 24.0; - iconPos.x = (float)(int)local_60 * 27.0 + (float)local_5c; + iconPos.x = (float)GHIDRA_INT(local_60) * 27.0 + (float)local_5c; if ((*(undefined1 *)((char *)(this) + 0x351)) != '\0') { if ((*(undefined1 *)((char *)(this) + 0x2b8)) == '\0') { AnimationState::Render @@ -1180,10 +1180,10 @@ LAB_0092164c: AnimationState::Render(renderState,&iconPos,&g_vectorZero,&g_vectorZero); } } - local_60 = (void *)((int)local_60 + 1); - } while ((int)local_60 < (int)fVar12); + local_60 = (void *)(GHIDRA_INT(local_60) + 1); + } while (GHIDRA_INT(local_60) < GHIDRA_INT(fVar12)); } - if ((-1 < (int)local_7c) && ((int)lastSlot <= (int)local_7c)) { + if ((-1 < GHIDRA_INT(local_7c)) && (GHIDRA_INT(lastSlot) <= GHIDRA_INT(local_7c))) { if ((g_game->_difficulty == 2) || (g_game->_difficulty == 3)) { pbVar9 = *(byte **)&(*(undefined1 *)((char *)(this) + 0x27c)); if (pbVar9 == (byte *)0x0) { @@ -1201,7 +1201,7 @@ LAB_00921834: isLess = bVar5 < (byte)*animName; if (bVar5 != *animName) { LAB_00921810: - uVar10 = -(uint)isLess | 1; + uVar10 = -GHIDRA_UINT(isLess) | 1; goto LAB_00921815; } if (bVar5 == 0) break; @@ -1228,7 +1228,7 @@ LAB_00921815: isLess = bVar5 < (byte)*animName; if (bVar5 != *animName) { LAB_00921797: - uVar10 = -(uint)isLess | 1; + uVar10 = -GHIDRA_UINT(isLess) | 1; goto LAB_0092179c; } if (bVar5 == 0) break; @@ -1256,7 +1256,7 @@ LAB_0092183b: } LAB_00921852: iconPos.y = 24.0; - iconPos.x = (float)(int)local_7c * 27.0 + (float)local_5c; + iconPos.x = (float)GHIDRA_INT(local_7c) * 27.0 + (float)local_5c; if ((*(undefined1 *)((char *)(this) + 0x351)) != '\0') { if ((*(undefined1 *)((char *)(this) + 0x2b8)) == '\0') { AnimationState::Render @@ -1295,7 +1295,7 @@ LAB_00921997: isLess = bVar5 < (byte)*animName; if (bVar5 != *animName) { LAB_00921973: - uVar10 = -(uint)isLess | 1; + uVar10 = -GHIDRA_UINT(isLess) | 1; goto LAB_00921978; } if (bVar5 == 0) break; @@ -1327,26 +1327,26 @@ LAB_00921978: } } } - if (-2 < (int)local_74) { + if (-2 < GHIDRA_INT(local_74)) { ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x248))))->ANM2::SetAnimation((byte *)"IsaacIndicator",1); renderState = (AnimationState *)&(*(undefined1 *)((char *)(this) + 0x278)); if (*(int *)&(*(undefined1 *)((char *)(this) + 0x27c)) != 0) { AnimationState::SetFrameFloat (renderState, - (float)(int)((*(uint *)&(*(undefined1 *)((char *)(this) + 0x4)) >> 1) % - *(uint *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x27c)) + 0x30))); + (float)GHIDRA_INT(((*(uint *)&(*(undefined1 *)((char *)(this) + 0x4)) >> 1) % + *(uint *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x27c)) + 0x30)))); } fVar12 = 5.60519e-44; - if ((int)local_88.y < 0x28) { + if (GHIDRA_INT(local_88.y) < 0x28) { fVar12 = local_88.y; } iconPos.y = 24.0; fVar8 = 1.4013e-44; - if (10 < (int)fVar12) { + if (10 < GHIDRA_INT(fVar12)) { fVar8 = fVar12; } - iconPos.x = ((float)(int)local_74 * 27.0 + (float)local_5c) - - (1.0 - (float)((int)fVar8 + -10) / 30.0) * (float)(int)local_78 * 27.0; + iconPos.x = ((float)GHIDRA_INT(local_74) * 27.0 + (float)local_5c) - + (1.0 - (float)(GHIDRA_INT(fVar8) + -10) / 30.0) * (float)GHIDRA_INT(local_78) * 27.0; if ((*(undefined1 *)((char *)(this) + 0x351)) != '\0') { if ((*(undefined1 *)((char *)(this) + 0x2b8)) == '\0') { AnimationState::Render(renderState,&iconPos,&g_vectorZero,&g_vectorZero); @@ -1524,12 +1524,12 @@ void NightmareScene::Show(byte unk) local_14 = 0xffffffff; puStack_18 = &LAB_00b0a72a; local_1c = ExceptionList; - treasureItems[2] = __security_cookie ^ (uint)(treasureItems + 7); + treasureItems[2] = __security_cookie ^ GHIDRA_UINT((treasureItems + 7)); ExceptionList = &local_1c; piVar10 = (g_game->_playerManager)._playerList._begin; sceneRef = this; puVar13 = treasureItems + 10; - if ((int)(g_game->_playerManager)._playerList._end - (int)piVar10 >> 2 == 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT(piVar10) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); piVar10 = (game->_playerManager)._playerList._begin; puVar13 = (uint *)puStack_20; @@ -1549,13 +1549,13 @@ void NightmareScene::Show(byte unk) if (seedNode != (game->_seedEffects)._seedEffects) { stringData = &sceneAnm2Path; if (0xf < sceneAnm2Path._capacity) { - stringData = (std_string *)sceneAnm2Path._buf._0_4_; + stringData = (*(undefined4 *)((char *)&((std_string *)sceneAnm2Path._buf) + 0x0)); } iVar9 = strncmp(stringData->_buf,"gfx/ui/stage/nightmare",0x16); if (iVar9 == 0) { stringData = &sceneAnm2Path; if (0xf < sceneAnm2Path._capacity) { - stringData = (std_string *)sceneAnm2Path._buf._0_4_; + stringData = (*(undefined4 *)((char *)&((std_string *)sceneAnm2Path._buf) + 0x0)); } gfuelPrefixCapacity = 0xf; gfuelPrefix = (char *)0x0; @@ -1564,16 +1564,16 @@ void NightmareScene::Show(byte unk) gfuelPrefixSize = 0x23; gfuelPrefixCapacity = 0x2f; builtin_strncpy(gfuelPrefix,"gfx/promo/gfuel/ui/stage/nightmareg",0x24); - local_14._0_1_ = 1; - FUN_0060c790((undefined1 *)((int)&stringData->_capacity + 2)); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; + FUN_0060c790((undefined1 *)(GHIDRA_INT(&stringData->_capacity) + 2)); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; if (0xf < gfuelPrefixCapacity) { uVar17 = gfuelPrefixCapacity + 1; pcVar19 = gfuelPrefix; if (0xfff < uVar17) { pcVar19 = *(char **)(gfuelPrefix + -4); uVar17 = gfuelPrefixCapacity + 0x24; - if ((char *)0x1f < gfuelPrefix + (-4 - (int)pcVar19)) { + if ((char *)0x1f < gfuelPrefix + (-4 - GHIDRA_INT(pcVar19))) { LAB_00921eab: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1583,9 +1583,9 @@ LAB_00921eab: } gfuelPrefixSize = 0; gfuelPrefixCapacity = 0xf; - gfuelPrefix = (char *)((uint)gfuelPrefix & 0xffffff00); + gfuelPrefix = (char *)(GHIDRA_UINT(gfuelPrefix) & 0xffffff00); ((ANM2 *)(&gfuelAnm2))->ANM2::constructor(); - local_14 = CONCAT31(local_14._1_3_,4); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),4); ((ANM2 *)(&gfuelAnm2))->ANM2::Load((std_string *)gfuelPath,1); if (gfuelAnm2._loaded != 0) { stringData = (std_string *)gfuelPath; @@ -1594,20 +1594,20 @@ LAB_00921eab: } ((std::string *)(sceneAnm2Path._buf))->std::string::assign((byte *)stringData,gfuelPathSize); } - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; ((ANM2 *)(&gfuelAnm2))->ANM2::Reset(); ((AnimationState *)(&gfuelAnm2._overlayAnimState))->AnimationState::~AnimationState(); ((AnimationState *)(&gfuelAnm2._animState))->AnimationState::~AnimationState(); ((std::string *)(gfuelAnm2._animDefaultName._buf))->std::string::_Tidy_deallocate(); ((std::string *)((char *)&gfuelAnm2))->std::string::_Tidy_deallocate(); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (0xf < gfuelPathCapacity) { uVar17 = gfuelPathCapacity + 1; stringData = gfuelPath[0]; if (0xfff < uVar17) { stringData = (std_string *)gfuelPath[0][-1]._capacity; uVar17 = gfuelPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)gfuelPath[0] + (-4 - (int)stringData))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(gfuelPath[0]) + (-4 - GHIDRA_INT(stringData)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1616,7 +1616,7 @@ LAB_00921eab: } gfuelPathSize = 0; gfuelPathCapacity = 0xf; - gfuelPath[0] = (std_string *)((uint)gfuelPath[0] & 0xffffff00); + gfuelPath[0] = (std_string *)(GHIDRA_UINT(gfuelPath[0]) & 0xffffff00); } } *(undefined4 *)(this + 1) = 0x28; @@ -1629,18 +1629,18 @@ LAB_00921eab: piVar10 = operator_new(8); scene = sceneRef; piVar10[1] = 0; - *piVar10 = (int)&local_288; + *piVar10 = GHIDRA_INT(&local_288); puVar16 = &(*(undefined1 *)((char *)&(this[1]) + 0x11c)); - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; local_288 = piVar10; if ((int **)puVar16 != &local_288) { local_288 = *(int **)puVar16; *(int **)puVar16 = piVar10; if (piVar10 != (int *)0x0) { - *piVar10 = (int)puVar16; + *piVar10 = GHIDRA_INT(puVar16); } if (local_288 != (int *)0x0) { - *local_288 = (int)&local_288; + *local_288 = GHIDRA_INT(&local_288); } uVar1 = *(undefined4 *)&(*(undefined1 *)((char *)&(this[1]) + 0x120)); *(undefined4 *)&(*(undefined1 *)((char *)&(this[1]) + 0x120)) = uStack_284; @@ -1667,20 +1667,20 @@ LAB_00921eab: deathScreenPath._buf[1] = '\0'; deathScreenPath._buf[2] = '\0'; deathScreenPath._buf[3] = '\0'; - deathScreenPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(deathScreenPath._buf) + 0x0)) = std::_Allocate(0x20); deathScreenPath._size = 0x18; deathScreenPath._capacity = 0x1f; - builtin_strncpy((char *)deathScreenPath._buf._0_4_,"gfx/ui/Death Screen.anm2",0x19); - local_14._0_1_ = 7; + builtin_strncpy((*(undefined4 *)((char *)&((char *)deathScreenPath._buf) + 0x0)),"gfx/ui/Death Screen.anm2",0x19); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)&(scene[1]) + 0x4))))->ANM2::Load(&deathScreenPath,1); - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; if (0xf < deathScreenPath._capacity) { uVar17 = deathScreenPath._capacity + 1; - pcVar19 = (char *)deathScreenPath._buf._0_4_; + pcVar19 = (*(undefined4 *)((char *)&((char *)deathScreenPath._buf) + 0x0)); if (0xfff < uVar17) { - pcVar19 = *(char **)(deathScreenPath._buf._0_4_ + -4); + pcVar19 = *(char **)((*(undefined4 *)((char *)&(deathScreenPath._buf) + 0x0)) + -4); uVar17 = deathScreenPath._capacity + 0x24; - if ((char *)0x1f < (char *)(deathScreenPath._buf._0_4_ + (-4 - (int)pcVar19))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(deathScreenPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar19)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1689,7 +1689,7 @@ LAB_00921eab: } deathScreenPath._size = 0; deathScreenPath._capacity = 0xf; - deathScreenPath._buf._0_4_ = deathScreenPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(deathScreenPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(deathScreenPath._buf) + 0x0)) & 0xffffff00; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)&(scene[1]) + 0x4))))->ANM2::Play((byte *)"Diary",0); diaryColor._offset[0] = -0.1283; diaryColor._colorize[0] = 0.0; @@ -1722,7 +1722,7 @@ LAB_00922220: PlayerManager::FirstCollectibleOwner (&game->_playerManager,0x19e,(RNG **)&game->_playerManager,1); if (collectibleOwner != (Entity_Player *)0x0) { - uVar17 = (uint)ppvVar5[0x13]; + uVar17 = GHIDRA_UINT(ppvVar5[0x13]); local_2b8 = 0x500000001; local_254 = (EntityConfig_Entity *)0x10; local_2b0 = 0x10; @@ -1757,7 +1757,7 @@ LAB_00922220: uVar17 = 3; } randomRoom = RoomConfig::GetRandomRoom - (&g_game->_roomConfig,(uint)local_254,0,iVar14,4,roomData->Shape,0, + (&g_game->_roomConfig,GHIDRA_UINT(local_254),0,iVar14,4,roomData->Shape,0, -1,1,10,(uint *)&roomData->Doors,uVar17,-1); local_25c = roomData; if (randomRoom != (RoomConfig_Room *)0x0) { @@ -1771,8 +1771,8 @@ LAB_00922378: treasureLabel[0] = (char *****)0x0; treasureItems[0] = 0; treasureItems[1] = 0; - local_14._0_1_ = 8; - local_264 = (uint)local_258[0x13]; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; + local_264 = GHIDRA_UINT(local_258[0x13]); local_254 = (EntityConfig_Entity *)&DAT_00000007; local_2c0 = 7; treasureRngShifts = 0x700000002; @@ -1804,7 +1804,7 @@ LAB_00922789: if (0xfff < uVar11) { pppppcVar15 = (char *****)treasureLabel[0][-1]; uVar11 = uVar17 + 0x24; - if ((char *)0x1f < (char *)((int)treasureLabel[0] + (-4 - (int)pppppcVar15))) + if ((char *)0x1f < (char *)(GHIDRA_INT(treasureLabel[0]) + (-4 - GHIDRA_INT(pppppcVar15)))) goto LAB_00921eab; } LAB_009227fa: @@ -1827,17 +1827,17 @@ LAB_00922809: local_264 = local_264 << ((byte)((ulonglong)treasureRngShifts >> 0x20) & 0x1f) ^ local_264; uVar17 = local_264 >> ((byte)local_254 & 0x1f) ^ local_264; - spawn = (short *)((int)local_25c->Spawns + (int)local_24c); - local_248 = (char *****)(*spawn + 1 + (spawn[1] + 1) * (uint)local_25c->Width); + spawn = (short *)(GHIDRA_INT(local_25c->Spawns) + GHIDRA_INT(local_24c)); + local_248 = (char *****)(*spawn + 1 + (spawn[1] + 1) * GHIDRA_UINT(local_25c->Width)); local_264 = uVar17; if ((char)spawn[4] != '\0') { - pickedEntry = ((Spawn *)(spawn))->Spawn::PickEntry((float)((double)(int)uVar17 + + pickedEntry = ((Spawn *)(spawn))->Spawn::PickEntry((float)((double)GHIDRA_INT(uVar17) + __uint_to_double_fixup - [-((int)uVar17 >> 0x1f)]) * 2.3283062e-10) + [-(GHIDRA_INT(uVar17) >> 0x1f)]) * 2.3283062e-10) ; treasureEntry = *pickedEntry; treasureEntryExtra = *(undefined4 *)(pickedEntry + 1); - ((Room *)(g_game->_room))->Room::TransformEntry(&treasureEntry,(uint)local_248,uVar17); + ((Room *)(g_game->_room))->Room::TransformEntry(&treasureEntry,GHIDRA_UINT(local_248),uVar17); uStack_294 = 0x900000005; local_248 = (char *****)&DAT_00000007; if (uVar17 == 0) { @@ -1854,8 +1854,8 @@ LAB_00922809: uStack_294 = 0x900000005; uStack_28c = 7; collectibleSeed = treasureEntrySeed; - if (((int)treasureEntry == 5) && (treasureEntry._4_2_ == 100)) { - uVar11 = (uint)treasureEntry._6_2_; + if ((GHIDRA_INT(treasureEntry) == 5) && ((*(undefined2 *)((char *)&(treasureEntry) + 0x4)) == 100)) { + uVar11 = (*(undefined2 *)((char *)&(GHIDRA_UINT(treasureEntry)) + 0x6)); if (uVar11 == 0) { if (uVar17 >> 7 == uVar17) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -1870,13 +1870,13 @@ LAB_00922809: (collectibleSeed,1,(RoomDescriptor *)(local_258 + -4)); } collectibleConfig = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(uVar11); - treasureItems[iVar9] = (uint)collectibleConfig; + treasureItems[iVar9] = GHIDRA_UINT(collectibleConfig); iVar9 = iVar9 + 1; } } local_24c = (EntityConfig_Entity *)((local_24c->name)._buf + 4); - local_260 = (void *)((int)local_260 + 1); - } while (local_260 < (void *)(uint)(ushort)local_25c->SpawnCount); + local_260 = (void *)(GHIDRA_INT(local_260) + 1); + } while (local_260 < (void *)GHIDRA_UINT((ushort)local_25c->SpawnCount)); uVar17 = treasureLabelCapacity; pppppcVar15 = treasureLabel[0]; if (iVar9 == 0) { @@ -1923,7 +1923,7 @@ LAB_009226d0: if (uVar11 < 0x1000) goto LAB_009227fa; pppppcVar15 = (char *****)treasureLabel[0][-1]; uVar11 = uVar17 + 0x24; - if ((char *)0x1f < (char *)((int)treasureLabel[0] + (-4 - (int)pppppcVar15))) + if ((char *)0x1f < (char *)(GHIDRA_INT(treasureLabel[0]) + (-4 - GHIDRA_INT(pppppcVar15)))) goto LAB_00921eab; goto LAB_009227fa; } @@ -1979,26 +1979,26 @@ LAB_0092280c: *(uint *)(pcVar19 + 0x18) = treasureItems[0]; *(uint *)(pcVar19 + 0x1c) = treasureItems[1]; *(int *)&(*(undefined1 *)((char *)&(scene[1]) + 0x12c)) = *(int *)&(*(undefined1 *)((char *)&(scene[1]) + 0x12c)) + 1; - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; if (0xf < treasureLabelCapacity) { uVar17 = treasureLabelCapacity + 1; pppppcVar15 = treasureLabel[0]; if (0xfff < uVar17) { pppppcVar15 = (char *****)treasureLabel[0][-1]; uVar17 = treasureLabelCapacity + 0x24; - if ((char *)0x1f < (char *)((int)treasureLabel[0] + (-4 - (int)pppppcVar15))) + if ((char *)0x1f < (char *)(GHIDRA_INT(treasureLabel[0]) + (-4 - GHIDRA_INT(pppppcVar15)))) goto LAB_00921eab; } operator_delete(pppppcVar15,uVar17); } treasureLabelSize = 0; treasureLabelCapacity = 0xf; - treasureLabel[0] = (char *****)((uint)treasureLabel[0] & 0xffffff00); + treasureLabel[0] = (char *****)(GHIDRA_UINT(treasureLabel[0]) & 0xffffff00); game = g_game; LAB_009228d6: - local_274 = (void **)((int)local_274 + 1); + local_274 = (void **)(GHIDRA_INT(local_274) + 1); local_258 = local_258 + 0x2e; - if (game->_nbRooms <= (int)local_274) goto LAB_009228fb; + if (game->_nbRooms <= GHIDRA_INT(local_274)) goto LAB_009228fb; goto LAB_00922220; } LAB_009228fb: @@ -2031,9 +2031,9 @@ LAB_00922baf: (0x2d00000 < *(uint *)((char *)pvStack_2a0 + 0x10))) goto LAB_00922c20; pEVar12 = local_24c; if (((pvStack_2a0 != (manager->_entityConfig)._entities._head) && - ((EntityConfig_Entity *)((int)pvStack_2a0 + 0x18) != (EntityConfig_Entity *)0x0) + ((EntityConfig_Entity *)(GHIDRA_INT(pvStack_2a0) + 0x18) != (EntityConfig_Entity *)0x0) ) && (*(int *)((char *)pvStack_2a0 + 0x48) != 0)) { - pEVar12 = (EntityConfig_Entity *)((int)pvStack_2a0 + 0x18); + pEVar12 = (EntityConfig_Entity *)(GHIDRA_INT(pvStack_2a0) + 0x18); } } else { @@ -2052,15 +2052,15 @@ LAB_00922baf: local_248 = (char *****) (*spawn + 1 + (spawn[1] + 1) * - (uint)*(byte *)(*(int *)&(*(undefined1 *)((char *)&(local_25c[-2]) + 0x14)) + 0x46)); + GHIDRA_UINT(*(byte *)(*(int *)&(*(undefined1 *)((char *)&(local_25c[-2]) + 0x14)) + 0x46))); if ((char)spawn[4] != '\0') { - pickedEntry = ((Spawn *)(spawn))->Spawn::PickEntry((float)((double)(int)uVar17 + + pickedEntry = ((Spawn *)(spawn))->Spawn::PickEntry((float)((double)GHIDRA_INT(uVar17) + __uint_to_double_fixup - [-((int)uVar17 >> 0x1f)]) * + [-(GHIDRA_INT(uVar17) >> 0x1f)]) * 2.3283062e-10); bossEntry = *pickedEntry; bossEntryExtra = *(undefined4 *)(pickedEntry + 1); - ((Room *)(g_game->_room))->Room::TransformEntry(&bossEntry,(uint)local_248,uVar17); + ((Room *)(g_game->_room))->Room::TransformEntry(&bossEntry,GHIDRA_UINT(local_248),uVar17); uStack_2f8 = 0x900000005; local_248 = (char *****)&DAT_00000007; if (uVar17 == 0) { @@ -2078,8 +2078,8 @@ LAB_00922baf: uStack_2f0 = 7; local_2ec = bossEntrySeed; pEVar12 = EntityConfig::GetEntity - (&g_manager->_entityConfig,(int)bossEntry, - (uint)bossEntry._4_2_,(uint)bossEntry._6_2_); + (&g_manager->_entityConfig,GHIDRA_INT(bossEntry), + (*(undefined2 *)((char *)&(GHIDRA_UINT(bossEntry)) + 0x4)),(*(undefined2 *)((char *)&(GHIDRA_UINT(bossEntry)) + 0x6))); if (pEVar12 != (EntityConfig_Entity *)0x0) { ppvVar5 = (void **)pEVar12->bossID; if (ppvVar5 != (void **)0x0) { @@ -2112,69 +2112,69 @@ LAB_00922c20: isDoubleTrouble = false; } if (isDoubleTrouble) { - local_8c._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_8c._buf) + 0x0)) = std::_Allocate(0x20); local_8c._size = 0x11; local_8c._capacity = 0x1f; - builtin_strncpy((char *)local_8c._buf._0_4_,"BossDoubleTrouble",0x12); - local_14._0_1_ = 9; + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_8c._buf) + 0x0)),"BossDoubleTrouble",0x12); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; ((std::string *)(doubleTroubleItem))->std::string::string(&local_8c); secondBoss = pEVar12; if (local_274 != (void **)0x0) { secondBoss = local_254; } - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; firstBoss = pEVar12; std::deque<32byte>::push_back(doubleTroubleItem); ((std::string *)(doubleTroubleItem))->std::string::_Tidy_deallocate(); - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; if (0xf < local_8c._capacity) { uVar17 = local_8c._capacity + 1; - pcVar19 = (char *)local_8c._buf._0_4_; + pcVar19 = (*(undefined4 *)((char *)&((char *)local_8c._buf) + 0x0)); if (0xfff < uVar17) { - pcVar19 = *(char **)(local_8c._buf._0_4_ + -4); + pcVar19 = *(char **)((*(undefined4 *)((char *)&(local_8c._buf) + 0x0)) + -4); uVar17 = local_8c._capacity + 0x24; - if ((char *)0x1f < (char *)(local_8c._buf._0_4_ + (-4 - (int)pcVar19))) + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_8c._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar19)))) goto LAB_00921eab; } operator_delete(pcVar19,uVar17); } local_8c._size = 0; local_8c._capacity = 0xf; - local_8c._buf._0_4_ = local_8c._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(local_8c._buf) + 0x0)) = (*(undefined4 *)((char *)&(local_8c._buf) + 0x0)) & 0xffffff00; } else { bossLabelSize = 0; bossLabelCapacity = 0xf; bossLabel[0] = (void *)0x0; ((std::string *)((char *)bossLabel))->std::string::assign(&DAT_00b6c734,4); - local_14._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; ((std::string *)(bossItem))->std::string::string(bossLabel); local_e4 = 0; - local_14._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; bossConfig = pEVar12; std::deque<32byte>::push_back(bossItem); ((std::string *)(bossItem))->std::string::_Tidy_deallocate(); - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; if (0xf < bossLabelCapacity) { uVar17 = bossLabelCapacity + 1; pvVar18 = bossLabel[0]; if (0xfff < uVar17) { - pvVar18 = *(void **)((int)bossLabel[0] + -4); + pvVar18 = *(void **)(GHIDRA_INT(bossLabel[0]) + -4); uVar17 = bossLabelCapacity + 0x24; - if (0x1f < (uint)((int)bossLabel[0] + (-4 - (int)pvVar18))) goto LAB_00921eab; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(bossLabel[0]) + (-4 - GHIDRA_INT(pvVar18))))) goto LAB_00921eab; } operator_delete(pvVar18,uVar17); } bossLabelSize = 0; bossLabelCapacity = 0xf; - bossLabel[0] = (void *)((uint)bossLabel[0] & 0xffffff00); + bossLabel[0] = (void *)(GHIDRA_UINT(bossLabel[0]) & 0xffffff00); } game = g_game; } } - local_260 = (void *)((int)local_260 + 1); + local_260 = (void *)(GHIDRA_INT(local_260) + 1); local_25c = local_25c + 2; - } while ((int)local_260 < game->_nbRooms); + } while (GHIDRA_INT(local_260) < game->_nbRooms); } uVar17 = 0x1e; pcVar19 = "gfx/ui/stage/nightmare_dc.anm2"; @@ -2190,20 +2190,20 @@ LAB_00922e39: if (g_manager->_netplayManager != *(NetplayManager *)(g_manager + 1)) { playerManager = &g_game->_playerManager; local_254 = (EntityConfig_Entity *)0x0; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pEVar12 = local_254; pvVar18 = (playerManager->_playerList)._end; piVar10 = (playerManager->_playerList)._begin; - if ((int)pvVar18 - (int)piVar10 >> 2 == 0) { + if (GHIDRA_INT(pvVar18) - GHIDRA_INT(piVar10) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar18 = (playerManager->_playerList)._end; piVar10 = (playerManager->_playerList)._begin; } pEVar6 = local_254; - if (pEVar12 < (EntityConfig_Entity *)((int)pvVar18 - (int)piVar10 >> 2)) { - piVar10 = piVar10 + (int)pEVar12; + if (pEVar12 < (EntityConfig_Entity *)(GHIDRA_INT(pvVar18) - GHIDRA_INT(piVar10) >> 2)) { + piVar10 = piVar10 + GHIDRA_INT(pEVar12); } local_260 = (void *)*piVar10; peerIt = g_manager->_netplayManager; @@ -2213,25 +2213,25 @@ LAB_00922f0e: break; } puVar16 = (undefined1 *)0x0; - local_26c = (RoomDescriptor *)((int)*(NetplayManager *)(g_manager + 1) - (int)peerIt >> 2); + local_26c = (RoomDescriptor *)(GHIDRA_INT(*(NetplayManager *)(g_manager + 1)) - GHIDRA_INT(peerIt) >> 2); if (local_26c == (RoomDescriptor *)0x0) goto LAB_00922f0e; while (*(int *)(*(int *)peerIt + 0xc) != *(int *)((char *)local_260 + 0x1618)) { puVar16 = puVar16 + 1; - peerIt = (NetplayManager)((int)peerIt + 4); + peerIt = (NetplayManager)(GHIDRA_INT(peerIt) + 4); if (local_26c <= puVar16) goto LAB_00922f0e; } cVar7 = (**(code **)(*(int *)(*(int *)peerIt + 0x370) + 0x14))(); if (cVar7 != '\0') goto LAB_00922f0e; - local_254 = (EntityConfig_Entity *)((int)&pEVar6->id + 1); + local_254 = (EntityConfig_Entity *)(GHIDRA_INT(&pEVar6->id) + 1); playerManager = &g_game->_playerManager; } while (local_254 < (EntityConfig_Entity *) - ((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2)); } iVar9 = FUN_0090b070(); uVar17 = g_manager[1]._state - 5; - uVar17 = -(uint)(uVar17 != 0) & uVar17; + uVar17 = -GHIDRA_UINT((uVar17 != 0)) & uVar17; while( true ) { if (*(int *)(iVar9 + 0x3a4) == 0) { uVar11 = g_manager[1]._state; @@ -2250,17 +2250,17 @@ LAB_00922f0e: iVar9 = *(int *)((char *)local_270 + 0x13c0); local_268 = iVar9; if ((iVar9 < 0) || - (((int)(g_manager->_entityConfig)._players._end - - (int)(g_manager->_entityConfig)._players._begin) / 0x148 <= iVar9)) { + ((GHIDRA_INT((g_manager->_entityConfig)._players._end) - + GHIDRA_INT((g_manager->_entityConfig)._players._begin)) / 0x148 <= iVar9)) { pvVar18 = (void *)0x0; } else { - pvVar18 = (void *)(iVar9 * 0x148 + (int)(g_manager->_entityConfig)._players._begin); + pvVar18 = (void *)(iVar9 * 0x148 + GHIDRA_INT((g_manager->_entityConfig)._players._begin)); local_270 = pvVar18; if (pvVar18 != (void *)0x0) { Sprite::ReplaceSpritesheet - ((Sprite *)&(*(undefined1 *)((char *)(sceneRef) + 0x20)),2,(std_string *)((int)pvVar18 + 0x4c)); - ((Sprite *)((Sprite *)&(*(undefined1 *)((char *)(scene) + 0x20))))->Sprite::ReplaceSpritesheet(6,(std_string *)((int)pvVar18 + 0x4c)) + ((Sprite *)&(*(undefined1 *)((char *)(sceneRef) + 0x20)),2,(std_string *)(GHIDRA_INT(pvVar18) + 0x4c)); + ((Sprite *)((Sprite *)&(*(undefined1 *)((char *)(scene) + 0x20))))->Sprite::ReplaceSpritesheet(6,(std_string *)(GHIDRA_INT(pvVar18) + 0x4c)) ; pvVar18 = local_270; iVar9 = local_268; @@ -2273,7 +2273,7 @@ LAB_00923057: scene = sceneRef; bVar8 = extraout_CL; if (*(int *)((char *)pvVar18 + 0x8c) != 0) { - ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)&(sceneRef[1]) + 0x130))))->ANM2::Load((std_string *)((int)pvVar18 + 0x7c),1); + ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)&(sceneRef[1]) + 0x130))))->ANM2::Load((std_string *)(GHIDRA_INT(pvVar18) + 0x7c),1); anim = &(*(undefined1 *)((char *)&(scene[1]) + 0x148)); if (0xf < *(uint *)&(*(undefined1 *)((char *)&(scene[1]) + 0x15c))) { anim = *(byte **)anim; @@ -2286,9 +2286,9 @@ LAB_00923057: ((std::string *)(local_8c._buf))->std::string::string(game->_ventricleRazorPortals + uVar17 * 0xc4 + 0x5cc); scene = sceneRef; puVar16 = &(*(undefined1 *)((char *)(sceneRef) + 0x20)); - local_14._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xd; ((Sprite *)((Sprite *)puVar16))->Sprite::ReplaceSpritesheet(3,&local_8c); - local_14 = CONCAT31(local_14._1_3_,6); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),6); ((std::string *)(local_8c._buf))->std::string::_Tidy_deallocate(); ((ANM2 *)((ANM2 *)puVar16))->ANM2::LoadGraphics(unk_00); bVar8 = ((ANM2 *)((ANM2 *)puVar16))->ANM2::SetAnimation((byte *)"Intro",1); @@ -2333,7 +2333,7 @@ LAB_00923057: game = g_game; *(uint *)&(*(undefined1 *)((char *)(sceneRef) + 0x360)) = (*(int *)&(*(undefined1 *)((char *)(sceneRef) + 0x360)) + 1U) % - (uint)((*(int *)&(*(undefined1 *)((char *)(sceneRef) + 0xc)) - *(int *)&(*(undefined1 *)((char *)(sceneRef) + 0x8))) / 0x18); + GHIDRA_UINT(((*(int *)&(*(undefined1 *)((char *)(sceneRef) + 0xc)) - *(int *)&(*(undefined1 *)((char *)(sceneRef) + 0x8))) / 0x18)); iVar9 = game->_stage; *(int *)&(*(undefined1 *)((char *)(sceneRef) + 0x364)) = iVar9 + -1; iVar14 = game->_stageType; diff --git a/src/game/npc_helper.cpp b/src/game/npc_helper.cpp index ff305dd..9d62abf 100644 --- a/src/game/npc_helper.cpp +++ b/src/game/npc_helper.cpp @@ -17,7 +17,7 @@ void NpcHelper::the_lamb_pattern(Entity_NPC *npc, int pattern, int frame) float local_8; Manager *manager; - local_8 = (float)(__security_cookie ^ (uint)&(¶ms)[1].CircleAngle); + local_8 = (float)(__security_cookie ^ GHIDRA_UINT(&(¶ms)[1].CircleAngle)); ((ProjectileParams *)(¶ms))->ProjectileParams::ProjectileParams(); params.HeightModifier = 5.0; params.Scale = 1.8; @@ -52,7 +52,7 @@ void NpcHelper::the_lamb_pattern(Entity_NPC *npc, int pattern, int frame) } projectileCount = 3; projectileSpeed = 8.0; - params.BulletFlags._0_4_ = (uint)params.BulletFlags | 0x10000; + (*(undefined4 *)((char *)&(params.BulletFlags) + 0x0)) = GHIDRA_UINT(params.BulletFlags) | 0x10000; params.FallingSpeedModifier = 0.0; params.FallingAccelModifier = 0.0; } @@ -78,12 +78,12 @@ void NpcHelper::the_lamb_pattern(Entity_NPC *npc, int pattern, int frame) params.CircleAngle = (fVar2 / 30.0) * 6.2831855; } else { - params.BulletFlags._0_4_ = (uint)params.BulletFlags | 1; + (*(undefined4 *)((char *)&(params.BulletFlags) + 0x0)) = GHIDRA_UINT(params.BulletFlags) | 1; params.HomingStrength = 0.3; if (pattern == 4) { uVar1 = frame & 0x80000007; isEighthFrame = uVar1 == 0; - if ((int)uVar1 < 0) { + if (GHIDRA_INT(uVar1) < 0) { isEighthFrame = (uVar1 - 1 | 0xfffffff8) == 0xffffffff; } if (!isEighthFrame) { @@ -99,7 +99,7 @@ void NpcHelper::the_lamb_pattern(Entity_NPC *npc, int pattern, int frame) else if (pattern == 5) { uVar1 = frame & 0x80000007; isEighthFrame = uVar1 == 0; - if ((int)uVar1 < 0) { + if (GHIDRA_INT(uVar1) < 0) { isEighthFrame = (uVar1 - 1 | 0xfffffff8) == 0xffffffff; } if (!isEighthFrame) { @@ -115,7 +115,7 @@ void NpcHelper::the_lamb_pattern(Entity_NPC *npc, int pattern, int frame) else if (pattern == 6) { uVar1 = frame & 0x80000007; isEighthFrame = uVar1 == 0; - if ((int)uVar1 < 0) { + if (GHIDRA_INT(uVar1) < 0) { isEighthFrame = (uVar1 - 1 | 0xfffffff8) == 0xffffffff; } if (!isEighthFrame) { @@ -128,13 +128,13 @@ void NpcHelper::the_lamb_pattern(Entity_NPC *npc, int pattern, int frame) params.DotProductLimit = 0.4; uVar1 = Random(); params.CircleAngle = - ((float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283064e-10 - 0.5) * 3.1415927 * 0.1 + local_c8.y + 0.44879895; } else if (pattern == 7) { uVar1 = frame & 0x80000007; isEighthFrame = uVar1 == 0; - if ((int)uVar1 < 0) { + if (GHIDRA_INT(uVar1) < 0) { isEighthFrame = (uVar1 - 1 | 0xfffffff8) == 0xffffffff; } if (!isEighthFrame) { @@ -182,7 +182,7 @@ LAB_00483620: } local_c8.y = 1.62551e-43; seed_fart_sound_override((int *)&local_c8.y); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_c8.y,0.6,uVar1 % 0x1e + 0x14,0,pitch,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_c8.y),0.6,uVar1 % 0x1e + 0x14,0,pitch,0.0); local_c8.x = projectileSpeed; local_c8.y = (float)projectileCount; Entity_NPC::FireProjectiles(npc,&npc->_pos,&local_c8,9,¶ms); @@ -265,9 +265,9 @@ LAB_00499c40: *puVar2 = leftNode; puVar3 = (undefined4 *)leftNode[1]; *puVar3 = piVar4; - leftNode[1] = (int)puVar2; - in_EDX[1] = (int)puVar1; - piVar4[1] = (int)puVar3; + leftNode[1] = GHIDRA_INT(puVar2); + in_EDX[1] = GHIDRA_INT(puVar1); + piVar4[1] = GHIDRA_INT(puVar3); if (in_EDX == param_1) { return firstNode; } @@ -320,7 +320,7 @@ void NpcHelper::chimera_charge_begin(Entity_NPC *npc, Vector *target, float spee isLess = bVar1 < (byte)*chargeBeginName; if (bVar1 != *chargeBeginName) { LAB_0049f8b6: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0049f8bb; } if (bVar1 == 0) break; @@ -352,7 +352,7 @@ LAB_0049f8ee: } local_c = 4.21791e-43; seed_fart_sound_override((int *)&local_c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_c,1.0,2,0,local_8,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_c),1.0,2,0,local_8,0.0); dirX = target->x - (npc->_pos).x; local_c = target->y - (npc->_pos).y; length = sqrtf(dirX * dirX + local_c * local_c); @@ -449,13 +449,13 @@ Vector * NpcHelper::colostomia_pick_target(Entity_NPC *npc, Vector *outTarget, b local_8 = 0xffffffff; puStack_c = &LAB_00af2fd0; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(cellCounts + 0x1c4); + local_14 = __security_cookie ^ GHIDRA_UINT((cellCounts + 0x1c4)); ExceptionList = &local_10; local_71c = isPlayerPos; local_718 = outTarget; local_720 = npc; memset(cellCounts,0,0x700); - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&effects,1000,0x8d,1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&effects,1000,0x8d,1,0,0); local_8 = 0; uVar4 = 0; if (effects._size != 0) { @@ -466,8 +466,8 @@ Vector * NpcHelper::colostomia_pick_target(Entity_NPC *npc, Vector *outTarget, b fVar6 = *(float *)(iVar5 + 0x33c); fVar7 = *(float *)(iVar5 + 0x340); do { - iVar5 = (int)(((fVar6 + *(float *)((int)&DAT_00c5c5e8 + uVar3)) - 40.0) / 40.0 + 0.5); - gridWidth = (int)(((fVar7 + *(float *)((int)&DAT_00c5c5ec + uVar3)) - 120.0) / 40.0 + 0.5); + iVar5 = GHIDRA_INT((((fVar6 + *(float *)(GHIDRA_INT(&DAT_00c5c5e8) + uVar3)) - 40.0) / 40.0 + 0.5)); + gridWidth = GHIDRA_INT((((fVar7 + *(float *)(GHIDRA_INT(&DAT_00c5c5ec) + uVar3)) - 120.0) / 40.0 + 0.5)); if ((((-1 < iVar5) && (gridWidth = *(int *)((char *)room + 0xc), iVar5 < gridWidth)) && (-1 < gridWidth)) && ((gridWidth < *(int *)((char *)room + 0x10) && (iVar5 = gridWidth * gridWidth + iVar5, -1 < iVar5))) @@ -477,15 +477,15 @@ Vector * NpcHelper::colostomia_pick_target(Entity_NPC *npc, Vector *outTarget, b uVar3 = uVar3 + 8; } while (uVar3 < 0x48); uVar4 = uVar4 + 1; - } while (uVar4 < (uint)effects._size); + } while (uVar4 < GHIDRA_UINT(effects._size)); outTarget = local_718; } playerTarget = ((Entity_NPC *)(local_720))->Entity_NPC::GetPlayerTarget(); game = g_game; local_718 = (Vector *)(playerTarget->_pos).x; local_720 = (Entity_NPC *)(playerTarget->_pos).y; - iVar5 = (int)(((float)local_718 - 40.0) / 40.0 + 0.5); - gridWidth = (int)(((float)local_720 - 120.0) / 40.0 + 0.5); + iVar5 = GHIDRA_INT((((float)local_718 - 40.0) / 40.0 + 0.5)); + gridWidth = GHIDRA_INT((((float)local_720 - 120.0) / 40.0 + 0.5)); if (((iVar5 < 0) || (gridWidth = *(int *)((char *)g_game->_room + 0xc), gridWidth <= iVar5)) || ((gridWidth < 0 || (*(int *)((char *)g_game->_room + 0x10) <= gridWidth)))) { *local_71c = 1; @@ -502,9 +502,9 @@ Vector * NpcHelper::colostomia_pick_target(Entity_NPC *npc, Vector *outTarget, b bestY = (float)local_720; if (uVar3 != 0) { do { - cellY = (float)((int)uVar4 / gridWidth) * 40.0 + 120.0; + cellY = (float)(GHIDRA_INT(uVar4) / gridWidth) * 40.0 + 120.0; iVar5 = cellCounts[uVar4] * cellCounts[uVar4]; - cellX = (float)((int)uVar4 % gridWidth) * 40.0 + 40.0; + cellX = (float)(GHIDRA_INT(uVar4) % gridWidth) * 40.0 + 40.0; dy = (float)local_720 - cellY; score = (float)local_718 - cellX; score = dy * dy + score * score + @@ -520,7 +520,7 @@ Vector * NpcHelper::colostomia_pick_target(Entity_NPC *npc, Vector *outTarget, b *local_71c = 0; outTarget->x = fVar7; outTarget->y = bestY; - if (effects._0_1_ != '\0') { + if ((*(undefined1 *)((char *)&(effects) + 0x0)) != '\0') { ExceptionList = local_10; return outTarget; } @@ -528,7 +528,7 @@ Vector * NpcHelper::colostomia_pick_target(Entity_NPC *npc, Vector *outTarget, b allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (effects._data == (void *)0x0) { ExceptionList = local_10; @@ -536,15 +536,15 @@ Vector * NpcHelper::colostomia_pick_target(Entity_NPC *npc, Vector *outTarget, b } uVar4 = *(uint *)((char *)effects._data + -4); qVar1 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar4; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar4; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar1 < uVar4); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar4)); goto LAB_004a2cad; } } outTarget->x = (float)local_718; outTarget->y = (float)local_720; - if (effects._0_1_ != '\0') { + if ((*(undefined1 *)((char *)&(effects) + 0x0)) != '\0') { ExceptionList = local_10; return outTarget; } @@ -552,7 +552,7 @@ Vector * NpcHelper::colostomia_pick_target(Entity_NPC *npc, Vector *outTarget, b allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (effects._data == (void *)0x0) { ExceptionList = local_10; @@ -560,10 +560,10 @@ Vector * NpcHelper::colostomia_pick_target(Entity_NPC *npc, Vector *outTarget, b } uVar4 = *(uint *)((char *)effects._data + -4); qVar1 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar4; - *(uint *)((char *)allocCounter + 4) = *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar1 < uVar4); + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar4; + *(uint *)((char *)allocCounter + 4) = *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar4)); LAB_004a2cad: - free((void *)((int)effects._data + -4)); + free((void *)(GHIDRA_INT(effects._data) + -4)); ExceptionList = local_10; return outTarget; } @@ -625,8 +625,8 @@ void NpcHelper::colostomia_pick_dive_target(Entity_NPC *npc) bVar2 = ((Room *)(*roomSlot))->Room::IsPositionInRoom(diveTarget,60.0); if (bVar2 != 0) { room = *roomSlot; - iVar7 = (int)((diveTarget->x - 40.0) / 40.0 + 0.5); - iVar5 = (int)(((npc->_v1).y - 120.0) / 40.0 + 0.5); + iVar7 = GHIDRA_INT(((diveTarget->x - 40.0) / 40.0 + 0.5)); + iVar5 = GHIDRA_INT((((npc->_v1).y - 120.0) / 40.0 + 0.5)); if ((((iVar7 < 0) || (room->_gridWidth <= iVar7)) || (iVar5 < 0)) || (room->_gridHeight <= iVar5)) { iVar7 = -1; @@ -648,7 +648,7 @@ void NpcHelper::colostomia_pick_dive_target(Entity_NPC *npc) } while (attempt < 0xf); childRef = &nearestPlayer->_entityRef; if (nearestPlayer->_entityRef != (EntityPtr)0x0) { - local_20 = (EntityPtr)((int)nearestPlayer->_entityRef + 0x3bc); + local_20 = (EntityPtr)(GHIDRA_INT(nearestPlayer->_entityRef) + 0x3bc); if (*(EntityPtr *)local_20 != (EntityPtr)0x0) { local_24 = (EntityPtr *)local_20; std::multiset::erase(&local_24); @@ -682,7 +682,7 @@ void NpcHelper::colostomia_pick_dive_target(Entity_NPC *npc) bVar9 = bVar2 < *pbVar6; if (bVar2 != *pbVar6) { LAB_004a2fd4: - uVar3 = -(uint)bVar9 | 1; + uVar3 = -GHIDRA_UINT(bVar9) | 1; goto LAB_004a2fd9; } if (bVar2 == 0) break; @@ -734,7 +734,7 @@ void NpcHelper::delirium_remove_minions(int type, int variant, Entity *self, Ent local_8 = 0xffffffff; puStack_c = &LAB_00af30b5; local_10 = ExceptionList; - uVar5 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar5 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; npcIdx = 0; pvVar1 = g_game->_room; @@ -765,7 +765,7 @@ LAB_004a62df: } while (npcIdx < *(uint *)((char *)pvVar1 + 0x1264)); } if (targetType == 0x4f) { - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&tmpList,0x4f,0x14,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&tmpList,0x4f,0x14,-1,0,0); iVar6 = tmpList._size; pvVar1 = tmpList._data; local_8 = 0; @@ -774,31 +774,31 @@ LAB_004a62df: do { (**(code **)(**(int **)((char *)pvVar1 + uVar5 * 4) + 0x28))(); uVar5 = uVar5 + 1; - } while (uVar5 < (uint)iVar6); + } while (uVar5 < GHIDRA_UINT(iVar6)); } joined_r0x004a63ae: local_8 = 0xffffffff; - if (tmpList._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(tmpList) + 0x0)) == '\0') { local_8 = 0xffffffff; if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (pvVar1 != (void *)0x0) { uVar5 = *(uint *)((char *)pvVar1 + -4); qVar3 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar5; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar5; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar3 < uVar5); - free((void *)((int)pvVar1 + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar3) < uVar5)); + free((void *)(GHIDRA_INT(pvVar1) + -4)); } local_8 = 0xffffffff; } } else if (targetType == 0x197) { - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&tmpList,1000,0x65,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&tmpList,1000,0x65,-1,0,0); iVar6 = tmpList._size; pvVar1 = tmpList._data; local_8 = 2; @@ -807,11 +807,11 @@ joined_r0x004a63ae: do { (**(code **)(**(int **)((char *)pvVar1 + uVar5 * 4) + 0x28))(); uVar5 = uVar5 + 1; - } while (uVar5 < (uint)iVar6); + } while (uVar5 < GHIDRA_UINT(iVar6)); } goto joined_r0x004a63ae; } - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&laserList,7,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&laserList,7,-1,-1,0,0); local_8 = 4; uVar5 = 0; if (laserList._size != 0) { @@ -821,47 +821,47 @@ joined_r0x004a63ae: (**(code **)(*tmpEntity + 0x28))(); } uVar5 = uVar5 + 1; - } while (uVar5 < (uint)laserList._size); + } while (uVar5 < GHIDRA_UINT(laserList._size)); } - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&tmpList,0x60,0,-1,0,0); - local_8 = CONCAT31(local_8._1_3_,5); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&tmpList,0x60,0,-1,0,0); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),5); uVar5 = 0; if (tmpList._size != 0) { do { (**(code **)(**(int **)((char *)tmpList._data + uVar5 * 4) + 0x28))(); uVar5 = uVar5 + 1; - } while (uVar5 < (uint)tmpList._size); + } while (uVar5 < GHIDRA_UINT(tmpList._size)); } - if (tmpList._0_1_ == '\0') { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + if ((*(undefined1 *)((char *)&(tmpList) + 0x0)) == '\0') { + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } if (tmpList._data != (void *)0x0) { uVar5 = *(uint *)((char *)tmpList._data + -4); qVar3 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar5; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar5; freeFn = free_exref; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar3 < uVar5); - free((void *)((int)tmpList._data + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar3) < uVar5)); + free((void *)(GHIDRA_INT(tmpList._data) + -4)); goto LAB_004a64bb; } } freeFn = free_exref; LAB_004a64bb: - if (laserList._0_1_ == '\0') { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + if ((*(undefined1 *)((char *)&(laserList) + 0x0)) == '\0') { + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } if (laserList._data != (void *)0x0) { uVar5 = *(uint *)((char *)laserList._data + -4); qVar3 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar5; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar5; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar3 < uVar5); - (*freeFn)((int)laserList._data + -4); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar3) < uVar5)); + (*freeFn)(GHIDRA_INT(laserList._data) + -4); } } ExceptionList = local_10; @@ -913,7 +913,7 @@ void NpcHelper::delirium_spawn_form_parts(Entity_NPC *npc, float maxHealth) local_c = local_c * (1.0 / fVar7); } uVar4 = Random(); - segmentIndex = (float)(int)(uVar4 % 0x5a - 0x2d) * 0.017453292; + segmentIndex = (float)GHIDRA_INT((uVar4 % 0x5a - 0x2d)) * 0.017453292; local_10 = (EntityPtr *)cos(segmentIndex); fVar7 = sin(segmentIndex); segmentIndex = 1.4013e-45; @@ -923,8 +923,8 @@ void NpcHelper::delirium_spawn_form_parts(Entity_NPC *npc, float maxHealth) if (0 < segmentCount) { do { fVar7 = segmentIndex; - spawnPos.y = (float)(int)segmentIndex * 20.0 * dirY + (spawner->_pos).y; - spawnPos.x = (float)(int)segmentIndex * 20.0 * dirX + (spawner->_pos).x; + spawnPos.y = (float)GHIDRA_INT(segmentIndex) * 20.0 * dirY + (spawner->_pos).y; + spawnPos.x = (float)GHIDRA_INT(segmentIndex) * 20.0 * dirX + (spawner->_pos).x; uVar4 = Random(); local_10 = (EntityPtr *)(((float)(uVar4 % 5000) + 0.0) / 1000.0); uVar4 = Random(); @@ -939,7 +939,7 @@ void NpcHelper::delirium_spawn_form_parts(Entity_NPC *npc, float maxHealth) *(float *)((char *)EVar5 + 900) = formMaxHealth; *(byte *)((char *)EVar5 + 0x3b0) = 1; } - linkSlot = (EntityPtr *)((int)EVar5 + 0x3bc); + linkSlot = (EntityPtr *)(GHIDRA_INT(EVar5) + 0x3bc); if (*(EntityPtr *)((char *)EVar5 + 0x3bc) != (EntityPtr)0x0) { local_10 = linkSlot; std::multiset::erase(&local_10); @@ -948,7 +948,7 @@ void NpcHelper::delirium_spawn_form_parts(Entity_NPC *npc, float maxHealth) if ((EntityPtr)npc != (EntityPtr)0x0) { std::multiset::insert(linkSlot); } - linkSlot = (EntityPtr *)((int)npc + 0x3c0); + linkSlot = (EntityPtr *)(GHIDRA_INT(npc) + 0x3c0); if (*(int *)((char *)npc + 0x3c0) != 0) { local_10 = linkSlot; std::multiset::erase(&local_10); @@ -975,14 +975,14 @@ void NpcHelper::delirium_spawn_form_parts(Entity_NPC *npc, float maxHealth) local_c = (float)(*(int *)((char *)EVar5 + 0xc0c) - 1U & uVar4 >> 1); local_10 = *(EntityPtr **)((char *)EVar5 + 0xc08); local_24 = (EntityPtr)uVar4; - if (local_10[(int)local_c] == (EntityPtr)0x0) { + if (local_10[GHIDRA_INT(local_c)] == (EntityPtr)0x0) { newBlock = operator_new(0x10); - *(void **)(*(int *)((char *)EVar5 + 0xc08) + (int)local_c * 4) = newBlock; + *(void **)(*(int *)((char *)EVar5 + 0xc08) + GHIDRA_INT(local_c) * 4) = newBlock; local_10 = *(EntityPtr **)((char *)EVar5 + 0xc08); } uVar1 = *(undefined4 *)((char *)EVar5 + 0x340); uVar2 = *(undefined4 *)((char *)EVar5 + 0x33c); - posBlock = local_10[(int)local_c]; + posBlock = local_10[GHIDRA_INT(local_c)]; *(undefined4 *)((char *)posBlock + (uVar4 & 1) * 8) = uVar2; *(undefined4 *)((char *)posBlock + 4 + (uVar4 & 1) * 8) = uVar1; *(int *)((char *)EVar5 + 0xc14) = *(int *)((char *)EVar5 + 0xc14) + 1; @@ -1003,26 +1003,26 @@ void NpcHelper::delirium_spawn_form_parts(Entity_NPC *npc, float maxHealth) local_10 = (EntityPtr *)(*(int *)((char *)EVar5 + 0xc20) - 1U & uVar4 >> 1); local_c = *(float *)((char *)EVar5 + 0xc1c); local_24 = (EntityPtr)uVar4; - if (*(int *)((char *)local_c + (int)local_10 * 4) == 0) { + if (*(int *)((char *)local_c + GHIDRA_INT(local_10) * 4) == 0) { newBlock = operator_new(0x10); - *(void **)(*(int *)((char *)EVar5 + 0xc1c) + (int)local_10 * 4) = newBlock; + *(void **)(*(int *)((char *)EVar5 + 0xc1c) + GHIDRA_INT(local_10) * 4) = newBlock; local_c = *(float *)((char *)EVar5 + 0xc1c); } uVar1 = *(undefined4 *)((char *)EVar5 + 0x360); - velBlock = *(int *)((char *)local_c + (int)local_10 * 4); + velBlock = *(int *)((char *)local_c + GHIDRA_INT(local_10) * 4); *(undefined4 *)(velBlock + 4 + (uVar4 & 1) * 8) = *(undefined4 *)((char *)EVar5 + 0x364); *(undefined4 *)(velBlock + (uVar4 & 1) * 8) = uVar1; *(int *)((char *)EVar5 + 0xc28) = *(int *)((char *)EVar5 + 0xc28) + 1; *(EntityPtr *)((char *)EVar5 + 0xc24) = local_24; *(int *)((char *)EVar5 + 0xc7c) = formNpc->_groupIdx; - ANM2::LoadDeliriumForm((ANM2 *)((int)EVar5 + 0x48),formNpc->_type,formNpc->_variant,1); + ANM2::LoadDeliriumForm((ANM2 *)(GHIDRA_INT(EVar5) + 0x48),formNpc->_type,formNpc->_variant,1); animData = *(byte **)((char *)EVar5 + 0x7c); local_24 = EVar5; if (animData == (byte *)0x0) { LAB_004a8acc: - bVar3 = ((ANM2 *)((ANM2 *)((int)EVar5 + 0x48)))->ANM2::SetAnimation((byte *)"WalkBodyHori",1); + bVar3 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(EVar5) + 0x48)))->ANM2::SetAnimation((byte *)"WalkBodyHori",1); if (bVar3 != 0) { - ((AnimationState *)((AnimationState *)((int)EVar5 + 0x78)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(EVar5) + 0x78)))->AnimationState::Rewind(); *(undefined1 *)((char *)EVar5 + 0x8c) = 1; } } @@ -1037,7 +1037,7 @@ LAB_004a8acc: isCharLess = bVar3 < (byte)*expectedAnimChar; if (bVar3 != *expectedAnimChar) { LAB_004a8ab6: - uVar4 = -(uint)isCharLess | 1; + uVar4 = -GHIDRA_UINT(isCharLess) | 1; goto LAB_004a8abb; } if (bVar3 == 0) break; @@ -1053,10 +1053,10 @@ LAB_004a8abb: goto LAB_004a8acc; } (**(code **)(*(int *)EVar5 + 0xc))(); - segmentIndex = (float)((int)segmentIndex + 1); + segmentIndex = (float)(GHIDRA_INT(segmentIndex) + 1); npc = (Entity_NPC *)local_24; spawner = formNpc; - if (segmentCount < (int)segmentIndex) { + if (segmentCount < GHIDRA_INT(segmentIndex)) { return; } } while( true ); @@ -1117,7 +1117,7 @@ void NpcHelper::delirium_fire_pattern(Entity_NPC *npc) uint attackId; byte *curAnimData; - local_8 = __security_cookie ^ (uint)(delayTable + 0x12); + local_8 = __security_cookie ^ GHIDRA_UINT((delayTable + 0x12)); if (npc->_type == 0x2d) { return; } @@ -1128,7 +1128,7 @@ void NpcHelper::delirium_fire_pattern(Entity_NPC *npc) patternId = attackId & 0xff; local_140 = attackId >> 8; keepPatternChance = attackId >> 0x10 & 0xff; - attackAngle = (uint)npc->_deliriumAttackAngle; + attackAngle = GHIDRA_UINT(npc->_deliriumAttackAngle); uVar5 = local_140 & 0xff; repeatsLeft = uVar5; if (patternId == 0xff) { @@ -1159,32 +1159,32 @@ void NpcHelper::delirium_fire_pattern(Entity_NPC *npc) else { iVar2 = 0; do { - auVar10._4_4_ = iVar2 + 1; - auVar10._0_4_ = iVar2; - auVar10._8_4_ = iVar2 + 2; - auVar10._12_4_ = iVar2 + 3; + (*(undefined4 *)((char *)&(auVar10) + 0x4)) = iVar2 + 1; + (*(undefined4 *)((char *)&(auVar10) + 0x0)) = iVar2; + (*(undefined4 *)((char *)&(auVar10) + 0x8)) = iVar2 + 2; + (*(undefined4 *)((char *)&(auVar10) + 0xc)) = iVar2 + 3; auVar9 = pmulld(auVar10,_DAT_00bab470); angleTable[iVar2] = (float)iVar2 * 3.1415927; - angleTable[iVar2 + 1] = (float)auVar10._4_4_ * 3.1415927; - angleTable[iVar2 + 2] = (float)auVar10._8_4_ * 3.1415927; - angleTable[iVar2 + 3] = (float)auVar10._12_4_ * 3.1415927; - delayTable[iVar2] = (int)((-(uint)(auVar9._0_4_ < 0) & 1) + auVar9._0_4_) >> 1; - delayTable[iVar2 + 1] = (int)((-(uint)(auVar9._4_4_ < 0) & 1) + auVar9._4_4_) >> 1; - delayTable[iVar2 + 2] = (int)((-(uint)(auVar9._8_4_ < 0) & 1) + auVar9._8_4_) >> 1; - delayTable[iVar2 + 3] = (int)((-(uint)(auVar9._12_4_ < 0) & 1) + auVar9._12_4_) >> 1; - auVar9._4_4_ = iVar2 + 5; - auVar9._0_4_ = iVar2 + 4; - auVar9._8_4_ = iVar2 + 6; - auVar9._12_4_ = iVar2 + 7; + angleTable[iVar2 + 1] = (*(undefined4 *)((char *)&((float)auVar10) + 0x4)) * 3.1415927; + angleTable[iVar2 + 2] = (*(undefined4 *)((char *)&((float)auVar10) + 0x8)) * 3.1415927; + angleTable[iVar2 + 3] = (*(undefined4 *)((char *)&((float)auVar10) + 0xc)) * 3.1415927; + delayTable[iVar2] = GHIDRA_INT(((-GHIDRA_UINT(((*(undefined4 *)((char *)&(auVar9) + 0x0)) < 0)) & 1) + (*(undefined4 *)((char *)&(auVar9) + 0x0)))) >> 1; + delayTable[iVar2 + 1] = GHIDRA_INT(((-GHIDRA_UINT(((*(undefined4 *)((char *)&(auVar9) + 0x4)) < 0)) & 1) + (*(undefined4 *)((char *)&(auVar9) + 0x4)))) >> 1; + delayTable[iVar2 + 2] = GHIDRA_INT(((-GHIDRA_UINT(((*(undefined4 *)((char *)&(auVar9) + 0x8)) < 0)) & 1) + (*(undefined4 *)((char *)&(auVar9) + 0x8)))) >> 1; + delayTable[iVar2 + 3] = GHIDRA_INT(((-GHIDRA_UINT(((*(undefined4 *)((char *)&(auVar9) + 0xc)) < 0)) & 1) + (*(undefined4 *)((char *)&(auVar9) + 0xc)))) >> 1; + (*(undefined4 *)((char *)&(auVar9) + 0x4)) = iVar2 + 5; + (*(undefined4 *)((char *)&(auVar9) + 0x0)) = iVar2 + 4; + (*(undefined4 *)((char *)&(auVar9) + 0x8)) = iVar2 + 6; + (*(undefined4 *)((char *)&(auVar9) + 0xc)) = iVar2 + 7; auVar10 = pmulld(auVar9,_DAT_00bab470); angleTable[iVar2 + 4] = (float)(iVar2 + 4) * 3.1415927; - angleTable[iVar2 + 5] = (float)auVar9._4_4_ * 3.1415927; - angleTable[iVar2 + 6] = (float)auVar9._8_4_ * 3.1415927; - angleTable[iVar2 + 7] = (float)auVar9._12_4_ * 3.1415927; - delayTable[iVar2 + 4] = (int)((-(uint)(auVar10._0_4_ < 0) & 1) + auVar10._0_4_) >> 1; - delayTable[iVar2 + 5] = (int)((-(uint)(auVar10._4_4_ < 0) & 1) + auVar10._4_4_) >> 1; - delayTable[iVar2 + 6] = (int)((-(uint)(auVar10._8_4_ < 0) & 1) + auVar10._8_4_) >> 1; - delayTable[iVar2 + 7] = (int)((-(uint)(auVar10._12_4_ < 0) & 1) + auVar10._12_4_) >> 1; + angleTable[iVar2 + 5] = (*(undefined4 *)((char *)&((float)auVar9) + 0x4)) * 3.1415927; + angleTable[iVar2 + 6] = (*(undefined4 *)((char *)&((float)auVar9) + 0x8)) * 3.1415927; + angleTable[iVar2 + 7] = (*(undefined4 *)((char *)&((float)auVar9) + 0xc)) * 3.1415927; + delayTable[iVar2 + 4] = GHIDRA_INT(((-GHIDRA_UINT(((*(undefined4 *)((char *)&(auVar10) + 0x0)) < 0)) & 1) + (*(undefined4 *)((char *)&(auVar10) + 0x0)))) >> 1; + delayTable[iVar2 + 5] = GHIDRA_INT(((-GHIDRA_UINT(((*(undefined4 *)((char *)&(auVar10) + 0x4)) < 0)) & 1) + (*(undefined4 *)((char *)&(auVar10) + 0x4)))) >> 1; + delayTable[iVar2 + 6] = GHIDRA_INT(((-GHIDRA_UINT(((*(undefined4 *)((char *)&(auVar10) + 0x8)) < 0)) & 1) + (*(undefined4 *)((char *)&(auVar10) + 0x8)))) >> 1; + delayTable[iVar2 + 7] = GHIDRA_INT(((-GHIDRA_UINT(((*(undefined4 *)((char *)&(auVar10) + 0xc)) < 0)) & 1) + (*(undefined4 *)((char *)&(auVar10) + 0xc)))) >> 1; iVar2 = iVar2 + 8; } while (iVar2 < 0x10); } @@ -1382,7 +1382,7 @@ LAB_004a9394: } bVar7 = false; iVar6 = 0; - local_16c = (ulonglong)(uint)(((float)(int)attackAngle / 255.0) * 6.2831855) << 0x20; + local_16c = (ulonglong)GHIDRA_UINT((((float)GHIDRA_INT(attackAngle) / 255.0) * 6.2831855)) << 0x20; do { iVar3 = (attackId >> 0x18) - delayTable[iVar6]; local_144 = iVar3 / (iVar2 * fireInterval); @@ -1412,7 +1412,7 @@ LAB_004a9394: local_90 = 0; projParams.HeightModifier = 5.0; projParams.CircleAngle = - (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 3.1415927; projParams.HomingStrength = 1.0; projParams.CurvingStrength = 0.005; @@ -1434,35 +1434,35 @@ LAB_004a9394: uVar4 = Random(); projParams.FallingAccelModifier = -0.06; projParams.FallingSpeedModifier = -3.2; - projParams.BulletFlags._0_4_ = (uint)projParams.BulletFlags | extraBulletFlags; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = GHIDRA_UINT(projParams.BulletFlags) | extraBulletFlags; projParams.Color._colorize[3] = 1.0; projParams.Scale = - (float)((double)(int)(uVar4 % 0xffffffff) + - __uint_to_double_fixup[-((int)(uVar4 % 0xffffffff) >> 0x1f)]) * 2.3283064e-10 + + (float)((double)GHIDRA_INT((uVar4 % 0xffffffff)) + + __uint_to_double_fixup[-(GHIDRA_INT((uVar4 % 0xffffffff)) >> 0x1f)]) * 2.3283064e-10 + 1.5; projParams.TargetPosition.x = (npc->_pos).x; projParams.TargetPosition.y = (npc->_pos).y; - projParams.CircleAngle = local_16c._4_4_ + angleTable[iVar6]; + projParams.CircleAngle = (*(undefined4 *)((char *)&(local_16c) + 0x4)) + angleTable[iVar6]; projParams.Color._colorize[0] = colorizeR; projParams.Color._colorize[1] = colorizeG; projParams.Color._colorize[2] = colorizeB; if (isAlternating != '\0') { if ((local_144 & 1) == 0) { - projParams.BulletFlags._0_4_ = (uint)projParams.BulletFlags | 0x80000; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = GHIDRA_UINT(projParams.BulletFlags) | 0x80000; projParams.Color._colorize[0] = altColorizeR; projParams.Color._colorize[1] = local_158; projParams.Color._colorize[2] = local_158; } else { - projParams.BulletFlags._0_4_ = (uint)projParams.BulletFlags | 0x40000; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = GHIDRA_UINT(projParams.BulletFlags) | 0x40000; } } projParams.BulletFlags = - CONCAT44(projParams.BulletFlags._4_4_ | local_140,(uint)projParams.BulletFlags); + CONCAT44((*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x4)) | local_140,GHIDRA_UINT(projParams.BulletFlags)); if (local_164 == 1.26117e-44) { - projVelocity.y = (float)(int)uVar5; + projVelocity.y = (float)GHIDRA_INT(uVar5); } - Entity_NPC::FireProjectiles(npc,&npc->_pos,&projVelocity,(uint)local_164,&projParams); + Entity_NPC::FireProjectiles(npc,&npc->_pos,&projVelocity,GHIDRA_UINT(local_164),&projParams); bVar7 = true; } uVar4 = repeatsLeft; @@ -1482,7 +1482,7 @@ LAB_004a9394: bVar7 = bVar1 < (byte)*expectedNameCh; if (bVar1 != *expectedNameCh) { LAB_004a9717: - uVar5 = -(uint)bVar7 | 1; + uVar5 = -GHIDRA_UINT(bVar7) | 1; goto LAB_004a971c; } if (bVar1 == 0) break; @@ -1505,7 +1505,7 @@ LAB_004a971c: } LAB_004a9753: uVar4 = uVar4 - 1; - if ((int)uVar4 < 1) { + if (GHIDRA_INT(uVar4) < 1) { uVar5 = Random(); if (uVar5 % 100 < keepPatternChance) { keepPatternChance = keepPatternChance - 10; @@ -1571,8 +1571,8 @@ void NpcHelper::delirium_morph_update(Entity_NPC *npc) uVar3 = cycleTime; stepVelocityX = (npc->_velocity).x; stepVelocityY = (npc->_velocity).y; - aiUpdateCount = (int)local_1c + 1; - chanceDivisor = 3 - (int)local_1c; + aiUpdateCount = GHIDRA_INT(local_1c) + 1; + chanceDivisor = 3 - GHIDRA_INT(local_1c); nextCycleCount = uVar4 - 1; if (uVar4 == 0) { nextCycleCount = 0; @@ -1582,11 +1582,11 @@ void NpcHelper::delirium_morph_update(Entity_NPC *npc) fVar7 = 4.2039e-45; } iVar2 = npc->_type; - iVar1 = (int)fVar7 >> 0x1f; + iVar1 = GHIDRA_INT(fVar7) >> 0x1f; if (iVar2 < 0x194) { if (iVar2 == 0x193) { switchD_004a998d_caseD_45: - fVar5 = (float)((double)(int)fVar7 + __uint_to_double_fixup[-iVar1]) / 3.0; + fVar5 = (float)((double)GHIDRA_INT(fVar7) + __uint_to_double_fixup[-iVar1]) / 3.0; stepVelocityX = stepVelocityX * fVar5; stepVelocityY = stepVelocityY * fVar5; goto switchD_004a998d_caseD_15; @@ -1599,7 +1599,7 @@ switchD_004a998d_caseD_45: case 100: case 0xed: case 0x10b: - fVar5 = (float)((double)(int)fVar7 + __uint_to_double_fixup[-iVar1]) / 3.0; + fVar5 = (float)((double)GHIDRA_INT(fVar7) + __uint_to_double_fixup[-iVar1]) / 3.0; stepVelocityX = stepVelocityX * 0.20000005 * fVar5; stepVelocityY = stepVelocityY * 0.20000005 * fVar5; break; @@ -1622,7 +1622,7 @@ switchD_004a998d_caseD_45: KAGE_LogMessage(0x10,(byte *)"Start and End parameters cannot be the same!"); } fVar7 = (float)__ftoui3(); - aiUpdateCount = (int)fVar7 + 1; + aiUpdateCount = GHIDRA_INT(fVar7) + 1; local_1c = fVar7; goto LAB_004a9b6d; case 0x2d: @@ -1642,17 +1642,17 @@ switchD_004a998d_caseD_45: else { fVar5 = 2.0; } - stepFraction = (float)((double)(int)fVar7 + __uint_to_double_fixup[-iVar1]) / 3.0; + stepFraction = (float)((double)GHIDRA_INT(fVar7) + __uint_to_double_fixup[-iVar1]) / 3.0; stepVelocityX = stepVelocityX * (fVar5 - 1.0) * stepFraction; stepVelocityY = stepVelocityY * (fVar5 - 1.0) * stepFraction; break; case 0x3f: - fVar5 = (float)((double)(int)fVar7 + __uint_to_double_fixup[-iVar1]) / 3.0; + fVar5 = (float)((double)GHIDRA_INT(fVar7) + __uint_to_double_fixup[-iVar1]) / 3.0; stepVelocityX = stepVelocityX * 1.5 * fVar5; stepVelocityY = stepVelocityY * 1.5 * fVar5; break; case 0x41: - fVar5 = (float)((double)(int)fVar7 + __uint_to_double_fixup[-iVar1]) / 3.0; + fVar5 = (float)((double)GHIDRA_INT(fVar7) + __uint_to_double_fixup[-iVar1]) / 3.0; if (npc->_variant == 10) { stepVelocityX = stepVelocityX * 0.0 * fVar5; stepVelocityY = stepVelocityY * 0.0 * fVar5; @@ -1665,7 +1665,7 @@ switchD_004a998d_caseD_45: case 0x43: if (npc->_variant != 1) goto LAB_004aa3d4; LAB_004a9b6d: - fVar5 = (float)((double)(int)fVar7 + __uint_to_double_fixup[-((int)fVar7 >> 0x1f)]) / 3.0; + fVar5 = (float)((double)GHIDRA_INT(fVar7) + __uint_to_double_fixup[-(GHIDRA_INT(fVar7) >> 0x1f)]) / 3.0; LAB_004a9b8f: stepVelocityX = stepVelocityX * 0.39999998; stepVelocityY = stepVelocityY * 0.39999998; @@ -1689,7 +1689,7 @@ LAB_004a9b9f: } LAB_004a9d83: fVar7 = (float)__ftoui3(); - aiUpdateCount = (int)fVar7 + 1; + aiUpdateCount = GHIDRA_INT(fVar7) + 1; local_1c = fVar7; goto LAB_004aa3d4; case 0x45: @@ -1703,7 +1703,7 @@ LAB_004a9d83: else { fVar5 = 1.2; } - stepFraction = (float)((double)(int)fVar7 + __uint_to_double_fixup[-iVar1]) / 3.0; + stepFraction = (float)((double)GHIDRA_INT(fVar7) + __uint_to_double_fixup[-iVar1]) / 3.0; stepVelocityX = stepVelocityX * (fVar5 - 1.0) * stepFraction; stepVelocityY = stepVelocityY * (fVar5 - 1.0) * stepFraction; break; @@ -1716,7 +1716,7 @@ LAB_004a9d83: if (iVar2 == 0) { npc->_stateFrame = 0; } - fVar7 = (float)((double)(int)fVar7 + __uint_to_double_fixup[-iVar1]) / 3.0; + fVar7 = (float)((double)GHIDRA_INT(fVar7) + __uint_to_double_fixup[-iVar1]) / 3.0; stepVelocityX = stepVelocityX * 0.20000005 * fVar7; stepVelocityY = stepVelocityY * 0.20000005 * fVar7; local_28 = npc->_health; @@ -1726,7 +1726,7 @@ LAB_004a9d83: } } else { - fVar7 = (float)((double)(int)fVar7 + __uint_to_double_fixup[-iVar1]) / 3.0; + fVar7 = (float)((double)GHIDRA_INT(fVar7) + __uint_to_double_fixup[-iVar1]) / 3.0; stepVelocityX = stepVelocityX * 0.0 * fVar7; stepVelocityY = stepVelocityY * 0.0 * fVar7; local_28 = npc->_health; @@ -1746,13 +1746,13 @@ LAB_004a9d83: KAGE_LogMessage(0x10,(byte *)"Start and End parameters cannot be the same!"); } fVar7 = (float)__ftoui3(); - fVar5 = (float)((double)(int)fVar7 + __uint_to_double_fixup[-((int)fVar7 >> 0x1f)]) / 3.0; + fVar5 = (float)((double)GHIDRA_INT(fVar7) + __uint_to_double_fixup[-(GHIDRA_INT(fVar7) >> 0x1f)]) / 3.0; stepVelocityX = stepVelocityX * 0.6 * fVar5; stepVelocityY = stepVelocityY * 0.6 * fVar5; goto LAB_004aa3cc; case 0x105: aiUpdateCount = 2; - fVar5 = (float)((double)(int)fVar7 + __uint_to_double_fixup[-iVar1]) / 3.0; + fVar5 = (float)((double)GHIDRA_INT(fVar7) + __uint_to_double_fixup[-iVar1]) / 3.0; stepVelocityX = stepVelocityX * 0.20000005 * fVar5; stepVelocityY = stepVelocityY * 0.20000005 * fVar5; break; @@ -1760,7 +1760,7 @@ LAB_004a9d83: dVar6 = __uint_to_double_fixup[-iVar1]; (npc->_pos).x = (npc->_targetPosition).x; (npc->_pos).y = (npc->_targetPosition).y; - fVar5 = (float)((double)(int)fVar7 + dVar6) / 3.0; + fVar5 = (float)((double)GHIDRA_INT(fVar7) + dVar6) / 3.0; stepVelocityX = stepVelocityX * -1.0 * fVar5; stepVelocityY = stepVelocityY * -1.0 * fVar5; break; @@ -1768,7 +1768,7 @@ LAB_004a9d83: if (npc->_state == 6) goto switchD_004aa2e2_caseD_197; break; case 0x10c: - fVar7 = (float)((double)(int)fVar7 + __uint_to_double_fixup[-iVar1]) / 3.0; + fVar7 = (float)((double)GHIDRA_INT(fVar7) + __uint_to_double_fixup[-iVar1]) / 3.0; stepVelocityX = stepVelocityX * 0.20000005 * fVar7; stepVelocityY = stepVelocityY * 0.20000005 * fVar7; local_24 = npc->_health; @@ -1786,7 +1786,7 @@ LAB_004a9d83: case 0x110: case 0x111: aiUpdateCount = 1; - fVar5 = (float)((double)(int)fVar7 + __uint_to_double_fixup[-iVar1]) / 3.0; + fVar5 = (float)((double)GHIDRA_INT(fVar7) + __uint_to_double_fixup[-iVar1]) / 3.0; stepVelocityX = stepVelocityX * 0.20000005 * fVar5; stepVelocityY = stepVelocityY * 0.20000005 * fVar5; } @@ -1794,13 +1794,13 @@ LAB_004a9d83: } switch(iVar2) { case 0x194: - fVar7 = (float)((double)(int)fVar7 + __uint_to_double_fixup[-iVar1]) / 3.0; + fVar7 = (float)((double)GHIDRA_INT(fVar7) + __uint_to_double_fixup[-iVar1]) / 3.0; stepVelocityX = stepVelocityX * fVar7; stepVelocityY = stepVelocityY * fVar7; goto LAB_004aa34b; case 0x195: switchD_004a998d_caseD_14: - fVar5 = (float)((double)(int)fVar7 + __uint_to_double_fixup[-iVar1]) / 3.0; + fVar5 = (float)((double)GHIDRA_INT(fVar7) + __uint_to_double_fixup[-iVar1]) / 3.0; stepVelocityX = stepVelocityX * 0.39999998 * fVar5; stepVelocityY = stepVelocityY * 0.39999998 * fVar5; break; @@ -1813,7 +1813,7 @@ switchD_004aa2e2_caseD_197: } goto LAB_004aa3bf; case 0x19a: - fVar7 = (float)((double)(int)fVar7 + __uint_to_double_fixup[-iVar1]) / 3.0; + fVar7 = (float)((double)GHIDRA_INT(fVar7) + __uint_to_double_fixup[-iVar1]) / 3.0; stepVelocityX = stepVelocityX * 0.6 * fVar7; stepVelocityY = stepVelocityY * 0.6 * fVar7; LAB_004aa34b: @@ -1825,13 +1825,13 @@ LAB_004aa34b: LAB_004aa3bf: fVar7 = (float)__ftoui3(); LAB_004aa3cc: - aiUpdateCount = (int)fVar7 + 1; + aiUpdateCount = GHIDRA_INT(fVar7) + 1; local_1c = fVar7; } switchD_004a998d_caseD_15: uVar3 = cycleTime; LAB_004aa3d4: - if ((uint)((int)fVar7 * 4) < uVar3) { + if (GHIDRA_UINT((GHIDRA_INT(fVar7) * 4)) < uVar3) { step = 0; do { uVar4 = chanceDivisor; @@ -1859,7 +1859,7 @@ LAB_004aa3d4: } local_28 = 1.96182e-44; seed_fart_sound_override((int *)&local_28); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_28,1.0,2,0,local_24,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_28),1.0,2,0,local_24,0.0); anim = &DAT_00b1e0e4; } LAB_004aa517: @@ -1880,7 +1880,7 @@ LAB_004aa517: case 0x40: if (npc->_state == 4) { libm_sse2_pow_precise(); - if (((int)dVar6 == 0) || (uVar4 = Random(), uVar4 % (uint)(int)dVar6 == 0)) { + if ((GHIDRA_INT(dVar6) == 0) || (uVar4 = Random(), uVar4 % GHIDRA_UINT(GHIDRA_INT(dVar6)) == 0)) { uVar4 = Random(); npc->_stateFrame = 0; if ((uVar4 & 1) == 0) { @@ -1904,7 +1904,7 @@ LAB_004aa517: case 0x41: if ((npc->_state == 4) && (npc->_variant != 10)) { libm_sse2_pow_precise(); - if (((int)dVar6 == 0) || (uVar4 = Random(), uVar4 % (uint)(int)dVar6 == 0)) { + if ((GHIDRA_INT(dVar6) == 0) || (uVar4 = Random(), uVar4 % GHIDRA_UINT(GHIDRA_INT(dVar6)) == 0)) { uVar4 = Random(); if ((uVar4 & 1) == 0) { npc->_state = 8; @@ -1923,7 +1923,7 @@ LAB_004aa517: } local_28 = (float)((uVar4 & 3) + 0x73); seed_fart_sound_override((int *)&local_28); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_28,1.0,2,0,local_24,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_28),1.0,2,0,local_24,0.0); npc->_state = 6; npc->_stateFrame = 0; anim = s_Attack2; @@ -1935,7 +1935,7 @@ LAB_004aa517: case 0x42: if ((npc->_state == 4) && (npc->_variant != 10)) { libm_sse2_pow_precise(); - if (((int)dVar6 == 0) || (uVar4 = Random(), uVar4 % (uint)(int)dVar6 == 0)) { + if ((GHIDRA_INT(dVar6) == 0) || (uVar4 = Random(), uVar4 % GHIDRA_UINT(GHIDRA_INT(dVar6)) == 0)) { if (npc->_variant == 0x1e) { LAB_004aa7f9: npc->_state = 0xd; @@ -1961,18 +1961,18 @@ LAB_004aa7f9: } } if (step != 0) { - if (((uint)step <= (uint)local_1c) && ((npc->_sprite)._loaded != 0)) { + if ((GHIDRA_UINT(step) <= GHIDRA_UINT(local_1c)) && ((npc->_sprite)._loaded != 0)) { ((AnimationState *)(&(npc->_sprite)._animState))->AnimationState::Update(); ((AnimationState *)(&(npc->_sprite)._overlayAnimState))->AnimationState::Update(); } (npc->_pos).x = stepVelocityX + (npc->_pos).x; (npc->_pos).y = stepVelocityY + (npc->_pos).y; } - if ((uint)step < aiUpdateCount) { + if (GHIDRA_UINT(step) < aiUpdateCount) { Entity_NPC_UpdateAI_dispatch(npc); } step = step + 1; - } while ((uint)step <= (uint)fVar7); + } while (GHIDRA_UINT(step) <= GHIDRA_UINT(fVar7)); npc->_deliriumCycleIDHigh = 0; npc->_deliriumCycleID = ((cycleId >> 0xf & 0x3ff | cycleTime << 10) << 8 | nextCycleCount & 0xff) << 7 | @@ -1985,7 +1985,7 @@ LAB_004aa7f9: } return; switchD_004a998d_caseD_4a: - fVar5 = (float)((double)(int)fVar7 + __uint_to_double_fixup[-iVar1]) / 3.0; + fVar5 = (float)((double)GHIDRA_INT(fVar7) + __uint_to_double_fixup[-iVar1]) / 3.0; stepVelocityX = stepVelocityX * 0.6 * fVar5; stepVelocityY = stepVelocityY * 0.6 * fVar5; goto switchD_004a998d_caseD_15; @@ -2018,7 +2018,7 @@ void NpcHelper::gideon_spawn_stairs(Entity_NPC *npc) if (-1 < npc->_projectileDelay) { if (*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard) { _Init_thread_header(&g_invalidRoomDescriptorGuard, - __security_cookie ^ (int)register0x00000010 - 4U); + __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); if (g_invalidRoomDescriptorGuard == -1) { local_8 = 0; ((RoomDescriptor *)(&g_roomDescriptorDummy))->RoomDescriptor::constructor(); @@ -2028,7 +2028,7 @@ void NpcHelper::gideon_spawn_stairs(Entity_NPC *npc) } } crawlspaceDesc = &g_roomDescriptorDummy; - if ((uint)game->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(game->_currentDimensionIdx) < 3) { crawlspaceDesc = game->_roomList + 0x205; } if (crawlspaceDesc->Data == (void *)0x0) { @@ -2045,7 +2045,7 @@ void NpcHelper::gideon_spawn_stairs(Entity_NPC *npc) (*pcVar1)(); return; } - uVar3 = (uint)rng._seed >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; + uVar3 = GHIDRA_UINT(rng._seed) >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; uVar3 = uVar3 << ((byte)rng._shift2 & 0x1f) ^ uVar3; crawlspaceConfig = RoomConfig::GetRandomRoom @@ -2056,13 +2056,13 @@ void NpcHelper::gideon_spawn_stairs(Entity_NPC *npc) local_18 = g_game->_room; local_14 = Random(); uVar3 = npc->_projectileDelay; - if (((int)uVar3 < 0) || (0x1bf < (int)uVar3)) { + if ((GHIDRA_INT(uVar3) < 0) || (0x1bf < GHIDRA_INT(uVar3))) { KAGE_LogMessage(0x10,(byte *)"SpawnGridEntity: Grid index invalid\n"); } pRVar2 = local_18; if (uVar3 < 0x1c0) { gridCollision = ((Room *)(local_18))->Room::GetGridCollision(uVar3); - if ((int)gridCollision < 1) { + if (GHIDRA_INT(gridCollision) < 1) { stairs = operator_new(0x154); local_8 = 0x12; local_18 = (Room *)stairs; @@ -2129,11 +2129,11 @@ void NpcHelper::gideon_choose_attack(Entity_NPC *npc) EntityPtr parent; int *weight; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00af322d; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; EVar3 = npc->_parent; EVar1 = (EntityPtr)npc; @@ -2142,13 +2142,13 @@ void NpcHelper::gideon_choose_attack(Entity_NPC *npc) EVar3 = *(EntityPtr *)((char *)parent + 0x3bc); } iVar7 = *(int *)((char *)EVar1 + 0x3c0); - while (puVar2 = (undefined1 *)((int)register0x00000010 + -4), iVar7 != 0) { + while (puVar2 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4), iVar7 != 0) { if ((EVar1 != (EntityPtr)npc) && ((*(int *)((char *)EVar1 + 0xb64) == 0xb || (*(int *)((char *)EVar1 + 0xb64) == 7)))) { uVar6 = Random(); - attack4Cooldown = (uint *)((int)&npc->_i2 + 2); + attack4Cooldown = (uint *)(GHIDRA_INT(&npc->_i2) + 2); newCooldown = (short)(uVar6 % 0x96) + 0x5a; - uStack_38 = (uint)newCooldown; + uStack_38 = GHIDRA_UINT(newCooldown); puVar5 = &uStack_38; if (newCooldown <= *(ushort *)attack4Cooldown) { puVar5 = attack4Cooldown; @@ -2165,16 +2165,16 @@ void NpcHelper::gideon_choose_attack(Entity_NPC *npc) outcomesEnd = (undefined4 *)0x0; outcomesCapacity = (undefined4 *)0x0; local_14 = 0; - uStack_40 = (ulonglong)(uint)uStack_40; + uStack_40 = (ulonglong)GHIDRA_UINT(uStack_40); uStack_38 = 1; - std::vector<8byte>::_Emplace_reallocate(0,(int)&uStack_40 + 4); + std::vector<8byte>::_Emplace_reallocate(0,GHIDRA_INT(&uStack_40) + 4); if ((short)npc->_i2 == 0) { uVar6 = 0; - outcomeCount = (int)outcomesEnd - (int)picker >> 3; + outcomeCount = GHIDRA_INT(outcomesEnd) - GHIDRA_INT(picker) >> 3; if (outcomeCount != 0) { do { if (*(int *)((char *)picker + uVar6 * 8) == 1) { - weight = (int *)((int)picker + 4 + uVar6 * 8); + weight = (int *)(GHIDRA_INT(picker) + 4 + uVar6 * 8); *weight = *weight + 1; if (*weight < 0) { *(undefined4 *)((char *)picker + 4 + uVar6 * 8) = 0; @@ -2184,10 +2184,10 @@ void NpcHelper::gideon_choose_attack(Entity_NPC *npc) uVar6 = uVar6 + 1; } while (uVar6 < outcomeCount); } - uStack_40 = CONCAT44(1,(uint)uStack_40); + uStack_40 = CONCAT44(1,GHIDRA_UINT(uStack_40)); uStack_38 = 1; if (outcomesEnd == outcomesCapacity) { - std::vector<8byte>::_Emplace_reallocate(outcomesEnd,(int)&uStack_40 + 4); + std::vector<8byte>::_Emplace_reallocate(outcomesEnd,GHIDRA_INT(&uStack_40) + 4); } else { *outcomesEnd = 1; @@ -2196,13 +2196,13 @@ void NpcHelper::gideon_choose_attack(Entity_NPC *npc) } } LAB_004b137f: - if ((3 < npc->_stateFrame) && (*(char *)((int)&npc->_i1 + 1) == '\0')) { + if ((3 < npc->_stateFrame) && (*(char *)(GHIDRA_INT(&npc->_i1) + 1) == '\0')) { uVar6 = 0; - outcomeCount = (int)outcomesEnd - (int)picker >> 3; + outcomeCount = GHIDRA_INT(outcomesEnd) - GHIDRA_INT(picker) >> 3; if (outcomeCount != 0) { do { if (*(int *)((char *)picker + uVar6 * 8) == 2) { - weight = (int *)((int)picker + 4 + uVar6 * 8); + weight = (int *)(GHIDRA_INT(picker) + 4 + uVar6 * 8); *weight = *weight + 6; if (*weight < 0) { *(undefined4 *)((char *)picker + 4 + uVar6 * 8) = 0; @@ -2212,10 +2212,10 @@ LAB_004b137f: uVar6 = uVar6 + 1; } while (uVar6 < outcomeCount); } - uStack_40 = CONCAT44(2,(uint)uStack_40); + uStack_40 = CONCAT44(2,GHIDRA_UINT(uStack_40)); uStack_38 = 6; if (outcomesEnd == outcomesCapacity) { - std::vector<8byte>::_Emplace_reallocate(outcomesEnd,(int)&uStack_40 + 4); + std::vector<8byte>::_Emplace_reallocate(outcomesEnd,GHIDRA_INT(&uStack_40) + 4); } else { *outcomesEnd = 2; @@ -2224,7 +2224,7 @@ LAB_004b137f: } } LAB_004b13f7: - if (*(short *)((int)&npc->_i2 + 2) == 0) { + if (*(short *)(GHIDRA_INT(&npc->_i2) + 2) == 0) { iVar8 = *(int *)((char *)g_game->_room + 0x12c4) + *(int *)((char *)g_game->_room + 0x12c0); iVar7 = 0; if (0 < iVar8) { @@ -2232,11 +2232,11 @@ LAB_004b13f7: } if (iVar7 < 5) { uVar6 = 0; - outcomeCount = (int)outcomesEnd - (int)picker >> 3; + outcomeCount = GHIDRA_INT(outcomesEnd) - GHIDRA_INT(picker) >> 3; if (outcomeCount != 0) { do { if (*(int *)((char *)picker + uVar6 * 8) == 3) { - weight = (int *)((int)picker + 4 + uVar6 * 8); + weight = (int *)(GHIDRA_INT(picker) + 4 + uVar6 * 8); *weight = *weight + 1; if (*weight < 0) { *(undefined4 *)((char *)picker + 4 + uVar6 * 8) = 0; @@ -2246,10 +2246,10 @@ LAB_004b13f7: uVar6 = uVar6 + 1; } while (uVar6 < outcomeCount); } - uStack_40 = CONCAT44(3,(uint)uStack_40); + uStack_40 = CONCAT44(3,GHIDRA_UINT(uStack_40)); uStack_38 = 1; if (outcomesEnd == outcomesCapacity) { - std::vector<8byte>::_Emplace_reallocate(outcomesEnd,(int)&uStack_40 + 4); + std::vector<8byte>::_Emplace_reallocate(outcomesEnd,GHIDRA_INT(&uStack_40) + 4); } else { *outcomesEnd = 3; @@ -2291,7 +2291,7 @@ LAB_004b152e: isLess = bVar4 < *wantedAnimName; if (bVar4 != *wantedAnimName) { LAB_004b1510: - uVar6 = -(uint)isLess | 1; + uVar6 = -GHIDRA_UINT(isLess) | 1; goto LAB_004b1515; } if (bVar4 == 0) break; @@ -2337,7 +2337,7 @@ LAB_004b162e: isLess = bVar4 < (byte)*wantedAnimNameStr; if (bVar4 != *wantedAnimNameStr) { LAB_004b1610: - uVar6 = -(uint)isLess | 1; + uVar6 = -GHIDRA_UINT(isLess) | 1; goto LAB_004b1615; } if (bVar4 == 0) break; @@ -2398,7 +2398,7 @@ LAB_004b177e: isLess = bVar4 < *wantedAnimName; if (bVar4 != *wantedAnimName) { LAB_004b1760: - uVar6 = -(uint)isLess | 1; + uVar6 = -GHIDRA_UINT(isLess) | 1; goto LAB_004b1765; } if (bVar4 == 0) break; @@ -2413,7 +2413,7 @@ LAB_004b1765: if ((uVar6 != 0) || ((animData[0x34] != 0 && ((npc->_sprite)._animState._isPlaying == 0)))) goto LAB_004b177e; } - *(undefined1 *)((int)&npc->_i1 + 1) = 1; + *(undefined1 *)(GHIDRA_INT(&npc->_i1) + 1) = 1; goto switchD_004b14c5_default; case 3: pitch = 1.0; @@ -2446,7 +2446,7 @@ LAB_004b1874: isLess = bVar4 < (byte)*wantedAnimNameStr; if (bVar4 != *wantedAnimNameStr) { LAB_004b1856: - uVar6 = -(uint)isLess | 1; + uVar6 = -GHIDRA_UINT(isLess) | 1; goto LAB_004b185b; } if (bVar4 == 0) break; @@ -2462,7 +2462,7 @@ LAB_004b185b: goto LAB_004b1874; } npc->_state = 0xb; - *(undefined2 *)((int)&npc->_i2 + 2) = 600; + *(undefined2 *)(GHIDRA_INT(&npc->_i2) + 2) = 600; default: goto switchD_004b14c5_default; } @@ -2471,12 +2471,12 @@ LAB_004b185b: ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(uStack_38,1.0,2,0,pitch,0.0); switchD_004b14c5_default: if (picker != (WeightedOutcomePicker)0x0) { - uVar6 = (int)outcomesCapacity - (int)picker & 0xfffffff8; + uVar6 = GHIDRA_INT(outcomesCapacity) - GHIDRA_INT(picker) & 0xfffffff8; ptr = picker; if (0xfff < uVar6) { ptr = *(WeightedOutcomePicker *)((char *)picker + -4); uVar6 = uVar6 + 0x23; - if (0x1f < ((int)picker - (int)ptr) - 4U) { + if (0x1f < (GHIDRA_INT(picker) - GHIDRA_INT(ptr)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2534,7 +2534,7 @@ void NpcHelper::gideon_spawn_wave() local_14 = 0xffffffff; puStack_18 = &LAB_00af326d; local_1c = ExceptionList; - local_40[7] = __security_cookie ^ (uint)(local_40 + 0xc); + local_40[7] = __security_cookie ^ GHIDRA_UINT((local_40 + 0xc)); ExceptionList = &local_1c; if (*(int *)((char *)this + 0x3bc) == 0) { spawnVariant = *(uint *)((char *)this + 0x410); @@ -2558,12 +2558,12 @@ void NpcHelper::gideon_spawn_wave() gridEntityCursor = room->_gridEntities; do { if (((spawnVariant < 0x1c0) && (*gridEntityCursor != (void *)0x0)) && - (*(int *)((int)*gridEntityCursor + 4) == 7)) { + (*(int *)(GHIDRA_INT(*gridEntityCursor) + 4) == 7)) { uVar5 = uVar5 + 1; } spawnVariant = spawnVariant + 1; gridEntityCursor = gridEntityCursor + 1; - } while ((int)spawnVariant < iVar3); + } while (GHIDRA_INT(spawnVariant) < iVar3); pitCount = uVar5; } spawnVariant = *(uint *)((char *)this + 0x3dc); @@ -2624,7 +2624,7 @@ LAB_004b1ace: spawnVariant = spawnVariant << ((byte)((ulonglong)local_90 >> 0x20) & 0x1f) ^ spawnVariant; spawnVariant = spawnVariant >> ((byte)local_5c & 0x1f) ^ spawnVariant; local_4c = RoomConfig::GetRandomRoomWithFallbackStage - ((RoomConfig *)local_84.y,spawnVariant,1,(int)local_4c,0,0xb,(int)local_9c.y, + ((RoomConfig *)local_84.y,spawnVariant,1,GHIDRA_INT(local_4c),0,0xb,GHIDRA_INT(local_9c.y), in_stack_ffffff38,in_stack_ffffff3c,waveDifficulty,waveDifficulty, &local_60,0xc,local_5c); if (local_4c == (Game *)0x0) { @@ -2634,7 +2634,7 @@ LAB_004b1ace: if ((short)*(uint *)((char *)local_4c + 0x44) != 0) { local_50 = (uint *)0x0; do { - roomSpawn = (short *)(*(uint *)((char *)local_4c + 0x40) + (int)local_50); + roomSpawn = (short *)(*(uint *)((char *)local_4c + 0x40) + GHIDRA_INT(local_50)); if (spawnVariant == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar1 = (code *)swi(3); @@ -2644,8 +2644,8 @@ LAB_004b1ace: spawnVariant = spawnVariant >> ((byte)local_90 & 0x1f) ^ spawnVariant; spawnVariant = spawnVariant << ((byte)((ulonglong)local_90 >> 0x20) & 0x1f) ^ spawnVariant; spawnVariant = spawnVariant >> ((byte)local_5c & 0x1f) ^ spawnVariant; - puVar4 = ((Spawn *)(roomSpawn))->Spawn::PickEntry((float)((double)(int)spawnVariant + - __uint_to_double_fixup[-((int)spawnVariant >> 0x1f)]) * + puVar4 = ((Spawn *)(roomSpawn))->Spawn::PickEntry((float)((double)GHIDRA_INT(spawnVariant) + + __uint_to_double_fixup[-(GHIDRA_INT(spawnVariant) >> 0x1f)]) * 2.3283062e-10); spawnEntry = *puVar4; uStack_44 = puVar4[1]; @@ -2669,7 +2669,7 @@ LAB_004b1ace: spawnVariant = spawnVariant << ((byte)((ulonglong)local_90 >> 0x20) & 0x1f) ^ spawnVariant; spawnVariant = spawnVariant >> ((byte)local_5c & 0x1f) ^ spawnVariant; ((Room *)(room))->Room::TransformEntry(&spawnEntry,uVar5,spawnVariant); - if ((int)spawnEntry < 1000) { + if (GHIDRA_INT(spawnEntry) < 1000) { if ((spawnEntry == 0x339) && (pitCount < 6)) { local_50 = entriesBegin; entriesEnd = entriesBegin; @@ -2693,7 +2693,7 @@ LAB_004b1ace: } } local_60 = local_60 + 1; - local_50 = (uint *)((int)local_50 + 0x10); + local_50 = (uint *)(GHIDRA_INT(local_50) + 0x10); } while (local_60 < (ushort)*(uint *)((char *)local_4c + 0x44)); local_50 = entriesBegin; puVar4 = entriesEnd; @@ -2708,8 +2708,8 @@ LAB_004b1ccf: } local_4c = (Game *)(local_50 + 1); do { - local_84.x = (float)((int)*(uint *)((char *)local_4c + -4) % room->_gridWidth) * 40.0 + 40.0; - local_84.y = (float)((int)*(uint *)((char *)local_4c + -4) / room->_gridWidth) * 40.0 + 120.0; + local_84.x = (float)(GHIDRA_INT(*(uint *)((char *)local_4c + -4)) % room->_gridWidth) * 40.0 + 40.0; + local_84.y = (float)(GHIDRA_INT(*(uint *)((char *)local_4c + -4)) / room->_gridWidth) * 40.0 + 120.0; ((Room *)(room))->Room::FindFreeTilePosition(&local_9c,&local_84,0.0); if (spawnVariant == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -2729,8 +2729,8 @@ LAB_004b1ccf: *(uint *)(iVar3 + 0x16c) = *(uint *)(iVar3 + 0x16c) | 0x80; *(undefined4 *)(iVar3 + 0x168) = *(undefined4 *)(iVar3 + 0x168); } - nextEntry = (uint *)((int)local_4c + 0x10); - puVar4 = (uint *)((int)local_4c + 0xc); + nextEntry = (uint *)(GHIDRA_INT(local_4c) + 0x10); + puVar4 = (uint *)(GHIDRA_INT(local_4c) + 0xc); local_4c = (Game *)nextEntry; } while (puVar4 != entriesEnd); LAB_004b1e08: @@ -2741,15 +2741,15 @@ LAB_004b1e08: game = g_game; maxHitPoints = *(float *)((char *)gideon + 900); *(short *)&(*(undefined1 *)((char *)&((g_game->_hud)) + 0x54b8)) = - (short)(int)((maxHitPoints - *(float *)((char *)gideon + 0x380)) + 1.0); - *(short *)&(*(undefined1 *)((char *)&((game->_hud)) + 0x54ba)) = (short)(int)maxHitPoints; + (short)GHIDRA_INT(((maxHitPoints - *(float *)((char *)gideon + 0x380)) + 1.0)); + *(short *)&(*(undefined1 *)((char *)&((game->_hud)) + 0x54ba)) = (short)GHIDRA_INT(maxHitPoints); if (local_50 != (uint *)0x0) { - spawnVariant = (int)entriesCapacityEnd - (int)local_50 & 0xfffffff0; + spawnVariant = GHIDRA_INT(entriesCapacityEnd) - GHIDRA_INT(local_50) & 0xfffffff0; puVar4 = local_50; if (0xfff < spawnVariant) { puVar4 = (uint *)local_50[-1]; spawnVariant = spawnVariant + 0x23; - if (0x1f < (uint)((int)local_50 + (-4 - (int)puVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_50) + (-4 - GHIDRA_INT(puVar4))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2787,7 +2787,7 @@ void NpcHelper::gideon_update_death(Entity_NPC *npc) Manager *manager; void *room; - local_c = __security_cookie ^ (uint)auStack_4c; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_4c); room = (npc->_sprite)._animState._animData; if (room == (void *)0x0) { local_38._tint[0] = 0.0; @@ -2800,17 +2800,17 @@ void NpcHelper::gideon_update_death(Entity_NPC *npc) fVar2 = local_38._colorize[1]; fVar1 = local_38._tint[0]; pCVar4 = &local_38; - if (0xf < (uint)local_38._colorize[1]) { + if (0xf < GHIDRA_UINT(local_38._colorize[1])) { pCVar4 = (Color *)local_38._tint[0]; } - isDeathAnim = str_eq((byte *)pCVar4,(uint)local_38._colorize[0],(byte *)"Death",5); - if (0xf < (uint)fVar2) { - uVar5 = (int)fVar2 + 1; + isDeathAnim = str_eq((byte *)pCVar4,GHIDRA_UINT(local_38._colorize[0]),(byte *)"Death",5); + if (0xf < GHIDRA_UINT(fVar2)) { + uVar5 = GHIDRA_INT(fVar2) + 1; pCVar4 = (Color *)fVar1; if (0xfff < uVar5) { - pCVar4 = (Color *)((Color *)((int)fVar1 + -0x2c))->_offset[2]; - uVar5 = (int)fVar2 + 0x24; - if ((byte *)0x1f < (byte *)((int)fVar1 + (-4 - (int)pCVar4))) { + pCVar4 = (Color *)((Color *)(GHIDRA_INT(fVar1) + -0x2c))->_offset[2]; + uVar5 = GHIDRA_INT(fVar2) + 0x24; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(fVar1) + (-4 - GHIDRA_INT(pCVar4)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2870,7 +2870,7 @@ void NpcHelper::gideon_update_death(Entity_NPC *npc) room = g_game->_room; gridSize = *(int *)((char *)room + 0x10) * *(int *)((char *)room + 0xc); if (0 < gridSize) { - gridSlot = (int *)((int)room + 0x24); + gridSlot = (int *)(GHIDRA_INT(room) + 0x24); do { if ((((uVar5 < 0x1c0) && (gridEntity = *gridSlot, gridEntity != 0)) && (*(int *)(gridEntity + 4) == 0x12)) && (*(int *)(gridEntity + 8) == 1)) { @@ -2878,10 +2878,10 @@ void NpcHelper::gideon_update_death(Entity_NPC *npc) } uVar5 = uVar5 + 1; gridSlot = gridSlot + 1; - } while ((int)uVar5 < gridSize); + } while (GHIDRA_INT(uVar5) < gridSize); } uVar5 = npc->_projectileDelay; - if ((-1 < (int)uVar5) && (uVar5 < 0x1c0)) { + if ((-1 < GHIDRA_INT(uVar5)) && (uVar5 < 0x1c0)) { *(undefined4 *)((char *)room + uVar5 * 4 + 0x76c) = 900; } ((Music *)((Music *)&g_manager->_musicManager))->Music::PlayJingle(0x55,unusedInt,bVar3); @@ -2916,19 +2916,19 @@ Entity * NpcHelper::heretic_spawn_afterimage(Entity_NPC *npc) local_8 = (byte ****)0xffffffff; puStack_c = &LAB_00af32ed; local_10 = ExceptionList; - securityCookie = __security_cookie ^ (uint)(animName + 10); + securityCookie = __security_cookie ^ GHIDRA_UINT((animName + 10)); ExceptionList = &local_10; afterimage = ((Game *)(g_game))->Game::Spawn(0x389,0,&npc->_pos,&npc->_velocity,(Entity *)npc, (npc->_state == 0xb) + 1,npc->_initSeed); - flagsHi = *(undefined4 *)((int)&npc->_flags + 4); - *(int *)&afterimage->_flags = (int)npc->_flags; - *(undefined4 *)((int)&afterimage->_flags + 4) = flagsHi; + flagsHi = *(undefined4 *)(GHIDRA_INT(&npc->_flags) + 4); + *(int *)&afterimage->_flags = GHIDRA_INT(npc->_flags); + *(undefined4 *)(GHIDRA_INT(&afterimage->_flags) + 4) = flagsHi; FUN_004b6b20((afterimage->_colorParams)._begin,(npc->_colorParams)._begin,(npc->_colorParams)._end ,local_38); - flagsHi = *(undefined4 *)((int)&afterimage->_flags + 4); - *(uint *)&afterimage->_flags = (uint)afterimage->_flags | 0x11; + flagsHi = *(undefined4 *)(GHIDRA_INT(&afterimage->_flags) + 4); + *(uint *)&afterimage->_flags = GHIDRA_UINT(afterimage->_flags) | 0x11; afterimage->_isInvicible = 1; - *(undefined4 *)((int)&afterimage->_flags + 4) = flagsHi; + *(undefined4 *)(GHIDRA_INT(&afterimage->_flags) + 4) = flagsHi; npcAnimData = (npc->_sprite)._animState._animData; if (npcAnimData == (void *)0x0) { animNameCapacity = 0xf; @@ -2954,7 +2954,7 @@ Entity * NpcHelper::heretic_spawn_afterimage(Entity_NPC *npc) isLess = bVar1 < *(byte *)animNameChar; if (bVar1 != *(byte *)animNameChar) { LAB_004b3c27: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_004b3c2c; } if (bVar1 == 0) break; @@ -2962,12 +2962,12 @@ LAB_004b3c27: isLess = bVar1 < *(byte *)((char *)animNameChar + 1); if (bVar1 != *(byte *)((char *)animNameChar + 1)) goto LAB_004b3c27; afterimageAnimChar = afterimageAnimChar + 2; - animNameChar = (byte *****)((int)animNameChar + 2); + animNameChar = (byte *****)(GHIDRA_INT(animNameChar) + 2); } while (bVar1 != 0); uVar2 = 0; LAB_004b3c2c: if ((uVar2 == 0) && - ((*(char *)((int)(afterimage->_sprite)._animState._animData + 0x34) == '\0' || + ((*(char *)(GHIDRA_INT((afterimage->_sprite)._animState._animData) + 0x34) == '\0' || ((afterimage->_sprite)._animState._isPlaying != 0)))) goto LAB_004b3c68; } bVar1 = ((ANM2 *)(&afterimage->_sprite))->ANM2::SetAnimation((byte *)animNameData,1); @@ -2983,7 +2983,7 @@ LAB_004b3c68: if (0xfff < uVar2) { animNameData = (byte *****)animName[0][-1]; uVar2 = animNameCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)animName[0] + (-4 - (int)animNameData))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(animName[0]) + (-4 - GHIDRA_INT(animNameData)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2992,7 +2992,7 @@ LAB_004b3c68: } animNameSize = 0; animNameCapacity = 0xf; - animName[0] = (byte *****)((uint)animName[0] & 0xffffff00); + animName[0] = (byte *****)(GHIDRA_UINT(animName[0]) & 0xffffff00); if ((afterimage->_sprite)._animState._animData != (void *)0x0) { AnimationState::SetFrameFloat (&(afterimage->_sprite)._animState,(npc->_sprite)._animState._animFrame); @@ -3003,8 +3003,8 @@ LAB_004b3c68: afterimage->_entityGridCollisionClass = 0; afterimage->_entityCollisionClass = 0; afterimage[2]._preInterpolatePos.x = 1.82169e-44; - *(undefined1 *)((int)&afterimage[2]._health + 2) = - *(undefined1 *)((int)&npc->_projectileCooldown + 2); + *(undefined1 *)(GHIDRA_INT(&afterimage[2]._health) + 2) = + *(undefined1 *)(GHIDRA_INT(&npc->_projectileCooldown) + 2); *(undefined2 *)(afterimage + 1) = 0; afterimage->_health = 0.0; afterimage->_maxHitPoints = 0.0; @@ -3062,10 +3062,10 @@ void NpcHelper::heretic_choose_attack(Entity_NPC *npc) undefined4 local_14; int *weight; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); puStack_18 = &LAB_00af332d; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; outcomes = (WeightedOutcomePicker)0x0; outcomesEnd = (undefined4 *)0x0; @@ -3075,20 +3075,20 @@ void NpcHelper::heretic_choose_attack(Entity_NPC *npc) local_38 = (EntityPtr *)heretic_count_out_fires(); WVar3 = (WeightedOutcomePicker)0x0; outcomesCursor = (undefined4 *)0x0; - if (*(char *)((int)&npcLocal->_projectileDelay + 1) < '\x01') { + if (*(char *)(GHIDRA_INT(&npcLocal->_projectileDelay) + 1) < '\x01') { uStack_44 = CONCAT44(0xe,(undefined4)uStack_44); uStack_3c = 10; - std::vector<8byte>::_Emplace_reallocate(0,(int)&uStack_44 + 4); + std::vector<8byte>::_Emplace_reallocate(0,GHIDRA_INT(&uStack_44) + 4); WVar3 = outcomes; outcomesCursor = outcomesEnd; } - if (*(char *)((int)&npcLocal->_projectileDelay + 2) < '\x01') { + if (*(char *)(GHIDRA_INT(&npcLocal->_projectileDelay) + 2) < '\x01') { uVar2 = 0; - outcomeCount = (int)outcomesCursor - (int)WVar3 >> 3; + outcomeCount = GHIDRA_INT(outcomesCursor) - GHIDRA_INT(WVar3) >> 3; if (outcomeCount != 0) { do { if (*(int *)((char *)WVar3 + uVar2 * 8) == 9) { - weight = (int *)((int)WVar3 + 4 + uVar2 * 8); + weight = (int *)(GHIDRA_INT(WVar3) + 4 + uVar2 * 8); *weight = *weight + 10; if (*weight < 0) { *(undefined4 *)((char *)WVar3 + 4 + uVar2 * 8) = 0; @@ -3101,7 +3101,7 @@ void NpcHelper::heretic_choose_attack(Entity_NPC *npc) uStack_44 = CONCAT44(9,(undefined4)uStack_44); uStack_3c = 10; if (outcomesCursor == outcomesCapacityEnd) { - std::vector<8byte>::_Emplace_reallocate(outcomesCursor,(int)&uStack_44 + 4); + std::vector<8byte>::_Emplace_reallocate(outcomesCursor,GHIDRA_INT(&uStack_44) + 4); WVar3 = outcomes; outcomesCursor = outcomesEnd; } @@ -3113,14 +3113,14 @@ void NpcHelper::heretic_choose_attack(Entity_NPC *npc) } } LAB_004b41d2: - if (*(char *)((int)&npcLocal->_projectileDelay + 3) < '\x01') { + if (*(char *)(GHIDRA_INT(&npcLocal->_projectileDelay) + 3) < '\x01') { if ((EntityPtr *)0x2 < local_38) { uVar2 = 0; - outcomeCount = (int)outcomesCursor - (int)WVar3 >> 3; + outcomeCount = GHIDRA_INT(outcomesCursor) - GHIDRA_INT(WVar3) >> 3; if (outcomeCount != 0) { do { if (*(int *)((char *)WVar3 + uVar2 * 8) == 7) { - weight = (int *)((int)WVar3 + 4 + uVar2 * 8); + weight = (int *)(GHIDRA_INT(WVar3) + 4 + uVar2 * 8); *weight = *weight + 10; if (*weight < 0) { *(undefined4 *)((char *)WVar3 + 4 + uVar2 * 8) = 0; @@ -3133,7 +3133,7 @@ LAB_004b41d2: uStack_44 = CONCAT44(7,(undefined4)uStack_44); uStack_3c = 10; if (outcomesCursor == outcomesCapacityEnd) { - std::vector<8byte>::_Emplace_reallocate(outcomesCursor,(int)&uStack_44 + 4); + std::vector<8byte>::_Emplace_reallocate(outcomesCursor,GHIDRA_INT(&uStack_44) + 4); WVar3 = outcomes; outcomesCursor = outcomesEnd; } @@ -3147,11 +3147,11 @@ LAB_004b41d2: } LAB_004b4249: uVar2 = 0; - outcomeCount = (int)outcomesCursor - (int)WVar3 >> 3; + outcomeCount = GHIDRA_INT(outcomesCursor) - GHIDRA_INT(WVar3) >> 3; if (outcomeCount != 0) { do { if (*(int *)((char *)WVar3 + uVar2 * 8) == 3) { - weight = (int *)((int)WVar3 + 4 + uVar2 * 8); + weight = (int *)(GHIDRA_INT(WVar3) + 4 + uVar2 * 8); *weight = *weight + 1; if (*weight < 0) { *(undefined4 *)((char *)WVar3 + 4 + uVar2 * 8) = 0; @@ -3164,7 +3164,7 @@ LAB_004b4249: uStack_44 = CONCAT44(3,(undefined4)uStack_44); uStack_3c = 1; if (outcomesCursor == outcomesCapacityEnd) { - std::vector<8byte>::_Emplace_reallocate(outcomesCursor,(int)&uStack_44 + 4); + std::vector<8byte>::_Emplace_reallocate(outcomesCursor,GHIDRA_INT(&uStack_44) + 4); } else { *outcomesCursor = 3; @@ -3182,7 +3182,7 @@ LAB_004b42a6: uVar2 = ((WeightedOutcomePicker *)(&outcomes))->WeightedOutcomePicker::PickOutcome(rng); pEVar1 = npcLocal; if (uVar2 == 3) { - *(undefined2 *)((int)&npcLocal->_stateFrame + 2) = 0; + *(undefined2 *)(GHIDRA_INT(&npcLocal->_stateFrame) + 2) = 0; } else { *(undefined2 *)&npcLocal->_stateFrame = 0xffff; @@ -3198,15 +3198,15 @@ LAB_004b42a6: *(char *)&pEVar1->_projectileCooldown = (pEVar1->_health <= halfHealth && halfHealth != pEVar1->_health) + '\x05'; } - *(undefined1 *)((int)&pEVar1->_projectileCooldown + 1) = 0; + *(undefined1 *)(GHIDRA_INT(&pEVar1->_projectileCooldown) + 1) = 0; } if (outcomes != (WeightedOutcomePicker)0x0) { - uVar2 = (int)outcomesCapacityEnd - (int)outcomes & 0xfffffff8; + uVar2 = GHIDRA_INT(outcomesCapacityEnd) - GHIDRA_INT(outcomes) & 0xfffffff8; WVar3 = outcomes; if (0xfff < uVar2) { WVar3 = *(WeightedOutcomePicker *)((char *)outcomes + -4); uVar2 = uVar2 + 0x23; - if (0x1f < ((int)outcomes - (int)WVar3) - 4U) { + if (0x1f < (GHIDRA_INT(outcomes) - GHIDRA_INT(WVar3)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -3254,7 +3254,7 @@ void NpcHelper::hornfel_spawn_doors() puStack_c = &LAB_00af336d; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; doors = (EntityPtr *)0x0; doorsEnd = (EntityPtr *)0x0; @@ -3265,41 +3265,41 @@ void NpcHelper::hornfel_spawn_doors() local_8 = 0; iVar4 = 1; local_2c = (EntityPtr)room; - if (1 < (int)local_1c + -1) { - local_28 = (EntityPtr)((int)local_20 + -2); + if (1 < GHIDRA_INT(local_1c) + -1) { + local_28 = (EntityPtr)(GHIDRA_INT(local_20) + -2); do { fVar8 = 120.0; fVar7 = 40.0; EVar5 = *(EntityPtr *)((char *)room + 0xc); - if (((int)EVar5 < 1) || ((int)*(EntityPtr *)((char *)room + 0x10) <= iVar4)) { + if ((GHIDRA_INT(EVar5) < 1) || (GHIDRA_INT(*(EntityPtr *)((char *)room + 0x10)) <= iVar4)) { iVar2 = -1; } else { - iVar2 = (int)EVar5 * iVar4; + iVar2 = GHIDRA_INT(EVar5) * iVar4; } - local_18 = (EntityPtr)((int)EVar5 * iVar4); - if (((int)EVar5 < 2) || ((int)*(EntityPtr *)((char *)room + 0x10) <= iVar4)) { + local_18 = (EntityPtr)(GHIDRA_INT(EVar5) * iVar4); + if ((GHIDRA_INT(EVar5) < 2) || (GHIDRA_INT(*(EntityPtr *)((char *)room + 0x10)) <= iVar4)) { fromIndex = -1; } else { - fromIndex = (int)local_18 + 1; + fromIndex = GHIDRA_INT(local_18) + 1; } - isCanStep = ((RoomGridPath *)((EntityPtr *)((int)room + 0x7468)))->RoomGridPath::can_step(fromIndex,iVar2); + isCanStep = ((RoomGridPath *)((EntityPtr *)(GHIDRA_INT(room) + 0x7468)))->RoomGridPath::can_step(fromIndex,iVar2); if (isCanStep != 0) { - if (((int)*(EntityPtr *)((char *)room + 0xc) < 1) || - ((int)*(EntityPtr *)((char *)room + 0x10) <= iVar4)) { + if ((GHIDRA_INT(*(EntityPtr *)((char *)room + 0xc)) < 1) || + (GHIDRA_INT(*(EntityPtr *)((char *)room + 0x10)) <= iVar4)) { local_18 = (EntityPtr)0xffffffff; } iVar2 = *(int *)((char *)g_game->_room + 0xc); - leftSpawnPos.x = (float)((int)local_18 % iVar2) * fVar7 + fVar7; - leftSpawnPos.y = (float)((int)local_18 / iVar2) * fVar7 + fVar8; + leftSpawnPos.x = (float)(GHIDRA_INT(local_18) % iVar2) * fVar7 + fVar7; + leftSpawnPos.y = (float)(GHIDRA_INT(local_18) / iVar2) * fVar7 + fVar8; seed = Random(); local_24 = (EntityPtr) ((Game *)(g_game))->Game::Spawn(0x3c7,0,&leftSpawnPos,&g_vectorZero,(Entity *)0x0,0,seed); *(float *)((char *)local_24 + 0xec) = -90.0; local_18 = (EntityPtr)cos(-1.5707964); fVar7 = sin(-1.5707964); - ((Vector *)((int)local_24 + 0xdc))->x = (float)local_18 * 0.0 - fVar7 * 15.0; + ((Vector *)(GHIDRA_INT(local_24) + 0xdc))->x = (float)local_18 * 0.0 - fVar7 * 15.0; *(float *)((char *)local_24 + 0xe0) = fVar7 * 0.0 + (float)local_18 * 15.0; if (doorsEnd == doorsCapacity) { std::vector::_Emplace_reallocate(doorsEnd,&local_24); @@ -3312,37 +3312,37 @@ void NpcHelper::hornfel_spawn_doors() fVar8 = 120.0; fVar7 = 40.0; } - if ((((int)local_20 + -1 < 0) || - ((int)*(EntityPtr *)((char *)room + 0xc) <= (int)((int)local_20 + -1))) || - ((int)*(EntityPtr *)((char *)room + 0x10) <= iVar4)) { + if (((GHIDRA_INT(local_20) + -1 < 0) || + (GHIDRA_INT(*(EntityPtr *)((char *)room + 0xc)) <= GHIDRA_INT((GHIDRA_INT(local_20) + -1)))) || + (GHIDRA_INT(*(EntityPtr *)((char *)room + 0x10)) <= iVar4)) { toIndex = (undefined1 *)0xffffffff; } else { - toIndex = (undefined1 *)((int)local_20 + -1) + (int)*(EntityPtr *)((char *)room + 0xc) * iVar4; + toIndex = (undefined1 *)(GHIDRA_INT(local_20) + -1) + GHIDRA_INT(*(EntityPtr *)((char *)room + 0xc)) * iVar4; } - if ((((int)((int)local_20 + -2) < 0) || - ((int)*(EntityPtr *)((char *)room + 0xc) <= (int)local_28)) || - ((int)*(EntityPtr *)((char *)room + 0x10) <= iVar4)) { + if (((GHIDRA_INT((GHIDRA_INT(local_20) + -2)) < 0) || + (GHIDRA_INT(*(EntityPtr *)((char *)room + 0xc)) <= GHIDRA_INT(local_28))) || + (GHIDRA_INT(*(EntityPtr *)((char *)room + 0x10)) <= iVar4)) { iVar2 = -1; } else { - iVar2 = (int)*(EntityPtr *)((char *)room + 0xc) * iVar4 + -2 + (int)local_20; + iVar2 = GHIDRA_INT(*(EntityPtr *)((char *)room + 0xc)) * iVar4 + -2 + GHIDRA_INT(local_20); } - isCanStep = ((RoomGridPath *)((EntityPtr *)((int)room + 0x7468)))->RoomGridPath::can_step(iVar2,(int)toIndex); + isCanStep = ((RoomGridPath *)((EntityPtr *)(GHIDRA_INT(room) + 0x7468)))->RoomGridPath::can_step(iVar2,GHIDRA_INT(toIndex)); if (isCanStep != 0) { - if ((((int)local_20 + -1 < 0) || - ((int)*(EntityPtr *)((char *)room + 0xc) <= (int)((int)local_20 + -1))) || - ((int)*(EntityPtr *)((char *)room + 0x10) <= iVar4)) { + if (((GHIDRA_INT(local_20) + -1 < 0) || + (GHIDRA_INT(*(EntityPtr *)((char *)room + 0xc)) <= GHIDRA_INT((GHIDRA_INT(local_20) + -1)))) || + (GHIDRA_INT(*(EntityPtr *)((char *)room + 0x10)) <= iVar4)) { local_18 = (EntityPtr)0xffffffff; } else { local_18 = (EntityPtr) - ((undefined1 *)((int)local_20 + -1) + - (int)*(EntityPtr *)((char *)room + 0xc) * iVar4); + ((undefined1 *)(GHIDRA_INT(local_20) + -1) + + GHIDRA_INT(*(EntityPtr *)((char *)room + 0xc)) * iVar4); } iVar2 = *(int *)((char *)g_game->_room + 0xc); - spawnPos.x = (float)((int)local_18 % iVar2) * fVar7 + fVar7; - spawnPos.y = (float)((int)local_18 / iVar2) * fVar7 + fVar8; + spawnPos.x = (float)(GHIDRA_INT(local_18) % iVar2) * fVar7 + fVar7; + spawnPos.y = (float)(GHIDRA_INT(local_18) / iVar2) * fVar7 + fVar8; seed = Random(); local_18 = (EntityPtr) ((Game *)(g_game))->Game::Spawn(0x3c7,0,&spawnPos,&g_vectorZero,(Entity *)0x0,0,seed); @@ -3363,41 +3363,41 @@ void NpcHelper::hornfel_spawn_doors() } } iVar4 = iVar4 + 1; - } while (iVar4 < (int)local_1c + -1); + } while (iVar4 < GHIDRA_INT(local_1c) + -1); } - local_18 = (EntityPtr)((int)local_20 + -1); + local_18 = (EntityPtr)(GHIDRA_INT(local_20) + -1); EVar5 = (EntityPtr)0x1; - if (1 < (int)local_18) { + if (1 < GHIDRA_INT(local_18)) { do { fVar8 = 120.0; fVar7 = 40.0; - if (((int)EVar5 < (int)*(EntityPtr *)((char *)room + 0xc)) && - (0 < (int)*(EntityPtr *)((char *)room + 0x10))) { + if ((GHIDRA_INT(EVar5) < GHIDRA_INT(*(EntityPtr *)((char *)room + 0xc))) && + (0 < GHIDRA_INT(*(EntityPtr *)((char *)room + 0x10)))) { EVar3 = *(EntityPtr *)((char *)room + 0xc); toIndex_00 = EVar5; LAB_004b747c: - if ((int)*(EntityPtr *)((char *)room + 0x10) < 2) goto LAB_004b7486; - iVar4 = (int)EVar3 + (int)EVar5; + if (GHIDRA_INT(*(EntityPtr *)((char *)room + 0x10)) < 2) goto LAB_004b7486; + iVar4 = GHIDRA_INT(EVar3) + GHIDRA_INT(EVar5); } else { EVar3 = *(EntityPtr *)((char *)room + 0xc); toIndex_00 = (EntityPtr)0xffffffff; - if ((int)EVar5 < (int)EVar3) goto LAB_004b747c; + if (GHIDRA_INT(EVar5) < GHIDRA_INT(EVar3)) goto LAB_004b747c; LAB_004b7486: iVar4 = -1; } - isCanStep = ((RoomGridPath *)((EntityPtr *)((int)room + 0x7468)))->RoomGridPath::can_step(iVar4,(int)toIndex_00); + isCanStep = ((RoomGridPath *)((EntityPtr *)(GHIDRA_INT(room) + 0x7468)))->RoomGridPath::can_step(iVar4,GHIDRA_INT(toIndex_00)); if (isCanStep != 0) { - if (((int)EVar5 < (int)*(EntityPtr *)((char *)room + 0xc)) && - (0 < (int)*(EntityPtr *)((char *)room + 0x10))) { + if ((GHIDRA_INT(EVar5) < GHIDRA_INT(*(EntityPtr *)((char *)room + 0xc))) && + (0 < GHIDRA_INT(*(EntityPtr *)((char *)room + 0x10)))) { local_20 = EVar5; } else { local_20 = (EntityPtr)0xffffffff; } iVar4 = *(int *)((char *)g_game->_room + 0xc); - spawnPos.x = (float)((int)local_20 % iVar4) * fVar7 + fVar7; - spawnPos.y = (float)((int)local_20 / iVar4) * fVar7 + fVar8; + spawnPos.x = (float)(GHIDRA_INT(local_20) % iVar4) * fVar7 + fVar7; + spawnPos.y = (float)(GHIDRA_INT(local_20) / iVar4) * fVar7 + fVar8; seed = Random(); local_24 = (EntityPtr) ((Game *)(g_game))->Game::Spawn(0x3c7,0,&spawnPos,&g_vectorZero,(Entity *)0x0,0,seed); @@ -3406,7 +3406,7 @@ LAB_004b7486: fVar7 = sin(0.0); EVar3 = local_28; local_28 = local_24; - ((Vector *)((int)local_24 + 0xdc))->x = (float)EVar3 * 0.0 - fVar7 * 15.0; + ((Vector *)(GHIDRA_INT(local_24) + 0xdc))->x = (float)EVar3 * 0.0 - fVar7 * 15.0; *(float *)((char *)local_24 + 0xe0) = fVar7 * 0.0 + (float)EVar3 * 15.0; if (doorsEnd == doorsCapacity) { std::vector::_Emplace_reallocate(doorsEnd,&local_28); @@ -3418,23 +3418,23 @@ LAB_004b7486: } } EVar3 = *(EntityPtr *)((char *)room + 0xc); - pEVar6 = (EntityPtr *)((int)room + 0x7468); - if ((((int)EVar5 < (int)EVar3) && (iVar4 = (int)local_1c + -1, -1 < iVar4)) && - (iVar4 < (int)*(EntityPtr *)((char *)room + 0x10))) { - toIndex_01 = (EntityPtr *)(iVar4 * (int)EVar3 + (int)EVar5); + pEVar6 = (EntityPtr *)(GHIDRA_INT(room) + 0x7468); + if (((GHIDRA_INT(EVar5) < GHIDRA_INT(EVar3)) && (iVar4 = GHIDRA_INT(local_1c) + -1, -1 < iVar4)) && + (iVar4 < GHIDRA_INT(*(EntityPtr *)((char *)room + 0x10)))) { + toIndex_01 = (EntityPtr *)(iVar4 * GHIDRA_INT(EVar3) + GHIDRA_INT(EVar5)); LAB_004b75cf: - iVar4 = (int)local_1c + -2; + iVar4 = GHIDRA_INT(local_1c) + -2; room = (Room *)local_2c; - if ((iVar4 < 0) || ((int)*(EntityPtr *)((char *)local_2c + 0x10) <= iVar4)) goto LAB_004b75e6; - fromIndex_00 = (EntityPtr *)(iVar4 * (int)EVar3 + (int)EVar5); + if ((iVar4 < 0) || (GHIDRA_INT(*(EntityPtr *)((char *)local_2c + 0x10)) <= iVar4)) goto LAB_004b75e6; + fromIndex_00 = (EntityPtr *)(iVar4 * GHIDRA_INT(EVar3) + GHIDRA_INT(EVar5)); } else { toIndex_01 = (EntityPtr *)0xffffffff; - if ((int)EVar5 < (int)EVar3) goto LAB_004b75cf; + if (GHIDRA_INT(EVar5) < GHIDRA_INT(EVar3)) goto LAB_004b75cf; LAB_004b75e6: fromIndex_00 = (EntityPtr *)0xffffffff; } - isCanStep = ((RoomGridPath *)(pEVar6))->RoomGridPath::can_step((int)fromIndex_00,(int)toIndex_01); + isCanStep = ((RoomGridPath *)(pEVar6))->RoomGridPath::can_step(GHIDRA_INT(fromIndex_00),GHIDRA_INT(toIndex_01)); if (isCanStep != 0) { local_28 = (EntityPtr)FUN_004bb230(); if (doorsEnd == doorsCapacity) { @@ -3446,8 +3446,8 @@ LAB_004b75e6: doorsEnd = doorsEnd + 1; } } - EVar5 = (EntityPtr)((int)EVar5 + 1); - } while ((int)EVar5 < (int)local_18); + EVar5 = (EntityPtr)(GHIDRA_INT(EVar5) + 1); + } while (GHIDRA_INT(EVar5) < GHIDRA_INT(local_18)); } local_18 = (EntityPtr)0x0; pEVar6 = doors; @@ -3455,33 +3455,33 @@ LAB_004b75e6: do { local_18 = (EntityPtr)pEVar6; local_1c = *(EntityPtr *)local_18; - EVar5 = (EntityPtr)((int)local_1c + 0x3bc); + EVar5 = (EntityPtr)(GHIDRA_INT(local_1c) + 0x3bc); local_2c = EVar5; if ((*(int *)((char *)local_1c + 0x3bc) == 0) && - (pEVar6 = (EntityPtr *)((int)local_18 + 4), pEVar6 < doorsEnd)) { + (pEVar6 = (EntityPtr *)(GHIDRA_INT(local_18) + 4), pEVar6 < doorsEnd)) { do { local_28 = *pEVar6; - local_20 = (EntityPtr)((int)local_28 + 0x3bc); + local_20 = (EntityPtr)(GHIDRA_INT(local_28) + 0x3bc); if (*(EntityPtr *)((char *)local_28 + 0x3bc) == (EntityPtr)0x0) { - iVar4 = (int)((*(float *)((char *)local_28 + 0x33c) - 40.0) / 40.0 + 0.5); - iVar2 = (int)((*(float *)((char *)local_28 + 0x340) - 120.0) / 40.0 + 0.5); - if ((((iVar4 < 0) || ((int)*(EntityPtr *)((char *)room + 0xc) <= iVar4)) || (iVar2 < 0)) || - ((int)*(EntityPtr *)((char *)room + 0x10) <= iVar2)) { + iVar4 = GHIDRA_INT(((*(float *)((char *)local_28 + 0x33c) - 40.0) / 40.0 + 0.5)); + iVar2 = GHIDRA_INT(((*(float *)((char *)local_28 + 0x340) - 120.0) / 40.0 + 0.5)); + if ((((iVar4 < 0) || (GHIDRA_INT(*(EntityPtr *)((char *)room + 0xc)) <= iVar4)) || (iVar2 < 0)) || + (GHIDRA_INT(*(EntityPtr *)((char *)room + 0x10)) <= iVar2)) { seed = 0xffffffff; } else { - seed = iVar2 * (int)*(EntityPtr *)((char *)room + 0xc) + iVar4; + seed = iVar2 * GHIDRA_INT(*(EntityPtr *)((char *)room + 0xc)) + iVar4; } - iVar2 = (int)((*(float *)((char *)local_1c + 0x33c) - 40.0) / 40.0 + 0.5); - iVar4 = (int)((*(float *)((char *)local_1c + 0x340) - 120.0) / 40.0 + 0.5); - if (((iVar2 < 0) || ((int)*(EntityPtr *)((char *)room + 0xc) <= iVar2)) || - ((iVar4 < 0 || ((int)*(EntityPtr *)((char *)room + 0x10) <= iVar4)))) { + iVar2 = GHIDRA_INT(((*(float *)((char *)local_1c + 0x33c) - 40.0) / 40.0 + 0.5)); + iVar4 = GHIDRA_INT(((*(float *)((char *)local_1c + 0x340) - 120.0) / 40.0 + 0.5)); + if (((iVar2 < 0) || (GHIDRA_INT(*(EntityPtr *)((char *)room + 0xc)) <= iVar2)) || + ((iVar4 < 0 || (GHIDRA_INT(*(EntityPtr *)((char *)room + 0x10)) <= iVar4)))) { startIndex = 0xffffffff; } else { - startIndex = iVar4 * (int)*(EntityPtr *)((char *)room + 0xc) + iVar2; + startIndex = iVar4 * GHIDRA_INT(*(EntityPtr *)((char *)room + 0xc)) + iVar2; } - isCanStep = room_grid_flood_fill((EntityPtr *)((int)room + 0x7468),startIndex,seed); + isCanStep = room_grid_flood_fill((EntityPtr *)(GHIDRA_INT(room) + 0x7468),startIndex,seed); if (isCanStep != 0) { if (*(EntityPtr *)EVar5 != (EntityPtr)0x0) { local_2c = EVar5; @@ -3500,9 +3500,9 @@ LAB_004b75e6: pEVar6 = pEVar6 + 1; } while (pEVar6 < doorsEnd); } - local_18 = (EntityPtr)((int)local_18 + 4); + local_18 = (EntityPtr)(GHIDRA_INT(local_18) + 4); pEVar6 = (EntityPtr *)local_18; - } while ((uint)local_18 < doorsEnd); + } while (GHIDRA_UINT(local_18) < doorsEnd); } if (doorsEnd != (EntityPtr *)0x0) { do { @@ -3511,28 +3511,28 @@ LAB_004b75e6: } while (doors < doorsEnd); } if (*(EntityPtr *)((char *)room + 0x724) != (EntityPtr)0x0) { - *(undefined4 *)((int)*(EntityPtr *)((char *)room + 0x724) + 0xf4) = 0; + *(undefined4 *)(GHIDRA_INT(*(EntityPtr *)((char *)room + 0x724)) + 0xf4) = 0; } if (*(EntityPtr *)((char *)room + 0x728) != (EntityPtr)0x0) { - *(undefined4 *)((int)*(EntityPtr *)((char *)room + 0x728) + 0xf4) = 0; + *(undefined4 *)(GHIDRA_INT(*(EntityPtr *)((char *)room + 0x728)) + 0xf4) = 0; } if (*(EntityPtr *)((char *)room + 0x72c) != (EntityPtr)0x0) { - *(undefined4 *)((int)*(EntityPtr *)((char *)room + 0x72c) + 0xf4) = 0; + *(undefined4 *)(GHIDRA_INT(*(EntityPtr *)((char *)room + 0x72c)) + 0xf4) = 0; } if (*(EntityPtr *)((char *)room + 0x730) != (EntityPtr)0x0) { - *(undefined4 *)((int)*(EntityPtr *)((char *)room + 0x730) + 0xf4) = 0; + *(undefined4 *)(GHIDRA_INT(*(EntityPtr *)((char *)room + 0x730)) + 0xf4) = 0; } if (*(EntityPtr *)((char *)room + 0x734) != (EntityPtr)0x0) { - *(undefined4 *)((int)*(EntityPtr *)((char *)room + 0x734) + 0xf4) = 0; + *(undefined4 *)(GHIDRA_INT(*(EntityPtr *)((char *)room + 0x734)) + 0xf4) = 0; } if (*(EntityPtr *)((char *)room + 0x738) != (EntityPtr)0x0) { - *(undefined4 *)((int)*(EntityPtr *)((char *)room + 0x738) + 0xf4) = 0; + *(undefined4 *)(GHIDRA_INT(*(EntityPtr *)((char *)room + 0x738)) + 0xf4) = 0; } if (*(EntityPtr *)((char *)room + 0x73c) != (EntityPtr)0x0) { - *(undefined4 *)((int)*(EntityPtr *)((char *)room + 0x73c) + 0xf4) = 0; + *(undefined4 *)(GHIDRA_INT(*(EntityPtr *)((char *)room + 0x73c)) + 0xf4) = 0; } if (*(EntityPtr *)((char *)room + 0x740) != (EntityPtr)0x0) { - *(undefined4 *)((int)*(EntityPtr *)((char *)room + 0x740) + 0xf4) = 0; + *(undefined4 *)(GHIDRA_INT(*(EntityPtr *)((char *)room + 0x740)) + 0xf4) = 0; } ExceptionList = local_10; return; @@ -3572,7 +3572,7 @@ void NpcHelper::hornfel_remove_doors() puStack_c = &LAB_00af33a5; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar3 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; linkedIter = (int *)0x0; local_64 = (int *)0x0; @@ -3584,14 +3584,14 @@ void NpcHelper::hornfel_remove_doors() local_14 = uVar3; if (*(int *)((char *)pvVar1 + 0x1264) != 0) { do { - local_44 = *(int **)(*(int *)((char *)pvVar1 + 0x125c) + (int)scratchVec.y * 4); + local_44 = *(int **)(*(int *)((char *)pvVar1 + 0x125c) + GHIDRA_INT(scratchVec.y) * 4); if (local_44[10] == 0x3c7) { if (linkedIter == (int *)0x0) { std::vector::_Emplace_reallocate(0,&local_44); linkedIter = local_64; } else { - *linkedIter = (int)local_44; + *linkedIter = GHIDRA_INT(local_44); local_64 = linkedIter + 1; linkedIter = local_64; } @@ -3602,13 +3602,13 @@ void NpcHelper::hornfel_remove_doors() piVar6 = local_70; } else { - *piVar6 = (int)local_44; + *piVar6 = GHIDRA_INT(local_44); local_70 = piVar6 + 1; piVar6 = local_70; } } - scratchVec.y = (float)((int)scratchVec.y + 1); - } while ((uint)scratchVec.y < (uint)*(float *)((char *)pvVar1 + 0x1264)); + scratchVec.y = (float)(GHIDRA_INT(scratchVec.y) + 1); + } while (GHIDRA_UINT(scratchVec.y) < GHIDRA_UINT(*(float *)((char *)pvVar1 + 0x1264))); } local_44 = (int *)0x0; linkedIter = (int *)0x0; @@ -3674,12 +3674,12 @@ void NpcHelper::hornfel_remove_doors() *(undefined4 *)(*(int *)((char *)pvVar1 + 0x740) + 0xf4) = 0x3f800000; } if (local_44 != (int *)0x0) { - uVar3 = -(int)local_44 & 0xfffffffc; + uVar3 = -GHIDRA_INT(local_44) & 0xfffffffc; linkedIter = local_44; if (0xfff < uVar3) { linkedIter = (int *)local_44[-1]; uVar3 = uVar3 + 0x23; - if (0x1f < (uint)((int)local_44 + (-4 - (int)linkedIter))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_44) + (-4 - GHIDRA_INT(linkedIter))))) { local_44 = hornfelDoorIter; /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3710,21 +3710,21 @@ void NpcHelper::hornfel_render_minecart(Entity_NPC *npc, ANM2 *minecartSprite, V int frameIndex; int layerIndex; - local_8 = (float)(__security_cookie ^ (uint)&frameCopy[3]._animFrame); + local_8 = (float)(__security_cookie ^ GHIDRA_UINT(&frameCopy[3]._animFrame)); renderPosLocal = renderPos; if (npc->_visible != 0) { if ((minecartSprite->_animState)._animData == (void *)0x0) { KAGE_LogMessage(0x10,(byte *)"AnimationData is NULL\n"); } - if (*(int *)((int)(minecartSprite->_animState)._animation + 0x80) < 2) { + if (*(int *)(GHIDRA_INT((minecartSprite->_animState)._animation) + 0x80) < 2) { KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"); } pvVar1 = (minecartSprite->_animState)._animData; if ((((pvVar1 != (void *)0x0) && - (0 < *(int *)((int)(minecartSprite->_animState)._animation + 0x80))) && + (0 < *(int *)(GHIDRA_INT((minecartSprite->_animState)._animation) + 0x80))) && (layerIndex = *(int *)((char *)pvVar1 + 0x3c), -1 < layerIndex)) && (((layerIndex < *(int *)((char *)pvVar1 + 0x1c) && - (frameIndex = *(int *)((int)(minecartSprite->_animState)._layerFrames + layerIndex * 4), + (frameIndex = *(int *)(GHIDRA_INT((minecartSprite->_animState)._layerFrames) + layerIndex * 4), -1 < frameIndex)) && ((layerIndex = layerIndex * 0x10 + *(int *)((char *)pvVar1 + 0x18), frameIndex < *(int *)(layerIndex + 8) && @@ -3733,15 +3733,15 @@ void NpcHelper::hornfel_render_minecart(Entity_NPC *npc, ANM2 *minecartSprite, V if ((npc->_sprite)._animState._animData == (void *)0x0) { KAGE_LogMessage(0x10,(byte *)"AnimationData is NULL\n"); } - if (*(int *)((int)(npc->_sprite)._animState._animation + 0x80) < 5) { + if (*(int *)(GHIDRA_INT((npc->_sprite)._animState._animation) + 0x80) < 5) { KAGE_LogMessage(0x10,(byte *)"LayerId out of bounds\n"); } pvVar1 = (npc->_sprite)._animState._animData; if ((((pvVar1 != (void *)0x0) && - (3 < *(int *)((int)(npc->_sprite)._animState._animation + 0x80))) && + (3 < *(int *)(GHIDRA_INT((npc->_sprite)._animState._animation) + 0x80))) && ((layerIndex = *(int *)((char *)pvVar1 + 0x48), -1 < layerIndex && (((layerIndex < *(int *)((char *)pvVar1 + 0x1c) && - (frameIndex = *(int *)((int)(npc->_sprite)._animState._layerFrames + layerIndex * 4), + (frameIndex = *(int *)(GHIDRA_INT((npc->_sprite)._animState._layerFrames) + layerIndex * 4), -1 < frameIndex)) && (layerIndex = layerIndex * 0x10 + *(int *)((char *)pvVar1 + 0x18), frameIndex < *(int *)(layerIndex + 8))))))) && @@ -3839,24 +3839,24 @@ Entity * NpcHelper::hornfel_pick_spawn() EntityPtr oldParent; EntityPtr *parentRef; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); puStack_18 = &LAB_00af332d; local_1c = ExceptionList; - securityCookie = __security_cookie ^ (int)register0x00000010 - 0x10U; + securityCookie = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; outcomes = (WeightedOutcomePicker)0x0; outcomesEnd = (undefined4 *)0x0; outcomesCapacity = (undefined4 *)0x0; local_14 = 0; - uStack_3c = (ulonglong)(uint)uStack_3c; + uStack_3c = (ulonglong)GHIDRA_UINT(uStack_3c); uStack_34 = 6; - std::vector<8byte>::_Emplace_reallocate(0,(int)&uStack_3c + 4); + std::vector<8byte>::_Emplace_reallocate(0,GHIDRA_INT(&uStack_3c) + 4); uVar3 = 0; - uVar4 = (int)outcomesEnd - (int)outcomes >> 3; + uVar4 = GHIDRA_INT(outcomesEnd) - GHIDRA_INT(outcomes) >> 3; if (uVar4 != 0) { do { if (*(int *)((char *)outcomes + uVar3 * 8) == 8) { - piVar1 = (int *)((int)outcomes + 4 + uVar3 * 8); + piVar1 = (int *)(GHIDRA_INT(outcomes) + 4 + uVar3 * 8); *piVar1 = *piVar1 + 3; if (*piVar1 < 0) { *(undefined4 *)((char *)outcomes + 4 + uVar3 * 8) = 0; @@ -3866,10 +3866,10 @@ Entity * NpcHelper::hornfel_pick_spawn() uVar3 = uVar3 + 1; } while (uVar3 < uVar4); } - uStack_3c = CONCAT44(8,(uint)uStack_3c); + uStack_3c = CONCAT44(8,GHIDRA_UINT(uStack_3c)); uStack_34 = 3; if (outcomesEnd == outcomesCapacity) { - std::vector<8byte>::_Emplace_reallocate(outcomesEnd,(int)&uStack_3c + 4); + std::vector<8byte>::_Emplace_reallocate(outcomesEnd,GHIDRA_INT(&uStack_3c) + 4); } else { *outcomesEnd = 8; @@ -3878,11 +3878,11 @@ Entity * NpcHelper::hornfel_pick_spawn() } LAB_004b7fc7: uVar3 = 0; - uVar4 = (int)outcomesEnd - (int)outcomes >> 3; + uVar4 = GHIDRA_INT(outcomesEnd) - GHIDRA_INT(outcomes) >> 3; if (uVar4 != 0) { do { if (*(int *)((char *)outcomes + uVar3 * 8) == 0x10) { - piVar1 = (int *)((int)outcomes + 4 + uVar3 * 8); + piVar1 = (int *)(GHIDRA_INT(outcomes) + 4 + uVar3 * 8); *piVar1 = *piVar1 + 1; if (*piVar1 < 0) { *(undefined4 *)((char *)outcomes + 4 + uVar3 * 8) = 0; @@ -3892,10 +3892,10 @@ LAB_004b7fc7: uVar3 = uVar3 + 1; } while (uVar3 < uVar4); } - uStack_3c = CONCAT44(0x10,(uint)uStack_3c); + uStack_3c = CONCAT44(0x10,GHIDRA_UINT(uStack_3c)); uStack_34 = 1; if (outcomesEnd == outcomesCapacity) { - std::vector<8byte>::_Emplace_reallocate(outcomesEnd,(int)&uStack_3c + 4); + std::vector<8byte>::_Emplace_reallocate(outcomesEnd,GHIDRA_INT(&uStack_3c) + 4); } else { *outcomesEnd = 0x10; @@ -3915,12 +3915,12 @@ LAB_004b8025: local_14 = 0xffffffff; uStack_34 = uVar3; if (outcomes != (WeightedOutcomePicker)0x0) { - uVar4 = (int)outcomesCapacity - (int)outcomes & 0xfffffff8; + uVar4 = GHIDRA_INT(outcomesCapacity) - GHIDRA_INT(outcomes) & 0xfffffff8; freeBlock = outcomes; if (0xfff < uVar4) { freeBlock = *(WeightedOutcomePicker *)((char *)outcomes + -4); uVar4 = uVar4 + 0x23; - if (0x1f < ((int)outcomes - (int)freeBlock) - 4U) { + if (0x1f < (GHIDRA_INT(outcomes) - GHIDRA_INT(freeBlock)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -3928,7 +3928,7 @@ LAB_004b8025: operator_delete((void *)freeBlock,uVar4); } uVar4 = Random(); - spawned = ((Game *)(g_game))->Game::Spawn(4,uVar3,(Vector *)((int)in_ECX + 0x33c),&g_vectorZero, + spawned = ((Game *)(g_game))->Game::Spawn(4,uVar3,(Vector *)(GHIDRA_INT(in_ECX) + 0x33c),&g_vectorZero, (Entity *)in_ECX,0,uVar4); oldParent = spawned->_parent; parentRef = &spawned->_parent; @@ -3955,9 +3955,9 @@ LAB_004b8025: spawned[1]._sprite._filename._buf[0xb] = '\x01'; *(BitSet128 *)&spawned[1]._type = BVar5; LAB_004b814e: - uVar2 = *(undefined4 *)((int)&spawned->_flags + 4); - *(uint *)&spawned->_flags = (uint)spawned->_flags | 0x20; - *(undefined4 *)((int)&spawned->_flags + 4) = uVar2; + uVar2 = *(undefined4 *)(GHIDRA_INT(&spawned->_flags) + 4); + *(uint *)&spawned->_flags = GHIDRA_UINT(spawned->_flags) | 0x20; + *(undefined4 *)(GHIDRA_INT(&spawned->_flags) + 4) = uVar2; ExceptionList = local_1c; return spawned; } @@ -3995,11 +3995,11 @@ void NpcHelper::hornfel_minecart(Entity_NPC *npc) ANM2 *minecartSprite; void *room; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00af33dd; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; local_48 = (EntityPtr)npc; if (npc->_state == 7) { @@ -4007,7 +4007,7 @@ void NpcHelper::hornfel_minecart(Entity_NPC *npc) local_60.y = (float)EVar4; if (EVar4 != (EntityPtr)0x0) { local_40 = (EntityPtr)&npc->_entityRef; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); std::multiset::erase(&local_40); npc->_entityRef = (EntityPtr)0x0; goto LAB_004b8213; @@ -4018,7 +4018,7 @@ void NpcHelper::hornfel_minecart(Entity_NPC *npc) local_58.y = 0.0; if (*(int *)((char *)local_50.y + 0x1264) != 0) { do { - iVar6 = *(int *)(*(int *)((char *)local_50.y + 0x125c) + (int)local_58.y * 4); + iVar6 = *(int *)(*(int *)((char *)local_50.y + 0x125c) + GHIDRA_INT(local_58.y) * 4); if (*(int *)(iVar6 + 0x28) == 0x3c7) { if (*(Entity_NPC **)(iVar6 + 0x3c4) == npc) { if (*(Entity_NPC **)(iVar6 + 0x3c4) == (Entity_NPC *)0x0) { @@ -4041,8 +4041,8 @@ void NpcHelper::hornfel_minecart(Entity_NPC *npc) } } LAB_004b8675: - local_58.y = (float)((int)local_58.y + 1); - } while ((uint)local_58.y < (uint)*(float *)((char *)local_50.y + 0x1264)); + local_58.y = (float)(GHIDRA_INT(local_58.y) + 1); + } while (GHIDRA_UINT(local_58.y) < GHIDRA_UINT(*(float *)((char *)local_50.y + 0x1264))); } EVar4 = (EntityPtr)local_60.y; if ((EntityPtr)local_60.y == (EntityPtr)0x0) { @@ -4064,14 +4064,14 @@ LAB_004b8213: if ((EntityPtr)local_58.y != (EntityPtr)0x0) { FUN_004cf0f0(1); Entity_NPC::SetMinecartPosVel - ((Entity_NPC *)local_58.y,(Vector *)((int)EVar4 + 0x334),&local_50); + ((Entity_NPC *)local_58.y,(Vector *)(GHIDRA_INT(EVar4) + 0x334),&local_50); fVar7 = *(float *)((char *)local_58.y + 0x340); (npc->_pos).x = *(float *)((char *)local_58.y + 0x33c); (npc->_pos).y = fVar7; hornfel_claim_target((Entity_NPC *)EVar4,(Entity *)npc); local_40 = npc->_parent; if (npc->_state == 6) { - if (*(char *)((int)&npc->_projectileCooldown + 1) == '\0') { + if (*(char *)(GHIDRA_INT(&npc->_projectileCooldown) + 1) == '\0') { uVar1 = Random(); if (((uVar1 & 7) == 0) && ((local_40 == (EntityPtr)0x0 || (4 < *(int *)((char *)local_40 + 0x45c))))) { @@ -4103,30 +4103,30 @@ LAB_004b8213: (**(code **)(*(int *)EVar4 + 0xc))(); velocity = hornfel_get_rail_direction((Entity_NPC *)local_60.y,&railDirOut); local_50.y = (float)Entity::GiveMinecart - ((Entity *)EVar4,(Vector *)((int)local_60.y + 0x334), + ((Entity *)EVar4,(Vector *)(GHIDRA_INT(local_60.y) + 0x334), velocity); anm2Path._size = 0; - minecartSprite = (ANM2 *)((int)local_50.y + 0x48); + minecartSprite = (ANM2 *)(GHIDRA_INT(local_50.y) + 0x48); anm2Path._capacity = 0xf; anm2Path._buf[0] = '\0'; anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x30); anm2Path._size = 0x21; anm2Path._capacity = 0x2f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/965.001_hornfel minecart.anm2",0x22 + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/965.001_hornfel minecart.anm2",0x22 ); local_14 = 0; ((ANM2 *)(minecartSprite))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar1 = anm2Path._capacity + 1; - ptr = (char *)anm2Path._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar1) { - ptr = *(char **)(anm2Path._buf._0_4_ + -4); + ptr = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar1 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)ptr))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(ptr)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -4139,7 +4139,7 @@ LAB_004b8213: ((*(int *)((char *)local_60.y + 0x3bc) == 0 || (*(int *)(*(int *)((char *)local_60.y + 0x3bc) + 0x3c4) == 0)))) { *(EntityPtr *)((char *)local_60.y + 0x3c4) = local_48; - std::multiset::insert((EntityPtr *)((int)local_60.y + 0x3c4)); + std::multiset::insert((EntityPtr *)(GHIDRA_INT(local_60.y) + 0x3c4)); iVar6 = *(int *)((char *)local_60.y + 0x3bc); if (iVar6 != 0) { local_50.y = (float)(iVar6 + 0x3c4); @@ -4151,11 +4151,11 @@ LAB_004b8213: std::multiset::insert(local_50.y); } } - local_58.y = (float)((int)local_58.y + 1); - } while ((int)local_58.y < (int)local_44); + local_58.y = (float)(GHIDRA_INT(local_58.y) + 1); + } while (GHIDRA_INT(local_58.y) < GHIDRA_INT(local_44)); npc->_state = 0xe; uVar1 = Random(); - *(undefined1 *)((int)&npc->_projectileCooldown + 1) = 100; + *(undefined1 *)(GHIDRA_INT(&npc->_projectileCooldown) + 1) = 100; *(short *)&npc->_projectileDelay = (short)(uVar1 % 0x1e) + 0x1e; if (local_40 == (EntityPtr)0x0) { ExceptionList = local_1c; @@ -4173,7 +4173,7 @@ LAB_004b8213: EVar4 = (EntityPtr)local_60.y; } } - if ((((npc->_state == 6) && (*(char *)((int)&npc->_projectileCooldown + 2) == '\0')) && + if ((((npc->_state == 6) && (*(char *)(GHIDRA_INT(&npc->_projectileCooldown) + 2) == '\0')) && (uVar1 = Random(), (uVar1 & 7) == 0)) && ((*(EntityPtr *)((char *)EVar4 + 0x3bc) != (EntityPtr)0x0 && (*(EntityPtr *)((char *)EVar4 + 0x3bc) != EVar4)))) { @@ -4185,9 +4185,9 @@ LAB_004b8213: } npc->_entityRef = EVar4; std::multiset::insert(&npc->_entityRef); - *(undefined1 *)((int)&npc->_projectileCooldown + 2) = 100; + *(undefined1 *)(GHIDRA_INT(&npc->_projectileCooldown) + 2) = 100; uVar1 = Random(); - *(char *)((int)&npc->_projectileDelay + 2) = (char)(uVar1 % 3) + '\x06'; + *(char *)(GHIDRA_INT(&npc->_projectileDelay) + 2) = (char)(uVar1 % 3) + '\x06'; ExceptionList = local_1c; return; } @@ -4222,20 +4222,20 @@ LAB_004b8213: } uVar1 = 0; local_40 = (EntityPtr)0x7149f2ca; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { player = ((Game *)(g_game))->Game::GetPlayer(uVar1); uVar1 = uVar1 + 1; fVar7 = *(float *)((char *)npc + 0x340) - (player->_pos).y; - deltaX = ((Vector *)((int)npc + 0x33c))->x - (player->_pos).x; + deltaX = ((Vector *)(GHIDRA_INT(npc) + 0x33c))->x - (player->_pos).x; EVar4 = (EntityPtr)(fVar7 * fVar7 + deltaX * deltaX); if ((float)local_40 <= (float)EVar4) { EVar4 = local_40; } local_40 = EVar4; - } while (uVar1 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (uVar1 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); if ((float)EVar4 <= 57600.0) { ExceptionList = local_1c; return; @@ -4246,20 +4246,20 @@ LAB_004b8213: uVar1 = Random(); rngResult = Random(); local_44 = (EntityPtr *) - (((float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * + (((float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 40.0 - 20.0) * 0.017453292); local_48 = (EntityPtr)cos((float)local_44); fVar7 = sin((float)local_44); local_58.x = local_50.x * (float)local_48 - local_50.y * fVar7; local_58.y = local_50.y * (float)local_48 + local_50.x * fVar7; rngResult = Random(); - fVar7 = (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * 3.14 + fVar7 = (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14 ; local_44 = (EntityPtr *)(fVar7 + fVar7); fVar7 = cos((float)local_44); - local_60.x = fVar7 * 6.0 + ((Vector *)((int)npc + 0x33c))->x; + local_60.x = fVar7 * 6.0 + ((Vector *)(GHIDRA_INT(npc) + 0x33c))->x; fVar7 = sin((float)local_44); local_60.y = fVar7 * 6.0 + *(float *)((char *)npc + 0x340); spawned = ((Game *)(g_game))->Game::Spawn(0x333,0,&local_60,&local_58,(Entity *)npc,0,uVar1); @@ -4269,9 +4269,9 @@ LAB_004b8213: } spawned->_parent = (EntityPtr)npc; std::multiset::insert(&spawned->_parent); - *(uint *)&spawned->_flags = (uint)spawned->_flags & 0xfffffffb; - local_40 = (EntityPtr)((int)local_40 + -1); - *(undefined4 *)((int)&spawned->_flags + 4) = *(undefined4 *)((int)&spawned->_flags + 4); + *(uint *)&spawned->_flags = GHIDRA_UINT(spawned->_flags) & 0xfffffffb; + local_40 = (EntityPtr)(GHIDRA_INT(local_40) + -1); + *(undefined4 *)(GHIDRA_INT(&spawned->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&spawned->_flags) + 4); } while (local_40 != (EntityPtr)0x0); } } @@ -4308,14 +4308,14 @@ void NpcHelper::hornfel_ride_minecart(Entity_NPC *linkedNpc) local_10 = ExceptionList; minecart = linkedNpc->_minecart; if ((linkedNpc->_state == 10) && (linkedNpc = linkedNpc->_entityRef, linkedNpc != (EntityPtr)0x0)) { - if ('\0' < *(char *)((int)&linkedNpc->_projectileDelay + 2)) { + if ('\0' < *(char *)(GHIDRA_INT(&linkedNpc->_projectileDelay) + 2)) { ExceptionList = &local_10; hornfel_get_rail_direction((Entity_NPC *)linkedNpc,&scratchVec); Entity_NPC::SetMinecartPosVel - ((Entity_NPC *)minecart,(Vector *)((int)linkedNpc + 0x334),&scratchVec); - fVar4 = ((Vector *)((int)minecart + 0x33c))->x; + ((Entity_NPC *)minecart,(Vector *)(GHIDRA_INT(linkedNpc) + 0x334),&scratchVec); + fVar4 = ((Vector *)(GHIDRA_INT(minecart) + 0x33c))->x; fVar6 = *(float *)((char *)minecart + 0x340); - pcVar1 = (char *)((int)&linkedNpc->_projectileDelay + 2); + pcVar1 = (char *)(GHIDRA_INT(&linkedNpc->_projectileDelay) + 2); *pcVar1 = *pcVar1 + -1; (linkedNpc->_pos).x = fVar4; (linkedNpc->_pos).y = fVar6; @@ -4329,13 +4329,13 @@ void NpcHelper::hornfel_ride_minecart(Entity_NPC *linkedNpc) (linkedNpc->_targetPosition).x = (linkedNpc->_pos).x; (linkedNpc->_targetPosition).y = (linkedNpc->_pos).y; linkedNpc->_shadowSize = 0.0; - fVar4 = ((Vector *)((int)minecart + 3000))->x; + fVar4 = ((Vector *)(GHIDRA_INT(minecart) + 3000))->x; fVar6 = 6.0; if (fVar4 <= 6.0) { fVar6 = fVar4; } *(float *)((char *)minecart + 0x15c) = 0.0; - ((Vector *)((int)minecart + 3000))->x = fVar6; + ((Vector *)(GHIDRA_INT(minecart) + 3000))->x = fVar6; return; } ExceptionList = &local_10; @@ -4348,13 +4348,13 @@ void NpcHelper::hornfel_ride_minecart(Entity_NPC *linkedNpc) game = g_game; linkedNpc->_shadowSize = 0.0; *(float *)((char *)minecart + 0x15c) = 0.0; - EntityList::QuerySublist((EntityList *)((int)game->_room + 0x1218),&flyBombs,0x333,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(game->_room) + 0x1218),&flyBombs,0x333,-1,-1,0,0); uVar5 = 0; if (flyBombs._size != 0) { flyBombData = flyBombs._data; do { scratchVec.y = *(float *)((char *)flyBombData + uVar5 * 4); - parentRef = (undefined4 *)((int)scratchVec.y + 0x3bc); + parentRef = (undefined4 *)(GHIDRA_INT(scratchVec.y) + 0x3bc); if (*(Entity_NPC **)((char *)scratchVec.y + 0x3bc) == linkedNpc) { fVar4 = scratchVec.y; if (*(Entity_NPC **)((char *)scratchVec.y + 0x3bc) != (Entity_NPC *)0x0) { @@ -4373,22 +4373,22 @@ void NpcHelper::hornfel_ride_minecart(Entity_NPC *linkedNpc) flyBombData = flyBombs._data; } uVar5 = uVar5 + 1; - } while (uVar5 < (uint)flyBombs._size); + } while (uVar5 < GHIDRA_UINT(flyBombs._size)); } - if (flyBombs._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(flyBombs) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (flyBombs._data != (void *)0x0) { uVar5 = *(uint *)((char *)flyBombs._data + -4); qVar2 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar5; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar5; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar2 < uVar5); - free((uint *)((int)flyBombs._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < uVar5)); + free((uint *)(GHIDRA_INT(flyBombs._data) + -4)); } } ExceptionList = local_10; @@ -4427,24 +4427,24 @@ void NpcHelper::hornfel_attack(Entity_NPC *npc) undefined4 *firstChildSlot; int *outcomeWeight; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); puStack_18 = &LAB_00af344d; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; picker = (WeightedOutcomePicker)0x0; outcomesEnd = (undefined4 *)0x0; outcomesCapacity = (undefined4 *)0x0; local_14 = 0; - uStack_48 = (ulonglong)(uint)uStack_48; + uStack_48 = (ulonglong)GHIDRA_UINT(uStack_48); fStack_40 = 4.2039e-45; - std::vector<8byte>::_Emplace_reallocate(0,(int)&uStack_48 + 4); + std::vector<8byte>::_Emplace_reallocate(0,GHIDRA_INT(&uStack_48) + 4); uVar1 = 0; - uVar3 = (int)outcomesEnd - (int)picker >> 3; + uVar3 = GHIDRA_INT(outcomesEnd) - GHIDRA_INT(picker) >> 3; if (uVar3 != 0) { do { if (*(int *)((char *)picker + uVar1 * 8) == 1) { - outcomeWeight = (int *)((int)picker + 4 + uVar1 * 8); + outcomeWeight = (int *)(GHIDRA_INT(picker) + 4 + uVar1 * 8); *outcomeWeight = *outcomeWeight + 1; if (*outcomeWeight < 0) { *(undefined4 *)((char *)picker + 4 + uVar1 * 8) = 0; @@ -4454,10 +4454,10 @@ void NpcHelper::hornfel_attack(Entity_NPC *npc) uVar1 = uVar1 + 1; } while (uVar1 < uVar3); } - uStack_48 = CONCAT44(1,(uint)uStack_48); + uStack_48 = CONCAT44(1,GHIDRA_UINT(uStack_48)); fStack_40 = 1.4013e-45; if (outcomesEnd == outcomesCapacity) { - std::vector<8byte>::_Emplace_reallocate(outcomesEnd,(int)&uStack_48 + 4); + std::vector<8byte>::_Emplace_reallocate(outcomesEnd,GHIDRA_INT(&uStack_48) + 4); } else { *outcomesEnd = 1; @@ -4467,11 +4467,11 @@ void NpcHelper::hornfel_attack(Entity_NPC *npc) LAB_004b8d87: if ((char)npc->_projectileCooldown == '\0') { uVar1 = 0; - uVar3 = (int)outcomesEnd - (int)picker >> 3; + uVar3 = GHIDRA_INT(outcomesEnd) - GHIDRA_INT(picker) >> 3; if (uVar3 != 0) { do { if (*(int *)((char *)picker + uVar1 * 8) == 2) { - outcomeWeight = (int *)((int)picker + 4 + uVar1 * 8); + outcomeWeight = (int *)(GHIDRA_INT(picker) + 4 + uVar1 * 8); *outcomeWeight = *outcomeWeight + 1; if (*outcomeWeight < 0) { *(undefined4 *)((char *)picker + 4 + uVar1 * 8) = 0; @@ -4481,10 +4481,10 @@ LAB_004b8d87: uVar1 = uVar1 + 1; } while (uVar1 < uVar3); } - uStack_48 = CONCAT44(2,(uint)uStack_48); + uStack_48 = CONCAT44(2,GHIDRA_UINT(uStack_48)); fStack_40 = 1.4013e-45; if (outcomesEnd == outcomesCapacity) { - std::vector<8byte>::_Emplace_reallocate(outcomesEnd,(int)&uStack_48 + 4); + std::vector<8byte>::_Emplace_reallocate(outcomesEnd,GHIDRA_INT(&uStack_48) + 4); } else { *outcomesEnd = 2; @@ -4509,12 +4509,12 @@ LAB_004b8df1: local_28 = (undefined4 *)((float)local_28 * (1.0 / targetDist)); targetDirY = targetDirY * (1.0 / targetDist); } - *(undefined1 *)((int)&npc->_projectileDelay + 3) = 1; + *(undefined1 *)(GHIDRA_INT(&npc->_projectileDelay) + 3) = 1; if (uVar1 == 0) { fStack_40 = (float)hornfel_pick_spawn(extraout_ECX); uVar1 = (npc->_entityDeque)._offset; uVar3 = uVar1 & 3; - dequeBlock = *(int *)((int)(npc->_entityDeque)._map + + dequeBlock = *(int *)(GHIDRA_INT((npc->_entityDeque)._map) + ((npc->_entityDeque)._mapSize - 1 & uVar1 >> 2) * 4); childSlot = (float *)(dequeBlock + uVar3 * 4); if (*(int *)(dequeBlock + uVar3 * 4) != 0) { @@ -4541,7 +4541,7 @@ LAB_004b9068: animName = "Attack1Right_Back"; } ((ANM2 *)(&npc->_sprite))->ANM2::Play((byte *)animName,0); - *(undefined1 *)((int)&npc->_projectileDelay + 3) = 0; + *(undefined1 *)(GHIDRA_INT(&npc->_projectileDelay) + 3) = 0; } } else { @@ -4556,7 +4556,7 @@ LAB_004b9068: local_2c = (float *)hornfel_pick_spawn(extraout_ECX); uVar1 = (npc->_entityDeque)._offset; uVar3 = uVar1 & 3; - dequeBlock = *(int *)((int)(npc->_entityDeque)._map + + dequeBlock = *(int *)(GHIDRA_INT((npc->_entityDeque)._map) + ((npc->_entityDeque)._mapSize - 1 & uVar1 >> 2) * 4); firstChildSlot = (undefined4 *)(dequeBlock + uVar3 * 4); uVar2 = 0; @@ -4573,7 +4573,7 @@ LAB_004b9068: local_28 = (undefined4 *)hornfel_pick_spawn(uVar2); uVar1 = (npc->_entityDeque)._offset + 1; uVar3 = uVar1 & 3; - dequeBlock = *(int *)((int)(npc->_entityDeque)._map + + dequeBlock = *(int *)(GHIDRA_INT((npc->_entityDeque)._map) + ((npc->_entityDeque)._mapSize - 1 & uVar1 >> 2) * 4); childSlot = (float *)(dequeBlock + uVar3 * 4); if (*(int *)(dequeBlock + uVar3 * 4) != 0) { @@ -4589,18 +4589,18 @@ LAB_004b9068: goto LAB_004b9068; } ((ANM2 *)(&npc->_sprite))->ANM2::Play((byte *)"Attack1Double_Back",0); - *(undefined1 *)((int)&npc->_projectileDelay + 3) = 0; + *(undefined1 *)(GHIDRA_INT(&npc->_projectileDelay) + 3) = 0; } npc->_state = 8; LAB_004b9077: - *(undefined1 *)((int)&npc->_projectileDelay + 2) = 0; + *(undefined1 *)(GHIDRA_INT(&npc->_projectileDelay) + 2) = 0; if (picker != (WeightedOutcomePicker)0x0) { - uVar1 = (int)outcomesCapacity - (int)picker & 0xfffffff8; + uVar1 = GHIDRA_INT(outcomesCapacity) - GHIDRA_INT(picker) & 0xfffffff8; ptr = picker; if (0xfff < uVar1) { ptr = *(WeightedOutcomePicker *)((char *)picker + -4); uVar1 = uVar1 + 0x23; - if (0x1f < ((int)picker - (int)ptr) - 4U) { + if (0x1f < (GHIDRA_INT(picker) - GHIDRA_INT(ptr)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -4672,9 +4672,9 @@ void NpcHelper::hornfel_launch_toward(Entity_NPC *npc, Entity *entity, Vector *t (pEVar2->_posOffset).y = -24.0; (pEVar2->_pos).x = (npc->_pos).x; npcPosY = (npc->_pos).y; - *(uint *)&pEVar2->_flags = (uint)pEVar2->_flags & 0xffffffdf; + *(uint *)&pEVar2->_flags = GHIDRA_UINT(pEVar2->_flags) & 0xffffffdf; (pEVar2->_pos).y = npcPosY; - *(undefined4 *)((int)&pEVar2->_flags + 4) = *(undefined4 *)((int)&pEVar2->_flags + 4); + *(undefined4 *)(GHIDRA_INT(&pEVar2->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&pEVar2->_flags) + 4); iVar1 = *(int *)pEVar2; (pEVar2->_velocity).x = (float)targetPos; (pEVar2->_velocity).y = fVar3 * launchSpeed; @@ -4744,13 +4744,13 @@ LAB_004bb4af: i = i + 1; } while (i < *(uint *)((char *)room + 0x1264)); if (candidatesEnd != (int *)0x0) { - if ((int)candidatesEnd >> 2 == 0) { + if (GHIDRA_INT(candidatesEnd) >> 2 == 0) { ExceptionList = local_10; return pERam00000000; } rngResult = Random(); ExceptionList = local_10; - return *(Entity **)((rngResult % (uint)((int)candidatesEnd >> 2)) * 4); + return *(Entity **)((rngResult % GHIDRA_UINT((GHIDRA_INT(candidatesEnd) >> 2))) * 4); } } ExceptionList = local_10; @@ -4770,12 +4770,12 @@ Vector * NpcHelper::hornfel_get_rail_direction(Entity_NPC *npc, Vector *outDirec zeroY = g_vectorZero.y; room = g_game->_room; - gridX = (int)(((npc->_targetPosition).x - 40.0) / 40.0 + 0.5); + gridX = GHIDRA_INT((((npc->_targetPosition).x - 40.0) / 40.0 + 0.5)); if ((((-1 < gridX) && (gridX < *(int *)((char *)room + 0xc))) && - (gridY = (int)(((npc->_targetPosition).y - 120.0) / 40.0 + 0.5), -1 < gridY)) && + (gridY = GHIDRA_INT((((npc->_targetPosition).y - 120.0) / 40.0 + 0.5)), -1 < gridY)) && (((gridY < *(int *)((char *)room + 0x10) && (gridIdx = *(int *)((char *)room + 0xc) * gridY + gridX, gridIdx < 0x1c0)) && - (railFlags = *(byte *)(gridIdx + 0x746c + (int)room), railFlags != 0xff)))) { + (railFlags = *(byte *)(gridIdx + 0x746c + GHIDRA_INT(room)), railFlags != 0xff)))) { if ((railFlags & 0x40) == 0) { if ((railFlags & 0x10) == 0) { railSign = railFlags >> 5 & 1; @@ -4790,7 +4790,7 @@ Vector * NpcHelper::hornfel_get_rail_direction(Entity_NPC *npc, Vector *outDirec railFlags = *(byte *)((char *)room + gridIdx + 0x746c); if (railSign != 0) { if ((railFlags & 0xf) != 0) { - if ((int)railSign < 0) { + if (GHIDRA_INT(railSign) < 0) { outDirection->x = 0.0; outDirection->y = (float)&DAT_bf800000; return outDirection; @@ -4799,7 +4799,7 @@ Vector * NpcHelper::hornfel_get_rail_direction(Entity_NPC *npc, Vector *outDirec outDirection->y = 1.0; return outDirection; } - if ((int)railSign < 0) { + if (GHIDRA_INT(railSign) < 0) { outDirection->x = (float)&DAT_bf800000; outDirection->y = (float)(railFlags & 0xf); return outDirection; @@ -4827,9 +4827,9 @@ int NpcHelper::hornfel_next_rail_index(Entity_NPC *npc) Room *room; room = g_game->_room; - iVar1 = (int)(((npc->_targetPosition).x - 40.0) / 40.0 + 0.5); + iVar1 = GHIDRA_INT((((npc->_targetPosition).x - 40.0) / 40.0 + 0.5)); if ((((-1 < iVar1) && (iVar1 < room->_gridWidth)) && - (row = (int)(((npc->_targetPosition).y - 120.0) / 40.0 + 0.5), -1 < row)) && + (row = GHIDRA_INT((((npc->_targetPosition).y - 120.0) / 40.0 + 0.5)), -1 < row)) && (((row < room->_gridHeight && (gridIndex = room->_gridWidth * row + iVar1, gridIndex < 0x1c0)) && (railType = (room->_railManager)._sprite._filename._buf[gridIndex - 0x1c0], railType != 0xff)))) { @@ -4846,7 +4846,7 @@ int NpcHelper::hornfel_next_rail_index(Entity_NPC *npc) } if (railDirection != 0) { if (((room->_railManager)._sprite._filename._buf[gridIndex - 0x1c0] & 0xfU) == 0) { - if ((int)railDirection < 0) { + if (GHIDRA_INT(railDirection) < 0) { directionSign = &DAT_bf800000; } else { @@ -4857,7 +4857,7 @@ int NpcHelper::hornfel_next_rail_index(Entity_NPC *npc) iVar1 = ((Room *)(room))->Room::GetGridIndex(&nextPos); return iVar1; } - if ((int)railDirection < 0) { + if (GHIDRA_INT(railDirection) < 0) { directionSign = &DAT_bf800000; } else { @@ -4905,7 +4905,7 @@ LAB_004bb896: isLess = bVar1 < *openAnimChar; if (bVar1 != *openAnimChar) { LAB_004bb880: - animCompare = -(uint)isLess | 1; + animCompare = -GHIDRA_UINT(isLess) | 1; goto LAB_004bb885; } if (bVar1 == 0) break; @@ -4948,7 +4948,7 @@ byte NpcHelper::hornfel_claim_target(Entity_NPC *npc, Entity *target) EVar1 = npc->_parent; } if (EVar1 != (EntityPtr)0x0) { - parentTargetRef = (Entity *)((int)EVar1 + 0x3c4); + parentTargetRef = (Entity *)(GHIDRA_INT(EVar1) + 0x3c4); if (*(int *)((char *)EVar1 + 0x3c4) != 0) { target = parentTargetRef; std::multiset::erase(&target); @@ -4975,7 +4975,7 @@ void NpcHelper::hornfel_room_controller(Entity_Effect *effect) void *room; int roomWidth; - cartTypeChoices[0xe] = __security_cookie ^ (uint)&railDirection; + cartTypeChoices[0xe] = __security_cookie ^ GHIDRA_UINT(&railDirection); room = g_game->_room; if (effect->_state == 0) { hornfel_spawn_doors(); @@ -5019,9 +5019,9 @@ void NpcHelper::hornfel_room_controller(Entity_Effect *effect) cart = ((Game *)(g_game))->Game::SpawnEx(cartTypeChoices[(uVar2 % 7) * 2], cartTypeChoices[(uVar2 % 7) * 2 + 1],&g_vectorZero,&g_vectorZero, (Entity *)0x0,0,uVar3,0); - uVar1 = *(undefined4 *)((int)&cart->_flags + 4); - *(uint *)&cart->_flags = (uint)cart->_flags & 0xfffffffb; - *(undefined4 *)((int)&cart->_flags + 4) = uVar1; + uVar1 = *(undefined4 *)(GHIDRA_INT(&cart->_flags) + 4); + *(uint *)&cart->_flags = GHIDRA_UINT(cart->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&cart->_flags) + 4) = uVar1; cart->_spawnerType = 0x38a; ((Entity *)(cart))->Entity::GiveMinecart(&npc->_targetPosition,&railDirection); hornfel_claim_target(npc,cart); @@ -5069,8 +5069,8 @@ byte NpcHelper::horny_boys_pick_position(Entity_NPC *npc) do { ((Room *)(game->_room))->Room::GetRandomPosition(&candidatePos,20.0); room = g_game->_room; - gridX = (int)((candidatePos.x - 40.0) / 40.0 + 0.5); - iVar1 = (int)((candidatePos.y - 120.0) / 40.0 + 0.5); + gridX = GHIDRA_INT(((candidatePos.x - 40.0) / 40.0 + 0.5)); + iVar1 = GHIDRA_INT(((candidatePos.y - 120.0) / 40.0 + 0.5)); if ((((gridX < 0) || (gridWidth = *(int *)((char *)room + 0xc), gridWidth <= gridX)) || (iVar1 < 0) ) || (*(int *)((char *)room + 0x10) <= iVar1)) { gridWidth = *(int *)((char *)room + 0xc); @@ -5079,8 +5079,8 @@ byte NpcHelper::horny_boys_pick_position(Entity_NPC *npc) else { gridIndex = gridWidth * iVar1 + gridX; } - candidatePos.x = (float)((int)gridIndex % gridWidth) * 40.0 + 40.0; - candidatePos.y = (float)((int)gridIndex / gridWidth) * 40.0 + 120.0; + candidatePos.x = (float)(GHIDRA_INT(gridIndex) % gridWidth) * 40.0 + 40.0; + candidatePos.y = (float)(GHIDRA_INT(gridIndex) / gridWidth) * 40.0 + 120.0; candidateY = candidatePos.y; candidateX = candidatePos.x; nearestPlayer = ((Game *)(g_game))->Game::GetNearestPlayer(&candidatePos); @@ -5121,14 +5121,14 @@ Entity * NpcHelper::horny_boys_pull_entity(Entity_NPC *npc, int slot, Vector *ta undefined4 *ringSlot; local_c = (EntityPtr *)(npc->_entityDeque)._offset; - uVar2 = (uint)(&(*(undefined1 *)((char *)(local_c) + 0x0)) + slot) >> 2; - blockSlot = (uint)(&(*(undefined1 *)((char *)(local_c) + 0x0)) + slot) & 3; - if (*(int *)(*(int *)((int)(npc->_entityDeque)._map + + uVar2 = GHIDRA_UINT((&(*(undefined1 *)((char *)(local_c) + 0x0)) + slot)) >> 2; + blockSlot = GHIDRA_UINT((&(*(undefined1 *)((char *)(local_c) + 0x0)) + slot)) & 3; + if (*(int *)(*(int *)(GHIDRA_INT((npc->_entityDeque)._map) + ((npc->_entityDeque)._mapSize - 1 & uVar2) * 4) + blockSlot * 4) == 0) { return (Entity *)0x0; } pEVar3 = *(Entity **) - (*(int *)((int)(npc->_entityDeque)._map + ((npc->_entityDeque)._mapSize - 1 & uVar2) * 4 + (*(int *)(GHIDRA_INT((npc->_entityDeque)._map) + ((npc->_entityDeque)._mapSize - 1 & uVar2) * 4 ) + blockSlot * 4); if ((pEVar3 == (Entity *)0x0) || (pEVar3->_type != 4)) { pEVar3 = (Entity *)0x0; @@ -5172,9 +5172,9 @@ Entity * NpcHelper::horny_boys_pull_entity(Entity_NPC *npc, int slot, Vector *ta (pEVar3->_posOffset).y = -24.0; (pEVar3->_pos).x = (npc->_pos).x; fVar4 = (npc->_pos).y; - *(uint *)&pEVar3->_flags = (uint)pEVar3->_flags & 0xffffffdf; + *(uint *)&pEVar3->_flags = GHIDRA_UINT(pEVar3->_flags) & 0xffffffdf; (pEVar3->_pos).y = fVar4; - *(undefined4 *)((int)&pEVar3->_flags + 4) = *(undefined4 *)((int)&pEVar3->_flags + 4); + *(undefined4 *)(GHIDRA_INT(&pEVar3->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&pEVar3->_flags) + 4); iVar1 = *(int *)pEVar3; (pEVar3->_velocity).x = (float)targetPos; (pEVar3->_velocity).y = local_8; @@ -5182,11 +5182,11 @@ Entity * NpcHelper::horny_boys_pull_entity(Entity_NPC *npc, int slot, Vector *ta } uVar2 = slot + (npc->_entityDeque)._offset; blockSlot = uVar2 & 3; - iVar1 = *(int *)((int)(npc->_entityDeque)._map + + iVar1 = *(int *)(GHIDRA_INT((npc->_entityDeque)._map) + (uVar2 >> 2 & (npc->_entityDeque)._mapSize - 1) * 4); ringSlot = (undefined4 *)(iVar1 + blockSlot * 4); if (*(int *)(iVar1 + blockSlot * 4) != 0) { - slot = (int)ringSlot; + slot = GHIDRA_INT(ringSlot); std::multiset::erase(&slot); } *ringSlot = 0; @@ -5217,20 +5217,20 @@ Entity * NpcHelper::horny_boys_spawn_bomb(Entity_NPC *npc, int slot) EntityPtr *bombSlot; int *outcomeWeight; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &DAT_00af350d; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; uVar4 = slot + (npc->_entityDeque)._offset; uVar5 = uVar4 >> 2; uVar4 = uVar4 & 3; - puVar2 = (undefined1 *)((int)register0x00000010 + -4); - if (*(int *)(*(int *)((int)(npc->_entityDeque)._map + + puVar2 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); + if (*(int *)(*(int *)(GHIDRA_INT((npc->_entityDeque)._map) + ((npc->_entityDeque)._mapSize - 1 & uVar5) * 4) + uVar4 * 4) != 0) { pEStack_34 = (EntityPtr *)(npc->_entityDeque)._offset; - (**(code **)(**(int **)(*(int *)((int)(npc->_entityDeque)._map + + (**(code **)(**(int **)(*(int *)(GHIDRA_INT((npc->_entityDeque)._map) + ((npc->_entityDeque)._mapSize - 1 & uVar5) * 4) + uVar4 * 4) + 0x28))(local_24); puVar2 = puStack_20; @@ -5240,15 +5240,15 @@ Entity * NpcHelper::horny_boys_spawn_bomb(Entity_NPC *npc, int slot) outcomesEnd = (undefined4 *)0x0; outcomesCapacity = (undefined4 *)0x0; local_14 = 0; - uStack_3c = (ulonglong)(uint)uStack_3c; + uStack_3c = (ulonglong)GHIDRA_UINT(uStack_3c); pEStack_34 = (EntityPtr *)0x6; - std::vector<8byte>::_Emplace_reallocate(0,(int)&uStack_3c + 4); + std::vector<8byte>::_Emplace_reallocate(0,GHIDRA_INT(&uStack_3c) + 4); uVar4 = 0; - uVar5 = (int)outcomesEnd - (int)picker >> 3; + uVar5 = GHIDRA_INT(outcomesEnd) - GHIDRA_INT(picker) >> 3; if (uVar5 != 0) { do { if (*(int *)((char *)picker + uVar4 * 8) == 8) { - outcomeWeight = (int *)((int)picker + 4 + uVar4 * 8); + outcomeWeight = (int *)(GHIDRA_INT(picker) + 4 + uVar4 * 8); *outcomeWeight = *outcomeWeight + 3; if (*outcomeWeight < 0) { *(undefined4 *)((char *)picker + 4 + uVar4 * 8) = 0; @@ -5258,10 +5258,10 @@ Entity * NpcHelper::horny_boys_spawn_bomb(Entity_NPC *npc, int slot) uVar4 = uVar4 + 1; } while (uVar4 < uVar5); } - uStack_3c = CONCAT44(8,(uint)uStack_3c); + uStack_3c = CONCAT44(8,GHIDRA_UINT(uStack_3c)); pEStack_34 = (EntityPtr *)0x3; if (outcomesEnd == outcomesCapacity) { - std::vector<8byte>::_Emplace_reallocate(outcomesEnd,(int)&uStack_3c + 4); + std::vector<8byte>::_Emplace_reallocate(outcomesEnd,GHIDRA_INT(&uStack_3c) + 4); } else { *outcomesEnd = 8; @@ -5270,11 +5270,11 @@ Entity * NpcHelper::horny_boys_spawn_bomb(Entity_NPC *npc, int slot) } LAB_004bcda7: uVar4 = 0; - uVar5 = (int)outcomesEnd - (int)picker >> 3; + uVar5 = GHIDRA_INT(outcomesEnd) - GHIDRA_INT(picker) >> 3; if (uVar5 != 0) { do { if (*(int *)((char *)picker + uVar4 * 8) == 0x10) { - outcomeWeight = (int *)((int)picker + 4 + uVar4 * 8); + outcomeWeight = (int *)(GHIDRA_INT(picker) + 4 + uVar4 * 8); *outcomeWeight = *outcomeWeight + 1; if (*outcomeWeight < 0) { *(undefined4 *)((char *)picker + 4 + uVar4 * 8) = 0; @@ -5284,10 +5284,10 @@ LAB_004bcda7: uVar4 = uVar4 + 1; } while (uVar4 < uVar5); } - uStack_3c = CONCAT44(0x10,(uint)uStack_3c); + uStack_3c = CONCAT44(0x10,GHIDRA_UINT(uStack_3c)); pEStack_34 = (EntityPtr *)0x1; if (outcomesEnd == outcomesCapacity) { - std::vector<8byte>::_Emplace_reallocate(outcomesEnd,(int)&uStack_3c + 4); + std::vector<8byte>::_Emplace_reallocate(outcomesEnd,GHIDRA_INT(&uStack_3c) + 4); } else { *outcomesEnd = 0x10; @@ -5318,28 +5318,28 @@ LAB_004bce05: *(int *)((char *)EVar3 + 0x188) = 0; *(int *)((char *)EVar3 + 0x184) = 0; if (*(EntityPtr *)((char *)EVar3 + 0x3bc) != (EntityPtr)0x0) { - pEStack_34 = (EntityPtr *)((int)EVar3 + 0x3bc); + pEStack_34 = (EntityPtr *)(GHIDRA_INT(EVar3) + 0x3bc); std::multiset::erase(&pEStack_34); } *(EntityPtr *)((char *)EVar3 + 0x3bc) = (EntityPtr)npc; if (npc != (Entity_NPC *)0x0) { - std::multiset::insert((EntityPtr *)((int)EVar3 + 0x3bc)); + std::multiset::insert((EntityPtr *)(GHIDRA_INT(EVar3) + 0x3bc)); } *(uint *)((char *)EVar3 + 0x168) = *(uint *)((char *)EVar3 + 0x168) | 0x20; *(undefined4 *)((char *)EVar3 + 0x16c) = *(undefined4 *)((char *)EVar3 + 0x16c); iVar1 = *(int *)EVar3; *(undefined4 *)((char *)EVar3 + 0x410) = 0x23; - *(undefined4 *)&(*(undefined1 *)((char *)(((Entity *)((int)EVar3 + 0x410))) + 0x4)) = 0x23; - ((Entity *)((int)EVar3 + 0x410))->_type = (int)bombTearFlags0._l; - ((Entity *)((int)EVar3 + 0x410))->_variant = bombTearFlags0._l._4_4_; - ((Entity *)((int)EVar3 + 0x410))->_subtype = (int)bombTearFlags0._h; - ((Entity *)((int)EVar3 + 0x410))->_spawnerType = bombTearFlags0._h._4_4_; - (((Entity *)((int)EVar3 + 0x410))->_sprite)._filename._buf[0xb] = '\x01'; + *(undefined4 *)&(*(undefined1 *)((char *)(((Entity *)(GHIDRA_INT(EVar3) + 0x410))) + 0x4)) = 0x23; + ((Entity *)(GHIDRA_INT(EVar3) + 0x410))->_type = GHIDRA_INT(bombTearFlags0._l); + ((Entity *)(GHIDRA_INT(EVar3) + 0x410))->_variant = (*(undefined4 *)((char *)&(bombTearFlags0._l) + 0x4)); + ((Entity *)(GHIDRA_INT(EVar3) + 0x410))->_subtype = GHIDRA_INT(bombTearFlags0._h); + ((Entity *)(GHIDRA_INT(EVar3) + 0x410))->_spawnerType = (*(undefined4 *)((char *)&(bombTearFlags0._h) + 0x4)); + (((Entity *)(GHIDRA_INT(EVar3) + 0x410))->_sprite)._filename._buf[0xb] = '\x01'; (**(code **)(iVar1 + 0xc))(); pEStack_34 = (EntityPtr *)(npc->_entityDeque)._offset; - uVar4 = (int)&(*(undefined1 *)((char *)(pEStack_34) + 0x0)) + slot; + uVar4 = GHIDRA_INT(&(*(undefined1 *)((char *)(pEStack_34) + 0x0))) + slot; uVar5 = uVar4 & 3; - iVar1 = *(int *)((int)(npc->_entityDeque)._map + + iVar1 = *(int *)(GHIDRA_INT((npc->_entityDeque)._map) + (uVar4 >> 2 & (npc->_entityDeque)._mapSize - 1) * 4); bombSlot = (EntityPtr *)(iVar1 + uVar5 * 4); if (*(int *)(iVar1 + uVar5 * 4) != 0) { @@ -5349,12 +5349,12 @@ LAB_004bce05: *bombSlot = EVar3; std::multiset::insert(bombSlot); if (picker != (WeightedOutcomePicker)0x0) { - uVar4 = (int)outcomesCapacity - (int)picker & 0xfffffff8; + uVar4 = GHIDRA_INT(outcomesCapacity) - GHIDRA_INT(picker) & 0xfffffff8; ptr = picker; if (0xfff < uVar4) { ptr = *(WeightedOutcomePicker *)((char *)picker + -4); uVar4 = uVar4 + 0x23; - if (0x1f < ((int)picker - (int)ptr) - 4U) { + if (0x1f < (GHIDRA_INT(picker) - GHIDRA_INT(ptr)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -5400,7 +5400,7 @@ void NpcHelper::horny_boys_render(Entity_NPC *npc, Vector *offset) if ((((layerFrame != (void *)0x0) && (*(char *)((char *)layerFrame + 0x2c) != '\0')) && (iVar1 - 3U < 3)) && (dequeIndex = ((npc->_entityDeque)._offset - 3) + iVar1, - iVar1 = *(int *)(*(int *)((int)(npc->_entityDeque)._map + + iVar1 = *(int *)(*(int *)(GHIDRA_INT((npc->_entityDeque)._map) + (dequeIndex >> 2 & (npc->_entityDeque)._mapSize - 1) * 4) + (dequeIndex & 3) * 4), iVar1 != 0)) { *(undefined4 *)(iVar1 + 0xdc) = *(undefined4 *)((char *)layerFrame + 0x10); @@ -5474,12 +5474,12 @@ void NpcHelper::minecart_break(Entity_NPC *minecart) float local_14; Manager *manager; - local_14 = (float)(__security_cookie ^ (uint)((&particleColor)[1]._tint + 1)); + local_14 = (float)(__security_cookie ^ GHIDRA_UINT(((&particleColor)[1]._tint + 1))); minecart->Remove(); manager = g_manager; local_44 = (EntityPtr *)0x1e1; seed_fart_sound_override((int *)&local_44); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_44,1.0,10,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_44),1.0,10,0,1.0,0.0); particleColor._tint[0] = 1.0; particleColor._tint[1] = 1.0; particleColor._tint[2] = 1.0; @@ -5502,7 +5502,7 @@ void NpcHelper::minecart_break(Entity_NPC *minecart) particleColor._offset[2] = 0.0; rngResult = Random(); local_44 = (EntityPtr *) - ((float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + ((float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 4.0 + 3.0); rngResult = Random(); Game::SpawnParticles @@ -5531,7 +5531,7 @@ void NpcHelper::min_min_willo_count(Entity_NPC *minMin, int *outWilloCount, int puStack_c = &LAB_00af1690; local_10 = ExceptionList; ExceptionList = &local_10; - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&willoList,0x328,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&willoList,0x328,-1,-1,0,0); uVar1 = 0; *outWilloCount = willoList._size; *outOwnedCount = 0; @@ -5541,22 +5541,22 @@ void NpcHelper::min_min_willo_count(Entity_NPC *minMin, int *outWilloCount, int *outOwnedCount = *outOwnedCount + 1; } uVar1 = uVar1 + 1; - } while (uVar1 < (uint)willoList._size); + } while (uVar1 < GHIDRA_UINT(willoList._size)); } - if (willoList._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(willoList) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (willoList._data != (void *)0x0) { uVar1 = *(uint *)((char *)willoList._data + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar1; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar1; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar1); - free((void *)((int)willoList._data + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar1)); + free((void *)(GHIDRA_INT(willoList._data) + -4)); } } ExceptionList = local_10; @@ -5595,7 +5595,7 @@ void NpcHelper::moms_heart_attack_pattern(Entity_NPC *npc, int pattern, int stat code *projectileCallback; uint stackCookie; - stackCookie = __security_cookie ^ (uint)auStack_f8; + stackCookie = __security_cookie ^ GHIDRA_UINT(auStack_f8); ((ProjectileParams *)(&projParams))->ProjectileParams::ProjectileParams(); projParams.HeightModifier = 5.0; projParams.Scale = 1.5; @@ -5614,10 +5614,10 @@ void NpcHelper::moms_heart_attack_pattern(Entity_NPC *npc, int pattern, int stat fVar3 = local_f4 * (1.0 / fVar3); } projParams.CircleAngle = atan2f(fVar5,fVar3); - uVar2 = (uint)projParams.BulletFlags; - iVar1 = (int)npc->_prevUpdateTime; - baseBulletFlags = (uint)projParams.BulletFlags | 0x80; - updateTime = (int)npc->_updateTime; + uVar2 = GHIDRA_UINT(projParams.BulletFlags); + iVar1 = GHIDRA_INT(npc->_prevUpdateTime); + baseBulletFlags = GHIDRA_UINT(projParams.BulletFlags) | 0x80; + updateTime = GHIDRA_INT(npc->_updateTime); firePos.x = (npc->_pos).x; firePos.y = (npc->_pos).y; switch(pattern) { @@ -5636,9 +5636,9 @@ void NpcHelper::moms_heart_attack_pattern(Entity_NPC *npc, int pattern, int stat } local_f4 = 3.0; fVar3 = (6.0 - fVar3 * 3.0) + 0.5; - projParams.BulletFlags._0_4_ = baseBulletFlags; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = baseBulletFlags; FUN_008370b0(); - if (stateFrame % (int)fVar3 != 0) { + if (stateFrame % GHIDRA_INT(fVar3) != 0) { return; } fVar5 = local_f0; @@ -5651,7 +5651,7 @@ void NpcHelper::moms_heart_attack_pattern(Entity_NPC *npc, int pattern, int stat return; } dVar4 = (double)((((float)stateFrame / 30.0) / 6.0) * 6.2831855); - projParams.BulletFlags._0_4_ = baseBulletFlags; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = baseBulletFlags; libm_sse2_cos_precise(); fVar3 = 1.12104e-44; local_ec.x = 3.0; @@ -5662,7 +5662,7 @@ void NpcHelper::moms_heart_attack_pattern(Entity_NPC *npc, int pattern, int stat if ((npc->_sprite)._animState._animData == (void *)0x0) { return; } - projParams.BulletFlags._0_4_ = baseBulletFlags; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = baseBulletFlags; isHeartbeat = ((AnimationState *)(&(npc->_sprite)._animState))->AnimationState::IsEventTriggered((byte *)"Heartbeat"); if (isHeartbeat == 0) { return; @@ -5676,7 +5676,7 @@ void NpcHelper::moms_heart_attack_pattern(Entity_NPC *npc, int pattern, int stat local_ec.x = 5.0; projParams.CircleAngle = (((float)stateFrame / 6.0) / 30.0) * 6.2831855; if (pattern == 3) { - projParams.BulletFlags._0_4_ = (uint)projParams.BulletFlags | 0x200000; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = GHIDRA_UINT(projParams.BulletFlags) | 0x200000; } break; case 4: @@ -5687,7 +5687,7 @@ void NpcHelper::moms_heart_attack_pattern(Entity_NPC *npc, int pattern, int stat return; } fVar3 = 4.2039e-45; - projParams.BulletFlags._0_4_ = (uint)projParams.BulletFlags | 0x200080; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = GHIDRA_UINT(projParams.BulletFlags) | 0x200080; local_ec.x = 3.0; projParams.CircleAngle = (((float)stateFrame / 6.0) / 30.0) * 6.2831855; break; @@ -5697,15 +5697,15 @@ void NpcHelper::moms_heart_attack_pattern(Entity_NPC *npc, int pattern, int stat } frameMod4 = stateFrame & 0x80000003; isOnBeat = frameMod4 == 0; - if ((int)frameMod4 < 0) { + if (GHIDRA_INT(frameMod4) < 0) { isOnBeat = (frameMod4 - 1 | 0xfffffffc) == 0xffffffff; } if (!isOnBeat) { return; } - projParams.BulletFlags._0_4_ = baseBulletFlags; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = baseBulletFlags; fVar5 = cos(((float)stateFrame * 0.9424779) / 30.0); - projParams.BulletFlags._0_4_ = uVar2 | 0x200080; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = uVar2 | 0x200080; fVar3 = 4.2039e-45; local_ec.x = 3.5; projParams.CircleAngle = (fVar5 * 6.2831855) / 3.0; @@ -5716,7 +5716,7 @@ void NpcHelper::moms_heart_attack_pattern(Entity_NPC *npc, int pattern, int stat } uVar2 = stateFrame & 0x80000003; isOnBeat = uVar2 == 0; - if ((int)uVar2 < 0) { + if (GHIDRA_INT(uVar2) < 0) { isOnBeat = (uVar2 - 1 | 0xfffffffc) == 0xffffffff; } if (!isOnBeat) { @@ -5738,7 +5738,7 @@ void NpcHelper::moms_heart_attack_pattern(Entity_NPC *npc, int pattern, int stat } uVar2 = stateFrame & 0x80000003; isOnBeat = uVar2 == 0; - if ((int)uVar2 < 0) { + if (GHIDRA_INT(uVar2) < 0) { isOnBeat = (uVar2 - 1 | 0xfffffffc) == 0xffffffff; } if (!isOnBeat) { @@ -5749,7 +5749,7 @@ void NpcHelper::moms_heart_attack_pattern(Entity_NPC *npc, int pattern, int stat projParams.CircleAngle = projParams.CircleAngle * -1.0; goto LAB_004d417d; case 8: - projParams.BulletFlags._0_4_ = baseBulletFlags; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = baseBulletFlags; isHeartbeat = ((Sprite *)((Sprite *)&npc->_sprite))->Sprite::IsEventTriggered("Heartbeat"); if (isHeartbeat == 0) { return; @@ -5773,7 +5773,7 @@ void NpcHelper::moms_heart_attack_pattern(Entity_NPC *npc, int pattern, int stat if (stateFrame != 2) { return; } - projParams.BulletFlags._0_4_ = baseBulletFlags; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = baseBulletFlags; uVar2 = Random(); local_f4 = (float)(uVar2 % 0x1e + 0xf); isPositiveRotation = Random(); @@ -5789,10 +5789,10 @@ void NpcHelper::moms_heart_attack_pattern(Entity_NPC *npc, int pattern, int stat laserOffset.x = 0.0; laserOffset.y = 0.0; laser = Entity_Laser::ShootAngle - (1,&local_ec,(float)(int)local_f0 * local_e0 - 135.0,0x5a,&laserOffset, + (1,&local_ec,(float)GHIDRA_INT(local_f0) * local_e0 - 135.0,0x5a,&laserOffset, (Entity *)npc,0); laser->_isActiveRotating = 1; - laser->_rotationDelay = (int)local_f4; + laser->_rotationDelay = GHIDRA_INT(local_f4); if (isPositiveRotation == 0) { local_d0.x = -local_e4; rotationSpeed = -2.0; @@ -5804,10 +5804,10 @@ void NpcHelper::moms_heart_attack_pattern(Entity_NPC *npc, int pattern, int stat iVar1 = __ftoui3(); laser->_rotationDegrees = local_d0.x; laser->_rotationSpd = rotationSpeed; - laser->_timeout = iVar1 + (int)local_f4 + 1; + laser->_timeout = iVar1 + GHIDRA_INT(local_f4) + 1; laser->Update(); - local_f0 = (float)((int)local_f0 + 1); - } while ((int)local_f0 < 4); + local_f0 = (float)(GHIDRA_INT(local_f0) + 1); + } while (GHIDRA_INT(local_f0) < 4); return; case 10: framesLeft = 0xb4 - stateFrame; @@ -5824,9 +5824,9 @@ void NpcHelper::moms_heart_attack_pattern(Entity_NPC *npc, int pattern, int stat } local_f4 = 3.0; fVar3 = fVar3 * 0.0 + 3.0 + 0.5; - projParams.BulletFlags._0_4_ = baseBulletFlags; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = baseBulletFlags; FUN_008370b0(); - if (stateFrame % (int)fVar3 != 0) { + if (stateFrame % GHIDRA_INT(fVar3) != 0) { return; } fVar5 = local_e0; @@ -5841,7 +5841,7 @@ LAB_004d358e: } uVar2 = stateFrame & 0x8000000f; isOnBeat = uVar2 == 0; - if ((int)uVar2 < 0) { + if (GHIDRA_INT(uVar2) < 0) { isOnBeat = (uVar2 - 1 | 0xfffffff0) == 0xffffffff; } if (!isOnBeat) { @@ -5851,14 +5851,14 @@ LAB_004d358e: projParams.CircleAngle = (float)stateFrame * 0.62831855 * 0.0625; uVar2 = stateFrame & 0x8000001f; isOnBeat = uVar2 == 0; - if ((int)uVar2 < 0) { + if (GHIDRA_INT(uVar2) < 0) { isOnBeat = (uVar2 - 1 | 0xffffffe0) == 0xffffffff; } - projParams.BulletFlags._0_4_ = 0x40000; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = 0x40000; if (!isOnBeat) { - projParams.BulletFlags._0_4_ = 0x80000; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = 0x80000; } - projParams.BulletFlags._0_4_ = baseBulletFlags | (uint)projParams.BulletFlags; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = baseBulletFlags | GHIDRA_UINT(projParams.BulletFlags); local_ec.x = 5.0; break; case 0xc: @@ -5866,7 +5866,7 @@ LAB_004d358e: if ((npc->_sprite)._animState._animData == (void *)0x0) { return; } - projParams.BulletFlags._0_4_ = baseBulletFlags; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = baseBulletFlags; isHeartbeat = ((AnimationState *)(&(npc->_sprite)._animState))->AnimationState::IsEventTriggered((byte *)"Heartbeat"); if (isHeartbeat == 0) { return; @@ -5875,7 +5875,7 @@ LAB_004d358e: projParams.FallingAccelModifier = -0.08; projParams.CircleAngle = (((float)stateFrame / 6.0) / 30.0) * 6.2831855; if ((pattern == 0xd) && (npc->_aiCounter != 3)) { - projParams.BulletFlags._0_4_ = (uint)projParams.BulletFlags | 0x200000; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = GHIDRA_UINT(projParams.BulletFlags) | 0x200000; } local_f0 = 4.2039e-45; if (npc->_aiCounter == 3) { @@ -5886,7 +5886,7 @@ LAB_004d358e: local_ec.x = 0.5; } local_ec.x = local_ec.x * 6.0; - local_ec.y = (float)(int)local_f0; + local_ec.y = (float)GHIDRA_INT(local_f0); Entity_NPC::FireProjectiles(npc,&firePos,&local_ec,9,&projParams); projParams.Scale = 1.0; fVar3 = local_f0; @@ -5895,7 +5895,7 @@ LAB_004d358e: projParams.CircleAngle = (((float)-stateFrame / local_f4) / 30.0) * 6.2831855; } else { - projParams.CircleAngle = 3.1415927 / (float)(int)local_f0 + projParams.CircleAngle; + projParams.CircleAngle = 3.1415927 / (float)GHIDRA_INT(local_f0) + projParams.CircleAngle; } break; case 0xe: @@ -5904,13 +5904,13 @@ LAB_004d358e: } uVar2 = stateFrame & 0x80000003; isOnBeat = uVar2 == 0; - if ((int)uVar2 < 0) { + if (GHIDRA_INT(uVar2) < 0) { isOnBeat = (uVar2 - 1 | 0xfffffffc) == 0xffffffff; } if (!isOnBeat) { return; } - projParams.BulletFlags._0_4_ = (uint)projParams.BulletFlags | 0x280080; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = GHIDRA_UINT(projParams.BulletFlags) | 0x280080; projectileCallback = FUN_004d4210; fVar3 = (float)stateFrame / 180.0 + (float)stateFrame / 180.0; projParams.CircleAngle = ((fVar3 + fVar3) * 3.1415927) / 3.0; @@ -5923,7 +5923,7 @@ LAB_004d358e: } uVar2 = stateFrame & 0x80000007; isOnBeat = uVar2 == 0; - if ((int)uVar2 < 0) { + if (GHIDRA_INT(uVar2) < 0) { isOnBeat = (uVar2 - 1 | 0xfffffff8) == 0xffffffff; } if (!isOnBeat) { @@ -5934,7 +5934,7 @@ LAB_004d358e: projectileCallback = FUN_004d43b0; local_ec.x = 6.0; local_ec.y = 8.0; - projParams.BulletFlags._0_4_ = baseBulletFlags; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = baseBulletFlags; Entity_NPC::FireProjectiles(npc,&firePos,&local_ec,9,&projParams); projParams.CircleAngle = projParams.CircleAngle - 0.13962634; projParams.WiggleFrameOffset = 0x14; @@ -5948,7 +5948,7 @@ LAB_004d358e: if (stateFrame != (stateFrame / 0x1e) * 0x1e) { return; } - projParams.BulletFlags._0_4_ = (uint)projParams.BulletFlags | 0x2080; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = GHIDRA_UINT(projParams.BulletFlags) | 0x2080; projParams.Scale = 1.0; projParams.FallingAccelModifier = -0.085; projectileCallback = FUN_004d4480; @@ -5963,7 +5963,7 @@ LAB_004d358e: local_ec.x = 3.0; local_ec.y = 4.0; Entity_NPC::FireProjectiles(npc,&firePos,&local_ec,9,&projParams); - projParams.BulletFlags._0_4_ = (uint)projParams.BulletFlags & 0xffffdfff; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = GHIDRA_UINT(projParams.BulletFlags) & 0xffffdfff; projParams.CircleAngle = 0.0; projParams.Scale = 1.5; projectileCallback = (code *)0x0; @@ -5976,13 +5976,13 @@ LAB_004d358e: } uVar2 = stateFrame & 0x80000007; isOnBeat = uVar2 == 0; - if ((int)uVar2 < 0) { + if (GHIDRA_INT(uVar2) < 0) { isOnBeat = (uVar2 - 1 | 0xfffffff8) == 0xffffffff; } if (!isOnBeat) { return; } - projParams.BulletFlags._0_4_ = (uint)projParams.BulletFlags | 0x2080; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = GHIDRA_UINT(projParams.BulletFlags) | 0x2080; projParams.CircleAngle = 0.0; projectileCallback = FUN_004d42f0; fVar3 = 1.12104e-44; @@ -5993,13 +5993,13 @@ LAB_004d358e: return; } if (stateFrame == 2) { - projParams.BulletFlags._0_4_ = baseBulletFlags; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = baseBulletFlags; uVar2 = Random(); local_f0 = (float)(uVar2 % 0x1e + 0xf); uVar2 = Random(); local_e0 = (float)(uVar2 & 1); iVar1 = 0; - local_d4 = (float)((int)local_f0 + -0x39515eff); + local_d4 = (float)(GHIDRA_INT(local_f0) + -0x39515eff); do { local_d0.x = (npc->_pos).x + 0.0; local_d0.y = (npc->_pos).y - 30.0; @@ -6009,7 +6009,7 @@ LAB_004d358e: (1,&local_d0,(float)iVar1 * 180.0 + 90.0,0x78,&laserOffset,(Entity *)npc,0 ); laser->_isActiveRotating = 1; - laser->_rotationDelay = (int)local_f0; + laser->_rotationDelay = GHIDRA_INT(local_f0); if (local_e0 == 0.0) { fVar3 = -0.3; fVar5 = -1e+09; @@ -6020,7 +6020,7 @@ LAB_004d358e: } laser->_rotationDegrees = fVar5; laser->_rotationSpd = fVar3; - laser->_timeout = (int)local_d4; + laser->_timeout = GHIDRA_INT(local_d4); laser->Update(); iVar1 = iVar1 + 1; } while (iVar1 < 2); @@ -6032,12 +6032,12 @@ LAB_004d358e: local_ec.x = 8.0; fVar3 = 2.8026e-45; LAB_004d417d: - projParams.BulletFlags._0_4_ = baseBulletFlags; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = baseBulletFlags; break; default: goto switchD_004d34fb_default; } - local_ec.y = (float)(int)fVar3; + local_ec.y = (float)GHIDRA_INT(fVar3); Entity_NPC::FireProjectiles(npc,&firePos,&local_ec,9,&projParams); switchD_004d34fb_default: return; @@ -6057,7 +6057,7 @@ void NpcHelper::moms_heart_pick_attack(Entity_NPC *npc) ColorMod splatColor; float local_8; - local_8 = (float)(__security_cookie ^ (uint)((&splatColor)[1]._tint + 1)); + local_8 = (float)(__security_cookie ^ GHIDRA_UINT(((&splatColor)[1]._tint + 1))); iVar1 = 0; maxAttack = 7; local_38 = (float)npc->_subtype; @@ -6089,8 +6089,8 @@ void NpcHelper::moms_heart_pick_attack(Entity_NPC *npc) attackRoll = Random(); attackRoll = attackRoll % attackRange; LAB_004d4664: - (npc->_v1).y = (float)((double)(int)attackRoll + - __uint_to_double_fixup[-((int)attackRoll >> 0x1f)]) + (float)iVar1; + (npc->_v1).y = (float)((double)GHIDRA_INT(attackRoll) + + __uint_to_double_fixup[-(GHIDRA_INT(attackRoll) >> 0x1f)]) + (float)iVar1; npc->_stateFrame = 0; if (npc->_health / npc->_maxHitPoints <= 0.2) { iVar1 = 9; @@ -6166,11 +6166,11 @@ Entity_NPC * NpcHelper::gaper_l2_spawn_maggot(Vector *origin, float yOffset, Vec pvVar1 = g_game->_room; seed = Random(); maggot = (Entity_NPC *)((Game *)(g_game))->Game::Spawn(0x355,0,origin,&g_vectorZero,(Entity *)0x0,0,seed); - *(uint *)&maggot->_flags = (uint)maggot->_flags & 0xfffffffb; - flagsHigh = *(undefined4 *)((int)&maggot->_flags + 4); + *(uint *)&maggot->_flags = GHIDRA_UINT(maggot->_flags) & 0xfffffffb; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&maggot->_flags) + 4); flags = maggot->_flags; (maggot->_v1).x = fallingSpeed; - *(undefined4 *)((int)&maggot->_flags + 4) = flagsHigh; + *(undefined4 *)(GHIDRA_INT(&maggot->_flags) + 4) = flagsHigh; fVar3 = sqrtf(velocity->x * velocity->x + velocity->y * velocity->y); (maggot->_v1).y = fVar3; fVar3 = velocity->x; @@ -6181,8 +6181,8 @@ Entity_NPC * NpcHelper::gaper_l2_spawn_maggot(Vector *origin, float yOffset, Vec (maggot->_velocity).x = fVar3; maggot->_state = 0x10; maggot->_i1 = 2; - *(uint *)&maggot->_flags = (uint)flags | 0x4000000; - *(undefined4 *)((int)&maggot->_flags + 4) = flagsHigh; + *(uint *)&maggot->_flags = GHIDRA_UINT(flags) | 0x4000000; + *(undefined4 *)(GHIDRA_INT(&maggot->_flags) + 4) = flagsHigh; if (*(int *)((char *)pvVar1 + 8) == 0x10) { (maggot->_pos).y = yOffset + (maggot->_pos).y; (maggot->_velocity).y = fallingSpeed + (maggot->_velocity).y; @@ -6221,7 +6221,7 @@ Vector * NpcHelper::adult_leech_heading(Vector *outHeading, Entity *target, Vect float cosAngle; rngResult = Random(); - fVar1 = ((float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + fVar1 = ((float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 - 0.5) * 90.0 * 0.017453292; cosAngle = cos(fVar1); outHeading->x = cosAngle; @@ -6313,8 +6313,8 @@ void NpcHelper::twitchy_jump_target(Vector *outTarget, Entity_NPC *npc) outTarget->x = fVar1; outTarget->y = fVar2; } - gridRow = (int)((fVar2 - 120.0) / 40.0 + 0.5); - gridIndex = (int)((fVar1 - 40.0) / 40.0 + 0.5); + gridRow = GHIDRA_INT(((fVar2 - 120.0) / 40.0 + 0.5)); + gridIndex = GHIDRA_INT(((fVar1 - 40.0) / 40.0 + 0.5)); if ((((gridIndex < 0) || (room->_gridWidth <= gridIndex)) || (gridRow < 0)) || (room->_gridHeight <= gridRow)) { gridIndex = -1; @@ -6323,7 +6323,7 @@ void NpcHelper::twitchy_jump_target(Vector *outTarget, Entity_NPC *npc) gridIndex = room->_gridWidth * gridRow + gridIndex; } gridCollision = ((Room *)(room))->Room::GetGridCollision(gridIndex); - if (0 < (int)gridCollision) { + if (0 < GHIDRA_INT(gridCollision)) { resultPos = ((Room *)(room))->Room::FindFreeTilePosition(&scratchVec,outTarget,64.0); outTarget->x = resultPos->x; outTarget->y = resultPos->y; @@ -6351,20 +6351,20 @@ void NpcHelper::gutted_fatty_burst_projectiles(Entity *timer) originY = (timer->_pos).y; do { rngResult = Random(); - originY = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + originY = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14; originY = originY + originY; dirX = cos(originY); originY = sin(originY); rngResult = Random(); rngFraction = Random(); - randomScale = (float)((double)(int)rngFraction + - __uint_to_double_fixup[-((int)rngFraction >> 0x1f)]) * 2.3283064e-10; + randomScale = (float)((double)GHIDRA_INT(rngFraction) + + __uint_to_double_fixup[-(GHIDRA_INT(rngFraction) >> 0x1f)]) * 2.3283064e-10; local_18.y = randomScale * originY * 2.8; local_18.x = randomScale * dirX * 2.8; rngFraction = Random(); - randomScale = (float)((double)(int)rngFraction + - __uint_to_double_fixup[-((int)rngFraction >> 0x1f)]) * 2.3283064e-10; + randomScale = (float)((double)GHIDRA_INT(rngFraction) + + __uint_to_double_fixup[-(GHIDRA_INT(rngFraction) >> 0x1f)]) * 2.3283064e-10; local_10.x = dirX * 5.0 * randomScale + originX; local_10.y = originY * 5.0 * randomScale + originY; pEVar1 = (Entity_Projectile *) @@ -6373,15 +6373,15 @@ void NpcHelper::gutted_fatty_burst_projectiles(Entity *timer) rngResult = Random(); pEVar1->_fallingAccel = 2.0; pEVar1->_scale = - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 1.4; rngResult = Random(); pEVar1->_fallingSpeed = - -15.0 - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) + -15.0 - (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 60.0; rngResult = Random(); pEVar1->_height = - -23.0 - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) + -23.0 - (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 15.0; Entity_Projectile::apply_spawn_flags (pEVar1,*(int *)&(*(undefined1 *)((char *)&(timer[1]) + 0x40)), @@ -6392,20 +6392,20 @@ void NpcHelper::gutted_fatty_burst_projectiles(Entity *timer) projectilesLeft = 2; do { rngResult = Random(); - originY = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + originY = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14; originY = originY + originY; dirX = cos(originY); originY = sin(originY); rngResult = Random(); rngFraction = Random(); - randomScale = (float)((double)(int)rngFraction + - __uint_to_double_fixup[-((int)rngFraction >> 0x1f)]) * 2.3283064e-10; + randomScale = (float)((double)GHIDRA_INT(rngFraction) + + __uint_to_double_fixup[-(GHIDRA_INT(rngFraction) >> 0x1f)]) * 2.3283064e-10; local_10.y = randomScale * originY * 2.8; local_10.x = randomScale * dirX * 2.8; rngFraction = Random(); - randomScale = (float)((double)(int)rngFraction + - __uint_to_double_fixup[-((int)rngFraction >> 0x1f)]) * 2.3283064e-10; + randomScale = (float)((double)GHIDRA_INT(rngFraction) + + __uint_to_double_fixup[-(GHIDRA_INT(rngFraction) >> 0x1f)]) * 2.3283064e-10; local_18.x = dirX * 5.0 * randomScale + originX; local_18.y = originY * 5.0 * randomScale + originY; pEVar1 = (Entity_Projectile *) @@ -6414,15 +6414,15 @@ void NpcHelper::gutted_fatty_burst_projectiles(Entity *timer) rngResult = Random(); pEVar1->_fallingAccel = 2.0; pEVar1->_scale = - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 1.4; rngResult = Random(); pEVar1->_fallingSpeed = - -15.0 - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) + -15.0 - (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 60.0; rngResult = Random(); pEVar1->_height = - -23.0 - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) + -23.0 - (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 1000.0; Entity_Projectile::apply_spawn_flags (pEVar1,*(int *)&(*(undefined1 *)((char *)&(timer[1]) + 0x40)), @@ -6442,8 +6442,8 @@ byte NpcHelper::candler_is_free_cell(Vector *position) Room *room; room = g_game->_room; - gridY = (int)((position->x - 40.0) / 40.0 + 0.5); - gridY = (int)((position->y - 120.0) / 40.0 + 0.5); + gridY = GHIDRA_INT(((position->x - 40.0) / 40.0 + 0.5)); + gridY = GHIDRA_INT(((position->y - 120.0) / 40.0 + 0.5)); if ((((gridY < 0) || (room->_gridWidth <= gridY)) || (gridY < 0)) || (room->_gridHeight <= gridY)) { gridY = -1; @@ -6452,12 +6452,12 @@ byte NpcHelper::candler_is_free_cell(Vector *position) gridY = room->_gridWidth * gridY + gridY; } uVar1 = ((Room *)(room))->Room::GetGridCollision(gridY); - if (((((uVar1 == 0) && (gridY = (int)((position->x - 40.0) / 40.0 + 0.5), -1 < gridY)) && + if (((((uVar1 == 0) && (gridY = GHIDRA_INT(((position->x - 40.0) / 40.0 + 0.5)), -1 < gridY)) && ((gridY < room->_gridWidth && - ((gridY = (int)((position->y - 120.0) / 40.0 + 0.5), -1 < gridY && + ((gridY = GHIDRA_INT(((position->y - 120.0) / 40.0 + 0.5)), -1 < gridY && (gridY < room->_gridHeight)))))) && (gridY = room->_gridWidth * gridY + gridY, -1 < gridY)) && (((0x1bf < gridY || (room->_gridEntities[gridY] == (void *)0x0)) || - (*(int *)((int)room->_gridEntities[gridY] + 4) != 0x17)))) { + (*(int *)(GHIDRA_INT(room->_gridEntities[gridY]) + 4) != 0x17)))) { return 1; } return 0; @@ -6547,7 +6547,7 @@ void NpcHelper::ball_and_chain_render_chain(float *param_1) uint securityCookie; ANM2 *sprite; - securityCookie = __security_cookie ^ (uint)auStack_b4; + securityCookie = __security_cookie ^ GHIDRA_UINT(auStack_b4); if ((*(float *)(in_ECX + 0x334) != g_vectorZero.x) || (*(float *)(in_ECX + 0x338) != g_vectorZero.y)) { local_8c = *(float *)(in_ECX + 0x33c) - *(float *)(in_ECX + 0x334); @@ -6599,7 +6599,7 @@ void NpcHelper::ball_and_chain_render_chain(float *param_1) pLVar1 = ((ANM2 *)(sprite))->ANM2::GetLayer((byte *)0x1); pLVar1->_visible = 1; DAT_00c78ef4 = 1; - DAT_00c78ef8._0_2_ = 1; + (*(undefined2 *)((char *)&(DAT_00c78ef8) + 0x0)) = 1; g_beamRendererPointsEnd = g_beamRendererPoints; DAT_00c78ef0 = sprite; ((Color *)(&beamColor))->Color::Color(); @@ -6647,11 +6647,11 @@ void NpcHelper::bouncer_death_gib(Entity_Effect *timer) Vector gibVelocity; rngResult = Random(); - local_20.x = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + local_20.x = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_20.x = local_20.x + local_20.x; rngResult = Random(); - local_18 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + local_18 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 12.0; velocityX = cos(local_20.x); velocityX = velocityX * local_18; @@ -6739,16 +6739,16 @@ void NpcHelper::migraine_timer_spawn(Entity *timer) EntityPtr *spawnerRef; ColorMod *spriteColor; - stackCookie = __security_cookie ^ (uint)&local_124; + stackCookie = __security_cookie ^ GHIDRA_UINT(&local_124); spawnPos.x = (timer->_pos).x; spawnPos.y = (timer->_pos).y; owner = timer; uVar6 = Random(); - fVar15 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar15 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_120 = (Entity *)(fVar15 + fVar15); uVar6 = Random(); - local_110 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + local_110 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 4.0 + 6.0; spawnVelX = cos((float)local_120); spawnVelX = spawnVelX * local_110; @@ -6796,18 +6796,18 @@ LAB_0052926a: iStack_28 = 5; iStack_24 = 9; uStack_20 = 7; - auStack_30._4_4_ = uVar7; + (*(undefined4 *)((char *)&(auStack_30) + 0x4)) = uVar7; local_114 = (float)lua_callback_run_get_card((RNG *)(auStack_30 + 4),iVar9,1,1,0); } } else { if (uVar6 == 0x46) { - local_d4.x = (float)((uint)local_114 >> 0xb); + local_d4.x = (float)(GHIDRA_UINT(local_114) >> 0xb); do { local_124 = local_114; if (local_114 != 0.0) { fnPtr = *(code **)(*(int *)pEVar10 + 0x28); - ((ItemPool *)(&g_game->_itemPool))->ItemPool::GetPillEffect((uint)local_114,(Entity_Player *)0x0); + ((ItemPool *)(&g_game->_itemPool))->ItemPool::GetPillEffect(GHIDRA_UINT(local_114),(Entity_Player *)0x0); cVar5 = (*fnPtr)(); if (cVar5 == '\0') goto LAB_00529272; pEVar10 = local_120; @@ -6822,7 +6822,7 @@ LAB_0052926a: uVar7 = uVar7 << ((byte)uStack_64 & 0x1f) ^ uVar7; uVar7 = uVar7 >> (SUB41(local_110,0) & 0x1f) ^ uVar7; uVar6 = ItemPool::GetPill(uVar7); - local_114 = (float)(uVar6 | ((uint)local_d4.x & 1) << 0xb); + local_114 = (float)(uVar6 | (GHIDRA_UINT(local_d4.x) & 1) << 0xb); } while( true ); } if (uVar6 != 100) goto LAB_0052926a; @@ -6834,7 +6834,7 @@ LAB_005290ba: else { local_d4.x = local_114; std::set::find_node(); - if (((*(char *)(foundNode + 0xd) == '\0') && (*(int *)(foundNode + 0x10) <= (int)fVar15)) + if (((*(char *)(foundNode + 0xd) == '\0') && (*(int *)(foundNode + 0x10) <= GHIDRA_INT(fVar15))) && (foundNode != pEVar10->_index)) goto LAB_005290ba; bVar14 = true; } @@ -6853,23 +6853,23 @@ LAB_005290ba: } } LAB_00529272: - local_120 = ((EntityFactory *)(local_11c->_entityFactory))->EntityFactory::Create((uint)local_f4,0); + local_120 = ((EntityFactory *)(local_11c->_entityFactory))->EntityFactory::Create(GHIDRA_UINT(local_f4),0); if (local_120 == (Entity *)0x0) goto LAB_00529568; timeNs = GetTimeNs(); pEVar10 = local_120; - local_108 = (uint)(timeNs >> 0x20); + local_108 = GHIDRA_UINT((timeNs >> 0x20)); lVar1 = (timeNs & 0xffffffff) * 0x431bde82; - local_104 = (uint)((ulonglong)lVar1 >> 0x20); + local_104 = GHIDRA_UINT(((ulonglong)lVar1 >> 0x20)); lVar2 = (ulonglong)local_108 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); local_d4.y = (float)(lVar2 + lVar1); lVar1 = (ulonglong)local_108 * 0x431bde82 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar2 >> 0x20), - local_104 + CARRY4((uint)lVar1,(uint)lVar2)), - (int)((ulonglong)(lVar2 + lVar1) >> 0x20)); - local_e0 = (uint)((ulonglong)lVar1 >> 0x20); + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)), + local_104 + CARRY4(GHIDRA_UINT(lVar1),GHIDRA_UINT(lVar2))), + GHIDRA_INT(((ulonglong)(lVar2 + lVar1) >> 0x20))); + local_e0 = GHIDRA_UINT(((ulonglong)lVar1 >> 0x20)); pEVar17 = &local_120->_spawnerEntity; - local_10c = (float)((uint)lVar1 >> 0x12 | local_e0 * 0x4000); + local_10c = (float)(GHIDRA_UINT(lVar1) >> 0x12 | local_e0 * 0x4000); local_e0 = local_e0 >> 0x12; local_120->_spawnerType = 0; local_120->_spawnerVariant = 0; @@ -6889,7 +6889,7 @@ LAB_00529272: iVar9 = *(int *)((char *)pvVar11 + 0x1214); *(int *)((char *)pvVar11 + 0x1214) = iVar9 + 1; pEVar10->_index = iVar9; - ((EntityList *)((EntityList *)((int)pvVar11 + 0x1218)))->EntityList::AddEntity(pEVar10); + ((EntityList *)((EntityList *)(GHIDRA_INT(pvVar11) + 0x1218)))->EntityList::AddEntity(pEVar10); isErased = Game::ShouldEraseEnemy(pEVar10); if (isErased != 0) { Entity::RemoveWithPoof(pEVar10,unusedArg); @@ -6910,50 +6910,50 @@ LAB_00529272: } uVar6 = 0; playerManager = &g_game->_playerManager; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar11 = (playerManager->_playerList)._end; - if ((int)pvVar11 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar11) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar11 = (playerManager->_playerList)._end; } piVar8 = (playerManager->_playerList)._begin; - if (uVar6 < (uint)((int)pvVar11 - (int)piVar8 >> 2)) { + if (uVar6 < GHIDRA_UINT((GHIDRA_INT(pvVar11) - GHIDRA_INT(piVar8) >> 2))) { piVar8 = piVar8 + uVar6; } trigger_set_dispatch((void *)(*piVar8 + 0x1fc8),6,pEVar10,&spawnPos,spawnVel); uVar6 = uVar6 + 1; playerManager = &g_game->_playerManager; - } while (uVar6 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar6 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } LAB_005294e4: timeNs = GetTimeNs(); - uVar6 = (uint)(timeNs >> 0x20); + uVar6 = GHIDRA_UINT((timeNs >> 0x20)); lVar1 = (timeNs & 0xffffffff) * 0x431bde82; - local_104 = (uint)((ulonglong)lVar1 >> 0x20); + local_104 = GHIDRA_UINT(((ulonglong)lVar1 >> 0x20)); lVar2 = (ulonglong)uVar6 * 0x431bde82; - local_108 = (uint)lVar2; + local_108 = GHIDRA_UINT(lVar2); lVar3 = (ulonglong)uVar6 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); local_d4.y = (float)(lVar3 + lVar1); lVar2 = lVar2 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar3 >> 0x20), - local_104 + CARRY4((uint)lVar1,(uint)lVar3)), - (int)((ulonglong)(lVar3 + lVar1) >> 0x20)); - uVar7 = (uint)((ulonglong)lVar2 >> 0x20); - fVar15 = (float)((uint)lVar2 >> 0x12 | uVar7 * 0x4000); - uVar6 = (int)fVar15 - (int)local_10c; - bVar14 = CARRY4((uint)g_entitySpawnTimeMs,uVar6); - g_entitySpawnTimeMs._0_4_ = (uint)g_entitySpawnTimeMs + uVar6; - g_entitySpawnTimeMs._4_4_ = - g_entitySpawnTimeMs._4_4_ + - (((uVar7 >> 0x12) - local_e0) - (uint)((uint)fVar15 < (uint)local_10c)) + (uint)bVar14; + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)), + local_104 + CARRY4(GHIDRA_UINT(lVar1),GHIDRA_UINT(lVar3))), + GHIDRA_INT(((ulonglong)(lVar3 + lVar1) >> 0x20))); + uVar7 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); + fVar15 = (float)(GHIDRA_UINT(lVar2) >> 0x12 | uVar7 * 0x4000); + uVar6 = GHIDRA_INT(fVar15) - GHIDRA_INT(local_10c); + bVar14 = CARRY4(GHIDRA_UINT(g_entitySpawnTimeMs),uVar6); + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x0)) = GHIDRA_UINT(g_entitySpawnTimeMs) + uVar6; + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) = + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) + + (((uVar7 >> 0x12) - local_e0) - GHIDRA_UINT((GHIDRA_UINT(fVar15) < GHIDRA_UINT(local_10c)))) + GHIDRA_UINT(bVar14); LAB_00529568: bloodVel[0].x = spawnVelX * 0.4; bloodVel[0].y = (float)local_118 * 0.4; - iVar9 = (int)owner[1]._pendingDamageFlags * -7 + 0x42; + iVar9 = GHIDRA_INT(owner[1]._pendingDamageFlags) * -7 + 0x42; *(int *)(local_120 + 1) = iVar9; *(int *)&(*(undefined1 *)((char *)&(local_120[1]) + 0x4)) = iVar9; uVar6 = Random(); @@ -6969,7 +6969,7 @@ LAB_00529568: return; } uVar6 = Random(); - fVar15 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar15 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_f4 = (Game *)(fVar15 + fVar15); fVar15 = cos((float)local_f4); @@ -6977,11 +6977,11 @@ LAB_00529568: fVar15 = sin((float)local_f4); local_d4.y = fVar15 * 12.0 * 0.5 + fStack_fc; uVar6 = Random(); - fVar15 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar15 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 3.14; fVar15 = fVar15 + fVar15; uVar6 = Random(); - local_114 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + local_114 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 4.0 + 2.0; fVar16 = cos(fVar15); pvStack_c4 = (void *)(fVar16 * local_114); @@ -7006,7 +7006,7 @@ LAB_00529568: local_114 = 9.80909e-45; uStack_64 = 7; if (local_120 == (Entity *)&DAT_00000005) { - if ((uint)fVar15 < 0x12d) { + if (GHIDRA_UINT(fVar15) < 0x12d) { if (fVar15 == 4.2039e-43) { while ((pEVar17 == (EntityPtr *)0x0 || (cVar5 = (**(code **)(*piVar8 + 0x24))(pEVar17), cVar5 != '\0'))) { @@ -7020,21 +7020,21 @@ LAB_00529568: uVar6 = uVar6 << ((byte)local_68 & 0x1f) ^ uVar6; uVar6 = uVar6 >> (SUB41(local_114,0) & 0x1f) ^ uVar6; iVar9 = ItemPool::GetCardEx(uVar6,0x19,10,10,1); - auStack_30._4_4_ = 5; + (*(undefined4 *)((char *)&(auStack_30) + 0x4)) = 5; iStack_28 = 9; iStack_24 = 7; - auStack_30._0_4_ = uVar6; + (*(undefined4 *)((char *)&(auStack_30) + 0x0)) = uVar6; pEVar17 = (EntityPtr *)lua_callback_run_get_card((RNG *)auStack_30,iVar9,1,1,0); } } else { if (fVar15 == 9.80909e-44) { - uVar7 = (uint)pEVar17 >> 0xb; + uVar7 = GHIDRA_UINT(pEVar17) >> 0xb; do { if (pEVar17 != (EntityPtr *)0x0) { fnPtr = *(code **)(*piVar8 + 0x28); iVar9 = ItemPool::GetPillEffect - (&g_game->_itemPool,(uint)pEVar17,(Entity_Player *)0x0); + (&g_game->_itemPool,GHIDRA_UINT(pEVar17),(Entity_Player *)0x0); cVar5 = (*fnPtr)(iVar9); if (cVar5 == '\0') goto LAB_00529a2e; } @@ -7060,7 +7060,7 @@ LAB_00529876: local_a4 = pEVar17; std::set::find_node(auStack_4c,&local_a4); if (((*(char *)(foundNode2 + 0xd) == '\0') && - (*(int *)(foundNode2 + 0x10) <= (int)pEVar17)) && (foundNode2 != piVar8[8])) + (*(int *)(foundNode2 + 0x10) <= GHIDRA_INT(pEVar17))) && (foundNode2 != piVar8[8])) goto LAB_00529876; bVar14 = true; } @@ -7079,22 +7079,22 @@ LAB_00529876: } } LAB_00529a2e: - pEVar10 = ((EntityFactory *)(local_f4->_entityFactory))->EntityFactory::Create((uint)local_120,0); + pEVar10 = ((EntityFactory *)(local_f4->_entityFactory))->EntityFactory::Create(GHIDRA_UINT(local_120),0); if (pEVar10 != (Entity *)0x0) { timeNs = GetTimeNs(); - uVar6 = (uint)(timeNs >> 0x20); + uVar6 = GHIDRA_UINT((timeNs >> 0x20)); lVar1 = (timeNs & 0xffffffff) * 0x431bde82; lVar2 = (ulonglong)uVar6 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); local_114 = (float)(lVar2 + lVar1); lVar1 = (ulonglong)uVar6 * 0x431bde82 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar2 >> 0x20), - (int)((ulonglong)lVar1 >> 0x20) + - (uint)CARRY4((uint)lVar1,(uint)lVar2)), - (int)((ulonglong)(lVar2 + lVar1) >> 0x20)); - uStack_cc = (uint)((ulonglong)lVar1 >> 0x20); + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)), + GHIDRA_INT(((ulonglong)lVar1 >> 0x20)) + + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar1),GHIDRA_UINT(lVar2)))), + GHIDRA_INT(((ulonglong)(lVar2 + lVar1) >> 0x20))); + uStack_cc = GHIDRA_UINT(((ulonglong)lVar1 >> 0x20)); spawnerRef = &pEVar10->_spawnerEntity; - uVar6 = (uint)lVar1 >> 0x12 | uStack_cc * 0x4000; + uVar6 = GHIDRA_UINT(lVar1) >> 0x12 | uStack_cc * 0x4000; uStack_cc = uStack_cc >> 0x12; pEVar10->_spawnerType = 0; pEVar10->_spawnerVariant = 0; @@ -7114,7 +7114,7 @@ LAB_00529a2e: iVar9 = *(int *)((char *)pvVar11 + 0x1214); *(int *)((char *)pvVar11 + 0x1214) = iVar9 + 1; pEVar10->_index = iVar9; - ((EntityList *)((EntityList *)((int)pvVar11 + 0x1218)))->EntityList::AddEntity(pEVar10); + ((EntityList *)((EntityList *)(GHIDRA_INT(pvVar11) + 0x1218)))->EntityList::AddEntity(pEVar10); isErased = Game::ShouldEraseEnemy(pEVar10); if (isErased != 0) { Entity::RemoveWithPoof(pEVar10,unusedArg_00); @@ -7136,28 +7136,28 @@ LAB_00529a2e: } uVar7 = 0; playerManager = &g_game->_playerManager; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar11 = (playerManager->_playerList)._end; - if ((int)pvVar11 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar11) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar11 = (playerManager->_playerList)._end; } piVar8 = (playerManager->_playerList)._begin; - if (uVar7 < (uint)((int)pvVar11 - (int)piVar8 >> 2)) { + if (uVar7 < GHIDRA_UINT((GHIDRA_INT(pvVar11) - GHIDRA_INT(piVar8) >> 2))) { piVar8 = piVar8 + uVar7; } trigger_set_dispatch((void *)(*piVar8 + 0x1fc8),6,pEVar10,&local_d4,&particleVel); uVar7 = uVar7 + 1; playerManager = &g_game->_playerManager; - } while (uVar7 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar7 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } LAB_00529ca4: timeNs = GetTimeNs(); - uVar7 = (uint)(timeNs >> 0x20); + uVar7 = GHIDRA_UINT((timeNs >> 0x20)); lVar1 = (timeNs & 0xffffffff) * 0x431bde82; pvStack_c4 = (void *)((ulonglong)lVar1 >> 0x20); lVar2 = (ulonglong)uVar7 * 0x431bde82; @@ -7165,17 +7165,17 @@ LAB_00529ca4: lVar3 = (ulonglong)uVar7 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20); local_f4 = (Game *)(lVar3 + lVar1); lVar2 = lVar2 + (ulonglong) - CONCAT14(CARRY4((uint)((ulonglong)lVar3 >> 0x20), - (int)pvStack_c4 + (uint)CARRY4((uint)lVar1,(uint)lVar3)), - (int)((ulonglong)(lVar3 + lVar1) >> 0x20)); - uVar13 = (uint)((ulonglong)lVar2 >> 0x20); - uVar7 = (uint)lVar2 >> 0x12 | uVar13 * 0x4000; + CONCAT14(CARRY4(GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)), + GHIDRA_INT(pvStack_c4) + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar1),GHIDRA_UINT(lVar3)))), + GHIDRA_INT(((ulonglong)(lVar3 + lVar1) >> 0x20))); + uVar13 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); + uVar7 = GHIDRA_UINT(lVar2) >> 0x12 | uVar13 * 0x4000; uVar12 = uVar7 - uVar6; - bVar14 = CARRY4((uint)g_entitySpawnTimeMs,uVar12); - g_entitySpawnTimeMs._0_4_ = (uint)g_entitySpawnTimeMs + uVar12; - g_entitySpawnTimeMs._4_4_ = - g_entitySpawnTimeMs._4_4_ + (((uVar13 >> 0x12) - uStack_cc) - (uint)(uVar7 < uVar6)) + - (uint)bVar14; + bVar14 = CARRY4(GHIDRA_UINT(g_entitySpawnTimeMs),uVar12); + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x0)) = GHIDRA_UINT(g_entitySpawnTimeMs) + uVar12; + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) = + (*(undefined4 *)((char *)&(g_entitySpawnTimeMs) + 0x4)) + (((uVar13 >> 0x12) - uStack_cc) - GHIDRA_UINT((uVar7 < uVar6))) + + GHIDRA_UINT(bVar14); } pEVar10->SetColor(&DAT_00c5c800,0xffffffff,0xff,0,1); spriteColor = &(pEVar10->_sprite)._color; @@ -7199,7 +7199,7 @@ LAB_00529ca4: (pEVar10->_splatColor)._offset[2] = (pEVar10->_sprite)._color._offset[2]; } pEVar10->Update(); - local_11c = (Game *)((int)local_11c + -1); + local_11c = (Game *)(GHIDRA_INT(local_11c) + -1); } while( true ); } @@ -7278,7 +7278,7 @@ void NpcHelper::leper_flesh_ai(Entity_NPC *npc) ProjectileParams projParams; float local_14; - local_14 = (float)(__security_cookie ^ (uint)&(&projParams)[1].CircleAngle); + local_14 = (float)(__security_cookie ^ GHIDRA_UINT(&(&projParams)[1].CircleAngle)); if (npc->_state != 0) { if (npc->_state == 4) { npc->_friction = npc->_friction * 0.95; @@ -7296,7 +7296,7 @@ void NpcHelper::leper_flesh_ai(Entity_NPC *npc) local_c8 = (byte *)pVVar3->y; } uVar4 = Random(); - local_cc = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + local_cc = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_cc = local_cc + local_cc; local_d4.y = cos(local_cc); @@ -7341,7 +7341,7 @@ LAB_005489d8: isLess = bVar2 < *expectedName; if (bVar2 != *expectedName) { LAB_005489b8: - uVar6 = -(uint)isLess | 1; + uVar6 = -GHIDRA_UINT(isLess) | 1; goto LAB_005489bd; } if (bVar2 == 0) break; @@ -7354,7 +7354,7 @@ LAB_005489b8: uVar6 = 0; LAB_005489bd: if ((uVar6 != 0) || - ((*(char *)((int)(npc->_sprite)._animState._animData + 0x34) != '\0' && + ((*(char *)(GHIDRA_INT((npc->_sprite)._animState._animData) + 0x34) != '\0' && ((npc->_sprite)._animState._isPlaying == 0)))) goto LAB_005489d8; } npc->_state = 4; @@ -7373,7 +7373,7 @@ LAB_00548a4b: if (bVar2 != 0) { uVar4 = Random(); Entity_NPC::MakeSplat - (npc,(float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + (npc,(float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 0.4 + 0.4); } bVar2 = ((Entity *)((Entity *)npc))->Entity::IsFrame(6,0); @@ -7387,11 +7387,11 @@ LAB_00548a4b: local_d4.y = (npc->_velocity).x; local_cc = (npc->_velocity).y; uVar6 = Random(); - fVar8 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar8 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_c8 = (byte *)(fVar8 + fVar8); uVar6 = Random(); - local_c4 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + local_c4 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10; fVar8 = cos((float)local_c8); local_d4.x = fVar8 * local_c4 * 3.0 + local_d4.y * local_f0; @@ -7400,12 +7400,12 @@ LAB_00548a4b: pEVar7 = ((Game *)(g_game))->Game::Spawn(1000,0x6f,&npc->_pos,&local_d4,(Entity *)0x0,0,uVar4); uVar4 = Random(); (pEVar7->_sprite)._playbackSpeed = - (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * 2.3283064e-10 + (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 0.6 + 0.5; local_cc = npc->_scale * g_vectorOne.y; local_d4.y = npc->_scale * g_vectorOne.x; uVar4 = Random(); - fVar8 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + fVar8 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 0.6 + 0.6; (pEVar7->_sprite)._scale.x = local_d4.y * 0.5 * fVar8; (pEVar7->_sprite)._scale.y = local_cc * 0.5 * fVar8; @@ -7454,7 +7454,7 @@ LAB_00548a4b: projParams.Color._tint[1] = 1.0; projParams.Color._tint[2] = 1.0; projParams.Color._tint[3] = 1.0; - projParams.Color._offset._0_8_ = ZEXT48((uint)local_f0); + (*(undefined8 *)((char *)&(projParams.Color._offset) + 0x0)) = ZEXT48(GHIDRA_UINT(local_f0)); projParams.Color._colorize[0] = 0.0; projParams.Color._colorize[1] = 0.0; projParams.Color._colorize[2] = 0.0; @@ -7494,7 +7494,7 @@ void NpcHelper::bulb_player_collision(Entity_NPC *npc, Entity *collider) damageSource._velocity.x = (npc->_velocity).x; damageSource._velocity.y = (npc->_velocity).y; damageSource._variant = 6; - local_3c.x = (float)(uint)((npc->_flags & 0x100) != 0); + local_3c.x = (float)GHIDRA_UINT(((npc->_flags & 0x100) != 0)); if ((npc->_flags & 0x20000000) == 0) { uVar2 = 0; } @@ -7507,7 +7507,7 @@ void NpcHelper::bulb_player_collision(Entity_NPC *npc, Entity *collider) else { uVar1 = 4; } - damageSource._flags = uVar1 | uVar2 | (uint)local_3c.x; + damageSource._flags = uVar1 | uVar2 | GHIDRA_UINT(local_3c.x); damageSource._entity = npc; collider->TakeDamage(0x3f800000,0,0,&damageSource,0x1e); } @@ -7552,58 +7552,58 @@ void NpcHelper::bulb_player_collision(Entity_NPC *npc, Entity *collider) do { fVar3 = collider[5]._sprite._championColor._colorize[uVar2 * 8 + 1]; if (game == (Game *)0x0) { - if (-1 < (int)fVar3) goto LAB_0054cfd6; + if (-1 < GHIDRA_INT(fVar3)) goto LAB_0054cfd6; LAB_0054d012: itemConfig = 0; } - else if ((int)fVar3 < 0) { - proceduralIdx = (float)~(uint)fVar3; - bVar4 = -1 < (int)fVar3; + else if (GHIDRA_INT(fVar3) < 0) { + proceduralIdx = (float)~GHIDRA_UINT(fVar3); + bVar4 = -1 < GHIDRA_INT(fVar3); fVar3 = proceduralIdx; if ((bVar4) || - ((int)(game->_proceduralItemManager)._proceduralItems._end - - (int)(game->_proceduralItemManager)._proceduralItems._begin >> 2 <= (int)proceduralIdx)) + (GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._end) - + GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._begin) >> 2 <= GHIDRA_INT(proceduralIdx))) goto LAB_0054d012; - itemConfig = **(int **)((int)(game->_proceduralItemManager)._proceduralItems._begin + - (int)proceduralIdx * 4); + itemConfig = **(int **)(GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._begin) + + GHIDRA_INT(proceduralIdx) * 4); } else { LAB_0054cfd6: - if ((int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2 <= (int)fVar3) goto LAB_0054d012; - itemConfig = *(int *)((int)(g_manager->_itemConfig)._collectibles._begin + (int)fVar3 * 4); + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2 <= GHIDRA_INT(fVar3)) goto LAB_0054d012; + itemConfig = *(int *)(GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) + GHIDRA_INT(fVar3) * 4); game = g_game; } if (uVar2 == 3) { local_3c.x = 0.0; } else if (((uVar2 == 2) && - (chargeChange._0_1_ = collider[5]._valid, chargeChange._1_1_ = collider[5]._visible, - chargeChange._2_1_ = collider[5]._exists, chargeChange._3_1_ = collider[5]._dead, + ((*(undefined1 *)((char *)&(chargeChange) + 0x0)) = collider[5]._valid, (*(undefined1 *)((char *)&(chargeChange) + 0x1)) = collider[5]._visible, + (*(undefined1 *)((char *)&(chargeChange) + 0x2)) = collider[5]._exists, (*(undefined1 *)((char *)&(chargeChange) + 0x3)) = collider[5]._dead, chargeChange == 0x244)) && (game->_challenge == 0x2c)) { local_3c.x = 0.0; } else { local_3c.x = (float)Entity_Player::GetCollectibleMaxCharge ((Entity_Player *)collider, - (int)collider[5]._sprite._championColor._colorize + GHIDRA_INT(collider[5]._sprite._championColor._colorize) [uVar2 * 8 + 1], - *(int *)((int)(&collider[5]._sprite._championColor + 1) + - uVar2 * 0x20 + 4),(int)fVar3); + *(int *)(GHIDRA_INT((&collider[5]._sprite._championColor + 1)) + + uVar2 * 0x20 + 4),GHIDRA_INT(fVar3)); game = g_game; } - if (((itemConfig != 0) && (0 < (int)local_3c.x)) && - ((uVar2 < 4 && (0 < (int)collider[5]._sprite._championColor._colorize[uVar2 * 8 + 3])))) { + if (((itemConfig != 0) && (0 < GHIDRA_INT(local_3c.x))) && + ((uVar2 < 4 && (0 < GHIDRA_INT(collider[5]._sprite._championColor._colorize[uVar2 * 8 + 3]))))) { chargeChange = ((Entity_Player *)((Entity_Player *)collider))->Entity_Player::GetActiveMaxCharge(uVar2); if (chargeChange == 1) { chargeChange = -1000; } - else if ((int)local_3c.x < 0xd) { + else if (GHIDRA_INT(local_3c.x) < 0xd) { chargeChange = -2; } else { - chargeChange = (int)((ulonglong)((longlong)(int)local_3c.x * 0x55555555) >> 0x20) - - (int)local_3c.x; + chargeChange = GHIDRA_INT(((ulonglong)((longlong)GHIDRA_INT(local_3c.x) * 0x55555555) >> 0x20)) - + GHIDRA_INT(local_3c.x); chargeChange = (chargeChange >> 1) - (chargeChange >> 0x1f); } Entity_Player::AddActiveCharge((Entity_Player *)collider,chargeChange,uVar2,0,0,0); @@ -7611,7 +7611,7 @@ LAB_0054cfd6: manager = g_manager; local_3c.x = 6.9084e-43; seed_fart_sound_override((int *)&local_3c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_3c.x,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_3c.x),1.0,2,0,1.0,0.0); uVar2 = Random(); local_3c.x = (collider->_pos).x; local_3c.y = (collider->_pos).y; @@ -7662,7 +7662,7 @@ void NpcHelper::needle_render(Entity_NPC *npc) int *trailPositions; uint trailStart; - if ((npc->_state == 6) && (2 < (uint)(npc->_sprite)._layerCount)) { + if ((npc->_state == 6) && (2 < GHIDRA_UINT((npc->_sprite)._layerCount))) { pfVar5 = segmentData; iVar7 = 2; do { @@ -7781,11 +7781,11 @@ LAB_0054f962: layer = ((ANM2 *)(&npc->_sprite))->ANM2::GetLayer(layerIndex); (layer->_pos).x = (fVar12 - fVar11) * 0.65; (layer->_pos).y = ((fVar14 - fVar15) + (fVar1 - fVar13)) * 0.65; - dVar2 = __uint_to_double_fixup[-((int)layerIndex >> 0x1f)]; + dVar2 = __uint_to_double_fixup[-(GHIDRA_INT(layerIndex) >> 0x1f)]; fVar12 = *pfVar5; layer = ((ANM2 *)(&npc->_sprite))->ANM2::GetLayer(layerIndex); pfVar5 = pfVar5 + 1; - layer->_visible = fVar12 <= -6.0 - (float)((double)(int)layerIndex + dVar2) * 3.0; + layer->_visible = fVar12 <= -6.0 - (float)((double)GHIDRA_INT(layerIndex) + dVar2) * 3.0; layerIndex = layerIndex + 1; segmentsLeft = segmentsLeft + -1; } while (segmentsLeft != 0); @@ -7804,7 +7804,7 @@ Vector * NpcHelper::willo_slot(Entity_NPC *npc, Vector *outPos, int slot) willo_get_target_pos(npc,&targetPos,&local_14); frameParity = g_manager->_framecount & 0x80000001; - if ((int)frameParity < 0) { + if (GHIDRA_INT(frameParity) < 0) { frameParity = (frameParity - 1 | 0xfffffffe) + 1; } if (npc->_state == 8) { @@ -7815,7 +7815,7 @@ Vector * NpcHelper::willo_slot(Entity_NPC *npc, Vector *outPos, int slot) } radius = (npc->_v1).y * (npc->_v1).x; local_14 = local_14 - - ((float)(int)frameParity * 0.5 + (float)g_game->_frameCount + (float)slot) * 0.5 * + ((float)GHIDRA_INT(frameParity) * 0.5 + (float)g_game->_frameCount + (float)slot) * 0.5 * 3.1415927 * 0.035; fVar1 = cos(local_14); outPos->x = fVar1 * radius + targetPos.x; @@ -7970,7 +7970,7 @@ void NpcHelper::willo_attack(Entity_NPC *npc) float local_8; Manager *manager; - local_8 = (float)(__security_cookie ^ (uint)&(&projParams)[1].CircleAngle); + local_8 = (float)(__security_cookie ^ GHIDRA_UINT(&(&projParams)[1].CircleAngle)); if (((npc->_sprite)._animState._animData == (void *)0x0) || ((npc->_sprite)._animState._isPlaying == 0)) { npc->_state = 3; @@ -7988,7 +7988,7 @@ void NpcHelper::willo_attack(Entity_NPC *npc) } local_bc = 6.60012e-43; seed_fart_sound_override((int *)&local_bc); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_bc,1.0,2,0,local_b8,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_bc),1.0,2,0,local_b8,0.0); } if ((npc->_sprite)._animState._animData == (void *)0x0) { return; @@ -8007,7 +8007,7 @@ void NpcHelper::willo_attack(Entity_NPC *npc) } local_bc = 2.14399e-43; seed_fart_sound_override((int *)&local_bc); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_bc,1.0,2,0,local_b8,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_bc),1.0,2,0,local_b8,0.0); target = ((Entity_NPC *)(npc))->Entity_NPC::GetPlayerTarget(); ((ProjectileParams *)(&projParams))->ProjectileParams::ProjectileParams(); local_bc = ((target->_pos).x + (target->_velocity).x) - (npc->_pos).x; @@ -8027,14 +8027,14 @@ void NpcHelper::willo_attack(Entity_NPC *npc) projParams.Color._tint[1] = fRam00c33cb4; projParams.Color._tint[2] = fRam00c33cb8; projParams.Color._tint[3] = fRam00c33cbc; - projParams.BulletFlags._0_4_ = 0x2000; - projParams.BulletFlags._4_4_ = 0; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = 0x2000; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x4)) = 0; projParams.Color._colorize[0] = _DAT_00c33cc0; projParams.Color._colorize[1] = fRam00c33cc4; projParams.Color._colorize[2] = fRam00c33cc8; projParams.Color._colorize[3] = fRam00c33ccc; projParams.Color._offset[0] = (float)DAT_00c33cd0; - projParams.Color._offset[1] = DAT_00c33cd0._4_4_; + projParams.Color._offset[1] = (*(undefined4 *)((char *)&(DAT_00c33cd0) + 0x4)); if ((npc->_parent == (EntityPtr)0x0) && (npc->_subtype == 0)) { projParams.FallingSpeedModifier = projParams.FallingSpeedModifier + 4.0; } @@ -8073,11 +8073,11 @@ Entity_NPC * NpcHelper::min_min_spawn_willo(Vector *position, Entity_NPC *spawne *parentSlot = (EntityPtr)spawner; std::multiset::insert(parentSlot); } - *(uint *)&willo->_flags = (uint)willo->_flags & 0xfffffffb; - flagsHigh = *(undefined4 *)((int)&willo->_flags + 4); + *(uint *)&willo->_flags = GHIDRA_UINT(willo->_flags) & 0xfffffffb; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&willo->_flags) + 4); (willo->_v1).x = v1XLocal; (willo->_v1).y = 1.0; - *(undefined4 *)((int)&willo->_flags + 4) = flagsHigh; + *(undefined4 *)(GHIDRA_INT(&willo->_flags) + 4) = flagsHigh; if ((char)subType == '\0') { willo->_state = 6; animData = (willo->_sprite)._animState._animData; @@ -8092,7 +8092,7 @@ Entity_NPC * NpcHelper::min_min_spawn_willo(Vector *position, Entity_NPC *spawne bVar3 = bVar1 < (byte)*targetAnimName; if (bVar1 != *targetAnimName) { LAB_00559170: - flagsHigh = -(uint)bVar3 | 1; + flagsHigh = -GHIDRA_UINT(bVar3) | 1; goto LAB_00559175; } if (bVar1 == 0) break; @@ -8133,7 +8133,7 @@ LAB_00559175: bVar3 = bVar1 < (byte)*targetAnimName; if (bVar1 != *targetAnimName) { LAB_005590d0: - flagsHigh = -(uint)bVar3 | 1; + flagsHigh = -GHIDRA_UINT(bVar3) | 1; goto LAB_005590d5; } if (bVar1 == 0) break; @@ -8192,19 +8192,19 @@ void NpcHelper::bubbles_death_geyser_tick(Entity *owner) lowShotsLeft = 2; do { rngResult = Random(); - originX = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + originX = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14; originX = originX + originX; cosAngle = cos(originX); originX = sin(originX); rngResult = Random(); rngFactor = Random(); - randScale = (float)((double)(int)rngFactor + __uint_to_double_fixup[-((int)rngFactor >> 0x1f)]) + randScale = (float)((double)GHIDRA_INT(rngFactor) + __uint_to_double_fixup[-(GHIDRA_INT(rngFactor) >> 0x1f)]) * 2.3283064e-10; local_18.y = randScale * originX * 2.8; local_18.x = randScale * cosAngle * 2.8; rngFactor = Random(); - randScale = (float)((double)(int)rngFactor + __uint_to_double_fixup[-((int)rngFactor >> 0x1f)]) + randScale = (float)((double)GHIDRA_INT(rngFactor) + __uint_to_double_fixup[-(GHIDRA_INT(rngFactor) >> 0x1f)]) * 2.3283064e-10; local_10.x = cosAngle * 5.0 * randScale + originX; local_10.y = originX * 5.0 * randScale + originY; @@ -8215,15 +8215,15 @@ void NpcHelper::bubbles_death_geyser_tick(Entity *owner) rngResult = Random(); projectile->_fallingAccel = 2.0; projectile->_scale = - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 1.4; rngResult = Random(); projectile->_fallingSpeed = - -15.0 - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) + -15.0 - (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 60.0; rngResult = Random(); projectile->_height = - -23.0 - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) + -23.0 - (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 15.0; Entity_Projectile::apply_spawn_flags (projectile,*(int *)&(*(undefined1 *)((char *)&(owner[1]) + 0x40)), @@ -8234,19 +8234,19 @@ void NpcHelper::bubbles_death_geyser_tick(Entity *owner) highShotsLeft = 2; do { rngResult = Random(); - originX = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + originX = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14; originX = originX + originX; cosAngle = cos(originX); originX = sin(originX); rngResult = Random(); rngFactor = Random(); - randScale = (float)((double)(int)rngFactor + __uint_to_double_fixup[-((int)rngFactor >> 0x1f)]) + randScale = (float)((double)GHIDRA_INT(rngFactor) + __uint_to_double_fixup[-(GHIDRA_INT(rngFactor) >> 0x1f)]) * 2.3283064e-10; local_10.y = randScale * originX * 2.8; local_10.x = randScale * cosAngle * 2.8; rngFactor = Random(); - randScale = (float)((double)(int)rngFactor + __uint_to_double_fixup[-((int)rngFactor >> 0x1f)]) + randScale = (float)((double)GHIDRA_INT(rngFactor) + __uint_to_double_fixup[-(GHIDRA_INT(rngFactor) >> 0x1f)]) * 2.3283064e-10; local_18.x = cosAngle * 5.0 * randScale + originX; local_18.y = originX * 5.0 * randScale + originY; @@ -8257,15 +8257,15 @@ void NpcHelper::bubbles_death_geyser_tick(Entity *owner) rngResult = Random(); projectile->_fallingAccel = 2.0; projectile->_scale = - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 1.4; rngResult = Random(); projectile->_fallingSpeed = - -15.0 - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) + -15.0 - (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 60.0; rngResult = Random(); projectile->_height = - -23.0 - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) + -23.0 - (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 1000.0; Entity_Projectile::apply_spawn_flags (projectile,*(int *)&(*(undefined1 *)((char *)&(owner[1]) + 0x40)), @@ -8332,7 +8332,7 @@ byte NpcHelper::polty_is_pot_cell(Entity_NPC *npc, int gridIndex) int gridWidth; game = g_game; - if ((uint)gridIndex < 0x1c0) { + if (GHIDRA_UINT(gridIndex) < 0x1c0) { gridWidth = *(int *)((char *)g_game->_room + gridIndex * 4 + 0x24); if ((gridWidth != 0) && (((*(int *)(gridWidth + 4) == 6 || (*(int *)(gridWidth + 4) == 0x1a)) && @@ -8361,20 +8361,20 @@ void NpcHelper::mother_set_collision_class(Entity_NPC *npc, int collisionClass) dequeOffset = (npc->_entityDeque)._offset; dequeBlockSlot = dequeOffset + 1 & 3; dequeBlock = dequeOffset + 1 >> 2; - if (*(int *)(*(int *)((int)(npc->_entityDeque)._map + + if (*(int *)(*(int *)(GHIDRA_INT((npc->_entityDeque)._map) + ((npc->_entityDeque)._mapSize - 1 & dequeBlock) * 4) + dequeBlockSlot * 4) != 0) { - *(int *)(*(int *)(*(int *)((int)(npc->_entityDeque)._map + + *(int *)(*(int *)(*(int *)(GHIDRA_INT((npc->_entityDeque)._map) + ((npc->_entityDeque)._mapSize - 1 & dequeBlock) * 4) + dequeBlockSlot * 4) + 0x188) = collisionClass; dequeOffset = (npc->_entityDeque)._offset; } dequeBlock = dequeOffset + 2 >> 2; dequeOffset = dequeOffset + 2 & 3; - if (*(int *)(*(int *)((int)(npc->_entityDeque)._map + + if (*(int *)(*(int *)(GHIDRA_INT((npc->_entityDeque)._map) + ((npc->_entityDeque)._mapSize - 1 & dequeBlock) * 4) + dequeOffset * 4) != 0) { - *(int *)(*(int *)(*(int *)((int)(npc->_entityDeque)._map + + *(int *)(*(int *)(*(int *)(GHIDRA_INT((npc->_entityDeque)._map) + ((npc->_entityDeque)._mapSize - 1 & dequeBlock) * 4) + dequeOffset * 4) + 0x188) = collisionClass; } @@ -8409,7 +8409,7 @@ void NpcHelper::mother_spawn_parts() ((Game *)(g_game))->Game::Spawn(0x390,0,&part1Pos,&g_vectorZero,(Entity *)in_ECX,1, *(uint *)((char *)in_ECX + 0x3ec)); offsetY = *(float *)((char *)in_ECX + 0x350) - DAT_00c33d40; - ((Vector *)((int)EVar1 + 0x34c))->x = *(float *)((char *)in_ECX + 0x34c) - DAT_00c33d3c; + ((Vector *)(GHIDRA_INT(EVar1) + 0x34c))->x = *(float *)((char *)in_ECX + 0x34c) - DAT_00c33d3c; *(float *)((char *)EVar1 + 0x350) = offsetY; local_24 = EVar1; mother_set_collision_class((Entity_NPC *)EVar1,0); @@ -8418,11 +8418,11 @@ void NpcHelper::mother_spawn_parts() *(undefined4 *)((char *)EVar1 + 0x16c) = *(undefined4 *)((char *)EVar1 + 0x16c); ((Entity *)((Entity *)EVar1))->Entity::SetVisibleFlag(0); if (*(EntityPtr *)((char *)EVar1 + 0x3bc) != (EntityPtr)0x0) { - local_14 = (Entity *)((int)EVar1 + 0x3bc); + local_14 = (Entity *)(GHIDRA_INT(EVar1) + 0x3bc); std::multiset::erase(&local_14); } *(EntityPtr *)((char *)EVar1 + 0x3bc) = in_ECX; - std::multiset::insert((EntityPtr *)((int)EVar1 + 0x3bc)); + std::multiset::insert((EntityPtr *)(GHIDRA_INT(EVar1) + 0x3bc)); (**(code **)(*(int *)EVar1 + 0xc))(); part2Pos.x = DAT_00c33d44 + *(float *)((char *)in_ECX + 0x33c); part2Pos.y = DAT_00c33d48 + *(float *)((char *)in_ECX + 0x340); @@ -8442,8 +8442,8 @@ void NpcHelper::mother_spawn_parts() part2->_parent = in_ECX; std::multiset::insert(&part2->_parent); flags = part2->_flags; - *(undefined4 *)((int)&part2->_flags + 4) = *(undefined4 *)((int)&part2->_flags + 4); - *(uint *)&part2->_flags = (uint)flags & 0xfffffffb | 0x80000000; + *(undefined4 *)(GHIDRA_INT(&part2->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&part2->_flags) + 4); + *(uint *)&part2->_flags = GHIDRA_UINT(flags) & 0xfffffffb | 0x80000000; part2->Update(); part3Pos.x = DAT_00c33d4c + *(float *)((char *)in_ECX + 0x33c); part3Pos.y = DAT_00c33d50 + *(float *)((char *)in_ECX + 0x340); @@ -8458,11 +8458,11 @@ void NpcHelper::mother_spawn_parts() *(float *)((char *)EVar1 + 0x34c) = *(float *)((char *)in_ECX + 0x34c) - DAT_00c33d4c; *(float *)((char *)EVar1 + 0x350) = offsetY; if (*(int *)((char *)EVar1 + 0x3bc) != 0) { - local_18 = (EntityPtr *)((int)EVar1 + 0x3bc); + local_18 = (EntityPtr *)(GHIDRA_INT(EVar1) + 0x3bc); std::multiset::erase(&local_18); } *(EntityPtr *)((char *)EVar1 + 0x3bc) = in_ECX; - std::multiset::insert((int)EVar1 + 0x3bc); + std::multiset::insert(GHIDRA_INT(EVar1) + 0x3bc); *(undefined4 *)((char *)EVar1 + 0x16c) = *(undefined4 *)((char *)EVar1 + 0x16c); *(uint *)((char *)EVar1 + 0x168) = *(uint *)((char *)EVar1 + 0x168) & 0xfffffffb | 0x80000000; (**(code **)(*(int *)EVar1 + 0xc))(); @@ -8501,7 +8501,7 @@ void NpcHelper::mother_spawn_parts() } *(EntityPtr *)local_1c = EVar1; std::multiset::insert(local_1c); - local_1c = (EntityPtr)((int)in_ECX + 0x3c0); + local_1c = (EntityPtr)(GHIDRA_INT(in_ECX) + 0x3c0); if (*(int *)((char *)in_ECX + 0x3c0) != 0) { local_24 = local_1c; std::multiset::erase(&local_24); @@ -8544,18 +8544,18 @@ void NpcHelper::mother_2_slam_burst(float *param_1) manager = g_manager; local_18 = 1.079e-43; seed_fart_sound_override((int *)&local_18); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_18,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_18),1.0,2,0,1.0,0.0); ((Game *)(g_game))->Game::ShakeScreen(0xc); rngResult = Random(); spawnedEffect = ((Game *)(g_game))->Game::Spawn(1000,2,&slamPos,&g_vectorZero,(Entity *)0x0,4,rngResult); rngResult = Random(); (spawnedEffect->_sprite)._rotation = - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 360.0; rngResult = Random(); (spawnedEffect->_posOffset).x = 0.0; (spawnedEffect->_posOffset).y = - -10.0 - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + -10.0 - (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 20.0; spawnedEffect->SetColor(&g_colorGreenSplat,0xffffffff,0xff,0,1); spawnedEffect->Update(); @@ -8572,17 +8572,17 @@ void NpcHelper::mother_2_slam_burst(float *param_1) do { iVar3 = iVar2; rngResult = Random(); - local_20 = ((float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) + local_20 = ((float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 - 0.5) * 90.0 * 0.017453292; local_1c = cos(local_20); fVar4 = sin(local_20); local_20 = local_18 * local_1c + backDirX * fVar4; local_1c = backDirX * local_1c - local_18 * fVar4; rngResult = Random(); - local_24 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + local_24 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 10.0 + 20.0; rngResult = Random(); - fVar4 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + fVar4 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10; local_3c.y = fVar4 * local_20 * 5.0 + slamPos.y; local_3c.x = fVar4 * local_1c * 5.0 + slamPos.x; @@ -8596,17 +8596,17 @@ void NpcHelper::mother_2_slam_burst(float *param_1) iVar3 = iVar3 + 0xb; do { rngResult = Random(); - local_24 = ((float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) + local_24 = ((float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 - 0.5) * 90.0 * 0.017453292; local_20 = cos(local_24); fVar4 = sin(local_24); local_1c = local_18 * local_20 + backDirX * fVar4; local_20 = backDirX * local_20 - local_18 * fVar4; rngResult = Random(); - local_24 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + local_24 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 25.0 + 5.0; rngResult = Random(); - fVar4 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + fVar4 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10; local_34.y = fVar4 * local_1c * 5.0 + slamPos.y; local_34.x = fVar4 * local_20 * 5.0 + slamPos.x; @@ -8627,7 +8627,7 @@ void NpcHelper::mother_2_slam_burst(float *param_1) (spawnedEffect->_posOffset).y = -10.0; iVar2 = *(int *)spawnedEffect; (spawnedEffect->_sprite)._rotation = - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 360.0; (**(code **)(iVar2 + 0x3c))(&g_colorGreenSplat,0xffffffff,0xff,0,1); spawnedEffect->Update(); @@ -8673,12 +8673,12 @@ void NpcHelper::mother_render(Entity_NPC *npc, Vector *offset) if ((layerId == 0) || (colorTarget = npc->_parent, npc->_parent == (EntityPtr)0x0)) { colorTarget = (EntityPtr)npc; } - pixelScale = ((ColorMod *)((int)colorTarget + 0xf0))->_tint[0]; + pixelScale = ((ColorMod *)(GHIDRA_INT(colorTarget) + 0xf0))->_tint[0]; fVar4 = *(float *)((char *)colorTarget + 0xf4); fVar5 = *(float *)((char *)colorTarget + 0xf8); fVar6 = *(float *)((char *)colorTarget + 0xfc); offsetY = *(float *)((char *)colorTarget + 0x118); - pCVar1 = (ColorMod *)((int)colorTarget + 0xf0); + pCVar1 = (ColorMod *)(GHIDRA_INT(colorTarget) + 0xf0); pCVar2 = &(npc->_sprite)._color; fVar7 = *(float *)((char *)colorTarget + 0x100); fVar8 = *(float *)((char *)colorTarget + 0x104); @@ -8704,7 +8704,7 @@ void NpcHelper::mother_render(Entity_NPC *npc, Vector *offset) *(float *)((char *)colorTarget + 0x118) = (npc->_sprite)._color._offset[2]; layerId = npc->_subtype; } - ((Sprite *)((Sprite *)((int)colorTarget + 0x48)))->Sprite::RenderLayer(layerId,&npc->_renderPosition, + ((Sprite *)((Sprite *)(GHIDRA_INT(colorTarget) + 0x48)))->Sprite::RenderLayer(layerId,&npc->_renderPosition, &g_vectorZero,&g_vectorZero); if (pCVar1 != (ColorMod *)local_6c) { pCVar1->_tint[0] = pixelScale; @@ -8752,7 +8752,7 @@ Entity * NpcHelper::clutch_find_farthest_orbital(Entity_NPC *clutch, int unused) ExceptionList = &local_10; local_18 = (EntityPtr)0x0; maxDistance = 0.0; - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&local_38,0x379,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&local_38,0x379,-1,-1,0,0); uVar2 = 0; tmpEntity = (EntityPtr)0x0; if (local_38._size != 0) { @@ -8769,7 +8769,7 @@ Entity * NpcHelper::clutch_find_farthest_orbital(Entity_NPC *clutch, int unused) ((tmpEntity != clutch->_child && ((*(float *)((char *)tmpEntity + 0xbc4) != 1.38729e-43 && (fVar3 = (clutch->_pos).y - *(float *)((char *)tmpEntity + 0x340), - deltaX = (clutch->_pos).x - ((Vector *)((int)tmpEntity + 0x33c))->x, + deltaX = (clutch->_pos).x - ((Vector *)(GHIDRA_INT(tmpEntity) + 0x33c))->x, fVar3 = sqrtf(fVar3 * fVar3 + deltaX * deltaX), (*(uint *)((char *)tmpEntity + 0x168) & 0x10) == 0)))))) { enemiesData = local_38._data; @@ -8785,22 +8785,22 @@ Entity * NpcHelper::clutch_find_farthest_orbital(Entity_NPC *clutch, int unused) LAB_00572bab: uVar2 = uVar2 + 1; tmpEntity = local_18; - } while (uVar2 < (uint)local_38._size); + } while (uVar2 < GHIDRA_UINT(local_38._size)); } - if (local_38._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_38) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { heapAllocatedBytes = &g_allocatedBytesNoHeap; } else { - heapAllocatedBytes = (qword *)((int)g_mainHeap + 0x30); + heapAllocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (local_38._data != (void *)0x0) { uVar2 = *(uint *)((char *)local_38._data + -4); qVar1 = *heapAllocatedBytes; - *(uint *)heapAllocatedBytes = (uint)*heapAllocatedBytes - uVar2; + *(uint *)heapAllocatedBytes = GHIDRA_UINT(*heapAllocatedBytes) - uVar2; *(uint *)((char *)heapAllocatedBytes + 4) = - *(uint *)((char *)heapAllocatedBytes + 4) - (uint)((uint)qVar1 < uVar2); - free((uint *)((int)local_38._data + -4)); + *(uint *)((char *)heapAllocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar2)); + free((uint *)(GHIDRA_INT(local_38._data) + -4)); } } ExceptionList = local_10; @@ -8845,12 +8845,12 @@ void NpcHelper::clutch_spawn_fire(Entity_NPC *npc, Entity *target) local_14 = 0xffffffff; puStack_18 = &LAB_00af506d; local_1c = ExceptionList; - uVar5 = __security_cookie ^ (uint)(local_4c + 0x3c); + uVar5 = __security_cookie ^ GHIDRA_UINT((local_4c + 0x3c)); ExceptionList = &local_1c; local_58 = target; - uVar1 = *(undefined4 *)((int)&target->_flags + 4); - *(uint *)&target->_flags = (uint)target->_flags | 0x10; - *(undefined4 *)((int)&target->_flags + 4) = uVar1; + uVar1 = *(undefined4 *)(GHIDRA_INT(&target->_flags) + 4); + *(uint *)&target->_flags = GHIDRA_UINT(target->_flags) | 0x10; + *(undefined4 *)(GHIDRA_INT(&target->_flags) + 4) = uVar1; addFlagsFn = *(code **)(*(int *)target + 0x24); local_54 = (EntityPtr)npc; local_24 = uVar5; @@ -8863,28 +8863,28 @@ void NpcHelper::clutch_spawn_fire(Entity_NPC *npc, Entity *target) animPathSize = 0; fireSprite = &fire->_sprite; animPathCapacity = &DAT_0000000f; - local_4c._16_4_ = 0.0; + (*(undefined4 *)((char *)&(local_4c) + 0x10)) = 0.0; local_5c = fireSprite; local_50 = fire; - local_4c._16_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(local_4c) + 0x10)) = std::_Allocate(0x30); animPathSize = 0x20; animPathCapacity = &DAT_0000002f; - builtin_strncpy((char *)local_4c._16_4_,"gfx/009.002_Fire Projectile.anm2",0x21); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_4c) + 0x10)),"gfx/009.002_Fire Projectile.anm2",0x21); local_14 = 0; ((ANM2 *)(fireSprite))->ANM2::Load((std_string *)(local_4c + 0x10),1); local_14 = 0xffffffff; if (&DAT_0000000f < animPathCapacity) { size = animPathCapacity + 1; - pcVar7 = (char *)local_4c._16_4_; + pcVar7 = (*(undefined4 *)((char *)&((char *)local_4c) + 0x10)); if ((undefined1 *)0xfff < size) { - pcVar7 = *(char **)(local_4c._16_4_ + -4); + pcVar7 = *(char **)((*(undefined4 *)((char *)&(local_4c) + 0x10)) + -4); size = animPathCapacity + 0x24; - if ((char *)0x1f < (char *)(local_4c._16_4_ + (-4 - (int)pcVar7))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_4c) + 0x10)) + (-4 - GHIDRA_INT(pcVar7)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(pcVar7,(uint)size); + operator_delete(pcVar7,GHIDRA_UINT(size)); } pbVar6 = (fire->_sprite)._animState._animData; if (pbVar6 != (byte *)0x0) { @@ -8897,7 +8897,7 @@ void NpcHelper::clutch_spawn_fire(Entity_NPC *npc, Entity *target) bVar8 = bVar4 < (byte)*pcVar7; if (bVar4 != *pcVar7) { LAB_00572e46: - uVar5 = -(uint)bVar8 | 1; + uVar5 = -GHIDRA_UINT(bVar8) | 1; goto LAB_00572e4b; } if (bVar4 == 0) break; @@ -8910,7 +8910,7 @@ LAB_00572e46: uVar5 = 0; LAB_00572e4b: if ((uVar5 == 0) && - ((*(char *)((int)(fire->_sprite)._animState._animData + 0x34) == '\0' || + ((*(char *)(GHIDRA_INT((fire->_sprite)._animState._animData) + 0x34) == '\0' || ((fire->_sprite)._animState._isPlaying != 0)))) goto LAB_00572e7c; } bVar4 = ((ANM2 *)(fireSprite))->ANM2::SetAnimation((byte *)"Flickering",1); @@ -8953,7 +8953,7 @@ LAB_00572e7c: local_54 = (EntityPtr)(local_58->_pos).x; local_64.y = (local_58->_pos).y; angleRoll = Random(); - fVar9 = (float)((double)(int)angleRoll + __uint_to_double_fixup[-((int)angleRoll >> 0x1f)]) * + fVar9 = (float)((double)GHIDRA_INT(angleRoll) + __uint_to_double_fixup[-(GHIDRA_INT(angleRoll) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_5c = (ANM2 *)(fVar9 + fVar9); fVar9 = cos((float)local_5c); @@ -8961,7 +8961,7 @@ LAB_00572e7c: fVar9 = sin((float)local_5c); spawnPos.y = fVar9 * 10.0 + local_64.y; local_54 = (EntityPtr)((Game *)(g_game))->Game::Spawn(0x399,1,&spawnPos,&g_vectorZero,(Entity *)npc,0,uVar5); - parentSlot = (EntityPtr *)((int)local_54 + 0x3bc); + parentSlot = (EntityPtr *)(GHIDRA_INT(local_54) + 0x3bc); if (*(EntityPtr *)((char *)local_54 + 0x3bc) != (EntityPtr)0x0) { local_64.y = (float)parentSlot; std::multiset::erase(&local_64.y); @@ -8971,9 +8971,9 @@ LAB_00572e7c: std::multiset::insert(parentSlot); } uVar5 = Random(); - local_50 = (Entity *)((int)local_50 + -1); + local_50 = (Entity *)(GHIDRA_INT(local_50) + -1); *(float *)((char *)local_54 + 0xbb0) = - (float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) * 2.3283064e-10 + (float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283064e-10 * 360.0; } while (local_50 != (Entity *)0x0); ExceptionList = local_1c; @@ -9025,14 +9025,14 @@ void NpcHelper::clutch_render(Entity_NPC *npc, Vector *offset) pointIndex = pointBlock; while( true ) { pointBlock = (npc->_vectorDeque1)._offset; - if (((npc->_vectorDeque1)._size - 3) + pointBlock <= (uint)pointIndex) break; + if (((npc->_vectorDeque1)._size - 3) + pointBlock <= GHIDRA_UINT(pointIndex)) break; if (pointDeque == (int *)0x0) { iVar3 = 0; } else { iVar3 = *pointDeque; } - pointBlock = (uint)pointIndex >> 1; + pointBlock = GHIDRA_UINT(pointIndex) >> 1; pointSlotOffset = (pointIndex & 1U) * 8; pfVar2 = (float *)(*(int *)(*(int *)(iVar3 + 4) + (*(int *)(iVar3 + 8) - 1U & pointBlock) * 4) + pointSlotOffset) @@ -9066,14 +9066,14 @@ void NpcHelper::clutch_render(Entity_NPC *npc, Vector *offset) else { iVar5 = *pointDeque; } - iVar3 = (int)(8.0 - (*(float *)(*(int *)(*(int *)(iVar5 + 4) + + iVar3 = GHIDRA_INT((8.0 - (*(float *)(*(int *)(*(int *)(iVar5 + 4) + (nextPointIndex + 2 >> 1 & *(int *)(iVar5 + 8) - 1U) * 4) + (nextPointIndex + 2 & 1) * 8) + *(float *)(*(int *)(*(int *)(iVar3 + 4) + (nextPointIndex - 1 >> 1 & *(int *)(iVar3 + 8) - 1U ) * 4) + (nextPointIndex + 1 & 1) * 8)) * 0.5 * 8.0 - ); + )); if (iVar3 == 7) { segmentStretch = 1.0; LAB_00575d73: @@ -9113,19 +9113,19 @@ LAB_00575d73: animData = (npc->_sprite)._animState._animData; if (((animData != (void *)0x0) && (animation = (npc->_sprite)._animState._animation, - (int)layerId < animation->_layerCount)) && - (iVar3 = *(int *)(layerOffset + (int)animData), -1 < iVar3)) { + GHIDRA_INT(layerId) < animation->_layerCount)) && + (iVar3 = *(int *)(layerOffset + GHIDRA_INT(animData)), -1 < iVar3)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar3 * 0x10 + *(int *)((char *)animData + 0x18)), segmentPos, - *(int *)((int)(npc->_sprite)._animState._layerFrames + iVar3 * 4), + *(int *)(GHIDRA_INT((npc->_sprite)._animState._layerFrames) + iVar3 * 4), &g_vectorZero,&g_vectorZero,animation); } animData = (npc->_sprite)._overlayAnimState._animData; if (((animData != (void *)0x0) && (animation = (npc->_sprite)._overlayAnimState._animation, - (int)layerId < animation->_layerCount)) && - (iVar3 = *(int *)(layerOffset + (int)animData), -1 < iVar3)) { + GHIDRA_INT(layerId) < animation->_layerCount)) && + (iVar3 = *(int *)(layerOffset + GHIDRA_INT(animData)), -1 < iVar3)) { layerFrames = (npc->_sprite)._overlayAnimState._layerFrames; goto LAB_00575ed0; } @@ -9134,19 +9134,19 @@ LAB_00575d73: animData = (npc->_sprite)._overlayAnimState._animData; if (((animData != (void *)0x0) && (animation = (npc->_sprite)._overlayAnimState._animation, - (int)layerId < animation->_layerCount)) && - (iVar3 = *(int *)(layerOffset + (int)animData), -1 < iVar3)) { + GHIDRA_INT(layerId) < animation->_layerCount)) && + (iVar3 = *(int *)(layerOffset + GHIDRA_INT(animData)), -1 < iVar3)) { AnimationLayer::RenderFrame ((AnimationLayer *)(iVar3 * 0x10 + *(int *)((char *)animData + 0x18)), segmentPos, - *(int *)((int)(npc->_sprite)._overlayAnimState._layerFrames + iVar3 * 4 + *(int *)(GHIDRA_INT((npc->_sprite)._overlayAnimState._layerFrames) + iVar3 * 4 ),&g_vectorZero,&g_vectorZero,animation); } animData = (npc->_sprite)._animState._animData; if (((animData != (void *)0x0) && (animation = (npc->_sprite)._animState._animation, - (int)layerId < animation->_layerCount)) && - (iVar3 = *(int *)(layerOffset + (int)animData), -1 < iVar3)) { + GHIDRA_INT(layerId) < animation->_layerCount)) && + (iVar3 = *(int *)(layerOffset + GHIDRA_INT(animData)), -1 < iVar3)) { layerFrames = (npc->_sprite)._animState._layerFrames; LAB_00575ed0: AnimationLayer::RenderFrame @@ -9223,13 +9223,13 @@ void NpcHelper::raglich_pick_target_pos(Entity_NPC *npc, float speed) Vector *minResult; Room *room; - direction = *(char *)((int)&npc->_i1 + 2) + 4 + (int)(short)npc->_i1 & 0x80000003; - if ((int)direction < 0) { + direction = *(char *)(GHIDRA_INT(&npc->_i1) + 2) + 4 + GHIDRA_INT((short)npc->_i1) & 0x80000003; + if (GHIDRA_INT(direction) < 0) { direction = (direction - 1 | 0xfffffffc) + 1; } local_c.y = speed; Isaac::GetAxisAlignedUnitVectorFromDir(&local_24,direction); - Isaac::GetAxisAlignedUnitVectorFromDir(&local_1c,(int)(short)npc->_i1); + Isaac::GetAxisAlignedUnitVectorFromDir(&local_1c,GHIDRA_INT((short)npc->_i1)); game = g_game; fVar1 = (npc->_v1).y; fVar2 = npc->_speedMultiplier; @@ -9251,13 +9251,13 @@ void NpcHelper::raglich_pick_target_pos(Entity_NPC *npc, float speed) local_c.y = clampedPos.y + local_24.y; isInRoom = ((Room *)(room))->Room::IsPositionInRoom(&local_c,0.0); if (isInRoom == 0) { - direction = ((int)(short)npc->_i1 - (int)*(char *)((int)&npc->_i1 + 2)) + 4U & 0x80000003; - if ((int)direction < 0) { + direction = (GHIDRA_INT((short)npc->_i1) - GHIDRA_INT(*(char *)(GHIDRA_INT(&npc->_i1) + 2))) + 4U & 0x80000003; + if (GHIDRA_INT(direction) < 0) { direction = (direction - 1 | 0xfffffffc) + 1; } *(short *)&npc->_i1 = (short)direction; - iVar3 = (int)((clampedPos.x - 40.0) / 40.0 + 0.5); - row = (int)((clampedPos.y - 120.0) / 40.0 + 0.5); + iVar3 = GHIDRA_INT(((clampedPos.x - 40.0) / 40.0 + 0.5)); + row = GHIDRA_INT(((clampedPos.y - 120.0) / 40.0 + 0.5)); if ((((iVar3 < 0) || (gridWidth = room->_gridWidth, gridWidth <= iVar3)) || (row < 0)) || (room->_gridHeight <= row)) { gridWidth = room->_gridWidth; @@ -9281,8 +9281,8 @@ void NpcHelper::raglich_pick_target_pos(Entity_NPC *npc, float speed) probePos.y = local_1c.y - local_24.y; isInRoom = ((Room *)(room))->Room::IsPositionInRoom(&probePos,0.0); if (isInRoom != 0) goto LAB_00576404; - direction = (short)npc->_i1 + 4 + (int)*(char *)((int)&npc->_i1 + 2) & 0x80000003; - if ((int)direction < 0) { + direction = (short)npc->_i1 + 4 + GHIDRA_INT(*(char *)(GHIDRA_INT(&npc->_i1) + 2)) & 0x80000003; + if (GHIDRA_INT(direction) < 0) { direction = (direction - 1 | 0xfffffffc) + 1; } *(short *)&npc->_i1 = (short)direction; @@ -9339,7 +9339,7 @@ void NpcHelper::raglich_slam_spawn_grid(Entity_NPC *npc) local_8 = -NAN; puStack_c = &LAB_00af5157; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(&particleColor)[1]._colorize; + uVar2 = __security_cookie ^ GHIDRA_UINT((&particleColor)[1]._colorize); local_14 = uVar2; if (npc->_state != 0) { if (npc->_state != 3) { @@ -9370,12 +9370,12 @@ void NpcHelper::raglich_slam_spawn_grid(Entity_NPC *npc) rightDamagePos.y = slamOffset.y + (npc->_pos).y + 0.0; ((Game *)(g_game))->Game::BombDamage(&rightDamagePos,10.0,20.0,0,(Entity *)npc,(BitSet128)ZEXT816(0), 0x1000000,0); - gridX = (int)(((slamOffset.x + (npc->_pos).x) - 40.0) / 40.0 + 0.5); - gridY = (int)(((slamOffset.y + (npc->_pos).y) - 120.0) / 40.0 + 0.5); + gridX = GHIDRA_INT((((slamOffset.x + (npc->_pos).x) - 40.0) / 40.0 + 0.5)); + gridY = GHIDRA_INT((((slamOffset.y + (npc->_pos).y) - 120.0) / 40.0 + 0.5)); column = gridX + -1; local_58.y = (float)(gridX + 1); gridYCopy = gridY; - if (column <= (int)local_58.y) { + if (column <= GHIDRA_INT(local_58.y)) { do { gridX = column; room = g_game->_room; @@ -9435,7 +9435,7 @@ void NpcHelper::raglich_slam_spawn_grid(Entity_NPC *npc) gridY = gridYCopy; } column = gridX + 1; - } while (column <= (int)local_58.y); + } while (column <= GHIDRA_INT(local_58.y)); } } if (((npc->_sprite)._animState._animData == (void *)0x0) || @@ -9459,7 +9459,7 @@ void NpcHelper::raglich_slam_spawn_grid(Entity_NPC *npc) isLess = bVar1 < *wantedAnimChar; if (bVar1 != *wantedAnimChar) { LAB_00576910: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_00576915; } if (bVar1 == 0) break; @@ -9482,8 +9482,8 @@ LAB_00576915: } LAB_00576948: flags = npc->_flags; - *(undefined4 *)((int)&npc->_flags + 4) = *(undefined4 *)((int)&npc->_flags + 4); - *(uint *)&npc->_flags = (uint)flags & 0xfffffffb | 0xc4000011; + *(undefined4 *)(GHIDRA_INT(&npc->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&npc->_flags) + 4); + *(uint *)&npc->_flags = GHIDRA_UINT(flags) & 0xfffffffb | 0xc4000011; npc->_state = 3; (npc->_targetPosition).x = (npc->_pos).x; (npc->_targetPosition).y = (npc->_pos).y; @@ -9518,7 +9518,7 @@ void NpcHelper::rainmaker_drop_timer_launch(Entity_Effect *timer) *(undefined4 *)((char *)EVar1 + 0x438) = *(undefined4 *)((char *)EVar1 + 0x438); if (EVar2 == (EntityPtr)0x0) { rngResult = Random(); - fVar3 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + fVar3 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14; fVar3 = fVar3 + fVar3; dirX = cos(fVar3); @@ -9547,7 +9547,7 @@ void NpcHelper::rainmaker_drop_timer_launch(Entity_Effect *timer) } if (0.0 < distance) { rngResult = Random(); - fVar3 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + fVar3 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10; distance = ((fVar3 + fVar3) - 1.0) * distance * 0.017453292; fVar3 = cos(distance); @@ -9663,7 +9663,7 @@ void NpcHelper::scourge_whip(Entity_NPC *npc) isLess = bVar1 < *targetNameCursor; if (bVar1 != *targetNameCursor) { LAB_00583024: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_00583029; } if (bVar1 == 0) break; @@ -9678,9 +9678,9 @@ LAB_00583029: if ((uVar2 == 0) && ((animData[0x34] == 0 || (*(char *)((char *)segment + 0x8c) != '\0')))) goto LAB_00583051; } - bVar1 = ((ANM2 *)((ANM2 *)((int)segment + 0x48)))->ANM2::SetAnimation(anim,1); + bVar1 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(segment) + 0x48)))->ANM2::SetAnimation(anim,1); if (bVar1 != 0) { - ((AnimationState *)((AnimationState *)((int)segment + 0x78)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(segment) + 0x78)))->AnimationState::Rewind(); *(undefined1 *)((char *)segment + 0x8c) = 1; } LAB_00583051: @@ -9694,7 +9694,7 @@ LAB_00583051: } local_c = (Entity_NPC *)0x48; seed_fart_sound_override((int *)&local_c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_c,1.0,2,0,pitch,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_c),1.0,2,0,pitch,0.0); return; } @@ -9730,7 +9730,7 @@ void NpcHelper::scourge_chain_shoot() Manager *manager; EntityPtr nextSegment; - local_14 = (float)(__security_cookie ^ (uint)&(&projParams)[1].CircleAngle); + local_14 = (float)(__security_cookie ^ GHIDRA_UINT(&(&projParams)[1].CircleAngle)); chainEnd = in_ECX->_child; while (((nextSegment = *(EntityPtr *)((char *)chainEnd + 0x3c0), nextSegment != (EntityPtr)0x0 && (*(int *)((char *)nextSegment + 0x28) == 0x38d)) && (*(int *)((char *)nextSegment + 0x2c) == 10) @@ -9776,7 +9776,7 @@ void NpcHelper::scourge_chain_shoot() } else { rngResult = Random(); - fVar4 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + fVar4 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10; } shootPos.x = (in_ECX->_pos).x; @@ -9824,11 +9824,11 @@ void NpcHelper::scourge_chain_shoot() local_20 = 0; local_1c = 0; projParams.Color._offset[2] = DAT_00c34cf0; - projParams.BulletFlags._0_4_ = 0x2000; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x0)) = 0x2000; projParams.CircleAngle = - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.1415927; - projParams.BulletFlags._4_4_ = 0; + (*(undefined4 *)((char *)&(projParams.BulletFlags) + 0x4)) = 0; projParams.HomingStrength = 1.0; projParams.CurvingStrength = 0.005; projParams.Acceleration = 1.01; @@ -9845,10 +9845,10 @@ void NpcHelper::scourge_chain_shoot() projParams.Color._colorize[2] = fRam00c34ce0; projParams.Color._colorize[3] = fRam00c34ce4; projParams.Color._offset[0] = (float)DAT_00c34ce8; - projParams.Color._offset[1] = DAT_00c34ce8._4_4_; + projParams.Color._offset[1] = (*(undefined4 *)((char *)&(DAT_00c34ce8) + 0x4)); rngResult = Random(); projVelocity.x = - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 + 5.0; projVelocity.y = projVelocity.x * local_c8; projVelocity.x = projVelocity.x * local_c4; @@ -9862,8 +9862,8 @@ void NpcHelper::scourge_chain_shoot() (pEVar1->_sprite)._offset.y = -20.0; pEVar1->_renderDepthOffset = 10.0; manager = g_manager; - local_cc = (float)((int)local_cc + 1); - } while ((int)local_cc < 2); + local_cc = (float)(GHIDRA_INT(local_cc) + 1); + } while (GHIDRA_INT(local_cc) < 2); if (in_ECX->_championColorIdx == 0x12) { soundPitch = 1.5; } @@ -9872,7 +9872,7 @@ void NpcHelper::scourge_chain_shoot() } local_cc = 2.49431e-43; seed_fart_sound_override((int *)&local_cc); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_cc,1.0,2,0,soundPitch,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_cc),1.0,2,0,soundPitch,0.0); return; } @@ -9902,7 +9902,7 @@ void NpcHelper::singe_explode_at(Entity_NPC *npc, Vector *position) local_8 = -NAN; puStack_c = &LAB_00af54e5; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)((&explosionColor)[1]._colorize + 1); + local_18 = __security_cookie ^ GHIDRA_UINT(((&explosionColor)[1]._colorize + 1)); ExceptionList = &local_10; explosionColor._offset[0] = 0.0; explosionColor._offset[1] = 0.0; @@ -9921,7 +9921,7 @@ void NpcHelper::singe_explode_at(Entity_NPC *npc, Vector *position) ((Game *)(g_game))->Game::ShakeScreen(10); game = g_game; npc->_projectileCooldown = npc->_projectileCooldown + 1; - EntityList::QueryRadius((EntityList *)((int)game->_room + 0x1218),&nearby,position,100.0,8); + EntityList::QueryRadius((EntityList *)(GHIDRA_INT(game->_room) + 0x1218),&nearby,position,100.0,8); local_8 = 0.0; uVar3 = 0; if (nearby._size != 0) { @@ -9932,14 +9932,14 @@ void NpcHelper::singe_explode_at(Entity_NPC *npc, Vector *position) break; } uVar3 = uVar3 + 1; - } while (uVar3 < (uint)nearby._size); + } while (uVar3 < GHIDRA_UINT(nearby._size)); } - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&minions,0x393,1,-1,0,0); - local_8 = (float)CONCAT31(local_8._1_3_,1); - if ((uint)minions._size < npc->_i1 + 4U) { + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&minions,0x393,1,-1,0,0); + local_8 = (float)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); + if (GHIDRA_UINT(minions._size) < npc->_i1 + 4U) { uVar3 = Random(); angleRoll = Random(); - angle = (float)((double)(int)angleRoll + __uint_to_double_fixup[-((int)angleRoll >> 0x1f)]) * + angle = (float)((double)GHIDRA_INT(angleRoll) + __uint_to_double_fixup[-(GHIDRA_INT(angleRoll) >> 0x1f)]) * 2.3283064e-10 * 3.14; angle = angle + angle; angleSin = sin(angle); @@ -9947,42 +9947,42 @@ void NpcHelper::singe_explode_at(Entity_NPC *npc, Vector *position) spawnPos.x = fVar4 * 20.0 + (npc->_pos).x; spawnPos.y = angleSin * 20.0 + (npc->_pos).y; minion = ((Game *)(g_game))->Game::Spawn(0x393,1,&spawnPos,&g_vectorZero,(Entity *)npc,0,uVar3); - flagsHigh = *(undefined4 *)((int)&minion->_flags + 4); + flagsHigh = *(undefined4 *)(GHIDRA_INT(&minion->_flags) + 4); iVar1 = *(int *)minion; - *(uint *)&minion->_flags = (uint)minion->_flags & 0xfffffffb; - *(undefined4 *)((int)&minion->_flags + 4) = flagsHigh; + *(uint *)&minion->_flags = GHIDRA_UINT(minion->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&minion->_flags) + 4) = flagsHigh; (**(code **)(iVar1 + 0xc))(); iVar1 = *(int *)minion; minion[2]._speedMultiplier = -500.0; minion[2]._prevVelocity.x = 10.0; (**(code **)(iVar1 + 0xc))(); } - if (minions._0_1_ == '\0') { - heapCounter = (qword *)((int)g_mainHeap + 0x30); + if ((*(undefined1 *)((char *)&(minions) + 0x0)) == '\0') { + heapCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); if (g_mainHeap == (void *)0x0) { heapCounter = &g_allocatedBytesNoHeap; } if (minions._data != (void *)0x0) { uVar3 = *(uint *)((char *)minions._data + -4); qVar2 = *heapCounter; - *(uint *)heapCounter = (uint)*heapCounter - uVar3; + *(uint *)heapCounter = GHIDRA_UINT(*heapCounter) - uVar3; *(uint *)((char *)heapCounter + 4) = - *(uint *)((char *)heapCounter + 4) - (uint)((uint)qVar2 < uVar3); - free((void *)((int)minions._data + -4)); + *(uint *)((char *)heapCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < uVar3)); + free((void *)(GHIDRA_INT(minions._data) + -4)); } } - if (nearby._0_1_ == '\0') { - heapCounter = (qword *)((int)g_mainHeap + 0x30); + if ((*(undefined1 *)((char *)&(nearby) + 0x0)) == '\0') { + heapCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); if (g_mainHeap == (void *)0x0) { heapCounter = &g_allocatedBytesNoHeap; } if (nearby._data != (void *)0x0) { uVar3 = *(uint *)((char *)nearby._data + -4); qVar2 = *heapCounter; - *(uint *)heapCounter = (uint)*heapCounter - uVar3; + *(uint *)heapCounter = GHIDRA_UINT(*heapCounter) - uVar3; *(uint *)((char *)heapCounter + 4) = - *(uint *)((char *)heapCounter + 4) - (uint)((uint)qVar2 < uVar3); - free((void *)((int)nearby._data + -4)); + *(uint *)((char *)heapCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < uVar3)); + free((void *)(GHIDRA_INT(nearby._data) + -4)); } } ExceptionList = local_10; @@ -10106,12 +10106,12 @@ void NpcHelper::siren_familiar_counts(int *outFreeCount, int *outCharmedCount, i uStack_8 = 0xffffffff; puStack_c = &LAB_00af1690; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; *outFreeCount = 0; *outCharmedCount = 0; *outTotalCount = 0; - EntityList::QuerySublist((EntityList *)((int)game->_room + 0x1218),&local_24,3,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(game->_room) + 0x1218),&local_24,3,-1,-1,0,0); uVar2 = 0; if (local_24._size != 0) { familiarsData = local_24._data; @@ -10132,22 +10132,22 @@ void NpcHelper::siren_familiar_counts(int *outFreeCount, int *outCharmedCount, i uVar2 = extraout_EDX; } uVar2 = uVar2 + 1; - } while (uVar2 < (uint)local_24._size); + } while (uVar2 < GHIDRA_UINT(local_24._size)); } - if (local_24._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_24) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { heapAllocatedBytes = &g_allocatedBytesNoHeap; } else { - heapAllocatedBytes = (qword *)((int)g_mainHeap + 0x30); + heapAllocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (local_24._data != (void *)0x0) { uVar2 = *(uint *)((char *)local_24._data + -4); oldAllocatedBytes = *heapAllocatedBytes; - *(uint *)heapAllocatedBytes = (uint)*heapAllocatedBytes - uVar2; + *(uint *)heapAllocatedBytes = GHIDRA_UINT(*heapAllocatedBytes) - uVar2; *(uint *)((char *)heapAllocatedBytes + 4) = - *(uint *)((char *)heapAllocatedBytes + 4) - (uint)((uint)oldAllocatedBytes < uVar2); - free((uint *)((int)local_24._data + -4)); + *(uint *)((char *)heapAllocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocatedBytes) < uVar2)); + free((uint *)(GHIDRA_INT(local_24._data) + -4)); } } ExceptionList = local_10; @@ -10177,7 +10177,7 @@ int NpcHelper::siren_charmed_count(Entity_NPC *npc) ExceptionList = &local_10; count = 0; siren = npc; - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&local_24,3,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&local_24,3,-1,-1,0,0); uVar2 = 0; if (local_24._size != 0) { do { @@ -10189,22 +10189,22 @@ int NpcHelper::siren_charmed_count(Entity_NPC *npc) count = count + 1; } uVar2 = uVar2 + 1; - } while (uVar2 < (uint)local_24._size); + } while (uVar2 < GHIDRA_UINT(local_24._size)); } - if (local_24._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_24) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (local_24._data != (void *)0x0) { uVar2 = *(uint *)((char *)local_24._data + -4); qVar1 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar2; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar2; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar1 < uVar2); - free((void *)((int)local_24._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar2)); + free((void *)(GHIDRA_INT(local_24._data) + -4)); } } ExceptionList = local_10; @@ -10248,7 +10248,7 @@ void NpcHelper::siren_pick(Entity_NPC *npc) puStack_20 = (undefined1 *)(local_3c + 0xe); puStack_18 = &LAB_00af55ad; local_1c = ExceptionList; - local_3c[6] = __security_cookie ^ (uint)(local_3c + 0xb); + local_3c[6] = __security_cookie ^ GHIDRA_UINT((local_3c + 0xb)); ExceptionList = &local_1c; controlledCount = (WeightedOutcomePicker)0x0; local_3c[4] = 0xc; @@ -10265,86 +10265,86 @@ void NpcHelper::siren_pick(Entity_NPC *npc) siren_familiar_counts((int *)&local_40,(int *)&local_44,&local_64._size); charmedCount = siren_charmed_count(local_54); controlledTotal = (WeightedOutcomePicker)0x0; - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&local_64,3,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&local_64,3,-1,-1,0,0); fVar4 = 0.0; outcomesBegin = controlledCount; outcomeCursor = (WeightedOutcomePicker)0x0; if ((float)local_64._size != 0.0) { do { - familiar = *(int *)((char *)local_64._data + (int)fVar4 * 4); + familiar = *(int *)((char *)local_64._data + GHIDRA_INT(fVar4) * 4); if ((familiar == 0) || (*(int *)(familiar + 0x28) != 3)) { familiar = 0; } if (((*(uint *)(familiar + 0x168) & 0x100) != 0) && (*(void **)(familiar + 0x410) == local_54->_sirenPlayerEntity)) { - controlledCount = (WeightedOutcomePicker)((int)controlledCount + 1); + controlledCount = (WeightedOutcomePicker)(GHIDRA_INT(controlledCount) + 1); } - fVar4 = (float)((int)fVar4 + 1); - } while ((uint)fVar4 < (uint)local_64._size); + fVar4 = (float)(GHIDRA_INT(fVar4) + 1); + } while (GHIDRA_UINT(fVar4) < GHIDRA_UINT(local_64._size)); outcomesBegin = picker; outcomeCursor = outcomesEnd; controlledTotal = controlledCount; } - if (local_64._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_64) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { heapCounter = &g_allocatedBytesNoHeap; } else { - heapCounter = (qword *)((int)g_mainHeap + 0x30); + heapCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (local_64._data != (void *)0x0) { uVar2 = *(uint *)((char *)local_64._data + -4); qVar1 = *heapCounter; - *(uint *)heapCounter = (uint)*heapCounter - uVar2; + *(uint *)heapCounter = GHIDRA_UINT(*heapCounter) - uVar2; *(uint *)((char *)heapCounter + 4) = - *(uint *)((char *)heapCounter + 4) - (uint)((uint)qVar1 < uVar2); - free((uint *)((int)local_64._data + -4)); + *(uint *)((char *)heapCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar2)); + free((uint *)(GHIDRA_INT(local_64._data) + -4)); } local_14 = local_14 & 0xffffff00; } - if ((*(char *)((int)&(local_54->_v2).x + 1) == '\0') && ((int)controlledTotal < 2)) { - fVar3 = (float)((int)controlledTotal * -0x21 + 100); + if ((*(char *)(GHIDRA_INT(&(local_54->_v2).x) + 1) == '\0') && (GHIDRA_INT(controlledTotal) < 2)) { + fVar3 = (float)(GHIDRA_INT(controlledTotal) * -0x21 + 100); fVar4 = 0.0; - if (0 < (int)fVar3) { + if (0 < GHIDRA_INT(fVar3)) { fVar4 = fVar3; } - if (0 < (int)fVar4) { + if (0 < GHIDRA_INT(fVar4)) { local_64._capacity = 1; - local_64._size = (int)fVar4; + local_64._size = GHIDRA_INT(fVar4); std::vector<8byte>::_Emplace_reallocate(0,&local_64._capacity); outcomesBegin = picker; outcomeCursor = outcomesEnd; } } - if (((*(char *)((int)&(local_54->_v2).x + 3) == '\0') && ((int)local_44 < 6)) && - (0 < (int)local_40)) { - fVar3 = (float)((int)local_40 * 0x21 + (int)local_44 * -0xf); + if (((*(char *)(GHIDRA_INT(&(local_54->_v2).x) + 3) == '\0') && (GHIDRA_INT(local_44) < 6)) && + (0 < GHIDRA_INT(local_40))) { + fVar3 = (float)(GHIDRA_INT(local_40) * 0x21 + GHIDRA_INT(local_44) * -0xf); fVar4 = 1.4013e-45; - if (1 < (int)fVar3) { + if (1 < GHIDRA_INT(fVar3)) { fVar4 = fVar3; } local_40 = 2.10195e-43; - if ((int)fVar4 < 0x96) { + if (GHIDRA_INT(fVar4) < 0x96) { local_40 = fVar4; } uVar2 = 0; - outcomeCount = (int)outcomeCursor - (int)outcomesBegin >> 3; + outcomeCount = GHIDRA_INT(outcomeCursor) - GHIDRA_INT(outcomesBegin) >> 3; if (outcomeCount != 0) { do { if (*(int *)((char *)outcomesBegin + uVar2 * 8) == 3) { - weight = (undefined4 *)((int)outcomesBegin + 4) + uVar2 * 2; - *weight = *weight + (int)local_40; + weight = (undefined4 *)(GHIDRA_INT(outcomesBegin) + 4) + uVar2 * 2; + *weight = *weight + GHIDRA_INT(local_40); if (*weight < 0) { - ((undefined4 *)((int)outcomesBegin + 4))[uVar2 * 2] = 0; + ((undefined4 *)(GHIDRA_INT(outcomesBegin) + 4))[uVar2 * 2] = 0; } goto LAB_0058e8af; } uVar2 = uVar2 + 1; } while (uVar2 < outcomeCount); } - if (0 < (int)local_40) { + if (0 < GHIDRA_INT(local_40)) { local_64._capacity = 3; - local_64._size = (int)local_40; + local_64._size = GHIDRA_INT(local_40); if (outcomeCursor == outcomesCapacity) { std::vector<8byte>::_Emplace_reallocate(outcomeCursor,&local_64._capacity); outcomesBegin = picker; @@ -10353,7 +10353,7 @@ void NpcHelper::siren_pick(Entity_NPC *npc) else { *(undefined4 *)outcomeCursor = 3; *(float *)((char *)outcomeCursor + 4) = local_40; - outcomesEnd = (WeightedOutcomePicker)((int)outcomeCursor + 8); + outcomesEnd = (WeightedOutcomePicker)(GHIDRA_INT(outcomeCursor) + 8); outcomeCursor = outcomesEnd; } } @@ -10365,27 +10365,27 @@ LAB_0058e8af: fVar4 = (float)(charmedCount * 0x21); } local_40 = 1.4013e-43; - if ((int)fVar4 < 100) { + if (GHIDRA_INT(fVar4) < 100) { local_40 = fVar4; } - outcomeCount = (int)outcomeCursor - (int)outcomesBegin >> 3; + outcomeCount = GHIDRA_INT(outcomeCursor) - GHIDRA_INT(outcomesBegin) >> 3; uVar2 = 0; if (outcomeCount != 0) { do { if (*(int *)((char *)outcomesBegin + uVar2 * 8) == 4) { - weight = (undefined4 *)((int)outcomesBegin + 4) + uVar2 * 2; - *weight = *weight + (int)local_40; + weight = (undefined4 *)(GHIDRA_INT(outcomesBegin) + 4) + uVar2 * 2; + *weight = *weight + GHIDRA_INT(local_40); if (*weight < 0) { - ((undefined4 *)((int)outcomesBegin + 4))[uVar2 * 2] = 0; + ((undefined4 *)(GHIDRA_INT(outcomesBegin) + 4))[uVar2 * 2] = 0; } goto LAB_0058e94b; } uVar2 = uVar2 + 1; } while (uVar2 < outcomeCount); } - if (0 < (int)local_40) { + if (0 < GHIDRA_INT(local_40)) { local_64._capacity = 4; - local_64._size = (int)local_40; + local_64._size = GHIDRA_INT(local_40); if (outcomeCursor == outcomesCapacity) { std::vector<8byte>::_Emplace_reallocate(outcomeCursor,&local_64._capacity); outcomesBegin = picker; @@ -10394,14 +10394,14 @@ LAB_0058e8af: else { *(undefined4 *)outcomeCursor = 4; *(float *)((char *)outcomeCursor + 4) = local_40; - outcomesEnd = (WeightedOutcomePicker)((int)outcomeCursor + 8); + outcomesEnd = (WeightedOutcomePicker)(GHIDRA_INT(outcomeCursor) + 8); outcomeCursor = outcomesEnd; } } } LAB_0058e94b: - if ((*(char *)((int)&(local_54->_v2).y + 1) == '\0') && (local_44 == 0.0)) { - local_64._size = (int)(local_54->_pos).y; + if ((*(char *)(GHIDRA_INT(&(local_54->_v2).y) + 1) == '\0') && (local_44 == 0.0)) { + local_64._size = GHIDRA_INT((local_54->_pos).y); room = g_game->_room; fVar4 = *(float *)((char *)room + 0x1c); fVar3 = *(float *)((char *)room + 0x20); @@ -10433,7 +10433,7 @@ LAB_0058e94b: if (roomCenterY == fVar3) { KAGE_LogMessage(0x10,(byte *)"Start and End parameters cannot be the same!"); } - outcomeCount = (int)outcomeCursor - (int)outcomesBegin >> 3; + outcomeCount = GHIDRA_INT(outcomeCursor) - GHIDRA_INT(outcomesBegin) >> 3; uVar2 = 0; fVar3 = ((float)local_64._size - roomCenterY) / (fVar3 - roomCenterY); if (fVar3 <= 0.0) { @@ -10442,23 +10442,23 @@ LAB_0058e94b: if (1.0 <= fVar3) { fVar3 = 1.0; } - fVar4 = (float)(int)((fVar3 + 0.0 + local_44 + 0.0 + fVar4 + 0.0) * 100.0); + fVar4 = (float)GHIDRA_INT(((fVar3 + 0.0 + local_44 + 0.0 + fVar4 + 0.0) * 100.0)); if (outcomeCount != 0) { do { if (*(int *)((char *)outcomesBegin + uVar2 * 8) == 5) { - weight = (undefined4 *)((int)outcomesBegin + 4) + uVar2 * 2; - *weight = *weight + (int)fVar4; + weight = (undefined4 *)(GHIDRA_INT(outcomesBegin) + 4) + uVar2 * 2; + *weight = *weight + GHIDRA_INT(fVar4); if (*weight < 0) { - ((undefined4 *)((int)outcomesBegin + 4))[uVar2 * 2] = 0; + ((undefined4 *)(GHIDRA_INT(outcomesBegin) + 4))[uVar2 * 2] = 0; } goto LAB_0058eb5f; } uVar2 = uVar2 + 1; } while (uVar2 < outcomeCount); } - if (0 < (int)fVar4) { + if (0 < GHIDRA_INT(fVar4)) { local_64._capacity = 5; - local_64._size = (int)fVar4; + local_64._size = GHIDRA_INT(fVar4); if (outcomeCursor == outcomesCapacity) { std::vector<8byte>::_Emplace_reallocate(outcomeCursor,&local_64._capacity); outcomesBegin = picker; @@ -10467,23 +10467,23 @@ LAB_0058e94b: else { *(undefined4 *)outcomeCursor = 5; *(float *)((char *)outcomeCursor + 4) = fVar4; - outcomesEnd = (WeightedOutcomePicker)((int)outcomeCursor + 8); + outcomesEnd = (WeightedOutcomePicker)(GHIDRA_INT(outcomeCursor) + 8); outcomeCursor = outcomesEnd; } } LAB_0058eb5f: if (outcomesBegin != outcomeCursor) goto LAB_0058ebbb; } - else if ((int)local_44 < 1) goto LAB_0058eb5f; + else if (GHIDRA_INT(local_44) < 1) goto LAB_0058eb5f; uVar2 = 0; - outcomeCount = (int)outcomeCursor - (int)outcomesBegin >> 3; + outcomeCount = GHIDRA_INT(outcomeCursor) - GHIDRA_INT(outcomesBegin) >> 3; if (outcomeCount != 0) { do { if (*(int *)((char *)outcomesBegin + uVar2 * 8) == 0) { - weight = (undefined4 *)((int)outcomesBegin + 4) + uVar2 * 2; + weight = (undefined4 *)(GHIDRA_INT(outcomesBegin) + 4) + uVar2 * 2; *weight = *weight + 100; if (*weight < 0) { - ((undefined4 *)((int)outcomesBegin + 4))[uVar2 * 2] = 0; + ((undefined4 *)(GHIDRA_INT(outcomesBegin) + 4))[uVar2 * 2] = 0; } goto LAB_0058ebbb; } @@ -10498,21 +10498,21 @@ LAB_0058eb5f: else { *(undefined4 *)outcomeCursor = 0; *(undefined4 *)((char *)outcomeCursor + 4) = 100; - outcomesEnd = (WeightedOutcomePicker)((int)outcomeCursor + 8); + outcomesEnd = (WeightedOutcomePicker)(GHIDRA_INT(outcomeCursor) + 8); } LAB_0058ebbb: - local_64._0_4_ = Random(); - local_64._0_4_ = local_64._0_4_ | 1; + (*(undefined4 *)((char *)&(local_64) + 0x0)) = Random(); + (*(undefined4 *)((char *)&(local_64) + 0x0)) = (*(undefined4 *)((char *)&(local_64) + 0x0)) | 1; local_64._data = (void *)0x5; local_64._capacity = 9; local_64._size = 7; rng._shift1 = 5; - rng._seed = local_64._0_4_; + rng._seed = (*(undefined4 *)((char *)&(local_64) + 0x0)); rng._shift2 = 9; rng._shift3 = 7; uVar2 = ((WeightedOutcomePicker *)(&picker))->WeightedOutcomePicker::PickOutcome(rng); if (uVar2 == 0) { - *(undefined2 *)((int)&local_54->_projectileCooldown + 2) = 0; + *(undefined2 *)(GHIDRA_INT(&local_54->_projectileCooldown) + 2) = 0; } else { charmedCount = local_3c[uVar2]; @@ -10520,12 +10520,12 @@ LAB_0058ebbb: local_54->_state = charmedCount; } if (picker != (WeightedOutcomePicker)0x0) { - uVar2 = (int)outcomesCapacity - (int)picker & 0xfffffff8; + uVar2 = GHIDRA_INT(outcomesCapacity) - GHIDRA_INT(picker) & 0xfffffff8; outcomesBegin = picker; if (0xfff < uVar2) { outcomesBegin = *(WeightedOutcomePicker *)((char *)picker + -4); uVar2 = uVar2 + 0x23; - if (0x1f < ((int)picker - (int)outcomesBegin) - 4U) { + if (0x1f < (GHIDRA_INT(picker) - GHIDRA_INT(outcomesBegin)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -10639,7 +10639,7 @@ void NpcHelper::beast_soul_render(Entity_NPC *npc, Vector *offset) float *screenPointsEnd; void *trailPointsEnd; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); if (8 < (npc->_vectorDeque2)._size) { iVar1 = *(int *)ThreadLocalStoragePointer; if ((*(int *)(iVar1 + 0xc) < DAT_00c7f838) && (_Init_thread_header(), DAT_00c7f838 == -1)) { @@ -10658,9 +10658,9 @@ void NpcHelper::beast_soul_render(Entity_NPC *npc, Vector *offset) screenPointsEnd = DAT_00c7f840; fStack_54 = (float)(npc->_vectorDeque2)._offset; local_40 = g_displayPixelRatio * g_screenPointScale; - dequeIndex = (int)fStack_54 + uVar2 & 1; - iVar1 = *(int *)((int)(npc->_vectorDeque2)._map + - ((npc->_vectorDeque2)._mapSize - 1 & (int)fStack_54 + uVar2 >> 1) * 4); + dequeIndex = GHIDRA_INT(fStack_54) + uVar2 & 1; + iVar1 = *(int *)(GHIDRA_INT((npc->_vectorDeque2)._map) + + ((npc->_vectorDeque2)._mapSize - 1 & GHIDRA_INT(fStack_54) + uVar2 >> 1) * 4); fStack_48 = *(float *)(iVar1 + dequeIndex * 8); fStack_44 = *(float *)(iVar1 + 4 + dequeIndex * 8); local_3c = ((g_screenWidth - 338.0) * 0.5 + (fStack_48 - 60.0) * 0.65) * local_40 + 0.5; @@ -10688,7 +10688,7 @@ void NpcHelper::beast_soul_render(Entity_NPC *npc, Vector *offset) uVar2 = (npc->_vectorDeque2)._offset + 2; local_40 = 0.0; fStack_44 = 0.0; - fStack_48 = *(float *)(*(int *)((int)(npc->_vectorDeque2)._map + + fStack_48 = *(float *)(*(int *)(GHIDRA_INT((npc->_vectorDeque2)._map) + (uVar2 >> 1 & (npc->_vectorDeque2)._mapSize - 1) * 4) + (uVar2 & 1) * 8); if (g_beastTrailPointsEnd == DAT_00c7f854) { @@ -10699,15 +10699,15 @@ void NpcHelper::beast_soul_render(Entity_NPC *npc, Vector *offset) *(float *)((char *)trailPointsEnd + 4) = fStack_4c; *(float *)((char *)trailPointsEnd + 8) = fStack_48; *(undefined4 *)((char *)trailPointsEnd + 0xc) = 0; - g_beastTrailPointsEnd = (void *)((int)g_beastTrailPointsEnd + 0x10); + g_beastTrailPointsEnd = (void *)(GHIDRA_INT(g_beastTrailPointsEnd) + 0x10); } fVar3 = 0.0; uVar2 = 1; - if (1 < ((int)DAT_00c7f840 - (int)DAT_00c7f83c >> 3) - 1U) { + if (1 < (GHIDRA_INT(DAT_00c7f840) - GHIDRA_INT(DAT_00c7f83c) >> 3) - 1U) { local_3c = 4.2039e-45; do { trailPointsEnd = g_beastTrailPointsEnd; - dequeIndex = (int)local_3c + (npc->_vectorDeque2)._offset + 2; + dequeIndex = GHIDRA_INT(local_3c) + (npc->_vectorDeque2)._offset + 2; fStack_54 = 0.0; smoothedPointX = DAT_00c7f83c[uVar2 * 2 + -2] * 0.3 + DAT_00c7f83c[uVar2 * 2] * 0.4 + @@ -10715,7 +10715,7 @@ void NpcHelper::beast_soul_render(Entity_NPC *npc, Vector *offset) fStack_5c = DAT_00c7f83c[uVar2 * 2 + -1] * 0.3 + DAT_00c7f83c[uVar2 * 2 + 1] * 0.4 + DAT_00c7f83c[uVar2 * 2 + 3] * 0.3; uStack_58 = *(undefined4 *) - (*(int *)((int)(npc->_vectorDeque2)._map + + (*(int *)(GHIDRA_INT((npc->_vectorDeque2)._map) + ((npc->_vectorDeque2)._mapSize - 1 & dequeIndex >> 1) * 4) + (dequeIndex & 1) * 8); if (g_beastTrailPointsEnd == DAT_00c7f854) { @@ -10726,10 +10726,10 @@ void NpcHelper::beast_soul_render(Entity_NPC *npc, Vector *offset) *(float *)((char *)trailPointsEnd + 4) = fStack_5c; *(undefined4 *)((char *)trailPointsEnd + 8) = uStack_58; *(undefined4 *)((char *)trailPointsEnd + 0xc) = 0; - g_beastTrailPointsEnd = (void *)((int)g_beastTrailPointsEnd + 0x10); + g_beastTrailPointsEnd = (void *)(GHIDRA_INT(g_beastTrailPointsEnd) + 0x10); } trailPointsEnd = g_beastTrailPointsEnd; - iVar1 = (int)g_beastTrailPointsEnd - (int)g_beastTrailPoints >> 4; + iVar1 = GHIDRA_INT(g_beastTrailPointsEnd) - GHIDRA_INT(g_beastTrailPoints) >> 4; fVar3 = *(float *)((char *)g_beastTrailPoints + (iVar1 + -2) * 0x10 + 4) - *(float *)((char *)g_beastTrailPoints + iVar1 * 0x10 + -0xc); fVar4 = *(float *)((char *)g_beastTrailPoints + (iVar1 + -2) * 0x10) - @@ -10737,10 +10737,10 @@ void NpcHelper::beast_soul_render(Entity_NPC *npc, Vector *offset) fVar3 = sqrtf(fVar3 * fVar3 + fVar4 * fVar4); fVar3 = fVar3 + local_40; uVar2 = uVar2 + 1; - local_3c = (float)((int)local_3c + 3); + local_3c = (float)(GHIDRA_INT(local_3c) + 3); *(float *)((char *)trailPointsEnd + -4) = fVar3; local_40 = fVar3; - } while (uVar2 < ((int)DAT_00c7f840 - (int)DAT_00c7f83c >> 3) - 1U); + } while (uVar2 < (GHIDRA_INT(DAT_00c7f840) - GHIDRA_INT(DAT_00c7f83c) >> 3) - 1U); } local_3c = 1.0; if ((128.0 < fVar3) && (local_3c = 128.0 / fVar3, local_3c <= 0.5)) { @@ -10749,12 +10749,12 @@ void NpcHelper::beast_soul_render(Entity_NPC *npc, Vector *offset) DAT_00c78ef0 = &npc->_sprite; uVar2 = 0; DAT_00c78ef4 = 0; - DAT_00c78ef8._0_2_ = 0; + (*(undefined2 *)((char *)&(DAT_00c78ef8) + 0x0)) = 0; g_beamRendererPointsEnd = g_beamRendererPoints; - if ((int)g_beastTrailPointsEnd - (int)g_beastTrailPoints >> 4 != 0) { + if (GHIDRA_INT(g_beastTrailPointsEnd) - GHIDRA_INT(g_beastTrailPoints) >> 4 != 0) { iVar1 = 0; do { - point = (Vector *)(iVar1 + (int)g_beastTrailPoints); + point = (Vector *)(iVar1 + GHIDRA_INT(g_beastTrailPoints)); pointColor._offset[0] = 0.0; pointColor._offset[1] = 0.0; pointColor._offset[2] = 0.0; @@ -10769,7 +10769,7 @@ void NpcHelper::beast_soul_render(Entity_NPC *npc, Vector *offset) BeamRenderer::Add(point,&pointColor,local_3c,local_3c * point[1].y); iVar1 = iVar1 + 0x10; uVar2 = uVar2 + 1; - } while (uVar2 < (uint)((int)g_beastTrailPointsEnd - (int)g_beastTrailPoints >> 4)); + } while (uVar2 < GHIDRA_UINT((GHIDRA_INT(g_beastTrailPointsEnd) - GHIDRA_INT(g_beastTrailPoints) >> 4))); } BeamRenderer::End(); } @@ -10827,7 +10827,7 @@ void NpcHelper::tuff_twins_play_anim(Entity_NPC *npc, byte *animName, int unused local_8 = (byte ***)0xffffffff; puStack_c = &LAB_00af32ed; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(fullAnim + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((fullAnim + 10)); ExceptionList = &local_10; fullAnimSize = 0; fullAnimCapacity = 0xf; @@ -10837,7 +10837,7 @@ void NpcHelper::tuff_twins_play_anim(Entity_NPC *npc, byte *animName, int unused bVar1 = *pbVar3; pbVar3 = pbVar3 + 1; } while (bVar1 != 0); - ((std::string *)((char *)fullAnim))->std::string::assign(animName,(int)pbVar3 - (int)(animName + 1)); + ((std::string *)((char *)fullAnim))->std::string::assign(animName,GHIDRA_INT(pbVar3) - GHIDRA_INT((animName + 1))); oldCapacity = fullAnimCapacity; oldSize = fullAnimSize; local_8 = (byte ***)0x0; @@ -10847,7 +10847,7 @@ void NpcHelper::tuff_twins_play_anim(Entity_NPC *npc, byte *animName, int unused if (0xf < fullAnimCapacity) { ppppbVar2 = fullAnim[0]; } - pbVar3 = (byte *)((int)ppppbVar2 + fullAnimSize); + pbVar3 = (byte *)(GHIDRA_INT(ppppbVar2) + fullAnimSize); fullAnimSize = fullAnimSize + 1; pbVar3[0] = 0x42; pbVar3[1] = 0; @@ -10875,7 +10875,7 @@ void NpcHelper::tuff_twins_play_anim(Entity_NPC *npc, byte *animName, int unused newBuffer = std::_Allocate(uVar4 + 1); ppppbVar2 = fullAnim[0]; fullAnimSize = oldSize + 1; - pbVar3 = (byte *)((int)newBuffer + oldSize + 1); + pbVar3 = (byte *)(GHIDRA_INT(newBuffer) + oldSize + 1); fullAnimCapacity = uVar4; if (oldCapacity < 0x10) { memcpy(newBuffer,fullAnim,oldSize); @@ -10891,7 +10891,7 @@ void NpcHelper::tuff_twins_play_anim(Entity_NPC *npc, byte *animName, int unused if (0xfff < uVar4) { ptr = (byte ****)ppppbVar2[-1]; uVar4 = oldCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)ppppbVar2 + (-4 - (int)ptr))) goto LAB_00599b4a; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(ppppbVar2) + (-4 - GHIDRA_INT(ptr)))) goto LAB_00599b4a; } operator_delete(ptr,uVar4); } @@ -10909,7 +10909,7 @@ void NpcHelper::tuff_twins_play_anim(Entity_NPC *npc, byte *animName, int unused if (0xfff < oldSize) { ppppbVar2 = (byte ****)fullAnim[0][-1]; oldSize = fullAnimCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)fullAnim[0] + (-4 - (int)ppppbVar2))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(fullAnim[0]) + (-4 - GHIDRA_INT(ppppbVar2)))) { LAB_00599b4a: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -10949,7 +10949,7 @@ void NpcHelper::tuff_twins_body_attack_anim(Entity_NPC *npc) void *animData; byte ****attackAnim; - local_14 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_14 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; local_2c = (byte *****)0xb624dc; local_28 = "Body1AttackVert"; local_24 = "Body2AttackHori"; @@ -10959,7 +10959,7 @@ void NpcHelper::tuff_twins_body_attack_anim(Entity_NPC *npc) dx = *(float *)((char *)npc->_parent + 0x33c) - (npc->_pos).x; dy = *(float *)((char *)npc->_parent + 0x340) - (npc->_pos).y; if (ABS(dx) <= ABS(dy)) { - uVar3 = (uint)(0.0 <= dy) * 2 + 1; + uVar3 = GHIDRA_UINT((0.0 <= dy)) * 2 + 1; } else { uVar3 = 2; @@ -10967,7 +10967,7 @@ void NpcHelper::tuff_twins_body_attack_anim(Entity_NPC *npc) uVar3 = 0; } } - attackAnim = (byte ****)(&local_2c)[(uVar3 & 1) + ((uint)npc->_initSeed % 3) * 2]; + attackAnim = (byte ****)(&local_2c)[(uVar3 & 1) + (GHIDRA_UINT(npc->_initSeed) % 3) * 2]; (npc->_sprite)._flipX = uVar3 == 0; animData = (npc->_sprite)._animState._animData; if (animData == (void *)0x0) { @@ -10982,26 +10982,26 @@ void NpcHelper::tuff_twins_body_attack_anim(Entity_NPC *npc) attackAnimEnd = attackAnim; do { bVar1 = *(byte *)attackAnimEnd; - attackAnimEnd = (byte ****)((int)attackAnimEnd + 1); + attackAnimEnd = (byte ****)(GHIDRA_INT(attackAnimEnd) + 1); } while (bVar1 != 0); pppppbVar4 = (byte *****)&local_2c; if ((char *)0xf < local_18) { pppppbVar4 = local_2c; } - bVar1 = str_eq((byte *)pppppbVar4,(uint)local_1c,(byte *)attackAnim, - (int)attackAnimEnd - (int)((int)attackAnim + 1)); + bVar1 = str_eq((byte *)pppppbVar4,GHIDRA_UINT(local_1c),(byte *)attackAnim, + GHIDRA_INT(attackAnimEnd) - GHIDRA_INT((GHIDRA_INT(attackAnim) + 1))); if ((char *)0xf < local_18) { pcVar5 = local_18 + 1; pppppbVar4 = pppppbVar2; if ((char *)0xfff < pcVar5) { pppppbVar4 = (byte *****)pppppbVar2[-1]; pcVar5 = local_18 + 0x24; - if ((byte *)0x1f < (byte *)((int)pppppbVar2 + (-4 - (int)pppppbVar4))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(pppppbVar2) + (-4 - GHIDRA_INT(pppppbVar4)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(pppppbVar4,(uint)pcVar5); + operator_delete(pppppbVar4,GHIDRA_UINT(pcVar5)); } if (bVar1 == 0) { animData = (npc->_sprite)._animState._animData; @@ -11025,12 +11025,12 @@ void NpcHelper::tuff_twins_body_attack_anim(Entity_NPC *npc) if ((char *)0xfff < pcVar5) { pppppbVar2 = (byte *****)local_2c[-1]; pcVar5 = local_18 + 0x24; - if ((byte *)0x1f < (byte *)((int)local_2c + (-4 - (int)pppppbVar2))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(local_2c) + (-4 - GHIDRA_INT(pppppbVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(pppppbVar2,(uint)pcVar5); + operator_delete(pppppbVar2,GHIDRA_UINT(pcVar5)); unused = extraout_ECX_00; } if (prefixCmp == 0) { @@ -11039,7 +11039,7 @@ void NpcHelper::tuff_twins_body_attack_anim(Entity_NPC *npc) } else { dVar6 = floor((double)(npc->_sprite)._animState._animFrame); - savedFrame = (int)dVar6; + savedFrame = GHIDRA_INT(dVar6); unused = extraout_ECX_01; } tuff_twins_play_anim(npc,(byte *)attackAnim,unused); @@ -11074,7 +11074,7 @@ void NpcHelper::UltraGreed_Heal(Entity_NPC *npc, int amount) float local_c; undefined4 local_8; - local_8 = __security_cookie ^ (int)register0x00000010 - 4U; + local_8 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; npc->_i2 = npc->_i2 + amount; healStacks = npc->_i2; if (0x19 < healStacks) { @@ -11126,7 +11126,7 @@ Entity_NPC * NpcHelper::UltraDoor_Opposite(Entity_NPC *door, EntityList_EL doors puStack_c = &LAB_00af57bd; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(oppositeSlots + 0xc); + uVar1 = __security_cookie ^ GHIDRA_UINT((oppositeSlots + 0xc)); ExceptionList = &local_10; local_8 = 0; oppositeSlots[8] = uVar1; @@ -11140,7 +11140,7 @@ Entity_NPC * NpcHelper::UltraDoor_Opposite(Entity_NPC *door, EntityList_EL doors oppositeSlots[5] = 7; oppositeSlots[6] = 4; oppositeSlots[7] = 5; - if ((uint)door->_i1 < 8) { + if (GHIDRA_UINT(door->_i1) < 8) { oppositeSlot = oppositeSlots[door->_i1]; } entityIdx = 0; @@ -11154,25 +11154,25 @@ Entity_NPC * NpcHelper::UltraDoor_Opposite(Entity_NPC *door, EntityList_EL doors if ((oppositeDoor != (Entity_NPC *)0x0) && (oppositeDoor->_i1 == oppositeSlot)) goto LAB_0059e6d2; entityIdx = entityIdx + 1; - } while (entityIdx < (uint)doors._size); + } while (entityIdx < GHIDRA_UINT(doors._size)); } } oppositeDoor = (Entity_NPC *)0x0; LAB_0059e6d2: - if (doors._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(doors) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { heapAllocatedBytes = &g_allocatedBytesNoHeap; } else { - heapAllocatedBytes = (qword *)((int)g_mainHeap + 0x30); + heapAllocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (doors._data != (void *)0x0) { uVar1 = *(uint *)((char *)doors._data + -4); oldAllocatedBytes = *heapAllocatedBytes; - *(uint *)heapAllocatedBytes = (uint)*heapAllocatedBytes - uVar1; + *(uint *)heapAllocatedBytes = GHIDRA_UINT(*heapAllocatedBytes) - uVar1; *(uint *)((char *)heapAllocatedBytes + 4) = - *(uint *)((char *)heapAllocatedBytes + 4) - (uint)((uint)oldAllocatedBytes < uVar1); - free((void *)((int)doors._data + -4)); + *(uint *)((char *)heapAllocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocatedBytes) < uVar1)); + free((void *)(GHIDRA_INT(doors._data) + -4)); } } ExceptionList = local_10; @@ -11220,29 +11220,29 @@ void NpcHelper::UltraGreed_Smash(Entity_NPC *npc, Vector position) local_14 = -NAN; puStack_18 = &LAB_00af580b; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)((&explosionColor)[1]._colorize + 1); + local_24 = __security_cookie ^ GHIDRA_UINT(((&explosionColor)[1]._colorize + 1)); ExceptionList = &local_1c; boss = npc; ((Entity_NPC *)(npc))->Entity_NPC::CreateGoldParticles(0x1e); manager = g_manager; local_80 = 1.93379e-43; seed_fart_sound_override((int *)&local_80); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_80,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_80),1.0,2,0,1.0,0.0); uVar3 = Random(); manager = g_manager; local_80 = 6.72623e-44; pEStack_84 = (Entity_NPC *) - ((float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 0.9); seed_fart_sound_override((int *)&local_80); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_80,1.0,2,0,(float)pEStack_84,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_80),1.0,2,0,(float)pEStack_84,0.0); game = g_game; pEStack_84 = (Entity_NPC *)position.x; room = g_game->_room; local_80 = position.y; *(int *)((char *)room + 0x70fc) = *(int *)((char *)room + 0x70fc) + 1; uVar3 = *(uint *)((char *)room + 0x70fc) & 0x80000001; - if ((int)uVar3 < 0) { + if (GHIDRA_INT(uVar3) < 0) { uVar3 = (uVar3 - 1 | 0xfffffffe) + 1; } if (1 < uVar3) { @@ -11283,7 +11283,7 @@ void NpcHelper::UltraGreed_Smash(Entity_NPC *npc, Vector position) particleColor._offset[1] = 0.0; particleColor._offset[2] = 0.0; Game::SpawnParticles(g_game,&position,0x5f,0xf,5.0,&particleColor,100000.0,0); - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&ultraDoors,0x126,-1,-1,1,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&ultraDoors,0x126,-1,-1,1,0); local_14 = 0.0; if ((randomDoor->_state == 700) || (randomDoor->_state == 0x10)) { picker = (WeightedOutcomePicker)0x0; @@ -11292,13 +11292,13 @@ void NpcHelper::UltraGreed_Smash(Entity_NPC *npc, Vector position) local_14 = 1.4013e-45; uStack_8c = uStack_8c & 0xffffffff; pEStack_84 = (Entity_NPC *)0x64; - std::vector<8byte>::_Emplace_reallocate(0,(int)&uStack_8c + 4); + std::vector<8byte>::_Emplace_reallocate(0,GHIDRA_INT(&uStack_8c) + 4); uVar3 = 0; - outcomeCount = (int)pickerEnd - (int)picker >> 3; + outcomeCount = GHIDRA_INT(pickerEnd) - GHIDRA_INT(picker) >> 3; if (outcomeCount != 0) { do { if (*(int *)((char *)picker + uVar3 * 8) == 1) { - outcomeWeight = (int *)((int)picker + 4 + uVar3 * 8); + outcomeWeight = (int *)(GHIDRA_INT(picker) + 4 + uVar3 * 8); *outcomeWeight = *outcomeWeight + 0x46; if (*outcomeWeight < 0) { *(undefined4 *)((char *)picker + 4 + uVar3 * 8) = 0; @@ -11311,7 +11311,7 @@ void NpcHelper::UltraGreed_Smash(Entity_NPC *npc, Vector position) uStack_8c = CONCAT44(1,(undefined4)uStack_8c); pEStack_84 = (Entity_NPC *)0x46; if (pickerEnd == pickerCapacity) { - std::vector<8byte>::_Emplace_reallocate(pickerEnd,(int)&uStack_8c + 4); + std::vector<8byte>::_Emplace_reallocate(pickerEnd,GHIDRA_INT(&uStack_8c) + 4); } else { *pickerEnd = 1; @@ -11332,19 +11332,19 @@ LAB_0059eaaa: ((Game *)(g_game))->Game::ShakeScreen(0xd); if ((float)ultraDoors._size != 0.0) { uVar3 = Random(); - local_80 = (float)(uVar3 % (uint)ultraDoors._size + 1); - if (0 < (int)local_80) { + local_80 = (float)(uVar3 % GHIDRA_UINT(ultraDoors._size) + 1); + if (0 < GHIDRA_INT(local_80)) { do { uVar3 = Random(); uVar4 = 0; randomDoor = (Entity_NPC *) __RTDynamicCast(*(undefined4 *) - ((int)ultraDoors._data + - (uVar3 % (uint)ultraDoors._size) * 4),0, + (GHIDRA_INT(ultraDoors._data) + + (uVar3 % GHIDRA_UINT(ultraDoors._size)) * 4),0, &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_NPC::RTTI_Type_Descriptor,0); - doors_00._1_3_ = (int3)((uint)uVar4 >> 8); - doors_00._0_1_ = 1; + (*(undefined1 *)((char *)&(doors_00) + 0x1)) = (int3)(GHIDRA_UINT(uVar4) >> 8); + (*(undefined1 *)((char *)&(doors_00) + 0x0)) = 1; doors_00._data = ultraDoors._data; doors_00._capacity = ultraDoors._capacity; doors_00._size = ultraDoors._size; @@ -11355,7 +11355,7 @@ LAB_0059eaaa: if ((oppositeDoor != (Entity_NPC *)0x0) && (oppositeDoor->_state == 3)) { oppositeDoor->_state = 9; } - local_80 = (float)((int)local_80 + -1); + local_80 = (float)(GHIDRA_INT(local_80) + -1); } while (local_80 != 0.0); } } @@ -11368,15 +11368,15 @@ LAB_0059eaaa: } else { uVar3 = Random(); - uVar3 = uVar3 % (uint)ultraDoors._size; + uVar3 = uVar3 % GHIDRA_UINT(ultraDoors._size); } uVar4 = 0; randomDoor = (Entity_NPC *) __RTDynamicCast(*(undefined4 *)((char *)ultraDoors._data + uVar3 * 4),0, &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_NPC::RTTI_Type_Descriptor,0); - doors._1_3_ = (int3)((uint)uVar4 >> 8); - doors._0_1_ = 1; + (*(undefined1 *)((char *)&(doors) + 0x1)) = (int3)(GHIDRA_UINT(uVar4) >> 8); + (*(undefined1 *)((char *)&(doors) + 0x0)) = 1; doors._data = ultraDoors._data; doors._capacity = ultraDoors._capacity; doors._size = ultraDoors._size; @@ -11387,18 +11387,18 @@ LAB_0059eaaa: if ((oppositeDoor != (Entity_NPC *)0x0) && (oppositeDoor->_state == 3)) { oppositeDoor->_state = 9; } - local_80 = (float)((int)local_80 - 1); + local_80 = (float)(GHIDRA_INT(local_80) - 1); } while (local_80 != 0.0); local_80 = 0.0; } - local_14 = (float)((uint)local_14 & 0xffffff00); + local_14 = (float)(GHIDRA_UINT(local_14) & 0xffffff00); if (picker != (WeightedOutcomePicker)0x0) { - uVar3 = ((int)pickerCapacity - (int)picker >> 3) * 8; + uVar3 = (GHIDRA_INT(pickerCapacity) - GHIDRA_INT(picker) >> 3) * 8; ptr = picker; if (0xfff < uVar3) { ptr = *(WeightedOutcomePicker *)((char *)picker + -4); uVar3 = uVar3 + 0x23; - if (0x1f < ((int)picker - (int)ptr) - 4U) { + if (0x1f < (GHIDRA_INT(picker) - GHIDRA_INT(ptr)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -11411,11 +11411,11 @@ LAB_0059eaaa: uVar4 = 0; randomDoor = (Entity_NPC *) __RTDynamicCast(*(undefined4 *) - ((int)ultraDoors._data + (uVar3 % (uint)ultraDoors._size) * 4),0, + (GHIDRA_INT(ultraDoors._data) + (uVar3 % GHIDRA_UINT(ultraDoors._size)) * 4),0, &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_NPC::RTTI_Type_Descriptor,0); - doors_01._1_3_ = (int3)((uint)uVar4 >> 8); - doors_01._0_1_ = 1; + (*(undefined1 *)((char *)&(doors_01) + 0x1)) = (int3)(GHIDRA_UINT(uVar4) >> 8); + (*(undefined1 *)((char *)&(doors_01) + 0x0)) = 1; doors_01._data = ultraDoors._data; doors_01._capacity = ultraDoors._capacity; doors_01._size = ultraDoors._size; @@ -11430,20 +11430,20 @@ LAB_0059eaaa: oppositeDoor->_stateFrame = 0; } } - if (ultraDoors._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(ultraDoors) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (ultraDoors._data != (void *)0x0) { uVar3 = *(uint *)((char *)ultraDoors._data + -4); qVar2 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar3; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar3; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar2 < uVar3); - free((void *)((int)ultraDoors._data + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < uVar3)); + free((void *)(GHIDRA_INT(ultraDoors._data) + -4)); } } ExceptionList = local_1c; @@ -11482,22 +11482,22 @@ void NpcHelper::visage_spawn_particles(Vector *position, Vector *direction) { rngResult = Random(); rngValue = Random(); - sideDirX = (float)((double)(int)rngValue + __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + sideDirX = (float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10; sideDirY = direction->x; fVar5 = direction->y; rngValue = Random(); - fVar6 = (float)((double)(int)rngValue + __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + fVar6 = (float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10; fVar6 = (fVar6 + fVar6) - 1.0; local_18.y = sideDirX * fVar5 * 5.0 + fVar6 * (dirY * cosQuarterTurn + dirX * sinQuarterTurn); local_18.x = sideDirX * sideDirY * 5.0 + fVar6 * (dirX * cosQuarterTurn - dirY * sinQuarterTurn); rngValue = Random(); - sideDirY = (float)((double)(int)rngValue + __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + sideDirY = (float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 3.14; sideDirY = sideDirY + sideDirY; rngValue = Random(); - fVar5 = (float)((double)(int)rngValue + __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + fVar5 = (float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10; sideDirX = cos(sideDirY); spawnPos.x = sideDirX * fVar5 * 20.0 + position->x; @@ -11511,7 +11511,7 @@ void NpcHelper::visage_spawn_particles(Vector *position, Vector *direction) sideDirX = direction->x; sideDirY = direction->y; rngResult = Random(); - if (((float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + if (((float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 10.0 + 2.0) * (float)((sideDirY - sideDirX) * sideDirX + (fVar5 - fVar6) * sideDirY < 0.0) == 0.0) { spinSign = (undefined1 *)0x3f800000; @@ -11571,15 +11571,15 @@ void NpcHelper::visage_spawn_chain(Entity_NPC *npc) *(undefined4 *)((char *)EVar1 + 0x16c) = *(undefined4 *)((char *)EVar1 + 0x16c); local_28 = EVar1; if (*(EntityPtr *)((char *)EVar1 + 0x3bc) != (EntityPtr)0x0) { - local_24 = (EntityPtr)((int)EVar1 + 0x3bc); + local_24 = (EntityPtr)(GHIDRA_INT(EVar1) + 0x3bc); std::multiset::erase(&local_24); } *(EntityPtr *)((char *)EVar1 + 0x3bc) = (EntityPtr)npc; if ((EntityPtr)npc != (EntityPtr)0x0) { - std::multiset::insert((EntityPtr *)((int)EVar1 + 0x3bc)); + std::multiset::insert((EntityPtr *)(GHIDRA_INT(EVar1) + 0x3bc)); } if (*(int *)((char *)npc + 0x2c) == 10) { - EVar2 = (EntityPtr)((int)npc + 0x3c0); + EVar2 = (EntityPtr)(GHIDRA_INT(npc) + 0x3c0); if (*(int *)((char *)npc + 0x3c0) != 0) { local_24 = EVar2; std::multiset::erase(&local_24); @@ -11597,7 +11597,7 @@ void NpcHelper::visage_spawn_chain(Entity_NPC *npc) } linkIndex = linkIndex + 1; npc = (Entity_NPC *)EVar1; - } while ((int)linkIndex < 0x28); + } while (GHIDRA_INT(linkIndex) < 0x28); local_24 = linksEnd[-1]; pEVar3 = &visage->_entityRef; if (*pEVar3 != (EntityPtr)0x0) { @@ -11608,7 +11608,7 @@ void NpcHelper::visage_spawn_chain(Entity_NPC *npc) if (local_24 != (EntityPtr)0x0) { std::multiset::insert(pEVar3); } - EVar1 = (EntityPtr)((int)EVar1 + 0x3c0); + EVar1 = (EntityPtr)(GHIDRA_INT(EVar1) + 0x3c0); EVar2 = visage->_child; if (*(int *)EVar1 != 0) { local_28 = EVar1; @@ -11672,7 +11672,7 @@ float NpcHelper::visage_score_position(Entity_NPC *npc, Vector *position) fVar3 = sqrtf(fVar3 * fVar3 + fVar5 * fVar5); return 0.0 - ABS(fVar3 - 120.0); } - if ((uint)npc->_state < 0x71) { + if (GHIDRA_UINT(npc->_state) < 0x71) { local_1c = *(float *)((char *)EVar1 + 0x340) - position->y; local_18 = *(float *)((char *)EVar1 + 0x33c) - position->targetDistSq; fVar5 = local_1c * local_1c + local_18 * local_18; @@ -11739,11 +11739,11 @@ void NpcHelper::visage_pick_target_position(Entity_NPC *npc) triesLeft = 0x14; do { rngResult = Random(); - fVar1 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + fVar1 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14; fVar1 = fVar1 + fVar1; rngResult = Random(); - fVar2 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + fVar2 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 100.0; candidateX = cos(fVar1); candidateX = candidateX * fVar2 + (npc->_pos).x; @@ -11795,10 +11795,10 @@ void NpcHelper::visage_start_charge(Entity_NPC *npc) Manager *manager; if (npc->_state == 0x6d) { - flagsHigh = *(undefined4 *)((int)&npc->_flags + 4); - *(uint *)&npc->_flags = (uint)npc->_flags & 0xffffffee; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&npc->_flags) + 4); + *(uint *)&npc->_flags = GHIDRA_UINT(npc->_flags) & 0xffffffee; iVar4 = *(int *)npc; - *(undefined4 *)((int)&npc->_flags + 4) = flagsHigh; + *(undefined4 *)(GHIDRA_INT(&npc->_flags) + 4) = flagsHigh; npc->_health = npc->_maxHitPoints; npc->_isInvicible = 0; (**(code **)(iVar4 + 0x40))(*(undefined4 *)((char *)npc->_config + 0x28)); @@ -11813,7 +11813,7 @@ void NpcHelper::visage_start_charge(Entity_NPC *npc) } VStack_10.x = 1.61149e-43; seed_fart_sound_override((int *)&VStack_10); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)VStack_10.x,1.0,2,0,local_18.x,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(VStack_10.x),1.0,2,0,local_18.x,0.0); pVVar2 = Isaac::GetAxisAlignedUnitVectorFromDir(&VStack_10,npc->_i1); (npc->_targetPosition).x = pVVar2->x; (npc->_targetPosition).y = pVVar2->y; @@ -11830,7 +11830,7 @@ void NpcHelper::visage_start_charge(Entity_NPC *npc) isLess = bVar1 < *newAnimChar; if (bVar1 != *newAnimChar) { LAB_005ab300: - animCompare = -(uint)isLess | 1; + animCompare = -GHIDRA_UINT(isLess) | 1; goto LAB_005ab305; } if (bVar1 == 0) break; @@ -11918,7 +11918,7 @@ void NpcHelper::visage_chain_solve(Entity_NPC *npc, byte isInterpolate) EVar6 = (EntityPtr)0x0; } if (EVar5 != (EntityPtr)0x0) { - headPos = (float *)((int)EVar5 + 0x33c); + headPos = (float *)(GHIDRA_INT(EVar5) + 0x33c); headX = *headPos; state = &npc->_state; headY = *(float *)((char *)EVar5 + 0x340); @@ -11930,9 +11930,9 @@ void NpcHelper::visage_chain_solve(Entity_NPC *npc, byte isInterpolate) anchorX = normalized->x; anchorY = (((Entity_NPC *)EVar6)->_pos).y; if (isInterpolate != 0) { - iVar1 = (uint)(*(char *)((char *)EVar5 + 0x175) != '\0') * 8; - headX = *(float *)((char *)EVar5 + 0x360) * 0.5 + *(float *)(iVar1 + 0x33c + (int)EVar5); - headY = *(float *)((char *)EVar5 + 0x364) * 0.5 + *(float *)(iVar1 + 0x340 + (int)EVar5); + iVar1 = GHIDRA_UINT((*(char *)((char *)EVar5 + 0x175) != '\0')) * 8; + headX = *(float *)((char *)EVar5 + 0x360) * 0.5 + *(float *)(iVar1 + 0x33c + GHIDRA_INT(EVar5)); + headY = *(float *)((char *)EVar5 + 0x364) * 0.5 + *(float *)(iVar1 + 0x340 + GHIDRA_INT(EVar5)); if (((Entity_NPC *)EVar6)->_isInterpolating != 0) { anchorX = (((Entity_NPC *)EVar6)->_preInterpolatePos).x; normalized = &((Entity_NPC *)EVar6)->_preInterpolatePos; @@ -11955,7 +11955,7 @@ void NpcHelper::visage_chain_solve(Entity_NPC *npc, byte isInterpolate) } else { headX = *(float *)((char *)EVar5 + 0x344); - pfVar4 = (float *)((int)EVar5 + 0x344); + pfVar4 = (float *)(GHIDRA_INT(EVar5) + 0x344); } headX = *(float *)((char *)EVar5 + 0x360) * 0.5 + headX; headY = *(float *)((char *)EVar5 + 0x364) * 0.5 + pfVar4[1]; @@ -11990,9 +11990,9 @@ void NpcHelper::visage_chain_solve(Entity_NPC *npc, byte isInterpolate) if ((*state == 3) || (((EVar2 = *(EntityPtr *)((char *)npc + 0x3c0), EVar2 != (EntityPtr)0x0 && (*(int *)((char *)EVar2 + 0x28) == 0x387)) && (*(int *)((char *)EVar2 + 0x2c) == 10)))) { - ((Vector *)((int)npc + 0x33c))->x = (anchorX + local_2c.y) * 0.5; + ((Vector *)(GHIDRA_INT(npc) + 0x33c))->x = (anchorX + local_2c.y) * 0.5; *(float *)((char *)npc + 0x340) = (anchorY + fVar7) * 0.5; - ((Vector *)((int)npc + 0x360))->x = g_vectorZero.x; + ((Vector *)(GHIDRA_INT(npc) + 0x360))->x = g_vectorZero.x; *(float *)((char *)npc + 0x364) = g_vectorZero.y; } *(float *)((char *)npc + 0x350) = -35.0; @@ -12011,13 +12011,13 @@ void NpcHelper::visage_chain_solve(Entity_NPC *npc, byte isInterpolate) anchorY = fVar7; } else if (isInterpolate == 0) { - ((Vector *)((int)npc + 0x33c))->x = *headPos; + ((Vector *)(GHIDRA_INT(npc) + 0x33c))->x = *headPos; *(float *)((char *)npc + 0x340) = *(float *)((char *)EVar5 + 0x340); *(byte *)((char *)npc + 0x171) = 0; *(int *)((char *)npc + 0x188) = 0; } npc = *(Entity_NPC **)parentSlot; - parentSlot = (EntityPtr *)((int)npc + 0x3bc); + parentSlot = (EntityPtr *)(GHIDRA_INT(npc) + 0x3bc); EVar2 = *(EntityPtr *)((char *)npc + 0x3bc); } } @@ -12048,7 +12048,7 @@ byte NpcHelper::visage_handle_collision(Entity_NPC *npc, Entity *collider, int u undefined4 local_8; EntityPtr *targetRef; - local_8 = __security_cookie ^ (int)register0x00000010 - 4U; + local_8 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; iVar2 = npc->_variant; if (iVar2 == 0) { if (((npc->_state != 0x76) || (collider->_type != 0x387)) || (collider->_variant != 0x14)) { @@ -12252,7 +12252,7 @@ void NpcHelper::ChampionDrop(Entity_NPC *npc) Game *game; Room *room; - stackCookie = __security_cookie ^ (uint)&local_138; + stackCookie = __security_cookie ^ GHIDRA_UINT(&local_138); dropVariant = 0; local_130 = (Vector *)0x0; dropCount = 1; @@ -12280,7 +12280,7 @@ void NpcHelper::ChampionDrop(Entity_NPC *npc) fVar7 = 1.05097e-43; } local_138 = fVar3; - if ((uint)fVar3 < (uint)fVar7) { + if (GHIDRA_UINT(fVar3) < GHIDRA_UINT(fVar7)) { local_138 = fVar7; } } @@ -12310,10 +12310,10 @@ void NpcHelper::ChampionDrop(Entity_NPC *npc) if (npc->_spawnerType != 0x132) { isDropAllowed = bVar2; } - local_138 = (float)(uint)(isDropAllowed & + local_138 = (float)GHIDRA_UINT((isDropAllowed & (g_game->_challenge != 0x22 && - (uVar5 % 100 < (uint)local_138 && g_game->_victoryLap < 1)) & - *(byte *)((char *)g_game->_room + 1)); + (uVar5 % 100 < GHIDRA_UINT(local_138) && g_game->_victoryLap < 1)) & + *(byte *)((char *)g_game->_room + 1))); bVar2 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(5); if ((bVar2 == 0) && (g_game->_stage == 0xc)) { uVar5 = 0x14; @@ -12326,7 +12326,7 @@ void NpcHelper::ChampionDrop(Entity_NPC *npc) } } isIceFrozen = (npc->_flags & 0x2000000000000) != 0; - local_12c = (PlayerManager *)CONCAT31(local_12c._1_3_,isIceFrozen); + local_12c = (PlayerManager *)CONCAT31((*(undefined1 *)((char *)&(local_12c) + 0x1)),isIceFrozen); isDropping = SUB41(local_138,0); switch(npc->_championColorIdx) { case 0: @@ -12405,11 +12405,11 @@ void NpcHelper::ChampionDrop(Entity_NPC *npc) case 0xe: dropVariant = 300; fVar3 = (float)((RNG *)(&npc->_dropRNG))->RNG::Next(); - iVar4 = ItemPool::GetCardEx((int)fVar3,0,1,0,1); + iVar4 = ItemPool::GetCardEx(GHIDRA_INT(fVar3),0,1,0,1); local_c8._shift3 = 7; local_c8._shift1 = 5; local_c8._shift2 = 9; - local_c8._seed = (int)fVar3; + local_c8._seed = GHIDRA_INT(fVar3); local_130 = (Vector *)lua_callback_run_get_card(&local_c8,iVar4,0,1,1); break; case 0xf: @@ -12431,7 +12431,7 @@ void NpcHelper::ChampionDrop(Entity_NPC *npc) uVar5 = uVar5 >> ((byte)(npc->_dropRNG)._shift3 & 0x1f) ^ uVar5; (npc->_dropRNG)._seed = uVar5; uVar6 = Random(); - fVar3 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar3 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_12c = (PlayerManager *)(fVar3 + fVar3); fVar3 = cos((float)local_12c); @@ -12440,7 +12440,7 @@ void NpcHelper::ChampionDrop(Entity_NPC *npc) local_11c.y = fVar3 * 14.0 + (npc->_pos).y; ((Game *)(g_game))->Game::SpawnEx(npc->_type,npc->_variant,&local_11c,&g_vectorZero,(Entity *)npc,0,uVar5 ,0); - local_120 = (Entity_NPC *)((int)local_120 + -1); + local_120 = (Entity_NPC *)(GHIDRA_INT(local_120) + -1); } while (local_120 != (Entity_NPC *)0x0); } break; @@ -12450,8 +12450,8 @@ void NpcHelper::ChampionDrop(Entity_NPC *npc) spawned = ((Game *)(g_game))->Game::SpawnEx(0x12,0,&npc->_pos,&g_vectorZero,(Entity *)npc,0,uVar5,0); bVar2 = ((Entity *)((Entity *)npc))->Entity::HasEntityFlags(0x1000000); if (bVar2 != 0) { - *(uint *)&spawned->_flags = (uint)spawned->_flags & 0xfeffffff; - *(undefined4 *)((int)&spawned->_flags + 4) = *(undefined4 *)((int)&spawned->_flags + 4); + *(uint *)&spawned->_flags = GHIDRA_UINT(spawned->_flags) & 0xfeffffff; + *(undefined4 *)(GHIDRA_INT(&spawned->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&spawned->_flags) + 4); sourceRef._type = npc->_type; sourceRef._position.x = (npc->_pos).x; sourceRef._position.y = (npc->_pos).y; @@ -12460,7 +12460,7 @@ void NpcHelper::ChampionDrop(Entity_NPC *npc) sourceRef._spawnerVariant = npc->_spawnerVariant; sourceRef._velocity.x = (npc->_velocity).x; sourceRef._velocity.y = (npc->_velocity).y; - local_120 = (Entity_NPC *)(uint)((npc->_flags & 0x100) != 0); + local_120 = (Entity_NPC *)GHIDRA_UINT(((npc->_flags & 0x100) != 0)); if ((npc->_flags & 0x20000000) == 0) { uVar5 = 0; } @@ -12473,13 +12473,13 @@ void NpcHelper::ChampionDrop(Entity_NPC *npc) else { uVar6 = 4; } - sourceRef._flags = uVar6 | uVar5 | (uint)local_120; + sourceRef._flags = uVar6 | uVar5 | GHIDRA_UINT(local_120); sourceRef._entity = npc; ((Entity *)(spawned))->Entity::AddShrink(&sourceRef,0x96,0,0); if (0 < spawned->_shrinkCountdown) { - flagsHigh = *(undefined4 *)((int)&spawned->_flags + 4); - *(uint *)&spawned->_flags = (uint)spawned->_flags | 0x1000000; - *(undefined4 *)((int)&spawned->_flags + 4) = flagsHigh; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&spawned->_flags) + 4); + *(uint *)&spawned->_flags = GHIDRA_UINT(spawned->_flags) | 0x1000000; + *(undefined4 *)(GHIDRA_INT(&spawned->_flags) + 4) = flagsHigh; spawned->_shrinkStatus1 = spawned->_shrinkStatus2; } } @@ -12491,7 +12491,7 @@ void NpcHelper::ChampionDrop(Entity_NPC *npc) if (uVar5 != 0) { return; } - if (local_138._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_138) + 0x0)) == '\0') { return; } bVar2 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(5); @@ -12521,14 +12521,14 @@ void NpcHelper::ChampionDrop(Entity_NPC *npc) dropDir = Room::FindFreePickupSpawnPosition (g_game->_room,(Vector *)&local_c8,local_130,0.0,0,0,0); npc = local_120; - local_11c.y = (float)((double)(int)local_138 + - __uint_to_double_fixup[-((int)local_138 >> 0x1f)]) + dropDir->y; - local_11c.x = (float)((double)(int)local_138 + - __uint_to_double_fixup[-((int)local_138 >> 0x1f)]) + dropDir->x; + local_11c.y = (float)((double)GHIDRA_INT(local_138) + + __uint_to_double_fixup[-(GHIDRA_INT(local_138) >> 0x1f)]) + dropDir->y; + local_11c.x = (float)((double)GHIDRA_INT(local_138) + + __uint_to_double_fixup[-(GHIDRA_INT(local_138) >> 0x1f)]) + dropDir->x; ((Game *)(g_game))->Game::SpawnEx(5,0x46,&local_11c,&g_vectorZero,(Entity *)local_120,uVar6,uVar5,0); dropRng = &npc->_dropRNG; - local_138 = (float)((int)local_138 + 1); - } while ((uint)local_138 < (uint)dropCount); + local_138 = (float)(GHIDRA_INT(local_138) + 1); + } while (GHIDRA_UINT(local_138) < GHIDRA_UINT(dropCount)); return; case 0x13: dropRng = &npc->_dropRNG; @@ -12536,7 +12536,7 @@ void NpcHelper::ChampionDrop(Entity_NPC *npc) if (uVar5 != 0) { return; } - if (local_138._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_138) + 0x0)) == '\0') { return; } bVar2 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(5); @@ -12566,14 +12566,14 @@ void NpcHelper::ChampionDrop(Entity_NPC *npc) dropDir = Room::FindFreePickupSpawnPosition (g_game->_room,(Vector *)&local_c8,local_130,0.0,0,0,0); npc = local_120; - local_11c.y = (float)((double)(int)local_138 + - __uint_to_double_fixup[-((int)local_138 >> 0x1f)]) + dropDir->y; - local_11c.x = (float)((double)(int)local_138 + - __uint_to_double_fixup[-((int)local_138 >> 0x1f)]) + dropDir->x; + local_11c.y = (float)((double)GHIDRA_INT(local_138) + + __uint_to_double_fixup[-(GHIDRA_INT(local_138) >> 0x1f)]) + dropDir->y; + local_11c.x = (float)((double)GHIDRA_INT(local_138) + + __uint_to_double_fixup[-(GHIDRA_INT(local_138) >> 0x1f)]) + dropDir->x; ((Game *)(g_game))->Game::SpawnEx(5,0x46,&local_11c,&g_vectorZero,(Entity *)local_120,uVar6,uVar5,0); dropRng = &npc->_dropRNG; - local_138 = (float)((int)local_138 + 1); - } while ((uint)local_138 < (uint)dropCount); + local_138 = (float)(GHIDRA_INT(local_138) + 1); + } while (GHIDRA_UINT(local_138) < GHIDRA_UINT(dropCount)); return; case 0x15: if (isDropping == '\0') { @@ -12591,9 +12591,9 @@ void NpcHelper::ChampionDrop(Entity_NPC *npc) local_138 = (float)(uVar5 + 2); bVar2 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(5); if (bVar2 != 0) { - local_138 = (float)((int)local_138 * 2); + local_138 = (float)(GHIDRA_INT(local_138) * 2); } - if ((int)local_138 < 1) { + if (GHIDRA_INT(local_138) < 1) { return; } do { @@ -12615,7 +12615,7 @@ void NpcHelper::ChampionDrop(Entity_NPC *npc) dropDir = Room::FindFreePickupSpawnPosition (game->_room,(Vector *)&local_c8,&npc->_pos,0.0,0,0,0); ((Game *)(g_game))->Game::SpawnEx(5,0,dropDir,&g_vectorZero,(Entity *)npc,4,uVar5,0); - local_138 = (float)((int)local_138 + -1); + local_138 = (float)(GHIDRA_INT(local_138) + -1); } while (local_138 != 0.0); return; case 0x17: @@ -12665,7 +12665,7 @@ LAB_006c0128: uVar5 = uVar5 << ((byte)(npc->_dropRNG)._shift2 & 0x1f) ^ uVar5; uVar5 = uVar5 >> ((byte)(npc->_dropRNG)._shift3 & 0x1f) ^ uVar5; dropRng->_seed = uVar5; - spawned = ((Game *)(game))->Game::SpawnEx(5,*(uint *)(&DAT_00b67400 + (int)local_130 * 4),&local_11c, + spawned = ((Game *)(game))->Game::SpawnEx(5,*(uint *)(&DAT_00b67400 + GHIDRA_INT(local_130) * 4),&local_11c, &g_vectorZero,(Entity *)npc,0,uVar5,0); spawned[1]._sprite._championColor._offset[2] = (float)local_130; bVar2 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(5); @@ -12689,12 +12689,12 @@ LAB_006c0128: uVar5 = uVar5 << ((byte)(npc->_dropRNG)._shift2 & 0x1f) ^ uVar5; uVar5 = uVar5 >> ((byte)(npc->_dropRNG)._shift3 & 0x1f) ^ uVar5; dropRng->_seed = uVar5; - spawned = ((Game *)(game))->Game::SpawnEx(5,*(uint *)(&DAT_00b67400 + (int)local_130 * 4),&local_11c, + spawned = ((Game *)(game))->Game::SpawnEx(5,*(uint *)(&DAT_00b67400 + GHIDRA_INT(local_130) * 4),&local_11c, &g_vectorZero,(Entity *)npc,0,uVar5,0); spawned[1]._sprite._championColor._offset[2] = (float)local_130; } } - local_130 = (Vector *)((int)&local_130->x + 1); + local_130 = (Vector *)(GHIDRA_INT(&local_130->x) + 1); } while (local_130 < (Vector *)0x7); if ((char)local_12c == '\0') { bVar2 = ((Entity *)((Entity *)npc))->Entity::HasEntityFlags(0x1000000); @@ -12716,18 +12716,18 @@ LAB_006c0128: fVar7 = dropDir->x - (nearestPlayer->_pos).x, 6400.0 < fVar3 * fVar3 + fVar7 * fVar7)))) { params = ((ProjectileParams *)(&projParams))->ProjectileParams::ProjectileParams(); local_c8._seed = 0x40e00000; - local_c8._4_8_ = (ulonglong)(uint)local_c8._shift2 << 0x20; + (*(undefined8 *)((char *)&(local_c8) + 0x4)) = (ulonglong)GHIDRA_UINT(local_c8._shift2) << 0x20; Entity_NPC::FireProjectiles(npc,dropDir,(Vector *)&local_c8,8,params); } } goto switchD_006bf331_caseD_a; } - if (local_138._0_1_ != '\0') { + if ((*(undefined1 *)((char *)&(local_138) + 0x0)) != '\0') { local_120 = (Entity_NPC *)(npc->_pos).x; local_138 = (npc->_pos).y; room = g_game->_room; - iVar4 = (int)(((npc->_pos).x - 40.0) / 40.0 + 0.5); - gridY = (int)((local_138 - 120.0) / 40.0 + 0.5); + iVar4 = GHIDRA_INT((((npc->_pos).x - 40.0) / 40.0 + 0.5)); + gridY = GHIDRA_INT(((local_138 - 120.0) / 40.0 + 0.5)); if ((((iVar4 < 0) || (room->_gridWidth <= iVar4)) || (gridY < 0)) || (room->_gridHeight <= gridY)) { iVar4 = -1; @@ -12738,7 +12738,7 @@ LAB_006c0128: local_114.x = (float)local_120; local_114.y = local_138; uVar5 = ((Room *)(room))->Room::GetGridCollision(iVar4); - if (0 < (int)uVar5) { + if (0 < GHIDRA_INT(uVar5)) { dropDir = ((Room *)(room))->Room::FindFreeTilePosition((Vector *)&local_c8,&local_114,40.0); local_120 = (Entity_NPC *)dropDir->x; local_138 = dropDir->y; @@ -12792,14 +12792,14 @@ LAB_006c0128: uVar5 = dropVariant; } if (uVar5 != 0) { - if ((uint)dropCount < 2) { + if (GHIDRA_UINT(dropCount) < 2) { zeroDir.x = g_vectorZero.x; dropDir = &zeroDir; zeroDir.y = g_vectorZero.y; } else { uVar5 = Random(); - local_114.x = (float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)] + local_114.x = (float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)] ) * 2.3283064e-10 * 3.14; local_114.x = local_114.x + local_114.x; randomDir.x = cos(local_114.x); @@ -12823,13 +12823,13 @@ LAB_006c0128: game = g_game; uVar5 = uVar5 >> ((byte)(npc->_dropRNG)._shift1 & 0x1f) ^ uVar5; uVar5 = uVar5 << ((byte)(npc->_dropRNG)._shift2 & 0x1f) ^ uVar5; - local_c8._seed = (int)(local_114.x * 3.0 + (float)local_120); + local_c8._seed = GHIDRA_INT((local_114.x * 3.0 + (float)local_120)); uVar5 = uVar5 >> ((byte)(npc->_dropRNG)._shift3 & 0x1f) ^ uVar5; dropRng->_seed = uVar5; - local_c8._shift1 = (int)(local_11c.x * 3.0 + local_138); + local_c8._shift1 = GHIDRA_INT((local_11c.x * 3.0 + local_138)); pickup = (Entity_Pickup *) ((Game *)(game))->Game::SpawnEx(5,dropVariant,(Vector *)&local_c8,&dropVelocity,(Entity *)npc, - (uint)local_130,uVar5,0); + GHIDRA_UINT(local_130),uVar5,0); if ((pickup->_variant == 0x15e) && ((((g_manager->_persistentGameData)._achievements[0x269] != 0 || (((g_manager->_state == 2 && (g_game != (Game *)0x0)) && @@ -12839,7 +12839,7 @@ LAB_006c0128: } uVar5 = dropVariant; } - local_12c = (PlayerManager *)((int)&local_12c[-1]._extraPlayers._capacity + 3); + local_12c = (PlayerManager *)(GHIDRA_INT(&local_12c[-1]._extraPlayers._capacity) + 3); } while (local_12c != (PlayerManager *)0x0); return; } @@ -12915,7 +12915,7 @@ void NpcHelper::fireplace_moveable_update(Entity_NPC *npc) isLess = bVar1 < *wantedAnimName; if (bVar1 != *wantedAnimName) { LAB_006d0fd0: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_006d0fd5; } if (bVar1 == 0) break; @@ -13065,7 +13065,7 @@ LAB_006d13b6: isLess = bVar1 < (byte)*wantedAnimNameStr; if (bVar1 != *wantedAnimNameStr) { LAB_006d13a3: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_006d13a8; } if (bVar1 == 0) break; @@ -13084,14 +13084,14 @@ LAB_006d13a8: if ((npc->_pendingDamageFlags & 0x20000) == 0) { local_c = 3.65739e-43; seed_fart_sound_override((int *)&local_c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_c,0.85,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_c),0.85,2,0,1.0,0.0); } goto LAB_006d1556; } fVar4 = npc->_health; flags = npc->_flags; - *(undefined4 *)((int)&npc->_flags + 4) = *(undefined4 *)((int)&npc->_flags + 4); - *(uint *)&npc->_flags = (uint)flags & 0xfffffffb | 0x42050011; + *(undefined4 *)(GHIDRA_INT(&npc->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&npc->_flags) + 4); + *(uint *)&npc->_flags = GHIDRA_UINT(flags) & 0xfffffffb | 0x42050011; local_10 = (fVar4 * 0.9) / npc->_maxHitPoints + 0.1; local_c = local_10 * g_vectorOne.y; local_10 = local_10 * g_vectorOne.x; @@ -13118,7 +13118,7 @@ LAB_006d14f6: isLess = bVar1 < (byte)*wantedAnimNameStr; if (bVar1 != *wantedAnimNameStr) { LAB_006d14e0: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_006d14e5; } if (bVar1 == 0) break; @@ -13142,7 +13142,7 @@ LAB_006d1556: damageEventsBegin = (npc->_damageEvents)._begin; npc->_pendingDamage = 0.0; *(undefined4 *)&npc->_pendingDamageFlags = 0; - *(undefined4 *)((int)&npc->_pendingDamageFlags + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&npc->_pendingDamageFlags) + 4) = 0; (npc->_damageEvents)._end = damageEventsBegin; return; } @@ -13161,7 +13161,7 @@ void NpcHelper::default_case_lua_callback(Entity_NPC *npc) puStack_c = &LAB_00b03ce0; local_10 = ExceptionList; - uStack_40 = __security_cookie ^ (int)register0x00000010 - 4U; + uStack_40 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; local_14 = (undefined1 *)&uStack_40; ExceptionList = &local_10; if ((**(byte **)g_luaEngine & 1) != 0) { @@ -13182,12 +13182,12 @@ uint NpcHelper::big_horn_is_any_hole_busy() hole = (int *)*in_ECX; while( true ) { if (hole == (int *)in_ECX[1]) { - return (uint)hole & 0xffffff00; + return GHIDRA_UINT(hole) & 0xffffff00; } if ((*(int *)(*hole + 0x3fc) != 0) && (*(int *)(*hole + 0x3fc) != 3)) break; hole = hole + 1; } - return CONCAT31((int3)((uint)hole >> 8),1); + return CONCAT31((int3)(GHIDRA_UINT(hole) >> 8),1); } // 009bfd40 @@ -13218,7 +13218,7 @@ float * NpcHelper::hush_fly_shape_build(float *outPath, int shape, float radius) void *savedExceptionList; savedExceptionList = ExceptionList; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); puStack_18 = &LAB_00b0ebd0; local_1c = ExceptionList; ExceptionList = &local_1c; @@ -13258,9 +13258,9 @@ float * NpcHelper::hush_fly_shape_build(float *outPath, int shape, float radius) pointCapacity = 0xd; } else { - sideCount = (int)sideCountF; - pointCapacity = (int)sideCountF + 1; - puVar2 = (undefined1 *)((int)register0x00000010 + -4); + sideCount = GHIDRA_INT(sideCountF); + pointCapacity = GHIDRA_INT(sideCountF) + 1; + puVar2 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); if (pointCapacity == 0) goto LAB_009bfdd2; if (0xfffffff < pointCapacity) { /* WARNING: Subroutine does not return */ @@ -13268,18 +13268,18 @@ float * NpcHelper::hush_fly_shape_build(float *outPath, int shape, float radius) } } iVar3 = sideCount; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); FUN_009c00c0(pointCapacity); sideCountF = (float)iVar3; puVar2 = puStack_20; LAB_009bfdd2: puStack_20 = puVar2; pointIdx = 0; - if (-1 < (int)sideCountF) { - iVar3 = (int)sideCountF; - sideCountF = (float)(int)sideCountF; + if (-1 < GHIDRA_INT(sideCountF)) { + iVar3 = GHIDRA_INT(sideCountF); + sideCountF = (float)GHIDRA_INT(sideCountF); do { - angle = ((float)(int)pointIdx * 6.2831855) / sideCountF; + angle = ((float)GHIDRA_INT(pointIdx) * 6.2831855) / sideCountF; circleX = cos(angle); circleX = circleX * radiusLocal; pointY = sin(angle); @@ -13297,7 +13297,7 @@ LAB_009bfdd2: } pathEnd = (float *)outPath[2]; pointSegmentLength = 0.0; - if ((int)pathEnd - (int)outPath[1] >> 4 != 0) { + if (GHIDRA_INT(pathEnd) - GHIDRA_INT(outPath[1]) >> 4 != 0) { fVar1 = outPathLocal[2]; fVar4 = pointY - *(float *)((char *)fVar1 + -0xc); distX = pointX - *(float *)((char *)fVar1 + -0x10); @@ -13316,10 +13316,10 @@ LAB_009bfdd2: pathEnd[1] = pointY; pathEnd[2] = pointDistance; pathEnd[3] = pointSegmentLength; - outPath[2] = (float)((int)outPath[2] + 0x10); + outPath[2] = (float)(GHIDRA_INT(outPath[2]) + 0x10); } pointIdx = pointIdx + 1; - } while ((int)pointIdx <= iVar3); + } while (GHIDRA_INT(pointIdx) <= iVar3); } ExceptionList = local_1c; return outPathLocal; @@ -13339,7 +13339,7 @@ void NpcHelper::path_point_at(void *path, Vector *outPoint, float share) float totalLength; pointIdx = *(int *)((char *)path + 8); - if ((uint)(pointIdx - *(int *)((char *)path + 4) >> 4) < 2) { + if (GHIDRA_UINT((pointIdx - *(int *)((char *)path + 4) >> 4)) < 2) { KAGE_LogMessage(0x10,(byte *)"Path is incomplete"); pointIdx = *(int *)((char *)path + 8); } diff --git a/src/game/npcai_pathfinder.cpp b/src/game/npcai_pathfinder.cpp index f225b0d..b89d63d 100644 --- a/src/game/npcai_pathfinder.cpp +++ b/src/game/npcai_pathfinder.cpp @@ -73,10 +73,10 @@ byte NPCAI_Pathfinder::HasPathToPos(Vector *position, byte isIgnorePoop) puStack_c = &LAB_00b00a71; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(auStack_7 + 3); + uVar2 = __security_cookie ^ GHIDRA_UINT((auStack_7 + 3)); pvVar5 = g_game->_room; - iVar3 = (int)((*(float *)((char *)this->_entity + 0x33c) - 40.0) / 40.0 + 0.5); - iVar7 = (int)((*(float *)((char *)this->_entity + 0x340) - 120.0) / 40.0 + 0.5); + iVar3 = GHIDRA_INT(((*(float *)((char *)this->_entity + 0x33c) - 40.0) / 40.0 + 0.5)); + iVar7 = GHIDRA_INT(((*(float *)((char *)this->_entity + 0x340) - 120.0) / 40.0 + 0.5)); if ((((iVar3 < 0) || (*(int *)((char *)pvVar5 + 0xc) <= iVar3)) || (iVar7 < 0)) || (*(int *)((char *)pvVar5 + 0x10) <= iVar7)) { startGridIndex = 0xffffffff; @@ -93,8 +93,8 @@ byte NPCAI_Pathfinder::HasPathToPos(Vector *position, byte isIgnorePoop) emptyPathBegin = (void *)0x0; emptyPathEnd = (void *)0x0; emptyPathCapacity = 0; - iVar7 = (int)((position->x - 40.0) / 40.0 + 0.5); - iVar3 = (int)((position->y - 120.0) / 40.0 + 0.5); + iVar7 = GHIDRA_INT(((position->x - 40.0) / 40.0 + 0.5)); + iVar3 = GHIDRA_INT(((position->y - 120.0) / 40.0 + 0.5)); if (((iVar7 < 0) || (*(int *)((char *)pvVar5 + 0xc) <= iVar7)) || ((iVar3 < 0 || (*(int *)((char *)pvVar5 + 0x10) <= iVar3)))) { nodeGridIndex = 0xffffffff; @@ -120,17 +120,17 @@ byte NPCAI_Pathfinder::HasPathToPos(Vector *position, byte isIgnorePoop) unused_1 = local_750; puVar4 = auStackY_83c + 0x8c; if (emptyPathBegin != emptyPathEnd) { - local_72c = (undefined1 *)((int)emptyPathEnd - (int)emptyPathBegin); + local_72c = (undefined1 *)(GHIDRA_INT(emptyPathEnd) - GHIDRA_INT(emptyPathBegin)); puVar4 = local_740; node = auStackY_83c + 0x8c; - if (0x3fffffff < (uint)((int)local_72c >> 2)) { + if (0x3fffffff < GHIDRA_UINT((GHIDRA_INT(local_72c) >> 2))) { LAB_007e780c: local_730 = node; local_740 = puVar4; /* WARNING: Subroutine does not return */ FUN_0040cee0(); } - allocSize = ((int)local_72c >> 2) * 4; + allocSize = (GHIDRA_INT(local_72c) >> 2) * 4; pathCopyBegin = std::_Allocate(allocSize); pbVar11 = pathCopyBegin + allocSize; pbVar9 = pathCopyBegin; @@ -147,20 +147,20 @@ LAB_007e780c: color._alpha = (float)unaff_EBX; color._unk = in_stack_fffff874; KAGE_Graphics_ImageManager::CreateProceduralImage_Internal - (openBegin,(uint)openEnd,uVar6,unused_1,pbVar9,(uint)pbVar10,(uint)pbVar11,color); + (openBegin,GHIDRA_UINT(openEnd),uVar6,unused_1,pbVar9,GHIDRA_UINT(pbVar10),GHIDRA_UINT(pbVar11),color); local_8 = 0; if (nodePathBegin != (void *)0x0) { - uVar6 = ((int)nodePathCapacity - (int)nodePathBegin >> 2) * 4; + uVar6 = (GHIDRA_INT(nodePathCapacity) - GHIDRA_INT(nodePathBegin) >> 2) * 4; pvVar5 = nodePathBegin; if (0xfff < uVar6) { pvVar5 = *(void **)((char *)nodePathBegin + -4); uVar6 = uVar6 + 0x23; - if (0x1f < (uint)((int)nodePathBegin + (-4 - (int)pvVar5))) goto LAB_007e77d8; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(nodePathBegin) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_007e77d8; } operator_delete(pvVar5,uVar6); } isFound = 0; - srcCollision = (int *)((int)g_game->_room + 0x76c); + srcCollision = (int *)(GHIDRA_INT(g_game->_room) + 0x76c); dstCollision = gridCollision; for (iVar3 = 0x1c0; iVar3 != 0; iVar3 = iVar3 + -1) { *dstCollision = *srcCollision; @@ -176,8 +176,8 @@ LAB_007e780c: currentPathCopyEnd = (undefined1 *)0x0; local_72c = (undefined1 *)0x0; if (local_730 != (undefined1 *)openBegin[3]) { - _Size = openBegin[3] - (int)local_730; - uVar6 = (int)_Size >> 2; + _Size = openBegin[3] - GHIDRA_INT(local_730); + uVar6 = GHIDRA_INT(_Size) >> 2; puVar4 = local_740; node = local_730; if (0x3fffffff < uVar6) goto LAB_007e780c; @@ -191,14 +191,14 @@ LAB_007e780c: nodesBegin = openBegin; local_8 = 2; if ((*(int *)((char *)g_game->_room + 0x10) * *(int *)((char *)g_game->_room + 0xc)) / 2 <= - (int)currentCost) { + GHIDRA_INT(currentCost)) { if (local_72c != (undefined1 *)0x0) { - uVar2 = (int)currentPathCopyEnd - (int)local_72c & 0xfffffffc; + uVar2 = GHIDRA_INT(currentPathCopyEnd) - GHIDRA_INT(local_72c) & 0xfffffffc; puVar4 = local_72c; if (0xfff < uVar2) { puVar4 = *(undefined1 **)(local_72c + -4); uVar2 = uVar2 + 0x23; - if ((undefined1 *)0x1f < local_72c + (-4 - (int)puVar4)) goto LAB_007e77d8; + if ((undefined1 *)0x1f < local_72c + (-4 - GHIDRA_INT(puVar4))) goto LAB_007e77d8; } operator_delete(puVar4,uVar2); } @@ -207,8 +207,8 @@ LAB_007e780c: std::priority_queue::pop(); pvVar5 = g_game->_room; iVar7 = *(int *)((char *)pvVar5 + 0xc); - column = (int)local_734 % iVar7; - nodeRow = (int)local_734 / iVar7; + column = GHIDRA_INT(local_734) % iVar7; + nodeRow = GHIDRA_INT(local_734) / iVar7; iVar3 = column + -1; if ((((iVar3 < 0) || (iVar7 <= iVar3)) || (nodeRow < 0)) || (*(int *)((char *)pvVar5 + 0x10) <= nodeRow)) { @@ -244,7 +244,7 @@ LAB_007e7462: local_72c = (undefined1 *)0x0; puVar8 = openEnd; do { - nodeGridIndex = neighbors[(int)local_72c]; + nodeGridIndex = neighbors[GHIDRA_INT(local_72c)]; local_734 = (void *)0x0; nodePathBegin = (void *)0x0; nodePathEnd = 0; @@ -252,7 +252,7 @@ LAB_007e7462: nodePathCapacity = (undefined1 *)0x0; nodeCost = currentCost; local_8 = 3; - if ((-1 < (int)nodeGridIndex) && + if ((-1 < GHIDRA_INT(nodeGridIndex)) && (((iVar3 = gridCollision[nodeGridIndex], -1 < iVar3 && (iVar3 < 0x3b6)) || ((isIgnorePoop != 0 && (iVar3 == 0x5dc)))))) { nodeCost = currentCost + 1; @@ -285,11 +285,11 @@ LAB_007e7462: nodePathCapacity = local_730; puVar4 = auStackY_83c + 0x8c; if (emptyPathBegin != emptyPathEnd) { - in_stack_fffff874 = (int)emptyPathEnd - (int)emptyPathBegin; + in_stack_fffff874 = GHIDRA_INT(emptyPathEnd) - GHIDRA_INT(emptyPathBegin); puVar4 = auStackY_83c + 0x8c; node = local_730; - if (0x3fffffff < (uint)((int)in_stack_fffff874 >> 2)) goto LAB_007e780c; - allocSize = ((int)in_stack_fffff874 >> 2) * 4; + if (0x3fffffff < GHIDRA_UINT((GHIDRA_INT(in_stack_fffff874) >> 2))) goto LAB_007e780c; + allocSize = (GHIDRA_INT(in_stack_fffff874) >> 2) * 4; pathCopyBegin = std::_Allocate(allocSize); pbVar11 = pathCopyBegin + allocSize; pbVar9 = pathCopyBegin; @@ -305,18 +305,18 @@ LAB_007e7462: color_00._alpha = (float)unaff_EBX; color_00._unk = in_stack_fffff874; KAGE_Graphics_ImageManager::CreateProceduralImage_Internal - (openBegin,(uint)puVar8,uVar6,pvVar5,pbVar9,(uint)pbVar10,(uint)pbVar11,color_00 + (openBegin,GHIDRA_UINT(puVar8),uVar6,pvVar5,pbVar9,GHIDRA_UINT(pbVar10),GHIDRA_UINT(pbVar11),color_00 ); } puVar4 = local_72c; local_8 = 2; if (local_734 != (void *)0x0) { - uVar6 = (int)local_730 - (int)local_734 & 0xfffffffc; + uVar6 = GHIDRA_INT(local_730) - GHIDRA_INT(local_734) & 0xfffffffc; pvVar5 = local_734; if (0xfff < uVar6) { pvVar5 = *(void **)((char *)local_734 + -4); uVar6 = uVar6 + 0x23; - if (0x1f < (uint)((int)local_734 + (-4 - (int)pvVar5))) goto LAB_007e77d8; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_734) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_007e77d8; } operator_delete(pvVar5,uVar6); } @@ -324,12 +324,12 @@ LAB_007e7462: } while (local_72c < &DAT_00000004); local_8 = 0; if (currentPathCopy != (undefined1 *)0x0) { - uVar6 = (int)currentPathCopyEnd - (int)currentPathCopy & 0xfffffffc; + uVar6 = GHIDRA_INT(currentPathCopyEnd) - GHIDRA_INT(currentPathCopy) & 0xfffffffc; puVar4 = currentPathCopy; if (0xfff < uVar6) { puVar4 = *(undefined1 **)(currentPathCopy + -4); uVar6 = uVar6 + 0x23; - if ((undefined1 *)0x1f < currentPathCopy + (-4 - (int)puVar4)) goto LAB_007e77d8; + if ((undefined1 *)0x1f < currentPathCopy + (-4 - GHIDRA_INT(puVar4))) goto LAB_007e77d8; } operator_delete(puVar4,uVar6); } @@ -338,12 +338,12 @@ LAB_007e7462: } } if (emptyPathBegin != (void *)0x0) { - uVar2 = emptyPathCapacity - (int)emptyPathBegin & 0xfffffffc; + uVar2 = emptyPathCapacity - GHIDRA_INT(emptyPathBegin) & 0xfffffffc; pvVar5 = emptyPathBegin; if (0xfff < uVar2) { pvVar5 = *(void **)((char *)emptyPathBegin + -4); uVar2 = uVar2 + 0x23; - if (0x1f < (uint)((int)emptyPathBegin + (-4 - (int)pvVar5))) goto LAB_007e77d8; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(emptyPathBegin) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_007e77d8; } operator_delete(pvVar5,uVar2); } @@ -352,12 +352,12 @@ LAB_007e7462: for (; node != puVar8; node = node + 5) { FID_conflict__Tidy(node + 2); } - uVar2 = (((int)openCapacity - (int)nodesBegin) / 0x14) * 0x14; + uVar2 = ((GHIDRA_INT(openCapacity) - GHIDRA_INT(nodesBegin)) / 0x14) * 0x14; puVar8 = nodesBegin; if (0xfff < uVar2) { puVar8 = (uint *)nodesBegin[-1]; uVar2 = uVar2 + 0x23; - if (0x1f < (uint)((int)nodesBegin + (-4 - (int)puVar8))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(nodesBegin) + (-4 - GHIDRA_INT(puVar8))))) { LAB_007e77d8: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); diff --git a/src/game/online_chat.cpp b/src/game/online_chat.cpp index 2b42618..e5e9cef 100644 --- a/src/game/online_chat.cpp +++ b/src/game/online_chat.cpp @@ -76,7 +76,7 @@ LAB_0091d341: local_20[0].y = *(float *)(iVar4 + 8); iVar3 = *(int *)(iVar4 + 0xc); if (*(int *)(iVar4 + 8) == 0 && iVar3 == 0) goto LAB_0091d341; - uVar2 = __ftoui3(__security_cookie ^ (uint)&local_20[3].y); + uVar2 = __ftoui3(__security_cookie ^ GHIDRA_UINT(&local_20[3].y)); user_profile_format_display_name(CONCAT44(iVar3,local_20[0].y),drawFont,uVar2); sprintf(&DAT_00c93010,&DAT_00b6d198); } @@ -133,16 +133,16 @@ LAB_0091d341: if (isInputLine == 0) { uVar5 = 0xffff; local_34.y = (float)((*(int *)((char *)this + 0x14) - *(int *)((char *)this + 0x10)) / 0xc - 1); - if ((int)local_34.y < 0) { + if (GHIDRA_INT(local_34.y) < 0) { fVar6 = position->y; } else { - _isInputLine = (int)local_34.y * 0xc; + _isInputLine = GHIDRA_INT(local_34.y) * 0xc; do { fVar6 = local_34.y; FormattedText::FormattedText - (-(uint)((uint)local_34.y < - (uint)((*(int *)((char *)this + 0x14) - *(int *)((char *)this + 0x10)) / 0xc)) & + (-GHIDRA_UINT((GHIDRA_UINT(local_34.y) < + GHIDRA_UINT(((*(int *)((char *)this + 0x14) - *(int *)((char *)this + 0x10)) / 0xc)))) & _isInputLine + *(int *)((char *)this + 0x10),uVar5); local_7c = 0; local_78 = 0xffff; @@ -163,12 +163,12 @@ LAB_0091d341: local_8 = -NAN; std::vector<12byte>::clear(); std::vector<12byte>::_Tidy(); - local_34.y = (float)((int)fVar6 - 1); + local_34.y = (float)(GHIDRA_INT(fVar6) - 1); fVar6 = position->y - lineHeight; _isInputLine = _isInputLine + -0xc; position->y = fVar6; uVar5 = extraout_ECX; - } while (-1 < (int)local_34.y); + } while (-1 < GHIDRA_INT(local_34.y)); drawFont = font; } local_7c = 0; @@ -197,15 +197,15 @@ LAB_0091d341: ((Font *)(drawFont))->Font::DrawString(&DAT_00c93010,&local_34,&local_3c,&local_58,&local_b0); local_8 = -NAN; local_34.y = *(float *)((char *)this + 0x10); - iVar4 = *(int *)((char *)this + 0x14) - (int)local_34.y; + iVar4 = *(int *)((char *)this + 0x14) - GHIDRA_INT(local_34.y); _isInputLine = 0; if (0 < iVar4 / 0xc) { local_3c.y = 0.0; do { FormattedText::FormattedText - (-(uint)(_isInputLine < - (uint)((*(int *)((char *)this + 0x14) - (int)local_34.y) / 0xc)) & - (int)local_3c.y + *(int *)((char *)this + 0x10),iVar4); + (-GHIDRA_UINT((_isInputLine < + GHIDRA_UINT(((*(int *)((char *)this + 0x14) - GHIDRA_INT(local_34.y)) / 0xc)))) & + GHIDRA_INT(local_3c.y) + *(int *)((char *)this + 0x10),iVar4); local_60 = 0; local_5c = 0xffff; local_58._red = 0.0; @@ -226,11 +226,11 @@ LAB_0091d341: std::vector<12byte>::clear(); std::vector<12byte>::_Tidy(); _isInputLine = _isInputLine + 1; - local_3c.y = (float)((int)local_3c.y + 0xc); + local_3c.y = (float)(GHIDRA_INT(local_3c.y) + 0xc); position->y = lineHeight + position->y; local_34.y = *(float *)((char *)this + 0x10); - iVar4 = *(int *)((char *)this + 0x14) - (int)local_34.y; - } while ((int)_isInputLine < iVar4 / 0xc); + iVar4 = *(int *)((char *)this + 0x14) - GHIDRA_INT(local_34.y); + } while (GHIDRA_INT(_isInputLine) < iVar4 / 0xc); goto LAB_0091d913; } } @@ -244,7 +244,7 @@ LAB_0091d913: } else { uVar2 = iVar3 - 1; - if (uVar2 < (uint)((iVar4 - *(int *)((char *)this + 0x10)) / 0xc)) { + if (uVar2 < GHIDRA_UINT(((iVar4 - *(int *)((char *)this + 0x10)) / 0xc))) { lastLine = *(byte **)(*(int *)((char *)this + 0x10) + 4 + uVar2 * 0xc); } else { @@ -309,7 +309,7 @@ void OnlineChat::destructor() uStack_8 = 0xffffffff; puStack_c = &LAB_00af0a50; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; ((LobbyList *)(in_ECX))->LobbyList::clear(); memberMap = in_ECX + 0x188; @@ -319,7 +319,7 @@ void OnlineChat::destructor() operator_delete((void *)*memberMap,0x20); std::vector<12byte>::clear(uVar1); std::vector<12byte>::_Tidy(); - in_ECX[10] = (int)KAGE::System::UserProfileBase::vftable; + in_ECX[10] = GHIDRA_INT(KAGE)::System::UserProfileBase::vftable; ((std::string *)((char *)(in_ECX + 3)))->std::string::_Tidy_deallocate(); std::map::_Erase_tree(in_ECX,*(undefined4 *)(*in_ECX + 4)); operator_delete((void *)*in_ECX,0x48); @@ -348,7 +348,7 @@ void OnlineChat::render_all(Vector *pos, byte isFocused) if (*(uint *)((char *)this + 8) != 0) { linePos.x = pos->x + 0.0; linePos.y = *(float *)((char *)this + 0x608) * *(float *)((char *)this + 0x5f4) + pos->y; - render((void *)((int)this + 0x24),&linePos,1,(byte)(*(uint *)((char *)this + 8) / 0x19) & 1,alpha); + render((void *)(GHIDRA_INT(this) + 0x24),&linePos,1,(byte)(*(uint *)((char *)this + 8) / 0x19) & 1,alpha); } linePos.x = pVVar1->x; linePos.y = pVVar1->y; @@ -398,7 +398,7 @@ void OnlineChat::broadcast_message(std_string *text) local_14 = 0xffffffff; puStack_18 = &LAB_00b0a485; local_1c = ExceptionList; - uVar1 = __security_cookie ^ (uint)(local_2c + 7); + uVar1 = __security_cookie ^ GHIDRA_UINT((local_2c + 7)); ExceptionList = &local_1c; apply_roll_command(text); textLength = text->_size; @@ -430,12 +430,12 @@ void OnlineChat::broadcast_message(std_string *text) "Attempting to create a message when there is no multiplayer service\n"); } messageRefCount = (void *)0xa; - NetConnection::send_message(g_multiplayerService,local_38,1,data,(uint)local_60,10); + NetConnection::send_message(g_multiplayerService,local_38,1,data,GHIDRA_UINT(local_60),10); manager = g_manager; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; FUN_008ef1d0(local_38); ((NetplayManager *)(&manager->_netplayManager))->NetplayManager::send_message(0x11,local_60,messageRefCount); - local_14 = CONCAT31(local_14._1_3_,2); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); if (messageRefCountPtr != (int *)0x0) { isLastRef = (**(code **)(*messageRefCountPtr + 0xc))(); if ((isLastRef != '\0') && (g_multiplayerRelease != (void *)0x0)) { @@ -469,7 +469,7 @@ byte OnlineChat::is_key_repeating(int keyCode) *(undefined4 *)((char *)this + temp_5f0b48a020 * 4 + 0x68) = 0; } else { - piVar1 = (int *)((int)this + temp_5f0b48a020 * 4 + 0x68); + piVar1 = (int *)(GHIDRA_INT(this) + temp_5f0b48a020 * 4 + 0x68); *piVar1 = *piVar1 + 1; } keyCode = temp_5f0b48a020; @@ -505,7 +505,7 @@ void OnlineChat::apply_roll_command(std_string *message) local_8 = (byte ******)0xffffffff; puStack_c = &LAB_00b0a59d; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(command + 0xb); + local_18 = __security_cookie ^ GHIDRA_UINT((command + 0xb)); if (message->_size == 0) { return; } @@ -523,17 +523,17 @@ void OnlineChat::apply_roll_command(std_string *message) if (0xf < commandCapacity) { pppppppbVar1 = command[0]; } - lowerEnd = (byte *******)((int)pppppppbVar1 + commandSize); + lowerEnd = (byte *******)(GHIDRA_INT(pppppppbVar1) + commandSize); lowerEnd = (byte *******)command; if (0xf < commandCapacity) { lowerEnd = command[0]; } if (lowerEnd != lowerEnd) { - iVar2 = (int)pppppppbVar1 - (int)lowerEnd; + iVar2 = GHIDRA_INT(pppppppbVar1) - GHIDRA_INT(lowerEnd); do { - lowerChar = tolower((int)(char)*(byte *)lowerEnd); + lowerChar = tolower(GHIDRA_INT((char)*(byte *)lowerEnd)); *(byte *)((char *)lowerEnd + iVar2) = (byte)lowerChar; - lowerEnd = (byte *******)((int)lowerEnd + 1); + lowerEnd = (byte *******)(GHIDRA_INT(lowerEnd) + 1); } while (lowerEnd != lowerEnd); } capacity = commandCapacity; @@ -571,7 +571,7 @@ LAB_0091f723: if (0xfff < size) { lowerEnd = (byte *******)pppppppbVar1[-1]; size = capacity + 0x24; - if ((byte *)0x1f < (byte *)((int)pppppppbVar1 + (-4 - (int)lowerEnd))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(pppppppbVar1) + (-4 - GHIDRA_INT(lowerEnd)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } diff --git a/src/game/online_chat_message.cpp b/src/game/online_chat_message.cpp index fe4ac58..d562ae0 100644 --- a/src/game/online_chat_message.cpp +++ b/src/game/online_chat_message.cpp @@ -15,7 +15,7 @@ void OnlineChatMessage::constructor() puStack_c = &LAB_00b0a2cd; local_10 = ExceptionList; ExceptionList = &local_10; - profile = (undefined4 *)((int)this + 4); + profile = (undefined4 *)(GHIDRA_INT(this) + 4); *(undefined4 *)this = 0; userId = 0; *profile = KAGE::System::UserProfileBase::vftable; diff --git a/src/game/online_emotes.cpp b/src/game/online_emotes.cpp index dd4348e..4fa5acf 100644 --- a/src/game/online_emotes.cpp +++ b/src/game/online_emotes.cpp @@ -16,12 +16,12 @@ void OnlineEmotes::constructor() *(undefined4 *)((char *)this + 8) = 0; *(undefined4 *)((char *)this + 0xc) = 0; *(undefined1 *)((char *)this + 0x10) = 1; - ((ANM2 *)((ANM2 *)((int)this + 0x14)))->ANM2::constructor(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x14)))->ANM2::constructor(); local_8 = 0; - ((ANM2 *)((ANM2 *)((int)this + 0x128)))->ANM2::constructor(); - local_8 = CONCAT31(local_8._1_3_,1); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x128)))->ANM2::constructor(); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); _eh_vector_constructor_iterator_ - ((void *)((int)this + 0x23c),0x18,0x3b,FUN_0040c380,std::string::_Tidy_deallocate); + ((void *)(GHIDRA_INT(this) + 0x23c),0x18,0x3b,FUN_0040c380,std::string::_Tidy_deallocate); ExceptionList = local_10; return; } @@ -38,27 +38,27 @@ void OnlineEmotes::destructor() puStack_c = &LAB_00af1f50; local_10 = ExceptionList; ExceptionList = &local_10; - secondAnm2 = (ANM2 *)((int)this + 0x128); + secondAnm2 = (ANM2 *)(GHIDRA_INT(this) + 0x128); *(undefined1 *)this = 0; *(undefined4 *)((char *)this + 4) = 0x3c; *(undefined4 *)((char *)this + 8) = 0; *(undefined4 *)((char *)this + 0xc) = 0; ((ANM2 *)(secondAnm2))->ANM2::Reset(); - ((ANM2 *)((ANM2 *)((int)this + 0x14)))->ANM2::Reset(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x14)))->ANM2::Reset(); _eh_vector_destructor_iterator_ - ((void *)((int)this + 0x23c),0x18,0x3b,std::string::_Tidy_deallocate); + ((void *)(GHIDRA_INT(this) + 0x23c),0x18,0x3b,std::string::_Tidy_deallocate); local_8 = 0; ((ANM2 *)(secondAnm2))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)this + 0x178)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)this + 0x158)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)this + 0x140)))->std::string::_Tidy_deallocate(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x178)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x158)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x140)))->std::string::_Tidy_deallocate(); ((std::string *)((char *)secondAnm2))->std::string::_Tidy_deallocate(); local_8 = 1; - ((ANM2 *)((ANM2 *)((int)this + 0x14)))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)this + 100)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)this + 0x44)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)this + 0x2c)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)this + 0x14)))->std::string::_Tidy_deallocate(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x14)))->ANM2::Reset(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 100)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x44)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x2c)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x14)))->std::string::_Tidy_deallocate(); ExceptionList = local_10; return; } @@ -82,11 +82,11 @@ void OnlineEmotes::load_anm2() undefined4 local_14; uint *assignedSize; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00af1f85; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; overlayAnm2Path._size = 0; overlayAnm2Path._capacity = 0xf; @@ -94,20 +94,20 @@ void OnlineEmotes::load_anm2() overlayAnm2Path._buf[1] = '\0'; overlayAnm2Path._buf[2] = '\0'; overlayAnm2Path._buf[3] = '\0'; - overlayAnm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(overlayAnm2Path._buf) + 0x0)) = std::_Allocate(0x20); overlayAnm2Path._size = 0x15; overlayAnm2Path._capacity = 0x1f; - builtin_strncpy((char *)overlayAnm2Path._buf._0_4_,"gfx/OnlineEmotes.anm2",0x16); + builtin_strncpy((*(undefined4 *)((char *)&((char *)overlayAnm2Path._buf) + 0x0)),"gfx/OnlineEmotes.anm2",0x16); local_14 = 0; - ((ANM2 *)((ANM2 *)((int)this + 0x128)))->ANM2::Load(&overlayAnm2Path,1); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x128)))->ANM2::Load(&overlayAnm2Path,1); local_14 = 0xffffffff; if (0xf < overlayAnm2Path._capacity) { uVar5 = overlayAnm2Path._capacity + 1; - pcVar4 = (char *)overlayAnm2Path._buf._0_4_; + pcVar4 = (*(undefined4 *)((char *)&((char *)overlayAnm2Path._buf) + 0x0)); if (0xfff < uVar5) { - pcVar4 = *(char **)(overlayAnm2Path._buf._0_4_ + -4); + pcVar4 = *(char **)((*(undefined4 *)((char *)&(overlayAnm2Path._buf) + 0x0)) + -4); uVar5 = overlayAnm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(overlayAnm2Path._buf._0_4_ + (-4 - (int)pcVar4))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(overlayAnm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar4)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -120,20 +120,20 @@ void OnlineEmotes::load_anm2() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x15; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/OnlineEmotes.anm2",0x16); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/OnlineEmotes.anm2",0x16); local_14 = 1; - ((ANM2 *)((ANM2 *)((int)this + 0x14)))->ANM2::Load(&anm2Path,1); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x14)))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar5 = anm2Path._capacity + 1; - pcVar4 = (char *)anm2Path._buf._0_4_; + pcVar4 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar5) { - pcVar4 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar4 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar5 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar4))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar4)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -143,7 +143,7 @@ void OnlineEmotes::load_anm2() pbVar3 = *(byte **)((char *)this + 0x48); anm2Path._size = 0; anm2Path._capacity = 0xf; - anm2Path._buf._0_4_ = anm2Path._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) & 0xffffff00; if (pbVar3 != (byte *)0x0) { pbVar2 = pbVar3; if (0xf < *(uint *)(pbVar3 + 0x14)) { @@ -155,7 +155,7 @@ void OnlineEmotes::load_anm2() isLess = bVar1 < (byte)*pcVar4; if (bVar1 != *pcVar4) { LAB_0042fd77: - uVar5 = -(uint)isLess | 1; + uVar5 = -GHIDRA_UINT(isLess) | 1; goto LAB_0042fd7c; } if (bVar1 == 0) break; @@ -170,273 +170,273 @@ LAB_0042fd7c: if ((uVar5 == 0) && ((pbVar3[0x34] == 0 || (*(char *)((char *)this + 0x58) != '\0')))) goto LAB_0042fdb0; } - bVar1 = ((ANM2 *)((ANM2 *)((int)this + 0x14)))->ANM2::SetAnimation((byte *)"Bubble",1); + bVar1 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x14)))->ANM2::SetAnimation((byte *)"Bubble",1); if (bVar1 != 0) { - ((AnimationState *)((AnimationState *)((int)this + 0x44)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x44)))->AnimationState::Rewind(); *(undefined1 *)((char *)this + 0x58) = 1; } LAB_0042fdb0: - ((std::string *)((char *)((int)this + 0x23c)))->std::string::assign((byte *)&DAT_00b1cde4,2); - ((std::string *)((char *)((int)this + 0x254)))->std::string::assign(&DAT_00b1cddc,4); - ((std::string *)((char *)((int)this + 0x26c)))->std::string::assign(&DAT_00b1cdf0,4); - ((std::string *)((char *)((int)this + 0x284)))->std::string::assign((byte *)"Right",5); - ((std::string *)((char *)((int)this + 0x29c)))->std::string::assign((byte *)"Happy",5); - ((std::string *)((char *)((int)this + 0x2b4)))->std::string::assign(&DAT_00b1cdf8,3); - ((std::string *)((char *)((int)this + 0x2cc)))->std::string::assign((byte *)"ThumbsUp",8); - ((std::string *)((char *)((int)this + 0x2e4)))->std::string::assign((byte *)"ThumbsDown",10); - ((std::string *)((char *)((int)this + 0x2fc)))->std::string::assign((byte *)"Heart",5); - ((std::string *)((char *)((int)this + 0x314)))->std::string::assign(&DAT_00b1ce1c,4); - ((std::string *)((char *)((int)this + 0x32c)))->std::string::assign(&DAT_00b1ce30,4); - ((std::string *)((char *)((int)this + 0x344)))->std::string::assign(&DAT_00b1ce2c,3); - ((std::string *)((char *)((int)this + 0x35c)))->std::string::assign((byte *)"TintedRock",10); - ((std::string *)((char *)((int)this + 0x374)))->std::string::assign((byte *)"Angel",5); - ((std::string *)((char *)((int)this + 0x38c)))->std::string::assign((byte *)"Devil",5); - ((std::string *)((char *)((int)this + 0x3a4)))->std::string::assign(&DAT_00b1ce4c,4); - ((std::string *)((char *)((int)this + 0x3bc)))->std::string::assign((byte *)"RaiseHand",9); - ((std::string *)((char *)((int)this + 0x3d4)))->std::string::assign((byte *)"QuestionMark",0xc); - ((std::string *)((char *)((int)this + 0x41c)))->std::string::assign((byte *)"Reset",5); - ((std::string *)((char *)((int)this + 0x3ec)))->std::string::assign(&DAT_00b1ce78,2); - assignedString = ((std::string *)((char *)((int)this + 0x4c4)))->std::string::assign(&DAT_00b1ce88,6); - if ((std_string *)((int)this + 0x4ac) != assignedString) { + ((std::string *)((char *)(GHIDRA_INT(this) + 0x23c)))->std::string::assign((byte *)&DAT_00b1cde4,2); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x254)))->std::string::assign(&DAT_00b1cddc,4); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x26c)))->std::string::assign(&DAT_00b1cdf0,4); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x284)))->std::string::assign((byte *)"Right",5); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x29c)))->std::string::assign((byte *)"Happy",5); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x2b4)))->std::string::assign(&DAT_00b1cdf8,3); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x2cc)))->std::string::assign((byte *)"ThumbsUp",8); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x2e4)))->std::string::assign((byte *)"ThumbsDown",10); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x2fc)))->std::string::assign((byte *)"Heart",5); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x314)))->std::string::assign(&DAT_00b1ce1c,4); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x32c)))->std::string::assign(&DAT_00b1ce30,4); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x344)))->std::string::assign(&DAT_00b1ce2c,3); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x35c)))->std::string::assign((byte *)"TintedRock",10); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x374)))->std::string::assign((byte *)"Angel",5); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x38c)))->std::string::assign((byte *)"Devil",5); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x3a4)))->std::string::assign(&DAT_00b1ce4c,4); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x3bc)))->std::string::assign((byte *)"RaiseHand",9); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x3d4)))->std::string::assign((byte *)"QuestionMark",0xc); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x41c)))->std::string::assign((byte *)"Reset",5); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x3ec)))->std::string::assign(&DAT_00b1ce78,2); + assignedString = ((std::string *)((char *)(GHIDRA_INT(this) + 0x4c4)))->std::string::assign(&DAT_00b1ce88,6); + if ((std_string *)(GHIDRA_INT(this) + 0x4ac) != assignedString) { assignedSize = &assignedString->_size; if (0xf < assignedString->_capacity) { assignedString = *(std_string **)assignedString->_buf; } - ((std::string *)((char *)((int)this + 0x4ac)))->std::string::assign((byte *)assignedString,*assignedSize); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x4ac)))->std::string::assign((byte *)assignedString,*assignedSize); } - pbVar2 = (byte *)((int)this + 0x4ac); - pbVar3 = (byte *)((int)this + 0x494); + pbVar2 = (byte *)(GHIDRA_INT(this) + 0x4ac); + pbVar3 = (byte *)(GHIDRA_INT(this) + 0x494); if (pbVar3 != pbVar2) { if (0xf < *(uint *)((char *)this + 0x4c0)) { pbVar2 = *(byte **)pbVar2; } ((std::string *)((char *)pbVar3))->std::string::assign(pbVar2,*(uint *)((char *)this + 0x4bc)); } - if ((byte *)((int)this + 0x47c) != pbVar3) { + if ((byte *)(GHIDRA_INT(this) + 0x47c) != pbVar3) { if (0xf < *(uint *)((char *)this + 0x4a8)) { pbVar3 = *(byte **)pbVar3; } - ((std::string *)((char *)((int)this + 0x47c)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x4a4)); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x47c)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x4a4)); } - pbVar2 = (byte *)((int)this + 0x47c); - pbVar3 = (byte *)((int)this + 0x464); + pbVar2 = (byte *)(GHIDRA_INT(this) + 0x47c); + pbVar3 = (byte *)(GHIDRA_INT(this) + 0x464); if (pbVar3 != pbVar2) { if (0xf < *(uint *)((char *)this + 0x490)) { pbVar2 = *(byte **)pbVar2; } ((std::string *)((char *)pbVar3))->std::string::assign(pbVar2,*(uint *)((char *)this + 0x48c)); } - if ((byte *)((int)this + 0x44c) != pbVar3) { + if ((byte *)(GHIDRA_INT(this) + 0x44c) != pbVar3) { if (0xf < *(uint *)((char *)this + 0x478)) { pbVar3 = *(byte **)pbVar3; } - ((std::string *)((char *)((int)this + 0x44c)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x474)); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x44c)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x474)); } - ((std::string *)((char *)((int)this + 0x404)))->std::string::assign(&DAT_00b1ce84,3); - assignedString = ((std::string *)((char *)((int)this + 0x6a4)))->std::string::assign(&DAT_00b1ce98,7); - if ((std_string *)((int)this + 0x68c) != assignedString) { + ((std::string *)((char *)(GHIDRA_INT(this) + 0x404)))->std::string::assign(&DAT_00b1ce84,3); + assignedString = ((std::string *)((char *)(GHIDRA_INT(this) + 0x6a4)))->std::string::assign(&DAT_00b1ce98,7); + if ((std_string *)(GHIDRA_INT(this) + 0x68c) != assignedString) { assignedSize = &assignedString->_size; if (0xf < assignedString->_capacity) { assignedString = *(std_string **)assignedString->_buf; } - ((std::string *)((char *)((int)this + 0x68c)))->std::string::assign((byte *)assignedString,*assignedSize); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x68c)))->std::string::assign((byte *)assignedString,*assignedSize); } - pbVar2 = (byte *)((int)this + 0x68c); - pbVar3 = (byte *)((int)this + 0x674); + pbVar2 = (byte *)(GHIDRA_INT(this) + 0x68c); + pbVar3 = (byte *)(GHIDRA_INT(this) + 0x674); if (pbVar3 != pbVar2) { if (0xf < *(uint *)((char *)this + 0x6a0)) { pbVar2 = *(byte **)pbVar2; } ((std::string *)((char *)pbVar3))->std::string::assign(pbVar2,*(uint *)((char *)this + 0x69c)); } - if ((byte *)((int)this + 0x65c) != pbVar3) { + if ((byte *)(GHIDRA_INT(this) + 0x65c) != pbVar3) { if (0xf < *(uint *)((char *)this + 0x688)) { pbVar3 = *(byte **)pbVar3; } - ((std::string *)((char *)((int)this + 0x65c)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x684)); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x65c)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x684)); } - pbVar2 = (byte *)((int)this + 0x65c); - pbVar3 = (byte *)((int)this + 0x644); + pbVar2 = (byte *)(GHIDRA_INT(this) + 0x65c); + pbVar3 = (byte *)(GHIDRA_INT(this) + 0x644); if (pbVar3 != pbVar2) { if (0xf < *(uint *)((char *)this + 0x670)) { pbVar2 = *(byte **)pbVar2; } ((std::string *)((char *)pbVar3))->std::string::assign(pbVar2,*(uint *)((char *)this + 0x66c)); } - if ((byte *)((int)this + 0x62c) != pbVar3) { + if ((byte *)(GHIDRA_INT(this) + 0x62c) != pbVar3) { if (0xf < *(uint *)((char *)this + 0x658)) { pbVar3 = *(byte **)pbVar3; } - ((std::string *)((char *)((int)this + 0x62c)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x654)); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x62c)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x654)); } - pbVar2 = (byte *)((int)this + 0x62c); - pbVar3 = (byte *)((int)this + 0x614); + pbVar2 = (byte *)(GHIDRA_INT(this) + 0x62c); + pbVar3 = (byte *)(GHIDRA_INT(this) + 0x614); if (pbVar3 != pbVar2) { if (0xf < *(uint *)((char *)this + 0x640)) { pbVar2 = *(byte **)pbVar2; } ((std::string *)((char *)pbVar3))->std::string::assign(pbVar2,*(uint *)((char *)this + 0x63c)); } - if ((byte *)((int)this + 0x5fc) != pbVar3) { + if ((byte *)(GHIDRA_INT(this) + 0x5fc) != pbVar3) { if (0xf < *(uint *)((char *)this + 0x628)) { pbVar3 = *(byte **)pbVar3; } - ((std::string *)((char *)((int)this + 0x5fc)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x624)); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x5fc)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x624)); } - pbVar2 = (byte *)((int)this + 0x5fc); - pbVar3 = (byte *)((int)this + 0x5e4); + pbVar2 = (byte *)(GHIDRA_INT(this) + 0x5fc); + pbVar3 = (byte *)(GHIDRA_INT(this) + 0x5e4); if (pbVar3 != pbVar2) { if (0xf < *(uint *)((char *)this + 0x610)) { pbVar2 = *(byte **)pbVar2; } ((std::string *)((char *)pbVar3))->std::string::assign(pbVar2,*(uint *)((char *)this + 0x60c)); } - if ((byte *)((int)this + 0x5cc) != pbVar3) { + if ((byte *)(GHIDRA_INT(this) + 0x5cc) != pbVar3) { if (0xf < *(uint *)((char *)this + 0x5f8)) { pbVar3 = *(byte **)pbVar3; } - ((std::string *)((char *)((int)this + 0x5cc)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x5f4)); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x5cc)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x5f4)); } - pbVar2 = (byte *)((int)this + 0x5cc); - pbVar3 = (byte *)((int)this + 0x5b4); + pbVar2 = (byte *)(GHIDRA_INT(this) + 0x5cc); + pbVar3 = (byte *)(GHIDRA_INT(this) + 0x5b4); if (pbVar3 != pbVar2) { if (0xf < *(uint *)((char *)this + 0x5e0)) { pbVar2 = *(byte **)pbVar2; } ((std::string *)((char *)pbVar3))->std::string::assign(pbVar2,*(uint *)((char *)this + 0x5dc)); } - if ((byte *)((int)this + 0x59c) != pbVar3) { + if ((byte *)(GHIDRA_INT(this) + 0x59c) != pbVar3) { if (0xf < *(uint *)((char *)this + 0x5c8)) { pbVar3 = *(byte **)pbVar3; } - ((std::string *)((char *)((int)this + 0x59c)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x5c4)); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x59c)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x5c4)); } - pbVar2 = (byte *)((int)this + 0x59c); - pbVar3 = (byte *)((int)this + 0x584); + pbVar2 = (byte *)(GHIDRA_INT(this) + 0x59c); + pbVar3 = (byte *)(GHIDRA_INT(this) + 0x584); if (pbVar3 != pbVar2) { if (0xf < *(uint *)((char *)this + 0x5b0)) { pbVar2 = *(byte **)pbVar2; } ((std::string *)((char *)pbVar3))->std::string::assign(pbVar2,*(uint *)((char *)this + 0x5ac)); } - if ((byte *)((int)this + 0x56c) != pbVar3) { + if ((byte *)(GHIDRA_INT(this) + 0x56c) != pbVar3) { if (0xf < *(uint *)((char *)this + 0x598)) { pbVar3 = *(byte **)pbVar3; } - ((std::string *)((char *)((int)this + 0x56c)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x594)); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x56c)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x594)); } - pbVar2 = (byte *)((int)this + 0x56c); - pbVar3 = (byte *)((int)this + 0x554); + pbVar2 = (byte *)(GHIDRA_INT(this) + 0x56c); + pbVar3 = (byte *)(GHIDRA_INT(this) + 0x554); if (pbVar3 != pbVar2) { if (0xf < *(uint *)((char *)this + 0x580)) { pbVar2 = *(byte **)pbVar2; } ((std::string *)((char *)pbVar3))->std::string::assign(pbVar2,*(uint *)((char *)this + 0x57c)); } - if ((byte *)((int)this + 0x53c) != pbVar3) { + if ((byte *)(GHIDRA_INT(this) + 0x53c) != pbVar3) { if (0xf < *(uint *)((char *)this + 0x568)) { pbVar3 = *(byte **)pbVar3; } - ((std::string *)((char *)((int)this + 0x53c)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x564)); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x53c)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x564)); } - pbVar2 = (byte *)((int)this + 0x53c); - pbVar3 = (byte *)((int)this + 0x524); + pbVar2 = (byte *)(GHIDRA_INT(this) + 0x53c); + pbVar3 = (byte *)(GHIDRA_INT(this) + 0x524); if (pbVar3 != pbVar2) { if (0xf < *(uint *)((char *)this + 0x550)) { pbVar2 = *(byte **)pbVar2; } ((std::string *)((char *)pbVar3))->std::string::assign(pbVar2,*(uint *)((char *)this + 0x54c)); } - if ((byte *)((int)this + 0x50c) != pbVar3) { + if ((byte *)(GHIDRA_INT(this) + 0x50c) != pbVar3) { if (0xf < *(uint *)((char *)this + 0x538)) { pbVar3 = *(byte **)pbVar3; } - ((std::string *)((char *)((int)this + 0x50c)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x534)); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x50c)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x534)); } - pbVar2 = (byte *)((int)this + 0x50c); - pbVar3 = (byte *)((int)this + 0x4f4); + pbVar2 = (byte *)(GHIDRA_INT(this) + 0x50c); + pbVar3 = (byte *)(GHIDRA_INT(this) + 0x4f4); if (pbVar3 != pbVar2) { if (0xf < *(uint *)((char *)this + 0x520)) { pbVar2 = *(byte **)pbVar2; } ((std::string *)((char *)pbVar3))->std::string::assign(pbVar2,*(uint *)((char *)this + 0x51c)); } - if ((byte *)((int)this + 0x4dc) != pbVar3) { + if ((byte *)(GHIDRA_INT(this) + 0x4dc) != pbVar3) { if (0xf < *(uint *)((char *)this + 0x508)) { pbVar3 = *(byte **)pbVar3; } - ((std::string *)((char *)((int)this + 0x4dc)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x504)); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x4dc)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x504)); } - assignedString = ((std::string *)((char *)((int)this + 0x7ac)))->std::string::assign((byte *)"Nicalis",7); - if ((std_string *)((int)this + 0x794) != assignedString) { + assignedString = ((std::string *)((char *)(GHIDRA_INT(this) + 0x7ac)))->std::string::assign((byte *)"Nicalis",7); + if ((std_string *)(GHIDRA_INT(this) + 0x794) != assignedString) { assignedSize = &assignedString->_size; if (0xf < assignedString->_capacity) { assignedString = *(std_string **)assignedString->_buf; } - ((std::string *)((char *)((int)this + 0x794)))->std::string::assign((byte *)assignedString,*assignedSize); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x794)))->std::string::assign((byte *)assignedString,*assignedSize); } - pbVar2 = (byte *)((int)this + 0x794); - pbVar3 = (byte *)((int)this + 0x77c); + pbVar2 = (byte *)(GHIDRA_INT(this) + 0x794); + pbVar3 = (byte *)(GHIDRA_INT(this) + 0x77c); if (pbVar3 != pbVar2) { if (0xf < *(uint *)((char *)this + 0x7a8)) { pbVar2 = *(byte **)pbVar2; } ((std::string *)((char *)pbVar3))->std::string::assign(pbVar2,*(uint *)((char *)this + 0x7a4)); } - if ((byte *)((int)this + 0x764) != pbVar3) { + if ((byte *)(GHIDRA_INT(this) + 0x764) != pbVar3) { if (0xf < *(uint *)((char *)this + 0x790)) { pbVar3 = *(byte **)pbVar3; } - ((std::string *)((char *)((int)this + 0x764)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x78c)); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x764)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x78c)); } - pbVar2 = (byte *)((int)this + 0x764); - pbVar3 = (byte *)((int)this + 0x74c); + pbVar2 = (byte *)(GHIDRA_INT(this) + 0x764); + pbVar3 = (byte *)(GHIDRA_INT(this) + 0x74c); if (pbVar3 != pbVar2) { if (0xf < *(uint *)((char *)this + 0x778)) { pbVar2 = *(byte **)pbVar2; } ((std::string *)((char *)pbVar3))->std::string::assign(pbVar2,*(uint *)((char *)this + 0x774)); } - if ((byte *)((int)this + 0x734) != pbVar3) { + if ((byte *)(GHIDRA_INT(this) + 0x734) != pbVar3) { if (0xf < *(uint *)((char *)this + 0x760)) { pbVar3 = *(byte **)pbVar3; } - ((std::string *)((char *)((int)this + 0x734)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x75c)); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x734)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x75c)); } - pbVar2 = (byte *)((int)this + 0x734); - pbVar3 = (byte *)((int)this + 0x71c); + pbVar2 = (byte *)(GHIDRA_INT(this) + 0x734); + pbVar3 = (byte *)(GHIDRA_INT(this) + 0x71c); if (pbVar3 != pbVar2) { if (0xf < *(uint *)((char *)this + 0x748)) { pbVar2 = *(byte **)pbVar2; } ((std::string *)((char *)pbVar3))->std::string::assign(pbVar2,*(uint *)((char *)this + 0x744)); } - if ((byte *)((int)this + 0x704) != pbVar3) { + if ((byte *)(GHIDRA_INT(this) + 0x704) != pbVar3) { if (0xf < *(uint *)((char *)this + 0x730)) { pbVar3 = *(byte **)pbVar3; } - ((std::string *)((char *)((int)this + 0x704)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x72c)); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x704)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x72c)); } - pbVar3 = (byte *)((int)this + 0x704); - if ((byte *)((int)this + 0x6ec) != pbVar3) { + pbVar3 = (byte *)(GHIDRA_INT(this) + 0x704); + if ((byte *)(GHIDRA_INT(this) + 0x6ec) != pbVar3) { if (0xf < *(uint *)((char *)this + 0x718)) { pbVar3 = *(byte **)pbVar3; } - ((std::string *)((char *)((int)this + 0x6ec)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x714)); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x6ec)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x714)); } - pbVar2 = (byte *)((int)this + 0x6ec); - pbVar3 = (byte *)((int)this + 0x6d4); + pbVar2 = (byte *)(GHIDRA_INT(this) + 0x6ec); + pbVar3 = (byte *)(GHIDRA_INT(this) + 0x6d4); if (pbVar3 != pbVar2) { if (0xf < *(uint *)((char *)this + 0x700)) { pbVar2 = *(byte **)pbVar2; } ((std::string *)((char *)pbVar3))->std::string::assign(pbVar2,*(uint *)((char *)this + 0x6fc)); } - if ((byte *)((int)this + 0x6bc) != pbVar3) { + if ((byte *)(GHIDRA_INT(this) + 0x6bc) != pbVar3) { if (0xf < *(uint *)((char *)this + 0x6e8)) { pbVar3 = *(byte **)pbVar3; } - ((std::string *)((char *)((int)this + 0x6bc)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x6e4)); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x6bc)))->std::string::assign(pbVar3,*(uint *)((char *)this + 0x6e4)); } ExceptionList = local_1c; return; @@ -456,7 +456,7 @@ void OnlineEmotes::init() uint setCount; int *setEnd; - piVar1 = (int *)((int)this + 0x7cc); + piVar1 = (int *)(GHIDRA_INT(this) + 0x7cc); *(undefined4 *)((char *)this + 0x804) = *(undefined4 *)((char *)this + 0x840); *(undefined4 *)((char *)this + 0x830) = *(undefined4 *)((char *)this + 0x844); *(undefined1 *)this = 1; @@ -468,7 +468,7 @@ void OnlineEmotes::init() if (setCount < 3) { if (setCount < 2) { emoteSets = *(int *)((char *)this + 0x7d4) - *piVar1; - if ((uint)(emoteSets / 0xc) < 2) { + if (GHIDRA_UINT((emoteSets / 0xc)) < 2) { FUN_008d28c0(emoteSets,&local_8); } else { @@ -491,11 +491,11 @@ void OnlineEmotes::init() std::vector<4byte>::_Emplace_reallocate(setEnd,&local_8); } else { - *setEnd = (int)pvVar3; + *setEnd = GHIDRA_INT(pvVar3); *(int *)(emoteSets + 4) = *(int *)(emoteSets + 4) + 4; } - pvVar3 = (void *)((int)pvVar3 + 1); - } while ((int)pvVar3 < 0x14); + pvVar3 = (void *)(GHIDRA_INT(pvVar3) + 1); + } while (GHIDRA_INT(pvVar3) < 0x14); pvVar3 = (void *)0x30; do { emoteSets = *piVar1; @@ -505,17 +505,17 @@ void OnlineEmotes::init() std::vector<4byte>::_Emplace_reallocate(setEnd,&local_8); } else { - *setEnd = (int)pvVar3; + *setEnd = GHIDRA_INT(pvVar3); *(int *)(emoteSets + 0x10) = *(int *)(emoteSets + 0x10) + 4; } - pvVar3 = (void *)((int)pvVar3 + 1); - } while ((int)pvVar3 < 0x3b); + pvVar3 = (void *)(GHIDRA_INT(pvVar3) + 1); + } while (GHIDRA_INT(pvVar3) < 0x3b); piVar1 = (int *)*piVar1; - iVar2 = *(int *)((char *)this + 2000) - (int)piVar1; + iVar2 = *(int *)((char *)this + 2000) - GHIDRA_INT(piVar1); emoteSets = iVar2 >> 0x1f; if (iVar2 / 0xc + emoteSets == emoteSets) { KAGE_LogMessage(8,(byte *)"Invalid set index %d \n"); - load_anm2((void *)((int)this + 8)); + load_anm2((void *)(GHIDRA_INT(this) + 8)); *(undefined1 *)((char *)this + 0x18) = 0; return; } @@ -525,8 +525,8 @@ void OnlineEmotes::init() __uint_to_double_fixup[-(piVar1[1] - *piVar1 >> 0x1f)]); *(float *)((char *)this + 0x838) = angleStep; *(int *)((char *)this + 0x834) = - (int)(((float)*(int *)((char *)this + 0x834) * oldAngleStep) / angleStep + 0.5); - load_anm2((void *)((int)this + 8)); + GHIDRA_INT((((float)*(int *)((char *)this + 0x834) * oldAngleStep) / angleStep + 0.5)); + load_anm2((void *)(GHIDRA_INT(this) + 8)); *(undefined1 *)((char *)this + 0x18) = 0; return; } diff --git a/src/game/online_stats_screen.cpp b/src/game/online_stats_screen.cpp index ca7d2d2..f3bb4e2 100644 --- a/src/game/online_stats_screen.cpp +++ b/src/game/online_stats_screen.cpp @@ -11,7 +11,7 @@ OnlineStatsScreen::~OnlineStatsScreen() puStack_c = &LAB_00af09f0; local_10 = ExceptionList; ExceptionList = &local_10; - FUN_008ca5b0(__security_cookie ^ (int)register0x00000010 - 4U); + FUN_008ca5b0(__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); std::vector<56byte_string>::_Tidy(); _eh_vector_destructor_iterator_(&(*(undefined1 *)((char *)(this) + 0x118)),0x114,4,ANM2::~ANM2); local_8 = 0; diff --git a/src/game/options_config.cpp b/src/game/options_config.cpp index 012d753..24eb927 100644 --- a/src/game/options_config.cpp +++ b/src/game/options_config.cpp @@ -24,7 +24,7 @@ byte OptionsConfig::read_bool(byte *key, byte isDefault) local_8 = (int ***)0xffffffff; puStack_c = &LAB_00af824d; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(value + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((value + 10)); ExceptionList = &local_10; FUN_00684590(rawValue,key,this); local_8 = (int ***)0x0; @@ -39,9 +39,9 @@ byte OptionsConfig::read_bool(byte *key, byte isDefault) textCursor = ppppbVar3; do { ch = *(byte *)textCursor; - textCursor = (byte ****)((int)textCursor + 1); + textCursor = (byte ****)(GHIDRA_INT(textCursor) + 1); } while (ch != 0); - ((std::string *)((char *)value))->std::string::assign((byte *)ppppbVar3,(int)textCursor - (int)((int)ppppbVar3 + 1)); + ((std::string *)((char *)value))->std::string::assign((byte *)ppppbVar3,GHIDRA_INT(textCursor) - GHIDRA_INT((GHIDRA_INT(ppppbVar3) + 1))); if (valueSize == 0) { LAB_00684309: isDefault = 0; @@ -61,7 +61,7 @@ LAB_00684309: uVar1 = 0; } else { - uVar1 = -(uint)isLess | 1; + uVar1 = -GHIDRA_UINT(isLess) | 1; } if (uVar1 != 0) goto LAB_006842a6; } @@ -82,7 +82,7 @@ LAB_006842a6: uVar1 = 0; } else { - uVar1 = -(uint)isLess | 1; + uVar1 = -GHIDRA_UINT(isLess) | 1; } if (uVar1 == 0) goto LAB_00684305; } @@ -102,7 +102,7 @@ LAB_00684305: if (0xfff < uVar1) { ppppiVar2 = (int ****)value[0][-1]; uVar1 = valueCapacity + 0x24; - if (0x1f < (uint)((int)value[0] + (-4 - (int)ppppiVar2))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(value[0]) + (-4 - GHIDRA_INT(ppppiVar2))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -116,7 +116,7 @@ LAB_00684346: if (0xfff < uVar1) { ppppbVar3 = (byte ****)rawValue[0][-1]; uVar1 = rawValueCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)rawValue[0] + (-4 - (int)ppppbVar3))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(rawValue[0]) + (-4 - GHIDRA_INT(ppppbVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -175,7 +175,7 @@ void OptionsConfig::reset_defaults() this->_enableSteamCloud = 1; this->_enablePauseOnFocusLost = 1; this->_enableMouseControl = 0; - sizeResult = glfw_get_window_size(windowSize,(int)this); + sizeResult = glfw_get_window_size(windowSize,GHIDRA_INT(this)); this->_windowWidth = *sizeResult; sizeResult = glfw_get_window_size(windowSize,unused); this->_windowHeight = sizeResult[1]; @@ -224,7 +224,7 @@ void OptionsConfig::load_config_ini() manager = g_manager; puStack_c = &LAB_00b0a77d; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)&(&configName)[1]._size; + uVar1 = __security_cookie ^ GHIDRA_UINT(&(&configName)[1]._size); ExceptionList = &local_10; this->_enableColorCorrection = 1; this->_enableLighting = 1; @@ -243,34 +243,34 @@ void OptionsConfig::load_config_ini() local_8 = 0; local_14 = uVar1; ((ModManager *)(&manager->_modManager))->ModManager::TryRedirectPath((std_string *)redirectedPath,&configName); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; pathText = extraout_EAX; if (0xf < *(uint *)(extraout_EAX + 0x14)) { pathText = *(byte **)extraout_EAX; } file = ((FileSystem *)(&PTR_vftable_00c37a10))->FileSystem::Open(pathText,(int *)0x0); - local_8 = (uint)local_8._1_3_ << 8; - if (0xf < (uint)local_30) { - uVar3 = (int)local_30 + 1; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; + if (0xf < GHIDRA_UINT(local_30)) { + uVar3 = GHIDRA_INT(local_30) + 1; pvVar2 = redirectedPath[0]; if (0xfff < uVar3) { - pvVar2 = *(void **)((int)redirectedPath[0] + -4); - uVar3 = (int)local_30 + 0x24; - if (0x1f < (uint)((int)redirectedPath[0] + (-4 - (int)pvVar2))) goto LAB_009242ab; + pvVar2 = *(void **)(GHIDRA_INT(redirectedPath[0]) + -4); + uVar3 = GHIDRA_INT(local_30) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPath[0]) + (-4 - GHIDRA_INT(pvVar2))))) goto LAB_009242ab; } operator_delete(pvVar2,uVar3); } local_8 = -1; local_34 = 0.0; local_30 = 2.10195e-44; - redirectedPath[0] = (void *)((uint)redirectedPath[0] & 0xffffff00); + redirectedPath[0] = (void *)(GHIDRA_UINT(redirectedPath[0]) & 0xffffff00); if (0xf < configName._capacity) { uVar3 = configName._capacity + 1; - pvVar2 = (void *)configName._buf._0_4_; + pvVar2 = (*(undefined4 *)((char *)&((void *)configName._buf) + 0x0)); if (0xfff < uVar3) { - pvVar2 = *(void **)(configName._buf._0_4_ + -4); + pvVar2 = *(void **)((*(undefined4 *)((char *)&(configName._buf) + 0x0)) + -4); uVar3 = configName._capacity + 0x24; - if (0x1f < (uint)(configName._buf._0_4_ + (-4 - (int)pvVar2))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(configName._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar2))))) { LAB_009242ab: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -287,7 +287,7 @@ LAB_009242ab: keyvalue_map_parse(pvVar2); local_8 = 3; tracked_alloc(1,pvVar2,0); - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); isEnabled = read_bool((OptionsConfig *)keyValues,(byte *)"EnableColorCorrection",1); this->_enableColorCorrection = isEnabled; isEnabled = read_bool((OptionsConfig *)keyValues,(byte *)"EnableCaustics",1); @@ -309,7 +309,7 @@ LAB_009242ab: isEnabled = read_bool((OptionsConfig *)keyValues,(byte *)"EnableColorModifier",1); this->_enableColorModifier = isEnabled; this->_getsSetToEnableWaterSurface = this->_enableWaterSurface; - FUN_00431200(keyValues,*(undefined4 *)((int)keyValues[0] + 4)); + FUN_00431200(keyValues,*(undefined4 *)(GHIDRA_INT(keyValues[0]) + 4)); operator_delete(keyValues[0],0x40); } ExceptionList = local_10; @@ -353,13 +353,13 @@ void OptionsConfig::Load(byte *path) undefined4 local_8; Manager *manager; - local_8._0_1_ = 0xff; - local_8._1_1_ = 0xff; - local_8._2_1_ = 0xff; - local_8._3_1_ = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x2)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x3)) = 0xff; puStack_c = &LAB_00b0a7cd; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(betaKey + 0x30); + local_14 = __security_cookie ^ GHIDRA_UINT((betaKey + 0x30)); ExceptionList = &local_10; local_74 = path; config = this; @@ -369,7 +369,7 @@ void OptionsConfig::Load(byte *path) isMusicEnabled = *pbVar4; pbVar4 = pbVar4 + 1; } while (isMusicEnabled != 0); - ((std::string *)((char *)this))->std::string::assign(path,(int)pbVar4 - (int)(path + 1)); + ((std::string *)((char *)this))->std::string::assign(path,GHIDRA_INT(pbVar4) - GHIDRA_INT((path + 1))); piVar1 = ((SaveDataManager *)(&PTR_vftable_00c5aa80))->SaveDataManager::open_file_read(path); isLegacyPath = 0; local_7c = (byte *******)piVar1; @@ -382,11 +382,11 @@ void OptionsConfig::Load(byte *path) pbVar4 = pbVar4 + 1; } while (isMusicEnabled != 0); legacyPathSize = piVar1; - ((std::string *)((char *)legacyPath))->std::string::assign(local_74,(int)pbVar4 - (int)(local_74 + 1)); - local_8._0_1_ = 0; - local_8._1_1_ = 0; - local_8._2_1_ = 0; - local_8._3_1_ = 0; + ((std::string *)((char *)legacyPath))->std::string::assign(local_74,GHIDRA_INT(pbVar4) - GHIDRA_INT((local_74 + 1))); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0; + (*(undefined1 *)((char *)&(local_8) + 0x2)) = 0; + (*(undefined1 *)((char *)&(local_8) + 0x3)) = 0; local_74 = std::_Allocate(0x20); searchTextSize = 3.92364e-44; searchTextCapacity = 4.34403e-44; @@ -420,9 +420,9 @@ void OptionsConfig::Load(byte *path) local_74[0x1a] = 'e'; local_74[0x1b] = '+'; local_74[0x1c] = 0; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; local_7c = (byte *******)legacyPath; - if (0xf < (uint)legacyPathCapacity) { + if (0xf < GHIDRA_UINT(legacyPathCapacity)) { local_7c = legacyPath[0]; } searchText = local_74; @@ -432,12 +432,12 @@ void OptionsConfig::Load(byte *path) piVar1 = legacyPathSize + -7; } isLegacyPath = *local_74; - pppppppbVar6 = (byte *******)((int)piVar1 + (int)local_7c); + pppppppbVar6 = (byte *******)(GHIDRA_INT(piVar1) + GHIDRA_INT(local_7c)); LAB_00924554: if (*(byte *)pppppppbVar6 != isLegacyPath) { LAB_009245a7: if (pppppppbVar6 == local_7c) goto LAB_009245c8; - pppppppbVar6 = (byte *******)((int)pppppppbVar6 + -1); + pppppppbVar6 = (byte *******)(GHIDRA_INT(pppppppbVar6) + -1); goto LAB_00924554; } uVar5 = 0x18; @@ -457,7 +457,7 @@ LAB_009245a7: uVar5 = 0; } else { - uVar5 = -(uint)isLess | 1; + uVar5 = -GHIDRA_UINT(isLess) | 1; } goto LAB_0092459a; } @@ -469,16 +469,16 @@ LAB_009245a7: uVar5 = 0; LAB_0092459a: if (uVar5 != 0) goto LAB_009245a7; - if ((int)pppppppbVar6 - (int)local_7c != 0xffffffff) { + if (GHIDRA_INT(pppppppbVar6) - GHIDRA_INT(local_7c) != 0xffffffff) { std::string::replace - ((char *)legacyPath,(int)pppppppbVar6 - (int)local_7c,0x1c, + ((char *)legacyPath,GHIDRA_INT(pppppppbVar6) - GHIDRA_INT(local_7c),0x1c, (byte *)"Binding of Isaac Afterbirth+",0x1c); } LAB_009245c8: this = config; } pppppppbVar6 = (byte *******)legacyPath; - if (0xf < (uint)legacyPathCapacity) { + if (0xf < GHIDRA_UINT(legacyPathCapacity)) { pppppppbVar6 = legacyPath[0]; } piVar1 = ((SaveDataManager *)(&PTR_vftable_00c5aa80))->SaveDataManager::open_file_read((byte *)pppppppbVar6); @@ -486,16 +486,16 @@ LAB_009245c8: if (piVar1 == (int *)0x0) { Save(this); operator_delete(local_74,0x20); - if ((uint)legacyPathCapacity < 0x10) { + if (GHIDRA_UINT(legacyPathCapacity) < 0x10) { ExceptionList = local_10; return; } - uVar5 = (int)legacyPathCapacity + 1; + uVar5 = GHIDRA_INT(legacyPathCapacity) + 1; local_6c[0] = legacyPath[0]; if (0xfff < uVar5) { local_6c[0] = (byte *******)legacyPath[0][-1]; - uVar5 = (int)legacyPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)legacyPath[0] + (-4 - (int)local_6c[0]))) { + uVar5 = GHIDRA_INT(legacyPathCapacity) + 0x24; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(legacyPath[0]) + (-4 - GHIDRA_INT(local_6c[0])))) { LAB_0092466d: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -505,38 +505,38 @@ LAB_0092466d: } isLegacyPath = 1; operator_delete(local_74,0x20); - local_8._0_1_ = 0xff; - local_8._1_1_ = 0xff; - local_8._2_1_ = 0xff; - local_8._3_1_ = 0xff; - if (0xf < (uint)legacyPathCapacity) { - uVar5 = (int)legacyPathCapacity + 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x2)) = 0xff; + (*(undefined1 *)((char *)&(local_8) + 0x3)) = 0xff; + if (0xf < GHIDRA_UINT(legacyPathCapacity)) { + uVar5 = GHIDRA_INT(legacyPathCapacity) + 1; pppppppbVar6 = legacyPath[0]; if (0xfff < uVar5) { pppppppbVar6 = (byte *******)legacyPath[0][-1]; - uVar5 = (int)legacyPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)legacyPath[0] + (-4 - (int)pppppppbVar6))) + uVar5 = GHIDRA_INT(legacyPathCapacity) + 0x24; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(legacyPath[0]) + (-4 - GHIDRA_INT(pppppppbVar6)))) goto LAB_0092466d; } operator_delete(pppppppbVar6,uVar5); } legacyPathSize = (int *)0x0; legacyPathCapacity = 2.10195e-44; - legacyPath[0] = (byte *******)((uint)legacyPath[0] & 0xffffff00); + legacyPath[0] = (byte *******)(GHIDRA_UINT(legacyPath[0]) & 0xffffff00); } iVar2 = (**(code **)(*piVar1 + 4))(); fileText = operator_new_tracked(iVar2 + 1); pppppppbVar6 = local_7c; *(undefined1 *)((char *)fileText + iVar2) = 0; - (**(code **)((int)*local_7c + 0x14))(fileText,1,iVar2); + (**(code **)(GHIDRA_INT(*local_7c) + 0x14))(fileText,1,iVar2); (*(code *)**pppppppbVar6)(1); keyvalue_map_parse(fileText); - local_8._0_1_ = 3; - local_8._1_1_ = 0; - local_8._2_1_ = 0; - local_8._3_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0; + (*(undefined1 *)((char *)&(local_8) + 0x2)) = 0; + (*(undefined1 *)((char *)&(local_8) + 0x3)) = 0; tracked_alloc(1,fileText,0); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; FUN_00684130("Language",0); ((Manager *)(g_manager))->Manager::validate_language(unused); FUN_006843a0("MusicVolume"); @@ -740,7 +740,7 @@ void OptionsConfig::Save() uint local_44; byte lineChar; - local_44 = __security_cookie ^ (uint)auStack_174; + local_44 = __security_cookie ^ GHIDRA_UINT(auStack_174); if (0xf < (this->_optionsIniFilePath)._capacity) { this = *(OptionsConfig **)(this->_optionsIniFilePath)._buf; } @@ -766,7 +766,7 @@ void OptionsConfig::Save() lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); - uStack_190 = (int)lineEnd - (int)(abStack_154 + 1); + uStack_190 = GHIDRA_INT(lineEnd) - GHIDRA_INT((abStack_154 + 1)); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_160,0x100,(byte *)"MusicVolume=%.4f\r\n"); lineEnd = abStack_160; @@ -1104,48 +1104,48 @@ void OptionsConfig::Save() lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); - sprintf_s((byte *)((int)register0x00000010 + -0x3a0),0x100,(byte *)"WindowPosX=%d\r\n"); - lineCursor = (char *)((int)register0x00000010 + -0x3a0); + sprintf_s((byte *)(GHIDRA_INT(register0x00000010) + -0x3a0),0x100,(byte *)"WindowPosX=%d\r\n"); + lineCursor = (char *)(GHIDRA_INT(register0x00000010) + -0x3a0); do { cVar1 = *lineCursor; lineCursor = lineCursor + 1; } while (cVar1 != '\0'); - (**(code **)(*file + 0x1c))((int)register0x00000010 + -0x3a0,1); + (**(code **)(*file + 0x1c))(GHIDRA_INT(register0x00000010) + -0x3a0,1); sprintf_s(abStackY_4a4 + 0xf8,0x100,(byte *)"WindowPosY=%d\r\n"); lineEnd = abStackY_4a4 + 0xf8; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); - (**(code **)(*file + 0x1c))(abStackY_4a4 + 0xf8,1,(int)lineEnd - (int)(abStackY_4a4 + 0xf9)); + (**(code **)(*file + 0x1c))(abStackY_4a4 + 0xf8,1,GHIDRA_INT(lineEnd) - GHIDRA_INT((abStackY_4a4 + 0xf9))); sprintf_s(abStackY_4a4 + 0xec,0x100,(byte *)"UseExclusiveFullscreen=%d\r\n"); lineEnd = abStackY_4a4 + 0xec; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); - (**(code **)(*file + 0x1c))(abStackY_4a4 + 0xec,1,(int)lineEnd - (int)(abStackY_4a4 + 0xed)); + (**(code **)(*file + 0x1c))(abStackY_4a4 + 0xec,1,GHIDRA_INT(lineEnd) - GHIDRA_INT((abStackY_4a4 + 0xed))); sprintf_s(abStackY_4a4 + 0xe0,0x100,(byte *)"EnableEpicOverlay=%d\r\n"); lineEnd = abStackY_4a4 + 0xe0; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); - (**(code **)(*file + 0x1c))(abStackY_4a4 + 0xe0,1,(int)lineEnd - (int)(abStackY_4a4 + 0xe1)); + (**(code **)(*file + 0x1c))(abStackY_4a4 + 0xe0,1,GHIDRA_INT(lineEnd) - GHIDRA_INT((abStackY_4a4 + 0xe1))); sprintf_s(abStackY_4a4 + 0xd4,0x100,(byte *)"EosCrossplay=%d\r\n"); lineEnd = abStackY_4a4 + 0xd4; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); - (**(code **)(*file + 0x1c))(abStackY_4a4 + 0xd4,1,(int)lineEnd - (int)(abStackY_4a4 + 0xd5)); + (**(code **)(*file + 0x1c))(abStackY_4a4 + 0xd4,1,GHIDRA_INT(lineEnd) - GHIDRA_INT((abStackY_4a4 + 0xd5))); sprintf_s(abStackY_4a4 + 200,0x100,&DAT_00b657f8); lineEnd = abStackY_4a4 + 200; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); - (**(code **)(*file + 0x1c))(abStackY_4a4 + 200,1,(int)lineEnd - (int)(abStackY_4a4 + 0xc9)); + (**(code **)(*file + 0x1c))(abStackY_4a4 + 200,1,GHIDRA_INT(lineEnd) - GHIDRA_INT((abStackY_4a4 + 0xc9))); (**(code **)*file)(1); return; } @@ -1207,8 +1207,8 @@ void OptionsConfig::set_vsync(uint param_2) videoMode = 0; } else { - isModeOk = (*DAT_00c736fc)(pvVar1,(int)pvVar1 + 0x98U); - videoMode = -(uint)(isModeOk != 0) & (int)pvVar1 + 0x98U; + isModeOk = (*DAT_00c736fc)(pvVar1,GHIDRA_INT(pvVar1) + 0x98U); + videoMode = -GHIDRA_UINT((isModeOk != 0)) & GHIDRA_INT(pvVar1) + 0x98U; } hzRatio = (float)*(int *)(videoMode + 0x14) / 60.0; FUN_00925f30(); diff --git a/src/game/path_finder.cpp b/src/game/path_finder.cpp index 8eb04ca..49720e8 100644 --- a/src/game/path_finder.cpp +++ b/src/game/path_finder.cpp @@ -74,7 +74,7 @@ void PathFinder::Reset() this->_evadeMovementCountdown = 0; *(undefined4 *)(this + 1) = 0; this[1]._movementTarget.x = 0.0; - root = *(_Tree_node **)((int)fVar1 + 4); + root = *(_Tree_node **)(GHIDRA_INT(fVar1) + 4); *(float *)&(*(undefined1 *)((char *)(this) + 0x734)) = zeroY; FID_conflict__Erase_tree_>_> (this_00,(fuzzer_allocator_> *)this_00,root); @@ -173,7 +173,7 @@ void PathFinder::EvadeTarget(Vector *targetPos, byte isIgnoreStatusEffects) local_14 = 0xffffffff; puStack_18 = &LAB_00b00a1d; local_1c = ExceptionList; - uVar3 = __security_cookie ^ (uint)(local_84 + 0x74); + uVar3 = __security_cookie ^ GHIDRA_UINT((local_84 + 0x74)); ExceptionList = &local_1c; local_34 = this; puVar1 = local_84 + 0x80; @@ -206,7 +206,7 @@ void PathFinder::EvadeTarget(Vector *targetPos, byte isIgnoreStatusEffects) this[1]._movementTarget.x = pVVar4->x; local_3c.x = *(float *)(iVar6 + 0x20); if ((((*(uint *)(iVar6 + 0x168) & 0x4000) == 0) && (bVar2 = ((Game *)(g_game))->Game::IsPaused(), bVar2 == 0)) - && (iVar5 = g_game->_frameCount + (int)local_3c.x, local_3c.x = 1.96182e-44, iVar5 % 0xe == 0)) + && (iVar5 = g_game->_frameCount + GHIDRA_INT(local_3c.x), local_3c.x = 1.96182e-44, iVar5 % 0xe == 0)) { scratchPos.x = *(float *)local_3c.y; scratchPos.y = *(float *)((char *)local_3c.y + 4); @@ -221,7 +221,7 @@ void PathFinder::EvadeTarget(Vector *targetPos, byte isIgnoreStatusEffects) iVar6 = *(int *)this; this->_evadeMovementCountdown = this->_evadeMovementCountdown - - ((int)*(float *)(iVar6 + 0x3a4) - (int)*(float *)(iVar6 + 0x3a0)); + (GHIDRA_INT(*(float *)(iVar6 + 0x3a4)) - GHIDRA_INT(*(float *)(iVar6 + 0x3a0))); } else { if (this->_evadeMovementCountdown < 1) { @@ -235,12 +235,12 @@ void PathFinder::EvadeTarget(Vector *targetPos, byte isIgnoreStatusEffects) game = g_game; local_3c.x = *(float *)(iVar6 + 0x20); if ((((*(uint *)(iVar6 + 0x168) & 0x4000) == 0) && (bVar2 = ((Game *)(g_game))->Game::IsPaused(), bVar2 == 0)) - && ((game->_frameCount + (int)local_3c.x) % 0x1e == 0)) { + && ((game->_frameCount + GHIDRA_INT(local_3c.x)) % 0x1e == 0)) { fVar8 = this[1]._movementTarget.y; visitedSet = &this[1]._movementTarget.y; FID_conflict__Erase_tree_>_> (visitedSet,(fuzzer_allocator_> *)visitedSet, - *(_Tree_node **)((int)fVar8 + 4)); + *(_Tree_node **)(GHIDRA_INT(fVar8) + 4)); *(float *)((char *)fVar8 + 4) = fVar8; *(float *)fVar8 = fVar8; *(float *)((char *)fVar8 + 8) = fVar8; @@ -294,10 +294,10 @@ void PathFinder::EvadeTarget(Vector *targetPos, byte isIgnoreStatusEffects) do { uVar3 = Random(); local_34 = (PathFinder *) - ((float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 450.0 + 30.0); uVar3 = Random(); - local_44 = (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + local_44 = (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_44 = local_44 + local_44; local_40 = sin(local_44); @@ -307,8 +307,8 @@ void PathFinder::EvadeTarget(Vector *targetPos, byte isIgnoreStatusEffects) fVar8 = 40.0; gridIndex = 120.0; scratchPos.y = local_40 * 0.5 * (float)local_34 + local_4c; - iVar5 = (int)((scratchPos.x - 40.0) / 40.0 + 0.5); - iVar6 = (int)((scratchPos.y - 120.0) / 40.0 + 0.5); + iVar5 = GHIDRA_INT(((scratchPos.x - 40.0) / 40.0 + 0.5)); + iVar6 = GHIDRA_INT(((scratchPos.y - 120.0) / 40.0 + 0.5)); if ((((iVar5 < 0) || (iVar7 = *(int *)((char *)g_game->_room + 0xc), iVar7 <= iVar5)) || (iVar6 < 0)) || (*(int *)((char *)g_game->_room + 0x10) <= iVar6)) { gridIndex = -NAN; @@ -318,8 +318,8 @@ void PathFinder::EvadeTarget(Vector *targetPos, byte isIgnoreStatusEffects) } local_2c = gridIndex; std::set::find_node(local_84,&local_2c); - if ((*(char *)((int)&local_7c->_gridWidth + 1) == '\0') && - (local_7c->_gridHeight <= (int)gridIndex)) { + if ((*(char *)(GHIDRA_INT(&local_7c->_gridWidth) + 1) == '\0') && + (local_7c->_gridHeight <= GHIDRA_INT(gridIndex))) { local_28 = (Room *)this[1]._movementTarget.y; if (local_7c == local_28) goto LAB_007e4e8c; attempt = attempt - 0.7; @@ -330,7 +330,7 @@ LAB_007e4e8c: foundNode = (undefined8 *)std::set::find_node(local_90,&local_2c); insertPos = *foundNode; if ((*(char *)(*(int *)(foundNode + 1) + 0xd) != '\0') || - ((int)gridIndex < *(int *)(*(int *)(foundNode + 1) + 0x10))) { + (GHIDRA_INT(gridIndex) < *(int *)(*(int *)(foundNode + 1) + 0x10))) { if (*(int *)&(*(undefined1 *)((char *)&(this[1]) + 0xc)) == 0xccccccc) { /* WARNING: Subroutine does not return */ FUN_004170d0(); @@ -341,23 +341,23 @@ LAB_007e4e8c: newNode = operator_new(0x14); local_14 = 0xffffffff; local_58 = 0; - newNode[4] = (int)gridIndex; - *newNode = (int)local_28; - newNode[1] = (int)local_28; - newNode[2] = (int)local_28; + newNode[4] = GHIDRA_INT(gridIndex); + *newNode = GHIDRA_INT(local_28); + newNode[1] = GHIDRA_INT(local_28); + newNode[2] = GHIDRA_INT(local_28); *(undefined2 *)(newNode + 3) = 0; std::_Tree::_Insert_node - (&this[1]._movementTarget.y,(void *)insertPos,insertPos._4_4_,newNode); + (&this[1]._movementTarget.y,(void *)insertPos,(*(undefined4 *)((char *)&(insertPos) + 0x4)),newNode); fVar8 = 40.0; fVar9 = 0.5; gridIndex = 120.0; } pRVar10 = g_game->_room; iVar6 = pRVar10->_gridWidth; - scratchPos.x = (float)((int)gridIndex % iVar6) * fVar8 + fVar8; - scratchPos.y = (float)((int)gridIndex / iVar6) * fVar8 + gridIndex; - iVar7 = (int)((scratchPos.x - fVar8) / fVar8 + fVar9); - iVar5 = (int)((scratchPos.y - gridIndex) / fVar8 + fVar9); + scratchPos.x = (float)(GHIDRA_INT(gridIndex) % iVar6) * fVar8 + fVar8; + scratchPos.y = (float)(GHIDRA_INT(gridIndex) / iVar6) * fVar8 + gridIndex; + iVar7 = GHIDRA_INT(((scratchPos.x - fVar8) / fVar8 + fVar9)); + iVar5 = GHIDRA_INT(((scratchPos.y - gridIndex) / fVar8 + fVar9)); if ((((iVar7 < 0) || (iVar6 <= iVar7)) || (iVar5 < 0)) || (pRVar10->_gridHeight <= iVar5)) { iVar7 = -1; @@ -418,7 +418,7 @@ LAB_007e4e8c: if ((*(uint *)(*(int *)this + 0x168) & 0x4000) == 0) { bVar2 = ((Game *)(g_game))->Game::IsPaused(); if (bVar2 == 0) { - iVar6 = game->_frameCount + (int)local_4c; + iVar6 = game->_frameCount + GHIDRA_INT(local_4c); local_4c = 1.4013e-44; pVVar4 = (Vector *)local_3c.x; fVar8 = *(float *)local_3c.x; @@ -590,12 +590,12 @@ LAB_007e5667: pvVar1 = g_game->_room; do { fVar12 = ((fVar14 * (float)local_94 + *(float *)(iVar8 + 0x33c)) - 40.0) / 40.0 + 0.5; - iVar8 = (int)fVar12; + iVar8 = GHIDRA_INT(fVar12); if ((((iVar8 < 0) || (*(int *)((char *)pvVar1 + 0xc) <= iVar8)) || - (iVar8 = (int)(((local_80->y * (float)local_94 + *movementTargetY) - 120.0) / 40.0 - + 0.5), iVar8 < 0)) || + (iVar8 = GHIDRA_INT((((local_80->y * (float)local_94 + *movementTargetY) - 120.0) / 40.0 + + 0.5)), iVar8 < 0)) || ((*(int *)((char *)pvVar1 + 0x10) <= iVar8 || - (uVar6 = *(int *)((char *)pvVar1 + 0xc) * iVar8 + (int)fVar12, 0x1bf < uVar6)))) { + (uVar6 = *(int *)((char *)pvVar1 + 0xc) * iVar8 + GHIDRA_INT(fVar12), 0x1bf < uVar6)))) { uVar6 = 0; } else { @@ -617,30 +617,30 @@ LAB_007e5667: uVar6 = uVar6 - 3000; } } - if (((300 < (int)uVar6) && ((0 < attemptsLeft || (0x3e6 < (int)uVar6)))) && - (((*(uint *)(iVar8 + 0x168) & 0x1000800) == 0 || (800 < (int)uVar6)))) { + if (((300 < GHIDRA_INT(uVar6)) && ((0 < attemptsLeft || (0x3e6 < GHIDRA_INT(uVar6))))) && + (((*(uint *)(iVar8 + 0x168) & 0x1000800) == 0 || (800 < GHIDRA_INT(uVar6))))) { uVar3 = iVar10 - 1; break; } iVar10 = iVar10 + 1; local_94 = local_94 + 0x28; - } while (iVar10 < (int)uVar3); + } while (iVar10 < GHIDRA_INT(uVar3)); } iVar8 = *(int *)this; - fVar12 = (float)(int)(uVar3 * 0x28) * local_80->y + *(float *)(iVar8 + 0x340); - fVar14 = (float)(int)(uVar3 * 0x28) * fVar14 + *(float *)(iVar8 + 0x33c); + fVar12 = (float)GHIDRA_INT((uVar3 * 0x28)) * local_80->y + *(float *)(iVar8 + 0x340); + fVar14 = (float)GHIDRA_INT((uVar3 * 0x28)) * fVar14 + *(float *)(iVar8 + 0x33c); uVar6 = local_a0 + 2 & 0x80000003; - if ((int)uVar6 < 0) { + if (GHIDRA_INT(uVar6) < 0) { uVar6 = (uVar6 - 1 | 0xfffffffc) + 1; } uVar4 = local_a0 & 0x80000003; - if ((int)uVar4 < 0) { + if (GHIDRA_INT(uVar4) < 0) { uVar4 = (uVar4 - 1 | 0xfffffffc) + 1; } pvVar1 = g_game->_room; - iVar10 = (int)(((axisDirs[uVar6].x * 40.0 + fVar14) - 40.0) / 40.0 + 0.5); + iVar10 = GHIDRA_INT((((axisDirs[uVar6].x * 40.0 + fVar14) - 40.0) / 40.0 + 0.5)); if ((((iVar10 < 0) || (*(int *)((char *)pvVar1 + 0xc) <= iVar10)) || - (iVar9 = (int)(((axisDirs[uVar6].y * 40.0 + fVar12) - 120.0) / 40.0 + 0.5), iVar9 < 0) + (iVar9 = GHIDRA_INT((((axisDirs[uVar6].y * 40.0 + fVar12) - 120.0) / 40.0 + 0.5)), iVar9 < 0) ) || ((*(int *)((char *)pvVar1 + 0x10) <= iVar9 || (uVar6 = iVar9 * *(int *)((char *)pvVar1 + 0xc) + iVar10, 0x1bf < uVar6)))) { uVar6 = 0; @@ -663,8 +663,8 @@ LAB_007e5667: } } } - iVar10 = (int)(((axisDirs[uVar4].x * 40.0 + fVar14) - 40.0) / 40.0 + 0.5); - iVar9 = (int)(((axisDirs[uVar4].y * 40.0 + fVar12) - 120.0) / 40.0 + 0.5); + iVar10 = GHIDRA_INT((((axisDirs[uVar4].x * 40.0 + fVar14) - 40.0) / 40.0 + 0.5)); + iVar9 = GHIDRA_INT((((axisDirs[uVar4].y * 40.0 + fVar12) - 120.0) / 40.0 + 0.5)); if (((iVar10 < 0) || (*(int *)((char *)pvVar1 + 0xc) <= iVar10)) || ((iVar9 < 0 || ((*(int *)((char *)pvVar1 + 0x10) <= iVar9 || @@ -689,7 +689,7 @@ LAB_007e5667: } } } - if ((((int)uVar6 < 200) || ((int)uVar4 < 200)) || (uVar6 = Random(), uVar6 % 10 == 0)) { + if (((GHIDRA_INT(uVar6) < 200) || (GHIDRA_INT(uVar4) < 200)) || (uVar6 = Random(), uVar6 % 10 == 0)) { *local_8c = uVar3; } } @@ -711,18 +711,18 @@ LAB_007e5b55: uVar7 = uVar6; do { uVar5 = uVar4 & 0x80000003; - if ((int)uVar5 < 0) { + if (GHIDRA_INT(uVar5) < 0) { uVar5 = (uVar5 - 1 | 0xfffffffc) + 1; } uVar6 = dirDistances[uVar5]; - if ((int)dirDistances[uVar5] <= (int)uVar7) { + if (GHIDRA_INT(dirDistances[uVar5]) <= GHIDRA_INT(uVar7)) { uVar6 = uVar7; uVar5 = uVar3; } uVar3 = uVar5; uVar4 = uVar4 + 1; uVar7 = uVar6; - } while ((int)uVar4 < iVar8); + } while (GHIDRA_INT(uVar4) < iVar8); } else { playerTarget = ((Entity_NPC *)(npc))->Entity_NPC::GetPlayerTarget(); @@ -731,18 +731,18 @@ LAB_007e5b55: uVar7 = uVar4; do { uVar5 = uVar7 & 0x80000003; - if ((int)uVar5 < 0) { + if (GHIDRA_INT(uVar5) < 0) { uVar5 = (uVar5 - 1 | 0xfffffffc) + 1; } pVVar2 = Isaac::GetAxisAlignedUnitVectorFromDir(&dirVec,uVar5); if (fVar12 * pVVar2->y + fVar14 * pVVar2->x <= 0.0) { - if ((int)uVar6 < (int)dirDistances[uVar5]) { + if (GHIDRA_INT(uVar6) < GHIDRA_INT(dirDistances[uVar5])) { uVar6 = dirDistances[uVar5]; uVar3 = uVar5; } } uVar7 = uVar7 + 1; - } while ((int)uVar7 < (int)(uVar4 + 4)); + } while (GHIDRA_INT(uVar7) < GHIDRA_INT((uVar4 + 4))); if (uVar6 == 0) { if (ABS(fVar12) <= ABS(fVar14)) { uVar5 = 1; @@ -750,14 +750,14 @@ LAB_007e5b55: do { uVar6 = dirDistances[uVar5]; candidateDir = uVar5; - if ((int)dirDistances[uVar5] <= (int)uVar7) { + if (GHIDRA_INT(dirDistances[uVar5]) <= GHIDRA_INT(uVar7)) { uVar6 = uVar7; candidateDir = uVar3; } uVar3 = candidateDir; uVar5 = uVar5 + 2; uVar7 = uVar6; - } while ((int)uVar5 < 4); + } while (GHIDRA_INT(uVar5) < 4); } else { uVar5 = 0; @@ -765,26 +765,26 @@ LAB_007e5b55: do { uVar6 = dirDistances[uVar5]; candidateDir = uVar5; - if ((int)dirDistances[uVar5] <= (int)uVar7) { + if (GHIDRA_INT(dirDistances[uVar5]) <= GHIDRA_INT(uVar7)) { uVar6 = uVar7; candidateDir = uVar3; } uVar3 = candidateDir; uVar5 = uVar5 + 2; uVar7 = uVar6; - } while ((int)uVar5 < 4); + } while (GHIDRA_INT(uVar5) < 4); } if (uVar6 == 0) goto LAB_007e5b55; } } - if ((((int)uVar6 < 2) && (uVar4 = Random(), uVar4 % 10 != 0)) && + if (((GHIDRA_INT(uVar6) < 2) && (uVar4 = Random(), uVar4 % 10 != 0)) && ((*(uint *)(*(int *)this + 0x168) & 0x1000800) == 0)) { uVar3 = 0xffffffff; } uVar4 = *(int *)&(*(undefined1 *)((char *)(this) + 0x14)) - uVar3; - uVar7 = (int)uVar4 >> 0x1f; + uVar7 = GHIDRA_INT(uVar4) >> 0x1f; if (((((uVar4 ^ uVar7) - uVar7 != 2) || (uVar4 = Random(), uVar4 % 5 == 0)) || - ((*(uint *)(*(int *)this + 0x168) & 0x1000800) != 0)) && (-1 < (int)uVar3)) { + ((*(uint *)(*(int *)this + 0x168) & 0x1000800) != 0)) && (-1 < GHIDRA_INT(uVar3))) { if ((*(uint *)(*(int *)this + 0x168) & 0x1000800) != 0) { pVVar2 = Isaac::GetAxisAlignedUnitVectorFromDir(&chosenDirVec,uVar3); playerTarget = ((Entity_NPC *)(npc))->Entity_NPC::GetPlayerTarget(); @@ -799,30 +799,30 @@ LAB_007e5b55: } fVar14 = axisDirs[uVar3].x; pvVar1 = g_game->_room; - fVar12 = ((fVar14 * (float)(int)(uVar6 * 0x28) + *(float *)(*(int *)this + 0x33c)) - 40.0) / + fVar12 = ((fVar14 * (float)GHIDRA_INT((uVar6 * 0x28)) + *(float *)(*(int *)this + 0x33c)) - 40.0) / 40.0 + 0.5; - iVar8 = (int)fVar12; + iVar8 = GHIDRA_INT(fVar12); if (((iVar8 < 0) || (iVar10 = *(int *)((char *)pvVar1 + 0xc), iVar10 <= iVar8)) || - ((iVar8 = (int)((((float)(int)(uVar6 * 0x28) * axisDirs[uVar3].y + - *(float *)(*(int *)this + 0x340)) - 120.0) / 40.0 + 0.5), iVar8 < 0 || + ((iVar8 = GHIDRA_INT(((((float)GHIDRA_INT((uVar6 * 0x28)) * axisDirs[uVar3].y + + *(float *)(*(int *)this + 0x340)) - 120.0) / 40.0 + 0.5)), iVar8 < 0 || (*(int *)((char *)pvVar1 + 0x10) <= iVar8)))) { iVar10 = *(int *)((char *)pvVar1 + 0xc); iVar8 = -1; } else { - iVar8 = iVar8 * iVar10 + (int)fVar12; + iVar8 = iVar8 * iVar10 + GHIDRA_INT(fVar12); } fVar12 = (float)(iVar8 % iVar10) * 40.0 + 40.0; fVar13 = (float)(iVar8 / iVar10) * 40.0 + 120.0; - iVar8 = (int)((fVar12 - 40.0) / 40.0 + 0.5); + iVar8 = GHIDRA_INT(((fVar12 - 40.0) / 40.0 + 0.5)); if (((iVar8 < 0) || (iVar10 <= iVar8)) || - ((iVar9 = (int)((fVar13 - 120.0) / 40.0 + 0.5), iVar9 < 0 || + ((iVar9 = GHIDRA_INT(((fVar13 - 120.0) / 40.0 + 0.5)), iVar9 < 0 || (((*(int *)((char *)g_game->_room + 0x10) <= iVar9 || (uVar6 = iVar9 * iVar10 + iVar8, 0x1bf < uVar6)) || (*(int *)((char *)g_game->_room + uVar6 * 4 + 0x76c) != 999)))))) { *(uint *)&(*(undefined1 *)((char *)(this) + 0x14)) = uVar3; gridRoom = g_game->_room; - iVar10 = (int)((fVar13 - 120.0) / 40.0 + 0.5); + iVar10 = GHIDRA_INT(((fVar13 - 120.0) / 40.0 + 0.5)); if ((((iVar8 < 0) || (gridRoom->_gridWidth <= iVar8)) || (iVar10 < 0)) || (gridRoom->_gridHeight <= iVar10)) { iVar9 = -1; @@ -838,7 +838,7 @@ LAB_007e5b55: if ((2999 < gridRoom->_gridPaths[iVar9]) || (999 < gridRoom->_gridPaths[iVar9])) goto LAB_007e5e93; } - else if (*(int *)((int)gridRoom->_gridEntities[iVar9] + 0x3c) != 0) goto LAB_007e5e93; + else if (*(int *)(GHIDRA_INT(gridRoom->_gridEntities[iVar9]) + 0x3c) != 0) goto LAB_007e5e93; LAB_007e5ee3: (this->_movementTarget).x = fVar12; fVar12 = axisDirs[uVar3].y; @@ -881,7 +881,7 @@ LAB_007e62e0: return; LAB_007e5f59: if ((fVar14 != g_vectorZero.x) || ((this->_movementTarget).y != g_vectorZero.y)) { - if (1 < (int)local_74.x) { + if (1 < GHIDRA_INT(local_74.x)) { (this->_movementTarget).x = g_vectorZero.x; (this->_movementTarget).y = g_vectorZero.y; return; @@ -950,9 +950,9 @@ LAB_007e5f59: fVar12 = *(float *)(iVar8 + 0x364) * (1.0 / fVar12); } pvVar1 = g_game->_room; - iVar8 = (int)(((fVar11 * 40.0 + fVar15) - 40.0) / 40.0 + 0.5); + iVar8 = GHIDRA_INT((((fVar11 * 40.0 + fVar15) - 40.0) / 40.0 + 0.5)); if ((((iVar8 < 0) || (*(int *)((char *)pvVar1 + 0xc) <= iVar8)) || - (iVar10 = (int)(((fVar12 * 40.0 + fVar14) - 120.0) / 40.0 + 0.5), iVar10 < 0)) || + (iVar10 = GHIDRA_INT((((fVar12 * 40.0 + fVar14) - 120.0) / 40.0 + 0.5)), iVar10 < 0)) || ((*(int *)((char *)pvVar1 + 0x10) <= iVar10 || (uVar3 = *(int *)((char *)pvVar1 + 0xc) * iVar10 + iVar8, 0x1bf < uVar3)))) { gridPath = 0; @@ -1020,7 +1020,7 @@ byte PathFinder::MoveRandomly(byte isIgnoreStatusEffects) fVar4 = *(float *)(iVar5 + 0x33c); local_10.x = *(float *)(iVar5 + 0x340); rngValue = Random(); - fVar2 = (float)((double)(int)rngValue + __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + fVar2 = (float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 3.14; fVar2 = fVar2 + fVar2; fVar3 = cos(fVar2); @@ -1113,7 +1113,7 @@ void PathFinder::MoveRandomlyBoss(byte isIgnoreStatusEffects) fVar6 = *(float *)&(*(undefined1 *)((char *)(this) + 0xc)); if ((fVar6 == g_vectorZero.x) && (*(float *)&(*(undefined1 *)((char *)(this) + 0x10)) == g_vectorZero.y)) { uVar3 = Random(); - fVar4 = (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + fVar4 = (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 3.14; fVar4 = fVar4 + fVar4; fVar6 = cos(fVar4); @@ -1160,8 +1160,8 @@ void PathFinder::MoveRandomlyBoss(byte isIgnoreStatusEffects) fVar6 = *(float *)&(*(undefined1 *)((char *)(this) + 0xc)); local_10.x = *(float *)&(*(undefined1 *)((char *)(this) + 0x10)); room = g_game->_room; - iVar7 = (int)(((fVar6 * 10.0 + *(float *)(*(int *)this + 0x33c)) - 40.0) / 40.0 + 0.5); - gridY = (int)(((local_10.x * 10.0 + *(float *)(*(int *)this + 0x340)) - 120.0) / 40.0 + 0.5) + iVar7 = GHIDRA_INT((((fVar6 * 10.0 + *(float *)(*(int *)this + 0x33c)) - 40.0) / 40.0 + 0.5)); + gridY = GHIDRA_INT((((local_10.x * 10.0 + *(float *)(*(int *)this + 0x340)) - 120.0) / 40.0 + 0.5)) ; if ((((iVar7 < 0) || (room->_gridWidth <= iVar7)) || (gridY < 0)) || (room->_gridHeight <= gridY)) { @@ -1173,7 +1173,7 @@ void PathFinder::MoveRandomlyBoss(byte isIgnoreStatusEffects) uVar3 = ((Room *)(room))->Room::GetGridCollision(iVar7); if ((uVar3 == 0) || (triesLeft < 1)) break; uVar3 = Random(); - local_18.x = (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + local_18.x = (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_18.x = local_18.x + local_18.x; fVar4 = cos(local_18.x); @@ -1252,31 +1252,31 @@ void PathFinder::update_chase_movement() } fVar3 = local_20.y; pEVar1->_friction = pEVar1->_friction * 0.6; - local_14 = (float)((int)pEVar1->_updateTime - (int)pEVar1->_prevUpdateTime); + local_14 = (float)(GHIDRA_INT(pEVar1->_updateTime) - GHIDRA_INT(pEVar1->_prevUpdateTime)); if ((pEVar1->_flags & 0x1000b00) != 0) { *(undefined4 *)&(*(undefined1 *)((char *)(in_ECX) + 0x28)) = 10; } if ((Entity_NPC *)local_20.y != (Entity_NPC *)0x0) { - pEVar1 = *(Entity_NPC **)((int)((int)local_20.y + 0x168) + 4); + pEVar1 = *(Entity_NPC **)(GHIDRA_INT((GHIDRA_INT(local_20.y) + 0x168)) + 4); npcFlags = *(qword *)((char *)local_20.y + 0x168); local_20.y = (float)pEVar1; if ((npcFlags & 0x200) == 0) { if ((npcFlags & 0x100) == 0) { if ((npcFlags & 0x1000800) == 0) goto LAB_007e6de9; target = ((Entity_NPC *)((Entity_NPC *)fVar3))->Entity_NPC::GetPlayerTarget(); - fVar4 = ((Vector *)((int)fVar3 + 0x33c))->x - (target->_pos).x; - fVar3 = ((Vector *)((int)fVar3 + 0x33c))->y - (target->_pos).y; + fVar4 = ((Vector *)(GHIDRA_INT(fVar3) + 0x33c))->x - (target->_pos).x; + fVar3 = ((Vector *)(GHIDRA_INT(fVar3) + 0x33c))->y - (target->_pos).y; } else { local_20.y = (float)((Entity_NPC *)((Entity_NPC *)fVar3))->Entity_NPC::GetPlayerTarget(); isFrame = ((Entity *)((Entity *)fVar3))->Entity::IsFrame(5,*(int *)((char *)fVar3 + 0x20)); if (isFrame == 0) goto LAB_007e6de9; Reset(in_ECX); - local_20.x = ((Vector *)((int)local_20.y + 0x33c))->x; - local_20.y = ((Vector *)((int)local_20.y + 0x33c))->y; + local_20.x = ((Vector *)(GHIDRA_INT(local_20.y) + 0x33c))->x; + local_20.y = ((Vector *)(GHIDRA_INT(local_20.y) + 0x33c))->y; FindGridPath(in_ECX,&local_20,1.0,900,1); - fVar4 = ((Vector *)((int)fVar3 + 0x360))->x; - fVar3 = ((Vector *)((int)fVar3 + 0x360))->y; + fVar4 = ((Vector *)(GHIDRA_INT(fVar3) + 0x360))->x; + fVar3 = ((Vector *)(GHIDRA_INT(fVar3) + 0x360))->y; } fVar3 = atan2f(fVar3,fVar4); fVar3 = fVar3 * 57.295776; @@ -1286,14 +1286,14 @@ void PathFinder::update_chase_movement() if (rngResult % 5 != 0) goto LAB_007e6de9; rngResult = Random(); fVar3 = normalize_angle_degrees - ((float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * + ((float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 360.0); } (in_ECX->_movementTarget).x = fVar3; } LAB_007e6de9: - *(int *)&(*(undefined1 *)((char *)(in_ECX) + 0x28)) = *(int *)&(*(undefined1 *)((char *)(in_ECX) + 0x28)) - (int)local_14; + *(int *)&(*(undefined1 *)((char *)(in_ECX) + 0x28)) = *(int *)&(*(undefined1 *)((char *)(in_ECX) + 0x28)) - GHIDRA_INT(local_14); local_14 = (in_ECX->_movementTarget).y * 0.017453292; local_20.y = cos(local_14); local_14 = sin(local_14); @@ -1316,7 +1316,7 @@ LAB_007e6de9: } if (*(int *)&(*(undefined1 *)((char *)(in_ECX) + 0x28)) < 1) { rngResult = Random(); - fVar3 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + fVar3 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 360.0; if (360.0 < ABS(fVar3)) { fVar3 = fmodf(fVar3,360.0); @@ -1343,9 +1343,9 @@ void PathFinder::UpdateGridIndex() int gridX; int gridWidth; - gridX = (int)((*(float *)(*(int *)this + 0x33c) - 40.0) / 40.0 + 0.5); + gridX = GHIDRA_INT(((*(float *)(*(int *)this + 0x33c) - 40.0) / 40.0 + 0.5)); if ((((gridX < 0) || (gridWidth = *(int *)((char *)g_game->_room + 0xc), gridWidth <= gridX)) || - (gridY = (int)((*(float *)(*(int *)this + 0x340) - 120.0) / 40.0 + 0.5), gridY < 0)) || + (gridY = GHIDRA_INT(((*(float *)(*(int *)this + 0x340) - 120.0) / 40.0 + 0.5)), gridY < 0)) || (*(int *)((char *)g_game->_room + 0x10) <= gridY)) { *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x20)) = 0xffffffff; return; diff --git a/src/game/path_node.cpp b/src/game/path_node.cpp index f7a903e..b267bcf 100644 --- a/src/game/path_node.cpp +++ b/src/game/path_node.cpp @@ -15,8 +15,8 @@ PathNode::PathNode(void *other) *(undefined4 *)((char *)this + 0x10) = 0; srcBegin = *(void **)((char *)other + 8); if (srcBegin != *(void **)((char *)other + 0xc)) { - srcBytes = (int)*(void **)((char *)other + 0xc) - (int)srcBegin; - uVar1 = (int)srcBytes >> 2; + srcBytes = GHIDRA_INT(*(void **)((char *)other + 0xc)) - GHIDRA_INT(srcBegin); + uVar1 = GHIDRA_INT(srcBytes) >> 2; if (0x3fffffff < uVar1) { /* WARNING: Subroutine does not return */ FUN_0040cee0(); @@ -25,10 +25,10 @@ PathNode::PathNode(void *other) buffer = std::_Allocate(uVar1); *(void **)((char *)this + 8) = buffer; *(void **)((char *)this + 0xc) = buffer; - *(void **)((char *)this + 0x10) = (void *)((int)buffer + uVar1); + *(void **)((char *)this + 0x10) = (void *)(GHIDRA_INT(buffer) + uVar1); buffer = *(void **)((char *)this + 8); memmove(buffer,srcBegin,srcBytes); - *(void **)((char *)this + 0xc) = (void *)(uVar1 + (int)buffer); + *(void **)((char *)this + 0xc) = (void *)(uVar1 + GHIDRA_INT(buffer)); } return this; } diff --git a/src/game/pause_screen.cpp b/src/game/pause_screen.cpp index 013b7c0..2db9837 100644 --- a/src/game/pause_screen.cpp +++ b/src/game/pause_screen.cpp @@ -18,11 +18,11 @@ void PauseScreen::load_drop_player_menu() undefined4 local_14; byte *animData; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00af1f85; local_1c = ExceptionList; - securityCookie = __security_cookie ^ (int)register0x00000010 - 0x10U; + securityCookie = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; menuAnmPath._size = 0; menuAnmPath._capacity = 0xf; @@ -30,20 +30,20 @@ void PauseScreen::load_drop_player_menu() menuAnmPath._buf[1] = '\0'; menuAnmPath._buf[2] = '\0'; menuAnmPath._buf[3] = '\0'; - menuAnmPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(menuAnmPath._buf) + 0x0)) = std::_Allocate(0x20); menuAnmPath._size = 0x1b; menuAnmPath._capacity = 0x1f; - builtin_strncpy((char *)menuAnmPath._buf._0_4_,"gfx/ui/Menu_DropPlayer.anm2",0x1c); + builtin_strncpy((*(undefined4 *)((char *)&((char *)menuAnmPath._buf) + 0x0)),"gfx/ui/Menu_DropPlayer.anm2",0x1c); local_14 = 0; ((ANM2 *)((ANM2 *)(in_ECX + 4)))->ANM2::Load(&menuAnmPath,1); local_14 = 0xffffffff; if (0xf < menuAnmPath._capacity) { uVar3 = menuAnmPath._capacity + 1; - pcVar2 = (char *)menuAnmPath._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)menuAnmPath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(menuAnmPath._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(menuAnmPath._buf) + 0x0)) + -4); uVar3 = menuAnmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(menuAnmPath._buf._0_4_ + (-4 - (int)pcVar2))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(menuAnmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -70,7 +70,7 @@ LAB_008d1114: isLess = bVar1 < (byte)*pcVar2; if (bVar1 != *pcVar2) { LAB_008d1101: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_008d1106; } if (bVar1 == 0) break; @@ -91,20 +91,20 @@ LAB_008d1106: counterAnmPath._buf[1] = '\0'; counterAnmPath._buf[2] = '\0'; counterAnmPath._buf[3] = '\0'; - counterAnmPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(counterAnmPath._buf) + 0x0)) = std::_Allocate(0x20); counterAnmPath._size = 0x1e; counterAnmPath._capacity = 0x1f; - builtin_strncpy((char *)counterAnmPath._buf._0_4_,"gfx/ui/DropPlayer_Counter.anm2",0x1f); + builtin_strncpy((*(undefined4 *)((char *)&((char *)counterAnmPath._buf) + 0x0)),"gfx/ui/DropPlayer_Counter.anm2",0x1f); local_14 = 1; ((ANM2 *)((ANM2 *)(in_ECX + 0x118)))->ANM2::Load(&counterAnmPath,1); local_14 = 0xffffffff; if (0xf < counterAnmPath._capacity) { uVar3 = counterAnmPath._capacity + 1; - pcVar2 = (char *)counterAnmPath._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)counterAnmPath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(counterAnmPath._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(counterAnmPath._buf) + 0x0)) + -4); uVar3 = counterAnmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(counterAnmPath._buf._0_4_ + (-4 - (int)pcVar2))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(counterAnmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -114,7 +114,7 @@ LAB_008d1106: animData = *(byte **)(in_ECX + 0x14c); counterAnmPath._size = 0; counterAnmPath._capacity = 0xf; - counterAnmPath._buf._0_4_ = counterAnmPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(counterAnmPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(counterAnmPath._buf) + 0x0)) & 0xffffff00; if (animData != (byte *)0x0) { curAnimChar = animData; if (0xf < *(uint *)(animData + 0x14)) { @@ -126,7 +126,7 @@ LAB_008d1106: isLess = bVar1 < (byte)*pcVar2; if (bVar1 != *pcVar2) { LAB_008d1238: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_008d123d; } if (bVar1 == 0) break; @@ -244,7 +244,7 @@ void PauseScreen::update_player_info_page() else { LAB_008d154d: if (optionCount == 2) { - uVar2 = (uint)(this->_state == 0); + uVar2 = GHIDRA_UINT((this->_state == 0)); } else { uVar2 = 2; @@ -260,7 +260,7 @@ LAB_008d156b: if ((byte *)this->_state != local_8) { local_8 = (byte *)0x11a; seed_fart_sound_override((int *)&local_8); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_8,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_8),1.0,2,0,1.0,0.0); } goto LAB_008d1434; } @@ -269,7 +269,7 @@ LAB_008d156b: manager = g_manager; local_8 = (byte *)0x25; seed_fart_sound_override((int *)&local_8); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_8,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_8),1.0,2,0,1.0,0.0); } ((PopupWindow *)(&g_game->_pauseScreen))->PopupWindow::hide(); LAB_008d1434: @@ -289,7 +289,7 @@ LAB_008d1434: isLess = bVar1 < *newAnimChar; if (bVar1 != *newAnimChar) { LAB_008d15bc: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_008d15c1; } if (bVar1 == 0) break; @@ -357,7 +357,7 @@ void PauseScreen::build_player_user_list() local_8 = 0xffffffff; puStack_c = &LAB_00b05c7d; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; userIds = &(*(undefined1 *)((char *)(playerManager) + 0x22c)); playerManager = &g_game->_playerManager; @@ -370,24 +370,24 @@ void PauseScreen::build_player_user_list() do { playerListEnd = (playerManager->_playerList)._end; playerSlot = (playerManager->_playerList)._begin; - if ((int)playerListEnd - (int)playerSlot >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerSlot) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (playerManager->_playerList)._end; playerSlot = (playerManager->_playerList)._begin; } - if (playerIndex < (uint)((int)playerListEnd - (int)playerSlot >> 2)) { + if (playerIndex < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + playerIndex; } uVar5 = 0; iVar3 = *(int *)(*playerSlot + 0x1618); deviceIter = g_manager->_netplayManager; - deviceCount = *(int *)(g_manager + 1) - (int)deviceIter >> 2; + deviceCount = *(int *)(g_manager + 1) - GHIDRA_INT(deviceIter) >> 2; if (deviceCount != 0) { do { iVar7 = *(int *)deviceIter; if (*(int *)(iVar7 + 0xc) == iVar3) goto LAB_008d1a7d; uVar5 = uVar5 + 1; - deviceIter = (NetplayManager)((int)deviceIter + 4); + deviceIter = (NetplayManager)(GHIDRA_INT(deviceIter) + 4); } while (uVar5 < deviceCount); } KAGE_LogMessage(8,(byte *) @@ -402,10 +402,10 @@ LAB_008d1a7d: iVar3 = *(int *)(iVar3 + 0x374); if (iVar3 == 0) { local_24 = 0; - local_24._4_4_ = 0; - local_24._0_4_ = (undefined **)0x0; + (*(undefined4 *)((char *)&(local_24) + 0x4)) = 0; + (*(undefined4 *)((char *)&(local_24) + 0x0)) = (undefined **)0x0; uVar4 = (undefined **)local_24; - uVar6 = local_24._4_4_; + uVar6 = (*(undefined4 *)((char *)&(local_24) + 0x4)); } else { uVar4 = *(undefined4 *)(iVar3 + 8); @@ -434,14 +434,14 @@ LAB_008d1a7d: lobbyRefCount = (int *)0x0; local_8 = 0; ((std::shared_ptr *)(&local_3c))->std::shared_ptr::assign(&g_multiplayerLobbyPtr); - local_8._0_1_ = 1; - local_8._1_3_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0; uVar2 = 0; do { while( true ) { manager = g_manager; if ((local_3c == 0) || - ((uint)(*(int *)(local_3c + 0x14) - *(int *)(local_3c + 0x10) >> 3) <= uVar2)) { + (GHIDRA_UINT((*(int *)(local_3c + 0x14) - *(int *)(local_3c + 0x10) >> 3)) <= uVar2)) { local_8 = 5; if ((lobbyRefCount != (int *)0x0) && ((cVar1 = (**(code **)(*lobbyRefCount + 0xc))(), cVar1 != '\0' && @@ -451,31 +451,31 @@ LAB_008d1a7d: ExceptionList = local_10; return; } - local_24 = CONCAT44(local_24._4_4_,KAGE::System::UserProfileBase::vftable); + local_24 = CONCAT44((*(undefined4 *)((char *)&(local_24) + 0x4)),KAGE::System::UserProfileBase::vftable); ((UserProfile *)((void *)(*(int *)(local_3c + 0x10) + uVar2 * 8)))->UserProfile::find_or_create(); - local_8._0_1_ = 2; - local_24._0_4_ = KAGE::System::UserProfile::vftable; - local_24._4_4_ = extraout_EAX; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; + (*(undefined4 *)((char *)&(local_24) + 0x0)) = KAGE::System::UserProfile::vftable; + (*(undefined4 *)((char *)&(local_24) + 0x4)) = extraout_EAX; if (((extraout_EAX != 0) && (*(int *)(extraout_EAX + 8) != 0 || *(int *)(extraout_EAX + 0xc) != 0)) && (*(int *)(extraout_EAX + 0x14) == 0)) { ((KAGE::System::UserProfile *)(&local_24))->KAGE::System::UserProfile::load_steam_avatar(); } - local_8._0_1_ = 1; - if (local_24._4_4_ == 0) { + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; + if ((*(undefined4 *)((char *)&(local_24) + 0x4)) == 0) { userId = 0; - userId._4_4_ = 0; - userId._0_4_ = 0; - uVar4 = userId._4_4_; + (*(undefined4 *)((char *)&(userId) + 0x4)) = 0; + (*(undefined4 *)((char *)&(userId) + 0x0)) = 0; + uVar4 = (*(undefined4 *)((char *)&(userId) + 0x4)); uVar6 = (undefined4)userId; } else { - uVar4 = *(undefined4 *)(local_24._4_4_ + 0xc); - uVar6 = *(undefined4 *)(local_24._4_4_ + 8); + uVar4 = *(undefined4 *)((*(undefined4 *)((char *)&(local_24) + 0x4)) + 0xc); + uVar6 = *(undefined4 *)((*(undefined4 *)((char *)&(local_24) + 0x4)) + 8); } isAlreadyListed = ((NetplayManager *)(&manager->_netplayManager))->NetplayManager::is_user_in_player_list(CONCAT44(uVar4,uVar6)); - local_24 = CONCAT44(local_24._4_4_,KAGE::System::UserProfileBase::vftable); + local_24 = CONCAT44((*(undefined4 *)((char *)&(local_24) + 0x4)),KAGE::System::UserProfileBase::vftable); if (isAlreadyListed == 0) break; LAB_008d1ccc: uVar2 = uVar2 + 1; @@ -485,12 +485,12 @@ LAB_008d1ccc: local_14 = (undefined1 *)0x0; } else { - if ((uint)(*(int *)(local_3c + 0x14) - *(int *)(local_3c + 0x10) >> 3) <= uVar2) { + if (GHIDRA_UINT((*(int *)(local_3c + 0x14) - *(int *)(local_3c + 0x10) >> 3)) <= uVar2) { KAGE_LogMessage(0x10,(byte *)"Invalid lobby user index"); } memberProfile = KAGE::System::UserProfileBase::vftable; ((UserProfile *)((void *)(*(int *)(local_3c + 0x10) + uVar2 * 8)))->UserProfile::find_or_create(); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; memberProfile = KAGE::System::UserProfile::vftable; local_14 = extraout_EAX_00; if (((extraout_EAX_00 != (undefined1 *)0x0) && @@ -499,13 +499,13 @@ LAB_008d1ccc: ((KAGE::System::UserProfile *)(&memberProfile))->KAGE::System::UserProfile::load_steam_avatar(); } } - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; if (local_14 == (undefined1 *)0x0) { userId = 0; - userId._4_4_ = 0; - userId._0_4_ = 0; + (*(undefined4 *)((char *)&(userId) + 0x4)) = 0; + (*(undefined4 *)((char *)&(userId) + 0x0)) = 0; memberUserIdLow = (undefined4)userId; - memberUserIdHigh = userId._4_4_; + memberUserIdHigh = (*(undefined4 *)((char *)&(userId) + 0x4)); } else { memberUserIdLow = *(undefined4 *)(local_14 + 8); @@ -514,7 +514,7 @@ LAB_008d1ccc: userIdsEnd = *(undefined4 **)&(*(undefined1 *)((char *)(pauseScreen) + 0x230)); if (userIdsEnd == *(undefined4 **)&(*(undefined1 *)((char *)(pauseScreen) + 0x234))) { std::vector<8byte>::_Emplace_reallocate(userIdsEnd,&memberUserIdLow); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; memberProfile = KAGE::System::UserProfileBase::vftable; goto LAB_008d1ccc; } @@ -522,7 +522,7 @@ LAB_008d1ccc: userIdsEnd[1] = memberUserIdHigh; *(int *)(userIds + 4) = *(int *)(userIds + 4) + 8; uVar2 = uVar2 + 1; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; memberProfile = KAGE::System::UserProfileBase::vftable; } while( true ); } @@ -593,7 +593,7 @@ LAB_008d3472: (**(code **)(PTR_vftable_00c57b18 + 0x74))(iVar1,FUN_00a209e0,buttonAction,0,0); if (isActionTriggered != '\0') { uVar2 = *(int *)&(*(undefined1 *)((char *)(this) + 0x14)) + 1U & 0x80000003; - if ((int)uVar2 < 0) { + if (GHIDRA_INT(uVar2) < 0) { uVar2 = (uVar2 - 1 | 0xfffffffc) + 1; } *(uint *)&(*(undefined1 *)((char *)(this) + 0x14)) = uVar2; @@ -776,7 +776,7 @@ void PauseScreen::update_items_page() local_14 = 0xffffffff; puStack_18 = &LAB_00b05d65; local_1c = ExceptionList; - uVar7 = __security_cookie ^ (uint)(loadedImage + 0x48); + uVar7 = __security_cookie ^ GHIDRA_UINT((loadedImage + 0x48)); ExceptionList = &local_1c; local_48 = in_ECX; if (g_manager->_netplayManager == *(NetplayManager *)(g_manager + 1)) { @@ -786,7 +786,7 @@ void PauseScreen::update_items_page() else { local_44 = (InfoDisplay *)((InputManager *)(&g_manager->_netplayManager))->InputManager::FirstLocalDeviceID(); } - if ((uint)(in_ECX[7] - in_ECX[6]) < 4) { + if (GHIDRA_UINT((in_ECX[7] - in_ECX[6])) < 4) { ownerPlayer = (Entity_Player *)0x0; } else { @@ -802,17 +802,17 @@ void PauseScreen::update_items_page() local_34 = 0; local_3c = (ownerPlayer->_history)._historyItems._end; pvVar10 = (ownerPlayer->_history)._historyItems._begin; - iVar9 = (int)local_3c - (int)pvVar10 >> 0x1f; + iVar9 = GHIDRA_INT(local_3c) - GHIDRA_INT(pvVar10) >> 0x1f; local_40 = pvVar10; - if (((int)local_3c - (int)pvVar10) / 0x1c + iVar9 != iVar9) { + if ((GHIDRA_INT(local_3c) - GHIDRA_INT(pvVar10)) / 0x1c + iVar9 != iVar9) { local_28 = 0; do { pEVar5 = ownerPlayer; - if (*(char *)(local_28 + 4 + (int)pvVar10) == '\0') { - isOwned = ((Entity_Player *)(ownerPlayer))->Entity_Player::HasCollectible(*(int *)(local_28 + 8 + (int)pvVar10),0) + if (*(char *)(local_28 + 4 + GHIDRA_INT(pvVar10)) == '\0') { + isOwned = ((Entity_Player *)(ownerPlayer))->Entity_Player::HasCollectible(*(int *)(local_28 + 8 + GHIDRA_INT(pvVar10)),0) ; if (isOwned != 0) { - historyEntry = (undefined4 *)((int)(pEVar5->_history)._historyItems._begin + local_28); + historyEntry = (undefined4 *)(GHIDRA_INT((pEVar5->_history)._historyItems._begin) + local_28); if (puVar12 == shownItemsCapacity) { std::vector<28byte>::_Emplace_reallocate(puVar12,historyEntry); shownItemsCapacity = shownItemsVecCapacity; @@ -839,23 +839,23 @@ void PauseScreen::update_items_page() local_34 = local_34 + 1; local_3c = (pEVar5->_history)._historyItems._end; pvVar10 = (pEVar5->_history)._historyItems._begin; - } while (local_34 < (uint)(((int)local_3c - (int)pvVar10) / 0x1c)); + } while (local_34 < GHIDRA_UINT(((GHIDRA_INT(local_3c) - GHIDRA_INT(pvVar10)) / 0x1c))); shownItems = shownItemsVecBegin; in_ECX = local_48; local_40 = pvVar10; } - local_3c = (void *)((int)local_3c - (int)local_40); + local_3c = (void *)(GHIDRA_INT(local_3c) - GHIDRA_INT(local_40)); local_34 = 0; - if ((int)local_3c / 0x1c + ((int)local_3c >> 0x1f) != (int)local_3c >> 0x1f) { + if (GHIDRA_INT(local_3c) / 0x1c + (GHIDRA_INT(local_3c) >> 0x1f) != GHIDRA_INT(local_3c) >> 0x1f) { local_28 = 0; piVar8 = local_40; shownItemsVecBegin = shownItems; do { pEVar5 = ownerPlayer; - if (*(char *)(local_28 + 4 + (int)piVar8) == '\x01') { - isOwned = ((Entity_Player *)(ownerPlayer))->Entity_Player::HasTrinket(*(uint *)(local_28 + 8 + (int)piVar8),0); + if (*(char *)(local_28 + 4 + GHIDRA_INT(piVar8)) == '\x01') { + isOwned = ((Entity_Player *)(ownerPlayer))->Entity_Player::HasTrinket(*(uint *)(local_28 + 8 + GHIDRA_INT(piVar8)),0); if (isOwned != 0) { - historyEntry = (undefined4 *)((int)(pEVar5->_history)._historyItems._begin + local_28); + historyEntry = (undefined4 *)(GHIDRA_INT((pEVar5->_history)._historyItems._begin) + local_28); if (puVar12 == shownItemsCapacity) { std::vector<28byte>::_Emplace_reallocate(puVar12,historyEntry); shownItemsCapacity = shownItemsVecCapacity; @@ -882,13 +882,13 @@ void PauseScreen::update_items_page() local_34 = local_34 + 1; piVar8 = (ownerPlayer->_history)._historyItems._begin; } while (local_34 < - (uint)(((int)(ownerPlayer->_history)._historyItems._end - (int)piVar8) / 0x1c)); + GHIDRA_UINT(((GHIDRA_INT((ownerPlayer->_history)._historyItems._end) - GHIDRA_INT(piVar8)) / 0x1c))); shownItems = shownItemsVecBegin; in_ECX = local_48; } deviceId = local_44; piVar8 = (int *)in_ECX[0xd]; - local_28 = ((int)puVar12 - (int)shownItems) / 0x1c; + local_28 = (GHIDRA_INT(puVar12) - GHIDRA_INT(shownItems)) / 0x1c; shownItemsVecBegin = shownItems; local_40 = piVar8; if (local_28 == 0) { @@ -949,14 +949,14 @@ LAB_008d3bc8: } piVar8 = (int *)in_ECX[0xd]; iVar9 = in_ECX[0xc]; - if ((int)piVar8 < iVar9) { + if (GHIDRA_INT(piVar8) < iVar9) { iVar11 = 0; if (0 < iVar9 + -6) { iVar11 = iVar9 + -6; } } else { - if ((int)piVar8 < in_ECX[2] + iVar9) goto LAB_008d3caf; + if (GHIDRA_INT(piVar8) < in_ECX[2] + iVar9) goto LAB_008d3caf; iVar11 = local_28 + -1; if (iVar9 + 6 < local_28 + -1) { iVar11 = iVar9 + 6; @@ -968,30 +968,30 @@ LAB_008d3caf: piVar1 = (int *)in_ECX[0xe]; if (piVar1 == (int *)0x0) { LAB_008d3d91: - piVar1 = *(int **)((char *)shownItems + (int)piVar8 * 0x1c + 8); - if (*(char *)((char *)shownItems + (int)piVar8 * 0x1c + 4) == '\0') { + piVar1 = *(int **)((char *)shownItems + GHIDRA_INT(piVar8) * 0x1c + 8); + if (*(char *)((char *)shownItems + GHIDRA_INT(piVar8) * 0x1c + 4) == '\0') { local_44 = &g_manager->_infoDisplay; local_54 = piVar1; std::set::find_node(local_74,&local_54); if (((*(char *)((char *)local_6c + 0xd) == '\0') && - (*(int *)((char *)local_6c + 0x10) <= (int)piVar1)) && + (*(int *)((char *)local_6c + 0x10) <= GHIDRA_INT(piVar1))) && (local_6c != (local_44->_collectibles)._head)) { - local_6c = (void *)((int)local_6c + 0x14); + local_6c = (void *)(GHIDRA_INT(local_6c) + 0x14); } else { local_6c = &local_44->_defaultEntry; } - in_ECX[0xe] = (int)local_6c; + in_ECX[0xe] = GHIDRA_INT(local_6c); ((StatsPanel *)(local_6c))->StatsPanel::set(ownerPlayer,0); uVar7 = *(uint *)(in_ECX[0xe] + 4); if (g_game == (Game *)0x0) { - if ((int)uVar7 < 0) goto LAB_008d3f32; + if (GHIDRA_INT(uVar7) < 0) goto LAB_008d3f32; } - else if ((int)uVar7 < 0) { - if (((int)uVar7 < 0) && + else if (GHIDRA_INT(uVar7) < 0) { + if ((GHIDRA_INT(uVar7) < 0) && (pvVar10 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)~uVar7 < - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar10 >> 2)) { + GHIDRA_INT(~uVar7) < + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar10) >> 2)) { iVar9 = **(int **)((char *)pvVar10 + ~uVar7 * 4); } else { @@ -1000,7 +1000,7 @@ LAB_008d3d91: goto LAB_008d3ede; } pvVar10 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)uVar7 < (int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar10 >> 2) { + if (GHIDRA_INT(uVar7) < GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar10) >> 2) { iVar9 = *(int *)((char *)pvVar10 + uVar7 * 4); goto LAB_008d3ede; } @@ -1008,10 +1008,10 @@ LAB_008d3f32: ((KAGE::SmartPointer *)(in_ECX + 0xf))->KAGE::SmartPointer::reset((void *)0x0); } else { - local_44 = (InfoDisplay *)((uint)piVar1 & 0xffff7fff); + local_44 = (InfoDisplay *)(GHIDRA_UINT(piVar1) & 0xffff7fff); std::set::find_node(local_5c,&local_44); if ((*(char *)((char *)local_54 + 0xd) == '\0') && - (local_54[4] <= (int)((uint)piVar1 & 0xffff7fff))) { + (local_54[4] <= GHIDRA_INT((GHIDRA_UINT(piVar1) & 0xffff7fff)))) { piVar8 = local_54; } else { @@ -1023,11 +1023,11 @@ LAB_008d3f32: else { piVar8 = piVar8 + 5; } - in_ECX[0xe] = (int)piVar8; + in_ECX[0xe] = GHIDRA_INT(piVar8); ((StatsPanel *)(piVar8))->StatsPanel::set(ownerPlayer,0); uVar7 = *(uint *)(in_ECX[0xe] + 4) & 0x7fff; pvVar10 = (g_manager->_itemConfig)._trinkets._begin; - if ((int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar10 >> 2 <= (int)uVar7) + if (GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar10) >> 2 <= GHIDRA_INT(uVar7)) goto LAB_008d3f32; iVar9 = *(int *)((char *)pvVar10 + uVar7 * 4); LAB_008d3ede: @@ -1037,14 +1037,14 @@ LAB_008d3ede: path = *(byte **)path; } pvVar10 = Manager::LoadImage(loadedImage,path); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; ((KAGE::SmartPointer *)(in_ECX + 0xf))->KAGE::SmartPointer::operator_assign(pvVar10); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (((local_54 != (int *)0x0) && (cVar6 = (**(code **)(*local_54 + 0xc))(), cVar6 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(loadedImage); } - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; } in_ECX[0x11] = 0; iVar9 = in_ECX[0xe]; @@ -1055,31 +1055,31 @@ LAB_008d3ede: in_ECX = local_48; } else if (*piVar1 == 0) { - if (piVar1[1] != *(int *)((char *)shownItems + (int)piVar8 * 0x1c + 8)) goto LAB_008d3d91; + if (piVar1[1] != *(int *)((char *)shownItems + GHIDRA_INT(piVar8) * 0x1c + 8)) goto LAB_008d3d91; } else if ((*piVar1 == 1) && - (local_54 = piVar8, piVar1[1] != *(int *)((char *)shownItems + (int)piVar8 * 0x1c + 8))) + (local_54 = piVar8, piVar1[1] != *(int *)((char *)shownItems + GHIDRA_INT(piVar8) * 0x1c + 8))) goto LAB_008d3d91; manager = g_manager; if (piVar8 != local_40) { local_48 = (int *)0x11a; seed_fart_sound_override((int *)&local_48); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_48,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_48),1.0,2,0,1.0,0.0); } isArrowVisible = 0 < in_ECX[0xc]; arrowLayer = ((ANM2 *)((ANM2 *)(in_ECX + 0xc1)))->ANM2::GetLayer((byte *)"ItemsArrowUp"); arrowLayer->_visible = isArrowVisible; - isArrowVisible = (uint)in_ECX[2] < (uint)(local_28 - in_ECX[0xc]); + isArrowVisible = GHIDRA_UINT(in_ECX[2]) < GHIDRA_UINT((local_28 - in_ECX[0xc])); arrowLayer = ((ANM2 *)((ANM2 *)(in_ECX + 0xc1)))->ANM2::GetLayer((byte *)"ItemsArrowDown"); arrowLayer->_visible = isArrowVisible; LAB_008d3fcb: if (shownItems != (void *)0x0) { - uVar7 = (((int)shownItemsCapacity - (int)shownItems) / 0x1c) * 0x1c; + uVar7 = ((GHIDRA_INT(shownItemsCapacity) - GHIDRA_INT(shownItems)) / 0x1c) * 0x1c; pvVar10 = shownItems; if (0xfff < uVar7) { pvVar10 = *(void **)((char *)shownItems + -4); uVar7 = uVar7 + 0x23; - if (0x1f < (uint)((int)shownItems + (-4 - (int)pvVar10))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(shownItems) + (-4 - GHIDRA_INT(pvVar10))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1117,7 +1117,7 @@ void PauseScreen::update_trinket_display() local_10 = ExceptionList; ExceptionList = &local_10; trinketConfig = *(int *)&(*(undefined1 *)((char *)(this) + 0x18)); - if ((uint)(*(int *)&(*(undefined1 *)((char *)(this) + 0x1c)) - trinketConfig) < 4) { + if (GHIDRA_UINT((*(int *)&(*(undefined1 *)((char *)(this) + 0x1c)) - trinketConfig)) < 4) { local_14 = (Entity_Player *)0x0; trinketConfig = 0; } @@ -1133,21 +1133,21 @@ void PauseScreen::update_trinket_display() std::set::find_node(local_2c,&local_18); pEVar4 = local_14; if ((*(char *)((char *)infoNode + 0xd) != '\0') || - ((int)(uVar3 & 0xffff7fff) < *(int *)((char *)infoNode + 0x10))) { + (GHIDRA_INT((uVar3 & 0xffff7fff)) < *(int *)((char *)infoNode + 0x10))) { infoNode = (g_manager->_infoDisplay)._trinkets._head; } if (infoNode == (g_manager->_infoDisplay)._trinkets._head) { infoNode = &(g_manager->_infoDisplay)._defaultEntry; } else { - infoNode = (void *)((int)infoNode + 0x14); + infoNode = (void *)(GHIDRA_INT(infoNode) + 0x14); } *(void **)&(*(undefined1 *)((char *)(this) + 0x4c)) = infoNode; in_stack_ffffffb8 = 0x8d412a; ((StatsPanel *)(infoNode))->StatsPanel::set(local_14,(byte)(uVar3 >> 0xf) & 1); uVar3 = *(uint *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x4c)) + 4) & 0x7fff; pvVar2 = (g_manager->_itemConfig)._trinkets._begin; - if (((int)uVar3 < (int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar2 >> 2) && + if ((GHIDRA_INT(uVar3) < GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar2) >> 2) && (trinketConfig = *(int *)((char *)pvVar2 + uVar3 * 4), trinketConfig != 0)) { path = (byte *)(trinketConfig + 0x38); if (0xf < *(uint *)(trinketConfig + 0x4c)) { @@ -1225,13 +1225,13 @@ void PauseScreen::update_pocket_item_display() Manager *manager; int pocketId; - ppvStack_20 = (void **)((int)&cardAnm2Path + 0x50); + ppvStack_20 = (void **)(GHIDRA_INT(&cardAnm2Path) + 0x50); local_14 = 0xffffffff; puStack_18 = &LAB_00b05ddd; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)&cardAnm2Path + 0x44U; + local_24 = __security_cookie ^ GHIDRA_INT(&cardAnm2Path) + 0x44U; ExceptionList = &local_1c; - if ((uint)(*(int *)&(*(undefined1 *)((char *)(entityConfig) + 0x1c)) - *(int *)&(*(undefined1 *)((char *)(entityConfig) + 0x18))) < 4) { + if (GHIDRA_UINT((*(int *)&(*(undefined1 *)((char *)(entityConfig) + 0x1c)) - *(int *)&(*(undefined1 *)((char *)(entityConfig) + 0x18)))) < 4) { player = (Entity_Player *)0x0; } else { @@ -1260,16 +1260,16 @@ joined_r0x008d4475: goto joined_r0x008d4475; } if (((*(int *)&(*(undefined1 *)((char *)(entityConfig) + 0x60)) == 0) || (*(int *)&(*(undefined1 *)((char *)(entityConfig) + 0x178)) != pocketId)) || - (ppvStack_20 = (void **)((int)&cardAnm2Path + 0x50), + (ppvStack_20 = (void **)(GHIDRA_INT(&cardAnm2Path) + 0x50), *(int *)(*(int *)&(*(undefined1 *)((char *)(entityConfig) + 0x60)) + 4) != player->_pocketSlots[iVar5 * 2])) { *(int *)&(*(undefined1 *)((char *)(entityConfig) + 0x178)) = pocketId; if (player->_pocketSlots[iVar5 * 2 + 1] == 0) { - ppvStack_20 = (void **)((int)&cardAnm2Path + 0x50); + ppvStack_20 = (void **)(GHIDRA_INT(&cardAnm2Path) + 0x50); pocketId = ((ItemPool *)(&g_game->_itemPool))->ItemPool::GetPillEffect(player->_pocketSlots[iVar5 * 2],player); pocketId = InfoDisplay::get_pill(pocketId); *(int *)&(*(undefined1 *)((char *)(entityConfig) + 0x60)) = pocketId; uVar3 = player->_pocketSlots[iVar5 * 2] & 0x7ff; - uVar3 = -(uint)(uVar3 != 0) & uVar3; + uVar3 = -GHIDRA_UINT((uVar3 != 0)) & uVar3; uVar4 = 0xe; if (uVar3 < 0xe) { uVar4 = uVar3; @@ -1292,11 +1292,11 @@ joined_r0x008d4475: local_14 = 0xffffffff; if (0xf < anm2PathStr._capacity) { uVar4 = anm2PathStr._capacity + 1; - freePtr = (char *)anm2PathStr._buf._0_4_; + freePtr = (*(undefined4 *)((char *)&((char *)anm2PathStr._buf) + 0x0)); if (0xfff < uVar4) { - freePtr = *(char **)(anm2PathStr._buf._0_4_ + -4); + freePtr = *(char **)((*(undefined4 *)((char *)&(anm2PathStr._buf) + 0x0)) + -4); uVar4 = anm2PathStr._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2PathStr._buf._0_4_ + (-4 - (int)freePtr))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2PathStr._buf) + 0x0)) + (-4 - GHIDRA_INT(freePtr)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1308,20 +1308,20 @@ joined_r0x008d4475: } } else { - ppvStack_20 = (void **)((int)&cardAnm2Path + 0x50); + ppvStack_20 = (void **)(GHIDRA_INT(&cardAnm2Path) + 0x50); if (player->_pocketSlots[iVar5 * 2 + 1] == 1) { - ppvStack_20 = (void **)((int)&cardAnm2Path + 0x50); + ppvStack_20 = (void **)(GHIDRA_INT(&cardAnm2Path) + 0x50); cardDisplay = InfoDisplay::get_card(player->_pocketSlots[iVar5 * 2]); manager = g_manager; *(undefined4 *)&(*(undefined1 *)((char *)(entityConfig) + 0x60)) = cardDisplay; pocketId = player->_pocketSlots[iVar5 * 2]; if ((pocketId < 0) || - ((int)(manager->_itemConfig)._cards._end - (int)(manager->_itemConfig)._cards._begin >> 2 + (GHIDRA_INT((manager->_itemConfig)._cards._end) - GHIDRA_INT((manager->_itemConfig)._cards._begin) >> 2 <= pocketId)) { pocketId = 0; } else { - pocketId = *(int *)((int)(manager->_itemConfig)._cards._begin + pocketId * 4); + pocketId = *(int *)(GHIDRA_INT((manager->_itemConfig)._cards._begin) + pocketId * 4); } in_stack_ffffff80 = 5; pickupConfig = ((EntityConfig *)(&manager->_entityConfig))->EntityConfig::GetEntity(5,300,*(int *)(pocketId + 0x54)) @@ -1336,20 +1336,20 @@ joined_r0x008d4475: anm2PathStr._buf[1] = '\0'; anm2PathStr._buf[2] = '\0'; anm2PathStr._buf[3] = '\0'; - anm2PathStr._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2PathStr._buf) + 0x0)) = std::_Allocate(0x20); anm2PathStr._size = 0x19; anm2PathStr._capacity = 0x1f; - builtin_strncpy((char *)anm2PathStr._buf._0_4_,"gfx/ui/ui_cardspills.anm2",0x1a); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2PathStr._buf) + 0x0)),"gfx/ui/ui_cardspills.anm2",0x1a); local_14 = 1; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(entityConfig) + 0x64))))->ANM2::Load(&anm2PathStr,1); local_14 = 0xffffffff; if (0xf < anm2PathStr._capacity) { uVar4 = anm2PathStr._capacity + 1; - freePtr = (char *)anm2PathStr._buf._0_4_; + freePtr = (*(undefined4 *)((char *)&((char *)anm2PathStr._buf) + 0x0)); if (0xfff < uVar4) { - freePtr = *(char **)(anm2PathStr._buf._0_4_ + -4); + freePtr = *(char **)((*(undefined4 *)((char *)&(anm2PathStr._buf) + 0x0)) + -4); uVar4 = anm2PathStr._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2PathStr._buf._0_4_ + (-4 - (int)freePtr))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2PathStr._buf) + 0x0)) + (-4 - GHIDRA_INT(freePtr)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1381,11 +1381,11 @@ joined_r0x008d4475: local_14 = 0xffffffff; if (0xf < cardAnm2Path._capacity) { uVar4 = cardAnm2Path._capacity + 1; - pvVar2 = (void *)cardAnm2Path._buf._0_4_; + pvVar2 = (*(undefined4 *)((char *)&((void *)cardAnm2Path._buf) + 0x0)); if (0xfff < uVar4) { - pvVar2 = *(void **)(cardAnm2Path._buf._0_4_ + -4); + pvVar2 = *(void **)((*(undefined4 *)((char *)&(cardAnm2Path._buf) + 0x0)) + -4); uVar4 = cardAnm2Path._capacity + 0x24; - if (0x1f < (uint)(cardAnm2Path._buf._0_4_ + (-4 - (int)pvVar2))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(cardAnm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar2))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1394,7 +1394,7 @@ joined_r0x008d4475: } cardAnm2Path._size = 0; cardAnm2Path._capacity = 0xf; - cardAnm2Path._buf._0_4_ = cardAnm2Path._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(cardAnm2Path._buf) + 0x0)) = (*(undefined4 *)((char *)&(cardAnm2Path._buf) + 0x0)) & 0xffffff00; in_stack_ffffff80 = 0x8d4712; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(entityConfig) + 0x64))))->ANM2::Play(&DAT_00b6b338,0); } @@ -1451,7 +1451,7 @@ void PauseScreen::update_items_menu_selection() puStack_c = &LAB_00af1e1d; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; newPlayersEnd = (EntityPtr *)0x0; playersBuffer = (int *)0x0; @@ -1504,17 +1504,17 @@ void PauseScreen::update_items_menu_selection() } LAB_008d85f0: listBegin = *(void **)&(*(undefined1 *)((char *)(this) + 0x18)); - _Size = (int)newPlayersEnd - (int)piVar3; - local_1c = (EntityPtr)((int)_Size >> 2); - if (local_1c == (EntityPtr)(*(int *)&(*(undefined1 *)((char *)(this) + 0x1c)) - (int)listBegin >> 2)) { + _Size = GHIDRA_INT(newPlayersEnd) - GHIDRA_INT(piVar3); + local_1c = (EntityPtr)(GHIDRA_INT(_Size) >> 2); + if (local_1c == (EntityPtr)(*(int *)&(*(undefined1 *)((char *)(this) + 0x1c)) - GHIDRA_INT(listBegin) >> 2)) { EVar4 = (EntityPtr)0x0; if (local_1c != (EntityPtr)0x0) { - local_20 = (int)listBegin - (int)playersBuffer; + local_20 = GHIDRA_INT(listBegin) - GHIDRA_INT(playersBuffer); do { - if (*piVar3 != *(int *)(local_20 + (int)piVar3)) goto LAB_008d878b; - EVar4 = (EntityPtr)((int)EVar4 + 1); + if (*piVar3 != *(int *)(local_20 + GHIDRA_INT(piVar3))) goto LAB_008d878b; + EVar4 = (EntityPtr)(GHIDRA_INT(EVar4) + 1); piVar3 = piVar3 + 1; - } while ((uint)EVar4 < (uint)local_1c); + } while (GHIDRA_UINT(EVar4) < GHIDRA_UINT(local_1c)); } puVar6 = &(*(undefined1 *)((char *)(this) + 0x18)); if (g_manager->_netplayManager == *(NetplayManager *)(g_manager + 1)) { @@ -1530,7 +1530,7 @@ LAB_008d85f0: iVar2 = *(int *)&(*(undefined1 *)((char *)(this) + 0x14)); if (iVar2 == 0) { uVar1 = *(uint *)&(*(undefined1 *)((char *)(this) + 0x24)); - uVar5 = (uVar1 + 1) % (uint)(*(int *)&(*(undefined1 *)((char *)(this) + 0x1c)) - *(int *)puVar6 >> 2); + uVar5 = (uVar1 + 1) % GHIDRA_UINT((*(int *)&(*(undefined1 *)((char *)(this) + 0x1c)) - *(int *)puVar6 >> 2)); *(uint *)&(*(undefined1 *)((char *)(this) + 0x24)) = uVar5; if (uVar1 == uVar5) goto LAB_008d8819; goto LAB_008d87cd; @@ -1540,7 +1540,7 @@ LAB_008d85f0: local_1c = *(EntityPtr *)&(*(undefined1 *)((char *)(this) + 0x2c)); EVar4 = local_1c; do { - EVar4 = (EntityPtr)((int)EVar4 + 1U & 3); + EVar4 = (EntityPtr)(GHIDRA_INT(EVar4) + 1U & 3); *(EntityPtr *)&(*(undefined1 *)((char *)(this) + 0x2c)) = EVar4; if ((*(int *)&(*(undefined1 *)((char *)(this) + 0x1c)) - *(int *)puVar6 & 0xfffffffcU) == 0) { iVar2 = 0; @@ -1583,12 +1583,12 @@ LAB_008d85f0: LAB_008d878b: *(void **)&(*(undefined1 *)((char *)(this) + 0x1c)) = listBegin; if ((int **)&(*(undefined1 *)((char *)(this) + 0x18)) != &playersBegin) { - if ((uint)(*(int *)&(*(undefined1 *)((char *)(this) + 0x20)) - (int)listBegin >> 2) < (uint)local_1c) { + if (GHIDRA_UINT((*(int *)&(*(undefined1 *)((char *)(this) + 0x20)) - GHIDRA_INT(listBegin) >> 2)) < GHIDRA_UINT(local_1c)) { std::vector::reserve_clear(local_1c); listBegin = *(void **)&(*(undefined1 *)((char *)(this) + 0x18)); } memmove(listBegin,playersBuffer,_Size); - *(size_t *)&(*(undefined1 *)((char *)(this) + 0x1c)) = (int)listBegin + _Size; + *(size_t *)&(*(undefined1 *)((char *)(this) + 0x1c)) = GHIDRA_INT(listBegin) + _Size; } *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x24)) = 0; LAB_008d87cd: @@ -1605,12 +1605,12 @@ LAB_008d87cd: *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x5c)) = 0; LAB_008d8819: if (playersBuffer != (int *)0x0) { - uVar1 = (int)playersCapacity - (int)playersBuffer & 0xfffffffc; + uVar1 = GHIDRA_INT(playersCapacity) - GHIDRA_INT(playersBuffer) & 0xfffffffc; piVar3 = playersBuffer; if (0xfff < uVar1) { piVar3 = (int *)playersBuffer[-1]; uVar1 = uVar1 + 0x23; - if (0x1f < (uint)((int)playersBuffer + (-4 - (int)piVar3))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(playersBuffer) + (-4 - GHIDRA_INT(piVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1638,11 +1638,11 @@ void PauseScreen::constructor() ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x2c))))->ANM2::constructor(); local_8 = 0; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x140))))->ANM2::constructor(); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x254))))->ANM2::constructor(); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x368))))->ANM2::constructor(); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; ((ANM2 *)(&(this->_genericPrompt)._sprite))->ANM2::constructor(); (this->_genericPrompt)._isOnlineVote = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_genericPrompt)) + 0x114)) = 0; @@ -1650,7 +1650,7 @@ void PauseScreen::constructor() *(undefined4 *)&(*(undefined1 *)((char *)&((this->_genericPrompt)) + 0x11c)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_genericPrompt)) + 0x120)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_genericPrompt)) + 0x124)) = 0; - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; ((Menu_Options *)((Menu_Options *)&(*(undefined1 *)((char *)(this) + 0x5b0))))->Menu_Options::constructor(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x838)) = 6; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x83c)) = 6; @@ -1661,17 +1661,17 @@ void PauseScreen::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x850)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x854)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x858)) = 0; - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x868)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x86c)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x870)) = 0; ((KAGE::SmartPointer *)(&(*(undefined1 *)((char *)(this) + 0x874))))->KAGE::SmartPointer::SmartPointer((void *)0x0); - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x87c)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x880)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x884)) = 0; ((KAGE::SmartPointer *)(&(*(undefined1 *)((char *)(this) + 0x888))))->KAGE::SmartPointer::SmartPointer((void *)0x0); - local_8._0_1_ = 8; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 8; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x890)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x894)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x898)) = 0; @@ -1683,32 +1683,32 @@ void PauseScreen::constructor() *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x9cc)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x9d0)) = 0xf; (*(undefined1 *)((char *)(this) + 0x9bc)) = 0; - local_8._0_1_ = 10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 10; ((Font *)((Font *)&(*(undefined1 *)((char *)(this) + 0x9d4))))->Font::Font(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xa20)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xa24)) = 0x3f800000; - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0xa28))))->ANM2::constructor(); - local_8._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0xb3c))))->ANM2::constructor(); - local_8._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xd; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0xc50))))->ANM2::constructor(); - local_8._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xe; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0xd64))))->ANM2::constructor(); - local_8._0_1_ = 0xf; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xf; ((KAGE::SmartPointer *)(&(*(undefined1 *)((char *)(this) + 0xe78))))->KAGE::SmartPointer::SmartPointer((void *)0x0); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xe80)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xe84)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xe88)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xe8c)) = 0; - local_8._0_1_ = 0x11; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x11; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0xe94))))->ANM2::constructor(); - local_8._0_1_ = 0x12; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x12; ((MenuDialog *)(this + 1))->MenuDialog::constructor(); - local_8._0_1_ = 0x13; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x13; *(undefined4 *)&(*(undefined1 *)((char *)&(this[1]) + 0x268)) = 0; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)&(this[1]) + 0x26c))))->ANM2::constructor(); - local_8 = CONCAT31(local_8._1_3_,0x14); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x14); ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)&(this[1]) + 0x380))))->ANM2::constructor(); pGVar1 = &this[1]._genericPrompt; (pGVar1->_sprite)._animDefaultName._buf[0] = '\0'; @@ -1747,7 +1747,7 @@ PauseScreen::~PauseScreen() puStack_c = &LAB_00b0e5e0; local_10 = ExceptionList; ExceptionList = &local_10; - FUN_008d0f10(__security_cookie ^ (int)register0x00000010 - 4U); + FUN_008d0f10(__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); ((MenuDialog *)(this + 1))->MenuDialog::~MenuDialog(); local_8 = 0; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0xe94))))->ANM2::Reset(); @@ -1828,7 +1828,7 @@ void PauseScreen::Init() local_14 = 0xffffffff; puStack_18 = &LAB_00b0e62d; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(myStuffImage + 0x40); + local_24 = __security_cookie ^ GHIDRA_UINT((myStuffImage + 0x40)); ExceptionList = &local_1c; optionsPos.x = 0.0; optionsPos.y = 0.0; @@ -1847,20 +1847,20 @@ void PauseScreen::Init() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x17; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/PauseScreen.anm2",0x18); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/PauseScreen.anm2",0x18); local_14 = 0; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(deathScreenSprite) + 0x2c))))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar4 = anm2Path._capacity + 1; - pcVar3 = (char *)anm2Path._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - pcVar3 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar4 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1873,20 +1873,20 @@ void PauseScreen::Init() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1d; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/PauseScreen_small.anm2",0x1e); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/PauseScreen_small.anm2",0x1e); local_14 = 1; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(deathScreenSprite) + 0x140))))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar4 = anm2Path._capacity + 1; - pcVar3 = (char *)anm2Path._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - pcVar3 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar4 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1899,20 +1899,20 @@ void PauseScreen::Init() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1c; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/PauseScreenStats.anm2",0x1d); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/PauseScreenStats.anm2",0x1d); local_14 = 2; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(deathScreenSprite) + 0x254))))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar4 = anm2Path._capacity + 1; - pcVar3 = (char *)anm2Path._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - pcVar3 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar4 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1926,20 +1926,20 @@ void PauseScreen::Init() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x18; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/Death Screen.anm2",0x19); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/Death Screen.anm2",0x19); local_14 = 3; ((ANM2 *)((ANM2 *)deathScreenSprite))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar4 = anm2Path._capacity + 1; - pcVar3 = (char *)anm2Path._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar4) { - pcVar3 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar4 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1958,7 +1958,7 @@ void PauseScreen::Init() isLess = bVar2 < (byte)*pcVar3; if (bVar2 != *pcVar3) { LAB_009b5bd0: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_009b5bd5; } if (bVar2 == 0) break; @@ -1983,7 +1983,7 @@ LAB_009b5c01: layer = ((ANM2 *)((ANM2 *)deathScreenSprite))->ANM2::GetLayer(pbVar5); pbVar5 = pbVar5 + 1; layer->_visible = 0; - } while ((int)pbVar5 < 7); + } while (GHIDRA_INT(pbVar5) < 7); layer = ((ANM2 *)((ANM2 *)deathScreenSprite))->ANM2::GetLayer(&DAT_00000006); layer->_visible = 1; other = Manager::LoadImage(myStuffImage,(byte *)"gfx/ui/menu_mystuff.png"); @@ -2052,7 +2052,7 @@ void PauseScreen::Update() local_3c = (undefined1 *)0x0; cleanupFlags = (undefined1 *)0x0; savedThis = this; - cVar1 = FUN_009c3990(__security_cookie ^ (uint)(local_58 + 0x12)); + cVar1 = FUN_009c3990(__security_cookie ^ GHIDRA_UINT((local_58 + 0x12))); if (cVar1 != '\0') { ExceptionList = local_1c; return; @@ -2083,39 +2083,39 @@ void PauseScreen::Update() iVar3 = this->_state; if (iVar3 == 0) { if ((controllerIndex == 0) && - ((local_60 = CONCAT44(local_60._4_4_,(undefined4)local_60), + ((local_60 = CONCAT44((*(undefined4 *)((char *)&(local_60) + 0x4)),(undefined4)local_60), *(int *)&(*(undefined1 *)((char *)&(g_manager[1]._gamestate) + 0x290)) != 0 || - (local_60 = CONCAT44(local_60._4_4_,(undefined4)local_60), + (local_60 = CONCAT44((*(undefined4 *)((char *)&(local_60) + 0x4)),(undefined4)local_60), 0 < *(int *)&(*(undefined1 *)((char *)&(g_manager[1]._gamestate) + 0x2d8)))))) goto switchD_009b63f7_default; bVar2 = input_is_action_triggered(g_manager,0xc,controllerIndex,(Entity *)0x0,0); if (bVar2 == 0) { - local_60 = CONCAT44(local_60._4_4_,(undefined4)local_60); + local_60 = CONCAT44((*(undefined4 *)((char *)&(local_60) + 0x4)),(undefined4)local_60); if (iVar7 != 0) goto switchD_009b63f7_default; bVar2 = input_is_action_triggered(g_manager,0xf,0,(Entity *)0x0,0); - local_60 = CONCAT44(local_60._4_4_,(undefined4)local_60); + local_60 = CONCAT44((*(undefined4 *)((char *)&(local_60) + 0x4)),(undefined4)local_60); if ((bVar2 == 0) || - (local_60 = CONCAT44(local_60._4_4_,(undefined4)local_60), g_game->_emoteMenuState != 0)) + (local_60 = CONCAT44((*(undefined4 *)((char *)&(local_60) + 0x4)),(undefined4)local_60), g_game->_emoteMenuState != 0)) goto switchD_009b63f7_default; } Show(this); - local_60 = CONCAT44(local_60._4_4_,(undefined4)local_60); + local_60 = CONCAT44((*(undefined4 *)((char *)&(local_60) + 0x4)),(undefined4)local_60); goto switchD_009b63f7_default; } if (iVar3 != 1) { if (iVar3 == 2) { local_58[0] = (Entity_Player *)&DAT_0000000f; cVar1 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(controllerIndex,FUN_00a209e0,local_58,0,0); - local_60 = CONCAT44(local_60._4_4_,(undefined4)local_60); + local_60 = CONCAT44((*(undefined4 *)((char *)&(local_60) + 0x4)),(undefined4)local_60); if (cVar1 != '\0') { this->_state = 1; - local_60 = CONCAT44(local_60._4_4_,(undefined4)local_60); + local_60 = CONCAT44((*(undefined4 *)((char *)&(local_60) + 0x4)),(undefined4)local_60); } } else { - local_60 = CONCAT44(local_60._4_4_,(undefined4)local_60); + local_60 = CONCAT44((*(undefined4 *)((char *)&(local_60) + 0x4)),(undefined4)local_60); if (iVar3 == 5) { online_chat_window_update(); - local_60 = CONCAT44(local_60._4_4_,(undefined4)local_60); + local_60 = CONCAT44((*(undefined4 *)((char *)&(local_60) + 0x4)),(undefined4)local_60); } } goto switchD_009b63f7_default; @@ -2162,8 +2162,8 @@ LAB_009b5fbf: if (cVar1 != '\0') goto LAB_009b5fbf; } local_14 = (Entity_Player *)0xffffffff; - if (((uint)cleanupFlags & 1) != 0) { - cleanupFlags = (undefined1 *)((uint)cleanupFlags & 0xfffffffe); + if ((GHIDRA_UINT(cleanupFlags) & 1) != 0) { + cleanupFlags = (undefined1 *)(GHIDRA_UINT(cleanupFlags) & 0xfffffffe); ((KAGE::Network::Multiplayer::ConstLobby *)(&local_60))->KAGE::Network::Multiplayer::ConstLobby::~ConstLobby(); } if (local_21 == 0) { @@ -2184,7 +2184,7 @@ LAB_009b5fbf: local_58[0] = ((Game *)(g_game))->Game::GetPlayer(this->_playerIdx); pvVar5 = (local_58[0]->_history)._historyItems._end; local_3c = (local_58[0]->_history)._historyItems._begin; - iVar7 = ((int)pvVar5 - (int)local_3c) / 0x1c; + iVar7 = (GHIDRA_INT(pvVar5) - GHIDRA_INT(local_3c)) / 0x1c; iVar3 = iVar7 + -0x18; local_30 = 0; if (0 < iVar3) { @@ -2193,10 +2193,10 @@ LAB_009b5fbf: local_38 = (void *)0x4; if (iVar7 != 0) { local_34 = (Entity_Player *)0x0; - puVar6 = (undefined1 *)((int)pvVar5 + *(int *)&(*(undefined1 *)((char *)(this) + 0x24)) * -0x1c); + puVar6 = (undefined1 *)(GHIDRA_INT(pvVar5) + *(int *)&(*(undefined1 *)((char *)(this) + 0x24)) * -0x1c); if (puVar6 != local_3c) { do { - if (0x17 < (int)local_34) break; + if (0x17 < GHIDRA_INT(local_34)) break; prevHistoryItem = puVar6 + -0x1c; if (puVar6[-0x18] == '\0') { local_3c = *(undefined1 **)(puVar6 + -0x14); @@ -2204,17 +2204,17 @@ LAB_009b5fbf: else { local_3c = (undefined1 *)0x0; } - itemConfig = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible((int)local_3c); + itemConfig = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(GHIDRA_INT(local_3c)); if (itemConfig == (ItemConfig_Item *)0x0) { LAB_009b62cb: local_30 = local_30 + -1; - if ((int)local_34 < (int)local_38) { - local_38 = (void *)((int)local_38 + 1); + if (GHIDRA_INT(local_34) < GHIDRA_INT(local_38)) { + local_38 = (void *)(GHIDRA_INT(local_38) + 1); } } else { player = ((Game *)(g_game))->Game::GetPlayer(this->_playerIdx); - bVar2 = ((Entity_Player *)(player))->Entity_Player::HasCollectible((int)local_3c,1); + bVar2 = ((Entity_Player *)(player))->Entity_Player::HasCollectible(GHIDRA_INT(local_3c),1); if (bVar2 == 0) goto LAB_009b62cb; local_34 = (Entity_Player *)&(*(undefined1 *)((char *)(local_34) + 0x1)); } @@ -2223,8 +2223,8 @@ LAB_009b62cb: } } iVar3 = *(int *)&(*(undefined1 *)((char *)(this) + 0x24)); - *(int *)&(*(undefined1 *)((char *)(this) + 0x24)) = iVar3 + (int)local_38; - if (local_30 + 3 < iVar3 + (int)local_38) { + *(int *)&(*(undefined1 *)((char *)(this) + 0x24)) = iVar3 + GHIDRA_INT(local_38); + if (local_30 + 3 < iVar3 + GHIDRA_INT(local_38)) { iVar7 = 0; if (0 < iVar3) { iVar7 = iVar3; @@ -2246,7 +2246,7 @@ LAB_009b60e4: if (0 < iVar3) { do { local_38 = (player->_history)._historyItems._begin; - iVar3 = ((int)(player->_history)._historyItems._end - (int)local_38) / 0x1c - iVar3; + iVar3 = (GHIDRA_INT((player->_history)._historyItems._end) - GHIDRA_INT(local_38)) / 0x1c - iVar3; if ((*(char *)((char *)local_38 + iVar3 * 0x1c + 4) == '\0') && (itemConfig = ItemConfig::GetCollectible (&g_manager->_itemConfig, @@ -2315,15 +2315,15 @@ LAB_009b6311: } local_58[0] = (Entity_Player *)&DAT_0000000e; cVar1 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(controllerIndex,FUN_00a209e0,local_58,0,0); - local_60 = CONCAT44(local_60._4_4_,(undefined4)local_60); + local_60 = CONCAT44((*(undefined4 *)((char *)&(local_60) + 0x4)),(undefined4)local_60); if (cVar1 == '\0') goto switchD_009b63f7_default; - local_60 = CONCAT44(local_60._4_4_,(undefined4)local_60); + local_60 = CONCAT44((*(undefined4 *)((char *)&(local_60) + 0x4)),(undefined4)local_60); switch(*(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x8))) { case 0: if (this->_menuType != 1) { iVar7 = 0x80; } - local_60 = CONCAT44(local_60._4_4_,(undefined4)local_60); + local_60 = CONCAT44((*(undefined4 *)((char *)&(local_60) + 0x4)),(undefined4)local_60); if (*(int *)((this->_genericPrompt)._sprite._filename._buf + iVar7 + -0x47c) != 0) { this->_state = 2; ((Menu_Options *)((Menu_Options *)&(*(undefined1 *)((char *)(this) + 0x5b0))))->Menu_Options::reload(); @@ -2333,7 +2333,7 @@ LAB_009b6311: if (this->_menuType != 1) { iVar7 = 0x80; } - local_60 = CONCAT44(local_60._4_4_,(undefined4)local_60); + local_60 = CONCAT44((*(undefined4 *)((char *)&(local_60) + 0x4)),(undefined4)local_60); if (*(int *)((this->_genericPrompt)._sprite._filename._buf + iVar7 + -0x47c) != 0) { this->_state = 3; FUN_008d3250(); @@ -2348,7 +2348,7 @@ LAB_009b6311: backKeyLayer = ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0xb3c))))->ANM2::GetLayer((byte *)"BackKey"); backKeyLayer->_visible = local_21; (*(undefined1 *)((char *)(this) + 0x848)) = 1; - local_60 = CONCAT44(local_60._4_4_,(undefined4)local_60); + local_60 = CONCAT44((*(undefined4 *)((char *)&(local_60) + 0x4)),(undefined4)local_60); } break; case 2: @@ -2366,7 +2366,7 @@ LAB_009b6311: FUN_00838230(quitLine1,pbVar4,local_50,local_58[0],0); ((GenericPrompt *)(&this->_genericPrompt))->GenericPrompt::Show(0); this->_state = 4; - local_60 = CONCAT44(local_60._4_4_,(undefined4)local_60); + local_60 = CONCAT44((*(undefined4 *)((char *)&(local_60) + 0x4)),(undefined4)local_60); break; } iVar3 = 400; @@ -2404,7 +2404,7 @@ LAB_009b6686: else { pvVar5 = ((Multiplayer *)(&DAT_00c79a50))->Multiplayer::get_lobby(&fadeColor._blue); local_14 = (Entity_Player *)0x1; - local_3c = (undefined1 *)((uint)cleanupFlags | 2); + local_3c = (undefined1 *)(GHIDRA_UINT(cleanupFlags) | 2); cleanupFlags = local_3c; if (*(int **)((char *)pvVar5 + 4) == (int *)0x0) goto LAB_009b6686; iVar3 = (**(code **)(**(int **)((char *)pvVar5 + 4) + 0x3c))(); @@ -2412,11 +2412,11 @@ LAB_009b6686: if (iVar3 != 3) goto LAB_009b6686; } local_14 = (Entity_Player *)0xffffffff; - if (((uint)cleanupFlags & 2) != 0) { + if ((GHIDRA_UINT(cleanupFlags) & 2) != 0) { ((KAGE::Network::Multiplayer::ConstLobby *)(&fadeColor._blue))->KAGE::Network::Multiplayer::ConstLobby::~ConstLobby(); } manager = g_manager; - local_60 = CONCAT44(local_60._4_4_,(undefined4)local_60); + local_60 = CONCAT44((*(undefined4 *)((char *)&(local_60) + 0x4)),(undefined4)local_60); if (local_21 != 0) { ((Multiplayer *)(&DAT_00c79a50))->Multiplayer::get_lobby(&fStack_80); local_14 = (Entity_Player *)0x2; @@ -2634,7 +2634,7 @@ void PauseScreen::Show() iVar2 = FUN_004253d0(); playerSlot = (game->_playerManager)._playerList._begin; playerIdx = 0; - playerCount = (int)(game->_playerManager)._playerList._end - (int)playerSlot >> 2; + playerCount = GHIDRA_INT((game->_playerManager)._playerList._end) - GHIDRA_INT(playerSlot) >> 2; if (playerCount != 0) { do { if (*playerSlot == iVar2) goto LAB_009b7713; @@ -2677,7 +2677,7 @@ LAB_009b77c7: manager = g_manager; local_10.x = 2.38221e-44; seed_fart_sound_override((int *)&local_10); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_10.x,0.7,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_10.x),0.7,2,0,1.0,0.0); player = ((Game *)(g_game))->Game::GetPlayer(this->_playerIdx); statLevel = player->_movespeed * 4.5 - 2.0; if (statLevel <= 0.0) { @@ -2686,7 +2686,7 @@ LAB_009b77c7: if (7.0 <= statLevel) { statLevel = 7.0; } - *(int *)&(*(undefined1 *)((char *)(this) + 0xc)) = (int)statLevel; + *(int *)&(*(undefined1 *)((char *)(this) + 0xc)) = GHIDRA_INT(statLevel); statLevel = pow(30.0 / (player->_maxfiredelay + 1.0),0.75); statLevel = statLevel * 2.120391 - 2.0; if (statLevel <= 0.0) { @@ -2695,7 +2695,7 @@ LAB_009b77c7: if (7.0 <= statLevel) { statLevel = 7.0; } - *(int *)&(*(undefined1 *)((char *)(this) + 0x10)) = (int)statLevel; + *(int *)&(*(undefined1 *)((char *)(this) + 0x10)) = GHIDRA_INT(statLevel); statLevel = pow(player->_damage,0.56); iVar3 = 0x140; statLevel = statLevel * 2.231179 - 2.0; @@ -2705,7 +2705,7 @@ LAB_009b77c7: if (7.0 <= statLevel) { statLevel = 7.0; } - *(int *)&(*(undefined1 *)((char *)(this) + 0x14)) = (int)statLevel; + *(int *)&(*(undefined1 *)((char *)(this) + 0x14)) = GHIDRA_INT(statLevel); statLevel = (player->_tearrange - 230.0) / 60.0 + 2.0; if (statLevel <= 0.0) { statLevel = 0.0; @@ -2713,7 +2713,7 @@ LAB_009b77c7: if (7.0 <= statLevel) { statLevel = 7.0; } - *(int *)&(*(undefined1 *)((char *)(this) + 0x18)) = (int)statLevel; + *(int *)&(*(undefined1 *)((char *)(this) + 0x18)) = GHIDRA_INT(statLevel); statLevel = player->_shotspeed * 5.0 - 2.5; if (statLevel <= 0.0) { statLevel = 0.0; @@ -2721,7 +2721,7 @@ LAB_009b77c7: if (7.0 <= statLevel) { statLevel = 7.0; } - *(int *)&(*(undefined1 *)((char *)(this) + 0x1c)) = (int)statLevel; + *(int *)&(*(undefined1 *)((char *)(this) + 0x1c)) = GHIDRA_INT(statLevel); statLevel = player->_luck + 2.5; menuType = this->_menuType; if (statLevel <= 0.0) { @@ -2730,7 +2730,7 @@ LAB_009b77c7: if (7.0 <= statLevel) { statLevel = 7.0; } - *(int *)&(*(undefined1 *)((char *)(this) + 0x20)) = (int)statLevel; + *(int *)&(*(undefined1 *)((char *)(this) + 0x20)) = GHIDRA_INT(statLevel); if (menuType != 1) { iVar3 = 0x2c; } @@ -2749,7 +2749,7 @@ LAB_009b77c7: iVar3 + -0x47c)))->ANM2::GetLayer(&DAT_00b79bb0); if ((LayerState *)local_10.x != (LayerState *)0x0) { if ((g_manager->_netplayManager == *(NetplayManager *)(g_manager + 1)) || - ((uint)((int)*(NetplayManager *)(g_manager + 1) - (int)g_manager->_netplayManager >> 2) < 2)) + (GHIDRA_UINT((GHIDRA_INT(*(NetplayManager *)(g_manager + 1)) - GHIDRA_INT(g_manager->_netplayManager) >> 2)) < 2)) { bVar1 = 0; } @@ -2801,7 +2801,7 @@ void PauseScreen::load_graphics() local_14 = 0xffffffff; puStack_18 = &LAB_00b0e735; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(loadedImage + 0x50); + local_24 = __security_cookie ^ GHIDRA_UINT((loadedImage + 0x50)); ExceptionList = &local_1c; anm2Path._size = 0; anm2Path._capacity = 0xf; @@ -2810,20 +2810,20 @@ void PauseScreen::load_graphics() anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; savedThis = in_ECX; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x17; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/PauseScreen.anm2",0x18); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/PauseScreen.anm2",0x18); local_14 = 0; ((ANM2 *)((ANM2 *)(in_ECX + 0x2c)))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - pcVar2 = (char *)anm2Path._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar2))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2836,20 +2836,20 @@ void PauseScreen::load_graphics() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1d; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/PauseScreen_small.anm2",0x1e); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/PauseScreen_small.anm2",0x1e); local_14 = 1; ((ANM2 *)((ANM2 *)(in_ECX + 0x140)))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - pcVar2 = (char *)anm2Path._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar2))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2862,20 +2862,20 @@ void PauseScreen::load_graphics() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1c; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/PauseScreenStats.anm2",0x1d); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/PauseScreenStats.anm2",0x1d); local_14 = 2; ((ANM2 *)((ANM2 *)(in_ECX + 0x254)))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - pcVar2 = (char *)anm2Path._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar2))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2890,20 +2890,20 @@ void PauseScreen::load_graphics() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x18; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/Death Screen.anm2",0x19); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/Death Screen.anm2",0x19); local_14 = 3; ((ANM2 *)(diarySprite))->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { uVar3 = anm2Path._capacity + 1; - pcVar2 = (char *)anm2Path._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); uVar3 = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar2))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2930,7 +2930,7 @@ LAB_009b7d75: isLess = bVar1 < (byte)*pcVar2; if (bVar1 != *pcVar2) { LAB_009b7d62: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_009b7d67; } if (bVar1 == 0) break; @@ -2950,7 +2950,7 @@ LAB_009b7d67: layer = ((ANM2 *)(diarySprite))->ANM2::GetLayer(curAnimName); curAnimName = curAnimName + 1; layer->_visible = 0; - } while ((int)curAnimName < 7); + } while (GHIDRA_INT(curAnimName) < 7); layer = ((ANM2 *)(diarySprite))->ANM2::GetLayer(&DAT_00000006); layer->_visible = 1; image = Manager::LoadImage(loadedImage,(byte *)"gfx/ui/menu_mystuff.png"); @@ -2973,20 +2973,20 @@ LAB_009b7d67: deathScreenPath._buf[1] = '\0'; deathScreenPath._buf[2] = '\0'; deathScreenPath._buf[3] = '\0'; - deathScreenPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(deathScreenPath._buf) + 0x0)) = std::_Allocate(0x20); deathScreenPath._size = 0x18; deathScreenPath._capacity = 0x1f; - builtin_strncpy((char *)deathScreenPath._buf._0_4_,"gfx/ui/Death Screen.anm2",0x19); + builtin_strncpy((*(undefined4 *)((char *)&((char *)deathScreenPath._buf) + 0x0)),"gfx/ui/Death Screen.anm2",0x19); local_14 = 6; ((ANM2 *)(diarySprite))->ANM2::Load(&deathScreenPath,1); local_14 = 0xffffffff; if (0xf < deathScreenPath._capacity) { uVar3 = deathScreenPath._capacity + 1; - pcVar2 = (char *)deathScreenPath._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)deathScreenPath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(deathScreenPath._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(deathScreenPath._buf) + 0x0)) + -4); uVar3 = deathScreenPath._capacity + 0x24; - if ((char *)0x1f < (char *)(deathScreenPath._buf._0_4_ + (-4 - (int)pcVar2))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(deathScreenPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2996,7 +2996,7 @@ LAB_009b7d67: curAnimName = *(byte **)(temp_3f06a66df3 + 0xc84); deathScreenPath._size = 0; deathScreenPath._capacity = 0xf; - deathScreenPath._buf._0_4_ = deathScreenPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(deathScreenPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(deathScreenPath._buf) + 0x0)) & 0xffffff00; if (curAnimName != (byte *)0x0) { curAnimName = curAnimName; if (0xf < *(uint *)(curAnimName + 0x14)) { @@ -3008,7 +3008,7 @@ LAB_009b7d67: isLess = bVar1 < (byte)*pcVar2; if (bVar1 != *pcVar2) { LAB_009b7f03: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_009b7f08; } if (bVar1 == 0) break; @@ -3065,7 +3065,7 @@ void PauseScreen::update_stuff_arrows() pEVar1 = ((Game *)(g_game))->Game::GetPlayer(currentPlayer->_playerIdx); historyEntry = (pEVar1->_history)._historyItems._end; historyBegin = (pEVar1->_history)._historyItems._begin; - iVar2 = ((int)historyEntry - (int)historyBegin) / 0x1c; + iVar2 = (GHIDRA_INT(historyEntry) - GHIDRA_INT(historyBegin)) / 0x1c; iVar3 = iVar2 + -0x18; maxScroll = 0; if (0 < iVar3) { @@ -3073,7 +3073,7 @@ void PauseScreen::update_stuff_arrows() } if (iVar2 != 0) { shownCount = 0; - historyEntry = (void *)((int)historyEntry + *(int *)&(*(undefined1 *)((char *)(currentPlayer) + 0x24)) * -0x1c); + historyEntry = (void *)(GHIDRA_INT(historyEntry) + *(int *)&(*(undefined1 *)((char *)(currentPlayer) + 0x24)) * -0x1c); if (historyEntry != historyBegin) { do { if (0x17 < shownCount) break; @@ -3094,7 +3094,7 @@ LAB_009b8065: if (isOwned == 0) goto LAB_009b8065; shownCount = shownCount + 1; } - historyEntry = (void *)((int)historyEntry + -0x1c); + historyEntry = (void *)(GHIDRA_INT(historyEntry) + -0x1c); } while (historyEntry != (pEVar1->_history)._historyItems._begin); } } @@ -3180,7 +3180,7 @@ void PauseScreen::render_seed_paper(Vector *renderOffset) local_14 = 0xffffffff; puStack_18 = &DAT_00b0e783; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(halfText + 0x24); + local_24 = __security_cookie ^ GHIDRA_UINT((halfText + 0x24)); ExceptionList = &local_1c; iVar2 = 0x140; if (this->_menuType != 1) { @@ -3241,7 +3241,7 @@ void PauseScreen::render_seed_paper(Vector *renderOffset) memcpy(halfText,psVar1,*psVar3); manager = g_manager; ((FontSettings *)(firstHalfSettings))->FontSettings::constructor(); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; ((KColor *)(&textColor))->KColor::SetFromARGB(0xff362f2d); ((Font *)(&manager->_font2_TeamMeatEx12))->Font::DrawStringScaled(halfText,&firstLinePos,color,settings); local_50 = 4; @@ -3275,7 +3275,7 @@ void PauseScreen::render_seed_paper(Vector *renderOffset) memcpy(halfText,psVar1->_buf + 5,*psVar3); manager = g_manager; ((FontSettings *)(secondHalfSettings))->FontSettings::constructor(); - local_14 = CONCAT31(local_14._1_3_,2); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),2); ((KColor *)(&textColor))->KColor::SetFromARGB(0xff362f2d); Font::DrawStringScaled (&manager->_font2_TeamMeatEx12,halfText,&secondLinePos,color_00,settings_00); @@ -3285,7 +3285,7 @@ void PauseScreen::render_seed_paper(Vector *renderOffset) if (0xfff < uVar4) { psVar1 = (std_string *)seedString[0][-1]._capacity; uVar4 = seedStringCapacity + 0x24; - if (0x1f < (uint)((int)seedString[0] + (-4 - (int)psVar1))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(seedString[0]) + (-4 - GHIDRA_INT(psVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -3337,7 +3337,7 @@ void PauseScreen::render_my_stuff(Vector *pos) ColorMod iconColor; float local_14; - local_14 = (float)(__security_cookie ^ (uint)((&iconColor)[1]._tint + 1)); + local_14 = (float)(__security_cookie ^ GHIDRA_UINT(((&iconColor)[1]._tint + 1))); local_44 = pos; local_58 = &(*(undefined1 *)((char *)(this) + 0x140)); iVar2 = 0x140; @@ -3434,10 +3434,10 @@ void PauseScreen::render_my_stuff(Vector *pos) (pLVar4->_size).y = scaleY; } local_48 = (LayerState *)0x0; - pvVar5 = (void *)((int)(history->_historyItems)._end + *(int *)&(*(undefined1 *)((char *)(this) + 0x24)) * -0x1c); + pvVar5 = (void *)(GHIDRA_INT((history->_historyItems)._end) + *(int *)&(*(undefined1 *)((char *)(this) + 0x24)) * -0x1c); if (pvVar5 != (history->_historyItems)._begin) { do { - if (0x17 < (int)local_48) { + if (0x17 < GHIDRA_INT(local_48)) { return; } if (*(char *)((char *)pvVar5 + -0x18) == '\0') { @@ -3451,10 +3451,10 @@ void PauseScreen::render_my_stuff(Vector *pos) pEVar6 = ((Game *)(g_game))->Game::GetPlayer(this->_playerIdx); bVar1 = ((Entity_Player *)(pEVar6))->Entity_Player::HasCollectible(collectibleId,0); if (bVar1 != 0) { - if ((int)collectibleId < 0) { + if (GHIDRA_INT(collectibleId) < 0) { collectibleId = 0x1b9; } - local_48 = (LayerState *)((int)local_48 + 1); + local_48 = (LayerState *)(GHIDRA_INT(local_48) + 1); if (collectibleId < 0x2dd) { if ((*(int *)&(*(undefined1 *)((char *)(this) + 0x39c)) != 0) && ((6 < *(int *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x398)) + 0x80) || @@ -3463,13 +3463,13 @@ void PauseScreen::render_my_stuff(Vector *pos) iVar2 = *(int *)&(*(undefined1 *)((char *)(this) + 0x39c)); local_4c = *(LayerState **)(iVar2 + 0x50); if ((iVar2 == 0) || - (((int)local_4c < 0 || (*(int *)(iVar2 + 0x1c) <= (int)local_4c)))) { + ((GHIDRA_INT(local_4c) < 0 || (*(int *)(iVar2 + 0x1c) <= GHIDRA_INT(local_4c))))) { KAGE_LogMessage(0x10,(byte *)"id out of bounds\n"); } - *(undefined4 *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x3a0)) + (int)local_4c * 4) = 0; + *(undefined4 *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x3a0)) + GHIDRA_INT(local_4c) * 4) = 0; AnimationState::AdvanceLayerPosition - ((AnimationState *)&(*(undefined1 *)((char *)(this) + 0x398)),(int)local_4c, - (float)(int)(collectibleId - 1)); + ((AnimationState *)&(*(undefined1 *)((char *)(this) + 0x398)),GHIDRA_INT(local_4c), + (float)GHIDRA_INT((collectibleId - 1))); } iconPos.x = ((float)local_44 - 36.0) * scaleX + (float)local_58; iconPos.y = (slotY - 15.0) * scaleY + (float)local_5c; @@ -3549,7 +3549,7 @@ LAB_009b8908: } } } - pvVar5 = (void *)((int)pvVar5 + -0x1c); + pvVar5 = (void *)(GHIDRA_INT(pvVar5) + -0x1c); } while (pvVar5 != (history->_historyItems)._begin); } } @@ -3607,7 +3607,7 @@ void PauseScreen::render_lobby_buttons(Vector *pos) undefined4 local_14; Manager *manager; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &DAT_00b0e7bd; local_1c = ExceptionList; @@ -3617,7 +3617,7 @@ void PauseScreen::render_lobby_buttons(Vector *pos) local_30.y = (float)player->_controllerIndex; } else { - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_30.y = (float)((InputManager *)(&g_manager->_netplayManager))->InputManager::FirstLocalDeviceID(); } if (g_manager->_netplayManager == *(NetplayManager *)(g_manager + 1)) { @@ -3666,7 +3666,7 @@ LAB_009b8a56: bVar4 = bVar1 < *idleName; if (bVar1 != *idleName) { LAB_009b8af8: - cmpResult = -(uint)bVar4 | 1; + cmpResult = -GHIDRA_UINT(bVar4) | 1; goto LAB_009b8afd; } if (bVar1 == 0) break; diff --git a/src/game/pause_screen_my_stuff.cpp b/src/game/pause_screen_my_stuff.cpp index 64d7f5e..2aeab30 100644 --- a/src/game/pause_screen_my_stuff.cpp +++ b/src/game/pause_screen_my_stuff.cpp @@ -14,13 +14,13 @@ PauseScreen_MyStuff::~PauseScreen_MyStuff() local_8 = 0xffffffff; puStack_c = &LAB_00b05cd0; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; *(undefined4 *)((char *)this + 0x1c) = *(undefined4 *)((char *)this + 0x18); *(undefined4 *)((char *)this + 0x24) = 0; *(undefined4 *)((char *)this + 0x28) = 0; *(undefined4 *)((char *)this + 0x2c) = 0; - ((KAGE::SmartPointer *)((void *)((int)this + 0x640)))->KAGE::SmartPointer::reset((void *)0x0); + ((KAGE::SmartPointer *)((void *)(GHIDRA_INT(this) + 0x640)))->KAGE::SmartPointer::reset((void *)0x0); imageMapOwner = *(int *)((char *)this + 0x1e8); if (imageMapOwner != 0) { imageMapOwner = *(int *)(imageMapOwner + 0x120); @@ -34,55 +34,55 @@ PauseScreen_MyStuff::~PauseScreen_MyStuff() if (*(int **)((char *)this + 0x644) != (int *)0x0) { isLastRef = (**(code **)(**(int **)((char *)this + 0x644) + 0xc))(uVar2); if ((isLastRef != '\0') && (g_imageReleaseFn != (void *)0x0)) { - (*g_imageReleaseFn)((void *)((int)this + 0x640)); + (*g_imageReleaseFn)((void *)(GHIDRA_INT(this) + 0x640)); } } local_8 = 1; - ((ANM2 *)((ANM2 *)((int)this + 0x52c)))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)this + 0x57c)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)this + 0x55c)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)this + 0x544)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)this + 0x52c)))->std::string::_Tidy_deallocate(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x52c)))->ANM2::Reset(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x57c)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x55c)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x544)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x52c)))->std::string::_Tidy_deallocate(); local_8 = 2; - ((ANM2 *)((ANM2 *)((int)this + 0x418)))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)this + 0x468)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)this + 0x448)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)this + 0x430)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)this + 0x418)))->std::string::_Tidy_deallocate(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x418)))->ANM2::Reset(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x468)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x448)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x430)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x418)))->std::string::_Tidy_deallocate(); local_8 = 3; - ((ANM2 *)((ANM2 *)((int)this + 0x304)))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)this + 0x354)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)this + 0x334)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)this + 0x31c)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)this + 0x304)))->std::string::_Tidy_deallocate(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x304)))->ANM2::Reset(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x354)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x334)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x31c)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x304)))->std::string::_Tidy_deallocate(); local_8 = 4; - ((ANM2 *)((ANM2 *)((int)this + 0x1f0)))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)this + 0x240)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)this + 0x220)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)this + 0x208)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)this + 0x1f0)))->std::string::_Tidy_deallocate(); - ((RichText *)((void *)((int)this + 0x184)))->RichText::~RichText(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x1f0)))->ANM2::Reset(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x240)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x220)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x208)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x1f0)))->std::string::_Tidy_deallocate(); + ((RichText *)((void *)(GHIDRA_INT(this) + 0x184)))->RichText::~RichText(); local_8 = 5; - ((ANM2 *)((ANM2 *)((int)this + 100)))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)this + 0xb4)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)this + 0x94)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)this + 0x7c)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)this + 100)))->std::string::_Tidy_deallocate(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 100)))->ANM2::Reset(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0xb4)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x94)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x7c)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(this) + 100)))->std::string::_Tidy_deallocate(); local_8 = 6; if (*(int **)((char *)this + 0x54) != (int *)0x0) { isLastRef = (**(code **)(**(int **)((char *)this + 0x54) + 0xc))(); if ((isLastRef != '\0') && (g_imageReleaseFn != (void *)0x0)) { - (*g_imageReleaseFn)((int)this + 0x50); + (*g_imageReleaseFn)(GHIDRA_INT(this) + 0x50); } } local_8 = 7; if (*(int **)((char *)this + 0x40) != (int *)0x0) { isLastRef = (**(code **)(**(int **)((char *)this + 0x40) + 0xc))(); if ((isLastRef != '\0') && (g_imageReleaseFn != (void *)0x0)) { - (*g_imageReleaseFn)((int)this + 0x3c); + (*g_imageReleaseFn)(GHIDRA_INT(this) + 0x3c); } } - FID_conflict__Tidy((void *)((int)this + 0x18)); + FID_conflict__Tidy((void *)(GHIDRA_INT(this) + 0x18)); ExceptionList = local_10; return; } @@ -116,24 +116,24 @@ void PauseScreen_MyStuff::Init() local_14 = 0xffffffff; puStack_18 = &LAB_00b05d25; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(imageRef + 0x38); + local_24 = __security_cookie ^ GHIDRA_UINT((imageRef + 0x38)); ExceptionList = &local_1c; self = this; FUN_008d3250(local_24); - filePath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(filePath._buf) + 0x0)) = std::_Allocate(0x30); filePath._size = 0x20; filePath._capacity = 0x2f; - builtin_strncpy((char *)filePath._buf._0_4_,"font/TeamMeatEx/TeamMeatEx12.fnt",0x21); + builtin_strncpy((*(undefined4 *)((char *)&((char *)filePath._buf) + 0x0)),"font/TeamMeatEx/TeamMeatEx12.fnt",0x21); local_14 = 0; - ((RichText *)((void *)((int)this + 0x184)))->RichText::load_font(&filePath); + ((RichText *)((void *)(GHIDRA_INT(this) + 0x184)))->RichText::load_font(&filePath); local_14 = 0xffffffff; if (0xf < filePath._capacity) { uVar4 = filePath._capacity + 1; - pcVar3 = (char *)filePath._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)filePath._buf) + 0x0)); if (0xfff < uVar4) { - pcVar3 = *(char **)(filePath._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(filePath._buf) + 0x0)) + -4); uVar4 = filePath._capacity + 0x24; - if ((char *)0x1f < (char *)(filePath._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(filePath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -141,27 +141,27 @@ void PauseScreen_MyStuff::Init() operator_delete(pcVar3,uVar4); } *(undefined4 *)((char *)this + 0x1ec) = 0x3f666666; - sprite = (ANM2 *)((int)this + 0x304); + sprite = (ANM2 *)(GHIDRA_INT(this) + 0x304); filePath._size = 0; filePath._capacity = 0xf; filePath._buf[0] = '\0'; filePath._buf[1] = '\0'; filePath._buf[2] = '\0'; filePath._buf[3] = '\0'; - filePath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(filePath._buf) + 0x0)) = std::_Allocate(0x20); filePath._size = 0x1f; filePath._capacity = 0x1f; - builtin_strncpy((char *)filePath._buf._0_4_,"gfx/ui/PauseScreen_MyStuff.anm2",0x20); + builtin_strncpy((*(undefined4 *)((char *)&((char *)filePath._buf) + 0x0)),"gfx/ui/PauseScreen_MyStuff.anm2",0x20); local_14 = 1; ((ANM2 *)(sprite))->ANM2::Load(&filePath,1); local_14 = 0xffffffff; if (0xf < filePath._capacity) { uVar4 = filePath._capacity + 1; - pcVar3 = (char *)filePath._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)filePath._buf) + 0x0)); if (0xfff < uVar4) { - pcVar3 = *(char **)(filePath._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(filePath._buf) + 0x0)) + -4); uVar4 = filePath._capacity + 0x24; - if ((char *)0x1f < (char *)(filePath._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(filePath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -173,7 +173,7 @@ void PauseScreen_MyStuff::Init() LAB_008d2e85: bVar1 = ((ANM2 *)(sprite))->ANM2::SetAnimation(s_Idle,1); if (bVar1 != 0) { - ((AnimationState *)((AnimationState *)((int)this + 0x334)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x334)))->AnimationState::Rewind(); *(undefined1 *)((char *)this + 0x348) = 1; } } @@ -188,7 +188,7 @@ LAB_008d2e85: isLess = bVar1 < *pbVar2; if (bVar1 != *pbVar2) { LAB_008d2e72: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_008d2e77; } if (bVar1 == 0) break; @@ -205,7 +205,7 @@ LAB_008d2e77: } layer = ((ANM2 *)(sprite))->ANM2::GetLayer((byte *)"Cursor"); selfRef = self; - sprite = (ANM2 *)((int)self + 0x418); + sprite = (ANM2 *)(GHIDRA_INT(self) + 0x418); filePath._size = 0; layer->_visible = 0; filePath._capacity = 0xf; @@ -213,20 +213,20 @@ LAB_008d2e77: filePath._buf[1] = '\0'; filePath._buf[2] = '\0'; filePath._buf[3] = '\0'; - filePath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(filePath._buf) + 0x0)) = std::_Allocate(0x20); filePath._size = 0x18; filePath._capacity = 0x1f; - builtin_strncpy((char *)filePath._buf._0_4_,"gfx/ui/Death Screen.anm2",0x19); + builtin_strncpy((*(undefined4 *)((char *)&((char *)filePath._buf) + 0x0)),"gfx/ui/Death Screen.anm2",0x19); local_14 = 2; ((ANM2 *)(sprite))->ANM2::Load(&filePath,1); local_14 = 0xffffffff; if (0xf < filePath._capacity) { uVar4 = filePath._capacity + 1; - pcVar3 = (char *)filePath._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)filePath._buf) + 0x0)); if (0xfff < uVar4) { - pcVar3 = *(char **)(filePath._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(filePath._buf) + 0x0)) + -4); uVar4 = filePath._capacity + 0x24; - if ((char *)0x1f < (char *)(filePath._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(filePath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -238,7 +238,7 @@ LAB_008d2e77: LAB_008d2fa5: bVar1 = ((ANM2 *)(sprite))->ANM2::SetAnimation((byte *)"Diary",1); if (bVar1 != 0) { - ((AnimationState *)((AnimationState *)((int)selfRef + 0x448)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(selfRef) + 0x448)))->AnimationState::Rewind(); *(undefined1 *)((char *)selfRef + 0x45c) = 1; } } @@ -253,7 +253,7 @@ LAB_008d2fa5: isLess = bVar1 < (byte)*pcVar3; if (bVar1 != *pcVar3) { LAB_008d2f92: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_008d2f97; } if (bVar1 == 0) break; @@ -278,7 +278,7 @@ LAB_008d2f97: } layer = ((ANM2 *)(sprite))->ANM2::GetLayer((byte *)"Items"); selfRef = self; - sprite = (ANM2 *)((int)self + 0x52c); + sprite = (ANM2 *)(GHIDRA_INT(self) + 0x52c); filePath._size = 0; layer->_visible = 1; filePath._capacity = 0xf; @@ -286,20 +286,20 @@ LAB_008d2f97: filePath._buf[1] = '\0'; filePath._buf[2] = '\0'; filePath._buf[3] = '\0'; - filePath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(filePath._buf) + 0x0)) = std::_Allocate(0x20); filePath._size = 0x1b; filePath._capacity = 0x1f; - builtin_strncpy((char *)filePath._buf._0_4_,"gfx/ui/ui_charge_icons.anm2",0x1c); + builtin_strncpy((*(undefined4 *)((char *)&((char *)filePath._buf) + 0x0)),"gfx/ui/ui_charge_icons.anm2",0x1c); local_14 = 3; ((ANM2 *)(sprite))->ANM2::Load(&filePath,1); local_14 = 0xffffffff; if (0xf < filePath._capacity) { uVar4 = filePath._capacity + 1; - pcVar3 = (char *)filePath._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)filePath._buf) + 0x0)); if (0xfff < uVar4) { - pcVar3 = *(char **)(filePath._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(filePath._buf) + 0x0)) + -4); uVar4 = filePath._capacity + 0x24; - if ((char *)0x1f < (char *)(filePath._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(filePath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -318,7 +318,7 @@ LAB_008d2f97: isLess = bVar1 < (byte)*pcVar3; if (bVar1 != *pcVar3) { LAB_008d30f0: - uVar4 = -(uint)isLess | 1; + uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_008d30f5; } if (bVar1 == 0) break; @@ -335,7 +335,7 @@ LAB_008d30f5: } bVar1 = ((ANM2 *)(sprite))->ANM2::SetAnimation((byte *)"ChargeIcon",1); if (bVar1 != 0) { - ((AnimationState *)((AnimationState *)((int)selfRef + 0x55c)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(selfRef) + 0x55c)))->AnimationState::Rewind(); *(undefined1 *)((char *)selfRef + 0x570) = 1; } LAB_008d3121: @@ -346,20 +346,20 @@ LAB_008d3121: filePath._buf[1] = '\0'; filePath._buf[2] = '\0'; filePath._buf[3] = '\0'; - filePath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(filePath._buf) + 0x0)) = std::_Allocate(0x20); filePath._size = 0x19; filePath._capacity = 0x1f; - builtin_strncpy((char *)filePath._buf._0_4_,"gfx/ui/minimap_icons.anm2",0x1a); + builtin_strncpy((*(undefined4 *)((char *)&((char *)filePath._buf) + 0x0)),"gfx/ui/minimap_icons.anm2",0x1a); local_14 = 4; - ((ANM2 *)((ANM2 *)((int)selfRef + 0x1f0)))->ANM2::Load(&filePath,1); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(selfRef) + 0x1f0)))->ANM2::Load(&filePath,1); local_14 = 0xffffffff; if (0xf < filePath._capacity) { uVar4 = filePath._capacity + 1; - pcVar3 = (char *)filePath._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)filePath._buf) + 0x0)); if (0xfff < uVar4) { - pcVar3 = *(char **)(filePath._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(filePath._buf) + 0x0)) + -4); uVar4 = filePath._capacity + 0x24; - if ((char *)0x1f < (char *)(filePath._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(filePath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -368,10 +368,10 @@ LAB_008d3121: } filePath._size = 0; filePath._capacity = 0xf; - filePath._buf._0_4_ = filePath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(filePath._buf) + 0x0)) = (*(undefined4 *)((char *)&(filePath._buf) + 0x0)) & 0xffffff00; cursorImage = Manager::LoadImage(imageRef,(byte *)"gfx/ui/MyStuff_SectionCursor.png"); local_14 = 5; - ((KAGE::SmartPointer *)((void *)((int)selfRef + 0x640)))->KAGE::SmartPointer::operator_assign(cursorImage); + ((KAGE::SmartPointer *)((void *)(GHIDRA_INT(selfRef) + 0x640)))->KAGE::SmartPointer::operator_assign(cursorImage); local_14 = 6; if (imageRefCount != (int *)0x0) { isReleased = (**(code **)(*imageRefCount + 0xc))(); diff --git a/src/game/persistent_game_data.cpp b/src/game/persistent_game_data.cpp index cb500c6..87d3185 100644 --- a/src/game/persistent_game_data.cpp +++ b/src/game/persistent_game_data.cpp @@ -15,7 +15,7 @@ void PersistentGameData::copy_shared_progress(PersistentGameData *dst, Persisten int local_84 [19]; int achievementIds [13]; - achievementIds[0xc] = __security_cookie ^ (uint)(achievementIds + 0xd); + achievementIds[0xc] = __security_cookie ^ GHIDRA_UINT((achievementIds + 0xd)); if ((dst != (PersistentGameData *)0x0) && (src != (PersistentGameData *)0x0)) { eventCounterIds[0] = 0x72; eventCounterIds[1] = 0x73; @@ -146,7 +146,7 @@ void PersistentGameData::copy_constructor(PersistentGameData *other) local_8 = 1; PersistentGameData_Bestiary::constructor ((PersistentGameData_Bestiary *)&this->_bestiaryEncounters); - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); operator_assign(this,other); ExceptionList = local_10; return; @@ -224,7 +224,7 @@ void PersistentGameData::Clear(byte unk) FID_conflict__Erase_tree_>_> (&this->_bestiaryDeaths, (fuzzer_allocator_> *)&this->_bestiaryDeaths, - *(_Tree_node **)((int)mapHead + 4)); + *(_Tree_node **)(GHIDRA_INT(mapHead) + 4)); *(void **)((char *)mapHead + 4) = mapHead; *(void **)mapHead = mapHead; *(void **)((char *)mapHead + 8) = mapHead; @@ -233,7 +233,7 @@ void PersistentGameData::Clear(byte unk) mapHead = bestiaryMap->_head; FID_conflict__Erase_tree_>_> (bestiaryMap,(fuzzer_allocator_> *)bestiaryMap, - *(_Tree_node **)((int)mapHead + 4)); + *(_Tree_node **)(GHIDRA_INT(mapHead) + 4)); *(void **)((char *)mapHead + 4) = mapHead; *(void **)mapHead = mapHead; *(void **)((char *)mapHead + 8) = mapHead; @@ -251,7 +251,7 @@ void PersistentGameData::Clear(byte unk) mapHead = bestiaryMap->_head; FID_conflict__Erase_tree_>_> (bestiaryMap,(fuzzer_allocator_> *)bestiaryMap, - *(_Tree_node **)((int)mapHead + 4)); + *(_Tree_node **)(GHIDRA_INT(mapHead) + 4)); *(void **)((char *)mapHead + 4) = mapHead; *(void **)mapHead = mapHead; *(void **)((char *)mapHead + 8) = mapHead; @@ -289,7 +289,7 @@ byte PersistentGameData::Load(byte *filepath) pppbStack_8 = (byte ***)0xffffffff; puStack_c = &LAB_00b0a935; local_10 = ExceptionList; - securityCookie = __security_cookie ^ (uint)(rebirthPath + 0xb); + securityCookie = __security_cookie ^ GHIDRA_UINT((rebirthPath + 0xb)); ExceptionList = &local_10; if (this->_saveFile != (undefined4 *)0x0) { (*(code *)**(undefined4 **)this->_saveFile)(1,securityCookie); @@ -299,7 +299,7 @@ byte PersistentGameData::Load(byte *filepath) bVar1 = *pathEnd; pathEnd = pathEnd + 1; } while (bVar1 != 0); - ((std::string *)(&(*(undefined1 *)((char *)(this) + 0x8))))->std::string::assign(filepath,(int)pathEnd - (int)(filepath + 1)); + ((std::string *)(&(*(undefined1 *)((char *)(this) + 0x8))))->std::string::assign(filepath,GHIDRA_INT(pathEnd) - GHIDRA_INT((filepath + 1))); KAGE_LogMessage(1,(byte *)"Loading Repentance PersistentGameData from disk: %s.\n"); saveFile = ((SaveDataManager *)(&PTR_vftable_00c5aa80))->SaveDataManager::open_file_read(filepath); this->_saveFile = saveFile; @@ -359,7 +359,7 @@ byte PersistentGameData::Load(byte *filepath) if (0xfff < uVar3) { ppppbVar2 = (byte ****)rebirthPath[0][-1]; uVar3 = rebirthPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)rebirthPath[0] + (-4 - (int)ppppbVar2))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(rebirthPath[0]) + (-4 - GHIDRA_INT(ppppbVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -421,7 +421,7 @@ byte PersistentGameData::LoadFromSteamCloud() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } allocBlock = malloc(0x28); if (allocBlock == (undefined4 *)0x0) { @@ -429,10 +429,10 @@ byte PersistentGameData::LoadFromSteamCloud() } else { qVar1 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter + 0x28; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) + 0x28; *allocBlock = 0x28; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) + (uint)(0xffffffd7 < (uint)qVar1); + *(uint *)((char *)allocCounter + 4) + GHIDRA_UINT((0xffffffd7 < GHIDRA_UINT(qVar1))); steamCloudFile = allocBlock + 1; if (steamCloudFile != (undefined4 *)0x0) { allocBlock[2] = 2; @@ -571,7 +571,7 @@ byte PersistentGameData::read(void *stream) iStack_8 = 0xffffffff; puStack_c = &LAB_00b0a991; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(fileHeader + 8); + local_14 = __security_cookie ^ GHIDRA_UINT((fileHeader + 8)); ExceptionList = &local_10; self = this; (**(code **)(*(int *)stream + 0x14))(fileHeader,1,0x10,local_14); @@ -888,7 +888,7 @@ LAB_00927011: FID_conflict__Erase_tree_>_> (&data->_bestiaryDeaths, (fuzzer_allocator_> *) - &data->_bestiaryDeaths,*(_Tree_node **)((int)mapNode + 4)); + &data->_bestiaryDeaths,*(_Tree_node **)(GHIDRA_INT(mapNode) + 4)); dataCopy = self; *(void **)((char *)mapNode + 4) = mapNode; *(void **)mapNode = mapNode; @@ -899,7 +899,7 @@ LAB_00927011: FID_conflict__Erase_tree_>_> (bestiaryMap, (fuzzer_allocator_> *)bestiaryMap, - *(_Tree_node **)((int)mapNode + 4)); + *(_Tree_node **)(GHIDRA_INT(mapNode) + 4)); data = self; *(void **)((char *)mapNode + 4) = mapNode; *(void **)mapNode = mapNode; @@ -920,7 +920,7 @@ LAB_00927011: FID_conflict__Erase_tree_>_> (bestiaryMap, (fuzzer_allocator_> *)bestiaryMap, - *(_Tree_node **)((int)mapNode + 4)); + *(_Tree_node **)(GHIDRA_INT(mapNode) + 4)); *(void **)((char *)mapNode + 4) = mapNode; *(void **)mapNode = mapNode; *(void **)((char *)mapNode + 8) = mapNode; @@ -933,7 +933,7 @@ LAB_00927011: switch(bestiaryListType) { case 1: (**(code **)(*(int *)stream + 0x14))(&list1Bytes,4,1); - if (0 < (int)list1Bytes) { + if (0 < GHIDRA_INT(list1Bytes)) { uStack_3c = list1Bytes >> 2; entryKey = 0; if (uStack_3c != 0) { @@ -970,13 +970,13 @@ LAB_00927cd3: } entryKey = entryKey + 1; *(uint *)((char *)mapNode + 0x14) = uStack_40; - } while (entryKey < (int)uStack_3c); + } while (entryKey < GHIDRA_INT(uStack_3c)); } } break; case 2: (**(code **)(*(int *)stream + 0x14))(&list2Bytes,4,1); - if (0 < (int)list2Bytes) { + if (0 < GHIDRA_INT(list2Bytes)) { uStack_3c = list2Bytes >> 2; entryKey = 0; if (uStack_3c != 0) { @@ -1008,13 +1008,13 @@ LAB_00927cd3: } entryKey = entryKey + 1; *(uint *)((char *)mapNode + 0x14) = uStack_40; - } while (entryKey < (int)uStack_3c); + } while (entryKey < GHIDRA_INT(uStack_3c)); } } break; case 3: (**(code **)(*(int *)stream + 0x14))(&list3Bytes,4,1); - if (0 < (int)list3Bytes) { + if (0 < GHIDRA_INT(list3Bytes)) { uStack_3c = list3Bytes >> 2; entryKey = 0; if (uStack_3c != 0) { @@ -1046,13 +1046,13 @@ LAB_00927cd3: } entryKey = entryKey + 1; *(uint *)((char *)mapNode + 0x14) = uStack_40; - } while (entryKey < (int)uStack_3c); + } while (entryKey < GHIDRA_INT(uStack_3c)); } } break; case 4: (**(code **)(*(int *)stream + 0x14))(&list4Bytes,4,1); - if (0 < (int)list4Bytes) { + if (0 < GHIDRA_INT(list4Bytes)) { uStack_40 = list4Bytes >> 2; entryKey = 0; if (uStack_40 != 0) { @@ -1084,7 +1084,7 @@ LAB_00927cd3: } entryKey = entryKey + 1; *(uint *)((char *)mapNode + 0x14) = uStack_3c; - } while (entryKey < (int)uStack_40); + } while (entryKey < GHIDRA_INT(uStack_40)); } } } @@ -1509,11 +1509,11 @@ void PersistentGameData::write() pvVar2 = (void *)0x0; if (sectionCount != (void *)0x0) { do { - isFlagSet = this->_achievements[(int)pvVar2] != 0; + isFlagSet = this->_achievements[GHIDRA_INT(pvVar2)] != 0; (**(code **)(*(int *)this->_saveFile + 0x1c))(&isFlagSet,1,1); flagByte[0] = isFlagSet; ((Checksum *)(&local_40))->Checksum::Update(flagByte,1); - pvVar2 = (void *)((int)pvVar2 + 1); + pvVar2 = (void *)(GHIDRA_INT(pvVar2) + 1); } while (pvVar2 < sectionCount); } sectionId = (void *)0x2; @@ -1535,7 +1535,7 @@ void PersistentGameData::write() (**(code **)(*(int *)this->_saveFile + 0x1c))(valuePtr,4,1); local_28 = (void *)*valuePtr; ((Checksum *)(&local_40))->Checksum::Update((byte *)&local_28,4); - pvVar2 = (void *)((int)pvVar2 + 1); + pvVar2 = (void *)(GHIDRA_INT(pvVar2) + 1); valuePtr = valuePtr + 1; } while (pvVar2 < sectionCount); } @@ -1558,7 +1558,7 @@ void PersistentGameData::write() (**(code **)(*(int *)this->_saveFile + 0x1c))(puVar3,4,1); local_28 = (void *)*puVar3; ((Checksum *)(&local_40))->Checksum::Update((byte *)&local_28,4); - pvVar2 = (void *)((int)pvVar2 + 1); + pvVar2 = (void *)(GHIDRA_INT(pvVar2) + 1); puVar3 = puVar3 + 1; } while (pvVar2 < sectionCount); } @@ -1577,11 +1577,11 @@ void PersistentGameData::write() pvVar2 = (void *)0x0; if (sectionCount != (void *)0x0) { do { - isFlagSet = *(char *)((char *)this->_eventCounters + (int)pvVar2 + 0x82cU) != '\0'; + isFlagSet = *(char *)((char *)this->_eventCounters + GHIDRA_INT(pvVar2) + 0x82cU) != '\0'; (**(code **)(*(int *)this->_saveFile + 0x1c))(&isFlagSet,1,1); flagByte[0] = isFlagSet; ((Checksum *)(&local_40))->Checksum::Update(flagByte,1); - pvVar2 = (void *)((int)pvVar2 + 1); + pvVar2 = (void *)(GHIDRA_INT(pvVar2) + 1); } while (pvVar2 < sectionCount); } sectionId = (void *)0x5; @@ -1599,11 +1599,11 @@ void PersistentGameData::write() pvVar2 = (void *)0x0; if (sectionCount != (void *)0x0) { do { - isFlagSet = *(char *)((char *)this->_cutsceneCounters + ((int)pvVar2 - 0xa0U)) != '\0'; + isFlagSet = *(char *)((char *)this->_cutsceneCounters + (GHIDRA_INT(pvVar2) - 0xa0U)) != '\0'; (**(code **)(*(int *)this->_saveFile + 0x1c))(&isFlagSet,1,1); flagByte[0] = isFlagSet; ((Checksum *)(&local_40))->Checksum::Update(flagByte,1); - pvVar2 = (void *)((int)pvVar2 + 1); + pvVar2 = (void *)(GHIDRA_INT(pvVar2) + 1); } while (pvVar2 < sectionCount); } sectionId = (void *)0x6; @@ -1621,11 +1621,11 @@ void PersistentGameData::write() pvVar2 = (void *)0x0; if (sectionCount != (void *)0x0) { do { - isFlagSet = *(char *)((char *)this->_cutsceneCounters + ((int)pvVar2 - 0x99U)) != '\0'; + isFlagSet = *(char *)((char *)this->_cutsceneCounters + (GHIDRA_INT(pvVar2) - 0x99U)) != '\0'; (**(code **)(*(int *)this->_saveFile + 0x1c))(&isFlagSet,1,1); flagByte[0] = isFlagSet; ((Checksum *)(&local_40))->Checksum::Update(flagByte,1); - pvVar2 = (void *)((int)pvVar2 + 1); + pvVar2 = (void *)(GHIDRA_INT(pvVar2) + 1); } while (pvVar2 < sectionCount); } sectionId = (void *)0x7; @@ -1643,11 +1643,11 @@ void PersistentGameData::write() pvVar2 = (void *)0x0; if (sectionCount != (void *)0x0) { do { - isFlagSet = *(char *)((char *)this->_cutsceneCounters + ((int)pvVar2 - 0x31U)) != '\0'; + isFlagSet = *(char *)((char *)this->_cutsceneCounters + (GHIDRA_INT(pvVar2) - 0x31U)) != '\0'; (**(code **)(*(int *)this->_saveFile + 0x1c))(&isFlagSet,1,1); flagByte[0] = isFlagSet; ((Checksum *)(&local_40))->Checksum::Update(flagByte,1); - pvVar2 = (void *)((int)pvVar2 + 1); + pvVar2 = (void *)(GHIDRA_INT(pvVar2) + 1); } while (pvVar2 < sectionCount); } sectionId = (void *)0x8; @@ -1670,7 +1670,7 @@ void PersistentGameData::write() (**(code **)(*(int *)this->_saveFile + 0x1c))(&local_20,4,1); local_28 = local_20; ((Checksum *)(&local_40))->Checksum::Update((byte *)&local_28,4); - pvVar2 = (void *)((int)pvVar2 + 1); + pvVar2 = (void *)(GHIDRA_INT(pvVar2) + 1); valuePtr = valuePtr + 1; } while (pvVar2 < sectionCount); } @@ -1694,7 +1694,7 @@ void PersistentGameData::write() (**(code **)(*(int *)this->_saveFile + 0x1c))(&local_20,4,1); local_28 = local_20; ((Checksum *)(&local_40))->Checksum::Update((byte *)&local_28,4); - pvVar2 = (void *)((int)pvVar2 + 1); + pvVar2 = (void *)(GHIDRA_INT(pvVar2) + 1); valuePtr = valuePtr + 1; } while (pvVar2 < sectionCount); } @@ -1713,18 +1713,18 @@ void PersistentGameData::write() pvVar2 = (void *)0x0; if (sectionCount != (void *)0x0) { do { - isFlagSet = *(char *)((char *)this->_cutsceneCounters + (int)pvVar2 + 0x74U) != '\0'; + isFlagSet = *(char *)((char *)this->_cutsceneCounters + GHIDRA_INT(pvVar2) + 0x74U) != '\0'; (**(code **)(*(int *)this->_saveFile + 0x1c))(&isFlagSet,1,1); flagByte[0] = isFlagSet; ((Checksum *)(&local_40))->Checksum::Update(flagByte,1); - pvVar2 = (void *)((int)pvVar2 + 1); + pvVar2 = (void *)(GHIDRA_INT(pvVar2) + 1); } while (pvVar2 < sectionCount); } sectionCount = (void *)((this->_bestiaryEncounters)._size + *(int *)&(*(undefined1 *)((char *)(this) + 0xf78)) + (this->_bestiaryDeaths)._size + (this->_bestiaryKills)._size); sectionId = (void *)0xb; - sectionSize = (void *)((int)sectionCount * 4); + sectionSize = (void *)(GHIDRA_INT(sectionCount) * 4); (**(code **)(*(int *)this->_saveFile + 0x1c))(§ionId,4,1); local_28 = sectionId; ((Checksum *)(&local_40))->Checksum::Update((byte *)&local_28,4); @@ -1748,11 +1748,11 @@ void PersistentGameData::write() if (local_28 != valuePtr) { do { pvVar2 = local_28; - puVar3 = (uint *)((int)local_28 + 0x10); + puVar3 = (uint *)(GHIDRA_INT(local_28) + 0x10); (**(code **)(*(int *)this->_saveFile + 0x1c))(puVar3,4,1); checksumWord = (void *)*puVar3; ((Checksum *)(&local_40))->Checksum::Update((byte *)&checksumWord,4); - (**(code **)(*(int *)this->_saveFile + 0x1c))((uint *)((int)pvVar2 + 0x14),4,1); + (**(code **)(*(int *)this->_saveFile + 0x1c))((uint *)(GHIDRA_INT(pvVar2) + 0x14),4,1); checksumWord = *(void **)((char *)pvVar2 + 0x14); ((Checksum *)(&local_40))->Checksum::Update((byte *)&checksumWord,4); std:: @@ -1774,11 +1774,11 @@ void PersistentGameData::write() if (local_28 != valuePtr) { do { pvVar2 = local_28; - puVar3 = (uint *)((int)local_28 + 0x10); + puVar3 = (uint *)(GHIDRA_INT(local_28) + 0x10); (**(code **)(*(int *)this->_saveFile + 0x1c))(puVar3,4,1); checksumWord = (void *)*puVar3; ((Checksum *)(&local_40))->Checksum::Update((byte *)&checksumWord,4); - (**(code **)(*(int *)this->_saveFile + 0x1c))((int *)((int)pvVar2 + 0x14),4,1); + (**(code **)(*(int *)this->_saveFile + 0x1c))((int *)(GHIDRA_INT(pvVar2) + 0x14),4,1); checksumWord = *(void **)((char *)pvVar2 + 0x14); ((Checksum *)(&local_40))->Checksum::Update((byte *)&checksumWord,4); std:: @@ -1799,11 +1799,11 @@ void PersistentGameData::write() if (local_28 != *(int **)&(*(undefined1 *)((char *)(this) + 0xf74))) { do { pvVar2 = local_28; - puVar3 = (uint *)((int)local_28 + 0x10); + puVar3 = (uint *)(GHIDRA_INT(local_28) + 0x10); (**(code **)(*(int *)this->_saveFile + 0x1c))(puVar3,4,1); checksumWord = (void *)*puVar3; ((Checksum *)(&local_40))->Checksum::Update((byte *)&checksumWord,4); - (**(code **)(*(int *)this->_saveFile + 0x1c))((int *)((int)pvVar2 + 0x14),4,1); + (**(code **)(*(int *)this->_saveFile + 0x1c))((int *)(GHIDRA_INT(pvVar2) + 0x14),4,1); checksumWord = *(void **)((char *)pvVar2 + 0x14); ((Checksum *)(&local_40))->Checksum::Update((byte *)&checksumWord,4); std:: @@ -1825,11 +1825,11 @@ void PersistentGameData::write() if (local_28 != valuePtr) { do { pvVar2 = local_28; - puVar3 = (uint *)((int)local_28 + 0x10); + puVar3 = (uint *)(GHIDRA_INT(local_28) + 0x10); (**(code **)(*(int *)this->_saveFile + 0x1c))(puVar3,4,1); checksumWord = (void *)*puVar3; ((Checksum *)(&local_40))->Checksum::Update((byte *)&checksumWord,4); - (**(code **)(*(int *)this->_saveFile + 0x1c))((int *)((int)pvVar2 + 0x14),4,1); + (**(code **)(*(int *)this->_saveFile + 0x1c))((int *)(GHIDRA_INT(pvVar2) + 0x14),4,1); checksumWord = *(void **)((char *)pvVar2 + 0x14); ((Checksum *)(&local_40))->Checksum::Update((byte *)&checksumWord,4); std:: @@ -1845,7 +1845,7 @@ void PersistentGameData::write() ((Checksum *)(&local_40))->Checksum::Update((byte *)&checksumWord,4); if ((local_34 == 0) && (local_3c != 0)) { if (local_3c < 4) { - memset((void *)(extraout_ECX + (uint)local_3c),0,(uint)(byte)(4 - local_3c)); + memset((void *)(extraout_ECX + GHIDRA_UINT(local_3c)),0,GHIDRA_UINT((byte)(4 - local_3c))); } finalChecksum = local_38 * -0x80000000 + (local_38 >> 1) + local_40; } @@ -1878,7 +1878,7 @@ void PersistentGameData::SaveToSteamCloud() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } allocBlock = malloc(0x28); if (allocBlock == (undefined4 *)0x0) { @@ -1886,10 +1886,10 @@ void PersistentGameData::SaveToSteamCloud() } else { oldAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes + 0x28; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) + 0x28; *allocBlock = 0x28; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) + (uint)(0xffffffd7 < (uint)oldAllocatedBytes); + *(uint *)((char *)allocatedBytes + 4) + GHIDRA_UINT((0xffffffd7 < GHIDRA_UINT(oldAllocatedBytes))); cloudFile = allocBlock + 1; if (cloudFile != (undefined4 *)0x0) { allocBlock[2] = 2; @@ -2114,7 +2114,7 @@ byte * PersistentGameData::get_save_file_name() ch = *pbVar1; pbVar1 = pbVar1 + 1; } while (ch != 0); - fileNameCopy = operator_new_tracked((uint)(pbVar1 + (1 - (int)(fileNameCopy + 1)))); + fileNameCopy = operator_new_tracked(GHIDRA_UINT((pbVar1 + (1 - GHIDRA_INT((fileNameCopy + 1)))))); pbVar1 = fileNameCopy; do { ch = *fileNameCopy; @@ -2143,7 +2143,7 @@ void PersistentGameData::write_file(byte *path) allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } block = malloc(0x14); if (block == (undefined4 *)0x0) { @@ -2151,10 +2151,10 @@ void PersistentGameData::write_file(byte *path) } else { oldAllocated = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter + 0x14; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) + 0x14; *block = 0x14; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) + (uint)(0xffffffeb < (uint)oldAllocated); + *(uint *)((char *)allocCounter + 4) + GHIDRA_UINT((0xffffffeb < GHIDRA_UINT(oldAllocated))); puVar1 = block + 1; if (puVar1 != (undefined4 *)0x0) { block[2] = 2; @@ -2221,7 +2221,7 @@ void PersistentGameData::Save() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } fileBlock = malloc(0x14); if (fileBlock == (undefined4 *)0x0) { @@ -2229,10 +2229,10 @@ void PersistentGameData::Save() } else { qVar1 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes + 0x14; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) + 0x14; *fileBlock = 0x14; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) + (uint)(0xffffffeb < (uint)qVar1); + *(uint *)((char *)allocatedBytes + 4) + GHIDRA_UINT((0xffffffeb < GHIDRA_UINT(qVar1))); newFile = fileBlock + 1; if (newFile != (undefined4 *)0x0) { fileBlock[2] = 2; @@ -2286,7 +2286,7 @@ void PersistentGameData::check_challenge_unlocks() requirementIdx = 0; challengeParamsBegin = (g_manager->_challengeParams)._begin; lastChallengeIdx = - ((int)(g_manager->_challengeParams)._end - (int)(g_manager->_challengeParams)._begin) / + (GHIDRA_INT((g_manager->_challengeParams)._end) - GHIDRA_INT((g_manager->_challengeParams)._begin)) / 0xa4 - 1; isAllAchievedNext = true; while( true ) { @@ -2295,8 +2295,8 @@ void PersistentGameData::check_challenge_unlocks() if (uVar1 < lastChallengeIdx) { clampedChallenge = uVar1; } - if ((uint)(*(int *)(clampedChallenge * 0xa4 + 0x4c + (int)challengeParamsBegin) - - *(int *)(clampedChallenge * 0xa4 + 0x48 + (int)challengeParamsBegin) >> 2) <= + if (GHIDRA_UINT((*(int *)(clampedChallenge * 0xa4 + 0x4c + GHIDRA_INT(challengeParamsBegin)) - + *(int *)(clampedChallenge * 0xa4 + 0x48 + GHIDRA_INT(challengeParamsBegin)) >> 2)) <= requirementIdx) break; requirementOffset = requirementIdx * 4; clampedChallenge = lastChallengeIdx; @@ -2306,7 +2306,7 @@ void PersistentGameData::check_challenge_unlocks() requirementIdx = requirementIdx + 1; isAllAchievedNext = false; if (this->_achievements - [*(int *)(*(int *)(clampedChallenge * 0xa4 + 0x48 + (int)challengeParamsBegin) + + [*(int *)(*(int *)(clampedChallenge * 0xa4 + 0x48 + GHIDRA_INT(challengeParamsBegin)) + requirementOffset)] != 0) { isAllAchievedNext = isAllAchieved; } @@ -2315,7 +2315,7 @@ void PersistentGameData::check_challenge_unlocks() TryUnlock(this,*(int *)(&DAT_00b7b0b0 + uVar1 * 4)); } uVar1 = uVar1 + 1; - } while ((int)uVar1 < 0x2e); + } while (GHIDRA_INT(uVar1) < 0x2e); return; } @@ -2327,7 +2327,7 @@ void PersistentGameData::UnlockSteamAchievement(int achievementID) uint local_c; undefined1 auStack_8 [4]; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); if (this->_isSteamAchievementsEnabled != 0) { sprintf_s(achievementName,8,s__d); KAGE_LogMessage(1,(byte *)"unlock steam achievement \'%s\'\n"); @@ -2354,7 +2354,7 @@ byte PersistentGameData::TryUnlock(int achievementID) } this->_achievements[achievementID] = 1; if (manager->_netplayManager != *(NetplayManager *)(manager + 1)) { - isGameplayInputActive = Manager::IsGameplayInputActive((int)manager); + isGameplayInputActive = Manager::IsGameplayInputActive(GHIDRA_INT(manager)); if (isGameplayInputActive != 0) goto LAB_00929a75; } if (this->_isSteamAchievementsEnabled != 0) { @@ -2373,7 +2373,7 @@ byte PersistentGameData::Unlocked(int achievementID) { if ((achievementID == -2) || ((-1 < achievementID && - ((0x281 < (uint)achievementID || + ((0x281 < GHIDRA_UINT(achievementID) || (((achievementID != 0 && (this->_achievements[achievementID] == 0)) && (((g_manager->_state != 2 || (g_game == (Game *)0x0)) || (((g_game->_dailyChallenge)._id == 0 && (g_game->_isDebug == 0)))))))))))) { @@ -2398,7 +2398,7 @@ void PersistentGameData::IncreaseEventCounter(int eEventCounters, int num) uint local_8; bool isAllMarked; - local_8 = __security_cookie ^ (uint)(aiStack_c4 + 0x30); + local_8 = __security_cookie ^ GHIDRA_UINT((aiStack_c4 + 0x30)); if (this->_isReadOnly == 0) { iVar1 = this->_eventCounters[eEventCounters]; iVar3 = 0; @@ -2415,10 +2415,10 @@ void PersistentGameData::IncreaseEventCounter(int eEventCounters, int num) if (9 < uVar2) { TryUnlock(this,0x181); } - if (9 < (uint)this->_eventCounters[200]) { + if (9 < GHIDRA_UINT(this->_eventCounters[200])) { TryUnlock(this,0x179); } - if (4 < (uint)this->_eventCounters[0xc9]) { + if (4 < GHIDRA_UINT(this->_eventCounters[0xc9])) { TryUnlock(this,0x17e); } uVar2 = this->_eventCounters[2]; @@ -2437,16 +2437,16 @@ void PersistentGameData::IncreaseEventCounter(int eEventCounters, int num) if (99 < uVar2) { TryUnlock(this,0xc); } - if (3 < (uint)this->_eventCounters[7]) { + if (3 < GHIDRA_UINT(this->_eventCounters[7])) { TryUnlock(this,0x24); } - if (9 < (uint)this->_eventCounters[9]) { + if (9 < GHIDRA_UINT(this->_eventCounters[9])) { TryUnlock(this,0x1a); } - if (99 < (uint)this->_eventCounters[5]) { + if (99 < GHIDRA_UINT(this->_eventCounters[5])) { TryUnlock(this,0x91); } - if (4 < (uint)this->_eventCounters[0xc2]) { + if (4 < GHIDRA_UINT(this->_eventCounters[0xc2])) { TryUnlock(this,0x161); } uVar2 = this->_eventCounters[0xb]; @@ -2457,13 +2457,13 @@ void PersistentGameData::IncreaseEventCounter(int eEventCounters, int num) if (4 < uVar2) { TryUnlock(this,0x39); } - if (4 < (uint)this->_eventCounters[0xd]) { + if (4 < GHIDRA_UINT(this->_eventCounters[0xd])) { TryUnlock(this,0x4e); } if ((this->_eventCounters[0x18] != 0) && (this->_eventCounters[0x19] != 0)) { TryUnlock(this,0x29); } - if (99 < (uint)this->_eventCounters[10]) { + if (99 < GHIDRA_UINT(this->_eventCounters[10])) { TryUnlock(this,0x1e); } uVar2 = 0; @@ -2527,10 +2527,10 @@ void PersistentGameData::IncreaseEventCounter(int eEventCounters, int num) if (0x1d < uVar2) { TryUnlock(this,0x159); } - if (0x13 < (uint)this->_eventCounters[0xc]) { + if (0x13 < GHIDRA_UINT(this->_eventCounters[0xc])) { TryUnlock(this,0x3d); } - if (99 < (uint)this->_eventCounters[0xe]) { + if (99 < GHIDRA_UINT(this->_eventCounters[0xe])) { TryUnlock(this,0x40); } uVar2 = this->_eventCounters[0xf]; @@ -2553,46 +2553,46 @@ void PersistentGameData::IncreaseEventCounter(int eEventCounters, int num) if (0x31 < uVar2) { TryUnlock(this,0x17f); } - if (0x1d < (uint)this->_eventCounters[0x11]) { + if (0x1d < GHIDRA_UINT(this->_eventCounters[0x11])) { TryUnlock(this,0x93); } - if (0x1d < (uint)this->_eventCounters[0x12]) { + if (0x1d < GHIDRA_UINT(this->_eventCounters[0x12])) { TryUnlock(this,0x94); } - if ((0x1e < (uint)this->_eventCounters[0xbe]) && (g_manager->_state == 1)) { + if ((0x1e < GHIDRA_UINT(this->_eventCounters[0xbe])) && (g_manager->_state == 1)) { TryUnlock(this,0x145); } - if (4 < (uint)this->_eventCounters[0xc0]) { + if (4 < GHIDRA_UINT(this->_eventCounters[0xc0])) { TryUnlock(this,0x150); } - if (6 < (uint)this->_eventCounters[0xc1]) { + if (6 < GHIDRA_UINT(this->_eventCounters[0xc1])) { TryUnlock(this,0x162); } - if (0x13 < (uint)this->_eventCounters[0xc3]) { + if (0x13 < GHIDRA_UINT(this->_eventCounters[0xc3])) { TryUnlock(this,0x166); } - if (0x13 < (uint)this->_eventCounters[0xc4]) { + if (0x13 < GHIDRA_UINT(this->_eventCounters[0xc4])) { TryUnlock(this,0x16a); } - if (0x31 < (uint)this->_eventCounters[0xc5]) { + if (0x31 < GHIDRA_UINT(this->_eventCounters[0xc5])) { TryUnlock(this,0x16c); } - if (0x13 < (uint)this->_eventCounters[0xc6]) { + if (0x13 < GHIDRA_UINT(this->_eventCounters[0xc6])) { TryUnlock(this,0x173); } - if (0x31 < (uint)this->_eventCounters[199]) { + if (0x31 < GHIDRA_UINT(this->_eventCounters[199])) { TryUnlock(this,0x177); } - if (9 < (uint)this->_eventCounters[0x1ed]) { + if (9 < GHIDRA_UINT(this->_eventCounters[0x1ed])) { TryUnlock(this,0x199); } - if (9 < (uint)this->_eventCounters[0x1ee]) { + if (9 < GHIDRA_UINT(this->_eventCounters[0x1ee])) { TryUnlock(this,0x221); } - if (4 < (uint)this->_eventCounters[0x1ef]) { + if (4 < GHIDRA_UINT(this->_eventCounters[0x1ef])) { TryUnlock(this,0x20b); } - if (2 < (uint)this->_eventCounters[0x9e]) { + if (2 < GHIDRA_UINT(this->_eventCounters[0x9e])) { TryUnlock(this,0x197); } iVar1 = 0; @@ -2727,7 +2727,7 @@ LAB_0092a235: // 0092a2d0 void PersistentGameData::AddToCollection(int collectibleID) { - if ((this->_isReadOnly == 0) && ((uint)collectibleID < 0x2dd)) { + if ((this->_isReadOnly == 0) && (GHIDRA_UINT(collectibleID) < 0x2dd)) { if ((collectibleID != 0) && (*(char *)((char *)this->_eventCounters + collectibleID + 0x82c) == '\0')) { *(undefined1 *)((char *)this->_eventCounters + collectibleID + 0x82c) = 1; @@ -2790,7 +2790,7 @@ LAB_0092a3f8: iVar3 = iVar1; } id = id + 1; - if (0x2dc < (int)id) { + if (0x2dc < GHIDRA_INT(id)) { if (0x159 < iVar2 + iVar3) { unlockedAchievementCount = 0; iVar3 = 1; @@ -2845,7 +2845,7 @@ LAB_0092a3f8: // 0092a7b0 void PersistentGameData::AddChallenge(int challengeID) { - if ((this->_isReadOnly == 0) && ((uint)challengeID < 0x2e)) { + if ((this->_isReadOnly == 0) && (GHIDRA_UINT(challengeID) < 0x2e)) { *(undefined1 *)((char *)this->_cutsceneCounters + challengeID + -0x31) = 1; switch(challengeID) { case 1: @@ -3028,7 +3028,7 @@ byte PersistentGameData::AddBestiaryKill(int EntityType, int EntityVariant) case 0x110: iVar1 = GetBestiaryKillCount(persistentData,0x110,0); otherKillCount = GetBestiaryKillCount(persistentData,0x10f,0); - if (9 < (uint)(iVar1 + otherKillCount)) { + if (9 < GHIDRA_UINT((iVar1 + otherKillCount))) { TryUnlock(persistentData,0x175); } break; @@ -3081,7 +3081,7 @@ byte PersistentGameData::TryAddBestiaryEncounter(int type, int variant) piVar2 = (int *)((bestiaryEntry->id << 0xc | bestiaryEntry->variant) * 0x100); local_24 = piVar2; std::set::find_node(findResult,&local_24); - if (((*(char *)((char *)foundNode + 0xd) == '\0') && (*(int *)((char *)foundNode + 0x10) <= (int)piVar2) + if (((*(char *)((char *)foundNode + 0xd) == '\0') && (*(int *)((char *)foundNode + 0x10) <= GHIDRA_INT(piVar2)) ) && (foundNode != (this->_bestiaryEncounters)._head)) { encounterKey = piVar2; piVar2 = (int *)std::map::operator_index(&encounterKey); @@ -3122,7 +3122,7 @@ byte PersistentGameData::TryAddBestiaryEncounter(int type, int variant) ((g_manager->_persistentGameData)._achievements[0x144] == 0)) { (g_manager->_persistentGameData)._achievements[0x144] = 1; if (((manager->_netplayManager == *(NetplayManager *)(manager + 1)) || - (isInputActive = Manager::IsGameplayInputActive((int)piVar2), isInputActive == 0)) && + (isInputActive = Manager::IsGameplayInputActive(GHIDRA_INT(piVar2)), isInputActive == 0)) && ((manager->_persistentGameData)._isSteamAchievementsEnabled != 0)) { UnlockSteamAchievement(persistentData,0x144); Manager::queue_achievement_popup(0x144); @@ -3210,7 +3210,7 @@ void PersistentGameData::set_run_mask(uint maskLow, uint maskHigh) setBitCount = setBitCount + 1; } bit = bit + 1; - } while ((int)bit < 0x29); + } while (GHIDRA_INT(bit) < 0x29); if (4 < setBitCount) { TryUnlock(this,0x143); } @@ -3317,8 +3317,8 @@ byte PersistentGameData::TryImportRebirthLocalSave(byte *path) ppppbStack_14 = (byte ****)0xffffffff; puStack_18 = &UNK_00b0aa10; savedExceptionList = *unaff_FS_OFFSET; - stackCookie = __security_cookie ^ (uint)(rebirthPath + 0xb); - *unaff_FS_OFFSET = (int)&savedExceptionList; + stackCookie = __security_cookie ^ GHIDRA_UINT((rebirthPath + 0xb)); + *unaff_FS_OFFSET = GHIDRA_INT(&savedExceptionList); searchText = std::_Allocate(0x20); searchTextSize = 0x1c; searchText[0] = 'B'; @@ -3361,8 +3361,8 @@ byte PersistentGameData::TryImportRebirthLocalSave(byte *path) pbVar3 = pbVar3 + 1; } while (curByte != 0); searchTextBuf = searchText; - ((std::string *)((char *)rebirthPath))->std::string::assign(path,(int)pbVar3 - (int)(path + 1)); - ppppbStack_14._0_1_ = 1; + ((std::string *)((char *)rebirthPath))->std::string::assign(path,GHIDRA_INT(pbVar3) - GHIDRA_INT((path + 1))); + (*(undefined1 *)((char *)&(ppppbStack_14) + 0x0)) = 1; pppppbVar5 = (byte *****)rebirthPath; if (0xf < rebirthPathCapacity) { pppppbVar5 = rebirthPath[0]; @@ -3373,7 +3373,7 @@ byte PersistentGameData::TryImportRebirthLocalSave(byte *path) if (rebirthPathSize - 0x1c != -1) { iVar2 = rebirthPathSize - 0x1c; } - matchPos = (byte *****)((int)pppppbVar5 + iVar2); + matchPos = (byte *****)(GHIDRA_INT(pppppbVar5) + iVar2); do { if (*(byte *)matchPos == *searchText) { uVar7 = 0x18; @@ -3385,7 +3385,7 @@ byte PersistentGameData::TryImportRebirthLocalSave(byte *path) isLess = (byte)pppppbVar4 < *pbVar3; if ((byte)pppppbVar4 == *pbVar3) { curByte = *(byte *)((char *)compareCursor + 1); - uVar6 = (undefined3)((uint)pppppbVar4 >> 8); + uVar6 = (undefined3)(GHIDRA_UINT(pppppbVar4) >> 8); pppppbVar4 = (byte *****)CONCAT31(uVar6,curByte); isLess = curByte < pbVar3[1]; if (curByte == pbVar3[1]) { @@ -3403,7 +3403,7 @@ byte PersistentGameData::TryImportRebirthLocalSave(byte *path) } } } - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_0092b42a; } compareCursor = compareCursor + 1; @@ -3414,9 +3414,9 @@ byte PersistentGameData::TryImportRebirthLocalSave(byte *path) uVar7 = 0; LAB_0092b42a: if (uVar7 == 0) { - if ((int)matchPos - (int)pppppbVar5 != 0xffffffff) { + if (GHIDRA_INT(matchPos) - GHIDRA_INT(pppppbVar5) != 0xffffffff) { std::string::replace - ((char *)rebirthPath,(int)matchPos - (int)pppppbVar5,0x1c, + ((char *)rebirthPath,GHIDRA_INT(matchPos) - GHIDRA_INT(pppppbVar5),0x1c, (byte *)"Binding of Isaac Rebirth",0x18); pppppbVar4 = extraout_ECX; } @@ -3425,7 +3425,7 @@ LAB_0092b42a: } pppppbVar4 = pppppbVar5; if (matchPos == pppppbVar5) break; - matchPos = (byte *****)((int)matchPos + -1); + matchPos = (byte *****)(GHIDRA_INT(matchPos) + -1); } while( true ); } pppppbVar5 = (byte *****)rebirthPath; @@ -3439,15 +3439,15 @@ LAB_0092b42a: rebirthStrCapacity = 0xf; rebirthStr = (void *)0x0; RebirthSaveData::Clear(pppppbVar4); - ppppbStack_14 = (byte ****)CONCAT31(ppppbStack_14._1_3_,2); + ppppbStack_14 = (byte ****)CONCAT31((*(undefined1 *)((char *)&(ppppbStack_14) + 0x1)),2); RebirthSaveData::Clear(extraout_ECX_00); pppppbVar4 = pppppbVar5; do { cVar1 = *(char *)pppppbVar4; - pppppbVar4 = (byte *****)((int)pppppbVar4 + 1); + pppppbVar4 = (byte *****)(GHIDRA_INT(pppppbVar4) + 1); } while (cVar1 != '\0'); ((std::string *)((char *)rebirthSavePath))->std::string::assign((byte *)pppppbVar5, - (int)pppppbVar4 - ((int)pppppbVar5 + 1)); + GHIDRA_INT(pppppbVar4) - (GHIDRA_INT(pppppbVar5) + 1)); KAGE_LogMessage(1,(byte *)"Loading RebirthPersistentGameData from disk: %s.\n"); saveFile = ((SaveDataManager *)(&PTR_vftable_00c5aa80))->SaveDataManager::open_file_read((byte *)pppppbVar5); if (saveFile == (int *)0x0) { @@ -3509,7 +3509,7 @@ LAB_0092b7ec: do { counterEntry = func_0x009e3ea0(); iVar2 = iVar2 + 1; - this->_eventCounters[(int)counterEntry] = (int)((ulonglong)counterEntry >> 0x20); + this->_eventCounters[GHIDRA_INT(counterEntry)] = GHIDRA_INT(((ulonglong)counterEntry >> 0x20)); } while (iVar2 < 0x5f); iVar2 = 0; this->_cutsceneCounters[0] = rebirthCutsceneCounter0; @@ -3543,7 +3543,7 @@ LAB_0092b7ec: do { counterEntry = func_0x009e4f80(); iVar2 = iVar2 + 1; - this->_cutsceneCounters[(int)counterEntry + -0x36] = (int)((ulonglong)counterEntry >> 0x20); + this->_cutsceneCounters[GHIDRA_INT(counterEntry) + -0x36] = GHIDRA_INT(((ulonglong)counterEntry >> 0x20)); manager = g_manager; } while (iVar2 < 0xc); *(undefined1 *)this = 1; @@ -3569,7 +3569,7 @@ LAB_0092b7d7: isImported = 1; } } - ppppbStack_14 = (byte ****)CONCAT31(ppppbStack_14._1_3_,4); + ppppbStack_14 = (byte ****)CONCAT31((*(undefined1 *)((char *)&(ppppbStack_14) + 0x1)),4); if (saveFile != (int *)0x0) { (**(code **)*saveFile)(1); } @@ -3579,33 +3579,33 @@ LAB_0092b7d7: if (0xfff < uVar7) { freeBlock = *(void **)((char *)rebirthStr + -4); uVar7 = rebirthStrCapacity + 0x24; - if (0x1f < (uint)((int)rebirthStr + (-4 - (int)freeBlock))) goto LAB_0092b8cf; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(rebirthStr) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_0092b8cf; } operator_delete(freeBlock,uVar7); } rebirthStrSize = 0; rebirthStrCapacity = 0xf; - rebirthStr = (void *)((uint)rebirthStr & 0xffffff00); + rebirthStr = (void *)(GHIDRA_UINT(rebirthStr) & 0xffffff00); if (0xf < rebirthSavePathCapacity) { uVar7 = rebirthSavePathCapacity + 1; freeBlock = rebirthSavePath[0]; if (0xfff < uVar7) { - freeBlock = *(void **)((int)rebirthSavePath[0] + -4); + freeBlock = *(void **)(GHIDRA_INT(rebirthSavePath[0]) + -4); uVar7 = rebirthSavePathCapacity + 0x24; - if (0x1f < (uint)((int)rebirthSavePath[0] + (-4 - (int)freeBlock))) goto LAB_0092b8cf; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(rebirthSavePath[0]) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_0092b8cf; } operator_delete(freeBlock,uVar7); } rebirthSavePathSize = 0; rebirthSavePathCapacity = 0xf; - rebirthSavePath[0] = (void *)((uint)rebirthSavePath[0] & 0xffffff00); + rebirthSavePath[0] = (void *)(GHIDRA_UINT(rebirthSavePath[0]) & 0xffffff00); if (0xf < rebirthPathCapacity) { uVar7 = rebirthPathCapacity + 1; pppppbVar5 = rebirthPath[0]; if (0xfff < uVar7) { pppppbVar5 = (byte *****)rebirthPath[0][-1]; uVar7 = rebirthPathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)rebirthPath[0] + (-4 - (int)pppppbVar5))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(rebirthPath[0]) + (-4 - GHIDRA_INT(pppppbVar5)))) { LAB_0092b8cf: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3615,7 +3615,7 @@ LAB_0092b8cf: } rebirthPathSize = 0; rebirthPathCapacity = 0xf; - rebirthPath[0] = (byte *****)((uint)rebirthPath[0] & 0xffffff00); + rebirthPath[0] = (byte *****)(GHIDRA_UINT(rebirthPath[0]) & 0xffffff00); operator_delete(searchText,0x20); *unaff_FS_OFFSET = savedExceptionList; return isImported; @@ -3723,11 +3723,11 @@ byte PersistentGameData::import_afterbirth_save(void *stream) undefined4 local_14; Manager *manager; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b0aa50; local_1c = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 0x10U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; local_70c = 0; abFirstStringSize = 0; @@ -3864,20 +3864,20 @@ byte PersistentGameData::import_afterbirth_save(void *stream) if (0xfff < uVar1) { stringBlock = *(void **)((char *)abSecondStringData + -4); uVar1 = abSecondStringCapacity + 0x24; - if (0x1f < (uint)((int)abSecondStringData + (-4 - (int)stringBlock))) goto LAB_0092bce3; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(abSecondStringData) + (-4 - GHIDRA_INT(stringBlock))))) goto LAB_0092bce3; } operator_delete(stringBlock,uVar1); } abSecondStringSize = 0; abSecondStringCapacity = 0xf; - abSecondStringData = (void *)((uint)abSecondStringData & 0xffffff00); + abSecondStringData = (void *)(GHIDRA_UINT(abSecondStringData) & 0xffffff00); if (0xf < abFirstStringCapacity) { uVar1 = abFirstStringCapacity + 1; stringBlock = abFirstStringData; if (0xfff < uVar1) { stringBlock = *(void **)((char *)abFirstStringData + -4); uVar1 = abFirstStringCapacity + 0x24; - if (0x1f < (uint)((int)abFirstStringData + (-4 - (int)stringBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(abFirstStringData) + (-4 - GHIDRA_INT(stringBlock))))) { LAB_0092bce3: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3919,8 +3919,8 @@ byte PersistentGameData::TryImportABLocalSave(byte *path) ppppbStack_14 = (byte ****)0xffffffff; puStack_18 = &UNK_00b0aad5; iStack_1c = *unaff_FS_OFFSET; - uVar3 = __security_cookie ^ (uint)(savePath + 0xb); - *unaff_FS_OFFSET = (int)&iStack_1c; + uVar3 = __security_cookie ^ GHIDRA_UINT((savePath + 0xb)); + *unaff_FS_OFFSET = GHIDRA_INT(&iStack_1c); savePathSize = 0; savePathCapacity = 0xf; savePath[0] = (byte *****)0x0; @@ -3930,7 +3930,7 @@ byte PersistentGameData::TryImportABLocalSave(byte *path) pbVar5 = pbVar5 + 1; } while (bVar2 != 0); uStack_24 = uVar3; - ((std::string *)((char *)savePath))->std::string::assign(path,(int)pbVar5 - (int)(path + 1)); + ((std::string *)((char *)savePath))->std::string::assign(path,GHIDRA_INT(pbVar5) - GHIDRA_INT((path + 1))); ppppbStack_14 = (byte ****)0x0; pbVar5 = std::_Allocate(0x20); pbVar5[0] = 'B'; @@ -3962,7 +3962,7 @@ byte PersistentGameData::TryImportABLocalSave(byte *path) pbVar5[0x1a] = 'e'; pbVar5[0x1b] = '+'; pbVar5[0x1c] = 0; - ppppbStack_14 = (byte ****)CONCAT31(ppppbStack_14._1_3_,1); + ppppbStack_14 = (byte ****)CONCAT31((*(undefined1 *)((char *)&(ppppbStack_14) + 0x1)),1); pathChars = (byte *****)savePath; if (0xf < savePathCapacity) { pathChars = savePath[0]; @@ -4000,7 +4000,7 @@ LAB_0092c428: if (0xfff < uVar3) { pathChars = (byte *****)savePath[0][-1]; uVar3 = savePathCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)savePath[0] + (-4 - (int)pathChars))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(savePath[0]) + (-4 - GHIDRA_INT(pathChars)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -4014,7 +4014,7 @@ LAB_0092c428: if (savePathSize - 0x1c != -1) { iVar4 = savePathSize - 0x1c; } - matchPos = (byte *****)((int)pathChars + iVar4); + matchPos = (byte *****)(GHIDRA_INT(pathChars) + iVar4); do { if (*(byte *)matchPos == *pbVar5) { uVar6 = 0x18; @@ -4034,7 +4034,7 @@ LAB_0092c428: uVar6 = 0; } else { - uVar6 = -(uint)isLess | 1; + uVar6 = -GHIDRA_UINT(isLess) | 1; } goto LAB_0092c3fa; } @@ -4046,15 +4046,15 @@ LAB_0092c428: uVar6 = 0; LAB_0092c3fa: if (uVar6 == 0) { - if ((int)matchPos - (int)pathChars != 0xffffffff) { + if (GHIDRA_INT(matchPos) - GHIDRA_INT(pathChars) != 0xffffffff) { std::string::replace - ((char *)savePath,(int)matchPos - (int)pathChars,0x1c, + ((char *)savePath,GHIDRA_INT(matchPos) - GHIDRA_INT(pathChars),0x1c, (byte *)"Binding of Isaac Afterbirth",0x1b); } goto LAB_0092c428; } } if (matchPos == pathChars) goto LAB_0092c428; - matchPos = (byte *****)((int)matchPos + -1); + matchPos = (byte *****)(GHIDRA_INT(matchPos) + -1); } while( true ); } diff --git a/src/game/persistent_game_data_bestiary.cpp b/src/game/persistent_game_data_bestiary.cpp index 86f9778..ee0bd2e 100644 --- a/src/game/persistent_game_data_bestiary.cpp +++ b/src/game/persistent_game_data_bestiary.cpp @@ -29,7 +29,7 @@ PersistentGameData_Bestiary * PersistentGameData_Bestiary::constructor() *(PersistentGameData_Bestiary *)((char *)mapHead + 8) = mapHead; *(undefined2 *)((char *)mapHead + 0xc) = 0x101; this[2] = mapHead; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; this[4] = (PersistentGameData_Bestiary)0x0; this[5] = (PersistentGameData_Bestiary)0x0; mapHead = (PersistentGameData_Bestiary)operator_new(0x18); @@ -38,7 +38,7 @@ PersistentGameData_Bestiary * PersistentGameData_Bestiary::constructor() *(PersistentGameData_Bestiary *)((char *)mapHead + 8) = mapHead; *(undefined2 *)((char *)mapHead + 0xc) = 0x101; this[4] = mapHead; - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); this[6] = (PersistentGameData_Bestiary)0x0; this[7] = (PersistentGameData_Bestiary)0x0; mapHead = (PersistentGameData_Bestiary)operator_new(0x18); @@ -59,21 +59,21 @@ PersistentGameData_Bestiary::~PersistentGameData_Bestiary() encounterMap = this + 6; FID_conflict__Erase_tree_>_> (encounterMap,(fuzzer_allocator_> *)encounterMap, - *(_Tree_node **)((int)this[6] + 4)); + *(_Tree_node **)(GHIDRA_INT(this[6]) + 4)); operator_delete((void *)*encounterMap,0x18); encounterMap = this + 4; FID_conflict__Erase_tree_>_> (encounterMap,(fuzzer_allocator_> *)encounterMap, - *(_Tree_node **)((int)this[4] + 4)); + *(_Tree_node **)(GHIDRA_INT(this[4]) + 4)); operator_delete((void *)*encounterMap,0x18); encounterMap = this + 2; FID_conflict__Erase_tree_>_> (encounterMap,(fuzzer_allocator_> *)encounterMap, - *(_Tree_node **)((int)this[2] + 4)); + *(_Tree_node **)(GHIDRA_INT(this[2]) + 4)); operator_delete((void *)*encounterMap,0x18); FID_conflict__Erase_tree_>_> (this,(fuzzer_allocator_> *)this, - *(_Tree_node **)((int)*this + 4)); + *(_Tree_node **)(GHIDRA_INT(*this) + 4)); operator_delete((void *)*this,0x18); return; } diff --git a/src/game/persistent_game_data_reader.cpp b/src/game/persistent_game_data_reader.cpp index 87e6a40..b22b52c 100644 --- a/src/game/persistent_game_data_reader.cpp +++ b/src/game/persistent_game_data_reader.cpp @@ -26,9 +26,9 @@ void PersistentGameDataReader::read(PersistentGameData *data) puStack_c = &LAB_00b0a0b5; local_10 = ExceptionList; ExceptionList = &local_10; - piVar1 = (int *)((int)this + 0x48); + piVar1 = (int *)(GHIDRA_INT(this) + 0x48); (**(code **)(*(int *)((char *)this + 0x48) + 0xc)) - (0,0,__security_cookie ^ (int)register0x00000010 - 4U); + (0,0,__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); gameData = data; FUN_0091b650(data->_achievements,0x282); (**(code **)(*piVar1 + 0x14))(gameData->_eventCounters,1,0x82c); @@ -42,7 +42,7 @@ void PersistentGameDataReader::read(PersistentGameData *data) bestiaryMap = &gameData->_bestiaryEncounters; FID_conflict__Erase_tree_>_> (bestiaryMap,(fuzzer_allocator_> *)bestiaryMap, - *(_Tree_node **)((int)node + 4)); + *(_Tree_node **)(GHIDRA_INT(node) + 4)); *(void **)((char *)node + 4) = node; *(void **)node = node; *(void **)((char *)node + 8) = node; @@ -58,7 +58,7 @@ void PersistentGameDataReader::read(PersistentGameData *data) (**(code **)(*piVar1 + 0x14))(&local_20,1,8); std::set::find_node(&insertParent,&local_20); if ((*(char *)((char *)foundNode + 0xd) != '\0') || - (node = foundNode, (int)local_20 < *(int *)((char *)foundNode + 0x10))) { + (node = foundNode, GHIDRA_INT(local_20) < *(int *)((char *)foundNode + 0x10))) { if ((gameData->_bestiaryEncounters)._size == 0xaaaaaaa) goto LAB_0091b0e5; node = bestiaryMap->_head; local_8 = 0; @@ -85,7 +85,7 @@ void PersistentGameDataReader::read(PersistentGameData *data) node = bestiaryMap->_head; FID_conflict__Erase_tree_>_> (bestiaryMap,(fuzzer_allocator_> *)bestiaryMap, - *(_Tree_node **)((int)node + 4)); + *(_Tree_node **)(GHIDRA_INT(node) + 4)); *(void **)((char *)node + 4) = node; *(void **)node = node; *(void **)((char *)node + 8) = node; @@ -101,7 +101,7 @@ void PersistentGameDataReader::read(PersistentGameData *data) (**(code **)(*piVar1 + 0x14))(&local_28,1,8); std::set::find_node(&insertParent,&local_28); if ((*(char *)((char *)foundNode + 0xd) != '\0') || - (node = foundNode, (int)local_28 < *(int *)((char *)foundNode + 0x10))) { + (node = foundNode, GHIDRA_INT(local_28) < *(int *)((char *)foundNode + 0x10))) { if ((gameData->_bestiaryKills)._size == 0xaaaaaaa) { LAB_0091b0e5: /* WARNING: Subroutine does not return */ diff --git a/src/game/persistent_game_data_writer.cpp b/src/game/persistent_game_data_writer.cpp index 4d77970..5448214 100644 --- a/src/game/persistent_game_data_writer.cpp +++ b/src/game/persistent_game_data_writer.cpp @@ -63,14 +63,14 @@ void PersistentGameDataWriter::write(PersistentGameData *data, void *header) undefined4 local_14; uint killCount; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b0a0f5; local_1c = ExceptionList; ExceptionList = &local_1c; self = this; (**(code **)(*(int *)((char *)this + 0x48) + 0xc)) - (0,0,__security_cookie ^ (int)register0x00000010 - 0x10U); + (0,0,__security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U); uVar6 = (data->_bestiaryEncounters)._size; killCount = (data->_bestiaryKills)._size; (**(code **)(*(int *)((char *)this + 0x20) + 8))(); @@ -131,19 +131,19 @@ void PersistentGameDataWriter::write(PersistentGameData *data, void *header) } puVar4 = self; local_28 = (void *)0x0; - local_3c = (void *)((int)puVar5 >> 3); + local_3c = (void *)(GHIDRA_INT(puVar5) >> 3); (**(code **)(self[0x12] + 0x1c))(&local_3c,1,4); if (local_3c != (void *)0x0) { - (**(code **)(puVar4[0x12] + 0x1c))(local_28,1,(int)local_3c << 3); + (**(code **)(puVar4[0x12] + 0x1c))(local_28,1,GHIDRA_INT(local_3c) << 3); } local_14 = 0xffffffff; if (local_28 != (void *)0x0) { - uVar6 = ((int)local_30 - (int)local_28 >> 3) * 8; + uVar6 = (GHIDRA_INT(local_30) - GHIDRA_INT(local_28) >> 3) * 8; puVar5 = local_28; if (0xfff < uVar6) { puVar5 = *(undefined4 **)((char *)local_28 + -4); uVar6 = uVar6 + 0x23; - if (0x1f < (uint)((int)local_28 + (-4 - (int)puVar5))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_28) + (-4 - GHIDRA_INT(puVar5))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -186,10 +186,10 @@ void PersistentGameDataWriter::write(PersistentGameData *data, void *header) node = local_3c; } while (local_3c != (data->_bestiaryKills)._head); } - local_30 = (undefined4 *)((int)local_28 >> 3); + local_30 = (undefined4 *)(GHIDRA_INT(local_28) >> 3); (**(code **)(self[0x12] + 0x1c))(&local_30,1,4); if (local_30 != (undefined4 *)0x0) { - (**(code **)(self[0x12] + 0x1c))(0,1,(int)local_30 << 3); + (**(code **)(self[0x12] + 0x1c))(0,1,GHIDRA_INT(local_30) << 3); } puVar5 = self; local_14 = 0xffffffff; diff --git a/src/game/player_hud.cpp b/src/game/player_hud.cpp index 60f7f91..79364df 100644 --- a/src/game/player_hud.cpp +++ b/src/game/player_hud.cpp @@ -122,7 +122,7 @@ void PlayerHUD::reset() *(undefined4 *)((char *)spritePtr + -8) = 0; *(undefined4 *)((char *)spritePtr + -4) = 0; ((KAGE::SmartPointer *)(spritePtr))->KAGE::SmartPointer::reset((void *)0x0); - spritePtr = (void *)((int)spritePtr + 0x18); + spritePtr = (void *)(GHIDRA_INT(spritePtr) + 0x18); iVar3 = iVar3 + -1; } while (iVar3 != 0); activeItemSlot = &this->_activeItem[1]._bookItemId; @@ -202,11 +202,11 @@ void PlayerHUD::UpdateHearts(void *heart, int unkInt, Entity_Player *player) } bVar1 = ((Entity_Player *)(this_00))->Entity_Player::HasCollectible(0x26b,0); if (0 < iVar2) { - redSlot = (undefined2 *)((int)heart + 2); + redSlot = (undefined2 *)(GHIDRA_INT(heart) + 2); do { if (unkInt <= iVar6) break; *(undefined1 *)(redSlot + -1) = 1; - if ((isTaintedMaggy == '\0') || (iVar6 < (int)((uint)(bVar1 != 0) * 2 + 4 >> 1))) { + if ((isTaintedMaggy == '\0') || (iVar6 < GHIDRA_INT((GHIDRA_UINT((bVar1 != 0)) * 2 + 4 >> 1)))) { isTemporary = 0; } else { @@ -274,12 +274,12 @@ void PlayerHUD::UpdateHearts(void *heart, int unkInt, Entity_Player *player) do { if (unkInt <= iVar6) break; filledHearts = filledHearts + 1; - heartSlot = (undefined1 *)(iVar6 * 0x10 + (int)heart); + heartSlot = (undefined1 *)(iVar6 * 0x10 + GHIDRA_INT(heart)); heartSlot[3] = isTaintedMaggy; *heartSlot = 1; heartSlot[2] = 1; if ((player->_boneHearts < 1) || ((player->_boneHeartsMask & boneMaskBit) == 0)) { - if ((player->_soulHearts < (int)soulHalf) || ((int)soulHalf < 1)) { + if ((player->_soulHearts < GHIDRA_INT(soulHalf)) || (GHIDRA_INT(soulHalf) < 1)) { LAB_00842107: soulHalfSaved = soulHalf; pcVar4 = "BlueHeartFull"; @@ -291,11 +291,11 @@ LAB_00842107: } else { parity = soulHalf & 0x80000001; - if ((int)parity < 0) { + if (GHIDRA_INT(parity) < 0) { parity = (parity - 1 | 0xfffffffe) + 1; } if (parity != 1) goto LAB_00842107; - if ((player->_blackHearts & 1 << ((byte)((int)(soulHalf - 1) / 2) & 0x1f)) == 0) { + if ((player->_blackHearts & 1 << ((byte)(GHIDRA_INT((soulHalf - 1)) / 2) & 0x1f)) == 0) { soulHalf = soulHalfSaved; goto LAB_00842107; } @@ -347,7 +347,7 @@ LAB_00842107: } iVar6 = iVar6 + 1; soulSlotIndex = soulSlotIndex + 1; - boneMaskBit = boneMaskBit << 1 | (uint)((int)boneMaskBit < 0); + boneMaskBit = boneMaskBit << 1 | GHIDRA_UINT((GHIDRA_INT(boneMaskBit) < 0)); } while (soulSlotIndex < iVar2); } if (0 < player->_eternalHearts) { @@ -357,7 +357,7 @@ LAB_00842107: } iVar2 = 0; if (0 < iVar5) { - brokenSlot = (undefined4 *)((int)heart + iVar6 * 0x10 + 8); + brokenSlot = (undefined4 *)(GHIDRA_INT(heart) + iVar6 * 0x10 + 8); do { if (unkInt <= iVar6) goto LAB_008421f0; *(undefined1 *)(brokenSlot + -2) = 1; @@ -374,7 +374,7 @@ LAB_00842107: } while (iVar2 < iVar5); } if (iVar6 < unkInt) { - heartSlot = (undefined1 *)(iVar6 * 0x10 + (int)heart); + heartSlot = (undefined1 *)(iVar6 * 0x10 + GHIDRA_INT(heart)); iVar6 = unkInt - iVar6; do { *heartSlot = 0; @@ -386,7 +386,7 @@ LAB_008421f0: iVar5 = 0; filledHearts = filledHearts - player->_goldenHearts; if (0 < unkInt) { - pcVar4 = (char *)((int)heart + 2); + pcVar4 = (char *)(GHIDRA_INT(heart) + 2); do { if (filledHearts < 1) { return; @@ -529,7 +529,7 @@ void PlayerHUD::Update() iVar11 = 0x70; pEVar14 = (Entity_Player *)pEVar12->_subPlayer; } - UpdateHearts(this,(void *)((int)&((PlayerHUD *)(this->_activeItem + -0x14))->_player + iVar11), + UpdateHearts(this,(void *)(GHIDRA_INT(&((PlayerHUD *)(this->_activeItem + -0x14))->_player) + iVar11), iVar8,pEVar14); iVar8 = pEVar12->_boneHearts; iVar11 = pEVar12->_soulHearts; @@ -557,14 +557,14 @@ LAB_00842394: local_1434 = (Entity_Player *)0x0; do { pEVar12 = player; - local_1448 = (int *)((int)local_1434 * 7); - iVar8 = *(int *)((char *)this->_activeItem + (int)local_1434 * 0x1c + 0x18); + local_1448 = (int *)(GHIDRA_INT(local_1434) * 7); + iVar8 = *(int *)((char *)this->_activeItem + GHIDRA_INT(local_1434) * 0x1c + 0x18); if (-1 < iVar8) { isHudDirty = '\x01'; - *(int *)((char *)this->_activeItem + (int)local_1434 * 0x1c + 0x18) = iVar8 + -1; + *(int *)((char *)this->_activeItem + GHIDRA_INT(local_1434) * 0x1c + 0x18) = iVar8 + -1; } local_1430 = (Entity_Player *)0x0; - uVar13 = player->_activeDesc[(int)local_1434]._item; + uVar13 = player->_activeDesc[GHIDRA_INT(local_1434)]._item; if (local_1434 == (Entity_Player *)0x0) { bVar3 = ((Entity_Player *)(player))->Entity_Player::HasCollectible(0x248,0); if ((bVar3 != 0) && (uVar13 != 0x248)) { @@ -581,34 +581,34 @@ LAB_00842394: } manager = g_manager; game = g_game; - if (uVar13 != *(uint *)(&(*(undefined1 *)((char *)&(hud->_activeItem[0]) + 0x0)) + (int)local_1448 * 4)) { - *(uint *)(&(*(undefined1 *)((char *)&(hud->_activeItem[0]) + 0x0)) + (int)local_1448 * 4) = uVar13; + if (uVar13 != *(uint *)(&(*(undefined1 *)((char *)&(hud->_activeItem[0]) + 0x0)) + GHIDRA_INT(local_1448) * 4)) { + *(uint *)(&(*(undefined1 *)((char *)&(hud->_activeItem[0]) + 0x0)) + GHIDRA_INT(local_1448) * 4) = uVar13; if (game == (Game *)0x0) { - if (-1 < (int)uVar13) goto LAB_008424db; + if (-1 < GHIDRA_INT(uVar13)) goto LAB_008424db; LAB_008424f5: iVar8 = 0; } - else if ((int)uVar13 < 0) { - if ((-1 < (int)uVar13) || + else if (GHIDRA_INT(uVar13) < 0) { + if ((-1 < GHIDRA_INT(uVar13)) || (pvVar5 = (game->_proceduralItemManager)._proceduralItems._begin, - (int)(game->_proceduralItemManager)._proceduralItems._end - (int)pvVar5 >> 2 <= - (int)~uVar13)) goto LAB_008424f5; + GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar5) >> 2 <= + GHIDRA_INT(~uVar13))) goto LAB_008424f5; iVar8 = **(int **)((char *)pvVar5 + ~uVar13 * 4); } else { LAB_008424db: pvVar5 = (manager->_itemConfig)._collectibles._begin; - if ((int)(manager->_itemConfig)._collectibles._end - (int)pvVar5 >> 2 <= (int)uVar13) + if (GHIDRA_INT((manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar5) >> 2 <= GHIDRA_INT(uVar13)) goto LAB_008424f5; iVar8 = *(int *)((char *)pvVar5 + uVar13 * 4); } - local_1438 = (Entity_Player *)(&(*(undefined1 *)((char *)&(hud->_activeItem[0]) + 0x8)) + (int)local_1448 * 4); + local_1438 = (Entity_Player *)(&(*(undefined1 *)((char *)&(hud->_activeItem[0]) + 0x8)) + GHIDRA_INT(local_1448) * 4); ((KAGE::SmartPointer *)(local_1438))->KAGE::SmartPointer::reset((void *)0x0); - uVar2 = hudGfxPath._48_4_; - swapTmp = hudGfxPath._32_4_; - uVar10 = hudGfxPath._24_4_; + uVar2 = (*(undefined4 *)((char *)&(hudGfxPath) + 0x30)); + swapTmp = (*(undefined4 *)((char *)&(hudGfxPath) + 0x20)); + uVar10 = (*(undefined4 *)((char *)&(hudGfxPath) + 0x18)); if (iVar8 != 0) { - if ((int)uVar13 < 0x123) { + if (GHIDRA_INT(uVar13) < 0x123) { if (uVar13 == 0x122) { builtin_strncpy(hudGfxPath,"gfx/characters/costumes/Costume_Rebirth_90_TheJar.png",0x36) ; @@ -617,15 +617,15 @@ LAB_008424db: if ((((uVar13 != 0x23) || (player->_hasCurseMistEffect != 0)) || (player->_isCoopGhost != 0)) || ((player->_playerForms[0xf] < 3 || - (player->_activeDesc[(int)local_1434]._varData != 1)))) + (player->_activeDesc[GHIDRA_INT(local_1434)]._varData != 1)))) goto switchD_00842623_caseD_147; builtin_strncpy(hudGfxPath,"gfx/ui/hud_NecronomiconPowered.png",0x23); hudGfxPath[0x23] = SUB41(swapTmp,3); } } - else if ((int)uVar13 < 0x1db) { + else if (GHIDRA_INT(uVar13) < 0x1db) { if (uVar13 == 0x1da) { - hudGfxPath._32_4_ = hudGfxPath._32_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(hudGfxPath) + 0x20)) = (*(undefined4 *)((char *)&(hudGfxPath) + 0x20)) & 0xffffff00; builtin_strncpy(hudGfxPath,"gfx/ui/hud_BrokenGlassCannon.png",0x20); } else { @@ -665,7 +665,7 @@ switchD_00842623_caseD_147: do { cVar4 = *srcCursor; srcCursor = srcCursor + 1; - srcCursor[(int)(trinketPixels + (0xfff - (int)srcPath))] = cVar4; + srcCursor[GHIDRA_INT((trinketPixels + (0xfff - GHIDRA_INT(srcPath))))] = cVar4; } while (cVar4 != '\0'); break; case 0x1e3: @@ -693,7 +693,7 @@ switchD_00842623_caseD_147: do { cVar4 = *srcCursor; srcCursor = srcCursor + 1; - srcCursor[(int)(trinketPixels + (0xfff - (int)srcPath))] = cVar4; + srcCursor[GHIDRA_INT((trinketPixels + (0xfff - GHIDRA_INT(srcPath))))] = cVar4; } while (cVar4 != '\0'); break; case 0x2ad: @@ -709,13 +709,13 @@ switchD_00842623_caseD_147: do { cVar4 = *srcCursor; srcCursor = srcCursor + 1; - srcCursor[(int)(trinketPixels + (0xfff - (int)srcPath))] = cVar4; + srcCursor[GHIDRA_INT((trinketPixels + (0xfff - GHIDRA_INT(srcPath))))] = cVar4; } while (cVar4 != '\0'); } else { builtin_strncpy(hudGfxPath + 0x18,".png",4); builtin_strncpy(hudGfxPath,"gfx/ui/hud_BagOfCrafting",0x18); - hudGfxPath._28_4_ = (uint)(uint3)hudGfxPath._29_3_ << 8; + (*(undefined4 *)((char *)&(hudGfxPath) + 0x1c)) = (*(undefined1 *)((char *)&(GHIDRA_UINT((uint3))hudGfxPath) + 0x1d)) << 8; } break; case 0x2c7: @@ -725,7 +725,7 @@ switchD_00842623_caseD_147: case 0x2d0: builtin_strncpy(hudGfxPath + 0x18,".png",4); builtin_strncpy(hudGfxPath,"gfx/ui/hud_EverythingJar",0x18); - hudGfxPath._28_4_ = (uint)(uint3)hudGfxPath._29_3_ << 8; + (*(undefined4 *)((char *)&(hudGfxPath) + 0x1c)) = (*(undefined1 *)((char *)&(GHIDRA_UINT((uint3))hudGfxPath) + 0x1d)) << 8; } } pvVar5 = Manager::LoadImage(loadedImage,(byte *)hudGfxPath); @@ -737,7 +737,7 @@ switchD_00842623_caseD_147: uVar10 = *puVar6; *puVar6 = *(undefined4 *)local_1438; *(undefined4 *)local_1438 = uVar10; - local_14 = CONCAT31(local_14._1_3_,1); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); if (((loadedImageCopyRef != (int *)0x0) && (cVar4 = (**(code **)(*loadedImageCopyRef + 0xc))(), cVar4 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { @@ -755,21 +755,21 @@ switchD_00842623_caseD_147: } pPVar9 = hud; piVar7 = local_1448; - if (local_1430 != (Entity_Player *)(&hud->_activeItem[0]._bookItemId)[(int)local_1448]) { - (&hud->_activeItem[0]._bookItemId)[(int)local_1448] = (int)local_1430; - puVar6 = &hud->_activeItem[0]._bookImage + (int)local_1448; + if (local_1430 != (Entity_Player *)(&hud->_activeItem[0]._bookItemId)[GHIDRA_INT(local_1448)]) { + (&hud->_activeItem[0]._bookItemId)[GHIDRA_INT(local_1448)] = GHIDRA_INT(local_1430); + puVar6 = &hud->_activeItem[0]._bookImage + GHIDRA_INT(local_1448); if (local_1430 == (Entity_Player *)0x248) { pvVar5 = Manager::LoadImage(virtuesImage,(byte *)"gfx/ui/hud_BookOfVirtues.png"); local_14 = 3; assignedImage = ((KAGE::SmartPointer *)(virtuesImageCopy))->KAGE::SmartPointer::operator_assign(pvVar5); uVar10 = assignedImage[1]; - assignedImage[1] = *(undefined4 *)(&(*(undefined1 *)((char *)&(pPVar9->_activeItem[1]) + 0x0)) + (int)piVar7 * 4); + assignedImage[1] = *(undefined4 *)(&(*(undefined1 *)((char *)&(pPVar9->_activeItem[1]) + 0x0)) + GHIDRA_INT(piVar7) * 4); swapTmp = *puVar6; - *(undefined4 *)(&(*(undefined1 *)((char *)&(pPVar9->_activeItem[1]) + 0x0)) + (int)piVar7 * 4) = uVar10; + *(undefined4 *)(&(*(undefined1 *)((char *)&(pPVar9->_activeItem[1]) + 0x0)) + GHIDRA_INT(piVar7) * 4) = uVar10; uVar10 = *assignedImage; *assignedImage = swapTmp; *puVar6 = uVar10; - local_14 = CONCAT31(local_14._1_3_,4); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),4); if (((virtuesImageCopyRef != (int *)0x0) && (cVar4 = (**(code **)(*virtuesImageCopyRef + 0xc))(), cVar4 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { @@ -787,13 +787,13 @@ switchD_00842623_caseD_147: local_14 = 6; assignedImage = ((KAGE::SmartPointer *)(belialImageCopy))->KAGE::SmartPointer::operator_assign(pvVar5); uVar10 = assignedImage[1]; - assignedImage[1] = *(undefined4 *)(&(*(undefined1 *)((char *)&(pPVar9->_activeItem[1]) + 0x0)) + (int)piVar7 * 4); + assignedImage[1] = *(undefined4 *)(&(*(undefined1 *)((char *)&(pPVar9->_activeItem[1]) + 0x0)) + GHIDRA_INT(piVar7) * 4); swapTmp = *puVar6; - *(undefined4 *)(&(*(undefined1 *)((char *)&(pPVar9->_activeItem[1]) + 0x0)) + (int)piVar7 * 4) = uVar10; + *(undefined4 *)(&(*(undefined1 *)((char *)&(pPVar9->_activeItem[1]) + 0x0)) + GHIDRA_INT(piVar7) * 4) = uVar10; uVar10 = *assignedImage; *assignedImage = swapTmp; *puVar6 = uVar10; - local_14 = CONCAT31(local_14._1_3_,7); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),7); if (((belialImageCopyRef != (int *)0x0) && (cVar4 = (**(code **)(*belialImageCopyRef + 0xc))(), cVar4 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { @@ -812,13 +812,13 @@ switchD_00842623_caseD_147: local_14 = 9; assignedImage = ((KAGE::SmartPointer *)(virtuesBelialImageCopy))->KAGE::SmartPointer::operator_assign(pvVar5); uVar10 = assignedImage[1]; - assignedImage[1] = *(undefined4 *)(&(*(undefined1 *)((char *)&(pPVar9->_activeItem[1]) + 0x0)) + (int)piVar7 * 4); + assignedImage[1] = *(undefined4 *)(&(*(undefined1 *)((char *)&(pPVar9->_activeItem[1]) + 0x0)) + GHIDRA_INT(piVar7) * 4); swapTmp = *puVar6; - *(undefined4 *)(&(*(undefined1 *)((char *)&(pPVar9->_activeItem[1]) + 0x0)) + (int)piVar7 * 4) = uVar10; + *(undefined4 *)(&(*(undefined1 *)((char *)&(pPVar9->_activeItem[1]) + 0x0)) + GHIDRA_INT(piVar7) * 4) = uVar10; uVar10 = *assignedImage; *assignedImage = swapTmp; *puVar6 = uVar10; - local_14 = CONCAT31(local_14._1_3_,10); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),10); if (((virtuesBelialImageCopyRef != (int *)0x0) && (cVar4 = (**(code **)(*virtuesBelialImageCopyRef + 0xc))(), cVar4 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { @@ -866,20 +866,20 @@ LAB_00842c73: *(uint *)local_1430 = modelingClayItem; if (modelingClayItem == 0) { pvVar5 = (g_manager->_itemConfig)._trinkets._begin; - if ((int)uVar13 < (int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar5 >> 2) { + if (GHIDRA_INT(uVar13) < GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar5) >> 2) { iVar8 = *(int *)((char *)pvVar5 + uVar13 * 4); goto LAB_00842de7; } } else { if (g_game == (Game *)0x0) { - if (-1 < (int)modelingClayItem) goto LAB_00842da2; + if (-1 < GHIDRA_INT(modelingClayItem)) goto LAB_00842da2; } - else if ((int)modelingClayItem < 0) { - if (((int)modelingClayItem < 0) && + else if (GHIDRA_INT(modelingClayItem) < 0) { + if ((GHIDRA_INT(modelingClayItem) < 0) && (pvVar5 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)~modelingClayItem < - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar5 >> 2)) { + GHIDRA_INT(~modelingClayItem) < + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar5) >> 2)) { iVar8 = **(int **)((char *)pvVar5 + ~modelingClayItem * 4); goto LAB_00842de7; } @@ -887,8 +887,8 @@ LAB_00842c73: else { LAB_00842da2: pvVar5 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)modelingClayItem < - (int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar5 >> 2) { + if (GHIDRA_INT(modelingClayItem) < + GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar5) >> 2) { iVar8 = *(int *)((char *)pvVar5 + modelingClayItem * 4); goto LAB_00842de7; } @@ -903,7 +903,7 @@ LAB_00842de7: pvVar5 = Manager::LoadImage(&tmpImage,gfxPath); pEVar12 = local_1430; local_14 = 0xc; - ((KAGE::SmartPointer *)((uint *)((int)local_1430 + 4)))->KAGE::SmartPointer::operator_assign(pvVar5); + ((KAGE::SmartPointer *)((uint *)(GHIDRA_INT(local_1430) + 4)))->KAGE::SmartPointer::operator_assign(pvVar5); local_14 = 0xd; if (((tmpImageRef != (int *)0x0) && (cVar4 = (**(code **)(*tmpImageRef + 0xc))(), cVar4 != '\0')) && @@ -921,7 +921,7 @@ LAB_00842de7: do { pixelX = (Entity_Player *)0x0; do { - if (trinketPixels[(int)&(*(undefined1 *)((char *)(pixelX) + 0x1)) * (int)pEVar12 * 4] != '\0') { + if (trinketPixels[GHIDRA_INT(&(*(undefined1 *)((char *)(pixelX) + 0x1))) * GHIDRA_INT(pEVar12) * 4] != '\0') { if (pixelX < local_1438) { local_1438 = pixelX; } @@ -939,10 +939,10 @@ LAB_00842de7: } while (pixelX < (undefined1 *)0x20); pEVar12 = (Entity_Player *)(&(*(undefined1 *)((char *)(pEVar12) + 0x0)) + 1); } while (pEVar12 < (Entity_Player *)0x20); - iVar11 = (int)(&(local_1450->_sprite)._filename + -3) + - ((uint)((int)pEVar15 - (int)local_1450) >> 1); - iVar8 = (int)(&(local_1438->_sprite)._filename + -3) + - ((uint)((int)pEVar14 - (int)local_1438) >> 1); + iVar11 = GHIDRA_INT((&(local_1450->_sprite)._filename + -3)) + + (GHIDRA_UINT((GHIDRA_INT(pEVar15) - GHIDRA_INT(local_1450))) >> 1); + iVar8 = GHIDRA_INT((&(local_1438->_sprite)._filename + -3)) + + (GHIDRA_UINT((GHIDRA_INT(pEVar14) - GHIDRA_INT(local_1438))) >> 1); *(float *)((char *)local_1430 + 0xc) = (float)((double)iVar11 + __uint_to_double_fixup[-(iVar11 >> 0x1f)]); *(float *)((char *)local_1430 + 0x10) = @@ -955,47 +955,47 @@ LAB_00842de7: } local_1434 = (Entity_Player *)(&(*(undefined1 *)((char *)(local_1434) + 0x0)) + 1); local_1448 = local_1448 + 1; - local_1430 = (Entity_Player *)((int)local_1430 + 0x18); + local_1430 = (Entity_Player *)(GHIDRA_INT(local_1430) + 0x18); } while (local_1434 < (Entity_Player *)0x2); local_1450 = (Entity_Player *)0x0; do { pEVar12 = local_1450; - local_1430 = (Entity_Player *)((int)local_1450 * 0x11c); + local_1430 = (Entity_Player *)(GHIDRA_INT(local_1450) * 0x11c); pEVar14 = local_1450; - if ((int)local_1450 < 1) { + if (GHIDRA_INT(local_1450) < 1) { pEVar14 = (Entity_Player *)0x0; } pEVar15 = (Entity_Player *)0x3; - if ((int)pEVar14 < 3) { + if (GHIDRA_INT(pEVar14) < 3) { pEVar15 = pEVar14; } - local_1438 = (Entity_Player *)player->_pocketSlots[(int)pEVar15 * 2 + 1]; - if ((int)local_1450 < 1) { + local_1438 = (Entity_Player *)player->_pocketSlots[GHIDRA_INT(pEVar15) * 2 + 1]; + if (GHIDRA_INT(local_1450) < 1) { local_1434 = (Entity_Player *)0x0; } else { local_1434 = local_1450; - if (2 < (int)local_1450) { + if (2 < GHIDRA_INT(local_1450)) { local_1434 = (Entity_Player *)0x3; } } iVar8 = 0; if (local_1438 == (Entity_Player *)0x1) { - if (-1 < player->_pocketSlots[(int)local_1434 * 2]) { + if (-1 < player->_pocketSlots[GHIDRA_INT(local_1434) * 2]) { local_1448 = (g_manager->_itemConfig)._cards._begin; - if (player->_pocketSlots[(int)local_1434 * 2] < - (int)(g_manager->_itemConfig)._cards._end - (int)local_1448 >> 2) { - if (local_1448[player->_pocketSlots[(int)local_1434 * 2]] != 0) { - iVar8 = *(int *)(local_1448[player->_pocketSlots[(int)local_1434 * 2]] + 0x54); + if (player->_pocketSlots[GHIDRA_INT(local_1434) * 2] < + GHIDRA_INT((g_manager->_itemConfig)._cards._end) - GHIDRA_INT(local_1448) >> 2) { + if (local_1448[player->_pocketSlots[GHIDRA_INT(local_1434) * 2]] != 0) { + iVar8 = *(int *)(local_1448[player->_pocketSlots[GHIDRA_INT(local_1434) * 2]] + 0x54); } } } } else if (local_1438 == (Entity_Player *)0x0) { - iVar8 = player->_pocketSlots[(int)local_1434 * 2]; + iVar8 = player->_pocketSlots[GHIDRA_INT(local_1434) * 2]; } - if ((local_1438 != *(Entity_Player **)((int)&local_1430->_fearCountdown + (int)hud)) || - (pEVar14 = local_1438, iVar8 != *(int *)((int)&local_1430->_burnCountdown + (int)hud))) { + if ((local_1438 != *(Entity_Player **)(GHIDRA_INT(&local_1430->_fearCountdown) + GHIDRA_INT(hud))) || + (pEVar14 = local_1438, iVar8 != *(int *)(GHIDRA_INT(&local_1430->_burnCountdown) + GHIDRA_INT(hud)))) { pocketEntityConfig = (EntityConfig_Entity *)0x0; if (local_1438 == (Entity_Player *)0x1) { if (iVar8 != 0) { @@ -1009,17 +1009,17 @@ LAB_008430a9: pocketEntityConfig = ((EntityConfig *)(&g_manager->_entityConfig))->EntityConfig::GetEntity(5,iVar11,iVar8); } if (pocketEntityConfig == (EntityConfig_Entity *)0x0) { - ((ANM2 *)((ANM2 *)(&(*(undefined1 *)((char *)(hud) + 0x238)) + (int)local_1430)))->ANM2::Reset(); + ((ANM2 *)((ANM2 *)(&(*(undefined1 *)((char *)(hud) + 0x238)) + GHIDRA_INT(local_1430))))->ANM2::Reset(); } else { - ((ANM2 *)((ANM2 *)(&(*(undefined1 *)((char *)(hud) + 0x238)) + (int)local_1430)))->ANM2::Load(&pocketEntityConfig->anm2Path,1); + ((ANM2 *)((ANM2 *)(&(*(undefined1 *)((char *)(hud) + 0x238)) + GHIDRA_INT(local_1430))))->ANM2::Load(&pocketEntityConfig->anm2Path,1); } - *(Entity_Player **)((int)&local_1430->_fearCountdown + (int)hud) = local_1438; - *(int *)((int)&local_1430->_burnCountdown + (int)hud) = iVar8; + *(Entity_Player **)(GHIDRA_INT(&local_1430->_fearCountdown) + GHIDRA_INT(hud)) = local_1438; + *(int *)(GHIDRA_INT(&local_1430->_burnCountdown) + GHIDRA_INT(hud)) = iVar8; pEVar14 = local_1430; } pPVar9 = hud; - local_1450 = (Entity_Player *)((int)&(*(undefined1 *)((char *)(pEVar12) + 0x0)) + 1); + local_1450 = (Entity_Player *)(GHIDRA_INT(&(*(undefined1 *)((char *)(pEVar12) + 0x0))) + 1); } while (local_1450 < (Entity_Player *)&DAT_00000004); if ((*(undefined1 *)((char *)(hud) + 0x6ac)) != '\0') { if (player->_playerType == 0x15) { @@ -1047,11 +1047,11 @@ LAB_008430a9: *(int *)&(*(undefined1 *)((char *)(pEVar12) + 0x4)) = *(int *)pEVar12; local_1450 = (Entity_Player *)0x0; do { - iVar8 = player->_inventory[(int)local_1450]; + iVar8 = player->_inventory[GHIDRA_INT(local_1450)]; if (iVar8 < 0) { emptySlotId = 0; ((KAGE::SmartPointer *)(&emptySlotImage))->KAGE::SmartPointer::SmartPointer((void *)0x0); - local_14 = CONCAT31(local_14._1_3_,0xf); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0xf); puVar6 = *(undefined4 **)&(*(undefined1 *)((char *)(pEVar12) + 0x4)); if (puVar6 == (pEVar12->_damageEvents)._begin) { std::vector<12byte>::_Emplace_reallocate(puVar6,&emptySlotId); @@ -1061,7 +1061,7 @@ LAB_008430a9: ((KAGE::SmartPointer *)(puVar6 + 1))->KAGE::SmartPointer::operator_assign(&emptySlotImage); *(int *)&(*(undefined1 *)((char *)(pEVar12) + 0x4)) = *(int *)&(*(undefined1 *)((char *)(pEVar12) + 0x4)) + 0xc; } - local_14._0_1_ = 0x10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x10; if (((emptySlotImageRef != (int *)0x0) && (cVar4 = (**(code **)(*emptySlotImageRef + 0xc))(), cVar4 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { @@ -1072,17 +1072,17 @@ LAB_008430a9: } local_1448 = (int *)(iVar8 * 7); local_1430 = (player->_history)._historyItems._begin; - pEVar14 = *(Entity_Player **)((int)&(local_1430->_sprite)._filename + iVar8 * 0x1c + -0x40); + pEVar14 = *(Entity_Player **)(GHIDRA_INT(&(local_1430->_sprite)._filename) + iVar8 * 0x1c + -0x40); if (g_game == (Game *)0x0) { - if (-1 < (int)pEVar14) goto LAB_008432df; + if (-1 < GHIDRA_INT(pEVar14)) goto LAB_008432df; } else { - if ((int)pEVar14 < 0) { - if (((int)pEVar14 < 0) && + if (GHIDRA_INT(pEVar14) < 0) { + if ((GHIDRA_INT(pEVar14) < 0) && (pvVar5 = (g_game->_proceduralItemManager)._proceduralItems._begin, - (int)~(uint)pEVar14 < - (int)(g_game->_proceduralItemManager)._proceduralItems._end - (int)pvVar5 >> 2)) { - local_1438 = (Entity_Player *)**(undefined4 **)((char *)pvVar5 + ~(uint)pEVar14 * 4); + GHIDRA_INT(~GHIDRA_UINT(pEVar14)) < + GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar5) >> 2)) { + local_1438 = (Entity_Player *)**(undefined4 **)((char *)pvVar5 + ~GHIDRA_UINT(pEVar14) * 4); } else { local_1438 = (Entity_Player *)0x0; @@ -1091,49 +1091,49 @@ LAB_008430a9: else { LAB_008432df: pvVar5 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar5 >> 2 <= (int)pEVar14) + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar5) >> 2 <= GHIDRA_INT(pEVar14)) goto LAB_008435ed; - local_1438 = *(Entity_Player **)((char *)pvVar5 + (int)pEVar14 * 4); + local_1438 = *(Entity_Player **)((char *)pvVar5 + GHIDRA_INT(pEVar14) * 4); } if ((local_1438 != (Entity_Player *)0x0) && (*(int *)local_1438 != 3)) { local_1434 = pEVar14; std::set::find_node(findResult,&local_1434); - if ((*(char *)((int)&(foundNode->_damageEvents)._end + 1) == '\0') && - ((pvVar5 = (foundNode->_damageEvents)._capacity, (int)pvVar5 <= (int)pEVar14 && + if ((*(char *)(GHIDRA_INT(&(foundNode->_damageEvents)._end) + 1) == '\0') && + ((pvVar5 = (foundNode->_damageEvents)._capacity, GHIDRA_INT(pvVar5) <= GHIDRA_INT(pEVar14) && (foundNode != cachedImages)))) { slotEntryId = pvVar5; ((KAGE::SmartPointer *)(&slotEntryImage))->KAGE::SmartPointer::operator_assign(&foundNode->_pendingDamage); - local_14 = CONCAT31(local_14._1_3_,0x11); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x11); piVar7 = *(int **)&(*(undefined1 *)((char *)(pEVar12) + 0x4)); if (piVar7 == (pEVar12->_damageEvents)._begin) { std::vector<12byte>::_Emplace_reallocate(piVar7,&slotEntryId); } else { - *piVar7 = (int)slotEntryId; + *piVar7 = GHIDRA_INT(slotEntryId); ((KAGE::SmartPointer *)(piVar7 + 1))->KAGE::SmartPointer::operator_assign(&slotEntryImage); *(int *)&(*(undefined1 *)((char *)(pEVar12) + 0x4)) = *(int *)&(*(undefined1 *)((char *)(pEVar12) + 0x4)) + 0xc; } - local_14._0_1_ = 0x12; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x12; if (((slotEntryImageRef != (int *)0x0) && (cVar4 = (**(code **)(*slotEntryImageRef + 0xc))(), cVar4 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(&slotEntryImage); } pvVar5 = std_tree_extract(&cachedImages,foundNode); - local_14._0_1_ = 0x13; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x13; if (((*(int **)((char *)pvVar5 + 0x18) != (int *)0x0) && (cVar4 = (**(code **)(**(int **)((char *)pvVar5 + 0x18) + 0xc))(), cVar4 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { - (*g_imageReleaseFn)((int)pvVar5 + 0x14); + (*g_imageReleaseFn)(GHIDRA_INT(pvVar5) + 0x14); } - local_14 = CONCAT31(local_14._1_3_,0xe); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0xe); operator_delete(pvVar5,0x1c); } else { - if ((int)pEVar14 < 0) { + if (GHIDRA_INT(pEVar14) < 0) { imagelessEntryId = pEVar14; ((KAGE::SmartPointer *)(&imagelessEntryImage))->KAGE::SmartPointer::SmartPointer((void *)0x0); - local_14 = CONCAT31(local_14._1_3_,0x14); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x14); puVar6 = *(undefined4 **)&(*(undefined1 *)((char *)(pEVar12) + 0x4)); if (puVar6 == (pEVar12->_damageEvents)._begin) { std::vector<12byte>::_Emplace_reallocate(puVar6,&imagelessEntryId); @@ -1143,7 +1143,7 @@ LAB_008432df: ((KAGE::SmartPointer *)(puVar6 + 1))->KAGE::SmartPointer::operator_assign(&imagelessEntryImage); *(int *)&(*(undefined1 *)((char *)(pEVar12) + 0x4)) = *(int *)&(*(undefined1 *)((char *)(pEVar12) + 0x4)) + 0xc; } - local_14._0_1_ = 0x15; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x15; if (((imagelessEntryImageRef != (int *)0x0) && (cVar4 = (**(code **)(*imagelessEntryImageRef + 0xc))(), cVar4 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { @@ -1157,39 +1157,39 @@ LAB_008432df: piVar7 = (int *)*piVar7; } Manager::LoadImage(&tmpImage,(byte *)piVar7); - local_14._0_1_ = 0x16; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x16; if (tmpImage != 0) { loadedEntryId = - *(void **)((local_1430->_sprite)._filename._buf + (int)local_1448 * 4 + -0x40 + *(void **)((local_1430->_sprite)._filename._buf + GHIDRA_INT(local_1448) * 4 + -0x40 ); ((KAGE::SmartPointer *)(loadedEntryImage))->KAGE::SmartPointer::operator_assign(&tmpImage); - local_14._0_1_ = 0x17; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x17; pushEntryId = loadedEntryId; ((KAGE::SmartPointer *)(pushEntryImage))->KAGE::SmartPointer::operator_assign(loadedEntryImage); - local_14 = CONCAT31(local_14._1_3_,0x18); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x18); piVar7 = *(int **)&(*(undefined1 *)((char *)(pEVar12) + 0x4)); if (piVar7 == (pEVar12->_damageEvents)._begin) { std::vector<12byte>::_Emplace_reallocate(piVar7,&pushEntryId); } else { - *piVar7 = (int)pushEntryId; + *piVar7 = GHIDRA_INT(pushEntryId); ((KAGE::SmartPointer *)(piVar7 + 1))->KAGE::SmartPointer::operator_assign(pushEntryImage); *(int *)&(*(undefined1 *)((char *)(pEVar12) + 0x4)) = *(int *)&(*(undefined1 *)((char *)(pEVar12) + 0x4)) + 0xc; } - local_14._0_1_ = 0x19; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x19; if (((pushEntryImageRef != (int *)0x0) && (cVar4 = (**(code **)(*pushEntryImageRef + 0xc))(), cVar4 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(pushEntryImage); } - local_14._0_1_ = 0x1a; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1a; if (((loadedEntryImageRef != (int *)0x0) && (cVar4 = (**(code **)(*loadedEntryImageRef + 0xc))(), cVar4 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(loadedEntryImage); } } - local_14._0_1_ = 0x1b; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1b; if (((tmpImageRef != (int *)0x0) && (cVar4 = (**(code **)(*tmpImageRef + 0xc))(), cVar4 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { @@ -1199,12 +1199,12 @@ LAB_008435e3: } } LAB_008435e9: - local_14 = CONCAT31(local_14._1_3_,0xe); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0xe); } } } LAB_008435ed: - local_1450 = (Entity_Player *)((int)&(*(undefined1 *)((char *)(local_1450) + 0x0)) + 1); + local_1450 = (Entity_Player *)(GHIDRA_INT(&(*(undefined1 *)((char *)(local_1450) + 0x0))) + 1); } while (local_1450 < (Entity_Player *)0x10); local_1438 = *(Entity_Player **)cachedImages; if (local_1438 != cachedImages) { @@ -1223,7 +1223,7 @@ LAB_008435ed: pEVar14 = extraout_ECX_00; } else if ((g_game->_challenge == 0x2b) && - ((int)(player->_itemCards)._end - (int)(player->_itemCards)._begin >> 2 != 0)) { + (GHIDRA_INT((player->_itemCards)._end) - GHIDRA_INT((player->_itemCards)._begin) >> 2 != 0)) { cachedCardImages = (Entity_Player *)0x0; local_1448 = (int *)0x0; cachedCardImages = operator_new(0x1c); @@ -1249,45 +1249,45 @@ LAB_008435ed: uVar13 = 0; pvVar5 = (player->_itemCards)._end; itemCardsBegin = (player->_itemCards)._begin; - if ((int)pvVar5 - (int)itemCardsBegin >> 2 != 0) { + if (GHIDRA_INT(pvVar5) - GHIDRA_INT(itemCardsBegin) >> 2 != 0) { do { - if ((uVar13 < (uint)((int)pvVar5 - (int)itemCardsBegin >> 2)) && + if ((uVar13 < GHIDRA_UINT((GHIDRA_INT(pvVar5) - GHIDRA_INT(itemCardsBegin) >> 2))) && (local_1438 = *(Entity_Player **)((char *)itemCardsBegin + uVar13 * 4), local_1438 != (Entity_Player *)0x0)) { local_1434 = (Entity_Player *) - ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible((int)local_1438); + ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(GHIDRA_INT(local_1438)); local_1450 = local_1438; std::set::find_node(findResult,&local_1450); - if ((*(char *)((int)&(foundNode->_damageEvents)._end + 1) == '\0') && - ((pvVar5 = (foundNode->_damageEvents)._capacity, (int)pvVar5 <= (int)local_1438 && + if ((*(char *)(GHIDRA_INT(&(foundNode->_damageEvents)._end) + 1) == '\0') && + ((pvVar5 = (foundNode->_damageEvents)._capacity, GHIDRA_INT(pvVar5) <= GHIDRA_INT(local_1438) && (foundNode != cachedCardImages)))) { pushEntryId = pvVar5; ((KAGE::SmartPointer *)(pushEntryImage))->KAGE::SmartPointer::operator_assign(&foundNode->_pendingDamage); - local_14 = CONCAT31(local_14._1_3_,0x1f); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x1f); piVar7 = *(int **)&(*(undefined1 *)((char *)(pEVar12) + 0x4)); if (piVar7 == *(int **)((std_string *)&pEVar12->_damageEvents)->_buf) { std::vector<12byte>::_Emplace_reallocate(piVar7,&pushEntryId); } else { - *piVar7 = (int)pushEntryId; + *piVar7 = GHIDRA_INT(pushEntryId); ((KAGE::SmartPointer *)(piVar7 + 1))->KAGE::SmartPointer::operator_assign(pushEntryImage); *(int *)&(*(undefined1 *)((char *)(pEVar12) + 0x4)) = *(int *)&(*(undefined1 *)((char *)(pEVar12) + 0x4)) + 0xc; } - local_14._0_1_ = 0x20; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x20; if (((pushEntryImageRef != (int *)0x0) && (cVar4 = (**(code **)(*pushEntryImageRef + 0xc))(), cVar4 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(pushEntryImage); } - local_14 = CONCAT31(local_14._1_3_,0x1c); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x1c); std_tree_extract(&cachedCardImages,foundNode); FUN_0083c400(); } else { - if ((int)*(Entity_Player **)&(*(undefined1 *)((char *)(local_1434) + 0x4)) < 0) { + if (GHIDRA_INT(*(Entity_Player **))&(*(undefined1 *)((char *)(local_1434) + 0x4)) < 0) { imagelessEntryId = *(Entity_Player **)&(*(undefined1 *)((char *)(local_1434) + 0x4)); ((KAGE::SmartPointer *)(&imagelessEntryImage))->KAGE::SmartPointer::SmartPointer((void *)0x0); - local_14 = CONCAT31(local_14._1_3_,0x21); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x21); puVar6 = *(undefined4 **)&(*(undefined1 *)((char *)(pEVar12) + 0x4)); if (puVar6 == *(undefined4 **)((std_string *)&pEVar12->_damageEvents)->_buf) { std::vector<12byte>::_Emplace_reallocate(puVar6,&imagelessEntryId); @@ -1297,7 +1297,7 @@ LAB_008435ed: ((KAGE::SmartPointer *)(puVar6 + 1))->KAGE::SmartPointer::operator_assign(&imagelessEntryImage); *(int *)&(*(undefined1 *)((char *)(pEVar12) + 0x4)) = *(int *)&(*(undefined1 *)((char *)(pEVar12) + 0x4)) + 0xc; } - local_14._0_1_ = 0x22; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x22; if (((imagelessEntryImageRef != (int *)0x0) && (cVar4 = (**(code **)(*imagelessEntryImageRef + 0xc))(), cVar4 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { @@ -1307,45 +1307,45 @@ LAB_008435ed: goto LAB_00843a3c; } path = (std_string *)&local_1434->_spawnerVariant; - if (0xf < *(uint *)((int)(local_1434->_sprite)._filename._buf + 4)) { + if (0xf < *(uint *)(GHIDRA_INT((local_1434->_sprite)._filename._buf) + 4)) { path = *(std_string **)path->_buf; } Manager::LoadImage(&tmpImage,(byte *)path); - local_14._0_1_ = 0x23; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x23; if (tmpImage != 0) { pvVar5 = (player->_itemCards)._begin; - if (uVar13 < (uint)((int)(player->_itemCards)._end - (int)pvVar5 >> 2)) { + if (uVar13 < GHIDRA_UINT((GHIDRA_INT((player->_itemCards)._end) - GHIDRA_INT(pvVar5) >> 2))) { local_1438 = *(Entity_Player **)((char *)pvVar5 + uVar13 * 4); } else { local_1438 = (Entity_Player *)0x0; } FUN_0084bef0(&local_1438,&tmpImage); - local_14._0_1_ = 0x24; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x24; FUN_0084bc00(&emptySlotId); - local_14._0_1_ = 0x25; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x25; FUN_0084bbc0(&loadedEntryId); FUN_007098c0(); FUN_007098c0(); } - local_14 = CONCAT31(local_14._1_3_,0x1c); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x1c); FUN_0040c440(); } } else { slotEntryId = (void *)0x0; ((KAGE::SmartPointer *)(&slotEntryImage))->KAGE::SmartPointer::SmartPointer((void *)0x0); - local_14 = CONCAT31(local_14._1_3_,0x1d); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x1d); piVar7 = *(int **)&(*(undefined1 *)((char *)(pEVar12) + 0x4)); if (piVar7 == *(int **)((std_string *)&pEVar12->_damageEvents)->_buf) { std::vector<12byte>::_Emplace_reallocate(piVar7,&slotEntryId); } else { - *piVar7 = (int)slotEntryId; + *piVar7 = GHIDRA_INT(slotEntryId); ((KAGE::SmartPointer *)(piVar7 + 1))->KAGE::SmartPointer::operator_assign(&slotEntryImage); *(int *)&(*(undefined1 *)((char *)(pEVar12) + 0x4)) = *(int *)&(*(undefined1 *)((char *)(pEVar12) + 0x4)) + 0xc; } - local_14._0_1_ = 0x1e; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x1e; if (((slotEntryImageRef != (int *)0x0) && (cVar4 = (**(code **)(*slotEntryImageRef + 0xc))(), cVar4 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { @@ -1354,12 +1354,12 @@ LAB_00843a36: (*g_imageReleaseFn)(piVar7); } LAB_00843a3c: - local_14 = CONCAT31(local_14._1_3_,0x1c); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x1c); } uVar13 = uVar13 + 1; pvVar5 = (player->_itemCards)._end; itemCardsBegin = (player->_itemCards)._begin; - } while (uVar13 < (uint)((int)pvVar5 - (int)itemCardsBegin >> 2)); + } while (uVar13 < GHIDRA_UINT((GHIDRA_INT(pvVar5) - GHIDRA_INT(itemCardsBegin) >> 2))); } local_1438 = *(Entity_Player **)cachedCardImages; if (local_1438 != cachedCardImages) { @@ -1418,7 +1418,7 @@ LAB_00843a3c: } pPVar9 = hud; bVar3 = input_is_action_pressed - (0xb,(int)hud->_player[5]._color._colorize[0],hud->_player,(int)pEVar14); + (0xb,GHIDRA_INT(hud->_player[5]._color._colorize[0]),hud->_player,GHIDRA_INT(pEVar14)); if (bVar3 == 0) { dropHoldFade = *(float *)&pPVar9[1]._playerHudIndex - 0.25; if (dropHoldFade <= 0.0) { @@ -1525,7 +1525,7 @@ void PlayerHUD::render_inventory(Vector *pos, float scale) undefined1 auStack_8 [4]; ANM2 *anm2; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); iVar4 = (*(int *)&(*(undefined1 *)((char *)(this) + 0x6a4)) - *(int *)&(*(undefined1 *)((char *)(this) + 0x6a0))) / 0xc; itemCount = iVar4; playerHud = this; @@ -1533,7 +1533,7 @@ void PlayerHUD::render_inventory(Vector *pos, float scale) isHasBirthright = ((Entity_Player *)(this->_player))->Entity_Player::HasCollectible(0x26b,0); pvVar1 = this->_HUD; fVar5 = scaleLocal * g_vectorOne.x; - slotCount = (uint)(isHasBirthright != 0) * 4 + 8; + slotCount = GHIDRA_UINT((isHasBirthright != 0)) * 4 + 8; iconSize = scaleLocal * 32.0; columnCount = slotCount >> 1; *(float *)((char *)pvVar1 + 0x5690) = scaleLocal * g_vectorOne.y; @@ -1541,12 +1541,12 @@ void PlayerHUD::render_inventory(Vector *pos, float scale) local_68 = 0.0; do { fVar5 = local_68; - slotX = (float)((int)local_68 % (int)columnCount) * 12.0 * scaleLocal + pos->x; - slotY = (float)((int)local_68 / (int)columnCount) * 12.0 * scaleLocal + pos->y; - if (((int)local_68 < iVar4) && + slotX = (float)(GHIDRA_INT(local_68) % GHIDRA_INT(columnCount)) * 12.0 * scaleLocal + pos->x; + slotY = (float)(GHIDRA_INT(local_68) / GHIDRA_INT(columnCount)) * 12.0 * scaleLocal + pos->y; + if ((GHIDRA_INT(local_68) < iVar4) && ((inventoryBegin = *(int *)&(*(undefined1 *)((char *)(this) + 0x6a0)), - *(int *)(inventoryBegin + 4 + (int)local_68 * 0xc) != 0 || - (*(int *)(inventoryBegin + (int)local_68 * 0xc) < 0)))) { + *(int *)(inventoryBegin + 4 + GHIDRA_INT(local_68) * 0xc) != 0 || + (*(int *)(inventoryBegin + GHIDRA_INT(local_68) * 0xc) < 0)))) { if ((DAT_00c7911c & 1) != 0) { g_currentShader = &g_shaders; inventoryBegin = *(int *)&(*(undefined1 *)((char *)(this) + 0x6a0)); @@ -1583,9 +1583,9 @@ void PlayerHUD::render_inventory(Vector *pos, float scale) iconQuadSize.y = iconQuadSize.x; local_6c = (int *)iconQuadSize.x; render_quad_set_rect(iconQuad,&iconPos,&iconQuadSize,&quadColor); - entryId = *(undefined4 *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x6a0)) + (int)fVar5 * 0xc); + entryId = *(undefined4 *)(*(int *)&(*(undefined1 *)((char *)(this) + 0x6a0)) + GHIDRA_INT(fVar5) * 0xc); piVar7 = (int *)0x0; - iconImage = *(int **)(iVar4 + 8 + (int)fVar5 * 0xc); + iconImage = *(int **)(iVar4 + 8 + GHIDRA_INT(fVar5) * 0xc); if ((((iconImage != (int *)0x0) && (cVar2 = (**(code **)(*iconImage + 4))(), cVar2 != '\0')) && (piVar7 != (int *)0x0)) && ((cVar2 = (**(code **)(*piVar7 + 0xc))(), cVar2 != '\0' && @@ -1621,9 +1621,9 @@ void PlayerHUD::render_inventory(Vector *pos, float scale) copySrc = copySrc + 1; copyDst = copyDst + 1; } - entryId = *(undefined4 *)(*(int *)&(*(undefined1 *)((char *)(playerHud) + 0x6a0)) + (int)fVar5 * 0xc); + entryId = *(undefined4 *)(*(int *)&(*(undefined1 *)((char *)(playerHud) + 0x6a0)) + GHIDRA_INT(fVar5) * 0xc); piVar7 = (int *)0x0; - local_6c = *(int **)(inventoryBegin + 8 + (int)fVar5 * 0xc); + local_6c = *(int **)(inventoryBegin + 8 + GHIDRA_INT(fVar5) * 0xc); if (((local_6c != (int *)0x0) && (cVar2 = (**(code **)(*local_6c + 4))(), cVar2 != '\0')) && ((piVar7 != (int *)0x0 && ((cVar2 = (**(code **)(*piVar7 + 0xc))(), cVar2 != '\0' && @@ -1675,7 +1675,7 @@ void PlayerHUD::render_inventory(Vector *pos, float scale) fVar6 = iconSize * 0.25; } else { - dotLayer = ((ANM2 *)((ANM2 *)((int)this->_HUD + 22000)))->ANM2::GetLayer((byte *)0x0); + dotLayer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this->_HUD) + 22000)))->ANM2::GetLayer((byte *)0x0); local_68 = iconSize * 0.25; (dotLayer->_color)._tint[3] = 0.5; pvVar1 = this->_HUD; @@ -1764,9 +1764,9 @@ LAB_0084949f: } } } - local_68 = (float)((int)fVar5 + 1); + local_68 = (float)(GHIDRA_INT(fVar5) + 1); iVar4 = itemCount; - if ((int)slotCount <= (int)local_68) { + if (GHIDRA_INT(slotCount) <= GHIDRA_INT(local_68)) { shader_cache_find(columnCount); return; } @@ -1867,7 +1867,7 @@ void PlayerHUD::RenderCraftingTable(Vector *pos, float scale) void *iconImage; ColorMod *spriteColor; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); savedPos = pos; puVar11 = this->_HUD; fVar6 = scale * g_vectorOne.y; @@ -1887,13 +1887,13 @@ void PlayerHUD::RenderCraftingTable(Vector *pos, float scale) pPVar5 = (PlayerHUD *)(iVar4 + 3); } LAB_0084959e: - pPVar5 = (PlayerHUD *)((int)pPVar5 + -1); + pPVar5 = (PlayerHUD *)(GHIDRA_INT(pPVar5) + -1); local_70 = pPVar5; - if (-1 < (int)pPVar5) { + if (-1 < GHIDRA_INT(pPVar5)) { puVar11 = &DAT_42000000; if (pPVar5 == (PlayerHUD *)0x0) { craftSlots = *(int **)&(*(undefined1 *)((char *)(this) + 0x6a0)); - if (((*(int *)&(*(undefined1 *)((char *)(this) + 0x6a4)) - (int)craftSlots) / 0xc < 1) || + if (((*(int *)&(*(undefined1 *)((char *)(this) + 0x6a4)) - GHIDRA_INT(craftSlots)) / 0xc < 1) || ((local_7c = (ANM2 *)(craftSlots + 1), craftSlots[1] == 0 && (-1 < *craftSlots)))) { isAnimationSet = ((ANM2 *)(craftingSprite))->ANM2::SetAnimation((byte *)"Result",1); unusedArg = extraout_ECX_04; @@ -2079,15 +2079,15 @@ LAB_0084959e: } goto LAB_0084a3b9; } - if ((int)pPVar5 < (*(int *)&(*(undefined1 *)((char *)(this) + 0x6a4)) - *(int *)&(*(undefined1 *)((char *)(this) + 0x6a0))) / 0xc) { + if (GHIDRA_INT(pPVar5) < (*(int *)&(*(undefined1 *)((char *)(this) + 0x6a4)) - *(int *)&(*(undefined1 *)((char *)(this) + 0x6a0))) / 0xc) { iVar4 = *(int *)&(*(undefined1 *)((char *)(this) + 0x6a0)); - local_98 = (float)((int)pPVar5 * 0xc); - if ((*(int *)(iVar4 + 4 + (int)local_98) != 0) || (*(int *)(iVar4 + (int)local_98) < 0)) { + local_98 = (float)(GHIDRA_INT(pPVar5) * 0xc); + if ((*(int *)(iVar4 + 4 + GHIDRA_INT(local_98)) != 0) || (*(int *)(iVar4 + GHIDRA_INT(local_98)) < 0)) { if ((DAT_00c7911c & 1) != 0) { g_currentShader = &g_shaders; iVar4 = *(int *)&(*(undefined1 *)((char *)(this) + 0x6a0)); } - iconImage = (void *)(iVar4 + 4 + (int)local_98); + iconImage = (void *)(iVar4 + 4 + GHIDRA_INT(local_98)); uvBottomLeftX = g_vectorZero.x; uvTopLeftX = g_vectorZero.x; uvTopRightX = g_vectorZero.x + 32.0; @@ -2098,7 +2098,7 @@ LAB_0084959e: shadowColor._offset[0] = 0.0; shadowColor._offset[1] = 0.0; shadowColor._offset[2] = 0.0; - fVar9 = (-26.0 - (float)((int)local_98 + -0xc)) * local_6c + + fVar9 = (-26.0 - (float)(GHIDRA_INT(local_98) + -0xc)) * local_6c + (g_game->_screenShakeOffset).x + savedPos->x; fVar7 = savedPos->y + (g_game->_screenShakeOffset).y + local_6c * -6.0; shadowColor._colorize[0] = 0.0; @@ -2194,7 +2194,7 @@ LAB_0084959e: } } renderPos.y = local_6c + local_6c + savedPos->y; - renderPos.x = ((-26.0 - (float)((int)pPVar5 * 0xc + -0xc)) + 8.0) * local_6c + savedPos->x; + renderPos.x = ((-26.0 - (float)(GHIDRA_INT(pPVar5) * 0xc + -0xc)) + 8.0) * local_6c + savedPos->x; isAnimationSet = ((ANM2 *)(craftingSprite))->ANM2::SetAnimation(s_Idle,1); unusedArg = extraout_ECX_01; if ((isAnimationSet != 0) && @@ -2338,16 +2338,16 @@ LAB_0084959e: local_70 = (PlayerHUD *)0x0; local_94 = (PlayerHUD *)(local_6c * 8.0); do { - iVar4 = ((uint)local_70 >> 2) * 0xc; - local_9c = (((float)(((uint)local_70 & 3) * 0xc) + 0.0) - 64.0) * local_6c + pos->x; - local_7c = (ANM2 *)(uint)*(byte *)((char *)local_70 + (int)this->_player + 0x1f44); + iVar4 = (GHIDRA_UINT(local_70) >> 2) * 0xc; + local_9c = (((float)((GHIDRA_UINT(local_70) & 3) * 0xc) + 0.0) - 64.0) * local_6c + pos->x; + local_7c = (ANM2 *)GHIDRA_UINT(*(byte *)((char *)local_70 + GHIDRA_INT(this->_player) + 0x1f44)); local_98 = ((float)((double)iVar4 + __uint_to_double_fixup[-(iVar4 >> 0x1f)]) - 6.0) * local_6c + pos->y; bagSlotPos.x = local_9c; bagSlotPos.y = local_98; isAnimationSet = ((ANM2 *)(craftingSprite))->ANM2::SetAnimation(s_Idle,1); if ((isAnimationSet != 0) && (*(int *)(puVar11 + 0x5738) != 0)) { - ((AnimationState *)((AnimationState *)(puVar11 + 0x5734)))->AnimationState::SetFrameFloat((float)(int)local_7c); + ((AnimationState *)((AnimationState *)(puVar11 + 0x5734)))->AnimationState::SetFrameFloat((float)GHIDRA_INT(local_7c)); if (*(int *)(hud + 0x5738) != 0) { puVar11[0x5748] = 0; } @@ -2374,7 +2374,7 @@ LAB_0084959e: } fVar8 = fVar6 - (float)local_94; fVar10 = fVar7 - (float)local_94; - unusedArg = (undefined1 *)((int)local_70 + 1); + unusedArg = (undefined1 *)(GHIDRA_INT(local_70) + 1); fVar9 = *(float *)&this[1]._redHeartFlashCountdown; if (fVar8 <= *(float *)&this[1]._redHeartFlashCountdown) { fVar9 = fVar8; @@ -2421,7 +2421,7 @@ LAB_0084959e: } while (unusedArg < &DAT_00000008); } LAB_0084a3b9: - shader_cache_find((int)unusedArg); + shader_cache_find(GHIDRA_INT(unusedArg)); return; } @@ -2463,8 +2463,8 @@ void PlayerHUD::RenderSpellQueue(Vector *pos, float scale) hudCopy = hud; do { slotY = offsetY + pos->y; - slotX = (float)(int)slot * 12.0 * scaleCopy + pos->x; - if ((int)slot < spellCount) { + slotX = (float)GHIDRA_INT(slot) * 12.0 * scaleCopy + pos->x; + if (GHIDRA_INT(slot) < spellCount) { slotAlpha = 0x3f800000; } else { @@ -2473,9 +2473,9 @@ void PlayerHUD::RenderSpellQueue(Vector *pos, float scale) *(undefined4 *)((char *)hud + 0x58cc) = slotAlpha; if (slot == 0) { spellFrame = *(byte *)((char *)playerHud->_player + 0x1f58); - isAnimSet = ((ANM2 *)((ANM2 *)((int)hud + 0x5818)))->ANM2::SetAnimation(s_Idle,1); + isAnimSet = ((ANM2 *)((ANM2 *)(GHIDRA_INT(hud) + 0x5818)))->ANM2::SetAnimation(s_Idle,1); if (((isAnimSet != 0) && (*(int *)((char *)hud + 0x584c) != 0)) && - (((AnimationState *)((AnimationState *)((int)hud + 0x5848)))->AnimationState::SetFrameFloat((float)spellFrame), + (((AnimationState *)((AnimationState *)(GHIDRA_INT(hud) + 0x5848)))->AnimationState::SetFrameFloat((float)spellFrame), *(int *)((char *)hud + 0x584c) != 0)) { *(undefined1 *)((char *)hud + 0x585c) = 0; } @@ -2566,9 +2566,9 @@ LAB_0084a744: else { spellFrame = 0; } - isAnimSet = ((ANM2 *)((ANM2 *)((int)hud + 0x5818)))->ANM2::SetAnimation((byte *)"IdleSmall",1); + isAnimSet = ((ANM2 *)((ANM2 *)(GHIDRA_INT(hud) + 0x5818)))->ANM2::SetAnimation((byte *)"IdleSmall",1); if (((isAnimSet != 0) && (*(int *)((char *)hud + 0x584c) != 0)) && - (((AnimationState *)((AnimationState *)((int)hud + 0x5848)))->AnimationState::SetFrameFloat((float)spellFrame), + (((AnimationState *)((AnimationState *)(GHIDRA_INT(hud) + 0x5848)))->AnimationState::SetFrameFloat((float)spellFrame), *(int *)((char *)hudCopy + 0x584c) != 0)) { *(undefined1 *)((char *)hud + 0x585c) = 0; } @@ -2614,7 +2614,7 @@ LAB_0084a5d9: } } slot = slot - 1; - } while (-1 < (int)slot); + } while (-1 < GHIDRA_INT(slot)); *(undefined4 *)((char *)hud + 0x58cc) = 0x3f800000; return; } @@ -2693,14 +2693,14 @@ Vector * PlayerHUD::render_deathmatch_health_bar(Vector *outSize, Vector positio undefined1 *healthBarImage; float *segmentRemaining; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b02e7b; local_1c = ExceptionList; ExceptionList = &local_1c; if (*(char *)((char *)this->_player + 0x20a9) == '\0') { healthBarImage = &(*(undefined1 *)((char *)&(this[1]) + 0x24)); - puVar1 = (undefined1 *)((int)register0x00000010 + -4); + puVar1 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); if (*(int *)&(*(undefined1 *)((char *)&(this[1]) + 0x24)) == 0) { pvVar3 = Manager::LoadImage(&local_60,(byte *)"gfx/ui/ui_isaachealthbar.png"); local_14 = 0; @@ -2733,10 +2733,10 @@ Vector * PlayerHUD::render_deathmatch_health_bar(Vector *outSize, Vector positio *(int *)((char *)pvVar3 + 0x194c) + *(int *)((char *)pvVar3 + 0x1350) + *(int *)((char *)pvVar3 + 0x134c) + *(int *)((char *)pvVar3 + 0x1340)); barHearts = overflowHearts; - if (0x50 < (uint)overflowHearts) { + if (0x50 < GHIDRA_UINT(overflowHearts)) { barHearts = 1.12104e-43; } - overflowHearts = (float)((int)overflowHearts - (int)barHearts); + overflowHearts = (float)(GHIDRA_INT(overflowHearts) - GHIDRA_INT(barHearts)); rowEnds = (void *)0x0; rowEndsEnd = (float *)0x0; rowEndsCapacity = (float *)0x0; @@ -2750,7 +2750,7 @@ Vector * PlayerHUD::render_deathmatch_health_bar(Vector *outSize, Vector positio local_60 = position.x; local_58 = (int *)position.y; local_5c = (int *)position.y; - isRowStart = 0 < (int)fVar7; + isRowStart = 0 < GHIDRA_INT(fVar7); FUN_0084abc0(&local_64,&segmentParams); std::vector<8byte>::_Reallocate_exactly(); std::vector<8byte>::_Reallocate_exactly(); @@ -2768,10 +2768,10 @@ Vector * PlayerHUD::render_deathmatch_health_bar(Vector *outSize, Vector positio local_5c = (int *)(float)dVar11; local_60 = (float)local_58; fVar4 = fVar7; - if ((int)*remainingHearts < (int)fVar7) { + if (GHIDRA_INT(*remainingHearts) < GHIDRA_INT(fVar7)) { fVar4 = *remainingHearts; } - if (0.0 < (float)(int)fVar4) { + if (0.0 < (float)GHIDRA_INT(fVar4)) { if (isRowStart == '\0') { if (tickPointsEnd == tickPointsCapacity) { std::vector::_Emplace_reallocate(); @@ -2806,7 +2806,7 @@ Vector * PlayerHUD::render_deathmatch_health_bar(Vector *outSize, Vector positio goto LAB_0084b626; } if (*segmentRemaining == 0.0) { - if ((int)overflowHearts < 1) break; + if (GHIDRA_INT(overflowHearts) < 1) break; remainingHearts = &overflowHearts; rowEndPos.x = local_60 - 1.0; rowEndPos.y = (float)local_5c - 2.0; @@ -2836,20 +2836,20 @@ Vector * PlayerHUD::render_deathmatch_health_bar(Vector *outSize, Vector positio } fVar7 = segmentHearts; if (segmentHearts != 0.0) goto switchD_0084b1ed_default; - local_28 = (float *)((int)local_28 + 1); + local_28 = (float *)(GHIDRA_INT(local_28) + 1); switch(pfVar9) { case (float *)0x0: FUN_0084abc0(&local_64,&segmentParams); fVar7 = (float)(*(int *)((char *)this->_player + 0x1340) - *(int *)((char *)this->_player + 0x1344)); - fVar4 = (float)(0x10 - (int)local_9c); + fVar4 = (float)(0x10 - GHIDRA_INT(local_9c)); local_9c = fVar7; - if ((int)fVar4 < (int)fVar7) { + if (GHIDRA_INT(fVar4) < GHIDRA_INT(fVar7)) { local_9c = fVar4; } segmentHearts = fVar7; if (local_9c != 0.0) { - fVar7 = (float)((int)fVar7 - (int)local_9c); + fVar7 = (float)(GHIDRA_INT(fVar7) - GHIDRA_INT(local_9c)); segmentHearts = fVar7; ((KAGE::SmartPointer *)(auStack_182 + -10))->KAGE::SmartPointer::operator_assign(healthBarImage); render_health_bar_segment @@ -2868,13 +2868,13 @@ LAB_0084b626: uStack_d4 = 0; uStack_d0 = 0x40e00000; uStack_cc = 0; - local_3c._unk = CONCAT31(local_3c._unk._1_3_,1); + local_3c._unk = CONCAT31((*(undefined1 *)((char *)&(local_3c._unk) + 0x1)),1); local_b8 = local_3c._unk; local_c8 = 0x40c00000; uStack_c4 = 0x41000000; uStack_c0 = 0x40e00000; uStack_bc = 0x41000000; - local_3c._unk = CONCAT31(local_3c._unk._1_3_,1); + local_3c._unk = CONCAT31((*(undefined1 *)((char *)&(local_3c._unk) + 0x1)),1); local_dc = local_3c._unk; local_4c = 0x40e00000; uStack_40 = 0; @@ -2902,13 +2902,13 @@ LAB_0084b626: uStack_d4 = 0; uStack_d0 = 0x41100000; uStack_cc = 0; - local_3c._unk = CONCAT31(local_3c._unk._1_3_,1); + local_3c._unk = CONCAT31((*(undefined1 *)((char *)&(local_3c._unk) + 0x1)),1); local_b8 = local_3c._unk; local_c8 = 0x41000000; uStack_c4 = 0x41000000; uStack_c0 = 0x41100000; uStack_bc = 0x41000000; - local_3c._unk = CONCAT31(local_3c._unk._1_3_,1); + local_3c._unk = CONCAT31((*(undefined1 *)((char *)&(local_3c._unk) + 0x1)),1); local_dc = local_3c._unk; local_4c = 0x41100000; uStack_40 = 0; @@ -2936,13 +2936,13 @@ LAB_0084b626: uStack_d4 = 0; uStack_d0 = 0x41300000; uStack_cc = 0; - local_3c._unk = CONCAT31(local_3c._unk._1_3_,1); + local_3c._unk = CONCAT31((*(undefined1 *)((char *)&(local_3c._unk) + 0x1)),1); local_b8 = local_3c._unk; local_c8 = 0x41200000; uStack_c4 = 0x41000000; uStack_c0 = 0x41300000; uStack_bc = 0x41000000; - local_3c._unk = CONCAT31(local_3c._unk._1_3_,1); + local_3c._unk = CONCAT31((*(undefined1 *)((char *)&(local_3c._unk) + 0x1)),1); local_dc = local_3c._unk; local_4c = 0x41300000; uStack_40 = 0; @@ -2970,13 +2970,13 @@ LAB_0084b626: uStack_d4 = 0; uStack_d0 = 0x41500000; uStack_cc = 0; - local_3c._unk = CONCAT31(local_3c._unk._1_3_,1); + local_3c._unk = CONCAT31((*(undefined1 *)((char *)&(local_3c._unk) + 0x1)),1); local_b8 = local_3c._unk; local_c8 = 0x41400000; uStack_c4 = 0x41000000; uStack_c0 = 0x41500000; uStack_bc = 0x41000000; - local_3c._unk = CONCAT31(local_3c._unk._1_3_,1); + local_3c._unk = CONCAT31((*(undefined1 *)((char *)&(local_3c._unk) + 0x1)),1); local_dc = local_3c._unk; local_4c = 0x41500000; uStack_40 = 0; @@ -3002,9 +3002,9 @@ LAB_0084b626: switchD_0084b1ed_default: pfVar9 = local_28; } while (local_28 < &DAT_00000007); - piVar10 = (int *)((int)pfVar8 >> 3); + piVar10 = (int *)(GHIDRA_INT(pfVar8) >> 3); local_58 = piVar10; - if ((uint)((int)rowEndsEnd - (int)rowEnds >> 3) < piVar10) { + if (GHIDRA_UINT((GHIDRA_INT(rowEndsEnd) - GHIDRA_INT(rowEnds) >> 3)) < piVar10) { scratchPos.x = local_60 - 1.0; scratchPos.y = (float)local_5c - 2.0; if (rowEndsEnd == rowEndsCapacity) { @@ -3043,7 +3043,7 @@ switchD_0084b1ed_default: local_3c._blue = 1.0; local_3c._alpha = 1.0; (**(code **)(**(int **)healthBarImage + 0x18))(&DAT_00c5d1c0); - pfVar9 = (float *)((int)local_28 + (int)pvVar3); + pfVar9 = (float *)(GHIDRA_INT(local_28) + GHIDRA_INT(pvVar3)); local_3c._unk = 0; local_3c._red = 1.0; local_3c._green = 1.0; @@ -3060,10 +3060,10 @@ switchD_0084b1ed_default: __uint_to_double_fixup[-(DAT_00c82768 >> 0x1f)]) + *local_28, local_28[1],*pfVar9, (float)((double)DAT_00c82770 + __uint_to_double_fixup[-(DAT_00c82770 >> 0x1f)]) + - *(float *)((char *)pvVar3 + 4 + (int)local_28),&local_3c); + *(float *)((char *)pvVar3 + 4 + GHIDRA_INT(local_28)),&local_3c); (**(code **)(**(int **)healthBarImage + 0x14))(&DAT_00c5d1e4,quad,g_drawRectUnset); local_28 = local_28 + 2; - piVar10 = (int *)((int)piVar10 - 1); + piVar10 = (int *)(GHIDRA_INT(piVar10) - 1); } while (piVar10 != (int *)0x0); } local_3c._red = 1.0; @@ -3091,22 +3091,22 @@ LAB_0084b8e2: outSize->x = 46.0; outSize->y = 17.0; if (rowEnds != (void *)0x0) { - allocSize = (int)rowEndsCapacity - (int)rowEnds & 0xfffffff8; + allocSize = GHIDRA_INT(rowEndsCapacity) - GHIDRA_INT(rowEnds) & 0xfffffff8; pvVar3 = rowEnds; if (0xfff < allocSize) { pvVar3 = *(void **)((char *)rowEnds + -4); allocSize = allocSize + 0x23; - if (0x1f < (uint)((int)rowEnds + (-4 - (int)pvVar3))) goto LAB_0084b9c9; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(rowEnds) + (-4 - GHIDRA_INT(pvVar3))))) goto LAB_0084b9c9; } operator_delete(pvVar3,allocSize); } if (tickPoints != (float *)0x0) { - allocSize = (int)tickPointsCapacity - (int)tickPoints & 0xfffffff8; + allocSize = GHIDRA_INT(tickPointsCapacity) - GHIDRA_INT(tickPoints) & 0xfffffff8; pfVar9 = tickPoints; if (0xfff < allocSize) { pfVar9 = (float *)tickPoints[-1]; allocSize = allocSize + 0x23; - if (0x1f < (uint)((int)tickPoints + (-4 - (int)pfVar9))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tickPoints) + (-4 - GHIDRA_INT(pfVar9))))) { LAB_0084b9c9: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -3165,7 +3165,7 @@ int * PlayerHUD::make_ref(HUD *hud, int *outRef, Entity_Player *player) puStack_c = &LAB_00b0de3f; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; local_8 = 0; hudAlloc = operator_new(0x6dc); @@ -3196,7 +3196,7 @@ int * PlayerHUD::make_ref(HUD *hud, int *outRef, Entity_Player *player) (*DAT_00c7f480)(outRef); } } - outRef[1] = (int)refCount; + outRef[1] = GHIDRA_INT(refCount); *outRef = newHud; local_8 = 0; *(HUD **)(newHud + 4) = hud; diff --git a/src/game/player_manager.cpp b/src/game/player_manager.cpp index f06c94c..f3107b9 100644 --- a/src/game/player_manager.cpp +++ b/src/game/player_manager.cpp @@ -11,8 +11,8 @@ byte PlayerManager::AnyoneHasTrinket(int trinketType) void *trinketConfigs; trinketConfigs = (g_manager->_itemConfig)._trinkets._begin; - if ((((int)(trinketType & 0x7fffU) < - (int)(g_manager->_itemConfig)._trinkets._end - (int)trinketConfigs >> 2) && + if (((GHIDRA_INT((trinketType & 0x7fffU)) < + GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(trinketConfigs) >> 2) && (trinketConfig = *(int *)((char *)trinketConfigs + (trinketType & 0x7fffU) * 4), trinketConfig != 0)) && ((*(uint *)(trinketConfig + 0xb8) & 0x80000000) != 0)) { isCheckBackupPlayer = true; @@ -75,9 +75,9 @@ int PlayerManager::GetGFuelCount() total = 0; playerIdx = 0; iVar1 = 0; - if ((int)local_c - (int)playerSlot >> 2 != 0) { + if (GHIDRA_INT(local_c) - GHIDRA_INT(playerSlot) >> 2 != 0) { do { - if ((int)local_c - (int)playerSlot >> 2 == 0) { + if (GHIDRA_INT(local_c) - GHIDRA_INT(playerSlot) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerSlot = (game->_playerManager)._playerList._begin; playersEnd = (game->_playerManager)._playerList._end; @@ -85,7 +85,7 @@ int PlayerManager::GetGFuelCount() else { playersEnd = local_c; } - if (playerIdx < (uint)((int)playersEnd - (int)playerSlot >> 2)) { + if (playerIdx < GHIDRA_UINT((GHIDRA_INT(playersEnd) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + playerIdx; } player = (Entity_Player *)*playerSlot; @@ -97,7 +97,7 @@ int PlayerManager::GetGFuelCount() playerSlot = (game->_playerManager)._playerList._begin; playerIdx = playerIdx + 1; local_c = playersEnd; - } while (playerIdx < (uint)((int)playersEnd - (int)playerSlot >> 2)); + } while (playerIdx < GHIDRA_UINT((GHIDRA_INT(playersEnd) - GHIDRA_INT(playerSlot) >> 2))); iVar1 = total; } return iVar1; @@ -129,7 +129,7 @@ void PlayerManager::remove_coplayer_slot(int *hudSlots, Entity_Player *player) local_8 = 0xffffffff; puStack_c = &LAB_00b02770; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(local_30 + 0xb); + uVar1 = __security_cookie ^ GHIDRA_UINT((local_30 + 0xb)); iVar2 = 0; piVar4 = hudSlots; while (slotIndex = iVar2 + 1, (Entity_Player *)*piVar4 != player) { @@ -174,7 +174,7 @@ void PlayerManager::remove_coplayer_slot(int *hudSlots, Entity_Player *player) iVar2 = slotIndex; if (imagesBegin != (void *)0x0) { if (imagesBegin != pvVar5) { - iVar2 = (int)imagesBegin + 4; + iVar2 = GHIDRA_INT(imagesBegin) + 4; do { local_8 = 2; if (((*(int **)(iVar2 + 4) != (int *)0x0) && @@ -189,12 +189,12 @@ void PlayerManager::remove_coplayer_slot(int *hudSlots, Entity_Player *player) } iVar2 = slotIndex; entry = slotCursor; - uVar3 = ((imagesCapacity - (int)imagesBegin) / 0x28) * 0x28; + uVar3 = ((imagesCapacity - GHIDRA_INT(imagesBegin)) / 0x28) * 0x28; pvVar5 = imagesBegin; if (0xfff < uVar3) { pvVar5 = *(void **)((char *)imagesBegin + -4); uVar3 = uVar3 + 0x23; - if (0x1f < (uint)((int)imagesBegin + (-4 - (int)pvVar5))) goto LAB_0083beb7; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(imagesBegin) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_0083beb7; } operator_delete(pvVar5,uVar3); } @@ -209,19 +209,19 @@ void PlayerManager::remove_coplayer_slot(int *hudSlots, Entity_Player *player) if (((*(int **)((char *)pvVar5 + 8) != (int *)0x0) && (isLastRef = (**(code **)(**(int **)((char *)pvVar5 + 8) + 0xc))(), isLastRef != '\0')) && (g_imageReleaseFn != (void *)0x0)) { - (*g_imageReleaseFn)((int)pvVar5 + 4); + (*g_imageReleaseFn)(GHIDRA_INT(pvVar5) + 4); } - pvVar5 = (void *)((int)pvVar5 + 0x28); + pvVar5 = (void *)(GHIDRA_INT(pvVar5) + 0x28); local_8 = 0xffffffff; } while (pvVar5 != pvVar6); pvVar5 = (void *)entry[3]; } - uVar3 = ((entry[5] - (int)pvVar5) / 0x28) * 0x28; + uVar3 = ((entry[5] - GHIDRA_INT(pvVar5)) / 0x28) * 0x28; pvVar6 = pvVar5; if (0xfff < uVar3) { pvVar6 = *(void **)((char *)pvVar5 + -4); uVar3 = uVar3 + 0x23; - if (0x1f < (uint)((int)pvVar5 + (-4 - (int)pvVar6))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar5) + (-4 - GHIDRA_INT(pvVar6))))) { LAB_0083beb7: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -229,8 +229,8 @@ LAB_0083beb7: } operator_delete(pvVar6,uVar3); } - entry[4] = (int)imagesEnd; - entry[3] = (int)imagesBegin; + entry[4] = GHIDRA_INT(imagesEnd); + entry[3] = GHIDRA_INT(imagesBegin); entry[5] = imagesCapacity; iVar2 = slotIndex; } @@ -254,7 +254,7 @@ Entity_Player * PlayerManager::get_player_by_user_id(ulonglong *userId) float userInfo; playerIt = (this->_playerList)._begin; - playerCount = (int)(this->_playerList)._end - (int)playerIt >> 2; + playerCount = GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT(playerIt) >> 2; i = 0; if (playerCount != 0) { do { @@ -267,7 +267,7 @@ Entity_Player * PlayerManager::get_player_by_user_id(ulonglong *userId) userIdLow = *(int *)((char *)userInfo + 8); userIdHigh = *(int *)((char *)userInfo + 0xc); } - if ((userIdLow == (int)*userId) && (userIdHigh == *(int *)((char *)userId + 4))) { + if ((userIdLow == GHIDRA_INT(*userId)) && (userIdHigh == *(int *)((char *)userId + 4))) { return (Entity_Player *)*playerIt; } i = i + 1; @@ -301,16 +301,16 @@ void PlayerManager::unlock_completion_mark(int completionType) if (g_game != (Game *)0x0) { playerManager = &g_game->_playerManager; playerIndex = 0; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar4 = (playerManager->_playerList)._end; - if ((int)pvVar4 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar4) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar4 = (playerManager->_playerList)._end; } piVar5 = (playerManager->_playerList)._begin; - if (playerIndex < (uint)((int)pvVar4 - (int)piVar5 >> 2)) { + if (playerIndex < GHIDRA_UINT((GHIDRA_INT(pvVar4) - GHIDRA_INT(piVar5) >> 2))) { piVar5 = piVar5 + playerIndex; } iVar7 = *piVar5; @@ -386,8 +386,8 @@ void PlayerManager::unlock_completion_mark(int completionType) playerManager = &g_game->_playerManager; playerIndex = playerIndex + 1; } while (playerIndex < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } if (completionType == 6) { iVar7 = 0x154; @@ -421,7 +421,7 @@ PlayerManager::~PlayerManager() } while (ownedPtrIt != (int *)in_ECX[1]); ownedPtrIt = (int *)*in_ECX; } - in_ECX[1] = (int)ownedPtrIt; + in_ECX[1] = GHIDRA_INT(ownedPtrIt); ownedPtrIt = (int *)in_ECX[0x34]; if (ownedPtrIt != (int *)in_ECX[0x35]) { do { @@ -432,7 +432,7 @@ PlayerManager::~PlayerManager() } while (ownedPtrIt != (int *)in_ECX[0x35]); ownedPtrIt = (int *)in_ECX[0x34]; } - in_ECX[0x35] = (int)ownedPtrIt; + in_ECX[0x35] = GHIDRA_INT(ownedPtrIt); slotsLeft = 4; ownedPtrIt = in_ECX + 0x20; do { @@ -470,7 +470,7 @@ void PlayerManager::init_main_player(int playerType, uint seed) local_8 = 0xffffffff; puStack_c = &LAB_00b0e7f7; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; (this->_rng)._shift1 = 5; (this->_rng)._shift2 = 7; @@ -483,18 +483,18 @@ void PlayerManager::init_main_player(int playerType, uint seed) if (playerType != -2) { firstPlayerSlot = (this->_playerList)._begin; if (firstPlayerSlot == (this->_playerList)._end) { - seed = (uint)operator_new(0x2f00); + seed = GHIDRA_UINT(operator_new(0x2f00)); local_8 = 0; if ((Entity_Player *)seed == (Entity_Player *)0x0) { seed = 0; } else { ((Entity_Player *)((Entity_Player *)seed))->Entity_Player::constructor(); - seed = (uint)extraout_EAX; + seed = GHIDRA_UINT(extraout_EAX); } local_8 = 0xffffffff; (((Entity *)(seed + 0x1450))->_color)._colorize[1] = - (float)((int)(this->_playerList)._end - (int)(this->_playerList)._begin >> 2); + (float)(GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT((this->_playerList)._begin) >> 2); (((Entity *)(seed + 0x1450))->_color)._colorize[2] = 0.0; playerListEnd = (this->_playerList)._end; if (playerListEnd == (this->_playerList)._capacity) { @@ -504,7 +504,7 @@ void PlayerManager::init_main_player(int playerType, uint seed) else { *playerListEnd = seed; ppvVar1 = &(this->_playerList)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 4); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 4); entity = (Entity *)seed; } } @@ -519,7 +519,7 @@ void PlayerManager::init_main_player(int playerType, uint seed) nextEntityIndex = *(int *)((char *)room + 0x1214); *(int *)((char *)room + 0x1214) = nextEntityIndex + 1; entity->_index = nextEntityIndex; - ((EntityList *)((EntityList *)((int)room + 0x1218)))->EntityList::AddEntity(entity); + ((EntityList *)((EntityList *)(GHIDRA_INT(room) + 0x1218)))->EntityList::AddEntity(entity); } } this->_coopSlots[0]._controllerIndex = -1; @@ -558,12 +558,12 @@ Entity_Player * PlayerManager::GetPlayer(int param1) playerListEnd = (this->_playerList)._end; playerListBegin = (this->_playerList)._begin; - if ((int)playerListEnd - (int)playerListBegin >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerListBegin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (this->_playerList)._end; playerListBegin = (this->_playerList)._begin; } - if ((uint)param1 < (uint)((int)playerListEnd - (int)playerListBegin >> 2)) { + if (GHIDRA_UINT(param1) < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerListBegin) >> 2))) { return (Entity_Player *)playerListBegin[param1]; } return (Entity_Player *)*playerListBegin; @@ -583,7 +583,7 @@ Entity_Player * PlayerManager::get_main_player(int index) piVar1 = (this->_playerList)._begin; mainIndex = 0; i = 0; - playerCount = (int)(this->_playerList)._end - (int)piVar1 >> 2; + playerCount = GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT(piVar1) >> 2; if (playerCount != 0) { playerIt = piVar1; do { @@ -617,7 +617,7 @@ Entity_Player * PlayerManager::get_first_local_main_player() playerList = (this->_playerList)._begin; playerIdx = 0; - if ((int)(this->_playerList)._end - (int)playerList >> 2 != 0) { + if (GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT(playerList) >> 2 != 0) { do { EVar1 = *(EntityPtr *)((char *)playerList + playerIdx * 4); EVar2 = *(EntityPtr *)((char *)EVar1 + 0x1e68); @@ -627,14 +627,14 @@ Entity_Player * PlayerManager::get_first_local_main_player() if (deviceSlot == *(NetplayManager *)(g_manager + 1)) { return (Entity_Player *)EVar1; } - deviceCount = (int)*(NetplayManager *)(g_manager + 1) - (int)deviceSlot >> 2; + deviceCount = GHIDRA_INT(*(NetplayManager *)(g_manager + 1)) - GHIDRA_INT(deviceSlot) >> 2; deviceIdx = 0; if (deviceCount == 0) { return (Entity_Player *)EVar1; } while (*(int *)(*(int *)deviceSlot + 0xc) != *(int *)((char *)EVar1 + 0x1618)) { deviceIdx = deviceIdx + 1; - deviceSlot = (NetplayManager)((int)deviceSlot + 4); + deviceSlot = (NetplayManager)(GHIDRA_INT(deviceSlot) + 4); if (deviceCount <= deviceIdx) { return (Entity_Player *)EVar1; } @@ -646,7 +646,7 @@ Entity_Player * PlayerManager::get_first_local_main_player() } playerList = (this->_playerList)._begin; playerIdx = playerIdx + 1; - } while (playerIdx < (uint)((int)(this->_playerList)._end - (int)playerList >> 2)); + } while (playerIdx < GHIDRA_UINT((GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT(playerList) >> 2))); } return (Entity_Player *)0x0; } @@ -663,7 +663,7 @@ int PlayerManager::count_main_players() playerIt = (this->_playerList)._begin; count = 0; - for (playersLeft = (int)(this->_playerList)._end - (int)playerIt >> 2; playersLeft != 0; + for (playersLeft = GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT(playerIt) >> 2; playersLeft != 0; playersLeft = playersLeft + -1) { twin = *playerIt; twin = *(int *)(twin + 0x1e68); @@ -859,25 +859,25 @@ Entity_Player * PlayerManager::SpawnCoPlayerBaby(int babyId) local_10 = ExceptionList; ExceptionList = &local_10; KAGE_LogMessage(1,(byte *)"Spawning Co-Op Baby (Skin = %d) \n"); - if (0x40 < ((int)(this->_playerList)._end - (int)(this->_playerList)._begin >> 2) + 1U) { + if (0x40 < (GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT((this->_playerList)._begin) >> 2) + 1U) { KAGE_LogMessage(8,(byte *) "PlayerManager::SpawnCoPlayer() cannot spawn new player. Already at max players. (Count == %d, Max = %d) \n" ); ExceptionList = local_10; return (Entity_Player *)0x0; } - babyId = (int)operator_new(0x2f00); + babyId = GHIDRA_INT(operator_new(0x2f00)); uStack_8 = 0; if ((Entity_Player *)babyId == (Entity_Player *)0x0) { babyId = 0; } else { ((Entity_Player *)((Entity_Player *)babyId))->Entity_Player::constructor(); - babyId = (int)extraout_EAX; + babyId = GHIDRA_INT(extraout_EAX); } uStack_8 = 0xffffffff; ((Entity_Player *)babyId)->_playerIndex = - (int)(this->_playerList)._end - (int)(this->_playerList)._begin >> 2; + GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT((this->_playerList)._begin) >> 2; playerListSlot = (this->_playerList)._end; newPlayer = (Entity_Player *)babyId; if (playerListSlot == (this->_playerList)._capacity) { @@ -887,29 +887,29 @@ Entity_Player * PlayerManager::SpawnCoPlayerBaby(int babyId) else { *playerListSlot = babyId; playerListEnd = &(this->_playerList)._end; - *playerListEnd = (void *)((int)*playerListEnd + 4); + *playerListEnd = (void *)(GHIDRA_INT(*playerListEnd) + 4); } manager = g_manager; savedManager = g_manager; - babyId = (int)newPlayer; + babyId = GHIDRA_INT(newPlayer); if (babyIdLocal < 0) { babyIdLocal = 0x47; babyId = 0x47; uVar2 = Random(); if ((uVar2 & 3) == 0) { uStack_8 = 1; - FUN_0042c820(((int)(manager->_entityConfig)._babies._end - - (int)(manager->_entityConfig)._babies._begin) / 0x38); + FUN_0042c820((GHIDRA_INT((manager->_entityConfig)._babies._end) - + GHIDRA_INT((manager->_entityConfig)._babies._begin)) / 0x38); pvVar5 = (manager->_entityConfig)._babies._begin; babyIndex = 0; - iVar4 = (int)(savedManager->_entityConfig)._babies._end - (int)pvVar5; + iVar4 = GHIDRA_INT((savedManager->_entityConfig)._babies._end) - GHIDRA_INT(pvVar5); iVar6 = iVar4 >> 0x1f; candidatesEnd = (int *)0x0; if (iVar4 / 0x38 + iVar6 != iVar6) { iVar6 = 0; candidatesEndSaved = candidatesEnd; do { - iVar4 = iVar6 + (int)pvVar5; + iVar4 = iVar6 + GHIDRA_INT(pvVar5); if (*(int *)(iVar4 + 0x34) < 0) { LAB_009b9a6d: candidate = iVar4; @@ -933,17 +933,17 @@ LAB_009b9a6d: babyIndex = babyIndex + 1; pvVar5 = (savedManager->_entityConfig)._babies._begin; } while (babyIndex < - (uint)(((int)(savedManager->_entityConfig)._babies._end - (int)pvVar5) / 0x38)); + GHIDRA_UINT(((GHIDRA_INT((savedManager->_entityConfig)._babies._end) - GHIDRA_INT(pvVar5)) / 0x38))); } if (candidatesEnd == (int *)0x0) { babyIdLocal = babyId; } - else if ((int)candidatesEnd >> 2 == 0) { + else if (GHIDRA_INT(candidatesEnd) >> 2 == 0) { babyIdLocal = *piRam00000000; } else { uVar2 = Random(); - babyIdLocal = **(int **)((uVar2 % (uint)((int)candidatesEnd >> 2)) * 4); + babyIdLocal = **(int **)((uVar2 % GHIDRA_UINT((GHIDRA_INT(candidatesEnd) >> 2))) * 4); } uStack_8 = 0xffffffff; goto LAB_009b9b3f; @@ -967,8 +967,8 @@ LAB_009b9c11: uVar2 = uVar2 >> ((byte)(this->_rng)._shift3 & 0x1f) ^ uVar2; (this->_rng)._seed = uVar2; extraBabyCount = - ((int)(savedManager->_entityConfig)._babies._end - - (int)(savedManager->_entityConfig)._babies._begin) / 0x38 - 0x47; + (GHIDRA_INT((savedManager->_entityConfig)._babies._end) - + GHIDRA_INT((savedManager->_entityConfig)._babies._begin)) / 0x38 - 0x47; if (extraBabyCount == 0) { (*(code *)babyId)(1,1,0x47,uVar2); } @@ -1009,7 +1009,7 @@ LAB_009b9bd2: iVar6 = *(int *)((char *)pvVar5 + 0x1214); *(int *)((char *)pvVar5 + 0x1214) = iVar6 + 1; pEVar3->_index = iVar6; - ((EntityList *)((EntityList *)((int)pvVar5 + 0x1218)))->EntityList::AddEntity((Entity *)pEVar3); + ((EntityList *)((EntityList *)(GHIDRA_INT(pvVar5) + 0x1218)))->EntityList::AddEntity((Entity *)pEVar3); ExceptionList = local_10; return pEVar3; } @@ -1040,18 +1040,18 @@ Entity_Player * PlayerManager::SpawnCoPlayer2(int playerType) ExceptionList = &local_10; KAGE_LogMessage(1,(byte *)"[Frame: %d] Spawning Co-Op Player (ePlayerType = %d) \n"); if (existingPlayer == -1) { - playerType = (int)operator_new(0x2f00); + playerType = GHIDRA_INT(operator_new(0x2f00)); uStack_8 = 0; if ((Entity_Player *)playerType == (Entity_Player *)0x0) { playerType = 0; } else { ((Entity_Player *)((Entity_Player *)playerType))->Entity_Player::constructor(); - playerType = (int)extraout_EAX; + playerType = GHIDRA_INT(extraout_EAX); } uStack_8 = 0xffffffff; ((Entity_Player *)playerType)->_playerIndex = - (int)(this->_extraPlayers)._end - (int)(this->_extraPlayers)._begin >> 2; + GHIDRA_INT((this->_extraPlayers)._end) - GHIDRA_INT((this->_extraPlayers)._begin) >> 2; extraPlayersEnd = (this->_extraPlayers)._end; if (extraPlayersEnd == (this->_extraPlayers)._capacity) { std::vector::_Emplace_reallocate(extraPlayersEnd,&playerType); @@ -1060,7 +1060,7 @@ Entity_Player * PlayerManager::SpawnCoPlayer2(int playerType) else { *extraPlayersEnd = playerType; listEnd = &(this->_extraPlayers)._end; - *listEnd = (void *)((int)*listEnd + 4); + *listEnd = (void *)(GHIDRA_INT(*listEnd) + 4); newPlayer = (Entity_Player *)playerType; } uVar2 = (this->_rng)._seed; @@ -1081,7 +1081,7 @@ Entity_Player * PlayerManager::SpawnCoPlayer2(int playerType) (*(code *)playerType)(1,2,0,uVar2); } else { - if (0x40 < ((int)(this->_playerList)._end - (int)(this->_playerList)._begin >> 2) + 1U) { + if (0x40 < (GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT((this->_playerList)._begin) >> 2) + 1U) { KAGE_LogMessage(8,(byte *) "PlayerManager::SpawnCoPlayer() cannot spawn new player. Already at max players. (Count == %d, Max = %d) \n" ); @@ -1099,14 +1099,14 @@ Entity_Player * PlayerManager::SpawnCoPlayer2(int playerType) } uStack_8 = 0xffffffff; uVar2 = 0xffffffff; - coPlayer->_playerIndex = (int)(this->_playerList)._end - (int)(this->_playerList)._begin >> 2; + coPlayer->_playerIndex = GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT((this->_playerList)._begin) >> 2; playerSlot = (this->_playerList)._begin; - existingPlayer = (int)(this->_playerList)._end - (int)playerSlot >> 2; + existingPlayer = GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT(playerSlot) >> 2; if (existingPlayer != 0) { do { existingPlayer = *playerSlot; playerSlot = playerSlot + 1; - if ((int)uVar2 < (int)*(uint *)(existingPlayer + 0x1620)) { + if (GHIDRA_INT(uVar2) < GHIDRA_INT(*(uint *)(existingPlayer + 0x1620))) { uVar2 = *(uint *)(existingPlayer + 0x1620); } existingPlayer = existingPlayer + -1; @@ -1122,7 +1122,7 @@ Entity_Player * PlayerManager::SpawnCoPlayer2(int playerType) else { *extraPlayersEnd = coPlayer; listEnd = &(this->_playerList)._end; - *listEnd = (void *)((int)*listEnd + 4); + *listEnd = (void *)(GHIDRA_INT(*listEnd) + 4); } newPlayer = coPlayer; uVar2 = (this->_rng)._seed; @@ -1145,7 +1145,7 @@ Entity_Player * PlayerManager::SpawnCoPlayer2(int playerType) existingPlayer = *(int *)((char *)room + 0x1214); *(int *)((char *)room + 0x1214) = existingPlayer + 1; newPlayer->_index = existingPlayer; - ((EntityList *)((EntityList *)((int)room + 0x1218)))->EntityList::AddEntity((Entity *)newPlayer); + ((EntityList *)((EntityList *)(GHIDRA_INT(room) + 0x1218)))->EntityList::AddEntity((Entity *)newPlayer); } ExceptionList = local_10; return newPlayer; @@ -1196,7 +1196,7 @@ void PlayerManager::RemoveCoPlayer(Entity_Player *player, byte unusedBool) local_8 = 0xffffffff; puStack_c = &LAB_00b0e8d5; local_10 = ExceptionList; - uVar5 = __security_cookie ^ (uint)(tmpHudSlot + 0x44); + uVar5 = __security_cookie ^ GHIDRA_UINT((tmpHudSlot + 0x44)); if (player == (Entity_Player *)0x0) { return; } @@ -1241,16 +1241,16 @@ void PlayerManager::RemoveCoPlayer(Entity_Player *player, byte unusedBool) for (piVar14 = (this->_extraPlayers)._begin; (piVar14 != piVar11 && ((Entity_Player *)*piVar14 != pEVar10)); piVar14 = piVar14 + 1) { } - memmove(piVar14,piVar14 + 1,(int)piVar11 - (int)(piVar14 + 1)); + memmove(piVar14,piVar14 + 1,GHIDRA_INT(piVar11) - GHIDRA_INT((piVar14 + 1))); ppvVar1 = &(this->_extraPlayers)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + -4); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + -4); uVar5 = 0; - if ((int)(this->_extraPlayers)._end - (int)(this->_extraPlayers)._begin >> 2 != 0) { + if (GHIDRA_INT((this->_extraPlayers)._end) - GHIDRA_INT((this->_extraPlayers)._begin) >> 2 != 0) { do { - *(uint *)(*(int *)((int)(this->_extraPlayers)._begin + uVar5 * 4) + 0x161c) = uVar5; + *(uint *)(*(int *)(GHIDRA_INT((this->_extraPlayers)._begin) + uVar5 * 4) + 0x161c) = uVar5; uVar5 = uVar5 + 1; - } while (uVar5 < (uint)((int)(this->_extraPlayers)._end - (int)(this->_extraPlayers)._begin >> - 2)); + } while (uVar5 < GHIDRA_UINT((GHIDRA_INT((this->_extraPlayers)._end) - GHIDRA_INT((this->_extraPlayers)._begin) >> + 2))); } (*(code *)**(undefined4 **)pEVar10)(1); goto LAB_009ba5d2; @@ -1260,10 +1260,10 @@ void PlayerManager::RemoveCoPlayer(Entity_Player *player, byte unusedBool) switch(pEVar10->_babySkin) { case 0x1b: uVar5 = pEVar10->_soulHearts - 1; - if (-1 < (int)uVar5) { + if (-1 < GHIDRA_INT(uVar5)) { iVar6 = pEVar10->_soulHearts + -2; do { - if ((((int)uVar5 <= pEVar10->_soulHearts) && (uVar5 != 0)) && + if (((GHIDRA_INT(uVar5) <= pEVar10->_soulHearts) && (uVar5 != 0)) && (((uVar5 & 1) != 0 && ((pEVar10->_blackHearts & 1 << ((byte)(iVar6 / 2) & 0x1f)) != 0)) )) { pEVar10->_blackHearts = pEVar10->_blackHearts & ~(1 << (uVar5 >> 1 & 0x1f)); @@ -1273,7 +1273,7 @@ void PlayerManager::RemoveCoPlayer(Entity_Player *player, byte unusedBool) } iVar6 = iVar6 + -1; uVar5 = uVar5 - 1; - } while (-1 < (int)uVar5); + } while (-1 < GHIDRA_INT(uVar5)); this = local_14; } break; @@ -1296,15 +1296,15 @@ void PlayerManager::RemoveCoPlayer(Entity_Player *player, byte unusedBool) LAB_009ba298: do { if (0 < iVar6) { - if (0 < (int)local_24.y) goto LAB_009ba353; + if (0 < GHIDRA_INT(local_24.y)) goto LAB_009ba353; LAB_009ba385: - if (((int)uVar5 <= pEVar10->_soulHearts) && (0 < (int)uVar5)) { + if ((GHIDRA_INT(uVar5) <= pEVar10->_soulHearts) && (0 < GHIDRA_INT(uVar5))) { uVar7 = uVar5 & 0x80000001; - if ((int)uVar7 < 0) { + if (GHIDRA_INT(uVar7) < 0) { uVar7 = (uVar7 - 1 | 0xfffffffe) + 1; } if ((uVar7 == 1) && - ((pEVar10->_blackHearts & 1 << ((byte)((int)(uVar5 - 1) / 2) & 0x1f)) != 0)) { + ((pEVar10->_blackHearts & 1 << ((byte)(GHIDRA_INT((uVar5 - 1)) / 2) & 0x1f)) != 0)) { iVar8 = 2; if (iVar6 < 2) { iVar8 = iVar6; @@ -1312,7 +1312,7 @@ LAB_009ba385: ((Entity_Player *)(player))->Entity_Player::AddBlackHearts(iVar8); iVar6 = iVar6 + -2; uVar5 = uVar5 + 2; - local_1c.y = (float)((int)local_1c.y + 1); + local_1c.y = (float)(GHIDRA_INT(local_1c.y) + 1); goto LAB_009ba298; } } @@ -1323,16 +1323,16 @@ LAB_009ba385: ((Entity_Player *)(player))->Entity_Player::AddSoulHearts(iVar8,0); iVar6 = iVar6 + -2; uVar5 = uVar5 + 2; - local_1c.y = (float)((int)local_1c.y + 1); + local_1c.y = (float)(GHIDRA_INT(local_1c.y) + 1); goto LAB_009ba298; } - if ((int)local_24.y < 1) goto code_r0x009ba2ab; + if (GHIDRA_INT(local_24.y) < 1) goto code_r0x009ba2ab; LAB_009ba353: if ((pEVar10->_boneHearts < 1) || ((pEVar10->_boneHeartsMask & 1 << (SUB41(local_1c.y,0) & 0x1f)) == 0)) goto LAB_009ba385; ((Entity_Player *)(player))->Entity_Player::AddBoneHearts(1); - local_24.y = (float)((int)local_24.y + -1); - local_1c.y = (float)((int)local_1c.y + 1); + local_24.y = (float)(GHIDRA_INT(local_24.y) + -1); + local_1c.y = (float)(GHIDRA_INT(local_1c.y) + 1); } while( true ); } goto LAB_009ba2d0; @@ -1359,7 +1359,7 @@ LAB_009ba353: } while (uVar7 < maxPocketItems); } } - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&local_34,3,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&local_34,3,-1,-1,0,0); pvVar2 = local_34._data; uVar7 = 0; local_8 = 2; @@ -1373,24 +1373,24 @@ LAB_009ba353: (**(code **)(*piVar11 + 0x28))(); } uVar7 = uVar7 + 1; - } while (uVar7 < (uint)local_34._size); + } while (uVar7 < GHIDRA_UINT(local_34._size)); this = local_14; } ((Entity_Player *)(pEVar10))->Entity_Player::release_weapons_and_effects(1); local_8 = 0xffffffff; - if (local_34._0_1_ != '\0') goto LAB_009ba5d2; + if ((*(undefined1 *)((char *)&(local_34) + 0x0)) != '\0') goto LAB_009ba5d2; if (g_mainHeap == (void *)0x0) { heapCounter = &g_allocatedBytesNoHeap; } else { - heapCounter = (qword *)((int)g_mainHeap + 0x30); + heapCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (local_34._data != (void *)0x0) { uVar5 = *(uint *)((char *)local_34._data + -4); qVar3 = *heapCounter; - *(uint *)heapCounter = (uint)*heapCounter - uVar5; - *(uint *)((char *)heapCounter + 4) = *(uint *)((char *)heapCounter + 4) - (uint)((uint)qVar3 < uVar5); - free((uint *)((int)local_34._data + -4)); + *(uint *)heapCounter = GHIDRA_UINT(*heapCounter) - uVar5; + *(uint *)((char *)heapCounter + 4) = *(uint *)((char *)heapCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar3) < uVar5)); + free((uint *)(GHIDRA_INT(local_34._data) + -4)); } LAB_009ba5cb: local_8 = 0xffffffff; @@ -1400,17 +1400,17 @@ LAB_009ba5d2: for (piVar14 = (this->_playerList)._begin; (piVar14 != piVar11 && ((Entity_Player *)*piVar14 != pEVar10)); piVar14 = piVar14 + 1) { } - memmove(piVar14,piVar14 + 1,(int)piVar11 - (int)(piVar14 + 1)); + memmove(piVar14,piVar14 + 1,GHIDRA_INT(piVar11) - GHIDRA_INT((piVar14 + 1))); ppvVar1 = &(this->_playerList)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + -4); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + -4); pEVar10->Remove(); pEVar10->_playerIndex = -1; uVar5 = 0; - if ((int)(this->_playerList)._end - (int)(this->_playerList)._begin >> 2 != 0) { + if (GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT((this->_playerList)._begin) >> 2 != 0) { do { - *(uint *)(*(int *)((int)(this->_playerList)._begin + uVar5 * 4) + 0x161c) = uVar5; + *(uint *)(*(int *)(GHIDRA_INT((this->_playerList)._begin) + uVar5 * 4) + 0x161c) = uVar5; uVar5 = uVar5 + 1; - } while (uVar5 < (uint)((int)(this->_playerList)._end - (int)(this->_playerList)._begin >> 2)); + } while (uVar5 < GHIDRA_UINT((GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT((this->_playerList)._begin) >> 2))); } game = g_game; this->_coopSlots[0]._controllerIndex = -1; @@ -1439,7 +1439,7 @@ LAB_009ba5d2: if ((Entity_Player *)*piVar11 == pEVar10) { *(undefined4 *)((char *)(&hud->_poopSpellsSprite + 2) + uVar5 * 0xcc + 0x78) = 0; if (uVar7 < 2) { - puVar9 = (undefined4 *)((int)(&(game->_hud)._poopSpellsSprite + 2) + uVar5 * 0xcc + 0x78); + puVar9 = (undefined4 *)(GHIDRA_INT((&(game->_hud)._poopSpellsSprite + 2)) + uVar5 * 0xcc + 0x78); iVar6 = 2 - uVar7; do { puVar12 = puVar9; @@ -1505,8 +1505,8 @@ LAB_009ba5d2: piVar14 = (int *)local_34._size; } else { - *piVar11 = (int)player; - local_34._capacity = (int)(piVar11 + 1); + *piVar11 = GHIDRA_INT(player); + local_34._capacity = GHIDRA_INT((piVar11 + 1)); piVar11 = (int *)local_34._capacity; } } @@ -1514,32 +1514,32 @@ LAB_009ba5d2: } while (uVar5 < local_14); local_24.y = (float)piVar14; } - ownedNpcCount = (float)((int)piVar11 - (int)local_34._data >> 2); + ownedNpcCount = (float)(GHIDRA_INT(piVar11) - GHIDRA_INT(local_34._data) >> 2); local_1c.y = 0.0; player = local_34._data; if (ownedNpcCount != 0.0) { do { - entity = *(Entity **)((int)(&(player->_sprite)._filename + -3) + (int)local_1c.y * 4); + entity = *(Entity **)(GHIDRA_INT((&(player->_sprite)._filename + -3)) + GHIDRA_INT(local_1c.y) * 4); pvVar2 = g_game->_room; - ((EntityList_EL *)((EntityList_EL *)((int)pvVar2 + 0x1238)))->EntityList_EL::remove(entity); - ((EntityList_EL *)((EntityList_EL *)((int)pvVar2 + 0x1258)))->EntityList_EL::remove(entity); - ((EntityList_EL *)((EntityList_EL *)((int)pvVar2 + 0x1248)))->EntityList_EL::remove(entity); - ((EntityList_EL *)((EntityList_EL *)((int)pvVar2 + 0x1268)))->EntityList_EL::remove(entity); - ((EntityList_EL *)((EntityList_EL *)((int)pvVar2 + 0x12a8)))->EntityList_EL::remove(entity); + ((EntityList_EL *)((EntityList_EL *)(GHIDRA_INT(pvVar2) + 0x1238)))->EntityList_EL::remove(entity); + ((EntityList_EL *)((EntityList_EL *)(GHIDRA_INT(pvVar2) + 0x1258)))->EntityList_EL::remove(entity); + ((EntityList_EL *)((EntityList_EL *)(GHIDRA_INT(pvVar2) + 0x1248)))->EntityList_EL::remove(entity); + ((EntityList_EL *)((EntityList_EL *)(GHIDRA_INT(pvVar2) + 0x1268)))->EntityList_EL::remove(entity); + ((EntityList_EL *)((EntityList_EL *)(GHIDRA_INT(pvVar2) + 0x12a8)))->EntityList_EL::remove(entity); entity->_valid = 0; EntityList::invalidate_type_cache - ((EntityList *)((int)pvVar2 + 0x1218),entity->_type,entity->_variant, + ((EntityList *)(GHIDRA_INT(pvVar2) + 0x1218),entity->_type,entity->_variant, entity->_subtype); - local_1c.y = (float)((int)local_1c.y + 1); - } while ((uint)local_1c.y < (uint)ownedNpcCount); + local_1c.y = (float)(GHIDRA_INT(local_1c.y) + 1); + } while (GHIDRA_UINT(local_1c.y) < GHIDRA_UINT(ownedNpcCount)); } if (player != (Entity_Player *)0x0) { - uVar5 = (int)local_24.y - (int)player & 0xfffffffc; + uVar5 = GHIDRA_INT(local_24.y) - GHIDRA_INT(player) & 0xfffffffc; pEVar10 = player; if (0xfff < uVar5) { pEVar10 = *(Entity_Player **)&(*(undefined1 *)((char *)&(player[-1]) + 0x2efc)); uVar5 = uVar5 + 0x23; - if (0x1f < (uint)((int)player + (-4 - (int)pEVar10))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(player) + (-4 - GHIDRA_INT(pEVar10))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1553,7 +1553,7 @@ code_r0x009ba2ab: ((Entity_Player *)(player))->Entity_Player::AddHearts(pEVar10->_redHearts,1,0); this = local_14; LAB_009ba2d0: - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&local_34,3,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&local_34,3,-1,-1,0,0); mainPlayer = player; uVar5 = 0; local_8 = 0; @@ -1574,12 +1574,12 @@ LAB_009ba410: } else if (familiar->_spawnerVariant == 1) goto LAB_009ba410; uVar5 = uVar5 + 1; - } while (uVar5 < (uint)local_34._size); + } while (uVar5 < GHIDRA_UINT(local_34._size)); this = local_14; } ((Entity_Player *)(pEVar10))->Entity_Player::release_weapons_and_effects(1); local_8 = 0xffffffff; - if (local_34._0_1_ != '\0') goto LAB_009ba5d2; + if ((*(undefined1 *)((char *)&(local_34) + 0x0)) != '\0') goto LAB_009ba5d2; local_8 = 1; tracked_alloc(1,local_34._data,0); goto LAB_009ba5cb; @@ -1597,7 +1597,7 @@ void PlayerManager::remove_coplayers_without_device() if (g_manager->_netplayManager != *(NetplayManager *)(g_manager + 1)) { pvVar1 = (this->_playerList)._begin; - playerCount = (int)(this->_playerList)._end - (int)pvVar1 >> 2; + playerCount = GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT(pvVar1) >> 2; playerIndex = playerCount - 1; if (playerIndex < playerCount) { do { @@ -1608,12 +1608,12 @@ void PlayerManager::remove_coplayers_without_device() pvVar1 = ((InputManager *)(&g_manager->_netplayManager))->InputManager::GetDeviceByPlayerEntity(player); if (pvVar1 == (void *)0x0) { RemoveCoPlayer(this,*(Entity_Player **) - ((int)(this->_playerList)._begin + playerIndex * 4),unusedBool); + (GHIDRA_INT((this->_playerList)._begin) + playerIndex * 4),unusedBool); } } playerIndex = playerIndex - 1; pvVar1 = (this->_playerList)._begin; - } while (playerIndex < (uint)((int)(this->_playerList)._end - (int)pvVar1 >> 2)); + } while (playerIndex < GHIDRA_UINT((GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT(pvVar1) >> 2))); } } return; @@ -1680,7 +1680,7 @@ LAB_009babda: return uVar4; } deviceIndex = 0; - deviceCount = (int)*(NetplayManager *)(g_manager + 1) - (int)netDeviceIt >> 2; + deviceCount = GHIDRA_INT(*(NetplayManager *)(g_manager + 1)) - GHIDRA_INT(netDeviceIt) >> 2; if (deviceCount != 0) { do { if (*(int *)(*(int *)netDeviceIt + 0xc) == iVar3) { @@ -1710,7 +1710,7 @@ LAB_009babda: break; } deviceIndex = deviceIndex + 1; - netDeviceIt = (NetplayManager)((int)netDeviceIt + 4); + netDeviceIt = (NetplayManager)(GHIDRA_INT(netDeviceIt) + 4); } while (deviceIndex < deviceCount); } } @@ -1765,7 +1765,7 @@ void PlayerManager::handle_coop_join() local_8 = 0xffffffff; puStack_c = &LAB_00b0e93d; local_10 = ExceptionList; - uVar4 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar4 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; local_20 = this; if (g_manager->_netplayManager == *(NetplayManager *)(g_manager + 1)) { @@ -1778,8 +1778,8 @@ void PlayerManager::handle_coop_join() local_8 = 0; (**(code **)(PTR_vftable_00c57b2c + 0x10))(); local_8 = 0xffffffff; - if ((uint)(iVar11 >> 3) <= (uint)fVar10) break; - ((KAGE::Input::Manager *)((Manager *)&PTR_vftable_00c57b18))->KAGE::Input::Manager::get_device(&inputDevice,(uint)fVar10); + if (GHIDRA_UINT((iVar11 >> 3)) <= GHIDRA_UINT(fVar10)) break; + ((KAGE::Input::Manager *)((Manager *)&PTR_vftable_00c57b18))->KAGE::Input::Manager::get_device(&inputDevice,GHIDRA_UINT(fVar10)); local_8 = 1; if (inputDevice == (int *)0x0) { local_8 = 2; @@ -1787,7 +1787,7 @@ void PlayerManager::handle_coop_join() cVar2 = (**(code **)(*inputDeviceRef + 0xc))(); if ((cVar2 == '\0') || (g_inputDeviceRelease == (void *)0x0)) goto LAB_009bb25d; (*g_inputDeviceRelease)(&inputDevice); - fVar10 = (float)((int)fVar10 + 1); + fVar10 = (float)(GHIDRA_INT(fVar10) + 1); } else { local_1c = inputDevice[3]; @@ -1795,19 +1795,19 @@ void PlayerManager::handle_coop_join() bVar12 = false; local_14 = (Entity_Player *)0x0; iVar11 = local_1c; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { pvVar6 = (this->_playerList)._end; piVar9 = (this->_playerList)._begin; do { - if ((int)pvVar6 - (int)piVar9 >> 2 == 0) { + if (GHIDRA_INT(pvVar6) - GHIDRA_INT(piVar9) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar6 = (this->_playerList)._end; piVar9 = (this->_playerList)._begin; } this = local_20; - pEVar7 = (Entity_Player *)((int)pvVar6 - (int)piVar9 >> 2); - playerEntry = piVar9 + (int)local_14; + pEVar7 = (Entity_Player *)(GHIDRA_INT(pvVar6) - GHIDRA_INT(piVar9) >> 2); + playerEntry = piVar9 + GHIDRA_INT(local_14); if (pEVar7 <= local_14) { playerEntry = piVar9; } @@ -1819,8 +1819,8 @@ void PlayerManager::handle_coop_join() pvVar6 = (this->_playerList)._end; piVar9 = (this->_playerList)._begin; } - playerEntry = piVar9 + (int)local_14; - if ((Entity_Player *)((int)pvVar6 - (int)piVar9 >> 2) <= local_14) { + playerEntry = piVar9 + GHIDRA_INT(local_14); + if ((Entity_Player *)(GHIDRA_INT(pvVar6) - GHIDRA_INT(piVar9) >> 2) <= local_14) { playerEntry = piVar9; } local_24 = (Entity_Player *)*playerEntry; @@ -1828,12 +1828,12 @@ void PlayerManager::handle_coop_join() local_14 = (Entity_Player *)&(*(undefined1 *)((char *)(local_14) + 0x1)); } while (local_14 < (undefined1 *) - ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2)); iVar11 = local_1c; } piVar9 = (this->_extraPlayers)._begin; - iVar8 = (int)(this->_extraPlayers)._end - (int)piVar9 >> 2; + iVar8 = GHIDRA_INT((this->_extraPlayers)._end) - GHIDRA_INT(piVar9) >> 2; if (iVar8 != 0) { do { extraPlayer = *piVar9; @@ -1862,20 +1862,20 @@ LAB_009bae76: cVar2 = extraout_DL; if (bVar3 != 0) { piVar9 = (this->_playerList)._begin; - if ((int)(this->_playerList)._end - (int)piVar9 >> 2 == 0) { + if (GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT(piVar9) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); piVar9 = (this->_playerList)._begin; cVar2 = (char)local_1c; } - if ((uint)(*(int *)(*piVar9 + 0x134c) + *(int *)(*piVar9 + 0x1344)) < 3) { + if (GHIDRA_UINT((*(int *)(*piVar9 + 0x134c) + *(int *)(*piVar9 + 0x1344))) < 3) { cVar2 = '\0'; } } pEVar7 = local_24; if ((g_game->_dailyChallenge)._id == 0) { if ((cVar2 == '\0') || - (0x3f < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2))) { + (0x3f < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2)))) { if (bVar12) goto LAB_009bb10b; } else if (bVar12) { @@ -1897,7 +1897,7 @@ LAB_009bb10b: bVar12 = bVar3 < (byte)*appearText; if (bVar3 != *appearText) { LAB_009bb198: - uVar5 = -(uint)bVar12 | 1; + uVar5 = -GHIDRA_UINT(bVar12) | 1; goto LAB_009bb19d; } if (bVar3 == 0) break; @@ -1912,7 +1912,7 @@ LAB_009bb19d: if (uVar5 == 0) goto LAB_009bb22f; } piVar9 = (this->_playerList)._begin; - if ((int)(this->_playerList)._end - (int)piVar9 >> 2 == 0) { + if (GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT(piVar9) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *) "((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); piVar9 = (this->_playerList)._begin; @@ -1995,7 +1995,7 @@ LAB_009bb22f: } fVar10 = local_18; LAB_009bb25d: - fVar10 = (float)((int)fVar10 + 1); + fVar10 = (float)(GHIDRA_INT(fVar10) + 1); } } local_20 = (PlayerManager *)&DAT_00000004; @@ -2029,7 +2029,7 @@ LAB_009bb25d: coopSlot->_coopSlots[0]._isPlayerTypeForced = 0; if (iVar11 == -1) { pvVar6 = (this->_coopPlayerTypes)._begin; - uVar4 = ((int)(this->_coopPlayerTypes)._end - (int)pvVar6 >> 2) - 1; + uVar4 = (GHIDRA_INT((this->_coopPlayerTypes)._end) - GHIDRA_INT(pvVar6) >> 2) - 1; if (uVar4 == 0) { uVar5 = 0; } @@ -2045,7 +2045,7 @@ LAB_009bb25d: (local_14,coopSlot->_coopSlots[0]._controllerIndex,1); game = g_game; playerEntry = (g_game->_playerManager)._playerList._begin; - if ((int)(g_game->_playerManager)._playerList._end - (int)playerEntry >> 2 == 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT(playerEntry) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *) "((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerEntry = (game->_playerManager)._playerList._begin; @@ -2053,7 +2053,7 @@ LAB_009bb25d: local_28 = *(float *)(*playerEntry + 0x33c); local_18 = *(float *)(*playerEntry + 0x340); uVar4 = Random(); - fVar10 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) + fVar10 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_24 = (Entity_Player *)(fVar10 + fVar10); fVar10 = cos((float)local_24); @@ -2081,7 +2081,7 @@ LAB_009bb25d: iVar11 = *piVar9 + 1; *piVar9 = iVar11; pvVar6 = (this->_coopPlayerTypes)._begin; - if ((int)(this->_coopPlayerTypes)._end - (int)pvVar6 >> 2 <= iVar11) { + if (GHIDRA_INT((this->_coopPlayerTypes)._end) - GHIDRA_INT(pvVar6) >> 2 <= iVar11) { *piVar9 = 0; iVar11 = 0; pvVar6 = (this->_coopPlayerTypes)._begin; @@ -2093,17 +2093,17 @@ LAB_009bb25d: iVar11 = *piVar9 + -1; *piVar9 = iVar11; if (iVar11 < 0) { - iVar11 = ((int)(this->_coopPlayerTypes)._end - (int)(this->_coopPlayerTypes)._begin >> + iVar11 = (GHIDRA_INT((this->_coopPlayerTypes)._end) - GHIDRA_INT((this->_coopPlayerTypes)._begin) >> 2) + -1; *piVar9 = iVar11; } local_24 = (Entity_Player *)0xc2; - iVar11 = *(int *)((int)(this->_coopPlayerTypes)._begin + iVar11 * 4); + iVar11 = *(int *)(GHIDRA_INT((this->_coopPlayerTypes)._begin) + iVar11 * 4); } pMVar1 = g_manager; coopSlot->_coopSlots[0]._playerType = iVar11; seed_fart_sound_override((int *)&local_24); - ((SoundEffects *)(&pMVar1->_sfxManager))->SoundEffects::Play((int)local_24,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&pMVar1->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_24),1.0,2,0,1.0,0.0); } else { LAB_009bb561: @@ -2111,18 +2111,18 @@ LAB_009bb561: } } LAB_009bb567: - local_20 = (PlayerManager *)((int)&local_20[-1]._extraPlayers._capacity + 3); + local_20 = (PlayerManager *)(GHIDRA_INT(&local_20[-1]._extraPlayers._capacity) + 3); coopSlot = (PlayerManager *)piVar9; } while (local_20 != (PlayerManager *)0x0); } uVar4 = 0; - if ((int)(this->_extraPlayers)._end - (int)(this->_extraPlayers)._begin >> 2 != 0) { + if (GHIDRA_INT((this->_extraPlayers)._end) - GHIDRA_INT((this->_extraPlayers)._begin) >> 2 != 0) { do { Entity_Player::cycle_spectate_target - (*(Entity_Player **)((int)(this->_extraPlayers)._begin + uVar4 * 4)); + (*(Entity_Player **)(GHIDRA_INT((this->_extraPlayers)._begin) + uVar4 * 4)); uVar4 = uVar4 + 1; - } while (uVar4 < (uint)((int)(this->_extraPlayers)._end - (int)(this->_extraPlayers)._begin >> 2 - )); + } while (uVar4 < GHIDRA_UINT((GHIDRA_INT((this->_extraPlayers)._end) - GHIDRA_INT((this->_extraPlayers)._begin) >> 2 + ))); } ExceptionList = local_10; return; @@ -2152,17 +2152,17 @@ void PlayerManager::Update() if ((*(int *)&g_game->_roomTransition == 0) && (*(int *)&g_game->_stageTransition == 0)) { playerManager = &g_game->_playerManager; i = 0; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { playersEnd = (playerManager->_playerList)._end; - if ((int)playersEnd - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(playersEnd) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playersEnd = (playerManager->_playerList)._end; game = g_game; } playerSlot = (playerManager->_playerList)._begin; - if (i < (uint)((int)playersEnd - (int)playerSlot >> 2)) { + if (i < GHIDRA_UINT((GHIDRA_INT(playersEnd) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + i; } player = (Entity_Player *)*playerSlot; @@ -2176,26 +2176,26 @@ void PlayerManager::Update() } playerManager = &game->_playerManager; i = i + 1; - } while (i < (uint)((int)(game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (i < GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } playerManager = &game->_playerManager; maxVolume = 0.0; i = 0; savedMaxVolume = 0.0; - if ((int)(game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> 2 + if (GHIDRA_INT((game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { playersEnd = (playerManager->_playerList)._end; - if ((int)playersEnd - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(playersEnd) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playersEnd = (playerManager->_playerList)._end; game = g_game; maxVolume = savedMaxVolume; } volumePlayerSlot = (playerManager->_playerList)._begin; - if (i < (uint)((int)playersEnd - (int)volumePlayerSlot >> 2)) { + if (i < GHIDRA_UINT((GHIDRA_INT(playersEnd) - GHIDRA_INT(volumePlayerSlot) >> 2))) { volumePlayerSlot = volumePlayerSlot + i; } volumePlayer = *volumePlayerSlot; @@ -2215,8 +2215,8 @@ void PlayerManager::Update() } playerManager = &game->_playerManager; i = i + 1; - } while (i < (uint)((int)(game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (i < GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } sfx = &g_manager->_sfxManager; if (0.01 < maxVolume) { @@ -2261,45 +2261,45 @@ void PlayerManager::trigger_room_clear() playerListEnd = (this->_playerList)._end; uVar2 = 0; playerSlot = (this->_playerList)._begin; - if ((int)playerListEnd - (int)playerSlot >> 2 != 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerSlot) >> 2 != 0) { do { - if ((int)playerListEnd - (int)playerSlot >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerSlot) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (this->_playerList)._end; playerSlot = (this->_playerList)._begin; } - if (uVar2 < (uint)((int)playerListEnd - (int)playerSlot >> 2)) { + if (uVar2 < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + uVar2; } ((Entity_Player *)((Entity_Player *)*playerSlot))->Entity_Player::TriggerRoomClear(); playerListEnd = (this->_playerList)._end; uVar2 = uVar2 + 1; playerSlot = (this->_playerList)._begin; - } while (uVar2 < (uint)((int)playerListEnd - (int)playerSlot >> 2)); + } while (uVar2 < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(playerSlot) >> 2))); } - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&familiars,3,-1,-1,1,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&familiars,3,-1,-1,1,0); local_8 = 0; uVar2 = 0; if (familiars._size != 0) { do { ((Entity_Familiar *)(*(Entity_Familiar **)((char *)familiars._data + uVar2 * 4)))->Entity_Familiar::TriggerRoomClear(); uVar2 = uVar2 + 1; - } while (uVar2 < (uint)familiars._size); + } while (uVar2 < GHIDRA_UINT(familiars._size)); } - if (familiars._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(familiars) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (familiars._data != (void *)0x0) { uVar2 = *(uint *)((char *)familiars._data + -4); qVar1 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar1 < uVar2); - free((void *)((int)familiars._data + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar2)); + free((void *)(GHIDRA_INT(familiars._data) + -4)); } } ExceptionList = local_10; @@ -2317,21 +2317,21 @@ void PlayerManager::trigger_level_start() i = 0; playersEnd = (this->_playerList)._end; playerEntry = (this->_playerList)._begin; - if ((int)playersEnd - (int)playerEntry >> 2 != 0) { + if (GHIDRA_INT(playersEnd) - GHIDRA_INT(playerEntry) >> 2 != 0) { do { - if ((int)playersEnd - (int)playerEntry >> 2 == 0) { + if (GHIDRA_INT(playersEnd) - GHIDRA_INT(playerEntry) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playersEnd = (this->_playerList)._end; playerEntry = (this->_playerList)._begin; } - if (i < (uint)((int)playersEnd - (int)playerEntry >> 2)) { + if (i < GHIDRA_UINT((GHIDRA_INT(playersEnd) - GHIDRA_INT(playerEntry) >> 2))) { playerEntry = playerEntry + i; } ((Entity_Player *)((Entity_Player *)*playerEntry))->Entity_Player::level_start(0); playersEnd = (this->_playerList)._end; i = i + 1; playerEntry = (this->_playerList)._begin; - } while (i < (uint)((int)playersEnd - (int)playerEntry >> 2)); + } while (i < GHIDRA_UINT((GHIDRA_INT(playersEnd) - GHIDRA_INT(playerEntry) >> 2))); } i = 0; playersEnd = g_game->_room; @@ -2386,7 +2386,7 @@ void PlayerManager::enter_level() local_8 = 0xffffffff; puStack_c = &LAB_00b0e9a5; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&preloadGroupName)[1]._size; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&preloadGroupName)[1]._size); ExceptionList = &local_10; if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < DAT_00c9435c) && (_Init_thread_header(&DAT_00c9435c,local_14), DAT_00c9435c == -1)) { @@ -2401,15 +2401,15 @@ void PlayerManager::enter_level() pvVar4 = (this->_playerList)._end; piVar7 = (this->_playerList)._begin; local_30 = (void *)0x0; - if ((int)pvVar4 - (int)piVar7 >> 2 != 0) { + if (GHIDRA_INT(pvVar4) - GHIDRA_INT(piVar7) >> 2 != 0) { do { - if ((int)pvVar4 - (int)piVar7 >> 2 == 0) { + if (GHIDRA_INT(pvVar4) - GHIDRA_INT(piVar7) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar4 = (this->_playerList)._end; piVar7 = (this->_playerList)._begin; } - if (local_30 < (uint)((int)pvVar4 - (int)piVar7 >> 2)) { - piVar7 = piVar7 + (int)local_30; + if (local_30 < GHIDRA_UINT((GHIDRA_INT(pvVar4) - GHIDRA_INT(piVar7) >> 2))) { + piVar7 = piVar7 + GHIDRA_INT(local_30); } pEVar6 = (Entity_Player *)*piVar7; offsetX = (pEVar6->_pos).x - (leadPlayer->_pos).x; @@ -2417,7 +2417,7 @@ void PlayerManager::enter_level() if (((offsetX == g_vectorZero.x) && ((float)local_44 == g_vectorZero.y)) && (pEVar6 != leadPlayer)) { uVar1 = Random(); - local_40 = (float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) * + local_40 = (float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_40 = local_40 + local_40; local_38.y = sin(local_40); @@ -2434,41 +2434,41 @@ void PlayerManager::enter_level() DAT_00c94364 = DAT_00c94364 + 2; } pvVar4 = (this->_playerList)._end; - local_30 = (void *)((int)local_30 + 1); + local_30 = (void *)(GHIDRA_INT(local_30) + 1); piVar7 = (this->_playerList)._begin; - } while (local_30 < (uint)((int)pvVar4 - (int)piVar7 >> 2)); + } while (local_30 < GHIDRA_UINT((GHIDRA_INT(pvVar4) - GHIDRA_INT(piVar7) >> 2))); } - local_30 = (void *)((uint)local_30 & 0xffffff00); + local_30 = (void *)(GHIDRA_UINT(local_30) & 0xffffff00); pEVar6 = (Entity_Player *)0x0; - if ((int)pvVar4 - (int)piVar7 >> 2 != 0) { + if (GHIDRA_INT(pvVar4) - GHIDRA_INT(piVar7) >> 2 != 0) { do { - if ((int)pvVar4 - (int)piVar7 >> 2 == 0) { + if (GHIDRA_INT(pvVar4) - GHIDRA_INT(piVar7) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar4 = (this->_playerList)._end; piVar7 = (this->_playerList)._begin; } - if (pEVar6 < (Entity_Player *)((int)pvVar4 - (int)piVar7 >> 2)) { - piVar7 = piVar7 + (int)pEVar6; + if (pEVar6 < (Entity_Player *)(GHIDRA_INT(pvVar4) - GHIDRA_INT(piVar7) >> 2)) { + piVar7 = piVar7 + GHIDRA_INT(pEVar6); } ((Entity_Player *)((Entity_Player *)*piVar7))->Entity_Player::room_enter(); pvVar4 = (this->_playerList)._end; piVar7 = (this->_playerList)._begin; - if ((int)pvVar4 - (int)piVar7 >> 2 == 0) { + if (GHIDRA_INT(pvVar4) - GHIDRA_INT(piVar7) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar4 = (this->_playerList)._end; piVar7 = (this->_playerList)._begin; } - local_38.y = (float)((int)pvVar4 - (int)piVar7 >> 2); - piVar2 = piVar7 + (int)pEVar6; - if ((uint)local_38.y <= pEVar6) { + local_38.y = (float)(GHIDRA_INT(pvVar4) - GHIDRA_INT(piVar7) >> 2); + piVar2 = piVar7 + GHIDRA_INT(pEVar6); + if (GHIDRA_UINT(local_38.y) <= pEVar6) { piVar2 = piVar7; } - local_30 = (void *)((uint)local_30 & 0xff); + local_30 = (void *)(GHIDRA_UINT(local_30) & 0xff); if (*(char *)(*piVar2 + 0x13f1) != '\0') { local_30 = (void *)0x1; } pEVar6 = (Entity_Player *)&(*(undefined1 *)((char *)(pEVar6) + 0x1)); - } while (pEVar6 < (uint)local_38.y); + } while (pEVar6 < GHIDRA_UINT(local_38.y)); if ((char)local_30 != '\0') { preloadGroupName._capacity = 0xf; preloadGroupName._size = 0xc; @@ -2485,14 +2485,14 @@ void PlayerManager::enter_level() local_8 = 1; std::map::_Find_lower_bound(local_4c,&preloadGroupName); pEVar6 = local_44; - if (*(char *)((int)&(local_44->_damageEvents)._end + 1) == '\0') { + if (*(char *)(GHIDRA_INT(&(local_44->_damageEvents)._end) + 1) == '\0') { b = &(local_44->_damageEvents)._capacity; - if (0xf < (uint)local_44->_collisionIndex) { + if (0xf < GHIDRA_UINT(local_44->_collisionIndex)) { b = *b; } a = &preloadGroupName; if (0xf < preloadGroupName._capacity) { - a = (std_string *)preloadGroupName._buf._0_4_; + a = (*(undefined4 *)((char *)&((std_string *)preloadGroupName._buf) + 0x0)); } iVar3 = string_compare((byte *)a,0xc,(byte *)b,local_44->_index); if (((-1 < iVar3) && (pEVar6 != *(Entity_Player **)local_38.y)) && ((char)pEVar6->_type != '\0') @@ -2513,16 +2513,16 @@ LAB_009bbdab: uVar1 = 0; pvVar4 = (this->_playerList)._end; playerSlot = (this->_playerList)._begin; - if ((int)pvVar4 - (int)playerSlot >> 2 != 0) { + if (GHIDRA_INT(pvVar4) - GHIDRA_INT(playerSlot) >> 2 != 0) { do { local_30 = pvVar4; - if ((int)pvVar4 - (int)playerSlot >> 2 == 0) { + if (GHIDRA_INT(pvVar4) - GHIDRA_INT(playerSlot) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); local_30 = (this->_playerList)._end; playerSlot = (this->_playerList)._begin; } playerSlot = playerSlot + uVar1; - if ((uint)((int)local_30 - (int)playerSlot >> 2) <= uVar1) { + if (GHIDRA_UINT((GHIDRA_INT(local_30) - GHIDRA_INT(playerSlot) >> 2)) <= uVar1) { playerSlot = playerSlot; } pEVar6 = (Entity_Player *)*playerSlot; @@ -2548,7 +2548,7 @@ LAB_009bbdab: playerSlot = (this->_playerList)._begin; } uVar1 = uVar1 + 1; - } while (uVar1 < (uint)((int)pvVar4 - (int)playerSlot >> 2)); + } while (uVar1 < GHIDRA_UINT((GHIDRA_INT(pvVar4) - GHIDRA_INT(playerSlot) >> 2))); } entityIndex = 0; pvVar4 = g_game->_room; @@ -2614,50 +2614,50 @@ void PlayerManager::trigger_new_room_effects() local_8 = 0xffffffff; puStack_c = &LAB_00b0e96d; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; playersEnd = (this->_playerList)._end; index = 0; playerIt = (this->_playerList)._begin; - if ((int)playersEnd - (int)playerIt >> 2 != 0) { + if (GHIDRA_INT(playersEnd) - GHIDRA_INT(playerIt) >> 2 != 0) { do { - if ((int)playersEnd - (int)playerIt >> 2 == 0) { + if (GHIDRA_INT(playersEnd) - GHIDRA_INT(playerIt) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playersEnd = (this->_playerList)._end; playerIt = (this->_playerList)._begin; } - if (index < (uint)((int)playersEnd - (int)playerIt >> 2)) { + if (index < GHIDRA_UINT((GHIDRA_INT(playersEnd) - GHIDRA_INT(playerIt) >> 2))) { playerIt = playerIt + index; } ((Entity_Player *)((Entity_Player *)*playerIt))->Entity_Player::TriggerNewRoom_TemporaryEffects(); playersEnd = (this->_playerList)._end; index = index + 1; playerIt = (this->_playerList)._begin; - } while (index < (uint)((int)playersEnd - (int)playerIt >> 2)); + } while (index < GHIDRA_UINT((GHIDRA_INT(playersEnd) - GHIDRA_INT(playerIt) >> 2))); } - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&familiars,3,-1,-1,1,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&familiars,3,-1,-1,1,0); local_8 = 0; index = 0; if (familiars._size != 0) { do { FUN_0062c8a0(uVar1); index = index + 1; - } while (index < (uint)familiars._size); + } while (index < GHIDRA_UINT(familiars._size)); } - if (familiars._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(familiars) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (familiars._data != (void *)0x0) { uVar1 = *(uint *)((char *)familiars._data + -4); oldAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar1; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar1; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)oldAllocatedBytes < uVar1); - free((void *)((int)familiars._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocatedBytes) < uVar1)); + free((void *)(GHIDRA_INT(familiars._data) + -4)); } } ExceptionList = local_10; @@ -2681,8 +2681,8 @@ void PlayerManager::trigger_coop_baby_death(Entity_Player *deadPlayer) *(Entity_Player **)&(*(undefined1 *)((char *)(persistentData) + 0x7c)) = deadPlayer; ((PersistentGameData *)(persistentData))->PersistentGameData::IncreaseEventCounter(10,1); ((Music *)((Music *)&g_manager->_musicManager))->Music::Play(0x5d,(g_manager->_optionsConfig)._musicVolume); - if (8 < ((int)(g_manager->_musicManager)._entries._end - - (int)(g_manager->_musicManager)._entries._begin) / 0x60) { + if (8 < (GHIDRA_INT((g_manager->_musicManager)._entries._end) - + GHIDRA_INT((g_manager->_musicManager)._entries._begin)) / 0x60) { (g_manager->_musicManager)._queuedMusicID = 8; } ((Game *)(g_game))->Game::End(1); @@ -2694,7 +2694,7 @@ void PlayerManager::trigger_coop_baby_death(Entity_Player *deadPlayer) } slot = 1; playerList = (persistentData->_playerList)._begin; - if (1 < (uint)((int)(persistentData->_playerList)._end - (int)playerList >> 2)) { + if (1 < GHIDRA_UINT((GHIDRA_INT((persistentData->_playerList)._end) - GHIDRA_INT(playerList) >> 2))) { do { player = *(Entity_Player **)((char *)playerList + slot * 4); if ((player == deadPlayer) && (RemoveCoPlayer(persistentData,player,(byte)playerList), isSpawnPoof)) { @@ -2705,7 +2705,7 @@ void PlayerManager::trigger_coop_baby_death(Entity_Player *deadPlayer) } slot = slot + 1; playerList = (persistentData->_playerList)._begin; - } while (slot < (uint)((int)(persistentData->_playerList)._end - (int)playerList >> 2)); + } while (slot < GHIDRA_UINT((GHIDRA_INT((persistentData->_playerList)._end) - GHIDRA_INT(playerList) >> 2))); } return; } @@ -2755,7 +2755,7 @@ Vector * PlayerManager::find_safe_spawn_position(Vector *outPosition, Vector pos local_24 = g_game->_room; if (*(int *)((char *)local_24 + 0x1264) != 0) { do { - iVar5 = *(int *)(*(int *)((char *)local_24 + 0x125c) + (int)local_18 * 4); + iVar5 = *(int *)(*(int *)((char *)local_24 + 0x125c) + GHIDRA_INT(local_18) * 4); if ((((1 < *(int *)&g_game->_deathmatchManager) && (*(int *)(iVar5 + 0x28) == 1)) || (*(int *)(iVar5 + 0x28) - 10U < 0x3de)) || (*(int *)(iVar5 + 0x28) == 9)) { local_34.x = *(float *)(iVar5 + 0x33c); @@ -2781,18 +2781,18 @@ Vector * PlayerManager::find_safe_spawn_position(Vector *outPosition, Vector pos pointsEnd = pfVar6; } } - local_18 = (float)((int)local_18 + 1); - } while ((uint)local_18 < (uint)*(float *)((char *)local_24 + 0x1264)); + local_18 = (float)(GHIDRA_INT(local_18) + 1); + } while (GHIDRA_UINT(local_18) < GHIDRA_UINT(*(float *)((char *)local_24 + 0x1264))); } local_1c = 0; - pointCount = (int)pfVar6 >> 3; + pointCount = GHIDRA_INT(pfVar6) >> 3; local_24 = (void *)0x0; do { pvVar3 = local_24; uVar4 = Random(); - local_28 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + local_28 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 3.14; - local_18 = (float)(int)pvVar3 + 30.0; + local_18 = (float)GHIDRA_INT(pvVar3) + 30.0; local_28 = local_28 + local_28; fVar7 = cos(local_28); local_34.x = fVar7 * local_18 + position.x; @@ -2857,7 +2857,7 @@ LAB_009bc5d1: outPosition->y = candidateY; bestDistSq = minDistSq; } - } while ((bestDistSq <= 14400.0) && (local_24 = (void *)((int)local_24 + 3), (int)local_24 < 0x96) + } while ((bestDistSq <= 14400.0) && (local_24 = (void *)(GHIDRA_INT(local_24) + 3), GHIDRA_INT(local_24) < 0x96) ); ExceptionList = local_10; return outPosition; @@ -2908,13 +2908,13 @@ int * PlayerManager::match_saved_players(int *param_1, int param_2, char param_3 std::_Xlen(); } pvVar1 = std::_Allocate(spawnedPlayer * 4); - *param_1 = (int)pvVar1; - param_1[1] = (int)pvVar1; - param_1[2] = (int)((int)pvVar1 + spawnedPlayer * 4); + *param_1 = GHIDRA_INT(pvVar1); + param_1[1] = GHIDRA_INT(pvVar1); + param_1[2] = GHIDRA_INT((GHIDRA_INT(pvVar1) + spawnedPlayer * 4)); tmpNode = (undefined4 *)*param_1; if ((local_1c == 0) || - (((((char)local_1c == '\0' && (local_1c._1_1_ == '\0')) && (local_1c._2_1_ == '\0')) && - (local_1c._3_1_ == '\0')))) { + (((((char)local_1c == '\0' && ((*(undefined1 *)((char *)&(local_1c) + 0x1)) == '\0')) && ((*(undefined1 *)((char *)&(local_1c) + 0x2)) == '\0')) && + ((*(undefined1 *)((char *)&(local_1c) + 0x3)) == '\0')))) { isFillByLoop = false; } else { @@ -2930,21 +2930,21 @@ int * PlayerManager::match_saved_players(int *param_1, int param_2, char param_3 else { memset(tmpNode,0,spawnedPlayer * 4); } - param_1[1] = (int)local_20; + param_1[1] = GHIDRA_INT(local_20); } local_8 = 0; local_28 = 1; unmatchedPlayers = (int *)0x0; unmatchedCount = 0; piVar2 = operator_new(0xc); - *piVar2 = (int)piVar2; - piVar2[1] = (int)piVar2; + *piVar2 = GHIDRA_INT(piVar2); + piVar2[1] = GHIDRA_INT(piVar2); spawnedPlayer = 0; local_8 = 1; pvVar1 = (self->_playerList)._begin; manager = self; unmatchedPlayers = piVar2; - if ((int)(self->_playerList)._end - (int)pvVar1 >> 2 != 0) { + if (GHIDRA_INT((self->_playerList)._end) - GHIDRA_INT(pvVar1) >> 2 != 0) { do { if (*(int *)(*(int *)((char *)pvVar1 + spawnedPlayer * 4) + 0x2c) == 0) { if (unmatchedCount == 0x15555555) { @@ -2952,24 +2952,24 @@ int * PlayerManager::match_saved_players(int *param_1, int param_2, char param_3 std::_Xlength_error("list too long"); } local_24 = &unmatchedPlayers; - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; local_20 = (undefined4 *)0x0; tmpNode = operator_new(0xc); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); local_20 = (undefined4 *)0x0; tmpNode[2] = *(undefined4 *)((char *)pvVar1 + spawnedPlayer * 4); unmatchedCount = unmatchedCount + 1; tmpNode = (undefined4 *)piVar2[1]; *tmpNode = piVar2; tmpNode[1] = tmpNode; - piVar2[1] = (int)tmpNode; + piVar2[1] = GHIDRA_INT(tmpNode); *tmpNode = tmpNode; manager = self; piVar2 = unmatchedPlayers; } spawnedPlayer = spawnedPlayer + 1; pvVar1 = (manager->_playerList)._begin; - } while (spawnedPlayer < (uint)((int)(manager->_playerList)._end - (int)pvVar1 >> 2)); + } while (spawnedPlayer < GHIDRA_UINT((GHIDRA_INT((manager->_playerList)._end) - GHIDRA_INT(pvVar1) >> 2))); } iVar4 = 0; iVar3 = *(int *)(param_2 + 0x19d78); @@ -3069,7 +3069,7 @@ void PlayerManager::RestoreGameState(GameState *state) local_8 = 0xffffffff; puStack_c = &LAB_00b0ea81; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(matchedPlayers + 0xc); + uVar1 = __security_cookie ^ GHIDRA_UINT((matchedPlayers + 0xc)); ExceptionList = &local_10; playerManager = this; match_saved_players(matchedPlayers,state,1); @@ -3102,7 +3102,7 @@ void PlayerManager::RestoreGameState(GameState *state) do { iVar5 = playerIndex; if (savedPlayer[0x14a] == (GameStatePlayer)0x0) { - if ((int)savedPlayer[0x14b] < 0) { + if (GHIDRA_INT(savedPlayer[0x14b]) < 0) { iVar4 = *(int *)(iVar2 + playerIndex * 4); if (iVar4 != 0) { switch(*(undefined4 *)(iVar4 + 0x13c0)) { @@ -3160,7 +3160,7 @@ void PlayerManager::RestoreGameState(GameState *state) } } else { - parentPlayer = *(GameStatePlayer *)(iVar2 + (int)savedPlayer[0x14b] * 4); + parentPlayer = *(GameStatePlayer *)(iVar2 + GHIDRA_INT(savedPlayer[0x14b]) * 4); if (parentPlayer != (GameStatePlayer)0x0) { iVar3 = *(int *)(iVar2 + playerIndex * 4); pGVar6 = (GameStatePlayer *)(iVar3 + 0x3bc); @@ -3176,12 +3176,12 @@ void PlayerManager::RestoreGameState(GameState *state) switchD_009bcd23_caseD_14: } else { - iVar3 = (int)savedPlayer[0x14a] + playerIndex; + iVar3 = GHIDRA_INT(savedPlayer[0x14a]) + playerIndex; iVar4 = *(int *)(iVar2 + iVar3 * 4); if (iVar4 != 0) { if (*(int *)(iVar4 + 0x1e6c) == 0) { newPlayer = operator_new(0x2f00); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; if (newPlayer == (Entity_Player *)0x0) { constructedSubPlayer = 0; } @@ -3189,7 +3189,7 @@ switchD_009bcd23_caseD_14: ((Entity_Player *)(newPlayer))->Entity_Player::constructor(); constructedSubPlayer = extraout_EAX; } - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; *(undefined4 *)(*(int *)(matchedPlayers[0] + iVar3 * 4) + 0x1e6c) = constructedSubPlayer ; iVar2 = *(int *)(matchedPlayers[0] + iVar3 * 4); @@ -3234,7 +3234,7 @@ switchD_009bcd23_caseD_14: } if (*pGVar6 != (GameStatePlayer)0xffffffff) { newPlayer = operator_new(0x2f00); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; if (newPlayer == (Entity_Player *)0x0) { backupPlayer = (int *)0x0; } @@ -3242,8 +3242,8 @@ switchD_009bcd23_caseD_14: ((Entity_Player *)(newPlayer))->Entity_Player::constructor(); backupPlayer = extraout_EAX_00; } - local_8 = (uint)local_8._1_3_ << 8; - *piVar7 = (int)backupPlayer; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; + *piVar7 = GHIDRA_INT(backupPlayer); initFn = *(code **)(*backupPlayer + 4); seed = Random(); (*initFn)(1,0,0,seed); @@ -3315,7 +3315,7 @@ void PlayerManager::RestoreGameState_PostLevelInit(GameState *state) ((Entity_Player *)(this_00))->Entity_Player::spawn_dark_esau(gameStatePlayer); } savedIdx = savedIdx + 1; - gameStatePlayer = (void *)((int)gameStatePlayer + 0x5dc); + gameStatePlayer = (void *)(GHIDRA_INT(gameStatePlayer) + 0x5dc); } while (savedIdx < *(int *)&(*(undefined1 *)((char *)(state) + 0x19d78))); this = self; } @@ -3361,11 +3361,11 @@ void PlayerManager::store_game_state(GameState *state) *(undefined4 *)&(*(undefined1 *)((char *)(state) + 0x19d78)) = 0; local_10 = (this->_playerList)._end; oldPlayersBegin = (this->_playerList)._begin; - if ((int)local_10 - (int)oldPlayersBegin >> 2 != 0) { + if (GHIDRA_INT(local_10) - GHIDRA_INT(oldPlayersBegin) >> 2 != 0) { do { playerOffset = playerIdx * 4; playersBegin = oldPlayersBegin; - if ((*(Entity_Player **)(playerOffset + (int)oldPlayersBegin))->_variant == 0) { + if ((*(Entity_Player **)(playerOffset + GHIDRA_INT(oldPlayersBegin)))->_variant == 0) { storedCount = *(uint *)&(*(undefined1 *)((char *)(state) + 0x19d78)); if (7 < storedCount) { LAB_009bd2e7: @@ -3373,18 +3373,18 @@ LAB_009bd2e7: break; } if (g_game->_isStoringGlowingHourglassState == 0) { - ((Entity_Player *)(*(Entity_Player **)(playerOffset + (int)oldPlayersBegin)))->Entity_Player::room_exit(1); + ((Entity_Player *)(*(Entity_Player **)(playerOffset + GHIDRA_INT(oldPlayersBegin))))->Entity_Player::room_exit(1); playersBegin = (this->_playerList)._begin; - if ((uint)((int)(this->_playerList)._end - (int)playersBegin >> 2) < - (uint)((int)local_10 - (int)oldPlayersBegin >> 2)) { + if (GHIDRA_UINT((GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT(playersBegin) >> 2)) < + GHIDRA_UINT((GHIDRA_INT(local_10) - GHIDRA_INT(oldPlayersBegin) >> 2))) { playerIdx = playerIdx - 1; goto LAB_009bd2ca; } storedCount = *(uint *)&(*(undefined1 *)((char *)(state) + 0x19d78)); } - *(uint *)(*(int *)(playerOffset + (int)playersBegin) + 0x1620) = storedCount; + *(uint *)(*(int *)(playerOffset + GHIDRA_INT(playersBegin)) + 0x1620) = storedCount; Entity_Player::StoreGameState - (*(Entity_Player **)(playerOffset + (int)(this->_playerList)._begin), + (*(Entity_Player **)(playerOffset + GHIDRA_INT((this->_playerList)._begin)), (GameStatePlayer *) (&(*(undefined1 *)((char *)(state) + 0x19d7c)) + *(int *)&(*(undefined1 *)((char *)(state) + 0x19d78)) * 0x5dc),1); storedCount = *(int *)&(*(undefined1 *)((char *)(state) + 0x19d78)) + 1; @@ -3398,11 +3398,11 @@ LAB_009bd2e7: storedCount = *(uint *)&(*(undefined1 *)((char *)(state) + 0x19d78)); playersBegin = (this->_playerList)._begin; } - *(uint *)(*(int *)(*(int *)(playerOffset + (int)playersBegin) + 0x1e6c) + 0x1620) = + *(uint *)(*(int *)(*(int *)(playerOffset + GHIDRA_INT(playersBegin)) + 0x1e6c) + 0x1620) = storedCount; Entity_Player::StoreGameState (*(Entity_Player **) - (*(int *)(playerOffset + (int)(this->_playerList)._begin) + 0x1e6c), + (*(int *)(playerOffset + GHIDRA_INT((this->_playerList)._begin)) + 0x1e6c), (GameStatePlayer *) (&(*(undefined1 *)((char *)(state) + 0x19d7c)) + *(int *)&(*(undefined1 *)((char *)(state) + 0x19d78)) * 0x5dc),1); *(undefined4 *)(&(*(undefined1 *)((char *)(state) + 0x1a2a4)) + *(int *)&(*(undefined1 *)((char *)(state) + 0x19d78)) * 0x5dc) = @@ -3415,7 +3415,7 @@ LAB_009bd2ca: local_10 = (this->_playerList)._end; playerIdx = playerIdx + 1; oldPlayersBegin = playersBegin; - } while (playerIdx < (uint)((int)local_10 - (int)playersBegin >> 2)); + } while (playerIdx < GHIDRA_UINT((GHIDRA_INT(local_10) - GHIDRA_INT(playersBegin) >> 2))); } local_10 = (undefined4 *)&(*(undefined1 *)((char *)(this) + 0x80)); saveState = (GameStatePlayer *)&(*(undefined1 *)((char *)(state) + 0x1cc5c)); @@ -3496,7 +3496,7 @@ void PlayerManager::spawn_coop_baby_for_join(int unused, int controllerIndex) piVar8 = (familiar->_playerList)._begin; local_48 = familiar; puVar5 = local_64 + 0x60; - if ((int)(familiar->_playerList)._end - (int)piVar8 >> 2 == 0) { + if (GHIDRA_INT((familiar->_playerList)._end) - GHIDRA_INT(piVar8) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); piVar8 = (familiar->_playerList)._begin; puVar5 = puStack_20; @@ -3509,7 +3509,7 @@ void PlayerManager::spawn_coop_baby_for_join(int unused, int controllerIndex) if (local_4c->_maxHearts < iVar7) { iVar7 = local_4c->_maxHearts; } - if ((uint)((local_4c->_soulHearts + 1) / 2 + (iVar7 + 1) / 2 + local_4c->_boneHearts) < 2) { + if (GHIDRA_UINT(((local_4c->_soulHearts + 1) / 2 + (iVar7 + 1) / 2 + local_4c->_boneHearts)) < 2) { local_50 = (Entity_Player *)0x37; std::set::find_node(local_64,&local_50); if (*(char *)((char *)local_60.y + 0xd) != '\0') { @@ -3541,8 +3541,8 @@ void PlayerManager::spawn_coop_baby_for_join(int unused, int controllerIndex) local_40 = &(g_game->_seedEffects)._seedEffects; local_48 = (PlayerManager *)0x37; std::set::find_node(local_64,&local_48); - if (((*(char *)((int)&((std_vector *)((int)local_60.y + 8))->_end + 1) == '\0') && - ((int)((std_vector *)((int)local_60.y + 8))->_capacity < 0x38)) && + if (((*(char *)(GHIDRA_INT(&((std_vector *)(GHIDRA_INT(local_60.y) + 8))->_end) + 1) == '\0') && + (GHIDRA_INT(((std_vector *)(GHIDRA_INT(local_60.y) + 8))->_capacity) < 0x38)) && ((Entity_Familiar *)local_60.y != *local_40)) { ((Entity_Player *)(baby))->Entity_Player::AddMaxHearts(2,0); ((Entity_Player *)(baby))->Entity_Player::AddHearts(2,1,0); @@ -3555,7 +3555,7 @@ void PlayerManager::spawn_coop_baby_for_join(int unused, int controllerIndex) KAGE_LogMessage(1,(byte *)"Co-player wants %d HP\n"); local_48 = (PlayerManager *)firstPlayer->_soulHearts; boneHeartsLeft = firstPlayer->_boneHearts; - iStack_38 = (int)((int)&(local_48->_playerList)._begin + 1) / 2 + boneHeartsLeft; + iStack_38 = GHIDRA_INT((GHIDRA_INT(&(local_48->_playerList)._begin) + 1)) / 2 + boneHeartsLeft; redHeartsTaken = 0; local_40 = (void **)0x0; heartSlot = iStack_38 + -1; @@ -3569,27 +3569,27 @@ void PlayerManager::spawn_coop_baby_for_join(int unused, int controllerIndex) do { if (heartSlot < 0) { heartParity = uVar11 & 0x80000001; - if ((int)heartParity < 0) { + if (GHIDRA_INT(heartParity) < 0) { heartParity = (heartParity - 1 | 0xfffffffe) + 1; } iVar7 = 2 - heartParity; - if ((0 < takeCount) && ((int)uVar10 < iVar7)) break; + if ((0 < takeCount) && (GHIDRA_INT(uVar10) < iVar7)) break; redHeartsTaken = redHeartsTaken + iVar7; uVar11 = uVar11 - iVar7; - local_40 = (void **)((int)local_40 + 2); + local_40 = (void **)(GHIDRA_INT(local_40) + 2); uVar10 = uVar10 - iVar7; } else if (((boneHeartsLeft < 1) || (firstPlayer->_boneHearts < 1)) || ((firstPlayer->_boneHeartsMask & 1 << ((byte)heartSlot & 0x1f)) == 0)) { - heartParity = (uint)local_48 & 0x80000001; - if ((int)heartParity < 0) { + heartParity = GHIDRA_UINT(local_48) & 0x80000001; + if (GHIDRA_INT(heartParity) < 0) { heartParity = (heartParity - 1 | 0xfffffffe) + 1; } iVar7 = 2 - heartParity; - if ((0 < takeCount) && ((int)uVar10 < iVar7)) break; + if ((0 < takeCount) && (GHIDRA_INT(uVar10) < iVar7)) break; soulHeartsTaken = soulHeartsTaken + iVar7; uVar10 = uVar10 - iVar7; - local_48 = (PlayerManager *)((int)local_48 - iVar7); + local_48 = (PlayerManager *)(GHIDRA_INT(local_48) - iVar7); heartSlot = heartSlot + -1; } else { @@ -3597,26 +3597,26 @@ void PlayerManager::spawn_coop_baby_for_join(int unused, int controllerIndex) fStack_54 = (float)(((uVar11 - local_44) - firstPlayer->_maxHearts) + 2); local_60.y = 0.0; pfVar9 = &fStack_54; - if (1 < (int)fStack_54) { + if (1 < GHIDRA_INT(fStack_54)) { pfVar9 = &fStack_58; } pfVar6 = &local_60.y; - if (0 < (int)*pfVar9) { + if (0 < GHIDRA_INT(*pfVar9)) { pfVar6 = pfVar9; } fVar1 = *pfVar6; firstPlayer = local_4c; - if ((0 < takeCount) && ((int)uVar10 < (int)fVar1 + 1)) break; - redHeartsTaken = redHeartsTaken + (int)fVar1; + if ((0 < takeCount) && (GHIDRA_INT(uVar10) < GHIDRA_INT(fVar1) + 1)) break; + redHeartsTaken = redHeartsTaken + GHIDRA_INT(fVar1); boneHeartsTaken = boneHeartsTaken + 1; boneHeartsLeft = boneHeartsLeft + -1; - uVar11 = uVar11 - (int)fVar1; - uVar10 = uVar10 + (-1 - (int)fVar1); + uVar11 = uVar11 - GHIDRA_INT(fVar1); + uVar10 = uVar10 + (-1 - GHIDRA_INT(fVar1)); local_44 = local_44 - 2; heartSlot = heartSlot + -1; } takeCount = takeCount + 1; - } while (0 < (int)uVar10); + } while (0 < GHIDRA_INT(uVar10)); baby = local_50; } KAGE_LogMessage(1,(byte *)"Taking %d red HP, %d soul HP and %d bone HP\n"); @@ -3631,28 +3631,28 @@ void PlayerManager::spawn_coop_baby_for_join(int unused, int controllerIndex) uVar11 = baby->_soulHearts + 1; local_60.y = (float)(uVar11 & 0xfffffffe); puVar5 = &(*(undefined1 *)((char *)(((Entity_Familiar *)local_60.y)) + 0x1)); - if (((int)puVar5 <= firstPlayer->_soulHearts) && (0 < (int)puVar5)) { - uVar10 = (uint)puVar5 & 0x80000001; - if ((int)uVar10 < 0) { + if ((GHIDRA_INT(puVar5) <= firstPlayer->_soulHearts) && (0 < GHIDRA_INT(puVar5))) { + uVar10 = GHIDRA_UINT(puVar5) & 0x80000001; + if (GHIDRA_INT(uVar10) < 0) { uVar10 = (uVar10 - 1 | 0xfffffffe) + 1; } if ((uVar10 == 1) && (local_48 = (PlayerManager *)firstPlayer->_blackHearts, - ((uint)local_48 & 1 << ((byte)((int)local_60.y - ((int)uVar11 >> 0x1f) >> 1) & 0x1f)) + (GHIDRA_UINT(local_48) & 1 << ((byte)(GHIDRA_INT(local_60.y) - (GHIDRA_INT(uVar11) >> 0x1f) >> 1) & 0x1f)) != 0)) { firstPlayer->_blackHearts = - (uint)local_48 & - ~(1 << ((int)&(*(undefined1 *)((char *)(((Entity_Familiar *)local_60.y)) + 0x1)) / 2 & 0x1fU)); + GHIDRA_UINT(local_48) & + ~(1 << (GHIDRA_INT(&(*(undefined1 *)((char *)(((Entity_Familiar *)local_60.y)) + 0x1))) / 2 & 0x1fU)); if ((*(int *)&game->_deathmatchManager < 2) && ((firstPlayer->_dead == 0 && (0 < firstPlayer->_goldenHearts)))) { - local_60.y = (float)((*(int *)((int)(&firstPlayer->_headAnim + 1) + + local_60.y = (float)((*(int *)(GHIDRA_INT((&firstPlayer->_headAnim + 1)) + ((firstPlayer->_redHearts <= firstPlayer->_maxHearts) + 2) * 4) + 1) / 2 + (firstPlayer->_soulHearts + 1) / 2 + firstPlayer->_boneHearts); - if ((int)local_60.y < firstPlayer->_goldenHearts) { + if (GHIDRA_INT(local_60.y) < firstPlayer->_goldenHearts) { Entity_Player::BreakGoldenHearts - (firstPlayer,firstPlayer->_goldenHearts - (int)local_60.y); - firstPlayer->_goldenHearts = (int)local_60.y; + (firstPlayer,firstPlayer->_goldenHearts - GHIDRA_INT(local_60.y)); + firstPlayer->_goldenHearts = GHIDRA_INT(local_60.y); } } ((Entity_Player *)(firstPlayer))->Entity_Player::update_bone_hearts(); @@ -3674,19 +3674,19 @@ void PlayerManager::spawn_coop_baby_for_join(int unused, int controllerIndex) ((Entity_Player *)(baby))->Entity_Player::AddBoneHearts(1); } LAB_009bd886: - local_44 = local_44 << 1 | (uint)((int)local_44 < 0); + local_44 = local_44 << 1 | GHIDRA_UINT((GHIDRA_INT(local_44) < 0)); iStack_38 = iStack_38 + -1; } while (iStack_38 != 0); } - ((Entity_Player *)(baby))->Entity_Player::AddMaxHearts((int)local_40,0); + ((Entity_Player *)(baby))->Entity_Player::AddMaxHearts(GHIDRA_INT(local_40),0); ((Entity_Player *)(baby))->Entity_Player::AddHearts(redHeartsTaken,1,0); ((Entity_Player *)(firstPlayer))->Entity_Player::AddSoulHearts(-soulHeartsTaken,0); ((Entity_Player *)(firstPlayer))->Entity_Player::AddHearts(-redHeartsTaken,1,0); ((Entity_Player *)(firstPlayer))->Entity_Player::AddBoneHearts(-boneHeartsTaken); - ((Entity_Player *)(firstPlayer))->Entity_Player::AddMaxHearts(-(int)local_40,0); + ((Entity_Player *)(firstPlayer))->Entity_Player::AddMaxHearts(-GHIDRA_INT(local_40),0); } local_48 = (PlayerManager *)0x0; - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&local_74,3,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&local_74,3,-1,-1,0,0); local_14 = 0; local_44 = 0; if (local_74._size != 0) { @@ -3699,13 +3699,13 @@ LAB_009bd886: __RTDynamicCast(iVar7,0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Familiar::RTTI_Type_Descriptor,0 ), *(int *)((char *)familiar->_player + 0x2c) == 0)))) && - (local_48 = (PlayerManager *)((int)&(local_48->_playerList)._begin + 1), + (local_48 = (PlayerManager *)(GHIDRA_INT(&(local_48->_playerList)._begin) + 1), local_48 == (PlayerManager *)0x2)) { ((Entity_Familiar *)(familiar))->Entity_Familiar::set_player(baby); break; } local_44 = local_44 + 1; - } while (local_44 < (uint)local_74._size); + } while (local_44 < GHIDRA_UINT(local_74._size)); } familiarData = local_74._data; uVar11 = 0; @@ -3724,22 +3724,22 @@ LAB_009bd886: ((Entity_Familiar *)local_60.y,*(void **)((char *)local_60.y + 0x410)); } uVar11 = uVar11 + 1; - } while (uVar11 < (uint)local_74._size); + } while (uVar11 < GHIDRA_UINT(local_74._size)); firstPlayer = local_4c; } local_4c = (Entity_Player *)0x0; do { - local_60.y = (float)((int)local_4c * 4); + local_60.y = (float)(GHIDRA_INT(local_4c) * 4); iVar7 = 0; - if (0 < *(int *)((int)(firstPlayer->_collectibleCounts)._begin + (int)local_60.y)) { + if (0 < *(int *)(GHIDRA_INT((firstPlayer->_collectibleCounts)._begin) + GHIDRA_INT(local_60.y))) { do { - Entity_Player::AddCollectible(local_50,(int)local_4c,0,1,0,0,0); + Entity_Player::AddCollectible(local_50,GHIDRA_INT(local_4c),0,1,0,0,0); iVar7 = iVar7 + 1; - } while (iVar7 < *(int *)((int)(firstPlayer->_collectibleCounts)._begin + (int)local_60.y)); + } while (iVar7 < *(int *)(GHIDRA_INT((firstPlayer->_collectibleCounts)._begin) + GHIDRA_INT(local_60.y))); } baby = local_50; - local_4c = (Entity_Player *)((int)local_4c + 1); - } while ((int)local_4c < 0x2dd); + local_4c = (Entity_Player *)(GHIDRA_INT(local_4c) + 1); + } while (GHIDRA_INT(local_4c) < 0x2dd); iVar7 = firstPlayer->_activeDesc[0]._unk; iVar2 = firstPlayer->_activeDesc[0]._charge; iVar4 = firstPlayer->_activeDesc[0]._batteryCharge; @@ -3761,70 +3761,70 @@ LAB_009bd886: ((Entity_Player *)(baby))->Entity_Player::AddTrinket(*(int *)local_50,1); } local_50 = (Entity_Player *)&(*(undefined1 *)((char *)(local_50) + 0x4)); - local_4c = (Entity_Player *)((int)local_4c + -1); + local_4c = (Entity_Player *)(GHIDRA_INT(local_4c) + -1); } while (local_4c != (Entity_Player *)0x0); local_50 = (Entity_Player *)0xc; do { - *(undefined4 *)(&(*(undefined1 *)((char *)&(local_50[-1]) + 0x2ef4)) + (int)(baby->_pillEffectUses)._begin) = - *(undefined4 *)(&(*(undefined1 *)((char *)&(local_50[-1]) + 0x2ef4)) + (int)(firstPlayer->_pillEffectUses)._begin); - *(undefined4 *)((int)(baby->_pillEffectUses)._begin + (int)(&local_50->_sprite + -1) + 0xc4) = + *(undefined4 *)(&(*(undefined1 *)((char *)&(local_50[-1]) + 0x2ef4)) + GHIDRA_INT((baby->_pillEffectUses)._begin)) = + *(undefined4 *)(&(*(undefined1 *)((char *)&(local_50[-1]) + 0x2ef4)) + GHIDRA_INT((firstPlayer->_pillEffectUses)._begin)); + *(undefined4 *)(GHIDRA_INT((baby->_pillEffectUses)._begin) + GHIDRA_INT((&local_50->_sprite + -1)) + 0xc4) = *(undefined4 *) - ((int)(firstPlayer->_pillEffectUses)._begin + (int)(&local_50->_sprite + -1) + 0xc4); - *(undefined4 *)(&(*(undefined1 *)((char *)&(local_50[-1]) + 0x2efc)) + (int)(baby->_pillEffectUses)._begin) = - *(undefined4 *)(&(*(undefined1 *)((char *)&(local_50[-1]) + 0x2efc)) + (int)(firstPlayer->_pillEffectUses)._begin); - *(undefined4 *)((int)(baby->_pillEffectUses)._begin + (int)(&local_50->_sprite + -1) + 0xcc) = + (GHIDRA_INT((firstPlayer->_pillEffectUses)._begin) + GHIDRA_INT((&local_50->_sprite + -1)) + 0xc4); + *(undefined4 *)(&(*(undefined1 *)((char *)&(local_50[-1]) + 0x2efc)) + GHIDRA_INT((baby->_pillEffectUses)._begin)) = + *(undefined4 *)(&(*(undefined1 *)((char *)&(local_50[-1]) + 0x2efc)) + GHIDRA_INT((firstPlayer->_pillEffectUses)._begin)); + *(undefined4 *)(GHIDRA_INT((baby->_pillEffectUses)._begin) + GHIDRA_INT((&local_50->_sprite + -1)) + 0xcc) = *(undefined4 *) - ((int)(firstPlayer->_pillEffectUses)._begin + (int)(&local_50->_sprite + -1) + 0xcc); - *(undefined4 *)((int)(baby->_pillEffectUses)._begin + (int)(&local_50->_sprite + -1) + 0xd0) = + (GHIDRA_INT((firstPlayer->_pillEffectUses)._begin) + GHIDRA_INT((&local_50->_sprite + -1)) + 0xcc); + *(undefined4 *)(GHIDRA_INT((baby->_pillEffectUses)._begin) + GHIDRA_INT((&local_50->_sprite + -1)) + 0xd0) = *(undefined4 *) - ((int)(firstPlayer->_pillEffectUses)._begin + (int)(&local_50->_sprite + -1) + 0xd0); + (GHIDRA_INT((firstPlayer->_pillEffectUses)._begin) + GHIDRA_INT((&local_50->_sprite + -1)) + 0xd0); local_50 = (Entity_Player *)&local_50->_pendingDamage; - } while ((int)local_50 < 0xd4); + } while (GHIDRA_INT(local_50) < 0xd4); local_4c = (void *)0x0; if (&baby->_smeltedTrinkets != &firstPlayer->_smeltedTrinkets) { local_60.y = (float)(firstPlayer->_smeltedTrinkets)._begin; - local_4c = (Entity_Player *)((int)(firstPlayer->_smeltedTrinkets)._end - (int)local_60.y); - local_50 = (Entity_Player *)((int)local_4c >> 2); + local_4c = (Entity_Player *)(GHIDRA_INT((firstPlayer->_smeltedTrinkets)._end) - GHIDRA_INT(local_60.y)); + local_50 = (Entity_Player *)(GHIDRA_INT(local_4c) >> 2); local_48 = (baby->_smeltedTrinkets)._begin; - if ((Entity_Player *)((int)(baby->_smeltedTrinkets)._capacity - (int)local_48 >> 2) < local_50) + if ((Entity_Player *)(GHIDRA_INT((baby->_smeltedTrinkets)._capacity) - GHIDRA_INT(local_48) >> 2) < local_50) { std::vector::reserve_clear(local_50); local_48 = (baby->_smeltedTrinkets)._begin; } memmove(local_48,(void *)local_60.y,(size_t)local_4c); - (baby->_smeltedTrinkets)._end = (void *)((int)local_4c + (int)local_48); + (baby->_smeltedTrinkets)._end = (void *)(GHIDRA_INT(local_4c) + GHIDRA_INT(local_48)); } babyVoidedCollectibles = &baby->_voidedCollectibles; if (babyVoidedCollectibles != &firstPlayer->_voidedCollectibles) { local_60.y = (float)(firstPlayer->_voidedCollectibles)._begin; - local_50 = (Entity_Player *)((int)(firstPlayer->_voidedCollectibles)._end - (int)local_60.y); + local_50 = (Entity_Player *)(GHIDRA_INT((firstPlayer->_voidedCollectibles)._end) - GHIDRA_INT(local_60.y)); local_4c = babyVoidedCollectibles->_begin; - if ((uint)((int)(baby->_voidedCollectibles)._capacity - (int)local_4c >> 2) < - (uint)((int)local_50 >> 2)) { - std::vector::reserve_clear((int)local_50 >> 2); + if (GHIDRA_UINT((GHIDRA_INT((baby->_voidedCollectibles)._capacity) - GHIDRA_INT(local_4c) >> 2)) < + GHIDRA_UINT((GHIDRA_INT(local_50) >> 2))) { + std::vector::reserve_clear(GHIDRA_INT(local_50) >> 2); local_4c = babyVoidedCollectibles->_begin; } memmove(local_4c,(void *)local_60.y,(size_t)local_50); (baby->_voidedCollectibles)._end = - (void *)((int)local_4c + (int)(&local_50->_sprite + -1) + 0xcc); + (void *)(GHIDRA_INT(local_4c) + GHIDRA_INT((&local_50->_sprite + -1)) + 0xcc); } baby->_cacheFlags = 0xffff; ((Entity_Player *)(baby))->Entity_Player::EvaluateItems(); ((HUD *)(&g_game->_hud))->HUD::AssignPlayerHUDs(); - if (local_74._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(local_74) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (local_74._data != (void *)0x0) { uVar11 = *(uint *)((char *)local_74._data + -4); oldAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar11; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar11; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)oldAllocatedBytes < uVar11); - free((uint *)((int)local_74._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocatedBytes) < uVar11)); + free((uint *)(GHIDRA_INT(local_74._data) + -4)); } } ExceptionList = local_1c; @@ -3861,7 +3861,7 @@ void PlayerManager::init_random_unlocks(uint seed) manager = g_manager; puStack_c = &LAB_00b0eb0d; local_10 = ExceptionList; - local_18 = __security_cookie ^ (int)register0x00000010 - 4U; + local_18 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; local_24 = 0x19; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0xa4)) = 0; @@ -3875,8 +3875,8 @@ void PlayerManager::init_random_unlocks(uint seed) do { pvVar3 = (manager->_entityConfig)._babies._begin; uVar4 = *(uint *)((char *)pvVar3 + local_20 + 0x34); - local_1c = (std_vector *)((int)pvVar3 + local_20); - if ((int)uVar4 < 0) { + local_1c = (std_vector *)(GHIDRA_INT(pvVar3) + local_20); + if (GHIDRA_INT(uVar4) < 0) { LAB_009bdd33: if (psVar7 == (std_vector *)0x0) { std::vector::_Emplace_reallocate(0,&local_1c); @@ -3905,9 +3905,9 @@ LAB_009bdd33: LAB_009bdd64: local_20 = local_20 + 0x38; } while (local_20 < 0xf88); - uVar4 = (int)psVar7 >> 2; + uVar4 = GHIDRA_INT(psVar7) >> 2; local_20 = uVar4 - 1; - if (0 < (int)local_20) { + if (0 < GHIDRA_INT(local_20)) { uVar6 = uVar4; do { if (seed == 0) { @@ -3931,7 +3931,7 @@ LAB_009bdd64: *(undefined4 *)(local_20 * 4) = *(undefined4 *)(swapIndex * 4); local_20 = local_20 + -1; *(undefined4 *)(swapIndex * 4) = swapTmp; - } while (0 < (int)local_20); + } while (0 < GHIDRA_INT(local_20)); game = g_game; cachedManager = g_manager; } @@ -3960,22 +3960,22 @@ LAB_009bdd64: else { *puVar5 = 0xffffffff; ppvVar1 = &(this->_coopPlayerTypes)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + 4); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + 4); } local_20 = 0; do { psVar7 = local_1c; - local_24 = *(uint *)((int)&DAT_00b7ec30 + local_20); - if (((int)local_24 < 0) || - (((int)(cachedManager->_entityConfig)._players._end - - (int)(cachedManager->_entityConfig)._players._begin) / 0x148 <= (int)local_24)) { + local_24 = *(uint *)(GHIDRA_INT(&DAT_00b7ec30) + local_20); + if ((GHIDRA_INT(local_24) < 0) || + ((GHIDRA_INT((cachedManager->_entityConfig)._players._end) - + GHIDRA_INT((cachedManager->_entityConfig)._players._begin)) / 0x148 <= GHIDRA_INT(local_24))) { pvVar3 = (void *)0x0; } else { - pvVar3 = (void *)(local_24 * 0x148 + (int)(cachedManager->_entityConfig)._players._begin); + pvVar3 = (void *)(local_24 * 0x148 + GHIDRA_INT((cachedManager->_entityConfig)._players._begin)); } uVar4 = *(uint *)((char *)pvVar3 + 0xe8); - if (((int)uVar4 < 0) || + if ((GHIDRA_INT(uVar4) < 0) || (((uVar4 < 0x282 && (((uVar4 == 0 || ((cachedManager->_persistentGameData)._achievements[uVar4] != 0)) || (((cachedManager->_state == 2 && (game != (Game *)0x0)) && @@ -3990,23 +3990,23 @@ LAB_009bdd64: } else { *playerTypesEnd = local_24; - local_1c->_end = (void *)((int)local_1c->_end + 4); + local_1c->_end = (void *)(GHIDRA_INT(local_1c->_end) + 4); } } local_20 = local_20 + 4; } while (local_20 < 0x88); uVar4 = 0x29; - if (0x29 < (uint)(((int)(cachedManager->_entityConfig)._players._end - - (int)(cachedManager->_entityConfig)._players._begin) / 0x148)) { + if (0x29 < GHIDRA_UINT(((GHIDRA_INT((cachedManager->_entityConfig)._players._end) - + GHIDRA_INT((cachedManager->_entityConfig)._players._begin)) / 0x148))) { local_1c = (std_vector *)0x3488; do { - if (((int)uVar4 < 0) || - (((int)(cachedManager->_entityConfig)._players._end - - (int)(cachedManager->_entityConfig)._players._begin) / 0x148 <= (int)uVar4)) { + if ((GHIDRA_INT(uVar4) < 0) || + ((GHIDRA_INT((cachedManager->_entityConfig)._players._end) - + GHIDRA_INT((cachedManager->_entityConfig)._players._begin)) / 0x148 <= GHIDRA_INT(uVar4))) { playerConfig = 0; } else { - playerConfig = (int)(cachedManager->_entityConfig)._players._begin + (int)local_1c; + playerConfig = GHIDRA_INT((cachedManager->_entityConfig)._players._begin) + GHIDRA_INT(local_1c); } if (*(char *)(playerConfig + 0x128) == '\0') { playerTypesEnd = (this->_coopPlayerTypes)._end; @@ -4017,13 +4017,13 @@ LAB_009bdd64: } else { *playerTypesEnd = uVar4; - psVar7->_end = (void *)((int)psVar7->_end + 4); + psVar7->_end = (void *)(GHIDRA_INT(psVar7->_end) + 4); } } local_1c = (std_vector *)&local_1c[0x1b]._end; uVar4 = uVar4 + 1; - } while (uVar4 < (uint)(((int)(cachedManager->_entityConfig)._players._end - - (int)(cachedManager->_entityConfig)._players._begin) / 0x148)); + } while (uVar4 < GHIDRA_UINT(((GHIDRA_INT((cachedManager->_entityConfig)._players._end) - + GHIDRA_INT((cachedManager->_entityConfig)._players._begin)) / 0x148))); } ExceptionList = local_10; return; @@ -4062,7 +4062,7 @@ Entity_Player * PlayerManager::RandomCollectibleOwner(int collectibleId, uint se uVar2 = uVar2 << 5 ^ uVar2; seed = uVar2 >> 0x14 ^ uVar2; roll = (undefined1 *) - ((float)((double)(int)seed + __uint_to_double_fixup[-((int)seed >> 0x1f)]) * + ((float)((double)GHIDRA_INT(seed) + __uint_to_double_fixup[-(GHIDRA_INT(seed) >> 0x1f)]) * 2.3283062e-10); if ((float)bestRoll < (float)roll) { bestRoll = roll; @@ -4080,16 +4080,16 @@ Entity_Player * PlayerManager::RandomCollectibleOwner(int collectibleId, uint se return tmpPlayer; } rngsEnd = (tmpPlayer->_collectibleRNGs)._end; - if ((int)rngsEnd - (int)(tmpPlayer->_collectibleRNGs)._begin >> 4 <= collectibleId) { + if (GHIDRA_INT(rngsEnd) - GHIDRA_INT((tmpPlayer->_collectibleRNGs)._begin) >> 4 <= collectibleId) { KAGE_LogMessage(0x10,(byte *)"Collectible ID out of bounds!\n"); rngsEnd = (tmpPlayer->_collectibleRNGs)._end; } rngsBegin = (tmpPlayer->_collectibleRNGs)._begin; - uVar2 = ((int)rngsEnd - (int)rngsBegin >> 4) - 1; - if (uVar2 < (uint)collectibleId) { + uVar2 = (GHIDRA_INT(rngsEnd) - GHIDRA_INT(rngsBegin) >> 4) - 1; + if (uVar2 < GHIDRA_UINT(collectibleId)) { collectibleId = uVar2; } - *outRng = (RNG *)(collectibleId * 0x10 + (int)rngsBegin); + *outRng = (RNG *)(collectibleId * 0x10 + GHIDRA_INT(rngsBegin)); return tmpPlayer; } *outRng = (RNG *)0x0; @@ -4128,7 +4128,7 @@ Entity_Player * PlayerManager::RandomTrinketOwner(int trinketId, uint seed, RNG uVar2 = seed >> 3 ^ seed; uVar2 = uVar2 << 5 ^ uVar2; seed = uVar2 >> 0x14 ^ uVar2; - roll = (float)((double)(int)seed + __uint_to_double_fixup[-((int)seed >> 0x1f)]) * + roll = (float)((double)GHIDRA_INT(seed) + __uint_to_double_fixup[-(GHIDRA_INT(seed) >> 0x1f)]) * 2.3283062e-10; if (bestRoll < roll) { owner = player; @@ -4141,16 +4141,16 @@ Entity_Player * PlayerManager::RandomTrinketOwner(int trinketId, uint seed, RNG if (outRng != (RNG **)0x0) { if (owner != (Entity_Player *)0x0) { if ((trinketId < 0) || - ((int)(owner->_trinketRNGs)._end - (int)(owner->_trinketRNGs)._begin >> 4 <= trinketId)) { + (GHIDRA_INT((owner->_trinketRNGs)._end) - GHIDRA_INT((owner->_trinketRNGs)._begin) >> 4 <= trinketId)) { KAGE_LogMessage(0x10,(byte *)"Trinket ID out of bounds!\n"); } rngsBegin = (owner->_trinketRNGs)._begin; - uVar2 = ((int)(owner->_trinketRNGs)._end - (int)rngsBegin >> 4) - 1; - clampedTrinketId = -(uint)(trinketId != 0) & trinketId; + uVar2 = (GHIDRA_INT((owner->_trinketRNGs)._end) - GHIDRA_INT(rngsBegin) >> 4) - 1; + clampedTrinketId = -GHIDRA_UINT((trinketId != 0)) & trinketId; if (clampedTrinketId < uVar2) { uVar2 = clampedTrinketId; } - *outRng = (RNG *)(uVar2 * 0x10 + (int)rngsBegin); + *outRng = (RNG *)(uVar2 * 0x10 + GHIDRA_INT(rngsBegin)); return owner; } *outRng = (RNG *)0x0; @@ -4188,7 +4188,7 @@ Entity_Player * PlayerManager::GetRandomPlayer(int unused, uint seed) shiftedSeed = seed >> 3 ^ seed; shiftedSeed = shiftedSeed << 5 ^ shiftedSeed; seed = shiftedSeed >> 0x14 ^ shiftedSeed; - roll = (float)((double)(int)seed + __uint_to_double_fixup[-((int)seed >> 0x1f)]) * + roll = (float)((double)GHIDRA_INT(seed) + __uint_to_double_fixup[-(GHIDRA_INT(seed) >> 0x1f)]) * 2.3283062e-10; if (roll <= bestRoll) { result = bestPlayer; @@ -4370,11 +4370,11 @@ void PlayerManager::add_lost_curse(int nullItemId) i = 0; pvVar2 = (this->_playerList)._begin; - if ((int)(this->_playerList)._end - (int)pvVar2 >> 2 != 0) { + if (GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT(pvVar2) >> 2 != 0) { do { nullItemsBegin = (g_manager->_itemConfig)._nullItems._begin; - if ((0x1c0 < (int)((int)(g_manager->_itemConfig)._nullItems._end - (int)nullItemsBegin & - 0xfffffffcU)) && + if ((0x1c0 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(nullItemsBegin) & + 0xfffffffcU))) && (nullItem = *(int *)((char *)nullItemsBegin + 0x1c0), nullItem != 0)) { effect[2] = *(undefined4 *)(nullItem + 0x78); effect[1] = 0; @@ -4394,8 +4394,8 @@ void PlayerManager::add_lost_curse(int nullItemId) } } pvVar2 = (g_manager->_itemConfig)._nullItems._begin; - if ((0x1c0 < (int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar2 & 0xfffffffcU - )) && (iVar1 = *(int *)((char *)pvVar2 + 0x1c0), iVar1 != 0)) { + if ((0x1c0 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar2) & 0xfffffffcU + ))) && (iVar1 = *(int *)((char *)pvVar2 + 0x1c0), iVar1 != 0)) { twinEffect[2] = *(undefined4 *)(iVar1 + 0x78); twinEffect[1] = 0; local_c = 0; @@ -4406,7 +4406,7 @@ void PlayerManager::add_lost_curse(int nullItemId) LAB_009be966: i = i + 1; pvVar2 = (this->_playerList)._begin; - } while (i < (uint)((int)(this->_playerList)._end - (int)pvVar2 >> 2)); + } while (i < GHIDRA_UINT((GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT(pvVar2) >> 2))); } return; } @@ -4440,8 +4440,8 @@ int PlayerManager::GetTrinketMultiplier(int TrinketID) void *trinketConfigs; trinketConfigs = (g_manager->_itemConfig)._trinkets._begin; - if ((((int)(g_manager->_itemConfig)._trinkets._end - (int)trinketConfigs >> 2 <= - (int)(TrinketID & 0x7fffU)) || + if (((GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(trinketConfigs) >> 2 <= + GHIDRA_INT((TrinketID & 0x7fffU))) || (iVar1 = *(int *)((char *)trinketConfigs + (TrinketID & 0x7fffU) * 4), iVar1 == 0)) || (isCountBackupPlayer = true, (*(uint *)(iVar1 + 0xb8) & 0x80000000) == 0)) { isCountBackupPlayer = false; @@ -4478,7 +4478,7 @@ byte PlayerManager::check_full_health(byte isRequireAll) undefined4 *playersEnd; playerIt = (this->_playerList)._begin; - uVar2 = (uint)CONCAT11(isRequireAll,isRequireAll); + uVar2 = GHIDRA_UINT(CONCAT11(isRequireAll,isRequireAll)); playersEnd = (this->_playerList)._end; do { bVar1 = (byte)uVar2; @@ -4501,7 +4501,7 @@ LAB_009beb72: if ((bVar1 != 0) || (isFullHealth)) goto LAB_009beb8c; } else if ((bVar1 == 0) || (!isFullHealth)) { - uVar2 = (uint)uVar3 << 8; + uVar2 = GHIDRA_UINT(uVar3) << 8; } else { LAB_009beb8c: @@ -4537,7 +4537,7 @@ byte PlayerManager::replace_player(Entity_Player *oldPlayer, Entity_Player *newP int newPlayerIndex; Game *temp_3fe5cbb71d; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b0eb55; local_1c = ExceptionList; @@ -4548,7 +4548,7 @@ byte PlayerManager::replace_player(Entity_Player *oldPlayer, Entity_Player *newP for (playerSlot = (familiar->_playerList)._begin; playerSlot != (familiar->_playerList)._end; playerSlot = playerSlot + 1) { if ((Entity_Player *)*playerSlot == oldPlayer) { - *playerSlot = (int)newPlayer; + *playerSlot = GHIDRA_INT(newPlayer); ((Entity_Player *)(oldPlayer))->Entity_Player::room_exit(0); ((GameStatePlayer *)(&oldPlayer->_unlistedRestoreState))->GameStatePlayer::Init(); Entity_Player::StoreGameState(oldPlayer,&oldPlayer->_unlistedRestoreState,0); @@ -4568,7 +4568,7 @@ byte PlayerManager::replace_player(Entity_Player *oldPlayer, Entity_Player *newP } EVar2 = oldPlayer->_twinPlayer; if (EVar2 != (EntityPtr)0x0) { - local_24 = (EntityPtr)((int)EVar2 + 0x1e68); + local_24 = (EntityPtr)(GHIDRA_INT(EVar2) + 0x1e68); if (*(Entity_Player **)((char *)EVar2 + 0x1e68) != newPlayer) { if (*(Entity_Player **)((char *)EVar2 + 0x1e68) != (Entity_Player *)0x0) { local_28 = local_24; @@ -4630,7 +4630,7 @@ byte PlayerManager::replace_player(Entity_Player *oldPlayer, Entity_Player *newP } FID_conflict__Erase_tree_>_> (childSet,(fuzzer_allocator_> *)childSet, - *(_Tree_node **)((int)local_24 + 4)); + *(_Tree_node **)(GHIDRA_INT(local_24) + 4)); *(EntityPtr *)((char *)local_24 + 4) = local_24; *(EntityPtr *)local_24 = local_24; *(EntityPtr *)((char *)local_24 + 8) = local_24; @@ -4638,7 +4638,7 @@ byte PlayerManager::replace_player(Entity_Player *oldPlayer, Entity_Player *newP (oldPlayer->_entityPtrReferrers)._size = 0; newPlayer->_exists = 1; EntityList::AddEntity - ((EntityList *)((int)temp_3fe5cbb71d->_room + 0x1218),(Entity *)newPlayer); + ((EntityList *)(GHIDRA_INT(temp_3fe5cbb71d->_room) + 0x1218),(Entity *)newPlayer); ((Entity_Player *)(newPlayer))->Entity_Player::SetControllerIndex(oldPlayer->_controllerIndex,1); (newPlayer->_pos).x = (oldPlayer->_pos).x; (newPlayer->_pos).y = (oldPlayer->_pos).y; @@ -4649,20 +4649,20 @@ byte PlayerManager::replace_player(Entity_Player *oldPlayer, Entity_Player *newP newPlayer->_heightVelocity = oldPlayer->_heightVelocity; (newPlayer->_posOffset).x = (oldPlayer->_posOffset).x; (newPlayer->_posOffset).y = (oldPlayer->_posOffset).y; - uVar3 = *(uint *)((int)&oldPlayer->_flags + 4); - *(int *)&newPlayer->_flags = (int)oldPlayer->_flags; - *(uint *)((int)&newPlayer->_flags + 4) = uVar3; + uVar3 = *(uint *)(GHIDRA_INT(&oldPlayer->_flags) + 4); + *(int *)&newPlayer->_flags = GHIDRA_INT(oldPlayer->_flags); + *(uint *)(GHIDRA_INT(&newPlayer->_flags) + 4) = uVar3; newPlayer->_entityCollisionClass = oldPlayer->_entityCollisionClass; newPlayer->_entityGridCollisionClass = oldPlayer->_entityGridCollisionClass; newPlayer->_visible = (uVar3 & 0x2000000) == 0; - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&familiars,3,-1,-1,0,0) + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&familiars,3,-1,-1,0,0) ; local_14 = 0; local_28 = (EntityPtr)0x0; if (familiars._size != 0) { do { familiar = (Entity_Familiar *) - __RTDynamicCast(*(undefined4 *)((char *)familiars._data + (int)local_28 * 4),0, + __RTDynamicCast(*(undefined4 *)((char *)familiars._data + GHIDRA_INT(local_28) * 4),0, &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Familiar::RTTI_Type_Descriptor,0 ); @@ -4674,8 +4674,8 @@ byte PlayerManager::replace_player(Entity_Player *oldPlayer, Entity_Player *newP ((Entity_Familiar *)(familiar))->Entity_Familiar::set_player(newPlayer); } } - local_28 = (EntityPtr)((int)local_28 + 1); - } while ((uint)local_28 < (uint)familiars._size); + local_28 = (EntityPtr)(GHIDRA_INT(local_28) + 1); + } while (GHIDRA_UINT(local_28) < GHIDRA_UINT(familiars._size)); } ((Entity_Player *)(oldPlayer))->Entity_Player::release_weapons_and_effects(1); oldPlayer->_valid = 0; @@ -4703,29 +4703,29 @@ byte PlayerManager::replace_player(Entity_Player *oldPlayer, Entity_Player *newP (*(undefined1 *)((char *)(newPlayer) + 0x1400)) = 0; ((Entity_Player *)(newPlayer))->Entity_Player::TriggerNewRoom_TemporaryEffects(); EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&familiarsInclDead,3,-1,-1,1,0); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&familiarsInclDead,3,-1,-1,1,0); familiarData = familiarsInclDead._data; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; local_28 = (EntityPtr)0x0; if (familiarsInclDead._size != 0) { do { - if (*(Entity_Player **)(*(int *)((char *)familiarData + (int)local_28 * 4) + 0x410) == + if (*(Entity_Player **)(*(int *)((char *)familiarData + GHIDRA_INT(local_28) * 4) + 0x410) == newPlayer) { FUN_0062c8a0(); } - local_28 = (EntityPtr)((int)local_28 + 1); - } while ((uint)local_28 < (uint)familiarsInclDead._size); + local_28 = (EntityPtr)(GHIDRA_INT(local_28) + 1); + } while (GHIDRA_UINT(local_28) < GHIDRA_UINT(familiarsInclDead._size)); } - if (familiarsInclDead._0_1_ == '\0') { - local_14._0_1_ = 2; + if ((*(undefined1 *)((char *)&(familiarsInclDead) + 0x0)) == '\0') { + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; tracked_alloc(1,familiarsInclDead._data,0); } - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; ((Entity *)((Entity *)newPlayer))->Entity::RemoveStatusEffects(); ((Entity_Player *)(newPlayer))->Entity_Player::EvaluateItems(); oldPlayer->_replacedPlayer = (void *)0x0; newPlayer->_replacedPlayer = (void *)0x0; - if (familiars._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(familiars) + 0x0)) == '\0') { local_14 = 3; tracked_alloc(1,familiars._data,0); } @@ -4747,7 +4747,7 @@ byte PlayerManager::replace_player(Entity_Player *oldPlayer, Entity_Player *newP newPlayerIndex = oldPlayer->_playerIndex; oldPlayer->_playerIndex = newPlayer->_playerIndex; newPlayer->_playerIndex = newPlayerIndex; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); ((StatHUD *)(&(temp_3fe5cbb71d->_hud)._statHUD))->StatHUD::update_player(oldPlayer,newPlayer); FUN_0083bed0(oldPlayer,newPlayer); ((HUD *)(&temp_3fe5cbb71d->_hud))->HUD::AssignPlayerHUDs(); @@ -4804,26 +4804,26 @@ void PlayerManager::restore_controller_assignment() local_8 = 0xffffffff; puStack_c = &LAB_00b0eb95; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; pvVar3 = (this->_playerList)._end; uVar6 = 0; puVar5 = (this->_playerList)._begin; - if ((int)pvVar3 - (int)puVar5 >> 2 != 0) { + if (GHIDRA_INT(pvVar3) - GHIDRA_INT(puVar5) >> 2 != 0) { do { - if ((int)pvVar3 - (int)puVar5 >> 2 == 0) { + if (GHIDRA_INT(pvVar3) - GHIDRA_INT(puVar5) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar3 = (this->_playerList)._end; puVar5 = (this->_playerList)._begin; } - if (uVar6 < (uint)((int)pvVar3 - (int)puVar5 >> 2)) { + if (uVar6 < GHIDRA_UINT((GHIDRA_INT(pvVar3) - GHIDRA_INT(puVar5) >> 2))) { puVar5 = puVar5 + uVar6; } ((Entity_Player *)((Entity_Player *)*puVar5))->Entity_Player::SetControllerIndex(-1,1); pvVar3 = (this->_playerList)._end; uVar6 = uVar6 + 1; puVar5 = (this->_playerList)._begin; - } while (uVar6 < (uint)((int)pvVar3 - (int)puVar5 >> 2)); + } while (uVar6 < GHIDRA_UINT((GHIDRA_INT(pvVar3) - GHIDRA_INT(puVar5) >> 2))); } queueProxy = (int *)0x0; queueMap = (void *)0x0; @@ -4832,21 +4832,21 @@ void PlayerManager::restore_controller_assignment() queueSize = 0; queueProxy = operator_new(8); queueProxy[1] = 0; - *queueProxy = (int)&queueProxy; - local_8._0_1_ = 0; - local_8._1_3_ = 0; + *queueProxy = GHIDRA_INT(&queueProxy); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0; local_14 = g_manager->_activeControllerIndex; std::deque::push_front(&local_14); uVar6 = 0; while( true ) { (**(code **)(PTR_vftable_00c57b2c + 0xc))(0xffffffff,uVar2); iVar7 = DAT_00c57b24 - _DAT_00c57b20; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; (**(code **)(PTR_vftable_00c57b2c + 0x10))(); - local_8 = (uint)local_8._1_3_ << 8; - if ((uint)(iVar7 >> 3) <= uVar6) break; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; + if (GHIDRA_UINT((iVar7 >> 3)) <= uVar6) break; ((KAGE::Input::Manager *)((Manager *)&PTR_vftable_00c57b18))->KAGE::Input::Manager::get_device(&device,uVar6); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; if (((device != 0) && (controllerIndex = *(int *)(device + 0xc), controllerIndex != g_manager->_activeControllerIndex)) && ((*(byte *)(device + 8) & 1) != 0) @@ -4864,27 +4864,27 @@ void PlayerManager::restore_controller_assignment() *(int *)(*(int *)((char *)queueMap + uVar8 * 4) + (local_14 & 3) * 4) = controllerIndex; queueSize = queueSize + 1; } - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; if (((deviceRefCount != (int *)0x0) && (cVar1 = (**(code **)(*deviceRefCount + 0xc))(), cVar1 != '\0')) && (g_inputDeviceRelease != (void *)0x0)) { (*g_inputDeviceRelease)(&device); } - local_8._0_1_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; uVar6 = uVar6 + 1; } pvVar3 = (this->_playerList)._end; uVar2 = 0; piVar4 = (this->_playerList)._begin; - if ((int)pvVar3 - (int)piVar4 >> 2 != 0) { + if (GHIDRA_INT(pvVar3) - GHIDRA_INT(piVar4) >> 2 != 0) { do { if (queueSize == 0) break; - if ((int)pvVar3 - (int)piVar4 >> 2 == 0) { + if (GHIDRA_INT(pvVar3) - GHIDRA_INT(piVar4) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar3 = (this->_playerList)._end; piVar4 = (this->_playerList)._begin; } - uVar6 = (int)pvVar3 - (int)piVar4 >> 2; + uVar6 = GHIDRA_INT(pvVar3) - GHIDRA_INT(piVar4) >> 2; playerSlot = piVar4 + uVar2; if (uVar6 <= uVar2) { playerSlot = piVar4; @@ -4895,7 +4895,7 @@ void PlayerManager::restore_controller_assignment() pvVar3 = (this->_playerList)._end; piVar4 = (this->_playerList)._begin; } - if (uVar2 < (uint)((int)pvVar3 - (int)piVar4 >> 2)) { + if (uVar2 < GHIDRA_UINT((GHIDRA_INT(pvVar3) - GHIDRA_INT(piVar4) >> 2))) { piVar4 = piVar4 + uVar2; } Entity_Player::SetControllerIndex @@ -4913,7 +4913,7 @@ void PlayerManager::restore_controller_assignment() pvVar3 = (this->_playerList)._end; uVar2 = uVar2 + 1; piVar4 = (this->_playerList)._begin; - } while (uVar2 < (uint)((int)pvVar3 - (int)piVar4 >> 2)); + } while (uVar2 < GHIDRA_UINT((GHIDRA_INT(pvVar3) - GHIDRA_INT(piVar4) >> 2))); } game = g_game; this->_coopSlots[0]._controllerIndex = -1; @@ -4958,7 +4958,7 @@ void PlayerManager::restore_controller_assignment() if (0xfff < uVar2) { block = *(void **)((char *)pvVar3 + -4); uVar2 = uVar2 + 0x23; - if (0x1f < (uint)((int)pvVar3 + (-4 - (int)block))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar3) + (-4 - GHIDRA_INT(block))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -5008,7 +5008,7 @@ byte PlayerManager::IsCoopPlay() void *playerList; playerList = (this->_playerList)._begin; - playerCount = (int)(this->_playerList)._end - (int)playerList >> 2; + playerCount = GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT(playerList) >> 2; if (playerCount < 2) { return 0; } @@ -5039,7 +5039,7 @@ int PlayerManager::GetNumAlivePlayers() pvVar1 = (this->_playerList)._begin; i = 0; - playerCount = (int)(this->_playerList)._end - (int)pvVar1 >> 2; + playerCount = GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT(pvVar1) >> 2; aliveCount = 0; if (playerCount != 0) { do { @@ -5069,7 +5069,7 @@ int PlayerManager::GetNumCoopPlayers() pvVar1 = (this->_playerList)._begin; i = 0; - playerCount = (int)(this->_playerList)._end - (int)pvVar1 >> 2; + playerCount = GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT(pvVar1) >> 2; coopCount = 0; if (playerCount != 0) { do { @@ -5096,7 +5096,7 @@ void PlayerManager::revive_player_ghosts() i = 0; pvVar1 = (this->_playerList)._begin; - if ((int)(this->_playerList)._end - (int)pvVar1 >> 2 != 0) { + if (GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT(pvVar1) >> 2 != 0) { do { this_00 = *(Entity_Player **)((char *)pvVar1 + i * 4); if (this_00->_isCoopGhost != 0) { @@ -5104,7 +5104,7 @@ void PlayerManager::revive_player_ghosts() pvVar1 = (this->_playerList)._begin; } i = i + 1; - } while (i < (uint)((int)(this->_playerList)._end - (int)pvVar1 >> 2)); + } while (i < GHIDRA_UINT((GHIDRA_INT((this->_playerList)._end) - GHIDRA_INT(pvVar1) >> 2))); } return; } @@ -5117,7 +5117,7 @@ void PlayerManager::ReviveCoopPlayer(uint param_1) int *in_ECX; int playerList; - if ((uint)(in_ECX[1] - *in_ECX >> 2) <= param_1) { + if (GHIDRA_UINT((in_ECX[1] - *in_ECX >> 2)) <= param_1) { KAGE_LogMessage(8,(byte *) "PlayerManager::ReviveCoopPlayer() recieved invalid player index (%d), Player List Size = %d, \n" ); diff --git a/src/game/png_writer.cpp b/src/game/png_writer.cpp index d6dd473..1926e28 100644 --- a/src/game/png_writer.cpp +++ b/src/game/png_writer.cpp @@ -60,9 +60,9 @@ void PngWriter::write_end() png_write_chunk_header(pngPtr,(byte *)&DAT_00c12990,0); crc = *(undefined4 *)((char *)pngPtr + 0x108); local_5 = (undefined1)crc; - crcBytes = (undefined1)((uint)crc >> 0x18); - local_7 = (undefined1)((uint)crc >> 0x10); - local_6 = (undefined1)((uint)crc >> 8); + crcBytes = (undefined1)(GHIDRA_UINT(crc) >> 0x18); + local_7 = (undefined1)(GHIDRA_UINT(crc) >> 0x10); + local_6 = (undefined1)(GHIDRA_UINT(crc) >> 8); if (*(code **)((char *)pngPtr + 0x4c) == (code *)0x0) { /* WARNING: Subroutine does not return */ FUN_00a64610(); @@ -86,7 +86,7 @@ void PngWriter::write_info() iVar3 = setjmp3(*(undefined4 *)this,0); pvVar2 = local_8; if (iVar3 != 0) { - FUN_009e6bd0((int)local_8 + 0x50); + FUN_009e6bd0(GHIDRA_INT(local_8) + 0x50); /* WARNING: Subroutine does not return */ _CxxThrowException(local_14,(ThrowInfo *)&DAT_00bd5cc0); } diff --git a/src/game/pocket_item_config.cpp b/src/game/pocket_item_config.cpp index 4e89850..3b3ec38 100644 --- a/src/game/pocket_item_config.cpp +++ b/src/game/pocket_item_config.cpp @@ -21,7 +21,7 @@ std_string * PocketItemConfig::GetName(std_string *outName, int language) outName->_buf[0] = '\0'; return outName; } - text = (byte *)((int)this + 8); + text = (byte *)(GHIDRA_INT(this) + 8); if (0xf < *(uint *)((char *)this + 0x1c)) { text = *(byte **)text; } @@ -34,12 +34,12 @@ std_string * PocketItemConfig::GetName(std_string *outName, int language) language = language & 0xffffff; StringTable::get_string (stringTable,(byte *)"PocketItems",resolvedLanguage,text + 1, - (byte *)((int)&language + 3)); - if (language._3_1_ == '\0') { + (byte *)(GHIDRA_INT(&language) + 3)); + if ((*(undefined1 *)((char *)&(language) + 0x3)) == '\0') { language = language & 0xffffff; text = StringTable::get_string (stringTable,(byte *)"PocketItems",resolvedLanguage,text + 1, - (byte *)((int)&language + 3)); + (byte *)(GHIDRA_INT(&language) + 3)); } } outName->_buf[0] = '\0'; @@ -54,6 +54,6 @@ std_string * PocketItemConfig::GetName(std_string *outName, int language) ch = *textEnd; textEnd = textEnd + 1; } while (ch != 0); - ((std::string *)(outName->_buf))->std::string::assign(text,(int)textEnd - (int)(text + 1)); + ((std::string *)(outName->_buf))->std::string::assign(text,GHIDRA_INT(textEnd) - GHIDRA_INT((text + 1))); return outName; } diff --git a/src/game/popup.cpp b/src/game/popup.cpp index 689177e..684ae6e 100644 --- a/src/game/popup.cpp +++ b/src/game/popup.cpp @@ -37,22 +37,22 @@ void * Popup::constructor(void *desc) DAT_00c72a24 = DAT_00c72a24 + 1; *(undefined4 *)((char *)this + 0xc) = 0xffffffff; uVar11 = GetTimeNs(); - uVar8 = (uint)(uVar11 >> 0x20); + uVar8 = GHIDRA_UINT((uVar11 >> 0x20)); lVar2 = (uVar11 & 0xffffffff) * 0x431bde82; local_30 = (undefined4)((ulonglong)lVar2 >> 0x20); lVar3 = (ulonglong)uVar8 * 0x431bde82; local_34 = (undefined4)((ulonglong)lVar3 >> 0x20); local_28 = (undefined4)lVar3; uVar11 = (ulonglong)uVar8 * 0xd7b634db + ((uVar11 & 0xffffffff) * 0xd7b634db >> 0x20); - uVar9 = (uint)(uVar11 >> 0x20); + uVar9 = GHIDRA_UINT((uVar11 >> 0x20)); lVar2 = lVar2 + (uVar11 & 0xffffffff); local_40 = (undefined4)lVar2; - uVar8 = (uint)((ulonglong)lVar2 >> 0x20); + uVar8 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); lVar3 = lVar3 + (ulonglong)CONCAT14(CARRY4(uVar9,uVar8),uVar9 + uVar8); - uVar8 = (uint)((ulonglong)lVar3 >> 0x20); + uVar8 = GHIDRA_UINT(((ulonglong)lVar3 >> 0x20)); *(undefined4 *)((char *)this + 0x18) = 0xfefefefe; - image = (undefined4 *)((int)this + 0x1c); - *(uint *)((char *)this + 0x10) = (uint)lVar3 >> 0x12 | uVar8 * 0x4000; + image = (undefined4 *)(GHIDRA_INT(this) + 0x1c); + *(uint *)((char *)this + 0x10) = GHIDRA_UINT(lVar3) >> 0x12 | uVar8 * 0x4000; *(uint *)((char *)this + 0x14) = uVar8 >> 0x12; *image = 0; *(undefined4 *)((char *)this + 0x20) = 0; @@ -73,7 +73,7 @@ void * Popup::constructor(void *desc) *(undefined4 *)((char *)this + 0x58) = 1; *(undefined4 *)((char *)this + 0x5c) = 0x3f800000; *(undefined4 *)((char *)this + 0x60) = 0; - ((KColor *)((KColor *)((int)this + 100)))->KColor::SetFromARGB(0xffffffff); + ((KColor *)((KColor *)(GHIDRA_INT(this) + 100)))->KColor::SetFromARGB(0xffffffff); *(undefined4 *)((char *)this + 0x78) = 0; *(undefined4 *)((char *)this + 0x7c) = 0; *(undefined4 *)((char *)this + 0x80) = 0; @@ -88,10 +88,10 @@ void * Popup::constructor(void *desc) *(undefined4 *)((char *)this + 0xa4) = 0; *(undefined4 *)((char *)this + 0xa8) = 0xffffffff; *(undefined4 *)((char *)this + 0xac) = 0xffffffff; - ((KColor *)((KColor *)((int)this + 0xb0)))->KColor::SetFromARGB(0xffd3d3d3); + ((KColor *)((KColor *)(GHIDRA_INT(this) + 0xb0)))->KColor::SetFromARGB(0xffd3d3d3); *(byte *)((char *)this + 0x24) = *(byte *)((char *)this + 0x24) | 7; *(undefined1 *)((char *)this + 0xc4) = 1; - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; *(undefined4 *)((char *)this + 0xd4) = 0; *(undefined4 *)((char *)this + 0xd0) = 0; *(undefined4 *)((char *)this + 0xdc) = 0; @@ -104,7 +104,7 @@ void * Popup::constructor(void *desc) *(undefined4 *)((char *)this + 0x100) = 0; *(undefined ***)((char *)this + 0x118) = IsaacRepentancePlus::Popup::LerpFloat::vftable; timeNs = GetTimeNs(); - uVar8 = (uint)(timeNs >> 0x20); + uVar8 = GHIDRA_UINT((timeNs >> 0x20)); uVar11 = (timeNs & 0xffffffff) * 0xd7b634db; local_40 = (undefined4)uVar11; lVar2 = (timeNs & 0xffffffff) * 0x431bde82; @@ -115,32 +115,32 @@ void * Popup::constructor(void *desc) local_3c = (int *)((ulonglong)lVar4 >> 0x20); local_28 = (undefined4)lVar4; uVar11 = lVar3 + (uVar11 >> 0x20); - uVar9 = (uint)(uVar11 >> 0x20); + uVar9 = GHIDRA_UINT((uVar11 >> 0x20)); lVar2 = lVar2 + (uVar11 & 0xffffffff); local_38 = (undefined4)lVar2; - uVar8 = (uint)((ulonglong)lVar2 >> 0x20); + uVar8 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); lVar4 = lVar4 + (ulonglong)CONCAT14(CARRY4(uVar9,uVar8),uVar9 + uVar8); - uVar8 = (uint)((ulonglong)lVar4 >> 0x20); - *(uint *)((char *)this + 0x138) = (uint)lVar4 >> 0x12 | uVar8 * 0x4000; + uVar8 = GHIDRA_UINT(((ulonglong)lVar4 >> 0x20)); + *(uint *)((char *)this + 0x138) = GHIDRA_UINT(lVar4) >> 0x12 | uVar8 * 0x4000; *(uint *)((char *)this + 0x13c) = uVar8 >> 0x12; *(undefined4 *)((char *)this + 0x140) = 0; if (*(int *)((char *)desc + 0x3c) == 1) { loadedImage = Manager::LoadImage(&local_40,(byte *)"gfx/ui/Popup_Beige.png"); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; ((KAGE::SmartPointer *)(image))->KAGE::SmartPointer::operator_assign(loadedImage); - local_14 = CONCAT31(local_14._1_3_,3); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),3); } else { loadedImage = Manager::LoadImage(&local_40,(byte *)"gfx/ui/Popup_White.png"); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; ((KAGE::SmartPointer *)(image))->KAGE::SmartPointer::operator_assign(loadedImage); - local_14 = CONCAT31(local_14._1_3_,5); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),5); } if (((local_3c != (int *)0x0) && (cVar7 = (**(code **)(*local_3c + 0xc))(), cVar7 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(&local_40); } - local_14 = CONCAT31(local_14._1_3_,1); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); *(undefined1 *)((char *)this + 0x24) = *(undefined1 *)desc; *(undefined4 *)((char *)this + 0x28) = *(undefined4 *)((char *)desc + 4); *(undefined4 *)((char *)this + 0x2c) = *(undefined4 *)((char *)desc + 8); @@ -165,7 +165,7 @@ void * Popup::constructor(void *desc) *(undefined4 *)((char *)this + 0x6c) = uVar5; *(undefined4 *)((char *)this + 0x70) = uVar6; *(undefined4 *)((char *)this + 0x74) = *(undefined4 *)((char *)desc + 0x50); - if ((undefined4 *)((int)this + 0x78) != (undefined4 *)((int)desc + 0x54)) { + if ((undefined4 *)(GHIDRA_INT(this) + 0x78) != (undefined4 *)(GHIDRA_INT(desc) + 0x54)) { FUN_009c3070(*(undefined4 *)((char *)desc + 0x54),*(undefined4 *)((char *)desc + 0x58),local_3c); } uVar1 = *(undefined4 *)((char *)desc + 0x6c); @@ -187,18 +187,18 @@ void * Popup::constructor(void *desc) *(undefined4 *)((char *)this + 0xbc) = uVar6; *(undefined4 *)((char *)this + 0xc0) = *(undefined4 *)((char *)desc + 0x9c); *(undefined1 *)((char *)this + 0xc4) = *(undefined1 *)((char *)desc + 0xa0); - build_lines((void *)((int)this + 0x24)); + build_lines((void *)(GHIDRA_INT(this) + 0x24)); set_state(this,1); local_3c = (int *)0; if (0 < *(int *)((char *)desc + 0x88)) { local_3c = (int *)*(int *)((char *)desc + 0x88); } iVar10 = 0; - if (-1 < (int)local_3c) { + if (-1 < GHIDRA_INT(local_3c)) { do { FUN_009c2210(1); iVar10 = iVar10 + 1; - } while (iVar10 <= (int)local_3c); + } while (iVar10 <= GHIDRA_INT(local_3c)); } ExceptionList = local_1c; return this; @@ -267,16 +267,16 @@ longlong Popup::get_elapsed_ms() ulonglong nowNs; nowNs = GetTimeNs(); - uVar4 = (uint)(nowNs >> 0x20); + uVar4 = GHIDRA_UINT((nowNs >> 0x20)); lVar1 = (nowNs & 0xffffffff) * 0x431bde82; lVar2 = (ulonglong)uVar4 * 0xd7b634db + ((nowNs & 0xffffffff) * 0xd7b634db >> 0x20); - uVar5 = (uint)((ulonglong)lVar2 >> 0x20); - uVar3 = (int)((ulonglong)lVar1 >> 0x20) + (uint)CARRY4((uint)lVar1,(uint)lVar2); + uVar5 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); + uVar3 = GHIDRA_INT(((ulonglong)lVar1 >> 0x20)) + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar1),GHIDRA_UINT(lVar2))); lVar1 = (ulonglong)uVar4 * 0x431bde82 + (ulonglong)CONCAT14(CARRY4(uVar5,uVar3),uVar5 + uVar3); - uVar4 = (uint)((ulonglong)lVar1 >> 0x20); - uVar3 = (uint)lVar1 >> 0x12 | uVar4 * 0x4000; + uVar4 = GHIDRA_UINT(((ulonglong)lVar1 >> 0x20)); + uVar3 = GHIDRA_UINT(lVar1) >> 0x12 | uVar4 * 0x4000; return CONCAT44(((uVar4 >> 0x12) - *(int *)((char *)this + 0x14)) - - (uint)(uVar3 < *(uint *)((char *)this + 0x10)),uVar3 - *(uint *)((char *)this + 0x10)); + GHIDRA_UINT((uVar3 < *(uint *)((char *)this + 0x10))),uVar3 - *(uint *)((char *)this + 0x10)); } // 009c0960 @@ -332,7 +332,7 @@ LAB_009c0ad6: if ((cVar3 != '\0') && (*(int *)((char *)this + 4) < 3)) { *(undefined4 *)((char *)this + 0x18) = 0xfefefefe; if (*(code **)((char *)this + 0xa0) != (code *)0x0) { - (**(code **)((char *)this + 0xa0))((int)this + 0xa8,*(undefined4 *)((char *)this + 0xa4)); + (**(code **)((char *)this + 0xa0))(GHIDRA_INT(this) + 0xa8,*(undefined4 *)((char *)this + 0xa4)); } set_state(this,3); } @@ -357,14 +357,14 @@ LAB_009c0ad6: FUN_009c2210(0xffffffff); } LAB_009c0ba9: - resultSlot = (undefined4 *)((int)this + 0x18); + resultSlot = (undefined4 *)(GHIDRA_INT(this) + 0x18); if (*(int *)((char *)this + 0x18) != -0x1010102) { elapsedMs = get_elapsed_ms(this); - if ((((int)((ulonglong)elapsedMs >> 0x20) != 0) || - (*(uint *)((char *)this + 0x54) <= (uint)elapsedMs)) && (*(int *)((char *)this + 4) < 3)) { + if (((GHIDRA_INT(((ulonglong)elapsedMs >> 0x20)) != 0) || + (*(uint *)((char *)this + 0x54) <= GHIDRA_UINT(elapsedMs))) && (*(int *)((char *)this + 4) < 3)) { elapsedMs = get_elapsed_ms(this); - if (((int)((ulonglong)elapsedMs >> 0x20) == 0) && - ((uint)elapsedMs < *(uint *)((char *)this + 0x54))) { + if ((GHIDRA_INT(((ulonglong)elapsedMs >> 0x20)) == 0) && + (GHIDRA_UINT(elapsedMs) < *(uint *)((char *)this + 0x54))) { *resultSlot = *resultSlot; } else { @@ -498,15 +498,15 @@ byte Popup::hide() local_10[0] = __ftoui3(); (**(code **)(*(int *)((char *)this + 0xf0) + 4))(&DAT_00c37604,local_10); nowNs = GetTimeNs(); - uVar5 = (uint)(nowNs >> 0x20); + uVar5 = GHIDRA_UINT((nowNs >> 0x20)); lVar1 = (nowNs & 0xffffffff) * 0x431bde82; lVar2 = (ulonglong)uVar5 * 0xd7b634db + ((nowNs & 0xffffffff) * 0xd7b634db >> 0x20); - uVar6 = (uint)((ulonglong)lVar2 >> 0x20); - uVar4 = (int)((ulonglong)lVar1 >> 0x20) + (uint)CARRY4((uint)lVar1,(uint)lVar2); + uVar6 = GHIDRA_UINT(((ulonglong)lVar2 >> 0x20)); + uVar4 = GHIDRA_INT(((ulonglong)lVar1 >> 0x20)) + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar1),GHIDRA_UINT(lVar2))); lVar1 = (ulonglong)uVar5 * 0x431bde82 + (ulonglong)CONCAT14(CARRY4(uVar6,uVar4),uVar6 + uVar4) ; - uVar4 = (uint)((ulonglong)lVar1 >> 0x20); - *(uint *)((char *)local_18 + 0x138) = (uint)lVar1 >> 0x12 | uVar4 * 0x4000; + uVar4 = GHIDRA_UINT(((ulonglong)lVar1 >> 0x20)); + *(uint *)((char *)local_18 + 0x138) = GHIDRA_UINT(lVar1) >> 0x12 | uVar4 * 0x4000; *(uint *)((char *)local_18 + 0x13c) = uVar4 >> 0x12; this = local_18; } @@ -654,7 +654,7 @@ void Popup::render_frame(KColor *color, Vector *offset) sourceY1 = 0x41200000; local_24._alpha = 18.0; local_24._green = 18.0; - local_24._unk = CONCAT31(local_24._unk._1_3_,1); + local_24._unk = CONCAT31((*(undefined1 *)((char *)&(local_24._unk) + 0x1)),1); sourceX2 = 0x42f00000; sourceY2 = 0x41900000; sourceX3 = 0x43000000; @@ -708,7 +708,7 @@ void Popup::render_frame(KColor *color, Vector *offset) sourceY0 = 0x41e00000; sourceX1 = 0x42c60000; sourceY1 = 0x41e00000; - local_24._unk = CONCAT31(local_24._unk._1_3_,1); + local_24._unk = CONCAT31((*(undefined1 *)((char *)&(local_24._unk) + 0x1)),1); sourceX2 = 0x3f800000; sourceY2 = 0x420c0000; sourceX3 = 0x42c60000; @@ -761,7 +761,7 @@ void Popup::render_frame(KColor *color, Vector *offset) sourceY1 = 0x3f800000; local_24._alpha = 9.0; local_24._green = 9.0; - local_24._unk = CONCAT31(local_24._unk._1_3_,1); + local_24._unk = CONCAT31((*(undefined1 *)((char *)&(local_24._unk) + 0x1)),1); sourceX2 = 0x41000000; sourceY2 = 0x41100000; sourceX3 = 0x435b0000; @@ -812,7 +812,7 @@ void Popup::render_frame(KColor *color, Vector *offset) sourceY1 = 0x42100000; local_24._alpha = 43.0; local_24._green = 43.0; - local_24._unk = CONCAT31(local_24._unk._1_3_,1); + local_24._unk = CONCAT31((*(undefined1 *)((char *)&(local_24._unk) + 0x1)),1); sourceX2 = 0x3f800000; sourceY2 = 0x422c0000; sourceX3 = 0x42c60000; @@ -866,7 +866,7 @@ void Popup::render_frame(KColor *color, Vector *offset) sourceY0 = 0x41200000; sourceX1 = 0x43570000; sourceY1 = 0x41200000; - local_24._unk = CONCAT31(local_24._unk._1_3_,1); + local_24._unk = CONCAT31((*(undefined1 *)((char *)&(local_24._unk) + 0x1)),1); sourceX2 = 0x40800000; sourceY2 = 0x41d80000; sourceX3 = 0x43570000; @@ -917,7 +917,7 @@ void Popup::render_frame(KColor *color, Vector *offset) sourceY0 = 0x40800000; sourceX1 = 0x41000000; sourceY1 = 0x40800000; - local_24._unk = CONCAT31(local_24._unk._1_3_,1); + local_24._unk = CONCAT31((*(undefined1 *)((char *)&(local_24._unk) + 0x1)),1); sourceX2 = 0x3f800000; sourceY2 = 0x41100000; sourceX3 = 0x41000000; @@ -966,7 +966,7 @@ void Popup::render_frame(KColor *color, Vector *offset) sourceY0 = 0x3f800000; sourceX1 = 0x435e0000; sourceY1 = 0x3f800000; - local_24._unk = CONCAT31(local_24._unk._1_3_,1); + local_24._unk = CONCAT31((*(undefined1 *)((char *)&(local_24._unk) + 0x1)),1); sourceX2 = 0x435b0000; sourceY2 = 0x41100000; sourceX3 = 0x435e0000; @@ -1014,7 +1014,7 @@ void Popup::render_frame(KColor *color, Vector *offset) sourceY0 = 0x41200000; sourceX1 = 0x40800000; sourceY1 = 0x41200000; - local_24._unk = CONCAT31(local_24._unk._1_3_,1); + local_24._unk = CONCAT31((*(undefined1 *)((char *)&(local_24._unk) + 0x1)),1); sourceX2 = 0x3f800000; sourceY2 = 0x41b80000; sourceX3 = 0x40800000; @@ -1064,7 +1064,7 @@ void Popup::render_frame(KColor *color, Vector *offset) sourceY0 = 0x41200000; sourceX1 = 0x435c0000; sourceY1 = 0x41200000; - local_24._unk = CONCAT31(local_24._unk._1_3_,1); + local_24._unk = CONCAT31((*(undefined1 *)((char *)&(local_24._unk) + 0x1)),1); sourceX2 = 0x43570000; sourceY2 = 0x41d80000; sourceX3 = 0x435c0000; @@ -1149,7 +1149,7 @@ void Popup::build_lines() local_8 = -1; puStack_c = &LAB_00b0ec95; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&local_2c)[1]._size; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&local_2c)[1]._size); ExceptionList = &local_10; free_line_buffers(this); fVar7 = *(float *)((char *)this + 0x1c); @@ -1187,35 +1187,35 @@ LAB_009c288d: else { local_2c._size = 0; local_2c._capacity = 0xf; - local_2c._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) = (void *)0x0; textEnd = pbVar2; do { textChar = *textEnd; textEnd = textEnd + 1; } while (textChar != 0); - ((std::string *)(local_2c._buf))->std::string::assign(pbVar2,(int)textEnd - (int)(pbVar2 + 1)); - local_8._0_1_ = 1; + ((std::string *)(local_2c._buf))->std::string::assign(pbVar2,GHIDRA_INT(textEnd) - GHIDRA_INT((pbVar2 + 1))); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; vector_string_emplace_reallocate_move(&wrappedLines,(std_string *)0x0,&local_2c); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; if (0xf < local_2c._capacity) { uVar5 = local_2c._capacity + 1; - pvVar4 = (void *)local_2c._buf._0_4_; + pvVar4 = (*(undefined4 *)((char *)&((void *)local_2c._buf) + 0x0)); if (0xfff < uVar5) { - pvVar4 = *(void **)(local_2c._buf._0_4_ + -4); + pvVar4 = *(void **)((*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) + -4); uVar5 = local_2c._capacity + 0x24; - if (0x1f < (uint)(local_2c._buf._0_4_ + (-4 - (int)pvVar4))) goto LAB_009c2c9c; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar4))))) goto LAB_009c2c9c; } operator_delete(pvVar4,uVar5); } } linesBegin = wrappedLines; lineIndex = 0; - uVar5 = ((int)wrappedLinesEnd - (int)wrappedLines) / 0x18; + uVar5 = (GHIDRA_INT(wrappedLinesEnd) - GHIDRA_INT(wrappedLines)) / 0x18; if (uVar5 != 0) { linesBegin = wrappedLines; do { piVar6 = linesBegin; - if (0xf < (uint)linesBegin[5]) { + if (0xf < GHIDRA_UINT(linesBegin[5])) { piVar6 = (int *)*linesBegin; } if (piVar6 == (int *)0x0) { @@ -1225,26 +1225,26 @@ LAB_009c288d: lineEnd = piVar6; do { iVar1 = *lineEnd; - lineEnd = (int *)((int)lineEnd + 1); + lineEnd = (int *)(GHIDRA_INT(lineEnd) + 1); } while ((char)iVar1 != '\0'); - lineCopy = operator_new_tracked((uint)((int)lineEnd + (1 - ((int)piVar6 + 1)))); + lineCopy = operator_new_tracked(GHIDRA_UINT((GHIDRA_INT(lineEnd) + (1 - (GHIDRA_INT(piVar6) + 1))))); lineEnd = piVar6; do { iVar1 = *lineEnd; - lineEnd = (int *)((int)lineEnd + 1); + lineEnd = (int *)(GHIDRA_INT(lineEnd) + 1); } while ((char)iVar1 != '\0'); - strncpy(lineCopy,(char *)piVar6,(size_t)((int)lineEnd + (1 - ((int)piVar6 + 1)))); + strncpy(lineCopy,(char *)piVar6,(size_t)(GHIDRA_INT(lineEnd) + (1 - (GHIDRA_INT(piVar6) + 1)))); } local_38 = entryFields[-3]; local_40 = entryFields[-5]; local_3c = entryFields[-4]; local_34 = entryFields[-2]; local_30 = entryFields[-1]; - local_2c._buf._0_4_ = *entryFields; - local_2c._buf._4_4_ = entryFields[1]; - local_2c._buf._12_4_ = entryFields[3]; + (*(undefined4 *)((char *)&(local_2c._buf) + 0x0)) = *entryFields; + (*(undefined4 *)((char *)&(local_2c._buf) + 0x4)) = entryFields[1]; + (*(undefined4 *)((char *)&(local_2c._buf) + 0xc)) = entryFields[3]; local_2c._size = entryFields[4]; - local_2c._buf._8_4_ = entryFields[2]; + (*(undefined4 *)((char *)&(local_2c._buf) + 0x8)) = entryFields[2]; local_2c._capacity = entryFields[5]; lineRecord = *(undefined4 **)((char *)this + 100); local_44 = lineCopy; @@ -1254,14 +1254,14 @@ LAB_009c288d: else { *lineRecord = lineCopy; lineRecord[3] = local_38; - lineRecord[8] = local_2c._buf._8_4_; + lineRecord[8] = (*(undefined4 *)((char *)&(local_2c._buf) + 0x8)); lineRecord[4] = local_34; lineRecord[5] = local_30; - lineRecord[6] = local_2c._buf._0_4_; - lineRecord[7] = local_2c._buf._4_4_; + lineRecord[6] = (*(undefined4 *)((char *)&(local_2c._buf) + 0x0)); + lineRecord[7] = (*(undefined4 *)((char *)&(local_2c._buf) + 0x4)); lineRecord[1] = local_40; lineRecord[2] = local_3c; - lineRecord[9] = local_2c._buf._12_4_; + lineRecord[9] = (*(undefined4 *)((char *)&(local_2c._buf) + 0xc)); lineRecord[10] = local_2c._size; lineRecord[0xb] = local_2c._capacity; *(int *)((char *)this + 100) = *(int *)((char *)this + 100) + 0x30; @@ -1284,7 +1284,7 @@ LAB_009c288d: if (0xfff < size) { ptr = *(void **)((char *)pvVar4 + -4); size = uVar5 + 0x24; - if (0x1f < (uint)((int)pvVar4 + (-4 - (int)ptr))) goto LAB_009c2c9c; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar4) + (-4 - GHIDRA_INT(ptr))))) goto LAB_009c2c9c; } operator_delete(ptr,size); linesBegin = wrappedLinesEnd; @@ -1295,12 +1295,12 @@ LAB_009c288d: piVar6 = piVar6 + 6; } while (piVar6 != linesBegin); } - uVar5 = ((wrappedLinesCapacity - (int)linesBegin) / 0x18) * 0x18; + uVar5 = ((wrappedLinesCapacity - GHIDRA_INT(linesBegin)) / 0x18) * 0x18; linesBegin = linesBegin; if (0xfff < uVar5) { linesBegin = (int *)linesBegin[-1]; uVar5 = uVar5 + 0x23; - if ((undefined1 *)0x1f < (undefined1 *)((int)linesBegin + (-4 - (int)linesBegin))) { + if ((undefined1 *)0x1f < (undefined1 *)(GHIDRA_INT(linesBegin) + (-4 - GHIDRA_INT(linesBegin)))) { LAB_009c2c9c: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1405,13 +1405,13 @@ void Popup::free_line_buffers() allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } bufferSize = *(uint *)(iVar1 + -4); allocatedBefore = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - bufferSize; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - bufferSize; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)allocatedBefore < bufferSize); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBefore) < bufferSize)); free((void *)(iVar1 + -4)); *line = 0; } @@ -1436,22 +1436,22 @@ void Popup::destroy() local_8 = 0xffffffff; puStack_c = &LAB_00af1360; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; - free_line_buffers((void *)((int)in_ECX + 0x24)); + free_line_buffers((void *)(GHIDRA_INT(in_ECX) + 0x24)); *(undefined4 *)((char *)in_ECX + 0xa0) = 0; *(undefined4 *)((char *)in_ECX + 0xa4) = 0; *(undefined4 *)((char *)in_ECX + 0x98) = 0; *(undefined4 *)((char *)in_ECX + 0x9c) = 0; *(undefined4 *)((char *)in_ECX + 0x90) = 0; *(undefined4 *)((char *)in_ECX + 0x94) = 0; - FID_conflict__Tidy((void *)((int)in_ECX + 0x84)); - FID_conflict__Tidy((void *)((int)in_ECX + 0x78)); + FID_conflict__Tidy((void *)(GHIDRA_INT(in_ECX) + 0x84)); + FID_conflict__Tidy((void *)(GHIDRA_INT(in_ECX) + 0x78)); local_8 = 0; if (*(int **)((char *)in_ECX + 0x20) != (int *)0x0) { isLastRef = (**(code **)(**(int **)((char *)in_ECX + 0x20) + 0xc))(uVar1); if ((isLastRef != '\0') && (g_imageReleaseFn != (void *)0x0)) { - (*g_imageReleaseFn)((int)in_ECX + 0x1c); + (*g_imageReleaseFn)(GHIDRA_INT(in_ECX) + 0x1c); } } operator_delete(in_ECX,0x148); diff --git a/src/game/popup_buttons.cpp b/src/game/popup_buttons.cpp index 00eb482..656f907 100644 --- a/src/game/popup_buttons.cpp +++ b/src/game/popup_buttons.cpp @@ -58,11 +58,11 @@ void PopupButtons::load_graphics() undefined4 local_14; byte *animData; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00af18ad; local_1c = ExceptionList; - stackCookie = __security_cookie ^ (int)register0x00000010 - 0x10U; + stackCookie = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; uVar3 = 0; this = in_ECX; @@ -73,20 +73,20 @@ void PopupButtons::load_graphics() anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1e; anm2Path._capacity = 0x1f; - builtin_strncpy((char *)anm2Path._buf._0_4_,"gfx/ui/ButtonPromptWidget.anm2",0x1f); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)),"gfx/ui/ButtonPromptWidget.anm2",0x1f); local_14 = 0; this->ANM2::Load(&anm2Path,1); local_14 = 0xffffffff; if (0xf < anm2Path._capacity) { size = anm2Path._capacity + 1; - pcVar2 = (char *)anm2Path._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)anm2Path._buf) + 0x0)); if (0xfff < size) { - pcVar2 = *(char **)(anm2Path._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -4); size = anm2Path._capacity + 0x24; - if ((char *)0x1f < (char *)(anm2Path._buf._0_4_ + (-4 - (int)pcVar2))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -108,7 +108,7 @@ void PopupButtons::load_graphics() isLess = bVar1 < (byte)*pcVar2; if (bVar1 != *pcVar2) { LAB_00423bee: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_00423bf3; } if (bVar1 == 0) break; @@ -141,7 +141,7 @@ LAB_00423c1f: isLess = bVar1 < (byte)*pcVar2; if (bVar1 != *pcVar2) { LAB_00423c58: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_00423c5d; } if (bVar1 == 0) break; @@ -224,7 +224,7 @@ void PopupButtons::Render() local_1c = ExceptionList; ExceptionList = &local_1c; popup = in_ECX; - iVar4 = FUN_00424220(__security_cookie ^ (uint)(buttonPosBuf + 0x50)); + iVar4 = FUN_00424220(__security_cookie ^ GHIDRA_UINT((buttonPosBuf + 0x50))); ((InputManager *)(&PTR_vftable_00c57b18))->InputManager::get_device(&inputDevice,iVar4); local_14 = 0; textScale.x = *(float *)(in_ECX + 0x260); @@ -250,8 +250,8 @@ void PopupButtons::Render() else { ((ANM2 *)((ANM2 *)(piVar5 + -0x47)))->ANM2::SetLayerFrame(*(int *)textLayer->_layerData,*piVar5); } - piVar5[-0x20] = (int)buttonScale; - piVar5[-0x1f] = (int)buttonScale; + piVar5[-0x20] = GHIDRA_INT(buttonScale); + piVar5[-0x1f] = GHIDRA_INT(buttonScale); renderPos = (Vector *)FUN_00424130(buttonPosBuf,uVar2); if (*(char *)((char *)piVar5 + -0x13) != '\0') { if ((char)piVar5[-0x2b] == '\0') { @@ -268,7 +268,7 @@ void PopupButtons::Render() } if ((piVar5[2] != 0x20) && ((char)piVar5[1] != '\0')) { (**(code **)(PTR_vftable_00c57b18 + 0x28))(&inputMapping,0); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; iVar4 = __RTDynamicCast(inputDevice,0,&KAGE::Input::InputDeviceBase::RTTI_Type_Descriptor, &KAGE::Input::InputDeviceGamepad::RTTI_Type_Descriptor,0); local_30 = *(uint *)(inputDevice + 0xc); @@ -283,13 +283,13 @@ void PopupButtons::Render() local_90 = 0xffffffff; local_8c = 0; local_88 = 0; - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; ((KColor *)(&textColor))->KColor::SetFromARGB(0xff362f2d); textPos = (Vector *)FUN_004240b0(textPosBuf,buttonIndex); piVar1 = inputMapping; local_30 = piVar5[2]; iVar4 = inputMapping[4]; - if ((uint)(inputMapping[5] - iVar4 >> 4) <= local_30) { + if (GHIDRA_UINT((inputMapping[5] - iVar4 >> 4)) <= local_30) { KAGE_LogMessage(0x10,(byte *)"ActionId is out of range\n"); iVar4 = piVar1[4]; } @@ -317,14 +317,14 @@ void PopupButtons::Render() ZEXT1644(CONCAT412(0x3f800000,CONCAT48(0x3f800000,0x3f8000003f800000))), *renderPos,scale); } - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; if (inputMappingRefCount != (int *)0x0) { cVar3 = (**(code **)(*inputMappingRefCount + 0xc))(); if ((cVar3 != '\0') && (g_inputDeviceRelease != (void *)0x0)) { (*g_inputDeviceRelease)(&inputMapping); } } - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; } piVar5 = piVar5 + 0x4c; buttonIndex = buttonIndex + 1; diff --git a/src/game/popup_manager.cpp b/src/game/popup_manager.cpp index f6d658a..4589410 100644 --- a/src/game/popup_manager.cpp +++ b/src/game/popup_manager.cpp @@ -10,7 +10,7 @@ void PopupManager::close(int *popupId, int *result) int *listHead; if (*popupId != -1) { - piVar1 = (int *)((int)this + 8); + piVar1 = (int *)(GHIDRA_INT(this) + 8); (**(code **)(*piVar1 + 0xc))(0xffffffff); this_00 = (int *)0x0; listHead = *(int **)this; @@ -27,7 +27,7 @@ void PopupManager::close(int *popupId, int *result) (**(code **)(*piVar1 + 0x10))(); if ((this_00 != (int *)0x0) && (this_00[1] < 3)) { elapsedMs = ((Popup *)(this_00))->Popup::get_elapsed_ms(); - if (((int)((ulonglong)elapsedMs >> 0x20) == 0) && ((uint)elapsedMs < (uint)this_00[0x15])) { + if ((GHIDRA_INT(((ulonglong)elapsedMs >> 0x20)) == 0) && (GHIDRA_UINT(elapsedMs) < GHIDRA_UINT(this_00[0x15]))) { this_00[6] = *result; return; } diff --git a/src/game/popup_queue.cpp b/src/game/popup_queue.cpp index b67d993..67ae461 100644 --- a/src/game/popup_queue.cpp +++ b/src/game/popup_queue.cpp @@ -18,26 +18,26 @@ void PopupQueue::destructor() puStack_c = &LAB_00af1360; local_10 = ExceptionList; ExceptionList = &local_10; - (**(code **)(in_ECX[2] + 0xc))(0xffffffff,__security_cookie ^ (int)register0x00000010 - 4U); + (**(code **)(in_ECX[2] + 0xc))(0xffffffff,__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); popupCount = in_ECX[1]; while (popupCount != 0) { piVar1 = (int *)*in_ECX; ptr = *(void **)(*piVar1 + 8); if (ptr != (void *)0x0) { - ((Popup *)((void *)((int)ptr + 0x24)))->Popup::free_line_buffers(); + ((Popup *)((void *)(GHIDRA_INT(ptr) + 0x24)))->Popup::free_line_buffers(); *(undefined4 *)((char *)ptr + 0xa0) = 0; *(undefined4 *)((char *)ptr + 0xa4) = 0; *(undefined4 *)((char *)ptr + 0x98) = 0; *(undefined4 *)((char *)ptr + 0x9c) = 0; *(undefined4 *)((char *)ptr + 0x90) = 0; *(undefined4 *)((char *)ptr + 0x94) = 0; - FID_conflict__Tidy((void *)((int)ptr + 0x84)); - FID_conflict__Tidy((void *)((int)ptr + 0x78)); + FID_conflict__Tidy((void *)(GHIDRA_INT(ptr) + 0x84)); + FID_conflict__Tidy((void *)(GHIDRA_INT(ptr) + 0x78)); local_8 = 0; if (((*(int **)((char *)ptr + 0x20) != (int *)0x0) && (isLastRef = (**(code **)(**(int **)((char *)ptr + 0x20) + 0xc))(), isLastRef != '\0')) && (g_imageReleaseFn != (void *)0x0)) { - (*g_imageReleaseFn)((int)ptr + 0x1c); + (*g_imageReleaseFn)(GHIDRA_INT(ptr) + 0x1c); } local_8 = 0xffffffff; operator_delete(ptr,0x148); @@ -57,14 +57,14 @@ void PopupQueue::destructor() (**(code **)(*piVar1 + 0x10))(); (**(code **)(*piVar1 + 8))(); lpCriticalSection = (LPCRITICAL_SECTION)in_ECX[4]; - *piVar1 = (int)KAGE::Mutex::vftable; + *piVar1 = GHIDRA_INT(KAGE)::Mutex::vftable; if (lpCriticalSection != (LPCRITICAL_SECTION)0x0) { DeleteCriticalSection(lpCriticalSection); operator_delete(lpCriticalSection,0x1c); in_ECX[4] = 0; } *(byte *)(in_ECX + 3) = *(byte *)(in_ECX + 3) & 0xfe; - *piVar1 = (int)KAGE::MutexBase::vftable; + *piVar1 = GHIDRA_INT(KAGE)::MutexBase::vftable; FUN_00498f80(); ExceptionList = local_10; return; @@ -107,7 +107,7 @@ void PopupQueue::Update() ExceptionList = &local_10; mutex = in_ECX + 2; self = in_ECX; - (**(code **)(in_ECX[2] + 0xc))(0xffffffff,__security_cookie ^ (int)register0x00000010 - 4U); + (**(code **)(in_ECX[2] + 0xc))(0xffffffff,__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); head = (int *)*in_ECX; local_38 = ©Head; copyHead = (int *)0x0; @@ -133,10 +133,10 @@ void PopupQueue::Update() pvVar2 = local_44; local_34 = 0; local_40 = operator_new(0xc); - local_44 = (void *)((int)pvVar2 + 1); + local_44 = (void *)(GHIDRA_INT(pvVar2) + 1); local_40[2] = setNode[2]; - *piVar6 = (int)local_40; - local_40[1] = (int)piVar6; + *piVar6 = GHIDRA_INT(local_40); + local_40[1] = GHIDRA_INT(piVar6); setNode = (int *)*setNode; } while (setNode != head); } @@ -145,18 +145,18 @@ void PopupQueue::Update() piVar6 = local_40; pvVar2 = local_44; local_38 = ©Head; - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); local_34 = 0; copyHead = operator_new(0xc); if (pvVar2 == (void *)0x0) { - *copyHead = (int)copyHead; - copyHead[1] = (int)copyHead; + *copyHead = GHIDRA_INT(copyHead); + copyHead[1] = GHIDRA_INT(copyHead); } else { - *copyHead = (int)setNode; - copyHead[1] = (int)piVar6; - setNode[1] = (int)copyHead; - *piVar6 = (int)copyHead; + *copyHead = GHIDRA_INT(setNode); + copyHead[1] = GHIDRA_INT(piVar6); + setNode[1] = GHIDRA_INT(copyHead); + *piVar6 = GHIDRA_INT(copyHead); } local_8 = 3; finishedSet = (int *)0x0; @@ -164,11 +164,11 @@ void PopupQueue::Update() copyCount = pvVar2; finishedSet = operator_new(0x18); piVar6 = mutex; - *finishedSet = (int)finishedSet; - finishedSet[1] = (int)finishedSet; - finishedSet[2] = (int)finishedSet; + *finishedSet = GHIDRA_INT(finishedSet); + finishedSet[1] = GHIDRA_INT(finishedSet); + finishedSet[2] = GHIDRA_INT(finishedSet); *(undefined2 *)(finishedSet + 3) = 0x101; - local_8 = CONCAT31(local_8._1_3_,4); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),4); (**(code **)(*mutex + 0x10))(); local_1c = (void *)0x1; setNode = (int *)*copyHead; @@ -181,16 +181,16 @@ void PopupQueue::Update() _Find_lower_bound<>(&local_44,puVar1); finishedSetHead = finishedSet; if ((*(char *)((char *)local_3c + 0xd) != '\0') || - (setNode = local_3c, *puVar1 < (uint)local_3c[4])) { + (setNode = local_3c, *puVar1 < GHIDRA_UINT(local_3c[4]))) { if (finishedCount == 0xaaaaaaa) { /* WARNING: Subroutine does not return */ FUN_004170d0(); } local_38 = &finishedSet; - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; local_34 = 0; puVar5 = operator_new(0x18); - local_8 = CONCAT31(local_8._1_3_,4); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),4); local_34 = 0; puVar5[4] = *puVar1; *(undefined1 *)(puVar5 + 5) = 0; @@ -198,13 +198,13 @@ void PopupQueue::Update() puVar5[1] = finishedSetHead; puVar5[2] = finishedSetHead; *(undefined2 *)(puVar5 + 3) = 0; - setNode = ((std::_Tree *)(&finishedSet))->std::_Tree::_Insert_node(local_44,(int)local_40,puVar5); + setNode = ((std::_Tree *)(&finishedSet))->std::_Tree::_Insert_node(local_44,GHIDRA_INT(local_40),puVar5); piVar6 = local_1c; } *(undefined1 *)(setNode + 5) = 1; } setNode = (int *)*setNode; - local_1c = (int *)((int)piVar6 + 1); + local_1c = (int *)(GHIDRA_INT(piVar6) + 1); } while (setNode != copyHead); piVar6 = mutex; } @@ -214,7 +214,7 @@ void PopupQueue::Update() do { puVar1 = (uint *)setNode[2]; _Find_lower_bound<>(&local_44,puVar1); - if (((*(char *)((char *)local_3c + 0xd) == '\0') && ((uint)local_3c[4] <= *puVar1)) && + if (((*(char *)((char *)local_3c + 0xd) == '\0') && (GHIDRA_UINT(local_3c[4]) <= *puVar1)) && (local_3c != finishedSet)) { ((Popup *)(puVar1 + 9))->Popup::free_line_buffers(); puVar1[0x28] = 0; @@ -225,13 +225,13 @@ void PopupQueue::Update() puVar1[0x25] = 0; FID_conflict__Tidy(puVar1 + 0x21); FID_conflict__Tidy(puVar1 + 0x1e); - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; if ((((int *)puVar1[8] != (int *)0x0) && (cVar4 = (**(code **)(*(int *)puVar1[8] + 0xc))(), cVar4 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(puVar1 + 7); } - local_8 = CONCAT31(local_8._1_3_,4); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),4); operator_delete(puVar1,0x148); setNode[2] = 0; piVar6 = (int *)*setNode; @@ -323,7 +323,7 @@ int PopupQueue::push(void *desc) local_8 = 0xffffffff; puStack_c = &LAB_00b0ed37; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; popupMemory = operator_new(0x148); sourceDesc = desc; diff --git a/src/game/popup_window.cpp b/src/game/popup_window.cpp index cbe1761..5f571c3 100644 --- a/src/game/popup_window.cpp +++ b/src/game/popup_window.cpp @@ -22,16 +22,16 @@ void PopupWindow::hide() if (iVar1 != 1) { fieldOffset = 0x60; } - if (*(int *)(fieldOffset + (int)this) != 0) { + if (*(int *)(fieldOffset + GHIDRA_INT(this)) != 0) { fieldOffset = 0x184; if (iVar1 != 1) { fieldOffset = 0x70; } - if (*(char *)(fieldOffset + (int)this) == '\0') { + if (*(char *)(fieldOffset + GHIDRA_INT(this)) == '\0') { if (iVar1 != 1) { animNameOffset = 0x60; } - animNameChar = *(byte **)(animNameOffset + (int)this); + animNameChar = *(byte **)(animNameOffset + GHIDRA_INT(this)); if (0xf < *(uint *)(animNameChar + 0x14)) { animNameChar = *(byte **)animNameChar; } @@ -41,7 +41,7 @@ void PopupWindow::hide() isLess = ch < (byte)*dissapearChar; if (ch != *dissapearChar) { LAB_009b75c6: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_009b75cb; } if (ch == 0) break; @@ -61,7 +61,7 @@ LAB_009b75cb: if (iVar1 != 1) { animNameOffset = 0x60; } - animNameChar = *(byte **)(animNameOffset + (int)this); + animNameChar = *(byte **)(animNameOffset + GHIDRA_INT(this)); if (0xf < *(uint *)(animNameChar + 0x14)) { animNameChar = *(byte **)animNameChar; } @@ -71,7 +71,7 @@ LAB_009b75cb: isLess = ch < (byte)*dissapearChar; if (ch != *dissapearChar) { LAB_009b7580: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_009b7585; } if (ch == 0) break; @@ -95,12 +95,12 @@ LAB_009b7585: if (*(int *)((char *)this + 4) != 1) { iVar1 = 0x2c; } - ((ANM2 *)((ANM2 *)(iVar1 + (int)this)))->ANM2::Play((byte *)"Dissapear",0); + ((ANM2 *)((ANM2 *)(iVar1 + GHIDRA_INT(this))))->ANM2::Play((byte *)"Dissapear",0); iVar1 = 400; if (*(int *)((char *)this + 4) != 1) { iVar1 = 0x7c; } - ((AnimationState *)((AnimationState *)(iVar1 + (int)this)))->AnimationState::SetAnimationData((void *)0x0); + ((AnimationState *)((AnimationState *)(iVar1 + GHIDRA_INT(this))))->AnimationState::SetAnimationData((void *)0x0); } return; } diff --git a/src/game/preload_manager.cpp b/src/game/preload_manager.cpp index bd862b4..2292482 100644 --- a/src/game/preload_manager.cpp +++ b/src/game/preload_manager.cpp @@ -48,7 +48,7 @@ void PreloadManager::load_group(std_string *groupName) uVar1 = *puVar6; *puVar6 = uVar2; groupName[-1]._capacity = uVar1; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); if (swapImageRefCount != (int *)0x0) { cVar4 = (**(code **)(*swapImageRefCount + 0xc))(); if ((cVar4 != '\0') && (g_imageReleaseFn != (void *)0x0)) { diff --git a/src/game/procedural_effect.cpp b/src/game/procedural_effect.cpp index a64f76e..f5397bc 100644 --- a/src/game/procedural_effect.cpp +++ b/src/game/procedural_effect.cpp @@ -33,7 +33,7 @@ byte ProceduralEffect::roll_trigger_target(uint *outTarget, float *outChance, RN local_8 = 0xffffffff; puStack_c = &LAB_00b0f765; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar3 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; rngValue = 0; entryId = 0xffff; @@ -66,7 +66,7 @@ LAB_009e0a8b: } FUN_00694f00(&local_34,2); local_8 = 0; - iVar4 = (int)((ulonglong)((longlong)(entriesEnd - local_34) * 0xb60b60b7) >> 0x20); + iVar4 = GHIDRA_INT(((ulonglong)((longlong)(entriesEnd - local_34) * 0xb60b60b7) >> 0x20)); break; case 1: rngValue = 9; @@ -75,7 +75,7 @@ LAB_009e0a8b: if (rngValue != 0) goto LAB_009e0a8b; FUN_00694f00(&local_34,9); local_8 = 1; - iVar4 = (int)((ulonglong)((longlong)(entriesEnd - local_34) * 0xb60b60b7) >> 0x20); + iVar4 = GHIDRA_INT(((ulonglong)((longlong)(entriesEnd - local_34) * 0xb60b60b7) >> 0x20)); break; case 2: rngValue = 5; @@ -87,7 +87,7 @@ LAB_009e0a8b: } FUN_00694f00(&local_34,5); local_8 = 2; - iVar4 = (int)((ulonglong)((longlong)(entriesEnd - local_34) * 0xb60b60b7) >> 0x20); + iVar4 = GHIDRA_INT(((ulonglong)((longlong)(entriesEnd - local_34) * 0xb60b60b7) >> 0x20)); break; case 3: rng = (RNG *)0x3ca3d70a; @@ -127,7 +127,7 @@ LAB_009e0a8b: foundNode = (entityConfig->_entities)._head; entitiesHead = foundNode; } - iVar4 = (int)foundNode + 0x18; + iVar4 = GHIDRA_INT(foundNode) + 0x18; if (foundNode == entitiesHead) { iVar4 = 0; } @@ -166,7 +166,7 @@ LAB_009e0a8b: std::vector::_Tidy(); switchD_009e0787_default: LAB_009e080a: - *outTargetLocal = rngValue << 0x10 | (uint)entryId; + *outTargetLocal = rngValue << 0x10 | GHIDRA_UINT(entryId); *outChanceLocal = (float)rng; if ((float)rng == 0.0) { ExceptionList = local_10; @@ -206,7 +206,7 @@ byte ProceduralEffect::roll_spawn_target(uint *outTarget, float *outChance, RNG uStack_8 = 0xffffffff; puStack_c = &LAB_00b0f7ad; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; entityType = 0; local_24 = 0; @@ -266,7 +266,7 @@ byte ProceduralEffect::roll_spawn_target(uint *outTarget, float *outChance, RNG } uVar3 = *(uint *)(configNode + 0x18) & 0xffff; if ((*(uint *)(configNode + 0x18) != 1) && (*(char *)(configNode + 0x44) == '\0')) { - local_24 = (uint)*(ushort *)(configNode + 0x1c); + local_24 = GHIDRA_UINT(*(ushort *)(configNode + 0x1c)); entityType = uVar3; if (uVar2 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -281,7 +281,7 @@ byte ProceduralEffect::roll_spawn_target(uint *outTarget, float *outChance, RNG uVar2 = uVar2 << ((byte)rng->_shift2 & 0x1f) ^ uVar2; uVar2 = uVar2 >> ((byte)rng->_shift3 & 0x1f) ^ uVar2; rng->_seed = uVar2; - local_14 = (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + local_14 = (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283062e-10 + 0.1; } local_20 = local_20 + -1; @@ -307,7 +307,7 @@ byte ProceduralEffect::roll_spawn_target(uint *outTarget, float *outChance, RNG FUN_00694f00(&iStack_38,2); uStack_8 = 0; uVar3 = ((RNG *)(rng))->RNG::RandomInt((iStack_34 - iStack_38) / 0x168); - uVar3 = (uint)*(ushort *)(uVar3 * 0x168 + 4 + iStack_38); + uVar3 = GHIDRA_UINT(*(ushort *)(uVar3 * 0x168 + 4 + iStack_38)); std::vector::_Tidy(uVar2); local_14 = 0.01; entityType = 2; @@ -325,7 +325,7 @@ byte ProceduralEffect::roll_spawn_target(uint *outTarget, float *outChance, RNG FUN_00694f00(&iStack_38,5); uStack_8 = 1; uVar3 = ((RNG *)(rng))->RNG::RandomInt((iStack_34 - iStack_38) / 0x168); - uVar3 = (uint)*(ushort *)(uVar3 * 0x168 + 4 + iStack_38); + uVar3 = GHIDRA_UINT(*(ushort *)(uVar3 * 0x168 + 4 + iStack_38)); std::vector::_Tidy(); } break; @@ -333,7 +333,7 @@ byte ProceduralEffect::roll_spawn_target(uint *outTarget, float *outChance, RNG FUN_00694f00(&iStack_38,4); uStack_8 = 2; uVar3 = ((RNG *)(rng))->RNG::RandomInt((iStack_34 - iStack_38) / 0x168); - uVar3 = (uint)*(ushort *)(uVar3 * 0x168 + 4 + iStack_38); + uVar3 = GHIDRA_UINT(*(ushort *)(uVar3 * 0x168 + 4 + iStack_38)); std::vector::_Tidy(); local_14 = 0.02; entityType = 4; @@ -370,7 +370,7 @@ byte ProceduralEffect::roll_spawn_target(uint *outTarget, float *outChance, RNG foundNode = (entityConfig->_entities)._head; endNode = foundNode; } - iVar4 = (int)foundNode + 0x18; + iVar4 = GHIDRA_INT(foundNode) + 0x18; if (foundNode == endNode) { iVar4 = 0; } @@ -464,17 +464,17 @@ LAB_009e1045: case 1: seed = 0; do { - uVar7 = (int)(g_manager->_itemConfig)._collectibles._end - - (int)(g_manager->_itemConfig)._collectibles._begin >> 2; + uVar7 = GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - + GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2; if (uVar3 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar1 = (code *)swi(3); (*pcVar1)(); return; } - rng._seed = (uint)rng._seed >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; + rng._seed = GHIDRA_UINT(rng._seed) >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; rng._seed = rng._seed << ((byte)rng._shift2 & 0x1f) ^ rng._seed; - uVar3 = (uint)rng._seed >> ((byte)rng._shift3 & 0x1f) ^ rng._seed; + uVar3 = GHIDRA_UINT(rng._seed) >> ((byte)rng._shift3 & 0x1f) ^ rng._seed; uVar6 = 0; if (uVar7 != 0) { uVar6 = uVar3 % uVar7; @@ -487,12 +487,12 @@ LAB_009e1045: break; } seed = seed + 1; - } while ((int)seed < 10); + } while (GHIDRA_INT(seed) < 10); break; case 2: *(undefined4 *)((char *)this + 0x18) = 0x447a0000; - roll_trigger_target((uint *)((int)this + 0x10),(float *)&seed,&rng); - roll_spawn_target((uint *)((int)this + 0x14),(float *)&conditionType,&rng); + roll_trigger_target((uint *)(GHIDRA_INT(this) + 0x10),(float *)&seed,&rng); + roll_spawn_target((uint *)(GHIDRA_INT(this) + 0x14),(float *)&conditionType,&rng); if (0.0 < (float)seed) { *(float *)((char *)this + 0x60) = (float)conditionType / (float)seed; } @@ -501,15 +501,15 @@ LAB_009e1045: } break; case 3: - seed = (uint)((RNG *)(&rng))->RNG::RandomFloat(); + seed = GHIDRA_UINT(((RNG *)(&rng))->RNG)::RandomFloat(); fVar8 = ((RNG *)(&rng))->RNG::RandomFloat(); - conditionType = (int)(fVar8 * (float)seed); - seed = (uint)((RNG *)(&rng))->RNG::RandomFloat(); + conditionType = GHIDRA_INT((fVar8 * (float)seed)); + seed = GHIDRA_UINT(((RNG *)(&rng))->RNG)::RandomFloat(); *(float *)((char *)this + 0x18) = (float)seed * (float)conditionType * 8000.0 + 30.0; fVar8 = ((RNG *)(&rng))->RNG::RandomFloat(); - seed = (uint)(fVar8 - 0.2); + seed = GHIDRA_UINT((fVar8 - 0.2)); fVar8 = ((RNG *)(&rng))->RNG::RandomFloat(); - seed = (uint)(fVar8 * (float)seed * 80.0); + seed = GHIDRA_UINT((fVar8 * (float)seed * 80.0)); fVar8 = (float)seed; if ((float)seed <= 0.0) { fVar8 = 0.0; @@ -567,21 +567,21 @@ LAB_009e1045: } while (uVar7 < 0x80); rng._seed = uVar3; nonLudovicoFlags = ((BitSet128 *)(&g_tearFlagLudovico))->BitSet128::__bnot(&nonLudovicoFlagsBuf); - *(uint *)((char *)this + 0x20) = *(uint *)((char *)this + 0x20) & (uint)nonLudovicoFlags->_l; + *(uint *)((char *)this + 0x20) = *(uint *)((char *)this + 0x20) & GHIDRA_UINT(nonLudovicoFlags->_l); *(uint *)((char *)this + 0x24) = - *(uint *)((char *)this + 0x24) & *(uint *)((int)&nonLudovicoFlags->_l + 4); - *(uint *)((char *)this + 0x28) = *(uint *)((char *)this + 0x28) & (uint)nonLudovicoFlags->_h; + *(uint *)((char *)this + 0x24) & *(uint *)(GHIDRA_INT(&nonLudovicoFlags->_l) + 4); + *(uint *)((char *)this + 0x28) = *(uint *)((char *)this + 0x28) & GHIDRA_UINT(nonLudovicoFlags->_h); *(uint *)((char *)this + 0x2c) = - *(uint *)((char *)this + 0x2c) & *(uint *)((int)&nonLudovicoFlags->_h + 4); + *(uint *)((char *)this + 0x2c) & *(uint *)(GHIDRA_INT(&nonLudovicoFlags->_h) + 4); } break; case 4: - roll_spawn_target((uint *)((int)this + 0x10),(float *)&actionType,&rng); + roll_spawn_target((uint *)(GHIDRA_INT(this) + 0x10),(float *)&actionType,&rng); *(float *)((char *)this + 0x60) = (float)actionType * 100.0; break; case 5: fVar8 = ((RNG *)(&rng))->RNG::RandomFloat(); - seed = (uint)(fVar8 * 10.0 + 5.0); + seed = GHIDRA_UINT((fVar8 * 10.0 + 5.0)); fVar8 = ((RNG *)(&rng))->RNG::RandomFloat(); *(undefined4 *)((char *)this + 0x60) = 0x3f800000; *(float *)((char *)this + 0x1c) = fVar8 * 10.0 + (float)seed; @@ -595,9 +595,9 @@ LAB_009e1045: colorizeAmount = ((RNG *)(&rng))->RNG::RandomFloat(); colorizeBlue = ((RNG *)(&rng))->RNG::RandomFloat(); colorizeGreen = ((RNG *)(&rng))->RNG::RandomFloat(); - actionType = (int)((RNG *)(&rng))->RNG::RandomFloat(); - conditionType = (int)((RNG *)(&rng))->RNG::RandomFloat(); - seed = (uint)((RNG *)(&rng))->RNG::RandomFloat(); + actionType = GHIDRA_INT(((RNG *)(&rng))->RNG)::RandomFloat(); + conditionType = GHIDRA_INT(((RNG *)(&rng))->RNG)::RandomFloat(); + seed = GHIDRA_UINT(((RNG *)(&rng))->RNG)::RandomFloat(); randomColor._tint[0] = ((RNG *)(&rng))->RNG::RandomFloat(); randomColor._tint[1] = (float)seed; randomColor._tint[2] = (float)conditionType; @@ -609,11 +609,11 @@ LAB_009e1045: randomColor._offset[1] = offsetGreen; randomColor._tint[3] = 1.0; randomColor._offset[2] = offsetBlue; - ((Color *)((Color *)((int)this + 0x34)))->Color::operator_assign(&randomColor); + ((Color *)((Color *)(GHIDRA_INT(this) + 0x34)))->Color::operator_assign(&randomColor); } } if ((*(int *)this == 6) && - (roll_trigger_target((uint *)((int)this + 0xc),&local_24,&rng), 0.0 < local_24)) { + (roll_trigger_target((uint *)(GHIDRA_INT(this) + 0xc),&local_24,&rng), 0.0 < local_24)) { *(float *)((char *)this + 0x60) = *(float *)((char *)this + 0x60) / local_24; } if (*(int *)this == 1) { diff --git a/src/game/procedural_item_manager.cpp b/src/game/procedural_item_manager.cpp index cbe4644..2c18abf 100644 --- a/src/game/procedural_item_manager.cpp +++ b/src/game/procedural_item_manager.cpp @@ -20,7 +20,7 @@ ProceduralItemManager::~ProceduralItemManager() this_00 = &indexSet->_spawnTriggerTargets; FID_conflict__Erase_tree_>_> (this_00,(fuzzer_allocator_> *)this_00, - *(_Tree_node **)((int)(indexSet->_spawnTriggerTargets)._head + 4)); + *(_Tree_node **)(GHIDRA_INT((indexSet->_spawnTriggerTargets)._head) + 4)); operator_delete(this_00->_head,0x18); FID_conflict__Tidy(&(*(undefined1 *)((char *)(indexSet) + 0x1c))); local_8 = 0; diff --git a/src/game/projectile_params.cpp b/src/game/projectile_params.cpp index b123410..e9f1853 100644 --- a/src/game/projectile_params.cpp +++ b/src/game/projectile_params.cpp @@ -17,7 +17,7 @@ ProjectileParams::ProjectileParams() this->Acceleration = 1.01; this->Spread = 1.0; this->CircleAngle = - (float)((double)(int)rngValue + __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + (float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 3.1415927; (this->Color)._tint[0] = 1.0; (this->Color)._tint[1] = 1.0; @@ -31,7 +31,7 @@ ProjectileParams::ProjectileParams() (this->Color)._offset[1] = 0.0; (this->Color)._offset[2] = 0.0; *(undefined4 *)&this->BulletFlags = 0; - *(undefined4 *)((int)&this->BulletFlags + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&this->BulletFlags) + 4) = 0; (this->PositionOffset).x = g_vectorZero.x; (this->PositionOffset).y = g_vectorZero.y; (this->TargetPosition).x = g_vectorZero.x; @@ -41,7 +41,7 @@ ProjectileParams::ProjectileParams() this->DotProductLimit = -1000.0; this->WiggleFrameOffset = 0; *(undefined4 *)&this->ChangeFlags = 0; - *(undefined4 *)((int)&this->ChangeFlags + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&this->ChangeFlags) + 4) = 0; this->ChangeVelocity = 0.0; this->ChangeTimeout = 0x1e; this->DepthOffset = 0.0; diff --git a/src/game/rail_manager.cpp b/src/game/rail_manager.cpp index 32d3ab0..a6863b6 100644 --- a/src/game/rail_manager.cpp +++ b/src/game/rail_manager.cpp @@ -29,7 +29,7 @@ void RailManager::Render(Vector *offset) bVar1 = (frontAnimState->_sprite)._filename._buf[gridIndex - 0x1c0]; if (-1 < (char)bVar1) { if (gridIndex < 0x1c0) { - gridWidth = *(int *)(gridEntityOffset + (int)frontAnimState->_room); + gridWidth = *(int *)(gridEntityOffset + GHIDRA_INT(frontAnimState->_room)); if ((gridWidth != 0) && (*(int *)(gridWidth + 4) == 7)) goto LAB_009e3195; if ((bVar1 == 0xff) || ((bVar1 & 0x40) == 0)) goto LAB_009e2fd2; bVar1 = bVar1 & 0x3f; @@ -45,9 +45,9 @@ LAB_009e2fe1: } gridWidth = *(int *)((char *)frontAnimState->_room + 0xc); pixelScale = g_displayPixelRatio * g_screenPointScale; - dVar2 = floor((double)(((((float)((int)gridIndex % gridWidth) * 40.0 + 40.0) - 60.0) * 0.65 + dVar2 = floor((double)(((((float)(GHIDRA_INT(gridIndex) % gridWidth) * 40.0 + 40.0) - 60.0) * 0.65 + (g_screenWidth - 338.0) * 0.5) * pixelScale + 0.5)); - dVar3 = floor((double)(((((float)((int)gridIndex / gridWidth) * 40.0 + 120.0) - 140.0) * + dVar3 = floor((double)(((((float)(GHIDRA_INT(gridIndex) / gridWidth) * 40.0 + 120.0) - 140.0) * 0.65 + (g_screenHeight - 182.0) * 0.5) * pixelScale + 0.5)); renderPos.x = (float)dVar2 / pixelScale + offset->x; renderPos.y = (float)dVar3 / pixelScale + offset->y; @@ -68,7 +68,7 @@ LAB_009e2fe1: LAB_009e3195: gridEntityOffset = gridEntityOffset + 4; gridIndex = gridIndex + 1; - } while ((int)gridIndex < gridSize); + } while (GHIDRA_INT(gridIndex) < gridSize); } return; } diff --git a/src/game/rebirth_save_data.cpp b/src/game/rebirth_save_data.cpp index afdb404..d4f68d1 100644 --- a/src/game/rebirth_save_data.cpp +++ b/src/game/rebirth_save_data.cpp @@ -31,7 +31,7 @@ void RebirthSaveData::Clear() *(undefined4 *)(in_ECX + 0x1fa) = 0; in_ECX[0x1fc] = 0; *(undefined1 *)(in_ECX + 0x1fd) = 0; - memset((void *)((int)in_ECX + 0x3fb),0,0x39); + memset((void *)(GHIDRA_INT(in_ECX) + 0x3fb),0,0x39); *(undefined4 *)(in_ECX + 0x21a) = 0; *(undefined4 *)(in_ECX + 0x21c) = 0; *(undefined4 *)(in_ECX + 0x21e) = 0; @@ -77,9 +77,9 @@ void RebirthSaveData::repair_counters() minValue = 1; piVar1 = &minValue; if (1 < *(int *)((char *)this + 0x458)) { - piVar1 = (int *)((int)this + 0x458); + piVar1 = (int *)(GHIDRA_INT(this) + 0x458); } - piVar2 = (int *)((int)this + 0x454); + piVar2 = (int *)(GHIDRA_INT(this) + 0x454); *(int *)((char *)this + 0x458) = *piVar1; minValue = 1; piVar1 = &minValue; @@ -106,10 +106,10 @@ void RebirthSaveData::repair_counters() minValue = 1; piVar1 = &minValue; if (1 < *(int *)((char *)this + 0x45c)) { - piVar1 = (int *)((int)this + 0x45c); + piVar1 = (int *)(GHIDRA_INT(this) + 0x45c); } *(int *)((char *)this + 0x45c) = *piVar1; - piVar1 = (int *)((int)this + 0x454); + piVar1 = (int *)(GHIDRA_INT(this) + 0x454); minValue = 1; piVar2 = &minValue; if (1 < *piVar1) { @@ -120,10 +120,10 @@ void RebirthSaveData::repair_counters() minValue = 1; piVar1 = &minValue; if (1 < *(int *)((char *)this + 0x460)) { - piVar1 = (int *)((int)this + 0x460); + piVar1 = (int *)(GHIDRA_INT(this) + 0x460); } *(int *)((char *)this + 0x460) = *piVar1; - piVar1 = (int *)((int)this + 0x454); + piVar1 = (int *)(GHIDRA_INT(this) + 0x454); minValue = 1; piVar2 = &minValue; if (1 < *piVar1) { @@ -134,10 +134,10 @@ void RebirthSaveData::repair_counters() minValue = 1; piVar1 = &minValue; if (1 < *(int *)((char *)this + 0x464)) { - piVar1 = (int *)((int)this + 0x464); + piVar1 = (int *)(GHIDRA_INT(this) + 0x464); } *(int *)((char *)this + 0x464) = *piVar1; - piVar1 = (int *)((int)this + 0x454); + piVar1 = (int *)(GHIDRA_INT(this) + 0x454); minValue = 1; piVar2 = &minValue; if (1 < *piVar1) { @@ -148,10 +148,10 @@ void RebirthSaveData::repair_counters() minValue = 1; piVar1 = &minValue; if (1 < *(int *)((char *)this + 0x468)) { - piVar1 = (int *)((int)this + 0x468); + piVar1 = (int *)(GHIDRA_INT(this) + 0x468); } *(int *)((char *)this + 0x468) = *piVar1; - piVar1 = (int *)((int)this + 0x454); + piVar1 = (int *)(GHIDRA_INT(this) + 0x454); minValue = 1; piVar2 = &minValue; if (1 < *piVar1) { @@ -162,10 +162,10 @@ void RebirthSaveData::repair_counters() minValue = 1; piVar1 = &minValue; if (1 < *(int *)((char *)this + 0x46c)) { - piVar1 = (int *)((int)this + 0x46c); + piVar1 = (int *)(GHIDRA_INT(this) + 0x46c); } *(int *)((char *)this + 0x46c) = *piVar1; - piVar1 = (int *)((int)this + 0x454); + piVar1 = (int *)(GHIDRA_INT(this) + 0x454); minValue = 1; piVar2 = &minValue; if (1 < *piVar1) { @@ -176,10 +176,10 @@ void RebirthSaveData::repair_counters() minValue = 1; piVar1 = &minValue; if (1 < *(int *)((char *)this + 0x470)) { - piVar1 = (int *)((int)this + 0x470); + piVar1 = (int *)(GHIDRA_INT(this) + 0x470); } *(int *)((char *)this + 0x470) = *piVar1; - piVar1 = (int *)((int)this + 0x454); + piVar1 = (int *)(GHIDRA_INT(this) + 0x454); minValue = 1; piVar2 = &minValue; if (1 < *piVar1) { @@ -190,10 +190,10 @@ void RebirthSaveData::repair_counters() minValue = 1; piVar1 = &minValue; if (1 < *(int *)((char *)this + 0x474)) { - piVar1 = (int *)((int)this + 0x474); + piVar1 = (int *)(GHIDRA_INT(this) + 0x474); } *(int *)((char *)this + 0x474) = *piVar1; - piVar1 = (int *)((int)this + 0x454); + piVar1 = (int *)(GHIDRA_INT(this) + 0x454); minValue = 1; piVar2 = &minValue; if (1 < *piVar1) { @@ -204,10 +204,10 @@ void RebirthSaveData::repair_counters() minValue = 1; piVar1 = &minValue; if (1 < *(int *)((char *)this + 0x478)) { - piVar1 = (int *)((int)this + 0x478); + piVar1 = (int *)(GHIDRA_INT(this) + 0x478); } *(int *)((char *)this + 0x478) = *piVar1; - piVar1 = (int *)((int)this + 0x454); + piVar1 = (int *)(GHIDRA_INT(this) + 0x454); minValue = 1; piVar2 = &minValue; if (1 < *piVar1) { @@ -218,10 +218,10 @@ void RebirthSaveData::repair_counters() minValue = 1; piVar1 = &minValue; if (1 < *(int *)((char *)this + 0x47c)) { - piVar1 = (int *)((int)this + 0x47c); + piVar1 = (int *)(GHIDRA_INT(this) + 0x47c); } *(int *)((char *)this + 0x47c) = *piVar1; - piVar1 = (int *)((int)this + 0x454); + piVar1 = (int *)(GHIDRA_INT(this) + 0x454); minValue = 1; piVar2 = &minValue; if (1 < *piVar1) { @@ -232,10 +232,10 @@ void RebirthSaveData::repair_counters() minValue = 1; piVar1 = &minValue; if (1 < *(int *)((char *)this + 0x480)) { - piVar1 = (int *)((int)this + 0x480); + piVar1 = (int *)(GHIDRA_INT(this) + 0x480); } *(int *)((char *)this + 0x480) = *piVar1; - piVar1 = (int *)((int)this + 0x454); + piVar1 = (int *)(GHIDRA_INT(this) + 0x454); minValue = 1; piVar2 = &minValue; if (1 < *piVar1) { @@ -246,10 +246,10 @@ void RebirthSaveData::repair_counters() minValue = 1; piVar1 = &minValue; if (1 < *(int *)((char *)this + 0x484)) { - piVar1 = (int *)((int)this + 0x484); + piVar1 = (int *)(GHIDRA_INT(this) + 0x484); } *(int *)((char *)this + 0x484) = *piVar1; - piVar1 = (int *)((int)this + 0x454); + piVar1 = (int *)(GHIDRA_INT(this) + 0x454); minValue = 1; piVar2 = &minValue; if (1 < *piVar1) { @@ -271,10 +271,10 @@ void RebirthSaveData::repair_counters() minValue = 1; piVar1 = &minValue; if (1 < *(int *)((char *)this + 0x488)) { - piVar1 = (int *)((int)this + 0x488); + piVar1 = (int *)(GHIDRA_INT(this) + 0x488); } *(int *)((char *)this + 0x488) = *piVar1; - piVar1 = (int *)((int)this + 0x454); + piVar1 = (int *)(GHIDRA_INT(this) + 0x454); minValue = 1; piVar2 = &minValue; if (1 < *piVar1) { @@ -286,10 +286,10 @@ void RebirthSaveData::repair_counters() minValue = 1; piVar1 = &minValue; if (1 < *(int *)((char *)this + 0x48c)) { - piVar1 = (int *)((int)this + 0x48c); + piVar1 = (int *)(GHIDRA_INT(this) + 0x48c); } *(int *)((char *)this + 0x48c) = *piVar1; - piVar1 = (int *)((int)this + 0x454); + piVar1 = (int *)(GHIDRA_INT(this) + 0x454); minValue = 1; piVar2 = &minValue; if (1 < *piVar1) { @@ -301,10 +301,10 @@ void RebirthSaveData::repair_counters() minValue = 1; piVar1 = &minValue; if (1 < *(int *)((char *)this + 0x494)) { - piVar1 = (int *)((int)this + 0x494); + piVar1 = (int *)(GHIDRA_INT(this) + 0x494); } *(int *)((char *)this + 0x494) = *piVar1; - piVar1 = (int *)((int)this + 0x454); + piVar1 = (int *)(GHIDRA_INT(this) + 0x454); minValue = 1; piVar2 = &minValue; if (1 < *piVar1) { @@ -316,10 +316,10 @@ void RebirthSaveData::repair_counters() minValue = 1; piVar1 = &minValue; if (1 < *(int *)((char *)this + 0x490)) { - piVar1 = (int *)((int)this + 0x490); + piVar1 = (int *)(GHIDRA_INT(this) + 0x490); } *(int *)((char *)this + 0x490) = *piVar1; - piVar1 = (int *)((int)this + 0x454); + piVar1 = (int *)(GHIDRA_INT(this) + 0x454); minValue = 1; piVar2 = &minValue; if (1 < *piVar1) { @@ -331,10 +331,10 @@ void RebirthSaveData::repair_counters() minValue = 1; piVar1 = &minValue; if (1 < *(int *)((char *)this + 0x498)) { - piVar1 = (int *)((int)this + 0x498); + piVar1 = (int *)(GHIDRA_INT(this) + 0x498); } *(int *)((char *)this + 0x498) = *piVar1; - piVar1 = (int *)((int)this + 0x454); + piVar1 = (int *)(GHIDRA_INT(this) + 0x454); minValue = 1; piVar2 = &minValue; if (1 < *piVar1) { diff --git a/src/game/reference_count_base.cpp b/src/game/reference_count_base.cpp index 261addf..8381c4d 100644 --- a/src/game/reference_count_base.cpp +++ b/src/game/reference_count_base.cpp @@ -10,7 +10,7 @@ ReferenceCountBase::ReferenceCountBase() puStack_c = &LAB_00af0d80; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; *(undefined ***)this = vftable; *(undefined4 *)(this + 4) = 0x10001; diff --git a/src/game/render_batch.cpp b/src/game/render_batch.cpp index 63fa954..de73ed0 100644 --- a/src/game/render_batch.cpp +++ b/src/game/render_batch.cpp @@ -23,7 +23,7 @@ void RenderBatch::set_state(int param_1) int *shaderUniforms; int *uniforms; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b13216; local_1c = ExceptionList; @@ -57,13 +57,13 @@ void RenderBatch::set_state(int param_1) } else { local_28 = *(size_t *)(param_1 + 0x48); - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); FUN_00a12280(&local_24,&local_28); if (local_24 != DAT_00c37988) { do { if (*(int *)(*(int *)((char *)local_24 + 0x14) + 0x48) != *(int *)(param_1 + 0x48)) break; if (*(int *)((char *)local_24 + 0x14) == param_1) { - ((KAGE::SmartPointer *)(&foundImage))->KAGE::SmartPointer::operator_assign((void *)((int)local_24 + 0x14)); + ((KAGE::SmartPointer *)(&foundImage))->KAGE::SmartPointer::operator_assign((void *)(GHIDRA_INT(local_24) + 0x14)); goto LAB_00a66ecc; } std:: @@ -79,8 +79,8 @@ LAB_00a66ecc: local_24 = (void *)0x5; } ((KAGE::SmartPointer *)((void *)(in_ECX + 8)))->KAGE::SmartPointer::operator_assign(other); - if (((uint)local_24 & 2) != 0) { - local_24 = (void *)((uint)local_24 & 0xfffffffd); + if ((GHIDRA_UINT(local_24) & 2) != 0) { + local_24 = (void *)(GHIDRA_UINT(local_24) & 0xfffffffd); local_14 = 3; if (((emptyImageRefCount != (ReferenceCountBase *)0x0) && (cVar2 = emptyImageRefCount->vfunc_3(), cVar2 != '\0')) && @@ -88,7 +88,7 @@ LAB_00a66ecc: (*g_imageReleaseFn)(&emptyImage); } } - if (((((uint)local_24 & 1) != 0) && (local_14 = 4, foundImageRefCount != (int *)0x0)) && + if ((((GHIDRA_UINT(local_24) & 1) != 0) && (local_14 = 4, foundImageRefCount != (int *)0x0)) && ((cVar2 = (**(code **)(*foundImageRefCount + 0xc))(), cVar2 != '\0' && (g_imageReleaseFn != (void *)0x0)))) { (*g_imageReleaseFn)(&foundImage); @@ -102,17 +102,17 @@ LAB_00a66ecc: *(int *)(in_ECX + 0x20) = g_graphicsManager_blendMode[4]; pvVar1 = g_currentShader; *(void **)(in_ECX + 0x24) = g_currentShader; - shaderUniforms = (int *)((int)pvVar1 + 0x40); + shaderUniforms = (int *)(GHIDRA_INT(pvVar1) + 0x40); if (uniforms != shaderUniforms) { local_2c = (ReferenceCountBase *)*shaderUniforms; - local_28 = *(int *)((char *)pvVar1 + 0x44) - (int)local_2c; + local_28 = *(int *)((char *)pvVar1 + 0x44) - GHIDRA_INT(local_2c); local_24 = (void *)*uniforms; - if ((uint)(*(int *)(in_ECX + 0x30) - (int)local_24 >> 2) < (uint)((int)local_28 >> 2)) { - std::vector::reserve_clear((int)local_28 >> 2); + if (GHIDRA_UINT((*(int *)(in_ECX + 0x30) - GHIDRA_INT(local_24) >> 2)) < GHIDRA_UINT((GHIDRA_INT(local_28) >> 2))) { + std::vector::reserve_clear(GHIDRA_INT(local_28) >> 2); local_24 = (void *)*uniforms; } memmove(local_24,local_2c,local_28); - *(size_t *)(in_ECX + 0x2c) = (int)local_24 + local_28; + *(size_t *)(in_ECX + 0x2c) = GHIDRA_INT(local_24) + local_28; } if ((((*(int *)(in_ECX + 0x10) == 0) && (*(int *)(in_ECX + 0x14) == 1)) && (*(int *)(in_ECX + 0x18) == 0)) && @@ -162,8 +162,8 @@ byte RenderBatch::is_state_equal(void *texture) } shaderUniform = *(int **)((char *)pvVar1 + 0x40); batchUniform = *(int **)((char *)this + 0x28); - uniformCount = *(int *)((char *)this + 0x2c) - (int)batchUniform >> 2; - if (uniformCount != *(int *)((char *)pvVar1 + 0x44) - (int)shaderUniform >> 2) { + uniformCount = *(int *)((char *)this + 0x2c) - GHIDRA_INT(batchUniform) >> 2; + if (uniformCount != *(int *)((char *)pvVar1 + 0x44) - GHIDRA_INT(shaderUniform) >> 2) { return 0; } bytesLeft = uniformCount * 4; diff --git a/src/game/revive_player_menu.cpp b/src/game/revive_player_menu.cpp index c5e8141..6c0bcc4 100644 --- a/src/game/revive_player_menu.cpp +++ b/src/game/revive_player_menu.cpp @@ -11,17 +11,17 @@ RevivePlayerMenu::~RevivePlayerMenu() local_10 = ExceptionList; ExceptionList = &local_10; local_8 = 0; - ((ANM2 *)((ANM2 *)((int)this + 0x124)))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)this + 0x174)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)this + 0x154)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)this + 0x13c)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)this + 0x124)))->std::string::_Tidy_deallocate(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x124)))->ANM2::Reset(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x174)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x154)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x13c)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x124)))->std::string::_Tidy_deallocate(); local_8 = 1; - ((ANM2 *)((ANM2 *)((int)this + 0x10)))->ANM2::Reset(); - ((AnimationState *)((AnimationState *)((int)this + 0x60)))->AnimationState::~AnimationState(); - ((AnimationState *)((AnimationState *)((int)this + 0x40)))->AnimationState::~AnimationState(); - ((std::string *)((char *)((int)this + 0x28)))->std::string::_Tidy_deallocate(); - ((std::string *)((char *)((int)this + 0x10)))->std::string::_Tidy_deallocate(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x10)))->ANM2::Reset(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x60)))->AnimationState::~AnimationState(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x40)))->AnimationState::~AnimationState(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x28)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x10)))->std::string::_Tidy_deallocate(); ExceptionList = local_10; return; } @@ -43,11 +43,11 @@ void RevivePlayerMenu::Init() undefined4 local_14; byte *curAnim; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00af1f85; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; menuAnmPath._size = 0; menuAnmPath._capacity = 0xf; @@ -55,20 +55,20 @@ void RevivePlayerMenu::Init() menuAnmPath._buf[1] = '\0'; menuAnmPath._buf[2] = '\0'; menuAnmPath._buf[3] = '\0'; - menuAnmPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(menuAnmPath._buf) + 0x0)) = std::_Allocate(0x20); menuAnmPath._size = 0x1d; menuAnmPath._capacity = 0x1f; - builtin_strncpy((char *)menuAnmPath._buf._0_4_,"gfx/ui/Menu_RevivePlayer.anm2",0x1e); + builtin_strncpy((*(undefined4 *)((char *)&((char *)menuAnmPath._buf) + 0x0)),"gfx/ui/Menu_RevivePlayer.anm2",0x1e); local_14 = 0; - ((ANM2 *)((ANM2 *)((int)this + 0x10)))->ANM2::Load(&menuAnmPath,1); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x10)))->ANM2::Load(&menuAnmPath,1); local_14 = 0xffffffff; if (0xf < menuAnmPath._capacity) { uVar3 = menuAnmPath._capacity + 1; - pcVar2 = (char *)menuAnmPath._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)menuAnmPath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(menuAnmPath._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(menuAnmPath._buf) + 0x0)) + -4); uVar3 = menuAnmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(menuAnmPath._buf._0_4_ + (-4 - (int)pcVar2))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(menuAnmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -78,9 +78,9 @@ void RevivePlayerMenu::Init() curAnim = *(byte **)((char *)this + 0x44); if (curAnim == (byte *)0x0) { LAB_008ef6a3: - bVar1 = ((ANM2 *)((ANM2 *)((int)this + 0x10)))->ANM2::SetAnimation((byte *)"Background",1); + bVar1 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x10)))->ANM2::SetAnimation((byte *)"Background",1); if (bVar1 != 0) { - ((AnimationState *)((AnimationState *)((int)this + 0x40)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x40)))->AnimationState::Rewind(); *(undefined1 *)((char *)this + 0x54) = 1; } } @@ -95,7 +95,7 @@ LAB_008ef6a3: isLess = bVar1 < (byte)*pcVar2; if (bVar1 != *pcVar2) { LAB_008ef690: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_008ef695; } if (bVar1 == 0) break; @@ -116,20 +116,20 @@ LAB_008ef695: selectorAnmPath._buf[1] = '\0'; selectorAnmPath._buf[2] = '\0'; selectorAnmPath._buf[3] = '\0'; - selectorAnmPath._buf._0_4_ = std::_Allocate(0x30); + (*(undefined4 *)((char *)&(selectorAnmPath._buf) + 0x0)) = std::_Allocate(0x30); selectorAnmPath._size = 0x21; selectorAnmPath._capacity = 0x2f; - builtin_strncpy((char *)selectorAnmPath._buf._0_4_,"gfx/ui/RevivePlayer_Selector.anm2",0x22); + builtin_strncpy((*(undefined4 *)((char *)&((char *)selectorAnmPath._buf) + 0x0)),"gfx/ui/RevivePlayer_Selector.anm2",0x22); local_14 = 1; - ((ANM2 *)((ANM2 *)((int)this + 0x124)))->ANM2::Load(&selectorAnmPath,1); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x124)))->ANM2::Load(&selectorAnmPath,1); local_14 = 0xffffffff; if (0xf < selectorAnmPath._capacity) { uVar3 = selectorAnmPath._capacity + 1; - pcVar2 = (char *)selectorAnmPath._buf._0_4_; + pcVar2 = (*(undefined4 *)((char *)&((char *)selectorAnmPath._buf) + 0x0)); if (0xfff < uVar3) { - pcVar2 = *(char **)(selectorAnmPath._buf._0_4_ + -4); + pcVar2 = *(char **)((*(undefined4 *)((char *)&(selectorAnmPath._buf) + 0x0)) + -4); uVar3 = selectorAnmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(selectorAnmPath._buf._0_4_ + (-4 - (int)pcVar2))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(selectorAnmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar2)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -139,7 +139,7 @@ LAB_008ef695: curAnim = *(byte **)((char *)this + 0x158); selectorAnmPath._size = 0; selectorAnmPath._capacity = 0xf; - selectorAnmPath._buf._0_4_ = selectorAnmPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(selectorAnmPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(selectorAnmPath._buf) + 0x0)) & 0xffffff00; if (curAnim != (byte *)0x0) { animNameCursor = curAnim; if (0xf < *(uint *)(curAnim + 0x14)) { @@ -151,7 +151,7 @@ LAB_008ef695: isLess = bVar1 < (byte)*pcVar2; if (bVar1 != *pcVar2) { LAB_008ef7c0: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_008ef7c5; } if (bVar1 == 0) break; @@ -166,9 +166,9 @@ LAB_008ef7c5: if ((uVar3 == 0) && ((curAnim[0x34] == 0 || (*(char *)((char *)this + 0x168) != '\0')))) goto LAB_008ef7f1; } - bVar1 = ((ANM2 *)((ANM2 *)((int)this + 0x124)))->ANM2::SetAnimation((byte *)"UpperSelector",1); + bVar1 = ((ANM2 *)((ANM2 *)(GHIDRA_INT(this) + 0x124)))->ANM2::SetAnimation((byte *)"UpperSelector",1); if (bVar1 != 0) { - ((AnimationState *)((AnimationState *)((int)this + 0x154)))->AnimationState::Rewind(); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x154)))->AnimationState::Rewind(); *(undefined1 *)((char *)this + 0x168) = 1; } LAB_008ef7f1: diff --git a/src/game/rich_text.cpp b/src/game/rich_text.cpp index 3121fbb..b32e0cb 100644 --- a/src/game/rich_text.cpp +++ b/src/game/rich_text.cpp @@ -16,7 +16,7 @@ RichText::~RichText() puStack_c = &LAB_00b0feb0; local_10 = ExceptionList; ExceptionList = &local_10; - ((Font *)((Font *)((int)this + 0x18)))->Font::Unload(); + ((Font *)((Font *)(GHIDRA_INT(this) + 0x18)))->Font::Unload(); iVar1 = *(int *)((char *)this + 100); if (iVar1 != 0) { iVar2 = *(int *)(iVar1 + 0x120); @@ -38,7 +38,7 @@ RichText::~RichText() ((ANM2 *)(iconSprite))->ANM2::Reset(); std::map::_Erase_tree(imageMap,*(undefined4 *)(*(int *)imageMap + 4)); operator_delete(*(void **)imageMap,0x1c); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); ((ANM2 *)(iconSprite))->ANM2::Reset(); ((AnimationState *)(&iconSprite->_overlayAnimState))->AnimationState::~AnimationState(); ((AnimationState *)(&iconSprite->_animState))->AnimationState::~AnimationState(); @@ -48,8 +48,8 @@ RichText::~RichText() *(undefined4 *)((char *)this + 100) = 0; } } - ((Font *)((Font *)((int)this + 0x18)))->Font::Unload(); - this_00 = (undefined4 *)((int)this + 0x58); + ((Font *)((Font *)(GHIDRA_INT(this) + 0x18)))->Font::Unload(); + this_00 = (undefined4 *)(GHIDRA_INT(this) + 0x58); FID_conflict__Erase_tree_>_> (this_00,(fuzzer_allocator_> *)this_00, *(_Tree_node **)(*(int *)((char *)this + 0x58) + 4)); @@ -85,7 +85,7 @@ void RichText::load_font(std_string *fontPath) local_14 = 0xffffffff; puStack_18 = &LAB_00b0ff00; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(fontPathLocal + 0x120); + local_24 = __security_cookie ^ GHIDRA_UINT((fontPathLocal + 0x120)); ExceptionList = &local_1c; pbVar2 = fontPathLocal + 300; if (newIconsAnm != fontPath) { @@ -98,8 +98,8 @@ void RichText::load_font(std_string *fontPath) } puStack_20 = pbVar2; sprintf_s(fontPathLocal,0x104,&DAT_00b62fdc); - ((Font *)((Font *)((int)newIconsAnm + 0x18)))->Font::Unload(); - ((Font *)((Font *)((int)newIconsAnm + 0x18)))->Font::Load(fontPathLocal,0); + ((Font *)((Font *)(GHIDRA_INT(newIconsAnm) + 0x18)))->Font::Unload(); + ((Font *)((Font *)(GHIDRA_INT(newIconsAnm) + 0x18)))->Font::Load(fontPathLocal,0); if (extraout_AL == '\0') { KAGE_LogMessage(0x10,(byte *)"Failed to load font: %s \n"); } @@ -112,7 +112,7 @@ void RichText::load_font(std_string *fontPath) } else { ((ANM2 *)(newIconsAnm))->ANM2::constructor(); - local_14 = CONCAT31(local_14._1_3_,1); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); newIconsAnm[1]._filename._buf[0] = '\0'; newIconsAnm[1]._filename._buf[1] = '\0'; newIconsAnm[1]._filename._buf[2] = '\0'; @@ -148,19 +148,19 @@ void RichText::load_font(std_string *fontPath) anmPath._buf[1] = '\0'; anmPath._buf[2] = '\0'; anmPath._buf[3] = '\0'; - anmPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) = std::_Allocate(0x20); anmPath._size = 0x16; anmPath._capacity = 0x1f; - builtin_strncpy((char *)anmPath._buf._0_4_,"gfx/ui/text_icons.anm2",0x17); + builtin_strncpy((*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)),"gfx/ui/text_icons.anm2",0x17); local_14 = 2; ((ANM2 *)(newIconsAnm))->ANM2::Load(&anmPath,1); if (0xf < anmPath._capacity) { size = anmPath._capacity + 1; - pcVar3 = (char *)anmPath._buf._0_4_; + pcVar3 = (*(undefined4 *)((char *)&((char *)anmPath._buf) + 0x0)); if (0xfff < size) { - pcVar3 = *(char **)(anmPath._buf._0_4_ + -4); + pcVar3 = *(char **)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + -4); size = anmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(anmPath._buf._0_4_ + (-4 - (int)pcVar3))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(anmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } diff --git a/src/game/rich_text_icon.cpp b/src/game/rich_text_icon.cpp index 49ebef4..e763c31 100644 --- a/src/game/rich_text_icon.cpp +++ b/src/game/rich_text_icon.cpp @@ -39,12 +39,12 @@ void RichTextIcon::render(Vector *pos, int iconType, int iconId, float alpha) local_14 = 0xffffffff; puStack_18 = &LAB_00b100ed; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(local_50 + 0x40); + local_24 = __security_cookie ^ GHIDRA_UINT((local_50 + 0x40)); ExceptionList = &local_1c; local_54 = pos; set_icon(); if (iconType == 2) { - imageMap = (void *)((int)imageMap + 0x120); + imageMap = (void *)(GHIDRA_INT(imageMap) + 0x120); pvVar3 = (void *)0x9f2522; savedImageMap = imageMap; imageSlot = map_int_ImagePtr_subscript(imageMap,&iconId); @@ -121,7 +121,7 @@ void RichTextIcon::render(Vector *pos, int iconType, int iconId, float alpha) else { layerId = *(int *)layer->_layerData; } - imageMap = ((AnimationState *)((AnimationState *)((int)imageMap + 0x30)))->AnimationState::GetLayerFrame(layerId); + imageMap = ((AnimationState *)((AnimationState *)(GHIDRA_INT(imageMap) + 0x30)))->AnimationState::GetLayerFrame(layerId); fVar2 = *(float *)((char *)imageMap + 0x114); local_60.y = 0.0; r = *(float *)((char *)imageMap + 0xc); @@ -135,8 +135,8 @@ void RichTextIcon::render(Vector *pos, int iconType, int iconId, float alpha) tintColor._blue = 1.0; tintColor._alpha = alpha; ((Color *)(&local_a0))->Color::Color(r,in_XMM2_Da,0.0,(float)&tintColor); - if ((Color *)((int)imageMap + 0xa8) != &local_a0) { - ((Color *)((int)imageMap + 0xa8))->_tint[0] = local_a0._tint[0]; + if ((Color *)(GHIDRA_INT(imageMap) + 0xa8) != &local_a0) { + ((Color *)(GHIDRA_INT(imageMap) + 0xa8))->_tint[0] = local_a0._tint[0]; *(float *)((char *)imageMap + 0xac) = local_a0._tint[1]; *(float *)((char *)imageMap + 0xb0) = local_a0._tint[2]; *(float *)((char *)imageMap + 0xb4) = local_a0._tint[3]; @@ -144,20 +144,20 @@ void RichTextIcon::render(Vector *pos, int iconType, int iconId, float alpha) *(float *)((char *)imageMap + 0xbc) = local_a0._colorize[1]; *(float *)((char *)imageMap + 0xc0) = local_a0._colorize[2]; *(float *)((char *)imageMap + 0xc4) = local_a0._colorize[3]; - *(undefined8 *)((char *)imageMap + 200) = local_a0._offset._0_8_; + *(undefined8 *)((char *)imageMap + 200) = (*(undefined8 *)((char *)&(local_a0._offset) + 0x0)); *(float *)((char *)imageMap + 0xd0) = local_a0._offset[2]; } local_60.x = local_54->x + local_60.y; local_60.y = local_54->y + local_60.y; ((ANM2 *)(imageMap))->ANM2::Render(&local_60,&g_vectorZero,&g_vectorZero); } - if (0xf < (uint)local_28) { - size = (int)local_28 + 1; - imageMap = (void *)local_50._20_4_; + if (0xf < GHIDRA_UINT(local_28)) { + size = GHIDRA_INT(local_28) + 1; + imageMap = (*(undefined4 *)((char *)&((void *)local_50) + 0x14)); if (0xfff < size) { - imageMap = *(void **)(local_50._20_4_ + -4); - size = (int)local_28 + 0x24; - if (0x1f < (uint)(local_50._20_4_ + (-4 - (int)imageMap))) { + imageMap = *(void **)((*(undefined4 *)((char *)&(local_50) + 0x14)) + -4); + size = GHIDRA_INT(local_28) + 0x24; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_50) + 0x14)) + (-4 - GHIDRA_INT(imageMap))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -192,21 +192,21 @@ Vector * RichTextIcon::get_size(Vector *outSize) local_8 = 0xffffffff; puStack_c = &LAB_00af85cd; local_10 = ExceptionList; - local_18 = __security_cookie ^ (int)&animName + 0x2cU; + local_18 = __security_cookie ^ GHIDRA_INT(&animName) + 0x2cU; ExceptionList = &local_10; outSize->y = 0.0; outSize->x = 0.0; if (*(int *)((char *)this + 0x118) == 2) { - piVar2 = (int *)((int)this + 0x11c); - piVar1 = map_int_ImagePtr_subscript((void *)((int)this + 0x120),piVar2); + piVar2 = (int *)(GHIDRA_INT(this) + 0x11c); + piVar1 = map_int_ImagePtr_subscript((void *)(GHIDRA_INT(this) + 0x120),piVar2); if (*piVar1 == 0) { ExceptionList = local_10; return outSize; } - piVar1 = map_int_ImagePtr_subscript((void *)((int)this + 0x120),piVar2); + piVar1 = map_int_ImagePtr_subscript((void *)(GHIDRA_INT(this) + 0x120),piVar2); iVar3 = *(int *)(*piVar1 + 0x14); heightFixup = __uint_to_double_fixup[-(iVar3 >> 0x1f)]; - piVar1 = map_int_ImagePtr_subscript((void *)((int)this + 0x120),piVar2); + piVar1 = map_int_ImagePtr_subscript((void *)(GHIDRA_INT(this) + 0x120),piVar2); outSize->x = (float)((double)*(int *)(*piVar1 + 0x10) + __uint_to_double_fixup[-(*(int *)(*piVar1 + 0x10) >> 0x1f)]); outSize->y = (float)((double)iVar3 + heightFixup); @@ -214,14 +214,14 @@ Vector * RichTextIcon::get_size(Vector *outSize) ExceptionList = local_10; return outSize; } - piVar1 = map_int_ImagePtr_subscript((void *)((int)this + 0x120),piVar2); + piVar1 = map_int_ImagePtr_subscript((void *)(GHIDRA_INT(this) + 0x120),piVar2); fVar5 = (float)((double)*(int *)(*piVar1 + 0x14) + __uint_to_double_fixup[-(*(int *)(*piVar1 + 0x14) >> 0x1f)]); if (fVar5 < *(float *)((char *)this + 0x114) || fVar5 == *(float *)((char *)this + 0x114)) { ExceptionList = local_10; return outSize; } - piVar2 = map_int_ImagePtr_subscript((void *)((int)this + 0x120),piVar2); + piVar2 = map_int_ImagePtr_subscript((void *)(GHIDRA_INT(this) + 0x120),piVar2); fVar5 = (*(float *)((char *)this + 0x114) / (float)((double)*(int *)(*piVar2 + 0x14) + __uint_to_double_fixup[-(*(int *)(*piVar2 + 0x14) >> 0x1f)])) * 1.5; @@ -232,7 +232,7 @@ Vector * RichTextIcon::get_size(Vector *outSize) if (*(void **)((char *)this + 0x34) == (void *)0x0) { animName._capacity = 0xf; animName._size = 0; - animName._buf._0_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(animName._buf) + 0x0)) = (void *)0x0; } else { ((std::string *)(animName._buf))->std::string::string(*(void **)((char *)this + 0x34)); @@ -242,11 +242,11 @@ Vector * RichTextIcon::get_size(Vector *outSize) local_8 = 0xffffffff; if (0xf < animName._capacity) { size = animName._capacity + 1; - pvVar4 = (void *)animName._buf._0_4_; + pvVar4 = (*(undefined4 *)((char *)&((void *)animName._buf) + 0x0)); if (0xfff < size) { - pvVar4 = *(void **)(animName._buf._0_4_ + -4); + pvVar4 = *(void **)((*(undefined4 *)((char *)&(animName._buf) + 0x0)) + -4); size = animName._capacity + 0x24; - if (0x1f < (uint)(animName._buf._0_4_ + (-4 - (int)pvVar4))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(animName._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar4))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -263,7 +263,7 @@ Vector * RichTextIcon::get_size(Vector *outSize) else { iVar3 = *(int *)layer->_layerData; } - pvVar4 = ((AnimationState *)((AnimationState *)((int)this + 0x30)))->AnimationState::GetLayerFrame(iVar3); + pvVar4 = ((AnimationState *)((AnimationState *)(GHIDRA_INT(this) + 0x30)))->AnimationState::GetLayerFrame(iVar3); fVar5 = *(float *)((char *)pvVar4 + 8); outSize->x = fVar5; frameHeight = *(float *)((char *)pvVar4 + 0xc); @@ -373,7 +373,7 @@ void RichTextIcon::set_icon(int param_1, int param_2) local_8 = (void *)0xffffffff; puStack_c = &LAB_00b10135; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(animName + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((animName + 10)); ExceptionList = &local_10; if (param_1 == 2) { iconData = in_ECX + 1; @@ -433,7 +433,7 @@ LAB_009f2caa: isLess = bVar1 < (byte)newAnimChar->_buf[0]; if (bVar1 != newAnimChar->_buf[0]) { LAB_009f2c97: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_009f2c9c; } if (bVar1 == 0) break; @@ -453,9 +453,9 @@ LAB_009f2c9c: uVar3 = animNameCapacity + 1; pvVar5 = animName[0]; if (0xfff < uVar3) { - pvVar5 = *(void **)((int)animName[0] + -4); + pvVar5 = *(void **)(GHIDRA_INT(animName[0]) + -4); uVar3 = animNameCapacity + 0x24; - if (0x1f < (uint)((int)animName[0] + (-4 - (int)pvVar5))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(animName[0]) + (-4 - GHIDRA_INT(pvVar5))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } diff --git a/src/game/rich_text_span.cpp b/src/game/rich_text_span.cpp index a529186..b8da4ea 100644 --- a/src/game/rich_text_span.cpp +++ b/src/game/rich_text_span.cpp @@ -10,9 +10,9 @@ byte RichTextSpan::try_merge(void *other) uint *otherLength; if (*(float *)((char *)this + 0x34) == *(float *)((char *)other + 0x34)) { - otherStyle = (int *)((int)other + 0x20); + otherStyle = (int *)(GHIDRA_INT(other) + 0x20); bytesLeft = 0xc; - ownStyle = (int *)((int)this + 0x20); + ownStyle = (int *)(GHIDRA_INT(this) + 0x20); do { if (*ownStyle != *otherStyle) { return 0; @@ -24,7 +24,7 @@ byte RichTextSpan::try_merge(void *other) } while (isMore); if ((*(int *)((char *)this + 0x38) == *(int *)((char *)other + 0x38)) && (*(int *)((char *)this + 0x3c) == *(int *)((char *)other + 0x3c))) { - otherLength = (uint *)((int)other + 0x10); + otherLength = (uint *)(GHIDRA_INT(other) + 0x10); if (0xf < *(uint *)((char *)other + 0x14)) { other = *(void **)other; } diff --git a/src/game/rng.cpp b/src/game/rng.cpp index 231d4d4..aeee6df 100644 --- a/src/game/rng.cpp +++ b/src/game/rng.cpp @@ -9,7 +9,7 @@ void RNG::Shuffle(RNG *rng, int *begin, int *end) uint remaining; int swapValue; - remaining = (int)end - (int)begin >> 2; + remaining = GHIDRA_INT(end) - GHIDRA_INT(begin) >> 2; i = remaining - 1; if (0 < i) { do { @@ -55,8 +55,8 @@ void RNG::game_constructor(uint seed, uint shiftidx) } shift1And2 = *(undefined8 *)(&DAT_00b1f4c8 + shiftidx * 0xc); shift3 = *(int *)(&DAT_00b1f4d0 + shiftidx * 0xc); - this->_shift1 = (int)shift1And2; - this->_shift2 = (int)((ulonglong)shift1And2 >> 0x20); + this->_shift1 = GHIDRA_INT(shift1And2); + this->_shift2 = GHIDRA_INT(((ulonglong)shift1And2 >> 0x20)); this->_shift3 = shift3; return; } @@ -70,15 +70,15 @@ void RNG::SetSeed(uint Seed, uint ShiftIdx) int shift3; this->_seed = Seed; - requestedShiftIdx = -(uint)(ShiftIdx != 0) & ShiftIdx; + requestedShiftIdx = -GHIDRA_UINT((ShiftIdx != 0)) & ShiftIdx; clampedShiftIdx = 0x50; if (requestedShiftIdx < 0x50) { clampedShiftIdx = requestedShiftIdx; } shift12 = *(undefined8 *)(&DAT_00b1f4c8 + clampedShiftIdx * 0xc); shift3 = *(int *)(&DAT_00b1f4d0 + clampedShiftIdx * 0xc); - this->_shift1 = (int)shift12; - this->_shift2 = (int)((ulonglong)shift12 >> 0x20); + this->_shift1 = GHIDRA_INT(shift12); + this->_shift2 = GHIDRA_INT(((ulonglong)shift12 >> 0x20)); this->_shift3 = shift3; return; } @@ -132,7 +132,7 @@ float RNG::RandomFloat() seed = seed << ((byte)this->_shift2 & 0x1f) ^ seed; seed = seed >> ((byte)this->_shift3 & 0x1f) ^ seed; this->_seed = seed; - return (float)((double)(int)seed + __uint_to_double_fixup[-((int)seed >> 0x1f)]) * 2.3283062e-10; + return (float)((double)GHIDRA_INT(seed) + __uint_to_double_fixup[-(GHIDRA_INT(seed) >> 0x1f)]) * 2.3283062e-10; } // 007e90f0 diff --git a/src/game/room.cpp b/src/game/room.cpp index 838f47c..dc17f45 100644 --- a/src/game/room.cpp +++ b/src/game/room.cpp @@ -38,37 +38,37 @@ Room * Room::init_render_buffers() this->_gridEntities[6] = (void *)0x0; pvVar1 = operator_new_tracked(0x400); this->_gridEntities[4] = pvVar1; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; *(undefined1 *)(this->_gridEntities + 7) = 0; this->_gridEntities[9] = (void *)0x800; this->_gridEntities[10] = (void *)0x0; pvVar1 = operator_new_tracked(0x2000); this->_gridEntities[8] = pvVar1; - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; *(undefined1 *)(this->_gridEntities + 0xb) = 0; this->_gridEntities[0xd] = (void *)0x4000; this->_gridEntities[0xe] = (void *)0x0; pvVar1 = operator_new_tracked(0x10000); this->_gridEntities[0xc] = pvVar1; - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; *(undefined1 *)(this->_gridEntities + 0xf) = 0; this->_gridEntities[0x11] = (void *)0x4000; this->_gridEntities[0x12] = (void *)0x0; pvVar1 = operator_new_tracked(0x10000); this->_gridEntities[0x10] = pvVar1; - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; *(undefined1 *)(this->_gridEntities + 0x13) = 0; this->_gridEntities[0x15] = (void *)0x4000; this->_gridEntities[0x16] = (void *)0x0; pvVar1 = operator_new_tracked(0x10000); this->_gridEntities[0x14] = pvVar1; - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; *(undefined1 *)(this->_gridEntities + 0x17) = 0; this->_gridEntities[0x19] = (void *)0x8000; this->_gridEntities[0x1a] = (void *)0x0; pvVar1 = operator_new_tracked(0x20000); this->_gridEntities[0x18] = pvVar1; - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; *(undefined1 *)(this->_gridEntities + 0x1b) = 0; this->_gridEntities[0x1d] = (void *)0x100; this->_gridEntities[0x1e] = (void *)0x0; @@ -80,7 +80,7 @@ Room * Room::init_render_buffers() this->_gridEntities[0x2b] = (void *)0x0; this->_gridEntities[0x2d] = (void *)0x0; this->_gridEntities[0x2e] = (void *)0x0; - local_8._0_1_ = 9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; mapHeadSlot = this->_gridEntities + 0x2f; *mapHeadSlot = (void *)0x0; this->_gridEntities[0x30] = (void *)0x0; @@ -91,7 +91,7 @@ Room * Room::init_render_buffers() *(void **)((char *)pvVar1 + 8) = pvVar1; *(undefined2 *)((char *)pvVar1 + 0xc) = 0x101; *mapHeadSlot = pvVar1; - local_8._0_1_ = 10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 10; local_18 = this->_gridEntities + 0x35; this->_gridEntities[0x34] = (void *)0x1; this->_gridEntities[0x31] = (void *)0x0; @@ -101,98 +101,98 @@ Room * Room::init_render_buffers() (local_18,0x18,0x20,FUN_00417710,(_func_void_void_ptr *)&LAB_004177b0); this->_gridEntities[0xf5] = (void *)0x0; this->_gridEntities[0xf6] = (void *)0x0; - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; local_18 = operator_new(0x24); - local_8._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc; if (local_18 == (void *)0x0) { firstSubList = 0; } else { firstSubList = FUN_0041b9f0(this,0x44340000); } - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; *(undefined4 *)this = firstSubList; local_18 = operator_new(0x24); - local_8._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xd; if (local_18 == (void *)0x0) { pvVar1 = (void *)0x0; } else { pvVar1 = (void *)FUN_0041b9f0(this,0x44340000); } - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; this->_descriptor = pvVar1; local_18 = operator_new(0x24); - local_8._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xe; if (local_18 == (void *)0x0) { iVar2 = 0; } else { iVar2 = FUN_0041b9f0(this,0x44340000); } - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; this->_roomType = iVar2; local_18 = operator_new(0x24); - local_8._0_1_ = 0xf; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xf; if (local_18 == (void *)0x0) { iVar2 = 0; } else { iVar2 = FUN_0041b9f0(this,0x44340000); } - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; this->_gridWidth = iVar2; local_18 = operator_new(0x24); - local_8._0_1_ = 0x10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x10; if (local_18 == (void *)0x0) { iVar2 = 0; } else { iVar2 = FUN_0041b9f0(this,0x44340000); } - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; this->_gridHeight = iVar2; local_18 = operator_new(0x24); - local_8._0_1_ = 0x11; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x11; if (local_18 == (void *)0x0) { fVar3 = 0.0; } else { fVar3 = (float)FUN_0041b9f0(this,0x44340000); } - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; (this->_topLeftPos).x = fVar3; local_18 = operator_new(0x24); - local_8._0_1_ = 0x12; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x12; if (local_18 == (void *)0x0) { fVar3 = 0.0; } else { fVar3 = (float)FUN_0041b9f0(this,0x44340000); } - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; (this->_topLeftPos).y = fVar3; local_18 = operator_new(0x24); - local_8._0_1_ = 0x13; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x13; if (local_18 == (void **)0x0) { fVar3 = 0.0; } else { fVar3 = (float)FUN_0041b9f0(this,0x44340000); } - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; (this->_bottomRightPos).x = fVar3; pvVar1 = Manager::LoadImage(shadowImage,(byte *)"gfx/shadow.png"); - local_8._0_1_ = 0x14; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x14; ((KAGE::SmartPointer *)(this->_gridEntities + 0x2d))->KAGE::SmartPointer::operator_assign(pvVar1); - local_8._0_1_ = 0x15; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0x15; if (local_18 != (void **)0x0) { - isLastRef = (**(code **)((int)*local_18 + 0xc))(); + isLastRef = (**(code **)(GHIDRA_INT(*local_18) + 0xc))(); if ((isLastRef != '\0') && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(shadowImage); } } - local_8 = CONCAT31(local_8._1_3_,0xb); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0xb); this->_gridEntities[0x2c] = (void *)0x0; ((EntityList *)((EntityList *)this))->EntityList::Reset(); ExceptionList = local_10; @@ -226,7 +226,7 @@ int Room::GetRoomShape() // 0042a290 byte Room::SetGridPath(int gridIndex, int value) { - if ((uint)gridIndex < 0x1c0) { + if (GHIDRA_UINT(gridIndex) < 0x1c0) { this->_gridPaths[gridIndex] = value; return 1; } @@ -300,7 +300,7 @@ int Room::GetBossID() // 004565c0 int Room::GetGridPath(int gridIndex) { - if ((uint)gridIndex < 0x1c0) { + if (GHIDRA_UINT(gridIndex) < 0x1c0) { return this->_gridPaths[gridIndex]; } return 0; @@ -313,9 +313,9 @@ GridEntity * Room::GetGridEntityFromPos(Vector *pos) int gridY; int gridX; - gridX = (int)((pos->x - 40.0) / 40.0 + 0.5); + gridX = GHIDRA_INT(((pos->x - 40.0) / 40.0 + 0.5)); if ((((gridX < 0) || (this->_gridWidth <= gridX)) || - (gridY = (int)((pos->y - 120.0) / 40.0 + 0.5), gridY < 0)) || + (gridY = GHIDRA_INT(((pos->y - 120.0) / 40.0 + 0.5)), gridY < 0)) || ((this->_gridHeight <= gridY || (gridIndex = this->_gridWidth * gridY + gridX, 0x1bf < gridIndex)))) { return (GridEntity *)0x0; @@ -436,9 +436,9 @@ byte Room::RaiseGridPathAtPos(Vector *pos, int pathValue) int iVar1; uint gridIndex; - iVar1 = (int)((pos->x - 40.0) / 40.0 + 0.5); + iVar1 = GHIDRA_INT(((pos->x - 40.0) / 40.0 + 0.5)); if ((((iVar1 < 0) || (this->_gridWidth <= iVar1)) || - (gridY = (int)((pos->y - 120.0) / 40.0 + 0.5), gridY < 0)) || + (gridY = GHIDRA_INT(((pos->y - 120.0) / 40.0 + 0.5)), gridY < 0)) || (((this->_gridHeight <= gridY || (gridIndex = this->_gridWidth * gridY + iVar1, 0x1bf < gridIndex)) || (0x3b6 < pathValue)))) { @@ -488,9 +488,9 @@ byte Room::CanSpawnObstacleAtPos(Vector *position, byte isForce) int gridY; int gridX; - gridX = (int)((position->x - 40.0) / 40.0 + 0.5); + gridX = GHIDRA_INT(((position->x - 40.0) / 40.0 + 0.5)); if ((((gridX < 0) || (this->_gridWidth <= gridX)) || - (gridY = (int)((position->y - 120.0) / 40.0 + 0.5), gridY < 0)) || + (gridY = GHIDRA_INT(((position->y - 120.0) / 40.0 + 0.5)), gridY < 0)) || (this->_gridHeight <= gridY)) { bVar1 = CanSpawnObstacleAtPosition(this,-1,isForce); return bVar1; @@ -510,8 +510,8 @@ int Room::get_beast_arena() // 0059e250 byte Room::IsDoorSlotAllowed(int slot) { - if ((uint)slot < 8) { - return (*(uint *)(*(int *)((char *)this->_descriptor + 0x10) + 0x38 + ((uint)slot >> 5) * 4) & + if (GHIDRA_UINT(slot) < 8) { + return (*(uint *)(*(int *)((char *)this->_descriptor + 0x10) + 0x38 + (GHIDRA_UINT(slot) >> 5) * 4) & 1 << ((byte)slot & 0x1f)) != 0; } return 0; @@ -671,7 +671,7 @@ void Room::SetWallColor(ColorMod color) (this->_wallColor)._colorize[1] = color._colorize[1]; (this->_wallColor)._colorize[2] = color._colorize[2]; (this->_wallColor)._colorize[3] = color._colorize[3]; - *(undefined8 *)(this->_wallColor)._offset = color._offset._0_8_; + *(undefined8 *)(this->_wallColor)._offset = (*(undefined8 *)((char *)&(color._offset) + 0x0)); (this->_wallColor)._offset[2] = color._offset[2]; } return; @@ -704,7 +704,7 @@ Room * Room::constructor() local_14 = (void *)0xffffffff; puStack_18 = &LAB_00b00d42; local_1c = ExceptionList; - stackCookie = __security_cookie ^ (uint)(redirectedPath + 0x11); + stackCookie = __security_cookie ^ GHIDRA_UINT((redirectedPath + 0x11)); ExceptionList = &local_1c; *(undefined1 *)this = 0; this->_descriptor = (void *)0x0; @@ -733,7 +733,7 @@ Room * Room::constructor() *(undefined4 *)&(*(undefined1 *)((char *)&((this->_fxLayers)) + 0x28)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_fxLayers)) + 0x2c)) = 0; ((FXParams *)((FXParams *)&(*(undefined1 *)((char *)&((this->_fxLayers)) + 0x38))))->FXParams::FXParams(); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_fxLayers)) + 0x84)) = 0x3f800000; entriesLeft = 10; *(undefined4 *)&(*(undefined1 *)((char *)&((this->_fxLayers)) + 0x88)) = 0x3f800000; @@ -773,15 +773,15 @@ Room * Room::constructor() *(undefined4 *)&(*(undefined1 *)((char *)&((this->_fxLayers)) + 0x4f0)) = 0; ((FXParams *)(&(this->_fxLayers)._fxParams))->FXParams::FXParams(); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1bb8)) = 0; - local_14._0_1_ = 5; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1bc4)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x1bc0)) = 0; ((Backdrop *)(&this->_backdrop))->Backdrop::constructor(); - local_14._0_1_ = 6; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 6; ((ANM2 *)(&this->_lightSprite))->ANM2::constructor(); - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x6f54))))->ANM2::constructor(); - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; shopItemDeque = &this->_shopItemDeque; shopItemDeque->_proxy = (void *)0x0; (this->_shopItemDeque)._map = (void *)0x0; @@ -791,8 +791,8 @@ Room * Room::constructor() dequeProxy = operator_new(8); dequeProxy[1] = 0; shopItemDeque->_proxy = dequeProxy; - *dequeProxy = (int)shopItemDeque; - local_14._0_1_ = 9; + *dequeProxy = GHIDRA_INT(shopItemDeque); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; entriesLeft = 2; puVar2 = (undefined4 *)&(*(undefined1 *)((char *)(this) + 0x70c4)); do { @@ -807,7 +807,7 @@ Room * Room::constructor() puVar2 = puVar2 + 7; } while (entriesLeft != 0); ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x7100))))->ANM2::constructor(); - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; gridIndexSet = this->_pendingGridRemovals; gridIndexSet[0] = 0; gridIndexSet[1] = 0; @@ -823,7 +823,7 @@ Room * Room::constructor() *(void **)((char *)pvVar1 + 8) = pvVar1; *(undefined2 *)((char *)pvVar1 + 0xc) = 0x101; *(void **)gridIndexSet = pvVar1; - local_14._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; ((KColor *)(&this->_waterColor))->KColor::SetFromARGB(0xffffffff); ((KColor *)(&this->_waterColorMultiplier))->KColor::SetFromARGB(0xffffffff); ((KColor *)(&this->_waterLerpTargetColor))->KColor::SetFromARGB(0xffffffff); @@ -856,7 +856,7 @@ Room * Room::constructor() *(void **)pvVar1 = pvVar1; *(void **)((char *)pvVar1 + 4) = pvVar1; *(void **)&(*(undefined1 *)((char *)(this) + 0x7300)) = pvVar1; - local_14._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; gridIndexSet = this->_litGridIndices; gridIndexSet[0] = 0; gridIndexSet[1] = 0; @@ -879,12 +879,12 @@ Room * Room::constructor() (this->_temporaryEffects)._shouldEvaluateCache = 0; (this->_temporaryEffects)._disabled = 0; (this->_temporaryEffects)._player = (void *)0x0; - local_14._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xe; _eh_vector_constructor_iterator_(this->_outputGroupGridIndices,8,10,FUN_005cbe20,FUN_00424420); - local_14._0_1_ = 0xf; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xf; _eh_vector_constructor_iterator_ (this->_outputGroupCallbacks,0xc,10,FUN_00424510,FID_conflict__Tidy); - local_14._0_1_ = 0x10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x10; entriesLeft = 4; puVar2 = (undefined4 *)&(*(undefined1 *)((char *)(this) + 0x7408)); puVar3 = (undefined4 *)&(*(undefined1 *)((char *)(this) + 0x73f4)); @@ -903,25 +903,25 @@ Room * Room::constructor() (this->_waterCurrent).x = 0.0; (this->_railManager)._room = this; ((ANM2 *)(&(this->_railManager)._sprite))->ANM2::constructor(); - local_14._0_1_ = 0x11; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x11; _eh_vector_constructor_iterator_(this->_redDoorOutlines,4,8,FUN_0042a020,FUN_00579700); - local_14._0_1_ = 0x12; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x12; *(Room **)&(*(undefined1 *)((char *)(this) + 0x776c)) = this; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x7770))))->ANM2::constructor(); (*(undefined1 *)((char *)(this) + 0x7884)) = 0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x7888)) = 0; this->_beastBlastForce = 0.0; *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x7890)) = 0; - local_14._0_1_ = 0x13; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x13; memset(this->_gridEntities,0,0x720); init_room_render_surfaces(); builtin_strncpy(backdropsPath._buf + 8,"s.xml",6); backdropsPath._capacity = 0xf; backdropsPath._size = 0xd; builtin_strncpy(backdropsPath._buf,"backdrop",8); - local_14._0_1_ = 0x14; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x14; ((ModManager *)(&g_manager->_modManager))->ModManager::TryRedirectPath((std_string *)redirectedPath,&backdropsPath); - local_14 = (void *)CONCAT31(local_14._1_3_,0x15); + local_14 = (void *)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x15); gridIndexSet = extraout_EAX; if (0xf < *(uint *)(extraout_EAX + 0x14)) { gridIndexSet = *(byte **)extraout_EAX; @@ -931,22 +931,22 @@ Room * Room::constructor() uVar4 = redirectedPathCapacity + 1; pvVar1 = redirectedPath[0]; if (0xfff < uVar4) { - pvVar1 = *(void **)((int)redirectedPath[0] + -4); + pvVar1 = *(void **)(GHIDRA_INT(redirectedPath[0]) + -4); uVar4 = redirectedPathCapacity + 0x24; - if (0x1f < (uint)((int)redirectedPath[0] + (-4 - (int)pvVar1))) goto LAB_007e9af3; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPath[0]) + (-4 - GHIDRA_INT(pvVar1))))) goto LAB_007e9af3; } operator_delete(pvVar1,uVar4); } redirectedPathSize = 0; redirectedPathCapacity = 0xf; - redirectedPath[0] = (void *)((uint)redirectedPath[0] & 0xffffff00); + redirectedPath[0] = (void *)(GHIDRA_UINT(redirectedPath[0]) & 0xffffff00); if (0xf < backdropsPath._capacity) { uVar4 = backdropsPath._capacity + 1; - pvVar1 = (void *)backdropsPath._buf._0_4_; + pvVar1 = (*(undefined4 *)((char *)&((void *)backdropsPath._buf) + 0x0)); if (0xfff < uVar4) { - pvVar1 = *(void **)(backdropsPath._buf._0_4_ + -4); + pvVar1 = *(void **)((*(undefined4 *)((char *)&(backdropsPath._buf) + 0x0)) + -4); uVar4 = backdropsPath._capacity + 0x24; - if (0x1f < (uint)(backdropsPath._buf._0_4_ + (-4 - (int)pvVar1))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(backdropsPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pvVar1))))) { LAB_007e9af3: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -998,7 +998,7 @@ Room::~Room() local_8 = 0xffffffff; puStack_c = &LAB_00b00d70; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; gridEntitySlot = this->_gridEntities; iVar3 = 0x1c0; @@ -1021,13 +1021,13 @@ Room::~Room() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar2 = *(uint *)(iVar3 + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar2); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar2)); free((void *)(iVar3 + -4)); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x77c8)) = 0; } @@ -1037,13 +1037,13 @@ Room::~Room() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar2 = *(uint *)(iVar3 + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar2); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar2)); free((void *)(iVar3 + -4)); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x77cc)) = 0; } @@ -1053,13 +1053,13 @@ Room::~Room() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar2 = *(uint *)(iVar3 + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar2); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar2)); free((void *)(iVar3 + -4)); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x77a8)) = 0; } @@ -1069,13 +1069,13 @@ Room::~Room() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar2 = *(uint *)(iVar3 + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar2); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar2)); free((void *)(iVar3 + -4)); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x77ac)) = 0; } @@ -1092,14 +1092,14 @@ Room::~Room() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar2 = *(uint *)((char *)freeBlock + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar2); - free((void *)((int)freeBlock + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar2)); + free((void *)(GHIDRA_INT(freeBlock) + -4)); (this->_railManager)._sprite._overlayAnimState._layerFrames = (void *)0x0; } freeBlock = (this->_railManager)._sprite._overlayAnimState._nullLayerFrames; @@ -1108,14 +1108,14 @@ Room::~Room() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar2 = *(uint *)((char *)freeBlock + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar2); - free((void *)((int)freeBlock + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar2)); + free((void *)(GHIDRA_INT(freeBlock) + -4)); (this->_railManager)._sprite._overlayAnimState._nullLayerFrames = (void *)0x0; } freeBlock = (this->_railManager)._sprite._animState._layerFrames; @@ -1124,14 +1124,14 @@ Room::~Room() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar2 = *(uint *)((char *)freeBlock + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar2); - free((void *)((int)freeBlock + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar2)); + free((void *)(GHIDRA_INT(freeBlock) + -4)); (this->_railManager)._sprite._animState._layerFrames = (void *)0x0; } freeBlock = (this->_railManager)._sprite._animState._nullLayerFrames; @@ -1140,14 +1140,14 @@ Room::~Room() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar2 = *(uint *)((char *)freeBlock + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar2); - free((void *)((int)freeBlock + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar2)); + free((void *)(GHIDRA_INT(freeBlock) + -4)); (this->_railManager)._sprite._animState._nullLayerFrames = (void *)0x0; } ((std::string *)((this->_railManager)._sprite._animDefaultName._buf))->std::string::_Tidy_deallocate(); @@ -1175,13 +1175,13 @@ Room::~Room() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar2 = *(uint *)(iVar3 + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar2); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar2)); free((void *)(iVar3 + -4)); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x7158)) = 0; } @@ -1191,13 +1191,13 @@ Room::~Room() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar2 = *(uint *)(iVar3 + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar2); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar2)); free((void *)(iVar3 + -4)); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x715c)) = 0; } @@ -1207,13 +1207,13 @@ Room::~Room() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar2 = *(uint *)(iVar3 + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar2); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar2)); free((void *)(iVar3 + -4)); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x7138)) = 0; } @@ -1223,13 +1223,13 @@ Room::~Room() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar2 = *(uint *)(iVar3 + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar2); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar2)); free((void *)(iVar3 + -4)); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x713c)) = 0; } @@ -1247,18 +1247,18 @@ Room::~Room() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar2 = *(uint *)(iVar3 + -4); allocatedBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)allocatedBytes < uVar2); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(allocatedBytes) < uVar2)); free((void *)(iVar3 + -4)); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x6fac)) = 0; } if (*(void **)&(*(undefined1 *)((char *)(this) + 0x6fb0)) != (void *)0x0) { - local_8 = CONCAT31(local_8._1_3_,0x11); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),0x11); tracked_alloc(1,*(void **)&(*(undefined1 *)((char *)(this) + 0x6fb0)),0); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x6fb0)) = 0; } @@ -1343,14 +1343,14 @@ void Room::SetPauseTimer(int Duration) i = 0; if ((this->_entityList)._updateEL._size != 0) { do { - entity = *(int *)((int)(this->_entityList)._updateEL._data + i * 4); + entity = *(int *)(GHIDRA_INT((this->_entityList)._updateEL._data) + i * 4); if ((((1 < *(int *)&g_game->_deathmatchManager) && (*(int *)(entity + 0x28) == 1)) || (entityType = *(int *)(entity + 0x28), entityType - 10U < 0x3de)) || ((entityType == 9 || (entityType == 1000)))) { *(int *)(entity + 0x31c) = Duration; } i = i + 1; - } while (i < (uint)(this->_entityList)._updateEL._size); + } while (i < GHIDRA_UINT((this->_entityList)._updateEL._size)); } return; } @@ -1536,10 +1536,10 @@ void Room::PlayMusic() (*pcVar2)(); return; } - uVar4 = (uint)local_c >> 2 ^ (uint)local_c; + uVar4 = GHIDRA_UINT(local_c) >> 2 ^ GHIDRA_UINT(local_c); uVar4 = uVar4 << 7 ^ uVar4; local_c = (float)(uVar4 >> 9 ^ uVar4); - stage = (uint)local_c % 0xb + 1; + stage = GHIDRA_UINT(local_c) % 0xb + 1; } if (local_c == 0.0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -1547,7 +1547,7 @@ void Room::PlayMusic() (*pcVar2)(); return; } - uVar4 = (uint)local_c >> 2 ^ (uint)local_c; + uVar4 = GHIDRA_UINT(local_c) >> 2 ^ GHIDRA_UINT(local_c); uVar4 = uVar4 << 7 ^ uVar4; stageType = (uVar4 >> 9 ^ uVar4) % 5; if (stageType == 3) { @@ -1601,7 +1601,7 @@ switchD_007eb334_caseD_18: } } else if ((roomType == 6) || (*(char *)((char *)game->_room + 0x7228) != '\0')) { - uVar6 = CONCAT44(uVar4,0x26 - (uint)((*(byte *)((char *)this->_descriptor + 0x44) & 1) != 0)); + uVar6 = CONCAT44(uVar4,0x26 - GHIDRA_UINT(((*(byte *)((char *)this->_descriptor + 0x44) & 1) != 0))); } else if (roomType == 2) { uVar6 = CONCAT44(uVar4,0x23); @@ -1674,9 +1674,9 @@ LAB_007eb438: uVar6 = CONCAT44(uVar4,0x25); } } - uVar5 = (uint)uVar6; + uVar5 = GHIDRA_UINT(uVar6); if ((((game->_difficulty != 2) && (game->_difficulty != 3)) && (stage == 9)) && (roomType != 5)) { - uVar5 = *(uint *)(game->_ventricleRazorPortals + (int)((ulonglong)uVar6 >> 0x20) * 0xc4 + 0x654) + uVar5 = *(uint *)(game->_ventricleRazorPortals + GHIDRA_INT(((ulonglong)uVar6 >> 0x20)) * 0xc4 + 0x654) ; jingleId = 0; } @@ -1746,10 +1746,10 @@ LAB_007eb678: local_c = 1.0; } else if ((currentMusic == 0x5f) || (currentMusic == 0x40)) { - if ((-1 < (int)uVar5) && - ((int)uVar5 < - ((int)(g_manager->_musicManager)._entries._end - - (int)(g_manager->_musicManager)._entries._begin) / 0x60)) { + if ((-1 < GHIDRA_INT(uVar5)) && + (GHIDRA_INT(uVar5) < + (GHIDRA_INT((g_manager->_musicManager)._entries._end) - + GHIDRA_INT((g_manager->_musicManager)._entries._begin)) / 0x60)) { (g_manager->_musicManager)._queuedMusicID = uVar5; } goto LAB_007eb7d5; @@ -1801,7 +1801,7 @@ byte Room::SpawnGridEntity(int GridIndex, uint Type, uint Variant, uint Seed, in if ((GridIndex < 0) || (0x1bf < GridIndex)) { KAGE_LogMessage(0x10,(byte *)"SpawnGridEntity: Grid index invalid\n"); } - if ((uint)GridIndex < 0x1c0) { + if (GHIDRA_UINT(GridIndex) < 0x1c0) { if ((((Type == 0x11) || (Type == 0x12)) || (Type == 0x14)) || (Type == 0x17)) { uVar1 = GetGridCollision(this,GridIndex); bVar3 = false; @@ -1813,7 +1813,7 @@ byte Room::SpawnGridEntity(int GridIndex, uint Type, uint Variant, uint Seed, in uVar1 = gridPath - 900; bVar2 = gridPath == 900; } - if (bVar2 || bVar3 != (int)uVar1 < 0) { + if (bVar2 || bVar3 != GHIDRA_INT(uVar1) < 0) { gridEntity = Isaac::CreateGridEntity(Type,GridIndex); if (gridEntity != (GridEntity *)0x0) { if (this->_gridEntities[GridIndex] != (undefined4 *)0x0) { @@ -1861,7 +1861,7 @@ byte Room::SpawnGridEntityDesc(int GridIndex, GridEntityDesc *Desc) uVar8 = iVar3 - 900; bVar9 = iVar3 == 900; } - if (bVar9 || bVar10 != (int)uVar8 < 0) { + if (bVar9 || bVar10 != GHIDRA_INT(uVar8) < 0) { gridEntity = Isaac::CreateGridEntity(iVar2,GridIndex); if (gridEntity != (GridEntity *)0x0) { if (this->_gridEntities[GridIndex] != (undefined4 *)0x0) { @@ -1956,7 +1956,7 @@ void Room::TransformEntry(void *entry, uint gridIndex, uint seed) void *cardConfigs; ushort *subTypePtr; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); uVar7 = 1; entryPtr = entry; local_58 = seed; @@ -1975,8 +1975,8 @@ void Room::TransformEntry(void *entry, uint gridIndex, uint seed) } rng._seed = seed >> 1 ^ seed; rng._seed = rng._seed << 0x15 ^ rng._seed; - rng._seed = (uint)rng._seed >> 0x14 ^ rng._seed; - uVar7 = (ushort)(rng._seed == ((uint)rng._seed / 0x28) * 0x28); + rng._seed = GHIDRA_UINT(rng._seed) >> 0x14 ^ rng._seed; + uVar7 = (ushort)(rng._seed == (GHIDRA_UINT(rng._seed) / 0x28) * 0x28); LAB_007ec1a6: *(ushort *)((char *)entry + 4) = uVar7; } @@ -1985,8 +1985,8 @@ LAB_007ec1a6: goto LAB_007ec1a6; } local_40 = *(uint *)entry; - local_30 = (ushort *)((int)entry + 6); - puVar13 = (ushort *)((int)entry + 4); + local_30 = (ushort *)(GHIDRA_INT(entry) + 6); + puVar13 = (ushort *)(GHIDRA_INT(entry) + 4); variantPtr = puVar13; local_33 = LuaEngine::Callback_PreEntitySpawn(&local_40,puVar13,local_30,gridIndex,seed); *(uint *)entry = local_40; @@ -2089,8 +2089,8 @@ LAB_007ec3d4: uVar7 = *local_30; if ((((uVar7 != 0) && (cardConfigs = (g_manager->_itemConfig)._cards._begin, - (int)(uint)uVar7 < (int)(g_manager->_itemConfig)._cards._end - (int)cardConfigs >> 2)) - && (iVar4 = *(int *)((char *)cardConfigs + (uint)uVar7 * 4), iVar4 != 0)) && + GHIDRA_INT(GHIDRA_UINT(uVar7)) < GHIDRA_INT((g_manager->_itemConfig)._cards._end) - GHIDRA_INT(cardConfigs) >> 2)) + && (iVar4 = *(int *)((char *)cardConfigs + GHIDRA_UINT(uVar7) * 4), iVar4 != 0)) && (iVar4 = *(int *)(iVar4 + 4), -1 < iVar4)) { bVar2 = ((PersistentGameData *)(&manager->_persistentGameData))->PersistentGameData::Unlocked(iVar4); uVar3 = local_40; @@ -2226,7 +2226,7 @@ LAB_007ec4c4: } iVar4 = g_game->_difficulty; if ((iVar4 == 2) || (local_40 = uVar11, iVar4 == 3)) { - if ((int)uVar11 < 5) { + if (GHIDRA_INT(uVar11) < 5) { local_40 = uVar11 * 2 - 1; } else { @@ -2303,7 +2303,7 @@ LAB_007ec9c4: ((((room->_roomType == 3 && ((uVar3 == 8 || (uVar3 == 9)))) && (((uVar6 = ((RNG *)(&rng))->RNG::RandomInt(2), uVar6 == 0 && (local_32 != '\0')) || (local_31 != '\0')))) || - (((9 < (int)uVar3 && (local_30 != (ushort *)0x0)) || (g_game->_currentRoomIdx == -0xc)) + (((9 < GHIDRA_INT(uVar3) && (local_30 != (ushort *)0x0)) || (g_game->_currentRoomIdx == -0xc)) )))))) { bVar2 = ((Level *)((Level *)g_game))->Level::IsNextStageAvailable(); if (bVar2 == 0) goto LAB_007ec9c4; @@ -2360,7 +2360,7 @@ LAB_007ecad5: } } if (*entityType - 1U < 999) { - local_54 = (int *)(uint)*puVar13; + local_54 = (int *)GHIDRA_UINT(*puVar13); Entity_NPC::Redirect(entityType,(int *)&local_54); curGame = g_game; *puVar13 = (ushort)local_54; @@ -2412,10 +2412,10 @@ LAB_007ecbb2: if (((g_manager->_persistentGameData)._achievements[0x15c] == 0) && ((g_manager->_state != 2 || (((curGame->_dailyChallenge)._id == 0 && (curGame->_isDebug == 0))) ))) { - sVar8 = (short)((uint)uVar9 >> 8) << 8; + sVar8 = (short)(GHIDRA_UINT(uVar9) >> 8) << 8; } else { - sVar8 = (short)CONCAT31((int3)((uint)uVar9 >> 8),1); + sVar8 = (short)CONCAT31((int3)(GHIDRA_UINT(uVar9) >> 8),1); } iVar4 = *entityType; local_32 = (char)sVar8; @@ -2550,8 +2550,8 @@ LAB_007eccb7: uVar6 = ((RNG *)(&rng))->RNG::RandomInt(5); if (uVar6 == 0) { if (local_32 != '\0') { - local_58 = gridIndex / (uint)room->_gridWidth; - gridX = gridIndex % (uint)room->_gridWidth; + local_58 = gridIndex / GHIDRA_UINT(room->_gridWidth); + gridX = gridIndex % GHIDRA_UINT(room->_gridWidth); local_54 = room->_doorGridPositions; uVar3 = 0; do { @@ -2559,16 +2559,16 @@ LAB_007eccb7: if (((*(uint *)((char *)room->_descriptor + (uVar3 >> 5) * 4 + 0x18) & 1 << ((byte)uVar3 & 0x1f)) != 0) && (uVar6 = *local_54 / room->_gridWidth - local_58, - uVar5 = *local_54 % room->_gridWidth - gridX, uVar10 = (int)uVar6 >> 0x1f, - uVar11 = (int)uVar5 >> 0x1f, - (int)(((uVar6 ^ uVar10) - uVar10) + ((uVar5 ^ uVar11) - uVar11)) < 4)) { + uVar5 = *local_54 % room->_gridWidth - gridX, uVar10 = GHIDRA_INT(uVar6) >> 0x1f, + uVar11 = GHIDRA_INT(uVar5) >> 0x1f, + GHIDRA_INT((((uVar6 ^ uVar10) - uVar10) + ((uVar5 ^ uVar11) - uVar11))) < 4)) { entityType = entryPtr; uVar3 = local_40; goto switchD_007ecc0d_caseD_b; } uVar3 = uVar3 + 1; local_54 = local_54 + 1; - } while ((int)uVar3 < 8); + } while (GHIDRA_INT(uVar3) < 8); goto LAB_007eccb7; } } @@ -2589,7 +2589,7 @@ switchD_007ecf80_caseD_e: local_32 = '\x01'; break; case 0x19: - if (2 < (int)uVar3) goto switchD_007ecf80_caseD_e; + if (2 < GHIDRA_INT(uVar3)) goto switchD_007ecf80_caseD_e; break; case 0x1d: case 0x1e: @@ -2718,7 +2718,7 @@ byte Room::SpawnEntry(uint gridIndex, void *entry, uint seed, Entity **outEntity bool isUnlocked; short *poopCount; - local_14 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_14 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; local_2c = outEntity; rng._shift1 = 5; rng._shift2 = 9; @@ -2727,16 +2727,16 @@ byte Room::SpawnEntry(uint gridIndex, void *entry, uint seed, Entity **outEntity local_30 = (Entity *)seed; rng._seed = seed; local_28 = (Manager *)&DAT_00000007; - rng._shift3 = (int)&DAT_00000007; + rng._shift3 = GHIDRA_INT(&DAT_00000007); gridIndexLocal = (float)gridIndex; local_54 = seed; room = gridEntity; TransformEntry(gridEntity,&entryLocal,gridIndex,seed); - if (((g_game->_currentRoomIdx == -0xc) && ((uint)entryLocal == 5)) && (entryLocal._4_2_ == 100)) + if (((g_game->_currentRoomIdx == -0xc) && (GHIDRA_UINT(entryLocal) == 5)) && ((*(undefined2 *)((char *)&(entryLocal) + 0x4)) == 100)) goto LAB_007ed567; bVar3 = ((Level *)((Level *)g_game))->Level::HasMirrorDimension(); if ((((bVar3 != 0) && (isRespawn == 0)) && - ((g_game->_currentDimensionIdx == 1 && ((uint)entryLocal == 5)))) && + ((g_game->_currentDimensionIdx == 1 && (GHIDRA_UINT(entryLocal) == 5)))) && ((iVar5 = *(int *)((char *)room->_descriptor + 0x10), *(int *)(iVar5 + 8) != 4 || (*(int *)(iVar5 + 0x10) != 0x22)))) goto LAB_007ed567; pvVar6 = room->_descriptor; @@ -2746,12 +2746,12 @@ byte Room::SpawnEntry(uint gridIndex, void *entry, uint seed, Entity **outEntity else { bVar3 = (byte)(*(uint *)(*(int *)((char *)pvVar6 + 0x10) + 0x4c) >> 3) & 1; } - iVar5 = (uint)entryLocal; + iVar5 = GHIDRA_UINT(entryLocal); if (bVar3 != 0) { - if ((uint)entryLocal == 1000) { + if (GHIDRA_UINT(entryLocal) == 1000) { if ((float)room->_tintedRockIdx != gridIndexLocal) goto LAB_007ed444; } - else if (((uint)entryLocal == 0x3e9) || ((uint)entryLocal == 0x3ea)) { + else if ((GHIDRA_UINT(entryLocal) == 0x3e9) || (GHIDRA_UINT(entryLocal) == 0x3ea)) { LAB_007ed444: if ((g_game->_stageType == 2) && (*(int *)(*(int *)((char *)pvVar6 + 0x10) + 8) == 1)) { if (local_54 == 0) { @@ -2760,17 +2760,17 @@ LAB_007ed444: bVar3 = (*pcVar2)(); return bVar3; } - uVar4 = (uint)local_30 >> ((byte)rng._shift1 & 0x1f) ^ (uint)local_30; + uVar4 = GHIDRA_UINT(local_30) >> ((byte)rng._shift1 & 0x1f) ^ GHIDRA_UINT(local_30); uVar4 = uVar4 << ((byte)rng._shift2 & 0x1f) ^ uVar4; rng._seed = uVar4 >> ((byte)local_28 & 0x1f) ^ uVar4; local_30 = (Entity *)rng._seed; - if ((uint)rng._seed % 10 == 0) { + if (GHIDRA_UINT(rng._seed) % 10 == 0) { iVar7 = g_game->_stage; if ((iVar7 == 1) || (iVar7 == 2)) { - entryLocal = CONCAT44(entryLocal._4_4_,0x21); + entryLocal = CONCAT44((*(undefined4 *)((char *)&(entryLocal) + 0x4)),0x21); uVar4 = ((RNG *)(&rng))->RNG::RandomInt(0x28); - iVar5 = (uint)entryLocal; - entryLocal = (ulonglong)CONCAT14(uVar4 == 0,(uint)entryLocal); + iVar5 = GHIDRA_UINT(entryLocal); + entryLocal = (ulonglong)CONCAT14(uVar4 == 0,GHIDRA_UINT(entryLocal)); local_28 = (Manager *)rng._shift3; local_30 = (Entity *)rng._seed; } @@ -2792,43 +2792,43 @@ LAB_007ed444: } pMVar9 = (Manager *)room; if (((room->_roomType == 2) && (*(int *)room->_descriptor < 0)) && (iVar5 == 6)) { - if (entryLocal._4_2_ == 8) goto LAB_007ed567; + if ((*(undefined2 *)((char *)&(entryLocal) + 0x4)) == 8) goto LAB_007ed567; LAB_007ed9e7: bVar3 = *(byte *)((char *)room->_descriptor + 0x44); - local_54 = CONCAT31((int3)((uint)pMVar9 >> 8),bVar3) & 0xffffff01; + local_54 = CONCAT31((int3)(GHIDRA_UINT(pMVar9) >> 8),bVar3) & 0xffffff01; if ((((bVar3 & 1) == 0) && (room->_roomType == 5)) && ((*(uint *)((char *)room->_descriptor + 0x44) & 0x10000) != 0)) { - local_54 = (uint)(iVar5 != 0x38f); + local_54 = GHIDRA_UINT((iVar5 != 0x38f)); } if (iVar5 == 5) { bVar3 = ((Level *)((Level *)g_game))->Level::IsMausoleumHeartStage(); if (bVar3 != 0) goto LAB_007ed567; - iVar5 = (uint)entryLocal; + iVar5 = GHIDRA_UINT(entryLocal); } game = g_game; if ((iVar5 == 0x3c5) && ((*(uint *)((char *)room->_descriptor + 0x44) >> 2 & 1) != 0)) goto LAB_007ed567; if ((char)local_54 != '\0') { - bVar3 = IsPersistentRoomEntity(iVar5,(uint)entryLocal._4_2_,local_54); + bVar3 = IsPersistentRoomEntity(iVar5,(*(undefined2 *)((char *)&(GHIDRA_UINT(entryLocal)) + 0x4)),local_54); if (((bVar3 == 0) && (bVar3 = ((Game *)(game))->Game::IsInTimedSet(0x19), bVar3 == 0)) && ((bVar3 = ((Game *)(game))->Game::IsInTimedSet(0x20), bVar3 == 0 && (isRespawn == 0)))) { - bVar3 = entity_type_is_saved(iVar5,(uint)entryLocal._4_2_,(uint)entryLocal._6_2_,0,1); + bVar3 = entity_type_is_saved(iVar5,(*(undefined2 *)((char *)&(GHIDRA_UINT(entryLocal)) + 0x4)),(*(undefined2 *)((char *)&(GHIDRA_UINT(entryLocal)) + 0x6)),0,1); if (bVar3 == 0) goto LAB_007ed567; } } ((EntityRef *)(&entityRef))->EntityRef::EntityRef(); pRVar10 = room; fVar14 = gridIndexLocal; - if (((uint)gridIndexLocal < 0x1c0) && (room->_gridEntities[(int)gridIndexLocal] != (int *)0x0)) + if ((GHIDRA_UINT(gridIndexLocal) < 0x1c0) && (room->_gridEntities[GHIDRA_INT(gridIndexLocal)] != (int *)0x0)) { - (**(code **)(*(int *)room->_gridEntities[(int)gridIndexLocal] + 0x14))(1); + (**(code **)(*(int *)room->_gridEntities[GHIDRA_INT(gridIndexLocal)] + 0x14))(1); } - local_74.x = (float)((int)fVar14 % pRVar10->_gridWidth) * 40.0 + 40.0; - local_74.y = (float)((int)fVar14 / pRVar10->_gridWidth) * 40.0 + 120.0; + local_74.x = (float)(GHIDRA_INT(fVar14) % pRVar10->_gridWidth) * 40.0 + 40.0; + local_74.y = (float)(GHIDRA_INT(fVar14) / pRVar10->_gridWidth) * 40.0 + 120.0; uVar4 = ((RNG *)(&rng))->RNG::Next(); - local_30 = ((Game *)(g_game))->Game::Spawn((uint)entryLocal,(uint)entryLocal._4_2_,&local_74,&g_vectorZero, - (Entity *)0x0,(uint)entryLocal._6_2_,uVar4); - local_30->_spawnGridIndex = (int)fVar14; + local_30 = ((Game *)(g_game))->Game::Spawn(GHIDRA_UINT(entryLocal),(*(undefined2 *)((char *)&(GHIDRA_UINT(entryLocal)) + 0x4)),&local_74,&g_vectorZero, + (Entity *)0x0,(*(undefined2 *)((char *)&(GHIDRA_UINT(entryLocal)) + 0x6)),uVar4); + local_30->_spawnGridIndex = GHIDRA_INT(fVar14); if (local_30->_type == 5) { iVar5 = __RTDynamicCast(local_30,0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Pickup::RTTI_Type_Descriptor); @@ -2874,7 +2874,7 @@ LAB_007ed9e7: } fVar14 = gridIndexLocal; } - bVar3 = entity_type_is_saved((uint)entryLocal,(uint)entryLocal._4_2_,(uint)entryLocal._6_2_,0,0) + bVar3 = entity_type_is_saved(GHIDRA_UINT(entryLocal),(*(undefined2 *)((char *)&(GHIDRA_UINT(entryLocal)) + 0x4)),(*(undefined2 *)((char *)&(GHIDRA_UINT(entryLocal)) + 0x6)),0,0) ; if (bVar3 != 0) { local_3c = fVar14; @@ -2883,7 +2883,7 @@ LAB_007ed9e7: iVar5 = pRVar10->_roomType; if (iVar5 == 0x11) { LAB_007edd85: - if (((uint)entryLocal == 5) && ((entryLocal._4_2_ == 100 && (local_30->_type == 5)))) { + if ((GHIDRA_UINT(entryLocal) == 5) && (((*(undefined2 *)((char *)&(entryLocal) + 0x4)) == 100 && (local_30->_type == 5)))) { local_30[1]._sprite._color._offset[2] = 1.4013e-45; } } @@ -2941,14 +2941,14 @@ LAB_007ed5aa: uVar4 = uVar4 << ((byte)tmpRng._shift2 & 0x1f) ^ uVar4; uVar4 = uVar4 >> 0x13 ^ uVar4; pMVar9 = (Manager *)0x0; - if ((float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + if ((float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283062e-10 <= local_3c) { iVar5 = 0x5dc; entryLocal = 0x5dc; goto LAB_007ed926; } } - iVar5 = (uint)entryLocal; + iVar5 = GHIDRA_UINT(entryLocal); } } if (iVar5 == 0x514) { @@ -2958,22 +2958,22 @@ LAB_007ed5aa: bVar3 = (*pcVar2)(); return bVar3; } - uVar4 = (uint)local_30 >> ((byte)rng._shift1 & 0x1f) ^ (uint)local_30; + uVar4 = GHIDRA_UINT(local_30) >> ((byte)rng._shift1 & 0x1f) ^ GHIDRA_UINT(local_30); uVar4 = uVar4 << ((byte)rng._shift2 & 0x1f) ^ uVar4; rng._seed = uVar4 >> ((byte)local_28 & 0x1f) ^ uVar4; - pMVar9 = (Manager *)(((uint)rng._seed / 10) * 10); + pMVar9 = (Manager *)((GHIDRA_UINT(rng._seed) / 10) * 10); local_30 = (Entity *)rng._seed; - if ((uint)rng._seed % 10 != 0) goto LAB_007ed72b; + if (GHIDRA_UINT(rng._seed) % 10 != 0) goto LAB_007ed72b; iVar5 = 0x124; - entryLocal._4_4_ = 0; + (*(undefined4 *)((char *)&(entryLocal) + 0x4)) = 0; LAB_007ed9e4: - entryLocal = CONCAT44(entryLocal._4_4_,iVar5); + entryLocal = CONCAT44((*(undefined4 *)((char *)&(entryLocal) + 0x4)),iVar5); goto LAB_007ed9e7; } LAB_007ed72b: if (iVar5 != 9000) { if (iVar5 != 999) goto LAB_007ed79c; - if (entryLocal._4_2_ == 0x27) goto LAB_007ed746; + if ((*(undefined2 *)((char *)&(entryLocal) + 0x4)) == 0x27) goto LAB_007ed746; LAB_007ed9df: iVar5 = 1000; goto LAB_007ed9e4; @@ -2989,7 +2989,7 @@ LAB_007ed746: goto LAB_007ed926; } pMVar9 = extraout_ECX_00; - iVar5 = (uint)entryLocal; + iVar5 = GHIDRA_UINT(entryLocal); LAB_007ed79c: if (iVar5 == 9000) { LAB_007ed7b7: @@ -3001,21 +3001,21 @@ LAB_007ed7b7: goto LAB_007ed926; } pMVar9 = extraout_ECX_01; - iVar5 = (uint)entryLocal; + iVar5 = GHIDRA_UINT(entryLocal); } else if (iVar5 == 999) { - if (entryLocal._4_2_ != 0x27) goto LAB_007ed9df; + if ((*(undefined2 *)((char *)&(entryLocal) + 0x4)) != 0x27) goto LAB_007ed9df; goto LAB_007ed7b7; } if (iVar5 == 0x11) { - if (entryLocal._4_2_ == 0) { + if ((*(undefined2 *)((char *)&(entryLocal) + 0x4)) == 0) { if (local_30 == (Entity *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar2 = (code *)swi(3); bVar3 = (*pcVar2)(); return bVar3; } - uVar4 = (uint)local_30 >> ((byte)rng._shift1 & 0x1f) ^ (uint)local_30; + uVar4 = GHIDRA_UINT(local_30) >> ((byte)rng._shift1 & 0x1f) ^ GHIDRA_UINT(local_30); uVar4 = uVar4 << ((byte)rng._shift2 & 0x1f) ^ uVar4; rng._seed = uVar4 >> ((byte)local_28 & 0x1f) ^ uVar4; pMVar9 = local_28; @@ -3026,19 +3026,19 @@ LAB_007ed7b7: (((g_game->_dailyChallenge)._id == 0 && (g_game->_isDebug == 0)))))))) goto LAB_007ed870; newVariant = 3; LAB_007ed8ea: - entryLocal._0_6_ = CONCAT24(newVariant,(uint)entryLocal); - rng._seed = (int)local_30; + (*(undefined1 *)((char *)&(entryLocal) + 0x0)) = CONCAT24(newVariant,GHIDRA_UINT(entryLocal)); + rng._seed = GHIDRA_INT(local_30); } else { LAB_007ed870: - if (entryLocal._4_2_ == 1) { + if ((*(undefined2 *)((char *)&(entryLocal) + 0x4)) == 1) { if (local_30 == (Entity *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar2 = (code *)swi(3); bVar3 = (*pcVar2)(); return bVar3; } - uVar4 = (uint)local_30 >> ((byte)rng._shift1 & 0x1f) ^ (uint)local_30; + uVar4 = GHIDRA_UINT(local_30) >> ((byte)rng._shift1 & 0x1f) ^ GHIDRA_UINT(local_30); uVar4 = uVar4 << ((byte)rng._shift2 & 0x1f) ^ uVar4; rng._seed = uVar4 >> ((byte)local_28 & 0x1f) ^ uVar4; pMVar9 = local_28; @@ -3065,16 +3065,16 @@ LAB_007ed926: game = g_game; if (iVar5 == 0x3ca) goto LAB_007ee699; if (iVar5 == 0x3c9) { - uVar4 = (uint)gridIndexLocal / (uint)room->_gridWidth; - local_EAX_3229 = (uint)gridIndexLocal % (uint)room->_gridWidth; - add_trigger_output_cell(room,(uint)entryLocal._4_2_,local_EAX_3229 - 1,uVar4); - add_trigger_output_cell(room,(uint)entryLocal._4_2_,local_EAX_3229 + 1,uVar4); - add_trigger_output_cell(room,(uint)entryLocal._4_2_,local_EAX_3229,uVar4 - 1); - add_trigger_output_cell(room,(uint)entryLocal._4_2_,local_EAX_3229,uVar4 + 1); + uVar4 = GHIDRA_UINT(gridIndexLocal) / GHIDRA_UINT(room->_gridWidth); + local_EAX_3229 = GHIDRA_UINT(gridIndexLocal) % GHIDRA_UINT(room->_gridWidth); + add_trigger_output_cell(room,(*(undefined2 *)((char *)&(GHIDRA_UINT(entryLocal)) + 0x4)),local_EAX_3229 - 1,uVar4); + add_trigger_output_cell(room,(*(undefined2 *)((char *)&(GHIDRA_UINT(entryLocal)) + 0x4)),local_EAX_3229 + 1,uVar4); + add_trigger_output_cell(room,(*(undefined2 *)((char *)&(GHIDRA_UINT(entryLocal)) + 0x4)),local_EAX_3229,uVar4 - 1); + add_trigger_output_cell(room,(*(undefined2 *)((char *)&(GHIDRA_UINT(entryLocal)) + 0x4)),local_EAX_3229,uVar4 + 1); return 1; } if (iVar5 == 6000) { - (room->_railManager)._sprite._filename._buf[(int)gridIndexLocal + -0x1c0] = entryLocal._4_1_; + (room->_railManager)._sprite._filename._buf[GHIDRA_INT(gridIndexLocal) + -0x1c0] = (*(undefined1 *)((char *)&(entryLocal) + 0x4)); return 1; } if ((0 < iVar5) && (iVar5 < 1000)) { @@ -3083,11 +3083,11 @@ LAB_007ed926: } if (iVar5 == 0x1771) { iVar5 = 3000; - (room->_railManager)._sprite._filename._buf[(int)gridIndexLocal + -0x1c0] = entryLocal._4_1_; - entryLocal = CONCAT26(entryLocal._6_2_,3000); + (room->_railManager)._sprite._filename._buf[GHIDRA_INT(gridIndexLocal) + -0x1c0] = (*(undefined1 *)((char *)&(entryLocal) + 0x4)); + entryLocal = CONCAT26((*(undefined2 *)((char *)&(entryLocal) + 0x6)),3000); } - if (room->_gridEntities[(int)gridIndexLocal] != (void *)0x0) goto LAB_007ed567; - local_2c = (Entity **)(uint)entryLocal._4_2_; + if (room->_gridEntities[GHIDRA_INT(gridIndexLocal)] != (void *)0x0) goto LAB_007ed567; + local_2c = (*(undefined2 *)((char *)&((Entity **)GHIDRA_UINT(entryLocal)) + 0x4)); local_6c = (PlayerManager *)0x0; local_31 = has_room_config_flag(room,2); local_3c = 2.8026e-45; @@ -3101,7 +3101,7 @@ LAB_007ed926: } switch(iVar5) { case 1000: - if ((local_31 != 0) || (entryLocal._6_2_ != 0)) { + if ((local_31 != 0) || ((*(undefined2 *)((char *)&(entryLocal) + 0x6)) != 0)) { iVar5 = 2; local_28 = (Manager *)0x2; gridVariant = (Entity **)extraout_EDX; @@ -3137,15 +3137,15 @@ LAB_007ed926: local_30 = (Entity *)((local_40 + local_58) * (float)local_28 + 0.5); fVar14 = ((RNG *)(&tmpRng))->RNG::RandomFloat(); uVar4 = pRVar10->_gridWidth; - local_EAX_3229 = (uint)gridIndexLocal / uVar4; - uVar4 = (uint)gridIndexLocal % uVar4; + local_EAX_3229 = GHIDRA_UINT(gridIndexLocal) / uVar4; + uVar4 = GHIDRA_UINT(gridIndexLocal) % uVar4; local_40 = -(fVar14 * 360.0) * 0.017453292; local_58 = cos(local_40); fVar14 = sin(local_40); - fVar13 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) - + fVar13 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) - ellipseCenterX; - fVar11 = (float)((double)(int)local_EAX_3229 + - __uint_to_double_fixup[-((int)local_EAX_3229 >> 0x1f)]) - local_74.y; + fVar11 = (float)((double)GHIDRA_INT(local_EAX_3229) + + __uint_to_double_fixup[-(GHIDRA_INT(local_EAX_3229) >> 0x1f)]) - local_74.y; fVar12 = (fVar13 * local_58 - fVar14 * fVar11) / (float)local_30; fVar14 = (fVar13 * fVar14 + local_58 * fVar11) / local_7c.y; local_31 = fVar14 * fVar14 + fVar12 * fVar12 <= 1.0; @@ -3168,10 +3168,10 @@ LAB_007ed926: } } else { - if (9 < (int)uVar4) { + if (9 < GHIDRA_INT(uVar4)) { gridVariant = local_2c; if (local_31 == 0) { - iVar5 = (uint)((int)uVar4 < 0x10) * 4 + 2; + iVar5 = GHIDRA_UINT((GHIDRA_INT(uVar4) < 0x10)) * 4 + 2; local_28 = (Manager *)iVar5; } else { @@ -3337,13 +3337,13 @@ switchD_007ee4c1_caseD_bb8: case 0xbb9: local_28 = (Manager *)0x7; uVar4 = ((RNG *)(&rng))->RNG::Next(); - local_7c.x = (float)((int)gridIndexLocal % room->_gridWidth) * 40.0 + 40.0; - local_7c.y = (float)((int)gridIndexLocal / room->_gridWidth) * 40.0 + 120.0; + local_7c.x = (float)(GHIDRA_INT(gridIndexLocal) % room->_gridWidth) * 40.0 + 40.0; + local_7c.y = (float)(GHIDRA_INT(gridIndexLocal) / room->_gridWidth) * 40.0 + 120.0; pEVar8 = ((Game *)(g_game))->Game::Spawn(1000,0xc0,&local_7c,&g_vectorZero,(Entity *)0x0, - (uint)entryLocal._6_2_,uVar4); + (*(undefined2 *)((char *)&(GHIDRA_UINT(entryLocal)) + 0x6)),uVar4); pEVar8->Update(); iVar5 = 7; - piVar1 = (int *)((int)room->_descriptor + 0x54); + piVar1 = (int *)(GHIDRA_INT(room->_descriptor) + 0x54); *piVar1 = *piVar1 + 1; pRVar10 = room; gridVariant = local_2c; @@ -3359,7 +3359,7 @@ switchD_007ede2a_caseD_3ed: LAB_007ee5d9: iVar5 = 7; local_28 = (Manager *)0x7; - piVar1 = (int *)((int)room->_descriptor + 0x54); + piVar1 = (int *)(GHIDRA_INT(room->_descriptor) + 0x54); *piVar1 = *piVar1 + 1; } goto LAB_007ee65c; @@ -3412,7 +3412,7 @@ LAB_007ee5d9: } iVar5 = 0xe; local_28 = (Manager *)0xe; - if ((local_31 == 0) && (entryLocal._6_2_ == 0)) { + if ((local_31 == 0) && ((*(undefined2 *)((char *)&(entryLocal) + 0x6)) == 0)) { if (local_2c == (Entity **)0x0) { uVar4 = ((RNG *)(&rng))->RNG::RandomInt(0x28); if (uVar4 == 0) { @@ -3459,7 +3459,7 @@ LAB_007ee378: itemOwner = ((PlayerManager *)(&game->_playerManager))->PlayerManager::FirstTrinketOwner(0x5b); if (itemOwner == (Entity_Player *)0x0) { iVar5 = 0xe; - poopCount = (short *)((int)room->_descriptor + 0x50); + poopCount = (short *)(GHIDRA_INT(room->_descriptor) + 0x50); *poopCount = *poopCount + 1; pRVar10 = room; gridVariant = local_2c; @@ -3469,7 +3469,7 @@ LAB_007ee378: uVar4 = 0x21; tmpRng._shift1 = 2; tmpRng._shift2 = 7; - tmpRng._seed = (int)pEVar8; + tmpRng._seed = GHIDRA_INT(pEVar8); iVar5 = ((Entity_Player *)(itemOwner))->Entity_Player::GetTrinketMultiplier(0x5b); if (iVar5 == 2) { uVar4 = 0x42; @@ -3483,7 +3483,7 @@ LAB_007ee378: gridVariant = (Entity **)0x5; } iVar5 = 0xe; - poopCount = (short *)((int)room->_descriptor + 0x50); + poopCount = (short *)(GHIDRA_INT(room->_descriptor) + 0x50); *poopCount = *poopCount + 1; pRVar10 = room; } @@ -3493,21 +3493,21 @@ LAB_007ee659: gridVariant = local_2c; } LAB_007ee65c: - gridEntity = Isaac::CreateGridEntity(iVar5,(uint)gridIndexLocal); + gridEntity = Isaac::CreateGridEntity(iVar5,GHIDRA_UINT(gridIndexLocal)); if (gridEntity == (GridEntity *)0x0) { LAB_007ed567: bVar3 = 0; } else { - pRVar10->_gridEntities[(int)gridIndexLocal] = gridEntity; - (gridEntity->_desc)._variant = (int)gridVariant; - (gridEntity->_desc)._varData = (int)local_6c; + pRVar10->_gridEntities[GHIDRA_INT(gridIndexLocal)] = gridEntity; + (gridEntity->_desc)._variant = GHIDRA_INT(gridVariant); + (gridEntity->_desc)._varData = GHIDRA_INT(local_6c); if (local_28 == (Manager *)0x17) { fVar14 = 0.0; - if (entryLocal._6_2_ != 0) { + if ((*(undefined2 *)((char *)&(entryLocal) + 0x6)) != 0) { fVar14 = local_3c; } - (gridEntity->_desc)._state = (int)fVar14; + (gridEntity->_desc)._state = GHIDRA_INT(fVar14); } ((GridEntity *)(gridEntity))->GridEntity::Init(local_54); LAB_007ee699: @@ -3532,10 +3532,10 @@ byte Room::make_wall(int x, int y) local_8 = 0xffffffff; puStack_c = &LAB_00b00ebb; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; uVar2 = this->_gridWidth * y + x; - if (((int)uVar2 < 0) || (this->_gridHeight * this->_gridWidth <= (int)uVar2)) { + if ((GHIDRA_INT(uVar2) < 0) || (this->_gridHeight * this->_gridWidth <= GHIDRA_INT(uVar2))) { KAGE_LogMessage(0x10,(byte *)"make_wall index out of bounds\n"); } if (this->_gridEntities[uVar2] != (void *)0x0) { @@ -3549,7 +3549,7 @@ byte Room::make_wall(int x, int y) if (y == 0) { if (x == 2) { uVar1 = Random(); - if (((int)uVar2 < 0) || (0x1bf < (int)uVar2)) { + if ((GHIDRA_INT(uVar2) < 0) || (0x1bf < GHIDRA_INT(uVar2))) { KAGE_LogMessage(0x10,(byte *)"SpawnGridEntity: Grid index invalid\n"); } if (0x1bf < uVar2) { @@ -3589,9 +3589,9 @@ byte Room::make_wall(int x, int y) } else if ((((y == 3) || (y == 4)) && (x == 0xe)) && (*(int *)(roomData + 0xc) == 1)) { Seed = Random(); - if ((((int)uVar2 < 0) || (0x1bf < (int)uVar2)) && - ((KAGE_LogMessage(0x10,(byte *)"SpawnGridEntity: Grid index invalid\n"), (int)uVar2 < 0 - || (0x1bf < (int)uVar2)))) { + if (((GHIDRA_INT(uVar2) < 0) || (0x1bf < GHIDRA_INT(uVar2))) && + ((KAGE_LogMessage(0x10,(byte *)"SpawnGridEntity: Grid index invalid\n"), GHIDRA_INT(uVar2) < 0 + || (0x1bf < GHIDRA_INT(uVar2))))) { (**(code **)(iRam00000000 + 4))(uVar1); ExceptionList = local_10; return 0; @@ -3664,7 +3664,7 @@ void Room::MakeDoor(int slot) local_8 = 0xffffffff; puStack_c = &LAB_00b00f0d; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(doorAngles + 8); + uVar2 = __security_cookie ^ GHIDRA_UINT((doorAngles + 8)); ExceptionList = &local_10; if (this->_doors[slot] == (void *)0x0) { iVar1 = this->_doorGridPositions[slot]; @@ -3684,10 +3684,10 @@ void Room::MakeDoor(int slot) } else { ((GridEntity *)(newDoor))->GridEntity::GridEntity(); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; *(undefined ***)newDoor = IsaacRepentancePlus::GridEntity_Door::vftable; ((ANM2 *)((ANM2 *)&newDoor[1]._desc._spawnSeed))->ANM2::constructor(); - local_8 = CONCAT31(local_8._1_3_,4); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),4); ((ANM2 *)((ANM2 *)(newDoor[1]._sprite._championColor._colorize + 1)))->ANM2::constructor(); newDoor[2]._sprite._color._colorize[1] = 0.0; newDoor[2]._sprite._color._offset[1] = 0.0; @@ -3733,7 +3733,7 @@ void Room::MakeDoor(int slot) *(undefined1 *)(piVar3 + 7) = 1; piVar3[10] = game->_frameCount; uVar2 = slot & 0x80000003; - if ((int)uVar2 < 0) { + if (GHIDRA_INT(uVar2) < 0) { uVar2 = (uVar2 - 1 | 0xfffffffc) + 1; } doorAngles[0] = -0x3d4c0000; @@ -3828,7 +3828,7 @@ void Room::on_leave() ehState = 0xffffffff; puStack_c = &LAB_00b00fab; prevExceptionList = ExceptionList; - stackCookie = __security_cookie ^ (int)register0x00000010 - 4U; + stackCookie = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &prevExceptionList; if (0 < this->_shopRestockTimer) { this->_shopRestockTimer = -1; @@ -3840,12 +3840,12 @@ void Room::on_leave() if ((this->_roomClearDelay - 1U < 8) && ((*(byte *)((char *)pvVar1 + 0x44) & 1) == 0)) { this->_roomClearDelay = 0; *(uint *)((char *)pvVar1 + 0x44) = *(uint *)((char *)pvVar1 + 0x44) | 1; - clearCount = (short *)((int)this->_descriptor + 0x4a); + clearCount = (short *)(GHIDRA_INT(this->_descriptor) + 0x4a); *clearCount = *clearCount + 1; pvVar1 = this->_descriptor; ScoreSheet::add_cleared_room (&game->_scoreSheet,this->_roomType,*(int *)(*(int *)((char *)pvVar1 + 0x10) + 0x48), - (uint)*(ushort *)((char *)pvVar1 + 0x4a), + GHIDRA_UINT(*(ushort *)((char *)pvVar1 + 0x4a)), (byte)(*(uint *)((char *)pvVar1 + 0x44) >> 10) & 1); game = g_game; bVar2 = ((Game *)(g_game))->Game::IsGreedMode(); @@ -3879,12 +3879,12 @@ void Room::on_leave() gridSaveSlot[1] = 0; gridSaveSlot[2] = 0; gridSaveSlot[3] = 0; - emptyGridDesc._24_4_ = emptyGridDesc._24_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(emptyGridDesc) + 0x18)) = (*(undefined4 *)((char *)&(emptyGridDesc) + 0x18)) & 0xffffff00; emptyGridDesc._variableSeed = 0x16a9de81; gridSaveSlot = (undefined4 *)(gridSaveStates + 0x10 + gridSaveOffset); *gridSaveSlot = 0x16a9de81; gridSaveSlot[1] = 0; - gridSaveSlot[2] = emptyGridDesc._24_4_; + gridSaveSlot[2] = (*(undefined4 *)((char *)&(emptyGridDesc) + 0x18)); gridSaveSlot[3] = 0x16a9de81; } else { @@ -3915,7 +3915,7 @@ void Room::on_leave() local_14 = 0; if ((this->_entityList)._updateEL._size != 0) { do { - pickup = *(Entity_Pickup **)((int)(this->_entityList)._updateEL._data + local_14 * 4); + pickup = *(Entity_Pickup **)(GHIDRA_INT((this->_entityList)._updateEL._data) + local_14 * 4); local_9c = 0; uStack_98 = 0; uStack_94 = 0xffffffff; @@ -3984,14 +3984,14 @@ void Room::on_leave() } } } - ehState._0_1_ = 2; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; if (childLinkedSaveStateRefCount != (int *)0x0) { isReleased = (**(code **)(*childLinkedSaveStateRefCount + 0xc))(); if ((isReleased != '\0') && (g_entitySaveStateReleaseFn != (void *)0x0)) { (*g_entitySaveStateReleaseFn)(&childLinkedSaveState); } } - ehState = CONCAT31(ehState._1_3_,3); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),3); if (childExtraDataRefCount != (int *)0x0) { isReleased = (**(code **)(*childExtraDataRefCount + 0xc))(); if ((isReleased != '\0') && (g_entitySaveStateExtraDataReleaseFn != (void *)0x0)) { @@ -4028,7 +4028,7 @@ void Room::on_leave() } } local_14 = local_14 + 1; - } while (local_14 < (uint)(this->_entityList)._updateEL._size); + } while (local_14 < GHIDRA_UINT((this->_entityList)._updateEL._size)); } } ExceptionList = prevExceptionList; @@ -4070,8 +4070,8 @@ void Room::RestoreState() minecartAngle = (float)saveState_00[0x14]; minecartDir.x = cos(minecartAngle * 0.017453292); minecartDir.y = sin(minecartAngle * 0.017453292); - minecartPos.x = (float)((int)(short)saveState_00[8] % this->_gridWidth) * 40.0 + 40.0; - minecartPos.y = (float)((int)(short)saveState_00[8] / this->_gridWidth) * 40.0 + 120.0; + minecartPos.x = (float)(GHIDRA_INT((short)saveState_00[8]) % this->_gridWidth) * 40.0 + 40.0; + minecartPos.y = (float)(GHIDRA_INT((short)saveState_00[8]) / this->_gridWidth) * 40.0 + 120.0; ((Entity *)((Entity *)pickup))->Entity::GiveMinecart(&minecartPos,&minecartDir); saveState_00 = saveState; } @@ -4091,7 +4091,7 @@ void Room::RestoreState() if (owner != pvVar1) { do { invoke_pending_callbacks(owner); - owner = (void *)((int)owner + 0x78); + owner = (void *)(GHIDRA_INT(owner) + 0x78); } while (owner != pvVar1); owner = *(void **)((char *)roomDesc + 0x74); } @@ -4173,14 +4173,14 @@ void Room::update_door_transitions() local_14 = -NAN; puStack_18 = &LAB_00b00ff1; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(doorOffsets + 0xd); + local_24 = __security_cookie ^ GHIDRA_UINT((doorOffsets + 0xd)); ExceptionList = &local_1c; if (((*(int *)&g_game->_roomTransition == 0) && (((roomConfig = *(int **)((char *)this->_descriptor + 0x10), roomConfig == (int *)0x0 || (roomConfig[2] != 0x10)) || (*roomConfig != 0x23)))) && (playerIndex = 0, - (int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0)) { + GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0)) { do { player = ((Game *)(g_game))->Game::GetPlayer(playerIndex); if (player->_variant == 0) { @@ -4213,7 +4213,7 @@ void Room::update_door_transitions() velocityY = (player->_velocity).y; if (4.0 < fVar6 * fVar6 + velocityY * velocityY) { if (ABS(fVar6) <= ABS(velocityY)) { - uVar1 = (uint)(0.0 <= velocityY) * 2 + 1; + uVar1 = GHIDRA_UINT((0.0 <= velocityY)) * 2 + 1; } else { uVar1 = 2; @@ -4240,18 +4240,18 @@ void Room::update_door_transitions() if ((isDoorPassable) && (fVar4 < 25.0)) { Game::save_rewind_state(uVar2); game = g_game; - if ((int)uVar2 < 0) { + if (GHIDRA_INT(uVar2) < 0) { uVar1 = 0xffffffff; } else { uVar1 = uVar2; - if (6 < (int)uVar2) { + if (6 < GHIDRA_INT(uVar2)) { uVar1 = 7; } } g_game->_leaveDoor = uVar1; this_01 = game; - if (*(int *)((int)this->_doors[uVar2] + 0x394) == -1) { + if (*(int *)(GHIDRA_INT(this->_doors[uVar2]) + 0x394) == -1) { if (*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < g_invalidRoomDescriptorGuard ) { _Init_thread_header(&g_invalidRoomDescriptorGuard); @@ -4265,30 +4265,30 @@ void Room::update_door_transitions() this_01 = g_game; } roomDesc = &g_roomDescriptorDummy; - if ((uint)game->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(game->_currentDimensionIdx) < 3) { roomDesc = game->_roomList + 0x1fb; } if (roomDesc->Data == (void *)0x0) { - iVar7 = *(int *)((int)this->_doors[uVar2] + 0x160); + iVar7 = *(int *)(GHIDRA_INT(this->_doors[uVar2]) + 0x160); ((Level *)((Level *)this_01))->Level::InitializeDevilAngelRoom(iVar7 == 0xf,iVar7 != 0xf); this_01 = g_game; - *(undefined4 *)((int)&g_game->_gameStateFlags + 4) = - *(undefined4 *)((int)&g_game->_gameStateFlags + 4); + *(undefined4 *)(GHIDRA_INT(&g_game->_gameStateFlags) + 4) = + *(undefined4 *)(GHIDRA_INT(&g_game->_gameStateFlags) + 4); if (iVar7 == 0xf) { - *(uint *)&this_01->_gameStateFlags = (uint)this_01->_gameStateFlags | 1; + *(uint *)&this_01->_gameStateFlags = GHIDRA_UINT(this_01->_gameStateFlags) | 1; } else { - *(uint *)&this_01->_gameStateFlags = (uint)this_01->_gameStateFlags | 0x20; + *(uint *)&this_01->_gameStateFlags = GHIDRA_UINT(this_01->_gameStateFlags) | 0x20; } } } iVar7 = -1; - targetRoomIdx = *(int *)((int)this->_doors[uVar2] + 0x394); + targetRoomIdx = *(int *)(GHIDRA_INT(this->_doors[uVar2]) + 0x394); if (targetRoomIdx < -99) { roomDesc = ((Level *)((Level *)this_01))->Level::GetRoomByIdx(targetRoomIdx,-1); transitionAnim = 0x12; iVar7 = roomDesc->Dimension; - if (*(int *)((int)this->_doors[uVar2] + 0x394) != -100) { + if (*(int *)(GHIDRA_INT(this->_doors[uVar2]) + 0x394) != -100) { transitionAnim = 0; } targetRoomIdx = roomDesc->GridIndex; @@ -4362,8 +4362,8 @@ LAB_007f070c: } playerIndex = playerIndex + 1; } while (playerIndex < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); } ExceptionList = local_1c; return; @@ -4376,8 +4376,8 @@ int Room::GetGridCollisionAtPos(Vector pos) int gridY; int gridX; - gridX = (int)((pos.x - 40.0) / 40.0 + 0.5); - gridY = (int)((pos.y - 120.0) / 40.0 + 0.5); + gridX = GHIDRA_INT(((pos.x - 40.0) / 40.0 + 0.5)); + gridY = GHIDRA_INT(((pos.y - 120.0) / 40.0 + 0.5)); if ((((gridX < 0) || (this->_gridWidth <= gridX)) || (gridY < 0)) || (this->_gridHeight <= gridY)) { collision = GetGridCollision(this,-1); @@ -4401,7 +4401,7 @@ uint Room::GetGridCollision(int index) return 4; } if (this->_gridEntities[index] != (void *)0x0) { - return *(uint *)((int)this->_gridEntities[index] + 0x3c); + return *(uint *)(GHIDRA_INT(this->_gridEntities[index]) + 0x3c); } gridPath = this->_gridPaths[index]; if (gridPath < 3000) { @@ -4445,15 +4445,15 @@ Vector * Room::GetLaserTarget(Vector *outTarget, Vector *position, Vector *direc currentY = position->y; outTarget->x = 0.0; endPos.x = direction->x * 10000.0 + position->x; - gridX = (int)((currentX - 40.0) / 40.0 + 0.5); + gridX = GHIDRA_INT(((currentX - 40.0) / 40.0 + 0.5)); hitPos.y = currentY; endPos.y = direction->y * 10000.0 + currentY; deltaX = endPos.x - position->x; deltaY = endPos.y - currentY; - xBoundarySide = (uint)(0.0 < deltaX) * 2; + xBoundarySide = GHIDRA_UINT((0.0 < deltaX)) * 2; stepX = xBoundarySide + -1; - gridY = (int)((currentY - 120.0) / 40.0 + 0.5); - yBoundarySide = (uint)(0.0 < deltaY) * 2; + gridY = GHIDRA_INT(((currentY - 120.0) / 40.0 + 0.5)); + yBoundarySide = GHIDRA_UINT((0.0 < deltaY)) * 2; stepY = yBoundarySide + -1; traveled = 0.0; if ((deltaX != g_vectorZero.x) || (fVar1 = 0.0, deltaY != g_vectorZero.y)) { @@ -4545,7 +4545,7 @@ byte Room::CheckLine(Vector *pos1, Vector *pos2, int mode, int gridPathThreshold float cornerOffsets [8]; uint local_c; - local_c = __security_cookie ^ (uint)&blockedPathCount; + local_c = __security_cookie ^ GHIDRA_UINT(&blockedPathCount); posX = pos1->x; posY = pos1->y; stepX = posX - pos2->x; @@ -4558,9 +4558,9 @@ byte Room::CheckLine(Vector *pos1, Vector *pos2, int mode, int gridPathThreshold roundBias = 0.5; curStepX = (stepX / lineLength) * 10.0; curStepY = (stepY / lineLength) * 10.0; - gridIndex = (int)((posX - 40.0) / 40.0 + 0.5); + gridIndex = GHIDRA_INT(((posX - 40.0) / 40.0 + 0.5)); if ((((gridIndex < 0) || (this->_gridWidth <= gridIndex)) || - (iVar1 = (int)((posY - 120.0) / 40.0 + 0.5), iVar1 < 0)) || (this->_gridHeight <= iVar1)) { + (iVar1 = GHIDRA_INT(((posY - 120.0) / 40.0 + 0.5)), iVar1 < 0)) || (this->_gridHeight <= iVar1)) { startGridIndex = 0xffffffff; } else { @@ -4589,8 +4589,8 @@ byte Room::CheckLine(Vector *pos1, Vector *pos2, int mode, int gridPathThreshold cornerOffsets[6] = 5.0; cornerOffsets[7] = -5.0; do { - iVar1 = (int)(((curX + cornerOffsets[uVar2 * 2]) - cellSize) / cellSize + roundBias); - gridIndex = (int)(((curY + cornerOffsets[uVar2 * 2 + 1]) - 120.0) / cellSize + roundBias); + iVar1 = GHIDRA_INT((((curX + cornerOffsets[uVar2 * 2]) - cellSize) / cellSize + roundBias)); + gridIndex = GHIDRA_INT((((curY + cornerOffsets[uVar2 * 2 + 1]) - 120.0) / cellSize + roundBias)); if (((iVar1 < 0) || (this->_gridWidth <= iVar1)) || ((gridIndex < 0 || (this->_gridHeight <= gridIndex)))) { gridIndex = -1; @@ -4614,7 +4614,7 @@ byte Room::CheckLine(Vector *pos1, Vector *pos2, int mode, int gridPathThreshold } } else { - collisionClass = *(int *)((int)this->_gridEntities[gridIndex] + 0x3c); + collisionClass = *(int *)(GHIDRA_INT(this->_gridEntities[gridIndex]) + 0x3c); } } else { @@ -4657,8 +4657,8 @@ byte Room::CheckLine(Vector *pos1, Vector *pos2, int mode, int gridPathThreshold } while (uVar2 < 4); } else { - gridIndex = (int)((curX - cellSize) / cellSize + roundBias); - iVar1 = (int)((curY - 120.0) / cellSize + roundBias); + gridIndex = GHIDRA_INT(((curX - cellSize) / cellSize + roundBias)); + iVar1 = GHIDRA_INT(((curY - 120.0) / cellSize + roundBias)); if ((((gridIndex < 0) || (this->_gridWidth <= gridIndex)) || (iVar1 < 0)) || (this->_gridHeight <= iVar1)) { gridIndex = -1; @@ -4815,7 +4815,7 @@ void Room::LoadBackdropGraphics() local_14 = -1; puStack_18 = &LAB_00b010d5; local_1c = ExceptionList; - uVar5 = __security_cookie ^ (uint)(local_58 + 0x48); + uVar5 = __security_cookie ^ GHIDRA_UINT((local_58 + 0x48)); ExceptionList = &local_1c; uVar10 = g_game->_stage; local_74[0] = g_game->_stageType; @@ -4875,7 +4875,7 @@ void Room::LoadBackdropGraphics() } local_74[0] = stageType; if (game->_challenge == 0x2d) { - local_40._buf._8_4_ = game->_dungeonPlacementSeed; + (*(undefined4 *)((char *)&(local_40._buf) + 0x8)) = game->_dungeonPlacementSeed; local_40._capacity = 7; local_40._buf[0xc] = '\x02'; local_40._buf[0xd] = '\0'; @@ -4905,7 +4905,7 @@ void Room::LoadBackdropGraphics() local_40._buf[0xe] = '\0'; local_40._buf[0xf] = '\0'; local_40._size = 0x15; - local_40._buf._8_4_ = *(int *)((char *)this->_descriptor + 0x58); + (*(undefined4 *)((char *)&(local_40._buf) + 0x8)) = *(int *)((char *)this->_descriptor + 0x58); local_40._capacity = 0x14; uVar10 = ((RNG *)((RNG *)(local_40._buf + 8)))->RNG::RandomInt(0x11); uVar10 = uVar10 + 1; @@ -4944,10 +4944,10 @@ switchD_007f145f_caseD_1d: (*(int *)((char *)this->_descriptor + 8) == g_game->_lastBossRoomListIdx)) { uVar10 = 0x1c; } - if (local_60._4_4_ == (int *)0x4) { + if ((*(undefined4 *)((char *)&(local_60) + 0x4)) == (int *)0x4) { if ((*(uint *)((char *)this->_descriptor + 0x44) >> 0xb & 1) != 0) goto switchD_007f145f_caseD_a; } - else if ((local_60._4_4_ == (int *)0x5) && + else if (((*(undefined4 *)((char *)&(local_60) + 0x4)) == (int *)0x5) && (*(int *)(*(int *)((char *)this->_descriptor + 0x10) + 0x10) == 0x5a)) { uVar10 = 10; break; @@ -5111,9 +5111,9 @@ LAB_007f17ef: else { voidRoomStageType = iVar1 - 0xe; if (voidRoomStageType < 4) { - voidRoomStage = (int)voidRoomStageType / 2 + 10; + voidRoomStage = GHIDRA_INT(voidRoomStageType) / 2 + 10; voidRoomStageType = voidRoomStageType & 0x80000001; - if ((int)voidRoomStageType < 0) { + if (GHIDRA_INT(voidRoomStageType) < 0) { voidRoomStageType = (voidRoomStageType - 1 | 0xfffffffe) + 1; } goto LAB_007f1961; @@ -5127,9 +5127,9 @@ LAB_007f17ef: voidRoomStage = ((iVar1 + -1) / 3) * 2 + 1; } else { - voidRoomStage = ((int)(iVar1 - 0x1bU) / 2) * 2 + 1; + voidRoomStage = (GHIDRA_INT((iVar1 - 0x1bU)) / 2) * 2 + 1; voidRoomStageType = iVar1 - 0x1bU & 0x80000001; - if ((int)voidRoomStageType < 0) { + if (GHIDRA_INT(voidRoomStageType) < 0) { voidRoomStageType = (voidRoomStageType - 1 | 0xfffffffe) + 1; } voidRoomStageType = voidRoomStageType + 4; @@ -5182,36 +5182,36 @@ LAB_007f1979: builtin_strncpy(local_50,".xml",5); local_14 = 0; ((ModManager *)(&g_manager->_modManager))->ModManager::TryRedirectPath(&local_40,(std_string *)local_58); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; path = extraout_EAX; if (0xf < *(uint *)(extraout_EAX + 0x14)) { path = *(byte **)extraout_EAX; } ((FXLayers *)(&this->_fxLayers))->FXLayers::LoadConfig(path,local_74[3],stageType); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; uVar9 = extraout_ECX; if (0xf < local_40._capacity) { uVar5 = local_40._capacity + 1; - pcVar6 = (char *)local_40._buf._0_4_; + pcVar6 = (*(undefined4 *)((char *)&((char *)local_40._buf) + 0x0)); if (0xfff < uVar5) { - pcVar6 = *(char **)(local_40._buf._0_4_ + -4); + pcVar6 = *(char **)((*(undefined4 *)((char *)&(local_40._buf) + 0x0)) + -4); uVar5 = local_40._capacity + 0x24; - if ((char *)0x1f < (char *)(local_40._buf._0_4_ + (-4 - (int)pcVar6))) goto LAB_007f1a64; + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_40._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar6)))) goto LAB_007f1a64; } operator_delete(pcVar6,uVar5); uVar9 = extraout_ECX_00; } local_14 = -1; - local_40._12_8_ = local_40._12_8_ & 0xffffffff; + (*(undefined8 *)((char *)&(local_40) + 0xc)) = (*(undefined8 *)((char *)&(local_40) + 0xc)) & 0xffffffff; local_40._capacity = 0xf; - local_40._buf._0_4_ = local_40._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(local_40._buf) + 0x0)) = (*(undefined4 *)((char *)&(local_40._buf) + 0x0)) & 0xffffff00; if (0xf < pathCapacity) { uVar5 = pathCapacity + 1; - pvVar7 = (void *)local_58._0_4_; + pvVar7 = (*(undefined4 *)((char *)&((void *)local_58) + 0x0)); if (0xfff < uVar5) { - pvVar7 = *(void **)(local_58._0_4_ + -4); + pvVar7 = *(void **)((*(undefined4 *)((char *)&(local_58) + 0x0)) + -4); uVar5 = pathCapacity + 0x24; - if (0x1f < (uint)(local_58._0_4_ + (-4 - (int)pvVar7))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_58) + 0x0)) + (-4 - GHIDRA_INT(pvVar7))))) { LAB_007f1a64: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -5223,27 +5223,27 @@ LAB_007f1a64: LAB_007f1a86: if (uVar10 != 0x1c) goto LAB_007f1c03; } - local_40._12_8_ = local_40._12_8_ & 0xffffffff; + (*(undefined8 *)((char *)&(local_40) + 0xc)) = (*(undefined8 *)((char *)&(local_40) + 0xc)) & 0xffffffff; local_40._capacity = 0xf; local_40._buf[0] = '\0'; local_40._buf[1] = '\0'; local_40._buf[2] = '\0'; local_40._buf[3] = '\0'; - local_40._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(local_40._buf) + 0x0)) = std::_Allocate(0x20); local_40._size = 0x1b; local_40._capacity = 0x1f; - builtin_strncpy((char *)local_40._buf._0_4_,"gfx/Effect_SatanRadial.anm2",0x1c); + builtin_strncpy((*(undefined4 *)((char *)&((char *)local_40._buf) + 0x0)),"gfx/Effect_SatanRadial.anm2",0x1c); local_14 = 2; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(this) + 0x7100))))->ANM2::Load(&local_40,0); local_14 = -1; bVar3 = extraout_CL; if (0xf < local_40._capacity) { uVar5 = local_40._capacity + 1; - pcVar6 = (char *)local_40._buf._0_4_; + pcVar6 = (*(undefined4 *)((char *)&((char *)local_40._buf) + 0x0)); if (0xfff < uVar5) { - pcVar6 = *(char **)(local_40._buf._0_4_ + -4); + pcVar6 = *(char **)((*(undefined4 *)((char *)&(local_40._buf) + 0x0)) + -4); uVar5 = local_40._capacity + 0x24; - if ((char *)0x1f < (char *)(local_40._buf._0_4_ + (-4 - (int)pcVar6))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(local_40._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar6)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -5255,7 +5255,7 @@ LAB_007f1a86: pcVar6 = std::_Allocate(0x20); pathSize = 0x1f; pathCapacity = 0x1f; - local_58._0_4_ = pcVar6; + (*(undefined4 *)((char *)&(local_58) + 0x0)) = pcVar6; builtin_strncpy(pcVar6,"gfx/satan_radial_ultragreed.png",0x20); local_14 = 3; ((Sprite *)((Sprite *)&(*(undefined1 *)((char *)(this) + 0x7100))))->Sprite::ReplaceSpritesheet(0,(std_string *)local_58); @@ -5263,11 +5263,11 @@ LAB_007f1a86: bVar3 = extraout_CL_01; if (0xf < pathCapacity) { uVar10 = pathCapacity + 1; - pvVar7 = (void *)local_58._0_4_; + pvVar7 = (*(undefined4 *)((char *)&((void *)local_58) + 0x0)); if (0xfff < uVar10) { - pvVar7 = *(void **)(local_58._0_4_ + -4); + pvVar7 = *(void **)((*(undefined4 *)((char *)&(local_58) + 0x0)) + -4); uVar10 = pathCapacity + 0x24; - if (0x1f < (uint)(local_58._0_4_ + (-4 - (int)pvVar7))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_58) + 0x0)) + (-4 - GHIDRA_INT(pvVar7))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -5296,8 +5296,8 @@ LAB_007f1c03: FUN_008283d0(pvVar7); local_14 = 7; } - if (((local_60._4_4_ != (int *)0x0) && - (cVar4 = (**(code **)(*local_60._4_4_ + 0xc))(), cVar4 != '\0')) && + if ((((*(undefined4 *)((char *)&(local_60) + 0x4)) != (int *)0x0) && + (cVar4 = (**(code **)(*(*(undefined4 *)((char *)&(local_60) + 0x4)) + 0xc))(), cVar4 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(&local_60); } @@ -5393,16 +5393,16 @@ LAB_007f1c03: ((KAGE_Graphics *)(&DAT_00c798e0))->KAGE_Graphics::SetRenderTarget(DAT_00c797ec,0); ((RenderTarget *)(&DAT_00c798e0))->RenderTarget::Clear(); local_40._buf[8] = (undefined1)g_graphicsManager_blendMode[0]; - local_40._buf[9] = g_graphicsManager_blendMode[0]._1_1_; - local_40._buf[10] = g_graphicsManager_blendMode[0]._2_1_; - local_40._buf[0xb] = g_graphicsManager_blendMode[0]._3_1_; + local_40._buf[9] = (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[0]) + 0x1)); + local_40._buf[10] = (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[0]) + 0x2)); + local_40._buf[0xb] = (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[0]) + 0x3)); local_40._buf[0xc] = (undefined1)g_graphicsManager_blendMode[1]; - local_40._buf[0xd] = g_graphicsManager_blendMode[1]._1_1_; - local_40._buf[0xe] = g_graphicsManager_blendMode[1]._2_1_; - local_40._buf[0xf] = g_graphicsManager_blendMode[1]._3_1_; + local_40._buf[0xd] = (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[1]) + 0x1)); + local_40._buf[0xe] = (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[1]) + 0x2)); + local_40._buf[0xf] = (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[1]) + 0x3)); local_40._size = g_graphicsManager_blendMode[2]; local_40._capacity = g_graphicsManager_blendMode[3]; - local_60._4_4_ = (int *)g_graphicsManager_blendMode[4]; + (*(undefined4 *)((char *)&(local_60) + 0x4)) = (int *)g_graphicsManager_blendMode[4]; g_graphicsManager_blendMode[0] = 0; g_graphicsManager_blendMode[1] = 1; g_graphicsManager_blendMode[2] = 0; @@ -5413,17 +5413,17 @@ LAB_007f1c03: local_74[2] = 0; local_74[1] = 0; (*clearFn)(local_74 + 1,extraout_ECX_04); - g_graphicsManager_blendMode[0]._0_1_ = local_40._buf[8]; - g_graphicsManager_blendMode[0]._1_1_ = local_40._buf[9]; - g_graphicsManager_blendMode[0]._2_1_ = local_40._buf[10]; - g_graphicsManager_blendMode[0]._3_1_ = local_40._buf[0xb]; - g_graphicsManager_blendMode[1]._0_1_ = local_40._buf[0xc]; - g_graphicsManager_blendMode[1]._1_1_ = local_40._buf[0xd]; - g_graphicsManager_blendMode[1]._2_1_ = local_40._buf[0xe]; - g_graphicsManager_blendMode[1]._3_1_ = local_40._buf[0xf]; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[0]) + 0x0)) = local_40._buf[8]; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[0]) + 0x1)) = local_40._buf[9]; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[0]) + 0x2)) = local_40._buf[10]; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[0]) + 0x3)) = local_40._buf[0xb]; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[1]) + 0x0)) = local_40._buf[0xc]; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[1]) + 0x1)) = local_40._buf[0xd]; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[1]) + 0x2)) = local_40._buf[0xe]; + (*(undefined1 *)((char *)&(g_graphicsManager_blendMode[1]) + 0x3)) = local_40._buf[0xf]; g_graphicsManager_blendMode[2] = local_40._size; g_graphicsManager_blendMode[3] = local_40._capacity; - g_graphicsManager_blendMode[4] = (int)local_60._4_4_; + g_graphicsManager_blendMode[4] = (*(undefined4 *)((char *)&(GHIDRA_INT(local_60)) + 0x4)); _glfw_context_reset(1); pop_render_target(); } @@ -5553,12 +5553,12 @@ void Room::update_bounds(byte isFromGridSize) goto LAB_007f27c1; } ExceptionList = &local_10; - openRows = tracked_alloc(0,(void *)0x0,(ulonglong)(uint)this->_gridHeight); + openRows = tracked_alloc(0,(void *)0x0,(ulonglong)GHIDRA_UINT(this->_gridHeight)); iVar1 = this->_gridHeight; iVar2 = 0; if (0 < iVar1) { do { - *(undefined1 *)(iVar2 + (int)openRows) = 1; + *(undefined1 *)(iVar2 + GHIDRA_INT(openRows)) = 1; iVar2 = iVar2 + 1; iVar1 = this->_gridHeight; } while (iVar2 < iVar1); @@ -5606,10 +5606,10 @@ LAB_007f2673: ((iVar5 < 0 || ((((this->_gridHeight <= iVar5 || (iVar7 = this->_gridWidth * iVar5 + iVar6, iVar7 < 0)) || (this->_gridEntities[iVar7] == (void *)0x0)) || - ((iVar7 = *(int *)((int)this->_gridEntities[iVar7] + 4), iVar7 != 0xf && + ((iVar7 = *(int *)(GHIDRA_INT(this->_gridEntities[iVar7]) + 4), iVar7 != 0xf && (iVar7 != 0x10)))))))) { isColumnAllWall = false; - *(undefined1 *)(iVar5 + (int)openRows) = 0; + *(undefined1 *)(iVar5 + GHIDRA_INT(openRows)) = 0; } iVar5 = iVar5 + 1; } while (iVar5 <= iVar1); @@ -5622,7 +5622,7 @@ LAB_007f2673: iVar4 = leftColumn; } for (; scanRow <= iVar1; scanRow = scanRow + 1) { - if (*(char *)(scanRow + (int)openRows) == '\0') { + if (*(char *)(scanRow + GHIDRA_INT(openRows)) == '\0') { iVar6 = iVar1; } else { @@ -5642,15 +5642,15 @@ LAB_007f2673: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (openRows != (void *)0x0) { allocSize = *(uint *)((char *)openRows + -4); oldAllocated = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - allocSize; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - allocSize; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)oldAllocated < allocSize); - free((uint *)((int)openRows + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocated) < allocSize)); + free((uint *)(GHIDRA_INT(openRows) + -4)); } if (((iVar4 < 0) || (this->_gridWidth <= iVar4)) || ((iVar5 < 0 || (this->_gridHeight <= iVar5)))) { @@ -5856,7 +5856,7 @@ void Room::Init(RoomConfig_Room *config, RoomDescriptor *descriptor) uStack_14 = 0xffffffff; puStack_18 = &LAB_00b01279; local_1c = ExceptionList; - uVar7 = __security_cookie ^ (uint)(versusWide + 0x58); + uVar7 = __security_cookie ^ GHIDRA_UINT((versusWide + 0x58)); ExceptionList = &local_1c; roomConfig = config; room = this; @@ -5889,8 +5889,8 @@ void Room::Init(RoomConfig_Room *config, RoomDescriptor *descriptor) pbVar25[6] = 0; pbVar25[7] = 0; pbVar25 = pbVar25 + 8; - *(undefined4 *)((int)local_540[0] + 4) = local_540[0]->_stage; - local_540[0] = (Game *)((int)local_540[0] + 0xc); + *(undefined4 *)(GHIDRA_INT(local_540[0]) + 4) = local_540[0]->_stage; + local_540[0] = (Game *)(GHIDRA_INT(local_540[0]) + 0xc); local_544 = (Game *)&(*(undefined1 *)((char *)&(local_544[-1]._console) + 0x3)); } while (local_544 != (Game *)0x0); FUN_00429f50(uVar7); @@ -5941,7 +5941,7 @@ void Room::Init(RoomConfig_Room *config, RoomDescriptor *descriptor) local_540[0] = (Game *)*piVar19; if (local_540[0] != (Game *)piVar19) { do { - *(undefined1 *)((int)local_540[0] + 200) = 0; + *(undefined1 *)(GHIDRA_INT(local_540[0]) + 200) = 0; std:: _Tree_unchecked_const_iterator_>,std::_Iterator_base0> ::operator++((_Tree_unchecked_const_iterator_>,std::_Iterator_base0> @@ -5965,20 +5965,20 @@ void Room::Init(RoomConfig_Room *config, RoomDescriptor *descriptor) lightGradientPath._buf[1] = '\0'; lightGradientPath._buf[2] = '\0'; lightGradientPath._buf[3] = '\0'; - lightGradientPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(lightGradientPath._buf) + 0x0)) = std::_Allocate(0x20); lightGradientPath._size = 0x16; lightGradientPath._capacity = 0x1f; - builtin_strncpy((char *)lightGradientPath._buf._0_4_,"gfx/LightGradient.anm2",0x17); + builtin_strncpy((*(undefined4 *)((char *)&((char *)lightGradientPath._buf) + 0x0)),"gfx/LightGradient.anm2",0x17); uStack_14 = 0; ((ANM2 *)(pickup))->ANM2::Load(&lightGradientPath,1); uStack_14 = 0xffffffff; if (0xf < lightGradientPath._capacity) { uVar7 = lightGradientPath._capacity + 1; - pcVar16 = (char *)lightGradientPath._buf._0_4_; + pcVar16 = (*(undefined4 *)((char *)&((char *)lightGradientPath._buf) + 0x0)); if (0xfff < uVar7) { - pcVar16 = *(char **)(lightGradientPath._buf._0_4_ + -4); + pcVar16 = *(char **)((*(undefined4 *)((char *)&(lightGradientPath._buf) + 0x0)) + -4); uVar7 = lightGradientPath._capacity + 0x24; - if ((char *)0x1f < (char *)(lightGradientPath._buf._0_4_ + (-4 - (int)pcVar16))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(lightGradientPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar16)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -5987,7 +5987,7 @@ void Room::Init(RoomConfig_Room *config, RoomDescriptor *descriptor) } lightGradientPath._size = 0; lightGradientPath._capacity = 0xf; - lightGradientPath._buf._0_4_ = lightGradientPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(lightGradientPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(lightGradientPath._buf) + 0x0)) & 0xffffff00; layer = ((ANM2 *)(pickup))->ANM2::GetLayer((byte *)0x0); layer->_minFilterMode = 1; layer = ((ANM2 *)(pickup))->ANM2::GetLayer((byte *)0x0); @@ -6016,21 +6016,21 @@ LAB_007f2c5c: isLess = bVar5 < bVar15; if (bVar5 != bVar15) { LAB_007f2c44: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_007f2c49; } if (bVar5 == 0) break; bVar5 = pbVar25[1]; - bVar15 = *(char *)((int)&pGVar21->_stage + 1); + bVar15 = *(char *)(GHIDRA_INT(&pGVar21->_stage) + 1); isLess = bVar5 < bVar15; if (bVar5 != bVar15) goto LAB_007f2c44; pbVar25 = pbVar25 + 2; - pGVar21 = (Game *)((int)&pGVar21->_stage + 2); + pGVar21 = (Game *)(GHIDRA_INT(&pGVar21->_stage) + 2); } while (bVar5 != 0); uVar7 = 0; LAB_007f2c49: if ((uVar7 != 0) || - ((*(char *)((int)(currentRoom->_lightSprite)._animState._animData + 0x34) != '\0' && + ((*(char *)(GHIDRA_INT((currentRoom->_lightSprite)._animState._animData) + 0x34) != '\0' && ((currentRoom->_lightSprite)._animState._isPlaying == 0)))) goto LAB_007f2c5c; } layer = ((ANM2 *)(¤tRoom->_lightSprite))->ANM2::GetLayer((byte *)0x0); @@ -6048,20 +6048,20 @@ LAB_007f2c49: spotLightPath._buf[1] = '\0'; spotLightPath._buf[2] = '\0'; spotLightPath._buf[3] = '\0'; - spotLightPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(spotLightPath._buf) + 0x0)) = std::_Allocate(0x20); spotLightPath._size = 0x12; spotLightPath._capacity = 0x1f; - builtin_strncpy((char *)spotLightPath._buf._0_4_,"gfx/SpotLight.anm2",0x13); + builtin_strncpy((*(undefined4 *)((char *)&((char *)spotLightPath._buf) + 0x0)),"gfx/SpotLight.anm2",0x13); uStack_14 = 1; ((ANM2 *)((ANM2 *)puVar12))->ANM2::Load(&spotLightPath,1); uStack_14 = 0xffffffff; if (0xf < spotLightPath._capacity) { uVar7 = spotLightPath._capacity + 1; - pcVar16 = (char *)spotLightPath._buf._0_4_; + pcVar16 = (*(undefined4 *)((char *)&((char *)spotLightPath._buf) + 0x0)); if (0xfff < uVar7) { - pcVar16 = *(char **)(spotLightPath._buf._0_4_ + -4); + pcVar16 = *(char **)((*(undefined4 *)((char *)&(spotLightPath._buf) + 0x0)) + -4); uVar7 = spotLightPath._capacity + 0x24; - if ((char *)0x1f < (char *)(spotLightPath._buf._0_4_ + (-4 - (int)pcVar16))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(spotLightPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar16)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -6070,7 +6070,7 @@ LAB_007f2c49: } spotLightPath._size = 0; spotLightPath._capacity = 0xf; - spotLightPath._buf._0_4_ = spotLightPath._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(spotLightPath._buf) + 0x0)) = (*(undefined4 *)((char *)&(spotLightPath._buf) + 0x0)) & 0xffffff00; layer = ((ANM2 *)((ANM2 *)puVar12))->ANM2::GetLayer((byte *)0x0); layer->_minFilterMode = 1; layer = ((ANM2 *)((ANM2 *)puVar12))->ANM2::GetLayer((byte *)0x0); @@ -6091,16 +6091,16 @@ LAB_007f2c49: isLess = bVar5 < bVar15; if (bVar5 != bVar15) { LAB_007f2e20: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_007f2e25; } if (bVar5 == 0) break; bVar5 = pbVar25[1]; - bVar15 = *(char *)((int)&pGVar21->_stage + 1); + bVar15 = *(char *)(GHIDRA_INT(&pGVar21->_stage) + 1); isLess = bVar5 < bVar15; if (bVar5 != bVar15) goto LAB_007f2e20; pbVar25 = pbVar25 + 2; - pGVar21 = (Game *)((int)&pGVar21->_stage + 2); + pGVar21 = (Game *)(GHIDRA_INT(&pGVar21->_stage) + 2); } while (bVar5 != 0); uVar7 = 0; LAB_007f2e25: @@ -6136,20 +6136,20 @@ LAB_007f2e57: pGVar21 = currentRoom->_descriptor; local_540[0] = (Game *)(*(ushort *)(*(int *)&(*(undefined1 *)((char *)(pGVar21) + 0x10)) + 0x44) - 1); pGStack_554 = pGVar21; - if (-1 < (int)local_540[0]) { + if (-1 < GHIDRA_INT(local_540[0])) { VStack_574.y = (float)&g_manager->_entityConfig; - pGStack_54c = (Game *)((int)local_540[0] * 0x10); + pGStack_54c = (Game *)(GHIDRA_INT(local_540[0]) * 0x10); do { fStack_58c = *(float *)&(*(undefined1 *)((char *)(pGVar21) + 0x10)); iVar17 = -1; iVar8 = 0; local_544 = *(Game **)((char *)fStack_58c + 0x40); pbVar25 = &local_544->_bossChallenge; - if (pbVar25[(int)pGStack_54c] == 0) { + if (pbVar25[GHIDRA_INT(pGStack_54c)] == 0) { fVar9 = fStack_58c; } else { - local_544 = *(Game **)((int)&local_544->_stageType + (int)pGStack_54c); + local_544 = *(Game **)(GHIDRA_INT(&local_544->_stageType) + GHIDRA_INT(pGStack_54c)); do { fVar9 = (float)local_544->_roomList[0]._doors[iVar8 * 3 + -10]; if (fVar26 < fVar9) { @@ -6157,18 +6157,18 @@ LAB_007f2e57: fVar26 = fVar9; } iVar8 = iVar8 + 1; - } while (iVar8 < (int)(uint)pbVar25[(int)pGStack_54c]); + } while (iVar8 < GHIDRA_INT(GHIDRA_UINT(pbVar25[GHIDRA_INT(pGStack_54c)]))); fVar26 = 0.0; fVar9 = *(float *)&(*(undefined1 *)((char *)(pGStack_554) + 0x10)); currentRoom = room; } - iVar8 = *(int *)((int)pGStack_54c->_roomList[0]._doors + *(int *)((char *)fVar9 + 0x40) + -0x2c + iVar8 = *(int *)(GHIDRA_INT(pGStack_54c->_roomList[0]._doors) + *(int *)((char *)fVar9 + 0x40) + -0x2c ); entityConfigEntry = EntityConfig::GetEntity ((EntityConfig *)VStack_574.y,*(int *)(iVar8 + iVar17 * 0xc), - (uint)*(ushort *)(iVar8 + 4 + iVar17 * 0xc), - (uint)*(ushort *)(iVar8 + 6 + iVar17 * 0xc)); + GHIDRA_UINT(*(ushort *)(iVar8 + 4 + iVar17 * 0xc)), + GHIDRA_UINT(*(ushort *)(iVar8 + 6 + iVar17 * 0xc))); if ((entityConfigEntry != (EntityConfig_Entity *)0x0) && (iVar17 = entityConfigEntry->bossID, iVar17 != 0)) { if (currentRoom->_bossId == 0) { @@ -6178,19 +6178,19 @@ LAB_007f2e57: currentRoom->_secondBossID = iVar17; } } - local_540[0] = (Game *)((int)local_540[0] + -1); + local_540[0] = (Game *)(GHIDRA_INT(local_540[0]) + -1); pGVar21 = currentRoom->_descriptor; pGStack_54c = (Game *)(&(*(undefined1 *)((char *)&(pGStack_54c[-1]) + 0x68d64)) + 8); - } while (-1 < (int)local_540[0]); + } while (-1 < GHIDRA_INT(local_540[0])); } } pGVar21 = g_game; - uVar7 = (uint)descriptor->Flags >> 4; + uVar7 = GHIDRA_UINT(descriptor->Flags) >> 4; (*(undefined1 *)((char *)(currentRoom) + 0x7228)) = (byte)uVar7 & 1; if (((pGVar21->_dailyChallenge)._specialDailyId == 0x11) && ((uVar7 & 1) != 0)) { - uVar11 = *(undefined4 *)((int)&pGVar21->_gameStateFlags + 4); - *(uint *)&pGVar21->_gameStateFlags = (uint)pGVar21->_gameStateFlags | 0x20000000; - *(undefined4 *)((int)&pGVar21->_gameStateFlags + 4) = uVar11; + uVar11 = *(undefined4 *)(GHIDRA_INT(&pGVar21->_gameStateFlags) + 4); + *(uint *)&pGVar21->_gameStateFlags = GHIDRA_UINT(pGVar21->_gameStateFlags) | 0x20000000; + *(undefined4 *)(GHIDRA_INT(&pGVar21->_gameStateFlags) + 4) = uVar11; } currentRoom->_hasTriggerPressurePlates = 0; update_bounds(currentRoom,1); @@ -6216,7 +6216,7 @@ LAB_007f3113: case 5: goto LAB_007f311f; case 6: - currentRoom->_shopLevel = (uint)(currentRoom->_roomType == 1) * 4 + 1; + currentRoom->_shopLevel = GHIDRA_UINT((currentRoom->_roomType == 1)) * 4 + 1; } } else { @@ -6266,14 +6266,14 @@ LAB_007f311f: (*pcVar2)(); return; } - uVar7 = (uint)pGVar21 >> ((byte)spawnRngShifts & 0x1f) ^ (uint)pGVar21; + uVar7 = GHIDRA_UINT(pGVar21) >> ((byte)spawnRngShifts & 0x1f) ^ GHIDRA_UINT(pGVar21); uVar7 = uVar7 << ((byte)((ulonglong)spawnRngShifts >> 0x20) & 0x1f) ^ uVar7; pGVar21 = (Game *)(uVar7 >> ((byte)local_544 & 0x1f) ^ uVar7); - textData = (void *)((int)roomConfig->Spawns + (int)pGStack_550); + textData = (void *)(GHIDRA_INT(roomConfig->Spawns) + GHIDRA_INT(pGStack_550)); pGStack_554 = pGVar21; if (*(char *)((char *)textData + 8) != '\0') { - puVar10 = ((Spawn *)(textData))->Spawn::PickEntry((float)((double)(int)pGVar21 + - __uint_to_double_fixup[-((int)pGVar21 >> 0x1f)]) + puVar10 = ((Spawn *)(textData))->Spawn::PickEntry((float)((double)GHIDRA_INT(pGVar21) + + __uint_to_double_fixup[-(GHIDRA_INT(pGVar21) >> 0x1f)]) * 2.3283062e-10); switch(*puVar10) { case 0x339: @@ -6289,7 +6289,7 @@ switchD_007f32bc_caseD_33d: switchD_007f32bc_caseD_36c: isHasDump = '\x01'; case 0x372: - puVar24 = (uint *)((int)currentRoom->_descriptor + 0x44); + puVar24 = (uint *)(GHIDRA_INT(currentRoom->_descriptor) + 0x44); *puVar24 = *puVar24 | 0x1000; break; case 0x389: @@ -6301,11 +6301,11 @@ switchD_007f32bc_caseD_36c: case 0x3ca: switch(*(undefined2 *)(puVar10 + 1)) { case 0: - puVar24 = (uint *)((int)currentRoom->_descriptor + 0x44); + puVar24 = (uint *)(GHIDRA_INT(currentRoom->_descriptor) + 0x44); *puVar24 = *puVar24 | 0x200; break; case 1: - uVar7 = (uint)*(ushort *)((char *)puVar10 + 6); + uVar7 = GHIDRA_UINT(*(ushort *)((char *)puVar10 + 6)); if (uVar7 == 0x14) goto switchD_007f32bc_caseD_33d; if (uVar7 == 0xb) { cStack_545 = '\x01'; @@ -6319,13 +6319,13 @@ switchD_007f32bc_caseD_36c: } break; case 3: - puVar24 = (uint *)((int)currentRoom->_descriptor + 0x44); + puVar24 = (uint *)(GHIDRA_INT(currentRoom->_descriptor) + 0x44); *puVar24 = *puVar24 | 0x2000; break; case 4: iVar17 = currentRoom->_gridWidth; - iVar8 = *(short *)((char *)roomConfig->Spawns + (int)pGStack_550) + 1 + - (*(short *)((char *)pGStack_550 + 2 + (int)roomConfig->Spawns) + 1) * iVar17; + iVar8 = *(short *)((char *)roomConfig->Spawns + GHIDRA_INT(pGStack_550)) + 1 + + (*(short *)((char *)pGStack_550 + 2 + GHIDRA_INT(roomConfig->Spawns)) + 1) * iVar17; fStack_590 = (float)(iVar8 % iVar17) * 40.0 + 40.0; fStack_58c = (float)(iVar8 / iVar17) * 40.0 + 120.0; FUN_00429f90(&fStack_590); @@ -6335,9 +6335,9 @@ switchD_007f32bc_caseD_36c: } } } - pGStack_550 = (Game *)((int)pGStack_550 + 0x10); - local_540[0] = (Game *)((int)local_540[0] + 1); - } while (local_540[0] < (uint)(ushort)roomConfig->SpawnCount); + pGStack_550 = (Game *)(GHIDRA_INT(pGStack_550) + 0x10); + local_540[0] = (Game *)(GHIDRA_INT(local_540[0]) + 1); + } while (local_540[0] < GHIDRA_UINT((ushort)roomConfig->SpawnCount)); } LoadBackdropGraphics(currentRoom); pGVar21 = g_game; @@ -6371,25 +6371,25 @@ LAB_007f34f1: currentRoom->_waterAmount = 1.0; } local_540[0] = currentRoom->_descriptor; - if (((*(uint *)((int)local_540[0] + 0x44) >> 8 & 1) != 0) || (cStack_545 != '\0')) { + if (((*(uint *)(GHIDRA_INT(local_540[0]) + 0x44) >> 8 & 1) != 0) || (cStack_545 != '\0')) { currentRoom->_waterAmount = 1.0; } iVar17 = currentRoom->_backdropType; if (((iVar17 == 0x10) || (iVar17 == 0x23)) || ((currentRoom->_roomType == 0x10 || - ((isHasDump != '\0' && ((*(uint *)((int)local_540[0] + 0x44) >> 8 & 1) == 0)))))) { + ((isHasDump != '\0' && ((*(uint *)(GHIDRA_INT(local_540[0]) + 0x44) >> 8 & 1) == 0)))))) { currentRoom->_waterAmount = 0.0; } if (0.0 < currentRoom->_waterAmount) { currentRoom->_lavaIntensity = 0.0; } - if (*(int *)((int)local_540[0] + 0x40) == 0) { + if (*(int *)(GHIDRA_INT(local_540[0]) + 0x40) == 0) { (*(undefined1 *)((char *)(currentRoom) + 0x1)) = 1; - uVar7 = *(uint *)((int)local_540[0] + 0x58); + uVar7 = *(uint *)(GHIDRA_INT(local_540[0]) + 0x58); firstVisitRngShifts = 0x900000005; local_544 = (Game *)0x7; if ((iVar17 == 6) && ((g_manager->_optionsConfig)._enableWaterSurface == 0)) { - *(uint *)((int)local_540[0] + 0x44) = *(uint *)((int)local_540[0] + 0x44) | 0x20; + *(uint *)(GHIDRA_INT(local_540[0]) + 0x44) = *(uint *)(GHIDRA_INT(local_540[0]) + 0x44) | 0x20; } else { cVar6 = (char)currentRoom->_gridPaths[currentRoom->_backdropType * 0x4f + 0x5ba]; @@ -6412,11 +6412,11 @@ LAB_007f3658: } cStack_545 = '\0'; } - uVar20 = *(uint *)((int)local_540[0] + 0x44) | 0x20; + uVar20 = *(uint *)(GHIDRA_INT(local_540[0]) + 0x44) | 0x20; if (cStack_545 == '\0') { - uVar20 = *(uint *)((int)local_540[0] + 0x44) & 0xffffffdf; + uVar20 = *(uint *)(GHIDRA_INT(local_540[0]) + 0x44) & 0xffffffdf; } - *(uint *)((int)local_540[0] + 0x44) = uVar20; + *(uint *)(GHIDRA_INT(local_540[0]) + 0x44) = uVar20; } local_540[0] = currentRoom->_descriptor; if (uVar7 == 0) { @@ -6429,11 +6429,11 @@ LAB_007f3658: uVar20 = uVar7 << 9 ^ uVar7; local_544 = (Game *)(CONCAT31((uint3)(uVar20 >> 0xf),~(byte)(uVar20 >> 7) ^ (byte)uVar7) & 0xffffff01); - uVar7 = *(uint *)((int)local_540[0] + 0x44) | 0x40; + uVar7 = *(uint *)(GHIDRA_INT(local_540[0]) + 0x44) | 0x40; if ((char)local_544 == '\0') { - uVar7 = *(uint *)((int)local_540[0] + 0x44) & 0xffffffbf; + uVar7 = *(uint *)(GHIDRA_INT(local_540[0]) + 0x44) & 0xffffffbf; } - *(uint *)((int)local_540[0] + 0x44) = uVar7; + *(uint *)(GHIDRA_INT(local_540[0]) + 0x44) = uVar7; pGVar21 = g_game; if ((((currentRoom->_roomType == 2) && (g_game->_shopVisits = g_game->_shopVisits + 1, 5 < pGVar21->_shopVisits)) && @@ -6457,16 +6457,16 @@ LAB_007f3755: bStack_555 = 0; isHasWater = '\x01'; } - puVar24 = (uint *)((int)currentRoom->_descriptor + 0x44); + puVar24 = (uint *)(GHIDRA_INT(currentRoom->_descriptor) + 0x44); *puVar24 = *puVar24 | 0x2000; } } if (isHasWater != '\0') { - puVar24 = (uint *)((int)currentRoom->_descriptor + 0x44); + puVar24 = (uint *)(GHIDRA_INT(currentRoom->_descriptor) + 0x44); *puVar24 = *puVar24 | 0x20; } if (bStack_555 != 0) { - puVar24 = (uint *)((int)currentRoom->_descriptor + 0x44); + puVar24 = (uint *)(GHIDRA_INT(currentRoom->_descriptor) + 0x44); *puVar24 = *puVar24 & 0xffffffdf; } if (currentRoom->_backdropType == 0x2e) { @@ -6487,14 +6487,14 @@ LAB_007f3755: do { pGVar21 = local_540[0]; textData = currentRoom->_descriptor; - if (*(int *)(*(int *)((char *)textData + 0x68) + (int)local_540[0]) != 0) { + if (*(int *)(*(int *)((char *)textData + 0x68) + GHIDRA_INT(local_540[0])) != 0) { if (*(undefined4 **)pGStack_550 != (undefined4 *)0x0) { (**(code **)**(undefined4 **)pGStack_550)(1); textData = currentRoom->_descriptor; } - local_544 = (Game *)(*(int *)((char *)textData + 0x68) + (int)pGVar21); + local_544 = (Game *)(*(int *)((char *)textData + 0x68) + GHIDRA_INT(pGVar21)); if (local_544->_stage != 0) { - gridEntity = Isaac::CreateGridEntity(local_544->_stage,(uint)pGStack_54c); + gridEntity = Isaac::CreateGridEntity(local_544->_stage,GHIDRA_UINT(pGStack_54c)); *(GridEntity **)pGStack_550 = gridEntity; iVar17 = *(int *)gridEntity; iVar8 = local_544->_stageType; @@ -6522,7 +6522,7 @@ LAB_007f3755: textData = currentRoom->_descriptor; pGVar21 = local_540[0]; } - iVar17 = *(int *)(*(int *)((char *)textData + 0x68) + (int)pGVar21); + iVar17 = *(int *)(*(int *)((char *)textData + 0x68) + GHIDRA_INT(pGVar21)); if (iVar17 == 7) { *(int *)((char *)textData + 0x54) = *(int *)((char *)textData + 0x54) + 1; } @@ -6530,10 +6530,10 @@ LAB_007f3755: *(short *)((char *)textData + 0x50) = *(short *)((char *)textData + 0x50) + 1; } } - local_540[0] = (Game *)((int)pGVar21 + 0x20); - pGStack_550 = (Game *)((int)pGStack_550 + 4); - pGStack_54c = (Game *)((int)&pGStack_54c->_stage + 1); - } while ((int)pGStack_54c < currentRoom->_gridHeight * currentRoom->_gridWidth); + local_540[0] = (Game *)(GHIDRA_INT(pGVar21) + 0x20); + pGStack_550 = (Game *)(GHIDRA_INT(pGStack_550) + 4); + pGStack_54c = (Game *)(GHIDRA_INT(&pGStack_54c->_stage) + 1); + } while (GHIDRA_INT(pGStack_54c) < currentRoom->_gridHeight * currentRoom->_gridWidth); } if ((0 < *(int *)((char *)currentRoom->_descriptor + 0x54)) && (currentRoom->_backdropType == 0x22)) { @@ -6554,7 +6554,7 @@ LAB_007f3755: (*pcVar2)(); return; } - uVar7 = (uint)spawnRng._seed >> ((byte)spawnRng._shift1 & 0x1f) ^ spawnRng._seed; + uVar7 = GHIDRA_UINT(spawnRng._seed) >> ((byte)spawnRng._shift1 & 0x1f) ^ spawnRng._seed; uVar7 = uVar7 << ((byte)spawnRng._shift2 & 0x1f) ^ uVar7; iVar17 = GetRandomTileIndex(currentRoom,uVar7 >> ((byte)spawnRng._shift3 & 0x1f) ^ uVar7); } @@ -6573,30 +6573,30 @@ LAB_007f3755: (*pcVar2)(); return; } - uVar7 = (uint)pGVar21 >> ((byte)spawnRngShifts & 0x1f) ^ (uint)pGVar21; + uVar7 = GHIDRA_UINT(pGVar21) >> ((byte)spawnRngShifts & 0x1f) ^ GHIDRA_UINT(pGVar21); uVar7 = uVar7 << ((byte)((ulonglong)spawnRngShifts >> 0x20) & 0x1f) ^ uVar7; pGVar21 = (Game *)(uVar7 >> ((byte)spawnRngShift3 & 0x1f) ^ uVar7); - spawnEntry = (short *)((int)fStack_58c + (int)roomConfig->Spawns); + spawnEntry = (short *)(GHIDRA_INT(fStack_58c) + GHIDRA_INT(roomConfig->Spawns)); pGStack_54c = (Game *)(*spawnEntry + 1 + (spawnEntry[1] + 1) * currentRoom->_gridWidth); pGStack_560 = pGVar21; if ((char)spawnEntry[4] != '\0') { - local_544 = ((Spawn *)(spawnEntry))->Spawn::PickEntry((float)((double)(int)pGVar21 + - __uint_to_double_fixup[-((int)pGVar21 >> 0x1f)]) * + local_544 = ((Spawn *)(spawnEntry))->Spawn::PickEntry((float)((double)GHIDRA_INT(pGVar21) + + __uint_to_double_fixup[-(GHIDRA_INT(pGVar21) >> 0x1f)]) * 2.3283062e-10); textData = currentRoom->_descriptor; std::set::find_node(findResult,&pGStack_54c); pGVar21 = pGStack_560; if ((*(char *)(foundNode + 0xd) != '\0') || - (iVar17 = foundNode, (int)pGStack_54c < *(int *)(foundNode + 0x10))) { + (iVar17 = foundNode, GHIDRA_INT(pGStack_54c) < *(int *)(foundNode + 0x10))) { iVar17 = *(int *)((char *)textData + 0x80); } if (iVar17 == *(int *)((char *)textData + 0x80)) { - SpawnEntry(currentRoom,(uint)pGStack_54c,local_544,(uint)pGStack_560,(Entity **)0x0,0); + SpawnEntry(currentRoom,GHIDRA_UINT(pGStack_54c),local_544,GHIDRA_UINT(pGStack_560),(Entity **)0x0,0); } } - fStack_58c = (float)((int)fStack_58c + 0x10); - local_540[0] = (Game *)((int)local_540[0] + 1); - } while (local_540[0] < (uint)(ushort)roomConfig->SpawnCount); + fStack_58c = (float)(GHIDRA_INT(fStack_58c) + 0x10); + local_540[0] = (Game *)(GHIDRA_INT(local_540[0]) + 1); + } while (local_540[0] < GHIDRA_UINT((ushort)roomConfig->SpawnCount)); } if (roomConfig->Type == 4) { pGVar22 = (Game *)0x0; @@ -6610,7 +6610,7 @@ LAB_007f3755: local_540[0] = (Game *)0x0; if ((currentRoom->_entityList)._updateEL._size != 0) { do { - pGVar14 = *(Game **)((int)(currentRoom->_entityList)._updateEL._data + (int)local_540[0] * 4 + pGVar14 = *(Game **)(GHIDRA_INT((currentRoom->_entityList)._updateEL._data) + GHIDRA_INT(local_540[0]) * 4 ); if (pGVar14->_roomList[0].OverrideData == &DAT_00000005) { if (pGVar14->_roomList[0].AllowedDoors == 100) { @@ -6621,14 +6621,14 @@ LAB_007f3755: pGVar22 = collectiblesEnd; } else { - pGVar22->_stage = (int)pGVar14; + pGVar22->_stage = GHIDRA_INT(pGVar14); collectiblesEnd = (Game *)&pGVar22->_stageType; pGVar22 = collectiblesEnd; } } } - local_540[0] = (Game *)((int)local_540[0] + 1); - } while (local_540[0] < (uint)(currentRoom->_entityList)._updateEL._size); + local_540[0] = (Game *)(GHIDRA_INT(local_540[0]) + 1); + } while (local_540[0] < GHIDRA_UINT((currentRoom->_entityList)._updateEL._size)); pGStack_550 = pGVar22; local_544 = pGVar21; } @@ -6666,7 +6666,7 @@ LAB_007f3755: ((g_game->_stage < 1 || ((6 < g_game->_stage || (bVar5 = ((Game *)(g_game))->Game::GetStateFlag(0x30), bVar5 == 0)))))) { textData = collectiblesBegin; - if ((1 < (uint)((int)pGVar21 - (int)collectiblesBegin >> 2)) && + if ((1 < GHIDRA_UINT((GHIDRA_INT(pGVar21) - GHIDRA_INT(collectiblesBegin) >> 2))) && ((g_game->_dailyChallenge)._id == 0)) { if ((g_game->_stageType == 4) || (g_game->_stageType == 5)) { bVar5 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(0xbb); @@ -6684,7 +6684,7 @@ LAB_007f3755: uVar7 = uVar7 >> 9 ^ uVar7; uVar7 = uVar7 << 5 ^ uVar7; iVar17 = ((PlayerManager *)((PlayerManager *)pGStack_554))->PlayerManager::GetTrinketMultiplier(0xbb); - if ((int)((uVar7 >> 0x19 ^ uVar7) & 1) < iVar17) goto LAB_007f3e30; + if (GHIDRA_INT(((uVar7 >> 0x19 ^ uVar7) & 1)) < iVar17) goto LAB_007f3e30; textData = collectiblesBegin; } } @@ -6702,7 +6702,7 @@ LAB_007f3e30: } pGVar21 = g_game; if (((g_game->_stageType == 4) || (g_game->_stageType == 5)) && - ((2 < (uint)((int)pGStack_550 - (int)textData >> 2) && + ((2 < GHIDRA_UINT((GHIDRA_INT(pGStack_550) - GHIDRA_INT(textData) >> 2)) && ((roomConfig->Subtype == 0 || (roomConfig->Subtype == 2)))))) { *(undefined4 *)(*(int *)((char *)textData + 8) + 0x528) = 0; } @@ -6710,7 +6710,7 @@ LAB_007f3e30: if (((iVar17 == 2) || (iVar17 == 3)) && (descriptor->GridIndex != pGVar21->_greedModeTreasureRoomIdx)) { uVar20 = 0; - uVar7 = (int)pGStack_550 - (int)textData >> 2; + uVar7 = GHIDRA_INT(pGStack_550) - GHIDRA_INT(textData) >> 2; if (uVar7 != 0) { do { iVar17 = uVar20 * 4; @@ -6721,7 +6721,7 @@ LAB_007f3e30: } uStack_14 = 0xffffffff; if (textData != (void *)0x0) { - deallocate(textData,(int)local_544 - (int)textData >> 2); + deallocate(textData,GHIDRA_INT(local_544) - GHIDRA_INT(textData) >> 2); collectiblesBegin = (void *)0x0; collectiblesEnd = (Game *)0x0; collectiblesCapacity = (Game *)0x0; @@ -6735,12 +6735,12 @@ LAB_007f3e30: MakeDoor(currentRoom,uVar7); } uVar7 = uVar7 + 1; - } while ((int)uVar7 < 8); + } while (GHIDRA_INT(uVar7) < 8); TrySpawnMegaSatanRoomDoor(currentRoom,0); TrySpawnSpecialQuestDoor(currentRoom); if ((g_game->_challenge == 0x1f) && (g_game->_currentRoomIdx == -7)) { MakeDoor(currentRoom,3); - *(int *)((int)currentRoom->_doors[3] + 0x394) = g_game->_startingRoomIdx; + *(int *)(GHIDRA_INT(currentRoom->_doors[3]) + 0x394) = g_game->_startingRoomIdx; GridEntity_Door::SetRoomTypes (currentRoom->_doors[3],*(int *)(*(int *)((char *)currentRoom->_descriptor + 0x10) + 8),1 ); @@ -6756,7 +6756,7 @@ LAB_007f3e30: placementRng._shift3 = 7; local_540[0] = (Game *)0x0; do { - if (-1 < (int)uVar7) break; + if (-1 < GHIDRA_INT(uVar7)) break; uVar7 = ((RNG *)(&placementRng))->RNG::RandomInt(g_game->_nbRooms); textData = g_game->_roomList[uVar7].Data; if ((textData != (void *)0x0) && @@ -6764,17 +6764,17 @@ LAB_007f3e30: { uVar7 = 0xffffffff; } - local_540[0] = (Game *)((int)local_540[0] + 1); + local_540[0] = (Game *)(GHIDRA_INT(local_540[0]) + 1); } while (local_540[0] < 3); if (uVar7 == *(uint *)((char *)currentRoom->_descriptor + 8)) { uVar7 = currentRoom->_dungeonRockIdx; uVar20 = 0; do { - if (-1 < (int)uVar7) break; + if (-1 < GHIDRA_INT(uVar7)) break; uVar7 = ((RNG *)(&placementRng))->RNG::RandomInt(currentRoom->_gridHeight * currentRoom->_gridWidth); currentRoom->_dungeonRockIdx = uVar7; if (((((0x1bf < uVar7) || (currentRoom->_gridEntities[uVar7] == (void *)0x0)) || - (iVar17 = *(int *)((int)currentRoom->_gridEntities[uVar7] + 4), iVar17 == 0xf)) || + (iVar17 = *(int *)(GHIDRA_INT(currentRoom->_gridEntities[uVar7]) + 4), iVar17 == 0xf)) || ((iVar17 == 3 || (iVar17 == 0x16)))) || (iVar17 == 5)) { currentRoom->_dungeonRockIdx = -1; uVar7 = 0xffffffff; @@ -6789,7 +6789,7 @@ LAB_007f3e30: pickupListSize = 0; uStack_14 = 3; queryResult = EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&collectibleList,5,100,-1,0 + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&collectibleList,5,100,-1,0 ,0); isPickupListOwned = 1; pickupListData = queryResult->_data; @@ -6797,10 +6797,10 @@ LAB_007f3e30: pickupListSize = queryResult->_size; local_544 = pickupListData; local_540[0] = (Game *)pickupListSize; - if (collectibleList._0_1_ == '\0') { - uStack_14._0_1_ = 4; + if ((*(undefined1 *)((char *)&(collectibleList) + 0x0)) == '\0') { + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 4; tracked_alloc(1,collectibleList._data,0); - uStack_14 = CONCAT31(uStack_14._1_3_,3); + uStack_14 = CONCAT31((*(undefined1 *)((char *)&(uStack_14) + 0x1)),3); } pGVar22 = local_540[0]; uVar7 = 0; @@ -6823,17 +6823,17 @@ LAB_007f3e30: pGVar22 = pGStack_54c; if (*ppvStack_55c == (void *)0x0) { local_540[0] = (Game *)Random(); - if (((int)pGVar22 < 0) || (0x1bf < (int)pGVar22)) { + if ((GHIDRA_INT(pGVar22) < 0) || (0x1bf < GHIDRA_INT(pGVar22))) { KAGE_LogMessage(0x10,(byte *)"SpawnGridEntity: Grid index invalid\n"); } - if ((pGVar22 < (Game *)0x1c0) && ((int)ppvStack_55c[0x1d2] < 0x385)) { - gridEntity = Isaac::CreateGridEntity(0x13,(uint)pGVar22); + if ((pGVar22 < (Game *)0x1c0) && (GHIDRA_INT(ppvStack_55c[0x1d2]) < 0x385)) { + gridEntity = Isaac::CreateGridEntity(0x13,GHIDRA_UINT(pGVar22)); if (gridEntity != (GridEntity *)0x0) { if (*ppvStack_55c != (undefined4 *)0x0) { (*(code *)**(undefined4 **)*ppvStack_55c)(1); } *ppvStack_55c = gridEntity; - (gridEntity->_desc)._spawnSeed = (int)local_540[0]; + (gridEntity->_desc)._spawnSeed = GHIDRA_INT(local_540[0]); iVar17 = *(int *)gridEntity; (gridEntity->_desc)._variant = 0; (gridEntity->_desc)._varData = 0; @@ -6849,8 +6849,8 @@ LAB_007f3e30: } } ppvStack_55c = ppvStack_55c + 1; - pGStack_54c = (Game *)((int)&pGVar22->_stage + 1); - } while ((int)pGStack_54c < currentRoom->_gridHeight * currentRoom->_gridWidth); + pGStack_54c = (Game *)(GHIDRA_INT(&pGVar22->_stage) + 1); + } while (GHIDRA_INT(pGStack_54c) < currentRoom->_gridHeight * currentRoom->_gridWidth); } uStack_14 = 0xffffffff; } @@ -6890,7 +6890,7 @@ LAB_007f3e30: uVar7 = uVar7 << 9 ^ uVar7; ppvVar23 = (void **)(uVar7 >> 7 ^ uVar7); bStack_555 = roomConfig->Width; - pGStack_550 = (Game *)((uint)ppvVar23 % 5 + (int)local_540[0]); + pGStack_550 = (Game *)(GHIDRA_UINT(ppvVar23) % 5 + GHIDRA_INT(local_540[0])); if (0xd < bStack_555 != 7 < roomConfig->Height) { if (ppvVar23 == (void **)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -6898,10 +6898,10 @@ LAB_007f3e30: (*pcVar2)(); return; } - uVar7 = (uint)ppvVar23 >> 5 ^ (uint)ppvVar23; + uVar7 = GHIDRA_UINT(ppvVar23) >> 5 ^ GHIDRA_UINT(ppvVar23); uVar7 = uVar7 << 9 ^ uVar7; ppvVar23 = (void **)(uVar7 >> 7 ^ uVar7); - pGStack_550 = (Game *)((int)pGStack_550->_roomList[0]._doors + ((uint)ppvVar23 % 9 - 0x30) + pGStack_550 = (Game *)(GHIDRA_INT(pGStack_550->_roomList[0]._doors) + (GHIDRA_UINT(ppvVar23) % 9 - 0x30) ); } pGVar22 = pGStack_550; @@ -6912,10 +6912,10 @@ LAB_007f3e30: (*pcVar2)(); return; } - uVar7 = (uint)ppvVar23 >> 5 ^ (uint)ppvVar23; + uVar7 = GHIDRA_UINT(ppvVar23) >> 5 ^ GHIDRA_UINT(ppvVar23); uVar7 = uVar7 << 9 ^ uVar7; uVar7 = uVar7 >> 7 ^ uVar7; - pGStack_550 = (Game *)((int)pGStack_550->_roomList[0]._doors + (uVar7 % 9 - 0x30)); + pGStack_550 = (Game *)(GHIDRA_INT(pGStack_550->_roomList[0]._doors) + (uVar7 % 9 - 0x30)); if (uVar7 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar2 = (code *)swi(3); @@ -6925,11 +6925,11 @@ LAB_007f3e30: uVar7 = uVar7 >> 5 ^ uVar7; uVar7 = uVar7 << 9 ^ uVar7; ppvVar23 = (void **)(uVar7 >> 7 ^ uVar7); - pGVar22 = (Game *)((int)pGStack_550->_roomList[0]._doors + ((uint)ppvVar23 % 0x12 - 0x30)) + pGVar22 = (Game *)(GHIDRA_INT(pGStack_550->_roomList[0]._doors) + (GHIDRA_UINT(ppvVar23) % 0x12 - 0x30)) ; ppvStack_55c = ppvVar23; } - local_544 = (Game *)((int)pGVar22 * 2); + local_544 = (Game *)(GHIDRA_INT(pGVar22) * 2); pGStack_54c = (Game *)0x0; if (pGVar22 != (Game *)0x0) { do { @@ -6939,25 +6939,25 @@ LAB_007f3e30: (*pcVar2)(); return; } - uVar7 = (uint)ppvVar23 >> ((byte)uStack_5c0 & 0x1f) ^ (uint)ppvVar23; + uVar7 = GHIDRA_UINT(ppvVar23) >> ((byte)uStack_5c0 & 0x1f) ^ GHIDRA_UINT(ppvVar23); uVar7 = uVar7 << ((byte)((ulonglong)uStack_5c0 >> 0x20) & 0x1f) ^ uVar7; ppvVar23 = (void **)(uVar7 >> ((byte)pGStack_560 & 0x1f) ^ uVar7); ppvStack_55c = ppvVar23; - pGStack_550 = (Game *)GetRandomTileIndex(currentRoom,(uint)ppvVar23); - if (currentRoom->_gridEntities[(int)pGStack_550] == (void *)0x0) { + pGStack_550 = (Game *)GetRandomTileIndex(currentRoom,GHIDRA_UINT(ppvVar23)); + if (currentRoom->_gridEntities[GHIDRA_INT(pGStack_550)] == (void *)0x0) { local_540[0] = (Game *)Random(); - if (((int)pGStack_550 < 0) || (0x1bf < (int)pGStack_550)) { + if ((GHIDRA_INT(pGStack_550) < 0) || (0x1bf < GHIDRA_INT(pGStack_550))) { KAGE_LogMessage(0x10,(byte *)"SpawnGridEntity: Grid index invalid\n"); } if ((pGStack_550 < (Game *)0x1c0) && - (currentRoom->_gridPaths[(int)pGStack_550] < 0x385)) { - gridEntity = Isaac::CreateGridEntity(1,(uint)pGStack_550); + (currentRoom->_gridPaths[GHIDRA_INT(pGStack_550)] < 0x385)) { + gridEntity = Isaac::CreateGridEntity(1,GHIDRA_UINT(pGStack_550)); if (gridEntity != (GridEntity *)0x0) { - if (currentRoom->_gridEntities[(int)pGStack_550] != (undefined4 *)0x0) { - (*(code *)**(undefined4 **)currentRoom->_gridEntities[(int)pGStack_550])(1); + if (currentRoom->_gridEntities[GHIDRA_INT(pGStack_550)] != (undefined4 *)0x0) { + (*(code *)**(undefined4 **)currentRoom->_gridEntities[GHIDRA_INT(pGStack_550)])(1); } - currentRoom->_gridEntities[(int)pGStack_550] = gridEntity; - (gridEntity->_desc)._spawnSeed = (int)local_540[0]; + currentRoom->_gridEntities[GHIDRA_INT(pGStack_550)] = gridEntity; + (gridEntity->_desc)._spawnSeed = GHIDRA_INT(local_540[0]); iVar17 = *(int *)gridEntity; (gridEntity->_desc)._variant = 0; (gridEntity->_desc)._varData = 0; @@ -6971,9 +6971,9 @@ LAB_007f3e30: } ppvVar23 = ppvStack_55c; } - pGStack_54c = (Game *)((int)&pGStack_54c->_stage + 1); + pGStack_54c = (Game *)(GHIDRA_INT(&pGStack_54c->_stage) + 1); } - pGStack_54c = (Game *)((int)&pGStack_54c->_stage + 1); + pGStack_54c = (Game *)(GHIDRA_INT(&pGStack_54c->_stage) + 1); } while (pGStack_54c < local_544); } } @@ -7000,16 +7000,16 @@ LAB_007f3e30: (*pcVar2)(); return; } - uVar7 = (uint)pGVar22 >> ((byte)greedRngShifts & 0x1f) ^ (uint)pGVar22; + uVar7 = GHIDRA_UINT(pGVar22) >> ((byte)greedRngShifts & 0x1f) ^ GHIDRA_UINT(pGVar22); uVar7 = uVar7 << ((byte)((ulonglong)greedRngShifts >> 0x20) & 0x1f) ^ uVar7; pGStack_550 = (Game *)(uVar7 >> ((byte)local_544 & 0x1f) ^ uVar7); - if ((int)((uint)pGStack_550 % 5 + 3) <= (int)pGStack_54c) break; - VStack_574.x = (float)((int)local_540[0] % currentRoom->_gridWidth) * 40.0 + 40.0; - VStack_574.y = (float)((int)local_540[0] / currentRoom->_gridWidth) * 40.0 + 120.0; + if (GHIDRA_INT((GHIDRA_UINT(pGStack_550) % 5 + 3)) <= GHIDRA_INT(pGStack_54c)) break; + VStack_574.x = (float)(GHIDRA_INT(local_540[0]) % currentRoom->_gridWidth) * 40.0 + 40.0; + VStack_574.y = (float)(GHIDRA_INT(local_540[0]) / currentRoom->_gridWidth) * 40.0 + 120.0; FindFreePickupSpawnPosition(currentRoom,&freePickupPos,&VStack_574,0.0,0,0,0); - iVar8 = (int)((freePickupPos.x - 40.0) / 40.0 + 0.5); + iVar8 = GHIDRA_INT(((freePickupPos.x - 40.0) / 40.0 + 0.5)); pGVar21 = (Game *)((freePickupPos.y - 120.0) / 40.0 + 0.5); - iVar17 = (int)(float)pGVar21; + iVar17 = GHIDRA_INT((float)pGVar21); if (((iVar8 < 0) || (currentRoom->_gridWidth <= iVar8)) || ((iVar17 < 0 || (currentRoom->_gridHeight <= iVar17)))) { uVar7 = 0xffffffff; @@ -7024,10 +7024,10 @@ LAB_007f3e30: (*pcVar2)(); return; } - uVar20 = (uint)pGStack_550 >> ((byte)greedRngShifts & 0x1f) ^ (uint)pGStack_550; + uVar20 = GHIDRA_UINT(pGStack_550) >> ((byte)greedRngShifts & 0x1f) ^ GHIDRA_UINT(pGStack_550); uVar20 = uVar20 << ((byte)((ulonglong)greedRngShifts >> 0x20) & 0x1f) ^ uVar20; pGStack_550 = (Game *)(uVar20 >> ((byte)local_544 & 0x1f) ^ uVar20); - if (((int)uVar7 < 0) || (0x1bf < (int)uVar7)) { + if ((GHIDRA_INT(uVar7) < 0) || (0x1bf < GHIDRA_INT(uVar7))) { KAGE_LogMessage(0x10,(byte *)"SpawnGridEntity: Grid index invalid\n"); } if (((uVar7 < 0x1c0) && (currentRoom->_gridPaths[uVar7] < 0x385)) && @@ -7036,7 +7036,7 @@ LAB_007f3e30: (*(code *)**(undefined4 **)currentRoom->_gridEntities[uVar7])(1); } currentRoom->_gridEntities[uVar7] = pGStack_554; - pGStack_554->_roomList[0].GridIndex = (int)pGStack_550; + pGStack_554->_roomList[0].GridIndex = GHIDRA_INT(pGStack_550); textData = ((std_vector *)&pGStack_554->_stage)->_begin; *(void **)&pGStack_554->_bossChallenge = (void *)0xa; pGStack_554->_roomList[0].SafeGridIndex = 0; @@ -7049,7 +7049,7 @@ LAB_007f3e30: } currentRoom->_gridPaths[uVar7] = 900; } - pGStack_54c = (Game *)((int)&pGStack_54c->_stage + 1); + pGStack_54c = (Game *)(GHIDRA_INT(&pGStack_54c->_stage) + 1); pGVar22 = pGStack_550; } } @@ -7060,9 +7060,9 @@ LAB_007f3e30: if (*ppvVar23 != (int *)0x0) { (**(code **)(*(int *)*ppvVar23 + 4))(); } - local_540[0] = (Game *)((int)local_540[0] + 1); + local_540[0] = (Game *)(GHIDRA_INT(local_540[0]) + 1); ppvVar23 = ppvVar23 + 1; - } while ((int)local_540[0] < currentRoom->_gridHeight * currentRoom->_gridWidth); + } while (GHIDRA_INT(local_540[0]) < currentRoom->_gridHeight * currentRoom->_gridWidth); } attach_minecarts(); if ((isHasHeretic != '\0') || (isHasRaglich != '\0')) { @@ -7075,7 +7075,7 @@ LAB_007f3e30: _DAT_00c82668 = DAT_00c82664; if ((currentRoom->_entityList)._updateEL._size != 0) { do { - iVar17 = *(int *)((int)(currentRoom->_entityList)._updateEL._data + uVar7 * 4); + iVar17 = *(int *)(GHIDRA_INT((currentRoom->_entityList)._updateEL._data) + uVar7 * 4); if ((*(int *)(iVar17 + 0x28) == 0x21) && (*(int *)(iVar17 + 0x2c) == 3)) { uVar11 = 0x397; *(undefined4 *)(iVar17 + 0x380) = 0x3f800000; @@ -7088,7 +7088,7 @@ LAB_007f3e30: *(undefined4 *)(iVar17 + 0x168) = *(undefined4 *)(iVar17 + 0x168); } uVar7 = uVar7 + 1; - } while (uVar7 < (uint)(currentRoom->_entityList)._updateEL._size); + } while (uVar7 < GHIDRA_UINT((currentRoom->_entityList)._updateEL._size)); } } RestoreState(currentRoom); @@ -7110,20 +7110,20 @@ LAB_007f3e30: do { pGVar22 = local_540[0]; local_544 = g_game; - roomDesc = ((Level *)((Level *)g_game))->Level::GetRoomByIdx(*(int *)((int)g_game->_roomList[0]._doors + - (int)(&(*(undefined1 *)((char *)&(pGStack_54c[-1]) + 0x68d68)) + -0x1c)),-1); + roomDesc = ((Level *)((Level *)g_game))->Level::GetRoomByIdx(*(int *)(GHIDRA_INT(g_game->_roomList[0]._doors) + + GHIDRA_INT((&(*(undefined1 *)((char *)&(pGStack_54c[-1]) + 0x68d68)) + -0x1c))),-1); if (roomDesc == currentRoom->_descriptor) { uVar7 = Random(); pGVar22 = local_540[0]; - iVar17 = *(int *)((int)local_544->_roomList[0]._doors + (int)&(*(undefined1 *)((char *)&(pGStack_54c[-1]) + 0x68d50))); + iVar17 = *(int *)(GHIDRA_INT(local_544->_roomList[0]._doors) + GHIDRA_INT(&(*(undefined1 *)((char *)&(pGStack_54c[-1]) + 0x68d50)))); effect82Pos.x = (float)(iVar17 % currentRoom->_gridWidth) * 40.0 + 40.0; pGVar21 = (Game *)((float)(iVar17 / currentRoom->_gridWidth) * 40.0 + 120.0); effect82Pos.y = (float)pGVar21; - ((Game *)(g_game))->Game::Spawn(1000,0x52,&effect82Pos,&g_vectorZero,(Entity *)0x0,(uint)local_540[0],uVar7); + ((Game *)(g_game))->Game::Spawn(1000,0x52,&effect82Pos,&g_vectorZero,(Entity *)0x0,GHIDRA_UINT(local_540[0]),uVar7); } - local_540[0] = (Game *)((int)pGVar22 + 1); + local_540[0] = (Game *)(GHIDRA_INT(pGVar22) + 1); pGStack_54c = (Game *)&pGStack_54c->_curses; - } while ((int)pGStack_54c < 0x18390); + } while (GHIDRA_INT(pGStack_54c) < 0x18390); if ((*(undefined1 *)((char *)(currentRoom) + 0x1)) != '\0') { pGVar22 = g_game; if ((g_game->_currentRoomIdx == g_game->_startingRoomIdx) && (g_game->_stage != 0xd)) { @@ -7143,27 +7143,27 @@ LAB_007f3e30: uVar7 = *(uint *)(*(int *)&(*(undefined1 *)((char *)&(local_544[-1]) + 0x68cd8)) + 8); roomTypeBits[0][uVar7 >> 5] = roomTypeBits[0][uVar7 >> 5] | 1 << ((byte)uVar7 & 0x1f); } - local_540[0] = (Game *)((int)local_540[0] + 1); + local_540[0] = (Game *)(GHIDRA_INT(local_540[0]) + 1); local_544 = (Game *)&(*(undefined1 *)((char *)&(local_544->_roomList[0]) + 0xa4)); - } while ((int)local_540[0] < pGVar22->_nbRooms); + } while (GHIDRA_INT(local_540[0]) < pGVar22->_nbRooms); currentRoom = room; } local_540[0] = (Game *)*roomTypeBits[0]; - if (((uint)local_540[0] & 0x10) != 0) { + if ((GHIDRA_UINT(local_540[0]) & 0x10) != 0) { portalTypes[0] = 0; } - pGStack_550 = (Game *)(uint)(((uint)local_540[0] & 0x10) != 0); - if (((uint)local_540[0] & 0x20) != 0) { - portalTypes[(int)pGStack_550] = 1; - pGStack_550 = (Game *)((int)&pGStack_550->_stage + 1); + pGStack_550 = (Game *)GHIDRA_UINT(((GHIDRA_UINT(local_540[0]) & 0x10) != 0)); + if ((GHIDRA_UINT(local_540[0]) & 0x20) != 0) { + portalTypes[GHIDRA_INT(pGStack_550)] = 1; + pGStack_550 = (Game *)(GHIDRA_INT(&pGStack_550->_stage) + 1); } if ((char)local_540[0] < '\0') { - portalTypes[(int)pGStack_550] = 2; - pGStack_550 = (Game *)((int)&pGStack_550->_stage + 1); + portalTypes[GHIDRA_INT(pGStack_550)] = 2; + pGStack_550 = (Game *)(GHIDRA_INT(&pGStack_550->_stage) + 1); } - if (((uint)local_540[0] & 4) != 0) { - portalTypes[(int)pGStack_550] = 3; - pGStack_550 = (Game *)((int)&pGStack_550->_stage + 1); + if ((GHIDRA_UINT(local_540[0]) & 4) != 0) { + portalTypes[GHIDRA_INT(pGStack_550)] = 3; + pGStack_550 = (Game *)(GHIDRA_INT(&pGStack_550->_stage) + 1); } if (pGStack_550 != (Game *)0x0) { iVar17 = 0; @@ -7173,25 +7173,25 @@ LAB_007f3e30: ppvStack_55c = (void **)0x19; decorationRng._shift3 = 0x19; pGStack_560 = (Game *)decorationRng._seed; - if (0 < (int)&(*(undefined1 *)((char *)&(pGStack_550[-1]._console) + 0x3))) { + if (0 < GHIDRA_INT(&(*(undefined1 *)((char *)&(pGStack_550[-1]._console) + 0x3)))) { pGVar21 = pGStack_550 + -1; do { - uVar20 = ((RNG *)(&decorationRng))->RNG::RandomInt((int)pGStack_550 - iVar17); + uVar20 = ((RNG *)(&decorationRng))->RNG::RandomInt(GHIDRA_INT(pGStack_550) - iVar17); uVar7 = portalTypes[iVar17]; iVar8 = uVar20 + iVar17; portalTypes[iVar17] = portalTypes[iVar8]; iVar17 = iVar17 + 1; portalTypes[iVar8] = uVar7; - } while (iVar17 < (int)&(*(undefined1 *)((char *)&((pGVar21->_console)) + 0x3))); + } while (iVar17 < GHIDRA_INT(&(*(undefined1 *)((char *)&((pGVar21->_console)) + 0x3)))); ppvStack_55c = (void **)decorationRng._shift3; pGStack_560 = (Game *)decorationRng._seed; currentRoom = room; } pGStack_54c = (Game *)currentRoom->_gridWidth; - pGStack_554 = (Game *)((int)pGStack_54c / 2); + pGStack_554 = (Game *)(GHIDRA_INT(pGStack_54c) / 2); VStack_574.y = (float)(currentRoom->_gridHeight / 2 + -1); - decorationRng._seed = (int)pGStack_560; - decorationRng._shift3 = (int)ppvStack_55c; + decorationRng._seed = GHIDRA_INT(pGStack_560); + decorationRng._shift3 = GHIDRA_INT(ppvStack_55c); if (pGStack_550 < (Game *)0x3) { if (pGStack_560 == (Game *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -7202,23 +7202,23 @@ LAB_007f3e30: return; } } - uVar7 = (uint)pGStack_560 >> ((byte)decorationRng._shift1 & 0x1f) ^ (uint)pGStack_560; + uVar7 = GHIDRA_UINT(pGStack_560) >> ((byte)decorationRng._shift1 & 0x1f) ^ GHIDRA_UINT(pGStack_560); uVar7 = uVar7 << ((byte)decorationRng._shift2 & 0x1f) ^ uVar7; local_540[0] = (Game *)(uVar7 >> ((byte)ppvStack_55c & 0x1f) ^ uVar7); puVar12 = (undefined1 *) - ((int)&(((EntityConfig *)((int)VStack_574.y + -0x38))->_edenHair)._capacity + + (GHIDRA_INT(&(((EntityConfig *)(GHIDRA_INT(VStack_574.y) + -0x38))->_edenHair)._capacity) + 3); - if (((((int)pGStack_554 < 0) || ((int)pGStack_54c <= (int)pGStack_554)) || - ((int)puVar12 < 0)) || (currentRoom->_gridHeight <= (int)puVar12)) { + if ((((GHIDRA_INT(pGStack_554) < 0) || (GHIDRA_INT(pGStack_54c) <= GHIDRA_INT(pGStack_554))) || + (GHIDRA_INT(puVar12) < 0)) || (currentRoom->_gridHeight <= GHIDRA_INT(puVar12))) { iVar17 = -1; } else { - iVar17 = (int)pGStack_554->_roomList[0]._doors + - (int)puVar12 * (int)pGStack_54c + -0x30; + iVar17 = GHIDRA_INT(pGStack_554->_roomList[0]._doors) + + GHIDRA_INT(puVar12) * GHIDRA_INT(pGStack_54c) + -0x30; } spawnPos = &secondPortalPos; - secondPortalPos.x = (float)(iVar17 % (int)pGStack_54c) * 40.0 + 40.0; - pGVar21 = (Game *)((float)(iVar17 / (int)pGStack_54c) * 40.0 + 120.0); + secondPortalPos.x = (float)(iVar17 % GHIDRA_INT(pGStack_54c)) * 40.0 + 40.0; + pGVar21 = (Game *)((float)(iVar17 / GHIDRA_INT(pGStack_54c)) * 40.0 + 120.0); portalTypes[1] = portalTypes[0]; secondPortalPos.y = (float)pGVar21; } @@ -7233,46 +7233,46 @@ LAB_007f3e30: } } fVar26 = VStack_574.y; - uVar7 = (uint)pGStack_560 >> ((byte)decorationRng._shift1 & 0x1f) ^ (uint)pGStack_560; + uVar7 = GHIDRA_UINT(pGStack_560) >> ((byte)decorationRng._shift1 & 0x1f) ^ GHIDRA_UINT(pGStack_560); uVar7 = uVar7 << ((byte)decorationRng._shift2 & 0x1f) ^ uVar7; fStack_58c = (float)(uVar7 >> ((byte)ppvStack_55c & 0x1f) ^ uVar7); puVar12 = &(*(undefined1 *)((char *)&(pGStack_554[-1]._console) + 0x2)); - if ((((int)puVar12 < 0) || ((int)pGStack_54c <= (int)puVar12)) || - (((int)VStack_574.y < 0 || (currentRoom->_gridHeight <= (int)VStack_574.y)))) { + if (((GHIDRA_INT(puVar12) < 0) || (GHIDRA_INT(pGStack_54c) <= GHIDRA_INT(puVar12))) || + ((GHIDRA_INT(VStack_574.y) < 0 || (currentRoom->_gridHeight <= GHIDRA_INT(VStack_574.y))))) { puVar12 = (undefined1 *)0xffffffff; } else { - puVar12 = puVar12 + (int)VStack_574.y * (int)pGStack_54c; + puVar12 = puVar12 + GHIDRA_INT(VStack_574.y) * GHIDRA_INT(pGStack_54c); } - firstPortalPos.x = (float)((int)puVar12 % (int)pGStack_54c) * 40.0 + 40.0; - firstPortalPos.y = (float)((int)puVar12 / (int)pGStack_54c) * 40.0 + 120.0; + firstPortalPos.x = (float)(GHIDRA_INT(puVar12) % GHIDRA_INT(pGStack_54c)) * 40.0 + 40.0; + firstPortalPos.y = (float)(GHIDRA_INT(puVar12) / GHIDRA_INT(pGStack_54c)) * 40.0 + 120.0; ((Game *)(g_game))->Game::Spawn(1000,0xa1,&firstPortalPos,&g_vectorZero,(Entity *)0x0,portalTypes[0], - (uint)fStack_58c); + GHIDRA_UINT(fStack_58c)); if (fStack_58c == 0.0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar2 = (code *)swi(3); (*pcVar2)(); return; } - uVar7 = (uint)fStack_58c >> ((byte)decorationRng._shift1 & 0x1f) ^ (uint)fStack_58c; + uVar7 = GHIDRA_UINT(fStack_58c) >> ((byte)decorationRng._shift1 & 0x1f) ^ GHIDRA_UINT(fStack_58c); uVar7 = uVar7 << ((byte)decorationRng._shift2 & 0x1f) ^ uVar7; local_540[0] = (Game *)(uVar7 >> ((byte)ppvStack_55c & 0x1f) ^ uVar7); - puVar12 = (undefined1 *)((int)&((std_vector *)&pGStack_554->_stage)->_begin + 2); - if ((((int)puVar12 < 0) || (iVar17 = currentRoom->_gridWidth, iVar17 <= (int)puVar12)) - || (((int)fVar26 < 0 || (currentRoom->_gridHeight <= (int)fVar26)))) { + puVar12 = (undefined1 *)(GHIDRA_INT(&((std_vector *)&pGStack_554->_stage)->_begin) + 2); + if (((GHIDRA_INT(puVar12) < 0) || (iVar17 = currentRoom->_gridWidth, iVar17 <= GHIDRA_INT(puVar12))) + || ((GHIDRA_INT(fVar26) < 0 || (currentRoom->_gridHeight <= GHIDRA_INT(fVar26))))) { iVar17 = currentRoom->_gridWidth; puVar12 = (undefined1 *)0xffffffff; } else { - puVar12 = puVar12 + (int)fVar26 * iVar17; + puVar12 = puVar12 + GHIDRA_INT(fVar26) * iVar17; } spawnPos = &secondPortalPosAlt; - secondPortalPosAlt.x = (float)((int)puVar12 % iVar17) * 40.0 + 40.0; - pGVar21 = (Game *)((float)((int)puVar12 / iVar17) * 40.0 + 120.0); + secondPortalPosAlt.x = (float)(GHIDRA_INT(puVar12) % iVar17) * 40.0 + 40.0; + pGVar21 = (Game *)((float)(GHIDRA_INT(puVar12) / iVar17) * 40.0 + 120.0); secondPortalPosAlt.y = (float)pGVar21; } ((Game *)(g_game))->Game::Spawn(1000,0xa1,spawnPos,&g_vectorZero,(Entity *)0x0,portalTypes[1], - (uint)local_540[0]); + GHIDRA_UINT(local_540[0])); } uStack_14 = 0xffffffff; FID_conflict__Tidy(roomTypeBits); @@ -7293,8 +7293,8 @@ LAB_007f3e30: spawned = ((Game *)(g_game))->Game::Spawn(1000,0x9c,&effect156Pos,&g_vectorZero,(Entity *)0x0,1,uVar7); ((Game *)(g_game))->Game::GetPlayer(0); ((Entity_Player *)(firstPlayer))->Entity_Player::GetEnterPosition(&enterPos); - iVar8 = (int)((*extraout_EAX - 40.0) / 40.0 + 0.5); - iVar17 = (int)((extraout_EAX[1] - 120.0) / 40.0 + 0.5); + iVar8 = GHIDRA_INT(((*extraout_EAX - 40.0) / 40.0 + 0.5)); + iVar17 = GHIDRA_INT(((extraout_EAX[1] - 120.0) / 40.0 + 0.5)); if ((((iVar8 < 0) || (currentRoom->_gridWidth <= iVar8)) || (iVar17 < 0)) || (currentRoom->_gridHeight <= iVar17)) { uVar7 = 0xffffffff; @@ -7303,8 +7303,8 @@ LAB_007f3e30: uVar7 = iVar17 * currentRoom->_gridWidth + iVar8; } pGVar21 = (Game *)(((spawned->_pos).x - 40.0) / 40.0 + 0.5); - iVar8 = (int)(float)pGVar21; - iVar17 = (int)(((spawned->_pos).y - 120.0) / 40.0 + 0.5); + iVar8 = GHIDRA_INT((float)pGVar21); + iVar17 = GHIDRA_INT((((spawned->_pos).y - 120.0) / 40.0 + 0.5)); if (((iVar8 < 0) || (currentRoom->_gridWidth <= iVar8)) || ((iVar17 < 0 || (currentRoom->_gridHeight <= iVar17)))) { uVar20 = 0xffffffff; @@ -7358,7 +7358,7 @@ LAB_007f3e30: (*pcVar2)(); return; } - uVar7 = (uint)local_540[0] >> ((byte)seedItemRngShifts & 0x1f) ^ (uint)local_540[0]; + uVar7 = GHIDRA_UINT(local_540[0]) >> ((byte)seedItemRngShifts & 0x1f) ^ GHIDRA_UINT(local_540[0]); uVar7 = uVar7 << (bVar5 & 0x1f) ^ uVar7; uVar7 = uVar7 >> (bVar15 & 0x1f) ^ uVar7; spawnPos = &seedItemPos; @@ -7372,7 +7372,7 @@ LAB_007f3e30: } collectiblePos.x = seedItemPos.x - -40.0; collectiblePos.y = seedItemPos.y - 0.0; - uVar7 = (uint)local_540[0] >> ((byte)seedItemRngShifts & 0x1f) ^ (uint)local_540[0]; + uVar7 = GHIDRA_UINT(local_540[0]) >> ((byte)seedItemRngShifts & 0x1f) ^ GHIDRA_UINT(local_540[0]); uVar7 = uVar7 << (bVar5 & 0x1f) ^ uVar7; uVar7 = uVar7 >> (bVar15 & 0x1f) ^ uVar7; ((Game *)(g_game))->Game::Spawn(5,100,&collectiblePos,&g_vectorZero,(Entity *)0x0,0xffffffff,uVar7); @@ -7424,7 +7424,7 @@ LAB_007f3e30: } if (((g_game->_stage == 1) && ((g_game->_levelStateFlags & 0x10000U) != 0)) && ((g_game->_currentRoomIdx == g_game->_startingRoomIdx && - ((*(byte *)((int)(g_game->_itemPool)._removedCollectibles._begin + 0x44) & 0x40) == 0)))) { + ((*(byte *)(GHIDRA_INT((g_game->_itemPool)._removedCollectibles._begin) + 0x44) & 0x40) == 0)))) { uVar7 = Random(); spawnPos = GetCenterPos(&startRoomCenter); ((Game *)(g_game))->Game::Spawn(1000,0x73,spawnPos,&g_vectorZero,(Entity *)0x0,0,uVar7); @@ -7459,49 +7459,49 @@ LAB_007f3e30: pGVar22 = pGStack_554; if (1 < iVar17) { do { - if (((-1 < (int)local_544) && ((int)local_544 < iVar17)) && - ((-1 < (int)pGVar22 && ((int)pGVar22 < currentRoom->_gridHeight)))) { - iVar17 = iVar17 * (int)pGVar22; + if (((-1 < GHIDRA_INT(local_544)) && (GHIDRA_INT(local_544) < iVar17)) && + ((-1 < GHIDRA_INT(pGVar22) && (GHIDRA_INT(pGVar22) < currentRoom->_gridHeight)))) { + iVar17 = iVar17 * GHIDRA_INT(pGVar22); roomDesc = local_544->_roomList; - uVar7 = (int)roomDesc->_doors + iVar17 + -0x30; + uVar7 = GHIDRA_INT(roomDesc->_doors) + iVar17 + -0x30; if (uVar7 < 0x1c0) { - if ((currentRoom->_gridEntities[(int)roomDesc->_doors + iVar17 + -0x30] != (void *)0x0 - ) && ((iVar8 = *(int *)((int)currentRoom->_gridEntities - [(int)roomDesc->_doors + iVar17 + -0x30] + 4), + if ((currentRoom->_gridEntities[GHIDRA_INT(roomDesc->_doors) + iVar17 + -0x30] != (void *)0x0 + ) && ((iVar8 = *(int *)(GHIDRA_INT(currentRoom->_gridEntities) + [GHIDRA_INT(roomDesc->_doors) + iVar17 + -0x30] + 4), iVar8 == 3 || (iVar8 == 0x18)))) { - if ((-1 < (int)uVar7) && ((int)uVar7 < 0x1c0)) { - textData = currentRoom->_gridEntities[(int)roomDesc->_doors + iVar17 + -0x30]; - currentRoom->_gridEntities[(int)roomDesc[2]._doors + iVar17 + 0x32] = (void *)0x0; + if ((-1 < GHIDRA_INT(uVar7)) && (GHIDRA_INT(uVar7) < 0x1c0)) { + textData = currentRoom->_gridEntities[GHIDRA_INT(roomDesc->_doors) + iVar17 + -0x30]; + currentRoom->_gridEntities[GHIDRA_INT(roomDesc[2]._doors) + iVar17 + 0x32] = (void *)0x0; iVar8 = *(int *)((char *)textData + 4); } - local_540[0] = (Game *)(uint)(iVar8 == 0x18); + local_540[0] = (Game *)GHIDRA_UINT((iVar8 == 0x18)); if (((((iVar8 == 0x18) && (pGStack_54c = (Game *)&(*(undefined1 *)((char *)&(local_544[-1]._console) + 0x3)), - -1 < (int)pGStack_54c)) && ((int)pGStack_54c < currentRoom->_gridWidth)) && - (((int)pGStack_554 < currentRoom->_gridHeight && - (-1 < (int)pGStack_54c + currentRoom->_gridWidth * (int)pGStack_554)))) && + -1 < GHIDRA_INT(pGStack_54c))) && (GHIDRA_INT(pGStack_54c) < currentRoom->_gridWidth)) && + ((GHIDRA_INT(pGStack_554) < currentRoom->_gridHeight && + (-1 < GHIDRA_INT(pGStack_54c) + currentRoom->_gridWidth * GHIDRA_INT(pGStack_554))))) && ((textData = currentRoom->_gridEntities - [(int)((int)pGStack_54c + currentRoom->_gridWidth * (int)pGStack_554 - )], textData != (void *)0x0 && + [GHIDRA_INT((GHIDRA_INT(pGStack_54c) + currentRoom->_gridWidth * GHIDRA_INT(pGStack_554) + ))], textData != (void *)0x0 && ((*(int *)((char *)textData + 4) == 0xf && (*(int *)((char *)textData + 8) == 1)))))) { local_540[0] = (Game *)0x2; } iVar8 = 0; uVar20 = Random(); - SpawnGridEntity(currentRoom,uVar7,0xf,(uint)local_540[0],uVar20,iVar8); + SpawnGridEntity(currentRoom,uVar7,0xf,GHIDRA_UINT(local_540[0]),uVar20,iVar8); (**(code **)(*(int *)currentRoom->_gridEntities - [(int)roomDesc->_doors + iVar17 + -0x30] + 4))(); + [GHIDRA_INT(roomDesc->_doors) + iVar17 + -0x30] + 4))(); pGVar22 = pGStack_554; } } } iVar17 = currentRoom->_gridWidth; - local_544 = (Game *)((int)&((std_vector *)&local_544->_stage)->_begin + 1); - } while ((int)local_544 < iVar17); + local_544 = (Game *)(GHIDRA_INT(&((std_vector *)&local_544->_stage)->_begin) + 1); + } while (GHIDRA_INT(local_544) < iVar17); } - pGStack_554 = (Game *)((int)&((std_vector *)&pGVar22->_stage)->_begin + 1); - } while ((int)pGStack_554 < currentRoom->_gridHeight); + pGStack_554 = (Game *)(GHIDRA_INT(&((std_vector *)&pGVar22->_stage)->_begin) + 1); + } while (GHIDRA_INT(pGStack_554) < currentRoom->_gridHeight); VStack_574.y = (float)currentRoom->_descriptor; } pGVar22 = g_game; @@ -7597,7 +7597,7 @@ LAB_007f5974: pGVar21 = pGStack_554; } spawned = ((Game *)(g_game))->Game::Spawn(1000,uVar20,spawnPos,&g_vectorZero,(Entity *)0x0,uVar7, - (uint)pGVar21); + GHIDRA_UINT(pGVar21)); spawned->Update(); } } @@ -7615,21 +7615,21 @@ LAB_007f5b02: (*pcVar2)(); return; } - ambientRng._seed = (uint)ambientRng._seed >> 5 ^ ambientRng._seed; + ambientRng._seed = GHIDRA_UINT(ambientRng._seed) >> 5 ^ ambientRng._seed; ambientRng._seed = ambientRng._seed << 9 ^ ambientRng._seed; - ambientRng._seed = (uint)ambientRng._seed >> 7 ^ ambientRng._seed; - uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt((uint)ambientRng._seed % 0x32 + 1); - if (0 < (int)uVar7) { + ambientRng._seed = GHIDRA_UINT(ambientRng._seed) >> 7 ^ ambientRng._seed; + uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt(GHIDRA_UINT(ambientRng._seed) % 0x32 + 1); + if (0 < GHIDRA_INT(uVar7)) { do { uVar20 = Random(); local_544 = (Game *)(((currentRoom->_bottomRightPos).y - (currentRoom->_topLeftPos).y) * - (float)((double)(int)uVar20 + - __uint_to_double_fixup[-((int)uVar20 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar20) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar20) >> 0x1f)]) * 2.3283064e-10 + (currentRoom->_topLeftPos).y); uVar20 = Random(); effect65Pos.x = ((currentRoom->_bottomRightPos).x - (currentRoom->_topLeftPos).x) * - (float)((double)(int)uVar20 + __uint_to_double_fixup[-((int)uVar20 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar20) + __uint_to_double_fixup[-(GHIDRA_INT(uVar20) >> 0x1f)]) * 2.3283064e-10 + (currentRoom->_topLeftPos).x; effect65Pos.y = (float)local_544; pGVar21 = local_544; @@ -7647,9 +7647,9 @@ LAB_007f5b02: (*pcVar2)(); return; } - ambientRng._seed = (uint)ambientRng._seed >> 5 ^ ambientRng._seed; + ambientRng._seed = GHIDRA_UINT(ambientRng._seed) >> 5 ^ ambientRng._seed; ambientRng._seed = ambientRng._seed << 9 ^ ambientRng._seed; - ambientRng._seed = (uint)ambientRng._seed >> 7 ^ ambientRng._seed; + ambientRng._seed = GHIDRA_UINT(ambientRng._seed) >> 7 ^ ambientRng._seed; if ((((ambientRng._seed & 1U) != 0) && (pGStack_54c != (Game *)0xd)) && (currentRoom->_roomType != 8)) { uVar7 = g_game->_debugCurses; @@ -7677,18 +7677,18 @@ LAB_007f5b02: fStack_58c = 1.4013e-45; } local_544 = (Game *)((iVar17 + 1) * 0xf); - ppvStack_55c = (void **)(uint)(*(int *)currentRoom->_descriptor == g_game->_startingRoomIdx) + ppvStack_55c = (void **)GHIDRA_UINT((*(int *)currentRoom->_descriptor == g_game->_startingRoomIdx)) ; - uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt((uint)local_544); + uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt(GHIDRA_UINT(local_544)); uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt(uVar7 + 1); VStack_574.y = (float)(uVar7 >> ((byte)ppvStack_55c & 0x1f)); - uVar7 = ((int)fStack_58c + 1) * 10; + uVar7 = (GHIDRA_INT(fStack_58c) + 1) * 10; uVar20 = ((RNG *)(&ambientRng))->RNG::RandomInt(uVar7); uVar20 = ((RNG *)(&ambientRng))->RNG::RandomInt(uVar20 + 1); pGStack_550 = (Game *)(uVar20 >> ((byte)ppvStack_55c & 0x1f)); uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt(uVar7); uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt(uVar7 + 1); - uVar20 = ((RNG *)(&ambientRng))->RNG::RandomInt(((int)fStack_58c + 2) * 10); + uVar20 = ((RNG *)(&ambientRng))->RNG::RandomInt((GHIDRA_INT(fStack_58c) + 2) * 10); uVar20 = ((RNG *)(&ambientRng))->RNG::RandomInt(uVar20 + 1); ((RNG *)(&ambientRng))->RNG::RandomInt(uVar20 + 1); pGStack_554 = (Game *)(uVar7 >> ((byte)ppvStack_55c & 0x1f)); @@ -7697,28 +7697,28 @@ LAB_007f5b02: } if (pGStack_560 == (Game *)0x9) { pGVar22 = (Game *)&DAT_00000005; - if (5 < (int)pGStack_550) { + if (5 < GHIDRA_INT(pGStack_550)) { pGVar22 = pGStack_550; } pGStack_550 = pGVar22; } if (pGStack_54c == (Game *)0x1c) { - pGStack_550 = (Game *)((int)pGStack_550 * 2); - pGStack_554 = (Game *)((int)pGStack_554 * 3); - VStack_574.y = (float)((int)VStack_574.y * 2); + pGStack_550 = (Game *)(GHIDRA_INT(pGStack_550) * 2); + pGStack_554 = (Game *)(GHIDRA_INT(pGStack_554) * 3); + VStack_574.y = (float)(GHIDRA_INT(VStack_574.y) * 2); } - if (0 < (int)VStack_574.y) { + if (0 < GHIDRA_INT(VStack_574.y)) { pGVar22 = (Game *)VStack_574.y; do { uVar7 = Random(); VStack_574.y = ((currentRoom->_bottomRightPos).y - (currentRoom->_topLeftPos).y) * - (float)((double)(int)uVar7 + - __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * 2.3283064e-10 + + (float)((double)GHIDRA_INT(uVar7) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 + (currentRoom->_topLeftPos).y; uVar7 = Random(); tinyFlyPos.x = ((currentRoom->_bottomRightPos).x - (currentRoom->_topLeftPos).x) * - (float)((double)(int)uVar7 + - __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * 2.3283064e-10 + + (float)((double)GHIDRA_INT(uVar7) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 + (currentRoom->_topLeftPos).x; tinyFlyPos.y = VStack_574.y; pGVar21 = (Game *)VStack_574.y; @@ -7728,18 +7728,18 @@ LAB_007f5b02: pGVar22 = (Game *)&(*(undefined1 *)((char *)&(pGVar22[-1]._console) + 0x3)); } while (pGVar22 != (Game *)0x0); } - if (0 < (int)pGStack_550) { + if (0 < GHIDRA_INT(pGStack_550)) { pGVar22 = pGStack_550; do { uVar7 = Random(); VStack_574.y = ((currentRoom->_bottomRightPos).y - (currentRoom->_topLeftPos).y) * - (float)((double)(int)uVar7 + - __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * 2.3283064e-10 + + (float)((double)GHIDRA_INT(uVar7) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 + (currentRoom->_topLeftPos).y; uVar7 = Random(); effect33Pos.x = ((currentRoom->_bottomRightPos).x - (currentRoom->_topLeftPos).x) * - (float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 + (currentRoom->_topLeftPos).x; effect33Pos.y = VStack_574.y; pGVar21 = (Game *)VStack_574.y; @@ -7751,7 +7751,7 @@ LAB_007f5b02: } while (pGVar22 != (Game *)0x0); } pGVar22 = pGStack_554; - if (0 < (int)pGStack_554) { + if (0 < GHIDRA_INT(pGStack_554)) { do { uVar7 = Random(); spawned = ((Game *)(g_game))->Game::Spawn(1000,0x44,&g_vectorOne,&g_vectorZero,(Entity *)0x0,0,uVar7) @@ -7764,31 +7764,31 @@ LAB_007f5b02: if (((pGStack_560 == (Game *)0x3) || (pGStack_560 == (Game *)0x4)) || ((pGStack_560 == (Game *)0x7 || ((pGStack_560 == (Game *)0x8 || (pGStack_560 == (Game *)0x9)))))) { - uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt((uint)local_544); + uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt(GHIDRA_UINT(local_544)); uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt(uVar7 + 1); pGVar14 = (Game *)(uVar7 >> ((byte)ppvStack_55c & 0x1f)); pGStack_554 = pGVar14; - if ((pGVar22 == (Game *)0x9) && (pGStack_554 = (Game *)&DAT_00000005, 5 < (int)pGVar14)) { + if ((pGVar22 == (Game *)0x9) && (pGStack_554 = (Game *)&DAT_00000005, 5 < GHIDRA_INT(pGVar14))) { pGStack_554 = pGVar14; } - if (0 < (int)pGStack_554) { + if (0 < GHIDRA_INT(pGStack_554)) { do { iVar17 = 0; do { uVar7 = Random(); VStack_574.y = ((currentRoom->_bottomRightPos).y - (currentRoom->_topLeftPos).y) * - (float)((double)(int)uVar7 + - __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * 2.3283064e-10 + (float)((double)GHIDRA_INT(uVar7) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 + (currentRoom->_topLeftPos).y; uVar7 = Random(); effect63Pos.y = VStack_574.y; effect63Pos.x = ((currentRoom->_bottomRightPos).x - (currentRoom->_topLeftPos).x) * - (float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 + (currentRoom->_topLeftPos).x; pGVar21 = (Game *)((VStack_574.y - 120.0) / 40.0 + 0.5); - iVar18 = (int)(float)pGVar21; - iVar8 = (int)((effect63Pos.x - 40.0) / 40.0 + 0.5); + iVar18 = GHIDRA_INT((float)pGVar21); + iVar8 = GHIDRA_INT(((effect63Pos.x - 40.0) / 40.0 + 0.5)); if ((((iVar8 < 0) || (currentRoom->_gridWidth <= iVar8)) || (iVar18 < 0)) || (currentRoom->_gridHeight <= iVar18)) { iVar8 = -1; @@ -7814,23 +7814,23 @@ LAB_007f5b02: } if (pGVar22 == (Game *)0xa) { if (local_540[0] == (Game *)0x0) { - uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt((uint)local_544); + uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt(GHIDRA_UINT(local_544)); uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt(uVar7 + 1); local_544 = (Game *)(uVar7 >> ((byte)ppvStack_55c & 0x1f)); - if (0 < (int)local_544) { + if (0 < GHIDRA_INT(local_544)) { do { iVar17 = 10; do { uVar7 = Random(); pGStack_554 = (Game *)(((currentRoom->_bottomRightPos).y - (currentRoom->_topLeftPos).y) * - (float)((double)(int)uVar7 + - __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar7) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 + (currentRoom->_topLeftPos).y); uVar7 = Random(); effect63PosB.x = ((currentRoom->_bottomRightPos).x - (currentRoom->_topLeftPos).x) * - (float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283064e-10 + (currentRoom->_topLeftPos).x; effect63PosB.y = (float)pGStack_554; pGVar21 = pGStack_554; @@ -7856,21 +7856,21 @@ LAB_007f64de: } else { if (((pGVar22 == (Game *)0x3) || (pGVar22 == (Game *)0x5)) || (pGVar22 == (Game *)0x6)) { - uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt((uint)local_544); + uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt(GHIDRA_UINT(local_544)); uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt(uVar7 + 1); uVar7 = uVar7 >> ((byte)ppvStack_55c & 0x1f); - if (0 < (int)uVar7) { + if (0 < GHIDRA_INT(uVar7)) { do { uVar20 = Random(); local_544 = (Game *)(((currentRoom->_bottomRightPos).y - (currentRoom->_topLeftPos).y) * - (float)((double)(int)uVar20 + - __uint_to_double_fixup[-((int)uVar20 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar20) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar20) >> 0x1f)]) * 2.3283064e-10 + (currentRoom->_topLeftPos).y); uVar20 = Random(); effect64Pos.x = ((currentRoom->_bottomRightPos).x - (currentRoom->_topLeftPos).x) * - (float)((double)(int)uVar20 + __uint_to_double_fixup[-((int)uVar20 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar20) + __uint_to_double_fixup[-(GHIDRA_INT(uVar20) >> 0x1f)]) * 2.3283064e-10 + (currentRoom->_topLeftPos).x; effect64Pos.y = (float)local_544; pGVar21 = local_544; @@ -7886,21 +7886,21 @@ LAB_007f64de: if ((pGVar22 != (Game *)0xb) || (local_540[0] != (Game *)0x0)) goto LAB_007f64de; LAB_007f6518: if ((*(uint *)((char *)currentRoom->_descriptor + 0x44) >> 9 & 1) == 0) { - uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt((int)fStack_58c * 0x14 + 0x32); + uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt(GHIDRA_INT(fStack_58c) * 0x14 + 0x32); uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt(uVar7 + 1); uVar7 = uVar7 >> ((byte)ppvStack_55c & 0x1f); - if (0 < (int)uVar7) { + if (0 < GHIDRA_INT(uVar7)) { do { uVar20 = Random(); local_544 = (Game *)(((currentRoom->_bottomRightPos).y - (currentRoom->_topLeftPos).y) * - (float)((double)(int)uVar20 + - __uint_to_double_fixup[-((int)uVar20 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar20) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar20) >> 0x1f)]) * 2.3283064e-10 + (currentRoom->_topLeftPos).y); uVar20 = Random(); effect65PosB.x = ((currentRoom->_bottomRightPos).x - (currentRoom->_topLeftPos).x) * - (float)((double)(int)uVar20 + __uint_to_double_fixup[-((int)uVar20 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar20) + __uint_to_double_fixup[-(GHIDRA_INT(uVar20) >> 0x1f)]) * 2.3283064e-10 + (currentRoom->_topLeftPos).x; effect65PosB.y = (float)local_544; pGVar21 = local_544; @@ -7922,32 +7922,32 @@ LAB_007f6518: return; } ambientRng._seed = - (uint)ambientRng._seed >> ((byte)ambientRng._shift1 & 0x1f) ^ ambientRng._seed; + GHIDRA_UINT(ambientRng._seed) >> ((byte)ambientRng._shift1 & 0x1f) ^ ambientRng._seed; ambientRng._seed = ambientRng._seed << ((byte)ambientRng._shift2 & 0x1f) ^ ambientRng._seed; ambientRng._seed = - (uint)ambientRng._seed >> ((byte)ambientRng._shift3 & 0x1f) ^ ambientRng._seed; - uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt((uint)ambientRng._seed % 0xf + 1); + GHIDRA_UINT(ambientRng._seed) >> ((byte)ambientRng._shift3 & 0x1f) ^ ambientRng._seed; + uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt(GHIDRA_UINT(ambientRng._seed) % 0xf + 1); uVar7 = uVar7 >> ((byte)ppvStack_55c & 0x1f); - if (0 < (int)uVar7) { + if (0 < GHIDRA_INT(uVar7)) { do { uVar20 = Random(); local_544 = (Game *)(((currentRoom->_bottomRightPos).y - (currentRoom->_topLeftPos).y) - * (float)((double)(int)uVar20 + - __uint_to_double_fixup[-((int)uVar20 >> 0x1f)]) * + * (float)((double)GHIDRA_INT(uVar20) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar20) >> 0x1f)]) * 2.3283064e-10 + (currentRoom->_topLeftPos).y); uVar20 = Random(); effect158Pos.x = ((currentRoom->_bottomRightPos).x - (currentRoom->_topLeftPos).x) * - (float)((double)(int)uVar20 + __uint_to_double_fixup[-((int)uVar20 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar20) + __uint_to_double_fixup[-(GHIDRA_INT(uVar20) >> 0x1f)]) * 2.3283064e-10 + (currentRoom->_topLeftPos).x; effect158Pos.y = (float)local_544; pGVar21 = local_544; bVar5 = IsPositionInRoom(currentRoom,&effect158Pos,0.0); if (bVar5 != 0) { - iVar8 = (int)((effect158Pos.x - 40.0) / 40.0 + 0.5); + iVar8 = GHIDRA_INT(((effect158Pos.x - 40.0) / 40.0 + 0.5)); pGVar21 = (Game *)((effect158Pos.y - 120.0) / 40.0 + 0.5); - iVar17 = (int)(float)pGVar21; + iVar17 = GHIDRA_INT((float)pGVar21); if ((((iVar8 < 0) || (currentRoom->_gridWidth <= iVar8)) || (iVar17 < 0)) || (currentRoom->_gridHeight <= iVar17)) { iVar8 = -1; @@ -7956,7 +7956,7 @@ LAB_007f6518: iVar8 = iVar17 * currentRoom->_gridWidth + iVar8; } uVar20 = GetGridCollision(currentRoom,iVar8); - if ((int)uVar20 < 2) { + if (GHIDRA_INT(uVar20) < 2) { uVar20 = Random(); spawned = ((Game *)(g_game))->Game::Spawn(1000,0x9e,&effect158Pos,&g_vectorZero,(Entity *)0x0,0 ,uVar20); @@ -7973,14 +7973,14 @@ LAB_007f6518: return; } ambientRng._seed = - (uint)ambientRng._seed >> ((byte)ambientRng._shift1 & 0x1f) ^ ambientRng._seed; + GHIDRA_UINT(ambientRng._seed) >> ((byte)ambientRng._shift1 & 0x1f) ^ ambientRng._seed; ambientRng._seed = ambientRng._seed << ((byte)ambientRng._shift2 & 0x1f) ^ ambientRng._seed; ambientRng._seed = - (uint)ambientRng._seed >> ((byte)ambientRng._shift3 & 0x1f) ^ ambientRng._seed; + GHIDRA_UINT(ambientRng._seed) >> ((byte)ambientRng._shift3 & 0x1f) ^ ambientRng._seed; uVar7 = ((RNG *)(&ambientRng))->RNG::RandomInt((ambientRng._seed & 3U) + 1); uVar7 = uVar7 >> ((byte)ppvStack_55c & 0x1f); - if (0 < (int)uVar7) { + if (0 < GHIDRA_INT(uVar7)) { do { uVar20 = Random(); spawned = ((Game *)(g_game))->Game::Spawn(1000,0x9f,&g_vectorZero,&g_vectorZero,(Entity *)0x0,0, @@ -8014,7 +8014,7 @@ LAB_007f68b5: } LAB_007f6941: if (pGVar22->_isRestoringGlowingHourglassState == 0) { - piVar19 = (int *)((int)currentRoom->_descriptor + 0x40); + piVar19 = (int *)(GHIDRA_INT(currentRoom->_descriptor) + 0x40); *piVar19 = *piVar19 + 1; local_544 = (Game *)&pGVar22->_scoreSheet; textData = currentRoom->_descriptor; @@ -8027,10 +8027,10 @@ LAB_007f6941: ((ScoreSheet *)local_544,pGVar22->_stage,pGVar22->_stageType,bVar5); if (0.0 < (float)pGVar21) { scoreRoomType = currentRoom->_roomType; - scoreFlag = CONCAT31(scoreFlag._1_3_,(char)pGStack_554); + scoreFlag = CONCAT31((*(undefined1 *)((char *)&(scoreFlag) + 0x1)),(char)pGStack_554); scoreValue = pGVar21; local_544 = (Game *)FUN_009e6740(pGStack_54c); - if (0 < (int)local_544) { + if (0 < GHIDRA_INT(local_544)) { do { piVar19 = (int *)pGVar14->_roomList[0].DecorationSeed; if (piVar19 == (int *)pGVar14->_roomList[0].SpawnSeed) { @@ -8039,7 +8039,7 @@ LAB_007f6941: else { *piVar19 = scoreRoomType; piVar19[1] = scoreFlag; - piVar19[2] = (int)scoreValue; + piVar19[2] = GHIDRA_INT(scoreValue); piVar19 = &pGVar14->_roomList[0].DecorationSeed; *piVar19 = *piVar19 + 0xc; } @@ -8059,7 +8059,7 @@ LAB_007f6941: effect87Pos.y = spawnPos->y - 100.0; spawned = ((Game *)(g_game))->Game::Spawn(1000,0x57,&effect87Pos,&g_vectorZero,(Entity *)0x0,0,uVar7); spawned->Update(); - local_540[0] = (Game *)((int)local_540[0] + -1); + local_540[0] = (Game *)(GHIDRA_INT(local_540[0]) + -1); } while (local_540[0] != (Game *)0x0); } pGVar21 = g_game; @@ -8071,7 +8071,7 @@ LAB_007f6941: if ((((iVar17 < 1) && (currentRoom->_roomClearDelay == 0)) && ((*(byte *)((char *)currentRoom->_descriptor + 0x44) & 1) == 0)) && (*(int *)&g_game->_deathmatchManager < 2)) { - puVar24 = (uint *)((int)currentRoom->_descriptor + 0x44); + puVar24 = (uint *)(GHIDRA_INT(currentRoom->_descriptor) + 0x44); *puVar24 = *puVar24 | 1; } textData = currentRoom->_descriptor; @@ -8083,12 +8083,12 @@ LAB_007f6941: uStack_14 = 7; uVar7 = roomConfig->Subtype; if (uVar7 < 0x10) { - if (*(int *)((int)(pGVar21->_itemPool)._pools + uVar7 * 0x1c + -0x1c0) == 0) { + if (*(int *)(GHIDRA_INT((pGVar21->_itemPool)._pools) + uVar7 * 0x1c + -0x1c0) == 0) { pbVar25 = &s_empty; } else { - piVar19 = (int *)((int)(pGVar21->_itemPool)._pools + uVar7 * 0x1c + -0x1d0); - if (0xf < *(uint *)((int)(pGVar21->_itemPool)._pools + uVar7 * 0x1c + -0x1bc)) { + piVar19 = (int *)(GHIDRA_INT((pGVar21->_itemPool)._pools) + uVar7 * 0x1c + -0x1d0); + if (0xf < *(uint *)(GHIDRA_INT((pGVar21->_itemPool)._pools) + uVar7 * 0x1c + -0x1bc)) { piVar19 = (int *)*piVar19; } pbVar25 = (byte *)FUN_00958840(&g_manager->_stringTable,"Minibosses", @@ -8105,19 +8105,19 @@ LAB_007f6941: minibossName._capacity = 0xf; ((std::string *)(minibossName._buf))->std::string::assign(&s_empty,0); } - uStack_14._0_1_ = 8; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 8; pbVar25 = string_table_translate(&g_manager->_stringTable,&DAT_00b6c580); ((std::string *)(versusText._buf))->std::string::string_from_cstr(pbVar25); - uStack_14._0_1_ = 9; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 9; playerName = &versusText; if ((versusText._capacity < 0x10) || - (playerName = (std_string *)versusText._buf._0_4_, versusText._buf._0_4_ != 0)) { + (playerName = (*(undefined4 *)((char *)&((std_string *)versusText._buf) + 0x0)), (*(undefined4 *)((char *)&(versusText._buf) + 0x0)) != 0)) { nameCursor = playerName; do { pcVar16 = nameCursor->_buf; nameCursor = (std_string *)(nameCursor->_buf + 1); } while (*pcVar16 != 0); - iVar17 = (int)nameCursor - (int)(playerName->_buf + 1); + iVar17 = GHIDRA_INT(nameCursor) - GHIDRA_INT((playerName->_buf + 1)); } else { iVar17 = 0; @@ -8125,13 +8125,13 @@ LAB_007f6941: text_convert_encoding((byte *)playerName,iVar17,0,versusWide,0x20,1); playerName = &minibossName; if ((minibossName._capacity < 0x10) || - (playerName = (std_string *)minibossName._buf._0_4_, minibossName._buf._0_4_ != 0)) { + (playerName = (*(undefined4 *)((char *)&((std_string *)minibossName._buf) + 0x0)), (*(undefined4 *)((char *)&(minibossName._buf) + 0x0)) != 0)) { nameCursor = playerName; do { pcVar16 = nameCursor->_buf; nameCursor = (std_string *)(nameCursor->_buf + 1); } while (*pcVar16 != 0); - iVar17 = (int)nameCursor - (int)(playerName->_buf + 1); + iVar17 = GHIDRA_INT(nameCursor) - GHIDRA_INT((playerName->_buf + 1)); } else { iVar17 = 0; @@ -8156,25 +8156,25 @@ LAB_007f6941: pcVar16 = nameCursor->_buf; nameCursor = (std_string *)(nameCursor->_buf + 1); } while (*pcVar16 != '\0'); - iVar17 = (int)nameCursor - (int)(playerName->_buf + 1); + iVar17 = GHIDRA_INT(nameCursor) - GHIDRA_INT((playerName->_buf + 1)); } text_convert_encoding((byte *)playerName,iVar17,0,soloPlayerNameWide,0x40,1); local_544 = (Game *)FUN_00828050(minibossNameWide); - uStack_14._0_1_ = 0x16; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 0x16; local_540[0] = (Game *)FUN_00828050(&DAT_00b6c57c); - uStack_14._0_1_ = 0x17; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 0x17; uVar11 = FUN_00828050(versusWide); - uStack_14._0_1_ = 0x18; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 0x18; separatorSegment = FUN_00828050(&DAT_00b6c57c); - uStack_14._0_1_ = 0x19; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 0x19; nameSegment = FUN_00828050(soloPlayerNameWide); - uStack_14._0_1_ = 0x1a; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 0x1a; FUN_008284d0(local_540[0],nameSegment,separatorSegment); - uStack_14._0_1_ = 0x1b; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 0x1b; FUN_008284d0(local_540[0],auStack_41c,uVar11); - uStack_14._0_1_ = 0x1c; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 0x1c; FUN_008284d0(local_540[0],auStack_38c,local_540[0]); - uStack_14 = CONCAT31(uStack_14._1_3_,0x1d); + uStack_14 = CONCAT31((*(undefined1 *)((char *)&(uStack_14) + 0x1)),0x1d); FUN_008284d0(local_540[0],auStack_35c,local_544); bVar5 = 0xcb; FUN_00828010(auStack_344); @@ -8202,11 +8202,11 @@ LAB_007f6941: pcVar16 = nameCursor->_buf; nameCursor = (std_string *)(nameCursor->_buf + 1); } while (*pcVar16 != '\0'); - iVar17 = (int)nameCursor - (int)(playerName->_buf + 1); + iVar17 = GHIDRA_INT(nameCursor) - GHIDRA_INT((playerName->_buf + 1)); } text_convert_encoding((byte *)playerName,iVar17,0,playerNameWide,0x40,1); player = ((Game *)(g_game))->Game::GetPlayer(0); - pbVar25 = (byte *)((int)player->_twinPlayer + 0x13c4); + pbVar25 = (byte *)(GHIDRA_INT(player->_twinPlayer) + 0x13c4); if (0xf < *(uint *)((char *)player->_twinPlayer + 0x13d8)) { pbVar25 = *(byte **)pbVar25; } @@ -8219,33 +8219,33 @@ LAB_007f6941: bVar5 = *charCursor; charCursor = charCursor + 1; } while (bVar5 != 0); - iVar17 = (int)charCursor - (int)(pbVar25 + 1); + iVar17 = GHIDRA_INT(charCursor) - GHIDRA_INT((pbVar25 + 1)); } text_convert_encoding(pbVar25,iVar17,0,twinNameWide,0x40,1); pGStack_54c = (Game *)FUN_00828050(minibossNameWide); - uStack_14._0_1_ = 10; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 10; pGStack_554 = (Game *)FUN_00828050(&DAT_00b6c57c); - uStack_14._0_1_ = 0xb; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 0xb; local_544 = (Game *)FUN_00828050(versusWide); - uStack_14._0_1_ = 0xc; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 0xc; local_540[0] = (Game *)FUN_00828050(&DAT_00b6c57c); - uStack_14._0_1_ = 0xd; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 0xd; uVar11 = FUN_00828050(twinNameWide); - uStack_14._0_1_ = 0xe; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 0xe; separatorSegment = FUN_00828050(&DAT_00b6c518); - uStack_14._0_1_ = 0xf; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 0xf; nameSegment = FUN_00828050(playerNameWide); - uStack_14._0_1_ = 0x10; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 0x10; FUN_008284d0(local_540[0],nameSegment,separatorSegment); - uStack_14._0_1_ = 0x11; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 0x11; FUN_008284d0(local_540[0],auStack_3a4,uVar11); - uStack_14._0_1_ = 0x12; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 0x12; FUN_008284d0(local_540[0],auStack_374,local_540[0]); - uStack_14._0_1_ = 0x13; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 0x13; FUN_008284d0(local_540[0],auStack_3bc,local_544); - uStack_14._0_1_ = 0x14; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 0x14; FUN_008284d0(local_540[0],auStack_3d4,pGStack_554); - uStack_14 = CONCAT31(uStack_14._1_3_,0x15); + uStack_14 = CONCAT31((*(undefined1 *)((char *)&(uStack_14) + 0x1)),0x15); FUN_008284d0(local_540[0],auStack_3ec,pGStack_54c); bVar5 = 0xf5; FUN_00828010(auStack_404); @@ -8262,7 +8262,7 @@ LAB_007f6941: FUN_00828ab0(); FUN_00828ab0(); } - uStack_14._0_1_ = 9; + (*(undefined1 *)((char *)&(uStack_14) + 0x0)) = 9; bVar15 = 0x32; FUN_00828ab0(); title = (wchar_t *******)titleText; @@ -8271,14 +8271,14 @@ LAB_007f6941: } HUD::ShowStackedItemTextCustomUTF16(&g_game->_hud,(wchar_t *)title,L"",bVar5,bVar15); ((std::string *)(versusText._buf))->std::string::_Tidy_deallocate(); - uStack_14 = CONCAT31(uStack_14._1_3_,7); + uStack_14 = CONCAT31((*(undefined1 *)((char *)&(uStack_14) + 0x1)),7); if (0xf < minibossName._capacity) { uVar7 = minibossName._capacity + 1; - textData = (void *)minibossName._buf._0_4_; + textData = (*(undefined4 *)((char *)&((void *)minibossName._buf) + 0x0)); if (0xfff < uVar7) { - textData = *(void **)(minibossName._buf._0_4_ + -4); + textData = *(void **)((*(undefined4 *)((char *)&(minibossName._buf) + 0x0)) + -4); uVar7 = minibossName._capacity + 0x24; - if (0x1f < (minibossName._buf._0_4_ - (int)textData) - 4U) { + if (0x1f < ((*(undefined4 *)((char *)&(minibossName._buf) + 0x0)) - GHIDRA_INT(textData)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -8288,7 +8288,7 @@ LAB_007f6941: uStack_14 = 0xffffffff; minibossName._size = 0; minibossName._capacity = 0xf; - minibossName._buf._0_4_ = minibossName._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(minibossName._buf) + 0x0)) = (*(undefined4 *)((char *)&(minibossName._buf) + 0x0)) & 0xffffff00; if (7 < titleCapacity) { FUN_00828a70(titleText[0],titleCapacity + 1); } @@ -8465,7 +8465,7 @@ LAB_007f760e: local_540[0] = g_luaEngine; lua_gc(*(undefined4 *)((char *)g_luaEngine + 0x18),2,0); lua_gc(*(undefined4 *)((char *)textData + 0x18),4,0); - lua_gc((int)*(qword *)((int)local_540[0] + 0x18),3,0); + lua_gc(GHIDRA_INT(*(qword *)(GHIDRA_INT(local_540[0]) + 0x18)),3,0); KAGE_LogMessage(1,(byte *)"Lua mem usage: %d KB and %d bytes\n"); if (((room->_bossId == 0x3e) && (g_game->_difficulty == 3)) && ((*(byte *)((char *)room->_descriptor + 0x44) & 1) != 0)) { @@ -8494,7 +8494,7 @@ LAB_007f760e: playerManager = &g_game->_playerManager; (manager->_musicManager)._targetPitch = fVar26; uVar7 = 0; - if ((int)(pGVar21->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin + if (GHIDRA_INT((pGVar21->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { player = ((PlayerManager *)(playerManager))->PlayerManager::GetPlayer(uVar7); @@ -8502,24 +8502,24 @@ LAB_007f760e: local_540[0] = (Game *)((PlayerManager *)(&g_game->_playerManager))->PlayerManager::GetPlayer(uVar7); player = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::GetPlayer(uVar7); textData = (player->_pillRNGs)._end; - if ((int)((int)textData - (int)(player->_pillRNGs)._begin & 0xfffffff0U) < 0x2a1) { + if (GHIDRA_INT((GHIDRA_INT(textData) - GHIDRA_INT((player->_pillRNGs)._begin) & 0xfffffff0U)) < 0x2a1) { KAGE_LogMessage(0x10,(byte *)"Pill ID out of bounds!\n"); textData = (player->_pillRNGs)._end; } pillRngs = (player->_pillRNGs)._begin; - uVar20 = ((int)textData - (int)pillRngs >> 4) - 1; + uVar20 = (GHIDRA_INT(textData) - GHIDRA_INT(pillRngs) >> 4) - 1; if (0x2a < uVar20) { uVar20 = 0x2a; } - uVar20 = ((RNG *)((RNG *)((int)pillRngs + uVar20 * 0x10)))->RNG::RandomInt(2); - *(uint *)((int)local_540[0] + 0x18e8) = (uVar20 + 2) * 900; + uVar20 = ((RNG *)((RNG *)(GHIDRA_INT(pillRngs) + uVar20 * 0x10)))->RNG::RandomInt(2); + *(uint *)(GHIDRA_INT(local_540[0]) + 0x18e8) = (uVar20 + 2) * 900; player = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::GetPlayer(uVar7); ((TemporaryEffects *)(&player->_temporaryeffects))->TemporaryEffects::AddCollectibleEffect(0x1c,0,1); } uVar7 = uVar7 + 1; playerManager = &g_game->_playerManager; - } while (uVar7 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar7 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } ExceptionList = local_1c; @@ -8534,7 +8534,7 @@ Vector * Room::GetDoorSlotPosition(Vector *outPosition, int doorSlot) float zeroY; zeroY = g_vectorZero.y; - if ((uint)doorSlot < 8) { + if (GHIDRA_UINT(doorSlot) < 8) { gridIndex = this->_doorGridPositions[doorSlot]; gridWidth = this->_gridWidth; outPosition->x = (float)(gridIndex % gridWidth) * 40.0 + 40.0; @@ -8659,7 +8659,7 @@ LAB_007f7b57: bVar5 = (*pcVar2)(); return bVar5; } - preventedCurses = (uint)local_2c >> 2 ^ (uint)local_2c; + preventedCurses = GHIDRA_UINT(local_2c) >> 2 ^ GHIDRA_UINT(local_2c); local_1c = 0.0; preventedCurses = preventedCurses << 9 ^ preventedCurses; local_2c = *(float *)((char *)local_20 + 0x10); @@ -8669,25 +8669,25 @@ LAB_007f7b57: uVar9 = 1 << ((byte)preventedCurses & 0x1f); if ((((*(uint *)((char *)local_2c + 0x38 + (preventedCurses >> 5) * 4) & uVar9) == 0) || (local_18->_doors[preventedCurses] != (void *)0x0)) || - (fVar6 = (float)((uint)fVar6 | 1), + (fVar6 = (float)(GHIDRA_UINT(fVar6) | 1), (*(uint *)((char *)local_20 + (preventedCurses >> 5) * 4 + 0x18) & uVar9) != 0)) { bVar3 = false; } else { bVar3 = true; } - if (((uint)fVar6 & 1) != 0) { + if ((GHIDRA_UINT(fVar6) & 1) != 0) { fVar6 = 0.0; } if (bVar3) break; preventedCurses = preventedCurses + 1 & 0x80000007; - if ((int)preventedCurses < 0) { + if (GHIDRA_INT(preventedCurses) < 0) { preventedCurses = (preventedCurses - 1 | 0xfffffff8) + 1; } - local_1c = (float)((int)local_1c + 1); - } while ((int)local_1c < 8); - if (-1 < (int)preventedCurses) { - local_30 = ((Level *)((Level *)g_game))->Level::get_secret_exit_room((int)local_30); + local_1c = (float)(GHIDRA_INT(local_1c) + 1); + } while (GHIDRA_INT(local_1c) < 8); + if (-1 < GHIDRA_INT(preventedCurses)) { + local_30 = ((Level *)((Level *)g_game))->Level::get_secret_exit_room(GHIDRA_INT(local_30)); doorEntity = pRVar4->_doors[preventedCurses]; local_18 = (Room *)(pRVar4->_doors + preventedCurses); if (doorEntity == (void *)0x0) { @@ -8721,7 +8721,7 @@ LAB_007f7b57: } if (isAnimate != 0) { preventedCurses = preventedCurses & 0x80000003; - if ((int)preventedCurses < 0) { + if (GHIDRA_INT(preventedCurses) < 0) { preventedCurses = (preventedCurses - 1 | 0xfffffffc) + 1; } doorDir = Isaac::GetAxisAlignedUnitVectorFromDir((Vector *)(local_4c + 4),preventedCurses); @@ -8733,29 +8733,29 @@ LAB_007f7b57: perpDirY = local_1c * fVar6 + (float)local_20 * (float)local_34; preventedCurses = Random(); iVar7 = *(int *)((char *)g_game->_room + 0xc); - local_28 = (float)(*(int *)((int)*(void **)local_18 + 0x24) % iVar7) * 40.0 + 40.0; - local_2c = (float)(*(int *)((int)*(void **)local_18 + 0x24) / iVar7) * 40.0 + 120.0; + local_28 = (float)(*(int *)(GHIDRA_INT(*(void **))local_18 + 0x24) % iVar7) * 40.0 + 40.0; + local_2c = (float)(*(int *)(GHIDRA_INT(*(void **))local_18 + 0x24) / iVar7) * 40.0 + 120.0; for (iVar7 = (preventedCurses & 3) + 5; iVar7 != 0; iVar7 = iVar7 + -1) { preventedCurses = Random(); uVar9 = Random(); local_34 = (ChallengeParam *) - ((float)((double)(int)uVar9 + __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) + ((float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283064e-10); uVar9 = Random(); - fVar6 = (float)((double)(int)uVar9 + __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) * + fVar6 = (float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283064e-10; fVar6 = (fVar6 + fVar6) - 1.0; particleVelocity.x = (float)local_34 * local_1c * 5.0 + (float)local_30 * fVar6; particleVelocity.y = (float)local_34 * (float)local_20 * 5.0 + perpDirY * fVar6; uVar9 = Random(); - fVar6 = (float)((double)(int)uVar9 + __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) * + fVar6 = (float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_18 = (Room *)(fVar6 + fVar6); uVar9 = Random(); - local_24 = (float)((double)(int)uVar9 + __uint_to_double_fixup[-((int)uVar9 >> 0x1f)]) * + local_24 = (float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) * 2.3283064e-10; fVar6 = cos((float)local_18); - local_4c._4_4_ = fVar6 * local_24 * 20.0 + local_28; + (*(undefined4 *)((char *)&(local_4c) + 0x4)) = fVar6 * local_24 * 20.0 + local_28; fVar6 = sin((float)local_18); local_44 = fVar6 * local_24 * 20.0 + local_2c; particle = ((Game *)(g_game))->Game::Spawn(1000,0x3b,(Vector *)(local_4c + 4),&particleVelocity, @@ -8763,7 +8763,7 @@ LAB_007f7b57: local_34 = (ChallengeParam *)(particle->_pos).x; local_24 = (particle->_pos).y; preventedCurses = Random(); - if (((float)((double)(int)preventedCurses + __uint_to_double_fixup[-((int)preventedCurses >> 0x1f)]) * + if (((float)((double)GHIDRA_INT(preventedCurses) + __uint_to_double_fixup[-(GHIDRA_INT(preventedCurses) >> 0x1f)]) * 2.3283064e-10 * 10.0 + 2.0) * (float)(((float)local_34 - local_28) * local_1c + (local_24 - local_2c) * (float)local_20 < 0.0) == 0.0) { @@ -8788,7 +8788,7 @@ LAB_007f7b57: else if (door->_doors[1] == (void *)0x0) { MakeDoor(door,1); currentRoomDesc = ((Level *)((Level *)g_game))->Level::get_secret_exit_room(3); - *(undefined4 *)((int)door->_doors[1] + 0x394) = 0xfffffff6; + *(undefined4 *)(GHIDRA_INT(door->_doors[1]) + 0x394) = 0xfffffff6; GridEntity_Door::SetRoomTypes (door->_doors[1],*(int *)(*(int *)((char *)door->_descriptor + 0x10) + 8), *(int *)((char *)currentRoomDesc->Data + 8)); @@ -8847,8 +8847,8 @@ LAB_007f8201: } if (*(int *)this->_descriptor < 0) { uVar1 = Random(); - spawnPos.x = (float)((int)index % this->_gridWidth) * 40.0 + 40.0; - spawnPos.y = (float)((int)index / this->_gridWidth) * 40.0 + 120.0; + spawnPos.x = (float)(GHIDRA_INT(index) % this->_gridWidth) * 40.0 + 40.0; + spawnPos.y = (float)(GHIDRA_INT(index) / this->_gridWidth) * 40.0 + 120.0; ((Game *)(g_game))->Game::SpawnEx(1000,0x9c,&spawnPos,&g_vectorZero,(Entity *)0x0,0,uVar1,0); } else { @@ -8856,12 +8856,12 @@ LAB_007f8201: seed_fart_sound_override((int *)&isForce); ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(_isForce,1.0,2,0,1.0,0.0); _isForce = Random(); - if (((int)index < 0) || (0x1bf < (int)index)) { + if ((GHIDRA_INT(index) < 0) || (0x1bf < GHIDRA_INT(index))) { KAGE_LogMessage(0x10,(byte *)"SpawnGridEntity: Grid index invalid\n"); } if (index < 0x1c0) { uVar1 = GetGridCollision(this,index); - if ((int)uVar1 < 1) { + if (GHIDRA_INT(uVar1) < 1) { stairs = operator_new(0x154); local_8 = 0x11; spawnPos.y = (float)stairs; @@ -8947,7 +8947,7 @@ byte Room::TrySpawnDevilRoomDoor(byte isAnimate, byte isForce) local_14 = 0xffffffff; puStack_18 = &LAB_00b01315; local_1c = ExceptionList; - uVar4 = __security_cookie ^ (uint)(local_84 + 0x74); + uVar4 = __security_cookie ^ GHIDRA_UINT((local_84 + 0x74)); ExceptionList = &local_1c; savedRoom = this; local_24 = uVar4; @@ -8979,11 +8979,11 @@ byte Room::TrySpawnDevilRoomDoor(byte isAnimate, byte isForce) bVar3 = (*pcVar1)(); return bVar3; } - devilRollSeed = (uint)local_28 >> 2 ^ (uint)local_28; + devilRollSeed = GHIDRA_UINT(local_28) >> 2 ^ GHIDRA_UINT(local_28); devilRollSeed = devilRollSeed << 0x15 ^ devilRollSeed; devilRollSeed = devilRollSeed >> 9 ^ devilRollSeed; if (((float)local_48 <= - (float)((double)(int)devilRollSeed + __uint_to_double_fixup[-((int)devilRollSeed >> 0x1f)]) + (float)((double)GHIDRA_INT(devilRollSeed) + __uint_to_double_fixup[-(GHIDRA_INT(devilRollSeed) >> 0x1f)]) * 2.3283062e-10) && ((float)local_48 < 1.0)) { g_game->_devilRoomDisabled = 1; ExceptionList = local_1c; @@ -9004,13 +9004,13 @@ byte Room::TrySpawnDevilRoomDoor(byte isAnimate, byte isForce) _Init_thread_footer(&g_invalidRoomDescriptorGuard); } roomDesc = &g_roomDescriptorDummy; - if ((uint)game->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(game->_currentDimensionIdx) < 3) { roomDesc = game->_roomList + 0x1fb; } if (roomDesc->Data == (void *)0x0) { - local_84._4_4_ = 2; - local_84._8_4_ = 5; - local_84._0_4_ = *(int *)((char *)this->_descriptor + 0x58); + (*(undefined4 *)((char *)&(local_84) + 0x4)) = 2; + (*(undefined4 *)((char *)&(local_84) + 0x8)) = 5; + (*(undefined4 *)((char *)&(local_84) + 0x0)) = *(int *)((char *)this->_descriptor + 0x58); local_78 = 0x15; local_28 = (float)((RNG *)((RNG *)local_84))->RNG::RandomInt(8); local_58 = 0; @@ -9018,34 +9018,34 @@ byte Room::TrySpawnDevilRoomDoor(byte isAnimate, byte isForce) local_14 = 1; std::vector::_Reallocate(4); local_2c = (void **)0x0; - piVar5 = local_58._4_4_; + piVar5 = (*(undefined4 *)((char *)&(local_58) + 0x4)); do { room = savedRoom; - local_48 = (undefined1 *)((int)local_28 + (int)local_2c & 0x80000007); - if ((int)local_48 < 0) { - local_48 = (undefined1 *)(((uint)(local_48 + -1) | 0xfffffff8) + 1); + local_48 = (undefined1 *)(GHIDRA_INT(local_28) + GHIDRA_INT(local_2c) & 0x80000007); + if (GHIDRA_INT(local_48) < 0) { + local_48 = (undefined1 *)((GHIDRA_UINT((local_48 + -1)) | 0xfffffff8) + 1); } local_3c = local_48; if (((*(uint *)(*(int *)((char *)savedRoom->_descriptor + 0x10) + 0x38 + - ((uint)local_48 >> 5) * 4) & 1 << ((byte)local_48 & 0x1f)) != 0) && - (savedRoom->_doors[(int)local_48] == (void *)0x0)) { + (GHIDRA_UINT(local_48) >> 5) * 4) & 1 << ((byte)local_48 & 0x1f)) != 0) && + (savedRoom->_doors[GHIDRA_INT(local_48)] == (void *)0x0)) { if (piVar5 == freeSlotsCapacity) { std::vector::_Emplace_reallocate(piVar5,&local_48); - piVar5 = local_58._4_4_; + piVar5 = (*(undefined4 *)((char *)&(local_58) + 0x4)); } else { - *piVar5 = (int)local_48; + *piVar5 = GHIDRA_INT(local_48); local_58 = CONCAT44(piVar5 + 1,(int *)local_58); piVar5 = piVar5 + 1; } } - local_2c = (void **)((int)local_2c + 1); - } while ((int)local_2c < 8); - if (1 < (uint)((int)piVar5 - (int)(int *)local_58 >> 2)) { + local_2c = (void **)(GHIDRA_INT(local_2c) + 1); + } while (GHIDRA_INT(local_2c) < 8); + if (1 < GHIDRA_UINT((GHIDRA_INT(piVar5) - GHIDRA_INT((int *)local_58) >> 2))) { RNG::Shuffle((RNG *)local_84,(int *)local_58,piVar5); local_40 = 0; do { - uVar4 = *(uint *)((int)(int *)local_58 + local_40 * 4); + uVar4 = *(uint *)(GHIDRA_INT((int *)local_58) + local_40 * 4); local_38 = room->_doors + uVar4; if (room->_doors[uVar4] == (void *)0x0) { MakeDoor(room,uVar4); @@ -9069,46 +9069,46 @@ LAB_007f86a4: isAngelDoorPlaced = '\x01'; } LAB_007f86ce: - ((GridEntity_Door *)(*local_38))->GridEntity_Door::SetRoomTypes(1,(int)TargetRoomType); - *(undefined4 *)((int)*local_38 + 0x394) = 0xffffffff; + ((GridEntity_Door *)(*local_38))->GridEntity_Door::SetRoomTypes(1,GHIDRA_INT(TargetRoomType)); + *(undefined4 *)(GHIDRA_INT(*local_38) + 0x394) = 0xffffffff; ((GridEntity_Door *)(*local_38))->GridEntity_Door::Open(); if (isAnimate != 0) { uVar4 = uVar4 & 0x80000003; - if ((int)uVar4 < 0) { + if (GHIDRA_INT(uVar4) < 0) { uVar4 = (uVar4 - 1 | 0xfffffffc) + 1; } doorDir = Isaac::GetAxisAlignedUnitVectorFromDir((Vector *)(local_84 + 8),uVar4); local_2c = (void **)-doorDir->x; - local_3c = (undefined1 *)((uint)doorDir->y ^ 0x80000000); + local_3c = (undefined1 *)(GHIDRA_UINT(doorDir->y) ^ 0x80000000); uVar4 = Random(); local_28 = 0.0; local_4c = (float)((uVar4 & 3) + 5); if (local_4c != 0.0) { - local_48 = (undefined1 *)((uint)local_2c ^ 0x80000000); + local_48 = (undefined1 *)(GHIDRA_UINT(local_2c) ^ 0x80000000); do { local_64 = Random(); uVar4 = Random(); local_44 = (undefined1 *) - ((float)((double)(int)uVar4 + - __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * 2.3283064e-10 * + ((float)((double)GHIDRA_INT(uVar4) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 5.0); uVar4 = Random(); - fVar8 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) + fVar8 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10; fVar8 = (fVar8 + fVar8) - 1.0; local_6c.x = fVar8 * (float)local_3c + (float)local_2c * (float)local_44; local_6c.y = fVar8 * (float)local_48 + (float)local_3c * (float)local_44; - iVar7 = *(int *)((int)*local_38 + 0x24); + iVar7 = *(int *)(GHIDRA_INT(*local_38) + 0x24); iVar6 = *(int *)((char *)g_game->_room + 0xc); uVar4 = Random(); - local_60 = (float)((double)(int)uVar4 + - __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * 2.3283064e-10 * + local_60 = (float)((double)GHIDRA_INT(uVar4) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_60 = local_60 + local_60; uVar4 = Random(); local_44 = (undefined1 *) - ((float)((double)(int)uVar4 + - __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * 2.3283064e-10 * + ((float)((double)GHIDRA_INT(uVar4) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 20.0); fVar8 = cos(local_60); local_74.x = fVar8 * (float)local_44 + (float)(iVar7 % iVar6) * 40.0 + 40.0; @@ -9120,31 +9120,31 @@ LAB_007f86ce: local_74.y = angleSin * (float)local_44 + (float)(iVar7 / iVar6) * 40.0 + 120.0; uVar9 = 0; dustEffect = ((Game *)(g_game))->Game::Spawn(1000,0x3b,&local_74,&local_6c,(Entity *)0x0, - (uint)(local_28 == 0.0),local_64); + GHIDRA_UINT((local_28 == 0.0)),local_64); piVar5 = (int *)__RTDynamicCast(dustEffect,uVar9,pTVar10,pTVar11,uVar12); local_44 = (undefined1 *)0x3f800000; iVar7 = *(int *)((char *)g_game->_room + 0xc); if (((float)piVar5[0xd0] - - ((float)(*(int *)((int)*local_38 + 0x24) / iVar7) * 40.0 + 120.0)) * + ((float)(*(int *)(GHIDRA_INT(*local_38) + 0x24) / iVar7) * 40.0 + 120.0)) * (float)local_48 + ((float)piVar5[0xcf] - - ((float)(*(int *)((int)*local_38 + 0x24) % iVar7) * 40.0 + 40.0)) * + ((float)(*(int *)(GHIDRA_INT(*local_38) + 0x24) % iVar7) * 40.0 + 40.0)) * (float)local_3c < 0.0) { local_44 = &DAT_bf800000; } uVar4 = Random(); piVar5[0x11d] = - (int)(((float)((double)(int)uVar4 + - __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * 2.3283064e-10 * - 10.0 + 2.0) * (float)local_44); + GHIDRA_INT((((float)((double)GHIDRA_INT(uVar4) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * + 10.0 + 2.0) * (float)local_44)); uVar4 = Random(); iVar7 = uVar4 % 10 + 0x1e; piVar5[0x117] = iVar7; piVar5[0x118] = iVar7; (**(code **)(*piVar5 + 0xc))(); - local_28 = (float)((int)fVar8 + 1); + local_28 = (float)(GHIDRA_INT(fVar8) + 1); room = savedRoom; - } while ((int)local_28 < (int)local_4c); + } while (GHIDRA_INT(local_28) < GHIDRA_INT(local_4c)); } } manager = g_manager; @@ -9153,11 +9153,11 @@ LAB_007f86ce: if (isAnimate != 0) { local_28 = 4.48416e-43; seed_fart_sound_override((int *)&local_28); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_28,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_28),1.0,2,0,1.0,0.0); manager = g_manager; local_28 = 3.22299e-44; seed_fart_sound_override((int *)&local_28); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_28,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_28),1.0,2,0,1.0,0.0); } if ((g_game->_stageType == 4) || (g_game->_stageType == 5)) { iVar7 = g_game->_stage + 1; @@ -9174,12 +9174,12 @@ LAB_007f86ce: } g_game->_lastDevilRoomStage = iVar6; if ((int *)local_58 != (void *)0x0) { - uVar4 = (int)freeSlotsCapacity - (int)(int *)local_58 & 0xfffffffc; + uVar4 = GHIDRA_INT(freeSlotsCapacity) - GHIDRA_INT((int *)local_58) & 0xfffffffc; ptr = (int *)local_58; if (0xfff < uVar4) { - ptr = *(void **)((int)(int *)local_58 + -4); + ptr = *(void **)(GHIDRA_INT((int *)local_58) + -4); uVar4 = uVar4 + 0x23; - if (0x1f < (uint)((int)(int *)local_58 + (-4 - (int)ptr))) goto LAB_007f8b59; + if (0x1f < GHIDRA_UINT((GHIDRA_INT((int *)local_58) + (-4 - GHIDRA_INT(ptr))))) goto LAB_007f8b59; } operator_delete(ptr,uVar4); } @@ -9188,12 +9188,12 @@ LAB_007f86ce: } local_14 = 0xffffffff; if ((int *)local_58 != (int *)0x0) { - uVar4 = (int)freeSlotsCapacity - (int)(int *)local_58 & 0xfffffffc; + uVar4 = GHIDRA_INT(freeSlotsCapacity) - GHIDRA_INT((int *)local_58) & 0xfffffffc; piVar5 = (int *)local_58; if (0xfff < uVar4) { piVar5 = (int *)((int *)local_58)[-1]; uVar4 = uVar4 + 0x23; - if (0x1f < (uint)((int)(int *)local_58 + (-4 - (int)piVar5))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT((int *)local_58) + (-4 - GHIDRA_INT(piVar5))))) { LAB_007f8b59: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -9218,7 +9218,7 @@ LAB_007f8b59: _Init_thread_footer(&g_invalidRoomDescriptorGuard); } flagsGame = g_game; - if ((uint)game->_currentDimensionIdx < 3) { + if (GHIDRA_UINT(game->_currentDimensionIdx) < 3) { roomDesc = game->_roomList + 0x1fb; } else { @@ -9226,9 +9226,9 @@ LAB_007f8b59: } local_2c = &roomDesc->Data; fVar8 = (float)g_game->_enterDoor; - if ((((g_game->_lastRoomIdx != -1) || ((int)fVar8 < 0)) || - ((*(uint *)(*(int *)((char *)savedRoom->_descriptor + 0x10) + 0x38 + ((uint)fVar8 >> 5) * 4) & - 1 << (SUB41(fVar8,0) & 0x1f)) == 0)) || (savedRoom->_doors[(int)fVar8] != (void *)0x0)) { + if ((((g_game->_lastRoomIdx != -1) || (GHIDRA_INT(fVar8) < 0)) || + ((*(uint *)(*(int *)((char *)savedRoom->_descriptor + 0x10) + 0x38 + (GHIDRA_UINT(fVar8) >> 5) * 4) & + 1 << (SUB41(fVar8,0) & 0x1f)) == 0)) || (savedRoom->_doors[GHIDRA_INT(fVar8)] != (void *)0x0)) { local_38 = savedRoom->_descriptor; local_4c = *(float *)((char *)local_38 + 0x58); local_58 = 0x500000002; @@ -9239,7 +9239,7 @@ LAB_007f8b59: bVar3 = (*pcVar1)(); return bVar3; } - uVar4 = (uint)local_4c >> 2 ^ (uint)local_4c; + uVar4 = GHIDRA_UINT(local_4c) >> 2 ^ GHIDRA_UINT(local_4c); uVar4 = uVar4 << 5 ^ uVar4; local_40 = (uVar4 >> 0x15 ^ uVar4) & 7; if ((g_game->_difficulty == 2) || (g_game->_difficulty == 3)) { @@ -9247,64 +9247,64 @@ LAB_007f8b59: } local_28 = 0.0; do { - local_4c = (float)((int)local_28 + local_40 & 0x80000007); - if ((int)local_4c < 0) { - local_4c = (float)(((int)local_4c - 1U | 0xfffffff8) + 1); + local_4c = (float)(GHIDRA_INT(local_28) + local_40 & 0x80000007); + if (GHIDRA_INT(local_4c) < 0) { + local_4c = (float)((GHIDRA_INT(local_4c) - 1U | 0xfffffff8) + 1); } - uVar4 = (int)local_4c + 2U & 0x80000003; - if ((int)uVar4 < 0) { + uVar4 = GHIDRA_INT(local_4c) + 2U & 0x80000003; + if (GHIDRA_INT(uVar4) < 0) { uVar4 = (uVar4 - 1 | 0xfffffffc) + 1; } - if ((((*(uint *)(*(int *)((char *)local_38 + 0x10) + 0x38 + ((uint)local_4c >> 5) * 4) & + if ((((*(uint *)(*(int *)((char *)local_38 + 0x10) + 0x38 + (GHIDRA_UINT(local_4c) >> 5) * 4) & 1 << (SUB41(local_4c,0) & 0x1f)) != 0) && - ((*(uint *)((int)*local_2c + (uVar4 >> 5) * 4 + 0x38) & 1 << ((byte)uVar4 & 0x1f)) != 0)) - && (savedRoom->_doors[(int)local_4c] == (void *)0x0)) { + ((*(uint *)(GHIDRA_INT(*local_2c) + (uVar4 >> 5) * 4 + 0x38) & 1 << ((byte)uVar4 & 0x1f)) != 0)) + && (savedRoom->_doors[GHIDRA_INT(local_4c)] == (void *)0x0)) { fVar8 = local_4c; - if (-1 < (int)local_4c) goto LAB_007f8d89; + if (-1 < GHIDRA_INT(local_4c)) goto LAB_007f8d89; break; } - local_28 = (float)((int)local_28 + 1); - } while ((int)local_28 < 8); + local_28 = (float)(GHIDRA_INT(local_28) + 1); + } while (GHIDRA_INT(local_28) < 8); local_28 = 0.0; while( true ) { - fVar8 = (float)(local_40 + (int)local_28 & 0x80000007); - if ((int)fVar8 < 0) { - fVar8 = (float)(((int)fVar8 - 1U | 0xfffffff8) + 1); + fVar8 = (float)(local_40 + GHIDRA_INT(local_28) & 0x80000007); + if (GHIDRA_INT(fVar8) < 0) { + fVar8 = (float)((GHIDRA_INT(fVar8) - 1U | 0xfffffff8) + 1); } - if (((*(uint *)(*(int *)((char *)local_38 + 0x10) + 0x38 + ((uint)fVar8 >> 5) * 4) & - 1 << (SUB41(fVar8,0) & 0x1f)) != 0) && (savedRoom->_doors[(int)fVar8] == (void *)0x0)) + if (((*(uint *)(*(int *)((char *)local_38 + 0x10) + 0x38 + (GHIDRA_UINT(fVar8) >> 5) * 4) & + 1 << (SUB41(fVar8,0) & 0x1f)) != 0) && (savedRoom->_doors[GHIDRA_INT(fVar8)] == (void *)0x0)) break; - local_28 = (float)((int)local_28 + 1); - if (7 < (int)local_28) { + local_28 = (float)(GHIDRA_INT(local_28) + 1); + if (7 < GHIDRA_INT(local_28)) { ExceptionList = local_1c; return 0; } } - if ((int)fVar8 < 0) { + if (GHIDRA_INT(fVar8) < 0) { ExceptionList = local_1c; return 0; } } LAB_007f8d89: - local_2c = *(void ***)((int)*local_2c + 8); + local_2c = *(void ***)(GHIDRA_INT(*local_2c) + 8); if (local_2c == (void **)0xe) { - *(uint *)&g_game->_gameStateFlags = (uint)g_game->_gameStateFlags | 0x20; + *(uint *)&g_game->_gameStateFlags = GHIDRA_UINT(g_game->_gameStateFlags) | 0x20; } else { if (local_2c != (void **)0xf) goto LAB_007f8dc6; - *(uint *)&g_game->_gameStateFlags = (uint)g_game->_gameStateFlags | 1; + *(uint *)&g_game->_gameStateFlags = GHIDRA_UINT(g_game->_gameStateFlags) | 1; } - *(undefined4 *)((int)&flagsGame->_gameStateFlags + 4) = - *(undefined4 *)((int)&flagsGame->_gameStateFlags + 4); + *(undefined4 *)(GHIDRA_INT(&flagsGame->_gameStateFlags) + 4) = + *(undefined4 *)(GHIDRA_INT(&flagsGame->_gameStateFlags) + 4); LAB_007f8dc6: - door = savedRoom->_doors[(int)fVar8]; - local_38 = savedRoom->_doors + (int)fVar8; + door = savedRoom->_doors[GHIDRA_INT(fVar8)]; + local_38 = savedRoom->_doors + GHIDRA_INT(fVar8); if (door == (GridEntity_Door *)0x0) { - MakeDoor(savedRoom,(int)fVar8); + MakeDoor(savedRoom,GHIDRA_INT(fVar8)); door = *local_38; } - ((GridEntity_Door *)(door))->GridEntity_Door::SetRoomTypes(1,(int)local_2c); - *(undefined4 *)((int)*local_38 + 0x394) = 0xffffffff; + ((GridEntity_Door *)(door))->GridEntity_Door::SetRoomTypes(1,GHIDRA_INT(local_2c)); + *(undefined4 *)(GHIDRA_INT(*local_38) + 0x394) = 0xffffffff; ((GridEntity_Door *)(*local_38))->GridEntity_Door::Open(); game = g_game; if ((g_game->_stageType == 4) || (g_game->_stageType == 5)) { @@ -9328,39 +9328,39 @@ LAB_007f8dc6: local_28 = 3.22299e-44; } seed_fart_sound_override((int *)&local_28); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_28,1.0,2,0,1.0,0.0); - uVar4 = (uint)fVar8 & 0x80000003; - if ((int)uVar4 < 0) { + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_28),1.0,2,0,1.0,0.0); + uVar4 = GHIDRA_UINT(fVar8) & 0x80000003; + if (GHIDRA_INT(uVar4) < 0) { uVar4 = (uVar4 - 1 | 0xfffffffc) + 1; } doorDir = Isaac::GetAxisAlignedUnitVectorFromDir((Vector *)(local_84 + 8),uVar4); local_28 = -doorDir->x; - local_44 = (undefined1 *)((uint)doorDir->y ^ 0x80000000); + local_44 = (undefined1 *)(GHIDRA_UINT(doorDir->y) ^ 0x80000000); uVar4 = Random(); local_40 = (uVar4 & 3) + 5; if (local_40 != 0) { local_60 = -local_28; - local_2c = (void **)(uint)(local_2c == (void **)0xe); + local_2c = (void **)GHIDRA_UINT((local_2c == (void **)0xe)); do { local_64 = Random(); uVar4 = Random(); - local_4c = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + local_4c = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 5.0; uVar4 = Random(); - fVar8 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + fVar8 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10; fVar8 = (fVar8 + fVar8) - 1.0; local_74.x = local_4c * local_28 + fVar8 * (float)local_44; local_74.y = local_60 * fVar8 + local_4c * (float)local_44; - iVar7 = *(int *)((int)*local_38 + 0x24); + iVar7 = *(int *)(GHIDRA_INT(*local_38) + 0x24); iVar6 = *(int *)((char *)g_game->_room + 0xc); uVar4 = Random(); - fVar8 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + fVar8 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_3c = (undefined1 *)(fVar8 + fVar8); uVar4 = Random(); local_48 = (undefined1 *) - ((float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 * 20.0); fVar8 = cos((float)local_3c); local_6c.x = fVar8 * (float)local_48 + (float)(iVar7 % iVar6) * 40.0 + 40.0; @@ -9370,21 +9370,21 @@ LAB_007f8dc6: local_6c.y = fVar8 * (float)local_48 + (float)(iVar7 / iVar6) * 40.0 + 120.0; pTVar10 = &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor; uVar9 = 0; - dustEffect = ((Game *)(g_game))->Game::Spawn(1000,0x3b,&local_6c,&local_74,(Entity *)0x0,(uint)local_2c, + dustEffect = ((Game *)(g_game))->Game::Spawn(1000,0x3b,&local_6c,&local_74,(Entity *)0x0,GHIDRA_UINT(local_2c), local_64); piVar5 = (int *)__RTDynamicCast(dustEffect,uVar9,pTVar10,pTVar11,uVar12); local_3c = (undefined1 *)0x3f800000; iVar7 = *(int *)((char *)g_game->_room + 0xc); - if (((float)piVar5[0xcf] - ((float)(*(int *)((int)*local_38 + 0x24) % iVar7) * 40.0 + 40.0)) + if (((float)piVar5[0xcf] - ((float)(*(int *)(GHIDRA_INT(*local_38) + 0x24) % iVar7) * 40.0 + 40.0)) * (float)local_44 + - ((float)piVar5[0xd0] - ((float)(*(int *)((int)*local_38 + 0x24) / iVar7) * 40.0 + 120.0) + ((float)piVar5[0xd0] - ((float)(*(int *)(GHIDRA_INT(*local_38) + 0x24) / iVar7) * 40.0 + 120.0) ) * local_60 < 0.0) { local_3c = &DAT_bf800000; } uVar4 = Random(); piVar5[0x11d] = - (int)(((float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * - 2.3283064e-10 * 10.0 + 2.0) * (float)local_3c); + GHIDRA_INT((((float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * + 2.3283064e-10 * 10.0 + 2.0) * (float)local_3c)); uVar4 = Random(); iVar7 = uVar4 % 10 + 0x1e; piVar5[0x117] = iVar7; @@ -9547,7 +9547,7 @@ float Room::GetDevilRoomChance() } iVar1 = g_game->_difficulty; if (((iVar1 == 2) || (iVar1 == 3)) && - (chance = 1.0, (uint)g_game->_greedModeWave < (iVar1 == 3) + 0xb)) { + (chance = 1.0, GHIDRA_UINT(g_game->_greedModeWave) < (iVar1 == 3) + 0xb)) { chance = 0.0; } return chance; @@ -9606,7 +9606,7 @@ byte Room::TrySpawnBossRushDoor(byte isIgnoreTime, byte isForce) gridWidth = 0; doorSlot = this->_doors; do { - if ((*doorSlot != (void *)0x0) && (*(int *)((int)*doorSlot + 0x394) == -5)) { + if ((*doorSlot != (void *)0x0) && (*(int *)(GHIDRA_INT(*doorSlot) + 0x394) == -5)) { ExceptionList = local_10; return 0; } @@ -9624,7 +9624,7 @@ byte Room::TrySpawnBossRushDoor(byte isIgnoreTime, byte isForce) (isForce != 0)) { KAGE_LogMessage(1,(byte *)"Spawning boss rush door\n"); uVar6 = g_game->_enterDoor; - if (((g_game->_lastRoomIdx != -5) || ((int)uVar6 < 0)) || + if (((g_game->_lastRoomIdx != -5) || (GHIDRA_INT(uVar6) < 0)) || (this->_doors[uVar6] != (void *)0x0)) { uVar5 = *(uint *)((char *)this->_descriptor + 0x58); if (uVar5 == 0) { @@ -9638,13 +9638,13 @@ byte Room::TrySpawnBossRushDoor(byte isIgnoreTime, byte isForce) uVar5 = uVar5 << 0xb ^ uVar5; do { uVar6 = gridWidth + ((uVar5 >> 0x10 ^ uVar5) & 7) & 0x80000007; - if ((int)uVar6 < 0) { + if (GHIDRA_INT(uVar6) < 0) { uVar6 = (uVar6 - 1 | 0xfffffff8) + 1; } } while ((((*(uint *)(*(int *)((char *)this->_descriptor + 0x10) + 0x38 + (uVar6 >> 5) * 4) & 1 << ((byte)uVar6 & 0x1f)) == 0) || (this->_doors[uVar6] != (void *)0x0)) && (gridWidth = gridWidth + 1, gridWidth < 8)); - if ((int)uVar6 < 0) { + if (GHIDRA_INT(uVar6) < 0) { ExceptionList = local_10; return 0; } @@ -9665,13 +9665,13 @@ byte Room::TrySpawnBossRushDoor(byte isIgnoreTime, byte isForce) } GridEntity_Door::SetRoomTypes (this_00,*(int *)(*(int *)((char *)this->_descriptor + 0x10) + 8),0x11); - *(undefined4 *)((int)this->_doors[uVar6] + 0x394) = 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(this->_doors[uVar6]) + 0x394) = 0xfffffffb; ((GridEntity_Door *)(this->_doors[uVar6]))->GridEntity_Door::Open(); ((GridEntity_Door *)(this->_doors[uVar6]))->GridEntity_Door::SpawnDust(); game = g_game; - puVar1 = (uint *)((int)&g_game->_gameStateFlags + 4); + puVar1 = (uint *)(GHIDRA_INT(&g_game->_gameStateFlags) + 4); *puVar1 = *puVar1 | 0x40; - *(int *)&game->_gameStateFlags = (int)game->_gameStateFlags; + *(int *)&game->_gameStateFlags = GHIDRA_INT(game->_gameStateFlags); if (isIgnoreTime != 0) { updateList = (this->_entityList)._updateEL._data; uVar5 = (this->_entityList)._updateEL._size; @@ -9681,7 +9681,7 @@ byte Room::TrySpawnBossRushDoor(byte isIgnoreTime, byte isForce) do { entity = *(int **)((char *)updateList + entityIndex * 4); if ((entity[10] == 0x2d) && (entity[0xb] == 0)) { - gridWidth = *(int *)((int)this->_doors[uVar6] + 0x24); + gridWidth = *(int *)(GHIDRA_INT(this->_doors[uVar6]) + 0x24); gridWidth = *(int *)((char *)game->_room + 0xc); dx = ((float)(gridWidth % gridWidth) * 40.0 + 40.0) - (float)entity[0xcf]; dy = ((float)(gridWidth / gridWidth) * 40.0 + 120.0) - (float)entity[0xd0]; @@ -9739,7 +9739,7 @@ byte Room::TrySpawnMegaSatanRoomDoor(byte isForce) KAGE_LogMessage(1,(byte *)"Spawning Mega Satan door\n"); if (this->_doors[1] == (void *)0x0) { MakeDoor(this,1); - *(undefined4 *)((int)this->_doors[1] + 0x394) = 0xfffffff9; + *(undefined4 *)(GHIDRA_INT(this->_doors[1]) + 0x394) = 0xfffffff9; GridEntity_Door::SetRoomTypes (this->_doors[1],*(int *)(*(int *)((char *)this->_descriptor + 0x10) + 8),5); return 1; @@ -9771,9 +9771,9 @@ void Room::clear_reward_position(Vector *position) undefined4 local_c; int *gridEntity; - iVar1 = (int)((position->x - 40.0) / 40.0 + 0.5); + iVar1 = GHIDRA_INT(((position->x - 40.0) / 40.0 + 0.5)); if ((((iVar1 < 0) || (this->_gridWidth <= iVar1)) || - (gridY = (int)((position->y - 120.0) / 40.0 + 0.5), gridY < 0)) || + (gridY = GHIDRA_INT(((position->y - 120.0) / 40.0 + 0.5)), gridY < 0)) || (this->_gridHeight <= gridY)) { gridIndex = -1; LAB_007f9f79: @@ -9789,7 +9789,7 @@ LAB_007f9f7f: local_14 = g_vectorZero.y; local_10 = 0; local_c = 0; - if (((uint)gridIndex < (GridEntity *)0x1c0) && + if ((GHIDRA_UINT(gridIndex) < (GridEntity *)0x1c0) && (gridEntity = this->_gridEntities[gridIndex], gridEntity != (int *)0x0)) { if (gridEntity[1] == 5) { gridEntity[1] = 2; @@ -9800,7 +9800,7 @@ LAB_007f9f7f: } else { gridIndex = this->_gridWidth * gridY + iVar1; - if (0x1bf < (uint)gridIndex) goto LAB_007f9f79; + if (0x1bf < GHIDRA_UINT(gridIndex)) goto LAB_007f9f79; pit = this->_gridEntities[gridIndex]; local_3c = pit; if ((pit == (GridEntity *)0x0) || ((pit->_desc)._type != 7)) goto LAB_007f9f7f; @@ -9808,15 +9808,15 @@ LAB_007f9f7f: pit = local_3c; } if ((((pit->_desc)._type == 0xe) && - (local_3c = (GridEntity *)gridIndex, (uint)gridIndex < (GridEntity *)0x1c0)) && + (local_3c = (GridEntity *)gridIndex, GHIDRA_UINT(gridIndex) < (GridEntity *)0x1c0)) && ((this->_gridEntities[gridIndex] != (void *)0x0 && - (*(int *)((int)this->_gridEntities[gridIndex] + 4) != 1)))) { + (*(int *)(GHIDRA_INT(this->_gridEntities[gridIndex]) + 4) != 1)))) { this->_gridPaths[gridIndex] = 900; std::set::insert(&local_38,&local_3c); } LAB_007fa044: - iVar1 = (int)((position->x - 40.0) / 40.0 + 0.5); - gridY = (int)((position->y - 120.0) / 40.0 + 0.5); + iVar1 = GHIDRA_INT(((position->x - 40.0) / 40.0 + 0.5)); + gridY = GHIDRA_INT(((position->y - 120.0) / 40.0 + 0.5)); if ((((iVar1 < 0) || (this->_gridWidth <= iVar1)) || (gridY < 0)) || (this->_gridHeight <= gridY)) { iVar1 = -1; @@ -9866,7 +9866,7 @@ void Room::clear_grid_for_pickup(int *gridIndex) local_14 = g_vectorZero.y; local_10 = 0; local_c = 0; - if (((uint)*gridIndex < 0x1c0) && + if ((GHIDRA_UINT(*gridIndex) < 0x1c0) && (gridEntity = this->_gridEntities[*gridIndex], gridEntity != (int *)0x0)) { if (gridEntity[1] == 5) { gridEntity[1] = 2; @@ -9874,22 +9874,22 @@ void Room::clear_grid_for_pickup(int *gridIndex) (**(code **)(*gridEntity + 0x14))(1,&destroySource); } index = (float)*gridIndex; - if (((((uint)index < 0x1c0) && - (poopGrid = this->_gridEntities[(int)index], poopGrid != (void *)0x0)) && + if ((((GHIDRA_UINT(index) < 0x1c0) && + (poopGrid = this->_gridEntities[GHIDRA_INT(index)], poopGrid != (void *)0x0)) && (*(int *)((char *)poopGrid + 4) == 0xe)) && ((local_40.x = index, poopGrid != (void *)0x0 && (*(int *)((char *)poopGrid + 4) != 1)))) { - this->_gridPaths[(int)index] = 900; + this->_gridPaths[GHIDRA_INT(index)] = 900; std::set::insert(&VStack_38,&local_40); index = (float)*gridIndex; } - gridCollision = GetGridCollision(this,(int)index); + gridCollision = GetGridCollision(this,GHIDRA_INT(index)); if (gridCollision != 0) { - local_40.x = (float)((int)index % this->_gridWidth) * 40.0 + 40.0; - local_40.y = (float)((int)index / this->_gridWidth) * 40.0 + 120.0; + local_40.x = (float)(GHIDRA_INT(index) % this->_gridWidth) * 40.0 + 40.0; + local_40.y = (float)(GHIDRA_INT(index) / this->_gridWidth) * 40.0 + 120.0; freePos = FindFreePickupSpawnPosition(this,&VStack_38,&local_40,0.0,0,0,0); - gridX = (int)((freePos->x - 40.0) / 40.0 + 0.5); + gridX = GHIDRA_INT(((freePos->x - 40.0) / 40.0 + 0.5)); if (((-1 < gridX) && (gridX < this->_gridWidth)) && - ((gridY = (int)((freePos->y - 120.0) / 40.0 + 0.5), -1 < gridY && (gridY < this->_gridHeight) + ((gridY = GHIDRA_INT(((freePos->y - 120.0) / 40.0 + 0.5)), -1 < gridY && (gridY < this->_gridHeight) ))) { *gridIndex = this->_gridWidth * gridY + gridX; return; @@ -9946,7 +9946,7 @@ void Room::remove_grid_entity_for_spawn(int *gridIndex) local_8 = 0xffffffff; puStack_c = &LAB_00b0138d; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(local_34 + 0x30); + uVar2 = __security_cookie ^ GHIDRA_UINT((local_34 + 0x30)); ExceptionList = &local_10; if (-1 < *gridIndex) { gridEntity = this->_gridEntities[*gridIndex]; @@ -9959,15 +9959,15 @@ void Room::remove_grid_entity_for_spawn(int *gridIndex) dx = -1; local_28 = (float)(*gridIndex / this->_gridWidth - 1); do { - npcGridIndex = dx + (int)local_24.y; + npcGridIndex = dx + GHIDRA_INT(local_24.y); rowsLeft = 3; iVar4 = dx; fVar5 = local_28; do { if (((-1 < npcGridIndex) && (npcGridIndex < this->_gridWidth)) && - ((-1 < (int)fVar5 && - (((int)fVar5 < this->_gridHeight && - (iVar3 = this->_gridWidth * (int)fVar5 + iVar4 + (int)local_24.y, -1 < iVar3)))))) + ((-1 < GHIDRA_INT(fVar5) && + ((GHIDRA_INT(fVar5) < this->_gridHeight && + (iVar3 = this->_gridWidth * GHIDRA_INT(fVar5) + iVar4 + GHIDRA_INT(local_24.y), -1 < iVar3)))))) { piVar1 = this->_gridEntities[iVar3]; if ((piVar1 != (int *)0x0) && (piVar1[1] == 7)) { @@ -9975,7 +9975,7 @@ void Room::remove_grid_entity_for_spawn(int *gridIndex) } iVar4 = dx; } - fVar5 = (float)((int)fVar5 + 1); + fVar5 = (float)(GHIDRA_INT(fVar5) + 1); rowsLeft = rowsLeft + -1; } while (rowsLeft != 0); dx = iVar4 + 1; @@ -9988,12 +9988,12 @@ void Room::remove_grid_entity_for_spawn(int *gridIndex) npcIndex = 0; local_8 = 0; if (local_28 != 0.0) { - listData = (void *)local_34._4_4_; + listData = (*(undefined4 *)((char *)&((void *)local_34) + 0x4)); do { piVar1 = *(int **)((char *)listData + npcIndex * 4); if (piVar1[0xef] == 0) { - npcGridIndex = (int)(((float)piVar1[0xcd] - 40.0) / 40.0 + 0.5); - iVar4 = (int)(((float)piVar1[0xce] - 120.0) / 40.0 + 0.5); + npcGridIndex = GHIDRA_INT((((float)piVar1[0xcd] - 40.0) / 40.0 + 0.5)); + iVar4 = GHIDRA_INT((((float)piVar1[0xce] - 120.0) / 40.0 + 0.5)); if ((((npcGridIndex < 0) || (this->_gridWidth <= npcGridIndex)) || (iVar4 < 0)) || (this->_gridHeight <= iVar4)) { npcGridIndex = -1; @@ -10005,14 +10005,14 @@ void Room::remove_grid_entity_for_spawn(int *gridIndex) piVar1[0x2d9] = 0x10; (**(code **)(*piVar1 + 0xc))(); } - listData = (void *)local_34._4_4_; + listData = (*(undefined4 *)((char *)&((void *)local_34) + 0x4)); } npcIndex = npcIndex + 1; - } while (npcIndex < (uint)local_28); + } while (npcIndex < GHIDRA_UINT(local_28)); } if (local_34[0] == '\0') { local_8 = 1; - tracked_alloc(1,(void *)local_34._4_4_,0); + tracked_alloc(1,(*(undefined4 *)((char *)&((void *)local_34) + 0x4)),0); } } local_8 = 0xffffffff; @@ -10026,7 +10026,7 @@ void Room::remove_grid_entity_for_spawn(int *gridIndex) local_40 = g_vectorZero.y; local_3c = 0; local_38 = 0; - if (((uint)*gridIndex < 0x1c0) && + if ((GHIDRA_UINT(*gridIndex) < 0x1c0) && (piVar1 = this->_gridEntities[*gridIndex], piVar1 != (int *)0x0)) { if (piVar1[1] == 5) { piVar1[1] = 2; @@ -10038,11 +10038,11 @@ void Room::remove_grid_entity_for_spawn(int *gridIndex) npcGridIndex = *gridIndex; uVar2 = GetGridCollision(this,npcGridIndex); if (uVar2 != 0) { - local_34._8_4_ = (float)(npcGridIndex % this->_gridWidth) * 40.0 + 40.0; + (*(undefined4 *)((char *)&(local_34) + 0x8)) = (float)(npcGridIndex % this->_gridWidth) * 40.0 + 40.0; local_28 = (float)(npcGridIndex / this->_gridWidth) * 40.0 + 120.0; freePos = FindFreePickupSpawnPosition(this,&local_24,(Vector *)(local_34 + 8),0.0,0,0,0); - npcGridIndex = (int)((freePos->x - 40.0) / 40.0 + 0.5); - iVar4 = (int)((freePos->y - 120.0) / 40.0 + 0.5); + npcGridIndex = GHIDRA_INT(((freePos->x - 40.0) / 40.0 + 0.5)); + iVar4 = GHIDRA_INT(((freePos->y - 120.0) / 40.0 + 0.5)); if ((((npcGridIndex < 0) || (this->_gridWidth <= npcGridIndex)) || (iVar4 < 0)) || (this->_gridHeight <= iVar4)) { npcGridIndex = -1; @@ -10056,25 +10056,25 @@ void Room::remove_grid_entity_for_spawn(int *gridIndex) npcGridIndex = npcGridIndex % this->_gridWidth; fVar5 = (float)(npcGridIndex + 1); npcGridIndex = npcGridIndex + -1; - if (npcGridIndex <= (int)fVar5) { + if (npcGridIndex <= GHIDRA_INT(fVar5)) { neighborY = (float)(iVar4 + -1); local_28 = fVar5; local_24.y = neighborY; do { - if ((int)neighborY <= iVar4 + 1) { + if (GHIDRA_INT(neighborY) <= iVar4 + 1) { do { if (((npcGridIndex < 0) || (this->_gridWidth <= npcGridIndex)) || - (((int)neighborY < 0 || (this->_gridHeight <= (int)neighborY)))) { + ((GHIDRA_INT(neighborY) < 0 || (this->_gridHeight <= GHIDRA_INT(neighborY))))) { uVar2 = 0xffffffff; } else { - uVar2 = this->_gridWidth * (int)neighborY + npcGridIndex; + uVar2 = this->_gridWidth * GHIDRA_INT(neighborY) + npcGridIndex; } neighborGrid = this->_gridEntities[uVar2]; if ((neighborGrid != (GridEntity_Pit *)0x0) && ((((piVar1 = *(int **)((char *)this->_descriptor + 0x10), piVar1 == (int *)0x0 || (piVar1[2] != 0x10)) || (*piVar1 != 0x23)) && - (((int)uVar2 < 0 || (neighborGrid->_collisionClass != 0)))))) { + ((GHIDRA_INT(uVar2) < 0 || (neighborGrid->_collisionClass != 0)))))) { iVar3 = (neighborGrid->_desc)._type; if (iVar3 == 7) { if ((neighborGrid->_desc)._state == 0) { @@ -10101,13 +10101,13 @@ void Room::remove_grid_entity_for_spawn(int *gridIndex) } } } - neighborY = (float)((int)neighborY + 1); - } while ((int)neighborY <= iVar4 + 1); + neighborY = (float)(GHIDRA_INT(neighborY) + 1); + } while (GHIDRA_INT(neighborY) <= iVar4 + 1); fVar5 = local_28; neighborY = local_24.y; } npcGridIndex = npcGridIndex + 1; - } while (npcGridIndex <= (int)fVar5); + } while (npcGridIndex <= GHIDRA_INT(fVar5)); } } ExceptionList = local_10; @@ -10202,7 +10202,7 @@ void Room::SpawnClearAward() local_8 = 0xffffffff; puStack_c = &LAB_00b013bd; local_10 = ExceptionList; - uVar6 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar6 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; awardRng._shift1 = 5; awardRng._shift2 = 9; @@ -10274,16 +10274,16 @@ LAB_007fb3f3: iVar8 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::GetNumCollectibles(0xf1); local_68 = (Entity_Player *)(iVar8 + 1); local_70 = (Entity_Player *)((RNG *)(&awardRng))->RNG::RandomFloat(); - fVar14 = pow(0.666,(float)(int)((int)local_68 - 1)); + fVar14 = pow(0.666,(float)GHIDRA_INT((GHIDRA_INT(local_68) - 1))); if ((float)local_70 < fVar14 * 0.5) { local_68 = (Entity_Player *)0x0; } } if ((g_game->_difficulty == 1) && (pEVar7 == (Entity_Player *)0xa)) { uVar6 = ((RNG *)(&awardRng))->RNG::RandomInt(100); - local_68 = (Entity_Player *)((uint)local_68 & -(uint)(uVar6 < 0x42)); + local_68 = (Entity_Player *)(GHIDRA_UINT(local_68) & -GHIDRA_UINT((uVar6 < 0x42))); } - bVar5 = Entity_Pickup::IsChest((int)pEVar7); + bVar5 = Entity_Pickup::IsChest(GHIDRA_INT(pEVar7)); if (bVar5 == 0) { pEVar9 = PlayerManager::RandomCollectibleOwner (&g_game->_playerManager,0x1d0,awardRng._seed,(RNG **)0x0); @@ -10298,11 +10298,11 @@ LAB_007fb3f3: (pEVar9 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::FirstTrinketOwner(0x96), pEVar9 != (Entity_Player *)0x0)) { iVar8 = ((Entity_Player *)(pEVar9))->Entity_Player::GetTrinketMultiplier(0x96); - local_68 = (Entity_Player *)(iVar8 * (int)local_68); + local_68 = (Entity_Player *)(iVar8 * GHIDRA_INT(local_68)); } bVar5 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasCollectible(0x202); if ((((bVar5 == 0) || (uVar6 = ((RNG *)(&awardRng))->RNG::RandomInt(4), uVar6 != 0)) || - ((int)local_68 < 1)) || + (GHIDRA_INT(local_68) < 1)) || (((pEVar7 != (Entity_Player *)&DAT_00000014 && (pEVar7 != (Entity_Player *)0xa)) && ((pEVar7 != (Entity_Player *)0x1e && ((pEVar7 != (Entity_Player *)0x45 && (pEVar7 != (Entity_Player *)0x28)))))))) { @@ -10320,7 +10320,7 @@ LAB_007fb3f3: local_78 = (Entity_Player *)&DAT_00000014; ((RNG *)(&local_38))->RNG::game_constructor(awardRng._seed,0x13); uVar6 = ((RNG *)(this_00))->RNG::RandomInt(3); - uVar6 = uVar6 + (int)local_68; + uVar6 = uVar6 + GHIDRA_INT(local_68); local_68 = (Entity_Player *)1; if (1 < uVar6) { local_68 = (Entity_Player *)uVar6; @@ -10330,23 +10330,23 @@ LAB_007fb6b7: if ((bVar5 != 0) && (local_88 = (Entity_Player *) ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::GetTrinketMultiplier(0x54), - 1 < (int)local_88)) { + 1 < GHIDRA_INT(local_88))) { local_70 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::FirstTrinketOwner(0x54); trinketRngEnd = (local_70->_trinketRNGs)._end; - if ((int)((int)trinketRngEnd - (int)(local_70->_trinketRNGs)._begin & 0xfffffff0U) < 0x541 + if (GHIDRA_INT((GHIDRA_INT(trinketRngEnd) - GHIDRA_INT((local_70->_trinketRNGs)._begin) & 0xfffffff0U)) < 0x541 ) { KAGE_LogMessage(0x10,(byte *)"Trinket ID out of bounds!\n"); trinketRngEnd = (local_70->_trinketRNGs)._end; } trinketRngBegin = (local_70->_trinketRNGs)._begin; - uVar6 = ((int)trinketRngEnd - (int)trinketRngBegin >> 4) - 1; + uVar6 = (GHIDRA_INT(trinketRngEnd) - GHIDRA_INT(trinketRngBegin) >> 4) - 1; if (0x54 < uVar6) { uVar6 = 0x54; } - local_70 = (Entity_Player *)(uVar6 * 0x10 + (int)trinketRngBegin); + local_70 = (Entity_Player *)(uVar6 * 0x10 + GHIDRA_INT(trinketRngBegin)); uVar6 = ((RNG *)((RNG *)local_70))->RNG::RandomInt(10000); uVar11 = 0x29a; - if (2 < (int)local_88) { + if (2 < GHIDRA_INT(local_88)) { uVar11 = 0x514; } if (uVar6 < uVar11) { @@ -10363,14 +10363,14 @@ LAB_007fb6b7: else if (pEVar7 == (Entity_Player *)&DAT_00000014) goto LAB_007fb6b7; local_94 = 0.0; pEVar9 = local_68; - if (0 < (int)local_68) { + if (0 < GHIDRA_INT(local_68)) { do { if (pEVar7 != (Entity_Player *)0x0) { FindFreePickupSpawnPosition(itemPool,&spawnPos,&rewardPos,0.0,0,0,0); uVar6 = ((RNG *)(&awardRng))->RNG::Next(); spawned = (Entity_Pickup *) - ((Game *)(g_game))->Game::Spawn(5,(uint)pEVar7,&spawnPos,&g_vectorZero,(Entity *)0x0, - (uint)local_90,uVar6); + ((Game *)(g_game))->Game::Spawn(5,GHIDRA_UINT(pEVar7),&spawnPos,&g_vectorZero,(Entity *)0x0, + GHIDRA_UINT(local_90),uVar6); bVar5 = Entity_Pickup::IsChest(spawned->_variant); if (bVar5 == 0) { local_90 = (Entity_Player *)spawned->_subtype; @@ -10386,9 +10386,9 @@ LAB_007fb6b7: } if ((local_6a != false) && (local_94 == 0.0)) { oldFlags = spawned->_flags; - flagsHigh = (uint *)((int)&spawned->_flags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&spawned->_flags) + 4); *flagsHigh = *flagsHigh | 0x100; - *(int *)&spawned->_flags = (int)oldFlags; + *(int *)&spawned->_flags = GHIDRA_INT(oldFlags); } pEVar7 = PlayerManager::FirstCollectibleOwner (&g_game->_playerManager,0x29e,(RNG **)&g_game->_playerManager,1); @@ -10398,8 +10398,8 @@ LAB_007fb6b7: pEVar9 = local_68; pEVar7 = local_78; } - local_94 = (float)((int)local_94 + 1); - } while ((int)local_94 < (int)pEVar9); + local_94 = (float)(GHIDRA_INT(local_94) + 1); + } while (GHIDRA_INT(local_94) < GHIDRA_INT(pEVar9)); } bVar5 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(0x8f); game = g_game; @@ -10442,21 +10442,21 @@ LAB_007fb6b7: ((Game *)(g_game))->Game::Spawn(5,uVar11,targetPos,&g_vectorZero,(Entity *)0x0,0,uVar6); uVar6 = 0; playerManager = &g_game->_playerManager; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { local_88 = ((PlayerManager *)(playerManager))->PlayerManager::GetPlayer(uVar6); local_70 = (Entity_Player *)((Entity_Player *)(local_88))->Entity_Player::GetTrinketMultiplier(0xb1); - if (1 < (int)local_70) { + if (1 < GHIDRA_INT(local_70)) { ((Entity_Player *)(local_88))->Entity_Player::add_random_stat_up(&awardRng); } - if (2 < (int)local_70) { + if (2 < GHIDRA_INT(local_70)) { ((Entity_Player *)(local_88))->Entity_Player::add_random_stat_up(&awardRng); } uVar6 = uVar6 + 1; playerManager = &g_game->_playerManager; - } while (uVar6 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar6 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } if (g_game->_challenge == 0x2b) { @@ -10478,7 +10478,7 @@ LAB_007fbbc4: } else { uVar6 = ((Level *)((Level *)g_game))->Level::filter_curses(2); - if (((uVar6 != 0) && ((int)pEVar7 < 8)) || (g_game->_challenge == 0x2c)) { + if (((uVar6 != 0) && (GHIDRA_INT(pEVar7) < 8)) || (g_game->_challenge == 0x2c)) { pEVar7 = (Entity_Player *)(&(*(undefined1 *)((char *)(pEVar7) + 0x0)) + 1); goto LAB_007fbbc4; } @@ -10514,18 +10514,18 @@ LAB_007fbc61: } local_69 = 0xb < iVar12; } - local_78 = (Entity_Player *)CONCAT31((int3)((uint)iVar8 >> 8),1); - if (*(byte *)((int)&(local_90->_sprite)._animState._animData + 3) != 0) { - local_78 = (Entity_Player *)(uint)((int)pEVar7 < *(int *)&(*(undefined1 *)((char *)(local_90) + 0x40))); + local_78 = (Entity_Player *)CONCAT31((int3)(GHIDRA_UINT(iVar8) >> 8),1); + if (*(byte *)(GHIDRA_INT(&(local_90->_sprite)._animState._animData) + 3) != 0) { + local_78 = (Entity_Player *)GHIDRA_UINT((GHIDRA_INT(pEVar7) < *(int *)&(*(undefined1 *)((char *)(local_90) + 0x40)))); } if (itemPool->_roomType == 0x11) { PlayerManager::unlock_completion_mark(3); ((PersistentGameData *)(&g_manager->_persistentGameData))->PersistentGameData::IncreaseEventCounter(0x6f,1); game = g_game; oldFlags = g_game->_gameStateFlags; - flagsHigh = (uint *)((int)&g_game->_gameStateFlags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&g_game->_gameStateFlags) + 4); *flagsHigh = *flagsHigh | 2; - *(int *)&game->_gameStateFlags = (int)oldFlags; + *(int *)&game->_gameStateFlags = GHIDRA_INT(oldFlags); } if ((itemPool->_descriptor == (void *)0x0) || (iVar8 = *(int *)((char *)itemPool->_descriptor + 0x10), iVar8 == 0)) @@ -10603,7 +10603,7 @@ switchD_007fbd6e_caseD_e79: else if (local_68 == (Entity_Player *)0x8) { PlayerManager::unlock_completion_mark(0xd); ((PersistentGameData *)(&g_manager->_persistentGameData))->PersistentGameData::IncreaseEventCounter(0x1eb,1); - if (*(byte *)((int)&(local_90->_sprite)._animState._animData + 3) != 0) { + if (*(byte *)(GHIDRA_INT(&(local_90->_sprite)._animState._animData) + 3) != 0) { clear_reward_position(itemPool,&rewardPos); goto LAB_007fbea9; } @@ -10612,19 +10612,19 @@ switchD_007fbd6e_caseD_e79: uVar6 = ((RNG *)(&awardRng))->RNG::Next(); ((Game *)(g_game))->Game::Spawn(5,0x154,&rewardPos,&g_vectorZero,(Entity *)0x0,0,uVar6); if ((((char)local_78 != '\0') && (local_69 != false)) && - (1 < (uint)(g_manager->_persistentGameData)._eventCounters[0x1eb])) { + (1 < GHIDRA_UINT((g_manager->_persistentGameData)._eventCounters[0x1eb]))) { spawnPos.x = rewardPos.x + 0.0; spawnPos.y = rewardPos.y + 40.0; targetPos = FindFreePickupSpawnPosition(itemPool,&tmpPos,&spawnPos,80.0,1,0,0); local_88 = (Entity_Player *)GetGridIndex(itemPool,targetPos); remove_grid_entity_for_spawn(itemPool,(int *)&local_88); uVar6 = Random(); - SpawnGridEntity(itemPool,(int)local_88,0x11,0,uVar6,1); + SpawnGridEntity(itemPool,GHIDRA_INT(local_88),0x11,0,uVar6,1); } } goto LAB_007fd75c; } - if (((int)local_68 < 8) && (local_68 != (Entity_Player *)0x6)) { + if ((GHIDRA_INT(local_68) < 8) && (local_68 != (Entity_Player *)0x6)) { LAB_007fcf52: if (local_6a != false) { if ((char)local_78 == '\0') { @@ -10659,7 +10659,7 @@ LAB_007fcf96: if ((g_game->_challenge == 0x2c) || ((local_81 == 0 && (!bVar2)))) { remove_grid_entity_for_spawn(itemPool,(int *)&local_94); uVar6 = Random(); - SpawnGridEntity(itemPool,(int)local_94,0x11,0,uVar6,0); + SpawnGridEntity(itemPool,GHIDRA_INT(local_94),0x11,0,uVar6,0); } } } @@ -10705,7 +10705,7 @@ LAB_007fd2ec: if ((((8 < iVar8) && (iVar8 < 0xd)) || (iVar8 == 0x26)) || (iVar8 == 0x16)) { ((PersistentGameData *)(&g_manager->_persistentGameData))->PersistentGameData::TryUnlock(7); uVar6 = ((RNG *)(&awardRng))->RNG::RandomInt(2); - uVar6 = (-(uint)(uVar6 != 0) & 0x86) + 0x49; + uVar6 = (-GHIDRA_UINT((uVar6 != 0)) & 0x86) + 0x49; pEVar7 = PlayerManager::FirstCollectibleOwner (&g_game->_playerManager,0x49,(RNG **)&g_game->_playerManager,1); if (pEVar7 == (Entity_Player *)0x0) { @@ -10840,7 +10840,7 @@ LAB_007fd2ec: local_c0.x = (float)targetPos->x; local_c0.y = targetPos->y; if (local_b4 != 0.0) { - ItemPool::RemoveCollectible(&g_game->_itemPool,(int)local_b4,0,0); + ItemPool::RemoveCollectible(&g_game->_itemPool,GHIDRA_INT(local_b4),0,0); clear_reward_position(itemPool,&local_c0); FUN_007fa2a0(&local_c0); uVar6 = ((RNG *)(&awardRng))->RNG::Next(); @@ -10849,7 +10849,7 @@ LAB_007fd2ec: castSrcType = &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor; castOffset = 0; spawnedEntity = - ((Game *)(g_game))->Game::Spawn(5,100,&local_c0,&g_vectorZero,(Entity *)0x0,(uint)local_b4,uVar6); + ((Game *)(g_game))->Game::Spawn(5,100,&local_c0,&g_vectorZero,(Entity *)0x0,GHIDRA_UINT(local_b4),uVar6); spawned = (Entity_Pickup *) __RTDynamicCast(spawnedEntity,castOffset,castSrcType,castDstType, castIsReference); @@ -10875,7 +10875,7 @@ LAB_007fd2ec: else { if (((local_68 == (Entity_Player *)0x8) || (local_68 == (Entity_Player *)0x6)) && (local_6a == false)) goto LAB_007fd052; - if ((itemPool->_roomType == 0x11) || ((g_game->_challenge == 0x2c && ((int)local_68 < 8)))) + if ((itemPool->_roomType == 0x11) || ((g_game->_challenge == 0x2c && (GHIDRA_INT(local_68) < 8)))) goto LAB_007fcf52; if (itemPool->_bossId == 0x37) { ((PersistentGameData *)(&g_manager->_persistentGameData))->PersistentGameData::IncreaseEventCounter(0x1a,1); @@ -10893,7 +10893,7 @@ LAB_007fd2ec: local_88 = (Entity_Player *)GetGridIndex(itemPool,targetPos); remove_grid_entity_for_spawn(itemPool,(int *)&local_88); uVar6 = Random(); - SpawnGridEntity(itemPool,(int)local_88,0x11,0,uVar6,1); + SpawnGridEntity(itemPool,GHIDRA_INT(local_88),0x11,0,uVar6,1); } goto LAB_007fd75c; } @@ -10903,14 +10903,14 @@ LAB_007fd2ec: targetPos = &rewardPos; uVar11 = 0x172; LAB_007fd74c: - ((Game *)(g_game))->Game::Spawn(5,uVar11,targetPos,&g_vectorZero,(Entity *)0x0,(uint)fVar14,uVar6); + ((Game *)(g_game))->Game::Spawn(5,uVar11,targetPos,&g_vectorZero,(Entity *)0x0,GHIDRA_UINT(fVar14),uVar6); } else { if (local_68 == (Entity_Player *)0x6) { if (((g_manager->_persistentGameData)._achievements[4] == 0) && ((g_manager->_state != 2 || (((g_game->_dailyChallenge)._id == 0 && (g_game->_isDebug == 0)))))) { - if (*(byte *)((int)&(local_90->_sprite)._animState._animData + 3) != 0) { + if (*(byte *)(GHIDRA_INT(&(local_90->_sprite)._animState._animData) + 3) != 0) { if ((char)local_78 == '\0') goto LAB_007fc202; if (((byte)(local_90->_sprite)._animDefaultName._capacity != 0) || (6 < *(int *)&(*(undefined1 *)((char *)(local_90) + 0x40)))) goto LAB_007fc1ca; @@ -10930,11 +10930,11 @@ LAB_007fc202: } else { LAB_007fc1ca: - if ((*(byte *)((int)&(local_90->_sprite)._animState._animData + 3) == 0) || + if ((*(byte *)(GHIDRA_INT(&(local_90->_sprite)._animState._animData) + 3) == 0) || ((local_90->_sprite)._animState._layerFrames != (void *)0x3)) { remove_grid_entity_for_spawn(itemPool,(int *)&local_94); uVar6 = Random(); - SpawnGridEntity(itemPool,(int)local_94,0x11,0,uVar6,0); + SpawnGridEntity(itemPool,GHIDRA_INT(local_94),0x11,0,uVar6,0); } } game = g_game; @@ -10972,7 +10972,7 @@ LAB_007fc299: spawned = (Entity_Pickup *) ((Game *)(g_game))->Game::Spawn(5,100,&local_d8,&g_vectorZero,(Entity *)0x0,uVar6,uVar11); if (isShopItems != '\0') { - ((Entity_Pickup *)(spawned))->Entity_Pickup::MakeShopItem((int)local_70); + ((Entity_Pickup *)(spawned))->Entity_Pickup::MakeShopItem(GHIDRA_INT(local_70)); } spawned->_coopDuplicateIndex = 0; } @@ -11022,15 +11022,15 @@ LAB_007fc47e: } if (((char)local_78 != '\0') && (local_69 != false)) { local_94 = 0.0; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { uVar6 = 0; do { pEVar7 = ((Game *)(g_game))->Game::GetPlayer(uVar6); if (pEVar7->_variant == 0) { iVar8 = 0; piVar10 = (pEVar7->_collectibleCounts)._begin; - for (iVar12 = (int)(pEVar7->_collectibleCounts)._end - (int)piVar10 >> 2; + for (iVar12 = GHIDRA_INT((pEVar7->_collectibleCounts)._end) - GHIDRA_INT(piVar10) >> 2; iVar12 != 0; iVar12 = iVar12 + -1) { iVar8 = iVar8 + *piVar10; piVar10 = piVar10 + 1; @@ -11039,22 +11039,22 @@ LAB_007fc47e: if (pEVar7->_damage <= local_b4) { fVar14 = local_b4; } - local_94 = (float)((int)local_94 + iVar8); + local_94 = (float)(GHIDRA_INT(local_94) + iVar8); local_b4 = fVar14; } uVar6 = uVar6 + 1; - } while (uVar6 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (uVar6 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); roomAlias = room; } fVar14 = local_94; uVar6 = ((RNG *)(&awardRng))->RNG::RandomInt(0x14); - if ((uVar6 == 0) && ((0x13 < (int)fVar14 || (100.0 < local_b4)))) { + if ((uVar6 == 0) && ((0x13 < GHIDRA_INT(fVar14) || (100.0 < local_b4)))) { targetPos = FindFreePickupSpawnPosition(roomAlias,&tmpPos,&rewardPos,80.0,1,0,0); local_70 = (Entity_Player *)GetGridIndex(roomAlias,targetPos); remove_grid_entity_for_spawn(roomAlias,(int *)&local_70); uVar6 = Random(); - SpawnGridEntity(roomAlias,(int)local_70,0x11,0,uVar6,1); + SpawnGridEntity(roomAlias,GHIDRA_INT(local_70),0x11,0,uVar6,1); } } ((PersistentGameData *)(&g_manager->_persistentGameData))->PersistentGameData::TryUnlock(4); @@ -11070,9 +11070,9 @@ LAB_007fc47e: (local_68 != (Entity_Player *)0x8)) && ((((g_manager->_persistentGameData)._eventCounters[0x9e] == 0 || (local_68 != (Entity_Player *)0x9)) && - ((*(byte *)((int)&(local_90->_sprite)._animState._animData + 3) == 0 || + ((*(byte *)(GHIDRA_INT(&(local_90->_sprite)._animState._animData) + 3) == 0 || (((byte)(local_90->_sprite)._animDefaultName._capacity == 0 && - (*(int *)&(*(undefined1 *)((char *)(local_90) + 0x40)) <= (int)local_68)))))))) { + (*(int *)&(*(undefined1 *)((char *)(local_90) + 0x40)) <= GHIDRA_INT(local_68))))))))) { clear_reward_position(itemPool,&rewardPos); if ((char)local_78 == '\0') goto LAB_007fce68; (g_manager->_achievementOverlay)._isPopupBlocked = 1; @@ -11096,7 +11096,7 @@ LAB_007fce68: local_70 = (Entity_Player *)GetGridIndex(itemPool,&spawnPos); remove_grid_entity_for_spawn(itemPool,(int *)&local_70); uVar6 = Random(); - SpawnGridEntity(itemPool,(int)local_70,0x11,0,uVar6,0); + SpawnGridEntity(itemPool,GHIDRA_INT(local_70),0x11,0,uVar6,0); } if (local_81 != 0) { targetPos = GetCenterPos(&tmpPos); @@ -11105,7 +11105,7 @@ LAB_007fce68: local_70 = (Entity_Player *)GetGridIndex(itemPool,&spawnPos); clear_grid_for_pickup(itemPool,(int *)&local_70); uVar6 = Random(); - targetPos = GetGridPosition(room,&tmpPos,(int)local_70); + targetPos = GetGridPosition(room,&tmpPos,GHIDRA_INT(local_70)); ((Game *)(g_game))->Game::Spawn(1000,0x27,targetPos,&g_vectorZero,(Entity *)0x0,0,uVar6); itemPool = room; } @@ -11208,7 +11208,7 @@ LAB_007fca07: local_70 = (Entity_Player *)GetGridIndex(itemPool,targetPos); remove_grid_entity_for_spawn(itemPool,(int *)&local_70); uVar6 = Random(); - SpawnGridEntity(itemPool,(int)local_70,0x11,0,uVar6,1); + SpawnGridEntity(itemPool,GHIDRA_INT(local_70),0x11,0,uVar6,1); } } else if (local_68 == (Entity_Player *)0xa) { @@ -11313,7 +11313,7 @@ LAB_007fd75c: manager = g_manager; persistentData = &g_manager->_persistentGameData; if ((g_manager->_persistentGameData)._isReadOnly == 0) { - piVar10 = (g_manager->_persistentGameData)._cutsceneCounters + (int)&(*(undefined1 *)((char *)&(local_68[-1]) + 0x2eca)) + piVar10 = (g_manager->_persistentGameData)._cutsceneCounters + GHIDRA_INT(&(*(undefined1 *)((char *)&(local_68[-1]) + 0x2eca))) ; *piVar10 = *piVar10 + 1; uVar6 = *(uint *)&(*(undefined1 *)((char *)&((manager->_persistentGameData)) + 0xdd0)); @@ -11438,13 +11438,13 @@ LAB_007fdb1d: } local_78 = (Entity_Player *)0x0; do { - local_88 = ((PlayerManager *)(&game->_playerManager))->PlayerManager::get_main_player((int)local_78); + local_88 = ((PlayerManager *)(&game->_playerManager))->PlayerManager::get_main_player(GHIDRA_INT(local_78)); if (g_manager->_netplayManager == *(NetplayManager *)(g_manager + 1)) { LAB_007fdd45: local_94 = (local_88->_pos).x; local_68 = (Entity_Player *)(local_88->_pos).y; uVar6 = Random(); - fVar14 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar14 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_e0.y = fVar14 + fVar14; local_70 = (Entity_Player *)sin(local_e0.y); @@ -11472,14 +11472,14 @@ LAB_007fdd45: (*pcVar1)(); return; } - awardRng._seed = (uint)awardRng._seed >> ((byte)awardRng._shift1 & 0x1f) ^ awardRng._seed; + awardRng._seed = GHIDRA_UINT(awardRng._seed) >> ((byte)awardRng._shift1 & 0x1f) ^ awardRng._seed; awardRng._seed = awardRng._seed << ((byte)awardRng._shift2 & 0x1f) ^ awardRng._seed; - awardRng._seed = (uint)awardRng._seed >> (SUB41(local_c0.y,0) & 0x1f) ^ awardRng._seed; + awardRng._seed = GHIDRA_UINT(awardRng._seed) >> (SUB41(local_c0.y,0) & 0x1f) ^ awardRng._seed; spawnedEntity = ((Game *)(g_game))->Game::Spawn(6,0xb,&spawnPos,&g_vectorZero,(Entity *)pEVar7,0,awardRng._seed); - *(uint *)&spawnedEntity->_flags = (uint)spawnedEntity->_flags | 4; - *(undefined4 *)((int)&spawnedEntity->_flags + 4) = - *(undefined4 *)((int)&spawnedEntity->_flags + 4); + *(uint *)&spawnedEntity->_flags = GHIDRA_UINT(spawnedEntity->_flags) | 4; + *(undefined4 *)(GHIDRA_INT(&spawnedEntity->_flags) + 4) = + *(undefined4 *)(GHIDRA_INT(&spawnedEntity->_flags) + 4); if ((Entity_Player *)0x1 < local_b8) { iVar8 = 0; piVar10 = (int *)&(*(undefined1 *)((char *)&((g_game->_playerManager)) + 0x60)); @@ -11512,7 +11512,7 @@ LAB_007fdf6a: local_e0.y = (float)FUN_0090b010(local_88->_controllerIndex); if ((Entity_Player *)local_e0.y != (Entity_Player *)0x0) { local_70 = (g_manager->_lobbyMembers)._begin; - local_94 = (float)(((int)(g_manager->_lobbyMembers)._end - (int)local_70) / 0x14); + local_94 = (float)((GHIDRA_INT((g_manager->_lobbyMembers)._end) - GHIDRA_INT(local_70)) / 0x14); if (local_94 != 0.0) { fVar14 = (((Entity_Player *)local_e0.y)->_sizeMulti).x; pEVar7 = local_70; @@ -11550,7 +11550,7 @@ LAB_007fdf6a: local_6a = (bool)(*(byte *)&lobbyEntry->_begin & 1); } pEVar7 = (Entity_Player *)(lobbyEntry + 1); - local_94 = (float)((int)local_94 - 1); + local_94 = (float)(GHIDRA_INT(local_94) - 1); } while (local_94 != 0.0); local_94 = 0.0; itemPool = room; @@ -11584,8 +11584,8 @@ LAB_007fdf6a: break; case 0x26: ((Music *)((Music *)&g_manager->_musicManager))->Music::Play(0x5c,(g_manager->_optionsConfig)._musicVolume); - if (0x23 < ((int)(g_manager->_musicManager)._entries._end - - (int)(g_manager->_musicManager)._entries._begin) / 0x60) { + if (0x23 < (GHIDRA_INT((g_manager->_musicManager)._entries._end) - + GHIDRA_INT((g_manager->_musicManager)._entries._begin)) / 0x60) { (g_manager->_musicManager)._queuedMusicID = 0x23; } goto switchD_007fd7f9_caseD_3; @@ -11594,8 +11594,8 @@ LAB_007fdf6a: iVar8 = 0x2a; } ((Music *)((Music *)&g_manager->_musicManager))->Music::Play(iVar8,fVar14); - if (0x25 < ((int)(g_manager->_musicManager)._entries._end - - (int)(g_manager->_musicManager)._entries._begin) / 0x60) { + if (0x25 < (GHIDRA_INT((g_manager->_musicManager)._entries._end) - + GHIDRA_INT((g_manager->_musicManager)._entries._begin)) / 0x60) { (g_manager->_musicManager)._queuedMusicID = 0x25; } switchD_007fd7f9_caseD_3: @@ -11670,12 +11670,12 @@ void Room::card_against_humanity_fill() local_8 = 0; if ((playerManager->_entityList)._updateEL._size != 0) { do { - iVar10 = *(int *)((int)(playerManager->_entityList)._updateEL._data + pickIdx * 4); + iVar10 = *(int *)(GHIDRA_INT((playerManager->_entityList)._updateEL._data) + pickIdx * 4); if ((((((1 < *(int *)&g_game->_deathmatchManager) && (*(int *)(iVar10 + 0x28) == 1)) || (iVar11 = *(int *)(iVar10 + 0x28), iVar11 - 10U < 0x3de)) || ((iVar11 == 1 || (iVar11 == 6)))) || (iVar11 == 5)) || (iVar11 == 4)) { - iVar11 = (int)((*(float *)(iVar10 + 0x33c) - 40.0) / 40.0 + 0.5); - iVar10 = (int)((*(float *)(iVar10 + 0x340) - 120.0) / 40.0 + 0.5); + iVar11 = GHIDRA_INT(((*(float *)(iVar10 + 0x33c) - 40.0) / 40.0 + 0.5)); + iVar10 = GHIDRA_INT(((*(float *)(iVar10 + 0x340) - 120.0) / 40.0 + 0.5)); if (((iVar11 < 0) || (iVar15 = *(int *)((char *)g_game->_room + 0xc), iVar15 <= iVar11)) || ((iVar10 < 0 || (*(int *)((char *)g_game->_room + 0x10) <= iVar10)))) { local_28 = (uint *)0xffffffff; @@ -11686,11 +11686,11 @@ void Room::card_against_humanity_fill() std::set::insert(&local_44,&local_28); } pickIdx = pickIdx + 1; - } while (pickIdx < (uint)(playerManager->_entityList)._updateEL._size); + } while (pickIdx < GHIDRA_UINT((playerManager->_entityList)._updateEL._size)); } pGVar8 = g_game; piVar12 = (g_game->_playerManager)._playerList._begin; - if ((int)(g_game->_playerManager)._playerList._end - (int)piVar12 >> 2 == 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT(piVar12) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); piVar12 = (pGVar8->_playerManager)._playerList._begin; } @@ -11733,7 +11733,7 @@ void Room::card_against_humanity_fill() freeCellsEnd = (undefined4 *)0x0; freeCellsCapEnd = (undefined4 *)0x0; local_48 = (undefined4 *)0x0; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); iVar10 = playerManager->_gridWidth; pickIdx = (playerManager->_gridHeight * iVar10) / 2; if (pickIdx != 0) { @@ -11786,13 +11786,13 @@ LAB_007fe72c: else { local_20 = (Game *)(*(int *)((char *)pvVar7 + 0xc) * iVar15 + iVar11); if (((local_20 < (Game *)0x1c0) && - (iVar10 = *(int *)((char *)pvVar7 + (int)local_20 * 4 + 0x24), iVar10 != 0)) && + (iVar10 = *(int *)((char *)pvVar7 + GHIDRA_INT(local_20) * 4 + 0x24), iVar10 != 0)) && (*(int *)(iVar10 + 4) != 1)) goto LAB_007fe51b; } pGVar8 = local_20; std::set::find_node(local_5c,&local_20); if ((*(char *)((char *)local_54 + 0xd) != '\0') || - (pvVar7 = local_54, (int)pGVar8 < *(int *)((char *)local_54 + 0x10))) { + (pvVar7 = local_54, GHIDRA_INT(pGVar8) < *(int *)((char *)local_54 + 0x10))) { pvVar7 = occupiedCells; } if (pvVar7 == occupiedCells) { @@ -11886,7 +11886,7 @@ LAB_007fe51b: local_20 = g_game; if (pEVar5 == (Entity_Player *)0x0) { pvVar7 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar7 >> 2 < 0x220) { + if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar7) >> 2 < 0x220) { item = (ItemConfig_Item *)0x0; } else { @@ -11902,7 +11902,7 @@ LAB_007fe7f7: } } pvVar7 = (g_manager->_itemConfig)._trinkets._begin; - if ((((int)(g_manager->_itemConfig)._trinkets._end - (int)pvVar7 >> 2 < 0x5c) || + if (((GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(pvVar7) >> 2 < 0x5c) || (iVar10 = *(int *)((char *)pvVar7 + 0x16c), iVar10 == 0)) || (isMeconiumBackupCounts = '\x01', (*(uint *)(iVar10 + 0xb8) & 0x80000000) == 0)) { isMeconiumBackupCounts = '\0'; @@ -11950,12 +11950,12 @@ LAB_007fe8b6: fVar18 = fVar18 + *(float *)(iVar10 + 0x156c); } } - if ((int)((int)(fVar18 * -5.0) + (local_30 / 100) * -100 + local_30) < 0xb) { + if (GHIDRA_INT((GHIDRA_INT((fVar18 * -5.0)) + (local_30 / 100) * -100 + local_30)) < 0xb) { pRVar17 = (Room *)0x3; } local_18 = pRVar17; } - uVar6 = (int)puVar13 - (int)freeCells >> 2; + uVar6 = GHIDRA_INT(puVar13) - GHIDRA_INT(freeCells) >> 2; pickIdx = *local_28; if (pickIdx == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -11976,7 +11976,7 @@ LAB_007fe8b6: } pickIdx = freeCells[pickIdx]; puVar16 = freeCells + pickIdx; - memmove(puVar16,puVar16 + 1,(int)puVar13 - (int)(puVar16 + 1)); + memmove(puVar16,puVar16 + 1,GHIDRA_INT(puVar13) - GHIDRA_INT((puVar16 + 1))); cardRng = local_28; puVar13 = puVar13 + -1; uVar6 = *local_28; @@ -11995,12 +11995,12 @@ LAB_007fe8b6: uVar6 = uVar6 << ((byte)cardRng[2] & 0x1f) ^ uVar6; local_30 = uVar6 >> ((byte)cardRng[3] & 0x1f) ^ uVar6; *cardRng = local_30; - if (((int)pickIdx < 0) || (0x1bf < (int)pickIdx)) { + if ((GHIDRA_INT(pickIdx) < 0) || (0x1bf < GHIDRA_INT(pickIdx))) { KAGE_LogMessage(0x10,(byte *)"SpawnGridEntity: Grid index invalid\n"); } if ((pickIdx < 0x1c0) && (local_20->_roomMap[pickIdx - 0x5cdc] < 0x385)) { pGVar9 = operator_new(0x19c); - local_8._0_1_ = 9; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 9; local_34 = pGVar9; if (pGVar9 == (GridEntity *)0x0) { pGVar9 = (GridEntity *)0x0; @@ -12017,11 +12017,11 @@ LAB_007fe8b6: pGVar9[1]._spawnFrame = 0; pGVar9[1]._rng._seed = 0; fVar18 = g_vectorZero.y; - pGVar9[1]._rng._shift1 = (int)g_vectorZero.x; - pGVar9[1]._rng._shift2 = (int)fVar18; + pGVar9[1]._rng._shift1 = GHIDRA_INT(g_vectorZero.x); + pGVar9[1]._rng._shift2 = GHIDRA_INT(fVar18); fVar18 = g_vectorZero.y; - pGVar9[1]._rng._shift3 = (int)g_vectorZero.x; - pGVar9[1]._collisionClass = (int)fVar18; + pGVar9[1]._rng._shift3 = GHIDRA_INT(g_vectorZero.x); + pGVar9[1]._collisionClass = GHIDRA_INT(fVar18); pGVar2 = pGVar9 + 1; (pGVar2->_sprite)._filename._buf[0] = '\0'; (pGVar2->_sprite)._filename._buf[1] = '\0'; @@ -12033,15 +12033,15 @@ LAB_007fe8b6: (pAVar3->_filename)._buf[6] = '\0'; (pAVar3->_filename)._buf[7] = '\0'; } - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); if (pGVar9 != (GridEntity *)0x0) { (pGVar9->_desc)._type = 0xe; pGVar9->_gridIndex = pickIdx; if ((undefined4 *)local_20->_roomMap[pickIdx - 0x5eae] != (undefined4 *)0x0) { (*(code *)**(undefined4 **)local_20->_roomMap[pickIdx - 0x5eae])(1); } - local_20->_roomMap[pickIdx - 0x5eae] = (int)pGVar9; - (pGVar9->_desc)._variant = (int)local_18; + local_20->_roomMap[pickIdx - 0x5eae] = GHIDRA_INT(pGVar9); + (pGVar9->_desc)._variant = GHIDRA_INT(local_18); (pGVar9->_desc)._spawnSeed = local_30; iVar10 = *(int *)pGVar9; (pGVar9->_desc)._varData = 0; @@ -12057,12 +12057,12 @@ LAB_007fe8b6: } while (freeCells != puVar13); } if (freeCells != (undefined4 *)0x0) { - pickIdx = (int)freeCellsCapEnd - (int)freeCells & 0xfffffffc; + pickIdx = GHIDRA_INT(freeCellsCapEnd) - GHIDRA_INT(freeCells) & 0xfffffffc; puVar13 = freeCells; if (0xfff < pickIdx) { puVar13 = (undefined4 *)freeCells[-1]; pickIdx = pickIdx + 0x23; - if (0x1f < (uint)((int)freeCells + (-4 - (int)puVar13))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(freeCells) + (-4 - GHIDRA_INT(puVar13))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -12071,7 +12071,7 @@ LAB_007fe8b6: } FID_conflict__Erase_tree_>_> (&occupiedCells,(fuzzer_allocator_> *)&occupiedCells - ,*(_Tree_node **)((int)occupiedCells + 4)); + ,*(_Tree_node **)(GHIDRA_INT(occupiedCells) + 4)); operator_delete(occupiedCells,0x14); ExceptionList = local_10; return; @@ -12131,7 +12131,7 @@ void Room::TriggerBossDeath(Entity *entity) bool isAngelSpawnRoom; int *nodeEntityType; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); bossEntity = entity; if (entity->_type == 0x19b) { if (entity->_variant == 1) { @@ -12145,11 +12145,11 @@ void Room::TriggerBossDeath(Entity *entity) (local_21 = '\x01', this->_roomType != 1)) { local_21 = '\0'; } - uVar4 = (uint)entity->_flags; + uVar4 = GHIDRA_UINT(entity->_flags); if ((uVar4 & 0x80100000) != 0) { return; } - *(undefined4 *)((int)&entity->_flags + 4) = *(undefined4 *)((int)&entity->_flags + 4); + *(undefined4 *)(GHIDRA_INT(&entity->_flags) + 4) = *(undefined4 *)(GHIDRA_INT(&entity->_flags) + 4); *(uint *)&entity->_flags = uVar4 | 0x100000; if ((uVar4 & 0x20000000) != 0) { return; @@ -12213,18 +12213,18 @@ LAB_007fed8f: (((g_manager->_musicManager)._currentMusicID != uVar6 && (((Music *)((Music *)&g_manager->_musicManager))->Music::Play(uVar6, (g_manager->_optionsConfig)._musicVolume), - 0x25 < ((int)(g_manager->_musicManager)._entries._end - - (int)(g_manager->_musicManager)._entries._begin) / 0x60)))))) { + 0x25 < (GHIDRA_INT((g_manager->_musicManager)._entries._end) - + GHIDRA_INT((g_manager->_musicManager)._entries._begin)) / 0x60)))))) { (g_manager->_musicManager)._queuedMusicID = 0x25; } if ((local_30->_roomType == 5) || (local_30->_roomType == 0x11)) { - auStack_90._0_4_ = ((RNG *)(&rng))->RNG::Next(); + (*(undefined4 *)((char *)&(auStack_90) + 0x0)) = ((RNG *)(&rng))->RNG::Next(); VStack_78.y = (float)entity->_initSeed; VStack_70.y = 9.80909e-45; - auStack_90._4_8_ = 0x900000002; + (*(undefined8 *)((char *)&(auStack_90) + 0x4)) = 0x900000002; iStack_84 = 0xf; - auStack_b0._0_8_ = 0xd00000003; - VStack_50.y = (float)auStack_90._0_4_; + (*(undefined8 *)((char *)&(auStack_b0) + 0x0)) = 0xd00000003; + VStack_50.y = (*(undefined4 *)((char *)&((float)auStack_90) + 0x0)); if (local_30->_roomType == 0x11) { VStack_60.y = 1.4013e-45; if (((g_manager->_persistentGameData)._achievements[0x21] != 0) || @@ -12232,9 +12232,9 @@ LAB_007fed8f: (((g_game->_dailyChallenge)._id != 0 || (g_game->_isDebug != 0)))))) { uVar4 = ((RNG *)((RNG *)auStack_90))->RNG::RandomInt(2); VStack_60.y = (float)(1 - uVar4); - VStack_50.y = (float)auStack_90._0_4_; + VStack_50.y = (*(undefined4 *)((char *)&((float)auStack_90) + 0x0)); } - auStack_90._0_4_ = VStack_50.y; + (*(undefined4 *)((char *)&(auStack_90) + 0x0)) = VStack_50.y; bVar2 = Game::IsHardMode(); if (bVar2 == 0) { fVar7 = VStack_60.y; @@ -12242,8 +12242,8 @@ LAB_007fed8f: } LAB_007fef9b: uVar4 = ((RNG *)((RNG *)auStack_90))->RNG::RandomInt(2); - fVar7 = (float)((int)VStack_60.y - uVar4); - pcVar11 = (code *)auStack_90._0_4_; + fVar7 = (float)(GHIDRA_INT(VStack_60.y) - uVar4); + pcVar11 = (*(undefined4 *)((char *)&((code *)auStack_90) + 0x0)); VStack_60.y = fVar7; } else { @@ -12262,7 +12262,7 @@ LAB_007feffd: pcVar11 = (code *)VStack_50.y; } uVar4 = rng._seed; - if (0 < (int)fVar7) { + if (0 < GHIDRA_INT(fVar7)) { do { if (uVar4 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -12281,7 +12281,7 @@ LAB_007feffd: (*pcVar11)(); return; } - uVar6 = (uint)pcVar11 >> (auStack_90[4] & 0x1f) ^ (uint)pcVar11; + uVar6 = GHIDRA_UINT(pcVar11) >> (auStack_90[4] & 0x1f) ^ GHIDRA_UINT(pcVar11); uVar6 = uVar6 << (auStack_90[8] & 0x1f) ^ uVar6; pcVar11 = (code *)(uVar6 >> ((byte)iStack_84 & 0x1f) ^ uVar6); if (VStack_78.y == 0.0) { @@ -12290,7 +12290,7 @@ LAB_007feffd: (*pcVar11)(); return; } - uVar6 = (uint)VStack_78.y >> (auStack_b0[0] & 0x1f) ^ (uint)VStack_78.y; + uVar6 = GHIDRA_UINT(VStack_78.y) >> (auStack_b0[0] & 0x1f) ^ GHIDRA_UINT(VStack_78.y); subRng._shift1 = 3; subRng._shift2 = 1; uVar6 = uVar6 << (auStack_b0[4] & 0x1f) ^ uVar6; @@ -12302,10 +12302,10 @@ LAB_007feffd: (*pcVar11)(); return; } - uVar6 = (uint)VStack_78.y >> 3 ^ (uint)VStack_78.y; + uVar6 = GHIDRA_UINT(VStack_78.y) >> 3 ^ GHIDRA_UINT(VStack_78.y); uVar6 = uVar6 << 1 ^ uVar6; uVar6 = uVar6 >> 0xe ^ uVar6; - fVar7 = (float)((double)(int)uVar6 + __uint_to_double_fixup[-((int)uVar6 >> 0x1f)]) * + fVar7 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283062e-10 * 3.14; VStack_50.y = fVar7 + fVar7; VStack_2c.x = cos(VStack_50.y); @@ -12314,9 +12314,9 @@ LAB_007feffd: VStack_2c.y = VStack_2c.y * 7.0; pVVar5 = FindFreePickupSpawnPosition (g_game->_room,(Vector *)(auStack_a0 + 8),&VStack_80,0.0,0,0,0); - ((Game *)(g_game))->Game::Spawn(5,10,pVVar5,&VStack_2c,entity,0,(uint)pcVar11); + ((Game *)(g_game))->Game::Spawn(5,10,pVVar5,&VStack_2c,entity,0,GHIDRA_UINT(pcVar11)); } - VStack_60.y = (float)((int)VStack_60.y + -1); + VStack_60.y = (float)(GHIDRA_INT(VStack_60.y) + -1); } while (VStack_60.y != 0.0); VStack_60.y = 0.0; rng._seed = uVar4; @@ -12351,8 +12351,8 @@ DAT_007ff20d: uVar6 = ((RNG *)(&rng))->RNG::Next(); bVar2 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(0x16); if ((bVar2 == 0) || (uVar6 == (uVar6 / 5) * 5)) { - auStack_90._0_4_ = entity->_initSeed; - auStack_90._4_8_ = 0x500000003; + (*(undefined4 *)((char *)&(auStack_90) + 0x0)) = entity->_initSeed; + (*(undefined8 *)((char *)&(auStack_90) + 0x4)) = 0x500000003; iStack_84 = 0x16; uVar6 = ((RNG *)(&rng))->RNG::Next(); uVar3 = ((RNG *)((RNG *)auStack_90))->RNG::Next(); @@ -12399,8 +12399,8 @@ DAT_007ff20d: entity = bossEntity; } uVar4 = 0; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { player = ((Game *)(g_game))->Game::GetPlayer(uVar4); ((Entity_Player *)(player))->Entity_Player::SetFullHearts(); @@ -12408,17 +12408,17 @@ DAT_007ff20d: bVar2 = ((Entity_Player *)(player))->Entity_Player::HasCollectible(0x24c,0); if (((bVar2 != 0) && (pvVar1 = (g_manager->_itemConfig)._nullItems._begin, - 0xe0 < (int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar1 & - 0xfffffffcU))) && + 0xe0 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar1) & + 0xfffffffcU)))) && (pcVar11 = *(code **)((char *)pvVar1 + 0xe0), pcVar11 != (code *)0x0)) { - auStack_90._4_8_ = (ulonglong)*(uint *)(pcVar11 + 0x78) << 0x20; + (*(undefined8 *)((char *)&(auStack_90) + 0x4)) = (ulonglong)*(uint *)(pcVar11 + 0x78) << 0x20; iStack_84 = 0; - auStack_90._0_4_ = pcVar11; + (*(undefined4 *)((char *)&(auStack_90) + 0x0)) = pcVar11; ((TemporaryEffects *)(&player->_temporaryeffects))->TemporaryEffects::AddEffect(auStack_90,1,1); } uVar4 = uVar4 + 1; - } while (uVar4 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (uVar4 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); } ((Level *)((Level *)g_game))->Level::RemoveCurses(0xffffffff); ((Level *)((Level *)g_game))->Level::ShowMap(); @@ -12490,8 +12490,8 @@ LAB_007ff7d4: ((local_30->_roomType == 5 && (bVar2 = ((Game *)(g_game))->Game::IsGreedMode(), bVar2 != 0)))) && ((uVar4 = GetBossVictoryJingle(local_30), uVar4 != 0 && (((Music *)((Music *)&g_manager->_musicManager))->Music::Play(uVar4,(g_manager->_optionsConfig)._musicVolume), - 0x25 < ((int)(g_manager->_musicManager)._entries._end - - (int)(g_manager->_musicManager)._entries._begin) / 0x60)))) { + 0x25 < (GHIDRA_INT((g_manager->_musicManager)._entries._end) - + GHIDRA_INT((g_manager->_musicManager)._entries._begin)) / 0x60)))) { (g_manager->_musicManager)._queuedMusicID = 0x25; } if (local_21 != '\0') goto LAB_007fffcd; @@ -12504,7 +12504,7 @@ LAB_007ff7d4: (g_game->_room,(Vector *)(auStack_90 + 8),&VStack_2c,0.0,0,0,0); ((Game *)(g_game))->Game::Spawn(5,0x15e,pVVar5,&g_vectorZero,entity,0x3d,uVar4); ((PersistentGameData *)(&g_manager->_persistentGameData))->PersistentGameData::TryUnlock(0x4d); - bossType = (int)VStack_68.y; + bossType = GHIDRA_INT(VStack_68.y); goto LAB_00800005; } if ((Entity *)bossType != (Entity *)0x26) { @@ -12580,7 +12580,7 @@ LAB_007ffad3: } goto code_r0x007ffbb6; case 0x33: - uVar4 = (-(uint)((uint)VStack_58.y % 10 != 1) & 0xffffffb1) + 0x80; + uVar4 = (-GHIDRA_UINT((GHIDRA_UINT(VStack_58.y) % 10 != 1)) & 0xffffffb1) + 0x80; goto code_r0x007ffbb6; case 0x34: uVar4 = 0x41; @@ -12607,12 +12607,12 @@ code_r0x007ffbb6: goto code_r0x007fffc0; } LAB_007ffaf7: - if ((undefined1 *)((int)&(((Entity *)(bossType + -0x410))->_dropRNG)._shift1 + 2) < + if ((undefined1 *)(GHIDRA_INT(&(((Entity *)(bossType + -0x410))->_dropRNG)._shift1) + 2) < &DAT_00000007) goto code_r0x007ffb03; goto LAB_007fffcd; } code_r0x007ffb03: - switch((&PTR_DAT_008004c0)[(int)((int)&(((Entity *)(bossType + -0x410))->_dropRNG)._shift1 + 2)]) + switch((&PTR_DAT_008004c0)[GHIDRA_INT((GHIDRA_INT(&(((Entity *)(bossType + -0x410))->_dropRNG)._shift1) + 2))]) { case (undefined *)0x7ffc4e: uVar3 = 0x46; @@ -12620,10 +12620,10 @@ code_r0x007ffb03: case (undefined *)0x7ffc58: uVar3 = 10; code_r0x007ffe1d: - auStack_a0._0_4_ = entity->_initSeed; + (*(undefined4 *)((char *)&(auStack_a0) + 0x0)) = entity->_initSeed; iStack_94 = 0x1d; - auStack_a0._4_4_ = 3; - auStack_a0._8_4_ = 3; + (*(undefined4 *)((char *)&(auStack_a0) + 0x4)) = 3; + (*(undefined4 *)((char *)&(auStack_a0) + 0x8)) = 3; uVar4 = ((RNG *)((RNG *)auStack_a0))->RNG::Next(); pVVar5 = RandomVector((Vector *)(auStack_90 + 8),uVar4); VStack_70.y = pVVar5->y * 5.0; @@ -12635,7 +12635,7 @@ code_r0x007ffe1d: VStack_38.y = (float)((RNG *)(&rng))->RNG::Next(); if (((uVar3 != 10) || (bVar2 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(0x16), bVar2 == 0)) || - (((uint)VStack_38.y & 1) == 0)) { + ((GHIDRA_UINT(VStack_38.y) & 1) == 0)) { uVar6 = ((RNG *)(&rng))->RNG::Next(); VStack_38.x = VStack_70.x * -1.0; VStack_68.x = (entity->_pos).x; @@ -12649,12 +12649,12 @@ code_r0x007ffe1d: goto LAB_007fffcd; case (undefined *)0x7ffc62: uVar4 = entity->_initSeed; - auStack_a0._4_4_ = 3; - auStack_a0._8_4_ = 3; + (*(undefined4 *)((char *)&(auStack_a0) + 0x4)) = 3; + (*(undefined4 *)((char *)&(auStack_a0) + 0x8)) = 3; VStack_38.y = (float)&DAT_0000001d; uVar6 = ((RNG *)(&rng))->RNG::RandomInt(5); VStack_60.y = (float)(uVar6 + 4); - if (0 < (int)VStack_60.y) { + if (0 < GHIDRA_INT(VStack_60.y)) { uVar6 = rng._seed; do { if (uVar4 == 0) { @@ -12678,11 +12678,11 @@ code_r0x007ffe1d: uVar3 = uVar4 >> 3 ^ uVar4; uVar3 = uVar3 << 1 ^ uVar3; uVar3 = uVar3 >> 0xe ^ uVar3; - fVar7 = (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + fVar7 = (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283062e-10 * 3.14; VStack_50.y = fVar7 + fVar7; uVar3 = Random(); - VStack_78.y = (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + VStack_78.y = (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 5.0 + 2.0; VStack_2c.x = cos(VStack_50.y); VStack_2c.x = VStack_2c.x * VStack_78.y; @@ -12700,10 +12700,10 @@ code_r0x007ffe1d: uVar6 = uVar6 >> ((byte)rng._shift3 & 0x1f) ^ uVar6; VStack_80.x = (entity->_pos).x; ((Game *)(g_game))->Game::Spawn(5,0x14,&VStack_80,&VStack_2c,entity,0,uVar6); - VStack_60.y = (float)((int)VStack_60.y + -1); + VStack_60.y = (float)(GHIDRA_INT(VStack_60.y) + -1); } while (VStack_60.y != 0.0); VStack_60.y = 0.0; - bossType = (int)VStack_68.y; + bossType = GHIDRA_INT(VStack_68.y); } goto LAB_007fffcd; case (undefined *)0x7ffe18: @@ -12825,7 +12825,7 @@ LAB_00800123: bStack_23 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasCollectible(0xee); bStack_22 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasCollectible(0xef); iVar10 = (this->_entityList)._updateEL._size; - VStack_68.y = (float)((uint)extraout_var << 8); + VStack_68.y = (float)(GHIDRA_UINT(extraout_var) << 8); local_21 = '\0'; if (iVar10 != 0) { piVar9 = (this->_entityList)._updateEL._data; @@ -12836,7 +12836,7 @@ LAB_00800123: local_21 = '\x01'; } else { - VStack_68.y = (float)((uint)VStack_68.y & 0xff); + VStack_68.y = (float)(GHIDRA_UINT(VStack_68.y) & 0xff); if (*(int *)(iVar8 + 0x30) == 0xef) { VStack_68.y = 1.4013e-45; } @@ -12856,7 +12856,7 @@ LAB_00800123: else { bStack_22 = '\0'; } - if (((bVar2 == 0) && (VStack_68.y._0_1_ == '\0')) && + if (((bVar2 == 0) && ((*(undefined1 *)((char *)&(VStack_68.y) + 0x0)) == '\0')) && ((bVar2 = ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::AnyoneHasTrinket(0x7b), bVar2 == 0 || (bStack_23 != 0)))) { bStack_23 = '\x01'; @@ -12984,18 +12984,18 @@ void Room::update_ambient_sounds() avgPlayerVelY = 0.0; avgPlayerVelX = 0.0; fVar8 = (float)0; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { playerListEnd = (playerManager->_playerList)._end; - if ((int)playerListEnd - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (playerManager->_playerList)._end; fVar9 = avgPlayerVelY; fVar10 = avgPlayerVelX; } piVar4 = (playerManager->_playerList)._begin; - if (playerIdx < (uint)((int)playerListEnd - (int)piVar4 >> 2)) { + if (playerIdx < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(piVar4) >> 2))) { piVar4 = piVar4 + playerIdx; } iVar3 = *piVar4; @@ -13011,7 +13011,7 @@ void Room::update_ambient_sounds() } fVar10 = *(float *)(iVar3 + 0x360) + avgPlayerVelX; fVar9 = *(float *)(iVar3 + 0x364) + avgPlayerVelY; - local_6c = (float)((int)local_6c + 1); + local_6c = (float)(GHIDRA_INT(local_6c) + 1); avgPlayerVelY = fVar9; avgPlayerVelX = fVar10; } @@ -13022,17 +13022,17 @@ LAB_0080060f: playerManager = &g_game->_playerManager; fVar8 = local_6c; } while (playerIdx < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } DAT_00c5c4d8 = g_manager->_framecount; - if ((int)fVar8 < 1) { + if (GHIDRA_INT(fVar8) < 1) { avgPlayerVelY = g_vectorZero.y; avgPlayerVelX = g_vectorZero.x; } else { - avgPlayerVelY = fVar9 / (float)(int)fVar8; - avgPlayerVelX = fVar10 / (float)(int)fVar8; + avgPlayerVelY = fVar9 / (float)GHIDRA_INT(fVar8); + avgPlayerVelX = fVar10 / (float)GHIDRA_INT(fVar8); } } fireVolume = 0.0; @@ -13068,7 +13068,7 @@ LAB_00801137: } else { do { - iVar3 = *(int *)((int)(sfxManager->_entityList)._updateEL._data + (int)local_24 * 4); + iVar3 = *(int *)(GHIDRA_INT((sfxManager->_entityList)._updateEL._data) + GHIDRA_INT(local_24) * 4); if (((*(int *)&game->_deathmatchManager < 2) || (iVar5 = 1, *(int *)(iVar3 + 0x28) != 1)) && (iVar5 = *(int *)(iVar3 + 0x28), 0x3dd < iVar5 - 10U)) { if (iVar5 != 7) { @@ -13332,8 +13332,8 @@ LAB_008008f0: } switchD_00800885_caseD_f: LAB_00801103: - local_24 = (float)((int)local_24 + 1); - } while ((uint)local_24 < (uint)(sfxManager->_entityList)._updateEL._size); + local_24 = (float)(GHIDRA_INT(local_24) + 1); + } while (GHIDRA_UINT(local_24) < GHIDRA_UINT((sfxManager->_entityList)._updateEL._size)); if (flyCount == 0) goto LAB_00801137; local_24 = flyBuzzPitch / (float)flyCount; } @@ -13349,7 +13349,7 @@ LAB_00801103: fVar8 = sqrtf((pfVar2[1] - playersCenter.y) * (pfVar2[1] - playersCenter.y) + (*pfVar2 - playersCenter.x) * (*pfVar2 - playersCenter.x)); pfVar2 = pfVar2 + 6; - local_24 = (float)((int)local_24 + -1); + local_24 = (float)(GHIDRA_INT(local_24) + -1); fVar8 = 1.0 - fVar8 / 900.0; if (fVar8 <= 0.0) { fVar8 = 0.0; @@ -13371,7 +13371,7 @@ LAB_00801103: if (((*(uint *)((char *)playerListEnd + 0x44) >> 5 & 1) != 0) && (0 < *(int *)((char *)playerListEnd + 0x54))) { local_24 = (float)(sfxManager->_gridHeight * sfxManager->_gridWidth); - if (0 < (int)local_24) { + if (0 < GHIDRA_INT(local_24)) { ppvVar6 = sfxManager->_gridEntities; do { playerListEnd = *ppvVar6; @@ -13389,7 +13389,7 @@ LAB_00801103: local_6c = fVar8 * fVar8 * 0.1 + local_6c; } ppvVar6 = ppvVar6 + 1; - local_24 = (float)((int)local_24 + -1); + local_24 = (float)(GHIDRA_INT(local_24) + -1); } while (local_24 != 0.0); } local_6c = local_6c * sfxManager->_lavaIntensity; @@ -13411,7 +13411,7 @@ LAB_0080141b: if (((sfxManager->_backdropType == 9) && ((*(uint *)((char *)playerListEnd + 0x44) >> 5 & 1) != 0)) && (0 < *(int *)((char *)playerListEnd + 0x54))) { local_24 = (float)(sfxManager->_gridHeight * sfxManager->_gridWidth); - if (0 < (int)local_24) { + if (0 < GHIDRA_INT(local_24)) { ppvVar6 = sfxManager->_gridEntities; do { playerListEnd = *ppvVar6; @@ -13429,7 +13429,7 @@ LAB_0080141b: sfxA3Volume = fVar8 * fVar8 * 0.1 + sfxA3Volume; } ppvVar6 = ppvVar6 + 1; - local_24 = (float)((int)local_24 + -1); + local_24 = (float)(GHIDRA_INT(local_24) + -1); } while (local_24 != 0.0); } if (1.0 <= sfxA3Volume) { @@ -13649,8 +13649,8 @@ LAB_00801544: iVar3 = g_game->_currentRoomIdx; local_14 = (float)g_game->_startingRoomIdx; if (-1 < iVar3) { - fVar8 = (float)((int)local_14 / 0xd - iVar3 / 0xd); - fVar9 = (float)(((iVar3 / 0xd - (int)local_14 / 0xd) * 0xd - iVar3) + (int)local_14); + fVar8 = (float)(GHIDRA_INT(local_14) / 0xd - iVar3 / 0xd); + fVar9 = (float)(((iVar3 / 0xd - GHIDRA_INT(local_14) / 0xd) * 0xd - iVar3) + GHIDRA_INT(local_14)); fVar8 = sqrtf(fVar8 * fVar8 + fVar9 * fVar9); if (0.0 < fVar8) { fVar9 = fVar9 * (1.0 / fVar8); @@ -13710,7 +13710,7 @@ void Room::UpdateGreedWave() if ((((game->_stage == 7) && (game->_roomType == 5)) && ((game->_levelStateFlags & 0x1000U) == 0)) && (uVar2 = 0, - (int)(game->_playerManager)._playerList._end - (int)(game->_playerManager)._playerList._begin + GHIDRA_INT((game->_playerManager)._playerList._end) - GHIDRA_INT((game->_playerManager)._playerList._begin) >> 2 != 0)) { while( true ) { player = ((Game *)(game))->Game::GetPlayer(uVar2); @@ -13718,14 +13718,14 @@ void Room::UpdateGreedWave() if (*playerY <= 320.0 && *playerY != 320.0) break; uVar2 = uVar2 + 1; game = g_game; - if ((uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2) <= uVar2) { + if (GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2)) <= uVar2) { return; } } if (player != (Entity_Player *)0x0) { ((Music *)((Music *)&g_manager->_musicManager))->Music::Play(9,(g_manager->_optionsConfig)._musicVolume); - descriptorFlags = (uint *)((int)game->_descriptor + 0x44); + descriptorFlags = (uint *)(GHIDRA_INT(game->_descriptor) + 0x44); *descriptorFlags = *descriptorFlags & 0xffffffbf; g_game->_levelStateFlags = g_game->_levelStateFlags | 0x1000; if (*(int *)(*(int *)((char *)game->_descriptor + 0x10) + 0xc) == 0) { @@ -13734,17 +13734,17 @@ void Room::UpdateGreedWave() local_10.y = (player->_pos).y; spawned = ((Game *)(g_game))->Game::SpawnEx(0x14,0,&local_10,&g_vectorZero,(Entity *)0x0,0xffffffff, uVar2,0); - flagsHigh = *(undefined4 *)((int)&spawned->_flags + 4); + flagsHigh = *(undefined4 *)(GHIDRA_INT(&spawned->_flags) + 4); iVar1 = *(int *)spawned; - *(uint *)&spawned->_flags = (uint)spawned->_flags & 0xfffffffb; - *(undefined4 *)((int)&spawned->_flags + 4) = flagsHigh; + *(uint *)&spawned->_flags = GHIDRA_UINT(spawned->_flags) & 0xfffffffb; + *(undefined4 *)(GHIDRA_INT(&spawned->_flags) + 4) = flagsHigh; (**(code **)(iVar1 + 0xc))(); } TriggerOutput(game,0); manager = g_manager; local_10.x = 2.66247e-43; seed_fart_sound_override((int *)&local_10); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_10.x,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_10.x),1.0,2,0,1.0,0.0); } } } @@ -13794,7 +13794,7 @@ void Room::update_deaths_list() else if ((*(undefined1 *)((char *)(in_ECX) + 0x1bbc)) == '\0') { if ((*(int *)markedEnemyRef == 0) && (uVar4 = 0, (in_ECX->_entityList)._updateEL._size != 0)) { do { - EVar1 = *(EntityPtr *)((int)(in_ECX->_entityList)._updateEL._data + uVar4 * 4); + EVar1 = *(EntityPtr *)(GHIDRA_INT((in_ECX->_entityList)._updateEL._data) + uVar4 * 4); bVar3 = ((Entity *)((Entity *)EVar1))->Entity::IsVulnerableEnemy((Entity *)0x0); if ((bVar3 != 0) && ((((*(uint *)((char *)EVar1 + 0x168) & 0x20000000) == 0 && @@ -13811,7 +13811,7 @@ void Room::update_deaths_list() if (rootParent != EVar1) goto LAB_008022c4; } markedEnemyRef = &(*(undefined1 *)((char *)(in_ECX) + 0x1bb8)); - candidate = *(int *)((int)(in_ECX->_entityList)._updateEL._data + uVar4 * 4); + candidate = *(int *)(GHIDRA_INT((in_ECX->_entityList)._updateEL._data) + uVar4 * 4); if (*(int *)markedEnemyRef != candidate) { if (*(int *)markedEnemyRef != 0) { local_18 = (EntityPtr *)markedEnemyRef; @@ -13841,7 +13841,7 @@ void Room::update_deaths_list() } LAB_008022c4: uVar4 = uVar4 + 1; - } while (uVar4 < (uint)(in_ECX->_entityList)._updateEL._size); + } while (uVar4 < GHIDRA_UINT((in_ECX->_entityList)._updateEL._size)); } goto LAB_0080212a; } @@ -13860,16 +13860,16 @@ LAB_0080212a: rng._shift3 = 0x1b; playerIndex = 0; rng._seed = uVar4; - if ((int)(g_game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { playersEnd = (playerManager->_playerList)._end; - if ((int)playersEnd - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(playersEnd) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playersEnd = (playerManager->_playerList)._end; } playerSlot = (playerManager->_playerList)._begin; - if (playerIndex < (uint)((int)playersEnd - (int)playerSlot >> 2)) { + if (playerIndex < GHIDRA_UINT((GHIDRA_INT(playersEnd) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + playerIndex; } player = (Entity_Player *)*playerSlot; @@ -13899,7 +13899,7 @@ LAB_0080212a: (*pcVar2)(); return; } - variantRoll = (uint)rng._seed >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; + variantRoll = GHIDRA_UINT(rng._seed) >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; variantRoll = variantRoll << ((byte)rng._shift2 & 0x1f) ^ variantRoll; variantRoll = variantRoll >> ((byte)rngShift3 & 0x1f) ^ variantRoll; pickupVariant = *(uint *)(&DAT_00b6c9c0 + (variantRoll % 5) * 4); @@ -13929,7 +13929,7 @@ LAB_0080212a: uVar4 = uVar4 >> ((byte)rngShift3 & 0x1f) ^ uVar4; rng._seed = uVar4; rewardPickup = ((Game *)(g_game))->Game::Spawn(5,pickupVariant,(Vector *)&(*(undefined1 *)((char *)(room) + 0x1bc0)), - &g_vectorZero,(Entity *)player,(uint)local_14,uVar4); + &g_vectorZero,(Entity *)player,GHIDRA_UINT(local_14),uVar4); rewardPickup->Update(); in_ECX = room; } @@ -13938,8 +13938,8 @@ LAB_0080212a: playerManager = &g_game->_playerManager; playerIndex = playerIndex + 1; } while (playerIndex < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } (*(undefined1 *)((char *)(in_ECX) + 0x1bbc)) = 1; } @@ -13989,12 +13989,12 @@ void Room::update_pressure_plates() } this->_hasTriggerPressurePlates = plateCount != 0; if (((plateCount != 0) || (isRewardPlatePressed)) && (iVar3 == 0)) { - puVar1 = (uint *)((int)this->_descriptor + 0x44); + puVar1 = (uint *)(GHIDRA_INT(this->_descriptor) + 0x44); *puVar1 = *puVar1 | 2; i = 0; if ((this->_entityList)._updateEL._size != 0) { do { - iVar3 = *(int *)((int)(this->_entityList)._updateEL._data + i * 4); + iVar3 = *(int *)(GHIDRA_INT((this->_entityList)._updateEL._data) + i * 4); if ((((1 < *(int *)&g_game->_deathmatchManager) && (*(int *)(iVar3 + 0x28) == 1)) || (*(int *)(iVar3 + 0x28) - 10U < 0x3de)) && (fireplace = (Entity_NPC *) @@ -14015,7 +14015,7 @@ void Room::update_pressure_plates() } } i = i + 1; - } while (i < (uint)(this->_entityList)._updateEL._size); + } while (i < GHIDRA_UINT((this->_entityList)._updateEL._size)); } } } @@ -14040,7 +14040,7 @@ void Room::update_door_targets() ) { MakeDoor(door,slot); door = *(GridEntity_Door **)((char *)door->_gridEntities + slotOffset + 0x6e4); - idx = *(int *)(slotOffset + (int)door->_descriptor); + idx = *(int *)(slotOffset + GHIDRA_INT(door->_descriptor)); if (-1 < idx) { pRVar1 = ((Level *)((Level *)g_game))->Level::GetRoomByIdx(idx,-1); if ((pRVar1->Data != (void *)0x0) && (door != (GridEntity_Door *)0x0)) { @@ -14200,7 +14200,7 @@ void Room::Update() local_14 = -NAN; puStack_18 = &LAB_00b014a8; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(local_1e8 + 0x76); + local_24 = __security_cookie ^ GHIDRA_UINT((local_1e8 + 0x76)); ExceptionList = &local_1c; (*(undefined1 *)((char *)(this) + 0x7220)) = 0; manager = g_manager; @@ -14226,7 +14226,7 @@ void Room::Update() in_stack_fffff500 = (Vector *)0x3f800000; in_stack_fffff4f8 = 0x802a87; in_stack_fffff4fc = local_9b8._capacity; - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_9b8._capacity,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_9b8._capacity),1.0,2,0,1.0,0.0); pGVar21 = g_game; piVar27 = (int *)puStack_20; } @@ -14246,21 +14246,21 @@ LAB_00802a8d: cornerTopLeft = iVar16 + 1; } local_9a4 = (Game *)(iVar16 + -2); - if ((((int)local_9a4 < 0) || (iVar16 <= (int)local_9a4)) || (iVar33 < 2)) { + if (((GHIDRA_INT(local_9a4) < 0) || (iVar16 <= GHIDRA_INT(local_9a4))) || (iVar33 < 2)) { cornerTopRight = -1; if (1 < this->_gridWidth) goto LAB_00802b01; LAB_00802b10: cornerBottomLeft = -1; } else { - cornerTopRight = iVar16 + (int)local_9a4; + cornerTopRight = iVar16 + GHIDRA_INT(local_9a4); LAB_00802b01: iVar16 = iVar33 + -2; if ((iVar16 < 0) || (iVar33 <= iVar16)) goto LAB_00802b10; cornerBottomLeft = iVar16 * this->_gridWidth + 1; } iVar16 = iVar33 + -2; - if (((((int)local_9a4 < 0) || (iVar28 = this->_gridWidth, iVar28 <= (int)local_9a4)) || + if ((((GHIDRA_INT(local_9a4) < 0) || (iVar28 = this->_gridWidth, iVar28 <= GHIDRA_INT(local_9a4))) || (iVar16 < 0)) || (iVar33 <= iVar16)) { cornerBottomRight = -1; } @@ -14282,18 +14282,18 @@ LAB_00802b01: } } myosotisRngShifts = 0x900000001; - local_9b8._end = (void *)(((int)local_a0c - (int)local_a10) / 0x78); + local_9b8._end = (void *)((GHIDRA_INT(local_a0c) - GHIDRA_INT(local_a10)) / 0x78); if (pfVar35 < local_9b8._end) { local_9b8._end = pfVar35; } local_9a4 = (Game *)0x0; local_9bc = (Game *)&DAT_0000001d; myosotisRngShift3 = 0x1d; - if (0 < (int)local_9b8._end) { + if (0 < GHIDRA_INT(local_9b8._end)) { local_99c = (Entity *)0x0; local_9a8 = *(Entity **)((char *)this->_descriptor + 0x58); do { - fVar17 = (float)((int)local_9b8._end - (int)local_9a4); + fVar17 = (float)(GHIDRA_INT(local_9b8._end) - GHIDRA_INT(local_9a4)); if (local_9a8 == (Entity *)0x0) { local_9a8 = (Entity *)fVar17; KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -14301,42 +14301,42 @@ LAB_00802b01: (*pcVar11)(); return; } - uVar18 = (uint)local_9a8 >> ((byte)myosotisRngShifts & 0x1f) ^ (uint)local_9a8; + uVar18 = GHIDRA_UINT(local_9a8) >> ((byte)myosotisRngShifts & 0x1f) ^ GHIDRA_UINT(local_9a8); uVar18 = uVar18 << (SUB81(myosotisRngShifts,4) & 0x1f) ^ uVar18; local_9c0 = (RNG *)(uVar18 >> ((byte)local_9bc & 0x1f) ^ uVar18); uVar18 = 0; if (fVar17 != 0.0) { - uVar18 = (uint)local_9c0 % (uint)fVar17; + uVar18 = GHIDRA_UINT(local_9c0) % GHIDRA_UINT(fVar17); } local_9a8 = (Entity *)fVar17; - if ((Game *)(uVar18 + (int)local_9a4) != local_9a4) { + if ((Game *)(uVar18 + GHIDRA_INT(local_9a4)) != local_9a4) { EntitySaveState::copy (&EStack_270, - (void *)((int)local_a10 + (int)(&local_99c->_sprite + -1) + 0xcc)); - local_14._0_1_ = 1; + (void *)(GHIDRA_INT(local_a10) + GHIDRA_INT((&local_99c->_sprite + -1)) + 0xcc)); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; FUN_004d3230(); FUN_004d3230(); - local_14 = (float)((uint)local_14._1_3_ << 8); + local_14 = (float)((*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8); invoke_pending_callbacks(&EStack_270); this = (Room *)local_9cc; } - local_9b8._begin = (void *)((int)local_a10 + (int)local_99c); + local_9b8._begin = (void *)(GHIDRA_INT(local_a10) + GHIDRA_INT(local_99c)); if (local_9c0 == (RNG *)0x0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar11 = (code *)swi(3); (*pcVar11)(); return; } - uVar18 = (uint)local_9c0 >> ((byte)myosotisRngShifts & 0x1f) ^ (uint)local_9c0; + uVar18 = GHIDRA_UINT(local_9c0) >> ((byte)myosotisRngShifts & 0x1f) ^ GHIDRA_UINT(local_9c0); uVar18 = uVar18 << (SUB81(myosotisRngShifts,4) & 0x1f) ^ uVar18; local_9a8 = (Entity *)(uVar18 >> ((byte)local_9bc & 0x1f) ^ uVar18); uVar18 = ((Game *)local_9b8._begin)->_roomList[0]._doors[1]; - uVar20._0_1_ = ((Game *)local_9b8._begin)->_bossChallenge; - uVar20._1_1_ = ((Game *)local_9b8._begin)->_devilRoomDisabled; - uVar20._2_2_ = *(undefined2 *)&(*(undefined1 *)((char *)(((Game *)local_9b8._begin)) + 0xa)); - local_a38.x = (float)(local_1e8[((uint)local_9a8 & 3) - 4] % ((Level *)this)->_curses) + (*(undefined1 *)((char *)&(uVar20) + 0x0)) = ((Game *)local_9b8._begin)->_bossChallenge; + (*(undefined1 *)((char *)&(uVar20) + 0x1)) = ((Game *)local_9b8._begin)->_devilRoomDisabled; + (*(undefined2 *)((char *)&(uVar20) + 0x2)) = *(undefined2 *)&(*(undefined1 *)((char *)(((Game *)local_9b8._begin)) + 0xa)); + local_a38.x = (float)(local_1e8[(GHIDRA_UINT(local_9a8) & 3) - 4] % ((Level *)this)->_curses) * 40.0 + 40.0; - local_a38.y = (float)(local_1e8[((uint)local_9a8 & 3) - 4] / ((Level *)this)->_curses) + local_a38.y = (float)(local_1e8[(GHIDRA_UINT(local_9a8) & 3) - 4] / ((Level *)this)->_curses) * 40.0 + 120.0; in_stack_fffff500 = FindFreePickupSpawnPosition((Room *)local_9cc,&local_a60,&local_a38,24.0,0,0,0); @@ -14345,14 +14345,14 @@ LAB_00802b01: in_stack_fffff4f8 = *(uint *)local_9b8._begin; in_stack_fffff4f4 = 0x802dc9; pEVar19 = (Entity_Pickup *) - ((Game *)(g_game))->Game::Spawn(in_stack_fffff4f8,(uint)in_stack_fffff4fc, + ((Game *)(g_game))->Game::Spawn(in_stack_fffff4f8,GHIDRA_UINT(in_stack_fffff4fc), in_stack_fffff500,&g_vectorZero,(Entity *)0x0,uVar20,uVar18); this = (Room *)local_9cc; Entity_Pickup::RestoreState((Room *)local_9cc,pEVar19,pvVar30); local_99c = (Entity *)&(local_99c->_sprite)._animState; - local_9a4 = (Game *)((int)local_9a4 + 1); + local_9a4 = (Game *)(GHIDRA_INT(local_9a4) + 1); pEVar19->_spawnGridIndex = -1; - } while ((int)local_9a4 < (int)local_9b8._end); + } while (GHIDRA_INT(local_9a4) < GHIDRA_INT(local_9b8._end)); } local_14 = -NAN; std::vector::_Tidy(); @@ -14368,25 +14368,25 @@ LAB_00802b01: if ((iVar16 == 0) && (pGVar21->_currentRoomIdx == -0xc)) { player = ((Game *)(pGVar21))->Game::GetPlayer(0); pvVar30 = (player->_collectibleRNGs)._end; - if ((int)pvVar30 - (int)(player->_collectibleRNGs)._begin >> 4 < 0x26f) { + if (GHIDRA_INT(pvVar30) - GHIDRA_INT((player->_collectibleRNGs)._begin) >> 4 < 0x26f) { KAGE_LogMessage(0x10,(byte *)"Collectible ID out of bounds!\n"); pvVar30 = (player->_collectibleRNGs)._end; } pvVar23 = (player->_collectibleRNGs)._begin; - uVar20 = ((int)pvVar30 - (int)pvVar23 >> 4) - 1; + uVar20 = (GHIDRA_INT(pvVar30) - GHIDRA_INT(pvVar23) >> 4) - 1; uVar18 = 0x26e; if (uVar20 < 0x26e) { uVar18 = uVar20; } - local_9c0 = (RNG *)(uVar18 * 0x10 + (int)pvVar23); + local_9c0 = (RNG *)(uVar18 * 0x10 + GHIDRA_INT(pvVar23)); local_9bc = g_game; local_9a8 = (Entity *)((RNG *)(local_9c0))->RNG::Next(); pvVar30 = (void *)0x0; pGVar21 = (Game *)0x0; - local_9f8._12_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(local_9f8) + 0xc)) = (void *)0x0; pfVar35 = (float *)0x0; local_9a0 = (Game *)0x0; - local_9f8._16_4_ = (float *)0x0; + (*(undefined4 *)((char *)&(local_9f8) + 0x10)) = (float *)0x0; local_9e4 = (float *)0x0; local_14 = 2.8026e-45; isAnyGenesisOutcome = '\0'; @@ -14394,14 +14394,14 @@ LAB_00802b01: local_99c = (Entity *)&(*(undefined1 *)((char *)(local_9bc) + 0x1af30)); do { if (0 < *(short *)local_99c) { - local_9a4 = (Game *)(int)*(short *)local_99c; - uVar20 = (int)pfVar35 - (int)pvVar30 >> 3; + local_9a4 = (Game *)GHIDRA_INT(*(short *)local_99c); + uVar20 = GHIDRA_INT(pfVar35) - GHIDRA_INT(pvVar30) >> 3; uVar18 = 0; if (uVar20 != 0) { do { if (*(float *)((char *)pvVar30 + uVar18 * 8) == fVar17) { - piVar27 = (int *)((int)pvVar30 + uVar18 * 8 + 4); - *piVar27 = (int)(*piVar27 + (int)local_9a4); + piVar27 = (int *)(GHIDRA_INT(pvVar30) + uVar18 * 8 + 4); + *piVar27 = GHIDRA_INT((*piVar27 + GHIDRA_INT(local_9a4))); if (*piVar27 < 0) { *(undefined4 *)((char *)pvVar30 + uVar18 * 8 + 4) = 0; } @@ -14410,7 +14410,7 @@ LAB_00802b01: uVar18 = uVar18 + 1; } while (uVar18 < uVar20); } - if ((int)local_9a4 < 1) { + if (GHIDRA_INT(local_9a4) < 1) { LAB_00802f53: } else { @@ -14420,57 +14420,57 @@ LAB_00802f53: *pfVar35 = fVar17; pfVar35[1] = (float)local_9a4; pfVar35 = pfVar35 + 2; - local_9f8._16_4_ = pfVar35; + (*(undefined4 *)((char *)&(local_9f8) + 0x10)) = pfVar35; goto LAB_00802f53; } std::vector<8byte>::_Emplace_reallocate(); local_9a0 = (Game *)local_9e4; - pvVar30 = (void *)local_9f8._12_4_; - pfVar35 = (float *)local_9f8._16_4_; + pvVar30 = (*(undefined4 *)((char *)&((void *)local_9f8) + 0xc)); + pfVar35 = (*(undefined4 *)((char *)&((float *)local_9f8) + 0x10)); } isAnyGenesisOutcome = '\x01'; pGVar21 = local_9a0; } this = (Room *)local_9cc; - fVar17 = (float)((int)fVar17 + 1); + fVar17 = (float)(GHIDRA_INT(fVar17) + 1); local_99c = (Entity *)&(*(undefined1 *)((char *)(local_99c) + 0x2)); - } while ((uint)fVar17 < 0x1f); + } while (GHIDRA_UINT(fVar17) < 0x1f); if (isAnyGenesisOutcome == '\0') { local_14 = -NAN; if (pvVar30 == (void *)0x0) goto LAB_008030f1; - uVar18 = ((int)pGVar21 - (int)pvVar30 >> 3) * 8; + uVar18 = (GHIDRA_INT(pGVar21) - GHIDRA_INT(pvVar30) >> 3) * 8; pvVar23 = pvVar30; if (0xfff < uVar18) { pvVar23 = *(void **)((char *)pvVar30 + -4); uVar18 = uVar18 + 0x23; - if (0x1f < (uint)((int)pvVar30 + (-4 - (int)pvVar23))) goto LAB_008030be; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar30) + (-4 - GHIDRA_INT(pvVar23))))) goto LAB_008030be; } operator_delete(pvVar23,uVar18); - local_9f8._12_4_ = (void *)0x0; - local_9f8._16_4_ = (float *)0x0; + (*(undefined4 *)((char *)&(local_9f8) + 0xc)) = (void *)0x0; + (*(undefined4 *)((char *)&(local_9f8) + 0x10)) = (float *)0x0; local_9e4 = (float *)0x0; ((Level *)this)->_roomList[0xa6].GridIndex = 0x3c; } else { in_stack_fffff500 = (Vector *)0x803072; rng._shift1 = 5; - rng._seed = (int)local_9a8; + rng._seed = GHIDRA_INT(local_9a8); rng._shift2 = 9; rng._shift3 = 7; pEVar32 = (Entity *) ((WeightedOutcomePicker *)((WeightedOutcomePicker *)(local_9f8 + 0xc)))->WeightedOutcomePicker::PickOutcome(rng) ; - *(short *)((char *)(&local_9bc->_itemPool + 1) + (int)pEVar32 * 2 + 0x4c) = - *(short *)((char *)(&local_9bc->_itemPool + 1) + (int)pEVar32 * 2 + 0x4c) + -1; + *(short *)((char *)(&local_9bc->_itemPool + 1) + GHIDRA_INT(pEVar32) * 2 + 0x4c) = + *(short *)((char *)(&local_9bc->_itemPool + 1) + GHIDRA_INT(pEVar32) * 2 + 0x4c) + -1; local_14 = -NAN; local_9a8 = pEVar32; - if ((void *)local_9f8._12_4_ != (void *)0x0) { - uVar18 = (int)local_9e4 - local_9f8._12_4_ & 0xfffffff8; - pvVar30 = (void *)local_9f8._12_4_; + if ((*(undefined4 *)((char *)&((void *)local_9f8) + 0xc)) != (void *)0x0) { + uVar18 = GHIDRA_INT(local_9e4) - (*(undefined4 *)((char *)&(local_9f8) + 0xc)) & 0xfffffff8; + pvVar30 = (*(undefined4 *)((char *)&((void *)local_9f8) + 0xc)); if (0xfff < uVar18) { - pvVar30 = *(void **)(local_9f8._12_4_ + -4); + pvVar30 = *(void **)((*(undefined4 *)((char *)&(local_9f8) + 0xc)) + -4); uVar18 = uVar18 + 0x23; - if (0x1f < (uint)(local_9f8._12_4_ + (-4 - (int)pvVar30))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(local_9f8) + 0xc)) + (-4 - GHIDRA_INT(pvVar30))))) { LAB_008030be: local_14 = -NAN; /* WARNING: Subroutine does not return */ @@ -14478,8 +14478,8 @@ LAB_008030be: } } operator_delete(pvVar30,uVar18); - local_9f8._12_4_ = (void *)0x0; - local_9f8._16_4_ = (float *)0x0; + (*(undefined4 *)((char *)&(local_9f8) + 0xc)) = (void *)0x0; + (*(undefined4 *)((char *)&(local_9f8) + 0x10)) = (float *)0x0; local_9e4 = (float *)0x0; } if (pEVar32 == (Entity *)0xffffffff) { @@ -14493,12 +14493,12 @@ LAB_008030f1: local_9a4 = (Game *)0x0; do { genesisRng = local_9c0; - local_9bc = (Game *)(*(int *)(*(int *)((char *)pvVar30 + 0x10) + 0x40) + (int)local_9a4); + local_9bc = (Game *)(*(int *)(*(int *)((char *)pvVar30 + 0x10) + 0x40) + GHIDRA_INT(local_9a4)); if (((local_9bc->_bossChallenge == 1) && (piVar27 = (int *)local_9bc->_stageType, *piVar27 == 5)) && (((short)piVar27[1] == 100 && (*(short *)((char *)piVar27 + 6) == 0)))) { iVar16 = (short)local_9bc->_stage + 1 + - (*(short *)((int)&local_9bc->_stage + 2) + 1) * ((Level *)this)->_curses; + (*(short *)(GHIDRA_INT(&local_9bc->_stage) + 2) + 1) * ((Level *)this)->_curses; local_9ac = &g_game->_itemPool; uVar18 = local_9c0->_seed; local_a04.x = (float)(iVar16 % ((Level *)this)->_curses) * 40.0 + 40.0; @@ -14517,7 +14517,7 @@ LAB_008030f1: uVar18 = uVar18 >> ((byte)genesisRng->_shift3 & 0x1f) ^ uVar18; genesisRng->_seed = uVar18; local_9ac = (ItemPool *) - ItemPool::GetCollectible(local_9ac,(int)local_9a8,uVar18,0,0,0); + ItemPool::GetCollectible(local_9ac,GHIDRA_INT(local_9a8),uVar18,0,0,0); uVar18 = genesisRng->_seed; if (uVar18 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -14538,17 +14538,17 @@ LAB_008030f1: in_stack_fffff4f8 = 5; in_stack_fffff4f4 = 0x803273; pEVar32 = ((Game *)(pGVar21))->Game::Spawn(5,100,in_stack_fffff500,&g_vectorZero,(Entity *)0x0, - (uint)local_9ac,uVar18); + GHIDRA_UINT(local_9ac),uVar18); if ((pEVar32 == (Entity *)0x0) || (pEVar32->_type != 5)) { pEVar32 = (Entity *)0x0; } - sVar29 = *(short *)((int)&local_9bc->_stage + 2); + sVar29 = *(short *)(GHIDRA_INT(&local_9bc->_stage) + 2); iVar33 = local_9bc->_stage; iVar16 = ((Level *)this)->_curses; - *(uint *)&pEVar32->_flags = (uint)pEVar32->_flags | 0x40000; + *(uint *)&pEVar32->_flags = GHIDRA_UINT(pEVar32->_flags) | 0x40000; pEVar32->_spawnGridIndex = (short)iVar33 + 1 + (sVar29 + 1) * iVar16; - *(undefined4 *)((int)&pEVar32->_flags + 4) = - *(undefined4 *)((int)&pEVar32->_flags + 4); + *(undefined4 *)(GHIDRA_INT(&pEVar32->_flags) + 4) = + *(undefined4 *)(GHIDRA_INT(&pEVar32->_flags) + 4); if (((char)((Level *)this)->_stage != '\0') && (4 < g_game->_frameCount - *(int *)&(*(undefined1 *)((char *)&(((Level *)this)->_roomList[0x18]) + 0x9c)))) { @@ -14561,10 +14561,10 @@ LAB_008030f1: } } pvVar30 = (void *)((Level *)this)->_stageType; - local_9a4 = (Game *)((int)local_9a4 + 0x10); + local_9a4 = (Game *)(GHIDRA_INT(local_9a4) + 0x10); local_99c = (Entity *)&(*(undefined1 *)((char *)(local_99c) + 0x1)); } while (local_99c < - (undefined1 *)(uint)*(ushort *)(*(int *)((char *)pvVar30 + 0x10) + 0x44)); + (undefined1 *)GHIDRA_UINT(*(ushort *)(*(int *)((char *)pvVar30 + 0x10) + 0x44))); } } } @@ -14581,7 +14581,7 @@ LAB_008030f1: fVar17 = time_scale_update(this); (manager->_musicManager)._targetPitch = fVar17; } - if (*(char *)((int)&((Level *)this)->_roomList[0xa0].Dimension + 1) == '\0') { + if (*(char *)(GHIDRA_INT(&((Level *)this)->_roomList[0xa0].Dimension) + 1) == '\0') { for (piVar27 = (int *)((Level *)this)->_roomList[0xa0].GridIndex; piVar27 != (int *)((Level *)this)->_roomList[0xa0].SafeGridIndex; piVar27 = piVar27 + 4) { if ((*(int *)*piVar27 == 0) && (((int *)*piVar27)[1] == 0x40)) { @@ -14616,15 +14616,15 @@ LAB_008030f1: g_game->_lastRoomIdx + 1000,uVar18); } else { - *(int *)(*(int *)local_a90._4_4_ + 0x30) = g_game->_lastRoomIdx + 1000; + *(int *)(*(*(undefined4 *)((char *)&((int *)local_a90) + 0x4)) + 0x30) = g_game->_lastRoomIdx + 1000; } - if ((*(char *)((int)&((Level *)this)->_stage + 1) != '\0') && + if ((*(char *)(GHIDRA_INT(&((Level *)this)->_stage) + 1) != '\0') && (*(int *)&(*(undefined1 *)((char *)&(((Level *)this)->_roomList[0x18]) + 0x9c)) == g_game->_frameCount)) { uVar18 = *(uint *)(((Level *)this)->_stageType + 0x5c); local_9a4 = (Game *)&DAT_00000007; - local_9f8._8_4_ = &DAT_00000007; - local_9f8._0_4_ = (void *)0x5; - local_9f8._4_4_ = (void *)0x9; + (*(undefined4 *)((char *)&(local_9f8) + 0x8)) = &DAT_00000007; + (*(undefined4 *)((char *)&(local_9f8) + 0x0)) = (void *)0x5; + (*(undefined4 *)((char *)&(local_9f8) + 0x4)) = (void *)0x9; FindFreePickupSpawnPosition(this,&local_9e0,(Vector *)((Level *)this)->_roomList,0.0,1,0,0); if (uVar18 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -14654,7 +14654,7 @@ LAB_008030f1: } uVar20 = Random(); in_stack_fffff4f4 = 0x8035a6; - ((Game *)(g_game))->Game::Spawn(5,(uint)local_9a0,&local_9e0,&g_vectorZero,(Entity *)0x0,1,uVar20); + ((Game *)(g_game))->Game::Spawn(5,GHIDRA_UINT(local_9a0),&local_9e0,&g_vectorZero,(Entity *)0x0,1,uVar20); in_stack_fffff500 = &local_a28; local_a28.x = (float)((Level *)this)->_roomList[0].ListIndex + 0.0; local_a28.y = (float)((Level *)this)->_roomList[0].Dimension + 32.0; @@ -14673,7 +14673,7 @@ LAB_008030f1: uVar18 = uVar18 >> (local_9f8[0] & 0x1f) ^ uVar18; uVar18 = uVar18 << (local_9f8[4] & 0x1f) ^ uVar18; pEVar32 = (Entity *)(uVar18 >> ((byte)local_9a4 & 0x1f) ^ uVar18); - uVar18 = (uint)pEVar32 % 100; + uVar18 = GHIDRA_UINT(pEVar32) % 100; local_9a8 = pEVar32; if (uVar18 < 0x19) { uVar18 = Random(); @@ -14684,7 +14684,7 @@ LAB_0080377c: in_stack_fffff500 = &local_9e0; in_stack_fffff4f8 = 5; in_stack_fffff4f4 = 0x803789; - ((Game *)(g_game))->Game::Spawn(5,(uint)in_stack_fffff4fc,in_stack_fffff500,&g_vectorZero,(Entity *)0x0, + ((Game *)(g_game))->Game::Spawn(5,GHIDRA_UINT(in_stack_fffff4fc),in_stack_fffff500,&g_vectorZero,(Entity *)0x0, uVar20,uVar18); } else if (uVar18 < 0x32) { @@ -14721,7 +14721,7 @@ LAB_0080377c: (*pcVar11)(); return; } - uVar18 = (uint)pEVar32 >> (local_9f8[0] & 0x1f) ^ (uint)pEVar32; + uVar18 = GHIDRA_UINT(pEVar32) >> (local_9f8[0] & 0x1f) ^ GHIDRA_UINT(pEVar32); uVar18 = uVar18 << (local_9f8[4] & 0x1f) ^ uVar18; if (((uVar18 >> ((byte)local_9a4 & 0x1f) ^ uVar18) & 3) == 0) { local_a40.y = (float)((Level *)this)->_roomList[0].Dimension; @@ -14738,7 +14738,7 @@ LAB_0080377c: local_14 = -NAN; if (local_a90[0] == '\0') { local_14 = 5.60519e-45; - tracked_alloc(1,(void *)local_a90._4_4_,0); + tracked_alloc(1,(*(undefined4 *)((char *)&((void *)local_a90) + 0x4)),0); local_14 = -NAN; } } @@ -14756,11 +14756,11 @@ LAB_0080377c: (local_9a4 = (Game *)0x0, ((Level *)this)->_roomList[0x19].DecorationSeed != 0)) { do { pGVar21 = *(Game **)(*(int *)&((Level *)this)->_roomList[0x19].PoopCount + - (int)local_9a4 * 4); + GHIDRA_INT(local_9a4) * 4); if ((pGVar21 == (Game *)0x0) || (((*(int *)&g_game->_deathmatchManager < 2 || (pGVar21->_roomList[0].OverrideData != (void *)0x1)) && - (0x3dd < (int)pGVar21->_roomList[0].OverrideData - 10U)))) { + (0x3dd < GHIDRA_INT(pGVar21->_roomList[0].OverrideData) - 10U)))) { local_9bc = (Game *)0x0; } else { @@ -14781,15 +14781,15 @@ LAB_0080377c: } } } - local_9a4 = (Game *)((int)local_9a4 + 1); + local_9a4 = (Game *)(GHIDRA_INT(local_9a4) + 1); } while (local_9a4 < (int *)((Level *)this)->_roomList[0x19].DecorationSeed); } local_9a8 = (Entity *)PlayerManager::GetGFuelCount(); - if ((3 < (int)local_9a8) && + if ((3 < GHIDRA_INT(local_9a8)) && (local_9b8._begin = (Game *)0x0, ((Level *)this)->_roomList[0x19].DecorationSeed != 0)) { do { pGVar21 = *(Game **)(*(int *)&((Level *)this)->_roomList[0x19].PoopCount + - (int)local_9b8._begin * 4); + GHIDRA_INT(local_9b8._begin) * 4); if ((pGVar21 == (Game *)0x0) || (((*(int *)&g_game->_deathmatchManager < 2 || (*(int *)((char *)pGVar21 + 0x28) != 1)) && (0x3dd < *(int *)((char *)pGVar21 + 0x28) - 10U)))) { @@ -14828,10 +14828,10 @@ LAB_0080377c: } } local_99c = (Entity *)&(*(undefined1 *)((char *)&(local_99c[-1]) + 0x40f)); - } while (0 < (int)local_99c); + } while (0 < GHIDRA_INT(local_99c)); } } - local_9b8._begin = (void *)((int)local_9b8._begin + 1); + local_9b8._begin = (void *)(GHIDRA_INT(local_9b8._begin) + 1); } while (local_9b8._begin < (Game *)((Level *)this)->_roomList[0x19].DecorationSeed); } } @@ -14862,8 +14862,8 @@ LAB_0080377c: FID_conflict__Erase_tree_>_> (ppvVar36,(fuzzer_allocator_> *)ppvVar36, (_Tree_node *)pGVar21->_stageType); - pGVar21->_stageType = (int)pGVar21; - pGVar21->_stage = (int)pGVar21; + pGVar21->_stageType = GHIDRA_INT(pGVar21); + pGVar21->_stage = GHIDRA_INT(pGVar21); *(Game **)&pGVar21->_bossChallenge = pGVar21; *(undefined4 *)&(*(undefined1 *)((char *)&(((Level *)this)->_roomList[0x9e]) + 0x94)) = 0; } @@ -14879,10 +14879,10 @@ LAB_0080377c: iVar33 = ((Level *)this)->_curses; local_99c = (Entity *)&(*(undefined1 *)((char *)(local_99c) + 0x1)); ppvVar36 = ppvVar36 + 1; - } while ((int)local_99c < iVar33 * *(int *)&((Level *)this)->_isHeartPicked); - iVar16._0_1_ = ((Level *)this)->_isHeartPicked; - iVar16._1_1_ = ((Level *)this)->_isCanSeeEverything; - iVar16._2_2_ = *(undefined2 *)&(*(undefined1 *)((char *)(((Level *)this)) + 0x12)); + } while (GHIDRA_INT(local_99c) < iVar33 * *(int *)&((Level *)this)->_isHeartPicked); + (*(undefined1 *)((char *)&(iVar16) + 0x0)) = ((Level *)this)->_isHeartPicked; + (*(undefined1 *)((char *)&(iVar16) + 0x1)) = ((Level *)this)->_isCanSeeEverything; + (*(undefined2 *)((char *)&(iVar16) + 0x2)) = *(undefined2 *)&(*(undefined1 *)((char *)(((Level *)this)) + 0x12)); } local_9ac = (ItemPool *)0x3; local_9c0 = (void *)0x3e8; @@ -14912,9 +14912,9 @@ LAB_0080377c: *(short *)local_99c = sVar29; } local_99c = (Entity *)&(*(undefined1 *)((char *)(local_99c) + 0x2)); - local_9b8._end = (void *)((int)local_9b8._end + 1); + local_9b8._end = (void *)(GHIDRA_INT(local_9b8._end) + 1); piVar27 = piVar27 + 1; - } while ((int)local_9b8._end < + } while (GHIDRA_INT(local_9b8._end) < *(int *)&((Level *)this)->_isHeartPicked * ((Level *)this)->_curses); } player = PlayerManager::FirstCollectibleOwner @@ -14930,7 +14930,7 @@ LAB_0080377c: ((EntityList *)&((Level *)this)->_roomList[0x19].Dimension, (EntityList_EL *)in_stack_fffff4fc,5,100,-1,0,0); local_14 = 7.00649e-45; - if ((void *)local_a58._12_4_ == (void *)0x0) { + if ((*(undefined4 *)((char *)&((void *)local_a58) + 0xc)) == (void *)0x0) { ((Ambush *)(&g_game->_ambush))->Ambush::StartChallenge(); } local_14 = -NAN; @@ -14939,15 +14939,15 @@ LAB_0080377c: allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } - if (local_a58._4_4_ != 0) { - uVar18 = *(uint *)(local_a58._4_4_ + -4); + if ((*(undefined4 *)((char *)&(local_a58) + 0x4)) != 0) { + uVar18 = *(uint *)((*(undefined4 *)((char *)&(local_a58) + 0x4)) + -4); qVar12 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar18; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar18; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar12 < uVar18); - free((void *)(local_a58._4_4_ + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar12) < uVar18)); + free((void *)((*(undefined4 *)((char *)&(local_a58) + 0x4)) + -4)); } local_14 = -NAN; } @@ -14962,10 +14962,10 @@ LAB_0080377c: pvVar23 = (void *)(((Level *)this)->_roomList[0x1a].SafeGridIndex + ((Level *)this)->_roomList[0x1a].ListIndex); pvVar30 = (void *)0x0; - if (0 < (int)pvVar23) { + if (0 < GHIDRA_INT(pvVar23)) { pvVar30 = pvVar23; } - if (((int)pvVar30 < 1) && (0 < (int)((Level *)this)->_roomList[0x9e].RestrictedGridIndexes._head)) + if ((GHIDRA_INT(pvVar30) < 1) && (0 < GHIDRA_INT(((Level *)this)->_roomList[0x9e].RestrictedGridIndexes._head))) { if (g_manager->_netplayManager != *(NetplayManager *)(g_manager + 1)) { KAGE_LogMessage(1,(byte *)"[Frame %d] "); @@ -14975,7 +14975,7 @@ LAB_0080377c: ((Level *)this)->_roomList[0x9e].RestrictedGridIndexes._head = pvVar30; ((EntityList *)((EntityList *)&((Level *)this)->_roomList[0x19].Dimension))->EntityList::Update(0); ((Camera *)((Camera *)&((Level *)this)->_roomList[0x1e].SavedEntities))->Camera::Update(0); - if (*(char *)((int)((Level *)this)->_roomList[0x28]._doors + 0x1d) != '\0') { + if (*(char *)(GHIDRA_INT(((Level *)this)->_roomList[0x28]._doors) + 0x1d) != '\0') { ((AnimationState *)((AnimationState *)&((Level *)this)->_roomList[0x27].AllowedDoors))->AnimationState::Update(); ((AnimationState *)((AnimationState *)(((Level *)this)->_roomList[0x27]._doors + 7)))->AnimationState::Update(); } @@ -14991,7 +14991,7 @@ LAB_0080377c: bVar37 = bVar14 < *pbVar31; if (bVar14 != *pbVar31) { LAB_00803ee0: - uVar18 = -(uint)bVar37 | 1; + uVar18 = -GHIDRA_UINT(bVar37) | 1; goto LAB_00803ee5; } if (bVar14 == 0) break; @@ -15019,7 +15019,7 @@ LAB_00803f16: (g_game->_frameCount - *(int *)&(*(undefined1 *)((char *)&(((Level *)this)->_roomList[0x18]) + 0x9c)) == 1)) { ((Level *)((Level *)this))->Level::UpdateBackwardsPathStages(); } - if (*(char *)((int)&((Level *)this)->_roomList[0xa0].Dimension + 1) == '\0') { + if (*(char *)(GHIDRA_INT(&((Level *)this)->_roomList[0xa0].Dimension) + 1) == '\0') { for (piVar27 = (int *)((Level *)this)->_roomList[0xa0].GridIndex; piVar27 != (int *)((Level *)this)->_roomList[0xa0].SafeGridIndex; piVar27 = piVar27 + 4) { iVar16 = *(int *)*piVar27; @@ -15030,12 +15030,12 @@ LAB_00803f16: uVar18 = Random(); if ((uVar18 & 1) == 0) { uVar18 = Random(); - fVar17 = (float)((double)(int)uVar18 + __uint_to_double_fixup[-((int)uVar18 >> 0x1f)]) * + fVar17 = (float)((double)GHIDRA_INT(uVar18) + __uint_to_double_fixup[-(GHIDRA_INT(uVar18) >> 0x1f)]) * 2.3283064e-10 * 0.1 + 0.2; } else { uVar18 = Random(); - fVar17 = (float)((double)(int)uVar18 + __uint_to_double_fixup[-((int)uVar18 >> 0x1f)]) * + fVar17 = (float)((double)GHIDRA_INT(uVar18) + __uint_to_double_fixup[-(GHIDRA_INT(uVar18) >> 0x1f)]) * 2.3283064e-10 * 0.5 + 1.5; } (manager->_musicManager)._pitch = fVar17; @@ -15046,7 +15046,7 @@ LAB_00803f16: uVar18 = Random(); if ((uVar18 & 3) == 0) { uVar18 = Random(); - fVar17 = (float)((double)(int)uVar18 + __uint_to_double_fixup[-((int)uVar18 >> 0x1f)]) * + fVar17 = (float)((double)GHIDRA_INT(uVar18) + __uint_to_double_fixup[-(GHIDRA_INT(uVar18) >> 0x1f)]) * 2.3283064e-10 * 0.7 + 0.3; } else { @@ -15102,7 +15102,7 @@ LAB_00803f16: in_stack_fffff500 = (Vector *)g_game->_dungeonReturnRoomIndex; g_game->_enterDoor = -1; in_stack_fffff4fc = (Entity *)0x80420d; - Game::StartRoomTransition(pGVar21,(int)in_stack_fffff500,-1,0,(Entity_Player *)0x0,-1); + Game::StartRoomTransition(pGVar21,GHIDRA_INT(in_stack_fffff500),-1,0,(Entity_Player *)0x0,-1); } } else { @@ -15188,7 +15188,7 @@ LAB_00804511: in_stack_fffff4f8 = 1000; local_a20.x = ((float)((Level *)this)->_roomList[0].ListIndex - (float)((Level *)this)->_roomList[0].GridIndex) * - (float)((double)(int)uVar20 + __uint_to_double_fixup[-((int)uVar20 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar20) + __uint_to_double_fixup[-(GHIDRA_INT(uVar20) >> 0x1f)]) * 2.3283064e-10 + (float)((Level *)this)->_roomList[0].GridIndex; in_stack_fffff4f4 = 0x804585; pEVar32 = ((Game *)(g_game))->Game::Spawn(1000,0x29,in_stack_fffff500,&g_vectorZero,(Entity *)0x0,0,uVar18); @@ -15233,7 +15233,7 @@ LAB_0080439a: in_stack_fffff4f8 = 1000; local_9c8.x = ((float)((Level *)this)->_roomList[0].ListIndex - (float)((Level *)this)->_roomList[0].GridIndex) * - (float)((double)(int)uVar20 + __uint_to_double_fixup[-((int)uVar20 >> 0x1f)] + (float)((double)GHIDRA_INT(uVar20) + __uint_to_double_fixup[-(GHIDRA_INT(uVar20) >> 0x1f)] ) * 2.3283064e-10 + (float)((Level *)this)->_roomList[0].GridIndex; in_stack_fffff4f4 = 0x8044ff; pEVar32 = ((Game *)(g_game))->Game::Spawn(1000,0x57,in_stack_fffff500,&g_vectorZero,(Entity *)0x0,0, @@ -15256,25 +15256,25 @@ LAB_0080439a: if (uVar18 == 0x1b) { uVar18 = pGVar38->_frameCount & 0x80000003; bVar37 = uVar18 == 0; - if ((int)uVar18 < 0) { + if (GHIDRA_INT(uVar18) < 0) { bVar37 = (uVar18 - 1 | 0xfffffffc) == 0xffffffff; } if ((bVar37) && (uVar18 = Random(), uVar18 % 100 == 0)) { uVar18 = Random(); g_game->_lightningIntensity = - (float)((double)(int)uVar18 + __uint_to_double_fixup[-((int)uVar18 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar18) + __uint_to_double_fixup[-(GHIDRA_INT(uVar18) >> 0x1f)]) * 2.3283064e-10 * 0.6 + 1.3; uVar18 = Random(); manager = g_manager; local_99c = (Entity *)0x1d8; local_9a8 = (Entity *) - ((float)((double)(int)uVar18 + __uint_to_double_fixup[-((int)uVar18 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar18) + __uint_to_double_fixup[-(GHIDRA_INT(uVar18) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 0.9); seed_fart_sound_override((int *)&local_99c); in_stack_fffff500 = (Vector *)0x3f800000; in_stack_fffff4f8 = 0x8046e2; in_stack_fffff4fc = local_99c; - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_99c,1.0,0x5a,0,(float)local_9a8,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_99c),1.0,0x5a,0,(float)local_9a8,0.0); } } LAB_008046e2: @@ -15299,25 +15299,25 @@ LAB_008046e2: uVar18 = pGVar21->_frameCount - *(int *)&(*(undefined1 *)((char *)&(((Level *)this)->_roomList[0x18]) + 0x9c)) & 0x80000003; bVar37 = uVar18 == 0; - if ((int)uVar18 < 0) { + if (GHIDRA_INT(uVar18) < 0) { bVar37 = (uVar18 - 1 | 0xfffffffc) == 0xffffffff; } if (bVar37) { playerManager = &pGVar21->_playerManager; - if ((int)(pGVar21->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2 != 0) { + if (GHIDRA_INT((pGVar21->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { uVar18 = 0; pGVar21 = g_game; do { pvVar30 = (playerManager->_playerList)._end; - if ((int)pvVar30 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar30) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar30 = (playerManager->_playerList)._end; pGVar21 = g_game; pGVar38 = local_9a0; } pfVar35 = (playerManager->_playerList)._begin; - if (uVar18 < (uint)((int)pvVar30 - (int)pfVar35 >> 2)) { + if (uVar18 < GHIDRA_UINT((GHIDRA_INT(pvVar30) - GHIDRA_INT(pfVar35) >> 2))) { pfVar35 = pfVar35 + uVar18; } local_9a8 = (Entity *)*pfVar35; @@ -15357,8 +15357,8 @@ LAB_008046e2: } playerManager = &pGVar21->_playerManager; uVar18 = uVar18 + 1; - } while (uVar18 < (uint)((int)(pGVar21->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar18 < GHIDRA_UINT((GHIDRA_INT((pGVar21->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); this = (Room *)local_9cc; } } @@ -15367,34 +15367,34 @@ LAB_008046e2: if ((uVar18 & 1) == 0) { uVar18 = Random(); local_9a8 = (Entity *) - ((float)((double)(int)uVar18 + __uint_to_double_fixup[-((int)uVar18 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar18) + __uint_to_double_fixup[-(GHIDRA_INT(uVar18) >> 0x1f)]) * 2.3283064e-10 * -2.8799999); uVar18 = Random(); - local_a20.x = ((float)((double)(int)uVar18 + __uint_to_double_fixup[-((int)uVar18 >> 0x1f)]) * + local_a20.x = ((float)((double)GHIDRA_INT(uVar18) + __uint_to_double_fixup[-(GHIDRA_INT(uVar18) >> 0x1f)]) * 2.3283064e-10 - 0.5) * 0.4; local_a20.y = (float)local_9a8; uVar18 = Random(); fVar17 = (float)((Level *)this)->_roomList[0].GridIndex + 40.0; local_9a0 = (Game *)(((float)local_9a0 - fVar17) * - (float)((double)(int)uVar18 + - __uint_to_double_fixup[-((int)uVar18 >> 0x1f)]) * 2.3283064e-10 + + (float)((double)GHIDRA_INT(uVar18) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar18) >> 0x1f)]) * 2.3283064e-10 + fVar17); uVar18 = Random(); local_a40.y = (float)local_9a0; local_a40.x = (((Vector *)&((Level *)this)->_roomList[0].ListIndex)->x - (float)((Level *)this)->_roomList[0].GridIndex) * - (float)((double)(int)uVar18 + __uint_to_double_fixup[-((int)uVar18 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar18) + __uint_to_double_fixup[-(GHIDRA_INT(uVar18) >> 0x1f)]) * 2.3283064e-10 + (float)((Level *)this)->_roomList[0].GridIndex; uVar18 = Random(); pEVar32 = ((Game *)(g_game))->Game::Spawn(1000,0x42,&local_a40,&local_a20,(Entity *)0x0,10,uVar18); uVar18 = Random(); - fVar39 = (float)((double)(int)uVar18 + __uint_to_double_fixup[-((int)uVar18 >> 0x1f)]) * + fVar39 = (float)((double)GHIDRA_INT(uVar18) + __uint_to_double_fixup[-(GHIDRA_INT(uVar18) >> 0x1f)]) * 2.3283064e-10 * 1.2 + 0.8; fVar17 = fVar39 * g_vectorOne.x; (pEVar32->_sprite)._scale.y = fVar39 * g_vectorOne.y; (pEVar32->_sprite)._scale.x = fVar17; uVar18 = Random(); - if (uVar18 % (uint)local_9ac == 0) { + if (uVar18 % GHIDRA_UINT(local_9ac) == 0) { pEVar32->_renderDepthOffset = 80.0; } else { @@ -15418,38 +15418,38 @@ LAB_008046e2: iVar16 = ((Level *)this)->_roomList[0x9d].ListIndex; if (iVar16 < ((Level *)this)->_roomList[0x9d].Dimension) { ((Level *)this)->_roomList[0x9c].Group = - (int)((float)((Level *)this)->_roomList[0x9d].SafeGridIndex + - (float)((Level *)this)->_roomList[0x9c].Group); + GHIDRA_INT(((float)((Level *)this)->_roomList[0x9d].SafeGridIndex + + (float)((Level *)this)->_roomList[0x9c].Group)); ((Level *)this)->_roomList[0x9d].ListIndex = iVar16 + 1; } pvVar30 = ((Level *)this)->_roomList[0x9e].SavedGridEntities._capacity; - if (0 < (int)pvVar30) { + if (0 < GHIDRA_INT(pvVar30)) { psVar2 = &((Level *)this)->_roomList[0x9e].SavedEntities; local_9bc = (Game *)((float)((Level *)this)->_roomList[0].Dimension - (float)((Level *)this)->_roomList[0].SafeGridIndex); local_9a4 = (Game *)((float)((Level *)this)->_roomList[0].ListIndex - (float)((Level *)this)->_roomList[0].GridIndex); - ((Level *)this)->_roomList[0x9e].SavedGridEntities._capacity = (void *)((int)pvVar30 + -1); + ((Level *)this)->_roomList[0x9e].SavedGridEntities._capacity = (void *)(GHIDRA_INT(pvVar30) + -1); local_9b8._begin = (Game *)0x20; psVar26 = &local_9b8; - if ((int)psVar2->_begin < 0x20) { + if (GHIDRA_INT(psVar2->_begin) < 0x20) { psVar26 = psVar2; } local_9b8._capacity = (Entity *)0x0; - if (0 < (int)psVar26->_begin) { + if (0 < GHIDRA_INT(psVar26->_begin)) { local_9ac = (ItemPool *)((float)local_9a4 + (float)local_9a4); local_9a8 = (Entity *)((float)local_9bc + (float)local_9bc + (float)local_9ac); do { uVar18 = Random(); local_99c = (Entity *) - ((float)((double)(int)uVar18 + __uint_to_double_fixup[-((int)uVar18 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar18) + __uint_to_double_fixup[-(GHIDRA_INT(uVar18) >> 0x1f)]) * 2.3283064e-10 * (float)local_9a8); if ((float)local_9a4 <= (float)local_99c) { if ((float)local_9a4 + (float)local_9bc <= (float)local_99c) { if ((float)local_9bc + (float)local_9ac <= (float)local_99c) { uVar18 = Random(); uVar20 = Random(); - fVar17 = (float)((double)(int)uVar20 + __uint_to_double_fixup[-((int)uVar20 >> 0x1f)]) + fVar17 = (float)((double)GHIDRA_INT(uVar20) + __uint_to_double_fixup[-(GHIDRA_INT(uVar20) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_9b8._end = (void *)(fVar17 + fVar17); local_9a0 = (Game *)sin((float)local_9b8._end); @@ -15465,7 +15465,7 @@ LAB_008046e2: else { uVar18 = Random(); uVar20 = Random(); - fVar17 = (float)((double)(int)uVar20 + __uint_to_double_fixup[-((int)uVar20 >> 0x1f)]) + fVar17 = (float)((double)GHIDRA_INT(uVar20) + __uint_to_double_fixup[-(GHIDRA_INT(uVar20) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_9b8._end = (void *)(fVar17 + fVar17); local_9a0 = (Game *)sin((float)local_9b8._end); @@ -15482,7 +15482,7 @@ LAB_008046e2: else { uVar18 = Random(); uVar20 = Random(); - fVar17 = (float)((double)(int)uVar20 + __uint_to_double_fixup[-((int)uVar20 >> 0x1f)]) * + fVar17 = (float)((double)GHIDRA_INT(uVar20) + __uint_to_double_fixup[-(GHIDRA_INT(uVar20) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_9b8._end = (void *)(fVar17 + fVar17); local_9a0 = (Game *)sin((float)local_9b8._end); @@ -15499,7 +15499,7 @@ LAB_008046e2: else { uVar18 = Random(); uVar20 = Random(); - fVar17 = (float)((double)(int)uVar20 + __uint_to_double_fixup[-((int)uVar20 >> 0x1f)]) * + fVar17 = (float)((double)GHIDRA_INT(uVar20) + __uint_to_double_fixup[-(GHIDRA_INT(uVar20) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_9b8._end = (void *)(fVar17 + fVar17); local_9a0 = (Game *)sin((float)local_9b8._end); @@ -15530,22 +15530,22 @@ LAB_008046e2: (pEVar32->_splatColor)._colorize[1] = fVar17; (pEVar32->_splatColor)._colorize[2] = fVar39; (pEVar32->_splatColor)._colorize[3] = fVar13; - *(undefined8 *)(pEVar32->_splatColor)._offset = g_colorGreenSplat._offset._0_8_; + *(undefined8 *)(pEVar32->_splatColor)._offset = (*(undefined8 *)((char *)&(g_colorGreenSplat._offset) + 0x0)); (pEVar32->_splatColor)._offset[2] = g_colorGreenSplat._offset[2]; } } pEVar32->Update(); psVar2 = &((Level *)this)->_roomList[0x9e].SavedEntities; - local_9b8._capacity = (void *)((int)local_9b8._capacity + 1); + local_9b8._capacity = (void *)(GHIDRA_INT(local_9b8._capacity) + 1); psVar26 = &local_9b8; - if ((int)psVar2->_begin < 0x20) { + if (GHIDRA_INT(psVar2->_begin) < 0x20) { psVar26 = psVar2; } - } while ((int)local_9b8._capacity < (int)psVar26->_begin); + } while (GHIDRA_INT(local_9b8._capacity) < GHIDRA_INT(psVar26->_begin)); } } bVar14 = TemporaryEffects::HasCollectibleEffect - ((TemporaryEffects *)((int)g_game->_room + 0x7310),0x123); + ((TemporaryEffects *)(GHIDRA_INT(g_game->_room) + 0x7310),0x123); if ((bVar14 != 0) && (*(int *)&(*(undefined1 *)((char *)(((Level *)this)) + 0x8)) != 0x10)) { fVar17 = *(float *)&(*(undefined1 *)((char *)&(((Level *)this)->_roomList[0x9e]) + 0x9c)) + 0.1; *(float *)&(*(undefined1 *)((char *)&(((Level *)this)->_roomList[0x9e]) + 0x9c)) = fVar17; @@ -15561,32 +15561,32 @@ LAB_008046e2: local_9b8._capacity = (Entity *)0x1; if (1 < iVar33 + -1) { do { - if (((((int)local_99c < 0) || - (iVar16 = ((Level *)this)->_curses, iVar16 <= (int)local_99c)) || - ((int)local_9b8._capacity < 0)) || (iVar33 <= (int)local_9b8._capacity)) { + if ((((GHIDRA_INT(local_99c) < 0) || + (iVar16 = ((Level *)this)->_curses, iVar16 <= GHIDRA_INT(local_99c))) || + (GHIDRA_INT(local_9b8._capacity) < 0)) || (iVar33 <= GHIDRA_INT(local_9b8._capacity))) { iVar16 = ((Level *)this)->_curses; } - else if (((-1 < (int)(&(local_99c->_sprite)._filename + -3) + - (int)local_9b8._capacity * iVar16) && + else if (((-1 < GHIDRA_INT((&(local_99c->_sprite)._filename + -3)) + + GHIDRA_INT(local_9b8._capacity) * iVar16) && (local_9ac = (ItemPool *) ((Level *)this)->_roomList[0]._doors - [(int)((local_99c->_sprite)._filename._buf + - (int)local_9b8._capacity * iVar16 + -0x4b)], + [GHIDRA_INT(((local_99c->_sprite)._filename._buf + + GHIDRA_INT(local_9b8._capacity) * iVar16 + -0x4b))], local_9ac != (ItemPool *)0x0)) && (*(float *)((char *)local_9ac + 4) == 9.80909e-45)) { piVar27 = (int *)__RTDynamicCast(); (**(code **)(*piVar27 + 0x20))(); (**(code **)(*piVar27 + 4))(); - iVar33._0_1_ = ((Level *)this)->_isHeartPicked; - iVar33._1_1_ = ((Level *)this)->_isCanSeeEverything; - iVar33._2_2_ = *(undefined2 *)&(*(undefined1 *)((char *)(((Level *)this)) + 0x12)); + (*(undefined1 *)((char *)&(iVar33) + 0x0)) = ((Level *)this)->_isHeartPicked; + (*(undefined1 *)((char *)&(iVar33) + 0x1)) = ((Level *)this)->_isCanSeeEverything; + (*(undefined2 *)((char *)&(iVar33) + 0x2)) = *(undefined2 *)&(*(undefined1 *)((char *)(((Level *)this)) + 0x12)); iVar16 = ((Level *)this)->_curses; } local_9b8._capacity = &(*(undefined1 *)((char *)(((Entity *)local_9b8._capacity)) + 0x1)); - } while ((int)local_9b8._capacity < iVar33 + -1); + } while (GHIDRA_INT(local_9b8._capacity) < iVar33 + -1); } local_99c = (Entity *)&(*(undefined1 *)((char *)(local_99c) + 0x1)); - } while ((int)local_99c < iVar16 + -1); + } while (GHIDRA_INT(local_99c) < iVar16 + -1); } } if (1.0 < *(float *)&(*(undefined1 *)((char *)&(((Level *)this)->_roomList[0x9e]) + 0x9c))) { @@ -15606,29 +15606,29 @@ LAB_008046e2: iVar33 = 1; if (1 < iVar28 + -1) { do { - if (((((int)local_99c < 0) || - (iVar16 = ((Level *)this)->_curses, iVar16 <= (int)local_99c)) || (iVar33 < 0)) + if ((((GHIDRA_INT(local_99c) < 0) || + (iVar16 = ((Level *)this)->_curses, iVar16 <= GHIDRA_INT(local_99c))) || (iVar33 < 0)) || (iVar28 <= iVar33)) { iVar16 = ((Level *)this)->_curses; } - else if (((-1 < (int)(&(local_99c->_sprite)._filename + -3) + iVar33 * iVar16) && + else if (((-1 < GHIDRA_INT((&(local_99c->_sprite)._filename + -3)) + iVar33 * iVar16) && (local_9ac = (ItemPool *) ((Level *)this)->_roomList[0]._doors - [(int)((local_99c->_sprite)._filename._buf + - iVar33 * iVar16 + -0x4b)], local_9ac != (ItemPool *)0x0)) + [GHIDRA_INT(((local_99c->_sprite)._filename._buf + + iVar33 * iVar16 + -0x4b))], local_9ac != (ItemPool *)0x0)) && (*(float *)((char *)local_9ac + 4) == 9.80909e-45)) { this_02 = (GridEntity_Pit *)__RTDynamicCast(); ((GridEntity_Pit *)(this_02))->GridEntity_Pit::UpdateCollision(); - iVar28._0_1_ = ((Level *)this)->_isHeartPicked; - iVar28._1_1_ = ((Level *)this)->_isCanSeeEverything; - iVar28._2_2_ = *(undefined2 *)&(*(undefined1 *)((char *)(((Level *)this)) + 0x12)); + (*(undefined1 *)((char *)&(iVar28) + 0x0)) = ((Level *)this)->_isHeartPicked; + (*(undefined1 *)((char *)&(iVar28) + 0x1)) = ((Level *)this)->_isCanSeeEverything; + (*(undefined2 *)((char *)&(iVar28) + 0x2)) = *(undefined2 *)&(*(undefined1 *)((char *)(((Level *)this)) + 0x12)); iVar16 = ((Level *)this)->_curses; } iVar33 = iVar33 + 1; } while (iVar33 < iVar28 + -1); } local_99c = (Entity *)&(*(undefined1 *)((char *)(local_99c) + 0x1)); - } while ((int)local_99c < iVar16 + -1); + } while (GHIDRA_INT(local_99c) < iVar16 + -1); fVar39 = *(float *)&(*(undefined1 *)((char *)&(((Level *)this)->_roomList[0xa5]) + 0x94)); } } @@ -15645,8 +15645,8 @@ LAB_008046e2: MamaMegaExplosion(this,&g_vectorZero,(Entity_Player *)0x0); } pvVar30 = ((Level *)this)->_roomList[0x9e].SavedEffects._begin; - if (0 < (int)pvVar30) { - ((Level *)this)->_roomList[0x9e].SavedEffects._begin = (void *)((int)pvVar30 + -1); + if (0 < GHIDRA_INT(pvVar30)) { + ((Level *)this)->_roomList[0x9e].SavedEffects._begin = (void *)(GHIDRA_INT(pvVar30) + -1); } UpdateGreedWave(this); update_ambient_sounds(this); @@ -15665,23 +15665,23 @@ LAB_008046e2: sVar29 = *(short *)(iVar16 + 0xac); if ((0 < sVar29) && ((sVar29 <= *(short *)(iVar16 + 0xae) || (*(short *)(iVar16 + 0xae) == -1))) ) { - local_a58._0_4_ = *(int *)(iVar16 + 0x58); - local_a58._12_4_ = (void *)0x1b; - local_a58._4_8_ = 0x1b00000001; - uVar18 = ((RNG *)((RNG *)local_a58))->RNG::RandomInt((int)sVar29); + (*(undefined4 *)((char *)&(local_a58) + 0x0)) = *(int *)(iVar16 + 0x58); + (*(undefined4 *)((char *)&(local_a58) + 0xc)) = (void *)0x1b; + (*(undefined8 *)((char *)&(local_a58) + 0x4)) = 0x1b00000001; + uVar18 = ((RNG *)((RNG *)local_a58))->RNG::RandomInt(GHIDRA_INT(sVar29)); *(short *)(((Level *)this)->_stageType + 0xae) = (short)uVar18; } } pvVar30 = ((Level *)this)->_roomList[0x9e].SavedEffects._end; - if (0 < (int)pvVar30) { - if ((int)pvVar30 % 5 == 0) { + if (0 < GHIDRA_INT(pvVar30)) { + if (GHIDRA_INT(pvVar30) % 5 == 0) { get_random_pickup_position(g_game->_room,(Vector *)(local_a58 + 0x10),0,0); uVar18 = Random(); ((Game *)(g_game))->Game::Spawn(4,3,(Vector *)(local_a58 + 0x10),&g_vectorZero,(Entity *)0x0,0,uVar18); __RTDynamicCast(); pvVar30 = ((Level *)this)->_roomList[0x9e].SavedEffects._end; } - ((Level *)this)->_roomList[0x9e].SavedEffects._end = (void *)((int)pvVar30 + -1); + ((Level *)this)->_roomList[0x9e].SavedEffects._end = (void *)(GHIDRA_INT(pvVar30) + -1); } if (*(char *)&((Level *)this)->_roomList[0xa7].SavedEntities._end != '\0') { uVar18 = 0; @@ -15699,65 +15699,65 @@ LAB_008046e2: ((Entity_NPC *)(this_03))->Entity_NPC::UpdatePickupGhosts(); } uVar18 = uVar18 + 1; - } while (uVar18 < (uint)((Level *)this)->_roomList[0x19].DecorationSeed); + } while (uVar18 < GHIDRA_UINT(((Level *)this)->_roomList[0x19].DecorationSeed)); } *(undefined1 *)&((Level *)this)->_roomList[0xa7].SavedEntities._end = 0; } - if (*(char *)((int)&((Level *)this)->_roomList[0xa6].SafeGridIndex + 1) != '\0') { + if (*(char *)(GHIDRA_INT(&((Level *)this)->_roomList[0xa6].SafeGridIndex) + 1) != '\0') { g_pickupIgnoreModifiers = g_pickupIgnoreModifiers + 1; - local_9f8._12_4_ = (void *)0x0; - local_9f8._16_4_ = (float *)0x0; + (*(undefined4 *)((char *)&(local_9f8) + 0xc)) = (void *)0x0; + (*(undefined4 *)((char *)&(local_9f8) + 0x10)) = (float *)0x0; local_9b8._end = (float *)0x0; local_9e4 = (float *)0x0; local_14 = 9.80909e-45; memset(local_1e8,0,0x1c0); local_9a8 = (Entity *)(*(int *)&((Level *)this)->_isHeartPicked * ((Level *)this)->_curses); iVar16 = 0; - if (0 < (int)local_9a8) { + if (0 < GHIDRA_INT(local_9a8)) { do { uVar18 = GetGridCollision(this,iVar16); *(char *)((char *)local_1e8 + iVar16) = -(uVar18 != 0); iVar16 = iVar16 + 1; - } while (iVar16 < (int)local_9a8); + } while (iVar16 < GHIDRA_INT(local_9a8)); } local_9b8._capacity = (Entity *)0x0; if (((Level *)this)->_roomList[0x19].DecorationSeed != 0) { do { pfVar35 = *(float **) (*(int *)&((Level *)this)->_roomList[0x19].PoopCount + - (int)local_9b8._capacity * 4); + GHIDRA_INT(local_9b8._capacity) * 4); if ((pfVar35 == (float *)0x0) || (pfVar35[10] != 7.00649e-45)) { local_9ac = (ItemPool *)0x0; } else { local_9ac = (ItemPool *)pfVar35; if (pfVar35[0xb] == 1.4013e-43) { - iVar33 = (int)((pfVar35[0xcf] - 40.0) / 40.0 + 0.5); - iVar16 = (int)((pfVar35[0xd0] - 120.0) / 40.0 + 0.5); + iVar33 = GHIDRA_INT(((pfVar35[0xcf] - 40.0) / 40.0 + 0.5)); + iVar16 = GHIDRA_INT(((pfVar35[0xd0] - 120.0) / 40.0 + 0.5)); if ((((-1 < iVar33) && (iVar33 < ((Level *)this)->_curses)) && (-1 < iVar16)) && - ((iVar3._0_1_ = ((Level *)this)->_isHeartPicked, - iVar3._1_1_ = ((Level *)this)->_isCanSeeEverything, - iVar3._2_2_ = *(undefined2 *)&(*(undefined1 *)((char *)(((Level *)this)) + 0x12)), iVar16 < iVar3 && + (((*(undefined1 *)((char *)&(iVar3) + 0x0)) = ((Level *)this)->_isHeartPicked, + (*(undefined1 *)((char *)&(iVar3) + 0x1)) = ((Level *)this)->_isCanSeeEverything, + (*(undefined2 *)((char *)&(iVar3) + 0x2)) = *(undefined2 *)&(*(undefined1 *)((char *)(((Level *)this)) + 0x12)), iVar16 < iVar3 && (iVar33 = iVar16 * ((Level *)this)->_curses + iVar33, -1 < iVar33)))) { *(undefined1 *)((char *)local_1e8 + iVar33) = 1; } if (((*(char *)((char *)pfVar35 + 0x173) == '\0') && (pfVar35[0x14d] == 0.0)) && - ((((uint)pfVar35[0x5a] & 0x80000) != 0 && + (((GHIDRA_UINT(pfVar35[0x5a]) & 0x80000) != 0 && (cVar15 = ItemConfig::collectible_has_tags(), cVar15 == '\0')))) { - pfVar35[0x5a] = (float)((uint)pfVar35[0x5a] & 0xfff7ffff); + pfVar35[0x5a] = (float)(GHIDRA_UINT(pfVar35[0x5a]) & 0xfff7ffff); pfVar35[0x5b] = pfVar35[0x5b]; - if ((void *)local_9f8._16_4_ == local_9b8._end) { + if ((*(undefined4 *)((char *)&((void *)local_9f8) + 0x10)) == local_9b8._end) { std::vector::_Emplace_reallocate(); local_9b8._end = local_9e4; } else { - *(float **)local_9f8._16_4_ = pfVar35; - local_9f8._16_4_ = local_9f8._16_4_ + 4; + *(*(undefined4 *)((char *)&((float **)local_9f8) + 0x10)) = pfVar35; + (*(undefined4 *)((char *)&(local_9f8) + 0x10)) = (*(undefined4 *)((char *)&(local_9f8) + 0x10)) + 4; } } } } - local_9b8._capacity = (void *)((int)local_9b8._capacity + 1); + local_9b8._capacity = (void *)(GHIDRA_INT(local_9b8._capacity) + 1); } while (local_9b8._capacity < (undefined1 *)((Level *)this)->_roomList[0x19].DecorationSeed); } local_9e0.x = 0.0; @@ -15768,7 +15768,7 @@ LAB_008046e2: *(float *)((char *)local_9e0.x + 4) = local_9e0.x; *(float *)((char *)local_9e0.x + 8) = local_9e0.x; *(undefined2 *)((char *)local_9e0.x + 0xc) = 0x101; - local_14 = (float)CONCAT31(local_14._1_3_,8); + local_14 = (float)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),8); pairOffsets[0] = -1; pairOffsets[1] = 0; pairOffsets[2] = 1; @@ -15778,7 +15778,7 @@ LAB_008046e2: pvStack_284 = (void *)0xffffffff; pvStack_280 = (void *)0x0; pvStack_27c = (void *)0x1; - local_9a0 = (Game *)((int)(local_9f8._16_4_ - local_9f8._12_4_) >> 2); + local_9a0 = (Game *)(GHIDRA_INT(((*(undefined4 *)((char *)&(local_9f8) + 0x10)) - (*(undefined4 *)((char *)&(local_9f8) + 0xc)))) >> 2); local_278 = -NAN; uStack_274 = 0xffffffff; EStack_270 = (EntitySaveState)0x1; @@ -15847,8 +15847,8 @@ LAB_008046e2: pvStack_20c = (void *)0x0; local_208 = (void *)0x0; fStack_204 = 0.0; - uStack_200._0_1_ = 0; - uStack_200._1_3_ = 0; + (*(undefined1 *)((char *)&(uStack_200) + 0x0)) = 0; + (*(undefined1 *)((char *)&(uStack_200) + 0x1)) = 0; iStack_1fc = 1; pGVar21 = local_9a0; LAB_008058a0: @@ -15866,54 +15866,54 @@ LAB_008058a0: pEVar32 = (Entity *)local_9cc->_curses; local_9a8 = pEVar32; do { - iVar16 = *(int *)(local_9f8._12_4_ + (int)local_9b8._begin * 4); + iVar16 = *(int *)((*(undefined4 *)((char *)&(local_9f8) + 0xc)) + GHIDRA_INT(local_9b8._begin) * 4); fVar17 = *(float *)(iVar16 + 0x33c); fVar39 = *(float *)(iVar16 + 0x340); - iVar33 = (int)((fVar17 - 40.0) / 40.0 + 0.5); - iVar16 = (int)((fVar39 - 120.0) / 40.0 + 0.5); - if ((((iVar33 < 0) || ((int)pEVar32 <= iVar33)) || (iVar16 < 0)) || - (iVar4._0_1_ = local_9cc->_isHeartPicked, iVar4._1_1_ = local_9cc->_isCanSeeEverything, - iVar4._2_2_ = *(undefined2 *)&(*(undefined1 *)((char *)(local_9cc) + 0x12)), iVar4 <= iVar16)) { + iVar33 = GHIDRA_INT(((fVar17 - 40.0) / 40.0 + 0.5)); + iVar16 = GHIDRA_INT(((fVar39 - 120.0) / 40.0 + 0.5)); + if ((((iVar33 < 0) || (GHIDRA_INT(pEVar32) <= iVar33)) || (iVar16 < 0)) || + ((*(undefined1 *)((char *)&(iVar4) + 0x0)) = local_9cc->_isHeartPicked, (*(undefined1 *)((char *)&(iVar4) + 0x1)) = local_9cc->_isCanSeeEverything, + (*(undefined2 *)((char *)&(iVar4) + 0x2)) = *(undefined2 *)&(*(undefined1 *)((char *)(local_9cc) + 0x12)), iVar4 <= iVar16)) { iVar33 = -1; } else { - iVar33 = (int)pEVar32 * iVar16 + iVar33; + iVar33 = GHIDRA_INT(pEVar32) * iVar16 + iVar33; } - local_9ac = (ItemPool *)(iVar33 / (int)pEVar32); - local_9b8._capacity = (void *)(iVar33 % (int)pEVar32); - if (((float)(int)local_9b8._capacity * 40.0 + 40.0 == fVar17) && - ((float)(int)local_9ac * 40.0 + 120.0 == fVar39)) { - iVar16 = (int)local_99c[-1]._luaBridgeRef + (int)local_9ac; - iVar28 = (int)(&(((Entity *)local_9b8._capacity)->_sprite)._filename + -3) + - (int)local_99c[-1]._scoreMultiplier; - if (((iVar28 < 0) || (((int)pEVar32 <= iVar28 || (iVar16 < 0)))) || - (iVar5._0_1_ = local_9cc->_isHeartPicked, iVar5._1_1_ = local_9cc->_isCanSeeEverything, - iVar5._2_2_ = *(undefined2 *)&(*(undefined1 *)((char *)(local_9cc) + 0x12)), iVar5 <= iVar16)) { + local_9ac = (ItemPool *)(iVar33 / GHIDRA_INT(pEVar32)); + local_9b8._capacity = (void *)(iVar33 % GHIDRA_INT(pEVar32)); + if (((float)GHIDRA_INT(local_9b8._capacity) * 40.0 + 40.0 == fVar17) && + ((float)GHIDRA_INT(local_9ac) * 40.0 + 120.0 == fVar39)) { + iVar16 = GHIDRA_INT(local_99c[-1]._luaBridgeRef) + GHIDRA_INT(local_9ac); + iVar28 = GHIDRA_INT((&(((Entity *)local_9b8._capacity)->_sprite)._filename + -3)) + + GHIDRA_INT(local_99c[-1]._scoreMultiplier); + if (((iVar28 < 0) || ((GHIDRA_INT(pEVar32) <= iVar28 || (iVar16 < 0)))) || + ((*(undefined1 *)((char *)&(iVar5) + 0x0)) = local_9cc->_isHeartPicked, (*(undefined1 *)((char *)&(iVar5) + 0x1)) = local_9cc->_isCanSeeEverything, + (*(undefined2 *)((char *)&(iVar5) + 0x2)) = *(undefined2 *)&(*(undefined1 *)((char *)(local_9cc) + 0x12)), iVar5 <= iVar16)) { iVar28 = -1; } else { - iVar28 = iVar28 + iVar16 * (int)pEVar32; + iVar28 = iVar28 + iVar16 * GHIDRA_INT(pEVar32); } - iVar16 = *(int *)local_99c + (int)local_9ac; + iVar16 = *(int *)local_99c + GHIDRA_INT(local_9ac); local_9ac = (ItemPool *) - ((int)(&(((Entity *)local_9b8._capacity)->_sprite)._filename + -3) + + (GHIDRA_INT((&(((Entity *)local_9b8._capacity)->_sprite)._filename + -3)) + *(int *)&(*(undefined1 *)((char *)&(local_99c[-1]) + 0x40c))); - if (((((int)local_9ac < 0) || ((int)pEVar32 <= (int)local_9ac)) || (iVar16 < 0)) || - (iVar6._0_1_ = local_9cc->_isHeartPicked, iVar6._1_1_ = local_9cc->_isCanSeeEverything, - iVar6._2_2_ = *(undefined2 *)&(*(undefined1 *)((char *)(local_9cc) + 0x12)), iVar6 <= iVar16)) { + if ((((GHIDRA_INT(local_9ac) < 0) || (GHIDRA_INT(pEVar32) <= GHIDRA_INT(local_9ac))) || (iVar16 < 0)) || + ((*(undefined1 *)((char *)&(iVar6) + 0x0)) = local_9cc->_isHeartPicked, (*(undefined1 *)((char *)&(iVar6) + 0x1)) = local_9cc->_isCanSeeEverything, + (*(undefined2 *)((char *)&(iVar6) + 0x2)) = *(undefined2 *)&(*(undefined1 *)((char *)(local_9cc) + 0x12)), iVar6 <= iVar16)) { pfVar35 = (float *)0xffffffff; } else { - pfVar35 = (float *)((int)pEVar32 * iVar16 + (int)local_9ac); + pfVar35 = (float *)(GHIDRA_INT(pEVar32) * iVar16 + GHIDRA_INT(local_9ac)); } - if (((iVar28 < 0) || ((int)pfVar35 < 0)) || - ((gridOccupied[iVar28] != 0 || (gridOccupied[(int)pfVar35] != 0)))) goto LAB_00805bb8; + if (((iVar28 < 0) || (GHIDRA_INT(pfVar35) < 0)) || + ((gridOccupied[iVar28] != 0 || (gridOccupied[GHIDRA_INT(pfVar35)] != 0)))) goto LAB_00805bb8; gridOccupied[iVar28] = 1; - gridOccupied[(int)pfVar35] = 1; + gridOccupied[GHIDRA_INT(pfVar35)] = 1; gridOccupied[iVar33] = 0; pEVar32 = local_9a8; } - local_9b8._begin = (void *)((int)local_9b8._begin + 1); + local_9b8._begin = (void *)(GHIDRA_INT(local_9b8._begin) + 1); pGVar38 = local_9a0; if (local_9a0 <= local_9b8._begin) break; } while( true ); @@ -15923,9 +15923,9 @@ LAB_008058a0: LAB_00805a6e: local_9a0 = (Game *)0x0; do { - local_9f8._0_4_ = (void *)0x3; - local_9f8._4_4_ = (void *)0x3; - local_9b8._begin = *(void **)(local_9f8._12_4_ + (int)local_9a0 * 4); + (*(undefined4 *)((char *)&(local_9f8) + 0x0)) = (void *)0x3; + (*(undefined4 *)((char *)&(local_9f8) + 0x4)) = (void *)0x3; + local_9b8._begin = *(void **)((*(undefined4 *)((char *)&(local_9f8) + 0xc)) + GHIDRA_INT(local_9a0) * 4); local_9a4 = (Game *)&DAT_0000001d; local_9a8 = (Entity *)((Game *)local_9b8._begin)->_roomList[5].VisitedCount; if (local_9a8 == (Entity *)0x0) { @@ -15934,7 +15934,7 @@ LAB_00805a6e: (*pcVar11)(); return; } - uVar18 = (uint)local_9a8 >> 3 ^ (uint)local_9a8; + uVar18 = GHIDRA_UINT(local_9a8) >> 3 ^ GHIDRA_UINT(local_9a8); uVar18 = uVar18 << 3 ^ uVar18; local_9ac = (ItemPool *)(uVar18 >> 0x1d ^ uVar18); if (local_9ac == (void *)0x0) { @@ -15945,15 +15945,15 @@ LAB_00805a6e: } local_a04.x = *(float *)&((Game *)local_9b8._begin)->_roomList[4].TotalMoneySpent; local_a04.y = (float)((Game *)local_9b8._begin)->_roomList[4].GreedSubType; - uVar18 = uVar18 >> 3 ^ (uint)local_9ac; + uVar18 = uVar18 >> 3 ^ GHIDRA_UINT(local_9ac); uVar18 = uVar18 << 3 ^ uVar18; local_9ac = (ItemPool *)(uVar18 >> 0x1d ^ uVar18); - iVar16 = (int)((local_a04.x - 40.0) / 40.0 + 0.5); - iVar33 = (int)((local_a04.y - 120.0) / 40.0 + 0.5); + iVar16 = GHIDRA_INT(((local_a04.x - 40.0) / 40.0 + 0.5)); + iVar33 = GHIDRA_INT(((local_a04.y - 120.0) / 40.0 + 0.5)); if (((iVar16 < 0) || (this_01->_curses <= iVar16)) || ((iVar33 < 0 || - (iVar7._0_1_ = this_01->_isHeartPicked, iVar7._1_1_ = this_01->_isCanSeeEverything, - iVar7._2_2_ = *(undefined2 *)&(*(undefined1 *)((char *)(this_01) + 0x12)), iVar7 <= iVar33)))) { + ((*(undefined1 *)((char *)&(iVar7) + 0x0)) = this_01->_isHeartPicked, (*(undefined1 *)((char *)&(iVar7) + 0x1)) = this_01->_isCanSeeEverything, + (*(undefined2 *)((char *)&(iVar7) + 0x2)) = *(undefined2 *)&(*(undefined1 *)((char *)(this_01) + 0x12)), iVar7 <= iVar33)))) { uVar18 = 0xffffffff; } else { @@ -15961,24 +15961,24 @@ LAB_00805a6e: } local_9d4.y = 0.0; local_9d4.x = 0.0; - if ((((int)local_9bc < 0) || - ((float)((int)uVar18 % this_01->_curses) * 40.0 + 40.0 != local_a04.x)) || - ((float)((int)uVar18 / this_01->_curses) * 40.0 + 120.0 != local_a04.y)) { + if (((GHIDRA_INT(local_9bc) < 0) || + ((float)(GHIDRA_INT(uVar18) % this_01->_curses) * 40.0 + 40.0 != local_a04.x)) || + ((float)(GHIDRA_INT(uVar18) / this_01->_curses) * 40.0 + 120.0 != local_a04.y)) { pVVar22 = FindFreePickupSpawnPosition ((Room *)this_01,(Vector *)local_a70,&local_a04,60.0,0,0,0); local_9b8._capacity = (void *)pVVar22->x; local_99c = (Entity *)pVVar22->y; - iVar33 = (int)(((float)local_9b8._capacity - 40.0) / 40.0 + 0.5); - iVar16 = (int)(((float)local_99c - 120.0) / 40.0 + 0.5); + iVar33 = GHIDRA_INT((((float)local_9b8._capacity - 40.0) / 40.0 + 0.5)); + iVar16 = GHIDRA_INT((((float)local_99c - 120.0) / 40.0 + 0.5)); if (((-1 < iVar33) && (iVar33 < this_01->_curses)) && ((-1 < iVar16 && - ((iVar8._0_1_ = this_01->_isHeartPicked, iVar8._1_1_ = this_01->_isCanSeeEverything, - iVar8._2_2_ = *(undefined2 *)&(*(undefined1 *)((char *)(this_01) + 0x12)), iVar16 < iVar8 && + (((*(undefined1 *)((char *)&(iVar8) + 0x0)) = this_01->_isHeartPicked, (*(undefined1 *)((char *)&(iVar8) + 0x1)) = this_01->_isCanSeeEverything, + (*(undefined2 *)((char *)&(iVar8) + 0x2)) = *(undefined2 *)&(*(undefined1 *)((char *)(this_01) + 0x12)), iVar16 < iVar8 && (local_9a8 = (Entity *)(iVar16 * this_01->_curses + iVar33), local_9a8 < 0x1c0)))))) { - iVar16 = this_01->_roomMap[(int)local_9a8 - 0x5cdc] % (int)local_9c0; + iVar16 = this_01->_roomMap[GHIDRA_INT(local_9a8) - 0x5cdc] % GHIDRA_INT(local_9c0); if (iVar16 < 900) { - this_01->_roomMap[(int)local_9a8 - 0x5cdc] = - (this_01->_roomMap[(int)local_9a8 - 0x5cdc] - iVar16) + 900; + this_01->_roomMap[GHIDRA_INT(local_9a8) - 0x5cdc] = + (this_01->_roomMap[GHIDRA_INT(local_9a8) - 0x5cdc] - iVar16) + 900; } } pVVar22 = FindFreePickupSpawnPosition @@ -15987,11 +15987,11 @@ LAB_00805a6e: local_9d4.y = pVVar22->y; } else { - local_99c = (Entity *)((float)pairOffsets[(int)local_9bc * 4 + 1] * 40.0 + local_a04.y); - local_9d4.y = (float)aiStack_28c[(int)local_9bc * 4] * 40.0 + local_a04.y; + local_99c = (Entity *)((float)pairOffsets[GHIDRA_INT(local_9bc) * 4 + 1] * 40.0 + local_a04.y); + local_9d4.y = (float)aiStack_28c[GHIDRA_INT(local_9bc) * 4] * 40.0 + local_a04.y; local_9b8._capacity = - (Entity *)((float)pairOffsets[(int)local_9bc * 4] * 40.0 + local_a04.x); - local_9d4.x = (float)pairOffsets[(int)local_9bc * 4 + 2] * 40.0 + local_a04.x; + (Entity *)((float)pairOffsets[GHIDRA_INT(local_9bc) * 4] * 40.0 + local_a04.x); + local_9d4.x = (float)pairOffsets[GHIDRA_INT(local_9bc) * 4 + 2] * 40.0 + local_a04.x; } if (*(int *)&(*(undefined1 *)((char *)(this_01) + 0x8)) == 0x10) { local_9d4.y = local_9d4.y + 30.0; @@ -16003,17 +16003,17 @@ LAB_00805a6e: (*pcVar11)(); return; } - uVar20 = (uint)local_9ac >> (local_9f8[0] & 0x1f) ^ (uint)local_9ac; + uVar20 = GHIDRA_UINT(local_9ac) >> (local_9f8[0] & 0x1f) ^ GHIDRA_UINT(local_9ac); uVar20 = uVar20 << (local_9f8[4] & 0x1f) ^ uVar20; - local_9a4 = (Game *)((Game *)(g_game))->Game::Spawn((uint)((RoomDescriptor *)((int)local_9b8._begin + 0x14) - )->OverrideData, - ((RoomDescriptor *)((int)local_9b8._begin + 0x14))-> + local_9a4 = (Game *)((Game *)(g_game))->Game::Spawn(GHIDRA_UINT(((RoomDescriptor *)(GHIDRA_INT(local_9b8._begin) + 0x14) + )->OverrideData), + ((RoomDescriptor *)(GHIDRA_INT(local_9b8._begin) + 0x14))-> AllowedDoors,&local_9d4,&g_vectorZero,(Entity *)0x0,0, uVar20 >> ((byte)local_9a4 & 0x1f) ^ uVar20); iVar16 = ((Entity_Pickup *)(local_9b8._begin))->Entity_Pickup::GetAlternatePedestal(); ((Entity_Pickup *)((Entity_Pickup *)local_9a4))->Entity_Pickup::SetAlternatePedestal(iVar16); pvVar30 = local_9b8._begin; - if (-1 < (int)uVar18) { + if (-1 < GHIDRA_INT(uVar18)) { if (0x1bf < uVar18) { FUN_00aef86f(); pcVar11 = (code *)swi(3); @@ -16022,22 +16022,22 @@ LAB_00805a6e: } *(undefined1 *)((char *)local_1e8 + uVar18) = 0; } - iVar16 = (int)((local_9d4.x - 40.0) / 40.0 + 0.5); - iVar33 = (int)((local_9d4.y - 120.0) / 40.0 + 0.5); + iVar16 = GHIDRA_INT(((local_9d4.x - 40.0) / 40.0 + 0.5)); + iVar33 = GHIDRA_INT(((local_9d4.y - 120.0) / 40.0 + 0.5)); if ((((iVar16 < 0) || (this_01->_curses <= iVar16)) || (iVar33 < 0)) || - (iVar9._0_1_ = this_01->_isHeartPicked, iVar9._1_1_ = this_01->_isCanSeeEverything, - iVar9._2_2_ = *(undefined2 *)&(*(undefined1 *)((char *)(this_01) + 0x12)), iVar9 <= iVar33)) { + ((*(undefined1 *)((char *)&(iVar9) + 0x0)) = this_01->_isHeartPicked, (*(undefined1 *)((char *)&(iVar9) + 0x1)) = this_01->_isCanSeeEverything, + (*(undefined2 *)((char *)&(iVar9) + 0x2)) = *(undefined2 *)&(*(undefined1 *)((char *)(this_01) + 0x12)), iVar9 <= iVar33)) { iVar16 = -1; } else { iVar16 = iVar33 * this_01->_curses + iVar16; } - iVar28 = (int)(((float)local_9b8._capacity - 40.0) / 40.0 + 0.5); - iVar33 = (int)(((float)local_99c - 120.0) / 40.0 + 0.5); + iVar28 = GHIDRA_INT((((float)local_9b8._capacity - 40.0) / 40.0 + 0.5)); + iVar33 = GHIDRA_INT((((float)local_99c - 120.0) / 40.0 + 0.5)); if (((iVar28 < 0) || (this_01->_curses <= iVar28)) || ((iVar33 < 0 || - (iVar10._0_1_ = this_01->_isHeartPicked, iVar10._1_1_ = this_01->_isCanSeeEverything, - iVar10._2_2_ = *(undefined2 *)&(*(undefined1 *)((char *)(this_01) + 0x12)), iVar10 <= iVar33)))) { + ((*(undefined1 *)((char *)&(iVar10) + 0x0)) = this_01->_isHeartPicked, (*(undefined1 *)((char *)&(iVar10) + 0x1)) = this_01->_isCanSeeEverything, + (*(undefined2 *)((char *)&(iVar10) + 0x2)) = *(undefined2 *)&(*(undefined1 *)((char *)(this_01) + 0x12)), iVar10 <= iVar33)))) { iVar28 = -1; } else { @@ -16049,42 +16049,42 @@ LAB_00805a6e: if (-1 < iVar28) { *(undefined1 *)((char *)local_1e8 + iVar28) = 1; } - *(void **)&((RoomDescriptor *)((int)local_9b8._begin + 0x14))[4].TotalMoneySpent = + *(void **)&((RoomDescriptor *)(GHIDRA_INT(local_9b8._begin) + 0x14))[4].TotalMoneySpent = local_9b8._capacity; - ((RoomDescriptor *)((int)local_9b8._begin + 0x14))[4].GreedSubType = (int)local_99c; - ((RoomDescriptor *)((int)local_9b8._begin + 0x14))[4].VisitedCount = (int)local_9b8._capacity; - ((RoomDescriptor *)((int)local_9b8._begin + 0x14))[4].Flags = (int)local_99c; - fVar17 = (float)((RoomDescriptor *)((int)local_9b8._begin + 0x14))[7].Dimension; - if (0 < (int)fVar17) { + ((RoomDescriptor *)(GHIDRA_INT(local_9b8._begin) + 0x14))[4].GreedSubType = GHIDRA_INT(local_99c); + ((RoomDescriptor *)(GHIDRA_INT(local_9b8._begin) + 0x14))[4].VisitedCount = GHIDRA_INT(local_9b8._capacity); + ((RoomDescriptor *)(GHIDRA_INT(local_9b8._begin) + 0x14))[4].Flags = GHIDRA_INT(local_99c); + fVar17 = (float)((RoomDescriptor *)(GHIDRA_INT(local_9b8._begin) + 0x14))[7].Dimension; + if (0 < GHIDRA_INT(fVar17)) { local_9a8 = (Entity *)fVar17; std::set::find_node(); if ((*(char *)((char *)local_a08 + 0xd) != '\0') || (pfVar35 = local_a08, - ((RoomDescriptor *)((int)pvVar30 + 0x14))[7].Dimension < *(int *)((char *)local_a08 + 0x10)) + ((RoomDescriptor *)(GHIDRA_INT(pvVar30) + 0x14))[7].Dimension < *(int *)((char *)local_a08 + 0x10)) ) { pfVar35 = (float *)local_9e0.x; } if (pfVar35 == (float *)local_9e0.x) { local_a18.y = (float)((Entity_Pickup *)((Entity_Pickup *)local_9a4))->Entity_Pickup::AssignOptionsIndex(); - local_a18.x = (float)((RoomDescriptor *)((int)pvVar30 + 0x14))[7].Dimension; + local_a18.x = (float)((RoomDescriptor *)(GHIDRA_INT(pvVar30) + 0x14))[7].Dimension; std_map_int_insert(&local_9e0,&local_a60,(int *)&local_a18); } else { local_9a4->_roomList[7].Dimension = *(int *)((char *)pfVar35 + 0x14); } } - local_9a0 = (Game *)((int)&local_9a0->_stage + 1); - } while (local_9a0 < (Game *)((int)(local_9f8._16_4_ - local_9f8._12_4_) >> 2)); + local_9a0 = (Game *)(GHIDRA_INT(&local_9a0->_stage) + 1); + } while (local_9a0 < (Game *)(GHIDRA_INT(((*(undefined4 *)((char *)&(local_9f8) + 0x10)) - (*(undefined4 *)((char *)&(local_9f8) + 0xc)))) >> 2)); LAB_0080603d: g_pickupIgnoreModifiers = g_pickupIgnoreModifiers + -1; - *(undefined1 *)((int)&this_01->_roomList[0xa6].SafeGridIndex + 1) = 0; + *(undefined1 *)(GHIDRA_INT(&this_01->_roomList[0xa6].SafeGridIndex) + 1) = 0; FID_conflict__Erase_tree_>_> (&local_9e0,(fuzzer_allocator_> *)&local_9e0, - *(_Tree_node **)((int)local_9e0.x + 4)); + *(_Tree_node **)(GHIDRA_INT(local_9e0.x) + 4)); operator_delete((void *)local_9e0.x,0x18); local_14 = -NAN; - if ((void *)local_9f8._12_4_ != (void *)0x0) { - deallocate((void *)local_9f8._12_4_,(int)local_9b8._end - local_9f8._12_4_ >> 2); + if ((*(undefined4 *)((char *)&((void *)local_9f8) + 0xc)) != (void *)0x0) { + deallocate((*(undefined4 *)((char *)&((void *)local_9f8) + 0xc)),GHIDRA_INT(local_9b8._end) - (*(undefined4 *)((char *)&(local_9f8) + 0xc)) >> 2); } } if (DAT_00c82674 != DAT_00c82678) { @@ -16098,9 +16098,9 @@ LAB_0080603d: local_14 = 1.26117e-44; local_9c0 = (void *)0x0; puVar34 = DAT_00c82674; - if ((int)DAT_00c82678 - (int)DAT_00c82674 >> 2 != 0) { + if (GHIDRA_INT(DAT_00c82678) - GHIDRA_INT(DAT_00c82674) >> 2 != 0) { do { - fVar17 = (float)puVar34[(int)local_9c0]; + fVar17 = (float)puVar34[GHIDRA_INT(local_9c0)]; iVar16 = *(int *)((char *)fVar17 + 0x28); if (((iVar16 == 0x1c) || (iVar16 == 0x13)) || (iVar16 == 0xef)) { LAB_008060ff: @@ -16119,18 +16119,18 @@ LAB_008060ff: segmentedListEnd = local_a0c; } else if (iVar16 == 0x59) goto LAB_008060ff; - local_9c0 = (RNG *)((int)local_9c0 + 1); - } while (local_9c0 < (void *)((int)DAT_00c82678 - (int)puVar34 >> 2)); + local_9c0 = (RNG *)(GHIDRA_INT(local_9c0) + 1); + } while (local_9c0 < (void *)(GHIDRA_INT(DAT_00c82678) - GHIDRA_INT(puVar34) >> 2)); local_9c8.y = (float)segmentedListEnd; local_9a4 = (Game *)pfVar35; } local_9a8 = (Entity *)0x0; pfVar35 = (float *)local_9c8.y; - if ((int)DAT_00c82678 - (int)puVar34 >> 2 != 0) { + if (GHIDRA_INT(DAT_00c82678) - GHIDRA_INT(puVar34) >> 2 != 0) { do { - listedEntity = *(EntityPtr *)(puVar34 + (int)local_9a8); + listedEntity = *(EntityPtr *)(puVar34 + GHIDRA_INT(local_9a8)); local_9b8._begin = *(void **)((char *)listedEntity + 0x2c); - local_99c = (Entity *)((Vector *)((int)listedEntity + 0x33c))->x; + local_99c = (Entity *)((Vector *)(GHIDRA_INT(listedEntity) + 0x33c))->x; local_9a0 = *(Game **)((char *)listedEntity + 0x340); local_9bc = *(Game **)((char *)listedEntity + 0x28); local_9b8._end = *(void **)((char *)listedEntity + 0x30); @@ -16147,8 +16147,8 @@ LAB_008060ff: ((Vector *)(local_a58 + 0x10),&local_a38, *(float *)((char *)listedEntity + 0x370),0.0); local_9b8._capacity = - ((Game *)(g_game))->Game::Spawn((uint)local_9bc,(uint)local_9b8._begin,pVVar22,&g_vectorZero, - (Entity *)0x0,(uint)local_9b8._end,(uint)local_9cc); + ((Game *)(g_game))->Game::Spawn(GHIDRA_UINT(local_9bc),GHIDRA_UINT(local_9b8._begin),pVVar22,&g_vectorZero, + (Entity *)0x0,GHIDRA_UINT(local_9b8._end),GHIDRA_UINT(local_9cc)); pVVar22 = &local_a04; local_a04.x = (float)local_99c + 60.0; pVVar25 = &local_9e0; @@ -16156,7 +16156,7 @@ LAB_008060ff: LAB_008067bb: pVVar22 = random_position_away_from_players (pVVar25,pVVar22,*(float *)((char *)listedEntity + 0x370),0.0); - ((Vector *)((int)listedEntity + 0x33c))->x = pVVar22->x; + ((Vector *)(GHIDRA_INT(listedEntity) + 0x33c))->x = pVVar22->x; *(float *)((char *)listedEntity + 0x340) = pVVar22->y; pEVar32 = local_9b8._capacity; } @@ -16168,8 +16168,8 @@ LAB_008067bb: ((Vector *)local_a70,&local_a20, *(float *)((char *)listedEntity + 0x370),0.0); local_9b8._capacity = - ((Game *)(g_game))->Game::Spawn((uint)local_9bc,(uint)local_9b8._begin,pVVar22,&g_vectorZero, - (Entity *)0x0,(uint)local_9b8._end,(uint)local_9cc); + ((Game *)(g_game))->Game::Spawn(GHIDRA_UINT(local_9bc),GHIDRA_UINT(local_9b8._begin),pVVar22,&g_vectorZero, + (Entity *)0x0,GHIDRA_UINT(local_9b8._end),GHIDRA_UINT(local_9cc)); pVVar22 = &local_a40; pVVar25 = (Vector *)(local_a70 + 8); local_a40.x = (float)local_99c - 0.0; @@ -16179,7 +16179,7 @@ LAB_008067bb: local_9c0 = *(RNG **)((char *)listedEntity + 0x370); if (*(int *)((char *)listedEntity + 0x184) == 5) { uVar18 = Random(); - fVar17 = (float)((double)(int)uVar18 + __uint_to_double_fixup[-((int)uVar18 >> 0x1f)]) + fVar17 = (float)((double)GHIDRA_INT(uVar18) + __uint_to_double_fixup[-(GHIDRA_INT(uVar18) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_9d4.y = fVar17 + fVar17; fVar17 = cos(local_9d4.y); @@ -16191,7 +16191,7 @@ LAB_008067bb: } else { uVar18 = Random(); - fVar17 = (float)((double)(int)uVar18 + __uint_to_double_fixup[-((int)uVar18 >> 0x1f)]) + fVar17 = (float)((double)GHIDRA_INT(uVar18) + __uint_to_double_fixup[-(GHIDRA_INT(uVar18) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_9d4.y = fVar17 + fVar17; fVar17 = cos(local_9d4.y); @@ -16202,48 +16202,48 @@ LAB_008067bb: local_a30.y = fVar17 * 20.0 + (float)local_9a0; } pVVar22 = random_position_away_from_players(pVVar25,pVVar22,(float)local_9c0,0.0); - pEVar32 = ((Game *)(g_game))->Game::Spawn((uint)local_9bc,(uint)local_9b8._begin,pVVar22, - &g_vectorZero,(Entity *)0x0,(uint)local_9b8._end,(uint)local_9cc); + pEVar32 = ((Game *)(g_game))->Game::Spawn(GHIDRA_UINT(local_9bc),GHIDRA_UINT(local_9b8._begin),pVVar22, + &g_vectorZero,(Entity *)0x0,GHIDRA_UINT(local_9b8._end),GHIDRA_UINT(local_9cc)); } if (pEVar32 != (Entity *)0x0) { qVar12 = pEVar32->_flags; - puVar1 = (uint *)((int)&pEVar32->_flags + 4); + puVar1 = (uint *)(GHIDRA_INT(&pEVar32->_flags) + 4); *puVar1 = *puVar1 | 0x80; - *(int *)&pEVar32->_flags = (int)qVar12; + *(int *)&pEVar32->_flags = GHIDRA_INT(qVar12); pEVar32->_spawnGridIndex = *(int *)((char *)listedEntity + 0x32c); } } else { uVar18 = Random(); - fVar17 = (float)((double)(int)uVar18 + __uint_to_double_fixup[-((int)uVar18 >> 0x1f)]) * + fVar17 = (float)((double)GHIDRA_INT(uVar18) + __uint_to_double_fixup[-(GHIDRA_INT(uVar18) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_9c0 = (RNG *)(fVar17 + fVar17); local_9ac = (ItemPool *)sin((float)local_9c0); fVar17 = cos((float)local_9c0); if (*(EntityPtr *)((char *)listedEntity + 0x3c0) == (EntityPtr)0x0) { pEVar32 = (Entity *)0x0; - local_9f8._0_4_ = (void *)0x0; - local_9f8._4_4_ = (void *)0x0; + (*(undefined4 *)((char *)&(local_9f8) + 0x0)) = (void *)0x0; + (*(undefined4 *)((char *)&(local_9f8) + 0x4)) = (void *)0x0; local_9b8._capacity = (Entity *)0x0; - local_9f8._8_4_ = (Entity *)0x0; - local_14 = (float)CONCAT31(local_14._1_3_,10); + (*(undefined4 *)((char *)&(local_9f8) + 0x8)) = (Entity *)0x0; + local_14 = (float)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),10); local_9a0 = (Game *)((float)local_9a0 + (float)local_9ac * 40.0); local_9c0 = (RNG *)(fVar17 * 40.0 + (float)local_99c); listedEntity = (EntityPtr)local_9d4.y; do { local_a18.x = (float)local_9c0; local_a18.y = (float)local_9a0; - local_9d4.y = (float)((Game *)(g_game))->Game::Spawn((uint)local_9bc,(uint)local_9b8._begin, + local_9d4.y = (float)((Game *)(g_game))->Game::Spawn(GHIDRA_UINT(local_9bc),GHIDRA_UINT(local_9b8._begin), &local_a18,&g_vectorZero,(Entity *)0x0, - (uint)local_9b8._end,(uint)local_9cc); + GHIDRA_UINT(local_9b8._end),GHIDRA_UINT(local_9cc)); if (pEVar32 == local_9b8._capacity) { std::vector::_Emplace_reallocate(); - local_9b8._capacity = (void *)local_9f8._8_4_; - pEVar32 = (Entity *)local_9f8._4_4_; + local_9b8._capacity = (*(undefined4 *)((char *)&((void *)local_9f8) + 0x8)); + pEVar32 = (*(undefined4 *)((char *)&((Entity *)local_9f8) + 0x4)); } else { *(float *)pEVar32 = local_9d4.y; - local_9f8._4_4_ = &(*(undefined1 *)((char *)(pEVar32) + 0x4)); + (*(undefined4 *)((char *)&(local_9f8) + 0x4)) = &(*(undefined1 *)((char *)(pEVar32) + 0x4)); pEVar32 = (Entity *)&(*(undefined1 *)((char *)(pEVar32) + 0x4)); } listedEntity = *(EntityPtr *)((char *)listedEntity + 0x3bc); @@ -16251,16 +16251,16 @@ LAB_008067bb: (((1 < *(int *)&g_game->_deathmatchManager && (*(int *)((char *)listedEntity + 0x28) == 1)) || (*(int *)((char *)listedEntity + 0x28) - 10U < 0x3de)))); - pvVar30 = (void *)((int)pEVar32 - local_9f8._0_4_ >> 2); + pvVar30 = (void *)(GHIDRA_INT(pEVar32) - (*(undefined4 *)((char *)&(local_9f8) + 0x0)) >> 2); local_9d4.y = 0.0; if (pvVar30 != (void *)0x0) { pvVar23 = (void *)0x0; do { - (**(code **)(**(int **)(local_9f8._0_4_ + pvVar23 * 4) + 0xc))(); - pvVar23 = (void *)((int)pvVar23 + 1); + (**(code **)(**(int **)((*(undefined4 *)((char *)&(local_9f8) + 0x0)) + pvVar23 * 4) + 0xc))(); + pvVar23 = (void *)(GHIDRA_INT(pvVar23) + 1); } while (pvVar23 < pvVar30); local_9c0 = (void *)0x0; - local_9ac = (ItemPool *)local_9f8._0_4_; + local_9ac = (*(undefined4 *)((char *)&((ItemPool *)local_9f8) + 0x0)); pfVar35 = (float *)local_9c8.y; do { fVar17 = *(float *)local_9ac; @@ -16274,28 +16274,28 @@ LAB_008067bb: *pfVar35 = *(float *)local_9ac; local_a0c = pfVar35 + 1; } - local_9ac = (ItemPool *)((int)local_9ac + 4); - local_9c0 = (RNG *)((int)local_9c0 + 1); + local_9ac = (ItemPool *)(GHIDRA_INT(local_9ac) + 4); + local_9c0 = (RNG *)(GHIDRA_INT(local_9c0) + 1); pfVar35 = local_a0c; } while (local_9c0 < pvVar30); local_9c8.y = (float)local_a0c; } pfVar35 = (float *)local_9c8.y; - local_14 = (float)CONCAT31(local_14._1_3_,9); - if ((float *)local_9f8._0_4_ != (float *)0x0) { - deallocate((void *)local_9f8._0_4_,(int)local_9b8._capacity - local_9f8._0_4_ >> 2); - local_9f8._0_4_ = (void *)0x0; - local_9f8._4_4_ = (void *)0x0; - local_9f8._8_4_ = (Entity *)0x0; + local_14 = (float)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),9); + if ((*(undefined4 *)((char *)&((float *)local_9f8) + 0x0)) != (float *)0x0) { + deallocate((*(undefined4 *)((char *)&((void *)local_9f8) + 0x0)),GHIDRA_INT(local_9b8._capacity) - (*(undefined4 *)((char *)&(local_9f8) + 0x0)) >> 2); + (*(undefined4 *)((char *)&(local_9f8) + 0x0)) = (void *)0x0; + (*(undefined4 *)((char *)&(local_9f8) + 0x4)) = (void *)0x0; + (*(undefined4 *)((char *)&(local_9f8) + 0x8)) = (Entity *)0x0; } } } - local_9a8 = (Entity *)((int)local_9a8 + 1); + local_9a8 = (Entity *)(GHIDRA_INT(local_9a8) + 1); puVar34 = DAT_00c82674; - } while (local_9a8 < (uint)((int)DAT_00c82678 - (int)DAT_00c82674 >> 2)); + } while (local_9a8 < GHIDRA_UINT((GHIDRA_INT(DAT_00c82678) - GHIDRA_INT(DAT_00c82674) >> 2))); } uVar18 = 0; - uVar20 = (int)pfVar35 - (int)local_a10 >> 2; + uVar20 = GHIDRA_INT(pfVar35) - GHIDRA_INT(local_a10) >> 2; if (uVar20 != 0) { do { iVar16 = *(int *)((char *)local_a10 + uVar18 * 4); @@ -16305,14 +16305,14 @@ LAB_008067bb: } while (uVar18 < uVar20); } if (local_a10 != (void *)0x0) { - deallocate(local_a10,(int)local_9a4 - (int)local_a10 >> 2); + deallocate(local_a10,GHIDRA_INT(local_9a4) - GHIDRA_INT(local_a10) >> 2); } } ExceptionList = local_1c; return; LAB_00805bb8: local_99c = (Entity *)&(local_99c->_damageEvents)._capacity; - local_9a4 = (Game *)((int)&local_9a4->_stage + 1); + local_9a4 = (Game *)(GHIDRA_INT(&local_9a4->_stage) + 1); if ((Game *)&DAT_00000009 < local_9a4) goto LAB_00805a6e; pGVar21 = local_9a0; goto LAB_008058a0; @@ -16340,14 +16340,14 @@ void Room::TriggerClear(byte playSound) ScoreSheet *scoreSheet; scoreSheet = &g_game->_scoreSheet; - descriptorFlags = (uint *)((int)this->_descriptor + 0x44); + descriptorFlags = (uint *)(GHIDRA_INT(this->_descriptor) + 0x44); *descriptorFlags = *descriptorFlags | 1; - clearCount = (short *)((int)this->_descriptor + 0x4a); + clearCount = (short *)(GHIDRA_INT(this->_descriptor) + 0x4a); *clearCount = *clearCount + 1; descriptor = this->_descriptor; ScoreSheet::add_cleared_room (scoreSheet,this->_roomType,*(int *)(*(int *)((char *)descriptor + 0x10) + 0x48), - (uint)*(ushort *)((char *)descriptor + 0x4a), + GHIDRA_UINT(*(ushort *)((char *)descriptor + 0x4a)), (byte)(*(uint *)((char *)descriptor + 0x44) >> 10) & 1); game = g_game; if ((((g_game->_challenge == 0x1f) || @@ -16477,7 +16477,7 @@ void Room::render_player_light(Entity_Player *player, Vector *offset) } else { if ((*(int *)((char *)minecart + 0x7c) == 0) || - (pVVar6 = ((AnimationState *)((AnimationState *)((int)minecart + 0x78)))->AnimationState::GetNullFrameById(0), + (pVVar6 = ((AnimationState *)((AnimationState *)(GHIDRA_INT(minecart) + 0x78)))->AnimationState::GetNullFrameById(0), pVVar6 == (Vector *)0x0)) { pVVar6 = &g_vectorZero; } @@ -16594,7 +16594,7 @@ void Room::render_player_light(Entity_Player *player, Vector *offset) local_10 = renderPos.x; } pvVar1 = (g_manager->_itemConfig)._collectibles._begin; - if ((int)((int)(g_manager->_itemConfig)._collectibles._end - (int)pvVar1 & 0xfffffffcU) < 0x401) + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar1) & 0xfffffffcU)) < 0x401) { local_c.y = 0.0; } @@ -16603,11 +16603,11 @@ void Room::render_player_light(Entity_Player *player, Vector *offset) } iVar8 = player->_playerCostumeMap[0]._index; if (((iVar8 < 0) || - (*(float *)(iVar8 * 0x130 + 0x114 + (int)(player->_costumeSpriteDescs)._begin) != local_c.y) + (*(float *)(iVar8 * 0x130 + 0x114 + GHIDRA_INT((player->_costumeSpriteDescs)._begin)) != local_c.y) ) && (bVar5 = ((Entity_Player *)(player))->Entity_Player::HasCollectible(0x101,0), pRVar3 = local_1c, bVar5 == 0)) { pvVar1 = (g_manager->_itemConfig)._nullItems._begin; - if ((int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar1 & 0xfffffffcU) < 0xe1) { + if (GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar1) & 0xfffffffcU)) < 0xe1) { iVar8 = 0; } else { @@ -16615,7 +16615,7 @@ void Room::render_player_light(Entity_Player *player, Vector *offset) } iVar2 = player->_playerCostumeMap[0]._index; if ((iVar2 < 0) || - (*(int *)(iVar2 * 0x130 + 0x114 + (int)(player->_costumeSpriteDescs)._begin) != iVar8)) { + (*(int *)(iVar2 * 0x130 + 0x114 + GHIDRA_INT((player->_costumeSpriteDescs)._begin)) != iVar8)) { return; } color._offset[0] = 0.0; @@ -16667,10 +16667,10 @@ void Room::render_player_light(Entity_Player *player, Vector *offset) (*pcVar4)(); return; } - uVar7 = (uint)rng._seed >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; + uVar7 = GHIDRA_UINT(rng._seed) >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; uVar7 = uVar7 << ((byte)rng._shift2 & 0x1f) ^ uVar7; uVar7 = uVar7 >> ((byte)rng._shift3 & 0x1f) ^ uVar7; - renderPos.x = (float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + renderPos.x = (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283062e-10; renderPos.x = renderPos.x + renderPos.x; fVar9 = renderPos.x * pVVar6->y; @@ -16751,11 +16751,11 @@ void Room::render_player_light(Entity_Player *player, Vector *offset) (*pcVar4)(); return; } - uVar7 = (uint)rng._seed >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; + uVar7 = GHIDRA_UINT(rng._seed) >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; uVar7 = uVar7 << ((byte)rng._shift2 & 0x1f) ^ uVar7; lightSprite = &this->_lightSprite; uVar7 = uVar7 >> ((byte)rng._shift3 & 0x1f) ^ uVar7; - fVar12 = (float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]) * + fVar12 = (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) * 2.3283062e-10; renderPos.y = fVar12 * pVVar6->y + fVar9 + fVar11; renderPos.x = fVar12 * pVVar6->x + fVar10; @@ -16817,7 +16817,7 @@ void Room::render_grid_entity_light(GridEntity *param_2, float *param_3) local_3c._shift1 = 5; local_3c._shift2 = 0x1b; local_10 = (float *)g_game->_frameCount; - local_3c._seed = (param_2->_desc)._spawnSeed + (int)local_10; + local_3c._seed = (param_2->_desc)._spawnSeed + GHIDRA_INT(local_10); local_3c._shift3 = 0x19; local_20.y = (float)this; iVar2 = ((Level *)((Level *)g_game))->Level::get_secret_exit_kind(); @@ -16826,10 +16826,10 @@ void Room::render_grid_entity_light(GridEntity *param_2, float *param_3) iVar2 = this->_backdropType; if (iVar2 == 0x20) { if ((*(uint *)((char *)this->_descriptor + 0x44) >> 5 & 1) != 0) { - fVar5 = sin((float)(int)local_10 * 0.1); + fVar5 = sin((float)GHIDRA_INT(local_10) * 0.1); local_20.y = fVar5 * 0.2 + 0.8; local_c.y = (local_20.y * 0.1 + 0.9) * this->_lavaIntensity; - if (1 < (uint)(param_2->_desc)._state) { + if (1 < GHIDRA_UINT((param_2->_desc)._state)) { local_c.y = local_c.y * 0.5; } if (local_c.y <= 0.0) { @@ -16879,7 +16879,7 @@ LAB_0080cac5: param_2 = (GridEntity *)0x3f800000; } param_2 = (GridEntity *)((local_c.y * 0.1 + 0.9) * (float)param_2); - if (1 < (uint)(gridEntity->_desc)._state) { + if (1 < GHIDRA_UINT((gridEntity->_desc)._state)) { param_2 = (GridEntity *)((float)param_2 * 0.5); } if ((float)param_2 <= 0.0) { @@ -17022,9 +17022,9 @@ LAB_0080cac5: else { piVar1 = *(int **)(*(int *)((char *)game->_room + 4) + 0x10); if ((piVar1 == (int *)0x0) || (*piVar1 != 0x23)) { - roomDesc = ((Level *)((Level *)game))->Level::GetRoomByIdx((int)param_2[2]._sprite._color._tint[1],-1); + roomDesc = ((Level *)((Level *)game))->Level::GetRoomByIdx(GHIDRA_INT(param_2[2]._sprite._color._tint[1]),-1); if ((roomDesc->Flags & 0x40000U) == 0) { - if ((((uint)param_2[2]._sprite._color._colorize[0] >> 5 & 1) == 0) || + if (((GHIDRA_UINT(param_2[2]._sprite._color._colorize[0]) >> 5 & 1) == 0) || (g_game->_currentDimensionIdx != 1)) { if (param_2[1]._desc._state != 0xf) { return; @@ -17138,8 +17138,8 @@ LAB_0080cac5: layer->_blendMode[4] = DAT_00c35b7c; ((Color *)(&local_68))->Color::Color(1.0,0.5,0.5,2.0); ((Sprite *)((Sprite *)lightSprite))->Sprite::SetColor(color_11); - (((ANM2 *)((int)local_20.y + 0x6e40))->_scale).x = 1.2; - (((ANM2 *)((int)local_20.y + 0x6e40))->_scale).y = 0.75; + (((ANM2 *)(GHIDRA_INT(local_20.y) + 0x6e40))->_scale).x = 1.2; + (((ANM2 *)(GHIDRA_INT(local_20.y) + 0x6e40))->_scale).y = 0.75; pVVar4 = ((GridEntity *)(param_2))->GridEntity::Position(&gridPos); fVar5 = g_displayPixelRatio * g_screenPointScale; local_20.y = ((g_screenWidth - 338.0) * 0.5 + (pVVar4->x - 60.0) * 0.65) * fVar5 + 0.5; @@ -17303,7 +17303,7 @@ byte Room::pick_special_clear_award(int *outCollectible, uint *outTrinket, RNG * int *numAvailableTrinkets; void *trinketPool; - trinketChoices[0xb] = __security_cookie ^ (uint)(trinketChoices + 0xc); + trinketChoices[0xb] = __security_cookie ^ GHIDRA_UINT((trinketChoices + 0xc)); *outCollectible = 0; *outTrinket = 0; if ((this->_roomType != 5) && (this->_secondBossID != 0)) { @@ -17638,9 +17638,9 @@ LAB_0080e7d5: game = g_game; uVar3 = *outTrinket; if (uVar3 != 0) { - if (((((int)uVar3 < 1) || + if ((((GHIDRA_INT(uVar3) < 1) || (trinketPool = (g_game->_itemPool)._trinketPoolItems._begin, - (int)(g_game->_itemPool)._trinketPoolItems._end - (int)trinketPool >> 3 <= (int)uVar3)) || + GHIDRA_INT((g_game->_itemPool)._trinketPoolItems._end) - GHIDRA_INT(trinketPool) >> 3 <= GHIDRA_INT(uVar3))) || (*(char *)((char *)trinketPool + uVar3 * 8 + 4) == '\0')) || (*(char *)((char *)trinketPool + uVar3 * 8 + 5) == '\0')) { *outTrinket = 0; @@ -17815,20 +17815,20 @@ void Room::render_lighting() this->_litGridIndices[7] = 0; if ((room->_entityList)._updateEL._size != 0) { do { - ((Game *)((Game *)beamAnim))->Game::Render(*(Entity **)((int)(beamAnim->_entityList)._updateEL._data + uVar5 * 4), + ((Game *)((Game *)beamAnim))->Game::Render(*(Entity **)(GHIDRA_INT((beamAnim->_entityList)._updateEL._data) + uVar5 * 4), &renderOffset); uVar5 = uVar5 + 1; - } while (uVar5 < (uint)(beamAnim->_entityList)._updateEL._size); + } while (uVar5 < GHIDRA_UINT((beamAnim->_entityList)._updateEL._size)); } local_110 = (float)(beamAnim->_gridHeight * beamAnim->_gridWidth); - if (0 < (int)local_110) { + if (0 < GHIDRA_INT(local_110)) { gridEntitySlot = beamAnim->_gridEntities; do { if (*gridEntitySlot != (void *)0x0) { render_grid_entity_light(beamAnim,*gridEntitySlot,&renderOffset); } gridEntitySlot = gridEntitySlot + 1; - local_110 = (float)((int)local_110 + -1); + local_110 = (float)(GHIDRA_INT(local_110) + -1); } while (local_110 != 0.0); } if (((beamAnim->_roomType == 5) && @@ -18070,7 +18070,7 @@ void Room::Render() local_14 = 0xffffffff; puStack_18 = &LAB_00b0154b; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(debugText + 0x98); + local_24 = __security_cookie ^ GHIDRA_UINT((debugText + 0x98)); ExceptionList = &local_1c; local_210 = (Game *)0x4e; local_200 = (Game *)rock; @@ -18243,7 +18243,7 @@ LAB_0080f352: fVar19 = 2.0; if (isRenderingToScreen != '\0') { if (rock->_backdropType == 0x1c) { - local_1b8._24_4_ = 0.2784314; + (*(undefined4 *)((char *)&(local_1b8) + 0x18)) = 0.2784314; fStack_19c = 0.18039216; fStack_198 = 0.101960786; fStack_194 = 1.0; @@ -18255,7 +18255,7 @@ LAB_0080f352: fVar17 = (float)rock->_gridWidth - 2.0; fVar19 = (float)rock->_gridHeight - 2.0; LAB_0080f949: - local_bc._12_4_ = fVar17 * 26.0; + (*(undefined4 *)((char *)&(local_bc) + 0xc)) = fVar17 * 26.0; local_ac = (Game *)(fVar19 * 26.0); VStack_c4.y = backdropY + 52.0; VStack_c4.x = backdropX + 52.0; @@ -18296,21 +18296,21 @@ LAB_0080f949: local_1e4 = *(Game **)local_1d4; local_204 = *(Game **)((char *)local_1d4 + 4); pGVar18 = local_1d4; - if (((int)local_1e4 < (int)local_204) && + if ((GHIDRA_INT(local_1e4) < GHIDRA_INT(local_204)) && (((rock->_backdropType == 0x12 || (rock->_backdropType == 0x1c)) && ((*(byte *)((char *)rock->_descriptor + 0x44) & 1) == 0)))) { pvVar8 = ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(rock) + 0x7100))))->ANM2::GetAnimationData(s_Idle); - local_1e4 = (Game *)(int)((float)*(int *)((char *)pvVar8 + 0x30) * - ((float)(int)local_1e4 / (float)(int)local_204)); + local_1e4 = (Game *)GHIDRA_INT(((float)*(int *)((char *)pvVar8 + 0x30) * + ((float)GHIDRA_INT(local_1e4) / (float)GHIDRA_INT(local_204)))); bVar4 = ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(rock) + 0x7100))))->ANM2::SetAnimation(s_Idle,1); if (((bVar4 != 0) && (*(int *)&(*(undefined1 *)((char *)(rock) + 0x7134)) != 0)) && (AnimationState::SetFrameFloat - ((AnimationState *)&(*(undefined1 *)((char *)(rock) + 0x7130)),(float)(int)local_1e4), + ((AnimationState *)&(*(undefined1 *)((char *)(rock) + 0x7130)),(float)GHIDRA_INT(local_1e4)), *(int *)&(*(undefined1 *)((char *)(rock) + 0x7134)) != 0)) { (*(undefined1 *)((char *)(rock) + 0x7144)) = 0; } pGVar18 = local_1d4; - pfVar12 = (float *)((int)local_1d4 + -0x14); + pfVar12 = (float *)(GHIDRA_INT(local_1d4) + -0x14); local_204 = (Game *)((*(float *)((char *)local_1d4 + -0x10) - 140.0) * 0.65 + (g_screenHeight - 182.0) * 0.5); local_1d4 = (Game *)(g_displayPixelRatio * g_screenPointScale); @@ -18321,7 +18321,7 @@ LAB_0080f949: local_1e4 = (Game *)((float)local_204 * (float)local_1d4 + 0.5); dVar20 = floor((double)(float)local_1e4); local_1e4 = (Game *)(float)dVar20; - local_bc._12_4_ = (float)local_1e0 + (rock->_renderScrollOffset).x; + (*(undefined4 *)((char *)&(local_bc) + 0xc)) = (float)local_1e0 + (rock->_renderScrollOffset).x; local_ac = (Game *)((float)local_1e4 / (float)local_1d4 + (rock->_renderScrollOffset).y); if ((*(undefined1 *)((char *)(rock) + 0x7209)) != '\0') { if ((*(undefined1 *)((char *)(rock) + 0x7170)) == '\0') { @@ -18339,8 +18339,8 @@ LAB_0080f949: AnimationState::Render(this_00,(Vector *)(local_bc + 0xc),&g_vectorZero,&g_vectorZero); } } - local_1d4 = (Game *)((int)pGVar18 + 0x1c); - local_1f0 = (Game *)((int)local_1f0 + -1); + local_1d4 = (Game *)(GHIDRA_INT(pGVar18) + 0x1c); + local_1f0 = (Game *)(GHIDRA_INT(local_1f0) + -1); } while (local_1f0 != (Game *)0x0); local_1f0 = (Game *)0x0; } @@ -18374,9 +18374,9 @@ LAB_0080f949: if (*(int **)local_1e0 != (int *)0x0) { (**(code **)(**(int **)local_1e0 + 0xc))(); } - local_1e0 = (Game *)((int)local_1e0 + 4); - local_1d4 = (Game *)((int)local_1d4 + 1); - } while ((int)local_1d4 < rock->_gridHeight * rock->_gridWidth); + local_1e0 = (Game *)(GHIDRA_INT(local_1e0) + 4); + local_1d4 = (Game *)(GHIDRA_INT(local_1d4) + 1); + } while (GHIDRA_INT(local_1d4) < rock->_gridHeight * rock->_gridWidth); } } else { @@ -18403,9 +18403,9 @@ LAB_0080f949: if ((piVar9 != (int *)0x0) && (piVar9[1] == 1)) { (**(code **)(*piVar9 + 0xc))(); } - local_1e0 = (Game *)((int)local_1e0 + 4); - local_1d4 = (Game *)((int)local_1d4 + 1); - } while ((int)local_1d4 < rock->_gridHeight * rock->_gridWidth); + local_1e0 = (Game *)(GHIDRA_INT(local_1e0) + 4); + local_1d4 = (Game *)(GHIDRA_INT(local_1d4) + 1); + } while (GHIDRA_INT(local_1d4) < rock->_gridHeight * rock->_gridWidth); } } ((EntityList *)(&rock->_entityList))->EntityList::render_up_to(5000,(Vector *)pGVar18); @@ -18431,11 +18431,11 @@ LAB_0080f949: set_blend_mode(&DAT_00c798e0,2); rock = (Room *)local_200; render_water((Room *)local_200,0); - g_graphicsManager_blendMode[0] = (int)local_e8._red; - g_graphicsManager_blendMode[1] = (int)local_e8._green; - g_graphicsManager_blendMode[2] = (int)local_e8._blue; - g_graphicsManager_blendMode[3] = (int)local_e8._alpha; - g_graphicsManager_blendMode[4] = (int)local_1e4; + g_graphicsManager_blendMode[0] = GHIDRA_INT(local_e8._red); + g_graphicsManager_blendMode[1] = GHIDRA_INT(local_e8._green); + g_graphicsManager_blendMode[2] = GHIDRA_INT(local_e8._blue); + g_graphicsManager_blendMode[3] = GHIDRA_INT(local_e8._alpha); + g_graphicsManager_blendMode[4] = GHIDRA_INT(local_1e4); pGVar18 = (Game *)&((Game *)rock)->_roomList[0x18].DeliriumDistance; } else { @@ -18458,12 +18458,12 @@ LAB_0080f949: )))) { (**(code **)(*piVar9 + 0xc))(); } - local_1d4 = (Game *)((int)local_1d4 + 1); - local_1e0 = (Game *)((int)local_1e0 + 4); - } while ((int)local_1d4 < *(int *)&(*(undefined1 *)((char *)(((Game *)rock)) + 0x10)) * ((Game *)rock)->_curses); + local_1d4 = (Game *)(GHIDRA_INT(local_1d4) + 1); + local_1e0 = (Game *)(GHIDRA_INT(local_1e0) + 4); + } while (GHIDRA_INT(local_1d4) < *(int *)&(*(undefined1 *)((char *)(((Game *)rock)) + 0x10)) * ((Game *)rock)->_curses); } if ((((Game *)rock)->_roomList[0x28].Flags == 0x20) && - ((*(uint *)((int)((Game *)rock)->_stageType + 0x44) >> 5 & 1) != 0)) { + ((*(uint *)(GHIDRA_INT(((Game *)rock)->_stageType) + 0x44) >> 5 & 1) != 0)) { render_water_overlay(rock,&renderOffset); local_1d4 = (Game *)0x0; if (0 < *(int *)&(*(undefined1 *)((char *)(((Game *)rock)) + 0x10)) * ((Game *)rock)->_curses) { @@ -18471,15 +18471,15 @@ LAB_0080f949: do { pvVar8 = *(void **)local_1e0; if ((pvVar8 != (void *)0x0) && (*(int *)((char *)pvVar8 + 4) == 7)) { - layer = ((ANM2 *)((ANM2 *)((int)pvVar8 + 0x40)))->ANM2::GetLayer((byte *)0x0); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(pvVar8) + 0x40)))->ANM2::GetLayer((byte *)0x0); layer->_visible = 0; (**(code **)(**(int **)local_1e0 + 0xc))(); - layer = ((ANM2 *)((ANM2 *)((int)*(void **)local_1e0 + 0x40)))->ANM2::GetLayer((byte *)0x0); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(*(void **))local_1e0 + 0x40)))->ANM2::GetLayer((byte *)0x0); layer->_visible = 1; } - local_1e0 = (Game *)((int)local_1e0 + 4); - local_1d4 = (Game *)((int)local_1d4 + 1); - } while ((int)local_1d4 < *(int *)&(*(undefined1 *)((char *)(((Game *)rock)) + 0x10)) * ((Game *)rock)->_curses); + local_1e0 = (Game *)(GHIDRA_INT(local_1e0) + 4); + local_1d4 = (Game *)(GHIDRA_INT(local_1d4) + 1); + } while (GHIDRA_INT(local_1d4) < *(int *)&(*(undefined1 *)((char *)(((Game *)rock)) + 0x10)) * ((Game *)rock)->_curses); } } render_pit_rails((Room *)local_1e4); @@ -18504,7 +18504,7 @@ LAB_0080f949: shaderColor._colorize[0] = 1.0; shaderColor._offset[1] = 1.0; shaderColor._colorize[3] = 1.0; - shaderColor._offset[2]._0_1_ = 0; + (*(undefined1 *)((char *)&(shaderColor._offset[2]) + 0x0)) = 0; ((KColor *)((KColor *)(local_1b8 + 0x18)))->KColor::SetFromARGB(0xffffffff); render_quad_set_uniform_color(screenQuad,0.0,0.0,g_screenWidth,g_screenHeight,color_04); pGVar18 = g_game; @@ -18527,7 +18527,7 @@ LAB_0080f949: local_214 = (Game *)(float)dVar20; local_1e4 = (Game *)((((float)local_200->_roomList[0].SafeGridIndex - 140.0) * 0.65 + (float)local_1e0) * (float)local_1d4 + 0.5); - iVar14 = (int)((ulonglong)(double)(float)local_1e4 >> 0x20); + iVar14 = GHIDRA_INT(((ulonglong)(double)(float)local_1e4 >> 0x20)); dVar20 = floor((double)(float)local_1e4); local_1e4 = (Game *)(float)dVar20; VStack_c4.x = (((float)local_204->_stage + (pGVar18->_screenShakeOffset).x + @@ -18548,9 +18548,9 @@ LAB_0080f949: pVVar21 = (Vector *)0x8104bb; render_beast_arena_background(&local_200->_roomList[0xa6].ListIndex,2); } - iVar14._0_1_ = pGVar18->_bossChallenge; - iVar14._1_1_ = pGVar18->_devilRoomDisabled; - iVar14._2_2_ = *(undefined2 *)&(*(undefined1 *)((char *)(pGVar18) + 0xa)); + (*(undefined1 *)((char *)&(iVar14) + 0x0)) = pGVar18->_bossChallenge; + (*(undefined1 *)((char *)&(iVar14) + 0x1)) = pGVar18->_devilRoomDisabled; + (*(undefined2 *)((char *)&(iVar14) + 0x2)) = *(undefined2 *)&(*(undefined1 *)((char *)(pGVar18) + 0xa)); if (iVar14 != 0x10) { local_1d4 = (Game *)0x0; if (0 < *(int *)&(*(undefined1 *)((char *)(pGVar18) + 0x10)) * pGVar18->_curses) { @@ -18561,13 +18561,13 @@ LAB_0080f949: pVVar21 = (Vector *)0x8104fa; (**(code **)(*piVar9 + 0xc))(); } - local_1d4 = (Game *)((int)local_1d4 + 1); + local_1d4 = (Game *)(GHIDRA_INT(local_1d4) + 1); ppvVar15 = ppvVar15 + 1; - } while ((int)local_1d4 < *(int *)&(*(undefined1 *)((char *)(pGVar18) + 0x10)) * pGVar18->_curses); + } while (GHIDRA_INT(local_1d4) < *(int *)&(*(undefined1 *)((char *)(pGVar18) + 0x10)) * pGVar18->_curses); } piVar9 = DAT_00c797bc; if (DAT_00c797bc != (int *)0x0) { - ((BlendMode *)(local_1b8 + 0x18))->BlendMode::SetMode(1,(int)local_1d4); + ((BlendMode *)(local_1b8 + 0x18))->BlendMode::SetMode(1,GHIDRA_INT(local_1d4)); g_graphicsManager_blendMode[0] = *extraout_EAX_00; g_graphicsManager_blendMode[1] = extraout_EAX_00[1]; g_graphicsManager_blendMode[2] = extraout_EAX_00[2]; @@ -18584,7 +18584,7 @@ LAB_0080f949: ((KAGE::SmartPointer *)(auStack_2d2 + -10))->KAGE::SmartPointer::operator_assign(&DAT_00c797b4); apply_sprite_shader_params(color,1,pVVar21,pvVar8); local_190 = 0.0; - local_1b8._24_4_ = 1.0; + (*(undefined4 *)((char *)&(local_1b8) + 0x18)) = 1.0; fStack_19c = 1.0; fStack_198 = 1.0; fStack_194 = 0.24; @@ -18617,7 +18617,7 @@ LAB_0080f949: shaderColor._colorize[0] = 1.0; shaderColor._offset[1] = 1.0; shaderColor._colorize[3] = 1.0; - shaderColor._offset[2]._0_1_ = 0; + (*(undefined1 *)((char *)&(shaderColor._offset[2]) + 0x0)) = 0; ((KColor *)((KColor *)(local_1b8 + 0x18)))->KColor::SetFromARGB(0xffffffff); render_quad_set_uniform_color(screenQuad,0.0,0.0,g_screenWidth,g_screenHeight,color_05); pGVar18 = g_game; @@ -18640,7 +18640,7 @@ LAB_0080f949: local_21c.y = (float)dVar20; local_ac = (Game *)((((float)local_200->_roomList[0].SafeGridIndex - 140.0) * 0.65 + VStack_c4.y ) * (float)local_1d4 + 0.5); - iVar14 = (int)((ulonglong)(double)(float)local_ac >> 0x20); + iVar14 = GHIDRA_INT(((ulonglong)(double)(float)local_ac >> 0x20)); dVar20 = floor((double)(float)local_ac); VStack_c4.x = (((pGVar18->_screenShakeOffset).x + (float)local_204->_stage + local_21c.y / (float)local_1d4) * g_screenPointScale) / local_224.y; @@ -18672,14 +18672,14 @@ LAB_0080f949: if (local_200->_roomList[0x19].DecorationSeed != 0) { do { render_player_light(room,*(Entity_Player **) - ((int)*(void **)&((Game *)room)->_roomList[0x19].PoopCount + - (int)local_1d4 * 4),(Vector *)&pRVar3[0x18].DeliriumDistance); - local_1d4 = (Game *)((int)local_1d4 + 1); - } while (local_1d4 < (uint)((Game *)room)->_roomList[0x19].DecorationSeed); + (GHIDRA_INT(*(void **))&((Game *)room)->_roomList[0x19].PoopCount + + GHIDRA_INT(local_1d4) * 4),(Vector *)&pRVar3[0x18].DeliriumDistance); + local_1d4 = (Game *)(GHIDRA_INT(local_1d4) + 1); + } while (local_1d4 < GHIDRA_UINT(((Game *)room)->_roomList[0x19].DecorationSeed)); } - iVar10._0_1_ = ((Game *)room)->_bossChallenge; - iVar10._1_1_ = ((Game *)room)->_devilRoomDisabled; - iVar10._2_2_ = *(undefined2 *)&(*(undefined1 *)((char *)(((Game *)room)) + 0xa)); + (*(undefined1 *)((char *)&(iVar10) + 0x0)) = ((Game *)room)->_bossChallenge; + (*(undefined1 *)((char *)&(iVar10) + 0x1)) = ((Game *)room)->_devilRoomDisabled; + (*(undefined2 *)((char *)&(iVar10) + 0x2)) = *(undefined2 *)&(*(undefined1 *)((char *)(((Game *)room)) + 0xa)); if (iVar10 != 0x10) { iVar10 = *(int *)&(*(undefined1 *)((char *)(((Game *)room)) + 0x10)); iVar14 = ((Game *)room)->_curses; @@ -18695,25 +18695,25 @@ LAB_0080f949: ((stageType != (undefined1 *)0x12 && ((stageType != &DAT_0000000e || (local_ac->_curses != 1000)))))) && ((isRenderingToScreen == '\0' || - ((**(code **)(local_ac->_stage + 0x18))(), ((uint)VStack_c4.x & 2) == 0)))) { + ((**(code **)(local_ac->_stage + 0x18))(), (GHIDRA_UINT(VStack_c4.x) & 2) == 0)))) { (**(code **)(local_ac->_stage + 0xc))(); } iVar10 = *(int *)&(*(undefined1 *)((char *)(((Game *)room)) + 0x10)); iVar14 = ((Game *)room)->_curses; - local_1d4 = (Game *)((int)local_1d4 + 1); - local_1e0 = (Game *)((int)local_1e0 + 4); - } while ((int)local_1d4 < iVar10 * iVar14); + local_1d4 = (Game *)(GHIDRA_INT(local_1d4) + 1); + local_1e0 = (Game *)(GHIDRA_INT(local_1e0) + 4); + } while (GHIDRA_INT(local_1d4) < iVar10 * iVar14); } local_1e0 = (Game *)0x2710; local_1d4 = (Game *)0x0; if (0 < iVar10) { VStack_c4.y = 10000.0; do { - if (((iVar14 < 1) || ((int)local_1d4 < 0)) || (iVar10 <= (int)local_1d4)) { + if (((iVar14 < 1) || (GHIDRA_INT(local_1d4) < 0)) || (iVar10 <= GHIDRA_INT(local_1d4))) { iVar10 = -1; } else { - iVar10 = (int)local_1d4 * iVar14; + iVar10 = GHIDRA_INT(local_1d4) * iVar14; } local_ac = (Game *)(((float)(iVar10 / iVar14) * 40.0 + 120.0 + 20.0) * 100.0 + 10030.0 + 0.5 ); @@ -18721,16 +18721,16 @@ LAB_0080f949: local_ac = (Game *)(float)dVar20; local_1e0 = (Game *)__ftoui3(); EntityList::render_up_to - ((EntityList *)&((Game *)room)->_roomList[0x19].Dimension,(uint)local_1e0, + ((EntityList *)&((Game *)room)->_roomList[0x19].Dimension,GHIDRA_UINT(local_1e0), (Vector *)&((Game *)room)->_roomList[0x18].DeliriumDistance); iVar14 = ((Game *)room)->_curses; iVar10 = 0; if (0 < iVar14) { do { if (((((-1 < iVar10) && (iVar10 < iVar14)) && - ((-1 < (int)local_1d4 && - (((int)local_1d4 < *(int *)&(*(undefined1 *)((char *)(((Game *)room)) + 0x10)) && - (iVar13 = (int)local_1d4 * iVar14 + iVar10, -1 < iVar13)))))) && + ((-1 < GHIDRA_INT(local_1d4) && + ((GHIDRA_INT(local_1d4) < *(int *)&(*(undefined1 *)((char *)(((Game *)room)) + 0x10)) && + (iVar13 = GHIDRA_INT(local_1d4) * iVar14 + iVar10, -1 < iVar13)))))) && (rock = (GridEntity_Rock *)((Game *)room)->_roomMap[iVar13 + -0x5eae], rock != (GridEntity_Rock *)0x0)) && ((rock->_desc)._type == 0x18)) { GridEntity_Rock::RenderTop @@ -18741,12 +18741,12 @@ LAB_0080f949: } while (iVar10 < iVar14); } iVar10 = *(int *)&(*(undefined1 *)((char *)(((Game *)room)) + 0x10)); - local_1d4 = (Game *)((int)local_1d4 + 1); - } while ((int)local_1d4 < iVar10); + local_1d4 = (Game *)(GHIDRA_INT(local_1d4) + 1); + } while (GHIDRA_INT(local_1d4) < iVar10); } EntityList::render_up_to ((EntityList *)&((Game *)room)->_roomList[0x19].Dimension, - (uint)&local_1e0->_roomList[0x1b].Dimension, + GHIDRA_UINT(&local_1e0->_roomList[0x1b].Dimension), (Vector *)&((Game *)room)->_roomList[0x18].DeliriumDistance); } if (isRenderingToScreen != '\0') { @@ -18761,44 +18761,44 @@ LAB_0080f949: pGVar11 = (Game *)&((Game *)room)->_roomList[0x19].Dimension; if (*(int *)&((Game *)room)->_roomList[0x19].ShopItemIdx != 0) { do { - (**(code **)(**(int **)((int)((EntityList_EL *)((int)pGVar18 + 0x50))->_data + uVar6 * 4) + + (**(code **)(**(int **)(GHIDRA_INT(((EntityList_EL *)(GHIDRA_INT(pGVar18) + 0x50))->_data) + uVar6 * 4) + 0x1c))(); uVar6 = uVar6 + 1; - } while (uVar6 < (uint)*(int *)((char *)pGVar18 + 0xa0)); + } while (uVar6 < GHIDRA_UINT(*(int *)((char *)pGVar18 + 0xa0))); pGVar11 = local_1f0; room = (Room *)local_200; } pGVar18 = g_game; ((EntityList *)pGVar11)->_renderMode = 0; local_1d4 = (Game *)0x0; - if ((int)(pGVar18->_playerManager)._extraPlayers._end - - (int)(pGVar18->_playerManager)._extraPlayers._begin >> 2 != 0) { + if (GHIDRA_INT((pGVar18->_playerManager)._extraPlayers._end) - + GHIDRA_INT((pGVar18->_playerManager)._extraPlayers._begin) >> 2 != 0) { do { pVVar21 = (Vector *)0x810d10; - (**(code **)(**(int **)((int)(pGVar18->_playerManager)._extraPlayers._begin + - (int)local_1d4 * 4) + 0x14))(); - local_1d4 = (Game *)((int)&local_1d4->_stage + 1); + (**(code **)(**(int **)(GHIDRA_INT((pGVar18->_playerManager)._extraPlayers._begin) + + GHIDRA_INT(local_1d4) * 4) + 0x14))(); + local_1d4 = (Game *)(GHIDRA_INT(&local_1d4->_stage) + 1); pGVar18 = g_game; } while (local_1d4 < (undefined1 *) - ((int)(g_game->_playerManager)._extraPlayers._end - - (int)(g_game->_playerManager)._extraPlayers._begin >> 2)); + (GHIDRA_INT((g_game->_playerManager)._extraPlayers._end) - + GHIDRA_INT((g_game->_playerManager)._extraPlayers._begin) >> 2)); room = (Room *)local_200; } local_1f0 = (Game *)0x0; - if ((int)(pGVar18->_playerManager)._playerList._end - - (int)(pGVar18->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((pGVar18->_playerManager)._playerList._end) - + GHIDRA_INT((pGVar18->_playerManager)._playerList._begin) >> 2 != 0) { do { pvVar8 = (pGVar18->_playerManager)._playerList._end; stageType = (pGVar18->_playerManager)._playerList._begin; - if ((int)pvVar8 - (int)stageType >> 2 == 0) { + if (GHIDRA_INT(pvVar8) - GHIDRA_INT(stageType) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar8 = (pGVar18->_playerManager)._playerList._end; stageType = (pGVar18->_playerManager)._playerList._begin; } pGVar18 = local_1f0; - if (local_1f0 < (Game *)((int)pvVar8 - (int)stageType >> 2)) { - stageType = stageType + (int)local_1f0; + if (local_1f0 < (Game *)(GHIDRA_INT(pvVar8) - GHIDRA_INT(stageType) >> 2)) { + stageType = stageType + GHIDRA_INT(local_1f0); } pVVar21 = (Vector *)0x1a9; bVar4 = ((Entity_Player *)((Entity_Player *)*stageType))->Entity_Player::HasCollectible(0x1a9,0); @@ -18806,13 +18806,13 @@ LAB_0080f949: local_ac = g_game; pvVar8 = (g_game->_playerManager)._playerList._end; piVar9 = (g_game->_playerManager)._playerList._begin; - if ((int)pvVar8 - (int)piVar9 >> 2 == 0) { + if (GHIDRA_INT(pvVar8) - GHIDRA_INT(piVar9) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar8 = (local_ac->_playerManager)._playerList._end; piVar9 = (local_ac->_playerManager)._playerList._begin; } - if (pGVar18 < (Game *)((int)pvVar8 - (int)piVar9 >> 2)) { - piVar9 = piVar9 + (int)pGVar18; + if (pGVar18 < (Game *)(GHIDRA_INT(pvVar8) - GHIDRA_INT(piVar9) >> 2)) { + piVar9 = piVar9 + GHIDRA_INT(pGVar18); } ((Game *)room)->_roomList[0x9b].SavedEntities._capacity = (void *)(*(float *)(*piVar9 + 0x1ae4) - 90.0); @@ -18848,14 +18848,14 @@ LAB_0080f949: layer->_blendMode[4] = 1; pvVar8 = (pGVar18->_playerManager)._playerList._end; piVar9 = (pGVar18->_playerManager)._playerList._begin; - if ((int)pvVar8 - (int)piVar9 >> 2 == 0) { + if (GHIDRA_INT(pvVar8) - GHIDRA_INT(piVar9) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar8 = (pGVar18->_playerManager)._playerList._end; piVar9 = (pGVar18->_playerManager)._playerList._begin; } pGVar18 = local_1f0; - if (local_1f0 < (Game *)((int)pvVar8 - (int)piVar9 >> 2)) { - piVar9 = piVar9 + (int)local_1f0; + if (local_1f0 < (Game *)(GHIDRA_INT(pvVar8) - GHIDRA_INT(piVar9) >> 2)) { + piVar9 = piVar9 + GHIDRA_INT(local_1f0); } local_1d4 = (Game *)(g_displayPixelRatio * g_screenPointScale); VStack_c4.y = (*(float *)(*piVar9 + 0x340) - 140.0) * 0.65 + (g_screenHeight - 182.0) * 0.5; @@ -18875,19 +18875,19 @@ LAB_0080f949: ((ANM2 *)((ANM2 *)&((Game *)room)->_roomList[0x9a].SavedEffects._capacity))->ANM2::Render(&local_224, &g_vectorZero,&g_vectorZero); } - local_1f0 = (Game *)((int)&pGVar18->_stage + 1); + local_1f0 = (Game *)(GHIDRA_INT(&pGVar18->_stage) + 1); pGVar18 = g_game; } while (local_1f0 < (undefined1 *) - ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2)); } - if (((uint)pGVar18->_debugFlags >> 1 & 1) != 0) { + if ((GHIDRA_UINT(pGVar18->_debugFlags) >> 1 & 1) != 0) { pVVar21 = (Vector *)0x8110b2; render_debug_grid_values(room,(Vector *)&((Game *)room)->_roomList[0x18].DeliriumDistance); pGVar18 = g_game; } - if (((uint)pGVar18->_debugFlags >> 10 & 1) != 0) { + if ((GHIDRA_UINT(pGVar18->_debugFlags) >> 10 & 1) != 0) { pVVar21 = (Vector *)0x8110d3; render_debug_grid_indices(room,(Vector *)&((Game *)room)->_roomList[0x18].DeliriumDistance); pGVar18 = g_game; @@ -18913,7 +18913,7 @@ LAB_0080f949: local_ac = (Game *)(fVar17 - fVar19 * 0.2); if (0.0 < (float)local_ac) { VStack_c4.y = (float)g_graphicsManager_blendMode[4]; - local_1b8._24_4_ = g_graphicsManager_blendMode[0]; + (*(undefined4 *)((char *)&(local_1b8) + 0x18)) = g_graphicsManager_blendMode[0]; fStack_19c = (float)g_graphicsManager_blendMode[1]; fStack_198 = (float)g_graphicsManager_blendMode[2]; fStack_194 = (float)g_graphicsManager_blendMode[3]; @@ -18956,11 +18956,11 @@ LAB_0080f949: local_e8._alpha = (float)pGVar18; render_color_quad_list((void *)local_1f8.y,&local_e8); } - g_graphicsManager_blendMode[0] = local_1b8._24_4_; - g_graphicsManager_blendMode[1] = (int)fStack_19c; - g_graphicsManager_blendMode[2] = (int)fStack_198; - g_graphicsManager_blendMode[3] = (int)fStack_194; - g_graphicsManager_blendMode[4] = (int)VStack_c4.y; + g_graphicsManager_blendMode[0] = (*(undefined4 *)((char *)&(local_1b8) + 0x18)); + g_graphicsManager_blendMode[1] = GHIDRA_INT(fStack_19c); + g_graphicsManager_blendMode[2] = GHIDRA_INT(fStack_198); + g_graphicsManager_blendMode[3] = GHIDRA_INT(fStack_194); + g_graphicsManager_blendMode[4] = GHIDRA_INT(VStack_c4.y); room = (Room *)local_200; } } @@ -18985,11 +18985,11 @@ LAB_0080f949: ((KColor *)((KColor *)(local_1b8 + 0x18)))->KColor::SetFromARGB(0xffffffff); render_quad_set_uniform_color(&local_158,0.0,0.0,g_screenWidth,g_screenHeight,color_07); (*pcVar2)(); - g_graphicsManager_blendMode[0] = (int)local_e8._red; - g_graphicsManager_blendMode[1] = (int)local_e8._green; - g_graphicsManager_blendMode[2] = (int)local_e8._blue; - g_graphicsManager_blendMode[3] = (int)local_e8._alpha; - g_graphicsManager_blendMode[4] = (int)local_1f8.y; + g_graphicsManager_blendMode[0] = GHIDRA_INT(local_e8._red); + g_graphicsManager_blendMode[1] = GHIDRA_INT(local_e8._green); + g_graphicsManager_blendMode[2] = GHIDRA_INT(local_e8._blue); + g_graphicsManager_blendMode[3] = GHIDRA_INT(local_e8._alpha); + g_graphicsManager_blendMode[4] = GHIDRA_INT(local_1f8.y); room = (Room *)local_200; } if (((g_manager->_optionsConfig)._enableShockwave != 0) && @@ -19007,13 +19007,13 @@ LAB_0080f949: g_graphicsManager_blendMode[3] = extraout_EAX_04[3]; g_graphicsManager_blendMode[4] = extraout_EAX_04[4]; if (((Game *)room)->_roomList[0x28].Flags == 0x1c) { - local_1b8._24_4_ = 0.2784314; + (*(undefined4 *)((char *)&(local_1b8) + 0x18)) = 0.2784314; fStack_19c = 0.18039216; fStack_198 = 0.101960786; fStack_194 = 1.0; local_1f8.x = ((float)((Game *)room)->_curses - 2.0) * 26.0; local_190 = 0.0; - local_bc._12_4_ = + (*(undefined4 *)((char *)&(local_bc) + 0xc)) = (g_game->_screenShakeOffset).x + ((Vector *)&(*(undefined1 *)((char *)&(((Game *)room)->_roomList[0x18]) + 0xa8)))->x + ((Vector *)pGVar18)->x + 52.0; @@ -19054,11 +19054,11 @@ LAB_0080f949: ((KColor *)((KColor *)(local_1b8 + 0x18)))->KColor::SetFromARGB(0xffffffff); render_quad_set_uniform_color(screenQuad,0.0,0.0,g_screenWidth,g_screenHeight,color_08); (*pcVar2)(); - g_graphicsManager_blendMode[1] = (int)local_e8._green; - g_graphicsManager_blendMode[0] = (int)local_e8._red; - g_graphicsManager_blendMode[2] = (int)local_e8._blue; - g_graphicsManager_blendMode[3] = (int)local_e8._alpha; - g_graphicsManager_blendMode[4] = (int)local_ac; + g_graphicsManager_blendMode[1] = GHIDRA_INT(local_e8._green); + g_graphicsManager_blendMode[0] = GHIDRA_INT(local_e8._red); + g_graphicsManager_blendMode[2] = GHIDRA_INT(local_e8._blue); + g_graphicsManager_blendMode[3] = GHIDRA_INT(local_e8._alpha); + g_graphicsManager_blendMode[4] = GHIDRA_INT(local_ac); pGVar18 = local_204; room = (Room *)local_200; } @@ -19069,16 +19069,16 @@ LAB_0080f949: do { local_1f8.y = *(float *)local_1d4; local_ac = *(Game **)((char *)local_1d4 + 4); - if (((int)local_1f8.y < (int)local_ac) && + if ((GHIDRA_INT(local_1f8.y) < GHIDRA_INT(local_ac)) && ((room->_backdropType == 0x12 || (room->_backdropType == 0x1c)))) { pvVar8 = ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(room) + 0x7100))))->ANM2::GetAnimationData(s_Idle); - local_1f8.y = (float)(int)((float)*(int *)((char *)pvVar8 + 0x30) * - ((float)(int)local_1f8.y / (float)(int)local_ac)); + local_1f8.y = (float)GHIDRA_INT(((float)*(int *)((char *)pvVar8 + 0x30) * + ((float)GHIDRA_INT(local_1f8.y) / (float)GHIDRA_INT(local_ac)))); bVar4 = ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(room) + 0x7100))))->ANM2::SetAnimation(s_Idle,1); if ((bVar4 != 0) && ((*(int *)&(*(undefined1 *)((char *)(room) + 0x7134)) != 0 && (AnimationState::SetFrameFloat - ((AnimationState *)&(*(undefined1 *)((char *)(room) + 0x7130)),(float)(int)local_1f8.y), + ((AnimationState *)&(*(undefined1 *)((char *)(room) + 0x7130)),(float)GHIDRA_INT(local_1f8.y)), *(int *)&(*(undefined1 *)((char *)(room) + 0x7134)) != 0)))) { (*(undefined1 *)((char *)(room) + 0x7144)) = 0; } @@ -19097,8 +19097,8 @@ LAB_0080f949: local_1f8.y = (float)(float)dVar20; ((ANM2 *)((ANM2 *)&(*(undefined1 *)((char *)(room) + 0x7100))))->ANM2::Render(&local_21c,&g_vectorZero,&g_vectorZero); } - local_1d4 = (Game *)((int)local_1d4 + 0x1c); - local_204 = (Game *)((int)local_204 + -1); + local_1d4 = (Game *)(GHIDRA_INT(local_1d4) + 0x1c); + local_204 = (Game *)(GHIDRA_INT(local_204) + -1); } while (local_204 != (Game *)0x0); } shaderColor._colorize[2] = 0.0; @@ -19109,7 +19109,7 @@ LAB_0080f949: shaderColor._colorize[0] = 1.0; shaderColor._offset[1] = 1.0; shaderColor._colorize[3] = 1.0; - shaderColor._offset[2]._0_1_ = 0; + (*(undefined1 *)((char *)&(shaderColor._offset[2]) + 0x0)) = 0; ((KColor *)((KColor *)(local_1b8 + 0x18)))->KColor::SetFromARGB(0xffffffff); pGVar18 = (Game *)0x0; pvVar8 = (void *)g_screenHeight; @@ -19126,7 +19126,7 @@ LAB_0080f949: local_200 = local_204; local_1e4 = pGVar18; local_1e0 = pGVar18; - fVar19 = pow((float)(int)local_1f8.y / (float)*(int *)&(*(undefined1 *)((char *)(room) + 0x70dc)),0.4); + fVar19 = pow((float)GHIDRA_INT(local_1f8.y) / (float)*(int *)&(*(undefined1 *)((char *)(room) + 0x70dc)),0.4); iVar14 = *(int *)&(*(undefined1 *)((char *)(room) + 0x70f4)); local_ac = (Game *)((1.0 - fVar19) * *(float *)&(*(undefined1 *)((char *)(room) + 0x70d0))); pvVar22 = (void *)0x811b03; @@ -19145,7 +19145,7 @@ LAB_0080f949: local_1f0 = (Game *)(*(float *)&(*(undefined1 *)((char *)(room) + 0x70f0)) * 0.5 + (float)local_1f0); } piVar9 = DAT_00c797d4; - if ((int)local_1f8.y < *(int *)&(*(undefined1 *)((char *)(room) + 0x70dc))) { + if (GHIDRA_INT(local_1f8.y) < *(int *)&(*(undefined1 *)((char *)(room) + 0x70dc))) { ((KAGE::SmartPointer *)(auStack_2d2 + -10))->KAGE::SmartPointer::operator_assign(&DAT_00c797d4); pVVar21 = compute_overlay_texcoords (room,&local_1f8,(Vector *)&(*(undefined1 *)((char *)(room) + 0x70c4)),pvVar8,pvVar22); @@ -19164,15 +19164,15 @@ LAB_0080f949: } local_e8._green = (float)local_204; local_e8._blue = (float)local_1e0; - local_e8._unk = (int)local_ac; - local_bc._4_4_ = local_200; - local_bc._8_4_ = local_1e4; + local_e8._unk = GHIDRA_INT(local_ac); + (*(undefined4 *)((char *)&(local_bc) + 0x4)) = local_200; + (*(undefined4 *)((char *)&(local_bc) + 0x8)) = local_1e4; local_ac = (Game *)VStack_c4.y; local_e8._alpha = (float)local_1d4; - local_bc._12_4_ = local_1f0; + (*(undefined4 *)((char *)&(local_bc) + 0xc)) = local_1f0; local_1f8.x = local_21c.y; local_1f8.y = local_224.y; - ((Shader *)(g_currentShader))->Shader::set_uniform((byte *)"Shockwave1",0xb,&local_e8._green,(int)piVar9); + ((Shader *)(g_currentShader))->Shader::set_uniform((byte *)"Shockwave1",0xb,&local_e8._green,GHIDRA_INT(piVar9)); ((Shader *)(g_currentShader))->Shader::set_uniform((byte *)"Shockwave2",0xb,local_bc + 4,unused_01); ((Shader *)(g_currentShader))->Shader::set_uniform((byte *)"Ratio",9,&local_1f8,unused_02); (**(code **)(*DAT_00c797d4 + 0x14))(shaderColor._tint + 2); @@ -19196,7 +19196,7 @@ LAB_0080f949: shaderColor._colorize[0] = 1.0; shaderColor._offset[1] = 1.0; shaderColor._colorize[3] = 1.0; - shaderColor._offset[2]._0_1_ = 0; + (*(undefined1 *)((char *)&(shaderColor._offset[2]) + 0x0)) = 0; ((KColor *)((KColor *)(local_1b8 + 0x18)))->KColor::SetFromARGB(0xffffffff); render_quad_set_uniform_color(&local_158,0.0,0.0,g_screenWidth,g_screenHeight,color_10); local_1e0 = (Game *)&DAT_00c795c8; @@ -19225,28 +19225,28 @@ LAB_0080f949: local_1f8.y = fVar19; dVar20 = floor((double)fVar19); local_1f8.y = (float)dVar20; - local_bc._12_4_ = local_214; + (*(undefined4 *)((char *)&(local_bc) + 0xc)) = local_214; local_e8._alpha = (((g_game->_screenShakeOffset).x + ((Vector *)&((Game *)room)->_roomList[0x18].DeliriumDistance)->x + VStack_c4.y / (float)local_1e4) * g_screenPointScale) / local_21c.y; local_ac = local_20c; local_e8._unk = - (int)((((float)((Game *)room)->_roomList[0x18].Group + (g_game->_screenShakeOffset).y + - (float)dVar20 / (float)local_1e4) * g_screenPointScale) / local_224.y); + GHIDRA_INT(((((float)((Game *)room)->_roomList[0x18].Group + (g_game->_screenShakeOffset).y + + (float)dVar20 / (float)local_1e4) * g_screenPointScale) / local_224.y)); local_e8._green = (float)local_1d4; local_e8._blue = (float)local_1f0; bVar4 = ((Game *)(g_game))->Game::IsPaused(); if (bVar4 == 0) { uVar6 = g_manager->_framecount + 1U & 0x80000001; - if ((int)uVar6 < 0) { + if (GHIDRA_INT(uVar6) < 0) { uVar6 = (uVar6 - 1 | 0xfffffffe) + 1; } } else { uVar6 = 0; } - local_1f8.y = (float)((float)(int)(uVar6 + (g_game->_frameCount % (int)local_204) * 2) / 120.0); + local_1f8.y = (float)((float)GHIDRA_INT((uVar6 + (g_game->_frameCount % GHIDRA_INT(local_204)) * 2)) / 120.0); ((Shader *)(local_1e0))->Shader::set_uniform((byte *)"TextureSize",9,local_bc + 0xc,uVar6); ((Shader *)(g_currentShader))->Shader::set_uniform((byte *)"Ratio",0xb,&local_e8._green,unused_03); ((Shader *)(g_currentShader))->Shader::set_uniform(&DAT_00b6837c,8,&local_1f8.y,unused_04); @@ -19266,7 +19266,7 @@ LAB_0080f949: shaderColor._colorize[0] = 0.0; shaderColor._offset[1] = 1.0; shaderColor._colorize[3] = 1.0; - shaderColor._offset[2]._0_1_ = 0; + (*(undefined1 *)((char *)&(shaderColor._offset[2]) + 0x0)) = 0; ((KColor *)((KColor *)(local_1b8 + 0x18)))->KColor::SetFromARGB(0xffffffff); pvVar8 = (void *)g_screenHeight; render_quad_set_uniform_color(screenQuad,0.0,0.0,g_screenWidth,g_screenHeight,color_11); @@ -19310,28 +19310,28 @@ LAB_0080f949: local_1f8.y = fVar19; dVar20 = floor((double)fVar19); local_1f8.y = (float)dVar20; - local_bc._12_4_ = local_214; + (*(undefined4 *)((char *)&(local_bc) + 0xc)) = local_214; local_e8._alpha = (((g_game->_screenShakeOffset).x + ((Vector *)&((Game *)room)->_roomList[0x18].DeliriumDistance)->x + VStack_c4.y / (float)local_210) * g_screenPointScale) / local_21c.y; local_ac = local_1e4; local_e8._unk = - (int)((((float)((Game *)room)->_roomList[0x18].Group + (g_game->_screenShakeOffset).y + - (float)dVar20 / (float)local_210) * g_screenPointScale) / local_224.y); + GHIDRA_INT(((((float)((Game *)room)->_roomList[0x18].Group + (g_game->_screenShakeOffset).y + + (float)dVar20 / (float)local_210) * g_screenPointScale) / local_224.y)); local_e8._green = (float)local_20c; local_e8._blue = (float)local_1d4; bVar4 = ((Game *)(g_game))->Game::IsPaused(); if (bVar4 == 0) { uVar6 = g_manager->_framecount + 1U & 0x80000001; - if ((int)uVar6 < 0) { + if (GHIDRA_INT(uVar6) < 0) { uVar6 = (uVar6 - 1 | 0xfffffffe) + 1; } } else { uVar6 = 0; } - local_1f8.y = (float)((float)(int)(uVar6 + (g_game->_frameCount % 600) * 2) / 120.0); + local_1f8.y = (float)((float)GHIDRA_INT((uVar6 + (g_game->_frameCount % 600) * 2)) / 120.0); ((Shader *)(local_1f0))->Shader::set_uniform((byte *)"TextureSize",9,local_bc + 0xc,uVar6); ((Shader *)(g_currentShader))->Shader::set_uniform((byte *)"Ratio",0xb,&local_e8._green,unused_06); ((Shader *)(g_currentShader))->Shader::set_uniform(&DAT_00b6837c,8,&local_1f8.y,unused_07); @@ -19341,7 +19341,7 @@ LAB_0080f949: } DAT_00c79a4c = 0.0; shader_cache_find(iVar14); - if (((uint)g_game->_debugFlags >> 4 & 1) != 0) { + if ((GHIDRA_UINT(g_game->_debugFlags) >> 4 & 1) != 0) { roomTypeNames = &DAT_00b6c690; local_15c = "Default"; local_158 = &DAT_00b6c688; @@ -19375,20 +19375,20 @@ LAB_0080f949: RoomConfigStage::GetDisplayName ((RoomConfig_Stage *) (g_game->_ventricleRazorPortals + - **(int **)((int)((Game *)room)->_stageType + 0x10) * 0xc4 + 0x598),&stageName,0); + **(int **)(GHIDRA_INT(((Game *)room)->_stageType) + 0x10) * 0xc4 + 0x598),&stageName,0); local_14 = 0; - local_1f8.y = *(float *)((int)((Game *)room)->_stageType + 0xb4); + local_1f8.y = *(float *)(GHIDRA_INT(((Game *)room)->_stageType) + 0xb4); sprintf_s(debugText,0x80,(byte *)"%s %s %d %s (group %d)"); manager = g_manager; uVar6 = ((Font *)(&g_manager->_font5_terminus8))->Font::get_string_width_n(debugText,-1); - local_1b8._16_4_ = 0.0; - local_1b8._20_4_ = 9.18341e-41; - local_1b8._24_4_ = 0.0; + (*(undefined4 *)((char *)&(local_1b8) + 0x10)) = 0.0; + (*(undefined4 *)((char *)&(local_1b8) + 0x14)) = 9.18341e-41; + (*(undefined4 *)((char *)&(local_1b8) + 0x18)) = 0.0; fStack_19c = 1.0; fStack_198 = -NAN; fStack_194 = 0.0; local_190 = 0.0; - local_14 = CONCAT31(local_14._1_3_,1); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); ((Font *)(&manager->_font5_terminus8))->Font::DrawString(debugText,(KColor *)&DAT_00c5d134,local_1b8 + 0x10, g_screenWidth * 0.5 - ((float)(uVar6 >> 1) + 0.0),g_screenHeight - 12.0); ((std::string *)(stageName._buf))->std::string::_Tidy_deallocate(); @@ -19422,7 +19422,7 @@ void Room::render_debug_grid_values(Vector *offset) puStack_c = &LAB_00b01598; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(valueText + 0x54); + local_18 = __security_cookie ^ GHIDRA_UINT((valueText + 0x54)); ExceptionList = &local_10; gridIndex = 0; gridWidth = this->_gridWidth; @@ -19464,7 +19464,7 @@ void Room::render_debug_grid_values(Vector *offset) glyphs = Font::measure_string (&g_manager->_font6_PFTempestaSevenCondensed,glyphList,valueText,&local_80, &g_vectorOne); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); color._alpha = 0.2; color._red = 1.0; color._green = 1.0; @@ -19490,9 +19490,9 @@ int Room::GetGridPathFromPos(Vector *position) int gridY; int gridX; - gridX = (int)((position->x - 40.0) / 40.0 + 0.5); + gridX = GHIDRA_INT(((position->x - 40.0) / 40.0 + 0.5)); if ((((gridX < 0) || (this->_gridWidth <= gridX)) || - (gridY = (int)((position->y - 120.0) / 40.0 + 0.5), gridY < 0)) || + (gridY = GHIDRA_INT(((position->y - 120.0) / 40.0 + 0.5)), gridY < 0)) || ((this->_gridHeight <= gridY || (gridIndex = this->_gridWidth * gridY + gridX, 0x1bf < gridIndex)))) { return 0; @@ -19506,9 +19506,9 @@ int Room::GetGridIndex(Vector *pos) int gridY; int gridX; - gridX = (int)((pos->x - 40.0) / 40.0 + 0.5); + gridX = GHIDRA_INT(((pos->x - 40.0) / 40.0 + 0.5)); if ((((gridX < 0) || (this->_gridWidth <= gridX)) || - (gridY = (int)((pos->y - 120.0) / 40.0 + 0.5), gridY < 0)) || (this->_gridHeight <= gridY)) { + (gridY = GHIDRA_INT(((pos->y - 120.0) / 40.0 + 0.5)), gridY < 0)) || (this->_gridHeight <= gridY)) { return -1; } return this->_gridWidth * gridY + gridX; @@ -19548,8 +19548,8 @@ switchD_00812d27_default: goto switchD_00812d27_default; } iVar1 = *(int *)((char *)room + 0xc); - outPos->x = (float)(int)((longlong)(ulonglong)centerGridIndex % (longlong)iVar1) * 40.0 + 40.0; - outPos->y = (float)(int)((longlong)(ulonglong)centerGridIndex / (longlong)iVar1) * 40.0 + 120.0; + outPos->x = (float)GHIDRA_INT(((longlong)(ulonglong)centerGridIndex % (longlong)iVar1)) * 40.0 + 40.0; + outPos->y = (float)GHIDRA_INT(((longlong)(ulonglong)centerGridIndex / (longlong)iVar1)) * 40.0 + 120.0; return outPos; } @@ -19561,13 +19561,13 @@ int Room::GetClampedGridIndex(Vector *position) int column; int row; - iVar2 = (int)((position->x - 40.0) / 40.0 + 0.5); + iVar2 = GHIDRA_INT(((position->x - 40.0) / 40.0 + 0.5)); column = 0; if (0 < iVar2) { column = iVar2; } iVar2 = this->_gridHeight + -1; - row = (int)((position->y - 120.0) / 40.0 + 0.5); + row = GHIDRA_INT(((position->y - 120.0) / 40.0 + 0.5)); iVar1 = 0; if (0 < row) { iVar1 = row; @@ -19628,7 +19628,7 @@ byte Room::DamageGridWithSource(int gridIndex, int damage, EntityRef *source) { byte isDamaged; - if (((uint)gridIndex < 0x1c0) && (this->_gridEntities[gridIndex] != (int *)0x0)) { + if ((GHIDRA_UINT(gridIndex) < 0x1c0) && (this->_gridEntities[gridIndex] != (int *)0x0)) { isDamaged = (**(code **)(*(int *)this->_gridEntities[gridIndex] + 0x10))(damage,source); return isDamaged; } @@ -19651,7 +19651,7 @@ byte Room::DamageGrid(int gridIndex, int damage) damageSource._velocity.y = g_vectorZero.y; damageSource._flags = 0; damageSource._entity = (void *)0x0; - if (((uint)gridIndex < 0x1c0) && (this->_gridEntities[gridIndex] != (int *)0x0)) { + if ((GHIDRA_UINT(gridIndex) < 0x1c0) && (this->_gridEntities[gridIndex] != (int *)0x0)) { bVar1 = (**(code **)(*(int *)this->_gridEntities[gridIndex] + 0x10))(damage,&damageSource); return bVar1; } @@ -19676,7 +19676,7 @@ byte Room::DestroyGrid(int gridIdx, byte isImmediate, byte isDefuseBombRock) source._velocity.y = g_vectorZero.y; source._flags = 0; source._entity = (void *)0x0; - if ((0x1bf < (uint)gridIdx) || + if ((0x1bf < GHIDRA_UINT(gridIdx)) || (gridEntity = this->_gridEntities[gridIdx], gridEntity == (int *)0x0)) { return 0; } @@ -19755,7 +19755,7 @@ void Room::init_shop_item_slots() local_8 = 0xffffffff; puStack_c = &LAB_00b015f5; local_10 = ExceptionList; - local_14 = __security_cookie ^ (int)register0x00000010 - 4U; + local_14 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; shopRng._shift1 = 5; shopRng._shift2 = 9; @@ -19784,8 +19784,8 @@ void Room::init_shop_item_slots() } shopRng._seed = local_38 >> 5 ^ local_38; shopRng._seed = shopRng._seed << 9 ^ shopRng._seed; - shopRng._seed = (uint)shopRng._seed >> 7 ^ shopRng._seed; - if (shopRng._seed == ((uint)shopRng._seed / 3) * 3) { + shopRng._seed = GHIDRA_UINT(shopRng._seed) >> 7 ^ shopRng._seed; + if (shopRng._seed == (GHIDRA_UINT(shopRng._seed) / 3) * 3) { LAB_00814851: uVar4 = 0xffff; uVar3 = shopRng._seed; @@ -19798,9 +19798,9 @@ LAB_00814851: (*pcVar1)(); return; } - shopRng._seed = (uint)shopRng._seed >> 5 ^ shopRng._seed; + shopRng._seed = GHIDRA_UINT(shopRng._seed) >> 5 ^ shopRng._seed; shopRng._seed = shopRng._seed << 9 ^ shopRng._seed; - uVar3 = (uint)shopRng._seed >> 7 ^ shopRng._seed; + uVar3 = GHIDRA_UINT(shopRng._seed) >> 7 ^ shopRng._seed; uVar4 = (undefined2)(uVar3 % 6); } LAB_00814854: @@ -19873,20 +19873,20 @@ LAB_00814854: piVar7 = slotTypesEnd; piVar6 = slotTypes; RNG::Shuffle(&shopRng,slotTypes,slotTypesEnd); - piVar7 = (int *)((int)piVar7 - (int)piVar6 >> 2); + piVar7 = (int *)(GHIDRA_INT(piVar7) - GHIDRA_INT(piVar6) >> 2); iVar5 = 0; local_18 = (int *)&DAT_00000008; - if ((int)piVar7 < 8) { + if (GHIDRA_INT(piVar7) < 8) { local_18 = piVar7; } - if (0 < (int)local_18) { + if (0 < GHIDRA_INT(local_18)) { slotOffset = 0x94; do { piVar7 = piVar6 + iVar5; iVar5 = iVar5 + 1; - *(short *)(slotOffset + (int)this->_descriptor) = (short)*piVar7; + *(short *)(slotOffset + GHIDRA_INT(this->_descriptor)) = (short)*piVar7; slotOffset = slotOffset + 2; - } while (iVar5 < (int)local_18); + } while (iVar5 < GHIDRA_INT(local_18)); } *(undefined2 *)((char *)this->_descriptor + 0x96) = 8; *(undefined2 *)((char *)this->_descriptor + 0xac) = 0; @@ -19896,7 +19896,7 @@ LAB_00814854: (*pcVar1)(); return; } - uVar3 = (uint)shopRng._seed >> ((byte)shopRng._shift1 & 0x1f) ^ shopRng._seed; + uVar3 = GHIDRA_UINT(shopRng._seed) >> ((byte)shopRng._shift1 & 0x1f) ^ shopRng._seed; uVar3 = uVar3 << ((byte)shopRng._shift2 & 0x1f) ^ uVar3; uVar3 = uVar3 >> ((byte)shopRng._shift3 & 0x1f) ^ uVar3; if (uVar3 % 3 == 0) { @@ -19916,12 +19916,12 @@ LAB_00814854: } *(undefined2 *)((char *)this->_descriptor + 0xae) = uVar4; if (slotTypes != (int *)0x0) { - allocSize = (int)slotTypesCapacity - (int)slotTypes & 0xfffffffc; + allocSize = GHIDRA_INT(slotTypesCapacity) - GHIDRA_INT(slotTypes) & 0xfffffffc; piVar6 = slotTypes; if (0xfff < allocSize) { piVar6 = (int *)slotTypes[-1]; allocSize = allocSize + 0x23; - if (0x1f < (uint)((int)slotTypes + (-4 - (int)piVar6))) goto LAB_00814776; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(slotTypes) + (-4 - GHIDRA_INT(piVar6))))) goto LAB_00814776; } operator_delete(piVar6,allocSize); } @@ -19998,13 +19998,13 @@ LAB_00814854: uVar3 = ((RNG *)(&shopRng))->RNG::RandomInt(8); uVar4 = (undefined2)uVar3; } - uVar3 = (int)slotTypesCapacityCopy - (int)piVar6 & 0xfffffffc; + uVar3 = GHIDRA_INT(slotTypesCapacityCopy) - GHIDRA_INT(piVar6) & 0xfffffffc; *(undefined2 *)((char *)this->_descriptor + 0xae) = uVar4; piVar7 = piVar6; if (0xfff < uVar3) { piVar7 = (int *)piVar6[-1]; uVar3 = uVar3 + 0x23; - if (0x1f < (uint)((int)piVar6 + (-4 - (int)piVar7))) goto LAB_00814776; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(piVar6) + (-4 - GHIDRA_INT(piVar7))))) goto LAB_00814776; } operator_delete(piVar7,uVar3); uVar3 = shopRng._seed; @@ -20018,24 +20018,24 @@ LAB_00814854: local_18 = (int *)0x8; std::vector::_Emplace_reallocate(0,&local_18); uVar3 = ((RNG *)(&shopRng))->RNG::RandomInt(2); - local_18 = (int *)(0xd - (uint)(uVar3 != 0)); + local_18 = (int *)(0xd - GHIDRA_UINT((uVar3 != 0))); if (slotTypesEnd == slotTypesCapacity) { std::vector::_Emplace_reallocate(slotTypesEnd,&local_18); } else { - *slotTypesEnd = (int)local_18; + *slotTypesEnd = GHIDRA_INT(local_18); slotTypesEnd = slotTypesEnd + 1; } piVar7 = slotTypesCapacity; piVar6 = slotTypesEnd; uVar3 = ((RNG *)(&shopRng))->RNG::RandomInt(8); - local_18 = (int *)((-(uint)(uVar3 != 0) & 0xfffffffb) + 0xe); + local_18 = (int *)((-GHIDRA_UINT((uVar3 != 0)) & 0xfffffffb) + 0xe); if (piVar6 == piVar7) { std::vector::_Emplace_reallocate(piVar6,&local_18); piVar7 = slotTypesCapacity; } else { - *piVar6 = (int)local_18; + *piVar6 = GHIDRA_INT(local_18); slotTypesEnd = piVar6 + 1; } local_18 = (int *)0xb; @@ -20085,20 +20085,20 @@ LAB_00814854: piVar7 = slotTypesEnd; piVar6 = slotTypes; RNG::Shuffle(&shopRng,slotTypes,slotTypesEnd); - piVar7 = (int *)((int)piVar7 - (int)piVar6 >> 2); + piVar7 = (int *)(GHIDRA_INT(piVar7) - GHIDRA_INT(piVar6) >> 2); iVar5 = 0; local_18 = (int *)&DAT_00000008; - if ((int)piVar7 < 8) { + if (GHIDRA_INT(piVar7) < 8) { local_18 = piVar7; } - if (0 < (int)local_18) { + if (0 < GHIDRA_INT(local_18)) { slotOffset = 0x94; do { piVar7 = piVar6 + iVar5; iVar5 = iVar5 + 1; - *(short *)(slotOffset + (int)this->_descriptor) = (short)*piVar7; + *(short *)(slotOffset + GHIDRA_INT(this->_descriptor)) = (short)*piVar7; slotOffset = slotOffset + 2; - } while (iVar5 < (int)local_18); + } while (iVar5 < GHIDRA_INT(local_18)); } *(undefined2 *)((char *)this->_descriptor + 0xac) = 0; if (shopRng._seed == 0) { @@ -20107,10 +20107,10 @@ LAB_00814854: (*pcVar1)(); return; } - shopRng._seed = (uint)shopRng._seed >> ((byte)shopRng._shift1 & 0x1f) ^ shopRng._seed; + shopRng._seed = GHIDRA_UINT(shopRng._seed) >> ((byte)shopRng._shift1 & 0x1f) ^ shopRng._seed; shopRng._seed = shopRng._seed << ((byte)shopRng._shift2 & 0x1f) ^ shopRng._seed; - shopRng._seed = (uint)shopRng._seed >> ((byte)shopRng._shift3 & 0x1f) ^ shopRng._seed; - if ((uint)shopRng._seed % 3 == 0) { + shopRng._seed = GHIDRA_UINT(shopRng._seed) >> ((byte)shopRng._shift3 & 0x1f) ^ shopRng._seed; + if (GHIDRA_UINT(shopRng._seed) % 3 == 0) { uVar4 = 0xffff; } else { @@ -20120,11 +20120,11 @@ LAB_00814854: *(undefined2 *)((char *)this->_descriptor + 0xae) = uVar4; uVar3 = shopRng._seed; if (slotTypes == (int *)0x0) goto LAB_0081485e; - allocSize = (int)slotTypesCapacity - (int)slotTypes & 0xfffffffc; + allocSize = GHIDRA_INT(slotTypesCapacity) - GHIDRA_INT(slotTypes) & 0xfffffffc; piVar6 = slotTypes; if (0xfff < allocSize) { piVar6 = (int *)slotTypes[-1]; - iVar5 = (int)slotTypes - (int)piVar6; + iVar5 = GHIDRA_INT(slotTypes) - GHIDRA_INT(piVar6); joined_r0x00814770: allocSize = allocSize + 0x23; if (0x1f < iVar5 - 4U) { @@ -20175,11 +20175,11 @@ LAB_00814776: piVar6 = slotTypesCapacity; } else { - *slotTypesEnd = (int)local_18; + *slotTypesEnd = GHIDRA_INT(local_18); slotTypesEnd = slotTypesEnd + 1; } - local_18 = (int *)((int)local_18 + 1); - } while ((int)local_18 < 8); + local_18 = (int *)(GHIDRA_INT(local_18) + 1); + } while (GHIDRA_INT(local_18) < 8); local_18 = piVar6; if (3 < this->_shopLevel) { local_38 = 8; @@ -20195,20 +20195,20 @@ LAB_00814776: piVar7 = slotTypesEnd; piVar6 = slotTypes; RNG::Shuffle(&shopRng,slotTypes,slotTypesEnd); - uVar3 = (int)piVar7 - (int)piVar6 >> 2; + uVar3 = GHIDRA_INT(piVar7) - GHIDRA_INT(piVar6) >> 2; iVar5 = 0; local_38 = 8; - if ((int)uVar3 < 8) { + if (GHIDRA_INT(uVar3) < 8) { local_38 = uVar3; } - if (0 < (int)local_38) { + if (0 < GHIDRA_INT(local_38)) { slotOffset = 0x94; do { piVar7 = piVar6 + iVar5; iVar5 = iVar5 + 1; - *(short *)(slotOffset + (int)this->_descriptor) = (short)*piVar7; + *(short *)(slotOffset + GHIDRA_INT(this->_descriptor)) = (short)*piVar7; slotOffset = slotOffset + 2; - } while (iVar5 < (int)local_38); + } while (iVar5 < GHIDRA_INT(local_38)); } if (shopRng._seed == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -20217,7 +20217,7 @@ LAB_00814776: return; } bVar2 = (byte)shopRng._shift1; - uVar3 = (uint)shopRng._seed >> (bVar2 & 0x1f) ^ shopRng._seed; + uVar3 = GHIDRA_UINT(shopRng._seed) >> (bVar2 & 0x1f) ^ shopRng._seed; shift2 = (byte)shopRng._shift2; uVar3 = uVar3 << (shift2 & 0x1f) ^ uVar3; shift3 = (byte)shopRng._shift3; @@ -20250,11 +20250,11 @@ LAB_00814776: } *(undefined2 *)((char *)this->_descriptor + 0xae) = uVar4; if (slotTypes == (int *)0x0) goto LAB_0081485e; - allocSize = (int)local_18 - (int)slotTypes & 0xfffffffc; + allocSize = GHIDRA_INT(local_18) - GHIDRA_INT(slotTypes) & 0xfffffffc; piVar6 = slotTypes; if (0xfff < allocSize) { piVar6 = (int *)slotTypes[-1]; - iVar5 = (int)slotTypes - (int)piVar6; + iVar5 = GHIDRA_INT(slotTypes) - GHIDRA_INT(piVar6); goto joined_r0x00814770; } } @@ -20282,11 +20282,11 @@ int Room::shop_ware_roll(uint *param_1, uint *param_2, int *param_3, uint param_ } uVar3 = (in_ECX->_shopItemDeque)._size; if (uVar3 == 0) { - shopItemId = (int)*(short *)((char *)in_ECX->_descriptor + 0xac); + shopItemId = GHIDRA_INT(*(short *)((char *)in_ECX->_descriptor + 0xac)); } else { uVar4 = (in_ECX->_shopItemDeque)._offset; - shopItemId = *(int *)(*(int *)((int)(in_ECX->_shopItemDeque)._map + + shopItemId = *(int *)(*(int *)(GHIDRA_INT((in_ECX->_shopItemDeque)._map) + (uVar4 >> 1 & (in_ECX->_shopItemDeque)._mapSize - 1) * 4) + 4 + (uVar4 & 1) * 8); } @@ -20296,9 +20296,9 @@ int Room::shop_ware_roll(uint *param_1, uint *param_2, int *param_3, uint param_ iVar5 = _Room::ResolveHeartSubType(shopItemId,iVar5,0); *param_3 = iVar5; if (uVar3 == 0) { - psVar1 = (short *)((int)in_ECX->_descriptor + 0xac); + psVar1 = (short *)(GHIDRA_INT(in_ECX->_descriptor) + 0xac); *psVar1 = *psVar1 + 1; - puVar2 = (ushort *)((int)in_ECX->_descriptor + 0xac); + puVar2 = (ushort *)(GHIDRA_INT(in_ECX->_descriptor) + 0xac); *puVar2 = *puVar2 & 7; } return shopItemId; @@ -20332,14 +20332,14 @@ int Room::GetShopItemPrice(uint variant, int subType, int shopItemId, Entity_Pla undefined4 local_8; short shopSlotType; - local_8 = __security_cookie ^ (int)register0x00000010 - 4U; + local_8 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; local_20 = player; priceRng._shift1 = 5; priceRng._shift2 = 9; priceRng._seed = subType + variant | *(uint *)((char *)this->_descriptor + 0x58) & 0xfffff800; local_38 = 7; priceRng._shift3 = 7; - uVar5 = (undefined3)((uint)unaff_EBX >> 8); + uVar5 = (undefined3)(GHIDRA_UINT(unaff_EBX) >> 8); seed = priceRng._seed; room = this; if (player == (Entity_Player *)0x0) { @@ -20430,10 +20430,10 @@ LAB_00815377: } if ((isPoundOfFlesh != '\0') && (isKeeperPricing == '\0')) { uVar4 = ((RNG *)(&priceRng))->RNG::RandomInt(2); - return -1 - (uint)(uVar4 != 0); + return -1 - GHIDRA_UINT((uVar4 != 0)); } iVar3 = 0x1e; - if ((-1 < shopItemId) && ((uint)shopItemId < 8)) { + if ((-1 < shopItemId) && (GHIDRA_UINT(shopItemId) < 8)) { shopSlotType = *(short *)((char *)room->_descriptor + shopItemId * 2 + 0x94); if ((shopSlotType == 0xc) || (shopSlotType == 0xd)) { iVar3 = 0x32; @@ -20479,13 +20479,13 @@ LAB_008155cf: if (collectibleConfig == (ItemConfig_Item *)0x0) { return -1; } - return -(int)collectibleConfig->devilprice; + return -GHIDRA_INT(collectibleConfig->devilprice); } if (collectibleConfig == (ItemConfig_Item *)0x0) { KAGE_LogMessage(1,(byte *)"[warn] Room::GetShopItemPrice: no config for collectible %d.\n"); return 0xf; } - iVar3 = (int)collectibleConfig->shopPrice; + iVar3 = GHIDRA_INT(collectibleConfig->shopPrice); if (room->_roomType != 0xf) { return iVar3; } @@ -20498,7 +20498,7 @@ LAB_008155cf: return 0xf; } if ((isPoundOfFlesh == '\0') || (isKeeperPricing != '\0')) { - return (uint)(variant == 0x45) * 2 + 5; + return GHIDRA_UINT((variant == 0x45)) * 2 + 5; } return -5; } @@ -20585,10 +20585,10 @@ void Room::TriggerRestock(int grid_idx, int shop_idx) iVar1 = uVar2 * 4; if (*(int *)((char *)pvVar3 + uVar2 * 4) == 0) { pvVar3 = operator_new(0x10); - *(void **)(iVar1 + (int)(this->_shopItemDeque)._map) = pvVar3; + *(void **)(iVar1 + GHIDRA_INT((this->_shopItemDeque)._map)) = pvVar3; pvVar3 = (this->_shopItemDeque)._map; } - iVar1 = *(int *)(iVar1 + (int)pvVar3); + iVar1 = *(int *)(iVar1 + GHIDRA_INT(pvVar3)); uVar4 = uVar4 & 1; *(int *)(iVar1 + uVar4 * 8) = grid_idx; *(int *)(iVar1 + 4 + uVar4 * 8) = shop_idx; @@ -20622,18 +20622,18 @@ void Room::ShopRestockPartial() while( true ) { uVar3 = (this->_shopItemDeque)._offset; blockSlot = uVar3 & 1; - dequeBlock = *(int *)((int)(this->_shopItemDeque)._map + + dequeBlock = *(int *)(GHIDRA_INT((this->_shopItemDeque)._map) + (uVar3 >> 1 & (this->_shopItemDeque)._mapSize - 1) * 4); shopItemIdx = *(int *)(dequeBlock + 4 + blockSlot * 8); uVar3 = *(uint *)(dequeBlock + blockSlot * 8); if (-1 < shopItemIdx) { - restockCount = *(char *)(shopItemIdx + 0xa4 + (int)this->_descriptor); + restockCount = *(char *)(shopItemIdx + 0xa4 + GHIDRA_INT(this->_descriptor)); if (restockCount != -1) { - *(char *)(shopItemIdx + 0xa4 + (int)this->_descriptor) = restockCount + '\x01'; + *(char *)(shopItemIdx + 0xa4 + GHIDRA_INT(this->_descriptor)) = restockCount + '\x01'; } } - spawnPos.x = (float)((int)uVar3 % this->_gridWidth) * 40.0 + 40.0; - spawnPos.y = (float)((int)uVar3 / this->_gridWidth) * 40.0 + 120.0; + spawnPos.x = (float)(GHIDRA_INT(uVar3) % this->_gridWidth) * 40.0 + 40.0; + spawnPos.y = (float)(GHIDRA_INT(uVar3) / this->_gridWidth) * 40.0 + 120.0; if ((uVar3 < 0x1c0) && (this->_gridEntities[uVar3] != (int *)0x0)) { (**(code **)(*(int *)this->_gridEntities[uVar3] + 0x14))(1); } @@ -20711,7 +20711,7 @@ void Room::ShopRestockFull() uStack_8 = 0xffffffff; puStack_c = &LAB_00b01635; local_10 = ExceptionList; - local_14 = __security_cookie ^ (int)register0x00000010 - 4U; + local_14 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; room = this; if ((this->_roomType == 2) || (this->_roomType == 0x16)) { @@ -20734,7 +20734,7 @@ void Room::ShopRestockFull() (**(code **)(*pickup + 0x28))(); } uVar3 = uVar3 + 1; - } while (uVar3 < (uint)shopPickups._size); + } while (uVar3 < GHIDRA_UINT(shopPickups._size)); this = room; } pvVar4 = this->_descriptor; @@ -20759,23 +20759,23 @@ void Room::ShopRestockFull() gridIndex = uVar5; spawnSeed = uVar3; if ((char)spawnEntry[4] != '\0') { - pickedEntry = ((Spawn *)(spawnEntry))->Spawn::PickEntry((float)((double)(int)uVar3 + - __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + pickedEntry = ((Spawn *)(spawnEntry))->Spawn::PickEntry((float)((double)GHIDRA_INT(uVar3) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283062e-10); entry = *pickedEntry; uStack_18 = *(undefined4 *)(pickedEntry + 1); spawnRngShift3 = 7; TransformEntry(this,&entry,uVar5,uVar3); - if (((uint)entry == 5) && (entry._4_2_ == 0x96)) { - spawnPos.x = (float)((int)uVar5 % this->_gridWidth) * 40.0 + 40.0; - spawnPos.y = (float)((int)uVar5 / this->_gridWidth) * 40.0 + 120.0; + if ((GHIDRA_UINT(entry) == 5) && ((*(undefined2 *)((char *)&(entry) + 0x4)) == 0x96)) { + spawnPos.x = (float)(GHIDRA_INT(uVar5) % this->_gridWidth) * 40.0 + 40.0; + spawnPos.y = (float)(GHIDRA_INT(uVar5) / this->_gridWidth) * 40.0 + 120.0; if ((uVar5 < 0x1c0) && (this->_gridEntities[iVar2 + spawnX + 1] != (int *)0x0)) { (**(code **)(*(int *)this->_gridEntities[iVar2 + spawnX + 1] + 0x14))(1); } EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&roomPickups,5,-1,-1,1,0); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&roomPickups,5,-1,-1,1,0); pvVar4 = roomPickups._data; - uStack_8._0_1_ = 1; + (*(undefined1 *)((char *)&(uStack_8) + 0x0)) = 1; uVar3 = 0; if (roomPickups._size != 0) { do { @@ -20793,24 +20793,24 @@ void Room::ShopRestockFull() *(undefined4 *)(iVar2 + 0x544) = 0x14; } uVar3 = uVar3 + 1; - } while (uVar3 < (uint)roomPickups._size); + } while (uVar3 < GHIDRA_UINT(roomPickups._size)); uVar5 = gridIndex; } - uStack_8 = (uint)uStack_8._1_3_ << 8; - if (roomPickups._0_1_ == '\0') { + uStack_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(uStack_8)) + 0x1)) << 8; + if ((*(undefined1 *)((char *)&(roomPickups) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (pvVar4 != (void *)0x0) { uVar3 = *(uint *)((char *)pvVar4 + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar3; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar3; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar3); - free((void *)((int)pvVar4 + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar3)); + free((void *)(GHIDRA_INT(pvVar4) + -4)); } uStack_8 = uStack_8 & 0xffffff00; } @@ -20823,8 +20823,8 @@ void Room::ShopRestockFull() } nextSeed = spawnSeed >> 5 ^ spawnSeed; nextSeed = nextSeed << 9 ^ nextSeed; - spawned = ((Game *)(g_game))->Game::Spawn((uint)entry,(uint)entry._4_2_,&spawnPos,&g_vectorZero, - (Entity *)0x0,(uint)entry._6_2_, + spawned = ((Game *)(g_game))->Game::Spawn(GHIDRA_UINT(entry),(*(undefined2 *)((char *)&(GHIDRA_UINT(entry)) + 0x4)),&spawnPos,&g_vectorZero, + (Entity *)0x0,(*(undefined2 *)((char *)&(GHIDRA_UINT(entry)) + 0x6)), nextSeed >> ((byte)spawnRngShift3 & 0x1f) ^ nextSeed); spawned->_spawnGridIndex = uVar5; uVar5 = Random(); @@ -20838,26 +20838,26 @@ void Room::ShopRestockFull() spawnIndex = spawnIndex + 1; } while (spawnIndex < *(ushort *)(*(int *)((char *)pvVar4 + 0x10) + 0x44)); } - if (shopPickups._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(shopPickups) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (shopPickups._data != (void *)0x0) { uVar3 = *(uint *)((char *)shopPickups._data + -4); prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar3; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar3; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < uVar3); - free((uint *)((int)shopPickups._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < uVar3)); + free((uint *)(GHIDRA_INT(shopPickups._data) + -4)); } } } else { player = ((Game *)(g_game))->Game::GetPlayer(0); - Entity_Player::UseActiveItem(player,(short *)((int)&uStack_24 + 2),0x69,1,-1,0); + Entity_Player::UseActiveItem(player,(short *)(GHIDRA_INT(&uStack_24) + 2),0x69,1,-1,0); } ExceptionList = local_10; return; @@ -20889,19 +20889,19 @@ void Room::ShopReshuffle(byte isKeepCollectibleIdx, byte isReselectSaleItem) local_8 = 0xffffffff; puStack_c = &LAB_00b0166d; local_10 = ExceptionList; - local_14 = __security_cookie ^ (int)register0x00000010 - 4U; + local_14 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; pvVar4 = this->_descriptor; rng._shift1 = 5; rng._shift2 = 9; rng._seed = *(uint *)((char *)pvVar4 + 0x60); rng._shift3 = 7; - local_1c = (short *)((int)pvVar4 + 0xa4); + local_1c = (short *)(GHIDRA_INT(pvVar4) + 0xa4); room = this; begin = std::_Allocate(0x20); end = begin; - for (shopSlot = (short *)((int)pvVar4 + 0x94); shopSlot != local_1c; shopSlot = shopSlot + 1) { - *end = (int)*shopSlot; + for (shopSlot = (short *)(GHIDRA_INT(pvVar4) + 0x94); shopSlot != local_1c; shopSlot = shopSlot + 1) { + *end = GHIDRA_INT(*shopSlot); end = end + 1; } local_8 = 0; @@ -20910,12 +20910,12 @@ void Room::ShopReshuffle(byte isKeepCollectibleIdx, byte isReselectSaleItem) local_1c = (short *)0x94; shuffledSlot = begin; do { - if ((*(short *)((char *)room->_descriptor + (int)local_1c) == 8) && + if ((*(short *)((char *)room->_descriptor + GHIDRA_INT(local_1c)) == 8) && (swappedValue = *shuffledSlot, swappedValue != 8)) { uVar3 = 0; - slotCount = (int)end - (int)begin >> 2; + slotCount = GHIDRA_INT(end) - GHIDRA_INT(begin) >> 2; if (slotCount != 0) { - shopSlot = (short *)((int)room->_descriptor + 0x94); + shopSlot = (short *)(GHIDRA_INT(room->_descriptor) + 0x94); do { if ((*shopSlot != 8) && (begin[uVar3] == 8)) { *shuffledSlot = 8; @@ -20933,7 +20933,7 @@ void Room::ShopReshuffle(byte isKeepCollectibleIdx, byte isReselectSaleItem) } pvVar4 = room->_descriptor; shuffledCursor = begin; - shopSlotOut = (undefined2 *)((int)pvVar4 + 0x94); + shopSlotOut = (undefined2 *)(GHIDRA_INT(pvVar4) + 0x94); if (begin != end) { do { iVar2 = *shuffledCursor; @@ -20951,7 +20951,7 @@ void Room::ShopReshuffle(byte isKeepCollectibleIdx, byte isReselectSaleItem) (*pcVar1)(); return; } - uVar3 = (uint)rng._seed >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; + uVar3 = GHIDRA_UINT(rng._seed) >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; uVar3 = uVar3 << ((byte)rng._shift2 & 0x1f) ^ uVar3; uVar3 = uVar3 >> ((byte)rng._shift3 & 0x1f) ^ uVar3; if (uVar3 == (uVar3 / 3) * 3) { @@ -20992,9 +20992,9 @@ void Room::RemoveDoor(int doorSlot) local_8 = 0xffffffff; puStack_c = &LAB_00b016b7; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; - if (((uint)doorSlot < 8) && (this->_doors[doorSlot] != (void *)0x0)) { + if ((GHIDRA_UINT(doorSlot) < 8) && (this->_doors[doorSlot] != (void *)0x0)) { gridIdx = this->_doorGridPositions[doorSlot]; if (gridIdx < 0) { KAGE_LogMessage(0x10,(byte *)"invalid GridIndex while removing door (slot %d)"); @@ -21109,7 +21109,7 @@ void Room::SpawnGreedModeWave(byte unusedBool) ehState = -1; puStack_c = &LAB_00b016f0; savedExceptionList = ExceptionList; - uVar4 = __security_cookie ^ (uint)((&particleColor)[1]._colorize + 1); + uVar4 = __security_cookie ^ GHIDRA_UINT(((&particleColor)[1]._colorize + 1)); ExceptionList = &savedExceptionList; iVar7 = 8; local_5c = 3; @@ -21155,7 +21155,7 @@ void Room::SpawnGreedModeWave(byte unusedBool) local_5c = 0; } doorSlot = this->_doors; - puVar10 = (uint *)((int)this->_descriptor + 0x44); + puVar10 = (uint *)(GHIDRA_INT(this->_descriptor) + 0x44); *puVar10 = *puVar10 & 0xfffffffe; local_64 = 8; savedRoom = this; @@ -21186,7 +21186,7 @@ void Room::SpawnGreedModeWave(byte unusedBool) local_60 = (RoomConfig_Room *)0x1; bossWave = (float)(iVar7 + 1); local_54 = 10; - uVar4 = -(uint)(bossWave != 0.0) & (uint)bossWave; + uVar4 = -GHIDRA_UINT((bossWave != 0.0)) & GHIDRA_UINT(bossWave); if (uVar4 < 0xc) { game->_greedModeWave = uVar4; if (uVar4 - 1 < 0xc) goto LAB_00816b00; @@ -21202,7 +21202,7 @@ LAB_00816b00: local_80 = 0x1b; rngShifts = 0x1b00000001; local_9c = (float)((game->_difficulty == 3) + 9); - VStack_a8.y = (float)((-(uint)((uint)bossWave < (uint)local_9c) & 6) + 5); + VStack_a8.y = (float)((-GHIDRA_UINT((GHIDRA_UINT(bossWave) < GHIDRA_UINT(local_9c))) & 6) + 5); if (game->_difficulty == 2) { switch(iVar7) { case 0: @@ -21248,7 +21248,7 @@ switchD_00816b56_caseD_6: local_54 = 10; } } - if ((uint)bossWave < (uint)local_9c) { + if (GHIDRA_UINT(bossWave) < GHIDRA_UINT(local_9c)) { savedRoom->_greedWaveTimer = (local_58 + iVar7) * 0x1e; local_5c = game->_difficulty; local_58 = (local_5c == 2) + 1; @@ -21273,7 +21273,7 @@ LAB_00816c3e: else { LAB_00816c08: if (((bossWave == (float)((local_5c == 3) + 8)) || (bossWave == (float)((local_5c == 3) + 10))) || - ((local_5c == 3) + 0xb <= (uint)bossWave)) goto LAB_00816c3e; + ((local_5c == 3) + 0xb <= GHIDRA_UINT(bossWave))) goto LAB_00816c3e; } bossWave = (float)((local_5c == 3) + 0xb); local_68 = 0; @@ -21281,7 +21281,7 @@ LAB_00816c08: local_68 = local_58; } local_a0 = bossWave; - if ((uint)bossWave < (uint)local_9c) { + if (GHIDRA_UINT(bossWave) < GHIDRA_UINT(local_9c)) { if (local_7c == 0x18) { ((MusicManager *)(&g_manager->_musicManager))->MusicManager::Crossfade(0x26,0.08); } @@ -21336,15 +21336,15 @@ LAB_00816c08: uVar4 = uVar4 << ((byte)((ulonglong)rngShifts >> 0x20) & 0x1f) ^ uVar4; uVar4 = uVar4 >> ((byte)local_64 & 0x1f) ^ uVar4; local_60 = RoomConfig::GetRandomRoom - ((RoomConfig *)VStack_74.y,uVar4,0,local_7c,(int)VStack_a8.y,local_5c,0,-1, - (int)local_60,local_54,(uint *)&local_9c,0xffffffff,-1); + ((RoomConfig *)VStack_74.y,uVar4,0,local_7c,GHIDRA_INT(VStack_a8.y),local_5c,0,-1, + GHIDRA_INT(local_60),local_54,(uint *)&local_9c,0xffffffff,-1); if (local_60 == (RoomConfig_Room *)0x0) { KAGE_LogMessage(1,(byte *)"Did not find wave level %d (greed mode).\n"); ExceptionList = savedExceptionList; return; } KAGE_LogMessage(1,(byte *)"Spawning greed mode wave from room variant %d.\n"); - if ((uint)g_game->_greedLastPaidWave < (uint)bossWave) { + if (GHIDRA_UINT(g_game->_greedLastPaidWave) < GHIDRA_UINT(bossWave)) { ((PlayerManager *)(&g_game->_playerManager))->PlayerManager::trigger_room_clear(); uVar9 = local_64; VStack_74.y = (float)g_game->_room; @@ -21359,7 +21359,7 @@ LAB_00816c08: } VStack_a8.x = (float)(iVar7 % iVar5) * 40.0 + 40.0; VStack_a8.y = (float)(iVar7 / iVar5) * 40.0 + 120.0; - if (0 < (int)local_58) { + if (0 < GHIDRA_INT(local_58)) { rngResult = local_58; do { FindFreePickupSpawnPosition(g_game->_room,&coinPos,&VStack_a8,0.0,0,0,0); @@ -21393,8 +21393,8 @@ LAB_00816c08: particleColor._colorize[3] = 0.0; particleColor._offset[2] = 0.0; rngResult = Random(); - VStack_74.y = (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * + VStack_74.y = (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.0 + 2.0; rngResult = Random(); Game::SpawnParticles @@ -21406,26 +21406,26 @@ LAB_00816c08: } game = g_game; local_5c = 0; - g_game->_greedLastPaidWave = (int)bossWave; + g_game->_greedLastPaidWave = GHIDRA_INT(bossWave); playerManager = &game->_playerManager; - if ((int)(game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> 2 + if (GHIDRA_INT((game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 != 0) { do { pvVar6 = (playerManager->_playerList)._end; - if ((int)pvVar6 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar6) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar6 = (playerManager->_playerList)._end; } playerSlot = (playerManager->_playerList)._begin; - if (local_5c < (uint)((int)pvVar6 - (int)playerSlot >> 2)) { + if (local_5c < GHIDRA_UINT((GHIDRA_INT(pvVar6) - GHIDRA_INT(playerSlot) >> 2))) { playerSlot = playerSlot + local_5c; } ((Entity_Player *)((Entity_Player *)*playerSlot))->Entity_Player::spawn_locusts(); playerManager = &g_game->_playerManager; local_5c = local_5c + 1; } while (local_5c < - (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); } } waveRoom = local_60; @@ -21467,30 +21467,30 @@ LAB_00816c08: destroySource._spawnerVariant = 0; destroySource._flags = 0; destroySource._entity = (void *)0x0; - spawnX = (int)*(short *)(local_5c + (int)local_60->Spawns); - iVar5 = (*(short *)(local_5c + 2 + (int)local_60->Spawns) + 1) * iVar7; - local_a0 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + spawnX = GHIDRA_INT(*(short *)(local_5c + GHIDRA_INT(local_60->Spawns))); + iVar5 = (*(short *)(local_5c + 2 + GHIDRA_INT(local_60->Spawns)) + 1) * iVar7; + local_a0 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283062e-10; uVar9 = spawnX + iVar5 + 1; destroySource._position.x = g_vectorZero.x; destroySource._velocity.x = g_vectorZero.x; destroySource._position.y = g_vectorZero.y; destroySource._velocity.y = g_vectorZero.y; - VStack_74.x = (float)((int)uVar9 % iVar7) * 40.0 + 40.0; - VStack_74.y = (float)((int)uVar9 / iVar7) * 40.0 + 120.0; + VStack_74.x = (float)(GHIDRA_INT(uVar9) % iVar7) * 40.0 + 40.0; + VStack_74.y = (float)(GHIDRA_INT(uVar9) / iVar7) * 40.0 + 120.0; if ((uVar9 < 0x1c0) && (savedRoom->_gridEntities[iVar5 + spawnX + 1] != (int *)0x0)) { (**(code **)(*(int *)savedRoom->_gridEntities[iVar5 + spawnX + 1] + 0x14))(1,&destroySource) ; } piVar1 = *(int **)((char *)door->_descriptor + 0x10); if (((piVar1 != (int *)0x0) && (piVar1[2] == 0x10)) && (*piVar1 == 0x23)) goto LAB_00817335; - if ((int)uVar9 < 0) { + if (GHIDRA_INT(uVar9) < 0) { LAB_008172a7: freePos = FindFreePickupSpawnPosition(g_game->_room,&VStack_a8,&VStack_74,0.0,0,0,0); VStack_74.x = freePos->x; VStack_74.y = freePos->y; - iVar7 = (int)((VStack_74.x - 40.0) / 40.0 + 0.5); - iVar5 = (int)((VStack_74.y - 120.0) / 40.0 + 0.5); + iVar7 = GHIDRA_INT(((VStack_74.x - 40.0) / 40.0 + 0.5)); + iVar5 = GHIDRA_INT(((VStack_74.y - 120.0) / 40.0 + 0.5)); if ((((iVar7 < 0) || (door->_gridWidth <= iVar7)) || (iVar5 < 0)) || (door->_gridHeight <= iVar5)) { uVar9 = 0xffffffff; @@ -21503,10 +21503,10 @@ LAB_008172a7: if ((door->_gridPaths[iVar5 + spawnX + 1] - 3000U < 1000) || (999 < door->_gridPaths[iVar5 + spawnX + 1])) goto LAB_008172a7; } - else if (*(int *)((int)door->_gridEntities[iVar5 + spawnX + 1] + 0x3c) != 0) + else if (*(int *)(GHIDRA_INT(door->_gridEntities[iVar5 + spawnX + 1]) + 0x3c) != 0) goto LAB_008172a7; LAB_00817335: - pvVar6 = (void *)(local_5c + (int)local_60->Spawns); + pvVar6 = (void *)(local_5c + GHIDRA_INT(local_60->Spawns)); if (*(char *)((char *)pvVar6 + 8) != '\0') { pickedEntry = ((Spawn *)(pvVar6))->Spawn::PickEntry(local_a0); spawnEntry = *pickedEntry; @@ -21522,11 +21522,11 @@ LAB_00817335: local_7c = rngState >> ((byte)local_64 & 0x1f); uVar4 = local_7c ^ rngState; TransformEntry(door,&spawnEntry,uVar9,uVar4); - if (0 < (int)spawnEntry) { - if ((int)spawnEntry < 1000) { + if (0 < GHIDRA_INT(spawnEntry)) { + if (GHIDRA_INT(spawnEntry) < 1000) { rngShiftLeft = (byte)((ulonglong)rngShifts >> 0x20); - if ((int)spawnEntry == 999) { - spawnEntry = CONCAT44(spawnEntry._4_4_,1000); + if (GHIDRA_INT(spawnEntry) == 999) { + spawnEntry = CONCAT44((*(undefined4 *)((char *)&(spawnEntry) + 0x4)),1000); if (local_7c == rngState) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar2 = (code *)swi(3); @@ -21536,8 +21536,8 @@ LAB_00817335: uVar4 = uVar4 >> ((byte)rngShifts & 0x1f) ^ uVar4; uVar4 = uVar4 << (rngShiftLeft & 0x1f) ^ uVar4; uVar4 = uVar4 >> ((byte)local_64 & 0x1f) ^ uVar4; - spawned = ((Game *)(g_game))->Game::Spawn(1000,spawnEntry._4_4_ & 0xffff,&VStack_74,&g_vectorZero, - (Entity *)0x0,spawnEntry._4_4_ >> 0x10,uVar4); + spawned = ((Game *)(g_game))->Game::Spawn(1000,(*(undefined4 *)((char *)&(spawnEntry) + 0x4)) & 0xffff,&VStack_74,&g_vectorZero, + (Entity *)0x0,(*(undefined4 *)((char *)&(spawnEntry) + 0x4)) >> 0x10,uVar4); spawned->Update(); spawned->_spawnGridIndex = uVar9; door = savedRoom; @@ -21553,12 +21553,12 @@ LAB_00817335: uVar4 = uVar4 << (rngShiftLeft & 0x1f) ^ uVar4; uVar4 = uVar4 >> ((byte)local_64 & 0x1f) ^ uVar4; iVar7 = spawn_enemy_spawner_effect - ((int)spawnEntry,spawnEntry._4_2_,&VStack_74,local_64,0, - spawnEntry._6_2_,uVar4,local_64,uVar9); + (GHIDRA_INT(spawnEntry),(*(undefined2 *)((char *)&(spawnEntry) + 0x4)),&VStack_74,local_64,0, + (*(undefined2 *)((char *)&(spawnEntry) + 0x6)),uVar4,local_64,uVar9); game = g_game; *(undefined4 *)(iVar7 + 0x354) = 0x3e9; if ((((game != (Game *)0x0) && (1 < *(int *)&game->_deathmatchManager)) && - ((int)spawnEntry == 1)) || ((int)spawnEntry - 10U < 0x3de)) { + (GHIDRA_INT(spawnEntry) == 1)) || (GHIDRA_INT(spawnEntry) - 10U < 0x3de)) { *(uint *)(iVar7 + 0x16c) = *(uint *)(iVar7 + 0x16c) | 0x80; *(undefined4 *)(iVar7 + 0x168) = *(undefined4 *)(iVar7 + 0x168); } @@ -21587,7 +21587,7 @@ LAB_00817335: local_54 = uVar9; if ((door->_entityList)._updateEL._size == 0) { LAB_008176d1: - uVar9 = (int)puVar10 - (int)championCandidates >> 2; + uVar9 = GHIDRA_INT(puVar10) - GHIDRA_INT(championCandidates) >> 2; if (uVar9 != 0) { if (uVar4 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -21615,7 +21615,7 @@ LAB_008176d1: else { uVar4 = 0; do { - piVar1 = *(int **)((int)(door->_entityList)._updateEL._data + uVar4 * 4); + piVar1 = *(int **)(GHIDRA_INT((door->_entityList)._updateEL._data) + uVar4 * 4); if ((*(int *)&g_game->_deathmatchManager < 2) || (piVar1[10] != 1)) { iVar7 = piVar1[10]; if ((0x3dd < iVar7 - 10U) || (((iVar7 == 0x21 || (iVar7 == 0x11)) || (iVar7 == 0x124)))) @@ -21635,7 +21635,7 @@ LAB_008175f1: if (*(char *)((char *)piVar1 + 0x173) == '\0') { cVar3 = (**(code **)(*piVar1 + 0x4c))(); if ((cVar3 == '\0') && - (iVar7 = *(int *)((int)(door->_entityList)._updateEL._data + uVar4 * 4), + (iVar7 = *(int *)(GHIDRA_INT((door->_entityList)._updateEL._data) + uVar4 * 4), g_game->_frameCount == *(int *)(iVar7 + 0x328))) { local_5c = __RTDynamicCast(iVar7,0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_NPC::RTTI_Type_Descriptor,0); @@ -21666,17 +21666,17 @@ LAB_008176b6: } LAB_008176b9: uVar4 = uVar4 + 1; - } while (uVar4 < (uint)(door->_entityList)._updateEL._size); + } while (uVar4 < GHIDRA_UINT((door->_entityList)._updateEL._size)); uVar4 = local_58; if ((char)uVar9 == '\0') goto LAB_008176d1; } if (championCandidates != (void *)0x0) { - uVar4 = (int)championCandidatesCapacity - (int)championCandidates & 0xfffffffc; + uVar4 = GHIDRA_INT(championCandidatesCapacity) - GHIDRA_INT(championCandidates) & 0xfffffffc; pvVar6 = championCandidates; if (0xfff < uVar4) { pvVar6 = *(void **)((char *)championCandidates + -4); uVar4 = uVar4 + 0x23; - if (0x1f < (uint)((int)championCandidates + (-4 - (int)pvVar6))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(championCandidates) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -21875,7 +21875,7 @@ void Room::render_water(int pass) float room; code *drawFn; - stackCookie = __security_cookie ^ (uint)&edgeMargin; + stackCookie = __security_cookie ^ GHIDRA_UINT(&edgeMargin); local_7dc.x = (float)this; stageId = ((Game *)(g_game))->Game::GetStageID(0); if (this->_gridPaths[this->_backdropType * 0x4f + 0x585] == 0) { @@ -22106,16 +22106,16 @@ void Room::render_water(int pass) drawFn = *(code **)(*texture + 0x14); FUN_00407220(); (*drawFn)(local_7ec.x); - local_7ec.x = (float)((int)local_7ec.x + 0x24); - local_7f4.x = (float)((int)local_7f4.x + 1); - } while ((int)local_7f4.x < 8); + local_7ec.x = (float)(GHIDRA_INT(local_7ec.x) + 0x24); + local_7f4.x = (float)(GHIDRA_INT(local_7f4.x) + 1); + } while (GHIDRA_INT(local_7f4.x) < 8); goto LAB_0081deea; } GetLRoomAreaDesc(this,roomAreaDesc); srcQuadCursor = &srcQuad0TopLeftX; local_814.x = 1.68156e-44; do { - local_814.x = (float)((int)&((Vector *)((int)local_814.x + -8))->y + 3); + local_814.x = (float)(GHIDRA_INT(&((Vector *)(GHIDRA_INT(local_814.x) + -8))->y) + 3); FUN_00a10690(); *(undefined1 *)(srcQuadCursor + 8) = 0; srcQuadCursor = srcQuadCursor + 9; @@ -22131,7 +22131,7 @@ void Room::render_water(int pass) iVar4 = iVar4 + -1; } while (iVar4 != 0); if ((*(void **)((char *)local_7dc.x + 4) == (void *)0x0) || - (iVar4 = *(int *)((int)*(void **)((char *)local_7dc.x + 4) + 0x10), iVar4 == 0)) { + (iVar4 = *(int *)(GHIDRA_INT(*(void **)((char *)local_7dc.x + 4)) + 0x10), iVar4 == 0)) { LAB_0081a975: iVar4 = GetRoomShape((Room *)local_7dc.x); if (iVar4 == 0xb) { @@ -22664,7 +22664,7 @@ LAB_0081d14b: srcQuad0TopLeftY = tmpQuad._topLeft.y; srcQuad0TopRightX = tmpQuad._topRight.x; srcQuad0TopRightY = tmpQuad._topRight.y; - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad0Flag = tmpQuadFlag; srcQuad0BottomLeftX = tmpQuad._bottomLeft.x; srcQuad0BottomLeftY = tmpQuad._bottomLeft.y; @@ -22677,7 +22677,7 @@ LAB_0081d14b: srcQuad1TopLeftY = tmpQuad._topLeft.y; srcQuad1TopRightX = tmpQuad._topRight.x; srcQuad1TopRightY = tmpQuad._topRight.y; - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad1BottomLeftX = tmpQuad._bottomLeft.x; srcQuad1BottomLeftY = tmpQuad._bottomLeft.y; srcQuad1BottomRightX = tmpQuad._bottomRight.x; @@ -22692,7 +22692,7 @@ LAB_0081d14b: srcQuad2TopLeftY = tmpQuad._topLeft.y; srcQuad2TopRightX = tmpQuad._topRight.x; srcQuad2TopRightY = tmpQuad._topRight.y; - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad2BottomLeftX = tmpQuad._bottomLeft.x; srcQuad2BottomLeftY = tmpQuad._bottomLeft.y; srcQuad2BottomRightX = tmpQuad._bottomRight.x; @@ -22703,7 +22703,7 @@ LAB_0081d14b: srcQuad3TopLeftY = tmpQuad._topLeft.y; srcQuad3TopRightX = tmpQuad._topRight.x; srcQuad3TopRightY = tmpQuad._topRight.y; - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad3Flag = tmpQuadFlag; srcQuad3BottomLeftX = tmpQuad._bottomLeft.x; srcQuad3BottomLeftY = tmpQuad._bottomLeft.y; @@ -22712,7 +22712,7 @@ LAB_0081d14b: local_814.x = local_778.x + local_778.x; local_790.x = local_814.x + local_7b4.x; FUN_00a10690(); - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad4Flag = tmpQuadFlag; srcQuad4TopLeftX = tmpQuad._topLeft.x; srcQuad4TopLeftY = tmpQuad._topLeft.y; @@ -22724,7 +22724,7 @@ LAB_0081d14b: srcQuad4BottomRightX = tmpQuad._bottomRight.x; srcQuad4BottomRightY = tmpQuad._bottomRight.y; FUN_00a10690(); - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad5TopLeftX = tmpQuad._topLeft.x; srcQuad5TopLeftY = tmpQuad._topLeft.y; srcQuad5TopRightX = tmpQuad._topRight.x; @@ -22755,7 +22755,7 @@ LAB_0081d14b: local_7a4.y = pVVar1->y + 0.0; local_7a4.x = waveScroll.x + pVVar1->x; DestinationQuad::DestinationQuad(&tmpQuad,&local_7a4,&local_7b4,&local_7c4,&local_7ec); - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad6TopLeftX = tmpQuad._topLeft.x; srcQuad6TopLeftY = tmpQuad._topLeft.y; srcQuad6TopRightX = tmpQuad._topRight.x; @@ -22786,7 +22786,7 @@ LAB_0081d14b: local_7a4.y = pVVar1->y + 0.0; local_7a4.x = waveScroll.x + pVVar1->x; DestinationQuad::DestinationQuad(&tmpQuad,&local_7a4,&local_7b4,&local_7c4,&local_7ec); - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad7TopLeftX = tmpQuad._topLeft.x; srcQuad7TopLeftY = tmpQuad._topLeft.y; srcQuad7TopRightX = tmpQuad._topRight.x; @@ -22817,7 +22817,7 @@ LAB_0081d14b: local_7a4.y = pVVar1->y + 0.0; local_7a4.x = waveScroll.x + pVVar1->x; DestinationQuad::DestinationQuad(&tmpQuad,&local_7a4,&local_7b4,&local_7c4,&local_7ec); - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad8TopLeftX = tmpQuad._topLeft.x; srcQuad8TopLeftY = tmpQuad._topLeft.y; srcQuad8TopRightX = tmpQuad._topRight.x; @@ -22848,7 +22848,7 @@ LAB_0081d14b: local_7b4.y = pVVar1->y + 0.0; local_7b4.x = waveScroll.x + pVVar1->x; DestinationQuad::DestinationQuad(&tmpQuad,&local_7b4,&local_7c4,&local_7dc,&local_7ec); - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad9TopLeftX = tmpQuad._topLeft.x; srcQuad9TopLeftY = tmpQuad._topLeft.y; srcQuad9TopRightX = tmpQuad._topRight.x; @@ -22879,7 +22879,7 @@ LAB_0081d14b: local_7c4.y = pVVar1->y + 0.0; local_7c4.x = waveScroll.x + pVVar1->x; DestinationQuad::DestinationQuad(&tmpQuad,&local_7c4,&local_7e4,&local_7dc,&local_7ec); - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad10TopLeftX = tmpQuad._topLeft.x; srcQuad10TopLeftY = tmpQuad._topLeft.y; srcQuad10TopRightX = tmpQuad._topRight.x; @@ -22910,7 +22910,7 @@ LAB_0081d14b: local_788.y = pVVar1->y + 0.0; local_788.x = waveScroll.x + pVVar1->x; DestinationQuad::DestinationQuad(&tmpQuad,&local_788,&local_7e4,&local_7dc,&local_7ec); - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad11TopLeftX = tmpQuad._topLeft.x; srcQuad11TopLeftY = tmpQuad._topLeft.y; srcQuad11TopRightX = tmpQuad._topRight.x; @@ -23061,7 +23061,7 @@ LAB_0081d14b: srcQuad0TopLeftY = tmpQuad._topLeft.y; srcQuad0TopRightX = tmpQuad._topRight.x; srcQuad0TopRightY = tmpQuad._topRight.y; - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad0Flag = tmpQuadFlag; srcQuad0BottomLeftX = tmpQuad._bottomLeft.x; srcQuad0BottomLeftY = tmpQuad._bottomLeft.y; @@ -23074,7 +23074,7 @@ LAB_0081d14b: srcQuad1TopLeftY = tmpQuad._topLeft.y; srcQuad1TopRightX = tmpQuad._topRight.x; srcQuad1TopRightY = tmpQuad._topRight.y; - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad1BottomLeftX = tmpQuad._bottomLeft.x; srcQuad1BottomLeftY = tmpQuad._bottomLeft.y; srcQuad1BottomRightX = tmpQuad._bottomRight.x; @@ -23088,14 +23088,14 @@ LAB_0081d14b: srcQuad2TopLeftY = tmpQuad._topLeft.y; srcQuad2TopRightX = tmpQuad._topRight.x; srcQuad2TopRightY = tmpQuad._topRight.y; - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad2BottomLeftX = tmpQuad._bottomLeft.x; srcQuad2BottomLeftY = tmpQuad._bottomLeft.y; srcQuad2BottomRightX = tmpQuad._bottomRight.x; srcQuad2BottomRightY = tmpQuad._bottomRight.y; srcQuad2Flag = tmpQuadFlag; FUN_00a10690(); - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad3TopLeftX = tmpQuad._topLeft.x; srcQuad3TopLeftY = tmpQuad._topLeft.y; srcQuad3TopRightX = tmpQuad._topRight.x; @@ -23108,7 +23108,7 @@ LAB_0081d14b: local_814.x = local_778.x + local_778.x; local_778.x = local_814.x + local_7b4.x; FUN_00a10690(); - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad4Flag = tmpQuadFlag; srcQuad4TopLeftX = tmpQuad._topLeft.x; srcQuad4TopLeftY = tmpQuad._topLeft.y; @@ -23120,7 +23120,7 @@ LAB_0081d14b: srcQuad4BottomRightX = tmpQuad._bottomRight.x; srcQuad4BottomRightY = tmpQuad._bottomRight.y; FUN_00a10690(); - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad5TopLeftX = tmpQuad._topLeft.x; srcQuad5TopLeftY = tmpQuad._topLeft.y; srcQuad5TopRightX = tmpQuad._topRight.x; @@ -23151,7 +23151,7 @@ LAB_0081d14b: local_7d4.y = pVVar1->y + 0.0; local_7d4.x = waveScroll.x + pVVar1->x; DestinationQuad::DestinationQuad(&tmpQuad,&local_7d4,&local_7cc,&local_7bc,&local_7a4); - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad6TopLeftX = tmpQuad._topLeft.x; srcQuad6TopLeftY = tmpQuad._topLeft.y; srcQuad6TopRightX = tmpQuad._topRight.x; @@ -23182,7 +23182,7 @@ LAB_0081d14b: local_7a4.y = pVVar1->y + 0.0; local_7a4.x = waveScroll.x + pVVar1->x; DestinationQuad::DestinationQuad(&tmpQuad,&local_7a4,&local_7b4,&local_7c4,&local_7ec); - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad7TopLeftX = tmpQuad._topLeft.x; srcQuad7TopLeftY = tmpQuad._topLeft.y; srcQuad7TopRightX = tmpQuad._topRight.x; @@ -23213,7 +23213,7 @@ LAB_0081d14b: local_7b4.y = pVVar1->y + 0.0; local_7b4.x = waveScroll.x + pVVar1->x; DestinationQuad::DestinationQuad(&tmpQuad,&local_7b4,&local_790,&local_7c4,&local_7ec); - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad8TopLeftX = tmpQuad._topLeft.x; srcQuad8TopLeftY = tmpQuad._topLeft.y; srcQuad8TopRightX = tmpQuad._topRight.x; @@ -23244,7 +23244,7 @@ LAB_0081d14b: local_790.y = pVVar1->y + 0.0; local_790.x = waveScroll.x + pVVar1->x; DestinationQuad::DestinationQuad(&tmpQuad,&local_790,&local_7c4,&local_788,&local_7ec); - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad9TopLeftX = tmpQuad._topLeft.x; srcQuad9TopLeftY = tmpQuad._topLeft.y; srcQuad9TopRightX = tmpQuad._topRight.x; @@ -23275,7 +23275,7 @@ LAB_0081d14b: local_7c4.y = pVVar1->y + 0.0; local_7c4.x = waveScroll.x + pVVar1->x; DestinationQuad::DestinationQuad(&tmpQuad,&local_7c4,&local_788,&local_7e4,&local_7ec); - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad10TopLeftX = tmpQuad._topLeft.x; srcQuad10TopLeftY = tmpQuad._topLeft.y; srcQuad10TopRightX = tmpQuad._topRight.x; @@ -23306,7 +23306,7 @@ LAB_0081d14b: local_788.y = pVVar1->y + 0.0; local_788.x = waveScroll.x + pVVar1->x; DestinationQuad::DestinationQuad(&tmpQuad,&local_788,&local_7e4,&local_7dc,&local_7ec); - tmpQuadFlag = CONCAT31(tmpQuadFlag._1_3_,1); + tmpQuadFlag = CONCAT31((*(undefined1 *)((char *)&(tmpQuadFlag) + 0x1)),1); srcQuad11TopLeftX = tmpQuad._topLeft.x; srcQuad11TopLeftY = tmpQuad._topLeft.y; srcQuad11TopRightX = tmpQuad._topRight.x; @@ -23512,9 +23512,9 @@ LAB_0081d167: drawFn = *(code **)(*texture + 0x14); FUN_00407220(); (*drawFn)(local_7f4.x); - local_7f4.x = (float)((int)local_7f4.x + 0x24); - local_7ec.x = (float)((int)local_7ec.x + 1); - } while ((int)local_7ec.x < 0xc); + local_7f4.x = (float)(GHIDRA_INT(local_7f4.x) + 0x24); + local_7ec.x = (float)(GHIDRA_INT(local_7ec.x) + 1); + } while (GHIDRA_INT(local_7ec.x) < 0xc); LAB_0081deea: shader_cache_find(0xb1a5b0); return; @@ -23523,7 +23523,7 @@ LAB_0081deea: // 0081e240 undefined4 Room::IsAmbushActive() { - return CONCAT31((int3)((uint)g_game >> 8),(g_game->_ambush)._isActive); + return CONCAT31((int3)(GHIDRA_UINT(g_game) >> 8),(g_game->_ambush)._isActive); } // 0081e250 @@ -23591,7 +23591,7 @@ float Room::GetLightingAlpha() uVar2 = (this->_entityList)._updateEL._size; uVar3 = 0; if (uVar2 != 0) { - while ((iVar1 = *(int *)((int)(this->_entityList)._updateEL._data + uVar3 * 4), + while ((iVar1 = *(int *)(GHIDRA_INT((this->_entityList)._updateEL._data) + uVar3 * 4), *(int *)(iVar1 + 0x28) != 0x197 || (*(int *)(iVar1 + 0x2c) != 0))) { uVar3 = uVar3 + 1; if (uVar2 <= uVar3) { @@ -23637,9 +23637,9 @@ Vector * Room::FindFreeTilePosition(Vector *outPos, Vector *pos, float distanceT float bestY; float bestDistSq; - iVar2 = (int)((pos->x - 40.0) / 40.0 + 0.5); + iVar2 = GHIDRA_INT(((pos->x - 40.0) / 40.0 + 0.5)); if ((((iVar2 < 0) || (this->_gridWidth <= iVar2)) || - (iVar1 = (int)((pos->y - 120.0) / 40.0 + 0.5), iVar1 < 0)) || (this->_gridHeight <= iVar1)) { + (iVar1 = GHIDRA_INT(((pos->y - 120.0) / 40.0 + 0.5)), iVar1 < 0)) || (this->_gridHeight <= iVar1)) { iVar2 = -1; } else { @@ -23713,9 +23713,9 @@ byte Room::TryMakeBridge(GridEntity *pit, GridEntity *rock) iVar2 = *(int *)((char *)g_game->_room + 0xc); pitY = (float)(pit->_gridIndex / iVar2) * 40.0 + 120.0; pitX = (float)(pit->_gridIndex % iVar2) * 40.0 + 40.0; - iVar2 = (int)(((pitX + 40.0) - 40.0) / 40.0 + 0.5); + iVar2 = GHIDRA_INT((((pitX + 40.0) - 40.0) / 40.0 + 0.5)); if ((((iVar2 < 0) || (this->_gridWidth <= iVar2)) || - (iVar1 = (int)(((pitY + 0.0) - 120.0) / 40.0 + 0.5), iVar1 < 0)) || + (iVar1 = GHIDRA_INT((((pitY + 0.0) - 120.0) / 40.0 + 0.5)), iVar1 < 0)) || ((this->_gridHeight <= iVar1 || (gridIndex = this->_gridWidth * iVar1 + iVar2, 0x1bf < gridIndex)))) { gridRight = (void *)0x0; @@ -23723,9 +23723,9 @@ byte Room::TryMakeBridge(GridEntity *pit, GridEntity *rock) else { gridRight = this->_gridEntities[gridIndex]; } - iVar2 = (int)(((pitX - 40.0) - 40.0) / 40.0 + 0.5); + iVar2 = GHIDRA_INT((((pitX - 40.0) - 40.0) / 40.0 + 0.5)); if (((iVar2 < 0) || (this->_gridWidth <= iVar2)) || - ((iVar1 = (int)(((pitY + 0.0) - 120.0) / 40.0 + 0.5), iVar1 < 0 || + ((iVar1 = GHIDRA_INT((((pitY + 0.0) - 120.0) / 40.0 + 0.5)), iVar1 < 0 || ((this->_gridHeight <= iVar1 || (gridIndex = this->_gridWidth * iVar1 + iVar2, 0x1bf < gridIndex)))))) { gridLeft = (void *)0x0; @@ -23733,9 +23733,9 @@ byte Room::TryMakeBridge(GridEntity *pit, GridEntity *rock) else { gridLeft = this->_gridEntities[gridIndex]; } - iVar2 = (int)(((pitX + 0.0) - 40.0) / 40.0 + 0.5); + iVar2 = GHIDRA_INT((((pitX + 0.0) - 40.0) / 40.0 + 0.5)); if ((((iVar2 < 0) || (this->_gridWidth <= iVar2)) || - (iVar1 = (int)(((pitY + 40.0) - 120.0) / 40.0 + 0.5), iVar1 < 0)) || + (iVar1 = GHIDRA_INT((((pitY + 40.0) - 120.0) / 40.0 + 0.5)), iVar1 < 0)) || ((this->_gridHeight <= iVar1 || (gridIndex = this->_gridWidth * iVar1 + iVar2, 0x1bf < gridIndex)))) { gridBelow = (void *)0x0; @@ -23745,7 +23745,7 @@ byte Room::TryMakeBridge(GridEntity *pit, GridEntity *rock) gridBelow = this->_gridEntities[gridIndex]; iVar1 = this->_gridWidth; LAB_0081e871: - gridYAbove = (int)(((pitY - 40.0) - 120.0) / 40.0 + 0.5); + gridYAbove = GHIDRA_INT((((pitY - 40.0) - 120.0) / 40.0 + 0.5)); if (((-1 < gridYAbove) && (gridYAbove < this->_gridHeight)) && (gridIndex = iVar1 * gridYAbove + iVar2, gridIndex < 0x1c0)) { gridAbove = this->_gridEntities[gridIndex]; @@ -23779,8 +23779,8 @@ void Room::RemoveGridEntity(int gridIndex, int pathTrail, byte isKeepDecoration) { undefined1 insertResult [12]; - if ((((uint)gridIndex < 0x1c0) && (this->_gridEntities[gridIndex] != (void *)0x0)) && - ((*(int *)((int)this->_gridEntities[gridIndex] + 4) != 1 || (isKeepDecoration == 0)))) { + if (((GHIDRA_UINT(gridIndex) < 0x1c0) && (this->_gridEntities[gridIndex] != (void *)0x0)) && + ((*(int *)(GHIDRA_INT(this->_gridEntities[gridIndex]) + 4) != 1 || (isKeepDecoration == 0)))) { this->_gridPaths[gridIndex] = pathTrail; std::set::insert(insertResult,&gridIndex); } @@ -23792,7 +23792,7 @@ void Room::RemoveGridEntityImmediate(int GridIndex, int PathTrail, byte KeepDeco { undefined4 *gridEntity; - if ((((uint)GridIndex < 0x1c0) && + if (((GHIDRA_UINT(GridIndex) < 0x1c0) && (gridEntity = this->_gridEntities[GridIndex], gridEntity != (undefined4 *)0x0)) && ((gridEntity[1] != 1 || (KeepDecoration == 0)))) { this->_gridPaths[GridIndex] = PathTrail; @@ -23827,14 +23827,14 @@ Vector * Room::GetRandomPosition(Vector *outPosition, float margin) if (3 < *(int *)(*(int *)((char *)this->_descriptor + 0x10) + 0x48) - 9U) { randomValue = Random(); - local_30.x = (float)((double)(int)randomValue + - __uint_to_double_fixup[-((int)randomValue >> 0x1f)]) * 2.3283064e-10; + local_30.x = (float)((double)GHIDRA_INT(randomValue) + + __uint_to_double_fixup[-(GHIDRA_INT(randomValue) >> 0x1f)]) * 2.3283064e-10; randomValue = Random(); local_30.x = ((this->_bottomRightPos).x - (this->_topLeftPos).x) * local_30.x + (this->_topLeftPos).x; local_30.y = ((this->_bottomRightPos).y - (this->_topLeftPos).y) * - (float)((double)(int)randomValue + - __uint_to_double_fixup[-((int)randomValue >> 0x1f)]) * 2.3283064e-10 + + (float)((double)GHIDRA_INT(randomValue) + + __uint_to_double_fixup[-(GHIDRA_INT(randomValue) >> 0x1f)]) * 2.3283064e-10 + (this->_topLeftPos).y; GetClampedPositionImpl(this,outPosition,&local_30,margin,margin,margin,margin); return outPosition; @@ -23851,26 +23851,26 @@ Vector * Room::GetRandomPosition(Vector *outPosition, float margin) areaBHeight = (areaBBottom + margin) - splitY; areaASize = ABS(areaAHeight * areaAWidth); randomValue = Random(); - if ((float)((double)(int)randomValue + __uint_to_double_fixup[-((int)randomValue >> 0x1f)]) * + if ((float)((double)GHIDRA_INT(randomValue) + __uint_to_double_fixup[-(GHIDRA_INT(randomValue) >> 0x1f)]) * 2.3283064e-10 < areaASize / (ABS(areaBHeight * areaBWidth) + areaASize)) { randomValue = Random(); - dVar1 = __uint_to_double_fixup[-((int)randomValue >> 0x1f)]; + dVar1 = __uint_to_double_fixup[-(GHIDRA_INT(randomValue) >> 0x1f)]; randomY = Random(); - dVar2 = __uint_to_double_fixup[-((int)randomY >> 0x1f)]; + dVar2 = __uint_to_double_fixup[-(GHIDRA_INT(randomY) >> 0x1f)]; outPosition->x = - areaAWidth * (float)((double)(int)randomValue + dVar1) * 2.3283064e-10 + local_30.x; + areaAWidth * (float)((double)GHIDRA_INT(randomValue) + dVar1) * 2.3283064e-10 + local_30.x; outPosition->y = - (float)((double)(int)randomY + dVar2) * 2.3283064e-10 * areaAHeight + (areaATop - margin); + (float)((double)GHIDRA_INT(randomY) + dVar2) * 2.3283064e-10 * areaAHeight + (areaATop - margin); return outPosition; } randomValue = Random(); - dVar1 = __uint_to_double_fixup[-((int)randomValue >> 0x1f)]; + dVar1 = __uint_to_double_fixup[-(GHIDRA_INT(randomValue) >> 0x1f)]; randomY = Random(); - dVar2 = __uint_to_double_fixup[-((int)randomY >> 0x1f)]; + dVar2 = __uint_to_double_fixup[-(GHIDRA_INT(randomY) >> 0x1f)]; outPosition->x = - areaBWidth * (float)((double)(int)randomValue + dVar1) * 2.3283064e-10 + (areaBLeft - margin) + areaBWidth * (float)((double)GHIDRA_INT(randomValue) + dVar1) * 2.3283064e-10 + (areaBLeft - margin) ; - outPosition->y = (float)((double)(int)randomY + dVar2) * 2.3283064e-10 * areaBHeight + splitY; + outPosition->y = (float)((double)GHIDRA_INT(randomY) + dVar2) * 2.3283064e-10 * areaBHeight + splitY; return outPosition; } @@ -23899,12 +23899,12 @@ int Room::GetRandomTileIndex(uint seed) local_28 = *(undefined4 *)(&DAT_00c35b88 + maxY); local_24 = *(undefined4 *)(&DAT_00c35b8c + maxY); local_20._seed = *(int *)(&DAT_00c35b90 + maxY); - local_20._4_8_ = *(undefined8 *)(&DAT_00c35b94 + maxY); + (*(undefined8 *)((char *)&(local_20) + 0x4)) = *(undefined8 *)(&DAT_00c35b94 + maxY); local_20._shift3 = *(int *)(&DAT_00c35b9c + maxY); ((LRoomTileDesc *)(&tileDesc))->LRoomTileDesc::GetRandomTile(&tileX,seed); if (((-1 < tileX) && (tileX < this->_gridWidth)) && - ((-1 < (int)local_c && ((int)local_c < this->_gridHeight)))) { - return this->_gridWidth * (int)local_c + tileX; + ((-1 < GHIDRA_INT(local_c) && (GHIDRA_INT(local_c) < this->_gridHeight)))) { + return this->_gridWidth * GHIDRA_INT(local_c) + tileX; } } else { @@ -23915,8 +23915,8 @@ int Room::GetRandomTileIndex(uint seed) local_20._shift3 = 0x1d; local_20._shift1 = 1; local_20._shift2 = 9; - rngResult = ((RNG *)(&local_20))->RNG::RandomInt(*(int *)(&DAT_00c35b88 + maxY) - (int)minX); - maxY = rngResult + (int)minX; + rngResult = ((RNG *)(&local_20))->RNG::RandomInt(*(int *)(&DAT_00c35b88 + maxY) - GHIDRA_INT(minX)); + maxY = rngResult + GHIDRA_INT(minX); rngResult = ((RNG *)(&local_20))->RNG::RandomInt(maxY - iVar1); iVar1 = rngResult + iVar1; if (-1 < maxY) { @@ -24087,7 +24087,7 @@ void Room::make_walls() } else if (((iVar2 == 2) || (iVar2 == 3)) || ((iVar2 == 7 || (iVar2 == 5)))) { GetLRoomTileDesc(this,&tileDesc); - iVar2 = (int)tileDesc + -1; + iVar2 = GHIDRA_INT(tileDesc) + -1; iVar1 = tileMaxX + 1; if (iVar2 <= iVar1) { y = tileMinY + -1; @@ -24166,7 +24166,7 @@ void Room::render_debug_grid_indices(Vector *renderOffset) local_8 = 0xffffffff; puStack_c = &LAB_00b01781; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(labelText + 0x54); + local_18 = __security_cookie ^ GHIDRA_UINT((labelText + 0x54)); ExceptionList = &local_10; iVar1 = 0; gridWidth = this->_gridWidth; @@ -24238,10 +24238,10 @@ void Room::render_debug_grid_indices(Vector *renderOffset) if (0 < gridWidth * iVar1) { do { local_5c = g_displayPixelRatio * g_screenPointScale; - local_70.y = (((float)((int)local_68 / gridWidth) * 40.0 + 120.0) - 140.0) * 0.65 + + local_70.y = (((float)(GHIDRA_INT(local_68) / gridWidth) * 40.0 + 120.0) - 140.0) * 0.65 + (g_screenHeight - 182.0) * 0.5; local_60 = local_5c * - ((((float)((int)local_68 % gridWidth) * 40.0 + 40.0) - 60.0) * 0.65 + + ((((float)(GHIDRA_INT(local_68) % gridWidth) * 40.0 + 40.0) - 60.0) * 0.65 + (g_screenWidth - 338.0) * 0.5) + 0.5; dVar3 = floor((double)local_60); local_60 = (float)dVar3; @@ -24266,7 +24266,7 @@ void Room::render_debug_grid_indices(Vector *renderOffset) glyphQuads = Font::measure_string (&g_manager->_font2_TeamMeatEx12,&lineColor._green,labelText, &fontSettings,&g_vectorOne); - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); color._alpha = 0.2; color._red = 1.0; color._green = 1.0; @@ -24292,7 +24292,7 @@ void Room::render_debug_grid_indices(Vector *renderOffset) glyphQuads = Font::measure_string (&g_manager->_font2_TeamMeatEx12,glyphBuffer,labelText,&fontSettings, &g_vectorOne); - local_8 = CONCAT31(local_8._1_3_,3); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); color_00._alpha = 0.2; color_00._red = 1.0; color_00._green = 1.0; @@ -24304,9 +24304,9 @@ void Room::render_debug_grid_indices(Vector *renderOffset) std::vector<12byte>::clear(); std::vector<12byte>::_Tidy(); local_8 = 0xffffffff; - local_68 = (float)((int)local_68 + 1); + local_68 = (float)(GHIDRA_INT(local_68) + 1); gridWidth = this->_gridWidth; - } while ((int)local_68 < this->_gridHeight * gridWidth); + } while (GHIDRA_INT(local_68) < this->_gridHeight * gridWidth); } ExceptionList = local_10; return; @@ -24496,7 +24496,7 @@ void Room::RespawnEnemies() puStack_5c = (undefined4 *)0x0; puStack_24 = (undefined4 *)0x0; puStack_58 = (undefined4 *)0x0; - uStack_8 = CONCAT31(uStack_8._1_3_,2); + uStack_8 = CONCAT31((*(undefined1 *)((char *)&(uStack_8) + 0x1)),2); i = 0; if ((short)roomData[0x11] != 0) { pvStack_20 = (void *)0x0; @@ -24510,16 +24510,16 @@ void Room::RespawnEnemies() uVar5 = uVar5 >> 2 ^ uVar5; uVar5 = uVar5 << 7 ^ uVar5; uVar5 = uVar5 >> ((byte)rngShift3 & 0x1f) ^ uVar5; - spawnEntry = (short *)(roomData[0x10] + (int)pvStack_20); + spawnEntry = (short *)(roomData[0x10] + GHIDRA_INT(pvStack_20)); gridIdx = *spawnEntry + 1 + (spawnEntry[1] + 1) * door->_gridWidth; if ((char)spawnEntry[4] != '\0') { - piStack_30 = ((Spawn *)(spawnEntry))->Spawn::PickEntry((float)((double)(int)uVar5 + - __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) * + piStack_30 = ((Spawn *)(spawnEntry))->Spawn::PickEntry((float)((double)GHIDRA_INT(uVar5) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283062e-10); - pEStack_14 = (Entity *)((int)door->_descriptor + 0x80); + pEStack_14 = (Entity *)(GHIDRA_INT(door->_descriptor) + 0x80); std::set::find_node(auStack_6c,&gridIdx); if (((*(char *)((char *)pvStack_64 + 0xd) != '\0') || - ((int)gridIdx < *(int *)((char *)pvStack_64 + 0x10))) || + (GHIDRA_INT(gridIdx) < *(int *)((char *)pvStack_64 + 0x10))) || (pvStack_64 == *(void **)pEStack_14)) { pEStack_14 = (Entity *)0x0; isSpawned = SpawnEntry(door,gridIdx,piStack_30,uVar5,&pEStack_14,1); @@ -24539,12 +24539,12 @@ void Room::RespawnEnemies() } } } - pvStack_20 = (void *)((int)pvStack_20 + 0x10); + pvStack_20 = (void *)(GHIDRA_INT(pvStack_20) + 0x10); i = i + 1; } while (i < *(ushort *)(roomData + 0x11)); pvStack_20 = pvStack_60; } - uVar5 = (int)puVar7 - (int)pvStack_20 >> 2; + uVar5 = GHIDRA_INT(puVar7) - GHIDRA_INT(pvStack_20) >> 2; i = 0; pvStack_60 = pvStack_20; if (uVar5 != 0) { @@ -24553,23 +24553,23 @@ void Room::RespawnEnemies() (**(code **)(*piVar2 + 0xc))(); cVar4 = (**(code **)(*piVar2 + 0x48))(); if (cVar4 != '\0') { - puVar1 = (uint *)((int)door->_descriptor + 0x44); + puVar1 = (uint *)(GHIDRA_INT(door->_descriptor) + 0x44); *puVar1 = *puVar1 & 0xfffffffe; - puVar1 = (uint *)((int)door->_descriptor + 0x44); + puVar1 = (uint *)(GHIDRA_INT(door->_descriptor) + 0x44); *puVar1 = *puVar1 & 0xffffff7f; } i = i + 1; } while (i < uVar5); } if (respawnCount == 0) { - puVar1 = (uint *)((int)door->_descriptor + 0x44); + puVar1 = (uint *)(GHIDRA_INT(door->_descriptor) + 0x44); *puVar1 = *puVar1 | 1; } else { uVar5 = 0; if ((door->_entityList)._updateEL._size != 0) { do { - piVar2 = *(int **)((int)(door->_entityList)._updateEL._data + uVar5 * 4); + piVar2 = *(int **)(GHIDRA_INT((door->_entityList)._updateEL._data) + uVar5 * 4); piStack_30 = piVar2; _Find_lower_bound<>(auStack_6c,&piStack_30); if (((*(char *)((char *)pvStack_64 + 0xd) != '\0') || @@ -24583,7 +24583,7 @@ void Room::RespawnEnemies() } } uVar5 = uVar5 + 1; - } while (uVar5 < (uint)(door->_entityList)._updateEL._size); + } while (uVar5 < GHIDRA_UINT((door->_entityList)._updateEL._size)); } ppvVar6 = door->_doors; iVar8 = 8; @@ -24605,12 +24605,12 @@ void Room::RespawnEnemies() } while (iVar8 != 0); } if (pvStack_20 != (void *)0x0) { - uVar5 = (int)puStack_24 - (int)pvStack_20 & 0xfffffffc; + uVar5 = GHIDRA_INT(puStack_24) - GHIDRA_INT(pvStack_20) & 0xfffffffc; freeBlock = pvStack_20; if (0xfff < uVar5) { freeBlock = *(void **)((char *)pvStack_20 + -4); uVar5 = uVar5 + 0x23; - if (0x1f < (uint)((int)pvStack_20 + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvStack_20) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -24620,12 +24620,12 @@ void Room::RespawnEnemies() FID_conflict__Erase_tree_>_> (&spawnedEntitySet, (fuzzer_allocator_> *)&spawnedEntitySet, - *(_Tree_node **)((int)spawnedEntitySet + 4)); + *(_Tree_node **)(GHIDRA_INT(spawnedEntitySet) + 4)); operator_delete(spawnedEntitySet,0x14); FID_conflict__Erase_tree_>_> (&respawnGridIdxSet, (fuzzer_allocator_> *)&respawnGridIdxSet, - *(_Tree_node **)((int)respawnGridIdxSet + 4)); + *(_Tree_node **)(GHIDRA_INT(respawnGridIdxSet) + 4)); operator_delete(respawnGridIdxSet,0x14); ExceptionList = local_10; return; @@ -24689,7 +24689,7 @@ byte Room::TrySpawnBlueWombDoor(byte isFirstTime, byte isIgnoreTime, byte isForc iVar4 = 0; doorSlot = this->_doors; do { - if ((*doorSlot != (void *)0x0) && (*(int *)((int)*doorSlot + 0x394) == -8)) { + if ((*doorSlot != (void *)0x0) && (*(int *)(GHIDRA_INT(*doorSlot) + 0x394) == -8)) { ExceptionList = local_10; return 0; } @@ -24699,7 +24699,7 @@ byte Room::TrySpawnBlueWombDoor(byte isFirstTime, byte isIgnoreTime, byte isForc if (((game->_timeCounter <= game->_blueWombParTime) || (isIgnoreTime != 0)) || (isForce != 0)) { uVar6 = game->_enterDoor; - if (((game->_lastRoomIdx != -8) || ((int)uVar6 < 0)) || (this->_doors[uVar6] != (void *)0x0) + if (((game->_lastRoomIdx != -8) || (GHIDRA_INT(uVar6) < 0)) || (this->_doors[uVar6] != (void *)0x0) ) { uVar5 = *(uint *)((char *)this->_descriptor + 0x58); if (uVar5 == 0) { @@ -24713,13 +24713,13 @@ byte Room::TrySpawnBlueWombDoor(byte isFirstTime, byte isIgnoreTime, byte isForc uVar5 = uVar5 << 0xb ^ uVar5; do { uVar6 = iVar4 + ((uVar5 >> 0x10 ^ uVar5) & 7) & 0x80000007; - if ((int)uVar6 < 0) { + if (GHIDRA_INT(uVar6) < 0) { uVar6 = (uVar6 - 1 | 0xfffffff8) + 1; } } while ((((*(uint *)(*(int *)((char *)this->_descriptor + 0x10) + 0x38 + (uVar6 >> 5) * 4) & 1 << ((byte)uVar6 & 0x1f)) == 0) || (this->_doors[uVar6] != (void *)0x0)) && (iVar4 = iVar4 + 1, iVar4 < 8)); - if ((int)uVar6 < 0) { + if (GHIDRA_INT(uVar6) < 0) { ExceptionList = local_10; return 0; } @@ -24747,9 +24747,9 @@ byte Room::TrySpawnBlueWombDoor(byte isFirstTime, byte isIgnoreTime, byte isForc } game = g_game; qVar2 = g_game->_gameStateFlags; - flagsHigh = (uint *)((int)&g_game->_gameStateFlags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&g_game->_gameStateFlags) + 4); *flagsHigh = *flagsHigh | 0x80; - *(int *)&game->_gameStateFlags = (int)qVar2; + *(int *)&game->_gameStateFlags = GHIDRA_INT(qVar2); ExceptionList = local_10; return 1; } @@ -24781,7 +24781,7 @@ byte Room::TrySpawnTheVoidDoor(byte isForce) local_8 = 0xffffffff; puStack_c = &LAB_00b01831; local_10 = ExceptionList; - debugCurses = __security_cookie ^ (int)register0x00000010 - 4U; + debugCurses = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; if ((isForce == 0) && (g_game->_challenge == 0x2c)) { return 0; } @@ -24913,7 +24913,7 @@ void Room::MamaMegaExplosion(Vector *position, Entity_Player *player) uint *roomFlags; int vtable; - roomFlags = (uint *)((int)this->_descriptor + 0x44); + roomFlags = (uint *)(GHIDRA_INT(this->_descriptor) + 0x44); *roomFlags = *roomFlags | 0x4000; seed = Random(); if (player == (Entity_Player *)0x0) { @@ -25016,12 +25016,12 @@ void Room::TurnGold() goldDesc._variant = 3; goldDesc._spawnSeed = *(int *)((char *)gridEntity + 0x14); goldDesc._varData = *(int *)((char *)gridEntity + 0x18); - goldDesc._24_4_ = *(undefined4 *)((char *)gridEntity + 0x1c); + (*(undefined4 *)((char *)&(goldDesc) + 0x18)) = *(undefined4 *)((char *)gridEntity + 0x1c); goldDesc._variableSeed = *(int *)((char *)gridEntity + 0x20); SpawnGridEntityDesc(this,GridIndex,&goldDesc); } } - else if ((undefined4 *)((int)gridEntity + 0xe8) != local_9c) { + else if ((undefined4 *)(GHIDRA_INT(gridEntity) + 0xe8) != local_9c) { *(undefined4 *)((char *)gridEntity + 0x108) = local_7c; *(undefined4 *)((char *)gridEntity + 0x10c) = uStack_78; *(undefined4 *)((char *)gridEntity + 0xe8) = 0x3f800000; @@ -25037,7 +25037,7 @@ void Room::TurnGold() } GridIndex = GridIndex + 1; gridSlot = gridSlot + 1; - } while ((int)GridIndex < 0x1c0); + } while (GHIDRA_INT(GridIndex) < 0x1c0); return; } @@ -25089,7 +25089,7 @@ void Room::record_killed_npc(int param_1) undefined4 *prevNode; undefined2 variant16; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b0185d; local_1c = ExceptionList; @@ -25177,7 +25177,7 @@ joined_r0x00820dc1: } variant16 = (undefined2)local_34; subtype16 = (undefined2)local_38; - uStack_48 = CONCAT31(uStack_48._1_3_,isFriendly); + uStack_48 = CONCAT31((*(undefined1 *)((char *)&(uStack_48) + 0x1)),isFriendly); iVar3 = **(int **)&(*(undefined1 *)((char *)(in_ECX) + 0x7300)); if (*(int *)&(*(undefined1 *)((char *)(in_ECX) + 0x7304)) == 0x7ffffff) { /* WARNING: Subroutine does not return */ @@ -25187,15 +25187,15 @@ joined_r0x00820dc1: local_44.y = 0.0; local_44.x = (float)&(*(undefined1 *)((char *)(in_ECX) + 0x7300)); node = operator_new(0x20); - node[2] = (int)fVar2; - node[3] = (int)fVar1; + node[2] = GHIDRA_INT(fVar2); + node[3] = GHIDRA_INT(fVar1); node[4] = npcType; node[5] = CONCAT22(subtype16,variant16); *(ulonglong *)(node + 6) = CONCAT44(uStack_48,championColorCopy); *(int *)&(*(undefined1 *)((char *)(in_ECX) + 0x7304)) = *(int *)&(*(undefined1 *)((char *)(in_ECX) + 0x7304)) + 1; prevNode = *(undefined4 **)(iVar3 + 4); *node = iVar3; - node[1] = (int)prevNode; + node[1] = GHIDRA_INT(prevNode); *(int **)(iVar3 + 4) = node; *prevNode = node; switchD_00820d91_caseD_13: @@ -25282,9 +25282,9 @@ void Room::render_water() ((Color *)(aCStackY_16d8 + 0x81))->Color::operator_assign((ColorMod *)&tintedFloorColor); } Backdrop::RenderFloor(&g_vectorZero); - if (0 < (int)gridCount) { + if (0 < GHIDRA_INT(gridCount)) { gridEntityIt = this->_gridEntities; - local_18 = (uint)local_14; + local_18 = GHIDRA_UINT(local_14); do { piVar14 = *gridEntityIt; if ((piVar14 != (int *)0x0) && (piVar14[1] == 1)) { @@ -25321,13 +25321,13 @@ void Room::render_water() color._tint[2] = (float)uVar4; color._tint[1] = (float)uVar3; color._tint[0] = (float)uVar2; - color._offset[1] = (float)(int)((ulonglong)*(undefined8 *)(this->_floorColor)._offset >> 0x20); + color._offset[1] = (float)GHIDRA_INT(((ulonglong)*(undefined8 *)(this->_floorColor)._offset >> 0x20)); color._offset[2] = (this->_floorColor)._offset[2]; ((Backdrop *)(&this->_backdrop))->Backdrop::RenderWalls(&g_vectorZero,color); renderOffsetX.x = -(this->_renderSurfaceTopLeft).x; renderOffsetX.y = -(this->_renderSurfaceTopLeft).y; ((RailManager *)(&this->_railManager))->RailManager::Render(&renderOffsetX); - if (0 < (int)gridCount) { + if (0 < GHIDRA_INT(gridCount)) { gridEntityIt = this->_gridEntities; do { if ((*gridEntityIt != (int *)0x0) && @@ -25337,7 +25337,7 @@ void Room::render_water() (**(code **)(*(int *)*gridEntityIt + 0xc))(); } gridEntityIt = gridEntityIt + 1; - local_14 = (float)((int)local_14 - 1); + local_14 = (float)(GHIDRA_INT(local_14) - 1); } while (local_14 != 0.0); } if ((this->_backdropType == 0x20) && ((*(uint *)((char *)this->_descriptor + 0x44) >> 5 & 1) != 0)) @@ -25351,18 +25351,18 @@ void Room::render_water() do { pvVar1 = *gridEntityIt; if ((pvVar1 != (void *)0x0) && (*(int *)((char *)pvVar1 + 4) == 7)) { - layer = ((ANM2 *)((ANM2 *)((int)pvVar1 + 0x40)))->ANM2::GetLayer((byte *)0x0); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(pvVar1) + 0x40)))->ANM2::GetLayer((byte *)0x0); layer->_visible = 0; renderOffsetX.x = -(this->_renderSurfaceTopLeft).x; renderOffsetX.y = -(this->_renderSurfaceTopLeft).y; (**(code **)(*(int *)*gridEntityIt + 0xc))(); - layer = ((ANM2 *)((ANM2 *)((int)*gridEntityIt + 0x40)))->ANM2::GetLayer((byte *)0x0); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(*gridEntityIt) + 0x40)))->ANM2::GetLayer((byte *)0x0); layer->_visible = 1; } iVar11 = this->_gridWidth; local_18 = local_18 + 1; gridEntityIt = gridEntityIt + 1; - } while ((int)local_18 < iVar11 * this->_gridHeight); + } while (GHIDRA_INT(local_18) < iVar11 * this->_gridHeight); iVar16 = this->_gridHeight; } local_18 = 0; @@ -25371,17 +25371,17 @@ void Room::render_water() do { pvVar1 = *gridEntityIt; if ((pvVar1 != (void *)0x0) && (*(int *)((char *)pvVar1 + 4) == 7)) { - layer = ((ANM2 *)((ANM2 *)((int)pvVar1 + 0x40)))->ANM2::GetLayer((byte *)0x0); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(pvVar1) + 0x40)))->ANM2::GetLayer((byte *)0x0); layer->_visible = 0; renderOffsetX.x = -(this->_renderSurfaceTopLeft).x; renderOffsetX.y = -(this->_renderSurfaceTopLeft).y; (**(code **)(*(int *)*gridEntityIt + 0xc))(); - layer = ((ANM2 *)((ANM2 *)((int)*gridEntityIt + 0x40)))->ANM2::GetLayer((byte *)0x0); + layer = ((ANM2 *)((ANM2 *)(GHIDRA_INT(*gridEntityIt) + 0x40)))->ANM2::GetLayer((byte *)0x0); layer->_visible = 1; } local_18 = local_18 + 1; gridEntityIt = gridEntityIt + 1; - } while ((int)local_18 < this->_gridWidth * this->_gridHeight); + } while (GHIDRA_INT(local_18) < this->_gridWidth * this->_gridHeight); } } renderOffsetX.x = -(this->_renderSurfaceTopLeft).x; @@ -25395,7 +25395,7 @@ void Room::render_water() if (0 < iVar11) { do { iVar16 = this->_gridWidth; - if (((iVar16 < 1) || ((int)local_18 < 0)) || (iVar11 <= (int)local_18)) { + if (((iVar16 < 1) || (GHIDRA_INT(local_18) < 0)) || (iVar11 <= GHIDRA_INT(local_18))) { iVar11 = -1; } else { @@ -25407,24 +25407,24 @@ void Room::render_water() local_14 = (float)__ftoui3(); renderOffsetX.x = -(this->_renderSurfaceTopLeft).x; renderOffsetX.y = -(this->_renderSurfaceTopLeft).y; - ((EntityList *)(this_00))->EntityList::render_up_to((uint)local_14,&renderOffsetX); + ((EntityList *)(this_00))->EntityList::render_up_to(GHIDRA_UINT(local_14),&renderOffsetX); iVar11 = this->_gridHeight; local_18 = local_18 + 1; - } while ((int)local_18 < iVar11); + } while (GHIDRA_INT(local_18) < iVar11); fVar12 = local_14; } renderOffsetX.x = -(this->_renderSurfaceTopLeft).x; renderOffsetX.y = -(this->_renderSurfaceTopLeft).y; - ((EntityList *)(this_00))->EntityList::render_up_to((int)fVar12 + 5000,&renderOffsetX); + ((EntityList *)(this_00))->EntityList::render_up_to(GHIDRA_INT(fVar12) + 5000,&renderOffsetX); renderOffsetX.x = -(this->_renderSurfaceTopLeft).x; renderOffsetX.y = -(this->_renderSurfaceTopLeft).y; room = this; if ((this->_entityList)._renderCursor != 0) { uVar15 = 0; do { - (**(code **)(**(int **)((int)(this->_entityList)._renderEL._data + uVar15 * 4) + 0x1c))(); + (**(code **)(**(int **)(GHIDRA_INT((this->_entityList)._renderEL._data) + uVar15 * 4) + 0x1c))(); uVar15 = uVar15 + 1; - } while (uVar15 < (uint)(this->_entityList)._renderCursor); + } while (uVar15 < GHIDRA_UINT((this->_entityList)._renderCursor)); room = local_20; } (this->_entityList)._renderMode = 0; @@ -25440,7 +25440,7 @@ void Room::render_water() if (0 < iVar11) { do { iVar16 = room->_gridWidth; - if (((iVar16 < 1) || ((int)local_18 < 0)) || (iVar11 <= (int)local_18)) { + if (((iVar16 < 1) || (GHIDRA_INT(local_18) < 0)) || (iVar11 <= GHIDRA_INT(local_18))) { iVar11 = -1; } else { @@ -25453,24 +25453,24 @@ void Room::render_water() local_20 = (Room *)__ftoui3(); renderOffsetX.x = -(room->_renderSurfaceTopLeft).x; renderOffsetX.y = -(room->_renderSurfaceTopLeft).y; - ((EntityList *)(this_00))->EntityList::render_up_to((uint)local_20,&renderOffsetX); + ((EntityList *)(this_00))->EntityList::render_up_to(GHIDRA_UINT(local_20),&renderOffsetX); iVar11 = room->_gridHeight; local_18 = local_18 + 1; - } while ((int)local_18 < iVar11); + } while (GHIDRA_INT(local_18) < iVar11); pRVar13 = local_20; } renderOffsetX.x = -(room->_renderSurfaceTopLeft).x; renderOffsetX.y = -(room->_renderSurfaceTopLeft).y; - ((EntityList *)(this_00))->EntityList::render_up_to((uint)&(*(undefined1 *)((char *)(pRVar13) + 0x1388)),&renderOffsetX); + ((EntityList *)(this_00))->EntityList::render_up_to(GHIDRA_UINT(&(*(undefined1 *)((char *)(pRVar13) + 0x1388))),&renderOffsetX); renderOffsetX.x = -(room->_renderSurfaceTopLeft).x; renderOffsetX.y = -(room->_renderSurfaceTopLeft).y; ((EntityList *)(this_00))->EntityList::render_up_to(0xffffffff,&renderOffsetX); uVar15 = 0; if ((this->_entityList)._renderCursor != 0) { do { - (**(code **)(**(int **)((int)(this->_entityList)._renderEL._data + uVar15 * 4) + 0x1c))(); + (**(code **)(**(int **)(GHIDRA_INT((this->_entityList)._renderEL._data) + uVar15 * 4) + 0x1c))(); uVar15 = uVar15 + 1; - } while (uVar15 < (uint)(this->_entityList)._renderCursor); + } while (uVar15 < GHIDRA_UINT((this->_entityList)._renderCursor)); } (this->_entityList)._renderMode = 0; uVar15 = 0x1505; @@ -25482,7 +25482,7 @@ void Room::render_water() if (0x19 < (byte)(shaderChar + 0xbf)) { lowerChar = shaderChar; } - hashChar = (uint)lowerChar; + hashChar = GHIDRA_UINT(lowerChar); if (lowerChar == 0x5c) { hashChar = 0x2f; } @@ -25707,7 +25707,7 @@ LAB_00821b14: local_dc.y = (float)((double)DAT_00c797f4[7] + __uint_to_double_fixup[-(DAT_00c797f4[7] >> 0x1f)]) ; local_104 = DAT_00c79a4c; - ((Shader *)(shader))->Shader::set_uniform(&DAT_00b6837c,8,local_130,(int)DAT_00c797f4); + ((Shader *)(shader))->Shader::set_uniform(&DAT_00b6837c,8,local_130,GHIDRA_INT(DAT_00c797f4)); ((Shader *)(g_currentShader))->Shader::set_uniform((byte *)"ColorMul",10,&quadColor,unused); ((Shader *)(g_currentShader))->Shader::set_uniform((byte *)"CurrentDir",9,&shader->_waterCurrent,unused_00); ((Shader *)(g_currentShader))->Shader::set_uniform((byte *)"TextureSize",9,&local_dc,unused_01); @@ -25721,22 +25721,22 @@ LAB_00821b14: quadColor._alpha = 1.0; quadColor._unk = 0; drawFn = *(code **)(*DAT_00c797f4 + 0x14); - local_dc.x = *(float *)((char *)quadOffsets + (int)local_130[0]) + renderOffset->x; - local_dc.y = *(float *)((char *)quadOffsets + (int)local_130[0] + 4) + renderOffset->y; - quadSizePtr = (Vector *)((int)quadOffsets + (int)local_130[0] + 0x10); + local_dc.x = *(float *)((char *)quadOffsets + GHIDRA_INT(local_130[0])) + renderOffset->x; + local_dc.y = *(float *)((char *)quadOffsets + GHIDRA_INT(local_130[0]) + 4) + renderOffset->y; + quadSizePtr = (Vector *)(GHIDRA_INT(quadOffsets) + GHIDRA_INT(local_130[0]) + 0x10); render_quad_set_rect(quad,&local_dc,quadSizePtr,&quadColor); fVar3 = local_130[0]; local_84 = 1; - local_94 = *(float *)((char *)quadOffsets + (int)local_130[0]); - local_98 = *(float *)((char *)quadOffsets + (int)local_130[0] + 4); + local_94 = *(float *)((char *)quadOffsets + GHIDRA_INT(local_130[0])); + local_98 = *(float *)((char *)quadOffsets + GHIDRA_INT(local_130[0]) + 4); uvQuad = local_94; local_9c = local_94 + quadSizePtr->x; local_a0 = local_98; - local_90 = local_98 + *(float *)((char *)quadOffsets + (int)local_130[0] + 0x14); + local_90 = local_98 + *(float *)((char *)quadOffsets + GHIDRA_INT(local_130[0]) + 0x14); local_8c = local_9c; local_88 = local_90; (*drawFn)(&uvQuad,extraout_EAX,&shaderParams); - local_130[0] = (float)((int)fVar3 + 8); + local_130[0] = (float)(GHIDRA_INT(fVar3) + 8); quadCount = quadCount + -1; } while (quadCount != 0); shader_cache_find(unusedArg); @@ -25807,16 +25807,16 @@ byte Room::is_obstacle_path_valid(uint startIndex, uint goalIndex, uint flags) puStack_c = &LAB_00b0189b; local_10 = ExceptionList; uStack_14 = 0x821fdb; - local_18 = __security_cookie ^ (uint)(cameFrom + 0x1ca); + local_18 = __security_cookie ^ GHIDRA_UINT((cameFrom + 0x1ca)); ExceptionList = &local_10; local_1220 = startIndex; openSetHead = (int *)0x0; openSetSize = 0; room = pathGrid; openSetHead = operator_new(0x14); - *openSetHead = (int)openSetHead; - openSetHead[1] = (int)openSetHead; - openSetHead[2] = (int)openSetHead; + *openSetHead = GHIDRA_INT(openSetHead); + openSetHead[1] = GHIDRA_INT(openSetHead); + openSetHead[2] = GHIDRA_INT(openSetHead); *(undefined2 *)(openSetHead + 3) = 0x101; local_8 = 0; closedSetHead = (void *)0x0; @@ -25826,20 +25826,20 @@ byte Room::is_obstacle_path_valid(uint startIndex, uint goalIndex, uint flags) *(void **)((char *)closedSetHead + 4) = closedSetHead; *(void **)((char *)closedSetHead + 8) = closedSetHead; *(undefined2 *)((char *)closedSetHead + 0xc) = 0x101; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); std::set::insert(local_1230,&local_1220); memset(gScore,0xff,0x700); memset(fScore,0xff,0x700); memset(cameFrom,0xff,0x380); uVar7 = local_1220; iVar4 = pathGrid->_gridWidth; - goalRow = (int)goalIndex / iVar4; - goalCol = (int)goalIndex % iVar4; + goalRow = GHIDRA_INT(goalIndex) / iVar4; + goalCol = GHIDRA_INT(goalIndex) % iVar4; gScore[local_1220] = 0; - deltaCol = (float)goalCol - (float)((int)local_1220 % iVar4); - fVar8 = (float)goalRow - (float)((int)local_1220 / iVar4); + deltaCol = (float)goalCol - (float)(GHIDRA_INT(local_1220) % iVar4); + fVar8 = (float)goalRow - (float)(GHIDRA_INT(local_1220) / iVar4); fVar8 = sqrtf(fVar8 * fVar8 + deltaCol * deltaCol); - fScore[uVar7] = (int)(fVar8 * 10.0) & 0xffff; + fScore[uVar7] = GHIDRA_INT((fVar8 * 10.0)) & 0xffff; while (openSetSize != 0) { local_1220 = 0xffff; node = (int *)*openSetHead; @@ -25857,7 +25857,7 @@ byte Room::is_obstacle_path_valid(uint startIndex, uint goalIndex, uint flags) if ((ushort)local_1220 <= score) { score = (ushort)local_1220; } - local_1220 = (uint)score; + local_1220 = GHIDRA_UINT(score); } while (local_122c != openSetHead); } current = node[4]; @@ -25873,8 +25873,8 @@ byte Room::is_obstacle_path_valid(uint startIndex, uint goalIndex, uint flags) goalColumn = goalCol; rightCol = goalRow; iVar4 = room->_gridWidth; - iVar3 = (int)current / iVar4; - iVar6 = (int)current % iVar4; + iVar3 = GHIDRA_INT(current) / iVar4; + iVar6 = GHIDRA_INT(current) % iVar4; if ((((iVar6 + -1 < 0) || (iVar4 <= iVar6 + -1)) || (iVar3 < 0)) || (room->_gridHeight <= iVar3) ) { local_1220 = 0xffffffff; @@ -25889,21 +25889,21 @@ byte Room::is_obstacle_path_valid(uint startIndex, uint goalIndex, uint flags) neighbors[1] = 0xffffffff; } else { - neighbors[1] = rightCol + (int)local_122c; + neighbors[1] = rightCol + GHIDRA_INT(local_122c); } local_1228 = (void *)(iVar3 + -1); if (((iVar6 < 0) || (iVar4 <= iVar6)) || - (((int)local_1228 < 0 || (room->_gridHeight <= (int)local_1228)))) { + ((GHIDRA_INT(local_1228) < 0 || (room->_gridHeight <= GHIDRA_INT(local_1228))))) { neighbors[2] = 0xffffffff; if ((-1 < iVar6) && (iVar6 < iVar4)) goto LAB_008222fe; LAB_00822339: neighbors[3] = 0xffffffff; } else { - neighbors[2] = (int)local_1228 * iVar4 + iVar6; + neighbors[2] = GHIDRA_INT(local_1228) * iVar4 + iVar6; LAB_008222fe: local_121c = iVar3 + 1; - if (((int)local_121c < 0) || (room->_gridHeight <= (int)local_121c)) goto LAB_00822339; + if ((GHIDRA_INT(local_121c) < 0) || (room->_gridHeight <= GHIDRA_INT(local_121c))) goto LAB_00822339; neighbors[3] = local_121c * iVar4 + iVar6; } uVar7 = 4; @@ -25914,7 +25914,7 @@ LAB_008222fe: iVar6 = -1; } else { - iVar6 = (int)local_122c + iVar6; + iVar6 = GHIDRA_INT(local_122c) + iVar6; } local_1228 = room->_gridEntities[iVar6]; if (((local_1228 != (void *)0x0) && (*(int *)((char *)local_1228 + 4) == 0x17)) && @@ -25924,7 +25924,7 @@ LAB_008222fe: iVar4 = iVar3 + -2; if (0 < iVar4) { do { - scanIndex = (int)(scanIndex + 1) % iVar3; + scanIndex = GHIDRA_INT((scanIndex + 1)) % iVar3; if (((scanIndex < 0x1c0) && (neighborGrid = room->_gridEntities[scanIndex], neighborGrid != (void *)0x0)) && ((*(int *)((char *)neighborGrid + 4) == 0x17 && @@ -25940,14 +25940,14 @@ LAB_008222fe: } } local_1220 = 0; - if (0 < (int)local_121c) { + if (0 < GHIDRA_INT(local_121c)) { uVar7 = local_121c; pRVar5 = room; do { neighborGrid = (void *)neighbors[local_1220]; local_1228 = neighborGrid; - if (-1 < (int)neighborGrid) { - neighborGrid = pRVar5->_gridEntities[(int)neighborGrid]; + if (-1 < GHIDRA_INT(neighborGrid)) { + neighborGrid = pRVar5->_gridEntities[GHIDRA_INT(neighborGrid)]; if (neighborGrid == (void *)0x0) { iVar4 = 0; } @@ -25957,7 +25957,7 @@ LAB_008222fe: iVar4 = 3; } } - if (999 < room->_gridPaths[(int)neighborGrid]) { + if (999 < room->_gridPaths[GHIDRA_INT(neighborGrid)]) { iVar4 = 3; } if ((flags & 1) != 0) { @@ -25981,25 +25981,25 @@ LAB_008222fe: LAB_0082250a: std::set::find_node(closedFind,&local_1228); if (((*(char *)((char *)closedNode + 0xd) != '\0') || - ((int)neighborGrid < *(int *)((char *)closedNode + 0x10))) || (closedNode == closedSetHead)) + (GHIDRA_INT(neighborGrid) < *(int *)((char *)closedNode + 0x10))) || (closedNode == closedSetHead)) { - local_122c = (int *)((int)local_122c + gScore[current]); + local_122c = (int *)(GHIDRA_INT(local_122c) + gScore[current]); std::set::find_node(openFind,&local_1228); - if (((*(char *)((char *)openNode + 0xd) == '\0') && (openNode[4] <= (int)neighborGrid)) && + if (((*(char *)((char *)openNode + 0xd) == '\0') && (openNode[4] <= GHIDRA_INT(neighborGrid))) && (openNode != openSetHead)) { - if ((int *)gScore[(int)neighborGrid] <= local_122c) goto LAB_0082262f; + if ((int *)gScore[GHIDRA_INT(neighborGrid)] <= local_122c) goto LAB_0082262f; } else { std::set::insert(local_129c,&local_1228); neighborGrid = local_1228; } - gScore[(int)neighborGrid] = (uint)local_122c; - cameFrom[(int)neighborGrid] = (ushort)current; - deltaCol = (float)goalColumn - (float)((int)neighborGrid % room->_gridWidth); - fVar8 = (float)rightCol - (float)((int)neighborGrid / room->_gridWidth); + gScore[GHIDRA_INT(neighborGrid)] = GHIDRA_UINT(local_122c); + cameFrom[GHIDRA_INT(neighborGrid)] = (ushort)current; + deltaCol = (float)goalColumn - (float)(GHIDRA_INT(neighborGrid) % room->_gridWidth); + fVar8 = (float)rightCol - (float)(GHIDRA_INT(neighborGrid) / room->_gridWidth); sqrtf(fVar8 * fVar8 + deltaCol * deltaCol); iVar4 = __ftoui3(); - fScore[(int)neighborGrid] = iVar4 + (int)local_122c; + fScore[GHIDRA_INT(neighborGrid)] = iVar4 + GHIDRA_INT(local_122c); } } LAB_0082262f: @@ -26007,7 +26007,7 @@ LAB_0082262f: pRVar5 = room; } local_1220 = local_1220 + 1; - } while ((int)local_1220 < (int)uVar7); + } while (GHIDRA_INT(local_1220) < GHIDRA_INT(uVar7)); } } isPathFound = 0; @@ -26048,14 +26048,14 @@ LAB_0082274f: pRVar5 = room; } LAB_008227f9: - local_121c = (uint)cameFrom[local_121c]; + local_121c = GHIDRA_UINT(cameFrom[local_121c]); } while (local_121c != 0xffff); LAB_00822813: isPathFound = 1; LAB_0082265f: FID_conflict__Erase_tree_>_> (&closedSetHead,(fuzzer_allocator_> *)&closedSetHead - ,*(_Tree_node **)((int)closedSetHead + 4)); + ,*(_Tree_node **)(GHIDRA_INT(closedSetHead) + 4)); operator_delete(closedSetHead,0x14); FID_conflict__Erase_tree_>_> (&openSetHead,(fuzzer_allocator_> *)&openSetHead, @@ -26096,9 +26096,9 @@ byte Room::CanSpawnObstacleAtPosition(int GridIndex, byte Force) void *neighborGridEntity; game = g_game; - neighborOffsets[8] = __security_cookie ^ (uint)auStack_64; + neighborOffsets[8] = __security_cookie ^ GHIDRA_UINT(auStack_64); targetGridIndex = GridIndex; - if ((uint)GridIndex < 0x1c0) { + if (GHIDRA_UINT(GridIndex) < 0x1c0) { iVar5 = g_game->_room->_gridWidth; local_50.x = (float)(GridIndex % iVar5) * 40.0 + 40.0; local_50.y = (float)(GridIndex / iVar5) * 40.0 + 120.0; @@ -26110,12 +26110,12 @@ byte Room::CanSpawnObstacleAtPosition(int GridIndex, byte Force) (isValid = is_grid_type_floor_special(*(int *)(extraout_ECX + 4)), isValid == 0)))))) { if (Force == 0) { uVar9 = 0; - if ((int)(game->_playerManager)._playerList._end - - (int)(game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((game->_playerManager)._playerList._begin) >> 2 != 0) { do { player = ((Game *)(game))->Game::GetPlayer(uVar9); - iVar5 = (int)(((player->_pos).x - 40.0) / 40.0 + 0.5); - iVar3 = (int)(((player->_pos).y - 120.0) / 40.0 + 0.5); + iVar5 = GHIDRA_INT((((player->_pos).x - 40.0) / 40.0 + 0.5)); + iVar3 = GHIDRA_INT((((player->_pos).y - 120.0) / 40.0 + 0.5)); if ((((iVar5 < 0) || (this->_gridWidth <= iVar5)) || (iVar3 < 0)) || (this->_gridHeight <= iVar3)) { iVar5 = -1; @@ -26130,8 +26130,8 @@ byte Room::CanSpawnObstacleAtPosition(int GridIndex, byte Force) } uVar9 = uVar9 + 1; game = g_game; - } while (uVar9 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (uVar9 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); } } iVar3 = 0; @@ -26142,16 +26142,16 @@ byte Room::CanSpawnObstacleAtPosition(int GridIndex, byte Force) local_50.x = 0.0; do { if (((local_44 != (int *)0x0) && - ((local_44[((uint)local_50.x >> 5) + 0xe] & 1 << (SUB41(local_50.x,0) & 0x1f)) != 0)) && + ((local_44[(GHIDRA_UINT(local_50.x) >> 5) + 0xe] & 1 << (SUB41(local_50.x,0) & 0x1f)) != 0)) && (uVar9 = *local_58 / this->_gridWidth - iVar5, - uVar10 = *local_58 % this->_gridWidth - targetColumn, uVar6 = (int)uVar9 >> 0x1f, - uVar7 = (int)uVar10 >> 0x1f, - (int)(((uVar9 ^ uVar6) - uVar6) + ((uVar10 ^ uVar7) - uVar7)) < 2)) { + uVar10 = *local_58 % this->_gridWidth - targetColumn, uVar6 = GHIDRA_INT(uVar9) >> 0x1f, + uVar7 = GHIDRA_INT(uVar10) >> 0x1f, + GHIDRA_INT((((uVar9 ^ uVar6) - uVar6) + ((uVar10 ^ uVar7) - uVar7))) < 2)) { return 0; } - local_50.x = (float)((int)local_50.x + 1); + local_50.x = (float)(GHIDRA_INT(local_50.x) + 1); local_58 = local_58 + 1; - } while ((int)local_50.x < 8); + } while (GHIDRA_INT(local_50.x) < 8); local_50.x = 0.0; if ((this->_entityList)._updateEL._size != 0) { local_44 = (this->_entityList)._updateEL._data; @@ -26162,20 +26162,20 @@ byte Room::CanSpawnObstacleAtPosition(int GridIndex, byte Force) } else if ((*(int *)(iVar4 + 0x28) == 5) && (*(int *)(iVar4 + 0x534) != 0)) { LAB_00822ab9: - iVar8 = (int)((*(float *)(iVar4 + 0x33c) - 40.0) / 40.0 + 0.5); - iVar4 = (int)((*(float *)(iVar4 + 0x340) - 120.0) / 40.0 + 0.5); + iVar8 = GHIDRA_INT(((*(float *)(iVar4 + 0x33c) - 40.0) / 40.0 + 0.5)); + iVar4 = GHIDRA_INT(((*(float *)(iVar4 + 0x340) - 120.0) / 40.0 + 0.5)); if ((((-1 < iVar8) && ((iVar2 = this->_gridWidth, iVar8 < iVar2 && (-1 < iVar4)))) && (iVar4 < this->_gridHeight)) && ((iVar8 = iVar2 * iVar4 + iVar8, -1 < iVar8 && (uVar6 = iVar8 % iVar2 - targetColumn, uVar9 = iVar8 / iVar2 - iVar5, - uVar7 = (int)uVar6 >> 0x1f, uVar10 = (int)uVar9 >> 0x1f, - (int)(((uVar6 ^ uVar7) - uVar7) + ((uVar9 ^ uVar10) - uVar10)) < 2)))) { + uVar7 = GHIDRA_INT(uVar6) >> 0x1f, uVar10 = GHIDRA_INT(uVar9) >> 0x1f, + GHIDRA_INT((((uVar6 ^ uVar7) - uVar7) + ((uVar9 ^ uVar10) - uVar10))) < 2)))) { return 0; } } - local_50.x = (float)((int)local_50.x + 1); + local_50.x = (float)(GHIDRA_INT(local_50.x) + 1); local_44 = local_44 + 1; - } while ((uint)local_50.x < (uint)(this->_entityList)._updateEL._size); + } while (GHIDRA_UINT(local_50.x) < GHIDRA_UINT((this->_entityList)._updateEL._size)); } iVar4 = 0; neighborOffsets[0] = -1; @@ -26193,7 +26193,7 @@ LAB_00822ab9: iVar2 = neighborOffsets[iVar4 * 2 + 1] + iVar5; if ((-1 < iVar2) && (iVar2 < this->_gridHeight)) { uVar9 = this->_gridWidth * iVar2 + iVar8; - if (-1 < (int)uVar9) { + if (-1 < GHIDRA_INT(uVar9)) { neighborGridEntity = this->_gridEntities[uVar9]; if (neighborGridEntity == (void *)0x0) { if (this->_gridPaths[uVar9] < 1000) goto LAB_00822c10; @@ -26205,7 +26205,7 @@ LAB_00822ab9: } if (((((0x1bf < *(uint *)((char *)neighborGridEntity + 0x24)) || (this = local_40, - *(int *)((int)g_game->_room + + *(int *)(GHIDRA_INT(g_game->_room) + *(uint *)((char *)neighborGridEntity + 0x24) * 4 + 0x76c) < 1000)) || (iVar8 == 0xc)) || (iVar8 == 0xe)) && (((iVar8 != 0x11 && (iVar8 != 0x12)) && ((iVar8 != 0x14 && (iVar8 != 0x17)))))) @@ -26245,9 +26245,9 @@ LAB_00822c10: } nextNeighbor = nextNeighbor + 1; local_58 = local_58 + 1; - } while ((int)local_40 < iVar3 + -1); + } while (GHIDRA_INT(local_40) < iVar3 + -1); } - this->_gridPaths[targetGridIndex] = (int)local_50.x; + this->_gridPaths[targetGridIndex] = GHIDRA_INT(local_50.x); return isValid; } } @@ -26310,7 +26310,7 @@ void Room::hold_trigger_output_entities() local_8 = 0xffffffff; puStack_c = &LAB_00b018e0; local_10 = ExceptionList; - securityCookie = __security_cookie ^ (uint)(cellGroup + 0x1d0); + securityCookie = __security_cookie ^ GHIDRA_UINT((cellGroup + 0x1d0)); ExceptionList = &local_10; local_1e0 = this; memset(cellGroup,0xff,0x1c0); @@ -26341,9 +26341,9 @@ void Room::hold_trigger_output_entities() *(undefined1 *)((char *)g_game->_room + 0x11f5) = 0; if ((local_1e0->_entityList)._updateEL._size != 0) { do { - entity = *(Entity **)((int)(local_1e0->_entityList)._updateEL._data + (int)local_1dc * 4); + entity = *(Entity **)(GHIDRA_INT((local_1e0->_entityList)._updateEL._data) + GHIDRA_INT(local_1dc) * 4); gridIdx = entity->_spawnGridIndex; - if ((-1 < gridIdx) && (local_1ec = (int)cellGroup[gridIdx], -1 < local_1ec)) { + if ((-1 < gridIdx) && (local_1ec = GHIDRA_INT(cellGroup[gridIdx]), -1 < local_1ec)) { entityType = entity->_type; gridIdxKey = gridIdx; if ((entityType != 5) || (entity[1]._sprite._championColor._tint[2] != 0.0)) { @@ -26353,7 +26353,7 @@ void Room::hold_trigger_output_entities() } else { descriptor = local_1e0->_descriptor; - puVar2 = (undefined4 *)((int)descriptor + 0x80); + puVar2 = (undefined4 *)(GHIDRA_INT(descriptor) + 0x80); heldIndexSet = puVar2; findResult = (undefined8 *)std::set::find_node(local_20c,&gridIdxKey); insertPos = *findResult; @@ -26375,7 +26375,7 @@ void Room::hold_trigger_output_entities() puVar2[1] = setHead; puVar2[2] = setHead; *(undefined2 *)(puVar2 + 3) = 0; - ((std::_Tree *)(heldIndexSet))->std::_Tree::_Insert_node((void *)insertPos,insertPos._4_4_,puVar2); + ((std::_Tree *)(heldIndexSet))->std::_Tree::_Insert_node((void *)insertPos,(*(undefined4 *)((char *)&(insertPos) + 0x4)),puVar2); } } } @@ -26385,8 +26385,8 @@ void Room::hold_trigger_output_entities() local_1dc = piVar1; } LAB_00822f83: - local_1dc = (int *)((int)local_1dc + 1); - } while (local_1dc < (uint)(local_1e0->_entityList)._updateEL._size); + local_1dc = (int *)(GHIDRA_INT(local_1dc) + 1); + } while (local_1dc < GHIDRA_UINT((local_1e0->_entityList)._updateEL._size)); } } ExceptionList = local_10; @@ -26406,7 +26406,7 @@ Entity * Room::hold_entity_in_spawner(Entity *entity, int group) ((Game *)(g_game))->Game::SpawnEx(1000,0x78,&spawnPos,&g_vectorZero,(Entity *)0x0,entity->_type, entity->_initSeed,0); *(int *)&(spawner->_varData)._l = entity->_variant; - *(int *)((int)&(spawner->_varData)._l + 4) = entity->_subtype; + *(int *)(GHIDRA_INT(&(spawner->_varData)._l) + 4) = entity->_subtype; spawner->_state = group; cVar1 = entity->CanShutDoors(); if ((cVar1 != '\0') && (entity->_type != 0x362)) { @@ -26443,13 +26443,13 @@ void Room::TriggerOutput(uint outputGroupdIdx) i = 0; if ((this->_entityList)._updateEL._size != 0) { do { - entity = *(int **)((int)(this->_entityList)._updateEL._data + i * 4); + entity = *(int **)(GHIDRA_INT((this->_entityList)._updateEL._data) + i * 4); if (((entity[10] == 1000) && (entity[0xb] == 0x78)) && (entity[0x114] == outputGroupdIdx)) { *(undefined1 *)((char *)entity + 0x173) = 1; (**(code **)(*entity + 0xc))(); } i = i + 1; - } while (i < (uint)(this->_entityList)._updateEL._size); + } while (i < GHIDRA_UINT((this->_entityList)._updateEL._size)); } callback = *(undefined4 **)(this->_outputGroupCallbacks + outputGroupdIdx * 0xc); if (callback != *(undefined4 **)(this->_outputGroupCallbacks + outputGroupdIdx * 0xc + 4)) { @@ -26552,7 +26552,7 @@ KColor * Room::GetFloorColorAt(KColor *outColor, Vector *position, float radius) local_14 = 0xffffffff; puStack_18 = &LAB_00b0192d; local_1c = ExceptionList; - uVar4 = __security_cookie ^ (uint)(sampleSet + 0x34); + uVar4 = __security_cookie ^ GHIDRA_UINT((sampleSet + 0x34)); ExceptionList = &local_1c; room = this; sampleRadius = radius; @@ -26582,7 +26582,7 @@ KColor * Room::GetFloorColorAt(KColor *outColor, Vector *position, float radius) outColor->_green = fVar6; outColor->_blue = waterBlend; outColor->_alpha = fVar10; - outColor->_unk = (int)sampledColor[4]; + outColor->_unk = GHIDRA_INT(sampledColor[4]); local_14 = 4; if (((backdropRefCount != (int *)0x0) && (cVar3 = (**(code **)(*backdropRefCount + 0xc))(), cVar3 != '\0')) && @@ -26605,21 +26605,21 @@ KColor * Room::GetFloorColorAt(KColor *outColor, Vector *position, float radius) local_14 = 0; local_30 = 0.0; do { - sampleY = sampleRadius * *(float *)((int)&DAT_00c5d14c + (int)local_30) * 0.65 + local_28; - sampleX = sampleRadius * *(float *)((int)&DAT_00c5d148 + (int)local_30) * 0.65 + screenX; + sampleY = sampleRadius * *(float *)(GHIDRA_INT(&DAT_00c5d14c) + GHIDRA_INT(local_30)) * 0.65 + local_28; + sampleX = sampleRadius * *(float *)(GHIDRA_INT(&DAT_00c5d148) + GHIDRA_INT(local_30)) * 0.65 + screenX; ((shared_ptr *)(&backdrop))->shared_ptr::assign(local_3c); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; samplePixelFn = *(code **)(*backdrop + 0x2c); __ftoui3(); uVar5 = __ftoui3(); (*samplePixelFn)(&sampleColor,uVar5); - local_14._0_1_ = 2; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (((backdropRefCount != (int *)0x0) && (cVar3 = (**(code **)(*backdropRefCount + 0xc))(), cVar3 != '\0')) && (g_renderTargetReleaseFn != (void *)0x0)) { (*g_renderTargetReleaseFn)(); } - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; sampleEntryColor._unk = sampleColor._unk; sampleEntryColor._red = sampleColor._red; sampleEntryColor._green = sampleColor._green; @@ -26629,8 +26629,8 @@ KColor * Room::GetFloorColorAt(KColor *outColor, Vector *position, float radius) ; sampleEntryColor._alpha = sampleColor._alpha; FUN_00828860(sampleSet,&sampleLuminance); - local_30 = (float)((int)local_30 + 8); - } while ((uint)local_30 < 0x28); + local_30 = (float)(GHIDRA_INT(local_30) + 8); + } while (GHIDRA_UINT(local_30) < 0x28); medianSteps = 2; medianNode = (int *)*sampleTreeHead; do { @@ -26756,8 +26756,8 @@ byte Room::is_reachable_from_player(float *param_1, Entity_Player *param_2, char pVVar2 = &local_10; local_10.x = (param_2->_pos).x; } - iVar5 = (int)((pVVar2->x - 40.0) / 40.0 + 0.5); - iVar3 = (int)((pVVar2->y - 120.0) / 40.0 + 0.5); + iVar5 = GHIDRA_INT(((pVVar2->x - 40.0) / 40.0 + 0.5)); + iVar3 = GHIDRA_INT(((pVVar2->y - 120.0) / 40.0 + 0.5)); if ((((iVar5 < 0) || (in_ECX->_gridWidth <= iVar5)) || (iVar3 < 0)) || (in_ECX->_gridHeight <= iVar3)) { goalIndex = 0xffffffff; @@ -26765,13 +26765,13 @@ byte Room::is_reachable_from_player(float *param_1, Entity_Player *param_2, char else { goalIndex = in_ECX->_gridWidth * iVar3 + iVar5; } - iVar3 = (int)((*param_1 - 40.0) / 40.0 + 0.5); + iVar3 = GHIDRA_INT(((*param_1 - 40.0) / 40.0 + 0.5)); if (((-1 < iVar3) && (iVar3 < in_ECX->_gridWidth)) && - ((iVar5 = (int)((param_1[1] - 120.0) / 40.0 + 0.5), -1 < iVar5 && (iVar5 < in_ECX->_gridHeight) + ((iVar5 = GHIDRA_INT(((param_1[1] - 120.0) / 40.0 + 0.5)), -1 < iVar5 && (iVar5 < in_ECX->_gridHeight) ))) { startIndex = in_ECX->_gridWidth * iVar5 + iVar3; uVar4 = GetGridCollision(in_ECX,startIndex); - if (((-1 < (int)startIndex) && (-1 < (int)goalIndex)) && ((uVar4 == 0 || (uVar4 == 5)))) { + if (((-1 < GHIDRA_INT(startIndex)) && (-1 < GHIDRA_INT(goalIndex))) && ((uVar4 == 0 || (uVar4 == 5)))) { bVar1 = is_obstacle_path_valid(in_ECX,startIndex,goalIndex,3); return bVar1; } @@ -26800,8 +26800,8 @@ Vector * Room::find_reachable_position(Vector *outPosition, Vector *position, in stepX = 0; stepY = -1; ringLength = 1; - gridX = (int)((position->x - 40.0) / 40.0 + 0.5); - gridY = (int)((position->y - 120.0) / 40.0 + 0.5); + gridX = GHIDRA_INT(((position->x - 40.0) / 40.0 + 0.5)); + gridY = GHIDRA_INT(((position->y - 120.0) / 40.0 + 0.5)); do { gridIndex = 0; if (0 < ringLength) { @@ -26875,7 +26875,7 @@ void Room::attach_minecarts() Game *game; int gridWidth; - neighborOffsets[8] = __security_cookie ^ (uint)auStack_54; + neighborOffsets[8] = __security_cookie ^ GHIDRA_UINT(auStack_54); entityIndex = 0; self = in_ECX; if (*(int *)(in_ECX + 0x1264) != 0) { @@ -26938,7 +26938,7 @@ void Room::attach_minecarts() if (uVar3 != 0) { if ((railCell & 0xf) == 0) { railDir.y = (float)puVar7; - if ((int)uVar3 < 0) { + if (GHIDRA_INT(uVar3) < 0) { puVar7 = puVar6; } else { @@ -26946,7 +26946,7 @@ void Room::attach_minecarts() } } else { - if (-1 < (int)uVar3) { + if (-1 < GHIDRA_INT(uVar3)) { puVar6 = (undefined1 *)0x3f800000; } railDir.y = (float)puVar6; @@ -26970,9 +26970,9 @@ void Room::attach_minecarts() (this->_targetPosition).x = railX; (this->_targetPosition).y = railY; pvVar2 = game->_room; - iVar5 = (int)(((this->_pos).x - 40.0) / 40.0 + 0.5); + iVar5 = GHIDRA_INT((((this->_pos).x - 40.0) / 40.0 + 0.5)); if (((iVar5 < 0) || (*(int *)((char *)pvVar2 + 0xc) <= iVar5)) || - (((iVar4 = (int)((railY - 120.0) / 40.0 + 0.5), iVar4 < 0 || + (((iVar4 = GHIDRA_INT(((railY - 120.0) / 40.0 + 0.5)), iVar4 < 0 || (((*(int *)((char *)pvVar2 + 0x10) <= iVar4 || (uVar3 = *(int *)((char *)pvVar2 + 0xc) * iVar4 + iVar5, 0x1bf < uVar3)) || (railCell = *(byte *)((char *)pvVar2 + uVar3 + 0x746c), @@ -27061,7 +27061,7 @@ void Room::init_rain() roll = uVar1 % 1000; baseCount = (roll < 300) + 1; if (99 < roll) { - baseCount = (uint)(roll < 300); + baseCount = GHIDRA_UINT((roll < 300)); } spawnersLeft = baseCount + 1; if (0x27 < roll) { @@ -27086,7 +27086,7 @@ void Room::init_rain() uVar1 = uVar1 >> 6 ^ uVar1; fVar2 = (this->_topLeftPos).y + 20.0; fVar2 = (((this->_bottomRightPos).y - 20.0) - fVar2) * - (float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283062e-10 + fVar2; if (uVar1 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -27099,7 +27099,7 @@ void Room::init_rain() uVar1 = uVar1 >> 6 ^ uVar1; fVar3 = (this->_topLeftPos).x + 20.0; fVar3 = (((this->_bottomRightPos).x - 20.0) - fVar3) * - (float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283062e-10 + fVar3; spawnPos.x = fVar3; spawnPos.y = fVar2; @@ -27115,7 +27115,7 @@ void Room::init_rain() uVar1 = uVar1 >> ((byte)rngShiftsAB & 0x1f) ^ uVar1; uVar1 = uVar1 << ((byte)((ulonglong)rngShiftsAB >> 0x20) & 0x1f) ^ uVar1; uVar1 = uVar1 >> 6 ^ uVar1; - fVar4 = (float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) * + fVar4 = (float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283062e-10 * 360.0 * 0.017453292; fVar5 = cos(fVar4); fVar4 = sin(fVar4); @@ -27131,7 +27131,7 @@ void Room::init_rain() rngShiftB = (byte)((ulonglong)rngShiftsAB >> 0x20); uVar1 = uVar1 << (rngShiftB & 0x1f) ^ uVar1; uVar1 = uVar1 >> 6 ^ uVar1; - fVar2 = (float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) * + fVar2 = (float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283062e-10 * 60.0 + 20.0; *(float *)(this->_outputGroupCallbacks + updatesLeft * 0x18 + 0x88) = fVar2 * fVar4; *(float *)(this->_outputGroupCallbacks + updatesLeft * 0x18 + 0x84) = fVar2 * fVar5; @@ -27146,7 +27146,7 @@ void Room::init_rain() uVar1 = uVar1 >> ((byte)rngShiftsAB & 0x1f) ^ uVar1; uVar1 = uVar1 << (rngShiftB & 0x1f) ^ uVar1; uVar1 = uVar1 >> 6 ^ uVar1; - fVar6 = (float)((double)(int)uVar1 + __uint_to_double_fixup[-((int)uVar1 >> 0x1f)]) * + fVar6 = (float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283062e-10 * 60.0 + 20.0; *(float *)(this->_outputGroupCallbacks + updatesLeft * 0x18 + 0x90) = fVar6 * (fVar3 * fVar5 + fVar2 * fVar4); @@ -27192,18 +27192,18 @@ void Room::update_ambient_spawns() return; } fVar2 = GetTimeScale(this,(Vector *)this,(Entity *)0x0); - iVar1 = (int)(1.0 / (fVar2 * this->_rainIntensity)); + iVar1 = GHIDRA_INT((1.0 / (fVar2 * this->_rainIntensity))); if (((iVar1 == 0) || (g_game->_frameCount % iVar1 < 1)) && (iVar1 = 0, 0 < this->_numRainSpawners)) { rainSpawner = (float *)&(*(undefined1 *)((char *)(this) + 0x7408)); do { rngResult = Random(); - fVar2 = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) + fVar2 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14; fVar2 = fVar2 + fVar2; rngResult = Random(); - radiusRoll = (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10; + radiusRoll = (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10; cosOffset = cos(fVar2); cosOffset = cosOffset * radiusRoll; fVar2 = sin(fVar2); @@ -27278,7 +27278,7 @@ LAB_00824ad7: pGVar5 = g_game; if (((bVar2 == 0) || (g_game->_currentDimensionIdx != 1)) && (g_game->_currentDimensionIdx == 0)) { - return (uint)bVar2; + return GHIDRA_UINT(bVar2); } } } @@ -27297,22 +27297,22 @@ LAB_00824b4c: roomBottom = (this->_bottomRightPos).y; spawnTop = (this->_topLeftPos).y - 40.0; roomLeft = (this->_topLeftPos).x; - remainingSpawns = (uint)(framesSinceEnter == 0) * 4 + 1; + remainingSpawns = GHIDRA_UINT((framesSinceEnter == 0)) * 4 + 1; do { uVar3 = Random(); - dVar1 = __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]; + dVar1 = __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]; uVar4 = Random(); spawnPos.x = ((roomRight + 500.0) - roomLeft) * - (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283064e-10 + roomLeft; if (framesSinceEnter != 0) { spawnPos.x = roomRight + 600.0; } spawnPos.y = ((roomBottom + 40.0) - spawnTop) * - (float)((double)(int)uVar3 + dVar1) * 2.3283064e-10 + spawnTop; + (float)((double)GHIDRA_INT(uVar3) + dVar1) * 2.3283064e-10 + spawnTop; uVar3 = Random(); velocity.y = 0.0; - velocity.x = -0.25 - (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) + velocity.x = -0.25 - (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 0.5; uVar3 = Random(); particle = ((Game *)(g_game))->Game::SpawnEx(1000,0x8a,&spawnPos,&velocity,(Entity *)0x0,0,uVar3,0); @@ -27326,7 +27326,7 @@ LAB_00824b4c: } bVar2 = ((ANM2 *)(particleSprite))->ANM2::SetAnimation(s_Idle,1); if (((bVar2 != 0) && ((particle->_sprite)._animState._animData != (void *)0x0)) && - (((AnimationState *)(&(particle->_sprite)._animState))->AnimationState::SetFrameFloat((float)(int)uVar4), + (((AnimationState *)(&(particle->_sprite)._animState))->AnimationState::SetFrameFloat((float)GHIDRA_INT(uVar4)), (particle->_sprite)._animState._animData != (void *)0x0)) { (particle->_sprite)._animState._isPlaying = 0; } @@ -27377,7 +27377,7 @@ LAB_00824b4c: } uVar3 = Random(); particleColor._tint[3] = - (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * 2.3283064e-10 + (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 0.3 + 0.7; layer = ((ANM2 *)(particleSprite))->ANM2::GetLayer((byte *)0x0); if (&layer->_color != &particleColor) { @@ -27431,7 +27431,7 @@ void Room::update_water_current() entityIndex = 0; if ((this->_entityList)._updateEL._size != 0) { do { - pEVar4 = *(Entity **)((int)(this->_entityList)._updateEL._data + entityIndex * 4); + pEVar4 = *(Entity **)(GHIDRA_INT((this->_entityList)._updateEL._data) + entityIndex * 4); framesInRoom = pEVar4->_type; if (framesInRoom == 5) { if (pEVar4->_entityCollisionClass != 0) { @@ -27451,12 +27451,12 @@ LAB_00824f78: fVar9 = (pEVar4->_pos).x; fVar11 = (pEVar4->_pos).y; uVar2 = Random(); - fVar6 = (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)] + fVar6 = (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)] ) * 2.3283064e-10 * 3.14; fVar6 = fVar6 + fVar6; fVar10 = pEVar4->_size; uVar2 = Random(); - fVar7 = (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)] + fVar7 = (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)] ) * 2.3283064e-10; fVar8 = cos(fVar6); local_38.x = fVar8 * fVar10 * fVar7 + fVar9; @@ -27464,14 +27464,14 @@ LAB_00824f78: local_38.y = fVar9 * fVar10 * fVar7 + fVar11; uVar2 = Random(); rngValue = Random(); - fVar10 = (float)((double)(int)rngValue + - __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * 2.3283064e-10 + fVar10 = (float)((double)GHIDRA_INT(rngValue) + + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 6.0 + 4.0; fVar9 = (this->_waterCurrent).x; fVar11 = (this->_waterCurrent).y; rngValue = Random(); - fVar6 = (float)((double)(int)rngValue + - __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * 2.3283064e-10 * + fVar6 = (float)((double)GHIDRA_INT(rngValue) + + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 3.14; fVar6 = fVar6 + fVar6; local_30.x = cos(fVar6); @@ -27488,7 +27488,7 @@ LAB_00824f78: else if (((framesInRoom == 1) || (framesInRoom - 10U < 0x3de)) || (framesInRoom == 4)) goto LAB_00824f78; entityIndex = entityIndex + 1; - } while (entityIndex < (uint)(this->_entityList)._updateEL._size); + } while (entityIndex < GHIDRA_UINT((this->_entityList)._updateEL._size)); } if ((*(char *)this != '\0') && (framesInRoom = g_game->_frameCount - this->_enterFrame, @@ -27500,7 +27500,7 @@ LAB_00824f78: if (0 < framesInRoom) { local_40 = this->_gridEntities; do { - if ((*local_40 != (void *)0x0) && (*(int *)((int)*local_40 + 4) == 0xf)) { + if ((*local_40 != (void *)0x0) && (*(int *)(GHIDRA_INT(*local_40) + 4) == 0xf)) { fVar6 = (float)(gridIndex % this->_gridWidth) * 40.0 + 40.0 + fVar9; fVar10 = (float)(gridIndex / this->_gridWidth) * 40.0 + 120.0 + fVar11; gridPos.x = fVar6; @@ -27509,8 +27509,8 @@ LAB_00824f78: GetClampedPositionImpl(this,&clampedPos,&gridPos,0.0,0.0,0.0,0.0); if ((clampedPos.x == fVar6) && (clampedPos.y == fVar10)) { LAB_0082540c: - iVar5 = (int)((fVar6 - 40.0) / 40.0 + 0.5); - iVar3 = (int)((fVar10 - 120.0) / 40.0 + 0.5); + iVar5 = GHIDRA_INT(((fVar6 - 40.0) / 40.0 + 0.5)); + iVar3 = GHIDRA_INT(((fVar10 - 120.0) / 40.0 + 0.5)); if (((iVar5 < 0) || ((this->_gridWidth <= iVar5 || (iVar3 < 0)))) || (this->_gridHeight <= iVar3)) { iVar5 = -1; @@ -27519,19 +27519,19 @@ LAB_0082540c: iVar5 = iVar3 * this->_gridWidth + iVar5; } uVar2 = GetGridCollision(this,iVar5); - if ((int)uVar2 < 2) { + if (GHIDRA_INT(uVar2) < 2) { uVar2 = Random(); for (iVar3 = uVar2 % 3 + 2; iVar3 != 0; iVar3 = iVar3 + -1) { uVar2 = Random(); rngValue = Random(); - fVar8 = (float)((double)(int)rngValue + - __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * 2.3283064e-10 + fVar8 = (float)((double)GHIDRA_INT(rngValue) + + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 6.0 + 4.0; fVar7 = (this->_waterCurrent).x; local_30.x = (this->_waterCurrent).y; rngValue = Random(); - local_38.x = (float)((double)(int)rngValue + - __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + local_38.x = (float)((double)GHIDRA_INT(rngValue) + + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_38.x = local_38.x + local_38.x; splashVelocity.x = cos(local_38.x); @@ -27539,14 +27539,14 @@ LAB_0082540c: splashVelocity.y = sin(local_38.x); splashVelocity.y = splashVelocity.y + local_30.x * fVar8; rngValue = Random(); - local_30.x = (float)((double)(int)rngValue + - __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + local_30.x = (float)((double)GHIDRA_INT(rngValue) + + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 - 0.5; local_38.x = (this->_waterCurrent).x; fVar7 = (this->_waterCurrent).y; rngValue = Random(); - fVar8 = (float)((double)(int)rngValue + - __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * 2.3283064e-10 + fVar8 = (float)((double)GHIDRA_INT(rngValue) + + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 ; splashPos.x = local_30.x * fVar11 + (fVar6 - fVar9 * 0.54) + local_38.x * 3.0 * fVar8; @@ -27584,7 +27584,7 @@ byte Room::CanPickupGridEntity(int GridIndex) void *gridEntity; int gridType; - if (0x1bf < (uint)GridIndex) { + if (0x1bf < GHIDRA_UINT(GridIndex)) { return 0; } gridEntity = this->_gridEntities[GridIndex]; @@ -27652,7 +27652,7 @@ byte Room::spawn_grid_from_desc(uint gridIndex, GridEntityDesc *outDesc, ANM2 *o int *eternalFly; undefined4 *oldGrid; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b01993; local_1c = ExceptionList; @@ -27675,7 +27675,7 @@ byte Room::spawn_grid_from_desc(uint gridIndex, GridEntityDesc *outDesc, ANM2 *o ExceptionList = &local_1c; ((GridEntity_Rock *)((GridEntity_Rock *)pGVar7))->GridEntity_Rock::TrySpawnWorms(); uVar9 = (pGVar7->_desc)._variant; - if ((999 < uVar9) && (-1 < (int)(uVar9 - 1000))) { + if ((999 < uVar9) && (-1 < GHIDRA_INT((uVar9 - 1000)))) { ((GridEntity_Rock *)((GridEntity_Rock *)pGVar7))->GridEntity_Rock::UpdateNeighbors(); in_stack_ffffffa4 = 0x82588a; ((GridEntity_Rock *)((GridEntity_Rock *)pGVar7))->GridEntity_Rock::SetBigRockFrame(); @@ -27688,8 +27688,8 @@ byte Room::spawn_grid_from_desc(uint gridIndex, GridEntityDesc *outDesc, ANM2 *o else { ppvVar5 = &local_1c; if (iVar8 == 0xc) { - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); - if (3 < (uint)(pGVar7->_desc)._state) { + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); + if (3 < GHIDRA_UINT((pGVar7->_desc)._state)) { return 0; } } @@ -27697,7 +27697,7 @@ byte Room::spawn_grid_from_desc(uint gridIndex, GridEntityDesc *outDesc, ANM2 *o if (iVar8 != 0xe) { return 0; } - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); if ((pGVar7->_desc)._state == 1000) { return 0; } @@ -27705,7 +27705,7 @@ byte Room::spawn_grid_from_desc(uint gridIndex, GridEntityDesc *outDesc, ANM2 *o } ExceptionList = ppvVar5; if (outSprite != (ANM2 *)0x0) { - ((ANM2 *)((ANM2 *)((int)register0x00000010 + -0x168)))->ANM2::ANM2(&pGVar7->_sprite); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(register0x00000010) + -0x168)))->ANM2::ANM2(&pGVar7->_sprite); other._championColor._offset[1] = in_stack_ffffff90; other._filename._buf[0] = in_stack_fffffe98[0]; other._filename._buf[1] = in_stack_fffffe98[1]; @@ -27723,8 +27723,8 @@ byte Room::spawn_grid_from_desc(uint gridIndex, GridEntityDesc *outDesc, ANM2 *o other._filename._buf[0xd] = in_stack_fffffe98[0xd]; other._filename._buf[0xe] = in_stack_fffffe98[0xe]; other._filename._buf[0xf] = in_stack_fffffe98[0xf]; - other._filename._size = in_stack_fffffe98._16_4_; - other._filename._capacity = in_stack_fffffe98._20_4_; + other._filename._size = (*(undefined4 *)((char *)&(in_stack_fffffe98) + 0x10)); + other._filename._capacity = (*(undefined4 *)((char *)&(in_stack_fffffe98) + 0x14)); other._animDefaultName._buf[0] = in_stack_fffffe98[0x18]; other._animDefaultName._buf[1] = in_stack_fffffe98[0x19]; other._animDefaultName._buf[2] = in_stack_fffffe98[0x1a]; @@ -27741,69 +27741,69 @@ byte Room::spawn_grid_from_desc(uint gridIndex, GridEntityDesc *outDesc, ANM2 *o other._animDefaultName._buf[0xd] = in_stack_fffffe98[0x25]; other._animDefaultName._buf[0xe] = in_stack_fffffe98[0x26]; other._animDefaultName._buf[0xf] = in_stack_fffffe98[0x27]; - other._animDefaultName._size = in_stack_fffffe98._40_4_; - other._animDefaultName._capacity = in_stack_fffffe98._44_4_; - other._animState._animation = (void *)in_stack_fffffe98._48_4_; - other._animState._animData = (void *)in_stack_fffffe98._52_4_; - other._animState._layerFrames = (void *)in_stack_fffffe98._56_4_; - other._animState._nullLayerFrames = (void *)in_stack_fffffe98._60_4_; - other._animState._animFrame = (float)in_stack_fffffe98._64_4_; + other._animDefaultName._size = (*(undefined4 *)((char *)&(in_stack_fffffe98) + 0x28)); + other._animDefaultName._capacity = (*(undefined4 *)((char *)&(in_stack_fffffe98) + 0x2c)); + other._animState._animation = (*(undefined4 *)((char *)&((void *)in_stack_fffffe98) + 0x30)); + other._animState._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffe98) + 0x34)); + other._animState._layerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffe98) + 0x38)); + other._animState._nullLayerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffe98) + 0x3c)); + other._animState._animFrame = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0x40)); other._animState._isPlaying = in_stack_fffffe98[0x44]; - other._animState._21_3_ = in_stack_fffffe98._69_3_; - other._animState._currentlyTriggeredEvents = in_stack_fffffe98._72_4_; - other._animState._previouslyTriggeredEvents = in_stack_fffffe98._76_4_; - other._overlayAnimState._animation = (void *)in_stack_fffffe98._80_4_; - other._overlayAnimState._animData = (void *)in_stack_fffffe98._84_4_; - other._overlayAnimState._layerFrames = (void *)in_stack_fffffe98._88_4_; - other._overlayAnimState._nullLayerFrames = (void *)in_stack_fffffe98._92_4_; - other._overlayAnimState._animFrame = (float)in_stack_fffffe98._96_4_; + (*(undefined1 *)((char *)&(other._animState) + 0x15)) = (*(undefined1 *)((char *)&(in_stack_fffffe98) + 0x45)); + other._animState._currentlyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffe98) + 0x48)); + other._animState._previouslyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffe98) + 0x4c)); + other._overlayAnimState._animation = (*(undefined4 *)((char *)&((void *)in_stack_fffffe98) + 0x50)); + other._overlayAnimState._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffe98) + 0x54)); + other._overlayAnimState._layerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffe98) + 0x58)); + other._overlayAnimState._nullLayerFrames = (*(undefined4 *)((char *)&((void *)in_stack_fffffe98) + 0x5c)); + other._overlayAnimState._animFrame = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0x60)); other._overlayAnimState._isPlaying = in_stack_fffffe98[100]; - other._overlayAnimState._21_3_ = in_stack_fffffe98._101_3_; - other._overlayAnimState._currentlyTriggeredEvents = in_stack_fffffe98._104_4_; - other._overlayAnimState._previouslyTriggeredEvents = in_stack_fffffe98._108_4_; + (*(undefined1 *)((char *)&(other._overlayAnimState) + 0x15)) = (*(undefined1 *)((char *)&(in_stack_fffffe98) + 0x65)); + other._overlayAnimState._currentlyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffe98) + 0x68)); + other._overlayAnimState._previouslyTriggeredEvents = (*(undefined4 *)((char *)&(in_stack_fffffe98) + 0x6c)); other._overlayRenderFirst = in_stack_fffffe98[0x70]; - other._113_3_ = in_stack_fffffe98._113_3_; - other._animData = (void *)in_stack_fffffe98._116_4_; - other._animCount = in_stack_fffffe98._120_4_; - other._layerState = (void *)in_stack_fffffe98._124_4_; - other._layerCount = in_stack_fffffe98._128_4_; - other._nullLayerNames = (void *)in_stack_fffffe98._132_4_; - other._numNullLayers = in_stack_fffffe98._136_4_; - other._eventNames = (void *)in_stack_fffffe98._140_4_; - other._numEvents = in_stack_fffffe98._144_4_; - other._offset.x = (float)in_stack_fffffe98._148_4_; - other._offset.y = (float)in_stack_fffffe98._152_4_; - other._scale.x = (float)in_stack_fffffe98._156_4_; - other._scale.y = (float)in_stack_fffffe98._160_4_; - other._rotation = (float)in_stack_fffffe98._164_4_; - other._color._tint[0] = (float)in_stack_fffffe98._168_4_; - other._color._tint[1] = (float)in_stack_fffffe98._172_4_; - other._color._tint[2] = (float)in_stack_fffffe98._176_4_; - other._color._tint[3] = (float)in_stack_fffffe98._180_4_; - other._color._colorize[0] = (float)in_stack_fffffe98._184_4_; - other._color._colorize[1] = (float)in_stack_fffffe98._188_4_; - other._color._colorize[2] = (float)in_stack_fffffe98._192_4_; - other._color._colorize[3] = (float)in_stack_fffffe98._196_4_; - other._color._offset[0] = (float)in_stack_fffffe98._200_4_; - other._color._offset[1] = (float)in_stack_fffffe98._204_4_; - other._color._offset[2] = (float)in_stack_fffffe98._208_4_; - other._championColor._tint[0] = (float)in_stack_fffffe98._212_4_; - other._championColor._tint[1] = (float)in_stack_fffffe98._216_4_; - other._championColor._tint[2] = (float)in_stack_fffffe98._220_4_; - other._championColor._tint[3] = (float)in_stack_fffffe98._224_4_; - other._championColor._colorize[0] = (float)in_stack_fffffe98._228_4_; - other._championColor._colorize[1] = (float)in_stack_fffffe98._232_4_; - other._championColor._colorize[2] = (float)in_stack_fffffe98._236_4_; - other._championColor._colorize[3] = (float)in_stack_fffffe98._240_4_; - other._championColor._offset[0] = (float)in_stack_fffffe98._244_4_; + (*(undefined1 *)((char *)&(other) + 0x71)) = (*(undefined1 *)((char *)&(in_stack_fffffe98) + 0x71)); + other._animData = (*(undefined4 *)((char *)&((void *)in_stack_fffffe98) + 0x74)); + other._animCount = (*(undefined4 *)((char *)&(in_stack_fffffe98) + 0x78)); + other._layerState = (*(undefined4 *)((char *)&((void *)in_stack_fffffe98) + 0x7c)); + other._layerCount = (*(undefined4 *)((char *)&(in_stack_fffffe98) + 0x80)); + other._nullLayerNames = (*(undefined4 *)((char *)&((void *)in_stack_fffffe98) + 0x84)); + other._numNullLayers = (*(undefined4 *)((char *)&(in_stack_fffffe98) + 0x88)); + other._eventNames = (*(undefined4 *)((char *)&((void *)in_stack_fffffe98) + 0x8c)); + other._numEvents = (*(undefined4 *)((char *)&(in_stack_fffffe98) + 0x90)); + other._offset.x = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0x94)); + other._offset.y = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0x98)); + other._scale.x = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0x9c)); + other._scale.y = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xa0)); + other._rotation = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xa4)); + other._color._tint[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xa8)); + other._color._tint[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xac)); + other._color._tint[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xb0)); + other._color._tint[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xb4)); + other._color._colorize[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xb8)); + other._color._colorize[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xbc)); + other._color._colorize[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xc0)); + other._color._colorize[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xc4)); + other._color._offset[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xc8)); + other._color._offset[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xcc)); + other._color._offset[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xd0)); + other._championColor._tint[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xd4)); + other._championColor._tint[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xd8)); + other._championColor._tint[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xdc)); + other._championColor._tint[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xe0)); + other._championColor._colorize[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xe4)); + other._championColor._colorize[1] = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xe8)); + other._championColor._colorize[2] = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xec)); + other._championColor._colorize[3] = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xf0)); + other._championColor._offset[0] = (*(undefined4 *)((char *)&((float)in_stack_fffffe98) + 0xf4)); other._championColor._offset[2] = in_stack_ffffff94; other._flipX = (byte)in_stack_ffffff98; other._flipY = SUB41(in_stack_ffffff98,1); - other._258_2_ = SUB42(in_stack_ffffff98,2); + (*(undefined2 *)((char *)&(other) + 0x102)) = SUB42(in_stack_ffffff98,2); other._playbackSpeed = in_stack_ffffff9c; - other._264_1_ = (char)in_stack_ffffffa0; + (*(undefined1 *)((char *)&(other) + 0x108)) = (char)in_stack_ffffffa0; other._loaded = SUB41(in_stack_ffffffa0,1); - other._266_2_ = SUB42(in_stack_ffffffa0,2); + (*(undefined2 *)((char *)&(other) + 0x10a)) = SUB42(in_stack_ffffffa0,2); other._shadowLayerIndex = in_stack_ffffffa4; other._bitflags = in_stack_ffffffa8; ((ANM2 *)(outSprite))->ANM2::operator_assign(other); @@ -27845,7 +27845,7 @@ byte Room::spawn_grid_from_desc(uint gridIndex, GridEntityDesc *outDesc, ANM2 *o room->_gridEntities[uVar9] = (void *)0x0; (**(code **)*oldGrid)(); } - if (((int)uVar9 < 0) || (0x1bf < (int)uVar9)) { + if ((GHIDRA_INT(uVar9) < 0) || (0x1bf < GHIDRA_INT(uVar9))) { KAGE_LogMessage(0x10,(byte *)"SpawnGridEntity: Grid index invalid\n"); } if ((0x1bf < uVar9) || (900 < room->_gridPaths[uVar9])) { @@ -27888,16 +27888,16 @@ LAB_00825a05: spawnSeed = (pGVar7->_desc)._spawnSeed; local_30 = gigaGridIndex; if ((gigaGridIndex < (GridEntity_Poop *)0x1c0) && - (oldGrid = pRVar6->_gridEntities[(int)gigaGridIndex], oldGrid != (undefined4 *)0x0)) { - pRVar6->_gridPaths[(int)gigaGridIndex] = 0; - pRVar6->_gridEntities[(int)gigaGridIndex] = (void *)0x0; + (oldGrid = pRVar6->_gridEntities[GHIDRA_INT(gigaGridIndex)], oldGrid != (undefined4 *)0x0)) { + pRVar6->_gridPaths[GHIDRA_INT(gigaGridIndex)] = 0; + pRVar6->_gridEntities[GHIDRA_INT(gigaGridIndex)] = (void *)0x0; (**(code **)*oldGrid)(); } - if (((int)gigaGridIndex < 0) || (0x1bf < (int)gigaGridIndex)) { + if ((GHIDRA_INT(gigaGridIndex) < 0) || (0x1bf < GHIDRA_INT(gigaGridIndex))) { KAGE_LogMessage(0x10,(byte *)"SpawnGridEntity: Grid index invalid\n"); } pRVar6 = room; - if (((GridEntity_Poop *)0x1bf < gigaGridIndex) || (900 < room->_gridPaths[(int)local_30])) + if (((GridEntity_Poop *)0x1bf < gigaGridIndex) || (900 < room->_gridPaths[GHIDRA_INT(local_30)])) goto LAB_00825b02; decoration = operator_new(0x154); local_14 = 0x17; @@ -27914,11 +27914,11 @@ LAB_00825a05: local_14 = 0xffffffff; if (decoration == (GridEntity *)0x0) goto LAB_00825b02; (decoration->_desc)._type = 1; - decoration->_gridIndex = (int)local_30; - if (room->_gridEntities[(int)local_30] != (undefined4 *)0x0) { - (*(code *)**(undefined4 **)room->_gridEntities[(int)local_30])(); + decoration->_gridIndex = GHIDRA_INT(local_30); + if (room->_gridEntities[GHIDRA_INT(local_30)] != (undefined4 *)0x0) { + (*(code *)**(undefined4 **)room->_gridEntities[GHIDRA_INT(local_30)])(); } - pRVar4->_gridEntities[(int)pGVar7] = decoration; + pRVar4->_gridEntities[GHIDRA_INT(pGVar7)] = decoration; (decoration->_desc)._variant = 1000; (decoration->_desc)._varData = 0; ((GridEntity *)(decoration))->GridEntity::Init(spawnSeed); @@ -27975,7 +27975,7 @@ LAB_00825b02: listData = flies._data; } uVar9 = uVar9 + 1; - } while (uVar9 < (uint)flies._size); + } while (uVar9 < GHIDRA_UINT(flies._size)); } ((EntityList_Query *)(&flies))->EntityList_Query::~EntityList_Query(); ExceptionList = local_1c; @@ -28000,7 +28000,7 @@ Entity_Effect * Room::PickupGridEntity(int GridIndex) local_14 = 0xffffffff; puStack_18 = &LAB_00b019c0; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)((&gridSprite)[1]._animDefaultName._buf + 4); + local_24 = __security_cookie ^ GHIDRA_UINT(((&gridSprite)[1]._animDefaultName._buf + 4)); ExceptionList = &local_1c; gridDesc._type = 0; gridDesc._variant = 0; @@ -28008,7 +28008,7 @@ Entity_Effect * Room::PickupGridEntity(int GridIndex) gridDesc._spawnCount = 0; gridDesc._spawnSeed = 0x16a9de81; gridDesc._varData = 0; - gridDesc._24_4_ = gridDesc._24_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(gridDesc) + 0x18)) = (*(undefined4 *)((char *)&(gridDesc) + 0x18)) & 0xffffff00; gridDesc._variableSeed = 0x16a9de81; ((ANM2 *)(&gridSprite))->ANM2::constructor(); local_14 = 0; @@ -28022,13 +28022,13 @@ Entity_Effect * Room::PickupGridEntity(int GridIndex) ((Game *)(g_game))->Game::Spawn(1000,0x88,&g_vectorZero,&g_vectorZero,(Entity *)0x0,0,seed); Isaac::SwapANM2(&gridSprite,&pickupEffect->_sprite); *(int *)&(pickupEffect->_varData)._l = gridDesc._type; - *(int *)((int)&(pickupEffect->_varData)._l + 4) = gridDesc._variant; + *(int *)(GHIDRA_INT(&(pickupEffect->_varData)._l) + 4) = gridDesc._variant; *(int *)&(pickupEffect->_varData)._h = gridDesc._state; - *(int *)((int)&(pickupEffect->_varData)._h + 4) = gridDesc._spawnCount; + *(int *)(GHIDRA_INT(&(pickupEffect->_varData)._h) + 4) = gridDesc._spawnCount; *(int *)&(*(undefined1 *)((char *)(pickupEffect) + 0x430)) = gridDesc._spawnSeed; *(int *)&(*(undefined1 *)((char *)(pickupEffect) + 0x434)) = gridDesc._varData; (*(undefined1 *)((char *)(pickupEffect) + 0x438)) = gridDesc._initialized; - *(undefined3 *)&(*(undefined1 *)((char *)(pickupEffect) + 0x439)) = gridDesc._25_3_; + *(undefined3 *)&(*(undefined1 *)((char *)(pickupEffect) + 0x439)) = (*(undefined1 *)((char *)&(gridDesc) + 0x19)); *(int *)&(*(undefined1 *)((char *)(pickupEffect) + 0x43c)) = gridDesc._variableSeed; pickupEffect->_state = this->_backdropType; } @@ -28116,7 +28116,7 @@ void Room::render_darkness_overlay() Game *game; Room *room; - local_14 = (float)(__security_cookie ^ (uint)((&local_40)[1]._tint + 1)); + local_14 = (float)(__security_cookie ^ GHIDRA_UINT(((&local_40)[1]._tint + 1))); local_4c = this; isOverlayEnabled = FUN_008242f0(); if (isOverlayEnabled != '\0') { @@ -28145,10 +28145,10 @@ void Room::render_darkness_overlay() bVar2 = ((Game *)(g_game))->Game::IsPaused(); if (bVar2 == 0) { uVar4 = g_manager->_framecount + 1U & 0x80000001; - if ((int)uVar4 < 0) { + if (GHIDRA_INT(uVar4) < 0) { uVar4 = (uVar4 - 1 | 0xfffffffe) + 1; } - local_54 = (float)(int)uVar4 * 0.5; + local_54 = (float)GHIDRA_INT(uVar4) * 0.5; } else { local_54 = 0.0; @@ -28170,7 +28170,7 @@ void Room::render_darkness_overlay() __uint_to_double_fixup[-(*(int *)((char *)DAT_00c79824 + 0x14) >> 0x1f)]); local_a4.x = -((local_4c->_renderScrollOffset).x + (g_game->_screenShakeOffset).x); local_a4.y = -((local_4c->_renderScrollOffset).y + (g_game->_screenShakeOffset).y); - quad_set_rect(local_40._tint + 2,&local_a4,&local_9c,(int)DAT_00c79824); + quad_set_rect(local_40._tint + 2,&local_a4,&local_9c,GHIDRA_INT(DAT_00c79824)); local_48 = 4.2039e-45; fVar9 = 8.40779e-45; do { @@ -28183,16 +28183,16 @@ void Room::render_darkness_overlay() (*pcVar1)(); return; } - bVar2 = local_68._blue._0_1_; + bVar2 = (*(undefined1 *)((char *)&(local_68._blue) + 0x0)); uVar4 = uVar4 >> (bVar2 & 0x1f) ^ uVar4; - rngShift2 = local_68._alpha._0_1_; + rngShift2 = (*(undefined1 *)((char *)&(local_68._alpha) + 0x0)); uVar4 = uVar4 << (rngShift2 & 0x1f) ^ uVar4; uVar4 = uVar4 >> (SUB41(fVar9,0) & 0x1f) ^ uVar4; if (local_44 == (undefined4 *)0x0) { uVar7 = 0; } else { - uVar7 = uVar4 % (uint)local_44; + uVar7 = uVar4 % GHIDRA_UINT(local_44); } if (uVar4 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -28204,11 +28204,11 @@ void Room::render_darkness_overlay() uVar4 = uVar4 << (rngShift2 & 0x1f) ^ uVar4; rngShift3 = SUB41(local_50,0); uVar4 = uVar4 >> (rngShift3 & 0x1f) ^ uVar4; - fVar9 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + fVar9 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283062e-10; local_44 = (undefined4 *) (((fVar9 + fVar9) - 1.0) * local_54 + - (float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)])); + (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)])); if (uVar4 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); pcVar1 = (code *)swi(3); @@ -28220,7 +28220,7 @@ void Room::render_darkness_overlay() uVar4 = uVar4 >> (rngShift3 & 0x1f) ^ uVar4; uVar7 = 0; if (DAT_00c7983c[4] != 0) { - uVar7 = uVar4 % (uint)DAT_00c7983c[4]; + uVar7 = uVar4 % GHIDRA_UINT(DAT_00c7983c[4]); } if (uVar4 == 0) { KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"); @@ -28231,9 +28231,9 @@ void Room::render_darkness_overlay() uVar4 = uVar4 >> (bVar2 & 0x1f) ^ uVar4; uVar4 = uVar4 << (rngShift2 & 0x1f) ^ uVar4; uVar4 = uVar4 >> (rngShift3 & 0x1f) ^ uVar4; - fStack_7c = ((float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + fStack_7c = ((float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283062e-10 * 3.0 + 1.0) * local_54 + - (float)((double)(int)uVar7 + __uint_to_double_fixup[-((int)uVar7 >> 0x1f)]); + (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]); local_94 = fStack_7c + local_40._tint[2]; fStack_90 = (float)local_44 + local_40._tint[3]; fStack_8c = fStack_7c + local_40._colorize[0]; @@ -28258,7 +28258,7 @@ void Room::render_darkness_overlay() local_d0 = 0; local_e4 = 0; local_f8 = 0; - fStack_fc = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + fStack_fc = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283062e-10 * 4.0 + 2.0; local_cc = 0x3f800000; uStack_c8 = 0x3f800000; @@ -28277,7 +28277,7 @@ void Room::render_darkness_overlay() fStack_c0 = fStack_fc; quadColor._alpha = fStack_fc; (**(code **)(*DAT_00c7983c + 0x14))(&local_94); - local_48 = (float)((int)local_48 + -1); + local_48 = (float)(GHIDRA_INT(local_48) + -1); fVar9 = fVar11; } while (local_48 != 0.0); _glfw_context_reset(); @@ -28394,7 +28394,7 @@ void Room::render_darkness_overlay() fStack_8c = 1.0; fStack_78 = 1.0; fStack_80 = 1.0; - local_74 = (float)((uint)local_74 & 0xffffff00); + local_74 = (float)(GHIDRA_UINT(local_74) & 0xffffff00); pvVar5 = kage_graphics_flush((void *)0x0); render_quad_draw(pvVar5,&local_94,screenQuad,1,unused); FUN_00a14200(); @@ -28419,12 +28419,12 @@ void Room::render_darkness_overlay() (*pcVar1)(); return; } - uVar4 = uVar4 >> (local_68._blue._0_1_ & 0x1f) ^ uVar4; - uVar4 = uVar4 << (local_68._alpha._0_1_ & 0x1f) ^ uVar4; + uVar4 = uVar4 >> ((*(undefined1 *)((char *)&(local_68._blue) + 0x0)) & 0x1f) ^ uVar4; + uVar4 = uVar4 << ((*(undefined1 *)((char *)&(local_68._alpha) + 0x0)) & 0x1f) ^ uVar4; uVar4 = uVar4 >> (rngShift3 & 0x1f) ^ uVar4; uVar7 = g_game->_debugCurses; curses = g_game->_curses; - fVar9 = (float)((double)(int)uVar4 + __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]) * + fVar9 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) * 2.3283062e-10 * 9.0 + 0.1; uVar4 = Seeds::GetForcedCurses(); preventedCurses = Seeds::GetPreventedCurses(); @@ -28439,12 +28439,12 @@ void Room::render_darkness_overlay() local_68._red = 1.0; local_68._green = 0.9 - fVar11 * 0.19999999; auVar10 = ZEXT812(0x3d4ccccd); - fVar8 = fVar9 * auVar10._0_4_; - if (fVar8 <= auVar10._0_4_) { - auVar10._4_8_ = auVar10._4_8_; - auVar10._0_4_ = fVar8; + fVar8 = fVar9 * (*(undefined4 *)((char *)&(auVar10) + 0x0)); + if (fVar8 <= (*(undefined4 *)((char *)&(auVar10) + 0x0))) { + (*(undefined8 *)((char *)&(auVar10) + 0x4)) = (*(undefined8 *)((char *)&(auVar10) + 0x4)); + (*(undefined4 *)((char *)&(auVar10) + 0x0)) = fVar8; } - local_68._alpha = (auVar10._0_4_ - fVar9) * fVar11 + fVar9; + local_68._alpha = ((*(undefined4 *)((char *)&(auVar10) + 0x0)) - fVar9) * fVar11 + fVar9; local_68._blue = 0.8 - fVar11 * 0.15000004; if ((local_4c->_descriptor == (void *)0x0) || (iVar3 = *(int *)((char *)local_4c->_descriptor + 0x10), iVar3 == 0)) { @@ -28457,7 +28457,7 @@ void Room::render_darkness_overlay() do { iVar3 = (&DAT_00b6c9b0)[uVar4 * 2]; if (((-1 < iVar3) && (iVar6 = (&DAT_00b6c9b4)[uVar4 * 2], -1 < iVar6)) && - ((local_48 = (float)room->_gridWidth, iVar3 < (int)local_48 && + ((local_48 = (float)room->_gridWidth, iVar3 < GHIDRA_INT(local_48) && (iVar6 < room->_gridHeight)))) { if (uVar4 == 0) { isLightSkipped = local_4c == (Room *)&DAT_00000009; @@ -28468,9 +28468,9 @@ LAB_0082681a: isLightSkipped = local_4c == (Room *)0xa; goto LAB_0082681a; } - iVar3 = iVar6 * (int)local_48 + iVar3; - iVar6 = iVar3 % (int)local_48; - local_54 = (float)(iVar3 / (int)local_48) * 40.0 + 120.0; + iVar3 = iVar6 * GHIDRA_INT(local_48) + iVar3; + iVar6 = iVar3 % GHIDRA_INT(local_48); + local_54 = (float)(iVar3 / GHIDRA_INT(local_48)) * 40.0 + 120.0; local_48 = g_displayPixelRatio * g_screenPointScale; local_44 = (undefined4 *) (((g_screenWidth - 338.0) * 0.5 + (((float)iVar6 * 40.0 + 40.0) - 60.0) * 0.65) @@ -28755,7 +28755,7 @@ void Room::render_water_overlay(Vector *offset) uint local_c; code *renderFn; - local_c = __security_cookie ^ (uint)&roomSize; + local_c = __security_cookie ^ GHIDRA_UINT(&roomSize); roomSize.x = *(float *)&(*(undefined1 *)((char *)(this) + 0x6ae8)) - *(float *)&(*(undefined1 *)((char *)(this) + 0x6ae0)); roomSize.y = *(float *)&(*(undefined1 *)((char *)(this) + 0x6aec)) - *(float *)&(*(undefined1 *)((char *)(this) + 0x6ae4)); puVar1 = &g_shaders; @@ -28797,7 +28797,7 @@ void Room::render_water_overlay(Vector *offset) local_38._tint[3] = 52.0; local_38._tint[0] = 52.0; local_38._tint[1] = 52.0; - local_38._offset[0] = (float)CONCAT31(local_38._offset[0]._1_3_,1); + local_38._offset[0] = (float)CONCAT31((*(undefined1 *)((char *)&(local_38._offset[0]) + 0x1)),1); local_38._colorize[2] = local_38._tint[2]; local_38._colorize[3] = local_38._colorize[1]; (*renderFn)(&local_38); @@ -28831,13 +28831,13 @@ void Room::UpdateRedKey() void *playerListEnd; int pocketCardId; - local_c = __security_cookie ^ (uint)&local_34; + local_c = __security_cookie ^ GHIDRA_UINT(&local_34); local_34 = (EntityPtr)0x0; isHasRedKey = false; game = g_game; room = this; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 == 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 == 0) { LAB_0082731a: pRVar4 = room; redKeyOwner = PlayerManager::FirstCollectibleOwner @@ -28852,7 +28852,7 @@ LAB_0082731a: std::multiset::erase(&local_34); *(int *)outlineSlot = 0; } - outlineSlot = (EntityPtr)((int)outlineSlot + 4); + outlineSlot = (EntityPtr)(GHIDRA_INT(outlineSlot) + 4); iVar5 = iVar5 + -1; } while (iVar5 != 0); return; @@ -28877,18 +28877,18 @@ LAB_0082731a: ((Level *)g_game,*(int *)((char *)pRVar4->_descriptor + 4),uVar1), isCanSpawnOutline != 0)) { local_34 = (EntityPtr)Random(); - spawnPos.x = (float)((int)doorOutlineSlot[-0x1c00] % room->_gridWidth) * 40.0 + 40.0; - spawnPos.y = (float)((int)doorOutlineSlot[-0x1c00] / room->_gridWidth) * 40.0 + 120.0; + spawnPos.x = (float)(GHIDRA_INT(doorOutlineSlot[-0x1c00]) % room->_gridWidth) * 40.0 + 40.0; + spawnPos.y = (float)(GHIDRA_INT(doorOutlineSlot[-0x1c00]) / room->_gridWidth) * 40.0 + 120.0; local_34 = (EntityPtr) ((Game *)(g_game))->Game::SpawnEx(1000,0x9a,&spawnPos,&g_vectorZero,(Entity *)0x0,0, - (uint)local_34,0); + GHIDRA_UINT(local_34),0); fVar6 = doorAngles[uVar1 & 3]; *(float *)((char *)local_34 + 0xec) = fVar6; angleRad = (fVar6 + 90.0) * 0.017453292; fVar6 = cos(angleRad); local_2c = (EntityPtr *)(fVar6 * 15.0); fVar6 = sin(angleRad); - ((Vector *)((int)local_34 + 0xdc))->x = (float)local_2c; + ((Vector *)(GHIDRA_INT(local_34) + 0xdc))->x = (float)local_2c; *(float *)((char *)local_34 + 0xe0) = fVar6 * 15.0; if (*doorOutlineSlot != local_34) { if (*doorOutlineSlot != (EntityPtr)0x0) { @@ -28902,7 +28902,7 @@ LAB_0082731a: pRVar4 = room; } uVar1 = uVar1 + 1; - uVar3 = uVar3 << 1 | (uint)((int)uVar3 < 0); + uVar3 = uVar3 << 1 | GHIDRA_UINT((GHIDRA_INT(uVar3) < 0)); doorOutlineSlot = doorOutlineSlot + 1; } while (uVar1 < 8); } @@ -28911,25 +28911,25 @@ LAB_0082731a: LAB_00827222: playerListEnd = (game->_playerManager)._playerList._end; piVar2 = (game->_playerManager)._playerList._begin; - if ((int)playerListEnd - (int)piVar2 >> 2 == 0) { + if (GHIDRA_INT(playerListEnd) - GHIDRA_INT(piVar2) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); playerListEnd = (game->_playerManager)._playerList._end; piVar2 = (game->_playerManager)._playerList._begin; game = g_game; } - if ((uint)local_34 < (uint)((int)playerListEnd - (int)piVar2 >> 2)) { - piVar2 = piVar2 + (int)local_34; + if (GHIDRA_UINT(local_34) < GHIDRA_UINT((GHIDRA_INT(playerListEnd) - GHIDRA_INT(piVar2) >> 2))) { + piVar2 = piVar2 + GHIDRA_INT(local_34); } iVar5 = *piVar2; uVar3 = 0; do { if (isHasRedKey) break; uVar1 = uVar3; - if ((int)uVar3 < 1) { + if (GHIDRA_INT(uVar3) < 1) { uVar1 = 0; } pocketSlot = 3; - if ((int)uVar1 < 3) { + if (GHIDRA_INT(uVar1) < 3) { pocketSlot = uVar1; } if ((*(int *)(iVar5 + 0x17a4 + pocketSlot * 8) == 1) && @@ -28944,10 +28944,10 @@ LAB_00827222: piVar2 = (int *)(iVar5 + 0x1580); do { if (*piVar2 == 0x1dd) { - if (-1 < (int)uVar3) { + if (-1 < GHIDRA_INT(uVar3)) { uVar3 = 0; piVar2 = *(int **)(iVar5 + 0x1754); - uVar1 = *(int *)(iVar5 + 0x1758) - (int)piVar2 >> 2; + uVar1 = *(int *)(iVar5 + 0x1758) - GHIDRA_INT(piVar2) >> 2; if (uVar1 != 0) goto LAB_008272e2; } break; @@ -28967,9 +28967,9 @@ LAB_008272e2: } } LAB_008272f6: - local_34 = (EntityPtr)((int)local_34 + 1); - if ((uint)((int)(game->_playerManager)._playerList._end - - (int)(game->_playerManager)._playerList._begin >> 2) <= (uint)local_34) + local_34 = (EntityPtr)(GHIDRA_INT(local_34) + 1); + if (GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((game->_playerManager)._playerList._begin) >> 2)) <= GHIDRA_UINT(local_34)) goto LAB_0082731a; goto LAB_00827222; } @@ -29009,7 +29009,7 @@ void Room::open_red_room_doors(int doorSlot, RoomDescriptor *targetRoom) *(uint *)((char *)this_00 + 0x158) = slot; if (((iVar1 == 1) || (iVar1 == 2)) || (iVar1 == 3)) { *(int *)((char *)this_00 + 8) = 8; - ((ANM2 *)((ANM2 *)((int)this_00 + 0x27c)))->ANM2::Reset(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(this_00) + 0x27c)))->ANM2::Reset(); ((GridEntity_Door *)((GridEntity_Door *)this_00))->GridEntity_Door::LoadSprite(); iVar1 = *(int *)((char *)this_00 + 8); } @@ -29033,7 +29033,7 @@ void Room::open_red_room_doors(int doorSlot, RoomDescriptor *targetRoom) manager = g_manager; local_c[0] = (EntityPtr *)0x9c; seed_fart_sound_override((int *)local_c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_c[0],1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_c[0]),1.0,2,0,1.0,0.0); return; } @@ -29083,7 +29083,7 @@ LAB_00827735: spawnedPickup = (Entity_Pickup *)(*pcVar2)(); return spawnedPickup; } - uVar5 = (uint)rng._seed >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; + uVar5 = GHIDRA_UINT(rng._seed) >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; local_20 = (undefined1 [8])0x100000003; uVar5 = uVar5 << ((byte)rng._shift2 & 0x1f) ^ uVar5; uVar5 = uVar5 >> ((byte)rng._shift3 & 0x1f) ^ uVar5; @@ -29097,7 +29097,7 @@ LAB_00827735: angleRoll = uVar5 >> 3 ^ uVar5; angleRoll = angleRoll << 1 ^ angleRoll; angleRoll = angleRoll >> 0xe ^ angleRoll; - local_14 = (float)((double)(int)angleRoll + __uint_to_double_fixup[-((int)angleRoll >> 0x1f)]) * + local_14 = (float)((double)GHIDRA_INT(angleRoll) + __uint_to_double_fixup[-(GHIDRA_INT(angleRoll) >> 0x1f)]) * 2.3283062e-10 * 3.14; local_14 = local_14 + local_14; offsetX = cos(local_14); @@ -29112,7 +29112,7 @@ LAB_00827735: } uVar5 = uVar5 >> ((byte)rng._shift1 & 0x1f) ^ uVar5; uVar5 = uVar5 << ((byte)rng._shift2 & 0x1f) ^ uVar5; - local_20._4_4_ = originX + offsetX; + (*(undefined4 *)((char *)&(local_20) + 0x4)) = originX + offsetX; local_18 = originY + local_14; spawnedPickup = (Entity_Pickup *) @@ -29120,8 +29120,8 @@ LAB_00827735: uVar5 >> ((byte)rng._shift3 & 0x1f) ^ uVar5); if ((spawnedPickup->_type == 5) && (((iVar4 = spawnedPickup->_variant, iVar4 == 0x34 || (iVar4 == 0x36)) || (iVar4 == 0x39)))) { - iVar4 = (int)((originX - 40.0) / 40.0 + 0.5); - gridY = (int)((originY - 120.0) / 40.0 + 0.5); + iVar4 = GHIDRA_INT(((originX - 40.0) / 40.0 + 0.5)); + gridY = GHIDRA_INT(((originY - 120.0) / 40.0 + 0.5)); if ((((iVar4 < 0) || (room->_gridWidth <= iVar4)) || (gridY < 0)) || (room->_gridHeight <= gridY)) { iVar4 = -1; @@ -29136,9 +29136,9 @@ LAB_00827735: } if ((pickup->_flags & 0x10000000000) != 0) { qVar3 = spawnedPickup->_flags; - puVar1 = (uint *)((int)&spawnedPickup->_flags + 4); + puVar1 = (uint *)(GHIDRA_INT(&spawnedPickup->_flags) + 4); *puVar1 = *puVar1 | 0x100; - *(int *)&spawnedPickup->_flags = (int)qVar3; + *(int *)&spawnedPickup->_flags = GHIDRA_INT(qVar3); } iVar4 = ((Entity_Pickup *)(pickup))->Entity_Pickup::AssignOptionsIndex(); spawnedPickup->_optionsPickupIndex = iVar4; @@ -29221,11 +29221,11 @@ LAB_00827a59: return 0; } MakeDoor(this,curses); - *(undefined4 *)((int)this->_doors[curses] + 0x394) = 0xffffff9c; + *(undefined4 *)(GHIDRA_INT(this->_doors[curses]) + 0x394) = 0xffffff9c; goto LAB_00827ace; } curses = curses + 1; - } while ((int)curses < 8); + } while (GHIDRA_INT(curses) < 8); } } else if (((isMinesTwo) && @@ -29234,13 +29234,13 @@ LAB_00827a59: curses = 0; while ((*(uint *)(iVar1 + 0x3c + (curses >> 5) * 4) & 1 << ((byte)curses & 0x1f)) == 0) { curses = curses + 1; - if (7 < (int)curses) { + if (7 < GHIDRA_INT(curses)) { return 0; } } if ((curses != 0xffffffff) && (this->_doors[curses] == (void *)0x0)) { MakeDoor(this,curses); - *(undefined4 *)((int)this->_doors[curses] + 0x394) = 0xffffff9b; + *(undefined4 *)(GHIDRA_INT(this->_doors[curses]) + 0x394) = 0xffffff9b; LAB_00827ace: iVar1 = *(int *)(*(int *)((char *)this->_descriptor + 0x10) + 8); ((GridEntity_Door *)(this->_doors[curses]))->GridEntity_Door::SetRoomTypes(iVar1,iVar1); @@ -29318,7 +29318,7 @@ byte Room::spawn_sanguine_bond_spikes(byte isRoomInit) local_8 = 0xffffffff; puStack_c = &LAB_00b01a07; local_10 = ExceptionList; - uVar4 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar4 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; if ((this->_roomType != 0xe) || (bondOwner = PlayerManager::FirstCollectibleOwner @@ -29396,7 +29396,7 @@ byte Room::spawn_sanguine_bond_spikes(byte isRoomInit) } uVar4 = uVar4 + 1; gridSlot = gridSlot + 1; - } while ((int)uVar4 < this->_gridWidth * this->_gridHeight); + } while (GHIDRA_INT(uVar4) < this->_gridWidth * this->_gridHeight); } spikeIdx = spikeGridIdx; } @@ -29410,7 +29410,7 @@ byte Room::spawn_sanguine_bond_spikes(byte isRoomInit) } uVar4 = uVar4 >> 0xb ^ uVar4; uVar4 = uVar4 << 7 ^ uVar4; - if (((int)spikeIdx < 0) || (0x1bf < (int)spikeIdx)) { + if ((GHIDRA_INT(spikeIdx) < 0) || (0x1bf < GHIDRA_INT(spikeIdx))) { KAGE_LogMessage(0x10,(byte *)"SpawnGridEntity: Grid index invalid\n"); } if ((spikeIdx < 0x1c0) && (this->_gridPaths[spikeIdx] < 0x385)) { @@ -29440,8 +29440,8 @@ byte Room::spawn_sanguine_bond_spikes(byte isRoomInit) } if (isRoomInit == 0) { uVar4 = Random(); - local_28.x = (float)((int)spikeIdx % this->_gridWidth) * 40.0 + 40.0; - local_28.y = (float)((int)spikeIdx / this->_gridWidth) * 40.0 + 120.0; + local_28.x = (float)(GHIDRA_INT(spikeIdx) % this->_gridWidth) * 40.0 + 40.0; + local_28.y = (float)(GHIDRA_INT(spikeIdx) / this->_gridWidth) * 40.0 + 120.0; poof = ((Game *)(g_game))->Game::Spawn(1000,0xf,&local_28,&g_vectorZero,(Entity *)0x0,0,uVar4); poof->Update(); } @@ -29507,7 +29507,7 @@ float Room::GetEnemyDamageInflicted() // 00872020 void Room::Spawns(uint *param_1, int param_2) { - *param_1 = (uint)*(ushort *)(param_2 + 0x44); + *param_1 = GHIDRA_UINT(*(ushort *)(param_2 + 0x44)); param_1[1] = *(uint *)(param_2 + 0x40); return; } @@ -29555,9 +29555,9 @@ void Room::render_pit_rails(float *param_2) } cellCount = *(int *)(cellCount + 0xc); pixelScale = g_displayPixelRatio * g_screenPointScale; - dVar3 = floor((double)(((((float)((int)gridIndex % cellCount) * 40.0 + 40.0) - 60.0) * 0.65 + + dVar3 = floor((double)(((((float)(GHIDRA_INT(gridIndex) % cellCount) * 40.0 + 40.0) - 60.0) * 0.65 + (g_screenWidth - 338.0) * 0.5) * pixelScale + 0.5)); - dVar4 = floor((double)(((((float)((int)gridIndex / cellCount) * 40.0 + 120.0) - 140.0) * 0.65 + dVar4 = floor((double)(((((float)(GHIDRA_INT(gridIndex) / cellCount) * 40.0 + 120.0) - 140.0) * 0.65 + (g_screenHeight - 182.0) * 0.5) * pixelScale + 0.5)); renderPos.x = (float)dVar3 / pixelScale + *param_2; renderPos.y = (float)dVar4 / pixelScale + param_2[1]; @@ -29580,7 +29580,7 @@ void Room::render_pit_rails(float *param_2) } gridSlotOffset = gridSlotOffset + 4; gridIndex = gridIndex + 1; - } while ((int)gridIndex < cellCount); + } while (GHIDRA_INT(gridIndex) < cellCount); } return; } @@ -29603,7 +29603,7 @@ int Room::GetBossThematicItem(int param_2) void *bufferEnd; uint putPtr; - local_8 = __security_cookie ^ (uint)(convBuf + 0x24); + local_8 = __security_cookie ^ GHIDRA_UINT((convBuf + 0x24)); if (param_2 == -1) { return 0; } @@ -29621,11 +29621,11 @@ int Room::GetBossThematicItem(int param_2) bufferBegin = this->_gridEntities[0xb]; *(void **)this->_gridWidth = bufferBegin; *(void **)(this->_bottomRightPos).x = bufferBegin; - *(int *)this->_gridEntities[2] = (int)bufferEnd - (int)bufferBegin; + *(int *)this->_gridEntities[2] = GHIDRA_INT(bufferEnd) - GHIDRA_INT(bufferBegin); } if (this->_gridEntities[5] == (codecvt *)0x0) { LAB_009e7e8d: - putResult = fputc((int)ch,this->_gridEntities[10]); + putResult = fputc(GHIDRA_INT(ch),this->_gridEntities[10]); iVar1 = -1; if (putResult != -1) { iVar1 = param_2; @@ -29637,7 +29637,7 @@ LAB_009e7e8d: (this->_gridEntities[5],(_Mbstatet *)(this->_gridEntities + 7),&srcChar, convBuf,&srcNext,convBuf,(char *)&local_8,&convEnd); if ((iVar1 == 0) || (iVar1 == 1)) { - _Count = (int)convEnd - (int)convBuf; + _Count = GHIDRA_INT(convEnd) - GHIDRA_INT(convBuf); if (((_Count == 0) || (written = fwrite(convBuf,1,_Count,this->_gridEntities[10]), _Count == written)) && (*(undefined1 *)((char *)this->_gridEntities + 0x19) = 1, srcNext != &srcChar)) { diff --git a/src/game/room_config.cpp b/src/game/room_config.cpp index f52b3bf..6d58849 100644 --- a/src/game/room_config.cpp +++ b/src/game/room_config.cpp @@ -13,7 +13,7 @@ RoomConfig::~RoomConfig() uStack_8 = 0xffffffff; puStack_c = &LAB_00b01ae0; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; stageIndex = 0; this_00 = this; @@ -61,7 +61,7 @@ void RoomConfig::LoadRoomFromXmlFile() puStack_c = &LAB_00b01b18; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(local_74 + 0x70); + uVar1 = __security_cookie ^ GHIDRA_UINT((local_74 + 0x70)); ExceptionList = &local_10; local_50 = 0; local_4c = 0xf; @@ -73,7 +73,7 @@ void RoomConfig::LoadRoomFromXmlFile() local_20 = 0; local_24 = 0; local_8 = 0; - local_74._0_4_ = 0; + (*(undefined4 *)((char *)&(local_74) + 0x0)) = 0; local_28 = 0; if (0xf < *(uint *)(in_EDX + 0x14)) { in_EDX = *(byte **)in_EDX; @@ -91,7 +91,7 @@ void RoomConfig::LoadRoomFromXmlFile() pvVar3 = local_60; if (uVar1 < 0x1000) goto LAB_00829805; pvVar3 = *(void **)((char *)local_60 + -4); - iVar2 = (int)local_60 - (int)pvVar3; + iVar2 = GHIDRA_INT(local_60) - GHIDRA_INT(pvVar3); } else { iVar2 = (**(code **)(*file + 4))(uVar1); @@ -100,16 +100,16 @@ void RoomConfig::LoadRoomFromXmlFile() text[iVar2] = 0; (**(code **)*file)(1); FUN_00413b90(); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; iVar2 = 0x829878; pbVar4 = text; ((rapidxml::xml_document *)(xmlDoc))->rapidxml::xml_document::parse(text); pvVar3 = ((xml_node *)(xmlDoc))->xml_node::first_node(&DAT_00b1c17c,iVar2,(byte)pbVar4); RoomConfigRoom::ParseXml(&parsedRoom,pvVar3,(RoomConfig_Room *)local_74); ((std::string *)(&(*(undefined1 *)((char *)&(parsedRoom) + 0x14))))->std::string::_Tidy_deallocate(); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; ((xml_memory_pool *)(auStack_100ec))->xml_memory_pool::clear(); - local_8 = CONCAT31(local_8._1_3_,3); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); tracked_alloc(1,text,0); FUN_00829920(local_74); if (local_4c < 0x10) { @@ -120,7 +120,7 @@ void RoomConfig::LoadRoomFromXmlFile() pvVar3 = local_60; if (uVar1 < 0x1000) goto LAB_00829805; pvVar3 = *(void **)((char *)local_60 + -4); - iVar2 = (int)local_60 - (int)pvVar3; + iVar2 = GHIDRA_INT(local_60) - GHIDRA_INT(pvVar3); } uVar1 = local_4c + 0x24; if (0x1f < iVar2 - 4U) { @@ -280,7 +280,7 @@ void RoomConfig::LoadStageBinary(uint Stage, uint Mode) local_14 = (void *)0xffffffff; puStack_18 = &LAB_00b01c02; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(basePath + 0xb); + local_24 = __security_cookie ^ GHIDRA_UINT((basePath + 0xb)); local_7c = Stage; local_78 = Mode; local_EDI_80 = (RoomConfig_Stage *)(&(*(undefined1 *)((char *)(this) + 0x0)) + Stage * 0xc4); @@ -307,7 +307,7 @@ void RoomConfig::LoadStageBinary(uint Stage, uint Mode) if (0xfff < uVar5) { pvVar4 = *(void **)((char *)tmpString + -4); uVar5 = uStack_40 + 0x24; - if (0x1f < (uint)((int)tmpString + (-4 - (int)pvVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString) + (-4 - GHIDRA_INT(pvVar4))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -318,33 +318,33 @@ void RoomConfig::LoadStageBinary(uint Stage, uint Mode) uStack_2c = 0; uStack_28 = 0xf; basePath[0] = (void *)0x0; - length = (RoomSet)((int)RVar2 - 3U); - if ((uint)RVar2 < (int)RVar2 - 3U) { + length = (RoomSet)(GHIDRA_INT(RVar2) - 3U); + if (GHIDRA_UINT(RVar2) < GHIDRA_INT(RVar2) - 3U) { length = RVar2; } RVar2 = temp_208e6a6609; - if (0xf < (uint)*(RoomSet *)((char *)temp_208e6a6609 + 0x14)) { + if (0xf < GHIDRA_UINT(*(RoomSet *)((char *)temp_208e6a6609 + 0x14))) { RVar2 = *(RoomSet *)temp_208e6a6609; } - ((std::string *)((char *)basePath))->std::string::assign((byte *)RVar2,(uint)length); + ((std::string *)((char *)basePath))->std::string::assign((byte *)RVar2,GHIDRA_UINT(length)); local_14 = (void *)0x1; puVar3 = ((std::string *)((char *)basePath))->std::string::append(&UNK_00b6cb40,3); tmpString = (void *)*puVar3; acStack_50 = (char [4])puVar3[1]; acStack_4c = (char [4])puVar3[2]; - acStack_48._0_4_ = puVar3[3]; + (*(undefined4 *)((char *)&(acStack_48) + 0x0)) = puVar3[3]; unique0x0000a400 = *(undefined8 *)(puVar3 + 4); puVar3[4] = 0; puVar3[5] = 0xf; *(undefined1 *)puVar3 = 0; - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; if (0xf < uStack_28) { uVar5 = uStack_28 + 1; pvVar4 = basePath[0]; if (0xfff < uVar5) { - pvVar4 = *(void **)((int)basePath[0] + -4); + pvVar4 = *(void **)(GHIDRA_INT(basePath[0]) + -4); uVar5 = uStack_28 + 0x24; - if (0x1f < (uint)((int)basePath[0] + (-4 - (int)pvVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(basePath[0]) + (-4 - GHIDRA_INT(pvVar4))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -353,24 +353,24 @@ void RoomConfig::LoadStageBinary(uint Stage, uint Mode) } uStack_2c = 0; uStack_28 = 0xf; - basePath[0] = (void *)((uint)basePath[0] & 0xffffff00); + basePath[0] = (void *)(GHIDRA_UINT(basePath[0]) & 0xffffff00); ModManager::TryRedirectPath (&g_manager->_modManager,(std_string *)redirectedPath,(std_string *)&tmpString); - local_14._0_1_ = 4; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 4; path = extraout_EAX; if (0xf < *(uint *)(extraout_EAX + 0x14)) { path = *(byte **)extraout_EAX; } fileHandle = ((FileSystem *)(&PTR_vftable_00c37a10))->FileSystem::Open(path,(int *)0x0); - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; file = fileHandle; if (0xf < uStack_58) { uVar5 = uStack_58 + 1; pvVar4 = redirectedPath[0]; if (0xfff < uVar5) { - pvVar4 = *(void **)((int)redirectedPath[0] + -4); + pvVar4 = *(void **)(GHIDRA_INT(redirectedPath[0]) + -4); uVar5 = uStack_58 + 0x24; - if (0x1f < (uint)((int)redirectedPath[0] + (-4 - (int)pvVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPath[0]) + (-4 - GHIDRA_INT(pvVar4))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -379,20 +379,20 @@ void RoomConfig::LoadStageBinary(uint Stage, uint Mode) } uStack_5c = 0; uStack_58 = 0xf; - redirectedPath[0] = (void *)((uint)redirectedPath[0] & 0xffffff00); + redirectedPath[0] = (void *)(GHIDRA_UINT(redirectedPath[0]) & 0xffffff00); if (fileHandle != (int *)0x0) { ((RoomConfigMode *)((void *)temp_208e6a6609))->RoomConfigMode::Clear(); (**(code **)(*fileHandle + 0x14))(&magic,1,4); if (magic == 0x31425453) { - (**(code **)(*fileHandle + 0x14))((int)temp_208e6a6609 + 0x1c,4,1); + (**(code **)(*fileHandle + 0x14))(GHIDRA_INT(temp_208e6a6609) + 0x1c,4,1); if (*(int *)((char *)temp_208e6a6609 + 0x1c) != 0) { KAGE_LogMessage(1,(byte *)"allocate %d rooms.\n"); uVar5 = *(uint *)((char *)temp_208e6a6609 + 0x1c); puStack_74 = (uint *)0x0; - allocSize = -(uint)((int)((ulonglong)uVar5 * 0x5c >> 0x20) != 0) | - (uint)((ulonglong)uVar5 * 0x5c); - puStack_74 = operator_new_tracked(-(uint)(0xfffffffb < allocSize) | allocSize + 4); - local_14._0_1_ = 5; + allocSize = -GHIDRA_UINT((GHIDRA_INT(((ulonglong)uVar5 * 0x5c >> 0x20)) != 0)) | + GHIDRA_UINT(((ulonglong)uVar5 * 0x5c)); + puStack_74 = operator_new_tracked(-GHIDRA_UINT((0xfffffffb < allocSize)) | allocSize + 4); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; if (puStack_74 == (uint *)0x0) { puVar6 = (uint *)0x0; } @@ -402,20 +402,20 @@ void RoomConfig::LoadStageBinary(uint Stage, uint Mode) _eh_vector_constructor_iterator_ (puVar6,0x5c,uVar5,(_func_void_void_ptr *)&UNK_00828b20,RoomConfigRoom::dtor); } - local_14._0_1_ = 3; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; *(uint **)((char *)temp_208e6a6609 + 0x18) = puVar6; uVar5 = 0; if (*(int *)((char *)temp_208e6a6609 + 0x1c) != 0) { puStack_74 = (uint *)0x0; do { ReadRoom((void *)temp_208e6a6609,uVar5,local_7c,file); - *(uint *)(*(int *)((char *)temp_208e6a6609 + 0x18) + 4 + (int)puStack_74) = local_78; + *(uint *)(*(int *)((char *)temp_208e6a6609 + 0x18) + 4 + GHIDRA_INT(puStack_74)) = local_78; RoomSet::GetVariantSet ((RoomSet *)temp_208e6a6609, - *(uint *)(*(int *)((char *)temp_208e6a6609 + 0x18) + 8 + (int)puStack_74)); + *(uint *)(*(int *)((char *)temp_208e6a6609 + 0x18) + 8 + GHIDRA_INT(puStack_74))); VariantRanges::Insert (*(undefined4 *) - (*(int *)((char *)temp_208e6a6609 + 0x18) + 0xc + (int)puStack_74)); + (*(int *)((char *)temp_208e6a6609 + 0x18) + 0xc + GHIDRA_INT(puStack_74))); iVar1 = *(int *)((char *)temp_208e6a6609 + 0x18); switch(local_7c) { case 1: @@ -423,7 +423,7 @@ void RoomConfig::LoadStageBinary(uint Stage, uint Mode) case 3: roomVariant = *(int *)((char *)puStack_74 + iVar1 + 0xc); if ((roomVariant == 0x25b) || (roomVariant == 0x2cc)) { - puVar6 = (uint *)((int)puStack_74 + iVar1 + 0x4c); + puVar6 = (uint *)(GHIDRA_INT(puStack_74) + iVar1 + 0x4c); *puVar6 = *puVar6 | 4; } break; @@ -431,7 +431,7 @@ void RoomConfig::LoadStageBinary(uint Stage, uint Mode) case 0x1e: if ((*(int *)((char *)puStack_74 + iVar1 + 8) == 1) && (*(int *)((char *)puStack_74 + iVar1 + 0x10) == 0x1f)) { - puVar6 = (uint *)((int)puStack_74 + iVar1 + 0x4c); + puVar6 = (uint *)(GHIDRA_INT(puStack_74) + iVar1 + 0x4c); *puVar6 = *puVar6 | 2; } } @@ -456,7 +456,7 @@ LAB_0082ae11: if (0xfff < uVar5) { pvVar4 = *(void **)((char *)tmpString + -4); uVar5 = uStack_40 + 0x24; - if (0x1f < (uint)((int)tmpString + (-4 - (int)pvVar4))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString) + (-4 - GHIDRA_INT(pvVar4))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -511,7 +511,7 @@ void RoomConfig::ReadRoom(void *stage, int roomIndex, int stageId, void *file) local_8 = 0xffffffff; puStack_c = &LAB_00b01c56; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(nameLength + 0xc); + uVar1 = __security_cookie ^ GHIDRA_UINT((nameLength + 0xc)); ExceptionList = &local_10; room = (int *)(roomIndex * 0x5c + *(int *)((char *)stage + 0x18)); *room = stageId; @@ -522,26 +522,26 @@ void RoomConfig::ReadRoom(void *stage, int roomIndex, int stageId, void *file) (**(code **)(*fileLocal + 0x14))(nameLength,2,1); roomName = room + 5; if (nameLength[0] == 0) { - if (0xf < (uint)room[10]) { + if (0xf < GHIDRA_UINT(room[10])) { roomName = (int *)*roomName; } room[9] = 0; *(char *)roomName = '\0'; } else { - uVar1 = (uint)nameLength[0]; - if ((uint)room[9] < uVar1) { + uVar1 = GHIDRA_UINT(nameLength[0]); + if (GHIDRA_UINT(room[9]) < uVar1) { ((std::string *)((char *)roomName))->std::string::append_n(uVar1 - room[9],0); } else { nameBuf = roomName; - if (0xf < (uint)room[10]) { + if (0xf < GHIDRA_UINT(room[10])) { nameBuf = (int *)*roomName; } room[9] = uVar1; *(char *)((char *)nameBuf + uVar1) = '\0'; } - if (0xf < (uint)room[10]) { + if (0xf < GHIDRA_UINT(room[10])) { roomName = (int *)*roomName; } (**(code **)(*fileLocal + 0x14))(roomName,1,nameLength[0]); @@ -554,25 +554,25 @@ void RoomConfig::ReadRoom(void *stage, int roomIndex, int stageId, void *file) room[0x16] = roomVariant; room[3] = roomVariant; room[4] = roomSubtype; - room[0xb] = (uint)roomDifficulty; + room[0xb] = GHIDRA_UINT(roomDifficulty); room[0xd] = roomWeight; room[0xc] = roomWeight; *(undefined1 *)((char *)room + 0x46) = roomWidth; *(undefined1 *)((char *)room + 0x47) = roomHeight; - room[0x12] = (uint)roomShape; + room[0x12] = GHIDRA_UINT(roomShape); room[0x13] = 0; - (**(code **)(*fileLocal + 0x14))((int)&stageId + 3,1,1); + (**(code **)(*fileLocal + 0x14))(GHIDRA_INT(&stageId) + 3,1,1); (**(code **)(*fileLocal + 0x14))(room + 0x11,2,1); spawnCount = *(ushort *)(room + 0x11); uVar1 = 0; - if (stageId._3_1_ != '\0') { + if ((*(undefined1 *)((char *)&(stageId) + 0x3)) != '\0') { do { (**(code **)(*fileLocal + 0x14))(&local_24,2,1); (**(code **)(*fileLocal + 0x14))(&local_20,2,1); (**(code **)(*fileLocal + 0x14))(&local_11,1,1); if (local_11 != 0) { doorSlot = get_door_from_position((short)local_24,room[0x12]); - if (-1 < (int)doorSlot) { + if (-1 < GHIDRA_INT(doorSlot)) { if (7 < doorSlot) { LAB_0082b2de: /* WARNING: Subroutine does not return */ @@ -582,17 +582,17 @@ LAB_0082b2de: } } uVar1 = uVar1 + 1; - } while (uVar1 < (uint)stageId >> 0x18); + } while (uVar1 < GHIDRA_UINT(stageId) >> 0x18); spawnCount = *(ushort *)(room + 0x11); } if (spawnCount != 0) { - uVar1 = (uint)spawnCount; + uVar1 = GHIDRA_UINT(spawnCount); pvVar2 = operator_new_tracked(uVar1 * 0x10); if (pvVar2 == (void *)0x0) { pvVar2 = (void *)0x0; } else if (uVar1 != 0) { - spawnInit = (undefined4 *)((int)pvVar2 + 4); + spawnInit = (undefined4 *)(GHIDRA_INT(pvVar2) + 4); do { spawnInit[-1] = 0; *spawnInit = 0; @@ -603,7 +603,7 @@ LAB_0082b2de: } while (uVar1 != 0); } local_8 = 0xffffffff; - room[0x10] = (int)pvVar2; + room[0x10] = GHIDRA_INT(pvVar2); spawnIndex = 0; if ((short)room[0x11] != 0) { local_20 = 0; @@ -619,7 +619,7 @@ LAB_0082b2de: entryCount = *(byte *)(local_24 + 8 + iVar3); entryCountCopy = '\0'; if (entryCount != 0) { - pvVar2 = operator_new_tracked((uint)entryCount * 0xc); + pvVar2 = operator_new_tracked(GHIDRA_UINT(entryCount) * 0xc); entryCountCopy = *(char *)(iVar3 + 8 + local_24); *(void **)(iVar3 + 4 + local_24) = pvVar2; } @@ -632,7 +632,7 @@ LAB_0082b2de: (**(code **)(*(int *)file + 0x14))(entryVariant,2,1); (**(code **)(*(int *)file + 0x14))(entrySubtype,2,1); (**(code **)(*(int *)file + 0x14))(&entryWeight,4,1); - *(uint *)(iVar3 + uVar1 * 0xc) = (uint)entryTypeRaw[0]; + *(uint *)(iVar3 + uVar1 * 0xc) = GHIDRA_UINT(entryTypeRaw[0]); *(undefined2 *)(iVar3 + 4 + uVar1 * 0xc) = entryVariant[0]; *(undefined2 *)(iVar3 + 6 + uVar1 * 0xc) = entrySubtype[0]; *(float *)(iVar3 + 8 + uVar1 * 0xc) = entryWeight; @@ -642,7 +642,7 @@ LAB_0082b2de: if (entryType == 0x3ca) { if ((*(short *)(iVar3 + 4 + uVar1 * 0xc) == 2) && (doorSlot = get_door_from_position(*(short *)(local_20 + local_24),room[0x12]), - -1 < (int)doorSlot)) { + -1 < GHIDRA_INT(doorSlot))) { if (doorSlot < 8) { room[(doorSlot >> 5) + 0xf] = room[(doorSlot >> 5) + 0xf] | 1 << ((byte)doorSlot & 0x1f); @@ -659,7 +659,7 @@ LAB_0082b280: } } local_11 = local_11 + 1; - uVar1 = (uint)local_11; + uVar1 = GHIDRA_UINT(local_11); } while (local_11 < *entryCountPtr); fileLocal = file; iVar3 = local_20; @@ -714,7 +714,7 @@ byte RoomConfig::LoadStagesXml(byte *path) ehState = 0xffffffff; puStack_18 = &LAB_00b01cdf; savedExceptionList = ExceptionList; - uVar2 = __security_cookie ^ (uint)(xmlMemoryPool + 0x10090); + uVar2 = __security_cookie ^ GHIDRA_UINT((xmlMemoryPool + 0x10090)); ExceptionList = &savedExceptionList; file = ((FileSystem *)(&PTR_vftable_00c37a10))->FileSystem::Open(path,(int *)0x0); if (file == (int *)0x0) { @@ -754,10 +754,10 @@ byte RoomConfig::LoadStagesXml(byte *path) bVar1 = *strCursor; strCursor = strCursor + 1; } while (bVar1 != 0); - uVar2 = (int)strCursor - (int)(attrText + 1); + uVar2 = GHIDRA_INT(strCursor) - GHIDRA_INT((attrText + 1)); ((std::string *)(roomsRoot._buf))->std::string::assign(attrText,uVar2); - ehState._0_1_ = 1; - pvVar3 = ((xml_node *)(node))->xml_node::first_attribute((byte *)"greedroot",(uint)attrText,(byte)uVar2); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; + pvVar3 = ((xml_node *)(node))->xml_node::first_attribute((byte *)"greedroot",GHIDRA_UINT(attrText),(byte)uVar2); if (pvVar3 == (void *)0x0) { attrText = (byte *)"rooms/greed/"; } @@ -778,10 +778,10 @@ byte RoomConfig::LoadStagesXml(byte *path) bVar1 = *strCursor; strCursor = strCursor + 1; } while (bVar1 != 0); - uVar2 = (int)strCursor - (int)(attrText + 1); + uVar2 = GHIDRA_INT(strCursor) - GHIDRA_INT((attrText + 1)); ((std::string *)(greedRoot._buf))->std::string::assign(attrText,uVar2); - ehState._0_1_ = 2; - pvVar3 = ((xml_node *)(node))->xml_node::first_attribute((byte *)"bossgfxroot",(uint)attrText,(byte)uVar2); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; + pvVar3 = ((xml_node *)(node))->xml_node::first_attribute((byte *)"bossgfxroot",GHIDRA_UINT(attrText),(byte)uVar2); bossGfxRoot._size = 0; bossGfxRoot._capacity = 0xf; bossGfxRoot._buf[0] = '\0'; @@ -797,9 +797,9 @@ byte RoomConfig::LoadStagesXml(byte *path) bVar1 = *strCursor; strCursor = strCursor + 1; } while (bVar1 != 0); - uVar2 = (int)strCursor - (int)(attrText + 1); + uVar2 = GHIDRA_INT(strCursor) - GHIDRA_INT((attrText + 1)); ((std::string *)(bossGfxRoot._buf))->std::string::assign(attrText,uVar2); - for (node = ((xml_node *)(node))->xml_node::first_node((byte *)"stage",(int)attrText,(byte)uVar2); + for (node = ((xml_node *)(node))->xml_node::first_node((byte *)"stage",GHIDRA_INT(attrText),(byte)uVar2); node != (void *)0x0; node = *(void **)((char *)node + 0x2c)) { stageName._size = 0; stageName._capacity = 0xf; @@ -823,10 +823,10 @@ byte RoomConfig::LoadStagesXml(byte *path) stageSuffix._buf[1] = '\0'; stageSuffix._buf[2] = '\0'; stageSuffix._buf[3] = '\0'; - ehState._0_1_ = 7; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 7; _eh_vector_constructor_iterator_(&normalMode,0x2c,2,RoomConfigMode::ctor,RoomConfigMode::dtor) ; - ehState._0_1_ = 8; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 8; attr = *(undefined4 **)((char *)node + 0x20); if (attr != (undefined4 *)0x0) { do { @@ -841,7 +841,7 @@ byte RoomConfig::LoadStagesXml(byte *path) isLess = bVar1 < *literalCursor; if (bVar1 != *literalCursor) { LAB_0082b611: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0082b616; } if (bVar1 == 0) break; @@ -871,7 +871,7 @@ LAB_0082b616: isLess = bVar1 < *literalCursor; if (bVar1 != *literalCursor) { LAB_0082b670: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0082b675; } if (bVar1 == 0) break; @@ -893,7 +893,7 @@ LAB_0082b675: bVar1 = *strCursor; strCursor = strCursor + 1; } while (bVar1 != 0); - uVar2 = (int)strCursor - (int)(attrText + 1); + uVar2 = GHIDRA_INT(strCursor) - GHIDRA_INT((attrText + 1)); destString = &stageName; LAB_0082bab2: ((std::string *)(destString->_buf))->std::string::assign(attrText,uVar2); @@ -909,7 +909,7 @@ LAB_0082bab2: isLess = bVar1 < *literalCursor; if (bVar1 != *literalCursor) { LAB_0082b6d4: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0082b6d9; } if (bVar1 == 0) break; @@ -931,7 +931,7 @@ LAB_0082b6d9: bVar1 = *strCursor; strCursor = strCursor + 1; } while (bVar1 != 0); - destString = (std_string *)(strCursor + -(int)(attrText + 1)); + destString = (std_string *)(strCursor + -GHIDRA_INT((attrText + 1))); if ((std_string *)(0x7fffffff - roomsRoot._size) < destString) { LAB_0082bd57: /* WARNING: Subroutine does not return */ @@ -939,10 +939,10 @@ LAB_0082bd57: } rootBuffer = &roomsRoot; if (0xf < roomsRoot._capacity) { - rootBuffer = (std_string *)roomsRoot._buf._0_4_; + rootBuffer = (*(undefined4 *)((char *)&((std_string *)roomsRoot._buf) + 0x0)); } - ((std::string *)(concatResult._buf))->std::string::concat((int)destString,destString,(byte *)rootBuffer, - roomsRoot._size,attrText,(uint)destString); + ((std::string *)(concatResult._buf))->std::string::concat(GHIDRA_INT(destString),destString,(byte *)rootBuffer, + roomsRoot._size,attrText,GHIDRA_UINT(destString)); ((std::string *)(normalMode._buf))->std::string::_Tidy_deallocate(); normalMode._buf[0] = concatResult._buf[0]; normalMode._buf[1] = concatResult._buf[1]; @@ -969,14 +969,14 @@ LAB_0082bd57: bVar1 = *strCursor; strCursor = strCursor + 1; } while (bVar1 != 0); - destString = (std_string *)(strCursor + -(int)(attrText + 1)); + destString = (std_string *)(strCursor + -GHIDRA_INT((attrText + 1))); if ((std_string *)(0x7fffffff - greedRoot._size) < destString) goto LAB_0082bd57; rootBuffer = &greedRoot; if (0xf < greedRoot._capacity) { - rootBuffer = (std_string *)greedRoot._buf._0_4_; + rootBuffer = (*(undefined4 *)((char *)&((std_string *)greedRoot._buf) + 0x0)); } - ((std::string *)(concatResult._buf))->std::string::concat((int)destString,destString,(byte *)rootBuffer, - greedRoot._size,attrText,(uint)destString); + ((std::string *)(concatResult._buf))->std::string::concat(GHIDRA_INT(destString),destString,(byte *)rootBuffer, + greedRoot._size,attrText,GHIDRA_UINT(destString)); ((std::string *)(greedMode._buf))->std::string::_Tidy_deallocate(); greedMode._buf[0] = concatResult._buf[0]; greedMode._buf[1] = concatResult._buf[1]; @@ -1008,7 +1008,7 @@ LAB_0082bd57: isLess = bVar1 < (byte)*keyLiteral; if (bVar1 != *keyLiteral) { LAB_0082b800: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0082b805; } if (bVar1 == 0) break; @@ -1030,22 +1030,22 @@ LAB_0082b805: bVar1 = *strCursor; strCursor = strCursor + 1; } while (bVar1 != 0); - destString = (std_string *)(strCursor + -(int)(attrText + 1)); + destString = (std_string *)(strCursor + -GHIDRA_INT((attrText + 1))); if ((std_string *)(0x7fffffff - bossGfxRoot._size) < destString) goto LAB_0082bd57; rootBuffer = &bossGfxRoot; if (0xf < bossGfxRoot._capacity) { - rootBuffer = (std_string *)bossGfxRoot._buf._0_4_; + rootBuffer = (*(undefined4 *)((char *)&((std_string *)bossGfxRoot._buf) + 0x0)); } - ((std::string *)(concatResult._buf))->std::string::concat((int)destString,destString,(byte *)rootBuffer, - bossGfxRoot._size,attrText,(uint)destString); + ((std::string *)(concatResult._buf))->std::string::concat(GHIDRA_INT(destString),destString,(byte *)rootBuffer, + bossGfxRoot._size,attrText,GHIDRA_UINT(destString)); if (0xf < playerSpotPath._capacity) { uVar2 = playerSpotPath._capacity + 1; - pvVar3 = (void *)playerSpotPath._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)playerSpotPath._buf) + 0x0)); if (0xfff < uVar2) { - pvVar3 = *(void **)(playerSpotPath._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(playerSpotPath._buf) + 0x0)) + -4); uVar2 = playerSpotPath._capacity + 0x24; - if (0x1f < (playerSpotPath._buf._0_4_ - (int)pvVar3) - 4U) goto LAB_0082bce0; + if (0x1f < ((*(undefined4 *)((char *)&(playerSpotPath._buf) + 0x0)) - GHIDRA_INT(pvVar3)) - 4U) goto LAB_0082bce0; } operator_delete(pvVar3,uVar2); } @@ -1066,7 +1066,7 @@ LAB_0082b805: isLess = bVar1 < (byte)*keyLiteral; if (bVar1 != *keyLiteral) { LAB_0082b8e6: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0082b8eb; } if (bVar1 == 0) break; @@ -1088,22 +1088,22 @@ LAB_0082b8eb: bVar1 = *strCursor; strCursor = strCursor + 1; } while (bVar1 != 0); - destString = (std_string *)(strCursor + -(int)(attrText + 1)); + destString = (std_string *)(strCursor + -GHIDRA_INT((attrText + 1))); if ((std_string *)(0x7fffffff - bossGfxRoot._size) < destString) goto LAB_0082bd57; rootBuffer = &bossGfxRoot; if (0xf < bossGfxRoot._capacity) { - rootBuffer = (std_string *)bossGfxRoot._buf._0_4_; + rootBuffer = (*(undefined4 *)((char *)&((std_string *)bossGfxRoot._buf) + 0x0)); } - ((std::string *)(concatResult._buf))->std::string::concat((int)destString,destString,(byte *)rootBuffer, - bossGfxRoot._size,attrText,(uint)destString); + ((std::string *)(concatResult._buf))->std::string::concat(GHIDRA_INT(destString),destString,(byte *)rootBuffer, + bossGfxRoot._size,attrText,GHIDRA_UINT(destString)); if (0xf < bossSpotPath._capacity) { uVar2 = bossSpotPath._capacity + 1; - pvVar3 = (void *)bossSpotPath._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)bossSpotPath._buf) + 0x0)); if (0xfff < uVar2) { - pvVar3 = *(void **)(bossSpotPath._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(bossSpotPath._buf) + 0x0)) + -4); uVar2 = bossSpotPath._capacity + 0x24; - if (0x1f < (bossSpotPath._buf._0_4_ - (int)pvVar3) - 4U) goto LAB_0082bce0; + if (0x1f < ((*(undefined4 *)((char *)&(bossSpotPath._buf) + 0x0)) - GHIDRA_INT(pvVar3)) - 4U) goto LAB_0082bce0; } operator_delete(pvVar3,uVar2); } @@ -1124,7 +1124,7 @@ LAB_0082b8eb: isLess = bVar1 < (byte)*keyLiteral; if (bVar1 != *keyLiteral) { LAB_0082b9d0: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0082b9d5; } if (bVar1 == 0) break; @@ -1154,7 +1154,7 @@ LAB_0082b9d5: isLess = bVar1 < (byte)*keyLiteral; if (bVar1 != *keyLiteral) { LAB_0082ba30: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0082ba35; } if (bVar1 == 0) break; @@ -1184,7 +1184,7 @@ LAB_0082ba35: isLess = bVar1 < (byte)*keyLiteral; if (bVar1 != *keyLiteral) { LAB_0082ba87: - uVar2 = -(uint)isLess | 1; + uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_0082ba8c; } if (bVar1 == 0) break; @@ -1206,7 +1206,7 @@ LAB_0082ba8c: bVar1 = *strCursor; strCursor = strCursor + 1; } while (bVar1 != 0); - uVar2 = (int)strCursor - (int)(attrText + 1); + uVar2 = GHIDRA_INT(strCursor) - GHIDRA_INT((attrText + 1)); destString = &stageSuffix; goto LAB_0082bab2; } @@ -1220,82 +1220,82 @@ LAB_0082ba8c: } while ((attr[4] != 0) && (attr = (undefined4 *)attr[6], attr != (undefined4 *)0x0)); } RoomConfigStage::operator_assign(&stageId); - ehState._0_1_ = 9; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 9; _eh_vector_destructor_iterator_(&normalMode,0x2c,2,RoomConfigMode::dtor); if (0xf < stageSuffix._capacity) { uVar2 = stageSuffix._capacity + 1; - pvVar3 = (void *)stageSuffix._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)stageSuffix._buf) + 0x0)); if (0xfff < uVar2) { - pvVar3 = *(void **)(stageSuffix._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(stageSuffix._buf) + 0x0)) + -4); uVar2 = stageSuffix._capacity + 0x24; - if (0x1f < (stageSuffix._buf._0_4_ - (int)pvVar3) - 4U) goto LAB_0082bce0; + if (0x1f < ((*(undefined4 *)((char *)&(stageSuffix._buf) + 0x0)) - GHIDRA_INT(pvVar3)) - 4U) goto LAB_0082bce0; } operator_delete(pvVar3,uVar2); } stageSuffix._size = 0; stageSuffix._capacity = 0xf; - stageSuffix._buf._0_4_ = stageSuffix._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(stageSuffix._buf) + 0x0)) = (*(undefined4 *)((char *)&(stageSuffix._buf) + 0x0)) & 0xffffff00; if (0xf < bossSpotPath._capacity) { uVar2 = bossSpotPath._capacity + 1; - pvVar3 = (void *)bossSpotPath._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)bossSpotPath._buf) + 0x0)); if (0xfff < uVar2) { - pvVar3 = *(void **)(bossSpotPath._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(bossSpotPath._buf) + 0x0)) + -4); uVar2 = bossSpotPath._capacity + 0x24; - if (0x1f < (bossSpotPath._buf._0_4_ - (int)pvVar3) - 4U) goto LAB_0082bce0; + if (0x1f < ((*(undefined4 *)((char *)&(bossSpotPath._buf) + 0x0)) - GHIDRA_INT(pvVar3)) - 4U) goto LAB_0082bce0; } operator_delete(pvVar3,uVar2); } if (0xf < playerSpotPath._capacity) { uVar2 = playerSpotPath._capacity + 1; - pvVar3 = (void *)playerSpotPath._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)playerSpotPath._buf) + 0x0)); if (0xfff < uVar2) { - pvVar3 = *(void **)(playerSpotPath._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(playerSpotPath._buf) + 0x0)) + -4); uVar2 = playerSpotPath._capacity + 0x24; - if (0x1f < (playerSpotPath._buf._0_4_ - (int)pvVar3) - 4U) goto LAB_0082bce0; + if (0x1f < ((*(undefined4 *)((char *)&(playerSpotPath._buf) + 0x0)) - GHIDRA_INT(pvVar3)) - 4U) goto LAB_0082bce0; } operator_delete(pvVar3,uVar2); } if (0xf < stageName._capacity) { uVar2 = stageName._capacity + 1; - pvVar3 = (void *)stageName._buf._0_4_; + pvVar3 = (*(undefined4 *)((char *)&((void *)stageName._buf) + 0x0)); if (0xfff < uVar2) { - pvVar3 = *(void **)(stageName._buf._0_4_ + -4); + pvVar3 = *(void **)((*(undefined4 *)((char *)&(stageName._buf) + 0x0)) + -4); uVar2 = stageName._capacity + 0x24; - if (0x1f < (stageName._buf._0_4_ - (int)pvVar3) - 4U) goto LAB_0082bce0; + if (0x1f < ((*(undefined4 *)((char *)&(stageName._buf) + 0x0)) - GHIDRA_INT(pvVar3)) - 4U) goto LAB_0082bce0; } operator_delete(pvVar3,uVar2); } } - ehState._0_1_ = 2; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; if (0xf < bossGfxRoot._capacity) { uVar2 = bossGfxRoot._capacity + 1; - node = (void *)bossGfxRoot._buf._0_4_; + node = (*(undefined4 *)((char *)&((void *)bossGfxRoot._buf) + 0x0)); if (0xfff < uVar2) { - node = *(void **)(bossGfxRoot._buf._0_4_ + -4); + node = *(void **)((*(undefined4 *)((char *)&(bossGfxRoot._buf) + 0x0)) + -4); uVar2 = bossGfxRoot._capacity + 0x24; - if (0x1f < (uint)(bossGfxRoot._buf._0_4_ + (-4 - (int)node))) goto LAB_0082bce0; + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(bossGfxRoot._buf) + 0x0)) + (-4 - GHIDRA_INT(node))))) goto LAB_0082bce0; } operator_delete(node,uVar2); } - ehState._0_1_ = 1; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 1; if (0xf < greedRoot._capacity) { uVar2 = greedRoot._capacity + 1; - node = (void *)greedRoot._buf._0_4_; + node = (*(undefined4 *)((char *)&((void *)greedRoot._buf) + 0x0)); if (0xfff < uVar2) { - node = *(void **)(greedRoot._buf._0_4_ + -4); + node = *(void **)((*(undefined4 *)((char *)&(greedRoot._buf) + 0x0)) + -4); uVar2 = greedRoot._capacity + 0x24; - if (0x1f < (greedRoot._buf._0_4_ - (int)node) - 4U) goto LAB_0082bce0; + if (0x1f < ((*(undefined4 *)((char *)&(greedRoot._buf) + 0x0)) - GHIDRA_INT(node)) - 4U) goto LAB_0082bce0; } operator_delete(node,uVar2); } - ehState._0_1_ = 0; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0; if (0xf < roomsRoot._capacity) { uVar2 = roomsRoot._capacity + 1; - node = (void *)roomsRoot._buf._0_4_; + node = (*(undefined4 *)((char *)&((void *)roomsRoot._buf) + 0x0)); if (0xfff < uVar2) { - node = *(void **)(roomsRoot._buf._0_4_ + -4); + node = *(void **)((*(undefined4 *)((char *)&(roomsRoot._buf) + 0x0)) + -4); uVar2 = roomsRoot._capacity + 0x24; - if (0x1f < (roomsRoot._buf._0_4_ - (int)node) - 4U) { + if (0x1f < ((*(undefined4 *)((char *)&(roomsRoot._buf) + 0x0)) - GHIDRA_INT(node)) - 4U) { LAB_0082bce0: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1309,14 +1309,14 @@ LAB_0082bce0: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (text != (byte *)0x0) { uVar2 = *(uint *)(text + -4); oldAllocBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)oldAllocBytes < uVar2); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocBytes) < uVar2)); free(text + -4); } bVar1 = 1; @@ -1360,7 +1360,7 @@ byte RoomConfig::LoadCursesXml(byte *path, byte isAppend) local_8 = 0xffffffff; puStack_c = &LAB_00b01d2b; local_10 = ExceptionList; - curseCount = __security_cookie ^ (uint)(xmlPool + 0x10028); + curseCount = __security_cookie ^ GHIDRA_UINT((xmlPool + 0x10028)); ExceptionList = &local_10; if (isAppend != 0) goto LAB_0082c007; pbVar6 = (this->_curses)._end; @@ -1374,18 +1374,18 @@ byte RoomConfig::LoadCursesXml(byte *path, byte isAppend) pbVar10 = psVar1->_begin; } (this->_curses)._end = pbVar10; - curseCount = ((int)pbVar10 - (int)psVar1->_begin) / 0x1c; + curseCount = (GHIDRA_INT(pbVar10) - GHIDRA_INT(psVar1->_begin)) / 0x1c; if (curseCount < 10) { if (8 < curseCount) goto LAB_0082c007; - iVar8 = (int)(this->_curses)._capacity - (int)psVar1->_begin; - if ((uint)(iVar8 / 0x1c) < 9) { + iVar8 = GHIDRA_INT((this->_curses)._capacity) - GHIDRA_INT(psVar1->_begin); + if (GHIDRA_UINT((iVar8 / 0x1c)) < 9) { FUN_0082e650(iVar8,&pbStack_1007c); goto LAB_0082c007; } pbVar6 = (byte *)FUN_0082e340(pbVar10,9 - curseCount,pbStack_1007c); } else { - pbVar6 = (byte *)((int)psVar1->_begin + 0xfc); + pbVar6 = (byte *)(GHIDRA_INT(psVar1->_begin) + 0xfc); pbStack_1007c = pbVar6; if (pbVar6 != pbVar10) { do { @@ -1434,7 +1434,7 @@ LAB_0082c007: isCharLess = bVar4 < *expectedAttrChar; if (bVar4 != *expectedAttrChar) { LAB_0082c105: - curseCount = -(uint)isCharLess | 1; + curseCount = -GHIDRA_UINT(isCharLess) | 1; goto LAB_0082c10a; } if (bVar4 == 0) break; @@ -1464,7 +1464,7 @@ LAB_0082c10a: isCharLess = bVar4 < *expectedAttrChar; if (bVar4 != *expectedAttrChar) { LAB_0082c160: - curseCount = -(uint)isCharLess | 1; + curseCount = -GHIDRA_UINT(isCharLess) | 1; goto LAB_0082c165; } if (bVar4 == 0) break; @@ -1486,7 +1486,7 @@ LAB_0082c165: bVar4 = *pbVar10; pbVar10 = pbVar10 + 1; } while (bVar4 != 0); - ((std::string *)((char *)curseName))->std::string::assign(pbVar6,(int)pbVar10 - (int)(pbVar6 + 1)); + ((std::string *)((char *)curseName))->std::string::assign(pbVar6,GHIDRA_INT(pbVar10) - GHIDRA_INT((pbVar6 + 1))); } } if (attribute[4] == 0) break; @@ -1494,7 +1494,7 @@ LAB_0082c165: if (isAppend == 0) { cursesBegin = (this->_curses)._begin; *(int *)((char *)cursesBegin + curseId * 0x1c) = curseId; - ppppbVar9 = (byte ****)((int)cursesBegin + curseId * 0x1c + 4); + ppppbVar9 = (byte ****)(GHIDRA_INT(cursesBegin) + curseId * 0x1c + 4); if ((byte *****)ppppbVar9 != curseName) { text = (byte ****)curseName; if (0xf < uStack_10060) { @@ -1505,7 +1505,7 @@ LAB_0082c165: } else { piVar7 = (this->_curses)._end; - curseId = ((int)piVar7 - (int)(this->_curses)._begin) / 0x1c; + curseId = (GHIDRA_INT(piVar7) - GHIDRA_INT((this->_curses)._begin)) / 0x1c; if (piVar7 == (this->_curses)._capacity) { FUN_0082e0e0(piVar7,&curseId); } @@ -1513,7 +1513,7 @@ LAB_0082c165: *piVar7 = curseId; ((std::string *)((char *)(piVar7 + 1)))->std::string::string(curseName); ppvVar2 = &(this->_curses)._end; - *ppvVar2 = (void *)((int)*ppvVar2 + 0x1c); + *ppvVar2 = (void *)(GHIDRA_INT(*ppvVar2) + 0x1c); } } local_8 = local_8 & 0xffffff00; @@ -1523,7 +1523,7 @@ LAB_0082c165: if (0xfff < curseCount) { ppppbVar9 = (byte ****)curseName[0][-1]; curseCount = uStack_10060 + 0x24; - if ((byte *)0x1f < (byte *)((int)curseName[0] + (-4 - (int)ppppbVar9))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(curseName[0]) + (-4 - GHIDRA_INT(ppppbVar9)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1537,14 +1537,14 @@ LAB_0082c165: allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (pbStack_1007c != (byte *)0x0) { curseCount = *(uint *)(pbStack_1007c + -4); qVar3 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - curseCount; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - curseCount; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar3 < curseCount); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar3) < curseCount)); free(pbStack_1007c + -4); } bVar4 = 1; @@ -1591,7 +1591,7 @@ LAB_0082d065: if (levelStage == 0xd) { return 0x23; } - if (8 < (int)levelStage) { + if (8 < GHIDRA_INT(levelStage)) { if (levelStage == 9) { uVar1 = 0xd; if (stageType == 4) { @@ -1640,7 +1640,7 @@ int RoomConfig::GetStageIdByName(std_string *name) local_8 = 0xffffffff; puStack_c = &LAB_00b01e65; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(local_20 + 0x1c); + local_14 = __security_cookie ^ GHIDRA_UINT((local_20 + 0x1c)); ExceptionList = &local_10; nameMapHead = (undefined1 *)0x0; nameMapSize = 0; @@ -1662,23 +1662,23 @@ int RoomConfig::GetStageIdByName(std_string *name) bVar1 = *nameEnd; nameEnd = nameEnd + 1; } while (bVar1 != 0); - ((std::string *)((char *)stageName))->std::string::assign(nameEnd,(int)nameEnd - (int)(nameEnd + 1)); - local_8._0_1_ = 1; + ((std::string *)((char *)stageName))->std::string::assign(nameEnd,GHIDRA_INT(nameEnd) - GHIDRA_INT((nameEnd + 1))); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; foundNode = (uint *)FUN_0069d630(stageName); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; *foundNode = stageIdx; if (&DAT_0000000f < local_18) { puVar4 = local_18 + 1; ptr = stageName[0]; if ((undefined1 *)0xfff < puVar4) { - ptr = *(void **)((int)stageName[0] + -4); + ptr = *(void **)(GHIDRA_INT(stageName[0]) + -4); puVar4 = local_18 + 0x24; - if (0x1f < (uint)((int)stageName[0] + (-4 - (int)ptr))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(stageName[0]) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(ptr,(uint)puVar4); + operator_delete(ptr,GHIDRA_UINT(puVar4)); } stageIdx = stageIdx + 1; } while (stageIdx < 0x1e); @@ -1744,7 +1744,7 @@ void RoomConfig::ClearGeneratedRooms() do { entry = roomNode[0x12] + entryOffset; if (*(char *)(entry + 8) != '\0') { - allocatedBytes = (qword *)((int)heap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(heap) + 0x30); if (heap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } @@ -1752,9 +1752,9 @@ void RoomConfig::ClearGeneratedRooms() allocBlock = (uint *)(*(int *)(entry + 4) + -4); allocSize = *allocBlock; prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - allocSize; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - allocSize; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < allocSize) + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < allocSize)) ; free(allocBlock); heap = g_mainHeap; @@ -1765,7 +1765,7 @@ void RoomConfig::ClearGeneratedRooms() *(undefined1 *)(entry + 8) = 0; entryIndex = entryIndex + 1; } while (entryIndex < *(ushort *)(roomNode + 0x13)); - allocatedBytes = (qword *)((int)heap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(heap) + 0x30); if (heap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } @@ -1773,9 +1773,9 @@ void RoomConfig::ClearGeneratedRooms() allocBlock = (uint *)(roomNode[0x12] + -4); allocSize = *allocBlock; prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - allocSize; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - allocSize; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)prevAllocatedBytes < allocSize); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(prevAllocatedBytes) < allocSize)); free(allocBlock); heap = g_mainHeap; } @@ -1828,7 +1828,7 @@ RoomConfig_Room * RoomConfig::make_generated_room(RoomConfig_Room *source) local_8 = 0xffffffff; puStack_c = &LAB_00b01f26; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(doorRemap + 0xc); + local_14 = __security_cookie ^ GHIDRA_UINT((doorRemap + 0xc)); ExceptionList = &local_10; std::list<92byte>::resize(*(int *)&(*(undefined1 *)((char *)&(this[1]) + 0x1c4)) + 1); srcEntries = source->Shape; @@ -1840,11 +1840,11 @@ RoomConfig_Room * RoomConfig::make_generated_room(RoomConfig_Room *source) *(undefined4 *)(newNode + 0x40) = 0; shapeFlag = (&DAT_00b1f8cc)[srcEntries * 8]; doorRemap[6] = 4; - doorRemap[1] = (uint)(shapeFlag != '\0') * 4 + 1; - doorRemap[3] = (uint)(shapeFlag != '\0') * 4 + 3; - doorRemap[5] = (uint)(shapeFlag == '\0') * 4 + 1; + doorRemap[1] = GHIDRA_UINT((shapeFlag != '\0')) * 4 + 1; + doorRemap[3] = GHIDRA_UINT((shapeFlag != '\0')) * 4 + 3; + doorRemap[5] = GHIDRA_UINT((shapeFlag == '\0')) * 4 + 1; uVar2 = 0; - doorRemap[7] = (uint)(shapeFlag == '\0') * 4 + 3; + doorRemap[7] = GHIDRA_UINT((shapeFlag == '\0')) * 4 + 3; do { doorWord = uVar2 >> 5; doorBit = 1 << ((byte)uVar2 & 0x1f); @@ -1869,14 +1869,14 @@ RoomConfig_Room * RoomConfig::make_generated_room(RoomConfig_Room *source) *(int *)(newNode + 0x14) = source->Variant; *(int *)(newNode + 0x18) = source->Subtype; *(uint *)(newNode + 0x54) = *(uint *)&(*(undefined1 *)((char *)(source) + 0x4c)) | 0x20; - uVar2 = (uint)(ushort)source->SpawnCount; + uVar2 = GHIDRA_UINT((ushort)source->SpawnCount); *(short *)(newNode + 0x4c) = source->SpawnCount; pvVar1 = operator_new_tracked(uVar2 * 0x10); if (pvVar1 == (void *)0x0) { pvVar1 = (void *)0x0; } else if (uVar2 != 0) { - dstSpawn = (undefined4 *)((int)pvVar1 + 4); + dstSpawn = (undefined4 *)(GHIDRA_INT(pvVar1) + 4); do { dstSpawn[-1] = 0; *dstSpawn = 0; @@ -1890,16 +1890,16 @@ RoomConfig_Room * RoomConfig::make_generated_room(RoomConfig_Room *source) *(void **)(newNode + 0x48) = pvVar1; spawnIndex = 0; if (source->SpawnCount != 0) { - dstSpawn = (undefined4 *)((int)pvVar1 + 0xc); + dstSpawn = (undefined4 *)(GHIDRA_INT(pvVar1) + 0xc); srcSpawnOffset = 0; do { - srcSpawn = (short *)((int)source->Spawns + srcSpawnOffset); + srcSpawn = (short *)(GHIDRA_INT(source->Spawns) + srcSpawnOffset); *(ushort *)(dstSpawn + -3) = ((ushort)*(byte *)(newNode + 0x4e) - *srcSpawn) + -1; *(short *)((char *)dstSpawn + -10) = srcSpawn[1]; *dstSpawn = *(undefined4 *)(srcSpawn + 6); *(char *)(dstSpawn + -1) = (char)srcSpawn[4]; if (*(byte *)(srcSpawn + 4) != 0) { - pvVar1 = operator_new_tracked((uint)*(byte *)(srcSpawn + 4) * 0xc); + pvVar1 = operator_new_tracked(GHIDRA_UINT(*(byte *)(srcSpawn + 4)) * 0xc); dstSpawn[-2] = pvVar1; entryIndex = 0; if ((char)srcSpawn[4] != '\0') { diff --git a/src/game/room_config_mode.cpp b/src/game/room_config_mode.cpp index 8a7a37d..3cc0e16 100644 --- a/src/game/room_config_mode.cpp +++ b/src/game/room_config_mode.cpp @@ -75,7 +75,7 @@ void RoomConfigMode::Clear() do { spawnEntry = *(int *)(room + 0x40) + spawnOffset; if (*(char *)(spawnEntry + 8) != '\0') { - allocCounter = (qword *)((int)pvVar2 + 0x30); + allocCounter = (qword *)(GHIDRA_INT(pvVar2) + 0x30); if (pvVar2 == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } @@ -83,9 +83,9 @@ void RoomConfigMode::Clear() blockHeader = (uint *)(*(int *)(spawnEntry + 4) + -4); blockSize = *blockHeader; qVar1 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - blockSize; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - blockSize; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar1 < blockSize); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < blockSize)); free(blockHeader); pvVar2 = g_mainHeap; } @@ -95,7 +95,7 @@ void RoomConfigMode::Clear() *(undefined1 *)(spawnEntry + 8) = 0; spawnIdx = spawnIdx + 1; } while (spawnIdx < *(ushort *)(room + 0x44)); - allocCounter = (qword *)((int)pvVar2 + 0x30); + allocCounter = (qword *)(GHIDRA_INT(pvVar2) + 0x30); if (pvVar2 == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } @@ -103,9 +103,9 @@ void RoomConfigMode::Clear() blockHeader = (uint *)(*(int *)(room + 0x40) + -4); blockSize = *blockHeader; qVar1 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - blockSize; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - blockSize; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar1 < blockSize); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < blockSize)); free(blockHeader); pvVar2 = g_mainHeap; } @@ -119,14 +119,14 @@ void RoomConfigMode::Clear() } pvVar2 = *(void **)((char *)roomMap + 0x18); if (pvVar2 != (void *)0x0) { - blockHeader = (uint *)((int)pvVar2 + -4); + blockHeader = (uint *)(GHIDRA_INT(pvVar2) + -4); uStack_8 = 2; _eh_vector_destructor_iterator_(pvVar2,0x5c,*blockHeader,RoomConfigRoom::dtor); operator_delete(blockHeader,*blockHeader * 0x5c + 4); } } piVar3 = *(int **)((char *)roomMap + 0x20); - this_00 = (undefined4 *)((int)roomMap + 0x20); + this_00 = (undefined4 *)(GHIDRA_INT(roomMap) + 0x20); mapNode = (int *)*piVar3; if (mapNode != piVar3) { do { @@ -169,9 +169,9 @@ void RoomConfigMode::Clear() FID_conflict__Erase_tree_>_> (this_00,(fuzzer_allocator_> *)this_00, (_Tree_node *)piVar3[1]); - piVar3[1] = (int)piVar3; - *piVar3 = (int)piVar3; - piVar3[2] = (int)piVar3; + piVar3[1] = GHIDRA_INT(piVar3); + *piVar3 = GHIDRA_INT(piVar3); + piVar3[2] = GHIDRA_INT(piVar3); *(undefined4 *)((char *)roomMap + 0x24) = 0; *(undefined4 *)((char *)roomMap + 0x1c) = 0; *(undefined4 *)((char *)roomMap + 0x18) = 0; diff --git a/src/game/room_config_room.cpp b/src/game/room_config_room.cpp index c656bbb..d99a9a0 100644 --- a/src/game/room_config_room.cpp +++ b/src/game/room_config_room.cpp @@ -3,7 +3,7 @@ // 006ef3e0 void RoomConfigRoom::dtor() { - ((std::string *)((char *)((int)this + 0x14)))->std::string::_Tidy_deallocate(); + ((std::string *)((char *)(GHIDRA_INT(this) + 0x14)))->std::string::_Tidy_deallocate(); return; } @@ -54,7 +54,7 @@ RoomConfig_Room * RoomConfigRoom::ParseXml(RoomConfig_Room *outRoom, void *node, local_14 = (byte ****)0xffffffff; puStack_18 = &LAB_00b01b86; local_1c = ExceptionList; - uVar2 = __security_cookie ^ (uint)(local_3c + 0xb); + uVar2 = __security_cookie ^ GHIDRA_UINT((local_3c + 0xb)); ExceptionList = &local_1c; puVar4 = *(undefined4 **)((char *)node + 0x20); pcVar11 = atoi_exref; @@ -74,7 +74,7 @@ RoomConfig_Room * RoomConfigRoom::ParseXml(RoomConfig_Room *outRoom, void *node, pbVar7 = (byte *)*puVar4; if (local_49 != *pbVar10) { LAB_00829b94: - uVar6 = -(uint)bVar15 | 1; + uVar6 = -GHIDRA_UINT(bVar15) | 1; goto LAB_00829b99; } if (local_49 == 0) break; @@ -109,7 +109,7 @@ LAB_00829b99: pbVar10 = (byte *)*puVar4; if (local_49 != *pcVar13) { LAB_00829bf3: - uVar6 = -(uint)bVar15 | 1; + uVar6 = -GHIDRA_UINT(bVar15) | 1; goto LAB_00829bf8; } if (local_49 == 0) break; @@ -145,7 +145,7 @@ LAB_00829bf8: pbVar10 = (byte *)*puVar4; if (local_49 != *pcVar13) { LAB_00829c55: - uVar6 = -(uint)bVar15 | 1; + uVar6 = -GHIDRA_UINT(bVar15) | 1; goto LAB_00829c5a; } if (local_49 == 0) break; @@ -180,7 +180,7 @@ LAB_00829c5a: pbVar10 = (byte *)*puVar4; if (local_49 != *pbVar7) { LAB_00829cb4: - uVar6 = -(uint)bVar15 | 1; + uVar6 = -GHIDRA_UINT(bVar15) | 1; goto LAB_00829cb9; } if (local_49 == 0) break; @@ -201,11 +201,11 @@ LAB_00829cb9: pppppbVar8 = in_stack_ffffff60; do { bVar1 = *(byte *)pppppbVar8; - pppppbVar8 = (byte *****)((int)pppppbVar8 + 1); + pppppbVar8 = (byte *****)(GHIDRA_INT(pppppbVar8) + 1); } while (bVar1 != 0); - in_stack_ffffff64 = (byte *****)((int)pppppbVar8 - (int)((int)in_stack_ffffff60 + 1)); + in_stack_ffffff64 = (byte *****)(GHIDRA_INT(pppppbVar8) - GHIDRA_INT((GHIDRA_INT(in_stack_ffffff60) + 1))); ((std::string *)(&(*(undefined1 *)((char *)(room) + 0x14))))->std::string::assign((byte *)in_stack_ffffff60, - (uint)in_stack_ffffff64); + GHIDRA_UINT(in_stack_ffffff64)); LAB_00829ce6: pcVar12 = atoi_exref; } @@ -221,7 +221,7 @@ LAB_00829ce6: pbVar10 = (byte *)*puVar4; if (local_49 != *pcVar13) { LAB_00829d5e: - uVar6 = -(uint)bVar15 | 1; + uVar6 = -GHIDRA_UINT(bVar15) | 1; goto LAB_00829d63; } if (local_49 == 0) break; @@ -256,7 +256,7 @@ LAB_00829d63: pbVar10 = (byte *)*puVar4; if (local_49 != *pcVar13) { LAB_00829dbe: - uVar6 = -(uint)bVar15 | 1; + uVar6 = -GHIDRA_UINT(bVar15) | 1; goto LAB_00829dc3; } if (local_49 == 0) break; @@ -292,7 +292,7 @@ LAB_00829dc3: pbVar10 = (byte *)*puVar4; if (local_49 != *pcVar13) { LAB_00829e30: - uVar6 = -(uint)bVar15 | 1; + uVar6 = -GHIDRA_UINT(bVar15) | 1; goto LAB_00829e35; } if (local_49 == 0) break; @@ -329,7 +329,7 @@ LAB_00829e35: bVar15 = bVar1 < (byte)*pcVar13; if (bVar1 != *pcVar13) { LAB_00829e90: - uVar6 = -(uint)bVar15 | 1; + uVar6 = -GHIDRA_UINT(bVar15) | 1; goto LAB_00829e95; } if (bVar1 == 0) break; @@ -361,7 +361,7 @@ LAB_00829e95: bVar15 = bVar1 < (byte)*pcVar13; if (bVar1 != *pcVar13) { LAB_00829ef0: - uVar6 = -(uint)bVar15 | 1; + uVar6 = -GHIDRA_UINT(bVar15) | 1; goto LAB_00829ef5; } if (bVar1 == 0) break; @@ -393,7 +393,7 @@ LAB_00829ef5: bVar15 = bVar1 < (byte)*pcVar13; if (bVar1 != *pcVar13) { LAB_00829f50: - uVar6 = -(uint)bVar15 | 1; + uVar6 = -GHIDRA_UINT(bVar15) | 1; goto LAB_00829f55; } if (bVar1 == 0) break; @@ -434,7 +434,7 @@ LAB_00829f55: } else { childNode = xml_node::first_node - (node,&DAT_00b6cb48,(int)in_stack_ffffff60,(byte)in_stack_ffffff64); + (node,&DAT_00b6cb48,GHIDRA_INT(in_stack_ffffff60),(byte)in_stack_ffffff64); bVar1 = (byte)in_stack_ffffff64; if (childNode != (undefined4 *)0x0) { LAB_00829fa0: @@ -451,7 +451,7 @@ LAB_00829fa0: bVar15 = bVar1 < *pbVar7; if (bVar1 != *pbVar7) { LAB_00829fe1: - uVar2 = -(uint)bVar15 | 1; + uVar2 = -GHIDRA_UINT(bVar15) | 1; goto LAB_00829fe6; } if (bVar1 == 0) break; @@ -483,7 +483,7 @@ LAB_00829fe6: bVar15 = bVar1 < *pbVar7; if (bVar1 != *pbVar7) { LAB_0082a040: - uVar2 = -(uint)bVar15 | 1; + uVar2 = -GHIDRA_UINT(bVar15) | 1; goto LAB_0082a045; } if (bVar1 == 0) break; @@ -514,7 +514,7 @@ LAB_0082a045: bVar15 = bVar1 < (byte)*pcVar13; if (bVar1 != *pcVar13) { LAB_0082a0a0: - uVar2 = -(uint)bVar15 | 1; + uVar2 = -GHIDRA_UINT(bVar15) | 1; goto LAB_0082a0a5; } if (bVar1 == 0) break; @@ -537,17 +537,17 @@ LAB_0082a0a5: pppppbVar8 = in_stack_ffffff60; do { bVar1 = *(byte *)pppppbVar8; - pppppbVar8 = (byte *****)((int)pppppbVar8 + 1); + pppppbVar8 = (byte *****)(GHIDRA_INT(pppppbVar8) + 1); } while (bVar1 != 0); - in_stack_ffffff64 = (byte *****)((int)pppppbVar8 - (int)((int)in_stack_ffffff60 + 1)); - ((std::string *)((char *)local_3c))->std::string::assign((byte *)in_stack_ffffff60,(uint)in_stack_ffffff64); + in_stack_ffffff64 = (byte *****)(GHIDRA_INT(pppppbVar8) - GHIDRA_INT((GHIDRA_INT(in_stack_ffffff60) + 1))); + ((std::string *)((char *)local_3c))->std::string::assign((byte *)in_stack_ffffff60,GHIDRA_UINT(in_stack_ffffff64)); if (uStack_2c == 0) { LAB_0082a1a2: local_49 = 0; } else { pppppbVar8 = (byte *****)local_3c; - if (0xf < (uint)fStack_28) { + if (0xf < GHIDRA_UINT(fStack_28)) { pppppbVar8 = local_3c[0]; } if (uStack_2c == 4) { @@ -562,14 +562,14 @@ LAB_0082a1a2: uVar2 = 0; } else { - uVar2 = -(uint)bVar15 | 1; + uVar2 = -GHIDRA_UINT(bVar15) | 1; } if (uVar2 != 0) goto LAB_0082a13d; } else { LAB_0082a13d: pppppbVar8 = (byte *****)local_3c; - if (0xf < (uint)fStack_28) { + if (0xf < GHIDRA_UINT(fStack_28)) { pppppbVar8 = local_3c[0]; } if (uStack_2c == 4) { @@ -584,12 +584,12 @@ LAB_0082a13d: uVar2 = 0; } else { - uVar2 = -(uint)bVar15 | 1; + uVar2 = -GHIDRA_UINT(bVar15) | 1; } if (uVar2 == 0) goto LAB_0082a19c; } in_stack_ffffff64 = (byte *****)local_3c; - if (0xf < (uint)fStack_28) { + if (0xf < GHIDRA_UINT(fStack_28)) { in_stack_ffffff64 = local_3c[0]; } in_stack_ffffff60 = (byte *****)0x82a18f; @@ -599,18 +599,18 @@ LAB_0082a13d: LAB_0082a19c: local_49 = 1; } - if (0xf < (uint)fStack_28) { - in_stack_ffffff64 = (byte *****)((int)fStack_28 + 1); + if (0xf < GHIDRA_UINT(fStack_28)) { + in_stack_ffffff64 = (byte *****)(GHIDRA_INT(fStack_28) + 1); in_stack_ffffff60 = local_3c[0]; if ((byte *****)0xfff < in_stack_ffffff64) { in_stack_ffffff60 = (byte *****)local_3c[0][-1]; - in_stack_ffffff64 = (byte *****)((int)fStack_28 + 0x24); - if ((byte *)0x1f < (byte *)((int)local_3c[0] + (-4 - (int)in_stack_ffffff60))) { + in_stack_ffffff64 = (byte *****)(GHIDRA_INT(fStack_28) + 0x24); + if ((byte *)0x1f < (byte *)(GHIDRA_INT(local_3c[0]) + (-4 - GHIDRA_INT(in_stack_ffffff60)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(in_stack_ffffff60,(uint)in_stack_ffffff64); + operator_delete(in_stack_ffffff60,GHIDRA_UINT(in_stack_ffffff64)); } } } @@ -620,8 +620,8 @@ LAB_0082a19c: if (local_49 != 0) { in_stack_ffffff64 = (byte *****)room->Shape; in_stack_ffffff60 = (byte *****)0x82a211; - uVar2 = RoomConfig::get_door_from_position((short)local_6c,(int)in_stack_ffffff64); - if (-1 < (int)uVar2) { + uVar2 = RoomConfig::get_door_from_position((short)local_6c,GHIDRA_INT(in_stack_ffffff64)); + if (-1 < GHIDRA_INT(uVar2)) { if (7 < uVar2) { LAB_0082a913: /* WARNING: Subroutine does not return */ @@ -648,9 +648,9 @@ LAB_0082a913: pcVar13 = (char *)childNode[2]; } if (pcVar13 == pcVar14 + -0xb6cb47) { - pbVar10 = (byte *)(pcVar13 + (int)pbVar5); + pbVar10 = (byte *)(pcVar13 + GHIDRA_INT(pbVar5)); if (pbVar10 <= pbVar5) goto LAB_00829fa0; - iVar3 = (int)&DAT_00b6cb48 - (int)pbVar5; + iVar3 = GHIDRA_INT(&DAT_00b6cb48) - GHIDRA_INT(pbVar5); while (*pbVar5 == pbVar5[iVar3]) { pbVar5 = pbVar5 + 1; if (pbVar10 <= pbVar5) goto LAB_00829fa0; @@ -663,12 +663,12 @@ LAB_0082a913: } spawnsLast = (undefined4 *)0x0; local_14 = (byte ****)0x0; - spawnNode = ((xml_node *)(node))->xml_node::first_node((byte *)&DAT_00b65804,(int)in_stack_ffffff60,bVar1); + spawnNode = ((xml_node *)(node))->xml_node::first_node((byte *)&DAT_00b65804,GHIDRA_INT(in_stack_ffffff60),bVar1); if (spawnNode != (undefined4 *)0x0) { LAB_0082a2d1: puVar4 = (undefined4 *)spawnNode[8]; local_58 = 0; - local_58._0_2_ = 0; + (*(undefined2 *)((char *)&(local_58) + 0x0)) = 0; spawnCoords = 0; spawnEntries = (void *)0x0; uStack_2c = uStack_2c & 0xffffff00; @@ -685,7 +685,7 @@ LAB_0082a2d1: bVar15 = bVar1 < *pbVar7; if (bVar1 != *pbVar7) { LAB_0082a326: - uVar2 = -(uint)bVar15 | 1; + uVar2 = -GHIDRA_UINT(bVar15) | 1; goto LAB_0082a32b; } if (bVar1 == 0) break; @@ -703,7 +703,7 @@ LAB_0082a32b: pbVar5 = (byte *)puVar4[1]; } local_58 = atoi((char *)pbVar5); - spawnCoords = CONCAT22(spawnCoords._2_2_,(short)local_58); + spawnCoords = CONCAT22((*(undefined2 *)((char *)&(spawnCoords) + 0x2)),(short)local_58); } else { pbVar7 = &DAT_00b6cb44; @@ -716,7 +716,7 @@ LAB_0082a32b: bVar15 = bVar1 < *pbVar7; if (bVar1 != *pbVar7) { LAB_0082a380: - uVar2 = -(uint)bVar15 | 1; + uVar2 = -GHIDRA_UINT(bVar15) | 1; goto LAB_0082a385; } if (bVar1 == 0) break; @@ -740,7 +740,7 @@ LAB_0082a385: if (puVar4[4] == 0) break; } entriesLast = (int *)0x0; - local_14 = (byte ****)CONCAT31(local_14._1_3_,1); + local_14 = (byte ****)CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); pcVar13 = "entity"; do { pcVar14 = pcVar13; @@ -759,9 +759,9 @@ LAB_0082a385: pcVar13 = (char *)childNode[2]; } if (pcVar13 == pcVar14 + -0xb66be3) { - pbVar10 = (byte *)(pcVar13 + (int)pbVar5); + pbVar10 = (byte *)(pcVar13 + GHIDRA_INT(pbVar5)); if (pbVar10 <= pbVar5) goto LAB_0082a433; - iVar3 = (int)"entity" - (int)pbVar5; + iVar3 = GHIDRA_INT("entity") - GHIDRA_INT(pbVar5); while (*pbVar5 == pbVar5[iVar3]) { pbVar5 = pbVar5 + 1; if (pbVar10 <= pbVar5) goto LAB_0082a433; @@ -772,16 +772,16 @@ LAB_0082a385: goto LAB_0082a490; } LAB_0082a82c: - uVar2 = (int)spawnsLast >> 4; + uVar2 = GHIDRA_INT(spawnsLast) >> 4; std::_Sort_unchecked<16byte>(uVar2,FUN_008299e0); spawns = operator_new_tracked - (-(uint)((int)((ulonglong)uVar2 * 0x10 >> 0x20) != 0) | - (uint)((ulonglong)uVar2 * 0x10)); + (-GHIDRA_UINT((GHIDRA_INT(((ulonglong)uVar2 * 0x10 >> 0x20)) != 0)) | + GHIDRA_UINT(((ulonglong)uVar2 * 0x10))); if (spawns == (void *)0x0) { spawns = (void *)0x0; } else if (uVar2 != 0) { - puVar4 = (undefined4 *)((int)spawns + 4); + puVar4 = (undefined4 *)(GHIDRA_INT(spawns) + 4); uVar6 = uVar2; do { *(undefined1 *)(puVar4 + 1) = 0; @@ -792,7 +792,7 @@ LAB_0082a82c: puVar4 = puVar4 + 4; } while (uVar6 != 0); } - local_14 = (byte ****)((uint)local_14 & 0xffffff00); + local_14 = (byte ****)(GHIDRA_UINT(local_14) & 0xffffff00); room->SpawnCount = (short)uVar2; room->Spawns = spawns; memcpy(spawns,(void *)0x0,uVar2 << 4); @@ -814,7 +814,7 @@ LAB_0082a433: bVar15 = bVar1 < *pbVar7; if (bVar1 != *pbVar7) { LAB_0082a4f8: - uVar2 = -(uint)bVar15 | 1; + uVar2 = -GHIDRA_UINT(bVar15) | 1; goto LAB_0082a4fd; } if (bVar1 == 0) break; @@ -844,7 +844,7 @@ LAB_0082a4fd: bVar15 = bVar1 < (byte)*pcVar13; if (bVar1 != *pcVar13) { LAB_0082a550: - uVar2 = -(uint)bVar15 | 1; + uVar2 = -GHIDRA_UINT(bVar15) | 1; goto LAB_0082a555; } if (bVar1 == 0) break; @@ -862,7 +862,7 @@ LAB_0082a555: pbVar5 = (byte *)puVar4[1]; } iVar3 = atoi((char *)pbVar5); - uStack_44 = CONCAT22(uStack_44._2_2_,(short)iVar3); + uStack_44 = CONCAT22((*(undefined2 *)((char *)&(uStack_44) + 0x2)),(short)iVar3); } else { pcVar13 = "subtype"; @@ -875,7 +875,7 @@ LAB_0082a555: bVar15 = bVar1 < (byte)*pcVar13; if (bVar1 != *pcVar13) { LAB_0082a5a5: - uVar2 = -(uint)bVar15 | 1; + uVar2 = -GHIDRA_UINT(bVar15) | 1; goto LAB_0082a5aa; } if (bVar1 == 0) break; @@ -906,7 +906,7 @@ LAB_0082a5aa: bVar15 = bVar1 < (byte)*pcVar13; if (bVar1 != *pcVar13) { LAB_0082a5f7: - uVar2 = -(uint)bVar15 | 1; + uVar2 = -GHIDRA_UINT(bVar15) | 1; goto LAB_0082a5fc; } if (bVar1 == 0) break; @@ -934,7 +934,7 @@ LAB_0082a5fc: } if (entityType == 0x3ca) { if (((short)uStack_44 == 2) && - (uVar2 = RoomConfig::get_door_from_position((short)local_58,room->Shape), -1 < (int)uVar2)) { + (uVar2 = RoomConfig::get_door_from_position((short)local_58,room->Shape), -1 < GHIDRA_INT(uVar2))) { if (7 < uVar2) goto LAB_0082a913; *(uint *)(&(*(undefined1 *)((char *)(room) + 0x3c)) + (uVar2 >> 5) * 4) = *(uint *)(&(*(undefined1 *)((char *)(room) + 0x3c)) + (uVar2 >> 5) * 4) | 1 << ((byte)uVar2 & 0x1f); @@ -949,7 +949,7 @@ LAB_0082a5fc: else { *entriesLast = entityType; entriesLast[1] = uStack_44; - entriesLast[2] = (int)entityWeight; + entriesLast[2] = GHIDRA_INT(entityWeight); entriesLast = entriesLast + 3; } pcVar13 = "entity"; @@ -969,9 +969,9 @@ LAB_0082a5fc: pcVar13 = (char *)childNode[2]; } if (pcVar13 == pcVar14 + -0xb66be3) { - pbVar10 = (byte *)(pcVar13 + (int)pbVar5); + pbVar10 = (byte *)(pcVar13 + GHIDRA_INT(pbVar5)); if (pbVar10 <= pbVar5) goto LAB_0082a433; - iVar3 = (int)"entity" - (int)pbVar5; + iVar3 = GHIDRA_INT("entity") - GHIDRA_INT(pbVar5); while (*pbVar5 == pbVar5[iVar3]) { pbVar5 = pbVar5 + 1; if (pbVar10 <= pbVar5) goto LAB_0082a433; @@ -984,12 +984,12 @@ LAB_0082a5fc: LAB_0082a490: piVar9 = entriesLast; LAB_0082a493: - uVar2 = (int)piVar9 / 0xc; + uVar2 = GHIDRA_INT(piVar9) / 0xc; spawnEntries = operator_new_tracked - (-(uint)((int)((ulonglong)uVar2 * 0xc >> 0x20) != 0) | - (uint)((ulonglong)uVar2 * 0xc)); + (-GHIDRA_UINT((GHIDRA_INT(((ulonglong)uVar2 * 0xc >> 0x20)) != 0)) | + GHIDRA_UINT(((ulonglong)uVar2 * 0xc))); memcpy(spawnEntries,(void *)0x0,uVar2 * 0xc); - uStack_2c = CONCAT31(uStack_2c._1_3_,(char)uVar2); + uStack_2c = CONCAT31((*(undefined1 *)((char *)&(uStack_2c) + 0x1)),(char)uVar2); if (spawnsLast == (undefined4 *)0x0) { std::vector::_Emplace_reallocate(0,&spawnCoords); } @@ -1000,7 +1000,7 @@ LAB_0082a493: spawnsLast[3] = fStack_28; spawnsLast = spawnsLast + 4; } - local_14 = (byte ****)((uint)local_14 & 0xffffff00); + local_14 = (byte ****)(GHIDRA_UINT(local_14) & 0xffffff00); pcVar13 = "spawn"; do { pcVar14 = pcVar13; @@ -1018,9 +1018,9 @@ LAB_0082a493: pcVar13 = (char *)spawnNode[2]; } if (pcVar13 == pcVar14 + -0xb65803) { - pbVar10 = (byte *)(pcVar13 + (int)pbVar5); + pbVar10 = (byte *)(pcVar13 + GHIDRA_INT(pbVar5)); if (pbVar10 <= pbVar5) goto LAB_0082a2d1; - iVar3 = (int)&DAT_00b65804 - (int)pbVar5; + iVar3 = GHIDRA_INT(&DAT_00b65804) - GHIDRA_INT(pbVar5); while (*pbVar5 == pbVar5[iVar3]) { pbVar5 = pbVar5 + 1; if (pbVar10 <= pbVar5) goto LAB_0082a2d1; diff --git a/src/game/room_config_stage.cpp b/src/game/room_config_stage.cpp index 526411e..66be9a4 100644 --- a/src/game/room_config_stage.cpp +++ b/src/game/room_config_stage.cpp @@ -40,14 +40,14 @@ void RoomConfig_Stage::unload() roomOffset = 0; nextNode = g_mainHeap; do { - room = (int)roomSet[-2] + roomOffset; + room = GHIDRA_INT(roomSet[-2]) + roomOffset; if (*(short *)(room + 0x44) != 0) { spawnIndex = 0; spawnOffset = 0; do { spawnEntry = *(int *)(room + 0x40) + spawnOffset; if (*(char *)(spawnEntry + 8) != '\0') { - allocatedBytes = (qword *)((int)nextNode + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(nextNode) + 0x30); if (nextNode == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } @@ -55,9 +55,9 @@ void RoomConfig_Stage::unload() allocHeader = (uint *)(*(int *)(spawnEntry + 4) + -4); blockSize = *allocHeader; qVar2 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - blockSize; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - blockSize; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar2 < blockSize); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < blockSize)); free(allocHeader); nextNode = g_mainHeap; } @@ -67,7 +67,7 @@ void RoomConfig_Stage::unload() *(undefined1 *)(spawnEntry + 8) = 0; spawnIndex = spawnIndex + 1; } while (spawnIndex < *(ushort *)(room + 0x44)); - allocatedBytes = (qword *)((int)nextNode + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(nextNode) + 0x30); if (nextNode == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } @@ -75,23 +75,23 @@ void RoomConfig_Stage::unload() allocHeader = (uint *)(*(int *)(room + 0x40) + -4); blockSize = *allocHeader; qVar2 = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - blockSize; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - blockSize; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)qVar2 < blockSize); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < blockSize)); free(allocHeader); nextNode = g_mainHeap; } uStack_8 = 0xffffffff; } *(undefined4 *)(room + 0x40) = 0; - roomIndex = (RoomConfig_Stage)((int)roomIndex + 1); + roomIndex = (RoomConfig_Stage)(GHIDRA_INT(roomIndex) + 1); *(undefined2 *)(room + 0x44) = 0; roomOffset = roomOffset + 0x5c; - } while ((uint)roomIndex < (uint)roomSet[-1]); + } while (GHIDRA_UINT(roomIndex) < GHIDRA_UINT(roomSet[-1])); } RVar5 = roomSet[-2]; if (RVar5 != (RoomConfig_Stage)0x0) { - allocHeader = (uint *)((int)RVar5 + -4); + allocHeader = (uint *)(GHIDRA_INT(RVar5) + -4); uStack_8 = 2; _eh_vector_destructor_iterator_((void *)RVar5,0x5c,*allocHeader,RoomConfigRoom::dtor); operator_delete(allocHeader,*allocHeader * 0x5c + 4); @@ -116,22 +116,22 @@ void RoomConfig_Stage::unload() } RVar5 = *(RoomConfig_Stage *)((char *)treeNode + 8); if (*(char *)((char *)RVar5 + 0xd) == '\0') { - cVar1 = *(char *)((int)*(RoomConfig_Stage *)RVar5 + 0xd); + cVar1 = *(char *)(GHIDRA_INT(*(RoomConfig_Stage *)RVar5) + 0xd); treeNode = RVar5; RVar5 = *(RoomConfig_Stage *)RVar5; while (cVar1 == '\0') { - cVar1 = *(char *)((int)*(RoomConfig_Stage *)RVar5 + 0xd); + cVar1 = *(char *)(GHIDRA_INT(*(RoomConfig_Stage *)RVar5) + 0xd); treeNode = RVar5; RVar5 = *(RoomConfig_Stage *)RVar5; } } else { - cVar1 = *(char *)((int)*(RoomConfig_Stage *)((char *)treeNode + 4) + 0xd); + cVar1 = *(char *)(GHIDRA_INT(*(RoomConfig_Stage *)((char *)treeNode + 4)) + 0xd); RVar3 = *(RoomConfig_Stage *)((char *)treeNode + 4); RVar5 = treeNode; while ((treeNode = RVar3, cVar1 == '\0' && (RVar5 == *(RoomConfig_Stage *)((char *)treeNode + 8)))) { - cVar1 = *(char *)((int)*(RoomConfig_Stage *)((char *)treeNode + 4) + 0xd); + cVar1 = *(char *)(GHIDRA_INT(*(RoomConfig_Stage *)((char *)treeNode + 4)) + 0xd); RVar3 = *(RoomConfig_Stage *)((char *)treeNode + 4); RVar5 = treeNode; } @@ -141,7 +141,7 @@ void RoomConfig_Stage::unload() } FID_conflict__Erase_tree_>_> (roomSet,(fuzzer_allocator_> *)roomSet, - *(_Tree_node **)((int)RVar5 + 4)); + *(_Tree_node **)(GHIDRA_INT(RVar5) + 4)); *(RoomConfig_Stage *)((char *)RVar5 + 4) = RVar5; *(RoomConfig_Stage *)RVar5 = RVar5; *(RoomConfig_Stage *)((char *)RVar5 + 8) = RVar5; diff --git a/src/game/room_descriptor.cpp b/src/game/room_descriptor.cpp index e5924a3..bbf62de 100644 --- a/src/game/room_descriptor.cpp +++ b/src/game/room_descriptor.cpp @@ -9,19 +9,19 @@ byte RoomDescriptor::Clear() // 00456560 uint RoomDescriptor::PressurePlatesTriggered() { - return CONCAT31((uint3)((uint)this->Flags >> 9),(char)((uint)this->Flags >> 1)) & 0xffffff01; + return CONCAT31((uint3)(GHIDRA_UINT(this->Flags) >> 9),(char)(GHIDRA_UINT(this->Flags) >> 1)) & 0xffffff01; } // 00505c30 uint RoomDescriptor::HasWater() { - return CONCAT31((uint3)((uint)this->Flags >> 0xd),(char)((uint)this->Flags >> 5)) & 0xffffff01; + return CONCAT31((uint3)(GHIDRA_UINT(this->Flags) >> 0xd),(char)(GHIDRA_UINT(this->Flags) >> 5)) & 0xffffff01; } // 005cd640 uint RoomDescriptor::SacrificeDone() { - return CONCAT31((uint3)((uint)this->Flags >> 10),(char)((uint)this->Flags >> 2)) & 0xffffff01; + return CONCAT31((uint3)(GHIDRA_UINT(this->Flags) >> 10),(char)(GHIDRA_UINT(this->Flags) >> 2)) & 0xffffff01; } // 006ef590 @@ -68,11 +68,11 @@ RoomConfig_Room * RoomDescriptor::constructor() /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } - pvVar2 = (void *)((int)pvVar1 + 0x23U & 0xffffffe0); - *(void **)((int)pvVar2 - 4) = pvVar1; + pvVar2 = (void *)(GHIDRA_INT(pvVar1) + 0x23U & 0xffffffe0); + *(void **)(GHIDRA_INT(pvVar2) - 4) = pvVar1; gridSavesLeft = 0x1c0; (this->SavedGridEntities)._begin = pvVar2; - (this->SavedGridEntities)._capacity = (void *)((int)pvVar2 + 0x3800); + (this->SavedGridEntities)._capacity = (void *)(GHIDRA_INT(pvVar2) + 0x3800); gridSave = (this->SavedGridEntities)._begin; do { *gridSave = 0; @@ -90,8 +90,8 @@ RoomConfig_Room * RoomDescriptor::constructor() (this->SavedEntities)._begin = (void *)0x0; (this->SavedEntities)._end = (void *)0x0; (this->SavedEntities)._capacity = (void *)0x0; - local_8._1_3_ = 0; - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; (this->RestrictedGridIndexes)._head = (void *)0x0; (this->RestrictedGridIndexes)._size = 0; pvVar1 = operator_new(0x14); @@ -103,7 +103,7 @@ RoomConfig_Room * RoomDescriptor::constructor() (this->SavedEffects)._begin = (void *)0x0; (this->SavedEffects)._end = (void *)0x0; (this->SavedEffects)._capacity = (void *)0x0; - local_8 = CONCAT31(local_8._1_3_,3); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),3); this->ShopItemIdx = -1; this->ShopItemDiscountIdx = -1; this->DeliriumDistance = 0; @@ -113,12 +113,12 @@ RoomConfig_Room * RoomDescriptor::constructor() if (pvVar2 != pvVar1) { do { invoke_pending_callbacks(pvVar2); - pvVar2 = (void *)((int)pvVar2 + 0x78); + pvVar2 = (void *)(GHIDRA_INT(pvVar2) + 0x78); } while (pvVar2 != pvVar1); pvVar2 = (this->SavedEntities)._begin; } (this->SavedEntities)._end = pvVar2; - if ((uint)(((int)(this->SavedEntities)._capacity - (int)(this->SavedEntities)._begin) / 0x78) < + if (GHIDRA_UINT(((GHIDRA_INT((this->SavedEntities)._capacity) - GHIDRA_INT((this->SavedEntities)._begin)) / 0x78)) < 0x10) { std::vector::_Reallocate_exactly(0x10); } @@ -127,12 +127,12 @@ RoomConfig_Room * RoomDescriptor::constructor() if (pvVar2 != pvVar1) { do { invoke_pending_callbacks(pvVar2); - pvVar2 = (void *)((int)pvVar2 + 0x78); + pvVar2 = (void *)(GHIDRA_INT(pvVar2) + 0x78); } while (pvVar2 != pvVar1); pvVar2 = (this->SavedEffects)._begin; } (this->SavedEffects)._end = pvVar2; - if ((uint)(((int)(this->SavedEffects)._capacity - (int)(this->SavedEffects)._begin) / 0x78) < 0x20 + if (GHIDRA_UINT(((GHIDRA_INT((this->SavedEffects)._capacity) - GHIDRA_INT((this->SavedEffects)._begin)) / 0x78)) < 0x20 ) { std::vector::_Reallocate_exactly(0x20); } @@ -140,7 +140,7 @@ RoomConfig_Room * RoomDescriptor::constructor() FID_conflict__Erase_tree_>_> (&this->RestrictedGridIndexes, (fuzzer_allocator_> *)&this->RestrictedGridIndexes, - *(_Tree_node **)((int)pvVar1 + 4)); + *(_Tree_node **)(GHIDRA_INT(pvVar1) + 4)); *(void **)((char *)pvVar1 + 4) = pvVar1; gridSaveOffset = 0; *(void **)pvVar1 = pvVar1; @@ -155,7 +155,7 @@ RoomConfig_Room * RoomDescriptor::constructor() this->_doors[6] = -1; this->_doors[7] = -1; do { - *(undefined4 *)(gridSaveOffset + (int)(this->SavedGridEntities)._begin) = 0; + *(undefined4 *)(gridSaveOffset + GHIDRA_INT((this->SavedGridEntities)._begin)) = 0; gridSaveOffset = gridSaveOffset + 0x20; } while (gridSaveOffset < 0x3800); *(undefined4 *)&(*(undefined1 *)((char *)(this) + 0x94)) = 0; @@ -175,7 +175,7 @@ void RoomDescriptor::destructor() restrictedGridIndexes = &this->RestrictedGridIndexes; FID_conflict__Erase_tree_>_> (restrictedGridIndexes,(fuzzer_allocator_> *)restrictedGridIndexes, - *(_Tree_node **)((int)(this->RestrictedGridIndexes)._head + 4)); + *(_Tree_node **)(GHIDRA_INT((this->RestrictedGridIndexes)._head) + 4)); operator_delete(restrictedGridIndexes->_head,0x14); std::vector::_Tidy(); FUN_00708f90(); @@ -185,13 +185,13 @@ void RoomDescriptor::destructor() // 0070c550 uint RoomDescriptor::ChallengeDone() { - return CONCAT31((uint3)((uint)this->Flags >> 0xb),(char)((uint)this->Flags >> 3)) & 0xffffff01; + return CONCAT31((uint3)(GHIDRA_UINT(this->Flags) >> 0xb),(char)(GHIDRA_UINT(this->Flags) >> 3)) & 0xffffff01; } // 00738180 uint RoomDescriptor::SurpriseMiniboss() { - return CONCAT31((uint3)((uint)this->Flags >> 0xc),(char)((uint)this->Flags >> 4)) & 0xffffff01; + return CONCAT31((uint3)(GHIDRA_UINT(this->Flags) >> 0xc),(char)(GHIDRA_UINT(this->Flags) >> 4)) & 0xffffff01; } // 007387d0 @@ -255,7 +255,7 @@ RoomDescriptor * RoomDescriptor::operator_assign(RoomDescriptor *other) pvVar1 = restrictedIndexes->_head; FID_conflict__Erase_tree_>_> (restrictedIndexes,(fuzzer_allocator_> *)restrictedIndexes, - *(_Tree_node **)((int)pvVar1 + 4)); + *(_Tree_node **)(GHIDRA_INT(pvVar1) + 4)); *(void **)((char *)pvVar1 + 4) = pvVar1; *(void **)pvVar1 = pvVar1; *(void **)((char *)pvVar1 + 8) = pvVar1; @@ -324,7 +324,7 @@ RoomDescriptor * RoomDescriptor::copy_constructor(RoomDescriptor *other) local_14 = 0xffffffff; puStack_18 = &LAB_00afdfc1; local_1c = ExceptionList; - uVar8 = __security_cookie ^ (int)register0x00000010 - 0x10U; + uVar8 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; this->GridIndex = other->GridIndex; this->SafeGridIndex = other->SafeGridIndex; @@ -366,7 +366,7 @@ RoomDescriptor * RoomDescriptor::copy_constructor(RoomDescriptor *other) srcGridEnd = (other->SavedGridEntities)._end; srcGridEntity = (other->SavedGridEntities)._begin; if (srcGridEntity != srcGridEnd) { - byteCount = (int)srcGridEnd - (int)srcGridEntity >> 5; + byteCount = GHIDRA_INT(srcGridEnd) - GHIDRA_INT(srcGridEntity) >> 5; if (0x7ffffff < byteCount) { /* WARNING: Subroutine does not return */ FUN_0040cee0(uVar8); @@ -375,7 +375,7 @@ RoomDescriptor * RoomDescriptor::copy_constructor(RoomDescriptor *other) pvVar9 = std::_Allocate(byteCount); (this->SavedGridEntities)._begin = pvVar9; (this->SavedGridEntities)._end = pvVar9; - (this->SavedGridEntities)._capacity = (void *)((int)pvVar9 + byteCount); + (this->SavedGridEntities)._capacity = (void *)(GHIDRA_INT(pvVar9) + byteCount); dstGridEntity = (this->SavedGridEntities)._begin; do { uVar2 = srcGridEntity[1]; @@ -400,7 +400,7 @@ RoomDescriptor * RoomDescriptor::copy_constructor(RoomDescriptor *other) } local_14 = 0; FUN_00752830(&other->SavedEntities); - local_14._0_1_ = 1; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; restrictedGridIndexes = &this->RestrictedGridIndexes; restrictedGridIndexes->_head = (void *)0x0; (this->RestrictedGridIndexes)._size = 0; @@ -410,9 +410,9 @@ RoomDescriptor * RoomDescriptor::copy_constructor(RoomDescriptor *other) *(void **)((char *)pvVar9 + 8) = pvVar9; *(undefined2 *)((char *)pvVar9 + 0xc) = 0x101; restrictedGridIndexes->_head = pvVar9; - local_14._0_1_ = 2; - std_set_uint_copy(restrictedGridIndexes,&other->RestrictedGridIndexes,(int)this); - local_14 = CONCAT31(local_14._1_3_,3); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; + std_set_uint_copy(restrictedGridIndexes,&other->RestrictedGridIndexes,GHIDRA_INT(this)); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),3); FUN_00752830(&other->SavedEffects); uVar2 = *(undefined4 *)&(*(undefined1 *)((char *)(other) + 0x98)); uVar6 = *(undefined4 *)&(*(undefined1 *)((char *)(other) + 0x9c)); @@ -548,7 +548,7 @@ RoomDescriptor * RoomDescriptor::move_constructor(RoomDescriptor *other) // 007e9190 uint RoomDescriptor::NoReward() { - return CONCAT31((uint3)((uint)this->Flags >> 0xf),(char)((uint)this->Flags >> 7)) & 0xffffff01; + return CONCAT31((uint3)(GHIDRA_UINT(this->Flags) >> 0xf),(char)(GHIDRA_UINT(this->Flags) >> 7)) & 0xffffff01; } // 009adaf0 @@ -576,7 +576,7 @@ RoomDescriptor * RoomDescriptor::Init(uint seed) this->ListIndex = 9; this->Dimension = 7; this->Data = (void *)0xffffffff; - this->Data = (void *)((uint)this->Data & 0x1fff); + this->Data = (void *)(GHIDRA_UINT(this->Data) & 0x1fff); memset(&this[3].SavedEffects._capacity,0,0xa9); return this; } diff --git a/src/game/room_grid_path.cpp b/src/game/room_grid_path.cpp index 1ee3cbc..389f610 100644 --- a/src/game/room_grid_path.cpp +++ b/src/game/room_grid_path.cpp @@ -15,9 +15,9 @@ byte RoomGridPath::can_step(int fromIndex, int toIndex) iVar1 = *(int *)(*(int *)this + 0xc); dRow = toIndex / iVar1 - fromIndex / iVar1; dCol = toIndex % iVar1 - fromIndex % iVar1; - if (((((dRow ^ (int)dRow >> 0x1f) - ((int)dRow >> 0x1f)) + - ((dCol ^ (int)dCol >> 0x1f) - ((int)dCol >> 0x1f)) == 1) && ((uint)fromIndex < 0x1c0)) && - (cellType = *(byte *)(fromIndex + 4 + (int)this), cellType != 0xff)) { + if (((((dRow ^ GHIDRA_INT(dRow) >> 0x1f) - (GHIDRA_INT(dRow) >> 0x1f)) + + ((dCol ^ GHIDRA_INT(dCol) >> 0x1f) - (GHIDRA_INT(dCol) >> 0x1f)) == 1) && (GHIDRA_UINT(fromIndex) < 0x1c0)) && + (cellType = *(byte *)(fromIndex + 4 + GHIDRA_INT(this)), cellType != 0xff)) { iVar1 = 0; cellKind = cellType & 0xf; if (0 < *(int *)(&DAT_00c37610 + cellKind * 0x44)) { diff --git a/src/game/room_set.cpp b/src/game/room_set.cpp index b247cbd..6bdca64 100644 --- a/src/game/room_set.cpp +++ b/src/game/room_set.cpp @@ -22,7 +22,7 @@ void * RoomSet::GetVariantSet(uint type) allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } variantSet = malloc(8); if (variantSet == (undefined4 *)0x0) { @@ -30,10 +30,10 @@ void * RoomSet::GetVariantSet(uint type) } else { prevAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes + 8; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) + 8; *variantSet = 8; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) + (uint)(0xfffffff7 < (uint)prevAllocatedBytes); + *(uint *)((char *)allocatedBytes + 4) + GHIDRA_UINT((0xfffffff7 < GHIDRA_UINT(prevAllocatedBytes))); variantSet = variantSet + 1; if (variantSet != (undefined4 *)0x0) { *variantSet = 0; diff --git a/src/game/room_transition.cpp b/src/game/room_transition.cpp index 0566233..522434b 100644 --- a/src/game/room_transition.cpp +++ b/src/game/room_transition.cpp @@ -25,7 +25,7 @@ RoomTransition::~RoomTransition() *refSlot = (EntityPtr)0x0; } std::map::_Erase_tree - (&this->_sprites,*(undefined4 *)((int)(this->_sprites)._head + 4)); + (&this->_sprites,*(undefined4 *)(GHIDRA_INT((this->_sprites)._head) + 4)); operator_delete((this->_sprites)._head,0x128); local_8 = 1; ((ANM2 *)(&this->_versusScreenSprite))->ANM2::Reset(); @@ -109,18 +109,18 @@ void RoomTransition::StartBossIntro(uint bossID1, uint bossID2) undefined4 local_14; ANM2 *versusAnm2; - puStack_20 = (undefined1 *)((int)&tmpString + 0x40); + puStack_20 = (undefined1 *)(GHIDRA_INT(&tmpString) + 0x40); local_14 = 0xffffffff; puStack_18 = &LAB_00b02107; local_1c = ExceptionList; - uVar3 = __security_cookie ^ (uint)((int)&tmpString + 0x34U); + uVar3 = __security_cookie ^ GHIDRA_UINT((GHIDRA_INT(&tmpString) + 0x34U)); ExceptionList = &local_1c; local_6c = (EntityPtr)0x0; cleanupFlags = 0; this->_bossIntroBossId = bossID1; local_7c = (Game *)this; local_24 = uVar3; - texture = (undefined1 *)((int)&tmpString + 0x40); + texture = (undefined1 *)(GHIDRA_INT(&tmpString) + 0x40); if (*(int *)this != 0) { ((Music *)((Music *)&g_manager->_musicManager))->Music::Play(0x51,(g_manager->_optionsConfig)._musicVolume); texture = puStack_20; @@ -134,16 +134,16 @@ void RoomTransition::StartBossIntro(uint bossID1, uint bossID2) anm2Path._buf[1] = '\0'; anm2Path._buf[2] = '\0'; anm2Path._buf[3] = '\0'; - anm2Path._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = std::_Allocate(0x20); anm2Path._size = 0x1d; - anm2Path._capacity = (uint)&DAT_0000001f; - *(undefined4 *)((std_string *)anm2Path._buf._0_4_)->_buf = 0x2f786667; - *(undefined4 *)((int)((std_string *)anm2Path._buf._0_4_)->_buf + 4) = 0x622f6975; - builtin_strncpy((char *)((int)((std_string *)anm2Path._buf._0_4_)->_buf + 8),"oss/",4); - builtin_strncpy((char *)((int)((std_string *)anm2Path._buf._0_4_)->_buf + 0xc),"vers",4); - ((std_string *)anm2Path._buf._0_4_)->_size = 0x63737375; - ((std_string *)anm2Path._buf._0_4_)->_capacity = 0x6e656572; - builtin_strncpy(((std_string *)(anm2Path._buf._0_4_ + 0x18))->_buf,".anm2",6); + anm2Path._capacity = GHIDRA_UINT(&DAT_0000001f); + *(undefined4 *)((*(undefined4 *)((char *)&((std_string *)anm2Path._buf) + 0x0)))->_buf = 0x2f786667; + *(undefined4 *)(GHIDRA_INT(((*(undefined4 *)((char *)&((std_string *)anm2Path._buf) + 0x0)))->_buf) + 4) = 0x622f6975; + builtin_strncpy((char *)(GHIDRA_INT(((*(undefined4 *)((char *)&((std_string *)anm2Path._buf) + 0x0)))->_buf) + 8),"oss/",4); + builtin_strncpy((char *)(GHIDRA_INT(((*(undefined4 *)((char *)&((std_string *)anm2Path._buf) + 0x0)))->_buf) + 0xc),"vers",4); + ((*(undefined4 *)((char *)&((std_string *)anm2Path._buf) + 0x0)))->_size = 0x63737375; + ((*(undefined4 *)((char *)&((std_string *)anm2Path._buf) + 0x0)))->_capacity = 0x6e656572; + builtin_strncpy(((std_string *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + 0x18))->_buf,".anm2",6); local_14 = 0; local_5d = 0; if (bossID1 == 99) { @@ -151,50 +151,50 @@ void RoomTransition::StartBossIntro(uint bossID1, uint bossID2) local_6c = (EntityPtr)&DAT_0000002f; local_70 = std::_Allocate(0x30); anm2Path._size = 0x23; - anm2Path._capacity = (uint)local_6c; + anm2Path._capacity = GHIDRA_UINT(local_6c); *(undefined4 *)local_70->_buf = 0x2f786667; *(undefined4 *)((char *)local_70->_buf + 4) = 0x622f6975; - builtin_strncpy((char *)((int)local_70->_buf + 8),"oss/",4); - builtin_strncpy((char *)((int)local_70->_buf + 0xc),"vers",4); + builtin_strncpy((char *)(GHIDRA_INT(local_70->_buf) + 8),"oss/",4); + builtin_strncpy((char *)(GHIDRA_INT(local_70->_buf) + 0xc),"vers",4); local_70->_size = 0x63737375; local_70->_capacity = 0x6e656572; builtin_strncpy(local_70[1]._buf,"_dogma.anm2",0xc); - operator_delete((void *)anm2Path._buf._0_4_,0x20); - anm2Path._buf._0_4_ = local_70; + operator_delete((*(undefined4 *)((char *)&((void *)anm2Path._buf) + 0x0)),0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = local_70; local_5d = 1; } else if (bossID1 == 0x58) { local_70 = (std_string *)0x1f; local_6c = (EntityPtr)&DAT_0000002f; local_70 = std::_Allocate(0x30); - anm2Path._capacity = (uint)local_6c; + anm2Path._capacity = GHIDRA_UINT(local_6c); anm2Path._size = 0x24; *(undefined4 *)local_70->_buf = 0x2f786667; *(undefined4 *)((char *)local_70->_buf + 4) = 0x622f6975; - builtin_strncpy((char *)((int)local_70->_buf + 8),"oss/",4); - builtin_strncpy((char *)((int)local_70->_buf + 0xc),"vers",4); + builtin_strncpy((char *)(GHIDRA_INT(local_70->_buf) + 8),"oss/",4); + builtin_strncpy((char *)(GHIDRA_INT(local_70->_buf) + 0xc),"vers",4); local_70->_size = 0x63737375; local_70->_capacity = 0x6e656572; builtin_strncpy(local_70[1]._buf,"_mother.anm2",0xd); - operator_delete((void *)anm2Path._buf._0_4_,0x20); - anm2Path._buf._0_4_ = local_70; + operator_delete((*(undefined4 *)((char *)&((void *)anm2Path._buf) + 0x0)),0x20); + (*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) = local_70; } if ((this->_versusScreenSprite)._loaded == 0) { - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); LAB_0082f4e7: isAnm2LoadNeeded = '\x01'; } else { ((std::string *)(tmpString._buf))->std::string::string(&this->_versusScreenSprite); - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); cleanupFlags = 9; psVar4 = &anm2Path; if ((Game *)&DAT_0000000f < anm2Path._capacity) { - psVar4 = (std_string *)anm2Path._buf._0_4_; + psVar4 = (*(undefined4 *)((char *)&((std_string *)anm2Path._buf) + 0x0)); } pbVar12 = (byte *)&tmpString; if (&DAT_0000000f < tmpString._capacity) { - pbVar12 = (byte *)tmpString._buf._0_4_; + pbVar12 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); } bVar1 = str_eq(pbVar12,tmpString._size,(byte *)psVar4,anm2Path._size); if (bVar1 == 0) goto LAB_0082f4e7; @@ -207,9 +207,9 @@ LAB_0082f4e7: if ((undefined1 *)0xfff < texture) { pbVar12 = *(byte **)((char *)pbVar15 + 0xfffffffc); texture = (undefined1 *)(tmpString._capacity + 0x24); - if ((byte *)0x1f < pbVar15 + (-4 - (int)pbVar12)) goto LAB_00830911; + if ((byte *)0x1f < pbVar15 + (-4 - GHIDRA_INT(pbVar12))) goto LAB_00830911; } - operator_delete(pbVar12,(uint)texture); + operator_delete(pbVar12,GHIDRA_UINT(texture)); } local_64 = (Sprite *)&this->_versusScreenSprite; if (isAnm2LoadNeeded != '\0') { @@ -247,9 +247,9 @@ LAB_0082f7d9: } else { local_70 = (g_manager->_entityConfig)._players._begin; - if (((int)(g_manager->_entityConfig)._players._end - (int)local_70) / 0x148 <= iVar5) + if ((GHIDRA_INT((g_manager->_entityConfig)._players._end) - GHIDRA_INT(local_70)) / 0x148 <= iVar5) goto LAB_0082f7d9; - psVar4 = (std_string *)((int)local_70 + iVar5 * 0x148); + psVar4 = (std_string *)(GHIDRA_INT(local_70) + iVar5 * 0x148); local_70 = psVar4; if (psVar4 == (std_string *)0x0) goto LAB_0082f7d9; layer = ((ANM2 *)((ANM2 *)local_64))->ANM2::GetLayer(&DAT_00000005); @@ -287,14 +287,14 @@ LAB_0082f7d9: if (((coopPlayer != (EntityPtr)0x0) && (coopPlayer != local_6c)) && (coopPlayer != *(EntityPtr *)((char *)local_6c + 0x1e68))) { local_70 = *(std_string **)((char *)coopPlayer + 0x13c0); - if (((int)local_70 < 0) || - (((int)(g_manager->_entityConfig)._players._end - - (int)(g_manager->_entityConfig)._players._begin) / 0x148 <= (int)local_70)) { + if ((GHIDRA_INT(local_70) < 0) || + ((GHIDRA_INT((g_manager->_entityConfig)._players._end) - + GHIDRA_INT((g_manager->_entityConfig)._players._begin)) / 0x148 <= GHIDRA_INT(local_70))) { pvVar10 = (void *)0x0; } else { - pvVar10 = (void *)((int)local_70 * 0x148 + - (int)(g_manager->_entityConfig)._players._begin); + pvVar10 = (void *)(GHIDRA_INT(local_70) * 0x148 + + GHIDRA_INT((g_manager->_entityConfig)._players._begin)); } if (local_64 == (Sprite *)0x1) { uVar21 = 0xf; @@ -351,11 +351,11 @@ LAB_0082f7ac: stageType = local_64; } local_70 = &local_64->_filename; - local_7c = (Game *)RoomConfig::GetStageID((uint)pGVar11,(uint)stageType,-1); + local_7c = (Game *)RoomConfig::GetStageID(GHIDRA_UINT(pGVar11),GHIDRA_UINT(stageType),-1); local_28 = (Game *)g_manager; - if (((int)bossID1 < 0) || - (((int)(g_manager->_entityConfig)._bosses._end - (int)(g_manager->_entityConfig)._bosses._begin - ) / 100 <= (int)bossID1)) { + if ((GHIDRA_INT(bossID1) < 0) || + ((GHIDRA_INT((g_manager->_entityConfig)._bosses._end) - GHIDRA_INT((g_manager->_entityConfig)._bosses._begin) + ) / 100 <= GHIDRA_INT(bossID1))) { KAGE_LogMessage(0x10,(byte *)"BossID out of bounds\n"); local_6c = (EntityPtr)g_game; } @@ -389,31 +389,31 @@ LAB_0082f917: puVar7 = puVar7 + 7; } while (puVar7 != *(uint **)((char *)local_64 + 0x5c)); } - puVar7 = (uint *)((int)local_64 + 0x34); + puVar7 = (uint *)(GHIDRA_INT(local_64) + 0x34); LAB_0082f933: if (0xf < puVar7[5]) { puVar7 = (uint *)*puVar7; } tmpString._size = 0; - tmpString._capacity = (uint)&DAT_0000000f; - tmpString._buf._0_4_ = (byte *)0x0; - local_28 = (Game *)((int)puVar7 + 1); + tmpString._capacity = GHIDRA_UINT(&DAT_0000000f); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (byte *)0x0; + local_28 = (Game *)(GHIDRA_INT(puVar7) + 1); strEnd = puVar7; do { uVar3 = *strEnd; - strEnd = (uint *)((int)strEnd + 1); + strEnd = (uint *)(GHIDRA_INT(strEnd) + 1); } while ((char)uVar3 != '\0'); - ((std::string *)(tmpString._buf))->std::string::assign((byte *)puVar7,(int)strEnd - (int)local_28); - local_14._0_1_ = 1; + ((std::string *)(tmpString._buf))->std::string::assign((byte *)puVar7,GHIDRA_INT(strEnd) - GHIDRA_INT(local_28)); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 1; if (4 < *(int *)&(*(undefined1 *)((char *)&(pGVar17->_roomList[0]) + 0xa4))) { local_28 = *(Game **)&(*(undefined1 *)((char *)&(pGVar17->_roomList[0]) + 0xa0)); piVar8 = &local_28->_roomList[3].GreedSubType; - if (0xf < (uint)local_28->_roomList[3].AwardSeed) { + if (0xf < GHIDRA_UINT(local_28->_roomList[3].AwardSeed)) { piVar8 = (int *)local_28->_roomList[3].GreedSubType; } pbVar15 = (byte *)&tmpString; if (&DAT_0000000f < tmpString._capacity) { - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); } bVar1 = str_eq(pbVar15,tmpString._size,(byte *)piVar8,local_28->_roomList[3].SpawnSeed); if (bVar1 == 0) { @@ -422,7 +422,7 @@ LAB_0082f933: if ((std_string *)piVar8 != &tmpString) { pbVar15 = (byte *)&tmpString; if (&DAT_0000000f < tmpString._capacity) { - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); } ((std::string *)((char *)piVar8))->std::string::assign(pbVar15,tmpString._size); pGVar11 = *(Game **)&(*(undefined1 *)((char *)&(pGVar17->_roomList[0]) + 0xa0)); @@ -430,16 +430,16 @@ LAB_0082f933: *(undefined1 *)&pGVar11->_roomList[3].SavedEntities._begin = 0; } } - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (&DAT_0000000f < tmpString._capacity) { texture = (undefined1 *)(tmpString._capacity + 1); - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); if ((undefined1 *)0xfff < texture) { - pbVar15 = *(byte **)(tmpString._buf._0_4_ + 0xfffffffc); + pbVar15 = *(byte **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + 0xfffffffc); texture = (undefined1 *)(tmpString._capacity + 0x24); - if ((byte *)0x1f < (byte *)(tmpString._buf._0_4_ + (-4 - (int)pbVar15))) goto LAB_00830911; + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pbVar15)))) goto LAB_00830911; } - operator_delete(pbVar15,(uint)texture); + operator_delete(pbVar15,GHIDRA_UINT(texture)); } uVar3 = 0xffffffff; local_28 = g_game; @@ -469,31 +469,31 @@ LAB_0082fa81: puVar7 = puVar7 + 7; } while (puVar7 != *(uint **)((char *)local_64 + 0x5c)); } - puVar7 = (uint *)((int)local_64 + 0x34); + puVar7 = (uint *)(GHIDRA_INT(local_64) + 0x34); LAB_0082faa3: if (0xf < puVar7[5]) { puVar7 = (uint *)*puVar7; } tmpString._size = 0; - tmpString._capacity = (uint)&DAT_0000000f; - tmpString._buf._0_4_ = (byte *)0x0; - local_28 = (Game *)((int)puVar7 + 1); + tmpString._capacity = GHIDRA_UINT(&DAT_0000000f); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (byte *)0x0; + local_28 = (Game *)(GHIDRA_INT(puVar7) + 1); strEnd = puVar7; do { uVar3 = *strEnd; - strEnd = (uint *)((int)strEnd + 1); + strEnd = (uint *)(GHIDRA_INT(strEnd) + 1); } while ((char)uVar3 != '\0'); - ((std::string *)(tmpString._buf))->std::string::assign((byte *)puVar7,(int)strEnd - (int)local_28); - local_14._0_1_ = 2; + ((std::string *)(tmpString._buf))->std::string::assign((byte *)puVar7,GHIDRA_INT(strEnd) - GHIDRA_INT(local_28)); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 2; if (0xd < *(int *)&(*(undefined1 *)((char *)&(pGVar17->_roomList[0]) + 0xa4))) { local_28 = *(Game **)&(*(undefined1 *)((char *)&(pGVar17->_roomList[0]) + 0xa0)); piVar8 = local_28->_roomList[0xb]._doors + 4; - if (0xf < (uint)local_28->_roomList[0xb].VisitedCount) { + if (0xf < GHIDRA_UINT(local_28->_roomList[0xb].VisitedCount)) { piVar8 = (int *)local_28->_roomList[0xb]._doors[4]; } pbVar15 = (byte *)&tmpString; if (&DAT_0000000f < tmpString._capacity) { - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); } bVar1 = str_eq(pbVar15,tmpString._size,(byte *)piVar8,local_28->_roomList[0xb].DisplayFlags); if (bVar1 == 0) { @@ -502,7 +502,7 @@ LAB_0082faa3: if ((std_string *)piVar8 != &tmpString) { pbVar15 = (byte *)&tmpString; if (&DAT_0000000f < tmpString._capacity) { - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); } ((std::string *)((char *)piVar8))->std::string::assign(pbVar15,tmpString._size); pGVar11 = versusSprite->_layerState; @@ -510,16 +510,16 @@ LAB_0082faa3: *(undefined1 *)&pGVar11->_roomList[0xb].PitsCount = 0; } } - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (&DAT_0000000f < tmpString._capacity) { texture = (undefined1 *)(tmpString._capacity + 1); - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); if ((undefined1 *)0xfff < texture) { - pbVar15 = *(byte **)(tmpString._buf._0_4_ + 0xfffffffc); + pbVar15 = *(byte **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + 0xfffffffc); texture = (undefined1 *)(tmpString._capacity + 0x24); - if ((byte *)0x1f < (byte *)(tmpString._buf._0_4_ + (-4 - (int)pbVar15))) goto LAB_00830911; + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pbVar15)))) goto LAB_00830911; } - operator_delete(pbVar15,(uint)texture); + operator_delete(pbVar15,GHIDRA_UINT(texture)); } if (bossID2 == 0) { uVar3 = 0xffffffff; @@ -536,22 +536,22 @@ LAB_0082faa3: puVar7 = puVar7 + 7; } while (puVar7 != *(uint **)((char *)local_64 + 0x5c)); } - puVar7 = (uint *)((int)local_64 + 0x34); + puVar7 = (uint *)(GHIDRA_INT(local_64) + 0x34); LAB_0082fdd5: if (0xf < puVar7[5]) { puVar7 = (uint *)*puVar7; } tmpString._size = 0; - tmpString._capacity = (uint)&DAT_0000000f; - tmpString._buf._0_4_ = (byte *)0x0; - local_28 = (Game *)((int)puVar7 + 1); + tmpString._capacity = GHIDRA_UINT(&DAT_0000000f); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (byte *)0x0; + local_28 = (Game *)(GHIDRA_INT(puVar7) + 1); strEnd = puVar7; do { uVar3 = *strEnd; - strEnd = (uint *)((int)strEnd + 1); + strEnd = (uint *)(GHIDRA_INT(strEnd) + 1); } while ((char)uVar3 != '\0'); - ((std::string *)(tmpString._buf))->std::string::assign((byte *)puVar7,(int)strEnd - (int)local_28); - local_14._0_1_ = 5; + ((std::string *)(tmpString._buf))->std::string::assign((byte *)puVar7,GHIDRA_INT(strEnd) - GHIDRA_INT(local_28)); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 5; if (9 < *(int *)&(*(undefined1 *)((char *)&(pGVar17->_roomList[0]) + 0xa4))) { local_28 = *(Game **)&(*(undefined1 *)((char *)&(pGVar17->_roomList[0]) + 0xa0)); ppvVar16 = &local_28->_roomList[7].SavedEffects._end; @@ -560,7 +560,7 @@ LAB_0082fdd5: } pbVar15 = (byte *)&tmpString; if (&DAT_0000000f < tmpString._capacity) { - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); } bVar1 = str_eq(pbVar15,tmpString._size,(byte *)ppvVar16, *(uint *)&(*(undefined1 *)((char *)&(local_28->_roomList[7]) + 0x9c))); @@ -570,7 +570,7 @@ LAB_0082fdd5: if ((std_string *)ppvVar16 != &tmpString) { pbVar15 = (byte *)&tmpString; if (&DAT_0000000f < tmpString._capacity) { - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); } ((std::string *)((char *)ppvVar16))->std::string::assign(pbVar15,tmpString._size); pGVar11 = *(Game **)&(*(undefined1 *)((char *)&(pGVar17->_roomList[0]) + 0xa0)); @@ -578,16 +578,16 @@ LAB_0082fdd5: *(undefined1 *)&pGVar11->_roomList[7].Group = 0; } } - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (&DAT_0000000f < tmpString._capacity) { texture = (undefined1 *)(tmpString._capacity + 1); - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); if ((undefined1 *)0xfff < texture) { - pbVar15 = *(byte **)(tmpString._buf._0_4_ + 0xfffffffc); + pbVar15 = *(byte **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + 0xfffffffc); texture = (undefined1 *)(tmpString._capacity + 0x24); - if ((byte *)0x1f < (byte *)(tmpString._buf._0_4_ + (-4 - (int)pbVar15))) goto LAB_00830911; + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pbVar15)))) goto LAB_00830911; } - operator_delete(pbVar15,(uint)texture); + operator_delete(pbVar15,GHIDRA_UINT(texture)); } uVar3 = 0xffffffff; if (g_game != (Game *)0x0) { @@ -603,28 +603,28 @@ LAB_0082fdd5: puVar7 = puVar7 + 7; } while (puVar7 != *(uint **)((char *)local_64 + 0x5c)); } - puVar7 = (uint *)((int)local_64 + 0x34); + puVar7 = (uint *)(GHIDRA_INT(local_64) + 0x34); LAB_0082ff03: if (0xf < puVar7[5]) { puVar7 = (uint *)*puVar7; } tmpString._size = 0; - tmpString._capacity = (uint)&DAT_0000000f; - tmpString._buf._0_4_ = (byte *)0x0; - local_28 = (Game *)((int)puVar7 + 1); + tmpString._capacity = GHIDRA_UINT(&DAT_0000000f); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (byte *)0x0; + local_28 = (Game *)(GHIDRA_INT(puVar7) + 1); strEnd = puVar7; do { uVar3 = *strEnd; - strEnd = (uint *)((int)strEnd + 1); + strEnd = (uint *)(GHIDRA_INT(strEnd) + 1); } while ((char)uVar3 != '\0'); - ((std::string *)(tmpString._buf))->std::string::assign((byte *)puVar7,(int)strEnd - (int)local_28); - local_14 = CONCAT31(local_14._1_3_,6); + ((std::string *)(tmpString._buf))->std::string::assign((byte *)puVar7,GHIDRA_INT(strEnd) - GHIDRA_INT(local_28)); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),6); } else { local_28 = (Game *)g_manager; - if (((int)bossID2 < 0) || - (((int)(g_manager->_entityConfig)._bosses._end - - (int)(g_manager->_entityConfig)._bosses._begin) / 100 <= (int)bossID2)) { + if ((GHIDRA_INT(bossID2) < 0) || + ((GHIDRA_INT((g_manager->_entityConfig)._bosses._end) - + GHIDRA_INT((g_manager->_entityConfig)._bosses._begin)) / 100 <= GHIDRA_INT(bossID2))) { KAGE_LogMessage(0x10,(byte *)"BossID out of bounds\n"); } uVar3 = 0xffffffff; @@ -650,16 +650,16 @@ LAB_0082fc23: pcVar20 = *(char **)pcVar20; } tmpString._size = 0; - tmpString._capacity = (uint)&DAT_0000000f; - tmpString._buf._0_4_ = (byte *)0x0; + tmpString._capacity = GHIDRA_UINT(&DAT_0000000f); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (byte *)0x0; local_28 = (Game *)(pcVar20 + 1); nameEnd = pcVar20; do { cVar2 = *nameEnd; nameEnd = nameEnd + 1; } while (cVar2 != '\0'); - ((std::string *)(tmpString._buf))->std::string::assign((byte *)pcVar20,(int)nameEnd - (int)local_28); - local_14._0_1_ = 3; + ((std::string *)(tmpString._buf))->std::string::assign((byte *)pcVar20,GHIDRA_INT(nameEnd) - GHIDRA_INT(local_28)); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 3; if (9 < *(int *)&(*(undefined1 *)((char *)&(pGVar17->_roomList[0]) + 0xa4))) { local_28 = *(Game **)&(*(undefined1 *)((char *)&(pGVar17->_roomList[0]) + 0xa0)); ppvVar16 = &local_28->_roomList[7].SavedEffects._end; @@ -668,7 +668,7 @@ LAB_0082fc23: } pbVar15 = (byte *)&tmpString; if (&DAT_0000000f < tmpString._capacity) { - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); } bVar1 = str_eq(pbVar15,tmpString._size,(byte *)ppvVar16, *(uint *)&(*(undefined1 *)((char *)&(local_28->_roomList[7]) + 0x9c))); @@ -678,7 +678,7 @@ LAB_0082fc23: if ((std_string *)ppvVar16 != &tmpString) { pbVar15 = (byte *)&tmpString; if (&DAT_0000000f < tmpString._capacity) { - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); } ((std::string *)((char *)ppvVar16))->std::string::assign(pbVar15,tmpString._size); pGVar11 = *(Game **)&(*(undefined1 *)((char *)&(pGVar17->_roomList[0]) + 0xa0)); @@ -686,16 +686,16 @@ LAB_0082fc23: *(undefined1 *)&pGVar11->_roomList[7].Group = 0; } } - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (&DAT_0000000f < tmpString._capacity) { texture = (undefined1 *)(tmpString._capacity + 1); - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); if ((undefined1 *)0xfff < texture) { - pbVar15 = *(byte **)(tmpString._buf._0_4_ + 0xfffffffc); + pbVar15 = *(byte **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + 0xfffffffc); texture = (undefined1 *)(tmpString._capacity + 0x24); - if ((byte *)0x1f < (byte *)(tmpString._buf._0_4_ + (-4 - (int)pbVar15))) goto LAB_00830911; + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pbVar15)))) goto LAB_00830911; } - operator_delete(pbVar15,(uint)texture); + operator_delete(pbVar15,GHIDRA_UINT(texture)); } uVar3 = 0xffffffff; if (g_game != (Game *)0x0) { @@ -717,26 +717,26 @@ LAB_0082fd47: pcVar20 = *(char **)pcVar20; } tmpString._size = 0; - tmpString._capacity = (uint)&DAT_0000000f; - tmpString._buf._0_4_ = (byte *)0x0; + tmpString._capacity = GHIDRA_UINT(&DAT_0000000f); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (byte *)0x0; local_28 = (Game *)(pcVar20 + 1); nameEnd = pcVar20; do { cVar2 = *nameEnd; nameEnd = nameEnd + 1; } while (cVar2 != '\0'); - ((std::string *)(tmpString._buf))->std::string::assign((byte *)pcVar20,(int)nameEnd - (int)local_28); - local_14 = CONCAT31(local_14._1_3_,4); + ((std::string *)(tmpString._buf))->std::string::assign((byte *)pcVar20,GHIDRA_INT(nameEnd) - GHIDRA_INT(local_28)); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),4); } if (0xe < *(int *)&(*(undefined1 *)((char *)&(pGVar17->_roomList[0]) + 0xa4))) { local_28 = *(Game **)&(*(undefined1 *)((char *)&(pGVar17->_roomList[0]) + 0xa0)); ppvVar16 = &local_28->_roomList[0xc].OverrideData; - if (0xf < (uint)local_28->_roomList[0xc]._doors[3]) { + if (0xf < GHIDRA_UINT(local_28->_roomList[0xc]._doors[3])) { ppvVar16 = local_28->_roomList[0xc].OverrideData; } pbVar15 = (byte *)&tmpString; if (&DAT_0000000f < tmpString._capacity) { - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); } bVar1 = str_eq(pbVar15,tmpString._size,(byte *)ppvVar16,local_28->_roomList[0xc]._doors[2]); if (bVar1 == 0) { @@ -745,7 +745,7 @@ LAB_0082fd47: if ((std_string *)ppvVar16 != &tmpString) { pbVar15 = (byte *)&tmpString; if (&DAT_0000000f < tmpString._capacity) { - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); } ((std::string *)((char *)ppvVar16))->std::string::assign(pbVar15,tmpString._size); pGVar11 = *(Game **)&(*(undefined1 *)((char *)&(pGVar17->_roomList[0]) + 0xa0)); @@ -756,87 +756,87 @@ LAB_0082fd47: local_14 = local_14 & 0xffffff00; if (&DAT_0000000f < tmpString._capacity) { texture = (undefined1 *)(tmpString._capacity + 1); - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); if ((undefined1 *)0xfff < texture) { - pbVar15 = *(byte **)(tmpString._buf._0_4_ + 0xfffffffc); + pbVar15 = *(byte **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + 0xfffffffc); texture = (undefined1 *)(tmpString._capacity + 0x24); - if ((byte *)0x1f < (byte *)(tmpString._buf._0_4_ + (-4 - (int)pbVar15))) goto LAB_00830911; + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pbVar15)))) goto LAB_00830911; } - operator_delete(pbVar15,(uint)texture); + operator_delete(pbVar15,GHIDRA_UINT(texture)); } if (bossID1 == 0x28) { local_70 = (std_string *)&(g_game->_seedEffects)._seedEffects; local_28 = (Game *)&DAT_0000004f; - std::set::find_node((undefined1 *)((int)&tmpString + 0xc),&local_28); + std::set::find_node((undefined1 *)(GHIDRA_INT(&tmpString) + 0xc),&local_28); if ((*(char *)(tmpString._capacity + 0xd) != '\0') || (0x4f < *(int *)(tmpString._capacity + 0x10))) { tmpString._capacity = *(uint *)local_70->_buf; } if ((undefined1 *)tmpString._capacity != *(undefined1 **)local_70->_buf) { tmpString._size = 0; - tmpString._capacity = (uint)&DAT_0000000f; - tmpString._buf._0_4_ = (byte *)0x0; + tmpString._capacity = GHIDRA_UINT(&DAT_0000000f); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (byte *)0x0; ((std::string *)(tmpString._buf))->std::string::assign((byte *)"gfx/promo/gfuel/ui/boss/g fuel bluebaby portrait.png",0x34); - local_14._0_1_ = 7; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 7; ((Sprite *)(versusSprite))->Sprite::ReplaceSpritesheet(4,&tmpString); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (&DAT_0000000f < tmpString._capacity) { texture = (undefined1 *)(tmpString._capacity + 1); - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); if ((undefined1 *)0xfff < texture) { - pbVar15 = *(byte **)(tmpString._buf._0_4_ + 0xfffffffc); + pbVar15 = *(byte **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + 0xfffffffc); texture = (undefined1 *)(tmpString._capacity + 0x24); - if ((byte *)0x1f < (byte *)(tmpString._buf._0_4_ + (-4 - (int)pbVar15))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pbVar15)))) goto LAB_00830911; } - operator_delete(pbVar15,(uint)texture); + operator_delete(pbVar15,GHIDRA_UINT(texture)); } tmpString._size = 0; - tmpString._capacity = (uint)&DAT_0000000f; - tmpString._buf._0_4_ = (byte *)0x0; + tmpString._capacity = GHIDRA_UINT(&DAT_0000000f); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (byte *)0x0; ((std::string *)(tmpString._buf))->std::string::assign((byte *)"gfx/promo/gfuel/ui/boss/g fuel bluebaby portrait.png",0x34); - local_14._0_1_ = 8; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 8; ((Sprite *)(versusSprite))->Sprite::ReplaceSpritesheet(0xd,&tmpString); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (&DAT_0000000f < tmpString._capacity) { texture = (undefined1 *)(tmpString._capacity + 1); - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); if ((undefined1 *)0xfff < texture) { - pbVar15 = *(byte **)(tmpString._buf._0_4_ + 0xfffffffc); + pbVar15 = *(byte **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + 0xfffffffc); texture = (undefined1 *)(tmpString._capacity + 0x24); - if ((byte *)0x1f < (byte *)(tmpString._buf._0_4_ + (-4 - (int)pbVar15))) + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pbVar15)))) goto LAB_00830911; } - operator_delete(pbVar15,(uint)texture); + operator_delete(pbVar15,GHIDRA_UINT(texture)); } } } - pbVar15 = (byte *)((int)local_64 + 0x1c); + pbVar15 = (byte *)(GHIDRA_INT(local_64) + 0x1c); if (0xf < *(uint *)((char *)local_64 + 0x30)) { pbVar15 = *(byte **)pbVar15; } tmpString._size = 0; - tmpString._capacity = (uint)&DAT_0000000f; - tmpString._buf._0_4_ = (byte *)0x0; + tmpString._capacity = GHIDRA_UINT(&DAT_0000000f); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (byte *)0x0; local_28 = (Game *)(pbVar15 + 1); pbVar12 = pbVar15; do { bVar1 = *pbVar12; pbVar12 = pbVar12 + 1; } while (bVar1 != 0); - ((std::string *)(tmpString._buf))->std::string::assign(pbVar15,(int)pbVar12 - (int)local_28); - local_14._0_1_ = 9; + ((std::string *)(tmpString._buf))->std::string::assign(pbVar15,GHIDRA_INT(pbVar12) - GHIDRA_INT(local_28)); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 9; ((Sprite *)(versusSprite))->Sprite::ReplaceSpritesheet(7,&tmpString); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; if (&DAT_0000000f < tmpString._capacity) { texture = (undefined1 *)(tmpString._capacity + 1); - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); if ((undefined1 *)0xfff < texture) { - pbVar15 = *(byte **)(tmpString._buf._0_4_ + 0xfffffffc); + pbVar15 = *(byte **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + 0xfffffffc); texture = (undefined1 *)(tmpString._capacity + 0x24); - if ((byte *)0x1f < (byte *)(tmpString._buf._0_4_ + (-4 - (int)pbVar15))) goto LAB_00830911; + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pbVar15)))) goto LAB_00830911; } - operator_delete(pbVar15,(uint)texture); + operator_delete(pbVar15,GHIDRA_UINT(texture)); } layer = ((ANM2 *)((ANM2 *)versusSprite))->ANM2::GetLayer(&DAT_00000004); (layer->_pos).x = *(float *)((char *)local_64 + 0x4c); @@ -852,37 +852,37 @@ LAB_0082fd47: fVar13 = *(float *)((char *)local_64 + 0x50); (layer->_pos).y = fVar13; if (local_5d == 0) { - iVar5 = (int)local_7c * 0xc4; + iVar5 = GHIDRA_INT(local_7c) * 0xc4; ((std::string *)(tmpString._buf))->std::string::string(g_game->_ventricleRazorPortals + iVar5 + 0x5b4); cleanupFlags = cleanupFlags | 0x10; - local_14._0_1_ = 10; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 10; ((Sprite *)((Sprite *)(pGVar17->_roomList[0]._doors + 2)))->Sprite::ReplaceSpritesheet(3,&tmpString); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; ((std::string *)(tmpString._buf))->std::string::_Tidy_deallocate(); ((std::string *)(tmpString._buf))->std::string::string(g_game->_ventricleRazorPortals + iVar5 + 0x5b4); cleanupFlags = cleanupFlags | 0x20; - local_14._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xb; ((Sprite *)((Sprite *)(pGVar17->_roomList[0]._doors + 2)))->Sprite::ReplaceSpritesheet(0xf,&tmpString); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; ((std::string *)(tmpString._buf))->std::string::_Tidy_deallocate(); ((std::string *)(tmpString._buf))->std::string::string(g_game->_ventricleRazorPortals + iVar5 + 0x5b4); cleanupFlags = cleanupFlags | 0x40; - local_14._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xc; ((Sprite *)((Sprite *)(pGVar17->_roomList[0]._doors + 2)))->Sprite::ReplaceSpritesheet(0x10,&tmpString); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; ((std::string *)(tmpString._buf))->std::string::_Tidy_deallocate(); ((std::string *)(tmpString._buf))->std::string::string(g_game->_ventricleRazorPortals + iVar5 + 0x5b4); cleanupFlags = cleanupFlags | 0x80; - local_14._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xd; ((Sprite *)((Sprite *)(pGVar17->_roomList[0]._doors + 2)))->Sprite::ReplaceSpritesheet(0x11,&tmpString); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; ((std::string *)(tmpString._buf))->std::string::_Tidy_deallocate(); ((std::string *)(tmpString._buf))->std::string::string(g_game->_ventricleRazorPortals + iVar5 + 0x5cc); cleanupFlags = cleanupFlags | 0x100; - local_14._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xe; versusSprite = (Sprite *)(pGVar17->_roomList[0]._doors + 2); ((Sprite *)(versusSprite))->Sprite::ReplaceSpritesheet(2,&tmpString); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; ((std::string *)(tmpString._buf))->std::string::_Tidy_deallocate(); local_5d = bossID1 != 0x37; layer = ((ANM2 *)((ANM2 *)versusSprite))->ANM2::GetLayer((byte *)0x2); @@ -895,35 +895,35 @@ LAB_0082fd47: pbVar15 = *(byte **)pbVar15; } tmpString._size = 0; - tmpString._capacity = (uint)&DAT_0000000f; - tmpString._buf._0_4_ = (byte *)0x0; + tmpString._capacity = GHIDRA_UINT(&DAT_0000000f); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (byte *)0x0; local_28 = (Game *)(pbVar15 + 1); pbVar12 = pbVar15; do { bVar1 = *pbVar12; pbVar12 = pbVar12 + 1; } while (bVar1 != 0); - ((std::string *)(tmpString._buf))->std::string::assign(pbVar15,(int)pbVar12 - (int)local_28); - local_14._0_1_ = 0xf; + ((std::string *)(tmpString._buf))->std::string::assign(pbVar15,GHIDRA_INT(pbVar12) - GHIDRA_INT(local_28)); + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0xf; ((Sprite *)(versusSprite))->Sprite::ReplaceSpritesheet(0x18,&tmpString); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; fVar13 = extraout_ECX_00; if (tmpString._capacity < (undefined1 *)0x10) goto LAB_0083066a; texture = (undefined1 *)(tmpString._capacity + 1); - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); if ((undefined1 *)0xfff < texture) { - pbVar15 = *(byte **)(tmpString._buf._0_4_ + 0xfffffffc); + pbVar15 = *(byte **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + 0xfffffffc); texture = (undefined1 *)(tmpString._capacity + 0x24); - if ((byte *)0x1f < (byte *)(tmpString._buf._0_4_ + (-4 - (int)pbVar15))) goto LAB_00830911; + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pbVar15)))) goto LAB_00830911; } - operator_delete(pbVar15,(uint)texture); + operator_delete(pbVar15,GHIDRA_UINT(texture)); ((ANM2 *)((ANM2 *)versusSprite))->ANM2::LoadGraphics((byte)texture); LAB_0083041c: layer = ((ANM2 *)((ANM2 *)(pGVar17->_roomList[0]._doors + 2)))->ANM2::GetLayer((byte *)0x2); piVar8 = ((LayerState *)(layer))->LayerState::GetTexture(&portraitTexture); - local_14 = CONCAT31(local_14._1_3_,0x10); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),0x10); local_6c = (EntityPtr)(cleanupFlags | 2); - cleanupFlags = (uint)local_6c; + cleanupFlags = GHIDRA_UINT(local_6c); if (*piVar8 == 0) { LAB_0083047c: local_5d = 0; @@ -933,7 +933,7 @@ LAB_0083047c: texture = ((LayerState *)(layer))->LayerState::GetTexture(&local_2c); local_14 = 0x11; local_6c = (EntityPtr)(cleanupFlags | 4); - cleanupFlags = (uint)local_6c; + cleanupFlags = GHIDRA_UINT(local_6c); cVar2 = (*(code *)**(undefined4 **)*texture)(); local_5d = 1; if (cVar2 == '\0') goto LAB_0083047c; @@ -941,7 +941,7 @@ LAB_0083047c: if ((cleanupFlags & 4) != 0) { local_6c = (EntityPtr)(cleanupFlags & 0xfffffffb); local_14 = 0x12; - cleanupFlags = (uint)local_6c; + cleanupFlags = GHIDRA_UINT(local_6c); if (((local_28 != (Game *)0x0) && (cVar2 = (**(code **)((char *)local_28->_stage + 0xc))(), cVar2 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { @@ -952,7 +952,7 @@ LAB_0083047c: if ((cleanupFlags & 2) != 0) { local_14 = 0x13; if (((local_70 != (std_string *)0x0) && - (cVar2 = (**(code **)((int)*(void **)local_70->_buf + 0xc))(), cVar2 != '\0')) && + (cVar2 = (**(code **)(GHIDRA_INT(*(void **))local_70->_buf + 0xc))(), cVar2 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(&portraitTexture); } @@ -979,7 +979,7 @@ LAB_0083047c: else { layer = ((ANM2 *)(versusAnm2))->ANM2::GetLayer((byte *)0x2); ((LayerState *)(layer))->LayerState::GetTexture(&portraitTexture); - local_14._0_1_ = 0x14; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x14; (**(code **)(*portraitTexture + 0x30))(0,0,2,1,&local_2c); layer = ((ANM2 *)((ANM2 *)versusSprite))->ANM2::GetLayer((byte *)0x0); (layer->_color)._tint[3] = 1.0; @@ -988,21 +988,21 @@ LAB_0083047c: (layer->_color)._tint[2] = (float)pixelBlue * 0.003921569; layer = ((ANM2 *)((ANM2 *)(pGVar17->_roomList[0]._doors + 2)))->ANM2::GetLayer(&DAT_0000000d); (layer->_color)._tint[3] = 1.0; - (layer->_color)._tint[0] = (float)(((uint)local_28 & 0xff) * 2) * 0.003921569; - (layer->_color)._tint[1] = (float)(((uint)local_28 >> 8 & 0xff) * 2) * 0.003921569; - (layer->_color)._tint[2] = (float)(((uint)local_28 >> 0x10 & 0xff) * 2) * 0.003921569; + (layer->_color)._tint[0] = (float)((GHIDRA_UINT(local_28) & 0xff) * 2) * 0.003921569; + (layer->_color)._tint[1] = (float)((GHIDRA_UINT(local_28) >> 8 & 0xff) * 2) * 0.003921569; + (layer->_color)._tint[2] = (float)((GHIDRA_UINT(local_28) >> 0x10 & 0xff) * 2) * 0.003921569; layer = ((ANM2 *)((ANM2 *)(pGVar17->_roomList[0]._doors + 2)))->ANM2::GetLayer(&DAT_0000000e); - (layer->_color)._tint[0] = (float)(((uint)local_28 & 0xff) * 2) * 0.003921569; - (layer->_color)._tint[1] = (float)(((uint)local_28 >> 8 & 0xff) * 2) * 0.003921569; - (layer->_color)._tint[2] = (float)(((uint)local_28 >> 0x10 & 0xff) * 2) * 0.003921569; + (layer->_color)._tint[0] = (float)((GHIDRA_UINT(local_28) & 0xff) * 2) * 0.003921569; + (layer->_color)._tint[1] = (float)((GHIDRA_UINT(local_28) >> 8 & 0xff) * 2) * 0.003921569; + (layer->_color)._tint[2] = (float)((GHIDRA_UINT(local_28) >> 0x10 & 0xff) * 2) * 0.003921569; (layer->_color)._tint[3] = 1.0; - local_14._0_1_ = 0x15; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x15; if (((local_70 != (std_string *)0x0) && - (cVar2 = (**(code **)((int)*(void **)local_70->_buf + 0xc))(), cVar2 != '\0')) && + (cVar2 = (**(code **)(GHIDRA_INT(*(void **))local_70->_buf + 0xc))(), cVar2 != '\0')) && (g_imageReleaseFn != (void *)0x0)) { (*g_imageReleaseFn)(&portraitTexture); } - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; versusSprite = (Sprite *)(pGVar17->_roomList[0]._doors + 2); } if (bossID1 == 0x37) { @@ -1043,22 +1043,22 @@ LAB_0083077d: } if ((*(int *)((char *)pvVar10 + 8) == 5) && (*(int *)((char *)pvVar10 + 0xc) - 0xe74U < 0x96)) { tmpString._size = 0; - tmpString._capacity = (uint)&DAT_0000000f; - tmpString._buf._0_4_ = (byte *)0x0; + tmpString._capacity = GHIDRA_UINT(&DAT_0000000f); + (*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) = (byte *)0x0; ((std::string *)(tmpString._buf))->std::string::assign((byte *)"gfx/ui/boss/doubletrouble.png",0x1d); - local_14._0_1_ = 0x16; + (*(undefined1 *)((char *)&(local_14) + 0x0)) = 0x16; ((Sprite *)(versusSprite))->Sprite::ReplaceSpritesheet(10,&tmpString); - local_14 = (uint)local_14._1_3_ << 8; + local_14 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_14)) + 0x1)) << 8; bVar1 = extraout_CL; if (&DAT_0000000f < tmpString._capacity) { texture = (undefined1 *)(tmpString._capacity + 1); - pbVar15 = (byte *)tmpString._buf._0_4_; + pbVar15 = (*(undefined4 *)((char *)&((byte *)tmpString._buf) + 0x0)); if ((undefined1 *)0xfff < texture) { - pbVar15 = *(byte **)(tmpString._buf._0_4_ + 0xfffffffc); + pbVar15 = *(byte **)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + 0xfffffffc); texture = (undefined1 *)(tmpString._capacity + 0x24); - if ((byte *)0x1f < (byte *)(tmpString._buf._0_4_ + (-4 - (int)pbVar15))) goto LAB_00830911; + if ((byte *)0x1f < (byte *)((*(undefined4 *)((char *)&(tmpString._buf) + 0x0)) + (-4 - GHIDRA_INT(pbVar15)))) goto LAB_00830911; } - operator_delete(pbVar15,(uint)texture); + operator_delete(pbVar15,GHIDRA_UINT(texture)); bVar1 = extraout_CL_00; } ((ANM2 *)((ANM2 *)versusSprite))->ANM2::LoadGraphics(bVar1); @@ -1084,18 +1084,18 @@ LAB_008308ce: } pGVar17->_stage = 2; if ((Game *)&DAT_0000000f < anm2Path._capacity) { - ppvVar16 = (void **)((int)(int *)anm2Path._capacity + 1); - psVar4 = (std_string *)anm2Path._buf._0_4_; + ppvVar16 = (void **)(GHIDRA_INT((int *)anm2Path._capacity) + 1); + psVar4 = (*(undefined4 *)((char *)&((std_string *)anm2Path._buf) + 0x0)); if ((void **)0xfff < ppvVar16) { - psVar4 = (std_string *)((std_string *)(anm2Path._buf._0_4_ + -0x18))->_capacity; + psVar4 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + -0x18))->_capacity; ppvVar16 = &((RoomDescriptor *)(anm2Path._capacity + 0x14))->Data; - if (0x1f < (uint)(anm2Path._buf._0_4_ + (-4 - (int)psVar4))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(anm2Path._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar4))))) { LAB_00830911: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } - operator_delete(psVar4,(uint)ppvVar16); + operator_delete(psVar4,GHIDRA_UINT(ppvVar16)); } ExceptionList = local_1c; return; @@ -1144,7 +1144,7 @@ void RoomTransition::ChangeRoom() int roomWidth; GridEntity *teleporter; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b02130; local_1c = ExceptionList; @@ -1153,9 +1153,9 @@ void RoomTransition::ChangeRoom() local_3c = (float)g_game->_currentRoomIdx; local_28 = g_vectorZero.y; transition = this; - currentRoomDesc = ((Level *)((Level *)g_game))->Level::GetRoomByIdx((int)local_3c,g_game->_currentDimensionIdx); + currentRoomDesc = ((Level *)((Level *)g_game))->Level::GetRoomByIdx(GHIDRA_INT(local_3c),g_game->_currentDimensionIdx); local_38 = ((Level *)((Level *)g_game))->Level::GetRoomByIdx(this->_targetRoomIdx,this->_targetDimension); - if (((this->_targetRoomIdx < 0) || ((int)local_3c < 0)) || + if (((this->_targetRoomIdx < 0) || (GHIDRA_INT(local_3c) < 0)) || (currentRoomDesc->Dimension != local_38->Dimension)) { switch(this->_direction) { case 0: @@ -1173,7 +1173,7 @@ void RoomTransition::ChangeRoom() } else { local_3c = (float)(currentRoomDesc->GridIndex % 0xd); - local_24 = (float)((local_38->GridIndex % 0xd - (int)local_3c) * 0xd) * 26.0; + local_24 = (float)((local_38->GridIndex % 0xd - GHIDRA_INT(local_3c)) * 0xd) * 26.0; local_28 = (float)((local_38->GridIndex / 0xd - currentRoomDesc->GridIndex / 0xd) * 7) * 26.0; this = transition; } @@ -1286,7 +1286,7 @@ LAB_00830d9d: iVar7 = iVar3; } if (iVar7 < 1) goto LAB_00830d9d; - StartBossIntro(this,(uint)local_38,(uint)local_3c); + StartBossIntro(this,GHIDRA_UINT(local_38),GHIDRA_UINT(local_3c)); LAB_00830dda: game = g_game; } @@ -1328,24 +1328,24 @@ LAB_00830e96: do { local_50.y = *playerIt; if ((Entity_Player *)local_50.y != (Entity_Player *)0x0) { - local_48.y = (float)((int)fVar8 + 1); + local_48.y = (float)(GHIDRA_INT(fVar8) + 1); if (fVar8 != 0.0) { uVar2 = Random(); - fVar8 = (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)] + fVar8 = (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)] ) * 2.3283064e-10 * 3.14; fVar8 = fVar8 + fVar8; local_5c = CONCAT44(fVar8,(undefined4)local_5c); local_54 = sin(fVar8); - fVar8 = cos((float)local_5c._4_4_); + fVar8 = cos((*(undefined4 *)((char *)&((float)local_5c) + 0x4))); pEVar9 = (Entity_Player *)(fVar8 * 10.0 + (float)local_30); piVar10 = (int *)(local_54 * 10.0 + (float)local_2c); } fVar8 = local_50.y; - ((Vector *)((int)local_50.y + 0x33c))->x = (float)pEVar9; - ((Vector *)((int)local_50.y + 0x33c))->y = (float)piVar10; + ((Vector *)(GHIDRA_INT(local_50.y) + 0x33c))->x = (float)pEVar9; + ((Vector *)(GHIDRA_INT(local_50.y) + 0x33c))->y = (float)piVar10; ((Entity_Player *)((Entity_Player *)local_50.y))->Entity_Player::PlayExtraAnimation((byte *)"Appear"); - if ((((ANM2 *)((int)fVar8 + 0x48))->_animState)._animData != (void *)0x0) { - ((AnimationState *)(&((ANM2 *)((int)fVar8 + 0x48))->_animState))->AnimationState::SetFrameFloat(2.0); + if ((((ANM2 *)(GHIDRA_INT(fVar8) + 0x48))->_animState)._animData != (void *)0x0) { + ((AnimationState *)(&((ANM2 *)(GHIDRA_INT(fVar8) + 0x48))->_animState))->AnimationState::SetFrameFloat(2.0); } *(byte *)((char *)fVar8 + 0x410) = 0; fVar8 = local_48.y; @@ -1357,30 +1357,30 @@ LAB_00830e96: } while (playerIt != (game->_playerManager)._playerList._end); } EntityList::QuerySublist - ((EntityList *)((int)game->_room + 0x1218),&familiars,3,0xee,-1,0,0); + ((EntityList *)(GHIDRA_INT(game->_room) + 0x1218),&familiars,3,0xee,-1,0,0); fVar8 = 0.0; if ((float)familiars._size != 0.0) { do { - iVar7 = *(int *)((char *)familiars._data + (int)fVar8 * 4); - fVar8 = (float)((int)fVar8 + 1); + iVar7 = *(int *)((char *)familiars._data + GHIDRA_INT(fVar8) * 4); + fVar8 = (float)(GHIDRA_INT(fVar8) + 1); *(Entity_Player **)(iVar7 + 0x33c) = local_30; *(int **)(iVar7 + 0x340) = local_2c; - } while ((uint)fVar8 < (uint)familiars._size); + } while (GHIDRA_UINT(fVar8) < GHIDRA_UINT(familiars._size)); } - if (familiars._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(familiars) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (familiars._data != (void *)0x0) { uVar2 = *(uint *)((char *)familiars._data + -4); qVar1 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar1 < uVar2); - free((void *)((int)familiars._data + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar2)); + free((void *)(GHIDRA_INT(familiars._data) + -4)); } LAB_00831623: local_14 = 0xffffffff; @@ -1411,7 +1411,7 @@ LAB_00831623: iVar3 = *(int *)((char *)pvVar6 + 0x10) * *(int *)((char *)pvVar6 + 0xc); uVar2 = 0; if (0 < iVar3) { - puVar5 = (undefined4 *)((int)pvVar6 + 0x24); + puVar5 = (undefined4 *)(GHIDRA_INT(pvVar6) + 0x24); LAB_00831497: if ((((0x1bf < uVar2) || (teleporter = (GridEntity *)*puVar5, teleporter == (GridEntity *)0x0)) || @@ -1423,39 +1423,39 @@ LAB_00831497: (teleporter->_desc)._state = 1; } uVar2 = 0; - if ((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2 != 0) { + if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { pEVar9 = ((Game *)(g_game))->Game::GetPlayer(uVar2); if (pEVar9 != local_30) { randomValue = Random(); - fVar8 = (float)((double)(int)randomValue + - __uint_to_double_fixup[-((int)randomValue >> 0x1f)]) * + fVar8 = (float)((double)GHIDRA_INT(randomValue) + + __uint_to_double_fixup[-(GHIDRA_INT(randomValue) >> 0x1f)]) * 2.3283064e-10 * 3.14; fVar8 = fVar8 + fVar8; local_5c = CONCAT44(fVar8,(undefined4)local_5c); local_54 = sin(fVar8); - fVar8 = cos((float)local_5c._4_4_); + fVar8 = cos((*(undefined4 *)((char *)&((float)local_5c) + 0x4))); local_48.x = fVar8 * 10.0 + local_50.x; local_48.y = local_54 * 10.0 + local_50.y; Entity_Player::Teleport(pEVar9,&local_48,0,0); } uVar2 = uVar2 + 1; - } while (uVar2 < (uint)((int)(g_game->_playerManager)._playerList._end - - (int)(g_game->_playerManager)._playerList._begin >> 2)); + } while (uVar2 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - + GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); } EntityList::QuerySublist - ((EntityList *)((int)g_game->_room + 0x1218),&familiars,3,0xee,-1,0,0); + ((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&familiars,3,0xee,-1,0,0); fVar8 = 0.0; if ((float)familiars._size != 0.0) { do { - iVar7 = *(int *)((char *)familiars._data + (int)fVar8 * 4); - fVar8 = (float)((int)fVar8 + 1); + iVar7 = *(int *)((char *)familiars._data + GHIDRA_INT(fVar8) * 4); + fVar8 = (float)(GHIDRA_INT(fVar8) + 1); *(float *)(iVar7 + 0x33c) = local_50.x; *(float *)(iVar7 + 0x340) = local_50.y; - } while ((uint)fVar8 < (uint)familiars._size); + } while (GHIDRA_UINT(fVar8) < GHIDRA_UINT(familiars._size)); } - if (familiars._0_1_ != '\0') goto LAB_0083162a; + if ((*(undefined1 *)((char *)&(familiars) + 0x0)) != '\0') goto LAB_0083162a; local_14 = 2; tracked_alloc(1,familiars._data,0); goto LAB_00831623; @@ -1468,20 +1468,20 @@ LAB_00831497: else if (iVar7 != 0xb) { playerManager = &game->_playerManager; uVar2 = 0; - if ((int)(game->_playerManager)._playerList._end - (int)(playerManager->_playerList)._begin >> 2 + if (GHIDRA_INT((game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { this = transition; } else { do { pvVar6 = (playerManager->_playerList)._end; - if ((int)pvVar6 - (int)(playerManager->_playerList)._begin >> 2 == 0) { + if (GHIDRA_INT(pvVar6) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) { KAGE_LogMessage(0x10,(byte *)"((PlayerManager *)())->PlayerManager::GetPlayer() : There are no players! \n"); pvVar6 = (playerManager->_playerList)._end; game = g_game; } piVar10 = (playerManager->_playerList)._begin; - if (uVar2 < (uint)((int)pvVar6 - (int)piVar10 >> 2)) { + if (uVar2 < GHIDRA_UINT((GHIDRA_INT(pvVar6) - GHIDRA_INT(piVar10) >> 2))) { piVar10 = piVar10 + uVar2; } iVar7 = *piVar10; @@ -1490,8 +1490,8 @@ LAB_00831497: } playerManager = &game->_playerManager; uVar2 = uVar2 + 1; - } while (uVar2 < (uint)((int)(game->_playerManager)._playerList._end - - (int)(playerManager->_playerList)._begin >> 2)); + } while (uVar2 < GHIDRA_UINT((GHIDRA_INT((game->_playerManager)._playerList._end) - + GHIDRA_INT((playerManager->_playerList)._begin) >> 2))); iVar7 = transition->_animation; this = transition; } @@ -1503,7 +1503,7 @@ LAB_00831497: local_5c = CONCAT44(free_exref,(undefined4)local_5c); local_50.y = 2.0; do { - local_2c = (int *)((int)game->_roomList[0]._doors + ((int)local_38 - 0x30U)); + local_2c = (int *)(GHIDRA_INT(game->_roomList[0]._doors) + (GHIDRA_INT(local_38) - 0x30U)); if (*local_2c == game->_currentRoomIdx) { playerIt = (game->_playerManager)._playerList._begin; fVar8 = 0.0; @@ -1512,7 +1512,7 @@ LAB_00831497: player = *playerIt; local_48.y = player; if (player != 0.0) { - local_54 = (float)((int)fVar8 + 1); + local_54 = (float)(GHIDRA_INT(fVar8) + 1); iVar7 = local_2c[1]; iVar3 = *(int *)((char *)game->_room + 0xc); if (fVar8 == 0.0) { @@ -1523,7 +1523,7 @@ LAB_00831497: local_40 = (ANM2 *)((float)(iVar7 % iVar3) * 40.0 + 40.0); local_30 = (Entity_Player *)((float)(iVar7 / iVar3) * 40.0 + 120.0); uVar2 = Random(); - local_3c = (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) + local_3c = (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * local_28 * local_24; local_3c = local_3c + local_3c; fVar8 = sin(local_3c); @@ -1535,10 +1535,10 @@ LAB_00831497: *(float *)((char *)player + 0x33c) = fVar8; *(Entity_Player **)((char *)player + 0x340) = pEVar9; *(undefined1 *)((char *)player + 0x139a) = 0; - ((ANM2 *)((ANM2 *)((int)player + 0x41c)))->ANM2::Reset(); + ((ANM2 *)((ANM2 *)(GHIDRA_INT(player) + 0x41c)))->ANM2::Reset(); *(undefined4 *)((char *)player + 0x14c) = 0x3f800000; - ((AnimationState *)((AnimationState *)((int)player + 0x98)))->AnimationState::SetAnimationData((void *)0x0); - local_40 = (ANM2 *)((int)player + 0x48); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(player) + 0x98)))->AnimationState::SetAnimationData((void *)0x0); + local_40 = (ANM2 *)(GHIDRA_INT(player) + 0x48); isAnimSet = ((ANM2 *)(local_40))->ANM2::SetAnimation(s_Jump,1); playerSprite = local_40; if (isAnimSet != 0) { @@ -1549,12 +1549,12 @@ LAB_00831497: *(undefined1 *)((char *)player + 0x1398) = 1; *(undefined1 *)((char *)player + 0x139a) = 0; if (*(int *)((char *)player + 0x7c) != 0) { - ((AnimationState *)((AnimationState *)((int)player + 0x78)))->AnimationState::SetFrameFloat(local_50.y); + ((AnimationState *)((AnimationState *)(GHIDRA_INT(player) + 0x78)))->AnimationState::SetFrameFloat(local_50.y); } game = g_game; pfVar4 = &local_48.y; if (0x22 < *(int *)((char *)player + 0x13bc)) { - pfVar4 = (float *)((int)player + 0x13bc); + pfVar4 = (float *)(GHIDRA_INT(player) + 0x13bc); } local_48.y = 4.90454e-44; *(float *)((char *)player + 0x13bc) = *pfVar4; @@ -1564,40 +1564,40 @@ LAB_00831497: playerIt = playerIt + 1; } while (playerIt != (game->_playerManager)._playerList._end); } - EntityList::QuerySublist((EntityList *)((int)game->_room + 0x1218),&familiars,3,0xee,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(game->_room) + 0x1218),&familiars,3,0xee,-1,0,0); game = g_game; local_3c = 0.0; if ((float)familiars._size != 0.0) { do { - iVar7 = *(int *)((char *)familiars._data + (int)local_3c * 4); + iVar7 = *(int *)((char *)familiars._data + GHIDRA_INT(local_3c) * 4); iVar3 = local_2c[1]; roomWidth = *(int *)((char *)game->_room + 0xc); - local_3c = (float)((int)local_3c + 1); + local_3c = (float)(GHIDRA_INT(local_3c) + 1); *(float *)(iVar7 + 0x33c) = (float)(iVar3 % roomWidth) * 40.0 + 40.0; *(float *)(iVar7 + 0x340) = (float)(iVar3 / roomWidth) * 40.0 + 120.0; - } while ((uint)local_3c < (uint)familiars._size); + } while (GHIDRA_UINT(local_3c) < GHIDRA_UINT(familiars._size)); } - if (familiars._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(familiars) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (familiars._data != (void *)0x0) { uVar2 = *(uint *)((char *)familiars._data + -4); qVar1 = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - uVar2; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - uVar2; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)qVar1 < uVar2); - (*local_5c._4_4_)((uint *)((int)familiars._data + -4)); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar2)); + (*(*(undefined4 *)((char *)&(local_5c) + 0x4)))((uint *)(GHIDRA_INT(familiars._data) + -4)); } local_14 = 0xffffffff; } game = g_game; } - local_38 = (RoomDescriptor *)((int)local_38 + 0xc); - } while ((int)local_38 < 0x18390); + local_38 = (RoomDescriptor *)(GHIDRA_INT(local_38) + 0xc); + } while (GHIDRA_INT(local_38) < 0x18390); LAB_0083162a: ((Room *)(g_game->_room))->Room::render_lighting(); local_5c = 0; @@ -1633,7 +1633,7 @@ LAB_0083162a: LAB_008314b3: uVar2 = uVar2 + 1; puVar5 = puVar5 + 1; - if (iVar3 <= (int)uVar2) goto LAB_0083162a; + if (iVar3 <= GHIDRA_INT(uVar2)) goto LAB_0083162a; goto LAB_00831497; } @@ -1684,7 +1684,7 @@ void RoomTransition::Update() local_8 = (EntityPtr)0xffffffff; puStack_c = &LAB_00b02165; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(animSuffix + 10); + local_14 = __security_cookie ^ GHIDRA_UINT((animSuffix + 10)); ExceptionList = &local_10; local_50 = (Entity_Player *)0x0; local_4c = (EntityPtr)0x0; @@ -1701,7 +1701,7 @@ void RoomTransition::Update() idlePlayer = (Entity_Player *)0x0; local_50 = (Entity_Player *)0x0; local_60 = (std_string *)0x3e8; - ((EntityList *)((EntityList *)((int)g_game->_room + 0x1218)))->EntityList::Update(1); + ((EntityList *)((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218)))->EntityList::Update(1); ((Room *)(g_game->_room))->Room::update_ambient_sounds(); iVar13 = this->_animation; if (iVar13 == 0x13) { @@ -1709,7 +1709,7 @@ void RoomTransition::Update() uVar11 = 0x724; do { uVar15 = uVar15 + 1; - if ((uVar15 < 9) && (parentNode = *(int **)(uVar11 + (int)g_game->_room), parentNode != (int *)0x0)) + if ((uVar15 < 9) && (parentNode = *(int **)(uVar11 + GHIDRA_INT(g_game->_room)), parentNode != (int *)0x0)) { (**(code **)(*parentNode + 8))(); } @@ -1768,10 +1768,10 @@ void RoomTransition::Update() local_68.y = fVar1; dVar16 = floor((double)fVar1); local_68.y = (float)dVar16; - psVar5 = (std_string *)(int)dVar16; + psVar5 = (std_string *)GHIDRA_INT(dVar16); } local_45 = '\0'; - if ((int)local_60 <= (int)psVar5) { + if (GHIDRA_INT(local_60) <= GHIDRA_INT(psVar5)) { psVar5 = local_60; pEVar9 = local_50; } @@ -1791,7 +1791,7 @@ void RoomTransition::Update() pEVar9 = local_50; if ((((iVar13 == 0xb) || (iVar13 == 0x10)) || (iVar13 == 0x13)) && (((local_50 != (Entity_Player *)0x0 && (idlePlayer != (Entity_Player *)0x0)) && - (5 < (int)local_60)))) { + (5 < GHIDRA_INT(local_60))))) { psVar5 = ((ANM2 *)((ANM2 *)&(local_50->_sprite)._animState))->ANM2::GetAnimation(&animName); local_8 = (EntityPtr)0x0; if (0xf < psVar5->_capacity) { @@ -1801,11 +1801,11 @@ void RoomTransition::Update() local_8 = (EntityPtr)0xffffffff; if (0xf < animName._capacity) { uVar11 = animName._capacity + 1; - psVar5 = (std_string *)animName._buf._0_4_; + psVar5 = (*(undefined4 *)((char *)&((std_string *)animName._buf) + 0x0)); if (0xfff < uVar11) { - psVar5 = (std_string *)((std_string *)(animName._buf._0_4_ + -0x18))->_capacity; + psVar5 = (std_string *)((std_string *)((*(undefined4 *)((char *)&(animName._buf) + 0x0)) + -0x18))->_capacity; uVar11 = animName._capacity + 0x24; - if (0x1f < (uint)(animName._buf._0_4_ + (-4 - (int)psVar5))) { + if (0x1f < GHIDRA_UINT(((*(undefined4 *)((char *)&(animName._buf) + 0x0)) + (-4 - GHIDRA_INT(psVar5))))) { LAB_00831b99: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -1819,11 +1819,11 @@ LAB_00831b99: iVar13 = this->_animation; animName._size = 0; animName._capacity = 0xf; - animName._buf._0_4_ = animName._buf._0_4_ & 0xffffff00; + (*(undefined4 *)((char *)&(animName._buf) + 0x0)) = (*(undefined4 *)((char *)&(animName._buf) + 0x0)) & 0xffffff00; if ((iVar13 == 0x13) && (local_4c != (EntityPtr)0x0)) { tmpVec = MusicManager::RandomVector(&local_68); uVar11 = Random(); - randomScale = (float)((double)(int)uVar11 + __uint_to_double_fixup[-((int)uVar11 >> 0x1f)]) + randomScale = (float)((double)GHIDRA_INT(uVar11) + __uint_to_double_fixup[-(GHIDRA_INT(uVar11) >> 0x1f)]) * 2.3283064e-10; fVar1 = tmpVec->x; fVar2 = *(float *)((char *)local_4c + 0x334); @@ -1846,7 +1846,7 @@ LAB_00831c6a: iVar13 = 1; *(uint *)((char *)local_4c + 0x16c) = *(uint *)((char *)local_4c + 0x16c) | 0x1000; *(undefined4 *)((char *)local_4c + 0x168) = *(undefined4 *)((char *)local_4c + 0x168); - ((Room *)(game->_room))->Room::GetGridIndex((Vector *)((int)local_4c + 0x334)); + ((Room *)(game->_room))->Room::GetGridIndex((Vector *)(GHIDRA_INT(local_4c) + 0x334)); uVar6 = FUN_004ce0f0(); switch(uVar6) { case 7: @@ -2050,7 +2050,7 @@ LAB_008321d0: if (iVar13 == 7) { local_58.y = 1.4013e-45; seed_fart_sound_override((int *)&local_58.y); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_58.y,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_58.y),1.0,2,0,1.0,0.0); if (pEVar9 != (Entity_Player *)0x0) { Entity_Player::AnimateCollectible (pEVar9,0xb,(byte *)"Pickup",(byte *)"PlayerPickupSparkle"); @@ -2098,7 +2098,7 @@ LAB_008321d0: if (((iVar13 == 1) || (iVar13 == 2)) || (iVar13 == 0x12)) goto LAB_008321d0; if (((iVar13 != 0xb) && (iVar13 != 0x10)) && ((iVar13 != 0x11 && (iVar13 != 0x13)))) { if (iVar13 == 0x14) goto LAB_008321d0; - ((EntityList *)((EntityList *)((int)g_game->_room + 0x1218)))->EntityList::Update(1); + ((EntityList *)((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218)))->EntityList::Update(1); parentNode = (g_game->_playerManager)._playerList._begin; if (parentNode == (g_game->_playerManager)._playerList._end) goto LAB_00831db4; do { @@ -2115,7 +2115,7 @@ LAB_008321d0: *(undefined4 *)this = 0; break; } - ((EntityList *)((EntityList *)((int)g_game->_room + 0x1218)))->EntityList::Update(1); + ((EntityList *)((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218)))->EntityList::Update(1); parentNode = (g_game->_playerManager)._playerList._begin; if (parentNode != (g_game->_playerManager)._playerList._end) { do { @@ -2168,12 +2168,12 @@ LAB_008321d0: if ((this->_animation == 3) && (this->_frame == 8)) { local_58.y = 2.99878e-43; seed_fart_sound_override((int *)&local_58.y); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_58.y,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_58.y),1.0,2,0,1.0,0.0); } game = g_game; this->_frame = this->_frame + 1; - local_58.y = (float)CONCAT31(local_58.y._1_3_,1); - ((EntityList *)((EntityList *)((int)game->_room + 0x1218)))->EntityList::Update(1); + local_58.y = (float)CONCAT31((*(undefined1 *)((char *)&(local_58.y) + 0x1)),1); + ((EntityList *)((EntityList *)(GHIDRA_INT(game->_room) + 0x1218)))->EntityList::Update(1); parentNode = (g_game->_playerManager)._playerList._begin; if (parentNode != (g_game->_playerManager)._playerList._end) { pEVar9 = (Entity_Player *)local_58.y; @@ -2193,14 +2193,14 @@ LAB_008321d0: if ((void *)piVar14[0x1f] == (void *)0x0) { animName._capacity = 0xf; animName._size = 0; - animName._buf._0_4_ = (std_string *)0x0; + (*(undefined4 *)((char *)&(animName._buf) + 0x0)) = (std_string *)0x0; } else { ((std::string *)(animName._buf))->std::string::string((void *)piVar14[0x1f]); } local_8 = (EntityPtr)0x1; - local_50 = (Entity_Player *)((uint)local_50 | 0x20); - local_60 = (std_string *)animName._buf._0_4_; + local_50 = (Entity_Player *)(GHIDRA_UINT(local_50) | 0x20); + local_60 = (*(undefined4 *)((char *)&((std_string *)animName._buf) + 0x0)); if ((((char)piVar14[0x4e6] == '\0') && (*(char *)((char *)piVar14 + 0x139a) == '\0')) || (animName._size < 5)) { local_4c = animSuffix[0]; @@ -2213,26 +2213,26 @@ LAB_00832568: animSuffix[0] = (EntityPtr)0x0; local_68.y = fVar1; animSuffixCapacity = 0xf; - if (animName._size < (uint)fVar1) { + if (animName._size < GHIDRA_UINT(fVar1)) { /* WARNING: Subroutine does not return */ FUN_00499950(); } pEVar9 = (Entity_Player *)0xffffffff; - if ((Entity_Player *)(animName._size - (int)fVar1) != (Entity_Player *)0xffffffff) { - pEVar9 = (Entity_Player *)(animName._size - (int)fVar1); + if ((Entity_Player *)(animName._size - GHIDRA_INT(fVar1)) != (Entity_Player *)0xffffffff) { + pEVar9 = (Entity_Player *)(animName._size - GHIDRA_INT(fVar1)); } psVar5 = &animName; if (0xf < animName._capacity) { - psVar5 = (std_string *)animName._buf._0_4_; + psVar5 = (*(undefined4 *)((char *)&((std_string *)animName._buf) + 0x0)); } - local_68.y = (float)(psVar5->_buf + (int)fVar1); + local_68.y = (float)(psVar5->_buf + GHIDRA_INT(fVar1)); local_58.y = (float)pEVar9; if ((Entity_Player *)&DAT_0000000f < pEVar9) { if ((Entity_Player *)0x7fffffff < pEVar9) { /* WARNING: Subroutine does not return */ std::string::_Xlen(); } - uVar11 = (uint)pEVar9 | 0xf; + uVar11 = GHIDRA_UINT(pEVar9) | 0xf; if (uVar11 < 0x80000000) { if (uVar11 < 0x16) { uVar11 = 0x16; @@ -2242,46 +2242,46 @@ LAB_00832568: uVar11 = 0x7fffffff; } local_4c = (EntityPtr)std::_Allocate(uVar11 + 1); - animSuffixSize = (int)local_58.y; + animSuffixSize = GHIDRA_INT(local_58.y); animSuffixCapacity = uVar11; memcpy((void *)local_4c,(void *)local_68.y,(size_t)local_58.y); animSuffix[0] = local_4c; *(undefined1 *) - ((int)(&((ANM2 *)((int)local_58.y + 0x48))->_filename + -3) + (int)local_4c) = 0; + (GHIDRA_INT((&((ANM2 *)(GHIDRA_INT(local_58.y) + 0x48))->_filename + -3)) + GHIDRA_INT(local_4c)) = 0; pEVar9 = (Entity_Player *)local_58.y; } else { - animSuffixSize = (int)pEVar9; - memmove(animSuffix,psVar5->_buf + (int)fVar1,(size_t)pEVar9); - (&(*(undefined1 *)((char *)&(animSuffix[-0x12]) + 0x0)))[(int)(pEVar9->_sprite)._filename._buf] = 0; + animSuffixSize = GHIDRA_INT(pEVar9); + memmove(animSuffix,psVar5->_buf + GHIDRA_INT(fVar1),(size_t)pEVar9); + (&(*(undefined1 *)((char *)&(animSuffix[-0x12]) + 0x0)))[GHIDRA_INT((pEVar9->_sprite)._filename._buf)] = 0; pEVar9 = (Entity_Player *)animSuffixSize; uVar11 = animSuffixCapacity; } - local_50 = (Entity_Player *)((uint)local_50 | 0x41); + local_50 = (Entity_Player *)(GHIDRA_UINT(local_50) | 0x41); EVar12 = (EntityPtr)animSuffix; if (0xf < uVar11) { EVar12 = animSuffix[0]; } local_4c = animSuffix[0]; - bVar4 = str_eq((byte *)EVar12,(uint)pEVar9,(byte *)"Death",5); + bVar4 = str_eq((byte *)EVar12,GHIDRA_UINT(pEVar9),(byte *)"Death",5); if (bVar4 != 0) goto LAB_00832568; local_45 = '\x01'; } - if ((((uint)local_50 & 1) != 0) && - (local_50 = (Entity_Player *)((uint)local_50 & 0xfffffffe), 0xf < uVar11)) { + if (((GHIDRA_UINT(local_50) & 1) != 0) && + (local_50 = (Entity_Player *)(GHIDRA_UINT(local_50) & 0xfffffffe), 0xf < uVar11)) { uVar15 = uVar11 + 1; EVar12 = local_4c; if (0xfff < uVar15) { EVar12 = *(EntityPtr *)((char *)local_4c + -4); uVar15 = uVar11 + 0x24; - if (0x1f < ((int)local_4c - (int)EVar12) - 4U) goto LAB_00831b99; + if (0x1f < (GHIDRA_INT(local_4c) - GHIDRA_INT(EVar12)) - 4U) goto LAB_00831b99; } operator_delete((void *)EVar12,uVar15); } local_8 = (EntityPtr)0xffffffff; local_58.y = (float)(Entity_Player *)0x0; if (local_45 == '\0') { - local_58.y = (float)(uint)local_59; + local_58.y = (float)GHIDRA_UINT(local_59); } pEVar9 = (Entity_Player *)local_58.y; if (0xf < animName._capacity) { @@ -2290,7 +2290,7 @@ LAB_00832568: if (0xfff < uVar11) { psVar5 = (std_string *)local_60[-1]._capacity; uVar11 = animName._capacity + 0x24; - if (0x1f < (uint)((int)local_60 + (-4 - (int)psVar5))) goto LAB_00831b99; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_60) + (-4 - GHIDRA_INT(psVar5))))) goto LAB_00831b99; } operator_delete(psVar5,uVar11); pEVar9 = (Entity_Player *)local_58.y; diff --git a/src/game/save_data_manager.cpp b/src/game/save_data_manager.cpp index c6f9834..21d9ad0 100644 --- a/src/game/save_data_manager.cpp +++ b/src/game/save_data_manager.cpp @@ -24,7 +24,7 @@ void * SaveDataManager::open_file_read(byte *fileName) else { file[1] = 2; file[2] = 0; - *file = (int)KAGE::Filesys::File::vftable; + *file = GHIDRA_INT(KAGE)::Filesys::File::vftable; file[3] = 0; } isAppendSlash = 0; @@ -69,7 +69,7 @@ void * SaveDataManager::open_file_write(byte *path, int mode) else { piVar2[1] = 2; piVar2[2] = 0; - *piVar2 = (int)KAGE::Filesys::File::vftable; + *piVar2 = GHIDRA_INT(KAGE)::Filesys::File::vftable; piVar2[3] = 0; } if (*(code **)(*piVar2 + 0x28) == FUN_00a52610) { diff --git a/src/game/score_sheet.cpp b/src/game/score_sheet.cpp index 8872ad2..1f512b6 100644 --- a/src/game/score_sheet.cpp +++ b/src/game/score_sheet.cpp @@ -13,11 +13,11 @@ void ScoreSheet::LoadAnm2() undefined1 *puStack_18; undefined4 local_14; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = 0xffffffff; puStack_18 = &LAB_00b035d5; local_1c = ExceptionList; - local_24 = __security_cookie ^ (int)register0x00000010 - 0x10U; + local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &local_1c; scoreAnmPath._size = 0; scoreAnmPath._capacity = 0xf; @@ -25,20 +25,20 @@ void ScoreSheet::LoadAnm2() scoreAnmPath._buf[1] = '\0'; scoreAnmPath._buf[2] = '\0'; scoreAnmPath._buf[3] = '\0'; - scoreAnmPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(scoreAnmPath._buf) + 0x0)) = std::_Allocate(0x20); scoreAnmPath._size = 0x15; scoreAnmPath._capacity = 0x1f; - builtin_strncpy((char *)scoreAnmPath._buf._0_4_,"gfx/ui/ScoreMenu.anm2",0x16); + builtin_strncpy((*(undefined4 *)((char *)&((char *)scoreAnmPath._buf) + 0x0)),"gfx/ui/ScoreMenu.anm2",0x16); local_14 = 0; ((ANM2 *)((ANM2 *)(this + 4)))->ANM2::Load(&scoreAnmPath,1); local_14 = 0xffffffff; if (0xf < scoreAnmPath._capacity) { uVar2 = scoreAnmPath._capacity + 1; - pcVar1 = (char *)scoreAnmPath._buf._0_4_; + pcVar1 = (*(undefined4 *)((char *)&((char *)scoreAnmPath._buf) + 0x0)); if (0xfff < uVar2) { - pcVar1 = *(char **)(scoreAnmPath._buf._0_4_ + -4); + pcVar1 = *(char **)((*(undefined4 *)((char *)&(scoreAnmPath._buf) + 0x0)) + -4); uVar2 = scoreAnmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(scoreAnmPath._buf._0_4_ + (-4 - (int)pcVar1))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(scoreAnmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar1)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -51,19 +51,19 @@ void ScoreSheet::LoadAnm2() leaderboardAnmPath._buf[1] = '\0'; leaderboardAnmPath._buf[2] = '\0'; leaderboardAnmPath._buf[3] = '\0'; - leaderboardAnmPath._buf._0_4_ = std::_Allocate(0x20); + (*(undefined4 *)((char *)&(leaderboardAnmPath._buf) + 0x0)) = std::_Allocate(0x20); leaderboardAnmPath._size = 0x1b; leaderboardAnmPath._capacity = 0x1f; - builtin_strncpy((char *)leaderboardAnmPath._buf._0_4_,"gfx/ui/LeaderboardMenu.anm2",0x1c); + builtin_strncpy((*(undefined4 *)((char *)&((char *)leaderboardAnmPath._buf) + 0x0)),"gfx/ui/LeaderboardMenu.anm2",0x1c); local_14 = 1; ((ANM2 *)((ANM2 *)(this + 0x49)))->ANM2::Load(&leaderboardAnmPath,1); if (0xf < leaderboardAnmPath._capacity) { uVar2 = leaderboardAnmPath._capacity + 1; - pcVar1 = (char *)leaderboardAnmPath._buf._0_4_; + pcVar1 = (*(undefined4 *)((char *)&((char *)leaderboardAnmPath._buf) + 0x0)); if (0xfff < uVar2) { - pcVar1 = *(char **)(leaderboardAnmPath._buf._0_4_ + -4); + pcVar1 = *(char **)((*(undefined4 *)((char *)&(leaderboardAnmPath._buf) + 0x0)) + -4); uVar2 = leaderboardAnmPath._capacity + 0x24; - if ((char *)0x1f < (char *)(leaderboardAnmPath._buf._0_4_ + (-4 - (int)pcVar1))) { + if ((char *)0x1f < (char *)((*(undefined4 *)((char *)&(leaderboardAnmPath._buf) + 0x0)) + (-4 - GHIDRA_INT(pcVar1)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -170,12 +170,12 @@ void ScoreSheet::store_state(void *dst) *(ScoreSheet *)((char *)pvVar2 + 0x10) = this[0x15]; *(ScoreSheet *)((char *)pvVar2 + 0x14) = this[0x16]; *(undefined4 *)((char *)pvVar2 + 0x1c) = *(undefined4 *)((char *)pvVar2 + 0x18); - iVar1 = (int)this[0x18] - (int)this[0x17] >> 0x1f; - if (((int)this[0x18] - (int)this[0x17]) / 0xc + iVar1 != iVar1) { + iVar1 = GHIDRA_INT(this[0x18]) - GHIDRA_INT(this[0x17]) >> 0x1f; + if ((GHIDRA_INT(this[0x18]) - GHIDRA_INT(this[0x17])) / 0xc + iVar1 != iVar1) { srcOffset = 0; do { dstEnd = *(undefined8 **)((char *)pvVar2 + 0x1c); - srcEntry = (undefined8 *)((int)this[0x17] + srcOffset); + srcEntry = (undefined8 *)(GHIDRA_INT(this[0x17]) + srcOffset); if (dstEnd == *(undefined8 **)((char *)pvVar2 + 0x20)) { std::vector<12byte>::_Emplace_reallocate(dstEnd,srcEntry); } @@ -185,17 +185,17 @@ void ScoreSheet::store_state(void *dst) *(int *)((char *)pvVar2 + 0x1c) = *(int *)((char *)pvVar2 + 0x1c) + 0xc; } srcOffset = srcOffset + 0xc; - dst = (void *)((int)dst + 1); - } while (dst < (void *)(((int)this[0x18] - (int)this[0x17]) / 0xc)); + dst = (void *)(GHIDRA_INT(dst) + 1); + } while (dst < (void *)((GHIDRA_INT(this[0x18]) - GHIDRA_INT(this[0x17])) / 0xc)); } *(undefined4 *)((char *)pvVar2 + 0x28) = *(undefined4 *)((char *)pvVar2 + 0x24); dst = (void *)0x0; - iVar1 = (int)this[0x1b] - (int)this[0x1a] >> 0x1f; - if (((int)this[0x1b] - (int)this[0x1a]) / 0xc + iVar1 != iVar1) { + iVar1 = GHIDRA_INT(this[0x1b]) - GHIDRA_INT(this[0x1a]) >> 0x1f; + if ((GHIDRA_INT(this[0x1b]) - GHIDRA_INT(this[0x1a])) / 0xc + iVar1 != iVar1) { srcOffset = 0; do { dstEnd = *(undefined8 **)((char *)pvVar2 + 0x28); - srcEntry = (undefined8 *)((int)this[0x1a] + srcOffset); + srcEntry = (undefined8 *)(GHIDRA_INT(this[0x1a]) + srcOffset); if (dstEnd == *(undefined8 **)((char *)pvVar2 + 0x2c)) { std::vector<12byte>::_Emplace_reallocate(dstEnd,srcEntry); } @@ -205,19 +205,19 @@ void ScoreSheet::store_state(void *dst) *(int *)((char *)pvVar2 + 0x28) = *(int *)((char *)pvVar2 + 0x28) + 0xc; } srcOffset = srcOffset + 0xc; - dst = (void *)((int)dst + 1); - } while (dst < (void *)(((int)this[0x1b] - (int)this[0x1a]) / 0xc)); + dst = (void *)(GHIDRA_INT(dst) + 1); + } while (dst < (void *)((GHIDRA_INT(this[0x1b]) - GHIDRA_INT(this[0x1a])) / 0xc)); } *(ScoreSheet *)((char *)pvVar2 + 0x30) = this[0x1d]; *(ScoreSheet *)((char *)pvVar2 + 0x34) = this[0x1e]; *(undefined4 *)((char *)pvVar2 + 0x48) = *(undefined4 *)((char *)pvVar2 + 0x44); dst = (void *)0x0; - iVar1 = (int)this[0x20] - (int)this[0x1f] >> 0x1f; - if (((int)this[0x20] - (int)this[0x1f]) / 0xc + iVar1 != iVar1) { + iVar1 = GHIDRA_INT(this[0x20]) - GHIDRA_INT(this[0x1f]) >> 0x1f; + if ((GHIDRA_INT(this[0x20]) - GHIDRA_INT(this[0x1f])) / 0xc + iVar1 != iVar1) { srcOffset = 0; do { dstEnd = *(undefined8 **)((char *)pvVar2 + 0x48); - srcEntry = (undefined8 *)((int)this[0x1f] + srcOffset); + srcEntry = (undefined8 *)(GHIDRA_INT(this[0x1f]) + srcOffset); if (dstEnd == *(undefined8 **)((char *)pvVar2 + 0x4c)) { std::vector<12byte>::_Emplace_reallocate(dstEnd,srcEntry); } @@ -227,17 +227,17 @@ void ScoreSheet::store_state(void *dst) *(int *)((char *)pvVar2 + 0x48) = *(int *)((char *)pvVar2 + 0x48) + 0xc; } srcOffset = srcOffset + 0xc; - dst = (void *)((int)dst + 1); - } while (dst < (void *)(((int)this[0x20] - (int)this[0x1f]) / 0xc)); + dst = (void *)(GHIDRA_INT(dst) + 1); + } while (dst < (void *)((GHIDRA_INT(this[0x20]) - GHIDRA_INT(this[0x1f])) / 0xc)); } *(undefined4 *)((char *)pvVar2 + 0x3c) = *(undefined4 *)((char *)pvVar2 + 0x38); dst = (void *)0x0; - iVar1 = (int)this[0x11] - (int)this[0x10] >> 0x1f; - if (((int)this[0x11] - (int)this[0x10]) / 0xc + iVar1 != iVar1) { + iVar1 = GHIDRA_INT(this[0x11]) - GHIDRA_INT(this[0x10]) >> 0x1f; + if ((GHIDRA_INT(this[0x11]) - GHIDRA_INT(this[0x10])) / 0xc + iVar1 != iVar1) { srcOffset = 0; do { dstEnd = *(undefined8 **)((char *)pvVar2 + 0x3c); - srcEntry = (undefined8 *)((int)this[0x10] + srcOffset); + srcEntry = (undefined8 *)(GHIDRA_INT(this[0x10]) + srcOffset); if (dstEnd == *(undefined8 **)((char *)pvVar2 + 0x40)) { std::vector<12byte>::_Emplace_reallocate(dstEnd,srcEntry); } @@ -247,8 +247,8 @@ void ScoreSheet::store_state(void *dst) *(int *)((char *)pvVar2 + 0x3c) = *(int *)((char *)pvVar2 + 0x3c) + 0xc; } srcOffset = srcOffset + 0xc; - dst = (void *)((int)dst + 1); - } while (dst < (void *)(((int)this[0x11] - (int)this[0x10]) / 0xc)); + dst = (void *)(GHIDRA_INT(dst) + 1); + } while (dst < (void *)((GHIDRA_INT(this[0x11]) - GHIDRA_INT(this[0x10])) / 0xc)); } return; } @@ -285,10 +285,10 @@ void ScoreSheet::restore_state(void *src) else { *(undefined8 *)dstEnd = *srcEntry; *(undefined4 *)((char *)dstEnd + 8) = *(undefined4 *)(srcEntry + 1); - this[0x18] = (ScoreSheet)((int)this[0x18] + 0xc); + this[0x18] = (ScoreSheet)(GHIDRA_INT(this[0x18]) + 0xc); } srcOffset = srcOffset + 0xc; - src = (void *)((int)src + 1); + src = (void *)(GHIDRA_INT(src) + 1); } while (src < (void *)((*(int *)((char *)pvVar2 + 0x1c) - *(int *)((char *)pvVar2 + 0x18)) / 0xc)); } this[0x1b] = this[0x1a]; @@ -306,10 +306,10 @@ void ScoreSheet::restore_state(void *src) else { *(undefined8 *)dstEnd = *srcEntry; *(undefined4 *)((char *)dstEnd + 8) = *(undefined4 *)(srcEntry + 1); - this[0x1b] = (ScoreSheet)((int)this[0x1b] + 0xc); + this[0x1b] = (ScoreSheet)(GHIDRA_INT(this[0x1b]) + 0xc); } srcOffset = srcOffset + 0xc; - src = (void *)((int)src + 1); + src = (void *)(GHIDRA_INT(src) + 1); } while (src < (void *)((*(int *)((char *)pvVar2 + 0x28) - *(int *)((char *)pvVar2 + 0x24)) / 0xc)); } this[0x1d] = *(ScoreSheet *)((char *)pvVar2 + 0x30); @@ -329,10 +329,10 @@ void ScoreSheet::restore_state(void *src) else { *(undefined8 *)dstEnd = *srcEntry; *(undefined4 *)((char *)dstEnd + 8) = *(undefined4 *)(srcEntry + 1); - this[0x20] = (ScoreSheet)((int)this[0x20] + 0xc); + this[0x20] = (ScoreSheet)(GHIDRA_INT(this[0x20]) + 0xc); } srcOffset = srcOffset + 0xc; - src = (void *)((int)src + 1); + src = (void *)(GHIDRA_INT(src) + 1); } while (src < (void *)((*(int *)((char *)pvVar2 + 0x48) - *(int *)((char *)pvVar2 + 0x44)) / 0xc)); } this[0x11] = this[0x10]; @@ -350,10 +350,10 @@ void ScoreSheet::restore_state(void *src) else { *(undefined8 *)dstEnd = *srcEntry; *(undefined4 *)((char *)dstEnd + 8) = *(undefined4 *)(srcEntry + 1); - this[0x11] = (ScoreSheet)((int)this[0x11] + 0xc); + this[0x11] = (ScoreSheet)(GHIDRA_INT(this[0x11]) + 0xc); } srcOffset = srcOffset + 0xc; - src = (void *)((int)src + 1); + src = (void *)(GHIDRA_INT(src) + 1); } while (src < (void *)((*(int *)((char *)pvVar2 + 0x3c) - *(int *)((char *)pvVar2 + 0x38)) / 0xc)); } return; @@ -373,12 +373,12 @@ void ScoreSheet::add_cleared_room(int roomType, int roomShape, int clearCount, b ScoreSheet entriesEnd; game = g_game; - local_8 = __security_cookie ^ (int)register0x00000010 - 4U; + local_8 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; if ((clearCount == 1) && (find_stage_entry(this,g_game->_stage,g_game->_stageType, (g_game->_gameStateFlags & 0x1000000000000) != 0), 0.0 < in_XMM0_Da)) { entry = roomType; - uStack_10 = CONCAT31(uStack_10._1_3_,isFlag); + uStack_10 = CONCAT31((*(undefined1 *)((char *)&(uStack_10) + 0x1)),isFlag); local_c = in_XMM0_Da; entryCount = FUN_009e6740(roomShape); if (0 < entryCount) { @@ -391,14 +391,14 @@ void ScoreSheet::add_cleared_room(int roomType, int roomShape, int clearCount, b else { *(ulonglong *)entriesEnd = CONCAT44(uStack_10,entry); *(float *)((char *)entriesEnd + 8) = local_c; - this[0x18] = (ScoreSheet)((int)this[0x18] + 0xc); + this[0x18] = (ScoreSheet)(GHIDRA_INT(this[0x18]) + 0xc); } entriesLeft = entriesLeft + -1; } while (entriesLeft != 0); game = g_game; } if ((roomType == 0xb) && (game->_bossChallenge != 0)) { - this[0x1d] = (ScoreSheet)((int)this[0x1d] + entryCount); + this[0x1d] = (ScoreSheet)(GHIDRA_INT(this[0x1d]) + entryCount); } } return; @@ -442,7 +442,7 @@ void ScoreSheet::add_pickup_points(int variant, int subType, Vector *position) (pointsText->_targetPosition).x = (float)points; (**(code **)(iVar1 + 0xc))(); } - this[0x14] = (ScoreSheet)((int)this[0x14] + points); + this[0x14] = (ScoreSheet)(GHIDRA_INT(this[0x14]) + points); } return; } @@ -509,7 +509,7 @@ void ScoreSheet::Calculate() puStack_20 = (undefined1 *)(stageParTimes + 0x10); puStack_18 = &LAB_00b0f92d; local_1c = ExceptionList; - uVar5 = __security_cookie ^ (uint)(stageParTimes + 0xd); + uVar5 = __security_cookie ^ GHIDRA_UINT((stageParTimes + 0xd)); ExceptionList = &local_1c; stageParTimes[0] = 0x3c; stageParTimes[1] = 0x78; @@ -548,7 +548,7 @@ void ScoreSheet::Calculate() playersBegin = players; } else { - *playersEnd = (int)local_48; + *playersEnd = GHIDRA_INT(local_48); playersEnd = playersEnd + 1; } } @@ -561,7 +561,7 @@ void ScoreSheet::Calculate() playersBegin = players; } else { - *playersEnd = (int)local_48; + *playersEnd = GHIDRA_INT(local_48); playersEnd = playersEnd + 1; } local_48 = *(int **)(*(int *)(*playersBegin + 0x1e68) + 0x1d98); @@ -573,7 +573,7 @@ void ScoreSheet::Calculate() playersBegin = players; } else { - *playersEnd = (int)local_48; + *playersEnd = GHIDRA_INT(local_48); playersEnd = playersEnd + 1; } local_4c = playersEnd; @@ -588,7 +588,7 @@ void ScoreSheet::Calculate() playersBegin = players; } else { - *local_4c = (int)local_48; + *local_4c = GHIDRA_INT(local_48); playersEnd = local_4c + 1; } local_48 = *(int **)(*(int *)(*playersBegin + 0x1e6c) + 0x1d98); @@ -601,7 +601,7 @@ void ScoreSheet::Calculate() local_4c = playersEnd; } else { - *playersEnd = (int)local_48; + *playersEnd = GHIDRA_INT(local_48); local_4c = playersEnd + 1; } } @@ -612,18 +612,18 @@ void ScoreSheet::Calculate() if ((SVar9 == (ScoreSheet)0x0) || (local_70 = pEVar1, SVar9 == (ScoreSheet)0x1)) { local_70 = (Entity_Player *)&(*(undefined1 *)((char *)&(pEVar1[-1]) + 0x2eff)); } - parStageCount = (int)&DAT_00000008; - if ((int)local_70 < 8) { - parStageCount = (int)local_70; + parStageCount = GHIDRA_INT(&DAT_00000008); + if (GHIDRA_INT(local_70) < 8) { + parStageCount = GHIDRA_INT(local_70); } - if (((10 < (int)pEVar1) || (SVar9 == (ScoreSheet)0x4)) || + if (((10 < GHIDRA_INT(pEVar1)) || (SVar9 == (ScoreSheet)0x4)) || (local_80 = (ScoreSheet)0x0, SVar9 == (ScoreSheet)0x5)) { local_80 = (ScoreSheet)0x1; } *this = (ScoreSheet)0x0; local_78 = 0; - iVar6 = (int)this[0x20] - (int)this[0x1f] >> 0x1f; - if (((int)this[0x20] - (int)this[0x1f]) / 0xc + iVar6 != iVar6) { + iVar6 = GHIDRA_INT(this[0x20]) - GHIDRA_INT(this[0x1f]) >> 0x1f; + if ((GHIDRA_INT(this[0x20]) - GHIDRA_INT(this[0x1f])) / 0xc + iVar6 != iVar6) { iVar6 = 0; do { SVar9 = this[0x1f]; @@ -638,10 +638,10 @@ void ScoreSheet::Calculate() else { iVar7 = 500; } - *this = (ScoreSheet)((int)*this + iVar7); + *this = (ScoreSheet)(GHIDRA_INT(*this) + iVar7); iVar6 = iVar6 + 0xc; local_78 = local_78 + 1; - } while (local_78 < (uint)(((int)this[0x20] - (int)SVar9) / 0xc)); + } while (local_78 < GHIDRA_UINT(((GHIDRA_INT(this[0x20]) - GHIDRA_INT(SVar9)) / 0xc))); } SVar9 = this[0x16]; SVar8 = (ScoreSheet)0x0; @@ -702,18 +702,18 @@ void ScoreSheet::Calculate() local_78 = 0; uVar5 = *(uint *)(iVar6 + 0x1350); do { - uVar11 = (int)uVar5 >> 1; - fVar10 = (float)((int)fVar10 + (uVar5 & 1)); - uVar5 = (int)uVar5 >> 2; + uVar11 = GHIDRA_INT(uVar5) >> 1; + fVar10 = (float)(GHIDRA_INT(fVar10) + (uVar5 & 1)); + uVar5 = GHIDRA_INT(uVar5) >> 2; local_78 = local_78 + (uVar11 & 1); iVar7 = iVar7 + -1; } while (iVar7 != 0); - fVar10 = (float)((int)fVar10 + local_78); + fVar10 = (float)(GHIDRA_INT(fVar10) + local_78); local_74 = local_74 + *(int *)(iVar6 + 0x1340); redHeartsSum = redHeartsSum + *(int *)(iVar6 + 0x1344); soulHeartsSum = soulHeartsSum + *(int *)(iVar6 + 0x134c); eternalHeartsSum = eternalHeartsSum + *(int *)(iVar6 + 0x1348); - local_4c = (int *)((int)local_4c + *(int *)(iVar6 + 0x194c)); + local_4c = (int *)(GHIDRA_INT(local_4c) + *(int *)(iVar6 + 0x194c)); boneHeartsSum = boneHeartsSum + *(int *)(iVar6 + 0x1d88); local_48 = local_48 + 1; } while (local_48 != piVar13); @@ -721,24 +721,24 @@ void ScoreSheet::Calculate() } remainingValue = 0.0; remainingValue = - (float)((double)(int)this[0x14] + __uint_to_double_fixup[-((int)this[0x14] >> 0x1f)]); + (float)((double)GHIDRA_INT(this[0x14]) + __uint_to_double_fixup[-(GHIDRA_INT(this[0x14]) >> 0x1f)]); for (decayWeight = 1.0; (0.0 < remainingValue && (0.001 < decayWeight)); decayWeight = decayWeight * 0.98058254) { auVar15 = ZEXT812(0x42c80000); - if (remainingValue <= auVar15._0_4_) { - auVar15._4_8_ = auVar15._4_8_; - auVar15._0_4_ = remainingValue; + if (remainingValue <= (*(undefined4 *)((char *)&(auVar15) + 0x0))) { + (*(undefined8 *)((char *)&(auVar15) + 0x4)) = (*(undefined8 *)((char *)&(auVar15) + 0x4)); + (*(undefined4 *)((char *)&(auVar15) + 0x0)) = remainingValue; } remainingValue = remainingValue - 100.0; - chunkScore = auVar15._0_4_ * decayWeight; + chunkScore = (*(undefined4 *)((char *)&(auVar15) + 0x0)) * decayWeight; remainingValue = remainingValue + chunkScore + chunkScore; } iVar6 = *playersBegin; this[1] = (ScoreSheet) - ((int)remainingValue + - ((int)local_4c * 5 + + (GHIDRA_INT(remainingValue) + + (GHIDRA_INT(local_4c) * 5 + *(int *)(iVar6 + 0x1368) + (*(int *)(iVar6 + 0x1364) + *(int *)(iVar6 + 0x135c)) * 2 + - boneHeartsSum + eternalHeartsSum + (int)fVar10 + redHeartsSum + soulHeartsSum + + boneHeartsSum + eternalHeartsSum + GHIDRA_INT(fVar10) + redHeartsSum + soulHeartsSum + local_74) * 10); players = playersBegin; calculate_room_score(this); @@ -746,14 +746,14 @@ void ScoreSheet::Calculate() challengeParams = ((Game *)(g_game))->Game::GetChallengeParams(); if ((challengeParams->_pathType == 3) || (this[0x16] == (ScoreSheet)0xe)) { local_80 = (ScoreSheet)0x0; - parStageCount = (int)local_70; - if (6 < (int)local_70) { - parStageCount = (int)&DAT_00000006; + parStageCount = GHIDRA_INT(local_70); + if (6 < GHIDRA_INT(local_70)) { + parStageCount = GHIDRA_INT(&DAT_00000006); } iVar6 = 0x3c; - local_48 = (int *)(((int)this[0x20] - (int)this[0x1f]) / 0xc); + local_48 = (int *)((GHIDRA_INT(this[0x20]) - GHIDRA_INT(this[0x1f])) / 0xc); if (local_48 != (int *)0x0) { - entryFlag = (char *)((int)this[0x1f] + 8); + entryFlag = (char *)(GHIDRA_INT(this[0x1f]) + 8); iVar7 = iVar6; piVar14 = local_48; do { @@ -763,7 +763,7 @@ void ScoreSheet::Calculate() if (isEntryFlagged == '\0') { iVar6 = iVar7; } - piVar14 = (int *)((int)piVar14 + -1); + piVar14 = (int *)(GHIDRA_INT(piVar14) + -1); iVar7 = iVar6; } while (piVar14 != (int *)0x0); local_4c = (int *)iVar6; @@ -773,12 +773,12 @@ void ScoreSheet::Calculate() } } piVar14 = (int *)0x0; - if ((parStageCount < 1) || ((uint)parStageCount < 8)) { + if ((parStageCount < 1) || (GHIDRA_UINT(parStageCount) < 8)) { piVar12 = local_4c; } else { uVar5 = parStageCount & 0x80000007; - if ((int)uVar5 < 0) { + if (GHIDRA_INT(uVar5) < 0) { uVar5 = (uVar5 - 1 | 0xfffffff8) + 1; } iVar6 = 0; @@ -790,44 +790,44 @@ void ScoreSheet::Calculate() iVar20 = 0; iVar21 = 0; do { - iVar6 = iVar6 + stageParTimes[(int)piVar14]; - iVar7 = iVar7 + stageParTimes[(int)piVar14 + 1]; - iVar16 = iVar16 + stageParTimes[(int)piVar14 + 2]; - iVar17 = iVar17 + stageParTimes[(int)piVar14 + 3]; + iVar6 = iVar6 + stageParTimes[GHIDRA_INT(piVar14)]; + iVar7 = iVar7 + stageParTimes[GHIDRA_INT(piVar14) + 1]; + iVar16 = iVar16 + stageParTimes[GHIDRA_INT(piVar14) + 2]; + iVar17 = iVar17 + stageParTimes[GHIDRA_INT(piVar14) + 3]; piVar12 = piVar14 + 1; - iVar2 = (int)piVar14 + 5; - iVar3 = (int)piVar14 + 6; - iVar4 = (int)piVar14 + 7; + iVar2 = GHIDRA_INT(piVar14) + 5; + iVar3 = GHIDRA_INT(piVar14) + 6; + iVar4 = GHIDRA_INT(piVar14) + 7; piVar14 = piVar14 + 2; - iVar18 = iVar18 + stageParTimes[(int)piVar12]; + iVar18 = iVar18 + stageParTimes[GHIDRA_INT(piVar12)]; iVar19 = iVar19 + stageParTimes[iVar2]; iVar20 = iVar20 + stageParTimes[iVar3]; iVar21 = iVar21 + stageParTimes[iVar4]; - } while ((int)piVar14 < (int)(parStageCount - uVar5)); - piVar12 = (int *)((int)local_4c + + } while (GHIDRA_INT(piVar14) < GHIDRA_INT((parStageCount - uVar5))); + piVar12 = (int *)(GHIDRA_INT(local_4c) + iVar6 + iVar18 + iVar16 + iVar20 + iVar7 + iVar19 + iVar17 + iVar21); } local_74 = 0; - if ((int)piVar14 < parStageCount) { - if (parStageCount - (int)piVar14 < 2) { + if (GHIDRA_INT(piVar14) < parStageCount) { + if (parStageCount - GHIDRA_INT(piVar14) < 2) { iVar6 = 0; LAB_009e63f7: - piVar12 = (int *)((int)piVar12 + stageParTimes[(int)piVar14]); + piVar12 = (int *)(GHIDRA_INT(piVar12) + stageParTimes[GHIDRA_INT(piVar14)]); } else { iVar6 = 0; local_74 = 0; do { - iVar6 = iVar6 + stageParTimes[(int)piVar14]; - local_74 = local_74 + stageParTimes[(int)piVar14 + 1]; - piVar14 = (int *)((int)piVar14 + 2); - } while ((int)piVar14 < parStageCount + -1); + iVar6 = iVar6 + stageParTimes[GHIDRA_INT(piVar14)]; + local_74 = local_74 + stageParTimes[GHIDRA_INT(piVar14) + 1]; + piVar14 = (int *)(GHIDRA_INT(piVar14) + 2); + } while (GHIDRA_INT(piVar14) < parStageCount + -1); local_48 = piVar14; - if ((int)piVar14 < parStageCount) goto LAB_009e63f7; + if (GHIDRA_INT(piVar14) < parStageCount) goto LAB_009e63f7; } - piVar12 = (int *)((int)piVar12 + iVar6 + local_74); + piVar12 = (int *)(GHIDRA_INT(piVar12) + iVar6 + local_74); } - iVar6 = (int)piVar12 + (int)local_80 * 0x1a4; + iVar6 = GHIDRA_INT(piVar12) + GHIDRA_INT(local_80) * 0x1a4; SVar9 = this[0x16]; if (((SVar9 == (ScoreSheet)0x6) || (SVar9 == (ScoreSheet)0x7)) || (SVar9 == (ScoreSheet)0x8)) { iVar6 = iVar6 + 0x1a4; @@ -845,14 +845,14 @@ LAB_009e63f7: else { fVar10 = log_precise(0.8); fVar10 = (fVar10 * ((float)g_game->_timeCounter / 30.0)) / - (float)((double)(int)local_54 + __uint_to_double_fixup[-((int)local_54 >> 0x1f)]); + (float)((double)GHIDRA_INT(local_54) + __uint_to_double_fixup[-(GHIDRA_INT(local_54) >> 0x1f)]); FUN_007df1e0(); local_54 = (1.0 - fVar10) * - (float)((int)this[7] + (int)this[2] + (int)*this + (int)this[4] + (int)this[8] + - (int)this[5] + (int)this[6] + (int)this[3]) * 0.8; + (float)(GHIDRA_INT(this[7]) + GHIDRA_INT(this[2]) + GHIDRA_INT(*this) + GHIDRA_INT(this[4]) + GHIDRA_INT(this[8]) + + GHIDRA_INT(this[5]) + GHIDRA_INT(this[6]) + GHIDRA_INT(this[3])) * 0.8; dVar23 = ceil((double)local_54); local_54 = (float)dVar23; - SVar9 = (ScoreSheet)(int)dVar23; + SVar9 = (ScoreSheet)GHIDRA_INT(dVar23); } this[0xb] = SVar9; piVar12 = (int *)0x0; @@ -862,19 +862,19 @@ LAB_009e63f7: do { iVar6 = *piVar14; piVar14 = piVar14 + 1; - piVar12 = (int *)((int)piVar12 + *(int *)(iVar6 + 0x16b4)); + piVar12 = (int *)(GHIDRA_INT(piVar12) + *(int *)(iVar6 + 0x16b4)); } while (piVar14 != piVar13); local_48 = piVar12; } fVar10 = log_precise(0.8); - remainingValue = ((float)((double)(int)local_48 + __uint_to_double_fixup[-((int)local_48 >> 0x1f)]) * + remainingValue = ((float)((double)GHIDRA_INT(local_48) + __uint_to_double_fixup[-(GHIDRA_INT(local_48) >> 0x1f)]) * fVar10) / 12.0; FUN_007df1e0(); - local_54 = (1.0 - remainingValue) * (float)(int)this[9] * 0.8; + local_54 = (1.0 - remainingValue) * (float)GHIDRA_INT(this[9]) * 0.8; dVar23 = ceil((double)local_54); local_54 = (float)dVar23; local_80 = (ScoreSheet)thunk_FUN_00af0780(); - stageNum = (int)local_70; + stageNum = GHIDRA_INT(local_70); if (this[0x16] == (ScoreSheet)0xe) { stageNum = 7; } @@ -895,38 +895,38 @@ LAB_009e63f7: do { iVar6 = 0; piVar12 = *(int **)(*piVar14 + 0x16c8); - for (iVar7 = *(int *)(*piVar14 + 0x16cc) - (int)piVar12 >> 2; iVar7 != 0; iVar7 = iVar7 + -1 + for (iVar7 = *(int *)(*piVar14 + 0x16cc) - GHIDRA_INT(piVar12) >> 2; iVar7 != 0; iVar7 = iVar7 + -1 ) { iVar6 = iVar6 + *piVar12; piVar12 = piVar12 + 1; } piVar14 = piVar14 + 1; - local_48 = (int *)((int)local_48 + iVar6); + local_48 = (int *)(GHIDRA_INT(local_48) + iVar6); } while (piVar14 != piVar13); local_80 = this[10]; } SVar8 = this[1]; - remainingValue = ((float)((double)(int)local_48 + __uint_to_double_fixup[-((int)local_48 >> 0x1f)]) * + remainingValue = ((float)((double)GHIDRA_INT(local_48) + __uint_to_double_fixup[-(GHIDRA_INT(local_48) >> 0x1f)]) * fVar10) / remainingValue; FUN_007df1e0(); - local_54 = (1.0 - remainingValue) * (float)(int)SVar8 * 0.8; + local_54 = (1.0 - remainingValue) * (float)GHIDRA_INT(SVar8) * 0.8; dVar23 = ceil((double)local_54); local_54 = (float)dVar23; SVar9 = (ScoreSheet)thunk_FUN_00af0780(); this[0xc] = SVar9; } this[0xd] = (ScoreSheet) - (((((int)this[7] - (int)SVar9) - (int)local_80) - (int)this[0xb]) + (int)this[2] + - (int)*this + (int)this[4] + (int)this[8] + (int)this[5] + (int)SVar8 + (int)this[9] + - (int)this[6] + (int)this[3]); + ((((GHIDRA_INT(this[7]) - GHIDRA_INT(SVar9)) - GHIDRA_INT(local_80)) - GHIDRA_INT(this[0xb])) + GHIDRA_INT(this[2]) + + GHIDRA_INT(*this) + GHIDRA_INT(this[4]) + GHIDRA_INT(this[8]) + GHIDRA_INT(this[5]) + GHIDRA_INT(SVar8) + GHIDRA_INT(this[9]) + + GHIDRA_INT(this[6]) + GHIDRA_INT(this[3])); LAB_009e66e0: if (playersBegin != (int *)0x0) { - uVar5 = (int)playersCapacityEnd - (int)playersBegin & 0xfffffffc; + uVar5 = GHIDRA_INT(playersCapacityEnd) - GHIDRA_INT(playersBegin) & 0xfffffffc; piVar13 = playersBegin; if (0xfff < uVar5) { piVar13 = (int *)playersBegin[-1]; uVar5 = uVar5 + 0x23; - if (0x1f < (uint)((int)playersBegin + (-4 - (int)piVar13))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(playersBegin) + (-4 - GHIDRA_INT(piVar13))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -956,44 +956,44 @@ void ScoreSheet::calculate_room_score() this[9] = (ScoreSheet)0x0; score = (ScoreSheet)0x0; SVar1 = this[0x1a]; - iVar2 = (int)this[0x1b] - (int)SVar1 >> 0x1f; - if (((int)this[0x1b] - (int)SVar1) / 0xc + iVar2 != iVar2) { + iVar2 = GHIDRA_INT(this[0x1b]) - GHIDRA_INT(SVar1) >> 0x1f; + if ((GHIDRA_INT(this[0x1b]) - GHIDRA_INT(SVar1)) / 0xc + iVar2 != iVar2) { do { score = this[9]; - multiplier = *(float *)(entryOffset + 8 + (int)SVar1); - if (*(char *)(entryOffset + 4 + (int)SVar1) == '\0') { - iVar2 = FUN_009e69c0(*(undefined4 *)(entryOffset + (int)SVar1),0); - score = (ScoreSheet)((int)score + (int)((float)iVar2 * multiplier)); + multiplier = *(float *)(entryOffset + 8 + GHIDRA_INT(SVar1)); + if (*(char *)(entryOffset + 4 + GHIDRA_INT(SVar1)) == '\0') { + iVar2 = FUN_009e69c0(*(undefined4 *)(entryOffset + GHIDRA_INT(SVar1)),0); + score = (ScoreSheet)(GHIDRA_INT(score) + GHIDRA_INT(((float)iVar2 * multiplier))); this[9] = score; } else { - iVar2 = FUN_009e69c0(*(undefined4 *)(entryOffset + (int)SVar1),0); - bonusTotal = bonusTotal + (int)((float)iVar2 * multiplier); + iVar2 = FUN_009e69c0(*(undefined4 *)(entryOffset + GHIDRA_INT(SVar1)),0); + bonusTotal = bonusTotal + GHIDRA_INT(((float)iVar2 * multiplier)); } entryOffset = entryOffset + 0xc; i = i + 1; - } while (i < (uint)(((int)this[0x1b] - (int)SVar1) / 0xc)); + } while (i < GHIDRA_UINT(((GHIDRA_INT(this[0x1b]) - GHIDRA_INT(SVar1)) / 0xc))); } SVar1 = this[0x17]; i = 0; - iVar2 = (int)this[0x18] - (int)SVar1 >> 0x1f; - if (((int)this[0x18] - (int)SVar1) / 0xc + iVar2 != iVar2) { + iVar2 = GHIDRA_INT(this[0x18]) - GHIDRA_INT(SVar1) >> 0x1f; + if ((GHIDRA_INT(this[0x18]) - GHIDRA_INT(SVar1)) / 0xc + iVar2 != iVar2) { iVar2 = 0; do { score = this[9]; multiplier = *(float *)((char *)SVar1 + 8 + iVar2); if (*(char *)((char *)SVar1 + 4 + iVar2) == '\0') { entryOffset = FUN_009e69c0(*(undefined4 *)((char *)SVar1 + iVar2),1); - score = (ScoreSheet)((int)score + (int)((float)entryOffset * multiplier)); + score = (ScoreSheet)(GHIDRA_INT(score) + GHIDRA_INT(((float)entryOffset * multiplier))); this[9] = score; } else { entryOffset = FUN_009e69c0(*(undefined4 *)((char *)SVar1 + iVar2),1); - bonusTotal = bonusTotal + (int)((float)entryOffset * multiplier); + bonusTotal = bonusTotal + GHIDRA_INT(((float)entryOffset * multiplier)); } iVar2 = iVar2 + 0xc; i = i + 1; - } while (i < (uint)(((int)this[0x18] - (int)SVar1) / 0xc)); + } while (i < GHIDRA_UINT(((GHIDRA_INT(this[0x18]) - GHIDRA_INT(SVar1)) / 0xc))); } if (1999 < bonusTotal) { *(undefined1 *)(this + 0x22) = 1; @@ -1004,16 +1004,16 @@ void ScoreSheet::calculate_room_score() iVar2 = bonusTotal; } score = (ScoreSheet) - (((int)this[0x1e] * 3 + (int)this[0x1d]) * 100 + iVar2 + (int)this[0x15] + (int)score); + ((GHIDRA_INT(this[0x1e]) * 3 + GHIDRA_INT(this[0x1d])) * 100 + iVar2 + GHIDRA_INT(this[0x15]) + GHIDRA_INT(score)); this[9] = score; - gameStateFlagsHigh = *(uint *)((int)&game->_gameStateFlags + 4); + gameStateFlagsHigh = *(uint *)(GHIDRA_INT(&game->_gameStateFlags) + 4); if ((gameStateFlagsHigh & 0x40) != 0) { - score = (ScoreSheet)((int)score + 1000); + score = (ScoreSheet)(GHIDRA_INT(score) + 1000); this[9] = score; - gameStateFlagsHigh = *(uint *)((int)&game->_gameStateFlags + 4); + gameStateFlagsHigh = *(uint *)(GHIDRA_INT(&game->_gameStateFlags) + 4); } if ((gameStateFlagsHigh & 0x80) != 0) { - this[9] = (ScoreSheet)((int)score + 1000); + this[9] = (ScoreSheet)(GHIDRA_INT(score) + 1000); } return; } @@ -1028,13 +1028,13 @@ void * ScoreSheet::find_stage_entry(int stage, int stageType, byte isFlag) uint index; index = 0; - iVar2 = (int)this[0x11] - (int)this[0x10]; + iVar2 = GHIDRA_INT(this[0x11]) - GHIDRA_INT(this[0x10]); entry = (byte *)(iVar2 * 0x2aaaaaab); iVar1 = iVar2 >> 0x1f; iVar2 = iVar2 / 0xc + iVar1; entryCount = iVar2 - iVar1; if (iVar2 != iVar1) { - entry = (byte *)((int)this[0x10] + 8); + entry = (byte *)(GHIDRA_INT(this[0x10]) + 8); while (((*(int *)(entry + -8) != stage || (*(int *)(entry + -4) != stageType)) || (*entry != isFlag))) { index = index + 1; diff --git a/src/game/seeds.cpp b/src/game/seeds.cpp index 938f8ac..c8bb12e 100644 --- a/src/game/seeds.cpp +++ b/src/game/seeds.cpp @@ -93,7 +93,7 @@ byte Seeds::HasSeedEffect(uint seedEffect) std::set::find_node(findResult,&seedEffect); if ((*(char *)((char *)boundNode + 0xd) == '\0') && - (*(int *)((char *)boundNode + 0x10) <= (int)seedEffect)) { + (*(int *)((char *)boundNode + 0x10) <= GHIDRA_INT(seedEffect))) { return boundNode != this->_seedEffects; } return 0; @@ -122,7 +122,7 @@ void Seeds::ClearSeedEffects() FID_conflict__Erase_tree_>_> (&this->_seedEffects, (fuzzer_allocator_> *)&this->_seedEffects, - *(_Tree_node **)((int)treeHead + 4)); + *(_Tree_node **)(GHIDRA_INT(treeHead) + 4)); *(void **)((char *)treeHead + 4) = treeHead; *(void **)treeHead = treeHead; *(void **)((char *)treeHead + 8) = treeHead; @@ -173,7 +173,7 @@ void Seeds::AddSeedEffect(int seedEffect) { undefined1 insertResult [12]; - if ((uint)seedEffect < 0x50) { + if (GHIDRA_UINT(seedEffect) < 0x50) { std::set::insert(insertResult,&seedEffect); } return; @@ -205,12 +205,12 @@ uint Seeds::GetForcedCurses() } seedEffectsHead = local_8; seedKey = 0x39; - curses = (uint)(foundNode != local_8); + curses = GHIDRA_UINT((foundNode != local_8)); std::set::find_node(findResult,&seedKey); if ((((*(char *)((char *)node + 0xd) == '\0') && (*(int *)((char *)node + 0x10) < 0x3a)) && (node != local_8)) && (g_game->_challenge != 0x2c)) { stageParity = g_game->_stage & 0x80000001; - if ((int)stageParity < 0) { + if (GHIDRA_INT(stageParity) < 0) { stageParity = (stageParity - 1 | 0xfffffffe) + 1; } if (((stageParity == 1) && (g_game->_stage < 8)) && @@ -274,7 +274,7 @@ uint Seeds::GetPreventedCurses() treeHead = firstResult; } seedEffect = 0x40; - preventedCurses = (uint)(firstResult != treeHead); + preventedCurses = GHIDRA_UINT((firstResult != treeHead)); std::set::find_node(findResult,&seedEffect); if (((*(char *)((char *)foundNode + 0xd) == '\0') && (*(int *)((char *)foundNode + 0x10) < 0x41)) && (foundNode != treeHead)) { @@ -328,7 +328,7 @@ uint Seeds::GetStageSeed(int stage) if (this->_gameStartSeed == 0) { KAGE_LogMessage(0x10,(byte *)"Error: Game Start Seed was not set.\n"); } - stageIndex = -(uint)(stage != 0) & stage; + stageIndex = -GHIDRA_UINT((stage != 0)) & stage; stageIndex = 0xd; if (stageIndex < 0xd) { stageIndex = stageIndex; @@ -377,7 +377,7 @@ void Seeds::constructor() *(void **)((char *)newHead + 4) = newHead; *(void **)((char *)newHead + 8) = newHead; *(undefined2 *)((char *)newHead + 0xc) = 0x101; - *tree = (int)newHead; + *tree = GHIDRA_INT(newHead); *(undefined4 *)(in_ECX + 4) = 0; *in_ECX = 0; head = *tree; @@ -428,12 +428,12 @@ void Seeds::construct_from_copy(Seeds *right) treeHead = *seedEffects; FID_conflict__Erase_tree_>_> (seedEffects,(fuzzer_allocator_> *)seedEffects, - *(_Tree_node **)((int)treeHead + 4)); + *(_Tree_node **)(GHIDRA_INT(treeHead) + 4)); *(void **)((char *)treeHead + 4) = treeHead; *(void **)treeHead = treeHead; *(void **)((char *)treeHead + 8) = treeHead; this->_seedEffectsCount = 0; - std_set_uint_copy(seedEffects,&right->_seedEffects,(int)right); + std_set_uint_copy(seedEffects,&right->_seedEffects,GHIDRA_INT(right)); } iVar1 = (right->_rng)._shift1; iVar2 = (right->_rng)._shift2; @@ -486,12 +486,12 @@ Seeds * Seeds::operator_assign(Seeds *other) seedEffectsHead = *seedEffects; FID_conflict__Erase_tree_>_> (seedEffects,(fuzzer_allocator_> *)seedEffects, - *(_Tree_node **)((int)seedEffectsHead + 4)); + *(_Tree_node **)(GHIDRA_INT(seedEffectsHead) + 4)); *(void **)((char *)seedEffectsHead + 4) = seedEffectsHead; *(void **)seedEffectsHead = seedEffectsHead; *(void **)((char *)seedEffectsHead + 8) = seedEffectsHead; this->_seedEffectsCount = 0; - std_set_uint_copy(&this->_seedEffects,&other->_seedEffects,(int)other); + std_set_uint_copy(&this->_seedEffects,&other->_seedEffects,GHIDRA_INT(other)); } iVar2 = (other->_rng)._shift1; iVar3 = (other->_rng)._shift2; @@ -555,12 +555,12 @@ void Seeds::InitSeedInfo() local_8 = 0xffffffff; puStack_c = &LAB_00b0fb95; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(local_3c + 0x38); + local_14 = __security_cookie ^ GHIDRA_UINT((local_3c + 0x38)); ExceptionList = &local_10; - banListSize = DAT_00c798c8 - (int)g_seedComboBans >> 3; + banListSize = DAT_00c798c8 - GHIDRA_INT(g_seedComboBans) >> 3; if (banListSize < 0x51) { if (banListSize < 0x50) { - if ((uint)(DAT_00c798cc - (int)g_seedComboBans >> 3) < 0x50) { + if (GHIDRA_UINT((DAT_00c798cc - GHIDRA_INT(g_seedComboBans) >> 3)) < 0x50) { std::vector>::_Resize_reallocate(banListSize,&local_30); } else { @@ -570,7 +570,7 @@ void Seeds::InitSeedInfo() } } else { - banListEnd = (int)g_seedComboBans + 0x280; + banListEnd = GHIDRA_INT(g_seedComboBans) + 0x280; FUN_009ebbf0(banListSize,local_14); DAT_00c798c8 = banListEnd; } @@ -599,9 +599,9 @@ void Seeds::InitSeedInfo() copyHead[1] = (int *)copyHead; copyHead[2] = (int *)copyHead; *(undefined2 *)(copyHead + 3) = 0x101; - local_8._0_1_ = 2; - std_set_uint_copy(©Head,&exclusiveSetHead,(int)local_30); - local_8._0_1_ = 3; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; + std_set_uint_copy(©Head,&exclusiveSetHead,GHIDRA_INT(local_30)); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 3; local_30 = (int ***)*copyHead; copyHeadReg = copyHead; if (local_30 != (int ***)copyHead) { @@ -626,7 +626,7 @@ void Seeds::InitSeedInfo() *)&local_30); } while (local_30 != (int ***)copyHeadReg); } - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); FID_conflict__Erase_tree_>_> (©Head,(fuzzer_allocator_> *)©Head, (_Tree_node *)copyHeadReg[1]); @@ -722,7 +722,7 @@ void Seeds::InitSeedInfo() FID_conflict__Erase_tree_>_> (&exclusiveSetHead, (fuzzer_allocator_> *)&exclusiveSetHead, - *(_Tree_node **)((int)exclusiveSetHead + 4)); + *(_Tree_node **)(GHIDRA_INT(exclusiveSetHead) + 4)); operator_delete(exclusiveSetHead,0x14); ExceptionList = local_10; return; @@ -773,8 +773,8 @@ byte Seeds::IsSeedComboBanned(int seedEffectA, int seedEffectB) int *foundIt; int *bannedSeeds; - if (((uint)seedEffectA < 0x50) && ((uint)seedEffectB < 0x50)) { - bannedSeeds = (int *)((int)g_seedComboBans + seedEffectA * 8); + if ((GHIDRA_UINT(seedEffectA) < 0x50) && (GHIDRA_UINT(seedEffectB) < 0x50)) { + bannedSeeds = (int *)(GHIDRA_INT(g_seedComboBans) + seedEffectA * 8); foundIt = (int *)std::set::find(&seedEffectA,&seedEffectB); return *foundIt != *bannedSeeds; } @@ -823,7 +823,7 @@ void Seeds::Reset() FID_conflict__Erase_tree_>_> (&this->_seedEffects, (fuzzer_allocator_> *)&this->_seedEffects, - *(_Tree_node **)((int)seedEffectsHead + 4)); + *(_Tree_node **)(GHIDRA_INT(seedEffectsHead) + 4)); *(void **)((char *)seedEffectsHead + 4) = seedEffectsHead; *(void **)seedEffectsHead = seedEffectsHead; *(void **)((char *)seedEffectsHead + 8) = seedEffectsHead; @@ -848,7 +848,7 @@ byte Seeds::CanAddSeedEffect(uint seedEffect) (isAlreadyActive = HasSeedEffect(this,seedEffect), isAlreadyActive != 0)) { return 0; } - std::set::set_copy((void *)((int)g_seedComboBans + seedEffect * 8)); + std::set::set_copy((void *)(GHIDRA_INT(g_seedComboBans) + seedEffect * 8)); bannedHead = bannedEffects[0]; activeHead = this->_seedEffects; activeIt = (undefined4 *)*activeHead; @@ -859,7 +859,7 @@ LAB_009e9ccd: FID_conflict__Erase_tree_>_> (bannedEffects, (fuzzer_allocator_> *)bannedEffects, - *(_Tree_node **)((int)bannedHead + 4)); + *(_Tree_node **)(GHIDRA_INT(bannedHead) + 4)); operator_delete(bannedEffects[0],0x14); return isAllowed; } @@ -884,9 +884,9 @@ void Seeds::RemoveBlockingSeedEffects(int seedEffect) int banListOffset; int *banSet; - if ((uint)seedEffect < 0x50) { + if (GHIDRA_UINT(seedEffect) < 0x50) { banListOffset = seedEffect * 8; - banSet = *(int **)(banListOffset + (int)g_seedComboBans); + banSet = *(int **)(banListOffset + GHIDRA_INT(g_seedComboBans)); seedEffect = *banSet; if ((int *)seedEffect != banSet) { do { @@ -896,7 +896,7 @@ void Seeds::RemoveBlockingSeedEffects(int seedEffect) _Tree_unchecked_const_iterator_>,std::_Iterator_base0> ::operator++((_Tree_unchecked_const_iterator_>,std::_Iterator_base0> *)&seedEffect); - } while (seedEffect != *(int *)(banListOffset + (int)g_seedComboBans)); + } while (seedEffect != *(int *)(banListOffset + GHIDRA_INT(g_seedComboBans))); } } return; @@ -924,7 +924,7 @@ int Seeds::GetSeedEffect(std_string seedString) puStack_c = &LAB_00b0fbcd; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)(knownDigests + 0x13); + uVar1 = __security_cookie ^ GHIDRA_UINT((knownDigests + 0x13)); ExceptionList = &local_10; local_8 = 0; local_14 = uVar1; @@ -936,7 +936,7 @@ int Seeds::GetSeedEffect(std_string seedString) seedString._size = 9; seedBuf = &seedString; if (0xf < seedString._capacity) { - seedBuf = (std_string *)seedString._buf._0_4_; + seedBuf = (*(undefined4 *)((char *)&((std_string *)seedString._buf) + 0x0)); } seedBuf->_buf[9] = '\0'; } @@ -2495,11 +2495,11 @@ LAB_009eb510: LAB_009eb531: if (0xf < seedString._capacity) { uVar1 = seedString._capacity + 1; - ptr = (void *)seedString._buf._0_4_; + ptr = (*(undefined4 *)((char *)&((void *)seedString._buf) + 0x0)); if (0xfff < uVar1) { - ptr = *(void **)(seedString._buf._0_4_ + -4); + ptr = *(void **)((*(undefined4 *)((char *)&(seedString._buf) + 0x0)) + -4); uVar1 = seedString._capacity + 0x24; - if (0x1f < (seedString._buf._0_4_ - (int)ptr) - 4U) { + if (0x1f < ((*(undefined4 *)((char *)&(seedString._buf) + 0x0)) - GHIDRA_INT(ptr)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2531,7 +2531,7 @@ std_string * Seeds::Seed2String(std_string *outStr, uint seed) undefined4 digits4to7; undefined4 local_8; - local_8 = __security_cookie ^ (uint)(digits + 0xc); + local_8 = __security_cookie ^ GHIDRA_UINT((digits + 0xc)); checksum = 0; for (digitIdx = seed; digitIdx != 0; digitIdx = digitIdx >> 5) { cVar2 = checksum + (char)digitIdx; @@ -2550,11 +2550,11 @@ std_string * Seeds::Seed2String(std_string *outStr, uint seed) digits[2] = (byte)(digitIdx >> 0x11) & 0x1f; outStr->_size = 9; digits[3] = (byte)(digitIdx >> 0xc) & 0x1f; - digits4to7._0_2_ = CONCAT11((char)(digitIdx >> 2),(char)(digitIdx >> 7)) & 0x1f1f; - digits4to7._0_3_ = (uint3)(ushort)digits4to7; + (*(undefined2 *)((char *)&(digits4to7) + 0x0)) = CONCAT11((char)(digitIdx >> 2),(char)(digitIdx >> 7)) & 0x1f1f; + (*(undefined1 *)((char *)&(digits4to7) + 0x0)) = (uint3)(ushort)digits4to7; digits4to7 = CONCAT13(checksum,(uint3)digits4to7) & 0x1fffffff; - digits4to7 = CONCAT13(digits4to7._3_1_, - CONCAT12((char)((digitIdx << 8 | (uint)checksum) >> 5),(ushort)digits4to7)) & + digits4to7 = CONCAT13((*(undefined1 *)((char *)&(digits4to7) + 0x3)), + CONCAT12((char)((digitIdx << 8 | GHIDRA_UINT(checksum)) >> 5),(ushort)digits4to7)) & 0xff1fffff; memmove(outStr,"0000 0000",9); outStr->_buf[9] = '\0'; @@ -2593,7 +2593,7 @@ uint Seeds::String2Seed(std_string *str) byte digit7; undefined4 local_8; - local_8 = __security_cookie ^ (uint)(digits + 0xc); + local_8 = __security_cookie ^ GHIDRA_UINT((digits + 0xc)); if (str->_size == 9) { uVar4 = str->_capacity; chars = str; @@ -2627,9 +2627,9 @@ uint Seeds::String2Seed(std_string *str) uVar3 = uVar3 + 1; } while (uVar3 < 9); bVar2 = 0; - uVar3 = (((((((uint)digits[0] << 5 | (uint)digits[1]) << 5 | (uint)digits[2]) << 5 | - (uint)digits[3]) << 5 | (uint)digit4) << 5 | (uint)digit5) << 2 | - (uint)(digit6 >> 3)) ^ 0xfef7ffd; + uVar3 = ((((((GHIDRA_UINT(digits[0]) << 5 | GHIDRA_UINT(digits[1])) << 5 | GHIDRA_UINT(digits[2])) << 5 | + GHIDRA_UINT(digits[3])) << 5 | GHIDRA_UINT(digit4)) << 5 | GHIDRA_UINT(digit5)) << 2 | + GHIDRA_UINT((digit6 >> 3))) ^ 0xfef7ffd; for (uVar4 = uVar3; uVar4 != 0; uVar4 = uVar4 >> 5) { cVar1 = bVar2 + (char)uVar4; bVar2 = cVar1 * '\x02' - (cVar1 >> 7); @@ -2659,11 +2659,11 @@ void Seeds::SetStartSeed(std_string seed) set_start_seed(this,uVar1); if (0xf < seed._capacity) { uVar1 = seed._capacity + 1; - allocBlock = (void *)seed._buf._0_4_; + allocBlock = (*(undefined4 *)((char *)&((void *)seed._buf) + 0x0)); if (0xfff < uVar1) { - allocBlock = *(void **)(seed._buf._0_4_ + -4); + allocBlock = *(void **)((*(undefined4 *)((char *)&(seed._buf) + 0x0)) + -4); uVar1 = seed._capacity + 0x24; - if (0x1f < (seed._buf._0_4_ - (int)allocBlock) - 4U) { + if (0x1f < ((*(undefined4 *)((char *)&(seed._buf) + 0x0)) - GHIDRA_INT(allocBlock)) - 4U) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -2752,7 +2752,7 @@ void Seeds::ForgetStageSeed(int levelStage) uint stageIndex; uint stageIndex; - stageIndex = -(uint)(levelStage != 0) & levelStage; + stageIndex = -GHIDRA_UINT((levelStage != 0)) & levelStage; stageIndex = 0xd; if (stageIndex < 0xd) { stageIndex = stageIndex; diff --git a/src/game/sfx_manager.cpp b/src/game/sfx_manager.cpp index 4793753..0c1c1fe 100644 --- a/src/game/sfx_manager.cpp +++ b/src/game/sfx_manager.cpp @@ -95,11 +95,11 @@ int SFXManager::load_xml(byte *path, byte isMod) char *sampleTagEnd; puStack_20 = local_30 + 0x2c; - ehState._0_1_ = 0xff; - ehState._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(ehState) + 0x1)) = 0xffffff; puStack_18 = &LAB_00b0ab9e; savedExceptionList = ExceptionList; - uVar3 = __security_cookie ^ (uint)(local_30 + 0x20); + uVar3 = __security_cookie ^ GHIDRA_UINT((local_30 + 0x20)); ExceptionList = &savedExceptionList; self = this; local_24 = uVar3; @@ -120,17 +120,17 @@ int SFXManager::load_xml(byte *path, byte isMod) if (ppvVar2 != ppvStack_1041c) { ppvVar12 = ppvVar2 + 0x6d; do { - ehState._0_1_ = 0; - ehState._1_3_ = 0; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0; + (*(undefined1 *)((char *)&(ehState) + 0x1)) = 0; pvVar4 = *ppvVar12; if ((void *)0xf < pvVar4) { pvVar5 = ppvVar12[-5]; - uVar7 = (int)pvVar4 + 1; + uVar7 = GHIDRA_INT(pvVar4) + 1; ptr = pvVar5; if (0xfff < uVar7) { - ptr = *(void **)((int)pvVar5 - 4); - uVar7 = (int)pvVar4 + 0x24; - if (0x1f < (uint)((int)pvVar5 + (-4 - (int)ptr))) goto LAB_0092d2ca; + ptr = *(void **)(GHIDRA_INT(pvVar5) - 4); + uVar7 = GHIDRA_INT(pvVar4) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar5) + (-4 - GHIDRA_INT(ptr))))) goto LAB_0092d2ca; } operator_delete(ptr,uVar7); } @@ -138,19 +138,19 @@ int SFXManager::load_xml(byte *path, byte isMod) *ppvVar12 = (void *)0xf; *(undefined1 *)(ppvVar12 + -5) = 0; _eh_vector_destructor_iterator_(ppvVar12 + -0x6b,0x38,7,FUN_0092cf10); - ehState._0_1_ = 0xff; - ehState._1_3_ = 0xffffff; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 0xff; + (*(undefined1 *)((char *)&(ehState) + 0x1)) = 0xffffff; ppvVar1 = ppvVar12 + 1; ppvVar12 = ppvVar12 + 0x6e; } while (ppvVar1 != ppvStack_1041c); this = self; } - uVar7 = ((iVar8 - (int)ppvVar2) / 0x1b8) * 0x1b8; + uVar7 = ((iVar8 - GHIDRA_INT(ppvVar2)) / 0x1b8) * 0x1b8; ppvVar12 = ppvVar2; if (0xfff < uVar7) { ppvVar12 = ppvVar2[-1]; uVar7 = uVar7 + 0x23; - if (0x1f < (uint)((int)ppvVar2 + (-4 - (int)ppvVar12))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(ppvVar2) + (-4 - GHIDRA_INT(ppvVar12))))) { LAB_0092d2ca: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -164,7 +164,7 @@ LAB_0092d2ca: uVar7 = iVar8 / 0x1b8; if (uVar7 < 0x444) { if (uVar7 < 0x443) { - if ((uint)((self[2] - *self) / 0x1b8) < 0x443) { + if (GHIDRA_UINT(((self[2] - *self) / 0x1b8)) < 0x443) { std::vector::_Resize_reallocate(self[2] - *self,&ppvStack_1041c); } else { @@ -207,10 +207,10 @@ LAB_0092d2ca: bVar16 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar16 != 0); - uVar3 = (int)pbVar9 - (int)(pbVar14 + 1); + uVar3 = GHIDRA_INT(pbVar9) - GHIDRA_INT((pbVar14 + 1)); ((std::string *)((char *)root))->std::string::assign(pbVar14,uVar3); - ehState._0_1_ = 2; - soundNode = ((xml_node *)(pvVar4))->xml_node::first_node((byte *)"sound",(int)pbVar14,(byte)uVar3); + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; + soundNode = ((xml_node *)(pvVar4))->xml_node::first_node((byte *)"sound",GHIDRA_INT(pbVar14),(byte)uVar3); if (soundNode != (void *)0x0) { LAB_0092d470: uStack_1040c = 0xffffffff; @@ -221,7 +221,7 @@ LAB_0092d470: soundNameSize = 0; soundNameCapacity = 0xf; soundName[0] = (byte *****)0x0; - ehState._0_1_ = 3; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 3; for (attr = *(undefined4 **)((char *)soundNode + 0x20); attr != (undefined4 *)0x0; attr = (undefined4 *)attr[6]) { pbVar14 = (byte *)*attr; @@ -235,7 +235,7 @@ LAB_0092d470: isLess = bVar16 < *pbVar10; if (bVar16 != *pbVar10) { LAB_0092d511: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0092d516; } if (bVar16 == 0) break; @@ -265,7 +265,7 @@ LAB_0092d516: isLess = bVar16 < *pbVar10; if (bVar16 != *pbVar10) { LAB_0092d568: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0092d56d; } if (bVar16 == 0) break; @@ -287,7 +287,7 @@ LAB_0092d56d: bVar16 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar16 != 0); - ((std::string *)((char *)soundName))->std::string::assign(pbVar14,(int)pbVar9 - (int)(pbVar14 + 1)); + ((std::string *)((char *)soundName))->std::string::assign(pbVar14,GHIDRA_INT(pbVar9) - GHIDRA_INT((pbVar14 + 1))); } } if (attr[4] == 0) break; @@ -301,7 +301,7 @@ LAB_0092d56d: piVar13 = self; goto LAB_0092d6fa; } - ehState._0_1_ = 6; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 6; goto LAB_0092daa4; } soundId = (self[1] - *self) / 0x1b8; @@ -313,7 +313,7 @@ LAB_0092d56d: modEffectNameSize = 0; modEffectNameCapacity = 0xf; modEffectName = (void *)0x0; - ehState = CONCAT31(ehState._1_3_,4); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),4); pvVar4 = (void *)piVar13[1]; if (pvVar4 == (void *)piVar13[2]) { std::vector::_Emplace_reallocate(pvVar4,modEffect); @@ -322,22 +322,22 @@ LAB_0092d56d: SoundEffect::move_constructor(pvVar4,modEffect); piVar13[1] = piVar13[1] + 0x1b8; } - ehState._0_1_ = 5; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 5; if (0xf < modEffectNameCapacity) { uVar3 = modEffectNameCapacity + 1; pvVar4 = modEffectName; if (0xfff < uVar3) { pvVar4 = *(void **)((char *)modEffectName + -4); uVar3 = modEffectNameCapacity + 0x24; - if (0x1f < (uint)((int)modEffectName + (-4 - (int)pvVar4))) goto LAB_0092d2ca; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(modEffectName) + (-4 - GHIDRA_INT(pvVar4))))) goto LAB_0092d2ca; } operator_delete(pvVar4,uVar3); } modEffectNameSize = 0; modEffectNameCapacity = 0xf; - modEffectName = (void *)((uint)modEffectName & 0xffffff00); + modEffectName = (void *)(GHIDRA_UINT(modEffectName) & 0xffffff00); _eh_vector_destructor_iterator_(modSamples,0x38,7,FUN_0092cf10); - ehState._0_1_ = 3; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 3; LAB_0092d6fa: pbVar14 = abStack_10408; piStack_10418 = (int *)0x7; @@ -357,10 +357,10 @@ LAB_0092d6fa: } ((SoundInstance *)(pbVar9 + 0x20))->SoundInstance::operator_assign(ppvStack_1041c + 1); pbVar14 = pbVar14 + 0x38; - *pbVar11 = (abStack_10408 + (-8 - (int)pbVar10))[(int)pbVar11]; + *pbVar11 = (abStack_10408 + (-8 - GHIDRA_INT(pbVar10)))[GHIDRA_INT(pbVar11)]; *(undefined4 *)(pbVar9 + 0x3c) = - *(undefined4 *)(abStack_10408 + (-4 - (int)pbVar10) + (int)pbVar11); - piStack_10418 = (int *)((int)piStack_10418 + -1); + *(undefined4 *)(abStack_10408 + (-4 - GHIDRA_INT(pbVar10)) + GHIDRA_INT(pbVar11)); + piStack_10418 = (int *)(GHIDRA_INT(piStack_10418) + -1); pbVar9 = pbVar11; } while (piStack_10418 != (int *)0x0); *(undefined4 *)(pbVar10 + 400) = sampleCount; @@ -391,9 +391,9 @@ LAB_0092d6fa: pcVar15 = (char *)piStack_10418[2]; } if (pcVar15 == sampleTagEnd + -0xb7b167) { - pbVar9 = (byte *)(pcVar15 + (int)pbVar14); + pbVar9 = (byte *)(pcVar15 + GHIDRA_INT(pbVar14)); if (pbVar9 <= pbVar14) goto LAB_0092d890; - iVar8 = (int)"sample" - (int)pbVar14; + iVar8 = GHIDRA_INT("sample") - GHIDRA_INT(pbVar14); while (*pbVar14 == pbVar14[iVar8]) { pbVar14 = pbVar14 + 1; if (pbVar9 <= pbVar14) goto LAB_0092d890; @@ -403,14 +403,14 @@ LAB_0092d6fa: goto LAB_0092da86; } LAB_0092db29: - ehState = CONCAT31(ehState._1_3_,1); + ehState = CONCAT31((*(undefined1 *)((char *)&(ehState) + 0x1)),1); if (0xf < rootCapacity) { uVar3 = rootCapacity + 1; stringData = root[0]; if (0xfff < uVar3) { stringData = (byte *****)root[0][-1]; uVar3 = rootCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)root[0] + (-4 - (int)stringData))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(root[0]) + (-4 - GHIDRA_INT(stringData)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -423,19 +423,19 @@ LAB_0092db29: allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } uVar6 = 0; if (xmlText != (byte *)0x0) { uVar3 = *(uint *)(xmlText + -4); oldAllocatedBytes = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar3; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar3; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)oldAllocatedBytes < uVar3); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocatedBytes) < uVar3)); free(xmlText + -4); uVar6 = extraout_EAX; } - iVar8 = CONCAT31((int3)((uint)uVar6 >> 8),1); + iVar8 = CONCAT31((int3)(GHIDRA_UINT(uVar6) >> 8),1); } ExceptionList = savedExceptionList; return iVar8; @@ -462,7 +462,7 @@ LAB_0092d890: isLess = bVar16 < *pbVar11; if (bVar16 != *pbVar11) { LAB_0092d92d: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0092d932; } if (bVar16 == 0) break; @@ -484,7 +484,7 @@ LAB_0092d932: bVar16 = *pbVar9; pbVar9 = pbVar9 + 1; } while (bVar16 != 0); - valueLength = (std_string *)(pbVar9 + -(int)(pbVar14 + 1)); + valueLength = (std_string *)(pbVar9 + -GHIDRA_INT((pbVar14 + 1))); if ((std_string *)(0x7fffffff - rootSize) < valueLength) { /* WARNING: Subroutine does not return */ std::string::_Xlen(); @@ -493,17 +493,17 @@ LAB_0092d932: if (0xf < rootCapacity) { stringData = root[0]; } - ((std::string *)((char *)&samplePath))->std::string::concat((int)pbVar10,valueLength,(byte *)stringData,rootSize - ,pbVar14,(uint)valueLength); + ((std::string *)((char *)&samplePath))->std::string::concat(GHIDRA_INT(pbVar10),valueLength,(byte *)stringData,rootSize + ,pbVar14,GHIDRA_UINT(valueLength)); ppvVar2 = ppvStack_1041c; if (ppvStack_1041c == &samplePath) { if ((void *)0xf < samplePathCapacity) { - uVar3 = (int)samplePathCapacity + 1; + uVar3 = GHIDRA_INT(samplePathCapacity) + 1; pvVar4 = samplePath; if (0xfff < uVar3) { - pvVar4 = *(void **)((int)samplePath - 4); - uVar3 = (int)samplePathCapacity + 0x24; - if (0x1f < (uint)((int)samplePath + (-4 - (int)pvVar4))) goto LAB_0092d2ca; + pvVar4 = *(void **)(GHIDRA_INT(samplePath) - 4); + uVar3 = GHIDRA_INT(samplePathCapacity) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(samplePath) + (-4 - GHIDRA_INT(pvVar4))))) goto LAB_0092d2ca; } operator_delete(pvVar4,uVar3); } @@ -529,7 +529,7 @@ LAB_0092d932: isLess = bVar16 < (byte)*pcVar15; if (bVar16 != *pcVar15) { LAB_0092da23: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0092da28; } if (bVar16 == 0) break; @@ -558,7 +558,7 @@ LAB_0092da86: piVar13 = self; ((SoundEffect *)((SoundEffect *)(soundId * 0x1b8 + *self)))->SoundEffect::Load(); piVar13[3] = piVar13[3] + 1; - ehState._0_1_ = 7; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 7; LAB_0092daa4: if (0xf < soundNameCapacity) { uVar3 = soundNameCapacity + 1; @@ -566,15 +566,15 @@ LAB_0092daa4: if (0xfff < uVar3) { stringData = (byte *****)soundName[0][-1]; uVar3 = soundNameCapacity + 0x24; - if ((byte *)0x1f < (byte *)((int)soundName[0] + (-4 - (int)stringData))) goto LAB_0092d2ca; + if ((byte *)0x1f < (byte *)(GHIDRA_INT(soundName[0]) + (-4 - GHIDRA_INT(stringData)))) goto LAB_0092d2ca; } operator_delete(stringData,uVar3); } soundNameSize = 0; soundNameCapacity = 0xf; - soundName[0] = (byte *****)((uint)soundName[0] & 0xffffff00); + soundName[0] = (byte *****)(GHIDRA_UINT(soundName[0]) & 0xffffff00); _eh_vector_destructor_iterator_(abStack_10408,0x38,7,FUN_0092cf10); - ehState._0_1_ = 2; + (*(undefined1 *)((char *)&(ehState) + 0x0)) = 2; soundNode = *(void **)((char *)soundNode + 0x2c); if (soundNode == (void *)0x0) goto LAB_0092db29; goto LAB_0092d470; @@ -700,7 +700,7 @@ void SFXManager::adjust_pan(int soundId, float pan) } cVar1 = (**(code **)(*(int *)*piVar3 + 0x38))(); if ((cVar1 != '\0') || (*(char *)((char *)piVar3 + 9) != '\0')) { - piVar3[4] = (int)pan; + piVar3[4] = GHIDRA_INT(pan); if ((int *)*piVar3 != (int *)0x0) { channelCount = (**(code **)(*(int *)*piVar3 + 0x60))(); if ((channelCount < 2) || (pan == 0.0)) { @@ -821,7 +821,7 @@ void SFXManager::StopLoopingSounds() } soundOffset = soundOffset + 0x1b8; soundIndex = soundIndex + 1; - } while (soundIndex < (uint)((*(int *)((char *)this + 4) - sounds) / 0x1b8)); + } while (soundIndex < GHIDRA_UINT(((*(int *)((char *)this + 4) - sounds) / 0x1b8))); } return; } diff --git a/src/game/shader.cpp b/src/game/shader.cpp index 2707f4a..38b34db 100644 --- a/src/game/shader.cpp +++ b/src/game/shader.cpp @@ -20,7 +20,7 @@ byte Shader::load(byte *name, void *attributes, void *params) puStack_c = &LAB_00af0cf0; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar3 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; if (*(void **)((char *)this + 8) != (void *)0x0) { local_8 = 0; @@ -37,13 +37,13 @@ byte Shader::load(byte *name, void *attributes, void *params) ch = *nameCursor; nameCursor = nameCursor + 1; } while (ch != 0); - pcVar4 = operator_new_tracked((uint)(nameCursor + (1 - (int)(name + 1)))); + pcVar4 = operator_new_tracked(GHIDRA_UINT((nameCursor + (1 - GHIDRA_INT((name + 1)))))); nameCursor = name; do { ch = *nameCursor; nameCursor = nameCursor + 1; } while (ch != 0); - strncpy(pcVar4,(char *)name,(size_t)(nameCursor + (1 - (int)(name + 1)))); + strncpy(pcVar4,(char *)name,(size_t)(nameCursor + (1 - GHIDRA_INT((name + 1))))); } attribCount = 0; *(char **)((char *)this + 8) = pcVar4; @@ -56,14 +56,14 @@ byte Shader::load(byte *name, void *attributes, void *params) } attribCopies = tracked_alloc(0,(void *)0x0, (ulonglong) - (-(uint)((int)((ulonglong)attribCount * 8 >> 0x20) != 0) | - (uint)((ulonglong)attribCount * 8))); + (-GHIDRA_UINT((GHIDRA_INT(((ulonglong)attribCount * 8 >> 0x20)) != 0)) | + GHIDRA_UINT(((ulonglong)attribCount * 8)))); *(void **)((char *)this + 0xc) = attribCopies; attribIndex = 0; if (*(int *)((char *)this + 0x10) != 0) { do { iVar1 = attribIndex * 8; - pcVar4 = *(char **)(iVar1 + (int)attributes); + pcVar4 = *(char **)(iVar1 + GHIDRA_INT(attributes)); if (pcVar4 == (char *)0x0) { attribNameCopy = (char *)0x0; } @@ -73,17 +73,17 @@ byte Shader::load(byte *name, void *attributes, void *params) cVar2 = *attribNameCursor; attribNameCursor = attribNameCursor + 1; } while (cVar2 != '\0'); - attribNameCopy = operator_new_tracked((uint)(attribNameCursor + (1 - (int)(pcVar4 + 1)))); + attribNameCopy = operator_new_tracked(GHIDRA_UINT((attribNameCursor + (1 - GHIDRA_INT((pcVar4 + 1)))))); attribNameCursor = pcVar4; do { cVar2 = *attribNameCursor; attribNameCursor = attribNameCursor + 1; } while (cVar2 != '\0'); - strncpy(attribNameCopy,pcVar4,(size_t)(attribNameCursor + (1 - (int)(pcVar4 + 1)))); + strncpy(attribNameCopy,pcVar4,(size_t)(attribNameCursor + (1 - GHIDRA_INT((pcVar4 + 1))))); } *(char **)(iVar1 + *(int *)((char *)this + 0xc)) = attribNameCopy; *(undefined4 *)(iVar1 + 4 + *(int *)((char *)this + 0xc)) = - *(undefined4 *)(iVar1 + 4 + (int)attributes); + *(undefined4 *)(iVar1 + 4 + GHIDRA_INT(attributes)); attribIndex = attribIndex + 1; } while (attribIndex < *(uint *)((char *)this + 0x10)); } @@ -128,13 +128,13 @@ void Shader::set_uniform(byte *name, int type, void *data, int unused) byte ch; char *errorMessage; - puStack_20 = (undefined1 *)((int)register0x00000010 + -4); + puStack_20 = (undefined1 *)(GHIDRA_INT(register0x00000010) + -4); local_14 = (undefined4 *)0xffffffff; puStack_18 = &LAB_00b10dbd; local_1c = ExceptionList; ExceptionList = &local_1c; local_24 = this; - local_28 = find_uniform(this,name,(int)this); + local_28 = find_uniform(this,name,GHIDRA_INT(this)); if (local_28 == (undefined4 *)0x0) { local_48 = 0; uStack_44 = 0; @@ -145,12 +145,12 @@ void Shader::set_uniform(byte *name, int type, void *data, int unused) std::vector<24byte>::push_back(&local_48); local_14 = (undefined4 *)0xffffffff; if (puStack_3c != (undefined4 *)0x0) { - byteSize = local_38._4_4_ - (int)puStack_3c & 0xfffffffc; + byteSize = (*(undefined4 *)((char *)&(local_38) + 0x4)) - GHIDRA_INT(puStack_3c) & 0xfffffffc; puVar5 = puStack_3c; if (0xfff < byteSize) { puVar5 = (undefined4 *)puStack_3c[-1]; byteSize = byteSize + 0x23; - if (0x1f < (uint)((int)puStack_3c + (-4 - (int)puVar5))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(puStack_3c) + (-4 - GHIDRA_INT(puVar5))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -172,14 +172,14 @@ void Shader::set_uniform(byte *name, int type, void *data, int unused) ch = *nameCursor; nameCursor = nameCursor + 1; } while (ch != 0); - local_30 = operator_new_tracked((uint)(nameCursor + (1 - (int)(name + 1)))); + local_30 = operator_new_tracked(GHIDRA_UINT((nameCursor + (1 - GHIDRA_INT((name + 1)))))); local_2c = name + 1; nameCursor = name; do { ch = *nameCursor; nameCursor = nameCursor + 1; } while (ch != 0); - strncpy(local_30,(char *)name,(size_t)(nameCursor + (1 - (int)local_2c))); + strncpy(local_30,(char *)name,(size_t)(nameCursor + (1 - GHIDRA_INT(local_2c)))); *puVar5 = local_30; *(undefined4 *)(iVar2 + -0x14) = 1; *(int *)(iVar2 + -0x10) = type; @@ -241,7 +241,7 @@ LAB_00a14da7: KAGE_LogMessage(0x10,(byte *)errorMessage); byteSize = 0; } - iVar2 = (int)(local_28[4] - local_28[3]) >> 2; + iVar2 = GHIDRA_INT((local_28[4] - local_28[3])) >> 2; if (iVar2 != 0) { piVar3 = *(int **)(local_28[3] + -4 + iVar2 * 4); newValueCursor = data; @@ -306,13 +306,13 @@ LAB_00a14ded: std::vector::_Emplace_reallocate(piVar3,&local_30); } else { - *piVar3 = (int)local_30; + *piVar3 = GHIDRA_INT(local_30); *(int *)((char *)this + 0x44) = *(int *)((char *)this + 0x44) + 4; } iVar2 = *(int *)((char *)local_24 + 0x34); - local_28 = (undefined4 *)((int)local_28 + 1); + local_28 = (undefined4 *)(GHIDRA_INT(local_28) + 1); local_2c = local_2c + 0x18; - } while (local_28 < (uint)((*(int *)((char *)local_24 + 0x38) - iVar2) / 0x18)); + } while (local_28 < GHIDRA_UINT(((*(int *)((char *)local_24 + 0x38) - iVar2) / 0x18))); } ExceptionList = local_1c; return; @@ -333,7 +333,7 @@ void * Shader::find_uniform(byte *name, int unused) undefined4 *uniforms; uniforms = *(undefined4 **)((char *)this + 0x34); - iVar2 = *(int *)((char *)this + 0x38) - (int)uniforms; + iVar2 = *(int *)((char *)this + 0x38) - GHIDRA_INT(uniforms); iVar1 = iVar2 >> 0x1f; iVar2 = iVar2 / 0x18 + iVar1; i = 0; @@ -347,7 +347,7 @@ void * Shader::find_uniform(byte *name, int unused) isLess = ch < *uniformName; if (ch != *uniformName) { LAB_00a15090: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_00a15095; } if (ch == 0) break; @@ -364,7 +364,7 @@ LAB_00a15095: } i = i + 1; puVar3 = puVar3 + 6; - } while (i < (uint)(iVar2 - iVar1)); + } while (i < GHIDRA_UINT((iVar2 - iVar1))); } return (void *)0x0; } diff --git a/src/game/shape.cpp b/src/game/shape.cpp index f099553..18a3bf7 100644 --- a/src/game/shape.cpp +++ b/src/game/shape.cpp @@ -21,7 +21,7 @@ Shape::Shape(void *other) local_8 = 0xffffffff; puStack_c = &LAB_00af1ee6; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; *(undefined4 *)nameDst = *(undefined4 *)other; *(undefined4 *)((char *)nameDst + 4) = *(undefined4 *)((char *)other + 4); @@ -30,8 +30,8 @@ Shape::Shape(void *other) *(undefined4 *)((char *)nameDst + 0x10) = 0; pvVar3 = *(void **)((char *)other + 8); if (pvVar3 != *(void **)((char *)other + 0xc)) { - indexBytes = (int)*(void **)((char *)other + 0xc) - (int)pvVar3; - allocBytes = (int)indexBytes >> 1; + indexBytes = GHIDRA_INT(*(void **)((char *)other + 0xc)) - GHIDRA_INT(pvVar3); + allocBytes = GHIDRA_INT(indexBytes) >> 1; if (0x7fffffff < allocBytes) { /* WARNING: Subroutine does not return */ FUN_0040cee0(uVar1); @@ -40,13 +40,13 @@ Shape::Shape(void *other) pvVar2 = std::_Allocate(allocBytes); *(void **)((char *)nameDst + 8) = pvVar2; *(void **)((char *)nameDst + 0xc) = pvVar2; - *(void **)((char *)nameDst + 0x10) = (void *)((int)pvVar2 + allocBytes); + *(void **)((char *)nameDst + 0x10) = (void *)(GHIDRA_INT(pvVar2) + allocBytes); pvVar2 = *(void **)((char *)nameDst + 8); memmove(pvVar2,pvVar3,indexBytes); - *(void **)((char *)nameDst + 0xc) = (void *)(allocBytes + (int)pvVar2); + *(void **)((char *)nameDst + 0xc) = (void *)(allocBytes + GHIDRA_INT(pvVar2)); } - local_8._0_1_ = 0; - local_8._1_3_ = 0; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0; + (*(undefined1 *)((char *)&(local_8) + 0x1)) = 0; *(undefined4 *)((char *)nameDst + 0x14) = 0; *(undefined4 *)((char *)nameDst + 0x18) = 0; *(undefined4 *)((char *)nameDst + 0x1c) = 0; @@ -57,21 +57,21 @@ Shape::Shape(void *other) pvVar3 = std::_Allocate(allocBytes); *(void **)((char *)nameDst + 0x14) = pvVar3; *(void **)((char *)nameDst + 0x18) = pvVar3; - *(void **)((char *)nameDst + 0x1c) = (void *)((int)pvVar3 + allocBytes); + *(void **)((char *)nameDst + 0x1c) = (void *)(GHIDRA_INT(pvVar3) + allocBytes); pointsEnd = FUN_0042f800(*(undefined4 *)((char *)nameDst + 0x14),extraout_ECX); *(undefined4 *)((char *)nameDst + 0x18) = pointsEnd; } - local_8._0_1_ = 1; - FUN_0042f1a0((int)other + 0x20); - namesBegin = (undefined4 *)((int)nameDst + 0x2c); - local_8._0_1_ = 2; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; + FUN_0042f1a0(GHIDRA_INT(other) + 0x20); + namesBegin = (undefined4 *)(GHIDRA_INT(nameDst) + 0x2c); + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 2; *namesBegin = 0; *(undefined4 *)((char *)nameDst + 0x30) = 0; *(undefined4 *)((char *)nameDst + 0x34) = 0; pvVar3 = *(void **)((char *)other + 0x2c); pvVar2 = *(void **)((char *)other + 0x30); if (pvVar3 != pvVar2) { - allocBytes = ((int)pvVar2 - (int)pvVar3) / 0x18; + allocBytes = (GHIDRA_INT(pvVar2) - GHIDRA_INT(pvVar3)) / 0x18; if (0xaaaaaaa < allocBytes) { LAB_0042fa29: /* WARNING: Subroutine does not return */ @@ -81,13 +81,13 @@ LAB_0042fa29: namesAlloc = std::_Allocate(allocBytes); *namesBegin = namesAlloc; *(void **)((char *)nameDst + 0x30) = namesAlloc; - *(void **)((char *)nameDst + 0x34) = (void *)((int)namesAlloc + allocBytes); + *(void **)((char *)nameDst + 0x34) = (void *)(GHIDRA_INT(namesAlloc) + allocBytes); nameDst = (char *)*namesBegin; - local_8 = CONCAT31(local_8._1_3_,4); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),4); do { ((std::string *)(nameDst))->std::string::string(pvVar3); nameDst = nameDst + 0x18; - pvVar3 = (void *)((int)pvVar3 + 0x18); + pvVar3 = (void *)(GHIDRA_INT(pvVar3) + 0x18); } while (pvVar3 != pvVar2); *(char **)((char *)nameDst + 0x30) = nameDst; } diff --git a/src/game/shared_ptr.cpp b/src/game/shared_ptr.cpp index c928b87..8fe5815 100644 --- a/src/game/shared_ptr.cpp +++ b/src/game/shared_ptr.cpp @@ -43,7 +43,7 @@ void shared_ptr::operator_assign(void *other) local_8 = 0xffffffff; puStack_c = &LAB_00af0cf0; local_10 = ExceptionList; - swapWord = __security_cookie ^ (uint)(tmp + 0x18); + swapWord = __security_cookie ^ GHIDRA_UINT((tmp + 0x18)); ExceptionList = &local_10; assign(tmp,other); swapWord = extraout_EAX[1]; diff --git a/src/game/shared_ptr_pair.cpp b/src/game/shared_ptr_pair.cpp index 65ac395..9f6d491 100644 --- a/src/game/shared_ptr_pair.cpp +++ b/src/game/shared_ptr_pair.cpp @@ -14,7 +14,7 @@ void SharedPtrPair::constructor() ExceptionList = &local_10; ((KAGE::SmartPointer *)(in_ECX))->KAGE::SmartPointer::SmartPointer((void *)0x0); local_8 = 0; - ((KAGE::SmartPointer *)((void *)((int)in_ECX + 8)))->KAGE::SmartPointer::SmartPointer((void *)0x0); + ((KAGE::SmartPointer *)((void *)(GHIDRA_INT(in_ECX) + 8)))->KAGE::SmartPointer::SmartPointer((void *)0x0); *(undefined4 *)((char *)in_ECX + 0x10) = 0; *(undefined4 *)((char *)in_ECX + 0x14) = 0; *(undefined4 *)((char *)in_ECX + 0x18) = 0; @@ -38,15 +38,15 @@ SharedPtrPair::~SharedPtrPair() local_8 = 0xffffffff; puStack_c = &LAB_00af0b40; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; this->KAGE::SmartPointer::reset((void *)0x0); - ((KAGE::SmartPointer *)((void *)((int)this + 8)))->KAGE::SmartPointer::reset((void *)0x0); + ((KAGE::SmartPointer *)((void *)(GHIDRA_INT(this) + 8)))->KAGE::SmartPointer::reset((void *)0x0); local_8 = 0; if (*(int **)((char *)this + 0xc) != (int *)0x0) { isLastRef = (**(code **)(**(int **)((char *)this + 0xc) + 0xc))(uVar1); if ((isLastRef != '\0') && (g_imageReleaseFn != (void *)0x0)) { - (*g_imageReleaseFn)((void *)((int)this + 8)); + (*g_imageReleaseFn)((void *)(GHIDRA_INT(this) + 8)); } } local_8 = 1; diff --git a/src/game/sound_effect.cpp b/src/game/sound_effect.cpp index 9d0bbcd..f60aef7 100644 --- a/src/game/sound_effect.cpp +++ b/src/game/sound_effect.cpp @@ -28,7 +28,7 @@ void SoundEffect::Load() local_8 = (std_string *)0xffffffff; puStack_c = &LAB_00b0ab45; local_10 = ExceptionList; - isExtensionMatch = __security_cookie ^ (uint)(redirectedPath + 10); + isExtensionMatch = __security_cookie ^ GHIDRA_UINT((redirectedPath + 10)); ExceptionList = &local_10; sampleIndex = (SoundEffect)0x0; if (this[100] != (SoundEffect)0x0) { @@ -64,9 +64,9 @@ void SoundEffect::Load() psVar2 = pathBuffer; } (**(code **)(PTR_vftable_00c5aaa0 + 0x24))(loadedSound,psVar2,0,0); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; ((SoundInstance *)(sample))->SoundInstance::assign(loadedSound); - local_8 = (std_string *)CONCAT31(local_8._1_3_,2); + local_8 = (std_string *)CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); if (loadedRefCount != (int *)0x0) { isLastRef = (**(code **)(*loadedRefCount + 0xc))(); if ((isLastRef != '\0') && (g_soundReleaseFn != (void *)0x0)) { @@ -85,7 +85,7 @@ void SoundEffect::Load() if (0xfff < uVar3) { psVar2 = (std_string *)pathBuffer[-1]._capacity; uVar3 = capacity + 0x24; - if (0x1f < (uint)((int)pathBuffer + (-4 - (int)psVar2))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pathBuffer) + (-4 - GHIDRA_INT(psVar2))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -93,9 +93,9 @@ void SoundEffect::Load() operator_delete(psVar2,uVar3); } sample = sample + 0xe; - sampleIndex = (SoundEffect)((int)sampleIndex + 1); + sampleIndex = (SoundEffect)(GHIDRA_INT(sampleIndex) + 1); this = local_34; - } while ((uint)sampleIndex < (uint)local_34[100]); + } while (GHIDRA_UINT(sampleIndex) < GHIDRA_UINT(local_34[100])); } *(undefined1 *)(this + 0x66) = 1; ExceptionList = local_10; @@ -112,7 +112,7 @@ void SoundEffect::move_constructor(void *dst, void *src) *(undefined4 *)dst = *(undefined4 *)src; *(undefined4 *)((char *)dst + 4) = *(undefined4 *)((char *)src + 4); _eh_vector_copy_constructor_iterator_ - ((void *)((int)dst + 8),(void *)((int)src + 8),0x38,7,FUN_0092eb00,FUN_0092cf10); + ((void *)(GHIDRA_INT(dst) + 8),(void *)(GHIDRA_INT(src) + 8),0x38,7,FUN_0092eb00,FUN_0092cf10); *(undefined4 *)((char *)dst + 400) = *(undefined4 *)((char *)src + 400); *(undefined4 *)((char *)dst + 0x194) = *(undefined4 *)((char *)src + 0x194); *(undefined1 *)((char *)dst + 0x198) = *(undefined1 *)((char *)src + 0x198); diff --git a/src/game/sound_effects.cpp b/src/game/sound_effects.cpp index 65bb1cf..c2a1df0 100644 --- a/src/game/sound_effects.cpp +++ b/src/game/sound_effects.cpp @@ -21,7 +21,7 @@ void SoundEffects::Play(int ID, float Volume, int FrameDelay, byte Loop, float P local_10 = ExceptionList; ExceptionList = &local_10; if ((*(int *)(*(int *)ThreadLocalStoragePointer + 0xc) < DAT_00c94050) && - (_Init_thread_header(&DAT_00c94050,__security_cookie ^ (uint)(newInstance + 0x14)), + (_Init_thread_header(&DAT_00c94050,__security_cookie ^ GHIDRA_UINT((newInstance + 0x14))), DAT_00c94050 == -1)) { _DAT_00c5d2a4 = 0x1b00000005; DAT_00c5d2ac = 8; @@ -29,8 +29,8 @@ void SoundEffects::Play(int ID, float Volume, int FrameDelay, byte Loop, float P local_8 = 0xffffffff; _Init_thread_footer(&DAT_00c94050); } - if ((-1 < ID) && (ID < ((int)(this->_sounds)._end - (int)(this->_sounds)._begin) / 0x1b8)) { - sound = (SoundEffect *)(ID * 0x1b8 + (int)(this->_sounds)._begin); + if ((-1 < ID) && (ID < (GHIDRA_INT((this->_sounds)._end) - GHIDRA_INT((this->_sounds)._begin)) / 0x1b8)) { + sound = (SoundEffect *)(ID * 0x1b8 + GHIDRA_INT((this->_sounds)._begin)); if (sound[100] == (SoundEffect)0x0) { KAGE_LogMessage(1,(byte *)"[warn] Sound %d has no samples.\n"); ExceptionList = local_10; @@ -42,11 +42,11 @@ void SoundEffects::Play(int ID, float Volume, int FrameDelay, byte Loop, float P *(int *)&(*(undefined1 *)((char *)(this) + 0xc)) = *(int *)&(*(undefined1 *)((char *)(this) + 0xc)) + 1; } SVar3 = (SoundEffect)(g_manager->_framecount >> 1); - if (((int)sound[1] <= (int)SVar3) || ((int)sound[1] < 0)) { + if ((GHIDRA_INT(sound[1]) <= GHIDRA_INT(SVar3)) || (GHIDRA_INT(sound[1]) < 0)) { sampleCount = sound[100]; sound[0x65] = (SoundEffect)Volume; *sound = SVar3; - sound[1] = (SoundEffect)(FrameDelay + (int)SVar3); + sound[1] = (SoundEffect)(FrameDelay + GHIDRA_INT(SVar3)); if ((DAT_00c5d2a0 == 0) && (KAGE_LogMessage(0x10,(byte *)"RNG Seed is zero!\n"), DAT_00c5d2a0 == 0)) { trap = (code *)swi(3); @@ -58,7 +58,7 @@ void SoundEffects::Play(int ID, float Volume, int FrameDelay, byte Loop, float P DAT_00c5d2a0 = uVar2 >> ((byte)DAT_00c5d2ac & 0x1f) ^ uVar2; uVar2 = 0; if (sampleCount != (SoundEffect)0x0) { - uVar2 = DAT_00c5d2a0 % (uint)sampleCount; + uVar2 = DAT_00c5d2a0 % GHIDRA_UINT(sampleCount); } if (*(char *)(sound + uVar2 * 0xe + 0xe) != '\0') { if ((sound[uVar2 * 0xe + 8] != (SoundEffect)0x0) && @@ -66,7 +66,7 @@ void SoundEffects::Play(int ID, float Volume, int FrameDelay, byte Loop, float P FUN_00a2abd0(); } SVar3 = (SoundEffect)(sound + uVar2 * 0xe + 2); - if (0xf < (uint)sound[uVar2 * 0xe + 7]) { + if (0xf < GHIDRA_UINT(sound[uVar2 * 0xe + 7])) { SVar3 = sound[uVar2 * 0xe + 2]; } (**(code **)(PTR_vftable_00c5aaa0 + 0x24))(newInstance,SVar3,1,0); @@ -120,32 +120,32 @@ void SoundEffects::ClearVolumeModifier() soundIndex = 0; sounds = (this->_sounds)._begin; - iVar1 = (int)(this->_sounds)._end - (int)sounds; + iVar1 = GHIDRA_INT((this->_sounds)._end) - GHIDRA_INT(sounds); iVar2 = iVar1 >> 0x1f; if (iVar1 / 0x1b8 + iVar2 != iVar2) { iVar2 = 0; do { voiceIndex = 0; - if (*(int *)(iVar2 + 400 + (int)sounds) != 0) { + if (*(int *)(iVar2 + 400 + GHIDRA_INT(sounds)) != 0) { iVar1 = iVar2; do { - if ((*(char *)(iVar2 + 0x198 + (int)sounds) != '\0') && - (source = *(int **)(iVar1 + 0x20 + (int)sounds), source != (int *)0x0)) { - if ((*(char *)(iVar1 + 0x29 + (int)sounds) != '\0') && + if ((*(char *)(iVar2 + 0x198 + GHIDRA_INT(sounds)) != '\0') && + (source = *(int **)(iVar1 + 0x20 + GHIDRA_INT(sounds)), source != (int *)0x0)) { + if ((*(char *)(iVar1 + 0x29 + GHIDRA_INT(sounds)) != '\0') && (isPlaying = (**(code **)(*source + 0x38))(), isPlaying != '\0')) { - *(undefined1 *)(iVar1 + 0x29 + (int)sounds) = 0; + *(undefined1 *)(iVar1 + 0x29 + GHIDRA_INT(sounds)) = 0; } - isPlaying = (**(code **)(**(int **)(iVar1 + 0x20 + (int)sounds) + 0x38))(); - if ((isPlaying != '\0') || (*(char *)(iVar1 + 0x29 + (int)sounds) != '\0')) { + isPlaying = (**(code **)(**(int **)(iVar1 + 0x20 + GHIDRA_INT(sounds)) + 0x38))(); + if ((isPlaying != '\0') || (*(char *)(iVar1 + 0x29 + GHIDRA_INT(sounds)) != '\0')) { volume = this->_volumeModifier; sounds = (this->_sounds)._begin; if (volume <= 0.0) { volume = 0.0; } - volume = volume * *(float *)(iVar2 + 0x194 + (int)sounds) * + volume = volume * *(float *)(iVar2 + 0x194 + GHIDRA_INT(sounds)) * (g_manager->_optionsConfig)._sfxVolume; - *(float *)(iVar1 + 0x2c + (int)sounds) = volume; - source = *(int **)(iVar1 + 0x20 + (int)sounds); + *(float *)(iVar1 + 0x2c + GHIDRA_INT(sounds)) = volume; + source = *(int **)(iVar1 + 0x20 + GHIDRA_INT(sounds)); if (source != (int *)0x0) { (**(code **)(*source + 0x48))(volume); } @@ -154,11 +154,11 @@ void SoundEffects::ClearVolumeModifier() iVar1 = iVar1 + 0x38; voiceIndex = voiceIndex + 1; sounds = (this->_sounds)._begin; - } while (voiceIndex < *(uint *)(iVar2 + 400 + (int)sounds)); + } while (voiceIndex < *(uint *)(iVar2 + 400 + GHIDRA_INT(sounds))); } soundIndex = soundIndex + 1; iVar2 = iVar2 + 0x1b8; - } while (soundIndex < (uint)(((int)(this->_sounds)._end - (int)sounds) / 0x1b8)); + } while (soundIndex < GHIDRA_UINT(((GHIDRA_INT((this->_sounds)._end) - GHIDRA_INT(sounds)) / 0x1b8))); } return; } diff --git a/src/game/sound_instance.cpp b/src/game/sound_instance.cpp index 1c848b2..f258c69 100644 --- a/src/game/sound_instance.cpp +++ b/src/game/sound_instance.cpp @@ -12,13 +12,13 @@ SoundInstance::SoundInstance() puStack_c = &LAB_00b1203c; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; *(undefined4 *)this = 0; *(undefined4 *)((char *)this + 4) = 0; local_8 = 0; refCount = operator_new(0x18); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; if (refCount == (ReferenceCountBase *)0x0) { refCount = (ReferenceCountBase *)0x0; } @@ -27,7 +27,7 @@ SoundInstance::SoundInstance() *(undefined ***)refCount = ReferenceCount::vftable; *(undefined4 *)(refCount + 0x14) = 0; } - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; if (*(int **)((char *)this + 4) != (int *)0x0) { cVar1 = (**(code **)(**(int **)((char *)this + 4) + 0xc))(uVar2); if ((cVar1 != '\0') && (g_soundReleaseFn != (void *)0x0)) { @@ -67,7 +67,7 @@ void SoundInstance::operator_assign(void *other) local_8 = 0xffffffff; puStack_c = &LAB_00b1206d; local_10 = ExceptionList; - loopFlags = __security_cookie ^ (uint)(sourceCopy + 0x20); + loopFlags = __security_cookie ^ GHIDRA_UINT((sourceCopy + 0x20)); ExceptionList = &local_10; FUN_008f2d20(other); local_8 = 0; @@ -88,7 +88,7 @@ void SoundInstance::operator_assign(void *other) uVar2 = *swappedSource; *swappedSource = *(undefined4 *)this; *(undefined4 *)this = uVar2; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); if (oldSourceRefCount != (int *)0x0) { isLastRef = (**(code **)(*oldSourceRefCount + 0xc))(loopFlags); if ((isLastRef != '\0') && (g_soundReleaseFn != (void *)0x0)) { diff --git a/src/game/sound_manager.cpp b/src/game/sound_manager.cpp index 75b2169..f83e06c 100644 --- a/src/game/sound_manager.cpp +++ b/src/game/sound_manager.cpp @@ -29,7 +29,7 @@ void * SoundManager::load_sound(void *outSound, byte *path, void *fileSource, by local_8 = 0xffffffff; puStack_c = &LAB_00b12184; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (uint)(local_28 + 0x24); + uVar3 = __security_cookie ^ GHIDRA_UINT((local_28 + 0x24)); ExceptionList = &local_10; local_14 = 0; local_18 = this; @@ -101,7 +101,7 @@ void * SoundManager::load_sound(void *outSound, byte *path, void *fileSource, by } if (pvVar1 == (void *)0x0) { newSource = operator_new(0x4c); - local_8._0_1_ = 0xb; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xb; if (newSource == (undefined4 *)0x0) goto LAB_00a2b5b3; FUN_00a9fa20(); newSource[0x11] = 0; @@ -111,7 +111,7 @@ void * SoundManager::load_sound(void *outSound, byte *path, void *fileSource, by else { if (pvVar1 != (void *)0x1) goto LAB_00a2b5c2; newSource = operator_new(0x20740); - local_8._0_1_ = 0xc; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xc; if (newSource == (undefined4 *)0x0) goto LAB_00a2b5b3; FUN_00aa0110(); *newSource = KAGE::Sound::StreamSourceOrg::vftable; @@ -124,7 +124,7 @@ void * SoundManager::load_sound(void *outSound, byte *path, void *fileSource, by } else if (pvVar1 == (void *)0x0) { newSource = operator_new(0x58); - local_8._0_1_ = 6; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 6; if (newSource == (undefined4 *)0x0) goto LAB_00a2b5b3; FUN_00a9fa20(); newSource[0x11] = 0; @@ -134,7 +134,7 @@ void * SoundManager::load_sound(void *outSound, byte *path, void *fileSource, by else { if (pvVar1 != (void *)0x1) goto LAB_00a2b5c2; newSource = operator_new(0xc4); - local_8._0_1_ = 7; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 7; if (newSource == (undefined4 *)0x0) goto LAB_00a2b5b3; FUN_00aa0110(); *newSource = KAGE::Sound::StreamSourceOgg::vftable; @@ -146,7 +146,7 @@ void * SoundManager::load_sound(void *outSound, byte *path, void *fileSource, by newSource[0x2f] = 0; newSource[0x30] = 0xf; *(undefined1 *)(newSource + 0x2b) = 0; - local_8._0_1_ = 10; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 10; mutexInitFn = *(code **)(newSource[0x28] + 4); if (mutexInitFn == FUN_00a15770) { FUN_00a15770(); @@ -160,7 +160,7 @@ void * SoundManager::load_sound(void *outSound, byte *path, void *fileSource, by } else if (pvVar1 == (void *)0x0) { newSource = operator_new(100); - local_8._0_1_ = 4; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 4; if (newSource == (undefined4 *)0x0) { LAB_00a2b5b3: newSource = (undefined4 *)0x0; @@ -177,12 +177,12 @@ LAB_00a2b5b3: else { if (pvVar1 != (void *)0x1) goto LAB_00a2b5c2; newSource = operator_new(0xa8); - local_8._0_1_ = 5; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 5; if (newSource == (undefined4 *)0x0) goto LAB_00a2b5b3; FUN_00aa0110(); *newSource = KAGE::Sound::StreamSourceWav::vftable; } - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); KAGE::SmartPointer::reset(newSource); LAB_00a2b5c2: if ((((isStream == 0) || (fileSource == (void *)0x0)) || @@ -193,7 +193,7 @@ LAB_00a2b5c2: KAGE_LogMessage(1,(byte *)"Failed to open %s \"%s\"\n"); } else { - sourcePtr[1] = (int)pvVar1; + sourcePtr[1] = GHIDRA_INT(pvVar1); if (path == (byte *)0x0) { pcVar4 = (char *)0x0; } @@ -203,30 +203,30 @@ LAB_00a2b5c2: pathChar = *pathEnd; pathEnd = pathEnd + 1; } while (pathChar != 0); - pcVar4 = operator_new_tracked((uint)(pathEnd + (1 - (int)(path + 1)))); + pcVar4 = operator_new_tracked(GHIDRA_UINT((pathEnd + (1 - GHIDRA_INT((path + 1)))))); pathEnd = path; do { pathChar = *pathEnd; pathEnd = pathEnd + 1; } while (pathChar != 0); - strncpy(pcVar4,(char *)path,(size_t)(pathEnd + (1 - (int)(path + 1)))); + strncpy(pcVar4,(char *)path,(size_t)(pathEnd + (1 - GHIDRA_INT((path + 1))))); } soundSource = sourcePtr; - sourcePtr[3] = (int)pcVar4; + sourcePtr[3] = GHIDRA_INT(pcVar4); uVar3 = KAGE_Filesys_FileManager::GetPrimaryFilePathHash((byte *)sourcePtr[3]); pvVar1 = local_18; soundSource[4] = uVar3; (**(code **)(*(int *)((char *)local_18 + 0x10) + 0xc))(0xffffffff); pathHash = sourcePtr[4]; FUN_008f2d20(&sourcePtr); - local_8._0_1_ = 0xd; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xd; FUN_00a2bd60(&isStream,&pathHash); - local_8._0_1_ = 0xe; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 0xe; if (((local_24 != (int *)0x0) && (cVar2 = (**(code **)(*local_24 + 0xc))(), cVar2 != '\0')) && (g_soundReleaseFn != (void *)0x0)) { (*g_soundReleaseFn)(local_28); } - local_8 = CONCAT31(local_8._1_3_,2); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),2); (**(code **)(*(int *)((char *)pvVar1 + 0x10) + 0x10))(); } FUN_008f2d20(&sourcePtr); diff --git a/src/game/spawn.cpp b/src/game/spawn.cpp index 800064f..77e7c20 100644 --- a/src/game/spawn.cpp +++ b/src/game/spawn.cpp @@ -10,9 +10,9 @@ void * Spawn::PickEntry(float value) weightSum = 0.0; if (*(byte *)((char *)this + 8) != 0) { do { - weightSum = weightSum + *(float *)(*(int *)((char *)this + 4) + 8 + (uint)entryIndex * 0xc); + weightSum = weightSum + *(float *)(*(int *)((char *)this + 4) + 8 + GHIDRA_UINT(entryIndex) * 0xc); if (value * *(float *)((char *)this + 0xc) < weightSum) { - return (void *)(*(int *)((char *)this + 4) + (uint)entryIndex * 0xc); + return (void *)(*(int *)((char *)this + 4) + GHIDRA_UINT(entryIndex) * 0xc); } entryIndex = entryIndex + 1; } while (entryIndex < *(byte *)((char *)this + 8)); @@ -26,7 +26,7 @@ void * Spawn::PickEntry(float value) // 00872000 void Spawn::Entries(uint *param_1, int param_2) { - *param_1 = (uint)*(byte *)(param_2 + 8); + *param_1 = GHIDRA_UINT(*(byte *)(param_2 + 8)); param_1[1] = *(uint *)(param_2 + 4); return; } diff --git a/src/game/special_seed.cpp b/src/game/special_seed.cpp index 26eefe5..d909d9c 100644 --- a/src/game/special_seed.cpp +++ b/src/game/special_seed.cpp @@ -22,7 +22,7 @@ std_string * SpecialSeed::get_display_name(std_string *outName) outName->_buf[0] = '\0'; return outName; } - text = (byte *)((int)this + 0x10); + text = (byte *)(GHIDRA_INT(this) + 0x10); if (0xf < *(uint *)((char *)this + 0x24)) { text = *(byte **)text; } @@ -50,6 +50,6 @@ std_string * SpecialSeed::get_display_name(std_string *outName) ch = *textEnd; textEnd = textEnd + 1; } while (ch != 0); - ((std::string *)(outName->_buf))->std::string::assign(text,(int)textEnd - (int)(text + 1)); + ((std::string *)(outName->_buf))->std::string::assign(text,GHIDRA_INT(textEnd) - GHIDRA_INT((text + 1))); return outName; } diff --git a/src/game/sprite.cpp b/src/game/sprite.cpp index fb93fbe..417b707 100644 --- a/src/game/sprite.cpp +++ b/src/game/sprite.cpp @@ -70,7 +70,7 @@ void Sprite::PlayRandom(uint seed) KAGE_LogMessage(1,(byte *)"[warn] PlayRandom: no animations\n"); return; } - anim = (byte *)((seed % (uint)this->_animCount) * 0x13c + (int)this->_animData); + anim = (byte *)((seed % GHIDRA_UINT(this->_animCount)) * 0x13c + GHIDRA_INT(this->_animData)); if (0xf < *(uint *)(anim + 0x14)) { anim = *(byte **)anim; } @@ -86,7 +86,7 @@ void Sprite::PlayRandom(uint seed) isLess = bVar1 < *animNameCursor; if (bVar1 != *animNameCursor) { LAB_0040a320: - cmpResult = -(uint)isLess | 1; + cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0040a325; } if (bVar1 == 0) break; @@ -175,7 +175,7 @@ void Sprite::SetLastFrame() { if ((this->_animState)._animData != (void *)0x0) { AnimationState::AdvancePosition - (&this->_animState,*(int *)((int)(this->_animState)._animData + 0x30) + -1); + (&this->_animState,*(int *)(GHIDRA_INT((this->_animState)._animData) + 0x30) + -1); } return; } @@ -248,7 +248,7 @@ int Sprite::GetOverlayFrame() if ((this->_overlayAnimState)._animData == (void *)0x0) { return -1; } - return (int)(this->_overlayAnimState)._animFrame; + return GHIDRA_INT((this->_overlayAnimState)._animFrame); } // 0040ac60 @@ -361,7 +361,7 @@ byte Sprite::ReplaceSpritesheet(int layerId, std_string *pngFilename) if ((-1 < layerId) && (layerId < this->_layerCount)) { layerStates = this->_layerState; layerOffset = layerId * 0xa0; - layerPath = (std_string *)(layerOffset + 8 + (int)layerStates); + layerPath = (std_string *)(layerOffset + 8 + GHIDRA_INT(layerStates)); layerPathData = layerPath; if (0xf < layerPath->_capacity) { layerPathData = *(std_string **)layerPath->_buf; @@ -374,14 +374,14 @@ byte Sprite::ReplaceSpritesheet(int layerId, std_string *pngFilename) isSamePath = str_eq((byte *)newPathData,lengthA,(byte *)layerPathData,layerPath->_size); if (isSamePath == 0) { if (layerPath == pngFilename) { - *(undefined1 *)(layerOffset + 0x30 + (int)layerStates) = 0; + *(undefined1 *)(layerOffset + 0x30 + GHIDRA_INT(layerStates)) = 0; return 1; } if (0xf < pngFilename->_capacity) { pngFilename = *(std_string **)pngFilename->_buf; } ((std::string *)((char *)layerPath))->std::string::assign((byte *)pngFilename,lengthA); - *(undefined1 *)(layerOffset + 0x30 + (int)this->_layerState) = 0; + *(undefined1 *)(layerOffset + 0x30 + GHIDRA_INT(this->_layerState)) = 0; return 1; } } diff --git a/src/game/stage_transition.cpp b/src/game/stage_transition.cpp index 17a9651..570d7b8 100644 --- a/src/game/stage_transition.cpp +++ b/src/game/stage_transition.cpp @@ -56,7 +56,7 @@ void StageTransition::Update() local_8 = (void *)0xffffffff; puStack_c = &LAB_00b0aced; local_10 = ExceptionList; - uVar4 = __security_cookie ^ (uint)(tmpString + 10); + uVar4 = __security_cookie ^ GHIDRA_UINT((tmpString + 10)); ExceptionList = &local_10; transition = catchUpPlayer; local_14 = uVar4; @@ -67,7 +67,7 @@ void StageTransition::Update() exitingPlayer = (Entity_Player *)0x0; minExitFrame = 1000; local_2e = '\0'; - ((EntityList *)((EntityList *)((int)g_game->_room + 0x1218)))->EntityList::Update(1); + ((EntityList *)((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218)))->EntityList::Update(1); if (((catchUpPlayer[1]._frame == 4) && (pvVar7 = (g_game->_playerManager)._stageTransitionPlayer, *(float *)((char *)pvVar7 + 0x1b1c) == g_vectorZero.x)) && @@ -99,7 +99,7 @@ LAB_0092f31d: local_38 = (Entity_Player *)(player->_sprite)._animState._animFrame; dVar12 = floor((double)(float)local_38); local_38 = (Entity_Player *)(float)dVar12; - if ((int)dVar12 != *(int *)((int)(player->_sprite)._animState._animData + 0x30) + -1) + if (GHIDRA_INT(dVar12) != *(int *)(GHIDRA_INT((player->_sprite)._animState._animData) + 0x30) + -1) goto LAB_0092f31d; } isExitAnimDone = '\x01'; @@ -128,7 +128,7 @@ LAB_0092f31d: else { local_38 = (Entity_Player *)(player->_sprite)._animState._animFrame; dVar12 = floor((double)(float)local_38); - iVar6 = (int)dVar12; + iVar6 = GHIDRA_INT(dVar12); } local_38 = player; if (minExitFrame <= iVar6) { @@ -153,12 +153,12 @@ LAB_0092f31d: if (exitingPlayer != (Entity_Player *)0x0) { fVar10 = (exitingPlayer->_moveToTarget).y; *(float *)(catchUpPlayer + 2) = (exitingPlayer->_moveToTarget).x; - catchUpPlayer[2]._frame = (int)fVar10; + catchUpPlayer[2]._frame = GHIDRA_INT(fVar10); } } pvVar7 = g_game->_room; - gridX = (int)((*(float *)(catchUpPlayer + 2) - 40.0) / 40.0 + 0.5); - iVar6 = (int)(((float)catchUpPlayer[2]._frame - 120.0) / 40.0 + 0.5); + gridX = GHIDRA_INT(((*(float *)(catchUpPlayer + 2) - 40.0) / 40.0 + 0.5)); + iVar6 = GHIDRA_INT((((float)catchUpPlayer[2]._frame - 120.0) / 40.0 + 0.5)); if (gridX < 0) { LAB_0092f849: cVar8 = isNoPlayerExiting; @@ -185,9 +185,9 @@ LAB_0092f849: ((Game *)(g_game))->Game::Spawn(1000,0xf,trapdoorPos,&g_vectorZero,(Entity *)0x0,2,uVar4); savedFlags = spawnedEffect->_flags; iVar6 = *(int *)spawnedEffect; - flagsHigh = (uint *)((int)&spawnedEffect->_flags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&spawnedEffect->_flags) + 4); *flagsHigh = *flagsHigh | 0x1000; - *(int *)&spawnedEffect->_flags = (int)savedFlags; + *(int *)&spawnedEffect->_flags = GHIDRA_INT(savedFlags); (spawnedEffect->_sprite)._color._tint[3] = 0.5; (spawnedEffect->_sprite)._playbackSpeed = 2.0; spawnedEffect->_renderDepthOffset = 4.0; @@ -201,9 +201,9 @@ LAB_0092f849: fVar10 = (spawnedEffect->_sprite)._scale.x; fVar11 = (spawnedEffect->_sprite)._scale.y; savedFlags = spawnedEffect->_flags; - flagsHigh = (uint *)((int)&spawnedEffect->_flags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&spawnedEffect->_flags) + 4); *flagsHigh = *flagsHigh | 0x1000; - *(int *)&spawnedEffect->_flags = (int)savedFlags; + *(int *)&spawnedEffect->_flags = GHIDRA_INT(savedFlags); iVar6 = *(int *)spawnedEffect; (spawnedEffect->_sprite)._scale.x = fVar10 + fVar10; (spawnedEffect->_sprite)._scale.y = fVar11 + fVar11; @@ -216,12 +216,12 @@ LAB_0092f849: do { uVar4 = Random(); uVar5 = Random(); - angle = (float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)]) * + angle = (float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)]) * 2.3283064e-10 * 3.14; angle = angle + angle; angleSin = sin(angle); uVar5 = Random(); - dustSpeed = (float)((double)(int)uVar5 + __uint_to_double_fixup[-((int)uVar5 >> 0x1f)] + dustSpeed = (float)((double)GHIDRA_INT(uVar5) + __uint_to_double_fixup[-(GHIDRA_INT(uVar5) >> 0x1f)] ) * 2.3283064e-10 * 8.0; dustVelocity.x = cos(angle); dustVelocity.x = dustVelocity.x * dustSpeed; @@ -237,13 +237,13 @@ LAB_0092f849: (spawnedEffect->_sprite)._scale.x = fVar10 + fVar10; (spawnedEffect->_sprite)._scale.y = fVar11 + fVar11; uVar4 = Random(); - flagsHigh = (uint *)((int)&spawnedEffect->_flags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&spawnedEffect->_flags) + 4); *flagsHigh = *flagsHigh | 0x1000; - dVar12 = __uint_to_double_fixup[-((int)uVar4 >> 0x1f)]; - *(int *)&spawnedEffect->_flags = (int)spawnedEffect->_flags; + dVar12 = __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]; + *(int *)&spawnedEffect->_flags = GHIDRA_INT(spawnedEffect->_flags); iVar6 = *(int *)spawnedEffect; *(float *)&(*(undefined1 *)((char *)&(spawnedEffect[1]) + 0x4)) = - -8.0 - (float)((double)(int)uVar4 + dVar12) * 2.3283064e-10 * 4.0; + -8.0 - (float)((double)GHIDRA_INT(uVar4) + dVar12) * 2.3283064e-10 * 4.0; (**(code **)(iVar6 + 0xc))(); local_38 = (Entity_Player *)&(*(undefined1 *)((char *)&(local_38[-1]) + 0x2eff)); } while (local_38 != (Entity_Player *)0x0); @@ -275,9 +275,9 @@ LAB_0092f849: uVar4 = tmpStringCapacity + 1; pvVar7 = tmpString[0]; if (0xfff < uVar4) { - pvVar7 = *(void **)((int)tmpString[0] + -4); + pvVar7 = *(void **)(GHIDRA_INT(tmpString[0]) + -4); uVar4 = tmpStringCapacity + 0x24; - if (0x1f < (uint)((int)tmpString[0] + (-4 - (int)pvVar7))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(pvVar7))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -287,7 +287,7 @@ LAB_0092f849: fVar10 = (player->_moveToTarget).y; tmpStringSize = 0; tmpStringCapacity = 0xf; - tmpString[0] = (void *)((uint)tmpString[0] & 0xffffff00); + tmpString[0] = (void *)(GHIDRA_UINT(tmpString[0]) & 0xffffff00); (catchUpPlayer->_moveToTarget).x = (player->_moveToTarget).x; (catchUpPlayer->_moveToTarget).y = fVar10; LAB_0092f901: @@ -305,7 +305,7 @@ LAB_0092f901: playerIt = playerIt + 1; } while (playerIt != piVar2); } - if ((0x14 < (uint)catchUpPlayer->_frame) || ((catchUpPlayer[1]._frame == 1 && (5 < (uint)catchUpPlayer->_frame)))) { + if ((0x14 < GHIDRA_UINT(catchUpPlayer->_frame)) || ((catchUpPlayer[1]._frame == 1 && (5 < GHIDRA_UINT(catchUpPlayer->_frame))))) { catchUpPlayer->_frame = 0; *(int *)catchUpPlayer = 2; FUN_007ea5d0(); @@ -409,7 +409,7 @@ LAB_0092fe68: playerSlot = playerSlot + 1; } while (playerSlot != (game->_playerManager)._playerList._end); } - ((EntityList *)((EntityList *)((int)game->_room + 0x1218)))->EntityList::Update(1); + ((EntityList *)((EntityList *)(GHIDRA_INT(game->_room) + 0x1218)))->EntityList::Update(1); playerIt = (g_game->_playerManager)._playerList._begin; game = g_game; if (playerIt != (g_game->_playerManager)._playerList._end) { @@ -450,15 +450,15 @@ LAB_0092fe68: } if (catchUpPlayer[1]._frame == 5) { savedFlags = game->_gameStateFlags; - flagsHigh = (uint *)((int)&game->_gameStateFlags + 4); + flagsHigh = (uint *)(GHIDRA_INT(&game->_gameStateFlags) + 4); *flagsHigh = *flagsHigh | 0x10000; - *(int *)&game->_gameStateFlags = (int)savedFlags; + *(int *)&game->_gameStateFlags = GHIDRA_INT(savedFlags); if (catchUpPlayer[1]._frame != 5) goto LAB_0092fbfd; LAB_0092fc1b: manager = g_manager; local_38 = (Entity_Player *)0x267; seed_fart_sound_override((int *)&local_38); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_38,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_38),1.0,2,0,1.0,0.0); game = g_game; } else { @@ -512,7 +512,7 @@ LAB_0092fbfd: uVar4 = catchUpPlayer->_frame; } game = g_game; - if ((uint)catchUpPlayer->_duration <= uVar4) { + if (GHIDRA_UINT(catchUpPlayer->_duration) <= uVar4) { catchUpPlayer->_frame = 0; *(undefined4 *)catchUpPlayer = 4; ((Level *)((Level *)game))->Level::ShowName(0); @@ -520,7 +520,7 @@ LAB_0092fbfd: break; case 4: local_2e = '\x01'; - ((EntityList *)((EntityList *)((int)g_game->_room + 0x1218)))->EntityList::Update(1); + ((EntityList *)((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218)))->EntityList::Update(1); playerIt = (g_game->_playerManager)._playerList._begin; game = g_game; if (playerIt == (g_game->_playerManager)._playerList._end) { diff --git a/src/game/stat_hud.cpp b/src/game/stat_hud.cpp index 3b33133..7b2fbf2 100644 --- a/src/game/stat_hud.cpp +++ b/src/game/stat_hud.cpp @@ -57,7 +57,7 @@ void StatHUD::Render(float *param_1) local_8 = 0xffffffff; puStack_c = &LAB_00b02f23; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(textBuffers + 0x2c); + local_18 = __security_cookie ^ GHIDRA_UINT((textBuffers + 0x2c)); ExceptionList = &local_10; if (((g_manager->_optionsConfig)._enableFoundHUD != 0) && ((*(int *)(in_ECX + 0x114) != 0 || (*(int *)(in_ECX + 0x1e0) != 0)))) { @@ -104,7 +104,7 @@ void StatHUD::Render(float *param_1) } else { if (*(int *)(in_ECX + 0x34) != 0) { - ((AnimationState *)((AnimationState *)(in_ECX + 0x30)))->AnimationState::SetFrameFloat((float)(int)uVar4); + ((AnimationState *)((AnimationState *)(in_ECX + 0x30)))->AnimationState::SetFrameFloat((float)GHIDRA_INT(uVar4)); } *(undefined4 *)(in_ECX + 0xb4) = 0x3f000000; if (*(char *)(in_ECX + 0x109) != '\0') { @@ -136,9 +136,9 @@ void StatHUD::Render(float *param_1) return; } uVar5 = 0; - auVar6 = ZEXT416((uint)originY); + auVar6 = ZEXT416(GHIDRA_UINT(originY)); rowY = originY; - fVar7 = (float)((double)(int)playerIndex + __uint_to_double_fixup[-((int)playerIndex >> 0x1f)] + fVar7 = (float)((double)GHIDRA_INT(playerIndex) + __uint_to_double_fixup[-(GHIDRA_INT(playerIndex) >> 0x1f)] ); columnX = fVar7 * 4.0 + originX; uVar4 = playerIndex; @@ -153,7 +153,7 @@ void StatHUD::Render(float *param_1) if (uVar4 == 0) goto LAB_0084c580; } else { - auVar6 = ZEXT416((uint)(fVar7 * 7.0 + secondPlayerOffsetY + auVar6._0_4_)); + auVar6 = ZEXT416(GHIDRA_UINT((fVar7 * 7.0 + secondPlayerOffsetY + (*(undefined4 *)((char *)&(auVar6) + 0x0))))); LAB_0084c580: textBuffers[0x14] = 0; textBuffers[0x15] = 0; @@ -163,7 +163,7 @@ LAB_0084c580: textBuffers[9] = 0; textBuffers[10] = 0; textBuffers[0xb] = 0; - textY = auVar6._0_4_ + (g_game->_screenShakeOffset).y + 1.0; + textY = (*(undefined4 *)((char *)&(auVar6) + 0x0)) + (g_game->_screenShakeOffset).y + 1.0; textX = columnX + (g_game->_screenShakeOffset).x + 16.0; textBuffers[0xc] = 0; textBuffers[0xd] = 0; @@ -240,7 +240,7 @@ LAB_0084c717: local_48 = local_4c; glyphs = ((Font *)(font))->Font::measure_string(glyphBuffer,textBuffers + 0xc,&local_80,&g_vectorOne) ; - local_8 = CONCAT31(local_8._1_3_,1); + local_8 = CONCAT31((*(undefined1 *)((char *)&(local_8) + 0x1)),1); color._green = (float)local_48; color._red = 1.0; color._blue = local_4c; @@ -290,14 +290,14 @@ LAB_0084c717: ((Font *)(font))->Font::DrawString(textBuffers,&local_78,&local_ac,spacing + textX + 30.0,textY); } local_8 = 0xffffffff; - auVar6 = ZEXT416((uint)rowY); + auVar6 = ZEXT416(GHIDRA_UINT(rowY)); uVar4 = playerIndex; spacing = rowSpacing; columnX = local_8c; fVar7 = local_90; } - auVar6._0_4_ = auVar6._0_4_ + spacing; - rowY = auVar6._0_4_; + (*(undefined4 *)((char *)&(auVar6) + 0x0)) = (*(undefined4 *)((char *)&(auVar6) + 0x0)) + spacing; + rowY = (*(undefined4 *)((char *)&(auVar6) + 0x0)); } uVar5 = uVar5 + 1; isDealChanceCombined = isDealChanceCombinedSaved; @@ -317,8 +317,8 @@ void StatHUD::RecomputeStats(int playerId, uint flags, byte unk) undefined4 isAnimated; if ((-1 < playerId) && (this[playerId * 0x33 + 0x45] != (StatHUD)0x0)) { - framesSinceUpdate = g_game->_frameCount - *(int *)((int)this[playerId * 0x33 + 0x45] + 0x328); - isAnimated = CONCAT31((int3)((uint)framesSinceUpdate >> 8),1 < framesSinceUpdate); + framesSinceUpdate = g_game->_frameCount - *(int *)(GHIDRA_INT(this[playerId * 0x33 + 0x45]) + 0x328); + isAnimated = CONCAT31((int3)(GHIDRA_UINT(framesSinceUpdate) >> 8),1 < framesSinceUpdate); if ((flags & 1) != 0) { StatTracker::set(isAnimated); } @@ -381,7 +381,7 @@ void StatHUD::update_player(Entity_Player *oldPlayer, Entity_Player *newPlayer) do { if (this[local_20 * 0x33 + 0x45] == (StatHUD)oldPlayer) { this[local_20 * 0x33 + 0x45] = (StatHUD)newPlayer; - if ((-1 < (int)local_20) && (newPlayer != (Entity_Player *)0x0)) { + if ((-1 < GHIDRA_INT(local_20)) && (newPlayer != (Entity_Player *)0x0)) { if (g_game->_frameCount - newPlayer->_spawnFrame < 2) { SVar1 = this[local_20 * 0x33 + 0x46]; statA = this + local_20 * 0x33 + 0x5f; @@ -422,13 +422,13 @@ void StatHUD::update_player(Entity_Player *oldPlayer, Entity_Player *newPlayer) LAB_0084cec8: this[local_20 * 0x33 + 0x46] = SVar1; statA = this + local_20 * 0x33 + 0x4b; - fVar2 = *(float *)((int)this[local_20 * 0x33 + 0x45] + 0x1460); + fVar2 = *(float *)(GHIDRA_INT(this[local_20 * 0x33 + 0x45]) + 0x1460); SVar1 = *statA; } else { timer = this[local_20 * 0x33 + 0x4a]; - if (0x1e < (int)timer) { - if ((int)timer < 0x87) { + if (0x1e < GHIDRA_INT(timer)) { + if (GHIDRA_INT(timer) < 0x87) { timer = (StatHUD)0x87; } this[local_20 * 0x33 + 0x4a] = timer; @@ -455,9 +455,9 @@ LAB_0084cf67: } else { timer = statA[4]; - if (0x1e < (int)timer) { + if (0x1e < GHIDRA_INT(timer)) { statA[1] = (StatHUD)((float)SVar3 - (float)statA[2]); - if ((int)timer < 0x87) { + if (GHIDRA_INT(timer) < 0x87) { timer = (StatHUD)0x87; } statA[4] = timer; @@ -473,7 +473,7 @@ LAB_0084cf67: *statA = SVar3; SVar1 = *statB; } - SVar3 = *(StatHUD *)((int)this[local_20 * 0x33 + 0x45] + 0x1470); + SVar3 = *(StatHUD *)(GHIDRA_INT(this[local_20 * 0x33 + 0x45]) + 0x1470); if ((float)SVar3 == (float)SVar1) { *statB = SVar3; LAB_0084cff2: @@ -482,9 +482,9 @@ LAB_0084cff2: } else { timer = statB[4]; - if (0x1e < (int)timer) { + if (0x1e < GHIDRA_INT(timer)) { statB[1] = (StatHUD)((float)SVar3 - (float)statB[2]); - if ((int)timer < 0x87) { + if (GHIDRA_INT(timer) < 0x87) { timer = (StatHUD)0x87; } statB[4] = timer; @@ -500,7 +500,7 @@ LAB_0084cff2: *statB = SVar3; SVar1 = *statA; } - SVar3 = (StatHUD)(*(float *)((int)this[local_20 * 0x33 + 0x45] + 0x1480) / 40.0); + SVar3 = (StatHUD)(*(float *)(GHIDRA_INT(this[local_20 * 0x33 + 0x45]) + 0x1480) / 40.0); if ((float)SVar3 == (float)SVar1) { *statA = SVar3; LAB_0084d081: @@ -509,9 +509,9 @@ LAB_0084d081: } else { timer = statA[4]; - if (0x1e < (int)timer) { + if (0x1e < GHIDRA_INT(timer)) { statA[1] = (StatHUD)((float)SVar3 - (float)statA[2]); - if ((int)timer < 0x87) { + if (GHIDRA_INT(timer) < 0x87) { timer = (StatHUD)0x87; } statA[4] = timer; @@ -527,7 +527,7 @@ LAB_0084d081: *statA = SVar3; SVar1 = *statB; } - SVar3 = *(StatHUD *)((int)this[local_20 * 0x33 + 0x45] + 0x1464); + SVar3 = *(StatHUD *)(GHIDRA_INT(this[local_20 * 0x33 + 0x45]) + 0x1464); if ((float)SVar3 == (float)SVar1) { *statB = SVar3; LAB_0084d10c: @@ -536,9 +536,9 @@ LAB_0084d10c: } else { timer = statB[4]; - if (0x1e < (int)timer) { + if (0x1e < GHIDRA_INT(timer)) { statB[1] = (StatHUD)((float)SVar3 - (float)statB[2]); - if ((int)timer < 0x87) { + if (GHIDRA_INT(timer) < 0x87) { timer = (StatHUD)0x87; } statB[4] = timer; @@ -555,10 +555,10 @@ LAB_0084d10c: SVar1 = *statA; } isAnimateChange = true; - SVar3 = *(StatHUD *)((int)this[local_20 * 0x33 + 0x45] + 0x156c); + SVar3 = *(StatHUD *)(GHIDRA_INT(this[local_20 * 0x33 + 0x45]) + 0x156c); if ((float)SVar3 != (float)SVar1) { timer = statA[4]; - if ((int)timer < 0x1f) { + if (GHIDRA_INT(timer) < 0x1f) { statA[2] = SVar1; statA[1] = (StatHUD)((float)SVar3 - (float)SVar1); if ((float)statA[3] <= ABS((float)SVar3 - (float)SVar1)) { @@ -567,7 +567,7 @@ LAB_0084d10c: } else { statA[1] = (StatHUD)((float)SVar3 - (float)statA[2]); - if ((int)timer < 0x87) { + if (GHIDRA_INT(timer) < 0x87) { timer = (StatHUD)0x87; } statA[4] = timer; @@ -606,8 +606,8 @@ LAB_0084d460: } else { timer = this[local_20 * 0x33 + 0x68]; - if (0x1e < (int)timer) { - if ((int)timer < 0x87) { + if (0x1e < GHIDRA_INT(timer)) { + if (GHIDRA_INT(timer) < 0x87) { timer = (StatHUD)0x87; } this[local_20 * 0x33 + 0x68] = timer; @@ -627,7 +627,7 @@ LAB_0084d460: dealChance = (StatHUD)((float)dealChance * fVar2 * 100.0); if ((float)dealChance == (float)SVar1) goto LAB_0084d4c3; LAB_0084d484: - if ((int)angelChanceStat[4] < 0x1f) { + if (GHIDRA_INT(angelChanceStat[4]) < 0x1f) { angelChanceStat[2] = SVar1; angelChanceStat[1] = (StatHUD)((float)dealChance - (float)SVar1); if ((float)angelChanceStat[3] <= ABS((float)dealChance - (float)SVar1)) { @@ -637,7 +637,7 @@ LAB_0084d484: else { angelChanceStat[1] = (StatHUD)((float)dealChance - (float)angelChanceStat[2]); SVar1 = angelChanceStat[4]; - if ((int)angelChanceStat[4] < 0x87) { + if (GHIDRA_INT(angelChanceStat[4]) < 0x87) { SVar1 = minTimer; } angelChanceStat[4] = SVar1; @@ -655,8 +655,8 @@ LAB_0084d2d1: } else { SVar3 = this[local_20 * 0x33 + 0x68]; - if (0x1e < (int)SVar3) { - if ((int)SVar3 < 0x87) { + if (0x1e < GHIDRA_INT(SVar3)) { + if (GHIDRA_INT(SVar3) < 0x87) { SVar3 = (StatHUD)0x87; } this[local_20 * 0x33 + 0x68] = SVar3; @@ -700,8 +700,8 @@ LAB_0084d5c7: } else { SVar3 = this[local_20 * 0x33 + 0x72]; - if (0x1e < (int)SVar3) { - if ((int)SVar3 < 0x87) { + if (0x1e < GHIDRA_INT(SVar3)) { + if (GHIDRA_INT(SVar3) < 0x87) { SVar3 = (StatHUD)0x87; } this[local_20 * 0x33 + 0x72] = SVar3; @@ -720,7 +720,7 @@ LAB_0084d5c7: SVar3 = (StatHUD)((g_game->_itemPool)._unkFloat674 * 100.0); if ((float)SVar3 != (float)SVar1) { timer = statA[4]; - if ((int)timer < 0x1f) { + if (GHIDRA_INT(timer) < 0x1f) { statA[2] = SVar1; statA[1] = (StatHUD)((float)SVar3 - (float)SVar1); if ((float)statA[3] <= ABS((float)SVar3 - (float)SVar1)) { @@ -731,7 +731,7 @@ LAB_0084d5c7: } else { statA[1] = (StatHUD)((float)SVar3 - (float)statA[2]); - if ((int)timer < 0x87) { + if (GHIDRA_INT(timer) < 0x87) { timer = (StatHUD)0x87; } statA[4] = timer; diff --git a/src/game/stats_panel.cpp b/src/game/stats_panel.cpp index 921481b..38c457c 100644 --- a/src/game/stats_panel.cpp +++ b/src/game/stats_panel.cpp @@ -39,7 +39,7 @@ void StatsPanel::add_stat_line() local_14 = 0xffffffff; puStack_18 = &LAB_00b02fbb; local_1c = ExceptionList; - local_24 = __security_cookie ^ (uint)(text + 0x118); + local_24 = __security_cookie ^ GHIDRA_UINT((text + 0x118)); ExceptionList = &local_1c; if (in_XMM1_Da != 0.0) { format = "+%.2f"; @@ -57,8 +57,8 @@ void StatsPanel::add_stat_line() ch = *textEnd; textEnd = textEnd + 1; } while (ch != 0); - ((std::string *)((char *)textString))->std::string::assign(text,(int)textEnd - (int)(text + 1)); - local_14 = CONCAT31(local_14._1_3_,1); + ((std::string *)((char *)textString))->std::string::assign(text,GHIDRA_INT(textEnd) - GHIDRA_INT((text + 1))); + local_14 = CONCAT31((*(undefined1 *)((char *)&(local_14) + 0x1)),1); formattedString = (void **)FUN_00651d50(); if (&entry != formattedString) { ((std::string *)((char *)&entry))->std::string::_Tidy_deallocate(); @@ -77,21 +77,21 @@ void StatsPanel::add_stat_line() if (0xfff < allocSize) { pvVar1 = *(void **)((char *)local_158 + -4); allocSize = local_144 + 0x24; - if (0x1f < (uint)((int)local_158 + (-4 - (int)pvVar1))) goto LAB_0084ddc1; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_158) + (-4 - GHIDRA_INT(pvVar1))))) goto LAB_0084ddc1; } operator_delete(pvVar1,allocSize); } local_14 = local_14 & 0xffffff00; local_148 = 0; local_144 = 0xf; - local_158 = (void *)((uint)local_158 & 0xffffff00); + local_158 = (void *)(GHIDRA_UINT(local_158) & 0xffffff00); if (0xf < local_12c) { allocSize = local_12c + 1; pvVar1 = textString[0]; if (0xfff < allocSize) { - pvVar1 = *(void **)((int)textString[0] + -4); + pvVar1 = *(void **)(GHIDRA_INT(textString[0]) + -4); allocSize = local_12c + 0x24; - if (0x1f < (uint)((int)textString[0] + (-4 - (int)pvVar1))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(textString[0]) + (-4 - GHIDRA_INT(pvVar1))))) { LAB_0084ddc1: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -113,13 +113,13 @@ LAB_0084ddc1: FID_conflict__Tidy(local_190); FID_conflict__Tidy(local_19c); FID_conflict__Tidy(local_1a8); - if (0xf < local_1b0._4_4_) { - allocSize = local_1b0._4_4_ + 1; + if (0xf < (*(undefined4 *)((char *)&(local_1b0) + 0x4))) { + allocSize = (*(undefined4 *)((char *)&(local_1b0) + 0x4)) + 1; pvVar1 = entry; if (0xfff < allocSize) { pvVar1 = *(void **)((char *)entry + -4); - allocSize = local_1b0._4_4_ + 0x24; - if (0x1f < (uint)((int)entry + (-4 - (int)pvVar1))) { + allocSize = (*(undefined4 *)((char *)&(local_1b0) + 0x4)) + 0x24; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(entry) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -147,7 +147,7 @@ void StatsPanel::set(Entity_Player *player, byte isGoldenTrinket) local_8 = 0xffffffff; puStack_c = &LAB_00b03025; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (uint)&(&statName)[1]._size; + uVar1 = __security_cookie ^ GHIDRA_UINT(&(&statName)[1]._size); ExceptionList = &local_10; if (*(int *)((char *)this + 4) != 0) { *(Entity_Player **)((char *)this + 0x48) = player; @@ -172,11 +172,11 @@ void StatsPanel::set(Entity_Player *player, byte isGoldenTrinket) local_8 = 0xffffffff; if (0xf < statName._capacity) { uVar1 = statName._capacity + 1; - panel = (void *)statName._buf._0_4_; + panel = (*(undefined4 *)((char *)&((void *)statName._buf) + 0x0)); if (0xfff < uVar1) { - panel = *(void **)(statName._buf._0_4_ + -4); + panel = *(void **)((*(undefined4 *)((char *)&(statName._buf) + 0x0)) + -4); uVar1 = statName._capacity + 0x24; - if (0x1f < (statName._buf._0_4_ - (int)panel) - 4U) goto LAB_0084e1d4; + if (0x1f < ((*(undefined4 *)((char *)&(statName._buf) + 0x0)) - GHIDRA_INT(panel)) - 4U) goto LAB_0084e1d4; } operator_delete(panel,uVar1); } @@ -188,11 +188,11 @@ void StatsPanel::set(Entity_Player *player, byte isGoldenTrinket) local_8 = 0xffffffff; if (0xf < statName._capacity) { uVar1 = statName._capacity + 1; - panel = (void *)statName._buf._0_4_; + panel = (*(undefined4 *)((char *)&((void *)statName._buf) + 0x0)); if (0xfff < uVar1) { - panel = *(void **)(statName._buf._0_4_ + -4); + panel = *(void **)((*(undefined4 *)((char *)&(statName._buf) + 0x0)) + -4); uVar1 = statName._capacity + 0x24; - if (0x1f < (statName._buf._0_4_ - (int)panel) - 4U) goto LAB_0084e1d4; + if (0x1f < ((*(undefined4 *)((char *)&(statName._buf) + 0x0)) - GHIDRA_INT(panel)) - 4U) goto LAB_0084e1d4; } operator_delete(panel,uVar1); } @@ -204,11 +204,11 @@ void StatsPanel::set(Entity_Player *player, byte isGoldenTrinket) local_8 = 0xffffffff; if (0xf < statName._capacity) { uVar1 = statName._capacity + 1; - panel = (void *)statName._buf._0_4_; + panel = (*(undefined4 *)((char *)&((void *)statName._buf) + 0x0)); if (0xfff < uVar1) { - panel = *(void **)(statName._buf._0_4_ + -4); + panel = *(void **)((*(undefined4 *)((char *)&(statName._buf) + 0x0)) + -4); uVar1 = statName._capacity + 0x24; - if (0x1f < (statName._buf._0_4_ - (int)panel) - 4U) goto LAB_0084e1d4; + if (0x1f < ((*(undefined4 *)((char *)&(statName._buf) + 0x0)) - GHIDRA_INT(panel)) - 4U) goto LAB_0084e1d4; } operator_delete(panel,uVar1); } @@ -220,11 +220,11 @@ void StatsPanel::set(Entity_Player *player, byte isGoldenTrinket) local_8 = 0xffffffff; if (0xf < statName._capacity) { uVar1 = statName._capacity + 1; - panel = (void *)statName._buf._0_4_; + panel = (*(undefined4 *)((char *)&((void *)statName._buf) + 0x0)); if (0xfff < uVar1) { - panel = *(void **)(statName._buf._0_4_ + -4); + panel = *(void **)((*(undefined4 *)((char *)&(statName._buf) + 0x0)) + -4); uVar1 = statName._capacity + 0x24; - if (0x1f < (statName._buf._0_4_ - (int)panel) - 4U) goto LAB_0084e1d4; + if (0x1f < ((*(undefined4 *)((char *)&(statName._buf) + 0x0)) - GHIDRA_INT(panel)) - 4U) goto LAB_0084e1d4; } operator_delete(panel,uVar1); } @@ -237,11 +237,11 @@ void StatsPanel::set(Entity_Player *player, byte isGoldenTrinket) local_8 = 0xffffffff; if (0xf < statName._capacity) { uVar1 = statName._capacity + 1; - panel = (void *)statName._buf._0_4_; + panel = (*(undefined4 *)((char *)&((void *)statName._buf) + 0x0)); if (0xfff < uVar1) { - panel = *(void **)(statName._buf._0_4_ + -4); + panel = *(void **)((*(undefined4 *)((char *)&(statName._buf) + 0x0)) + -4); uVar1 = statName._capacity + 0x24; - if (0x1f < (statName._buf._0_4_ - (int)panel) - 4U) goto LAB_0084e1d4; + if (0x1f < ((*(undefined4 *)((char *)&(statName._buf) + 0x0)) - GHIDRA_INT(panel)) - 4U) goto LAB_0084e1d4; } operator_delete(panel,uVar1); } @@ -252,11 +252,11 @@ void StatsPanel::set(Entity_Player *player, byte isGoldenTrinket) add_stat_line(&statName); if (0xf < statName._capacity) { uVar1 = statName._capacity + 1; - panel = (void *)statName._buf._0_4_; + panel = (*(undefined4 *)((char *)&((void *)statName._buf) + 0x0)); if (0xfff < uVar1) { - panel = *(void **)(statName._buf._0_4_ + -4); + panel = *(void **)((*(undefined4 *)((char *)&(statName._buf) + 0x0)) + -4); uVar1 = statName._capacity + 0x24; - if (0x1f < (statName._buf._0_4_ - (int)panel) - 4U) { + if (0x1f < ((*(undefined4 *)((char *)&(statName._buf) + 0x0)) - GHIDRA_INT(panel)) - 4U) { LAB_0084e1d4: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); diff --git a/src/game/string_table.cpp b/src/game/string_table.cpp index 56c1613..96f4396 100644 --- a/src/game/string_table.cpp +++ b/src/game/string_table.cpp @@ -63,22 +63,22 @@ byte StringTable::Load(byte *fileName) ch = *extCursor; extCursor = extCursor + 1; } while (ch != 0); - ch = fullPath[(int)extCursor - (int)(fullPath + 1)]; - extCursor = fullPath + ((int)extCursor - (int)(fullPath + 1)); + ch = fullPath[GHIDRA_INT(extCursor) - GHIDRA_INT((fullPath + 1))]; + extCursor = fullPath + (GHIDRA_INT(extCursor) - GHIDRA_INT((fullPath + 1))); while ((ch != 0x2e && (extCursor != fullPath))) { extCursor = extCursor + -1; ch = *extCursor; } extCursor = extCursor + 1; clear(this); - fileName._3_1_ = 0; + (*(undefined1 *)((char *)&(fileName) + 0x3)) = 0; knownExtChar = &DAT_00b9c154; do { ch = *extCursor; isLess = ch < *knownExtChar; if (ch != *knownExtChar) { LAB_00a268c0: - compareResult = -(uint)isLess | 1; + compareResult = -GHIDRA_UINT(isLess) | 1; goto LAB_00a268c5; } if (ch == 0) break; @@ -91,15 +91,15 @@ LAB_00a268c0: compareResult = 0; LAB_00a268c5: if (compareResult == 0) { - fileName._3_1_ = FUN_00a26f20(fullPath); + (*(undefined1 *)((char *)&(fileName) + 0x3)) = FUN_00a26f20(fullPath); } local_8 = 0; tracked_alloc(1,fullPath,0); - if ((fileName._3_1_ != 0) && (*(int *)&(*(undefined1 *)((char *)(this) + 0x8)) != 0)) { + if (((*(undefined1 *)((char *)&(fileName) + 0x3)) != 0) && (*(int *)&(*(undefined1 *)((char *)(this) + 0x8)) != 0)) { *(undefined4 *)this = *(undefined4 *)(**(int **)&(*(undefined1 *)((char *)(this) + 0x4)) + 0x10); } ExceptionList = local_10; - return fileName._3_1_; + return (*(undefined1 *)((char *)&(fileName) + 0x3)); } // 00a26920 @@ -132,13 +132,13 @@ void StringTable::clear() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } blockSize = *(uint *)(iVar1 + -4); oldBytes = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - blockSize; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - blockSize; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)oldBytes < blockSize); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(oldBytes) < blockSize)); free((void *)(iVar1 + -4)); } piVar2 = (int *)node[2]; @@ -166,9 +166,9 @@ void StringTable::clear() } while (node != piVar2); } std::map::_Erase_tree(&this->_categories,piVar2[1]); - piVar2[1] = (int)piVar2; - *piVar2 = (int)piVar2; - piVar2[2] = (int)piVar2; + piVar2[1] = GHIDRA_INT(piVar2); + *piVar2 = GHIDRA_INT(piVar2); + piVar2[2] = GHIDRA_INT(piVar2); this_00 = &(*(undefined1 *)((char *)(this) + 0x4)); (this->_categories)._size = 0; iVar1 = *(int *)this_00; @@ -211,13 +211,13 @@ byte * StringTable::translate(byte *key) language = *(int *)this; pbVar1 = (byte *)(slash + 1); if (lowerKey != (byte *)0x0) { - key = (byte *)((uint)key & 0xffffff); - pbVar1 = get_string(this,lowerKey,language,(byte *)(slash + 1),(byte *)((int)&key + 3)); + key = (byte *)(GHIDRA_UINT(key) & 0xffffff); + pbVar1 = get_string(this,lowerKey,language,(byte *)(slash + 1),(byte *)(GHIDRA_INT(&key) + 3)); goto LAB_00a26ab7; } } - key = (byte *)((uint)key & 0xffffff); - pbVar1 = get_string(this,*(byte **)(this + 1),language,pbVar1,(byte *)((int)&key + 3)); + key = (byte *)(GHIDRA_UINT(key) & 0xffffff); + pbVar1 = get_string(this,*(byte **)(this + 1),language,pbVar1,(byte *)(GHIDRA_INT(&key) + 3)); if (lowerKey == (byte *)0x0) { ExceptionList = local_10; return pbVar1; @@ -248,7 +248,7 @@ byte * StringTable::get_string(byte *category, int language, byte *key, byte *ou local_8 = 0xffffffff; puStack_c = &LAB_00b11b20; local_10 = ExceptionList; - uVar2 = __security_cookie ^ (uint)(languageIter + 0x1c); + uVar2 = __security_cookie ^ GHIDRA_UINT((languageIter + 0x1c)); ExceptionList = &local_10; std::set::find_node(languageIter,&language); if ((*(char *)(languageNode + 0xd) != '\0') || (languageId < *(int *)(languageNode + 0x10))) { @@ -258,7 +258,7 @@ byte * StringTable::get_string(byte *category, int language, byte *key, byte *ou languageIndex = *(int *)(languageNode + 0x14); if ((-1 < languageIndex) && (languageIndex <= *(int *)&(*(undefined1 *)((char *)(this) + 0x8)))) { categoryKey = (void *)FUN_00a62e10(uVar2); - language = (int)categoryKey; + language = GHIDRA_INT(categoryKey); std::map::find(&category,&language); pbVar1 = category; if (category == (this->_categories)._head) { @@ -271,7 +271,7 @@ byte * StringTable::get_string(byte *category, int language, byte *key, byte *ou return (byte *)"StringTable::InvalidCategory"; } stringKey = (void *)FUN_00a62e10(uVar2); - language = (int)stringKey; + language = GHIDRA_INT(stringKey); std::map::find(&category,&language); if (category == *(byte **)(pbVar1 + 0x14)) { if (categoryKey != (void *)0x0) { @@ -336,7 +336,7 @@ byte * StringTable::get_string_by_index(byte *category, int language, uint keyIn local_8 = 0xffffffff; puStack_c = &LAB_00b11b40; local_10 = ExceptionList; - uVar3 = __security_cookie ^ (uint)(findResult + 0x1c); + uVar3 = __security_cookie ^ GHIDRA_UINT((findResult + 0x1c)); ExceptionList = &local_10; std::set::find_node(findResult,&language); if ((*(char *)(languageNode + 0xd) != '\0') || (iVar2 < *(int *)(languageNode + 0x10))) { @@ -346,7 +346,7 @@ byte * StringTable::get_string_by_index(byte *category, int language, uint keyIn languageIndex = *(int *)(languageNode + 0x14); if ((-1 < languageIndex) && (languageIndex <= *(int *)&(*(undefined1 *)((char *)(this) + 0x8)))) { categoryName = (void *)FUN_00a62e10(uVar3); - language = (int)categoryName; + language = GHIDRA_INT(categoryName); std::map::find(&category,&language); pbVar1 = category; if (category == (this->_categories)._head) { @@ -357,7 +357,7 @@ byte * StringTable::get_string_by_index(byte *category, int language, uint keyIn ExceptionList = local_10; return (byte *)"StringTable::InvalidCategory"; } - if ((uint)(*(int *)(category + 0x20) - *(int *)(category + 0x1c) >> 2) <= keyIndex) { + if (GHIDRA_UINT((*(int *)(category + 0x20) - *(int *)(category + 0x1c) >> 2)) <= keyIndex) { if (categoryName != (void *)0x0) { local_8 = 2; tracked_alloc(1,categoryName,0); @@ -449,7 +449,7 @@ undefined4 StringTable::load_xml() pbVar3 = (byte *)puVar9[2]; } if (pbVar3 == pbVar5) { - pbVar3 = pbVar3 + (int)pbVar4; + pbVar3 = pbVar3 + GHIDRA_INT(pbVar4); if (pbVar3 <= pbVar4) { LAB_00a270f0: in_stack_fffffffc = &g_xmlNullStr; @@ -469,7 +469,7 @@ LAB_00a270f0: } break; } - lowerChar = (int)s_id - (int)pbVar4; + lowerChar = GHIDRA_INT(s_id) - GHIDRA_INT(pbVar4); while (*pbVar4 == pbVar4[lowerChar]) { pbVar4 = pbVar4 + 1; if (pbVar3 <= pbVar4) goto LAB_00a270f0; @@ -513,9 +513,9 @@ LAB_00a27192: pbVar3 = (byte *)puVar9[2]; } if (pbVar3 != pbVar5) goto LAB_00a2737d; - pbVar3 = pbVar3 + (int)pbVar4; + pbVar3 = pbVar3 + GHIDRA_INT(pbVar4); if (pbVar4 < pbVar3) { - lowerChar = (int)s_name - (int)pbVar4; + lowerChar = GHIDRA_INT(s_name) - GHIDRA_INT(pbVar4); while (*pbVar4 == pbVar4[lowerChar]) { pbVar4 = pbVar4 + 1; if (pbVar3 <= pbVar4) goto LAB_00a271e0; @@ -533,7 +533,7 @@ LAB_00a271e0: ch = *pbVar4; pbVar4 = pbVar4 + 1; } while (ch != 0); - pvVar1 = operator_new_tracked((uint)(pbVar4 + (1 - (int)pbVar5))); + pvVar1 = operator_new_tracked(GHIDRA_UINT((pbVar4 + (1 - GHIDRA_INT(pbVar5))))); pbVar5 = (byte *)puVar9[1]; *(void **)(unaff_EBP + -0x10068) = pvVar1; *(void **)(unaff_EBP + -0x10058) = pvVar1; @@ -541,15 +541,15 @@ LAB_00a271e0: if (pbVar5 != (byte *)0x0) { pbVar4 = pbVar5; } - lowerChar = tolower((int)(char)*pbVar4); + lowerChar = tolower(GHIDRA_INT((char)*pbVar4)); lowerName = *(undefined1 **)(unaff_EBP + -0x10058); *lowerName = (char)lowerChar; if (*pbVar4 != 0) { - lowerChar = (int)lowerName - (int)pbVar4; + lowerChar = GHIDRA_INT(lowerName) - GHIDRA_INT(pbVar4); do { pbVar5 = pbVar4 + 1; pbVar4 = pbVar4 + 1; - lowerChar = tolower((int)(char)*pbVar5); + lowerChar = tolower(GHIDRA_INT((char)*pbVar5)); pbVar4[lowerChar] = (byte)lowerChar; } while (*pbVar4 != 0); } @@ -612,12 +612,12 @@ LAB_00a271e0: } *(undefined1 *)(unaff_EBP + -4) = 0; if (pvVar1 != (void *)0x0) { - uVar7 = (lowerChar - (int)pvVar1 >> 2) * 4; + uVar7 = (lowerChar - GHIDRA_INT(pvVar1) >> 2) * 4; freeBlock = pvVar1; if (0xfff < uVar7) { freeBlock = *(void **)((char *)pvVar1 + -4); uVar7 = uVar7 + 0x23; - if (0x1f < (uint)((int)pvVar1 + (-4 - (int)freeBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar1) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -642,7 +642,7 @@ LAB_00a271e0: isLess = ch < *pbVar4; if (ch != *pbVar4) { LAB_00a27470: - uVar7 = -(uint)isLess | 1; + uVar7 = -GHIDRA_UINT(isLess) | 1; goto LAB_00a27475; } if (ch == 0) break; @@ -654,7 +654,7 @@ LAB_00a27470: } while (ch != 0); uVar7 = 0; LAB_00a27475: - if ((int)uVar7 < 0) goto LAB_00a27479; + if (GHIDRA_INT(uVar7) < 0) goto LAB_00a27479; } else { LAB_00a27479: @@ -677,7 +677,7 @@ LAB_00a27479: pcVar10 = (char *)puVar9[2]; } if (pcVar10 == pcVar8 + -0xb80fdb) { - pbVar5 = (byte *)(pcVar10 + (int)pbVar4); + pbVar5 = (byte *)(pcVar10 + GHIDRA_INT(pbVar4)); if (pbVar5 <= pbVar4) { LAB_00a274e0: pbVar4 = s_name; @@ -700,9 +700,9 @@ LAB_00a27508: pbVar3 = (byte *)puVar9[2]; } if (pbVar3 != pbVar5) goto LAB_00a27645; - pbVar3 = pbVar4 + (int)pbVar3; + pbVar3 = pbVar4 + GHIDRA_INT(pbVar3); if (pbVar4 < pbVar3) { - lowerChar = (int)s_name - (int)pbVar4; + lowerChar = GHIDRA_INT(s_name) - GHIDRA_INT(pbVar4); while (*pbVar4 == pbVar4[lowerChar]) { pbVar4 = pbVar4 + 1; if (pbVar3 <= pbVar4) goto LAB_00a27560; @@ -714,8 +714,8 @@ LAB_00a27560: lowerChar = *(int *)(unaff_EBP + -0x10088); allocBytes = (ulonglong)*(uint *)(lowerChar + 8) * 4; pvVar1 = operator_new_tracked - (-(uint)((int)((ulonglong)allocBytes >> 0x20) != 0) | - (uint)allocBytes); + (-GHIDRA_UINT((GHIDRA_INT(((ulonglong)allocBytes >> 0x20)) != 0)) | + GHIDRA_UINT(allocBytes)); lowerChar = *(int *)(lowerChar + 8); *(void **)(unaff_EBP + -0x10058) = pvVar1; memset(pvVar1,0,lowerChar << 2); @@ -728,7 +728,7 @@ LAB_00a27560: ch = *pbVar4; pbVar4 = pbVar4 + 1; } while (ch != 0); - pvVar1 = operator_new_tracked((uint)(pbVar4 + (1 - (int)pbVar5))); + pvVar1 = operator_new_tracked(GHIDRA_UINT((pbVar4 + (1 - GHIDRA_INT(pbVar5))))); pbVar5 = (byte *)puVar9[1]; *(void **)(unaff_EBP + -0x1006c) = pvVar1; *(void **)(unaff_EBP + -0x10060) = pvVar1; @@ -736,15 +736,15 @@ LAB_00a27560: if (pbVar5 != (byte *)0x0) { pbVar4 = pbVar5; } - lowerChar = tolower((int)(char)*pbVar4); + lowerChar = tolower(GHIDRA_INT((char)*pbVar4)); lowerName = *(undefined1 **)(unaff_EBP + -0x10060); *lowerName = (char)lowerChar; if (*pbVar4 != 0) { - lowerChar = (int)lowerName - (int)pbVar4; + lowerChar = GHIDRA_INT(lowerName) - GHIDRA_INT(pbVar4); do { pbVar5 = pbVar4 + 1; pbVar4 = pbVar4 + 1; - lowerChar = tolower((int)(char)*pbVar5); + lowerChar = tolower(GHIDRA_INT((char)*pbVar5)); pbVar4[lowerChar] = (byte)lowerChar; } while (*pbVar4 != 0); } @@ -780,9 +780,9 @@ LAB_00a27560: pcVar10 = (char *)puVar9[2]; } if (pcVar10 == pcVar8) { - pbVar5 = (byte *)(pcVar10 + (int)pbVar4); + pbVar5 = (byte *)(pcVar10 + GHIDRA_INT(pbVar4)); if (pbVar4 < pbVar5) { - lowerChar = (int)"string" - (int)pbVar4; + lowerChar = GHIDRA_INT("string") - GHIDRA_INT(pbVar4); while (*pbVar4 == pbVar4[lowerChar]) { pbVar4 = pbVar4 + 1; if (pbVar5 <= pbVar4) goto LAB_00a27710; @@ -821,9 +821,9 @@ LAB_00a27650: pcVar10 = (char *)puVar9[2]; } if (pcVar10 == pcVar8 + -0xb80fdb) { - pbVar5 = pbVar4 + (int)pcVar10; + pbVar5 = pbVar4 + GHIDRA_INT(pcVar10); if (pbVar5 <= pbVar4) goto LAB_00a274e0; - lowerChar = (int)&DAT_00b80fdc - (int)pbVar4; + lowerChar = GHIDRA_INT(&DAT_00b80fdc) - GHIDRA_INT(pbVar4); while (*pbVar4 == pbVar4[lowerChar]) { pbVar4 = pbVar4 + 1; if (pbVar5 <= pbVar4) goto LAB_00a274e0; @@ -833,7 +833,7 @@ LAB_00a27650: *(undefined4 **)(unaff_EBP + -0x1005c) = puVar9; } while( true ); } - lowerChar = (int)&DAT_00b80fdc - (int)pbVar4; + lowerChar = GHIDRA_INT(&DAT_00b80fdc) - GHIDRA_INT(pbVar4); while (*pbVar4 == pbVar4[lowerChar]) { pbVar4 = pbVar4 + 1; if (pbVar5 <= pbVar4) goto LAB_00a274e0; @@ -863,9 +863,9 @@ LAB_00a27878: pcVar10 = (char *)puVar9[2]; } if (pcVar10 == pcVar8 + -0xb9c11b) { - pbVar5 = pbVar4 + (int)pcVar10; + pbVar5 = pbVar4 + GHIDRA_INT(pcVar10); if (pbVar5 <= pbVar4) goto LAB_00a278d0; - lowerChar = (int)"category" - (int)pbVar4; + lowerChar = GHIDRA_INT("category") - GHIDRA_INT(pbVar4); while (*pbVar4 == pbVar4[lowerChar]) { pbVar4 = pbVar4 + 1; if (pbVar5 <= pbVar4) goto LAB_00a278d0; @@ -896,13 +896,13 @@ LAB_00a27720: ch = *pbVar4; pbVar4 = pbVar4 + 1; } while (ch != 0); - pcVar10 = operator_new_tracked((uint)(pbVar4 + (1 - (int)pbVar5))); + pcVar10 = operator_new_tracked(GHIDRA_UINT((pbVar4 + (1 - GHIDRA_INT(pbVar5))))); pbVar3 = *(byte **)(*(int *)(unaff_EBP + -0x10070) + 4); attrValue = &g_xmlNullStr; if (pbVar3 != (byte *)0x0) { attrValue = pbVar3; } - strncpy(pcVar10,(char *)attrValue,(size_t)(pbVar4 + (1 - (int)pbVar5))); + strncpy(pcVar10,(char *)attrValue,(size_t)(pbVar4 + (1 - GHIDRA_INT(pbVar5)))); lowerChar = *(int *)(unaff_EBP + -0x10060); *(char **)(*(int *)(unaff_EBP + -0x10058) + lowerChar * 4) = pcVar10; *(int *)(unaff_EBP + -0x10060) = lowerChar + 1; @@ -926,9 +926,9 @@ LAB_00a27720: pcVar10 = (char *)puVar9[2]; } if (pcVar10 == pcVar8) { - pbVar5 = pbVar4 + (int)pcVar10; + pbVar5 = pbVar4 + GHIDRA_INT(pcVar10); if (pbVar5 <= pbVar4) goto LAB_00a2780c; - lowerChar = (int)"string" - (int)pbVar4; + lowerChar = GHIDRA_INT("string") - GHIDRA_INT(pbVar4); while (*pbVar4 == pbVar4[lowerChar]) { pbVar4 = pbVar4 + 1; if (pbVar5 <= pbVar4) goto LAB_00a2780c; diff --git a/src/game/tear_params.cpp b/src/game/tear_params.cpp index 26e0da6..9c20aef 100644 --- a/src/game/tear_params.cpp +++ b/src/game/tear_params.cpp @@ -17,9 +17,9 @@ void TearParams::constructor() (this->_tearColor)._offset[1] = 0.0; (this->_tearColor)._offset[2] = 0.0; *(undefined4 *)&(this->_flags)._l = 0; - *(undefined4 *)((int)&(this->_flags)._l + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_flags)._l) + 4) = 0; *(undefined4 *)&(this->_flags)._h = 0; - *(undefined4 *)((int)&(this->_flags)._h + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&(this->_flags)._h) + 4) = 0; this->_tearDamage = 3.5; this->_tearScale = 1.0; this->_tearHeight = -23.75; @@ -60,13 +60,13 @@ TearParams * TearParams::operator_(TearParams *other) *(undefined8 *)(this->_tearColor)._offset = *(undefined8 *)(other->_tearColor)._offset; (this->_tearColor)._offset[2] = (other->_tearColor)._offset[2]; } - uVar4 = *(undefined4 *)((int)&(other->_flags)._l + 4); + uVar4 = *(undefined4 *)(GHIDRA_INT(&(other->_flags)._l) + 4); qVar6 = (other->_flags)._h; - uVar5 = *(undefined4 *)((int)&(other->_flags)._h + 4); - *(int *)&(this->_flags)._l = (int)(other->_flags)._l; - *(undefined4 *)((int)&(this->_flags)._l + 4) = uVar4; - *(int *)&(this->_flags)._h = (int)qVar6; - *(undefined4 *)((int)&(this->_flags)._h + 4) = uVar5; + uVar5 = *(undefined4 *)(GHIDRA_INT(&(other->_flags)._h) + 4); + *(int *)&(this->_flags)._l = GHIDRA_INT((other->_flags)._l); + *(undefined4 *)(GHIDRA_INT(&(this->_flags)._l) + 4) = uVar4; + *(int *)&(this->_flags)._h = GHIDRA_INT(qVar6); + *(undefined4 *)(GHIDRA_INT(&(this->_flags)._h) + 4) = uVar5; this->_tearDamage = other->_tearDamage; this->_tearScale = other->_tearScale; this->_tearHeight = other->_tearHeight; @@ -109,9 +109,9 @@ void TearParams::copy(void *other) uVar5 = *(undefined4 *)((char *)other + 0x40); uVar6 = *(undefined4 *)((char *)other + 0x44); *(undefined4 *)&(this->_flags)._l = *(undefined4 *)((char *)other + 0x38); - *(undefined4 *)((int)&(this->_flags)._l + 4) = uVar4; + *(undefined4 *)(GHIDRA_INT(&(this->_flags)._l) + 4) = uVar4; *(undefined4 *)&(this->_flags)._h = uVar5; - *(undefined4 *)((int)&(this->_flags)._h + 4) = uVar6; + *(undefined4 *)(GHIDRA_INT(&(this->_flags)._h) + 4) = uVar6; this->_tearDamage = *(float *)((char *)other + 0x48); this->_tearScale = *(float *)((char *)other + 0x4c); this->_tearHeight = *(float *)((char *)other + 0x50); diff --git a/src/game/temporary_effects.cpp b/src/game/temporary_effects.cpp index ebf95fc..165c549 100644 --- a/src/game/temporary_effects.cpp +++ b/src/game/temporary_effects.cpp @@ -47,11 +47,11 @@ void TemporaryEffects::AddEffect(void *Effect, byte addcostume, int count) effectsEnd[2] = effectCooldown; effectsEnd[3] = effectExtra; effectsEndField = &(this->_effects)._end; - *effectsEndField = (void *)((int)*effectsEndField + 0x10); + *effectsEndField = (void *)(GHIDRA_INT(*effectsEndField) + 0x10); } effectsBegin = (this->_effects)._begin; - *(int *)((((int)(this->_effects)._end - (int)effectsBegin & 0xfffffff0U) - 0xc) + - (int)effectsBegin) = count; + *(int *)(((GHIDRA_INT((this->_effects)._end) - GHIDRA_INT(effectsBegin) & 0xfffffff0U) - 0xc) + + GHIDRA_INT(effectsBegin)) = count; if ((this->_player != (Entity_Player *)0x0) && (addcostume != 0)) { ((Entity_Player *)(this->_player))->Entity_Player::AddCostume(*(ItemConfig_Item **)Effect,0); } @@ -87,8 +87,8 @@ void TemporaryEffects::AddTrinketEffect(int trinkettype, byte addcostume, int co void *trinkets; trinkets = (g_manager->_itemConfig)._trinkets._begin; - if (((int)(trinkettype & 0x7fffU) < - (int)(g_manager->_itemConfig)._trinkets._end - (int)trinkets >> 2) && + if ((GHIDRA_INT((trinkettype & 0x7fffU)) < + GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(trinkets) >> 2) && (effect[0] = *(int *)((char *)trinkets + (trinkettype & 0x7fffU) * 4), effect[0] != 0)) { effect[2] = *(undefined4 *)(effect[0] + 0x78); effect[1] = 0; @@ -107,7 +107,7 @@ void TemporaryEffects::AddNullEffect(int nulleffectid, byte addcostume, int coun if (((-1 < nulleffectid) && (nullItems = (g_manager->_itemConfig)._nullItems._begin, - nulleffectid < (int)(g_manager->_itemConfig)._nullItems._end - (int)nullItems >> 2)) && + nulleffectid < GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(nullItems) >> 2)) && (effect[0] = *(int *)((char *)nullItems + nulleffectid * 4), effect[0] != 0)) { effect[2] = *(undefined4 *)(effect[0] + 0x78); effect[1] = 0; @@ -141,14 +141,14 @@ void TemporaryEffects::RemoveEffect(void *effect, int count) entryCount = entry[1]; item = (ItemConfig_Item *)*entry; removedCount = entryCount; - if ((uint)count < entryCount) { + if (GHIDRA_UINT(count) < entryCount) { removedCount = count; } entry[1] = entryCount - removedCount; - if ((int)(entryCount - removedCount) < 1) { - memmove(entry,entry + 4,(int)(this->_effects)._end - (int)(entry + 4)); + if (GHIDRA_INT((entryCount - removedCount)) < 1) { + memmove(entry,entry + 4,GHIDRA_INT((this->_effects)._end) - GHIDRA_INT((entry + 4))); ppvVar1 = &(this->_effects)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + -0x10); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + -0x10); } if (this->_player == (Entity_Player *)0x0) { ((Room *)(g_game->_room))->Room::TriggerEffectRemoved(item,0); @@ -190,8 +190,8 @@ void TemporaryEffects::RemoveTrinketEffect(int trinkettype, int count) void *trinkets; trinkets = (g_manager->_itemConfig)._trinkets._begin; - if (((int)(trinkettype & 0x7fffU) < - (int)(g_manager->_itemConfig)._trinkets._end - (int)trinkets >> 2) && + if ((GHIDRA_INT((trinkettype & 0x7fffU)) < + GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(trinkets) >> 2) && (effectKey[0] = *(int *)((char *)trinkets + (trinkettype & 0x7fffU) * 4), effectKey[0] != 0)) { effectKey[2] = *(undefined4 *)(effectKey[0] + 0x78); effectKey[1] = 0; @@ -210,7 +210,7 @@ void TemporaryEffects::RemoveNullEffect(int nulleffectid, int count) if (((-1 < nulleffectid) && (nullItems = (g_manager->_itemConfig)._nullItems._begin, - nulleffectid < (int)(g_manager->_itemConfig)._nullItems._end - (int)nullItems >> 2)) && + nulleffectid < GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(nullItems) >> 2)) && (effect[0] = *(int *)((char *)nullItems + nulleffectid * 4), effect[0] != 0)) { effect[2] = *(undefined4 *)(effect[0] + 0x78); effect[1] = 0; @@ -302,14 +302,14 @@ void TemporaryEffects::ClearEffects(byte isClearPersistent) do { effectsBegin = (this->_effects)._begin; isAnyRemoved = false; - effectCount = (int)pvVar2 - (int)effectsBegin >> 4; + effectCount = GHIDRA_INT(pvVar2) - GHIDRA_INT(effectsBegin) >> 4; i = effectCount - 1; if (effectCount <= i) { return; } effectOffset = i * 0x10; do { - item = *(ItemConfig_Item **)(effectOffset + (int)effectsBegin); + item = *(ItemConfig_Item **)(effectOffset + GHIDRA_INT(effectsBegin)); if ((isClearPersistent != 0) || (item->persistentEffect == 0)) { iVar3 = item->type; if ((((iVar3 == 1) || ((iVar3 == 3 || (iVar3 == 4)))) && (item->id == 0x75)) && @@ -319,15 +319,15 @@ void TemporaryEffects::ClearEffects(byte isClearPersistent) iVar3 = *(int *)((char *)pvVar2 + 0x1344); } if (*(int *)((char *)pvVar2 + 0x1d88) + *(int *)((char *)pvVar2 + 0x134c) + iVar3 <= - (int)((*(int *)((char *)pvVar2 + 0x13c0) == 5) + 1)) goto LAB_009307de; + GHIDRA_INT(((*(int *)((char *)pvVar2 + 0x13c0) == 5) + 1))) goto LAB_009307de; } this->_cacheFlags = this->_cacheFlags | item->cacheFlags; - iVar3 = ((undefined4 *)(effectOffset + (int)effectsBegin))[1]; - pvVar2 = (void *)((int)effectsBegin + effectOffset + 0x10); - memmove((void *)((int)effectsBegin + effectOffset),pvVar2, - (int)(this->_effects)._end - (int)pvVar2); + iVar3 = ((undefined4 *)(effectOffset + GHIDRA_INT(effectsBegin)))[1]; + pvVar2 = (void *)(GHIDRA_INT(effectsBegin) + effectOffset + 0x10); + memmove((void *)(GHIDRA_INT(effectsBegin) + effectOffset),pvVar2, + GHIDRA_INT((this->_effects)._end) - GHIDRA_INT(pvVar2)); ppvVar1 = &(this->_effects)._end; - *ppvVar1 = (void *)((int)*ppvVar1 + -0x10); + *ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + -0x10); if (this->_player == (Entity_Player *)0x0) { ((Room *)(g_game->_room))->Room::TriggerEffectRemoved(item,0); } @@ -342,7 +342,7 @@ LAB_009307de: effectOffset = effectOffset + -0x10; effectsBegin = (this->_effects)._begin; i = i - 1; - } while (i < (uint)((int)pvVar2 - (int)effectsBegin >> 4)); + } while (i < GHIDRA_UINT((GHIDRA_INT(pvVar2) - GHIDRA_INT(effectsBegin) >> 4))); } while (isAnyRemoved); } return; @@ -366,25 +366,25 @@ void TemporaryEffects::Update() if (this->_disabled == 0) { this->_cacheFlags = 0; pvVar3 = (this->_effects)._begin; - effectCount = (int)(this->_effects)._end - (int)pvVar3 >> 4; + effectCount = GHIDRA_INT((this->_effects)._end) - GHIDRA_INT(pvVar3) >> 4; effectIndex = effectCount - 1; if (effectIndex < effectCount) { effectOffset = effectIndex * 0x10; local_c = this; do { - iVar1 = *(int *)(effectOffset + 8 + (int)pvVar3); + iVar1 = *(int *)(effectOffset + 8 + GHIDRA_INT(pvVar3)); if ((0 < iVar1) && - (iVar1 = iVar1 + -1, *(int *)(effectOffset + 8 + (int)pvVar3) = iVar1, + (iVar1 = iVar1 + -1, *(int *)(effectOffset + 8 + GHIDRA_INT(pvVar3)) = iVar1, manager = g_manager, iVar1 == 0)) { - piVar2 = *(int **)(effectOffset + (int)pvVar3); + piVar2 = *(int **)(effectOffset + GHIDRA_INT(pvVar3)); if (piVar2 != (int *)0x0) { iVar1 = *piVar2; if (((iVar1 == 1) || (iVar1 == 3)) || (iVar1 == 4)) { - if ((piVar2[1] == 0x3a) && (*(int *)(effectOffset + 0xc + (int)pvVar3) == 0)) { + if ((piVar2[1] == 0x3a) && (*(int *)(effectOffset + 0xc + GHIDRA_INT(pvVar3)) == 0)) { local_14 = (ItemConfig_Item *)0x403; seed_fart_sound_override((int *)&local_14); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_14,1.0,2,0,1.0,0.0); - piVar2 = *(int **)(effectOffset + (int)pvVar3); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_14),1.0,2,0,1.0,0.0); + piVar2 = *(int **)(effectOffset + GHIDRA_INT(pvVar3)); this = local_c; } } @@ -392,13 +392,13 @@ void TemporaryEffects::Update() } } this->_cacheFlags = this->_cacheFlags | piVar2[0x15]; - local_14 = *(ItemConfig_Item **)(effectOffset + (int)pvVar3); - _Dst = (void *)((int)(this->_effects)._begin + effectOffset); - iVar1 = *(int *)(effectOffset + 4 + (int)pvVar3); - pvVar3 = (void *)((int)_Dst + 0x10); - memmove(_Dst,pvVar3,(int)(this->_effects)._end - (int)pvVar3); + local_14 = *(ItemConfig_Item **)(effectOffset + GHIDRA_INT(pvVar3)); + _Dst = (void *)(GHIDRA_INT((this->_effects)._begin) + effectOffset); + iVar1 = *(int *)(effectOffset + 4 + GHIDRA_INT(pvVar3)); + pvVar3 = (void *)(GHIDRA_INT(_Dst) + 0x10); + memmove(_Dst,pvVar3,GHIDRA_INT((this->_effects)._end) - GHIDRA_INT(pvVar3)); effectsEnd = &(this->_effects)._end; - *effectsEnd = (void *)((int)*effectsEnd + -0x10); + *effectsEnd = (void *)(GHIDRA_INT(*effectsEnd) + -0x10); if (this->_player == (Entity_Player *)0x0) { ((Room *)(g_game->_room))->Room::TriggerEffectRemoved(local_14,0); } @@ -410,7 +410,7 @@ void TemporaryEffects::Update() effectIndex = effectIndex - 1; pvVar3 = (this->_effects)._begin; effectOffset = effectOffset + -0x10; - } while (effectIndex < (uint)((int)(this->_effects)._end - (int)pvVar3 >> 4)); + } while (effectIndex < GHIDRA_UINT((GHIDRA_INT((this->_effects)._end) - GHIDRA_INT(pvVar3) >> 4))); } } return; diff --git a/src/game/video_player.cpp b/src/game/video_player.cpp index e079ede..1600457 100644 --- a/src/game/video_player.cpp +++ b/src/game/video_player.cpp @@ -27,13 +27,13 @@ void VideoPlayer::play(byte *fileName, float volume) local_8 = 0xffffffff; puStack_c = &LAB_00b101ab; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)(fileNameLocal + 0x90); + local_14 = __security_cookie ^ GHIDRA_UINT((fileNameLocal + 0x90)); ExceptionList = &local_10; copyPtr = fileName; do { copyChar = *copyPtr; copyPtr = copyPtr + 1; - copyPtr[(int)local_ac + (0x17 - (int)fileName)] = copyChar; + copyPtr[GHIDRA_INT(local_ac) + (0x17 - GHIDRA_INT(fileName))] = copyChar; } while (copyChar != 0); strstr((char *)fileNameLocal,".ogv"); manager = g_manager; @@ -45,38 +45,38 @@ void VideoPlayer::play(byte *fileName, float volume) copyChar = *copyPtr; copyPtr = copyPtr + 1; } while (copyChar != 0); - ((std::string *)((char *)local_ac))->std::string::assign(fileNameLocal,(int)copyPtr - (int)(fileNameLocal + 1)); + ((std::string *)((char *)local_ac))->std::string::assign(fileNameLocal,GHIDRA_INT(copyPtr) - GHIDRA_INT((fileNameLocal + 1))); local_8 = 0; ModManager::TryRedirectPath (&manager->_modManager,(std_string *)redirectedPath,(std_string *)local_ac); - local_8._0_1_ = 1; + (*(undefined1 *)((char *)&(local_8) + 0x0)) = 1; pathText = extraout_EAX; - if (0xf < (uint)extraout_EAX[5]) { + if (0xf < GHIDRA_UINT(extraout_EAX[5])) { pathText = (undefined4 *)*extraout_EAX; } FUN_00a62910(pathText); - local_8 = (uint)local_8._1_3_ << 8; + local_8 = (*(undefined1 *)((char *)&(GHIDRA_UINT(local_8)) + 0x1)) << 8; if (0xf < redirectedPathCapacity) { allocSize = redirectedPathCapacity + 1; allocBlock = redirectedPath[0]; if (0xfff < allocSize) { - allocBlock = *(void **)((int)redirectedPath[0] + -4); + allocBlock = *(void **)(GHIDRA_INT(redirectedPath[0]) + -4); allocSize = redirectedPathCapacity + 0x24; - if (0x1f < (uint)((int)redirectedPath[0] + (-4 - (int)allocBlock))) goto LAB_009f3050; + if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPath[0]) + (-4 - GHIDRA_INT(allocBlock))))) goto LAB_009f3050; } operator_delete(allocBlock,allocSize); } local_8 = -1; redirectedPathSize = 0; redirectedPathCapacity = 0xf; - redirectedPath[0] = (void *)((uint)redirectedPath[0] & 0xffffff00); + redirectedPath[0] = (void *)(GHIDRA_UINT(redirectedPath[0]) & 0xffffff00); if (0xf < pathCapacity) { allocSize = pathCapacity + 1; allocBlock = local_ac[0]; if (0xfff < allocSize) { - allocBlock = *(void **)((int)local_ac[0] + -4); + allocBlock = *(void **)(GHIDRA_INT(local_ac[0]) + -4); allocSize = pathCapacity + 0x24; - if (0x1f < (uint)((int)local_ac[0] + (-4 - (int)allocBlock))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_ac[0]) + (-4 - GHIDRA_INT(allocBlock))))) { LAB_009f3050: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); @@ -104,7 +104,7 @@ LAB_009f3050: FUN_00aaaa90(); *(undefined4 *)(decoder + 0x98) = 0; *(undefined4 *)(decoder + 0x94) = 0; - startFrame = (int)(*(float *)(decoder + 0x70) * 0.0); + startFrame = GHIDRA_INT((*(float *)(decoder + 0x70) * 0.0)); if (startFrame < 0) { startFrame = 0; } @@ -137,7 +137,7 @@ void VideoPlayer::unload() local_8 = 0xffffffff; puStack_c = &LAB_00af12a0; local_10 = ExceptionList; - uVar1 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; TheoraVideoManager::destroyVideoClip(*(void **)((char *)this + 4)); *(undefined4 *)((char *)this + 4) = 0; @@ -148,7 +148,7 @@ void VideoPlayer::unload() if (*(int **)((char *)this + 0xc) != (int *)0x0) { isLastRef = (**(code **)(**(int **)((char *)this + 0xc) + 0xc))(uVar1); if ((isLastRef != '\0') && (g_renderTargetReleaseFn != (void *)0x0)) { - (*g_renderTargetReleaseFn)((int)this + 8); + (*g_renderTargetReleaseFn)(GHIDRA_INT(this) + 8); } } ExceptionList = local_10; @@ -187,7 +187,7 @@ void VideoPlayer::render(undefined1 param_1) local_8 = 0xffffffff; puStack_c = &LAB_00b1317d; local_10 = ExceptionList; - uVar4 = __security_cookie ^ (int)register0x00000010 - 4U; + uVar4 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; puVar1 = *(undefined **)(in_ECX + 4); if (puVar1 == (undefined *)0x0) { return; diff --git a/src/game/weapon.cpp b/src/game/weapon.cpp index 62486bc..48b1338 100644 --- a/src/game/weapon.cpp +++ b/src/game/weapon.cpp @@ -216,7 +216,7 @@ void Weapon::Fire(Vector *position, byte isShooting, byte isInterpolated) uint local_c; Manager *manager; - local_c = __security_cookie ^ (uint)auStack_68; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_68); local_54 = (EntityPtr)position; ownerPlayer = this->_owner; if (ownerPlayer == (Entity_Player *)0x0) { @@ -298,7 +298,7 @@ LAB_009f3b99: uVar8 = 1; EVar10 = EVar9; ownerPos = get_owner_position(this,&scratchVec); - laser = fire_laser(this,ownerPos,uVar8,pVVar6,EVar9._0_1_,EVar10._0_1_,fVar11); + laser = fire_laser(this,ownerPos,uVar8,pVVar6,(*(undefined1 *)((char *)&(EVar9) + 0x0)),(*(undefined1 *)((char *)&(EVar10) + 0x0)),fVar11); laser->_disableInitSound = 1; manager = g_manager; local_64 = laser; @@ -306,22 +306,22 @@ LAB_009f3b99: (1 < g_game->_frameCount - *(int *)((char *)g_game->_room + 0x11f0))) { local_5c = (EntityPtr)0x86; seed_fart_sound_override((int *)&local_5c); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_5c,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_5c),1.0,2,0,1.0,0.0); } EVar9 = local_54; qVar2 = (laser->_tearFlags)._l; - uVar8 = *(uint *)((int)&(laser->_tearFlags)._l + 4); + uVar8 = *(uint *)(GHIDRA_INT(&(laser->_tearFlags)._l) + 4); qVar3 = (laser->_tearFlags)._h; - uVar1 = *(uint *)((int)&(laser->_tearFlags)._h + 4); + uVar1 = *(uint *)(GHIDRA_INT(&(laser->_tearFlags)._h) + 4); laser->_timeout = -1; laser->_disableFollowParent = 0; - notExplosiveHiLo = ~(uint)g_tearFlagExplosive._h; - notExplosiveHiHi = ~g_tearFlagExplosive._h._4_4_; - notExplosiveLoHi = ~g_tearFlagExplosive._l._4_4_; - *(uint *)&(local_64->_tearFlags)._l = ~(uint)g_tearFlagExplosive._l & (uint)qVar2; - *(uint *)((int)&(local_64->_tearFlags)._l + 4) = notExplosiveLoHi & uVar8; - *(uint *)&(local_64->_tearFlags)._h = notExplosiveHiLo & (uint)qVar3; - *(uint *)((int)&(local_64->_tearFlags)._h + 4) = notExplosiveHiHi & uVar1; + notExplosiveHiLo = ~GHIDRA_UINT(g_tearFlagExplosive._h); + notExplosiveHiHi = ~(*(undefined4 *)((char *)&(g_tearFlagExplosive._h) + 0x4)); + notExplosiveLoHi = ~(*(undefined4 *)((char *)&(g_tearFlagExplosive._l) + 0x4)); + *(uint *)&(local_64->_tearFlags)._l = ~GHIDRA_UINT(g_tearFlagExplosive._l) & GHIDRA_UINT(qVar2); + *(uint *)(GHIDRA_INT(&(local_64->_tearFlags)._l) + 4) = notExplosiveLoHi & uVar8; + *(uint *)&(local_64->_tearFlags)._h = notExplosiveHiLo & GHIDRA_UINT(qVar3); + *(uint *)(GHIDRA_INT(&(local_64->_tearFlags)._h) + 4) = notExplosiveHiHi & uVar1; if (*(Entity_Laser **)local_54 != local_64) { if (*(Entity_Laser **)local_54 != (Entity_Laser *)0x0) { local_5c = local_54; @@ -349,16 +349,16 @@ LAB_009f39d5: *(float *)((char *)local_5c + 0x410) = scratchVec.x; *(int *)((char *)local_5c + 0x34c) = 0; *(int *)((char *)local_5c + 0x414) = 0; - uVar8 = *(uint *)((int)&(ownerPlayer->_tearFlags)._l + 4); + uVar8 = *(uint *)(GHIDRA_INT(&(ownerPlayer->_tearFlags)._l) + 4); qVar2 = (ownerPlayer->_tearFlags)._h; - uVar1 = *(uint *)((int)&(ownerPlayer->_tearFlags)._h + 4); - notExplosiveHiLo = ~(uint)g_tearFlagExplosive._h; - notExplosiveHiHi = ~g_tearFlagExplosive._h._4_4_; - notExplosiveLoHi = ~g_tearFlagExplosive._l._4_4_; + uVar1 = *(uint *)(GHIDRA_INT(&(ownerPlayer->_tearFlags)._h) + 4); + notExplosiveHiLo = ~GHIDRA_UINT(g_tearFlagExplosive._h); + notExplosiveHiHi = ~(*(undefined4 *)((char *)&(g_tearFlagExplosive._h) + 0x4)); + notExplosiveLoHi = ~(*(undefined4 *)((char *)&(g_tearFlagExplosive._l) + 0x4)); *(uint *)((char *)local_5c + 0x428) = - ~(uint)g_tearFlagExplosive._l & (uint)(ownerPlayer->_tearFlags)._l; + ~GHIDRA_UINT(g_tearFlagExplosive._l) & GHIDRA_UINT((ownerPlayer->_tearFlags)._l); *(uint *)((char *)local_5c + 0x42c) = notExplosiveLoHi & uVar8; - *(uint *)((char *)local_5c + 0x430) = notExplosiveHiLo & (uint)qVar2; + *(uint *)((char *)local_5c + 0x430) = notExplosiveHiLo & GHIDRA_UINT(qVar2); *(uint *)((char *)local_5c + 0x434) = notExplosiveHiHi & uVar1; laserColorPtr = ((Entity_Player *)(player2))->Entity_Player::get_laser_color_copy(&laserColor); EVar9 = local_5c; @@ -380,7 +380,7 @@ LAB_009f3a27: bVar4 = ((Entity_Player *)(ownerPlayer))->Entity_Player::HasCollectible(0x57,0); iVar7 = extraout_ECX_00; if (bVar4 == 0) goto LAB_009f3b6a; - iVar7 = 0x50 - (int)((float)local_3c * 5.0); + iVar7 = 0x50 - GHIDRA_INT(((float)local_3c * 5.0)); if (iVar7 < 1) { iVar7 = 1; } @@ -389,15 +389,15 @@ LAB_009f3a27: if (rollResult != 0) goto LAB_009f3b6a; } else { - iVar7 = 0x14 - (int)((float)local_3c * 1.5); + iVar7 = 0x14 - GHIDRA_INT(((float)local_3c * 1.5)); if (iVar7 < 1) { iVar7 = 1; } iVar7 = Isaac::Random(iVar7); if (iVar7 != 0) goto LAB_009f3a27; } - scratchVec.x = (float)((uint)local_64 ^ 0x80000000); - scratchVec.y = (float)((uint)aimDirY ^ 0x80000000); + scratchVec.x = (float)(GHIDRA_UINT(local_64) ^ 0x80000000); + scratchVec.y = (float)(GHIDRA_UINT(aimDirY) ^ 0x80000000); local_40 = (Weapon *)scratchVec.y; local_3c = (Weapon *)scratchVec.x; pVVar6 = get_owner_position(this,&local_50); @@ -501,26 +501,26 @@ LAB_009f3d28: familiarOwner = (Entity_Player *)0x0; LAB_009f3d36: *(undefined4 *)&outFlags->_l = 0; - *(undefined4 *)((int)&outFlags->_l + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&outFlags->_l) + 4) = 0; *(undefined4 *)&outFlags->_h = 0; - *(undefined4 *)((int)&outFlags->_h + 4) = 0; + *(undefined4 *)(GHIDRA_INT(&outFlags->_h) + 4) = 0; if (this_00 != (Entity_Player *)0x0) { - lowFlagsHigh = *(undefined4 *)((int)&(this_00->_tearFlags)._l + 4); + lowFlagsHigh = *(undefined4 *)(GHIDRA_INT(&(this_00->_tearFlags)._l) + 4); highFlags = (this_00->_tearFlags)._h; - highFlagsHigh = *(undefined4 *)((int)&(this_00->_tearFlags)._h + 4); - *(int *)&outFlags->_l = (int)(this_00->_tearFlags)._l; - *(undefined4 *)((int)&outFlags->_l + 4) = lowFlagsHigh; - *(int *)&outFlags->_h = (int)highFlags; - *(undefined4 *)((int)&outFlags->_h + 4) = highFlagsHigh; + highFlagsHigh = *(undefined4 *)(GHIDRA_INT(&(this_00->_tearFlags)._h) + 4); + *(int *)&outFlags->_l = GHIDRA_INT((this_00->_tearFlags)._l); + *(undefined4 *)(GHIDRA_INT(&outFlags->_l) + 4) = lowFlagsHigh; + *(int *)&outFlags->_h = GHIDRA_INT(highFlags); + *(undefined4 *)(GHIDRA_INT(&outFlags->_h) + 4) = highFlagsHigh; if (familiarOwner != (Entity_Player *)0x0) { isBabyBender = ((Entity_Player *)(this_00))->Entity_Player::HasTrinket(0x7f,0); if (isBabyBender != 0) { - *(uint *)&outFlags->_l = (uint)outFlags->_l | (uint)g_tearFlagHoming._l; - flagsDword = (uint *)((int)&outFlags->_l + 4); - *flagsDword = *flagsDword | g_tearFlagHoming._l._4_4_; - *(uint *)&outFlags->_h = (uint)outFlags->_h | (uint)g_tearFlagHoming._h; - flagsDword = (uint *)((int)&outFlags->_h + 4); - *flagsDword = *flagsDword | g_tearFlagHoming._h._4_4_; + *(uint *)&outFlags->_l = GHIDRA_UINT(outFlags->_l) | GHIDRA_UINT(g_tearFlagHoming._l); + flagsDword = (uint *)(GHIDRA_INT(&outFlags->_l) + 4); + *flagsDword = *flagsDword | (*(undefined4 *)((char *)&(g_tearFlagHoming._l) + 0x4)); + *(uint *)&outFlags->_h = GHIDRA_UINT(outFlags->_h) | GHIDRA_UINT(g_tearFlagHoming._h); + flagsDword = (uint *)(GHIDRA_INT(&outFlags->_h) + 4); + *flagsDword = *flagsDword | (*(undefined4 *)((char *)&(g_tearFlagHoming._h) + 0x4)); return outFlags; } } @@ -776,7 +776,7 @@ float10 Weapon::GetChargeBarAmount() float maxCharge; float maxCharge; - if (((uint)this->_modifiers >> 7 & 1) != 0) { + if ((GHIDRA_UINT(this->_modifiers) >> 7 & 1) != 0) { return (float10)0; } maxChargeResult = (float10)this->GetMaxCharge(); @@ -841,7 +841,7 @@ void Weapon::stop_costume_item_anim(int collectibleId) uStack_8 = 0xffffffff; puStack_c = &LAB_00aff10d; local_10 = ExceptionList; - local_14 = __security_cookie ^ (uint)&(&emptyAnimName)[1]._size; + local_14 = __security_cookie ^ GHIDRA_UINT(&(&emptyAnimName)[1]._size); ExceptionList = &local_10; pvVar1 = this->_owner; if ((((pvVar1 == (void *)0x0) || (pvVar2 = pvVar1, *(int *)((char *)pvVar1 + 0x28) != 1)) && @@ -851,7 +851,7 @@ void Weapon::stop_costume_item_anim(int collectibleId) else if ((pvVar2 != (void *)0x0) && (itemDesc = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(collectibleId), *(char *)((char *)pvVar2 + 0x20a9) == '\0')) { - spriteIndex = (int *)((int)pvVar2 + 0x122c); + spriteIndex = (int *)(GHIDRA_INT(pvVar2) + 0x122c); slotsLeft = 0xf; do { if (-1 < *spriteIndex) { @@ -905,7 +905,7 @@ byte Weapon::IsItemAnimFinished(uint collectibleID) pvStack_8 = (void *)0xffffffff; puStack_c = &LAB_00b103c6; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(tmpString + 0xb); + local_18 = __security_cookie ^ GHIDRA_UINT((tmpString + 0xb)); isTmpStringLive = false; pEVar1 = this->_owner; if ((((pEVar1 == (Entity_Player *)0x0) || (player = pEVar1, pEVar1->_type != 1)) && @@ -932,7 +932,7 @@ byte Weapon::IsItemAnimFinished(uint collectibleID) slot = 0; do { if (-1 < spriteIndex->_index) { - sprite = (ANM2 *)(spriteIndex->_index * 0x130 + (int)(player->_costumeSpriteDescs)._begin); + sprite = (ANM2 *)(spriteIndex->_index * 0x130 + GHIDRA_INT((player->_costumeSpriteDescs)._begin)); if (sprite[1]._filename._buf[8] == '\0') { capacity = tmpStringCapacity; LAB_009f51e9: @@ -952,9 +952,9 @@ LAB_009f51e9: size = capacity + 1; pvVar3 = tmpString[0]; if (0xfff < size) { - pvVar3 = *(void **)((int)tmpString[0] + -4); + pvVar3 = *(void **)(GHIDRA_INT(tmpString[0]) + -4); size = capacity + 0x24; - if (0x1f < (uint)((int)tmpString[0] + (-4 - (int)pvVar3))) { + if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1011,7 +1011,7 @@ byte Weapon::is_c_section_anim_finished(int unused) local_8 = (byte *****)0xffffffff; puStack_c = &LAB_00b1040e; local_10 = ExceptionList; - local_18 = __security_cookie ^ (uint)(animName + 0xb); + local_18 = __security_cookie ^ GHIDRA_UINT((animName + 0xb)); ExceptionList = &local_10; isTmpStringLive = false; pvVar1 = this->_owner; @@ -1020,7 +1020,7 @@ byte Weapon::is_c_section_anim_finished(int unused) } else { cSectionItem = ((ItemConfig *)(&g_manager->_itemConfig))->ItemConfig::GetCollectible(0x2a6); - spriteIndex = (int *)((int)pvVar1 + 0x122c); + spriteIndex = (int *)(GHIDRA_INT(pvVar1) + 0x122c); slot = 0; do { if (((-1 < *spriteIndex) && ((char)spriteIndex[3] != '\0')) && @@ -1063,7 +1063,7 @@ LAB_009f561f: if (0xfff < uVar4) { ppppppbVar3 = (byte ******)animNameData[-1]; uVar4 = capacity + 0x24; - if ((byte *)0x1f < (byte *)((int)animNameData + (-4 - (int)ppppppbVar3))) { + if ((byte *)0x1f < (byte *)(GHIDRA_INT(animNameData) + (-4 - GHIDRA_INT(ppppppbVar3)))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } @@ -1122,7 +1122,7 @@ void Weapon::SetHeadLockTime(int Time) owner = this->_owner; if ((((owner == (void *)0x0) || (player = owner, *(int *)((char *)owner + 0x28) != 1)) && (player = (void *)0x0, owner != (void *)0x0)) && (*(int *)((char *)owner + 0x28) == 3)) { - piVar1 = (int *)((int)owner + 0xda8); + piVar1 = (int *)(GHIDRA_INT(owner) + 0xda8); longerTime = &Time; if (Time <= *piVar1) { longerTime = piVar1; @@ -1132,7 +1132,7 @@ void Weapon::SetHeadLockTime(int Time) else if (player != (void *)0x0) { piVar1 = &Time; if (Time <= *(int *)((char *)player + 0x133c)) { - piVar1 = (int *)((int)player + 0x133c); + piVar1 = (int *)(GHIDRA_INT(player) + 0x133c); } *(int *)((char *)player + 0x133c) = *piVar1; return; @@ -1165,7 +1165,7 @@ void Weapon::set_head_direction(int direction) headAnimNameEnd = headAnimNameEnd + 1; } while (bVar1 != 0); ((std::string *)((ownerPlayer->_headAnim)._buf))->std::string::assign(headAnimName, - (int)headAnimNameEnd - (int)(headAnimName + 1)); + GHIDRA_INT(headAnimNameEnd) - GHIDRA_INT((headAnimName + 1))); return; } } @@ -1309,7 +1309,7 @@ LAB_009f5c1f: local_c = (EntityPtr)(shooter->_velocity).x; local_10 = (EntityPtr *)(shooter->_velocity).y; randomValue = Random(); - fVar2 = (float)((double)(int)randomValue + __uint_to_double_fixup[-((int)randomValue >> 0x1f)] + fVar2 = (float)((double)GHIDRA_INT(randomValue) + __uint_to_double_fixup[-(GHIDRA_INT(randomValue) >> 0x1f)] ) * 2.3283064e-10 * 0.2 + 0.8; (shooter->_velocity).y = fVar2 * (float)local_10; (shooter->_velocity).x = fVar2 * (float)local_c; @@ -1371,7 +1371,7 @@ Entity_Bomb * Weapon::fire_bomb(Weapon *weapon, Vector *position, Vector *veloci local_10 = 8.1976e-43; } seed_fart_sound_override((int *)&local_10); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_10,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_10),1.0,2,0,1.0,0.0); } local_10 = (pEVar3->_velocity).x; local_c[0] = (EntityPtr *)(pEVar3->_velocity).y; @@ -1392,9 +1392,9 @@ LAB_009f5eb6: seed = Random(); pEVar3 = (Entity_Bomb *)((Game *)(g_game))->Game::SpawnEx(4,0,position,velocity,weapon->_owner,0,seed,0); parentSlot = &pEVar3->_parent; - uVar1 = *(undefined4 *)((int)&pEVar3->_flags + 4); - *(uint *)&pEVar3->_flags = (uint)pEVar3->_flags | 0x4000000; - *(undefined4 *)((int)&pEVar3->_flags + 4) = uVar1; + uVar1 = *(undefined4 *)(GHIDRA_INT(&pEVar3->_flags) + 4); + *(uint *)&pEVar3->_flags = GHIDRA_UINT(pEVar3->_flags) | 0x4000000; + *(undefined4 *)(GHIDRA_INT(&pEVar3->_flags) + 4) = uVar1; EVar2 = (EntityPtr)weapon->_owner; if (*parentSlot != (EntityPtr)0x0) { local_c[0] = parentSlot; @@ -1420,7 +1420,7 @@ Entity_Laser * Weapon::fire_brimstone_with_color(Vector *direction, float damage uint local_c; code *setColorFn; - local_c = __security_cookie ^ (uint)auStack_44; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_44); entity = this->_owner; if (entity == (Entity *)0x0) { ownerPos.x = g_vectorZero.x; @@ -1470,12 +1470,12 @@ Entity_Laser * Weapon::fire_laser(Vector *position, uint offsetId, Vector *direc uint local_14; Entity_Player *owner; - local_14 = __security_cookie ^ (uint)auStack_f8; + local_14 = __security_cookie ^ GHIDRA_UINT(auStack_f8); savedPosition = position; savedIsLeftEye = isLeftEye; - local_e0 = (float)CONCAT31(local_e0._1_3_,isLeftEye); + local_e0 = (float)CONCAT31((*(undefined1 *)((char *)&(local_e0) + 0x1)),isLeftEye); savedIsOneHit = isOneHit; - local_e4 = (Entity_Player *)CONCAT31(local_e4._1_3_,isOneHit); + local_e4 = (Entity_Player *)CONCAT31((*(undefined1 *)((char *)&(local_e4) + 0x1)),isOneHit); owner = this->_owner; savedOffsetId = offsetId; local_dc.x = (float)direction; @@ -1493,9 +1493,9 @@ Entity_Laser * Weapon::fire_laser(Vector *position, uint offsetId, Vector *direc local_e0 = atan2f(direction->y,direction->x); uVar5 = savedOffsetId; GetOwnerLaserOffset(this,&laserPos,savedOffsetId,direction); - local_c0._4_4_ = laserPos.y; + (*(undefined4 *)((char *)&(local_c0) + 0x4)) = laserPos.y; laserPos.x = laserPos.x + savedPosition->x; - local_c0._0_4_ = 0.0; + (*(undefined4 *)((char *)&(local_c0) + 0x0)) = 0.0; laserPos.y = savedPosition->y + 0.0; pEVar4 = Entity_Laser::ShootAngle (2,&laserPos,local_e0 * 57.295776,3,(Vector *)local_c0,this->_owner,0); @@ -1510,29 +1510,29 @@ Entity_Laser * Weapon::fire_laser(Vector *position, uint offsetId, Vector *direc if (0x1f < uVar5) { fVar6 = fVar7; } - fVar7 = (float)((uint)fVar7 ^ (uint)fVar6); + fVar7 = (float)(GHIDRA_UINT(fVar7) ^ GHIDRA_UINT(fVar6)); if (0x3f < uVar5) { fVar6 = fVar7; } - uStack_b8._0_4_ = 0; - uStack_b8._4_4_ = 0; + (*(undefined4 *)((char *)&(uStack_b8) + 0x0)) = 0; + (*(undefined4 *)((char *)&(uStack_b8) + 0x4)) = 0; flagsHighLo = (undefined4)uStack_b8; - flagsHighHi = uStack_b8._4_4_; - local_c0._0_4_ = fVar7; - local_c0._4_4_ = fVar6; + flagsHighHi = (*(undefined4 *)((char *)&(uStack_b8) + 0x4)); + (*(undefined4 *)((char *)&(local_c0) + 0x0)) = fVar7; + (*(undefined4 *)((char *)&(local_c0) + 0x4)) = fVar6; } else { ownerTearFlags = get_owner_tear_flags(weapon,(BitSet128 *)local_c0); fVar7 = *(float *)&ownerTearFlags->_l; - fVar6 = *(float *)((int)&ownerTearFlags->_l + 4); + fVar6 = *(float *)(GHIDRA_INT(&ownerTearFlags->_l) + 4); flagsHighLo = (undefined4)ownerTearFlags->_h; - flagsHighHi = *(undefined4 *)((int)&ownerTearFlags->_h + 4); + flagsHighHi = *(undefined4 *)(GHIDRA_INT(&ownerTearFlags->_h) + 4); } iVar1 = *(int *)pEVar4; *(float *)&(pEVar4->_tearFlags)._l = fVar7; - *(float *)((int)&(pEVar4->_tearFlags)._l + 4) = fVar6; + *(float *)(GHIDRA_INT(&(pEVar4->_tearFlags)._l) + 4) = fVar6; *(undefined4 *)&(pEVar4->_tearFlags)._h = flagsHighLo; - *(undefined4 *)((int)&(pEVar4->_tearFlags)._h + 4) = flagsHighHi; + *(undefined4 *)(GHIDRA_INT(&(pEVar4->_tearFlags)._h) + 4) = flagsHighHi; pcVar2 = *(code **)(iVar1 + 0x3c); laserColor = get_laser_color(weapon,&local_40); (*pcVar2)(laserColor,0xffffffff,0xff,0,1); @@ -1642,7 +1642,7 @@ Entity_Knife * Weapon::FireSword(Entity *param_2, uint param_3, float param_4, b void *owner; EntityPtr *parentRef; - local_c = __security_cookie ^ (uint)&player; + local_c = __security_cookie ^ GHIDRA_UINT(&player); local_84 = (EntityPtr)param_2; local_94 = (EntityPtr *)param_3; parentRef = this->_owner; @@ -1668,7 +1668,7 @@ Entity_Knife * Weapon::FireSword(Entity *param_2, uint param_3, float param_4, b spawnPos.y = *(float *)((char *)owner + 0x340); } knife = (Entity_Knife *) - ((Game *)(g_game))->Game::SpawnEx(8,(uint)local_94,&spawnPos,&g_vectorZero,(Entity *)parentRef,0,seed,0); + ((Game *)(g_game))->Game::SpawnEx(8,GHIDRA_UINT(local_94),&spawnPos,&g_vectorZero,(Entity *)parentRef,0,seed,0); if ((knife == (Entity_Knife *)0x0) || (knife->_type != 8)) { knife = (Entity_Knife *)0x0; } @@ -1692,10 +1692,10 @@ Entity_Knife * Weapon::FireSword(Entity *param_2, uint param_3, float param_4, b knife->SetColor(&hitParams._tearColor,0xffffffff,0xff,0,1); iVar2 = *(int *)knife; *(float *)&(knife->_tearFlags)._l = hitParams._tearColor._colorize[3]; - *(float *)((int)&(knife->_tearFlags)._l + 4) = hitParams._tearColor._offset[0]; + *(float *)(GHIDRA_INT(&(knife->_tearFlags)._l) + 4) = hitParams._tearColor._offset[0]; *(float *)&(knife->_tearFlags)._h = hitParams._tearColor._offset[1]; - *(float *)((int)&(knife->_tearFlags)._h + 4) = hitParams._tearColor._offset[2]; - (**(code **)(iVar2 + 0x40))(hitParams._52_4_); + *(float *)(GHIDRA_INT(&(knife->_tearFlags)._h) + 4) = hitParams._tearColor._offset[2]; + (**(code **)(iVar2 + 0x40))((*(undefined4 *)((char *)&(hitParams) + 0x34))); } if (360.0 < ABS(rotation)) { rotation = fmodf(rotation,360.0); @@ -1710,9 +1710,9 @@ Entity_Knife * Weapon::FireSword(Entity *param_2, uint param_3, float param_4, b } knife->_rotationOffset = rotation; if (param_5 != 0) { - flagsHigh = *(undefined4 *)((int)&knife->_flags + 4); - *(uint *)&knife->_flags = (uint)knife->_flags | 0x200000; - *(undefined4 *)((int)&knife->_flags + 4) = flagsHigh; + flagsHigh = *(undefined4 *)(GHIDRA_INT(&knife->_flags) + 4); + *(uint *)&knife->_flags = GHIDRA_UINT(knife->_flags) | 0x200000; + *(undefined4 *)(GHIDRA_INT(&knife->_flags) + 4) = flagsHigh; } return knife; } @@ -1832,13 +1832,13 @@ void Weapon::TriggerTearEffects(Vector *direction, int count) Manager *manager; float ownerPosY; - local_14 = __security_cookie ^ (uint)&EStack_2b8; + local_14 = __security_cookie ^ GHIDRA_UINT(&EStack_2b8); local_2ac = (EntityPtr)direction; if (count < 1) { return; } VStack_290.y = (float)this->_owner; - local_288._0_4_ = this; + (*(undefined4 *)((char *)&(local_288) + 0x0)) = this; if ((EntityPtr)VStack_290.y == (EntityPtr)0x0) { LAB_009f79d6: player = (Entity_Player *)0x0; @@ -1853,14 +1853,14 @@ LAB_009f79d6: } player = (Entity_Player *)VStack_290.y; if (*(int *)((char *)VStack_290.y + 0x1600) == 0) { - local_2a8.x = (float)((int)VStack_290.y + 0x1580); + local_2a8.x = (float)(GHIDRA_INT(VStack_290.y) + 0x1580); uVar3 = 0; do { if (*(int *)local_2a8.x == 0x143) { Entity_Player::AddActiveCharge(player,count,uVar3,0,0,1); } uVar3 = uVar3 + 1; - local_2a8.x = (float)((int)local_2a8.x + 0x20); + local_2a8.x = (float)(GHIDRA_INT(local_2a8.x) + 0x20); } while (uVar3 < 4); } } @@ -1868,27 +1868,27 @@ LAB_009f79dc: EVar7 = local_2ac; if ((((*(float *)local_2ac == g_vectorZero.x) && (*(float *)((char *)local_2ac + 4) == g_vectorZero.y)) && - (EVar7 = (EntityPtr)(local_288._0_4_ + 0x20), - *(float *)(local_288._0_4_ + 0x20) == g_vectorZero.x)) && - ((*(float *)(local_288._0_4_ + 0x24) == g_vectorZero.y && ((EntityPtr)player != (EntityPtr)0x0) + (EVar7 = (EntityPtr)((*(undefined4 *)((char *)&(local_288) + 0x0)) + 0x20), + *(float *)((*(undefined4 *)((char *)&(local_288) + 0x0)) + 0x20) == g_vectorZero.x)) && + ((*(float *)((*(undefined4 *)((char *)&(local_288) + 0x0)) + 0x24) == g_vectorZero.y && ((EntityPtr)player != (EntityPtr)0x0) ))) { - EVar7 = (EntityPtr)((int)player + 0x1630); + EVar7 = (EntityPtr)(GHIDRA_INT(player) + 0x1630); } aimDirX = *(float *)EVar7; fVar6 = *(float *)&(*(undefined1 *)((char *)(((Entity *)EVar7)) + 0x4)); i = 0; aimDirY = fVar6; - local_238._0_4_ = aimDirX; - local_238._4_4_ = fVar6; + (*(undefined4 *)((char *)&(local_238) + 0x0)) = aimDirX; + (*(undefined4 *)((char *)&(local_238) + 0x4)) = fVar6; do { - weapon = (Weapon *)local_288._0_4_; + weapon = (*(undefined4 *)((char *)&((Weapon *)local_288) + 0x0)); if ((EntityPtr)player == (EntityPtr)0x0) { LAB_009f8615: *(int *)(weapon + 1) = *(int *)(weapon + 1) + 1; if ((EntityPtr)player != (EntityPtr)0x0) goto LAB_009f8620; } else { - owner = *(void **)(local_288._0_4_ + 4); + owner = *(void **)((*(undefined4 *)((char *)&(local_288) + 0x0)) + 4); if (owner == (void *)0x0) { triggerPos.x = g_vectorZero.x; triggerPos.y = g_vectorZero.y; @@ -1898,24 +1898,24 @@ LAB_009f8615: triggerPos.y = *(float *)((char *)owner + 0x340); } trigger_set_dispatch - ((void *)((int)player + 0x1fc8),1,(Entity *)0x0,&triggerPos,(Vector *)local_238); + ((void *)(GHIDRA_INT(player) + 0x1fc8),1,(Entity *)0x0,&triggerPos,(Vector *)local_238); isHasCollectible = ((Entity_Player *)(player))->Entity_Player::HasCollectible(0xd9,0); if (isHasCollectible != 0) { FUN_009f3c10(); fVar6 = fVar6 + fVar6; - local_2ac = (EntityPtr)(0x14 - (int)fVar6); - if ((int)local_2ac < 1) { + local_2ac = (EntityPtr)(0x14 - GHIDRA_INT(fVar6)); + if (GHIDRA_INT(local_2ac) < 1) { local_2ac = (EntityPtr)0x1; } - if (((local_2ac == (EntityPtr)0x0) || (uVar3 = Random(), uVar3 % (uint)local_2ac == 0)) && + if (((local_2ac == (EntityPtr)0x0) || (uVar3 = Random(), uVar3 % GHIDRA_UINT(local_2ac) == 0)) && ((local_2ac = *(EntityPtr *)((char *)player + 0x1370), - (uint)local_2ac <= (Entity *)&DAT_00000004 || + GHIDRA_UINT(local_2ac) <= (Entity *)&DAT_00000004 || (((isHasCollectible = ((Entity_Player *)(player))->Entity_Player::HasCollectible(0xf8,0), isHasCollectible != 0 || (isHasCollectible = TemporaryEffects::HasCollectibleEffect - ((TemporaryEffects *)((int)player + 0x1508),0xf8), - isHasCollectible != 0)) && ((uint)local_2ac <= (Entity *)&DAT_00000009)))))) { + ((TemporaryEffects *)(GHIDRA_INT(player) + 0x1508),0xf8), + isHasCollectible != 0)) && (GHIDRA_UINT(local_2ac) <= (Entity *)&DAT_00000009)))))) { owner = *(void **)((char *)weapon + 4); if (owner == (void *)0x0) { spiderOrigin.x = g_vectorZero.x; @@ -1937,10 +1937,10 @@ LAB_009f8615: if ((uVar3 & 3) == 0) { Isaac::GetAxisAlignedUnitVectorFromDir ((Vector *)(local_288 + 4),*(int *)((char *)player + 0x1628)); - local_2ac = (EntityPtr)((float)local_288._4_4_ * 10.0); + local_2ac = (EntityPtr)((*(undefined4 *)((char *)&((float)local_288) + 0x4)) * 10.0); local_2a0 = (Entity_Tear *)(local_280 * 10.0); iVar9 = 0x9f7c3f; - local_288._4_4_ = local_2ac; + (*(undefined4 *)((char *)&(local_288) + 0x4)) = local_2ac; local_280 = (float)local_2a0; inheritedVelocity = get_tear_movement_inheritance @@ -1960,14 +1960,14 @@ LAB_009f7c88: } local_2ac = (EntityPtr)(fVar6 * ((float)local_2ac + inheritedVelocity->x)); local_2a0 = (Entity_Tear *)(fVar6 * ((float)local_2a0 + inheritedVelocity->y)); - local_288._4_4_ = local_2ac; + (*(undefined4 *)((char *)&(local_288) + 0x4)) = local_2ac; local_280 = (float)local_2a0; if (1 < count) { uVar3 = Random(); owner = *(void **)((char *)weapon + 4); - local_280 = (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) + local_280 = (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 0.9; - local_288._4_4_ = (float)local_2ac * local_280; + (*(undefined4 *)((char *)&(local_288) + 0x4)) = (float)local_2ac * local_280; local_280 = (float)local_2a0 * local_280; } if (owner == (void *)0x0) { @@ -1980,33 +1980,33 @@ LAB_009f7c88: } tear = fire_tear(weapon,&firePos,(Vector *)(local_288 + 4),0x47,iVar9,1.0,0.0); local_2ac = (EntityPtr) - (*(uint *)((int)&(tear->_tearFlags)._h + 4) & g_tearFlagOrbit._h._4_4_); - if ((((uint)(tear->_tearFlags)._l & (uint)g_tearFlagOrbit._l) == 0 && - (*(uint *)((int)&(tear->_tearFlags)._l + 4) & g_tearFlagOrbit._l._4_4_) == 0) && - (((uint)(tear->_tearFlags)._h & (uint)g_tearFlagOrbit._h) == 0 && + (*(uint *)(GHIDRA_INT(&(tear->_tearFlags)._h) + 4) & (*(undefined4 *)((char *)&(g_tearFlagOrbit._h) + 0x4))); + if (((GHIDRA_UINT((tear->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagOrbit._l)) == 0 && + (*(uint *)(GHIDRA_INT(&(tear->_tearFlags)._l) + 4) & (*(undefined4 *)((char *)&(g_tearFlagOrbit._l) + 0x4))) == 0) && + ((GHIDRA_UINT((tear->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagOrbit._h)) == 0 && local_2ac == (EntityPtr)0x0)) { tear->_fallingSpeed = tear->_fallingSpeed - 7.0; tear->_fallingAccel = tear->_fallingAccel * 0.01; } - local_210 = ((uint)(tear->_tearFlags)._l | (uint)g_tearFlagOrbitAdvanced._l | - (uint)g_tearFlagSpectral._l) & - ~((uint)g_tearFlagBoomerang._l | (uint)g_tearFlagOccult._l); - uStack_20c = (*(uint *)((int)&(tear->_tearFlags)._l + 4) | - g_tearFlagOrbitAdvanced._l._4_4_ | g_tearFlagSpectral._l._4_4_) & - ~(g_tearFlagBoomerang._l._4_4_ | g_tearFlagOccult._l._4_4_); - uStack_208 = ((uint)(tear->_tearFlags)._h | (uint)g_tearFlagOrbitAdvanced._h | - (uint)g_tearFlagSpectral._h) & - ~((uint)g_tearFlagBoomerang._h | (uint)g_tearFlagOccult._h); - uStack_204 = (*(uint *)((int)&(tear->_tearFlags)._h + 4) | - g_tearFlagOrbitAdvanced._h._4_4_ | g_tearFlagSpectral._h._4_4_) & - ~(g_tearFlagBoomerang._h._4_4_ | g_tearFlagOccult._h._4_4_); - flags_02._l._4_4_ = uStack_20c; - flags_02._l._0_4_ = local_210; - flags_02._h._0_4_ = uStack_208; - flags_02._h._4_4_ = uStack_204; + local_210 = (GHIDRA_UINT((tear->_tearFlags)._l) | GHIDRA_UINT(g_tearFlagOrbitAdvanced._l) | + GHIDRA_UINT(g_tearFlagSpectral._l)) & + ~(GHIDRA_UINT(g_tearFlagBoomerang._l) | GHIDRA_UINT(g_tearFlagOccult._l)); + uStack_20c = (*(uint *)(GHIDRA_INT(&(tear->_tearFlags)._l) + 4) | + (*(undefined4 *)((char *)&(g_tearFlagOrbitAdvanced._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagSpectral._l) + 0x4))) & + ~((*(undefined4 *)((char *)&(g_tearFlagBoomerang._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagOccult._l) + 0x4))); + uStack_208 = (GHIDRA_UINT((tear->_tearFlags)._h) | GHIDRA_UINT(g_tearFlagOrbitAdvanced._h) | + GHIDRA_UINT(g_tearFlagSpectral._h)) & + ~(GHIDRA_UINT(g_tearFlagBoomerang._h) | GHIDRA_UINT(g_tearFlagOccult._h)); + uStack_204 = (*(uint *)(GHIDRA_INT(&(tear->_tearFlags)._h) + 4) | + (*(undefined4 *)((char *)&(g_tearFlagOrbitAdvanced._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagSpectral._h) + 0x4))) & + ~((*(undefined4 *)((char *)&(g_tearFlagBoomerang._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagOccult._h) + 0x4))); + (*(undefined4 *)((char *)&(flags_02._l) + 0x4)) = uStack_20c; + (*(undefined4 *)((char *)&(flags_02._l) + 0x0)) = local_210; + (*(undefined4 *)((char *)&(flags_02._h) + 0x0)) = uStack_208; + (*(undefined4 *)((char *)&(flags_02._h) + 0x4)) = uStack_204; local_2a0 = tear; ((Entity_Tear *)(tear))->Entity_Tear::SetTearFlags(flags_02); - local_1c0._40_4_ = (tear->_sprite)._color._offset[2]; + (*(undefined4 *)((char *)&(local_1c0) + 0x28)) = (tear->_sprite)._color._offset[2]; tearTint._colorize[0] = 0.0; tearTint._colorize[1] = 0.0; tearTint._colorize[2] = 0.0; @@ -2016,30 +2016,30 @@ LAB_009f7c88: tearTint._tint[1] = 2.0; tearTint._tint[2] = 2.0; tearTint._tint[3] = 1.0; - local_1c0._0_4_ = (tear->_sprite)._color._tint[0]; - local_1c0._4_4_ = (tear->_sprite)._color._tint[1]; - local_1c0._8_4_ = (tear->_sprite)._color._tint[2]; - local_1c0._12_4_ = (tear->_sprite)._color._tint[3]; + (*(undefined4 *)((char *)&(local_1c0) + 0x0)) = (tear->_sprite)._color._tint[0]; + (*(undefined4 *)((char *)&(local_1c0) + 0x4)) = (tear->_sprite)._color._tint[1]; + (*(undefined4 *)((char *)&(local_1c0) + 0x8)) = (tear->_sprite)._color._tint[2]; + (*(undefined4 *)((char *)&(local_1c0) + 0xc)) = (tear->_sprite)._color._tint[3]; tearTint._offset[1] = 0.0; tearTint._offset[2] = 0.0; - local_1c0._16_4_ = (tear->_sprite)._color._colorize[0]; - local_1c0._20_4_ = (tear->_sprite)._color._colorize[1]; - local_1c0._24_4_ = (tear->_sprite)._color._colorize[2]; - local_1c0._28_4_ = (tear->_sprite)._color._colorize[3]; - local_1c0._32_8_ = *(undefined8 *)(tear->_sprite)._color._offset; + (*(undefined4 *)((char *)&(local_1c0) + 0x10)) = (tear->_sprite)._color._colorize[0]; + (*(undefined4 *)((char *)&(local_1c0) + 0x14)) = (tear->_sprite)._color._colorize[1]; + (*(undefined4 *)((char *)&(local_1c0) + 0x18)) = (tear->_sprite)._color._colorize[2]; + (*(undefined4 *)((char *)&(local_1c0) + 0x1c)) = (tear->_sprite)._color._colorize[3]; + (*(undefined8 *)((char *)&(local_1c0) + 0x20)) = *(undefined8 *)(tear->_sprite)._color._offset; ((Color *)((Color *)local_1c0))->Color::__mul(&tearTint); - heartTint0 = (float)local_1c0._0_4_; - heartTint1 = (float)local_1c0._4_4_; - heartTint2 = (float)local_1c0._8_4_; - heartTint3 = (float)local_1c0._12_4_; - heartOffset2 = (float)local_1c0._40_4_; - heartColorize0 = (float)local_1c0._16_4_; - heartColorize1 = (float)local_1c0._20_4_; - heartColorize2 = (float)local_1c0._24_4_; - heartColorize3 = (float)local_1c0._28_4_; - heartOffset0 = (float)local_1c0._32_4_; - heartOffset1 = (float)local_1c0._36_4_; - fVar6 = (float)local_1c0._32_4_; + heartTint0 = (*(undefined4 *)((char *)&((float)local_1c0) + 0x0)); + heartTint1 = (*(undefined4 *)((char *)&((float)local_1c0) + 0x4)); + heartTint2 = (*(undefined4 *)((char *)&((float)local_1c0) + 0x8)); + heartTint3 = (*(undefined4 *)((char *)&((float)local_1c0) + 0xc)); + heartOffset2 = (*(undefined4 *)((char *)&((float)local_1c0) + 0x28)); + heartColorize0 = (*(undefined4 *)((char *)&((float)local_1c0) + 0x10)); + heartColorize1 = (*(undefined4 *)((char *)&((float)local_1c0) + 0x14)); + heartColorize2 = (*(undefined4 *)((char *)&((float)local_1c0) + 0x18)); + heartColorize3 = (*(undefined4 *)((char *)&((float)local_1c0) + 0x1c)); + heartOffset0 = (*(undefined4 *)((char *)&((float)local_1c0) + 0x20)); + heartOffset1 = (*(undefined4 *)((char *)&((float)local_1c0) + 0x24)); + fVar6 = (*(undefined4 *)((char *)&((float)local_1c0) + 0x20)); tear->SetColor(); player = (Entity_Player *)VStack_290.y; } @@ -2068,7 +2068,7 @@ LAB_009f7ff2: else if (iVar9 == 3) { local_2a8.y = 7.00649e-45; } - if (*(uint *)((undefined4)weapon + 1) % (uint)local_2a8.y == 0) { + if (*(uint *)((undefined4)weapon + 1) % GHIDRA_UINT(local_2a8.y) == 0) { Entity_Player::GetTearHitParams(); isHasCollectible = ((Entity_Player *)(player))->Entity_Player::HasCollectible(0x95,0); if (isHasCollectible == 0) { @@ -2076,19 +2076,19 @@ LAB_009f7ff2: fStack_108 = fStack_108 + 0.3; } uStack_11c = uStack_11c | - (uint)g_tearFlagExplosive._l | (uint)g_tearFlagPoison._l | - (uint)g_tearFlagBoomerang._l; + GHIDRA_UINT(g_tearFlagExplosive._l) | GHIDRA_UINT(g_tearFlagPoison._l) | + GHIDRA_UINT(g_tearFlagBoomerang._l); uStack_114 = uStack_114 | - (uint)g_tearFlagExplosive._h | (uint)g_tearFlagPoison._h | - (uint)g_tearFlagBoomerang._h; + GHIDRA_UINT(g_tearFlagExplosive._h) | GHIDRA_UINT(g_tearFlagPoison._h) | + GHIDRA_UINT(g_tearFlagBoomerang._h); uStack_158 = 0; uStack_124 = 0; uStack_118 = uStack_118 | - g_tearFlagExplosive._l._4_4_ | g_tearFlagPoison._l._4_4_ | - g_tearFlagBoomerang._l._4_4_; + (*(undefined4 *)((char *)&(g_tearFlagExplosive._l) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagPoison._l) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagBoomerang._l) + 0x4)); uStack_110 = uStack_110 | - g_tearFlagExplosive._h._4_4_ | g_tearFlagPoison._h._4_4_ | - g_tearFlagBoomerang._h._4_4_; + (*(undefined4 *)((char *)&(g_tearFlagExplosive._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagPoison._h) + 0x4)) | + (*(undefined4 *)((char *)&(g_tearFlagBoomerang._h) + 0x4)); uStack_14c = 0x3f000000; uStack_148 = 0x3f666666; uStack_144 = 0x3ecccccd; @@ -2115,8 +2115,8 @@ LAB_009f7ff2: fVar6 = *(float *)((char *)owner + 0x33c); fVar8 = *(float *)((char *)owner + 0x340); } - auStack_248._4_4_ = fVar6 + *(float *)((char *)player + 0x164c) + local_2a8.x; - auStack_240._0_4_ = fVar8 + *(float *)((char *)player + 0x1650) + local_2a8.y; + (*(undefined4 *)((char *)&(auStack_248) + 0x4)) = fVar6 + *(float *)((char *)player + 0x164c) + local_2a8.x; + (*(undefined4 *)((char *)&(auStack_240) + 0x0)) = fVar8 + *(float *)((char *)player + 0x1650) + local_2a8.y; tear = (Entity_Tear *) ((Game *)(g_game))->Game::SpawnEx(2,tornCardVariant,(Vector *)(auStack_248 + 4),&local_2a8, (Entity *)player,0,uVar3,0); @@ -2129,10 +2129,10 @@ LAB_009f7ff2: tear->_height = -5.1; } tear->SetCollisionDamage(); - flags._l._4_4_ = uStack_11c; - flags._l._0_4_ = uStack_120; - flags._h._0_4_ = uStack_118; - flags._h._4_4_ = uStack_114; + (*(undefined4 *)((char *)&(flags._l) + 0x4)) = uStack_11c; + (*(undefined4 *)((char *)&(flags._l) + 0x0)) = uStack_120; + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = uStack_118; + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = uStack_114; ((Entity_Tear *)(tear))->Entity_Tear::SetTearFlags(flags); fVar6 = fStack_10c; if (fStack_10c <= 0.01) { @@ -2162,7 +2162,7 @@ LAB_009f7ff2: fVar8 = (tear->_velocity).y; (tear->_pos).x = fVar6; (tear->_pos).y = (tear->_pos).y - fVar8; - weapon = (Weapon *)local_288._0_4_; + weapon = (*(undefined4 *)((char *)&((Weapon *)local_288) + 0x0)); } } if (((*(int *)((char *)player + 0x2c) == 1) && (*(int *)((char *)player + 0x1aec) == 0x16)) && @@ -2175,13 +2175,13 @@ LAB_009f7ff2: if (0 < iVar9) { owner = weapon->_owner; if (owner == (void *)0x0) { - auStack_248._0_4_ = g_vectorZero.x; - auStack_248._4_4_ = g_vectorZero.y; + (*(undefined4 *)((char *)&(auStack_248) + 0x0)) = g_vectorZero.x; + (*(undefined4 *)((char *)&(auStack_248) + 0x4)) = g_vectorZero.y; fVar6 = g_vectorZero.y; } else { - auStack_248._0_4_ = *(float *)((char *)owner + 0x33c); - auStack_248._4_4_ = *(float *)((char *)owner + 0x340); + (*(undefined4 *)((char *)&(auStack_248) + 0x0)) = *(float *)((char *)owner + 0x33c); + (*(undefined4 *)((char *)&(auStack_248) + 0x4)) = *(float *)((char *)owner + 0x340); } ((Entity_Player *)(player))->Entity_Player::AddBlueFlies(1,(Vector *)auStack_248,(Entity *)0x0); } @@ -2206,16 +2206,16 @@ LAB_009f7ff2: } LAB_009f84ed: FUN_009f3c10(); - local_2ac = (EntityPtr)(extraout_EDX - (int)fVar6); - if (extraout_EDX - (int)fVar6 < (int)local_2a8.y) { + local_2ac = (EntityPtr)(extraout_EDX - GHIDRA_INT(fVar6)); + if (extraout_EDX - GHIDRA_INT(fVar6) < GHIDRA_INT(local_2a8.y)) { local_2ac = (EntityPtr)local_2a8.x; } if (local_2ac != (EntityPtr)0x0) { uVar3 = Random(); - if (uVar3 % (uint)local_2ac != 0) goto LAB_009f8615; + if (uVar3 % GHIDRA_UINT(local_2ac) != 0) goto LAB_009f8615; } - auStack_240._0_4_ = aimDirX; - auStack_240._4_4_ = aimDirY; + (*(undefined4 *)((char *)&(auStack_240) + 0x0)) = aimDirX; + (*(undefined4 *)((char *)&(auStack_240) + 0x4)) = aimDirY; fVar6 = aimDirY; if (isBirdsEye == 0) { if (isGhostPepper != 0) { @@ -2266,7 +2266,7 @@ LAB_009f8620: VStack_290.y = (float)EStack_2b8; if (1 < count) { uVar3 = Random(); - fVar6 = (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + fVar6 = (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 0.9; VStack_290.x = fVar6 * fVar8; VStack_290.y = (float)EStack_2b8 * fVar6; @@ -2283,8 +2283,8 @@ LAB_009f8620: fVar8 = *(float *)((char *)owner + 0x33c); ownerPosY = *(float *)((char *)owner + 0x340); } - auStack_240._4_4_ = fVar8 + *(float *)((char *)player + 0x164c) + fVar6; - local_238._0_4_ = ownerPosY + *(float *)((char *)player + 0x1650) + (float)EStack_2b8; + (*(undefined4 *)((char *)&(auStack_240) + 0x4)) = fVar8 + *(float *)((char *)player + 0x164c) + fVar6; + (*(undefined4 *)((char *)&(local_238) + 0x0)) = ownerPosY + *(float *)((char *)player + 0x1650) + (float)EStack_2b8; tear = (Entity_Tear *) ((Game *)(g_game))->Game::SpawnEx(2,0x14,(Vector *)(auStack_240 + 4),&VStack_290, (Entity *)player,0,uVar3,0); @@ -2298,10 +2298,10 @@ LAB_009f8620: } if (*(int *)((char *)player + 0x1368) < 1) { tear->SetCollisionDamage(); - greedFlags0 = hitParamsFlags0 | (uint)g_tearFlagMidas._l; - uVar3 = g_tearFlagMidas._l._4_4_ | hitParamsFlags1; - greedFlags2 = hitParamsFlags2 | (uint)g_tearFlagMidas._h; - uVar2 = hitParamsFlags3 | g_tearFlagMidas._h._4_4_; + greedFlags0 = hitParamsFlags0 | GHIDRA_UINT(g_tearFlagMidas._l); + uVar3 = (*(undefined4 *)((char *)&(g_tearFlagMidas._l) + 0x4)) | hitParamsFlags1; + greedFlags2 = hitParamsFlags2 | GHIDRA_UINT(g_tearFlagMidas._h); + uVar2 = hitParamsFlags3 | (*(undefined4 *)((char *)&(g_tearFlagMidas._h) + 0x4)); uStack_208 = greedFlags0; uStack_204 = uVar3; uStack_200 = greedFlags2; @@ -2310,19 +2310,19 @@ LAB_009f8620: else { ((Entity_Player *)(player))->Entity_Player::AddCoins(-1); tear->SetCollisionDamage(); - greedFlags0 = hitParamsFlags0 | (uint)g_tearFlagMidas._l | (uint)g_tearFlagCoinDrop._l; - uVar3 = g_tearFlagMidas._l._4_4_ | hitParamsFlags1 | g_tearFlagCoinDrop._l._4_4_; - greedFlags2 = hitParamsFlags2 | (uint)g_tearFlagMidas._h | (uint)g_tearFlagCoinDrop._h; - uVar2 = hitParamsFlags3 | g_tearFlagMidas._h._4_4_ | g_tearFlagCoinDrop._h._4_4_; + greedFlags0 = hitParamsFlags0 | GHIDRA_UINT(g_tearFlagMidas._l) | GHIDRA_UINT(g_tearFlagCoinDrop._l); + uVar3 = (*(undefined4 *)((char *)&(g_tearFlagMidas._l) + 0x4)) | hitParamsFlags1 | (*(undefined4 *)((char *)&(g_tearFlagCoinDrop._l) + 0x4)); + greedFlags2 = hitParamsFlags2 | GHIDRA_UINT(g_tearFlagMidas._h) | GHIDRA_UINT(g_tearFlagCoinDrop._h); + uVar2 = hitParamsFlags3 | (*(undefined4 *)((char *)&(g_tearFlagMidas._h) + 0x4)) | (*(undefined4 *)((char *)&(g_tearFlagCoinDrop._h) + 0x4)); uStack_218 = greedFlags0; uStack_214 = uVar3; local_210 = greedFlags2; uStack_20c = uVar2; } - flags_00._l._4_4_ = uVar3; - flags_00._l._0_4_ = greedFlags0; - flags_00._h._0_4_ = greedFlags2; - flags_00._h._4_4_ = uVar2; + (*(undefined4 *)((char *)&(flags_00._l) + 0x4)) = uVar3; + (*(undefined4 *)((char *)&(flags_00._l) + 0x0)) = greedFlags0; + (*(undefined4 *)((char *)&(flags_00._h) + 0x0)) = greedFlags2; + (*(undefined4 *)((char *)&(flags_00._h) + 0x4)) = uVar2; ((Entity_Tear *)(tear))->Entity_Tear::SetTearFlags(flags_00); if (tear->_parent != (EntityPtr)0x0) { std::multiset::erase(auStackY_374 + 0xb0); @@ -2334,7 +2334,7 @@ LAB_009f8620: tear->_canTriggerStreakEnd = 0; uVar3 = Random(); tear->_fallingSpeed = - ((float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + ((float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 0.2 - *(float *)((char *)player + 0x1478)) - 7.0; tear->_fallingAccel = *(float *)((char *)player + 0x147c) * 0.01; tear->Update(); @@ -2345,9 +2345,9 @@ LAB_009f8620: (tear->_pos).x = fVar6; (tear->_pos).y = (tear->_pos).y - fVar8; seed_fart_sound_override((int *)&local_2a8); - ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play((int)local_2a8.x,1.0,2,0,1.0,0.0); + ((SoundEffects *)(&manager->_sfxManager))->SoundEffects::Play(GHIDRA_INT(local_2a8.x),1.0,2,0,1.0,0.0); player = (Entity_Player *)VStack_290.y; - weapon = (Weapon *)local_288._0_4_; + weapon = (*(undefined4 *)((char *)&((Weapon *)local_288) + 0x0)); } } isHasCollectible = ((Entity_Player *)(player))->Entity_Player::HasCollectible(0x1bc,0); @@ -2357,28 +2357,28 @@ LAB_009f8620: Entity_Player::GetTearHitParams(); Isaac::GetAxisAlignedUnitVectorFromDir((Vector *)local_288,*(int *)((char *)player + 0x1628)) ; - fVar6 = (float)local_288._0_4_ * 10.0; - EVar7 = (EntityPtr)((float)local_288._4_4_ * 10.0); + fVar6 = (*(undefined4 *)((char *)&((float)local_288) + 0x0)) * 10.0; + EVar7 = (EntityPtr)((*(undefined4 *)((char *)&((float)local_288) + 0x4)) * 10.0); EStack_2b8 = EVar7; - local_288._0_4_ = fVar6; - local_288._4_4_ = EVar7; + (*(undefined4 *)((char *)&(local_288) + 0x0)) = fVar6; + (*(undefined4 *)((char *)&(local_288) + 0x4)) = EVar7; get_tear_movement_inheritance(weapon,pencilInheritedVel,(Vector *)local_288); FUN_009f3c40(); pencilVelX = (fVar6 + *extraout_EDX_00) * (float)EVar7; EStack_2b8 = (EntityPtr)(((float)EStack_2b8 + extraout_EDX_00[1]) * (float)EVar7); - local_288._0_4_ = pencilVelX; - local_288._4_4_ = EStack_2b8; + (*(undefined4 *)((char *)&(local_288) + 0x0)) = pencilVelX; + (*(undefined4 *)((char *)&(local_288) + 0x4)) = EStack_2b8; uVar3 = Random(); pencilSpreadAngle = - (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 3.14; pencilSpreadAngle = pencilSpreadAngle + pencilSpreadAngle; uVar3 = Random(); - fStack_2b4 = (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + fStack_2b4 = (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10; fVar6 = cos(pencilSpreadAngle); fVar6 = fVar6 * fStack_2b4 * 3.5 + pencilVelX; - local_238._4_4_ = fVar6; + (*(undefined4 *)((char *)&(local_238) + 0x4)) = fVar6; fVar8 = sin(pencilSpreadAngle); fStack_2b4 = fVar8 * fStack_2b4 * 3.5 + (float)EStack_2b8; pencilVelY = fStack_2b4; @@ -2406,15 +2406,15 @@ LAB_009f8620: tear->_height = -5.1; } tear->SetCollisionDamage(); - flags_01._l._4_4_ = hitParamsFlags1; - flags_01._l._0_4_ = hitParamsFlags0; - flags_01._h._0_4_ = hitParamsFlags2; - flags_01._h._4_4_ = hitParamsFlags3; + (*(undefined4 *)((char *)&(flags_01._l) + 0x4)) = hitParamsFlags1; + (*(undefined4 *)((char *)&(flags_01._l) + 0x0)) = hitParamsFlags0; + (*(undefined4 *)((char *)&(flags_01._h) + 0x0)) = hitParamsFlags2; + (*(undefined4 *)((char *)&(flags_01._h) + 0x4)) = hitParamsFlags3; ((Entity_Tear *)(tear))->Entity_Tear::SetTearFlags(flags_01); uVar3 = Random(); uVar2 = Random(); fVar6 = (((float)(uVar3 & 1) + 0.0) * 0.4 + 0.9 + - (float)((double)(int)uVar2 + __uint_to_double_fixup[-((int)uVar2 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar2) + __uint_to_double_fixup[-(GHIDRA_INT(uVar2) >> 0x1f)]) * 2.3283064e-10 * 0.05) * fStack_a4; if (fVar6 <= 0.01) { fVar6 = 0.01; @@ -2434,7 +2434,7 @@ LAB_009f8620: tear->_canTriggerStreakEnd = 0; uVar3 = Random(); tear->_fallingSpeed = - (float)((double)(int)uVar3 + __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * + (float)((double)GHIDRA_INT(uVar3) + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 0.2 - *(float *)((char *)player + 0x1478); tear->_fallingAccel = *(float *)((char *)player + 0x147c); tear->Update(); @@ -2444,14 +2444,14 @@ LAB_009f8620: (tear->_pos).x = fVar6; (tear->_pos).y = (tear->_pos).y - fVar8; if (1 < *(int *)&game->_deathmatchManager) { - fVar6 = (float)((uint)(tear->_tearFlags)._l | _DAT_00c34b10); - pvpFlags1 = *(uint *)((int)&(tear->_tearFlags)._l + 4) | DAT_00c34b14; - pvpFlags2 = (uint)(tear->_tearFlags)._h | _DAT_00c34b18; - pvpFlags3 = *(uint *)((int)&(tear->_tearFlags)._h + 4) | DAT_00c34b1c; - flags_03._l._4_4_ = pvpFlags1; - flags_03._l._0_4_ = fVar6; - flags_03._h._0_4_ = pvpFlags2; - flags_03._h._4_4_ = pvpFlags3; + fVar6 = (float)(GHIDRA_UINT((tear->_tearFlags)._l) | _DAT_00c34b10); + pvpFlags1 = *(uint *)(GHIDRA_INT(&(tear->_tearFlags)._l) + 4) | DAT_00c34b14; + pvpFlags2 = GHIDRA_UINT((tear->_tearFlags)._h) | _DAT_00c34b18; + pvpFlags3 = *(uint *)(GHIDRA_INT(&(tear->_tearFlags)._h) + 4) | DAT_00c34b1c; + (*(undefined4 *)((char *)&(flags_03._l) + 0x4)) = pvpFlags1; + (*(undefined4 *)((char *)&(flags_03._l) + 0x0)) = fVar6; + (*(undefined4 *)((char *)&(flags_03._h) + 0x0)) = pvpFlags2; + (*(undefined4 *)((char *)&(flags_03._h) + 0x4)) = pvpFlags3; pvpFlags0 = fVar6; ((Entity_Tear *)(tear))->Entity_Tear::SetTearFlags(flags_03); } @@ -2459,13 +2459,13 @@ LAB_009f8620: if (isHasCollectible == 0) { tear->_fallingAccel = *(float *)((char *)player + 0x147c) + 0.5; uVar3 = Random(); - fVar6 = (5.0 - (float)((double)(int)uVar3 + - __uint_to_double_fixup[-((int)uVar3 >> 0x1f)]) * 2.3283064e-10 * + fVar6 = (5.0 - (float)((double)GHIDRA_INT(uVar3) + + __uint_to_double_fixup[-(GHIDRA_INT(uVar3) >> 0x1f)]) * 2.3283064e-10 * 15.0) - *(float *)((char *)player + 0x1478); tear->_fallingSpeed = fVar6; } - local_2ac = (EntityPtr)((int)&((Entity *)((int)local_2ac + -0x40c))->_luaBridgeRef + 3); - weapon = (Weapon *)local_288._0_4_; + local_2ac = (EntityPtr)(GHIDRA_INT(&((Entity *)(GHIDRA_INT(local_2ac) + -0x40c))->_luaBridgeRef) + 3); + weapon = (*(undefined4 *)((char *)&((Weapon *)local_288) + 0x0)); } while (local_2ac != (EntityPtr)0x0); } } diff --git a/src/game/weapon_bone.cpp b/src/game/weapon_bone.cpp index afd37d9..ebb3c7c 100644 --- a/src/game/weapon_bone.cpp +++ b/src/game/weapon_bone.cpp @@ -23,7 +23,7 @@ void Weapon_Bone::ClearReferences() int remaining; int *local_8; - entitySlot = (int *)((int)this + 8); + entitySlot = (int *)(GHIDRA_INT(this) + 8); local_8 = this; if (*(int **)((char *)this + 8) != (int *)0x0) { (**(code **)(**(int **)((char *)this + 8) + 0x28))(); @@ -33,7 +33,7 @@ void Weapon_Bone::ClearReferences() *entitySlot = 0; } } - entitySlot = (int *)((int)this + 0x44); + entitySlot = (int *)(GHIDRA_INT(this) + 0x44); remaining = 4; do { if ((int *)*entitySlot != (int *)0x0) { @@ -43,7 +43,7 @@ void Weapon_Bone::ClearReferences() entitySlot = entitySlot + 1; remaining = remaining + -1; } while (remaining != 0); - entitySlot = (int *)((int)this + 0x58); + entitySlot = (int *)(GHIDRA_INT(this) + 0x58); if (*(int **)((char *)this + 0x58) != (int *)0x0) { (**(code **)(**(int **)((char *)this + 0x58) + 0x28))(); if (*entitySlot != 0) { @@ -52,7 +52,7 @@ void Weapon_Bone::ClearReferences() *entitySlot = 0; } } - entitySlot = (int *)((int)this + 0x54); + entitySlot = (int *)(GHIDRA_INT(this) + 0x54); if (*(int **)((char *)this + 0x54) != (int *)0x0) { (**(code **)(**(int **)((char *)this + 0x54) + 0x28))(); if (*entitySlot != 0) { @@ -99,7 +99,7 @@ void Weapon_Bone::guard_check_icall() int knife; int *targetRef; - knifeSlot = (int *)((int)this + 0x44); + knifeSlot = (int *)(GHIDRA_INT(this) + 0x44); slotsLeft = 4; do { knife = *knifeSlot; @@ -134,7 +134,7 @@ code_r0x009fefcb: isLess = bVar1 < *pbVar4; if (bVar1 != *pbVar4) { LAB_009ff012: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_009ff017; } if (bVar1 == 0) break; @@ -159,7 +159,7 @@ LAB_009ff017: isLess = bVar1 < *idleName; if (bVar1 != *idleName) { LAB_009ff054: - uVar3 = -(uint)isLess | 1; + uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_009ff059; } if (bVar1 == 0) break; @@ -214,8 +214,8 @@ void Weapon_Bone::init_club(int *param_1) uint local_c; code *setDamageFn; - local_c = __security_cookie ^ (uint)local_50; - local_4c._l._0_4_ = *param_1; + local_c = __security_cookie ^ GHIDRA_UINT(local_50); + (*(undefined4 *)((char *)&(local_4c._l) + 0x0)) = *param_1; if (*(int *)&(*(undefined1 *)((char *)(in_ECX) + 0x30)) == 0xb) { (**(code **)((char *)local_4c._l + 0x40))(); return; @@ -225,12 +225,12 @@ void Weapon_Bone::init_club(int *param_1) iVar5 = -1; (**(code **)((char *)local_4c._l + 0x3c))(pCVar3,0xffffffff,0xff,0); tearFlags = ((Weapon *)(in_ECX))->Weapon::get_owner_tear_flags((BitSet128 *)(local_50 + -0xc)); - iVar4 = *(int *)((int)&tearFlags->_l + 4); + iVar4 = *(int *)(GHIDRA_INT(&tearFlags->_l) + 4); qVar2 = tearFlags->_h; - iVar1 = *(int *)((int)&tearFlags->_h + 4); - param_1[0x104] = (int)tearFlags->_l; + iVar1 = *(int *)(GHIDRA_INT(&tearFlags->_h) + 4); + param_1[0x104] = GHIDRA_INT(tearFlags->_l); param_1[0x105] = iVar4; - param_1[0x106] = (int)qVar2; + param_1[0x106] = GHIDRA_INT(qVar2); param_1[0x107] = iVar1; setDamageFn = *(code **)(*param_1 + 0x40); damage = this->Weapon::get_damage(); diff --git a/src/game/weapon_brimstone.cpp b/src/game/weapon_brimstone.cpp index f2caf53..2193d41 100644 --- a/src/game/weapon_brimstone.cpp +++ b/src/game/weapon_brimstone.cpp @@ -45,7 +45,7 @@ void Weapon_Brimstone::fire_c_section_fetuses() shotSpeed = *(float *)((char *)pvVar2 + 0x1464); } weapon = this; - EntityList::QuerySublist((EntityList *)((int)g_game->_room + 0x1218),&lasers,7,-1,-1,0,0); + EntityList::QuerySublist((EntityList *)(GHIDRA_INT(g_game->_room) + 0x1218),&lasers,7,-1,-1,0,0); uVar3 = 0; local_8 = 0; if (lasers._size != 0) { @@ -59,8 +59,8 @@ void Weapon_Brimstone::fire_c_section_fetuses() dirX = dirX * 10.0; dirY = dirY * 10.0; rngResult = Random(); - local_1c = (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * 3.14; + local_1c = (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_1c = local_1c + local_1c; jitterY = sin(local_1c); unused = 0xa00e61; @@ -74,22 +74,22 @@ void Weapon_Brimstone::fire_c_section_fetuses() tear->Update(); } uVar3 = uVar3 + 1; - } while (uVar3 < (uint)lasers._size); + } while (uVar3 < GHIDRA_UINT(lasers._size)); } - if (lasers._0_1_ == '\0') { + if ((*(undefined1 *)((char *)&(lasers) + 0x0)) == '\0') { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { - allocatedBytes = (qword *)((int)g_mainHeap + 0x30); + allocatedBytes = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (lasers._data != (void *)0x0) { uVar3 = *(uint *)((char *)lasers._data + -4); oldAllocated = *allocatedBytes; - *(uint *)allocatedBytes = (uint)*allocatedBytes - uVar3; + *(uint *)allocatedBytes = GHIDRA_UINT(*allocatedBytes) - uVar3; *(uint *)((char *)allocatedBytes + 4) = - *(uint *)((char *)allocatedBytes + 4) - (uint)((uint)oldAllocated < uVar3); - free((uint *)((int)lasers._data + -4)); + *(uint *)((char *)allocatedBytes + 4) - GHIDRA_UINT((GHIDRA_UINT(oldAllocated) < uVar3)); + free((uint *)(GHIDRA_INT(lasers._data) + -4)); } } ExceptionList = local_10; @@ -106,7 +106,7 @@ float10 Weapon_Brimstone::GetMaxCharge() if ((this->_modifiers & 1) != 0) { chargeMultiplier = 2.5; } - if (((uint)this->_modifiers >> 4 & 1) != 0) { + if ((GHIDRA_UINT(this->_modifiers) >> 4 & 1) != 0) { return (float10)0.0; } baseCharge = *(float *)&(*(undefined1 *)((char *)(this) + 0x10)); @@ -134,17 +134,17 @@ void Weapon_Brimstone::init_laser(Entity_Laser *laser) undefined4 tearFlagsHighHigh; undefined4 tearFlagsLowHigh; - local_c = __security_cookie ^ (uint)auStack_50; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_50); local_4c = laser; tearFlags = ((Weapon *)((Weapon *)this))->Weapon::get_owner_tear_flags(&tearFlagsResult); - tearFlagsLowHigh = *(undefined4 *)((int)&tearFlags->_l + 4); + tearFlagsLowHigh = *(undefined4 *)(GHIDRA_INT(&tearFlags->_l) + 4); tearFlagsHigh = tearFlags->_h; - tearFlagsHighHigh = *(undefined4 *)((int)&tearFlags->_h + 4); + tearFlagsHighHigh = *(undefined4 *)(GHIDRA_INT(&tearFlags->_h) + 4); iVar1 = *(int *)laser; - *(int *)&(laser->_tearFlags)._l = (int)tearFlags->_l; - *(undefined4 *)((int)&(laser->_tearFlags)._l + 4) = tearFlagsLowHigh; - *(int *)&(laser->_tearFlags)._h = (int)tearFlagsHigh; - *(undefined4 *)((int)&(laser->_tearFlags)._h + 4) = tearFlagsHighHigh; + *(int *)&(laser->_tearFlags)._l = GHIDRA_INT(tearFlags->_l); + *(undefined4 *)(GHIDRA_INT(&(laser->_tearFlags)._l) + 4) = tearFlagsLowHigh; + *(int *)&(laser->_tearFlags)._h = GHIDRA_INT(tearFlagsHigh); + *(undefined4 *)(GHIDRA_INT(&(laser->_tearFlags)._h) + 4) = tearFlagsHighHigh; laserMethod = *(code **)(iVar1 + 0x3c); laserColor = ((Weapon *)((Weapon *)this))->Weapon::get_laser_color(&laserColorResult); piVar2 = (int *)0x0; @@ -189,7 +189,7 @@ undefined4 Weapon_Brimstone::GetMarkedTargetVariant() byte isHasItem; Entity_Player *owner; - if (((uint)this->_modifiers >> 4 & 1) != 0) { + if ((GHIDRA_UINT(this->_modifiers) >> 4 & 1) != 0) { return 0; } owner = this->_owner; @@ -216,7 +216,7 @@ LAB_00a02830: // 00a02870 undefined4 Weapon_Brimstone::GetFocusEntity() { - if (((uint)this->_modifiers >> 4 & 1) == 0) { + if ((GHIDRA_UINT(this->_modifiers) >> 4 & 1) == 0) { return (EntityPtr)0x0; } return this->_mainLaser; @@ -270,10 +270,10 @@ void Weapon_Brimstone::fire(float Speed, byte IgnoreStatusEffects) uint stackCookie; code *setColorFn; - stackCookie = __security_cookie ^ (uint)auStack_a8; + stackCookie = __security_cookie ^ GHIDRA_UINT(auStack_a8); aimDir = (Vector *)Speed; damageMultiplier = in_XMM2_Da; - ((Weapon *)((Weapon *)this))->Weapon::GetMultiShotParams(multiShotParams,(int)this); + ((Weapon *)((Weapon *)this))->Weapon::GetMultiShotParams(multiShotParams,GHIDRA_INT(this)); pvVar6 = this->_owner; if (pvVar6 == (void *)0x0) { LAB_00a02903: @@ -284,10 +284,10 @@ LAB_00a02903: if (*(int *)((char *)pvVar6 + 0x28) == 3) goto LAB_00a02924; } LAB_00a0293e: - local_a4._0_4_ = (Entity_Laser *)0x3f800000; + (*(undefined4 *)((char *)&(local_a4) + 0x0)) = (Entity_Laser *)0x3f800000; } else if (*(int *)((char *)pvVar6 + 0x28) == 1) { - local_a4._0_4_ = *(undefined4 *)((char *)pvVar6 + 0x1464); + (*(undefined4 *)((char *)&(local_a4) + 0x0)) = *(undefined4 *)((char *)pvVar6 + 0x1464); local_8c = (EntityPtr)pvVar6; } else { @@ -297,21 +297,21 @@ LAB_00a02924: pvVar6 = *(void **)((char *)pvVar6 + 0x410); if (pvVar6 == (void *)0x0) goto LAB_00a0293e; LAB_00a02934: - local_a4._0_4_ = *(undefined4 *)((char *)pvVar6 + 0x1464); + (*(undefined4 *)((char *)&(local_a4) + 0x0)) = *(undefined4 *)((char *)pvVar6 + 0x1464); } - if (((uint)this->_modifiers >> 9 & 1) == 0) { + if ((GHIDRA_UINT(this->_modifiers) >> 9 & 1) == 0) { Weapon::UpdateHeadChargeAnimation((Weapon *)this,0x76,2,(Vector *)Speed,-1.0); fVar9 = 0.0; local_8c = (EntityPtr)0x0; local_98 = (float *)0x0; if (0 < multiShotParams[0]) { do { - local_a4._4_4_ = ((Vector *)Speed)->x; + (*(undefined4 *)((char *)&(local_a4) + 0x4)) = ((Vector *)Speed)->x; local_9c = ((Vector *)Speed)->y; Entity_Player::GetMultiShotPositionVelocity - (&local_80,(int)local_98,2,*(Vector *)Speed,(float)local_a4._0_4_, + (&local_80,GHIDRA_INT(local_98),2,*(Vector *)Speed,(*(undefined4 *)((char *)&((float)local_a4) + 0x0)), multiShotParams[0],fStack_6c,fStack_68,fStack_64,local_60,iStack_5c,fStack_58, - auStack_54[0],auStack_54._4_2_); + auStack_54[0],(*(undefined2 *)((char *)&(auStack_54) + 0x4))); EVar4 = (EntityPtr) ((Weapon *)((Weapon *)this))->Weapon::fire_brimstone_with_color(&local_78,damageMultiplier,0); (**(code **)(*(int *)EVar4 + 0xc))(); @@ -328,22 +328,22 @@ LAB_00a02934: } else { if (*(EntityPtr *)((char *)EVar4 + 0x3bc) != (EntityPtr)0x0) { - VStack_94.y = (float)((int)EVar4 + 0x3bc); + VStack_94.y = (float)(GHIDRA_INT(EVar4) + 0x3bc); std::multiset::erase(); } *(EntityPtr *)((char *)EVar4 + 0x3bc) = local_8c; LAB_00a02da1: std::multiset::insert(); } - fVar9 = (float)((int)local_98 + 1); + fVar9 = (float)(GHIDRA_INT(local_98) + 1); Speed = (float)aimDir; local_98 = (float *)fVar9; - } while ((int)fVar9 < (int)multiShotParams[0]); + } while (GHIDRA_INT(fVar9) < GHIDRA_INT(multiShotParams[0])); } - for (local_98 = (float *)(auStack_54._4_4_ & 0xffff); local_98 != (float *)0x0; - local_98 = (float *)((int)local_98 + -1)) { + for (local_98 = (float *)((*(undefined4 *)((char *)&(auStack_54) + 0x4)) & 0xffff); local_98 != (float *)0x0; + local_98 = (float *)(GHIDRA_INT(local_98) + -1)) { rngValue = Random(); - fVar9 = (float)((double)(int)rngValue + __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + fVar9 = (float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 3.14; VStack_94.y = fVar9 + fVar9; local_80.x = cos(VStack_94.y); @@ -351,60 +351,60 @@ LAB_00a02da1: pEVar2 = this->_owner; if (pEVar2 == (Entity *)0x0) { local_9c = g_vectorZero.y; - local_a4._4_4_ = g_vectorZero.x; + (*(undefined4 *)((char *)&(local_a4) + 0x4)) = g_vectorZero.x; fVar9 = extraout_ECX; } else { fVar9 = (pEVar2->_pos).y; - local_a4._4_4_ = (pEVar2->_pos).x; + (*(undefined4 *)((char *)&(local_a4) + 0x4)) = (pEVar2->_pos).x; local_9c = fVar9; } - local_a4._0_4_ = + (*(undefined4 *)((char *)&(local_a4) + 0x0)) = Weapon::FireBrimstone(pEVar2,(Vector *)(local_a4 + 4),&local_80,damageMultiplier,fVar9,0) ; - setColorFn = *(code **)(*(int *)local_a4._0_4_ + 0x3c); + setColorFn = *(code **)(*(*(undefined4 *)((char *)&((int *)local_a4) + 0x0)) + 0x3c); laserColor = ((Weapon *)((Weapon *)this))->Weapon::get_laser_color((ColorMod *)(auStack_54 + 0x14)); piVar10 = (int *)0x0; (*setColorFn)(laserColor,0xffffffff,0xff); - local_a4._4_4_ = this->_mainLaser; + (*(undefined4 *)((char *)&(local_a4) + 0x4)) = this->_mainLaser; pEVar5 = (Entity_Laser *)(piVar10 + 0xef); if (*(float *)pEVar5 != 0.0) { - local_a4._0_4_ = pEVar5; + (*(undefined4 *)((char *)&(local_a4) + 0x0)) = pEVar5; std::multiset::erase(local_a4); } - *(undefined4 *)pEVar5 = local_a4._4_4_; - if ((EntityPtr)local_a4._4_4_ != (EntityPtr)0x0) { + *(undefined4 *)pEVar5 = (*(undefined4 *)((char *)&(local_a4) + 0x4)); + if ((*(undefined4 *)((char *)&((EntityPtr)local_a4) + 0x4)) != (EntityPtr)0x0) { std::multiset::insert(pEVar5); } (**(code **)(*piVar10 + 0xc))(); fVar9 = extraout_ECX_00; } - auStack_54[1] = (char)((uint)auStack_54._0_4_ >> 8); + auStack_54[1] = (char)((*(undefined4 *)((char *)&(GHIDRA_UINT(auStack_54)) + 0x0)) >> 8); isShootingBackwards = auStack_54[1] != '\0'; if (isShootingBackwards) { pEVar2 = this->_owner; local_80.x = -aimDir->x; local_80.y = -aimDir->y; if (pEVar2 == (Entity *)0x0) { - local_a4._4_4_ = g_vectorZero.x; + (*(undefined4 *)((char *)&(local_a4) + 0x4)) = g_vectorZero.x; local_9c = g_vectorZero.y; } else { fVar9 = (pEVar2->_pos).y; - local_a4._4_4_ = (pEVar2->_pos).x; + (*(undefined4 *)((char *)&(local_a4) + 0x4)) = (pEVar2->_pos).x; local_9c = fVar9; } - local_a4._0_4_ = + (*(undefined4 *)((char *)&(local_a4) + 0x0)) = Weapon::FireBrimstone(pEVar2,(Vector *)(local_a4 + 4),&local_80,damageMultiplier,fVar9,0) ; - setColorFn = *(code **)(*(int *)local_a4._0_4_ + 0x3c); + setColorFn = *(code **)(*(*(undefined4 *)((char *)&((int *)local_a4) + 0x0)) + 0x3c); laserColor = ((Weapon *)((Weapon *)this))->Weapon::get_laser_color((ColorMod *)(auStack_54 + 0x14)); piVar10 = (int *)0x0; (*setColorFn)(laserColor,0xffffffff,0xff); EVar4 = this->_mainLaser; pEVar5 = (Entity_Laser *)(piVar10 + 0xef); if (*(float *)pEVar5 != 0.0) { - local_a4._0_4_ = pEVar5; + (*(undefined4 *)((char *)&(local_a4) + 0x0)) = pEVar5; std::multiset::erase(local_a4); } *(EntityPtr *)pEVar5 = EVar4; @@ -422,16 +422,16 @@ LAB_00a02da1: local_80.y = aimDir->x; if (pEVar2 == (Entity *)0x0) { local_9c = g_vectorZero.y; - local_a4._4_4_ = g_vectorZero.x; + (*(undefined4 *)((char *)&(local_a4) + 0x4)) = g_vectorZero.x; } else { fVar9 = (pEVar2->_pos).y; - local_a4._4_4_ = (pEVar2->_pos).x; + (*(undefined4 *)((char *)&(local_a4) + 0x4)) = (pEVar2->_pos).x; local_9c = fVar9; } - local_a4._0_4_ = + (*(undefined4 *)((char *)&(local_a4) + 0x0)) = Weapon::FireBrimstone(pEVar2,(Vector *)(local_a4 + 4),&local_80,damageMultiplier,fVar9,0); - setColorFn = *(code **)(*(int *)local_a4._0_4_ + 0x3c); + setColorFn = *(code **)(*(*(undefined4 *)((char *)&((int *)local_a4) + 0x0)) + 0x3c); laserColor = ((Weapon *)((Weapon *)this))->Weapon::get_laser_color((ColorMod *)(auStack_54 + 0x14)); piVar11 = (int *)0x0; piVar10 = (int *)0xffffffff; @@ -439,7 +439,7 @@ LAB_00a02da1: EVar4 = this->_mainLaser; pEVar5 = (Entity_Laser *)(piVar11 + 0xef); if (*(int *)pEVar5 != 0) { - local_a4._0_4_ = pEVar5; + (*(undefined4 *)((char *)&(local_a4) + 0x0)) = pEVar5; std::multiset::erase(local_a4); } *(EntityPtr *)pEVar5 = EVar4; @@ -477,15 +477,15 @@ LAB_00a02da1: ((Weapon *)((Weapon *)this))->Weapon::SetBlinkTime(10,unused); isAnyHit = 0; loopIndex = 0; - VStack_94.x = (float)((uint)VStack_94.x & 0xffffff); + VStack_94.x = (float)(GHIDRA_UINT(VStack_94.x) & 0xffffff); if (0 < multiShotParams[0]) { do { - local_a4._4_4_ = aimDir->x; + (*(undefined4 *)((char *)&(local_a4) + 0x4)) = aimDir->x; local_9c = aimDir->y; Entity_Player::GetMultiShotPositionVelocity - (&local_80,loopIndex,10,*aimDir,(float)local_a4._0_4_,multiShotParams[0],fStack_6c, - fStack_68,fStack_64,local_60,iStack_5c,fStack_58,auStack_54[0],auStack_54._4_2_); - if (VStack_94.x._3_1_ == '\0') { + (&local_80,loopIndex,10,*aimDir,(*(undefined4 *)((char *)&((float)local_a4) + 0x0)),multiShotParams[0],fStack_6c, + fStack_68,fStack_64,local_60,iStack_5c,fStack_58,auStack_54[0],(*(undefined2 *)((char *)&(auStack_54) + 0x4))); + if ((*(undefined1 *)((char *)&(VStack_94.x) + 0x3)) == '\0') { isHitscanHit = fire_hitscan(this,&g_vectorZero,&local_78,0,damageMultiplier); isAnyHit = 0; if (isHitscanHit != 0) goto LAB_00a02a08; @@ -495,19 +495,19 @@ LAB_00a02a08: isAnyHit = 1; } loopIndex = loopIndex + 1; - VStack_94.x = (float)CONCAT13(isAnyHit,VStack_94.x._0_3_); + VStack_94.x = (float)CONCAT13(isAnyHit,(*(undefined1 *)((char *)&(VStack_94.x) + 0x0))); } while (loopIndex < multiShotParams[0]); } pVVar3 = aimDir; - fVar9 = (float)auStack_54._0_4_; - for (rngValue = auStack_54._4_4_ & 0xffff; aimDir = pVVar3, auStack_54._0_4_ = fVar9, rngValue != 0; + fVar9 = (*(undefined4 *)((char *)&((float)auStack_54) + 0x0)); + for (rngValue = (*(undefined4 *)((char *)&(auStack_54) + 0x4)) & 0xffff; aimDir = pVVar3, (*(undefined4 *)((char *)&(auStack_54) + 0x0)) = fVar9, rngValue != 0; rngValue = rngValue - 1) { if (isAnyHit == 0) { rngValue = Random(); - fVar9 = (float)((double)(int)rngValue + __uint_to_double_fixup[-((int)rngValue >> 0x1f)]) * + fVar9 = (float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 3.14; local_98 = (float *)(fVar9 + fVar9); - local_a4._4_4_ = cos((float)local_98); + (*(undefined4 *)((char *)&(local_a4) + 0x4)) = cos((float)local_98); local_9c = sin((float)local_98); isHitscanHit = fire_hitscan(this,&g_vectorZero,(Vector *)(local_a4 + 4),0,damageMultiplier); isAnyHit = 0; @@ -518,24 +518,24 @@ LAB_00a02aa9: isAnyHit = 1; } pVVar3 = aimDir; - fVar9 = (float)auStack_54._0_4_; + fVar9 = (*(undefined4 *)((char *)&((float)auStack_54) + 0x0)); } - auStack_54[1] = (char)((uint)fVar9 >> 8); + auStack_54[1] = (char)(GHIDRA_UINT(fVar9) >> 8); if (auStack_54[1] != '\0') { if (isAnyHit != 0) goto LAB_00a02bed; - local_a4._4_4_ = (uint)pVVar3->x ^ 0x80000000; + (*(undefined4 *)((char *)&(local_a4) + 0x4)) = GHIDRA_UINT(pVVar3->x) ^ 0x80000000; local_9c = -pVVar3->y; isAnyHit = fire_hitscan(this,&g_vectorZero,(Vector *)(local_a4 + 4),0,damageMultiplier); - fVar9 = (float)auStack_54._0_4_; + fVar9 = (*(undefined4 *)((char *)&((float)auStack_54) + 0x0)); } if (isAnyHit != 0) goto LAB_00a02bed; - auStack_54[2] = (char)((uint)fVar9 >> 0x10); + auStack_54[2] = (char)(GHIDRA_UINT(fVar9) >> 0x10); if (auStack_54[2] != '\0') { - local_a4._4_4_ = (uint)pVVar3->y ^ 0x80000000; + (*(undefined4 *)((char *)&(local_a4) + 0x4)) = GHIDRA_UINT(pVVar3->y) ^ 0x80000000; local_9c = pVVar3->x; isAnyHit = fire_hitscan(this,&g_vectorZero,(Vector *)(local_a4 + 4),0,damageMultiplier); if (isAnyHit != 0) goto LAB_00a02bed; - local_a4._4_4_ = pVVar3->y; + (*(undefined4 *)((char *)&(local_a4) + 0x4)) = pVVar3->y; local_9c = -pVVar3->x; isAnyHit = fire_hitscan(this,&g_vectorZero,(Vector *)(local_a4 + 4),0,damageMultiplier); if (isAnyHit != 0) goto LAB_00a02bed; @@ -563,12 +563,12 @@ LAB_00a02bed: ((float)local_98 - *(float *)&(*(undefined1 *)((char *)(this) + 0x14))) * 0.5 + *(float *)&(*(undefined1 *)((char *)(this) + 0x14)); if (local_8c != (EntityPtr)0x0) { pvVar6 = (g_manager->_itemConfig)._nullItems._begin; - if ((0x1fc < (int)((int)(g_manager->_itemConfig)._nullItems._end - (int)pvVar6 & 0xfffffffcU)) + if ((0x1fc < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar6) & 0xfffffffcU))) && (local_80.x = *(float *)((char *)pvVar6 + 0x1fc), local_80.x != 0.0)) { local_78.x = *(float *)((char *)local_80.x + 0x78); local_80.y = 0.0; local_78.y = 0.0; - ((TemporaryEffects *)((TemporaryEffects *)((int)local_8c + 0x1508)))->TemporaryEffects::RemoveEffect(&local_80,-1); + ((TemporaryEffects *)((TemporaryEffects *)(GHIDRA_INT(local_8c) + 0x1508)))->TemporaryEffects::RemoveEffect(&local_80,-1); return; } } diff --git a/src/game/weapon_knife.cpp b/src/game/weapon_knife.cpp index db13f6b..4ba37f4 100644 --- a/src/game/weapon_knife.cpp +++ b/src/game/weapon_knife.cpp @@ -7,7 +7,7 @@ void Weapon_Knife::ClearReferences() int remaining; int *local_8; - entityRef = (int *)((int)this + 8); + entityRef = (int *)(GHIDRA_INT(this) + 8); local_8 = this; if (*(int **)((char *)this + 8) != (int *)0x0) { (**(code **)(**(int **)((char *)this + 8) + 0x28))(); @@ -17,7 +17,7 @@ void Weapon_Knife::ClearReferences() *entityRef = 0; } } - entityRef = (int *)((int)this + 0x44); + entityRef = (int *)(GHIDRA_INT(this) + 0x44); remaining = 4; do { if ((int *)*entityRef != (int *)0x0) { @@ -81,7 +81,7 @@ void Weapon_Knife::init_knife(Entity_Knife *knife) undefined4 tearFlagsWord3; code *virtualFn; - local_c = __security_cookie ^ (uint)auStack_58; + local_c = __security_cookie ^ GHIDRA_UINT(auStack_58); this_00 = *(Entity_Player **)((char *)this + 4); local_4c = this; if (this_00 == (Entity_Player *)0x0) { @@ -115,25 +115,25 @@ LAB_00a0517d: tearFlagsWord1 = 1; fStack_6c = 3.57331e-43; (*virtualFn)(tearColor,0xffffffff); - if (((uint)unaff_EDI->_modifiers >> 4 & 1) == 0) { + if ((GHIDRA_UINT(unaff_EDI->_modifiers) >> 4 & 1) == 0) { ownerTearFlags = ((Weapon *)(unaff_EDI))->Weapon::get_owner_tear_flags((BitSet128 *)(auStack_58 + -4)); - tearFlagsWord1 = *(undefined4 *)((int)&ownerTearFlags->_l + 4); + tearFlagsWord1 = *(undefined4 *)(GHIDRA_INT(&ownerTearFlags->_l) + 4); tearFlagsHigh = ownerTearFlags->_h; - tearFlagsWord3 = *(undefined4 *)((int)&ownerTearFlags->_h + 4); - *(int *)&(knife->_tearFlags)._l = (int)ownerTearFlags->_l; - *(undefined4 *)((int)&(knife->_tearFlags)._l + 4) = tearFlagsWord1; - *(int *)&(knife->_tearFlags)._h = (int)tearFlagsHigh; - *(undefined4 *)((int)&(knife->_tearFlags)._h + 4) = tearFlagsWord3; + tearFlagsWord3 = *(undefined4 *)(GHIDRA_INT(&ownerTearFlags->_h) + 4); + *(int *)&(knife->_tearFlags)._l = GHIDRA_INT(ownerTearFlags->_l); + *(undefined4 *)(GHIDRA_INT(&(knife->_tearFlags)._l) + 4) = tearFlagsWord1; + *(int *)&(knife->_tearFlags)._h = GHIDRA_INT(tearFlagsHigh); + *(undefined4 *)(GHIDRA_INT(&(knife->_tearFlags)._h) + 4) = tearFlagsWord3; } else { ownerTearFlags = ((Weapon *)(unaff_EDI))->Weapon::get_owner_tear_flags((BitSet128 *)(auStack_58 + -4)); - ludoFlagsWord2 = (uint)ownerTearFlags->_h | (uint)g_tearFlagLudovico._h; - ludoFlagsWord3 = *(uint *)((int)&ownerTearFlags->_h + 4) | g_tearFlagLudovico._h._4_4_; - ludoFlagsWord1 = *(uint *)((int)&ownerTearFlags->_l + 4) | g_tearFlagLudovico._l._4_4_; - *(uint *)&(knife->_tearFlags)._l = (uint)ownerTearFlags->_l | (uint)g_tearFlagLudovico._l; - *(uint *)((int)&(knife->_tearFlags)._l + 4) = ludoFlagsWord1; + ludoFlagsWord2 = GHIDRA_UINT(ownerTearFlags->_h) | GHIDRA_UINT(g_tearFlagLudovico._h); + ludoFlagsWord3 = *(uint *)(GHIDRA_INT(&ownerTearFlags->_h) + 4) | (*(undefined4 *)((char *)&(g_tearFlagLudovico._h) + 0x4)); + ludoFlagsWord1 = *(uint *)(GHIDRA_INT(&ownerTearFlags->_l) + 4) | (*(undefined4 *)((char *)&(g_tearFlagLudovico._l) + 0x4)); + *(uint *)&(knife->_tearFlags)._l = GHIDRA_UINT(ownerTearFlags->_l) | GHIDRA_UINT(g_tearFlagLudovico._l); + *(uint *)(GHIDRA_INT(&(knife->_tearFlags)._l) + 4) = ludoFlagsWord1; *(uint *)&(knife->_tearFlags)._h = ludoFlagsWord2; - *(uint *)((int)&(knife->_tearFlags)._h + 4) = ludoFlagsWord3; + *(uint *)(GHIDRA_INT(&(knife->_tearFlags)._h) + 4) = ludoFlagsWord3; } virtualFn = *(code **)(*(int *)knife + 0x40); fVar1 = ((Weapon *)(unaff_EDI))->Weapon::get_damage(); diff --git a/src/game/weapon_laser.cpp b/src/game/weapon_laser.cpp index 6d5087a..7631698 100644 --- a/src/game/weapon_laser.cpp +++ b/src/game/weapon_laser.cpp @@ -24,16 +24,16 @@ void Weapon_Laser::init_laser(Weapon *weapon, Entity_Laser *laser) undefined4 tearFlagsWord3; code *virtualFn; - local_c = __security_cookie ^ (uint)(auStack_8 + 4); + local_c = __security_cookie ^ GHIDRA_UINT((auStack_8 + 4)); tearFlags = ((Weapon *)(weapon))->Weapon::get_owner_tear_flags(&tearFlagsOut); - tearFlagsWord1 = *(undefined4 *)((int)&tearFlags->_l + 4); + tearFlagsWord1 = *(undefined4 *)(GHIDRA_INT(&tearFlags->_l) + 4); tearFlagsHigh = tearFlags->_h; - tearFlagsWord3 = *(undefined4 *)((int)&tearFlags->_h + 4); + tearFlagsWord3 = *(undefined4 *)(GHIDRA_INT(&tearFlags->_h) + 4); iVar1 = *(int *)laser; - *(int *)&(laser->_tearFlags)._l = (int)tearFlags->_l; - *(undefined4 *)((int)&(laser->_tearFlags)._l + 4) = tearFlagsWord1; - *(int *)&(laser->_tearFlags)._h = (int)tearFlagsHigh; - *(undefined4 *)((int)&(laser->_tearFlags)._h + 4) = tearFlagsWord3; + *(int *)&(laser->_tearFlags)._l = GHIDRA_INT(tearFlags->_l); + *(undefined4 *)(GHIDRA_INT(&(laser->_tearFlags)._l) + 4) = tearFlagsWord1; + *(int *)&(laser->_tearFlags)._h = GHIDRA_INT(tearFlagsHigh); + *(undefined4 *)(GHIDRA_INT(&(laser->_tearFlags)._h) + 4) = tearFlagsWord3; virtualFn = *(code **)(iVar1 + 0x3c); laserColor = ((Weapon *)(weapon))->Weapon::get_laser_color(&laserColorOut); (*virtualFn)(laserColor,0xffffffff,0xff,0,1); @@ -49,7 +49,7 @@ void Weapon_Laser::ClearReferences() int *eraseKey; int *entityRef; - entityRef = (int *)((int)this + 8); + entityRef = (int *)(GHIDRA_INT(this) + 8); eraseKey = this; if (*(int **)((char *)this + 8) != (int *)0x0) { (**(code **)(**(int **)((char *)this + 8) + 0x28))(); @@ -59,7 +59,7 @@ void Weapon_Laser::ClearReferences() *entityRef = 0; } } - entityRef = (int *)((int)this + 0x44); + entityRef = (int *)(GHIDRA_INT(this) + 0x44); if (*(int **)((char *)this + 0x44) != (int *)0x0) { (**(code **)(**(int **)((char *)this + 0x44) + 0x28))(); if (*entityRef != 0) { diff --git a/src/game/weapon_monstros_lung.cpp b/src/game/weapon_monstros_lung.cpp index 49a3ec4..276be3f 100644 --- a/src/game/weapon_monstros_lung.cpp +++ b/src/game/weapon_monstros_lung.cpp @@ -63,12 +63,12 @@ LAB_00a08780: fVar1 = *extraout_EDX; fVar2 = extraout_EDX[1]; rngResult = Random(); - angle = (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * + angle = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 3.14; angle = angle + angle; rngResult = Random(); - spreadScale = (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10; + spreadScale = (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10; velocityX = cos(angle); velocityX = velocityX * spreadScale * 3.5 + fVar1 * in_XMM0_Da; local_30.x = velocityX; @@ -79,14 +79,14 @@ LAB_00a08780: LAB_00a08a1b: tear = ((Weapon *)(in_ECX))->Weapon::fire_tear(&firePos,&local_30,0,in_stack_ffffff94,in_XMM3_Da,0.0); if (1 < *(int *)&g_game->_deathmatchManager) { - local_20 = (uint)(tear->_tearFlags)._l | _DAT_00c34b10; - in_stack_ffffff94 = *(uint *)((int)&(tear->_tearFlags)._l + 4) | DAT_00c34b14; - uStack_18 = (uint)(tear->_tearFlags)._h | _DAT_00c34b18; - uStack_14 = *(uint *)((int)&(tear->_tearFlags)._h + 4) | DAT_00c34b1c; - flags._l._4_4_ = in_stack_ffffff94; - flags._l._0_4_ = local_20; - flags._h._0_4_ = uStack_18; - flags._h._4_4_ = uStack_14; + local_20 = GHIDRA_UINT((tear->_tearFlags)._l) | _DAT_00c34b10; + in_stack_ffffff94 = *(uint *)(GHIDRA_INT(&(tear->_tearFlags)._l) + 4) | DAT_00c34b14; + uStack_18 = GHIDRA_UINT((tear->_tearFlags)._h) | _DAT_00c34b18; + uStack_14 = *(uint *)(GHIDRA_INT(&(tear->_tearFlags)._h) + 4) | DAT_00c34b1c; + (*(undefined4 *)((char *)&(flags._l) + 0x4)) = in_stack_ffffff94; + (*(undefined4 *)((char *)&(flags._l) + 0x0)) = local_20; + (*(undefined4 *)((char *)&(flags._h) + 0x0)) = uStack_18; + (*(undefined4 *)((char *)&(flags._h) + 0x4)) = uStack_14; uStack_1c = in_stack_ffffff94; ((Entity_Tear *)(tear))->Entity_Tear::SetTearFlags(flags); } @@ -94,7 +94,7 @@ LAB_00a08a1b: if (0.0 < player->_tearfallaccel) { rngResult = Random(); tear->_fallingSpeed = - (float)((double)(int)rngResult + __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) + (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * -10.0 - tear->_fallingSpeed; } else { @@ -107,16 +107,16 @@ LAB_00a08a1b: if (isHasCollectible != 0) goto LAB_00a08b44; rngResult = Random(); fVar2 = 5.0; - fVar1 = (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * + fVar1 = (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 15.0; } else { LAB_00a08b44: rngResult = Random(); fVar2 = -5.0; - fVar1 = (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * + fVar1 = (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 10.0; } tear->_fallingSpeed = (fVar2 - fVar1) - player->_tearfallspeed; @@ -125,8 +125,8 @@ LAB_00a08b44: rngResult = Random(); rngResult2 = Random(); in_XMM0_Da = (((float)(rngResult & 1) + 0.0) * 0.4 + 0.9 + - (float)((double)(int)rngResult2 + - __uint_to_double_fixup[-((int)rngResult2 >> 0x1f)]) * 2.3283064e-10 * + (float)((double)GHIDRA_INT(rngResult2) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult2) >> 0x1f)]) * 2.3283064e-10 * 0.05) * tear->_fScale; if (in_XMM0_Da <= 0.01) { in_XMM0_Da = 0.01; @@ -140,8 +140,8 @@ LAB_00a08b44: isHasCollectible = ((Entity_Player *)(player))->Entity_Player::HasCollectible(0x34,0); if (isHasCollectible == 0) goto LAB_00a08a1b; rngResult = Random(); - local_30.y = (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * 0.6 + local_30.y = (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 0.6 + 0.4; local_30.x = velocityX * local_30.y; local_30.y = fVar1 * local_30.y; @@ -150,8 +150,8 @@ LAB_00a08b44: bomb->_fallAcceleration = 0.8; rngResult = Random(); bomb->_fallSpeed = - -1.0 - (float)((double)(int)rngResult + - __uint_to_double_fixup[-((int)rngResult >> 0x1f)]) * 2.3283064e-10 * 8.0; + -1.0 - (float)((double)GHIDRA_INT(rngResult) + + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 8.0; rngResult = Random(); fuseTime = bomb->_explosionCountdown1 - rngResult % 0xf; if (fuseTime < 0xf) { @@ -162,7 +162,7 @@ LAB_00a08b44: rngResult = Random(); rngResult2 = Random(); bomb->_loadCostumes = 1; - fVar1 = (float)((double)(int)rngResult2 + __uint_to_double_fixup[-((int)rngResult2 >> 0x1f)] + fVar1 = (float)((double)GHIDRA_INT(rngResult2) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult2) >> 0x1f)] ) * 2.3283064e-10 * 0.15 + ((float)(rngResult & 1) + 0.0) * 0.2 + 0.4; in_XMM0_Da = fVar1 * bomb->_scale; bomb->_radiusMultiplier = fVar1 * bomb->_radiusMultiplier; diff --git a/src/game/weapon_rockets.cpp b/src/game/weapon_rockets.cpp index 8a7248d..a4f52ba 100644 --- a/src/game/weapon_rockets.cpp +++ b/src/game/weapon_rockets.cpp @@ -18,5 +18,5 @@ undefined4 Weapon_Rockets::GetMarkedTargetVariant() player = (Entity_Player *)0x0; LAB_00a099be: isHasMarked = ((Entity_Player *)(player))->Entity_Player::HasCollectible(0x18a,0); - return -(uint)(isHasMarked != 0) & 0x1e; + return -GHIDRA_UINT((isHasMarked != 0)) & 0x1e; } diff --git a/src/game/weapon_urn_of_souls.cpp b/src/game/weapon_urn_of_souls.cpp index a493293..ea389d2 100644 --- a/src/game/weapon_urn_of_souls.cpp +++ b/src/game/weapon_urn_of_souls.cpp @@ -20,7 +20,7 @@ void Weapon_UrnOfSouls::ClearReferences() int *local_8; int *entityRef; - entityRef = (int *)((int)this + 8); + entityRef = (int *)(GHIDRA_INT(this) + 8); local_8 = this; if (*(int **)((char *)this + 8) != (int *)0x0) { (**(code **)(**(int **)((char *)this + 8) + 0x28))(); @@ -30,7 +30,7 @@ void Weapon_UrnOfSouls::ClearReferences() *entityRef = 0; } } - entityRef = (int *)((int)this + 0x4c); + entityRef = (int *)(GHIDRA_INT(this) + 0x4c); if (*(int **)((char *)this + 0x4c) != (int *)0x0) { (**(code **)(**(int **)((char *)this + 0x4c) + 0x28))(); if (*entityRef != 0) { diff --git a/src/game/weighted_outcome_picker.cpp b/src/game/weighted_outcome_picker.cpp index 3564039..79df959 100644 --- a/src/game/weighted_outcome_picker.cpp +++ b/src/game/weighted_outcome_picker.cpp @@ -25,7 +25,7 @@ uint WeightedOutcomePicker::PickOutcome(RNG rng) uVar7 = 0; outcomes = *this; uVar6 = 0; - outcomeCount = (int)this[1] - (int)outcomes >> 3; + outcomeCount = GHIDRA_INT(this[1]) - GHIDRA_INT(outcomes) >> 3; if ((outcomeCount != 0) && (7 < outcomeCount)) { partialSum0 = 0; partialSum1 = 0; @@ -76,7 +76,7 @@ LAB_0049ccec: uVar6 = (*pcVar5)(); return uVar6; } - uVar6 = (uint)rng._seed >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; + uVar6 = GHIDRA_UINT(rng._seed) >> ((byte)rng._shift1 & 0x1f) ^ rng._seed; uVar6 = uVar6 << ((byte)rng._shift2 & 0x1f) ^ uVar6; if (uVar7 == 0) { uVar7 = 0; @@ -87,12 +87,12 @@ LAB_0049ccec: iVar8 = 0; uVar6 = 0; outcomes = *this; - outcomeCount = (int)this[1] - (int)outcomes >> 3; + outcomeCount = GHIDRA_INT(this[1]) - GHIDRA_INT(outcomes) >> 3; if (outcomeCount != 0) { - weightPtr = (int *)((int)outcomes + 4); + weightPtr = (int *)(GHIDRA_INT(outcomes) + 4); do { iVar8 = iVar8 + *weightPtr; - if ((int)uVar7 < iVar8) { + if (GHIDRA_INT(uVar7) < iVar8) { return *(uint *)((char *)outcomes + uVar6 * 8); } uVar6 = uVar6 + 1; diff --git a/src/game/wisp_entry.cpp b/src/game/wisp_entry.cpp index b31ca71..65daa0a 100644 --- a/src/game/wisp_entry.cpp +++ b/src/game/wisp_entry.cpp @@ -7,7 +7,7 @@ void WispEntry::constructor() undefined4 *subRecord; int subRecordsLeft; - subRecord = (undefined4 *)((int)this + 0x18); + subRecord = (undefined4 *)(GHIDRA_INT(this) + 0x18); *(undefined4 *)this = 0x40000000; *(undefined4 *)((char *)this + 4) = 0x40400000; subRecordsLeft = 2; @@ -15,7 +15,7 @@ void WispEntry::constructor() *(undefined4 *)((char *)this + 0xc) = 0x3f800000; *(undefined4 *)((char *)this + 0x10) = 0x41f00000; *(undefined1 *)((char *)this + 0x14) = 1; - subRecordFields = (undefined4 *)((int)this + 0x2c); + subRecordFields = (undefined4 *)(GHIDRA_INT(this) + 0x2c); do { *subRecord = 0x3f800000; subRecord = subRecord + 0x12; diff --git a/src/game/xml_memory_pool.cpp b/src/game/xml_memory_pool.cpp index 02fdea7..7df19d7 100644 --- a/src/game/xml_memory_pool.cpp +++ b/src/game/xml_memory_pool.cpp @@ -17,8 +17,8 @@ void xml_memory_pool::clear() local_8 = 0xffffffff; puStack_c = &LAB_00af12f0; - blockSize = __security_cookie ^ (int)register0x00000010 - 4U; - staticPool = (int)this + 0xc; + blockSize = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; + staticPool = GHIDRA_INT(this) + 0xc; ppvVar2 = &local_10; staticPool = *(int *)this; local_10 = ExceptionList; @@ -29,14 +29,14 @@ void xml_memory_pool::clear() allocCounter = &g_allocatedBytesNoHeap; } else { - allocCounter = (qword *)((int)g_mainHeap + 0x30); + allocCounter = (qword *)(GHIDRA_INT(g_mainHeap) + 0x30); } if (staticPool != 0) { blockSize = *(uint *)(staticPool + -4); oldCount = *allocCounter; - *(uint *)allocCounter = (uint)*allocCounter - blockSize; + *(uint *)allocCounter = GHIDRA_UINT(*allocCounter) - blockSize; *(uint *)((char *)allocCounter + 4) = - *(uint *)((char *)allocCounter + 4) - (uint)((uint)oldCount < blockSize); + *(uint *)((char *)allocCounter + 4) - GHIDRA_UINT((GHIDRA_UINT(oldCount) < blockSize)); free((void *)(staticPool + -4)); } local_8 = 0xffffffff; @@ -50,7 +50,7 @@ void xml_memory_pool::clear() } *(int *)this = staticPool; *(uint *)((char *)this + 4) = (-staticPool & 3U) + staticPool; - *(int *)((char *)this + 8) = (int)this + 0x1000c; + *(int *)((char *)this + 8) = GHIDRA_INT(this) + 0x1000c; ExceptionList = local_10; return; } diff --git a/src/game/xml_node.cpp b/src/game/xml_node.cpp index 4cdd378..70acc84 100644 --- a/src/game/xml_node.cpp +++ b/src/game/xml_node.cpp @@ -32,12 +32,12 @@ void * xml_node::first_attribute(byte *name, uint nameSize, byte isCaseSensitive else { iVar1 = attr[2]; } - if (iVar1 == (int)nameEnd - (int)name) { + if (iVar1 == GHIDRA_INT(nameEnd) - GHIDRA_INT(name)) { attrNameEnd = attrName + iVar1; if (attrNameEnd <= attrName) { return attr; } - iVar1 = (int)name - (int)attrName; + iVar1 = GHIDRA_INT(name) - GHIDRA_INT(attrName); while (*attrName == attrName[iVar1]) { attrName = attrName + 1; if (attrNameEnd <= attrName) { @@ -81,12 +81,12 @@ void * xml_node::first_node(byte *name, int nameSize, byte isCaseSensitive) else { iVar1 = child[2]; } - if (iVar1 == (int)nameEnd - (int)name) { + if (iVar1 == GHIDRA_INT(nameEnd) - GHIDRA_INT(name)) { childNameEnd = childName + iVar1; if (childNameEnd <= childName) { return child; } - iVar1 = (int)name - (int)childName; + iVar1 = GHIDRA_INT(name) - GHIDRA_INT(childName); while (*childName == childName[iVar1]) { childName = childName + 1; if (childNameEnd <= childName) {